@lanaco/lnc-react-ui 4.0.185 → 4.0.188

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 (73) 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 +16 -15
  46. package/dist/MasonryGeneralCardsSection.js +83 -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-Bmr3IeZ_.cjs → index-DBokGIps.cjs} +14 -14
  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-DdUC0zgY.js} +211 -192
  73. package/package.json +1 -1
@@ -1,23 +1,23 @@
1
- import { jsxs as c, jsx as r, Fragment as M } from "react/jsx-runtime";
2
- import { forwardRef as k, useRef as T, memo as $, useMemo as I } from "react";
3
- import { s as b } from "./emotion-styled.browser.esm-BNN1dTl3.js";
4
- import { M as C } from "./consts-BuFChS64.js";
1
+ import { jsxs as p, jsx as r, Fragment as T } from "react/jsx-runtime";
2
+ import { forwardRef as C, useRef as $, memo as L, useMemo as I } from "react";
3
+ import { s as y } from "./emotion-styled.browser.esm-BNN1dTl3.js";
4
+ import { M as B } from "./consts-BuFChS64.js";
5
5
  import { u as P } from "./useDetectMobile-Bkvj0VMa.js";
6
- import { w as U, o as W, k as w } from "./utils-Dc5zIpaz.js";
7
- import { B as z, R as L } from "./style-C7FUSHmS.js";
8
- import j from "./Button.js";
9
- import D from "./Link.js";
10
- import { P as E } from "./index-C_NnINik.js";
11
- import { S as A } from "./index-BovNbKxB.js";
12
- const G = b.div`
6
+ import { w as U, o as W, k as v } from "./utils-Dc5zIpaz.js";
7
+ import { B as z, R as j } from "./style-C7FUSHmS.js";
8
+ import D from "./Button.js";
9
+ import E from "./Link.js";
10
+ import { P as A } from "./index-C_NnINik.js";
11
+ import { S as G } from "./index-BovNbKxB.js";
12
+ const _ = y.div`
13
13
  display: grid;
14
14
  grid-template-columns: ${(n) => `repeat(${n.limit}, minmax(0, 1fr))`};
15
15
  gap: 1.25rem;
16
16
 
