@cakejp/design-system 0.3.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 (131) hide show
  1. package/AGENTS.md +144 -0
  2. package/CHANGELOG.md +115 -0
  3. package/CLAUDE.md +188 -0
  4. package/CLAUDE_PRODUCTION.md +121 -0
  5. package/MIGRATION.md +228 -0
  6. package/README.md +79 -0
  7. package/RELEASE.md +205 -0
  8. package/bin/init.js +134 -0
  9. package/component-registry.json +1146 -0
  10. package/contracts/components.json +730 -0
  11. package/contracts/rules.json +559 -0
  12. package/dist/index.css +1 -0
  13. package/dist/index.js +9344 -0
  14. package/dist/types/components/ec/_mypage-menu-data.d.ts +15 -0
  15. package/dist/types/components/ec/admin-layout.d.ts +31 -0
  16. package/dist/types/components/ec/anniversary-card.d.ts +50 -0
  17. package/dist/types/components/ec/cake-logo.d.ts +22 -0
  18. package/dist/types/components/ec/chart-controls.d.ts +16 -0
  19. package/dist/types/components/ec/countdown-timer.d.ts +24 -0
  20. package/dist/types/components/ec/coupon-card.d.ts +47 -0
  21. package/dist/types/components/ec/delivery-calendar.d.ts +36 -0
  22. package/dist/types/components/ec/order-section.d.ts +29 -0
  23. package/dist/types/components/ec/order-summary.d.ts +36 -0
  24. package/dist/types/components/ec/payment-method.d.ts +41 -0
  25. package/dist/types/components/ec/product-card.d.ts +77 -0
  26. package/dist/types/components/ec/product-carousel.d.ts +56 -0
  27. package/dist/types/components/ec/product-cta.d.ts +35 -0
  28. package/dist/types/components/ec/product-detail-bar.d.ts +62 -0
  29. package/dist/types/components/ec/product-detail-sidebar.d.ts +115 -0
  30. package/dist/types/components/ec/product-list-item.d.ts +90 -0
  31. package/dist/types/components/ec/product-option.d.ts +62 -0
  32. package/dist/types/components/ec/rating-stars.d.ts +30 -0
  33. package/dist/types/components/ec/review-card.d.ts +44 -0
  34. package/dist/types/components/ec/review-form.d.ts +40 -0
  35. package/dist/types/components/ec/review-summary.d.ts +53 -0
  36. package/dist/types/components/ec/shop-card.d.ts +48 -0
  37. package/dist/types/components/ec/stat-card.d.ts +44 -0
  38. package/dist/types/components/foundations/accordion.d.ts +7 -0
  39. package/dist/types/components/foundations/alert-dialog.d.ts +18 -0
  40. package/dist/types/components/foundations/alert.d.ts +42 -0
  41. package/dist/types/components/foundations/aspect-ratio.d.ts +3 -0
  42. package/dist/types/components/foundations/avatar.d.ts +11 -0
  43. package/dist/types/components/foundations/badge.d.ts +9 -0
  44. package/dist/types/components/foundations/breadcrumb.d.ts +11 -0
  45. package/dist/types/components/foundations/button.d.ts +10 -0
  46. package/dist/types/components/foundations/calendar.d.ts +8 -0
  47. package/dist/types/components/foundations/card.d.ts +9 -0
  48. package/dist/types/components/foundations/checkbox-card.d.ts +30 -0
  49. package/dist/types/components/foundations/checkbox-group.d.ts +53 -0
  50. package/dist/types/components/foundations/checkbox.d.ts +4 -0
  51. package/dist/types/components/foundations/collapsible.d.ts +5 -0
  52. package/dist/types/components/foundations/command.d.ts +18 -0
  53. package/dist/types/components/foundations/context-menu.d.ts +25 -0
  54. package/dist/types/components/foundations/data-table.d.ts +104 -0
  55. package/dist/types/components/foundations/dialog.d.ts +17 -0
  56. package/dist/types/components/foundations/drawer.d.ts +13 -0
  57. package/dist/types/components/foundations/dropdown-menu.d.ts +25 -0
  58. package/dist/types/components/foundations/form.d.ts +24 -0
  59. package/dist/types/components/foundations/hover-card.d.ts +6 -0
  60. package/dist/types/components/foundations/input.d.ts +3 -0
  61. package/dist/types/components/foundations/label.d.ts +7 -0
  62. package/dist/types/components/foundations/menubar.d.ts +26 -0
  63. package/dist/types/components/foundations/navigation-menu.d.ts +14 -0
  64. package/dist/types/components/foundations/pagination.d.ts +13 -0
  65. package/dist/types/components/foundations/popover.d.ts +10 -0
  66. package/dist/types/components/foundations/progress.d.ts +4 -0
  67. package/dist/types/components/foundations/radio-group.d.ts +9 -0
  68. package/dist/types/components/foundations/responsive-dialog.d.ts +52 -0
  69. package/dist/types/components/foundations/scroll-area.d.ts +5 -0
  70. package/dist/types/components/foundations/select.d.ts +15 -0
  71. package/dist/types/components/foundations/separator.d.ts +4 -0
  72. package/dist/types/components/foundations/sheet.d.ts +14 -0
  73. package/dist/types/components/foundations/skeleton.d.ts +2 -0
  74. package/dist/types/components/foundations/slider.d.ts +4 -0
  75. package/dist/types/components/foundations/sonner.d.ts +3 -0
  76. package/dist/types/components/foundations/spinner.d.ts +6 -0
  77. package/dist/types/components/foundations/switch.d.ts +13 -0
  78. package/dist/types/components/foundations/table.d.ts +10 -0
  79. package/dist/types/components/foundations/tabs.d.ts +12 -0
  80. package/dist/types/components/foundations/textarea.d.ts +3 -0
  81. package/dist/types/components/foundations/toggle-group.d.ts +23 -0
  82. package/dist/types/components/foundations/toggle.d.ts +9 -0
  83. package/dist/types/components/foundations/tooltip.d.ts +7 -0
  84. package/dist/types/components/pages/cake/_mypage-shell.d.ts +41 -0
  85. package/dist/types/components/primitives/banner-carousel.d.ts +54 -0
  86. package/dist/types/components/primitives/bottom-tab-bar.d.ts +39 -0
  87. package/dist/types/components/primitives/bulk-action-bar.d.ts +32 -0
  88. package/dist/types/components/primitives/category-scroll.d.ts +70 -0
  89. package/dist/types/components/primitives/category-shortcuts.d.ts +44 -0
  90. package/dist/types/components/primitives/chip.d.ts +44 -0
  91. package/dist/types/components/primitives/coach-mark.d.ts +28 -0
  92. package/dist/types/components/primitives/empty-state.d.ts +36 -0
  93. package/dist/types/components/primitives/error-state.d.ts +41 -0
  94. package/dist/types/components/primitives/filter-bar.d.ts +56 -0
  95. package/dist/types/components/primitives/footer.d.ts +81 -0
  96. package/dist/types/components/primitives/form-field.d.ts +46 -0
  97. package/dist/types/components/primitives/header.d.ts +69 -0
  98. package/dist/types/components/primitives/image-carousel.d.ts +52 -0
  99. package/dist/types/components/primitives/image-gallery.d.ts +35 -0
  100. package/dist/types/components/primitives/image-uploader.d.ts +19 -0
  101. package/dist/types/components/primitives/kebab-menu.d.ts +38 -0
  102. package/dist/types/components/primitives/list-item.d.ts +60 -0
  103. package/dist/types/components/primitives/menu-drawer.d.ts +75 -0
  104. package/dist/types/components/primitives/notification-badge.d.ts +30 -0
  105. package/dist/types/components/primitives/notification-list.d.ts +45 -0
  106. package/dist/types/components/primitives/price-display.d.ts +33 -0
  107. package/dist/types/components/primitives/progress-steps.d.ts +27 -0
  108. package/dist/types/components/primitives/quantity-selector.d.ts +50 -0
  109. package/dist/types/components/primitives/search-bar.d.ts +31 -0
  110. package/dist/types/components/primitives/search-panel.d.ts +41 -0
  111. package/dist/types/components/primitives/section-header.d.ts +51 -0
  112. package/dist/types/components/primitives/share-buttons.d.ts +23 -0
  113. package/dist/types/components/primitives/side-nav.d.ts +62 -0
  114. package/dist/types/components/primitives/social-login-button.d.ts +24 -0
  115. package/dist/types/components/primitives/status-count-tabs.d.ts +14 -0
  116. package/dist/types/components/primitives/sticky-action-bar.d.ts +7 -0
  117. package/dist/types/components/primitives/sub-nav.d.ts +34 -0
  118. package/dist/types/components/primitives/tag.d.ts +19 -0
  119. package/dist/types/index.d.ts +109 -0
  120. package/dist/types/lib/utils.d.ts +2 -0
  121. package/package.json +186 -0
  122. package/scripts/codemod/check-migration.mjs +97 -0
  123. package/scripts/codemod/v0.2-to-v0.3.mjs +192 -0
  124. package/src/preset-standalone.css +109 -0
  125. package/src/preset.css +288 -0
  126. package/src/styles/primitive.css +139 -0
  127. package/src/styles/semantic.css +203 -0
  128. package/src/styles/typography.css +129 -0
  129. package/templates/AGENTS.md +56 -0
  130. package/templates/CLAUDE.md +56 -0
  131. package/tokens.json +127 -0
