@lanaco/lnc-react-ui 4.0.38 → 4.0.39
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/BlogsSectionDetailed.cjs +11 -11
- package/dist/BlogsSectionDetailed.js +124 -87
- package/dist/BlogsSectionLarge.cjs +10 -10
- package/dist/BlogsSectionLarge.js +87 -60
- package/dist/BlogsSectionSimple.cjs +8 -8
- package/dist/BlogsSectionSimple.js +98 -72
- package/dist/BlogsSectionSimpleCentered.cjs +9 -9
- package/dist/BlogsSectionSimpleCentered.js +75 -45
- package/dist/BlogsSectionWithFilters.cjs +10 -10
- package/dist/BlogsSectionWithFilters.js +105 -77
- package/dist/DetailedProductsSection.cjs +4 -4
- package/dist/DetailedProductsSection.js +66 -57
- package/dist/FieldOfInterestsWithAvatarsCardsSection.cjs +1 -1
- package/dist/FieldOfInterestsWithAvatarsCardsSection.js +1 -1
- package/dist/OverlayGeneralCardsSection.cjs +20 -20
- package/dist/OverlayGeneralCardsSection.js +99 -59
- package/dist/ProductsWithBannerSection.cjs +10 -10
- package/dist/ProductsWithBannerSection.js +87 -56
- package/dist/SimpleCategoriesSection.cjs +9 -9
- package/dist/SimpleCategoriesSection.js +89 -58
- package/dist/SimpleProductsSection.cjs +3 -3
- package/dist/SimpleProductsSection.js +86 -55
- package/dist/UrgentSaleProductsSection.cjs +5 -5
- package/dist/UrgentSaleProductsSection.js +41 -30
- package/dist/{index-CHkb_Sj6.js → index-BN8qgFbe.js} +15 -15
- package/dist/{index-Dj5wZCVs.cjs → index-_Db92CJE.cjs} +3 -3
- package/dist/suspense-product-card-detailed-BETmfKMT.js +189 -0
- package/dist/{index-vXmvgZ2Y.cjs → suspense-product-card-detailed-DtzOxHaH.cjs} +4 -4
- package/package.json +1 -1
- package/dist/index-D6g5ZqyJ.js +0 -159
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
"use strict";const t=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";const t=require("react/jsx-runtime"),l=require("react"),p=require("./emotion-styled.browser.esm-Cle7tAM9.cjs"),f=require("./consts-CtNoHdBj.cjs"),v=require("./useDetectMobile-D6d5LpdL.cjs"),m=require("./utils-NZLCh-J5.cjs"),k=require("./style-BR3tIhP1.cjs"),C=require("./Button.cjs"),N=require("./Link.cjs"),q=p.newStyled.div`
|
|
2
2
|
display: grid;
|
|
3
3
|
grid-template-columns: ${r=>`repeat(${r.limit}, minmax(0, 1fr))`};
|
|
4
4
|
gap: 1.25rem;
|
|
5
5
|
|
|
6
|
-
@media (max-width: ${
|
|
6
|
+
@media (max-width: ${f.MOBILE_SIZE_PX+"px"}) {
|
|
7
7
|
grid-template-columns: repeat(1, 1fr);
|
|
8
8
|
}
|
|
9
|
-
`,
|
|
9
|
+
`,j=p.newStyled.div`
|
|
10
10
|
display: flex;
|
|
11
11
|
flex-direction: column;
|
|
12
12
|
width: 100%;
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
width: 100%;
|
|
39
39
|
max-height: 12.5625rem;
|
|
40
40
|
min-height: 12.5625rem;
|
|
41
|
-
background-color: ${
|
|
41
|
+
background-color: ${m.linearGradientAnimation("-90deg")};
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
& .action {
|
|
@@ -46,9 +46,9 @@
|
|
|
46
46
|
margin-top: auto;
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
-
@media (max-width: ${
|
|
49
|
+
@media (max-width: ${f.MOBILE_SIZE_PX+"px"}) {
|
|
50
50
|
}
|
|
51
|
-
`,w=
|
|
51
|
+
`,w=p.newStyled.div`
|
|
52
52
|
padding: 1rem 1rem 0 1rem;
|
|
53
53
|
display: flex;
|
|
54
54
|
flex-direction: column;
|
|
@@ -66,6 +66,6 @@
|
|
|
66
66
|
font-size: 0.875rem;
|
|
67
67
|
flex: 1;
|
|
68
68
|
color: var(--gray-700, #4e555f);
|
|
69
|
-
${
|
|
69
|
+
${m.truncateTextInRows(3)}
|
|
70
70
|
}
|
|
71
|
-
|
|
71
|
+
`,R=l.forwardRef(({},r)=>t.jsxs(j,{className:"product-card",children:[t.jsx("div",{className:"skeleton-img"}),t.jsx("div",{className:"card-title"}),t.jsx(w,{})]})),B=l.forwardRef((r,a)=>{const{title:i,image:s,text:o,onCardClick:c,readMoreText:d="Read more"}=r;return t.jsxs(j,{className:"blog-card",onClick:c,children:[t.jsx("img",{src:s}),t.jsxs(w,{children:[t.jsx("div",{className:"text-wr-title",children:i}),t.jsx("div",{className:"text-wr",children:o})]}),t.jsx(N,{className:"action",color:"gray",onClick:c,children:d})]})}),M=({limit:r=3,isLoading:a=!1,keyPrefix:i})=>t.jsx(t.Fragment,{children:Array.from({length:r},(s,o)=>t.jsx(R,{isLoading:a},`${i}-skeleton-product-card-${o}`))}),$=({children:r,fallbackComponent:a=t.jsx(t.Fragment,{}),isLoading:i=!1,limit:s,keyPrefix:o})=>t.jsx(l.Suspense,{fallbackComponent:a,children:i===!0?t.jsx(M,{isLoading:i,limit:s,keyPrefix:o}):r}),h=l.memo(B),_=l.forwardRef((r,a)=>{const{icon:i,title:s,onButtonAction:o=()=>{},onSelectCard:c=()=>{},buttonLink:d,items:n,buttonText:S,limit:u=3,isLoading:x=!1}=r,y=v.useDetectMobile(),b=l.useMemo(()=>t.jsx(t.Fragment,{children:y===!0?n==null?void 0:n.map((e,g)=>t.jsx(h,{title:e==null?void 0:e.title,image:e==null?void 0:e.image,text:e==null?void 0:e.text,titleSlug:e==null?void 0:e.titleSlug,onCardClick:()=>c(e==null?void 0:e.uuid)},g)):n==null?void 0:n.slice(0,u).map((e,g)=>t.jsx(h,{title:e==null?void 0:e.title,image:e==null?void 0:e.image,text:e==null?void 0:e.text,titleSlug:e==null?void 0:e.titleSlug,onCardClick:()=>c(e==null?void 0:e.uuid)},g))}),[n]);return t.jsxs(k.RegulatTitleSectionWrapper,{children:[t.jsxs("div",{className:"regular-title",children:[t.jsxs("div",{className:"regular-title-text",children:[m.isDefinedNotEmptyString(i)&&t.jsx("i",{className:i}),t.jsx("span",{children:s})]}),m.isDefinedNotEmptyString(d)&&t.jsx(C,{type:"button",btnType:"tinted",color:"gray",onClick:()=>o(d),borderRadius:"curved",children:S})]}),t.jsx(q,{limit:u,children:t.jsx($,{isLoading:x,limit:u,keyPrefix:"explore-landing",children:b})})]})});module.exports=_;
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { n as
|
|
4
|
-
import { M as
|
|
5
|
-
import { u as
|
|
6
|
-
import { m as
|
|
7
|
-
import { R } from "./style-6tSw9aqK.js";
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
const
|
|
1
|
+
import { jsxs as n, jsx as r, Fragment as g } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as u, Suspense as $, memo as B, useMemo as M } from "react";
|
|
3
|
+
import { n as h } from "./emotion-styled.browser.esm-CjCaF13H.js";
|
|
4
|
+
import { M as b } from "./consts-C1uHV4xc.js";
|
|
5
|
+
import { u as R } from "./useDetectMobile-BC6EGaBc.js";
|
|
6
|
+
import { m as T, t as P, k as f } from "./utils-DtRLzzTZ.js";
|
|
7
|
+
import { R as z } from "./style-6tSw9aqK.js";
|
|
8
|
+
import W from "./Button.js";
|
|
9
|
+
import j from "./Link.js";
|
|
10
|
+
const A = h.div`
|
|
11
11
|
display: grid;
|
|
12
|
-
grid-template-columns: ${(
|
|
12
|
+
grid-template-columns: ${(t) => `repeat(${t.limit}, minmax(0, 1fr))`};
|
|
13
13
|
gap: 1.25rem;
|
|
14
14
|
|
|
15
|
-
@media (max-width: ${
|
|
15
|
+
@media (max-width: ${b + "px"}) {
|
|
16
16
|
grid-template-columns: repeat(1, 1fr);
|
|
17
17
|
}
|
|
18
|
-
`,
|
|
18
|
+
`, w = h.div`
|
|
19
19
|
display: flex;
|
|
20
20
|
flex-direction: column;
|
|
21
21
|
width: 100%;
|
|
@@ -47,7 +47,7 @@ const B = p.div`
|
|
|
47
47
|
width: 100%;
|
|
48
48
|
max-height: 12.5625rem;
|
|
49
49
|
min-height: 12.5625rem;
|
|
50
|
-
background-color: ${
|
|
50
|
+
background-color: ${T("-90deg")};
|
|
51
51
|
}
|
|
52
52
|
|
|
53
53
|
& .action {
|
|
@@ -55,9 +55,9 @@ const B = p.div`
|
|
|
55
55
|
margin-top: auto;
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
-
@media (max-width: ${
|
|
58
|
+
@media (max-width: ${b + "px"}) {
|
|
59
59
|
}
|
|
60
|
-
`,
|
|
60
|
+
`, S = h.div`
|
|
61
61
|
padding: 1rem 1rem 0 1rem;
|
|
62
62
|
display: flex;
|
|
63
63
|
flex-direction: column;
|
|
@@ -75,84 +75,110 @@ const B = p.div`
|
|
|
75
75
|
font-size: 0.875rem;
|
|
76
76
|
flex: 1;
|
|
77
77
|
color: var(--gray-700, #4e555f);
|
|
78
|
-
${
|
|
78
|
+
${P(3)}
|
|
79
79
|
}
|
|
80
|
-
|
|
81
|
-
s(({}, r) => (
|
|
80
|
+
`, E = u(({}, t) => (
|
|
82
81
|
// <LandingPageClearProductCardSkeleton />
|
|
83
|
-
/* @__PURE__ */
|
|
84
|
-
/* @__PURE__ */
|
|
85
|
-
/* @__PURE__ */
|
|
86
|
-
/* @__PURE__ */
|
|
82
|
+
/* @__PURE__ */ n(w, { className: "product-card", children: [
|
|
83
|
+
/* @__PURE__ */ r("div", { className: "skeleton-img" }),
|
|
84
|
+
/* @__PURE__ */ r("div", { className: "card-title" }),
|
|
85
|
+
/* @__PURE__ */ r(S, {})
|
|
87
86
|
] })
|
|
88
|
-
))
|
|
89
|
-
const
|
|
90
|
-
const { title: l, image: m, text: d, onCardClick: o, readMoreText: n = "Read more" } = r;
|
|
87
|
+
)), I = u((t, m) => {
|
|
88
|
+
const { title: i, image: l, text: o, onCardClick: d, readMoreText: c = "Read more" } = t;
|
|
91
89
|
return (
|
|
92
90
|
// <SimpleBlogCardSkeleton />
|
|
93
|
-
/* @__PURE__ */
|
|
94
|
-
/* @__PURE__ */
|
|
95
|
-
/* @__PURE__ */
|
|
96
|
-
/* @__PURE__ */
|
|
97
|
-
/* @__PURE__ */
|
|
91
|
+
/* @__PURE__ */ n(w, { className: "blog-card", onClick: d, children: [
|
|
92
|
+
/* @__PURE__ */ r("img", { src: l }),
|
|
93
|
+
/* @__PURE__ */ n(S, { children: [
|
|
94
|
+
/* @__PURE__ */ r("div", { className: "text-wr-title", children: i }),
|
|
95
|
+
/* @__PURE__ */ r("div", { className: "text-wr", children: o })
|
|
98
96
|
] }),
|
|
99
|
-
/* @__PURE__ */
|
|
97
|
+
/* @__PURE__ */ r(j, { className: "action", color: "gray", onClick: d, children: c })
|
|
100
98
|
] })
|
|
101
99
|
);
|
|
102
|
-
}),
|
|
100
|
+
}), L = ({ limit: t = 3, isLoading: m = !1, keyPrefix: i }) => /* @__PURE__ */ r(g, { children: Array.from({ length: t }, (l, o) => /* @__PURE__ */ r(
|
|
101
|
+
E,
|
|
102
|
+
{
|
|
103
|
+
isLoading: m
|
|
104
|
+
},
|
|
105
|
+
`${i}-skeleton-product-card-${o}`
|
|
106
|
+
)) }), _ = ({
|
|
107
|
+
children: t,
|
|
108
|
+
fallbackComponent: m = /* @__PURE__ */ r(g, {}),
|
|
109
|
+
isLoading: i = !1,
|
|
110
|
+
limit: l,
|
|
111
|
+
keyPrefix: o
|
|
112
|
+
}) => /* @__PURE__ */ r($, { fallbackComponent: m, children: i === !0 ? /* @__PURE__ */ r(
|
|
113
|
+
L,
|
|
114
|
+
{
|
|
115
|
+
isLoading: i,
|
|
116
|
+
limit: l,
|
|
117
|
+
keyPrefix: o
|
|
118
|
+
}
|
|
119
|
+
) : t }), v = B(I), K = u((t, m) => {
|
|
103
120
|
const {
|
|
104
|
-
icon:
|
|
105
|
-
title:
|
|
106
|
-
onButtonAction:
|
|
121
|
+
icon: i,
|
|
122
|
+
title: l,
|
|
123
|
+
onButtonAction: o = () => {
|
|
124
|
+
},
|
|
125
|
+
onSelectCard: d = () => {
|
|
107
126
|
},
|
|
108
|
-
|
|
127
|
+
buttonLink: c,
|
|
128
|
+
items: a,
|
|
129
|
+
buttonText: k,
|
|
130
|
+
limit: s = 3,
|
|
131
|
+
isLoading: y = !1
|
|
132
|
+
} = t, C = R(), N = M(() => /* @__PURE__ */ r(g, { children: C === !0 ? a == null ? void 0 : a.map((e, p) => /* @__PURE__ */ r(
|
|
133
|
+
v,
|
|
134
|
+
{
|
|
135
|
+
title: e == null ? void 0 : e.title,
|
|
136
|
+
image: e == null ? void 0 : e.image,
|
|
137
|
+
text: e == null ? void 0 : e.text,
|
|
138
|
+
titleSlug: e == null ? void 0 : e.titleSlug,
|
|
139
|
+
onCardClick: () => d(e == null ? void 0 : e.uuid)
|
|
109
140
|
},
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
141
|
+
p
|
|
142
|
+
)) : a == null ? void 0 : a.slice(0, s).map((e, p) => /* @__PURE__ */ r(
|
|
143
|
+
v,
|
|
144
|
+
{
|
|
145
|
+
title: e == null ? void 0 : e.title,
|
|
146
|
+
image: e == null ? void 0 : e.image,
|
|
147
|
+
text: e == null ? void 0 : e.text,
|
|
148
|
+
titleSlug: e == null ? void 0 : e.titleSlug,
|
|
149
|
+
onCardClick: () => d(e == null ? void 0 : e.uuid)
|
|
150
|
+
},
|
|
151
|
+
p
|
|
152
|
+
)) }), [a]);
|
|
153
|
+
return /* @__PURE__ */ n(z, { children: [
|
|
154
|
+
/* @__PURE__ */ n("div", { className: "regular-title", children: [
|
|
155
|
+
/* @__PURE__ */ n("div", { className: "regular-title-text", children: [
|
|
156
|
+
f(i) && /* @__PURE__ */ r("i", { className: i }),
|
|
157
|
+
/* @__PURE__ */ r("span", { children: l })
|
|
120
158
|
] }),
|
|
121
|
-
|
|
122
|
-
|
|
159
|
+
f(c) && /* @__PURE__ */ r(
|
|
160
|
+
W,
|
|
123
161
|
{
|
|
124
162
|
type: "button",
|
|
125
163
|
btnType: "tinted",
|
|
126
164
|
color: "gray",
|
|
127
|
-
onClick: () =>
|
|
165
|
+
onClick: () => o(c),
|
|
128
166
|
borderRadius: "curved",
|
|
129
|
-
children:
|
|
167
|
+
children: k
|
|
130
168
|
}
|
|
131
169
|
)
|
|
132
170
|
] }),
|
|
133
|
-
/* @__PURE__ */
|
|
134
|
-
|
|
135
|
-
{
|
|
136
|
-
title: e == null ? void 0 : e.title,
|
|
137
|
-
image: e == null ? void 0 : e.image,
|
|
138
|
-
text: e == null ? void 0 : e.text,
|
|
139
|
-
titleSlug: e == null ? void 0 : e.titleSlug,
|
|
140
|
-
onCardClick: () => o(e == null ? void 0 : e.uuid)
|
|
141
|
-
},
|
|
142
|
-
c
|
|
143
|
-
)) : i == null ? void 0 : i.slice(0, g).map((e, c) => /* @__PURE__ */ t(
|
|
144
|
-
h,
|
|
171
|
+
/* @__PURE__ */ r(A, { limit: s, children: /* @__PURE__ */ r(
|
|
172
|
+
_,
|
|
145
173
|
{
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
c
|
|
153
|
-
)) })
|
|
174
|
+
isLoading: y,
|
|
175
|
+
limit: s,
|
|
176
|
+
keyPrefix: "explore-landing",
|
|
177
|
+
children: N
|
|
178
|
+
}
|
|
179
|
+
) })
|
|
154
180
|
] });
|
|
155
181
|
});
|
|
156
182
|
export {
|
|
157
|
-
|
|
183
|
+
K as default
|
|
158
184
|
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
"use strict";const t=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";const t=require("react/jsx-runtime"),a=require("react"),u=require("./emotion-styled.browser.esm-Cle7tAM9.cjs"),h=require("./consts-CtNoHdBj.cjs"),b=require("./useDetectMobile-D6d5LpdL.cjs"),c=require("./utils-NZLCh-J5.cjs"),j=require("./Button.cjs"),S=u.newStyled.div`
|
|
2
2
|
display: grid;
|
|
3
3
|
grid-template-columns: ${i=>`repeat(${i.limit}, minmax(0, 1fr))`};
|
|
4
4
|
gap: 1.25rem;
|
|
5
5
|
margin: auto;
|
|
6
6
|
|
|
7
|
-
@media (max-width: ${
|
|
7
|
+
@media (max-width: ${h.MOBILE_SIZE_PX+"px"}) {
|
|
8
8
|
grid-template-columns: repeat(1, 1fr);
|
|
9
9
|
}
|
|
10
|
-
`,
|
|
10
|
+
`,p=u.newStyled.div`
|
|
11
11
|
display: flex;
|
|
12
12
|
flex-direction: column;
|
|
13
13
|
width: 100%;
|
|
@@ -44,13 +44,13 @@
|
|
|
44
44
|
min-height: 6rem;
|
|
45
45
|
max-height: 6rem;
|
|
46
46
|
border-radius: 0.75rem;
|
|
47
|
-
background-color: ${
|
|
47
|
+
background-color: ${c.linearGradientAnimation("-90deg")};
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
@media (max-width: ${
|
|
50
|
+
@media (max-width: ${h.MOBILE_SIZE_PX+"px"}) {
|
|
51
51
|
max-width: unset;
|
|
52
52
|
}
|
|
53
|
-
`,
|
|
53
|
+
`,f=u.newStyled.div`
|
|
54
54
|
text-align: center;
|
|
55
55
|
display: flex;
|
|
56
56
|
flex-direction: column;
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
& .skeleton-title {
|
|
66
66
|
height: 1.75rem;
|
|
67
67
|
width: 80%;
|
|
68
|
-
background-color: ${
|
|
68
|
+
background-color: ${c.linearGradientAnimation("-90deg")};
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
& .text-wr {
|
|
@@ -73,6 +73,6 @@
|
|
|
73
73
|
font-size: 0.875rem;
|
|
74
74
|
flex: 1;
|
|
75
75
|
color: var(--gray-700, #4e555f);
|
|
76
|
-
${
|
|
76
|
+
${c.truncateTextInRows(3)}
|
|
77
77
|
}
|
|
78
|
-
|
|
78
|
+
`,C=a.forwardRef((i,l)=>{const{onCardClick:r}=i;return t.jsxs(p,{className:"product-card",onClick:r,children:[t.jsx("div",{"skeleton-img":!0}),t.jsx(f,{children:t.jsx("div",{className:"skeleton-title"})})]})}),k=a.forwardRef((i,l)=>{const{title:r,image:n,text:o,buttonText:d,onCardClick:s}=i;return t.jsxs(p,{className:"blog-card",onClick:s,children:[t.jsx("img",{src:n}),t.jsxs(f,{children:[t.jsx("div",{className:"text-wr-title",children:r}),t.jsx("div",{className:"text-wr",children:o})]}),t.jsx(j,{borderRadius:"curved",color:"gray",type:"button",btnType:"outline",onClick:s,size:"medium",children:d})]})}),y=({limit:i=3,isLoading:l=!1,keyPrefix:r})=>t.jsx(t.Fragment,{children:Array.from({length:i},(n,o)=>t.jsx(C,{isLoading:l},`${r}-skeleton-product-card-${o}`))}),v=({children:i,fallbackComponent:l=t.jsx(t.Fragment,{}),isLoading:r=!1,limit:n,keyPrefix:o})=>t.jsx(a.Suspense,{fallbackComponent:l,children:r===!0?t.jsx(y,{isLoading:r,limit:n,keyPrefix:o}):i}),g=a.memo(k),x=a.forwardRef((i,l)=>{const{items:r,limit:n=3,onSelectCard:o=()=>{},isLoading:d=!1}=i,s=b.useDetectMobile(),w=a.useMemo(()=>t.jsx(t.Fragment,{children:s===!0?r==null?void 0:r.map((e,m)=>t.jsx(g,{title:e==null?void 0:e.title,image:e==null?void 0:e.image,text:e==null?void 0:e.text,titleSlug:e==null?void 0:e.titleSlug,buttonText:e==null?void 0:e.buttonText,onCardClick:()=>o(e==null?void 0:e.uuid)},m)):r==null?void 0:r.slice(0,n).map((e,m)=>t.jsx(g,{title:e==null?void 0:e.title,image:e==null?void 0:e.image,text:e==null?void 0:e.text,titleSlug:e==null?void 0:e.titleSlug,buttonText:e==null?void 0:e.buttonText,onCardClick:()=>o(e==null?void 0:e.uuid)},m))}),[r]);return t.jsx(S,{limit:n,children:t.jsx(v,{isLoading:d,limit:n,keyPrefix:"explore-landing",children:w})})});module.exports=x;
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { n as
|
|
4
|
-
import { M as
|
|
5
|
-
import { u as
|
|
6
|
-
import { m as
|
|
7
|
-
import
|
|
8
|
-
const
|
|
1
|
+
import { jsxs as c, jsx as t, Fragment as s } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as u, Suspense as k, memo as S, useMemo as v } from "react";
|
|
3
|
+
import { n as g } from "./emotion-styled.browser.esm-CjCaF13H.js";
|
|
4
|
+
import { M as h } from "./consts-C1uHV4xc.js";
|
|
5
|
+
import { u as y } from "./useDetectMobile-BC6EGaBc.js";
|
|
6
|
+
import { m as f, t as $ } from "./utils-DtRLzzTZ.js";
|
|
7
|
+
import T from "./Button.js";
|
|
8
|
+
const B = g.div`
|
|
9
9
|
display: grid;
|
|
10
10
|
grid-template-columns: ${(i) => `repeat(${i.limit}, minmax(0, 1fr))`};
|
|
11
11
|
gap: 1.25rem;
|
|
12
12
|
margin: auto;
|
|
13
13
|
|
|
14
|
-
@media (max-width: ${
|
|
14
|
+
@media (max-width: ${h + "px"}) {
|
|
15
15
|
grid-template-columns: repeat(1, 1fr);
|
|
16
16
|
}
|
|
17
|
-
`,
|
|
17
|
+
`, b = g.div`
|
|
18
18
|
display: flex;
|
|
19
19
|
flex-direction: column;
|
|
20
20
|
width: 100%;
|
|
@@ -51,13 +51,13 @@ const k = c.div`
|
|
|
51
51
|
min-height: 6rem;
|
|
52
52
|
max-height: 6rem;
|
|
53
53
|
border-radius: 0.75rem;
|
|
54
|
-
background-color: ${
|
|
54
|
+
background-color: ${f("-90deg")};
|
|
55
55
|
}
|
|
56
56
|
|
|
57
|
-
@media (max-width: ${
|
|
57
|
+
@media (max-width: ${h + "px"}) {
|
|
58
58
|
max-width: unset;
|
|
59
59
|
}
|
|
60
|
-
`,
|
|
60
|
+
`, w = g.div`
|
|
61
61
|
text-align: center;
|
|
62
62
|
display: flex;
|
|
63
63
|
flex-direction: column;
|
|
@@ -72,7 +72,7 @@ const k = c.div`
|
|
|
72
72
|
& .skeleton-title {
|
|
73
73
|
height: 1.75rem;
|
|
74
74
|
width: 80%;
|
|
75
|
-
background-color: ${
|
|
75
|
+
background-color: ${f("-90deg")};
|
|
76
76
|
}
|
|
77
77
|
|
|
78
78
|
& .text-wr {
|
|
@@ -80,70 +80,100 @@ const k = c.div`
|
|
|
80
80
|
font-size: 0.875rem;
|
|
81
81
|
flex: 1;
|
|
82
82
|
color: var(--gray-700, #4e555f);
|
|
83
|
-
${
|
|
83
|
+
${$(3)}
|
|
84
84
|
}
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
const { onCardClick: t } = i;
|
|
85
|
+
`, M = u((i, a) => {
|
|
86
|
+
const { onCardClick: r } = i;
|
|
88
87
|
return (
|
|
89
88
|
// <SimpleBlogCardSkeleton />
|
|
90
|
-
/* @__PURE__ */
|
|
91
|
-
/* @__PURE__ */
|
|
92
|
-
/* @__PURE__ */
|
|
89
|
+
/* @__PURE__ */ c(b, { className: "product-card", onClick: r, children: [
|
|
90
|
+
/* @__PURE__ */ t("div", { "skeleton-img": !0 }),
|
|
91
|
+
/* @__PURE__ */ t(w, { children: /* @__PURE__ */ t("div", { className: "skeleton-title" }) })
|
|
93
92
|
] })
|
|
94
93
|
);
|
|
95
|
-
})
|
|
96
|
-
const
|
|
97
|
-
const { title: t, image: o, text: a, buttonText: m, onCardClick: e } = i;
|
|
94
|
+
}), z = u((i, a) => {
|
|
95
|
+
const { title: r, image: o, text: n, buttonText: m, onCardClick: l } = i;
|
|
98
96
|
return (
|
|
99
97
|
// <SimpleBlogCardCenteredSkeleton />
|
|
100
|
-
/* @__PURE__ */
|
|
101
|
-
/* @__PURE__ */
|
|
102
|
-
/* @__PURE__ */
|
|
103
|
-
/* @__PURE__ */
|
|
104
|
-
/* @__PURE__ */
|
|
98
|
+
/* @__PURE__ */ c(b, { className: "blog-card", onClick: l, children: [
|
|
99
|
+
/* @__PURE__ */ t("img", { src: o }),
|
|
100
|
+
/* @__PURE__ */ c(w, { children: [
|
|
101
|
+
/* @__PURE__ */ t("div", { className: "text-wr-title", children: r }),
|
|
102
|
+
/* @__PURE__ */ t("div", { className: "text-wr", children: n })
|
|
105
103
|
] }),
|
|
106
|
-
/* @__PURE__ */
|
|
107
|
-
|
|
104
|
+
/* @__PURE__ */ t(
|
|
105
|
+
T,
|
|
108
106
|
{
|
|
109
107
|
borderRadius: "curved",
|
|
110
108
|
color: "gray",
|
|
111
109
|
type: "button",
|
|
112
110
|
btnType: "outline",
|
|
113
|
-
onClick:
|
|
111
|
+
onClick: l,
|
|
114
112
|
size: "medium",
|
|
115
113
|
children: m
|
|
116
114
|
}
|
|
117
115
|
)
|
|
118
116
|
] })
|
|
119
117
|
);
|
|
120
|
-
}),
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
118
|
+
}), N = ({ limit: i = 3, isLoading: a = !1, keyPrefix: r }) => /* @__PURE__ */ t(s, { children: Array.from({ length: i }, (o, n) => /* @__PURE__ */ t(
|
|
119
|
+
M,
|
|
120
|
+
{
|
|
121
|
+
isLoading: a
|
|
122
|
+
},
|
|
123
|
+
`${r}-skeleton-product-card-${n}`
|
|
124
|
+
)) }), P = ({
|
|
125
|
+
children: i,
|
|
126
|
+
fallbackComponent: a = /* @__PURE__ */ t(s, {}),
|
|
127
|
+
isLoading: r = !1,
|
|
128
|
+
limit: o,
|
|
129
|
+
keyPrefix: n
|
|
130
|
+
}) => /* @__PURE__ */ t(k, { fallbackComponent: a, children: r === !0 ? /* @__PURE__ */ t(
|
|
131
|
+
N,
|
|
132
|
+
{
|
|
133
|
+
isLoading: r,
|
|
134
|
+
limit: o,
|
|
135
|
+
keyPrefix: n
|
|
136
|
+
}
|
|
137
|
+
) : i }), p = S(z), G = u((i, a) => {
|
|
138
|
+
const {
|
|
139
|
+
items: r,
|
|
140
|
+
limit: o = 3,
|
|
141
|
+
onSelectCard: n = () => {
|
|
142
|
+
},
|
|
143
|
+
isLoading: m = !1
|
|
144
|
+
} = i, l = y(), C = v(() => /* @__PURE__ */ t(s, { children: l === !0 ? r == null ? void 0 : r.map((e, d) => /* @__PURE__ */ t(
|
|
145
|
+
p,
|
|
125
146
|
{
|
|
126
147
|
title: e == null ? void 0 : e.title,
|
|
127
148
|
image: e == null ? void 0 : e.image,
|
|
128
149
|
text: e == null ? void 0 : e.text,
|
|
129
150
|
titleSlug: e == null ? void 0 : e.titleSlug,
|
|
130
151
|
buttonText: e == null ? void 0 : e.buttonText,
|
|
131
|
-
onCardClick: () =>
|
|
152
|
+
onCardClick: () => n(e == null ? void 0 : e.uuid)
|
|
132
153
|
},
|
|
133
|
-
|
|
134
|
-
)) :
|
|
135
|
-
|
|
154
|
+
d
|
|
155
|
+
)) : r == null ? void 0 : r.slice(0, o).map((e, d) => /* @__PURE__ */ t(
|
|
156
|
+
p,
|
|
136
157
|
{
|
|
137
158
|
title: e == null ? void 0 : e.title,
|
|
138
159
|
image: e == null ? void 0 : e.image,
|
|
139
160
|
text: e == null ? void 0 : e.text,
|
|
140
161
|
titleSlug: e == null ? void 0 : e.titleSlug,
|
|
141
162
|
buttonText: e == null ? void 0 : e.buttonText,
|
|
142
|
-
onCardClick: () =>
|
|
163
|
+
onCardClick: () => n(e == null ? void 0 : e.uuid)
|
|
143
164
|
},
|
|
144
|
-
|
|
145
|
-
)) });
|
|
165
|
+
d
|
|
166
|
+
)) }), [r]);
|
|
167
|
+
return /* @__PURE__ */ t(B, { limit: o, children: /* @__PURE__ */ t(
|
|
168
|
+
P,
|
|
169
|
+
{
|
|
170
|
+
isLoading: m,
|
|
171
|
+
limit: o,
|
|
172
|
+
keyPrefix: "explore-landing",
|
|
173
|
+
children: C
|
|
174
|
+
}
|
|
175
|
+
) });
|
|
146
176
|
});
|
|
147
177
|
export {
|
|
148
|
-
|
|
178
|
+
G as default
|
|
149
179
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
"use strict";const t=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";const t=require("react/jsx-runtime"),a=require("react"),g=require("./emotion-styled.browser.esm-Cle7tAM9.cjs"),j=require("./consts-CtNoHdBj.cjs"),x=require("./useDetectMobile-D6d5LpdL.cjs"),s=require("./utils-NZLCh-J5.cjs"),C=require("./style-BR3tIhP1.cjs"),N=require("./Button.cjs"),q=require("./Link.cjs"),T=require("./index-Q_i-aqsF.cjs"),$=g.newStyled.div`
|
|
2
2
|
display: grid;
|
|
3
|
-
grid-template-columns: ${
|
|
3
|
+
grid-template-columns: ${i=>`repeat(${i.limit}, minmax(0, 1fr))`};
|
|
4
4
|
gap: 1.25rem;
|
|
5
5
|
|
|
6
|
-
@media (max-width: ${
|
|
6
|
+
@media (max-width: ${j.MOBILE_SIZE_PX+"px"}) {
|
|
7
7
|
grid-template-columns: repeat(1, 1fr);
|
|
8
8
|
}
|
|
9
9
|
`,b=g.newStyled.div`
|
|
@@ -35,16 +35,16 @@
|
|
|
35
35
|
min-height: 3.3125rem;
|
|
36
36
|
max-height: 3.3125rem;
|
|
37
37
|
border-radius: 0.75rem;
|
|
38
|
-
background-color: ${
|
|
38
|
+
background-color: ${s.linearGradientAnimation("-90deg")};
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
& a {
|
|
42
42
|
margin-top: auto;
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
-
@media (max-width: ${
|
|
45
|
+
@media (max-width: ${j.MOBILE_SIZE_PX+"px"}) {
|
|
46
46
|
}
|
|
47
|
-
`,
|
|
47
|
+
`,f=g.newStyled.div`
|
|
48
48
|
display: flex;
|
|
49
49
|
flex-direction: column;
|
|
50
50
|
gap: 0.5rem;
|
|
@@ -58,19 +58,19 @@
|
|
|
58
58
|
& .skeleton-title {
|
|
59
59
|
height: 1.5rem;
|
|
60
60
|
width: 80%;
|
|
61
|
-
background-color: ${
|
|
61
|
+
background-color: ${s.linearGradientAnimation("-90deg")};
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
& .skeleton-action {
|
|
65
65
|
height: 1.25rem;
|
|
66
66
|
width: 20%;
|
|
67
|
-
background-color: ${
|
|
67
|
+
background-color: ${s.linearGradientAnimation("-90deg")};
|
|
68
68
|
}
|
|
69
69
|
|
|
70
70
|
& .text-wr {
|
|
71
71
|
font-weight: 400;
|
|
72
72
|
font-size: 0.875rem;
|
|
73
73
|
color: var(--gray-700, #4e555f);
|
|
74
|
-
${
|
|
74
|
+
${s.truncateTextInRows(3)}
|
|
75
75
|
}
|
|
76
|
-
|
|
76
|
+
`,B=a.forwardRef(({},i)=>t.jsxs(b,{className:"blog-card",children:[t.jsxs(f,{children:[t.jsx("div",{className:"skeleton-title"}),t.jsx("div",{className:"text-wr"}),t.jsx("div",{className:"skeleton-action"})]}),t.jsx("div",{className:"skeleton-img"})]})),M=a.forwardRef((i,c)=>{const{title:n,image:o,text:r,buttonText:m,onCardClick:l}=i;return t.jsxs(b,{className:"blog-card",onClick:l,children:[t.jsxs(f,{children:[t.jsx("div",{className:"text-wr-title",children:n}),t.jsx("div",{className:"text-wr",children:r}),t.jsx(q,{color:"gray",onClick:l,children:m})]}),t.jsx("img",{src:o})]})}),R=({limit:i=3,isLoading:c=!1,keyPrefix:n})=>t.jsx(t.Fragment,{children:Array.from({length:i},(o,r)=>t.jsx(B,{isLoading:c},`${n}-skeleton-product-card-${r}`))}),W=({children:i,fallbackComponent:c=t.jsx(t.Fragment,{}),isLoading:n=!1,limit:o,keyPrefix:r})=>t.jsx(a.Suspense,{fallbackComponent:c,children:n===!0?t.jsx(R,{isLoading:n,limit:o,keyPrefix:r}):i}),p=a.memo(M),_=a.forwardRef((i,c)=>{const{icon:n,title:o,items:r,buttonText:m,limit:l=3,options:d,onActionClick:w=()=>{},onSelectOption:h=()=>{},isLoading:S=!1,onSectionClick:k=()=>{}}=i,y=x.useDetectMobile(),v=a.useMemo(()=>t.jsx(t.Fragment,{children:y===!0?r==null?void 0:r.map((e,u)=>t.jsx(p,{title:e==null?void 0:e.title,image:e==null?void 0:e.image,text:e==null?void 0:e.text,titleSlug:e==null?void 0:e.titleSlug,buttonText:e==null?void 0:e.buttonText,onCardClick:()=>onSelectCard(e==null?void 0:e.uuid)},u)):r==null?void 0:r.slice(0,l).map((e,u)=>t.jsx(p,{title:e==null?void 0:e.title,image:e==null?void 0:e.image,text:e==null?void 0:e.text,titleSlug:e==null?void 0:e.titleSlug,buttonText:e==null?void 0:e.buttonText,onCardClick:()=>onSelectCard(e==null?void 0:e.uuid)},u))}),[r]);return t.jsxs(C.TitleWithOptionsSectionWrapper,{children:[t.jsxs("div",{className:"regular-title",children:[t.jsxs("div",{className:"regular-title-text",children:[s.isDefinedNotEmptyString(n)&&t.jsx("i",{className:n}),t.jsx("span",{children:o})]}),s.isDefinedNotEmptyString(k)&&t.jsx(N,{type:"button",btnType:"tinted",color:"gray",onClick:w,borderRadius:"curved",children:m})]}),(d==null?void 0:d.length)>0&&t.jsx(T.SelectBar,{items:d,onRemove:e=>{h(e)},onSelect:e=>{h(e)},labelKey:"name",valueKey:"code",noMargin:!0}),t.jsx($,{limit:l,children:t.jsx(W,{isLoading:S,limit:l,keyPrefix:"explore-landing",children:v})})]})});module.exports=_;
|