@lanaco/lnc-react-ui 4.0.125 → 4.0.126

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