@lanaco/lnc-react-ui 4.0.78 → 4.0.79

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- "use strict";const t=require("react/jsx-runtime"),a=require("react"),u=require("./emotion-styled.browser.esm-BtEseadx.cjs"),p=require("./consts-CtNoHdBj.cjs"),b=require("./useDetectMobile-D6d5LpdL.cjs"),m=require("./utils-BXPz9bck.cjs"),j=require("./Button.cjs"),S=require("./index-CAqPGuiA.cjs"),k=u.styled.div`
1
+ "use strict";const t=require("react/jsx-runtime"),l=require("react"),u=require("./emotion-styled.browser.esm-BtEseadx.cjs"),p=require("./consts-CtNoHdBj.cjs"),x=require("./useDetectMobile-D6d5LpdL.cjs"),m=require("./utils-BXPz9bck.cjs"),w=require("./Button.cjs"),b=require("./index-CAqPGuiA.cjs"),j=u.styled.div`
2
2
  display: grid;
3
3
  grid-template-columns: ${i=>`repeat(${i.limit}, minmax(0, 1fr))`};
4
4
  gap: 1.25rem;
@@ -74,4 +74,4 @@
74
74
  color: var(--gray-700, #4e555f);
75
75
  ${m.truncateTextInRows(3)}
76
76
  }
77
- `,g=a.forwardRef((i,n)=>{const{title:r,imageUrl:l,text:o,buttonText:d,onCardClick:s}=i;return t.jsxs(h,{ref:n,className:"blog-card",onClick:s,children:[t.jsx(S.ProductImageWrapper,{src:l}),t.jsxs(f,{children:[t.jsx("div",{className:"text-wr-title",children:r}),t.jsx("div",{className:"text-wr",children:o})]}),t.jsx(j,{borderRadius:"curved",color:"gray",type:"button",btnType:"outline",onClick:s,size:"medium",children:d})]})}),C=a.forwardRef((i,n)=>{const{onCardClick:r}=i;return t.jsxs(h,{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},(l,o)=>t.jsx(C,{isLoading:n},`${r}-skeleton-product-card-${o}`))}),v=({children:i,fallbackComponent:n=t.jsx(t.Fragment,{}),isLoading:r=!1,limit:l,keyPrefix:o})=>t.jsx(a.Suspense,{fallbackComponent:n,children:r===!0?t.jsx(y,{isLoading:r,limit:l,keyPrefix:o}):i}),$=a.forwardRef((i,n)=>{const{items:r,limit:l=3,onSelectCard:o=()=>{},isLoading:d=!1,getImage:s=()=>{}}=i,w=b.useDetectMobile();return t.jsx(k,{ref:n,limit:l,children:t.jsx(v,{isLoading:d,limit:l,keyPrefix:"explore-landing",children:t.jsx(t.Fragment,{children:w===!0?r==null?void 0:r.map((e,c)=>t.jsx(g,{title:e==null?void 0:e.title,imageUrl:s(e==null?void 0:e.imageUrl,e==null?void 0:e.uuid)||null,text:e==null?void 0:e.description,titleSlug:e==null?void 0:e.titleSlug,buttonText:e==null?void 0:e.buttonText,onCardClick:()=>o(e==null?void 0:e.titleSlug)},c)):r==null?void 0:r.slice(0,l).map((e,c)=>t.jsx(g,{title:e==null?void 0:e.title,imageUrl:s(e==null?void 0:e.imageUrl,e==null?void 0:e.uuid)||null,text:e==null?void 0:e.description,titleSlug:e==null?void 0:e.titleSlug,buttonText:e==null?void 0:e.buttonText,onCardClick:()=>o(e==null?void 0:e.titleSlug)},c))})})})});module.exports=$;
77
+ `,g=l.forwardRef((i,n)=>{const{title:r,image:o,text:a,buttonText:d,onCardClick:s}=i;return t.jsxs(h,{ref:n,className:"blog-card",onClick:s,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:a})]}),t.jsx(w,{borderRadius:"curved",color:"gray",type:"button",btnType:"outline",onClick:s,size:"medium",children:d})]})}),k=l.forwardRef((i,n)=>{const{onCardClick:r}=i;return t.jsxs(h,{className:"product-card",onClick:r,children:[t.jsx("div",{className:"skeleton-img"}),t.jsx(f,{children:t.jsx("div",{className:"skeleton-title"})})]})}),C=({limit:i=3,isLoading:n=!1,keyPrefix:r})=>t.jsx(t.Fragment,{children:Array.from({length:i},(o,a)=>t.jsx(k,{isLoading:n},`${r}-skeleton-product-card-${a}`))}),y=({children:i,fallbackComponent:n=t.jsx(t.Fragment,{}),isLoading:r=!1,limit:o,keyPrefix:a})=>t.jsx(l.Suspense,{fallbackComponent:n,children:r===!0?t.jsx(C,{isLoading:r,limit:o,keyPrefix:a}):i}),v=l.forwardRef((i,n)=>{const{items:r,limit:o=3,onSelectCard:a=()=>{},isLoading:d=!1}=i,s=x.useDetectMobile();return t.jsx(j,{ref:n,limit:o,children:t.jsx(y,{isLoading:d,limit:o,keyPrefix:"explore-landing",children:t.jsx(t.Fragment,{children:s===!0?r==null?void 0:r.map((e,c)=>t.jsx(g,{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:()=>a(e)},c)):r==null?void 0:r.slice(0,o).map((e,c)=>t.jsx(g,{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:()=>a(e)},c))})})})});module.exports=v;
@@ -1,12 +1,12 @@
1
1
  import { jsxs as c, jsx as t, Fragment as s } from "react/jsx-runtime";
