@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,13 +1,13 @@
1
1
  "use client";
2
- import { jsx as r, jsxs as c } from "react/jsx-runtime";
3
- import * as b from "react";
4
- import { cva as N } from "class-variance-authority";
5
- import g from "iconsax-reactjs/dist/esm/Warning2.js";
6
- import _ from "iconsax-reactjs/dist/esm/InfoCircle.js";
7
- import j from "iconsax-reactjs/dist/esm/TickCircle.js";
8
- import E from "iconsax-reactjs/dist/esm/CloseCircle.js";
9
- import { cn as n } from "../../lib/utils.js";
10
- const p = N(
2
+ import { jsx as i, jsxs as c } from "react/jsx-runtime";
3
+ import * as w from "react";
4
+ import { cva as _ } from "class-variance-authority";
5
+ import h from "iconsax-reactjs/dist/esm/Warning2.js";
6
+ import I from "iconsax-reactjs/dist/esm/InfoCircle.js";
7
+ import M from "iconsax-reactjs/dist/esm/TickCircle.js";
8
+ import S from "iconsax-reactjs/dist/esm/CloseCircle.js";
9
+ import { cn as t } from "../../lib/utils.js";
10
+ const p = _(
11
11
  "relative w-full",
12
12
  {
13
13
  variants: {
@@ -60,7 +60,7 @@ const p = N(
60
60
  variant: "info"
61
61
  }
62
62
  }
63
- ), y = N(
63
+ ), N = _(
64
64
  "flex w-full gap-2 items-start p-4 rounded-lg border",
65
65
  {
66
66
  variants: {
@@ -78,91 +78,97 @@ const p = N(
78
78
  variant: "info"
79
79
  }
80
80
  }
81
- ), s = b.createContext("info"), V = (i) => i === "success" || i === "info" || i === "error" || i === "warning", M = (i) => i === "inline-info" || i === "inline-caution" || i === "inline-warning", S = {
82
- success: { Icon: j, color: "text-[var(--Text-Success)]" },
83
- info: { Icon: _, color: "text-[var(--Text-Medium-Emphasis)]" },
84
- error: { Icon: E, color: "text-[var(--Text-Caution)]" },
85
- warning: { Icon: g, color: "text-[var(--Text-Warning)]" }
86
- }, W = {
87
- "inline-info": { Icon: _, color: "text-[var(--Text-Medium-Emphasis)]" },
88
- "inline-caution": { Icon: g, color: "text-[var(--Text-Caution)]" },
89
- "inline-warning": { Icon: g, color: "text-[var(--Text-Warning)]" }
81
+ ), s = w.createContext("info"), W = (r) => r === "success" || r === "info" || r === "error" || r === "warning", k = (r) => r === "inline-info" || r === "inline-caution" || r === "inline-warning", A = {
82
+ success: { Icon: M, color: "text-[var(--Text-Success)]" },
83
+ info: { Icon: I, color: "text-[var(--Text-Medium-Emphasis)]" },
84
+ error: { Icon: S, color: "text-[var(--Text-Caution)]" },
85
+ warning: { Icon: h, color: "text-[var(--Text-Warning)]" }
86
+ }, B = {
87
+ "inline-info": { Icon: I, color: "text-[var(--Text-Medium-Emphasis)]" },
88
+ "inline-caution": { Icon: h, color: "text-[var(--Text-Caution)]" },
89
+ "inline-warning": { Icon: h, color: "text-[var(--Text-Warning)]" }
90
+ }, H = (r) => r === "error" || r === "warning" || r === "inline-caution" || r === "inline-warning" ? "alert" : "status", R = (r, e, o) => {
91
+ if (o !== void 0) return o;
92
+ const n = e ?? H(r);
93
+ return n === "off" ? void 0 : n;
90
94
  };
91
- function L({
92
- className: i,
95
+ function K({
96
+ className: r,
93
97
  variant: e = "info",
94
98
  children: o,
95
- title: t,
99
+ title: n,
96
100
  description: a,
97
101
  icon: C,
98
102
  action: l,
103
+ live: j,
104
+ role: E,
99
105
  ...d
100
106
  }) {
101
- const m = V(e), T = M(e), w = (m || T) && !o && (t || a);
102
- if (w && m) {
103
- const { Icon: x, color: f } = S[e], u = h[e] ?? "", v = C ?? /* @__PURE__ */ r(x, { size: 24, className: n("shrink-0", f) });
104
- return /* @__PURE__ */ r(s.Provider, { value: e, children: /* @__PURE__ */ r(
107
+ const m = R(e, j, E), x = W(e), T = k(e), y = (x || T) && !o && (n || a);
108
+ if (y && x) {
109
+ const { Icon: f, color: u } = A[e], v = b[e] ?? "", g = C ?? /* @__PURE__ */ i(f, { size: 24, className: t("shrink-0", u) });
110
+ return /* @__PURE__ */ i(s.Provider, { value: e, children: /* @__PURE__ */ i(
105
111
  "div",
106
112
  {
107
113
  "data-slot": "alert",
108
114
  "data-variant": e,
109
- role: "alert",
110
- className: n(p({ variant: e }), i),
115
+ role: m,
116
+ className: t(p({ variant: e }), r),
111
117
  ...d,
112
- children: /* @__PURE__ */ c("div", { className: y({ variant: e }), children: [
113
- v,
118
+ children: /* @__PURE__ */ c("div", { className: N({ variant: e }), children: [
119
+ g,
114
120
  /* @__PURE__ */ c("div", { className: "flex-1 min-w-0", children: [
115
- t && /* @__PURE__ */ r("div", { className: n("typo-label-md", u), children: t }),
116
- a && /* @__PURE__ */ r("div", { className: "typo-body-sm text-[var(--Text-Medium-Emphasis)] mt-1", children: a })
121
+ n && /* @__PURE__ */ i("div", { className: t("typo-label-md", v), children: n }),
122
+ a && /* @__PURE__ */ i("div", { className: "typo-body-sm text-[var(--Text-Medium-Emphasis)] mt-1", children: a })
117
123
  ] }),
118
- l && /* @__PURE__ */ r("div", { className: "shrink-0", children: l })
124
+ l && /* @__PURE__ */ i("div", { className: "shrink-0", children: l })
119
125
  ] })
120
126
  }
121
127
  ) });
122
128
  }
123
- if (w && T) {
124
- const { Icon: x, color: f } = W[e], u = h[e] ?? "", v = I[e] ?? "", P = C ?? /* @__PURE__ */ r(x, { size: 20, className: n("shrink-0", f) });
125
- return /* @__PURE__ */ r(s.Provider, { value: e, children: /* @__PURE__ */ c(
129
+ if (y && T) {
130
+ const { Icon: f, color: u } = B[e], v = b[e] ?? "", g = P[e] ?? "", V = C ?? /* @__PURE__ */ i(f, { size: 20, className: t("shrink-0", u) });
131
+ return /* @__PURE__ */ i(s.Provider, { value: e, children: /* @__PURE__ */ c(
126
132
  "div",
127
133
  {
128
134
  "data-slot": "alert",
129
135
  "data-variant": e,
130
- role: "alert",
131
- className: n(p({ variant: e }), i),
136
+ role: m,
137
+ className: t(p({ variant: e }), r),
132
138
  ...d,
133
139
  children: [
134
- /* @__PURE__ */ r("div", { className: "flex items-center py-[2.5px] shrink-0", children: P }),
140
+ /* @__PURE__ */ i("div", { className: "flex items-center py-[2.5px] shrink-0", children: V }),
135
141
  /* @__PURE__ */ c("div", { className: "flex flex-1 flex-col", children: [
136
- t && /* @__PURE__ */ r("div", { className: n("typo-label-md", u), children: t }),
137
- a && /* @__PURE__ */ r(
142
+ n && /* @__PURE__ */ i("div", { className: t("typo-label-md", v), children: n }),
143
+ a && /* @__PURE__ */ i(
138
144
  "div",
139
145
  {
140
- className: n(
146
+ className: t(
141
147
  "typo-body-sm",
142
- v || "text-[var(--Text-Medium-Emphasis)]"
148
+ g || "text-[var(--Text-Medium-Emphasis)]"
143
149
  ),
144
150
  children: a
145
151
  }
146
152
  )
147
153
  ] }),
148
- l && /* @__PURE__ */ r("div", { className: "shrink-0", children: l })
154
+ l && /* @__PURE__ */ i("div", { className: "shrink-0", children: l })
149
155
  ]
150
156
  }
151
157
  ) });
152
158
  }
153
- return /* @__PURE__ */ r(s.Provider, { value: e, children: /* @__PURE__ */ r(
159
+ return /* @__PURE__ */ i(s.Provider, { value: e, children: /* @__PURE__ */ i(
154
160
  "div",
155
161
  {
156
162
  "data-slot": "alert",
157
163
  "data-variant": e,
158
- role: "alert",
159
- className: n(p({ variant: e }), i),
164
+ role: m,
165
+ className: t(p({ variant: e }), r),
160
166
  ...d,
161
- children: m ? /* @__PURE__ */ r("div", { className: y({ variant: e }), children: o }) : o
167
+ children: x ? /* @__PURE__ */ i("div", { className: N({ variant: e }), children: o }) : o
162
168
  }
163
169
  ) });
164
170
  }
165
- const h = {
171
+ const b = {
166
172
  success: "text-[var(--Primitive-Forest-800)]",
167
173
  info: "text-[var(--Text-High-Emphasis)]",
168
174
  error: "text-[var(--Text-Caution)]",
@@ -171,49 +177,49 @@ const h = {
171
177
  "inline-caution": "text-[var(--Text-Caution)]",
172
178
  "inline-warning": "text-[var(--Text-Warning)]"
173
179
  };
174
- function R({ className: i, ...e }) {
175
- const o = b.useContext(s), t = h[o ?? "info"] ?? "";
176
- return /* @__PURE__ */ r(
180
+ function O({ className: r, ...e }) {
181
+ const o = w.useContext(s), n = b[o ?? "info"] ?? "";
182
+ return /* @__PURE__ */ i(
177
183
  "div",
178
184
  {
179
185
  "data-slot": "alert-title",
180
- className: n(
186
+ className: t(
181
187
  "typo-label-md",
182
- t,
183
- i
188
+ n,
189
+ r
184
190
  ),
185
191
  ...e
186
192
  }
187
193
  );
188
194
  }
189
- const I = {
195
+ const P = {
190
196
  error: "text-[var(--Text-Caution)]",
191
197
  "inline-caution": "text-[var(--Text-Caution)]",
192
198
  "inline-warning": "text-[var(--Text-Warning)]"
193
199
  };
194
- function q({
195
- className: i,
200
+ function Q({
201
+ className: r,
196
202
  ...e
197
203
  }) {
198
- const o = b.useContext(s), t = I[o ?? ""] ?? "";
199
- return /* @__PURE__ */ r(
204
+ const o = w.useContext(s), n = P[o ?? ""] ?? "";
205
+ return /* @__PURE__ */ i(
200
206
  "div",
201
207
  {
202
208
  "data-slot": "alert-description",
203
- className: n(
209
+ className: t(
204
210
  "typo-body-sm",
205
- t || "text-[var(--Text-Medium-Emphasis)]",
206
- i
211
+ n || "text-[var(--Text-Medium-Emphasis)]",
212
+ r
207
213
  ),
208
214
  ...e
209
215
  }
210
216
  );
211
217
  }
212
218
  export {
213
- L as Alert,
214
- q as AlertDescription,
215
- R as AlertTitle,
216
- I as alertDescriptionVariants,
217
- h as alertTitleVariants,
219
+ K as Alert,
220
+ Q as AlertDescription,
221
+ O as AlertTitle,
222
+ P as alertDescriptionVariants,
223
+ b as alertTitleVariants,
218
224
  p as alertVariants
219
225
  };
@@ -18,11 +18,11 @@ const u = o(
18
18
  "accent-subtle": "bg-[var(--Surface-Accent-Primary-Light)] text-[var(--Text-Accent-Primary)]",
19
19
  "caution-subtle": "bg-[var(--Surface-Caution-Light)] text-[var(--Text-Caution)]",
20
20
  "warning-subtle": "bg-[var(--Surface-Warning)] text-[var(--Text-Warning)] border-[var(--Primitive-Wood-200)]",
21
- "muted-subtle": "bg-[var(--Surface-Tertiary)] text-[var(--Text-Medium-Emphasis)]",
21
+ "muted-subtle": "bg-[var(--Surface-Neutral-Tertiary)] text-[var(--Text-Medium-Emphasis)]",
22
22
  // ── 構造系 ──
23
- secondary: "bg-[var(--Surface-Secondary)] text-[var(--Text-Medium-Emphasis)] [a&]:hover:bg-[var(--Surface-Tertiary)]",
24
- outline: "border-[var(--Border-Medium-Emphasis)] text-[var(--Text-High-Emphasis)] [a&]:hover:bg-[var(--Surface-Secondary)]",
25
- ghost: "text-[var(--Text-Medium-Emphasis)] [a&]:hover:bg-[var(--Surface-Secondary)]",
23
+ secondary: "bg-[var(--Surface-Neutral-Secondary)] text-[var(--Text-Medium-Emphasis)] [a&]:hover:bg-[var(--Surface-Neutral-Tertiary)]",
24
+ outline: "border-[var(--Border-Medium-Emphasis)] text-[var(--Text-High-Emphasis)] [a&]:hover:bg-[var(--Surface-Neutral-Secondary)]",
25
+ ghost: "text-[var(--Text-Medium-Emphasis)] [a&]:hover:bg-[var(--Surface-Neutral-Secondary)]",
26
26
  link: "text-[var(--Brand-Cake-Orange)] underline-offset-4 [a&]:hover:underline"
27
27
  }
28
28
  },
@@ -10,10 +10,10 @@ const u = y(
10
10
  {
11
11
  variants: {
12
12
  variant: {
13
- default: "bg-[var(--Brand-Cake-Orange)] text-[var(--Text-on-Inverse)] hover:bg-[var(--Hover-Primary-Button)] active:bg-[var(--Active-Primary-Button)] disabled:bg-[var(--Surface-Tertiary)] disabled:text-[var(--Text-Disable)]",
14
- secondary: "border border-transparent bg-[var(--Surface-Accent-Primary-Light)] text-[var(--Text-Accent-Primary)] hover:border-[var(--Hover-Primary-Button)] hover:bg-[var(--Hover-Secondary-Button)] hover:text-[var(--Hover-Primary-Button)] active:border-[var(--Active-Primary-Button)] active:bg-[var(--Active-Secondary-Button)] active:text-[var(--Active-Primary-Button)] disabled:border-transparent disabled:bg-[var(--Surface-Tertiary)] disabled:text-[var(--Text-Disable)]",
15
- tertiary: "bg-[var(--Surface-Tertiary)] text-[var(--Text-High-Emphasis)] hover:bg-[var(--Hover-Tertiary-Button)] active:bg-[var(--Active-Tertiary-Button)] disabled:text-[var(--Text-Disable)]",
16
- destructive: "bg-[var(--Surface-Caution)] text-[var(--Text-on-Inverse)] hover:bg-[var(--Primitive-Sun-900)] active:bg-[var(--Primitive-Sun-900)] disabled:bg-[var(--Surface-Tertiary)] disabled:text-[var(--Text-Disable)]",
13
+ default: "bg-[var(--Brand-Cake-Orange)] text-[var(--Text-on-Inverse)] hover:bg-[var(--Hover-Primary-Button)] active:bg-[var(--Active-Primary-Button)] disabled:bg-[var(--Surface-Neutral-Tertiary)] disabled:text-[var(--Text-Disable)]",
14
+ secondary: "border border-transparent bg-[var(--Surface-Accent-Primary-Light)] text-[var(--Text-Accent-Primary)] hover:border-[var(--Hover-Primary-Button)] hover:bg-[var(--Hover-Secondary-Button)] hover:text-[var(--Hover-Primary-Button)] active:border-[var(--Active-Primary-Button)] active:bg-[var(--Active-Secondary-Button)] active:text-[var(--Active-Primary-Button)] disabled:border-transparent disabled:bg-[var(--Surface-Neutral-Tertiary)] disabled:text-[var(--Text-Disable)]",
15
+ tertiary: "bg-[var(--Surface-Neutral-Tertiary)] text-[var(--Text-High-Emphasis)] hover:bg-[var(--Hover-Tertiary-Button)] active:bg-[var(--Active-Tertiary-Button)] disabled:text-[var(--Text-Disable)]",
16
+ destructive: "bg-[var(--Surface-Caution)] text-[var(--Text-on-Inverse)] hover:bg-[var(--Primitive-Sun-900)] active:bg-[var(--Primitive-Sun-900)] disabled:bg-[var(--Surface-Neutral-Tertiary)] disabled:text-[var(--Text-Disable)]",
17
17
  ghost: "text-[var(--Text-High-Emphasis)] hover:bg-[var(--Hover-Text-Button)] active:bg-[var(--Active-Text-Button)] disabled:text-[var(--Text-Disable)]",
18
18
  /**
19
19
  * outline — 白地 + 黒系の 1px 枠。ブランド色を使わない「準主役」の前進アクション
@@ -49,7 +49,7 @@ const u = y(
49
49
  // 下地 Surface-Overlay-Light は「メディア上の可読性のため light/dark で切替えない」
50
50
  // 設計(常に白80%)。文字色にセマンティック(dark で白に反転する Text-High-Emphasis)を
51
51
  // 使うとダークモードで白地×白文字になり消えるため、文字も非反転の Primitive 固定にする
52
- "border border-[var(--Border-Hairline)] bg-[var(--Surface-Overlay-Light)] text-[var(--Primitive-Gray-900)] shadow-md backdrop-blur-sm hover:bg-[var(--Primitive-White-alpha-900)] active:bg-[var(--Primitive-White-alpha-1000)] disabled:bg-[var(--Surface-Tertiary)] disabled:text-[var(--Text-Disable)] disabled:shadow-none"
52
+ "border border-[var(--Border-Hairline)] bg-[var(--Surface-Overlay-Light)] text-[var(--Primitive-Gray-900)] shadow-md backdrop-blur-sm hover:bg-[var(--Primitive-White-alpha-900)] active:bg-[var(--Primitive-White-alpha-1000)] disabled:bg-[var(--Surface-Neutral-Tertiary)] disabled:text-[var(--Text-Disable)] disabled:shadow-none"
53
53
  )
54
54
  },
55
55
  size: {
@@ -119,11 +119,11 @@ function C(e) {
119
119
  `[Button] loading の読み上げ文言の id「${e.id}」が重複しています。同じ aria-labelledby を複数のボタンで共有して loading にする場合は、各ボタンに id を付けてください。`
120
120
  );
121
121
  }
122
- function D(e, r) {
122
+ function N(e, r) {
123
123
  const t = e["aria-labelledby"]?.trim();
124
124
  if (t) {
125
- const s = `${e.id ?? t.split(/\s+/).join("-")}-loading-label`;
126
- return { labelId: s, attrs: { "aria-labelledby": `${t} ${s}` } };
125
+ const l = `${e.id ?? t.split(/\s+/).join("-")}-loading-label`;
126
+ return { labelId: l, attrs: { "aria-labelledby": `${t} ${l}` } };
127
127
  }
128
128
  const a = e["aria-label"];
129
129
  return a && (typeof r == "string" || typeof r == "number") ? { attrs: { "aria-label": `${a} ${r}` } } : { attrs: {} };
@@ -133,12 +133,12 @@ function W({
133
133
  variant: r = "default",
134
134
  size: t = "default",
135
135
  asChild: a = !1,
136
- loading: s = !1,
136
+ loading: l = !1,
137
137
  loadingLabel: o = "処理中",
138
138
  ...b
139
139
  }) {
140
140
  const m = a ? p.Root : "button";
141
- if (!s)
141
+ if (!l)
142
142
  return /* @__PURE__ */ i(
143
143
  m,
144
144
  {
@@ -149,15 +149,15 @@ function W({
149
149
  ...b
150
150
  }
151
151
  );
152
- const { children: l, ...d } = b;
152
+ const { children: s, ...d } = b;
153
153
  if (a) {
154
- const x = h.isValidElement(l) ? h.cloneElement(l, {
154
+ const x = h.isValidElement(s) ? h.cloneElement(s, {
155
155
  "aria-disabled": !0,
156
156
  tabIndex: -1,
157
157
  onClick: n,
158
158
  onClickCapture: n,
159
159
  onAuxClickCapture: n
160
- }) : l;
160
+ }) : s;
161
161
  return /* @__PURE__ */ i(
162
162
  p.Root,
163
163
  {
@@ -173,7 +173,7 @@ function W({
173
173
  }
174
174
  );
175
175
  }
176
- const g = o != null && o !== !1 && o !== "", v = g ? D(d, o) : { attrs: {} };
176
+ const g = o != null && o !== !1 && o !== "", v = g ? N(d, o) : { attrs: {} };
177
177
  return /* @__PURE__ */ f(
178
178
  "button",
179
179
  {
@@ -194,7 +194,7 @@ function W({
194
194
  onClickCapture: n,
195
195
  onClick: n,
196
196
  children: [
197
- l,
197
+ s,
198
198
  g ? /* @__PURE__ */ i(
199
199
  "span",
200
200
  {
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { jsx as e, jsxs as t } from "react/jsx-runtime";
2
+ import { jsx as e, jsxs as s } from "react/jsx-runtime";
3
3
  import * as x from "react";
4
4
  import M from "iconsax-reactjs/dist/esm/TickSquare.js";
5
5
  import { Checkbox as f } from "radix-ui";
@@ -22,7 +22,7 @@ function A({
22
22
  function G({
23
23
  className: c,
24
24
  children: r,
25
- description: s,
25
+ description: t,
26
26
  expandedContent: o,
27
27
  badge: d,
28
28
  checked: i,
@@ -31,15 +31,15 @@ function G({
31
31
  "aria-label": b,
32
32
  "aria-labelledby": k,
33
33
  "aria-describedby": y,
34
- ...S
34
+ ...N
35
35
  }) {
36
- const l = x.useId(), m = `${l}-label`, p = `${l}-description`, h = `${l}-expanded`, [N, B] = x.useState(n === !0), E = (i !== void 0 ? i : N) === !0, u = !!(r || d), C = k ?? (b === void 0 && u ? m : void 0), I = T(
36
+ const l = x.useId(), m = `${l}-label`, u = `${l}-description`, p = `${l}-expanded`, [S, B] = x.useState(n === !0), E = (i !== void 0 ? i : S) === !0, h = !!(r || d), C = k ?? (b === void 0 && h ? m : void 0), I = T(
37
37
  // ラベルが無いカードは名前が内容(= 説明)になるので、説明を重ねて 2 回読ませない
38
- s && u ? p : void 0,
39
- o && E ? h : void 0,
38
+ t && h ? u : void 0,
39
+ o && E ? p : void 0,
40
40
  y
41
41
  );
42
- return /* @__PURE__ */ t(
42
+ return /* @__PURE__ */ s(
43
43
  f.Root,
44
44
  {
45
45
  "data-slot": "checkbox-card-item",
@@ -55,18 +55,18 @@ function G({
55
55
  // lint-scratch-allow: p-[15px] は border-2 を含めた見た目余白を Figma に合わせる補正値
56
56
  "group flex cursor-pointer gap-2 rounded-lg border-2 border-[var(--Border-Control,var(--Border-Medium-Emphasis))] bg-[var(--Surface-Primary)] p-[15px] text-left outline-none transition-colors",
57
57
  o ? "flex-col items-stretch" : "items-center",
58
- "hover:border-[var(--Text-High-Emphasis)] hover:bg-[var(--Surface-Secondary)]",
58
+ "hover:border-[var(--Text-High-Emphasis)] hover:bg-[var(--Surface-Neutral-Secondary)]",
59
59
  "data-[state=checked]:border-[var(--Object-Accent-Primary)] data-[state=checked]:bg-[var(--Surface-Primary)]",
60
60
  // フォーカス意匠は DS 共通(FOCUS_RING = 緑リング)。以前はオレンジの
61
61
  // ring-2 で選択状態と紛らわしかったため統一した。
62
62
  j,
63
63
  "aria-invalid:border-[var(--Border-Caution)]",
64
- "disabled:cursor-not-allowed disabled:border-[var(--Border-Medium-Emphasis)] disabled:bg-[var(--Surface-Secondary)] disabled:hover:border-[var(--Border-Medium-Emphasis)] disabled:hover:bg-[var(--Surface-Secondary)]",
64
+ "disabled:cursor-not-allowed disabled:border-[var(--Border-Medium-Emphasis)] disabled:bg-[var(--Surface-Neutral-Secondary)] disabled:hover:border-[var(--Border-Medium-Emphasis)] disabled:hover:bg-[var(--Surface-Neutral-Secondary)]",
65
65
  c
66
66
  ),
67
- ...S,
67
+ ...N,
68
68
  children: [
69
- /* @__PURE__ */ t("span", { className: a("flex items-center gap-2", o && "w-full"), children: [
69
+ /* @__PURE__ */ s("span", { className: a("flex items-center gap-2", o && "w-full"), children: [
70
70
  /* @__PURE__ */ e(
71
71
  "span",
72
72
  {
@@ -75,7 +75,7 @@ function G({
75
75
  // lint-scratch-allow: rounded-[5px] は Figma チェックボックス固有値(トークン外)
76
76
  "flex size-5 shrink-0 items-center justify-center rounded-[5px] border-2 border-[var(--Border-Control,var(--Border-Medium-Emphasis))] bg-[var(--Surface-Primary)] transition-colors",
77
77
  "group-data-[state=checked]:border-transparent group-data-[state=checked]:bg-transparent",
78
- "group-data-[disabled]:border-[var(--Border-Medium-Emphasis)] group-data-[disabled]:bg-[var(--Surface-Secondary)]"
78
+ "group-data-[disabled]:border-[var(--Border-Medium-Emphasis)] group-data-[disabled]:bg-[var(--Surface-Neutral-Secondary)]"
79
79
  ),
80
80
  children: /* @__PURE__ */ e(
81
81
  f.Indicator,
@@ -87,8 +87,8 @@ function G({
87
87
  )
88
88
  }
89
89
  ),
90
- (r || s || d) && /* @__PURE__ */ t("span", { className: "flex min-w-0 flex-1 flex-col", children: [
91
- (r || d) && /* @__PURE__ */ t("span", { id: m, className: "flex items-center gap-1.5", children: [
90
+ (r || t || d) && /* @__PURE__ */ s("span", { className: "flex min-w-0 flex-1 flex-col", children: [
91
+ (r || d) && /* @__PURE__ */ s("span", { id: m, className: "flex items-center gap-1.5", children: [
92
92
  r && /* @__PURE__ */ e(
93
93
  "span",
94
94
  {
@@ -102,16 +102,16 @@ function G({
102
102
  ),
103
103
  d && /* @__PURE__ */ e("span", { "data-slot": "checkbox-card-badge", children: d })
104
104
  ] }),
105
- s && /* @__PURE__ */ e(
105
+ t && /* @__PURE__ */ e(
106
106
  "span",
107
107
  {
108
- id: p,
108
+ id: u,
109
109
  "data-slot": "checkbox-card-description",
110
110
  className: a(
111
111
  "typo-body-sm text-[var(--Text-Medium-Emphasis)]",
112
112
  "group-data-[disabled]:text-[var(--Text-Low-Emphasis)]"
113
113
  ),
114
- children: s
114
+ children: t
115
115
  }
116
116
  )
117
117
  ] })
@@ -119,7 +119,7 @@ function G({
119
119
  o && /* @__PURE__ */ e(
120
120
  "span",
121
121
  {
122
- id: h,
122
+ id: p,
123
123
  "data-slot": "checkbox-card-expanded",
124
124
  className: "hidden border-t border-[var(--Border-Medium-Emphasis)] pt-3 group-data-[state=checked]:block",
125
125
  children: o
@@ -53,20 +53,20 @@ function $({
53
53
  count: a,
54
54
  containerClassName: l,
55
55
  className: m,
56
- id: C,
56
+ id: N,
57
57
  ref: u,
58
58
  ...s
59
59
  }) {
60
- const c = w(), b = i.useRef(null), f = i.useRef(void 0), [I, R] = i.useState(!1), N = i.useId(), n = C ?? N, h = i.useCallback((o) => {
60
+ const c = w(), b = i.useRef(null), f = i.useRef(void 0), [C, I] = i.useState(!1), R = i.useId(), n = N ?? R, h = i.useCallback((o) => {
61
61
  const d = f.current;
62
62
  f.current = void 0, d ? d() : o || k(u, null), b.current = o, o && (f.current = k(u, o));
63
63
  }, [u]), v = `${n}-label`, p = r ? `${n}-description` : void 0;
64
64
  if ((typeof window > "u" ? i.useEffect : i.useLayoutEffect)(() => {
65
65
  if (e !== void 0 || !b.current || !c) return;
66
66
  const o = Array.from(b.current.labels ?? []).filter((d) => d.id !== c.labelId);
67
- R(o.length > 0);
67
+ I(o.length > 0);
68
68
  }, [c, e]), e === void 0) {
69
- const o = L({ ...s, id: n }, c, I);
69
+ const o = L({ ...s, id: n }, c, C);
70
70
  return /* @__PURE__ */ t(g, { ref: h, id: n, className: m, ...s, ...o });
71
71
  }
72
72
  return /* @__PURE__ */ x(
@@ -77,8 +77,8 @@ function $({
77
77
  "data-disabled": s.disabled || void 0,
78
78
  className: E(
79
79
  "flex items-center gap-3 rounded-md px-3 py-2 transition-colors cursor-pointer",
80
- "hover:bg-[var(--Surface-Tertiary)]",
81
- "has-[:focus-visible]:bg-[var(--Surface-Tertiary)]",
80
+ "hover:bg-[var(--Surface-Neutral-Tertiary)]",
81
+ "has-[:focus-visible]:bg-[var(--Surface-Neutral-Tertiary)]",
82
82
  s.disabled && "cursor-not-allowed opacity-60 hover:bg-transparent has-[:focus-visible]:bg-transparent",
83
83
  l
84
84
  ),
@@ -1,20 +1,20 @@
1
1
  import { cva as e } from "class-variance-authority";
2
2
  import { FOCUS_RING as a } from "../../lib/focus-ring.js";
3
- const t = e(
3
+ const i = e(
4
4
  `inline-flex items-center justify-center whitespace-nowrap transition-colors focus-visible:outline-none ${a}`,
5
5
  {
6
6
  variants: {
7
7
  variant: {
8
8
  filled: [
9
- "bg-[var(--Surface-Secondary)] text-[var(--Text-High-Emphasis)]",
10
- "hover:bg-[var(--Surface-Tertiary)]",
11
- "disabled:text-[var(--Text-Disable)] disabled:hover:bg-[var(--Surface-Secondary)]"
9
+ "bg-[var(--Surface-Neutral-Secondary)] text-[var(--Text-High-Emphasis)]",
10
+ "hover:bg-[var(--Surface-Neutral-Tertiary)]",
11
+ "disabled:text-[var(--Text-Disable)] disabled:hover:bg-[var(--Surface-Neutral-Secondary)]"
12
12
  ].join(" "),
13
13
  /** accent — 薄いブランド色地 + ブランド色文字。Chip の selected は使わなくなった(明示指定の互換のために残す) */
14
14
  accent: [
15
15
  "bg-[var(--Surface-Accent-Primary-Light)] text-[var(--Text-Accent-Primary)]",
16
16
  "hover:bg-[var(--Surface-Accent-Primary)] hover:text-[var(--Text-on-Inverse)]",
17
- "disabled:bg-[var(--Surface-Secondary)] disabled:text-[var(--Text-Disable)] disabled:hover:bg-[var(--Surface-Secondary)] disabled:hover:text-[var(--Text-Disable)]"
17
+ "disabled:bg-[var(--Surface-Neutral-Secondary)] disabled:text-[var(--Text-Disable)] disabled:hover:bg-[var(--Surface-Neutral-Secondary)] disabled:hover:text-[var(--Text-Disable)]"
18
18
  ].join(" "),
19
19
  /**
20
20
  * selected — Chip の選択中。ブランド色を使わず、グレー地 + 1px の黒系の枠で示す
@@ -24,9 +24,9 @@ const t = e(
24
24
  * forced-colors では box-shadow が消えるため、Chip 側が Highlight の塗りで選択中を示す。
25
25
  */
26
26
  selected: [
27
- "bg-[var(--Surface-Tertiary)] text-[var(--Text-High-Emphasis)] inset-ring-1 inset-ring-[var(--Border-High-Emphasis)]",
27
+ "bg-[var(--Surface-Neutral-Tertiary)] text-[var(--Text-High-Emphasis)] inset-ring-1 inset-ring-[var(--Border-High-Emphasis)]",
28
28
  "hover:bg-[var(--Hover-Tertiary-Button)]",
29
- "disabled:bg-[var(--Surface-Secondary)] disabled:text-[var(--Text-Disable)] disabled:inset-ring-transparent disabled:hover:bg-[var(--Surface-Secondary)]"
29
+ "disabled:bg-[var(--Surface-Neutral-Secondary)] disabled:text-[var(--Text-Disable)] disabled:inset-ring-transparent disabled:hover:bg-[var(--Surface-Neutral-Secondary)]"
30
30
  ].join(" ")
31
31
  },
32
32
  size: {
@@ -50,5 +50,5 @@ const t = e(
50
50
  }
51
51
  );
52
52
  export {
53
- t as chipVariants
53
+ i as chipVariants
54
54
  };