@lanaco/lnc-react-ui 4.0.157 → 4.0.160

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 (63) hide show
  1. package/dist/BlogCardsSponsoredSection.cjs +8 -8
  2. package/dist/BlogCardsSponsoredSection.js +105 -89
  3. package/dist/BlogExploreSection.cjs +5 -5
  4. package/dist/BlogExploreSection.js +88 -84
  5. package/dist/BlogListSection.cjs +5 -5
  6. package/dist/BlogListSection.js +139 -126
  7. package/dist/BlogProductCardsSection.cjs +1 -1
  8. package/dist/BlogProductCardsSection.js +37 -35
  9. package/dist/BlogShopCardsSection.cjs +1 -1
  10. package/dist/BlogShopCardsSection.js +43 -41
  11. package/dist/BlogSingleSection.cjs +1 -1
  12. package/dist/BlogSingleSection.js +9 -4
  13. package/dist/BlogsSectionDetailed.cjs +11 -11
  14. package/dist/BlogsSectionDetailed.js +122 -108
  15. package/dist/BlogsSectionLarge.cjs +4 -4
  16. package/dist/BlogsSectionLarge.js +43 -40
  17. package/dist/BlogsSectionSimple.cjs +8 -8
  18. package/dist/BlogsSectionSimple.js +100 -86
  19. package/dist/BlogsSectionSimpleCentered.cjs +9 -9
  20. package/dist/BlogsSectionSimpleCentered.js +81 -66
  21. package/dist/BlogsSectionWithFilters.cjs +11 -11
  22. package/dist/BlogsSectionWithFilters.js +108 -93
  23. package/dist/{CustomStyles-Ajyqx0cb.cjs → CustomStyles-BwHfr4iM.cjs} +1 -1
  24. package/dist/{CustomStyles-DVcu00ul.js → CustomStyles-iconSXFL.js} +0 -1
  25. package/dist/DetailedProductsInfinitiveSection.cjs +3 -3
  26. package/dist/DetailedProductsInfinitiveSection.js +29 -27
  27. package/dist/DetailedProductsSection.cjs +3 -3
  28. package/dist/DetailedProductsSection.js +76 -65
  29. package/dist/Dropdown.cjs +1 -1
  30. package/dist/Dropdown.js +2 -2
  31. package/dist/DropdownLookup.cjs +1 -1
  32. package/dist/DropdownLookup.js +1 -1
  33. package/dist/FieldOfInterestsWithAvatarsCardsSection.cjs +1 -1
  34. package/dist/FieldOfInterestsWithAvatarsCardsSection.js +1 -1
  35. package/dist/MultiSelectDropdown.cjs +1 -1
  36. package/dist/MultiSelectDropdown.js +1 -1
  37. package/dist/MultiSelectDropdownLookup.cjs +1 -1
  38. package/dist/MultiSelectDropdownLookup.js +1 -1
  39. package/dist/ProductsWithBannerSection.cjs +10 -10
  40. package/dist/ProductsWithBannerSection.js +81 -59
  41. package/dist/SalesCampaignsSection.cjs +27 -27
  42. package/dist/SalesCampaignsSection.js +245 -239
  43. package/dist/ShopCardsSection.cjs +3 -3
  44. package/dist/ShopCardsSection.js +27 -25
  45. package/dist/SimpleProductsSection.cjs +3 -3
  46. package/dist/SimpleProductsSection.js +62 -51
  47. package/dist/UrgentSaleProductsSection.cjs +6 -6
  48. package/dist/UrgentSaleProductsSection.js +67 -56
  49. package/dist/index-1Dm1i6WK.js +52 -0
  50. package/dist/index-BGTtoLxz.cjs +1 -0
  51. package/dist/{index-CLoINIGC.cjs → index-DicTpiG0.cjs} +5 -5
  52. package/dist/{index-BGY3PSA-.js → index-y6sKgrZC.js} +45 -34
  53. package/dist/index.cjs +1 -1
  54. package/dist/index.js +1 -1
  55. package/dist/{skeleton-BWFqIToC.js → skeleton-5mO22c5S.js} +94 -84
  56. package/dist/{skeleton-CanJ6Gr6.cjs → skeleton-Ccd6EDeB.cjs} +8 -8
  57. package/dist/{suspense-product-card-detailed-BWoxabjZ.js → suspense-product-card-detailed-BZtObEfA.js} +126 -123
  58. package/dist/{suspense-product-card-detailed-DYyH_jf5.cjs → suspense-product-card-detailed-D-pjVe22.cjs} +7 -7
  59. package/dist/{suspense-product-card-simple-CrqjSxHI.cjs → suspense-product-card-simple-DJ8UYolb.cjs} +1 -1
  60. package/dist/{suspense-product-card-simple-CLJjab5B.js → suspense-product-card-simple-ziy0XcLp.js} +1 -1
  61. package/package.json +1 -1
  62. package/dist/index-Cm0f72Po.cjs +0 -1
  63. package/dist/index-DGp7FHms.js +0 -42
@@ -1,22 +1,22 @@
1
- import { jsxs as s, jsx as r, Fragment as u } from "react/jsx-runtime";
2
- import { forwardRef as h, Suspense as T, memo as $, useMemo as P } from "react";
3
- import { s as f } from "./emotion-styled.browser.esm-BNN1dTl3.js";
4
- import { M as k } from "./consts-BuFChS64.js";
5
- import { u as R } from "./useDetectMobile-Bkvj0VMa.js";
6
- import { o as z, p as I, k as b } from "./utils-BdsZgOUE.js";
7
- import { B as U, R as W } from "./style-BLuyU97E.js";
8
- import j from "./Button.js";
9
- import A from "./Link.js";
10
- import { P as E } from "./index-CF3HhgvN.js";
11
- const L = f.div`
1
+ import { jsxs as g, jsx as r, Fragment as v } from "react/jsx-runtime";
2
+ import { forwardRef as w, useRef as P, Suspense as z, memo as I, useMemo as U } from "react";
3
+ import { s as b } from "./emotion-styled.browser.esm-BNN1dTl3.js";
4
+ import { M as C } from "./consts-BuFChS64.js";
5
+ import { u as W } from "./useDetectMobile-Bkvj0VMa.js";
6
+ import { o as j, p as A, k as y } from "./utils-BdsZgOUE.js";
7
+ import { B as E, R as L } from "./style-BLuyU97E.js";
8
+ import _ from "./Button.js";
9
+ import D from "./Link.js";
10
+ import { P as G } from "./index-CF3HhgvN.js";
11
+ const F = b.div`
12
12
  display: grid;
