@lanaco/lnc-react-ui 4.0.156 → 4.0.160
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 +8 -8
- package/dist/BlogCardsSponsoredSection.js +105 -89
- package/dist/BlogExploreSection.cjs +5 -5
- package/dist/BlogExploreSection.js +88 -84
- package/dist/BlogListSection.cjs +5 -5
- package/dist/BlogListSection.js +139 -126
- package/dist/BlogProductCardsSection.cjs +1 -1
- package/dist/BlogProductCardsSection.js +37 -35
- package/dist/BlogShopCardsSection.cjs +1 -1
- package/dist/BlogShopCardsSection.js +43 -41
- package/dist/BlogSingleSection.cjs +1 -1
- package/dist/BlogSingleSection.js +9 -4
- package/dist/BlogsSectionDetailed.cjs +11 -11
- package/dist/BlogsSectionDetailed.js +122 -108
- package/dist/BlogsSectionLarge.cjs +4 -4
- package/dist/BlogsSectionLarge.js +43 -40
- package/dist/BlogsSectionSimple.cjs +8 -8
- package/dist/BlogsSectionSimple.js +100 -86
- package/dist/BlogsSectionSimpleCentered.cjs +9 -9
- package/dist/BlogsSectionSimpleCentered.js +81 -66
- package/dist/BlogsSectionWithFilters.cjs +11 -11
- package/dist/BlogsSectionWithFilters.js +108 -93
- package/dist/{CustomStyles-Ajyqx0cb.cjs → CustomStyles-BwHfr4iM.cjs} +1 -1
- package/dist/{CustomStyles-DVcu00ul.js → CustomStyles-iconSXFL.js} +0 -1
- package/dist/DetailedProductsInfinitiveSection.cjs +8 -3
- package/dist/DetailedProductsInfinitiveSection.js +63 -51
- package/dist/DetailedProductsSection.cjs +3 -3
- package/dist/DetailedProductsSection.js +76 -65
- package/dist/Dropdown.cjs +1 -1
- package/dist/Dropdown.js +2 -2
- package/dist/DropdownLookup.cjs +1 -1
- package/dist/DropdownLookup.js +1 -1
- package/dist/FieldOfInterestsWithAvatarsCardsSection.cjs +1 -1
- package/dist/FieldOfInterestsWithAvatarsCardsSection.js +1 -1
- package/dist/GiftCardsSection.cjs +1 -1
- package/dist/GiftCardsSection.js +1 -1
- package/dist/MultiSelectDropdown.cjs +1 -1
- package/dist/MultiSelectDropdown.js +1 -1
- package/dist/MultiSelectDropdownLookup.cjs +1 -1
- package/dist/MultiSelectDropdownLookup.js +1 -1
- package/dist/ProductsWithBannerSection.cjs +10 -10
- package/dist/ProductsWithBannerSection.js +81 -59
- package/dist/SalesCampaignsSection.cjs +27 -27
- package/dist/SalesCampaignsSection.js +281 -272
- package/dist/ShopCardsSection.cjs +3 -3
- package/dist/ShopCardsSection.js +27 -25
- package/dist/SimpleCategoriesSection.cjs +1 -1
- package/dist/SimpleCategoriesSection.js +1 -1
- package/dist/SimpleProductsSection.cjs +3 -3
- package/dist/SimpleProductsSection.js +62 -51
- package/dist/UrgentSaleProductsSection.cjs +6 -6
- package/dist/UrgentSaleProductsSection.js +67 -56
- package/dist/index-1Dm1i6WK.js +52 -0
- package/dist/index-BGTtoLxz.cjs +1 -0
- package/dist/{index-CLoINIGC.cjs → index-DicTpiG0.cjs} +5 -5
- package/dist/{index-BGY3PSA-.js → index-y6sKgrZC.js} +45 -34
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/{skeleton-BWFqIToC.js → skeleton-5mO22c5S.js} +94 -84
- package/dist/{skeleton-CanJ6Gr6.cjs → skeleton-Ccd6EDeB.cjs} +8 -8
- package/dist/{style-DFPWLJBr.js → style-BLuyU97E.js} +4 -0
- package/dist/{style-CyHewQxg.cjs → style-lSjkOR95.cjs} +6 -2
- package/dist/{suspense-product-card-detailed-YJVsf2-a.js → suspense-product-card-detailed-BZtObEfA.js} +191 -162
- package/dist/suspense-product-card-detailed-D-pjVe22.cjs +300 -0
- package/dist/{suspense-product-card-simple-CrqjSxHI.cjs → suspense-product-card-simple-DJ8UYolb.cjs} +1 -1
- package/dist/{suspense-product-card-simple-CLJjab5B.js → suspense-product-card-simple-ziy0XcLp.js} +1 -1
- package/package.json +1 -1
- package/dist/index-Cm0f72Po.cjs +0 -1
- package/dist/index-DGp7FHms.js +0 -42
- package/dist/suspense-product-card-detailed-mCJwteOy.cjs +0 -265
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { s as
|
|
4
|
-
import { M as
|
|
5
|
-
import { u as
|
|
6
|
-
import { o as
|
|
7
|
-
import { B as
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import { P as
|
|
11
|
-
const
|
|
1
|
+
import { jsxs as g, jsx as r, Fragment as v } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as w, useRef as P, Suspense as z, memo as I, useMemo as U } from "react";
|
|
3
|
+
import { s as b } from "./emotion-styled.browser.esm-BNN1dTl3.js";
|
|
4
|
+
import { M as C } from "./consts-BuFChS64.js";
|
|
5
|
+
import { u as W } from "./useDetectMobile-Bkvj0VMa.js";
|
|
6
|
+
import { o as j, p as A, k as y } from "./utils-BdsZgOUE.js";
|
|
7
|
+
import { B as E, R as L } from "./style-BLuyU97E.js";
|
|
8
|
+
import _ from "./Button.js";
|
|
9
|
+
import D from "./Link.js";
|
|
10
|
+
import { P as G } from "./index-CF3HhgvN.js";
|
|
11
|
+
const F = b.div`
|
|
12
12
|
display: grid;
|
|
13
13
|
grid-template-columns: ${(t) => `repeat(${t.limit}, minmax(0, 1fr))`};
|
|
14
14
|
gap: 1.25rem;
|
|
15
15
|
|
|
16
|
-
@media (max-width: ${
|
|
16
|
+
@media (max-width: ${C + "px"}) {
|
|
17
17
|
grid-template-columns: repeat(1, 1fr);
|
|
18
18
|
}
|
|
19
|
-
`,
|
|
19
|
+
`, B = b.div`
|
|
20
20
|
display: flex;
|
|
21
21
|
flex-direction: column;
|
|
22
22
|
width: 100%;
|
|
@@ -40,7 +40,7 @@ const L = f.div`
|
|
|
40
40
|
width: 100%;
|
|
41
41
|
max-height: 12.5625rem;
|
|
42
42
|
min-height: 12.5625rem;
|
|
43
|
-
background-color: ${
|
|
43
|
+
background-color: ${j("-90deg")};
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
& .action {
|
|
@@ -66,9 +66,9 @@ const L = f.div`
|
|
|
66
66
|
padding: 1rem;
|
|
67
67
|
}
|
|
68
68
|
|
|
69
|
-
@media (max-width: ${
|
|
69
|
+
@media (max-width: ${C + "px"}) {
|
|
70
70
|
}
|
|
71
|
-
`,
|
|
71
|
+
`, R = b.div`
|
|
72
72
|
padding: 1rem 1rem 0 1rem;
|
|
73
73
|
display: flex;
|
|
74
74
|
flex-direction: column;
|
|
@@ -86,108 +86,122 @@ const L = f.div`
|
|
|
86
86
|
font-size: 0.875rem;
|
|
87
87
|
flex: 1;
|
|
88
88
|
color: var(--gray-700, #4e555f);
|
|
89
|
-
${
|
|
89
|
+
${A(3)}
|
|
90
90
|
}
|
|
91
|
-
`,
|
|
91
|
+
`, O = w((t, m) => {
|
|
92
92
|
const {
|
|
93
|
-
title:
|
|
94
|
-
imageUrl:
|
|
93
|
+
title: o,
|
|
94
|
+
imageUrl: s,
|
|
95
95
|
text: n,
|
|
96
|
-
options:
|
|
97
|
-
onCardClick:
|
|
98
|
-
readMoreText:
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
96
|
+
options: c,
|
|
97
|
+
onCardClick: u,
|
|
98
|
+
readMoreText: a = "Read more",
|
|
99
|
+
metadata: l
|
|
100
|
+
} = t, d = P();
|
|
101
|
+
return /* @__PURE__ */ g(
|
|
102
|
+
B,
|
|
103
|
+
{
|
|
104
|
+
ref: d,
|
|
105
|
+
name: l == null ? void 0 : l.name,
|
|
106
|
+
"data-accessor": l == null ? void 0 : l.name,
|
|
107
|
+
className: "blog-card",
|
|
108
|
+
onClick: (i) => u(i, d),
|
|
109
|
+
children: [
|
|
110
|
+
/* @__PURE__ */ r(G, { src: s }),
|
|
111
|
+
/* @__PURE__ */ g(R, { children: [
|
|
112
|
+
/* @__PURE__ */ r("div", { className: "text-wr-title", children: o }),
|
|
113
|
+
/* @__PURE__ */ r("div", { className: "text-wr", children: n })
|
|
114
|
+
] }),
|
|
115
|
+
c && /* @__PURE__ */ r("div", { className: "tags-wr", children: c == null ? void 0 : c.map((i, f) => /* @__PURE__ */ r(E, { color: i == null ? void 0 : i.color, children: i == null ? void 0 : i.name }, f)) }),
|
|
116
|
+
/* @__PURE__ */ r(D, { className: "action", color: "gray", onClick: u, children: a })
|
|
117
|
+
]
|
|
118
|
+
}
|
|
119
|
+
);
|
|
120
|
+
}), X = w(({}, t) => (
|
|
110
121
|
// <LandingPageClearProductCardSkeleton />
|
|
111
|
-
/* @__PURE__ */
|
|
122
|
+
/* @__PURE__ */ g(B, { className: "product-card", children: [
|
|
112
123
|
/* @__PURE__ */ r("div", { className: "skeleton-img" }),
|
|
113
124
|
/* @__PURE__ */ r("div", { className: "card-title" }),
|
|
114
|
-
/* @__PURE__ */ r(
|
|
125
|
+
/* @__PURE__ */ r(R, {})
|
|
115
126
|
] })
|
|
116
|
-
)),
|
|
117
|
-
|
|
127
|
+
)), Z = ({ limit: t = 3, isLoading: m = !1, keyPrefix: o }) => /* @__PURE__ */ r(v, { children: Array.from({ length: t }, (s, n) => /* @__PURE__ */ r(
|
|
128
|
+
X,
|
|
118
129
|
{
|
|
119
|
-
isLoading:
|
|
130
|
+
isLoading: m
|
|
120
131
|
},
|
|
121
|
-
`${
|
|
122
|
-
)) }),
|
|
132
|
+
`${o}-skeleton-product-card-${n}`
|
|
133
|
+
)) }), q = ({
|
|
123
134
|
children: t,
|
|
124
|
-
fallbackComponent:
|
|
125
|
-
isLoading:
|
|
126
|
-
limit:
|
|
135
|
+
fallbackComponent: m = /* @__PURE__ */ r(v, {}),
|
|
136
|
+
isLoading: o = !1,
|
|
137
|
+
limit: s,
|
|
127
138
|
keyPrefix: n
|
|
128
|
-
}) => /* @__PURE__ */ r(
|
|
129
|
-
|
|
139
|
+
}) => /* @__PURE__ */ r(z, { fallbackComponent: m, children: o === !0 ? /* @__PURE__ */ r(
|
|
140
|
+
Z,
|
|
130
141
|
{
|
|
131
|
-
isLoading:
|
|
132
|
-
limit:
|
|
142
|
+
isLoading: o,
|
|
143
|
+
limit: s,
|
|
133
144
|
keyPrefix: n
|
|
134
145
|
}
|
|
135
|
-
) : t }),
|
|
146
|
+
) : t }), N = I(O), ie = w((t, m) => {
|
|
136
147
|
const {
|
|
137
|
-
icon:
|
|
138
|
-
title:
|
|
148
|
+
icon: o,
|
|
149
|
+
title: s,
|
|
139
150
|
onButtonAction: n = () => {
|
|
140
151
|
},
|
|
141
|
-
onSelectCard:
|
|
152
|
+
onSelectCard: c = () => {
|
|
142
153
|
},
|
|
143
|
-
buttonLink:
|
|
144
|
-
items:
|
|
154
|
+
buttonLink: u,
|
|
155
|
+
items: a,
|
|
145
156
|
buttonText: l,
|
|
146
|
-
limit:
|
|
147
|
-
isLoading:
|
|
148
|
-
getImage:
|
|
157
|
+
limit: d = 3,
|
|
158
|
+
isLoading: i = !1,
|
|
159
|
+
getImage: f = () => {
|
|
149
160
|
},
|
|
150
|
-
readMoreText:
|
|
151
|
-
|
|
152
|
-
|
|
161
|
+
readMoreText: S = "Read more",
|
|
162
|
+
componentName: k
|
|
163
|
+
} = t, M = W(), T = U(() => /* @__PURE__ */ r(v, { children: M === !0 ? a == null ? void 0 : a.map((e, p) => /* @__PURE__ */ r(
|
|
164
|
+
N,
|
|
153
165
|
{
|
|
154
166
|
title: e == null ? void 0 : e.title,
|
|
155
|
-
imageUrl:
|
|
167
|
+
imageUrl: f(e == null ? void 0 : e.imageUrl, e == null ? void 0 : e.uuid) || null,
|
|
156
168
|
text: e == null ? void 0 : e.description,
|
|
157
169
|
titleSlug: e == null ? void 0 : e.titleSlug,
|
|
158
|
-
readMoreText:
|
|
170
|
+
readMoreText: S,
|
|
159
171
|
options: e == null ? void 0 : e.options,
|
|
160
|
-
onCardClick: () =>
|
|
172
|
+
onCardClick: ($, h) => c(e == null ? void 0 : e.titleSlug, h),
|
|
173
|
+
metadata: { name: k, accessor: e == null ? void 0 : e.accessor }
|
|
161
174
|
},
|
|
162
|
-
|
|
163
|
-
)) :
|
|
164
|
-
|
|
175
|
+
p
|
|
176
|
+
)) : a == null ? void 0 : a.slice(0, d).map((e, p) => /* @__PURE__ */ r(
|
|
177
|
+
N,
|
|
165
178
|
{
|
|
166
179
|
title: e == null ? void 0 : e.title,
|
|
167
|
-
imageUrl:
|
|
180
|
+
imageUrl: f(e == null ? void 0 : e.imageUrl, e == null ? void 0 : e.uuid) || null,
|
|
168
181
|
text: e == null ? void 0 : e.description,
|
|
169
182
|
titleSlug: e == null ? void 0 : e.titleSlug,
|
|
170
|
-
readMoreText:
|
|
183
|
+
readMoreText: S,
|
|
171
184
|
options: e == null ? void 0 : e.options,
|
|
172
|
-
onCardClick: () =>
|
|
185
|
+
onCardClick: ($, h) => c(e == null ? void 0 : e.titleSlug, h),
|
|
186
|
+
metadata: { name: k, accessor: e == null ? void 0 : e.accessor }
|
|
173
187
|
},
|
|
174
|
-
|
|
175
|
-
)) }), [
|
|
176
|
-
return /* @__PURE__ */
|
|
177
|
-
/* @__PURE__ */
|
|
178
|
-
/* @__PURE__ */
|
|
179
|
-
|
|
180
|
-
/* @__PURE__ */ r("span", { children:
|
|
188
|
+
p
|
|
189
|
+
)) }), [a]);
|
|
190
|
+
return /* @__PURE__ */ g(L, { ref: m, children: [
|
|
191
|
+
/* @__PURE__ */ g("div", { className: "regular-title", children: [
|
|
192
|
+
/* @__PURE__ */ g("div", { className: "regular-title-text", children: [
|
|
193
|
+
y(o) && /* @__PURE__ */ r("i", { className: o }),
|
|
194
|
+
/* @__PURE__ */ r("span", { children: s })
|
|
181
195
|
] }),
|
|
182
|
-
|
|
183
|
-
|
|
196
|
+
y(u) && /* @__PURE__ */ r(
|
|
197
|
+
_,
|
|
184
198
|
{
|
|
185
199
|
type: "button",
|
|
186
200
|
btnType: "tinted",
|
|
187
201
|
color: "neutral",
|
|
188
202
|
onClick: (e) => {
|
|
189
|
-
var
|
|
190
|
-
(
|
|
203
|
+
var p;
|
|
204
|
+
(p = e == null ? void 0 : e.target) == null || p.blur(), n(u);
|
|
191
205
|
},
|
|
192
206
|
borderRadius: "curved",
|
|
193
207
|
className: "button-link",
|
|
@@ -195,17 +209,17 @@ const L = f.div`
|
|
|
195
209
|
}
|
|
196
210
|
)
|
|
197
211
|
] }),
|
|
198
|
-
/* @__PURE__ */ r(
|
|
199
|
-
|
|
212
|
+
/* @__PURE__ */ r(F, { limit: d, children: /* @__PURE__ */ r(
|
|
213
|
+
q,
|
|
200
214
|
{
|
|
201
|
-
isLoading:
|
|
202
|
-
limit:
|
|
215
|
+
isLoading: i,
|
|
216
|
+
limit: d,
|
|
203
217
|
keyPrefix: "explore-landing",
|
|
204
|
-
children:
|
|
218
|
+
children: T
|
|
205
219
|
}
|
|
206
220
|
) })
|
|
207
221
|
] });
|
|
208
222
|
});
|
|
209
223
|
export {
|
|
210
|
-
|
|
224
|
+
ie as default
|
|
211
225
|
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
"use strict";const t=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";const t=require("react/jsx-runtime"),c=require("react"),p=require("./emotion-styled.browser.esm-BtEseadx.cjs"),w=require("./consts-goSZX3xP.cjs"),C=require("./useDetectMobile-zkbzoOGV.cjs"),h=require("./utils-Dl9xPH4c.cjs"),k=require("./Button.cjs"),x=require("./index-BueKsXT8.cjs"),y=p.styled.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
|
width: fit-content;
|
|
7
|
-
@media (max-width: ${
|
|
7
|
+
@media (max-width: ${w.MOBILE_SIZE_PX+"px"}) {
|
|
8
8
|
grid-template-columns: repeat(1, 1fr);
|
|
9
9
|
}
|
|
10
|
-
`,p
|
|
10
|
+
`,b=p.styled.div`
|
|
11
11
|
display: flex;
|
|
12
12
|
flex-direction: column;
|
|
13
13
|
width: 100%;
|
|
@@ -49,13 +49,13 @@
|
|
|
49
49
|
min-height: 6rem;
|
|
50
50
|
max-height: 6rem;
|
|
51
51
|
border-radius: 0.75rem;
|
|
52
|
-
background-color: ${
|
|
52
|
+
background-color: ${h.linearGradientAnimation("-90deg")};
|
|
53
53
|
}
|
|
54
54
|
|
|
55
|
-
@media (max-width: ${
|
|
55
|
+
@media (max-width: ${w.MOBILE_SIZE_PX+"px"}) {
|
|
56
56
|
max-width: unset;
|
|
57
57
|
}
|
|
58
|
-
`,
|
|
58
|
+
`,j=p.styled.div`
|
|
59
59
|
text-align: center;
|
|
60
60
|
display: flex;
|
|
61
61
|
flex-direction: column;
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
& .skeleton-title {
|
|
74
74
|
height: 1.75rem;
|
|
75
75
|
width: 80%;
|
|
76
|
-
background-color: ${
|
|
76
|
+
background-color: ${h.linearGradientAnimation("-90deg")};
|
|
77
77
|
}
|
|
78
78
|
|
|
79
79
|
& .text-wr {
|
|
@@ -82,6 +82,6 @@
|
|
|
82
82
|
font-weight: 400;
|
|
83
83
|
line-height: 1.25rem;
|
|
84
84
|
letter-spacing: 0.0156rem;
|
|
85
|
-
${
|
|
85
|
+
${h.truncateTextInRows(3)}
|
|
86
86
|
}
|
|
87
|
-
`,
|
|
87
|
+
`,f=c.forwardRef((i,a)=>{const{title:r,image:n,text:o,buttonText:m,onCardClick:d,metadata:s}=i,e=c.useRef(),l=g=>{d(g,e)};return t.jsxs(b,{ref:e,name:s==null?void 0:s.name,"data-accessor":s==null?void 0:s.accessor,className:"blog-card",onClick:l,children:[t.jsx(x.ProductImageWrapper,{src:n}),t.jsxs(j,{children:[t.jsx("div",{className:"text-wr-title",children:r}),t.jsx("div",{className:"text-wr",children:o})]}),t.jsx(k,{borderRadius:"curved",color:"gray",type:"button",btnType:"outline",onClick:l,size:"medium",children:m})]})}),v=c.forwardRef((i,a)=>{const{onCardClick:r}=i;return t.jsxs(b,{className:"product-card",onClick:r,children:[t.jsx("div",{className:"skeleton-img"}),t.jsx(j,{children:t.jsx("div",{className:"skeleton-title"})})]})}),S=({limit:i=3,isLoading:a=!1,keyPrefix:r})=>t.jsx(t.Fragment,{children:Array.from({length:i},(n,o)=>t.jsx(v,{isLoading:a},`${r}-skeleton-product-card-${o}`))}),R=({children:i,fallbackComponent:a=t.jsx(t.Fragment,{}),isLoading:r=!1,limit:n,keyPrefix:o})=>t.jsx(c.Suspense,{fallbackComponent:a,children:r===!0?t.jsx(S,{isLoading:r,limit:n,keyPrefix:o}):i}),$=c.forwardRef((i,a)=>{const{items:r,limit:n=3,onSelectCard:o=()=>{},isLoading:m=!1,componentName:d}=i,s=C.useDetectMobile();return t.jsx(y,{ref:a,limit:n,children:t.jsx(R,{isLoading:m,limit:n,keyPrefix:"explore-landing",children:t.jsx(t.Fragment,{children:s===!0?r==null?void 0:r.map((e,l)=>t.jsx(f,{title:e==null?void 0:e.title,image:(e==null?void 0:e.image)||null,text:e==null?void 0:e.text,buttonText:e==null?void 0:e.buttonText,onCardClick:(g,u)=>o(e,u),metadata:{name:d,accessor:e==null?void 0:e.accessor}},l)):r==null?void 0:r.slice(0,n).map((e,l)=>t.jsx(f,{title:e==null?void 0:e.title,image:(e==null?void 0:e.image)||null,text:e==null?void 0:e.text,buttonText:e==null?void 0:e.buttonText,onCardClick:(g,u)=>o(e,u),metadata:{name:d,accessor:e==null?void 0:e.accessor}},l))})})})});module.exports=$;
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { s as
|
|
4
|
-
import { M as
|
|
5
|
-
import { u as
|
|
6
|
-
import { o as
|
|
7
|
-
import
|
|
8
|
-
import { P as
|
|
9
|
-
const
|
|
1
|
+
import { jsxs as g, jsx as t, Fragment as h } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as u, useRef as v, Suspense as S } from "react";
|
|
3
|
+
import { s as f } from "./emotion-styled.browser.esm-BNN1dTl3.js";
|
|
4
|
+
import { M as b } from "./consts-BuFChS64.js";
|
|
5
|
+
import { u as $ } from "./useDetectMobile-Bkvj0VMa.js";
|
|
6
|
+
import { o as C, p as T } from "./utils-BdsZgOUE.js";
|
|
7
|
+
import N from "./Button.js";
|
|
8
|
+
import { P as B } from "./index-CF3HhgvN.js";
|
|
9
|
+
const P = f.div`
|
|
10
10
|
display: grid;
|
|
11
11
|
grid-template-columns: ${(i) => `repeat(${i.limit}, minmax(0, 1fr))`};
|
|
12
12
|
gap: 1.25rem;
|
|
13
13
|
margin: auto;
|
|
14
14
|
width: fit-content;
|
|
15
|
-
@media (max-width: ${
|
|
15
|
+
@media (max-width: ${b + "px"}) {
|
|
16
16
|
grid-template-columns: repeat(1, 1fr);
|
|
17
17
|
}
|
|
18
|
-
`,
|
|
18
|
+
`, k = f.div`
|
|
19
19
|
display: flex;
|
|
20
20
|
flex-direction: column;
|
|
21
21
|
width: 100%;
|
|
@@ -57,13 +57,13 @@ const x = g.div`
|
|
|
57
57
|
min-height: 6rem;
|
|
58
58
|
max-height: 6rem;
|
|
59
59
|
border-radius: 0.75rem;
|
|
60
|
-
background-color: ${
|
|
60
|
+
background-color: ${C("-90deg")};
|
|
61
61
|
}
|
|
62
62
|
|
|
63
|
-
@media (max-width: ${
|
|
63
|
+
@media (max-width: ${b + "px"}) {
|
|
64
64
|
max-width: unset;
|
|
65
65
|
}
|
|
66
|
-
`,
|
|
66
|
+
`, y = f.div`
|
|
67
67
|
text-align: center;
|
|
68
68
|
display: flex;
|
|
69
69
|
flex-direction: column;
|
|
@@ -81,7 +81,7 @@ const x = g.div`
|
|
|
81
81
|
& .skeleton-title {
|
|
82
82
|
height: 1.75rem;
|
|
83
83
|
width: 80%;
|
|
84
|
-
background-color: ${
|
|
84
|
+
background-color: ${C("-90deg")};
|
|
85
85
|
}
|
|
86
86
|
|
|
87
87
|
& .text-wr {
|
|
@@ -90,95 +90,110 @@ const x = g.div`
|
|
|
90
90
|
font-weight: 400;
|
|
91
91
|
line-height: 1.25rem;
|
|
92
92
|
letter-spacing: 0.0156rem;
|
|
93
|
-
${
|
|
93
|
+
${T(3)}
|
|
94
94
|
}
|
|
95
|
-
`,
|
|
96
|
-
const { title: r, image: o, text:
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
95
|
+
`, w = u((i, l) => {
|
|
96
|
+
const { title: r, image: o, text: n, buttonText: d, onCardClick: c, metadata: a } = i, e = v(), m = (s) => {
|
|
97
|
+
c(s, e);
|
|
98
|
+
};
|
|
99
|
+
return /* @__PURE__ */ g(
|
|
100
|
+
k,
|
|
101
|
+
{
|
|
102
|
+
ref: e,
|
|
103
|
+
name: a == null ? void 0 : a.name,
|
|
104
|
+
"data-accessor": a == null ? void 0 : a.accessor,
|
|
105
|
+
className: "blog-card",
|
|
106
|
+
onClick: m,
|
|
107
|
+
children: [
|
|
108
|
+
/* @__PURE__ */ t(B, { src: o }),
|
|
109
|
+
/* @__PURE__ */ g(y, { children: [
|
|
110
|
+
/* @__PURE__ */ t("div", { className: "text-wr-title", children: r }),
|
|
111
|
+
/* @__PURE__ */ t("div", { className: "text-wr", children: n })
|
|
112
|
+
] }),
|
|
113
|
+
/* @__PURE__ */ t(
|
|
114
|
+
N,
|
|
115
|
+
{
|
|
116
|
+
borderRadius: "curved",
|
|
117
|
+
color: "gray",
|
|
118
|
+
type: "button",
|
|
119
|
+
btnType: "outline",
|
|
120
|
+
onClick: m,
|
|
121
|
+
size: "medium",
|
|
122
|
+
children: d
|
|
123
|
+
}
|
|
124
|
+
)
|
|
125
|
+
]
|
|
126
|
+
}
|
|
127
|
+
);
|
|
128
|
+
}), R = u((i, l) => {
|
|
117
129
|
const { onCardClick: r } = i;
|
|
118
130
|
return (
|
|
119
131
|
// <SimpleBlogCardSkeleton />
|
|
120
|
-
/* @__PURE__ */
|
|
132
|
+
/* @__PURE__ */ g(k, { className: "product-card", onClick: r, children: [
|
|
121
133
|
/* @__PURE__ */ t("div", { className: "skeleton-img" }),
|
|
122
|
-
/* @__PURE__ */ t(
|
|
134
|
+
/* @__PURE__ */ t(y, { children: /* @__PURE__ */ t("div", { className: "skeleton-title" }) })
|
|
123
135
|
] })
|
|
124
136
|
);
|
|
125
|
-
}),
|
|
126
|
-
|
|
137
|
+
}), z = ({ limit: i = 3, isLoading: l = !1, keyPrefix: r }) => /* @__PURE__ */ t(h, { children: Array.from({ length: i }, (o, n) => /* @__PURE__ */ t(
|
|
138
|
+
R,
|
|
127
139
|
{
|
|
128
|
-
isLoading:
|
|
140
|
+
isLoading: l
|
|
129
141
|
},
|
|
130
|
-
`${r}-skeleton-product-card-${
|
|
131
|
-
)) }),
|
|
142
|
+
`${r}-skeleton-product-card-${n}`
|
|
143
|
+
)) }), I = ({
|
|
132
144
|
children: i,
|
|
133
|
-
fallbackComponent:
|
|
145
|
+
fallbackComponent: l = /* @__PURE__ */ t(h, {}),
|
|
134
146
|
isLoading: r = !1,
|
|
135
147
|
limit: o,
|
|
136
|
-
keyPrefix:
|
|
137
|
-
}) => /* @__PURE__ */ t(
|
|
138
|
-
|
|
148
|
+
keyPrefix: n
|
|
149
|
+
}) => /* @__PURE__ */ t(S, { fallbackComponent: l, children: r === !0 ? /* @__PURE__ */ t(
|
|
150
|
+
z,
|
|
139
151
|
{
|
|
140
152
|
isLoading: r,
|
|
141
153
|
limit: o,
|
|
142
|
-
keyPrefix:
|
|
154
|
+
keyPrefix: n
|
|
143
155
|
}
|
|
144
|
-
) : i }),
|
|
156
|
+
) : i }), F = u((i, l) => {
|
|
145
157
|
const {
|
|
146
158
|
items: r,
|
|
147
159
|
limit: o = 3,
|
|
148
|
-
onSelectCard:
|
|
160
|
+
onSelectCard: n = () => {
|
|
149
161
|
},
|
|
150
|
-
isLoading:
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
162
|
+
isLoading: d = !1,
|
|
163
|
+
componentName: c
|
|
164
|
+
} = i, a = $();
|
|
165
|
+
return /* @__PURE__ */ t(P, { ref: l, limit: o, children: /* @__PURE__ */ t(
|
|
166
|
+
I,
|
|
154
167
|
{
|
|
155
|
-
isLoading:
|
|
168
|
+
isLoading: d,
|
|
156
169
|
limit: o,
|
|
157
170
|
keyPrefix: "explore-landing",
|
|
158
|
-
children: /* @__PURE__ */ t(
|
|
159
|
-
|
|
171
|
+
children: /* @__PURE__ */ t(h, { children: a === !0 ? r == null ? void 0 : r.map((e, m) => /* @__PURE__ */ t(
|
|
172
|
+
w,
|
|
160
173
|
{
|
|
161
174
|
title: e == null ? void 0 : e.title,
|
|
162
175
|
image: (e == null ? void 0 : e.image) || null,
|
|
163
176
|
text: e == null ? void 0 : e.text,
|
|
164
177
|
buttonText: e == null ? void 0 : e.buttonText,
|
|
165
|
-
onCardClick: () =>
|
|
178
|
+
onCardClick: (s, p) => n(e, p),
|
|
179
|
+
metadata: { name: c, accessor: e == null ? void 0 : e.accessor }
|
|
166
180
|
},
|
|
167
|
-
|
|
168
|
-
)) : r == null ? void 0 : r.slice(0, o).map((e,
|
|
169
|
-
|
|
181
|
+
m
|
|
182
|
+
)) : r == null ? void 0 : r.slice(0, o).map((e, m) => /* @__PURE__ */ t(
|
|
183
|
+
w,
|
|
170
184
|
{
|
|
171
185
|
title: e == null ? void 0 : e.title,
|
|
172
186
|
image: (e == null ? void 0 : e.image) || null,
|
|
173
187
|
text: e == null ? void 0 : e.text,
|
|
174
188
|
buttonText: e == null ? void 0 : e.buttonText,
|
|
175
|
-
onCardClick: () =>
|
|
189
|
+
onCardClick: (s, p) => n(e, p),
|
|
190
|
+
metadata: { name: c, accessor: e == null ? void 0 : e.accessor }
|
|
176
191
|
},
|
|
177
|
-
|
|
192
|
+
m
|
|
178
193
|
)) })
|
|
179
194
|
}
|
|
180
195
|
) });
|
|
181
196
|
});
|
|
182
197
|
export {
|
|
183
|
-
|
|
198
|
+
F as default
|
|
184
199
|
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
"use strict";const
|
|
1
|
+
"use strict";const t=require("react/jsx-runtime"),l=require("react"),x=require("./emotion-styled.browser.esm-BtEseadx.cjs"),S=require("./consts-goSZX3xP.cjs"),W=require("./useDetectMobile-zkbzoOGV.cjs"),m=require("./utils-Dl9xPH4c.cjs"),A=require("./style-lSjkOR95.cjs"),I=require("./Button.cjs"),_=require("./Link.cjs"),z=require("./index-BueKsXT8.cjs"),E=require("./index-D0xXo7W6.cjs"),P=x.styled.div`
|
|
2
2
|
display: grid;
|
|
3
|
-
grid-template-columns: ${
|
|
3
|
+
grid-template-columns: ${n=>`repeat(${n.limit}, minmax(0, 1fr))`};
|
|
4
4
|
gap: 1.25rem;
|
|
5
5
|
|
|
6
|
-
@media (max-width: ${
|
|
6
|
+
@media (max-width: ${S.MOBILE_SIZE_PX+"px"}) {
|
|
7
7
|
grid-template-columns: repeat(1, 1fr);
|
|
8
8
|
}
|
|
9
|
-
`,
|
|
9
|
+
`,C=x.styled.div`
|
|
10
10
|
display: flex;
|
|
11
11
|
width: 100%;
|
|
12
12
|
box-shadow: 0px 1px 3px 0px rgba(0, 0, 0, 0.1),
|
|
@@ -39,16 +39,16 @@
|
|
|
39
39
|
min-height: 3.3125rem;
|
|
40
40
|
max-height: 3.3125rem;
|
|
41
41
|
border-radius: 0.75rem;
|
|
42
|
-
background-color: ${
|
|
42
|
+
background-color: ${m.linearGradientAnimation("-90deg")};
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
& a {
|
|
46
46
|
margin-top: auto;
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
-
@media (max-width: ${
|
|
49
|
+
@media (max-width: ${S.MOBILE_SIZE_PX+"px"}) {
|
|
50
50
|
}
|
|
51
|
-
`,
|
|
51
|
+
`,N=x.styled.div`
|
|
52
52
|
display: flex;
|
|
53
53
|
flex-direction: column;
|
|
54
54
|
gap: 0.5rem;
|
|
@@ -62,19 +62,19 @@
|
|
|
62
62
|
& .skeleton-title {
|
|
63
63
|
height: 1.5rem;
|
|
64
64
|
width: 80%;
|
|
65
|
-
background-color: ${
|
|
65
|
+
background-color: ${m.linearGradientAnimation("-90deg")};
|
|
66
66
|
}
|
|
67
67
|
|
|
68
68
|
& .skeleton-action {
|
|
69
69
|
height: 1.25rem;
|
|
70
70
|
width: 20%;
|
|
71
|
-
background-color: ${
|
|
71
|
+
background-color: ${m.linearGradientAnimation("-90deg")};
|
|
72
72
|
}
|
|
73
73
|
|
|
74
74
|
& .text-wr {
|
|
75
75
|
font-weight: 400;
|
|
76
76
|
font-size: 0.875rem;
|
|
77
77
|
color: var(--gray-700, #4e555f);
|
|
78
|
-
${
|
|
78
|
+
${m.truncateTextInRows(3)}
|
|
79
79
|
}
|
|
80
|
-
`,
|
|
80
|
+
`,F=l.forwardRef((n,a)=>{const{title:s,imageUrl:c,text:r,buttonText:p,onCardClick:d,metadata:i}=n,u=l.useRef(),g=h=>{d(h,u)};return t.jsxs(C,{ref:u,name:i==null?void 0:i.name,"data-accessor":i==null?void 0:i.accessor,className:"blog-card",onClick:g,children:[t.jsxs(N,{children:[t.jsx("div",{className:"text-wr-title",children:s}),t.jsx("div",{className:"text-wr",children:r}),t.jsx(_,{color:"gray",onClick:g,children:p})]}),t.jsx(z.ProductImageWrapper,{src:c})]})}),O=l.forwardRef(({},n)=>t.jsxs(C,{className:"blog-card",children:[t.jsxs(N,{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"})]})),D=({limit:n=3,isLoading:a=!1,keyPrefix:s})=>t.jsx(t.Fragment,{children:Array.from({length:n},(c,r)=>t.jsx(O,{isLoading:a},`${s}-skeleton-product-card-${r}`))}),G=({children:n,fallbackComponent:a=t.jsx(t.Fragment,{}),isLoading:s=!1,limit:c,keyPrefix:r})=>t.jsx(l.Suspense,{fallbackComponent:a,children:s===!0?t.jsx(D,{isLoading:s,limit:c,keyPrefix:r}):n}),y=l.memo(F),L=l.forwardRef((n,a)=>{const{icon:s,title:c,items:r,buttonText:p,limit:d=3,options:i,selectedOption:u=[],onButtonAction:g=()=>{},buttonLink:h,onSelectOption:w=()=>{},onSelectAll:q=()=>{},isLoading:B=!1,onSelectCard:b=()=>{},productsToolbarName:T="All",allButton:$=!1,componentName:k}=n,v=W.useDetectMobile(),R=l.useMemo(()=>{var o;return t.jsx(t.Fragment,{children:v===!0?r==null?void 0:r.map((e,f)=>t.jsx(y,{title:e==null?void 0:e.title,imageUrl:(e==null?void 0:e.image)||null,text:e==null?void 0:e.text,buttonText:e==null?void 0:e.buttonText,onCardClick:(M,j)=>b(e,j),metadata:{name:k,accessor:e==null?void 0:e.accessor}},f)):(o=r==null?void 0:r.slice(0,d))==null?void 0:o.map((e,f)=>t.jsx(y,{title:e==null?void 0:e.title,imageUrl:(e==null?void 0:e.image)||null,text:e==null?void 0:e.text,buttonText:e==null?void 0:e.buttonText,onCardClick:(M,j)=>b(e,j),metadata:{name:k,accessor:e==null?void 0:e.accessor}},f))})},[r,v,d,b]);return t.jsxs(A.TitleWithOptionsSectionWrapper,{ref:a,children:[t.jsxs("div",{className:"regular-title",children:[t.jsxs("div",{className:"regular-title-text",children:[m.isDefinedNotEmptyString(s)&&t.jsx("i",{className:s}),t.jsx("span",{children:c})]}),m.isDefinedNotEmptyString(h)&&t.jsx(I,{type:"button",btnType:"tinted",color:"neutral",onClick:o=>{var e;(e=o==null?void 0:o.target)==null||e.blur(),g(h)},borderRadius:"curved",children:p})]}),(i==null?void 0:i.length)>0&&t.jsx(E.SelectBar,{items:i,selectedIds:u,onRemove:o=>{w(o)},onSelect:o=>{w(o)},onSelectAll:q,labelKey:"name",valueKey:"code",noMargin:!0,productsToolbarName:T,allButton:$}),t.jsx(P,{limit:d,children:t.jsx(G,{isLoading:B,limit:d,keyPrefix:"explore-landing",children:R})})]})});module.exports=L;
|