@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,183 +1,174 @@
|
|
|
1
|
-
import { jsx as r, Fragment as
|
|
2
|
-
import { forwardRef as p } from "react";
|
|
3
|
-
import
|
|
4
|
-
import { useTheme as x } from "./ThemeProvider.js";
|
|
5
|
-
import { n as m } from "./emotion-styled.browser.esm-CjCaF13H.js";
|
|
6
|
-
import { m as i, t as s } from "./utils-DtRLzzTZ.js";
|
|
1
|
+
import { jsx as r, Fragment as d, jsxs as c } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as p, Suspense as f, memo as x, useMemo as v } from "react";
|
|
3
|
+
import { n as g } from "./emotion-styled.browser.esm-CjCaF13H.js";
|
|
7
4
|
import { M as h } from "./consts-C1uHV4xc.js";
|
|
8
|
-
import { R as
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
5
|
+
import { R as y } from "./style-CiePxaJ_.js";
|
|
6
|
+
import { t as w, m as k } from "./utils-DtRLzzTZ.js";
|
|
7
|
+
import $ from "./Button.js";
|
|
8
|
+
import { useTheme as b } from "./ThemeProvider.js";
|
|
9
|
+
const N = g.div`
|
|
10
|
+
display: grid;
|
|
11
|
+
grid-template-columns: ${(t) => `repeat(${t.limit}, 1fr)`};
|
|
12
|
+
gap: 1.25rem;
|
|
13
|
+
justify-items: center;
|
|
14
|
+
|
|
15
|
+
@media (max-width: ${h + "px"}) {
|
|
16
|
+
display: flex;
|
|
17
|
+
flex-direction: column;
|
|
18
|
+
gap: 1rem;
|
|
19
|
+
}
|
|
20
|
+
`, m = g.div`
|
|
21
|
+
width: 100%;
|
|
22
|
+
overflow: hidden;
|
|
14
23
|
position: relative;
|
|
15
|
-
max-height: 28.75rem;
|
|
16
24
|
|
|
17
|
-
|
|
18
|
-
|
|
25
|
+
border-radius: 0.75rem;
|
|
26
|
+
background: ${(t) => t == null ? void 0 : t.overlay};
|
|
27
|
+
cursor: pointer;
|
|
19
28
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
& .content-wrapper {
|
|
30
|
+
position: absolute;
|
|
31
|
+
right: 0;
|
|
32
|
+
top: 0;
|
|
33
|
+
padding: 2.25rem;
|
|
34
|
+
display: flex;
|
|
35
|
+
flex-direction: column;
|
|
36
|
+
gap: 1rem;
|
|
37
|
+
justify-content: space-between;
|
|
38
|
+
height: 100%;
|
|
39
|
+
width: 100%;
|
|
31
40
|
}
|
|
32
41
|
|
|
33
|
-
&
|
|
34
|
-
|
|
35
|
-
|
|
42
|
+
& button {
|
|
43
|
+
width: fit-content;
|
|
44
|
+
color: var(--gray-950, #14161a);
|
|
36
45
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
background-color: ${i("-90deg")};
|
|
46
|
+
&:hover {
|
|
47
|
+
color: var(--gray-700, #4e555f);
|
|
48
|
+
}
|
|
41
49
|
}
|
|
42
50
|
|
|
43
|
-
& .
|
|
51
|
+
& .content-text {
|
|
44
52
|
display: flex;
|
|
45
53
|
flex-direction: column;
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
left: 0;
|
|
51
|
-
|
|
52
|
-
& .text__title {
|
|
53
|
-
color: var(--white);
|
|
54
|
-
font-size: 1rem;
|
|
55
|
-
font-style: normal;
|
|
56
|
-
font-weight: 500;
|
|
57
|
-
line-height: 1.5rem;
|
|
58
|
-
${s(2)}
|
|
59
|
-
}
|
|
54
|
+
gap: 1rem;
|
|
55
|
+
color: var(--white, #fff);
|
|
56
|
+
font-size: 1rem;
|
|
57
|
+
font-weight: 500;
|
|
60
58
|
|
|
61
|
-
& .
|
|
62
|
-
color: var(--white);
|
|
63
|
-
font-size: 1.375rem;
|
|
64
|
-
font-style: normal;
|
|
59
|
+
& .content-text-title {
|
|
65
60
|
font-weight: 600;
|
|
66
|
-
|
|
67
|
-
${s(2)}
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
& .text__title--skeleton {
|
|
71
|
-
background-color: ${i("-90deg")};
|
|
72
|
-
height: 1rem;
|
|
73
|
-
width: 9rem;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
& .text__description--skeleton {
|
|
77
|
-
background-color: ${i("-90deg")};
|
|
78
|
-
height: 1rem;
|
|
79
|
-
width: 12rem;
|
|
61
|
+
${w(2)}
|
|
80
62
|
}
|
|
81
63
|
}
|
|
82
64
|
|
|
83
|
-
&
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
left: 1rem;
|
|
89
|
-
|
|
90
|
-
&:hover {
|
|
91
|
-
background: var(--primary-500, #f59e0b);
|
|
92
|
-
color: var(--white);
|
|
93
|
-
}
|
|
65
|
+
& img {
|
|
66
|
+
aspect-ratio: 1 / 1;
|
|
67
|
+
mix-blend-mode: multiply;
|
|
68
|
+
width: 100%;
|
|
69
|
+
object-fit: cover;
|
|
94
70
|
}
|
|
95
71
|
|
|
96
|
-
& .
|
|
97
|
-
background-color: ${
|
|
98
|
-
height:
|
|
99
|
-
width: 9rem;
|
|
100
|
-
position: absolute;
|
|
101
|
-
bottom: 1rem;
|
|
102
|
-
left: 1rem;
|
|
72
|
+
& .img-skeleton {
|
|
73
|
+
background-color: ${k("-90deg")};
|
|
74
|
+
min-height: 28.75rem;
|
|
103
75
|
}
|
|
104
76
|
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
& .wrapper__overlay {
|
|
109
|
-
&::after {
|
|
110
|
-
max-height: 100%;
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
& .wrapper__text {
|
|
115
|
-
top: 1rem;
|
|
116
|
-
left: 1rem;
|
|
77
|
+
&:hover {
|
|
78
|
+
& .content-text {
|
|
79
|
+
color: var(--primary-500, #f59e0b);
|
|
117
80
|
}
|
|
81
|
+
}
|
|
118
82
|
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
83
|
+
@media (max-width: ${h + "px"}) {
|
|
84
|
+
& img,
|
|
85
|
+
.img.skeleton {
|
|
86
|
+
aspect-ratio: unset;
|
|
87
|
+
min-height: 28.75rem;
|
|
88
|
+
max-height: 28.75rem;
|
|
122
89
|
}
|
|
123
90
|
}
|
|
124
|
-
`,
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
/* @__PURE__ */ r(
|
|
143
|
-
f,
|
|
144
|
-
{
|
|
145
|
-
text: c,
|
|
146
|
-
onClick: o,
|
|
147
|
-
className: "text__action"
|
|
148
|
-
}
|
|
149
|
-
)
|
|
150
|
-
] }) });
|
|
91
|
+
`, P = p(({}, t) => /* @__PURE__ */ r(m, { ref: t, children: /* @__PURE__ */ r("div", { className: "img-skeleton" }) })), S = ({ limit: t = 2, isLoading: n = !1, keyPrefix: o }) => /* @__PURE__ */ r(d, { children: Array.from({ length: t }, (a, l) => /* @__PURE__ */ r(
|
|
92
|
+
P,
|
|
93
|
+
{
|
|
94
|
+
isLoading: n
|
|
95
|
+
},
|
|
96
|
+
`${o}-skeleton-product-card-${l}`
|
|
97
|
+
)) }), _ = ({
|
|
98
|
+
children: t,
|
|
99
|
+
fallbackComponent: n = /* @__PURE__ */ r(d, {}),
|
|
100
|
+
isLoading: o = !1,
|
|
101
|
+
limit: a,
|
|
102
|
+
keyPrefix: l
|
|
103
|
+
}) => /* @__PURE__ */ r(f, { fallbackComponent: n, children: o === !0 ? /* @__PURE__ */ r(
|
|
104
|
+
S,
|
|
105
|
+
{
|
|
106
|
+
isLoading: o,
|
|
107
|
+
limit: a,
|
|
108
|
+
keyPrefix: l
|
|
151
109
|
}
|
|
152
|
-
),
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
110
|
+
) : t }), C = p(
|
|
111
|
+
({ title: t, image: n, overlay: o, description: a, actionText: l, handleClick: i = () => {
|
|
112
|
+
} }, s) => {
|
|
113
|
+
const { theme: e } = b();
|
|
114
|
+
return /* @__PURE__ */ r(d, { children: /* @__PURE__ */ c(
|
|
115
|
+
m,
|
|
116
|
+
{
|
|
117
|
+
ref: s,
|
|
118
|
+
theme: e,
|
|
119
|
+
overlay: o,
|
|
120
|
+
onClick: i,
|
|
121
|
+
children: [
|
|
122
|
+
/* @__PURE__ */ r("img", { src: n }),
|
|
123
|
+
/* @__PURE__ */ c("div", { className: "content-wrapper", children: [
|
|
124
|
+
/* @__PURE__ */ c("div", { className: "content-text", children: [
|
|
125
|
+
/* @__PURE__ */ r("div", { children: t }),
|
|
126
|
+
/* @__PURE__ */ r("div", { className: "content-text-title", children: a })
|
|
127
|
+
] }),
|
|
128
|
+
/* @__PURE__ */ r(
|
|
129
|
+
$,
|
|
130
|
+
{
|
|
131
|
+
text: l,
|
|
132
|
+
onClick: i,
|
|
133
|
+
className: "text__action",
|
|
134
|
+
size: "medium",
|
|
135
|
+
color: "gray"
|
|
136
|
+
}
|
|
137
|
+
)
|
|
138
|
+
] })
|
|
139
|
+
]
|
|
140
|
+
}
|
|
141
|
+
) });
|
|
162
142
|
}
|
|
163
|
-
|
|
164
|
-
({ title: t, items:
|
|
165
|
-
}
|
|
166
|
-
/* @__PURE__ */ r(
|
|
167
|
-
|
|
168
|
-
w,
|
|
143
|
+
), j = x(C), A = p(
|
|
144
|
+
({ title: t, items: n, limit: o = 2, onSelectCard: a = () => {
|
|
145
|
+
}, isLoading: l = !1 }, i) => {
|
|
146
|
+
const s = v(() => /* @__PURE__ */ r(d, { children: n && (n == null ? void 0 : n.map((e, u) => /* @__PURE__ */ r(
|
|
147
|
+
j,
|
|
169
148
|
{
|
|
170
149
|
title: e == null ? void 0 : e.title,
|
|
171
150
|
image: e == null ? void 0 : e.image,
|
|
172
151
|
description: e == null ? void 0 : e.description,
|
|
173
152
|
actionText: e == null ? void 0 : e.actionText,
|
|
174
153
|
overlay: e == null ? void 0 : e.overlay,
|
|
175
|
-
handleClick: () =>
|
|
154
|
+
handleClick: () => a(e == null ? void 0 : e.uuid)
|
|
176
155
|
},
|
|
177
|
-
`landing-page-overlay-general-card__${
|
|
178
|
-
))) })
|
|
179
|
-
|
|
156
|
+
`landing-page-overlay-general-card__${u + 1}`
|
|
157
|
+
))) }), [n, a]);
|
|
158
|
+
return /* @__PURE__ */ c(y, { ref: i, children: [
|
|
159
|
+
/* @__PURE__ */ r("div", { className: "regular-title center", children: /* @__PURE__ */ r("div", { className: "regular-title-text", children: /* @__PURE__ */ r("span", { children: t }) }) }),
|
|
160
|
+
/* @__PURE__ */ r(N, { limit: o, children: /* @__PURE__ */ r(
|
|
161
|
+
_,
|
|
162
|
+
{
|
|
163
|
+
isLoading: l,
|
|
164
|
+
limit: o,
|
|
165
|
+
keyPrefix: "explore-landing",
|
|
166
|
+
children: s
|
|
167
|
+
}
|
|
168
|
+
) })
|
|
169
|
+
] });
|
|
170
|
+
}
|
|
180
171
|
);
|
|
181
172
|
export {
|
|
182
|
-
|
|
173
|
+
A as default
|
|
183
174
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const
|
|
1
|
+
"use strict";const r=require("react/jsx-runtime"),l=require("react"),u=require("./emotion-styled.browser.esm-Cle7tAM9.cjs"),p=require("./consts-CtNoHdBj.cjs"),v=require("./useDetectMobile-D6d5LpdL.cjs"),k=require("./style-DN1qT8BE.cjs"),d=require("./utils-NZLCh-J5.cjs"),y=u.newStyled.div`
|
|
2
2
|
width: 100%;
|
|
3
3
|
height: 22.5rem;
|
|
4
4
|
min-height: 22.5rem;
|
|
@@ -15,12 +15,12 @@
|
|
|
15
15
|
height: 100%;
|
|
16
16
|
object-fit: cover;
|
|
17
17
|
}
|
|
18
|
-
`,
|
|
18
|
+
`,S=u.newStyled.div`
|
|
19
19
|
display: grid;
|
|
20
|
-
grid-template-columns: ${
|
|
20
|
+
grid-template-columns: ${t=>`repeat(${t.limit}, minmax(0, 1fr))`};
|
|
21
21
|
gap: 1.25rem;
|
|
22
22
|
|
|
23
|
-
@media (max-width: ${
|
|
23
|
+
@media (max-width: ${p.MOBILE_SIZE_PX+"px"}) {
|
|
24
24
|
display: flex;
|
|
25
25
|
gap: 1rem;
|
|
26
26
|
overflow-x: auto;
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
/* Safari and Chrome */
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
|
-
`,
|
|
42
|
+
`,f=u.newStyled.div`
|
|
43
43
|
display: flex;
|
|
44
44
|
flex-direction: column;
|
|
45
45
|
gap: 0.5rem;
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
& .card-title {
|
|
56
56
|
font-size: 0.875rem;
|
|
57
57
|
font-weight: 600;
|
|
58
|
-
${
|
|
58
|
+
${d.truncateTextInRows(2)}
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
&:hover {
|
|
@@ -65,18 +65,18 @@
|
|
|
65
65
|
}
|
|
66
66
|
|
|
67
67
|
& .skeleton-img {
|
|
68
|
-
background-color: ${
|
|
68
|
+
background-color: ${d.linearGradientAnimation("-90deg")};
|
|
69
69
|
border-radius: 0.75rem;
|
|
70
70
|
border: 1px solid white;
|
|
71
71
|
}
|
|
72
72
|
|
|
73
73
|
& .skeleton-title {
|
|
74
|
-
background-color: ${
|
|
74
|
+
background-color: ${d.linearGradientAnimation("-90deg")};
|
|
75
75
|
width: 100%;
|
|
76
76
|
height: 1.25rem;
|
|
77
77
|
}
|
|
78
78
|
|
|
79
|
-
@media (max-width: ${
|
|
79
|
+
@media (max-width: ${p.MOBILE_SIZE_PX+"px"}) {
|
|
80
80
|
& img {
|
|
81
81
|
width: 8.875rem;
|
|
82
82
|
height: 8.875rem;
|
|
@@ -87,4 +87,4 @@
|
|
|
87
87
|
object-fit: cover;
|
|
88
88
|
}
|
|
89
89
|
}
|
|
90
|
-
`,
|
|
90
|
+
`,P=l.forwardRef((t,a)=>{const{uuid:o,title:i,image:s,sellerUuid:g,onSelectCard:n=()=>{},imageComponent:c}=t;return r.jsxs(f,{className:"product-card",onClick:n,children:[d.isDefined(c)?c:r.jsx("img",{src:s}),r.jsx("div",{className:"card-title",children:i})]})}),C=l.forwardRef(({},t)=>r.jsxs(f,{className:"product-card",children:[r.jsx("img",{className:"skeleton-img"}),r.jsx("div",{className:"skeleton-title"})]})),N=({limit:t=4,isLoading:a=!1,keyPrefix:o})=>r.jsx(r.Fragment,{children:Array.from({length:t},(i,s)=>r.jsx(C,{isLoading:a},`${o}-skeleton-product-card-${s}`))}),$=({children:t,fallbackComponent:a=r.jsx(r.Fragment,{}),isLoading:o=!1,limit:i,keyPrefix:s})=>r.jsx(l.Suspense,{fallbackComponent:a,children:o===!0?r.jsx(N,{isLoading:o,limit:i,keyPrefix:s}):t}),h=l.memo(P),q=l.forwardRef((t,a)=>{const{icon:o,items:i,limit:s=4,imageUrl:g,onSelectCard:n=()=>{},title:c="Season inspiration",isLoading:w=!1}=t,j=v.useDetectMobile(),b=l.useMemo(()=>r.jsx(r.Fragment,{children:j===!0?i==null?void 0:i.map((e,m)=>r.jsx(h,{title:e==null?void 0:e.title,image:e==null?void 0:e.image,sellerUuid:e==null?void 0:e.sellerUuid,uuid:e==null?void 0:e.uuid,onSelectCard:()=>n==null?void 0:n(e==null?void 0:e.uuid)},m)):i==null?void 0:i.slice(0,s).map((e,m)=>r.jsx(h,{title:e==null?void 0:e.title,image:e==null?void 0:e.image,sellerUuid:e==null?void 0:e.sellerUuid,uuid:e==null?void 0:e.uuid,onSelectCard:()=>n==null?void 0:n(e==null?void 0:e.uuid)},m))}),[i]);return r.jsxs(k.RegulatTitleSectionWrapper,{ref:a,children:[r.jsx("div",{className:"regular-title",children:r.jsxs("div",{className:"regular-title-text",children:[d.isDefinedNotEmptyString(o)&&r.jsx("i",{className:o}),r.jsx("span",{children:c})]})}),r.jsx(y,{className:"products-banner",children:r.jsx("img",{src:g})}),r.jsx(S,{limit:s,children:r.jsx($,{isLoading:w,limit:s,keyPrefix:"explore-landing",children:b})})]})});module.exports=q;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { n as
|
|
4
|
-
import { M as
|
|
5
|
-
import { u as
|
|
6
|
-
import { R as
|
|
7
|
-
import { t as
|
|
8
|
-
const
|
|
1
|
+
import { jsxs as s, jsx as r, Fragment as c } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as u, Suspense as S, memo as C, useMemo as N } from "react";
|
|
3
|
+
import { n as p } from "./emotion-styled.browser.esm-CjCaF13H.js";
|
|
4
|
+
import { M as b } from "./consts-C1uHV4xc.js";
|
|
5
|
+
import { u as P } from "./useDetectMobile-BC6EGaBc.js";
|
|
6
|
+
import { R as $ } from "./style-CiePxaJ_.js";
|
|
7
|
+
import { t as M, m as g, l as U, k as j } from "./utils-DtRLzzTZ.js";
|
|
8
|
+
const E = p.div`
|
|
9
9
|
width: 100%;
|
|
10
10
|
height: 22.5rem;
|
|
11
11
|
min-height: 22.5rem;
|
|
@@ -22,12 +22,12 @@ const S = s.div`
|
|
|
22
22
|
height: 100%;
|
|
23
23
|
object-fit: cover;
|
|
24
24
|
}
|
|
25
|
-
`,
|
|
25
|
+
`, W = p.div`
|
|
26
26
|
display: grid;
|
|
27
|
-
grid-template-columns: ${(
|
|
27
|
+
grid-template-columns: ${(t) => `repeat(${t.limit}, minmax(0, 1fr))`};
|
|
28
28
|
gap: 1.25rem;
|
|
29
29
|
|
|
30
|
-
@media (max-width: ${
|
|
30
|
+
@media (max-width: ${b + "px"}) {
|
|
31
31
|
display: flex;
|
|
32
32
|
gap: 1rem;
|
|
33
33
|
overflow-x: auto;
|
|
@@ -46,7 +46,7 @@ const S = s.div`
|
|
|
46
46
|
/* Safari and Chrome */
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
|
-
`,
|
|
49
|
+
`, w = p.div`
|
|
50
50
|
display: flex;
|
|
51
51
|
flex-direction: column;
|
|
52
52
|
gap: 0.5rem;
|
|
@@ -62,7 +62,7 @@ const S = s.div`
|
|
|
62
62
|
& .card-title {
|
|
63
63
|
font-size: 0.875rem;
|
|
64
64
|
font-weight: 600;
|
|
65
|
-
${
|
|
65
|
+
${M(2)}
|
|
66
66
|
}
|
|
67
67
|
|
|
68
68
|
&:hover {
|
|
@@ -72,18 +72,18 @@ const S = s.div`
|
|
|
72
72
|
}
|
|
73
73
|
|
|
74
74
|
& .skeleton-img {
|
|
75
|
-
background-color: ${
|
|
75
|
+
background-color: ${g("-90deg")};
|
|
76
76
|
border-radius: 0.75rem;
|
|
77
77
|
border: 1px solid white;
|
|
78
78
|
}
|
|
79
79
|
|
|
80
80
|
& .skeleton-title {
|
|
81
|
-
background-color: ${
|
|
81
|
+
background-color: ${g("-90deg")};
|
|
82
82
|
width: 100%;
|
|
83
83
|
height: 1.25rem;
|
|
84
84
|
}
|
|
85
85
|
|
|
86
|
-
@media (max-width: ${
|
|
86
|
+
@media (max-width: ${b + "px"}) {
|
|
87
87
|
& img {
|
|
88
88
|
width: 8.875rem;
|
|
89
89
|
height: 8.875rem;
|
|
@@ -94,59 +94,90 @@ const S = s.div`
|
|
|
94
94
|
object-fit: cover;
|
|
95
95
|
}
|
|
96
96
|
}
|
|
97
|
-
`,
|
|
97
|
+
`, B = u((t, n) => {
|
|
98
98
|
const {
|
|
99
|
-
uuid:
|
|
99
|
+
uuid: a,
|
|
100
100
|
title: i,
|
|
101
101
|
image: o,
|
|
102
|
-
sellerUuid:
|
|
103
|
-
onSelectCard:
|
|
102
|
+
sellerUuid: h,
|
|
103
|
+
onSelectCard: l = () => {
|
|
104
104
|
},
|
|
105
105
|
imageComponent: d
|
|
106
|
-
} =
|
|
107
|
-
return /* @__PURE__ */
|
|
108
|
-
|
|
106
|
+
} = t;
|
|
107
|
+
return /* @__PURE__ */ s(w, { className: "product-card", onClick: l, children: [
|
|
108
|
+
U(d) ? d : /* @__PURE__ */ r("img", { src: o }),
|
|
109
109
|
/* @__PURE__ */ r("div", { className: "card-title", children: i })
|
|
110
110
|
] });
|
|
111
|
-
}),
|
|
111
|
+
}), I = u(({}, t) => /* @__PURE__ */ s(w, { className: "product-card", children: [
|
|
112
|
+
/* @__PURE__ */ r("img", { className: "skeleton-img" }),
|
|
113
|
+
/* @__PURE__ */ r("div", { className: "skeleton-title" })
|
|
114
|
+
] })), R = ({ limit: t = 4, isLoading: n = !1, keyPrefix: a }) => /* @__PURE__ */ r(c, { children: Array.from({ length: t }, (i, o) => /* @__PURE__ */ r(
|
|
115
|
+
I,
|
|
116
|
+
{
|
|
117
|
+
isLoading: n
|
|
118
|
+
},
|
|
119
|
+
`${a}-skeleton-product-card-${o}`
|
|
120
|
+
)) }), z = ({
|
|
121
|
+
children: t,
|
|
122
|
+
fallbackComponent: n = /* @__PURE__ */ r(c, {}),
|
|
123
|
+
isLoading: a = !1,
|
|
124
|
+
limit: i,
|
|
125
|
+
keyPrefix: o
|
|
126
|
+
}) => /* @__PURE__ */ r(S, { fallbackComponent: n, children: a === !0 ? /* @__PURE__ */ r(
|
|
127
|
+
R,
|
|
128
|
+
{
|
|
129
|
+
isLoading: a,
|
|
130
|
+
limit: i,
|
|
131
|
+
keyPrefix: o
|
|
132
|
+
}
|
|
133
|
+
) : t }), f = C(B), O = u((t, n) => {
|
|
112
134
|
const {
|
|
113
|
-
icon:
|
|
135
|
+
icon: a,
|
|
114
136
|
items: i,
|
|
115
137
|
limit: o = 4,
|
|
116
|
-
|
|
117
|
-
onSelectCard:
|
|
138
|
+
imageUrl: h,
|
|
139
|
+
onSelectCard: l = () => {
|
|
140
|
+
},
|
|
141
|
+
title: d = "Season inspiration",
|
|
142
|
+
isLoading: k = !1
|
|
143
|
+
} = t, v = P(), y = N(() => /* @__PURE__ */ r(c, { children: v === !0 ? i == null ? void 0 : i.map((e, m) => /* @__PURE__ */ r(
|
|
144
|
+
f,
|
|
145
|
+
{
|
|
146
|
+
title: e == null ? void 0 : e.title,
|
|
147
|
+
image: e == null ? void 0 : e.image,
|
|
148
|
+
sellerUuid: e == null ? void 0 : e.sellerUuid,
|
|
149
|
+
uuid: e == null ? void 0 : e.uuid,
|
|
150
|
+
onSelectCard: () => l == null ? void 0 : l(e == null ? void 0 : e.uuid)
|
|
118
151
|
},
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
152
|
+
m
|
|
153
|
+
)) : i == null ? void 0 : i.slice(0, o).map((e, m) => /* @__PURE__ */ r(
|
|
154
|
+
f,
|
|
155
|
+
{
|
|
156
|
+
title: e == null ? void 0 : e.title,
|
|
157
|
+
image: e == null ? void 0 : e.image,
|
|
158
|
+
sellerUuid: e == null ? void 0 : e.sellerUuid,
|
|
159
|
+
uuid: e == null ? void 0 : e.uuid,
|
|
160
|
+
onSelectCard: () => l == null ? void 0 : l(e == null ? void 0 : e.uuid)
|
|
161
|
+
},
|
|
162
|
+
m
|
|
163
|
+
)) }), [i]);
|
|
164
|
+
return /* @__PURE__ */ s($, { ref: n, children: [
|
|
165
|
+
/* @__PURE__ */ r("div", { className: "regular-title", children: /* @__PURE__ */ s("div", { className: "regular-title-text", children: [
|
|
166
|
+
j(a) && /* @__PURE__ */ r("i", { className: a }),
|
|
124
167
|
/* @__PURE__ */ r("span", { children: d })
|
|
125
168
|
] }) }),
|
|
126
|
-
/* @__PURE__ */ r(
|
|
127
|
-
/* @__PURE__ */ r(
|
|
128
|
-
|
|
129
|
-
{
|
|
130
|
-
title: e == null ? void 0 : e.title,
|
|
131
|
-
image: e == null ? void 0 : e.image,
|
|
132
|
-
sellerUuid: e == null ? void 0 : e.sellerUuid,
|
|
133
|
-
uuid: e == null ? void 0 : e.uuid,
|
|
134
|
-
onSelectCard: () => t == null ? void 0 : t(e == null ? void 0 : e.uuid)
|
|
135
|
-
},
|
|
136
|
-
n
|
|
137
|
-
)) : i == null ? void 0 : i.slice(0, o).map((e, n) => /* @__PURE__ */ r(
|
|
138
|
-
u,
|
|
169
|
+
/* @__PURE__ */ r(E, { className: "products-banner", children: /* @__PURE__ */ r("img", { src: h }) }),
|
|
170
|
+
/* @__PURE__ */ r(W, { limit: o, children: /* @__PURE__ */ r(
|
|
171
|
+
z,
|
|
139
172
|
{
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
n
|
|
147
|
-
)) })
|
|
173
|
+
isLoading: k,
|
|
174
|
+
limit: o,
|
|
175
|
+
keyPrefix: "explore-landing",
|
|
176
|
+
children: y
|
|
177
|
+
}
|
|
178
|
+
) })
|
|
148
179
|
] });
|
|
149
180
|
});
|
|
150
181
|
export {
|
|
151
|
-
|
|
182
|
+
O as default
|
|
152
183
|
};
|