@lanaco/lnc-react-ui 4.0.124 → 4.0.126

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