@cakejp/design-system 0.20.1 → 0.21.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 (161) hide show
  1. package/CHANGELOG.md +172 -0
  2. package/CLAUDE.md +5 -3
  3. package/MIGRATION.md +3 -3
  4. package/README.md +31 -11
  5. package/contracts/components.json +420 -63
  6. package/contracts/composition.json +38 -4
  7. package/contracts/rules.json +27 -5
  8. package/contracts/screen-patterns.json +6 -4
  9. package/dist/components/ec/admin-shell.js +62 -60
  10. package/dist/components/ec/anniversary-card.js +13 -12
  11. package/dist/components/ec/coupon-card.js +11 -11
  12. package/dist/components/ec/delivery-calendar.js +51 -45
  13. package/dist/components/ec/mypage-shell.js +80 -69
  14. package/dist/components/ec/product-card.js +93 -76
  15. package/dist/components/ec/product-carousel.js +65 -60
  16. package/dist/components/ec/product-detail-bar.js +13 -11
  17. package/dist/components/ec/product-detail-sidebar.js +60 -58
  18. package/dist/components/ec/product-list-item.js +64 -63
  19. package/dist/components/ec/product-option.js +30 -26
  20. package/dist/components/ec/rating-stars.js +27 -27
  21. package/dist/components/ec/review-card.js +32 -32
  22. package/dist/components/ec/review-form.js +37 -37
  23. package/dist/components/ec/shop-card.js +21 -19
  24. package/dist/components/foundations/accordion.js +33 -31
  25. package/dist/components/foundations/alert-dialog.js +4 -5
  26. package/dist/components/foundations/badge.js +5 -5
  27. package/dist/components/foundations/breadcrumb.js +27 -26
  28. package/dist/components/foundations/button.js +144 -25
  29. package/dist/components/foundations/calendar.js +28 -26
  30. package/dist/components/foundations/checkbox-card.js +71 -47
  31. package/dist/components/foundations/checkbox-group.js +30 -27
  32. package/dist/components/foundations/checkbox.js +69 -52
  33. package/dist/components/foundations/chip-variants.js +13 -0
  34. package/dist/components/foundations/command.js +81 -79
  35. package/dist/components/foundations/confirm-dialog.js +136 -0
  36. package/dist/components/foundations/context-menu.js +43 -38
  37. package/dist/components/foundations/data-table.js +87 -84
  38. package/dist/components/foundations/dialog.js +45 -36
  39. package/dist/components/foundations/dropdown-menu.js +47 -42
  40. package/dist/components/foundations/file-input.js +97 -67
  41. package/dist/components/foundations/hover-card.js +21 -21
  42. package/dist/components/foundations/menubar.js +75 -69
  43. package/dist/components/foundations/navigation-menu.js +31 -26
  44. package/dist/components/foundations/pagination.js +54 -50
  45. package/dist/components/foundations/popover.js +7 -7
  46. package/dist/components/foundations/progress.js +10 -6
  47. package/dist/components/foundations/radio-group.js +6 -3
  48. package/dist/components/foundations/responsive-dialog.js +73 -55
  49. package/dist/components/foundations/scroll-area.js +18 -14
  50. package/dist/components/foundations/select.js +44 -39
  51. package/dist/components/foundations/sheet.js +45 -37
  52. package/dist/components/foundations/skeleton.js +6 -6
  53. package/dist/components/foundations/skip-link.js +10 -8
  54. package/dist/components/foundations/slider.js +73 -48
  55. package/dist/components/foundations/sonner.js +5 -4
  56. package/dist/components/foundations/spinner.js +7 -5
  57. package/dist/components/foundations/switch.js +11 -10
  58. package/dist/components/foundations/tabs.js +54 -39
  59. package/dist/components/foundations/toggle-group.js +29 -21
  60. package/dist/components/foundations/toggle.js +20 -16
  61. package/dist/components/primitives/admin-side-nav.js +65 -62
  62. package/dist/components/primitives/banner-carousel.js +32 -29
  63. package/dist/components/primitives/bottom-tab-bar.js +16 -15
  64. package/dist/components/primitives/category-scroll.js +39 -29
  65. package/dist/components/primitives/category-shortcuts.js +9 -9
  66. package/dist/components/primitives/chat-composer.js +77 -74
  67. package/dist/components/primitives/chip.js +84 -61
  68. package/dist/components/primitives/combobox.js +63 -47
  69. package/dist/components/primitives/container.js +9 -9
  70. package/dist/components/primitives/content-card.js +15 -17
  71. package/dist/components/primitives/content-carousel.js +79 -68
  72. package/dist/components/primitives/date-picker.js +137 -99
  73. package/dist/components/primitives/footer.js +36 -37
  74. package/dist/components/primitives/header.js +175 -168
  75. package/dist/components/primitives/image-carousel.js +107 -87
  76. package/dist/components/primitives/image-gallery.js +32 -27
  77. package/dist/components/primitives/image-uploader.js +6 -6
  78. package/dist/components/primitives/list-item.js +59 -51
  79. package/dist/components/primitives/menu-drawer.js +36 -38
  80. package/dist/components/primitives/multi-select.js +89 -58
  81. package/dist/components/primitives/notification-list.js +10 -9
  82. package/dist/components/primitives/number-input.js +116 -105
  83. package/dist/components/primitives/scroll-row.js +21 -0
  84. package/dist/components/primitives/search-bar.js +31 -28
  85. package/dist/components/primitives/section-header.js +54 -53
  86. package/dist/components/primitives/side-nav.js +57 -56
  87. package/dist/components/primitives/sub-nav.js +13 -14
  88. package/dist/components/primitives/tag.js +4 -2
  89. package/dist/index.css +1 -1
  90. package/dist/index.js +3051 -924
  91. package/dist/lib/field-labelling.js +31 -21
  92. package/dist/lib/focus-ring.js +22 -4
  93. package/dist/lib/high-contrast.js +4 -0
  94. package/dist/lib/image-index.js +8 -0
  95. package/dist/lib/use-prefers-reduced-motion.js +21 -0
  96. package/dist/types/components/ec/admin-shell.d.ts +11 -1
  97. package/dist/types/components/ec/anniversary-card.d.ts +9 -1
  98. package/dist/types/components/ec/mypage-shell.d.ts +12 -1
  99. package/dist/types/components/ec/product-card.d.ts +13 -1
  100. package/dist/types/components/ec/product-carousel.d.ts +13 -1
  101. package/dist/types/components/ec/product-detail-bar.d.ts +12 -1
  102. package/dist/types/components/ec/product-detail-sidebar.d.ts +11 -1
  103. package/dist/types/components/ec/product-list-item.d.ts +9 -1
  104. package/dist/types/components/ec/rating-stars.d.ts +2 -0
  105. package/dist/types/components/ec/review-card.d.ts +1 -1
  106. package/dist/types/components/ec/shop-card.d.ts +8 -1
  107. package/dist/types/components/foundations/badge.d.ts +1 -1
  108. package/dist/types/components/foundations/breadcrumb.d.ts +8 -1
  109. package/dist/types/components/foundations/button.d.ts +38 -3
  110. package/dist/types/components/foundations/checkbox-card.d.ts +7 -1
  111. package/dist/types/components/foundations/checkbox.d.ts +1 -1
  112. package/dist/types/components/foundations/chip-variants.d.ts +2 -2
  113. package/dist/types/components/foundations/confirm-dialog.d.ts +61 -0
  114. package/dist/types/components/foundations/data-table.d.ts +9 -2
  115. package/dist/types/components/foundations/dialog.d.ts +16 -1
  116. package/dist/types/components/foundations/pagination.d.ts +1 -1
  117. package/dist/types/components/foundations/responsive-dialog.d.ts +2 -1
  118. package/dist/types/components/foundations/sheet.d.ts +12 -1
  119. package/dist/types/components/foundations/skeleton.d.ts +6 -0
  120. package/dist/types/components/foundations/slider.d.ts +15 -1
  121. package/dist/types/components/foundations/tabs.d.ts +7 -0
  122. package/dist/types/components/primitives/admin-side-nav.d.ts +22 -2
  123. package/dist/types/components/primitives/banner-carousel.d.ts +9 -1
  124. package/dist/types/components/primitives/bottom-tab-bar.d.ts +13 -2
  125. package/dist/types/components/primitives/category-scroll.d.ts +10 -1
  126. package/dist/types/components/primitives/category-shortcuts.d.ts +11 -2
  127. package/dist/types/components/primitives/chip.d.ts +22 -3
  128. package/dist/types/components/primitives/combobox.d.ts +7 -2
  129. package/dist/types/components/primitives/container.d.ts +3 -0
  130. package/dist/types/components/primitives/content-card.d.ts +1 -1
  131. package/dist/types/components/primitives/content-carousel.d.ts +12 -4
  132. package/dist/types/components/primitives/date-picker.d.ts +10 -3
  133. package/dist/types/components/primitives/footer.d.ts +1 -1
  134. package/dist/types/components/primitives/header.d.ts +14 -2
  135. package/dist/types/components/primitives/image-carousel.d.ts +23 -5
  136. package/dist/types/components/primitives/list-item.d.ts +10 -1
  137. package/dist/types/components/primitives/menu-drawer.d.ts +1 -1
  138. package/dist/types/components/primitives/multi-select.d.ts +7 -2
  139. package/dist/types/components/primitives/notification-list.d.ts +10 -1
  140. package/dist/types/components/primitives/number-input.d.ts +18 -5
  141. package/dist/types/components/primitives/scroll-row.d.ts +43 -0
  142. package/dist/types/components/primitives/section-header.d.ts +9 -2
  143. package/dist/types/components/primitives/side-nav.d.ts +13 -1
  144. package/dist/types/components/primitives/sub-nav.d.ts +1 -1
  145. package/dist/types/components/primitives/tag.d.ts +1 -1
  146. package/dist/types/index.d.ts +7 -1
  147. package/dist/types/lib/field-labelling.d.ts +23 -8
  148. package/dist/types/lib/focus-ring.d.ts +70 -3
  149. package/dist/types/lib/high-contrast.d.ts +25 -0
  150. package/dist/types/lib/image-index.d.ts +2 -0
  151. package/dist/types/lib/link-component.d.ts +26 -21
  152. package/dist/types/lib/use-prefers-reduced-motion.d.ts +9 -0
  153. package/package.json +11 -3
  154. package/src/components/COMPONENT_LOOKUP.md +18 -16
  155. package/src/preset-standalone.css +42 -0
  156. package/src/preset.css +20 -1
  157. package/src/styles/semantic.css +57 -0
  158. package/templates/AGENTS.md +5 -1
  159. package/templates/CLAUDE.md +3 -1
  160. package/tokens.json +49 -0
  161. package/dist/lib/link-component.js +0 -6
