@lanaco/lnc-react-ui 4.0.120 → 4.0.122

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 be } from "react/jsx-runtime";
2
- import { createElement as ye, forwardRef as V, useState as z, useEffect as te, Suspense as $e, memo as De, useMemo as Ce } from "react";
3
- import { s as m } from "./emotion-styled.browser.esm-BNN1dTl3.js";
4
- import { a as A, o as ne, k as H } from "./utils-BbgAIA9N.js";
5
- import { M as F } from "./consts-BuFChS64.js";
6
- import { m as ae } from "./motion-Ckekul_K.js";
7
- import { P as o } from "./index-CblbdqjE.js";
8
- import oe from "./Icon.js";
9
- import _e from "./Badge.js";
10
- import { u as Y } from "./emotion-element-f0de968e.browser.esm-CkCiQliQ.js";
11
- import J from "./IconButton.js";
12
- import { u as ie } from "./useDetectMobile-Bkvj0VMa.js";
13
- const Se = m.div`
1
+ import { jsx as t, jsxs as c, Fragment as De } from "react/jsx-runtime";
2
+ import { createElement as Ce, forwardRef as V, useState as F, useEffect as ae, Suspense as _e, memo as Se, useMemo as Te } from "react";
3
+ import { s as h } from "./emotion-styled.browser.esm-BNN1dTl3.js";
4
+ import { a as M, o as oe, k as K } from "./utils-BbgAIA9N.js";
5
+ import { M as E } from "./consts-BuFChS64.js";
6
+ import { m as ie } from "./motion-Ckekul_K.js";
7
+ import { P as i } from "./index-CblbdqjE.js";
8
+ import se from "./Icon.js";
9
+ import ke from "./Badge.js";
10
+ import { u as Z } from "./emotion-element-f0de968e.browser.esm-CkCiQliQ.js";
11
+ import Q from "./IconButton.js";
12
+ import { u as le } from "./useDetectMobile-Bkvj0VMa.js";
13
+ const Ne = h.div`
14
14
  cursor: pointer;
15
15
  display: flex;
16
16
  gap: 1rem;
@@ -18,15 +18,15 @@ const Se = m.div`
18
18
  border-radius: 20px;
19
19
  border: 1px solid var(--gray-95008, #14161a14);
20
20
 
21
- @media (max-width: ${F + "px"}) {
21
+ @media (max-width: ${E + "px"}) {
22
22
  flex-direction: column;
23
23
  padding: 0;
24
24
  gap: 0;
25
25
  border: none;
26
26
  border-radius: 0;
27
27
  }
28
- `, Te = m.div`
29
- border-radius: ${(e) => A(e.theme, "edged")};
28
+ `, Ie = h.div`
29
+ border-radius: ${(e) => M(e.theme, "edged")};
30
30
  height: 15rem;
31
31
  width: 15rem;
32
32
  min-width: 15rem;
@@ -49,12 +49,12 @@ const Se = m.div`
49
49
  }
50
50
  }
51
51
 
52
- @media (max-width: ${F + "px"}) {
52
+ @media (max-width: ${E + "px"}) {
53
53
  width: 100%;
54
54
  max-width: 100dvh;
55
55
  height: 23.438rem;
56
56
  }
57
- `, ke = m.div`
57
+ `, Pe = h.div`
58
58
  flex: 1;
59
59
  display: flex;
60
60
  flex-direction: column;
@@ -121,7 +121,7 @@ const Se = m.div`
121
121
  background-color: transparent;
122
122
  }
123
123
 
124
- @media (max-width: ${F + "px"}) {
124
+ @media (max-width: ${E + "px"}) {
125
125
  padding: 1.25rem;
126
126
 
127
127
  & .campaign-title {
@@ -135,7 +135,7 @@ const Se = m.div`
135
135
  gap: 0.25rem;
136
136
  }
137
137
  }
138
- `, Ne = {
138
+ `, Ee = {
139
139
  "#ADE3EB": "#76D0DB",
140
140
  "#DDD6FE": "#C4B5FD",
141
141
  "#FDE68A": "#FCD34D",
@@ -147,13 +147,13 @@ const Se = m.div`
147
147
  "#E7E5E4": "#D6D3D1",
148
148
  "#FED7AA": "#FDBA74",
149
149
  default: "#C4C8CF"
150
- }, K = (e = !1, n = !1, i = !1) => `
150
+ }, ee = (e = !1, n = !1, o = !1) => `
151
151
  display: flex;
152
152
  ${n ? "flex-wrap: wrap;" : ""}
153
153
  ${n ? "" : "flex-wrap: nowrap;"}
154
154
  ${e ? "align-items: center;" : ""}
155
- ${i ? "justify-content: center;" : ""}
156
- `, Ie = m(ae.div)`
155
+ ${o ? "justify-content: center;" : ""}
156
+ `, Fe = h(ie.div)`
157
157
  text-decoration: none;
158
158
  ${(e) => e.hasPermission === !0 && "cursor: pointer"};
159
159
 
@@ -170,14 +170,14 @@ const Se = m.div`
170
170
  text-decoration: none;
