@cakejp/design-system 0.22.1 → 0.24.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (119) hide show
  1. package/CHANGELOG.md +102 -0
  2. package/CLAUDE.md +4 -2
  3. package/MIGRATION.md +79 -0
  4. package/UPDATING.md +1 -1
  5. package/bin/check-tokens.mjs +20 -0
  6. package/contracts/components.json +87 -25
  7. package/contracts/composition.json +9 -9
  8. package/contracts/rules.json +1 -1
  9. package/contracts/screen-patterns.json +1 -1
  10. package/dist/components/ec/admin-shell.js +7 -7
  11. package/dist/components/ec/anniversary-card.js +1 -1
  12. package/dist/components/ec/chart-controls.js +7 -7
  13. package/dist/components/ec/coupon-card.js +10 -10
  14. package/dist/components/ec/delivery-calendar.js +1 -1
  15. package/dist/components/ec/mypage-shell.js +1 -1
  16. package/dist/components/ec/order-section.js +1 -1
  17. package/dist/components/ec/order-summary.js +7 -5
  18. package/dist/components/ec/product-card.js +32 -30
  19. package/dist/components/ec/product-detail-sidebar.js +1 -1
  20. package/dist/components/ec/product-list-item.js +57 -56
  21. package/dist/components/ec/product-option.js +30 -30
  22. package/dist/components/ec/review-summary.js +1 -1
  23. package/dist/components/ec/shop-card.js +7 -7
  24. package/dist/components/foundations/accordion.js +1 -1
  25. package/dist/components/foundations/alert-dialog.js +65 -43
  26. package/dist/components/foundations/alert.js +75 -69
  27. package/dist/components/foundations/badge.js +8 -8
  28. package/dist/components/foundations/button.js +15 -15
  29. package/dist/components/foundations/checkbox-card.js +18 -18
  30. package/dist/components/foundations/checkbox.js +6 -6
  31. package/dist/components/foundations/chip-variants.js +8 -8
  32. package/dist/components/foundations/data-table.js +244 -209
  33. package/dist/components/foundations/dialog.js +84 -60
  34. package/dist/components/foundations/drawer.js +61 -53
  35. package/dist/components/foundations/field.js +51 -35
  36. package/dist/components/foundations/file-input.js +1 -1
  37. package/dist/components/foundations/input.js +9 -8
  38. package/dist/components/foundations/popover.js +15 -12
  39. package/dist/components/foundations/progress.js +19 -18
  40. package/dist/components/foundations/radio-group.js +26 -23
  41. package/dist/components/foundations/select.js +9 -8
  42. package/dist/components/foundations/sheet.js +82 -59
  43. package/dist/components/foundations/skeleton.js +6 -6
  44. package/dist/components/foundations/slider.js +7 -7
  45. package/dist/components/foundations/sonner.js +19 -18
  46. package/dist/components/foundations/switch.js +3 -2
  47. package/dist/components/foundations/tabs.js +5 -5
  48. package/dist/components/foundations/textarea.js +7 -6
  49. package/dist/components/foundations/toggle-group.js +5 -5
  50. package/dist/components/primitives/admin-header.js +3 -3
  51. package/dist/components/primitives/admin-side-nav.js +101 -92
  52. package/dist/components/primitives/category-shortcuts.js +6 -6
  53. package/dist/components/primitives/chat-composer.js +1 -1
  54. package/dist/components/primitives/chip.js +25 -25
  55. package/dist/components/primitives/combobox.js +74 -63
  56. package/dist/components/primitives/content-carousel.js +64 -62
  57. package/dist/components/primitives/date-picker.js +99 -96
  58. package/dist/components/primitives/error-state.js +9 -9
  59. package/dist/components/primitives/filter-bar.js +4 -4
  60. package/dist/components/primitives/footer.js +1 -1
  61. package/dist/components/primitives/form-field.js +8 -8
  62. package/dist/components/primitives/funnel-shell.js +5 -5
  63. package/dist/components/primitives/header.js +16 -16
  64. package/dist/components/primitives/image-carousel.js +42 -41
  65. package/dist/components/primitives/image-gallery.js +61 -58
  66. package/dist/components/primitives/image-input.js +2 -2
  67. package/dist/components/primitives/image-uploader.js +1 -1
  68. package/dist/components/primitives/kebab-menu.js +20 -16
  69. package/dist/components/primitives/list-item.js +17 -17
  70. package/dist/components/primitives/menu-drawer.js +11 -11
  71. package/dist/components/primitives/multi-select.js +66 -66
  72. package/dist/components/primitives/notification-list.js +13 -13
  73. package/dist/components/primitives/number-input.js +118 -112
  74. package/dist/components/primitives/progress-steps.js +3 -3
  75. package/dist/components/primitives/search-bar.js +6 -6
  76. package/dist/components/primitives/section-nav.js +1 -1
  77. package/dist/components/primitives/side-nav.js +1 -1
  78. package/dist/components/primitives/sub-nav.js +12 -12
  79. package/dist/components/primitives/tag.js +8 -8
  80. package/dist/components/primitives/workspace-shell.js +8 -8
  81. package/dist/index.css +1 -1
  82. package/dist/index.js +1487 -712
  83. package/dist/lib/focus-restore.js +67 -0
  84. package/dist/lib/focus-ring.js +1 -1
  85. package/dist/lib/ime.js +17 -0
  86. package/dist/lib/search-normalize.js +30 -0
  87. package/dist/types/components/ec/admin-shell.d.ts +1 -1
  88. package/dist/types/components/foundations/alert-dialog.d.ts +2 -2
  89. package/dist/types/components/foundations/alert.d.ts +14 -1
  90. package/dist/types/components/foundations/card.d.ts +3 -3
  91. package/dist/types/components/foundations/confirm-dialog.d.ts +3 -3
  92. package/dist/types/components/foundations/data-table.d.ts +1 -1
  93. package/dist/types/components/foundations/dialog.d.ts +2 -2
  94. package/dist/types/components/foundations/drawer.d.ts +1 -1
  95. package/dist/types/components/foundations/field.d.ts +23 -3
  96. package/dist/types/components/foundations/popover.d.ts +1 -1
  97. package/dist/types/components/foundations/sheet.d.ts +4 -3
  98. package/dist/types/components/foundations/sonner.d.ts +3 -2
  99. package/dist/types/components/primitives/admin-side-nav.d.ts +2 -0
  100. package/dist/types/components/primitives/combobox.d.ts +6 -0
  101. package/dist/types/components/primitives/date-picker.d.ts +8 -3
  102. package/dist/types/components/primitives/funnel-shell.d.ts +1 -1
  103. package/dist/types/components/primitives/kebab-menu.d.ts +10 -1
  104. package/dist/types/components/primitives/number-input.d.ts +20 -1
  105. package/dist/types/components/primitives/progress-steps.d.ts +1 -1
  106. package/dist/types/components/primitives/section.d.ts +1 -1
  107. package/dist/types/components/primitives/workspace-shell.d.ts +2 -2
  108. package/dist/types/index.d.ts +3 -4
  109. package/dist/types/lib/focus-restore.d.ts +52 -0
  110. package/dist/types/lib/focus-ring.d.ts +3 -0
  111. package/dist/types/lib/ime.d.ts +36 -0
  112. package/dist/types/lib/search-normalize.d.ts +28 -0
  113. package/package.json +3 -1
  114. package/src/components/COMPONENT_LOOKUP.md +12 -12
  115. package/src/preset-standalone.css +50 -24
  116. package/src/preset.css +36 -18
  117. package/src/styles/primitive.css +1 -0
  118. package/src/styles/semantic.css +21 -5
  119. package/tokens.json +48 -11
