@cakejp/design-system 0.17.1 → 0.19.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 (88) hide show
  1. package/CHANGELOG.md +50 -0
  2. package/CLAUDE.md +15 -0
  3. package/contracts/components.json +144 -16
  4. package/contracts/composition.json +1 -1
  5. package/contracts/rules.json +5 -1
  6. package/contracts/screen-patterns.json +1 -1
  7. package/dist/components/ec/admin-shell.js +7 -6
  8. package/dist/components/ec/product-card.js +107 -102
  9. package/dist/components/ec/product-option.js +1 -0
  10. package/dist/components/ec/review-card.js +22 -20
  11. package/dist/components/ec/review-form.js +1 -0
  12. package/dist/components/foundations/accordion.js +23 -22
  13. package/dist/components/foundations/alert.js +1 -0
  14. package/dist/components/foundations/aspect-ratio.js +3 -2
  15. package/dist/components/foundations/avatar.js +1 -0
  16. package/dist/components/foundations/button.js +7 -1
  17. package/dist/components/foundations/calendar.js +1 -0
  18. package/dist/components/foundations/checkbox-group.js +1 -0
  19. package/dist/components/foundations/checkbox.js +1 -0
  20. package/dist/components/foundations/command.js +1 -0
  21. package/dist/components/foundations/context-menu.js +1 -0
  22. package/dist/components/foundations/drawer.js +1 -0
  23. package/dist/components/foundations/file-input.js +1 -0
  24. package/dist/components/foundations/form.js +26 -25
  25. package/dist/components/foundations/pagination.js +49 -46
  26. package/dist/components/foundations/popover.js +9 -8
  27. package/dist/components/foundations/radio-group.js +3 -2
  28. package/dist/components/foundations/responsive-dialog.js +1 -0
  29. package/dist/components/foundations/separator.js +7 -6
  30. package/dist/components/foundations/sheet.js +40 -33
  31. package/dist/components/foundations/slider.js +7 -6
  32. package/dist/components/foundations/social-icon.js +30 -10
  33. package/dist/components/foundations/sonner.js +5 -4
  34. package/dist/components/foundations/tabs.js +45 -25
  35. package/dist/components/foundations/toggle-group.js +6 -5
  36. package/dist/components/primitives/admin-side-nav.js +1 -0
  37. package/dist/components/primitives/chat-composer.js +1 -0
  38. package/dist/components/primitives/combobox.js +1 -0
  39. package/dist/components/primitives/content-card.js +111 -0
  40. package/dist/components/primitives/content-carousel.js +9 -8
  41. package/dist/components/primitives/date-picker.js +9 -8
  42. package/dist/components/primitives/footer.js +169 -100
  43. package/dist/components/primitives/form-field.js +1 -0
  44. package/dist/components/primitives/header.js +220 -176
  45. package/dist/components/primitives/image-carousel.js +8 -7
  46. package/dist/components/primitives/image-gallery.js +15 -14
  47. package/dist/components/primitives/image-input.js +9 -8
  48. package/dist/components/primitives/list-item.js +9 -8
  49. package/dist/components/primitives/menu-drawer.js +60 -56
  50. package/dist/components/primitives/multi-select.js +7 -6
  51. package/dist/components/primitives/number-input.js +1 -0
  52. package/dist/components/primitives/prose.js +52 -0
  53. package/dist/components/primitives/search-bar.js +81 -66
  54. package/dist/components/primitives/section-header.js +58 -55
  55. package/dist/components/primitives/share-buttons.js +93 -85
  56. package/dist/components/primitives/status-count-tabs.js +8 -7
  57. package/dist/components/primitives/sub-nav.js +52 -52
  58. package/dist/index.css +1 -1
  59. package/dist/index.js +1513 -559
  60. package/dist/lib/field-labelling.js +7 -6
  61. package/dist/lib/link-component.js +6 -0
  62. package/dist/lib/use-value-length.js +1 -0
  63. package/dist/types/components/ec/product-card.d.ts +12 -19
  64. package/dist/types/components/ec/review-card.d.ts +6 -1
  65. package/dist/types/components/foundations/button.d.ts +1 -1
  66. package/dist/types/components/foundations/chip-variants.d.ts +1 -1
  67. package/dist/types/components/foundations/data-table.d.ts +9 -1
  68. package/dist/types/components/foundations/pagination.d.ts +7 -1
  69. package/dist/types/components/foundations/sheet.d.ts +6 -1
  70. package/dist/types/components/foundations/social-icon.d.ts +1 -1
  71. package/dist/types/components/foundations/tabs.d.ts +2 -1
  72. package/dist/types/components/primitives/content-card.d.ts +67 -0
  73. package/dist/types/components/primitives/footer.d.ts +21 -1
  74. package/dist/types/components/primitives/header.d.ts +30 -2
  75. package/dist/types/components/primitives/menu-drawer.d.ts +7 -1
  76. package/dist/types/components/primitives/prose.d.ts +35 -0
  77. package/dist/types/components/primitives/search-bar.d.ts +14 -1
  78. package/dist/types/components/primitives/section-header.d.ts +2 -1
  79. package/dist/types/components/primitives/share-buttons.d.ts +26 -4
  80. package/dist/types/components/primitives/sub-nav.d.ts +16 -1
  81. package/dist/types/index.d.ts +4 -0
  82. package/dist/types/lib/link-component.d.ts +26 -0
  83. package/package.json +4 -3
  84. package/src/components/COMPONENT_LOOKUP.md +7 -5
  85. package/src/preset-standalone.css +1 -0
  86. package/src/preset.css +8 -0
  87. package/src/styles/semantic.css +1 -0
  88. package/tokens.json +8 -1