2
- import { forwardRef as g, Suspense as C } from "react";
3
- import { s as p } from "./emotion-styled.browser.esm-BNN1dTl3.js";
2
+ import { forwardRef as p, Suspense as k } from "react";
3
+ import { s as g } from "./emotion-styled.browser.esm-BNN1dTl3.js";
4
4
  import { M as h } from "./consts-C1uHV4xc.js";
5
- import { u as S } from "./useDetectMobile-BC6EGaBc.js";
5
+ import { u as C } from "./useDetectMobile-BC6EGaBc.js";
6
6
  import { m as f, t as v } from "./utils-DCs-SbIv.js";
7
7
  import y from "./Button.js";
8
- import { P as $ } from "./index-BLxkXrqU.js";
9
- const T = p.div`
8
+ import { P as S } from "./index-BLxkXrqU.js";
9
+ const $ = g.div`
10
10
  display: grid;
11
11
  grid-template-columns: ${(i) => `repeat(${i.limit}, minmax(0, 1fr))`};
12
12
  gap: 1.25rem;
@@ -15,7 +15,7 @@ const T = p.div`
15
15
  @media (max-width: ${h + "px"}) {
16
16
  grid-template-columns: repeat(1, 1fr);
17
17
  }
18
- `, b = p.div`
18
+ `, b = g.div`
19
19
  display: flex;
20
20
  flex-direction: column;
21
21
  width: 100%;
@@ -57,7 +57,7 @@ const T = p.div`
57
57
  @media (max-width: ${h + "px"}) {
58
58
  max-width: unset;
59
59
  }
60
- `, w = p.div`
60
+ `, w = g.div`
61
61
  text-align: center;
62
62
  display: flex;
63
63
  flex-direction: column;
@@ -82,13 +82,13 @@ const T = p.div`
82
82
  color: var(--gray-700, #4e555f);
83
83
  ${v(3)}
84
84
  }
85
- `, u = g((i, o) => {
86
- const { title: r, imageUrl: l, text: n, buttonText: d, onCardClick: a } = i;
87
- return /* @__PURE__ */ c(b, { ref: o, className: "blog-card", onClick: a, children: [
88
- /* @__PURE__ */ t($, { src: l }),
85
+ `, u = p((i, o) => {
86
+ const { title: r, image: n, text: a, buttonText: m, onCardClick: l } = i;
87
+ return /* @__PURE__ */ c(b, { ref: o, className: "blog-card", onClick: l, children: [
88
+ /* @__PURE__ */ t(S, { src: n }),
89
89
  /* @__PURE__ */ c(w, { children: [
90
90
  /* @__PURE__ */ t("div", { className: "text-wr-title", children: r }),
91
- /* @__PURE__ */ t("div", { className: "text-wr", children: n })
91
+ /* @__PURE__ */ t("div", { className: "text-wr", children: a })
92
92
  ] }),
93
93
  /* @__PURE__ */ t(
94
94
  y,
@@ -97,13 +97,13 @@ const T = p.div`
97
97
  color: "gray",
98
98
  type: "button",
99
99
  btnType: "outline",
100
- onClick: a,
100
+ onClick: l,
101
101
  size: "medium",
102
- children: d
102
+ children: m
103
103
  }
104
104
  )
105
105
  ] });