@@ -0,0 +1,36 @@
1
+ /**
2
+ * 日本語入力(IME)の変換中に押されたキーを見分けるための判定。
3
+ *
4
+ * 判定は 2 段構え:
5
+ * 1. `isComposing` — 標準。Chrome / Firefox はこれで足りる
6
+ * 2. `keyCode === 229` — Safari(WebKit)は変換を終えるキーの keydown を compositionend の
7
+ * 後に出すため、その keydown では `isComposing` が false になる。代わりに keyCode が
8
+ * 229("process" キー)になるので、それも変換中として扱う。一部の Android WebView も
9
+ * `isComposing` を立てずに 229 だけを送る
10
+ */
11
+ /** 判定に必要な最小限の形(React.KeyboardEvent と DOM の KeyboardEvent の両方を受ける)。 */
12
+ export interface ImeKeyEventLike {
13
+ nativeEvent?: {
14
+ isComposing?: boolean;
15
+ keyCode?: number;
16
+ };
17
+ isComposing?: boolean;
18
+ keyCode?: number;
19
+ }
20
+ /** 変換中の keydown なら true。 */
21
+ export declare function isImeComposing(event: ImeKeyEventLike): boolean;
22
+ /**
23
+ * オーバーレイ(Dialog / Sheet / AlertDialog / Drawer / Popover)の `onEscapeKeyDown` で使う。
24
+ * 変換中の Esc(変換の取り消し)なら `preventDefault()` して true を返す。
25
+ *
26
+ * Radix の DismissableLayer は `key === "Escape"` だけを見て閉じるため、変換を取り消すつもりの
27
+ * Esc で入力中のダイアログやシートごと閉じ、入力した内容が消えていた。preventDefault すると
28
+ * Radix は閉じない。変換していないときの Esc は従来どおり閉じる。
29
+ * consumer の `onEscapeKeyDown` を先に呼んでから、このガードを呼ぶこと。
30
+ */
31
+ export declare function guardEscapeDuringIme(event: Pick<Event, "preventDefault"> & ImeKeyEventLike): boolean;
32
+ /**
33
+ * consumer の `onEscapeKeyDown` を先に呼び、そのあと変換中の Esc を止めるハンドラーを作る。
34
+ * Content 部品の `onEscapeKeyDown` にそのまま渡す。
35
+ */
36
+ export declare function composeEscapeKeyDownWithImeGuard(handler: ((event: KeyboardEvent) => void) | undefined): (event: KeyboardEvent) => void;
@@ -0,0 +1,28 @@
1
+ /**
2
+ * ## 絞り込み検索の表記ゆれ吸収(Combobox 等)
3
+ *
4
+ * 日本語の候補を部分一致で絞り込むとき、次の違いを同じとみなす:
5
+ * - 大文字 / 小文字(`Tokyo` / `tokyo`)
6
+ * - 全角 / 半角(NFKC。`ABC` / `ABC`、`シブヤ` / `シブヤ`)
7
+ * - ひらがな / カタカナ(`しぶや` / `シブヤ`)
8
+ * - 漢字に挟まれた「ヶ / ケ / ヵ / が」(`市ヶ谷` / `市ケ谷`、`霞が関` / `霞ケ関`)
9
+ *
10
+ * 「ヶ」系の同一視は漢字に挟まれたときだけに限る(`ケーキ` が `がーき` に当たらないように)。
11
+ * 姉妹 DS(KSK #853)の Combobox の既定の絞り込みを移植したもの。
12
+ */
13
+ /** 文脈に依らない正規化: NFKC(全角半角)→ 小文字 → カタカナをひらがなへ */
14
+ declare function normalizeSearchText(text: string): string;
15
+ /**
16
+ * 表記ゆれ用の正規化。{@link normalizeSearchText} 済みの文字列について、漢字に挟まれた
17
+ * 「ヶ / ケ / ヵ / が」を同じ字にする。直後が文字列の終わりでも同一視する(「市ヶ」まで打った途中でも
18
+ * 当たるように)。`isQuery` のときは先頭の直前を漢字とみなす(「ヶ谷」と打っても候補の「漢字 + ケ」に当たるように)。
19
+ */
20
+ declare function normalizeKeVariants(normalized: string, isQuery: boolean): string;
21
+ /**
22
+ * 候補(ラベル・別名)のどれかが検索語を部分一致で含むか。
23
+ * 素の正規化での部分一致、または「ヶ」系もそろえた正規化での部分一致のどちらかで当てる
24
+ * (同一視は「追加で当てる」だけにし、`ケ谷` → `市ケ谷` のような素の一致を落とさない)。
25
+ * 検索語が空白だけのときは全件に当たる。
26
+ */
27
+ declare function matchesSearch(candidates: ReadonlyArray<string | undefined>, query: string): boolean;
28
+ export { normalizeSearchText, normalizeKeVariants, matchesSearch };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cakejp/design-system",
3
- "version": "0.22.1",
3
+ "version": "0.24.0",
4
4
  "type": "module",
5
5
  "description": "Cake.jp Design System — UI コンポーネント・カラートークン・タイポグラフィ",
6
6
  "license": "UNLICENSED",
@@ -96,6 +96,7 @@
96
96
  "generate:lint-rules": "node scripts/generate-lint-rules.mjs",
97
97
  "generate:lookup": "node scripts/generate-component-lookup.mjs",
98
98
  "lint:contrast": "node scripts/check-contrast.mjs",
99
+ "check:bundle": "node scripts/check-bundle-size.mjs",
99
100
  "lint:css-vars": "node scripts/check-css-vars.mjs",
100
101
  "lint:vrt-baselines": "node scripts/check-vrt-baselines.mjs",
101
102
  "check": "tsc --noEmit -p tsconfig.app.json && npm run typecheck:stories && bash scripts/check-deps.sh && bash scripts/check-drift.sh && bash scripts/check-docs-drift.sh && bash scripts/lint-scratch.sh && bash scripts/check-story-reuse.sh && bash scripts/check-responsive.sh && node scripts/check-border-color.mjs && node scripts/check-css-vars.mjs && npm run lint:contrast && bash scripts/lint-scratch.sh --components && bash scripts/check-generated-drift.sh && bash scripts/check-agents-mirror.sh && node scripts/check-vrt-baselines.mjs",
@@ -164,6 +165,7 @@
164
165
  "@xyflow/react": "^12.10.1",
165
166
  "cmdk": "^1.1.1",
166
167
  "date-fns": "^4.1.0",
168
+ "esbuild": "^0.27.4",
167
169
  "eslint": "^9.39.1",
168
170
  "eslint-plugin-react-hooks": "^7.0.1",
169
171
  "eslint-plugin-react-refresh": "^0.4.24",
