@lanaco/lnc-react-ui 4.0.124 → 4.0.126
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 +1 -1
- package/dist/BannerSectionCarousel.js +2 -0
- package/dist/BlogExploreSection.cjs +311 -0
- package/dist/BlogExploreSection.js +634 -0
- package/dist/BlogListSection.cjs +9 -6
- package/dist/BlogListSection.js +30 -27
- package/dist/BlogProductCardsSection.cjs +1 -1
- package/dist/BlogProductCardsSection.js +30 -24
- package/dist/FaqSection.cjs +3 -175
- package/dist/FaqSection.js +121 -314
- package/dist/SalesCampaignsSection.cjs +52 -39
- package/dist/SalesCampaignsSection.js +337 -294
- package/dist/index.cjs +1 -1
- package/dist/index.js +37 -35
- package/dist/tag-BLBeUImg.cjs +173 -0
- package/dist/tag-D6in2BG6.js +204 -0
- package/package.json +3 -2
- package/vite.config.js +4 -0
|
@@ -0,0 +1,634 @@
|
|
|
1
|
+
import { jsxs as l, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as C } from "react";
|
|
3
|
+
import { P as e } from "./index-CblbdqjE.js";
|
|
4
|
+
import { s as J } from "./utils-BbgAIA9N.js";
|
|
5
|
+
import K from "./TextInput.js";
|
|
6
|
+
import b from "./Icon.js";
|
|
7
|
+
import Q from "./Link.js";
|
|
8
|
+
import z from "./DropdownMenu.js";
|
|
9
|
+
import I from "./DropdownItem.js";
|
|
10
|
+
import { F as W } from "./tag-D6in2BG6.js";
|
|
11
|
+
import Y from "./BlogProductCardsSection.js";
|
|
12
|
+
import { s as L } from "./emotion-styled.browser.esm-BNN1dTl3.js";
|
|
13
|
+
import T from "./BlogListSection.js";
|
|
14
|
+
import { M as B } from "./consts-BuFChS64.js";
|
|
15
|
+
const O = L.div`
|
|
16
|
+
display: flex;
|
|
17
|
+
justify-content: space-between;
|
|
18
|
+
align-items: center;
|
|
19
|
+
align-self: stretch;
|
|
20
|
+
width: 100%;
|
|
21
|
+
|
|
22
|
+
& .pagination__per-page {
|
|
23
|
+
& button {
|
|
24
|
+
border-radius: 8px;
|
|
25
|
+
border: 1px solid var(--neutral-95012, rgba(20, 22, 26, 0.12));
|
|
26
|
+
background: transparent;
|
|
27
|
+
color: var(---gray-950, #14161a);
|
|
28
|
+
font-size: 0.875rem;
|
|
29
|
+
font-style: normal;
|
|
30
|
+
font-weight: 500;
|
|
31
|
+
line-height: 1.25rem;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
& .pagination__pages {
|
|
36
|
+
display: flex;
|
|
37
|
+
align-items: center;
|
|
38
|
+
border-radius: 0.375rem;
|
|
39
|
+
|
|
40
|
+
& .pagination__page {
|
|
41
|
+
display: flex;
|
|
42
|
+
width: 2.5rem;
|
|
43
|
+
height: 2.25rem;
|
|
44
|
+
padding: 0.5rem 1rem;
|
|
45
|
+
flex-direction: column;
|
|
46
|
+
justify-content: center;
|
|
47
|
+
align-items: center;
|
|
48
|
+
border-top: 1px solid var(--neutral-95012, rgba(20, 22, 26, 0.12));
|
|
49
|
+
border-right: 1px solid var(--neutral-95012, rgba(20, 22, 26, 0.12));
|
|
50
|
+
border-bottom: 1px solid var(--neutral-95012, rgba(20, 22, 26, 0.12));
|
|
51
|
+
color: var(--gray-600, #676e79);
|
|
52
|
+
font-size: 0.875rem;
|
|
53
|
+
font-style: normal;
|
|
54
|
+
font-weight: 500;
|
|
55
|
+
line-height: 1.25rem;
|
|
56
|
+
|
|
57
|
+
&:hover {
|
|
58
|
+
cursor: pointer;
|
|
59
|
+
background: var(--gray-200, #e4e9f0);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
&.active {
|
|
63
|
+
border: 1px solid var(--teal-500, #009ea8);
|
|
64
|
+
background: var(--teal-50, #f4fdff);
|
|
65
|
+
color: var(--teal-500, #009ea8);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
&.disabled {
|
|
69
|
+
cursor: unset;
|
|
70
|
+
border: 1px solid var(--neutral-95012, rgba(20, 22, 26, 0.12));
|
|
71
|
+
opacity: 0.4;
|
|
72
|
+
|
|
73
|
+
&:hover {
|
|
74
|
+
background: transparent;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
&.ellipsis {
|
|
79
|
+
cursor: unset;
|
|
80
|
+
|
|
81
|
+
&:hover {
|
|
82
|
+
background: transparent;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
&:first-of-type {
|
|
87
|
+
border-radius: 0.5rem 0 0 0.5rem;
|
|
88
|
+
border-left: 1px solid var(--neutral-95012, rgba(20, 22, 26, 0.12));
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
&:last-of-type {
|
|
92
|
+
border-radius: 0 0.5rem 0.5rem 0;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
`, P = C(
|
|
97
|
+
({
|
|
98
|
+
perPageOptions: s = [
|
|
99
|
+
{ code: 10, name: "Show 10 items" },
|
|
100
|
+
{ code: 25, name: "Show 25 items" },
|
|
101
|
+
{ code: 50, name: "Show 50 items" }
|
|
102
|
+
],
|
|
103
|
+
perPage: d,
|
|
104
|
+
handlePerPage: h = () => {
|
|
105
|
+
},
|
|
106
|
+
page: o = 1,
|
|
107
|
+
handlePage: c = () => {
|
|
108
|
+
},
|
|
109
|
+
total: i
|
|
110
|
+
}, f) => {
|
|
111
|
+
var m;
|
|
112
|
+
const p = () => {
|
|
113
|
+
o > 1 && (c == null || c(o - 1));
|
|
114
|
+
}, _ = () => {
|
|
115
|
+
o < i && (c == null || c(o + 1));
|
|
116
|
+
}, u = () => {
|
|
117
|
+
const t = [];
|
|
118
|
+
if (i <= 7)
|
|
119
|
+
for (let a = 1; a <= i; a++)
|
|
120
|
+
t.push(a);
|
|
121
|
+
else
|
|
122
|
+
o <= 3 ? t.push(1, 2, 3, "...", i) : o >= i - 2 ? t.push(1, "...", i - 2, i - 1, i) : t.push(1, 2, 3, "...", i);
|
|
123
|
+
return t == null ? void 0 : t.map((a, g) => a === "..." ? /* @__PURE__ */ n(
|
|
124
|
+
"div",
|
|
125
|
+
{
|
|
126
|
+
className: "pagination__page ellipsis",
|
|
127
|
+
children: a
|
|
128
|
+
},
|
|
129
|
+
`pagination-ellipsis__${g}`
|
|
130
|
+
) : /* @__PURE__ */ n(
|
|
131
|
+
"div",
|
|
132
|
+
{
|
|
133
|
+
onClick: () => c(a),
|
|
134
|
+
className: `pagination__page ${o === a ? "active" : ""}`,
|
|
135
|
+
children: a
|
|
136
|
+
},
|
|
137
|
+
`pagination-page__${g}`
|
|
138
|
+
));
|
|
139
|
+
};
|
|
140
|
+
return /* @__PURE__ */ l(O, { className: "pagination", children: [
|
|
141
|
+
/* @__PURE__ */ n(
|
|
142
|
+
z,
|
|
143
|
+
{
|
|
144
|
+
color: "neutral",
|
|
145
|
+
control: d || ((m = s[0]) == null ? void 0 : m.name),
|
|
146
|
+
placement: "bottom",
|
|
147
|
+
zIndex: 1001,
|
|
148
|
+
className: "pagination__per-page",
|
|
149
|
+
children: s == null ? void 0 : s.map((t, a) => /* @__PURE__ */ n(
|
|
150
|
+
I,
|
|
151
|
+
{
|
|
152
|
+
active: (t == null ? void 0 : t.code) === (d == null ? void 0 : d.code),
|
|
153
|
+
className: "sort-by__item",
|
|
154
|
+
onClick: () => h(t),
|
|
155
|
+
children: t == null ? void 0 : t.name
|
|
156
|
+
},
|
|
157
|
+
`blog-epxlore-section-per-page-option__${a + 1}`
|
|
158
|
+
))
|
|
159
|
+
}
|
|
160
|
+
),
|
|
161
|
+
/* @__PURE__ */ l("div", { className: "pagination__pages", children: [
|
|
162
|
+
/* @__PURE__ */ n(
|
|
163
|
+
"div",
|
|
164
|
+
{
|
|
165
|
+
className: `pagination__page ${o === 1 ? "disabled" : ""}`,
|
|
166
|
+
onClick: p,
|
|
167
|
+
children: /* @__PURE__ */ n(b, { icon: " mng-lnc-chevron--left" })
|
|
168
|
+
}
|
|
169
|
+
),
|
|
170
|
+
u(),
|
|
171
|
+
/* @__PURE__ */ n(
|
|
172
|
+
"div",
|
|
173
|
+
{
|
|
174
|
+
className: `pagination__page ${o === i ? "disabled" : ""}`,
|
|
175
|
+
onClick: _,
|
|
176
|
+
children: /* @__PURE__ */ n(b, { icon: " mng-lnc-chevron--right" })
|
|
177
|
+
}
|
|
178
|
+
)
|
|
179
|
+
] })
|
|
180
|
+
] });
|
|
181
|
+
}
|
|
182
|
+
), ee = L.div`
|
|
183
|
+
display: flex;
|
|
184
|
+
align-items: flex-start;
|
|
185
|
+
gap: 2rem;
|
|
186
|
+
align-self: stretch;
|
|
187
|
+
|
|
188
|
+
& button {
|
|
189
|
+
&:focus {
|
|
190
|
+
outline: none;
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
& .landing__main-content {
|
|
195
|
+
display: flex;
|
|
196
|
+
flex-direction: column;
|
|
197
|
+
align-items: flex-start;
|
|
198
|
+
gap: 1.5rem;
|
|
199
|
+
|
|
200
|
+
border-right: 1px solid var(--gray-200, #dddfe4);
|
|
201
|
+
padding-right: 2rem;
|
|
202
|
+
|
|
203
|
+
& .pagination {
|
|
204
|
+
padding: 1.25rem 0;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
& .main-content__title {
|
|
208
|
+
color: var(--gray-950, #14161a);
|
|
209
|
+
font-size: 1.5rem;
|
|
210
|
+
font-style: normal;
|
|
211
|
+
font-weight: 600;
|
|
212
|
+
line-height: 2rem;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
& .tags__item {
|
|
216
|
+
&:not(.active) {
|
|
217
|
+
background: var(--neutral-9504, rgba(20, 22, 26, 0.04));
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
& .main-content__items {
|
|
222
|
+
display: flex;
|
|
223
|
+
flex-direction: column;
|
|
224
|
+
gap: 1.25rem;
|
|
225
|
+
|
|
226
|
+
& .main-content__divider {
|
|
227
|
+
content: "";
|
|
228
|
+
display: block;
|
|
229
|
+
height: 1px;
|
|
230
|
+
width: 100%;
|
|
231
|
+
background: var(--gray-200, #dddfe4);
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
& .blog-card-item {
|
|
235
|
+
background: transparent;
|
|
236
|
+
border: none;
|
|
237
|
+
padding: 0;
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
& .main-content__actions {
|
|
242
|
+
display: flex;
|
|
243
|
+
justify-content: space-between;
|
|
244
|
+
align-items: center;
|
|
245
|
+
align-self: stretch;
|
|
246
|
+
width: 100%;
|
|
247
|
+
|
|
248
|
+
& .main-content__search {
|
|
249
|
+
border-radius: 999px;
|
|
250
|
+
height: 2.5rem;
|
|
251
|
+
min-height: 2.5rem;
|
|
252
|
+
max-width: 23.75rem;
|
|
253
|
+
width: 100%;
|
|
254
|
+
|
|
255
|
+
border: 1px solid var(--gray-200, #e4e9f0);
|
|
256
|
+
box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
|
|
257
|
+
outline: none;
|
|
258
|
+
|
|
259
|
+
& input::placeholder {
|
|
260
|
+
color: var(--gray-500, #7a8594);
|
|
261
|
+
font-size: 0.875rem;
|
|
262
|
+
font-style: normal;
|
|
263
|
+
font-weight: 400;
|
|
264
|
+
line-height: 1.25rem;
|
|
265
|
+
letter-spacing: 0.0156rem;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
& .main-content__search-prefix {
|
|
269
|
+
color: var(--gray-500, #7a8594);
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
& .main-content__sort-by {
|
|
274
|
+
& button {
|
|
275
|
+
border-radius: 999px;
|
|
276
|
+
color: var(--gray-950, #14161a);
|
|
277
|
+
background: var(--neutral-95004, rgba(20, 22, 26, 0.04));
|
|
278
|
+
font-size: 0.875rem;
|
|
279
|
+
font-style: normal;
|
|
280
|
+
font-weight: 500;
|
|
281
|
+
line-height: 1.25rem;
|
|
282
|
+
letter-spacing: -0.0056rem;
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
& .landing__side-content {
|
|
289
|
+
display: flex;
|
|
290
|
+
flex-direction: column;
|
|
291
|
+
align-items: flex-start;
|
|
292
|
+
gap: 1.5rem;
|
|
293
|
+
align-self: stretch;
|
|
294
|
+
|
|
295
|
+
& .side-content__title {
|
|
296
|
+
color: var(--gray-950, #14161a);
|
|
297
|
+
font-size: 1rem;
|
|
298
|
+
font-style: normal;
|
|
299
|
+
font-weight: 600;
|
|
300
|
+
line-height: 1.5rem;
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
& .side-content__link {
|
|
304
|
+
color: var(--gray-950, #14161a);
|
|
305
|
+
font-size: 0.75rem;
|
|
306
|
+
font-style: normal;
|
|
307
|
+
font-weight: 500;
|
|
308
|
+
line-height: 1rem;
|
|
309
|
+
|
|
310
|
+
&:hover {
|
|
311
|
+
cursor: pointer;
|
|
312
|
+
text-decoration: underline;
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
& .side-content__items {
|
|
317
|
+
display: flex;
|
|
318
|
+
flex-direction: column;
|
|
319
|
+
align-items: flex-start;
|
|
320
|
+
gap: 1.25rem;
|
|
321
|
+
align-self: stretch;
|
|
322
|
+
|
|
323
|
+
& .side-content__item {
|
|
324
|
+
display: flex;
|
|
325
|
+
align-items: flex-start;
|
|
326
|
+
gap: 1rem;
|
|
327
|
+
align-self: stretch;
|
|
328
|
+
|
|
329
|
+
&:hover {
|
|
330
|
+
cursor: pointer;
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
& .item__image {
|
|
334
|
+
width: 100%;
|
|
335
|
+
max-width: 6rem;
|
|
336
|
+
height: 100%;
|
|
337
|
+
max-height: 3.75rem;
|
|
338
|
+
object-fit: cover;
|
|
339
|
+
border-radius: 0.375rem;
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
& .item__content {
|
|
343
|
+
display: flex;
|
|
344
|
+
flex-direction: column;
|
|
345
|
+
align-items: flex-start;
|
|
346
|
+
gap: 0.25rem;
|
|
347
|
+
|
|
348
|
+
& .item__title {
|
|
349
|
+
color: var(--gray-950, #14161a);
|
|
350
|
+
font-size: 0.875rem;
|
|
351
|
+
font-style: normal;
|
|
352
|
+
font-weight: 500;
|
|
353
|
+
line-height: 1.25rem;
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
& .item__description {
|
|
357
|
+
color: var(--gray-600, #676e79);
|
|
358
|
+
font-size: 0.75rem;
|
|
359
|
+
font-style: normal;
|
|
360
|
+
font-weight: 400;
|
|
361
|
+
line-height: 1rem;
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
@media (max-width: ${B + "px"}) {
|
|
369
|
+
flex-direction: column;
|
|
370
|
+
|
|
371
|
+
& .landing__main-content {
|
|
372
|
+
width: 100%;
|
|
373
|
+
padding-right: 0;
|
|
374
|
+
border-right: none;
|
|
375
|
+
|
|
376
|
+
& .main-content__actions {
|
|
377
|
+
gap: 0.5rem;
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
& .main-content__items {
|
|
381
|
+
& .main-content__divider {
|
|
382
|
+
display: none;
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
& .separated {
|
|
386
|
+
gap: 1.25rem;
|
|
387
|
+
|
|
388
|
+
& > div:not(:last-of-type)::after {
|
|
389
|
+
display: none;
|
|
390
|
+
}
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
& .blog-product-cards-section {
|
|
394
|
+
border-radius: 0;
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
& .pagination {
|
|
399
|
+
justify-content: center;
|
|
400
|
+
|
|
401
|
+
& .pagination__per-page {
|
|
402
|
+
display: none;
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
& .landing__side-content {
|
|
408
|
+
display: none;
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
`, ne = C(
|
|
412
|
+
({
|
|
413
|
+
mainTitle: s,
|
|
414
|
+
sideTitle: d,
|
|
415
|
+
tags: h,
|
|
416
|
+
selectedTag: o,
|
|
417
|
+
handleSelectTag: c = () => {
|
|
418
|
+
},
|
|
419
|
+
blogs: i,
|
|
420
|
+
miniBlogs: f,
|
|
421
|
+
products: p,
|
|
422
|
+
blogsLoading: _ = !1,
|
|
423
|
+
productsLoading: u = !1,
|
|
424
|
+
sortingOptions: m,
|
|
425
|
+
sortBy: t,
|
|
426
|
+
handleSortBy: a = () => {
|
|
427
|
+
},
|
|
428
|
+
allTagText: g = "All",
|
|
429
|
+
searchPlaceholderText: $ = "Search blogs",
|
|
430
|
+
timeToReadText: w = "{0} min read",
|
|
431
|
+
getBlogImageUrl: v = () => {
|
|
432
|
+
},
|
|
433
|
+
handleSelectBlog: x = () => {
|
|
434
|
+
},
|
|
435
|
+
handleSelectBlogTag: N = () => {
|
|
436
|
+
},
|
|
437
|
+
handleShareBlog: k = () => {
|
|
438
|
+
},
|
|
439
|
+
handleBookmarkBlog: S = () => {
|
|
440
|
+
},
|
|
441
|
+
showAllButtonLink: A,
|
|
442
|
+
showAllButtonText: j = "Show all products",
|
|
443
|
+
viewAllButtonText: M = "View all (11)",
|
|
444
|
+
viewAllButtonLink: te,
|
|
445
|
+
handleViewAll: D = () => {
|
|
446
|
+
},
|
|
447
|
+
handleShowAll: E = () => {
|
|
448
|
+
},
|
|
449
|
+
handleSelectProduct: F = () => {
|
|
450
|
+
},
|
|
451
|
+
getProductImageUrl: U = () => {
|
|
452
|
+
},
|
|
453
|
+
page: q,
|
|
454
|
+
handlePage: H = () => {
|
|
455
|
+
},
|
|
456
|
+
perPage: R,
|
|
457
|
+
handlePerPage: V = () => {
|
|
458
|
+
},
|
|
459
|
+
total: X,
|
|
460
|
+
perPageOptions: Z,
|
|
461
|
+
handleSearch: G = () => {
|
|
462
|
+
}
|
|
463
|
+
}, re) => /* @__PURE__ */ l(ee, { children: [
|
|
464
|
+
/* @__PURE__ */ l("div", { className: "landing__main-content", children: [
|
|
465
|
+
/* @__PURE__ */ n("div", { className: "main-content__title", children: s }),
|
|
466
|
+
h && /* @__PURE__ */ n(
|
|
467
|
+
W,
|
|
468
|
+
{
|
|
469
|
+
tags: h,
|
|
470
|
+
allTagText: g,
|
|
471
|
+
selectedTag: o,
|
|
472
|
+
onSelectTag: c
|
|
473
|
+
}
|
|
474
|
+
),
|
|
475
|
+
/* @__PURE__ */ l("div", { className: "main-content__actions", children: [
|
|
476
|
+
/* @__PURE__ */ n(
|
|
477
|
+
K,
|
|
478
|
+
{
|
|
479
|
+
className: "main-content__search",
|
|
480
|
+
placeholder: $,
|
|
481
|
+
debounceTime: 200,
|
|
482
|
+
prefix: /* @__PURE__ */ n(
|
|
483
|
+
b,
|
|
484
|
+
{
|
|
485
|
+
icon: " mng-lnc-search",
|
|
486
|
+
sizeInUnits: "1.25rem",
|
|
487
|
+
className: "main-content__search-prefix"
|
|
488
|
+
}
|
|
489
|
+
),
|
|
490
|
+
color: "neutral",
|
|
491
|
+
onChange: G
|
|
492
|
+
}
|
|
493
|
+
),
|
|
494
|
+
/* @__PURE__ */ n(
|
|
495
|
+
z,
|
|
496
|
+
{
|
|
497
|
+
color: "neutral",
|
|
498
|
+
control: t == null ? void 0 : t.name,
|
|
499
|
+
zIndex: 1001,
|
|
500
|
+
className: "main-content__sort-by",
|
|
501
|
+
children: m == null ? void 0 : m.map((r, y) => /* @__PURE__ */ n(
|
|
502
|
+
I,
|
|
503
|
+
{
|
|
504
|
+
active: (r == null ? void 0 : r.code) === (t == null ? void 0 : t.code),
|
|
505
|
+
className: "sort-by__item",
|
|
506
|
+
onClick: () => a(r),
|
|
507
|
+
children: r == null ? void 0 : r.name
|
|
508
|
+
},
|
|
509
|
+
`blog-epxlore-section-sorting-option__${y + 1}`
|
|
510
|
+
))
|
|
511
|
+
}
|
|
512
|
+
)
|
|
513
|
+
] }),
|
|
514
|
+
/* @__PURE__ */ l("div", { className: "main-content__items", children: [
|
|
515
|
+
/* @__PURE__ */ n(
|
|
516
|
+
T,
|
|
517
|
+
{
|
|
518
|
+
timeToReadText: w,
|
|
519
|
+
items: i == null ? void 0 : i.slice(0, 5),
|
|
520
|
+
isLoading: _,
|
|
521
|
+
getImage: v,
|
|
522
|
+
onSelectCard: x,
|
|
523
|
+
onSelectOption: N,
|
|
524
|
+
onShare: k,
|
|
525
|
+
onBookmark: S
|
|
526
|
+
}
|
|
527
|
+
),
|
|
528
|
+
/* @__PURE__ */ n("div", { className: "main-content__divider" }),
|
|
529
|
+
/* @__PURE__ */ n(
|
|
530
|
+
Y,
|
|
531
|
+
{
|
|
532
|
+
buttonText: j,
|
|
533
|
+
buttonLink: A,
|
|
534
|
+
onButtonAction: E,
|
|
535
|
+
onSelectCard: F,
|
|
536
|
+
items: p,
|
|
537
|
+
isLoading: u,
|
|
538
|
+
getImage: U,
|
|
539
|
+
isHighlight: !0
|
|
540
|
+
}
|
|
541
|
+
),
|
|
542
|
+
/* @__PURE__ */ n("div", { className: "main-content__divider" }),
|
|
543
|
+
/* @__PURE__ */ n(
|
|
544
|
+
T,
|
|
545
|
+
{
|
|
546
|
+
timeToReadText: w,
|
|
547
|
+
items: i == null ? void 0 : i.slice(5),
|
|
548
|
+
isLoading: _,
|
|
549
|
+
getImage: v,
|
|
550
|
+
onSelectCard: x,
|
|
551
|
+
onSelectOption: N,
|
|
552
|
+
onShare: k,
|
|
553
|
+
onBookmark: S
|
|
554
|
+
}
|
|
555
|
+
)
|
|
556
|
+
] }),
|
|
557
|
+
/* @__PURE__ */ n(
|
|
558
|
+
P,
|
|
559
|
+
{
|
|
560
|
+
perPageOptions: Z,
|
|
561
|
+
perPage: R,
|
|
562
|
+
handlePerPage: V,
|
|
563
|
+
page: q,
|
|
564
|
+
handlePage: H,
|
|
565
|
+
total: X
|
|
566
|
+
}
|
|
567
|
+
)
|
|
568
|
+
] }),
|
|
569
|
+
/* @__PURE__ */ l("div", { className: "landing__side-content", children: [
|
|
570
|
+
/* @__PURE__ */ n("div", { className: "side-content__title", children: d }),
|
|
571
|
+
/* @__PURE__ */ n("div", { className: "side-content__items", children: f && (f == null ? void 0 : f.map((r, y) => /* @__PURE__ */ l(
|
|
572
|
+
"div",
|
|
573
|
+
{
|
|
574
|
+
className: "side-content__item",
|
|
575
|
+
onClick: () => x(r),
|
|
576
|
+
children: [
|
|
577
|
+
/* @__PURE__ */ n(
|
|
578
|
+
"img",
|
|
579
|
+
{
|
|
580
|
+
src: v(r == null ? void 0 : r.imageUrl, r == null ? void 0 : r.uuid) || null,
|
|
581
|
+
alt: `Mini blog ${y + 1}`,
|
|
582
|
+
className: "item__image"
|
|
583
|
+
}
|
|
584
|
+
),
|
|
585
|
+
/* @__PURE__ */ l("div", { className: "item__content", children: [
|
|
586
|
+
/* @__PURE__ */ n("div", { className: "item__title", children: r == null ? void 0 : r.title }),
|
|
587
|
+
/* @__PURE__ */ n("div", { className: "item__description", children: J(r == null ? void 0 : r.publishedAt) })
|
|
588
|
+
] })
|
|
589
|
+
]
|
|
590
|
+
}
|
|
591
|
+
))) }),
|
|
592
|
+
/* @__PURE__ */ n(Q, { onClick: D, className: "side-content__link", children: M })
|
|
593
|
+
] })
|
|
594
|
+
] })
|
|
595
|
+
);
|
|
596
|
+
ne.propTypes = {
|
|
597
|
+
mainTitle: e.string,
|
|
598
|
+
sideTitle: e.string,
|
|
599
|
+
tags: e.array,
|
|
600
|
+
selectedTag: e.any,
|
|
601
|
+
handleSelectTag: e.func,
|
|
602
|
+
blogs: e.array,
|
|
603
|
+
miniBlogs: e.array,
|
|
604
|
+
products: e.array,
|
|
605
|
+
blogsLoading: e.bool,
|
|
606
|
+
productsLoading: e.bool,
|
|
607
|
+
sortingOptions: e.array,
|
|
608
|
+
sortBy: e.any,
|
|
609
|
+
handleSortBy: e.func,
|
|
610
|
+
allTagText: e.string,
|
|
611
|
+
searchPlaceholderText: e.string,
|
|
612
|
+
timeToReadText: e.string,
|
|
613
|
+
getBlogImageUrl: e.func,
|
|
614
|
+
handleSelectBlog: e.func,
|
|
615
|
+
handleSelectBlogTag: e.func,
|
|
616
|
+
handleShareBlog: e.func,
|
|
617
|
+
handleBookmarkBlog: e.func,
|
|
618
|
+
showAllButtonLink: e.string,
|
|
619
|
+
showAllButtonText: e.string,
|
|
620
|
+
viewAllButtonText: e.string,
|
|
621
|
+
handleShowAll: e.func,
|
|
622
|
+
handleSelectProduct: e.func,
|
|
623
|
+
getProductImageUrl: e.func,
|
|
624
|
+
page: e.number,
|
|
625
|
+
handlePage: e.func,
|
|
626
|
+
perPage: e.any,
|
|
627
|
+
handlePerPage: e.func,
|
|
628
|
+
total: e.number,
|
|
629
|
+
perPageOptions: e.array,
|
|
630
|
+
handleSearch: e.func
|
|
631
|
+
};
|
|
632
|
+
export {
|
|
633
|
+
ne as default
|
|
634
|
+
};
|
package/dist/BlogListSection.cjs
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
align-items: stretch;
|
|
8
8
|
border: 1px solid var(--neutral-9508, rgba(20, 22, 26, 0.08));
|
|
9
9
|
background: var(--white, #fff);
|
|
10
|
-
min-height:
|
|
10
|
+
min-height: 9.5rem;
|
|
11
11
|
position: relative;
|
|
12
12
|
width: 100%;
|
|
13
13
|
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
width: 100%;
|
|
24
24
|
object-fit: cover;
|
|
25
25
|
height: auto;
|
|
26
|
-
max-height:
|
|
26
|
+
max-height: 9.5rem;
|
|
27
27
|
max-width: 17.75rem;
|
|
28
28
|
border-radius: 0.75rem;
|
|
29
29
|
}
|
|
@@ -148,18 +148,21 @@
|
|
|
148
148
|
|
|
149
149
|
& .info__content {
|
|
150
150
|
align-items: flex-start;
|
|
151
|
+
justify-content: space-between;
|
|
151
152
|
width: 100%;
|
|
152
153
|
}
|
|
153
154
|
}
|
|
154
155
|
}
|
|
155
156
|
}
|
|
156
|
-
`,C=p.forwardRef(({title:g,imageUrl:s,options:i,publishedAt:
|
|
157
|
+
`,C=p.forwardRef(({title:g,imageUrl:s,options:i,publishedAt:a,timeToReadText:n="{0} min read",timeToRead:l=0,numberOfLikes:f=0,numberOfComments:u=0,isBookmarked:c=!1,onSelectCard:h=()=>{},onSelectOption:_=()=>{},onBookmark:e=()=>{},onShare:d=()=>{}},w)=>t.jsxs(I,{onClick:h,className:"blog-card-item",children:[t.jsx(N.ProductImageWrapper,{src:s,className:"wrapper__image"}),t.jsxs("div",{className:"wrapper__content",children:[t.jsxs("div",{className:"wrapper__subcontent",children:[t.jsx("div",{className:"wrapper__title",children:g}),t.jsxs("div",{className:"wrapper__tags-action",children:[t.jsx("div",{className:"wrapper__tags",children:i&&(i==null?void 0:i.map((r,v)=>t.jsx(k,{label:r==null?void 0:r.name,color:r==null?void 0:r.color,className:"wrapper__tag",onClick:b=>{b==null||b.stopPropagation(),_(r==null?void 0:r.code)}},`blog-card-sponsored-option__${v+1}`)))}),t.jsxs("div",{className:"info__content mobile-only",children:[t.jsx(m,{icon:c?" mng-lnc-bookmark--filled":" mng-lnc-bookmark",borderRadius:"curved",btnType:"basic",color:"neutral",onClick:r=>{r==null||r.stopPropagation(),e()}}),t.jsx(m,{icon:" mng-lnc-share",borderRadius:"curved",btnType:"basic",color:"neutral",onClick:r=>{r==null||r.stopPropagation(),d()}})]})]})]}),t.jsxs("div",{className:"wrapper__info",children:[t.jsxs("div",{className:"info__content",children:[t.jsx("div",{className:"info__text",children:`${o.formatLocaleDateString(a)} • ${o.formatString(n,l)}`}),t.jsxs("div",{className:"info__text",children:[t.jsxs("div",{children:[t.jsx(y,{icon:" mng-lnc-thumbs-up--filled",sizeInUnits:"1rem"}),o.getRoundedNumber(f)]}),t.jsxs("div",{children:[t.jsx(y,{icon:" mng-lnc-messages-filled",sizeInUnits:"1rem"}),o.getRoundedNumber(u)]})]})]}),t.jsxs("div",{className:"info__content desktop-only",children:[t.jsx(m,{icon:c?" mng-lnc-bookmark--filled":" mng-lnc-bookmark",borderRadius:"curved",btnType:"basic",color:"neutral",onClick:r=>{r==null||r.stopPropagation(),e()}}),t.jsx(m,{icon:" mng-lnc-share",borderRadius:"curved",btnType:"basic",color:"neutral",onClick:r=>{r==null||r.stopPropagation(),d()}})]})]})]})]})),P=j.styled.div`
|
|
157
158
|
display: flex;
|
|
158
159
|
flex-direction: column;
|
|
159
160
|
align-items: flex-start;
|
|
160
|
-
gap: 1.
|
|
161
|
+
gap: 1.25rem;
|
|
161
162
|
|
|
162
163
|
&.separated {
|
|
164
|
+
gap: 2.5rem;
|
|
165
|
+
|
|
163
166
|
& > div {
|
|
164
167
|
position: relative;
|
|
165
168
|
}
|
|
@@ -172,7 +175,7 @@
|
|
|
172
175
|
background: var(--gray-200, #dddfe4);
|
|
173
176
|
position: absolute;
|
|
174
177
|
left: 0;
|
|
175
|
-
bottom: -
|
|
178
|
+
bottom: -1.25rem;
|
|
176
179
|
}
|
|
177
180
|
}
|
|
178
|
-
`,z=p.memo(C),L=p.forwardRef(({timeToReadText:g="{0} min read",items:s,onSelectCard:i=()=>{},onSelectOption:
|
|
181
|
+
`,z=p.memo(C),L=p.forwardRef(({timeToReadText:g="{0} min read",items:s,onSelectCard:i=()=>{},onSelectOption:a=()=>{},onShare:n=()=>{},onBookmark:l=()=>{},isLoading:f=!1,getImage:u=()=>{},isSeparated:c=!0},h)=>{const _=p.useMemo(()=>s==null?void 0:s.map((e,d)=>t.jsx(z,{title:e==null?void 0:e.title,titleSlug:e==null?void 0:e.titleSlug,options:e==null?void 0:e.options,publishedAt:e==null?void 0:e.publishedAt,timeToReadText:g,timeToRead:e==null?void 0:e.timeToRead,numberOfLikes:e==null?void 0:e.numberOfLikes,numberOfComments:e==null?void 0:e.numberOfComments,isSponsored:e==null?void 0:e.isSponsored,isBookmarked:e==null?void 0:e.isBookmarked,onSelectCard:()=>i==null?void 0:i(e),onSelectOption:w=>a==null?void 0:a(w),onShare:()=>n==null?void 0:n(e),onBookmark:()=>l==null?void 0:l(e),imageUrl:u(e==null?void 0:e.imageUrl,e==null?void 0:e.uuid)||null},`blog-card-item__${d+1}`)),[s]);return t.jsx(P,{className:c?"separated":"",children:t.jsx(q.SuspenseBlogLarge,{isLoading:f,limit:5,keyPrefix:"blog-section",children:_})})});module.exports=L;
|