@cakejp/design-system 0.22.0 → 0.23.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 (120) hide show
  1. package/CHANGELOG.md +96 -0
  2. package/CLAUDE.md +5 -1
  3. package/MIGRATION.md +43 -0
  4. package/UPDATING.md +2 -0
  5. package/bin/check-tokens.mjs +136 -0
  6. package/bin/init.js +9 -0
  7. package/contracts/components.json +87 -25
  8. package/contracts/composition.json +9 -9
  9. package/contracts/rules.json +1 -1
  10. package/contracts/screen-patterns.json +1 -1
  11. package/dist/components/ec/admin-shell.js +7 -7
  12. package/dist/components/ec/anniversary-card.js +1 -1
  13. package/dist/components/ec/chart-controls.js +7 -7
  14. package/dist/components/ec/coupon-card.js +10 -10
  15. package/dist/components/ec/delivery-calendar.js +1 -1
  16. package/dist/components/ec/mypage-shell.js +1 -1
  17. package/dist/components/ec/order-section.js +1 -1
  18. package/dist/components/ec/order-summary.js +7 -5
  19. package/dist/components/ec/product-card.js +32 -30
  20. package/dist/components/ec/product-detail-sidebar.js +1 -1
  21. package/dist/components/ec/product-list-item.js +57 -56
  22. package/dist/components/ec/product-option.js +30 -30
  23. package/dist/components/ec/review-summary.js +1 -1
  24. package/dist/components/ec/shop-card.js +7 -7
  25. package/dist/components/foundations/accordion.js +1 -1
  26. package/dist/components/foundations/alert-dialog.js +65 -43
  27. package/dist/components/foundations/alert.js +74 -68
  28. package/dist/components/foundations/badge.js +4 -4
  29. package/dist/components/foundations/button.js +15 -15
  30. package/dist/components/foundations/checkbox-card.js +18 -18
  31. package/dist/components/foundations/checkbox.js +6 -6
  32. package/dist/components/foundations/chip-variants.js +8 -8
  33. package/dist/components/foundations/data-table.js +244 -209
  34. package/dist/components/foundations/dialog.js +84 -60
  35. package/dist/components/foundations/drawer.js +61 -53
  36. package/dist/components/foundations/field.js +51 -35
  37. package/dist/components/foundations/file-input.js +1 -1
  38. package/dist/components/foundations/input.js +9 -8
  39. package/dist/components/foundations/popover.js +15 -12
  40. package/dist/components/foundations/progress.js +19 -18
  41. package/dist/components/foundations/radio-group.js +26 -23
  42. package/dist/components/foundations/select.js +9 -8
  43. package/dist/components/foundations/sheet.js +82 -59
  44. package/dist/components/foundations/skeleton.js +6 -6
  45. package/dist/components/foundations/slider.js +7 -7
  46. package/dist/components/foundations/sonner.js +9 -8
  47. package/dist/components/foundations/switch.js +3 -2
  48. package/dist/components/foundations/tabs.js +5 -5
  49. package/dist/components/foundations/textarea.js +7 -6
  50. package/dist/components/foundations/toggle-group.js +5 -5
  51. package/dist/components/primitives/admin-header.js +3 -3
  52. package/dist/components/primitives/admin-side-nav.js +101 -92
  53. package/dist/components/primitives/category-shortcuts.js +6 -6
  54. package/dist/components/primitives/chat-composer.js +1 -1
  55. package/dist/components/primitives/chip.js +25 -25
  56. package/dist/components/primitives/combobox.js +74 -63
  57. package/dist/components/primitives/content-carousel.js +64 -62
  58. package/dist/components/primitives/date-picker.js +99 -96
  59. package/dist/components/primitives/error-state.js +9 -9
  60. package/dist/components/primitives/filter-bar.js +4 -4
  61. package/dist/components/primitives/footer.js +1 -1
  62. package/dist/components/primitives/form-field.js +8 -8
  63. package/dist/components/primitives/funnel-shell.js +5 -5
  64. package/dist/components/primitives/header.js +16 -16
  65. package/dist/components/primitives/image-carousel.js +42 -41
  66. package/dist/components/primitives/image-gallery.js +61 -58
  67. package/dist/components/primitives/image-input.js +2 -2
  68. package/dist/components/primitives/image-uploader.js +1 -1
  69. package/dist/components/primitives/kebab-menu.js +20 -16
  70. package/dist/components/primitives/list-item.js +17 -17
  71. package/dist/components/primitives/menu-drawer.js +11 -11
  72. package/dist/components/primitives/multi-select.js +66 -66
  73. package/dist/components/primitives/notification-list.js +13 -13
  74. package/dist/components/primitives/number-input.js +118 -112
  75. package/dist/components/primitives/progress-steps.js +3 -3
  76. package/dist/components/primitives/search-bar.js +6 -6
  77. package/dist/components/primitives/section-nav.js +1 -1
  78. package/dist/components/primitives/side-nav.js +1 -1
  79. package/dist/components/primitives/sub-nav.js +12 -12
  80. package/dist/components/primitives/tag.js +3 -3
  81. package/dist/components/primitives/workspace-shell.js +8 -8
  82. package/dist/index.css +1 -1
  83. package/dist/index.js +1479 -704
  84. package/dist/lib/focus-restore.js +67 -0
  85. package/dist/lib/focus-ring.js +1 -1
  86. package/dist/lib/ime.js +17 -0
  87. package/dist/lib/search-normalize.js +30 -0
  88. package/dist/types/components/ec/admin-shell.d.ts +1 -1
  89. package/dist/types/components/foundations/alert-dialog.d.ts +2 -2
  90. package/dist/types/components/foundations/alert.d.ts +14 -1
  91. package/dist/types/components/foundations/card.d.ts +3 -3
  92. package/dist/types/components/foundations/confirm-dialog.d.ts +3 -3
  93. package/dist/types/components/foundations/data-table.d.ts +1 -1
  94. package/dist/types/components/foundations/dialog.d.ts +2 -2
  95. package/dist/types/components/foundations/drawer.d.ts +1 -1
  96. package/dist/types/components/foundations/field.d.ts +23 -3
  97. package/dist/types/components/foundations/popover.d.ts +1 -1
  98. package/dist/types/components/foundations/sheet.d.ts +4 -3
  99. package/dist/types/components/foundations/sonner.d.ts +3 -2
  100. package/dist/types/components/primitives/admin-side-nav.d.ts +2 -0
  101. package/dist/types/components/primitives/combobox.d.ts +6 -0
  102. package/dist/types/components/primitives/date-picker.d.ts +8 -3
  103. package/dist/types/components/primitives/funnel-shell.d.ts +1 -1
  104. package/dist/types/components/primitives/kebab-menu.d.ts +10 -1
  105. package/dist/types/components/primitives/number-input.d.ts +20 -1
  106. package/dist/types/components/primitives/progress-steps.d.ts +1 -1
  107. package/dist/types/components/primitives/section.d.ts +1 -1
  108. package/dist/types/components/primitives/workspace-shell.d.ts +2 -2
  109. package/dist/types/index.d.ts +3 -4
  110. package/dist/types/lib/focus-restore.d.ts +52 -0
  111. package/dist/types/lib/focus-ring.d.ts +3 -0
  112. package/dist/types/lib/ime.d.ts +36 -0
  113. package/dist/types/lib/search-normalize.d.ts +28 -0
  114. package/package.json +3 -1
  115. package/src/components/COMPONENT_LOOKUP.md +12 -12
  116. package/src/preset-standalone.css +43 -21
  117. package/src/preset.css +36 -18
  118. package/src/styles/primitive.css +1 -0
  119. package/src/styles/semantic.css +12 -2
  120. package/tokens.json +22 -3