@@ -13,12 +13,12 @@
13
13
  |-----------|--------|----------|---------|
14
14
  | Accordion, AccordionItem, AccordionTrigger, AccordionContent | `@/components/foundations/accordion` | — | Default(単一展開), 複数展開, 商品ページFAQ例, interaction: 単一展開の排他と折りたたみ |
15
15
  | AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogMedia, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger | `@/components/foundations/alert-dialog` | — | Default, 破壊的操作(アカウント削除), コンパクトサイズ |
16
- | Alert, AlertTitle, AlertDescription | `@/components/foundations/alert` | **variant**: `success`, `info`, `error`, `warning`, `inline-info`, `inline-caution`<br>**variant**: `success`, `info`, `error`, `warning`, `inline-info`, `inline-caution`, `inline-warning` | Success(成功), Info(お知らせ), Error(エラー), Warning(注意), Inline Info(インライン情報), Inline Caution(インラインエラー), Inline Warning(インライン警告), Prop-based Warning(旧 Banner 相当), Prop-based Error(エラー), Prop-based Info(お知らせ), Prop-based Success(成功), Prop-based with Action(アクション付き), Prop-based Inline Info(インライン情報), Prop-based Inline Caution(インラインエラー), Prop-based Inline Warning(インライン警告), Info + ボタン, Error(複数メッセージ), 全 Bordered バリアント, 全 Inline バリアント |
16
+ | Alert, AlertTitle, AlertDescription | `@/components/foundations/alert` | **variant**: `success`, `info`, `error`, `warning`, `inline-info`, `inline-caution`, `inline-warning`<br>**variant**: `success`, `info`, `error`, `warning`, `inline-info`, `inline-caution`, `inline-warning` | Success(成功), Info(お知らせ), Error(エラー), Warning(注意), Inline Info(インライン情報), Inline Caution(インラインエラー), Inline Warning(インライン警告), Prop-based Warning(旧 Banner 相当), Prop-based Error(エラー), Prop-based Info(お知らせ), Prop-based Success(成功), Prop-based with Action(アクション付き), Prop-based Inline Info(インライン情報), Prop-based Inline Caution(インラインエラー), Prop-based Inline Warning(インライン警告), Info + ボタン, Error(複数メッセージ), 全 Bordered バリアント, 全 Inline バリアント |
17
17
  | AspectRatio | `@/components/foundations/aspect-ratio` | — | Square, Banner16x9, ProductImage4x3, RatioComparison |
18
18
  | Avatar, AvatarImage, AvatarFallback, AvatarBadge, AvatarGroup, AvatarGroupCount | `@/components/foundations/avatar` | — | Default, フォールバック, サイズ比較, バッジ付き, グループ表示, レビュー表示例 |
19
- | Badge | `@/components/foundations/badge` | **variant**: `default`, `destructive`, `success`, `info-subtle`, `success-subtle`, `accent-subtle`, `caution-subtle`, `warning-subtle`, `muted-subtle`, `secondary`, `outline`, `ghost` | Default(商品ハイライト), Secondary(カテゴリ), Success(成功・完了), Warning(注意), Destructive(エラー), Outline(枠線), WithIcon, 注文ステータス例, 全バリアント一覧 |
19
+ | Badge | `@/components/foundations/badge` | **variant**: `default`, `destructive`, `success`, `info-subtle`, `success-subtle`, `accent-subtle`, `caution-subtle`, `warning-subtle`, `muted-subtle`, `secondary`, `outline`, `ghost`, `link` | Default(商品ハイライト), Secondary(カテゴリ), Success(成功・完了), Warning(注意), Destructive(エラー), Outline(枠線), WithIcon, 注文ステータス例, 全バリアント一覧 |
20
20
  | Breadcrumb, BreadcrumbList, BreadcrumbItem, BreadcrumbLink, BreadcrumbPage, BreadcrumbSeparator, BreadcrumbEllipsis | `@/components/foundations/breadcrumb` | — | Default, 省略表示, 長いパス, 商品ページ例 |
21
- | Button | `@/components/foundations/button` | **variant**: `default`, `secondary`, `tertiary`, `destructive`, `ghost` | Default(CTA), Secondary(副次的), Secondary(追加済み), Tertiary(低優先度), Outline(枠線), Ghost(透明), Destructive(破壊的), Link(リンク), Inverse(暗背景用 primary), Ghost Inverse(暗背景用 secondary), Inverse + Ghost Inverse(dark CTA 帯), Overlay(画像上), サイズ比較, XL(56px / rounded-18px), Hero(56px / pill), Large, FullWidth, Disabled(無効), Loading(処理中), interaction: loading の幅・フォーカス・送信抑止, WithIcon, IconOnly |
21
+ | Button | `@/components/foundations/button` | **variant**: `default`, `secondary`, `tertiary`, `destructive`, `ghost`, `outline`, `link`, `inverse`, `ghost-inverse`, `overlay`<br>**size**: `default`, `xs`, `sm`, `lg`, `xl`, `hero`, `icon`, `icon-xs`, `icon-sm`, `icon-lg`, `icon-xl` | Default(CTA), Secondary(副次的), Secondary(追加済み), Tertiary(低優先度), Outline(枠線), Ghost(透明), Destructive(破壊的), Link(リンク), Inverse(暗背景用 primary), Ghost Inverse(暗背景用 secondary), Inverse + Ghost Inverse(dark CTA 帯), Overlay(画像上), サイズ比較, XL(56px / rounded-18px), Hero(56px / pill), Large, FullWidth, Disabled(無効), Loading(処理中), interaction: loading の幅・フォーカス・送信抑止, WithIcon, IconOnly |
22
22
  | Calendar, CalendarDayButton | `@/components/foundations/calendar` | — | Default, お届け日選択, 日付範囲選択 |
23
23
  | Card, CardHeader, CardFooter, CardTitle, CardAction, CardDescription, CardContent | `@/components/foundations/card` | **surface**: `default`, `primary` | Default, アクション付き, surface=, サーフェス文脈の伝播, 注文サマリー例 |
24
24
  | CheckboxCardGroup, CheckboxCardItem | `@/components/foundations/checkbox-card` | — | Default, 説明付き, 無効状態, 展開コンテンツ付き, ギフトオプション選択例, アレルギー情報例, バッジ付き, エラー状態, interaction: 読み上げ名と説明の分離 |
@@ -28,13 +28,13 @@
28
28
  | Command, CommandDialog, CommandInput, CommandList, CommandEmpty, CommandGroup, CommandItem, CommandShortcut, CommandSeparator | `@/components/foundations/command` | — | Default, ProductSearch, DeliveryOptions |
29
29
  | ConfirmDialogProvider | `@/components/foundations/confirm-dialog` | — | Destructive, Default, Queue, interaction: 確定・キャンセル・Esc とフォーカス復帰, interaction: 待ち行列で 1 件ずつ表示, interaction: 閉じかけに次の確認が来てもフォーカスは呼び出し元へ, interaction: メニュー項目から呼ぶと閉じた後はメニューのトリガーへ |
