@digital-b2c/coreui-kit 0.13.7 → 0.14.0
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 +173 -76
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +92 -7
- package/dist/index.css.map +1 -1
- package/dist/index.d.cts +98 -78
- package/dist/index.d.ts +98 -78
- package/dist/index.mjs +104 -9
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -2
package/dist/index.cjs
CHANGED
|
@@ -2,19 +2,21 @@
|
|
|
2
2
|
|
|
3
3
|
var clsx43 = require('clsx');
|
|
4
4
|
var jsxRuntime = require('react/jsx-runtime');
|
|
5
|
-
var
|
|
5
|
+
var React67 = require('react');
|
|
6
6
|
var gsap = require('gsap');
|
|
7
7
|
var react = require('@gsap/react');
|
|
8
8
|
var ScrollTrigger = require('gsap/ScrollTrigger');
|
|
9
9
|
var react$1 = require('swiper/react');
|
|
10
10
|
var modules = require('swiper/modules');
|
|
11
11
|
require('swiper/css');
|
|
12
|
+
var ReactPlayer = require('react-player');
|
|
12
13
|
|
|
13
14
|
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
14
15
|
|
|
15
16
|
var clsx43__default = /*#__PURE__*/_interopDefault(clsx43);
|
|
16
|
-
var
|
|
17
|
+
var React67__default = /*#__PURE__*/_interopDefault(React67);
|
|
17
18
|
var gsap__default = /*#__PURE__*/_interopDefault(gsap);
|
|
19
|
+
var ReactPlayer__default = /*#__PURE__*/_interopDefault(ReactPlayer);
|
|
18
20
|
|
|
19
21
|
var __defProp = Object.defineProperty;
|
|
20
22
|
var __defProps = Object.defineProperties;
|
|
@@ -314,6 +316,11 @@ var SvgIconExternalLink = (props) => /* @__PURE__ */ jsxRuntime.jsxs("svg", __sp
|
|
|
314
316
|
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M19.4784 15.1242C18.8387 14.3348 18.0226 13.6816 17.0853 13.2089C16.1481 12.7363 15.1117 12.4552 14.0464 12.3848C12.9812 12.3143 11.912 12.4562 10.9113 12.8008C9.91068 13.1453 9.00202 13.6845 8.24697 14.3817L3.77822 18.5067C2.42152 19.8034 1.67081 21.54 1.68778 23.3426C1.70475 25.1452 2.48804 26.8695 3.86894 28.1442C5.24985 29.4189 7.11788 30.1419 9.0707 30.1576C11.0235 30.1733 12.9049 29.4803 14.3096 28.228L16.8568 25.8767", stroke: "#949494", strokeWidth: 2.5, strokeLinecap: "round", strokeLinejoin: "round" })
|
|
315
317
|
] }));
|
|
316
318
|
var icon_external_link_default = SvgIconExternalLink;
|
|
319
|
+
var SvgIconPlay = (props) => /* @__PURE__ */ jsxRuntime.jsxs("svg", __spreadProps(__spreadValues({ xmlns: "http://www.w3.org/2000/svg", width: 134, height: 134, viewBox: "0 0 134 134", fill: "none" }, props), { children: [
|
|
320
|
+
/* @__PURE__ */ jsxRuntime.jsx("rect", { x: 38, y: 40, width: 58, height: 53, fill: "white" }),
|
|
321
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M53.4617 90.7285L90.7305 66.9993L53.4617 43.2702V90.7285ZM67.0013 122.833C59.3707 122.833 52.1589 121.367 45.3659 118.436C38.5728 115.505 32.6405 111.503 27.569 106.432C22.4975 101.36 18.4961 95.4278 15.5648 88.6348C12.6336 81.8417 11.168 74.6299 11.168 66.9993C11.168 59.2757 12.6336 52.0174 15.5648 45.2243C18.4961 38.4313 22.4975 32.5223 27.569 27.4973C32.6405 22.4723 38.5728 18.4941 45.3659 15.5629C52.1589 12.6316 59.3707 11.166 67.0013 11.166C74.7249 11.166 81.9833 12.6316 88.7763 15.5629C95.5694 18.4941 101.478 22.4723 106.503 27.4973C111.528 32.5223 115.507 38.4313 118.438 45.2243C121.369 52.0174 122.835 59.2757 122.835 66.9993C122.835 74.6299 121.369 81.8417 118.438 88.6348C115.507 95.4278 111.528 101.36 106.503 106.432C101.478 111.503 95.5694 115.505 88.7763 118.436C81.9833 121.367 74.7249 122.833 67.0013 122.833Z", fill: "#080808" })
|
|
322
|
+
] }));
|
|
323
|
+
var icon_play_default = SvgIconPlay;
|
|
317
324
|
var svgs = {
|
|
318
325
|
/* Card */
|
|
319
326
|
ads: icon_ads_default,
|
|
@@ -337,6 +344,7 @@ var svgs = {
|
|
|
337
344
|
pdf: icon_pdf_default,
|
|
338
345
|
externalLink: icon_external_link_default,
|
|
339
346
|
newIcon: icon_new_default,
|
|
347
|
+
play: icon_play_default,
|
|
340
348
|
/* Button */
|
|
341
349
|
blankCheckbox: icon_blank_checkbox_default,
|
|
342
350
|
blankCheckboxWhite: icon_blank_checkbox_white_default,
|
|
@@ -382,7 +390,7 @@ var svgs = {
|
|
|
382
390
|
xBlack: icon_x_black_default,
|
|
383
391
|
xWhite: icon_x_white_default
|
|
384
392
|
};
|
|
385
|
-
var Icon =
|
|
393
|
+
var Icon = React67__default.default.memo(
|
|
386
394
|
(_a) => {
|
|
387
395
|
var _b = _a, { type, size } = _b, props = __objRest(_b, ["type", "size"]);
|
|
388
396
|
if (type) {
|
|
@@ -496,21 +504,21 @@ var getDeviceType = (width) => {
|
|
|
496
504
|
return "desktop";
|
|
497
505
|
};
|
|
498
506
|
var useViewPort = () => {
|
|
499
|
-
const [device, setDevice] =
|
|
507
|
+
const [device, setDevice] = React67.useState(
|
|
500
508
|
() => typeof window !== "undefined" ? getDeviceType(window.innerWidth) : "desktop"
|
|
501
509
|
);
|
|
502
|
-
const getOtherDevices =
|
|
510
|
+
const getOtherDevices = React67.useCallback(
|
|
503
511
|
(list, what, includeSelf = false) => {
|
|
504
512
|
const deviceIndex = list.indexOf(what) + (!includeSelf ? 1 : 0);
|
|
505
513
|
return [...list].slice(deviceIndex);
|
|
506
514
|
},
|
|
507
515
|
[]
|
|
508
516
|
);
|
|
509
|
-
const onWindowResize =
|
|
517
|
+
const onWindowResize = React67.useCallback(() => {
|
|
510
518
|
setDevice(getDeviceType(window.innerWidth));
|
|
511
519
|
}, []);
|
|
512
520
|
const onWindowResizeDebounce = useDebounce_default(onWindowResize, 100);
|
|
513
|
-
|
|
521
|
+
React67.useEffect(() => {
|
|
514
522
|
window.addEventListener("resize", onWindowResizeDebounce);
|
|
515
523
|
return () => window.removeEventListener("resize", onWindowResizeDebounce);
|
|
516
524
|
}, [onWindowResizeDebounce]);
|
|
@@ -563,13 +571,13 @@ var BrandsStrip = ({
|
|
|
563
571
|
cta,
|
|
564
572
|
size
|
|
565
573
|
}) => {
|
|
566
|
-
const [show, setShow] =
|
|
567
|
-
const [shouldAnimate, setShouldAnimate] =
|
|
574
|
+
const [show, setShow] = React67.useState(false);
|
|
575
|
+
const [shouldAnimate, setShouldAnimate] = React67.useState(false);
|
|
568
576
|
const { is } = useViewPort_default();
|
|
569
577
|
const isTabletBelow = is("tablet", "below");
|
|
570
|
-
const containerRef =
|
|
571
|
-
const marqueeRef =
|
|
572
|
-
const timeline =
|
|
578
|
+
const containerRef = React67.useRef(null);
|
|
579
|
+
const marqueeRef = React67.useRef(null);
|
|
580
|
+
const timeline = React67.useRef(null);
|
|
573
581
|
const horizontalLoop = (items, config) => {
|
|
574
582
|
const itemsArray = gsap__default.default.utils.toArray(items);
|
|
575
583
|
const cfg = config || {};
|
|
@@ -663,7 +671,7 @@ var BrandsStrip = ({
|
|
|
663
671
|
timeline.current.play();
|
|
664
672
|
}
|
|
665
673
|
};
|
|
666
|
-
const duplicatedLogos =
|
|
674
|
+
const duplicatedLogos = React67.useMemo(() => {
|
|
667
675
|
if (logos.length === 0) return [];
|
|
668
676
|
if (!shouldAnimate) return [...logos];
|
|
669
677
|
return [...logos, ...logos];
|
|
@@ -716,8 +724,8 @@ var CardSubtitle = ({ children }) => {
|
|
|
716
724
|
};
|
|
717
725
|
function resolveCompoundSlots(children, slots) {
|
|
718
726
|
const resolved = {};
|
|
719
|
-
|
|
720
|
-
if (!
|
|
727
|
+
React67.Children.forEach(children, (child) => {
|
|
728
|
+
if (!React67.isValidElement(child)) return;
|
|
721
729
|
Object.entries(slots).forEach(([key, Component]) => {
|
|
722
730
|
if (child.type === Component) {
|
|
723
731
|
resolved[key] = child.props.children;
|
|
@@ -731,7 +739,7 @@ function resolveCompoundSlots(children, slots) {
|
|
|
731
739
|
var Container_module_default = {
|
|
732
740
|
container: "Container_module_container"
|
|
733
741
|
};
|
|
734
|
-
var Container =
|
|
742
|
+
var Container = React67.forwardRef(
|
|
735
743
|
(_a, ref) => {
|
|
736
744
|
var _b = _a, { children, className } = _b, props = __objRest(_b, ["children", "className"]);
|
|
737
745
|
return /* @__PURE__ */ jsxRuntime.jsx("div", __spreadProps(__spreadValues({ ref, className: clsx43__default.default(Container_module_default.container, className) }, props), { children }));
|
|
@@ -872,11 +880,11 @@ function FilterBar({
|
|
|
872
880
|
searchValue,
|
|
873
881
|
onSearchChange
|
|
874
882
|
}) {
|
|
875
|
-
const [openDropdown, setOpenDropdown] =
|
|
876
|
-
const [searchState, setSearchState] =
|
|
877
|
-
const filterRef =
|
|
878
|
-
const sortRef =
|
|
879
|
-
const searchInputRef =
|
|
883
|
+
const [openDropdown, setOpenDropdown] = React67.useState(null);
|
|
884
|
+
const [searchState, setSearchState] = React67.useState("closed");
|
|
885
|
+
const filterRef = React67.useRef(null);
|
|
886
|
+
const sortRef = React67.useRef(null);
|
|
887
|
+
const searchInputRef = React67.useRef(null);
|
|
880
888
|
const closeSearch = () => {
|
|
881
889
|
setSearchState("closing");
|
|
882
890
|
onSearchChange("");
|
|
@@ -886,7 +894,7 @@ function FilterBar({
|
|
|
886
894
|
onSearchChange("");
|
|
887
895
|
(_a = searchInputRef.current) == null ? void 0 : _a.focus();
|
|
888
896
|
};
|
|
889
|
-
|
|
897
|
+
React67.useEffect(() => {
|
|
890
898
|
const handleMouseDown = (e) => {
|
|
891
899
|
var _a, _b;
|
|
892
900
|
const target = e.target;
|
|
@@ -896,7 +904,7 @@ function FilterBar({
|
|
|
896
904
|
document.addEventListener("mousedown", handleMouseDown);
|
|
897
905
|
return () => document.removeEventListener("mousedown", handleMouseDown);
|
|
898
906
|
}, []);
|
|
899
|
-
|
|
907
|
+
React67.useEffect(() => {
|
|
900
908
|
var _a;
|
|
901
909
|
if (searchState === "open") (_a = searchInputRef.current) == null ? void 0 : _a.focus();
|
|
902
910
|
}, [searchState]);
|
|
@@ -1172,7 +1180,7 @@ var Pagination = ({
|
|
|
1172
1180
|
hidePagesBorder = false,
|
|
1173
1181
|
renderLink
|
|
1174
1182
|
}) => {
|
|
1175
|
-
const [activePage, setActivePage] =
|
|
1183
|
+
const [activePage, setActivePage] = React67.useState(currentPage);
|
|
1176
1184
|
const goToPage = (page) => {
|
|
1177
1185
|
if (page < 1 || page > totalPages) return;
|
|
1178
1186
|
setActivePage(page);
|
|
@@ -1231,7 +1239,7 @@ var Pagination = ({
|
|
|
1231
1239
|
[Pagination_module_default.number]: hasNumber,
|
|
1232
1240
|
[Pagination_module_default["no-border"]]: hidePagesBorder
|
|
1233
1241
|
});
|
|
1234
|
-
return renderLink ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
1242
|
+
return renderLink ? /* @__PURE__ */ jsxRuntime.jsx(React67.Fragment, { children: renderLink({
|
|
1235
1243
|
page,
|
|
1236
1244
|
className: pageClassName,
|
|
1237
1245
|
"aria-label": `Go to page ${page}`,
|
|
@@ -1541,7 +1549,7 @@ var Badge_module_default = {
|
|
|
1541
1549
|
icon: "Badge_module_icon",
|
|
1542
1550
|
iconOnly: "Badge_module_iconOnly"
|
|
1543
1551
|
};
|
|
1544
|
-
var Badge =
|
|
1552
|
+
var Badge = React67.forwardRef(
|
|
1545
1553
|
(_a, ref) => {
|
|
1546
1554
|
var _b = _a, {
|
|
1547
1555
|
children,
|
|
@@ -1615,7 +1623,7 @@ var Input_module_default = {
|
|
|
1615
1623
|
error: "Input_module_error",
|
|
1616
1624
|
"input-field--error": "Input_module_input-field--error",
|
|
1617
1625
|
"input-field--disabled": "Input_module_input-field--disabled"};
|
|
1618
|
-
var Input =
|
|
1626
|
+
var Input = React67.forwardRef(
|
|
1619
1627
|
(_a, ref) => {
|
|
1620
1628
|
var _b = _a, {
|
|
1621
1629
|
id,
|
|
@@ -1646,7 +1654,7 @@ var Input = React66.forwardRef(
|
|
|
1646
1654
|
"hideLabel",
|
|
1647
1655
|
"type"
|
|
1648
1656
|
]);
|
|
1649
|
-
const generatedId =
|
|
1657
|
+
const generatedId = React67.useId();
|
|
1650
1658
|
const inputId = id || generatedId;
|
|
1651
1659
|
const helperTextId = `${inputId}-helper`;
|
|
1652
1660
|
const errorId = `${inputId}-error`;
|
|
@@ -1851,10 +1859,10 @@ var CardCollection = ({
|
|
|
1851
1859
|
children
|
|
1852
1860
|
}) => {
|
|
1853
1861
|
var _a, _b;
|
|
1854
|
-
const container =
|
|
1855
|
-
const revealWrapper =
|
|
1856
|
-
const extraCard =
|
|
1857
|
-
const [isExpanded, setIsExpanded] =
|
|
1862
|
+
const container = React67.useRef(null);
|
|
1863
|
+
const revealWrapper = React67.useRef(null);
|
|
1864
|
+
const extraCard = React67.useRef(null);
|
|
1865
|
+
const [isExpanded, setIsExpanded] = React67.useState(false);
|
|
1858
1866
|
const slots = resolveCompoundSlots(children, {
|
|
1859
1867
|
title: CardCollectionTitle,
|
|
1860
1868
|
subtitle: CardCollectionSubtitle
|
|
@@ -1865,7 +1873,7 @@ var CardCollection = ({
|
|
|
1865
1873
|
const visibleCards = isExamCard ? cards.slice(0, 8) : cards;
|
|
1866
1874
|
const hiddenCards = isExamCard ? cards.slice(8) : [];
|
|
1867
1875
|
const { contextSafe } = react.useGSAP({ scope: container });
|
|
1868
|
-
const handleShowMore =
|
|
1876
|
+
const handleShowMore = React67.useCallback(() => {
|
|
1869
1877
|
contextSafe(() => {
|
|
1870
1878
|
setIsExpanded(true);
|
|
1871
1879
|
const tl = gsap__default.default.timeline({ defaults: { ease: "power3.inOut" } });
|
|
@@ -1969,8 +1977,8 @@ var ContactModule = ({
|
|
|
1969
1977
|
animateBlur = true
|
|
1970
1978
|
}) => {
|
|
1971
1979
|
var _a, _b;
|
|
1972
|
-
const containerRef =
|
|
1973
|
-
const blurRef =
|
|
1980
|
+
const containerRef = React67.useRef(null);
|
|
1981
|
+
const blurRef = React67.useRef(null);
|
|
1974
1982
|
const slots = resolveCompoundSlots(children, {
|
|
1975
1983
|
title: ContactModuleTitle,
|
|
1976
1984
|
subtitle: ContactModuleSubtitle
|
|
@@ -2309,8 +2317,8 @@ var HeroBannerCarousel = ({
|
|
|
2309
2317
|
}) => {
|
|
2310
2318
|
const { is } = useViewPort_default();
|
|
2311
2319
|
const isMobile = is("tablet", "below");
|
|
2312
|
-
const [swiperInstance, setSwiperInstance] =
|
|
2313
|
-
const [activeIndex, setActiveIndex] =
|
|
2320
|
+
const [swiperInstance, setSwiperInstance] = React67.useState(null);
|
|
2321
|
+
const [activeIndex, setActiveIndex] = React67.useState(0);
|
|
2314
2322
|
if (!items.length) return null;
|
|
2315
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: [
|
|
2316
2324
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: HeroBannerCarousel_module_default.swiperContainer, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -2399,16 +2407,16 @@ var AccordionItem = ({
|
|
|
2399
2407
|
onToggle,
|
|
2400
2408
|
className
|
|
2401
2409
|
}) => {
|
|
2402
|
-
const contentRef =
|
|
2403
|
-
const contentInnerRef =
|
|
2404
|
-
const timelineRef =
|
|
2405
|
-
const [contentHeight, setContentHeight] =
|
|
2406
|
-
|
|
2410
|
+
const contentRef = React67.useRef(null);
|
|
2411
|
+
const contentInnerRef = React67.useRef(null);
|
|
2412
|
+
const timelineRef = React67.useRef(null);
|
|
2413
|
+
const [contentHeight, setContentHeight] = React67.useState(0);
|
|
2414
|
+
React67.useEffect(() => {
|
|
2407
2415
|
if (contentInnerRef.current) {
|
|
2408
2416
|
setContentHeight(contentInnerRef.current.scrollHeight);
|
|
2409
2417
|
}
|
|
2410
2418
|
}, [children]);
|
|
2411
|
-
|
|
2419
|
+
React67.useEffect(() => {
|
|
2412
2420
|
if (contentRef.current && contentHeight > 0) {
|
|
2413
2421
|
if (timelineRef.current) {
|
|
2414
2422
|
timelineRef.current.kill();
|
|
@@ -2493,7 +2501,7 @@ var Accordion = ({
|
|
|
2493
2501
|
allowMultiple = false,
|
|
2494
2502
|
onItemToggle
|
|
2495
2503
|
}) => {
|
|
2496
|
-
const [openIds, setOpenIds] =
|
|
2504
|
+
const [openIds, setOpenIds] = React67.useState(defaultOpenIds);
|
|
2497
2505
|
const handleToggle = (id) => {
|
|
2498
2506
|
setOpenIds((prev) => {
|
|
2499
2507
|
let newOpenIds;
|
|
@@ -2554,10 +2562,10 @@ var InternalBrandsTab_module_default = {
|
|
|
2554
2562
|
var InternalBrandsTab = (props) => {
|
|
2555
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;
|
|
2556
2564
|
const { title, subTitle, className, tabs } = props;
|
|
2557
|
-
const [activeIndex, setActiveIndex] =
|
|
2565
|
+
const [activeIndex, setActiveIndex] = React67.useState(0);
|
|
2558
2566
|
const { is } = useViewPort_default();
|
|
2559
2567
|
const isTabletBelow = is("tablet", "below");
|
|
2560
|
-
const accordionItems =
|
|
2568
|
+
const accordionItems = React67.useMemo(() => {
|
|
2561
2569
|
return (tabs == null ? void 0 : tabs.map((tab, index) => {
|
|
2562
2570
|
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j2, _k2, _l2, _m2, _n2;
|
|
2563
2571
|
return {
|
|
@@ -2724,7 +2732,7 @@ var MiniBanner = ({
|
|
|
2724
2732
|
(logo == null ? void 0 : logo.src) && /* @__PURE__ */ jsxRuntime.jsx(Picture, __spreadValues({ className: MiniBanner_module_default.logo }, logo)),
|
|
2725
2733
|
pretitleNode && /* @__PURE__ */ jsxRuntime.jsx("div", { className: clsx43__default.default(MiniBanner_module_default.pretitle, "small"), children: pretitleNode }),
|
|
2726
2734
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: MiniBanner_module_default.headingWrapper, children: [
|
|
2727
|
-
goBackNode ?
|
|
2735
|
+
goBackNode ? React67__default.default.cloneElement(goBackNode, {
|
|
2728
2736
|
className: clsx43__default.default("back-button", MiniBanner_module_default["back-button"])
|
|
2729
2737
|
}) : null,
|
|
2730
2738
|
titleNode && /* @__PURE__ */ jsxRuntime.jsx("div", { className: clsx43__default.default(MiniBanner_module_default.title, isMiniBannerTextLeft ? "h1" : "h4"), children: titleNode })
|
|
@@ -2842,13 +2850,13 @@ function useIntersectionObserver({
|
|
|
2842
2850
|
animateOnce = false,
|
|
2843
2851
|
options = {}
|
|
2844
2852
|
} = {}) {
|
|
2845
|
-
const observeRef =
|
|
2846
|
-
const [isVisible, setIsVisible] =
|
|
2853
|
+
const observeRef = React67.useRef(null);
|
|
2854
|
+
const [isVisible, setIsVisible] = React67.useState(false);
|
|
2847
2855
|
if (typeof IntersectionObserver === "undefined") {
|
|
2848
2856
|
console.warn("IntersectionObserver is not supported in this browser.");
|
|
2849
2857
|
return { observeRef, isVisible: true };
|
|
2850
2858
|
}
|
|
2851
|
-
|
|
2859
|
+
React67.useEffect(() => {
|
|
2852
2860
|
const currentRef = observeRef.current;
|
|
2853
2861
|
if (!currentRef) return;
|
|
2854
2862
|
const observer = new IntersectionObserver((entries) => {
|
|
@@ -2867,8 +2875,8 @@ function useIntersectionObserver({
|
|
|
2867
2875
|
return { observeRef, isVisible };
|
|
2868
2876
|
}
|
|
2869
2877
|
var useIsAtTop = () => {
|
|
2870
|
-
const [isAtTop, setIsAtTop] =
|
|
2871
|
-
|
|
2878
|
+
const [isAtTop, setIsAtTop] = React67.useState(true);
|
|
2879
|
+
React67.useEffect(() => {
|
|
2872
2880
|
const handleScroll = () => setIsAtTop(window.scrollY === 0);
|
|
2873
2881
|
window.addEventListener("scroll", handleScroll, { passive: true });
|
|
2874
2882
|
return () => window.removeEventListener("scroll", handleScroll);
|
|
@@ -2924,10 +2932,10 @@ var NavigationDesktop = ({
|
|
|
2924
2932
|
onDropdownOpenChange
|
|
2925
2933
|
}) => {
|
|
2926
2934
|
var _a;
|
|
2927
|
-
const [activeDropdown, setActiveDropdown] =
|
|
2928
|
-
const closeTimer =
|
|
2929
|
-
const dropdownWrapperRefs =
|
|
2930
|
-
const baseId =
|
|
2935
|
+
const [activeDropdown, setActiveDropdown] = React67.useState(null);
|
|
2936
|
+
const closeTimer = React67.useRef(null);
|
|
2937
|
+
const dropdownWrapperRefs = React67.useRef([]);
|
|
2938
|
+
const baseId = React67.useId();
|
|
2931
2939
|
const setDropdown = (index) => {
|
|
2932
2940
|
setActiveDropdown(index);
|
|
2933
2941
|
onDropdownOpenChange == null ? void 0 : onDropdownOpenChange(index !== null);
|
|
@@ -3062,8 +3070,8 @@ var NavigationMobile = ({
|
|
|
3062
3070
|
onClose
|
|
3063
3071
|
}) => {
|
|
3064
3072
|
var _a;
|
|
3065
|
-
const [expanded, setExpanded] =
|
|
3066
|
-
const baseId =
|
|
3073
|
+
const [expanded, setExpanded] = React67.useState([]);
|
|
3074
|
+
const baseId = React67.useId();
|
|
3067
3075
|
const toggleExpanded = (index) => {
|
|
3068
3076
|
setExpanded((prev) => prev.includes(index) ? prev.filter((i) => i !== index) : [...prev, index]);
|
|
3069
3077
|
};
|
|
@@ -3165,15 +3173,15 @@ var NavigationMobile = ({
|
|
|
3165
3173
|
};
|
|
3166
3174
|
var Navigation2 = (props) => {
|
|
3167
3175
|
const { className, variant, homeCta, loginCta, mainLogo, rightButton, navigationItems } = props;
|
|
3168
|
-
const [isHovered, setIsHovered] =
|
|
3169
|
-
const [hasOpenDropdown, setHasOpenDropdown] =
|
|
3170
|
-
const [isMobileMenuOpen, setIsMobileMenuOpen] =
|
|
3176
|
+
const [isHovered, setIsHovered] = React67.useState(false);
|
|
3177
|
+
const [hasOpenDropdown, setHasOpenDropdown] = React67.useState(false);
|
|
3178
|
+
const [isMobileMenuOpen, setIsMobileMenuOpen] = React67.useState(false);
|
|
3171
3179
|
const isAtTop = useIsAtTop();
|
|
3172
3180
|
const { is } = useViewPort_default();
|
|
3173
|
-
const mobileMenuId =
|
|
3181
|
+
const mobileMenuId = React67.useId();
|
|
3174
3182
|
const isTabletBelow = is("tablet", "below");
|
|
3175
3183
|
const isTransparent = variant === "transparent" && isAtTop && !isHovered && !hasOpenDropdown;
|
|
3176
|
-
|
|
3184
|
+
React67.useEffect(() => {
|
|
3177
3185
|
document.body.style.overflow = isMobileMenuOpen ? "hidden" : "";
|
|
3178
3186
|
return () => {
|
|
3179
3187
|
document.body.style.overflow = "";
|
|
@@ -3772,17 +3780,17 @@ var ResourcesGridList = ({
|
|
|
3772
3780
|
defaultSort = "latest"
|
|
3773
3781
|
}) => {
|
|
3774
3782
|
var _a;
|
|
3775
|
-
const [view, setView] =
|
|
3776
|
-
const [isSidebarOpen, setIsSidebarOpen] =
|
|
3777
|
-
const [filterValue, setFilterValue] =
|
|
3778
|
-
const [sortValue, setSortValue] =
|
|
3779
|
-
const [searchQuery, setSearchQuery] =
|
|
3780
|
-
const [currentPage, setCurrentPage] =
|
|
3781
|
-
const [selectedCategory, setSelectedCategory] =
|
|
3783
|
+
const [view, setView] = React67.useState(defaultView);
|
|
3784
|
+
const [isSidebarOpen, setIsSidebarOpen] = React67.useState(false);
|
|
3785
|
+
const [filterValue, setFilterValue] = React67.useState(defaultFilter);
|
|
3786
|
+
const [sortValue, setSortValue] = React67.useState(defaultSort);
|
|
3787
|
+
const [searchQuery, setSearchQuery] = React67.useState("");
|
|
3788
|
+
const [currentPage, setCurrentPage] = React67.useState(1);
|
|
3789
|
+
const [selectedCategory, setSelectedCategory] = React67.useState(() => {
|
|
3782
3790
|
const activeIndex = categories.findIndex((cat) => cat.active);
|
|
3783
3791
|
return activeIndex === -1 ? 0 : activeIndex;
|
|
3784
3792
|
});
|
|
3785
|
-
const widgetRef =
|
|
3793
|
+
const widgetRef = React67.useRef(null);
|
|
3786
3794
|
const { is } = useViewPort_default();
|
|
3787
3795
|
const isMobile = is("tablet", "below");
|
|
3788
3796
|
const selectedValue = (_a = categories[selectedCategory]) == null ? void 0 : _a.value;
|
|
@@ -4245,7 +4253,7 @@ var NewsCardList = ({
|
|
|
4245
4253
|
/* @__PURE__ */ jsxRuntime.jsx(BlogCardGrid2, { items: cards, hasContainer: false, renderLink })
|
|
4246
4254
|
] })
|
|
4247
4255
|
] }),
|
|
4248
|
-
paginationNode ?
|
|
4256
|
+
paginationNode ? React67__default.default.cloneElement(paginationNode, {
|
|
4249
4257
|
className: clsx43__default.default("pagination", NewsCardList_module_default["pagination"])
|
|
4250
4258
|
}) : null
|
|
4251
4259
|
] })
|
|
@@ -4361,7 +4369,7 @@ var BlogSearchResultsList = ({
|
|
|
4361
4369
|
const searchNode = (_a = slots.search) != null ? _a : searchResult;
|
|
4362
4370
|
const paginationNode = slots.pagination;
|
|
4363
4371
|
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: [
|
|
4364
|
-
typeof searchNode === "string" ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: clsx43__default.default("search-result", BlogSearchResultsList_module_default["search-result"]), children: searchNode }) :
|
|
4372
|
+
typeof searchNode === "string" ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: clsx43__default.default("search-result", BlogSearchResultsList_module_default["search-result"]), children: searchNode }) : React67__default.default.isValidElement(searchNode) ? React67__default.default.cloneElement(searchNode, {
|
|
4365
4373
|
className: clsx43__default.default("search-result", BlogSearchResultsList_module_default["search-result"])
|
|
4366
4374
|
}) : null,
|
|
4367
4375
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: clsx43__default.default("wrapper", BlogSearchResultsList_module_default["wrapper"]), children: [
|
|
@@ -4389,7 +4397,7 @@ var BlogSearchResultsList = ({
|
|
|
4389
4397
|
),
|
|
4390
4398
|
/* @__PURE__ */ jsxRuntime.jsx(BlogCardGrid2, { items, hasContainer: false, renderLink })
|
|
4391
4399
|
] }),
|
|
4392
|
-
paginationNode ?
|
|
4400
|
+
paginationNode ? React67__default.default.cloneElement(paginationNode, {
|
|
4393
4401
|
className: clsx43__default.default("pagination", BlogSearchResultsList_module_default["pagination"])
|
|
4394
4402
|
}) : null
|
|
4395
4403
|
] }) });
|
|
@@ -4432,7 +4440,7 @@ var GlobalSearchResultsList = ({
|
|
|
4432
4440
|
const searchNode = (_a = slots.search) != null ? _a : searchResult;
|
|
4433
4441
|
const paginationNode = slots.pagination;
|
|
4434
4442
|
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: [
|
|
4435
|
-
typeof searchNode === "string" ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: clsx43__default.default("search-result", GlobalSearchResultsList_module_default["search-result"]), children: searchNode }) :
|
|
4443
|
+
typeof searchNode === "string" ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: clsx43__default.default("search-result", GlobalSearchResultsList_module_default["search-result"]), children: searchNode }) : React67__default.default.isValidElement(searchNode) ? React67__default.default.cloneElement(searchNode, {
|
|
4436
4444
|
className: clsx43__default.default("search-result", GlobalSearchResultsList_module_default["search-result"])
|
|
4437
4445
|
}) : null,
|
|
4438
4446
|
/* @__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) => {
|
|
@@ -4447,7 +4455,7 @@ var GlobalSearchResultsList = ({
|
|
|
4447
4455
|
}
|
|
4448
4456
|
) }, (_a2 = item.title) != null ? _a2 : index);
|
|
4449
4457
|
}) }) }),
|
|
4450
|
-
paginationNode ?
|
|
4458
|
+
paginationNode ? React67__default.default.cloneElement(paginationNode, {
|
|
4451
4459
|
className: clsx43__default.default("pagination", GlobalSearchResultsList_module_default["pagination"])
|
|
4452
4460
|
}) : null
|
|
4453
4461
|
] }) });
|
|
@@ -4459,6 +4467,94 @@ var GlobalSearchResultsList2 = Object.assign(GlobalSearchResultsList, {
|
|
|
4459
4467
|
Pagination: GlobalSearchResultsListPagination
|
|
4460
4468
|
});
|
|
4461
4469
|
|
|
4470
|
+
// src/widgets/TextCenterWithMedia/TextCenterWithMedia.module.scss
|
|
4471
|
+
var TextCenterWithMedia_module_default = {
|
|
4472
|
+
textCenterWithMedia: "TextCenterWithMedia_module_textCenterWithMedia",
|
|
4473
|
+
thumbnailWrapper: "TextCenterWithMedia_module_thumbnailWrapper",
|
|
4474
|
+
thumbnail: "TextCenterWithMedia_module_thumbnail",
|
|
4475
|
+
playButton: "TextCenterWithMedia_module_playButton",
|
|
4476
|
+
modal: "TextCenterWithMedia_module_modal",
|
|
4477
|
+
modalInner: "TextCenterWithMedia_module_modalInner",
|
|
4478
|
+
modalHeader: "TextCenterWithMedia_module_modalHeader",
|
|
4479
|
+
closeButton: "TextCenterWithMedia_module_closeButton",
|
|
4480
|
+
video: "TextCenterWithMedia_module_video"
|
|
4481
|
+
};
|
|
4482
|
+
var TextCenterWithMediaTitle = ({ children }) => {
|
|
4483
|
+
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children });
|
|
4484
|
+
};
|
|
4485
|
+
var TextCenterWithMedia = ({
|
|
4486
|
+
className,
|
|
4487
|
+
title,
|
|
4488
|
+
thumbnail,
|
|
4489
|
+
videoUrl,
|
|
4490
|
+
loop = false,
|
|
4491
|
+
mute = false,
|
|
4492
|
+
hideControl = false,
|
|
4493
|
+
autoPlay = false,
|
|
4494
|
+
children
|
|
4495
|
+
}) => {
|
|
4496
|
+
var _a;
|
|
4497
|
+
const [isOpen, setIsOpen] = React67.useState(false);
|
|
4498
|
+
const dialogRef = React67.useRef(null);
|
|
4499
|
+
const videoRef = React67.useRef(null);
|
|
4500
|
+
React67.useEffect(() => {
|
|
4501
|
+
var _a2, _b;
|
|
4502
|
+
if (isOpen) {
|
|
4503
|
+
(_a2 = dialogRef.current) == null ? void 0 : _a2.showModal();
|
|
4504
|
+
} else {
|
|
4505
|
+
(_b = dialogRef.current) == null ? void 0 : _b.close();
|
|
4506
|
+
}
|
|
4507
|
+
}, [isOpen]);
|
|
4508
|
+
const handleClose = () => {
|
|
4509
|
+
if (videoRef.current) {
|
|
4510
|
+
videoRef.current.pause();
|
|
4511
|
+
videoRef.current.currentTime = 0;
|
|
4512
|
+
}
|
|
4513
|
+
setIsOpen(false);
|
|
4514
|
+
};
|
|
4515
|
+
const slots = resolveCompoundSlots(children, { title: TextCenterWithMediaTitle });
|
|
4516
|
+
const titleNode = (_a = slots.title) != null ? _a : title;
|
|
4517
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: clsx43__default.default(TextCenterWithMedia_module_default.textCenterWithMedia, className), children: [
|
|
4518
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Container, { children: [
|
|
4519
|
+
titleNode && /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "h2", children: titleNode }),
|
|
4520
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: TextCenterWithMedia_module_default.thumbnailWrapper, children: thumbnail && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
4521
|
+
/* @__PURE__ */ jsxRuntime.jsx(Picture, { src: thumbnail, alt: "Video thumbnail", className: TextCenterWithMedia_module_default.thumbnail }),
|
|
4522
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4523
|
+
"button",
|
|
4524
|
+
{
|
|
4525
|
+
className: TextCenterWithMedia_module_default.playButton,
|
|
4526
|
+
onClick: () => setIsOpen(true),
|
|
4527
|
+
"aria-label": "Play video",
|
|
4528
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { type: "play", size: 90 })
|
|
4529
|
+
}
|
|
4530
|
+
)
|
|
4531
|
+
] }) })
|
|
4532
|
+
] }),
|
|
4533
|
+
/* @__PURE__ */ jsxRuntime.jsx("dialog", { ref: dialogRef, className: TextCenterWithMedia_module_default.modal, onClose: handleClose, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: TextCenterWithMedia_module_default.modalInner, children: [
|
|
4534
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: TextCenterWithMedia_module_default.modalHeader, children: /* @__PURE__ */ jsxRuntime.jsx("button", { className: TextCenterWithMedia_module_default.closeButton, onClick: handleClose, "aria-label": "Close video", children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { type: "xBlack", size: 30 }) }) }),
|
|
4535
|
+
videoUrl && isOpen && /* @__PURE__ */ jsxRuntime.jsx(
|
|
4536
|
+
ReactPlayer__default.default,
|
|
4537
|
+
{
|
|
4538
|
+
ref: videoRef,
|
|
4539
|
+
src: videoUrl,
|
|
4540
|
+
playing: autoPlay,
|
|
4541
|
+
loop,
|
|
4542
|
+
muted: mute,
|
|
4543
|
+
controls: !hideControl,
|
|
4544
|
+
className: TextCenterWithMedia_module_default.video,
|
|
4545
|
+
width: "100%",
|
|
4546
|
+
height: "100%"
|
|
4547
|
+
}
|
|
4548
|
+
)
|
|
4549
|
+
] }) })
|
|
4550
|
+
] });
|
|
4551
|
+
};
|
|
4552
|
+
|
|
4553
|
+
// src/widgets/TextCenterWithMedia/index.ts
|
|
4554
|
+
var TextCenterWithMedia2 = Object.assign(TextCenterWithMedia, {
|
|
4555
|
+
Title: TextCenterWithMediaTitle
|
|
4556
|
+
});
|
|
4557
|
+
|
|
4462
4558
|
exports.Anchor = Anchor;
|
|
4463
4559
|
exports.Badge = Badge;
|
|
4464
4560
|
exports.BlogCardGrid = BlogCardGrid2;
|
|
@@ -4500,6 +4596,7 @@ exports.Teaser5050With3Text = Teaser5050With3Text2;
|
|
|
4500
4596
|
exports.Teaser5050WithCta = Teaser5050WithCta2;
|
|
4501
4597
|
exports.TextBody = TextBody2;
|
|
4502
4598
|
exports.TextCenterCtaInBottom = TextCenterCtaInBottom2;
|
|
4599
|
+
exports.TextCenterWithMedia = TextCenterWithMedia2;
|
|
4503
4600
|
exports.TextEvent = TextEvent2;
|
|
4504
4601
|
exports.UpcomingEventCard = UpcomingEventCard;
|
|
4505
4602
|
exports.resolveCompoundSlots = resolveCompoundSlots;
|