Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

これは不要な差分なので無くしてほしいです!

Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ next-env.d.ts
!.cursor/rules/
!.cursor/skills

# claude skills (internal, not for version control)
.claude/skills/

# vscode
# .vscode

Expand Down
20 changes: 20 additions & 0 deletions .storybook/main.ts

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

今の環境でviteは使っていないはずなのでこの差分は不要かもです

Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
// Storybook のメイン設定ファイル
// en: Main configuration for Storybook
import path from "node:path";
import { fileURLToPath } from "node:url";

import type { StorybookConfig } from "@storybook/experimental-nextjs-vite";

const dirname =
typeof __dirname !== "undefined"
? __dirname
: path.dirname(fileURLToPath(import.meta.url));

const config: StorybookConfig = {
stories: ["../src/**/*.mdx", "../src/**/*.stories.@(js|jsx|mjs|ts|tsx)"],

Expand Down Expand Up @@ -32,5 +40,17 @@ const config: StorybookConfig = {
typescript: {
reactDocgen: "react-docgen-typescript",
},

// Vite のパスエイリアス設定
// en: Configure Vite path aliases to resolve @/ imports
viteFinal: async (config) => {
if (config.resolve) {
config.resolve.alias = {
...config.resolve.alias,
"@": path.resolve(dirname, "../src"),
};
}
return config;
},
};
export default config;
16 changes: 14 additions & 2 deletions src/components/ui/dialog/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,13 @@ function DialogOverlay({
<DialogPrimitive.Overlay
data-slot="dialog-overlay"
className={cn(
"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",
"fixed inset-0 z-50 bg-black/50",
// オープン:ease-out で 400ms フェードイン
// en: open — fade-in over 400ms with ease-out
"data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:animation-duration-400 data-[state=open]:[--tw-ease:ease-out]",
// クローズ:ease-in で 3000ms フェードアウト
// en: close — fade-out over 3000ms with ease-in
"data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:animation-duration-3000 data-[state=closed]:[--tw-ease:ease-in]",
className
)}
{...props}
Expand All @@ -116,7 +122,13 @@ function DialogContent({
<DialogPrimitive.Content
data-slot="dialog-content"
className={cn(
"bg-white data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-popout duration-200 sm:max-w-lg",
"fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border bg-white p-6 shadow-popout sm:max-w-lg",
// オープン:下から 6px スライドアップ + フェードイン + scale 0.97→1.0(expo-out)
// en: open — slide up 6px + fade-in + scale 0.97→1.0 with expo-out easing
"data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:slide-in-from-bottom-2 data-[state=open]:zoom-in-97 data-[state=open]:animation-duration-400 data-[state=open]:[--tw-ease:cubic-bezier(0.16,1,0.3,1)]",
// クローズ:スライドなし・スケールのみでその場に収縮
// en: close — scale-only shrink, no slide
"data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-97 data-[state=closed]:animation-duration-300 data-[state=closed]:[--tw-ease:cubic-bezier(0.4,0,1,1)]",
className
)}
{...props}
Expand Down
Loading