@lanaco/lnc-react-ui 4.0.152 → 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/FieldOfInterestsWithTagsCardsSection.cjs +10 -9
- package/dist/FieldOfInterestsWithTagsCardsSection.js +63 -59
- 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,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";
|