@lanaco/lnc-react-ui 4.0.132 → 4.0.134

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 (48) hide show
  1. package/dist/BannerSectionCarousel.cjs +110 -86
  2. package/dist/BannerSectionCarousel.js +124 -99
  3. package/dist/BlogCardsSponsoredSection.cjs +6 -4
  4. package/dist/BlogCardsSponsoredSection.js +12 -10
  5. package/dist/BlogExploreSection.js +1 -1
  6. package/dist/BlogListSection.cjs +3 -1
  7. package/dist/BlogListSection.js +16 -14
  8. package/dist/BlogProductCardsSection.js +2 -2
  9. package/dist/BlogShopCardsSection.cjs +1 -1
  10. package/dist/BlogShopCardsSection.js +1 -1
  11. package/dist/BlogSingleSection.js +1 -1
  12. package/dist/BlogsSectionDetailed.cjs +1 -1
  13. package/dist/BlogsSectionDetailed.js +2 -2
  14. package/dist/BlogsSectionLarge.js +1 -1
  15. package/dist/BlogsSectionSimple.cjs +1 -1
  16. package/dist/BlogsSectionSimple.js +2 -2
  17. package/dist/BlogsSectionSimpleCentered.js +1 -1
  18. package/dist/BlogsSectionWithFilters.cjs +1 -1
  19. package/dist/BlogsSectionWithFilters.js +2 -2
  20. package/dist/DetailedProductsSection.cjs +1 -1
  21. package/dist/DetailedProductsSection.js +2 -2
  22. package/dist/FieldOfInterestsWithAvatarsCardsSection.js +1 -1
  23. package/dist/GiftCardsSection.cjs +1 -1
  24. package/dist/GiftCardsSection.js +1 -1
  25. package/dist/ProductsWithBannerSection.cjs +1 -1
  26. package/dist/ProductsWithBannerSection.js +2 -2
  27. package/dist/ReviewsSection.js +1 -1
  28. package/dist/SalesCampaignsSection.cjs +27 -27
  29. package/dist/SalesCampaignsSection.js +346 -343
  30. package/dist/ShopAvatar-4-fCYGEc.js +4 -0
  31. package/dist/ShopAvatar-CV3lj34D.cjs +1 -0
  32. package/dist/ShopCardsSection.cjs +1 -1
  33. package/dist/ShopCardsSection.js +1 -1
  34. package/dist/SimpleCategoriesSection.cjs +1 -1
  35. package/dist/SimpleCategoriesSection.js +1 -1
  36. package/dist/SimpleProductsSection.js +2 -2
  37. package/dist/UrgentSaleProductsSection.js +1 -1
  38. package/dist/{index-CU0KClNt.js → index-B7pgRoP5.js} +1 -1
  39. package/dist/{index-3TFXgZHA.js → index-DRP1yTKe.js} +13 -18
  40. package/dist/{index-DJ545v7b.js → index-DiPwx53C.js} +1 -1
  41. package/dist/{skeleton-fVxknFUi.js → skeleton-ChyJLfsR.js} +36 -35
  42. package/dist/skeleton-Dw2U9XhS.cjs +168 -0
  43. package/dist/{style-XXDQBreL.js → style-DAn9Ifqe.js} +9 -7
  44. package/dist/{style-C_BRvopE.cjs → style-DaT7Beup.cjs} +7 -5
  45. package/dist/{suspense-product-card-detailed-BP1opdKD.js → suspense-product-card-detailed-CFZchhUK.js} +1 -1
  46. package/dist/{suspense-product-card-simple-BT5gv-kY.js → suspense-product-card-simple-BuJtwiwA.js} +1 -1
  47. package/package.json +1 -1
  48. package/dist/skeleton-Bl1q9Yqe.cjs +0 -168
@@ -1,16 +1,17 @@
1
- import { jsx as t, jsxs as c, Fragment as Se } from "react/jsx-runtime";
2
- import { createElement as Ce, forwardRef as L, useState as U, useEffect as le, Suspense as Te, memo as Ne, useMemo as ke } from "react";
3
- import { s as m } from "./emotion-styled.browser.esm-BNN1dTl3.js";
4
- import { a as O, o as ce, k as te } from "./utils-BPdU4_1q.js";
5
- import { M } from "./consts-BuFChS64.js";
6
- import { m as de } from "./motion-Ckekul_K.js";
1
+ import { jsx as n, jsxs as g, Fragment as Te } from "react/jsx-runtime";
2
+ import { forwardRef as z, useRef as ke, useEffect as K, Fragment as Ne, createElement as De, useState as U, Suspense as Ie, memo as Pe, useMemo as Me } from "react";
3
+ import { s as f } from "./emotion-styled.browser.esm-BNN1dTl3.js";
4
+ import { a as O, k as J, l as ze, o as de } from "./utils-BPdU4_1q.js";
5
+ import { M as L } from "./consts-BuFChS64.js";
6
+ import { m as ge } from "./motion-Ckekul_K.js";
7
7
  import { P as a } from "./index-CblbdqjE.js";
8
- import ge from "./Icon.js";
9
- import De from "./Badge.js";
10
- import { u as q } from "./emotion-element-f0de968e.browser.esm-CkCiQliQ.js";
11
- import ne from "./IconButton.js";
12
- import { u as me } from "./useDetectMobile-Bkvj0VMa.js";
13
- const Ie = m.div`
8
+ import me from "./Icon.js";
9
+ import { D as ae } from "./ShopAvatar-4-fCYGEc.js";
10
+ import Le from "./Badge.js";
11
+ import { u as Q } from "./emotion-element-f0de968e.browser.esm-CkCiQliQ.js";
12
+ import oe from "./IconButton.js";
13
+ import { u as he } from "./useDetectMobile-Bkvj0VMa.js";
14
+ const Ue = f.div`
14
15
  cursor: pointer;
15
16
  display: flex;
16
17
  gap: 1rem;
@@ -18,14 +19,14 @@ const Ie = m.div`
18
19
  border-radius: 20px;
19
20
  border: 1px solid var(--gray-95008, #14161a14);
20
21
 
21
- @media (max-width: ${M + "px"}) {
22
+ @media (max-width: ${L + "px"}) {
22
23
  flex-direction: column;
23
24
  padding: 0;
24
25
  gap: 0;
25
26
  border: none;
26
27
  border-radius: 0;
27
28
  }
28
- `, Pe = m.div`
29
+ `, Oe = f.div`
29
30
  border-radius: ${(e) => O(e.theme, "edged")};
30
31
  height: 13.75rem;
31
32
  width: 13.75rem;
@@ -49,12 +50,12 @@ const Ie = m.div`
49
50
  }