171
171
  }
172
172
 
173
- ${K(!0)}
173
+ ${ee(!0)}
174
174
  gap: 0.5rem;
175
175
  padding: 0.5rem;
176
176
  color: ${(e) => e.isActive === !1 ? "var(--gray-900)" : "var(--primary-600)"};
177
177
  font-weight: 500;
178
178
  font-size: 0.875rem;
179
179
  line-height: 1.25rem;
180
- border-radius: ${(e) => A(e.theme, "slight")};
180
+ border-radius: ${(e) => M(e.theme, "slight")};
181
181
  transition: all 0.25s ease;
182
182
  & .description {
183
183
  font-size: 0.85rem;
@@ -186,11 +186,11 @@ const Se = m.div`
186
186
  font-weight: 400;
187
187
  }
188
188
  & .logo-wrapper {
189
- ${K(!0, !1, !0)}
189
+ ${ee(!0, !1, !0)}
190
190
  flex-shrink: 0;
191
191
  border-radius: 999px;
192
192
  border: 3px solid
193
- ${(e) => e.isActive === !1 ? "var(--gray-300, #c4c8cf)" : Ne[e.themeColor] ?? "var(--gray-300, #c4c8cf)"};
193
+ ${(e) => e.isActive === !1 ? "var(--gray-300, #c4c8cf)" : Ee[e.themeColor] ?? "var(--gray-300, #c4c8cf)"};
194
194
 
195
195
  & img,
196
196
  .img-placeholder {
@@ -233,14 +233,14 @@ const Se = m.div`
233
233
  background-color: var(--gray-95080, #14161acc);
234
234
  color: var(--gray-600, #676e79);
235
235
  }
236
- `, Pe = m.div`
236
+ `, Me = h.div`
237
237
  position: absolute;
238
238
  top: 0.5rem;
239
239
  ${(e) => e.alignToLeft === !0 ? "left: 0.5rem;" : "right: 0.5rem;"}
240
240
  display: flex;
241
241
  gap: 0.25rem;
242
- `, Ee = m.div`
243
- border-radius: ${(e) => A(e.theme, e.borderRadius || "slight")};
242
+ `, ze = h.div`
243
+ border-radius: ${(e) => M(e.theme, e.borderRadius || "slight")};
244
244
  background-color: ${(e) => e == null ? void 0 : e.color};
245
245
  color: white;
246
246
  height: 1.5rem;
@@ -255,17 +255,17 @@ const Se = m.div`
255
255
  & i {
256
256
  font-size: 0.813rem;
257
257
  }
258
- `, se = (e) => {
258
+ `, ce = (e) => {
259
259
  const {
260
260
  uuid: n,
261
- hasPermission: i = !0,
261
+ hasPermission: o = !0,
262
262
  isUser: l,
263
- image: f,
264
- name: h,
265
- notifications: p = 0,
263
+ image: w,
264
+ name: u,
265
+ notifications: f = 0,
266
266
  color: s = "primary",
267
- size: u = "large",
268
- style: d,
267
+ size: d = "large",
268
+ style: g,
269
269
  disabled: S,
270
270
  onClick: b = () => {
271
271
  },
@@ -273,45 +273,45 @@ const Se = m.div`
273
273
  className: D,
274
274
  shopCategory: C,
275
275
  // new
276
- themeData: x
276
+ themeData: p
277
277
  } = e, y = {
278
- theme: Y(),
278
+ theme: Z(),
279
279
  color: s,
280
- size: u,
281
- style: d,
280
+ size: d,
281
+ style: g,
282
282
  disabled: S
283
283
  };
284
- return /* @__PURE__ */ ye(
285
- Ie,
284
+ return /* @__PURE__ */ Ce(
285
+ Fe,
286
286
  {
287
287
  onClick: (k) => {
288
- k.stopPropagation(), i === !0 && (b == null || b());
288
+ k.stopPropagation(), o === !0 && (b == null || b());
289
289
  },
290
290
  ...y,
291
- key: h,
291
+ key: u,
292
292
  className: `profile-item ${D}`,
293
- hasPermission: i,
293
+ hasPermission: o,
294
294
  isActive: $,
295
- themeColor: (x == null ? void 0 : x.code) || "transparent"
295
+ themeColor: (p == null ? void 0 : p.code) || "transparent"
296
296
  },
297
- /* @__PURE__ */ t("div", { className: "logo-wrapper", children: f }),
297
+ /* @__PURE__ */ t("div", { className: "logo-wrapper", children: w }),
298
298
  /* @__PURE__ */ c("div", { children: [
299
- /* @__PURE__ */ t("div", { className: "name", children: h }),
299
+ /* @__PURE__ */ t("div", { className: "name", children: u }),
300
300
  !l && /* @__PURE__ */ t("div", { className: "description", children: C }),
301
- p > 0 && /* @__PURE__ */ t("div", { className: "notifications-number", children: /* @__PURE__ */ t(_e, { className: "badge", color: "danger", size: "small", children: p > 99 ? "99+" : p }) })
301
+ f > 0 && /* @__PURE__ */ t("div", { className: "notifications-number", children: /* @__PURE__ */ t(ke, { className: "badge", color: "danger", size: "small", children: f > 99 ? "99+" : f }) })
302
302
  ] })
303
303
  );
304
304
  };
305
- se.propTypes = {
306
- id: o.any,
307
- isUserProfile: o.bool,
308
- themeColor: o.string,
309
- image: o.any,
310
- name: o.string,
311
- notifications: o.number,
312
- style: o.object,
313
- className: o.string,
314
- color: o.oneOf([
305
+ ce.propTypes = {
306
+ id: i.any,
307
+ isUserProfile: i.bool,
308
+ themeColor: i.string,
309
+ image: i.any,
310
+ name: i.string,
311
+ notifications: i.number,
312
+ style: i.object,
313
+ className: i.string,
314
+ color: i.oneOf([
315
315
  "primary",
316
316
  "secondary",
317
317
  "success",
@@ -320,101 +320,101 @@ se.propTypes = {
320
320
  "information",
321
321
  "neutral"
322
322
  ]),
323
- size: o.oneOf(["large"]),
324
- onSelect: o.func,
325
- hasPermission: o.bool
323
+ size: i.oneOf(["large"]),
324
+ onSelect: i.func,
325
+ hasPermission: i.bool
326
326
  };
327
- const Q = (e, n) => {
327
+ const re = (e, n) => {
328
328
  if (!e || !n) return null;
329
- let i = Math.floor((e == null ? void 0 : e.getTime()) - (n == null ? void 0 : n.getTime())), l = 1e3 * 60 * 60 * 24;
330
- return Math.floor(i / l);
331
- }, ee = (e) => {
329
+ const o = e.getTime() - n.getTime(), l = 24 * 60 * 60 * 1e3;
330
+ return o >= 0 ? Math.ceil(o / l) : Math.floor(o / l);
331
+ }, te = (e) => {
332
332
  if (e !== void 0) {
333
- const n = new Date(e), i = n.getFullYear(), l = n.getMonth() + 1;
334
- return `${String(n.getDate()).padStart(2)}. ${l}. ${i}.`;
333
+ const n = new Date(e), o = n.getFullYear(), l = n.getMonth() + 1;
334
+ return `${String(n.getDate()).padStart(2)}. ${l}. ${o}.`;
335
335
  }
336
- }, le = V((e, n) => {
337
- var q;
338
- const i = Y(), {
336
+ }, de = V((e, n) => {
337
+ var J;
338
+ const o = Z(), {
339
339
  // uuid,
340
340
  shopUuid: l,
341
- title: f = "",
341
+ title: w = "",
342
342
  // description,
343
343
  // badges,
344
- coverPhoto: h,
345
- onSelect: p,
344
+ coverPhoto: u,
345
+ onSelect: f,
346
346
  // status,
347
347
  startDate: s,
348
- endDate: u,
349
- salesPackages: d,
348
+ endDate: d,
349
+ salesPackages: g,
350
350
  shopName: S,
351
351
  shopCategory: b,
352
352
  shopImage: $,
353
353
  className: D,
354
354
  onSelectCard: C = () => {
355
355
  },
356
- onSelectShop: x = () => {
356
+ onSelectShop: p = () => {
357
357
  },
358
358
  upcoming: T = !1,
359
359
  upcomingCampaignText: y,
360
360
  campaignSingleText: k,
361
- salesCampaignTypes: v = [],
362
- startsInPrefixTextPlural: P,
363
- startsinSuffixTextPlural: M,
364
- startsInPrefixTextSingular: O,
365
- startsinSuffixTextSingular: L,
361
+ salesCampaignTypes: x = [],
362
+ startsInPrefixTextPlural: I,
363
+ startsinSuffixTextPlural: z,
364
+ startsInPrefixTextSingular: A,
365
+ startsinSuffixTextSingular: O,
366
366
  endsInPrefixTextPlural: a,
367
- endsinSuffixTextPlural: g,
368
- endsInPrefixTextSingular: U,
367
+ endsinSuffixTextPlural: m,
368
+ endsInPrefixTextSingular: L,
369
369
  endsinSuffixTextSingular: r,
370
370
  themeData: X,
371
371
  numberOfListings: G,
372
- numberOfListingsTextSingular: de,
373
- numberOfListingsTextPlural: ge,
374
- ...me
375
- } = e, he = s ? new Date(s) <= /* @__PURE__ */ new Date() : !1, ue = Q(
372
+ numberOfListingsTextSingular: me,
373
+ numberOfListingsTextPlural: he,
374
+ ...ue
375
+ } = e, fe = s ? new Date(s) <= /* @__PURE__ */ new Date() : !1, pe = re(
376
376
  s ? new Date(s) : null,
377
377
  /* @__PURE__ */ new Date()
378
- ), N = Q(
379
- u ? new Date(u) : null,
378
+ ), U = re(
379
+ d ? new Date(d) : null,
380
380
  /* @__PURE__ */ new Date()
381
- ), fe = N !== null && N <= 3 && N > 0, B = N !== null && N <= 1 && N >= 0, Z = (_, j, w, E, I) => w === 1 ? `${_} ${w} ${E}` : `${j} ${w} ${I}`, pe = () => {
382
- if (!u) return null;
383
- const _ = xe, w = new Date(u).getTime() - _.getTime();
384
- if (w <= 0) return null;
385
- const E = Math.floor(w / (1e3 * 60 * 60)), I = Math.floor(w % (1e3 * 60 * 60) / (1e3 * 60)), we = Math.floor(w % (1e3 * 60) / 1e3);
386
- return { hours: E, minutes: I, seconds: we };
387
- }, [xe, ve] = z(/* @__PURE__ */ new Date());
388
- te(() => {
381
+ ), xe = U !== null && U <= 3 && U > 0, q = d ? new Date(d).getTime() : null, ve = Date.now(), Y = q !== null ? q - ve : null, B = Y !== null && Y > 0 && Y < 24 * 60 * 60 * 1e3, H = (_, j, v, P, N) => v === 1 ? `${_} ${v} ${P}` : `${j} ${v} ${N}`, we = () => {
382
+ if (!d) return null;
383
+ const _ = be, v = new Date(d).getTime() - _.getTime();
384
+ if (v <= 0) return null;
385
+ const P = Math.floor(v / (1e3 * 60 * 60)), N = Math.floor(v % (1e3 * 60 * 60) / (1e3 * 60)), $e = Math.floor(v % (1e3 * 60) / 1e3);
386
+ return { hours: P, minutes: N, seconds: $e };
387
+ }, [be, ye] = F(/* @__PURE__ */ new Date());
388
+ ae(() => {
389
389
  if (!B) return;
390
390
  const _ = setInterval(() => {
391
- ve(/* @__PURE__ */ new Date());
391
+ ye(/* @__PURE__ */ new Date());
392
392
  }, 1e3);
393
393
  return () => clearInterval(_);
394
394
  }, [B]);
395
- const R = B ? pe() : null;
395
+ const R = B ? we() : null;
396
396
  return /* @__PURE__ */ c(
397
- Se,
397
+ Ne,
398
398
  {
399
399
  ref: n,
400
- theme: i,
400
+ theme: o,
401
401
  className: D,
402
402
  onClick: C,
403
- ...me,
403
+ ...ue,
404
404
  children: [
405
- /* @__PURE__ */ c(Te, { theme: i, onClick: () => p == null ? void 0 : p(), children: [
406
- /* @__PURE__ */ t("img", { src: h }),
407
- /* @__PURE__ */ t(Pe, { children: d == null ? void 0 : d.map((_, j) => {
408
- var w, E;
405
+ /* @__PURE__ */ c(Ie, { theme: o, onClick: () => f == null ? void 0 : f(), children: [
406
+ /* @__PURE__ */ t("img", { src: u }),
407
+ /* @__PURE__ */ t(Me, { children: g == null ? void 0 : g.map((_, j) => {
408
+ var v, P;
409
409
  return /* @__PURE__ */ t(
410
- Ee,
410
+ ze,
411
411
  {
412
- color: (w = v == null ? void 0 : v.find((I) => I.value === _)) == null ? void 0 : w.color,
413
- theme: i,
412
+ color: (v = x == null ? void 0 : x.find((N) => N.value === _)) == null ? void 0 : v.color,
413
+ theme: o,
414
414
  children: /* @__PURE__ */ t(
415
- oe,
415
+ se,
416
416
  {
417
- icon: (E = v == null ? void 0 : v.find((I) => I.value === _)) == null ? void 0 : E.icon
417
+ icon: (P = x == null ? void 0 : x.find((N) => N.value === _)) == null ? void 0 : P.icon
418
418
  }
419
419
  )
420
420
  },
@@ -422,20 +422,20 @@ const Q = (e, n) => {
422
422
  );
423
423
  }) })
424
424
  ] }),
425
- /* @__PURE__ */ c(ke, { theme: i, children: [
425
+ /* @__PURE__ */ c(Pe, { theme: o, children: [
426
426
  /* @__PURE__ */ t("div", { className: "text-block-wrapper", children: /* @__PURE__ */ c("div", { className: "title-block-wrapper", children: [
427
- /* @__PURE__ */ t("div", { className: "campaign-title", children: (q = T ? y : k) == null ? void 0 : q.toUpperCase() }),
428
- /* @__PURE__ */ t("div", { className: "campaign-title-text", children: f }),
429
- u && s && /* @__PURE__ */ c("div", { children: [
430
- ee(s),
427
+ /* @__PURE__ */ t("div", { className: "campaign-title", children: (J = T ? y : k) == null ? void 0 : J.toUpperCase() }),
428
+ /* @__PURE__ */ t("div", { className: "campaign-title-text", children: w }),
429
+ d && s && /* @__PURE__ */ c("div", { children: [
430
+ te(s),
431
431
  " - ",
432
- ee(u)
432
+ te(d)
433
433
  ] }),
434
434
  /* @__PURE__ */ c("div", { className: "timestamp-text", children: [
435
435
  G > 0 && /* @__PURE__ */ c("span", { className: "listings-text", children: [
436
436
  G,
437
437
  " ",
438
- G === 1 ? de : ge,
438
+ G === 1 ? me : he,
439
439
  " ",
440
440
  "∙",
441
441
  " "
@@ -443,34 +443,34 @@ const Q = (e, n) => {
443
443
  /* @__PURE__ */ t(
444
444
  "span",
445
445
  {
446
- className: `duration-text ${fe ? "urgent" : ""}`,
446
+ className: `duration-text ${xe ? "urgent" : ""}`,
447
447
  children: B && R ? /* @__PURE__ */ c("div", { className: "countdown-timer", children: [
448
- U,
448
+ L,
449
449
  " ",
450
450
  R.hours.toString().padStart(2, "0"),
451
451
  ":",
452
452
  R.minutes.toString().padStart(2, "0"),
453
453
  ":",
454
454
  R.seconds.toString().padStart(2, "0")
455
- ] }) : he ? Z(
456
- U,
455
+ ] }) : fe ? H(
456
+ L,
457
457
  a,
458
- N,
458
+ U,
459
459
  r,
460
- g
461
- ) : Z(
460
+ m
461
+ ) : H(
462
+ A,
463
+ I,
464
+ pe,
462
465
  O,
463
- P,
464
- ue,
465
- L,
466
- M
466
+ z
467
467
  )
468
468
  }
469
469
  )
470
470
  ] })
471
471
  ] }) }),
472
472
  /* @__PURE__ */ t(
473
- se,
473
+ ce,
474
474
  {
475
475
  hasPermission: !0,
476
476
  image: (
@@ -493,7 +493,7 @@ const Q = (e, n) => {
493
493
  isUser: !1,
494
494
  name: S,
495
495
  shopCategory: b,
496
- onClick: () => x(l)
496
+ onClick: () => p(l)
497
497
  }
498
498
  )
499
499
  ] })
@@ -501,13 +501,13 @@ const Q = (e, n) => {
501
501
  }
502
502
  );
503
503
  });
504
- le.propTypes = {
505
- title: o.oneOfType([o.string, o.element]),
506
- numberOfListings: o.number,
507
- dropdown: o.any,
508
- color: o.string
504
+ de.propTypes = {
505
+ title: i.oneOfType([i.string, i.element]),
506
+ numberOfListings: i.number,
507
+ dropdown: i.any,
508
+ color: i.string
509
509
  };
510
- m.div`
510
+ h.div`
511
511
  display: flex;
512
512
  flex-direction: column;
513
513
  gap: 1.5rem;
@@ -538,7 +538,7 @@ m.div`
538
538
  }
539
539
  }
540
540
 
541
- @media (max-width: ${F + "px"}) {
541
+ @media (max-width: ${E + "px"}) {
542
542
  & .campaign-item {
543
543
  min-width: 100%;
544
544
  width: 100%;
@@ -546,19 +546,19 @@ m.div`
546
546
  }
547
547
  }
548
548
  `;
549
- const W = m.div`
549
+ const W = h.div`
550
550
  width: ${(e) => e.width || "100%"};
551
551
  height: ${(e) => (e.heightCoeff || 1) * 1.125}rem;
552
552
  background-color: var(--gray-200, #dddfe4);
553
553
 
554
- ${ne("-90deg")}
555
- `, Fe = m.div`
554
+ ${oe("-90deg")}
555
+ `, Ae = h.div`
556
556
  display: flex;
557
557
  flex-direction: ${(e) => e != null && e.row ? "row" : "column"};
558
558
  gap: ${(e) => (e == null ? void 0 : e.gap) ?? "0.5rem"};
559
559
  width: ${(e) => (e == null ? void 0 : e.width) ?? "100%"};
560
- `, re = m.div`
561
- border-radius: ${(e) => A(e.theme, (e == null ? void 0 : e.borderRadius) ?? "regular")};
560
+ `, ne = h.div`
561
+ border-radius: ${(e) => M(e.theme, (e == null ? void 0 : e.borderRadius) ?? "regular")};
562
562
  background: var(--gray-200, #dddfe4);
563
563
  position: relative;
564
564
  max-height: ${(e) => (e == null ? void 0 : e.height) ?? "5rem"};
@@ -567,10 +567,10 @@ const W = m.div`
567
567
  width: ${(e) => (e == null ? void 0 : e.width) ?? "5rem"};
568
568
  flex-shrink: 0;
569
569
 
570
- ${ne()}
571
- `, ze = m.div`
570
+ ${oe()}
571
+ `, Oe = h.div`
572
572
  background: var(--white, #fff);
573
- border-radius: ${(e) => A(e.theme, "edged")};
573
+ border-radius: ${(e) => M(e.theme, "edged")};
574
574
  box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.1), 0px 1px 2px rgba(0, 0, 0, 0.06);
575
575
  border: 1px solid var(--gray-95012, #14161a1f);
576
576
 
@@ -597,21 +597,21 @@ const W = m.div`
597
597
  gap: 0.5rem;
598
598
  }
599
599
 
600
- @media (max-width: ${F + "px"}) {
600
+ @media (max-width: ${E + "px"}) {
601
601
  flex-direction: column;
602
602
 
603
603
  & .campaign__user {
604
604
  margin-top: 1rem;
605
605
  }
606
606
  }
607
- `, Ae = m.div`
607
+ `, Le = h.div`
608
608
  display: flex;
609
609
  gap: 1.5rem;
610
- `, Me = V(({}, e) => {
611
- const n = Y();
612
- return /* @__PURE__ */ c(ze, { ref: e, theme: n, children: [
610
+ `, Ue = V(({}, e) => {
611
+ const n = Z();
612
+ return /* @__PURE__ */ c(Oe, { ref: e, theme: n, children: [
613
613
  /* @__PURE__ */ t("div", { className: "campaign__left-section", children: /* @__PURE__ */ t(
614
- re,
614
+ ne,
615
615
  {
616
616
  theme: n,
617
617
  width: "15rem",
@@ -620,14 +620,14 @@ const W = m.div`
620
620
  }
621
621
  ) }),
622
622
  /* @__PURE__ */ c("div", { className: "campaign__right-section", children: [
623
- /* @__PURE__ */ c(Fe, { theme: n, children: [
623
+ /* @__PURE__ */ c(Ae, { theme: n, children: [
624
624
  /* @__PURE__ */ t(W, { heightCoeff: 0.75, theme: n, width: "35%" }),
625
625
  /* @__PURE__ */ t(W, { heightCoeff: 1.25, theme: n }),
626
626
  /* @__PURE__ */ t(W, { heightCoeff: 3, theme: n })
627
627
  ] }),
628
628
  /* @__PURE__ */ c("div", { className: "campaign__user", children: [
629
629
  /* @__PURE__ */ t(
630
- re,
630
+ ne,
631
631
  {
632
632
  theme: n,
633
633
  width: "2.5rem",
@@ -639,17 +639,17 @@ const W = m.div`
639
639
  ] })
640
640
  ] })
641
641
  ] });
642
- }), Oe = ({ itemsCount: e = 5, keyPrefix: n }) => /* @__PURE__ */ t(Ae, { children: Array.from({ length: e }, (i, l) => /* @__PURE__ */ t(
643
- Me,
642
+ }), Be = ({ itemsCount: e = 5, keyPrefix: n }) => /* @__PURE__ */ t(Le, { children: Array.from({ length: e }, (o, l) => /* @__PURE__ */ t(
643
+ Ue,
644
644
  {},
645
645
  `${n}-skeleton-campaign-card-${l}`
646
- )) }), Le = ({
646
+ )) }), Re = ({
647
647
  children: e,
648
- fallbackComponent: n = /* @__PURE__ */ t(be, {}),
649
- isLoading: i = !1,
648
+ fallbackComponent: n = /* @__PURE__ */ t(De, {}),
649
+ isLoading: o = !1,
650
650
  itemsCount: l = 5,
651
- keyPrefix: f
652
- }) => /* @__PURE__ */ t($e, { fallback: n, children: i === !0 ? /* @__PURE__ */ t(Oe, { itemsCount: l, keyPrefix: f }) : e }), Ue = m.div`
651
+ keyPrefix: w
652
+ }) => /* @__PURE__ */ t(_e, { fallback: n, children: o === !0 ? /* @__PURE__ */ t(Be, { itemsCount: l, keyPrefix: w }) : e }), je = h.div`
653
653
  margin: 0 auto;
654
654
  display: flex;
655
655
  flex-direction: column;
@@ -690,56 +690,56 @@ const W = m.div`
690
690
  top: 0;
691
691
  right: 0;
692
692
  }
693
- `, Be = m(ae.div)`
693
+ `, We = h(ie.div)`
694
694
  display: grid;
695
695
  grid-template-columns: repeat(${(e) => e == null ? void 0 : e.numOfColumns}, 1fr);
696
696
  gap: 1.5rem;
697
697
 
698
- @media (max-width: ${F + "px"}) {
698
+ @media (max-width: ${E + "px"}) {
699
699
  grid-template-columns: repeat(${(e) => e == null ? void 0 : e.numOfColumnsForMobile}, 1fr);
700
700
  }
701
- `, ce = V(
701
+ `, ge = V(
702
702
  ({
703
703
  icon: e,
704
704
  title: n,
705
- numOfSlides: i = 2,
705
+ numOfSlides: o = 2,
706
706
  numOfSlidesForMobile: l = 1,
707
- showNavigation: f = !0,
708
- children: h
709
- }, p) => {
710
- const [s, u] = z(0), [d, S] = z(1), [b, $] = z(null), [D, C] = z(null), x = ie(), T = 50, y = (h == null ? void 0 : h.length) ?? 1;
711
- te(() => {
707
+ showNavigation: w = !0,
708
+ children: u
709
+ }, f) => {
710
+ const [s, d] = F(0), [g, S] = F(1), [b, $] = F(null), [D, C] = F(null), p = le(), T = 50, y = (u == null ? void 0 : u.length) ?? 1;
711
+ ae(() => {
712
712
  const a = () => {
713
- S(x ? l : i);
713
+ S(p ? l : o);
714
714
  };
715
715
  return window.addEventListener("resize", a), a(), () => window.removeEventListener("resize", a);
716
716
  }, []);
717
- const k = h == null ? void 0 : h.slice(s, s + d), v = (a) => {
718
- var g;
719
- (g = a == null ? void 0 : a.target) == null || g.blur(), s + d < y && u(s + d);
720
- }, P = (a) => {
721
- var g;
722
- (g = a == null ? void 0 : a.target) == null || g.blur(), s - d >= 0 && u(s - d);
717
+ const k = u == null ? void 0 : u.slice(s, s + g), x = (a) => {
718
+ var m;
719
+ (m = a == null ? void 0 : a.target) == null || m.blur(), s + g < y && d(s + g);
720
+ }, I = (a) => {
721
+ var m;
722
+ (m = a == null ? void 0 : a.target) == null || m.blur(), s - g >= 0 && d(s - g);
723
723
  };
724
724
  return /* @__PURE__ */ c(
725
- Ue,
725
+ je,
726
726
  {
727
- ref: p,
728
- ...x ? { onTouchStart: (a) => {
729
- var g;
730
- C(null), $((g = a == null ? void 0 : a.targetTouches["0"]) == null ? void 0 : g.clientX);
727
+ ref: f,
728
+ ...p ? { onTouchStart: (a) => {
729
+ var m;
730
+ C(null), $((m = a == null ? void 0 : a.targetTouches["0"]) == null ? void 0 : m.clientX);
731
731
  }, onTouchMove: (a) => {
732
- var g;
733
- C((g = a == null ? void 0 : a.targetTouches["0"]) == null ? void 0 : g.clientX);
732
+ var m;
733
+ C((m = a == null ? void 0 : a.targetTouches["0"]) == null ? void 0 : m.clientX);
734
734
  }, onTouchEnd: () => {
735
735
  if (!b || !D) return;
736
736
  const a = b - D;
737
- a > T && v(), a < -T && P();
737
+ a > T && x(), a < -T && I();
738
738
  } } : {},
739
739
  children: [
740
740
  /* @__PURE__ */ t("div", { className: "scrollable-section__header", children: /* @__PURE__ */ c("div", { className: "scrollable-section__title", children: [
741
- H(e) && /* @__PURE__ */ t(
742
- oe,
741
+ K(e) && /* @__PURE__ */ t(
742
+ se,
743
743
  {
744
744
  icon: e,
745
745
  color: "primary",
@@ -747,12 +747,12 @@ const W = m.div`
747
747
  className: "title__icon"
748
748
  }
749
749
  ),
750
- H(n) && /* @__PURE__ */ t("div", { className: "title__text", children: n })
750
+ K(n) && /* @__PURE__ */ t("div", { className: "title__text", children: n })
751
751
  ] }) }),
752
752
  /* @__PURE__ */ t(
753
- Be,
753
+ We,
754
754
  {
755
- numOfColumns: i,
755
+ numOfColumns: o,
756
756
  numOfColumnsForMobile: l,
757
757
  animate: {
758
758
  x: 0,
@@ -766,9 +766,9 @@ const W = m.div`
766
766
  },
767
767
  `scrollable-section__content-${s}`
768
768
  ),
769
- f && y > d && !x && /* @__PURE__ */ c("div", { className: "scrollable-section__navigation", children: [
769
+ w && y > g && !p && /* @__PURE__ */ c("div", { className: "scrollable-section__navigation", children: [
770
770
  /* @__PURE__ */ t(
771
- J,
771
+ Q,
772
772
  {
773
773
  icon: "angle-left",
774
774
  borderRadius: "curved",
@@ -776,19 +776,19 @@ const W = m.div`
776
776
  color: "neutral",
777
777
  className: "navigation__arrow",
778
778
  disabled: s === 0,
779
- onClick: P
779
+ onClick: I
780
780
  }
781
781
  ),
782
782
  /* @__PURE__ */ t(
783
- J,
783
+ Q,
784
784
  {
785
785
  icon: "angle-right",
786
786
  borderRadius: "curved",
787
787
  btnType: "tinted",
788
788
  color: "neutral",
789
789
  className: "navigation__arrow",
790
- disabled: s + d >= y,
791
- onClick: v
790
+ disabled: s + g >= y,
791
+ onClick: x
792
792
  }
793
793
  )
794
794
  ] })
@@ -797,45 +797,45 @@ const W = m.div`
797
797
  );
798
798
  }
799
799
  );
800
- ce.propTypes = {
801
- icon: o.string,
802
- title: o.string,
803
- numOfSlides: o.number,
804
- numOfSlidesForMobile: o.number,
805
- showNavigation: o.bool
800
+ ge.propTypes = {
801
+ icon: i.string,
802
+ title: i.string,
803
+ numOfSlides: i.number,
804
+ numOfSlidesForMobile: i.number,
805
+ showNavigation: i.bool
806
806
  };
807
- const Re = De(le), er = V(
807
+ const Ve = Se(de), nr = V(
808
808
  ({
809
809
  sellerType: e = "Shop",
810
810
  items: n = [],
811
- title: i,
811
+ title: o,
812
812
  icon: l,
813
- isLoading: f,
814
- onSelectCard: h = () => {
813
+ isLoading: w,
814
+ onSelectCard: u = () => {
815
815
  },
816
- onSelectShop: p = () => {
816
+ onSelectShop: f = () => {
817
817
  },
818
818
  getImage: s = () => {
819
819
  },
820
- campaignSingleText: u,
821
- upcomingCampaignText: d,
820
+ campaignSingleText: d,
821
+ upcomingCampaignText: g,
822
822
  salesCampaignTypes: S = [],
823
823
  startsInPrefixTextPlural: b,
824
824
  startsinSuffixTextPlural: $,
825
825
  startsInPrefixTextSingular: D,
826
826
  startsinSuffixTextSingular: C,
827
- endsInPrefixTextPlural: x,
827
+ endsInPrefixTextPlural: p,
828
828
  endsinSuffixTextPlural: T,
829
829
  endsInPrefixTextSingular: y,
830
830
  endsinSuffixTextSingular: k,
831
- numOfSlides: v = 2,
832
- numOfSlidesForMobile: P = 1,
833
- showNavigation: M = !0,
834
- numberOfListingsTextSingular: O,
835
- numberOfListingsTextPlural: L
831
+ numOfSlides: x = 2,
832
+ numOfSlidesForMobile: I = 1,
833
+ showNavigation: z = !0,
834
+ numberOfListingsTextSingular: A,
835
+ numberOfListingsTextPlural: O
836
836
  }, a) => {
837
- const g = ie(), U = Ce(() => n == null ? void 0 : n.map((r, X) => /* @__PURE__ */ t(
838
- Re,
837
+ const m = le(), L = Te(() => n == null ? void 0 : n.map((r, X) => /* @__PURE__ */ t(
838
+ Ve,
839
839
  {
840
840
  className: "campaign-item",
841
841
  coverPhoto: s(
@@ -853,42 +853,42 @@ const Re = De(le), er = V(
853
853
  startDate: r == null ? void 0 : r.startDate,
854
854
  title: r == null ? void 0 : r.name,
855
855
  uuid: r == null ? void 0 : r.campaignUuid,
856
- onSelectCard: () => h(r == null ? void 0 : r.campaignUuid, r == null ? void 0 : r.shopUuid),
857
- onSelectShop: () => p(r == null ? void 0 : r.shopUuid),
858
- campaignSingleText: u,
859
- upcomingCampaignText: d,
856
+ onSelectCard: () => u(r == null ? void 0 : r.campaignUuid, r == null ? void 0 : r.shopUuid),
857
+ onSelectShop: () => f(r == null ? void 0 : r.shopUuid),
858
+ campaignSingleText: d,
859
+ upcomingCampaignText: g,
860
860
  upcoming: r == null ? void 0 : r.upcoming,
861
861
  salesCampaignTypes: S,
862
862
  startsInPrefixTextPlural: b,
863
863
  startsinSuffixTextPlural: $,
864
864
  startsInPrefixTextSingular: D,
865
865
  startsinSuffixTextSingular: C,
866
- endsInPrefixTextPlural: x,
866
+ endsInPrefixTextPlural: p,
867
867
  endsinSuffixTextPlural: T,
868
868
  endsInPrefixTextSingular: y,
869
869
  endsinSuffixTextSingular: k,
870
870
  themeData: r == null ? void 0 : r.themeData,
871
871
  numberOfListings: r == null ? void 0 : r.numberOfListings,
872
- numberOfListingsTextSingular: O,
873
- numberOfListingsTextPlural: L
872
+ numberOfListingsTextSingular: A,
873
+ numberOfListingsTextPlural: O
874
874
  },
875
875
  `campaign__item__${X}__${r == null ? void 0 : r.startDate}___${r == null ? void 0 : r.endDate}`
876
876
  )), [n]);
877
877
  return /* @__PURE__ */ t(
878
- Le,
878
+ Re,
879
879
  {
880
- isLoading: f,
881
- itemsCount: g ? 1 : 2,
880
+ isLoading: w,
881
+ itemsCount: m ? 1 : 2,
882
882
  keyPrefix: "sales-camp",
883
883
  children: /* @__PURE__ */ t(
884
- ce,
884
+ ge,
885
885
  {
886
886
  icon: l,
887
- title: i,
888
- numOfSlides: v,
889
- numOfSlidesForMobile: P,
890
- showNavigation: M,
891
- children: U
887
+ title: o,
888
+ numOfSlides: x,
889
+ numOfSlidesForMobile: I,
890
+ showNavigation: z,
891
+ children: L
892
892
  }
893
893
  )
894
894
  }
@@ -896,5 +896,5 @@ const Re = De(le), er = V(
896
896
  }
897
897
  );
898
898
  export {
899
- er as default
899
+ nr as default
900
900
  };