@lanaco/lnc-react-ui 4.0.183 → 4.0.185
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/BlogCardsSponsoredSection.cjs +5 -3
- package/dist/BlogCardsSponsoredSection.js +68 -64
- package/dist/BlogCategoryCardsSection.cjs +1 -1
- package/dist/BlogCategoryCardsSection.js +1 -1
- package/dist/BlogListSection.cjs +8 -6
- package/dist/BlogListSection.js +122 -114
- package/dist/BlogProductCardsSection.cjs +1 -1
- package/dist/BlogProductCardsSection.js +1 -1
- package/dist/BlogShopCardsSection.cjs +1 -1
- package/dist/BlogShopCardsSection.js +1 -1
- package/dist/BlogSingleSection.cjs +1 -1
- package/dist/BlogSingleSection.js +1 -1
- package/dist/BlogsSectionDetailed.cjs +5 -3
- package/dist/BlogsSectionDetailed.js +53 -49
- package/dist/BlogsSectionLarge.cjs +2 -2
- package/dist/BlogsSectionLarge.js +2 -2
- package/dist/BlogsSectionSimple.cjs +9 -7
- package/dist/BlogsSectionSimple.js +53 -47
- package/dist/BlogsSectionSimpleCentered.cjs +7 -5
- package/dist/BlogsSectionSimpleCentered.js +31 -26
- package/dist/BlogsSectionWithFilters.cjs +9 -7
- package/dist/BlogsSectionWithFilters.js +47 -42
- package/dist/BrandHitsSection.cjs +9 -7
- package/dist/BrandHitsSection.js +40 -35
- package/dist/{CategorySimpleCard-BNYjZQTH.cjs → CategorySimpleCard-D5N8cx0Z.cjs} +4 -3
- package/dist/{CategorySimpleCard-BA0S7TaN.js → CategorySimpleCard-DRQuoxXu.js} +17 -15
- package/dist/CheckBoxInput.cjs +27 -27
- package/dist/CheckBoxInput.js +61 -98
- package/dist/ColorInput.cjs +26 -26
- package/dist/ColorInput.js +127 -162
- package/dist/DetailedProductsInfinitiveSection.cjs +2 -2
- package/dist/DetailedProductsInfinitiveSection.js +6 -5
- package/dist/DetailedProductsSection.cjs +2 -2
- package/dist/DetailedProductsSection.js +12 -10
- package/dist/FieldOfInterestsMasonrySection.cjs +5 -3
- package/dist/FieldOfInterestsMasonrySection.js +90 -85
- package/dist/FieldOfInterestsWithAvatarsCardsSection.cjs +4 -4
- package/dist/FieldOfInterestsWithAvatarsCardsSection.js +49 -46
- package/dist/FieldOfInterestsWithTagsCardsSection.cjs +8 -6
- package/dist/FieldOfInterestsWithTagsCardsSection.js +44 -40
- package/dist/GeneralWithTagsCardsSection.cjs +12 -8
- package/dist/GeneralWithTagsCardsSection.js +50 -44
- package/dist/GiftCardsSection.cjs +7 -5
- package/dist/GiftCardsSection.js +46 -40
- package/dist/MasonryGeneralCardsSection.cjs +6 -5
- package/dist/MasonryGeneralCardsSection.js +26 -23
- package/dist/Modal.cjs +14 -13
- package/dist/Modal.js +88 -86
- package/dist/OverlayGeneralCardsSection.cjs +7 -5
- package/dist/OverlayGeneralCardsSection.js +30 -35
- package/dist/ProductsWithBannerSection.cjs +8 -6
- package/dist/ProductsWithBannerSection.js +71 -77
- package/dist/QuattroCardsSection.cjs +8 -6
- package/dist/QuattroCardsSection.js +31 -28
- package/dist/ReviewsSection.cjs +11 -9
- package/dist/ReviewsSection.js +38 -36
- package/dist/SalesCampaignsSection.cjs +22 -19
- package/dist/SalesCampaignsSection.js +299 -300
- package/dist/ShopCardsSection.cjs +1 -1
- package/dist/ShopCardsSection.js +1 -1
- package/dist/SimpleCategoriesSection.cjs +2 -2
- package/dist/SimpleCategoriesSection.js +7 -3
- package/dist/SimpleProductsSection.cjs +5 -5
- package/dist/SimpleProductsSection.js +62 -72
- package/dist/UrgentSaleProductsSection.cjs +6 -6
- package/dist/UrgentSaleProductsSection.js +9 -7
- package/dist/{index-DoKMLSVY.cjs → index-0p_3g3pT.cjs} +4 -2
- package/dist/{index-Bhfq_YpE.js → index-BipuzfLW.js} +28 -25
- package/dist/{index-CaAhRJ2-.cjs → index-Bmr3IeZ_.cjs} +12 -11
- package/dist/{index-DWLKvVyZ.js → index-C8QkdNHi.js} +27 -23
- package/dist/{index-B8I1mHMA.js → index-CA59z2ge.js} +29 -26
- package/dist/{index-BnYqZk-h.cjs → index-DHV9awrE.cjs} +4 -2
- package/dist/{index-DxZ71UZ1.js → index-DZ8515cZ.js} +144 -137
- package/dist/{index-D55MR8tU.cjs → index-MiN854X_.cjs} +6 -4
- package/package.json +1 -1
package/dist/ColorInput.js
CHANGED
|
@@ -1,26 +1,25 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { s as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { u as Z } from "./
|
|
8
|
-
|
|
9
|
-
const R = (e, n) => `calc(${u(e, n)} - 1rem)`, ee = z.label`
|
|
1
|
+
import { jsx as a, jsxs as p } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as q, useState as S, useCallback as G } from "react";
|
|
3
|
+
import { s as w } from "./emotion-styled.browser.esm-BNN1dTl3.js";
|
|
4
|
+
import { c as J, d as r, b as d, a as V, e as v, f as M, h as Q } from "./utils-Dc5zIpaz.js";
|
|
5
|
+
import { d as X } from "./index-Dt62UGku.js";
|
|
6
|
+
import { u as Y } from "./emotion-element-f0de968e.browser.esm-CkCiQliQ.js";
|
|
7
|
+
import { u as Z } from "./useUpdateEffect-CuYWz7EA.js";
|
|
8
|
+
const R = (e, t) => `calc(${r(e, t)} - 1rem)`, _ = w.label`
|
|
10
9
|
display: inline-flex;
|
|
11
10
|
align-items: center;
|
|
12
11
|
gap: 0.5rem;
|
|
13
|
-
${(e) =>
|
|
14
|
-
min-height: ${(e) =>
|
|
15
|
-
max-height: ${(e) =>
|
|
16
|
-
background-color: ${(e) =>
|
|
12
|
+
${(e) => J(e.theme, "Input", e.size, "enabled")};
|
|
13
|
+
min-height: ${(e) => r(e.theme, e.size)};
|
|
14
|
+
max-height: ${(e) => r(e.theme, e.size)};
|
|
15
|
+
background-color: ${(e) => d(
|
|
17
16
|
e.theme,
|
|
18
17
|
"Input",
|
|
19
18
|
e.color,
|
|
20
19
|
"enabled",
|
|
21
20
|
"background"
|
|
22
21
|
)};
|
|
23
|
-
color: ${(e) =>
|
|
22
|
+
color: ${(e) => d(
|
|
24
23
|
e.theme,
|
|
25
24
|
"Input",
|
|
26
25
|
e.isFocused ? "primary" : e.color,
|
|
@@ -28,19 +27,19 @@ const R = (e, n) => `calc(${u(e, n)} - 1rem)`, ee = z.label`
|
|
|
28
27
|
"text"
|
|
29
28
|
)};
|
|
30
29
|
border: 1px solid
|
|
31
|
-
${(e) =>
|
|
30
|
+
${(e) => d(
|
|
32
31
|
e.theme,
|
|
33
32
|
"Input",
|
|
34
33
|
e.isFocused ? "primary" : e.color,
|
|
35
34
|
"enabled",
|
|
36
35
|
"border"
|
|
37
36
|
)};
|
|
38
|
-
border-radius: ${(e) =>
|
|
37
|
+
border-radius: ${(e) => V(e.theme, "regular")};
|
|
39
38
|
padding: 0.625rem 0.75rem;
|
|
40
39
|
width: 100%;
|
|
41
|
-
${(e) => !e.disabled && e.readOnly !== !0 && e.isFocused === !0 &&
|
|
42
|
-
/* ${(e) => e.disabled === !0 &&
|
|
43
|
-
${(e) => e.disabled === !0 && `background-color: ${
|
|
40
|
+
${(e) => !e.disabled && e.readOnly !== !0 && e.isFocused === !0 && v(e.theme)};
|
|
41
|
+
/* ${(e) => e.disabled === !0 && M(e.theme)} */
|
|
42
|
+
${(e) => e.disabled === !0 && `background-color: ${d(
|
|
44
43
|
e.theme,
|
|
45
44
|
"Input",
|
|
46
45
|
e.color,
|
|
@@ -48,34 +47,34 @@ const R = (e, n) => `calc(${u(e, n)} - 1rem)`, ee = z.label`
|
|
|
48
47
|
"background",
|
|
49
48
|
"backgroundOpacity"
|
|
50
49
|
)};
|
|
51
|
-
color: ${(
|
|
52
|
-
|
|
50
|
+
color: ${(t) => d(
|
|
51
|
+
t.theme,
|
|
53
52
|
"Input",
|
|
54
|
-
|
|
53
|
+
t.color,
|
|
55
54
|
"disabled",
|
|
56
55
|
"text"
|
|
57
56
|
)};`}
|
|
58
|
-
border: 1px solid ${(e) =>
|
|
59
|
-
`,
|
|
57
|
+
border: 1px solid ${(e) => d(e.theme, "Input", e.color, "disabled", "border")};
|
|
58
|
+
`, ee = w.div`
|
|
60
59
|
${(e) => !e.disabled && e.readOnly !== !0 && "cursor: pointer;"}
|
|
61
|
-
min-height: ${(e) =>
|
|
62
|
-
max-height: ${(e) =>
|
|
60
|
+
min-height: ${(e) => r(e.theme, e.size)};
|
|
61
|
+
max-height: ${(e) => r(e.theme, e.size)};
|
|
63
62
|
display: inline-flex;
|
|
64
63
|
align-items: center;
|
|
65
64
|
justify-content: center;
|
|
66
65
|
${(e) => e.withInput == !0 && "width: 100%;"}
|
|
67
66
|
& div {
|
|
68
67
|
&:focus {
|
|
69
|
-
${(e) => e.disabled !== !0 && e.withInput !== !0 && e.readOnly !== !0 &&
|
|
68
|
+
${(e) => e.disabled !== !0 && e.withInput !== !0 && e.readOnly !== !0 && v(e.theme)};
|
|
70
69
|
}
|
|
71
70
|
&:hover {
|
|
72
|
-
${(e) => !e.disabled && !e.withInput && e.readOnly !== !0 &&
|
|
71
|
+
${(e) => !e.disabled && !e.withInput && e.readOnly !== !0 && v(e.theme)};
|
|
73
72
|
}
|
|
74
73
|
${(e) => e.disabled === !0 && `opacity: ${e.theme.palette.opacity[e.theme.palette.disabled.opacity]};`}
|
|
75
74
|
box-sizing: border-box;
|
|
76
75
|
min-width: ${(e) => R(e.theme, e.size)};
|
|
77
76
|
height: ${(e) => R(e.theme, e.size)};
|
|
78
|
-
border-radius: ${(e) =>
|
|
77
|
+
border-radius: ${(e) => V(e.theme, "curved")};
|
|
79
78
|
overflow: hidden;
|
|
80
79
|
& input[type="color"] {
|
|
81
80
|
border: 0;
|
|
@@ -84,8 +83,8 @@ const R = (e, n) => `calc(${u(e, n)} - 1rem)`, ee = z.label`
|
|
|
84
83
|
height: 200%;
|
|
85
84
|
cursor: pointer;
|
|
86
85
|
transform: translate(-25%, -25%);
|
|
87
|
-
/* ${(e) => e.disabled === !0 &&
|
|
88
|
-
${(e) => e.disabled === !0 && `background-color: ${
|
|
86
|
+
/* ${(e) => e.disabled === !0 && Q(e.theme)}; */
|
|
87
|
+
${(e) => e.disabled === !0 && `background-color: ${d(
|
|
89
88
|
e.theme,
|
|
90
89
|
"Input",
|
|
91
90
|
e.color,
|
|
@@ -93,16 +92,16 @@ const R = (e, n) => `calc(${u(e, n)} - 1rem)`, ee = z.label`
|
|
|
93
92
|
"background",
|
|
94
93
|
"backgroundOpacity"
|
|
95
94
|
)};
|
|
96
|
-
color: ${(
|
|
97
|
-
|
|
95
|
+
color: ${(t) => d(
|
|
96
|
+
t.theme,
|
|
98
97
|
"Input",
|
|
99
|
-
|
|
98
|
+
t.color,
|
|
100
99
|
"disabled",
|
|
101
100
|
"text"
|
|
102
101
|
)};`}
|
|
103
102
|
}
|
|
104
103
|
}
|
|
105
|
-
`,
|
|
104
|
+
`, te = w.span`
|
|
106
105
|
display: flex;
|
|
107
106
|
align-items: center;
|
|
108
107
|
overflow: hidden;
|
|
@@ -113,174 +112,140 @@ const R = (e, n) => `calc(${u(e, n)} - 1rem)`, ee = z.label`
|
|
|
113
112
|
background-color: transparent;
|
|
114
113
|
width: 100%;
|
|
115
114
|
}
|
|
116
|
-
`,
|
|
115
|
+
`, ue = q((e, t) => {
|
|
117
116
|
const {
|
|
118
|
-
id:
|
|
119
|
-
name:
|
|
120
|
-
defaultValue:
|
|
117
|
+
id: u,
|
|
118
|
+
name: g,
|
|
119
|
+
defaultValue: z = "#000000",
|
|
121
120
|
value: i,
|
|
122
|
-
size:
|
|
123
|
-
tabIndex:
|
|
124
|
-
withInput:
|
|
125
|
-
className:
|
|
126
|
-
style:
|
|
127
|
-
color:
|
|
128
|
-
debounceTime:
|
|
129
|
-
readOnly:
|
|
130
|
-
disabled:
|
|
131
|
-
onChange:
|
|
121
|
+
size: F = "small",
|
|
122
|
+
tabIndex: $,
|
|
123
|
+
withInput: f = !1,
|
|
124
|
+
className: T = "",
|
|
125
|
+
style: j = {},
|
|
126
|
+
color: s = "primary",
|
|
127
|
+
debounceTime: D = 0,
|
|
128
|
+
readOnly: o,
|
|
129
|
+
disabled: l,
|
|
130
|
+
onChange: y = () => {
|
|
132
131
|
},
|
|
133
|
-
onFocus:
|
|
132
|
+
onFocus: U = () => {
|
|
134
133
|
},
|
|
135
|
-
onBlur:
|
|
134
|
+
onBlur: E = () => {
|
|
136
135
|
},
|
|
137
|
-
onInput:
|
|
136
|
+
onInput: W = () => {
|
|
138
137
|
},
|
|
139
|
-
onKeyDown:
|
|
138
|
+
onKeyDown: A = () => {
|
|
140
139
|
},
|
|
141
|
-
labelRef:
|
|
140
|
+
labelRef: H,
|
|
142
141
|
inputProps: x,
|
|
143
|
-
...
|
|
144
|
-
} = e,
|
|
145
|
-
|
|
146
|
-
const
|
|
147
|
-
|
|
148
|
-
[
|
|
149
|
-
),
|
|
150
|
-
|
|
151
|
-
}, h = (
|
|
152
|
-
i &&
|
|
153
|
-
},
|
|
154
|
-
B(!0),
|
|
155
|
-
},
|
|
156
|
-
|
|
142
|
+
...k
|
|
143
|
+
} = e, O = Y(), [c, I] = S(i), [K, B] = S(!1), L = new RegExp(/^#[0-9A-F]{6}$/i);
|
|
144
|
+
Z(() => I(i), [i]);
|
|
145
|
+
const N = G(
|
|
146
|
+
X((n, C) => P(n, C), D),
|
|
147
|
+
[y]
|
|
148
|
+
), P = (n, C) => {
|
|
149
|
+
y && y(n, C);
|
|
150
|
+
}, h = (n) => {
|
|
151
|
+
i && I(n.target.value), N(n, n.target.value);
|
|
152
|
+
}, m = (n) => {
|
|
153
|
+
B(!0), U(n);
|
|
154
|
+
}, b = (n) => {
|
|
155
|
+
L.test(c) || I(z), B(!1), E(n);
|
|
157
156
|
};
|
|
158
|
-
return /* @__PURE__ */
|
|
159
|
-
|
|
157
|
+
return /* @__PURE__ */ a(
|
|
158
|
+
ee,
|
|
160
159
|
{
|
|
161
|
-
ref:
|
|
162
|
-
theme:
|
|
163
|
-
size:
|
|
164
|
-
className:
|
|
165
|
-
style:
|
|
166
|
-
disabled:
|
|
167
|
-
readOnly:
|
|
168
|
-
withInput:
|
|
169
|
-
...
|
|
170
|
-
children:
|
|
171
|
-
|
|
160
|
+
ref: t,
|
|
161
|
+
theme: O,
|
|
162
|
+
size: F,
|
|
163
|
+
className: T,
|
|
164
|
+
style: j,
|
|
165
|
+
disabled: l,
|
|
166
|
+
readOnly: o,
|
|
167
|
+
withInput: f,
|
|
168
|
+
...k,
|
|
169
|
+
children: f ? /* @__PURE__ */ p(
|
|
170
|
+
_,
|
|
172
171
|
{
|
|
173
|
-
withInput:
|
|
174
|
-
theme:
|
|
175
|
-
color:
|
|
176
|
-
size:
|
|
177
|
-
disabled:
|
|
178
|
-
readOnly:
|
|
179
|
-
tabIndex:
|
|
180
|
-
isFocused:
|
|
172
|
+
withInput: f,
|
|
173
|
+
theme: O,
|
|
174
|
+
color: s,
|
|
175
|
+
size: F,
|
|
176
|
+
disabled: l,
|
|
177
|
+
readOnly: o,
|
|
178
|
+
tabIndex: $,
|
|
179
|
+
isFocused: K,
|
|
181
180
|
children: [
|
|
182
|
-
/* @__PURE__ */
|
|
181
|
+
/* @__PURE__ */ a("div", { children: /* @__PURE__ */ a(
|
|
183
182
|
"input",
|
|
184
183
|
{
|
|
185
184
|
type: "color",
|
|
186
|
-
ref:
|
|
187
|
-
id:
|
|
188
|
-
name:
|
|
189
|
-
value:
|
|
190
|
-
disabled:
|
|
185
|
+
ref: t,
|
|
186
|
+
id: u,
|
|
187
|
+
name: g,
|
|
188
|
+
value: c,
|
|
189
|
+
disabled: l || o,
|
|
191
190
|
onChange: h,
|
|
192
|
-
onBlur:
|
|
193
|
-
onFocus:
|
|
194
|
-
color:
|
|
191
|
+
onBlur: b,
|
|
192
|
+
onFocus: m,
|
|
193
|
+
color: s,
|
|
195
194
|
...x
|
|
196
195
|
}
|
|
197
196
|
) }),
|
|
198
|
-
/* @__PURE__ */
|
|
197
|
+
/* @__PURE__ */ a(te, { children: /* @__PURE__ */ a(
|
|
199
198
|
"input",
|
|
200
199
|
{
|
|
201
|
-
ref:
|
|
202
|
-
value:
|
|
200
|
+
ref: H,
|
|
201
|
+
value: c,
|
|
203
202
|
onChange: h,
|
|
204
|
-
onFocus:
|
|
205
|
-
onBlur:
|
|
206
|
-
onInput:
|
|
207
|
-
onKeyDown:
|
|
208
|
-
disabled:
|
|
209
|
-
...
|
|
203
|
+
onFocus: m,
|
|
204
|
+
onBlur: b,
|
|
205
|
+
onInput: W,
|
|
206
|
+
onKeyDown: A,
|
|
207
|
+
disabled: l || o,
|
|
208
|
+
...k
|
|
210
209
|
}
|
|
211
210
|
) })
|
|
212
211
|
]
|
|
213
212
|
}
|
|
214
|
-
) : /* @__PURE__ */
|
|
213
|
+
) : /* @__PURE__ */ a("div", { children: i == null || i == "undefined" ? /* @__PURE__ */ a(
|
|
215
214
|
"input",
|
|
216
215
|
{
|
|
217
216
|
type: "color",
|
|
218
|
-
ref:
|
|
219
|
-
id:
|
|
220
|
-
name:
|
|
221
|
-
defaultValue:
|
|
222
|
-
disabled:
|
|
217
|
+
ref: t,
|
|
218
|
+
id: u,
|
|
219
|
+
name: g,
|
|
220
|
+
defaultValue: z,
|
|
221
|
+
disabled: l || o,
|
|
223
222
|
onChange: h,
|
|
224
|
-
onBlur:
|
|
225
|
-
onFocus:
|
|
226
|
-
color:
|
|
227
|
-
tabIndex:
|
|
223
|
+
onBlur: b,
|
|
224
|
+
onFocus: m,
|
|
225
|
+
color: s,
|
|
226
|
+
tabIndex: $,
|
|
228
227
|
...x
|
|
229
228
|
}
|
|
230
|
-
) : /* @__PURE__ */
|
|
229
|
+
) : /* @__PURE__ */ a(
|
|
231
230
|
"input",
|
|
232
231
|
{
|
|
233
232
|
type: "color",
|
|
234
|
-
ref:
|
|
235
|
-
id:
|
|
236
|
-
name:
|
|
237
|
-
value:
|
|
238
|
-
disabled:
|
|
233
|
+
ref: t,
|
|
234
|
+
id: u,
|
|
235
|
+
name: g,
|
|
236
|
+
value: c,
|
|
237
|
+
disabled: l || o,
|
|
239
238
|
onChange: h,
|
|
240
|
-
onBlur:
|
|
241
|
-
onFocus:
|
|
242
|
-
color:
|
|
243
|
-
tabIndex:
|
|
239
|
+
onBlur: b,
|
|
240
|
+
onFocus: m,
|
|
241
|
+
color: s,
|
|
242
|
+
tabIndex: $,
|
|
244
243
|
...x
|
|
245
244
|
}
|
|
246
245
|
) })
|
|
247
246
|
}
|
|
248
247
|
);
|
|
249
248
|
});
|
|
250
|
-
ae.propTypes = {
|
|
251
|
-
id: t.any,
|
|
252
|
-
name: t.string,
|
|
253
|
-
defaultValue: t.string,
|
|
254
|
-
value: t.string,
|
|
255
|
-
debounceTime: t.number,
|
|
256
|
-
disabled: t.bool,
|
|
257
|
-
readOnly: t.bool,
|
|
258
|
-
tabIndex: t.number,
|
|
259
|
-
preventDefault: t.bool,
|
|
260
|
-
labelRef: t.any,
|
|
261
|
-
inputProps: t.bool,
|
|
262
|
-
withInput: t.bool,
|
|
263
|
-
//---------------------------------------------------------------
|
|
264
|
-
onChange: t.func,
|
|
265
|
-
onBlur: t.func,
|
|
266
|
-
onFocus: t.func,
|
|
267
|
-
onInput: t.func,
|
|
268
|
-
onKeyDown: t.func,
|
|
269
|
-
//---------------------------------------------------------------
|
|
270
|
-
className: t.string,
|
|
271
|
-
style: t.object,
|
|
272
|
-
size: t.oneOf(["small", "medium", "large"]),
|
|
273
|
-
color: t.oneOf([
|
|
274
|
-
"primary",
|
|
275
|
-
"secondary",
|
|
276
|
-
"success",
|
|
277
|
-
"danger",
|
|
278
|
-
"warning",
|
|
279
|
-
"information",
|
|
280
|
-
"neutral",
|
|
281
|
-
"gray"
|
|
282
|
-
])
|
|
283
|
-
};
|
|
284
249
|
export {
|
|
285
|
-
|
|
250
|
+
ue as default
|
|
286
251
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const t=require("react/jsx-runtime"),a=require("react"),M=require("./emotion-styled.browser.esm-BtEseadx.cjs"),B=require("./consts-goSZX3xP.cjs"),E=require("./IconButton.cjs"),I=require("./Button.cjs"),r=require("./utils-RnrgDDZP.cjs"),L=require("./useDetectMobile-zkbzoOGV.cjs"),g=require("./index-
|
|
1
|
+
"use strict";const t=require("react/jsx-runtime"),a=require("react"),M=require("./emotion-styled.browser.esm-BtEseadx.cjs"),B=require("./consts-goSZX3xP.cjs"),E=require("./IconButton.cjs"),I=require("./Button.cjs"),r=require("./utils-RnrgDDZP.cjs"),L=require("./useDetectMobile-zkbzoOGV.cjs"),g=require("./index-Bmr3IeZ_.cjs"),T=M.styled.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
gap: 1.5rem;
|
|
@@ -70,4 +70,4 @@
|
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
|
-
`,z=a.memo(g.DetailedProductCard),R=a.forwardRef((n,p)=>{const{title:l,icon:c,items:i,limit:f=4,isLoading:s=!1,onSelectCard:b=()=>{},onLoadMore:h=()=>{},onButtonAction:w=()=>{},getImage:y=()=>{},viewAllbuttonLink:d,viewAllButonText:m="View all",negotiableText:_,freeText:k,loadMoreButtonIcon:v="angle-down",sponsoredText:
|
|
73
|
+
`,z=a.memo(g.DetailedProductCard),R=a.forwardRef((n,p)=>{const{title:l,icon:c,items:i,limit:f=4,isLoading:s=!1,onSelectCard:b=()=>{},onLoadMore:h=()=>{},onButtonAction:w=()=>{},getImage:y=()=>{},viewAllbuttonLink:d,viewAllButonText:m="View all",negotiableText:_,freeText:k,loadMoreButtonIcon:v="angle-down",sponsoredText:S,onBookmark:C=()=>{},actionComponent:N,componentName:j,hasNextPage:q=!1}=n,u=L.useDetectMobile(),P=a.useMemo(()=>i==null?void 0:i.map((e,o)=>t.jsx(z,{name:e==null?void 0:e.name,price:e==null?void 0:e.price,sellingPrice:e==null?void 0:e.sellingPrice,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,sponsored:e==null?void 0:e.sponsored,imageComponent:e==null?void 0:e.imageComponent,onSelectCard:(U,D)=>b({uuid:e==null?void 0:e.uuid,nameSlug:e==null?void 0:e.nameSlug,cardRef:D}),nameSlug:e==null?void 0:e.nameSlug,imageUrl:y(e==null?void 0:e.image,e==null?void 0:e.uuid,e==null?void 0:e.sellerUuid)||null,isFree:e==null?void 0:e.isFree,isNegotiable:e==null?void 0:e.isNegotiable,negotiableText:_,freeText:k,tags:e==null?void 0:e.tags,categoryCode:e==null?void 0:e.categoryCode,condition:e==null?void 0:e.condition,quantity:e==null?void 0:e.quantity,hasQuantities:e==null?void 0:e.hasQuantities,status:e==null?void 0:e.status,trade:e==null?void 0:e.trade,sponsoredText:S,onBookmark:C,actionComponent:N,bookmarked:e==null?void 0:e.bookmarked,bookmarkLists:e==null?void 0:e.bookmarkLists,metadata:{accessor:e==null?void 0:e.accessor,name:j},sellerName:e==null?void 0:e.sellerName,forCart:e==null?void 0:e.forCart,forOrder:e==null?void 0:e.forOrder,contactSeller:e==null?void 0:e.contactSeller,hasVariants:e==null?void 0:e.hasVariants},o)),[i]);return t.jsxs(T,{ref:p,limit:f,children:[t.jsxs("div",{className:"section__heading",children:[r.isDefinedNotEmptyString(l)&&t.jsxs("div",{className:"section__title",children:[r.isDefinedNotEmptyString(c)&&t.jsx("i",{className:c})," ",l]}),u&&r.isDefinedNotEmptyString(d)&&r.isDefinedNotEmptyString(m)&&!s&&t.jsx(I,{type:"button",btnType:"tinted",color:"neutral",onClick:e=>{var o;(o=e==null?void 0:e.target)==null||o.blur(),w(d)},borderRadius:"curved",className:"section__view-all",children:m})]}),t.jsx(g.SuspenseDetailedProductCard,{isLoading:s,keyPrefix:"detailed-product-card-skeleton",children:t.jsx("div",{className:"section__items",children:P})}),!u&&!s&&q&&t.jsx(E,{icon:v,borderRadius:"curved",btnType:"basic",color:"neutral",className:"section__show-more",onClick:h})]})});module.exports=R;
|
|
@@ -6,7 +6,7 @@ import E from "./IconButton.js";
|
|
|
6
6
|
import U from "./Button.js";
|
|
7
7
|
import { k as r } from "./utils-Dc5zIpaz.js";
|
|
8
8
|
import { u as $ } from "./useDetectMobile-Bkvj0VMa.js";
|
|
9
|
-
import { D as j, S as A } from "./index-
|
|
9
|
+
import { D as j, S as A } from "./index-DZ8515cZ.js";
|
|
10
10
|
const F = T.div`
|
|
11
11
|
display: flex;
|
|
12
12
|
flex-direction: column;
|
|
@@ -102,8 +102,8 @@ const F = T.div`
|
|
|
102
102
|
sponsoredText: v,
|
|
103
103
|
onBookmark: C = () => {
|
|
104
104
|
},
|
|
105
|
-
actionComponent:
|
|
106
|
-
componentName:
|
|
105
|
+
actionComponent: S,
|
|
106
|
+
componentName: N,
|
|
107
107
|
hasNextPage: P = !1
|
|
108
108
|
} = a, u = $(), M = L(() => t == null ? void 0 : t.map((e, i) => /* @__PURE__ */ o(
|
|
109
109
|
O,
|
|
@@ -118,6 +118,7 @@ const F = T.div`
|
|
|
118
118
|
sponsored: e == null ? void 0 : e.sponsored,
|
|
119
119
|
imageComponent: e == null ? void 0 : e.imageComponent,
|
|
120
120
|
onSelectCard: (R, B) => g({ uuid: e == null ? void 0 : e.uuid, nameSlug: e == null ? void 0 : e.nameSlug, cardRef: B }),
|
|
121
|
+
nameSlug: e == null ? void 0 : e.nameSlug,
|
|
121
122
|
imageUrl: w(e == null ? void 0 : e.image, e == null ? void 0 : e.uuid, e == null ? void 0 : e.sellerUuid) || null,
|
|
122
123
|
isFree: e == null ? void 0 : e.isFree,
|
|
123
124
|
isNegotiable: e == null ? void 0 : e.isNegotiable,
|
|
@@ -132,10 +133,10 @@ const F = T.div`
|
|
|
132
133
|
trade: e == null ? void 0 : e.trade,
|
|
133
134
|
sponsoredText: v,
|
|
134
135
|
onBookmark: C,
|
|
135
|
-
actionComponent:
|
|
136
|
+
actionComponent: S,
|
|
136
137
|
bookmarked: e == null ? void 0 : e.bookmarked,
|
|
137
138
|
bookmarkLists: e == null ? void 0 : e.bookmarkLists,
|
|
138
|
-
metadata: { accessor: e == null ? void 0 : e.accessor, name:
|
|
139
|
+
metadata: { accessor: e == null ? void 0 : e.accessor, name: N },
|
|
139
140
|
sellerName: e == null ? void 0 : e.sellerName,
|
|
140
141
|
forCart: e == null ? void 0 : e.forCart,
|
|
141
142
|
forOrder: e == null ? void 0 : e.forOrder,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const t=require("react/jsx-runtime"),c=require("react"),T=require("./emotion-styled.browser.esm-BtEseadx.cjs"),E=require("./consts-goSZX3xP.cjs"),F=require("./Button.cjs"),l=require("./utils-RnrgDDZP.cjs"),B=require("./useDetectMobile-zkbzoOGV.cjs"),R=require("./style-CkcozOY6.cjs"),w=require("./index-
|
|
1
|
+
"use strict";const t=require("react/jsx-runtime"),c=require("react"),T=require("./emotion-styled.browser.esm-BtEseadx.cjs"),E=require("./consts-goSZX3xP.cjs"),F=require("./Button.cjs"),l=require("./utils-RnrgDDZP.cjs"),B=require("./useDetectMobile-zkbzoOGV.cjs"),R=require("./style-CkcozOY6.cjs"),w=require("./index-Bmr3IeZ_.cjs"),I=require("./index-CSNxZFTX.cjs"),Q=T.styled.div`
|
|
2
2
|
display: grid;
|
|
3
3
|
grid-template-columns: ${a=>`repeat(${a.limit}, minmax(0, 1fr))`};
|
|
4
4
|
gap: 1.25rem;
|
|
@@ -26,4 +26,4 @@
|
|
|
26
26
|
/* Safari and Chrome */
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
|
-
`,j=c.memo(w.DetailedProductCard),_=c.forwardRef((a,P)=>{const{icon:
|
|
29
|
+
`,j=c.memo(w.DetailedProductCard),_=c.forwardRef((a,P)=>{const{icon:u,title:v,buttonLink:d,items:i,buttonText:m,limit:n=4,onSelectCard:g=()=>{},onButtonAction:D=()=>{},isLoading:p=!1,getImage:b=()=>{},negotiableText:k,freeText:y,options:o,onSelectOption:S=()=>{},productsToolbarName:U="All",sponsoredText:C,onBookmark:f=()=>{},actionComponent:h,componentName:N}=a,q=B.useDetectMobile(),L=c.useMemo(()=>t.jsx(t.Fragment,{children:q===!0?i==null?void 0:i.map((e,r)=>t.jsx(j,{name:e==null?void 0:e.name,price:e==null?void 0:e.price,sellingPrice:e==null?void 0:e.sellingPrice,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,sponsored:e==null?void 0:e.sponsored,imageComponent:e==null?void 0:e.imageComponent,nameSlug:e==null?void 0:e.nameSlug,onSelectCard:(M,s)=>g({uuid:e==null?void 0:e.uuid,nameSlug:e==null?void 0:e.nameSlug,cardRef:s}),sellerName:e==null?void 0:e.sellerName,imageUrl:b(e==null?void 0:e.image,e==null?void 0:e.uuid,e==null?void 0:e.sellerUuid)||null,isFree:e==null?void 0:e.isFree,isNegotiable:e==null?void 0:e.isNegotiable,negotiableText:k,freeText:y,tags:e==null?void 0:e.tags,categoryCode:e==null?void 0:e.categoryCode,condition:e==null?void 0:e.condition,quantity:e==null?void 0:e.quantity,hasQuantities:e==null?void 0:e.hasQuantities,status:e==null?void 0:e.status,trade:e==null?void 0:e.trade,forCart:e==null?void 0:e.forCart,sponsoredText:C,onBookmark:f,actionComponent:h,bookmarked:e==null?void 0:e.bookmarked,bookmarkLists:e==null?void 0:e.bookmarkLists,metadata:{accessor:e==null?void 0:e.accessor,name:N}},r)):i==null?void 0:i.slice(0,n).map((e,r)=>t.jsx(j,{name:e==null?void 0:e.name,price:e==null?void 0:e.price,sellingPrice:e==null?void 0:e.sellingPrice,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,sponsored:e==null?void 0:e.sponsored,imageComponent:e==null?void 0:e.imageComponent,onSelectCard:(M,s)=>g({uuid:e==null?void 0:e.uuid,nameSlug:e==null?void 0:e.nameSlug,cardRef:s}),nameSlug:e==null?void 0:e.nameSlug,imageUrl:b(e==null?void 0:e.image,e==null?void 0:e.uuid,e==null?void 0:e.sellerUuid)||null,isFree:e==null?void 0:e.isFree,isNegotiable:e==null?void 0:e.isNegotiable,negotiableText:k,freeText:y,tags:e==null?void 0:e.tags,categoryCode:e==null?void 0:e.categoryCode,condition:e==null?void 0:e.condition,quantity:e==null?void 0:e.quantity,hasQuantities:e==null?void 0:e.hasQuantities,status:e==null?void 0:e.status,trade:e==null?void 0:e.trade,forCart:e==null?void 0:e.forCart,sponsoredText:C,onBookmark:f,actionComponent:h,bookmarked:e==null?void 0:e.bookmarked,bookmarkLists:e==null?void 0:e.bookmarkLists,metadata:{accessor:e==null?void 0:e.accessor,name:N},sellerName:e==null?void 0:e.sellerName},r))}),[i,q,n]);return t.jsxs(R.TitleWithOptionsSectionWrapper,{ref:P,children:[t.jsxs("div",{className:"regular-title",children:[t.jsxs("div",{className:"regular-title-text",children:[l.isDefinedNotEmptyString(u)&&t.jsx("i",{className:u}),t.jsx("span",{children:v})]}),l.isDefinedNotEmptyString(d)&&l.isDefinedNotEmptyString(m)&&!p&&t.jsx(F,{type:"button",btnType:"tinted",color:"neutral",onClick:e=>{var r;(r=e==null?void 0:e.target)==null||r.blur(),D(d)},borderRadius:"curved",className:"button-link",children:m})]}),(o==null?void 0:o.length)>0&&t.jsx(I.SelectBar,{items:o,onRemove:e=>{S(e)},onSelect:e=>{S(e)},labelKey:"name",valueKey:"code",noMargin:!0,productsToolbarName:U}),t.jsx(w.SuspenseDetailedProductCard,{isLoading:p,keyPrefix:"detailed-products-skeleton",children:t.jsx(Q,{limit:n,children:L})})]})});module.exports=_;
|
|
@@ -6,7 +6,7 @@ import O from "./Button.js";
|
|
|
6
6
|
import { k as m } from "./utils-Dc5zIpaz.js";
|
|
7
7
|
import { u as R } from "./useDetectMobile-Bkvj0VMa.js";
|
|
8
8
|
import { T as W } from "./style-C7FUSHmS.js";
|
|
9
|
-
import { D as $, S as j } from "./index-
|
|
9
|
+
import { D as $, S as j } from "./index-DZ8515cZ.js";
|
|
10
10
|
import { S as z } from "./index-BGiZlEQt.js";
|
|
11
11
|
const A = I.div`
|
|
12
12
|
display: grid;
|
|
@@ -57,10 +57,10 @@ const A = I.div`
|
|
|
57
57
|
onSelectOption: y = () => {
|
|
58
58
|
},
|
|
59
59
|
productsToolbarName: L = "All",
|
|
60
|
-
sponsoredText:
|
|
61
|
-
onBookmark:
|
|
60
|
+
sponsoredText: S,
|
|
61
|
+
onBookmark: C = () => {
|
|
62
62
|
},
|
|
63
|
-
actionComponent:
|
|
63
|
+
actionComponent: h,
|
|
64
64
|
componentName: N
|
|
65
65
|
} = i, w = R(), M = E(() => /* @__PURE__ */ t(F, { children: w === !0 ? o == null ? void 0 : o.map((e, r) => /* @__PURE__ */ t(
|
|
66
66
|
P,
|
|
@@ -74,6 +74,7 @@ const A = I.div`
|
|
|
74
74
|
uuid: e == null ? void 0 : e.uuid,
|
|
75
75
|
sponsored: e == null ? void 0 : e.sponsored,
|
|
76
76
|
imageComponent: e == null ? void 0 : e.imageComponent,
|
|
77
|
+
nameSlug: e == null ? void 0 : e.nameSlug,
|
|
77
78
|
onSelectCard: (D, s) => p({
|
|
78
79
|
uuid: e == null ? void 0 : e.uuid,
|
|
79
80
|
nameSlug: e == null ? void 0 : e.nameSlug,
|
|
@@ -93,9 +94,9 @@ const A = I.div`
|
|
|
93
94
|
status: e == null ? void 0 : e.status,
|
|
94
95
|
trade: e == null ? void 0 : e.trade,
|
|
95
96
|
forCart: e == null ? void 0 : e.forCart,
|
|
96
|
-
sponsoredText:
|
|
97
|
-
onBookmark:
|
|
98
|
-
actionComponent:
|
|
97
|
+
sponsoredText: S,
|
|
98
|
+
onBookmark: C,
|
|
99
|
+
actionComponent: h,
|
|
99
100
|
bookmarked: e == null ? void 0 : e.bookmarked,
|
|
100
101
|
bookmarkLists: e == null ? void 0 : e.bookmarkLists,
|
|
101
102
|
metadata: { accessor: e == null ? void 0 : e.accessor, name: N }
|
|
@@ -119,6 +120,7 @@ const A = I.div`
|
|
|
119
120
|
nameSlug: e == null ? void 0 : e.nameSlug,
|
|
120
121
|
cardRef: s
|
|
121
122
|
}),
|
|
123
|
+
nameSlug: e == null ? void 0 : e.nameSlug,
|
|
122
124
|
imageUrl: b(e == null ? void 0 : e.image, e == null ? void 0 : e.uuid, e == null ? void 0 : e.sellerUuid) || null,
|
|
123
125
|
isFree: e == null ? void 0 : e.isFree,
|
|
124
126
|
isNegotiable: e == null ? void 0 : e.isNegotiable,
|
|
@@ -132,9 +134,9 @@ const A = I.div`
|
|
|
132
134
|
status: e == null ? void 0 : e.status,
|
|
133
135
|
trade: e == null ? void 0 : e.trade,
|
|
134
136
|
forCart: e == null ? void 0 : e.forCart,
|
|
135
|
-
sponsoredText:
|
|
136
|
-
onBookmark:
|
|
137
|
-
actionComponent:
|
|
137
|
+
sponsoredText: S,
|
|
138
|
+
onBookmark: C,
|
|
139
|
+
actionComponent: h,
|
|
138
140
|
bookmarked: e == null ? void 0 : e.bookmarked,
|
|
139
141
|
bookmarkLists: e == null ? void 0 : e.bookmarkLists,
|
|
140
142
|
metadata: { accessor: e == null ? void 0 : e.accessor, name: N },
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
"use strict";const e=require("react/jsx-runtime"),p=require("react"),w=require("./utils-RnrgDDZP.cjs"),F=require("./Icon.cjs"),f=require("./emotion-styled.browser.esm-BtEseadx.cjs"),g=require("./consts-goSZX3xP.cjs"),N=require("./emotion-element-f0de968e.browser.esm-B7k6i6lC.cjs"),n=require("./style-BAcV7F53.cjs"),P=f.styled.
|
|
1
|
+
"use strict";const e=require("react/jsx-runtime"),p=require("react"),w=require("./utils-RnrgDDZP.cjs"),F=require("./Icon.cjs"),f=require("./emotion-styled.browser.esm-BtEseadx.cjs"),g=require("./consts-goSZX3xP.cjs"),N=require("./emotion-element-f0de968e.browser.esm-B7k6i6lC.cjs"),n=require("./style-BAcV7F53.cjs"),P=f.styled.a`
|
|
2
|
+
text-decoration: none;
|
|
3
|
+
color: var(--gray-950);
|
|
2
4
|
display: flex;
|
|
3
5
|
width: 100%;
|
|
4
6
|
height: fit-content;
|
|
@@ -154,7 +156,7 @@
|
|
|
154
156
|
max-width: unset;
|
|
155
157
|
}
|
|
156
158
|
}
|
|
157
|
-
`,O=p.forwardRef(({text:t,isActive:o=!1,icon:i,onSelectCard:a=()=>{}},h)=>e.jsxs(q,{ref:h,className:o?"active":"",onClick:a,children:[e.jsx(F,{icon:i,className:"wrapper__icon"}),e.jsx("div",{className:"wrapper__text",children:t})]})),z=p.forwardRef(({image:t,imageComponent:o,title:i,description:a,className:h,onSelectCard:u=()=>{}},
|
|
159
|
+
`,O=p.forwardRef(({text:t,isActive:o=!1,icon:i,onSelectCard:a=()=>{}},h)=>e.jsxs(q,{ref:h,className:o?"active":"",onClick:a,children:[e.jsx(F,{icon:i,className:"wrapper__icon"}),e.jsx("div",{className:"wrapper__text",children:t})]})),z=p.forwardRef(({image:t,imageComponent:o,title:i,description:a,className:h,onSelectCard:u=()=>{},link:y},j)=>{const{theme:v}=N.useTheme();return e.jsxs(P,{ref:j,theme:v,className:h,onClick:u,href:`/${y}`,children:[w.isDefined(o)?o:e.jsx("img",{src:t,className:"wrapper__image"}),e.jsxs("div",{className:"wrapper__content",children:[i&&e.jsx("div",{className:"wrapper__title",children:i}),a&&e.jsx("div",{className:"wrapper__description",children:a})]})]})}),R=f.styled.div`
|
|
158
160
|
display: flex;
|
|
159
161
|
flex-direction: column;
|
|
160
162
|
align-items: center;
|
|
@@ -246,4 +248,4 @@
|
|
|
246
248
|
overflow-x: hidden;
|
|
247
249
|
}
|
|
248
250
|
}
|
|
249
|
-
`,W=({keyPrefix:t})=>e.jsxs(I,{className:"skeleton__tags",children:[e.jsxs(n.SkeletonColumnWrapper,{alignItems:"center",gap:"0.5rem",children:[e.jsx(n.SkeletonCirclePlaceholder,{width:"2.75rem",height:"2.75rem"}),e.jsx(n.SkeletonLinePlaceholder,{height:"1.5rem",width:"8rem"})]},`${t}-1`),e.jsxs(n.SkeletonColumnWrapper,{alignItems:"center",gap:"0.5rem",noGradient:!0,children:[e.jsx(n.SkeletonCirclePlaceholder,{width:"2.75rem",height:"2.75rem"}),e.jsx(n.SkeletonLinePlaceholder,{height:"1.5rem",width:"8rem"})]},`${t}-2`),e.jsxs(n.SkeletonColumnWrapper,{alignItems:"center",gap:"0.5rem",noGradient:!0,children:[e.jsx(n.SkeletonCirclePlaceholder,{width:"2.75rem",height:"2.75rem"}),e.jsx(n.SkeletonLinePlaceholder,{height:"1.5rem",width:"8rem"})]},`${t}-3`),e.jsxs(n.SkeletonColumnWrapper,{alignItems:"center",gap:"0.5rem",noGradient:!0,children:[e.jsx(n.SkeletonCirclePlaceholder,{width:"2.75rem",height:"2.75rem"}),e.jsx(n.SkeletonLinePlaceholder,{height:"1.5rem",width:"8rem"})]},`${t}-4`),e.jsxs(n.SkeletonColumnWrapper,{alignItems:"center",gap:"0.5rem",noGradient:!0,children:[e.jsx(n.SkeletonCirclePlaceholder,{width:"2.75rem",height:"2.75rem"}),e.jsx(n.SkeletonLinePlaceholder,{height:"1.5rem",width:"8rem"})]},`${t}-5`)]}),T=({keyPrefix:t,isLoading:o=!1,fallbackComponent:i=e.jsx(e.Fragment,{}),children:a})=>e.jsx(p.Suspense,{fallbackComponent:i,children:o===!0?e.jsx(W,{keyPrefix:t}):a}),B=({keyPrefix:t})=>e.jsxs(I,{className:"skeleton__cards",children:[e.jsx(n.SkeletonLinePlaceholder,{height:"13.75rem"},`${t}-1`),e.jsx(n.SkeletonLinePlaceholder,{height:"13.75rem"},`${t}-2`),e.jsx(n.SkeletonLinePlaceholder,{height:"13.75rem"},`${t}-3`)]}),G=({keyPrefix:t,isLoading:o=!1,fallbackComponent:i=e.jsx(e.Fragment,{}),children:a})=>e.jsx(p.Suspense,{fallbackComponent:i,children:o===!0?e.jsx(B,{keyPrefix:t}):a}),X=p.forwardRef(({title:t,subtitle:o,tags:i=[],items:a=[],limitTags:h=5,limitTagsForMobile:u=5,limit:y=3,limitForMobile:j=2,selectedTag
|
|
251
|
+
`,W=({keyPrefix:t})=>e.jsxs(I,{className:"skeleton__tags",children:[e.jsxs(n.SkeletonColumnWrapper,{alignItems:"center",gap:"0.5rem",children:[e.jsx(n.SkeletonCirclePlaceholder,{width:"2.75rem",height:"2.75rem"}),e.jsx(n.SkeletonLinePlaceholder,{height:"1.5rem",width:"8rem"})]},`${t}-1`),e.jsxs(n.SkeletonColumnWrapper,{alignItems:"center",gap:"0.5rem",noGradient:!0,children:[e.jsx(n.SkeletonCirclePlaceholder,{width:"2.75rem",height:"2.75rem"}),e.jsx(n.SkeletonLinePlaceholder,{height:"1.5rem",width:"8rem"})]},`${t}-2`),e.jsxs(n.SkeletonColumnWrapper,{alignItems:"center",gap:"0.5rem",noGradient:!0,children:[e.jsx(n.SkeletonCirclePlaceholder,{width:"2.75rem",height:"2.75rem"}),e.jsx(n.SkeletonLinePlaceholder,{height:"1.5rem",width:"8rem"})]},`${t}-3`),e.jsxs(n.SkeletonColumnWrapper,{alignItems:"center",gap:"0.5rem",noGradient:!0,children:[e.jsx(n.SkeletonCirclePlaceholder,{width:"2.75rem",height:"2.75rem"}),e.jsx(n.SkeletonLinePlaceholder,{height:"1.5rem",width:"8rem"})]},`${t}-4`),e.jsxs(n.SkeletonColumnWrapper,{alignItems:"center",gap:"0.5rem",noGradient:!0,children:[e.jsx(n.SkeletonCirclePlaceholder,{width:"2.75rem",height:"2.75rem"}),e.jsx(n.SkeletonLinePlaceholder,{height:"1.5rem",width:"8rem"})]},`${t}-5`)]}),T=({keyPrefix:t,isLoading:o=!1,fallbackComponent:i=e.jsx(e.Fragment,{}),children:a})=>e.jsx(p.Suspense,{fallbackComponent:i,children:o===!0?e.jsx(W,{keyPrefix:t}):a}),B=({keyPrefix:t})=>e.jsxs(I,{className:"skeleton__cards",children:[e.jsx(n.SkeletonLinePlaceholder,{height:"13.75rem"},`${t}-1`),e.jsx(n.SkeletonLinePlaceholder,{height:"13.75rem"},`${t}-2`),e.jsx(n.SkeletonLinePlaceholder,{height:"13.75rem"},`${t}-3`)]}),G=({keyPrefix:t,isLoading:o=!1,fallbackComponent:i=e.jsx(e.Fragment,{}),children:a})=>e.jsx(p.Suspense,{fallbackComponent:i,children:o===!0?e.jsx(B,{keyPrefix:t}):a}),X=p.forwardRef(({title:t,subtitle:o,tags:i=[],items:a=[],limitTags:h=5,limitTagsForMobile:u=5,limit:y=3,limitForMobile:j=2,selectedTag:v,onSelectTag:k=()=>{},onSelectCard:b=()=>{},className:m,isLoadingTags:C=!1,isLoadingCards:$=!1},L)=>(p.useLayoutEffect(()=>{if(!w.isDefinedNotEmptyString(m))return;const r=()=>{const c=document==null?void 0:document.querySelector(`.${m} .wrapper__cards`),l=c==null?void 0:c.querySelectorAll(".wrapper__card");l==null||l.forEach(x=>{const E=x.getBoundingClientRect().height,M=Math.ceil((E+10)/20);x.style.gridRowEnd=`span ${M}`});const S=l==null?void 0:l[(l==null?void 0:l.length)-1];if(S){const x=S.offsetTop+S.offsetHeight;c.style.height=`${x}px`}},d=document==null?void 0:document.querySelector(`.${m} .wrapper__cards`),s=d==null?void 0:d.querySelectorAll(".wrapper__image");let _=0;return(s==null?void 0:s.length)===0?r():(s==null||s.forEach(c=>{c.complete?_++:c.addEventListener("load",()=>{_++,_===(s==null?void 0:s.length)&&r()})}),_===(s==null?void 0:s.length)&&r()),window.addEventListener("resize",r),()=>{window.removeEventListener("resize",r)}},[m,a,$]),e.jsxs(R,{ref:L,limitTags:h,limitTagsForMobile:u,limitCards:y,limitCardsForMobile:j,className:m,numberOfTags:i==null?void 0:i.length,children:[e.jsxs("div",{className:"wrapper__heading",children:[t&&e.jsx("div",{className:"wrapper__title",children:t}),o&&e.jsx("div",{className:"wrapper__subtitle",children:o})]}),e.jsx(T,{isLoading:C,keyPrefix:"field-of-interests-masonry-tag",children:e.jsx("div",{className:"wrapper__tags__external",children:e.jsx("div",{className:"wrapper__tags",children:i==null?void 0:i.map((r,d)=>e.jsx(O,{icon:r==null?void 0:r.icon,text:r==null?void 0:r.title,isActive:(r==null?void 0:r.code)===v,onSelectCard:()=>k==null?void 0:k(r)},`field-of-interests-masonry-tag__${d+1}`))})})}),e.jsx(G,{isLoading:$,keyPrefix:"field-of-interests-masonry-card",children:e.jsx("div",{className:"wrapper__cards",children:a==null?void 0:a.map((r,d)=>e.jsx(z,{image:r==null?void 0:r.image,imageComponent:r==null?void 0:r.imageComponent,title:r==null?void 0:r.title,description:r==null?void 0:r.description,onSelectCard:()=>b==null?void 0:b(r),className:"wrapper__card",link:r==null?void 0:r.link},`field-of-interests-with-tags-card__${d+1}`))})})]})));module.exports=X;
|