@cakejp/design-system 0.11.0 → 0.12.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 (43) hide show
  1. package/CHANGELOG.md +42 -1
  2. package/CLAUDE.md +18 -1
  3. package/README.md +48 -0
  4. package/UPDATING.md +9 -0
  5. package/bin/check-duplicates.mjs +132 -0
  6. package/bin/init.js +8 -0
  7. package/contracts/components.json +175 -21
  8. package/contracts/rules.json +17 -1
  9. package/dist/index.css +1 -1
  10. package/dist/index.js +5266 -3354
  11. package/dist/types/components/ec/admin-shell.d.ts +10 -1
  12. package/dist/types/components/ec/mypage-shell.d.ts +10 -1
  13. package/dist/types/components/ec/product-card.d.ts +3 -1
  14. package/dist/types/components/ec/product-list-item.d.ts +8 -1
  15. package/dist/types/components/foundations/alert.d.ts +5 -1
  16. package/dist/types/components/foundations/button.d.ts +1 -1
  17. package/dist/types/components/foundations/card.d.ts +12 -2
  18. package/dist/types/components/foundations/chip-variants.d.ts +17 -0
  19. package/dist/types/components/foundations/field.d.ts +58 -0
  20. package/dist/types/components/foundations/file-input.d.ts +75 -0
  21. package/dist/types/components/foundations/icon-badge.d.ts +2 -2
  22. package/dist/types/components/foundations/input.d.ts +9 -1
  23. package/dist/types/components/foundations/radio-group.d.ts +12 -2
  24. package/dist/types/components/foundations/skip-link.d.ts +39 -0
  25. package/dist/types/components/foundations/textarea.d.ts +9 -1
  26. package/dist/types/components/primitives/chip.d.ts +2 -7
  27. package/dist/types/components/primitives/content-carousel.d.ts +52 -0
  28. package/dist/types/components/primitives/date-picker.d.ts +32 -0
  29. package/dist/types/components/primitives/error-state.d.ts +43 -16
  30. package/dist/types/components/primitives/funnel-shell.d.ts +10 -1
  31. package/dist/types/components/primitives/header.d.ts +15 -1
  32. package/dist/types/components/primitives/section-nav.d.ts +28 -2
  33. package/dist/types/components/primitives/share-buttons.d.ts +8 -2
  34. package/dist/types/components/primitives/standard-page-shell.d.ts +11 -1
  35. package/dist/types/components/primitives/workspace-shell.d.ts +19 -1
  36. package/dist/types/index.d.ts +66 -2
  37. package/package.json +1 -1
  38. package/src/preset-standalone.css +306 -4
  39. package/src/styles/semantic.css +7 -0
  40. package/src/styles/typography.css +8 -1
  41. package/templates/AGENTS.md +9 -0
  42. package/templates/CLAUDE.md +9 -0
  43. package/tokens.json +10 -1
@@ -26,11 +26,312 @@
26
26
  * 以下の「Typography Helper」セクションで提供する。
27
27
  * ============================================ */
28
28
 
