@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"),
|
|
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=
|
|
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
|
|
3
|
-
import { s as
|
|
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
|
|
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
|
|
9
|
-
const
|
|
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 =
|
|
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 =
|
|
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 =
|
|
86
|
-
const { title: r,
|
|
87
|
-
return /* @__PURE__ */ c(b, { ref: o, className: "blog-card", onClick:
|
|
88
|
-
/* @__PURE__ */ t(
|
|
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:
|
|
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:
|
|
100
|
+
onClick: l,
|
|
101
101
|
size: "medium",
|
|
102
|
-
children:
|
|
102
|
+
children: m
|
|
103
103
|
}
|
|
104
104
|
)
|
|
105
105
|
] });
|
|
106
|
-
}),
|
|
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
|
-
}),
|
|
116
|
-
|
|
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-${
|
|
121
|
-
)) }),
|
|
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:
|
|
126
|
-
keyPrefix:
|
|
127
|
-
}) => /* @__PURE__ */ t(
|
|
128
|
-
|
|
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:
|
|
132
|
-
keyPrefix:
|
|
131
|
+
limit: n,
|
|
132
|
+
keyPrefix: a
|
|
133
133
|
}
|
|
134
|
-
) : i }),
|
|
134
|
+
) : i }), _ = p((i, o) => {
|
|
135
135
|
const {
|
|
136
136
|
items: r,
|
|
137
|
-
limit:
|
|
138
|
-
onSelectCard:
|
|
137
|
+
limit: n = 3,
|
|
138
|
+
onSelectCard: a = () => {
|
|
139
139
|
},
|
|
140
|
-
isLoading:
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
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:
|
|
148
|
-
limit:
|
|
145
|
+
isLoading: m,
|
|
146
|
+
limit: n,
|
|
149
147
|
keyPrefix: "explore-landing",
|
|
150
|
-
children: /* @__PURE__ */ t(s, { children:
|
|
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
|
-
|
|
155
|
-
text: e == null ? void 0 : e.
|
|
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: () =>
|
|
155
|
+
onCardClick: () => a(e)
|
|
159
156
|
},
|
|
160
|
-
|
|
161
|
-
)) : r == null ? void 0 : r.slice(0,
|
|
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
|
-
|
|
166
|
-
text: e == null ? void 0 : e.
|
|
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: () =>
|
|
165
|
+
onCardClick: () => a(e)
|
|
170
166
|
},
|
|
171
|
-
|
|
167
|
+
d
|
|
172
168
|
)) })
|
|
173
169
|
}
|
|
174
170
|
) });
|
|
175
171
|
});
|
|
176
172
|
export {
|
|
177
|
-
|
|
173
|
+
_ as default
|
|
178
174
|
};
|
package/dist/ReviewsSection.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const r=require("react/jsx-runtime"),
|
|
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
|
-
`,
|
|
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: ${
|
|
16
|
+
@media (max-width: ${S.MOBILE_SIZE_PX+"px"}) {
|
|
17
17
|
grid-template-columns: repeat(1, 1fr);
|
|
18
18
|
}
|
|
19
|
-
`,y=
|
|
19
|
+
`,y=c.styled.div`
|
|
20
20
|
padding-top: 5rem;
|
|
21
21
|
overflow: hidden;
|
|
22
|
-
`,
|
|
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
|
-
${
|
|
54
|
+
${g.truncateText()}
|
|
55
55
|
}
|
|
56
56
|
|
|
57
57
|
& .cont-text {
|
|
58
|
-
${
|
|
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
|
-
${
|
|
94
|
+
${g.linearGradientAnimation("-90deg")}
|
|
95
95
|
}
|
|
96
|
-
`,
|
|
97
|
-
font-size: ${t=>
|
|
98
|
-
line-height: ${t=>
|
|
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
|
-
`,
|
|
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=>
|
|
127
|
-
`,
|
|
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
|
-
`,
|
|
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;
|
package/dist/ReviewsSection.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { s as
|
|
4
|
-
import { M as
|
|
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
|
|
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
|
|
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
|
-
`,
|
|
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: ${
|
|
25
|
+
@media (max-width: ${z + "px"}) {
|
|
26
26
|
grid-template-columns: repeat(1, 1fr);
|
|
27
27
|
}
|
|
28
|
-
`, N =
|
|
28
|
+
`, N = d.div`
|
|
29
29
|
padding-top: 5rem;
|
|
30
30
|
overflow: hidden;
|
|
31
|
-
`, S =
|
|
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
|
-
${
|
|
63
|
+
${R()}
|
|
64
64
|
}
|
|
65
65
|
|
|
66
66
|
& .cont-text {
|
|
67
|
-
${
|
|
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,
|
|
105
|
+
`, v = (r, o) => E(
|
|
106
106
|
r.theme,
|
|
107
107
|
"StarRating",
|
|
108
108
|
r.color,
|
|
109
109
|
r.disabled === !0 ? "disabled" : "enabled",
|
|
110
|
-
|
|
111
|
-
),
|
|
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
|
-
`,
|
|
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
|
-
`,
|
|
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 =
|
|
153
|
+
`, b = h((r, o) => {
|
|
154
154
|
const {
|
|
155
155
|
rating: n = 0,
|
|
156
156
|
reviewCount: i = null,
|
|
157
|
-
disabled:
|
|
157
|
+
disabled: a = !1,
|
|
158
158
|
tabIndex: s = 0,
|
|
159
|
-
className:
|
|
160
|
-
style:
|
|
159
|
+
className: m = "",
|
|
160
|
+
style: g = {},
|
|
161
161
|
color: f = "primary",
|
|
162
162
|
size: e = "large"
|
|
163
|
-
} = r, { theme:
|
|
164
|
-
theme:
|
|
163
|
+
} = r, { theme: p } = T(), u = {
|
|
164
|
+
theme: p,
|
|
165
165
|
color: f,
|
|
166
166
|
size: e,
|
|
167
|
-
style:
|
|
168
|
-
disabled:
|
|
167
|
+
style: g,
|
|
168
|
+
disabled: a
|
|
169
169
|
}, $ = n / 5 * 100;
|
|
170
|
-
return /* @__PURE__ */
|
|
171
|
-
|
|
170
|
+
return /* @__PURE__ */ c(
|
|
171
|
+
O,
|
|
172
172
|
{
|
|
173
|
-
ref:
|
|
173
|
+
ref: o,
|
|
174
174
|
tabIndex: s,
|
|
175
|
-
...
|
|
176
|
-
className: `star-rating ${
|
|
175
|
+
...u,
|
|
176
|
+
className: `star-rating ${m}`,
|
|
177
177
|
children: [
|
|
178
|
-
/* @__PURE__ */
|
|
178
|
+
/* @__PURE__ */ c("div", { className: "rating", children: [
|
|
179
179
|
/* @__PURE__ */ t(
|
|
180
|
-
|
|
180
|
+
_,
|
|
181
181
|
{
|
|
182
182
|
className: "filled-stars",
|
|
183
|
-
...
|
|
183
|
+
...u,
|
|
184
184
|
width: $,
|
|
185
185
|
children: "★★★★★"
|
|
186
186
|
}
|
|
187
187
|
),
|
|
188
|
-
/* @__PURE__ */ t(
|
|
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
|
|
214
|
-
const {
|
|
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
|
-
|
|
218
|
-
{
|
|
219
|
-
|
|
220
|
-
className: "
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
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
|
-
] }) })),
|
|
237
|
-
|
|
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:
|
|
231
|
+
isLoading: o
|
|
240
232
|
},
|
|
241
|
-
`${n}-skeleton-review-card-${
|
|
242
|
-
)) }),
|
|
233
|
+
`${n}-skeleton-review-card-${a}`
|
|
234
|
+
)) }), D = ({
|
|
243
235
|
children: r,
|
|
244
|
-
fallbackComponent:
|
|
236
|
+
fallbackComponent: o = /* @__PURE__ */ t(w, {}),
|
|
245
237
|
isLoading: n = !1,
|
|
246
238
|
limit: i,
|
|
247
|
-
keyPrefix:
|
|
248
|
-
}) => /* @__PURE__ */ t(
|
|
249
|
-
|
|
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:
|
|
245
|
+
keyPrefix: a
|
|
254
246
|
}
|
|
255
|
-
) : r }), y =
|
|
247
|
+
) : r }), y = k(L), ee = h((r, o) => {
|
|
256
248
|
const {
|
|
257
249
|
title: n = "Electronics reviews",
|
|
258
250
|
items: i,
|
|
259
|
-
limit:
|
|
251
|
+
limit: a = 3,
|
|
260
252
|
onSelectCard: s = () => {
|
|
261
253
|
},
|
|
262
|
-
isLoading:
|
|
263
|
-
} = r,
|
|
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
|
-
|
|
261
|
+
link: e == null ? void 0 : e.link,
|
|
270
262
|
rating: e == null ? void 0 : e.ratingArithmeticMean,
|
|
271
|
-
|
|
272
|
-
onSelectReview: (d) => s(d)
|
|
263
|
+
onSelectCard: () => s(e)
|
|
273
264
|
},
|
|
274
|
-
|
|
275
|
-
)) : i == null ? void 0 : i.slice(0,
|
|
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
|
-
|
|
272
|
+
link: e == null ? void 0 : e.link,
|
|
282
273
|
rating: e == null ? void 0 : e.ratingArithmeticMean,
|
|
283
|
-
|
|
284
|
-
onSelectReview: (d) => s(d)
|
|
274
|
+
onSelectCard: () => s(e)
|
|
285
275
|
},
|
|
286
|
-
|
|
287
|
-
)) }), [i,
|
|
288
|
-
return /* @__PURE__ */
|
|
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(
|
|
291
|
-
|
|
280
|
+
/* @__PURE__ */ t(F, { limit: a, children: /* @__PURE__ */ t(
|
|
281
|
+
D,
|
|
292
282
|
{
|
|
293
|
-
isLoading:
|
|
294
|
-
limit:
|
|
283
|
+
isLoading: m,
|
|
284
|
+
limit: a,
|
|
295
285
|
keyPrefix: "explore-landing",
|
|
296
286
|
children: f
|
|
297
287
|
}
|