30
30
  | ContextMenu, ContextMenuTrigger, ContextMenuContent, ContextMenuItem, ContextMenuCheckboxItem, ContextMenuRadioItem, ContextMenuLabel, ContextMenuSeparator, ContextMenuShortcut, ContextMenuGroup, ContextMenuPortal, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuRadioGroup | `@/components/foundations/context-menu` | — | Default, WithCheckboxItems |
31
- | DataTable, DataTableTable, DataTableHeader, DataTableBody, DataTableRow, DataTableHead, DataTableCell, DataTableAvatarCell, DataTableImageCell, DataTableLinkCell, DataTableCheckboxCell, DataTableActionCell, DataTableInputCell, DataTableSelectCell, DataTableNumberCell, DataTableDragHandleCell, DataTableBulkActions, DataTableSectionRow, DataTableAddRow, DataTableEmptyState | `@/components/foundations/data-table` | **state**: `default`, `selected`<br>**width**: `auto`, `max`, `hug`<br>**align**: `left`, `right`, `center` | Default, チェックボックス選択, タイトル固定, セクション, 空状態, 新規追加行, セル型バリエーション, 実用例(注文管理), 入力系セル一覧, ソートヘッダー, D&D並び替え, interaction: チェック欄の操作と選択通知 |
31
+ | DataTable, DataTableTable, DataTableHeader, DataTableBody, DataTableRow, DataTableHead, DataTableCell, DataTableAvatarCell, DataTableImageCell, DataTableLinkCell, DataTableCheckboxCell, DataTableActionCell, DataTableInputCell, DataTableSelectCell, DataTableNumberCell, DataTableDragHandleCell, DataTableBulkActions, DataTableSectionRow, DataTableAddRow, DataTableEmptyState | `@/components/foundations/data-table` | **state**: `default`, `selected`<br>**width**: `auto`, `max`, `hug`<br>**align**: `left`, `right`, `center` | Default, チェックボックス選択, タイトル固定, セクション, 空状態, 新規追加行, セル型バリエーション, 実用例(注文管理), 入力系セル一覧, ソートヘッダー, D&D並び替え, interaction: チェック欄の操作と選択通知, interaction: セル内の操作で行クリックが発火しない |
32
32
  | Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger | `@/components/foundations/dialog` | — | Default, 確認ダイアログ, フォーム入力, サイズ(size), サイズ(SP は画面幅に収まる), interaction: 開閉とフォーカストラップ, NestedSelectKeyboard, NestedDatePickerKeyboard |
33
33
  | Drawer, DrawerPortal, DrawerOverlay, DrawerTrigger, DrawerClose, DrawerContent, DrawerHeader, DrawerFooter, DrawerTitle, DrawerDescription | `@/components/foundations/drawer` | — | Default, カート追加クイックビュー |
34
34
  | DropdownMenu, DropdownMenuPortal, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuGroup, DropdownMenuLabel, DropdownMenuItem, DropdownMenuCheckboxItem, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubTrigger, DropdownMenuSubContent | `@/components/foundations/dropdown-menu` | — | Default, グループ付き, 注文アクション例 |
35
- | Field, FieldLabel, FieldSet, FieldLegend, FieldGroup, FieldDescription, FieldError, FieldSeparator | `@/components/foundations/field` | — | フォーム一式, ラベル付き区切り, Field / FieldLabel(1フィールドの箱) |
35
+ | Field, FieldLabel, FieldSet, FieldLegend, FieldGroup, FieldDescription, FieldError, FieldSeparator | `@/components/foundations/field` | — | フォーム一式, ラベル付き区切り, Field / FieldLabel(1フィールドの箱), 詰めた並び(gap=sm + 小見出し) |
36
36
  | FileInput | `@/components/foundations/file-input` | — | Default, 複数選択 + accept, 無効, maxSize 超過エラー, FormField 連携, interaction: native FormData と controlled value の同期 |
37
- | Form, FormItem, FormLabel, FormControl, FormDescription, FormMessage, FormField | `@/components/foundations/form` | — | RHF register / reset 統合, DeliveryAddressForm, ReviewForm, ContactForm, RHF: register() + 保存済みの初期値, RHF: Controller + 保存済みの初期値 |
37
+ | Form, FormItem, FormLabel, FormControl, FormDescription, FormMessage, FormField | `@/components/foundations/form` | — | RHF register / reset 統合, DeliveryAddressForm, ReviewForm, ContactForm, RHF: register() + 保存済みの初期値, RHF: Controller + 保存済みの初期値, RHF: NumberInput + 保存済みの初期値 |
38
38
  | HoverCard, HoverCardTrigger, HoverCardContent | `@/components/foundations/hover-card` | — | Default, DeliveryInfo, RatingDetail |
39
39
  | IconBadge | `@/components/foundations/icon-badge` | **size**: `md`, `ml`, `lg` | md(44px), ml(48px), lg(72px), サイズ比較, Card 内(間隔=Card の gap-4), リスト見出し(md) |
40
40
  | Input | `@/components/foundations/input` | — | Default, WithLabel, Email, Password, Tel, Search, WithIcon, Disabled, Invalid(エラー), Textarea, フォーム例(配送先), 文字数カウンタ |
@@ -43,7 +43,7 @@
43
43
  | NavigationMenu, NavigationMenuList, NavigationMenuItem, NavigationMenuContent, NavigationMenuTrigger, NavigationMenuLink, NavigationMenuIndicator, NavigationMenuViewport | `@/components/foundations/navigation-menu` | — | Default, WithoutViewport |
44
44
  | Pagination, PaginationContent, PaginationLink, PaginationItem, PaginationPrevious, PaginationNext, PaginationEllipsis | `@/components/foundations/pagination` | — | Default, 省略付き, 表示窓を自動計算, 最初のページ, 商品一覧ページ例 |
45
45
  | Popover, PopoverTrigger, PopoverContent, PopoverAnchor, PopoverHeader, PopoverTitle, PopoverDescription | `@/components/foundations/popover` | — | Default, DeliveryDatePicker, AllergyInfo |
46
- | Progress | `@/components/foundations/progress` | — | Default, 送料無料まで, 送料無料達成 |
46
+ | Progress | `@/components/foundations/progress` | — | Default, 送料無料まで, 送料無料達成, interaction: 値が読み上げに伝わる |
47
47
  | RadioGroup, RadioGroupItem | `@/components/foundations/radio-group` | — | Default, 説明付き, 選択済み, 無効状態, エラーパターン, 補足説明なし, 配送方法選択例, チップ型(choice chip), チップ型(制御・無効), チップ型(エラー), 支払い方法(クレカ入力済), 支払い方法(クレカ未入力) |
48
48
  | ResponsiveDialog, ResponsiveDialogTrigger, ResponsiveDialogContent, ResponsiveDialogHeader, ResponsiveDialogFooter, ResponsiveDialogTitle, ResponsiveDialogDescription, ResponsiveDialogClose | `@/components/foundations/responsive-dialog` | — | 確認ダイアログ, フォーム入力, 幅を広げる(size), お知らせ(閉じるのみ), お届け日選択(選択リスト) |
49
49
  | ScrollArea, ScrollBar | `@/components/foundations/scroll-area` | — | Default, HorizontalTagScroll, OrderHistoryList |
