@lanaco/lnc-react-ui 4.0.183 → 4.0.185

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 (75) hide show
  1. package/dist/BlogCardsSponsoredSection.cjs +5 -3
  2. package/dist/BlogCardsSponsoredSection.js +68 -64
  3. package/dist/BlogCategoryCardsSection.cjs +1 -1
  4. package/dist/BlogCategoryCardsSection.js +1 -1
  5. package/dist/BlogListSection.cjs +8 -6
  6. package/dist/BlogListSection.js +122 -114
  7. package/dist/BlogProductCardsSection.cjs +1 -1
  8. package/dist/BlogProductCardsSection.js +1 -1
  9. package/dist/BlogShopCardsSection.cjs +1 -1
  10. package/dist/BlogShopCardsSection.js +1 -1
  11. package/dist/BlogSingleSection.cjs +1 -1
  12. package/dist/BlogSingleSection.js +1 -1
  13. package/dist/BlogsSectionDetailed.cjs +5 -3
  14. package/dist/BlogsSectionDetailed.js +53 -49
  15. package/dist/BlogsSectionLarge.cjs +2 -2
  16. package/dist/BlogsSectionLarge.js +2 -2
  17. package/dist/BlogsSectionSimple.cjs +9 -7
  18. package/dist/BlogsSectionSimple.js +53 -47
  19. package/dist/BlogsSectionSimpleCentered.cjs +7 -5
  20. package/dist/BlogsSectionSimpleCentered.js +31 -26
  21. package/dist/BlogsSectionWithFilters.cjs +9 -7
  22. package/dist/BlogsSectionWithFilters.js +47 -42
  23. package/dist/BrandHitsSection.cjs +9 -7
  24. package/dist/BrandHitsSection.js +40 -35
  25. package/dist/{CategorySimpleCard-BNYjZQTH.cjs → CategorySimpleCard-D5N8cx0Z.cjs} +4 -3
  26. package/dist/{CategorySimpleCard-BA0S7TaN.js → CategorySimpleCard-DRQuoxXu.js} +17 -15
  27. package/dist/CheckBoxInput.cjs +27 -27
  28. package/dist/CheckBoxInput.js +61 -98
  29. package/dist/ColorInput.cjs +26 -26
  30. package/dist/ColorInput.js +127 -162
  31. package/dist/DetailedProductsInfinitiveSection.cjs +2 -2
  32. package/dist/DetailedProductsInfinitiveSection.js +6 -5
  33. package/dist/DetailedProductsSection.cjs +2 -2
  34. package/dist/DetailedProductsSection.js +12 -10
  35. package/dist/FieldOfInterestsMasonrySection.cjs +5 -3
  36. package/dist/FieldOfInterestsMasonrySection.js +90 -85
  37. package/dist/FieldOfInterestsWithAvatarsCardsSection.cjs +4 -4
  38. package/dist/FieldOfInterestsWithAvatarsCardsSection.js +49 -46
  39. package/dist/FieldOfInterestsWithTagsCardsSection.cjs +8 -6
  40. package/dist/FieldOfInterestsWithTagsCardsSection.js +44 -40
  41. package/dist/GeneralWithTagsCardsSection.cjs +12 -8
  42. package/dist/GeneralWithTagsCardsSection.js +50 -44
  43. package/dist/GiftCardsSection.cjs +7 -5
  44. package/dist/GiftCardsSection.js +46 -40
  45. package/dist/MasonryGeneralCardsSection.cjs +6 -5
  46. package/dist/MasonryGeneralCardsSection.js +26 -23
  47. package/dist/Modal.cjs +14 -13
  48. package/dist/Modal.js +88 -86
  49. package/dist/OverlayGeneralCardsSection.cjs +7 -5
  50. package/dist/OverlayGeneralCardsSection.js +30 -35
  51. package/dist/ProductsWithBannerSection.cjs +8 -6
  52. package/dist/ProductsWithBannerSection.js +71 -77
  53. package/dist/QuattroCardsSection.cjs +8 -6
  54. package/dist/QuattroCardsSection.js +31 -28
  55. package/dist/ReviewsSection.cjs +11 -9
  56. package/dist/ReviewsSection.js +38 -36
  57. package/dist/SalesCampaignsSection.cjs +22 -19
  58. package/dist/SalesCampaignsSection.js +299 -300
  59. package/dist/ShopCardsSection.cjs +1 -1
  60. package/dist/ShopCardsSection.js +1 -1
  61. package/dist/SimpleCategoriesSection.cjs +2 -2
  62. package/dist/SimpleCategoriesSection.js +7 -3
  63. package/dist/SimpleProductsSection.cjs +5 -5
  64. package/dist/SimpleProductsSection.js +62 -72
  65. package/dist/UrgentSaleProductsSection.cjs +6 -6
  66. package/dist/UrgentSaleProductsSection.js +9 -7
  67. package/dist/{index-DoKMLSVY.cjs → index-0p_3g3pT.cjs} +4 -2
  68. package/dist/{index-Bhfq_YpE.js → index-BipuzfLW.js} +28 -25
  69. package/dist/{index-CaAhRJ2-.cjs → index-Bmr3IeZ_.cjs} +12 -11
  70. package/dist/{index-DWLKvVyZ.js → index-C8QkdNHi.js} +27 -23
  71. package/dist/{index-B8I1mHMA.js → index-CA59z2ge.js} +29 -26
  72. package/dist/{index-BnYqZk-h.cjs → index-DHV9awrE.cjs} +4 -2
  73. package/dist/{index-DxZ71UZ1.js → index-DZ8515cZ.js} +144 -137
  74. package/dist/{index-D55MR8tU.cjs → index-MiN854X_.cjs} +6 -4
  75. package/package.json +1 -1
@@ -1,19 +1,21 @@
1
- import { jsx as n, jsxs as l, Fragment as Oe } from "react/jsx-runtime";
2
- import { forwardRef as M, useRef as we, useEffect as ae, Fragment as Me, createElement as je, useState as ne, Suspense as Re, memo as Be, useMemo as We } from "react";
1
+ import { jsx as n, jsxs as s, Fragment as Me } from "react/jsx-runtime";
2
+ import { forwardRef as j, useRef as ye, useEffect as ae, Fragment as Oe, createElement as je, useState as ne, Suspense as Re, memo as Be, useMemo as We } from "react";
3
3
  import { s as y } from "./emotion-styled.browser.esm-BNN1dTl3.js";