50
51
  }
51
52
 
52
- @media (max-width: ${M + "px"}) {
53
+ @media (max-width: ${L + "px"}) {
53
54
  width: 100%;
54
55
  max-width: 100dvh;
55
56
  height: 23.438rem;
56
57
  }
57
- `, Me = m.div`
58
+ `, Ee = f.div`
58
59
  flex: 1;
59
60
  display: flex;
60
61
  flex-direction: column;
@@ -126,7 +127,7 @@ const Ie = m.div`
126
127
  background-color: transparent;
127
128
  }
128
129
 
129
- @media (max-width: ${M + "px"}) {
130
+ @media (max-width: ${L + "px"}) {
130
131
  padding: 1.25rem;
131
132
 
132
133
  & .campaign-title {
@@ -140,13 +141,13 @@ const Ie = m.div`
140
141
  gap: 0.25rem;
141
142
  }
142
143
  }
143
- `, ae = (e = !1, n = !1, o = !1) => `
144
+ `, ie = (e = !1, t = !1, o = !1) => `
144
145
  display: flex;
145
- ${n ? "flex-wrap: wrap;" : ""}
146
- ${n ? "" : "flex-wrap: nowrap;"}
146
+ ${t ? "flex-wrap: wrap;" : ""}
147
+ ${t ? "" : "flex-wrap: nowrap;"}
147
148
  ${e ? "align-items: center;" : ""}
148
149
  ${o ? "justify-content: center;" : ""}
149
- `, ze = m(de.div)`
150
+ `, je = f(ge.div)`
150
151
  text-decoration: none;
151
152
  ${(e) => e.hasPermission === !0 && "cursor: pointer"};
152
153
 
@@ -163,7 +164,7 @@ const Ie = m.div`
163
164
  text-decoration: none;
164
165
  }
165
166
 
166
- ${ae(!0)}
167
+ ${ie(!0)}
167
168
  gap: 0.5rem;
168
169
  padding: 0.5rem;
169
170
  color: var(--gray-950);
@@ -179,7 +180,7 @@ const Ie = m.div`
179
180
  font-weight: 400;
180
181
  }
