@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,23 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import
|
|
9
|
-
const
|
|
1
|
+
import { jsxs as i, jsx as e, Fragment as c } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as m, Suspense as v, memo as w, useMemo as k } from "react";
|
|
3
|
+
import { n as _ } from "./emotion-styled.browser.esm-CjCaF13H.js";
|
|
4
|
+
import { M as g } from "./consts-C1uHV4xc.js";
|
|
5
|
+
import { R as y } from "./style-6tSw9aqK.js";
|
|
6
|
+
import { useTheme as f } from "./ThemeProvider.js";
|
|
7
|
+
import { m as d, t as h } from "./utils-DtRLzzTZ.js";
|
|
8
|
+
import b from "./Button.js";
|
|
9
|
+
const $ = _.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: ${g + "px"}) {
|
|
16
|
+
display: flex;
|
|
17
|
+
flex-direction: column;
|
|
18
|
+
gap: 1rem;
|
|
19
|
+
}
|
|
20
|
+
`, u = _.div`
|
|
10
21
|
display: flex;
|
|
11
22
|
flex-direction: column;
|
|
12
23
|
align-items: flex-start;
|
|
@@ -37,7 +48,7 @@ const v = m.div`
|
|
|
37
48
|
& .wrapper__image--skeleton {
|
|
38
49
|
width: 100%;
|
|
39
50
|
border-radius: 0.75rem;
|
|
40
|
-
background-color: ${
|
|
51
|
+
background-color: ${d("-90deg")};
|
|
41
52
|
}
|
|
42
53
|
|
|
43
54
|
& .wrapper__text {
|
|
@@ -55,7 +66,7 @@ const v = m.div`
|
|
|
55
66
|
font-style: normal;
|
|
56
67
|
font-weight: 500;
|
|
57
68
|
line-height: 1.5rem;
|
|
58
|
-
${
|
|
69
|
+
${h(2)}
|
|
59
70
|
}
|
|
60
71
|
|
|
61
72
|
& .text__description {
|
|
@@ -64,17 +75,17 @@ const v = m.div`
|
|
|
64
75
|
font-style: normal;
|
|
65
76
|
font-weight: 600;
|
|
66
77
|
line-height: 1.75rem;
|
|
67
|
-
${
|
|
78
|
+
${h(2)}
|
|
68
79
|
}
|
|
69
80
|
|
|
70
81
|
& .text__title--skeleton {
|
|
71
|
-
background-color: ${
|
|
82
|
+
background-color: ${d("-90deg")};
|
|
72
83
|
height: 1rem;
|
|
73
84
|
width: 9rem;
|
|
74
85
|
}
|
|
75
86
|
|
|
76
87
|
& .text__description--skeleton {
|
|
77
|
-
background-color: ${
|
|
88
|
+
background-color: ${d("-90deg")};
|
|
78
89
|
height: 1rem;
|
|
79
90
|
width: 12rem;
|
|
80
91
|
}
|
|
@@ -94,7 +105,7 @@ const v = m.div`
|
|
|
94
105
|
}
|
|
95
106
|
|
|
96
107
|
& .text__action--skeleton {
|
|
97
|
-
background-color: ${
|
|
108
|
+
background-color: ${d("-90deg")};
|
|
98
109
|
height: 2rem;
|
|
99
110
|
width: 9rem;
|
|
100
111
|
position: absolute;
|
|
@@ -102,7 +113,7 @@ const v = m.div`
|
|
|
102
113
|
left: 1rem;
|
|
103
114
|
}
|
|
104
115
|
|
|
105
|
-
@media (max-width: ${
|
|
116
|
+
@media (max-width: ${g + "px"}) {
|
|
106
117
|
max-height: 100%;
|
|
107
118
|
|
|
108
119
|
& .wrapper__overlay {
|
|
@@ -121,63 +132,92 @@ const v = m.div`
|
|
|
121
132
|
left: 2rem;
|
|
122
133
|
}
|
|
123
134
|
}
|
|
124
|
-
`,
|
|
135
|
+
`, N = m(({}, t) => {
|
|
136
|
+
const { theme: a } = f();
|
|
137
|
+
return /* @__PURE__ */ i(u, { theme: a, children: [
|
|
138
|
+
/* @__PURE__ */ e("div", { className: "wrapper__image--skeleton" }),
|
|
139
|
+
/* @__PURE__ */ i("div", { className: "wrapper__text", children: [
|
|
140
|
+
/* @__PURE__ */ e("div", { className: "text__title--skeleton" }),
|
|
141
|
+
/* @__PURE__ */ e("div", { className: "text__description--skeleton" })
|
|
142
|
+
] }),
|
|
143
|
+
/* @__PURE__ */ e("div", { className: "text__action--skeleton" })
|
|
144
|
+
] });
|
|
145
|
+
}), S = ({ limit: t = 2, isLoading: a = !1, keyPrefix: o }) => /* @__PURE__ */ e(c, { children: Array.from({ length: t }, (n, l) => /* @__PURE__ */ e(
|
|
146
|
+
N,
|
|
147
|
+
{
|
|
148
|
+
isLoading: a
|
|
149
|
+
},
|
|
150
|
+
`${o}-skeleton-product-card-${l}`
|
|
151
|
+
)) }), C = ({
|
|
152
|
+
children: t,
|
|
153
|
+
fallbackComponent: a = /* @__PURE__ */ e(c, {}),
|
|
154
|
+
isLoading: o = !1,
|
|
155
|
+
limit: n,
|
|
156
|
+
keyPrefix: l
|
|
157
|
+
}) => /* @__PURE__ */ e(v, { fallbackComponent: a, children: o === !0 ? /* @__PURE__ */ e(
|
|
158
|
+
S,
|
|
159
|
+
{
|
|
160
|
+
isLoading: o,
|
|
161
|
+
limit: n,
|
|
162
|
+
keyPrefix: l
|
|
163
|
+
}
|
|
164
|
+
) : t }), P = m(
|
|
125
165
|
({
|
|
126
166
|
title: t,
|
|
127
167
|
image: a,
|
|
128
|
-
overlay:
|
|
168
|
+
overlay: o,
|
|
129
169
|
description: n,
|
|
130
|
-
actionText:
|
|
131
|
-
actionLink:
|
|
132
|
-
handleClick:
|
|
170
|
+
actionText: l,
|
|
171
|
+
actionLink: x,
|
|
172
|
+
handleClick: s = () => {
|
|
133
173
|
}
|
|
134
|
-
},
|
|
135
|
-
const { theme:
|
|
136
|
-
return /* @__PURE__ */
|
|
137
|
-
/* @__PURE__ */
|
|
138
|
-
/* @__PURE__ */
|
|
139
|
-
/* @__PURE__ */
|
|
140
|
-
/* @__PURE__ */
|
|
174
|
+
}, r) => {
|
|
175
|
+
const { theme: p } = f();
|
|
176
|
+
return /* @__PURE__ */ e(c, { children: /* @__PURE__ */ i(u, { theme: p, overlay: o, onClick: s, children: [
|
|
177
|
+
/* @__PURE__ */ e("div", { className: "wrapper__overlay", children: /* @__PURE__ */ e("img", { src: a, className: "wrapper__image" }) }),
|
|
178
|
+
/* @__PURE__ */ i("div", { className: "wrapper__text", children: [
|
|
179
|
+
/* @__PURE__ */ e("div", { className: "text__title", children: t }),
|
|
180
|
+
/* @__PURE__ */ e("div", { className: "text__description", children: n })
|
|
141
181
|
] }),
|
|
142
|
-
/* @__PURE__ */
|
|
143
|
-
|
|
182
|
+
/* @__PURE__ */ e(
|
|
183
|
+
b,
|
|
144
184
|
{
|
|
145
|
-
text:
|
|
146
|
-
onClick:
|
|
185
|
+
text: l,
|
|
186
|
+
onClick: s,
|
|
147
187
|
className: "text__action"
|
|
148
188
|
}
|
|
149
189
|
)
|
|
150
190
|
] }) });
|
|
151
191
|
}
|
|
152
|
-
),
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
@media (max-width: ${h + "px"}) {
|
|
159
|
-
display: flex;
|
|
160
|
-
flex-direction: column;
|
|
161
|
-
gap: 1rem;
|
|
162
|
-
}
|
|
163
|
-
`, j = p(
|
|
164
|
-
({ title: t, items: a, limit: l = 2, onSelectCard: n = () => {
|
|
165
|
-
} }, c) => /* @__PURE__ */ d(u, { children: [
|
|
166
|
-
/* @__PURE__ */ r("div", { className: "regular-title center", children: /* @__PURE__ */ r("div", { className: "regular-title-text", children: /* @__PURE__ */ r("span", { children: t }) }) }),
|
|
167
|
-
/* @__PURE__ */ r(b, { limit: l, children: a && (a == null ? void 0 : a.map((e, o) => /* @__PURE__ */ r(
|
|
168
|
-
w,
|
|
192
|
+
), G = w(P), W = m(
|
|
193
|
+
({ title: t, items: a, limit: o = 2, onSelectCard: n = () => {
|
|
194
|
+
}, isLoading: l = !1 }, x) => {
|
|
195
|
+
const s = k(() => /* @__PURE__ */ e(c, { children: a && (a == null ? void 0 : a.map((r, p) => /* @__PURE__ */ e(
|
|
196
|
+
G,
|
|
169
197
|
{
|
|
170
|
-
title:
|
|
171
|
-
image:
|
|
172
|
-
description:
|
|
173
|
-
actionText:
|
|
174
|
-
overlay:
|
|
175
|
-
handleClick: () => n(
|
|
198
|
+
title: r == null ? void 0 : r.title,
|
|
199
|
+
image: r == null ? void 0 : r.image,
|
|
200
|
+
description: r == null ? void 0 : r.description,
|
|
201
|
+
actionText: r == null ? void 0 : r.actionText,
|
|
202
|
+
overlay: r == null ? void 0 : r.overlay,
|
|
203
|
+
handleClick: () => n(r == null ? void 0 : r.uuid)
|
|
176
204
|
},
|
|
177
|
-
`landing-page-overlay-general-card__${
|
|
178
|
-
))) })
|
|
179
|
-
|
|
205
|
+
`landing-page-overlay-general-card__${p + 1}`
|
|
206
|
+
))) }), [a]);
|
|
207
|
+
return /* @__PURE__ */ i(y, { children: [
|
|
208
|
+
/* @__PURE__ */ e("div", { className: "regular-title center", children: /* @__PURE__ */ e("div", { className: "regular-title-text", children: /* @__PURE__ */ e("span", { children: t }) }) }),
|
|
209
|
+
/* @__PURE__ */ e($, { limit: o, children: /* @__PURE__ */ e(
|
|
210
|
+
C,
|
|
211
|
+
{
|
|
212
|
+
isLoading: l,
|
|
213
|
+
limit: o,
|
|
214
|
+
keyPrefix: "explore-landing",
|
|
215
|
+
children: s
|
|
216
|
+
}
|
|
217
|
+
) })
|
|
218
|
+
] });
|
|
219
|
+
}
|
|
180
220
|
);
|
|
181
221
|
export {
|
|
182
|
-
|
|
222
|
+
W as default
|
|
183
223
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const
|
|
1
|
+
"use strict";const r=require("react/jsx-runtime"),d=require("react"),u=require("./emotion-styled.browser.esm-Cle7tAM9.cjs"),p=require("./consts-CtNoHdBj.cjs"),v=require("./useDetectMobile-D6d5LpdL.cjs"),k=require("./style-BR3tIhP1.cjs"),l=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
|
+
${l.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: ${l.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: ${l.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=d.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:[l.isDefined(c)?c:r.jsx("img",{src:s}),r.jsx("div",{className:"card-title",children:i})]})}),C=d.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(d.Suspense,{fallbackComponent:a,children:o===!0?r.jsx(N,{isLoading:o,limit:i,keyPrefix:s}):t}),h=d.memo(P),q=d.forwardRef((t,a)=>{const{icon:o,items:i,limit:s=4,bannerImage:g,onSelectCard:n=()=>{},title:c="Season inspiration",isLoading:w=!1}=t,b=v.useDetectMobile(),j=d.useMemo(()=>r.jsx(r.Fragment,{children:b===!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:[l.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:j})})]})});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-6tSw9aqK.js";
|
|
7
|
+
import { t as M, m as g, l as j, k as E } from "./utils-DtRLzzTZ.js";
|
|
8
|
+
const I = 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
|
+
`, U = 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
|
+
`, W = u((t, d) => {
|
|
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: n = () => {
|
|
104
104
|
},
|
|
105
|
-
imageComponent:
|
|
106
|
-
} =
|
|
107
|
-
return /* @__PURE__ */
|
|
108
|
-
|
|
105
|
+
imageComponent: l
|
|
106
|
+
} = t;
|
|
107
|
+
return /* @__PURE__ */ s(w, { className: "product-card", onClick: n, children: [
|
|
108
|
+
j(l) ? l : /* @__PURE__ */ r("img", { src: o }),
|
|
109
109
|
/* @__PURE__ */ r("div", { className: "card-title", children: i })
|
|
110
110
|
] });
|
|
111
|
-
}),
|
|
111
|
+
}), B = 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: d = !1, keyPrefix: a }) => /* @__PURE__ */ r(c, { children: Array.from({ length: t }, (i, o) => /* @__PURE__ */ r(
|
|
115
|
+
B,
|
|
116
|
+
{
|
|
117
|
+
isLoading: d
|
|
118
|
+
},
|
|
119
|
+
`${a}-skeleton-product-card-${o}`
|
|
120
|
+
)) }), z = ({
|
|
121
|
+
children: t,
|
|
122
|
+
fallbackComponent: d = /* @__PURE__ */ r(c, {}),
|
|
123
|
+
isLoading: a = !1,
|
|
124
|
+
limit: i,
|
|
125
|
+
keyPrefix: o
|
|
126
|
+
}) => /* @__PURE__ */ r(S, { fallbackComponent: d, children: a === !0 ? /* @__PURE__ */ r(
|
|
127
|
+
R,
|
|
128
|
+
{
|
|
129
|
+
isLoading: a,
|
|
130
|
+
limit: i,
|
|
131
|
+
keyPrefix: o
|
|
132
|
+
}
|
|
133
|
+
) : t }), f = C(W), O = u((t, d) => {
|
|
112
134
|
const {
|
|
113
|
-
icon:
|
|
135
|
+
icon: a,
|
|
114
136
|
items: i,
|
|
115
137
|
limit: o = 4,
|
|
116
|
-
bannerImage:
|
|
117
|
-
onSelectCard:
|
|
138
|
+
bannerImage: h,
|
|
139
|
+
onSelectCard: n = () => {
|
|
140
|
+
},
|
|
141
|
+
title: l = "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: () => n == null ? void 0 : n(e == null ? void 0 : e.uuid)
|
|
118
151
|
},
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
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: () => n == null ? void 0 : n(e == null ? void 0 : e.uuid)
|
|
161
|
+
},
|
|
162
|
+
m
|
|
163
|
+
)) }), [i]);
|
|
164
|
+
return /* @__PURE__ */ s($, { ref: d, children: [
|
|
165
|
+
/* @__PURE__ */ r("div", { className: "regular-title", children: /* @__PURE__ */ s("div", { className: "regular-title-text", children: [
|
|
166
|
+
E(a) && /* @__PURE__ */ r("i", { className: a }),
|
|
167
|
+
/* @__PURE__ */ r("span", { children: l })
|
|
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(I, { className: "products-banner", children: /* @__PURE__ */ r("img", { src: h }) }),
|
|
170
|
+
/* @__PURE__ */ r(U, { 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
|
};
|
package/dist/QuizSection.cjs
CHANGED
|
@@ -384,4 +384,4 @@
|
|
|
384
384
|
display: none;
|
|
385
385
|
}
|
|
386
386
|
}
|
|
387
|
-
`,te=i.forwardRef(({welcomeTitle:d,welcomeDescription:s,endTitle:m,endDescription:f,image:c,imageComponent:_,questions:r,secondsPerQuestion:E,numOfCredits:C,startQuizText:T="Start quiz",nextText:Q="Next",giveUpText:U="Give up",questionNoText:Z="Question",continueText:W="Continue",endQuizText:g="End quiz",onStartQuiz:N=()=>{},onSelectAnswer:x=()=>{},onGiveUp:I=()=>{},onNext:u=()=>{},onContinue:b=()=>{},onEndQuiz:w=()=>{}},a)=>{const[v,h]=i.useState(l.START_QUIZ),[o,y]=i.useState(1),[t,L]=i.useState(null),[j,R]=i.useState(null),O=i.useRef([]),D=i.useRef(0),M=()=>{h(l.QUIZ),L(r==null?void 0:r.find(n=>(n==null?void 0:n.questionNo)===o)),N==null||N()},P=n=>{R(n),x==null||x()},B=()=>{h(l.START_QUIZ),y(1),R(null),I==null||I()},X=()=>{let n=(j==null?void 0:j.uuid)===(t==null?void 0:t.correctAnswer);n?(h(l.CORRECT_ANSWER),D.current+=C||(t==null?void 0:t.numOfCredits)):o===(r==null?void 0:r.length)?(h(l.START_QUIZ),y(1),R(null)):(y(o+1),L(r==null?void 0:r.find($=>($==null?void 0:$.questionNo)===o+1)),R(null)),O.current=[...O.current,{question:t,selectedAnswer:j,isCorrect:n}],u==null||u()},F=()=>{o===(r==null?void 0:r.length)?(h(l.START_QUIZ),y(1)):(h(l.QUIZ),y(o+1),L(r==null?void 0:r.find(n=>(n==null?void 0:n.questionNo)===o+1))),R(null),b==null||b()},G=()=>{h(l.START_QUIZ),y(1),R(null),w==null||w()};return e.jsxs(re,{children:[e.jsxs("div",{className:"wrapper__outlet",children:[v===l.START_QUIZ&&e.jsx(Y,{title:d,description:s,startQuizText:T,onStartQuiz:M}),v===l.QUIZ&&t&&e.jsx(q,{questionNoText:Z,questionNo:o,totalQuestions:(r==null?void 0:r.length)||0,text:t==null?void 0:t.text,answers:t==null?void 0:t.answers,secondsPerQuestion:E||(t==null?void 0:t.secondsPerQuestion),selectedAnswer:j,nextText:Q,giveUpText:U,nextDisabled:!z.isDefined(j),onSelectAnswer:P,onGiveUp:B,onNext:X},`quiz-question__${o}`),v===l.CORRECT_ANSWER&&e.jsx(ee,{title:m,description:z.formatString(f,C||(t==null?void 0:t.numOfCredits)),continueText:W,endQuizText:g,onContinue:F,onEndQuiz:G})]}),z.isDefined(_)?_:e.jsx("img",{src:c,className:"wrapper__image"})]})});module.exports=te;
|
|
387
|
+
`,te=i.forwardRef(({welcomeTitle:d,welcomeDescription:s,endTitle:m,endDescription:f,image:c,imageComponent:_,questions:r,secondsPerQuestion:E,numOfCredits:C,startQuizText:T="Start quiz",nextText:Q="Next",giveUpText:U="Give up",questionNoText:Z="Question",continueText:W="Continue",endQuizText:g="End quiz",onStartQuiz:N=()=>{},onSelectAnswer:x=()=>{},onGiveUp:I=()=>{},onNext:u=()=>{},onContinue:b=()=>{},onEndQuiz:w=()=>{}},a)=>{const[v,h]=i.useState(l.START_QUIZ),[o,y]=i.useState(1),[t,L]=i.useState(null),[j,R]=i.useState(null),O=i.useRef([]),D=i.useRef(0),M=()=>{h(l.QUIZ),L(r==null?void 0:r.find(n=>(n==null?void 0:n.questionNo)===o)),N==null||N()},P=n=>{R(n),x==null||x()},B=()=>{h(l.START_QUIZ),y(1),R(null),I==null||I()},X=()=>{let n=(j==null?void 0:j.uuid)===(t==null?void 0:t.correctAnswer);n?(h(l.CORRECT_ANSWER),D.current+=C||(t==null?void 0:t.numOfCredits)):o===(r==null?void 0:r.length)?(h(l.START_QUIZ),y(1),R(null)):(y(o+1),L(r==null?void 0:r.find($=>($==null?void 0:$.questionNo)===o+1)),R(null)),O.current=[...O.current,{question:t,selectedAnswer:j,isCorrect:n}],u==null||u()},F=()=>{o===(r==null?void 0:r.length)?(h(l.START_QUIZ),y(1)):(h(l.QUIZ),y(o+1),L(r==null?void 0:r.find(n=>(n==null?void 0:n.questionNo)===o+1))),R(null),b==null||b()},G=()=>{h(l.START_QUIZ),y(1),R(null),w==null||w()};return e.jsxs(re,{ref:a,children:[e.jsxs("div",{className:"wrapper__outlet",children:[v===l.START_QUIZ&&e.jsx(Y,{title:d,description:s,startQuizText:T,onStartQuiz:M}),v===l.QUIZ&&t&&e.jsx(q,{questionNoText:Z,questionNo:o,totalQuestions:(r==null?void 0:r.length)||0,text:t==null?void 0:t.text,answers:t==null?void 0:t.answers,secondsPerQuestion:E||(t==null?void 0:t.secondsPerQuestion),selectedAnswer:j,nextText:Q,giveUpText:U,nextDisabled:!z.isDefined(j),onSelectAnswer:P,onGiveUp:B,onNext:X},`quiz-question__${o}`),v===l.CORRECT_ANSWER&&e.jsx(ee,{title:m,description:z.formatString(f,C||(t==null?void 0:t.numOfCredits)),continueText:W,endQuizText:g,onContinue:F,onEndQuiz:G})]}),z.isDefined(_)?_:e.jsx("img",{src:c,className:"wrapper__image"})]})});module.exports=te;
|
package/dist/QuizSection.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as i, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as T, useState as b, useRef as D, useEffect as q } from "react";
|
|
3
3
|
import { p as ee, l as B, q as re } from "./utils-DtRLzzTZ.js";
|
|
4
4
|
import R from "./Button.js";
|
|
@@ -367,8 +367,8 @@ const ae = Q.div`
|
|
|
367
367
|
startQuizText: d = "Start quiz",
|
|
368
368
|
onStartQuiz: _ = () => {
|
|
369
369
|
}
|
|
370
|
-
}, o) => /* @__PURE__ */
|
|
371
|
-
/* @__PURE__ */
|
|
370
|
+
}, o) => /* @__PURE__ */ i(ae, { children: [
|
|
371
|
+
/* @__PURE__ */ i("div", { className: "wrapper__content", children: [
|
|
372
372
|
/* @__PURE__ */ e("div", { className: "wrapper__title", children: s }),
|
|
373
373
|
/* @__PURE__ */ e("div", { className: "wrapper__description", children: c })
|
|
374
374
|
] }),
|
|
@@ -403,12 +403,12 @@ const ae = Q.div`
|
|
|
403
403
|
}, O) => {
|
|
404
404
|
const [f, k] = b(r), [h, I] = b(!0), u = D(null);
|
|
405
405
|
q(() => (h && f > 0 && (u.current = setInterval(() => {
|
|
406
|
-
k((
|
|
406
|
+
k((a) => a > 0 ? a - 1 : 0);
|
|
407
407
|
}, 1e3)), () => clearInterval(u.current)), [h, f]);
|
|
408
|
-
const z = f > 0 ? f / r * L : 0, w = (
|
|
409
|
-
return /* @__PURE__ */
|
|
410
|
-
/* @__PURE__ */
|
|
411
|
-
/* @__PURE__ */
|
|
408
|
+
const z = f > 0 ? f / r * L : 0, w = (a) => (m == null ? void 0 : m.uuid) === a;
|
|
409
|
+
return /* @__PURE__ */ i(ie, { children: [
|
|
410
|
+
/* @__PURE__ */ i("div", { className: "wrapper__headline", children: [
|
|
411
|
+
/* @__PURE__ */ i("div", { className: "wrapper__question-no", children: [
|
|
412
412
|
/* @__PURE__ */ e("div", { className: "question-no__text", children: `${s} ${c} / ${d}` }),
|
|
413
413
|
/* @__PURE__ */ e(
|
|
414
414
|
te,
|
|
@@ -418,8 +418,8 @@ const ae = Q.div`
|
|
|
418
418
|
}
|
|
419
419
|
)
|
|
420
420
|
] }),
|
|
421
|
-
/* @__PURE__ */
|
|
422
|
-
/* @__PURE__ */
|
|
421
|
+
/* @__PURE__ */ i("div", { className: "wrapper__timer", children: [
|
|
422
|
+
/* @__PURE__ */ i("svg", { className: "timer__ring", width: "60", height: "60", children: [
|
|
423
423
|
/* @__PURE__ */ e(
|
|
424
424
|
"circle",
|
|
425
425
|
{
|
|
@@ -452,17 +452,17 @@ const ae = Q.div`
|
|
|
452
452
|
/* @__PURE__ */ e("div", { className: "timer__display", children: /* @__PURE__ */ e("span", { className: "timer__text", children: ee(f) }) })
|
|
453
453
|
] })
|
|
454
454
|
] }),
|
|
455
|
-
/* @__PURE__ */
|
|
456
|
-
/* @__PURE__ */
|
|
455
|
+
/* @__PURE__ */ i("div", { className: "wrapper__content", children: [
|
|
456
|
+
/* @__PURE__ */ i("div", { className: "wrapper__item", children: [
|
|
457
457
|
/* @__PURE__ */ e("div", { className: "wrapper__text", children: _ }),
|
|
458
|
-
/* @__PURE__ */ e("div", { className: "wrapper__answers", children: o && (o == null ? void 0 : o.map((
|
|
458
|
+
/* @__PURE__ */ e("div", { className: "wrapper__answers", children: o && (o == null ? void 0 : o.map((a, x) => /* @__PURE__ */ i(
|
|
459
459
|
"div",
|
|
460
460
|
{
|
|
461
|
-
className: `wrapper__answer ${w(
|
|
462
|
-
onClick: () => Z(
|
|
461
|
+
className: `wrapper__answer ${w(a == null ? void 0 : a.uuid) ? "active" : ""}`,
|
|
462
|
+
onClick: () => Z(a),
|
|
463
463
|
children: [
|
|
464
|
-
`${String.fromCharCode(65 + x)}: ${
|
|
465
|
-
w(
|
|
464
|
+
`${String.fromCharCode(65 + x)}: ${a == null ? void 0 : a.label}`,
|
|
465
|
+
w(a == null ? void 0 : a.uuid) && /* @__PURE__ */ e(
|
|
466
466
|
F,
|
|
467
467
|
{
|
|
468
468
|
icon: " mng-lnc-checkmark--filled",
|
|
@@ -475,7 +475,7 @@ const ae = Q.div`
|
|
|
475
475
|
`quiz-answer__${x + 1}`
|
|
476
476
|
))) })
|
|
477
477
|
] }),
|
|
478
|
-
/* @__PURE__ */
|
|
478
|
+
/* @__PURE__ */ i("div", { className: "wrapper__actions", children: [
|
|
479
479
|
/* @__PURE__ */ e(
|
|
480
480
|
R,
|
|
481
481
|
{
|
|
@@ -511,8 +511,8 @@ const ae = Q.div`
|
|
|
511
511
|
},
|
|
512
512
|
onEndQuiz: m = () => {
|
|
513
513
|
}
|
|
514
|
-
}, r) => /* @__PURE__ */
|
|
515
|
-
/* @__PURE__ */
|
|
514
|
+
}, r) => /* @__PURE__ */ i(ne, { children: [
|
|
515
|
+
/* @__PURE__ */ i("div", { className: "wrapper__content", children: [
|
|
516
516
|
/* @__PURE__ */ e(
|
|
517
517
|
F,
|
|
518
518
|
{
|
|
@@ -522,12 +522,12 @@ const ae = Q.div`
|
|
|
522
522
|
className: "wrapper__icon"
|
|
523
523
|
}
|
|
524
524
|
),
|
|
525
|
-
/* @__PURE__ */
|
|
525
|
+
/* @__PURE__ */ i("div", { className: "wrapper__info", children: [
|
|
526
526
|
s && /* @__PURE__ */ e("div", { className: "wrapper__title", children: s }),
|
|
527
527
|
c && /* @__PURE__ */ e("div", { className: "wrapper__description", children: c })
|
|
528
528
|
] })
|
|
529
529
|
] }),
|
|
530
|
-
/* @__PURE__ */
|
|
530
|
+
/* @__PURE__ */ i("div", { className: "wrapper__actions", children: [
|
|
531
531
|
/* @__PURE__ */ e(
|
|
532
532
|
R,
|
|
533
533
|
{
|
|
@@ -615,7 +615,7 @@ const ae = Q.div`
|
|
|
615
615
|
},
|
|
616
616
|
onEndQuiz: w = () => {
|
|
617
617
|
}
|
|
618
|
-
},
|
|
618
|
+
}, a) => {
|
|
619
619
|
const [x, g] = b(l.START_QUIZ), [p, v] = b(1), [t, j] = b(null), [y, N] = b(null), P = D([]), X = D(0), G = () => {
|
|
620
620
|
g(l.QUIZ), j(
|
|
621
621
|
r == null ? void 0 : r.find((n) => (n == null ? void 0 : n.questionNo) === p)
|
|
@@ -643,8 +643,8 @@ const ae = Q.div`
|
|
|
643
643
|
}, Y = () => {
|
|
644
644
|
g(l.START_QUIZ), v(1), N(null), w == null || w();
|
|
645
645
|
};
|
|
646
|
-
return /* @__PURE__ */
|
|
647
|
-
/* @__PURE__ */
|
|
646
|
+
return /* @__PURE__ */ i(pe, { ref: a, children: [
|
|
647
|
+
/* @__PURE__ */ i("div", { className: "wrapper__outlet", children: [
|
|
648
648
|
x === l.START_QUIZ && /* @__PURE__ */ e(
|
|
649
649
|
le,
|
|
650
650
|
{
|