@digital-b2c/coreui-kit 0.14.1 → 0.14.3
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 +160 -142
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +48 -8
- 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 +88 -70
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var clsx43 = require('clsx');
|
|
4
4
|
var jsxRuntime = require('react/jsx-runtime');
|
|
5
|
-
var
|
|
5
|
+
var React68 = require('react');
|
|
6
6
|
var gsap = require('gsap');
|
|
7
7
|
var react = require('@gsap/react');
|
|
8
8
|
var ScrollTrigger = require('gsap/ScrollTrigger');
|
|
@@ -14,7 +14,7 @@ var ReactPlayer = require('react-player');
|
|
|
14
14
|
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
15
15
|
|
|
16
16
|
var clsx43__default = /*#__PURE__*/_interopDefault(clsx43);
|
|
17
|
-
var
|
|
17
|
+
var React68__default = /*#__PURE__*/_interopDefault(React68);
|
|
18
18
|
var gsap__default = /*#__PURE__*/_interopDefault(gsap);
|
|
19
19
|
var ReactPlayer__default = /*#__PURE__*/_interopDefault(ReactPlayer);
|
|
20
20
|
|
|
@@ -390,7 +390,7 @@ var svgs = {
|
|
|
390
390
|
xBlack: icon_x_black_default,
|
|
391
391
|
xWhite: icon_x_white_default
|
|
392
392
|
};
|
|
393
|
-
var Icon =
|
|
393
|
+
var Icon = React68__default.default.memo(
|
|
394
394
|
(_a) => {
|
|
395
395
|
var _b = _a, { type, size } = _b, props = __objRest(_b, ["type", "size"]);
|
|
396
396
|
if (type) {
|
|
@@ -504,21 +504,21 @@ var getDeviceType = (width) => {
|
|
|
504
504
|
return "desktop";
|
|
505
505
|
};
|
|
506
506
|
var useViewPort = () => {
|
|
507
|
-
const [device, setDevice] =
|
|
507
|
+
const [device, setDevice] = React68.useState(
|
|
508
508
|
() => typeof window !== "undefined" ? getDeviceType(window.innerWidth) : "desktop"
|
|
509
509
|
);
|
|
510
|
-
const getOtherDevices =
|
|
510
|
+
const getOtherDevices = React68.useCallback(
|
|
511
511
|
(list, what, includeSelf = false) => {
|
|
512
512
|
const deviceIndex = list.indexOf(what) + (!includeSelf ? 1 : 0);
|
|
513
513
|
return [...list].slice(deviceIndex);
|
|
514
514
|
},
|
|
515
515
|
[]
|
|
516
516
|
);
|
|
517
|
-
const onWindowResize =
|
|
517
|
+
const onWindowResize = React68.useCallback(() => {
|
|
518
518
|
setDevice(getDeviceType(window.innerWidth));
|
|
519
519
|
}, []);
|
|
520
520
|
const onWindowResizeDebounce = useDebounce_default(onWindowResize, 100);
|
|
521
|
-
|
|
521
|
+
React68.useEffect(() => {
|
|
522
522
|
window.addEventListener("resize", onWindowResizeDebounce);
|
|
523
523
|
return () => window.removeEventListener("resize", onWindowResizeDebounce);
|
|
524
524
|
}, [onWindowResizeDebounce]);
|
|
@@ -571,13 +571,13 @@ var BrandsStrip = ({
|
|
|
571
571
|
cta,
|
|
572
572
|
size
|
|
573
573
|
}) => {
|
|
574
|
-
const [show, setShow] =
|
|
575
|
-
const [shouldAnimate, setShouldAnimate] =
|
|
574
|
+
const [show, setShow] = React68.useState(false);
|
|
575
|
+
const [shouldAnimate, setShouldAnimate] = React68.useState(false);
|
|
576
576
|
const { is } = useViewPort_default();
|
|
577
577
|
const isTabletBelow = is("tablet", "below");
|
|
578
|
-
const containerRef =
|
|
579
|
-
const marqueeRef =
|
|
580
|
-
const timeline =
|
|
578
|
+
const containerRef = React68.useRef(null);
|
|
579
|
+
const marqueeRef = React68.useRef(null);
|
|
580
|
+
const timeline = React68.useRef(null);
|
|
581
581
|
const horizontalLoop = (items, config) => {
|
|
582
582
|
const itemsArray = gsap__default.default.utils.toArray(items);
|
|
583
583
|
const cfg = config || {};
|
|
@@ -671,7 +671,7 @@ var BrandsStrip = ({
|
|
|
671
671
|
timeline.current.play();
|
|
672
672
|
}
|
|
673
673
|
};
|
|
674
|
-
const duplicatedLogos =
|
|
674
|
+
const duplicatedLogos = React68.useMemo(() => {
|
|
675
675
|
if (logos.length === 0) return [];
|
|
676
676
|
if (!shouldAnimate) return [...logos];
|
|
677
677
|
return [...logos, ...logos];
|
|
@@ -724,8 +724,8 @@ var CardSubtitle = ({ children }) => {
|
|
|
724
724
|
};
|
|
725
725
|
function resolveCompoundSlots(children, slots) {
|
|
726
726
|
const resolved = {};
|
|
727
|
-
|
|
728
|
-
if (!
|
|
727
|
+
React68.Children.forEach(children, (child) => {
|
|
728
|
+
if (!React68.isValidElement(child)) return;
|
|
729
729
|
Object.entries(slots).forEach(([key, Component]) => {
|
|
730
730
|
if (child.type === Component) {
|
|
731
731
|
resolved[key] = child.props.children;
|
|
@@ -739,7 +739,7 @@ function resolveCompoundSlots(children, slots) {
|
|
|
739
739
|
var Container_module_default = {
|
|
740
740
|
container: "Container_module_container"
|
|
741
741
|
};
|
|
742
|
-
var Container =
|
|
742
|
+
var Container = React68.forwardRef(
|
|
743
743
|
(_a, ref) => {
|
|
744
744
|
var _b = _a, { children, className } = _b, props = __objRest(_b, ["children", "className"]);
|
|
745
745
|
return /* @__PURE__ */ jsxRuntime.jsx("div", __spreadProps(__spreadValues({ ref, className: clsx43__default.default(Container_module_default.container, className) }, props), { children }));
|
|
@@ -880,11 +880,11 @@ function FilterBar({
|
|
|
880
880
|
searchValue,
|
|
881
881
|
onSearchChange
|
|
882
882
|
}) {
|
|
883
|
-
const [openDropdown, setOpenDropdown] =
|
|
884
|
-
const [searchState, setSearchState] =
|
|
885
|
-
const filterRef =
|
|
886
|
-
const sortRef =
|
|
887
|
-
const searchInputRef =
|
|
883
|
+
const [openDropdown, setOpenDropdown] = React68.useState(null);
|
|
884
|
+
const [searchState, setSearchState] = React68.useState("closed");
|
|
885
|
+
const filterRef = React68.useRef(null);
|
|
886
|
+
const sortRef = React68.useRef(null);
|
|
887
|
+
const searchInputRef = React68.useRef(null);
|
|
888
888
|
const closeSearch = () => {
|
|
889
889
|
setSearchState("closing");
|
|
890
890
|
onSearchChange("");
|
|
@@ -894,7 +894,7 @@ function FilterBar({
|
|
|
894
894
|
onSearchChange("");
|
|
895
895
|
(_a = searchInputRef.current) == null ? void 0 : _a.focus();
|
|
896
896
|
};
|
|
897
|
-
|
|
897
|
+
React68.useEffect(() => {
|
|
898
898
|
const handleMouseDown = (e) => {
|
|
899
899
|
var _a, _b;
|
|
900
900
|
const target = e.target;
|
|
@@ -904,7 +904,7 @@ function FilterBar({
|
|
|
904
904
|
document.addEventListener("mousedown", handleMouseDown);
|
|
905
905
|
return () => document.removeEventListener("mousedown", handleMouseDown);
|
|
906
906
|
}, []);
|
|
907
|
-
|
|
907
|
+
React68.useEffect(() => {
|
|
908
908
|
var _a;
|
|
909
909
|
if (searchState === "open") (_a = searchInputRef.current) == null ? void 0 : _a.focus();
|
|
910
910
|
}, [searchState]);
|
|
@@ -1180,7 +1180,7 @@ var Pagination = ({
|
|
|
1180
1180
|
hidePagesBorder = false,
|
|
1181
1181
|
renderLink
|
|
1182
1182
|
}) => {
|
|
1183
|
-
const [activePage, setActivePage] =
|
|
1183
|
+
const [activePage, setActivePage] = React68.useState(currentPage);
|
|
1184
1184
|
const goToPage = (page) => {
|
|
1185
1185
|
if (page < 1 || page > totalPages) return;
|
|
1186
1186
|
setActivePage(page);
|
|
@@ -1239,7 +1239,7 @@ var Pagination = ({
|
|
|
1239
1239
|
[Pagination_module_default.number]: hasNumber,
|
|
1240
1240
|
[Pagination_module_default["no-border"]]: hidePagesBorder
|
|
1241
1241
|
});
|
|
1242
|
-
return renderLink ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
1242
|
+
return renderLink ? /* @__PURE__ */ jsxRuntime.jsx(React68.Fragment, { children: renderLink({
|
|
1243
1243
|
page,
|
|
1244
1244
|
className: pageClassName,
|
|
1245
1245
|
"aria-label": `Go to page ${page}`,
|
|
@@ -1449,6 +1449,7 @@ var UpcomingEventCard_module_default = {
|
|
|
1449
1449
|
"event-card-show-image": "UpcomingEventCard_module_event-card-show-image",
|
|
1450
1450
|
"event-card-cta": "UpcomingEventCard_module_event-card-cta",
|
|
1451
1451
|
hidden: "UpcomingEventCard_module_hidden",
|
|
1452
|
+
"event-card-cta-wrapper": "UpcomingEventCard_module_event-card-cta-wrapper",
|
|
1452
1453
|
"cta-without-image": "UpcomingEventCard_module_cta-without-image",
|
|
1453
1454
|
vertical: "UpcomingEventCard_module_vertical"
|
|
1454
1455
|
};
|
|
@@ -1494,7 +1495,7 @@ var UpcomingEventCard = ({
|
|
|
1494
1495
|
title && /* @__PURE__ */ jsxRuntime.jsx("h3", { className: clsx43__default.default("card-text-title"), children: title }),
|
|
1495
1496
|
location && /* @__PURE__ */ jsxRuntime.jsx("span", { className: UpcomingEventCard_module_default.location, children: location }),
|
|
1496
1497
|
description && /* @__PURE__ */ jsxRuntime.jsx("div", { className: clsx43__default.default("card-text-description", UpcomingEventCard_module_default.description), children: description }),
|
|
1497
|
-
cta && cta.url && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1498
|
+
cta && cta.url && /* @__PURE__ */ jsxRuntime.jsx("div", { className: clsx43__default.default("card-cta-wrapper", UpcomingEventCard_module_default["event-card-cta-wrapper"]), children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1498
1499
|
Button,
|
|
1499
1500
|
{
|
|
1500
1501
|
variant: "secondary",
|
|
@@ -1509,7 +1510,7 @@ var UpcomingEventCard = ({
|
|
|
1509
1510
|
isExternal: cta == null ? void 0 : cta.isExternal,
|
|
1510
1511
|
children: cta.label
|
|
1511
1512
|
}
|
|
1512
|
-
)
|
|
1513
|
+
) })
|
|
1513
1514
|
]
|
|
1514
1515
|
}
|
|
1515
1516
|
)
|
|
@@ -1549,7 +1550,7 @@ var Badge_module_default = {
|
|
|
1549
1550
|
icon: "Badge_module_icon",
|
|
1550
1551
|
iconOnly: "Badge_module_iconOnly"
|
|
1551
1552
|
};
|
|
1552
|
-
var Badge =
|
|
1553
|
+
var Badge = React68.forwardRef(
|
|
1553
1554
|
(_a, ref) => {
|
|
1554
1555
|
var _b = _a, {
|
|
1555
1556
|
children,
|
|
@@ -1623,7 +1624,7 @@ var Input_module_default = {
|
|
|
1623
1624
|
error: "Input_module_error",
|
|
1624
1625
|
"input-field--error": "Input_module_input-field--error",
|
|
1625
1626
|
"input-field--disabled": "Input_module_input-field--disabled"};
|
|
1626
|
-
var Input =
|
|
1627
|
+
var Input = React68.forwardRef(
|
|
1627
1628
|
(_a, ref) => {
|
|
1628
1629
|
var _b = _a, {
|
|
1629
1630
|
id,
|
|
@@ -1654,7 +1655,7 @@ var Input = React67.forwardRef(
|
|
|
1654
1655
|
"hideLabel",
|
|
1655
1656
|
"type"
|
|
1656
1657
|
]);
|
|
1657
|
-
const generatedId =
|
|
1658
|
+
const generatedId = React68.useId();
|
|
1658
1659
|
const inputId = id || generatedId;
|
|
1659
1660
|
const helperTextId = `${inputId}-helper`;
|
|
1660
1661
|
const errorId = `${inputId}-error`;
|
|
@@ -1859,10 +1860,10 @@ var CardCollection = ({
|
|
|
1859
1860
|
children
|
|
1860
1861
|
}) => {
|
|
1861
1862
|
var _a, _b;
|
|
1862
|
-
const container =
|
|
1863
|
-
const revealWrapper =
|
|
1864
|
-
const extraCard =
|
|
1865
|
-
const [isExpanded, setIsExpanded] =
|
|
1863
|
+
const container = React68.useRef(null);
|
|
1864
|
+
const revealWrapper = React68.useRef(null);
|
|
1865
|
+
const extraCard = React68.useRef(null);
|
|
1866
|
+
const [isExpanded, setIsExpanded] = React68.useState(false);
|
|
1866
1867
|
const slots = resolveCompoundSlots(children, {
|
|
1867
1868
|
title: CardCollectionTitle,
|
|
1868
1869
|
subtitle: CardCollectionSubtitle
|
|
@@ -1873,7 +1874,7 @@ var CardCollection = ({
|
|
|
1873
1874
|
const visibleCards = isExamCard ? cards.slice(0, 8) : cards;
|
|
1874
1875
|
const hiddenCards = isExamCard ? cards.slice(8) : [];
|
|
1875
1876
|
const { contextSafe } = react.useGSAP({ scope: container });
|
|
1876
|
-
const handleShowMore =
|
|
1877
|
+
const handleShowMore = React68.useCallback(() => {
|
|
1877
1878
|
contextSafe(() => {
|
|
1878
1879
|
setIsExpanded(true);
|
|
1879
1880
|
const tl = gsap__default.default.timeline({ defaults: { ease: "power3.inOut" } });
|
|
@@ -1977,8 +1978,8 @@ var ContactModule = ({
|
|
|
1977
1978
|
animateBlur = true
|
|
1978
1979
|
}) => {
|
|
1979
1980
|
var _a, _b;
|
|
1980
|
-
const containerRef =
|
|
1981
|
-
const blurRef =
|
|
1981
|
+
const containerRef = React68.useRef(null);
|
|
1982
|
+
const blurRef = React68.useRef(null);
|
|
1982
1983
|
const slots = resolveCompoundSlots(children, {
|
|
1983
1984
|
title: ContactModuleTitle,
|
|
1984
1985
|
subtitle: ContactModuleSubtitle
|
|
@@ -2317,8 +2318,8 @@ var HeroBannerCarousel = ({
|
|
|
2317
2318
|
}) => {
|
|
2318
2319
|
const { is } = useViewPort_default();
|
|
2319
2320
|
const isMobile = is("tablet", "below");
|
|
2320
|
-
const [swiperInstance, setSwiperInstance] =
|
|
2321
|
-
const [activeIndex, setActiveIndex] =
|
|
2321
|
+
const [swiperInstance, setSwiperInstance] = React68.useState(null);
|
|
2322
|
+
const [activeIndex, setActiveIndex] = React68.useState(0);
|
|
2322
2323
|
if (!items.length) return null;
|
|
2323
2324
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: clsx43__default.default(HeroBannerCarousel_module_default.heroBannerCarousel, className), children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: HeroBannerCarousel_module_default.inner, children: [
|
|
2324
2325
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: HeroBannerCarousel_module_default.swiperContainer, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -2407,16 +2408,16 @@ var AccordionItem = ({
|
|
|
2407
2408
|
onToggle,
|
|
2408
2409
|
className
|
|
2409
2410
|
}) => {
|
|
2410
|
-
const contentRef =
|
|
2411
|
-
const contentInnerRef =
|
|
2412
|
-
const timelineRef =
|
|
2413
|
-
const [contentHeight, setContentHeight] =
|
|
2414
|
-
|
|
2411
|
+
const contentRef = React68.useRef(null);
|
|
2412
|
+
const contentInnerRef = React68.useRef(null);
|
|
2413
|
+
const timelineRef = React68.useRef(null);
|
|
2414
|
+
const [contentHeight, setContentHeight] = React68.useState(0);
|
|
2415
|
+
React68.useEffect(() => {
|
|
2415
2416
|
if (contentInnerRef.current) {
|
|
2416
2417
|
setContentHeight(contentInnerRef.current.scrollHeight);
|
|
2417
2418
|
}
|
|
2418
2419
|
}, [children]);
|
|
2419
|
-
|
|
2420
|
+
React68.useEffect(() => {
|
|
2420
2421
|
if (contentRef.current && contentHeight > 0) {
|
|
2421
2422
|
if (timelineRef.current) {
|
|
2422
2423
|
timelineRef.current.kill();
|
|
@@ -2501,7 +2502,7 @@ var Accordion = ({
|
|
|
2501
2502
|
allowMultiple = false,
|
|
2502
2503
|
onItemToggle
|
|
2503
2504
|
}) => {
|
|
2504
|
-
const [openIds, setOpenIds] =
|
|
2505
|
+
const [openIds, setOpenIds] = React68.useState(defaultOpenIds);
|
|
2505
2506
|
const handleToggle = (id) => {
|
|
2506
2507
|
setOpenIds((prev) => {
|
|
2507
2508
|
let newOpenIds;
|
|
@@ -2562,10 +2563,10 @@ var InternalBrandsTab_module_default = {
|
|
|
2562
2563
|
var InternalBrandsTab = (props) => {
|
|
2563
2564
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A;
|
|
2564
2565
|
const { title, subTitle, className, tabs } = props;
|
|
2565
|
-
const [activeIndex, setActiveIndex] =
|
|
2566
|
+
const [activeIndex, setActiveIndex] = React68.useState(0);
|
|
2566
2567
|
const { is } = useViewPort_default();
|
|
2567
2568
|
const isTabletBelow = is("tablet", "below");
|
|
2568
|
-
const accordionItems =
|
|
2569
|
+
const accordionItems = React68.useMemo(() => {
|
|
2569
2570
|
return (tabs == null ? void 0 : tabs.map((tab, index) => {
|
|
2570
2571
|
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j2, _k2, _l2, _m2, _n2;
|
|
2571
2572
|
return {
|
|
@@ -2732,7 +2733,7 @@ var MiniBanner = ({
|
|
|
2732
2733
|
(logo == null ? void 0 : logo.src) && /* @__PURE__ */ jsxRuntime.jsx(Picture, __spreadValues({ className: MiniBanner_module_default.logo }, logo)),
|
|
2733
2734
|
pretitleNode && /* @__PURE__ */ jsxRuntime.jsx("div", { className: clsx43__default.default(MiniBanner_module_default.pretitle, "small"), children: pretitleNode }),
|
|
2734
2735
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: MiniBanner_module_default.headingWrapper, children: [
|
|
2735
|
-
goBackNode ?
|
|
2736
|
+
goBackNode ? React68__default.default.cloneElement(goBackNode, {
|
|
2736
2737
|
className: clsx43__default.default("back-button", MiniBanner_module_default["back-button"])
|
|
2737
2738
|
}) : null,
|
|
2738
2739
|
titleNode && /* @__PURE__ */ jsxRuntime.jsx("div", { className: clsx43__default.default(MiniBanner_module_default.title, isMiniBannerTextLeft ? "h1" : "h4"), children: titleNode })
|
|
@@ -2850,13 +2851,13 @@ function useIntersectionObserver({
|
|
|
2850
2851
|
animateOnce = false,
|
|
2851
2852
|
options = {}
|
|
2852
2853
|
} = {}) {
|
|
2853
|
-
const observeRef =
|
|
2854
|
-
const [isVisible, setIsVisible] =
|
|
2854
|
+
const observeRef = React68.useRef(null);
|
|
2855
|
+
const [isVisible, setIsVisible] = React68.useState(false);
|
|
2855
2856
|
if (typeof IntersectionObserver === "undefined") {
|
|
2856
2857
|
console.warn("IntersectionObserver is not supported in this browser.");
|
|
2857
2858
|
return { observeRef, isVisible: true };
|
|
2858
2859
|
}
|
|
2859
|
-
|
|
2860
|
+
React68.useEffect(() => {
|
|
2860
2861
|
const currentRef = observeRef.current;
|
|
2861
2862
|
if (!currentRef) return;
|
|
2862
2863
|
const observer = new IntersectionObserver((entries) => {
|
|
@@ -2875,8 +2876,8 @@ function useIntersectionObserver({
|
|
|
2875
2876
|
return { observeRef, isVisible };
|
|
2876
2877
|
}
|
|
2877
2878
|
var useIsAtTop = () => {
|
|
2878
|
-
const [isAtTop, setIsAtTop] =
|
|
2879
|
-
|
|
2879
|
+
const [isAtTop, setIsAtTop] = React68.useState(true);
|
|
2880
|
+
React68.useEffect(() => {
|
|
2880
2881
|
const handleScroll = () => setIsAtTop(window.scrollY === 0);
|
|
2881
2882
|
window.addEventListener("scroll", handleScroll, { passive: true });
|
|
2882
2883
|
return () => window.removeEventListener("scroll", handleScroll);
|
|
@@ -2932,10 +2933,10 @@ var NavigationDesktop = ({
|
|
|
2932
2933
|
onDropdownOpenChange
|
|
2933
2934
|
}) => {
|
|
2934
2935
|
var _a;
|
|
2935
|
-
const [activeDropdown, setActiveDropdown] =
|
|
2936
|
-
const closeTimer =
|
|
2937
|
-
const dropdownWrapperRefs =
|
|
2938
|
-
const baseId =
|
|
2936
|
+
const [activeDropdown, setActiveDropdown] = React68.useState(null);
|
|
2937
|
+
const closeTimer = React68.useRef(null);
|
|
2938
|
+
const dropdownWrapperRefs = React68.useRef([]);
|
|
2939
|
+
const baseId = React68.useId();
|
|
2939
2940
|
const setDropdown = (index) => {
|
|
2940
2941
|
setActiveDropdown(index);
|
|
2941
2942
|
onDropdownOpenChange == null ? void 0 : onDropdownOpenChange(index !== null);
|
|
@@ -3070,8 +3071,8 @@ var NavigationMobile = ({
|
|
|
3070
3071
|
onClose
|
|
3071
3072
|
}) => {
|
|
3072
3073
|
var _a;
|
|
3073
|
-
const [expanded, setExpanded] =
|
|
3074
|
-
const baseId =
|
|
3074
|
+
const [expanded, setExpanded] = React68.useState([]);
|
|
3075
|
+
const baseId = React68.useId();
|
|
3075
3076
|
const toggleExpanded = (index) => {
|
|
3076
3077
|
setExpanded((prev) => prev.includes(index) ? prev.filter((i) => i !== index) : [...prev, index]);
|
|
3077
3078
|
};
|
|
@@ -3173,15 +3174,15 @@ var NavigationMobile = ({
|
|
|
3173
3174
|
};
|
|
3174
3175
|
var Navigation2 = (props) => {
|
|
3175
3176
|
const { className, variant, homeCta, loginCta, mainLogo, rightButton, navigationItems } = props;
|
|
3176
|
-
const [isHovered, setIsHovered] =
|
|
3177
|
-
const [hasOpenDropdown, setHasOpenDropdown] =
|
|
3178
|
-
const [isMobileMenuOpen, setIsMobileMenuOpen] =
|
|
3177
|
+
const [isHovered, setIsHovered] = React68.useState(false);
|
|
3178
|
+
const [hasOpenDropdown, setHasOpenDropdown] = React68.useState(false);
|
|
3179
|
+
const [isMobileMenuOpen, setIsMobileMenuOpen] = React68.useState(false);
|
|
3179
3180
|
const isAtTop = useIsAtTop();
|
|
3180
3181
|
const { is } = useViewPort_default();
|
|
3181
|
-
const mobileMenuId =
|
|
3182
|
+
const mobileMenuId = React68.useId();
|
|
3182
3183
|
const isTabletBelow = is("tablet", "below");
|
|
3183
3184
|
const isTransparent = variant === "transparent" && isAtTop && !isHovered && !hasOpenDropdown;
|
|
3184
|
-
|
|
3185
|
+
React68.useEffect(() => {
|
|
3185
3186
|
document.body.style.overflow = isMobileMenuOpen ? "hidden" : "";
|
|
3186
3187
|
return () => {
|
|
3187
3188
|
document.body.style.overflow = "";
|
|
@@ -3498,11 +3499,15 @@ var EventList_module_default = {
|
|
|
3498
3499
|
horizontal: "EventList_module_horizontal",
|
|
3499
3500
|
"carousel-wrapper": "EventList_module_carousel-wrapper",
|
|
3500
3501
|
"carousel-list-item": "EventList_module_carousel-list-item",
|
|
3501
|
-
"event-card": "EventList_module_event-card"
|
|
3502
|
+
"event-card": "EventList_module_event-card",
|
|
3503
|
+
"empty-search-result": "EventList_module_empty-search-result"
|
|
3502
3504
|
};
|
|
3503
3505
|
var EventListTitle = ({ children }) => {
|
|
3504
3506
|
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children });
|
|
3505
3507
|
};
|
|
3508
|
+
var EventListEmpty = ({ children }) => {
|
|
3509
|
+
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children });
|
|
3510
|
+
};
|
|
3506
3511
|
var EventList = ({
|
|
3507
3512
|
className,
|
|
3508
3513
|
title,
|
|
@@ -3515,13 +3520,16 @@ var EventList = ({
|
|
|
3515
3520
|
var _a;
|
|
3516
3521
|
const { is } = useViewPort_default();
|
|
3517
3522
|
const slots = resolveCompoundSlots(children, {
|
|
3518
|
-
title: EventListTitle
|
|
3523
|
+
title: EventListTitle,
|
|
3524
|
+
empty: EventListEmpty
|
|
3519
3525
|
});
|
|
3520
3526
|
const titleNode = (_a = slots.title) != null ? _a : title;
|
|
3527
|
+
const emptyNode = slots == null ? void 0 : slots.empty;
|
|
3521
3528
|
const isBelowTablet = is("tablet", "below");
|
|
3522
3529
|
const cardDirection = isBelowTablet ? "vertical" : "horizontal";
|
|
3523
3530
|
const isInternalEventList = variant === "internalEventList";
|
|
3524
3531
|
const listDirection = isInternalEventList ? "horizontal" : "vertical";
|
|
3532
|
+
const isNotEmpty = Boolean(items) && items.length > 0;
|
|
3525
3533
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3526
3534
|
"div",
|
|
3527
3535
|
{
|
|
@@ -3544,63 +3552,72 @@ var EventList = ({
|
|
|
3544
3552
|
}
|
|
3545
3553
|
)
|
|
3546
3554
|
] }),
|
|
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
|
-
|
|
3595
|
-
|
|
3596
|
-
|
|
3597
|
-
|
|
3598
|
-
|
|
3599
|
-
|
|
3600
|
-
|
|
3601
|
-
|
|
3602
|
-
|
|
3603
|
-
|
|
3555
|
+
isNotEmpty && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
3556
|
+
isInternalEventList && isBelowTablet && /* @__PURE__ */ jsxRuntime.jsx(
|
|
3557
|
+
Carousel,
|
|
3558
|
+
{
|
|
3559
|
+
"aria-label": "Upcoming events",
|
|
3560
|
+
wrapperClass: clsx43__default.default(EventList_module_default["carousel-wrapper"], EventList_module_default[variant]),
|
|
3561
|
+
slideClass: EventList_module_default["carousel-list-item"],
|
|
3562
|
+
spaceBetween: 16,
|
|
3563
|
+
slides: items.map((item) => {
|
|
3564
|
+
var _a2, _b;
|
|
3565
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3566
|
+
UpcomingEventCard,
|
|
3567
|
+
__spreadValues({
|
|
3568
|
+
className: clsx43__default.default(EventList_module_default["event-card"]),
|
|
3569
|
+
direction: "vertical",
|
|
3570
|
+
showImage: false
|
|
3571
|
+
}, item),
|
|
3572
|
+
(_b = (_a2 = item.title) != null ? _a2 : item.date) != null ? _b : item.location
|
|
3573
|
+
);
|
|
3574
|
+
})
|
|
3575
|
+
}
|
|
3576
|
+
),
|
|
3577
|
+
isInternalEventList && !isBelowTablet && /* @__PURE__ */ jsxRuntime.jsx(
|
|
3578
|
+
"ul",
|
|
3579
|
+
{
|
|
3580
|
+
"aria-label": "Upcoming events",
|
|
3581
|
+
className: clsx43__default.default(
|
|
3582
|
+
EventList_module_default["event-list-wrapper"],
|
|
3583
|
+
EventList_module_default["horizontal"],
|
|
3584
|
+
EventList_module_default[variant]
|
|
3585
|
+
),
|
|
3586
|
+
children: items == null ? void 0 : items.map((item, index) => {
|
|
3587
|
+
var _a2, _b, _c;
|
|
3588
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3589
|
+
"li",
|
|
3590
|
+
{
|
|
3591
|
+
className: clsx43__default.default(EventList_module_default["card-list-item"]),
|
|
3592
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3593
|
+
UpcomingEventCard,
|
|
3594
|
+
__spreadProps(__spreadValues({}, item), {
|
|
3595
|
+
className: clsx43__default.default(EventList_module_default["card-item"]),
|
|
3596
|
+
showImage: false,
|
|
3597
|
+
direction: "vertical"
|
|
3598
|
+
})
|
|
3599
|
+
)
|
|
3600
|
+
},
|
|
3601
|
+
(_c = (_b = (_a2 = item.title) != null ? _a2 : item.date) != null ? _b : item.location) != null ? _c : index
|
|
3602
|
+
);
|
|
3603
|
+
})
|
|
3604
|
+
}
|
|
3605
|
+
),
|
|
3606
|
+
!isInternalEventList && /* @__PURE__ */ jsxRuntime.jsx(
|
|
3607
|
+
"ul",
|
|
3608
|
+
{
|
|
3609
|
+
"aria-label": "Upcoming events",
|
|
3610
|
+
className: clsx43__default.default(EventList_module_default["event-list-wrapper"], EventList_module_default[listDirection]),
|
|
3611
|
+
children: items == null ? void 0 : items.map((item, index) => {
|
|
3612
|
+
var _a2, _b, _c;
|
|
3613
|
+
return /* @__PURE__ */ jsxRuntime.jsx("li", { children: /* @__PURE__ */ jsxRuntime.jsx(UpcomingEventCard, __spreadProps(__spreadValues({}, item), { direction: cardDirection })) }, (_c = (_b = (_a2 = item.title) != null ? _a2 : item.date) != null ? _b : item.location) != null ? _c : index);
|
|
3614
|
+
})
|
|
3615
|
+
}
|
|
3616
|
+
)
|
|
3617
|
+
] }),
|
|
3618
|
+
!isNotEmpty && emptyNode ? React68__default.default.cloneElement(emptyNode, {
|
|
3619
|
+
className: clsx43__default.default("empty-search-result", EventList_module_default["empty-search-result"])
|
|
3620
|
+
}) : null
|
|
3604
3621
|
] })
|
|
3605
3622
|
}
|
|
3606
3623
|
);
|
|
@@ -3608,7 +3625,8 @@ var EventList = ({
|
|
|
3608
3625
|
|
|
3609
3626
|
// src/widgets/EventList/index.ts
|
|
3610
3627
|
var EventList2 = Object.assign(EventList, {
|
|
3611
|
-
Title: EventListTitle
|
|
3628
|
+
Title: EventListTitle,
|
|
3629
|
+
Empty: EventListEmpty
|
|
3612
3630
|
});
|
|
3613
3631
|
|
|
3614
3632
|
// src/widgets/TextEvent/TextEvent.module.scss
|
|
@@ -3780,17 +3798,17 @@ var ResourcesGridList = ({
|
|
|
3780
3798
|
defaultSort = "latest"
|
|
3781
3799
|
}) => {
|
|
3782
3800
|
var _a;
|
|
3783
|
-
const [view, setView] =
|
|
3784
|
-
const [isSidebarOpen, setIsSidebarOpen] =
|
|
3785
|
-
const [filterValue, setFilterValue] =
|
|
3786
|
-
const [sortValue, setSortValue] =
|
|
3787
|
-
const [searchQuery, setSearchQuery] =
|
|
3788
|
-
const [currentPage, setCurrentPage] =
|
|
3789
|
-
const [selectedCategory, setSelectedCategory] =
|
|
3801
|
+
const [view, setView] = React68.useState(defaultView);
|
|
3802
|
+
const [isSidebarOpen, setIsSidebarOpen] = React68.useState(false);
|
|
3803
|
+
const [filterValue, setFilterValue] = React68.useState(defaultFilter);
|
|
3804
|
+
const [sortValue, setSortValue] = React68.useState(defaultSort);
|
|
3805
|
+
const [searchQuery, setSearchQuery] = React68.useState("");
|
|
3806
|
+
const [currentPage, setCurrentPage] = React68.useState(1);
|
|
3807
|
+
const [selectedCategory, setSelectedCategory] = React68.useState(() => {
|
|
3790
3808
|
const activeIndex = categories.findIndex((cat) => cat.active);
|
|
3791
3809
|
return activeIndex === -1 ? 0 : activeIndex;
|
|
3792
3810
|
});
|
|
3793
|
-
const widgetRef =
|
|
3811
|
+
const widgetRef = React68.useRef(null);
|
|
3794
3812
|
const { is } = useViewPort_default();
|
|
3795
3813
|
const isMobile = is("tablet", "below");
|
|
3796
3814
|
const selectedValue = (_a = categories[selectedCategory]) == null ? void 0 : _a.value;
|
|
@@ -4253,7 +4271,7 @@ var NewsCardList = ({
|
|
|
4253
4271
|
/* @__PURE__ */ jsxRuntime.jsx(BlogCardGrid2, { items: cards, hasContainer: false, renderLink })
|
|
4254
4272
|
] })
|
|
4255
4273
|
] }),
|
|
4256
|
-
paginationNode ?
|
|
4274
|
+
paginationNode ? React68__default.default.cloneElement(paginationNode, {
|
|
4257
4275
|
className: clsx43__default.default("pagination", NewsCardList_module_default["pagination"])
|
|
4258
4276
|
}) : null
|
|
4259
4277
|
] })
|
|
@@ -4369,7 +4387,7 @@ var BlogSearchResultsList = ({
|
|
|
4369
4387
|
const searchNode = (_a = slots.search) != null ? _a : searchResult;
|
|
4370
4388
|
const paginationNode = slots.pagination;
|
|
4371
4389
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: clsx43__default.default("search-results-list", BlogSearchResultsList_module_default["search-results-list"], className), children: /* @__PURE__ */ jsxRuntime.jsxs(Container, { className: clsx43__default.default("container", BlogSearchResultsList_module_default["container"]), children: [
|
|
4372
|
-
typeof searchNode === "string" ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: clsx43__default.default("search-result", BlogSearchResultsList_module_default["search-result"]), children: searchNode }) :
|
|
4390
|
+
typeof searchNode === "string" ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: clsx43__default.default("search-result", BlogSearchResultsList_module_default["search-result"]), children: searchNode }) : React68__default.default.isValidElement(searchNode) ? React68__default.default.cloneElement(searchNode, {
|
|
4373
4391
|
className: clsx43__default.default("search-result", BlogSearchResultsList_module_default["search-result"])
|
|
4374
4392
|
}) : null,
|
|
4375
4393
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: clsx43__default.default("wrapper", BlogSearchResultsList_module_default["wrapper"]), children: [
|
|
@@ -4397,7 +4415,7 @@ var BlogSearchResultsList = ({
|
|
|
4397
4415
|
),
|
|
4398
4416
|
/* @__PURE__ */ jsxRuntime.jsx(BlogCardGrid2, { items, hasContainer: false, renderLink })
|
|
4399
4417
|
] }),
|
|
4400
|
-
paginationNode ?
|
|
4418
|
+
paginationNode ? React68__default.default.cloneElement(paginationNode, {
|
|
4401
4419
|
className: clsx43__default.default("pagination", BlogSearchResultsList_module_default["pagination"])
|
|
4402
4420
|
}) : null
|
|
4403
4421
|
] }) });
|
|
@@ -4440,7 +4458,7 @@ var GlobalSearchResultsList = ({
|
|
|
4440
4458
|
const searchNode = (_a = slots.search) != null ? _a : searchResult;
|
|
4441
4459
|
const paginationNode = slots.pagination;
|
|
4442
4460
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: clsx43__default.default("search-results-list", GlobalSearchResultsList_module_default["search-results-list"], className), children: /* @__PURE__ */ jsxRuntime.jsxs(Container, { className: clsx43__default.default("container", GlobalSearchResultsList_module_default["container"]), children: [
|
|
4443
|
-
typeof searchNode === "string" ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: clsx43__default.default("search-result", GlobalSearchResultsList_module_default["search-result"]), children: searchNode }) :
|
|
4461
|
+
typeof searchNode === "string" ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: clsx43__default.default("search-result", GlobalSearchResultsList_module_default["search-result"]), children: searchNode }) : React68__default.default.isValidElement(searchNode) ? React68__default.default.cloneElement(searchNode, {
|
|
4444
4462
|
className: clsx43__default.default("search-result", GlobalSearchResultsList_module_default["search-result"])
|
|
4445
4463
|
}) : null,
|
|
4446
4464
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: clsx43__default.default("wrapper", GlobalSearchResultsList_module_default["wrapper"]), children: /* @__PURE__ */ jsxRuntime.jsx(Grid, { role: "list", columns: 3, children: items.map((item, index) => {
|
|
@@ -4455,7 +4473,7 @@ var GlobalSearchResultsList = ({
|
|
|
4455
4473
|
}
|
|
4456
4474
|
) }, (_a2 = item.title) != null ? _a2 : index);
|
|
4457
4475
|
}) }) }),
|
|
4458
|
-
paginationNode ?
|
|
4476
|
+
paginationNode ? React68__default.default.cloneElement(paginationNode, {
|
|
4459
4477
|
className: clsx43__default.default("pagination", GlobalSearchResultsList_module_default["pagination"])
|
|
4460
4478
|
}) : null
|
|
4461
4479
|
] }) });
|
|
@@ -4494,10 +4512,10 @@ var TextCenterWithMedia = ({
|
|
|
4494
4512
|
children
|
|
4495
4513
|
}) => {
|
|
4496
4514
|
var _a;
|
|
4497
|
-
const [isOpen, setIsOpen] =
|
|
4498
|
-
const dialogRef =
|
|
4499
|
-
const videoRef =
|
|
4500
|
-
|
|
4515
|
+
const [isOpen, setIsOpen] = React68.useState(false);
|
|
4516
|
+
const dialogRef = React68.useRef(null);
|
|
4517
|
+
const videoRef = React68.useRef(null);
|
|
4518
|
+
React68.useEffect(() => {
|
|
4501
4519
|
var _a2, _b;
|
|
4502
4520
|
if (isOpen) {
|
|
4503
4521
|
(_a2 = dialogRef.current) == null ? void 0 : _a2.showModal();
|