@@ -60,7 +60,7 @@
60
60
  | Table, TableHeader, TableBody, TableFooter, TableHead, TableRow, TableCell, TableCaption | `@/components/foundations/table` | — | Default, フッター付き, 商品比較例, カート注文サマリー |
61
61
  | Tabs, TabsList, TabsTrigger, TabsContent | `@/components/foundations/tabs` | **variant**: `underbar`, `segment`<br>**scrollable**: `true`<br>**size**: `md`, `sm` | Default(Underbar), タブ数バリエーション, 横スクロール(多数タブ), PC モード(文字幅ベース), Segment(ピル型), Segment 3択, 狭幅(サイドバー 266px), 縦向き(orientation=vertical), interaction: 縦向きの並びと上下キー, interaction: クリックと矢印キーでの切り替え |
62
62
  | Textarea | `@/components/foundations/textarea` | — | Default, 無効, メッセージカード入力例, エラーパターン, レビュー投稿例, 文字数カウンタ |
63
- | ToggleGroup, ToggleGroupItem | `@/components/foundations/toggle-group` | **width**: `fit`, `full`<br>**variant**: `default`, `outline`<br>**variant**: `default`, `outline`<br>**size**: `default`, `sm`, `lg` | Default, 複数選択, サイズ, アイコン付き, アイコンのみ, 無効 |
63
+ | ToggleGroup, ToggleGroupItem | `@/components/foundations/toggle-group` | **width**: `fit`, `full`<br>**variant**: `default`, `outline`<br>**size**: `default`, `sm`, `lg` | Default, 複数選択, サイズ, アイコン付き, アイコンのみ, 無効 |
64
64
  | Toggle | `@/components/foundations/toggle` | **variant**: `default`, `outline`<br>**size**: `default`, `sm`, `lg` | Default, TextFormatting, FavoriteToggle, Outline, Sizes |
65
65
  | Tooltip, TooltipTrigger, TooltipContent, TooltipProvider | `@/components/foundations/tooltip` | — | Default, 表示位置, アイコンボタン例 |
66
66
 
@@ -71,7 +71,7 @@
71
71
  | Component | Import | Variants | Stories |
72
72
  |-----------|--------|----------|---------|
73
73
  | AdminHeader | `@/components/primitives/admin-header` | — | — |
74
- | AdminSideNav | `@/components/primitives/admin-side-nav` | — | 下端寄り・多数項目・キーボード操作, interaction: flyout の開閉・フォーカス・viewport 境界 |
74
+ | AdminSideNav | `@/components/primitives/admin-side-nav` | — | 下端寄り・多数項目・キーボード操作, interaction: flyout の開閉・フォーカス・viewport 境界, interaction: ドロワーのリンクを別タブで開くときは閉じない |
75
75
  | BannerCarousel | `@/components/primitives/banner-carousel` | — | Default, SmallBanners, LargeBanners |
76
76
  | BottomTabBar | `@/components/primitives/bottom-tab-bar` | — | Default(ホーム), アクティブ状態, バッジ付き, バッジオーバーフロー(99+), バナー付き, 記念日アクティブ |
77
77
  | BulkActionBar | `@/components/primitives/bulk-action-bar` | — | — |
@@ -80,11 +80,11 @@
80
80
  | ChatComposer | `@/components/primitives/chat-composer` | — | 基本, 添付あり, ⌘Enter 送信, 送信中, 無効化, 文字数カウンタ |
81
81
  | Chip | `@/components/primitives/chip` | **variant**: `filled`, `accent`, `selected`<br>**size**: `sm`, `md`, `lg`, `tile`<br>**shape**: `pill`, `square` | Default, 人気キーワード, 全バリアント, States(hover / disabled), サイズ比較, サイズタイル(狭い横並び), フィルター選択, 削除可能(選択済みフィルター), 検索画面での使用例 |
82
82
  | CoachMark | `@/components/primitives/coach-mark` | — | オンボーディング, 全方向, オンボーディング各方向 |
83
- | Combobox | `@/components/primitives/combobox` | — | Default |
83
+ | Combobox | `@/components/primitives/combobox` | — | Default, interaction: 表記ゆれの絞り込みと読み上げ名, interaction: 連続した部分一致・元の並びのまま, 一覧を開いた状態(a11y 検査) |
84
84
  | Container | `@/components/primitives/container` | — | Default(page / default gutter), サイズ比較, gutter 比較 |
85
85
  | ContentCard, ContentList | `@/components/primitives/content-card` | — | 縦(グリッド一覧), 一覧での高さ揃え, 横(画像が左), リスト(Medium 型), 長いタグラベル |
86
86
  | ContentCarousel | `@/components/primitives/content-carousel` | — | ヒーローバナー, 自動再生(5秒), peek表示, peek表示(Container の中), 多列カード(PC 3枚), 1枚のみ |
87
- | DatePicker, DateTimePicker | `@/components/primitives/date-picker` | — | 日付ピッカー, 初期値あり, 選択範囲を制限, 特定日を無効化, FormField 連携, 無効化, クリア可能(任意項目), interaction: クリア後のフォーカス, interaction: FormField のエラーと接続 |
87
+ | DatePicker, DateTimePicker | `@/components/primitives/date-picker` | — | 日付ピッカー, 初期値あり, 選択範囲を制限, 特定日を無効化, FormField 連携, 無効化, クリア可能(任意項目), interaction: クリア後のフォーカス, interaction: 選択中の日の月を開く, interaction: 選択中の日の再押下で値が消えない, interaction: FormField のエラーと接続 |
88
88
  | EmptyState | `@/components/primitives/empty-state` | — | お気に入り商品(空), カート(空), ブックマーク(空), 検索結果なし, 汎用(説明のみ) |
89
89
  | ErrorState, NotFoundIllustration | `@/components/primitives/error-state` | — | ネットワークエラー, サーバーエラー, ページが見つからない, タイムアウト, 404(notFound variant), 404(文言上書き), イラスト単体 |
90
90
  | FilterBar | `@/components/primitives/filter-bar` | — | SP, SP(選択済み), PC, 地域フィルター, もっと絞り込む |
@@ -99,7 +99,7 @@
99
99
  | KebabMenu | `@/components/primitives/kebab-menu` | — | — |
100
100
  | ListItem | `@/components/primitives/list-item` | — | デフォルト(矢印), キャプション付き, アイコン付き, テキスト値, バッジ付き, トグル, 矢印なし, 選択状態, メニューリスト(複数行), アイコン付きメニュー, インタラクティブ(hover / focus) |
101
101
  | MenuDrawer | `@/components/primitives/menu-drawer` | — | デフォルト(最小構成), ログイン済 (ユーザー名表示), 未ログイン (ログインボタン表示), サムネイル付きカテゴリ, バナー付き, 全部入り (大規模アプリ向け), ログインリンク非表示 |
102
- | MultiSelect | `@/components/primitives/multi-select` | — | Default, interaction: Chip 削除後のフォーカス |
102
+ | MultiSelect | `@/components/primitives/multi-select` | — | Default, interaction: Chip 削除後のフォーカス, 一覧を開いた状態(a11y 検査) |
103
103
  | NotificationBadge | `@/components/primitives/notification-badge` | **color**: `red`, `green`<br>**size**: `sm`, `md` | Default, ドットバッジ, 数値バッジ, カラーバリエーション, ヘッダーでの使用例, 非表示状態 |