4
- import { a as oe, k as te, l as Fe, z as Ge, A as Ve, B as Ae, C as ge } from "./utils-Dc5zIpaz.js";
5
- import { M as E } from "./consts-BuFChS64.js";
6
- import { m as ye } from "./motion-Ckekul_K.js";
7
- import { P as t } from "./index-CblbdqjE.js";
8
- import Se from "./Icon.js";
4
+ import { a as oe, k as te, l as Fe, z as Ge, A as Ve, B as Ae, C as he } from "./utils-Dc5zIpaz.js";
5
+ import { M as U } from "./consts-BuFChS64.js";
6
+ import { m as Se } from "./motion-Ckekul_K.js";
7
+ import _e from "./Icon.js";
9
8
  import { D as pe } from "./ShopAvatar-4-fCYGEc.js";
10
9
  import He from "./Badge.js";
11
- import { u as _e } from "./emotion-element-f0de968e.browser.esm-CkCiQliQ.js";
12
- import he from "./IconButton.js";
13
- import { u as $e } from "./useDetectMobile-Bkvj0VMa.js";
10
+ import { P as a } from "./index-CblbdqjE.js";
11
+ import { u as $e } from "./emotion-element-f0de968e.browser.esm-CkCiQliQ.js";
12
+ import ue from "./IconButton.js";
13
+ import { u as Ie } from "./useDetectMobile-Bkvj0VMa.js";
14
14
  import { I as Ze } from "./index-C0LcDEqa.js";
15
- import { a as O, c as ue, S as fe, b as w, d as xe } from "./style-CXMUA6cI.js";
16
- const qe = y.div`
15
+ import { a as O, c as fe, S as xe, b as w, d as be } from "./style-CXMUA6cI.js";
16
+ const qe = y.a`
17
+ text-decoration: none;
18
+ color: var(--gray-950);
17
19
  cursor: pointer;
18
20
  display: flex;
19
21
  gap: 1rem;
@@ -21,7 +23,7 @@ const qe = y.div`
21
23
  border-radius: 1.25rem;
22
24
  border: 1px solid var(--gray-200, #e4e9f0);
23
25
 
24
- @media (max-width: ${E + "px"}) {
26
+ @media (max-width: ${U + "px"}) {
25
27
  flex-direction: column;
26
28
  padding: 1rem;
27
29
  gap: 0;
@@ -132,7 +134,7 @@ const qe = y.div`
132
134
  color: var(--gray-600, #676e79);
133
135
  }
134
136
 
