@lanaco/lnc-react-ui 4.0.38 → 4.0.40
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/BannerSectionBasic.cjs +9 -9
- package/dist/BannerSectionBasic.js +20 -20
- package/dist/BannerSectionCarousel.cjs +13 -5
- package/dist/BannerSectionCarousel.js +29 -21
- package/dist/BannerSectionGrid.cjs +1 -1
- package/dist/BannerSectionGrid.js +6 -6
- package/dist/BannerSectionSimple.cjs +4 -4
- package/dist/BannerSectionSimple.js +41 -38
- package/dist/BannerSectionWithList.cjs +4 -4
- package/dist/BannerSectionWithList.js +17 -17
- package/dist/BannerSectionWithListImage.cjs +5 -5
- package/dist/BannerSectionWithListImage.js +41 -38
- package/dist/BlogsSectionDetailed.cjs +15 -15
- package/dist/BlogsSectionDetailed.js +128 -92
- 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 +10 -10
- package/dist/BlogsSectionSimpleCentered.js +76 -46
- package/dist/BlogsSectionWithFilters.cjs +11 -11
- package/dist/BlogsSectionWithFilters.js +102 -73
- package/dist/BrandHitsSection.cjs +12 -7
- package/dist/BrandHitsSection.js +10 -5
- package/dist/CalorieCalculatorSection.cjs +7 -8
- package/dist/CalorieCalculatorSection.js +31 -32
- package/dist/CustomLoanMapSection.cjs +2 -2
- package/dist/CustomLoanMapSection.js +13 -13
- package/dist/DetailedProductsSection.cjs +4 -4
- package/dist/DetailedProductsSection.js +66 -57
- package/dist/FieldOfInterestsWithAvatarsCardsSection.cjs +8 -8
- package/dist/FieldOfInterestsWithAvatarsCardsSection.js +9 -8
- package/dist/FieldOfInterestsWithTagsCardsSection.cjs +14 -6
- package/dist/FieldOfInterestsWithTagsCardsSection.js +12 -4
- package/dist/GeneralWithTagsCardsSection.cjs +18 -6
- package/dist/GeneralWithTagsCardsSection.js +44 -31
- package/dist/GiftCardsSection.cjs +9 -5
- package/dist/GiftCardsSection.js +21 -17
- package/dist/LocationSearchSection.cjs +1 -1
- package/dist/LocationSearchSection.js +1 -1
- package/dist/MasonryGeneralCardsSection.cjs +21 -1
- package/dist/MasonryGeneralCardsSection.js +20 -0
- package/dist/OverlayGeneralCardsSection.cjs +60 -104
- package/dist/OverlayGeneralCardsSection.js +138 -147
- package/dist/ProductsWithBannerSection.cjs +10 -10
- package/dist/ProductsWithBannerSection.js +85 -54
- package/dist/SalesCampaignsSection.cjs +17 -17
- package/dist/SalesCampaignsSection.js +81 -81
- package/dist/ShopCardsSection.cjs +19 -9
- package/dist/ShopCardsSection.js +54 -40
- 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-CT6_7UFb.js → index-5cttM4t7.js} +119 -124
- package/dist/{index-CHkb_Sj6.js → index-BT55M3t6.js} +16 -15
- package/dist/{index-Dj5wZCVs.cjs → index-DHJmdMN8.cjs} +6 -5
- package/dist/index-Dn5tPLgP.cjs +95 -0
- package/dist/{style-6tSw9aqK.js → style-CiePxaJ_.js} +6 -6
- package/dist/{style-BR3tIhP1.cjs → style-DN1qT8BE.cjs} +6 -6
- 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
- package/dist/index-Q_i-aqsF.cjs +0 -95
|
@@ -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-
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
const
|
|
1
|
+
import { jsxs as m, 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-CiePxaJ_.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__ */ m(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, l) => {
|
|
88
|
+
const { title: i, image: n, 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__ */ m(w, { className: "blog-card", onClick: d, children: [
|
|
92
|
+
/* @__PURE__ */ r("img", { src: n }),
|
|
93
|
+
/* @__PURE__ */ m(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: l = !1, keyPrefix: i }) => /* @__PURE__ */ r(g, { children: Array.from({ length: t }, (n, o) => /* @__PURE__ */ r(
|
|
101
|
+
E,
|
|
102
|
+
{
|
|
103
|
+
isLoading: l
|
|
104
|
+
},
|
|
105
|
+
`${i}-skeleton-product-card-${o}`
|
|
106
|
+
)) }), _ = ({
|
|
107
|
+
children: t,
|
|
108
|
+
fallbackComponent: l = /* @__PURE__ */ r(g, {}),
|
|
109
|
+
isLoading: i = !1,
|
|
110
|
+
limit: n,
|
|
111
|
+
keyPrefix: o
|
|
112
|
+
}) => /* @__PURE__ */ r($, { fallbackComponent: l, children: i === !0 ? /* @__PURE__ */ r(
|
|
113
|
+
L,
|
|
114
|
+
{
|
|
115
|
+
isLoading: i,
|
|
116
|
+
limit: n,
|
|
117
|
+
keyPrefix: o
|
|
118
|
+
}
|
|
119
|
+
) : t }), v = B(I), K = u((t, l) => {
|
|
103
120
|
const {
|
|
104
|
-
icon:
|
|
105
|
-
title:
|
|
106
|
-
onButtonAction:
|
|
121
|
+
icon: i,
|
|
122
|
+
title: n,
|
|
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__ */ m(z, { ref: l, children: [
|
|
154
|
+
/* @__PURE__ */ m("div", { className: "regular-title", children: [
|
|
155
|
+
/* @__PURE__ */ m("div", { className: "regular-title-text", children: [
|
|
156
|
+
f(i) && /* @__PURE__ */ r("i", { className: i }),
|
|
157
|
+
/* @__PURE__ */ r("span", { children: n })
|
|
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"),m=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
|
-
|
|
7
|
-
@media (max-width: ${
|
|
6
|
+
width: fit-content;
|
|
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: ${m.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: ${m.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
|
+
${m.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:s,onCardClick:d}=i;return t.jsxs(p,{className:"blog-card",onClick:d,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:d,size:"medium",children:s})]})}),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:s=!1}=i,d=b.useDetectMobile(),w=a.useMemo(()=>t.jsx(t.Fragment,{children:d===!0?r==null?void 0:r.map((e,c)=>t.jsx(g,{title:e==null?void 0:e.title,image:e==null?void 0:e.image,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)},c)):r==null?void 0:r.slice(0,n).map((e,c)=>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)},c))}),[r,d,n,o]);return t.jsx(S,{ref:l,limit:n,children:t.jsx(v,{isLoading:s,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
|
-
|
|
14
|
-
@media (max-width: ${
|
|
13
|
+
width: fit-content;
|
|
14
|
+
@media (max-width: ${h + "px"}) {
|
|
15
15
|
grid-template-columns: repeat(1, 1fr);
|
|
16
16
|
}
|
|
17
|
-
`,
|
|
17
|
+
`, w = 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
|
+
`, b = 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(w, { className: "product-card", onClick: r, children: [
|
|
90
|
+
/* @__PURE__ */ t("div", { "skeleton-img": !0 }),
|
|
91
|
+
/* @__PURE__ */ t(b, { 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(w, { className: "blog-card", onClick: l, children: [
|
|
99
|
+
/* @__PURE__ */ t("img", { src: o }),
|
|
100
|
+
/* @__PURE__ */ c(b, { 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, l, o, n]);
|
|
167
|
+
return /* @__PURE__ */ t(B, { ref: a, 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,12 +1,12 @@
|
|
|
1
|
-
"use strict";const t=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";const t=require("react/jsx-runtime"),c=require("react"),h=require("./emotion-styled.browser.esm-Cle7tAM9.cjs"),w=require("./consts-CtNoHdBj.cjs"),C=require("./useDetectMobile-D6d5LpdL.cjs"),a=require("./utils-NZLCh-J5.cjs"),N=require("./style-DN1qT8BE.cjs"),q=require("./Button.cjs"),T=require("./Link.cjs"),$=require("./index-Dn5tPLgP.cjs"),B=h.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: ${w.MOBILE_SIZE_PX+"px"}) {
|
|
7
7
|
grid-template-columns: repeat(1, 1fr);
|
|
8
8
|
}
|
|
9
|
-
`,
|
|
9
|
+
`,x=h.newStyled.div`
|
|
10
10
|
display: flex;
|
|
11
11
|
width: 100%;
|
|
12
12
|
box-shadow: 0px 1px 3px 0px rgba(0, 0, 0, 0.1),
|
|
@@ -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: ${a.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: ${w.MOBILE_SIZE_PX+"px"}) {
|
|
46
46
|
}
|
|
47
|
-
`,
|
|
47
|
+
`,S=h.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: ${a.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: ${a.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
|
+
${a.truncateTextInRows(3)}
|
|
75
75
|
}
|
|
76
|
-
|
|
76
|
+
`,M=c.forwardRef(({},i)=>t.jsxs(x,{className:"blog-card",children:[t.jsxs(S,{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"})]})),R=c.forwardRef((i,s)=>{const{title:n,image:l,text:r,buttonText:m,onCardClick:o}=i;return t.jsxs(x,{className:"blog-card",onClick:o,children:[t.jsxs(S,{children:[t.jsx("div",{className:"text-wr-title",children:n}),t.jsx("div",{className:"text-wr",children:r}),t.jsx(T,{color:"gray",onClick:o,children:m})]}),t.jsx("img",{src:l})]})}),W=({limit:i=3,isLoading:s=!1,keyPrefix:n})=>t.jsx(t.Fragment,{children:Array.from({length:i},(l,r)=>t.jsx(M,{isLoading:s},`${n}-skeleton-product-card-${r}`))}),_=({children:i,fallbackComponent:s=t.jsx(t.Fragment,{}),isLoading:n=!1,limit:l,keyPrefix:r})=>t.jsx(c.Suspense,{fallbackComponent:s,children:n===!0?t.jsx(W,{isLoading:n,limit:l,keyPrefix:r}):i}),f=c.memo(R),z=c.forwardRef((i,s)=>{const{icon:n,title:l,items:r,buttonText:m,limit:o=3,options:d,onButtonAction:p=()=>{},buttonLink:k,onSelectOption:j=()=>{},isLoading:y=!1,onSelectCard:g=()=>{}}=i,b=C.useDetectMobile(),v=c.useMemo(()=>t.jsx(t.Fragment,{children:b===!0?r==null?void 0:r.map((e,u)=>t.jsx(f,{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:()=>g(e)},u)):r==null?void 0:r.slice(0,o).map((e,u)=>t.jsx(f,{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:()=>g(e)},u))}),[r,b,o,g]);return t.jsxs(N.TitleWithOptionsSectionWrapper,{ref:s,children:[t.jsxs("div",{className:"regular-title",children:[t.jsxs("div",{className:"regular-title-text",children:[a.isDefinedNotEmptyString(n)&&t.jsx("i",{className:n}),t.jsx("span",{children:l})]}),a.isDefinedNotEmptyString(p)&&t.jsx(q,{type:"button",btnType:"tinted",color:"gray",onClick:()=>p(k),borderRadius:"curved",children:m})]}),(d==null?void 0:d.length)>0&&t.jsx($.SelectBar,{items:d,onRemove:e=>{j(e)},onSelect:e=>{j(e)},labelKey:"name",valueKey:"code",noMargin:!0}),t.jsx(B,{limit:o,children:t.jsx(_,{isLoading:y,limit:o,keyPrefix:"explore-landing",children:v})})]})});module.exports=z;
|