@lanaco/lnc-react-ui 4.0.117 → 4.0.119

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