29
- /* --- Layer 1: Primitive Colors --- */
30
- @import "./styles/primitive.css";
29
+ /* --- Layer 1: Primitive Colors ---
30
+ *
31
+ * 正本 src/styles/primitive.css のメインカラーファミリー(Orange/Gray/Forest/
32
+ * Sun/Teal/Sea/Wood/Berry/Black)は `@theme { ... }` ブロック内にあり、Tailwind CSS v4 の
33
+ * ビルド時変数解決に依存するため、Tailwind を通さない consumer(素の HTML + `<link>`)では
34
+ * ブロックごと無効な CSS として破棄され、`var(--Primitive-Gray-900)` 等が一切解決されない
35
+ * (`@import` するだけでは効かない。#113 と同根で、実機 Chromium で `getComputedStyle` を
36
+ * 検証して確認済み。primitive.css の alpha 変数は素の `:root` にあるので効いている)。
37
+ * そのため、primitive.css の全トークン(@theme のカラーファミリー全量 + :root の alpha 全量)を
38
+ * 素の `:root` として値ごと逐語展開している。
39
+ *
40
+ * primitive.css を変更した場合は、このブロックも合わせて更新すること
41
+ * (整合は __tests__/preset-standalone-coverage.test.ts でガードしている)。
42
+ */
43
+ :root {
44
+ /* Orange */
45
+ --Primitive-Orange-50: #FFECD9FF;
46
+ --Primitive-Orange-100: #FFD4B2FF;
47
+ --Primitive-Orange-200: #FFBA84FF;
48
+ --Primitive-Orange-300: #FFA66BFF;
49
+ --Primitive-Orange-400: #FF8E4CFF;
50
+ --Primitive-Orange-500: #F97732FF;
51
+ --Primitive-Orange-600: #F16311FF;
52
+ --Primitive-Orange-700: #E04B00FF; /* primary */
53
+ --Primitive-Orange-800: #BD3200FF;
54
+ --Primitive-Orange-900: #A62700FF;
55
+
56
+ /* Gray */
57
+ --Primitive-Gray-50: #FBF9F8FF;
58
+ --Primitive-Gray-100: #F4F2F1FF;
59
+ --Primitive-Gray-200: #EBE9E8FF;
60
+ --Primitive-Gray-300: #DBD9D8FF;
61
+ --Primitive-Gray-400: #B7B5B4FF;
62
+ --Primitive-Gray-500: #979594FF;
63
+ --Primitive-Gray-600: #787675FF;
64
+ --Primitive-Gray-700: #575352FF;
65
+ --Primitive-Gray-800: #3A3736FF;
66
+ --Primitive-Gray-900: #1C1A1AFF;
67
+
68
+ /* Forest */
69
+ --Primitive-Forest-50: #E6F5ECFF;
70
+ --Primitive-Forest-100: #C2E5D1FF;
71
+ --Primitive-Forest-200: #9BD4B5FF;
72
+ --Primitive-Forest-300: #71C598FF;
73
+ --Primitive-Forest-400: #51B883FF;
74
+ --Primitive-Forest-500: #2CAC6EFF;
75
+ --Primitive-Forest-600: #259D63FF;
76
+ --Primitive-Forest-700: #1D8B56FF;
77
+ --Primitive-Forest-800: #197A4BFF; /* primary */
78
+ --Primitive-Forest-900: #115A36FF;
79
+
80
+ /* Sun */
81
+ --Primitive-Sun-50: #FFE7E6FF;
82
+ --Primitive-Sun-100: #FFC8B8FF;
83
+ --Primitive-Sun-200: #FFA28BFF;
84
+ --Primitive-Sun-300: #FF7B5CFF;
85
+ --Primitive-Sun-400: #FF5838FF;
86
+ --Primitive-Sun-500: #FF4B36FF;
87
+ --Primitive-Sun-600: #FF220DFF;
88
+ --Primitive-Sun-700: #FA1606FF;
89
+ --Primitive-Sun-800: #EC0000FF; /* primary */
90
+ --Primitive-Sun-900: #D50000FF;
91
+
92
+ /* Teal */
93
+ --Primitive-Teal-50: #F0FCF8FF;
94
+ --Primitive-Teal-100: #D0F6E9FF;
95
+ --Primitive-Teal-200: #ACEED8FF;
96
+ --Primitive-Teal-300: #81E6C4FF;
97
+ --Primitive-Teal-400: #59D9AEFF;
98
+ --Primitive-Teal-500: #51C79FFF;
99
+ --Primitive-Teal-600: #49B18EFF;
100
+ --Primitive-Teal-700: #3E987AFF;
101
+ --Primitive-Teal-800: #317860FF; /* primary */
102
+ --Primitive-Teal-900: #1D4739FF;
103
+
104
+ /* Sea */
105
+ --Primitive-Sea-50: #E8F1FEFF;
106
+ --Primitive-Sea-100: #C5D7FBFF;
107
+ --Primitive-Sea-200: #9DB7F9FF;
108
+ --Primitive-Sea-300: #7096F8FF;
109
+ --Primitive-Sea-400: #4979F5FF;
110
+ --Primitive-Sea-500: #295FF3FF;
111
+ --Primitive-Sea-600: #003EE5FF; /* primary */
112
+ --Primitive-Sea-700: #0031D8FF;
113
+ --Primitive-Sea-800: #0024CEFF;
114
+ --Primitive-Sea-900: #0017B6FF;
115
+
116
+ /* Wood */
117
+ --Primitive-Wood-50: #F8F1E0FF;
118
+ --Primitive-Wood-100: #EFDBB1FF;
119
+ --Primitive-Wood-200: #E5C47FFF;
120
+ --Primitive-Wood-300: #DCAC4DFF;
121
+ --Primitive-Wood-400: #D69C2BFF;
122
+ --Primitive-Wood-500: #D18D0FFF;
123
+ --Primitive-Wood-600: #CD820AFF;
124
+ --Primitive-Wood-700: #C87504FF;
125
+ --Primitive-Wood-800: #C16800FF; /* primary */
126
+ --Primitive-Wood-900: #B65200FF;
127
+
128
+ /* Berry */
129
+ --Primitive-Berry-50: #FBD4E0FF;
130
+ --Primitive-Berry-100: #F7B1C8FF;
131
+ --Primitive-Berry-200: #F491B2FF;
132
+ --Primitive-Berry-300: #F1749EFF;
133
+ --Primitive-Berry-400: #EE598BFF;
134
+ --Primitive-Berry-500: #EC407AFF;
135
+ --Primitive-Berry-600: #EA296AFF;
136
+ --Primitive-Berry-700: #E5175CFF; /* primary */
137
+ --Primitive-Berry-800: #B5175CFF;
138
+ --Primitive-Berry-900: #9E103FFF;
139
+
140
+ /* Black */
141
+ --Primitive-Black-2-1000: #000000FF;
31
142
 
32
- /* --- Layer 2: Semantic Colors (+ dark mode) --- */
33
- @import "./styles/semantic.css";
143
+ /* Gray alpha */
144
+ --Primitive-Gray-alpha-50: #0000000D;
145
+ --Primitive-Gray-alpha-100: #0000001A;
146
+ --Primitive-Gray-alpha-200: #00000033;
147
+ --Primitive-Gray-alpha-300: #0000004D;
148
+ --Primitive-Gray-alpha-400: #00000066;
149
+ --Primitive-Gray-alpha-500: #00000080;
150
+ --Primitive-Gray-alpha-600: #00000099;
151
+ --Primitive-Gray-alpha-700: #000000B2;
152
+ --Primitive-Gray-alpha-800: #000000CC;
153
+ --Primitive-Gray-alpha-900: #000000E5;
154
+ --Primitive-Gray-alpha-1000: #000000FF;
155
+
156
+ /* White alpha */
157
+ --Primitive-White-alpha-50: #FFFFFF0D;
158
+ --Primitive-White-alpha-100: #FFFFFF1A;
159
+ --Primitive-White-alpha-200: #FFFFFF33;
160
+ --Primitive-White-alpha-300: #FFFFFF4D;
161
+ --Primitive-White-alpha-400: #FFFFFF66;
162
+ --Primitive-White-alpha-500: #FFFFFF80;
163
+ --Primitive-White-alpha-600: #FFFFFF99;
164
+ --Primitive-White-alpha-700: #FFFFFFB2;
165
+ --Primitive-White-alpha-800: #FFFFFFCC;
166
+ --Primitive-White-alpha-900: #FFFFFFE5;
167
+ --Primitive-White-alpha-1000: #FFFFFFFF;
168
+ }
169
+
170
+ /* --- Layer 2: Semantic Colors (+ dark mode) ---
171
+ *
172
+ * 正本 src/styles/semantic.css は `@theme inline` 構文(Tailwind CSS v4 の
173
+ * ビルド時変数解決に依存)のため、Tailwind を通さない consumer では
174
+ * ブロックごと無視され、CSS変数として一切展開されない(`@import` するだけでは効かない)。
175
+ * そのため、以下は semantic.css の light/dark 値を tokens.json の hex キャッシュ
176
+ * (および tokens.json 未収録グループは primitive 実値)まで解決し、
177
+ * 素の `:root` / `.dark` として展開したもの。
178
+ *
179
+ * 展開対象(全 76 semantic トークン名): Surface-* / Text-* / Object-* / Hover-* /
180
+ * Active-* / Border-* / Brand-* / Overlay-* / Surface-Glass-* / Caution-* /
181
+ * Focus-High-Emphasis / Third-Party-*。一覧・hex 整合は
182
+ * __tests__/preset-standalone-coverage.test.ts でガードしている。
183
+ *
184
+ * semantic.css を変更した場合は、この2ブロックも合わせて再生成すること
185
+ * (tokens.json の hex キャッシュ + src/styles/semantic.css の var() チェーンを
186
+ * 解決するスクリプトで手で写経せず生成し、貼り直す)。
187
+ */
188
+ :root {
189
+ --Surface-Primary: #FFFFFF;
190
+ --Surface-Secondary: #FBF9F8;
191
+ --Surface-Tertiary: #F4F2F1;
192
+ --Surface-Caution: #EC0000;
193
+ --Surface-Caution-Light: #FFE7E6;
194
+ --Surface-Accent-Primary: #E04B00;
195
+ --Surface-Accent-Primary-Light: #FFECD9;
196
+ --Surface-Success: #259D63;
197
+ --Surface-Warning: #F8F1E0;
198
+ --Surface-Info: #003EE5;
199
+ --Surface-Info-Light: #E8F1FE;
200
+ --Text-High-Emphasis: #1C1A1A;
201
+ --Text-Medium-Emphasis: #575352;
202
+ --Text-Low-Emphasis: #787675;
203
+ --Text-Disable: #B7B5B4;
204
+ --Text-Accent-Primary: #E04B00;
205
+ --Text-Accent-Secondary: #FFBA84;
206
+ --Text-on-Inverse: #FFFFFF;
207
+ --Text-Success: #259D63;
208
+ --Text-Caution: #EC0000;
209
+ --Text-Warning: #C16800;
210
+ --Text-Info: #003EE5;
211
+ --Object-Favorite: #E04B00;
212
+ --Object-Accent-Primary: #E04B00;
213
+ --Object-Accent-Primary-Light: #FFECD9;
214
+ --Object-High-Emphasis: #1C1A1A;
215
+ --Object-Medium-Emphasis: #575352;
216
+ --Object-Low-Emphasis: #787675;
217
+ --Object-Disable: #B7B5B4;
218
+ --Object-High-Emphasis-on-Inverse: #FFFFFF;
219
+ --Object-Caution: #EC0000;
220
+ --Object-Warning: #C16800;
221
+ --Object-Success: #259D63;
222
+ --Object-Info: #003EE5;
223
+ --Hover-Primary-Button: #BD3200;
224
+ --Hover-Secondary-Button: #FFD4B2;
225
+ --Hover-Tertiary-Button: #EBE9E8;
226
+ --Hover-Text-Button: #EBE9E8;
227
+ --Hover-Caution-Button: #FFC8B8;
228
+ --Active-Primary-Button: #BD3200;
229
+ --Active-Secondary-Button: #FFD4B2;
230
+ --Active-Tertiary-Button: #EBE9E8;
231
+ --Active-Text-Button: #F4F2F1;
232
+ --Active-Caution-Button: #FFC8B8;
233
+ --Border-High-Emphasis: #575352;
234
+ --Border-Medium-Emphasis: #DBD9D8;
235
+ --Border-Low-Emphasis: #FBF9F8;
236
+ --Border-Accent-Primary: #E04B00;
237
+ --Border-Favorite: #E04B00;
238
+ --Border-Caution: #EC0000;
239
+ --Border-Info: #003EE5;
240
+ --Brand-Cake-Orange: #E04B00;
241
+ --Brand-Cake-Orange-Light: #FFD4B2;
242
+ --Brand-Cake-Orange-Ultra-Light: #FFECD9;
243
+ --Overlay-Dark: #000000CC;
244
+ --Overlay-Medium: #00000099;
245
+ --Overlay-Light: #00000033;
246
+ --Overlay-Scrim: rgba(17, 17, 17, 0.28);
247
+ --Surface-Glass: #FFFFFFCC;
248
+ --Surface-Glass-Soft: rgba(255, 255, 255, 0.76);
249
+ --Surface-Glass-Faint: #FFFFFFB2;
250
+ --Surface-Brand-Ghost: rgba(255, 236, 217, 0.7);
251
+ --Surface-Overlay-Light: #FFFFFFCC;
252
+ --Surface-Overlay-Dark: #00000066;
253
+ --Border-Hairline: rgba(28, 26, 26, 0.08);
254
+ --Border-Brand-Subtle: rgba(224, 75, 0, 0.16);
255
+ --Caution-Base: #EC0000;
256
+ --Caution-Light: #FFA28B;
257
+ --Caution-Ultra-Light: #FFE7E6;
258
+ --Focus-High-Emphasis: #0C9E66;
259
+ --Third-Party-Youtube: #FF0000;
260
+ --Third-Party-Facebook: #1877F2;
261
+ --Third-Party-Twitter: #1DA1F2;
262
+ --Third-Party-Instagram-Pink: #F20076;
263
+ --Third-Party-Amazon: #FAD676;
264
+ --Third-Party-LINE: #06C755;
265
+ --Third-Party-Apple: #000000;
266
+ --Third-Party-X: #000000;
267
+ }
268
+
269
+ .dark {
270
+ --Surface-Primary: #000000E5;
271
+ --Surface-Secondary: #FFFFFF1A;
272
+ --Surface-Tertiary: #FFFFFF33;
273
+ --Surface-Caution: #EC0000;
274
+ --Surface-Caution-Light: #FFE7E6;
275
+ --Surface-Accent-Primary: #E04B00;
276
+ --Surface-Accent-Primary-Light: #E04B0026;
277
+ --Surface-Success: #259D63;
278
+ --Surface-Warning: #F8F1E0;
279
+ --Surface-Info: #003EE5;
280
+ --Surface-Info-Light: #E8F1FE;
281
+ --Text-High-Emphasis: #FFFFFF;
282
+ --Text-Medium-Emphasis: #FFFFFFCC;
283
+ --Text-Low-Emphasis: #FFFFFF99;
284
+ --Text-Disable: #FFFFFF4D;
285
+ --Text-Accent-Primary: #F16311;
286
+ --Text-Accent-Secondary: #FFD4B2;
287
+ --Text-on-Inverse: #FFFFFF;
288
+ --Text-Success: #259D63;
289
+ --Text-Caution: #FF5838;
290
+ --Text-Warning: #C16800;
291
+ --Text-Info: #4979F5;
292
+ --Object-Favorite: #F16311;
293
+ --Object-Accent-Primary: #F16311;
294
+ --Object-Accent-Primary-Light: #FFECD9;
295
+ --Object-High-Emphasis: #FFFFFF;
296
+ --Object-Medium-Emphasis: #FFFFFFCC;
297
+ --Object-Low-Emphasis: #FFFFFF99;
298
+ --Object-Disable: #FFFFFF66;
299
+ --Object-High-Emphasis-on-Inverse: #FFFFFF;
300
+ --Object-Caution: #FFA28B;
301
+ --Object-Warning: #C16800;
302
+ --Object-Success: #259D63;
303
+ --Object-Info: #4979F5;
304
+ --Hover-Primary-Button: #BD3200;
305
+ --Hover-Secondary-Button: #FFFFFF1A;
306
+ --Hover-Tertiary-Button: #FFFFFF0D;
307
+ --Hover-Text-Button: #FFFFFF33;
308
+ --Hover-Caution-Button: #FFE7E6;
309
+ --Active-Primary-Button: #BD3200;
310
+ --Active-Secondary-Button: #FFFFFF1A;
311
+ --Active-Tertiary-Button: #FFFFFF0D;
312
+ --Active-Text-Button: #FFFFFF1A;
313
+ --Active-Caution-Button: #FFE7E6;
314
+ --Border-High-Emphasis: #FFFFFF80;
315
+ --Border-Medium-Emphasis: #FFFFFF33;
316
+ --Border-Low-Emphasis: #FFFFFF0D;
317
+ --Border-Accent-Primary: #F16311;
318
+ --Border-Favorite: #F16311;
319
+ --Border-Caution: #EC0000;
320
+ --Border-Info: #4979F5;
321
+ --Brand-Cake-Orange: #E04B00;
322
+ --Brand-Cake-Orange-Light: #FFD4B2;
323
+ --Brand-Cake-Orange-Ultra-Light: #FFECD9;
324
+ --Overlay-Dark: #FFFFFF4D;
325
+ --Overlay-Medium: #FFFFFF33;
326
+ --Overlay-Light: #FFFFFF1A;
327
+ --Overlay-Scrim: rgba(0, 0, 0, 0.48);
328
+ --Surface-Glass: #FFFFFF1A;
329
+ --Surface-Glass-Soft: #FFFFFF1A;
330
+ --Surface-Glass-Faint: #FFFFFF0D;
331
+ --Surface-Brand-Ghost: rgba(224, 75, 0, 0.12);
332
+ --Border-Hairline: #FFFFFF1A;
333
+ --Border-Brand-Subtle: rgba(224, 75, 0, 0.24);
334
+ }
34
335
 
