@lanaco/lnc-react-ui 4.0.37 → 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/QuizSection.cjs +1 -1
- package/dist/QuizSection.js +25 -25
- 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 +2 -2
- package/dist/index-D6g5ZqyJ.js +0 -159
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
"use strict";const
|
|
1
|
+
"use strict";const r=require("react/jsx-runtime"),c=require("react"),w=require("./emotion-styled.browser.esm-Cle7tAM9.cjs"),v=require("./consts-CtNoHdBj.cjs"),S=require("./useDetectMobile-D6d5LpdL.cjs"),d=require("./utils-NZLCh-J5.cjs"),y=require("./style-BR3tIhP1.cjs"),C=require("./Button.cjs"),D=w.newStyled.div`
|
|
2
2
|
display: grid;
|
|
3
|
-
grid-template-columns: ${
|
|
3
|
+
grid-template-columns: ${t=>`repeat(${t.limit}, minmax(0, 1fr))`};
|
|
4
4
|
gap: 1.25rem;
|
|
5
5
|
|
|
6
|
-
@media (max-width: ${
|
|
6
|
+
@media (max-width: ${v.MOBILE_SIZE_PX+"px"}) {
|
|
7
7
|
grid-template-columns: repeat(1, 1fr);
|
|
8
8
|
}
|
|
9
|
-
`,
|
|
9
|
+
`,k=w.newStyled.div`
|
|
10
10
|
display: flex;
|
|
11
11
|
flex-direction: column;
|
|
12
12
|
width: 100%;
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
width: 100%;
|
|
38
38
|
max-height: 11.0625rem;
|
|
39
39
|
min-height: 11.0625rem;
|
|
40
|
-
background-color: ${
|
|
40
|
+
background-color: ${d.linearGradientAnimation("-90deg")};
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
& .tags-wr {
|
|
@@ -47,9 +47,9 @@
|
|
|
47
47
|
padding: 0 1rem 1rem 1rem;
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
@media (max-width: ${
|
|
50
|
+
@media (max-width: ${v.MOBILE_SIZE_PX+"px"}) {
|
|
51
51
|
}
|
|
52
|
-
`,
|
|
52
|
+
`,N=w.newStyled.div`
|
|
53
53
|
padding: 1rem 1rem 0 1rem;
|
|
54
54
|
display: flex;
|
|
55
55
|
flex-direction: column;
|
|
@@ -63,13 +63,13 @@
|
|
|
63
63
|
}
|
|
64
64
|
|
|
65
65
|
& .info-wr-skeleton {
|
|
66
|
-
background-color: ${
|
|
66
|
+
background-color: ${d.linearGradientAnimation("-90deg")};
|
|
67
67
|
height: 1rem;
|
|
68
68
|
width: 100%;
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
& .skeleton-title {
|
|
72
|
-
background-color: ${
|
|
72
|
+
background-color: ${d.linearGradientAnimation("-90deg")};
|
|
73
73
|
height: 1.5rem;
|
|
74
74
|
width: 70%;
|
|
75
75
|
}
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
font-size: 0.875rem;
|
|
80
80
|
flex: 1;
|
|
81
81
|
color: var(--gray-700, #4e555f);
|
|
82
|
-
${
|
|
82
|
+
${d.truncateTextInRows(2)}
|
|
83
83
|
}
|
|
84
84
|
|
|
85
85
|
& .info-wr {
|
|
@@ -108,4 +108,4 @@
|
|
|
108
108
|
align-items: center;
|
|
109
109
|
gap: 1rem;
|
|
110
110
|
}
|
|
111
|
-
`,
|
|
111
|
+
`,O=c.forwardRef((t,m)=>{const{title:i,image:l,text:a,numberOfLikes:s,numberOfComments:f,readDuration:o,datePublished:u,tags:g,onCardClick:h,timeToReadText:p="read"}=t;return r.jsxs(k,{className:"blog-card",onClick:h,children:[r.jsx("img",{src:l}),r.jsxs(N,{children:[r.jsxs("div",{className:"info-wr",children:[r.jsxs("div",{className:"info-wr-1",children:[r.jsx("span",{children:u}),r.jsx("span",{className:"small-dot",children:"●"}),o&&p?`${o} ${p}`:"N/A"]}),r.jsxs("div",{className:"info-wr-2",children:[r.jsxs("span",{className:"info-wr-1",children:[r.jsx("i",{className:"mng mng-lnc-thumbs-up--filled"}),r.jsx("span",{children:s})]}),r.jsxs("span",{className:"info-wr-1",children:[r.jsx("i",{className:"mng mng-lnc-messages-filled"}),r.jsx("span",{children:f})]})]})]}),r.jsx("div",{className:"text-wr-title",children:i}),r.jsx("div",{className:"text-wr",children:a})]}),r.jsx("div",{className:"tags-wr",children:g==null?void 0:g.map((n,e)=>r.jsx(y.BlogTag,{color:n==null?void 0:n.color,children:n==null?void 0:n.name},e))})]})}),$=c.forwardRef(({},t)=>r.jsxs(k,{className:"blog-card",children:[r.jsx("div",{className:"skeleton-img"}),r.jsxs(N,{children:[r.jsx("div",{className:"info-wr"}),r.jsx("div",{className:"skeleton-title"}),r.jsx("div",{className:"info-wr-skeleton"})]})]})),B=({limit:t=3,isLoading:m=!1,keyPrefix:i})=>r.jsx(r.Fragment,{children:Array.from({length:t},(l,a)=>r.jsx($,{isLoading:m},`${i}-skeleton-product-card-${a}`))}),P=({children:t,fallbackComponent:m=r.jsx(r.Fragment,{}),isLoading:i=!1,limit:l,keyPrefix:a})=>r.jsx(c.Suspense,{fallbackComponent:m,children:i===!0?r.jsx(B,{isLoading:i,limit:l,keyPrefix:a}):t}),b=c.memo(O),R=c.forwardRef((t,m)=>{const{icon:i,title:l,onButtonAction:a,items:s,buttonText:f,limit:o=3,onSelectCard:u=()=>{},isLoading:g=!1,onSectionClick:h=()=>{}}=t,p=S.useDetectMobile(),n=c.useMemo(()=>r.jsx(r.Fragment,{children:p===!0?s==null?void 0:s.map((e,j)=>r.jsx(b,{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,numberOfLikes:e==null?void 0:e.numberOfLikes,numberOfComments:e==null?void 0:e.numberOfComments,datePublished:e==null?void 0:e.date,readDuration:e==null?void 0:e.readDuration,tags:e==null?void 0:e.tags,onCardClick:()=>u(e==null?void 0:e.uuid)},j)):s==null?void 0:s.slice(0,o).map((e,j)=>r.jsx(b,{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,tags:e==null?void 0:e.tags,numberOfLikes:e==null?void 0:e.numberOfLikes,numberOfComments:e==null?void 0:e.numberOfComments,datePublished:e==null?void 0:e.date,readDuration:e==null?void 0:e.readDuration,onCardClick:()=>u(e==null?void 0:e.uuid)},j))}),[s]);return r.jsxs(y.RegulatTitleSectionWrapper,{children:[r.jsxs("div",{className:"regular-title",children:[r.jsxs("div",{className:"regular-title-text",children:[d.isDefinedNotEmptyString(i)&&r.jsx("i",{className:i}),r.jsx("span",{children:l})]}),d.isDefinedNotEmptyString(h)&&r.jsx(C,{type:"button",btnType:"tinted",color:"gray",onClick:()=>a(buttonLink),borderRadius:"curved",children:f})]}),r.jsx(D,{limit:o,children:r.jsx(P,{isLoading:g,limit:o,keyPrefix:"explore-landing",children:n})})]})});module.exports=R;
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { jsxs as t, jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { n as
|
|
4
|
-
import { M as
|
|
5
|
-
import { u as
|
|
6
|
-
import { m as
|
|
7
|
-
import { B as
|
|
8
|
-
import
|
|
9
|
-
const
|
|
1
|
+
import { jsxs as t, jsx as r, Fragment as w } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as v, Suspense as D, memo as O, useMemo as B } from "react";
|
|
3
|
+
import { n as k } from "./emotion-styled.browser.esm-CjCaF13H.js";
|
|
4
|
+
import { M as C } from "./consts-C1uHV4xc.js";
|
|
5
|
+
import { u as P } from "./useDetectMobile-BC6EGaBc.js";
|
|
6
|
+
import { m as b, t as T, k as y } from "./utils-DtRLzzTZ.js";
|
|
7
|
+
import { B as L, R as z } from "./style-6tSw9aqK.js";
|
|
8
|
+
import M from "./Button.js";
|
|
9
|
+
const R = k.div`
|
|
10
10
|
display: grid;
|
|
11
|
-
grid-template-columns: ${(
|
|
11
|
+
grid-template-columns: ${(i) => `repeat(${i.limit}, minmax(0, 1fr))`};
|
|
12
12
|
gap: 1.25rem;
|
|
13
13
|
|
|
14
|
-
@media (max-width: ${
|
|
14
|
+
@media (max-width: ${C + "px"}) {
|
|
15
15
|
grid-template-columns: repeat(1, 1fr);
|
|
16
16
|
}
|
|
17
|
-
`,
|
|
17
|
+
`, S = k.div`
|
|
18
18
|
display: flex;
|
|
19
19
|
flex-direction: column;
|
|
20
20
|
width: 100%;
|
|
@@ -45,7 +45,7 @@ const D = u.div`
|
|
|
45
45
|
width: 100%;
|
|
46
46
|
max-height: 11.0625rem;
|
|
47
47
|
min-height: 11.0625rem;
|
|
48
|
-
background-color: ${
|
|
48
|
+
background-color: ${b("-90deg")};
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
& .tags-wr {
|
|
@@ -55,9 +55,9 @@ const D = u.div`
|
|
|
55
55
|
padding: 0 1rem 1rem 1rem;
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
-
@media (max-width: ${
|
|
58
|
+
@media (max-width: ${C + "px"}) {
|
|
59
59
|
}
|
|
60
|
-
`,
|
|
60
|
+
`, $ = k.div`
|
|
61
61
|
padding: 1rem 1rem 0 1rem;
|
|
62
62
|
display: flex;
|
|
63
63
|
flex-direction: column;
|
|
@@ -71,13 +71,13 @@ const D = u.div`
|
|
|
71
71
|
}
|
|
72
72
|
|
|
73
73
|
& .info-wr-skeleton {
|
|
74
|
-
background-color: ${
|
|
74
|
+
background-color: ${b("-90deg")};
|
|
75
75
|
height: 1rem;
|
|
76
76
|
width: 100%;
|
|
77
77
|
}
|
|
78
78
|
|
|
79
79
|
& .skeleton-title {
|
|
80
|
-
background-color: ${
|
|
80
|
+
background-color: ${b("-90deg")};
|
|
81
81
|
height: 1.5rem;
|
|
82
82
|
width: 70%;
|
|
83
83
|
}
|
|
@@ -87,7 +87,7 @@ const D = u.div`
|
|
|
87
87
|
font-size: 0.875rem;
|
|
88
88
|
flex: 1;
|
|
89
89
|
color: var(--gray-700, #4e555f);
|
|
90
|
-
${
|
|
90
|
+
${T(2)}
|
|
91
91
|
}
|
|
92
92
|
|
|
93
93
|
& .info-wr {
|
|
@@ -116,109 +116,146 @@ const D = u.div`
|
|
|
116
116
|
align-items: center;
|
|
117
117
|
gap: 1rem;
|
|
118
118
|
}
|
|
119
|
-
`,
|
|
119
|
+
`, j = v((i, d) => {
|
|
120
120
|
const {
|
|
121
|
-
title:
|
|
122
|
-
image:
|
|
123
|
-
text:
|
|
124
|
-
numberOfLikes:
|
|
125
|
-
numberOfComments:
|
|
126
|
-
readDuration:
|
|
127
|
-
datePublished:
|
|
128
|
-
tags:
|
|
129
|
-
onCardClick:
|
|
130
|
-
timeToReadText:
|
|
131
|
-
} =
|
|
121
|
+
title: a,
|
|
122
|
+
image: s,
|
|
123
|
+
text: l,
|
|
124
|
+
numberOfLikes: n,
|
|
125
|
+
numberOfComments: u,
|
|
126
|
+
readDuration: m,
|
|
127
|
+
datePublished: g,
|
|
128
|
+
tags: c,
|
|
129
|
+
onCardClick: f,
|
|
130
|
+
timeToReadText: p = "read"
|
|
131
|
+
} = i;
|
|
132
132
|
return (
|
|
133
133
|
// <BlogCardDetailedSkeleton />
|
|
134
|
-
/* @__PURE__ */ t(
|
|
135
|
-
/* @__PURE__ */ r("img", { src:
|
|
136
|
-
/* @__PURE__ */ t(
|
|
134
|
+
/* @__PURE__ */ t(S, { className: "blog-card", onClick: f, children: [
|
|
135
|
+
/* @__PURE__ */ r("img", { src: s }),
|
|
136
|
+
/* @__PURE__ */ t($, { children: [
|
|
137
137
|
/* @__PURE__ */ t("div", { className: "info-wr", children: [
|
|
138
138
|
/* @__PURE__ */ t("div", { className: "info-wr-1", children: [
|
|
139
|
-
/* @__PURE__ */ r("span", { children:
|
|
139
|
+
/* @__PURE__ */ r("span", { children: g }),
|
|
140
140
|
/* @__PURE__ */ r("span", { className: "small-dot", children: "●" }),
|
|
141
|
-
|
|
141
|
+
m && p ? `${m} ${p}` : "N/A"
|
|
142
142
|
] }),
|
|
143
143
|
/* @__PURE__ */ t("div", { className: "info-wr-2", children: [
|
|
144
144
|
/* @__PURE__ */ t("span", { className: "info-wr-1", children: [
|
|
145
145
|
/* @__PURE__ */ r("i", { className: "mng mng-lnc-thumbs-up--filled" }),
|
|
146
|
-
/* @__PURE__ */ r("span", { children:
|
|
146
|
+
/* @__PURE__ */ r("span", { children: n })
|
|
147
147
|
] }),
|
|
148
148
|
/* @__PURE__ */ t("span", { className: "info-wr-1", children: [
|
|
149
149
|
/* @__PURE__ */ r("i", { className: "mng mng-lnc-messages-filled" }),
|
|
150
|
-
/* @__PURE__ */ r("span", { children:
|
|
150
|
+
/* @__PURE__ */ r("span", { children: u })
|
|
151
151
|
] })
|
|
152
152
|
] })
|
|
153
153
|
] }),
|
|
154
|
-
/* @__PURE__ */ r("div", { className: "text-wr-title", children:
|
|
155
|
-
/* @__PURE__ */ r("div", { className: "text-wr", children:
|
|
154
|
+
/* @__PURE__ */ r("div", { className: "text-wr-title", children: a }),
|
|
155
|
+
/* @__PURE__ */ r("div", { className: "text-wr", children: l })
|
|
156
156
|
] }),
|
|
157
|
-
/* @__PURE__ */ r("div", { className: "tags-wr", children:
|
|
157
|
+
/* @__PURE__ */ r("div", { className: "tags-wr", children: c == null ? void 0 : c.map((o, e) => /* @__PURE__ */ r(L, { color: o == null ? void 0 : o.color, children: o == null ? void 0 : o.name }, e)) })
|
|
158
158
|
] })
|
|
159
159
|
);
|
|
160
|
-
}),
|
|
160
|
+
}), A = v(({}, i) => /* @__PURE__ */ t(S, { className: "blog-card", children: [
|
|
161
|
+
/* @__PURE__ */ r("div", { className: "skeleton-img" }),
|
|
162
|
+
/* @__PURE__ */ t($, { children: [
|
|
163
|
+
/* @__PURE__ */ r("div", { className: "info-wr" }),
|
|
164
|
+
/* @__PURE__ */ r("div", { className: "skeleton-title" }),
|
|
165
|
+
/* @__PURE__ */ r("div", { className: "info-wr-skeleton" })
|
|
166
|
+
] })
|
|
167
|
+
] })), W = ({ limit: i = 3, isLoading: d = !1, keyPrefix: a }) => /* @__PURE__ */ r(w, { children: Array.from({ length: i }, (s, l) => /* @__PURE__ */ r(
|
|
168
|
+
A,
|
|
169
|
+
{
|
|
170
|
+
isLoading: d
|
|
171
|
+
},
|
|
172
|
+
`${a}-skeleton-product-card-${l}`
|
|
173
|
+
)) }), E = ({
|
|
174
|
+
children: i,
|
|
175
|
+
fallbackComponent: d = /* @__PURE__ */ r(w, {}),
|
|
176
|
+
isLoading: a = !1,
|
|
177
|
+
limit: s,
|
|
178
|
+
keyPrefix: l
|
|
179
|
+
}) => /* @__PURE__ */ r(D, { fallbackComponent: d, children: a === !0 ? /* @__PURE__ */ r(
|
|
180
|
+
W,
|
|
181
|
+
{
|
|
182
|
+
isLoading: a,
|
|
183
|
+
limit: s,
|
|
184
|
+
keyPrefix: l
|
|
185
|
+
}
|
|
186
|
+
) : i }), N = O(j), J = v((i, d) => {
|
|
161
187
|
const {
|
|
162
|
-
icon:
|
|
163
|
-
title:
|
|
164
|
-
onButtonAction:
|
|
165
|
-
items:
|
|
166
|
-
buttonText:
|
|
167
|
-
limit:
|
|
168
|
-
onSelectCard:
|
|
188
|
+
icon: a,
|
|
189
|
+
title: s,
|
|
190
|
+
onButtonAction: l,
|
|
191
|
+
items: n,
|
|
192
|
+
buttonText: u,
|
|
193
|
+
limit: m = 3,
|
|
194
|
+
onSelectCard: g = () => {
|
|
195
|
+
},
|
|
196
|
+
isLoading: c = !1,
|
|
197
|
+
onSectionClick: f = () => {
|
|
169
198
|
}
|
|
170
|
-
} =
|
|
171
|
-
|
|
199
|
+
} = i, p = P(), o = B(() => /* @__PURE__ */ r(w, { children: p === !0 ? n == null ? void 0 : n.map((e, h) => /* @__PURE__ */ r(
|
|
200
|
+
N,
|
|
201
|
+
{
|
|
202
|
+
title: e == null ? void 0 : e.title,
|
|
203
|
+
image: e == null ? void 0 : e.image,
|
|
204
|
+
text: e == null ? void 0 : e.text,
|
|
205
|
+
titleSlug: e == null ? void 0 : e.titleSlug,
|
|
206
|
+
numberOfLikes: e == null ? void 0 : e.numberOfLikes,
|
|
207
|
+
numberOfComments: e == null ? void 0 : e.numberOfComments,
|
|
208
|
+
datePublished: e == null ? void 0 : e.date,
|
|
209
|
+
readDuration: e == null ? void 0 : e.readDuration,
|
|
210
|
+
tags: e == null ? void 0 : e.tags,
|
|
211
|
+
onCardClick: () => g(e == null ? void 0 : e.uuid)
|
|
212
|
+
},
|
|
213
|
+
h
|
|
214
|
+
)) : n == null ? void 0 : n.slice(0, m).map((e, h) => /* @__PURE__ */ r(
|
|
215
|
+
N,
|
|
216
|
+
{
|
|
217
|
+
title: e == null ? void 0 : e.title,
|
|
218
|
+
image: e == null ? void 0 : e.image,
|
|
219
|
+
text: e == null ? void 0 : e.text,
|
|
220
|
+
titleSlug: e == null ? void 0 : e.titleSlug,
|
|
221
|
+
tags: e == null ? void 0 : e.tags,
|
|
222
|
+
numberOfLikes: e == null ? void 0 : e.numberOfLikes,
|
|
223
|
+
numberOfComments: e == null ? void 0 : e.numberOfComments,
|
|
224
|
+
datePublished: e == null ? void 0 : e.date,
|
|
225
|
+
readDuration: e == null ? void 0 : e.readDuration,
|
|
226
|
+
onCardClick: () => g(e == null ? void 0 : e.uuid)
|
|
227
|
+
},
|
|
228
|
+
h
|
|
229
|
+
)) }), [n]);
|
|
230
|
+
return /* @__PURE__ */ t(z, { children: [
|
|
172
231
|
/* @__PURE__ */ t("div", { className: "regular-title", children: [
|
|
173
232
|
/* @__PURE__ */ t("div", { className: "regular-title-text", children: [
|
|
174
|
-
|
|
175
|
-
/* @__PURE__ */ r("span", { children:
|
|
233
|
+
y(a) && /* @__PURE__ */ r("i", { className: a }),
|
|
234
|
+
/* @__PURE__ */ r("span", { children: s })
|
|
176
235
|
] }),
|
|
177
|
-
|
|
178
|
-
|
|
236
|
+
y(f) && /* @__PURE__ */ r(
|
|
237
|
+
M,
|
|
179
238
|
{
|
|
180
239
|
type: "button",
|
|
181
240
|
btnType: "tinted",
|
|
182
241
|
color: "gray",
|
|
183
|
-
onClick: () =>
|
|
242
|
+
onClick: () => l(buttonLink),
|
|
184
243
|
borderRadius: "curved",
|
|
185
|
-
children:
|
|
244
|
+
children: u
|
|
186
245
|
}
|
|
187
246
|
)
|
|
188
247
|
] }),
|
|
189
|
-
/* @__PURE__ */ r(
|
|
190
|
-
|
|
191
|
-
{
|
|
192
|
-
title: e == null ? void 0 : e.title,
|
|
193
|
-
image: e == null ? void 0 : e.image,
|
|
194
|
-
text: e == null ? void 0 : e.text,
|
|
195
|
-
titleSlug: e == null ? void 0 : e.titleSlug,
|
|
196
|
-
numberOfLikes: e == null ? void 0 : e.numberOfLikes,
|
|
197
|
-
numberOfComments: e == null ? void 0 : e.numberOfComments,
|
|
198
|
-
datePublished: e == null ? void 0 : e.date,
|
|
199
|
-
readDuration: e == null ? void 0 : e.readDuration,
|
|
200
|
-
tags: e == null ? void 0 : e.tags,
|
|
201
|
-
onCardClick: () => d(e == null ? void 0 : e.uuid)
|
|
202
|
-
},
|
|
203
|
-
a
|
|
204
|
-
)) : i == null ? void 0 : i.slice(0, l).map((e, a) => /* @__PURE__ */ r(
|
|
205
|
-
b,
|
|
248
|
+
/* @__PURE__ */ r(R, { limit: m, children: /* @__PURE__ */ r(
|
|
249
|
+
E,
|
|
206
250
|
{
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
numberOfComments: e == null ? void 0 : e.numberOfComments,
|
|
214
|
-
datePublished: e == null ? void 0 : e.date,
|
|
215
|
-
readDuration: e == null ? void 0 : e.readDuration,
|
|
216
|
-
onCardClick: () => d(e == null ? void 0 : e.uuid)
|
|
217
|
-
},
|
|
218
|
-
a
|
|
219
|
-
)) })
|
|
251
|
+
isLoading: c,
|
|
252
|
+
limit: m,
|
|
253
|
+
keyPrefix: "explore-landing",
|
|
254
|
+
children: o
|
|
255
|
+
}
|
|
256
|
+
) })
|
|
220
257
|
] });
|
|
221
258
|
});
|
|
222
259
|
export {
|
|
223
|
-
|
|
260
|
+
J as default
|
|
224
261
|
};
|
|
@@ -1,12 +1,12 @@
|
|
|
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"),g=require("./utils-NZLCh-J5.cjs"),p=require("./Button.cjs"),x=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
|
|
|
6
|
-
@media (max-width: ${
|
|
6
|
+
@media (max-width: ${h.MOBILE_SIZE_PX+"px"}) {
|
|
7
7
|
grid-template-columns: repeat(1, 1fr);
|
|
8
8
|
}
|
|
9
|
-
`,
|
|
9
|
+
`,f=u.newStyled.div`
|
|
10
10
|
display: flex;
|
|
11
11
|
width: 100%;
|
|
12
12
|
gap: 1.25rem;
|
|
@@ -35,11 +35,11 @@
|
|
|
35
35
|
min-height: 12.25rem;
|
|
36
36
|
min-width: 11.25rem;
|
|
37
37
|
max-width: 11.25rem;
|
|
38
|
-
background-color: ${
|
|
38
|
+
background-color: ${g.linearGradientAnimation("-90deg")};
|
|
39
39
|
border-radius: 0.75rem 0 0 0.75rem;
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
-
@media (max-width: ${
|
|
42
|
+
@media (max-width: ${h.MOBILE_SIZE_PX+"px"}) {
|
|
43
43
|
padding: 1rem;
|
|
44
44
|
column-gap: 1.5rem;
|
|
45
45
|
row-gap: 1rem;
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
margin-top: auto;
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
|
-
`,
|
|
68
|
+
`,j=u.newStyled.div`
|
|
69
69
|
padding: 1rem;
|
|
70
70
|
display: flex;
|
|
71
71
|
flex-direction: column;
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
font-weight: 400;
|
|
82
82
|
font-size: 0.875rem;
|
|
83
83
|
color: var(--gray-700, #4e555f);
|
|
84
|
-
${
|
|
84
|
+
${g.truncateTextInRows(3)}
|
|
85
85
|
}
|
|
86
86
|
|
|
87
87
|
& button {
|
|
@@ -92,10 +92,10 @@
|
|
|
92
92
|
& .skeleton-title {
|
|
93
93
|
height: 1.75rem;
|
|
94
94
|
width: 80%;
|
|
95
|
-
background-color: ${
|
|
95
|
+
background-color: ${g.linearGradientAnimation("-90deg")};
|
|
96
96
|
}
|
|
97
97
|
|
|
98
|
-
@media (max-width: ${
|
|
98
|
+
@media (max-width: ${h.MOBILE_SIZE_PX+"px"}) {
|
|
99
99
|
padding: 0;
|
|
100
100
|
}
|
|
101
|
-
|
|
101
|
+
`,y=a.forwardRef((i,s)=>{const{title:r,image:n,text:o,onCardClick:l,buttonText:m}=i,d=b.useDetectMobile();return t.jsxs(f,{className:"blog-card",onClick:l,children:[t.jsx("img",{src:n}),t.jsxs(j,{children:[t.jsx("div",{className:"text-wr-title",children:r}),t.jsx("div",{className:"text-wr",children:o}),d!==!0&&t.jsx(p,{type:"button",btnType:"outline",size:"medium",color:"gray",onClick:l,children:m})]}),d===!0&&t.jsx(p,{className:"action",type:"button",btnType:"outline",size:"medium",color:"gray",onClick:l,children:m})]})}),k=a.forwardRef(({},i)=>t.jsxs(f,{className:"blog-card",children:[t.jsx("div",{className:"skeleton-img"}),t.jsx(j,{children:t.jsx("div",{className:"skeleton-title"})})]})),S=({limit:i=2,isLoading:s=!1,keyPrefix:r})=>t.jsx(t.Fragment,{children:Array.from({length:i},(n,o)=>t.jsx(k,{isLoading:s},`${r}-skeleton-product-card-${o}`))}),v=({children:i,fallbackComponent:s=t.jsx(t.Fragment,{}),isLoading:r=!1,limit:n,keyPrefix:o})=>t.jsx(a.Suspense,{fallbackComponent:s,children:r===!0?t.jsx(S,{isLoading:r,limit:n,keyPrefix:o}):i}),w=a.memo(y),C=a.forwardRef((i,s)=>{const{items:r,onSelectCard:n=()=>{},limit:o=2,isLoading:l=!1}=i,m=b.useDetectMobile(),d=a.useMemo(()=>t.jsx(t.Fragment,{children:m===!0?r==null?void 0:r.map((e,c)=>t.jsx(w,{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:()=>n(e)},c)):r==null?void 0:r.slice(0,o).map((e,c)=>t.jsx(w,{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:()=>n(e)},c))}),[r]);return t.jsx(x,{limit:o,children:t.jsx(v,{isLoading:l,limit:o,keyPrefix:"explore-landing",children:d})})});module.exports=C;
|
|
@@ -1,19 +1,19 @@
|
|
|
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 s, jsx as t, Fragment as g } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as h, Suspense as C, memo as S, useMemo as $ } from "react";
|
|
3
|
+
import { n as p } from "./emotion-styled.browser.esm-CjCaF13H.js";
|
|
4
|
+
import { M as u } from "./consts-C1uHV4xc.js";
|
|
5
|
+
import { u as w } from "./useDetectMobile-BC6EGaBc.js";
|
|
6
|
+
import { m as k, t as T } from "./utils-DtRLzzTZ.js";
|
|
7
|
+
import f from "./Button.js";
|
|
8
|
+
const M = p.div`
|
|
9
9
|
display: grid;
|
|
10
10
|
grid-template-columns: ${(i) => `repeat(${i.limit}, minmax(0, 1fr))`};
|
|
11
11
|
gap: 1.25rem;
|
|
12
12
|
|
|
13
|
-
@media (max-width: ${
|
|
13
|
+
@media (max-width: ${u + "px"}) {
|
|
14
14
|
grid-template-columns: repeat(1, 1fr);
|
|
15
15
|
}
|
|
16
|
-
`,
|
|
16
|
+
`, y = p.div`
|
|
17
17
|
display: flex;
|
|
18
18
|
width: 100%;
|
|
19
19
|
gap: 1.25rem;
|
|
@@ -42,11 +42,11 @@ const y = g.div`
|
|
|
42
42
|
min-height: 12.25rem;
|
|
43
43
|
min-width: 11.25rem;
|
|
44
44
|
max-width: 11.25rem;
|
|
45
|
-
background-color: ${
|
|
45
|
+
background-color: ${k("-90deg")};
|
|
46
46
|
border-radius: 0.75rem 0 0 0.75rem;
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
-
@media (max-width: ${
|
|
49
|
+
@media (max-width: ${u + "px"}) {
|
|
50
50
|
padding: 1rem;
|
|
51
51
|
column-gap: 1.5rem;
|
|
52
52
|
row-gap: 1rem;
|
|
@@ -72,7 +72,7 @@ const y = g.div`
|
|
|
72
72
|
margin-top: auto;
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
|
-
`,
|
|
75
|
+
`, v = p.div`
|
|
76
76
|
padding: 1rem;
|
|
77
77
|
display: flex;
|
|
78
78
|
flex-direction: column;
|
|
@@ -88,7 +88,7 @@ const y = g.div`
|
|
|
88
88
|
font-weight: 400;
|
|
89
89
|
font-size: 0.875rem;
|
|
90
90
|
color: var(--gray-700, #4e555f);
|
|
91
|
-
${
|
|
91
|
+
${T(3)}
|
|
92
92
|
}
|
|
93
93
|
|
|
94
94
|
& button {
|
|
@@ -99,57 +99,75 @@ const y = g.div`
|
|
|
99
99
|
& .skeleton-title {
|
|
100
100
|
height: 1.75rem;
|
|
101
101
|
width: 80%;
|
|
102
|
-
background-color: ${
|
|
102
|
+
background-color: ${k("-90deg")};
|
|
103
103
|
}
|
|
104
104
|
|
|
105
|
-
@media (max-width: ${
|
|
105
|
+
@media (max-width: ${u + "px"}) {
|
|
106
106
|
padding: 0;
|
|
107
107
|
}
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
/* @__PURE__ */
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
/* @__PURE__ */ l(b, { className: "blog-card", onClick: m, children: [
|
|
118
|
-
/* @__PURE__ */ t("img", { src: a }),
|
|
119
|
-
/* @__PURE__ */ l(w, { children: [
|
|
120
|
-
/* @__PURE__ */ t("div", { className: "text-wr-title", children: r }),
|
|
121
|
-
/* @__PURE__ */ t("div", { className: "text-wr", children: n }),
|
|
122
|
-
o !== !0 && /* @__PURE__ */ t(
|
|
123
|
-
s,
|
|
124
|
-
{
|
|
125
|
-
type: "button",
|
|
126
|
-
btnType: "outline",
|
|
127
|
-
size: "medium",
|
|
128
|
-
color: "gray",
|
|
129
|
-
onClick: m,
|
|
130
|
-
children: e
|
|
131
|
-
}
|
|
132
|
-
)
|
|
133
|
-
] }),
|
|
134
|
-
o === !0 && /* @__PURE__ */ t(
|
|
135
|
-
s,
|
|
108
|
+
`, N = h((i, m) => {
|
|
109
|
+
const { title: r, image: a, text: o, onCardClick: n, buttonText: l } = i, d = w();
|
|
110
|
+
return /* @__PURE__ */ s(y, { className: "blog-card", onClick: n, children: [
|
|
111
|
+
/* @__PURE__ */ t("img", { src: a }),
|
|
112
|
+
/* @__PURE__ */ s(v, { children: [
|
|
113
|
+
/* @__PURE__ */ t("div", { className: "text-wr-title", children: r }),
|
|
114
|
+
/* @__PURE__ */ t("div", { className: "text-wr", children: o }),
|
|
115
|
+
d !== !0 && /* @__PURE__ */ t(
|
|
116
|
+
f,
|
|
136
117
|
{
|
|
137
|
-
className: "action",
|
|
138
118
|
type: "button",
|
|
139
119
|
btnType: "outline",
|
|
140
120
|
size: "medium",
|
|
141
121
|
color: "gray",
|
|
142
|
-
onClick:
|
|
143
|
-
children:
|
|
122
|
+
onClick: n,
|
|
123
|
+
children: l
|
|
144
124
|
}
|
|
145
125
|
)
|
|
146
|
-
] })
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
126
|
+
] }),
|
|
127
|
+
d === !0 && /* @__PURE__ */ t(
|
|
128
|
+
f,
|
|
129
|
+
{
|
|
130
|
+
className: "action",
|
|
131
|
+
type: "button",
|
|
132
|
+
btnType: "outline",
|
|
133
|
+
size: "medium",
|
|
134
|
+
color: "gray",
|
|
135
|
+
onClick: n,
|
|
136
|
+
children: l
|
|
137
|
+
}
|
|
138
|
+
)
|
|
139
|
+
] });
|
|
140
|
+
}), z = h(({}, i) => /* @__PURE__ */ s(y, { className: "blog-card", children: [
|
|
141
|
+
/* @__PURE__ */ t("div", { className: "skeleton-img" }),
|
|
142
|
+
/* @__PURE__ */ t(v, { children: /* @__PURE__ */ t("div", { className: "skeleton-title" }) })
|
|
143
|
+
] })), B = ({ limit: i = 2, isLoading: m = !1, keyPrefix: r }) => /* @__PURE__ */ t(g, { children: Array.from({ length: i }, (a, o) => /* @__PURE__ */ t(
|
|
144
|
+
z,
|
|
145
|
+
{
|
|
146
|
+
isLoading: m
|
|
147
|
+
},
|
|
148
|
+
`${r}-skeleton-product-card-${o}`
|
|
149
|
+
)) }), L = ({
|
|
150
|
+
children: i,
|
|
151
|
+
fallbackComponent: m = /* @__PURE__ */ t(g, {}),
|
|
152
|
+
isLoading: r = !1,
|
|
153
|
+
limit: a,
|
|
154
|
+
keyPrefix: o
|
|
155
|
+
}) => /* @__PURE__ */ t(C, { fallbackComponent: m, children: r === !0 ? /* @__PURE__ */ t(
|
|
156
|
+
B,
|
|
157
|
+
{
|
|
158
|
+
isLoading: r,
|
|
159
|
+
limit: a,
|
|
160
|
+
keyPrefix: o
|
|
161
|
+
}
|
|
162
|
+
) : i }), b = S(N), G = h((i, m) => {
|
|
163
|
+
const {
|
|
164
|
+
items: r,
|
|
165
|
+
onSelectCard: a = () => {
|
|
166
|
+
},
|
|
167
|
+
limit: o = 2,
|
|
168
|
+
isLoading: n = !1
|
|
169
|
+
} = i, l = w(), d = $(() => /* @__PURE__ */ t(g, { children: l === !0 ? r == null ? void 0 : r.map((e, c) => /* @__PURE__ */ t(
|
|
170
|
+
b,
|
|
153
171
|
{
|
|
154
172
|
title: e == null ? void 0 : e.title,
|
|
155
173
|
image: e == null ? void 0 : e.image,
|
|
@@ -158,9 +176,9 @@ const p = d((i, f) => {
|
|
|
158
176
|
buttonText: e == null ? void 0 : e.buttonText,
|
|
159
177
|
onCardClick: () => a(e)
|
|
160
178
|
},
|
|
161
|
-
|
|
162
|
-
)) : r == null ? void 0 : r.slice(0,
|
|
163
|
-
|
|
179
|
+
c
|
|
180
|
+
)) : r == null ? void 0 : r.slice(0, o).map((e, c) => /* @__PURE__ */ t(
|
|
181
|
+
b,
|
|
164
182
|
{
|
|
165
183
|
title: e == null ? void 0 : e.title,
|
|
166
184
|
image: e == null ? void 0 : e.image,
|
|
@@ -169,9 +187,18 @@ const p = d((i, f) => {
|
|
|
169
187
|
buttonText: e == null ? void 0 : e.buttonText,
|
|
170
188
|
onCardClick: () => a(e)
|
|
171
189
|
},
|
|
172
|
-
|
|
173
|
-
)) });
|
|
190
|
+
c
|
|
191
|
+
)) }), [r]);
|
|
192
|
+
return /* @__PURE__ */ t(M, { limit: o, children: /* @__PURE__ */ t(
|
|
193
|
+
L,
|
|
194
|
+
{
|
|
195
|
+
isLoading: n,
|
|
196
|
+
limit: o,
|
|
197
|
+
keyPrefix: "explore-landing",
|
|
198
|
+
children: d
|
|
199
|
+
}
|
|
200
|
+
) });
|
|
174
201
|
});
|
|
175
202
|
export {
|
|
176
|
-
|
|
203
|
+
G as default
|
|
177
204
|
};
|