@lanaco/lnc-react-ui 4.0.186 → 4.0.189

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.
Files changed (74) hide show
  1. package/dist/BannerSectionCarousel.cjs +4 -4
  2. package/dist/BannerSectionCarousel.js +150 -158
  3. package/dist/BlogCardsSponsoredSection.cjs +5 -5
  4. package/dist/BlogCardsSponsoredSection.js +55 -51
  5. package/dist/BlogCategoryCardsSection.cjs +1 -1
  6. package/dist/BlogCategoryCardsSection.js +1 -1
  7. package/dist/BlogExploreSection.cjs +5 -5
  8. package/dist/BlogExploreSection.js +182 -215
  9. package/dist/BlogListSection.cjs +6 -6
  10. package/dist/BlogListSection.js +134 -116
  11. package/dist/BlogProductCardsSection.cjs +1 -1
  12. package/dist/BlogProductCardsSection.js +26 -24
  13. package/dist/BlogShopCardsSection.cjs +1 -1
  14. package/dist/BlogShopCardsSection.js +1 -1
  15. package/dist/BlogSingleSection.cjs +3 -3
  16. package/dist/BlogSingleSection.js +21 -19
  17. package/dist/BlogsSectionDetailed.cjs +4 -4
  18. package/dist/BlogsSectionDetailed.js +81 -76
  19. package/dist/BlogsSectionLarge.cjs +6 -6
  20. package/dist/BlogsSectionLarge.js +34 -31
  21. package/dist/BlogsSectionSimple.cjs +8 -8
  22. package/dist/BlogsSectionSimple.js +68 -63
  23. package/dist/BlogsSectionSimpleCentered.cjs +9 -9
  24. package/dist/BlogsSectionSimpleCentered.js +67 -54
  25. package/dist/BlogsSectionWithFilters.cjs +9 -9
  26. package/dist/BlogsSectionWithFilters.js +98 -84
  27. package/dist/BrandHitsSection.cjs +7 -7
  28. package/dist/BrandHitsSection.js +50 -32
  29. package/dist/{CategorySimpleCard-DRQuoxXu.js → CategorySimpleCard-CEzArySG.js} +18 -17
  30. package/dist/{CategorySimpleCard-D5N8cx0Z.cjs → CategorySimpleCard-COGlTj06.cjs} +5 -5
  31. package/dist/DetailedProductsInfinitiveSection.cjs +4 -4
  32. package/dist/DetailedProductsInfinitiveSection.js +23 -21
  33. package/dist/DetailedProductsSection.cjs +3 -3
  34. package/dist/DetailedProductsSection.js +38 -35
  35. package/dist/FieldOfInterestsMasonrySection.cjs +12 -12
  36. package/dist/FieldOfInterestsMasonrySection.js +87 -83
  37. package/dist/FieldOfInterestsWithAvatarsCardsSection.cjs +7 -7
  38. package/dist/FieldOfInterestsWithAvatarsCardsSection.js +47 -43
  39. package/dist/FieldOfInterestsWithTagsCardsSection.cjs +6 -6
  40. package/dist/FieldOfInterestsWithTagsCardsSection.js +87 -62
  41. package/dist/GeneralWithTagsCardsSection.cjs +4 -4
  42. package/dist/GeneralWithTagsCardsSection.js +83 -46
  43. package/dist/GiftCardsSection.cjs +7 -7
  44. package/dist/GiftCardsSection.js +56 -47
  45. package/dist/MasonryGeneralCardsSection.cjs +9 -9
  46. package/dist/MasonryGeneralCardsSection.js +82 -68
  47. package/dist/OverlayGeneralCardsSection.cjs +5 -5
  48. package/dist/OverlayGeneralCardsSection.js +58 -50
  49. package/dist/ProductsWithBannerSection.cjs +10 -10
  50. package/dist/ProductsWithBannerSection.js +79 -70
  51. package/dist/QuattroCardsSection.cjs +8 -8
  52. package/dist/QuattroCardsSection.js +62 -40
  53. package/dist/ReviewsSection.cjs +8 -8
  54. package/dist/ReviewsSection.js +92 -67
  55. package/dist/SalesCampaignsSection.cjs +18 -18
  56. package/dist/SalesCampaignsSection.js +304 -298
  57. package/dist/ShopCardsSection.cjs +3 -3
  58. package/dist/ShopCardsSection.js +25 -23
  59. package/dist/SimpleCategoriesSection.cjs +4 -4
  60. package/dist/SimpleCategoriesSection.js +25 -22
  61. package/dist/SimpleProductsSection.cjs +3 -3
  62. package/dist/SimpleProductsSection.js +53 -50
  63. package/dist/UrgentSaleProductsSection.cjs +4 -4
  64. package/dist/UrgentSaleProductsSection.js +41 -38
  65. package/dist/{index-CA59z2ge.js → index-9inVkeN6.js} +46 -40
  66. package/dist/{index-C8QkdNHi.js → index-BB63Jo6p.js} +42 -36
  67. package/dist/{index-DHV9awrE.cjs → index-BFc3nxYZ.cjs} +3 -3
  68. package/dist/{index-MiN854X_.cjs → index-BWE-RCPy.cjs} +6 -6
  69. package/dist/index-Coo0aVuh.cjs +362 -0
  70. package/dist/{index-BipuzfLW.js → index-DMHtIdm-.js} +39 -29
  71. package/dist/{index-0p_3g3pT.cjs → index-D_5jNP-o.cjs} +3 -3
  72. package/dist/{index-DZ8515cZ.js → index-PhMLWAC1.js} +277 -172
  73. package/package.json +1 -1
  74. package/dist/index-Bmr3IeZ_.cjs +0 -308