135
- @media (max-width: ${E + "px"}) {
137
+ @media (max-width: ${U + "px"}) {
136
138
  padding: 1rem 0 0 0;
137
139
 
138
140
  & .campaign-title-text {
@@ -157,14 +159,15 @@ const qe = y.div`
157
159
  gap: 0.25rem;
158
160
  }
159
161
  }
160
- `, be = (r = !1, a = !1, o = !1) => `
162
+ `, ve = (r = !1, t = !1, o = !1) => `
161
163
  display: flex;
162
- ${a ? "flex-wrap: wrap;" : ""}
163
- ${a ? "" : "flex-wrap: nowrap;"}
164
+ ${t ? "flex-wrap: wrap;" : ""}
165
+ ${t ? "" : "flex-wrap: nowrap;"}
164
166
  ${r ? "align-items: center;" : ""}
165
167
  ${o ? "justify-content: center;" : ""}
166
- `, Je = y(ye.div)`
168
+ `, Je = y(Se.a)`
167
169
  text-decoration: none;
170
+ color: var(--gray-950);
168
171
  ${(r) => r.hasPermission === !0 && "cursor: pointer"};
169
172
 
170
173
  &:focus,
@@ -180,7 +183,7 @@ const qe = y.div`
180
183
  text-decoration: none;
181
184
  }
182
185
 
183
- ${be(!0)}
186
+ ${ve(!0)}
184
187
  gap: 0.5rem;
185
188
  padding: 0.5rem;
186
189
  color: var(--gray-950, #14161a);
@@ -196,7 +199,7 @@ const qe = y.div`
196
199
  font-weight: 400;
197
200
  }
198
201
  & .logo-wrapper {
199
- ${be(!0, !1, !0)}
202
+ ${ve(!0, !1, !0)}
200
203
  flex-shrink: 0;
201
204
  border-radius: 999px;
202
205
 
@@ -235,7 +238,7 @@ const qe = y.div`
235
238
  background-color: var(--gray-95080, #14161acc);
236
239
  }
237
240
 
238
- @media (max-width: ${E + "px"}) {
241
+ @media (max-width: ${U + "px"}) {
239
242
  padding: 0;
240
243
  font-size: 0.875rem;
241
244
  }
@@ -261,76 +264,77 @@ const qe = y.div`
261
264
  & i {
262
265
  font-size: 0.813rem;
263
266
  }
264
- `, er = M(({ src: r, ...a }, o) => {
265
- const s = we();
267
+ `, er = j(({ src: r, ...t }, o) => {
268
+ const i = ye();
266
269
  return ae(() => {
267
- var g;
268
- const m = (i) => {
269
- i.target.src = pe, i.onerror = null;
270
+ var h;
271
+ const d = (l) => {
272
+ l.target.src = pe, l.onerror = null;
270
273
  };
271
- return (g = s == null ? void 0 : s.current) == null || g.addEventListener("error", m), () => {
272
- var i;
273
- (i = s == null ? void 0 : s.current) == null || i.removeEventListener("error", m);
274
+ return (h = i == null ? void 0 : i.current) == null || h.addEventListener("error", d), () => {
275
+ var l;
276
+ (l = i == null ? void 0 : i.current) == null || l.removeEventListener("error", d);
274
277
  };
275
- }, []), /* @__PURE__ */ n(Me, { ref: o, children: te(r) ? /* @__PURE__ */ n("img", { ref: s, src: r, ...a }) : /* @__PURE__ */ n("img", { src: pe, ...a }) });
278
+ }, []), /* @__PURE__ */ n(Oe, { ref: o, children: te(r) ? /* @__PURE__ */ n("img", { ref: i, src: r, ...t }) : /* @__PURE__ */ n("img", { src: pe, ...t }) });
276
279
  }), ke = (r) => {
277
280
  const {
278
- uuid: a,
281
+ uuid: t,
279
282
  hasPermission: o = !0,
280
- isUser: s,
281
- image: m,
282
- imageComponent: g,
283
- name: i,
284
- notifications: h = 0,
283
+ isUser: i,
284
+ image: d,
285
+ imageComponent: h,
286
+ name: l,
287
+ notifications: $ = 0,
285
288
  color: c = "primary",
286
- size: b = "large",
287
- style: p,
288
- disabled: I,
289
+ size: p = "large",
290
+ style: m,
291
+ disabled: N,
289
292
  onClick: u = () => {
290
293
  },
291
294
  isActive: v,
292
- className: N,
295
+ className: D,
293
296
  shopCategory: T,
294
297
  // new
295
298
  themeData: S
296
299
  } = r, f = {
297
- theme: _e(),
300
+ theme: $e(),
298
301
  color: c,
299
- size: b,
300
- style: p,
301
- disabled: I
302
+ size: p,
303
+ style: m,
304
+ disabled: N
302
305
  };
303
306
  return /* @__PURE__ */ je(
304
307
  Je,
305
308
  {
306
- onClick: ($) => {
307
- $.stopPropagation(), o === !0 && (u == null || u());
309
+ onClick: (x) => {
310
+ x == null || x.preventDefault(), x.stopPropagation(), o === !0 && (u == null || u());
308
311
  },
309
312
  ...f,
310
- key: i,
311
- className: `profile-item ${N}`,
313
+ key: l,
314
+ className: `profile-item ${D}`,
312
315
  hasPermission: o,
313
316
  isActive: v,
314
- themeColor: (S == null ? void 0 : S.code) || "transparent"
317
+ themeColor: (S == null ? void 0 : S.code) || "transparent",
318
+ href: `/${i ? "user" : "shop"}/${t}`
315
319
  },
316
- /* @__PURE__ */ n("div", { className: "logo-wrapper", children: Fe(g) ? g : m }),
317
- /* @__PURE__ */ l("div", { children: [
318
- /* @__PURE__ */ n("div", { className: "name", children: i }),
319
- !s && /* @__PURE__ */ n("div", { className: "description", children: T }),
320
- h > 0 && /* @__PURE__ */ n("div", { className: "notifications-number", children: /* @__PURE__ */ n(He, { className: "badge", color: "danger", size: "small", children: h > 99 ? "99+" : h }) })
320
+ /* @__PURE__ */ n("div", { className: "logo-wrapper", children: Fe(h) ? h : d }),
321
+ /* @__PURE__ */ s("div", { children: [
322
+ /* @__PURE__ */ n("div", { className: "name", children: l }),
323
+ !i && /* @__PURE__ */ n("div", { className: "description", children: T }),
324
+ $ > 0 && /* @__PURE__ */ n("div", { className: "notifications-number", children: /* @__PURE__ */ n(He, { className: "badge", color: "danger", size: "small", children: $ > 99 ? "99+" : $ }) })
321
325
  ] })
322
326
  );
323
327
  };
324
328
  ke.propTypes = {
325
- id: t.any,
326
- isUserProfile: t.bool,
327
- themeColor: t.string,
328
- image: t.any,
329
- name: t.string,
330
- notifications: t.number,
331
- style: t.object,
332
- className: t.string,
333
- color: t.oneOf([
329
+ id: a.any,
330
+ isUserProfile: a.bool,
331
+ themeColor: a.string,
332
+ image: a.any,
333
+ name: a.string,
334
+ notifications: a.number,
335
+ style: a.object,
336
+ className: a.string,
337
+ color: a.oneOf([
334
338
  "primary",
335
339
  "secondary",
336
340
  "success",
@@ -339,119 +343,120 @@ ke.propTypes = {
339
343
  "information",
340
344
  "neutral"
341
345
  ]),
342
- size: t.oneOf(["large"]),
343
- onSelect: t.func,
344
- hasPermission: t.bool
346
+ size: a.oneOf(["large"]),
347
+ onSelect: a.func,
348
+ hasPermission: a.bool
345
349
  };
346
- const ve = (r) => {
350
+ const we = (r) => {
347
351
  if (r !== void 0) {
348
- const a = new Date(r), o = a.getFullYear(), s = a.getMonth() + 1;
349
- return `${String(a.getDate()).padStart(2)}. ${s}. ${o}.`;
352
+ const t = new Date(r), o = t.getFullYear(), i = t.getMonth() + 1;
353
+ return `${String(t.getDate()).padStart(2)}. ${i}. ${o}.`;
350
354
  }
351
- }, Ce = M((r, a) => {
355
+ }, rr = j((r, t) => {
352
356
  var me;
353
- const o = _e(), {
354
- // uuid,
355
- shopUuid: s,
356
- title: m = "",
357
+ const o = $e(), {
358
+ uuid: i,
359
+ shopUuid: d,
360
+ title: h = "",
357
361
  // description,
358
362
  // badges,
359
- coverPhoto: g,
360
- onSelect: i,
363
+ coverPhoto: l,
364
+ onSelect: $,
361
365
  // status,
362
- startDate: h,
363
- endDate: c,
364
- salesPackages: b,
365
- shopName: p,
366
- shopCategory: I,
367
- shopImage: u,
368
- shopImageComponent: v,
369
- className: N,
370
- onSelectCard: T = () => {
366
+ startDate: c,
367
+ endDate: p,
368
+ salesPackages: m,
369
+ shopName: N,
370
+ shopCategory: u,
371
+ shopImage: v,
372
+ shopImageComponent: D,
373
+ className: T,
374
+ onSelectCard: S = () => {
371
375
  },
372
- onSelectShop: S = () => {
376
+ onSelectShop: g = () => {
373
377
  },
374
- upcoming: d = !1,
375
- upcomingCampaignText: f,
376
- campaignSingleText: $,
377
- salesCampaignTypes: k = [],
378
- startsInPrefixTextPlural: F,
379
- startsinSuffixTextPlural: G,
380
- startsInPrefixTextSingular: V,
381
- startsinSuffixTextSingular: A,
382
- endsInPrefixTextPlural: ie,
383
- endsinSuffixTextPlural: H,
384
- endsInPrefixTextSingular: j,
385
- endsinSuffixTextSingular: Z,
386
- endedText: q,
387
- themeData: se,
388
- numberOfListings: z,
389
- numberOfListingsTextSingular: X,
390
- numberOfListingsTextPlural: R,
391
- metadata: e,
392
- ...Y
393
- } = r, J = we(), D = Ge(h, c), K = D !== -1 && (D == null ? void 0 : D.isEnded) === !0, Q = D !== -1 && !K, ee = Ve(h), L = Ae(c), Te = L !== null && L <= 2 && L > 0, le = ge(c), ce = le ? new Date(le) : null, De = /* @__PURE__ */ new Date(), re = ce ? ce.getTime() - De.getTime() : null, B = re !== null && re > 0 && re < 24 * 60 * 60 * 1e3, de = (x, U, C, _, P) => C === 1 ? `${x} ${C} ${_}` : `${U} ${C} ${P}`, Pe = () => {
394
- if (!c) return null;
395
- const x = ge(c), U = x ? new Date(x) : null;
396
- if (!U) return null;
397
- const C = ze, _ = U.getTime() - C.getTime();
378
+ upcoming: f = !1,
379
+ upcomingCampaignText: x,
380
+ campaignSingleText: A,
381
+ salesCampaignTypes: I = [],
382
+ startsInPrefixTextPlural: H,
383
+ startsinSuffixTextPlural: Z,
384
+ startsInPrefixTextSingular: q,
385
+ startsinSuffixTextSingular: ie,
386
+ endsInPrefixTextPlural: X,
387
+ endsinSuffixTextPlural: Y,
388
+ endsInPrefixTextSingular: R,
389
+ endsinSuffixTextSingular: J,
390
+ endedText: se,
391
+ themeData: B,
392
+ numberOfListings: E,
393
+ numberOfListingsTextSingular: W,
394
+ numberOfListingsTextPlural: e,
395
+ metadata: k,
396
+ ...le
397
+ } = r, F = ye(), M = Ge(c, p), K = M !== -1 && (M == null ? void 0 : M.isEnded) === !0, Q = M !== -1 && !K, ee = Ve(c), z = Ae(p), De = z !== null && z <= 2 && z > 0, ce = he(p), de = ce ? new Date(ce) : null, Te = /* @__PURE__ */ new Date(), re = de ? de.getTime() - Te.getTime() : null, G = re !== null && re > 0 && re < 24 * 60 * 60 * 1e3, ge = (b, L, C, _, P) => C === 1 ? `${b} ${C} ${_}` : `${L} ${C} ${P}`, Pe = () => {
398
+ if (!p) return null;
399
+ const b = he(p), L = b ? new Date(b) : null;
400
+ if (!L) return null;
401
+ const C = ze, _ = L.getTime() - C.getTime();
398
402
  if (_ <= 0) return null;
399
403
  const P = Math.floor(_ / (1e3 * 60 * 60)), Ue = Math.floor(_ % (1e3 * 60 * 60) / (1e3 * 60)), Ee = Math.floor(_ % (1e3 * 60) / 1e3);
400
404
  return { hours: P, minutes: Ue, seconds: Ee };
401
405
  }, [ze, Le] = ne(/* @__PURE__ */ new Date());
402
406
  ae(() => {
403
- if (!B) return;
404
- const x = setInterval(() => {
407
+ if (!G) return;
408
+ const b = setInterval(() => {
405
409
  Le(/* @__PURE__ */ new Date());
406
410
  }, 1e3);
407
- return () => clearInterval(x);
408
- }, [B]);
409
- const W = B ? Pe() : null;
410
- return /* @__PURE__ */ l(
411
+ return () => clearInterval(b);
412
+ }, [G]);
413
+ const V = G ? Pe() : null;
414
+ return /* @__PURE__ */ s(
411
415
  qe,
412
416
  {
413
- ref: J,
417
+ ref: F,
414
418
  theme: o,
415
- className: N,
416
- name: e == null ? void 0 : e.name,
417
- "data-accessor": e == null ? void 0 : e.accessor,
418
- onClick: (x) => T(x, J),
419
- ...Y,
419
+ className: T,
420
+ name: k == null ? void 0 : k.name,
421
+ "data-accessor": k == null ? void 0 : k.accessor,
422
+ onClick: (b) => S(b, F),
423
+ href: `/shop/${d}/campaign/${i}`,
424
+ ...le,
420
425
  children: [
421
- /* @__PURE__ */ l(Xe, { theme: o, onClick: () => i == null ? void 0 : i(), children: [
422
- /* @__PURE__ */ n("img", { src: g }),
423
- /* @__PURE__ */ n(Ke, { children: b == null ? void 0 : b.map((x, U) => {
426
+ /* @__PURE__ */ s(Xe, { theme: o, children: [
427
+ /* @__PURE__ */ n("img", { src: l }),
428
+ /* @__PURE__ */ n(Ke, { children: m == null ? void 0 : m.map((b, L) => {
424
429
  var C, _;
425
430
  return /* @__PURE__ */ n(
426
431
  Qe,
427
432
  {
428
- color: (C = k == null ? void 0 : k.find((P) => P.value === x)) == null ? void 0 : C.color,
433
+ color: (C = I == null ? void 0 : I.find((P) => P.value === b)) == null ? void 0 : C.color,
429
434
  theme: o,
430
435
  children: /* @__PURE__ */ n(
431
- Se,
436
+ _e,
432
437
  {
433
- icon: (_ = k == null ? void 0 : k.find((P) => P.value === x)) == null ? void 0 : _.icon
438
+ icon: (_ = I == null ? void 0 : I.find((P) => P.value === b)) == null ? void 0 : _.icon
434
439
  }
435
440
  )
436
441
  },
437
- `package__${U}`
442
+ `package__${L}`
438
443
  );
439
444
  }) })
440
445
  ] }),
441
- /* @__PURE__ */ l(Ye, { theme: o, children: [
442
- /* @__PURE__ */ n("div", { className: "text-block-wrapper", children: /* @__PURE__ */ l("div", { className: "title-block-wrapper", children: [
443
- /* @__PURE__ */ n("div", { className: "campaign-title", children: (me = d ? f : $) == null ? void 0 : me.toUpperCase() }),
444
- /* @__PURE__ */ n("div", { className: "campaign-title-text", children: m }),
445
- c && h && /* @__PURE__ */ l("div", { className: "campaign-date", children: [
446
- ve(h),
446
+ /* @__PURE__ */ s(Ye, { theme: o, children: [
447
+ /* @__PURE__ */ n("div", { className: "text-block-wrapper", children: /* @__PURE__ */ s("div", { className: "title-block-wrapper", children: [
448
+ /* @__PURE__ */ n("div", { className: "campaign-title", children: (me = f ? x : A) == null ? void 0 : me.toUpperCase() }),
449
+ /* @__PURE__ */ n("div", { className: "campaign-title-text", children: h }),
450
+ p && c && /* @__PURE__ */ s("div", { className: "campaign-date", children: [
451
+ we(c),
447
452
  " - ",
448
- ve(c)
453
+ we(p)
449
454
  ] }),
450
- /* @__PURE__ */ l("div", { className: "timestamp-text", children: [
451
- z > 0 && /* @__PURE__ */ l("span", { className: "listings-text", children: [
452
- z,
455
+ /* @__PURE__ */ s("div", { className: "timestamp-text", children: [
456
+ E > 0 && /* @__PURE__ */ s("span", { className: "listings-text", children: [
457
+ E,
453
458
  " ",
454
- z === 1 ? X : R,
459
+ E === 1 ? W : e,
455
460
  " ",
456
461
  "∙",
457
462
  " "
@@ -459,27 +464,27 @@ const ve = (r) => {
459
464
  /* @__PURE__ */ n(
460
465
  "span",
461
466
  {
462
- className: `duration-text ${Te ? "urgent" : ""} ${Q ? "" : "starts-in"}`,
463
- children: B && W ? /* @__PURE__ */ l("div", { className: "countdown-timer", children: [
464
- j,
467
+ className: `duration-text ${De ? "urgent" : ""} ${Q ? "" : "starts-in"}`,
468
+ children: G && V ? /* @__PURE__ */ s("div", { className: "countdown-timer", children: [
469
+ R,
465
470
  " ",
466
- W.hours.toString().padStart(2, "0"),
471
+ V.hours.toString().padStart(2, "0"),
467
472
  ":",
468
- W.minutes.toString().padStart(2, "0"),
473
+ V.minutes.toString().padStart(2, "0"),
469
474
  ":",
470
- W.seconds.toString().padStart(2, "0")
471
- ] }) : Q && !K && L !== null && L > 0 ? de(
472
- j,
473
- ie,
474
- L,
475
- Z,
476
- H
477
- ) : K ? q || "Završena" : !Q && ee !== null && ee > 0 ? de(
478
- V,
479
- F,
475
+ V.seconds.toString().padStart(2, "0")
476
+ ] }) : Q && !K && z !== null && z > 0 ? ge(
477
+ R,
478
+ X,
479
+ z,
480
+ J,
481
+ Y
482
+ ) : K ? se || "Završena" : !Q && ee !== null && ee > 0 ? ge(
483
+ q,
484
+ H,
480
485
  ee,
481
- A,
482
- G
486
+ ie,
487
+ Z
483
488
  ) : null
484
489
  }
485
490
  )
@@ -489,28 +494,22 @@ const ve = (r) => {
489
494
  ke,
490
495
  {
491
496
  hasPermission: !0,
492
- image: /* @__PURE__ */ n(er, { src: u }),
493
- imageComponent: v,
494
- themeData: se,
497
+ image: /* @__PURE__ */ n(er, { src: v }),
498
+ imageComponent: D,
499
+ themeData: B,
495
500
  isActive: !0,
496
501
  isUser: !1,
497
- name: p,
498
- shopCategory: I,
499
- onClick: () => S(s)
502
+ name: N,
503
+ shopCategory: u,
504
+ uuid: d,
505
+ onClick: () => g(d)
500
506
  }
501
507
  )
502
508
  ] })
503
509
  ]
504
510
  }
505
511
  );
506
- });
507
- Ce.propTypes = {
508
- title: t.oneOfType([t.string, t.element]),
509
- numberOfListings: t.number,
510
- dropdown: t.any,
511
- color: t.string
512
- };
513
- const rr = y.div`
512
+ }), nr = y.div`
514
513
  margin: 0 auto;
515
514
  display: flex;
516
515
  flex-direction: column;
@@ -549,7 +548,7 @@ const rr = y.div`
549
548
  right: 0;
550
549
  }
551
550
 
552
- @media (max-width: ${E + "px"}) {
551
+ @media (max-width: ${U + "px"}) {
553
552
  gap: 1.25rem;
554
553
 
555
554
  & .scrollable-section__header {
@@ -561,13 +560,13 @@ const rr = y.div`
561
560
  }
562
561
  }
563
562
  }
564
- `, nr = y(ye.div)`
563
+ `, tr = y(Se.div)`
565
564
  display: grid;
566
565
  grid-template-columns: repeat(${(r) => r == null ? void 0 : r.numOfColumns}, 1fr);
567
566
  gap: 1.5rem;
568
567
  width: 100%;
569
568
 
570
- @media (max-width: ${E + "px"}) {
569
+ @media (max-width: ${U + "px"}) {
571
570
  display: flex;
572
571
  flex-wrap: nowrap;
573
572
  overflow-x: scroll;
@@ -589,37 +588,37 @@ const rr = y.div`
589
588
  /* Safari and Chrome */
590
589
  }
591
590
  }
592
- `, Ie = M(
591
+ `, Ce = j(
593
592
  ({
594
593
  icon: r,
595
- title: a,
594
+ title: t,
596
595
  numOfSlides: o = 2,
597
- showNavigation: s = !0,
598
- hasNextPage: m = !1,
599
- handleFetchNextPage: g = () => {
596
+ showNavigation: i = !0,
597
+ hasNextPage: d = !1,
598
+ handleFetchNextPage: h = () => {
600
599
  },
601
- children: i
602
- }, h) => {
603
- const [c, b] = ne(0), [p, I] = ne(1), u = $e(), v = (i == null ? void 0 : i.length) ?? 1;
600
+ children: l
601
+ }, $) => {
602
+ const [c, p] = ne(0), [m, N] = ne(1), u = Ie(), v = (l == null ? void 0 : l.length) ?? 1;
604
603
  ae(() => {
605
- const d = () => {
606
- I(o);
604
+ const g = () => {
605
+ N(o);
607
606
  };
608
- return window.addEventListener("resize", d), d(), () => window.removeEventListener("resize", d);
607
+ return window.addEventListener("resize", g), g(), () => window.removeEventListener("resize", g);
609
608
  }, []);
610
- const N = u ? i : i == null ? void 0 : i.slice(c, c + p), T = (d) => {
611
- var $;
612
- ($ = d == null ? void 0 : d.target) == null || $.blur();
613
- const f = c + p;
614
- f < v && b(f), f + p >= v && m && g();
615
- }, S = (d) => {
609
+ const D = u ? l : l == null ? void 0 : l.slice(c, c + m), T = (g) => {
610
+ var x;
611
+ (x = g == null ? void 0 : g.target) == null || x.blur();
612
+ const f = c + m;
613
+ f < v && p(f), f + m >= v && d && h();
614
+ }, S = (g) => {
616
615
  var f;
617
- (f = d == null ? void 0 : d.target) == null || f.blur(), c - p >= 0 && b(c - p);
616
+ (f = g == null ? void 0 : g.target) == null || f.blur(), c - m >= 0 && p(c - m);
618
617
  };
619
- return /* @__PURE__ */ l(rr, { ref: h, children: [
620
- /* @__PURE__ */ n("div", { className: "scrollable-section__header", children: /* @__PURE__ */ l("div", { className: "scrollable-section__title", children: [
618
+ return /* @__PURE__ */ s(nr, { ref: $, children: [
619
+ /* @__PURE__ */ n("div", { className: "scrollable-section__header", children: /* @__PURE__ */ s("div", { className: "scrollable-section__title", children: [
621
620
  te(r) && /* @__PURE__ */ n(
622
- Se,
621
+ _e,
623
622
  {
624
623
  icon: r,
625
624
  color: "primary",
@@ -627,13 +626,13 @@ const rr = y.div`
627
626
  className: "title__icon"
628
627
  }
629
628
  ),
630
- te(a) && /* @__PURE__ */ l("div", { className: "title__text", children: [
629
+ te(t) && /* @__PURE__ */ s("div", { className: "title__text", children: [
631
630
  " ",
632
- a
631
+ t
633
632
  ] })
634
633
  ] }) }),
635
- /* @__PURE__ */ l(
636
- nr,
634
+ /* @__PURE__ */ s(
635
+ tr,
637
636
  {
638
637
  numOfColumns: o,
639
638
  ...!u && {
@@ -647,15 +646,15 @@ const rr = y.div`
647
646
  }
648
647
  },
649
648
  children: [
650
- N,
651
- u && m && /* @__PURE__ */ n(Ze, { onIsVisible: g })
649
+ D,
650
+ u && d && /* @__PURE__ */ n(Ze, { onIsVisible: h })
652
651
  ]
653
652
  },
654
653
  `scrollable-section__content-${c}`
655
654
  ),
656
- s && v > p && !u && /* @__PURE__ */ l("div", { className: "scrollable-section__navigation", children: [
655
+ i && v > m && !u && /* @__PURE__ */ s("div", { className: "scrollable-section__navigation", children: [
657
656
  /* @__PURE__ */ n(
658
- he,
657
+ ue,
659
658
  {
660
659
  icon: "angle-left",
661
660
  borderRadius: "curved",
@@ -667,14 +666,14 @@ const rr = y.div`
667
666
  }
668
667
  ),
669
668
  /* @__PURE__ */ n(
670
- he,
669
+ ue,
671
670
  {
672
671
  icon: "angle-right",
673
672
  borderRadius: "curved",
674
673
  btnType: "tinted",
675
674
  color: "neutral",
676
675
  className: "navigation__arrow",
677
- disabled: c + p >= v,
676
+ disabled: c + m >= v,
678
677
  onClick: T
679
678
  }
680
679
  )
@@ -682,15 +681,15 @@ const rr = y.div`
682
681
  ] });
683
682
  }
684
683
  );
685
- Ie.propTypes = {
686
- icon: t.string,
687
- title: t.string,
688
- numOfSlides: t.number,
689
- numOfSlidesForMobile: t.number,
690
- handleFetchNextPage: t.func,
691
- showNavigation: t.bool
684
+ Ce.propTypes = {
685
+ icon: a.string,
686
+ title: a.string,
687
+ numOfSlides: a.number,
688
+ numOfSlidesForMobile: a.number,
689
+ handleFetchNextPage: a.func,
690
+ showNavigation: a.bool
692
691
  };
693
- const tr = y.div`
692
+ const ar = y.div`
694
693
  display: flex;
695
694
  flex: 1;
696
695
  width: 100%;
@@ -707,34 +706,34 @@ const tr = y.div`
707
706
  border-radius: 1.25rem;
708
707
  object-fit: cover;
709
708
  }
710
- `, Ne = M(
709
+ `, Ne = j(
711
710
  ({
712
711
  sectionName: r,
713
- imageUrl: a,
712
+ imageUrl: t,
714
713
  maxHeight: o = "16.25rem",
715
- className: s = "",
716
- handleClick: m = () => {
714
+ className: i = "",
715
+ handleClick: d = () => {
717
716
  }
718
- }, g) => /* @__PURE__ */ n(
719
- tr,
717
+ }, h) => /* @__PURE__ */ n(
718
+ ar,
720
719
  {
721
- ref: g,
720
+ ref: h,
722
721
  maxHeight: o,
723
- onClick: m,
724
- className: `itemless-banner ${s}`,
725
- children: /* @__PURE__ */ n("img", { src: a, alt: `itemless-banner__${r}` })
722
+ onClick: d,
723
+ className: `itemless-banner ${i}`,
724
+ children: /* @__PURE__ */ n("img", { src: t, alt: `itemless-banner__${r}` })
726
725
  }
727
726
  )
728
727
  );
729
728
  Ne.propTypes = {
730
- sectionName: t.string,
731
- imageUrl: t.string,
732
- maxHeight: t.string,
733
- className: t.string,
734
- handleClick: t.func
729
+ sectionName: a.string,
730
+ imageUrl: a.string,
731
+ maxHeight: a.string,
732
+ className: a.string,
733
+ handleClick: a.func
735
734
  };
736
- const ar = y(O)`
737
- @media (max-width: ${E + "px"}) {
735
+ const or = y(O)`
736
+ @media (max-width: ${U + "px"}) {
738
737
  flex-direction: column;
739
738
 
740
739
  & .skeleton__image {
@@ -748,10 +747,10 @@ const ar = y(O)`
748
747
  }
749
748
  }
750
749
  }
751
- `, or = ({ keyPrefix: r }) => /* @__PURE__ */ l(ar, { children: [
752
- /* @__PURE__ */ l(O, { children: [
750
+ `, ir = ({ keyPrefix: r }) => /* @__PURE__ */ s(or, { children: [
751
+ /* @__PURE__ */ s(O, { children: [
753
752
  /* @__PURE__ */ n(
754
- ue,
753
+ fe,
755
754
  {
756
755
  width: "13.75rem",
757
756
  height: "13.75rem",
@@ -759,20 +758,20 @@ const ar = y(O)`
759
758
  },
760
759
  `${r}-1`
761
760
  ),
762
- /* @__PURE__ */ l(fe, { noGradient: !0, children: [
761
+ /* @__PURE__ */ s(xe, { noGradient: !0, children: [
763
762
  /* @__PURE__ */ n(w, { height: "1rem" }),
764
763
  /* @__PURE__ */ n(w, { height: "1.75rem" }),
765
764
  /* @__PURE__ */ n(w, { height: "1.25rem" }),
766
765
  /* @__PURE__ */ n(w, { height: "2rem" }),
767
- /* @__PURE__ */ l(O, { alignItems: "center", noGradient: !0, children: [
768
- /* @__PURE__ */ n(xe, { width: "2.5rem", height: "2.5rem" }),
766
+ /* @__PURE__ */ s(O, { alignItems: "center", noGradient: !0, children: [
767
+ /* @__PURE__ */ n(be, { width: "2.5rem", height: "2.5rem" }),
769
768
  /* @__PURE__ */ n(w, { width: "5rem", height: "1.25rem" })
770
769
  ] })
771
770
  ] })
772
771
  ] }),
773
- /* @__PURE__ */ l(O, { noGradient: !0, children: [
772
+ /* @__PURE__ */ s(O, { noGradient: !0, children: [
774
773
  /* @__PURE__ */ n(
775
- ue,
774
+ fe,
776
775
  {
777
776
  width: "13.75rem",
778
777
  height: "13.75rem",
@@ -780,66 +779,66 @@ const ar = y(O)`
780
779
  },
781
780
  `${r}-2`
782
781
  ),
783
- /* @__PURE__ */ l(fe, { noGradient: !0, children: [
782
+ /* @__PURE__ */ s(xe, { noGradient: !0, children: [
784
783
  /* @__PURE__ */ n(w, { height: "1rem" }),
785
784
  /* @__PURE__ */ n(w, { height: "1.75rem" }),
786
785
  /* @__PURE__ */ n(w, { height: "1.25rem" }),
787
786
  /* @__PURE__ */ n(w, { height: "2rem" }),
788
- /* @__PURE__ */ l(O, { alignItems: "center", noGradient: !0, children: [
789
- /* @__PURE__ */ n(xe, { width: "2.5rem", height: "2.5rem" }),
787
+ /* @__PURE__ */ s(O, { alignItems: "center", noGradient: !0, children: [
788
+ /* @__PURE__ */ n(be, { width: "2.5rem", height: "2.5rem" }),
790
789
  /* @__PURE__ */ n(w, { width: "5rem", height: "1.25rem" })
791
790
  ] })
792
791
  ] })
793
792
  ] })
794
- ] }), ir = ({
793
+ ] }), sr = ({
795
794
  keyPrefix: r,
796
- isLoading: a = !1,
797
- fallbackComponent: o = /* @__PURE__ */ n(Oe, {}),
798
- children: s
799
- }) => /* @__PURE__ */ n(Re, { fallbackComponent: o, children: a === !0 ? /* @__PURE__ */ n(or, { keyPrefix: r }) : s }), sr = Be(Ce), _r = M(
795
+ isLoading: t = !1,
796
+ fallbackComponent: o = /* @__PURE__ */ n(Me, {}),
797
+ children: i
798
+ }) => /* @__PURE__ */ n(Re, { fallbackComponent: o, children: t === !0 ? /* @__PURE__ */ n(ir, { keyPrefix: r }) : i }), lr = Be(rr), $r = j(
800
799
  ({
801
800
  sellerType: r = "Shop",
802
- items: a = [],
801
+ items: t = [],
803
802
  title: o,
804
- icon: s,
805
- isLoading: m,
806
- onSelectCard: g = () => {
803
+ icon: i,
804
+ isLoading: d,
805
+ onSelectCard: h = () => {
807
806
  },
808
- onSelectShop: i = () => {
807
+ onSelectShop: l = () => {
809
808
  },
810
- getImage: h = () => {
809
+ getImage: $ = () => {
811
810
  },
812
811
  campaignSingleText: c,
813
- upcomingCampaignText: b,
814
- salesCampaignTypes: p = [],
815
- startsInPrefixTextPlural: I,
812
+ upcomingCampaignText: p,
813
+ salesCampaignTypes: m = [],
814
+ startsInPrefixTextPlural: N,
816
815
  startsinSuffixTextPlural: u,
817
816
  startsInPrefixTextSingular: v,
818
- startsinSuffixTextSingular: N,
817
+ startsinSuffixTextSingular: D,
819
818
  endsInPrefixTextPlural: T,
820
819
  endsinSuffixTextPlural: S,
821
- endsInPrefixTextSingular: d,
820
+ endsInPrefixTextSingular: g,
822
821
  endsinSuffixTextSingular: f,
823
- endedText: $,
824
- numOfSlides: k = 2,
825
- showNavigation: F = !0,
826
- numberOfListingsTextSingular: G,
827
- numberOfListingsTextPlural: V,
828
- itemlessImageUrl: A,
822
+ endedText: x,
823
+ numOfSlides: A = 2,
824
+ showNavigation: I = !0,
825
+ numberOfListingsTextSingular: H,
826
+ numberOfListingsTextPlural: Z,
827
+ itemlessImageUrl: q,
829
828
  itemlessLink: ie,
830
- handleItemlessLink: H = () => {
829
+ handleItemlessLink: X = () => {
831
830
  },
832
- componentName: j,
833
- hasNextPage: Z = !1,
834
- handleFetchNextPage: q = () => {
831
+ componentName: Y,
832
+ hasNextPage: R = !1,
833
+ handleFetchNextPage: J = () => {
835
834
  }
836
835
  }, se) => {
837
- const z = $e(), X = We(() => {
838
- let R = a == null ? void 0 : a.map((e, Y) => /* @__PURE__ */ n(
839
- sr,
836
+ const B = Ie(), E = We(() => {
837
+ let W = t == null ? void 0 : t.map((e, k) => /* @__PURE__ */ n(
838
+ lr,
840
839
  {
841
840
  className: "campaign-item",
842
- coverPhoto: h(
841
+ coverPhoto: $(
843
842
  e == null ? void 0 : e.coverPhoto,
844
843
  (e == null ? void 0 : e.uuid) || (e == null ? void 0 : e.campaignUuid)
845
844
  ),
@@ -855,64 +854,64 @@ const ar = y(O)`
855
854
  startDate: e == null ? void 0 : e.startDate,
856
855
  title: e == null ? void 0 : e.name,
857
856
  uuid: e == null ? void 0 : e.campaignUuid,
858
- onSelectCard: (J, D) => g(e == null ? void 0 : e.campaignUuid, e == null ? void 0 : e.shopUuid, D),
859
- onSelectShop: () => i(e == null ? void 0 : e.shopUuid),
857
+ onSelectCard: (le, F) => h(e == null ? void 0 : e.campaignUuid, e == null ? void 0 : e.shopUuid, F),
858
+ onSelectShop: () => l(e == null ? void 0 : e.shopUuid),
860
859
  campaignSingleText: c,
861
- upcomingCampaignText: b,
860
+ upcomingCampaignText: p,
862
861
  upcoming: e == null ? void 0 : e.upcoming,
863
- salesCampaignTypes: p,
864
- startsInPrefixTextPlural: I,
862
+ salesCampaignTypes: m,
863
+ startsInPrefixTextPlural: N,
865
864
  startsinSuffixTextPlural: u,
866
865
  startsInPrefixTextSingular: v,
867
- startsinSuffixTextSingular: N,
866
+ startsinSuffixTextSingular: D,
868
867
  endsInPrefixTextPlural: T,
869
868
  endsinSuffixTextPlural: S,
870
- endsInPrefixTextSingular: d,
869
+ endsInPrefixTextSingular: g,
871
870
  endsinSuffixTextSingular: f,
872
- endedText: $,
871
+ endedText: x,
873
872
  themeData: e == null ? void 0 : e.themeData,
874
873
  numberOfListings: e == null ? void 0 : e.numberOfListings,
875
- numberOfListingsTextSingular: G,
876
- numberOfListingsTextPlural: V,
877
- metadata: { name: j, accessor: e == null ? void 0 : e.accessor }
874
+ numberOfListingsTextSingular: H,
875
+ numberOfListingsTextPlural: Z,
876
+ metadata: { name: Y, accessor: e == null ? void 0 : e.accessor }
878
877
  },
879
- `campaign__item__${Y}__${e == null ? void 0 : e.startDate}___${e == null ? void 0 : e.endDate}`
878
+ `campaign__item__${k}__${e == null ? void 0 : e.startDate}___${e == null ? void 0 : e.endDate}`
880
879
  ));
881
- return (a == null ? void 0 : a.length) < 2 && !z ? [
882
- ...R,
880
+ return (t == null ? void 0 : t.length) < 2 && !B ? [
881
+ ...W,
883
882
  /* @__PURE__ */ n(
884
883
  Ne,
885
884
  {
886
- imageUrl: A,
885
+ imageUrl: q,
887
886
  className: "campaign-item",
888
- handleClick: H
887
+ handleClick: X
889
888
  },
890
889
  "itemless-campaign-section-banner"
891
890
  )
892
- ] : R;
893
- }, [a]);
891
+ ] : W;
892
+ }, [t]);
894
893
  return /* @__PURE__ */ n(
895
- ir,
894
+ sr,
896
895
  {
897
- isLoading: m,
896
+ isLoading: d,
898
897
  keyPrefix: "sales-campaign-skeleton",
899
898
  children: /* @__PURE__ */ n(
900
- Ie,
899
+ Ce,
901
900
  {
902
- icon: s,
901
+ icon: i,
903
902
  title: o,
904
- numOfSlides: k,
905
- showNavigation: F,
906
- hasNextPage: Z,
907
- handleFetchNextPage: q,
908
- children: X
903
+ numOfSlides: A,
904
+ showNavigation: I,
905
+ hasNextPage: R,
906
+ handleFetchNextPage: J,
907
+ children: E
909
908
  },
910
- `sales-campaign-section__${z}`
909
+ `sales-campaign-section__${B}`
911
910
  )
912
911
  }
913
912
  );
914
913
  }
915
914
  );
916
915
  export {
917
- _r as default
916
+ $r as default
918
917
  };