17
- @media (max-width: ${C + "px"}) {
17
+ @media (max-width: ${B + "px"}) {
18
18
  grid-template-columns: repeat(1, 1fr);
19
19
  }
20
- `, _ = b.a`
20
+ `, F = y.a`
21
21
  text-decoration: none;
22
22
  color: var(--gray-950);
23
23
  display: flex;
@@ -69,9 +69,9 @@ const G = b.div`
69
69
  padding: 1rem;
70
70
  }
71
71
 
72
- @media (max-width: ${C + "px"}) {
72
+ @media (max-width: ${B + "px"}) {
73
73
  }
74
- `, F = b.div`
74
+ `, O = y.div`
75
75
  padding: 1rem 1rem 0 1rem;
76
76
  display: flex;
77
77
  flex-direction: column;
@@ -91,98 +91,103 @@ const G = b.div`
91
91
  color: var(--gray-700, #4e555f);
92
92
  ${W(3)}
93
93
  }
94
- `, O = k((n, v) => {
94
+ `, X = C((n, k) => {
95
95
  const {
96
- title: d,
97
- imageUrl: u,
98
- text: f,
96
+ title: g,
97
+ imageUrl: h,
98
+ text: b,
99
99
  options: a,
100
100
  onCardClick: m,
101
101
  readMoreText: o = "Read more",
102
102
  metadata: i,
103
- titleSlug: p
104
- } = n, s = T();
105
- return /* @__PURE__ */ c(
106
- _,
103
+ titleSlug: s,
104
+ LinkComponent: c
105
+ } = n, u = c || "a", d = $();
106
+ return /* @__PURE__ */ p(
107
+ F,
107
108
  {
108
- ref: s,
109
+ ref: d,
109
110
  name: i == null ? void 0 : i.name,
110
111
  "data-accessor": i == null ? void 0 : i.name,
111
112
  className: "blog-card",
112
- onClick: (t) => m(t, s),
113
- href: `/blog/${p}`,
113
+ onClick: (t) => m(t, d),
114
+ as: u,
115
+ ...c ? { to: `/blog/${s}` } : { href: `/blog/${s}` },
114
116
  children: [
115
- /* @__PURE__ */ r(E, { src: u }),
116
- /* @__PURE__ */ c(F, { children: [
117
- /* @__PURE__ */ r("div", { className: "text-wr-title", children: d }),
118
- /* @__PURE__ */ r("div", { className: "text-wr", children: f })
117
+ /* @__PURE__ */ r(A, { src: h }),
118
+ /* @__PURE__ */ p(O, { children: [
119
+ /* @__PURE__ */ r("div", { className: "text-wr-title", children: g }),
120
+ /* @__PURE__ */ r("div", { className: "text-wr", children: b })
119
121
  ] }),
120
- a && /* @__PURE__ */ r("div", { className: "tags-wr", children: a == null ? void 0 : a.map((t, g) => /* @__PURE__ */ r(z, { color: t == null ? void 0 : t.color, children: t == null ? void 0 : t.name }, g)) }),
121
- /* @__PURE__ */ r(D, { className: "action", color: "gray", onClick: m, children: o })
122
+ a && /* @__PURE__ */ r("div", { className: "tags-wr", children: a == null ? void 0 : a.map((t, f) => /* @__PURE__ */ r(z, { color: t == null ? void 0 : t.color, children: t == null ? void 0 : t.name }, f)) }),
123
+ /* @__PURE__ */ r(E, { className: "action", color: "gray", onClick: m, children: o })
122
124
  ]
123
125
  }
124
126
  );
125
- }), S = $(O), re = k((n, v) => {
127
+ }), S = L(X), te = C((n, k) => {
126
128
  const {
127
- icon: d,
128
- title: u,
129
- onButtonAction: f = () => {
129
+ icon: g,
130
+ title: h,
131
+ onButtonAction: b = () => {
130
132
  },
131
133
  onSelectCard: a = () => {
132
134
  },
133
135
  buttonLink: m,
134
136
  items: o,
135
137
  buttonText: i,
136
- limit: p = 3,
137
- isLoading: s = !1,
138
- getImage: t = () => {
138
+ limit: s = 3,
139
+ isLoading: c = !1,
140
+ getImage: u = () => {
139
141
  },
140
- readMoreText: g = "Read more",
141
- componentName: y
142
- } = n, B = P(), N = I(() => /* @__PURE__ */ r(M, { children: B === !0 ? o == null ? void 0 : o.map((e, l) => /* @__PURE__ */ r(
142
+ readMoreText: d = "Read more",
143
+ componentName: t,
144
+ LinkComponent: f
145
+ } = n, N = P(), R = I(() => /* @__PURE__ */ r(T, { children: N === !0 ? o == null ? void 0 : o.map((e, l) => /* @__PURE__ */ r(
143
146
  S,
144
147
  {
145
148
  isBlog: !0,
146
149
  title: e == null ? void 0 : e.title,
147
- imageUrl: t(e == null ? void 0 : e.imageUrl, e == null ? void 0 : e.uuid) || null,
150
+ imageUrl: u(e == null ? void 0 : e.imageUrl, e == null ? void 0 : e.uuid) || null,
148
151
  text: e == null ? void 0 : e.description,
149
152
  titleSlug: e == null ? void 0 : e.titleSlug,
150
- readMoreText: g,
153
+ readMoreText: d,
151
154
  options: e == null ? void 0 : e.options,
152
- onCardClick: (R, h) => a(e == null ? void 0 : e.titleSlug, h),
153
- metadata: { name: y, accessor: e == null ? void 0 : e.accessor }
155
+ onCardClick: (M, w) => a(e == null ? void 0 : e.titleSlug, w),
156
+ metadata: { name: t, accessor: e == null ? void 0 : e.accessor },
157
+ LinkComponent: f
154
158
  },
155
159
  l
156
- )) : o == null ? void 0 : o.slice(0, p).map((e, l) => /* @__PURE__ */ r(
160
+ )) : o == null ? void 0 : o.slice(0, s).map((e, l) => /* @__PURE__ */ r(
157
161
  S,
158
162
  {
159
163
  isBlog: !0,
160
164
  title: e == null ? void 0 : e.title,
161
- imageUrl: t(e == null ? void 0 : e.imageUrl, e == null ? void 0 : e.uuid) || null,
165
+ imageUrl: u(e == null ? void 0 : e.imageUrl, e == null ? void 0 : e.uuid) || null,
162
166
  text: e == null ? void 0 : e.description,
163
167
  titleSlug: e == null ? void 0 : e.titleSlug,
164
- readMoreText: g,
168
+ readMoreText: d,
165
169
  options: e == null ? void 0 : e.options,
166
- onCardClick: (R, h) => a(e == null ? void 0 : e.titleSlug, h),
167
- metadata: { name: y, accessor: e == null ? void 0 : e.accessor }
170
+ onCardClick: (M, w) => a(e == null ? void 0 : e.titleSlug, w),
171
+ metadata: { name: t, accessor: e == null ? void 0 : e.accessor },
172
+ LinkComponent: f
168
173
  },
169
174
  l
170
175
  )) }), [o]);
171
- return /* @__PURE__ */ c(L, { ref: v, children: [
172
- /* @__PURE__ */ c("div", { className: "regular-title", children: [
173
- /* @__PURE__ */ c("div", { className: "regular-title-text", children: [
174
- w(d) && /* @__PURE__ */ r("i", { className: d }),
175
- /* @__PURE__ */ r("span", { children: u })
176
+ return /* @__PURE__ */ p(j, { ref: k, children: [
177
+ /* @__PURE__ */ p("div", { className: "regular-title", children: [
178
+ /* @__PURE__ */ p("div", { className: "regular-title-text", children: [
179
+ v(g) && /* @__PURE__ */ r("i", { className: g }),
180
+ /* @__PURE__ */ r("span", { children: h })
176
181
  ] }),
177
- w(i) && w(m) && !s && /* @__PURE__ */ r(
178
- j,
182
+ v(i) && v(m) && !c && /* @__PURE__ */ r(
183
+ D,
179
184
  {
180
185
  type: "button",
181
186
  btnType: "tinted",
182
187
  color: "neutral",
183
188
  onClick: (e) => {
184
189
  var l;
185
- (l = e == null ? void 0 : e.target) == null || l.blur(), f(m);
190
+ (l = e == null ? void 0 : e.target) == null || l.blur(), b(m);
186
191
  },
187
192
  borderRadius: "curved",
188
193
  className: "button-link",
@@ -191,15 +196,15 @@ const G = b.div`
191
196
  )
192
197
  ] }),
193
198
  /* @__PURE__ */ r(
194
- A,
199
+ G,
195
200
  {
196
- isLoading: s,
201
+ isLoading: c,
197
202
  keyPrefix: "blogs-simple-skeleton",
198
- children: /* @__PURE__ */ r(G, { limit: p, children: N })
203
+ children: /* @__PURE__ */ r(_, { limit: s, children: R })
199
204
  }
200
205
  )
201
206
  ] });
202
207
  });
203
208
  export {
204
- re as default
209
+ te as default
205
210
  };
@@ -1,13 +1,13 @@
1
- "use strict";const t=require("react/jsx-runtime"),u=require("react"),g=require("./emotion-styled.browser.esm-BtEseadx.cjs"),f=require("./consts-goSZX3xP.cjs"),w=require("./useDetectMobile-zkbzoOGV.cjs"),j=require("./utils-RnrgDDZP.cjs"),y=require("./Button.cjs"),S=require("./index-uwl7BjRF.cjs"),h=require("./style-BAcV7F53.cjs"),C=g.styled.div`
1
+ "use strict";const t=require("react/jsx-runtime"),u=require("react"),g=require("./emotion-styled.browser.esm-BtEseadx.cjs"),b=require("./consts-goSZX3xP.cjs"),C=require("./useDetectMobile-zkbzoOGV.cjs"),k=require("./utils-RnrgDDZP.cjs"),y=require("./Button.cjs"),S=require("./index-uwl7BjRF.cjs"),p=require("./style-BAcV7F53.cjs"),v=g.styled.div`
2
2
  display: grid;
3
3
  grid-template-columns: ${r=>`repeat(${r.limit}, minmax(0, 1fr))`};
4
4
  gap: 1.25rem;
5
5
  margin: auto;
6
6
  width: fit-content;
7
- @media (max-width: ${f.MOBILE_SIZE_PX+"px"}) {
7
+ @media (max-width: ${b.MOBILE_SIZE_PX+"px"}) {
8
8
  grid-template-columns: repeat(1, 1fr);
9
9
  }
10
- `,k=g.styled.a`
10
+ `,R=g.styled.a`
11
11
  text-decoration: none;
12
12
  color: var(--gray-950);
13
13
  display: flex;
@@ -45,10 +45,10 @@
45
45
  object-fit: cover;
46
46
  }
47
47
 
48
- @media (max-width: ${f.MOBILE_SIZE_PX+"px"}) {
48
+ @media (max-width: ${b.MOBILE_SIZE_PX+"px"}) {
49
49
  max-width: unset;
50
50
  }
51
- `,v=g.styled.div`
51
+ `,$=g.styled.div`
52
52
  text-align: center;
53
53
  display: flex;
54
54
  flex-direction: column;
@@ -69,10 +69,10 @@
69
69
  font-weight: 400;
70
70
  line-height: 1.25rem;
71
71
  letter-spacing: 0.0156rem;
72
- ${j.truncateTextInRows(3)}
72
+ ${k.truncateTextInRows(3)}
73
73
  }
74
- `,b=u.forwardRef((r,l)=>{const{title:n,image:o,text:c,buttonText:p,onCardClick:d,metadata:i,link:e}=r,s=u.useRef(),m=a=>{d(a,s)};return t.jsxs(k,{ref:s,name:i==null?void 0:i.name,"data-accessor":i==null?void 0:i.accessor,className:"blog-card",onClick:m,href:`/${e}`,children:[t.jsx(S.ProductImageWrapper,{src:o}),t.jsxs(v,{children:[t.jsx("div",{className:"text-wr-title",children:n}),t.jsx("div",{className:"text-wr",children:c})]}),t.jsx(y,{borderRadius:"curved",color:"gray",type:"button",btnType:"outline",onClick:m,size:"medium",children:p})]})}),R=g.styled(h.SkeletonRowWrapper)`
75
- @media (max-width: ${f.MOBILE_SIZE_PX+"px"}) {
74
+ `,w=u.forwardRef((r,l)=>{const{title:n,image:o,text:c,buttonText:f,onCardClick:d,metadata:i,link:m,LinkComponent:e}=r,a=e||"a",h=u.useRef(),s=j=>{d(j,h)};return t.jsxs(R,{ref:h,name:i==null?void 0:i.name,"data-accessor":i==null?void 0:i.accessor,className:"blog-card",onClick:s,as:a,...e?{to:`/${m}`}:{href:`/${m}`},children:[t.jsx(S.ProductImageWrapper,{src:o}),t.jsxs($,{children:[t.jsx("div",{className:"text-wr-title",children:n}),t.jsx("div",{className:"text-wr",children:c})]}),t.jsx(y,{borderRadius:"curved",color:"gray",type:"button",btnType:"outline",onClick:s,size:"medium",children:f})]})}),q=g.styled(p.SkeletonRowWrapper)`
75
+ @media (max-width: ${b.MOBILE_SIZE_PX+"px"}) {
76
76
  flex-direction: column;
77
77
 
78
78
  & > div {
@@ -88,4 +88,4 @@
88
88
  box-shadow: none;
89
89
  }
90
90
  }
91
- `,$=({keyPrefix:r})=>t.jsxs(R,{justifyContent:"center",alignItems:"center",children:[t.jsx(h.SkeletonLinePlaceholder,{height:"24.75rem",width:"18.5rem",borderRadius:"0.75rem"},`${r}-1`),t.jsx(h.SkeletonLinePlaceholder,{height:"24.75rem",width:"18.5rem",borderRadius:"0.75rem"},`${r}-2`),t.jsx(h.SkeletonLinePlaceholder,{height:"24.75rem",width:"18.5rem",borderRadius:"0.75rem"},`${r}-3`)]}),q=({keyPrefix:r,isLoading:l=!1,fallbackComponent:n=t.jsx(t.Fragment,{}),children:o})=>t.jsx(u.Suspense,{fallbackComponent:n,children:l===!0?t.jsx($,{keyPrefix:r}):o}),I=u.forwardRef((r,l)=>{const{items:n,limit:o=3,onSelectCard:c=()=>{},isLoading:p=!1,componentName:d}=r,i=w.useDetectMobile();return t.jsx(q,{isLoading:p,keyPrefix:"blogs-simple-centered-skeleton",children:t.jsx(C,{ref:l,limit:o,children:t.jsx(t.Fragment,{children:i===!0?n==null?void 0:n.map((e,s)=>t.jsx(b,{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:(m,a)=>c(e,a),metadata:{name:d,accessor:e==null?void 0:e.accessor},link:e==null?void 0:e.link},s)):n==null?void 0:n.slice(0,o).map((e,s)=>t.jsx(b,{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:(m,a)=>c(e,a),metadata:{name:d,accessor:e==null?void 0:e.accessor},link:e==null?void 0:e.link},s))})})})});module.exports=I;
91
+ `,I=({keyPrefix:r})=>t.jsxs(q,{justifyContent:"center",alignItems:"center",children:[t.jsx(p.SkeletonLinePlaceholder,{height:"24.75rem",width:"18.5rem",borderRadius:"0.75rem"},`${r}-1`),t.jsx(p.SkeletonLinePlaceholder,{height:"24.75rem",width:"18.5rem",borderRadius:"0.75rem"},`${r}-2`),t.jsx(p.SkeletonLinePlaceholder,{height:"24.75rem",width:"18.5rem",borderRadius:"0.75rem"},`${r}-3`)]}),L=({keyPrefix:r,isLoading:l=!1,fallbackComponent:n=t.jsx(t.Fragment,{}),children:o})=>t.jsx(u.Suspense,{fallbackComponent:n,children:l===!0?t.jsx(I,{keyPrefix:r}):o}),B=u.forwardRef((r,l)=>{const{items:n,limit:o=3,onSelectCard:c=()=>{},isLoading:f=!1,componentName:d,LinkComponent:i}=r,m=C.useDetectMobile();return t.jsx(L,{isLoading:f,keyPrefix:"blogs-simple-centered-skeleton",children:t.jsx(v,{ref:l,limit:o,children:t.jsx(t.Fragment,{children:m===!0?n==null?void 0:n.map((e,a)=>t.jsx(w,{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:(h,s)=>c(e,s),metadata:{name:d,accessor:e==null?void 0:e.accessor},link:e==null?void 0:e.link,LinkComponent:i},a)):n==null?void 0:n.slice(0,o).map((e,a)=>t.jsx(w,{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:(h,s)=>c(e,s),metadata:{name:d,accessor:e==null?void 0:e.accessor},link:e==null?void 0:e.link,LinkComponent:i},a))})})})});module.exports=B;
@@ -1,22 +1,22 @@
1
- import { jsxs as f, jsx as t, Fragment as w } from "react/jsx-runtime";
2
- import { forwardRef as C, useRef as k, Suspense as y } from "react";
3
- import { s as p } from "./emotion-styled.browser.esm-BNN1dTl3.js";
4
- import { M as u } from "./consts-BuFChS64.js";
5
- import { u as S } from "./useDetectMobile-Bkvj0VMa.js";
6
- import { o as v } from "./utils-Dc5zIpaz.js";
7
- import $ from "./Button.js";
8
- import { P as R } from "./index-C_NnINik.js";
9
- import { a as T, b as h } from "./style-CXMUA6cI.js";
10
- const B = p.div`
1
+ import { jsxs as u, jsx as t, Fragment as C } from "react/jsx-runtime";
2
+ import { forwardRef as k, useRef as S, Suspense as v } from "react";
3
+ import { s as g } 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 R } from "./utils-Dc5zIpaz.js";
7
+ import T from "./Button.js";
8
+ import { P as B } from "./index-C_NnINik.js";
9
+ import { a as I, b as f } from "./style-CXMUA6cI.js";
10
+ const L = g.div`
11
11
  display: grid;
12
12
  grid-template-columns: ${(r) => `repeat(${r.limit}, minmax(0, 1fr))`};
13
13
  gap: 1.25rem;
14
14
  margin: auto;
15
15
  width: fit-content;
16
- @media (max-width: ${u + "px"}) {
16
+ @media (max-width: ${b + "px"}) {
17
17
  grid-template-columns: repeat(1, 1fr);
18
18
  }
19
- `, I = p.a`
19
+ `, W = g.a`
20
20
  text-decoration: none;
21
21
  color: var(--gray-950);
22
22
  display: flex;
@@ -54,10 +54,10 @@ const B = p.div`
54
54
  object-fit: cover;
55
55
  }
56
56
 
57
- @media (max-width: ${u + "px"}) {
57
+ @media (max-width: ${b + "px"}) {
58
58
  max-width: unset;
59
59
  }
60
- `, W = p.div`
60
+ `, j = g.div`
61
61
  text-align: center;
62
62
  display: flex;
63
63
  flex-direction: column;
@@ -78,44 +78,54 @@ const B = p.div`
78
78
  font-weight: 400;
79
79
  line-height: 1.25rem;
80
80
  letter-spacing: 0.0156rem;
81
- ${v(3)}
81
+ ${R(3)}
82
82
  }
83
- `, b = C((r, m) => {
84
- const { title: i, image: o, text: s, buttonText: g, onCardClick: d, metadata: n, link: e } = r, a = k(), c = (l) => {
85
- d(l, a);
83
+ `, w = k((r, l) => {
84
+ const {
85
+ title: i,
86
+ image: o,
87
+ text: s,
88
+ buttonText: h,
89
+ onCardClick: d,
90
+ metadata: n,
91
+ link: c,
92
+ LinkComponent: e
93
+ } = r, m = e || "a", p = S(), a = (y) => {
94
+ d(y, p);
86
95
  };
87
- return /* @__PURE__ */ f(
88
- I,
96
+ return /* @__PURE__ */ u(
97
+ W,
89
98
  {
90
- ref: a,
99
+ ref: p,
91
100
  name: n == null ? void 0 : n.name,
92
101
  "data-accessor": n == null ? void 0 : n.accessor,
93
102
  className: "blog-card",
94
- onClick: c,
95
- href: `/${e}`,
103
+ onClick: a,
104
+ as: m,
105
+ ...e ? { to: `/${c}` } : { href: `/${c}` },
96
106
  children: [
97
- /* @__PURE__ */ t(R, { src: o }),
98
- /* @__PURE__ */ f(W, { children: [
107
+ /* @__PURE__ */ t(B, { src: o }),
108
+ /* @__PURE__ */ u(j, { children: [
99
109
  /* @__PURE__ */ t("div", { className: "text-wr-title", children: i }),
100
110
  /* @__PURE__ */ t("div", { className: "text-wr", children: s })
101
111
  ] }),
102
112
  /* @__PURE__ */ t(
103
- $,
113
+ T,
104
114
  {
105
115
  borderRadius: "curved",
106
116
  color: "gray",
107
117
  type: "button",
108
118
  btnType: "outline",
109
- onClick: c,
119
+ onClick: a,
110
120
  size: "medium",
111
- children: g
121
+ children: h
112
122
  }
113
123
  )
114
124
  ]
115
125
  }
116
126
  );
117
- }), j = p(T)`
118
- @media (max-width: ${u + "px"}) {
127
+ }), z = g(I)`
128
+ @media (max-width: ${b + "px"}) {
119
129
  flex-direction: column;
120
130
 
121
131
  & > div {
@@ -131,9 +141,9 @@ const B = p.div`
131
141
  box-shadow: none;
132
142
  }
133
143
  }
134
- `, z = ({ keyPrefix: r }) => /* @__PURE__ */ f(j, { justifyContent: "center", alignItems: "center", children: [
144
+ `, M = ({ keyPrefix: r }) => /* @__PURE__ */ u(z, { justifyContent: "center", alignItems: "center", children: [
135
145
  /* @__PURE__ */ t(
136
- h,
146
+ f,
137
147
  {
138
148
  height: "24.75rem",
139
149
  width: "18.5rem",
@@ -142,7 +152,7 @@ const B = p.div`
142
152
  `${r}-1`
143
153
  ),
144
154
  /* @__PURE__ */ t(
145
- h,
155
+ f,
146
156
  {
147
157
  height: "24.75rem",
148
158
  width: "18.5rem",
@@ -151,7 +161,7 @@ const B = p.div`
151
161
  `${r}-2`
152
162
  ),
153
163
  /* @__PURE__ */ t(
154
- h,
164
+ f,
155
165
  {
156
166
  height: "24.75rem",
157
167
  width: "18.5rem",
@@ -159,53 +169,56 @@ const B = p.div`
159
169
  },
160
170
  `${r}-3`
161
171
  )
162
- ] }), M = ({
172
+ ] }), N = ({
163
173
  keyPrefix: r,
164
- isLoading: m = !1,
165
- fallbackComponent: i = /* @__PURE__ */ t(w, {}),
174
+ isLoading: l = !1,
175
+ fallbackComponent: i = /* @__PURE__ */ t(C, {}),
166
176
  children: o
167
- }) => /* @__PURE__ */ t(y, { fallbackComponent: i, children: m === !0 ? /* @__PURE__ */ t(z, { keyPrefix: r }) : o }), X = C((r, m) => {
177
+ }) => /* @__PURE__ */ t(v, { fallbackComponent: i, children: l === !0 ? /* @__PURE__ */ t(M, { keyPrefix: r }) : o }), q = k((r, l) => {
168
178
  const {
169
179
  items: i,
170
180
  limit: o = 3,
171
181
  onSelectCard: s = () => {
172
182
  },
173
- isLoading: g = !1,
174
- componentName: d
175
- } = r, n = S();
183
+ isLoading: h = !1,
184
+ componentName: d,
185
+ LinkComponent: n
186
+ } = r, c = $();
176
187
  return /* @__PURE__ */ t(
177
- M,
188
+ N,
178
189
  {
179
- isLoading: g,
190
+ isLoading: h,
180
191
  keyPrefix: "blogs-simple-centered-skeleton",
181
- children: /* @__PURE__ */ t(B, { ref: m, limit: o, children: /* @__PURE__ */ t(w, { children: n === !0 ? i == null ? void 0 : i.map((e, a) => /* @__PURE__ */ t(
182
- b,
192
+ children: /* @__PURE__ */ t(L, { ref: l, limit: o, children: /* @__PURE__ */ t(C, { children: c === !0 ? i == null ? void 0 : i.map((e, m) => /* @__PURE__ */ t(
193
+ w,
183
194
  {
184
195
  title: e == null ? void 0 : e.title,
185
196
  image: (e == null ? void 0 : e.image) || null,
186
197
  text: e == null ? void 0 : e.text,
187
198
  buttonText: e == null ? void 0 : e.buttonText,
188
- onCardClick: (c, l) => s(e, l),
199
+ onCardClick: (p, a) => s(e, a),
189
200
  metadata: { name: d, accessor: e == null ? void 0 : e.accessor },
190
- link: e == null ? void 0 : e.link
201
+ link: e == null ? void 0 : e.link,
202
+ LinkComponent: n
191
203
  },
192
- a
193
- )) : i == null ? void 0 : i.slice(0, o).map((e, a) => /* @__PURE__ */ t(
194
- b,
204
+ m
205
+ )) : i == null ? void 0 : i.slice(0, o).map((e, m) => /* @__PURE__ */ t(
206
+ w,
195
207
  {
196
208
  title: e == null ? void 0 : e.title,
197
209
  image: (e == null ? void 0 : e.image) || null,
198
210
  text: e == null ? void 0 : e.text,
199
211
  buttonText: e == null ? void 0 : e.buttonText,
200
- onCardClick: (c, l) => s(e, l),
212
+ onCardClick: (p, a) => s(e, a),
201
213
  metadata: { name: d, accessor: e == null ? void 0 : e.accessor },
202
- link: e == null ? void 0 : e.link
214
+ link: e == null ? void 0 : e.link,
215
+ LinkComponent: n
203
216
  },
204
- a
217
+ m
205
218
  )) }) })
206
219
  }
207
220
  );
208
221
  });
209
222
  export {
210
- X as default
223
+ q as default
211
224
  };
@@ -1,12 +1,12 @@
1
- "use strict";const t=require("react/jsx-runtime"),a=require("react"),j=require("./emotion-styled.browser.esm-BtEseadx.cjs"),w=require("./consts-goSZX3xP.cjs"),L=require("./useDetectMobile-zkbzoOGV.cjs"),b=require("./utils-RnrgDDZP.cjs"),W=require("./style-CkcozOY6.cjs"),T=require("./Button.cjs"),E=require("./Link.cjs"),I=require("./index-uwl7BjRF.cjs"),M=require("./index-CSNxZFTX.cjs"),s=require("./style-BAcV7F53.cjs"),P=j.styled.div`
1
+ "use strict";const t=require("react/jsx-runtime"),a=require("react"),S=require("./emotion-styled.browser.esm-BtEseadx.cjs"),C=require("./consts-goSZX3xP.cjs"),W=require("./useDetectMobile-zkbzoOGV.cjs"),k=require("./utils-RnrgDDZP.cjs"),T=require("./style-CkcozOY6.cjs"),E=require("./Button.cjs"),I=require("./Link.cjs"),M=require("./index-uwl7BjRF.cjs"),P=require("./index-CSNxZFTX.cjs"),s=require("./style-BAcV7F53.cjs"),O=S.styled.div`
2
2
  display: grid;
3
3
  grid-template-columns: ${r=>`repeat(${r.limit}, minmax(0, 1fr))`};
4
4
  gap: 1.25rem;
5
5
 
6
- @media (max-width: ${w.MOBILE_SIZE_PX+"px"}) {
6
+ @media (max-width: ${C.MOBILE_SIZE_PX+"px"}) {
7
7
  grid-template-columns: repeat(1, 1fr);
8
8
  }
9
- `,O=j.styled.a`
9
+ `,z=S.styled.a`
10
10
  text-decoration: none;
11
11
  color: var(--gray-950);
12
12
  display: flex;
@@ -39,9 +39,9 @@
39
39
  margin-top: auto;
40
40
  }
41
41
 
42
- @media (max-width: ${w.MOBILE_SIZE_PX+"px"}) {
42
+ @media (max-width: ${C.MOBILE_SIZE_PX+"px"}) {
43
43
  }
44
- `,z=j.styled.div`
44
+ `,D=S.styled.div`
45
45
  display: flex;
46
46
  flex-direction: column;
47
47
  gap: 0.5rem;
@@ -56,10 +56,10 @@
56
56
  font-weight: 400;
57
57
  font-size: 0.875rem;
58
58
  color: var(--gray-700, #4e555f);
59
- ${b.truncateTextInRows(3)}
59
+ ${k.truncateTextInRows(3)}
60
60
  }
61
- `,D=a.forwardRef((r,u)=>{const{title:l,imageUrl:c,text:n,buttonText:h,onCardClick:d,metadata:i,link:f}=r,p=a.useRef(),m=g=>{d(g,p)};return t.jsxs(O,{ref:p,name:i==null?void 0:i.name,"data-accessor":i==null?void 0:i.accessor,className:"blog-card",onClick:m,href:`/${f}`,children:[t.jsxs(z,{children:[t.jsx("div",{className:"text-wr-title",children:l}),t.jsx("div",{className:"text-wr",children:n}),t.jsx(E,{color:"gray",onClick:m,children:h})]}),t.jsx(I.ProductImageWrapper,{src:c})]})}),F=j.styled(s.SkeletonColumnWrapper)`
62
- @media (max-width: ${w.MOBILE_SIZE_PX+"px"}) {
61
+ `,F=a.forwardRef((r,h)=>{const{title:l,imageUrl:c,text:i,buttonText:p,onCardClick:d,metadata:o,link:m,LinkComponent:g}=r,b=g||"a",u=a.useRef(),j=f=>{d(f,u)};return t.jsxs(z,{ref:u,name:o==null?void 0:o.name,"data-accessor":o==null?void 0:o.accessor,className:"blog-card",onClick:j,to:`/${m}`,as:b,...g?{to:`/${m}`}:{href:`/${m}`},children:[t.jsxs(D,{children:[t.jsx("div",{className:"text-wr-title",children:l}),t.jsx("div",{className:"text-wr",children:i}),t.jsx(I,{color:"gray",onClick:j,children:p})]}),t.jsx(M.ProductImageWrapper,{src:c})]})}),A=S.styled(s.SkeletonColumnWrapper)`
62
+ @media (max-width: ${C.MOBILE_SIZE_PX+"px"}) {
63
63
  & .skeleton__tags {
64
64
  & > div {
65
65
  width: 100%;
@@ -81,4 +81,4 @@
81
81
  }
82
82
  }
83
83
  }
84
- `,A=({keyPrefix:r})=>t.jsxs(F,{children:[t.jsxs(s.SkeletonRowWrapper,{className:"skeleton__tags",children:[t.jsx(s.SkeletonLinePlaceholder,{height:"2.25rem",width:"128px",borderRadius:"1rem"},`${r}-1`),t.jsx(s.SkeletonLinePlaceholder,{height:"2.25rem",width:"128px",borderRadius:"1rem"},`${r}-2`),t.jsx(s.SkeletonLinePlaceholder,{height:"2.25rem",width:"128px",borderRadius:"1rem"},`${r}-3`)]}),t.jsxs(s.SkeletonRowWrapper,{className:"skeleton__cards",children:[t.jsx(s.SkeletonLinePlaceholder,{height:"10.375rem",borderRadius:"0.75rem"},`${r}-4`),t.jsx(s.SkeletonLinePlaceholder,{height:"10.375rem",borderRadius:"0.75rem"},`${r}-5`),t.jsx(s.SkeletonLinePlaceholder,{height:"10.375rem",borderRadius:"0.75rem"},`${r}-6`)]})]}),U=({keyPrefix:r,isLoading:u=!1,fallbackComponent:l=t.jsx(t.Fragment,{}),children:c})=>t.jsx(a.Suspense,{fallbackComponent:l,children:u===!0?t.jsx(A,{keyPrefix:r}):c}),C=a.memo(D),X=a.forwardRef((r,u)=>{const{icon:l,title:c,items:n,buttonText:h,limit:d=3,options:i,selectedOption:f=[],onButtonAction:p=()=>{},buttonLink:m,onSelectOption:g=()=>{},onSelectAll:_=()=>{},isLoading:v=!1,onSelectCard:y=()=>{},productsToolbarName:$="All",allButton:N=!1,componentName:x}=r,R=L.useDetectMobile(),q=a.useMemo(()=>{var o;return t.jsx(t.Fragment,{children:R===!0?n==null?void 0:n.map((e,S)=>t.jsx(C,{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:(B,k)=>y(e,k),metadata:{name:x,accessor:e==null?void 0:e.accessor},link:e==null?void 0:e.link},S)):(o=n==null?void 0:n.slice(0,d))==null?void 0:o.map((e,S)=>t.jsx(C,{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:(B,k)=>y(e,k),metadata:{name:x,accessor:e==null?void 0:e.accessor},link:e==null?void 0:e.link},S))})},[n,R,d]);return t.jsxs(W.TitleWithOptionsSectionWrapper,{ref:u,children:[t.jsxs("div",{className:"regular-title",children:[t.jsxs("div",{className:"regular-title-text",children:[b.isDefinedNotEmptyString(l)&&t.jsx("i",{className:l}),t.jsx("span",{children:c})]}),b.isDefinedNotEmptyString(h)&&b.isDefinedNotEmptyString(m)&&!v&&t.jsx(T,{type:"button",btnType:"tinted",color:"neutral",onClick:o=>{var e;(e=o==null?void 0:o.target)==null||e.blur(),p(m)},borderRadius:"curved",children:h})]}),t.jsxs(U,{isLoading:v,keyPrefix:"blogs-with-filters-skeleton",children:[(i==null?void 0:i.length)>0&&t.jsx(M.SelectBar,{items:i,selectedIds:f,onRemove:o=>{g(o)},onSelect:o=>{g(o)},onSelectAll:_,labelKey:"name",valueKey:"code",noMargin:!0,productsToolbarName:$,allButton:N}),t.jsx(P,{limit:d,children:q})]})]})});module.exports=X;
84
+ `,U=({keyPrefix:r})=>t.jsxs(A,{children:[t.jsxs(s.SkeletonRowWrapper,{className:"skeleton__tags",children:[t.jsx(s.SkeletonLinePlaceholder,{height:"2.25rem",width:"128px",borderRadius:"1rem"},`${r}-1`),t.jsx(s.SkeletonLinePlaceholder,{height:"2.25rem",width:"128px",borderRadius:"1rem"},`${r}-2`),t.jsx(s.SkeletonLinePlaceholder,{height:"2.25rem",width:"128px",borderRadius:"1rem"},`${r}-3`)]}),t.jsxs(s.SkeletonRowWrapper,{className:"skeleton__cards",children:[t.jsx(s.SkeletonLinePlaceholder,{height:"10.375rem",borderRadius:"0.75rem"},`${r}-4`),t.jsx(s.SkeletonLinePlaceholder,{height:"10.375rem",borderRadius:"0.75rem"},`${r}-5`),t.jsx(s.SkeletonLinePlaceholder,{height:"10.375rem",borderRadius:"0.75rem"},`${r}-6`)]})]}),X=({keyPrefix:r,isLoading:h=!1,fallbackComponent:l=t.jsx(t.Fragment,{}),children:c})=>t.jsx(a.Suspense,{fallbackComponent:l,children:h===!0?t.jsx(U,{keyPrefix:r}):c}),_=a.memo(F),Z=a.forwardRef((r,h)=>{const{icon:l,title:c,items:i,buttonText:p,limit:d=3,options:o,selectedOption:m=[],onButtonAction:g=()=>{},buttonLink:b,onSelectOption:u=()=>{},onSelectAll:j=()=>{},isLoading:f=!1,onSelectCard:y=()=>{},productsToolbarName:L="All",allButton:N=!1,componentName:x,LinkComponent:R}=r,$=W.useDetectMobile(),q=a.useMemo(()=>{var n;return t.jsx(t.Fragment,{children:$===!0?i==null?void 0:i.map((e,w)=>t.jsx(_,{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:(B,v)=>y(e,v),metadata:{name:x,accessor:e==null?void 0:e.accessor},link:e==null?void 0:e.link,LinkComponent:R},w)):(n=i==null?void 0:i.slice(0,d))==null?void 0:n.map((e,w)=>t.jsx(_,{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:(B,v)=>y(e,v),metadata:{name:x,accessor:e==null?void 0:e.accessor},link:e==null?void 0:e.link,LinkComponent:R},w))})},[i,$,d]);return t.jsxs(T.TitleWithOptionsSectionWrapper,{ref:h,children:[t.jsxs("div",{className:"regular-title",children:[t.jsxs("div",{className:"regular-title-text",children:[k.isDefinedNotEmptyString(l)&&t.jsx("i",{className:l}),t.jsx("span",{children:c})]}),k.isDefinedNotEmptyString(p)&&k.isDefinedNotEmptyString(b)&&!f&&t.jsx(E,{type:"button",btnType:"tinted",color:"neutral",onClick:n=>{var e;(e=n==null?void 0:n.target)==null||e.blur(),g(b)},borderRadius:"curved",children:p})]}),t.jsxs(X,{isLoading:f,keyPrefix:"blogs-with-filters-skeleton",children:[(o==null?void 0:o.length)>0&&t.jsx(P.SelectBar,{items:o,selectedIds:m,onRemove:n=>{u(n)},onSelect:n=>{u(n)},onSelectAll:j,labelKey:"name",valueKey:"code",noMargin:!0,productsToolbarName:L,allButton:N}),t.jsx(O,{limit:d,children:q})]})]})});module.exports=Z;