106
- }), B = g((i, o) => {
106
+ }), x = p((i, o) => {
107
107
  const { onCardClick: r } = i;
108
108
  return (
109
109
  // <SimpleBlogCardSkeleton />
@@ -112,67 +112,63 @@ const T = p.div`
112
112
  /* @__PURE__ */ t(w, { children: /* @__PURE__ */ t("div", { className: "skeleton-title" }) })
113
113
  ] })
114
114
  );
115
- }), N = ({ limit: i = 3, isLoading: o = !1, keyPrefix: r }) => /* @__PURE__ */ t(s, { children: Array.from({ length: i }, (l, n) => /* @__PURE__ */ t(
116
- B,
115
+ }), T = ({ limit: i = 3, isLoading: o = !1, keyPrefix: r }) => /* @__PURE__ */ t(s, { children: Array.from({ length: i }, (n, a) => /* @__PURE__ */ t(
116
+ x,
117
117
  {
118
118
  isLoading: o
119
119
  },
120
- `${r}-skeleton-product-card-${n}`
121
- )) }), I = ({
120
+ `${r}-skeleton-product-card-${a}`
121
+ )) }), B = ({
122
122
  children: i,
123
123
  fallbackComponent: o = /* @__PURE__ */ t(s, {}),
124
124
  isLoading: r = !1,
125
- limit: l,
126
- keyPrefix: n
127
- }) => /* @__PURE__ */ t(C, { fallbackComponent: o, children: r === !0 ? /* @__PURE__ */ t(
128
- N,
125
+ limit: n,
126
+ keyPrefix: a
127
+ }) => /* @__PURE__ */ t(k, { fallbackComponent: o, children: r === !0 ? /* @__PURE__ */ t(
128
+ T,
129
129
  {
130
130
  isLoading: r,
131
- limit: l,
132
- keyPrefix: n
131
+ limit: n,
132
+ keyPrefix: a
133
133
  }
134
- ) : i }), A = g((i, o) => {
134
+ ) : i }), _ = p((i, o) => {
135
135
  const {
136
136
  items: r,
137
- limit: l = 3,
138
- onSelectCard: n = () => {
137
+ limit: n = 3,
138
+ onSelectCard: a = () => {
139
139
  },
140
- isLoading: d = !1,
141
- getImage: a = () => {
142
- }
143
- } = i, k = S();
144
- return /* @__PURE__ */ t(T, { ref: o, limit: l, children: /* @__PURE__ */ t(
145
- I,
140
+ isLoading: m = !1
141
+ } = i, l = C();
142
+ return /* @__PURE__ */ t($, { ref: o, limit: n, children: /* @__PURE__ */ t(
143
+ B,
146
144
  {
147
- isLoading: d,
148
- limit: l,
145
+ isLoading: m,
146
+ limit: n,
149
147
  keyPrefix: "explore-landing",
150
- children: /* @__PURE__ */ t(s, { children: k === !0 ? r == null ? void 0 : r.map((e, m) => /* @__PURE__ */ t(
148
+ children: /* @__PURE__ */ t(s, { children: l === !0 ? r == null ? void 0 : r.map((e, d) => /* @__PURE__ */ t(
151
149
  u,
152
150
  {
153
151
  title: e == null ? void 0 : e.title,
154
- imageUrl: a(e == null ? void 0 : e.imageUrl, e == null ? void 0 : e.uuid) || null,
155
- text: e == null ? void 0 : e.description,
156
- titleSlug: e == null ? void 0 : e.titleSlug,
152
+ image: (e == null ? void 0 : e.image) || null,
153
+ text: e == null ? void 0 : e.text,
157
154
  buttonText: e == null ? void 0 : e.buttonText,
158
- onCardClick: () => n(e == null ? void 0 : e.titleSlug)
155
+ onCardClick: () => a(e)
159
156
  },
160
- m
161
- )) : r == null ? void 0 : r.slice(0, l).map((e, m) => /* @__PURE__ */ t(
157
+ d
158
+ )) : r == null ? void 0 : r.slice(0, n).map((e, d) => /* @__PURE__ */ t(
162
159
  u,
163
160
  {
164
161
  title: e == null ? void 0 : e.title,
165
- imageUrl: a(e == null ? void 0 : e.imageUrl, e == null ? void 0 : e.uuid) || null,
166
- text: e == null ? void 0 : e.description,
167
- titleSlug: e == null ? void 0 : e.titleSlug,
162
+ image: (e == null ? void 0 : e.image) || null,
163
+ text: e == null ? void 0 : e.text,
168
164
  buttonText: e == null ? void 0 : e.buttonText,
169
- onCardClick: () => n(e == null ? void 0 : e.titleSlug)
165
+ onCardClick: () => a(e)
170
166
  },
171
- m
167
+ d
172
168
  )) })
173
169
  }
174
170
  ) });
175
171
  });
176
172
  export {
177
- A as default
173
+ _ as default
178
174
  };
@@ -1,4 +1,4 @@
1
- "use strict";const r=require("react/jsx-runtime"),c=require("react"),m=require("./emotion-styled.browser.esm-BtEseadx.cjs"),R=require("./consts-CtNoHdBj.cjs"),S=require("./useDetectMobile-D6d5LpdL.cjs"),h=require("./utils-BXPz9bck.cjs"),$=require("./ThemeProvider.cjs"),a=require("./index-BPVoEhTF.cjs"),N=require("./index-CAqPGuiA.cjs"),P=m.styled.div`
1
+ "use strict";const r=require("react/jsx-runtime"),d=require("react"),c=require("./emotion-styled.browser.esm-BtEseadx.cjs"),S=require("./consts-CtNoHdBj.cjs"),$=require("./useDetectMobile-D6d5LpdL.cjs"),g=require("./utils-BXPz9bck.cjs"),N=require("./ThemeProvider.cjs"),a=require("./index-BPVoEhTF.cjs"),P=require("./index-CAqPGuiA.cjs"),C=c.styled.div`
2
2
  display: flex;
3
3
  flex-direction: column;
4
4
  color: var(--darkest-950);
@@ -8,18 +8,18 @@
8
8
  font-weight: 600;
9
9
  font-size: 1.5rem;
10
10
  }
11
- `,C=m.styled.div`
11
+ `,R=c.styled.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: ${R.MOBILE_SIZE_PX+"px"}) {
16
+ @media (max-width: ${S.MOBILE_SIZE_PX+"px"}) {
17
17
  grid-template-columns: repeat(1, 1fr);
18
18
  }
19
- `,y=m.styled.div`
19
+ `,y=c.styled.div`
20
20
  padding-top: 5rem;
21
21
  overflow: hidden;
22
- `,x=m.styled.div`
22
+ `,v=c.styled.div`
23
23
  position: relative;
24
24
  cursor: pointer;
25
25
  display: flex;
@@ -51,11 +51,11 @@
51
51
  font-size: 1.375rem;
52
52
  font-weight: 600;
53
53
  color: var(--gray-950, #14161a);
54
- ${h.truncateText()}
54
+ ${g.truncateText()}
55
55
  }
56
56
 
57
57
  & .cont-text {
58
- ${h.truncateTextInRows(2)}
58
+ ${g.truncateTextInRows(2)}
59
59
  }
60
60
  }
61
61
 
@@ -91,11 +91,11 @@
91
91
  box-shadow: 0px 10px 15px -3px rgba(0, 0, 0, 0.1),
92
92
  0px 4px 6px -2px rgba(0, 0, 0, 0.05);
93
93
 
94
- ${h.linearGradientAnimation("-90deg")}
94
+ ${g.linearGradientAnimation("-90deg")}
95
95
  }
96
- `,b=(t,o)=>h.getComponentPropValue(t.theme,"StarRating",t.color,t.disabled===!0?"disabled":"enabled",o),T=m.styled.div`
97
- font-size: ${t=>b(t,"fontSize")};
98
- line-height: ${t=>b(t,"lineHeight")};
96
+ `,x=(t,o)=>g.getComponentPropValue(t.theme,"StarRating",t.color,t.disabled===!0?"disabled":"enabled",o),k=c.styled.div`
97
+ font-size: ${t=>x(t,"fontSize")};
98
+ line-height: ${t=>x(t,"lineHeight")};
99
99
  line-height: 1.5rem;
100
100
  width: fit-content;
101
101
  display: flex;
@@ -114,7 +114,7 @@
114
114
  line-height: 1.5rem;
115
115
  color: ${t=>t.color};
116
116
  }