@@ -1,24 +1,24 @@
1
- import { jsxs as n, jsx as t, Fragment as y } from "react/jsx-runtime";
2
- import { forwardRef as B, useRef as F, Suspense as O, memo as j, useMemo as A } from "react";
3
- import { s as f } from "./emotion-styled.browser.esm-BNN1dTl3.js";
4
- import { M as v } from "./consts-BuFChS64.js";
5
- import { u as E } from "./useDetectMobile-Bkvj0VMa.js";
6
- import { o as U, k as S } from "./utils-Dc5zIpaz.js";
7
- import { T as D } from "./style-C7FUSHmS.js";
8
- import K from "./Button.js";
9
- import G from "./Link.js";
10
- import { P as H } from "./index-C_NnINik.js";
11
- import { S as P } from "./index-BGiZlEQt.js";
12
- import { S as X, a as N, b as s } from "./style-CXMUA6cI.js";
13
- const Z = f.div`
1
+ import { jsxs as a, jsx as t, Fragment as _ } from "react/jsx-runtime";
2
+ import { forwardRef as L, useRef as O, Suspense as j, memo as A, useMemo as E } from "react";
3
+ import { s as w } from "./emotion-styled.browser.esm-BNN1dTl3.js";
4
+ import { M as $ } from "./consts-BuFChS64.js";
5
+ import { u as U } from "./useDetectMobile-Bkvj0VMa.js";
6
+ import { o as D, k as C } from "./utils-Dc5zIpaz.js";
7
+ import { T as K } from "./style-C7FUSHmS.js";
8
+ import G from "./Button.js";
9
+ import H from "./Link.js";
10
+ import { P } from "./index-C_NnINik.js";
11
+ import { S as X } from "./index-BGiZlEQt.js";
12
+ import { S as Z, a as y, b as s } from "./style-CXMUA6cI.js";
13
+ const q = w.div`
14
14
  display: grid;
15
15
  grid-template-columns: ${(r) => `repeat(${r.limit}, minmax(0, 1fr))`};
16
16
  gap: 1.25rem;
17
17
 