@@ -1,257 +1,301 @@
1
- import { jsx as r, jsxs as i } from "react/jsx-runtime";
2
- import * as k from "react";
3
- import H from "iconsax-reactjs/dist/esm/ArrowDown2.js";
4
- import j from "iconsax-reactjs/dist/esm/ArrowLeft.js";
5
- import { cn as d } from "../../lib/utils.js";
6
- import { Button as z } from "../foundations/button.js";
7
- import { DropdownMenu as M, DropdownMenuTrigger as L, DropdownMenuContent as P, DropdownMenuItem as T } from "../foundations/dropdown-menu.js";
8
- function E(n) {
9
- return d(
1
+ "use client";
2
+ import { jsx as e, jsxs as s, Fragment as W } from "react/jsx-runtime";
3
+ import * as y from "react";
4
+ import M from "iconsax-reactjs/dist/esm/ArrowDown2.js";
5
+ import D from "iconsax-reactjs/dist/esm/ArrowLeft.js";
6
+ import { cn as f } from "../../lib/utils.js";
7
+ import { Button as k } from "../foundations/button.js";
8
+ import { DropdownMenu as F, DropdownMenuTrigger as G, DropdownMenuContent as Z, DropdownMenuItem as V } from "../foundations/dropdown-menu.js";
9
+ import { containerVariants as q } from "./container.js";
10
+ function E({
11
+ containerSize: l,
12
+ shellClass: c,
13
+ layoutClass: a,
14
+ containerQuery: u = !1,
15
+ children: p,
16
+ ...d
17
+ }) {
18
+ return l ? /* @__PURE__ */ e("header", { "data-slot": "header", className: c, ...d, children: /* @__PURE__ */ e(
19
+ "div",
20
+ {
21
+ "data-slot": "header-container",
22
+ "data-container-size": l,
23
+ className: f(
24
+ u && "@container",
25
+ q({ size: l, gutter: "none" }),
26
+ a
27
+ ),
28
+ children: p
29
+ }
30
+ ) }) : /* @__PURE__ */ e(
31
+ "header",
32
+ {
33
+ "data-slot": "header",
34
+ className: f(u && "@container", a, c),
35
+ ...d,
36
+ children: p
37
+ }
38
+ );
39
+ }
40
+ function R(l) {
41
+ return f(
10
42
  "px-3 py-1.5 typo-body-md rounded-md transition-colors whitespace-nowrap",
11
- n ? "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-Secondary)]"
12
44
  );
13
45
  }
14
- const D = 2;
15
- function V({
16
- items: n,
17
- overflowLabel: u = "その他"
46
+ const P = 2;
47
+ function J({
48
+ items: l,
49
+ overflowLabel: c = "その他"
18
50
  }) {
19
- const t = k.useRef(null), C = k.useRef(null), [g, m] = k.useState(n.length);
20
- k.useEffect(() => {
21
- const e = t.current, h = C.current;
22
- if (!e || !h) return;
23
- const a = () => {
24
- const b = Array.from(h.children), w = b.slice(0, n.length).map((s) => s.getBoundingClientRect().width), R = b[n.length]?.getBoundingClientRect().width ?? 0, o = e.clientWidth;
25
- if (o === 0 || w.some((s) => s === 0)) {
26
- m(n.length);
51
+ const a = y.useRef(null), u = y.useRef(null), [p, d] = y.useState(l.length);
52
+ y.useEffect(() => {
53
+ const r = a.current, m = u.current;
54
+ if (!r || !m) return;
55
+ const i = () => {
56
+ const N = Array.from(m.children), v = N.slice(0, l.length).map((t) => t.getBoundingClientRect().width), z = N[l.length]?.getBoundingClientRect().width ?? 0, w = r.clientWidth;
57
+ if (w === 0 || v.some((t) => t === 0)) {
58
+ d(l.length);
27
59
  return;
28
60
  }
29
- if (w.reduce((s, p) => s + p, 0) + D * (n.length - 1) <= o) {
30
- m(n.length);
61
+ if (v.reduce((t, h) => t + h, 0) + P * (l.length - 1) <= w) {
62
+ d(l.length);
31
63
  return;
32
64
  }
33
- let f = R, N = 0;
34
- for (let s = 0; s < n.length; s++) {
35
- const p = f + w[s] + D;
36
- if (p > o) break;
37
- f = p, N = s + 1;
65
+ let g = z, A = 0;
66
+ for (let t = 0; t < l.length; t++) {
67
+ const h = g + v[t] + P;
68
+ if (h > w) break;
69
+ g = h, A = t + 1;
38
70
  }
39
- m(N);
71
+ d(A);
40
72
  };
41
- a(), window.addEventListener("resize", a);
42
- const v = typeof ResizeObserver < "u" ? new ResizeObserver(a) : null;
43
- return v?.observe(e), v?.observe(h), () => {
44
- window.removeEventListener("resize", a), v?.disconnect();
73
+ i(), window.addEventListener("resize", i);
74
+ const b = typeof ResizeObserver < "u" ? new ResizeObserver(i) : null;
75
+ return b?.observe(r), b?.observe(m), () => {
76
+ window.removeEventListener("resize", i), b?.disconnect();
45
77
  };
46
- }, [n]);
47
- const x = n.slice(0, g), c = n.slice(g);
48
- return /* @__PURE__ */ i("div", { ref: t, className: "relative min-w-0 flex-1", children: [
49
- /* @__PURE__ */ i(
78
+ }, [l]);
79
+ const x = l.slice(0, p), o = l.slice(p);
80
+ return /* @__PURE__ */ s("div", { ref: a, className: "relative min-w-0 flex-1", children: [
81
+ /* @__PURE__ */ e(
50
82
  "div",
51
83
  {
52
- ref: C,
53
84
  "aria-hidden": "true",
54
- className: "invisible pointer-events-none absolute top-0 left-0 flex w-max items-center gap-0.5",
55
- children: [
56
- n.map((e) => /* @__PURE__ */ r("span", { className: E(e.isActive), children: e.label }, e.label)),
57
- /* @__PURE__ */ i("span", { className: d(E(!1), "inline-flex items-center gap-1"), children: [
58
- u,
59
- /* @__PURE__ */ r(H, { size: 16 })
60
- ] })
61
- ]
85
+ className: "pointer-events-none absolute top-0 left-0 h-0 w-0 overflow-hidden",
86
+ children: /* @__PURE__ */ s(
87
+ "div",
88
+ {
89
+ ref: u,
90
+ className: "invisible flex w-max items-center gap-0.5",
91
+ children: [
92
+ l.map((r) => /* @__PURE__ */ e("span", { className: R(r.isActive), children: r.label }, r.label)),
93
+ /* @__PURE__ */ s("span", { className: f(R(!1), "inline-flex items-center gap-1"), children: [
94
+ c,
95
+ /* @__PURE__ */ e(M, { size: 16 })
96
+ ] })
97
+ ]
98
+ }
99
+ )
62
100
  }
63
101
  ),
64
- /* @__PURE__ */ i("nav", { className: "flex items-center gap-0.5", children: [
65
- x.map((e) => {
66
- const h = e.href ? "a" : "button", a = e.href ? { href: e.href } : { type: "button", onClick: e.onClick };
67
- return /* @__PURE__ */ r(
68
- h,
102
+ /* @__PURE__ */ s("nav", { className: "flex items-center gap-0.5", children: [
103
+ x.map((r) => {
104
+ const m = r.href ? "a" : "button", i = r.href ? { href: r.href } : { type: "button", onClick: r.onClick };
105
+ return /* @__PURE__ */ e(
106
+ m,
69
107
  {
70
- className: E(e.isActive),
71
- ...a,
72
- children: e.label
108
+ className: R(r.isActive),
109
+ ...i,
110
+ children: r.label
73
111
  },
74
- e.label
112
+ r.label
75
113
  );
76
114
  }),
77
- c.length > 0 && /* @__PURE__ */ i(M, { children: [
78
- /* @__PURE__ */ i(
79
- L,
115
+ o.length > 0 && /* @__PURE__ */ s(F, { children: [
116
+ /* @__PURE__ */ s(
117
+ G,
80
118
  {
81
- className: d(
82
- E(c.some((e) => e.isActive)),
119
+ className: f(
120
+ R(o.some((r) => r.isActive)),
83
121
  "inline-flex items-center gap-1"
84
122
  ),
85
123
  children: [
86
- u,
87
- /* @__PURE__ */ r(H, { size: 16, "aria-hidden": "true" })
124
+ c,
125
+ /* @__PURE__ */ e(M, { size: 16, "aria-hidden": "true" })
88
126
  ]
89
127
  }
90
128
  ),
91
- /* @__PURE__ */ r(P, { align: "end", children: c.map(
92
- (e) => e.href ? /* @__PURE__ */ r(T, { asChild: !0, children: /* @__PURE__ */ r(
129
+ /* @__PURE__ */ e(Z, { align: "end", children: o.map(
130
+ (r) => r.href ? /* @__PURE__ */ e(V, { asChild: !0, children: /* @__PURE__ */ e(
93
131
  "a",
94
132
  {
95
- href: e.href,
96
- onClick: e.onClick,
97
- "aria-current": e.isActive ? "page" : void 0,
98
- children: e.label
133
+ href: r.href,
134
+ onClick: r.onClick,
135
+ "aria-current": r.isActive ? "page" : void 0,
136
+ children: r.label
99
137
  }
100
- ) }, e.label) : /* @__PURE__ */ r(
101
- T,
138
+ ) }, r.label) : /* @__PURE__ */ e(
139
+ V,
102
140
  {
103
- onSelect: () => e.onClick?.(),
104
- children: e.label
141
+ onSelect: () => r.onClick?.(),
142
+ children: r.label
105
143
  },
106
- e.label
144
+ r.label
107
145
  )
108
146
  ) })
109
147
  ] })
110
148
  ] })
111
149
  ] });
112
150
  }
113
- function Z({
114
- className: n,
115
- variant: u = "logo",
116
- logo: t,
117
- title: C,
118
- onBack: g,
119
- backLabel: m = "戻る",
151
+ function S({
152
+ className: l,
153
+ variant: c = "logo",
154
+ logo: a,
155
+ title: u,
156
+ onBack: p,
157
+ backLabel: d = "戻る",
120
158
  actions: x,
121
- navItems: c,
122
- navBreakpoint: e = "md",
123
- navOverflowLabel: h,
124
- searchSlot: a,
125
- rightSlot: v,
126
- centerSlot: b,
127
- bottomSlot: w,
128
- disableSticky: R = !1,
129
- ...o
159
+ navItems: o,
160
+ navBreakpoint: r = "md",
161
+ navOverflowLabel: m,
162
+ searchSlot: i,
163
+ searchBreakpoint: b,
164
+ rightSlot: N,
165
+ centerSlot: v,
166
+ bottomSlot: z,
167
+ disableSticky: w = !1,
168
+ containerSize: C,
169
+ ...g
130
170
  }) {
131
- const y = R ? "" : "sticky top-0 z-[var(--Z-Nav)]", f = "border-b border-[var(--Border-Low-Emphasis)] bg-[var(--Surface-Primary)]", N = e === "lg" ? "@[1024px]:hidden" : "@[768px]:hidden", s = e === "lg" ? "hidden @[1024px]:flex" : "hidden @[768px]:flex";
132
- if (u === "logo") {
133
- const p = typeof t == "string" ? /* @__PURE__ */ r("span", { className: "typo-heading-lg text-[var(--Text-High-Emphasis)]", children: t }) : t ?? null, A = x && x.length > 0 && /* @__PURE__ */ r("div", { className: "flex shrink-0 items-center gap-1", children: x.map(
134
- (l) => l.href ? /* @__PURE__ */ r(
135
- z,
171
+ const h = f(w ? "" : "sticky top-0 z-[var(--Z-Nav)]", "border-b border-[var(--Border-Low-Emphasis)] bg-[var(--Surface-Primary)]", l), _ = r === "lg" ? "@[960px]:hidden" : "@[768px]:hidden", B = r === "lg" ? "hidden @[960px]:flex" : "hidden @[768px]:flex", O = b === "lg" ? "hidden @[960px]:block" : b === "md" ? "hidden @[768px]:block" : void 0;
172
+ if (c === "logo") {
173
+ const H = typeof a == "string" ? /* @__PURE__ */ e("span", { className: "typo-heading-lg text-[var(--Text-High-Emphasis)]", children: a }) : a ?? null, j = x && x.length > 0 && /* @__PURE__ */ e("div", { className: "flex shrink-0 items-center gap-1", children: x.map((n) => {
174
+ const L = n.showLabel ? {
175
+ variant: "ghost",
176
+ size: "sm",
177
+ className: "h-10 gap-1.5 rounded-full border border-[var(--Border-Medium-Emphasis)] px-4"
178
+ } : { variant: "ghost", size: "icon-sm" }, T = /* @__PURE__ */ s(W, { children: [
179
+ n.badge ? n.badge : n.icon,
180
+ n.showLabel && /* @__PURE__ */ e("span", { className: "typo-label-sm", children: n.label })
181
+ ] });
182
+ return n.href ? /* @__PURE__ */ e(
183
+ k,
136
184
  {
137
185
  asChild: !0,
138
- variant: "ghost",
139
- size: "icon-sm",
140
- "aria-label": l.label,
141
- children: /* @__PURE__ */ r("a", { href: l.href, onClick: l.onClick, children: l.badge ? l.badge : l.icon })
186
+ ...L,
187
+ "aria-label": n.showLabel ? void 0 : n.label,
188
+ children: /* @__PURE__ */ e("a", { href: n.href, onClick: n.onClick, children: T })
142
189
  },
143
- l.label
144
- ) : /* @__PURE__ */ r(
145
- z,
190
+ n.label
191
+ ) : /* @__PURE__ */ e(
192
+ k,
146
193
  {
147
- variant: "ghost",
148
- size: "icon-sm",
149
- "aria-label": l.label,
150
- onClick: l.onClick,
151
- children: l.badge ? l.badge : l.icon
194
+ ...L,
195
+ "aria-label": n.showLabel ? void 0 : n.label,
196
+ onClick: n.onClick,
197
+ children: T
152
198
  },
153
- l.label
154
- )
155
- ) });
156
- return /* @__PURE__ */ i(
157
- "header",
199
+ n.label
200
+ );
201
+ }) });
202
+ return /* @__PURE__ */ s(
203
+ E,
158
204
  {
159
- "data-slot": "header",
160
- className: d(y, f, "@container", n),
161
- ...o,
205
+ containerSize: C,
206
+ shellClass: h,
207
+ containerQuery: !0,
208
+ ...g,
162
209
  children: [
163
- /* @__PURE__ */ i("div", { className: d(
210
+ /* @__PURE__ */ s("div", { className: f(
164
211
  "flex items-center justify-between px-4 py-3",
165
- (c || a) && N
212
+ (o || i) && _
166
213
  ), children: [
167
- p,
168
- A
214
+ H,
215
+ j
169
216
  ] }),
170
- (c || a) && /* @__PURE__ */ i("div", { className: d(s, "items-center justify-between gap-4 h-14 px-6"), children: [
171
- /* @__PURE__ */ i("div", { className: "flex min-w-0 flex-1 items-center gap-6", children: [
172
- /* @__PURE__ */ r("div", { className: "shrink-0", children: p }),
173
- c && c.length > 0 && /* @__PURE__ */ r(
174
- V,
217
+ (o || i) && /* @__PURE__ */ s("div", { className: f(B, "items-center justify-between gap-4 h-14 px-6"), children: [
218
+ /* @__PURE__ */ s("div", { className: "flex min-w-0 flex-1 items-center gap-6", children: [
219
+ /* @__PURE__ */ e("div", { className: "shrink-0", children: H }),
220
+ o && o.length > 0 && /* @__PURE__ */ e(
221
+ J,
175
222
  {
176
- items: c,
177
- overflowLabel: h
223
+ items: o,
224
+ overflowLabel: m
178
225
  }
179
226
  )
180
227
  ] }),
181
- a && /* @__PURE__ */ r("div", { className: "min-w-0 flex-1 max-w-[400px]", children: a }),
182
- A
228
+ i && /* @__PURE__ */ e(
229
+ "div",
230
+ {
231
+ className: f(
232
+ "min-w-0 flex-1 max-w-[400px]",
233
+ O
234
+ ),
235
+ children: i
236
+ }
237
+ ),
238
+ j
183
239
  ] }),
184
- w
240
+ z
185
241
  ]
186
242
  }
187
243
  );
188
244
  }
189
- return u === "logo-center" ? /* @__PURE__ */ r(
190
- "header",
245
+ return c === "logo-center" ? /* @__PURE__ */ e(
246
+ E,
191
247
  {
192
- "data-slot": "header",
193
- className: d(
194
- y,
195
- f,
196
- "flex items-center justify-center px-4 py-3",
197
- n
198
- ),
199
- ...o,
200
- children: typeof t == "string" ? /* @__PURE__ */ r("span", { className: "typo-heading-lg text-[var(--Text-High-Emphasis)]", children: t }) : t ?? null
248
+ containerSize: C,
249
+ shellClass: h,
250
+ layoutClass: "flex items-center justify-center px-4 py-3",
251
+ ...g,
252
+ children: typeof a == "string" ? /* @__PURE__ */ e("span", { className: "typo-heading-lg text-[var(--Text-High-Emphasis)]", children: a }) : a ?? null
201
253
  }
202
- ) : u === "back-search" ? /* @__PURE__ */ r(
203
- "header",
254
+ ) : c === "back-search" ? /* @__PURE__ */ e(
255
+ E,
204
256
  {
205
- "data-slot": "header",
206
- className: d(
207
- y,
208
- f,
209
- "px-4 py-3",
210
- n
211
- ),
212
- ...o,
213
- children: /* @__PURE__ */ i("div", { className: "flex items-center gap-2", children: [
214
- /* @__PURE__ */ r(
215
- z,
257
+ containerSize: C,
258
+ shellClass: h,
259
+ layoutClass: "px-4 py-3",
260
+ ...g,
261
+ children: /* @__PURE__ */ s("div", { className: "flex items-center gap-2", children: [
262
+ /* @__PURE__ */ e(
263
+ k,
216
264
  {
217
265
  variant: "ghost",
218
- size: "icon-sm",
219
- "aria-label": m,
220
- onClick: g,
221
- children: /* @__PURE__ */ r(j, { size: 20 })
266
+ size: "icon-xl",
267
+ "aria-label": d,
268
+ onClick: p,
269
+ children: /* @__PURE__ */ e(D, { size: 20 })
222
270
  }
223
271
  ),
224
- b && /* @__PURE__ */ r("div", { className: "flex-1", children: b })
272
+ v && /* @__PURE__ */ e("div", { className: "flex-1", children: v })
225
273
  ] })
226
274
  }
227
- ) : /* @__PURE__ */ i(
228
- "header",
275
+ ) : /* @__PURE__ */ s(
276
+ E,
229
277
  {
230
- "data-slot": "header",
231
- className: d(
232
- y,
233
- f,
234
- "grid grid-cols-[1fr_auto_1fr] items-center gap-2 px-2 py-3",
235
- n
236
- ),
237
- ...o,
278
+ containerSize: C,
279
+ shellClass: h,
280
+ layoutClass: "grid grid-cols-[1fr_auto_1fr] items-center gap-2 px-2 py-3",
281
+ ...g,
238
282
  children: [
239
- /* @__PURE__ */ r("div", { className: "justify-self-start", children: /* @__PURE__ */ r(
240
- z,
283
+ /* @__PURE__ */ e("div", { className: "justify-self-start", children: /* @__PURE__ */ e(
284
+ k,
241
285
  {
242
286
  variant: "ghost",
243
287
  size: "icon-sm",
244
- "aria-label": m,
245
- onClick: g,
246
- children: /* @__PURE__ */ r(j, { size: 20 })
288
+ "aria-label": d,
289
+ onClick: p,
290
+ children: /* @__PURE__ */ e(D, { size: 20 })
247
291
  }
248
292
  ) }),
249
- /* @__PURE__ */ r("h1", { className: "min-w-0 truncate text-center typo-heading-md text-[var(--Text-High-Emphasis)]", children: C }),
250
- /* @__PURE__ */ r("div", { className: "justify-self-end", children: v })
293
+ /* @__PURE__ */ e("h1", { className: "min-w-0 truncate text-center typo-heading-md text-[var(--Text-High-Emphasis)]", children: u }),
294
+ /* @__PURE__ */ e("div", { className: "justify-self-end", children: N })
251
295
  ]
252
296
  }
253
297
  );
254
298
  }
255
299
  export {
256
- Z as Header
300
+ S as Header
257
301
  };
@@ -1,3 +1,4 @@
1
+ "use client";
1
2
  import { jsxs as y, jsx as t, Fragment as T } from "react/jsx-runtime";
2
3
  import * as l from "react";
3
4
  import k from "iconsax-reactjs/dist/esm/ArrowLeft2.js";
@@ -8,9 +9,9 @@ function B({
8
9
  aspectRatio: i = "banner",
9
10
  showDots: N = !0,
10
11
  showArrows: w = !0,
11
- autoPlay: d = 0,
12
+ autoPlay: u = 0,
12
13
  peek: x = !1,
13
- pcSlidesPerView: u = 1,
14
+ pcSlidesPerView: d = 1,
14
15
  centeredSlides: h = !1,
15
16
  className: j,
16
17
  ...z
@@ -40,12 +41,12 @@ function B({
40
41
  f && e.scrollTo({ left: f.offsetLeft, behavior: "smooth" });
41
42
  }
42
43
  l.useEffect(() => {
43
- if (d <= 0 || a <= 1) return;
44
+ if (u <= 0 || a <= 1) return;
44
45
  const r = setInterval(() => {
45
46
  n((s + 1) % a);
46
- }, d);
47
+ }, u);
47
48
  return () => clearInterval(r);
48
- }, [d, s, a]);
49
+ }, [u, s, a]);
49
50
  function I() {
50
51
  n(s <= 0 ? a - 1 : s - 1);
51
52
  }
@@ -75,7 +76,7 @@ function B({
75
76
  h && "@[768px]:px-[22.25%] @[960px]:px-0 @[768px]:gap-4",
76
77
  // PC 複数枚表示時のスライド間ギャップ(本番 spaceBetween:24 準拠)
77
78
  // cascade: @[960px]:gap-6 > @[768px]:gap-4 at 960px+
78
- u > 1 && "@[960px]:gap-6"
79
+ d > 1 && "@[960px]:gap-6"
79
80
  ),
80
81
  style: { scrollbarWidth: "none", msOverflowStyle: "none" },
81
82
  children: c.map((r, e) => /* @__PURE__ */ t(
@@ -87,7 +88,7 @@ function B({
87
88
  "shrink-0 snap-start",
88
89
  // centeredSlides: タブレットで snap-center、PC で snap-start に戻す
89
90
  h && "@[768px]:snap-center @[960px]:snap-start",
90
- x ? u > 1 ? "w-[calc(100%-48px)] pr-3 @[960px]:w-[calc((100%-48px)/3)] @[960px]:pr-0" : "w-[calc(100%-48px)] pr-3 @[960px]:w-full @[960px]:pr-0" : u > 1 ? "w-full @[960px]:w-[calc((100%-48px)/3)]" : "w-full"
91
+ x ? d > 1 ? "w-[calc(100%-48px)] pr-3 @[960px]:w-[calc((100%-48px)/3)] @[960px]:pr-0" : "w-[calc(100%-48px)] pr-3 @[960px]:w-full @[960px]:pr-0" : d > 1 ? "w-full @[960px]:w-[calc((100%-48px)/3)]" : "w-full"
91
92
  ),
92
93
  children: r.href ? /* @__PURE__ */ t("a", { href: r.href, className: "block", children: /* @__PURE__ */ t(
93
94
  "img",
@@ -1,8 +1,9 @@
1
- import { jsxs as o, jsx as t, Fragment as b } from "react/jsx-runtime";
1
+ "use client";
2
+ import { jsxs as n, jsx as t, Fragment as b } from "react/jsx-runtime";
2
3
  import * as x from "react";
3
4
  import y from "iconsax-reactjs/dist/esm/ArrowLeft2.js";
4
5
  import g from "iconsax-reactjs/dist/esm/ArrowRight2.js";
5
- import { cn as n } from "../../lib/utils.js";
6
+ import { cn as o } from "../../lib/utils.js";
6
7
  function P({
7
8
  images: r,
8
9
  alts: c,
@@ -24,14 +25,14 @@ function P({
24
25
  "16:9": "aspect-video",
25
26
  auto: ""
26
27
  }[h];
27
- return v === "pc-detail" ? /* @__PURE__ */ o(
28
+ return v === "pc-detail" ? /* @__PURE__ */ n(
28
29
  "div",
29
30
  {
30
31
  "data-slot": "image-gallery",
31
- className: n("flex flex-row-reverse gap-6", i),
32
+ className: o("flex flex-row-reverse gap-6", i),
32
33
  ...d,
33
34
  children: [
34
- /* @__PURE__ */ o("div", { className: n("relative min-w-0 grow overflow-hidden rounded-lg", u), children: [
35
+ /* @__PURE__ */ n("div", { className: o("relative min-w-0 grow overflow-hidden rounded-lg", u), children: [
35
36
  /* @__PURE__ */ t(
36
37
  "div",
37
38
  {
@@ -48,7 +49,7 @@ function P({
48
49
  ))
49
50
  }
50
51
  ),
51
- r.length > 1 && /* @__PURE__ */ o("span", { className: "absolute bottom-2 right-2 rounded-full bg-[var(--Overlay-Medium)] px-2 py-0.5 typo-label-xs text-[var(--Text-on-Inverse)]", children: [
52
+ r.length > 1 && /* @__PURE__ */ n("span", { className: "absolute bottom-2 right-2 rounded-full bg-[var(--Overlay-Medium)] px-2 py-0.5 typo-label-xs text-[var(--Text-on-Inverse)]", children: [
52
53
  a + 1,
53
54
  " / ",
54
55
  r.length
@@ -60,7 +61,7 @@ function P({
60
61
  type: "button",
61
62
  onClick: () => s(e),
62
63
  onMouseOver: () => s(e),
63
- className: n(
64
+ className: o(
64
65
  "size-16 shrink-0 overflow-hidden rounded-lg border-2 transition-colors",
65
66
  e === a ? "border-[var(--Border-Accent-Primary)]" : "border-transparent opacity-60 hover:opacity-100"
66
67
  ),
@@ -77,14 +78,14 @@ function P({
77
78
  )) })
78
79
  ]
79
80
  }
80
- ) : /* @__PURE__ */ o(
81
+ ) : /* @__PURE__ */ n(
81
82
  "div",
82
83
  {
83
84
  "data-slot": "image-gallery",
84
- className: n("space-y-2", i),
85
+ className: o("space-y-2", i),
85
86
  ...d,
86
87
  children: [
87
- /* @__PURE__ */ o("div", { className: n("relative w-full overflow-hidden", u), children: [
88
+ /* @__PURE__ */ n("div", { className: o("relative w-full overflow-hidden", u), children: [
88
89
  /* @__PURE__ */ t(
89
90
  "div",
90
91
  {
@@ -101,7 +102,7 @@ function P({
101
102
  ))
102
103
  }
103
104
  ),
104
- r.length > 1 && /* @__PURE__ */ o(b, { children: [
105
+ r.length > 1 && /* @__PURE__ */ n(b, { children: [
105
106
  /* @__PURE__ */ t(
106
107
  "button",
107
108
  {
@@ -123,7 +124,7 @@ function P({
123
124
  }
124
125
  )
125
126
  ] }),
126
- r.length > 1 && /* @__PURE__ */ o("span", { className: "absolute bottom-2 right-2 rounded-full bg-[var(--Overlay-Medium)] px-2 py-0.5 typo-label-xs text-[var(--Text-on-Inverse)]", children: [
127
+ r.length > 1 && /* @__PURE__ */ n("span", { className: "absolute bottom-2 right-2 rounded-full bg-[var(--Overlay-Medium)] px-2 py-0.5 typo-label-xs text-[var(--Text-on-Inverse)]", children: [
127
128
  a + 1,
128
129
  " / ",
129
130
  r.length
@@ -139,7 +140,7 @@ function P({
139
140
  children: /* @__PURE__ */ t(
140
141
  "span",
141
142
  {
142
- className: n(
143
+ className: o(
143
144
  "h-1.5 shrink-0 rounded-full transition-all",
144
145
  e === a ? "w-4 bg-[var(--Brand-Cake-Orange)]" : "w-1.5 bg-[var(--Text-Low-Emphasis)]/30"
145
146
  )
@@ -153,7 +154,7 @@ function P({
153
154
  {
154
155
  type: "button",
155
156
  onClick: () => s(e),
156
- className: n(
157
+ className: o(
157
158
  "size-14 shrink-0 overflow-hidden rounded-md border-2 transition-colors",
158
159
  e === a ? "border-[var(--Brand-Cake-Orange)]" : "border-transparent opacity-60 hover:opacity-100"
159
160
  ),