@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.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}`,
|
|
@@ -1549,7 +1549,7 @@ var Badge_module_default = {
|
|
|
1549
1549
|
icon: "Badge_module_icon",
|
|
1550
1550
|
iconOnly: "Badge_module_iconOnly"
|
|
1551
1551
|
};
|
|
1552
|
-
var Badge =
|
|
1552
|
+
var Badge = React68.forwardRef(
|
|
1553
1553
|
(_a, ref) => {
|
|
1554
1554
|
var _b = _a, {
|
|
1555
1555
|
children,
|
|
@@ -1623,7 +1623,7 @@ var Input_module_default = {
|
|
|
1623
1623
|
error: "Input_module_error",
|
|
1624
1624
|
"input-field--error": "Input_module_input-field--error",
|
|
1625
1625
|
"input-field--disabled": "Input_module_input-field--disabled"};
|
|
1626
|
-
var Input =
|
|
1626
|
+
var Input = React68.forwardRef(
|
|
1627
1627
|
(_a, ref) => {
|
|
1628
1628
|
var _b = _a, {
|
|
1629
1629
|
id,
|
|
@@ -1654,7 +1654,7 @@ var Input = React67.forwardRef(
|
|
|
1654
1654
|
"hideLabel",
|
|
1655
1655
|
"type"
|
|
1656
1656
|
]);
|
|
1657
|
-
const generatedId =
|
|
1657
|
+
const generatedId = React68.useId();
|
|
1658
1658
|
const inputId = id || generatedId;
|
|
1659
1659
|
const helperTextId = `${inputId}-helper`;
|
|
1660
1660
|
const errorId = `${inputId}-error`;
|
|
@@ -1859,10 +1859,10 @@ var CardCollection = ({
|
|
|
1859
1859
|
children
|
|
1860
1860
|
}) => {
|
|
1861
1861
|
var _a, _b;
|
|
1862
|
-
const container =
|
|
1863
|
-
const revealWrapper =
|
|
1864
|
-
const extraCard =
|
|
1865
|
-
const [isExpanded, setIsExpanded] =
|
|
1862
|
+
const container = React68.useRef(null);
|
|
1863
|
+
const revealWrapper = React68.useRef(null);
|
|
1864
|
+
const extraCard = React68.useRef(null);
|
|
1865
|
+
const [isExpanded, setIsExpanded] = React68.useState(false);
|
|
1866
1866
|
const slots = resolveCompoundSlots(children, {
|
|
1867
1867
|
title: CardCollectionTitle,
|
|
1868
1868
|
subtitle: CardCollectionSubtitle
|
|
@@ -1873,7 +1873,7 @@ var CardCollection = ({
|
|
|
1873
1873
|
const visibleCards = isExamCard ? cards.slice(0, 8) : cards;
|
|
1874
1874
|
const hiddenCards = isExamCard ? cards.slice(8) : [];
|
|
1875
1875
|
const { contextSafe } = react.useGSAP({ scope: container });
|
|
1876
|
-
const handleShowMore =
|
|
1876
|
+
const handleShowMore = React68.useCallback(() => {
|
|
1877
1877
|
contextSafe(() => {
|
|
1878
1878
|
setIsExpanded(true);
|
|
1879
1879
|
const tl = gsap__default.default.timeline({ defaults: { ease: "power3.inOut" } });
|
|
@@ -1977,8 +1977,8 @@ var ContactModule = ({
|
|
|
1977
1977
|
animateBlur = true
|
|
1978
1978
|
}) => {
|
|
1979
1979
|
var _a, _b;
|
|
1980
|
-
const containerRef =
|
|
1981
|
-
const blurRef =
|
|
1980
|
+
const containerRef = React68.useRef(null);
|
|
1981
|
+
const blurRef = React68.useRef(null);
|
|
1982
1982
|
const slots = resolveCompoundSlots(children, {
|
|
1983
1983
|
title: ContactModuleTitle,
|
|
1984
1984
|
subtitle: ContactModuleSubtitle
|
|
@@ -2317,8 +2317,8 @@ var HeroBannerCarousel = ({
|
|
|
2317
2317
|
}) => {
|
|
2318
2318
|
const { is } = useViewPort_default();
|
|
2319
2319
|
const isMobile = is("tablet", "below");
|
|
2320
|
-
const [swiperInstance, setSwiperInstance] =
|
|
2321
|
-
const [activeIndex, setActiveIndex] =
|
|
2320
|
+
const [swiperInstance, setSwiperInstance] = React68.useState(null);
|
|
2321
|
+
const [activeIndex, setActiveIndex] = React68.useState(0);
|
|
2322
2322
|
if (!items.length) return null;
|
|
2323
2323
|
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
2324
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: HeroBannerCarousel_module_default.swiperContainer, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -2407,16 +2407,16 @@ var AccordionItem = ({
|
|
|
2407
2407
|
onToggle,
|
|
2408
2408
|
className
|
|
2409
2409
|
}) => {
|
|
2410
|
-
const contentRef =
|
|
2411
|
-
const contentInnerRef =
|
|
2412
|
-
const timelineRef =
|
|
2413
|
-
const [contentHeight, setContentHeight] =
|
|
2414
|
-
|
|
2410
|
+
const contentRef = React68.useRef(null);
|
|
2411
|
+
const contentInnerRef = React68.useRef(null);
|
|
2412
|
+
const timelineRef = React68.useRef(null);
|
|
2413
|
+
const [contentHeight, setContentHeight] = React68.useState(0);
|
|
2414
|
+
React68.useEffect(() => {
|
|
2415
2415
|
if (contentInnerRef.current) {
|
|
2416
2416
|
setContentHeight(contentInnerRef.current.scrollHeight);
|
|
2417
2417
|
}
|
|
2418
2418
|
}, [children]);
|
|
2419
|
-
|
|
2419
|
+
React68.useEffect(() => {
|
|
2420
2420
|
if (contentRef.current && contentHeight > 0) {
|
|
2421
2421
|
if (timelineRef.current) {
|
|
2422
2422
|
timelineRef.current.kill();
|
|
@@ -2501,7 +2501,7 @@ var Accordion = ({
|
|
|
2501
2501
|
allowMultiple = false,
|
|
2502
2502
|
onItemToggle
|
|
2503
2503
|
}) => {
|
|
2504
|
-
const [openIds, setOpenIds] =
|
|
2504
|
+
const [openIds, setOpenIds] = React68.useState(defaultOpenIds);
|
|
2505
2505
|
const handleToggle = (id) => {
|
|
2506
2506
|
setOpenIds((prev) => {
|
|
2507
2507
|
let newOpenIds;
|
|
@@ -2562,10 +2562,10 @@ var InternalBrandsTab_module_default = {
|
|
|
2562
2562
|
var InternalBrandsTab = (props) => {
|
|
2563
2563
|
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
2564
|
const { title, subTitle, className, tabs } = props;
|
|
2565
|
-
const [activeIndex, setActiveIndex] =
|
|
2565
|
+
const [activeIndex, setActiveIndex] = React68.useState(0);
|
|
2566
2566
|
const { is } = useViewPort_default();
|
|
2567
2567
|
const isTabletBelow = is("tablet", "below");
|
|
2568
|
-
const accordionItems =
|
|
2568
|
+
const accordionItems = React68.useMemo(() => {
|
|
2569
2569
|
return (tabs == null ? void 0 : tabs.map((tab, index) => {
|
|
2570
2570
|
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j2, _k2, _l2, _m2, _n2;
|
|
2571
2571
|
return {
|
|
@@ -2732,7 +2732,7 @@ var MiniBanner = ({
|
|
|
2732
2732
|
(logo == null ? void 0 : logo.src) && /* @__PURE__ */ jsxRuntime.jsx(Picture, __spreadValues({ className: MiniBanner_module_default.logo }, logo)),
|
|
2733
2733
|
pretitleNode && /* @__PURE__ */ jsxRuntime.jsx("div", { className: clsx43__default.default(MiniBanner_module_default.pretitle, "small"), children: pretitleNode }),
|
|
2734
2734
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: MiniBanner_module_default.headingWrapper, children: [
|
|
2735
|
-
goBackNode ?
|
|
2735
|
+
goBackNode ? React68__default.default.cloneElement(goBackNode, {
|
|
2736
2736
|
className: clsx43__default.default("back-button", MiniBanner_module_default["back-button"])
|
|
2737
2737
|
}) : null,
|
|
2738
2738
|
titleNode && /* @__PURE__ */ jsxRuntime.jsx("div", { className: clsx43__default.default(MiniBanner_module_default.title, isMiniBannerTextLeft ? "h1" : "h4"), children: titleNode })
|
|
@@ -2850,13 +2850,13 @@ function useIntersectionObserver({
|
|
|
2850
2850
|
animateOnce = false,
|
|
2851
2851
|
options = {}
|
|
2852
2852
|
} = {}) {
|
|
2853
|
-
const observeRef =
|
|
2854
|
-
const [isVisible, setIsVisible] =
|
|
2853
|
+
const observeRef = React68.useRef(null);
|
|
2854
|
+
const [isVisible, setIsVisible] = React68.useState(false);
|
|
2855
2855
|
if (typeof IntersectionObserver === "undefined") {
|
|
2856
2856
|
console.warn("IntersectionObserver is not supported in this browser.");
|
|
2857
2857
|
return { observeRef, isVisible: true };
|
|
2858
2858
|
}
|
|
2859
|
-
|
|
2859
|
+
React68.useEffect(() => {
|
|
2860
2860
|
const currentRef = observeRef.current;
|
|
2861
2861
|
if (!currentRef) return;
|
|
2862
2862
|
const observer = new IntersectionObserver((entries) => {
|
|
@@ -2875,8 +2875,8 @@ function useIntersectionObserver({
|
|
|
2875
2875
|
return { observeRef, isVisible };
|
|
2876
2876
|
}
|
|
2877
2877
|
var useIsAtTop = () => {
|
|
2878
|
-
const [isAtTop, setIsAtTop] =
|
|
2879
|
-
|
|
2878
|
+
const [isAtTop, setIsAtTop] = React68.useState(true);
|
|
2879
|
+
React68.useEffect(() => {
|
|
2880
2880
|
const handleScroll = () => setIsAtTop(window.scrollY === 0);
|
|
2881
2881
|
window.addEventListener("scroll", handleScroll, { passive: true });
|
|
2882
2882
|
return () => window.removeEventListener("scroll", handleScroll);
|
|
@@ -2932,10 +2932,10 @@ var NavigationDesktop = ({
|
|
|
2932
2932
|
onDropdownOpenChange
|
|
2933
2933
|
}) => {
|
|
2934
2934
|
var _a;
|
|
2935
|
-
const [activeDropdown, setActiveDropdown] =
|
|
2936
|
-
const closeTimer =
|
|
2937
|
-
const dropdownWrapperRefs =
|
|
2938
|
-
const baseId =
|
|
2935
|
+
const [activeDropdown, setActiveDropdown] = React68.useState(null);
|
|
2936
|
+
const closeTimer = React68.useRef(null);
|
|
2937
|
+
const dropdownWrapperRefs = React68.useRef([]);
|
|
2938
|
+
const baseId = React68.useId();
|
|
2939
2939
|
const setDropdown = (index) => {
|
|
2940
2940
|
setActiveDropdown(index);
|
|
2941
2941
|
onDropdownOpenChange == null ? void 0 : onDropdownOpenChange(index !== null);
|
|
@@ -3070,8 +3070,8 @@ var NavigationMobile = ({
|
|
|
3070
3070
|
onClose
|
|
3071
3071
|
}) => {
|
|
3072
3072
|
var _a;
|
|
3073
|
-
const [expanded, setExpanded] =
|
|
3074
|
-
const baseId =
|
|
3073
|
+
const [expanded, setExpanded] = React68.useState([]);
|
|
3074
|
+
const baseId = React68.useId();
|
|
3075
3075
|
const toggleExpanded = (index) => {
|
|
3076
3076
|
setExpanded((prev) => prev.includes(index) ? prev.filter((i) => i !== index) : [...prev, index]);
|
|
3077
3077
|
};
|
|
@@ -3173,15 +3173,15 @@ var NavigationMobile = ({
|
|
|
3173
3173
|
};
|
|
3174
3174
|
var Navigation2 = (props) => {
|
|
3175
3175
|
const { className, variant, homeCta, loginCta, mainLogo, rightButton, navigationItems } = props;
|
|
3176
|
-
const [isHovered, setIsHovered] =
|
|
3177
|
-
const [hasOpenDropdown, setHasOpenDropdown] =
|
|
3178
|
-
const [isMobileMenuOpen, setIsMobileMenuOpen] =
|
|
3176
|
+
const [isHovered, setIsHovered] = React68.useState(false);
|
|
3177
|
+
const [hasOpenDropdown, setHasOpenDropdown] = React68.useState(false);
|
|
3178
|
+
const [isMobileMenuOpen, setIsMobileMenuOpen] = React68.useState(false);
|
|
3179
3179
|
const isAtTop = useIsAtTop();
|
|
3180
3180
|
const { is } = useViewPort_default();
|
|
3181
|
-
const mobileMenuId =
|
|
3181
|
+
const mobileMenuId = React68.useId();
|
|
3182
3182
|
const isTabletBelow = is("tablet", "below");
|
|
3183
3183
|
const isTransparent = variant === "transparent" && isAtTop && !isHovered && !hasOpenDropdown;
|
|
3184
|
-
|
|
3184
|
+
React68.useEffect(() => {
|
|
3185
3185
|
document.body.style.overflow = isMobileMenuOpen ? "hidden" : "";
|
|
3186
3186
|
return () => {
|
|
3187
3187
|
document.body.style.overflow = "";
|
|
@@ -3498,11 +3498,15 @@ var EventList_module_default = {
|
|
|
3498
3498
|
horizontal: "EventList_module_horizontal",
|
|
3499
3499
|
"carousel-wrapper": "EventList_module_carousel-wrapper",
|
|
3500
3500
|
"carousel-list-item": "EventList_module_carousel-list-item",
|
|
3501
|
-
"event-card": "EventList_module_event-card"
|
|
3501
|
+
"event-card": "EventList_module_event-card",
|
|
3502
|
+
"empty-search-result": "EventList_module_empty-search-result"
|
|
3502
3503
|
};
|
|
3503
3504
|
var EventListTitle = ({ children }) => {
|
|
3504
3505
|
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children });
|
|
3505
3506
|
};
|
|
3507
|
+
var EventListEmpty = ({ children }) => {
|
|
3508
|
+
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children });
|
|
3509
|
+
};
|
|
3506
3510
|
var EventList = ({
|
|
3507
3511
|
className,
|
|
3508
3512
|
title,
|
|
@@ -3515,13 +3519,16 @@ var EventList = ({
|
|
|
3515
3519
|
var _a;
|
|
3516
3520
|
const { is } = useViewPort_default();
|
|
3517
3521
|
const slots = resolveCompoundSlots(children, {
|
|
3518
|
-
title: EventListTitle
|
|
3522
|
+
title: EventListTitle,
|
|
3523
|
+
empty: EventListEmpty
|
|
3519
3524
|
});
|
|
3520
3525
|
const titleNode = (_a = slots.title) != null ? _a : title;
|
|
3526
|
+
const emptyNode = slots == null ? void 0 : slots.empty;
|
|
3521
3527
|
const isBelowTablet = is("tablet", "below");
|
|
3522
3528
|
const cardDirection = isBelowTablet ? "vertical" : "horizontal";
|
|
3523
3529
|
const isInternalEventList = variant === "internalEventList";
|
|
3524
3530
|
const listDirection = isInternalEventList ? "horizontal" : "vertical";
|
|
3531
|
+
const isNotEmpty = Boolean(items) && items.length > 0;
|
|
3525
3532
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3526
3533
|
"div",
|
|
3527
3534
|
{
|
|
@@ -3544,63 +3551,72 @@ var EventList = ({
|
|
|
3544
3551
|
}
|
|
3545
3552
|
)
|
|
3546
3553
|
] }),
|
|
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
|
-
|
|
3554
|
+
isNotEmpty && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
3555
|
+
isInternalEventList && isBelowTablet && /* @__PURE__ */ jsxRuntime.jsx(
|
|
3556
|
+
Carousel,
|
|
3557
|
+
{
|
|
3558
|
+
"aria-label": "Upcoming events",
|
|
3559
|
+
wrapperClass: clsx43__default.default(EventList_module_default["carousel-wrapper"], EventList_module_default[variant]),
|
|
3560
|
+
slideClass: EventList_module_default["carousel-list-item"],
|
|
3561
|
+
spaceBetween: 16,
|
|
3562
|
+
slides: items.map((item) => {
|
|
3563
|
+
var _a2, _b;
|
|
3564
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3565
|
+
UpcomingEventCard,
|
|
3566
|
+
__spreadValues({
|
|
3567
|
+
className: clsx43__default.default(EventList_module_default["event-card"]),
|
|
3568
|
+
direction: "vertical",
|
|
3569
|
+
showImage: false
|
|
3570
|
+
}, item),
|
|
3571
|
+
(_b = (_a2 = item.title) != null ? _a2 : item.date) != null ? _b : item.location
|
|
3572
|
+
);
|
|
3573
|
+
})
|
|
3574
|
+
}
|
|
3575
|
+
),
|
|
3576
|
+
isInternalEventList && !isBelowTablet && /* @__PURE__ */ jsxRuntime.jsx(
|
|
3577
|
+
"ul",
|
|
3578
|
+
{
|
|
3579
|
+
"aria-label": "Upcoming events",
|
|
3580
|
+
className: clsx43__default.default(
|
|
3581
|
+
EventList_module_default["event-list-wrapper"],
|
|
3582
|
+
EventList_module_default["horizontal"],
|
|
3583
|
+
EventList_module_default[variant]
|
|
3584
|
+
),
|
|
3585
|
+
children: items == null ? void 0 : items.map((item, index) => {
|
|
3586
|
+
var _a2, _b, _c;
|
|
3587
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3588
|
+
"li",
|
|
3589
|
+
{
|
|
3590
|
+
className: clsx43__default.default(EventList_module_default["card-list-item"]),
|
|
3591
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3592
|
+
UpcomingEventCard,
|
|
3593
|
+
__spreadProps(__spreadValues({}, item), {
|
|
3594
|
+
className: clsx43__default.default(EventList_module_default["card-item"]),
|
|
3595
|
+
showImage: false,
|
|
3596
|
+
direction: "vertical"
|
|
3597
|
+
})
|
|
3598
|
+
)
|
|
3599
|
+
},
|
|
3600
|
+
(_c = (_b = (_a2 = item.title) != null ? _a2 : item.date) != null ? _b : item.location) != null ? _c : index
|
|
3601
|
+
);
|
|
3602
|
+
})
|
|
3603
|
+
}
|
|
3604
|
+
),
|
|
3605
|
+
!isInternalEventList && /* @__PURE__ */ jsxRuntime.jsx(
|
|
3606
|
+
"ul",
|
|
3607
|
+
{
|
|
3608
|
+
"aria-label": "Upcoming events",
|
|
3609
|
+
className: clsx43__default.default(EventList_module_default["event-list-wrapper"], EventList_module_default[listDirection]),
|
|
3610
|
+
children: items == null ? void 0 : items.map((item, index) => {
|
|
3611
|
+
var _a2, _b, _c;
|
|
3612
|
+
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);
|
|
3613
|
+
})
|
|
3614
|
+
}
|
|
3615
|
+
)
|
|
3616
|
+
] }),
|
|
3617
|
+
!isNotEmpty && emptyNode ? React68__default.default.cloneElement(emptyNode, {
|
|
3618
|
+
className: clsx43__default.default("empty-search-result", EventList_module_default["empty-search-result"])
|
|
3619
|
+
}) : null
|
|
3604
3620
|
] })
|
|
3605
3621
|
}
|
|
3606
3622
|
);
|
|
@@ -3608,7 +3624,8 @@ var EventList = ({
|
|
|
3608
3624
|
|
|
3609
3625
|
// src/widgets/EventList/index.ts
|
|
3610
3626
|
var EventList2 = Object.assign(EventList, {
|
|
3611
|
-
Title: EventListTitle
|
|
3627
|
+
Title: EventListTitle,
|
|
3628
|
+
Empty: EventListEmpty
|
|
3612
3629
|
});
|
|
3613
3630
|
|
|
3614
3631
|
// src/widgets/TextEvent/TextEvent.module.scss
|
|
@@ -3780,17 +3797,17 @@ var ResourcesGridList = ({
|
|
|
3780
3797
|
defaultSort = "latest"
|
|
3781
3798
|
}) => {
|
|
3782
3799
|
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] =
|
|
3800
|
+
const [view, setView] = React68.useState(defaultView);
|
|
3801
|
+
const [isSidebarOpen, setIsSidebarOpen] = React68.useState(false);
|
|
3802
|
+
const [filterValue, setFilterValue] = React68.useState(defaultFilter);
|
|
3803
|
+
const [sortValue, setSortValue] = React68.useState(defaultSort);
|
|
3804
|
+
const [searchQuery, setSearchQuery] = React68.useState("");
|
|
3805
|
+
const [currentPage, setCurrentPage] = React68.useState(1);
|
|
3806
|
+
const [selectedCategory, setSelectedCategory] = React68.useState(() => {
|
|
3790
3807
|
const activeIndex = categories.findIndex((cat) => cat.active);
|
|
3791
3808
|
return activeIndex === -1 ? 0 : activeIndex;
|
|
3792
3809
|
});
|
|
3793
|
-
const widgetRef =
|
|
3810
|
+
const widgetRef = React68.useRef(null);
|
|
3794
3811
|
const { is } = useViewPort_default();
|
|
3795
3812
|
const isMobile = is("tablet", "below");
|
|
3796
3813
|
const selectedValue = (_a = categories[selectedCategory]) == null ? void 0 : _a.value;
|
|
@@ -4253,7 +4270,7 @@ var NewsCardList = ({
|
|
|
4253
4270
|
/* @__PURE__ */ jsxRuntime.jsx(BlogCardGrid2, { items: cards, hasContainer: false, renderLink })
|
|
4254
4271
|
] })
|
|
4255
4272
|
] }),
|
|
4256
|
-
paginationNode ?
|
|
4273
|
+
paginationNode ? React68__default.default.cloneElement(paginationNode, {
|
|
4257
4274
|
className: clsx43__default.default("pagination", NewsCardList_module_default["pagination"])
|
|
4258
4275
|
}) : null
|
|
4259
4276
|
] })
|
|
@@ -4369,7 +4386,7 @@ var BlogSearchResultsList = ({
|
|
|
4369
4386
|
const searchNode = (_a = slots.search) != null ? _a : searchResult;
|
|
4370
4387
|
const paginationNode = slots.pagination;
|
|
4371
4388
|
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 }) :
|
|
4389
|
+
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
4390
|
className: clsx43__default.default("search-result", BlogSearchResultsList_module_default["search-result"])
|
|
4374
4391
|
}) : null,
|
|
4375
4392
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: clsx43__default.default("wrapper", BlogSearchResultsList_module_default["wrapper"]), children: [
|
|
@@ -4397,7 +4414,7 @@ var BlogSearchResultsList = ({
|
|
|
4397
4414
|
),
|
|
4398
4415
|
/* @__PURE__ */ jsxRuntime.jsx(BlogCardGrid2, { items, hasContainer: false, renderLink })
|
|
4399
4416
|
] }),
|
|
4400
|
-
paginationNode ?
|
|
4417
|
+
paginationNode ? React68__default.default.cloneElement(paginationNode, {
|
|
4401
4418
|
className: clsx43__default.default("pagination", BlogSearchResultsList_module_default["pagination"])
|
|
4402
4419
|
}) : null
|
|
4403
4420
|
] }) });
|
|
@@ -4440,7 +4457,7 @@ var GlobalSearchResultsList = ({
|
|
|
4440
4457
|
const searchNode = (_a = slots.search) != null ? _a : searchResult;
|
|
4441
4458
|
const paginationNode = slots.pagination;
|
|
4442
4459
|
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 }) :
|
|
4460
|
+
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
4461
|
className: clsx43__default.default("search-result", GlobalSearchResultsList_module_default["search-result"])
|
|
4445
4462
|
}) : null,
|
|
4446
4463
|
/* @__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 +4472,7 @@ var GlobalSearchResultsList = ({
|
|
|
4455
4472
|
}
|
|
4456
4473
|
) }, (_a2 = item.title) != null ? _a2 : index);
|
|
4457
4474
|
}) }) }),
|
|
4458
|
-
paginationNode ?
|
|
4475
|
+
paginationNode ? React68__default.default.cloneElement(paginationNode, {
|
|
4459
4476
|
className: clsx43__default.default("pagination", GlobalSearchResultsList_module_default["pagination"])
|
|
4460
4477
|
}) : null
|
|
4461
4478
|
] }) });
|
|
@@ -4494,10 +4511,10 @@ var TextCenterWithMedia = ({
|
|
|
4494
4511
|
children
|
|
4495
4512
|
}) => {
|
|
4496
4513
|
var _a;
|
|
4497
|
-
const [isOpen, setIsOpen] =
|
|
4498
|
-
const dialogRef =
|
|
4499
|
-
const videoRef =
|
|
4500
|
-
|
|
4514
|
+
const [isOpen, setIsOpen] = React68.useState(false);
|
|
4515
|
+
const dialogRef = React68.useRef(null);
|
|
4516
|
+
const videoRef = React68.useRef(null);
|
|
4517
|
+
React68.useEffect(() => {
|
|
4501
4518
|
var _a2, _b;
|
|
4502
4519
|
if (isOpen) {
|
|
4503
4520
|
(_a2 = dialogRef.current) == null ? void 0 : _a2.showModal();
|