@@ -2,11 +2,11 @@ import { jsxs as s, jsx as e } from "react/jsx-runtime";
2
2
  import "react";
3
3
  import { cn as r } from "../../lib/utils.js";
4
4
  import { Button as m } from "../foundations/button.js";
5
- import { Tag as Z } from "../primitives/tag.js";
6
- import { NumberInput as _ } from "../primitives/number-input.js";
7
- import { PriceDisplay as q } from "../primitives/price-display.js";
8
- import { BookmarkRibbonIcon as F } from "./product-card.js";
9
- function te({
5
+ import { Tag as q } from "../primitives/tag.js";
6
+ import { NumberInput as F } from "../primitives/number-input.js";
7
+ import { PriceDisplay as D } from "../primitives/price-display.js";
8
+ import { BookmarkRibbonIcon as U } from "./product-card.js";
9
+ function de({
10
10
  name: n,
11
11
  imageUrl: o,
12
12
  price: p,
@@ -18,37 +18,38 @@ function te({
18
18
  hashTags: u,
19
19
  statusLabel: x,
20
20
  variant: i = "default",
21
- showCartButton: k = !1,
22
- onAddToCart: R,
23
- showDetailButton: j = !1,
24
- onViewDetail: V,
25
- showBookmark: W = !1,
26
- href: M,
27
- orderDate: S,
21
+ showCartButton: j = !1,
22
+ onAddToCart: V,
23
+ showDetailButton: M = !1,
24
+ onViewDetail: W,
25
+ showBookmark: A = !1,
26
+ href: S,
27
+ orderDate: C,
28
28
  deliveryInfo: H,
29
29
  totalPrice: v,
30
- showReviewButton: C = !1,
31
- optionInfo: L,
30
+ showReviewButton: L = !1,
31
+ optionInfo: B,
32
32
  // cart variant props
33
33
  quantity: b,
34
- onQuantityChange: A,
35
- quantitySize: G = "sm",
36
- originalPrice: J,
37
- priceLabel: N,
38
- deliveryText: B,
39
- onDelete: g,
34
+ onQuantityChange: G,
35
+ quantitySize: J = "sm",
36
+ originalPrice: K,
37
+ priceLabel: g,
38
+ deliveryText: O,
39
+ onDelete: N,
40
40
  onSaveForLater: w,
41
- imageSize: K = "size-20",
42
- subtotal: O,
43
- subtotalLabel: Q = "小計",
41
+ imageSize: Q = "size-20",
42
+ subtotal: P,
43
+ subtotalLabel: X = "小計",
44
44
  // slot props
45
45
  leftSlot: E,
46
- rightSlot: P,
47
- bottomSlot: $,
48
- className: X,
49
- ...Y
46
+ rightSlot: $,
47
+ bottomSlot: I,
48
+ linkComponent: Y,
49
+ className: Z,
50
+ ..._
50
51
  }) {
51
- const t = i === "small" || i === "xsm", c = i === "review", a = i === "cart", I = a ? K : i === "xsm" ? "size-10" : t ? "size-14" : "size-[102px]";
52
+ const T = Y ?? "a", t = i === "small" || i === "xsm", c = i === "review", a = i === "cart", R = a ? Q : i === "xsm" ? "size-10" : t ? "size-14" : "size-[102px]";
52
53
  return /* @__PURE__ */ s(
53
54
  "div",
54
55
  {
@@ -56,9 +57,9 @@ function te({
56
57
  className: r(
57
58
  "flex flex-col bg-[var(--Surface-Primary)]",
58
59
  i === "lp" && "flex-col rounded-xl bg-[var(--Surface-Secondary)] p-4",
59
- X
60
+ Z
60
61
  ),
61
- ...Y,
62
+ ..._,
62
63
  children: [
63
64
  /* @__PURE__ */ s("div", { className: r(
64
65
  "flex gap-2 px-4 py-2 min-w-0 overflow-hidden",
@@ -66,7 +67,7 @@ function te({
66
67
  a && "gap-3 p-4",
67
68
  i === "lp" && "gap-3 px-0 py-0"
68
69
  ), children: [
69
- E ? /* @__PURE__ */ e("div", { className: "shrink-0", children: E }) : o && !a ? /* @__PURE__ */ s("a", { href: M ?? "#", className: "relative shrink-0", children: [
70
+ E ? /* @__PURE__ */ e("div", { className: "shrink-0", children: E }) : o && !a ? /* @__PURE__ */ s(T, { href: S ?? "#", className: "relative shrink-0", children: [
70
71
  /* @__PURE__ */ e(
71
72
  "img",
72
73
  {
@@ -74,7 +75,7 @@ function te({
74
75
  alt: n,
75
76
  className: r(
76
77
  "rounded-lg object-cover",
77
- I,
78
+ R,
78
79
  i === "lp" && "aspect-video w-full size-auto rounded-lg"
79
80
  )
80
81
  }
@@ -86,7 +87,7 @@ function te({
86
87
  {
87
88
  className: r(
88
89
  "relative shrink-0 overflow-hidden rounded-lg bg-[var(--Surface-Secondary)]",
89
- I
90
+ R
90
91
  ),
91
92
  children: [
92
93
  /* @__PURE__ */ e(
@@ -106,7 +107,7 @@ function te({
106
107
  c ? "flex flex-col justify-between self-stretch" : a ? "flex flex-col gap-2" : "space-y-1"
107
108
  ), children: [
108
109
  (f || d) && !t && !c && (z ? /* @__PURE__ */ s(
109
- "a",
110
+ T,
110
111
  {
111
112
  href: z,
112
113
  className: "block truncate typo-body-sm text-[var(--Text-Medium-Emphasis)] underline decoration-[var(--Text-Medium-Emphasis)] hover:text-[var(--Text-High-Emphasis)]",
@@ -120,9 +121,9 @@ function te({
120
121
  d && ` / ${d}`
121
122
  ] })),
122
123
  a ? /* @__PURE__ */ e("h3", { className: "line-clamp-2 typo-body-md text-[var(--Text-High-Emphasis)] min-w-0 break-words", children: n }) : /* @__PURE__ */ e(
123
- "a",
124
+ T,
124
125
  {
125
- href: M ?? "#",
126
+ href: S ?? "#",
126
127
  className: r(
127
128
  "block text-[var(--Text-High-Emphasis)]",
128
129
  t ? "truncate typo-body-sm" : "line-clamp-2 typo-label-md"
@@ -134,29 +135,29 @@ function te({
134
135
  "#",
135
136
  l
136
137
  ] }, l)) }),
137
- y && y.length > 0 && !t && !c && /* @__PURE__ */ e("div", { className: "flex flex-wrap gap-1", children: y.map((l, T) => /* @__PURE__ */ e(Z, { variant: l.variant, size: a ? "sm" : void 0, children: l.label }, T)) }),
138
- a && B && /* @__PURE__ */ e("p", { className: "typo-body-sm text-[var(--Text-Low-Emphasis)]", children: B }),
138
+ y && y.length > 0 && !t && !c && /* @__PURE__ */ e("div", { className: "flex flex-wrap gap-1", children: y.map((l, k) => /* @__PURE__ */ e(q, { variant: l.variant, size: a ? "sm" : void 0, children: l.label }, k)) }),
139
+ a && O && /* @__PURE__ */ e("p", { className: "typo-body-sm text-[var(--Text-Low-Emphasis)]", children: O }),
139
140
  a && p !== void 0 && /* @__PURE__ */ s("div", { className: "flex items-center justify-between min-w-0 gap-2 overflow-hidden", children: [
140
- N && /* @__PURE__ */ e("span", { className: "typo-body-sm text-[var(--Text-Low-Emphasis)] shrink-0", children: N }),
141
- /* @__PURE__ */ e("div", { className: r("min-w-0 shrink-0", !N && "ml-auto"), children: /* @__PURE__ */ e(
142
- q,
141
+ g && /* @__PURE__ */ e("span", { className: "typo-body-sm text-[var(--Text-Low-Emphasis)] shrink-0", children: g }),
142
+ /* @__PURE__ */ e("div", { className: r("min-w-0 shrink-0", !g && "ml-auto"), children: /* @__PURE__ */ e(
143
+ D,
143
144
  {
144
145
  price: p,
145
- originalPrice: J,
146
+ originalPrice: K,
146
147
  size: "sm",
147
148
  showTaxLabel: !1
148
149
  }
149
150
  ) })
150
151
  ] }),
151
152
  a && h && /* @__PURE__ */ e("p", { className: "typo-body-xs text-[var(--Text-Medium-Emphasis)]", children: h }),
152
- a && (b !== void 0 || g || w) && /* @__PURE__ */ s("div", { className: "flex flex-wrap items-center justify-between gap-2", children: [
153
+ a && (b !== void 0 || N || w) && /* @__PURE__ */ s("div", { className: "flex flex-wrap items-center justify-between gap-2", children: [
153
154
  /* @__PURE__ */ s("div", { className: "flex items-center gap-1", children: [
154
- g && /* @__PURE__ */ e(
155
+ N && /* @__PURE__ */ e(
155
156
  m,
156
157
  {
157
158
  variant: "tertiary",
158
159
  size: "sm",
159
- onClick: g,
160
+ onClick: N,
160
161
  "aria-label": "削除",
161
162
  children: "削除"
162
163
  }
@@ -169,7 +170,7 @@ function te({
169
170
  onClick: w,
170
171
  "aria-label": "あとで買う",
171
172
  children: [
172
- /* @__PURE__ */ e(F, { size: 16 }),
173
+ /* @__PURE__ */ e(U, { size: 16 }),
173
174
  "あとで買う"
174
175
  ]
175
176
  }
@@ -177,18 +178,18 @@ function te({
177
178
  ] }),
178
179
  /* @__PURE__ */ s("div", { className: "flex flex-wrap items-center justify-end gap-2", children: [
179
180
  b !== void 0 && /* @__PURE__ */ e(
180
- _,
181
+ F,
181
182
  {
182
183
  value: b,
183
- size: G,
184
- onChange: A
184
+ size: J,
185
+ onChange: G
185
186
  }
186
187
  ),
187
- O !== void 0 && /* @__PURE__ */ s("div", { className: "flex items-baseline gap-1", children: [
188
- /* @__PURE__ */ e("span", { className: "typo-body-sm text-[var(--Text-Low-Emphasis)]", children: Q }),
188
+ P !== void 0 && /* @__PURE__ */ s("div", { className: "flex items-baseline gap-1", children: [
189
+ /* @__PURE__ */ e("span", { className: "typo-body-sm text-[var(--Text-Low-Emphasis)]", children: X }),
189
190
  /* @__PURE__ */ s("span", { className: "typo-label-md text-[var(--Text-High-Emphasis)]", children: [
190
191
  "¥",
191
- O.toLocaleString()
192
+ P.toLocaleString()
192
193
  ] })
193
194
  ] })
194
195
  ] })
@@ -209,9 +210,9 @@ function te({
209
210
  ] })
210
211
  ] }),
211
212
  i === "order-history" && /* @__PURE__ */ s("div", { className: "space-y-0.5 typo-body-sm text-[var(--Text-Low-Emphasis)]", children: [
212
- S && /* @__PURE__ */ s("p", { children: [
213
+ C && /* @__PURE__ */ s("p", { children: [
213
214
  "お届け日:",
214
- S
215
+ C
215
216
  ] }),
216
217
  H && /* @__PURE__ */ s("p", { children: [
217
218
  "お届け先:",
@@ -225,17 +226,17 @@ function te({
225
226
  ] })
226
227
  ] })
227
228
  ] }),
228
- L && /* @__PURE__ */ e("div", { className: "space-y-0.5 typo-body-sm text-[var(--Text-Low-Emphasis)]", children: Object.entries(L).map(([l, T]) => /* @__PURE__ */ s("p", { children: [
229
+ B && /* @__PURE__ */ e("div", { className: "space-y-0.5 typo-body-sm text-[var(--Text-Low-Emphasis)]", children: Object.entries(B).map(([l, k]) => /* @__PURE__ */ s("p", { children: [
229
230
  l,
230
231
  ":",
231
- /* @__PURE__ */ e("span", { className: "text-[var(--Text-Medium-Emphasis)]", children: T })
232
+ /* @__PURE__ */ e("span", { className: "text-[var(--Text-Medium-Emphasis)]", children: k })
232
233
  ] }, l)) })
233
234
  ] }),
234
- P ? /* @__PURE__ */ e("div", { className: "shrink-0 self-start", children: P }) : W && !c && /* @__PURE__ */ e(
235
+ $ ? /* @__PURE__ */ e("div", { className: "shrink-0 self-start", children: $ }) : A && !c && /* @__PURE__ */ e(
235
236
  "button",
236
237
  {
237
238
  type: "button",
238
- className: "flex size-9 shrink-0 items-center justify-center self-start rounded-full border border-[var(--Border-Medium-Emphasis)] bg-[var(--Surface-Secondary)] transition-colors hover:border-[var(--Border-High-Emphasis)] hover:bg-[var(--Surface-Tertiary)]",
239
+ className: "flex size-9 shrink-0 items-center justify-center self-start rounded-full border border-[var(--Border-Control,var(--Border-Medium-Emphasis))] bg-[var(--Surface-Secondary)] transition-colors hover:border-[var(--Border-High-Emphasis)] hover:bg-[var(--Surface-Tertiary)]",
239
240
  "aria-label": "ブックマーク",
240
241
  children: /* @__PURE__ */ e(
241
242
  "svg",
@@ -252,15 +253,15 @@ function te({
252
253
  }
253
254
  )
254
255
  ] }),
255
- $ ? /* @__PURE__ */ e("div", { className: "px-4 py-3", children: $ }) : (k || j || C) && /* @__PURE__ */ s("div", { className: "flex justify-end gap-3.5 px-4 py-3", children: [
256
- j && /* @__PURE__ */ e(m, { variant: "tertiary", size: "sm", onClick: V, children: "商品詳細を見る" }),
257
- C && /* @__PURE__ */ e(m, { variant: "secondary", size: "sm", children: "レビューを書く" }),
258
- k && /* @__PURE__ */ e(m, { size: "sm", onClick: R, children: "カートに追加" })
256
+ I ? /* @__PURE__ */ e("div", { className: "px-4 py-3", children: I }) : (j || M || L) && /* @__PURE__ */ s("div", { className: "flex justify-end gap-3.5 px-4 py-3", children: [
257
+ M && /* @__PURE__ */ e(m, { variant: "tertiary", size: "sm", onClick: W, children: "商品詳細を見る" }),
258
+ L && /* @__PURE__ */ e(m, { variant: "secondary", size: "sm", children: "レビューを書く" }),
259
+ j && /* @__PURE__ */ e(m, { size: "sm", onClick: V, children: "カートに追加" })
259
260
  ] })
260
261
  ]
261
262
  }
262
263
  );
263
264
  }
264
265
  export {
265
- te as ProductListItem
266
+ de as ProductListItem
266
267
  };
@@ -1,13 +1,14 @@
1
1
  "use client";
2
2
  import { jsxs as l, jsx as e } from "react/jsx-runtime";
3
3
  import * as d from "react";
4
- import x from "iconsax-reactjs/dist/esm/ArrowDown2.js";
5
- import y from "iconsax-reactjs/dist/esm/Add.js";
6
- import g from "iconsax-reactjs/dist/esm/Minus.js";
4
+ import y from "iconsax-reactjs/dist/esm/ArrowDown2.js";
5
+ import g from "iconsax-reactjs/dist/esm/Add.js";
6
+ import N from "iconsax-reactjs/dist/esm/Minus.js";
7
7
  import E from "iconsax-reactjs/dist/esm/ExportSquare.js";
8
- import { cn as N } from "../../lib/utils.js";
8
+ import { cn as b } from "../../lib/utils.js";
9
+ import { FOCUS_RING_ONLY as C, FORCED_COLORS_FOCUS as O } from "../../lib/focus-ring.js";
9
10
  import { Button as h } from "../foundations/button.js";
10
- import { Input as C } from "../foundations/input.js";
11
+ import { Input as B } from "../foundations/input.js";
11
12
  import { Label as T } from "../foundations/label.js";
12
13
  function j({
13
14
  type: r,
@@ -17,22 +18,22 @@ function j({
17
18
  helpText: o,
18
19
  error: s,
19
20
  children: n,
20
- className: b,
21
- ...v
21
+ className: v,
22
+ ...f
22
23
  }) {
23
- const c = d.useId(), p = o ? `${c}-help` : void 0, u = s ? `${c}-error` : void 0, f = [p, u].filter(Boolean).join(" ") || void 0;
24
+ const c = d.useId(), p = o ? `${c}-help` : void 0, u = s ? `${c}-error` : void 0, x = [p, u].filter(Boolean).join(" ") || void 0;
24
25
  return /* @__PURE__ */ l(
25
26
  "div",
26
27
  {
27
28
  "data-slot": "product-option",
28
29
  role: "group",
29
30
  "aria-labelledby": `${c}-label`,
30
- className: N(
31
+ className: b(
31
32
  "space-y-2 rounded-lg border border-[var(--Border-Medium-Emphasis)] bg-[var(--Surface-Primary)] p-3",
32
33
  s && "border-[var(--Border-Caution)]",
33
- b
34
+ v
34
35
  ),
35
- ...v,
36
+ ...f,
36
37
  children: [
37
38
  /* @__PURE__ */ l("div", { className: "flex items-center gap-2", children: [
38
39
  /* @__PURE__ */ l(T, { id: `${c}-label`, className: "typo-label-md text-[var(--Text-High-Emphasis)]", children: [
@@ -43,7 +44,7 @@ function j({
43
44
  a && /* @__PURE__ */ e("span", { className: "typo-body-sm text-[var(--Text-Medium-Emphasis)]", children: a })
44
45
  ] }),
45
46
  d.Children.map(n, (m) => d.isValidElement(m) ? d.cloneElement(m, {
46
- "aria-describedby": f,
47
+ "aria-describedby": x,
47
48
  "aria-invalid": s ? !0 : void 0
48
49
  }) : m),
49
50
  o && /* @__PURE__ */ e("p", { id: p, className: "typo-body-sm text-[var(--Text-Low-Emphasis)]", children: o }),
@@ -52,7 +53,7 @@ function j({
52
53
  }
53
54
  );
54
55
  }
55
- function $({
56
+ function R({
56
57
  value: r,
57
58
  min: i = 0,
58
59
  max: t = 99,
@@ -68,7 +69,7 @@ function $({
68
69
  onClick: () => a?.(Math.max(i, r - 1)),
69
70
  disabled: r <= i,
70
71
  "aria-label": "減らす",
71
- children: /* @__PURE__ */ e(g, { size: 16 })
72
+ children: /* @__PURE__ */ e(N, { size: 16 })
72
73
  }
73
74
  ),
74
75
  /* @__PURE__ */ e("span", { className: "w-8 shrink-0 text-center typo-label-md tabular-nums text-[var(--Text-High-Emphasis)]", "aria-live": "polite", children: r }),
@@ -80,12 +81,12 @@ function $({
80
81
  onClick: () => a?.(Math.min(t, r + 1)),
81
82
  disabled: r >= t,
82
83
  "aria-label": "増やす",
83
- children: /* @__PURE__ */ e(y, { size: 16 })
84
+ children: /* @__PURE__ */ e(g, { size: 16 })
84
85
  }
85
86
  )
86
87
  ] });
87
88
  }
88
- function F({
89
+ function _({
89
90
  value: r,
90
91
  options: i,
91
92
  onChange: t,
@@ -101,17 +102,20 @@ function F({
101
102
  value: r,
102
103
  onChange: (n) => t?.(n.target.value),
103
104
  "aria-label": a,
104
- className: "w-full appearance-none rounded-md border border-[var(--Border-High-Emphasis)] bg-[var(--Surface-Primary)] px-3 py-2 pr-8 typo-body-md text-[var(--Text-High-Emphasis)] focus:border-[var(--Focus-High-Emphasis)] focus:outline-none focus:ring-[3px] focus:ring-[var(--Focus-High-Emphasis)]/50",
105
+ className: b(
106
+ "w-full appearance-none rounded-md border border-[var(--Border-High-Emphasis)] bg-[var(--Surface-Primary)] px-3 py-2 pr-8 typo-body-md text-[var(--Text-High-Emphasis)] focus:border-[var(--Focus-High-Emphasis)] focus:outline-none focus:ring-[3px] focus:ring-[var(--Focus-High-Emphasis)]/50",
107
+ O
108
+ ),
105
109
  children: [
106
110
  /* @__PURE__ */ e("option", { value: "", disabled: !0, children: a }),
107
111
  i.map((n) => /* @__PURE__ */ e("option", { value: n.value, children: n.label }, n.value))
108
112
  ]
109
113
  }
110
114
  ),
111
- /* @__PURE__ */ e(x, { size: 16, className: "pointer-events-none absolute right-2 top-1/2 -translate-y-1/2 text-[var(--Text-Low-Emphasis)]" })
115
+ /* @__PURE__ */ e(y, { size: 16, className: "pointer-events-none absolute right-2 top-1/2 -translate-y-1/2 text-[var(--Text-Low-Emphasis)]" })
112
116
  ] });
113
117
  }
114
- function L({
118
+ function P({
115
119
  value: r,
116
120
  onChange: i,
117
121
  placeholder: t = "プレイスホルダー",
@@ -121,7 +125,7 @@ function L({
121
125
  const s = d.useId();
122
126
  return /* @__PURE__ */ l("div", { className: "space-y-1", ...o, children: [
123
127
  /* @__PURE__ */ e(
124
- C,
128
+ B,
125
129
  {
126
130
  id: s,
127
131
  value: r,
@@ -138,7 +142,7 @@ function L({
138
142
  ] })
139
143
  ] });
140
144
  }
141
- function P({
145
+ function U({
142
146
  onUpload: r,
143
147
  ...i
144
148
  }) {
@@ -148,7 +152,7 @@ function P({
148
152
  type: "button",
149
153
  onClick: r,
150
154
  "aria-label": "画像をアップロード",
151
- className: "flex h-24 w-full flex-col items-center justify-center gap-2 rounded-lg border-2 border-dashed border-[var(--Border-Medium-Emphasis)] bg-[var(--Surface-Secondary)] text-[var(--Text-Low-Emphasis)] transition-colors hover:border-[var(--Brand-Cake-Orange)] hover:text-[var(--Brand-Cake-Orange)] focus-visible:ring-[3px] focus-visible:ring-[var(--Focus-High-Emphasis)]/50 focus-visible:outline-none",
155
+ className: `flex h-24 w-full flex-col items-center justify-center gap-2 rounded-lg border-2 border-dashed border-[var(--Border-Control,var(--Border-Medium-Emphasis))] bg-[var(--Surface-Secondary)] text-[var(--Text-Low-Emphasis)] transition-colors hover:border-[var(--Brand-Cake-Orange)] hover:text-[var(--Brand-Cake-Orange)] ${C} focus-visible:outline-none`,
152
156
  ...i,
153
157
  children: [
154
158
  /* @__PURE__ */ e(E, { size: 24 }),
@@ -158,9 +162,9 @@ function P({
158
162
  );
159
163
  }
160
164
  export {
161
- P as OptionImageUpload,
162
- $ as OptionQuantity,
163
- F as OptionSelect,
164
- L as OptionText,
165
+ U as OptionImageUpload,
166
+ R as OptionQuantity,
167
+ _ as OptionSelect,
168
+ P as OptionText,
165
169
  j as ProductOption
166
170
  };
@@ -1,20 +1,20 @@
1
- import { jsxs as o, jsx as e } from "react/jsx-runtime";
1
+ import { jsxs as o, jsx as l } from "react/jsx-runtime";
2
2
  import "react";
3
- import { cn as n } from "../../lib/utils.js";
4
- function g({
5
- size: a = 14,
6
- className: l
3
+ import { cn as s } from "../../lib/utils.js";
4
+ function u({
5
+ size: t = 14,
6
+ className: e
7
7
  }) {
8
- return /* @__PURE__ */ e(
8
+ return /* @__PURE__ */ l(
9
9
  "svg",
10
10
  {
11
- width: a,
12
- height: a,
11
+ width: t,
12
+ height: t,
13
13
  viewBox: "0 0 16 16",
14
14
  fill: "currentColor",
15
- className: l,
15
+ className: e,
16
16
  "aria-hidden": "true",
17
- children: /* @__PURE__ */ e("path", { d: "M8 0C8.4 3.6 12.4 7.6 16 8C12.4 8.4 8.4 12.4 8 16C7.6 12.4 3.6 8.4 0 8C3.6 7.6 7.6 3.6 8 0Z" })
17
+ children: /* @__PURE__ */ l("path", { d: "M8 0C8.4 3.6 12.4 7.6 16 8C12.4 8.4 8.4 12.4 8 16C7.6 12.4 3.6 8.4 0 8C3.6 7.6 7.6 3.6 8 0Z" })
18
18
  }
19
19
  );
20
20
  }
@@ -24,44 +24,44 @@ const x = {
24
24
  lg: { iconSize: 18, valueCls: "typo-label-lg", countCls: "typo-body-md" }
25
25
  };
26
26
  function b({
27
- className: a,
28
- rating: l,
29
- reviewCount: t,
30
- size: i = "sm",
27
+ className: t,
28
+ rating: e,
29
+ reviewCount: a,
30
+ size: n = "sm",
31
31
  showCount: r = !0,
32
32
  showValue: c = !0,
33
33
  ...m
34
34
  }) {
35
- const s = Math.max(0, Math.min(5, l)), { iconSize: d, valueCls: p, countCls: u } = x[i];
35
+ const i = Math.max(0, Math.min(5, e)), { iconSize: d, valueCls: p, countCls: h } = x[n];
36
36
  return /* @__PURE__ */ o(
37
37
  "div",
38
38
  {
39
39
  "data-slot": "rating-stars",
40
- className: n("inline-flex items-center gap-0.5", a),
40
+ className: s("inline-flex items-center gap-0.5", t),
41
41
  role: "img",
42
- "aria-label": `評価 ${s.toFixed(1)} / 5${t != null ? ` (${t}件)` : ""}`,
42
+ "aria-label": `評価 ${i.toFixed(1)} / 5${a != null ? ` (${a}件)` : ""}`,
43
43
  ...m,
44
44
  children: [
45
- /* @__PURE__ */ e(
46
- g,
45
+ /* @__PURE__ */ l(
46
+ u,
47
47
  {
48
48
  size: d,
49
- className: "text-[var(--Brand-Cake-Orange)]"
49
+ className: "text-[var(--Text-High-Emphasis)]"
50
50
  }
51
51
  ),
52
- c && /* @__PURE__ */ e(
52
+ c && /* @__PURE__ */ l(
53
53
  "span",
54
54
  {
55
- className: n(
56
- "text-[var(--Brand-Cake-Orange)]",
55
+ className: s(
56
+ "text-[var(--Text-High-Emphasis)]",
57
57
  p
58
58
  ),
59
- children: s.toFixed(2)
59
+ children: i.toFixed(2)
60
60
  }
61
61
  ),
62
- r && t != null && /* @__PURE__ */ o("span", { className: n("text-[var(--Text-Low-Emphasis)]", u), children: [
62
+ r && a != null && /* @__PURE__ */ o("span", { className: s("text-[var(--Text-Low-Emphasis)]", h), children: [
63
63
  "(",
64
- t.toLocaleString("ja-JP"),
64
+ a.toLocaleString("ja-JP"),
65
65
  ")"
66
66
  ] })
67
67
  ]
@@ -70,5 +70,5 @@ function b({
70
70
  }
71
71
  export {
72
72
  b as RatingStars,
73
- g as SparkleIcon
73
+ u as SparkleIcon
74
74
  };
@@ -1,57 +1,57 @@
1
1
  import { jsxs as a, jsx as e } from "react/jsx-runtime";
2
2
  import "react";
3
- import z from "iconsax-reactjs/dist/esm/Like1.js";
3
+ import E from "iconsax-reactjs/dist/esm/Like1.js";
4
4
  import { cn as r } from "../../lib/utils.js";
5
- import { SparkleIcon as E } from "./rating-stars.js";
6
- function P({
7
- className: f,
8
- variant: m = "list",
9
- bordered: v = !0,
10
- rating: h,
5
+ import { SparkleIcon as z } from "./rating-stars.js";
6
+ function M({
7
+ className: h,
8
+ variant: d = "list",
9
+ bordered: f = !0,
10
+ rating: v,
11
11
  date: u,
12
12
  text: s,
13
- imageUrl: d,
14
- productName: l,
13
+ imageUrl: m,
14
+ productName: i,
15
15
  productImageUrl: o,
16
- helpfulCount: i,
16
+ helpfulCount: l,
17
17
  isLiked: t = !1,
18
18
  onLikeClick: g,
19
- onMoreClick: y,
20
- maxLength: c = 80,
21
- ...b
19
+ onMoreClick: b,
20
+ maxLength: n = 80,
21
+ ...y
22
22
  }) {
23
- const n = m === "pc", p = m === "card", N = s.length > c ? s.slice(0, c) + "..." : s, w = s.length > c, T = n ? "size-64" : "size-20";
23
+ const c = d === "pc", p = d === "card", N = s.length > n ? s.slice(0, n) + "..." : s, w = s.length > n, T = c ? "size-64" : "size-20";
24
24
  return /* @__PURE__ */ a(
25
25
  "div",
26
26
  {
27
27
  "data-slot": "review-card",
28
28
  className: r(
29
29
  "flex flex-col rounded-lg bg-[var(--Surface-Primary)]",
30
- v && "border border-[var(--Border-Medium-Emphasis)]",
31
- n ? "w-full max-w-[680px] gap-4 p-6" : "min-w-[240px] w-full gap-2 p-4",
30
+ f && "border border-[var(--Border-Medium-Emphasis)]",
31
+ c ? "w-full max-w-[680px] gap-4 p-6" : "min-w-[240px] w-full gap-2 p-4",
32
32
  p && "items-center",
33
- f
33
+ h
34
34
  ),
35
- ...b,
35
+ ...y,
36
36
  children: [
37
- p && l && /* @__PURE__ */ a("div", { className: "flex w-full items-center gap-1.5 rounded bg-[var(--Surface-Secondary)] p-2", children: [
37
+ p && i && /* @__PURE__ */ a("div", { className: "flex w-full items-center gap-1.5 rounded bg-[var(--Surface-Secondary)] p-2", children: [
38
38
  o && /* @__PURE__ */ e(
39
39
  "img",
40
40
  {
41
41
  src: o,
42
- alt: l,
42
+ alt: i,
43
43
  className: "size-8 shrink-0 rounded object-cover"
44
44
  }
45
45
  ),
46
- /* @__PURE__ */ e("span", { className: "typo-body-sm text-[var(--Text-High-Emphasis)]", children: l })
46
+ /* @__PURE__ */ e("span", { className: "typo-body-sm text-[var(--Text-High-Emphasis)]", children: i })
47
47
  ] }),
48
48
  /* @__PURE__ */ a("div", { className: "flex w-full items-center justify-between", children: [
49
49
  /* @__PURE__ */ e("div", { className: "flex items-start", children: Array.from({ length: 5 }).map((k, x) => /* @__PURE__ */ e(
50
- E,
50
+ z,
51
51
  {
52
52
  size: 20,
53
53
  className: r(
54
- x < h ? "text-[var(--Brand-Cake-Orange)]" : "text-[var(--Border-Low-Emphasis)]"
54
+ x < v ? "text-[var(--Brand-Cake-Orange)]" : "text-[var(--Border-Low-Emphasis)]"
55
55
  )
56
56
  },
57
57
  x
@@ -63,7 +63,7 @@ function P({
63
63
  {
64
64
  className: r(
65
65
  "flex w-full items-start",
66
- n ? "gap-4" : "gap-2"
66
+ c ? "gap-4" : "gap-2"
67
67
  ),
68
68
  children: [
69
69
  /* @__PURE__ */ a("p", { className: "min-w-0 flex-1 typo-body-md text-[var(--Text-High-Emphasis)]", children: [
@@ -72,16 +72,16 @@ function P({
72
72
  "button",
73
73
  {
74
74
  type: "button",
75
- className: "typo-label-md text-[var(--Text-Accent-Primary)]",
76
- onClick: y,
75
+ className: "typo-label-md text-[var(--Text-Medium-Emphasis)] underline underline-offset-4 hover:text-[var(--Text-High-Emphasis)]",
76
+ onClick: b,
77
77
  children: "もっと見る"
78
78
  }
79
79
  )
80
80
  ] }),
81
- d && /* @__PURE__ */ e("div", { className: r("shrink-0 overflow-hidden rounded-lg", T), children: /* @__PURE__ */ e(
81
+ m && /* @__PURE__ */ e("div", { className: r("shrink-0 overflow-hidden rounded-lg", T), children: /* @__PURE__ */ e(
82
82
  "img",
83
83
  {
84
- src: d,
84
+ src: m,
85
85
  alt: "レビュー画像",
86
86
  className: "size-full object-cover"
87
87
  }
@@ -89,7 +89,7 @@ function P({
89
89
  ]
90
90
  }
91
91
  ),
92
- i != null && /* @__PURE__ */ a(
92
+ l != null && /* @__PURE__ */ a(
93
93
  "button",
94
94
  {
95
95
  type: "button",
@@ -97,7 +97,7 @@ function P({
97
97
  onClick: g,
98
98
  children: [
99
99
  /* @__PURE__ */ e(
100
- z,
100
+ E,
101
101
  {
102
102
  size: 16,
103
103
  className: r(
@@ -113,7 +113,7 @@ function P({
113
113
  "typo-label-md",
114
114
  t ? "text-[var(--Text-Accent-Primary)]" : "text-[var(--Text-Medium-Emphasis)]"
115
115
  ),
116
- children: t ? i.toString() : `参考になった ${i}`
116
+ children: t ? l.toString() : `参考になった ${l}`
117
117
  }
118
118
  )
119
119
  ]
@@ -124,5 +124,5 @@ function P({
124
124
  );
125
125
  }
126
126
  export {
127
- P as ReviewCard
127
+ M as ReviewCard
128
128
  };