117
- `,z=m.styled.span`
117
+ `,T=c.styled.span`
118
118
  position: absolute;
119
119
  z-index: 1;
120
120
  display: block;
@@ -123,10 +123,10 @@
123
123
  overflow: hidden;
124
124
  width: ${t=>t.width}%;
125
125
 
126
- color: ${t=>h.getColorRgbaValue(t.theme,"StarRating",t.color,t.disabled===!0?"disabled":"enabled","filledColor")};
127
- `,k=m.styled.span`
126
+ color: ${t=>g.getColorRgbaValue(t.theme,"StarRating",t.color,t.disabled===!0?"disabled":"enabled","filledColor")};
127
+ `,z=c.styled.span`
128
128
  padding: 0;
129
129
  display: block;
130
130
  z-index: 0;
131
131
  color: ${t=>t.color};
132
- `,f=c.forwardRef((t,o)=>{const{rating:s=0,reviewCount:i=null,disabled:n=!1,tabIndex:l=0,className:g="",style:p={},color:w="primary",size:e="large"}=t,{theme:u}=$.useTheme(),d={theme:u,color:w,size:e,style:p,disabled:n},j=s/5*100;return r.jsxs(T,{ref:o,tabIndex:l,...d,className:`star-rating ${g}`,children:[r.jsxs("div",{className:"rating",children:[r.jsx(z,{className:"filled-stars",...d,width:j,children:"★★★★★"}),r.jsx(k,{...d,children:"★★★★★"})]}),!isNaN(i)&&Number.isFinite(i)&&r.jsx("div",{className:"review-count",children:`(${i.toLocaleString()})`})]})});f.propTypes={rating:a.PropTypes.number,reviewCount:a.PropTypes.any,disabled:a.PropTypes.bool,tabIndex:a.PropTypes.number,style:a.PropTypes.object,className:a.PropTypes.string,color:a.PropTypes.oneOf(["primary","secondary","success","warning","danger","information","neutral"]),size:a.PropTypes.oneOf(["small","medium","large"])};const q=c.forwardRef((t,o)=>{const{uuid:s,image:i,text:n,title:l,onSelectReview:g=()=>{},rating:p}=t;return r.jsx(y,{ref:o,className:"review-card",onClick:()=>g(s),children:r.jsxs(x,{children:[r.jsx(N.ProductImageWrapper,{src:i}),r.jsxs("div",{className:"cont",children:[r.jsx("span",{className:"cont-title",children:l}),r.jsx("div",{className:"cont-text",children:n})]}),r.jsx(f,{color:"warning",rating:p})]})})}),M=c.forwardRef(({},t)=>r.jsx(y,{className:"review-card",children:r.jsxs(x,{children:[r.jsx("div",{className:"skeleton-img"}),r.jsx("div",{className:"cont"}),r.jsx(f,{color:"warning",rating:0})]})})),I=({limit:t=3,isLoading:o=!1,keyPrefix:s})=>r.jsx(r.Fragment,{children:Array.from({length:t},(i,n)=>r.jsx(M,{isLoading:o},`${s}-skeleton-review-card-${n}`))}),E=({children:t,fallbackComponent:o=r.jsx(r.Fragment,{}),isLoading:s=!1,limit:i,keyPrefix:n})=>r.jsx(c.Suspense,{fallbackComponent:o,children:s===!0?r.jsx(I,{isLoading:s,limit:i,keyPrefix:n}):t}),v=c.memo(q),F=c.forwardRef((t,o)=>{const{title:s="Electronics reviews",items:i,limit:n=3,onSelectCard:l=()=>{},isLoading:g=!1}=t,p=S.useDetectMobile(),w=c.useMemo(()=>r.jsx(r.Fragment,{children:p===!0?i==null?void 0:i.map((e,u)=>r.jsx(v,{text:e==null?void 0:e.text,title:e==null?void 0:e.title,image:e==null?void 0:e.image,uuid:e==null?void 0:e.uuid,rating:e==null?void 0:e.ratingArithmeticMean,productUuid:e==null?void 0:e.productUuid,onSelectReview:d=>l(d)},u)):i==null?void 0:i.slice(0,n).map((e,u)=>r.jsx(v,{text:e==null?void 0:e.text,title:e==null?void 0:e.title,image:e==null?void 0:e.image,uuid:e==null?void 0:e.uuid,rating:e==null?void 0:e.ratingArithmeticMean,productUuid:e==null?void 0:e.productUuid,onSelectReview:d=>l(d)},u))}),[i,p,l,n]);return r.jsxs(P,{ref:o,children:[r.jsx("div",{className:"container-title",children:s}),r.jsx(C,{limit:n,children:r.jsx(E,{isLoading:g,limit:n,keyPrefix:"explore-landing",children:w})})]})});module.exports=F;
132
+ `,w=d.forwardRef((t,o)=>{const{rating:s=0,reviewCount:i=null,disabled:n=!1,tabIndex:l=0,className:m="",style:h={},color:u="primary",size:e="large"}=t,{theme:p}=N.useTheme(),f={theme:p,color:u,size:e,style:h,disabled:n},j=s/5*100;return r.jsxs(k,{ref:o,tabIndex:l,...f,className:`star-rating ${m}`,children:[r.jsxs("div",{className:"rating",children:[r.jsx(T,{className:"filled-stars",...f,width:j,children:"★★★★★"}),r.jsx(z,{...f,children:"★★★★★"})]}),!isNaN(i)&&Number.isFinite(i)&&r.jsx("div",{className:"review-count",children:`(${i.toLocaleString()})`})]})});w.propTypes={rating:a.PropTypes.number,reviewCount:a.PropTypes.any,disabled:a.PropTypes.bool,tabIndex:a.PropTypes.number,style:a.PropTypes.object,className:a.PropTypes.string,color:a.PropTypes.oneOf(["primary","secondary","success","warning","danger","information","neutral"]),size:a.PropTypes.oneOf(["small","medium","large"])};const q=d.forwardRef((t,o)=>{const{image:s,text:i,title:n,onSelectCard:l=()=>{},rating:m}=t;return r.jsx(y,{ref:o,className:"review-card",onClick:l,children:r.jsxs(v,{children:[r.jsx(P.ProductImageWrapper,{src:s}),r.jsxs("div",{className:"cont",children:[r.jsx("span",{className:"cont-title",children:n}),r.jsx("div",{className:"cont-text",children:i})]}),r.jsx(w,{color:"warning",rating:m})]})})}),M=d.forwardRef(({},t)=>r.jsx(y,{className:"review-card",children:r.jsxs(v,{children:[r.jsx("div",{className:"skeleton-img"}),r.jsx("div",{className:"cont"}),r.jsx(w,{color:"warning",rating:0})]})})),I=({limit:t=3,isLoading:o=!1,keyPrefix:s})=>r.jsx(r.Fragment,{children:Array.from({length:t},(i,n)=>r.jsx(M,{isLoading:o},`${s}-skeleton-review-card-${n}`))}),E=({children:t,fallbackComponent:o=r.jsx(r.Fragment,{}),isLoading:s=!1,limit:i,keyPrefix:n})=>r.jsx(d.Suspense,{fallbackComponent:o,children:s===!0?r.jsx(I,{isLoading:s,limit:i,keyPrefix:n}):t}),b=d.memo(q),F=d.forwardRef((t,o)=>{const{title:s="Electronics reviews",items:i,limit:n=3,onSelectCard:l=()=>{},isLoading:m=!1}=t,h=$.useDetectMobile(),u=d.useMemo(()=>r.jsx(r.Fragment,{children:h===!0?i==null?void 0:i.map((e,p)=>r.jsx(b,{text:e==null?void 0:e.text,title:e==null?void 0:e.title,image:e==null?void 0:e.image,link:e==null?void 0:e.link,rating:e==null?void 0:e.ratingArithmeticMean,onSelectCard:()=>l(e)},p)):i==null?void 0:i.slice(0,n).map((e,p)=>r.jsx(b,{text:e==null?void 0:e.text,title:e==null?void 0:e.title,image:e==null?void 0:e.image,link:e==null?void 0:e.link,rating:e==null?void 0:e.ratingArithmeticMean,onSelectCard:()=>l(e)},p))}),[i,h,l,n]);return r.jsxs(C,{ref:o,children:[r.jsx("div",{className:"container-title",children:s}),r.jsx(R,{limit:n,children:r.jsx(E,{isLoading:m,limit:n,keyPrefix:"explore-landing",children:u})})]})});module.exports=F;
@@ -1,13 +1,13 @@
1
- import { jsxs as p, jsx as t, Fragment as w } from "react/jsx-runtime";
2
- import { forwardRef as u, Suspense as R, memo as C, useMemo as z } from "react";
3
- import { s as c } from "./emotion-styled.browser.esm-BNN1dTl3.js";
4
- import { M as k } from "./consts-C1uHV4xc.js";
1
+ import { jsxs as c, jsx as t, Fragment as w } from "react/jsx-runtime";
2
+ import { forwardRef as h, Suspense as C, memo as k, useMemo as x } from "react";
3
+ import { s as d } from "./emotion-styled.browser.esm-BNN1dTl3.js";
4
+ import { M as z } from "./consts-C1uHV4xc.js";
5
5
  import { u as P } from "./useDetectMobile-BC6EGaBc.js";