104
104
  | NotificationList | `@/components/primitives/notification-list` | — | デフォルト, 横並び(管理画面向け), 空の状態 |
105
105
  | NumberInput, QuantitySelector | `@/components/primitives/number-input` | — | Default, コンパクト型(sm), サイズ比較, 最小・最大値, 無効状態, エラー状態, ゴミ箱アイコン, ゴミ箱+削除確認ダイアログ, 直接入力パターン, 商品詳細での使用例, カート内での使用例, 価格・在庫入力(管理画面), interaction: 増減と min/max のクランプ, interaction: 上限・下限でもフォーカスを保つ, interaction: error の aria-invalid, interaction: FormField と接続 |
@@ -28,6 +28,10 @@
28
28
  * 以下の「Typography Helper」セクションで提供する。
29
29
  * ============================================ */
30
30
 
31
+ /* レイヤーの順序を固定する(base < components。どちらも consumer の非レイヤー CSS より弱い)。
32
+ 他の @layer ブロックより前に置く。 */
33
+ @layer base, components;
34
+
31
35
  /* --- Layer 1: Primitive Colors ---
32
36
  *
33
37
  * 正本 src/styles/primitive.css のメインカラーファミリー(Orange/Gray/Forest/
@@ -116,6 +120,7 @@
116
120
  --Primitive-Sea-900: #0017B6FF;
117
121
 
118
122
  /* Wood */
123
+ --Primitive-Wood-25: #FCF9F2FF;
119
124
  --Primitive-Wood-50: #F8F1E0FF;
120
125
  --Primitive-Wood-100: #EFDBB1FF;
121
126
  --Primitive-Wood-200: #E5C47FFF;
@@ -178,7 +183,7 @@
178
183
  * (および tokens.json 未収録グループは primitive 実値)まで解決し、
179
184
  * 素の `:root` / `.dark` として展開したもの。
180
185
  *
181
- * 展開対象(全 76 semantic トークン名): Surface-* / Text-* / Object-* / Hover-* /
186
+ * 展開対象(全 80 semantic トークン名): Surface-* / Text-* / Object-* / Hover-* /
182
187
  * Active-* / Border-* / Brand-* / Overlay-* / Surface-Glass-* / Caution-* /
183
188
  * Focus-High-Emphasis / Third-Party-*。一覧・hex 整合は
184
189
  * __tests__/preset-standalone-coverage.test.ts でガードしている。
@@ -189,14 +194,17 @@
189
194
  */
190
195
  :root {
191
196
  --Surface-Primary: #FFFFFF;
192
- --Surface-Secondary: #FBF9F8;
193
- --Surface-Tertiary: #F4F2F1;
197
+ --Surface-Secondary: #FCF9F2;
198
+ --Surface-Tertiary: #FCF9F2;
199
+ --Surface-Neutral-Secondary: #FBF9F8;
200
+ --Surface-Neutral-Tertiary: #F4F2F1;
194
201
  --Surface-Elevated: #FFFFFF;
195
202
  --Surface-Caution: #EC0000;
196
203
  --Surface-Caution-Light: #FFE7E6;
197
204
  --Surface-Accent-Primary: #E5175C;
198
205
  --Surface-Accent-Primary-Light: #FBD4E0;
199
- --Surface-Success: #259D63;
206
+ --Surface-Success: #317860;
207
+ --Surface-Success-Light: #F0FCF8;
200
208
  --Surface-Warning: #F8F1E0;
201
209
  --Surface-Info: #003EE5;
202
210
  --Surface-Info-Light: #E8F1FE;
@@ -207,7 +215,7 @@
207
215
  --Text-Accent-Primary: #B5175C;
208
216
  --Text-Accent-Secondary: #F491B2;
209
217
  --Text-on-Inverse: #FFFFFF;
210
- --Text-Success: #259D63;
218
+ --Text-Success: #317860;
211
219
  --Text-Caution: #EC0000;
212
220
  --Text-Warning: #C16800;
213
221
  --Text-Info: #003EE5;
@@ -221,7 +229,7 @@
221
229
  --Object-High-Emphasis-on-Inverse: #FFFFFF;
222
230
  --Object-Caution: #EC0000;
223
231
  --Object-Warning: #C16800;
224
- --Object-Success: #259D63;
232
+ --Object-Success: #3E987A;
225
233
  --Object-Info: #003EE5;
226
234
  --Hover-Primary-Button: #B5175C;
227
235
  --Hover-Secondary-Button: #F7B1C8;
@@ -239,6 +247,7 @@
239
247
  --Border-Accent-Primary: #E5175C;
240
248
  --Border-Favorite: #E5175C;
241
249
  --Border-Caution: #EC0000;
250
+ --Border-Success: #ACEED8;
242
251
  --Border-Info: #003EE5;
243
252
  --Brand-Cake-Orange: #E5175C;
244
253
  --Brand-Cake-Orange-Light: #F7B1C8;
@@ -274,12 +283,15 @@
274
283
  --Surface-Primary: #000000E5;
275
284
  --Surface-Secondary: #FFFFFF1A;
276
285
  --Surface-Tertiary: #FFFFFF33;
286
+ --Surface-Neutral-Secondary: #FFFFFF1A;
287
+ --Surface-Neutral-Tertiary: #FFFFFF33;
277
288
  --Surface-Elevated: #3A3736;
278
289
  --Surface-Caution: #EC0000;
279
290
  --Surface-Caution-Light: #FFE7E6;
280
291
  --Surface-Accent-Primary: #E5175C;
281
292
  --Surface-Accent-Primary-Light: #E5175C26;
282
293
  --Surface-Success: #259D63;
294
+ --Surface-Success-Light: #E6F5EC;
283
295
  --Surface-Warning: #F8F1E0;
284
296
  --Surface-Info: #003EE5;
285
297
  --Surface-Info-Light: #E8F1FE;
@@ -322,6 +334,7 @@
322
334
  --Border-Accent-Primary: #EA296A;
323
335
  --Border-Favorite: #EA296A;
324
336
  --Border-Caution: #EC0000;
337
+ --Border-Success: #9BD4B5;
325
338
  --Border-Info: #4979F5;
326
339
  --Brand-Cake-Orange: #E5175C;
327
340
  --Brand-Cake-Orange-Light: #F7B1C8;
@@ -406,11 +419,11 @@
406
419
  --popover-foreground: var(--Text-High-Emphasis);
407
420
  --primary: var(--Brand-Cake-Orange);
408
421
  --primary-foreground: var(--Text-on-Inverse);
409
- --secondary: var(--Surface-Secondary);
422
+ --secondary: var(--Surface-Neutral-Secondary);
410
423
  --secondary-foreground: var(--Text-Medium-Emphasis);
411
- --muted: var(--Surface-Tertiary);
424
+ --muted: var(--Surface-Neutral-Tertiary);
412
425
  --muted-foreground: var(--Text-Low-Emphasis);
413
- --accent: var(--Surface-Secondary);
426
+ --accent: var(--Surface-Neutral-Secondary);
414
427
  --accent-foreground: var(--Text-High-Emphasis);
415
428
  --destructive: var(--Object-Caution);
416
429
  --border: var(--Border-Medium-Emphasis);
@@ -427,11 +440,11 @@
427
440
  --popover-foreground: var(--Text-High-Emphasis);
428
441
  --primary: var(--Brand-Cake-Orange);
429
442
  --primary-foreground: var(--Text-on-Inverse);
430
- --secondary: var(--Surface-Tertiary);
443
+ --secondary: var(--Surface-Neutral-Tertiary);
431
444
  --secondary-foreground: var(--Text-Medium-Emphasis);
432
- --muted: var(--Surface-Tertiary);
445
+ --muted: var(--Surface-Neutral-Tertiary);
433
446
  --muted-foreground: var(--Text-Low-Emphasis);
434
- --accent: var(--Surface-Secondary);
447
+ --accent: var(--Surface-Neutral-Secondary);
435
448
  --accent-foreground: var(--Text-High-Emphasis);
436
449
  --destructive: var(--Object-Caution);
437
450
  --border: var(--Border-Medium-Emphasis);
@@ -484,6 +497,16 @@
484
497
  --Z-SkipLink: 50;
485
498
  }
