@digital-b2c/coreui-kit 0.14.0 → 0.14.2
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/index.cjs +157 -140
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +43 -0
- package/dist/index.css.map +1 -1
- package/dist/index.d.cts +84 -78
- package/dist/index.d.ts +84 -78
- package/dist/index.mjs +85 -68
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import clsx43 from 'clsx';
|
|
2
2
|
import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
|
|
3
|
-
import
|
|
3
|
+
import React68, { forwardRef, useId, useRef, useState, useCallback, useMemo, useEffect, Children, isValidElement, Fragment as Fragment$1 } from 'react';
|
|
4
4
|
import gsap$1, { gsap } from 'gsap';
|
|
5
5
|
import { useGSAP } from '@gsap/react';
|
|
6
6
|
import { ScrollTrigger } from 'gsap/ScrollTrigger';
|
|
@@ -381,7 +381,7 @@ var svgs = {
|
|
|
381
381
|
xBlack: icon_x_black_default,
|
|
382
382
|
xWhite: icon_x_white_default
|
|
383
383
|
};
|
|
384
|
-
var Icon =
|
|
384
|
+
var Icon = React68.memo(
|
|
385
385
|
(_a) => {
|
|
386
386
|
var _b = _a, { type, size } = _b, props = __objRest(_b, ["type", "size"]);
|
|
387
387
|
if (type) {
|
|
@@ -2723,7 +2723,7 @@ var MiniBanner = ({
|
|
|
2723
2723
|
(logo == null ? void 0 : logo.src) && /* @__PURE__ */ jsx(Picture, __spreadValues({ className: MiniBanner_module_default.logo }, logo)),
|
|
2724
2724
|
pretitleNode && /* @__PURE__ */ jsx("div", { className: clsx43(MiniBanner_module_default.pretitle, "small"), children: pretitleNode }),
|
|
2725
2725
|
/* @__PURE__ */ jsxs("div", { className: MiniBanner_module_default.headingWrapper, children: [
|
|
2726
|
-
goBackNode ?
|
|
2726
|
+
goBackNode ? React68.cloneElement(goBackNode, {
|
|
2727
2727
|
className: clsx43("back-button", MiniBanner_module_default["back-button"])
|
|
2728
2728
|
}) : null,
|
|
2729
2729
|
titleNode && /* @__PURE__ */ jsx("div", { className: clsx43(MiniBanner_module_default.title, isMiniBannerTextLeft ? "h1" : "h4"), children: titleNode })
|
|
@@ -3489,11 +3489,15 @@ var EventList_module_default = {
|
|
|
3489
3489
|
horizontal: "EventList_module_horizontal",
|
|
3490
3490
|
"carousel-wrapper": "EventList_module_carousel-wrapper",
|
|
3491
3491
|
"carousel-list-item": "EventList_module_carousel-list-item",
|
|
3492
|
-
"event-card": "EventList_module_event-card"
|
|
3492
|
+
"event-card": "EventList_module_event-card",
|
|
3493
|
+
"empty-search-result": "EventList_module_empty-search-result"
|
|
3493
3494
|
};
|
|
3494
3495
|
var EventListTitle = ({ children }) => {
|
|
3495
3496
|
return /* @__PURE__ */ jsx(Fragment, { children });
|
|
3496
3497
|
};
|
|
3498
|
+
var EventListEmpty = ({ children }) => {
|
|
3499
|
+
return /* @__PURE__ */ jsx(Fragment, { children });
|
|
3500
|
+
};
|
|
3497
3501
|
var EventList = ({
|
|
3498
3502
|
className,
|
|
3499
3503
|
title,
|
|
@@ -3506,13 +3510,16 @@ var EventList = ({
|
|
|
3506
3510
|
var _a;
|
|
3507
3511
|
const { is } = useViewPort_default();
|
|
3508
3512
|
const slots = resolveCompoundSlots(children, {
|
|
3509
|
-
title: EventListTitle
|
|
3513
|
+
title: EventListTitle,
|
|
3514
|
+
empty: EventListEmpty
|
|
3510
3515
|
});
|
|
3511
3516
|
const titleNode = (_a = slots.title) != null ? _a : title;
|
|
3517
|
+
const emptyNode = slots == null ? void 0 : slots.empty;
|
|
3512
3518
|
const isBelowTablet = is("tablet", "below");
|
|
3513
3519
|
const cardDirection = isBelowTablet ? "vertical" : "horizontal";
|
|
3514
3520
|
const isInternalEventList = variant === "internalEventList";
|
|
3515
3521
|
const listDirection = isInternalEventList ? "horizontal" : "vertical";
|
|
3522
|
+
const isNotEmpty = Boolean(items) && items.length > 0;
|
|
3516
3523
|
return /* @__PURE__ */ jsx(
|
|
3517
3524
|
"div",
|
|
3518
3525
|
{
|
|
@@ -3535,63 +3542,72 @@ var EventList = ({
|
|
|
3535
3542
|
}
|
|
3536
3543
|
)
|
|
3537
3544
|
] }),
|
|
3538
|
-
|
|
3539
|
-
|
|
3540
|
-
|
|
3541
|
-
|
|
3542
|
-
|
|
3543
|
-
|
|
3544
|
-
|
|
3545
|
-
|
|
3546
|
-
|
|
3547
|
-
|
|
3548
|
-
|
|
3549
|
-
|
|
3550
|
-
|
|
3551
|
-
|
|
3552
|
-
|
|
3553
|
-
|
|
3554
|
-
|
|
3555
|
-
|
|
3556
|
-
|
|
3557
|
-
|
|
3558
|
-
|
|
3559
|
-
|
|
3560
|
-
|
|
3561
|
-
|
|
3562
|
-
|
|
3563
|
-
|
|
3564
|
-
|
|
3565
|
-
|
|
3566
|
-
|
|
3567
|
-
|
|
3568
|
-
|
|
3569
|
-
|
|
3570
|
-
|
|
3571
|
-
|
|
3572
|
-
|
|
3573
|
-
|
|
3574
|
-
|
|
3575
|
-
|
|
3576
|
-
|
|
3577
|
-
|
|
3578
|
-
|
|
3579
|
-
|
|
3580
|
-
|
|
3581
|
-
|
|
3582
|
-
|
|
3583
|
-
|
|
3584
|
-
|
|
3585
|
-
|
|
3586
|
-
|
|
3587
|
-
|
|
3588
|
-
|
|
3589
|
-
|
|
3590
|
-
|
|
3591
|
-
|
|
3592
|
-
|
|
3593
|
-
|
|
3594
|
-
|
|
3545
|
+
isNotEmpty && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
3546
|
+
isInternalEventList && isBelowTablet && /* @__PURE__ */ jsx(
|
|
3547
|
+
Carousel,
|
|
3548
|
+
{
|
|
3549
|
+
"aria-label": "Upcoming events",
|
|
3550
|
+
wrapperClass: clsx43(EventList_module_default["carousel-wrapper"], EventList_module_default[variant]),
|
|
3551
|
+
slideClass: EventList_module_default["carousel-list-item"],
|
|
3552
|
+
spaceBetween: 16,
|
|
3553
|
+
slides: items.map((item) => {
|
|
3554
|
+
var _a2, _b;
|
|
3555
|
+
return /* @__PURE__ */ jsx(
|
|
3556
|
+
UpcomingEventCard,
|
|
3557
|
+
__spreadValues({
|
|
3558
|
+
className: clsx43(EventList_module_default["event-card"]),
|
|
3559
|
+
direction: "vertical",
|
|
3560
|
+
showImage: false
|
|
3561
|
+
}, item),
|
|
3562
|
+
(_b = (_a2 = item.title) != null ? _a2 : item.date) != null ? _b : item.location
|
|
3563
|
+
);
|
|
3564
|
+
})
|
|
3565
|
+
}
|
|
3566
|
+
),
|
|
3567
|
+
isInternalEventList && !isBelowTablet && /* @__PURE__ */ jsx(
|
|
3568
|
+
"ul",
|
|
3569
|
+
{
|
|
3570
|
+
"aria-label": "Upcoming events",
|
|
3571
|
+
className: clsx43(
|
|
3572
|
+
EventList_module_default["event-list-wrapper"],
|
|
3573
|
+
EventList_module_default["horizontal"],
|
|
3574
|
+
EventList_module_default[variant]
|
|
3575
|
+
),
|
|
3576
|
+
children: items == null ? void 0 : items.map((item, index) => {
|
|
3577
|
+
var _a2, _b, _c;
|
|
3578
|
+
return /* @__PURE__ */ jsx(
|
|
3579
|
+
"li",
|
|
3580
|
+
{
|
|
3581
|
+
className: clsx43(EventList_module_default["card-list-item"]),
|
|
3582
|
+
children: /* @__PURE__ */ jsx(
|
|
3583
|
+
UpcomingEventCard,
|
|
3584
|
+
__spreadProps(__spreadValues({}, item), {
|
|
3585
|
+
className: clsx43(EventList_module_default["card-item"]),
|
|
3586
|
+
showImage: false,
|
|
3587
|
+
direction: "vertical"
|
|
3588
|
+
})
|
|
3589
|
+
)
|
|
3590
|
+
},
|
|
3591
|
+
(_c = (_b = (_a2 = item.title) != null ? _a2 : item.date) != null ? _b : item.location) != null ? _c : index
|
|
3592
|
+
);
|
|
3593
|
+
})
|
|
3594
|
+
}
|
|
3595
|
+
),
|
|
3596
|
+
!isInternalEventList && /* @__PURE__ */ jsx(
|
|
3597
|
+
"ul",
|
|
3598
|
+
{
|
|
3599
|
+
"aria-label": "Upcoming events",
|
|
3600
|
+
className: clsx43(EventList_module_default["event-list-wrapper"], EventList_module_default[listDirection]),
|
|
3601
|
+
children: items == null ? void 0 : items.map((item, index) => {
|
|
3602
|
+
var _a2, _b, _c;
|
|
3603
|
+
return /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(UpcomingEventCard, __spreadProps(__spreadValues({}, item), { direction: cardDirection })) }, (_c = (_b = (_a2 = item.title) != null ? _a2 : item.date) != null ? _b : item.location) != null ? _c : index);
|
|
3604
|
+
})
|
|
3605
|
+
}
|
|
3606
|
+
)
|
|
3607
|
+
] }),
|
|
3608
|
+
!isNotEmpty && emptyNode ? React68.cloneElement(emptyNode, {
|
|
3609
|
+
className: clsx43("empty-search-result", EventList_module_default["empty-search-result"])
|
|
3610
|
+
}) : null
|
|
3595
3611
|
] })
|
|
3596
3612
|
}
|
|
3597
3613
|
);
|
|
@@ -3599,7 +3615,8 @@ var EventList = ({
|
|
|
3599
3615
|
|
|
3600
3616
|
// src/widgets/EventList/index.ts
|
|
3601
3617
|
var EventList2 = Object.assign(EventList, {
|
|
3602
|
-
Title: EventListTitle
|
|
3618
|
+
Title: EventListTitle,
|
|
3619
|
+
Empty: EventListEmpty
|
|
3603
3620
|
});
|
|
3604
3621
|
|
|
3605
3622
|
// src/widgets/TextEvent/TextEvent.module.scss
|
|
@@ -4244,7 +4261,7 @@ var NewsCardList = ({
|
|
|
4244
4261
|
/* @__PURE__ */ jsx(BlogCardGrid2, { items: cards, hasContainer: false, renderLink })
|
|
4245
4262
|
] })
|
|
4246
4263
|
] }),
|
|
4247
|
-
paginationNode ?
|
|
4264
|
+
paginationNode ? React68.cloneElement(paginationNode, {
|
|
4248
4265
|
className: clsx43("pagination", NewsCardList_module_default["pagination"])
|
|
4249
4266
|
}) : null
|
|
4250
4267
|
] })
|
|
@@ -4360,7 +4377,7 @@ var BlogSearchResultsList = ({
|
|
|
4360
4377
|
const searchNode = (_a = slots.search) != null ? _a : searchResult;
|
|
4361
4378
|
const paginationNode = slots.pagination;
|
|
4362
4379
|
return /* @__PURE__ */ jsx("div", { className: clsx43("search-results-list", BlogSearchResultsList_module_default["search-results-list"], className), children: /* @__PURE__ */ jsxs(Container, { className: clsx43("container", BlogSearchResultsList_module_default["container"]), children: [
|
|
4363
|
-
typeof searchNode === "string" ? /* @__PURE__ */ jsx("span", { className: clsx43("search-result", BlogSearchResultsList_module_default["search-result"]), children: searchNode }) :
|
|
4380
|
+
typeof searchNode === "string" ? /* @__PURE__ */ jsx("span", { className: clsx43("search-result", BlogSearchResultsList_module_default["search-result"]), children: searchNode }) : React68.isValidElement(searchNode) ? React68.cloneElement(searchNode, {
|
|
4364
4381
|
className: clsx43("search-result", BlogSearchResultsList_module_default["search-result"])
|
|
4365
4382
|
}) : null,
|
|
4366
4383
|
/* @__PURE__ */ jsxs("div", { className: clsx43("wrapper", BlogSearchResultsList_module_default["wrapper"]), children: [
|
|
@@ -4388,7 +4405,7 @@ var BlogSearchResultsList = ({
|
|
|
4388
4405
|
),
|
|
4389
4406
|
/* @__PURE__ */ jsx(BlogCardGrid2, { items, hasContainer: false, renderLink })
|
|
4390
4407
|
] }),
|
|
4391
|
-
paginationNode ?
|
|
4408
|
+
paginationNode ? React68.cloneElement(paginationNode, {
|
|
4392
4409
|
className: clsx43("pagination", BlogSearchResultsList_module_default["pagination"])
|
|
4393
4410
|
}) : null
|
|
4394
4411
|
] }) });
|
|
@@ -4431,7 +4448,7 @@ var GlobalSearchResultsList = ({
|
|
|
4431
4448
|
const searchNode = (_a = slots.search) != null ? _a : searchResult;
|
|
4432
4449
|
const paginationNode = slots.pagination;
|
|
4433
4450
|
return /* @__PURE__ */ jsx("div", { className: clsx43("search-results-list", GlobalSearchResultsList_module_default["search-results-list"], className), children: /* @__PURE__ */ jsxs(Container, { className: clsx43("container", GlobalSearchResultsList_module_default["container"]), children: [
|
|
4434
|
-
typeof searchNode === "string" ? /* @__PURE__ */ jsx("span", { className: clsx43("search-result", GlobalSearchResultsList_module_default["search-result"]), children: searchNode }) :
|
|
4451
|
+
typeof searchNode === "string" ? /* @__PURE__ */ jsx("span", { className: clsx43("search-result", GlobalSearchResultsList_module_default["search-result"]), children: searchNode }) : React68.isValidElement(searchNode) ? React68.cloneElement(searchNode, {
|
|
4435
4452
|
className: clsx43("search-result", GlobalSearchResultsList_module_default["search-result"])
|
|
4436
4453
|
}) : null,
|
|
4437
4454
|
/* @__PURE__ */ jsx("div", { className: clsx43("wrapper", GlobalSearchResultsList_module_default["wrapper"]), children: /* @__PURE__ */ jsx(Grid, { role: "list", columns: 3, children: items.map((item, index) => {
|
|
@@ -4446,7 +4463,7 @@ var GlobalSearchResultsList = ({
|
|
|
4446
4463
|
}
|
|
4447
4464
|
) }, (_a2 = item.title) != null ? _a2 : index);
|
|
4448
4465
|
}) }) }),
|
|
4449
|
-
paginationNode ?
|
|
4466
|
+
paginationNode ? React68.cloneElement(paginationNode, {
|
|
4450
4467
|
className: clsx43("pagination", GlobalSearchResultsList_module_default["pagination"])
|
|
4451
4468
|
}) : null
|
|
4452
4469
|
] }) });
|