6
- import { o as M, t as x, m as I, b as j, g as E } from "./utils-DCs-SbIv.js";
6
+ import { o as R, t as M, m as I, b as j, g as E } from "./utils-DCs-SbIv.js";
7
7
  import { useTheme as T } from "./ThemeProvider.js";
8
8
  import { P as l } from "./index-S5Cd7WrG.js";
9
9
  import { P as A } from "./index-BLxkXrqU.js";
10
- const U = c.div`
10
+ const W = d.div`
11
11
  display: flex;
12
12
  flex-direction: column;
13
13
  color: var(--darkest-950);
@@ -17,18 +17,18 @@ const U = c.div`
17
17
  font-weight: 600;
18
18
  font-size: 1.5rem;
19
19
  }
20
- `, W = c.div`
20
+ `, F = d.div`
21
21
  display: grid;
22
22
  grid-template-columns: ${(r) => `repeat(${r.limit}, minmax(0, 1fr))`};
23
23
  gap: 1.25rem;
24
24
 
25
- @media (max-width: ${k + "px"}) {
25
+ @media (max-width: ${z + "px"}) {
26
26
  grid-template-columns: repeat(1, 1fr);
27
27
  }
28
- `, N = c.div`
28
+ `, N = d.div`
29
29
  padding-top: 5rem;
30
30
  overflow: hidden;
31
- `, S = c.div`
31
+ `, S = d.div`
32
32
  position: relative;
33
33
  cursor: pointer;
34
34
  display: flex;
@@ -60,11 +60,11 @@ const U = c.div`
60
60
  font-size: 1.375rem;