35
336
  /* --- Bridge: Semantic → shadcn tokens --- */
36
337
  :root {
@@ -104,6 +405,7 @@
104
405
  */
105
406
 
106
407
  /* Heading */
408
+ .typo-heading-4xl { font-size: 32px; line-height: 1.4; letter-spacing: 0.04em; font-weight: 700; }
107
409
  .typo-heading-3xl { font-size: 28px; line-height: 1.5; letter-spacing: 0.04em; font-weight: 700; }
108
410
  .typo-heading-2xl { font-size: 24px; line-height: 1.5; letter-spacing: 0.04em; font-weight: 700; }
109
411
  .typo-heading-xl { font-size: 21px; line-height: 1.5; letter-spacing: 0.04em; font-weight: 700; }
@@ -90,6 +90,13 @@
90
90
  --Surface-Glass-Faint: var(--Primitive-White-alpha-700); /* rgba(255,255,255,0.698≈0.7) */
91
91
  --Surface-Brand-Ghost: rgba(255, 236, 217, 0.7); /* Orange-50 at 70%。閉じるボタン等 */
92
92
 
93
+ /* Overlay surfaces(画像・メディアの上に載せる半透過サーフェス)
94
+ * Surface-Glass と同じ半透過白でも用途を分けて命名: こちらは「画像上のボタン/ピル下地」専用。
95
+ * メディアの上に載るため、可読性を保つ目的で light/dark で切替えない(下は :root のみで .dark 上書きなし)。
96
+ * Button variant="overlay" / カルーセル矢印系の意匠に接続する。 */
97
+ --Surface-Overlay-Light: var(--Primitive-White-alpha-800); /* rgba(255,255,255,0.8) 半透過白の下地 */
98
+ --Surface-Overlay-Dark: var(--Primitive-Gray-alpha-400); /* rgba(0,0,0,0.4) 半透過黒の下地 */
99
+
93
100
  /* Border alphas */
94
101
  --Border-Hairline: rgba(28, 26, 26, 0.08); /* Gray-900 8%。微細ボーダー */
95
102
  --Border-Brand-Subtle: rgba(224, 75, 0, 0.16); /* Brand-Orange 16%。SNSリンクボーダー等 */
@@ -8,7 +8,7 @@
8
8
  *
9
9
  * 命名規則: typo-{category}-{size}
10
10
  * category: heading | body | label
11
- * size: 3xl | 2xl | xl | lg | md | sm | xs
11
+ * size: 4xl | 3xl | 2xl | xl | lg | md | sm | xs
12
12
  *
13
13
  * ── 使い分けガイド ──
14
14
  *
@@ -32,6 +32,13 @@
32
32
 
33
33
  /* ─── Heading ─── */
34
34
 
35
+ @utility typo-heading-4xl {
36
+ font-size: 2rem; /* 32px */
37
+ line-height: 1.4; /* 44.8px */
38
+ letter-spacing: 0.04em;
39
+ font-weight: 700;
40
+ }
41
+
35
42
  @utility typo-heading-3xl {
36
43
  font-size: 1.75rem; /* 28px */
37
44
  line-height: 1.5; /* 42px */
@@ -32,6 +32,15 @@ Codex(および他の AI エージェント)は UI 作業を始める前に
32
32
 
33
33
  DS に該当パターンが無い場合のみカスタム実装を許可。その場合は**必ずコメントで理由を記載**すること。
34
34
 
35
+ ## ❓「DS に無い」と思ったときのゲート(ローカル台帳禁止・issue 直行)
36
+
37
+ 部品が DS に無いと思っても、**手元の台帳・TODO リストで「昇格候補」を管理しないこと**。台帳は必ず drift する(実例: cake-api の昇格候補台帳が DS 0.10.0 で追加された `ImageUploader` / `ResponsiveDialog` / `DataTable` 等を反映せず、既に DS にある部品を「無い」と誤認してローカル実装を保持し続けた)。次の順で確認する:
38
+
39
+ 1. `node_modules/@cakejp/design-system/contracts/components.json` を名前で検索する(正典はここ)。
40
+ 2. `npx cakejp-ds check-duplicates` を実行し、ローカルに DS 同名の実装が無いか機械検出する(`--strict` で検出時 exit 1、CI に組み込める)。
41
+ 3. それでも無ければ、手元に台帳を作らず **flashpark/cake-design-system に issue を立てる**。
42
+ 4. やむを得ずローカル実装する場合は、「DS に X が追加されたら削除」の条件コメントを必ず添える。
43
+
35
44
  ## 使用方法
36
45
 
37
46
  ### CSS のセットアップ(重要)
@@ -34,6 +34,15 @@ Codex(および他の AI エージェント)は UI 作業を始める前に
34
34
 
35
35
  DS に該当パターンが無い場合のみカスタム実装を許可。その場合は**必ずコメントで理由を記載**すること。
36
36
 
37
+ ## ❓「DS に無い」と思ったときのゲート(ローカル台帳禁止・issue 直行)
38
+
39
+ 部品が DS に無いと思っても、**手元の台帳・TODO リストで「昇格候補」を管理しないこと**。台帳は必ず drift する(実例: cake-api の昇格候補台帳が DS 0.10.0 で追加された `ImageUploader` / `ResponsiveDialog` / `DataTable` 等を反映せず、既に DS にある部品を「無い」と誤認してローカル実装を保持し続けた)。次の順で確認する:
40
+
41
+ 1. `node_modules/@cakejp/design-system/contracts/components.json` を名前で検索する(正典はここ)。
42
+ 2. `npx cakejp-ds check-duplicates` を実行し、ローカルに DS 同名の実装が無いか機械検出する(`--strict` で検出時 exit 1、CI に組み込める)。
43
+ 3. それでも無ければ、手元に台帳を作らず **flashpark/cake-design-system に issue を立てる**。
44
+ 4. やむを得ずローカル実装する場合は、「DS に X が追加されたら削除」の条件コメントを必ず添える。
45
+
37
46
  ## 使用方法
38
47
 
39
48
  ### CSS のセットアップ(重要)
package/tokens.json CHANGED
@@ -26,7 +26,9 @@
26
26
  "accent-primary": { "value": "Primitive-Orange-700", "hex": "#E04B00", "usage": "アクセント背景" },
27
27
  "accent-primary-light": { "value": "Primitive-Orange-50", "hex": "#FFECD9", "usage": "アクセント背景(薄)" },
28
28
  "success": { "value": "Primitive-Forest-600", "hex": "#259D63", "usage": "成功背景" },
29
- "warning": { "value": "Primitive-Wood-50", "hex": "#F8F1E0", "usage": "警告背景" }
29
+ "warning": { "value": "Primitive-Wood-50", "hex": "#F8F1E0", "usage": "警告背景" },
30
+ "overlay-light": { "value": "Primitive-White-alpha-800", "hex": "#FFFFFFCC", "usage": "画像上の半透過白サーフェス(Button overlay / カルーセル矢印)" },
31
+ "overlay-dark": { "value": "Primitive-Gray-alpha-400", "hex": "#00000066", "usage": "画像上の半透過黒サーフェス" }
30
32
  },
31
33
  "text": {
32
34
  "high-emphasis": { "value": "Primitive-Gray-900", "hex": "#1C1A1A", "usage": "本文テキスト" },
@@ -56,6 +58,13 @@
56
58
 
57
59
  "typography": {
58
60
  "heading": {
61
+ "4xl": {
62
+ "fontSize": "32px",
63
+ "lineHeight": 1.4,
64
+ "letterSpacing": "0.04em",
65
+ "fontWeight": 700,
66
+ "usage": "ヒーロー・ページ大見出し"
67
+ },
59
68
  "3xl": { "fontSize": "28px", "lineHeight": 1.5, "letterSpacing": "0.04em", "fontWeight": 700, "usage": "ページタイトル" },
60
69
  "2xl": { "fontSize": "24px", "lineHeight": 1.5, "letterSpacing": "0.04em", "fontWeight": 700, "usage": "主要セクション見出し" },
61
70
  "xl": { "fontSize": "21px", "lineHeight": 1.5, "letterSpacing": "0.04em", "fontWeight": 700, "usage": "サブセクション見出し" },