@digital-b2c/coreui-kit 0.11.12 → 0.11.14
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 +83 -71
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +26 -1
- package/dist/index.css.map +1 -1
- package/dist/index.d.cts +17 -2
- package/dist/index.d.ts +17 -2
- package/dist/index.mjs +29 -17
- 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 clsx15 = require('clsx');
|
|
4
4
|
var jsxRuntime = require('react/jsx-runtime');
|
|
5
|
-
var
|
|
5
|
+
var React66 = require('react');
|
|
6
6
|
var gsap = require('gsap');
|
|
7
7
|
var react = require('@gsap/react');
|
|
8
8
|
var ScrollTrigger = require('gsap/ScrollTrigger');
|
|
@@ -13,7 +13,7 @@ require('swiper/css');
|
|
|
13
13
|
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
14
14
|
|
|
15
15
|
var clsx15__default = /*#__PURE__*/_interopDefault(clsx15);
|
|
16
|
-
var
|
|
16
|
+
var React66__default = /*#__PURE__*/_interopDefault(React66);
|
|
17
17
|
var gsap__default = /*#__PURE__*/_interopDefault(gsap);
|
|
18
18
|
|
|
19
19
|
var __defProp = Object.defineProperty;
|
|
@@ -382,7 +382,7 @@ var svgs = {
|
|
|
382
382
|
xBlack: icon_x_black_default,
|
|
383
383
|
xWhite: icon_x_white_default
|
|
384
384
|
};
|
|
385
|
-
var Icon =
|
|
385
|
+
var Icon = React66__default.default.memo(
|
|
386
386
|
(_a) => {
|
|
387
387
|
var _b = _a, { type, size } = _b, props = __objRest(_b, ["type", "size"]);
|
|
388
388
|
if (type) {
|
|
@@ -495,21 +495,21 @@ var getDeviceType = (width) => {
|
|
|
495
495
|
return "desktop";
|
|
496
496
|
};
|
|
497
497
|
var useViewPort = () => {
|
|
498
|
-
const [device, setDevice] =
|
|
498
|
+
const [device, setDevice] = React66.useState(
|
|
499
499
|
() => typeof window !== "undefined" ? getDeviceType(window.innerWidth) : "desktop"
|
|
500
500
|
);
|
|
501
|
-
const getOtherDevices =
|
|
501
|
+
const getOtherDevices = React66.useCallback(
|
|
502
502
|
(list, what, includeSelf = false) => {
|
|
503
503
|
const deviceIndex = list.indexOf(what) + (!includeSelf ? 1 : 0);
|
|
504
504
|
return [...list].slice(deviceIndex);
|
|
505
505
|
},
|
|
506
506
|
[]
|
|
507
507
|
);
|
|
508
|
-
const onWindowResize =
|
|
508
|
+
const onWindowResize = React66.useCallback(() => {
|
|
509
509
|
setDevice(getDeviceType(window.innerWidth));
|
|
510
510
|
}, []);
|
|
511
511
|
const onWindowResizeDebounce = useDebounce_default(onWindowResize, 100);
|
|
512
|
-
|
|
512
|
+
React66.useEffect(() => {
|
|
513
513
|
window.addEventListener("resize", onWindowResizeDebounce);
|
|
514
514
|
return () => window.removeEventListener("resize", onWindowResizeDebounce);
|
|
515
515
|
}, [onWindowResizeDebounce]);
|
|
@@ -562,13 +562,13 @@ var BrandsStrip = ({
|
|
|
562
562
|
cta,
|
|
563
563
|
size
|
|
564
564
|
}) => {
|
|
565
|
-
const [show, setShow] =
|
|
566
|
-
const [shouldAnimate, setShouldAnimate] =
|
|
565
|
+
const [show, setShow] = React66.useState(false);
|
|
566
|
+
const [shouldAnimate, setShouldAnimate] = React66.useState(false);
|
|
567
567
|
const { is } = useViewPort_default();
|
|
568
568
|
const isTabletBelow = is("tablet", "below");
|
|
569
|
-
const containerRef =
|
|
570
|
-
const marqueeRef =
|
|
571
|
-
const timeline =
|
|
569
|
+
const containerRef = React66.useRef(null);
|
|
570
|
+
const marqueeRef = React66.useRef(null);
|
|
571
|
+
const timeline = React66.useRef(null);
|
|
572
572
|
const horizontalLoop = (items, config) => {
|
|
573
573
|
const itemsArray = gsap__default.default.utils.toArray(items);
|
|
574
574
|
const cfg = config || {};
|
|
@@ -662,7 +662,7 @@ var BrandsStrip = ({
|
|
|
662
662
|
timeline.current.play();
|
|
663
663
|
}
|
|
664
664
|
};
|
|
665
|
-
const duplicatedLogos =
|
|
665
|
+
const duplicatedLogos = React66.useMemo(() => {
|
|
666
666
|
if (logos.length === 0) return [];
|
|
667
667
|
if (!shouldAnimate) return [...logos];
|
|
668
668
|
return [...logos, ...logos];
|
|
@@ -715,8 +715,8 @@ var CardSubtitle = ({ children }) => {
|
|
|
715
715
|
};
|
|
716
716
|
function resolveCompoundSlots(children, slots) {
|
|
717
717
|
const resolved = {};
|
|
718
|
-
|
|
719
|
-
if (!
|
|
718
|
+
React66.Children.forEach(children, (child) => {
|
|
719
|
+
if (!React66.isValidElement(child)) return;
|
|
720
720
|
Object.entries(slots).forEach(([key, Component]) => {
|
|
721
721
|
if (child.type === Component) {
|
|
722
722
|
resolved[key] = child.props.children;
|
|
@@ -730,7 +730,7 @@ function resolveCompoundSlots(children, slots) {
|
|
|
730
730
|
var Container_module_default = {
|
|
731
731
|
container: "Container_module_container"
|
|
732
732
|
};
|
|
733
|
-
var Container =
|
|
733
|
+
var Container = React66.forwardRef(
|
|
734
734
|
(_a, ref) => {
|
|
735
735
|
var _b = _a, { children, className } = _b, props = __objRest(_b, ["children", "className"]);
|
|
736
736
|
return /* @__PURE__ */ jsxRuntime.jsx("div", __spreadProps(__spreadValues({ ref, className: clsx15__default.default(Container_module_default.container, className) }, props), { children }));
|
|
@@ -871,11 +871,11 @@ function FilterBar({
|
|
|
871
871
|
searchValue,
|
|
872
872
|
onSearchChange
|
|
873
873
|
}) {
|
|
874
|
-
const [openDropdown, setOpenDropdown] =
|
|
875
|
-
const [searchState, setSearchState] =
|
|
876
|
-
const filterRef =
|
|
877
|
-
const sortRef =
|
|
878
|
-
const searchInputRef =
|
|
874
|
+
const [openDropdown, setOpenDropdown] = React66.useState(null);
|
|
875
|
+
const [searchState, setSearchState] = React66.useState("closed");
|
|
876
|
+
const filterRef = React66.useRef(null);
|
|
877
|
+
const sortRef = React66.useRef(null);
|
|
878
|
+
const searchInputRef = React66.useRef(null);
|
|
879
879
|
const closeSearch = () => {
|
|
880
880
|
setSearchState("closing");
|
|
881
881
|
onSearchChange("");
|
|
@@ -885,7 +885,7 @@ function FilterBar({
|
|
|
885
885
|
onSearchChange("");
|
|
886
886
|
(_a = searchInputRef.current) == null ? void 0 : _a.focus();
|
|
887
887
|
};
|
|
888
|
-
|
|
888
|
+
React66.useEffect(() => {
|
|
889
889
|
const handleMouseDown = (e) => {
|
|
890
890
|
var _a, _b;
|
|
891
891
|
const target = e.target;
|
|
@@ -895,7 +895,7 @@ function FilterBar({
|
|
|
895
895
|
document.addEventListener("mousedown", handleMouseDown);
|
|
896
896
|
return () => document.removeEventListener("mousedown", handleMouseDown);
|
|
897
897
|
}, []);
|
|
898
|
-
|
|
898
|
+
React66.useEffect(() => {
|
|
899
899
|
var _a;
|
|
900
900
|
if (searchState === "open") (_a = searchInputRef.current) == null ? void 0 : _a.focus();
|
|
901
901
|
}, [searchState]);
|
|
@@ -1140,7 +1140,7 @@ var Pagination = ({
|
|
|
1140
1140
|
onPageChange,
|
|
1141
1141
|
renderLink
|
|
1142
1142
|
}) => {
|
|
1143
|
-
const [activePage, setActivePage] =
|
|
1143
|
+
const [activePage, setActivePage] = React66.useState(currentPage);
|
|
1144
1144
|
const goToPage = (page) => {
|
|
1145
1145
|
if (page < 1 || page > totalPages) return;
|
|
1146
1146
|
setActivePage(page);
|
|
@@ -1194,7 +1194,7 @@ var Pagination = ({
|
|
|
1194
1194
|
[Pagination_module_default.active]: activePage === page,
|
|
1195
1195
|
[Pagination_module_default.number]: hasNumber
|
|
1196
1196
|
});
|
|
1197
|
-
return renderLink ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
1197
|
+
return renderLink ? /* @__PURE__ */ jsxRuntime.jsx(React66.Fragment, { children: renderLink({
|
|
1198
1198
|
page,
|
|
1199
1199
|
className: pageClassName,
|
|
1200
1200
|
"aria-label": `Go to page ${page}`,
|
|
@@ -1275,20 +1275,14 @@ var ResourceCardItem_module_default = {
|
|
|
1275
1275
|
cardList: "ResourceCardItem_module_cardList",
|
|
1276
1276
|
cardListLeft: "ResourceCardItem_module_cardListLeft",
|
|
1277
1277
|
cardListRight: "ResourceCardItem_module_cardListRight",
|
|
1278
|
-
notificationDot: "ResourceCardItem_module_notificationDot"
|
|
1279
|
-
iconWrapper: "ResourceCardItem_module_iconWrapper"
|
|
1280
|
-
};
|
|
1281
|
-
var ResourceIcon = ({ image, type }) => {
|
|
1282
|
-
if (!image) return null;
|
|
1283
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: ResourceCardItem_module_default.iconWrapper, children: /* @__PURE__ */ jsxRuntime.jsx("img", { src: image, alt: type != null ? type : "", width: 32, height: 32 }) });
|
|
1284
|
-
};
|
|
1278
|
+
notificationDot: "ResourceCardItem_module_notificationDot"};
|
|
1285
1279
|
var ResourceCardItem = ({ item, view }) => {
|
|
1286
1280
|
const hasHref = Boolean(item.href);
|
|
1287
1281
|
const linkWrapper = ({ children }) => /* @__PURE__ */ jsxRuntime.jsx("a", { href: item.href, className: ResourceCardItem_module_default.cardLink, target: "_blank", rel: "noopener noreferrer", children });
|
|
1288
1282
|
if (view === "grid") {
|
|
1289
1283
|
return /* @__PURE__ */ jsxRuntime.jsx("article", { className: ResourceCardItem_module_default.cardGrid, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: ResourceCardItem_module_default.cardBody, children: [
|
|
1290
1284
|
/* @__PURE__ */ jsxRuntime.jsx(ConditionalWrapper, { condition: hasHref, wrapper: linkWrapper, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: ResourceCardItem_module_default.cardIconTitle, children: [
|
|
1291
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1285
|
+
/* @__PURE__ */ jsxRuntime.jsx(Icon, { type: item.type === "pdf" ? "pdf" : "externalLink", size: 25 }),
|
|
1292
1286
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: ResourceCardItem_module_default.cardTitle, children: item.title })
|
|
1293
1287
|
] }) }),
|
|
1294
1288
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: ResourceCardItem_module_default.cardMeta, children: [
|
|
@@ -1303,7 +1297,7 @@ var ResourceCardItem = ({ item, view }) => {
|
|
|
1303
1297
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: ResourceCardItem_module_default.cardDate, children: item.date })
|
|
1304
1298
|
] }),
|
|
1305
1299
|
/* @__PURE__ */ jsxRuntime.jsx(ConditionalWrapper, { condition: hasHref, wrapper: linkWrapper, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: ResourceCardItem_module_default.cardListRight, children: [
|
|
1306
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1300
|
+
/* @__PURE__ */ jsxRuntime.jsx(Icon, { type: item.type === "pdf" ? "pdf" : "externalLink", size: 25 }),
|
|
1307
1301
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: ResourceCardItem_module_default.cardTitle, children: item.title })
|
|
1308
1302
|
] }) })
|
|
1309
1303
|
] });
|
|
@@ -1477,7 +1471,7 @@ var Badge_module_default = {
|
|
|
1477
1471
|
icon: "Badge_module_icon",
|
|
1478
1472
|
iconOnly: "Badge_module_iconOnly"
|
|
1479
1473
|
};
|
|
1480
|
-
var Badge =
|
|
1474
|
+
var Badge = React66.forwardRef(
|
|
1481
1475
|
(_a, ref) => {
|
|
1482
1476
|
var _b = _a, {
|
|
1483
1477
|
children,
|
|
@@ -1551,7 +1545,7 @@ var Input_module_default = {
|
|
|
1551
1545
|
error: "Input_module_error",
|
|
1552
1546
|
"input-field--error": "Input_module_input-field--error",
|
|
1553
1547
|
"input-field--disabled": "Input_module_input-field--disabled"};
|
|
1554
|
-
var Input =
|
|
1548
|
+
var Input = React66.forwardRef(
|
|
1555
1549
|
(_a, ref) => {
|
|
1556
1550
|
var _b = _a, {
|
|
1557
1551
|
id,
|
|
@@ -1582,7 +1576,7 @@ var Input = React65.forwardRef(
|
|
|
1582
1576
|
"hideLabel",
|
|
1583
1577
|
"type"
|
|
1584
1578
|
]);
|
|
1585
|
-
const generatedId =
|
|
1579
|
+
const generatedId = React66.useId();
|
|
1586
1580
|
const inputId = id || generatedId;
|
|
1587
1581
|
const helperTextId = `${inputId}-helper`;
|
|
1588
1582
|
const errorId = `${inputId}-error`;
|
|
@@ -1787,10 +1781,10 @@ var CardCollection = ({
|
|
|
1787
1781
|
children
|
|
1788
1782
|
}) => {
|
|
1789
1783
|
var _a, _b;
|
|
1790
|
-
const container =
|
|
1791
|
-
const revealWrapper =
|
|
1792
|
-
const extraCard =
|
|
1793
|
-
const [isExpanded, setIsExpanded] =
|
|
1784
|
+
const container = React66.useRef(null);
|
|
1785
|
+
const revealWrapper = React66.useRef(null);
|
|
1786
|
+
const extraCard = React66.useRef(null);
|
|
1787
|
+
const [isExpanded, setIsExpanded] = React66.useState(false);
|
|
1794
1788
|
const slots = resolveCompoundSlots(children, {
|
|
1795
1789
|
title: CardCollectionTitle,
|
|
1796
1790
|
subtitle: CardCollectionSubtitle
|
|
@@ -1801,7 +1795,7 @@ var CardCollection = ({
|
|
|
1801
1795
|
const visibleCards = isExamCard ? cards.slice(0, 8) : cards;
|
|
1802
1796
|
const hiddenCards = isExamCard ? cards.slice(8) : [];
|
|
1803
1797
|
const { contextSafe } = react.useGSAP({ scope: container });
|
|
1804
|
-
const handleShowMore =
|
|
1798
|
+
const handleShowMore = React66.useCallback(() => {
|
|
1805
1799
|
contextSafe(() => {
|
|
1806
1800
|
setIsExpanded(true);
|
|
1807
1801
|
const tl = gsap__default.default.timeline({ defaults: { ease: "power3.inOut" } });
|
|
@@ -1905,8 +1899,8 @@ var ContactModule = ({
|
|
|
1905
1899
|
animateBlur = true
|
|
1906
1900
|
}) => {
|
|
1907
1901
|
var _a, _b;
|
|
1908
|
-
const containerRef =
|
|
1909
|
-
const blurRef =
|
|
1902
|
+
const containerRef = React66.useRef(null);
|
|
1903
|
+
const blurRef = React66.useRef(null);
|
|
1910
1904
|
const slots = resolveCompoundSlots(children, {
|
|
1911
1905
|
title: ContactModuleTitle,
|
|
1912
1906
|
subtitle: ContactModuleSubtitle
|
|
@@ -2245,8 +2239,8 @@ var HeroBannerCarousel = ({
|
|
|
2245
2239
|
}) => {
|
|
2246
2240
|
const { is } = useViewPort_default();
|
|
2247
2241
|
const isMobile = is("tablet", "below");
|
|
2248
|
-
const [swiperInstance, setSwiperInstance] =
|
|
2249
|
-
const [activeIndex, setActiveIndex] =
|
|
2242
|
+
const [swiperInstance, setSwiperInstance] = React66.useState(null);
|
|
2243
|
+
const [activeIndex, setActiveIndex] = React66.useState(0);
|
|
2250
2244
|
if (!items.length) return null;
|
|
2251
2245
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: clsx15__default.default(HeroBannerCarousel_module_default.heroBannerCarousel, className), children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: HeroBannerCarousel_module_default.inner, children: [
|
|
2252
2246
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: HeroBannerCarousel_module_default.swiperContainer, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -2335,16 +2329,16 @@ var AccordionItem = ({
|
|
|
2335
2329
|
onToggle,
|
|
2336
2330
|
className
|
|
2337
2331
|
}) => {
|
|
2338
|
-
const contentRef =
|
|
2339
|
-
const contentInnerRef =
|
|
2340
|
-
const timelineRef =
|
|
2341
|
-
const [contentHeight, setContentHeight] =
|
|
2342
|
-
|
|
2332
|
+
const contentRef = React66.useRef(null);
|
|
2333
|
+
const contentInnerRef = React66.useRef(null);
|
|
2334
|
+
const timelineRef = React66.useRef(null);
|
|
2335
|
+
const [contentHeight, setContentHeight] = React66.useState(0);
|
|
2336
|
+
React66.useEffect(() => {
|
|
2343
2337
|
if (contentInnerRef.current) {
|
|
2344
2338
|
setContentHeight(contentInnerRef.current.scrollHeight);
|
|
2345
2339
|
}
|
|
2346
2340
|
}, [children]);
|
|
2347
|
-
|
|
2341
|
+
React66.useEffect(() => {
|
|
2348
2342
|
if (contentRef.current && contentHeight > 0) {
|
|
2349
2343
|
if (timelineRef.current) {
|
|
2350
2344
|
timelineRef.current.kill();
|
|
@@ -2429,7 +2423,7 @@ var Accordion = ({
|
|
|
2429
2423
|
allowMultiple = false,
|
|
2430
2424
|
onItemToggle
|
|
2431
2425
|
}) => {
|
|
2432
|
-
const [openIds, setOpenIds] =
|
|
2426
|
+
const [openIds, setOpenIds] = React66.useState(defaultOpenIds);
|
|
2433
2427
|
const handleToggle = (id) => {
|
|
2434
2428
|
setOpenIds((prev) => {
|
|
2435
2429
|
let newOpenIds;
|
|
@@ -2490,10 +2484,10 @@ var InternalBrandsTab_module_default = {
|
|
|
2490
2484
|
var InternalBrandsTab = (props) => {
|
|
2491
2485
|
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;
|
|
2492
2486
|
const { title, subTitle, className, tabs } = props;
|
|
2493
|
-
const [activeIndex, setActiveIndex] =
|
|
2487
|
+
const [activeIndex, setActiveIndex] = React66.useState(0);
|
|
2494
2488
|
const { is } = useViewPort_default();
|
|
2495
2489
|
const isTabletBelow = is("tablet", "below");
|
|
2496
|
-
const accordionItems =
|
|
2490
|
+
const accordionItems = React66.useMemo(() => {
|
|
2497
2491
|
return (tabs == null ? void 0 : tabs.map((tab, index) => {
|
|
2498
2492
|
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j2, _k2, _l2, _m2, _n2;
|
|
2499
2493
|
return {
|
|
@@ -2614,6 +2608,7 @@ var MiniBanner_module_default = {
|
|
|
2614
2608
|
logo: "MiniBanner_module_logo",
|
|
2615
2609
|
pretitle: "MiniBanner_module_pretitle",
|
|
2616
2610
|
headingWrapper: "MiniBanner_module_headingWrapper",
|
|
2611
|
+
"back-button": "MiniBanner_module_back-button",
|
|
2617
2612
|
title: "MiniBanner_module_title",
|
|
2618
2613
|
ctaContainer: "MiniBanner_module_ctaContainer",
|
|
2619
2614
|
miniBannerNoBG: "MiniBanner_module_miniBannerNoBG",
|
|
@@ -2622,6 +2617,9 @@ var MiniBanner_module_default = {
|
|
|
2622
2617
|
var MiniBannerPreTitle = ({ children }) => {
|
|
2623
2618
|
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children });
|
|
2624
2619
|
};
|
|
2620
|
+
var MiniBannerGoBack = ({ children }) => {
|
|
2621
|
+
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children });
|
|
2622
|
+
};
|
|
2625
2623
|
var MiniBanner = ({
|
|
2626
2624
|
className,
|
|
2627
2625
|
variant = "default",
|
|
@@ -2637,7 +2635,8 @@ var MiniBanner = ({
|
|
|
2637
2635
|
const slots = resolveCompoundSlots(children, {
|
|
2638
2636
|
pretitle: MiniBannerPreTitle,
|
|
2639
2637
|
title: MiniBannerTitle,
|
|
2640
|
-
subtitle: MiniBannerSubtitle
|
|
2638
|
+
subtitle: MiniBannerSubtitle,
|
|
2639
|
+
goBack: MiniBannerGoBack
|
|
2641
2640
|
});
|
|
2642
2641
|
const { is } = useViewPort_default();
|
|
2643
2642
|
const isTabletBelow = is("tablet", "below");
|
|
@@ -2646,13 +2645,19 @@ var MiniBanner = ({
|
|
|
2646
2645
|
const pretitleNode = (_a = slots.pretitle) != null ? _a : pretitle;
|
|
2647
2646
|
const titleNode = (_b = slots.title) != null ? _b : title;
|
|
2648
2647
|
const subtitleNode = (_c = slots.subtitle) != null ? _c : subtitle;
|
|
2648
|
+
const goBackNode = slots == null ? void 0 : slots.goBack;
|
|
2649
2649
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: clsx15__default.default(MiniBanner_module_default.minibanner, MiniBanner_module_default[variant], className), children: [
|
|
2650
2650
|
((background == null ? void 0 : background.src) || ((_d = background == null ? void 0 : background.desktop) == null ? void 0 : _d.src) || ((_e = background == null ? void 0 : background.mobile) == null ? void 0 : _e.src)) && /* @__PURE__ */ jsxRuntime.jsx(Picture, __spreadValues({ className: MiniBanner_module_default.background }, background)),
|
|
2651
2651
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: MiniBanner_module_default.wrapper, children: [
|
|
2652
2652
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: MiniBanner_module_default.textContainer, children: [
|
|
2653
2653
|
(logo == null ? void 0 : logo.src) && /* @__PURE__ */ jsxRuntime.jsx(Picture, __spreadValues({ className: MiniBanner_module_default.logo }, logo)),
|
|
2654
2654
|
pretitleNode && /* @__PURE__ */ jsxRuntime.jsx("div", { className: clsx15__default.default(MiniBanner_module_default.pretitle, "small"), children: pretitleNode }),
|
|
2655
|
-
/* @__PURE__ */ jsxRuntime.
|
|
2655
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: MiniBanner_module_default.headingWrapper, children: [
|
|
2656
|
+
goBackNode ? React66__default.default.cloneElement(goBackNode, {
|
|
2657
|
+
className: clsx15__default.default("back-button", MiniBanner_module_default["back-button"])
|
|
2658
|
+
}) : null,
|
|
2659
|
+
titleNode && /* @__PURE__ */ jsxRuntime.jsx("div", { className: clsx15__default.default(MiniBanner_module_default.title, isMiniBannerTextLeft ? "h1" : "h4"), children: titleNode })
|
|
2660
|
+
] }),
|
|
2656
2661
|
subtitleNode && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2657
2662
|
"div",
|
|
2658
2663
|
{
|
|
@@ -2685,7 +2690,8 @@ var MiniBanner = ({
|
|
|
2685
2690
|
// src/widgets/MiniBanner/index.ts
|
|
2686
2691
|
var MiniBanner2 = Object.assign(MiniBanner, {
|
|
2687
2692
|
Title: MiniBannerTitle,
|
|
2688
|
-
Subtitle: MiniBannerSubtitle
|
|
2693
|
+
Subtitle: MiniBannerSubtitle,
|
|
2694
|
+
GoBack: MiniBannerGoBack
|
|
2689
2695
|
});
|
|
2690
2696
|
var MiniSectionCtaTitle = ({ children }) => {
|
|
2691
2697
|
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children });
|
|
@@ -3276,13 +3282,13 @@ var ResourcesGridList = ({
|
|
|
3276
3282
|
defaultSort = "latest"
|
|
3277
3283
|
}) => {
|
|
3278
3284
|
var _a;
|
|
3279
|
-
const [view, setView] =
|
|
3280
|
-
const [isSidebarOpen, setIsSidebarOpen] =
|
|
3281
|
-
const [filterValue, setFilterValue] =
|
|
3282
|
-
const [sortValue, setSortValue] =
|
|
3283
|
-
const [searchQuery, setSearchQuery] =
|
|
3284
|
-
const [currentPage, setCurrentPage] =
|
|
3285
|
-
const [selectedCategory, setSelectedCategory] =
|
|
3285
|
+
const [view, setView] = React66.useState(defaultView);
|
|
3286
|
+
const [isSidebarOpen, setIsSidebarOpen] = React66.useState(false);
|
|
3287
|
+
const [filterValue, setFilterValue] = React66.useState(defaultFilter);
|
|
3288
|
+
const [sortValue, setSortValue] = React66.useState(defaultSort);
|
|
3289
|
+
const [searchQuery, setSearchQuery] = React66.useState("");
|
|
3290
|
+
const [currentPage, setCurrentPage] = React66.useState(1);
|
|
3291
|
+
const [selectedCategory, setSelectedCategory] = React66.useState(() => {
|
|
3286
3292
|
const activeIndex = categories.findIndex((cat) => cat.active);
|
|
3287
3293
|
return activeIndex === -1 ? 0 : activeIndex;
|
|
3288
3294
|
});
|
|
@@ -3290,8 +3296,14 @@ var ResourcesGridList = ({
|
|
|
3290
3296
|
const isMobile = is("tablet", "below");
|
|
3291
3297
|
const selectedValue = (_a = categories[selectedCategory]) == null ? void 0 : _a.value;
|
|
3292
3298
|
const handleSelectCategory = (index) => {
|
|
3299
|
+
var _a2, _b;
|
|
3293
3300
|
setSelectedCategory(index);
|
|
3294
3301
|
setCurrentPage(1);
|
|
3302
|
+
const categoryText = (_b = (_a2 = categories[index]) == null ? void 0 : _a2.label) == null ? void 0 : _b.replaceAll(" ", "-");
|
|
3303
|
+
if (typeof window !== "undefined" && categoryText) {
|
|
3304
|
+
const url = `${window.location.pathname}#${categoryText}`;
|
|
3305
|
+
window.history.replaceState(null, "", url);
|
|
3306
|
+
}
|
|
3295
3307
|
if (isMobile) setIsSidebarOpen(false);
|
|
3296
3308
|
};
|
|
3297
3309
|
const handleFilterChange = (value) => {
|
|
@@ -3733,7 +3745,7 @@ var NewsCardList = ({
|
|
|
3733
3745
|
/* @__PURE__ */ jsxRuntime.jsx(BlogCardGrid2, { items: cards, hasContainer: false, renderLink })
|
|
3734
3746
|
] })
|
|
3735
3747
|
] }),
|
|
3736
|
-
paginationNode ?
|
|
3748
|
+
paginationNode ? React66__default.default.cloneElement(paginationNode, {
|
|
3737
3749
|
className: clsx15__default.default("pagination", NewsCardList_module_default["pagination"])
|
|
3738
3750
|
}) : null
|
|
3739
3751
|
] })
|
|
@@ -3848,7 +3860,7 @@ var BlogSearchResultsList = ({
|
|
|
3848
3860
|
const searchNode = (_a = slots.search) != null ? _a : searchResult;
|
|
3849
3861
|
const paginationNode = slots.pagination;
|
|
3850
3862
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: clsx15__default.default("search-results-list", BlogSearchResultsList_module_default["search-results-list"], className), children: /* @__PURE__ */ jsxRuntime.jsxs(Container, { className: clsx15__default.default("container", BlogSearchResultsList_module_default["container"]), children: [
|
|
3851
|
-
typeof searchNode === "string" ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: clsx15__default.default("search-result", BlogSearchResultsList_module_default["search-result"]), children: searchNode }) :
|
|
3863
|
+
typeof searchNode === "string" ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: clsx15__default.default("search-result", BlogSearchResultsList_module_default["search-result"]), children: searchNode }) : React66__default.default.isValidElement(searchNode) ? React66__default.default.cloneElement(searchNode, {
|
|
3852
3864
|
className: clsx15__default.default("search-result", BlogSearchResultsList_module_default["search-result"])
|
|
3853
3865
|
}) : null,
|
|
3854
3866
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: clsx15__default.default("wrapper", BlogSearchResultsList_module_default["wrapper"]), children: [
|
|
@@ -3876,7 +3888,7 @@ var BlogSearchResultsList = ({
|
|
|
3876
3888
|
),
|
|
3877
3889
|
/* @__PURE__ */ jsxRuntime.jsx(BlogCardGrid2, { items, hasContainer: false, renderLink })
|
|
3878
3890
|
] }),
|
|
3879
|
-
paginationNode ?
|
|
3891
|
+
paginationNode ? React66__default.default.cloneElement(paginationNode, {
|
|
3880
3892
|
className: clsx15__default.default("pagination", BlogSearchResultsList_module_default["pagination"])
|
|
3881
3893
|
}) : null
|
|
3882
3894
|
] }) });
|
|
@@ -3891,13 +3903,13 @@ function useIntersectionObserver({
|
|
|
3891
3903
|
animateOnce = false,
|
|
3892
3904
|
options = {}
|
|
3893
3905
|
} = {}) {
|
|
3894
|
-
const observeRef =
|
|
3895
|
-
const [isVisible, setIsVisible] =
|
|
3906
|
+
const observeRef = React66.useRef(null);
|
|
3907
|
+
const [isVisible, setIsVisible] = React66.useState(false);
|
|
3896
3908
|
if (typeof IntersectionObserver === "undefined") {
|
|
3897
3909
|
console.warn("IntersectionObserver is not supported in this browser.");
|
|
3898
3910
|
return { observeRef, isVisible: true };
|
|
3899
3911
|
}
|
|
3900
|
-
|
|
3912
|
+
React66.useEffect(() => {
|
|
3901
3913
|
const currentRef = observeRef.current;
|
|
3902
3914
|
if (!currentRef) return;
|
|
3903
3915
|
const observer = new IntersectionObserver((entries) => {
|