61
61
  font-weight: 600;
62
62
  color: var(--gray-950, #14161a);
63
- ${M()}
63
+ ${R()}
64
64
  }
65
65
 
66
66
  & .cont-text {
67
- ${x(2)}
67
+ ${M(2)}
68
68
  }
69
69
  }
70
70
 
@@ -102,13 +102,13 @@ const U = c.div`
102
102
 
103
103
  ${I("-90deg")}
104
104
  }
105
- `, v = (r, a) => E(
105
+ `, v = (r, o) => E(
106
106
  r.theme,
107
107
  "StarRating",
108
108
  r.color,
109
109
  r.disabled === !0 ? "disabled" : "enabled",
110
- a
111
- ), F = c.div`
110
+ o
111
+ ), O = d.div`
112
112
  font-size: ${(r) => v(r, "fontSize")};
113
113
  line-height: ${(r) => v(r, "lineHeight")};
114
114
  line-height: 1.5rem;
@@ -129,7 +129,7 @@ const U = c.div`
129
129
  line-height: 1.5rem;
130
130
  color: ${(r) => r.color};
131
131
  }
132
- `, O = c.span`
132
+ `, _ = d.span`
133
133
  position: absolute;
134
134
  z-index: 1;
135
135
  display: block;
@@ -145,47 +145,47 @@ const U = c.div`
145
145
  r.disabled === !0 ? "disabled" : "enabled",
146
146
  "filledColor"
147
147
  )};
148
- `, _ = c.span`
148
+ `, G = d.span`
149
149
  padding: 0;
150
150
  display: block;
151
151
  z-index: 0;
152
152
  color: ${(r) => r.color};
153
- `, b = u((r, a) => {
153
+ `, b = h((r, o) => {
154
154
  const {
155
155
  rating: n = 0,
156
156
  reviewCount: i = null,
157
- disabled: o = !1,
157
+ disabled: a = !1,
158
158
  tabIndex: s = 0,
159
- className: g = "",
160
- style: m = {},
159
+ className: m = "",
160
+ style: g = {},
161
161
  color: f = "primary",
162
162
  size: e = "large"
163
- } = r, { theme: h } = T(), d = {
164
- theme: h,
163
+ } = r, { theme: p } = T(), u = {
164
+ theme: p,
165
165
  color: f,
166
166
  size: e,
167
- style: m,
168
- disabled: o
167
+ style: g,
168
+ disabled: a
169
169
  }, $ = n / 5 * 100;
170
- return /* @__PURE__ */ p(
171
- F,
170
+ return /* @__PURE__ */ c(
171
+ O,
172
172
  {
173
- ref: a,
173
+ ref: o,
174
174
  tabIndex: s,
175
- ...d,
176
- className: `star-rating ${g}`,
175
+ ...u,
176
+ className: `star-rating ${m}`,
177
177
  children: [
178
- /* @__PURE__ */ p("div", { className: "rating", children: [
178
+ /* @__PURE__ */ c("div", { className: "rating", children: [
179
179
  /* @__PURE__ */ t(
180
- O,
180
+ _,
181
181
  {
182
182
  className: "filled-stars",
183
- ...d,
183
+ ...u,
184
184
  width: $,
185
185
  children: "★★★★★"
186
186
  }
187
187
  ),
188
- /* @__PURE__ */ t(_, { ...d, children: "★★★★★" })
188
+ /* @__PURE__ */ t(G, { ...u, children: "★★★★★" })
189
189
  ] }),
190
190
  !isNaN(i) && Number.isFinite(i) && /* @__PURE__ */ t("div", { className: "review-count", children: `(${i.toLocaleString()})` })
191
191
  ]
@@ -210,88 +210,78 @@ b.propTypes = {
210
210
  ]),
211
211
  size: l.oneOf(["small", "medium", "large"])
212
212
  };
213
- const G = u((r, a) => {
214
- const { uuid: n, image: i, text: o, title: s, onSelectReview: g = () => {
213
+ const L = h((r, o) => {
214
+ const { image: n, text: i, title: a, onSelectCard: s = () => {
215
215
  }, rating: m } = r;
216
- return /* @__PURE__ */ t(
217
- N,
218
- {
219
- ref: a,
220
- className: "review-card",
221
- onClick: () => g(n),
222
- children: /* @__PURE__ */ p(S, { children: [
223
- /* @__PURE__ */ t(A, { src: i }),
224
- /* @__PURE__ */ p("div", { className: "cont", children: [
225
- /* @__PURE__ */ t("span", { className: "cont-title", children: s }),
226
- /* @__PURE__ */ t("div", { className: "cont-text", children: o })
227
- ] }),
228
- /* @__PURE__ */ t(b, { color: "warning", rating: m })
229
- ] })
230
- }
231
- );
232
- }), L = u(({}, r) => /* @__PURE__ */ t(N, { className: "review-card", children: /* @__PURE__ */ p(S, { children: [
216
+ return /* @__PURE__ */ t(N, { ref: o, className: "review-card", onClick: s, children: /* @__PURE__ */ c(S, { children: [
217
+ /* @__PURE__ */ t(A, { src: n }),
218
+ /* @__PURE__ */ c("div", { className: "cont", children: [
219
+ /* @__PURE__ */ t("span", { className: "cont-title", children: a }),
220
+ /* @__PURE__ */ t("div", { className: "cont-text", children: i })
221
+ ] }),
222
+ /* @__PURE__ */ t(b, { color: "warning", rating: m })
223
+ ] }) });
224
+ }), V = h(({}, r) => /* @__PURE__ */ t(N, { className: "review-card", children: /* @__PURE__ */ c(S, { children: [
233
225
  /* @__PURE__ */ t("div", { className: "skeleton-img" }),
234
226
  /* @__PURE__ */ t("div", { className: "cont" }),
235
227
  /* @__PURE__ */ t(b, { color: "warning", rating: 0 })
236
- ] }) })), V = ({ limit: r = 3, isLoading: a = !1, keyPrefix: n }) => /* @__PURE__ */ t(w, { children: Array.from({ length: r }, (i, o) => /* @__PURE__ */ t(
237
- L,
228
+ ] }) })), B = ({ limit: r = 3, isLoading: o = !1, keyPrefix: n }) => /* @__PURE__ */ t(w, { children: Array.from({ length: r }, (i, a) => /* @__PURE__ */ t(
229
+ V,
238
230
  {
239
- isLoading: a
231
+ isLoading: o
240
232
  },
241
- `${n}-skeleton-review-card-${o}`
242
- )) }), B = ({
233
+ `${n}-skeleton-review-card-${a}`
234
+ )) }), D = ({
243
235
  children: r,
244
- fallbackComponent: a = /* @__PURE__ */ t(w, {}),
236
+ fallbackComponent: o = /* @__PURE__ */ t(w, {}),
245
237
  isLoading: n = !1,
246
238
  limit: i,
247
- keyPrefix: o
248
- }) => /* @__PURE__ */ t(R, { fallbackComponent: a, children: n === !0 ? /* @__PURE__ */ t(
249
- V,
239
+ keyPrefix: a
240
+ }) => /* @__PURE__ */ t(C, { fallbackComponent: o, children: n === !0 ? /* @__PURE__ */ t(
241
+ B,
250
242
  {
251
243
  isLoading: n,
252
244
  limit: i,
253
- keyPrefix: o
245
+ keyPrefix: a
254
246
  }
255
- ) : r }), y = C(G), ee = u((r, a) => {
247
+ ) : r }), y = k(L), ee = h((r, o) => {
256
248
  const {
257
249
  title: n = "Electronics reviews",
258
250
  items: i,
259
- limit: o = 3,
251
+ limit: a = 3,
260
252
  onSelectCard: s = () => {
261
253
  },
262
- isLoading: g = !1
263
- } = r, m = P(), f = z(() => /* @__PURE__ */ t(w, { children: m === !0 ? i == null ? void 0 : i.map((e, h) => /* @__PURE__ */ t(
254
+ isLoading: m = !1
255
+ } = r, g = P(), f = x(() => /* @__PURE__ */ t(w, { children: g === !0 ? i == null ? void 0 : i.map((e, p) => /* @__PURE__ */ t(
264
256
  y,
265
257
  {
266
258
  text: e == null ? void 0 : e.text,
267
259
  title: e == null ? void 0 : e.title,
268
260
  image: e == null ? void 0 : e.image,
269
- uuid: e == null ? void 0 : e.uuid,
261
+ link: e == null ? void 0 : e.link,
270
262
  rating: e == null ? void 0 : e.ratingArithmeticMean,
271
- productUuid: e == null ? void 0 : e.productUuid,
272
- onSelectReview: (d) => s(d)
263
+ onSelectCard: () => s(e)
273
264
  },
274
- h
275
- )) : i == null ? void 0 : i.slice(0, o).map((e, h) => /* @__PURE__ */ t(
265
+ p
266
+ )) : i == null ? void 0 : i.slice(0, a).map((e, p) => /* @__PURE__ */ t(
276
267
  y,
277
268
  {
278
269
  text: e == null ? void 0 : e.text,
279
270
  title: e == null ? void 0 : e.title,
280
271
  image: e == null ? void 0 : e.image,
281
- uuid: e == null ? void 0 : e.uuid,
272
+ link: e == null ? void 0 : e.link,
282
273
  rating: e == null ? void 0 : e.ratingArithmeticMean,
283
- productUuid: e == null ? void 0 : e.productUuid,
284
- onSelectReview: (d) => s(d)
274
+ onSelectCard: () => s(e)
285
275
  },
286
- h
287
- )) }), [i, m, s, o]);
288
- return /* @__PURE__ */ p(U, { ref: a, children: [
276
+ p
277
+ )) }), [i, g, s, a]);
278
+ return /* @__PURE__ */ c(W, { ref: o, children: [
289
279
  /* @__PURE__ */ t("div", { className: "container-title", children: n }),
290
- /* @__PURE__ */ t(W, { limit: o, children: /* @__PURE__ */ t(
291
- B,
280
+ /* @__PURE__ */ t(F, { limit: a, children: /* @__PURE__ */ t(
281
+ D,
292
282
  {
293
- isLoading: g,
294
- limit: o,
283
+ isLoading: m,
284
+ limit: a,
295
285
  keyPrefix: "explore-landing",
296
286
  children: f
297
287
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lanaco/lnc-react-ui",
3
- "version": "4.0.78",
3
+ "version": "4.0.79",
4
4
  "description": "React component library",
5
5
  "type": "module",
6
6
  "keywords": [