13
13
  grid-template-columns: ${(t) => `repeat(${t.limit}, minmax(0, 1fr))`};
14
14
  gap: 1.25rem;
15
15
 
16
- @media (max-width: ${k + "px"}) {
16
+ @media (max-width: ${C + "px"}) {
17
17
  grid-template-columns: repeat(1, 1fr);
18
18
  }
19
- `, y = f.div`
19
+ `, B = b.div`
20
20
  display: flex;
21
21
  flex-direction: column;
22
22
  width: 100%;
@@ -40,7 +40,7 @@ const L = f.div`
40
40
  width: 100%;
41
41
  max-height: 12.5625rem;
42
42
  min-height: 12.5625rem;
43
- background-color: ${z("-90deg")};
43
+ background-color: ${j("-90deg")};
44
44
  }
45
45
 
46
46
  & .action {
@@ -66,9 +66,9 @@ const L = f.div`
66
66
  padding: 1rem;
67
67
  }
68
68
 
69
- @media (max-width: ${k + "px"}) {
69
+ @media (max-width: ${C + "px"}) {
70
70
  }
71
- `, C = f.div`
71
+ `, R = b.div`
72
72
  padding: 1rem 1rem 0 1rem;
73
73
  display: flex;
74
74
  flex-direction: column;
@@ -86,108 +86,122 @@ const L = f.div`
86
86
  font-size: 0.875rem;
87
87
  flex: 1;
88
88
  color: var(--gray-700, #4e555f);
89
- ${I(3)}
89
+ ${A(3)}
90
90
  }
91
- `, _ = h((t, a) => {
91
+ `, O = w((t, m) => {
92
92
  const {
93
- title: i,
94
- imageUrl: d,
93
+ title: o,
94
+ imageUrl: s,
95
95
  text: n,
96
- options: m,
97
- onCardClick: p,
98
- readMoreText: o = "Read more"
99
- } = t;
100
- return /* @__PURE__ */ s(y, { ref: a, className: "blog-card", onClick: p, children: [
101
- /* @__PURE__ */ r(E, { src: d }),
102
- /* @__PURE__ */ s(C, { children: [
103
- /* @__PURE__ */ r("div", { className: "text-wr-title", children: i }),
104
- /* @__PURE__ */ r("div", { className: "text-wr", children: n })
105
- ] }),
106
- m && /* @__PURE__ */ r("div", { className: "tags-wr", children: m == null ? void 0 : m.map((l, g) => /* @__PURE__ */ r(U, { color: l == null ? void 0 : l.color, children: l == null ? void 0 : l.name }, g)) }),
107
- /* @__PURE__ */ r(A, { className: "action", color: "gray", onClick: p, children: o })
108
- ] });
109
- }), D = h(({}, t) => (
96
+ options: c,
97
+ onCardClick: u,
98
+ readMoreText: a = "Read more",
99
+ metadata: l
100
+ } = t, d = P();
101
+ return /* @__PURE__ */ g(
102
+ B,
103
+ {
104
+ ref: d,
105
+ name: l == null ? void 0 : l.name,
106
+ "data-accessor": l == null ? void 0 : l.name,
107
+ className: "blog-card",
108
+ onClick: (i) => u(i, d),
109
+ children: [
110
+ /* @__PURE__ */ r(G, { src: s }),
111
+ /* @__PURE__ */ g(R, { children: [
112
+ /* @__PURE__ */ r("div", { className: "text-wr-title", children: o }),
113
+ /* @__PURE__ */ r("div", { className: "text-wr", children: n })
114
+ ] }),
115
+ c && /* @__PURE__ */ r("div", { className: "tags-wr", children: c == null ? void 0 : c.map((i, f) => /* @__PURE__ */ r(E, { color: i == null ? void 0 : i.color, children: i == null ? void 0 : i.name }, f)) }),
116
+ /* @__PURE__ */ r(D, { className: "action", color: "gray", onClick: u, children: a })
117
+ ]
118
+ }
119
+ );
120
+ }), X = w(({}, t) => (
110
121
  // <LandingPageClearProductCardSkeleton />
111
- /* @__PURE__ */ s(y, { className: "product-card", children: [
122
+ /* @__PURE__ */ g(B, { className: "product-card", children: [
112
123
  /* @__PURE__ */ r("div", { className: "skeleton-img" }),
113
124
  /* @__PURE__ */ r("div", { className: "card-title" }),
114
- /* @__PURE__ */ r(C, {})
125
+ /* @__PURE__ */ r(R, {})
115
126
  ] })
116
- )), G = ({ limit: t = 3, isLoading: a = !1, keyPrefix: i }) => /* @__PURE__ */ r(u, { children: Array.from({ length: t }, (d, n) => /* @__PURE__ */ r(
117
- D,
127
+ )), Z = ({ limit: t = 3, isLoading: m = !1, keyPrefix: o }) => /* @__PURE__ */ r(v, { children: Array.from({ length: t }, (s, n) => /* @__PURE__ */ r(
128
+ X,
118
129
  {
119
- isLoading: a
130
+ isLoading: m
120
131
  },
121
- `${i}-skeleton-product-card-${n}`
122
- )) }), F = ({
132
+ `${o}-skeleton-product-card-${n}`
133
+ )) }), q = ({
123
134
  children: t,
124
- fallbackComponent: a = /* @__PURE__ */ r(u, {}),
125
- isLoading: i = !1,
126
- limit: d,
135
+ fallbackComponent: m = /* @__PURE__ */ r(v, {}),
136
+ isLoading: o = !1,
137
+ limit: s,
127
138
  keyPrefix: n
128
- }) => /* @__PURE__ */ r(T, { fallbackComponent: a, children: i === !0 ? /* @__PURE__ */ r(
129
- G,
139
+ }) => /* @__PURE__ */ r(z, { fallbackComponent: m, children: o === !0 ? /* @__PURE__ */ r(
140
+ Z,
130
141
  {
131
- isLoading: i,
132
- limit: d,
142
+ isLoading: o,
143
+ limit: s,
133
144
  keyPrefix: n
134
145
  }
135
- ) : t }), S = $(_), x = h((t, a) => {
146
+ ) : t }), N = I(O), ie = w((t, m) => {
136
147
  const {
137
- icon: i,
138
- title: d,
148
+ icon: o,
149
+ title: s,
139
150
  onButtonAction: n = () => {
140
151
  },
141
- onSelectCard: m = () => {
152
+ onSelectCard: c = () => {
142
153
  },
143
- buttonLink: p,
144
- items: o,
154
+ buttonLink: u,
155
+ items: a,
145
156
  buttonText: l,
146
- limit: g = 3,
147
- isLoading: N = !1,
148
- getImage: v = () => {
157
+ limit: d = 3,
158
+ isLoading: i = !1,
159
+ getImage: f = () => {
149
160
  },
150
- readMoreText: w = "Read more"
151
- } = t, B = R(), M = P(() => /* @__PURE__ */ r(u, { children: B === !0 ? o == null ? void 0 : o.map((e, c) => /* @__PURE__ */ r(
152
- S,
161
+ readMoreText: S = "Read more",
162
+ componentName: k
163
+ } = t, M = W(), T = U(() => /* @__PURE__ */ r(v, { children: M === !0 ? a == null ? void 0 : a.map((e, p) => /* @__PURE__ */ r(
164
+ N,
153
165
  {
154
166
  title: e == null ? void 0 : e.title,
155
- imageUrl: v(e == null ? void 0 : e.imageUrl, e == null ? void 0 : e.uuid) || null,
167
+ imageUrl: f(e == null ? void 0 : e.imageUrl, e == null ? void 0 : e.uuid) || null,
156
168
  text: e == null ? void 0 : e.description,
157
169
  titleSlug: e == null ? void 0 : e.titleSlug,
158
- readMoreText: w,
170
+ readMoreText: S,
159
171
  options: e == null ? void 0 : e.options,
160
- onCardClick: () => m(e == null ? void 0 : e.titleSlug)
172
+ onCardClick: ($, h) => c(e == null ? void 0 : e.titleSlug, h),
173
+ metadata: { name: k, accessor: e == null ? void 0 : e.accessor }
161
174
  },
162
- c
163
- )) : o == null ? void 0 : o.slice(0, g).map((e, c) => /* @__PURE__ */ r(
164
- S,
175
+ p
176
+ )) : a == null ? void 0 : a.slice(0, d).map((e, p) => /* @__PURE__ */ r(
177
+ N,
165
178
  {
166
179
  title: e == null ? void 0 : e.title,
167
- imageUrl: v(e == null ? void 0 : e.imageUrl, e == null ? void 0 : e.uuid) || null,
180
+ imageUrl: f(e == null ? void 0 : e.imageUrl, e == null ? void 0 : e.uuid) || null,
168
181
  text: e == null ? void 0 : e.description,
169
182
  titleSlug: e == null ? void 0 : e.titleSlug,
170
- readMoreText: w,
183
+ readMoreText: S,
171
184
  options: e == null ? void 0 : e.options,
172
- onCardClick: () => m(e == null ? void 0 : e.titleSlug)
185
+ onCardClick: ($, h) => c(e == null ? void 0 : e.titleSlug, h),
186
+ metadata: { name: k, accessor: e == null ? void 0 : e.accessor }
173
187
  },
174
- c
175
- )) }), [o]);
176
- return /* @__PURE__ */ s(W, { ref: a, children: [
177
- /* @__PURE__ */ s("div", { className: "regular-title", children: [
178
- /* @__PURE__ */ s("div", { className: "regular-title-text", children: [
179
- b(i) && /* @__PURE__ */ r("i", { className: i }),
180
- /* @__PURE__ */ r("span", { children: d })
188
+ p
189
+ )) }), [a]);
190
+ return /* @__PURE__ */ g(L, { ref: m, children: [
191
+ /* @__PURE__ */ g("div", { className: "regular-title", children: [
192
+ /* @__PURE__ */ g("div", { className: "regular-title-text", children: [
193
+ y(o) && /* @__PURE__ */ r("i", { className: o }),
194
+ /* @__PURE__ */ r("span", { children: s })
181
195
  ] }),
182
- b(p) && /* @__PURE__ */ r(
183
- j,
196
+ y(u) && /* @__PURE__ */ r(
197
+ _,
184
198
  {
185
199
  type: "button",
186
200
  btnType: "tinted",
187
201
  color: "neutral",
188
202
  onClick: (e) => {
189
- var c;
190
- (c = e == null ? void 0 : e.target) == null || c.blur(), n(p);
203
+ var p;
204
+ (p = e == null ? void 0 : e.target) == null || p.blur(), n(u);
191
205
  },
192
206
  borderRadius: "curved",
193
207
  className: "button-link",
@@ -195,17 +209,17 @@ const L = f.div`
195
209
  }
196
210
  )
197
211
  ] }),
