@shopify/shop-minis-react 0.0.30 → 0.0.32
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/dist/_virtual/index10.js +2 -2
- package/dist/_virtual/index2.js +4 -4
- package/dist/_virtual/index3.js +4 -4
- package/dist/_virtual/index5.js +2 -3
- package/dist/_virtual/index5.js.map +1 -1
- package/dist/_virtual/index6.js +3 -2
- package/dist/_virtual/index6.js.map +1 -1
- package/dist/_virtual/index7.js +2 -2
- package/dist/_virtual/index8.js +2 -2
- package/dist/_virtual/index9.js +2 -2
- package/dist/components/commerce/product-card.js +195 -199
- package/dist/components/commerce/product-card.js.map +1 -1
- package/dist/components/ui/badge.js +21 -19
- package/dist/components/ui/badge.js.map +1 -1
- package/dist/hooks/user/useGenerateUserToken.js +12 -0
- package/dist/hooks/user/useGenerateUserToken.js.map +1 -0
- package/dist/index.js +254 -241
- package/dist/index.js.map +1 -1
- package/dist/mocks.js +16 -8
- package/dist/mocks.js.map +1 -1
- package/dist/shop-minis-platform/src/types/user.js +6 -0
- package/dist/shop-minis-platform/src/types/user.js.map +1 -0
- package/dist/shop-minis-react/node_modules/.pnpm/@radix-ui_react-use-is-hydrated@0.1.0_@types_react@19.1.6_react@19.1.0/node_modules/@radix-ui/react-use-is-hydrated/dist/index.js +1 -1
- package/dist/shop-minis-react/node_modules/.pnpm/@videojs_xhr@2.7.0/node_modules/@videojs/xhr/lib/index.js +1 -1
- package/dist/shop-minis-react/node_modules/.pnpm/@xmldom_xmldom@0.8.10/node_modules/@xmldom/xmldom/lib/index.js +1 -1
- package/dist/shop-minis-react/node_modules/.pnpm/color-string@1.9.1/node_modules/color-string/index.js +1 -1
- package/dist/shop-minis-react/node_modules/.pnpm/mpd-parser@1.3.1/node_modules/mpd-parser/dist/mpd-parser.es.js +1 -1
- package/dist/shop-minis-react/node_modules/.pnpm/use-sync-external-store@1.5.0_react@19.1.0/node_modules/use-sync-external-store/shim/index.js +1 -1
- package/dist/shop-minis-react/node_modules/.pnpm/video.js@8.23.3/node_modules/video.js/dist/video.es.js +1 -1
- package/dist/utils/colors.js +1 -1
- package/package.json +2 -2
- package/src/components/commerce/product-card.tsx +211 -182
- package/src/components/ui/badge.tsx +7 -9
- package/src/hooks/index.ts +1 -0
- package/src/hooks/user/useGenerateUserToken.ts +25 -0
- package/src/mocks.ts +11 -4
package/dist/_virtual/index10.js
CHANGED
package/dist/_virtual/index2.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { getDefaultExportFromCjs as r } from "./_commonjsHelpers.js";
|
|
2
|
-
import { __require as o } from "../shop-minis-react/node_modules/.pnpm
|
|
3
|
-
var t =
|
|
4
|
-
const
|
|
2
|
+
import { __require as o } from "../shop-minis-react/node_modules/.pnpm/@videojs_xhr@2.7.0/node_modules/@videojs/xhr/lib/index.js";
|
|
3
|
+
var t = o();
|
|
4
|
+
const a = /* @__PURE__ */ r(t);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
a as default
|
|
7
7
|
};
|
|
8
8
|
//# sourceMappingURL=index2.js.map
|
package/dist/_virtual/index3.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { getDefaultExportFromCjs as r } from "./_commonjsHelpers.js";
|
|
2
|
-
import { __require as o } from "../shop-minis-react/node_modules/.pnpm
|
|
3
|
-
var t = o();
|
|
4
|
-
const
|
|
2
|
+
import { __require as o } from "../shop-minis-react/node_modules/.pnpm/color@4.2.3/node_modules/color/index.js";
|
|
3
|
+
var t = /* @__PURE__ */ o();
|
|
4
|
+
const l = /* @__PURE__ */ r(t);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
l as default
|
|
7
7
|
};
|
|
8
8
|
//# sourceMappingURL=index3.js.map
|
package/dist/_virtual/index5.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
var i = r();
|
|
1
|
+
var e = { exports: {} };
|
|
3
2
|
export {
|
|
4
|
-
|
|
3
|
+
e as __module
|
|
5
4
|
};
|
|
6
5
|
//# sourceMappingURL=index5.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index5.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index5.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
package/dist/_virtual/index6.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index6.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index6.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
|
package/dist/_virtual/index7.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { __require as r } from "../shop-minis-react/node_modules/.pnpm
|
|
1
|
+
import { __require as r } from "../shop-minis-react/node_modules/.pnpm/use-sync-external-store@1.5.0_react@19.1.0/node_modules/use-sync-external-store/shim/index.js";
|
|
2
2
|
var i = r();
|
|
3
3
|
export {
|
|
4
|
-
i as
|
|
4
|
+
i as s
|
|
5
5
|
};
|
|
6
6
|
//# sourceMappingURL=index7.js.map
|
package/dist/_virtual/index8.js
CHANGED
package/dist/_virtual/index9.js
CHANGED
|
@@ -1,60 +1,42 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import * as
|
|
3
|
-
import { useCallback as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
const
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
true: "cursor-pointer",
|
|
26
|
-
false: ""
|
|
27
|
-
}
|
|
28
|
-
},
|
|
29
|
-
defaultVariants: {
|
|
30
|
-
variant: "default",
|
|
31
|
-
touchable: !0
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
);
|
|
35
|
-
function W({
|
|
36
|
-
className: o,
|
|
37
|
-
variant: t,
|
|
38
|
-
touchable: r = !0,
|
|
39
|
-
asChild: a = !1,
|
|
40
|
-
onPress: i,
|
|
41
|
-
...d
|
|
1
|
+
import { jsx as o, jsxs as v } from "react/jsx-runtime";
|
|
2
|
+
import * as N from "react";
|
|
3
|
+
import { useState as F, useCallback as C, useMemo as A, useContext as k } from "react";
|
|
4
|
+
import { useShopNavigation as T } from "../../hooks/navigation/useShopNavigation.js";
|
|
5
|
+
import { useSavedProductsActions as V } from "../../hooks/user/useSavedProductsActions.js";
|
|
6
|
+
import { formatMoney as j } from "../../lib/formatMoney.js";
|
|
7
|
+
import { cn as s } from "../../lib/utils.js";
|
|
8
|
+
import { FavoriteButton as B } from "../atoms/favorite-button.js";
|
|
9
|
+
import { ProductVariantPrice as E } from "../atoms/product-variant-price.js";
|
|
10
|
+
import { ThumbhashImage as O } from "../atoms/thumbhash-image.js";
|
|
11
|
+
import { Touchable as S } from "../atoms/touchable.js";
|
|
12
|
+
import { Badge as z } from "../ui/badge.js";
|
|
13
|
+
const I = N.createContext(void 0);
|
|
14
|
+
function u() {
|
|
15
|
+
const t = k(I);
|
|
16
|
+
if (!t)
|
|
17
|
+
throw new Error(
|
|
18
|
+
"ProductCard components must be used within a ProductCard provider"
|
|
19
|
+
);
|
|
20
|
+
return t;
|
|
21
|
+
}
|
|
22
|
+
function L({
|
|
23
|
+
className: t,
|
|
24
|
+
...e
|
|
42
25
|
}) {
|
|
43
|
-
const n = /* @__PURE__ */
|
|
44
|
-
|
|
26
|
+
const { touchable: r, onClick: a } = u(), n = /* @__PURE__ */ o(
|
|
27
|
+
"div",
|
|
45
28
|
{
|
|
46
|
-
className:
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
o
|
|
29
|
+
className: s(
|
|
30
|
+
"relative w-full overflow-hidden rounded-xl border-0",
|
|
31
|
+
t
|
|
50
32
|
),
|
|
51
|
-
...
|
|
33
|
+
...e
|
|
52
34
|
}
|
|
53
35
|
);
|
|
54
|
-
return r &&
|
|
55
|
-
|
|
36
|
+
return r && a ? /* @__PURE__ */ o(
|
|
37
|
+
S,
|
|
56
38
|
{
|
|
57
|
-
onClick:
|
|
39
|
+
onClick: a,
|
|
58
40
|
whileTap: { opacity: 0.7 },
|
|
59
41
|
transition: {
|
|
60
42
|
opacity: { type: "tween", duration: 0.08, ease: "easeInOut" }
|
|
@@ -63,218 +45,232 @@ function W({
|
|
|
63
45
|
}
|
|
64
46
|
) : n;
|
|
65
47
|
}
|
|
66
|
-
function
|
|
67
|
-
className:
|
|
68
|
-
|
|
69
|
-
...r
|
|
48
|
+
function M({
|
|
49
|
+
className: t,
|
|
50
|
+
...e
|
|
70
51
|
}) {
|
|
71
|
-
|
|
52
|
+
const { variant: r } = u();
|
|
53
|
+
return /* @__PURE__ */ o(
|
|
72
54
|
"div",
|
|
73
55
|
{
|
|
74
56
|
"data-slot": "product-card-image-container",
|
|
75
|
-
className:
|
|
57
|
+
className: s(
|
|
76
58
|
// Ensure the product image is stretched to the full size of the container (can't use width/height: 100% because of flex)
|
|
77
59
|
"flex justify-stretch items-stretch",
|
|
78
60
|
"relative overflow-hidden rounded-xl border border-gray-200",
|
|
79
61
|
"w-full aspect-square",
|
|
80
|
-
|
|
81
|
-
|
|
62
|
+
r === "compact" ? "min-h-[104px]" : "min-h-[134px]",
|
|
63
|
+
t
|
|
82
64
|
),
|
|
83
|
-
...
|
|
65
|
+
...e
|
|
84
66
|
}
|
|
85
67
|
);
|
|
86
68
|
}
|
|
87
|
-
function
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
aspectRatio: a,
|
|
92
|
-
thumbhash: i,
|
|
93
|
-
...d
|
|
94
|
-
}) {
|
|
95
|
-
const s = L(
|
|
96
|
-
(n) => i ? /* @__PURE__ */ e(
|
|
97
|
-
G,
|
|
69
|
+
function R({ className: t, ...e }) {
|
|
70
|
+
const { product: r, selectedProductVariant: a } = u(), n = a?.image || r.featuredImage, i = n?.url, d = n?.altText || r.title, c = r.featuredImage?.thumbhash, p = C(
|
|
71
|
+
(l) => c ? /* @__PURE__ */ o(
|
|
72
|
+
O,
|
|
98
73
|
{
|
|
99
74
|
"data-slot": "product-card-image",
|
|
100
|
-
src:
|
|
101
|
-
alt:
|
|
102
|
-
aspectRatio:
|
|
103
|
-
thumbhash:
|
|
104
|
-
className:
|
|
105
|
-
...
|
|
75
|
+
src: l,
|
|
76
|
+
alt: d,
|
|
77
|
+
aspectRatio: 1,
|
|
78
|
+
thumbhash: c,
|
|
79
|
+
className: s("w-full h-full object-cover", t),
|
|
80
|
+
...e
|
|
106
81
|
}
|
|
107
|
-
) : /* @__PURE__ */
|
|
82
|
+
) : /* @__PURE__ */ o(
|
|
108
83
|
"img",
|
|
109
84
|
{
|
|
110
85
|
"data-slot": "product-card-image",
|
|
111
|
-
src:
|
|
112
|
-
alt:
|
|
113
|
-
className:
|
|
114
|
-
...
|
|
86
|
+
src: l,
|
|
87
|
+
alt: d,
|
|
88
|
+
className: s("w-full h-full", t),
|
|
89
|
+
...e
|
|
115
90
|
}
|
|
116
91
|
),
|
|
117
|
-
[
|
|
92
|
+
[d, t, e, c]
|
|
118
93
|
);
|
|
119
|
-
return /* @__PURE__ */
|
|
94
|
+
return /* @__PURE__ */ o("div", { className: "bg-gray-100 flex items-center justify-center w-full h-full", children: i ? p(i) : /* @__PURE__ */ o("div", { className: "text-gray-400 text-sm w-full text-center", children: "No Image" }) });
|
|
120
95
|
}
|
|
121
|
-
function
|
|
122
|
-
className:
|
|
123
|
-
position:
|
|
124
|
-
|
|
125
|
-
|
|
96
|
+
function w({
|
|
97
|
+
className: t,
|
|
98
|
+
position: e = "bottom-left",
|
|
99
|
+
variant: r,
|
|
100
|
+
children: a,
|
|
101
|
+
...n
|
|
126
102
|
}) {
|
|
127
|
-
|
|
103
|
+
const { badgeText: i, badgeVariant: d } = u(), c = a || i;
|
|
104
|
+
return c ? /* @__PURE__ */ o(
|
|
128
105
|
"div",
|
|
129
106
|
{
|
|
130
|
-
className:
|
|
107
|
+
className: s(
|
|
131
108
|
"absolute z-10",
|
|
132
|
-
|
|
109
|
+
e === "top-left" ? "top-3 left-3" : "bottom-2 left-2"
|
|
133
110
|
),
|
|
134
|
-
children: /* @__PURE__ */
|
|
135
|
-
|
|
111
|
+
children: /* @__PURE__ */ o(
|
|
112
|
+
z,
|
|
136
113
|
{
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
114
|
+
variant: r ?? d ?? "none",
|
|
115
|
+
className: s(
|
|
116
|
+
!d && !r && "bg-black/50 text-white border-transparent",
|
|
117
|
+
"rounded",
|
|
118
|
+
t
|
|
119
|
+
),
|
|
120
|
+
...n,
|
|
121
|
+
children: c
|
|
140
122
|
}
|
|
141
123
|
)
|
|
142
124
|
}
|
|
143
|
-
);
|
|
125
|
+
) : null;
|
|
144
126
|
}
|
|
145
|
-
function
|
|
146
|
-
className:
|
|
147
|
-
|
|
148
|
-
filled: r = !1,
|
|
149
|
-
...a
|
|
127
|
+
function q({
|
|
128
|
+
className: t,
|
|
129
|
+
...e
|
|
150
130
|
}) {
|
|
151
|
-
|
|
131
|
+
const { isFavorited: r, onFavoriteToggle: a } = u();
|
|
132
|
+
return /* @__PURE__ */ o("div", { className: s("absolute bottom-3 right-3 z-10", t), ...e, children: /* @__PURE__ */ o(B, { onClick: a, filled: r }) });
|
|
152
133
|
}
|
|
153
|
-
function
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
...r
|
|
157
|
-
}) {
|
|
158
|
-
return t !== "default" ? null : /* @__PURE__ */ e(
|
|
134
|
+
function D({ className: t, ...e }) {
|
|
135
|
+
const { variant: r } = u();
|
|
136
|
+
return r !== "default" ? null : /* @__PURE__ */ o(
|
|
159
137
|
"div",
|
|
160
138
|
{
|
|
161
139
|
"data-slot": "product-card-info",
|
|
162
|
-
className:
|
|
163
|
-
...
|
|
140
|
+
className: s("px-1 pt-2 pb-0 space-y-1", t),
|
|
141
|
+
...e
|
|
164
142
|
}
|
|
165
143
|
);
|
|
166
144
|
}
|
|
167
|
-
function
|
|
168
|
-
className:
|
|
169
|
-
children:
|
|
145
|
+
function G({
|
|
146
|
+
className: t,
|
|
147
|
+
children: e,
|
|
170
148
|
...r
|
|
171
149
|
}) {
|
|
172
|
-
|
|
150
|
+
const { product: a } = u();
|
|
151
|
+
return /* @__PURE__ */ o(
|
|
173
152
|
"h3",
|
|
174
153
|
{
|
|
175
154
|
"data-slot": "product-card-title",
|
|
176
|
-
className:
|
|
155
|
+
className: s(
|
|
177
156
|
"text-sm font-medium leading-tight text-gray-900",
|
|
178
157
|
"truncate overflow-hidden whitespace-nowrap text-ellipsis",
|
|
179
|
-
|
|
158
|
+
t
|
|
180
159
|
),
|
|
181
160
|
...r,
|
|
182
|
-
children:
|
|
161
|
+
children: e || a.title
|
|
162
|
+
}
|
|
163
|
+
);
|
|
164
|
+
}
|
|
165
|
+
function H({ className: t }) {
|
|
166
|
+
const { product: e, selectedProductVariant: r } = u(), a = r?.price || e?.price, n = r?.compareAtPrice || e?.compareAtPrice;
|
|
167
|
+
return /* @__PURE__ */ o(
|
|
168
|
+
E,
|
|
169
|
+
{
|
|
170
|
+
amount: a?.amount || "",
|
|
171
|
+
currencyCode: a?.currencyCode || "",
|
|
172
|
+
compareAtPriceAmount: n?.amount,
|
|
173
|
+
compareAtPriceCurrencyCode: n?.currencyCode,
|
|
174
|
+
className: t
|
|
183
175
|
}
|
|
184
176
|
);
|
|
185
177
|
}
|
|
186
|
-
function
|
|
187
|
-
product:
|
|
188
|
-
|
|
178
|
+
function J() {
|
|
179
|
+
const { product: t, selectedProductVariant: e, variant: r } = u();
|
|
180
|
+
if (r !== "priceOverlay") return null;
|
|
181
|
+
const a = e?.price || t.price, n = a?.currencyCode, i = a?.amount;
|
|
182
|
+
return !n || !i ? null : /* @__PURE__ */ o(w, { position: "top-left", children: j(i, n) });
|
|
183
|
+
}
|
|
184
|
+
function ot({
|
|
185
|
+
product: t,
|
|
186
|
+
selectedProductVariant: e,
|
|
189
187
|
variant: r = "default",
|
|
190
188
|
touchable: a = !0,
|
|
191
|
-
badgeText:
|
|
192
|
-
badgeVariant:
|
|
193
|
-
|
|
189
|
+
badgeText: n,
|
|
190
|
+
badgeVariant: i,
|
|
191
|
+
onProductClick: d,
|
|
192
|
+
onFavoriteToggled: c,
|
|
193
|
+
children: p
|
|
194
194
|
}) {
|
|
195
|
-
const { navigateToProduct:
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
defaultVariantId: m,
|
|
203
|
-
shop: f
|
|
204
|
-
} = o, P = t?.image || I, w = t?.price || j, N = t?.compareAtPrice || S, [p, A] = g.useState(B), h = w?.currencyCode, v = w?.amount, F = P?.url, T = P?.altText || x, O = N?.amount, R = g.useCallback(() => {
|
|
205
|
-
a && n({
|
|
206
|
-
productId: l
|
|
207
|
-
});
|
|
208
|
-
}, [n, l, a]), z = g.useCallback(async () => {
|
|
209
|
-
const u = p;
|
|
210
|
-
A(!u), s?.(!u);
|
|
195
|
+
const { navigateToProduct: l } = T(), { saveProduct: h, unsaveProduct: g } = V(), [f, P] = F(t.isFavorited), y = C(() => {
|
|
196
|
+
a && (d?.(), l({
|
|
197
|
+
productId: t.id
|
|
198
|
+
}));
|
|
199
|
+
}, [l, t.id, a, d]), x = C(async () => {
|
|
200
|
+
const m = f;
|
|
201
|
+
P(!m), c?.(!m);
|
|
211
202
|
try {
|
|
212
|
-
|
|
213
|
-
productId:
|
|
214
|
-
shopId:
|
|
215
|
-
productVariantId:
|
|
216
|
-
}) : await
|
|
217
|
-
productId:
|
|
218
|
-
shopId:
|
|
219
|
-
productVariantId:
|
|
203
|
+
m ? await g({
|
|
204
|
+
productId: t.id,
|
|
205
|
+
shopId: t.shop.id,
|
|
206
|
+
productVariantId: e?.id || t.defaultVariantId
|
|
207
|
+
}) : await h({
|
|
208
|
+
productId: t.id,
|
|
209
|
+
shopId: t.shop.id,
|
|
210
|
+
productVariantId: e?.id || t.defaultVariantId
|
|
220
211
|
});
|
|
221
212
|
} catch {
|
|
222
|
-
|
|
213
|
+
P(m), c?.(m);
|
|
223
214
|
}
|
|
224
215
|
}, [
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
t
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
])
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
216
|
+
f,
|
|
217
|
+
t.id,
|
|
218
|
+
t.shop.id,
|
|
219
|
+
t.defaultVariantId,
|
|
220
|
+
e?.id,
|
|
221
|
+
h,
|
|
222
|
+
g,
|
|
223
|
+
c
|
|
224
|
+
]), b = A(
|
|
225
|
+
() => ({
|
|
226
|
+
// Core data
|
|
227
|
+
product: t,
|
|
228
|
+
selectedProductVariant: e,
|
|
229
|
+
// UI configuration
|
|
237
230
|
variant: r,
|
|
238
231
|
touchable: a,
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
}
|
|
259
|
-
)
|
|
260
|
-
] }),
|
|
261
|
-
/* @__PURE__ */ y(_, { variant: r, children: [
|
|
262
|
-
/* @__PURE__ */ e($, { children: x }),
|
|
263
|
-
/* @__PURE__ */ e(
|
|
264
|
-
D,
|
|
265
|
-
{
|
|
266
|
-
amount: v,
|
|
267
|
-
currencyCode: h,
|
|
268
|
-
compareAtPriceAmount: O,
|
|
269
|
-
compareAtPriceCurrencyCode: N?.currencyCode
|
|
270
|
-
}
|
|
271
|
-
)
|
|
272
|
-
] })
|
|
273
|
-
]
|
|
274
|
-
}
|
|
232
|
+
badgeText: n,
|
|
233
|
+
badgeVariant: i,
|
|
234
|
+
// State
|
|
235
|
+
isFavorited: f,
|
|
236
|
+
// Actions
|
|
237
|
+
onClick: y,
|
|
238
|
+
onFavoriteToggle: x
|
|
239
|
+
}),
|
|
240
|
+
[
|
|
241
|
+
t,
|
|
242
|
+
e,
|
|
243
|
+
r,
|
|
244
|
+
a,
|
|
245
|
+
n,
|
|
246
|
+
i,
|
|
247
|
+
f,
|
|
248
|
+
y,
|
|
249
|
+
x
|
|
250
|
+
]
|
|
275
251
|
);
|
|
252
|
+
return /* @__PURE__ */ o(I.Provider, { value: b, children: p ?? /* @__PURE__ */ v(L, { children: [
|
|
253
|
+
/* @__PURE__ */ v(M, { children: [
|
|
254
|
+
/* @__PURE__ */ o(R, {}),
|
|
255
|
+
r === "priceOverlay" && /* @__PURE__ */ o(J, {}),
|
|
256
|
+
/* @__PURE__ */ o(w, {}),
|
|
257
|
+
/* @__PURE__ */ o(q, {})
|
|
258
|
+
] }),
|
|
259
|
+
r === "default" && /* @__PURE__ */ v(D, { children: [
|
|
260
|
+
/* @__PURE__ */ o(G, {}),
|
|
261
|
+
/* @__PURE__ */ o(H, {})
|
|
262
|
+
] })
|
|
263
|
+
] }) });
|
|
276
264
|
}
|
|
277
265
|
export {
|
|
278
|
-
|
|
266
|
+
ot as ProductCard,
|
|
267
|
+
w as ProductCardBadge,
|
|
268
|
+
L as ProductCardContainer,
|
|
269
|
+
q as ProductCardFavoriteButton,
|
|
270
|
+
R as ProductCardImage,
|
|
271
|
+
M as ProductCardImageContainer,
|
|
272
|
+
D as ProductCardInfo,
|
|
273
|
+
H as ProductCardPrice,
|
|
274
|
+
G as ProductCardTitle
|
|
279
275
|
};
|
|
280
276
|
//# sourceMappingURL=product-card.js.map
|