@lanaco/lnc-react-ui 4.0.91 → 4.0.93

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,18 +1,18 @@
1
- import { jsx as t, jsxs as w, Fragment as G } from "react/jsx-runtime";
2
- import { createElement as ae, useState as E, useEffect as j, forwardRef as V, useRef as Q, useImperativeHandle as ne, Suspense as se, memo as le, useMemo as ce } from "react";
3
- import { s as m } from "./emotion-styled.browser.esm-BNN1dTl3.js";
4
- import { a as _, l as X, o as ee } from "./utils-BXCGNjIy.js";
1
+ import { jsx as o, jsxs as u, Fragment as V } from "react/jsx-runtime";
2
+ import { createElement as se, useState as z, useEffect as G, forwardRef as Z, useRef as ee, useImperativeHandle as le, Suspense as ce, memo as de, useMemo as ge } from "react";
3
+ import { s as f } from "./emotion-styled.browser.esm-BNN1dTl3.js";
4
+ import { a as B, l as Y, o as re } from "./utils-BXCGNjIy.js";
5
5
  import { M as A } from "./consts-BuFChS64.js";
6
- import { m as de } from "./motion-Ckekul_K.js";
6
+ import { m as he } from "./motion-Ckekul_K.js";
7
7
  import { P as i } from "./index-S5Cd7WrG.js";
8
- import ge from "./Icon.js";
9
- import he from "./Badge.js";
8
+ import fe from "./Icon.js";
9
+ import me from "./Badge.js";
10
10
  import { u as M } from "./emotion-element-f0de968e.browser.esm-CkCiQliQ.js";
11
- import { u as re } from "./useDetectMobile-Bkvj0VMa.js";
12
- import fe from "./FlexBox.js";
13
- import { I as Y } from "./index-Dhf4jQmS.js";
11
+ import { u as te } from "./useDetectMobile-Bkvj0VMa.js";
12
+ import pe from "./FlexBox.js";
13
+ import { I as q } from "./index-Dhf4jQmS.js";
14
14
  import L from "./IconButton.js";
15
- const me = m.div`
15
+ const ue = f.div`
16
16
  cursor: pointer;
17
17
  display: flex;
18
18
  gap: 1rem;
@@ -27,8 +27,8 @@ const me = m.div`
27
27
  border: none;
28
28
  border-radius: 0;
29
29
  }
30
- `, pe = m.div`
31
- border-radius: ${(e) => _(e.theme, "edged")};
30
+ `, we = f.div`
31
+ border-radius: ${(e) => B(e.theme, "edged")};
32
32
  height: 15rem;
33
33
  width: 15rem;
34
34
  min-width: 15rem;
@@ -56,7 +56,7 @@ const me = m.div`
56
56
  max-width: 100dvh;
57
57
  height: 23.438rem;
58
58
  }
59
- `, ue = m.div`
59
+ `, be = f.div`
60
60
  flex: 1;
61
61
  display: flex;
62
62
  flex-direction: column;
@@ -119,7 +119,7 @@ const me = m.div`
119
119
  gap: 0.25rem;
120
120
  }
121
121
  }
122
- `, we = {
122
+ `, xe = {
123
123
  "#ADE3EB": "#76D0DB",
124
124
  "#DDD6FE": "#C4B5FD",
125
125
  "#FDE68A": "#FCD34D",
@@ -131,13 +131,13 @@ const me = m.div`
131
131
  "#E7E5E4": "#D6D3D1",
132
132
  "#FED7AA": "#FDBA74",
133
133
  default: "#C4C8CF"
134
- }, q = (e = !1, o = !1, l = !1) => `
134
+ }, J = (e = !1, t = !1, l = !1) => `
135
135
  display: flex;
136
- ${o ? "flex-wrap: wrap;" : ""}
137
- ${o ? "" : "flex-wrap: nowrap;"}
136
+ ${t ? "flex-wrap: wrap;" : ""}
137
+ ${t ? "" : "flex-wrap: nowrap;"}
138
138
  ${e ? "align-items: center;" : ""}
139
139
  ${l ? "justify-content: center;" : ""}
140
- `, be = m(de.div)`
140
+ `, ve = f(he.div)`
141
141
  text-decoration: none;
142
142
  ${(e) => e.hasPermission === !0 && "cursor: pointer"};
143
143
 