198
- /* @__PURE__ */ r(L, { limit: g, children: /* @__PURE__ */ r(
199
- F,
212
+ /* @__PURE__ */ r(F, { limit: d, children: /* @__PURE__ */ r(
213
+ q,
200
214
  {
201
- isLoading: N,
202
- limit: g,
215
+ isLoading: i,
216
+ limit: d,
203
217
  keyPrefix: "explore-landing",
204
- children: M
218
+ children: T
205
219
  }
206
220
  ) })
207
221
  ] });
208
222
  });
209
223
  export {
210
- x as default
224
+ ie as default
211
225
  };
@@ -1,13 +1,13 @@
1
- "use strict";const t=require("react/jsx-runtime"),s=require("react"),g=require("./emotion-styled.browser.esm-BtEseadx.cjs"),h=require("./consts-goSZX3xP.cjs"),x=require("./useDetectMobile-zkbzoOGV.cjs"),m=require("./utils-Dl9xPH4c.cjs"),w=require("./Button.cjs"),b=require("./index-BueKsXT8.cjs"),j=g.styled.div`
1
+ "use strict";const t=require("react/jsx-runtime"),c=require("react"),p=require("./emotion-styled.browser.esm-BtEseadx.cjs"),w=require("./consts-goSZX3xP.cjs"),C=require("./useDetectMobile-zkbzoOGV.cjs"),h=require("./utils-Dl9xPH4c.cjs"),k=require("./Button.cjs"),x=require("./index-BueKsXT8.cjs"),y=p.styled.div`
2
2
  display: grid;
