@lanaco/lnc-react-ui 4.0.142 → 4.0.144

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