@@ -154,22 +154,22 @@ const me = m.div`
154
154
  text-decoration: none;
155
155
  }
156
156
 
157
- ${q(!0)}
157
+ ${J(!0)}
158
158
  gap: 0.5rem;
159
159
  padding: 0.5rem;
160
160
  color: ${(e) => e.isActive === !1 ? "var(--gray-900)" : "var(--primary-600)"};
161
161
  font-weight: 500;
162
162
  font-size: 0.875rem;
163
163
  line-height: 1.25rem;
164
- border-radius: ${(e) => _(e.theme, "slight")};
164
+ border-radius: ${(e) => B(e.theme, "slight")};
165
165
  transition: all 0.25s ease;
166
166
 
167
167
  & .logo-wrapper {
168
- ${q(!0, !1, !0)}
168
+ ${J(!0, !1, !0)}
169
169
  flex-shrink: 0;
170
170
  border-radius: 999px;
171
171
  border: 3px solid
172
- ${(e) => e.isActive === !1 ? "var(--gray-300, #c4c8cf)" : we[e.themeColor] ?? "var(--gray-300, #c4c8cf)"};
172
+ ${(e) => e.isActive === !1 ? "var(--gray-300, #c4c8cf)" : xe[e.themeColor] ?? "var(--gray-300, #c4c8cf)"};
173
173
 
174
174
  & img,
175
175
  .img-placeholder {
@@ -211,15 +211,15 @@ const me = m.div`
211
211
  background-color: var(--gray-95080, #14161acc);
212
212
  color: var(--gray-600, #676e79);
213
213
  }
214
- `, xe = m.div`
214
+ `, ye = f.div`
215
215
  position: absolute;
216
216
  top: 0.5rem;
217
217
  ${(e) => e.alignToLeft === !0 ? "left: 0.5rem;" : "right: 0.5rem;"}
218
218
  display: flex;
219
219
  gap: 0.25rem;
220
- `, ve = (e) => `var(--${e}-700)`, ye = m.div`
221
- border-radius: ${(e) => _(e.theme, e.borderRadius || "slight")};
222
- background-color: ${(e) => ve(e == null ? void 0 : e.color)};
220
+ `, $e = (e) => `var(--${e}-700)`, De = f.div`
221
+ border-radius: ${(e) => B(e.theme, e.borderRadius || "slight")};
222
+ background-color: ${(e) => $e(e == null ? void 0 : e.color)};
223
223
  color: white;
224
224
  height: 1.5rem;
225
225
  min-width: 1.5rem;
@@ -233,44 +233,44 @@ const me = m.div`
233
233
  & i {
234
234
  font-size: 0.813rem;
235
235
  }
236
- `, te = (e) => {
236
+ `, oe = (e) => {
237
237
  const {
238
- uuid: o,
238
+ uuid: t,
239
239
  hasPermission: l = !0,
240
240
  isUser: a,
241
- image: b,
241
+ image: w,
242
242
  name: n,
243
- notifications: d = 0,
244
- color: p = "primary",
245
- size: x = "large",
243
+ notifications: g = 0,
244
+ color: m = "primary",
245
+ size: b = "large",
246
246
  style: D,
247
247
  disabled: s,
248
- onSelect: c = () => {
248
+ onSelect: d = () => {
249
249
  },
250
- isActive: $,
251
- className: v,
250
+ isActive: v,
251
+ className: x,
252
252
  // new
253
- themeData: u
254
- } = e, S = {
253
+ themeData: p
254
+ } = e, C = {
255
255
  theme: M(),
256
- color: p,
257
- size: x,
256
+ color: m,
257
+ size: b,
258
258
  style: D,
259
259
  disabled: s
260
260
  };
261
- return /* @__PURE__ */ ae(
262
- be,
261
+ return /* @__PURE__ */ se(
262
+ ve,
263
263
  {
264
- onClick: (N) => {
265
- N.stopPropagation(), l === !0 && (c == null || c());
264
+ onClick: (S) => {
265
+ S.stopPropagation(), l === !0 && (d == null || d());
266
266
  },
267
- ...S,
267
+ ...C,
268
268
  key: n,
269
269
  animate: {
270
270
  y: 0,
271
271
  opacity: 1
272
272
  },
273
- className: `profile-item ${v}`,
273
+ className: `profile-item ${x}`,
274
274
  exit: {
275
275
  opacity: 0
276
276
  },
@@ -279,15 +279,15 @@ const me = m.div`
279
279
  y: -10,
280
280
  opacity: 0
281
281
  },
282
- isActive: $,
283
- themeColor: (u == null ? void 0 : u.code) || "transparent"
282
+ isActive: v,
283
+ themeColor: (p == null ? void 0 : p.code) || "transparent"
284
284
  },
285
- /* @__PURE__ */ t("div", { className: "logo-wrapper", children: b }),
286
- /* @__PURE__ */ t("div", { className: "name", children: n }),
287
- d > 0 && /* @__PURE__ */ t("div", { className: "notifications-number", children: /* @__PURE__ */ t(he, { className: "badge", color: "danger", size: "small", children: d > 99 ? "99+" : d }) })
285
+ /* @__PURE__ */ o("div", { className: "logo-wrapper", children: w }),
286
+ /* @__PURE__ */ o("div", { className: "name", children: n }),
287
+ g > 0 && /* @__PURE__ */ o("div", { className: "notifications-number", children: /* @__PURE__ */ o(me, { className: "badge", color: "danger", size: "small", children: g > 99 ? "99+" : g }) })
288
288
  );
289
289
  };
