@lanaco/lnc-react-ui 4.0.153 → 4.0.154
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.
- package/dist/BlogCardsSponsoredSection.cjs +1 -1
- package/dist/BlogCardsSponsoredSection.js +1 -1
- package/dist/BlogListSection.cjs +1 -1
- package/dist/BlogListSection.js +1 -1
- package/dist/BlogShopCardsSection.cjs +1 -1
- package/dist/BlogShopCardsSection.js +1 -1
- package/dist/BlogSingleSection.cjs +1 -1
- package/dist/BlogSingleSection.js +2 -2
- package/dist/BlogsSectionDetailed.cjs +4 -4
- package/dist/BlogsSectionDetailed.js +4 -4
- package/dist/BlogsSectionLarge.cjs +1 -1
- package/dist/BlogsSectionLarge.js +2 -2
- package/dist/BlogsSectionSimpleCentered.cjs +1 -1
- package/dist/BlogsSectionSimpleCentered.js +17 -17
- package/dist/GiftCardsSection.cjs +1 -1
- package/dist/GiftCardsSection.js +1 -1
- package/dist/MasonryGeneralCardsSection.cjs +13 -7
- package/dist/MasonryGeneralCardsSection.js +29 -23
- package/dist/ProductsWithBannerSection.cjs +15 -8
- package/dist/ProductsWithBannerSection.js +33 -26
- package/dist/ShopCardsSection.cjs +48 -10
- package/dist/ShopCardsSection.js +104 -53
- package/dist/{index-CjQhwLEY.cjs → index-Cm0f72Po.cjs} +1 -1
- package/dist/{index-DXNlFyQ4.js → index-DGp7FHms.js} +1 -1
- package/dist/{skeleton-Bil8w1A7.js → skeleton-BWFqIToC.js} +48 -32
- package/dist/{skeleton-BQd32q08.cjs → skeleton-BdbB-LdT.cjs} +2 -2
- package/dist/{skeleton-B74purm7.js → skeleton-CQPwIEP0.js} +2 -2
- package/dist/{skeleton-CWPYgHom.cjs → skeleton-CanJ6Gr6.cjs} +18 -3
- package/dist/{suspense-large-DPZHjpEr.js → suspense-large-BMO7JH52.js} +1 -1
- package/dist/{suspense-large-BX4jlU4U.cjs → suspense-large-CFmcSzX-.cjs} +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const r=require("react/jsx-runtime"),m=require("react"),s=require("./utils-Dl9xPH4c.cjs"),w=require("./Icon.cjs"),j=require("./style-CyHewQxg.cjs"),N=require("./index-BueKsXT8.cjs"),b=require("./emotion-styled.browser.esm-BtEseadx.cjs"),v=require("./consts-goSZX3xP.cjs"),x=require("./suspense-large-
|
|
1
|
+
"use strict";const r=require("react/jsx-runtime"),m=require("react"),s=require("./utils-Dl9xPH4c.cjs"),w=require("./Icon.cjs"),j=require("./style-CyHewQxg.cjs"),N=require("./index-BueKsXT8.cjs"),b=require("./emotion-styled.browser.esm-BtEseadx.cjs"),v=require("./consts-goSZX3xP.cjs"),x=require("./suspense-large-CFmcSzX-.cjs"),S=require("./Button.cjs"),z=b.styled.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
padding: 1rem;
|
|
4
4
|
align-items: center;
|
|
@@ -6,7 +6,7 @@ import { B as R } from "./style-DFPWLJBr.js";
|
|
|
6
6
|
import { P as L } from "./index-CF3HhgvN.js";
|
|
7
7
|
import { s as y } from "./emotion-styled.browser.esm-BNN1dTl3.js";
|
|
8
8
|
import { M as N } from "./consts-BuFChS64.js";
|
|
9
|
-
import { S as O } from "./suspense-large-
|
|
9
|
+
import { S as O } from "./suspense-large-BMO7JH52.js";
|
|
10
10
|
import T from "./Button.js";
|
|
11
11
|
const U = y.div`
|
|
12
12
|
display: flex;
|
package/dist/BlogListSection.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const r=require("react/jsx-runtime"),l=require("react"),y=require("./Icon.cjs"),j=require("./IconButton.cjs"),s=require("./utils-Dl9xPH4c.cjs"),B=require("./index-BueKsXT8.cjs"),R=require("./style-CyHewQxg.cjs"),v=require("./emotion-styled.browser.esm-BtEseadx.cjs"),q=require("./consts-goSZX3xP.cjs"),I=require("./suspense-large-
|
|
1
|
+
"use strict";const r=require("react/jsx-runtime"),l=require("react"),y=require("./Icon.cjs"),j=require("./IconButton.cjs"),s=require("./utils-Dl9xPH4c.cjs"),B=require("./index-BueKsXT8.cjs"),R=require("./style-CyHewQxg.cjs"),v=require("./emotion-styled.browser.esm-BtEseadx.cjs"),q=require("./consts-goSZX3xP.cjs"),I=require("./suspense-large-CFmcSzX-.cjs"),$=v.styled.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
padding: 1rem;
|
|
4
4
|
align-items: center;
|
package/dist/BlogListSection.js
CHANGED
|
@@ -7,7 +7,7 @@ import { P as O } from "./index-CF3HhgvN.js";
|
|
|
7
7
|
import { B as S } from "./style-DFPWLJBr.js";
|
|
8
8
|
import { s as B } from "./emotion-styled.browser.esm-BNN1dTl3.js";
|
|
9
9
|
import { M as E } from "./consts-BuFChS64.js";
|
|
10
|
-
import { S as M } from "./suspense-large-
|
|
10
|
+
import { S as M } from "./suspense-large-BMO7JH52.js";
|
|
11
11
|
const U = B.div`
|
|
12
12
|
display: flex;
|
|
13
13
|
padding: 1rem;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const r=require("react/jsx-runtime"),u=require("react"),S=require("./useDetectMobile-zkbzoOGV.cjs"),a=require("./skeleton-
|
|
1
|
+
"use strict";const r=require("react/jsx-runtime"),u=require("react"),S=require("./useDetectMobile-zkbzoOGV.cjs"),a=require("./skeleton-CanJ6Gr6.cjs"),b=require("./Button.cjs"),_=require("./style-BTTXJFJN.cjs"),k=({limit:o=4,isLoading:n=!1,keyPrefix:s})=>r.jsx(r.Fragment,{children:Array.from({length:o},(i,t)=>r.jsx(a.ShopCardSkeleton,{isLoading:n},`${s}-skeleton-shop-card-${t}`))}),q=({children:o,fallbackComponent:n=r.jsx(r.Fragment,{}),isLoading:s=!1,limit:i,keyPrefix:t})=>r.jsx(u.Suspense,{fallbackComponent:n,children:s===!0?r.jsx(k,{isLoading:s,limit:i,keyPrefix:t}):o}),C=u.memo(a.ShopCard),w=u.forwardRef(({buttonText:o,buttonLink:n,items:s,onButtonAction:i=()=>{},onSelectCard:t=()=>{},isLoading:l=!1,limit:d=4,getImage:p=()=>{},isHighlight:h=!1},m)=>{const g=S.useDetectMobile(),j=u.useMemo(()=>{var c;return(c=s==null?void 0:s.slice(0,4))==null?void 0:c.map((e,f)=>r.jsx(C,{uuid:e==null?void 0:e.uuid,title:e==null?void 0:e.name,subtitle:e==null?void 0:e.shortDescription,rating:e==null?void 0:e.rating,reviewCount:e==null?void 0:e.reviewCount,onSelectCard:()=>t==null?void 0:t(e==null?void 0:e.uuid),image:p(e==null?void 0:e.profileImage,e==null?void 0:e.uuid)||null,hideProducts:!0},`shop-card__${f+1}`))},[s]);return r.jsxs(_.Wrapper,{ref:m,className:h?"highlight":"",children:[r.jsx("div",{className:"wrapper__grid",children:r.jsx(q,{isLoading:l,limit:d,keyPrefix:"blog-section",children:j})}),r.jsx(b,{text:o,borderRadius:"curved",btnType:g?"basic":"outline",color:"neutral",className:"wrapper__action",onClick:()=>i(n)})]})});module.exports=w;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as o, Fragment as u, jsxs as S } from "react/jsx-runtime";
|
|
2
2
|
import { Suspense as b, memo as _, forwardRef as C, useMemo as k } from "react";
|
|
3
3
|
import { u as w } from "./useDetectMobile-Bkvj0VMa.js";
|
|
4
|
-
import { a as v, S as M } from "./skeleton-
|
|
4
|
+
import { a as v, S as M } from "./skeleton-BWFqIToC.js";
|
|
5
5
|
import y from "./Button.js";
|
|
6
6
|
import { W as N } from "./style-tw6KjI2J.js";
|
|
7
7
|
const $ = ({ limit: s = 4, isLoading: a = !1, keyPrefix: r }) => /* @__PURE__ */ o(u, { children: Array.from({ length: s }, (i, t) => /* @__PURE__ */ o(
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const r=require("react/jsx-runtime"),o=require("react"),g=require("./index-
|
|
1
|
+
"use strict";const r=require("react/jsx-runtime"),o=require("react"),g=require("./index-Cm0f72Po.cjs"),a=require("./skeleton-BdbB-LdT.cjs"),c=({limit:t=1,isLoading:l=!1,keyPrefix:n})=>r.jsx(r.Fragment,{children:Array.from({length:t},(e,s)=>r.jsx(a.BlogCardLargeSkeleton,{isLoading:l},`${n}-skeleton-product-card-${s}`))}),x=({children:t,fallbackComponent:l=r.jsx(r.Fragment,{}),isLoading:n=!1,limit:e,keyPrefix:s})=>r.jsx(o.Suspense,{fallbackComponent:l,children:n===!0?r.jsx(c,{isLoading:n,limit:e,keyPrefix:s}):t}),d=o.forwardRef((t,l)=>{const{isLoading:n,item:e,onSelectCard:s=()=>{},getImage:u=()=>{}}=t;return r.jsx(x,{isLoading:n,limit:1,keyPrefix:"explore-landing",children:r.jsx(g.BlogCardLarge,{ref:l,title:e==null?void 0:e.title,imageUrl:u(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:()=>s(e==null?void 0:e.titleSlug)})})});module.exports=d;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as e, Fragment as a } from "react/jsx-runtime";
|
|
2
2
|
import { Suspense as s, forwardRef as u } from "react";
|
|
3
|
-
import { B as d } from "./index-
|
|
4
|
-
import { B as c } from "./skeleton-
|
|
3
|
+
import { B as d } from "./index-DGp7FHms.js";
|
|
4
|
+
import { B as c } from "./skeleton-CQPwIEP0.js";
|
|
5
5
|
const f = ({ limit: o = 1, isLoading: t = !1, keyPrefix: l }) => /* @__PURE__ */ e(a, { children: Array.from({ length: o }, (r, n) => /* @__PURE__ */ e(
|
|
6
6
|
c,
|
|
7
7
|
{
|
|
@@ -22,16 +22,16 @@
|
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
& img {
|
|
25
|
-
max-height: 11.
|
|
26
|
-
min-height: 11.
|
|
25
|
+
max-height: 11.25rem;
|
|
26
|
+
min-height: 11.25rem;
|
|
27
27
|
object-fit: cover;
|
|
28
28
|
width: 100%;
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
& .skeleton-img {
|
|
32
32
|
width: 100%;
|
|
33
|
-
max-height: 11.
|
|
34
|
-
min-height: 11.
|
|
33
|
+
max-height: 11.25rem;
|
|
34
|
+
min-height: 11.25rem;
|
|
35
35
|
background-color: ${r.linearGradientAnimation("-90deg")};
|
|
36
36
|
}
|
|
37
37
|
|
|
@@ -31,16 +31,16 @@ const E = y.div`
|
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
& img {
|
|
34
|
-
max-height: 11.
|
|
35
|
-
min-height: 11.
|
|
34
|
+
max-height: 11.25rem;
|
|
35
|
+
min-height: 11.25rem;
|
|
36
36
|
object-fit: cover;
|
|
37
37
|
width: 100%;
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
& .skeleton-img {
|
|
41
41
|
width: 100%;
|
|
42
|
-
max-height: 11.
|
|
43
|
-
min-height: 11.
|
|
42
|
+
max-height: 11.25rem;
|
|
43
|
+
min-height: 11.25rem;
|
|
44
44
|
background-color: ${k("-90deg")};
|
|
45
45
|
}
|
|
46
46
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const i=require("react/jsx-runtime"),s=require("react"),p=require("./emotion-styled.browser.esm-BtEseadx.cjs"),S=require("./consts-goSZX3xP.cjs"),b=require("./useDetectMobile-zkbzoOGV.cjs"),q=require("./index-
|
|
1
|
+
"use strict";const i=require("react/jsx-runtime"),s=require("react"),p=require("./emotion-styled.browser.esm-BtEseadx.cjs"),S=require("./consts-goSZX3xP.cjs"),b=require("./useDetectMobile-zkbzoOGV.cjs"),q=require("./index-Cm0f72Po.cjs"),C=require("./suspense-large-CFmcSzX-.cjs"),f=p.styled.div`
|
|
2
2
|
display: grid;
|
|
3
3
|
grid-template-columns: ${l=>`repeat(${l.limit}, minmax(0, 1fr))`};
|
|
4
4
|
gap: 1.25rem;
|
|
@@ -3,8 +3,8 @@ import { memo as c, forwardRef as f, useMemo as S } from "react";
|
|
|
3
3
|
import { s as C } from "./emotion-styled.browser.esm-BNN1dTl3.js";
|
|
4
4
|
import { M as b } from "./consts-BuFChS64.js";
|
|
5
5
|
import { u as B } from "./useDetectMobile-Bkvj0VMa.js";
|
|
6
|
-
import { B as M } from "./index-
|
|
7
|
-
import { S as L } from "./suspense-large-
|
|
6
|
+
import { B as M } from "./index-DGp7FHms.js";
|
|
7
|
+
import { S as L } from "./suspense-large-BMO7JH52.js";
|
|
8
8
|
const h = C.div`
|
|
9
9
|
display: grid;
|
|
10
10
|
grid-template-columns: ${(l) => `repeat(${l.limit}, minmax(0, 1fr))`};
|
|
@@ -33,7 +33,7 @@ const x = g.div`
|
|
|
33
33
|
|
|
34
34
|
& button {
|
|
35
35
|
width: fit-content;
|
|
36
|
-
margin-top:
|
|
36
|
+
margin-top: 1.5rem;
|
|
37
37
|
color: var(--gray-950, #14161a);
|
|
38
38
|
font-size: 0.875rem;
|
|
39
39
|
font-style: normal;
|
|
@@ -92,10 +92,10 @@ const x = g.div`
|
|
|
92
92
|
letter-spacing: 0.0156rem;
|
|
93
93
|
${y(3)}
|
|
94
94
|
}
|
|
95
|
-
`, h = p((i,
|
|
96
|
-
const { title: r, image:
|
|
97
|
-
return /* @__PURE__ */ c(w, { ref:
|
|
98
|
-
/* @__PURE__ */ t(S, { src:
|
|
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
99
|
/* @__PURE__ */ c(b, { children: [
|
|
100
100
|
/* @__PURE__ */ t("div", { className: "text-wr-title", children: r }),
|
|
101
101
|
/* @__PURE__ */ t("div", { className: "text-wr", children: a })
|
|
@@ -113,7 +113,7 @@ const x = g.div`
|
|
|
113
113
|
}
|
|
114
114
|
)
|
|
115
115
|
] });
|
|
116
|
-
}), $ = p((i,
|
|
116
|
+
}), $ = p((i, n) => {
|
|
117
117
|
const { onCardClick: r } = i;
|
|
118
118
|
return (
|
|
119
119
|
// <SimpleBlogCardSkeleton />
|
|
@@ -122,38 +122,38 @@ const x = g.div`
|
|
|
122
122
|
/* @__PURE__ */ t(b, { children: /* @__PURE__ */ t("div", { className: "skeleton-title" }) })
|
|
123
123
|
] })
|
|
124
124
|
);
|
|
125
|
-
}), T = ({ limit: i = 3, isLoading:
|
|
125
|
+
}), T = ({ limit: i = 3, isLoading: n = !1, keyPrefix: r }) => /* @__PURE__ */ t(s, { children: Array.from({ length: i }, (o, a) => /* @__PURE__ */ t(
|
|
126
126
|
$,
|
|
127
127
|
{
|
|
128
|
-
isLoading:
|
|
128
|
+
isLoading: n
|
|
129
129
|
},
|
|
130
130
|
`${r}-skeleton-product-card-${a}`
|
|
131
131
|
)) }), B = ({
|
|
132
132
|
children: i,
|
|
133
|
-
fallbackComponent:
|
|
133
|
+
fallbackComponent: n = /* @__PURE__ */ t(s, {}),
|
|
134
134
|
isLoading: r = !1,
|
|
135
|
-
limit:
|
|
135
|
+
limit: o,
|
|
136
136
|
keyPrefix: a
|
|
137
|
-
}) => /* @__PURE__ */ t(k, { fallbackComponent:
|
|
137
|
+
}) => /* @__PURE__ */ t(k, { fallbackComponent: n, children: r === !0 ? /* @__PURE__ */ t(
|
|
138
138
|
T,
|
|
139
139
|
{
|
|
140
140
|
isLoading: r,
|
|
141
|
-
limit:
|
|
141
|
+
limit: o,
|
|
142
142
|
keyPrefix: a
|
|
143
143
|
}
|
|
144
|
-
) : i }), _ = p((i,
|
|
144
|
+
) : i }), _ = p((i, n) => {
|
|
145
145
|
const {
|
|
146
146
|
items: r,
|
|
147
|
-
limit:
|
|
147
|
+
limit: o = 3,
|
|
148
148
|
onSelectCard: a = () => {
|
|
149
149
|
},
|
|
150
150
|
isLoading: m = !1
|
|
151
151
|
} = i, l = C();
|
|
152
|
-
return /* @__PURE__ */ t(x, { ref:
|
|
152
|
+
return /* @__PURE__ */ t(x, { ref: n, limit: o, children: /* @__PURE__ */ t(
|
|
153
153
|
B,
|
|
154
154
|
{
|
|
155
155
|
isLoading: m,
|
|
156
|
-
limit:
|
|
156
|
+
limit: o,
|
|
157
157
|
keyPrefix: "explore-landing",
|
|
158
158
|
children: /* @__PURE__ */ t(s, { children: l === !0 ? r == null ? void 0 : r.map((e, d) => /* @__PURE__ */ t(
|
|
159
159
|
h,
|
|
@@ -165,7 +165,7 @@ const x = g.div`
|
|
|
165
165
|
onCardClick: () => a(e)
|
|
166
166
|
},
|
|
167
167
|
d
|
|
168
|
-
)) : r == null ? void 0 : r.slice(0,
|
|
168
|
+
)) : r == null ? void 0 : r.slice(0, o).map((e, d) => /* @__PURE__ */ t(
|
|
169
169
|
h,
|
|
170
170
|
{
|
|
171
171
|
title: e == null ? void 0 : e.title,
|
package/dist/GiftCardsSection.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const r=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";const r=require("react/jsx-runtime"),g=require("react"),f=require("./Button.cjs"),d=require("./emotion-styled.browser.esm-BtEseadx.cjs"),i=require("./utils-Dl9xPH4c.cjs"),m=require("./consts-goSZX3xP.cjs"),u=require("./emotion-element-f0de968e.browser.esm-B7k6i6lC.cjs"),_=d.styled.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
align-items: flex-start;
|
|
@@ -104,8 +104,15 @@
|
|
|
104
104
|
width: 9rem;
|
|
105
105
|
}
|
|
106
106
|
}
|
|
107
|
-
|
|
108
|
-
|
|
107
|
+
cursor: pointer;
|
|
108
|
+
|
|
109
|
+
@media (max-width: ${m.MOBILE_SIZE_PX+"px"}) {
|
|
110
|
+
& .wrapper__image {
|
|
111
|
+
height: 100%;
|
|
112
|
+
max-height: 14.5rem;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
`,w=g.forwardRef(({title:t,imageUrl:e,description:n,buttonText:a,onSelectCard:l=()=>{},className:o,position:s,tag:c,backgroundColor:p},x)=>{const h=u.useTheme();return r.jsx(r.Fragment,{children:r.jsxs(_,{ref:x,theme:h,className:o,position:s,backgroundColor:p,onClick:l,children:[r.jsx("img",{src:e,className:"wrapper__image"}),r.jsxs("div",{className:"wrapper__text",children:[c&&r.jsx("div",{className:"text__tag",children:c}),r.jsx("div",{className:"text__title",children:t}),i.isDefinedNotEmptyString(n)&&r.jsx("div",{className:"text__description",children:n}),i.isDefinedNotEmptyString(a)&&r.jsx(f,{text:a,className:"text__action"})]})]})})}),b=d.styled.div`
|
|
109
116
|
display: flex;
|
|
110
117
|
flex-direction: column;
|
|
111
118
|
gap: 1.5rem;
|
|
@@ -129,7 +136,7 @@
|
|
|
129
136
|
}
|
|
130
137
|
}
|
|
131
138
|
|
|
132
|
-
@media (max-width: ${
|
|
139
|
+
@media (max-width: ${m.MOBILE_SIZE_PX+"px"}) {
|
|
133
140
|
gap: 1.25rem;
|
|
134
141
|
|
|
135
142
|
& .regular-title {
|
|
@@ -150,13 +157,12 @@
|
|
|
150
157
|
height: 30rem;
|
|
151
158
|
max-height: 30rem;
|
|
152
159
|
|
|
153
|
-
@media (max-width: ${
|
|
160
|
+
@media (max-width: ${m.MOBILE_SIZE_PX+"px"}) {
|
|
154
161
|
display: flex;
|
|
155
162
|
flex-direction: column;
|
|
156
163
|
gap: 1rem;
|
|
157
164
|
width: 100%;
|
|
158
165
|
height: 100%;
|
|
159
166
|
max-height: 100%;
|
|
160
|
-
padding: 0 1rem;
|
|
161
167
|
}
|
|
162
|
-
`,v=
|
|
168
|
+
`,v=g.forwardRef(({title:t,items:e,limit:n=3,onSelectCard:a=()=>{}},l)=>r.jsxs(b,{ref:l,children:[r.jsx("div",{className:"regular-title",children:r.jsx("div",{className:"regular-title-text",children:r.jsx("span",{children:t})})}),r.jsx(y,{limit:n,children:e&&(e==null?void 0:e.map((o,s)=>r.jsx(w,{...o,onSelectCard:()=>a(o)},`landing-page-masonry-general-card__${s+1}`)))})]}));module.exports=v;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { jsx as t, Fragment as w, jsxs as
|
|
2
|
-
import { forwardRef as
|
|
1
|
+
import { jsx as t, Fragment as w, jsxs as d } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as f } from "react";
|
|
3
3
|
import b from "./Button.js";
|
|
4
4
|
import { s } from "./emotion-styled.browser.esm-BNN1dTl3.js";
|
|
5
|
-
import { o as n, p
|
|
5
|
+
import { o as n, p, k as h } from "./utils-BdsZgOUE.js";
|
|
6
|
+
import { M as c } from "./consts-BuFChS64.js";
|
|
6
7
|
import { u as v } from "./emotion-element-f0de968e.browser.esm-CkCiQliQ.js";
|
|
7
|
-
import { M as f } from "./consts-BuFChS64.js";
|
|
8
8
|
const y = s.div`
|
|
9
9
|
display: flex;
|
|
10
10
|
flex-direction: column;
|
|
@@ -70,7 +70,7 @@ const y = s.div`
|
|
|
70
70
|
font-style: normal;
|
|
71
71
|
font-weight: 500;
|
|
72
72
|
line-height: 1.5rem;
|
|
73
|
-
${
|
|
73
|
+
${p(2)}
|
|
74
74
|
}
|
|
75
75
|
|
|
76
76
|
& .text__tag {
|
|
@@ -92,7 +92,7 @@ const y = s.div`
|
|
|
92
92
|
font-style: normal;
|
|
93
93
|
font-weight: 400;
|
|
94
94
|
line-height: 1.25rem;
|
|
95
|
-
${
|
|
95
|
+
${p(2)}
|
|
96
96
|
}
|
|
97
97
|
|
|
98
98
|
& .text__action {
|
|
@@ -123,8 +123,15 @@ const y = s.div`
|
|
|
123
123
|
width: 9rem;
|
|
124
124
|
}
|
|
125
125
|
}
|
|
126
|
-
|
|
127
|
-
|
|
126
|
+
cursor: pointer;
|
|
127
|
+
|
|
128
|
+
@media (max-width: ${c + "px"}) {
|
|
129
|
+
& .wrapper__image {
|
|
130
|
+
height: 100%;
|
|
131
|
+
max-height: 14.5rem;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
`, k = f(
|
|
128
135
|
({
|
|
129
136
|
title: r,
|
|
130
137
|
imageUrl: e,
|
|
@@ -133,27 +140,27 @@ const y = s.div`
|
|
|
133
140
|
onSelectCard: l = () => {
|
|
134
141
|
},
|
|
135
142
|
className: o,
|
|
136
|
-
position:
|
|
137
|
-
tag:
|
|
143
|
+
position: m,
|
|
144
|
+
tag: g,
|
|
138
145
|
backgroundColor: x
|
|
139
146
|
}, u) => {
|
|
140
147
|
const _ = v();
|
|
141
|
-
return /* @__PURE__ */ t(w, { children: /* @__PURE__ */
|
|
148
|
+
return /* @__PURE__ */ t(w, { children: /* @__PURE__ */ d(
|
|
142
149
|
y,
|
|
143
150
|
{
|
|
144
151
|
ref: u,
|
|
145
152
|
theme: _,
|
|
146
153
|
className: o,
|
|
147
|
-
position:
|
|
154
|
+
position: m,
|
|
148
155
|
backgroundColor: x,
|
|
149
156
|
onClick: l,
|
|
150
157
|
children: [
|
|
151
158
|
/* @__PURE__ */ t("img", { src: e, className: "wrapper__image" }),
|
|
152
|
-
/* @__PURE__ */
|
|
153
|
-
|
|
159
|
+
/* @__PURE__ */ d("div", { className: "wrapper__text", children: [
|
|
160
|
+
g && /* @__PURE__ */ t("div", { className: "text__tag", children: g }),
|
|
154
161
|
/* @__PURE__ */ t("div", { className: "text__title", children: r }),
|
|
155
|
-
|
|
156
|
-
|
|
162
|
+
h(i) && /* @__PURE__ */ t("div", { className: "text__description", children: i }),
|
|
163
|
+
h(a) && /* @__PURE__ */ t(
|
|
157
164
|
b,
|
|
158
165
|
{
|
|
159
166
|
text: a,
|
|
@@ -189,7 +196,7 @@ const y = s.div`
|
|
|
189
196
|
}
|
|
190
197
|
}
|
|
191
198
|
|
|
192
|
-
@media (max-width: ${
|
|
199
|
+
@media (max-width: ${c + "px"}) {
|
|
193
200
|
gap: 1.25rem;
|
|
194
201
|
|
|
195
202
|
& .regular-title {
|
|
@@ -210,26 +217,25 @@ const y = s.div`
|
|
|
210
217
|
height: 30rem;
|
|
211
218
|
max-height: 30rem;
|
|
212
219
|
|
|
213
|
-
@media (max-width: ${
|
|
220
|
+
@media (max-width: ${c + "px"}) {
|
|
214
221
|
display: flex;
|
|
215
222
|
flex-direction: column;
|
|
216
223
|
gap: 1rem;
|
|
217
224
|
width: 100%;
|
|
218
225
|
height: 100%;
|
|
219
226
|
max-height: 100%;
|
|
220
|
-
padding: 0 1rem;
|
|
221
227
|
}
|
|
222
|
-
`, I =
|
|
228
|
+
`, I = f(
|
|
223
229
|
({ title: r, items: e, limit: i = 3, onSelectCard: a = () => {
|
|
224
|
-
} }, l) => /* @__PURE__ */
|
|
230
|
+
} }, l) => /* @__PURE__ */ d($, { ref: l, children: [
|
|
225
231
|
/* @__PURE__ */ t("div", { className: "regular-title", children: /* @__PURE__ */ t("div", { className: "regular-title-text", children: /* @__PURE__ */ t("span", { children: r }) }) }),
|
|
226
|
-
/* @__PURE__ */ t(N, { limit: i, children: e && (e == null ? void 0 : e.map((o,
|
|
232
|
+
/* @__PURE__ */ t(N, { limit: i, children: e && (e == null ? void 0 : e.map((o, m) => /* @__PURE__ */ t(
|
|
227
233
|
k,
|
|
228
234
|
{
|
|
229
235
|
...o,
|
|
230
236
|
onSelectCard: () => a(o)
|
|
231
237
|
},
|
|
232
|
-
`landing-page-masonry-general-card__${
|
|
238
|
+
`landing-page-masonry-general-card__${m + 1}`
|
|
233
239
|
))) })
|
|
234
240
|
] })
|
|
235
241
|
);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const r=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";const r=require("react/jsx-runtime"),o=require("react"),u=require("./emotion-styled.browser.esm-BtEseadx.cjs"),g=require("./consts-goSZX3xP.cjs"),k=require("./useDetectMobile-zkbzoOGV.cjs"),v=require("./style-CyHewQxg.cjs"),d=require("./utils-Dl9xPH4c.cjs"),y=require("./index-BueKsXT8.cjs"),C=u.styled.div`
|
|
2
2
|
width: 100%;
|
|
3
3
|
height: 22.5rem;
|
|
4
4
|
min-height: 22.5rem;
|
|
@@ -15,12 +15,19 @@
|
|
|
15
15
|
height: 100%;
|
|
16
16
|
object-fit: cover;
|
|
17
17
|
}
|
|
18
|
+
|
|
19
|
+
@media (max-width: ${g.MOBILE_SIZE_PX+"px"}) {
|
|
20
|
+
height: 100%;
|
|
21
|
+
min-height: 100%;
|
|
22
|
+
max-height: 100%;
|
|
23
|
+
aspect-ratio: 1 / 1;
|
|
24
|
+
}
|
|
18
25
|
`,P=u.styled.div`
|
|
19
26
|
display: grid;
|
|
20
27
|
grid-template-columns: ${t=>`repeat(${t.limit}, minmax(0, 1fr))`};
|
|
21
28
|
gap: 1.25rem;
|
|
22
29
|
|
|
23
|
-
@media (max-width: ${
|
|
30
|
+
@media (max-width: ${g.MOBILE_SIZE_PX+"px"}) {
|
|
24
31
|
display: flex;
|
|
25
32
|
gap: 1rem;
|
|
26
33
|
overflow-x: auto;
|
|
@@ -39,7 +46,7 @@
|
|
|
39
46
|
/* Safari and Chrome */
|
|
40
47
|
}
|
|
41
48
|
}
|
|
42
|
-
`,
|
|
49
|
+
`,w=u.styled.div`
|
|
43
50
|
display: flex;
|
|
44
51
|
flex-direction: column;
|
|
45
52
|
gap: 0.5rem;
|
|
@@ -55,22 +62,22 @@
|
|
|
55
62
|
& .card-title {
|
|
56
63
|
font-size: 0.875rem;
|
|
57
64
|
font-weight: 600;
|
|
58
|
-
${
|
|
65
|
+
${d.truncateTextInRows(2)}
|
|
59
66
|
}
|
|
60
67
|
|
|
61
68
|
& .skeleton-img {
|
|
62
|
-
background-color: ${
|
|
69
|
+
background-color: ${d.linearGradientAnimation("-90deg")};
|
|
63
70
|
border-radius: 0.75rem;
|
|
64
71
|
border: 1px solid white;
|
|
65
72
|
}
|
|
66
73
|
|
|
67
74
|
& .skeleton-title {
|
|
68
|
-
background-color: ${
|
|
75
|
+
background-color: ${d.linearGradientAnimation("-90deg")};
|
|
69
76
|
width: 100%;
|
|
70
77
|
height: 1.25rem;
|
|
71
78
|
}
|
|
72
79
|
|
|
73
|
-
@media (max-width: ${
|
|
80
|
+
@media (max-width: ${g.MOBILE_SIZE_PX+"px"}) {
|
|
74
81
|
& img {
|
|
75
82
|
width: 8.875rem;
|
|
76
83
|
height: 8.875rem;
|
|
@@ -81,4 +88,4 @@
|
|
|
81
88
|
object-fit: cover;
|
|
82
89
|
}
|
|
83
90
|
}
|
|
84
|
-
`,
|
|
91
|
+
`,I=o.forwardRef((t,a)=>{const{uuid:n,title:i,image:s,sellerUuid:h,onSelectCard:l=()=>{},imageComponent:c}=t;return r.jsxs(w,{ref:a,className:"product-card",onClick:l,children:[d.isDefined(c)?c:r.jsx(y.ProductImageWrapper,{src:s}),r.jsx("div",{className:"card-title",children:i})]})}),N=o.forwardRef(({},t)=>r.jsxs(w,{className:"product-card",children:[r.jsx("img",{className:"skeleton-img"}),r.jsx("div",{className:"skeleton-title"})]})),$=({limit:t=4,isLoading:a=!1,keyPrefix:n})=>r.jsx(r.Fragment,{children:Array.from({length:t},(i,s)=>r.jsx(N,{isLoading:a},`${n}-skeleton-product-card-${s}`))}),_=({children:t,fallbackComponent:a=r.jsx(r.Fragment,{}),isLoading:n=!1,limit:i,keyPrefix:s})=>r.jsx(o.Suspense,{fallbackComponent:a,children:n===!0?r.jsx($,{isLoading:n,limit:i,keyPrefix:s}):t}),j=o.memo(I),q=o.forwardRef((t,a)=>{const{icon:n,items:i,limit:s=4,imageUrl:h,onSelectCard:l=()=>{},title:c="Season inspiration",isLoading:b=!1,getImage:p=()=>{}}=t,f=k.useDetectMobile(),S=o.useMemo(()=>r.jsx(r.Fragment,{children:f===!0?i==null?void 0:i.map((e,m)=>r.jsx(j,{title:e==null?void 0:e.name,sellerUuid:e==null?void 0:e.sellerUuid,uuid:e==null?void 0:e.uuid,onSelectCard:()=>l({uuid:e==null?void 0:e.uuid,nameSlug:e==null?void 0:e.nameSlug}),image:p(e==null?void 0:e.image,e==null?void 0:e.uuid,e==null?void 0:e.sellerUuid)||null},m)):i==null?void 0:i.slice(0,s).map((e,m)=>r.jsx(j,{title:e==null?void 0:e.name,sellerUuid:e==null?void 0:e.sellerUuid,uuid:e==null?void 0:e.uuid,onSelectCard:()=>l({uuid:e==null?void 0:e.uuid,nameSlug:e==null?void 0:e.nameSlug}),image:p(e==null?void 0:e.image,e==null?void 0:e.uuid,e==null?void 0:e.sellerUuid)||null},m))}),[i,f,s]);return r.jsxs(v.RegulatTitleSectionWrapper,{ref:a,children:[r.jsx("div",{className:"regular-title",children:r.jsxs("div",{className:"regular-title-text",children:[d.isDefinedNotEmptyString(n)&&r.jsx("i",{className:n}),r.jsx("span",{children:c})]})}),r.jsx(C,{className:"products-banner",children:r.jsx("img",{src:h})}),r.jsx(P,{limit:s,children:r.jsx(_,{isLoading:b,limit:s,keyPrefix:"explore-landing",children:S})})]})});module.exports=q;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsxs as s, jsx as r, Fragment as c } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as u, Suspense as P, memo as y, useMemo as N } from "react";
|
|
3
3
|
import { s as p } from "./emotion-styled.browser.esm-BNN1dTl3.js";
|
|
4
|
-
import { M as
|
|
4
|
+
import { M as g } from "./consts-BuFChS64.js";
|
|
5
5
|
import { u as $ } from "./useDetectMobile-Bkvj0VMa.js";
|
|
6
6
|
import { R as U } from "./style-DFPWLJBr.js";
|
|
7
|
-
import { p as I, o as
|
|
7
|
+
import { p as I, o as w, l as M, k as W } from "./utils-BdsZgOUE.js";
|
|
8
8
|
import { P as j } from "./index-CF3HhgvN.js";
|
|
9
9
|
const E = p.div`
|
|
10
10
|
width: 100%;
|
|
@@ -23,12 +23,19 @@ const E = p.div`
|
|
|
23
23
|
height: 100%;
|
|
24
24
|
object-fit: cover;
|
|
25
25
|
}
|
|
26
|
+
|
|
27
|
+
@media (max-width: ${g + "px"}) {
|
|
28
|
+
height: 100%;
|
|
29
|
+
min-height: 100%;
|
|
30
|
+
max-height: 100%;
|
|
31
|
+
aspect-ratio: 1 / 1;
|
|
32
|
+
}
|
|
26
33
|
`, R = p.div`
|
|
27
34
|
display: grid;
|
|
28
35
|
grid-template-columns: ${(t) => `repeat(${t.limit}, minmax(0, 1fr))`};
|
|
29
36
|
gap: 1.25rem;
|
|
30
37
|
|
|
31
|
-
@media (max-width: ${
|
|
38
|
+
@media (max-width: ${g + "px"}) {
|
|
32
39
|
display: flex;
|
|
33
40
|
gap: 1rem;
|
|
34
41
|
overflow-x: auto;
|
|
@@ -67,18 +74,18 @@ const E = p.div`
|
|
|
67
74
|
}
|
|
68
75
|
|
|
69
76
|
& .skeleton-img {
|
|
70
|
-
background-color: ${
|
|
77
|
+
background-color: ${w("-90deg")};
|
|
71
78
|
border-radius: 0.75rem;
|
|
72
79
|
border: 1px solid white;
|
|
73
80
|
}
|
|
74
81
|
|
|
75
82
|
& .skeleton-title {
|
|
76
|
-
background-color: ${
|
|
83
|
+
background-color: ${w("-90deg")};
|
|
77
84
|
width: 100%;
|
|
78
85
|
height: 1.25rem;
|
|
79
86
|
}
|
|
80
87
|
|
|
81
|
-
@media (max-width: ${
|
|
88
|
+
@media (max-width: ${g + "px"}) {
|
|
82
89
|
& img {
|
|
83
90
|
width: 8.875rem;
|
|
84
91
|
height: 8.875rem;
|
|
@@ -94,13 +101,13 @@ const E = p.div`
|
|
|
94
101
|
uuid: o,
|
|
95
102
|
title: i,
|
|
96
103
|
image: a,
|
|
97
|
-
sellerUuid:
|
|
98
|
-
onSelectCard:
|
|
104
|
+
sellerUuid: h,
|
|
105
|
+
onSelectCard: d = () => {
|
|
99
106
|
},
|
|
100
|
-
imageComponent:
|
|
107
|
+
imageComponent: n
|
|
101
108
|
} = t;
|
|
102
|
-
return /* @__PURE__ */ s(k, { ref: l, className: "product-card", onClick:
|
|
103
|
-
M(
|
|
109
|
+
return /* @__PURE__ */ s(k, { ref: l, className: "product-card", onClick: d, children: [
|
|
110
|
+
M(n) ? n : /* @__PURE__ */ r(j, { src: a }),
|
|
104
111
|
/* @__PURE__ */ r("div", { className: "card-title", children: i })
|
|
105
112
|
] });
|
|
106
113
|
}), B = u(({}, t) => /* @__PURE__ */ s(k, { className: "product-card", children: [
|
|
@@ -125,45 +132,45 @@ const E = p.div`
|
|
|
125
132
|
limit: i,
|
|
126
133
|
keyPrefix: a
|
|
127
134
|
}
|
|
128
|
-
) : t }),
|
|
135
|
+
) : t }), S = y(z), q = u((t, l) => {
|
|
129
136
|
const {
|
|
130
137
|
icon: o,
|
|
131
138
|
items: i,
|
|
132
139
|
limit: a = 4,
|
|
133
|
-
imageUrl:
|
|
134
|
-
onSelectCard:
|
|
140
|
+
imageUrl: h,
|
|
141
|
+
onSelectCard: d = () => {
|
|
135
142
|
},
|
|
136
|
-
title:
|
|
143
|
+
title: n = "Season inspiration",
|
|
137
144
|
isLoading: v = !1,
|
|
138
|
-
getImage:
|
|
145
|
+
getImage: f = () => {
|
|
139
146
|
}
|
|
140
|
-
} = t,
|
|
141
|
-
|
|
147
|
+
} = t, b = $(), C = N(() => /* @__PURE__ */ r(c, { children: b === !0 ? i == null ? void 0 : i.map((e, m) => /* @__PURE__ */ r(
|
|
148
|
+
S,
|
|
142
149
|
{
|
|
143
150
|
title: e == null ? void 0 : e.name,
|
|
144
151
|
sellerUuid: e == null ? void 0 : e.sellerUuid,
|
|
145
152
|
uuid: e == null ? void 0 : e.uuid,
|
|
146
|
-
onSelectCard: () =>
|
|
147
|
-
image:
|
|
153
|
+
onSelectCard: () => d({ uuid: e == null ? void 0 : e.uuid, nameSlug: e == null ? void 0 : e.nameSlug }),
|
|
154
|
+
image: f(e == null ? void 0 : e.image, e == null ? void 0 : e.uuid, e == null ? void 0 : e.sellerUuid) || null
|
|
148
155
|
},
|
|
149
156
|
m
|
|
150
157
|
)) : i == null ? void 0 : i.slice(0, a).map((e, m) => /* @__PURE__ */ r(
|
|
151
|
-
|
|
158
|
+
S,
|
|
152
159
|
{
|
|
153
160
|
title: e == null ? void 0 : e.name,
|
|
154
161
|
sellerUuid: e == null ? void 0 : e.sellerUuid,
|
|
155
162
|
uuid: e == null ? void 0 : e.uuid,
|
|
156
|
-
onSelectCard: () =>
|
|
157
|
-
image:
|
|
163
|
+
onSelectCard: () => d({ uuid: e == null ? void 0 : e.uuid, nameSlug: e == null ? void 0 : e.nameSlug }),
|
|
164
|
+
image: f(e == null ? void 0 : e.image, e == null ? void 0 : e.uuid, e == null ? void 0 : e.sellerUuid) || null
|
|
158
165
|
},
|
|
159
166
|
m
|
|
160
|
-
)) }), [i,
|
|
167
|
+
)) }), [i, b, a]);
|
|
161
168
|
return /* @__PURE__ */ s(U, { ref: l, children: [
|
|
162
169
|
/* @__PURE__ */ r("div", { className: "regular-title", children: /* @__PURE__ */ s("div", { className: "regular-title-text", children: [
|
|
163
170
|
W(o) && /* @__PURE__ */ r("i", { className: o }),
|
|
164
|
-
/* @__PURE__ */ r("span", { children:
|
|
171
|
+
/* @__PURE__ */ r("span", { children: n })
|
|
165
172
|
] }) }),
|
|
166
|
-
/* @__PURE__ */ r(E, { className: "products-banner", children: /* @__PURE__ */ r("img", { src:
|
|
173
|
+
/* @__PURE__ */ r(E, { className: "products-banner", children: /* @__PURE__ */ r("img", { src: h }) }),
|
|
167
174
|
/* @__PURE__ */ r(R, { limit: a, children: /* @__PURE__ */ r(
|
|
168
175
|
_,
|
|
169
176
|
{
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const t=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";const t=require("react/jsx-runtime"),b=require("react"),u=require("./Button.cjs"),_=require("./skeleton-CanJ6Gr6.cjs"),d=require("./utils-Dl9xPH4c.cjs"),j=require("./emotion-styled.browser.esm-BtEseadx.cjs"),C=require("./consts-goSZX3xP.cjs"),k=j.styled.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
align-items: flex-start;
|
|
@@ -67,25 +67,63 @@
|
|
|
67
67
|
width: 100%;
|
|
68
68
|
}
|
|
69
69
|
|
|
70
|
+
& .wrapper__view-all {
|
|
71
|
+
align-self: center;
|
|
72
|
+
color: var(--neutral-600, #0f2a46);
|
|
73
|
+
font-size: 0.875rem;
|
|
74
|
+
font-style: normal;
|
|
75
|
+
font-weight: 500;
|
|
76
|
+
line-height: 1.25rem;
|
|
77
|
+
letter-spacing: -0.0056rem;
|
|
78
|
+
|
|
79
|
+
&:focus {
|
|
80
|
+
outline: none;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
display: none;
|
|
84
|
+
}
|
|
85
|
+
|
|
70
86
|
@media (max-width: ${C.MOBILE_SIZE_PX+"px"}) {
|
|
87
|
+
& .wrapper__view-all {
|
|
88
|
+
display: unset;
|
|
89
|
+
}
|
|
90
|
+
|
|
71
91
|
& .wrapper__heading {
|
|
72
92
|
& .wrapper__title {
|
|
73
93
|
& .title__action {
|
|
74
|
-
|
|
94
|
+
&.grid {
|
|
95
|
+
display: none;
|
|
96
|
+
}
|
|
75
97
|
}
|
|
76
98
|
}
|
|
77
99
|
}
|
|
78
100
|
|
|
79
101
|
& .wrapper__cards {
|
|
80
|
-
grid-template-columns: ${i=>`repeat(${i==null?void 0:i.limitCardsForMobile}, minmax(0, 1fr))`};
|
|
81
102
|
gap: 1rem;
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
103
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
104
|
+
${i=>i!=null&&i.gridView?`
|
|
105
|
+
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
106
|
+
& > div {
|
|
107
|
+
min-width:100%;
|
|
108
|
+
max-width:100%;
|
|
109
|
+
}`:`
|
|
110
|
+
display: flex;
|
|
111
|
+
overflow-x: auto;
|
|
112
|
+
|
|
113
|
+
-webkit-overflow-scrolling: touch;
|
|
114
|
+
::-webkit-scrollbar {
|
|
115
|
+
-webkit-appearance: none;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
-ms-overflow-style: none;
|
|
119
|
+
/* Internet Explorer 10+ */
|
|
120
|
+
scrollbar-width: none;
|
|
121
|
+
/* Firefox */
|
|
122
|
+
|
|
123
|
+
&::-webkit-scrollbar {
|
|
124
|
+
display: none;
|
|
125
|
+
/* Safari and Chrome */
|
|
126
|
+
}`}
|
|
89
127
|
}
|
|
90
128
|
}
|
|
91
|
-
`,S=
|
|
129
|
+
`,S=b.forwardRef(({title:i,subtitle:o,items:r,limit:g=4,limitForMobile:w=2,buttonText:a="Show More",onSelectCard:h=()=>{},onButtonAction:n=()=>{},icon:p,getImage:f=()=>{},getProductImage:x=()=>{},hideProducts:c=!1,showRating:y=!0,gridView:l=!1},v)=>{var m;return t.jsxs(k,{ref:v,limitCards:g,limitCardsForMobile:w,gridView:l,children:[t.jsxs("div",{className:"wrapper__heading",children:[t.jsxs("div",{className:"wrapper__title",children:[i&&t.jsxs("div",{className:"title__text",children:[d.isDefinedNotEmptyString(p)&&t.jsx("i",{className:p}),t.jsx("span",{children:i})]}),n&&t.jsx(u,{text:a,color:"neutral",borderRadius:"curved",btnType:"tinted",className:`title__action ${l?"grid":""}`,onClick:n})]}),o&&t.jsx("div",{className:"wrapper__subtitle",children:o})]}),t.jsx("div",{className:"wrapper__cards",children:r&&(r==null?void 0:r.length)>0?r==null?void 0:r.map((e,s)=>t.jsx(_.ShopCard,{showRating:!y,uuid:e==null?void 0:e.uuid,title:e==null?void 0:e.name,subtitle:e==null?void 0:e.shortDescription,rating:e==null?void 0:e.ratingArithmeticMean,reviewCount:e==null?void 0:e.reviewCount,products:e==null?void 0:e.products,imageComponent:e==null?void 0:e.imageComponent,onSelectCard:()=>h(e==null?void 0:e.uuid),image:f(e==null?void 0:e.profileImage,e==null?void 0:e.uuid)||null,getProductImage:x,canAcceptPayments:e==null?void 0:e.canAcceptPayments,hideProducts:!c},`shop-card__${s+1}`)):(m=Array.from("1234"))==null?void 0:m.map((e,s)=>t.jsx(_.ShopCardSkeleton,{},`shop-card-skeleton__${s+1}`))}),l&&n&&t.jsx(u,{text:a,borderRadius:"curved",btnType:"basic",color:"neutral",className:"wrapper__view-all",onClick:n})]})});module.exports=S;
|
package/dist/ShopCardsSection.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { jsxs as n, jsx as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import
|
|
4
|
-
import { S as
|
|
5
|
-
import { k
|
|
6
|
-
import { s as
|
|
7
|
-
import { M as
|
|
8
|
-
const $ =
|
|
1
|
+
import { jsxs as n, jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as d } from "react";
|
|
3
|
+
import _ from "./Button.js";
|
|
4
|
+
import { S as c, a as C } from "./skeleton-BWFqIToC.js";
|
|
5
|
+
import { k } from "./utils-BdsZgOUE.js";
|
|
6
|
+
import { s as S } from "./emotion-styled.browser.esm-BNN1dTl3.js";
|
|
7
|
+
import { M as N } from "./consts-BuFChS64.js";
|
|
8
|
+
const $ = S.div`
|
|
9
9
|
display: flex;
|
|
10
10
|
flex-direction: column;
|
|
11
11
|
align-items: flex-start;
|
|
@@ -74,79 +74,119 @@ const $ = N.div`
|
|
|
74
74
|
width: 100%;
|
|
75
75
|
}
|
|
76
76
|
|
|
77
|
-
|
|
77
|
+
& .wrapper__view-all {
|
|
78
|
+
align-self: center;
|
|
79
|
+
color: var(--neutral-600, #0f2a46);
|
|
80
|
+
font-size: 0.875rem;
|
|
81
|
+
font-style: normal;
|
|
82
|
+
font-weight: 500;
|
|
83
|
+
line-height: 1.25rem;
|
|
84
|
+
letter-spacing: -0.0056rem;
|
|
85
|
+
|
|
86
|
+
&:focus {
|
|
87
|
+
outline: none;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
display: none;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
@media (max-width: ${N + "px"}) {
|
|
94
|
+
& .wrapper__view-all {
|
|
95
|
+
display: unset;
|
|
96
|
+
}
|
|
97
|
+
|
|
78
98
|
& .wrapper__heading {
|
|
79
99
|
& .wrapper__title {
|
|
80
100
|
& .title__action {
|
|
81
|
-
|
|
101
|
+
&.grid {
|
|
102
|
+
display: none;
|
|
103
|
+
}
|
|
82
104
|
}
|
|
83
105
|
}
|
|
84
106
|
}
|
|
85
107
|
|
|
86
108
|
& .wrapper__cards {
|
|
87
|
-
grid-template-columns: ${(t) => `repeat(${t == null ? void 0 : t.limitCardsForMobile}, minmax(0, 1fr))`};
|
|
88
109
|
gap: 1rem;
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
110
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
111
|
+
${(t) => t != null && t.gridView ? `
|
|
112
|
+
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
113
|
+
& > div {
|
|
114
|
+
min-width:100%;
|
|
115
|
+
max-width:100%;
|
|
116
|
+
}` : `
|
|
117
|
+
display: flex;
|
|
118
|
+
overflow-x: auto;
|
|
119
|
+
|
|
120
|
+
-webkit-overflow-scrolling: touch;
|
|
121
|
+
::-webkit-scrollbar {
|
|
122
|
+
-webkit-appearance: none;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
-ms-overflow-style: none;
|
|
126
|
+
/* Internet Explorer 10+ */
|
|
127
|
+
scrollbar-width: none;
|
|
128
|
+
/* Firefox */
|
|
129
|
+
|
|
130
|
+
&::-webkit-scrollbar {
|
|
131
|
+
display: none;
|
|
132
|
+
/* Safari and Chrome */
|
|
133
|
+
}`}
|
|
96
134
|
}
|
|
97
135
|
}
|
|
98
|
-
`,
|
|
136
|
+
`, D = d(
|
|
99
137
|
({
|
|
100
138
|
title: t,
|
|
101
|
-
subtitle:
|
|
102
|
-
items:
|
|
103
|
-
limit:
|
|
104
|
-
limitForMobile:
|
|
105
|
-
buttonText:
|
|
106
|
-
onSelectCard:
|
|
139
|
+
subtitle: s,
|
|
140
|
+
items: r,
|
|
141
|
+
limit: g = 4,
|
|
142
|
+
limitForMobile: h = 2,
|
|
143
|
+
buttonText: p = "Show More",
|
|
144
|
+
onSelectCard: u = () => {
|
|
107
145
|
},
|
|
108
|
-
onButtonAction:
|
|
146
|
+
onButtonAction: l = () => {
|
|
109
147
|
},
|
|
110
|
-
icon:
|
|
111
|
-
getImage:
|
|
148
|
+
icon: m,
|
|
149
|
+
getImage: w = () => {
|
|
112
150
|
},
|
|
113
|
-
getProductImage:
|
|
151
|
+
getProductImage: y = () => {
|
|
114
152
|
},
|
|
115
|
-
hideProducts:
|
|
116
|
-
showRating: x = !0
|
|
117
|
-
|
|
118
|
-
|
|
153
|
+
hideProducts: v = !1,
|
|
154
|
+
showRating: x = !0,
|
|
155
|
+
gridView: o = !1
|
|
156
|
+
}, b) => {
|
|
157
|
+
var f;
|
|
119
158
|
return /* @__PURE__ */ n(
|
|
120
159
|
$,
|
|
121
160
|
{
|
|
122
|
-
ref:
|
|
123
|
-
limitCards:
|
|
124
|
-
limitCardsForMobile:
|
|
161
|
+
ref: b,
|
|
162
|
+
limitCards: g,
|
|
163
|
+
limitCardsForMobile: h,
|
|
164
|
+
gridView: o,
|
|
125
165
|
children: [
|
|
126
166
|
/* @__PURE__ */ n("div", { className: "wrapper__heading", children: [
|
|
127
167
|
/* @__PURE__ */ n("div", { className: "wrapper__title", children: [
|
|
128
168
|
t && /* @__PURE__ */ n("div", { className: "title__text", children: [
|
|
129
|
-
|
|
130
|
-
/* @__PURE__ */
|
|
169
|
+
k(m) && /* @__PURE__ */ i("i", { className: m }),
|
|
170
|
+
/* @__PURE__ */ i("span", { children: t })
|
|
131
171
|
] }),
|
|
132
|
-
|
|
133
|
-
|
|
172
|
+
l && /* @__PURE__ */ i(
|
|
173
|
+
_,
|
|
134
174
|
{
|
|
135
|
-
text:
|
|
175
|
+
text: p,
|
|
136
176
|
color: "neutral",
|
|
137
177
|
borderRadius: "curved",
|
|
138
178
|
btnType: "tinted",
|
|
139
|
-
className:
|
|
140
|
-
onClick:
|
|
179
|
+
className: `title__action ${o ? "grid" : ""}`,
|
|
180
|
+
onClick: l
|
|
141
181
|
}
|
|
142
182
|
)
|
|
143
183
|
] }),
|
|
144
|
-
|
|
184
|
+
s && /* @__PURE__ */ i("div", { className: "wrapper__subtitle", children: s })
|
|
145
185
|
] }),
|
|
146
|
-
/* @__PURE__ */
|
|
147
|
-
|
|
186
|
+
/* @__PURE__ */ i("div", { className: "wrapper__cards", children: r && (r == null ? void 0 : r.length) > 0 ? r == null ? void 0 : r.map((e, a) => /* @__PURE__ */ i(
|
|
187
|
+
c,
|
|
148
188
|
{
|
|
149
|
-
showRating: x,
|
|
189
|
+
showRating: !x,
|
|
150
190
|
uuid: e == null ? void 0 : e.uuid,
|
|
151
191
|
title: e == null ? void 0 : e.name,
|
|
152
192
|
subtitle: e == null ? void 0 : e.shortDescription,
|
|
@@ -154,19 +194,30 @@ const $ = N.div`
|
|
|
154
194
|
reviewCount: e == null ? void 0 : e.reviewCount,
|
|
155
195
|
products: e == null ? void 0 : e.products,
|
|
156
196
|
imageComponent: e == null ? void 0 : e.imageComponent,
|
|
157
|
-
onSelectCard: () =>
|
|
158
|
-
image:
|
|
159
|
-
getProductImage:
|
|
197
|
+
onSelectCard: () => u(e == null ? void 0 : e.uuid),
|
|
198
|
+
image: w(e == null ? void 0 : e.profileImage, e == null ? void 0 : e.uuid) || null,
|
|
199
|
+
getProductImage: y,
|
|
160
200
|
canAcceptPayments: e == null ? void 0 : e.canAcceptPayments,
|
|
161
|
-
hideProducts:
|
|
201
|
+
hideProducts: !v
|
|
162
202
|
},
|
|
163
|
-
`shop-card__${
|
|
164
|
-
)) : (
|
|
203
|
+
`shop-card__${a + 1}`
|
|
204
|
+
)) : (f = Array.from("1234")) == null ? void 0 : f.map((e, a) => /* @__PURE__ */ i(C, {}, `shop-card-skeleton__${a + 1}`)) }),
|
|
205
|
+
o && l && /* @__PURE__ */ i(
|
|
206
|
+
_,
|
|
207
|
+
{
|
|
208
|
+
text: p,
|
|
209
|
+
borderRadius: "curved",
|
|
210
|
+
btnType: "basic",
|
|
211
|
+
color: "neutral",
|
|
212
|
+
className: "wrapper__view-all",
|
|
213
|
+
onClick: l
|
|
214
|
+
}
|
|
215
|
+
)
|
|
165
216
|
]
|
|
166
217
|
}
|
|
167
218
|
);
|
|
168
219
|
}
|
|
169
220
|
);
|
|
170
221
|
export {
|
|
171
|
-
|
|
222
|
+
D as default
|
|
172
223
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=require("react/jsx-runtime"),d=require("react"),i=require("./skeleton-
|
|
1
|
+
"use strict";const e=require("react/jsx-runtime"),d=require("react"),i=require("./skeleton-BdbB-LdT.cjs"),x=require("./useDetectMobile-zkbzoOGV.cjs"),c=require("./Button.cjs"),m=require("./index-BueKsXT8.cjs"),p=d.forwardRef((o,n)=>{const{title:l,imageUrl:a,text:u,onCardClick:t,buttonText:r}=o,s=x.useDetectMobile();return e.jsxs(i.Wrapper,{ref:n,className:"blog-card",onClick:t,children:[e.jsx(m.ProductImageWrapper,{src:a}),e.jsxs(i.TextWrapper,{children:[e.jsx("div",{className:"text-wr-title",children:l}),e.jsx("div",{className:"text-wr",children:u}),s!==!0&&e.jsx(c,{type:"button",btnType:"outline",size:"medium",color:"gray",onClick:t,children:r})]}),s===!0&&e.jsx(c,{className:"action",type:"button",btnType:"outline",size:"medium",color:"gray",onClick:t,children:r})]})});exports.BlogCardLarge=p;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as i, jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as p } from "react";
|
|
3
|
-
import { W as d, T as u } from "./skeleton-
|
|
3
|
+
import { W as d, T as u } from "./skeleton-CQPwIEP0.js";
|
|
4
4
|
import { u as b } from "./useDetectMobile-Bkvj0VMa.js";
|
|
5
5
|
import a from "./Button.js";
|
|
6
6
|
import { P as f } from "./index-CF3HhgvN.js";
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { jsxs as i, jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as h, useRef as L, useEffect as
|
|
2
|
+
import { forwardRef as h, useRef as L, useEffect as j, Fragment as I } from "react";
|
|
3
3
|
import c from "./Icon.js";
|
|
4
|
-
import { p as d, o as
|
|
4
|
+
import { p as d, o as _, l as g } from "./utils-BdsZgOUE.js";
|
|
5
5
|
import { D as f } from "./ShopAvatar-4-fCYGEc.js";
|
|
6
|
-
import { P
|
|
6
|
+
import { P } from "./index-CF3HhgvN.js";
|
|
7
7
|
import { s as w } from "./emotion-styled.browser.esm-BNN1dTl3.js";
|
|
8
|
-
|
|
8
|
+
import { M as z } from "./consts-BuFChS64.js";
|
|
9
|
+
const D = w.div`
|
|
9
10
|
display: flex;
|
|
10
11
|
flex-direction: column;
|
|
11
12
|
align-items: center;
|
|
@@ -38,6 +39,10 @@ const G = w.div`
|
|
|
38
39
|
}
|
|
39
40
|
}
|
|
40
41
|
|
|
42
|
+
& .wrapper_stars {
|
|
43
|
+
display: flex;
|
|
44
|
+
}
|
|
45
|
+
|
|
41
46
|
& .wrapper__info {
|
|
42
47
|
display: flex;
|
|
43
48
|
flex-direction: column;
|
|
@@ -129,7 +134,18 @@ const G = w.div`
|
|
|
129
134
|
}
|
|
130
135
|
}
|
|
131
136
|
}
|
|
132
|
-
|
|
137
|
+
|
|
138
|
+
@media (max-width: ${z + "px"}) {
|
|
139
|
+
max-width: 10rem;
|
|
140
|
+
min-width: 10rem;
|
|
141
|
+
|
|
142
|
+
& .wrapper__content {
|
|
143
|
+
& .wrapper__image {
|
|
144
|
+
max-height: 3rem;
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
`, G = w.div`
|
|
133
149
|
display: flex;
|
|
134
150
|
flex-direction: column;
|
|
135
151
|
align-items: center;
|
|
@@ -155,7 +171,7 @@ const G = w.div`
|
|
|
155
171
|
width: 4rem;
|
|
156
172
|
height: 4rem;
|
|
157
173
|
border-radius: 999px;
|
|
158
|
-
background-color: ${
|
|
174
|
+
background-color: ${_("-90deg")};
|
|
159
175
|
}
|
|
160
176
|
}
|
|
161
177
|
|
|
@@ -167,69 +183,69 @@ const G = w.div`
|
|
|
167
183
|
width: 100%;
|
|
168
184
|
|
|
169
185
|
& .wrapper__info-item {
|
|
170
|
-
background-color: ${
|
|
186
|
+
background-color: ${_("-90deg")};
|
|
171
187
|
height: 1rem;
|
|
172
188
|
width: 100%;
|
|
173
189
|
}
|
|
174
190
|
}
|
|
175
|
-
`,
|
|
191
|
+
`, X = h(
|
|
176
192
|
({
|
|
177
|
-
uuid:
|
|
178
|
-
image:
|
|
193
|
+
uuid: m,
|
|
194
|
+
image: o,
|
|
179
195
|
imageComponent: p,
|
|
180
196
|
title: x,
|
|
181
197
|
subtitle: v,
|
|
182
198
|
badges: b,
|
|
183
199
|
rating: y,
|
|
184
|
-
reviewCount:
|
|
185
|
-
products:
|
|
200
|
+
reviewCount: l,
|
|
201
|
+
products: s,
|
|
186
202
|
onSelectCard: N = () => {
|
|
187
203
|
},
|
|
188
204
|
getProductImage: k = () => {
|
|
189
205
|
},
|
|
190
|
-
canAcceptPayments:
|
|
191
|
-
hideProducts:
|
|
206
|
+
canAcceptPayments: S,
|
|
207
|
+
hideProducts: u = !1,
|
|
192
208
|
showRating: $ = !0
|
|
193
|
-
},
|
|
209
|
+
}, E) => {
|
|
194
210
|
const n = L();
|
|
195
|
-
return
|
|
196
|
-
var
|
|
211
|
+
return j(() => {
|
|
212
|
+
var t;
|
|
197
213
|
const e = (a) => {
|
|
198
214
|
a.target.src = f, a.onerror = null;
|
|
199
215
|
};
|
|
200
|
-
return (
|
|
216
|
+
return (t = n == null ? void 0 : n.current) == null || t.addEventListener("error", e), () => {
|
|
201
217
|
var a;
|
|
202
218
|
(a = n == null ? void 0 : n.current) == null || a.removeEventListener("error", e);
|
|
203
219
|
};
|
|
204
|
-
}, []), /* @__PURE__ */ i(
|
|
220
|
+
}, []), /* @__PURE__ */ i(D, { ref: E, onClick: N, children: [
|
|
205
221
|
/* @__PURE__ */ i("div", { className: "wrapper__content", children: [
|
|
206
|
-
|
|
222
|
+
g(p) ? p : o ? /* @__PURE__ */ r("img", { ref: n, src: o, className: "wrapper__image" }) : /* @__PURE__ */ r("img", { src: f, className: "wrapper__image" }),
|
|
207
223
|
/* @__PURE__ */ i("div", { className: "wrapper__info", children: [
|
|
208
224
|
/* @__PURE__ */ i("div", { className: "wrapper__title", children: [
|
|
209
225
|
x,
|
|
210
226
|
" ",
|
|
211
|
-
|
|
227
|
+
S && /* @__PURE__ */ r(c, { color: "secondary", icon: "credit-card", className: "card" })
|
|
212
228
|
] }),
|
|
213
229
|
/* @__PURE__ */ r("div", { className: "wrapper__subtitle", children: v }),
|
|
214
230
|
b && /* @__PURE__ */ r("div", { className: "wrapper__badges" }),
|
|
215
231
|
$ && /* @__PURE__ */ i("div", { className: "wrapper__rating", children: [
|
|
216
|
-
/* @__PURE__ */ r("div", { className: "wrapper_stars", children: [...Array(5).keys()].map((e,
|
|
232
|
+
/* @__PURE__ */ r("div", { className: "wrapper_stars", children: [...Array(5).keys()].map((e, t) => /* @__PURE__ */ r(
|
|
217
233
|
c,
|
|
218
234
|
{
|
|
219
235
|
icon: " mng-lnc-star--filled",
|
|
220
236
|
className: `wrapper__star ${e >= y ? "gold-star" : ""}`
|
|
221
237
|
},
|
|
222
|
-
`shop-card-rating-star__${
|
|
238
|
+
`shop-card-rating-star__${t + 1}`
|
|
223
239
|
)) }),
|
|
224
240
|
/* @__PURE__ */ i("div", { className: "wrapper__review-count", children: [
|
|
225
241
|
"(",
|
|
226
|
-
|
|
242
|
+
l == null ? void 0 : l.toLocaleString(),
|
|
227
243
|
")"
|
|
228
244
|
] })
|
|
229
245
|
] })
|
|
230
246
|
] })
|
|
231
247
|
] }),
|
|
232
|
-
|
|
248
|
+
u !== !0 && /* @__PURE__ */ r("div", { className: "wrapper__products", children: s && (s == null ? void 0 : s.map((e, t) => /* @__PURE__ */ r(I, { children: /* @__PURE__ */ r(
|
|
233
249
|
"div",
|
|
234
250
|
{
|
|
235
251
|
className: "wrapper__product",
|
|
@@ -237,22 +253,22 @@ const G = w.div`
|
|
|
237
253
|
var a;
|
|
238
254
|
return (a = e == null ? void 0 : e.onSelectProduct) == null ? void 0 : a.call(e, e == null ? void 0 : e.uuid);
|
|
239
255
|
},
|
|
240
|
-
children:
|
|
241
|
-
|
|
256
|
+
children: g(e == null ? void 0 : e.imageComponent) ? e == null ? void 0 : e.imageComponent : /* @__PURE__ */ r(
|
|
257
|
+
P,
|
|
242
258
|
{
|
|
243
259
|
src: k(
|
|
244
260
|
e == null ? void 0 : e.image,
|
|
245
261
|
e == null ? void 0 : e.uuid,
|
|
246
|
-
|
|
262
|
+
m
|
|
247
263
|
),
|
|
248
264
|
className: "product__image"
|
|
249
265
|
}
|
|
250
266
|
)
|
|
251
267
|
}
|
|
252
|
-
) },
|
|
268
|
+
) }, t))) })
|
|
253
269
|
] });
|
|
254
270
|
}
|
|
255
|
-
),
|
|
271
|
+
), Z = h(({}, m) => /* @__PURE__ */ r(G, { children: /* @__PURE__ */ i("div", { className: "wrapper__content", children: [
|
|
256
272
|
/* @__PURE__ */ r("div", { className: "wrapper__image" }),
|
|
257
273
|
/* @__PURE__ */ i("div", { className: "wrapper__info", children: [
|
|
258
274
|
/* @__PURE__ */ r("div", { className: "wrapper__info-item" }),
|
|
@@ -262,6 +278,6 @@ const G = w.div`
|
|
|
262
278
|
] })
|
|
263
279
|
] }) }));
|
|
264
280
|
export {
|
|
265
|
-
|
|
266
|
-
|
|
281
|
+
X as S,
|
|
282
|
+
Z as a
|
|
267
283
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const r=require("react/jsx-runtime"),t=require("react"),d=require("./Icon.cjs"),n=require("./utils-Dl9xPH4c.cjs"),_=require("./ShopAvatar-CV3lj34D.cjs"),S=require("./index-BueKsXT8.cjs"),g=require("./emotion-styled.browser.esm-BtEseadx.cjs"),k=g.styled.div`
|
|
1
|
+
"use strict";const r=require("react/jsx-runtime"),t=require("react"),d=require("./Icon.cjs"),n=require("./utils-Dl9xPH4c.cjs"),_=require("./ShopAvatar-CV3lj34D.cjs"),S=require("./index-BueKsXT8.cjs"),g=require("./emotion-styled.browser.esm-BtEseadx.cjs"),k=require("./consts-goSZX3xP.cjs"),q=g.styled.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
align-items: center;
|
|
@@ -31,6 +31,10 @@
|
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
+
& .wrapper_stars {
|
|
35
|
+
display: flex;
|
|
36
|
+
}
|
|
37
|
+
|
|
34
38
|
& .wrapper__info {
|
|
35
39
|
display: flex;
|
|
36
40
|
flex-direction: column;
|
|
@@ -122,7 +126,18 @@
|
|
|
122
126
|
}
|
|
123
127
|
}
|
|
124
128
|
}
|
|
125
|
-
|
|
129
|
+
|
|
130
|
+
@media (max-width: ${k.MOBILE_SIZE_PX+"px"}) {
|
|
131
|
+
max-width: 10rem;
|
|
132
|
+
min-width: 10rem;
|
|
133
|
+
|
|
134
|
+
& .wrapper__content {
|
|
135
|
+
& .wrapper__image {
|
|
136
|
+
max-height: 3rem;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
`,$=g.styled.div`
|
|
126
141
|
display: flex;
|
|
127
142
|
flex-direction: column;
|
|
128
143
|
align-items: center;
|
|
@@ -165,4 +180,4 @@
|
|
|
165
180
|
width: 100%;
|
|
166
181
|
}
|
|
167
182
|
}
|
|
168
|
-
|
|
183
|
+
`,E=t.forwardRef(({uuid:c,image:m,imageComponent:p,title:x,subtitle:h,badges:w,rating:f,reviewCount:o,products:l,onSelectCard:v=()=>{},getProductImage:j=()=>{},canAcceptPayments:b,hideProducts:y=!1,showRating:N=!0},u)=>{const i=t.useRef();return t.useEffect(()=>{var s;const e=a=>{a.target.src=_.DefaultShopImage,a.onerror=null};return(s=i==null?void 0:i.current)==null||s.addEventListener("error",e),()=>{var a;(a=i==null?void 0:i.current)==null||a.removeEventListener("error",e)}},[]),r.jsxs(q,{ref:u,onClick:v,children:[r.jsxs("div",{className:"wrapper__content",children:[n.isDefined(p)?p:m?r.jsx("img",{ref:i,src:m,className:"wrapper__image"}):r.jsx("img",{src:_.DefaultShopImage,className:"wrapper__image"}),r.jsxs("div",{className:"wrapper__info",children:[r.jsxs("div",{className:"wrapper__title",children:[x," ",b&&r.jsx(d,{color:"secondary",icon:"credit-card",className:"card"})]}),r.jsx("div",{className:"wrapper__subtitle",children:h}),w&&r.jsx("div",{className:"wrapper__badges"}),N&&r.jsxs("div",{className:"wrapper__rating",children:[r.jsx("div",{className:"wrapper_stars",children:[...Array(5).keys()].map((e,s)=>r.jsx(d,{icon:" mng-lnc-star--filled",className:`wrapper__star ${e>=f?"gold-star":""}`},`shop-card-rating-star__${s+1}`))}),r.jsxs("div",{className:"wrapper__review-count",children:["(",o==null?void 0:o.toLocaleString(),")"]})]})]})]}),y!==!0&&r.jsx("div",{className:"wrapper__products",children:l&&(l==null?void 0:l.map((e,s)=>r.jsx(t.Fragment,{children:r.jsx("div",{className:"wrapper__product",onClick:()=>{var a;return(a=e==null?void 0:e.onSelectProduct)==null?void 0:a.call(e,e==null?void 0:e.uuid)},children:n.isDefined(e==null?void 0:e.imageComponent)?e==null?void 0:e.imageComponent:r.jsx(S.ProductImageWrapper,{src:j(e==null?void 0:e.image,e==null?void 0:e.uuid,c),className:"product__image"})})},s)))})]})}),I=t.forwardRef(({},c)=>r.jsx($,{children:r.jsxs("div",{className:"wrapper__content",children:[r.jsx("div",{className:"wrapper__image"}),r.jsxs("div",{className:"wrapper__info",children:[r.jsx("div",{className:"wrapper__info-item"}),r.jsx("div",{className:"wrapper__info-item"}),r.jsx("div",{className:"wrapper__info-item"}),r.jsx("div",{className:"wrapper__info-item"})]})]})}));exports.ShopCard=E;exports.ShopCardSkeleton=I;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as r, Fragment as l } from "react/jsx-runtime";
|
|
2
2
|
import { Suspense as a } from "react";
|
|
3
|
-
import { B as m } from "./skeleton-
|
|
3
|
+
import { B as m } from "./skeleton-CQPwIEP0.js";
|
|
4
4
|
const p = ({ limit: o = 2, isLoading: t = !1, keyPrefix: e }) => /* @__PURE__ */ r(l, { children: Array.from({ length: o }, (s, n) => /* @__PURE__ */ r(
|
|
5
5
|
m,
|
|
6
6
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=require("react/jsx-runtime"),l=require("react"),u=require("./skeleton-
|
|
1
|
+
"use strict";const e=require("react/jsx-runtime"),l=require("react"),u=require("./skeleton-BdbB-LdT.cjs"),c=({limit:s=2,isLoading:t=!1,keyPrefix:r})=>e.jsx(e.Fragment,{children:Array.from({length:s},(o,n)=>e.jsx(u.BlogCardLargeSkeleton,{isLoading:t},`${r}-skeleton-product-card-${n}`))}),a=({children:s,fallbackComponent:t=e.jsx(e.Fragment,{}),isLoading:r=!1,limit:o,keyPrefix:n})=>e.jsx(l.Suspense,{fallbackComponent:t,children:r===!0?e.jsx(c,{isLoading:r,limit:o,keyPrefix:n}):s});exports.SuspenseBlogLarge=a;
|