@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.
- package/CHANGELOG.md +50 -0
- package/CLAUDE.md +15 -0
- package/contracts/components.json +144 -16
- package/contracts/composition.json +1 -1
- package/contracts/rules.json +5 -1
- package/contracts/screen-patterns.json +1 -1
- package/dist/components/ec/admin-shell.js +7 -6
- package/dist/components/ec/product-card.js +107 -102
- package/dist/components/ec/product-option.js +1 -0
- package/dist/components/ec/review-card.js +22 -20
- package/dist/components/ec/review-form.js +1 -0
- package/dist/components/foundations/accordion.js +23 -22
- package/dist/components/foundations/alert.js +1 -0
- package/dist/components/foundations/aspect-ratio.js +3 -2
- package/dist/components/foundations/avatar.js +1 -0
- package/dist/components/foundations/button.js +7 -1
- package/dist/components/foundations/calendar.js +1 -0
- package/dist/components/foundations/checkbox-group.js +1 -0
- package/dist/components/foundations/checkbox.js +1 -0
- package/dist/components/foundations/command.js +1 -0
- package/dist/components/foundations/context-menu.js +1 -0
- package/dist/components/foundations/drawer.js +1 -0
- package/dist/components/foundations/file-input.js +1 -0
- package/dist/components/foundations/form.js +26 -25
- package/dist/components/foundations/pagination.js +49 -46
- package/dist/components/foundations/popover.js +9 -8
- package/dist/components/foundations/radio-group.js +3 -2
- package/dist/components/foundations/responsive-dialog.js +1 -0
- package/dist/components/foundations/separator.js +7 -6
- package/dist/components/foundations/sheet.js +40 -33
- package/dist/components/foundations/slider.js +7 -6
- package/dist/components/foundations/social-icon.js +30 -10
- package/dist/components/foundations/sonner.js +5 -4
- package/dist/components/foundations/tabs.js +45 -25
- package/dist/components/foundations/toggle-group.js +6 -5
- package/dist/components/primitives/admin-side-nav.js +1 -0
- package/dist/components/primitives/chat-composer.js +1 -0
- package/dist/components/primitives/combobox.js +1 -0
- package/dist/components/primitives/content-card.js +111 -0
- package/dist/components/primitives/content-carousel.js +9 -8
- package/dist/components/primitives/date-picker.js +9 -8
- package/dist/components/primitives/footer.js +169 -100
- package/dist/components/primitives/form-field.js +1 -0
- package/dist/components/primitives/header.js +220 -176
- package/dist/components/primitives/image-carousel.js +8 -7
- package/dist/components/primitives/image-gallery.js +15 -14
- package/dist/components/primitives/image-input.js +9 -8
- package/dist/components/primitives/list-item.js +9 -8
- package/dist/components/primitives/menu-drawer.js +60 -56
- package/dist/components/primitives/multi-select.js +7 -6
- package/dist/components/primitives/number-input.js +1 -0
- package/dist/components/primitives/prose.js +52 -0
- package/dist/components/primitives/search-bar.js +81 -66
- package/dist/components/primitives/section-header.js +58 -55
- package/dist/components/primitives/share-buttons.js +93 -85
- package/dist/components/primitives/status-count-tabs.js +8 -7
- package/dist/components/primitives/sub-nav.js +52 -52
- package/dist/index.css +1 -1
- package/dist/index.js +1513 -559
- package/dist/lib/field-labelling.js +7 -6
- package/dist/lib/link-component.js +6 -0
- package/dist/lib/use-value-length.js +1 -0
- package/dist/types/components/ec/product-card.d.ts +12 -19
- package/dist/types/components/ec/review-card.d.ts +6 -1
- package/dist/types/components/foundations/button.d.ts +1 -1
- package/dist/types/components/foundations/chip-variants.d.ts +1 -1
- package/dist/types/components/foundations/data-table.d.ts +9 -1
- package/dist/types/components/foundations/pagination.d.ts +7 -1
- package/dist/types/components/foundations/sheet.d.ts +6 -1
- package/dist/types/components/foundations/social-icon.d.ts +1 -1
- package/dist/types/components/foundations/tabs.d.ts +2 -1
- package/dist/types/components/primitives/content-card.d.ts +67 -0
- package/dist/types/components/primitives/footer.d.ts +21 -1
- package/dist/types/components/primitives/header.d.ts +30 -2
- package/dist/types/components/primitives/menu-drawer.d.ts +7 -1
- package/dist/types/components/primitives/prose.d.ts +35 -0
- package/dist/types/components/primitives/search-bar.d.ts +14 -1
- package/dist/types/components/primitives/section-header.d.ts +2 -1
- package/dist/types/components/primitives/share-buttons.d.ts +26 -4
- package/dist/types/components/primitives/sub-nav.d.ts +16 -1
- package/dist/types/index.d.ts +4 -0
- package/dist/types/lib/link-component.d.ts +26 -0
- package/package.json +4 -3
- package/src/components/COMPONENT_LOOKUP.md +7 -5
- package/src/preset-standalone.css +1 -0
- package/src/preset.css +8 -0
- package/src/styles/semantic.css +1 -0
- package/tokens.json +8 -1
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as l, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
|
-
import { cn as
|
|
4
|
-
import { PriceDisplay as
|
|
5
|
-
import { RatingStars as
|
|
6
|
-
import { Tag as
|
|
7
|
-
function
|
|
8
|
-
href:
|
|
9
|
-
onClick:
|
|
3
|
+
import { cn as m } from "../../lib/utils.js";
|
|
4
|
+
import { PriceDisplay as k } from "../primitives/price-display.js";
|
|
5
|
+
import { RatingStars as B } from "./rating-stars.js";
|
|
6
|
+
import { Tag as v } from "../primitives/tag.js";
|
|
7
|
+
function j({
|
|
8
|
+
href: a,
|
|
9
|
+
onClick: r,
|
|
10
10
|
name: t
|
|
11
11
|
}) {
|
|
12
|
-
return
|
|
12
|
+
return a ? /* @__PURE__ */ e(
|
|
13
13
|
"a",
|
|
14
14
|
{
|
|
15
|
-
href:
|
|
15
|
+
href: a,
|
|
16
16
|
className: "absolute inset-0 z-[var(--Z-Local-1)]",
|
|
17
17
|
"aria-label": t,
|
|
18
|
-
onClick:
|
|
18
|
+
onClick: r,
|
|
19
19
|
children: /* @__PURE__ */ e("span", { className: "sr-only", children: t })
|
|
20
20
|
}
|
|
21
|
-
) :
|
|
21
|
+
) : r ? /* @__PURE__ */ e(
|
|
22
22
|
"button",
|
|
23
23
|
{
|
|
24
24
|
type: "button",
|
|
25
25
|
className: "absolute inset-0 z-[var(--Z-Local-1)] cursor-pointer",
|
|
26
26
|
"aria-label": t,
|
|
27
|
-
onClick:
|
|
27
|
+
onClick: r,
|
|
28
28
|
children: /* @__PURE__ */ e("span", { className: "sr-only", children: t })
|
|
29
29
|
}
|
|
30
30
|
) : null;
|
|
31
31
|
}
|
|
32
|
-
function
|
|
32
|
+
function $({ size: a = 20, filled: r = !1 }) {
|
|
33
33
|
return /* @__PURE__ */ e(
|
|
34
34
|
"svg",
|
|
35
35
|
{
|
|
36
|
-
width:
|
|
37
|
-
height:
|
|
36
|
+
width: a,
|
|
37
|
+
height: a,
|
|
38
38
|
viewBox: "0 0 24 24",
|
|
39
39
|
fill: "none",
|
|
40
40
|
className: "transition-colors",
|
|
@@ -42,8 +42,8 @@ function O({ size: l = 20, filled: a = !1 }) {
|
|
|
42
42
|
"path",
|
|
43
43
|
{
|
|
44
44
|
d: "M17 3H7a2 2 0 0 0-2 2v16l7-4 7 4V5a2 2 0 0 0-2-2Z",
|
|
45
|
-
fill:
|
|
46
|
-
stroke:
|
|
45
|
+
fill: r ? "var(--Brand-Cake-Orange)" : "none",
|
|
46
|
+
stroke: r ? "var(--Brand-Cake-Orange)" : "var(--Object-High-Emphasis)",
|
|
47
47
|
strokeWidth: 1.5,
|
|
48
48
|
strokeLinecap: "round",
|
|
49
49
|
strokeLinejoin: "round"
|
|
@@ -52,132 +52,137 @@ function O({ size: l = 20, filled: a = !1 }) {
|
|
|
52
52
|
}
|
|
53
53
|
);
|
|
54
54
|
}
|
|
55
|
-
function
|
|
56
|
-
isFavorite:
|
|
57
|
-
onToggle:
|
|
55
|
+
function M({
|
|
56
|
+
isFavorite: a,
|
|
57
|
+
onToggle: r,
|
|
58
58
|
size: t = "md"
|
|
59
59
|
}) {
|
|
60
60
|
return /* @__PURE__ */ e(
|
|
61
61
|
"button",
|
|
62
62
|
{
|
|
63
63
|
type: "button",
|
|
64
|
-
className:
|
|
64
|
+
className: m(
|
|
65
65
|
"relative z-10 flex items-center justify-center rounded-full border border-[var(--Border-Medium-Emphasis)] bg-[var(--Surface-Primary)]/80 backdrop-blur-sm transition-colors hover:border-[var(--Border-High-Emphasis)] hover:bg-[var(--Surface-Tertiary)]",
|
|
66
66
|
t === "sm" ? "size-[30px]" : "size-9"
|
|
67
67
|
),
|
|
68
|
-
onClick: (
|
|
69
|
-
|
|
68
|
+
onClick: (o) => {
|
|
69
|
+
o.preventDefault(), o.stopPropagation(), r();
|
|
70
70
|
},
|
|
71
|
-
"aria-label":
|
|
71
|
+
"aria-label": a ? "お気に入りから削除" : "お気に入りに追加",
|
|
72
72
|
children: /* @__PURE__ */ e(
|
|
73
|
-
|
|
73
|
+
$,
|
|
74
74
|
{
|
|
75
75
|
size: t === "sm" ? 16 : 20,
|
|
76
|
-
filled:
|
|
76
|
+
filled: a
|
|
77
77
|
}
|
|
78
78
|
)
|
|
79
79
|
}
|
|
80
80
|
);
|
|
81
81
|
}
|
|
82
|
-
function
|
|
82
|
+
function Z({ rank: a }) {
|
|
83
83
|
return /* @__PURE__ */ e(
|
|
84
84
|
"img",
|
|
85
85
|
{
|
|
86
|
-
src: `https://assets.cake.jp/bp/img/common/tags/ranking_${
|
|
87
|
-
alt: `${
|
|
86
|
+
src: `https://assets.cake.jp/bp/img/common/tags/ranking_${a}.png`,
|
|
87
|
+
alt: `${a}位`,
|
|
88
88
|
loading: "lazy",
|
|
89
89
|
className: "absolute left-1 top-0 z-[var(--Z-Local-2)] h-auto w-[60px]"
|
|
90
90
|
}
|
|
91
91
|
);
|
|
92
92
|
}
|
|
93
|
-
function
|
|
94
|
-
return
|
|
93
|
+
function D(a, r) {
|
|
94
|
+
return r == null || r <= a ? null : `${Math.round((r - a) / r * 100)}%OFF`;
|
|
95
95
|
}
|
|
96
|
-
function
|
|
97
|
-
return
|
|
96
|
+
function C({ name: a, href: r }) {
|
|
97
|
+
return r ? /* @__PURE__ */ e(
|
|
98
98
|
"a",
|
|
99
99
|
{
|
|
100
|
-
href:
|
|
100
|
+
href: r,
|
|
101
101
|
className: "relative z-10 truncate typo-body-sm text-[var(--Text-Low-Emphasis)] hover:text-[var(--Text-Medium-Emphasis)] hover:underline",
|
|
102
102
|
onClick: (t) => t.stopPropagation(),
|
|
103
|
-
children:
|
|
103
|
+
children: a
|
|
104
104
|
}
|
|
105
|
-
) : /* @__PURE__ */ e("p", { className: "truncate typo-body-sm text-[var(--Text-Low-Emphasis)]", children:
|
|
105
|
+
) : /* @__PURE__ */ e("p", { className: "truncate typo-body-sm text-[var(--Text-Low-Emphasis)]", children: a });
|
|
106
|
+
}
|
|
107
|
+
function H(a) {
|
|
108
|
+
if (a !== "none")
|
|
109
|
+
return a === "fade" ? "transition-[filter] group-hover:brightness-110" : "transition-transform group-hover:scale-105";
|
|
106
110
|
}
|
|
107
|
-
function
|
|
108
|
-
className:
|
|
109
|
-
name:
|
|
111
|
+
function J({
|
|
112
|
+
className: a,
|
|
113
|
+
name: r,
|
|
110
114
|
imageUrl: t,
|
|
111
|
-
imageAlt:
|
|
112
|
-
price:
|
|
113
|
-
originalPrice:
|
|
114
|
-
caption:
|
|
115
|
-
rating:
|
|
115
|
+
imageAlt: o,
|
|
116
|
+
price: f,
|
|
117
|
+
originalPrice: b,
|
|
118
|
+
caption: u,
|
|
119
|
+
rating: i,
|
|
116
120
|
reviewCount: y,
|
|
117
|
-
shopName:
|
|
121
|
+
shopName: h,
|
|
118
122
|
shopHref: N,
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
123
|
+
hoverEffect: P,
|
|
124
|
+
tags: x = [],
|
|
125
|
+
isFavorite: g = !1,
|
|
126
|
+
onFavoriteToggle: p,
|
|
127
|
+
onCardClick: z,
|
|
128
|
+
href: w,
|
|
124
129
|
ranking: n,
|
|
125
130
|
deliveryDate: c,
|
|
126
|
-
orientation:
|
|
127
|
-
showDiscountBadge:
|
|
128
|
-
showCartButton:
|
|
129
|
-
onCartAdd:
|
|
130
|
-
cartButtonLabel:
|
|
131
|
+
orientation: E = "vertical",
|
|
132
|
+
showDiscountBadge: S = !0,
|
|
133
|
+
showCartButton: O = !1,
|
|
134
|
+
onCartAdd: I,
|
|
135
|
+
cartButtonLabel: R = "カートに追加",
|
|
131
136
|
...L
|
|
132
137
|
}) {
|
|
133
|
-
const
|
|
134
|
-
return
|
|
138
|
+
const T = P ?? (E === "horizontal" ? "none" : "zoom"), d = S ? D(f, b) : null;
|
|
139
|
+
return E === "horizontal" ? /* @__PURE__ */ l(
|
|
135
140
|
"div",
|
|
136
141
|
{
|
|
137
142
|
"data-slot": "product-card",
|
|
138
143
|
"data-orientation": "horizontal",
|
|
139
|
-
className:
|
|
144
|
+
className: m(
|
|
140
145
|
// min-w-0: 列トラック(1fr = minmax(auto,1fr))が nowrap の内容や
|
|
141
146
|
// 固定 min-width に押し広げられ、カードが列からはみ出すのを防ぐ(#210)
|
|
142
147
|
"group relative flex min-w-0 rounded-lg bg-[var(--Surface-Primary)]",
|
|
143
148
|
n != null && "pt-3",
|
|
144
|
-
|
|
149
|
+
a
|
|
145
150
|
),
|
|
146
151
|
...L,
|
|
147
152
|
children: [
|
|
148
|
-
/* @__PURE__ */ e(
|
|
149
|
-
n != null && /* @__PURE__ */ e(
|
|
150
|
-
/* @__PURE__ */
|
|
151
|
-
/* @__PURE__ */ e("img", { src: t, alt:
|
|
152
|
-
d && /* @__PURE__ */ e(
|
|
153
|
-
|
|
154
|
-
|
|
153
|
+
/* @__PURE__ */ e(j, { href: w, onClick: z, name: r }),
|
|
154
|
+
n != null && /* @__PURE__ */ e(Z, { rank: n }),
|
|
155
|
+
/* @__PURE__ */ l("div", { className: "relative h-auto w-28 shrink-0 overflow-hidden rounded-lg @sm:w-36", children: [
|
|
156
|
+
/* @__PURE__ */ e("img", { src: t, alt: o ?? r, className: m("h-full w-full object-cover duration-[var(--Motion-Duration-Base)]", H(T)), loading: "lazy" }),
|
|
157
|
+
d && /* @__PURE__ */ e(v, { variant: "sale", size: "sm", className: "absolute bottom-1.5 left-1.5 z-[var(--Z-Local-2)]", children: d }),
|
|
158
|
+
x.length > 0 && /* @__PURE__ */ e("div", { className: "absolute bottom-1.5 left-1.5 z-[var(--Z-Local-2)] flex flex-wrap gap-1", children: !d && x.map((s) => /* @__PURE__ */ e(v, { variant: s.variant, size: "sm", children: s.label }, s.label)) }),
|
|
159
|
+
p && /* @__PURE__ */ e("div", { className: "absolute bottom-1 right-1 z-10", children: /* @__PURE__ */ e(M, { isFavorite: g, onToggle: p, size: "sm" }) })
|
|
155
160
|
] }),
|
|
156
|
-
/* @__PURE__ */
|
|
157
|
-
/* @__PURE__ */
|
|
158
|
-
|
|
159
|
-
/* @__PURE__ */ e("h3", { className: "line-clamp-2 typo-body-md text-[var(--Text-High-Emphasis)]", children:
|
|
161
|
+
/* @__PURE__ */ l("div", { className: "flex min-w-0 flex-1 flex-col justify-between py-1 pl-3 pr-1", children: [
|
|
162
|
+
/* @__PURE__ */ l("div", { className: "space-y-0.5", children: [
|
|
163
|
+
h && /* @__PURE__ */ e(C, { name: h, href: N }),
|
|
164
|
+
/* @__PURE__ */ e("h3", { className: "line-clamp-2 typo-body-md text-[var(--Text-High-Emphasis)]", children: r })
|
|
160
165
|
] }),
|
|
161
|
-
/* @__PURE__ */
|
|
162
|
-
/* @__PURE__ */
|
|
163
|
-
|
|
164
|
-
c && /* @__PURE__ */
|
|
166
|
+
/* @__PURE__ */ l("div", { className: "mt-1 min-w-0 space-y-0.5", children: [
|
|
167
|
+
/* @__PURE__ */ l("div", { className: "flex min-w-0 flex-wrap items-center gap-2", children: [
|
|
168
|
+
i != null && /* @__PURE__ */ e(B, { rating: i, reviewCount: y, size: "sm" }),
|
|
169
|
+
c && /* @__PURE__ */ l("p", { className: "typo-body-xs text-[var(--Text-Medium-Emphasis)]", children: [
|
|
165
170
|
"最短 ",
|
|
166
171
|
c
|
|
167
172
|
] })
|
|
168
173
|
] }),
|
|
169
|
-
/* @__PURE__ */ e(
|
|
170
|
-
|
|
174
|
+
/* @__PURE__ */ e(k, { price: f, originalPrice: b, size: "sm", showTaxLabel: !1 }),
|
|
175
|
+
u && /* @__PURE__ */ e("p", { className: "typo-body-xs text-[var(--Text-Medium-Emphasis)]", children: u })
|
|
171
176
|
] })
|
|
172
177
|
] })
|
|
173
178
|
]
|
|
174
179
|
}
|
|
175
|
-
) : /* @__PURE__ */
|
|
180
|
+
) : /* @__PURE__ */ l(
|
|
176
181
|
"div",
|
|
177
182
|
{
|
|
178
183
|
"data-slot": "product-card",
|
|
179
184
|
"data-orientation": "vertical",
|
|
180
|
-
className:
|
|
185
|
+
className: m(
|
|
181
186
|
// max-w: 広いグリッドセルでもカードが膨らみすぎないようカード自身が上限を持つ。
|
|
182
187
|
// 280px は本番の検索結果グリッド(PC 5列 ≈ カード215px)では未到達=影響なし。
|
|
183
188
|
// マイページ等の3列グリッド(実効幅 ~950px)で 3×280+gap が収まる上限として採用。
|
|
@@ -185,44 +190,44 @@ function _({
|
|
|
185
190
|
// 列からはみ出す原因だった(#210)。幅は列(minmax(0,1fr))側が決める。
|
|
186
191
|
"group relative flex w-full min-w-0 max-w-[280px] flex-col gap-1 bg-[var(--Surface-Primary)]",
|
|
187
192
|
n != null && "pt-3",
|
|
188
|
-
|
|
193
|
+
a
|
|
189
194
|
),
|
|
190
195
|
...L,
|
|
191
196
|
children: [
|
|
192
|
-
/* @__PURE__ */ e(
|
|
193
|
-
n != null && /* @__PURE__ */ e(
|
|
194
|
-
/* @__PURE__ */
|
|
195
|
-
/* @__PURE__ */
|
|
196
|
-
/* @__PURE__ */ e("img", { src: t, alt:
|
|
197
|
-
/* @__PURE__ */ e("div", { className: "absolute inset-x-1 bottom-1 z-[var(--Z-Local-3)] flex items-end", children: /* @__PURE__ */
|
|
198
|
-
d && /* @__PURE__ */ e(
|
|
199
|
-
|
|
197
|
+
/* @__PURE__ */ e(j, { href: w, onClick: z, name: r }),
|
|
198
|
+
n != null && /* @__PURE__ */ e(Z, { rank: n }),
|
|
199
|
+
/* @__PURE__ */ l("div", { className: "relative", children: [
|
|
200
|
+
/* @__PURE__ */ l("div", { className: "aspect-square overflow-hidden rounded-lg", children: [
|
|
201
|
+
/* @__PURE__ */ e("img", { src: t, alt: o ?? r, className: m("h-full w-full object-cover duration-[var(--Motion-Duration-Base)]", H(T)), loading: "lazy" }),
|
|
202
|
+
/* @__PURE__ */ e("div", { className: "absolute inset-x-1 bottom-1 z-[var(--Z-Local-3)] flex items-end", children: /* @__PURE__ */ l("div", { className: "flex flex-wrap gap-1", children: [
|
|
203
|
+
d && /* @__PURE__ */ e(v, { variant: "sale", size: "sm", children: d }),
|
|
204
|
+
x.map((s) => /* @__PURE__ */ e(v, { variant: s.variant, size: "sm", children: s.label }, s.label))
|
|
200
205
|
] }) })
|
|
201
206
|
] }),
|
|
202
|
-
|
|
207
|
+
p && /* @__PURE__ */ e("div", { className: "absolute bottom-1.5 right-1.5 z-[var(--Z-Local-4)]", children: /* @__PURE__ */ e(M, { isFavorite: g, onToggle: p }) })
|
|
203
208
|
] }),
|
|
204
|
-
/* @__PURE__ */
|
|
205
|
-
|
|
206
|
-
/* @__PURE__ */ e("h3", { className: "line-clamp-2 min-h-[2lh] typo-body-md text-[var(--Text-High-Emphasis)]", children:
|
|
207
|
-
(
|
|
208
|
-
|
|
209
|
-
c && /* @__PURE__ */
|
|
209
|
+
/* @__PURE__ */ l("div", { className: "flex min-w-0 flex-1 flex-col gap-0.5", children: [
|
|
210
|
+
h && /* @__PURE__ */ e(C, { name: h, href: N }),
|
|
211
|
+
/* @__PURE__ */ e("h3", { className: "line-clamp-2 min-h-[2lh] typo-body-md text-[var(--Text-High-Emphasis)]", children: r }),
|
|
212
|
+
(i != null || c) && /* @__PURE__ */ l("div", { className: "flex min-w-0 flex-wrap items-center gap-2", children: [
|
|
213
|
+
i != null && /* @__PURE__ */ e(B, { rating: i, reviewCount: y, size: "sm" }),
|
|
214
|
+
c && /* @__PURE__ */ l("p", { className: "typo-body-xs text-[var(--Text-Medium-Emphasis)]", children: [
|
|
210
215
|
"最短 ",
|
|
211
216
|
c
|
|
212
217
|
] })
|
|
213
218
|
] }),
|
|
214
|
-
/* @__PURE__ */ e(
|
|
215
|
-
|
|
219
|
+
/* @__PURE__ */ e(k, { price: f, originalPrice: b, size: "md", showTaxLabel: !1 }),
|
|
220
|
+
u && /* @__PURE__ */ e("p", { className: "typo-body-xs text-[var(--Text-Medium-Emphasis)]", children: u })
|
|
216
221
|
] }),
|
|
217
|
-
|
|
222
|
+
O && /* @__PURE__ */ e(
|
|
218
223
|
"button",
|
|
219
224
|
{
|
|
220
225
|
type: "button",
|
|
221
226
|
className: "relative z-10 flex h-9 w-full items-center justify-center gap-0.5 rounded-lg bg-[var(--Brand-Cake-Orange)] typo-label-md text-[var(--Text-on-Inverse)] transition-colors hover:bg-[var(--Hover-Primary-Button)] active:bg-[var(--Active-Primary-Button)]",
|
|
222
227
|
onClick: (s) => {
|
|
223
|
-
s.preventDefault(), s.stopPropagation(),
|
|
228
|
+
s.preventDefault(), s.stopPropagation(), I?.();
|
|
224
229
|
},
|
|
225
|
-
children:
|
|
230
|
+
children: R
|
|
226
231
|
}
|
|
227
232
|
)
|
|
228
233
|
]
|
|
@@ -230,6 +235,6 @@ function _({
|
|
|
230
235
|
);
|
|
231
236
|
}
|
|
232
237
|
export {
|
|
233
|
-
|
|
234
|
-
|
|
238
|
+
$ as BookmarkRibbonIcon,
|
|
239
|
+
J as ProductCard
|
|
235
240
|
};
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { jsxs as a, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
|
-
import
|
|
3
|
+
import z from "iconsax-reactjs/dist/esm/Like1.js";
|
|
4
4
|
import { cn as r } from "../../lib/utils.js";
|
|
5
|
-
import { SparkleIcon as
|
|
6
|
-
function
|
|
5
|
+
import { SparkleIcon as E } from "./rating-stars.js";
|
|
6
|
+
function P({
|
|
7
7
|
className: f,
|
|
8
8
|
variant: m = "list",
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
bordered: v = !0,
|
|
10
|
+
rating: h,
|
|
11
|
+
date: u,
|
|
11
12
|
text: s,
|
|
12
13
|
imageUrl: d,
|
|
13
14
|
productName: l,
|
|
@@ -15,22 +16,23 @@ function O({
|
|
|
15
16
|
helpfulCount: i,
|
|
16
17
|
isLiked: t = !1,
|
|
17
18
|
onLikeClick: g,
|
|
18
|
-
onMoreClick:
|
|
19
|
+
onMoreClick: y,
|
|
19
20
|
maxLength: c = 80,
|
|
20
|
-
...
|
|
21
|
+
...b
|
|
21
22
|
}) {
|
|
22
|
-
const n = m === "pc", p = m === "card",
|
|
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
24
|
return /* @__PURE__ */ a(
|
|
24
25
|
"div",
|
|
25
26
|
{
|
|
26
27
|
"data-slot": "review-card",
|
|
27
28
|
className: r(
|
|
28
|
-
"flex flex-col rounded-lg
|
|
29
|
+
"flex flex-col rounded-lg bg-[var(--Surface-Primary)]",
|
|
30
|
+
v && "border border-[var(--Border-Medium-Emphasis)]",
|
|
29
31
|
n ? "w-full max-w-[680px] gap-4 p-6" : "min-w-[240px] w-full gap-2 p-4",
|
|
30
32
|
p && "items-center",
|
|
31
33
|
f
|
|
32
34
|
),
|
|
33
|
-
...
|
|
35
|
+
...b,
|
|
34
36
|
children: [
|
|
35
37
|
p && l && /* @__PURE__ */ a("div", { className: "flex w-full items-center gap-1.5 rounded bg-[var(--Surface-Secondary)] p-2", children: [
|
|
36
38
|
o && /* @__PURE__ */ e(
|
|
@@ -44,17 +46,17 @@ function O({
|
|
|
44
46
|
/* @__PURE__ */ e("span", { className: "typo-body-sm text-[var(--Text-High-Emphasis)]", children: l })
|
|
45
47
|
] }),
|
|
46
48
|
/* @__PURE__ */ a("div", { className: "flex w-full items-center justify-between", children: [
|
|
47
|
-
/* @__PURE__ */ e("div", { className: "flex items-start", children: Array.from({ length: 5 }).map((
|
|
48
|
-
|
|
49
|
+
/* @__PURE__ */ e("div", { className: "flex items-start", children: Array.from({ length: 5 }).map((k, x) => /* @__PURE__ */ e(
|
|
50
|
+
E,
|
|
49
51
|
{
|
|
50
52
|
size: 20,
|
|
51
53
|
className: r(
|
|
52
|
-
x <
|
|
54
|
+
x < h ? "text-[var(--Brand-Cake-Orange)]" : "text-[var(--Border-Low-Emphasis)]"
|
|
53
55
|
)
|
|
54
56
|
},
|
|
55
57
|
x
|
|
56
58
|
)) }),
|
|
57
|
-
/* @__PURE__ */ e("span", { className: "typo-body-md text-[var(--Text-High-Emphasis)]", children:
|
|
59
|
+
/* @__PURE__ */ e("span", { className: "typo-body-md text-[var(--Text-High-Emphasis)]", children: u })
|
|
58
60
|
] }),
|
|
59
61
|
/* @__PURE__ */ a(
|
|
60
62
|
"div",
|
|
@@ -65,18 +67,18 @@ function O({
|
|
|
65
67
|
),
|
|
66
68
|
children: [
|
|
67
69
|
/* @__PURE__ */ a("p", { className: "min-w-0 flex-1 typo-body-md text-[var(--Text-High-Emphasis)]", children: [
|
|
68
|
-
|
|
69
|
-
|
|
70
|
+
N,
|
|
71
|
+
w && /* @__PURE__ */ e(
|
|
70
72
|
"button",
|
|
71
73
|
{
|
|
72
74
|
type: "button",
|
|
73
75
|
className: "typo-label-md text-[var(--Text-Accent-Primary)]",
|
|
74
|
-
onClick:
|
|
76
|
+
onClick: y,
|
|
75
77
|
children: "もっと見る"
|
|
76
78
|
}
|
|
77
79
|
)
|
|
78
80
|
] }),
|
|
79
|
-
d && /* @__PURE__ */ e("div", { className: r("shrink-0 overflow-hidden rounded-lg",
|
|
81
|
+
d && /* @__PURE__ */ e("div", { className: r("shrink-0 overflow-hidden rounded-lg", T), children: /* @__PURE__ */ e(
|
|
80
82
|
"img",
|
|
81
83
|
{
|
|
82
84
|
src: d,
|
|
@@ -95,7 +97,7 @@ function O({
|
|
|
95
97
|
onClick: g,
|
|
96
98
|
children: [
|
|
97
99
|
/* @__PURE__ */ e(
|
|
98
|
-
|
|
100
|
+
z,
|
|
99
101
|
{
|
|
100
102
|
size: 16,
|
|
101
103
|
className: r(
|
|
@@ -122,5 +124,5 @@ function O({
|
|
|
122
124
|
);
|
|
123
125
|
}
|
|
124
126
|
export {
|
|
125
|
-
|
|
127
|
+
P as ReviewCard
|
|
126
128
|
};
|
|
@@ -1,61 +1,62 @@
|
|
|
1
|
-
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as o, jsxs as c } from "react/jsx-runtime";
|
|
2
3
|
import "react";
|
|
3
4
|
import { ChevronDownIcon as d } from "lucide-react";
|
|
4
|
-
import { Accordion as
|
|
5
|
+
import { Accordion as r } from "radix-ui";
|
|
5
6
|
import { cn as i } from "../../lib/utils.js";
|
|
6
7
|
function b({
|
|
7
|
-
...
|
|
8
|
+
...e
|
|
8
9
|
}) {
|
|
9
|
-
return /* @__PURE__ */
|
|
10
|
+
return /* @__PURE__ */ o(r.Root, { "data-slot": "accordion", ...e });
|
|
10
11
|
}
|
|
11
12
|
function g({
|
|
12
|
-
className:
|
|
13
|
-
...
|
|
13
|
+
className: e,
|
|
14
|
+
...t
|
|
14
15
|
}) {
|
|
15
|
-
return /* @__PURE__ */
|
|
16
|
-
|
|
16
|
+
return /* @__PURE__ */ o(
|
|
17
|
+
r.Item,
|
|
17
18
|
{
|
|
18
19
|
"data-slot": "accordion-item",
|
|
19
|
-
className: i("border-b border-[var(--Border-Medium-Emphasis)] last:border-b-0",
|
|
20
|
-
...
|
|
20
|
+
className: i("border-b border-[var(--Border-Medium-Emphasis)] last:border-b-0", e),
|
|
21
|
+
...t
|
|
21
22
|
}
|
|
22
23
|
);
|
|
23
24
|
}
|
|
24
25
|
function v({
|
|
25
|
-
className:
|
|
26
|
-
children:
|
|
26
|
+
className: e,
|
|
27
|
+
children: t,
|
|
27
28
|
headingLevel: n = 3,
|
|
28
29
|
...a
|
|
29
30
|
}) {
|
|
30
31
|
const s = `h${n}`;
|
|
31
|
-
return /* @__PURE__ */
|
|
32
|
-
|
|
32
|
+
return /* @__PURE__ */ o(r.Header, { asChild: !0, children: /* @__PURE__ */ o(s, { className: "flex", children: /* @__PURE__ */ c(
|
|
33
|
+
r.Trigger,
|
|
33
34
|
{
|
|
34
35
|
"data-slot": "accordion-trigger",
|
|
35
36
|
className: i(
|
|
36
37
|
"flex w-full flex-1 cursor-pointer items-center justify-between gap-4 py-4 text-left typo-label-md text-[var(--Text-High-Emphasis)] transition-all outline-none hover:bg-[var(--Surface-Tertiary)]/60 focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180",
|
|
37
|
-
|
|
38
|
+
e
|
|
38
39
|
),
|
|
39
40
|
...a,
|
|
40
41
|
children: [
|
|
41
|
-
|
|
42
|
-
/* @__PURE__ */
|
|
42
|
+
t,
|
|
43
|
+
/* @__PURE__ */ o(d, { className: "pointer-events-none size-4 shrink-0 text-[var(--Text-Medium-Emphasis)] transition-transform duration-[var(--Motion-Duration-Base)]" })
|
|
43
44
|
]
|
|
44
45
|
}
|
|
45
46
|
) }) });
|
|
46
47
|
}
|
|
47
48
|
function h({
|
|
48
|
-
className:
|
|
49
|
-
children:
|
|
49
|
+
className: e,
|
|
50
|
+
children: t,
|
|
50
51
|
...n
|
|
51
52
|
}) {
|
|
52
|
-
return /* @__PURE__ */
|
|
53
|
-
|
|
53
|
+
return /* @__PURE__ */ o(
|
|
54
|
+
r.Content,
|
|
54
55
|
{
|
|
55
56
|
"data-slot": "accordion-content",
|
|
56
57
|
className: "overflow-hidden typo-body-md data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",
|
|
57
58
|
...n,
|
|
58
|
-
children: /* @__PURE__ */
|
|
59
|
+
children: /* @__PURE__ */ o("div", { className: i("pt-0 pb-4", e), children: t })
|
|
59
60
|
}
|
|
60
61
|
);
|
|
61
62
|
}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
import { jsx as o } from "react/jsx-runtime";
|
|
2
3
|
import { AspectRatio as a } from "radix-ui";
|
|
3
|
-
function
|
|
4
|
+
function r({
|
|
4
5
|
...t
|
|
5
6
|
}) {
|
|
6
7
|
return /* @__PURE__ */ o(a.Root, { "data-slot": "aspect-ratio", ...t });
|
|
7
8
|
}
|
|
8
9
|
export {
|
|
9
|
-
|
|
10
|
+
r as AspectRatio
|
|
10
11
|
};
|
|
@@ -65,7 +65,13 @@ const b = n(
|
|
|
65
65
|
icon: "size-9 rounded-lg",
|
|
66
66
|
"icon-xs": "size-6 rounded [&_svg:not([class*='size-'])]:size-3",
|
|
67
67
|
"icon-sm": "size-8 rounded-lg",
|
|
68
|
-
"icon-lg": "size-10 rounded-lg"
|
|
68
|
+
"icon-lg": "size-10 rounded-lg",
|
|
69
|
+
/**
|
|
70
|
+
* icon-xl — 44px(size-11)。size="default" と同じ高さなので、
|
|
71
|
+
* 入力行(Input / SearchBar / SelectTrigger)の横にアイコンボタンを並置しても揃う。
|
|
72
|
+
* tokens.json の touchTarget["text-input"].min = 44px も満たす唯一の icon サイズ。
|
|
73
|
+
*/
|
|
74
|
+
"icon-xl": "size-11 rounded-lg"
|
|
69
75
|
}
|
|
70
76
|
},
|
|
71
77
|
defaultVariants: {
|