@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,9 +1,9 @@
|
|
|
1
|
-
"use strict";const
|
|
1
|
+
"use strict";const e=require("react/jsx-runtime"),c=require("react"),p=require("./emotion-styled.browser.esm-Cle7tAM9.cjs"),f=require("./consts-CtNoHdBj.cjs"),S=require("./useDetectMobile-D6d5LpdL.cjs"),d=require("./utils-NZLCh-J5.cjs"),k=require("./style-BR3tIhP1.cjs"),x=require("./Button.cjs"),C=p.newStyled.div`
|
|
2
2
|
display: grid;
|
|
3
|
-
grid-template-columns: ${
|
|
3
|
+
grid-template-columns: ${i=>"repeat(6, minmax(0, 1fr))"};
|
|
4
4
|
gap: 2rem;
|
|
5
5
|
|
|
6
|
-
@media (max-width: ${
|
|
6
|
+
@media (max-width: ${f.MOBILE_SIZE_PX+"px"}) {
|
|
7
7
|
display: flex;
|
|
8
8
|
gap: 1rem;
|
|
9
9
|
overflow-x: auto;
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
/* Safari and Chrome */
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
|
-
`,
|
|
25
|
+
`,w=p.newStyled.div`
|
|
26
26
|
display: flex;
|
|
27
27
|
flex-direction: column;
|
|
28
28
|
gap: 0;
|
|
@@ -47,11 +47,11 @@
|
|
|
47
47
|
|
|
48
48
|
& .card-content {
|
|
49
49
|
padding: 0.75rem;
|
|
50
|
-
${
|
|
50
|
+
${d.truncateTextInRows(2)}
|
|
51
51
|
}
|
|
52
52
|
|
|
53
53
|
& .card-content-2 {
|
|
54
|
-
${
|
|
54
|
+
${d.truncateTextInRows(2)}
|
|
55
55
|
}
|
|
56
56
|
|
|
57
57
|
& img {
|
|
@@ -65,10 +65,10 @@
|
|
|
65
65
|
width: 100%;
|
|
66
66
|
min-height: 8.25rem;
|
|
67
67
|
max-height: 8.25rem;
|
|
68
|
-
${
|
|
68
|
+
${d.linearGradientAnimation("-90deg")}
|
|
69
69
|
}
|
|
70
70
|
|
|
71
|
-
@media (max-width: ${
|
|
71
|
+
@media (max-width: ${f.MOBILE_SIZE_PX+"px"}) {
|
|
72
72
|
min-width: 8.75rem;
|
|
73
73
|
max-width: 8.75rem;
|
|
74
74
|
|
|
@@ -78,4 +78,4 @@
|
|
|
78
78
|
max-height: 5.375rem;
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
|
-
`,
|
|
81
|
+
`,N=c.forwardRef((i,a)=>{const{uuid:n,image:o,name:t,onSelectCard:l=()=>{}}=i;return e.jsxs(w,{className:"simple-category-card",onClick:()=>l(n),children:[e.jsx("img",{src:o}),e.jsx("div",{className:"card-content",children:e.jsx("div",{className:"card-content-2",children:t})})]})}),R=c.forwardRef(({},i)=>e.jsxs(w,{className:"simple-category-card",children:[e.jsx("div",{className:"skeleton-img"}),e.jsx("div",{className:"card-content"})]})),q=({limit:i=12,isLoading:a=!1,keyPrefix:n})=>e.jsx(e.Fragment,{children:Array.from({length:i},(o,t)=>e.jsx(R,{isLoading:a},`${n}-skeleton-category-card-${t}`))}),$=({children:i,fallbackComponent:a=e.jsx(e.Fragment,{}),isLoading:n=!1,limit:o,keyPrefix:t})=>e.jsx(c.Suspense,{fallbackComponent:a,children:n===!0?e.jsx(q,{isLoading:n,limit:o,keyPrefix:t}):i}),h=c.memo(N),E=c.forwardRef((i,a)=>{const{icon:n,title:o="Shop by category",items:t,buttonText:l,buttonLink:g,limit:m=12,onButtonAction:y=()=>{},onSelectCard:s=()=>{},isLoading:b=!1}=i,j=S.useDetectMobile(),v=c.useMemo(()=>e.jsx(e.Fragment,{children:j===!0?t==null?void 0:t.map((r,u)=>e.jsx(h,{uuid:r==null?void 0:r.uuid,image:r==null?void 0:r.image,name:r==null?void 0:r.name,onSelectCard:()=>s==null?void 0:s(r==null?void 0:r.uuid)},u)):t==null?void 0:t.slice(0,m).map((r,u)=>e.jsx(h,{uuid:r==null?void 0:r.uuid,image:r==null?void 0:r.image,name:r==null?void 0:r.name,onSelectCard:()=>s==null?void 0:s(r==null?void 0:r.uuid)},u))}),[t]);return e.jsxs(k.RegulatTitleSectionWrapper,{ref:a,children:[e.jsxs("div",{className:"regular-title",children:[e.jsxs("div",{className:"regular-title-text",children:[d.isDefinedNotEmptyString(n)&&e.jsx("i",{className:n}),e.jsx("span",{children:o})]}),d.isDefinedNotEmptyString(g)&&e.jsx(x,{type:"button",btnType:"tinted",color:"gray",onClick:()=>y(g),borderRadius:"curved",children:l})]}),e.jsx(C,{limit:m,children:e.jsx($,{isLoading:b,limit:m,keyPrefix:"explore-landing",children:v})})]})});module.exports=E;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { forwardRef as
|
|
1
|
+
import { jsxs as d, jsx as r, Fragment as p } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as g, Suspense as $, memo as R, useMemo as M } from "react";
|
|
3
3
|
import { n as b } from "./emotion-styled.browser.esm-CjCaF13H.js";
|
|
4
|
-
import { M as
|
|
5
|
-
import { u as
|
|
6
|
-
import { t as h, m as
|
|
7
|
-
import { R as
|
|
8
|
-
import
|
|
9
|
-
const
|
|
4
|
+
import { M as v } from "./consts-C1uHV4xc.js";
|
|
5
|
+
import { u as E } from "./useDetectMobile-BC6EGaBc.js";
|
|
6
|
+
import { t as h, m as I, k as f } from "./utils-DtRLzzTZ.js";
|
|
7
|
+
import { R as P } from "./style-6tSw9aqK.js";
|
|
8
|
+
import T from "./Button.js";
|
|
9
|
+
const j = b.div`
|
|
10
10
|
display: grid;
|
|
11
|
-
grid-template-columns: ${(
|
|
11
|
+
grid-template-columns: ${(t) => "repeat(6, minmax(0, 1fr))"};
|
|
12
12
|
gap: 2rem;
|
|
13
13
|
|
|
14
|
-
@media (max-width: ${
|
|
14
|
+
@media (max-width: ${v + "px"}) {
|
|
15
15
|
display: flex;
|
|
16
16
|
gap: 1rem;
|
|
17
17
|
overflow-x: auto;
|
|
@@ -30,7 +30,7 @@ const R = b.div`
|
|
|
30
30
|
/* Safari and Chrome */
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
|
-
`,
|
|
33
|
+
`, y = b.div`
|
|
34
34
|
display: flex;
|
|
35
35
|
flex-direction: column;
|
|
36
36
|
gap: 0;
|
|
@@ -73,10 +73,10 @@ const R = b.div`
|
|
|
73
73
|
width: 100%;
|
|
74
74
|
min-height: 8.25rem;
|
|
75
75
|
max-height: 8.25rem;
|
|
76
|
-
${
|
|
76
|
+
${I("-90deg")}
|
|
77
77
|
}
|
|
78
78
|
|
|
79
|
-
@media (max-width: ${
|
|
79
|
+
@media (max-width: ${v + "px"}) {
|
|
80
80
|
min-width: 8.75rem;
|
|
81
81
|
max-width: 8.75rem;
|
|
82
82
|
|
|
@@ -86,72 +86,103 @@ const R = b.div`
|
|
|
86
86
|
max-height: 5.375rem;
|
|
87
87
|
}
|
|
88
88
|
}
|
|
89
|
-
`,
|
|
90
|
-
const { uuid:
|
|
91
|
-
} } =
|
|
92
|
-
return /* @__PURE__ */
|
|
93
|
-
|
|
89
|
+
`, z = g((t, o) => {
|
|
90
|
+
const { uuid: a, image: n, name: i, onSelectCard: l = () => {
|
|
91
|
+
} } = t;
|
|
92
|
+
return /* @__PURE__ */ d(
|
|
93
|
+
y,
|
|
94
94
|
{
|
|
95
95
|
className: "simple-category-card",
|
|
96
|
-
onClick: () =>
|
|
96
|
+
onClick: () => l(a),
|
|
97
97
|
children: [
|
|
98
|
-
/* @__PURE__ */ r("img", { src:
|
|
98
|
+
/* @__PURE__ */ r("img", { src: n }),
|
|
99
99
|
/* @__PURE__ */ r("div", { className: "card-content", children: /* @__PURE__ */ r("div", { className: "card-content-2", children: i }) })
|
|
100
100
|
]
|
|
101
101
|
}
|
|
102
102
|
);
|
|
103
|
-
}),
|
|
103
|
+
}), A = g(({}, t) => /* @__PURE__ */ d(y, { className: "simple-category-card", children: [
|
|
104
|
+
/* @__PURE__ */ r("div", { className: "skeleton-img" }),
|
|
105
|
+
/* @__PURE__ */ r("div", { className: "card-content" })
|
|
106
|
+
] })), B = ({ limit: t = 12, isLoading: o = !1, keyPrefix: a }) => /* @__PURE__ */ r(p, { children: Array.from({ length: t }, (n, i) => /* @__PURE__ */ r(
|
|
107
|
+
A,
|
|
108
|
+
{
|
|
109
|
+
isLoading: o
|
|
110
|
+
},
|
|
111
|
+
`${a}-skeleton-category-card-${i}`
|
|
112
|
+
)) }), W = ({
|
|
113
|
+
children: t,
|
|
114
|
+
fallbackComponent: o = /* @__PURE__ */ r(p, {}),
|
|
115
|
+
isLoading: a = !1,
|
|
116
|
+
limit: n,
|
|
117
|
+
keyPrefix: i
|
|
118
|
+
}) => /* @__PURE__ */ r($, { fallbackComponent: o, children: a === !0 ? /* @__PURE__ */ r(
|
|
119
|
+
B,
|
|
120
|
+
{
|
|
121
|
+
isLoading: a,
|
|
122
|
+
limit: n,
|
|
123
|
+
keyPrefix: i
|
|
124
|
+
}
|
|
125
|
+
) : t }), w = R(z), q = g((t, o) => {
|
|
104
126
|
const {
|
|
105
|
-
icon:
|
|
106
|
-
title:
|
|
127
|
+
icon: a,
|
|
128
|
+
title: n = "Shop by category",
|
|
107
129
|
items: i,
|
|
108
|
-
buttonText:
|
|
109
|
-
buttonLink:
|
|
110
|
-
limit:
|
|
111
|
-
onButtonAction:
|
|
130
|
+
buttonText: l,
|
|
131
|
+
buttonLink: u,
|
|
132
|
+
limit: s = 12,
|
|
133
|
+
onButtonAction: k = () => {
|
|
112
134
|
},
|
|
113
|
-
onSelectCard:
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
135
|
+
onSelectCard: m = () => {
|
|
136
|
+
},
|
|
137
|
+
isLoading: S = !1
|
|
138
|
+
} = t, C = E(), N = M(() => /* @__PURE__ */ r(p, { children: C === !0 ? i == null ? void 0 : i.map((e, c) => /* @__PURE__ */ r(
|
|
139
|
+
w,
|
|
140
|
+
{
|
|
141
|
+
uuid: e == null ? void 0 : e.uuid,
|
|
142
|
+
image: e == null ? void 0 : e.image,
|
|
143
|
+
name: e == null ? void 0 : e.name,
|
|
144
|
+
onSelectCard: () => m == null ? void 0 : m(e == null ? void 0 : e.uuid)
|
|
145
|
+
},
|
|
146
|
+
c
|
|
147
|
+
)) : i == null ? void 0 : i.slice(0, s).map((e, c) => /* @__PURE__ */ r(
|
|
148
|
+
w,
|
|
149
|
+
{
|
|
150
|
+
uuid: e == null ? void 0 : e.uuid,
|
|
151
|
+
image: e == null ? void 0 : e.image,
|
|
152
|
+
name: e == null ? void 0 : e.name,
|
|
153
|
+
onSelectCard: () => m == null ? void 0 : m(e == null ? void 0 : e.uuid)
|
|
154
|
+
},
|
|
155
|
+
c
|
|
156
|
+
)) }), [i]);
|
|
157
|
+
return /* @__PURE__ */ d(P, { ref: o, children: [
|
|
158
|
+
/* @__PURE__ */ d("div", { className: "regular-title", children: [
|
|
159
|
+
/* @__PURE__ */ d("div", { className: "regular-title-text", children: [
|
|
160
|
+
f(a) && /* @__PURE__ */ r("i", { className: a }),
|
|
161
|
+
/* @__PURE__ */ r("span", { children: n })
|
|
121
162
|
] }),
|
|
122
|
-
|
|
123
|
-
|
|
163
|
+
f(u) && /* @__PURE__ */ r(
|
|
164
|
+
T,
|
|
124
165
|
{
|
|
125
166
|
type: "button",
|
|
126
167
|
btnType: "tinted",
|
|
127
168
|
color: "gray",
|
|
128
|
-
onClick: () =>
|
|
169
|
+
onClick: () => k(u),
|
|
129
170
|
borderRadius: "curved",
|
|
130
|
-
children:
|
|
171
|
+
children: l
|
|
131
172
|
}
|
|
132
173
|
)
|
|
133
174
|
] }),
|
|
134
|
-
/* @__PURE__ */ r(
|
|
135
|
-
|
|
136
|
-
{
|
|
137
|
-
uuid: e == null ? void 0 : e.uuid,
|
|
138
|
-
image: e == null ? void 0 : e.image,
|
|
139
|
-
name: e == null ? void 0 : e.name,
|
|
140
|
-
onSelectCard: () => t == null ? void 0 : t(e == null ? void 0 : e.uuid)
|
|
141
|
-
},
|
|
142
|
-
l
|
|
143
|
-
)) : i == null ? void 0 : i.slice(0, p).map((e, l) => /* @__PURE__ */ r(
|
|
144
|
-
u,
|
|
175
|
+
/* @__PURE__ */ r(j, { limit: s, children: /* @__PURE__ */ r(
|
|
176
|
+
W,
|
|
145
177
|
{
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
)) })
|
|
178
|
+
isLoading: S,
|
|
179
|
+
limit: s,
|
|
180
|
+
keyPrefix: "explore-landing",
|
|
181
|
+
children: N
|
|
182
|
+
}
|
|
183
|
+
) })
|
|
153
184
|
] });
|
|
154
185
|
});
|
|
155
186
|
export {
|
|
156
|
-
|
|
187
|
+
q as default
|
|
157
188
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const r=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";const r=require("react/jsx-runtime"),o=require("react"),k=require("./emotion-styled.browser.esm-Cle7tAM9.cjs"),y=require("./consts-CtNoHdBj.cjs"),P=require("./useDetectMobile-D6d5LpdL.cjs"),g=require("./index-_Db92CJE.cjs"),q=require("./index-Dit169OA.cjs"),M=k.newStyled.div`
|
|
2
2
|
display: grid;
|
|
3
3
|
grid-template-columns: repeat(6, 1fr);
|
|
4
4
|
gap: 1.25rem;
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
margin: auto;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
@media (max-width: ${
|
|
12
|
+
@media (max-width: ${y.MOBILE_SIZE_PX+"px"}) {
|
|
13
13
|
grid-template-columns: repeat(2, 1fr);
|
|
14
14
|
|
|
15
15
|
& .text-block-v1 {
|
|
@@ -28,4 +28,4 @@
|
|
|
28
28
|
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
|
-
`,
|
|
31
|
+
`,_=o.forwardRef((i,s)=>r.jsx(g.SkeletonWrapper,{})),v=({limit:i=6,isLoading:s=!1,keyPrefix:n})=>r.jsx(r.Fragment,{children:Array.from({length:i},(d,c)=>r.jsx(_,{isLoading:s},`${n}-skeleton-product-card-${c}`))}),R=({children:i,fallbackComponent:s=r.jsx(r.Fragment,{}),isLoading:n=!1,limit:d,keyPrefix:c})=>r.jsx(o.Suspense,{fallbackComponent:s,children:n===!0?r.jsx(v,{isLoading:n,limit:d,keyPrefix:c}):i}),p=o.memo(g.SimpleProductCard),U=o.forwardRef((i,s)=>{const{title:n,subtitle:d,description:c,buttonText:j,buttonLink:f,items:t,onButtonAction:h=()=>{},onSelectCard:u=()=>{},isLoading:S=!1,limit:a=6}=i,w=P.useDetectMobile(),b=o.useMemo(()=>{var m;return r.jsx(r.Fragment,{children:w===!0?(m=t==null?void 0:t.slice(0,4))==null?void 0:m.map((e,l)=>r.jsx(p,{title:e==null?void 0:e.title,price:e==null?void 0:e.price,currency:e==null?void 0:e.currency,image:e==null?void 0:e.image,sellerUuid:e==null?void 0:e.sellerUuid,uuid:e==null?void 0:e.uuid,onSelectCard:()=>u==null?void 0:u(e==null?void 0:e.uuid)},l)):t==null?void 0:t.map((e,l)=>r.jsx(p,{title:e==null?void 0:e.title,price:e==null?void 0:e.price,currency:e==null?void 0:e.currency,image:e==null?void 0:e.image,sellerUuid:e==null?void 0:e.sellerUuid,uuid:e==null?void 0:e.uuid,onSelectCard:()=>u==null?void 0:u(e==null?void 0:e.uuid)},l))})},[t]);return r.jsxs(M,{ref:s,limit:a,children:[r.jsx(q.TextBlockV1,{subtitle:d,title:n,description:c,buttonText:j,buttonLink:f,onButtonAction:h,className:"text-block-v1"}),r.jsx(R,{isLoading:S,limit:a,keyPrefix:"explore-landing",children:b})]})});module.exports=U;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { n as
|
|
4
|
-
import { M as
|
|
5
|
-
import { u as
|
|
6
|
-
import { S as
|
|
7
|
-
import { T as
|
|
8
|
-
const
|
|
1
|
+
import { jsx as r, Fragment as m, jsxs as b } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as f, Suspense as y, memo as M, useMemo as v } from "react";
|
|
3
|
+
import { n as U } from "./emotion-styled.browser.esm-CjCaF13H.js";
|
|
4
|
+
import { M as B } from "./consts-C1uHV4xc.js";
|
|
5
|
+
import { u as C } from "./useDetectMobile-BC6EGaBc.js";
|
|
6
|
+
import { S as T, a as _ } from "./index-BN8qgFbe.js";
|
|
7
|
+
import { T as $ } from "./index-DxdBg_r_.js";
|
|
8
|
+
const j = U.div`
|
|
9
9
|
display: grid;
|
|
10
10
|
grid-template-columns: repeat(6, 1fr);
|
|
11
11
|
gap: 1.25rem;
|
|
@@ -16,7 +16,7 @@ const v = h.div`
|
|
|
16
16
|
margin: auto;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
@media (max-width: ${
|
|
19
|
+
@media (max-width: ${B + "px"}) {
|
|
20
20
|
grid-template-columns: repeat(2, 1fr);
|
|
21
21
|
|
|
22
22
|
& .text-block-v1 {
|
|
@@ -35,60 +35,91 @@ const v = h.div`
|
|
|
35
35
|
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
|
-
`,
|
|
39
|
-
|
|
38
|
+
`, z = f((i, o) => /* @__PURE__ */ r(T, {})), A = ({ limit: i = 6, isLoading: o = !1, keyPrefix: u }) => /* @__PURE__ */ r(m, { children: Array.from({ length: i }, (l, d) => /* @__PURE__ */ r(
|
|
39
|
+
z,
|
|
40
|
+
{
|
|
41
|
+
isLoading: o
|
|
42
|
+
},
|
|
43
|
+
`${u}-skeleton-product-card-${d}`
|
|
44
|
+
)) }), E = ({
|
|
45
|
+
children: i,
|
|
46
|
+
fallbackComponent: o = /* @__PURE__ */ r(m, {}),
|
|
47
|
+
isLoading: u = !1,
|
|
48
|
+
limit: l,
|
|
49
|
+
keyPrefix: d
|
|
50
|
+
}) => /* @__PURE__ */ r(y, { fallbackComponent: o, children: u === !0 ? /* @__PURE__ */ r(
|
|
51
|
+
A,
|
|
52
|
+
{
|
|
53
|
+
isLoading: u,
|
|
54
|
+
limit: l,
|
|
55
|
+
keyPrefix: d
|
|
56
|
+
}
|
|
57
|
+
) : i }), p = M(_), O = f((i, o) => {
|
|
40
58
|
const {
|
|
41
|
-
title:
|
|
42
|
-
subtitle:
|
|
43
|
-
description:
|
|
44
|
-
buttonText:
|
|
45
|
-
buttonLink:
|
|
46
|
-
items:
|
|
47
|
-
onButtonAction:
|
|
59
|
+
title: u,
|
|
60
|
+
subtitle: l,
|
|
61
|
+
description: d,
|
|
62
|
+
buttonText: g,
|
|
63
|
+
buttonLink: h,
|
|
64
|
+
items: t,
|
|
65
|
+
onButtonAction: S = () => {
|
|
48
66
|
},
|
|
49
|
-
onSelectCard:
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
67
|
+
onSelectCard: n = () => {
|
|
68
|
+
},
|
|
69
|
+
isLoading: k = !1,
|
|
70
|
+
limit: s = 6
|
|
71
|
+
} = i, w = C(), P = v(() => {
|
|
72
|
+
var a;
|
|
73
|
+
return /* @__PURE__ */ r(m, { children: w === !0 ? (a = t == null ? void 0 : t.slice(0, 4)) == null ? void 0 : a.map((e, c) => /* @__PURE__ */ r(
|
|
74
|
+
p,
|
|
55
75
|
{
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
76
|
+
title: e == null ? void 0 : e.title,
|
|
77
|
+
price: e == null ? void 0 : e.price,
|
|
78
|
+
currency: e == null ? void 0 : e.currency,
|
|
79
|
+
image: e == null ? void 0 : e.image,
|
|
80
|
+
sellerUuid: e == null ? void 0 : e.sellerUuid,
|
|
81
|
+
uuid: e == null ? void 0 : e.uuid,
|
|
82
|
+
onSelectCard: () => n == null ? void 0 : n(e == null ? void 0 : e.uuid)
|
|
83
|
+
},
|
|
84
|
+
c
|
|
85
|
+
)) : t == null ? void 0 : t.map((e, c) => /* @__PURE__ */ r(
|
|
86
|
+
p,
|
|
87
|
+
{
|
|
88
|
+
title: e == null ? void 0 : e.title,
|
|
89
|
+
price: e == null ? void 0 : e.price,
|
|
90
|
+
currency: e == null ? void 0 : e.currency,
|
|
91
|
+
image: e == null ? void 0 : e.image,
|
|
92
|
+
sellerUuid: e == null ? void 0 : e.sellerUuid,
|
|
93
|
+
uuid: e == null ? void 0 : e.uuid,
|
|
94
|
+
onSelectCard: () => n == null ? void 0 : n(e == null ? void 0 : e.uuid)
|
|
95
|
+
},
|
|
96
|
+
c
|
|
97
|
+
)) });
|
|
98
|
+
}, [t]);
|
|
99
|
+
return /* @__PURE__ */ b(j, { ref: o, limit: s, children: [
|
|
100
|
+
/* @__PURE__ */ r(
|
|
101
|
+
$,
|
|
102
|
+
{
|
|
103
|
+
subtitle: l,
|
|
104
|
+
title: u,
|
|
105
|
+
description: d,
|
|
106
|
+
buttonText: g,
|
|
107
|
+
buttonLink: h,
|
|
108
|
+
onButtonAction: S,
|
|
62
109
|
className: "text-block-v1"
|
|
63
110
|
}
|
|
64
111
|
),
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
{
|
|
68
|
-
title: t == null ? void 0 : t.title,
|
|
69
|
-
price: t == null ? void 0 : t.price,
|
|
70
|
-
currency: t == null ? void 0 : t.currency,
|
|
71
|
-
image: t == null ? void 0 : t.image,
|
|
72
|
-
sellerUuid: t == null ? void 0 : t.sellerUuid,
|
|
73
|
-
uuid: t == null ? void 0 : t.uuid,
|
|
74
|
-
onSelectCard: () => i == null ? void 0 : i(t == null ? void 0 : t.uuid)
|
|
75
|
-
},
|
|
76
|
-
r
|
|
77
|
-
)) : e == null ? void 0 : e.map((t, r) => /* @__PURE__ */ u(
|
|
78
|
-
m,
|
|
112
|
+
/* @__PURE__ */ r(
|
|
113
|
+
E,
|
|
79
114
|
{
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
onSelectCard: () => i == null ? void 0 : i(t == null ? void 0 : t.uuid)
|
|
87
|
-
},
|
|
88
|
-
r
|
|
89
|
-
))
|
|
115
|
+
isLoading: k,
|
|
116
|
+
limit: s,
|
|
117
|
+
keyPrefix: "explore-landing",
|
|
118
|
+
children: P
|
|
119
|
+
}
|
|
120
|
+
)
|
|
90
121
|
] });
|
|
91
122
|
});
|
|
92
123
|
export {
|
|
93
|
-
|
|
124
|
+
O as default
|
|
94
125
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
"use strict";const
|
|
1
|
+
"use strict";const t=require("react/jsx-runtime"),s=require("react"),j=require("./emotion-styled.browser.esm-Cle7tAM9.cjs"),k=require("./consts-CtNoHdBj.cjs"),v=require("./useDetectMobile-D6d5LpdL.cjs"),M=require("./Button.cjs"),p=require("./suspense-product-card-detailed-DtzOxHaH.cjs"),P=j.newStyled.div`
|
|
2
2
|
padding: 1.75rem 3rem;
|
|
3
3
|
display: grid;
|
|
4
|
-
grid-template-columns: ${
|
|
4
|
+
grid-template-columns: ${i=>`repeat(${i.limit||5}, minmax(0, 1fr))`};
|
|
5
5
|
|
|
6
6
|
gap: 2.97rem;
|
|
7
7
|
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
& .product-card {
|
|
37
|
-
max-width: ${
|
|
37
|
+
max-width: ${i=>`calc(${100/i.desktopCols}% - ${(i.desktopCols-1)*i.columnGapRem/i.desktopCols}rem)`};
|
|
38
38
|
|
|
39
39
|
animation-duration: 0.2s;
|
|
40
40
|
animation-name: animate-fade;
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
56
|
|
|
57
|
-
@media (max-width: ${
|
|
57
|
+
@media (max-width: ${k.MOBILE_SIZE_PX+"px"}) {
|
|
58
58
|
grid-template-columns: repeat(2, 1fr);
|
|
59
59
|
padding: 2rem 1.25rem;
|
|
60
60
|
gap: 1.19rem;
|
|
@@ -65,4 +65,4 @@
|
|
|
65
65
|
& .img-wrapper {
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
|
-
`,
|
|
68
|
+
`,u=s.memo(p.DetailedProductCard),q=s.forwardRef((i,g)=>{const{items:r,limit:a=5,limitMobile:d=6,onSelectCard:o=()=>{},title:f="Urgent sale",showLessText:h="Show less",showMoreText:w="Show more",isLoading:b=!1}=i,c=v.useDetectMobile(),[n,y]=s.useState(!1),S=s.useMemo(()=>{var m;return t.jsx(t.Fragment,{children:c===!0?(m=r==null?void 0:r.slice(0,n===!0?r==null?void 0:r.length:d))==null?void 0:m.map((e,l)=>t.jsx(u,{title:e==null?void 0:e.title,price:e==null?void 0:e.price,currency:e==null?void 0:e.currency,image:e==null?void 0:e.image,sellerUuid:e==null?void 0:e.sellerUuid,uuid:e==null?void 0:e.uuid,isSponsored:e==null?void 0:e.isSponsored,onSelectCard:()=>o==null?void 0:o(e==null?void 0:e.uuid)},l)):r==null?void 0:r.slice(0,a).map((e,l)=>t.jsx(u,{title:e==null?void 0:e.title,price:e==null?void 0:e.price,currency:e==null?void 0:e.currency,image:e==null?void 0:e.image,sellerUuid:e==null?void 0:e.sellerUuid,uuid:e==null?void 0:e.uuid,location:e==null?void 0:e.location,isSponsored:e==null?void 0:e.isSponsored,onSelectCard:()=>o==null?void 0:o(e==null?void 0:e.uuid)},l))})},[r]);return t.jsxs(P,{ref:g,limit:a,children:[t.jsxs("div",{className:"urgent-tag",children:[t.jsx("i",{className:"mng mng-lnc-bolt-filled"}),t.jsx("span",{children:f})]}),t.jsx(p.SuspenseDetailedProductCard,{isLoading:b,limit:a,keyPrefix:"explore-landing",children:S}),c===!0&&d<(r==null?void 0:r.length)&&t.jsx(M,{className:"show-more",btnType:"basic",type:"button",color:"gray",onClick:()=>y(!n),children:n===!0?h:w})]})});module.exports=q;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { n as
|
|
4
|
-
import { M as
|
|
5
|
-
import { u as
|
|
6
|
-
import
|
|
7
|
-
import { D as
|
|
8
|
-
const
|
|
1
|
+
import { jsx as o, Fragment as S, jsxs as c } from "react/jsx-runtime";
|
|
2
|
+
import { memo as k, forwardRef as v, useState as M, useMemo as P } from "react";
|
|
3
|
+
import { n as C } from "./emotion-styled.browser.esm-CjCaF13H.js";
|
|
4
|
+
import { M as U } from "./consts-C1uHV4xc.js";
|
|
5
|
+
import { u as $ } from "./useDetectMobile-BC6EGaBc.js";
|
|
6
|
+
import D from "./Button.js";
|
|
7
|
+
import { D as j, S as z } from "./suspense-product-card-detailed-BETmfKMT.js";
|
|
8
|
+
const L = C.div`
|
|
9
9
|
padding: 1.75rem 3rem;
|
|
10
10
|
display: grid;
|
|
11
11
|
grid-template-columns: ${(i) => `repeat(${i.limit || 5}, minmax(0, 1fr))`};
|
|
@@ -61,7 +61,7 @@ const U = S.div`
|
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
-
@media (max-width: ${
|
|
64
|
+
@media (max-width: ${U + "px"}) {
|
|
65
65
|
grid-template-columns: repeat(2, 1fr);
|
|
66
66
|
padding: 2rem 1.25rem;
|
|
67
67
|
gap: 1.19rem;
|
|
@@ -72,24 +72,20 @@ const U = S.div`
|
|
|
72
72
|
& .img-wrapper {
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
|
-
`,
|
|
76
|
-
var d;
|
|
75
|
+
`, u = k(j), R = v((i, p) => {
|
|
77
76
|
const {
|
|
78
77
|
items: r,
|
|
79
|
-
limit:
|
|
80
|
-
limitMobile:
|
|
78
|
+
limit: a = 5,
|
|
79
|
+
limitMobile: l = 6,
|
|
81
80
|
onSelectCard: t = () => {
|
|
82
81
|
},
|
|
83
82
|
title: g = "Urgent sale",
|
|
84
83
|
showLessText: f = "Show less",
|
|
85
|
-
showMoreText: h = "Show more"
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
/* @__PURE__ */ o("span", { children: g })
|
|
91
|
-
] }),
|
|
92
|
-
m === !0 ? (d = r == null ? void 0 : r.slice(0, a === !0 ? r == null ? void 0 : r.length : s)) == null ? void 0 : d.map((e, l) => /* @__PURE__ */ o(
|
|
84
|
+
showMoreText: h = "Show more",
|
|
85
|
+
isLoading: w = !1
|
|
86
|
+
} = i, d = $(), [n, b] = M(!1), y = P(() => {
|
|
87
|
+
var m;
|
|
88
|
+
return /* @__PURE__ */ o(S, { children: d === !0 ? (m = r == null ? void 0 : r.slice(0, n === !0 ? r == null ? void 0 : r.length : l)) == null ? void 0 : m.map((e, s) => /* @__PURE__ */ o(
|
|
93
89
|
u,
|
|
94
90
|
{
|
|
95
91
|
title: e == null ? void 0 : e.title,
|
|
@@ -101,8 +97,8 @@ const U = S.div`
|
|
|
101
97
|
isSponsored: e == null ? void 0 : e.isSponsored,
|
|
102
98
|
onSelectCard: () => t == null ? void 0 : t(e == null ? void 0 : e.uuid)
|
|
103
99
|
},
|
|
104
|
-
|
|
105
|
-
)) : r == null ? void 0 : r.slice(0,
|
|
100
|
+
s
|
|
101
|
+
)) : r == null ? void 0 : r.slice(0, a).map((e, s) => /* @__PURE__ */ o(
|
|
106
102
|
u,
|
|
107
103
|
{
|
|
108
104
|
title: e == null ? void 0 : e.title,
|
|
@@ -115,21 +111,36 @@ const U = S.div`
|
|
|
115
111
|
isSponsored: e == null ? void 0 : e.isSponsored,
|
|
116
112
|
onSelectCard: () => t == null ? void 0 : t(e == null ? void 0 : e.uuid)
|
|
117
113
|
},
|
|
118
|
-
|
|
119
|
-
))
|
|
120
|
-
|
|
121
|
-
|
|
114
|
+
s
|
|
115
|
+
)) });
|
|
116
|
+
}, [r]);
|
|
117
|
+
return /* @__PURE__ */ c(L, { ref: p, limit: a, children: [
|
|
118
|
+
/* @__PURE__ */ c("div", { className: "urgent-tag", children: [
|
|
119
|
+
/* @__PURE__ */ o("i", { className: "mng mng-lnc-bolt-filled" }),
|
|
120
|
+
/* @__PURE__ */ o("span", { children: g })
|
|
121
|
+
] }),
|
|
122
|
+
/* @__PURE__ */ o(
|
|
123
|
+
z,
|
|
124
|
+
{
|
|
125
|
+
isLoading: w,
|
|
126
|
+
limit: a,
|
|
127
|
+
keyPrefix: "explore-landing",
|
|
128
|
+
children: y
|
|
129
|
+
}
|
|
130
|
+
),
|
|
131
|
+
d === !0 && l < (r == null ? void 0 : r.length) && /* @__PURE__ */ o(
|
|
132
|
+
D,
|
|
122
133
|
{
|
|
123
134
|
className: "show-more",
|
|
124
135
|
btnType: "basic",
|
|
125
136
|
type: "button",
|
|
126
137
|
color: "gray",
|
|
127
|
-
onClick: () =>
|
|
128
|
-
children:
|
|
138
|
+
onClick: () => b(!n),
|
|
139
|
+
children: n === !0 ? f : h
|
|
129
140
|
}
|
|
130
141
|
)
|
|
131
142
|
] });
|
|
132
143
|
});
|
|
133
144
|
export {
|
|
134
|
-
|
|
145
|
+
R as default
|
|
135
146
|
};
|