@cakejp/design-system 0.15.0 → 0.17.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 (186) hide show
  1. package/CHANGELOG.md +63 -0
  2. package/CLAUDE.md +1 -0
  3. package/bin/init.js +29 -6
  4. package/contracts/components.json +45 -8
  5. package/contracts/composition.json +8 -2
  6. package/contracts/rules.json +14 -2
  7. package/contracts/screen-patterns.json +1 -1
  8. package/dist/components/ec/_mypage-menu-data.js +166 -0
  9. package/dist/components/ec/admin-shell.js +202 -0
  10. package/dist/components/ec/anniversary-card.js +63 -0
  11. package/dist/components/ec/cake-logo.js +38 -0
  12. package/dist/components/ec/chart-controls.js +91 -0
  13. package/dist/components/ec/countdown-timer.js +50 -0
  14. package/dist/components/ec/coupon-card.js +136 -0
  15. package/dist/components/ec/delivery-calendar.js +105 -0
  16. package/dist/components/ec/mypage-shell.js +98 -0
  17. package/dist/components/ec/order-section.js +53 -0
  18. package/dist/components/ec/order-summary.js +78 -0
  19. package/dist/components/ec/payment-method.js +81 -0
  20. package/dist/components/ec/product-card.js +235 -0
  21. package/dist/components/ec/product-carousel.js +106 -0
  22. package/dist/components/ec/product-cta.js +80 -0
  23. package/dist/components/ec/product-detail-bar.js +86 -0
  24. package/dist/components/ec/product-detail-sidebar.js +296 -0
  25. package/dist/components/ec/product-list-item.js +266 -0
  26. package/dist/components/ec/product-option.js +165 -0
  27. package/dist/components/ec/rating-stars.js +74 -0
  28. package/dist/components/ec/review-card.js +126 -0
  29. package/dist/components/ec/review-form.js +181 -0
  30. package/dist/components/ec/review-summary.js +95 -0
  31. package/dist/components/ec/shop-card.js +179 -0
  32. package/dist/components/ec/stat-card.js +50 -0
  33. package/dist/components/foundations/accordion.js +67 -0
  34. package/dist/components/foundations/alert-dialog.js +165 -0
  35. package/dist/components/foundations/alert.js +218 -0
  36. package/dist/components/foundations/aspect-ratio.js +10 -0
  37. package/dist/components/foundations/avatar.js +58 -0
  38. package/dist/components/foundations/badge.js +54 -0
  39. package/dist/components/foundations/breadcrumb.js +104 -0
  40. package/dist/components/foundations/button.js +99 -0
  41. package/dist/components/foundations/calendar.js +173 -0
  42. package/dist/components/foundations/card.js +109 -0
  43. package/dist/components/foundations/checkbox-card.js +111 -0
  44. package/dist/components/foundations/checkbox-group.js +92 -0
  45. package/dist/components/foundations/checkbox.js +90 -0
  46. package/dist/components/foundations/chip-variants.js +41 -0
  47. package/dist/components/foundations/collapsible.js +34 -0
  48. package/dist/components/foundations/command.js +171 -0
  49. package/dist/components/foundations/context-menu.js +225 -0
  50. package/dist/components/foundations/data-table.js +59 -0
  51. package/dist/components/foundations/dialog.js +148 -0
  52. package/dist/components/foundations/drawer.js +129 -0
  53. package/dist/components/foundations/dropdown-menu.js +232 -0
  54. package/dist/components/foundations/field.js +150 -0
  55. package/dist/components/foundations/file-input.js +116 -0
  56. package/dist/components/foundations/form.js +101 -0
  57. package/dist/components/foundations/hover-card.js +41 -0
  58. package/dist/components/foundations/icon-badge.js +41 -0
  59. package/dist/components/foundations/input.js +74 -0
  60. package/dist/components/foundations/label.js +29 -0
  61. package/dist/components/foundations/menubar.js +252 -0
  62. package/dist/components/foundations/navigation-menu.js +171 -0
  63. package/dist/components/foundations/pagination.js +120 -0
  64. package/dist/components/foundations/popover.js +45 -0
  65. package/dist/components/foundations/progress.js +34 -0
  66. package/dist/components/foundations/radio-group.js +134 -0
  67. package/dist/components/foundations/responsive-dialog.js +76 -0
  68. package/dist/components/foundations/scroll-area.js +62 -0
  69. package/dist/components/foundations/select.js +190 -0
  70. package/dist/components/foundations/separator.js +27 -0
  71. package/dist/components/foundations/sheet.js +130 -0
  72. package/dist/components/foundations/skeleton.js +15 -0
  73. package/dist/components/foundations/skip-link.js +27 -0
  74. package/dist/components/foundations/slider.js +81 -0
  75. package/dist/components/foundations/social-icon.js +36 -0
  76. package/dist/components/foundations/sonner.js +49 -0
  77. package/dist/components/foundations/spinner.js +28 -0
  78. package/dist/components/foundations/switch.js +54 -0
  79. package/dist/components/foundations/table.js +115 -0
  80. package/dist/components/foundations/tabs.js +102 -0
  81. package/dist/components/foundations/textarea.js +65 -0
  82. package/dist/components/foundations/toggle-group.js +107 -0
  83. package/dist/components/foundations/toggle.js +44 -0
  84. package/dist/components/foundations/tooltip.js +56 -0
  85. package/dist/components/primitives/admin-header.js +31 -0
  86. package/dist/components/primitives/admin-side-nav.js +135 -0
  87. package/dist/components/primitives/banner-carousel.js +97 -0
  88. package/dist/components/primitives/bottom-tab-bar.js +81 -0
  89. package/dist/components/primitives/bulk-action-bar.js +27 -0
  90. package/dist/components/primitives/category-scroll.js +110 -0
  91. package/dist/components/primitives/category-shortcuts.js +66 -0
  92. package/dist/components/primitives/chat-composer.js +141 -0
  93. package/dist/components/primitives/chip.js +123 -0
  94. package/dist/components/primitives/coach-mark.js +102 -0
  95. package/dist/components/primitives/combobox.js +88 -0
  96. package/dist/components/primitives/container.js +50 -0
  97. package/dist/components/primitives/content-carousel.js +144 -0
  98. package/dist/components/primitives/date-picker.js +175 -0
  99. package/dist/components/primitives/empty-state.js +32 -0
  100. package/dist/components/primitives/error-state.js +115 -0
  101. package/dist/components/primitives/filter-bar.js +144 -0
  102. package/dist/components/primitives/footer.js +247 -0
  103. package/dist/components/primitives/form-field.js +38 -0
  104. package/dist/components/primitives/funnel-shell.js +99 -0
  105. package/dist/components/primitives/header.js +257 -0
  106. package/dist/components/primitives/image-carousel.js +156 -0
  107. package/dist/components/primitives/image-gallery.js +177 -0
  108. package/dist/components/primitives/image-input.js +207 -0
  109. package/dist/components/primitives/image-uploader.js +69 -0
  110. package/dist/components/primitives/kebab-menu.js +40 -0
  111. package/dist/components/primitives/list-item.js +80 -0
  112. package/dist/components/primitives/menu-drawer.js +154 -0
  113. package/dist/components/primitives/multi-select.js +93 -0
  114. package/dist/components/primitives/notification-badge.js +61 -0
  115. package/dist/components/primitives/notification-list.js +72 -0
  116. package/dist/components/primitives/number-input.js +235 -0
  117. package/dist/components/primitives/price-display.js +101 -0
  118. package/dist/components/primitives/progress-steps.js +62 -0
  119. package/dist/components/primitives/search-bar.js +81 -0
  120. package/dist/components/primitives/search-panel.js +43 -0
  121. package/dist/components/primitives/section-header.js +148 -0
  122. package/dist/components/primitives/section-nav.js +85 -0
  123. package/dist/components/primitives/section.js +78 -0
  124. package/dist/components/primitives/share-buttons.js +102 -0
  125. package/dist/components/primitives/side-nav.js +98 -0
  126. package/dist/components/primitives/social-login-button.js +53 -0
  127. package/dist/components/primitives/standard-page-shell.js +34 -0
  128. package/dist/components/primitives/status-count-tabs.js +42 -0
  129. package/dist/components/primitives/sticky-action-bar.js +26 -0
  130. package/dist/components/primitives/sub-nav.js +67 -0
  131. package/dist/components/primitives/tag.js +57 -0
  132. package/dist/components/primitives/timeline.js +55 -0
  133. package/dist/components/primitives/workspace-shell.js +57 -0
  134. package/dist/index.css +1 -1
  135. package/dist/index.js +22961 -13082
  136. package/dist/lib/field-labelling.js +29 -0
  137. package/dist/lib/focus-ring.js +6 -0
  138. package/dist/lib/pagination-range.js +42 -0
  139. package/dist/lib/use-value-length.js +63 -0
  140. package/dist/lib/utils.js +33 -0
  141. package/dist/types/components/ec/_mypage-menu-data.d.ts +3 -3
  142. package/dist/types/components/ec/admin-shell.d.ts +1 -1
  143. package/dist/types/components/ec/anniversary-card.d.ts +1 -1
  144. package/dist/types/components/ec/mypage-shell.d.ts +3 -3
  145. package/dist/types/components/ec/product-card.d.ts +1 -1
  146. package/dist/types/components/ec/product-carousel.d.ts +3 -3
  147. package/dist/types/components/ec/stat-card.d.ts +1 -1
  148. package/dist/types/components/foundations/accordion.d.ts +8 -1
  149. package/dist/types/components/foundations/alert-dialog.d.ts +1 -1
  150. package/dist/types/components/foundations/calendar.d.ts +1 -1
  151. package/dist/types/components/foundations/checkbox-group.d.ts +1 -1
  152. package/dist/types/components/foundations/command.d.ts +1 -1
  153. package/dist/types/components/foundations/data-table.d.ts +6 -1
  154. package/dist/types/components/foundations/field.d.ts +2 -2
  155. package/dist/types/components/foundations/file-input.d.ts +1 -1
  156. package/dist/types/components/foundations/pagination.d.ts +1 -1
  157. package/dist/types/components/foundations/responsive-dialog.d.ts +1 -1
  158. package/dist/types/components/foundations/skip-link.d.ts +1 -1
  159. package/dist/types/components/foundations/slider.d.ts +13 -1
  160. package/dist/types/components/primitives/admin-header.d.ts +11 -1
  161. package/dist/types/components/primitives/admin-side-nav.d.ts +19 -1
  162. package/dist/types/components/primitives/banner-carousel.d.ts +2 -2
  163. package/dist/types/components/primitives/category-scroll.d.ts +2 -2
  164. package/dist/types/components/primitives/category-shortcuts.d.ts +1 -1
  165. package/dist/types/components/primitives/chat-composer.d.ts +1 -1
  166. package/dist/types/components/primitives/chip.d.ts +1 -1
  167. package/dist/types/components/primitives/combobox.d.ts +9 -1
  168. package/dist/types/components/primitives/content-carousel.d.ts +1 -1
  169. package/dist/types/components/primitives/form-field.d.ts +1 -1
  170. package/dist/types/components/primitives/image-input.d.ts +1 -1
  171. package/dist/types/components/primitives/kebab-menu.d.ts +1 -1
  172. package/dist/types/components/primitives/menu-drawer.d.ts +0 -16
  173. package/dist/types/components/primitives/multi-select.d.ts +9 -1
  174. package/dist/types/components/primitives/notification-list.d.ts +1 -1
  175. package/dist/types/components/primitives/search-panel.d.ts +1 -1
  176. package/dist/types/components/primitives/section-nav.d.ts +1 -1
  177. package/dist/types/components/primitives/side-nav.d.ts +1 -1
  178. package/dist/types/components/primitives/social-login-button.d.ts +1 -1
  179. package/dist/types/index.d.ts +1 -0
  180. package/dist/types/lib/field-labelling.d.ts +66 -0
  181. package/dist/types/lib/focus-ring.d.ts +42 -0
  182. package/package.json +2 -2
  183. package/scripts/codemod/README.md +9 -0
  184. package/src/components/COMPONENT_LOOKUP.md +1 -1
  185. package/src/preset-standalone.css +15 -0
  186. package/src/preset.css +15 -1