@@ -1,18 +1,18 @@
1
1
  "use client";
2
- import { jsxs as c, jsx as t } from "react/jsx-runtime";
3
- import * as d from "react";
4
- import j from "iconsax-reactjs/dist/esm/Calendar.js";
5
- import { X as k } from "lucide-react";
6
- import { ja as B } from "react-day-picker/locale";
2
+ import { jsxs as l, jsx as i } from "react/jsx-runtime";
3
+ import * as c from "react";
4
+ import k from "iconsax-reactjs/dist/esm/Calendar.js";
5
+ import { X as B } from "lucide-react";
6
+ import { ja as F } from "react-day-picker/locale";
7
7
  import { cn as $ } from "../../lib/utils.js";
8
- import { useFieldLabelling as D, resolveNativeFieldAria as F } from "../../lib/field-labelling.js";
8
+ import { useFieldLabelling as D, resolveNativeFieldAria as R } from "../../lib/field-labelling.js";
9
9
  import { Button as A } from "../foundations/button.js";
10
- import { Calendar as R } from "../foundations/calendar.js";
11
- import { Popover as V, PopoverTrigger as _, PopoverContent as J } from "../foundations/popover.js";
10
+ import { Calendar as V } from "../foundations/calendar.js";
11
+ import { Popover as _, PopoverTrigger as J, PopoverContent as O } from "../foundations/popover.js";
12
12
  import { Select as T, SelectTrigger as w, SelectValue as E, SelectContent as H, SelectItem as P } from "../foundations/select.js";
13
- const O = ["日", "月", "火", "水", "木", "金", "土"];
13
+ const q = ["日", "月", "火", "水", "木", "金", "土"];
14
14
  function z(e) {
15
- return `${e.getMonth() + 1}月${e.getDate()}日(${O[e.getDay()]})`;
15
+ return `${e.getMonth() + 1}月${e.getDate()}日(${q[e.getDay()]})`;
16
16
  }
