diff --git a/.gitignore b/.gitignore index c32bc99..722fe85 100644 --- a/.gitignore +++ b/.gitignore @@ -52,6 +52,10 @@ next-env.d.ts !.cursor/rules/ !.cursor/skills +# sparkle-design-internal をワークスペース内に置いた場合(スキルは .cursor/skills に同期) +# en: Local clone of internal repo at repo root — avoid accidental commits +/sparkle-design-internal/ + # vscode # .vscode diff --git a/package.json b/package.json index 4322518..056e2df 100644 --- a/package.json +++ b/package.json @@ -39,7 +39,6 @@ "build:registry:merge": "node scripts/merge-registry.mjs", "build:registry:vercel": "bash scripts/build-registry-vercel.sh", "preinstall": "npx only-allow pnpm", - "postinstall": "npx lightningcss --version || true", "build:package": "rm -rf dist && tsc -p tsconfig.build.json && tsc-alias -p tsconfig.build.json", "format": "prettier --config ./.prettierrc -w \"**/*.{js,ts,tsx,css,md,json}\"", "format:check": "prettier --config ./.prettierrc --check \"**/*.{js,ts,tsx,css,md,json}\"", diff --git a/src/app/globals.css b/src/app/globals.css index 7a5c3ba..a997b81 100644 --- a/src/app/globals.css +++ b/src/app/globals.css @@ -126,6 +126,61 @@ height: 0; } } + +@keyframes sparkle-overlay-in { + from { + opacity: 0; + } + to { + opacity: 1; + } +} +@keyframes sparkle-overlay-out { + from { + opacity: 1; + } + to { + opacity: 0; + } +} + +@keyframes sparkle-modal-in { + from { + opacity: 0; + transform: translateY(8px) scale(0.98); + } + to { + opacity: 1; + transform: translateY(0px) scale(1); + } +} +@keyframes sparkle-modal-out { + from { + opacity: 1; + transform: translateY(0px) scale(1); + } + to { + opacity: 0; + transform: translateY(6px) scale(0.98); + } +} + +@keyframes sparkle-fade-in { + from { + opacity: 0; + } + to { + opacity: 1; + } +} +@keyframes sparkle-fade-out { + from { + opacity: 1; + } + to { + opacity: 0; + } +} @utility accordion-down { animation: accordion-down 0.2s ease-out; } diff --git a/src/components/ui/link/index.stories.tsx b/src/components/ui/link/index.stories.tsx index f27d460..6300dc7 100644 --- a/src/components/ui/link/index.stories.tsx +++ b/src/components/ui/link/index.stories.tsx @@ -1,4 +1,5 @@ import type { Meta, StoryObj } from "@storybook/react"; +import NextLink from "next/link"; import React from "react"; import { Link } from "./index"; @@ -26,7 +27,7 @@ export const Default: Story = { args: { children: "リンクテキスト", isOpenInNew: false, - href: "#", + href: "/", }, }; @@ -34,7 +35,7 @@ export const ExternalLink: Story = { args: { children: "リンクテキスト", isOpenInNew: true, - href: "#", + href: "https://example.com", }, }; @@ -45,7 +46,7 @@ export const ExternalLink: Story = { export const AsChild: Story = { render: () => ( - next/link 等に置き換え可能 + next/link 等に置き換え可能 ), }; @@ -71,6 +72,6 @@ export const CustomTypography: Story = { args: { children: "カスタムタイポグラフィ", className: "character-4-bold-pro", - href: "#", + href: "/", }, }; diff --git a/src/components/ui/modal/index.stories.tsx b/src/components/ui/modal/index.stories.tsx index fb60b22..6132778 100644 --- a/src/components/ui/modal/index.stories.tsx +++ b/src/components/ui/modal/index.stories.tsx @@ -234,3 +234,55 @@ export const EnabledOverlayClickToClose: Story = { ); }, }; + +/** + * 開閉モーション(オーバーレイフェード+パネル fade/zoom)の確認用。 + * en: For verifying open/close motion (overlay fade + panel fade/zoom). + */ +export const MotionPreview: Story = { + parameters: { + layout: "fullscreen", + docs: { + description: { + story: + "全画面レイアウトでスクリムとパネルの動きを確認する。**開く**:トリガーボタン。**閉じる**:×/キャンセル/保存/Esc。オーバーレイクリックは既定で閉じない(仕様確認用)。オーバーレイはフェード(Open 180ms / Close 160ms)、コンテンツは opacity + translateY + scale(Open 240ms / delay 20ms、Close 200ms)で出入りする。\n\nen: Use fullscreen to judge scrim and panel motion. Trigger opens; close via ×, footer buttons, or Esc. Overlay fades (open 180ms, close 160ms). Content enters/leaves with opacity + translateY + scale (open 240ms with 20ms delay, close 200ms).", + }, + }, + }, + render: () => { + const [open, setOpen] = useState(false); + return ( +
+ + + + + + + モーション確認 + + + +

+ 開閉を繰り返して、オーバーレイのフェードとパネルのスケール/不透明度の同期を確認してください。 +

+
+ + + + +
+
+
+ ); + }, +}; diff --git a/src/components/ui/modal/index.tsx b/src/components/ui/modal/index.tsx index e0024e7..ac27870 100644 --- a/src/components/ui/modal/index.tsx +++ b/src/components/ui/modal/index.tsx @@ -127,7 +127,13 @@ function ModalOverlay({ - - {children} - + + {children} + + ); }