181
182
  & .logo-wrapper {
182
- ${ae(!0, !1, !0)}
183
+ ${ie(!0, !1, !0)}
183
184
  flex-shrink: 0;
184
185
  border-radius: 999px;
185
186
 
@@ -217,13 +218,13 @@ const Ie = m.div`
217
218
  cursor: pointer;
218
219
  background-color: var(--gray-95080, #14161acc);
219
220
  }
220
- `, Ue = m.div`
221
+ `, Re = f.div`
221
222
  position: absolute;
222
223
  top: 0.5rem;
223
224
  ${(e) => e.alignToLeft === !0 ? "left: 0.5rem;" : "right: 0.5rem;"}
224
225
  display: flex;
225
226
  gap: 0.25rem;
226
- `, Le = m.div`
227
+ `, Be = f.div`
227
228
  border-radius: ${(e) => O(e.theme, e.borderRadius || "slight")};
228
229
  background-color: ${(e) => e == null ? void 0 : e.color};
229
230
  color: white;
@@ -239,54 +240,67 @@ const Ie = m.div`
239
240
  & i {
240
241
  font-size: 0.813rem;
241
242
  }
242
- `, he = (e) => {
243
+ `, Fe = z(({ src: e, ...t }, o) => {
244
+ const i = ke();
245
+ return K(() => {
246
+ var c;
247
+ const m = (d) => {
248
+ d.target.src = ae, d.onerror = null;
249
+ };
250
+ return (c = i == null ? void 0 : i.current) == null || c.addEventListener("error", m), () => {
251
+ var d;
252
+ (d = i == null ? void 0 : i.current) == null || d.removeEventListener("error", m);
253
+ };
254
+ }, []), /* @__PURE__ */ n(Ne, { ref: o, children: J(e) ? /* @__PURE__ */ n("img", { ref: i, src: e, ...t }) : /* @__PURE__ */ n("img", { src: ae, ...t }) });
255
+ }), ue = (e) => {
243
256
  const {
244
- uuid: n,
257
+ uuid: t,
245
258
  hasPermission: o = !0,
246
- isUser: l,
247
- image: f,
248
- name: u,
249
- notifications: p = 0,
250
- color: s = "primary",
251
- size: d = "large",
252
- style: g,
253
- disabled: T,
259
+ isUser: i,
260
+ image: m,
261
+ imageComponent: c,
262
+ name: d,
263
+ notifications: l = 0,
264
+ color: h = "primary",
265
+ size: u = "large",
266
+ style: N,
267
+ disabled: $,
254
268
  onClick: b = () => {
255
269
  },
256
- isActive: $,
257
- className: _,
258
- shopCategory: S,
270
+ isActive: _,
271
+ className: C,
272
+ shopCategory: y,
259
273
  // new
260
- themeData: x
261
- } = e, y = {
262
- theme: q(),
263
- color: s,
264
- size: d,
265
- style: g,
266
- disabled: T
274
+ themeData: v
275
+ } = e, D = {
276
+ theme: Q(),
277
+ color: h,
278
+ size: u,
279
+ style: N,
280
+ disabled: $
267
281
  };
268
- return /* @__PURE__ */ Ce(
269
- ze,
282
+ return /* @__PURE__ */ De(
283
+ je,
270
284
  {
271
- onClick: (k) => {
272
- k.stopPropagation(), o === !0 && (b == null || b());
285
+ onClick: (T) => {
286
+ T.stopPropagation(), o === !0 && (b == null || b());
273
287
  },
274
- ...y,
275
- key: u,
276
- className: `profile-item ${_}`,
288
+ ...D,
289
+ key: d,
290
+ className: `profile-item ${C}`,
277
291
  hasPermission: o,
278
- isActive: $,
279
- themeColor: (x == null ? void 0 : x.code) || "transparent"
292
+ isActive: _,
293
+ themeColor: (v == null ? void 0 : v.code) || "transparent"
280
294
  },
281
- /* @__PURE__ */ t("div", { className: "logo-wrapper", children: f }),
282
- /* @__PURE__ */ c("div", { children: [
283
- /* @__PURE__ */ t("div", { className: "name", children: u }),
284
- !l && /* @__PURE__ */ t("div", { className: "description", children: S }),
285
- p > 0 && /* @__PURE__ */ t("div", { className: "notifications-number", children: /* @__PURE__ */ t(De, { className: "badge", color: "danger", size: "small", children: p > 99 ? "99+" : p }) })
295
+ /* @__PURE__ */ n("div", { className: "logo-wrapper", children: ze(c) ? c : m }),
296
+ /* @__PURE__ */ g("div", { children: [
297
+ /* @__PURE__ */ n("div", { className: "name", children: d }),
298
+ !i && /* @__PURE__ */ n("div", { className: "description", children: y }),
299
+ l > 0 && /* @__PURE__ */ n("div", { className: "notifications-number", children: /* @__PURE__ */ n(Le, { className: "badge", color: "danger", size: "small", children: l > 99 ? "99+" : l }) })
286
300
  ] })
287
301
  );
288
302
  };
289
- he.propTypes = {
303
+ ue.propTypes = {
290
304
  id: a.any,
291
305
  isUserProfile: a.bool,
292
306
  themeColor: a.string,
@@ -308,176 +322,164 @@ he.propTypes = {
308
322
  onSelect: a.func,
309
323
  hasPermission: a.bool
310
324
  };
311
- const ie = (e, n) => {
312
- if (!e || !n) return null;
313
- const o = e.getTime() - n.getTime(), l = 24 * 60 * 60 * 1e3;
314
- return o >= 0 ? Math.ceil(o / l) : Math.floor(o / l);
315
- }, oe = (e) => {
325
+ const se = (e, t) => {
326
+ if (!e || !t) return null;
327
+ const o = e.getTime() - t.getTime(), i = 24 * 60 * 60 * 1e3;
328
+ return o >= 0 ? Math.ceil(o / i) : Math.floor(o / i);
329
+ }, le = (e) => {
316
330
  if (e !== void 0) {
317
- const n = new Date(e), o = n.getFullYear(), l = n.getMonth() + 1;
318
- return `${String(n.getDate()).padStart(2)}. ${l}. ${o}.`;
331
+ const t = new Date(e), o = t.getFullYear(), i = t.getMonth() + 1;
332
+ return `${String(t.getDate()).padStart(2)}. ${i}. ${o}.`;
319
333
  }
320
- }, ue = L((e, n) => {
321
- var re;
322
- const o = q(), {
334
+ }, fe = z((e, t) => {
335
+ var te;
336
+ const o = Q(), {
323
337
  // uuid,
324
- shopUuid: l,
325
- title: f = "",
338
+ shopUuid: i,
339
+ title: m = "",
326
340
  // description,
327
341
  // badges,
328
- coverPhoto: u,
329
- onSelect: p,
342
+ coverPhoto: c,
343
+ onSelect: d,
330
344
  // status,
331
- startDate: s,
332
- endDate: d,
333
- salesPackages: g,
334
- shopName: T,
335
- shopCategory: b,
336
- shopImage: $,
337
- className: _,
338
- onSelectCard: S = () => {
345
+ startDate: l,
346
+ endDate: h,
347
+ salesPackages: u,
348
+ shopName: N,
349
+ shopCategory: $,
350
+ shopImage: b,
351
+ shopImageComponent: _,
352
+ className: C,
353
+ onSelectCard: y = () => {
339
354
  },
340
- onSelectShop: x = () => {
355
+ onSelectShop: v = () => {
341
356
  },
342
- upcoming: N = !1,
343
- upcomingCampaignText: y,
344
- campaignSingleText: k,
345
- salesCampaignTypes: w = [],
346
- startsInPrefixTextPlural: I,
347
- startsinSuffixTextPlural: R,
348
- startsInPrefixTextSingular: j,
349
- startsinSuffixTextSingular: E,
350
- endsInPrefixTextPlural: i,
351
- endsinSuffixTextPlural: h,
352
- endsInPrefixTextSingular: B,
353
- endsinSuffixTextSingular: J,
354
- themeData: W,
355
- numberOfListings: z,
356
- numberOfListingsTextSingular: F,
357
- numberOfListingsTextPlural: r,
358
- ...Y
359
- } = e, K = s ? new Date(s) <= /* @__PURE__ */ new Date() : !1, xe = ie(
360
- s ? new Date(s) : null,
357
+ upcoming: S = !1,
358
+ upcomingCampaignText: D,
359
+ campaignSingleText: T,
360
+ salesCampaignTypes: x = [],
361
+ startsInPrefixTextPlural: E,
362
+ startsinSuffixTextPlural: j,
363
+ startsInPrefixTextSingular: R,
364
+ startsinSuffixTextSingular: s,
365
+ endsInPrefixTextPlural: p,
366
+ endsinSuffixTextPlural: H,
367
+ endsInPrefixTextSingular: G,
368
+ endsinSuffixTextSingular: B,
369
+ themeData: Y,
370
+ numberOfListings: P,
371
+ numberOfListingsTextSingular: r,
372
+ numberOfListingsTextPlural: Z,
373
+ ...we
374
+ } = e, ee = l ? new Date(l) <= /* @__PURE__ */ new Date() : !1, ve = se(
375
+ l ? new Date(l) : null,
361
376
  /* @__PURE__ */ new Date()
362
- ), A = ie(
363
- d ? new Date(d) : null,
377
+ ), F = se(
378
+ h ? new Date(h) : null,
364
379
  /* @__PURE__ */ new Date()
365
- ), we = A !== null && A <= 2 && A > 0, Q = d ? new Date(d).getTime() : null, ve = Date.now(), Z = Q !== null ? Q - ve : null, V = Z !== null && Z > 0 && Z < 24 * 60 * 60 * 1e3, ee = (C, H, v, P, D) => v === 1 ? `${C} ${v} ${P}` : `${H} ${v} ${D}`, be = () => {
366
- if (!d) return null;
367
- const C = ye, v = new Date(d).getTime() - C.getTime();
368
- if (v <= 0) return null;
369
- const P = Math.floor(v / (1e3 * 60 * 60)), D = Math.floor(v % (1e3 * 60 * 60) / (1e3 * 60)), _e = Math.floor(v % (1e3 * 60) / 1e3);
370
- return { hours: P, minutes: D, seconds: _e };
371
- }, [ye, $e] = U(/* @__PURE__ */ new Date());
372
- le(() => {
373
- if (!V) return;
374
- const C = setInterval(() => {
375
- $e(/* @__PURE__ */ new Date());
380
+ ), be = F !== null && F <= 2 && F > 0, re = h ? new Date(h).getTime() : null, ye = Date.now(), q = re !== null ? re - ye : null, W = q !== null && q > 0 && q < 24 * 60 * 60 * 1e3, ne = (k, V, w, M, I) => w === 1 ? `${k} ${w} ${M}` : `${V} ${w} ${I}`, $e = () => {
381
+ if (!h) return null;
382
+ const k = _e, w = new Date(h).getTime() - k.getTime();
383
+ if (w <= 0) return null;
384
+ const M = Math.floor(w / (1e3 * 60 * 60)), I = Math.floor(w % (1e3 * 60 * 60) / (1e3 * 60)), Se = Math.floor(w % (1e3 * 60) / 1e3);
385
+ return { hours: M, minutes: I, seconds: Se };
386
+ }, [_e, Ce] = U(/* @__PURE__ */ new Date());
387
+ K(() => {
388
+ if (!W) return;
389
+ const k = setInterval(() => {
390
+ Ce(/* @__PURE__ */ new Date());
376
391
  }, 1e3);
377
- return () => clearInterval(C);
378
- }, [V]);
379
- const X = V ? be() : null;
380
- return /* @__PURE__ */ c(
381
- Ie,
392
+ return () => clearInterval(k);
393
+ }, [W]);
394
+ const A = W ? $e() : null;
395
+ return /* @__PURE__ */ g(
396
+ Ue,
382
397
  {
383
- ref: n,
398
+ ref: t,
384
399
  theme: o,
385
- className: _,
386
- onClick: S,
387
- ...Y,
400
+ className: C,
401
+ onClick: y,
402
+ ...we,
388
403
  children: [
389
- /* @__PURE__ */ c(Pe, { theme: o, onClick: () => p == null ? void 0 : p(), children: [
390
- /* @__PURE__ */ t("img", { src: u }),
391
- /* @__PURE__ */ t(Ue, { children: g == null ? void 0 : g.map((C, H) => {
392
- var v, P;
393
- return /* @__PURE__ */ t(
394
- Le,
404
+ /* @__PURE__ */ g(Oe, { theme: o, onClick: () => d == null ? void 0 : d(), children: [
405
+ /* @__PURE__ */ n("img", { src: c }),
406
+ /* @__PURE__ */ n(Re, { children: u == null ? void 0 : u.map((k, V) => {
407
+ var w, M;
408
+ return /* @__PURE__ */ n(
409
+ Be,
395
410
  {
396
- color: (v = w == null ? void 0 : w.find((D) => D.value === C)) == null ? void 0 : v.color,
411
+ color: (w = x == null ? void 0 : x.find((I) => I.value === k)) == null ? void 0 : w.color,
397
412
  theme: o,
398
- children: /* @__PURE__ */ t(
399
- ge,
413
+ children: /* @__PURE__ */ n(
414
+ me,
400
415
  {
401
- icon: (P = w == null ? void 0 : w.find((D) => D.value === C)) == null ? void 0 : P.icon
416
+ icon: (M = x == null ? void 0 : x.find((I) => I.value === k)) == null ? void 0 : M.icon
402
417
  }
403
418
  )
404
419
  },
405
- `package__${H}`
420
+ `package__${V}`
406
421
  );
407
422
  }) })
408
423
  ] }),
409
- /* @__PURE__ */ c(Me, { theme: o, children: [
410
- /* @__PURE__ */ t("div", { className: "text-block-wrapper", children: /* @__PURE__ */ c("div", { className: "title-block-wrapper", children: [
411
- /* @__PURE__ */ t("div", { className: "campaign-title", children: (re = N ? y : k) == null ? void 0 : re.toUpperCase() }),
412
- /* @__PURE__ */ t("div", { className: "campaign-title-text", children: f }),
413
- d && s && /* @__PURE__ */ c("div", { children: [
414
- oe(s),
424
+ /* @__PURE__ */ g(Ee, { theme: o, children: [
425
+ /* @__PURE__ */ n("div", { className: "text-block-wrapper", children: /* @__PURE__ */ g("div", { className: "title-block-wrapper", children: [
426
+ /* @__PURE__ */ n("div", { className: "campaign-title", children: (te = S ? D : T) == null ? void 0 : te.toUpperCase() }),
427
+ /* @__PURE__ */ n("div", { className: "campaign-title-text", children: m }),
428
+ h && l && /* @__PURE__ */ g("div", { children: [
429
+ le(l),
415
430
  " - ",
416
- oe(d)
431
+ le(h)
417
432
  ] }),
418
- /* @__PURE__ */ c("div", { className: "timestamp-text", children: [
419
- z > 0 && /* @__PURE__ */ c("span", { className: "listings-text", children: [
420
- z,
433
+ /* @__PURE__ */ g("div", { className: "timestamp-text", children: [
434
+ P > 0 && /* @__PURE__ */ g("span", { className: "listings-text", children: [
435
+ P,
421
436
  " ",
422
- z === 1 ? F : r,
437
+ P === 1 ? r : Z,
423
438
  " ",
424
439
  "∙",
425
440
  " "
426
441
  ] }),
427
- /* @__PURE__ */ t(
442
+ /* @__PURE__ */ n(
428
443
  "span",
429
444
  {
430
- className: `duration-text ${we ? "urgent" : ""} ${K ? "" : "starts-in"}`,
431
- children: V && X ? /* @__PURE__ */ c("div", { className: "countdown-timer", children: [
432
- B,
445
+ className: `duration-text ${be ? "urgent" : ""} ${ee ? "" : "starts-in"}`,
446
+ children: W && A ? /* @__PURE__ */ g("div", { className: "countdown-timer", children: [
447
+ G,
433
448
  " ",
434
- X.hours.toString().padStart(2, "0"),
449
+ A.hours.toString().padStart(2, "0"),
435
450
  ":",
436
- X.minutes.toString().padStart(2, "0"),
451
+ A.minutes.toString().padStart(2, "0"),
437
452
  ":",
438
- X.seconds.toString().padStart(2, "0")
439
- ] }) : K ? ee(
453
+ A.seconds.toString().padStart(2, "0")
454
+ ] }) : ee ? ne(
455
+ G,
456
+ p,
457
+ F,
440
458
  B,
441
- i,
442
- A,
443
- J,
444
- h
445
- ) : ee(
446
- j,
447
- I,
448
- xe,
459
+ H
460
+ ) : ne(
461
+ R,
449
462
  E,
450
- R
463
+ ve,
464
+ s,
465
+ j
451
466
  )
452
467
  }
453
468
  )
454
469
  ] })
455
470
  ] }) }),
456
- /* @__PURE__ */ t(
457
- he,
471
+ /* @__PURE__ */ n(
472
+ ue,
458
473
  {
459
474
  hasPermission: !0,
460
- image: (
461
- // <ShopFallbackImage
462
- // image={shopImage}
463
- // uuid={shopUuid}
464
- // size={ImageSize.SMALL}
465
- // className={`${shopImage ? "" : "no-image"}`}
466
- // />
467
- /* @__PURE__ */ t(
468
- "img",
469
- {
470
- src: $,
471
- className: `${$ ? "" : "no-image"}`
472
- }
473
- )
474
- ),
475
- themeData: W,
475
+ image: /* @__PURE__ */ n(Fe, { src: b }),
476
+ imageComponent: _,
477
+ themeData: Y,
476
478
  isActive: !0,
477
479
  isUser: !1,
478
- name: T,
479
- shopCategory: b,
480
- onClick: () => x(l)
480
+ name: N,
481
+ shopCategory: $,
482
+ onClick: () => v(i)
481
483
  }
482
484
  )
483
485
  ] })
@@ -485,13 +487,13 @@ const ie = (e, n) => {
485
487
  }
486
488
  );
487
489
  });
488
- ue.propTypes = {
490
+ fe.propTypes = {
489
491
  title: a.oneOfType([a.string, a.element]),
490
492
  numberOfListings: a.number,
491
493
  dropdown: a.any,
492
494
  color: a.string
493
495
  };
494
- m.div`
496
+ f.div`
495
497
  display: flex;
496
498
  flex-direction: column;
497
499
  gap: 1.5rem;
@@ -522,7 +524,7 @@ m.div`
522
524
  }
523
525
  }
524
526
 
525
- @media (max-width: ${M + "px"}) {
527
+ @media (max-width: ${L + "px"}) {
526
528
  & .campaign-item {
527
529
  min-width: 100%;
528
530
  width: 100%;
@@ -530,18 +532,18 @@ m.div`
530
532
  }
531
533
  }
532
534
  `;
533
- const G = m.div`
535
+ const X = f.div`
534
536
  width: ${(e) => e.width || "100%"};
535
537
  height: ${(e) => (e.heightCoeff || 1) * 1.125}rem;
536
538
  background-color: var(--gray-200, #dddfe4);
537
539
 
538
- ${ce("-90deg")}
539
- `, Oe = m.div`
540
+ ${de("-90deg")}
541
+ `, We = f.div`
540
542
  display: flex;
541
543
  flex-direction: ${(e) => e != null && e.row ? "row" : "column"};
542
544
  gap: ${(e) => (e == null ? void 0 : e.gap) ?? "0.5rem"};
543
545
  width: ${(e) => (e == null ? void 0 : e.width) ?? "100%"};
544
- `, se = m.div`
546
+ `, ce = f.div`
545
547
  border-radius: ${(e) => O(e.theme, (e == null ? void 0 : e.borderRadius) ?? "regular")};
546
548
  background: var(--gray-200, #dddfe4);
547
549
  position: relative;
@@ -551,8 +553,8 @@ const G = m.div`
551
553
  width: ${(e) => (e == null ? void 0 : e.width) ?? "5rem"};
552
554
  flex-shrink: 0;
553
555
 
554
- ${ce()}
555
- `, Re = m.div`
556
+ ${de()}
557
+ `, Ae = f.div`
556
558
  background: var(--white, #fff);
557
559
  border-radius: ${(e) => O(e.theme, "edged")};
558
560
  box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.1), 0px 1px 2px rgba(0, 0, 0, 0.06);
@@ -581,59 +583,59 @@ const G = m.div`
581
583
  gap: 0.5rem;
582
584
  }
583
585
 
584
- @media (max-width: ${M + "px"}) {
586
+ @media (max-width: ${L + "px"}) {
585
587
  flex-direction: column;
586
588
 
587
589
  & .campaign__user {
588
590
  margin-top: 1rem;
589
591
  }
590
592
  }
591
- `, je = m.div`
593
+ `, Ve = f.div`
592
594
  display: flex;
593
595
  gap: 1.5rem;
594
- `, Ee = L(({}, e) => {
595
- const n = q();
596
- return /* @__PURE__ */ c(Re, { ref: e, theme: n, children: [
597
- /* @__PURE__ */ t("div", { className: "campaign__left-section", children: /* @__PURE__ */ t(
598
- se,
596
+ `, Xe = z(({}, e) => {
597
+ const t = Q();
598
+ return /* @__PURE__ */ g(Ae, { ref: e, theme: t, children: [
599
+ /* @__PURE__ */ n("div", { className: "campaign__left-section", children: /* @__PURE__ */ n(
600
+ ce,
599
601
  {
600
- theme: n,
602
+ theme: t,
601
603
  width: "15rem",
602
604
  height: "15rem",
603
605
  borderRadius: "edged"
604
606
  }
605
607
  ) }),
606
- /* @__PURE__ */ c("div", { className: "campaign__right-section", children: [
607
- /* @__PURE__ */ c(Oe, { theme: n, children: [
608
- /* @__PURE__ */ t(G, { heightCoeff: 0.75, theme: n, width: "35%" }),
609
- /* @__PURE__ */ t(G, { heightCoeff: 1.25, theme: n }),
610
- /* @__PURE__ */ t(G, { heightCoeff: 3, theme: n })
608
+ /* @__PURE__ */ g("div", { className: "campaign__right-section", children: [
609
+ /* @__PURE__ */ g(We, { theme: t, children: [
610
+ /* @__PURE__ */ n(X, { heightCoeff: 0.75, theme: t, width: "35%" }),
611
+ /* @__PURE__ */ n(X, { heightCoeff: 1.25, theme: t }),
612
+ /* @__PURE__ */ n(X, { heightCoeff: 3, theme: t })
611
613
  ] }),
612
- /* @__PURE__ */ c("div", { className: "campaign__user", children: [
613
- /* @__PURE__ */ t(
614
- se,
614
+ /* @__PURE__ */ g("div", { className: "campaign__user", children: [
615
+ /* @__PURE__ */ n(
616
+ ce,
615
617
  {
616
- theme: n,
618
+ theme: t,
617
619
  width: "2.5rem",
618
620
  height: "2.5rem",
619
621
  borderRadius: "curved"
620
622
  }
621
623
  ),
622
- /* @__PURE__ */ t(G, { theme: n, width: "75%" })
624
+ /* @__PURE__ */ n(X, { theme: t, width: "75%" })
623
625
  ] })
624
626
  ] })
625
627
  ] });
626
- }), Be = ({ itemsCount: e = 5, keyPrefix: n }) => /* @__PURE__ */ t(je, { children: Array.from({ length: e }, (o, l) => /* @__PURE__ */ t(
627
- Ee,
628
+ }), He = ({ itemsCount: e = 5, keyPrefix: t }) => /* @__PURE__ */ n(Ve, { children: Array.from({ length: e }, (o, i) => /* @__PURE__ */ n(
629
+ Xe,
628
630
  {},
629
- `${n}-skeleton-campaign-card-${l}`
630
- )) }), We = ({
631
+ `${t}-skeleton-campaign-card-${i}`
632
+ )) }), Ge = ({
631
633
  children: e,
632
- fallbackComponent: n = /* @__PURE__ */ t(Se, {}),
634
+ fallbackComponent: t = /* @__PURE__ */ n(Te, {}),
633
635
  isLoading: o = !1,
634
- itemsCount: l = 5,
635
- keyPrefix: f
636
- }) => /* @__PURE__ */ t(Te, { fallback: n, children: o === !0 ? /* @__PURE__ */ t(Be, { itemsCount: l, keyPrefix: f }) : e }), Fe = m.div`
636
+ itemsCount: i = 5,
637
+ keyPrefix: m
638
+ }) => /* @__PURE__ */ n(Ie, { fallback: t, children: o === !0 ? /* @__PURE__ */ n(He, { itemsCount: i, keyPrefix: m }) : e }), Ye = f.div`
637
639
  margin: 0 auto;
638
640
  display: flex;
639
641
  flex-direction: column;
@@ -674,57 +676,57 @@ const G = m.div`
674
676
  top: 0;
675
677
  right: 0;
676
678
  }
677
- `, Ae = m(de.div)`
679
+ `, Ze = f(ge.div)`
678
680
  display: grid;
679
681
  grid-template-columns: repeat(${(e) => e == null ? void 0 : e.numOfColumns}, 1fr);
680
682
  gap: 1.5rem;
681
683
  width: 100%;
682
684
 
683
- @media (max-width: ${M + "px"}) {
685
+ @media (max-width: ${L + "px"}) {
684
686
  grid-template-columns: repeat(${(e) => e == null ? void 0 : e.numOfColumnsForMobile}, 1fr);
685
687
  }
686
- `, fe = L(
688
+ `, pe = z(
687
689
  ({
688
690
  icon: e,
689
- title: n,
691
+ title: t,
690
692
  numOfSlides: o = 2,
691
- numOfSlidesForMobile: l = 1,
692
- showNavigation: f = !0,
693
- children: u
694
- }, p) => {
695
- const [s, d] = U(0), [g, T] = U(1), [b, $] = U(null), [_, S] = U(null), x = me(), N = 50, y = (u == null ? void 0 : u.length) ?? 1;
696
- le(() => {
697
- const i = () => {
698
- T(x ? l : o);
693
+ numOfSlidesForMobile: i = 1,
694
+ showNavigation: m = !0,
695
+ children: c
696
+ }, d) => {
697
+ const [l, h] = U(0), [u, N] = U(1), [$, b] = U(null), [_, C] = U(null), y = he(), v = 50, S = (c == null ? void 0 : c.length) ?? 1;
698
+ K(() => {
699
+ const s = () => {
700
+ N(y ? i : o);
699
701
  };
700
- return window.addEventListener("resize", i), i(), () => window.removeEventListener("resize", i);
702
+ return window.addEventListener("resize", s), s(), () => window.removeEventListener("resize", s);
701
703
  }, []);
702
- const k = u == null ? void 0 : u.slice(s, s + g), w = (i) => {
703
- var h;
704
- (h = i == null ? void 0 : i.target) == null || h.blur(), s + g < y && d(s + g);
705
- }, I = (i) => {
706
- var h;
707
- (h = i == null ? void 0 : i.target) == null || h.blur(), s - g >= 0 && d(s - g);
704
+ const D = c == null ? void 0 : c.slice(l, l + u), T = (s) => {
705
+ var p;
706
+ (p = s == null ? void 0 : s.target) == null || p.blur(), l + u < S && h(l + u);
707
+ }, x = (s) => {
708
+ var p;
709
+ (p = s == null ? void 0 : s.target) == null || p.blur(), l - u >= 0 && h(l - u);
708
710
  };
709
- return /* @__PURE__ */ c(
710
- Fe,
711
+ return /* @__PURE__ */ g(
712
+ Ye,
711
713
  {
712
- ref: p,
713
- ...x ? { onTouchStart: (i) => {
714
- var h;
715
- S(null), $((h = i == null ? void 0 : i.targetTouches["0"]) == null ? void 0 : h.clientX);
716
- }, onTouchMove: (i) => {
717
- var h;
718
- S((h = i == null ? void 0 : i.targetTouches["0"]) == null ? void 0 : h.clientX);
714
+ ref: d,
715
+ ...y ? { onTouchStart: (s) => {
716
+ var p;
717
+ C(null), b((p = s == null ? void 0 : s.targetTouches["0"]) == null ? void 0 : p.clientX);
718
+ }, onTouchMove: (s) => {
719
+ var p;
720
+ C((p = s == null ? void 0 : s.targetTouches["0"]) == null ? void 0 : p.clientX);
719
721
  }, onTouchEnd: () => {
720
- if (!b || !_) return;
721
- const i = b - _;
722
- i > N && w(), i < -N && I();
722
+ if (!$ || !_) return;
723
+ const s = $ - _;
724
+ s > v && T(), s < -v && x();
723
725
  } } : {},
724
726
  children: [
725
- /* @__PURE__ */ t("div", { className: "scrollable-section__header", children: /* @__PURE__ */ c("div", { className: "scrollable-section__title", children: [
726
- te(e) && /* @__PURE__ */ t(
727
- ge,
727
+ /* @__PURE__ */ n("div", { className: "scrollable-section__header", children: /* @__PURE__ */ g("div", { className: "scrollable-section__title", children: [
728
+ J(e) && /* @__PURE__ */ n(
729
+ me,
728
730
  {
729
731
  icon: e,
730
732
  color: "primary",
@@ -732,13 +734,13 @@ const G = m.div`
732
734
  className: "title__icon"
733
735
  }
734
736
  ),
735
- te(n) && /* @__PURE__ */ t("div", { className: "title__text", children: n })
737
+ J(t) && /* @__PURE__ */ n("div", { className: "title__text", children: t })
736
738
  ] }) }),
737
- /* @__PURE__ */ t(
738
- Ae,
739
+ /* @__PURE__ */ n(
740
+ Ze,
739
741
  {
740
742
  numOfColumns: o,
741
- numOfColumnsForMobile: l,
743
+ numOfColumnsForMobile: i,
742
744
  animate: {
743
745
  x: 0,
744
746
  opacity: 1
@@ -747,33 +749,33 @@ const G = m.div`
747
749
  x: 10,
748
750
  opacity: 0
749
751
  },
750
- children: k
752
+ children: D
751
753
  },
752
- `scrollable-section__content-${s}`
754
+ `scrollable-section__content-${l}`
753
755
  ),
754
- f && y > g && !x && /* @__PURE__ */ c("div", { className: "scrollable-section__navigation", children: [
755
- /* @__PURE__ */ t(
756
- ne,
756
+ m && S > u && !y && /* @__PURE__ */ g("div", { className: "scrollable-section__navigation", children: [
757
+ /* @__PURE__ */ n(
758
+ oe,
757
759
  {
758
760
  icon: "angle-left",
759
761
  borderRadius: "curved",
760
762
  btnType: "tinted",
761
763
  color: "neutral",
762
764
  className: "navigation__arrow",
763
- disabled: s === 0,
764
- onClick: I
765
+ disabled: l === 0,
766
+ onClick: x
765
767
  }
766
768
  ),
767
- /* @__PURE__ */ t(
768
- ne,
769
+ /* @__PURE__ */ n(
770
+ oe,
769
771
  {
770
772
  icon: "angle-right",
771
773
  borderRadius: "curved",
772
774
  btnType: "tinted",
773
775
  color: "neutral",
774
776
  className: "navigation__arrow",
775
- disabled: s + g >= y,
776
- onClick: w
777
+ disabled: l + u >= S,
778
+ onClick: T
777
779
  }
778
780
  )
779
781
  ] })
@@ -782,14 +784,14 @@ const G = m.div`
782
784
  );
783
785
  }
784
786
  );
785
- fe.propTypes = {
787
+ pe.propTypes = {
786
788
  icon: a.string,
787
789
  title: a.string,
788
790
  numOfSlides: a.number,
789
791
  numOfSlidesForMobile: a.number,
790
792
  showNavigation: a.bool
791
793
  };
792
- const Ve = m.div`
794
+ const qe = f.div`
793
795
  display: flex;
794
796
  flex: 1;
795
797
  width: 100%;
@@ -806,71 +808,71 @@ const Ve = m.div`
806
808
  border-radius: 1.25rem;
807
809
  object-fit: cover;
808
810
  }
809
- `, pe = L(
811
+ `, xe = z(
810
812
  ({
811
813
  sectionName: e,
812
- imageUrl: n,
814
+ imageUrl: t,
813
815
  maxHeight: o = "16.25rem",
814
- className: l = "",
815
- handleClick: f = () => {
816
+ className: i = "",
817
+ handleClick: m = () => {
816
818
  }
817
- }) => /* @__PURE__ */ t(
818
- Ve,
819
+ }) => /* @__PURE__ */ n(
820
+ qe,
819
821
  {
820
822
  maxHeight: o,
821
- onClick: f,
822
- className: `itemless-banner ${l}`,
823
- children: /* @__PURE__ */ t("img", { src: n, alt: `itemless-banner__${e}` })
823
+ onClick: m,
824
+ className: `itemless-banner ${i}`,
825
+ children: /* @__PURE__ */ n("img", { src: t, alt: `itemless-banner__${e}` })
824
826
  }
825
827
  )
826
828
  );
827
- pe.propTypes = {
829
+ xe.propTypes = {
828
830
  sectionName: a.string,
829
831
  imageUrl: a.string,
830
832
  maxHeight: a.string,
831
833
  className: a.string,
832
834
  handleClick: a.func
833
835
  };
834
- const Xe = Ne(ue), ar = L(
836
+ const Je = Pe(fe), gr = z(
835
837
  ({
836
838
  sellerType: e = "Shop",
837
- items: n = [],
839
+ items: t = [],
838
840
  title: o,
839
- icon: l,
840
- isLoading: f,
841
- onSelectCard: u = () => {
841
+ icon: i,
842
+ isLoading: m,
843
+ onSelectCard: c = () => {
842
844
  },
843
- onSelectShop: p = () => {
845
+ onSelectShop: d = () => {
844
846
  },
845
- getImage: s = () => {
847
+ getImage: l = () => {
846
848
  },
847
- campaignSingleText: d,
848
- upcomingCampaignText: g,
849
- salesCampaignTypes: T = [],
850
- startsInPrefixTextPlural: b,
851
- startsinSuffixTextPlural: $,
849
+ campaignSingleText: h,
850
+ upcomingCampaignText: u,
851
+ salesCampaignTypes: N = [],
852
+ startsInPrefixTextPlural: $,
853
+ startsinSuffixTextPlural: b,
852
854
  startsInPrefixTextSingular: _,
853
- startsinSuffixTextSingular: S,
854
- endsInPrefixTextPlural: x,
855
- endsinSuffixTextPlural: N,
856
- endsInPrefixTextSingular: y,
857
- endsinSuffixTextSingular: k,
858
- numOfSlides: w = 2,
859
- numOfSlidesForMobile: I = 1,
860
- showNavigation: R = !0,
855
+ startsinSuffixTextSingular: C,
856
+ endsInPrefixTextPlural: y,
857
+ endsinSuffixTextPlural: v,
858
+ endsInPrefixTextSingular: S,
859
+ endsinSuffixTextSingular: D,
860
+ numOfSlides: T = 2,
861
+ numOfSlidesForMobile: x = 1,
862
+ showNavigation: E = !0,
861
863
  numberOfListingsTextSingular: j,
862
- numberOfListingsTextPlural: E,
863
- itemlessImageUrl: i,
864
- itemlessLink: h,
865
- handleItemlessLink: B = () => {
864
+ numberOfListingsTextPlural: R,
865
+ itemlessImageUrl: s,
866
+ itemlessLink: p,
867
+ handleItemlessLink: H = () => {
866
868
  }
867
- }, J) => {
868
- const W = me(), z = ke(() => {
869
- let F = n == null ? void 0 : n.map((r, Y) => /* @__PURE__ */ t(
870
- Xe,
869
+ }, G) => {
870
+ const B = he(), Y = Me(() => {
871
+ let P = t == null ? void 0 : t.map((r, Z) => /* @__PURE__ */ n(
872
+ Je,
871
873
  {
872
874
  className: "campaign-item",
873
- coverPhoto: s(
875
+ coverPhoto: l(
874
876
  r == null ? void 0 : r.coverPhoto,
875
877
  (r == null ? void 0 : r.uuid) || (r == null ? void 0 : r.campaignUuid)
876
878
  ),
@@ -879,60 +881,61 @@ const Xe = Ne(ue), ar = L(
879
881
  salesPackages: r == null ? void 0 : r.salesPackages,
880
882
  sellerType: e,
881
883
  shopImage: r == null ? void 0 : r.profileImage,
884
+ shopImageComponent: r == null ? void 0 : r.profileImageComponent,
882
885
  shopName: r == null ? void 0 : r.shopName,
883
886
  shopUuid: r == null ? void 0 : r.shopUuid,
884
887
  shopCategory: r == null ? void 0 : r.shopCategory,
885
888
  startDate: r == null ? void 0 : r.startDate,
886
889
  title: r == null ? void 0 : r.name,
887
890
  uuid: r == null ? void 0 : r.campaignUuid,
888
- onSelectCard: () => u(r == null ? void 0 : r.campaignUuid, r == null ? void 0 : r.shopUuid),
889
- onSelectShop: () => p(r == null ? void 0 : r.shopUuid),
890
- campaignSingleText: d,
891
- upcomingCampaignText: g,
891
+ onSelectCard: () => c(r == null ? void 0 : r.campaignUuid, r == null ? void 0 : r.shopUuid),
892
+ onSelectShop: () => d(r == null ? void 0 : r.shopUuid),
893
+ campaignSingleText: h,
894
+ upcomingCampaignText: u,
892
895
  upcoming: r == null ? void 0 : r.upcoming,
893
- salesCampaignTypes: T,
894
- startsInPrefixTextPlural: b,
895
- startsinSuffixTextPlural: $,
896
+ salesCampaignTypes: N,
897
+ startsInPrefixTextPlural: $,
898
+ startsinSuffixTextPlural: b,
896
899
  startsInPrefixTextSingular: _,
897
- startsinSuffixTextSingular: S,
898
- endsInPrefixTextPlural: x,
899
- endsinSuffixTextPlural: N,
900
- endsInPrefixTextSingular: y,
901
- endsinSuffixTextSingular: k,
900
+ startsinSuffixTextSingular: C,
901
+ endsInPrefixTextPlural: y,
902
+ endsinSuffixTextPlural: v,
903
+ endsInPrefixTextSingular: S,
904
+ endsinSuffixTextSingular: D,
902
905
  themeData: r == null ? void 0 : r.themeData,
903
906
  numberOfListings: r == null ? void 0 : r.numberOfListings,
904
907
  numberOfListingsTextSingular: j,
905
- numberOfListingsTextPlural: E
908
+ numberOfListingsTextPlural: R
906
909
  },
907
- `campaign__item__${Y}__${r == null ? void 0 : r.startDate}___${r == null ? void 0 : r.endDate}`
910
+ `campaign__item__${Z}__${r == null ? void 0 : r.startDate}___${r == null ? void 0 : r.endDate}`
908
911
  ));
909
- return (n == null ? void 0 : n.length) < 2 && !W ? [
910
- ...F,
911
- /* @__PURE__ */ t(
912
- pe,
912
+ return (t == null ? void 0 : t.length) < 2 && !B ? [
913
+ ...P,
914
+ /* @__PURE__ */ n(
915
+ xe,
913
916
  {
914
- imageUrl: i,
917
+ imageUrl: s,
915
918
  className: "campaign-item",
916
- handleClick: B
919
+ handleClick: H
917
920
  }
918
921
  )
919
- ] : F;
920
- }, [n]);
921
- return /* @__PURE__ */ t(
922
- We,
922
+ ] : P;
923
+ }, [t]);
924
+ return /* @__PURE__ */ n(
925
+ Ge,
923
926
  {
924
- isLoading: f,
925
- itemsCount: W ? 1 : 2,
927
+ isLoading: m,
928
+ itemsCount: B ? 1 : 2,
926
929
  keyPrefix: "sales-camp",
927
- children: /* @__PURE__ */ t(
928
- fe,
930
+ children: /* @__PURE__ */ n(
931
+ pe,
929
932
  {
930
- icon: l,
933
+ icon: i,
931
934
  title: o,
932
- numOfSlides: w,
933
- numOfSlidesForMobile: I,
934
- showNavigation: R,
935
- children: z
935
+ numOfSlides: T,
936
+ numOfSlidesForMobile: x,
937
+ showNavigation: E,
938
+ children: Y
936
939
  }
937
940
  )
938
941
  }
@@ -940,5 +943,5 @@ const Xe = Ne(ue), ar = L(
940
943
  }
941
944
  );
942
945
  export {
943
- ar as default
946
+ gr as default
944
947
  };