290
- te.propTypes = {
290
+ oe.propTypes = {
291
291
  id: i.any,
292
292
  isUserProfile: i.bool,
293
293
  themeColor: i.string,
@@ -309,86 +309,86 @@ te.propTypes = {
309
309
  onSelect: i.func,
310
310
  hasPermission: i.bool
311
311
  };
312
- const J = (e, o) => {
313
- if (!e || !o) return null;
314
- let l = Math.floor((e == null ? void 0 : e.getTime()) - (o == null ? void 0 : o.getTime())), a = 1e3 * 60 * 60 * 24;
312
+ const K = (e, t) => {
313
+ if (!e || !t) return null;
314
+ let l = Math.floor((e == null ? void 0 : e.getTime()) - (t == null ? void 0 : t.getTime())), a = 1e3 * 60 * 60 * 24;
315
315
  return Math.ceil(l / a);
316
- }, oe = (e) => {
317
- const o = M(), {
316
+ }, ie = (e) => {
317
+ const t = M(), {
318
318
  uuid: l,
319
319
  shopUuid: a,
320
- title: b = "",
320
+ title: w = "",
321
321
  description: n,
322
- badges: d,
323
- coverPhoto: p,
324
- onSelect: x,
322
+ badges: g,
323
+ coverPhoto: m,
324
+ onSelect: b,
325
325
  status: D,
326
326
  startDate: s,
327
- endDate: c,
328
- salesPackages: $,
329
- shopName: v,
330
- shopImage: u,
331
- className: g,
332
- onSelectCard: S = () => {
327
+ endDate: d,
328
+ salesPackages: v,
329
+ shopName: x,
330
+ shopImage: p,
331
+ className: h,
332
+ onSelectCard: C = () => {
333
333
  },
334
- onSelectShop: N = () => {
334
+ onSelectShop: S = () => {
335
335
  },
336
336
  campaignSingleText: r,
337
- salesCampaignTypes: h = [],
338
- startsInPrefixTextPlural: P,
339
- startsinSuffixTextPlural: I,
340
- startsInPrefixTextSingular: z,
341
- startsinSuffixTextSingular: H,
342
- themeData: B,
343
- ...f
344
- } = e, k = s ? new Date(s) <= /* @__PURE__ */ new Date() : !1;
345
- J(
346
- c ? new Date(c) : null,
337
+ salesCampaignTypes: y = [],
338
+ startsInPrefixTextPlural: H,
339
+ startsinSuffixTextPlural: N,
340
+ startsInPrefixTextSingular: R,
341
+ startsinSuffixTextSingular: I,
342
+ themeData: W,
343
+ ...j
344
+ } = e, U = s ? new Date(s) <= /* @__PURE__ */ new Date() : !1;
345
+ K(
346
+ d ? new Date(d) : null,
347
347
  s ? new Date(s) : null
348
348
  );
349
- const C = J(
349
+ const c = K(
350
350
  s ? new Date(s) : null,
351
351
  /* @__PURE__ */ new Date()
352
352
  );
353
- return /* @__PURE__ */ w(
354
- me,
353
+ return /* @__PURE__ */ u(
354
+ ue,
355
355
  {
356
- theme: o,
357
- className: g,
358
- onClick: S,
359
- ...f,
356
+ theme: t,
357
+ className: h,
358
+ onClick: C,
359
+ ...j,
360
360
  children: [
361
- /* @__PURE__ */ w(pe, { theme: o, onClick: () => x == null ? void 0 : x(), children: [
362
- /* @__PURE__ */ t("img", { src: p }),
363
- /* @__PURE__ */ t(xe, { children: $ == null ? void 0 : $.map((T, R) => {
364
- var W, U;
365
- return /* @__PURE__ */ t(
366
- ye,
361
+ /* @__PURE__ */ u(we, { theme: t, onClick: () => b == null ? void 0 : b(), children: [
362
+ /* @__PURE__ */ o("img", { src: m }),
363
+ /* @__PURE__ */ o(ye, { children: v == null ? void 0 : v.map(($, F) => {
364
+ var T, _;
365
+ return /* @__PURE__ */ o(
366
+ De,
367
367
  {
368
- color: (W = h == null ? void 0 : h.find((y) => y.value === T)) == null ? void 0 : W.color,
369
- theme: o,
370
- children: /* @__PURE__ */ t(
371
- ge,
368
+ color: (T = y == null ? void 0 : y.find((P) => P.value === $)) == null ? void 0 : T.color,
369
+ theme: t,
370
+ children: /* @__PURE__ */ o(
371
+ fe,
372
372
  {
373
- icon: (U = h == null ? void 0 : h.find((y) => y.value === T)) == null ? void 0 : U.icon
373
+ icon: (_ = y == null ? void 0 : y.find((P) => P.value === $)) == null ? void 0 : _.icon
374
374
  }
375
375
  )
376
376
  },
377
- `package__${R}`
377
+ `package__${F}`
378
378
  );
379
379
  }) })
380
380
  ] }),
381
- /* @__PURE__ */ w(ue, { theme: o, children: [
382
- /* @__PURE__ */ w("div", { className: "text-block-wrapper", children: [
383
- /* @__PURE__ */ w("div", { className: "title-block-wrapper", children: [
384
- /* @__PURE__ */ t("div", { className: "campaign-title", children: r }),
385
- /* @__PURE__ */ t("div", { className: "campaign-title-text", children: b }),
386
- /* @__PURE__ */ t("div", { className: "timestamp-text", children: k ? "" : C === 1 ? `${z} ${C} ${H}` : `${P} ${C} ${I}` })
381
+ /* @__PURE__ */ u(be, { theme: t, children: [
382
+ /* @__PURE__ */ u("div", { className: "text-block-wrapper", children: [
383
+ /* @__PURE__ */ u("div", { className: "title-block-wrapper", children: [
384
+ /* @__PURE__ */ o("div", { className: "campaign-title", children: r }),
385
+ /* @__PURE__ */ o("div", { className: "campaign-title-text", children: w }),
386
+ /* @__PURE__ */ o("div", { className: "timestamp-text", children: U ? "" : c === 1 ? `${R} ${c} ${I}` : `${H} ${c} ${N}` })
387
387
  ] }),
388
- /* @__PURE__ */ t("div", { children: n })
388
+ /* @__PURE__ */ o("div", { children: n })
389
389
  ] }),
390
- /* @__PURE__ */ t(
391
- te,
390
+ /* @__PURE__ */ o(
391
+ oe,
392
392
  {
393
393
  hasPermission: !0,
394
394
  image: (
@@ -398,19 +398,19 @@ const J = (e, o) => {
398
398
  // size={ImageSize.SMALL}
399
399
  // className={`${shopImage ? "" : "no-image"}`}
400
400
  // />
401
- /* @__PURE__ */ t(
401
+ /* @__PURE__ */ o(
402
402
  "img",
403
403
  {
404
- src: u,
405
- className: `${u ? "" : "no-image"}`
404
+ src: p,
405
+ className: `${p ? "" : "no-image"}`
406
406
  }
407
407
  )
408
408
  ),
409
- themeData: B,
409
+ themeData: W,
410
410
  isActive: !0,
411
411
  isUser: !1,
412
- name: v,
413
- onClick: () => N(a)
412
+ name: x,
413
+ onClick: () => S(a)
414
414
  }
415
415
  )
416
416
  ] })
@@ -418,13 +418,13 @@ const J = (e, o) => {
418
418
  }
419
419
  );
420
420
  };
421
- oe.propTypes = {
421
+ ie.propTypes = {
422
422
  title: i.oneOfType([i.string, i.element]),
423
423
  numberOfListings: i.number,
424
424
  dropdown: i.any,
425
425
  color: i.string
426
426
  };
427
- const $e = m.div`
427
+ const ke = f.div`
428
428
  display: flex;
429
429
  flex-direction: column;
430
430
  gap: 1.5rem;
@@ -435,7 +435,7 @@ const $e = m.div`
435
435
  position: absolute;
436
436
  top: 50%;
437
437
  left: 1.5rem;
438
- z-index: ${(e) => X(e.arrowsZIndex) ? e.arrowsZIndex : 20};
438
+ z-index: ${(e) => Y(e.arrowsZIndex) ? e.arrowsZIndex : 20};
439
439
  }
440
440
 
441
441
  & .hover-right-arrow {
@@ -443,7 +443,7 @@ const $e = m.div`
443
443
  position: absolute;
444
444
  top: 50%;
445
445
  right: 1.5rem;
446
- z-index: ${(e) => X(e.arrowsZIndex) ? e.arrowsZIndex : 20};
446
+ z-index: ${(e) => Y(e.arrowsZIndex) ? e.arrowsZIndex : 20};
447
447
  }
448
448
 
449
449
  & .clip-loader-wrapper {
@@ -458,7 +458,7 @@ const $e = m.div`
458
458
  display: flex;
459
459
  }
460
460
  }
461
- `, De = m.div`
461
+ `, Ce = f.div`
462
462
  display: flex;
463
463
  align-items: center;
464
464
 
@@ -479,7 +479,7 @@ const $e = m.div`
479
479
  display: none;
480
480
  }
481
481
  }
482
- `, ke = m.div`
482
+ `, Se = f.div`
483
483
  position: relative;
484
484
  padding: ${(e) => e.padding};
485
485
 
@@ -557,100 +557,104 @@ const $e = m.div`
557
557
  right: 0;
558
558
  }
559
559
  }
560
- `, Ce = (e, o) => {
561
- const [l, a] = E({
560
+ `, Ne = (e, t) => {
561
+ const [l, a] = z({
562
562
  trigger: null,
563
563
  direction: null
564
- }), b = (n) => n.touches || n.originalEvent.touches;
565
- return j(() => {
564
+ }), w = (n) => n.touches || n.originalEvent.touches;
565
+ return G(() => {
566
566
  const n = typeof e == "string" || e instanceof String ? document.getElementById(e) : e.current;
567
- let d = null, p = null;
567
+ let g = null, m = null;
568
568
  if (n) {
569
- const x = (s) => {
570
- const c = b(s)[0];
571
- d = c.clientX, p = c.clientY;
569
+ const b = (s) => {
570
+ const d = w(s)[0];
571
+ g = d.clientX, m = d.clientY;
572
572
  }, D = (s) => {
573
- if (!d || !p)
573
+ if (!g || !m)
574
574
  return;
575
- const c = s.touches[0].clientX, $ = s.touches[0].clientY, v = d - c, u = p - $;
576
- Math.abs(v) > Math.abs(u) ? v > 0 ? a((g) => ({
577
- trigger: !g.trigger,
578
- direction: F.LEFT
579
- })) : a((g) => ({
580
- trigger: !g.trigger,
581
- direction: F.RIGHT
582
- })) : u > 0 ? a((g) => ({
583
- trigger: !g.trigger,
584
- direction: F.UP
585
- })) : a((g) => ({
586
- trigger: !g.trigger,
587
- direction: F.DOWN
588
- })), d = null, p = null;
575
+ const d = s.touches[0].clientX, v = s.touches[0].clientY, x = g - d, p = m - v;
576
+ Math.abs(x) > Math.abs(p) ? x > 0 ? a((h) => ({
577
+ trigger: !h.trigger,
578
+ direction: E.LEFT
579
+ })) : a((h) => ({
580
+ trigger: !h.trigger,
581
+ direction: E.RIGHT
582
+ })) : p > 0 ? a((h) => ({
583
+ trigger: !h.trigger,
584
+ direction: E.UP
585
+ })) : a((h) => ({
586
+ trigger: !h.trigger,
587
+ direction: E.DOWN
588
+ })), g = null, m = null;
589
589
  };
590
- return n.addEventListener("touchstart", x), n.addEventListener("touchmove", D), () => {
591
- n.removeEventListener("touchstart", x), n.addEventListener("touchmove", D);
590
+ return n.addEventListener("touchstart", b), n.addEventListener("touchmove", D), () => {
591
+ n.removeEventListener("touchstart", b), n.addEventListener("touchmove", D);
592
592
  };
593
593
  }
594
594
  }, []), l;
595
- }, F = {
595
+ }, E = {
596
596
  UP: "up",
597
597
  DOWN: "down",
598
598
  RIGHT: "right",
599
599
  LEFT: "left"
600
- }, ie = V(
600
+ }, ae = Z(
601
601
  ({
602
602
  title: e,
603
- columnGap: o = "2rem",
603
+ columnGap: t = "2rem",
604
604
  rowGap: l = "1.25rem",
605
605
  scrollBySize: a = 300,
606
- wrapForMobile: b = !1,
606
+ wrapForMobile: w = !1,
607
607
  wrap: n = !1,
608
- children: d,
609
- methodsRef: p,
610
- arrowsVisibleOnHover: x = !0,
608
+ children: g,
609
+ methodsRef: m,
610
+ arrowsVisibleOnHover: b = !0,
611
611
  rightAlignArrows: D = !1,
612
612
  padding: s = "0",
613
- showTimesBtn: c,
614
- noArrows: $,
615
- onShowEnd: v,
616
- arrowsZIndex: u,
617
- ...g
618
- }, S) => {
619
- const N = re(), r = M(), [h, P] = E(!1), [I, z] = E(!1), [H, B] = E(!0), f = Q(), k = Ce(f);
620
- j(() => {
621
- (k == null ? void 0 : k.direction) === F.RIGHT && I !== !0 ? T() : (k == null ? void 0 : k.direction) === F.LEFT && h !== !0 && C();
622
- }, [k]);
623
- const C = () => {
624
- var y;
625
- (y = f.current) == null || y.scrollBy(a, 0);
613
+ showTimesBtn: d,
614
+ noArrows: v,
615
+ onShowEnd: x,
616
+ arrowsZIndex: p,
617
+ elementsCount: h,
618
+ minElementsCount: C = 2,
619
+ ...S
620
+ }, r) => {
621
+ const y = te(), H = M(), [N, R] = z(
622
+ h < C
623
+ ), [I, W] = z(!1), [j, U] = z(!0), c = ee(), $ = Ne(c);
624
+ G(() => {
625
+ ($ == null ? void 0 : $.direction) === E.RIGHT && I !== !0 ? T() : ($ == null ? void 0 : $.direction) === E.LEFT && N !== !0 && F();
626
+ }, [$]);
627
+ const F = () => {
628
+ var k;
629
+ (k = c.current) == null || k.scrollBy(a, 0);
626
630
  }, T = () => {
627
- var y;
628
- (y = f.current) == null || y.scrollBy(-a, 0);
629
- }, [R, W] = E(!1);
630
- j(() => {
631
- var y, Z;
632
- W(
633
- ((y = f == null ? void 0 : f.current) == null ? void 0 : y.scrollWidth) > ((Z = f == null ? void 0 : f.current) == null ? void 0 : Z.clientWidth)
631
+ var k;
632
+ (k = c.current) == null || k.scrollBy(-a, 0);
633
+ }, [_, P] = z(!1);
634
+ G(() => {
635
+ var k, X;
636
+ P(
637
+ ((k = c == null ? void 0 : c.current) == null ? void 0 : k.scrollWidth) > ((X = c == null ? void 0 : c.current) == null ? void 0 : X.clientWidth)
634
638
  );
635
- }, [d]), ne(p, () => ({
639
+ }, [g]), le(m, () => ({
636
640
  scrollToEnd() {
637
- U();
641
+ ne();
638
642
  },
639
643
  scrollLeft() {
640
644
  T();
641
645
  },
642
646
  scrollRight() {
643
- C();
647
+ F();
644
648
  }
645
649
  }));
646
- const U = () => {
647
- f.current.scrollLeft = f.current.scrollWidth;
650
+ const ne = () => {
651
+ c.current.scrollLeft = c.current.scrollWidth;
648
652
  };
649
- return /* @__PURE__ */ w($e, { arrowsZIndex: u, children: [
650
- /* @__PURE__ */ w(De, { children: [
651
- /* @__PURE__ */ t("div", { children: e }),
652
- /* @__PURE__ */ w("div", { className: "btns-group", children: [
653
- /* @__PURE__ */ t(
653
+ return /* @__PURE__ */ u(ke, { arrowsZIndex: p, children: [
654
+ /* @__PURE__ */ u(Ce, { children: [
655
+ /* @__PURE__ */ o("div", { children: e }),
656
+ /* @__PURE__ */ u("div", { className: "btns-group", children: [
657
+ /* @__PURE__ */ o(
654
658
  L,
655
659
  {
656
660
  borderRadius: "curved",
@@ -662,21 +666,21 @@ const $e = m.div`
662
666
  onClick: T
663
667
  }
664
668
  ),
665
- /* @__PURE__ */ t(
669
+ /* @__PURE__ */ o(
666
670
  L,
667
671
  {
668
672
  borderRadius: "curved",
669
673
  btnType: "tinted",
670
674
  className: "scroll-arrow-right",
671
675
  color: "neutral",
672
- disabled: h,
676
+ disabled: N,
673
677
  icon: "angle-right",
674
- onClick: C
678
+ onClick: F
675
679
  }
676
680
  )
677
681
  ] })
678
682
  ] }),
679
- /* @__PURE__ */ t(
683
+ /* @__PURE__ */ o(
680
684
  L,
681
685
  {
682
686
  borderRadius: "curved",
@@ -688,65 +692,65 @@ const $e = m.div`
688
692
  onClick: T
689
693
  }
690
694
  ),
691
- /* @__PURE__ */ t(
695
+ /* @__PURE__ */ o(
692
696
  L,
693
697
  {
694
698
  borderRadius: "curved",
695
699
  btnType: "tinted",
696
700
  className: "hover-right-arrow scroll-arrow-right",
697
701
  color: "neutral",
698
- disabled: h,
702
+ disabled: N,
699
703
  icon: "angle-right",
700
- onClick: C
704
+ onClick: F
701
705
  }
702
706
  ),
703
- /* @__PURE__ */ t(
704
- ke,
707
+ /* @__PURE__ */ o(
708
+ Se,
705
709
  {
706
- ref: S,
707
- arrowsVisibleOnHover: x,
708
- hasOverflow: R,
709
- noArrows: $,
710
+ ref: r,
711
+ arrowsVisibleOnHover: b,
712
+ hasOverflow: _,
713
+ noArrows: v,
710
714
  padding: s,
711
715
  rightAlignArrows: D,
712
- showTimesBtn: c,
713
- theme: r,
714
- ...g,
715
- children: /* @__PURE__ */ w(
716
- fe,
716
+ showTimesBtn: d,
717
+ theme: H,
718
+ ...S,
719
+ children: /* @__PURE__ */ u(
720
+ pe,
717
721
  {
718
- ref: f,
722
+ ref: c,
719
723
  className: "scrollable-container",
720
- columnGap: o,
724
+ columnGap: t,
721
725
  rowGap: l,
722
- wrap: n || b && N ? "Wrap" : "NoWrap",
726
+ wrap: n || w && y ? "Wrap" : "NoWrap",
723
727
  children: [
724
- /* @__PURE__ */ t(
725
- Y,
728
+ /* @__PURE__ */ o(
729
+ q,
726
730
  {
727
731
  isHorizontal: !0,
728
732
  onIsNotVisible: () => {
729
- I === !0 && z(!1);
733
+ I === !0 && W(!1);
730
734
  },
731
735
  onIsVisible: () => {
732
- I === !1 && z(!0);
736
+ I === !1 && W(!0);
733
737
  }
734
738
  }
735
739
  ),
736
- d,
737
- /* @__PURE__ */ t(
738
- Y,
740
+ g,
741
+ /* @__PURE__ */ o(
742
+ q,
739
743
  {
740
744
  isHorizontal: !0,
741
745
  onIsNotVisible: () => {
742
- h === !0 && P(!1), B(!0);
746
+ N === !0 && R(!1), U(!0);
743
747
  },
744
748
  onIsVisible: () => {
745
- h === !1 && P(!0), B(!1), v == null || v();
749
+ N === !1 && R(!0), U(!1), x == null || x();
746
750
  }
747
751
  }
748
752
  ),
749
- H && R && /* @__PURE__ */ t("div", { className: "gradient" })
753
+ j && _ && /* @__PURE__ */ o("div", { className: "gradient" })
750
754
  ]
751
755
  }
752
756
  )
@@ -755,7 +759,7 @@ const $e = m.div`
755
759
  ] });
756
760
  }
757
761
  );
758
- ie.propTypes = {
762
+ ae.propTypes = {
759
763
  title: i.string,
760
764
  rowGap: i.string,
761
765
  columnGap: i.string,
@@ -767,7 +771,7 @@ ie.propTypes = {
767
771
  rightAlignArrows: i.bool,
768
772
  padding: i.string
769
773
  };
770
- const Se = m.div`
774
+ const Ie = f.div`
771
775
  display: flex;
772
776
  flex-direction: column;
773
777
  gap: 1.5rem;
@@ -801,19 +805,19 @@ const Se = m.div`
801
805
  margin-right: 0;
802
806
  }
803
807
  }
804
- `, O = m.div`
808
+ `, O = f.div`
805
809
  width: ${(e) => e.width || "100%"};
806
810
  height: ${(e) => (e.heightCoeff || 1) * 1.125}rem;
807
811
  background-color: var(--gray-200, #dddfe4);
808
812
 
809
- ${ee("-90deg")}
810
- `, Ne = m.div`
813
+ ${re("-90deg")}
814
+ `, Te = f.div`
811
815
  display: flex;
812
816
  flex-direction: ${(e) => e != null && e.row ? "row" : "column"};
813
817
  gap: ${(e) => (e == null ? void 0 : e.gap) ?? "0.5rem"};
814
818
  width: ${(e) => (e == null ? void 0 : e.width) ?? "100%"};
815
- `, K = m.div`
816
- border-radius: ${(e) => _(e.theme, (e == null ? void 0 : e.borderRadius) ?? "regular")};
819
+ `, Q = f.div`
820
+ border-radius: ${(e) => B(e.theme, (e == null ? void 0 : e.borderRadius) ?? "regular")};
817
821
  background: var(--gray-200, #dddfe4);
818
822
  position: relative;
819
823
  max-height: ${(e) => (e == null ? void 0 : e.height) ?? "5rem"};
@@ -822,10 +826,10 @@ const Se = m.div`
822
826
  width: ${(e) => (e == null ? void 0 : e.width) ?? "5rem"};
823
827
  flex-shrink: 0;
824
828
 
825
- ${ee()}
826
- `, Ie = m.div`
829
+ ${re()}
830
+ `, Ae = f.div`
827
831
  background: var(--white, #fff);
828
- border-radius: ${(e) => _(e.theme, "edged")};
832
+ border-radius: ${(e) => B(e.theme, "edged")};
829
833
  box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.1), 0px 1px 2px rgba(0, 0, 0, 0.06);
830
834
  border: 1px solid var(--gray-95012, #14161a1f);
831
835
 
@@ -851,74 +855,74 @@ const Se = m.div`
851
855
  align-items: center;
852
856
  gap: 0.5rem;
853
857
  }
854
- `, Te = V(({}, e) => {
855
- const o = M();
856
- return /* @__PURE__ */ w(Ie, { ref: e, theme: o, children: [
857
- /* @__PURE__ */ t("div", { className: "campaign__left-section", children: /* @__PURE__ */ t(
858
- K,
858
+ `, Fe = Z(({}, e) => {
859
+ const t = M();
860
+ return /* @__PURE__ */ u(Ae, { ref: e, theme: t, children: [
861
+ /* @__PURE__ */ o("div", { className: "campaign__left-section", children: /* @__PURE__ */ o(
862
+ Q,
859
863
  {
860
- theme: o,
864
+ theme: t,
861
865
  width: "15rem",
862
866
  height: "15rem",
863
867
  borderRadius: "edged"
864
868
  }
865
869
  ) }),
866
- /* @__PURE__ */ w("div", { className: "campaign__right-section", children: [
867
- /* @__PURE__ */ w(Ne, { theme: o, children: [
868
- /* @__PURE__ */ t(O, { heightCoeff: 0.75, theme: o, width: "35%" }),
869
- /* @__PURE__ */ t(O, { heightCoeff: 1.25, theme: o }),
870
- /* @__PURE__ */ t(O, { heightCoeff: 3, theme: o })
870
+ /* @__PURE__ */ u("div", { className: "campaign__right-section", children: [
871
+ /* @__PURE__ */ u(Te, { theme: t, children: [
872
+ /* @__PURE__ */ o(O, { heightCoeff: 0.75, theme: t, width: "35%" }),
873
+ /* @__PURE__ */ o(O, { heightCoeff: 1.25, theme: t }),
874
+ /* @__PURE__ */ o(O, { heightCoeff: 3, theme: t })
871
875
  ] }),
872
- /* @__PURE__ */ w("div", { className: "campaign__user", children: [
873
- /* @__PURE__ */ t(
874
- K,
876
+ /* @__PURE__ */ u("div", { className: "campaign__user", children: [
877
+ /* @__PURE__ */ o(
878
+ Q,
875
879
  {
876
- theme: o,
880
+ theme: t,
877
881
  width: "2.5rem",
878
882
  height: "2.5rem",
879
883
  borderRadius: "curved"
880
884
  }
881
885
  ),
882
- /* @__PURE__ */ t(O, { theme: o, width: "75%" })
886
+ /* @__PURE__ */ o(O, { theme: t, width: "75%" })
883
887
  ] })
884
888
  ] })
885
889
  ] });
886
- }), Ae = ({ itemsCount: e = 5, keyPrefix: o }) => /* @__PURE__ */ t(G, { children: Array.from({ length: e }, (l, a) => /* @__PURE__ */ t(
887
- Te,
890
+ }), Ee = ({ itemsCount: e = 5, keyPrefix: t }) => /* @__PURE__ */ o(V, { children: Array.from({ length: e }, (l, a) => /* @__PURE__ */ o(
891
+ Fe,
888
892
  {},
889
- `${o}-skeleton-campaign-card-${a}`
890
- )) }), Fe = ({
893
+ `${t}-skeleton-campaign-card-${a}`
894
+ )) }), _e = ({
891
895
  children: e,
892
- fallbackComponent: o = /* @__PURE__ */ t(G, {}),
896
+ fallbackComponent: t = /* @__PURE__ */ o(V, {}),
893
897
  isLoading: l = !1,
894
898
  itemsCount: a = 5,
895
- keyPrefix: b
896
- }) => /* @__PURE__ */ t(se, { fallback: o, children: l === !0 ? /* @__PURE__ */ t(Ae, { itemsCount: a, keyPrefix: b }) : e }), Ee = le(oe), Ze = V(
899
+ keyPrefix: w
900
+ }) => /* @__PURE__ */ o(ce, { fallback: t, children: l === !0 ? /* @__PURE__ */ o(Ee, { itemsCount: a, keyPrefix: w }) : e }), Pe = de(ie), Ye = Z(
897
901
  ({
898
902
  sellerType: e = "Shop",
899
- items: o = [],
903
+ items: t = [],
900
904
  title: l,
901
905
  isLoading: a,
902
- onSelectCard: b = () => {
906
+ onSelectCard: w = () => {
903
907
  },
904
908
  onSelectShop: n = () => {
905
909
  },
906
- getImage: d = () => {
910
+ getImage: g = () => {
907
911
  },
908
912
  // new
909
- customScrollSize: p,
910
- campaignSingleText: x,
913
+ customScrollSize: m,
914
+ campaignSingleText: b,
911
915
  salesCampaignTypes: D = [],
912
916
  startsInPrefixTextPlural: s,
913
- startsinSuffixTextPlural: c,
914
- startsInPrefixTextSingular: $,
915
- startsinSuffixTextSingular: v
916
- }, u) => {
917
- const g = Q(), S = re(), N = ce(() => o == null ? void 0 : o.map((r, h) => /* @__PURE__ */ t(
918
- Ee,
917
+ startsinSuffixTextPlural: d,
918
+ startsInPrefixTextSingular: v,
919
+ startsinSuffixTextSingular: x
920
+ }, p) => {
921
+ const h = ee(), C = te(), S = ge(() => t == null ? void 0 : t.map((r, y) => /* @__PURE__ */ o(
922
+ Pe,
919
923
  {
920
924
  className: "campaign-item",
921
- coverPhoto: d(
925
+ coverPhoto: g(
922
926
  r == null ? void 0 : r.coverPhoto,
923
927
  (r == null ? void 0 : r.uuid) || (r == null ? void 0 : r.campaignUuid)
924
928
  ),
@@ -932,41 +936,42 @@ const Se = m.div`
932
936
  startDate: r == null ? void 0 : r.startDate,
933
937
  title: r == null ? void 0 : r.name,
934
938
  uuid: r == null ? void 0 : r.campaignUuid,
935
- onSelectCard: () => b(r == null ? void 0 : r.campaignUuid, r == null ? void 0 : r.shopUuid),
939
+ onSelectCard: () => w(r == null ? void 0 : r.campaignUuid, r == null ? void 0 : r.shopUuid),
936
940
  onSelectShop: () => n(r == null ? void 0 : r.shopUuid),
937
- campaignSingleText: x,
941
+ campaignSingleText: b,
938
942
  salesCampaignTypes: D,
939
943
  startsInPrefixTextPlural: s,
940
- startsinSuffixTextPlural: c,
941
- startsInPrefixTextSingular: $,
942
- startsinSuffixTextSingular: v,
944
+ startsinSuffixTextPlural: d,
945
+ startsInPrefixTextSingular: v,
946
+ startsinSuffixTextSingular: x,
943
947
  themeData: r == null ? void 0 : r.themeData
944
948
  },
945
- `campaign__item__${h}__${r == null ? void 0 : r.startDate}___${r == null ? void 0 : r.endDate}`
946
- )), [o]);
947
- return /* @__PURE__ */ t(G, { children: (o == null ? void 0 : o.length) > 0 && /* @__PURE__ */ t(Se, { ref: u, className: "row-section-scroll", children: /* @__PURE__ */ t(
948
- ie,
949
+ `campaign__item__${y}__${r == null ? void 0 : r.startDate}___${r == null ? void 0 : r.endDate}`
950
+ )), [t]);
951
+ return /* @__PURE__ */ o(V, { children: (t == null ? void 0 : t.length) > 0 && /* @__PURE__ */ o(Ie, { ref: p, className: "row-section-scroll", children: /* @__PURE__ */ o(
952
+ ae,
949
953
  {
950
954
  arrowsVisibleOnHover: !1,
951
955
  columnGap: "0",
952
- methodsRef: g,
956
+ methodsRef: h,
953
957
  mobileHoverScrollButtons: !0,
954
958
  noArrows: !0,
955
959
  padding: "0.25rem 0",
956
960
  rightAlignArrows: !0,
957
- scrollBySize: S ? window.innerWidth : p > 0 ? p : window.innerWidth,
961
+ elementsCount: t == null ? void 0 : t.length,
962
+ scrollBySize: C ? window.innerWidth : m > 0 ? m : window.innerWidth,
958
963
  showTimesBtn: !1,
959
964
  title: l,
960
965
  onShowEnd: () => {
961
966
  },
962
967
  arrowsZIndex: 11,
963
- children: /* @__PURE__ */ t(
964
- Fe,
968
+ children: /* @__PURE__ */ o(
969
+ _e,
965
970
  {
966
971
  isLoading: a,
967
972
  itemsCount: 2,
968
973
  keyPrefix: "sales-camp",
969
- children: N
974
+ children: S
970
975
  }
971
976
  )
972
977
  }
@@ -974,5 +979,5 @@ const Se = m.div`
974
979
  }
975
980
  );
976
981
  export {
977
- Ze as default
982
+ Ye as default
978
983
  };