3
3
  grid-template-columns: ${i=>`repeat(${i.limit}, minmax(0, 1fr))`};
4
4
  gap: 1.25rem;
5
5
  margin: auto;
6
6
  width: fit-content;
7
- @media (max-width: ${h.MOBILE_SIZE_PX+"px"}) {
7
+ @media (max-width: ${w.MOBILE_SIZE_PX+"px"}) {
8
8
  grid-template-columns: repeat(1, 1fr);
9
9
  }
10
- `,p=g.styled.div`
10
+ `,b=p.styled.div`
11
11
  display: flex;
12
12
  flex-direction: column;
13
13
  width: 100%;
@@ -49,13 +49,13 @@
49
49
  min-height: 6rem;
50
50
  max-height: 6rem;
51
51
  border-radius: 0.75rem;
52
- background-color: ${m.linearGradientAnimation("-90deg")};
52
+ background-color: ${h.linearGradientAnimation("-90deg")};
53
53
  }
54
54
 
55
- @media (max-width: ${h.MOBILE_SIZE_PX+"px"}) {
55
+ @media (max-width: ${w.MOBILE_SIZE_PX+"px"}) {
56
56
  max-width: unset;
57
57
  }
58
- `,f=g.styled.div`
58
+ `,j=p.styled.div`
59
59
  text-align: center;
60
60
  display: flex;
61
61
  flex-direction: column;
@@ -73,7 +73,7 @@
73
73
  & .skeleton-title {
74
74
  height: 1.75rem;
75
75
  width: 80%;
76
- background-color: ${m.linearGradientAnimation("-90deg")};
76
+ background-color: ${h.linearGradientAnimation("-90deg")};
77
77
  }
78
78
 
79
79
  & .text-wr {
@@ -82,6 +82,6 @@
82
82
  font-weight: 400;
83
83
  line-height: 1.25rem;
84
84
  letter-spacing: 0.0156rem;
85
- ${m.truncateTextInRows(3)}
85
+ ${h.truncateTextInRows(3)}
86
86
  }
87
- `,u=s.forwardRef((i,n)=>{const{title:r,image:o,text:l,buttonText:d,onCardClick:a}=i;return t.jsxs(p,{ref:n,className:"blog-card",onClick:a,children:[t.jsx(b.ProductImageWrapper,{src:o}),t.jsxs(f,{children:[t.jsx("div",{className:"text-wr-title",children:r}),t.jsx("div",{className:"text-wr",children:l})]}),t.jsx(w,{borderRadius:"curved",color:"gray",type:"button",btnType:"outline",onClick:a,size:"medium",children:d})]})}),k=s.forwardRef((i,n)=>{const{onCardClick:r}=i;return t.jsxs(p,{className:"product-card",onClick:r,children:[t.jsx("div",{className:"skeleton-img"}),t.jsx(f,{children:t.jsx("div",{className:"skeleton-title"})})]})}),y=({limit:i=3,isLoading:n=!1,keyPrefix:r})=>t.jsx(t.Fragment,{children:Array.from({length:i},(o,l)=>t.jsx(k,{isLoading:n},`${r}-skeleton-product-card-${l}`))}),C=({children:i,fallbackComponent:n=t.jsx(t.Fragment,{}),isLoading:r=!1,limit:o,keyPrefix:l})=>t.jsx(s.Suspense,{fallbackComponent:n,children:r===!0?t.jsx(y,{isLoading:r,limit:o,keyPrefix:l}):i}),v=s.forwardRef((i,n)=>{const{items:r,limit:o=3,onSelectCard:l=()=>{},isLoading:d=!1}=i,a=x.useDetectMobile();return t.jsx(j,{ref:n,limit:o,children:t.jsx(C,{isLoading:d,limit:o,keyPrefix:"explore-landing",children:t.jsx(t.Fragment,{children:a===!0?r==null?void 0:r.map((e,c)=>t.jsx(u,{title:e==null?void 0:e.title,image:(e==null?void 0:e.image)||null,text:e==null?void 0:e.text,buttonText:e==null?void 0:e.buttonText,onCardClick:()=>l(e)},c)):r==null?void 0:r.slice(0,o).map((e,c)=>t.jsx(u,{title:e==null?void 0:e.title,image:(e==null?void 0:e.image)||null,text:e==null?void 0:e.text,buttonText:e==null?void 0:e.buttonText,onCardClick:()=>l(e)},c))})})})});module.exports=v;
87
+ `,f=c.forwardRef((i,a)=>{const{title:r,image:n,text:o,buttonText:m,onCardClick:d,metadata:s}=i,e=c.useRef(),l=g=>{d(g,e)};return t.jsxs(b,{ref:e,name:s==null?void 0:s.name,"data-accessor":s==null?void 0:s.accessor,className:"blog-card",onClick:l,children:[t.jsx(x.ProductImageWrapper,{src:n}),t.jsxs(j,{children:[t.jsx("div",{className:"text-wr-title",children:r}),t.jsx("div",{className:"text-wr",children:o})]}),t.jsx(k,{borderRadius:"curved",color:"gray",type:"button",btnType:"outline",onClick:l,size:"medium",children:m})]})}),v=c.forwardRef((i,a)=>{const{onCardClick:r}=i;return t.jsxs(b,{className:"product-card",onClick:r,children:[t.jsx("div",{className:"skeleton-img"}),t.jsx(j,{children:t.jsx("div",{className:"skeleton-title"})})]})}),S=({limit:i=3,isLoading:a=!1,keyPrefix:r})=>t.jsx(t.Fragment,{children:Array.from({length:i},(n,o)=>t.jsx(v,{isLoading:a},`${r}-skeleton-product-card-${o}`))}),R=({children:i,fallbackComponent:a=t.jsx(t.Fragment,{}),isLoading:r=!1,limit:n,keyPrefix:o})=>t.jsx(c.Suspense,{fallbackComponent:a,children:r===!0?t.jsx(S,{isLoading:r,limit:n,keyPrefix:o}):i}),$=c.forwardRef((i,a)=>{const{items:r,limit:n=3,onSelectCard:o=()=>{},isLoading:m=!1,componentName:d}=i,s=C.useDetectMobile();return t.jsx(y,{ref:a,limit:n,children:t.jsx(R,{isLoading:m,limit:n,keyPrefix:"explore-landing",children:t.jsx(t.Fragment,{children:s===!0?r==null?void 0:r.map((e,l)=>t.jsx(f,{title:e==null?void 0:e.title,image:(e==null?void 0:e.image)||null,text:e==null?void 0:e.text,buttonText:e==null?void 0:e.buttonText,onCardClick:(g,u)=>o(e,u),metadata:{name:d,accessor:e==null?void 0:e.accessor}},l)):r==null?void 0:r.slice(0,n).map((e,l)=>t.jsx(f,{title:e==null?void 0:e.title,image:(e==null?void 0:e.image)||null,text:e==null?void 0:e.text,buttonText:e==null?void 0:e.buttonText,onCardClick:(g,u)=>o(e,u),metadata:{name:d,accessor:e==null?void 0:e.accessor}},l))})})})});module.exports=$;
@@ -1,21 +1,21 @@
1
- import { jsxs as c, jsx as t, Fragment as s } from "react/jsx-runtime";
2
- import { forwardRef as p, Suspense as k } from "react";
3
- import { s as g } from "./emotion-styled.browser.esm-BNN1dTl3.js";
4
- import { M as u } from "./consts-BuFChS64.js";
5
- import { u as C } from "./useDetectMobile-Bkvj0VMa.js";
6
- import { o as f, p as y } from "./utils-BdsZgOUE.js";
7
- import v from "./Button.js";
8
- import { P as S } from "./index-CF3HhgvN.js";
9
- const x = g.div`
1
+ import { jsxs as g, jsx as t, Fragment as h } from "react/jsx-runtime";
2
+ import { forwardRef as u, useRef as v, Suspense as S } from "react";
3
+ import { s as f } from "./emotion-styled.browser.esm-BNN1dTl3.js";
4
+ import { M as b } from "./consts-BuFChS64.js";
5
+ import { u as $ } from "./useDetectMobile-Bkvj0VMa.js";
6
+ import { o as C, p as T } from "./utils-BdsZgOUE.js";
7
+ import N from "./Button.js";
8
+ import { P as B } from "./index-CF3HhgvN.js";
9
+ const P = f.div`
10
10
  display: grid;
11
11
  grid-template-columns: ${(i) => `repeat(${i.limit}, minmax(0, 1fr))`};
12
12
  gap: 1.25rem;
13
13
  margin: auto;
14
14
  width: fit-content;
15
- @media (max-width: ${u + "px"}) {
15
+ @media (max-width: ${b + "px"}) {
16
16
  grid-template-columns: repeat(1, 1fr);
17
17
  }
18
- `, w = g.div`
18
+ `, k = f.div`
19
19
  display: flex;
20
20
  flex-direction: column;
21
21
  width: 100%;
@@ -57,13 +57,13 @@ const x = g.div`
57
57
  min-height: 6rem;
58
58
  max-height: 6rem;
59
59
  border-radius: 0.75rem;
60
- background-color: ${f("-90deg")};
60
+ background-color: ${C("-90deg")};
61
61
  }
62
62
 
63
- @media (max-width: ${u + "px"}) {
63
+ @media (max-width: ${b + "px"}) {
64
64
  max-width: unset;
65
65
  }
66
- `, b = g.div`
66
+ `, y = f.div`
67
67
  text-align: center;
68
68
  display: flex;
69
69
  flex-direction: column;
@@ -81,7 +81,7 @@ const x = g.div`
81
81
  & .skeleton-title {
82
82
  height: 1.75rem;
83
83
  width: 80%;
84
- background-color: ${f("-90deg")};
84
+ background-color: ${C("-90deg")};
85
85
  }
86
86
 
87
87
  & .text-wr {
@@ -90,95 +90,110 @@ const x = g.div`
90
90
  font-weight: 400;
91
91
  line-height: 1.25rem;
92
92
  letter-spacing: 0.0156rem;
93
- ${y(3)}
93
+ ${T(3)}
94
94
  }
95
- `, h = p((i, n) => {
96
- const { title: r, image: o, text: a, buttonText: m, onCardClick: l } = i;
97
- return /* @__PURE__ */ c(w, { ref: n, className: "blog-card", onClick: l, children: [
98
- /* @__PURE__ */ t(S, { src: o }),
99
- /* @__PURE__ */ c(b, { children: [
100
- /* @__PURE__ */ t("div", { className: "text-wr-title", children: r }),
101
- /* @__PURE__ */ t("div", { className: "text-wr", children: a })
102
- ] }),
103
- /* @__PURE__ */ t(
104
- v,
105
- {
106
- borderRadius: "curved",
107
- color: "gray",
108
- type: "button",
109
- btnType: "outline",
110
- onClick: l,
111
- size: "medium",
112
- children: m
113
- }
114
- )
115
- ] });
116
- }), $ = p((i, n) => {
95
+ `, w = u((i, l) => {
96
+ const { title: r, image: o, text: n, buttonText: d, onCardClick: c, metadata: a } = i, e = v(), m = (s) => {
97
+ c(s, e);
98
+ };
99
+ return /* @__PURE__ */ g(
100
+ k,
101
+ {
102
+ ref: e,
103
+ name: a == null ? void 0 : a.name,
104
+ "data-accessor": a == null ? void 0 : a.accessor,
105
+ className: "blog-card",
106
+ onClick: m,
107
+ children: [
108
+ /* @__PURE__ */ t(B, { src: o }),
109
+ /* @__PURE__ */ g(y, { children: [
110
+ /* @__PURE__ */ t("div", { className: "text-wr-title", children: r }),
111
+ /* @__PURE__ */ t("div", { className: "text-wr", children: n })
112
+ ] }),
113
+ /* @__PURE__ */ t(
114
+ N,
115
+ {
116
+ borderRadius: "curved",
117
+ color: "gray",
118
+ type: "button",
119
+ btnType: "outline",
120
+ onClick: m,
121
+ size: "medium",
122
+ children: d
123
+ }
124
+ )
125
+ ]
126
+ }
127
+ );
128
+ }), R = u((i, l) => {
117
129
  const { onCardClick: r } = i;
118
130
  return (
119
131
  // <SimpleBlogCardSkeleton />
120
- /* @__PURE__ */ c(w, { className: "product-card", onClick: r, children: [
132
+ /* @__PURE__ */ g(k, { className: "product-card", onClick: r, children: [
121
133
  /* @__PURE__ */ t("div", { className: "skeleton-img" }),
122
- /* @__PURE__ */ t(b, { children: /* @__PURE__ */ t("div", { className: "skeleton-title" }) })
134
+ /* @__PURE__ */ t(y, { children: /* @__PURE__ */ t("div", { className: "skeleton-title" }) })
123
135
  ] })
124
136
  );
125
- }), T = ({ limit: i = 3, isLoading: n = !1, keyPrefix: r }) => /* @__PURE__ */ t(s, { children: Array.from({ length: i }, (o, a) => /* @__PURE__ */ t(
126
- $,
137
+ }), z = ({ limit: i = 3, isLoading: l = !1, keyPrefix: r }) => /* @__PURE__ */ t(h, { children: Array.from({ length: i }, (o, n) => /* @__PURE__ */ t(
138
+ R,
127
139
  {
128
- isLoading: n
140
+ isLoading: l
129
141
  },
130
- `${r}-skeleton-product-card-${a}`
131
- )) }), B = ({
142
+ `${r}-skeleton-product-card-${n}`
143
+ )) }), I = ({
132
144
  children: i,
133
- fallbackComponent: n = /* @__PURE__ */ t(s, {}),
145
+ fallbackComponent: l = /* @__PURE__ */ t(h, {}),
134
146
  isLoading: r = !1,
135
147
  limit: o,
136
- keyPrefix: a
137
- }) => /* @__PURE__ */ t(k, { fallbackComponent: n, children: r === !0 ? /* @__PURE__ */ t(
138
- T,
148
+ keyPrefix: n
149
+ }) => /* @__PURE__ */ t(S, { fallbackComponent: l, children: r === !0 ? /* @__PURE__ */ t(
150
+ z,
139
151
  {
140
152
  isLoading: r,
141
153
  limit: o,
142
- keyPrefix: a
154
+ keyPrefix: n
143
155
  }
144
- ) : i }), _ = p((i, n) => {
156
+ ) : i }), F = u((i, l) => {
145
157
  const {
146
158
  items: r,
147
159
  limit: o = 3,
148
- onSelectCard: a = () => {
160
+ onSelectCard: n = () => {
149
161
  },
150
- isLoading: m = !1
151
- } = i, l = C();
152
- return /* @__PURE__ */ t(x, { ref: n, limit: o, children: /* @__PURE__ */ t(
153
- B,
162
+ isLoading: d = !1,
163
+ componentName: c
164
+ } = i, a = $();
165
+ return /* @__PURE__ */ t(P, { ref: l, limit: o, children: /* @__PURE__ */ t(
166
+ I,
154
167
  {
155
- isLoading: m,
168
+ isLoading: d,
156
169
  limit: o,
157
170
  keyPrefix: "explore-landing",
158
- children: /* @__PURE__ */ t(s, { children: l === !0 ? r == null ? void 0 : r.map((e, d) => /* @__PURE__ */ t(
159
- h,
171
+ children: /* @__PURE__ */ t(h, { children: a === !0 ? r == null ? void 0 : r.map((e, m) => /* @__PURE__ */ t(
172
+ w,
160
173
  {
161
174
  title: e == null ? void 0 : e.title,
162
175
  image: (e == null ? void 0 : e.image) || null,
163
176
  text: e == null ? void 0 : e.text,
164
177
  buttonText: e == null ? void 0 : e.buttonText,
165
- onCardClick: () => a(e)
178
+ onCardClick: (s, p) => n(e, p),
179
+ metadata: { name: c, accessor: e == null ? void 0 : e.accessor }
166
180
  },
167
- d
168
- )) : r == null ? void 0 : r.slice(0, o).map((e, d) => /* @__PURE__ */ t(
169
- h,
181
+ m
182
+ )) : r == null ? void 0 : r.slice(0, o).map((e, m) => /* @__PURE__ */ t(
183
+ w,
170
184
  {
171
185
  title: e == null ? void 0 : e.title,
172
186
  image: (e == null ? void 0 : e.image) || null,
173
187
  text: e == null ? void 0 : e.text,
174
188
  buttonText: e == null ? void 0 : e.buttonText,
175
- onCardClick: () => a(e)
189
+ onCardClick: (s, p) => n(e, p),
190
+ metadata: { name: c, accessor: e == null ? void 0 : e.accessor }
176
191
  },
177
- d
192
+ m
178
193
  )) })
179
194
  }
180
195
  ) });
181
196
  });
182
197
  export {
183
- _ as default
198
+ F as default
184
199
  };
@@ -1,12 +1,12 @@
1
- "use strict";const e=require("react/jsx-runtime"),d=require("react"),p=require("./emotion-styled.browser.esm-BtEseadx.cjs"),w=require("./consts-goSZX3xP.cjs"),B=require("./useDetectMobile-zkbzoOGV.cjs"),c=require("./utils-Dl9xPH4c.cjs"),M=require("./style-lSjkOR95.cjs"),R=require("./Button.cjs"),W=require("./Link.cjs"),A=require("./index-BueKsXT8.cjs"),I=require("./index-D0xXo7W6.cjs"),P=p.styled.div`
1
+ "use strict";const t=require("react/jsx-runtime"),l=require("react"),x=require("./emotion-styled.browser.esm-BtEseadx.cjs"),S=require("./consts-goSZX3xP.cjs"),W=require("./useDetectMobile-zkbzoOGV.cjs"),m=require("./utils-Dl9xPH4c.cjs"),A=require("./style-lSjkOR95.cjs"),I=require("./Button.cjs"),_=require("./Link.cjs"),z=require("./index-BueKsXT8.cjs"),E=require("./index-D0xXo7W6.cjs"),P=x.styled.div`
2
2
  display: grid;
3
- grid-template-columns: ${i=>`repeat(${i.limit}, minmax(0, 1fr))`};
3
+ grid-template-columns: ${n=>`repeat(${n.limit}, minmax(0, 1fr))`};
4
4
  gap: 1.25rem;
5
5
 
6
- @media (max-width: ${w.MOBILE_SIZE_PX+"px"}) {
6
+ @media (max-width: ${S.MOBILE_SIZE_PX+"px"}) {
7
7
  grid-template-columns: repeat(1, 1fr);
8
8
  }
9
- `,k=p.styled.div`
9
+ `,C=x.styled.div`
10
10
  display: flex;
11
11
  width: 100%;
12
12
  box-shadow: 0px 1px 3px 0px rgba(0, 0, 0, 0.1),
@@ -39,16 +39,16 @@
39
39
  min-height: 3.3125rem;
40
40
  max-height: 3.3125rem;
41
41
  border-radius: 0.75rem;
42
- background-color: ${c.linearGradientAnimation("-90deg")};
42
+ background-color: ${m.linearGradientAnimation("-90deg")};
43
43
  }
44
44
 
45
45
  & a {
46
46
  margin-top: auto;
47
47
  }
48
48
 
49
- @media (max-width: ${w.MOBILE_SIZE_PX+"px"}) {
49
+ @media (max-width: ${S.MOBILE_SIZE_PX+"px"}) {
50
50
  }
51
- `,v=p.styled.div`
51
+ `,N=x.styled.div`
52
52
  display: flex;
53
53
  flex-direction: column;
54
54
  gap: 0.5rem;
@@ -62,19 +62,19 @@
62
62
  & .skeleton-title {
63
63
  height: 1.5rem;
64
64
  width: 80%;
65
- background-color: ${c.linearGradientAnimation("-90deg")};
65
+ background-color: ${m.linearGradientAnimation("-90deg")};
66
66
  }
67
67
 
68
68
  & .skeleton-action {
69
69
  height: 1.25rem;
70
70
  width: 20%;
71
- background-color: ${c.linearGradientAnimation("-90deg")};
71
+ background-color: ${m.linearGradientAnimation("-90deg")};
72
72
  }
73
73
 
74
74
  & .text-wr {
75
75
  font-weight: 400;
76
76
  font-size: 0.875rem;
77
77
  color: var(--gray-700, #4e555f);
78
- ${c.truncateTextInRows(3)}
78
+ ${m.truncateTextInRows(3)}
79
79
  }
80
- `,_=d.forwardRef((i,s)=>{const{title:o,imageUrl:a,text:r,buttonText:u,onCardClick:l}=i;return e.jsxs(k,{ref:s,className:"blog-card",onClick:l,children:[e.jsxs(v,{children:[e.jsx("div",{className:"text-wr-title",children:o}),e.jsx("div",{className:"text-wr",children:r}),e.jsx(W,{color:"gray",onClick:l,children:u})]}),e.jsx(A.ProductImageWrapper,{src:a})]})}),z=d.forwardRef(({},i)=>e.jsxs(k,{className:"blog-card",children:[e.jsxs(v,{children:[e.jsx("div",{className:"skeleton-title"}),e.jsx("div",{className:"text-wr"}),e.jsx("div",{className:"skeleton-action"})]}),e.jsx("div",{className:"skeleton-img"})]})),E=({limit:i=3,isLoading:s=!1,keyPrefix:o})=>e.jsx(e.Fragment,{children:Array.from({length:i},(a,r)=>e.jsx(z,{isLoading:s},`${o}-skeleton-product-card-${r}`))}),F=({children:i,fallbackComponent:s=e.jsx(e.Fragment,{}),isLoading:o=!1,limit:a,keyPrefix:r})=>e.jsx(d.Suspense,{fallbackComponent:s,children:o===!0?e.jsx(E,{isLoading:o,limit:a,keyPrefix:r}):i}),f=d.memo(_),O=d.forwardRef((i,s)=>{const{icon:o,title:a,items:r,buttonText:u,limit:l=3,options:m,selectedOption:y=[],onButtonAction:S=()=>{},buttonLink:x,onSelectOption:b=()=>{},onSelectAll:N=()=>{},isLoading:C=!1,onSelectCard:g=()=>{},productsToolbarName:q="All",allButton:T=!1}=i,j=B.useDetectMobile(),$=d.useMemo(()=>{var n;return e.jsx(e.Fragment,{children:j===!0?r==null?void 0:r.map((t,h)=>e.jsx(f,{title:t==null?void 0:t.title,imageUrl:(t==null?void 0:t.image)||null,text:t==null?void 0:t.text,buttonText:t==null?void 0:t.buttonText,onCardClick:()=>g(t)},h)):(n=r==null?void 0:r.slice(0,l))==null?void 0:n.map((t,h)=>e.jsx(f,{title:t==null?void 0:t.title,imageUrl:(t==null?void 0:t.image)||null,text:t==null?void 0:t.text,buttonText:t==null?void 0:t.buttonText,onCardClick:()=>g(t)},h))})},[r,j,l,g]);return e.jsxs(M.TitleWithOptionsSectionWrapper,{ref:s,children:[e.jsxs("div",{className:"regular-title",children:[e.jsxs("div",{className:"regular-title-text",children:[c.isDefinedNotEmptyString(o)&&e.jsx("i",{className:o}),e.jsx("span",{children:a})]}),c.isDefinedNotEmptyString(x)&&e.jsx(R,{type:"button",btnType:"tinted",color:"neutral",onClick:n=>{var t;(t=n==null?void 0:n.target)==null||t.blur(),S(x)},borderRadius:"curved",children:u})]}),(m==null?void 0:m.length)>0&&e.jsx(I.SelectBar,{items:m,selectedIds:y,onRemove:n=>{b(n)},onSelect:n=>{b(n)},onSelectAll:N,labelKey:"name",valueKey:"code",noMargin:!0,productsToolbarName:q,allButton:T}),e.jsx(P,{limit:l,children:e.jsx(F,{isLoading:C,limit:l,keyPrefix:"explore-landing",children:$})})]})});module.exports=O;
80
+ `,F=l.forwardRef((n,a)=>{const{title:s,imageUrl:c,text:r,buttonText:p,onCardClick:d,metadata:i}=n,u=l.useRef(),g=h=>{d(h,u)};return t.jsxs(C,{ref:u,name:i==null?void 0:i.name,"data-accessor":i==null?void 0:i.accessor,className:"blog-card",onClick:g,children:[t.jsxs(N,{children:[t.jsx("div",{className:"text-wr-title",children:s}),t.jsx("div",{className:"text-wr",children:r}),t.jsx(_,{color:"gray",onClick:g,children:p})]}),t.jsx(z.ProductImageWrapper,{src:c})]})}),O=l.forwardRef(({},n)=>t.jsxs(C,{className:"blog-card",children:[t.jsxs(N,{children:[t.jsx("div",{className:"skeleton-title"}),t.jsx("div",{className:"text-wr"}),t.jsx("div",{className:"skeleton-action"})]}),t.jsx("div",{className:"skeleton-img"})]})),D=({limit:n=3,isLoading:a=!1,keyPrefix:s})=>t.jsx(t.Fragment,{children:Array.from({length:n},(c,r)=>t.jsx(O,{isLoading:a},`${s}-skeleton-product-card-${r}`))}),G=({children:n,fallbackComponent:a=t.jsx(t.Fragment,{}),isLoading:s=!1,limit:c,keyPrefix:r})=>t.jsx(l.Suspense,{fallbackComponent:a,children:s===!0?t.jsx(D,{isLoading:s,limit:c,keyPrefix:r}):n}),y=l.memo(F),L=l.forwardRef((n,a)=>{const{icon:s,title:c,items:r,buttonText:p,limit:d=3,options:i,selectedOption:u=[],onButtonAction:g=()=>{},buttonLink:h,onSelectOption:w=()=>{},onSelectAll:q=()=>{},isLoading:B=!1,onSelectCard:b=()=>{},productsToolbarName:T="All",allButton:$=!1,componentName:k}=n,v=W.useDetectMobile(),R=l.useMemo(()=>{var o;return t.jsx(t.Fragment,{children:v===!0?r==null?void 0:r.map((e,f)=>t.jsx(y,{title:e==null?void 0:e.title,imageUrl:(e==null?void 0:e.image)||null,text:e==null?void 0:e.text,buttonText:e==null?void 0:e.buttonText,onCardClick:(M,j)=>b(e,j),metadata:{name:k,accessor:e==null?void 0:e.accessor}},f)):(o=r==null?void 0:r.slice(0,d))==null?void 0:o.map((e,f)=>t.jsx(y,{title:e==null?void 0:e.title,imageUrl:(e==null?void 0:e.image)||null,text:e==null?void 0:e.text,buttonText:e==null?void 0:e.buttonText,onCardClick:(M,j)=>b(e,j),metadata:{name:k,accessor:e==null?void 0:e.accessor}},f))})},[r,v,d,b]);return t.jsxs(A.TitleWithOptionsSectionWrapper,{ref:a,children:[t.jsxs("div",{className:"regular-title",children:[t.jsxs("div",{className:"regular-title-text",children:[m.isDefinedNotEmptyString(s)&&t.jsx("i",{className:s}),t.jsx("span",{children:c})]}),m.isDefinedNotEmptyString(h)&&t.jsx(I,{type:"button",btnType:"tinted",color:"neutral",onClick:o=>{var e;(e=o==null?void 0:o.target)==null||e.blur(),g(h)},borderRadius:"curved",children:p})]}),(i==null?void 0:i.length)>0&&t.jsx(E.SelectBar,{items:i,selectedIds:u,onRemove:o=>{w(o)},onSelect:o=>{w(o)},onSelectAll:q,labelKey:"name",valueKey:"code",noMargin:!0,productsToolbarName:T,allButton:$}),t.jsx(P,{limit:d,children:t.jsx(G,{isLoading:B,limit:d,keyPrefix:"explore-landing",children:R})})]})});module.exports=L;