@lanaco/lnc-react-ui 4.0.131 → 4.0.133
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/BannerSectionCarousel.cjs +12 -8
- package/dist/BannerSectionCarousel.js +14 -10
- package/dist/BlogCardsSponsoredSection.cjs +7 -20
- package/dist/BlogCardsSponsoredSection.js +70 -99
- package/dist/BlogExploreSection.cjs +5 -5
- package/dist/BlogExploreSection.js +198 -192
- package/dist/BlogListSection.cjs +4 -18
- package/dist/BlogListSection.js +70 -93
- package/dist/BlogProductCardsSection.js +2 -2
- package/dist/BlogShopCardsSection.cjs +1 -1
- package/dist/BlogShopCardsSection.js +1 -1
- package/dist/BlogSingleSection.js +1 -1
- package/dist/BlogsSectionDetailed.cjs +2 -5
- package/dist/BlogsSectionDetailed.js +23 -26
- package/dist/BlogsSectionLarge.js +1 -1
- package/dist/BlogsSectionSimple.cjs +14 -7
- package/dist/BlogsSectionSimple.js +83 -72
- package/dist/BlogsSectionSimpleCentered.js +1 -1
- package/dist/BlogsSectionWithFilters.js +1 -1
- package/dist/DetailedProductsSection.js +1 -1
- package/dist/FieldOfInterestsWithAvatarsCardsSection.js +1 -1
- package/dist/ProductsWithBannerSection.js +1 -1
- package/dist/ReviewsSection.js +1 -1
- package/dist/SalesCampaignsSection.cjs +33 -33
- package/dist/SalesCampaignsSection.js +274 -275
- package/dist/ShopAvatar-4-fCYGEc.js +4 -0
- package/dist/ShopAvatar-CV3lj34D.cjs +1 -0
- package/dist/ShopCardsSection.cjs +1 -1
- package/dist/ShopCardsSection.js +1 -1
- package/dist/SimpleProductsSection.js +2 -2
- package/dist/UrgentSaleProductsSection.js +1 -1
- package/dist/{index-CU0KClNt.js → index-B7pgRoP5.js} +1 -1
- package/dist/{index-3TFXgZHA.js → index-DRP1yTKe.js} +13 -18
- package/dist/{index-EE-IJbC3.js → index-DiPwx53C.js} +2 -8
- package/dist/{skeleton-fVxknFUi.js → skeleton-ChyJLfsR.js} +36 -35
- package/dist/skeleton-Dw2U9XhS.cjs +168 -0
- package/dist/{suspense-product-card-detailed-BP1opdKD.js → suspense-product-card-detailed-CFZchhUK.js} +1 -1
- package/dist/{suspense-product-card-simple-BT5gv-kY.js → suspense-product-card-simple-BuJtwiwA.js} +1 -1
- package/package.json +1 -1
- package/dist/skeleton-Bl1q9Yqe.cjs +0 -168
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { s as
|
|
1
|
+
import { jsxs as s, jsx as r, Fragment as u } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as h, Suspense as T, memo as $, useMemo as P } from "react";
|
|
3
|
+
import { s as f } from "./emotion-styled.browser.esm-BNN1dTl3.js";
|
|
4
4
|
import { M as k } from "./consts-BuFChS64.js";
|
|
5
|
-
import { u as
|
|
5
|
+
import { u as R } from "./useDetectMobile-Bkvj0VMa.js";
|
|
6
6
|
import { o as z, p as I, k as b } from "./utils-BPdU4_1q.js";
|
|
7
|
-
import {
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import { P as
|
|
11
|
-
const
|
|
7
|
+
import { B as U, R as W } from "./style-XXDQBreL.js";
|
|
8
|
+
import j from "./Button.js";
|
|
9
|
+
import A from "./Link.js";
|
|
10
|
+
import { P as E } from "./index-DRP1yTKe.js";
|
|
11
|
+
const L = f.div`
|
|
12
12
|
display: grid;
|
|
13
13
|
grid-template-columns: ${(t) => `repeat(${t.limit}, minmax(0, 1fr))`};
|
|
14
14
|
gap: 1.25rem;
|
|
@@ -16,7 +16,7 @@ const E = h.div`
|
|
|
16
16
|
@media (max-width: ${k + "px"}) {
|
|
17
17
|
grid-template-columns: repeat(1, 1fr);
|
|
18
18
|
}
|
|
19
|
-
`,
|
|
19
|
+
`, y = f.div`
|
|
20
20
|
display: flex;
|
|
21
21
|
flex-direction: column;
|
|
22
22
|
width: 100%;
|
|
@@ -26,7 +26,6 @@ const E = h.div`
|
|
|
26
26
|
border-radius: 0.75rem;
|
|
27
27
|
border: 1px solid var(--gray-95008);
|
|
28
28
|
overflow: hidden;
|
|
29
|
-
max-height: 21.5625rem;
|
|
30
29
|
min-height: 21.5625rem;
|
|
31
30
|
cursor: pointer;
|
|
32
31
|
|
|
@@ -62,9 +61,17 @@ const E = h.div`
|
|
|
62
61
|
}
|
|
63
62
|
}
|
|
64
63
|
|
|
64
|
+
& .tags-wr {
|
|
65
|
+
display: flex;
|
|
66
|
+
flex-wrap: wrap;
|
|
67
|
+
|
|
68
|
+
gap: 0.5rem;
|
|
69
|
+
padding: 1rem;
|
|
70
|
+
}
|
|
71
|
+
|
|
65
72
|
@media (max-width: ${k + "px"}) {
|
|
66
73
|
}
|
|
67
|
-
`,
|
|
74
|
+
`, C = f.div`
|
|
68
75
|
padding: 1rem 1rem 0 1rem;
|
|
69
76
|
display: flex;
|
|
70
77
|
flex-direction: column;
|
|
@@ -84,120 +91,124 @@ const E = h.div`
|
|
|
84
91
|
color: var(--gray-700, #4e555f);
|
|
85
92
|
${I(3)}
|
|
86
93
|
}
|
|
87
|
-
`,
|
|
94
|
+
`, _ = h((t, a) => {
|
|
88
95
|
const {
|
|
89
96
|
title: i,
|
|
90
|
-
imageUrl:
|
|
91
|
-
text:
|
|
92
|
-
|
|
93
|
-
|
|
97
|
+
imageUrl: d,
|
|
98
|
+
text: n,
|
|
99
|
+
options: m,
|
|
100
|
+
onCardClick: p,
|
|
101
|
+
readMoreText: o = "Read more"
|
|
94
102
|
} = t;
|
|
95
|
-
return /* @__PURE__ */
|
|
96
|
-
/* @__PURE__ */ r(
|
|
97
|
-
/* @__PURE__ */
|
|
103
|
+
return /* @__PURE__ */ s(y, { ref: a, className: "blog-card", onClick: p, children: [
|
|
104
|
+
/* @__PURE__ */ r(E, { src: d }),
|
|
105
|
+
/* @__PURE__ */ s(C, { children: [
|
|
98
106
|
/* @__PURE__ */ r("div", { className: "text-wr-title", children: i }),
|
|
99
|
-
/* @__PURE__ */ r("div", { className: "text-wr", children:
|
|
107
|
+
/* @__PURE__ */ r("div", { className: "text-wr", children: n })
|
|
100
108
|
] }),
|
|
101
|
-
/* @__PURE__ */ r(
|
|
109
|
+
m && /* @__PURE__ */ r("div", { className: "tags-wr", children: m == null ? void 0 : m.map((l, g) => /* @__PURE__ */ r(U, { color: l == null ? void 0 : l.color, children: l == null ? void 0 : l.name }, g)) }),
|
|
110
|
+
/* @__PURE__ */ r(A, { className: "action", color: "gray", onClick: p, children: o })
|
|
102
111
|
] });
|
|
103
|
-
}),
|
|
112
|
+
}), D = h(({}, t) => (
|
|
104
113
|
// <LandingPageClearProductCardSkeleton />
|
|
105
|
-
/* @__PURE__ */
|
|
114
|
+
/* @__PURE__ */ s(y, { className: "product-card", children: [
|
|
106
115
|
/* @__PURE__ */ r("div", { className: "skeleton-img" }),
|
|
107
116
|
/* @__PURE__ */ r("div", { className: "card-title" }),
|
|
108
|
-
/* @__PURE__ */ r(
|
|
117
|
+
/* @__PURE__ */ r(C, {})
|
|
109
118
|
] })
|
|
110
|
-
)),
|
|
111
|
-
|
|
119
|
+
)), G = ({ limit: t = 3, isLoading: a = !1, keyPrefix: i }) => /* @__PURE__ */ r(u, { children: Array.from({ length: t }, (d, n) => /* @__PURE__ */ r(
|
|
120
|
+
D,
|
|
112
121
|
{
|
|
113
|
-
isLoading:
|
|
122
|
+
isLoading: a
|
|
114
123
|
},
|
|
115
|
-
`${i}-skeleton-product-card-${
|
|
116
|
-
)) }),
|
|
124
|
+
`${i}-skeleton-product-card-${n}`
|
|
125
|
+
)) }), F = ({
|
|
117
126
|
children: t,
|
|
118
|
-
fallbackComponent:
|
|
127
|
+
fallbackComponent: a = /* @__PURE__ */ r(u, {}),
|
|
119
128
|
isLoading: i = !1,
|
|
120
|
-
limit:
|
|
121
|
-
keyPrefix:
|
|
122
|
-
}) => /* @__PURE__ */ r(
|
|
123
|
-
|
|
129
|
+
limit: d,
|
|
130
|
+
keyPrefix: n
|
|
131
|
+
}) => /* @__PURE__ */ r(T, { fallbackComponent: a, children: i === !0 ? /* @__PURE__ */ r(
|
|
132
|
+
G,
|
|
124
133
|
{
|
|
125
134
|
isLoading: i,
|
|
126
|
-
limit:
|
|
127
|
-
keyPrefix:
|
|
135
|
+
limit: d,
|
|
136
|
+
keyPrefix: n
|
|
128
137
|
}
|
|
129
|
-
) : t }), S =
|
|
138
|
+
) : t }), S = $(_), x = h((t, a) => {
|
|
130
139
|
const {
|
|
131
140
|
icon: i,
|
|
132
|
-
title:
|
|
133
|
-
onButtonAction:
|
|
141
|
+
title: d,
|
|
142
|
+
onButtonAction: n = () => {
|
|
134
143
|
},
|
|
135
|
-
onSelectCard:
|
|
144
|
+
onSelectCard: m = () => {
|
|
136
145
|
},
|
|
137
|
-
buttonLink:
|
|
138
|
-
items:
|
|
139
|
-
buttonText:
|
|
140
|
-
limit:
|
|
146
|
+
buttonLink: p,
|
|
147
|
+
items: o,
|
|
148
|
+
buttonText: l,
|
|
149
|
+
limit: g = 3,
|
|
141
150
|
isLoading: N = !1,
|
|
142
|
-
getImage:
|
|
151
|
+
getImage: v = () => {
|
|
143
152
|
},
|
|
144
|
-
readMoreText:
|
|
145
|
-
} = t,
|
|
153
|
+
readMoreText: w = "Read more"
|
|
154
|
+
} = t, B = R(), M = P(() => /* @__PURE__ */ r(u, { children: B === !0 ? o == null ? void 0 : o.map((e, c) => /* @__PURE__ */ r(
|
|
146
155
|
S,
|
|
147
156
|
{
|
|
148
157
|
title: e == null ? void 0 : e.title,
|
|
149
|
-
imageUrl:
|
|
158
|
+
imageUrl: v(e == null ? void 0 : e.imageUrl, e == null ? void 0 : e.uuid) || null,
|
|
150
159
|
text: e == null ? void 0 : e.description,
|
|
151
160
|
titleSlug: e == null ? void 0 : e.titleSlug,
|
|
152
|
-
readMoreText:
|
|
153
|
-
|
|
161
|
+
readMoreText: w,
|
|
162
|
+
options: e == null ? void 0 : e.options,
|
|
163
|
+
onCardClick: () => m(e == null ? void 0 : e.titleSlug)
|
|
154
164
|
},
|
|
155
|
-
|
|
156
|
-
)) :
|
|
165
|
+
c
|
|
166
|
+
)) : o == null ? void 0 : o.slice(0, g).map((e, c) => /* @__PURE__ */ r(
|
|
157
167
|
S,
|
|
158
168
|
{
|
|
159
169
|
title: e == null ? void 0 : e.title,
|
|
160
|
-
imageUrl:
|
|
170
|
+
imageUrl: v(e == null ? void 0 : e.imageUrl, e == null ? void 0 : e.uuid) || null,
|
|
161
171
|
text: e == null ? void 0 : e.description,
|
|
162
172
|
titleSlug: e == null ? void 0 : e.titleSlug,
|
|
163
|
-
readMoreText:
|
|
164
|
-
|
|
173
|
+
readMoreText: w,
|
|
174
|
+
options: e == null ? void 0 : e.options,
|
|
175
|
+
onCardClick: () => m(e == null ? void 0 : e.titleSlug)
|
|
165
176
|
},
|
|
166
|
-
|
|
167
|
-
)) }), [
|
|
168
|
-
return /* @__PURE__ */
|
|
169
|
-
/* @__PURE__ */
|
|
170
|
-
/* @__PURE__ */
|
|
177
|
+
c
|
|
178
|
+
)) }), [o]);
|
|
179
|
+
return /* @__PURE__ */ s(W, { ref: a, children: [
|
|
180
|
+
/* @__PURE__ */ s("div", { className: "regular-title", children: [
|
|
181
|
+
/* @__PURE__ */ s("div", { className: "regular-title-text", children: [
|
|
171
182
|
b(i) && /* @__PURE__ */ r("i", { className: i }),
|
|
172
|
-
/* @__PURE__ */ r("span", { children:
|
|
183
|
+
/* @__PURE__ */ r("span", { children: d })
|
|
173
184
|
] }),
|
|
174
|
-
b(
|
|
175
|
-
|
|
185
|
+
b(p) && /* @__PURE__ */ r(
|
|
186
|
+
j,
|
|
176
187
|
{
|
|
177
188
|
type: "button",
|
|
178
189
|
btnType: "tinted",
|
|
179
190
|
color: "neutral",
|
|
180
191
|
onClick: (e) => {
|
|
181
|
-
var
|
|
182
|
-
(
|
|
192
|
+
var c;
|
|
193
|
+
(c = e == null ? void 0 : e.target) == null || c.blur(), n(p);
|
|
183
194
|
},
|
|
184
195
|
borderRadius: "curved",
|
|
185
196
|
className: "button-link",
|
|
186
|
-
children:
|
|
197
|
+
children: l
|
|
187
198
|
}
|
|
188
199
|
)
|
|
189
200
|
] }),
|
|
190
|
-
/* @__PURE__ */ r(
|
|
191
|
-
|
|
201
|
+
/* @__PURE__ */ r(L, { limit: g, children: /* @__PURE__ */ r(
|
|
202
|
+
F,
|
|
192
203
|
{
|
|
193
204
|
isLoading: N,
|
|
194
|
-
limit:
|
|
205
|
+
limit: g,
|
|
195
206
|
keyPrefix: "explore-landing",
|
|
196
|
-
children:
|
|
207
|
+
children: M
|
|
197
208
|
}
|
|
198
209
|
) })
|
|
199
210
|
] });
|
|
200
211
|
});
|
|
201
212
|
export {
|
|
202
|
-
|
|
213
|
+
x as default
|
|
203
214
|
};
|
|
@@ -5,7 +5,7 @@ import { M as u } from "./consts-BuFChS64.js";
|
|
|
5
5
|
import { u as C } from "./useDetectMobile-Bkvj0VMa.js";
|
|
6
6
|
import { o as f, p as y } from "./utils-BPdU4_1q.js";
|
|
7
7
|
import v from "./Button.js";
|
|
8
|
-
import { P as S } from "./index-
|
|
8
|
+
import { P as S } from "./index-DRP1yTKe.js";
|
|
9
9
|
const x = g.div`
|
|
10
10
|
display: grid;
|
|
11
11
|
grid-template-columns: ${(i) => `repeat(${i.limit}, minmax(0, 1fr))`};
|
|
@@ -7,7 +7,7 @@ import { o as u, p as j, k as S } from "./utils-BPdU4_1q.js";
|
|
|
7
7
|
import { T as E } from "./style-XXDQBreL.js";
|
|
8
8
|
import F from "./Button.js";
|
|
9
9
|
import L from "./Link.js";
|
|
10
|
-
import { P as U } from "./index-
|
|
10
|
+
import { P as U } from "./index-DRP1yTKe.js";
|
|
11
11
|
import { S as _ } from "./index-BRciSeV3.js";
|
|
12
12
|
const D = b.div`
|
|
13
13
|
display: grid;
|
|
@@ -6,7 +6,7 @@ import E from "./Button.js";
|
|
|
6
6
|
import { k as f } from "./utils-BPdU4_1q.js";
|
|
7
7
|
import { u as I } from "./useDetectMobile-Bkvj0VMa.js";
|
|
8
8
|
import { T as $ } from "./style-XXDQBreL.js";
|
|
9
|
-
import { D as L, S as O } from "./suspense-product-card-detailed-
|
|
9
|
+
import { D as L, S as O } from "./suspense-product-card-detailed-CFZchhUK.js";
|
|
10
10
|
import { S as R } from "./index-BRciSeV3.js";
|
|
11
11
|
const W = F.div`
|
|
12
12
|
display: grid;
|
|
@@ -3,7 +3,7 @@ import { forwardRef as g } from "react";
|
|
|
3
3
|
import { s as _ } from "./emotion-styled.browser.esm-BNN1dTl3.js";
|
|
4
4
|
import { M as x } from "./consts-BuFChS64.js";
|
|
5
5
|
import { o as v, l as C } from "./utils-BPdU4_1q.js";
|
|
6
|
-
import { S as F } from "./index-
|
|
6
|
+
import { S as F } from "./index-B7pgRoP5.js";
|
|
7
7
|
const N = _.div`
|
|
8
8
|
width: 100%;
|
|
9
9
|
height: 11.625rem;
|
|
@@ -5,7 +5,7 @@ import { M as k } from "./consts-BuFChS64.js";
|
|
|
5
5
|
import { u as $ } from "./useDetectMobile-Bkvj0VMa.js";
|
|
6
6
|
import { R as U } from "./style-XXDQBreL.js";
|
|
7
7
|
import { p as I, o as b, l as M, k as W } from "./utils-BPdU4_1q.js";
|
|
8
|
-
import { P as j } from "./index-
|
|
8
|
+
import { P as j } from "./index-DRP1yTKe.js";
|
|
9
9
|
const E = p.div`
|
|
10
10
|
width: 100%;
|
|
11
11
|
height: 22.5rem;
|
package/dist/ReviewsSection.js
CHANGED
|
@@ -6,7 +6,7 @@ import { u as P } from "./useDetectMobile-Bkvj0VMa.js";
|
|
|
6
6
|
import { t as R, p as M, o as I, b as j, g as E } from "./utils-BPdU4_1q.js";
|
|
7
7
|
import { useTheme as T } from "./ThemeProvider.js";
|
|
8
8
|
import { P as l } from "./index-CblbdqjE.js";
|
|
9
|
-
import { P as A } from "./index-
|
|
9
|
+
import { P as A } from "./index-DRP1yTKe.js";
|
|
10
10
|
const W = d.div`
|
|
11
11
|
display: flex;
|
|
12
12
|
flex-direction: column;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const t=require("react/jsx-runtime"),c=require("react"),
|
|
1
|
+
"use strict";const t=require("react/jsx-runtime"),c=require("react"),p=require("./emotion-styled.browser.esm-BtEseadx.cjs"),v=require("./utils-DmMdPm9O.cjs"),E=require("./consts-goSZX3xP.cjs"),oe=require("./motion-B_VPZaJq.cjs"),s=require("./index-BpbMKBf_.cjs"),ie=require("./Icon.cjs"),ee=require("./ShopAvatar-CV3lj34D.cjs"),be=require("./Badge.cjs"),G=require("./emotion-element-f0de968e.browser.esm-B7k6i6lC.cjs"),re=require("./IconButton.cjs"),le=require("./useDetectMobile-zkbzoOGV.cjs"),ve=p.styled.div`
|
|
2
2
|
cursor: pointer;
|
|
3
3
|
display: flex;
|
|
4
4
|
gap: 1rem;
|
|
@@ -6,15 +6,15 @@
|
|
|
6
6
|
border-radius: 20px;
|
|
7
7
|
border: 1px solid var(--gray-95008, #14161a14);
|
|
8
8
|
|
|
9
|
-
@media (max-width: ${
|
|
9
|
+
@media (max-width: ${E.MOBILE_SIZE_PX+"px"}) {
|
|
10
10
|
flex-direction: column;
|
|
11
11
|
padding: 0;
|
|
12
12
|
gap: 0;
|
|
13
13
|
border: none;
|
|
14
14
|
border-radius: 0;
|
|
15
15
|
}
|
|
16
|
-
`,
|
|
17
|
-
border-radius: ${e=>
|
|
16
|
+
`,_e=p.styled.div`
|
|
17
|
+
border-radius: ${e=>v.getBorderRadiusValueWithUnits(e.theme,"edged")};
|
|
18
18
|
height: 13.75rem;
|
|
19
19
|
width: 13.75rem;
|
|
20
20
|
min-width: 13.75rem;
|
|
@@ -37,12 +37,12 @@
|
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
@media (max-width: ${
|
|
40
|
+
@media (max-width: ${E.MOBILE_SIZE_PX+"px"}) {
|
|
41
41
|
width: 100%;
|
|
42
42
|
max-width: 100dvh;
|
|
43
43
|
height: 23.438rem;
|
|
44
44
|
}
|
|
45
|
-
`,
|
|
45
|
+
`,Te=p.styled.div`
|
|
46
46
|
flex: 1;
|
|
47
47
|
display: flex;
|
|
48
48
|
flex-direction: column;
|
|
@@ -114,7 +114,7 @@
|
|
|
114
114
|
background-color: transparent;
|
|
115
115
|
}
|
|
116
116
|
|
|
117
|
-
@media (max-width: ${
|
|
117
|
+
@media (max-width: ${E.MOBILE_SIZE_PX+"px"}) {
|
|
118
118
|
padding: 1.25rem;
|
|
119
119
|
|
|
120
120
|
& .campaign-title {
|
|
@@ -128,13 +128,13 @@
|
|
|
128
128
|
gap: 0.25rem;
|
|
129
129
|
}
|
|
130
130
|
}
|
|
131
|
-
`,
|
|
131
|
+
`,te=(e=!1,n=!1,a=!1)=>`
|
|
132
132
|
display: flex;
|
|
133
133
|
${n?"flex-wrap: wrap;":""}
|
|
134
134
|
${n?"":"flex-wrap: nowrap;"}
|
|
135
135
|
${e?"align-items: center;":""}
|
|
136
|
-
${
|
|
137
|
-
`,
|
|
136
|
+
${a?"justify-content: center;":""}
|
|
137
|
+
`,je=p.styled(oe.motion.div)`
|
|
138
138
|
text-decoration: none;
|
|
139
139
|
${e=>e.hasPermission===!0&&"cursor: pointer"};
|
|
140
140
|
|
|
@@ -151,14 +151,14 @@
|
|
|
151
151
|
text-decoration: none;
|
|
152
152
|
}
|
|
153
153
|
|
|
154
|
-
${
|
|
154
|
+
${te(!0)}
|
|
155
155
|
gap: 0.5rem;
|
|
156
156
|
padding: 0.5rem;
|
|
157
157
|
color: var(--gray-950);
|
|
158
158
|
font-weight: 500;
|
|
159
159
|
font-size: 0.875rem;
|
|
160
160
|
line-height: 1.25rem;
|
|
161
|
-
border-radius: ${e=>
|
|
161
|
+
border-radius: ${e=>v.getBorderRadiusValueWithUnits(e.theme,"slight")};
|
|
162
162
|
transition: all 0.25s ease;
|
|
163
163
|
& .description {
|
|
164
164
|
font-size: 0.85rem;
|
|
@@ -167,7 +167,7 @@
|
|
|
167
167
|
font-weight: 400;
|
|
168
168
|
}
|
|
169
169
|
& .logo-wrapper {
|
|
170
|
-
${
|
|
170
|
+
${te(!0,!1,!0)}
|
|
171
171
|
flex-shrink: 0;
|
|
172
172
|
border-radius: 999px;
|
|
173
173
|
|
|
@@ -205,14 +205,14 @@
|
|
|
205
205
|
cursor: pointer;
|
|
206
206
|
background-color: var(--gray-95080, #14161acc);
|
|
207
207
|
}
|
|
208
|
-
`,
|
|
208
|
+
`,Se=p.styled.div`
|
|
209
209
|
position: absolute;
|
|
210
210
|
top: 0.5rem;
|
|
211
211
|
${e=>e.alignToLeft===!0?"left: 0.5rem;":"right: 0.5rem;"}
|
|
212
212
|
display: flex;
|
|
213
213
|
gap: 0.25rem;
|
|
214
|
-
`,$e=
|
|
215
|
-
border-radius: ${e=>
|
|
214
|
+
`,$e=p.styled.div`
|
|
215
|
+
border-radius: ${e=>v.getBorderRadiusValueWithUnits(e.theme,e.borderRadius||"slight")};
|
|
216
216
|
background-color: ${e=>e==null?void 0:e.color};
|
|
217
217
|
color: white;
|
|
218
218
|
height: 1.5rem;
|
|
@@ -227,7 +227,7 @@
|
|
|
227
227
|
& i {
|
|
228
228
|
font-size: 0.813rem;
|
|
229
229
|
}
|
|
230
|
-
`,
|
|
230
|
+
`,Pe=c.forwardRef(({src:e,...n},a)=>{const o=c.useRef();return c.useEffect(()=>{var g;const u=d=>{d.target.src=ee.DefaultShopImage,d.onerror=null};return(g=o==null?void 0:o.current)==null||g.addEventListener("error",u),()=>{var d;(d=o==null?void 0:o.current)==null||d.removeEventListener("error",u)}},[]),t.jsx(c.Fragment,{ref:a,children:v.isDefinedNotEmptyString(e)?t.jsx("img",{ref:o,src:e,...n}):t.jsx("img",{src:ee.DefaultShopImage,...n})})}),ce=e=>{const{uuid:n,hasPermission:a=!0,isUser:o,image:u,name:g,notifications:d=0,color:l="primary",size:m="large",style:h,disabled:$,onClick:b=()=>{},isActive:P,className:T,shopCategory:j,themeData:x}=e,_={theme:G.useTheme(),color:l,size:m,style:h,disabled:$};return c.createElement(je,{onClick:I=>{I.stopPropagation(),a===!0&&(b==null||b())},..._,key:g,className:`profile-item ${T}`,hasPermission:a,isActive:P,themeColor:(x==null?void 0:x.code)||"transparent"},t.jsx("div",{className:"logo-wrapper",children:u}),t.jsxs("div",{children:[t.jsx("div",{className:"name",children:g}),!o&&t.jsx("div",{className:"description",children:j}),d>0&&t.jsx("div",{className:"notifications-number",children:t.jsx(be,{className:"badge",color:"danger",size:"small",children:d>99?"99+":d})})]}))};ce.propTypes={id:s.PropTypes.any,isUserProfile:s.PropTypes.bool,themeColor:s.PropTypes.string,image:s.PropTypes.any,name:s.PropTypes.string,notifications:s.PropTypes.number,style:s.PropTypes.object,className:s.PropTypes.string,color:s.PropTypes.oneOf(["primary","secondary","success","warning","danger","information","neutral"]),size:s.PropTypes.oneOf(["large"]),onSelect:s.PropTypes.func,hasPermission:s.PropTypes.bool};const ne=(e,n)=>{if(!e||!n)return null;const a=e.getTime()-n.getTime(),o=24*60*60*1e3;return a>=0?Math.ceil(a/o):Math.floor(a/o)},se=e=>{if(e!==void 0){const n=new Date(e),a=n.getFullYear(),o=n.getMonth()+1;return`${String(n.getDate()).padStart(2)}. ${o}. ${a}.`}},de=c.forwardRef((e,n)=>{var Q;const a=G.useTheme(),{shopUuid:o,title:u="",coverPhoto:g,onSelect:d,startDate:l,endDate:m,salesPackages:h,shopName:$,shopCategory:b,shopImage:P,className:T,onSelectCard:j=()=>{},onSelectShop:x=()=>{},upcoming:C=!1,upcomingCampaignText:_,campaignSingleText:I,salesCampaignTypes:y=[],startsInPrefixTextPlural:N,startsinSuffixTextPlural:M,startsInPrefixTextSingular:L,startsinSuffixTextSingular:R,endsInPrefixTextPlural:i,endsinSuffixTextPlural:f,endsInPrefixTextSingular:O,endsinSuffixTextSingular:H,themeData:U,numberOfListings:z,numberOfListingsTextSingular:B,numberOfListingsTextPlural:r,...A}=e,Y=l?new Date(l)<=new Date:!1,me=ne(l?new Date(l):null,new Date),q=ne(m?new Date(m):null,new Date),he=q!==null&&q<=2&&q>0,J=m?new Date(m).getTime():null,pe=Date.now(),Z=J!==null?J-pe:null,W=Z!==null&&Z>0&&Z<24*60*60*1e3,K=(S,X,w,k,D)=>w===1?`${S} ${w} ${k}`:`${X} ${w} ${D}`,fe=()=>{if(!m)return null;const S=xe,w=new Date(m).getTime()-S.getTime();if(w<=0)return null;const k=Math.floor(w/(1e3*60*60)),D=Math.floor(w%(1e3*60*60)/(1e3*60)),we=Math.floor(w%(1e3*60)/1e3);return{hours:k,minutes:D,seconds:we}},[xe,ye]=c.useState(new Date);c.useEffect(()=>{if(!W)return;const S=setInterval(()=>{ye(new Date)},1e3);return()=>clearInterval(S)},[W]);const V=W?fe():null;return t.jsxs(ve,{ref:n,theme:a,className:T,onClick:j,...A,children:[t.jsxs(_e,{theme:a,onClick:()=>d==null?void 0:d(),children:[t.jsx("img",{src:g}),t.jsx(Se,{children:h==null?void 0:h.map((S,X)=>{var w,k;return t.jsx($e,{color:(w=y==null?void 0:y.find(D=>D.value===S))==null?void 0:w.color,theme:a,children:t.jsx(ie,{icon:(k=y==null?void 0:y.find(D=>D.value===S))==null?void 0:k.icon})},`package__${X}`)})})]}),t.jsxs(Te,{theme:a,children:[t.jsx("div",{className:"text-block-wrapper",children:t.jsxs("div",{className:"title-block-wrapper",children:[t.jsx("div",{className:"campaign-title",children:(Q=C?_:I)==null?void 0:Q.toUpperCase()}),t.jsx("div",{className:"campaign-title-text",children:u}),m&&l&&t.jsxs("div",{children:[se(l)," - ",se(m)]}),t.jsxs("div",{className:"timestamp-text",children:[z>0&&t.jsxs("span",{className:"listings-text",children:[z," ",z===1?B:r," ","∙"," "]}),t.jsx("span",{className:`duration-text ${he?"urgent":""} ${Y?"":"starts-in"}`,children:W&&V?t.jsxs("div",{className:"countdown-timer",children:[O," ",V.hours.toString().padStart(2,"0"),":",V.minutes.toString().padStart(2,"0"),":",V.seconds.toString().padStart(2,"0")]}):Y?K(O,i,q,H,f):K(L,N,me,R,M)})]})]})}),t.jsx(ce,{hasPermission:!0,image:t.jsx(Pe,{src:P}),themeData:U,isActive:!0,isUser:!1,name:$,shopCategory:b,onClick:()=>x(o)})]})]})});de.propTypes={title:s.PropTypes.oneOfType([s.PropTypes.string,s.PropTypes.element]),numberOfListings:s.PropTypes.number,dropdown:s.PropTypes.any,color:s.PropTypes.string};p.styled.div`
|
|
231
231
|
display: flex;
|
|
232
232
|
flex-direction: column;
|
|
233
233
|
gap: 1.5rem;
|
|
@@ -258,26 +258,26 @@
|
|
|
258
258
|
}
|
|
259
259
|
}
|
|
260
260
|
|
|
261
|
-
@media (max-width: ${
|
|
261
|
+
@media (max-width: ${E.MOBILE_SIZE_PX+"px"}) {
|
|
262
262
|
& .campaign-item {
|
|
263
263
|
min-width: 100%;
|
|
264
264
|
width: 100%;
|
|
265
265
|
margin-right: 0;
|
|
266
266
|
}
|
|
267
267
|
}
|
|
268
|
-
`;const F=
|
|
268
|
+
`;const F=p.styled.div`
|
|
269
269
|
width: ${e=>e.width||"100%"};
|
|
270
270
|
height: ${e=>(e.heightCoeff||1)*1.125}rem;
|
|
271
271
|
background-color: var(--gray-200, #dddfe4);
|
|
272
272
|
|
|
273
|
-
${
|
|
274
|
-
`,
|
|
273
|
+
${v.linearGradientAnimation("-90deg")}
|
|
274
|
+
`,Ce=p.styled.div`
|
|
275
275
|
display: flex;
|
|
276
276
|
flex-direction: ${e=>e!=null&&e.row?"row":"column"};
|
|
277
277
|
gap: ${e=>(e==null?void 0:e.gap)??"0.5rem"};
|
|
278
278
|
width: ${e=>(e==null?void 0:e.width)??"100%"};
|
|
279
|
-
`,
|
|
280
|
-
border-radius: ${e=>
|
|
279
|
+
`,ae=p.styled.div`
|
|
280
|
+
border-radius: ${e=>v.getBorderRadiusValueWithUnits(e.theme,(e==null?void 0:e.borderRadius)??"regular")};
|
|
281
281
|
background: var(--gray-200, #dddfe4);
|
|
282
282
|
position: relative;
|
|
283
283
|
max-height: ${e=>(e==null?void 0:e.height)??"5rem"};
|
|
@@ -286,10 +286,10 @@
|
|
|
286
286
|
width: ${e=>(e==null?void 0:e.width)??"5rem"};
|
|
287
287
|
flex-shrink: 0;
|
|
288
288
|
|
|
289
|
-
${
|
|
290
|
-
`,
|
|
289
|
+
${v.linearGradientAnimation()}
|
|
290
|
+
`,Ie=p.styled.div`
|
|
291
291
|
background: var(--white, #fff);
|
|
292
|
-
border-radius: ${e=>
|
|
292
|
+
border-radius: ${e=>v.getBorderRadiusValueWithUnits(e.theme,"edged")};
|
|
293
293
|
box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.1), 0px 1px 2px rgba(0, 0, 0, 0.06);
|
|
294
294
|
border: 1px solid var(--gray-95012, #14161a1f);
|
|
295
295
|
|
|
@@ -316,17 +316,17 @@
|
|
|
316
316
|
gap: 0.5rem;
|
|
317
317
|
}
|
|
318
318
|
|
|
319
|
-
@media (max-width: ${
|
|
319
|
+
@media (max-width: ${E.MOBILE_SIZE_PX+"px"}) {
|
|
320
320
|
flex-direction: column;
|
|
321
321
|
|
|
322
322
|
& .campaign__user {
|
|
323
323
|
margin-top: 1rem;
|
|
324
324
|
}
|
|
325
325
|
}
|
|
326
|
-
`,
|
|
326
|
+
`,De=p.styled.div`
|
|
327
327
|
display: flex;
|
|
328
328
|
gap: 1.5rem;
|
|
329
|
-
`,
|
|
329
|
+
`,Ne=c.forwardRef(({},e)=>{const n=G.useTheme();return t.jsxs(Ie,{ref:e,theme:n,children:[t.jsx("div",{className:"campaign__left-section",children:t.jsx(ae,{theme:n,width:"15rem",height:"15rem",borderRadius:"edged"})}),t.jsxs("div",{className:"campaign__right-section",children:[t.jsxs(Ce,{theme:n,children:[t.jsx(F,{heightCoeff:.75,theme:n,width:"35%"}),t.jsx(F,{heightCoeff:1.25,theme:n}),t.jsx(F,{heightCoeff:3,theme:n})]}),t.jsxs("div",{className:"campaign__user",children:[t.jsx(ae,{theme:n,width:"2.5rem",height:"2.5rem",borderRadius:"curved"}),t.jsx(F,{theme:n,width:"75%"})]})]})]})}),ke=({itemsCount:e=5,keyPrefix:n})=>t.jsx(De,{children:Array.from({length:e},(a,o)=>t.jsx(Ne,{},`${n}-skeleton-campaign-card-${o}`))}),Ee=({children:e,fallbackComponent:n=t.jsx(t.Fragment,{}),isLoading:a=!1,itemsCount:o=5,keyPrefix:u})=>t.jsx(c.Suspense,{fallback:n,children:a===!0?t.jsx(ke,{itemsCount:o,keyPrefix:u}):e}),Me=p.styled.div`
|
|
330
330
|
margin: 0 auto;
|
|
331
331
|
display: flex;
|
|
332
332
|
flex-direction: column;
|
|
@@ -367,16 +367,16 @@
|
|
|
367
367
|
top: 0;
|
|
368
368
|
right: 0;
|
|
369
369
|
}
|
|
370
|
-
`,
|
|
370
|
+
`,Le=p.styled(oe.motion.div)`
|
|
371
371
|
display: grid;
|
|
372
372
|
grid-template-columns: repeat(${e=>e==null?void 0:e.numOfColumns}, 1fr);
|
|
373
373
|
gap: 1.5rem;
|
|
374
374
|
width: 100%;
|
|
375
375
|
|
|
376
|
-
@media (max-width: ${
|
|
376
|
+
@media (max-width: ${E.MOBILE_SIZE_PX+"px"}) {
|
|
377
377
|
grid-template-columns: repeat(${e=>e==null?void 0:e.numOfColumnsForMobile}, 1fr);
|
|
378
378
|
}
|
|
379
|
-
`,
|
|
379
|
+
`,ge=c.forwardRef(({icon:e,title:n,numOfSlides:a=2,numOfSlidesForMobile:o=1,showNavigation:u=!0,children:g},d)=>{const[l,m]=c.useState(0),[h,$]=c.useState(1),[b,P]=c.useState(null),[T,j]=c.useState(null),x=le.useDetectMobile(),C=50,_=(g==null?void 0:g.length)??1;c.useEffect(()=>{const i=()=>{$(x?o:a)};return window.addEventListener("resize",i),i(),()=>window.removeEventListener("resize",i)},[]);const I=g==null?void 0:g.slice(l,l+h),y=i=>{var f;(f=i==null?void 0:i.target)==null||f.blur(),l+h<_&&m(l+h)},N=i=>{var f;(f=i==null?void 0:i.target)==null||f.blur(),l-h>=0&&m(l-h)},M=i=>{var f;j(null),P((f=i==null?void 0:i.targetTouches["0"])==null?void 0:f.clientX)},L=i=>{var f;j((f=i==null?void 0:i.targetTouches["0"])==null?void 0:f.clientX)},R=()=>{if(!b||!T)return;const i=b-T;i>C&&y(),i<-C&&N()};return t.jsxs(Me,{ref:d,...x?{onTouchStart:M,onTouchMove:L,onTouchEnd:R}:{},children:[t.jsx("div",{className:"scrollable-section__header",children:t.jsxs("div",{className:"scrollable-section__title",children:[v.isDefinedNotEmptyString(e)&&t.jsx(ie,{icon:e,color:"primary",sizeInUnits:"1.5rem",className:"title__icon"}),v.isDefinedNotEmptyString(n)&&t.jsx("div",{className:"title__text",children:n})]})}),t.jsx(Le,{numOfColumns:a,numOfColumnsForMobile:o,animate:{x:0,opacity:1},initial:{x:10,opacity:0},children:I},`scrollable-section__content-${l}`),u&&_>h&&!x&&t.jsxs("div",{className:"scrollable-section__navigation",children:[t.jsx(re,{icon:"angle-left",borderRadius:"curved",btnType:"tinted",color:"neutral",className:"navigation__arrow",disabled:l===0,onClick:N}),t.jsx(re,{icon:"angle-right",borderRadius:"curved",btnType:"tinted",color:"neutral",className:"navigation__arrow",disabled:l+h>=_,onClick:y})]})]})});ge.propTypes={icon:s.PropTypes.string,title:s.PropTypes.string,numOfSlides:s.PropTypes.number,numOfSlidesForMobile:s.PropTypes.number,showNavigation:s.PropTypes.bool};const Re=p.styled.div`
|
|
380
380
|
display: flex;
|
|
381
381
|
flex: 1;
|
|
382
382
|
width: 100%;
|
|
@@ -393,4 +393,4 @@
|
|
|
393
393
|
border-radius: 1.25rem;
|
|
394
394
|
object-fit: cover;
|
|
395
395
|
}
|
|
396
|
-
`,
|
|
396
|
+
`,ue=c.forwardRef(({sectionName:e,imageUrl:n,maxHeight:a="16.25rem",className:o="",handleClick:u=()=>{}})=>t.jsx(Re,{maxHeight:a,onClick:u,className:`itemless-banner ${o}`,children:t.jsx("img",{src:n,alt:`itemless-banner__${e}`})}));ue.propTypes={sectionName:s.PropTypes.string,imageUrl:s.PropTypes.string,maxHeight:s.PropTypes.string,className:s.PropTypes.string,handleClick:s.PropTypes.func};const ze=c.memo(de),Oe=c.forwardRef(({sellerType:e="Shop",items:n=[],title:a,icon:o,isLoading:u,onSelectCard:g=()=>{},onSelectShop:d=()=>{},getImage:l=()=>{},campaignSingleText:m,upcomingCampaignText:h,salesCampaignTypes:$=[],startsInPrefixTextPlural:b,startsinSuffixTextPlural:P,startsInPrefixTextSingular:T,startsinSuffixTextSingular:j,endsInPrefixTextPlural:x,endsinSuffixTextPlural:C,endsInPrefixTextSingular:_,endsinSuffixTextSingular:I,numOfSlides:y=2,numOfSlidesForMobile:N=1,showNavigation:M=!0,numberOfListingsTextSingular:L,numberOfListingsTextPlural:R,itemlessImageUrl:i,itemlessLink:f,handleItemlessLink:O=()=>{}},H)=>{const U=le.useDetectMobile(),z=c.useMemo(()=>{let B=n==null?void 0:n.map((r,A)=>t.jsx(ze,{className:"campaign-item",coverPhoto:l(r==null?void 0:r.coverPhoto,(r==null?void 0:r.uuid)||(r==null?void 0:r.campaignUuid)),description:r==null?void 0:r.description,endDate:r==null?void 0:r.endDate,salesPackages:r==null?void 0:r.salesPackages,sellerType:e,shopImage:r==null?void 0:r.profileImage,shopName:r==null?void 0:r.shopName,shopUuid:r==null?void 0:r.shopUuid,shopCategory:r==null?void 0:r.shopCategory,startDate:r==null?void 0:r.startDate,title:r==null?void 0:r.name,uuid:r==null?void 0:r.campaignUuid,onSelectCard:()=>g(r==null?void 0:r.campaignUuid,r==null?void 0:r.shopUuid),onSelectShop:()=>d(r==null?void 0:r.shopUuid),campaignSingleText:m,upcomingCampaignText:h,upcoming:r==null?void 0:r.upcoming,salesCampaignTypes:$,startsInPrefixTextPlural:b,startsinSuffixTextPlural:P,startsInPrefixTextSingular:T,startsinSuffixTextSingular:j,endsInPrefixTextPlural:x,endsinSuffixTextPlural:C,endsInPrefixTextSingular:_,endsinSuffixTextSingular:I,themeData:r==null?void 0:r.themeData,numberOfListings:r==null?void 0:r.numberOfListings,numberOfListingsTextSingular:L,numberOfListingsTextPlural:R},`campaign__item__${A}__${r==null?void 0:r.startDate}___${r==null?void 0:r.endDate}`));return(n==null?void 0:n.length)<2&&!U?[...B,t.jsx(ue,{imageUrl:i,className:"campaign-item",handleClick:O})]:B},[n]);return t.jsx(Ee,{isLoading:u,itemsCount:U?1:2,keyPrefix:"sales-camp",children:t.jsx(ge,{icon:o,title:a,numOfSlides:y,numOfSlidesForMobile:N,showNavigation:M,children:z})})});module.exports=Oe;
|