18
- @media (max-width: ${v + "px"}) {
18
+ @media (max-width: ${$ + "px"}) {
19
19
  grid-template-columns: repeat(1, 1fr);
20
20
  }
21
- `, q = f.a`
21
+ `, J = w.a`
22
22
  text-decoration: none;
23
23
  color: var(--gray-950);
24
24
  display: flex;
@@ -51,9 +51,9 @@ const Z = f.div`
51
51
  margin-top: auto;
52
52
  }
53
53
 
54
- @media (max-width: ${v + "px"}) {
54
+ @media (max-width: ${$ + "px"}) {
55
55
  }
56
- `, J = f.div`
56
+ `, Q = w.div`
57
57
  display: flex;
58
58
  flex-direction: column;
59
59
  gap: 0.5rem;
@@ -68,33 +68,44 @@ const Z = f.div`
68
68
  font-weight: 400;
69
69
  font-size: 0.875rem;
70
70
  color: var(--gray-700, #4e555f);
71
- ${U(3)}
71
+ ${D(3)}
72
72
  }
73
- `, Q = B((r, p) => {
74
- const { title: l, imageUrl: d, text: a, buttonText: h, onCardClick: m, metadata: o, link: b } = r, u = F(), c = (g) => {
75
- m(g, u);
73
+ `, V = L((r, h) => {
74
+ const {
75
+ title: l,
76
+ imageUrl: m,
77
+ text: n,
78
+ buttonText: u,
79
+ onCardClick: c,
80
+ metadata: o,
81
+ link: d,
82
+ LinkComponent: g
83
+ } = r, f = g || "a", p = O(), b = (k) => {
84
+ c(k, p);
76
85
  };
77
- return /* @__PURE__ */ n(
78
- q,
86
+ return /* @__PURE__ */ a(
87
+ J,
79
88
  {
80
- ref: u,
89
+ ref: p,
81
90
  name: o == null ? void 0 : o.name,
82
91
  "data-accessor": o == null ? void 0 : o.accessor,
83
92
  className: "blog-card",
84
- onClick: c,
85
- href: `/${b}`,
93
+ onClick: b,
94
+ to: `/${d}`,
95
+ as: f,
96
+ ...g ? { to: `/${d}` } : { href: `/${d}` },
86
97
  children: [
87
- /* @__PURE__ */ n(J, { children: [
98
+ /* @__PURE__ */ a(Q, { children: [
88
99
  /* @__PURE__ */ t("div", { className: "text-wr-title", children: l }),
89
- /* @__PURE__ */ t("div", { className: "text-wr", children: a }),
90
- /* @__PURE__ */ t(G, { color: "gray", onClick: c, children: h })
100
+ /* @__PURE__ */ t("div", { className: "text-wr", children: n }),
101
+ /* @__PURE__ */ t(H, { color: "gray", onClick: b, children: u })
91
102
  ] }),
92
- /* @__PURE__ */ t(H, { src: d })
103
+ /* @__PURE__ */ t(P, { src: m })
93
104
  ]
94
105
  }
95
106
  );
96
- }), V = f(X)`
97
- @media (max-width: ${v + "px"}) {
107
+ }), Y = w(Z)`
108
+ @media (max-width: ${$ + "px"}) {
98
109
  & .skeleton__tags {
99
110
  & > div {
100
111
  width: 100%;
@@ -116,8 +127,8 @@ const Z = f.div`
116
127
  }
117
128
  }
118
129
  }
119
- `, Y = ({ keyPrefix: r }) => /* @__PURE__ */ n(V, { children: [
120
- /* @__PURE__ */ n(N, { className: "skeleton__tags", children: [
130
+ `, x = ({ keyPrefix: r }) => /* @__PURE__ */ a(Y, { children: [
131
+ /* @__PURE__ */ a(y, { className: "skeleton__tags", children: [
121
132
  /* @__PURE__ */ t(
122
133
  s,
123
134
  {
@@ -146,7 +157,7 @@ const Z = f.div`
146
157
  `${r}-3`
147
158
  )
148
159
  ] }),
149
- /* @__PURE__ */ n(N, { className: "skeleton__cards", children: [
160
+ /* @__PURE__ */ a(y, { className: "skeleton__cards", children: [
150
161
  /* @__PURE__ */ t(
151
162
  s,
152
163
  {
@@ -172,100 +183,103 @@ const Z = f.div`
172
183
  `${r}-6`
173
184
  )
174
185
  ] })
175
- ] }), x = ({
186
+ ] }), ee = ({
176
187
  keyPrefix: r,
177
- isLoading: p = !1,
178
- fallbackComponent: l = /* @__PURE__ */ t(y, {}),
179
- children: d
180
- }) => /* @__PURE__ */ t(O, { fallbackComponent: l, children: p === !0 ? /* @__PURE__ */ t(Y, { keyPrefix: r }) : d }), W = j(Q), pe = B((r, p) => {
188
+ isLoading: h = !1,
189
+ fallbackComponent: l = /* @__PURE__ */ t(_, {}),
190
+ children: m
191
+ }) => /* @__PURE__ */ t(j, { fallbackComponent: l, children: h === !0 ? /* @__PURE__ */ t(x, { keyPrefix: r }) : m }), B = A(V), he = L((r, h) => {
181
192
  const {
182
193
  icon: l,
183
- title: d,
184
- items: a,
185
- buttonText: h,
186
- limit: m = 3,
194
+ title: m,
195
+ items: n,
196
+ buttonText: u,
197
+ limit: c = 3,
187
198
  options: o,
188
- selectedOption: b = [],
189
- onButtonAction: u = () => {
199
+ selectedOption: d = [],
200
+ onButtonAction: g = () => {
190
201
  },
191
- buttonLink: c,
192
- onSelectOption: g = () => {
202
+ buttonLink: f,
203
+ onSelectOption: p = () => {
193
204
  },
194
- onSelectAll: _ = () => {
205
+ onSelectAll: b = () => {
195
206
  },
196
- isLoading: C = !1,
207
+ isLoading: k = !1,
197
208
  onSelectCard: R = () => {
198
209
  },
199
210
  productsToolbarName: M = "All",
200
211
  allButton: z = !1,
201
- componentName: $
202
- } = r, T = E(), I = A(() => {
212
+ componentName: T,
213
+ LinkComponent: N
214
+ } = r, W = U(), I = E(() => {
203
215
  var i;
204
- return /* @__PURE__ */ t(y, { children: T === !0 ? a == null ? void 0 : a.map((e, w) => /* @__PURE__ */ t(
205
- W,
216
+ return /* @__PURE__ */ t(_, { children: W === !0 ? n == null ? void 0 : n.map((e, S) => /* @__PURE__ */ t(
217
+ B,
206
218
  {
207
219
  title: e == null ? void 0 : e.title,
208
220
  imageUrl: (e == null ? void 0 : e.image) || null,
209
221
  text: e == null ? void 0 : e.text,
210
222
  buttonText: e == null ? void 0 : e.buttonText,
211
- onCardClick: (L, k) => R(e, k),
212
- metadata: { name: $, accessor: e == null ? void 0 : e.accessor },
213
- link: e == null ? void 0 : e.link
223
+ onCardClick: (F, v) => R(e, v),
224
+ metadata: { name: T, accessor: e == null ? void 0 : e.accessor },
225
+ link: e == null ? void 0 : e.link,
226
+ LinkComponent: N
214
227
  },
215
- w
216
- )) : (i = a == null ? void 0 : a.slice(0, m)) == null ? void 0 : i.map((e, w) => /* @__PURE__ */ t(
217
- W,
228
+ S
229
+ )) : (i = n == null ? void 0 : n.slice(0, c)) == null ? void 0 : i.map((e, S) => /* @__PURE__ */ t(
230
+ B,
218
231
  {
219
232
  title: e == null ? void 0 : e.title,
220
233
  imageUrl: (e == null ? void 0 : e.image) || null,
221
234
  text: e == null ? void 0 : e.text,
222
235
  buttonText: e == null ? void 0 : e.buttonText,
223
- onCardClick: (L, k) => R(e, k),
224
- metadata: { name: $, accessor: e == null ? void 0 : e.accessor },
225
- link: e == null ? void 0 : e.link
236
+ onCardClick: (F, v) => R(e, v),
237
+ metadata: { name: T, accessor: e == null ? void 0 : e.accessor },
238
+ link: e == null ? void 0 : e.link,
239
+ LinkComponent: N
226
240
  },
227
- w
241
+ S
228
242
  )) });
229
- }, [a, T, m]);
230
- return /* @__PURE__ */ n(D, { ref: p, children: [
231
- /* @__PURE__ */ n("div", { className: "regular-title", children: [
232
- /* @__PURE__ */ n("div", { className: "regular-title-text", children: [
233
- S(l) && /* @__PURE__ */ t("i", { className: l }),
234
- /* @__PURE__ */ t("span", { children: d })
243
+ }, [n, W, c]);
244
+ return /* @__PURE__ */ a(K, { ref: h, children: [
245
+ /* @__PURE__ */ a("div", { className: "regular-title", children: [
246
+ /* @__PURE__ */ a("div", { className: "regular-title-text", children: [
247
+ C(l) && /* @__PURE__ */ t("i", { className: l }),
248
+ /* @__PURE__ */ t("span", { children: m })
235
249
  ] }),
236
- S(h) && S(c) && !C && /* @__PURE__ */ t(
237
- K,
250
+ C(u) && C(f) && !k && /* @__PURE__ */ t(
251
+ G,
238
252
  {
239
253
  type: "button",
240
254
  btnType: "tinted",
241
255
  color: "neutral",
242
256
  onClick: (i) => {
243
257
  var e;
244
- (e = i == null ? void 0 : i.target) == null || e.blur(), u(c);
258
+ (e = i == null ? void 0 : i.target) == null || e.blur(), g(f);
245
259
  },
246
260
  borderRadius: "curved",
247
- children: h
261
+ children: u
248
262
  }
249
263
  )
250
264
  ] }),
251
- /* @__PURE__ */ n(
252
- x,
265
+ /* @__PURE__ */ a(
266
+ ee,
253
267
  {
254
- isLoading: C,
268
+ isLoading: k,
255
269
  keyPrefix: "blogs-with-filters-skeleton",
256
270
  children: [
257
271
  (o == null ? void 0 : o.length) > 0 && /* @__PURE__ */ t(
258
- P,
272
+ X,
259
273
  {
260
274
  items: o,
261
- selectedIds: b,
275
+ selectedIds: d,
262
276
  onRemove: (i) => {
263
- g(i);
277
+ p(i);
264
278
  },
265
279
  onSelect: (i) => {
266
- g(i);
280
+ p(i);
267
281
  },
268
- onSelectAll: _,
282
+ onSelectAll: b,
269
283
  labelKey: "name",
270
284
  valueKey: "code",
271
285
  noMargin: !0,
@@ -273,12 +287,12 @@ const Z = f.div`
273
287
  allButton: z
274
288
  }
275
289
  ),
276
- /* @__PURE__ */ t(Z, { limit: m, children: I })
290
+ /* @__PURE__ */ t(q, { limit: c, children: I })
277
291
  ]
278
292
  }
279
293
  )
280
294
  ] });
281
295
  });
282
296
  export {
283
- pe as default
297
+ he as default
284
298
  };
@@ -1,4 +1,4 @@
1
- "use strict";const e=require("react/jsx-runtime"),c=require("react"),w=require("./utils-RnrgDDZP.cjs"),h=require("./emotion-styled.browser.esm-BtEseadx.cjs"),p=require("./consts-goSZX3xP.cjs"),i=require("./style-BAcV7F53.cjs"),x=h.styled.a`
1
+ "use strict";const e=require("react/jsx-runtime"),p=require("react"),_=require("./utils-RnrgDDZP.cjs"),m=require("./emotion-styled.browser.esm-BtEseadx.cjs"),g=require("./consts-goSZX3xP.cjs"),o=require("./style-BAcV7F53.cjs"),x=m.styled.a`
2
2
  text-decoration: none;
3
3
  color: var(--gray-950);
4
4
  width: 7.5rem;
@@ -14,7 +14,7 @@
14
14
  height: auto;
15
15
  }
16
16
 
17
- @media (max-width: ${p.MOBILE_SIZE_PX+"px"}) {
17
+ @media (max-width: ${g.MOBILE_SIZE_PX+"px"}) {
18
18
  width: 4.5rem;
19
19
  height: auto;
20
20
  max-height: 4.5rem;
@@ -24,7 +24,7 @@
24
24
  height: auto;
25
25
  }
26
26
  }
27
- `,_=c.forwardRef(({imageComponent:r,image:n,onSelectCard:a,urlPrefix:s,urlSufix:o,code:l},d)=>e.jsx(x,{ref:d,onClick:a,href:`${s}${l}${o}`,children:w.isDefined(r)?r:e.jsx("img",{src:n,className:"wrapper__image"})})),u=h.styled.div`
27
+ `,u=p.forwardRef(({imageComponent:r,image:n,onSelectCard:a,urlPrefix:i,urlSufix:s,code:l,LinkComponent:d},c)=>{const h=d||"a";return e.jsx(x,{ref:c,onClick:a,as:h,...d?{to:`${i}${l}${s}`}:{href:`${i}${l}${s}`},children:_.isDefined(r)?r:e.jsx("img",{src:n,className:"wrapper__image"})})}),j=m.styled.div`
28
28
  display: flex;
29
29
  flex-direction: column;
30
30
  align-items: flex-start;
@@ -73,7 +73,7 @@
73
73
  }
74
74
  }
75
75
 
76
- @media (max-width: ${p.MOBILE_SIZE_PX+"px"}) {
76
+ @media (max-width: ${g.MOBILE_SIZE_PX+"px"}) {
77
77
  & .wrapper__content {
78
78
  align-content: center;
79
79
  gap: 1rem;
@@ -84,9 +84,9 @@
84
84
  }
85
85
  }
86
86
  }
87
- `,f=h.styled(i.SkeletonRowWrapper)`
88
- @media (max-width: ${p.MOBILE_SIZE_PX+"px"}) {
87
+ `,f=m.styled(o.SkeletonRowWrapper)`
88
+ @media (max-width: ${g.MOBILE_SIZE_PX+"px"}) {
89
89
  gap: 1rem;
90
90
  flex-wrap: wrap;
91
91
  }
92
- `,j=({keyPrefix:r})=>e.jsxs(f,{justifyContent:"center",alignItems:"center",gap:"3rem",children:[e.jsx(i.SkeletonLinePlaceholder,{height:"4rem",width:"7.5rem",borderRadius:"0.75rem"},`${r}-1`),e.jsx(i.SkeletonLinePlaceholder,{height:"4rem",width:"7.5rem",borderRadius:"0.75rem"},`${r}-2`),e.jsx(i.SkeletonLinePlaceholder,{height:"4rem",width:"7.5rem",borderRadius:"0.75rem"},`${r}-3`),e.jsx(i.SkeletonLinePlaceholder,{height:"4rem",width:"7.5rem",borderRadius:"0.75rem"},`${r}-4`),e.jsx(i.SkeletonLinePlaceholder,{height:"4rem",width:"7.5rem",borderRadius:"0.75rem"},`${r}-5`)]}),$=({keyPrefix:r,isLoading:n=!1,fallbackComponent:a=e.jsx(e.Fragment,{}),children:s})=>e.jsx(c.Suspense,{fallbackComponent:a,children:n===!0?e.jsx(j,{keyPrefix:r}):s}),y=c.forwardRef(({title:r,subtitle:n,items:a=[],isLoading:s=!1,onSelectCard:o=()=>{},urlPrefix:l,urlSufix:d},m)=>e.jsxs(u,{ref:m,children:[e.jsxs("div",{className:"wrapper__heading",children:[r&&e.jsx("div",{className:"wrapper__title",children:r}),n&&e.jsx("div",{className:"wrapper__subtitle",children:n})]}),e.jsx($,{isLoading:s,keyPrefix:"brand-hits-skeleton",children:e.jsx("div",{className:"wrapper__content",children:a==null?void 0:a.map((t,g)=>e.jsx(_,{image:t==null?void 0:t.image,imageComponent:t==null?void 0:t.imageComponent,onSelectCard:()=>o==null?void 0:o(t),className:"wrapper__item",urlPrefix:l,urlSufix:d,code:t==null?void 0:t.card},`brand-hit-card__${g+1}`))})})]}));module.exports=y;
92
+ `,$=({keyPrefix:r})=>e.jsxs(f,{justifyContent:"center",alignItems:"center",gap:"3rem",children:[e.jsx(o.SkeletonLinePlaceholder,{height:"4rem",width:"7.5rem",borderRadius:"0.75rem"},`${r}-1`),e.jsx(o.SkeletonLinePlaceholder,{height:"4rem",width:"7.5rem",borderRadius:"0.75rem"},`${r}-2`),e.jsx(o.SkeletonLinePlaceholder,{height:"4rem",width:"7.5rem",borderRadius:"0.75rem"},`${r}-3`),e.jsx(o.SkeletonLinePlaceholder,{height:"4rem",width:"7.5rem",borderRadius:"0.75rem"},`${r}-4`),e.jsx(o.SkeletonLinePlaceholder,{height:"4rem",width:"7.5rem",borderRadius:"0.75rem"},`${r}-5`)]}),y=({keyPrefix:r,isLoading:n=!1,fallbackComponent:a=e.jsx(e.Fragment,{}),children:i})=>e.jsx(p.Suspense,{fallbackComponent:a,children:n===!0?e.jsx($,{keyPrefix:r}):i}),v=p.forwardRef(({title:r,subtitle:n,items:a=[],isLoading:i=!1,onSelectCard:s=()=>{},urlPrefix:l,urlSufix:d,LinkComponent:c},h)=>e.jsxs(j,{ref:h,children:[e.jsxs("div",{className:"wrapper__heading",children:[r&&e.jsx("div",{className:"wrapper__title",children:r}),n&&e.jsx("div",{className:"wrapper__subtitle",children:n})]}),e.jsx(y,{isLoading:i,keyPrefix:"brand-hits-skeleton",children:e.jsx("div",{className:"wrapper__content",children:a==null?void 0:a.map((t,w)=>e.jsx(u,{image:t==null?void 0:t.image,imageComponent:t==null?void 0:t.imageComponent,onSelectCard:()=>s==null?void 0:s(t),className:"wrapper__item",urlPrefix:l,urlSufix:d,code:t==null?void 0:t.card,LinkComponent:c},`brand-hit-card__${w+1}`))})})]}));module.exports=v;
@@ -1,10 +1,10 @@
1
- import { jsx as e, jsxs as s, Fragment as _ } from "react/jsx-runtime";
2
- import { forwardRef as c, Suspense as f } from "react";
3
- import { l as u } from "./utils-Dc5zIpaz.js";
4
- import { s as h } from "./emotion-styled.browser.esm-BNN1dTl3.js";
5
- import { M as l } from "./consts-BuFChS64.js";
6
- import { a as x, b as p } from "./style-CXMUA6cI.js";
7
- const $ = h.a`
1
+ import { jsx as e, jsxs as h, Fragment as f } from "react/jsx-runtime";
2
+ import { forwardRef as w, Suspense as u } from "react";
3
+ import { l as x } from "./utils-Dc5zIpaz.js";
4
+ import { s as l } from "./emotion-styled.browser.esm-BNN1dTl3.js";
5
+ import { M as c } from "./consts-BuFChS64.js";
6
+ import { a as $, b as p } from "./style-CXMUA6cI.js";
7
+ const v = l.a`
8
8
  text-decoration: none;
9
9
  color: var(--gray-950);
10
10
  width: 7.5rem;
@@ -20,7 +20,7 @@ const $ = h.a`
20
20
  height: auto;
21
21
  }
22
22
 
23
- @media (max-width: ${l + "px"}) {
23
+ @media (max-width: ${c + "px"}) {
24
24
  width: 4.5rem;
25
25
  height: auto;
26
26
  max-height: 4.5rem;
@@ -30,9 +30,26 @@ const $ = h.a`
30
30
  height: auto;
31
31
  }
32
32
  }
33
- `, v = c(
34
- ({ imageComponent: r, image: i, onSelectCard: t, urlPrefix: n, urlSufix: o, code: d }, m) => /* @__PURE__ */ e($, { ref: m, onClick: t, href: `${n}${d}${o}`, children: u(r) ? r : /* @__PURE__ */ e("img", { src: i, className: "wrapper__image" }) })
35
- ), b = h.div`
33
+ `, b = w(
34
+ ({
35
+ imageComponent: r,
36
+ image: n,
37
+ onSelectCard: t,
38
+ urlPrefix: i,
39
+ urlSufix: o,
40
+ code: s,
41
+ LinkComponent: m
42
+ }, d) => /* @__PURE__ */ e(
43
+ v,
44
+ {
45
+ ref: d,
46
+ onClick: t,
47
+ as: m || "a",
48
+ ...m ? { to: `${i}${s}${o}` } : { href: `${i}${s}${o}` },
49
+ children: x(r) ? r : /* @__PURE__ */ e("img", { src: n, className: "wrapper__image" })
50
+ }
51
+ )
52
+ ), y = l.div`
36
53
  display: flex;
37
54
  flex-direction: column;
38
55
  align-items: flex-start;
@@ -81,7 +98,7 @@ const $ = h.a`
81
98
  }
82
99
  }
83
100
 
84
- @media (max-width: ${l + "px"}) {
101
+ @media (max-width: ${c + "px"}) {
85
102
  & .wrapper__content {
86
103
  align-content: center;
87
104
  gap: 1rem;
@@ -92,12 +109,12 @@ const $ = h.a`
92
109
  }
93
110
  }
94
111
  }
95
- `, y = h(x)`
96
- @media (max-width: ${l + "px"}) {
112
+ `, R = l($)`
113
+ @media (max-width: ${c + "px"}) {
97
114
  gap: 1rem;
98
115
  flex-wrap: wrap;
99
116
  }
100
- `, R = ({ keyPrefix: r }) => /* @__PURE__ */ s(y, { justifyContent: "center", alignItems: "center", gap: "3rem", children: [
117
+ `, N = ({ keyPrefix: r }) => /* @__PURE__ */ h(R, { justifyContent: "center", alignItems: "center", gap: "3rem", children: [
101
118
  /* @__PURE__ */ e(
102
119
  p,
103
120
  {
@@ -143,40 +160,41 @@ const $ = h.a`
143
160
  },
144
161
  `${r}-5`
145
162
  )
146
- ] }), N = ({
163
+ ] }), B = ({
147
164
  keyPrefix: r,
148
- isLoading: i = !1,
149
- fallbackComponent: t = /* @__PURE__ */ e(_, {}),
150
- children: n
151
- }) => /* @__PURE__ */ e(f, { fallbackComponent: t, children: i === !0 ? /* @__PURE__ */ e(R, { keyPrefix: r }) : n }), k = c(
152
- ({ title: r, subtitle: i, items: t = [], isLoading: n = !1, onSelectCard: o = () => {
153
- }, urlPrefix: d, urlSufix: m }, g) => /* @__PURE__ */ s(b, { ref: g, children: [
154
- /* @__PURE__ */ s("div", { className: "wrapper__heading", children: [
165
+ isLoading: n = !1,
166
+ fallbackComponent: t = /* @__PURE__ */ e(f, {}),
167
+ children: i
168
+ }) => /* @__PURE__ */ e(u, { fallbackComponent: t, children: n === !0 ? /* @__PURE__ */ e(N, { keyPrefix: r }) : i }), z = w(
169
+ ({ title: r, subtitle: n, items: t = [], isLoading: i = !1, onSelectCard: o = () => {
170
+ }, urlPrefix: s, urlSufix: m, LinkComponent: d }, g) => /* @__PURE__ */ h(y, { ref: g, children: [
171
+ /* @__PURE__ */ h("div", { className: "wrapper__heading", children: [
155
172
  r && /* @__PURE__ */ e("div", { className: "wrapper__title", children: r }),
156
- i && /* @__PURE__ */ e("div", { className: "wrapper__subtitle", children: i })
173
+ n && /* @__PURE__ */ e("div", { className: "wrapper__subtitle", children: n })
157
174
  ] }),
158
175
  /* @__PURE__ */ e(
159
- N,
176
+ B,
160
177
  {
161
- isLoading: n,
178
+ isLoading: i,
162
179
  keyPrefix: "brand-hits-skeleton",
163
- children: /* @__PURE__ */ e("div", { className: "wrapper__content", children: t == null ? void 0 : t.map((a, w) => /* @__PURE__ */ e(
164
- v,
180
+ children: /* @__PURE__ */ e("div", { className: "wrapper__content", children: t == null ? void 0 : t.map((a, _) => /* @__PURE__ */ e(
181
+ b,
165
182
  {
166
183
  image: a == null ? void 0 : a.image,
167
184
  imageComponent: a == null ? void 0 : a.imageComponent,
168
185
  onSelectCard: () => o == null ? void 0 : o(a),
169
186
  className: "wrapper__item",
170
- urlPrefix: d,
187
+ urlPrefix: s,
171
188
  urlSufix: m,
172
- code: a == null ? void 0 : a.card
189
+ code: a == null ? void 0 : a.card,
190
+ LinkComponent: d
173
191
  },
174
- `brand-hit-card__${w + 1}`
192
+ `brand-hit-card__${_ + 1}`
175
193
  )) })
176
194
  }
177
195
  )
178
196
  ] })
179
197
  );
180
198
  export {
181
- k as default
199
+ z as default
182
200
  };
@@ -1,9 +1,9 @@
1
- import { jsxs as h, jsx as r } from "react/jsx-runtime";
1
+ import { jsxs as p, jsx as r } from "react/jsx-runtime";
2
2
  import { forwardRef as g } from "react";
3
3
  import { s as l } from "./emotion-styled.browser.esm-BNN1dTl3.js";
4
- import { o as e } from "./utils-Dc5zIpaz.js";
5
- import { M as p } from "./consts-BuFChS64.js";
6
- const x = l.a`
4
+ import { o as a } from "./utils-Dc5zIpaz.js";
5
+ import { M as x } from "./consts-BuFChS64.js";
6
+ const f = l.a`
7
7
  text-decoration: none;
8
8
  display: flex;
9
9
  flex-direction: column;
@@ -26,11 +26,11 @@ const x = l.a`
26
26
 
27
27
  & .card-content {
28
28
  padding: 0.75rem;
29
- ${e(2)}
29
+ ${a(2)}
30
30
  }
31
31
 
32
32
  & .card-content-2 {
33
- ${e(2)}
33
+ ${a(2)}
34
34
  }
35
35
 
36
36
  & img {
@@ -40,7 +40,7 @@ const x = l.a`
40
40
  max-height: 8.25rem;
41
41
  }
42
42
 
43
- @media (max-width: ${p + "px"}) {
43
+ @media (max-width: ${x + "px"}) {
44
44
  min-width: 8.75rem;
45
45
  max-width: 8.75rem;
46
46
 
@@ -50,19 +50,20 @@ const x = l.a`
50
50
  max-height: 5.375rem;
51
51
  }
52
52
  }
53
- `, y = g((i, o) => {
54
- const { image: a, name: t, urlPrefix: m, urlSufix: n, code: d, uuid: c, onSelectCard: s = () => {
55
- } } = i;
56
- return /* @__PURE__ */ h(
57
- x,
53
+ `, y = g((n, m) => {
54
+ const { image: d, name: s, urlPrefix: e, urlSufix: o, code: t, uuid: c, onSelectCard: h = () => {
55
+ }, LinkComponent: i } = n;
56
+ return /* @__PURE__ */ p(
57
+ f,
58
58
  {
59
- ref: o,
59
+ ref: m,
60
60
  className: "simple-category-card",
61
- onClick: () => s(c),
62
- href: `${m}${d}${n}`,
61
+ onClick: () => h(c),
62
+ as: i || "a",
63
+ ...i ? { to: `${e}${t}${o}` } : { href: `${e}${t}${o}` },
63
64
  children: [
64
- /* @__PURE__ */ r("img", { src: a }),
65
- /* @__PURE__ */ r("div", { className: "card-content", children: /* @__PURE__ */ r("div", { className: "card-content-2", children: t }) })
65
+ /* @__PURE__ */ r("img", { src: d }),
66
+ /* @__PURE__ */ r("div", { className: "card-content", children: /* @__PURE__ */ r("div", { className: "card-content-2", children: s }) })
66
67
  ]
67
68
  }
68
69
  );
@@ -1,4 +1,4 @@
1
- "use strict";const e=require("react/jsx-runtime"),h=require("react"),l=require("./emotion-styled.browser.esm-BtEseadx.cjs"),r=require("./utils-RnrgDDZP.cjs"),x=require("./consts-goSZX3xP.cjs"),g=l.styled.a`
1
+ "use strict";const e=require("react/jsx-runtime"),x=require("react"),g=require("./emotion-styled.browser.esm-BtEseadx.cjs"),n=require("./utils-RnrgDDZP.cjs"),u=require("./consts-goSZX3xP.cjs"),p=g.styled.a`
2
2
  text-decoration: none;
3
3
  display: flex;
4
4
  flex-direction: column;
@@ -21,11 +21,11 @@
21
21
 
22
22
  & .card-content {
23
23
  padding: 0.75rem;
24
- ${r.truncateTextInRows(2)}
24
+ ${n.truncateTextInRows(2)}
25
25
  }
26
26
 
27
27
  & .card-content-2 {
28
- ${r.truncateTextInRows(2)}
28
+ ${n.truncateTextInRows(2)}
29
29
  }
30
30
 
31
31
  & img {
@@ -35,7 +35,7 @@
35
35
  max-height: 8.25rem;
36
36
  }
37
37
 
38
- @media (max-width: ${x.MOBILE_SIZE_PX+"px"}) {
38
+ @media (max-width: ${u.MOBILE_SIZE_PX+"px"}) {
39
39
  min-width: 8.75rem;
40
40
  max-width: 8.75rem;
41
41
 
@@ -45,4 +45,4 @@
45
45
  max-height: 5.375rem;
46
46
  }
47
47
  }
48
- `,u=h.forwardRef((t,i)=>{const{image:a,name:o,urlPrefix:n,urlSufix:s,code:c,uuid:d,onSelectCard:m=()=>{}}=t;return e.jsxs(g,{ref:i,className:"simple-category-card",onClick:()=>m(d),href:`${n}${c}${s}`,children:[e.jsx("img",{src:a}),e.jsx("div",{className:"card-content",children:e.jsx("div",{className:"card-content-2",children:o})})]})});exports.CategorySimpleCard=u;
48
+ `,f=x.forwardRef((a,s)=>{const{image:c,name:m,urlPrefix:r,urlSufix:t,code:i,uuid:d,onSelectCard:h=()=>{},LinkComponent:o}=a,l=o||"a";return e.jsxs(p,{ref:s,className:"simple-category-card",onClick:()=>h(d),as:l,...o?{to:`${r}${i}${t}`}:{href:`${r}${i}${t}`},children:[e.jsx("img",{src:c}),e.jsx("div",{className:"card-content",children:e.jsx("div",{className:"card-content-2",children:m})})]})});exports.CategorySimpleCard=f;
@@ -1,4 +1,4 @@
1
- "use strict";const t=require("react/jsx-runtime"),a=require("react"),M=require("./emotion-styled.browser.esm-BtEseadx.cjs"),B=require("./consts-goSZX3xP.cjs"),E=require("./IconButton.cjs"),I=require("./Button.cjs"),r=require("./utils-RnrgDDZP.cjs"),L=require("./useDetectMobile-zkbzoOGV.cjs"),g=require("./index-Bmr3IeZ_.cjs"),T=M.styled.div`
1
+ "use strict";const t=require("react/jsx-runtime"),a=require("react"),B=require("./emotion-styled.browser.esm-BtEseadx.cjs"),E=require("./consts-goSZX3xP.cjs"),I=require("./IconButton.cjs"),L=require("./Button.cjs"),n=require("./utils-RnrgDDZP.cjs"),T=require("./useDetectMobile-zkbzoOGV.cjs"),g=require("./index-Coo0aVuh.cjs"),z=B.styled.div`
2
2
  display: flex;
3
3
  flex-direction: column;
4
4
  gap: 1.5rem;
@@ -23,7 +23,7 @@
23
23
 
24
24
  & .section__items {
25
25
  display: grid;
26
- grid-template-columns: ${n=>`repeat(${n.limit}, minmax(0, 1fr))`};
26
+ grid-template-columns: ${r=>`repeat(${r.limit}, minmax(0, 1fr))`};
27
27
  gap: 2rem;
28
28
  }
29
29
 
@@ -47,7 +47,7 @@
47
47
  white-space: nowrap;
48
48
  }
49
49
 
50
- @media (max-width: ${B.MOBILE_SIZE_PX+"px"}) {
50
+ @media (max-width: ${E.MOBILE_SIZE_PX+"px"}) {
51
51
  gap: 1.25rem;
52
52
 
53
53
  & .section__items {
@@ -70,4 +70,4 @@
70
70
  }
71
71
  }
72
72
  }
73
- `,z=a.memo(g.DetailedProductCard),R=a.forwardRef((n,p)=>{const{title:l,icon:c,items:i,limit:f=4,isLoading:s=!1,onSelectCard:b=()=>{},onLoadMore:h=()=>{},onButtonAction:w=()=>{},getImage:y=()=>{},viewAllbuttonLink:d,viewAllButonText:m="View all",negotiableText:_,freeText:k,loadMoreButtonIcon:v="angle-down",sponsoredText:S,onBookmark:C=()=>{},actionComponent:N,componentName:j,hasNextPage:q=!1}=n,u=L.useDetectMobile(),P=a.useMemo(()=>i==null?void 0:i.map((e,o)=>t.jsx(z,{name:e==null?void 0:e.name,price:e==null?void 0:e.price,sellingPrice:e==null?void 0:e.sellingPrice,currency:e==null?void 0:e.currency,image:e==null?void 0:e.image,sellerUuid:e==null?void 0:e.sellerUuid,uuid:e==null?void 0:e.uuid,sponsored:e==null?void 0:e.sponsored,imageComponent:e==null?void 0:e.imageComponent,onSelectCard:(U,D)=>b({uuid:e==null?void 0:e.uuid,nameSlug:e==null?void 0:e.nameSlug,cardRef:D}),nameSlug:e==null?void 0:e.nameSlug,imageUrl:y(e==null?void 0:e.image,e==null?void 0:e.uuid,e==null?void 0:e.sellerUuid)||null,isFree:e==null?void 0:e.isFree,isNegotiable:e==null?void 0:e.isNegotiable,negotiableText:_,freeText:k,tags:e==null?void 0:e.tags,categoryCode:e==null?void 0:e.categoryCode,condition:e==null?void 0:e.condition,quantity:e==null?void 0:e.quantity,hasQuantities:e==null?void 0:e.hasQuantities,status:e==null?void 0:e.status,trade:e==null?void 0:e.trade,sponsoredText:S,onBookmark:C,actionComponent:N,bookmarked:e==null?void 0:e.bookmarked,bookmarkLists:e==null?void 0:e.bookmarkLists,metadata:{accessor:e==null?void 0:e.accessor,name:j},sellerName:e==null?void 0:e.sellerName,forCart:e==null?void 0:e.forCart,forOrder:e==null?void 0:e.forOrder,contactSeller:e==null?void 0:e.contactSeller,hasVariants:e==null?void 0:e.hasVariants},o)),[i]);return t.jsxs(T,{ref:p,limit:f,children:[t.jsxs("div",{className:"section__heading",children:[r.isDefinedNotEmptyString(l)&&t.jsxs("div",{className:"section__title",children:[r.isDefinedNotEmptyString(c)&&t.jsx("i",{className:c})," ",l]}),u&&r.isDefinedNotEmptyString(d)&&r.isDefinedNotEmptyString(m)&&!s&&t.jsx(I,{type:"button",btnType:"tinted",color:"neutral",onClick:e=>{var o;(o=e==null?void 0:e.target)==null||o.blur(),w(d)},borderRadius:"curved",className:"section__view-all",children:m})]}),t.jsx(g.SuspenseDetailedProductCard,{isLoading:s,keyPrefix:"detailed-product-card-skeleton",children:t.jsx("div",{className:"section__items",children:P})}),!u&&!s&&q&&t.jsx(E,{icon:v,borderRadius:"curved",btnType:"basic",color:"neutral",className:"section__show-more",onClick:h})]})});module.exports=R;
73
+ `,R=a.memo(g.DetailedProductCard),U=a.forwardRef((r,p)=>{const{title:l,icon:c,items:i,limit:f=4,isLoading:s=!1,onSelectCard:b=()=>{},onLoadMore:h=()=>{},onButtonAction:w=()=>{},getImage:y=()=>{},viewAllbuttonLink:d,viewAllButonText:m="View all",negotiableText:_,freeText:k,loadMoreButtonIcon:v="angle-down",sponsoredText:C,onBookmark:S=()=>{},actionComponent:N,componentName:j,hasNextPage:q=!1,LinkComponent:P}=r,u=T.useDetectMobile(),D=a.useMemo(()=>i==null?void 0:i.map((e,o)=>t.jsx(R,{name:e==null?void 0:e.name,price:e==null?void 0:e.price,sellingPrice:e==null?void 0:e.sellingPrice,currency:e==null?void 0:e.currency,image:e==null?void 0:e.image,sellerUuid:e==null?void 0:e.sellerUuid,uuid:e==null?void 0:e.uuid,sponsored:e==null?void 0:e.sponsored,imageComponent:e==null?void 0:e.imageComponent,onSelectCard:(A,M)=>b({uuid:e==null?void 0:e.uuid,nameSlug:e==null?void 0:e.nameSlug,cardRef:M}),nameSlug:e==null?void 0:e.nameSlug,imageUrl:y(e==null?void 0:e.image,e==null?void 0:e.uuid,e==null?void 0:e.sellerUuid)||null,isFree:e==null?void 0:e.isFree,isNegotiable:e==null?void 0:e.isNegotiable,negotiableText:_,freeText:k,tags:e==null?void 0:e.tags,categoryCode:e==null?void 0:e.categoryCode,condition:e==null?void 0:e.condition,quantity:e==null?void 0:e.quantity,hasQuantities:e==null?void 0:e.hasQuantities,status:e==null?void 0:e.status,trade:e==null?void 0:e.trade,sponsoredText:C,onBookmark:S,actionComponent:N,bookmarked:e==null?void 0:e.bookmarked,bookmarkLists:e==null?void 0:e.bookmarkLists,metadata:{accessor:e==null?void 0:e.accessor,name:j},sellerName:e==null?void 0:e.sellerName,forCart:e==null?void 0:e.forCart,forOrder:e==null?void 0:e.forOrder,contactSeller:e==null?void 0:e.contactSeller,hasVariants:e==null?void 0:e.hasVariants,LinkComponent:P},o)),[i]);return t.jsxs(z,{ref:p,limit:f,children:[t.jsxs("div",{className:"section__heading",children:[n.isDefinedNotEmptyString(l)&&t.jsxs("div",{className:"section__title",children:[n.isDefinedNotEmptyString(c)&&t.jsx("i",{className:c})," ",l]}),u&&n.isDefinedNotEmptyString(d)&&n.isDefinedNotEmptyString(m)&&!s&&t.jsx(L,{type:"button",btnType:"tinted",color:"neutral",onClick:e=>{var o;(o=e==null?void 0:e.target)==null||o.blur(),w(d)},borderRadius:"curved",className:"section__view-all",children:m})]}),t.jsx(g.SuspenseDetailedProductCard,{isLoading:s,keyPrefix:"detailed-product-card-skeleton",children:t.jsx("div",{className:"section__items",children:D})}),!u&&!s&&q&&t.jsx(I,{icon:v,borderRadius:"curved",btnType:"basic",color:"neutral",className:"section__show-more",onClick:h})]})});module.exports=U;