package/CHANGELOG.md CHANGED
@@ -7,6 +7,69 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ---
9
9
 
10
+ ## [Unreleased]
11
+
12
+ ## [0.17.0] - 2026-08-06
13
+
14
+ アクセシビリティ(読み上げソフト対応)の burn-down と、利用側バンドル削減の回。**破壊的変更なし。** 公開 export 名・既定の見た目はどちらも変わらない。
15
+
16
+ ### ✨ Added
17
+
18
+ - **フィールドのラベル関連付けを DS の仕組みとして実装**(a11y): Radix ベースのコントロールは `<button>` / `<span role="slider">` として描画されるため `<Label htmlFor>` ではアクセシブルネームが付かない。`FormField` がラベル・説明・エラーに id を採番し、配下のコントロールへ context で渡す方式(`src/lib/field-labelling.ts`)に決定。`Select` / `Switch` / `Checkbox` / `Combobox` / `MultiSelect` / `Slider` は `aria-labelledby`、`Input` / `Textarea` は `id` ↔ `htmlFor` で自動的に関連付く。利用側の `aria-label` / `aria-labelledby` / `id` の明示指定が常に優先される([#202](https://github.com/flashpark/cake-design-system/issues/202))
19
+ - **`AccordionTrigger` に `headingLevel` prop を追加**(a11y): 見出しレベルを 2〜6 で指定できる。既定は radix と同じ 3 のままなので既存利用に影響しない。ナビゲーション用途で本文の h1 より前に置くときにページの見出し階層を壊さない([#219](https://github.com/flashpark/cake-design-system/issues/219))
20
+ - **`Slider` に `thumbLabels` prop を追加**(a11y): つまみごとの読み上げ名を指定できる。未指定でも `aria-label` を各つまみへ転送し、範囲指定(つまみ 2 つ以上)では「(下限)」「(上限)」を自動で補う
21
+ - **`DataTableSelectCell` に `aria-label` prop を追加**(a11y): 未指定時は `placeholder` を名前に使う
22
+
23
+ ### ⚡️ Performance
24
+
25
+ - **利用側の初期バンドルを削減**: library build を `preserveModules` 出力へ変更し、`import { Button }` のような named export だけで未使用コンポーネントを落とせるようにした。アイコンは barrel 経由をやめ使用アイコンごとのサブパス import に置換。Tailwind の `@source` 入口は build 後に生成する manifest で維持するため **consumer 側の CSS 設定変更は不要**、公開 API の名前も不変。Button のみ import の実測で **JS 332.5 kB → 246.6 kB(gzip 101.0 kB → 75.5 kB)**([PR #218](https://github.com/flashpark/cake-design-system/pull/218))
26
+
27
+ ### 🐛 Fixed
28
+
29
+ - **`CategoryScroll` が CSS Grid 直下で max-content 幅に縮む問題を修正**(**見た目が直る**): ルートの `mx-auto` が grid アイテムの `justify-self: stretch` を無効化していた。`w-full` を併記して列幅いっぱいに広がるようにした(実測 536px → 867px)。block 文脈での中央寄せ・上限幅は従来どおり。利用側の回避ラッパーは撤去できる([#207](https://github.com/flashpark/cake-design-system/issues/207))
30
+ - **`SideNav` / `MenuDrawer` の hover をモーショントークン参照に変更**(**見た目が変わる**): 素の `transition-colors`(Tailwind 既定値)では `prefers-reduced-motion` のトークン制御が効かなかった。あわせて MenuDrawer の行は `mx-2` + `px-2` でハイライト下地を左右 8px 内側に入れ、元から指定されていた `rounded-lg` を可視化(文字の開始位置は 16px のまま不変)([#201](https://github.com/flashpark/cake-design-system/issues/201))
31
+ - **`npx cakejp-ds codemod <NAME>` が `scripts/codemod/` を動的解決するようになった**: 従来はバージョン名の決め打ちで、雛形から作った codemod を呼べなかった。あわせて DIR 引数が codemod スクリプトへ渡っていなかった既存バグも修正([#182](https://github.com/flashpark/cake-design-system/issues/182))
32
+
33
+ ### ♿️ Accessibility
34
+
35
+ - **axe の `button-name` / `label` / `aria-input-field-name` の除外を全廃**: 着手時点で 21 ストーリーが違反していたものをゼロにし、`.storybook/preview.ts` の既知違反ベースラインからラベル関連の 3 ルールを削除した。以後、同種の抜けは追加時点で検知される。a11y 検査は 120 ファイル / 608 件が全緑([#202](https://github.com/flashpark/cake-design-system/issues/202))
36
+
37
+ ### 🔧 Changed
38
+
39
+ - **publish workflow を Trusted Publishing(OIDC)対応に**: `id-token: write` を追加し、publish ジョブの Node を 22 / npm を 11.5.1 以上へ。`NODE_AUTH_TOKEN` はフォールバックとして残しているため、npmjs.com 側の Trusted Publisher 登録が未了でも従来どおり publish できる。登録完了後にトークンを撤去する([#132](https://github.com/flashpark/cake-design-system/issues/132))
40
+
41
+ ### 📝 Docs
42
+
43
+ - ラベル関連付けの方針を contracts(`components.json` の FormField / Slider、`rules.json` の A013)と `CLAUDE.md` に明記
44
+ - `RELEASE.md` / `PUBLISHING.md` の認証まわりを実態に更新。誤りだった「token は少なくとも 1 年に 1 度 rotate」を、granular token の 90 日上限の記述へ修正
45
+
46
+ ### 🐛 Fixed(管理画面シェル / #195・#196)
47
+
48
+ - **管理サイドナビのサブメニュー項目が 44px を割っていた問題を修正**(**見た目が変わる/a11y**): PC のホバーポップアップ内の項目が `py-2.5`(10px×2)+ 行高 18px = **38px** で、WCAG 2.5.5 の最小ターゲット 44px を下回っていた。`min-h-11` で下限を固定(SP ドロワーのサブメニューは 44.5px で元から充足だが、同じく下限を明示)。ポップアップの項目が 1 行あたり 6px 高くなる([#196](https://github.com/flashpark/cake-design-system/issues/196))
49
+ - **`AdminHeader` の水平 padding を本文の gutter に揃えた**(**見た目が変わる**): ヘッダーが `px-3 @md:px-4`、`AdminShell` の `<main>` が `p-4 @md:p-6` で、ヘッダー内要素の左端とページ h1 の左端が PC で 8px(SP で 4px)ズレていた。ヘッダーを `px-4 @md:px-6` に揃え、左の面を一致させた([#196](https://github.com/flashpark/cake-design-system/issues/196))
50
+
51
+ - **`AdminSideNav` の SP ドロワーヘッダー行から `border-bottom` を削除**(**見た目が変わる**): サイドバーは 1 枚の静かなパネルとして読ませる。画面に見える線を①サイドバー右端の縦線②コンテンツヘッダー下の横線の 2 本に絞り、十字の交差を避けて T 字で突き当たるようにした。見出しと最初の項目の分離は既存の余白(閉じるボタン 40px + `py-3` で実高 64px)が担う([#195](https://github.com/flashpark/cake-design-system/issues/195))
52
+ - **`Avatar` のイニシャル文字サイズを円径の 44% 目安に調整**(**見た目が変わる**): 既定サイズ(32px 円)のフォールバックが 12px(37%)で字が円の中で泳いでいた。sm=10px / default=14px / lg=16px に整理し、`AvatarGroupCount` の件数表示も同じ比率に揃えた([#195](https://github.com/flashpark/cake-design-system/issues/195))
53
+
54
+ ### 📝 Docs
55
+
56
+ - サイドバーの線と折りたたみトリガーのガイダンスを contracts に追記([#195](https://github.com/flashpark/cake-design-system/issues/195)): ①サイドバー内に横罫線を引かない(ヘッダー行・フッターとも。線は右端の縦線とコンテンツヘッダー下の横線の 2 本だけ)②折りたたみトリガーはサイドバー内ヘッダー行の右端に置き、コンテンツヘッダー左端に置かない③`AvatarFallback` のイニシャルは円径の 44% 前後にする
57
+ - サイドナビ・シェルヘッダーのガイダンスを contracts に追記([#196](https://github.com/flashpark/cake-design-system/issues/196)): ①サイドバーのフッターにも `border-top` を引かない(1 枚のパネルとして読ませ、分離は余白が担う)②シェルヘッダーにページタイトルを複製しない(ページ名の正は本文の h1。置くものが無ければヘッダーバー自体を省いてよい)③ヘッダーの水平 padding は本文コンテナの gutter と揃える ④ナビ項目は 44px を確保する
58
+
59
+ ## [0.16.0] - 2026-07-31
60
+
61
+ ダークモード・フォーカス可視性・カードレイアウトのバグ修正回(issue #208 / #209 / #210)。**破壊的変更なし。** 見た目の変化はすべて改善方向(真っ黒画面の解消・フォーカスが見えるようになる・はみ出しとズレが直る)。
62
+
63
+ ### 🐛 Fixed
64
+
65
+ - **ルート要素に背景色トークンが無く、ダークモード設定のブラウザで画面が真っ黒になる問題を修正**: `html` に `var(--background)`(= `--Surface-Primary`)、`body` に `var(--foreground)` を preset の base 層で宣言。preset.css を import しただけで light/dark とも正しい地色になる。トークン参照のみでハードコード無し、`__tests__/root-background-css.test.ts` で契約を固定([#208](https://github.com/flashpark/cake-design-system/issues/208)、PR #212)
66
+ - **ProductCard が grid 列からはみ出す / タイトル行数で価格の縦位置がズレる問題を修正**(**見た目が直る**): root の `min-w-[140px]` が grid の 1fr トラックを内側から押し広げて列はみ出しを起こしていた(480px コンテナ 4 列で 32px はみ出し → 0)。root を `min-w-0` にし、nowrap のメタ行にも `min-w-0` を伝播。商品名は `min-h-[2lh]` で常に 2 行分を確保し、同一行のカードの価格 y 座標が完全一致するようにした。回帰ストーリーと契約テストを追加([#210](https://github.com/flashpark/cake-design-system/issues/210)、PR #211)
67
+ - **interaction テストの開閉直後 `toBeVisible()` をアニメーション完了待ちに変更**: Dialog / Tabs / Accordion の 5 箇所が fade-in 中の opacity 0 でタイミング依存に失敗していたフレークを解消(PR #214)
68
+
69
+ ### 🐛 Fixed
70
+
71
+ - **入力系のフォーカス表示を統一し、hover がフォーカスを上書きする問題を修正**(**見た目が直る/a11y**): フォーカスリングの定義を `FOCUS_RING` / `FOCUS_RING_WITHIN` / `FOCUS_RING_INSET`(`src/lib/focus-ring.ts`、公開 export)に一本化し、Input / Textarea / Select / Checkbox / CheckboxCard / RadioGroup(tile・chip)/ Slider / Button / Chip / FileInput / SearchBar / NumberInput / CommandInput が同じ緑リング(`--Focus-High-Emphasis` の 3px)で揃うようにした。**フォーカスの可視状態が無かった** SearchBar の検索ボタンと NumberInput の増減ボタンにリングを追加。CheckboxCard / RadioGroup(tile) はフォーカスリングがオレンジで選択状態と紛らわしかったため緑へ統一。加えて Tailwind の variant 出力順で `focus-within` が `hover` に負ける問題を、SearchBar / FileInput で明示的に抑制した(フォーカス中はホバーの枠線が出ない)。契約は `__tests__/focus-visible-contract.test.tsx` で固定([#209](https://github.com/flashpark/cake-design-system/issues/209))
72
+
10
73
  ## [0.15.0] - 2026-07-30
11
74
 
12
75
  姉妹 DS(ksk-design-system)の直近改善(#267 / #280 / #282 / #271 / #268 / #278)を cake へ移植した回。**破壊的変更なし。** 見た目の変化は「flex 内で潰れていた固定サイズ要素が本来のサイズに戻る」「a11y 修正でスクロール領域にフォーカスリングが付く」の改善方向のみ。
package/CLAUDE.md CHANGED
@@ -100,6 +100,7 @@ PdM や社長が AI(Claude 等)で HTML モックを作る際、このパッ
100
100
  - **価格表記**: `¥{数字,区切り}(税込)` — `円` `税込み` `(税込)` は禁止
101
101
  - **日付表記**: `M月D日(曜日)` — `YYYY/MM/DD` や英語表記禁止
102
102
  - **aria-label**: 日本語で記述 — 英語 aria-label 禁止
103
+ - **Radix コントロールのラベル**: `Select` / `Switch` / `Checkbox` / `Combobox` / `Slider` などは `<button>` や `<span role="slider">` として描画されるため、**隣に `<Label htmlFor>` を置いても読み上げ名が付かない**。`FormField`(npm では `CakeFormField`)でラップすれば `aria-labelledby` が自動で付く。ラップしない単体利用のときだけ、コントロール自身に日本語の `aria-label` を書く
103
104
  - **input type="date"**: 使用禁止 — 実装済みの正解形 `DatePicker` / `DateTimePicker`(primitives)を使う(内部で Popover と Calendar を DS 意匠で組み済み)。特殊要件のときのみ Popover と Calendar を手組みする
104
105
  - **input type="file"**: 使用禁止 — 汎用の添付(PDF/CSV/画像混在)は `FileInput`(foundations)、プレビュー付きの画像管理(並び替え・複数サムネイル)は `ImageUploader`(primitives)を使う
105
106
  - **Button の「戻る・キャンセル・閉じる」**: `variant="secondary"` は誤り — **`variant="tertiary"`(グレー)を使う**。Cake DS の `secondary` は Material/Bootstrap/shadcn と違い**ブランドアクセント(薄オレンジ地+オレンジ文字)**。「主 CTA の隣=2番目だから secondary」と序列で選ばず、役割(前進か後退か)で選ぶ。secondary は別方向の“前進”副 CTA 用(例: 主「購入する」/ 副「サンプルを見る」)
package/bin/init.js CHANGED
@@ -11,7 +11,7 @@
11
11
  // npx cakejp-ds init --force # 既存ファイルを上書き
12
12
  // npx cakejp-ds postinstall # npm postinstall から呼ばれる silent モード
13
13
 
14
- import { copyFileSync, existsSync } from "node:fs"
14
+ import { copyFileSync, existsSync, readdirSync } from "node:fs"
15
15
  import { dirname, join, resolve } from "node:path"
16
16
  import { fileURLToPath } from "node:url"
17
17
 
@@ -22,13 +22,30 @@ const args = process.argv.slice(2)
22
22
  const cmd = args[0] || "init"
23
23
  const force = args.includes("--force")
24
24
 
25
+ /**
26
+ * scripts/codemod/ に置かれた codemod 名の一覧。
27
+ * template.mjs(次の破壊的変更用の雛形)と check-migration.mjs(別コマンド)は除く。
28
+ * ここを一覧の唯一の出所にすることで、雛形から作った codemod が
29
+ * dispatch の書き換えなしに npx から呼べる(issue #182)。
30
+ */
31
+ function listCodemods() {
32
+ const dir = join(pkgRoot, "scripts/codemod")
33
+ if (!existsSync(dir)) return []
34
+ return readdirSync(dir)
35
+ .filter((f) => f.endsWith(".mjs"))
36
+ .map((f) => f.replace(/\.mjs$/, ""))
37
+ .filter((name) => name !== "template" && name !== "check-migration")
38
+ .sort()
39
+ }
40
+
25
41
  if (cmd === "help" || cmd === "--help" || cmd === "-h") {
26
42
  console.log(`@cakejp/design-system CLI
27
43
 
28
44
  使い方:
29
45
  npx cakejp-ds init AI ルールファイルを設置
30
46
  npx cakejp-ds init --force 既存ファイルを上書き
31
- npx cakejp-ds codemod v0.2-to-v0.3 [DIR] 旧 API を新 API に自動移行
47
+ npx cakejp-ds codemod <NAME> [DIR] 旧 API を新 API に自動移行
48
+ 使える <NAME>: ${listCodemods().join(", ") || "(なし)"}
32
49
  npx cakejp-ds check-migration [DIR] 旧 API 利用箇所を検出
33
50
  npx cakejp-ds check-duplicates [DIR] DS に既にある部品の二重実装を検出(--strict で検出時 exit 1)
34
51
  意図的に残すローカル実装は、対象 export の直前行に
@@ -41,12 +58,18 @@ if (cmd === "help" || cmd === "--help" || cmd === "-h") {
41
58
  // codemod / check-migration は別 script に委譲
42
59
  if (cmd === "codemod") {
43
60
  const subcmd = args[1]
44
- if (subcmd !== "v0.2-to-v0.3") {
45
- console.error(`未知の codemod: ${subcmd}`)
46
- console.error(`使えるもの: v0.2-to-v0.3`)
61
+ const available = listCodemods()
62
+
63
+ // 一覧に含まれる名前だけを import する("../" 等でパッケージ外を読ませない)
64
+ if (!available.includes(subcmd)) {
65
+ console.error(subcmd ? `未知の codemod: ${subcmd}` : "codemod 名を指定してください")
66
+ console.error(`使えるもの: ${available.join(", ") || "(なし)"}`)
47
67
  process.exit(1)
48
68
  }
49
- await import(join(pkgRoot, "scripts/codemod/v0.2-to-v0.3.mjs"))
69
+
70
+ // process.argv の調整(codemod スクリプト側は process.argv.slice(2) を見る)
71
+ process.argv = [process.argv[0], process.argv[1], ...args.slice(2)]
72
+ await import(join(pkgRoot, "scripts/codemod", `${subcmd}.mjs`))
50
73
  process.exit(0)
51
74
  }
52
75
 
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "meta": {
3
3
  "name": "Cake.jp Design System — Component Contracts",
4
- "version": "0.15.0",
4
+ "version": "0.17.0",
5
5
  "description": "全コンポーネントの構造化定義。バリアント・アクセシビリティ要件・使用ルールを機械可読形式で管理。",
6
6
  "kind": "kind:\"shell\" は複数ページで再利用されるレイアウト枠(AdminShell / WorkspaceShell / MypageShell 等)。無印は部品コンポーネント。固有ページを組むときは該当 shell から始める。src/components/pages/ 配下のストーリーは特定ページ専用・非配布のため contracts の対象外。",
7
7
  "naming": "コンポーネント名は**用途ではなく機能**で付ける。用途名(QuantitySelector = カート数量)にすると、同じ機能を別の文脈で探した人が見つけられず二重実装が生まれる(実例: 用途名だったため NumberInput が別途作られ、意匠の違うステッパーが 2 つになった)。「〜Selector」「〜Picker」等の用途接尾辞を付ける前に、その部品が何をするものかで名前が付けられないかを先に検討する。既存名を機能名へ変える場合は deprecatedAliases に旧名を残す。",
@@ -18,7 +18,15 @@
18
18
  "foundations": [
19
19
  {
20
20
  "name": "Accordion",
21
- "path": "src/components/foundations/accordion.tsx"
21
+ "path": "src/components/foundations/accordion.tsx",
22
+ "subcomponents": [
23
+ "AccordionItem",
24
+ "AccordionTrigger",
25
+ "AccordionContent"
26
+ ],
27
+ "rules": [
28
+ "AccordionTrigger の headingLevel(2〜6、既定 3)でページの見出し階層に合わせる。ナビゲーション用途(サイドバーのカテゴリ一覧等)で本文の h1 より前に置くときは、ページ構造に沿ったレベルを明示する(issue #219)"
29
+ ]
22
30
  },
23
31
  {
24
32
  "name": "Alert",
@@ -66,6 +74,9 @@
66
74
  "subcomponents": [
67
75
  "AvatarImage",
68
76
  "AvatarFallback"
77
+ ],
78
+ "rules": [
79
+ "AvatarFallback のイニシャルは円の直径の 44% 前後のフォントサイズにする(32px 円なら 14px)。12px だと 37% で字が円の中で泳ぎ、余白が勝って弱く見える"
69
80
  ]
70
81
  },
71
82
  {
@@ -435,7 +446,15 @@
435
446
  {
436
447
  "name": "Slider",
437
448
  "path": "src/components/foundations/slider.tsx",
438
- "formBinding": "controller"
449
+ "formBinding": "controller",
450
+ "props": [
451
+ "thumbLabels?: string[]"
452
+ ],
453
+ "accessibility": [
454
+ "role=\"slider\" を持つのはつまみ側なので、名前はつまみに付ける。aria-label / aria-labelledby は Slider が各つまみへ転送する(issue #202)",
455
+ "つまみが 2 つ以上(範囲指定)で aria-label を使うと、読み上げで区別できるよう「(下限)」「(上限)」が自動で補われる。文言を自分で決めたいときは thumbLabels を使う",
456
+ "FormField 配下ならラベルの id を自動で aria-labelledby として受け取るので、単体利用のときだけ日本語の aria-label を書く"
457
+ ]
439
458
  },
440
459
  {
441
460
  "name": "SocialIcon",
@@ -528,7 +547,9 @@
528
547
  "rules": [
529
548
  "管理画面向けの上端固定ヘッダーの汎用枠。左に SP ハンバーガー+brand、右に actions slot",
530
549
  "文言合成(『{shopName}管理』等)はしない。brand / actions を利用側が組み立てて渡す",
531
- "onMenuClick 省略時はハンバーガー非表示"
550
+ "onMenuClick 省略時はハンバーガー非表示",
551
+ "ページタイトルをヘッダーに複製しない。ページ名の正は本文の h1(AdminShell の title)。ヘッダーにはブランド・パンくず(現在地の文脈)・グローバル操作を置き、置くものが無ければヘッダーバー自体を省いてよい",
552
+ "水平 padding は本文コンテナの gutter と揃える(px-4 @md:px-6 = AdminShell の main の p-4 @md:p-6)。ヘッダー内要素の左端と本文 h1 の左端を同じ面に乗せる。片方だけ変えると 8px 程度のズレでも違和感として検出される"
532
553
  ]
533
554
  },
534
555
  {
@@ -540,7 +561,11 @@
540
561
  "項目データ(メニュー定義・文言)は全て items prop で受ける。特定事業のメニューを部品側に焼き込まない(Cake.jp 既定は AdminShell が持つ)",
541
562
  "PC レールのラベルは max-w-12 + typo-label-xs + 中央揃えを本体が所有する。5文字超も語のまとまりで折り返せるため、consumer が data-slot セレクタで内部上書きしない",
542
563
  "SP ドロワー開閉は open / onOpenChange で制御する(内部 state を持たない)",
543
- "icon は ReactNode か描画コンテキスト(active / placement)で出し分ける関数を渡す"
564
+ "icon は ReactNode か描画コンテキスト(active / placement)で出し分ける関数を渡す",
565
+ "サイドバーは 1 枚のパネルとして読ませる。ヘッダー行に border-bottom、フッター(ユーザーブロック・ヘルプ導線等)に border-top を引かない。内部を横線で区切ると分割されて見えるため、分離は余白で担う",
566
+ "画面に見える線は①サイドバー右端の縦線②コンテンツヘッダー下の横線の 2 本に絞る。サイドバー内で横線を引くと 2 本が十字に交差して見える(正しくは T 字で突き当たる)",
567
+ "折りたたみ(開閉)を持たせる場合、トリガーはサイドバー内ヘッダー行の右端に置く。コンテンツヘッダーの左端に置かない。動かす対象と操作する場所が離れると、そのボタンが何に属するか読めなくなる",
568
+ "ナビ項目は項目高 44px(WCAG 2.5.5 の最小ターゲット)を確保する。メイン項目・サブメニュー項目とも min-h-11 で下限を固定する(行高の小さいテキストは縦 padding だけだと割り込む)"
544
569
  ]
545
570
  },
546
571
  {
@@ -563,7 +588,10 @@
563
588
  },
564
589
  {
565
590
  "name": "CategoryScroll",
566
- "path": "src/components/primitives/category-scroll.tsx"
591
+ "path": "src/components/primitives/category-scroll.tsx",
592
+ "rules": [
593
+ "ルートは w-full 併記で CSS Grid 直下でも列幅いっぱいに広がる(mx-auto による max-content 縮み対策、issue #207)。grid 直下に置くための余分なラッパー div は不要"
594
+ ]
567
595
  },
568
596
  {
569
597
  "name": "CategoryShortcuts",
@@ -733,7 +761,12 @@
733
761
  "rules": [
734
762
  "Label+Input+エラーメッセージをセットで管理",
735
763
  "グリッド横並び時は descriptionPosition='below' で高さを揃える",
736
- "npm 経由では CakeFormField として import する(foundations/form.tsx の FormField と名前が衝突するため別名で export)"
764
+ "npm 経由では CakeFormField として import する(foundations/form.tsx の FormField と名前が衝突するため別名で export)",
765
+ "ラベルの id を配下のコントロールへ自動で渡す。Select / Switch / Checkbox(Radix の <button> トリガー)は aria-labelledby、Input / Textarea は id ↔ htmlFor で関連付く。description / error があれば aria-describedby も付く(issue #202)",
766
+ "そのため Radix ベースの入力を使うときは FormField でラップするのが既定。ラップしない単体利用では日本語の aria-label を利用側で書く(<label htmlFor> は <button> に名前を与えない)"
767
+ ],
768
+ "accessibility": [
769
+ "利用側が aria-label / aria-labelledby / id を明示した場合は必ずそちらが優先される(二重命名を避ける)"
737
770
  ]
738
771
  },
739
772
  {
@@ -1133,6 +1166,8 @@
1133
1166
  "他ブランドで使う場合、ヘッダー左のブランド表示は brand(ReactNode。既定=『{shopName}管理』の文字列)で差し替える。SP ドロワー上部の見出しは sidebarHeader(ReactNode。既定=shopName)で差し替える",
1134
1167
  "戻る導線(onBack)はパンくずの上に置く。onBack を渡すとシェルが main 内・パンくずより上に戻るボタンを描画する(backLabel で文言変更・既定『戻る』)。子コンテンツ内に戻るリンクを手書きしない",
1135
1168
  "タイトル直下の上位アクション(AI商品作成・PDF出力等)は h1 と同じ左端に左寄せする。右端フロートにしない",
1169
+ "ページ名の正は main 内の h1(title prop)。同じページ名を AdminHeader 側に複製しない(ヘッダーはブランド・パンくず・グローバル操作の場)",
1170
+ "ヘッダーの水平 padding(px-4 @md:px-6)は main の gutter(p-4 @md:p-6)と同値。片方だけ変えるとヘッダー内要素と h1 の左端がズレるので、変えるときは両方揃える",
1136
1171
  "既定値は props で差し替え可能で、骨格(Header + SideNav + Main)自体は他事業(ジョブボードの管理画面等)でも再利用できる",
1137
1172
  "a11y: DOM 先頭に SkipLink を標準内蔵し <main id> を制御できる(mainId 既定 main-content)。sr-only で視覚無影響。skipLink={false} で無効化",
1138
1173
  "地がSurface-Secondaryなので、シェルが配下Cardのサーフェス文脈(--card-surface: Surface-Primary)を宣言する → Cardはsurface未指定のまま白で地から浮く(#150)。darkは据え置き"
@@ -1226,7 +1261,9 @@
1226
1261
  "rating"
1227
1262
  ],
1228
1263
  "rules": [
1229
- "captionは規格・仕様の短い自由記述(例: \"1kg / 冷蔵\")。価格表示の直下にtypo-body-xs / Text-Medium-Emphasisで表示。tags(配送方法等のenum variant)とは別物で代替不可"
1264
+ "captionは規格・仕様の短い自由記述(例: \"1kg / 冷蔵\")。価格表示の直下にtypo-body-xs / Text-Medium-Emphasisで表示。tags(配送方法等のenum variant)とは別物で代替不可",
1265
+ "カード幅は列(親グリッド/flex)が決める。カード自身は min-w-0 で、固定の min-width を持たない。自前のカードを組む場合もテキスト列は grid-template-columns: minmax(0, 1fr) にし、auto にしない(nowrapのメタ行のmin-content幅が列を押し広げ、サムネイルが列からはみ出す)",
1266
+ "商品名は line-clamp-2 + min-h-[2lh] で常に2行分の高さを確保する。1行の商品名でも下に続く価格の縦位置が一覧内で揃う"
1230
1267
  ]
1231
1268
  },
1232
1269
  {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "meta": {
3
3
  "name": "Cake.jp Design System — Composition Contracts",
4
- "version": "0.15.0",
4
+ "version": "0.17.0",
5
5
  "description": "ページ骨格・視覚階層・余白リズムの機械可読な正本。画面パターンを選んだ後の「実際の組み方」を規定する。ページの外枠(モバイル/デスクトップ/管理)、商品グリッドの列数、余白の4段リズム、Surface のネスト階層、テキスト階層、CTA の優先順位を構造化する。人間向けの解説は guidelines/composition/layout.md・guidelines/composition/hierarchy.md・guidelines/overview.md。",
6
6
  "source": "guidelines/composition/layout.md, guidelines/composition/hierarchy.md, guidelines/overview.md, guidelines/components/button.md(CTA 密度ルール)を正本化",
7
7
  "roleSeparation": "screen-patterns.json はページ種別(Standard Page / Focused Workspace / ResponsiveDialog / Dialog)を選ぶための契約。composition.json は選んだ後、その骨格をどう組むか(外枠構造・余白リズム・階層)の契約。前者=何を使うか、後者=どう並べるか。",
@@ -54,7 +54,13 @@
54
54
  "rules": [
55
55
  "管理画面のシェルは AdminShell を使い、手組みしない",
56
56
  "管理画面の表は DataTable を使う(生の table 禁止)",
57
- "ページ直下のセクション間は space-y-6 相当(管理画面の縦リズム)"
57
+ "ページ直下のセクション間は space-y-6 相当(管理画面の縦リズム)",
58
+ "サイドバーは 1 枚のパネルとして読ませる。ヘッダー行に border-bottom、フッター(ユーザーブロック等)に border-top を引かない。分離は余白が担う",
59
+ "管理画面に引く線は①サイドバー右端の縦線②コンテンツヘッダー下の横線の 2 本だけにする。サイドバー内にも横線を引くと 2 本が十字に交差して見える(正しくは T 字で突き当たる)",
60
+ "サイドバーの折りたたみトリガーはサイドバー内ヘッダー行の右端に置く。コンテンツヘッダーの左端に置かない",
61
+ "シェルヘッダーにページタイトルを複製しない。ページ名の正は本文の h1。ヘッダーにはパンくず(現在地の文脈)やグローバル操作を置き、置くものが無ければヘッダーバー自体を省いてよい",
62
+ "シェルヘッダーの水平 padding は本文コンテナの gutter と揃える(px-4 @md:px-6)。ヘッダー内要素の左端と本文 h1 の左端を同じ面に乗せる",
63
+ "ナビ項目は項目高 44px(WCAG 2.5.5)を確保する。ホバーで開くサブメニュー項目も同じ 44px を満たす"
58
64
  ]
59
65
  },
60
66
  "funnel": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "meta": {
3
3
  "name": "Cake.jp Design System — Rules Contracts",
4
- "version": "0.15.0",
4
+ "version": "0.17.0",
5
5
  "description": "禁止パターン・アクセシビリティ要件・ライティングルールの構造化定義。lint-scratch.sh と check-drift.sh で自動検証。"
6
6
  },
7
7
  "prohibited": [
@@ -637,7 +637,15 @@
637
637
  },
638
638
  {
639
639
  "id": "A005",
640
- "rule": "フォーカスリング必須: focus-visible:ring-[3px] focus-visible:ring-[var(--Focus-High-Emphasis)]/50"
640
+ "rule": "フォーカスリング必須: focus-visible:border-[var(--Focus-High-Emphasis)] focus-visible:ring-[3px] focus-visible:ring-[var(--Focus-High-Emphasis)]/50(DS の FOCUS_RING 定数。入力系・操作系はすべてこれを使い、独自の ring 幅・色を作らない)"
641
+ },
642
+ {
643
+ "id": "A011",
644
+ "rule": "ラッパーが枠を描く合成入力(SearchBar / FileInput 等)は FOCUS_RING_WITHIN(focus-within 版)を使う。overflow-hidden の内側は FOCUS_RING_INSET を使う"
645
+ },
646
+ {
647
+ "id": "A012",
648
+ "rule": "フォーカス中は hover の見た目を優先しない。Tailwind の variant 順は focus-within → hover → focus-visible なので、focus-within を使う要素では同じプロパティの hover を hover:not-focus-within:* で抑制する(focus-visible は hover に自動で勝つ)"
641
649
  },
642
650
  {
643
651
  "id": "A006",
@@ -647,6 +655,10 @@
647
655
  "id": "A007",
648
656
  "rule": "全フォーム入力に <Label> または aria-label を紐付ける"
649
657
  },
658
+ {
659
+ "id": "A013",
660
+ "rule": "Radix ベースのコントロール(Select / Switch / Checkbox / Combobox / Slider 等)は <button> や <span role=\"slider\"> として描画されるため、<Label htmlFor> や外側の <label> ラップでは名前が付かない。FormField でラップして aria-labelledby を自動付与させるか、単体利用なら日本語の aria-label をコントロール自身に書く(issue #202)"
661
+ },
650
662
  {
651
663
  "id": "A008",
652
664
  "rule": "フォームエラーは aria-describedby でエラーメッセージを紐付ける"
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "meta": {
3
3
  "name": "Cake.jp Design System — Screen Patterns Contracts",
4
- "version": "0.15.0",
4
+ "version": "0.17.0",
5
5
  "description": "CRUD 機能でどの画面パターンを使うかの機械可読な判断基準。5パターンの定義・CRUD 対応・決定木・編集UIの観点比較を構造化する。人間向けの解説は guidelines/foundations/screen-patterns.md。",
6
6
  "source": "GitHub issue #37 CRUDの画面設計の型化と基本パターンの整備",
7
7
  "relatedContract": "本契約はページ種別の選択(何を使うか)を担う。選んだ後の骨格の組み方(外枠構造・余白リズム・視覚階層)は contracts/composition.json を参照する。",
@@ -0,0 +1,166 @@
1
+ import { jsx as e } from "react/jsx-runtime";
2
+ import "react";
3
+ import o from "iconsax-reactjs/dist/esm/Notification.js";
4
+ import i from "iconsax-reactjs/dist/esm/Box.js";
5
+ import r from "iconsax-reactjs/dist/esm/Calendar.js";
6
+ import a from "iconsax-reactjs/dist/esm/Clock.js";
7
+ import t from "iconsax-reactjs/dist/esm/Bookmark.js";
8
+ import s from "iconsax-reactjs/dist/esm/Shop.js";
9
+ import m from "iconsax-reactjs/dist/esm/Monitor.js";
10
+ import p from "iconsax-reactjs/dist/esm/Star1.js";
11
+ import l from "iconsax-reactjs/dist/esm/Edit2.js";
12
+ import n from "iconsax-reactjs/dist/esm/Ticket2.js";
13
+ import y from "iconsax-reactjs/dist/esm/Gift.js";
14
+ import k from "iconsax-reactjs/dist/esm/People.js";
15
+ import c from "iconsax-reactjs/dist/esm/Setting2.js";
16
+ import f from "iconsax-reactjs/dist/esm/Sms.js";
17
+ import g from "iconsax-reactjs/dist/esm/Card.js";
18
+ import b from "iconsax-reactjs/dist/esm/InfoCircle.js";
19
+ import d from "iconsax-reactjs/dist/esm/Logout.js";
20
+ const T = [
21
+ {
22
+ items: [
23
+ {
24
+ icon: /* @__PURE__ */ e(o, { size: 16 }),
25
+ label: "お知らせ",
26
+ href: "/mypage/",
27
+ key: "news",
28
+ storyId: "pages-cake-✅-お知らせ--notification-list"
29
+ },
30
+ {
31
+ icon: /* @__PURE__ */ e(i, { size: 16 }),
32
+ label: "注文履歴",
33
+ href: "/mypage/order_list/",
34
+ key: "orders",
35
+ storyId: "pages-cake-マイページ--order-list"
36
+ },
37
+ {
38
+ icon: /* @__PURE__ */ e(r, { size: 16 }),
39
+ label: "記念日登録",
40
+ href: "/mypage/anniversary/",
41
+ key: "anniversary",
42
+ storyId: "pages-cake-記念日管理--anniversary-list"
43
+ },
44
+ {
45
+ icon: /* @__PURE__ */ e(a, { size: 16 }),
46
+ label: "閲覧履歴",
47
+ href: "/mypage/item_view_history/",
48
+ key: "history",
49
+ storyId: "pages-cake-マイページ--view-history"
50
+ }
51
+ ]
52
+ },
53
+ {
54
+ groupLabel: "ブックマーク",
55
+ items: [
56
+ {
57
+ icon: /* @__PURE__ */ e(t, { size: 16 }),
58
+ label: "商品",
59
+ href: "/mypage/bookmark/item_list/",
60
+ key: "bookmark-item",
61
+ storyId: "pages-cake-ブックマーク--with-items"
62
+ },
63
+ {
64
+ icon: /* @__PURE__ */ e(s, { size: 16 }),
65
+ label: "お店",
66
+ href: "/mypage/bookmark/shop_list/",
67
+ key: "bookmark-shop",
68
+ storyId: "pages-cake-ブックマーク--shop-bookmark"
69
+ },
70
+ {
71
+ icon: /* @__PURE__ */ e(m, { size: 16 }),
72
+ label: "エンタメ",
73
+ href: "/mypage/bookmark/entertainment_list/",
74
+ key: "bookmark-entertainment",
75
+ storyId: "pages-cake-ブックマーク--entertainment-bookmark"
76
+ }
77
+ ]
78
+ },
79
+ {
80
+ groupLabel: "口コミ",
81
+ items: [
82
+ {
83
+ icon: /* @__PURE__ */ e(p, { size: 16 }),
84
+ label: "投稿した口コミ",
85
+ href: "/mypage/review_list/",
86
+ key: "reviews",
87
+ storyId: "pages-cake-マイページ--review-list"
88
+ },
89
+ {
90
+ icon: /* @__PURE__ */ e(l, { size: 16 }),
91
+ label: "投稿できる口コミ",
92
+ href: "/mypage/review_post_list/",
93
+ key: "review-post",
94
+ storyId: "pages-cake-口コミ投稿--reviewable-products"
95
+ }
96
+ ]
97
+ },
98
+ {
99
+ groupLabel: "ポイント・キャンペーン",
100
+ items: [
101
+ {
102
+ icon: /* @__PURE__ */ e(n, { size: 16 }),
103
+ label: "クーポン",
104
+ href: "/mypage/coupon_list/",
105
+ key: "coupons",
106
+ storyId: "pages-cake-マイページ--coupon-list"
107
+ },
108
+ {
109
+ icon: /* @__PURE__ */ e(y, { size: 16 }),
110
+ label: "ギフトカード・ポイント",
111
+ href: "/mypage/point/",
112
+ key: "point",
113
+ storyId: "pages-cake-マイページ--point"
114
+ },
115
+ {
116
+ icon: /* @__PURE__ */ e(k, { size: 16 }),
117
+ label: "友達紹介",
118
+ href: "/mypage/introduce/",
119
+ key: "introduce",
120
+ storyId: "pages-cake-マイページ--introduce"
121
+ }
122
+ ]
123
+ },
124
+ {
125
+ groupLabel: "会員情報",
126
+ items: [
127
+ {
128
+ icon: /* @__PURE__ */ e(c, { size: 16 }),
129
+ label: "会員情報の設定・変更",
130
+ href: "/mypage/profile/",
131
+ key: "profile",
132
+ storyId: "pages-cake-マイページ--profile"
133
+ },
134
+ {
135
+ icon: /* @__PURE__ */ e(f, { size: 16 }),
136
+ label: "メールマガジン設定",
137
+ href: "/mypage/mailmagazine/",
138
+ key: "mailmagazine",
139
+ storyId: "pages-cake-マイページ--mail-magazine"
140
+ },
141
+ {
142
+ icon: /* @__PURE__ */ e(g, { size: 16 }),
143
+ label: "クレジットカード情報",
144
+ href: "/mypage/payment_info/",
145
+ key: "payment",
146
+ storyId: "pages-cake-マイページ--payment-info"
147
+ },
148
+ {
149
+ icon: /* @__PURE__ */ e(b, { size: 16 }),
150
+ label: "お問い合わせ",
151
+ href: "/inquiry/",
152
+ key: "inquiry",
153
+ storyId: "pages-cake-マイページ--inquiry"
154
+ },
155
+ {
156
+ icon: /* @__PURE__ */ e(d, { size: 16 }),
157
+ label: "ログアウト",
158
+ href: "/users/logout/",
159
+ key: "logout"
160
+ }
161
+ ]
162
+ }
163
+ ];
164
+ export {
165
+ T as mypageMenuGroups
166
+ };