486
499
 
500
+ /* --- Scrollbar hide ---
501
+ * src/preset.css の `@utility scrollbar-hide` と同等(Tailwind 非使用 consumer 向け)。 */
502
+ .scrollbar-hide {
503
+ -ms-overflow-style: none;
504
+ scrollbar-width: none;
505
+ }
506
+ .scrollbar-hide::-webkit-scrollbar {
507
+ display: none;
508
+ }
509
+
487
510
  /* --- Typography Helper Classes ---
488
511
  * Tailwindのtypo-*と同等のCSSクラス。
489
512
  * 本番CSSでこれらのクラスを使えば、DSと同じタイポグラフィが適用される。
@@ -512,18 +535,21 @@
512
535
  .typo-label-xs { font-size: 10px; line-height: 1.5; font-weight: 500; }
513
536
 
514
537
  /* --- Touch target utility ---
515
- * Tailwind を使わない consumer でも preset と同じ44px操作領域を利用できる。 */
516
- .tap-target {
517
- position: relative;
518
- }
519
- .tap-target::after {
520
- content: "";
521
- position: absolute;
522
- top: 50%;
523
- left: 50%;
524
- width: max(100%, 2.75rem);
525
- height: max(100%, 2.75rem);
526
- transform: translate(-50%, -50%);
538
+ * Tailwind を使わない consumer でも preset と同じ44px操作領域を利用できる。
539
+ * @layer components に入れているのは、consumer の className(utilities の `absolute` など)や非レイヤー CSS が常に勝つようにするため。 */
540
+ @layer components {
541
+ .tap-target {
542
+ position: relative;
543
+ }
544
+ .tap-target::after {
545
+ content: "";
546
+ position: absolute;
547
+ top: 50%;
548
+ left: 50%;
549
+ width: max(100%, 2.75rem);
550
+ height: max(100%, 2.75rem);
551
+ transform: translate(-50%, -50%);
552
+ }
527
553
  }
528
554
 
529
555
  /* --- Base layer(ルート地色 / #208) ---
package/src/preset.css CHANGED
@@ -249,11 +249,11 @@
249
249
  --popover-foreground: var(--Text-High-Emphasis);
250
250
  --primary: var(--Brand-Cake-Orange);
251
251
  --primary-foreground: var(--Text-on-Inverse);
252
- --secondary: var(--Surface-Secondary);
252
+ --secondary: var(--Surface-Neutral-Secondary);
253
253
  --secondary-foreground: var(--Text-Medium-Emphasis);
254
- --muted: var(--Surface-Tertiary);
254
+ --muted: var(--Surface-Neutral-Tertiary);
255
255
  --muted-foreground: var(--Text-Low-Emphasis);
256
- --accent: var(--Surface-Secondary);
256
+ --accent: var(--Surface-Neutral-Secondary);
257
257
  --accent-foreground: var(--Text-High-Emphasis);
258
258
  --destructive: var(--Object-Caution);
259
259
  --border: var(--Border-Medium-Emphasis);
@@ -285,11 +285,11 @@
285
285
  --popover-foreground: var(--Text-High-Emphasis);
286
286
  --primary: var(--Brand-Cake-Orange);
287
287
  --primary-foreground: var(--Text-on-Inverse);
288
- --secondary: var(--Surface-Tertiary);
288
+ --secondary: var(--Surface-Neutral-Tertiary);
289
289
  --secondary-foreground: var(--Text-Medium-Emphasis);
290
- --muted: var(--Surface-Tertiary);
290
+ --muted: var(--Surface-Neutral-Tertiary);
291
291
  --muted-foreground: var(--Text-Low-Emphasis);
292
- --accent: var(--Surface-Secondary);
292
+ --accent: var(--Surface-Neutral-Secondary);
293
293
  --accent-foreground: var(--Text-High-Emphasis);
294
294
  --destructive: var(--Object-Caution);
295
295
  --border: var(--Border-Medium-Emphasis);
@@ -372,20 +372,38 @@
372
372
  animation: slide-in-left var(--Motion-Duration-Base, 200ms) var(--Motion-Easing-Standard, cubic-bezier(0, 0, 0.58, 1));
373
373
  }
374
374
 
375
+ /* --- Scrollbar hide utility ---
376
+ * 横スクロール部品(カルーセル・タブ列・カテゴリ列など)がスクロールバーを隠すために使う。
377
+ * Tailwind v4 本体に `scrollbar-hide` は無い。`scrollbar-none` も、この DS が使う tailwindcss 4.2.1 では
378
+ * クラスを書いても CSS が生成されなかった(実測: compile の build(["scrollbar-none"]) の出力が空)。
379
+ * 加えて Safari 18.2 未満では `scrollbar-width` が効かないため、DS が 1 本に定義する。
380
+ * Firefox / 標準 = scrollbar-width、旧 Edge = -ms-overflow-style、WebKit = ::-webkit-scrollbar。
381
+ * Tailwind を通さない経路(preset-standalone.css)にも同名の素の CSS を置いている。 */
382
+ @utility scrollbar-hide {
383
+ -ms-overflow-style: none;
384
+ scrollbar-width: none;
385
+ &::-webkit-scrollbar {
386
+ display: none;
387
+ }
388
+ }
389
+
375
390
  /* --- Touch target utility ---
376
391
  * 見た目が44px未満の小型操作部品に付け、透明な疑似要素で実効操作領域だけを拡張する。
377
- * 隣接ターゲットと重なる密度では使わず、親レイアウト側の gap も確保する。 */
378
- .tap-target {
379
- position: relative;
380
- }
381
- .tap-target::after {
382
- content: "";
383
- position: absolute;
384
- top: 50%;
385
- left: 50%;
386
- width: max(100%, 2.75rem);
387
- height: max(100%, 2.75rem);
388
- transform: translate(-50%, -50%);
392
+ * 隣接ターゲットと重なる密度では使わず、親レイアウト側の gap も確保する。
393
+ * @layer components に入れているのは、consumer の className(utilities の `absolute` など)や非レイヤー CSS が常に勝つようにするため。 */
394
+ @layer components {
395
+ .tap-target {
396
+ position: relative;
397
+ }
398
+ .tap-target::after {
399
+ content: "";
400
+ position: absolute;
401
+ top: 50%;
402
+ left: 50%;
403
+ width: max(100%, 2.75rem);
404
+ height: max(100%, 2.75rem);
405
+ transform: translate(-50%, -50%);
406
+ }
389
407
  }
390
408
 
391
409
  /* --- Base layer --- */
@@ -78,6 +78,7 @@
78
78
  --Primitive-Sea-900: #0017B6FF;
79
79
 
80
80
  /* Wood */
81
+ --Primitive-Wood-25: #FCF9F2FF;
81
82
  --Primitive-Wood-50: #F8F1E0FF;
82
83
  --Primitive-Wood-100: #EFDBB1FF;
83
84
  --Primitive-Wood-200: #E5C47FFF;
@@ -14,8 +14,16 @@
14
14
 
15
15
  /* Surface */
16
16
  --Surface-Primary: var(--Primitive-White-alpha-1000);
17
- --Surface-Secondary: var(--Primitive-Gray-50);
18
- --Surface-Tertiary: var(--Primitive-Gray-100);
17
+ /* 情報をまとめる押せない面(説明ボックス・フォームのまとまり・Section subtle・Card 既定・表の見出し行など)。
18
+ light はケーキ配色の「スポンジ」= Wood-25 のベージュ。押せる部品・状態の地・画面全体の地には使わず、
19
+ 下の Surface-Neutral-* を使う。dark は従来どおり半透明白(値は変えていない)。 */
20
+ --Surface-Secondary: var(--Primitive-Wood-25);
21
+ --Surface-Tertiary: var(--Primitive-Wood-25);
22
+ /* グレーを保つ地。押せる部品(Button tertiary・Chip・Tag/Badge 等のラベル)、hover / active / selected / disabled の地、
23
+ 溝・トラック、スケルトン・画像の仮の地、画面全体の地(AdminShell 等の min-h-screen)に使う。
24
+ light は旧 Surface-Secondary / Tertiary と同値、dark は Surface-Secondary / Tertiary と同値。 */
25
+ --Surface-Neutral-Secondary: var(--Primitive-Gray-50);
26
+ --Surface-Neutral-Tertiary: var(--Primitive-Gray-100);
19
27
  /* 浮遊レイヤー(メニュー・ポップオーバー・ダイアログ・シート)と、
20
28
  スクロール内容の上に重なるエッジ固定バー(Header / StickyActionBar /
21
29
  BottomTabBar / AdminHeader / AdminSideNav / OrderSummary fixed)の地。
@@ -26,7 +34,10 @@
26
34
  --Surface-Caution-Light: var(--Primitive-Sun-50);
27
35
  --Surface-Accent-Primary: var(--Primitive-Berry-700);
28
36
  --Surface-Accent-Primary-Light: var(--Primitive-Berry-50);
29
- --Surface-Success: var(--Primitive-Forest-600);
37
+ /* 成功・良い状態(ケーキ配色の「ミント」)。塗り(白い文字を載せる)は Teal-800、淡い地は Surface-Success-Light。
38
+ 押すもの(CTA)には使わない。dark は従来の Forest のまま。 */
39
+ --Surface-Success: var(--Primitive-Teal-800);
40
+ --Surface-Success-Light: var(--Primitive-Teal-50);
30
41
  --Surface-Warning: var(--Primitive-Wood-50);
31
42
  --Surface-Info: var(--Primitive-Sea-600);
32
43
  --Surface-Info-Light: var(--Primitive-Sea-50);
@@ -39,7 +50,7 @@
39
50
  --Text-Accent-Primary: var(--Primitive-Berry-800);
40
51
  --Text-Accent-Secondary: var(--Primitive-Berry-200);
41
52
  --Text-on-Inverse: var(--Primitive-White-alpha-1000);
42
- --Text-Success: var(--Primitive-Forest-600);
53
+ --Text-Success: var(--Primitive-Teal-800);
43
54
  --Text-Caution: var(--Primitive-Sun-800);
44
55
  --Text-Warning: var(--Primitive-Wood-800);
45
56
  --Text-Info: var(--Primitive-Sea-600);
@@ -55,7 +66,7 @@
55
66
  --Object-High-Emphasis-on-Inverse: var(--Primitive-White-alpha-1000);
56
67
  --Object-Caution: var(--Primitive-Sun-800);
57
68
  --Object-Warning: var(--Primitive-Wood-800);
58
- --Object-Success: var(--Primitive-Forest-600);
69
+ --Object-Success: var(--Primitive-Teal-700);
59
70
  --Object-Info: var(--Primitive-Sea-600);
60
71
 
61
72
  /* Hover / Active */
@@ -77,6 +88,7 @@
77
88
  --Border-Accent-Primary: var(--Brand-Cake-Orange);
78
89
  --Border-Favorite: var(--Brand-Cake-Orange);
79
90
  --Border-Caution: var(--Surface-Caution);
91
+ --Border-Success: var(--Primitive-Teal-200);
80
92
  --Border-Info: var(--Primitive-Sea-600);
81
93
 
82
94
  /* Brand
@@ -137,6 +149,8 @@
137
149
  --Surface-Primary: var(--Primitive-Gray-alpha-900);
138
150
  --Surface-Secondary: var(--Primitive-White-alpha-100);
139
151
  --Surface-Tertiary: var(--Primitive-White-alpha-200);
152
+ --Surface-Neutral-Secondary: var(--Primitive-White-alpha-100);
153
+ --Surface-Neutral-Tertiary: var(--Primitive-White-alpha-200);
140
154
  /* dark の Surface-Primary は #000000E5 でアルファ付き。ページ地としては
141
155
  下地に合成される前提なので妥当だが、浮遊レイヤーに使うと後ろが透ける。
142
156
  一段明るい不透明色を elevation として持つ(issue #262)。 */
@@ -146,6 +160,7 @@
146
160
  --Surface-Accent-Primary: var(--Primitive-Berry-700);
147
161
  --Surface-Accent-Primary-Light: #E5175C26; /* Brand(Berry) at ~15% alpha — ダーク背景で濁らないよう調整 */
148
162
  --Surface-Success: var(--Primitive-Forest-600);
163
+ --Surface-Success-Light: var(--Primitive-Forest-50);
149
164
  --Surface-Warning: var(--Primitive-Wood-50);
150
165
  --Surface-Info: var(--Primitive-Sea-600);
151
166
  --Surface-Info-Light: var(--Primitive-Sea-50);
@@ -196,6 +211,7 @@
196
211
  --Border-Accent-Primary: var(--Primitive-Berry-600);
197
212
  --Border-Favorite: var(--Primitive-Berry-600);
198
213
  --Border-Caution: var(--Surface-Caution);
214
+ --Border-Success: var(--Primitive-Forest-200);
199
215
  --Border-Info: var(--Primitive-Sea-400);
200
216
 
201
217
  /* Brand(ダークでも同じ) */