@lanaco/lnc-react-ui 4.0.38 → 4.0.40
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/BannerSectionBasic.cjs +9 -9
- package/dist/BannerSectionBasic.js +20 -20
- package/dist/BannerSectionCarousel.cjs +13 -5
- package/dist/BannerSectionCarousel.js +29 -21
- package/dist/BannerSectionGrid.cjs +1 -1
- package/dist/BannerSectionGrid.js +6 -6
- package/dist/BannerSectionSimple.cjs +4 -4
- package/dist/BannerSectionSimple.js +41 -38
- package/dist/BannerSectionWithList.cjs +4 -4
- package/dist/BannerSectionWithList.js +17 -17
- package/dist/BannerSectionWithListImage.cjs +5 -5
- package/dist/BannerSectionWithListImage.js +41 -38
- package/dist/BlogsSectionDetailed.cjs +15 -15
- package/dist/BlogsSectionDetailed.js +128 -92
- package/dist/BlogsSectionLarge.cjs +10 -10
- package/dist/BlogsSectionLarge.js +87 -60
- package/dist/BlogsSectionSimple.cjs +8 -8
- package/dist/BlogsSectionSimple.js +98 -72
- package/dist/BlogsSectionSimpleCentered.cjs +10 -10
- package/dist/BlogsSectionSimpleCentered.js +76 -46
- package/dist/BlogsSectionWithFilters.cjs +11 -11
- package/dist/BlogsSectionWithFilters.js +102 -73
- package/dist/BrandHitsSection.cjs +12 -7
- package/dist/BrandHitsSection.js +10 -5
- package/dist/CalorieCalculatorSection.cjs +7 -8
- package/dist/CalorieCalculatorSection.js +31 -32
- package/dist/CustomLoanMapSection.cjs +2 -2
- package/dist/CustomLoanMapSection.js +13 -13
- package/dist/DetailedProductsSection.cjs +4 -4
- package/dist/DetailedProductsSection.js +66 -57
- package/dist/FieldOfInterestsWithAvatarsCardsSection.cjs +8 -8
- package/dist/FieldOfInterestsWithAvatarsCardsSection.js +9 -8
- package/dist/FieldOfInterestsWithTagsCardsSection.cjs +14 -6
- package/dist/FieldOfInterestsWithTagsCardsSection.js +12 -4
- package/dist/GeneralWithTagsCardsSection.cjs +18 -6
- package/dist/GeneralWithTagsCardsSection.js +44 -31
- package/dist/GiftCardsSection.cjs +9 -5
- package/dist/GiftCardsSection.js +21 -17
- package/dist/LocationSearchSection.cjs +1 -1
- package/dist/LocationSearchSection.js +1 -1
- package/dist/MasonryGeneralCardsSection.cjs +21 -1
- package/dist/MasonryGeneralCardsSection.js +20 -0
- package/dist/OverlayGeneralCardsSection.cjs +60 -104
- package/dist/OverlayGeneralCardsSection.js +138 -147
- package/dist/ProductsWithBannerSection.cjs +10 -10
- package/dist/ProductsWithBannerSection.js +85 -54
- package/dist/SalesCampaignsSection.cjs +17 -17
- package/dist/SalesCampaignsSection.js +81 -81
- package/dist/ShopCardsSection.cjs +19 -9
- package/dist/ShopCardsSection.js +54 -40
- package/dist/SimpleCategoriesSection.cjs +9 -9
- package/dist/SimpleCategoriesSection.js +89 -58
- package/dist/SimpleProductsSection.cjs +3 -3
- package/dist/SimpleProductsSection.js +86 -55
- package/dist/UrgentSaleProductsSection.cjs +5 -5
- package/dist/UrgentSaleProductsSection.js +41 -30
- package/dist/{index-CT6_7UFb.js → index-5cttM4t7.js} +119 -124
- package/dist/{index-CHkb_Sj6.js → index-BT55M3t6.js} +16 -15
- package/dist/{index-Dj5wZCVs.cjs → index-DHJmdMN8.cjs} +6 -5
- package/dist/index-Dn5tPLgP.cjs +95 -0
- package/dist/{style-6tSw9aqK.js → style-CiePxaJ_.js} +6 -6
- package/dist/{style-BR3tIhP1.cjs → style-DN1qT8BE.cjs} +6 -6
- package/dist/suspense-product-card-detailed-BETmfKMT.js +189 -0
- package/dist/{index-vXmvgZ2Y.cjs → suspense-product-card-detailed-DtzOxHaH.cjs} +4 -4
- package/package.json +1 -1
- package/dist/index-D6g5ZqyJ.js +0 -159
- package/dist/index-Q_i-aqsF.cjs +0 -95
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import _, { useState as
|
|
3
|
-
import { P as
|
|
4
|
-
import
|
|
1
|
+
import { jsx as i, jsxs as d, Fragment as z } from "react/jsx-runtime";
|
|
2
|
+
import _, { useState as w, useRef as F, useEffect as j, useImperativeHandle as P, forwardRef as q } from "react";
|
|
3
|
+
import { P as r } from "./index-S5Cd7WrG.js";
|
|
4
|
+
import U from "./FlexBox.js";
|
|
5
5
|
import W from "./IconButton.js";
|
|
6
|
-
import { useTheme as
|
|
7
|
-
import { n as
|
|
6
|
+
import { useTheme as X } from "./ThemeProvider.js";
|
|
7
|
+
import { n as Z } from "./emotion-styled.browser.esm-CjCaF13H.js";
|
|
8
8
|
import { M as C } from "./consts-C1uHV4xc.js";
|
|
9
9
|
import { u as J } from "./useDetectMobile-BC6EGaBc.js";
|
|
10
10
|
import { I as H } from "./index-wy-PXQR9.js";
|
|
11
11
|
import V from "./Button.js";
|
|
12
12
|
import Q from "./Icon.js";
|
|
13
13
|
import { l as Y } from "./utils-DtRLzzTZ.js";
|
|
14
|
-
const
|
|
14
|
+
const ee = Z.div`
|
|
15
15
|
position: relative;
|
|
16
16
|
padding: ${(e) => e.padding};
|
|
17
17
|
|
|
@@ -108,35 +108,35 @@ const rr = q.div`
|
|
|
108
108
|
`, L = _.forwardRef(
|
|
109
109
|
({
|
|
110
110
|
columnGap: e = "2rem",
|
|
111
|
-
rowGap:
|
|
112
|
-
scrollBySize:
|
|
113
|
-
wrapForMobile:
|
|
111
|
+
rowGap: v = "1.25rem",
|
|
112
|
+
scrollBySize: f = 300,
|
|
113
|
+
wrapForMobile: y = !1,
|
|
114
114
|
wrap: n = !1,
|
|
115
|
-
children:
|
|
116
|
-
methodsRef:
|
|
117
|
-
arrowsVisibleOnHover:
|
|
118
|
-
rightAlignArrows:
|
|
119
|
-
padding:
|
|
120
|
-
showTimesBtn:
|
|
121
|
-
noArrows:
|
|
122
|
-
noGradient:
|
|
123
|
-
hideDisabledArrows:
|
|
124
|
-
noMargin:
|
|
125
|
-
...
|
|
126
|
-
},
|
|
127
|
-
const
|
|
128
|
-
var
|
|
129
|
-
(
|
|
115
|
+
children: u,
|
|
116
|
+
methodsRef: b,
|
|
117
|
+
arrowsVisibleOnHover: S = !0,
|
|
118
|
+
rightAlignArrows: k = !1,
|
|
119
|
+
padding: m = "0",
|
|
120
|
+
showTimesBtn: h,
|
|
121
|
+
noArrows: a,
|
|
122
|
+
noGradient: x = !1,
|
|
123
|
+
hideDisabledArrows: c = !1,
|
|
124
|
+
noMargin: g = !1,
|
|
125
|
+
...N
|
|
126
|
+
}, T) => {
|
|
127
|
+
const $ = J(), { theme: l } = X(), [t, A] = w(!1), [p, B] = w(!1), [M, I] = w(!0), o = F(), R = () => {
|
|
128
|
+
var s;
|
|
129
|
+
(s = o.current) == null || s.scrollBy(f, 0);
|
|
130
130
|
}, K = () => {
|
|
131
|
-
var
|
|
132
|
-
(
|
|
133
|
-
}, [E, D] =
|
|
131
|
+
var s;
|
|
132
|
+
(s = o.current) == null || s.scrollBy(-f, 0);
|
|
133
|
+
}, [E, D] = w(!1);
|
|
134
134
|
j(() => {
|
|
135
|
-
var
|
|
135
|
+
var s, O;
|
|
136
136
|
D(
|
|
137
|
-
((
|
|
137
|
+
((s = o == null ? void 0 : o.current) == null ? void 0 : s.scrollWidth) > ((O = o == null ? void 0 : o.current) == null ? void 0 : O.clientWidth)
|
|
138
138
|
);
|
|
139
|
-
}, [
|
|
139
|
+
}, [u]), P(b, () => ({
|
|
140
140
|
scrollToEnd() {
|
|
141
141
|
G();
|
|
142
142
|
},
|
|
@@ -150,42 +150,42 @@ const rr = q.div`
|
|
|
150
150
|
const G = () => {
|
|
151
151
|
o.current.scrollLeft = o.current.scrollWidth;
|
|
152
152
|
};
|
|
153
|
-
return /* @__PURE__ */
|
|
154
|
-
|
|
153
|
+
return /* @__PURE__ */ i(
|
|
154
|
+
ee,
|
|
155
155
|
{
|
|
156
|
-
ref:
|
|
157
|
-
arrowsVisibleOnHover:
|
|
156
|
+
ref: T,
|
|
157
|
+
arrowsVisibleOnHover: S,
|
|
158
158
|
hasOverflow: E,
|
|
159
|
-
noArrows:
|
|
160
|
-
padding:
|
|
161
|
-
rightAlignArrows:
|
|
162
|
-
showTimesBtn:
|
|
163
|
-
theme:
|
|
164
|
-
noMargin:
|
|
165
|
-
...
|
|
166
|
-
children: /* @__PURE__ */
|
|
167
|
-
|
|
159
|
+
noArrows: a,
|
|
160
|
+
padding: m,
|
|
161
|
+
rightAlignArrows: k,
|
|
162
|
+
showTimesBtn: h,
|
|
163
|
+
theme: l,
|
|
164
|
+
noMargin: g,
|
|
165
|
+
...N,
|
|
166
|
+
children: /* @__PURE__ */ d(
|
|
167
|
+
U,
|
|
168
168
|
{
|
|
169
169
|
ref: o,
|
|
170
170
|
className: "scrollable-container",
|
|
171
171
|
columnGap: e,
|
|
172
|
-
rowGap:
|
|
173
|
-
wrap: n ||
|
|
172
|
+
rowGap: v,
|
|
173
|
+
wrap: n || y && $ ? "Wrap" : "NoWrap",
|
|
174
174
|
children: [
|
|
175
|
-
|
|
176
|
-
!(
|
|
175
|
+
a !== !0 && /* @__PURE__ */ d(z, { children: [
|
|
176
|
+
!(c === !0 && p === !0) && /* @__PURE__ */ i(
|
|
177
177
|
W,
|
|
178
178
|
{
|
|
179
179
|
borderRadius: "curved",
|
|
180
180
|
btnType: "tinted",
|
|
181
181
|
className: "scroll-arrow-left",
|
|
182
182
|
color: "neutral",
|
|
183
|
-
disabled:
|
|
183
|
+
disabled: p,
|
|
184
184
|
icon: "angle-left",
|
|
185
185
|
onClick: K
|
|
186
186
|
}
|
|
187
187
|
),
|
|
188
|
-
!(
|
|
188
|
+
!(c === !0 && t === !0) && /* @__PURE__ */ i(
|
|
189
189
|
W,
|
|
190
190
|
{
|
|
191
191
|
borderRadius: "curved",
|
|
@@ -198,33 +198,33 @@ const rr = q.div`
|
|
|
198
198
|
}
|
|
199
199
|
)
|
|
200
200
|
] }),
|
|
201
|
-
/* @__PURE__ */
|
|
201
|
+
/* @__PURE__ */ i(
|
|
202
202
|
H,
|
|
203
203
|
{
|
|
204
204
|
isHorizontal: !0,
|
|
205
205
|
onIsNotVisible: () => {
|
|
206
|
-
|
|
206
|
+
p === !0 && B(!1);
|
|
207
207
|
},
|
|
208
208
|
onIsVisible: () => {
|
|
209
|
-
|
|
209
|
+
p === !1 && B(!0);
|
|
210
210
|
}
|
|
211
211
|
}
|
|
212
212
|
),
|
|
213
|
-
|
|
214
|
-
/* @__PURE__ */
|
|
213
|
+
u,
|
|
214
|
+
/* @__PURE__ */ i(
|
|
215
215
|
H,
|
|
216
216
|
{
|
|
217
217
|
className: "right-scroller",
|
|
218
218
|
isHorizontal: !0,
|
|
219
219
|
onIsNotVisible: () => {
|
|
220
|
-
t === !0 &&
|
|
220
|
+
t === !0 && A(!1), I(!0);
|
|
221
221
|
},
|
|
222
222
|
onIsVisible: () => {
|
|
223
|
-
t === !1 &&
|
|
223
|
+
t === !1 && A(!0), I(!1);
|
|
224
224
|
}
|
|
225
225
|
}
|
|
226
226
|
),
|
|
227
|
-
M && E &&
|
|
227
|
+
M && E && x !== !0 && /* @__PURE__ */ i("div", { className: "gradient" })
|
|
228
228
|
]
|
|
229
229
|
}
|
|
230
230
|
)
|
|
@@ -233,94 +233,89 @@ const rr = q.div`
|
|
|
233
233
|
}
|
|
234
234
|
);
|
|
235
235
|
L.propTypes = {
|
|
236
|
-
title:
|
|
237
|
-
rowGap:
|
|
238
|
-
columnGap:
|
|
239
|
-
scrollBySize:
|
|
240
|
-
wrapForMobile:
|
|
241
|
-
wrap:
|
|
242
|
-
methodsRef:
|
|
243
|
-
arrowsVisibleOnHover:
|
|
244
|
-
rightAlignArrows:
|
|
245
|
-
padding:
|
|
236
|
+
title: r.string,
|
|
237
|
+
rowGap: r.string,
|
|
238
|
+
columnGap: r.string,
|
|
239
|
+
scrollBySize: r.number,
|
|
240
|
+
wrapForMobile: r.bool,
|
|
241
|
+
wrap: r.bool,
|
|
242
|
+
methodsRef: r.any,
|
|
243
|
+
arrowsVisibleOnHover: r.bool,
|
|
244
|
+
rightAlignArrows: r.bool,
|
|
245
|
+
padding: r.string
|
|
246
246
|
};
|
|
247
|
-
const
|
|
247
|
+
const re = q((e, v) => {
|
|
248
248
|
const {
|
|
249
|
-
allButton:
|
|
250
|
-
items:
|
|
249
|
+
allButton: f = !0,
|
|
250
|
+
items: y = [],
|
|
251
251
|
selectedIds: n = [],
|
|
252
|
-
onSelect:
|
|
252
|
+
onSelect: u = () => {
|
|
253
253
|
},
|
|
254
|
-
onRemove:
|
|
254
|
+
onRemove: b = () => {
|
|
255
255
|
},
|
|
256
|
-
onSelectAll:
|
|
256
|
+
onSelectAll: S = () => {
|
|
257
257
|
},
|
|
258
|
-
className:
|
|
259
|
-
showTimesBtn:
|
|
260
|
-
labelKey:
|
|
261
|
-
valueKey:
|
|
262
|
-
codeKey:
|
|
263
|
-
uniqueKey:
|
|
264
|
-
typeKey:
|
|
265
|
-
productsToolbarName:
|
|
266
|
-
|
|
267
|
-
} = e,
|
|
268
|
-
n != null && n.includes(
|
|
258
|
+
className: k,
|
|
259
|
+
showTimesBtn: m = !1,
|
|
260
|
+
labelKey: h = "label",
|
|
261
|
+
valueKey: a = "value",
|
|
262
|
+
codeKey: x = "code",
|
|
263
|
+
uniqueKey: c,
|
|
264
|
+
typeKey: g,
|
|
265
|
+
productsToolbarName: N = "All",
|
|
266
|
+
...T
|
|
267
|
+
} = e, $ = (l, t) => {
|
|
268
|
+
n != null && n.includes(t) ? b(l, t) : u(l, t);
|
|
269
269
|
};
|
|
270
|
-
return /* @__PURE__ */
|
|
270
|
+
return /* @__PURE__ */ d(
|
|
271
271
|
L,
|
|
272
272
|
{
|
|
273
|
+
ref: v,
|
|
273
274
|
arrowsVisibleOnHover: !1,
|
|
274
|
-
className:
|
|
275
|
+
className: k,
|
|
275
276
|
columnGap: "0.75rem",
|
|
276
277
|
padding: "0.25rem 0",
|
|
277
278
|
rightAlignArrows: !0,
|
|
278
|
-
showTimesBtn:
|
|
279
|
-
|
|
279
|
+
showTimesBtn: m,
|
|
280
|
+
...T,
|
|
280
281
|
children: [
|
|
281
|
-
|
|
282
|
+
f && /* @__PURE__ */ i(
|
|
282
283
|
V,
|
|
283
284
|
{
|
|
284
285
|
borderRadius: "curved",
|
|
285
286
|
btnType: n.length === 0 ? "filled" : "tinted",
|
|
286
287
|
className: "badge-button",
|
|
287
288
|
color: "neutral",
|
|
288
|
-
onClick:
|
|
289
|
-
children:
|
|
289
|
+
onClick: S,
|
|
290
|
+
children: N
|
|
290
291
|
}
|
|
291
292
|
),
|
|
292
|
-
|
|
293
|
+
y.map((l, t) => /* @__PURE__ */ d(
|
|
293
294
|
V,
|
|
294
295
|
{
|
|
295
296
|
borderRadius: "curved",
|
|
296
|
-
btnType: n.includes(
|
|
297
|
+
btnType: n.includes(l.uuid) ? "filled" : "tinted",
|
|
297
298
|
className: "badge-button",
|
|
298
299
|
color: "neutral",
|
|
299
|
-
onClick: () =>
|
|
300
|
-
r[u],
|
|
301
|
-
r[f],
|
|
302
|
-
r[y],
|
|
303
|
-
a ? r[a] : null,
|
|
304
|
-
d ? r[d] : null
|
|
305
|
-
),
|
|
300
|
+
onClick: () => $(l, l[a]),
|
|
306
301
|
children: [
|
|
307
|
-
Y(
|
|
308
|
-
/* @__PURE__ */
|
|
302
|
+
Y(l == null ? void 0 : l.icon) && /* @__PURE__ */ d(z, { children: [
|
|
303
|
+
/* @__PURE__ */ i("i", { className: l == null ? void 0 : l.icon }),
|
|
309
304
|
" "
|
|
310
305
|
] }),
|
|
311
|
-
|
|
312
|
-
|
|
306
|
+
l[h],
|
|
307
|
+
m === !0 && /* @__PURE__ */ i(
|
|
313
308
|
Q,
|
|
314
309
|
{
|
|
315
310
|
className: "times-btn",
|
|
316
311
|
icon: "times",
|
|
317
312
|
sizeInUnits: "0.75rem",
|
|
318
|
-
onClick: () =>
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
313
|
+
onClick: () => b(
|
|
314
|
+
l[a],
|
|
315
|
+
l[h],
|
|
316
|
+
l[x],
|
|
317
|
+
c ? l[c] : null,
|
|
318
|
+
g ? l[g] : null
|
|
324
319
|
)
|
|
325
320
|
}
|
|
326
321
|
)
|
|
@@ -332,19 +327,19 @@ const er = U((e, B) => {
|
|
|
332
327
|
}
|
|
333
328
|
);
|
|
334
329
|
});
|
|
335
|
-
|
|
336
|
-
allButton:
|
|
337
|
-
items:
|
|
338
|
-
selectedIds:
|
|
339
|
-
onSelect:
|
|
340
|
-
onRemove:
|
|
341
|
-
onSelectAll:
|
|
342
|
-
className:
|
|
343
|
-
showTimesBtn:
|
|
344
|
-
valuKey:
|
|
345
|
-
labelKey:
|
|
346
|
-
codeKey:
|
|
330
|
+
re.propTypes = {
|
|
331
|
+
allButton: r.bool,
|
|
332
|
+
items: r.array,
|
|
333
|
+
selectedIds: r.array,
|
|
334
|
+
onSelect: r.func,
|
|
335
|
+
onRemove: r.func,
|
|
336
|
+
onSelectAll: r.func,
|
|
337
|
+
className: r.string,
|
|
338
|
+
showTimesBtn: r.bool,
|
|
339
|
+
valuKey: r.string,
|
|
340
|
+
labelKey: r.string,
|
|
341
|
+
codeKey: r.string
|
|
347
342
|
};
|
|
348
343
|
export {
|
|
349
|
-
|
|
344
|
+
re as S
|
|
350
345
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { jsxs as e, jsx as
|
|
1
|
+
import { jsxs as e, jsx as a } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as f } from "react";
|
|
3
|
-
import { n as
|
|
3
|
+
import { n as o } from "./emotion-styled.browser.esm-CjCaF13H.js";
|
|
4
4
|
import { m as u, l as h, n as b, G as x } from "./utils-DtRLzzTZ.js";
|
|
5
|
-
|
|
5
|
+
const C = o.div`
|
|
6
6
|
background-color: var(--gray-200, #dddfe4);
|
|
7
7
|
border-radius: 0.75rem;
|
|
8
8
|
min-width: 11.625rem;
|
|
@@ -10,8 +10,7 @@ a.div`
|
|
|
10
10
|
max-width: 11.625rem;
|
|
11
11
|
max-height: 11.625rem;
|
|
12
12
|
${u("-90deg")}
|
|
13
|
-
|
|
14
|
-
const v = a.div`
|
|
13
|
+
`, v = o.div`
|
|
15
14
|
display: flex;
|
|
16
15
|
flex-direction: column;
|
|
17
16
|
justify-content: end;
|
|
@@ -54,6 +53,7 @@ const v = a.div`
|
|
|
54
53
|
aspect-ratio: 1 / 1; /* defining the aspect ratio of the image */
|
|
55
54
|
object-fit: cover; /* making sure the image isn't distorted */
|
|
56
55
|
border-radius: 0.75rem;
|
|
56
|
+
mix-blend-mode: multiply;
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
& .fallback-image {
|
|
@@ -75,7 +75,7 @@ const v = a.div`
|
|
|
75
75
|
border-radius: 62.4375rem;
|
|
76
76
|
z-index: 1;
|
|
77
77
|
background-color: var(--white, #fff);
|
|
78
|
-
color: var(--gray-950, #
|
|
78
|
+
color: var(--gray-950, #14161a);
|
|
79
79
|
}
|
|
80
80
|
& .title-simple-product-card {
|
|
81
81
|
z-index: 1;
|
|
@@ -86,17 +86,17 @@ const v = a.div`
|
|
|
86
86
|
&:hover {
|
|
87
87
|
& .title-simple-product-card {
|
|
88
88
|
z-index: 1;
|
|
89
|
-
color: var(--primary-500, #
|
|
89
|
+
color: var(--primary-500, #f59e0b);
|
|
90
90
|
}
|
|
91
91
|
}
|
|
92
|
-
`,
|
|
92
|
+
`, G = f((d, y) => {
|
|
93
93
|
const {
|
|
94
94
|
uuid: w,
|
|
95
95
|
title: n,
|
|
96
96
|
price: r,
|
|
97
97
|
currency: i,
|
|
98
|
-
isNegotiable:
|
|
99
|
-
isFree:
|
|
98
|
+
isNegotiable: l,
|
|
99
|
+
isFree: m,
|
|
100
100
|
image: c,
|
|
101
101
|
sellerUuid: k,
|
|
102
102
|
onSelectCard: s = () => {
|
|
@@ -106,17 +106,18 @@ const v = a.div`
|
|
|
106
106
|
freeText: g = "Free"
|
|
107
107
|
} = d;
|
|
108
108
|
return /* @__PURE__ */ e(v, { className: "simple-product-card", onClick: s, children: [
|
|
109
|
-
h(t) ? t : /* @__PURE__ */
|
|
109
|
+
h(t) ? t : /* @__PURE__ */ a("img", { src: c }),
|
|
110
110
|
/* @__PURE__ */ e("div", { className: "text-block", children: [
|
|
111
|
-
/* @__PURE__ */
|
|
111
|
+
/* @__PURE__ */ a("div", { className: "title-simple-product-card", children: n }),
|
|
112
112
|
/* @__PURE__ */ e("div", { className: "price-chip", children: [
|
|
113
113
|
r && i && `${b(r)} ${x(i)}`,
|
|
114
|
-
|
|
115
|
-
|
|
114
|
+
l && p,
|
|
115
|
+
m && g
|
|
116
116
|
] })
|
|
117
117
|
] })
|
|
118
118
|
] });
|
|
119
119
|
});
|
|
120
120
|
export {
|
|
121
|
-
S
|
|
121
|
+
C as S,
|
|
122
|
+
G as a
|
|
122
123
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const e=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";const e=require("react/jsx-runtime"),u=require("react"),a=require("./emotion-styled.browser.esm-Cle7tAM9.cjs"),r=require("./utils-NZLCh-J5.cjs"),f=a.newStyled.div`
|
|
2
2
|
background-color: var(--gray-200, #dddfe4);
|
|
3
3
|
border-radius: 0.75rem;
|
|
4
4
|
min-width: 11.625rem;
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
max-width: 11.625rem;
|
|
7
7
|
max-height: 11.625rem;
|
|
8
8
|
${r.linearGradientAnimation("-90deg")}
|
|
9
|
-
|
|
9
|
+
`,b=a.newStyled.div`
|
|
10
10
|
display: flex;
|
|
11
11
|
flex-direction: column;
|
|
12
12
|
justify-content: end;
|
|
@@ -49,6 +49,7 @@
|
|
|
49
49
|
aspect-ratio: 1 / 1; /* defining the aspect ratio of the image */
|
|
50
50
|
object-fit: cover; /* making sure the image isn't distorted */
|
|
51
51
|
border-radius: 0.75rem;
|
|
52
|
+
mix-blend-mode: multiply;
|
|
52
53
|
}
|
|
53
54
|
|
|
54
55
|
& .fallback-image {
|
|
@@ -70,7 +71,7 @@
|
|
|
70
71
|
border-radius: 62.4375rem;
|
|
71
72
|
z-index: 1;
|
|
72
73
|
background-color: var(--white, #fff);
|
|
73
|
-
color: var(--gray-950, #
|
|
74
|
+
color: var(--gray-950, #14161a);
|
|
74
75
|
}
|
|
75
76
|
& .title-simple-product-card {
|
|
76
77
|
z-index: 1;
|
|
@@ -81,7 +82,7 @@
|
|
|
81
82
|
&:hover {
|
|
82
83
|
& .title-simple-product-card {
|
|
83
84
|
z-index: 1;
|
|
84
|
-
color: var(--primary-500, #
|
|
85
|
+
color: var(--primary-500, #f59e0b);
|
|
85
86
|
}
|
|
86
87
|
}
|
|
87
|
-
`,h=
|
|
88
|
+
`,h=u.forwardRef((n,x)=>{const{uuid:y,title:d,price:i,currency:t,isNegotiable:l,isFree:c,image:s,sellerUuid:v,onSelectCard:m=()=>{},imageComponent:o,negotiableText:p="Negotiable",freeText:g="Free"}=n;return e.jsxs(b,{className:"simple-product-card",onClick:m,children:[r.isDefined(o)?o:e.jsx("img",{src:s}),e.jsxs("div",{className:"text-block",children:[e.jsx("div",{className:"title-simple-product-card",children:d}),e.jsxs("div",{className:"price-chip",children:[i&&t&&`${r.formatPrice(i)} ${r.GetCurrencySymbol(t)}`,l&&p,c&&g]})]})]})});exports.SimpleProductCard=h;exports.SkeletonWrapper=f;
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
"use strict";const l=require("react/jsx-runtime"),n=require("react"),r=require("./index-BPVoEhTF.cjs"),V=require("./FlexBox.cjs"),R=require("./IconButton.cjs"),_=require("./ThemeProvider.cjs"),z=require("./emotion-styled.browser.esm-Cle7tAM9.cjs"),E=require("./consts-CtNoHdBj.cjs"),D=require("./useDetectMobile-D6d5LpdL.cjs"),K=require("./index-Cb_AeN9A.cjs"),O=require("./Button.cjs"),F=require("./Icon.cjs"),G=require("./utils-NZLCh-J5.cjs"),X=z.newStyled.div`
|
|
2
|
+
position: relative;
|
|
3
|
+
padding: ${e=>e.padding};
|
|
4
|
+
|
|
5
|
+
& button {
|
|
6
|
+
white-space: nowrap;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
& .badge-button {
|
|
10
|
+
${e=>e.showTimesBtn===!0&&"padding-left: 0.5rem; padding-right: 0.5rem;"}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
& .gradient {
|
|
14
|
+
position: absolute;
|
|
15
|
+
top: 50%;
|
|
16
|
+
transform: translate(0, -50%);
|
|
17
|
+
z-index: 4;
|
|
18
|
+
transition: ${"0.3s"};
|
|
19
|
+
right: ${e=>e.noArrows!==!0?"6rem":"0"};
|
|
20
|
+
width: 2rem;
|
|
21
|
+
background: #fff;
|
|
22
|
+
height: 100%;
|
|
23
|
+
-webkit-mask-image: linear-gradient(to left, black 10%, transparent 50%);
|
|
24
|
+
mask-image: linear-gradient(to left, black 10%, transparent 50%);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
& .scrollable-container {
|
|
28
|
+
max-width: -webkit-fill-available;
|
|
29
|
+
max-width: -moz-available; /* WebKit-based browsers will ignore this. */
|
|
30
|
+
max-width: fill-available;
|
|
31
|
+
|
|
32
|
+
${e=>e.rightAlignArrows===!0&&e.noArrows!==!0&&"margin-right: 6rem"};
|
|
33
|
+
scroll-behavior: smooth;
|
|
34
|
+
overflow: hidden;
|
|
35
|
+
-webkit-overflow-scrolling: touch;
|
|
36
|
+
::-webkit-scrollbar {
|
|
37
|
+
-webkit-appearance: none;
|
|
38
|
+
}
|
|
39
|
+
-ms-overflow-style: none;
|
|
40
|
+
/* Internet Explorer 10+ */
|
|
41
|
+
scrollbar-width: none;
|
|
42
|
+
/* Firefox */
|
|
43
|
+
|
|
44
|
+
&::-webkit-scrollbar {
|
|
45
|
+
display: none;
|
|
46
|
+
/* Safari and Chrome */
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
@media (max-width: ${E.MOBILE_SIZE_PX+"px"}) {
|
|
50
|
+
margin-right: 0;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
& .scroll-arrow-right,
|
|
54
|
+
& .scroll-arrow-left {
|
|
55
|
+
position: absolute;
|
|
56
|
+
top: 50%;
|
|
57
|
+
transform: translate(0, -50%);
|
|
58
|
+
display: flex;
|
|
59
|
+
justify-content: center;
|
|
60
|
+
align-items: center;
|
|
61
|
+
cursor: pointer;
|
|
62
|
+
|
|
63
|
+
visibility: ${e=>e.arrowsVisibleOnHover===!1&&e.hasOverflow?"visible":"hidden"};
|
|
64
|
+
z-index: 4;
|
|
65
|
+
transition: ${"0.3s"};
|
|
66
|
+
}
|
|
67
|
+
& .scroll-arrow-right {
|
|
68
|
+
${e=>e.rightAlignArrows===!0?"right: 0":"right: 0.7rem"};
|
|
69
|
+
}
|
|
70
|
+
& .scroll-arrow-left {
|
|
71
|
+
${e=>e.rightAlignArrows===!0?"right: 2.625rem":"left: 0.7rem"};
|
|
72
|
+
}
|
|
73
|
+
& .scrollable-container:hover > .scroll-arrow-left,
|
|
74
|
+
& .scrollable-container:hover > .scroll-arrow-right {
|
|
75
|
+
visibility: ${e=>e.hasOverflow?"visible":"hidden"};
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
@media (max-width: ${E.MOBILE_SIZE_PX+"px"}) {
|
|
79
|
+
& .scrollable-container {
|
|
80
|
+
overflow: auto;
|
|
81
|
+
}
|
|
82
|
+
& .scroll-arrow-left,
|
|
83
|
+
& .scroll-arrow-right {
|
|
84
|
+
display: none;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
& .gradient {
|
|
88
|
+
right: 0;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
& .scrollable-container button:nth-of-type(3) {
|
|
92
|
+
${e=>e.noMargin!==!0&&"margin-left: 1rem"};
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
`,W=n.forwardRef(({columnGap:e="2rem",rowGap:w="1.25rem",scrollBySize:u=300,wrapForMobile:y=!1,wrap:a=!1,children:p,methodsRef:b,arrowsVisibleOnHover:T=!0,rightAlignArrows:v=!1,padding:f="0",showTimesBtn:h,noArrows:c,noGradient:x=!1,hideDisabledArrows:d=!1,noMargin:g=!1,...P},S)=>{const k=D.useDetectMobile(),{theme:o}=_.useTheme(),[t,j]=n.useState(!1),[m,N]=n.useState(!1),[H,I]=n.useState(!0),s=n.useRef(),q=()=>{var i;(i=s.current)==null||i.scrollBy(u,0)},B=()=>{var i;(i=s.current)==null||i.scrollBy(-u,0)},[$,L]=n.useState(!1);n.useEffect(()=>{var i,A;L(((i=s==null?void 0:s.current)==null?void 0:i.scrollWidth)>((A=s==null?void 0:s.current)==null?void 0:A.clientWidth))},[p]),n.useImperativeHandle(b,()=>({scrollToEnd(){M()},scrollLeft(){B()},scrollRight(){q()}}));const M=()=>{s.current.scrollLeft=s.current.scrollWidth};return l.jsx(X,{ref:S,arrowsVisibleOnHover:T,hasOverflow:$,noArrows:c,padding:f,rightAlignArrows:v,showTimesBtn:h,theme:o,noMargin:g,...P,children:l.jsxs(V,{ref:s,className:"scrollable-container",columnGap:e,rowGap:w,wrap:a||y&&k?"Wrap":"NoWrap",children:[c!==!0&&l.jsxs(l.Fragment,{children:[!(d===!0&&m===!0)&&l.jsx(R,{borderRadius:"curved",btnType:"tinted",className:"scroll-arrow-left",color:"neutral",disabled:m,icon:"angle-left",onClick:B}),!(d===!0&&t===!0)&&l.jsx(R,{borderRadius:"curved",btnType:"tinted",className:"scroll-arrow-right",color:"neutral",disabled:t,icon:"angle-right",onClick:q})]}),l.jsx(K.InfiniteScrollEndElement,{isHorizontal:!0,onIsNotVisible:()=>{m===!0&&N(!1)},onIsVisible:()=>{m===!1&&N(!0)}}),p,l.jsx(K.InfiniteScrollEndElement,{className:"right-scroller",isHorizontal:!0,onIsNotVisible:()=>{t===!0&&j(!1),I(!0)},onIsVisible:()=>{t===!1&&j(!0),I(!1)}}),H&&$&&x!==!0&&l.jsx("div",{className:"gradient"})]})})});W.propTypes={title:r.PropTypes.string,rowGap:r.PropTypes.string,columnGap:r.PropTypes.string,scrollBySize:r.PropTypes.number,wrapForMobile:r.PropTypes.bool,wrap:r.PropTypes.bool,methodsRef:r.PropTypes.any,arrowsVisibleOnHover:r.PropTypes.bool,rightAlignArrows:r.PropTypes.bool,padding:r.PropTypes.string};const C=n.forwardRef((e,w)=>{const{allButton:u=!0,items:y=[],selectedIds:a=[],onSelect:p=()=>{},onRemove:b=()=>{},onSelectAll:T=()=>{},className:v,showTimesBtn:f=!1,labelKey:h="label",valueKey:c="value",codeKey:x="code",uniqueKey:d,typeKey:g,productsToolbarName:P="All",...S}=e,k=(o,t)=>{a!=null&&a.includes(t)?b(o,t):p(o,t)};return l.jsxs(W,{ref:w,arrowsVisibleOnHover:!1,className:v,columnGap:"0.75rem",padding:"0.25rem 0",rightAlignArrows:!0,showTimesBtn:f,...S,children:[u&&l.jsx(O,{borderRadius:"curved",btnType:a.length===0?"filled":"tinted",className:"badge-button",color:"neutral",onClick:T,children:P}),y.map((o,t)=>l.jsxs(O,{borderRadius:"curved",btnType:a.includes(o.uuid)?"filled":"tinted",className:"badge-button",color:"neutral",onClick:()=>k(o,o[c]),children:[G.isDefined(o==null?void 0:o.icon)&&l.jsxs(l.Fragment,{children:[l.jsx("i",{className:o==null?void 0:o.icon})," "]}),o[h],f===!0&&l.jsx(F,{className:"times-btn",icon:"times",sizeInUnits:"0.75rem",onClick:()=>b(o[c],o[h],o[x],d?o[d]:null,g?o[g]:null)})]},t))]})});C.propTypes={allButton:r.PropTypes.bool,items:r.PropTypes.array,selectedIds:r.PropTypes.array,onSelect:r.PropTypes.func,onRemove:r.PropTypes.func,onSelectAll:r.PropTypes.func,className:r.PropTypes.string,showTimesBtn:r.PropTypes.bool,valuKey:r.PropTypes.string,labelKey:r.PropTypes.string,codeKey:r.PropTypes.string};exports.SelectBar=C;
|
|
@@ -20,7 +20,7 @@ const s = r.div`
|
|
|
20
20
|
|
|
21
21
|
& i {
|
|
22
22
|
font-size: 1.5rem;
|
|
23
|
-
color: var(--primary-500, #
|
|
23
|
+
color: var(--primary-500, #f59e0b);
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
26
|
|
|
@@ -35,7 +35,7 @@ const s = r.div`
|
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
|
-
`,
|
|
38
|
+
`, d = r.div`
|
|
39
39
|
display: flex;
|
|
40
40
|
flex-direction: column;
|
|
41
41
|
gap: 0.75rem;
|
|
@@ -56,7 +56,7 @@ const s = r.div`
|
|
|
56
56
|
|
|
57
57
|
& i {
|
|
58
58
|
font-size: 1.5rem;
|
|
59
|
-
color: var(--primary-500, #
|
|
59
|
+
color: var(--primary-500, #f59e0b);
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
62
|
|
|
@@ -65,7 +65,7 @@ const s = r.div`
|
|
|
65
65
|
font-size: 1.375rem;
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
|
-
`, t = (e) => (e == null ? void 0 : e.toLowerCase()) == "success" ? "color: var(--success-700); border: 1px solid var(--success-600); background-color: var(--sucess-60008);" : (e == null ? void 0 : e.toLowerCase()) == "warning" ? "color: var(--warning-600); border: 1px solid var(--warning-500); background-color: var(--warning-50012);" : (e == null ? void 0 : e.toLowerCase()) == "info" ? "color: var(--info-700); border: 1px solid var(--info-600); background-color: var(--
|
|
68
|
+
`, t = (e) => (e == null ? void 0 : e.toLowerCase()) == "success" ? "color: var(--success-700, #047857); border: 1px solid var(--success-600, #059669); background-color: var(--sucess-60008, #05966914);" : (e == null ? void 0 : e.toLowerCase()) == "warning" ? "color: var(--warning-600, #d97706); border: 1px solid var(--warning-500, #f59e0b); background-color: var(--warning-50012, #f59e0b1f);" : (e == null ? void 0 : e.toLowerCase()) == "info" ? "color: var(--info-700, #6d28d9); border: 1px solid var(--info-600, #7c3aed); background-color: var(--info-60012, #7c3aed1f);" : (e == null ? void 0 : e.toLowerCase()) == "danger" ? "color: var(--danger-600, #e11d48); border: 1px solid var(--danger-500, #f43f5e); background-color: var(--danger-5008, #f43f5e14);" : (e == null ? void 0 : e.toLowerCase()) == "secondary" ? "color: var(--secondary-700, #2667a0); border: 1px solid var(--secondary-600, #3284cb); background-color: var(--secondary-60012, #3284cb1f);" : "color: var(--gray-950, #14161A); border: 1px solid var(--gray-200, #dddfe4); background-color: var(--white, #fff);", o = r.div`
|
|
69
69
|
font-size: 0.75rem;
|
|
70
70
|
font-weight: 500;
|
|
71
71
|
padding: 0 0.5rem;
|
|
@@ -77,7 +77,7 @@ const s = r.div`
|
|
|
77
77
|
${(e) => t(e.color)}
|
|
78
78
|
`;
|
|
79
79
|
export {
|
|
80
|
-
|
|
80
|
+
o as B,
|
|
81
81
|
s as R,
|
|
82
|
-
|
|
82
|
+
d as T
|
|
83
83
|
};
|