@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
@@ -1,83 +1,105 @@
1
1
  "use client";
2
- import { jsxs as V, jsx as r } from "react/jsx-runtime";
2
+ import { jsx as r, jsxs as q } from "react/jsx-runtime";
3
3
  import * as l from "react";
4
- import J from "iconsax-reactjs/dist/esm/Add.js";
5
- import Q from "iconsax-reactjs/dist/esm/Minus.js";
6
- import q from "iconsax-reactjs/dist/esm/Trash.js";
4
+ import W from "iconsax-reactjs/dist/esm/Add.js";
5
+ import X from "iconsax-reactjs/dist/esm/Minus.js";
6
+ import Y from "iconsax-reactjs/dist/esm/Trash.js";
7
7
  import { cn as n } from "../../lib/utils.js";
8
8
  import { FOCUS_RING as c } from "../../lib/focus-ring.js";
9
- import { HIGH_CONTRAST_OUTLINE as le } from "../../lib/high-contrast.js";
10
- import { useFieldLabelling as ce, mergeIdRefs as ue } from "../../lib/field-labelling.js";
11
- function de({
9
+ import { HIGH_CONTRAST_OUTLINE as ge } from "../../lib/high-contrast.js";
10
+ import { useFieldLabelling as ye, mergeIdRefs as xe } from "../../lib/field-labelling.js";
11
+ function Ne({
12
12
  className: D,
13
- value: M,
14
- defaultValue: W,
13
+ value: O,
14
+ defaultValue: Z,
15
15
  min: u = 1,
16
- max: S = 99,
17
- step: O = 1,
18
- onChange: X,
16
+ max: I = 99,
17
+ step: H = 1,
18
+ onChange: ee,
19
19
  disabled: a = !1,
20
- error: Y,
21
- size: Z = "md",
22
- editable: h = !0,
23
- showTrash: ee = !1,
24
- onDelete: re,
25
- formatOptions: I,
26
- locale: te = "ja-JP",
27
- inputId: ae,
28
- label: H,
20
+ error: re,
21
+ size: te = "md",
22
+ editable: d = !0,
23
+ showTrash: ae = !1,
24
+ onDelete: ne,
25
+ formatOptions: p,
26
+ locale: ie = "ja-JP",
27
+ inputId: oe,
28
+ name: S,
29
+ inputRef: se,
30
+ inputProps: B,
31
+ label: M,
29
32
  ...z
30
33
  }) {
31
- const p = H ?? "数量", o = ce(), ne = l.useId(), s = H === void 0 ? o?.labelId : void 0, f = Y ?? !!o?.errorId, $ = s ? { "aria-labelledby": s } : { "aria-label": p }, L = ae ?? o?.controlId, A = {
32
- ...s ? { "aria-labelledby": s } : { "aria-label": `${p}を入力` },
33
- "aria-describedby": o ? ue(o.descriptionId, o.errorId) : void 0,
34
+ const h = M ?? "数量", o = ye(), le = l.useId(), s = M === void 0 ? o?.labelId : void 0, f = re ?? !!o?.errorId, $ = s ? { "aria-labelledby": s } : { "aria-label": h }, ce = oe ?? o?.controlId, F = {
35
+ ...s ? { "aria-labelledby": s } : { "aria-label": `${h}を入力` },
36
+ "aria-describedby": o ? xe(o.descriptionId, o.errorId) : void 0,
34
37
  "aria-invalid": f || void 0
35
- }, B = (e, i, se) => {
36
- if (!s) return { "aria-label": se };
37
- const G = `${ne}-${e}`;
38
- return { id: G, "aria-label": i, "aria-labelledby": `${s} ${G}` };
39
- }, F = M !== void 0, P = l.useCallback(
40
- (e) => Math.min(S, Math.max(u, e)),
41
- [u, S]
42
- ), [ie, oe] = l.useState(() => P(W ?? u)), t = F ? M : ie, [E, N] = l.useState(!1), [T, d] = l.useState(String(t)), m = ee && t <= u, v = t > u && !a, b = t < S && !a, g = m && !a, R = m ? B("decrement", "削除", "削除") : B("decrement", "減らす", `${p}を減らす`), K = B("increment", "増やす", `${p}を増やす`), y = (e) => a ? { disabled: !0 } : { "aria-disabled": e ? void 0 : !0 };
38
+ }, E = (e, i, fe) => {
39
+ if (!s) return { "aria-label": fe };
40
+ const Q = `${le}-${e}`;
41
+ return { id: Q, "aria-label": i, "aria-labelledby": `${s} ${Q}` };
42
+ }, L = O !== void 0, P = l.useCallback(
43
+ (e) => Math.min(I, Math.max(u, e)),
44
+ [u, I]
45
+ ), [ue, de] = l.useState(() => P(Z ?? u)), t = L ? O : ue, [T, A] = l.useState(!1), [k, g] = l.useState(String(t)), m = ae && t <= u, v = t > u && !a, b = t < I && !a, y = m && !a, R = m ? E("decrement", "削除", "削除") : E("decrement", "減らす", `${h}を減らす`), K = E("increment", "増やす", `${h}を増やす`), x = (e) => a ? { disabled: !0 } : { "aria-disabled": e ? void 0 : !0 };
43
46
  l.useEffect(() => {
44
- E || d(String(t));
45
- }, [t, E]);
46
- const k = (e) => {
47
+ T || g(String(t));
48
+ }, [t, T]);
49
+ const j = (e) => {
47
50
  const i = P(e);
48
- F || oe(i), d(String(i)), X?.(i);
49
- }, j = () => {
51
+ L || de(i), g(String(i)), ee?.(i);
52
+ }, w = () => {
50
53
  if (m) {
51
- re?.();
54
+ ne?.();
52
55
  return;
53
56
  }
54
- v && k(t - O);
55
- }, w = () => {
56
- b && k(t + O);
57
- }, U = (e) => {
58
- const i = e.target.value;
59
- (i === "" || /^-?\d*$/.test(i)) && d(i);
57
+ v && j(t - H);
60
58
  }, C = () => {
61
- const e = parseInt(T, 10);
62
- k(Number.isNaN(e) ? t : e), N(!1);
63
- }, _ = (e) => {
64
- if (e.key === "Enter") {
65
- C();
66
- return;
59
+ b && j(t + H);
60
+ }, me = (e) => {
61
+ const i = e.target.value;
62
+ (i === "" || /^-?\d*$/.test(i)) && g(i);
63
+ }, U = () => {
64
+ const e = parseInt(k, 10);
65
+ j(Number.isNaN(e) ? t : e), A(!1);
66
+ }, ve = (e) => {
67
+ if (B?.onKeyDown?.(e), !e.defaultPrevented) {
68
+ if (e.key === "Enter") {
69
+ U();
70
+ return;
71
+ }
72
+ e.key === "ArrowUp" && (e.preventDefault(), C()), e.key === "ArrowDown" && (e.preventDefault(), w());
67
73
  }
68
- e.key === "ArrowUp" && (e.preventDefault(), w()), e.key === "ArrowDown" && (e.preventDefault(), j());
69
- }, x = E ? T : I ? new Intl.NumberFormat(te, I).format(t).replace(/¥/g, "¥") : T;
70
- return Z === "sm" ? /* @__PURE__ */ V(
74
+ }, { onFocus: be, onBlur: pe, className: V, ...he } = B ?? {}, _ = d && !p ? S : void 0, G = S !== void 0 && _ === void 0 ? /* @__PURE__ */ r("input", { type: "hidden", name: S, value: t, disabled: a, form: B?.form }) : null, J = {
75
+ ...he,
76
+ ref: se,
77
+ name: _,
78
+ type: "text",
79
+ inputMode: "numeric",
80
+ pattern: "[0-9]*",
81
+ id: ce,
82
+ onFocus: (e) => {
83
+ A(!0), g(String(t)), be?.(e);
84
+ },
85
+ onChange: me,
86
+ onBlur: (e) => {
87
+ U(), pe?.(e);
88
+ },
89
+ onKeyDown: ve,
90
+ disabled: a
91
+ }, N = T ? k : p ? new Intl.NumberFormat(ie, p).format(t).replace(/¥/g, "¥") : k;
92
+ return te === "sm" ? /* @__PURE__ */ q(
71
93
  "div",
72
94
  {
73
95
  "data-slot": "number-input",
74
- "data-editable": h || void 0,
96
+ "data-editable": d || void 0,
75
97
  className: n(
76
98
  // px-1(4px)は上下の余白((36-28)/2 = 4px)と揃える値。
77
99
  // ホバー時の円が外枠に対して上下左右とも同じ内側余白で収まる
78
100
  // shrink-0 必須: カート行など flex row の子として置かれるため、既定の flex-shrink:1 だと 108px が潰れる
79
- "inline-flex h-9 w-[108px] shrink-0 items-center justify-between rounded-full bg-[var(--Surface-Tertiary)] px-1",
80
- le,
101
+ "inline-flex h-9 w-[108px] shrink-0 items-center justify-between rounded-full bg-[var(--Surface-Neutral-Tertiary)] px-1",
102
+ ge,
81
103
  f && "ring-2 ring-[var(--Surface-Caution)]",
82
104
  a && "cursor-not-allowed",
83
105
  D
@@ -93,36 +115,27 @@ function de({
93
115
  className: n(
94
116
  "flex size-7 shrink-0 items-center justify-center rounded-full transition-colors outline-none",
95
117
  c,
96
- v || g ? "text-[var(--Object-High-Emphasis)] hover:bg-[var(--Overlay-Light)] active:bg-[var(--Overlay-Medium)]" : "text-[var(--Object-Disable)]"
118
+ v || y ? "text-[var(--Object-High-Emphasis)] hover:bg-[var(--Overlay-Light)] active:bg-[var(--Overlay-Medium)]" : "text-[var(--Object-Disable)]"
97
119
  ),
98
- onClick: j,
99
- ...y(v || g),
120
+ onClick: w,
121
+ ...x(v || y),
100
122
  ...R,
101
- children: m ? /* @__PURE__ */ r(q, { size: 14 }) : /* @__PURE__ */ r(Q, { size: 14 })
123
+ children: m ? /* @__PURE__ */ r(Y, { size: 14 }) : /* @__PURE__ */ r(X, { size: 14 })
102
124
  }
103
125
  ),
104
- h ? /* @__PURE__ */ r(
126
+ d ? /* @__PURE__ */ r(
105
127
  "input",
106
128
  {
107
- type: "text",
108
- inputMode: "numeric",
109
- pattern: "[0-9]*",
110
- id: L,
111
- value: x,
112
- onFocus: () => {
113
- N(!0), d(String(t));
114
- },
115
- onChange: U,
116
- onBlur: C,
117
- onKeyDown: _,
118
- disabled: a,
129
+ ...J,
130
+ value: N,
119
131
  className: n(
120
132
  "w-7 shrink-0 rounded bg-transparent text-center typo-label-md outline-none transition-colors",
121
133
  "hover:bg-[var(--Overlay-Light)] focus-visible:bg-[var(--Surface-Primary)]",
122
134
  c,
123
- a ? "text-[var(--Text-Disable)]" : "text-[var(--Text-High-Emphasis)]"
135
+ a ? "text-[var(--Text-Disable)]" : "text-[var(--Text-High-Emphasis)]",
136
+ V
124
137
  ),
125
- ...A,
138
+ ...F,
126
139
  "aria-live": "polite"
127
140
  }
128
141
  ) : /* @__PURE__ */ r(
@@ -134,7 +147,7 @@ function de({
134
147
  ),
135
148
  "aria-live": "polite",
136
149
  "aria-atomic": "true",
137
- children: x
150
+ children: N
138
151
  }
139
152
  ),
140
153
  /* @__PURE__ */ r(
@@ -146,19 +159,20 @@ function de({
146
159
  c,
147
160
  b ? "text-[var(--Object-High-Emphasis)] hover:bg-[var(--Overlay-Light)] active:bg-[var(--Overlay-Medium)]" : "text-[var(--Object-Disable)]"
148
161
  ),
149
- onClick: w,
150
- ...y(b),
162
+ onClick: C,
163
+ ...x(b),
151
164
  ...K,
152
- children: /* @__PURE__ */ r(J, { size: 14 })
165
+ children: /* @__PURE__ */ r(W, { size: 14 })
153
166
  }
154
- )
167
+ ),
168
+ G
155
169
  ]
156
170
  }
157
- ) : /* @__PURE__ */ V(
171
+ ) : /* @__PURE__ */ q(
158
172
  "div",
159
173
  {
160
174
  "data-slot": "number-input",
161
- "data-editable": h || void 0,
175
+ "data-editable": d || void 0,
162
176
  className: n("inline-flex shrink-0 items-center gap-3", D),
163
177
  role: "group",
164
178
  ...$,
@@ -171,40 +185,31 @@ function de({
171
185
  className: n(
172
186
  "flex size-10 shrink-0 items-center justify-center rounded-full border transition-colors outline-none",
173
187
  c,
174
- v || g ? "border-[var(--Border-Control,var(--Border-Medium-Emphasis))] bg-[var(--Surface-Primary)] text-[var(--Object-High-Emphasis)] hover:border-[var(--Border-High-Emphasis)] hover:bg-[var(--Surface-Tertiary)] active:bg-[var(--Surface-Tertiary)]" : "border-[var(--Border-Medium-Emphasis)] bg-[var(--Surface-Primary)] text-[var(--Object-Disable)]"
188
+ v || y ? "border-[var(--Border-Control,var(--Border-Medium-Emphasis))] bg-[var(--Surface-Primary)] text-[var(--Object-High-Emphasis)] hover:border-[var(--Border-High-Emphasis)] hover:bg-[var(--Surface-Neutral-Tertiary)] active:bg-[var(--Surface-Neutral-Tertiary)]" : "border-[var(--Border-Medium-Emphasis)] bg-[var(--Surface-Primary)] text-[var(--Object-Disable)]"
175
189
  ),
176
- onClick: j,
177
- ...y(v || g),
190
+ onClick: w,
191
+ ...x(v || y),
178
192
  ...R,
179
- children: m ? /* @__PURE__ */ r(q, { size: 18 }) : /* @__PURE__ */ r(Q, { size: 18 })
193
+ children: m ? /* @__PURE__ */ r(Y, { size: 18 }) : /* @__PURE__ */ r(X, { size: 18 })
180
194
  }
181
195
  ),
182
- h ? /* @__PURE__ */ r(
196
+ d ? /* @__PURE__ */ r(
183
197
  "input",
184
198
  {
185
- type: "text",
186
- inputMode: "numeric",
187
- pattern: "[0-9]*",
188
- id: L,
189
- value: x,
190
- onFocus: () => {
191
- N(!0), d(String(t));
192
- },
193
- onChange: U,
194
- onBlur: C,
195
- onKeyDown: _,
196
- disabled: a,
199
+ ...J,
200
+ value: N,
197
201
  className: n(
198
202
  // formatOptions で桁が増えるため、内容に応じて広がるよう min-w にしている
199
203
  "h-10 shrink-0 rounded-lg border text-center typo-label-lg outline-none transition-colors",
200
204
  // 既定は Figma 準拠の固定幅。桁区切り・通貨表示のときだけ内容に追従させる
201
205
  // (input は size 属性由来の既定幅を持つため、w-12 を外すと 200px 超に広がる)
202
- I ? "field-sizing-content min-w-12 max-w-40 px-2" : "w-12",
206
+ p ? "field-sizing-content min-w-12 max-w-40 px-2" : "w-12",
203
207
  f ? "border-[var(--Border-Caution)]" : "border-[var(--Border-Control,var(--Border-Medium-Emphasis))] hover:border-[var(--Border-High-Emphasis)]",
204
208
  c,
205
- a ? "bg-[var(--Surface-Tertiary)] text-[var(--Text-Disable)]" : "bg-[var(--Surface-Secondary)] text-[var(--Text-High-Emphasis)]"
209
+ a ? "bg-[var(--Surface-Neutral-Tertiary)] text-[var(--Text-Disable)]" : "bg-[var(--Surface-Neutral-Secondary)] text-[var(--Text-High-Emphasis)]",
210
+ V
206
211
  ),
207
- ...A,
212
+ ...F,
208
213
  "aria-live": "polite"
209
214
  }
210
215
  ) : /* @__PURE__ */ r(
@@ -214,11 +219,11 @@ function de({
214
219
  // span は内容幅なので min-w-12 で Figma の 48px を下限にする
215
220
  "flex h-10 min-w-12 shrink-0 items-center justify-center rounded-lg border px-2 text-center typo-label-lg",
216
221
  f ? "border-[var(--Border-Caution)]" : "border-[var(--Border-Control,var(--Border-Medium-Emphasis))]",
217
- a ? "bg-[var(--Surface-Tertiary)] text-[var(--Text-Disable)]" : "bg-[var(--Surface-Secondary)] text-[var(--Text-High-Emphasis)]"
222
+ a ? "bg-[var(--Surface-Neutral-Tertiary)] text-[var(--Text-Disable)]" : "bg-[var(--Surface-Neutral-Secondary)] text-[var(--Text-High-Emphasis)]"
218
223
  ),
219
224
  "aria-live": "polite",
220
225
  "aria-atomic": "true",
221
- children: x
226
+ children: N
222
227
  }
223
228
  ),
224
229
  /* @__PURE__ */ r(
@@ -228,20 +233,21 @@ function de({
228
233
  className: n(
229
234
  "flex size-10 shrink-0 items-center justify-center rounded-full border transition-colors outline-none",
230
235
  c,
231
- b ? "border-[var(--Border-Control,var(--Border-Medium-Emphasis))] bg-[var(--Surface-Primary)] text-[var(--Object-High-Emphasis)] hover:border-[var(--Border-High-Emphasis)] hover:bg-[var(--Surface-Tertiary)] active:bg-[var(--Surface-Tertiary)]" : "border-[var(--Border-Medium-Emphasis)] bg-[var(--Surface-Primary)] text-[var(--Object-Disable)]"
236
+ b ? "border-[var(--Border-Control,var(--Border-Medium-Emphasis))] bg-[var(--Surface-Primary)] text-[var(--Object-High-Emphasis)] hover:border-[var(--Border-High-Emphasis)] hover:bg-[var(--Surface-Neutral-Tertiary)] active:bg-[var(--Surface-Neutral-Tertiary)]" : "border-[var(--Border-Medium-Emphasis)] bg-[var(--Surface-Primary)] text-[var(--Object-Disable)]"
232
237
  ),
233
- onClick: w,
234
- ...y(b),
238
+ onClick: C,
239
+ ...x(b),
235
240
  ...K,
236
- children: /* @__PURE__ */ r(J, { size: 18 })
241
+ children: /* @__PURE__ */ r(W, { size: 18 })
237
242
  }
238
- )
243
+ ),
244
+ G
239
245
  ]
240
246
  }
241
247
  );
242
248
  }
243
- const xe = de;
249
+ const Ce = Ne;
244
250
  export {
245
- de as NumberInput,
246
- xe as QuantitySelector
251
+ Ne as NumberInput,
252
+ Ce as QuantitySelector
247
253
  };
@@ -2,7 +2,7 @@ import { jsx as e, jsxs as m } from "react/jsx-runtime";
2
2
  import "react";
3
3
  import { Check as p } from "lucide-react";
4
4
  import { cn as s } from "../../lib/utils.js";
5
- function b({
5
+ function N({
6
6
  className: d,
7
7
  steps: a,
8
8
  currentStep: i,
@@ -26,7 +26,7 @@ function b({
26
26
  {
27
27
  className: s(
28
28
  "flex size-7 items-center justify-center rounded-full typo-label-sm transition-colors",
29
- o ? "bg-[var(--Brand-Cake-Orange)] text-[var(--Text-on-Inverse)]" : "bg-[var(--Surface-Tertiary)] text-[var(--Text-Low-Emphasis)]"
29
+ o ? "bg-[var(--Brand-Cake-Orange)] text-[var(--Text-on-Inverse)]" : "bg-[var(--Surface-Neutral-Tertiary)] text-[var(--Text-Low-Emphasis)]"
30
30
  ),
31
31
  "aria-current": n ? "step" : void 0,
32
32
  children: x && t ? /* @__PURE__ */ e(p, { className: "size-4 shrink-0" }) : r + 1
@@ -58,5 +58,5 @@ function b({
58
58
  );
59
59
  }
60
60
  export {
61
- b as ProgressSteps
61
+ N as ProgressSteps
62
62
  };
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { jsxs as N, Fragment as S, jsx as o } from "react/jsx-runtime";
2
+ import { jsxs as g, Fragment as S, jsx as o } from "react/jsx-runtime";
3
3
  import * as s from "react";
4
4
  import E from "iconsax-reactjs/dist/esm/SearchNormal1.js";
5
5
  import { cn as i } from "../../lib/utils.js";
@@ -28,7 +28,7 @@ const B = s.forwardRef(
28
28
  )));
29
29
  }, w = (r) => {
30
30
  r.key === "Enter" && !t && h(), d.onKeyDown?.(r);
31
- }, g = (r) => {
31
+ }, N = (r) => {
32
32
  const b = n.current?.value ?? "";
33
33
  if (!b.trim()) {
34
34
  r.preventDefault();
@@ -36,14 +36,14 @@ const B = s.forwardRef(
36
36
  }
37
37
  l?.(b);
38
38
  }, f = i(
39
- "group flex items-center overflow-hidden rounded-lg border border-[var(--Border-Control,var(--Border-Medium-Emphasis))] bg-[var(--Surface-Secondary)] transition-colors",
39
+ "group flex items-center overflow-hidden rounded-lg border border-[var(--Border-Control,var(--Border-Medium-Emphasis))] bg-[var(--Surface-Neutral-Secondary)] transition-colors",
40
40
  // Tailwind の variant 順では focus-within が hover より先に出力される
41
41
  // = hover が後勝ちしてフォーカス枠を潰すため、hover 側を明示的に抑制する。
42
42
  "hover:not-focus-within:border-[var(--Border-High-Emphasis)]",
43
43
  R,
44
44
  a === "sm" ? "h-9" : "h-11",
45
45
  v
46
- ), p = /* @__PURE__ */ N(S, { children: [
46
+ ), p = /* @__PURE__ */ g(S, { children: [
47
47
  /* @__PURE__ */ o(
48
48
  "input",
49
49
  {
@@ -65,7 +65,7 @@ const B = s.forwardRef(
65
65
  {
66
66
  type: t ? "submit" : "button",
67
67
  className: i(
68
- "flex shrink-0 items-center justify-center border-l border-[var(--Border-Control,var(--Border-Medium-Emphasis))] text-[var(--Text-Low-Emphasis)] transition-colors outline-none hover:bg-[var(--Surface-Tertiary)] hover:text-[var(--Text-High-Emphasis)]",
68
+ "flex shrink-0 items-center justify-center border-l border-[var(--Border-Control,var(--Border-Medium-Emphasis))] text-[var(--Text-Low-Emphasis)] transition-colors outline-none hover:bg-[var(--Surface-Neutral-Tertiary)] hover:text-[var(--Text-High-Emphasis)]",
69
69
  // 親が overflow-hidden なので外向きリングは切れる。内側に描く。
70
70
  C,
71
71
  // 高さは親の枠(border 1px)の内側いっぱい(h-full)。以前は親と同じ高さ(h-9 / h-11)で、
@@ -86,7 +86,7 @@ const B = s.forwardRef(
86
86
  action: m,
87
87
  method: "get",
88
88
  role: "search",
89
- onSubmit: g,
89
+ onSubmit: N,
90
90
  className: f,
91
91
  children: p
92
92
  }
@@ -61,7 +61,7 @@ function m({
61
61
  onClick: () => s?.(r.key),
62
62
  className: t(
63
63
  "flex items-center gap-3 px-4 py-2.5 typo-body-md transition-colors cursor-pointer",
64
- e ? "border-l-2 border-[var(--Brand-Cake-Orange)] text-[var(--Text-Accent-Primary)] bg-[var(--Surface-Accent-Primary-Light)] pl-3.5" : "border-l-2 border-transparent text-[var(--Text-Medium-Emphasis)] hover:bg-[var(--Surface-Secondary)] hover:text-[var(--Text-High-Emphasis)]"
64
+ e ? "border-l-2 border-[var(--Brand-Cake-Orange)] text-[var(--Text-Accent-Primary)] bg-[var(--Surface-Accent-Primary-Light)] pl-3.5" : "border-l-2 border-transparent text-[var(--Text-Medium-Emphasis)] hover:bg-[var(--Surface-Neutral-Secondary)] hover:text-[var(--Text-High-Emphasis)]"
65
65
  ),
66
66
  "aria-current": e ? "location" : void 0,
67
67
  children: [
@@ -71,7 +71,7 @@ function M({
71
71
  className: x(
72
72
  // hover はモーショントークン参照(prefers-reduced-motion で自動停止する)。
73
73
  // 素の transition-colors は Tailwind 既定値でトークン制御が効かない(#201)
74
- "flex items-center gap-3 px-4 py-2.5 typo-body-md transition-colors duration-[var(--Motion-Duration-Base)] ease-[var(--Motion-Easing-Standard)] hover:bg-[var(--Surface-Secondary)] cursor-pointer",
74
+ "flex items-center gap-3 px-4 py-2.5 typo-body-md transition-colors duration-[var(--Motion-Duration-Base)] ease-[var(--Motion-Easing-Standard)] hover:bg-[var(--Surface-Neutral-Secondary)] cursor-pointer",
75
75
  v ? "border-l-2 border-[var(--Brand-Cake-Orange)] text-[var(--Text-Accent-Primary)] bg-[var(--Surface-Accent-Primary-Light)] pl-3.5" : "text-[var(--Text-High-Emphasis)] border-l-2 border-transparent"
76
76
  ),
77
77
  "aria-current": v ? "page" : void 0,
@@ -2,25 +2,25 @@ import { jsx as a, jsxs as f } from "react/jsx-runtime";
2
2
  import "react";
3
3
  import { cn as e } from "../../lib/utils.js";
4
4
  import { containerVariants as m } from "./container.js";
5
- const u = "px-4 md:px-6";
6
- function E({
5
+ const v = "px-4 md:px-6";
6
+ function N({
7
7
  className: o,
8
8
  items: x,
9
9
  variant: n = "text",
10
10
  linkComponent: b,
11
- containerSize: s,
11
+ containerSize: t,
12
12
  ...l
13
13
  }) {
14
14
  const i = () => x.map((r) => {
15
- const p = r.href ? b ?? "a" : "button", v = r.href ? { href: r.href } : { type: "button", onClick: r.onClick };
15
+ const p = r.href ? b ?? "a" : "button", u = r.href ? { href: r.href } : { type: "button", onClick: r.onClick };
16
16
  return n === "chip" ? /* @__PURE__ */ a(
17
17
  p,
18
18
  {
19
19
  className: e(
20
20
  "shrink-0 rounded-full px-3 typo-label-sm transition-colors h-8 inline-flex items-center justify-center",
21
- r.isActive ? "bg-[var(--Brand-Cake-Orange)] text-[var(--Text-on-Inverse)]" : "bg-[var(--Surface-Secondary)] text-[var(--Text-Medium-Emphasis)] hover:bg-[var(--Surface-Tertiary)]"
21
+ r.isActive ? "bg-[var(--Brand-Cake-Orange)] text-[var(--Text-on-Inverse)]" : "bg-[var(--Surface-Neutral-Secondary)] text-[var(--Text-Medium-Emphasis)] hover:bg-[var(--Surface-Neutral-Tertiary)]"
22
22
  ),
23
- ...v,
23
+ ...u,
24
24
  children: r.label
25
25
  },
26
26
  r.label
@@ -31,7 +31,7 @@ function E({
31
31
  "relative shrink-0 py-2.5 typo-label-md transition-colors",
32
32
  r.isActive ? "text-[var(--Text-High-Emphasis)]" : "text-[var(--Text-Medium-Emphasis)] hover:text-[var(--Text-High-Emphasis)]"
33
33
  ),
34
- ...v,
34
+ ...u,
35
35
  children: [
36
36
  r.label,
37
37
  r.isActive && /* @__PURE__ */ a("span", { className: "absolute inset-x-0 bottom-0 h-0.5 rounded-full bg-[var(--Text-High-Emphasis)]" })
@@ -39,14 +39,14 @@ function E({
39
39
  },
40
40
  r.label
41
41
  );
42
- }), t = n === "chip", c = t ? "div" : "nav", d = t ? e("flex gap-2 overflow-x-auto py-2 scrollbar-hide", u) : e("flex gap-4 overflow-x-auto scrollbar-hide", u), h = t ? void 0 : "border-b border-[var(--Border-Low-Emphasis)]";
43
- return s ? /* @__PURE__ */ a(c, { "data-slot": "sub-nav", className: e(h, o), ...l, children: /* @__PURE__ */ a(
42
+ }), s = n === "chip", c = s ? "div" : "nav", d = s ? e("flex gap-2 overflow-x-auto py-2 scrollbar-hide", v) : e("flex gap-4 overflow-x-auto scrollbar-hide", v), h = s ? void 0 : "border-b border-[var(--Border-Low-Emphasis)]";
43
+ return t ? /* @__PURE__ */ a(c, { "data-slot": "sub-nav", className: e(h, o), ...l, children: /* @__PURE__ */ a(
44
44
  "div",
45
45
  {
46
46
  "data-slot": "sub-nav-container",
47
- "data-container-size": s,
47
+ "data-container-size": t,
48
48
  className: e(
49
- m({ size: s, gutter: "none" }),
49
+ m({ size: t, gutter: "none" }),
50
50
  d
51
51
  ),
52
52
  children: i()
@@ -62,5 +62,5 @@ function E({
62
62
  );
63
63
  }
64
64
  export {
65
- E as SubNav
65
+ N as SubNav
66
66
  };
@@ -1,13 +1,13 @@
1
1
  import { jsxs as n } from "react/jsx-runtime";
2
2
  import "react";
3
- import { cva as o } from "class-variance-authority";
4
- import { cn as s } from "../../lib/utils.js";
5
- const x = o(
3
+ import { cva as s } from "class-variance-authority";
4
+ import { cn as o } from "../../lib/utils.js";
5
+ const x = s(
6
6
  "inline-flex items-center gap-1 rounded text-nowrap",
7
7
  {
8
8
  variants: {
9
9
  variant: {
10
- default: "bg-[var(--Surface-Secondary)] text-[var(--Text-High-Emphasis)] dark:bg-[var(--Surface-Tertiary)] dark:text-[var(--Text-High-Emphasis)] dark:ring-1 dark:ring-[var(--Border-Medium-Emphasis)]",
10
+ default: "bg-[var(--Surface-Neutral-Secondary)] text-[var(--Text-High-Emphasis)] dark:bg-[var(--Surface-Neutral-Tertiary)] dark:text-[var(--Text-High-Emphasis)] dark:ring-1 dark:ring-[var(--Border-Medium-Emphasis)]",
11
11
  // 写真上のオーバーレイ用。画像の明暗に依存しない不透明な面を使う。
12
12
  image: "bg-[var(--Primitive-Gray-900)] text-[var(--Primitive-White-alpha-1000)]",
13
13
  caution: "bg-[var(--Caution-Ultra-Light)] text-[var(--Text-Caution)] dark:bg-[var(--Text-Caution)]/20 dark:text-[var(--Text-Caution)]",
@@ -15,7 +15,7 @@ const x = o(
15
15
  warning: "bg-[var(--Primitive-Wood-100)] text-[var(--Text-Warning)]",
16
16
  info: "bg-[var(--Primitive-Sea-50)] text-[var(--Primitive-Sea-600)] dark:bg-[var(--Primitive-Sea-600)] dark:text-[var(--Primitive-White-alpha-1000)]",
17
17
  "info-fill": "bg-[var(--Primitive-Sea-600)] text-[var(--Text-on-Inverse)]",
18
- success: "bg-[var(--Primitive-Forest-50)] text-[var(--Text-Success)]",
18
+ success: "bg-[var(--Surface-Success-Light)] text-[var(--Text-Success)]",
19
19
  accent: "bg-[var(--Surface-Accent-Primary-Light)] text-[var(--Text-Accent-Primary)]",
20
20
  timesale: "bg-[var(--Primitive-Wood-400)] text-[var(--Text-on-Inverse)]",
21
21
  berry: "bg-[var(--Primitive-Berry-700)] text-[var(--Text-on-Inverse)]",
@@ -32,7 +32,7 @@ const x = o(
32
32
  }
33
33
  }
34
34
  );
35
- function p({
35
+ function d({
36
36
  className: a,
37
37
  variant: r,
38
38
  size: t,
@@ -44,7 +44,7 @@ function p({
44
44
  "span",
45
45
  {
46
46
  "data-slot": "tag",
47
- className: s(x({ variant: r, size: t }), a),
47
+ className: o(x({ variant: r, size: t }), a),
48
48
  ...v,
49
49
  children: [
50
50
  e,
@@ -54,6 +54,6 @@ function p({
54
54
  );
55
55
  }
56
56
  export {
57
- p as Tag,
57
+ d as Tag,
58
58
  x as tagVariants
59
59
  };
@@ -4,7 +4,7 @@ import { cn as p } from "../../lib/utils.js";
4
4
  import { SkipLink as g } from "../foundations/skip-link.js";
5
5
  import { Header as h } from "./header.js";
6
6
  import { Container as v } from "./container.js";
7
- function b({
7
+ function N({
8
8
  title: o,
9
9
  onBack: s,
10
10
  backLabel: n = "戻る",
@@ -12,9 +12,9 @@ function b({
12
12
  sectionNav: a,
13
13
  asidePanel: e,
14
14
  children: i,
15
- className: m,
15
+ className: t,
16
16
  mainId: l = "main-content",
17
- skipLink: t,
17
+ skipLink: m,
18
18
  headerLayout: f = "start"
19
19
  }) {
20
20
  return /* @__PURE__ */ c(
@@ -22,13 +22,13 @@ function b({
22
22
  {
23
23
  "data-slot": "workspace-shell",
24
24
  className: p(
25
- // 地が Surface-Secondary なので、配下 Card の既定サーフェスを白に切り替える文脈を宣言する
25
+ // 地が Surface-Neutral-Secondary なので、配下 Card の既定サーフェスを白に切り替える文脈を宣言する
26
26
  // (#150 の Section と同じ仕組み。dark は半透明白が重なって浮くため据え置き)。
27
- "@container min-h-screen bg-[var(--Surface-Secondary)] [--card-surface:var(--Surface-Primary)] dark:[--card-surface:var(--Surface-Secondary)]",
28
- m
27
+ "@container min-h-screen bg-[var(--Surface-Neutral-Secondary)] [--card-surface:var(--Surface-Primary)] dark:[--card-surface:var(--Surface-Secondary)]",
28
+ t
29
29
  ),
30
30
  children: [
31
- t !== !1 && /* @__PURE__ */ r(g, { href: `#${l}` }),
31
+ m !== !1 && /* @__PURE__ */ r(g, { href: `#${l}` }),
32
32
  /* @__PURE__ */ r(
33
33
  h,
34
34
  {
@@ -53,5 +53,5 @@ function b({
53
53
  );
54
54
  }
55
55
  export {
56
- b as WorkspaceShell
56
+ N as WorkspaceShell
57
57
  };