17
17
  function K(e, n, a) {
18
18
  const s = [];
@@ -23,186 +23,189 @@ function W({
23
23
  onChange: n,
24
24
  placeholder: a = "日付を選択",
25
25
  min: s,
26
- max: g,
27
- disabledDates: S,
28
- disabled: m,
29
- clearable: N = !1,
30
- clearLabel: h = "日付をクリア",
31
- id: l,
32
- "aria-invalid": b,
33
- "aria-describedby": u,
34
- className: M
26
+ max: p,
27
+ disabledDates: M,
28
+ defaultMonth: f,
29
+ disabled: g,
30
+ clearable: d = !1,
31
+ clearLabel: m = "日付をクリア",
32
+ id: b,
33
+ "aria-invalid": u,
34
+ "aria-describedby": y,
35
+ className: x
35
36
  }) {
36
- const [y, v] = d.useState(!1), C = K(s, g, S), p = N && !!e && !m, x = d.useRef(null), f = `${d.useId()}-value`, r = D(), i = F(
37
- { id: l, "aria-describedby": u, "aria-invalid": b },
38
- r
39
- ), o = r ? { "aria-labelledby": `${r.labelId} ${f}` } : { "aria-label": e ? z(e) : a };
37
+ const [C, v] = c.useState(!1), N = K(s, p, M), S = d && !!e && !g, h = c.useRef(null), r = `${c.useId()}-value`, t = D(), o = R(
38
+ { id: b, "aria-describedby": y, "aria-invalid": u },
39
+ t
40
+ ), I = t ? { "aria-labelledby": `${t.labelId} ${r}` } : { "aria-label": e ? z(e) : a };
40
41
  return (
41
42
  // クリアボタンは trigger の「兄弟」として絶対配置する。trigger の内側に置くと
42
43
  // button の入れ子になり a11y 上不正(Chip removable と同じ解決)。
43
- /* @__PURE__ */ c("div", { className: $("relative w-full", M), children: [
44
- /* @__PURE__ */ c(V, { open: y, onOpenChange: v, children: [
45
- /* @__PURE__ */ t(_, { asChild: !0, children: /* @__PURE__ */ c(
44
+ /* @__PURE__ */ l("div", { className: $("relative w-full", x), children: [
45
+ /* @__PURE__ */ l(_, { open: C, onOpenChange: v, children: [
46
+ /* @__PURE__ */ i(J, { asChild: !0, children: /* @__PURE__ */ l(
46
47
  A,
47
48
  {
48
- ref: x,
49
- id: l,
50
- "aria-invalid": b,
51
- "aria-describedby": u,
52
- ...i,
49
+ ref: h,
50
+ id: b,
51
+ "aria-invalid": u,
52
+ "aria-describedby": y,
53
+ ...o,
53
54
  type: "button",
54
55
  variant: "ghost",
55
- disabled: m,
56
- ...o,
56
+ disabled: g,
57
+ ...I,
57
58
  "data-empty": !e,
58
59
  className: $(
59
60
  // h-11(44px)= 入力コントロールの共通高さ(Input / SelectTrigger / Button default と揃える)
60
- "h-11 w-full justify-start gap-2 border border-[var(--Border-High-Emphasis)] bg-transparent px-3 typo-body-md text-[var(--Text-High-Emphasis)] hover:border-[var(--Focus-High-Emphasis)] hover:bg-[var(--Surface-Secondary)] data-[empty=true]:text-[var(--Text-Low-Emphasis)]",
61
+ "h-11 w-full justify-start gap-2 border border-[var(--Border-High-Emphasis)] bg-transparent px-3 typo-body-md text-[var(--Text-High-Emphasis)] hover:border-[var(--Focus-High-Emphasis)] hover:bg-[var(--Surface-Neutral-Secondary)] data-[empty=true]:text-[var(--Text-Low-Emphasis)]",
61
62
  // エラー時の枠は Input / Select と同じ Border-Caution(Button 共通の destructive を上書き)
62
63
  "aria-invalid:border-[var(--Border-Caution)]",
63
64
  // クリアボタンの領域を空ける
64
- p && "pr-10"
65
+ S && "pr-10"
65
66
  ),
66
67
  children: [
67
- /* @__PURE__ */ t(j, { size: 16, className: "shrink-0" }),
68
- /* @__PURE__ */ t("span", { id: r ? f : void 0, className: "truncate", children: e ? z(e) : a })
68
+ /* @__PURE__ */ i(k, { size: 16, className: "shrink-0" }),
69
+ /* @__PURE__ */ i("span", { id: t ? r : void 0, className: "truncate", children: e ? z(e) : a })
69
70
  ]
70
71
  }
71
72
  ) }),
72
- /* @__PURE__ */ t(J, { className: "w-auto p-0", align: "start", children: /* @__PURE__ */ t(
73
- R,
73
+ /* @__PURE__ */ i(O, { className: "w-auto p-0", align: "start", children: /* @__PURE__ */ i(
74
+ V,
74
75
  {
75
76
  mode: "single",
77
+ required: !0,
76
78
  selected: e,
77
- onSelect: (I) => {
78
- n?.(I), v(!1);
79
+ defaultMonth: f ?? e,
80
+ onSelect: (j) => {
81
+ n?.(j), v(!1);
79
82
  },
80
- disabled: C,
81
- locale: B,
83
+ disabled: N,
84
+ locale: F,
82
85
  autoFocus: !0
83
86
  }
84
87
  ) })
85
88
  ] }),
86
- p && /* @__PURE__ */ t(
89
+ S && /* @__PURE__ */ i(
87
90
  A,
88
91
  {
89
92
  type: "button",
90
93
  variant: "ghost",
91
94
  size: "icon-sm",
92
- "aria-label": h,
95
+ "aria-label": m,
93
96
  onClick: () => {
94
- n?.(void 0), x.current?.focus();
97
+ n?.(void 0), h.current?.focus();
95
98
  },
96
99
  className: "absolute top-1/2 right-1 -translate-y-1/2 text-[var(--Text-Medium-Emphasis)]",
97
- children: /* @__PURE__ */ t(k, { className: "size-4" })
100
+ children: /* @__PURE__ */ i(B, { className: "size-4" })
98
101
  }
99
102
  )
100
103
  ] })
101
104
  );
102
105
  }
103
- function te({
106
+ function ie({
104
107
  value: e,
105
108
  onChange: n,
106
109
  minuteStep: a = 5,
107
110
  hourLabel: s = "時",
108
- minuteLabel: g = "分",
109
- clearLabel: S = "日時をクリア",
110
- disabled: m,
111
- className: N,
112
- "aria-invalid": h,
113
- "aria-describedby": l,
111
+ minuteLabel: p = "分",
112
+ clearLabel: M = "日時をクリア",
113
+ disabled: f,
114
+ className: g,
115
+ "aria-invalid": d,
116
+ "aria-describedby": m,
114
117
  ...b
115
118
  }) {
116
- const u = D(), M = d.useId(), y = (r, i) => {
117
- if (!u) return { "aria-label": i };
118
- const o = `${M}-${r}`;
119
+ const u = D(), y = c.useId(), x = (r, t) => {
120
+ if (!u) return { "aria-label": t };
121
+ const o = `${y}-${r}`;
119
122
  return {
120
123
  id: o,
121
- "aria-label": i,
124
+ "aria-label": t,
122
125
  "aria-labelledby": `${u.labelId} ${o}`
123
126
  };
124
- }, v = d.useMemo(
125
- () => Array.from({ length: 24 }, (r, i) => i),
127
+ }, C = c.useMemo(
128
+ () => Array.from({ length: 24 }, (r, t) => t),
126
129
  []
127
- ), C = d.useMemo(
130
+ ), v = c.useMemo(
128
131
  () => Array.from(
129
132
  { length: Math.ceil(60 / a) },
130
- (r, i) => i * a
133
+ (r, t) => t * a
131
134
  ),
132
135
  [a]
133
- ), p = (r, i) => {
136
+ ), N = (r, t) => {
134
137
  if (!e) return;
135
138
  const o = new Date(e);
136
- r === "hours" ? o.setHours(Number(i)) : o.setMinutes(Number(i)), n?.(o);
137
- }, x = (r) => {
139
+ r === "hours" ? o.setHours(Number(t)) : o.setMinutes(Number(t)), n?.(o);
140
+ }, S = (r) => {
138
141
  if (!r || !e) {
139
142
  n?.(r);
140
143
  return;
141
144
  }
142
- const i = new Date(r);
143
- i.setHours(
145
+ const t = new Date(r);
146
+ t.setHours(
144
147
  e.getHours(),
145
148
  e.getMinutes(),
146
149
  e.getSeconds(),
147
150
  e.getMilliseconds()
148
- ), n?.(i);
149
- }, f = m || !e;
150
- return /* @__PURE__ */ c("div", { className: $("flex items-center gap-2", N), children: [
151
- /* @__PURE__ */ t(
151
+ ), n?.(t);
152
+ }, h = f || !e;
153
+ return /* @__PURE__ */ l("div", { className: $("flex items-center gap-2", g), children: [
154
+ /* @__PURE__ */ i(
152
155
  W,
153
156
  {
154
157
  ...b,
155
158
  value: e,
156
- onChange: x,
157
- disabled: m,
158
- clearLabel: S,
159
- "aria-invalid": h,
160
- "aria-describedby": l,
159
+ onChange: S,
160
+ disabled: f,
161
+ clearLabel: M,
162
+ "aria-invalid": d,
163
+ "aria-describedby": m,
161
164
  className: "flex-1"
162
165
  }
163
166
  ),
164
- /* @__PURE__ */ c(
167
+ /* @__PURE__ */ l(
165
168
  T,
166
169
  {
167
170
  value: e ? String(e.getHours()) : void 0,
168
- onValueChange: (r) => p("hours", r),
169
- disabled: f,
171
+ onValueChange: (r) => N("hours", r),
172
+ disabled: h,
170
173
  children: [
171
- /* @__PURE__ */ t(
174
+ /* @__PURE__ */ i(
172
175
  w,
173
176
  {
174
177
  size: "default",
175
178
  className: "w-[72px]",
176
- ...y("hour", s),
177
- "aria-invalid": h,
178
- "aria-describedby": l,
179
- children: /* @__PURE__ */ t(E, { placeholder: s })
179
+ ...x("hour", s),
180
+ "aria-invalid": d,
181
+ "aria-describedby": m,
182
+ children: /* @__PURE__ */ i(E, { placeholder: s })
180
183
  }
181
184
  ),
182
- /* @__PURE__ */ t(H, { children: v.map((r) => /* @__PURE__ */ t(P, { value: String(r), children: String(r).padStart(2, "0") }, r)) })
185
+ /* @__PURE__ */ i(H, { children: C.map((r) => /* @__PURE__ */ i(P, { value: String(r), children: String(r).padStart(2, "0") }, r)) })
183
186
  ]
184
187
  }
185
188
  ),
186
- /* @__PURE__ */ t("span", { className: "typo-body-md text-[var(--Text-Medium-Emphasis)]", children: ":" }),
187
- /* @__PURE__ */ c(
189
+ /* @__PURE__ */ i("span", { className: "typo-body-md text-[var(--Text-Medium-Emphasis)]", children: ":" }),
190
+ /* @__PURE__ */ l(
188
191
  T,
189
192
  {
190
193
  value: e ? String(e.getMinutes()) : void 0,
191
- onValueChange: (r) => p("minutes", r),
192
- disabled: f,
194
+ onValueChange: (r) => N("minutes", r),
195
+ disabled: h,
193
196
  children: [
194
- /* @__PURE__ */ t(
197
+ /* @__PURE__ */ i(
195
198
  w,
196
199
  {
197
200
  size: "default",
198
201
  className: "w-[72px]",
199
- ...y("minute", g),
200
- "aria-invalid": h,
201
- "aria-describedby": l,
202
- children: /* @__PURE__ */ t(E, { placeholder: g })
202
+ ...x("minute", p),
203
+ "aria-invalid": d,
204
+ "aria-describedby": m,
205
+ children: /* @__PURE__ */ i(E, { placeholder: p })
203
206
  }
204
207
  ),
205
- /* @__PURE__ */ t(H, { children: C.map((r) => /* @__PURE__ */ t(P, { value: String(r), children: String(r).padStart(2, "0") }, r)) })
208
+ /* @__PURE__ */ i(H, { children: v.map((r) => /* @__PURE__ */ i(P, { value: String(r), children: String(r).padStart(2, "0") }, r)) })
206
209
  ]
207
210
  }
208
211
  )
@@ -210,5 +213,5 @@ function te({
210
213
  }
211
214
  export {
212
215
  W as DatePicker,
213
- te as DateTimePicker
216
+ ie as DateTimePicker
214
217
  };
@@ -18,7 +18,7 @@ function y({
18
18
  className: a("h-auto w-40", t),
19
19
  ...i,
20
20
  children: [
21
- /* @__PURE__ */ r("ellipse", { cx: "100", cy: "146", rx: "74", ry: "11", fill: "var(--Surface-Tertiary)" }),
21
+ /* @__PURE__ */ r("ellipse", { cx: "100", cy: "146", rx: "74", ry: "11", fill: "var(--Surface-Neutral-Tertiary)" }),
22
22
  /* @__PURE__ */ r(
23
23
  "path",
24
24
  {
@@ -53,8 +53,8 @@ function y({
53
53
  /* @__PURE__ */ r("circle", { cx: "70", cy: "88", r: "5", fill: "var(--Surface-Primary)", stroke: "currentColor", strokeWidth: "2.5" }),
54
54
  /* @__PURE__ */ r("circle", { cx: "100", cy: "86", r: "5", fill: "var(--Surface-Primary)", stroke: "currentColor", strokeWidth: "2.5" }),
55
55
  /* @__PURE__ */ r("circle", { cx: "163", cy: "66", r: "4", fill: "var(--Brand-Cake-Orange)" }),
56
- /* @__PURE__ */ r("circle", { cx: "150", cy: "52", r: "3", fill: "var(--Surface-Tertiary)" }),
57
- /* @__PURE__ */ r("circle", { cx: "40", cy: "70", r: "3.5", fill: "var(--Surface-Tertiary)" })
56
+ /* @__PURE__ */ r("circle", { cx: "150", cy: "52", r: "3", fill: "var(--Surface-Neutral-Tertiary)" }),
57
+ /* @__PURE__ */ r("circle", { cx: "40", cy: "70", r: "3.5", fill: "var(--Surface-Neutral-Tertiary)" })
58
58
  ]
59
59
  }
60
60
  );
@@ -66,18 +66,18 @@ const d = {
66
66
  description: "URL が間違っているか、ページが移動または削除された可能性があります。"
67
67
  }
68
68
  };
69
- function N({
69
+ function S({
70
70
  className: t,
71
71
  kind: e = "error",
72
72
  icon: i,
73
73
  title: u,
74
74
  description: m,
75
- onRetry: c,
75
+ onRetry: l,
76
76
  retryLabel: f = "再試行",
77
77
  action: v,
78
78
  ...h
79
79
  }) {
80
- const l = e === "notFound", x = u ?? d[e].title, n = m ?? d[e].description, s = i ?? (l ? /* @__PURE__ */ r(y, {}) : null);
80
+ const c = e === "notFound", x = u ?? d[e].title, n = m ?? d[e].description, s = i ?? (c ? /* @__PURE__ */ r(y, {}) : null);
81
81
  return /* @__PURE__ */ o(
82
82
  "div",
83
83
  {
@@ -94,7 +94,7 @@ function N({
94
94
  {
95
95
  className: a(
96
96
  "shrink-0",
97
- l ? "text-[var(--Border-Medium-Emphasis)]" : "text-[var(--Object-Caution)]"
97
+ c ? "text-[var(--Border-Medium-Emphasis)]" : "text-[var(--Object-Caution)]"
98
98
  ),
99
99
  children: s
100
100
  }
@@ -102,7 +102,7 @@ function N({
102
102
  /* @__PURE__ */ r("p", { className: "mt-4 typo-heading-md text-[var(--Text-High-Emphasis)]", children: x }),
103
103
  n && /* @__PURE__ */ r("div", { className: "mt-2 typo-body-md text-[var(--Text-Medium-Emphasis)] max-w-[400px]", children: n }),
104
104
  /* @__PURE__ */ o("div", { className: "mt-6 flex flex-col gap-3 items-center", children: [
105
- c && /* @__PURE__ */ r(p, { variant: "secondary", size: "lg", onClick: c, children: f }),
105
+ l && /* @__PURE__ */ r(p, { variant: "secondary", size: "lg", onClick: l, children: f }),
106
106
  v
107
107
  ] })
108
108
  ]
@@ -110,6 +110,6 @@ function N({
110
110
  );
111
111
  }
112
112
  export {
113
- N as ErrorState,
113
+ S as ErrorState,
114
114
  y as NotFoundIllustration
115
115
  };
@@ -41,7 +41,7 @@ function z({
41
41
  "button",
42
42
  {
43
43
  type: "button",
44
- className: "relative flex size-9 shrink-0 items-center justify-center rounded-full bg-[var(--Surface-Tertiary)] text-[var(--Text-High-Emphasis)] transition-colors hover:opacity-80",
44
+ className: "relative flex size-9 shrink-0 items-center justify-center rounded-full bg-[var(--Surface-Neutral-Tertiary)] text-[var(--Text-High-Emphasis)] transition-colors hover:opacity-80",
45
45
  onClick: o,
46
46
  "aria-label": "絞り込み",
47
47
  children: [
@@ -57,7 +57,7 @@ function z({
57
57
  onClick: r.onClick,
58
58
  className: c(
59
59
  "flex h-9 shrink-0 items-center gap-0.5 rounded-full px-2.5 typo-body-md transition-colors max-w-[180px]",
60
- r.isActive ? "bg-[var(--Surface-Accent-Primary-Light)] typo-label-md text-[var(--Text-Accent-Primary)] dark:bg-[var(--Brand-Cake-Orange)] dark:text-[var(--Primitive-White-alpha-1000)] dark:ring-0" : "bg-[var(--Surface-Tertiary)] text-[var(--Text-High-Emphasis)] hover:opacity-80"
60
+ r.isActive ? "bg-[var(--Surface-Accent-Primary-Light)] typo-label-md text-[var(--Text-Accent-Primary)] dark:bg-[var(--Brand-Cake-Orange)] dark:text-[var(--Primitive-White-alpha-1000)] dark:ring-0" : "bg-[var(--Surface-Neutral-Tertiary)] text-[var(--Text-High-Emphasis)] hover:opacity-80"
61
61
  ),
62
62
  children: [
63
63
  /* @__PURE__ */ e("span", { className: "truncate", children: r.isActive && r.value ? r.value : r.label }),
@@ -89,7 +89,7 @@ function z({
89
89
  onClick: i,
90
90
  className: c(
91
91
  "flex h-9 shrink-0 items-center gap-0.5 rounded-full px-3 typo-body-md transition-colors @md:hidden",
92
- t ? "bg-[var(--Surface-Accent-Primary-Light)] typo-label-md text-[var(--Text-Accent-Primary)] dark:bg-[var(--Brand-Cake-Orange)] dark:text-[var(--Primitive-White-alpha-1000)] dark:ring-0" : "bg-[var(--Surface-Tertiary)] text-[var(--Text-High-Emphasis)] hover:opacity-80"
92
+ t ? "bg-[var(--Surface-Accent-Primary-Light)] typo-label-md text-[var(--Text-Accent-Primary)] dark:bg-[var(--Brand-Cake-Orange)] dark:text-[var(--Primitive-White-alpha-1000)] dark:ring-0" : "bg-[var(--Surface-Neutral-Tertiary)] text-[var(--Text-High-Emphasis)] hover:opacity-80"
93
93
  ),
94
94
  children: [
95
95
  /* @__PURE__ */ e(u, { className: "size-4" }),
@@ -104,7 +104,7 @@ function z({
104
104
  {
105
105
  type: "button",
106
106
  onClick: i,
107
- className: "flex items-center gap-1 rounded-full bg-[var(--Surface-Tertiary)] px-3 py-1.5 typo-body-md text-[var(--Text-High-Emphasis)] transition-colors hover:opacity-80",
107
+ className: "flex items-center gap-1 rounded-full bg-[var(--Surface-Neutral-Tertiary)] px-3 py-1.5 typo-body-md text-[var(--Text-High-Emphasis)] transition-colors hover:opacity-80",
108
108
  children: [
109
109
  t,
110
110
  /* @__PURE__ */ e(m, { size: 12 })
@@ -45,7 +45,7 @@ function H({
45
45
  ref: t,
46
46
  className: "overflow-hidden transition-[max-height] duration-[var(--Motion-Duration-Base)] ease-in-out",
47
47
  style: { maxHeight: r ? `${n}px` : "0px" },
48
- children: /* @__PURE__ */ e("div", { className: "bg-[var(--Surface-Secondary)]", children: i })
48
+ children: /* @__PURE__ */ e("div", { className: "bg-[var(--Surface-Neutral-Secondary)]", children: i })
49
49
  }
50
50
  )
51
51
  ] });
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
  import { jsxs as c, jsx as e } from "react/jsx-runtime";
3
- import * as u from "react";
3
+ import * as f from "react";
4
4
  import { cn as y } from "../../lib/utils.js";
5
5
  import { Label as h } from "../foundations/label.js";
6
6
  import { FieldLabellingContext as N } from "../../lib/field-labelling.js";
@@ -8,19 +8,19 @@ function L({
8
8
  label: m,
9
9
  required: p,
10
10
  optional: x,
11
- description: o,
11
+ description: a,
12
12
  descriptionPosition: l = "above",
13
- error: a,
13
+ error: o,
14
14
  htmlFor: v,
15
15
  children: b,
16
- className: f
16
+ className: u
17
17
  }) {
18
- const t = u.useId(), r = `${t}-label`, s = v ?? `${t}-control`, n = o ? `${t}-description` : void 0, i = a ? `${t}-error` : void 0, d = o ? /* @__PURE__ */ e("p", { id: n, className: "typo-body-xs text-[var(--Text-Low-Emphasis)]", children: o }) : null;
19
- return /* @__PURE__ */ c("div", { className: y("space-y-1.5", f), "data-slot": "form-field", children: [
18
+ const t = f.useId(), r = `${t}-label`, s = v ?? `${t}-control`, n = a ? `${t}-description` : void 0, i = o ? `${t}-error` : void 0, d = a ? /* @__PURE__ */ e("p", { id: n, className: "typo-body-xs text-[var(--Text-Low-Emphasis)]", children: a }) : null;
19
+ return /* @__PURE__ */ c("div", { className: y("space-y-1.5", u), "data-slot": "form-field", children: [
20
20
  /* @__PURE__ */ c("div", { className: "flex items-center gap-2", children: [
21
21
  /* @__PURE__ */ e(h, { id: r, htmlFor: s, className: "typo-label-md", children: m }),
22
22
  p && /* @__PURE__ */ e("span", { className: "inline-flex items-center px-1.5 py-0.5 rounded bg-[var(--Surface-Caution)] typo-label-xs text-[var(--Text-on-Inverse)]", children: "必須" }),
23
- x && /* @__PURE__ */ e("span", { className: "inline-flex items-center px-1.5 py-0.5 rounded bg-[var(--Surface-Tertiary)] typo-label-xs text-[var(--Text-Low-Emphasis)]", children: "任意" })
23
+ x && /* @__PURE__ */ e("span", { className: "inline-flex items-center px-1.5 py-0.5 rounded bg-[var(--Surface-Neutral-Tertiary)] typo-label-xs text-[var(--Text-Low-Emphasis)]", children: "任意" })
24
24
  ] }),
25
25
  l === "above" && d,
26
26
  /* @__PURE__ */ e(
@@ -31,7 +31,7 @@ function L({
31
31
  }
32
32
  ),
33
33
  l === "below" && d,
34
- a && /* @__PURE__ */ e("p", { id: i, className: "typo-body-xs text-[var(--Text-Caution)]", children: a })
34
+ o && /* @__PURE__ */ e("p", { id: i, className: "typo-body-xs text-[var(--Text-Caution)]", children: o })
35
35
  ] });
36
36
  }
37
37
  export {
@@ -2,11 +2,11 @@ import { jsxs as p, jsx as a } from "react/jsx-runtime";
2
2
  import "react";
3
3
  import { cn as r } from "../../lib/utils.js";
4
4
  import { SkipLink as N } from "../foundations/skip-link.js";
5
- import { Header as f } from "./header.js";
5
+ import { Header as u } from "./header.js";
6
6
  function L({
7
7
  logo: o,
8
8
  title: c,
9
- onBack: u,
9
+ onBack: f,
10
10
  backLabel: h = "戻る",
11
11
  steps: e,
12
12
  activeStep: x,
@@ -22,14 +22,14 @@ function L({
22
22
  {
23
23
  "data-slot": "funnel-shell",
24
24
  className: r(
25
- // 地が Surface-Secondary なので、配下 Card の既定サーフェスを白に切り替える文脈を宣言する
25
+ // 地が Surface-Neutral-Secondary なので、配下 Card の既定サーフェスを白に切り替える文脈を宣言する
26
26
  // (#150 の Section と同じ仕組み。dark は半透明白が重なって浮くため据え置き)。
27
- "@container flex min-h-dvh flex-col bg-[var(--Surface-Secondary)] [--card-surface:var(--Surface-Primary)] dark:[--card-surface:var(--Surface-Secondary)]",
27
+ "@container flex min-h-dvh flex-col bg-[var(--Surface-Neutral-Secondary)] [--card-surface:var(--Surface-Primary)] dark:[--card-surface:var(--Surface-Secondary)]",
28
28
  b
29
29
  ),
30
30
  children: [
31
31
  g !== !1 && /* @__PURE__ */ a(N, { href: `#${m}` }),
32
- o ? /* @__PURE__ */ a(f, { variant: "logo-center", logo: o }) : c ? /* @__PURE__ */ a(f, { variant: "back", title: c, onBack: u, backLabel: h }) : null,
32
+ o ? /* @__PURE__ */ a(u, { variant: "logo-center", logo: o }) : c ? /* @__PURE__ */ a(u, { variant: "back", title: c, onBack: f, backLabel: h }) : null,
33
33
  e && e.length > 0 && /* @__PURE__ */ a(
34
34
  "nav",
35
35
  {
@@ -40,7 +40,7 @@ function A({
40
40
  function H(l) {
41
41
  return d(
42
42
  "px-3 py-1.5 typo-body-md rounded-md transition-colors whitespace-nowrap",
43
- l ? "text-[var(--Text-High-Emphasis)] font-bold" : "text-[var(--Text-Medium-Emphasis)] hover:text-[var(--Text-High-Emphasis)] hover:bg-[var(--Surface-Secondary)]"
43
+ l ? "text-[var(--Text-High-Emphasis)] font-bold" : "text-[var(--Text-Medium-Emphasis)] hover:text-[var(--Text-High-Emphasis)] hover:bg-[var(--Surface-Neutral-Secondary)]"
44
44
  );
45
45
  }
46
46
  const _ = 2;
@@ -51,10 +51,10 @@ function Q({
51
51
  }) {
52
52
  const m = a ?? "a", h = R.useRef(null), f = R.useRef(null), [g, c] = R.useState(l.length);
53
53
  R.useEffect(() => {
54
- const e = h.current, p = f.current;
55
- if (!e || !p) return;
56
- const u = () => {
57
- const k = Array.from(p.children), C = k.slice(0, l.length).map((i) => i.getBoundingClientRect().width), b = k[l.length]?.getBoundingClientRect().width ?? 0, x = e.clientWidth;
54
+ const e = h.current, u = f.current;
55
+ if (!e || !u) return;
56
+ const p = () => {
57
+ const k = Array.from(u.children), C = k.slice(0, l.length).map((i) => i.getBoundingClientRect().width), b = k[l.length]?.getBoundingClientRect().width ?? 0, x = e.clientWidth;
58
58
  if (x === 0 || C.some((i) => i === 0)) {
59
59
  c(l.length);
60
60
  return;
@@ -71,10 +71,10 @@ function Q({
71
71
  }
72
72
  c(L);
73
73
  };
74
- u(), window.addEventListener("resize", u);
75
- const v = typeof ResizeObserver < "u" ? new ResizeObserver(u) : null;
76
- return v?.observe(e), v?.observe(p), () => {
77
- window.removeEventListener("resize", u), v?.disconnect();
74
+ p(), window.addEventListener("resize", p);
75
+ const v = typeof ResizeObserver < "u" ? new ResizeObserver(p) : null;
76
+ return v?.observe(e), v?.observe(u), () => {
77
+ window.removeEventListener("resize", p), v?.disconnect();
78
78
  };
79
79
  }, [l]);
80
80
  const y = l.slice(0, g), w = l.slice(g);
@@ -102,16 +102,16 @@ function Q({
102
102
  ),
103
103
  /* @__PURE__ */ s("nav", { className: "flex items-center gap-0.5", children: [
104
104
  y.map((e) => {
105
- const p = e.href ? m : "button", u = e.href ? {
105
+ const u = e.href ? m : "button", p = e.href ? {
106
106
  href: e.href,
107
107
  "aria-current": e.isActive ? "page" : void 0,
108
108
  onClick: e.onClick
109
109
  } : { type: "button", onClick: e.onClick };
110
110
  return /* @__PURE__ */ r(
111
- p,
111
+ u,
112
112
  {
113
113
  className: H(e.isActive),
114
- ...u,
114
+ ...p,
115
115
  children: e.label
116
116
  },
117
117
  e.label
@@ -165,8 +165,8 @@ function re({
165
165
  navBreakpoint: y = "md",
166
166
  navOverflowLabel: w,
167
167
  searchSlot: e,
168
- searchBreakpoint: p,
169
- rightSlot: u,
168
+ searchBreakpoint: u,
169
+ rightSlot: p,
170
170
  centerSlot: v,
171
171
  bottomSlot: k,
172
172
  disableSticky: C = !1,
@@ -180,7 +180,7 @@ function re({
180
180
  // 不透明が必須(dark の Surface-Primary は 10% 透過で下の文字が透ける)。light は同値
181
181
  "border-b border-[var(--Border-Low-Emphasis)] bg-[var(--Surface-Elevated)]",
182
182
  l
183
- ), O = y === "lg" ? "@[960px]:hidden" : "@[768px]:hidden", W = y === "lg" ? "hidden @[960px]:flex" : "hidden @[768px]:flex", F = p === "lg" ? "hidden @[960px]:block" : p === "md" ? "hidden @[768px]:block" : void 0;
183
+ ), O = y === "lg" ? "@[960px]:hidden" : "@[768px]:hidden", W = y === "lg" ? "hidden @[960px]:flex" : "hidden @[768px]:flex", F = u === "lg" ? "hidden @[960px]:block" : u === "md" ? "hidden @[768px]:block" : void 0;
184
184
  if (t === "logo") {
185
185
  const T = typeof a == "string" ? /* @__PURE__ */ r("span", { className: "typo-heading-lg text-[var(--Text-High-Emphasis)]", children: a }) : a ?? null, j = g && g.length > 0 && /* @__PURE__ */ r("div", { className: "flex shrink-0 items-center gap-1", children: g.map((n) => {
186
186
  const M = n.showLabel ? {
@@ -304,7 +304,7 @@ function re({
304
304
  }
305
305
  ) }),
306
306
  /* @__PURE__ */ r("h1", { className: "min-w-0 truncate text-center typo-heading-md text-[var(--Text-High-Emphasis)]", children: m }),
307
- /* @__PURE__ */ r("div", { className: "justify-self-end", children: u })
307
+ /* @__PURE__ */ r("div", { className: "justify-self-end", children: p })
308
308
  ]
309
309
  }
310
310
  );