@@ -0,0 +1,129 @@
1
+ /* ============================================
2
+ * Cake.jp Typography System
3
+ * ============================================
4
+ *
5
+ * テキストスタイルを単一クラスで管理するユーティリティ。
6
+ * font-size / line-height / letter-spacing / font-weight を1クラスに集約し、
7
+ * コンポーネント間でのブレを防止する。
8
+ *
9
+ * 命名規則: typo-{category}-{size}
10
+ * category: heading | body | label
11
+ * size: 3xl | 2xl | xl | lg | md | sm | xs
12
+ *
13
+ * ── 使い分けガイド ──
14
+ *
15
+ * heading: セクションタイトル、ページタイトル、カードタイトル(18px 以上が目安)
16
+ * → bold, letter-spacing: 0.04em, line-height: 1.5
17
+ *
18
+ * body: 本文テキスト、説明文、コメント、補足情報
19
+ * → normal weight, line-height: 1.75(lg/md)or 1.5(sm/xs)
20
+ *
21
+ * label: ボタンラベル、ナビゲーション、フォームラベル、タグ、メタ情報
22
+ * → bold(lg/md) or medium(sm/xs), letter-spacing: 0.04em, line-height: 1.5
23
+ *
24
+ * ── ルール ──
25
+ *
26
+ * 1. コンポーネント内では typo-* クラスを使い、text-sm / font-bold / leading-* / tracking-* を個別に組み合わせない
27
+ * 2. CVA の size バリアント内でも typo-* を使用する
28
+ * 3. typo-* と text-* / font-* / leading-* / tracking-* を同一要素に混在させない
29
+ * 4. レスポンシブ対応: md:typo-heading-xl のようにプレフィックスが使える
30
+ * 5. カラーは別途指定: className="typo-body-sm text-[var(--Text-Low-Emphasis)]"
31
+ */
32
+
33
+ /* ─── Heading ─── */
34
+
35
+ @utility typo-heading-3xl {
36
+ font-size: 1.75rem; /* 28px */
37
+ line-height: 1.5; /* 42px */
38
+ letter-spacing: 0.04em;
39
+ font-weight: 700;
40
+ }
41
+
42
+ @utility typo-heading-2xl {
43
+ font-size: 1.5rem; /* 24px */
44
+ line-height: 1.5; /* 36px */
45
+ letter-spacing: 0.04em;
46
+ font-weight: 700;
47
+ }
48
+
49
+ @utility typo-heading-xl {
50
+ font-size: 1.3125rem; /* 21px */
51
+ line-height: 1.5; /* 31.5px */
52
+ letter-spacing: 0.04em;
53
+ font-weight: 700;
54
+ }
55
+
56
+ @utility typo-heading-lg {
57
+ font-size: 1.125rem; /* 18px */
58
+ line-height: 1.5; /* 27px */
59
+ letter-spacing: 0.04em;
60
+ font-weight: 700;
61
+ }
62
+
63
+ @utility typo-heading-md {
64
+ font-size: 1rem; /* 16px */
65
+ line-height: 1.5; /* 24px */
66
+ letter-spacing: 0.04em;
67
+ font-weight: 700;
68
+ }
69
+
70
+ @utility typo-heading-sm {
71
+ font-size: 0.875rem; /* 14px */
72
+ line-height: 1.5; /* 21px */
73
+ letter-spacing: 0.04em;
74
+ font-weight: 700;
75
+ }
76
+
77
+ /* ─── Body ─── */
78
+
79
+ @utility typo-body-lg {
80
+ font-size: 1rem; /* 16px */
81
+ line-height: 1.75; /* 28px */
82
+ font-weight: 400;
83
+ }
84
+
85
+ @utility typo-body-md {
86
+ font-size: 0.875rem; /* 14px */
87
+ line-height: 1.75; /* 24.5px */
88
+ font-weight: 400;
89
+ }
90
+
91
+ @utility typo-body-sm {
92
+ font-size: 0.75rem; /* 12px */
93
+ line-height: 1.5; /* 18px */
94
+ font-weight: 400;
95
+ }
96
+
97
+ @utility typo-body-xs {
98
+ font-size: 0.625rem; /* 10px */
99
+ line-height: 1.5; /* 15px */
100
+ font-weight: 400;
101
+ }
102
+
103
+ /* ─── Label ─── */
104
+
105
+ @utility typo-label-lg {
106
+ font-size: 1rem; /* 16px */
107
+ line-height: 1.5; /* 24px */
108
+ letter-spacing: 0.04em;
109
+ font-weight: 700;
110
+ }
111
+
112
+ @utility typo-label-md {
113
+ font-size: 0.875rem; /* 14px */
114
+ line-height: 1.5; /* 21px */
115
+ letter-spacing: 0.04em;
116
+ font-weight: 700;
117
+ }
118
+
119
+ @utility typo-label-sm {
120
+ font-size: 0.75rem; /* 12px */
121
+ line-height: 1.5; /* 18px */
122
+ font-weight: 500;
123
+ }
124
+
125
+ @utility typo-label-xs {
126
+ font-size: 0.625rem; /* 10px */
127
+ line-height: 1.5; /* 15px */
128
+ font-weight: 500;
129
+ }
@@ -0,0 +1,56 @@
1
+ <!--
2
+ このファイルは @cakejp/design-system の postinstall で自動設置されました。
3
+ 最新ルールを取り込むには: npx cakejp-ds init --force
4
+ -->
5
+
6
+ # このプロジェクトは @cakejp/design-system に準拠する
7
+
8
+ Codex(および他の AI エージェント)は UI 作業を始める前に、以下のファイルを**必ず**読み込むこと。
9
+
10
+ ## 📖 必読ファイル(node_modules 配下)
11
+
12
+ | ファイル | 内容 |
13
+ |---------|------|
14
+ | `node_modules/@cakejp/design-system/AGENTS.md` | DS 全体のルール・禁止パターン |
15
+ | `node_modules/@cakejp/design-system/contracts/components.json` | 全コンポーネントの定義・バリアント |
16
+ | `node_modules/@cakejp/design-system/contracts/rules.json` | 禁止パターン・アクセシビリティ要件 |
17
+ | `node_modules/@cakejp/design-system/tokens.json` | カラー・余白・角丸・影・タイポ |
18
+
19
+ > DS 側のルール更新は `npm update @cakejp/design-system` で自動反映されます。このファイルは書き換え不要。
20
+
21
+ ## ❌ 書く前に必ず確認するパターン
22
+
23
+ | 書こうとしているもの | 代わりに使うもの |
24
+ |-------------------|----------------|
25
+ | カスタムカラー(`#xxxxxx` / `rgba(...)` ハードコード) | `tokens.json` のカラートークン |
26
+ | カスタム余白(`margin: 17px` 等の非トークン値) | `tokens.json` の `spacing.*` |
27
+ | カスタム角丸(`border-radius: 13px` 等) | `tokens.json` の `radius.*` |
28
+ | カスタム影(`box-shadow: ...`) | `tokens.json` の `shadow.*` |
29
+ | カスタムフォントサイズ・ウェイト | `tokens.json` の `typography.*` |
30
+ | `::before` / `::after` で装飾 | DS の `SectionHeader`, `Chip`, `Badge` 等の variants |
31
+ | 新しい `<div>` ラッパーでレイアウト | `Card`, `Section`, `Stack` 等のコンポーネント |
32
+
33
+ DS に該当パターンが無い場合のみカスタム実装を許可。その場合は**必ずコメントで理由を記載**すること。
34
+
35
+ ## 使用方法
36
+
37
+ ### CSS のセットアップ(重要)
38
+
39
+ DS のプリビルド CSS(`dist/index.css`)を**必ず**プロジェクトのエントリ CSS で
40
+ `@import` すること。これにより consumer の Tailwind 設定に依存せず、DS と同じ
41
+ 見た目が保証される。
42
+
43
+ ```css
44
+ /* globals.css / app.css など */
45
+ @import "@cakejp/design-system/dist/index.css"; /* DS のコンポーネントスタイル・トークン・preflight */
46
+ @import "tailwindcss"; /* consumer 自身の utility */
47
+ ```
48
+
49
+ > ❌ `@source` ディレクティブで DS を再ビルドする方式は非推奨。consumer の
50
+ > Tailwind 設定次第で出力がズレるリスクがある(トークン値の差・preflight の差等)。
51
+
52
+ ### コンポーネントの使用
53
+
54
+ ```tsx
55
+ import { Button, Chip, Card } from "@cakejp/design-system"
56
+ ```
@@ -0,0 +1,56 @@
1
+ <!--
2
+ このファイルは @cakejp/design-system の postinstall で自動設置されました。
3
+ 最新ルールを取り込むには: npx cakejp-ds init --force
4
+ -->
5
+
6
+ # このプロジェクトは @cakejp/design-system に準拠する
7
+
8
+ Codex(および他の AI エージェント)は UI 作業を始める前に、以下のファイルを**必ず**読み込むこと。
9
+
10
+ ## 📖 必読ファイル(node_modules 配下)
11
+
12
+ | ファイル | 内容 |
13
+ |---------|------|
14
+ | `node_modules/@cakejp/design-system/AGENTS.md` | DS 全体のルール・禁止パターン |
15
+ | `node_modules/@cakejp/design-system/contracts/components.json` | 全コンポーネントの定義・バリアント |
16
+ | `node_modules/@cakejp/design-system/contracts/rules.json` | 禁止パターン・アクセシビリティ要件 |
17
+ | `node_modules/@cakejp/design-system/tokens.json` | カラー・余白・角丸・影・タイポ |
18
+
19
+ > DS 側のルール更新は `npm update @cakejp/design-system` で自動反映されます。このファイルは書き換え不要。
20
+
21
+ ## ❌ 書く前に必ず確認するパターン
22
+
23
+ | 書こうとしているもの | 代わりに使うもの |
24
+ |-------------------|----------------|
25
+ | カスタムカラー(`#xxxxxx` / `rgba(...)` ハードコード) | `tokens.json` のカラートークン |
26
+ | カスタム余白(`margin: 17px` 等の非トークン値) | `tokens.json` の `spacing.*` |
27
+ | カスタム角丸(`border-radius: 13px` 等) | `tokens.json` の `radius.*` |
28
+ | カスタム影(`box-shadow: ...`) | `tokens.json` の `shadow.*` |
29
+ | カスタムフォントサイズ・ウェイト | `tokens.json` の `typography.*` |
30
+ | `::before` / `::after` で装飾 | DS の `SectionHeader`, `Chip`, `Badge` 等の variants |
31
+ | 新しい `<div>` ラッパーでレイアウト | `Card`, `Section`, `Stack` 等のコンポーネント |
32
+
33
+ DS に該当パターンが無い場合のみカスタム実装を許可。その場合は**必ずコメントで理由を記載**すること。
34
+
35
+ ## 使用方法
36
+
37
+ ### CSS のセットアップ(重要)
38
+
39
+ DS のプリビルド CSS(`dist/index.css`)を**必ず**プロジェクトのエントリ CSS で
40
+ `@import` すること。これにより consumer の Tailwind 設定に依存せず、DS と同じ
41
+ 見た目が保証される。
42
+
43
+ ```css
44
+ /* globals.css / app.css など */
45
+ @import "@cakejp/design-system/dist/index.css"; /* DS のコンポーネントスタイル・トークン・preflight */
46
+ @import "tailwindcss"; /* consumer 自身の utility */
47
+ ```
48
+
49
+ > ❌ `@source` ディレクティブで DS を再ビルドする方式は非推奨。consumer の
50
+ > Tailwind 設定次第で出力がズレるリスクがある(トークン値の差・preflight の差等)。
51
+
52
+ ### コンポーネントの使用
53
+
54
+ ```tsx
55
+ import { Button, Chip, Card } from "@cakejp/design-system"
56
+ ```
package/tokens.json ADDED
@@ -0,0 +1,127 @@
1
+ {
2
+ "$schema": "https://cakejp-ds.tokens.json/v1",
3
+ "version": "0.1.0",
4
+ "description": "Cake.jp Design System — 機械可読トークン定義。AI がコンポーネント生成時に参照する。",
5
+ "lastUpdated": "2026-03-17",
6
+
7
+ "color": {
8
+ "primitive": {
9
+ "Orange": { "50": "#FFECD9", "100": "#FFD4B2", "200": "#FFBA84", "300": "#FFA66B", "400": "#FF8E4C", "500": "#F97732", "600": "#F16311", "700": "#E04B00", "800": "#BD3200", "900": "#A62700" },
10
+ "Gray": { "50": "#FBF9F8", "100": "#F4F2F1", "200": "#EBE9E8", "300": "#DBD9D8", "400": "#B7B5B4", "500": "#979594", "600": "#787675", "700": "#575352", "800": "#3A3736", "900": "#1C1A1A" },
11
+ "Forest": { "50": "#E6F5EC", "100": "#C2E5D1", "200": "#9BD4B5", "300": "#71C598", "400": "#51B883", "500": "#2CAC6E", "600": "#259D63", "700": "#1D8B56", "800": "#197A4B", "900": "#115A36" },
12
+ "Sun": { "50": "#FFE7E6", "100": "#FFC8B8", "200": "#FFA28B", "300": "#FF7B5C", "400": "#FF5838", "500": "#FF4B36", "600": "#FF220D", "700": "#FA1606", "800": "#EC0000", "900": "#D50000" },
13
+ "Teal": { "50": "#F0FCF8", "100": "#D0F6E9", "200": "#ACEED8", "300": "#81E6C4", "400": "#59D9AE", "500": "#51C79F", "600": "#49B18E", "700": "#3E987A", "800": "#317860", "900": "#1D4739" },
14
+ "Sea": { "50": "#E8F1FE", "100": "#C5D7FB", "200": "#9DB7F9", "300": "#7096F8", "400": "#4979F5", "500": "#295FF3", "600": "#003EE5", "700": "#0031D8", "800": "#0024CE", "900": "#0017B6" },
15
+ "Wood": { "50": "#F8F1E0", "100": "#EFDBB1", "200": "#E5C47F", "300": "#DCAC4D", "400": "#D69C2B", "500": "#D18D0F", "600": "#CD820A", "700": "#C87504", "800": "#C16800", "900": "#B65200" },
16
+ "Berry": { "50": "#FBD4E0", "100": "#F7B1C8", "200": "#F491B2", "300": "#F1749E", "400": "#EE598B", "500": "#EC407A", "600": "#EA296A", "700": "#E5175C", "800": "#B5175C", "900": "#9E103F" }
17
+ },
18
+
19
+ "semantic": {
20
+ "surface": {
21
+ "primary": { "value": "Primitive-White-alpha-1000", "hex": "#FFFFFF", "usage": "メイン背景" },
22
+ "secondary": { "value": "Primitive-Gray-50", "hex": "#FBF9F8", "usage": "セカンダリ背景" },
23
+ "tertiary": { "value": "Primitive-Gray-100", "hex": "#F4F2F1", "usage": "ターシャリ背景" },
24
+ "caution": { "value": "Primitive-Sun-800", "hex": "#EC0000", "usage": "エラー背景" },
25
+ "caution-light": { "value": "Primitive-Sun-50", "hex": "#FFE7E6", "usage": "エラー背景(薄)" },
26
+ "accent-primary": { "value": "Primitive-Orange-700", "hex": "#E04B00", "usage": "アクセント背景" },
27
+ "accent-primary-light": { "value": "Primitive-Orange-50", "hex": "#FFECD9", "usage": "アクセント背景(薄)" },
28
+ "success": { "value": "Primitive-Forest-600", "hex": "#259D63", "usage": "成功背景" },
29
+ "warning": { "value": "Primitive-Wood-50", "hex": "#F8F1E0", "usage": "警告背景" }
30
+ },
31
+ "text": {
32
+ "high-emphasis": { "value": "Primitive-Gray-900", "hex": "#1C1A1A", "usage": "本文テキスト" },
33
+ "medium-emphasis": { "value": "Primitive-Gray-700", "hex": "#575352", "usage": "補足テキスト" },
34
+ "low-emphasis": { "value": "Primitive-Gray-600", "hex": "#787675", "usage": "プレースホルダ" },
35
+ "disable": { "value": "Primitive-Gray-400", "hex": "#B7B5B4", "usage": "無効状態" },
36
+ "accent-primary": { "value": "Brand-Cake-Orange", "hex": "#E04B00", "usage": "アクセントテキスト" },
37
+ "on-inverse": { "value": "Primitive-White-alpha-1000", "hex": "#FFFFFF", "usage": "反転背景上の白文字" },
38
+ "success": { "value": "Primitive-Forest-600", "hex": "#259D63", "usage": "成功状態" },
39
+ "caution": { "value": "Primitive-Sun-800", "hex": "#EC0000", "usage": "エラー状態" },
40
+ "warning": { "value": "Primitive-Wood-800", "hex": "#C16800", "usage": "警告状態" }
41
+ },
42
+ "border": {
43
+ "high-emphasis": { "value": "Primitive-Gray-700", "hex": "#575352", "usage": "強調ボーダー" },
44
+ "medium-emphasis": { "value": "Primitive-Gray-300", "hex": "#DBD9D8", "usage": "標準ボーダー" },
45
+ "low-emphasis": { "value": "Primitive-Gray-50", "hex": "#FBF9F8", "usage": "薄いボーダー" },
46
+ "accent-primary": { "value": "Brand-Cake-Orange", "hex": "#E04B00", "usage": "アクセントボーダー" },
47
+ "caution": { "value": "Surface-Caution", "hex": "#EC0000", "usage": "エラーボーダー" }
48
+ },
49
+ "brand": {
50
+ "cake-orange": { "value": "Primitive-Orange-700", "hex": "#E04B00", "usage": "ブランドカラー" },
51
+ "cake-orange-light": { "value": "Primitive-Orange-100", "hex": "#FFD4B2", "usage": "ブランド薄色" },
52
+ "cake-orange-ultra-light": { "value": "Primitive-Orange-50", "hex": "#FFECD9", "usage": "ブランド最薄色" }
53
+ }
54
+ }
55
+ },
56
+
57
+ "typography": {
58
+ "heading": {
59
+ "3xl": { "fontSize": "28px", "lineHeight": 1.5, "letterSpacing": "0.04em", "fontWeight": 700, "usage": "ページタイトル" },
60
+ "2xl": { "fontSize": "24px", "lineHeight": 1.5, "letterSpacing": "0.04em", "fontWeight": 700, "usage": "主要セクション見出し" },
61
+ "xl": { "fontSize": "21px", "lineHeight": 1.5, "letterSpacing": "0.04em", "fontWeight": 700, "usage": "サブセクション見出し" },
62
+ "lg": { "fontSize": "18px", "lineHeight": 1.5, "letterSpacing": "0.04em", "fontWeight": 700, "usage": "グループ見出し" },
63
+ "md": { "fontSize": "16px", "lineHeight": 1.5, "letterSpacing": "0.04em", "fontWeight": 700, "usage": "小見出し" },
64
+ "sm": { "fontSize": "14px", "lineHeight": 1.5, "letterSpacing": "0.04em", "fontWeight": 700, "usage": "ラベル的見出し" }
65
+ },
66
+ "body": {
67
+ "lg": { "fontSize": "16px", "lineHeight": 1.75, "fontWeight": 400, "usage": "本文テキスト(大)" },
68
+ "md": { "fontSize": "14px", "lineHeight": 1.75, "fontWeight": 400, "usage": "本文テキスト(標準)" },
69
+ "sm": { "fontSize": "12px", "lineHeight": 1.5, "fontWeight": 400, "usage": "補足テキスト" },
70
+ "xs": { "fontSize": "10px", "lineHeight": 1.5, "fontWeight": 400, "usage": "最小テキスト" }
71
+ },
72
+ "label": {
73
+ "lg": { "fontSize": "16px", "lineHeight": 1.5, "letterSpacing": "0.04em", "fontWeight": 700, "usage": "ボタン大・CTA" },
74
+ "md": { "fontSize": "14px", "lineHeight": 1.5, "letterSpacing": "0.04em", "fontWeight": 700, "usage": "ボタン標準・ナビ" },
75
+ "sm": { "fontSize": "12px", "lineHeight": 1.5, "fontWeight": 500, "usage": "タグ・バッジ・メタ情報" },
76
+ "xs": { "fontSize": "10px", "lineHeight": 1.5, "fontWeight": 500, "usage": "小タグ・税表記" }
77
+ },
78
+ "cssClass": "typo-{category}-{size}",
79
+ "rules": [
80
+ "必ず typo-* クラスを使う。text-sm font-bold 等の個別指定は禁止",
81
+ "typo-* と text-*/font-*/leading-*/tracking-* を同一要素に混在させない",
82
+ "カラーは別途指定: className=\"typo-body-sm text-[var(--Text-Low-Emphasis)]\"",
83
+ "レスポンシブ対応可: md:typo-heading-xl",
84
+ "CVA 内でも typo-* を使用する"
85
+ ]
86
+ },
87
+
88
+ "spacing": {
89
+ "base": "4px",
90
+ "grid": "8px",
91
+ "scale": {
92
+ "0.5": { "px": 2, "usage": "密接した要素間" },
93
+ "1": { "px": 4, "usage": "アイコンとラベル間" },
94
+ "1.5": { "px": 6, "usage": "チップ間・タグ間" },
95
+ "2": { "px": 8, "usage": "標準要素間" },
96
+ "3": { "px": 12, "usage": "セクション内要素間" },
97
+ "4": { "px": 16, "usage": "セクション間" },
98
+ "6": { "px": 24, "usage": "ダイアログ内パディング" }
99
+ }
100
+ },
101
+
102
+ "touchTarget": {
103
+ "button-cta": { "min": "40px", "recommended": "48px" },
104
+ "icon-button": { "min": "40px", "recommended": "44px" },
105
+ "text-input": { "min": "44px", "recommended": "48px" },
106
+ "chip": { "min": "32px", "recommended": "36px" },
107
+ "dropdown-item": { "min": "36px", "recommended": "40px" },
108
+ "nav-item": { "min": "44px", "recommended": "48px" }
109
+ },
110
+
111
+ "radius": {
112
+ "sm": "calc(var(--radius) - 4px)",
113
+ "md": "calc(var(--radius) - 2px)",
114
+ "lg": "var(--radius)",
115
+ "xl": "calc(var(--radius) + 4px)",
116
+ "base": "0.625rem"
117
+ },
118
+
119
+ "shadow": {
120
+ "md": "0 2px 6px 0 rgba(0,0,0,0.08)",
121
+ "lg": "0 4px 12px 0 rgba(0,0,0,0.12)",
122
+ "menu": "0 4px 16px 0 rgba(0,0,0,0.12)",
123
+ "tooltip": "0 2px 8px 0 rgba(0,0,0,0.16)",
124
+ "dialog": "0 8px 24px 0 rgba(0,0,0,0.16)",
125
+ "modal": "0 16px 48px 0 rgba(0,0,0,0.24)"
126
+ }
127
+ }