@digital-b2c/coreui-kit 0.11.3 → 0.11.5
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 +65 -63
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +6 -18
- package/dist/index.css.map +1 -1
- package/dist/index.d.cts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.mjs +12 -10
- 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 React64 = 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 React64__default = /*#__PURE__*/_interopDefault(React64);
|
|
17
17
|
var gsap__default = /*#__PURE__*/_interopDefault(gsap);
|
|
18
18
|
|
|
19
19
|
var __defProp = Object.defineProperty;
|
|
@@ -138,6 +138,11 @@ var SvgIconWork = (props) => /* @__PURE__ */ jsxRuntime.jsx("svg", __spreadProps
|
|
|
138
138
|
var icon_work_default = SvgIconWork;
|
|
139
139
|
var SvgIconWorkhome = (props) => /* @__PURE__ */ jsxRuntime.jsx("svg", __spreadProps(__spreadValues({ width: 48, height: 48, viewBox: "0 0 48 48", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, props), { children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M35.5271 21.1696H39.1636V17.5583H35.5271V21.1696ZM35.5271 30.2333H39.1636V26.622H35.5271V30.2333ZM35.5271 39.2613H39.1636V35.65H35.5271V39.2613ZM0 48V26.6946L14.9455 16.078L29.8544 26.6946V48H19.3091V35.6863H10.5818V48H0ZM33.4909 48V24.7083L19.818 15.103V9H48V48H33.4909Z", fill: "white" }) }));
|
|
140
140
|
var icon_workhome_default = SvgIconWorkhome;
|
|
141
|
+
var SvgIconNew = (props) => /* @__PURE__ */ jsxRuntime.jsxs("svg", __spreadProps(__spreadValues({ width: 74, height: 44, viewBox: "0 0 74 44", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, props), { children: [
|
|
142
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M0 0H74V36C74 40.4183 70.4183 44 66 44H0V0Z", fill: "#940000" }),
|
|
143
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M18.3 28V16.48H21.484L26.604 26.656L25.82 26.848V16.48H28.22V28H25.036L19.916 17.824L20.7 17.632V28H18.3ZM29.8156 28V16.48H32.2796V28H29.8156ZM30.9676 28V26.112H38.3916V28H30.9676ZM30.9676 23.04V21.184H37.8316V23.04H30.9676ZM30.9676 18.368V16.48H38.1996V18.368H30.9676ZM42.5264 28L39.2784 16.48H41.7744L44.4624 27.024H43.6784L46.0784 16.48H48.8784L51.2464 27.024H50.4784L53.1824 16.48H55.5664L52.3184 28H49.5664L47.1184 17.664H47.7584L45.2784 28H42.5264Z", fill: "white" })
|
|
144
|
+
] }));
|
|
145
|
+
var icon_new_default = SvgIconNew;
|
|
141
146
|
var SvgIconBlankCheckbox = (props) => /* @__PURE__ */ jsxRuntime.jsx("svg", __spreadProps(__spreadValues({ width: 24, height: 24, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, props), { children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M5 21C4.45 21 3.97917 20.8042 3.5875 20.4125C3.19583 20.0208 3 19.55 3 19V5C3 4.45 3.19583 3.97917 3.5875 3.5875C3.97917 3.19583 4.45 3 5 3H19C19.55 3 20.0208 3.19583 20.4125 3.5875C20.8042 3.97917 21 4.45 21 5V19C21 19.55 20.8042 20.0208 20.4125 20.4125C20.0208 20.8042 19.55 21 19 21H5ZM4.5 18.5C4.5 19.0523 4.94772 19.5 5.5 19.5H18.5C19.0523 19.5 19.5 19.0523 19.5 18.5V5.5C19.5 4.94772 19.0523 4.5 18.5 4.5H5.5C4.94772 4.5 4.5 4.94772 4.5 5.5V18.5Z", fill: "#4D4D4D" }) }));
|
|
142
147
|
var icon_blank_checkbox_default = SvgIconBlankCheckbox;
|
|
143
148
|
var SvgIconBlankCheckboxWhite = (props) => /* @__PURE__ */ jsxRuntime.jsxs("svg", __spreadProps(__spreadValues({ width: 24, height: 24, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, props), { children: [
|
|
@@ -331,6 +336,7 @@ var svgs = {
|
|
|
331
336
|
workhome: icon_workhome_default,
|
|
332
337
|
pdf: icon_pdf_default,
|
|
333
338
|
externalLink: icon_external_link_default,
|
|
339
|
+
newIcon: icon_new_default,
|
|
334
340
|
/* Button */
|
|
335
341
|
blankCheckbox: icon_blank_checkbox_default,
|
|
336
342
|
blankCheckboxWhite: icon_blank_checkbox_white_default,
|
|
@@ -376,7 +382,7 @@ var svgs = {
|
|
|
376
382
|
xBlack: icon_x_black_default,
|
|
377
383
|
xWhite: icon_x_white_default
|
|
378
384
|
};
|
|
379
|
-
var Icon =
|
|
385
|
+
var Icon = React64__default.default.memo(
|
|
380
386
|
(_a) => {
|
|
381
387
|
var _b = _a, { type, size } = _b, props = __objRest(_b, ["type", "size"]);
|
|
382
388
|
if (type) {
|
|
@@ -489,21 +495,21 @@ var getDeviceType = (width) => {
|
|
|
489
495
|
return "desktop";
|
|
490
496
|
};
|
|
491
497
|
var useViewPort = () => {
|
|
492
|
-
const [device, setDevice] =
|
|
498
|
+
const [device, setDevice] = React64.useState(
|
|
493
499
|
() => typeof window !== "undefined" ? getDeviceType(window.innerWidth) : "desktop"
|
|
494
500
|
);
|
|
495
|
-
const getOtherDevices =
|
|
501
|
+
const getOtherDevices = React64.useCallback(
|
|
496
502
|
(list, what, includeSelf = false) => {
|
|
497
503
|
const deviceIndex = list.indexOf(what) + (!includeSelf ? 1 : 0);
|
|
498
504
|
return [...list].slice(deviceIndex);
|
|
499
505
|
},
|
|
500
506
|
[]
|
|
501
507
|
);
|
|
502
|
-
const onWindowResize =
|
|
508
|
+
const onWindowResize = React64.useCallback(() => {
|
|
503
509
|
setDevice(getDeviceType(window.innerWidth));
|
|
504
510
|
}, []);
|
|
505
511
|
const onWindowResizeDebounce = useDebounce_default(onWindowResize, 100);
|
|
506
|
-
|
|
512
|
+
React64.useEffect(() => {
|
|
507
513
|
window.addEventListener("resize", onWindowResizeDebounce);
|
|
508
514
|
return () => window.removeEventListener("resize", onWindowResizeDebounce);
|
|
509
515
|
}, [onWindowResizeDebounce]);
|
|
@@ -556,13 +562,13 @@ var BrandsStrip = ({
|
|
|
556
562
|
cta,
|
|
557
563
|
size
|
|
558
564
|
}) => {
|
|
559
|
-
const [show, setShow] =
|
|
560
|
-
const [shouldAnimate, setShouldAnimate] =
|
|
565
|
+
const [show, setShow] = React64.useState(false);
|
|
566
|
+
const [shouldAnimate, setShouldAnimate] = React64.useState(false);
|
|
561
567
|
const { is } = useViewPort_default();
|
|
562
568
|
const isTabletBelow = is("tablet", "below");
|
|
563
|
-
const containerRef =
|
|
564
|
-
const marqueeRef =
|
|
565
|
-
const timeline =
|
|
569
|
+
const containerRef = React64.useRef(null);
|
|
570
|
+
const marqueeRef = React64.useRef(null);
|
|
571
|
+
const timeline = React64.useRef(null);
|
|
566
572
|
const horizontalLoop = (items, config) => {
|
|
567
573
|
const itemsArray = gsap__default.default.utils.toArray(items);
|
|
568
574
|
const cfg = config || {};
|
|
@@ -656,7 +662,7 @@ var BrandsStrip = ({
|
|
|
656
662
|
timeline.current.play();
|
|
657
663
|
}
|
|
658
664
|
};
|
|
659
|
-
const duplicatedLogos =
|
|
665
|
+
const duplicatedLogos = React64.useMemo(() => {
|
|
660
666
|
if (logos.length === 0) return [];
|
|
661
667
|
if (!shouldAnimate) return [...logos];
|
|
662
668
|
return [...logos, ...logos];
|
|
@@ -709,8 +715,8 @@ var CardSubtitle = ({ children }) => {
|
|
|
709
715
|
};
|
|
710
716
|
function resolveCompoundSlots(children, slots) {
|
|
711
717
|
const resolved = {};
|
|
712
|
-
|
|
713
|
-
if (!
|
|
718
|
+
React64.Children.forEach(children, (child) => {
|
|
719
|
+
if (!React64.isValidElement(child)) return;
|
|
714
720
|
Object.entries(slots).forEach(([key, Component]) => {
|
|
715
721
|
if (child.type === Component) {
|
|
716
722
|
resolved[key] = child.props.children;
|
|
@@ -724,7 +730,7 @@ function resolveCompoundSlots(children, slots) {
|
|
|
724
730
|
var Container_module_default = {
|
|
725
731
|
container: "Container_module_container"
|
|
726
732
|
};
|
|
727
|
-
var Container =
|
|
733
|
+
var Container = React64.forwardRef(
|
|
728
734
|
(_a, ref) => {
|
|
729
735
|
var _b = _a, { children, className } = _b, props = __objRest(_b, ["children", "className"]);
|
|
730
736
|
return /* @__PURE__ */ jsxRuntime.jsx("div", __spreadProps(__spreadValues({ ref, className: clsx15__default.default(Container_module_default.container, className) }, props), { children }));
|
|
@@ -865,11 +871,11 @@ function FilterBar({
|
|
|
865
871
|
searchValue,
|
|
866
872
|
onSearchChange
|
|
867
873
|
}) {
|
|
868
|
-
const [openDropdown, setOpenDropdown] =
|
|
869
|
-
const [searchState, setSearchState] =
|
|
870
|
-
const filterRef =
|
|
871
|
-
const sortRef =
|
|
872
|
-
const searchInputRef =
|
|
874
|
+
const [openDropdown, setOpenDropdown] = React64.useState(null);
|
|
875
|
+
const [searchState, setSearchState] = React64.useState("closed");
|
|
876
|
+
const filterRef = React64.useRef(null);
|
|
877
|
+
const sortRef = React64.useRef(null);
|
|
878
|
+
const searchInputRef = React64.useRef(null);
|
|
873
879
|
const closeSearch = () => {
|
|
874
880
|
setSearchState("closing");
|
|
875
881
|
onSearchChange("");
|
|
@@ -879,7 +885,7 @@ function FilterBar({
|
|
|
879
885
|
onSearchChange("");
|
|
880
886
|
(_a = searchInputRef.current) == null ? void 0 : _a.focus();
|
|
881
887
|
};
|
|
882
|
-
|
|
888
|
+
React64.useEffect(() => {
|
|
883
889
|
const handleMouseDown = (e) => {
|
|
884
890
|
var _a, _b;
|
|
885
891
|
const target = e.target;
|
|
@@ -889,7 +895,7 @@ function FilterBar({
|
|
|
889
895
|
document.addEventListener("mousedown", handleMouseDown);
|
|
890
896
|
return () => document.removeEventListener("mousedown", handleMouseDown);
|
|
891
897
|
}, []);
|
|
892
|
-
|
|
898
|
+
React64.useEffect(() => {
|
|
893
899
|
var _a;
|
|
894
900
|
if (searchState === "open") (_a = searchInputRef.current) == null ? void 0 : _a.focus();
|
|
895
901
|
}, [searchState]);
|
|
@@ -1133,7 +1139,7 @@ var Pagination = ({
|
|
|
1133
1139
|
disableArrows = false,
|
|
1134
1140
|
onPageChange
|
|
1135
1141
|
}) => {
|
|
1136
|
-
const [activePage, setActivePage] =
|
|
1142
|
+
const [activePage, setActivePage] = React64.useState(currentPage);
|
|
1137
1143
|
const goToPage = (page) => {
|
|
1138
1144
|
if (page < 1 || page > totalPages) return;
|
|
1139
1145
|
setActivePage(page);
|
|
@@ -1452,7 +1458,7 @@ var Badge_module_default = {
|
|
|
1452
1458
|
icon: "Badge_module_icon",
|
|
1453
1459
|
iconOnly: "Badge_module_iconOnly"
|
|
1454
1460
|
};
|
|
1455
|
-
var Badge =
|
|
1461
|
+
var Badge = React64.forwardRef(
|
|
1456
1462
|
(_a, ref) => {
|
|
1457
1463
|
var _b = _a, {
|
|
1458
1464
|
children,
|
|
@@ -1526,7 +1532,7 @@ var Input_module_default = {
|
|
|
1526
1532
|
error: "Input_module_error",
|
|
1527
1533
|
"input-field--error": "Input_module_input-field--error",
|
|
1528
1534
|
"input-field--disabled": "Input_module_input-field--disabled"};
|
|
1529
|
-
var Input =
|
|
1535
|
+
var Input = React64.forwardRef(
|
|
1530
1536
|
(_a, ref) => {
|
|
1531
1537
|
var _b = _a, {
|
|
1532
1538
|
id,
|
|
@@ -1557,7 +1563,7 @@ var Input = React63.forwardRef(
|
|
|
1557
1563
|
"hideLabel",
|
|
1558
1564
|
"type"
|
|
1559
1565
|
]);
|
|
1560
|
-
const generatedId =
|
|
1566
|
+
const generatedId = React64.useId();
|
|
1561
1567
|
const inputId = id || generatedId;
|
|
1562
1568
|
const helperTextId = `${inputId}-helper`;
|
|
1563
1569
|
const errorId = `${inputId}-error`;
|
|
@@ -1741,10 +1747,10 @@ var CardCollection = ({
|
|
|
1741
1747
|
children
|
|
1742
1748
|
}) => {
|
|
1743
1749
|
var _a, _b;
|
|
1744
|
-
const container =
|
|
1745
|
-
const revealWrapper =
|
|
1746
|
-
const extraCard =
|
|
1747
|
-
const [isExpanded, setIsExpanded] =
|
|
1750
|
+
const container = React64.useRef(null);
|
|
1751
|
+
const revealWrapper = React64.useRef(null);
|
|
1752
|
+
const extraCard = React64.useRef(null);
|
|
1753
|
+
const [isExpanded, setIsExpanded] = React64.useState(false);
|
|
1748
1754
|
const slots = resolveCompoundSlots(children, {
|
|
1749
1755
|
title: CardCollectionTitle,
|
|
1750
1756
|
subtitle: CardCollectionSubtitle
|
|
@@ -1755,7 +1761,7 @@ var CardCollection = ({
|
|
|
1755
1761
|
const visibleCards = isExamCard ? cards.slice(0, 8) : cards;
|
|
1756
1762
|
const hiddenCards = isExamCard ? cards.slice(8) : [];
|
|
1757
1763
|
const { contextSafe } = react.useGSAP({ scope: container });
|
|
1758
|
-
const handleShowMore =
|
|
1764
|
+
const handleShowMore = React64.useCallback(() => {
|
|
1759
1765
|
contextSafe(() => {
|
|
1760
1766
|
setIsExpanded(true);
|
|
1761
1767
|
const tl = gsap__default.default.timeline({ defaults: { ease: "power3.inOut" } });
|
|
@@ -1859,8 +1865,8 @@ var ContactModule = ({
|
|
|
1859
1865
|
animateBlur = true
|
|
1860
1866
|
}) => {
|
|
1861
1867
|
var _a, _b;
|
|
1862
|
-
const containerRef =
|
|
1863
|
-
const blurRef =
|
|
1868
|
+
const containerRef = React64.useRef(null);
|
|
1869
|
+
const blurRef = React64.useRef(null);
|
|
1864
1870
|
const slots = resolveCompoundSlots(children, {
|
|
1865
1871
|
title: ContactModuleTitle,
|
|
1866
1872
|
subtitle: ContactModuleSubtitle
|
|
@@ -1971,10 +1977,6 @@ var Footer = ({
|
|
|
1971
1977
|
supportContacts = []
|
|
1972
1978
|
}) => {
|
|
1973
1979
|
var _a;
|
|
1974
|
-
const columns = [];
|
|
1975
|
-
for (let i = 0; i < navigationLinks.length; i += 5) {
|
|
1976
|
-
columns.push(navigationLinks.slice(i, i + 5));
|
|
1977
|
-
}
|
|
1978
1980
|
const supportColumns = [];
|
|
1979
1981
|
for (let i = 0; i < supportContacts.length; i += 2) {
|
|
1980
1982
|
supportColumns.push(supportContacts.slice(i, i + 2));
|
|
@@ -2015,7 +2017,7 @@ var Footer = ({
|
|
|
2015
2017
|
titleNode && /* @__PURE__ */ jsxRuntime.jsx("div", { className: clsx15__default.default(Footer_module_default.disclaimer, "p"), children: titleNode }),
|
|
2016
2018
|
copyright && /* @__PURE__ */ jsxRuntime.jsx("p", { className: Footer_module_default.copyright, children: copyright })
|
|
2017
2019
|
] }),
|
|
2018
|
-
|
|
2020
|
+
navigationLinks.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("nav", { className: Footer_module_default["bottom-right"], children: /* @__PURE__ */ jsxRuntime.jsx("ul", { className: Footer_module_default["nav-list"], children: navigationLinks.map((link) => /* @__PURE__ */ jsxRuntime.jsx("li", { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2019
2021
|
"a",
|
|
2020
2022
|
__spreadProps(__spreadValues({
|
|
2021
2023
|
href: link.href,
|
|
@@ -2023,7 +2025,7 @@ var Footer = ({
|
|
|
2023
2025
|
}, link.isExternal ? { target: "_blank", rel: "noopener noreferrer" } : {}), {
|
|
2024
2026
|
children: link.label
|
|
2025
2027
|
})
|
|
2026
|
-
) }, link.label)) }
|
|
2028
|
+
) }, link.label)) }) })
|
|
2027
2029
|
] }),
|
|
2028
2030
|
children
|
|
2029
2031
|
] }) });
|
|
@@ -2203,8 +2205,8 @@ var HeroBannerCarousel = ({
|
|
|
2203
2205
|
}) => {
|
|
2204
2206
|
const { is } = useViewPort_default();
|
|
2205
2207
|
const isMobile = is("tablet", "below");
|
|
2206
|
-
const [swiperInstance, setSwiperInstance] =
|
|
2207
|
-
const [activeIndex, setActiveIndex] =
|
|
2208
|
+
const [swiperInstance, setSwiperInstance] = React64.useState(null);
|
|
2209
|
+
const [activeIndex, setActiveIndex] = React64.useState(0);
|
|
2208
2210
|
if (!items.length) return null;
|
|
2209
2211
|
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: [
|
|
2210
2212
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: HeroBannerCarousel_module_default.swiperContainer, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -2216,7 +2218,7 @@ var HeroBannerCarousel = ({
|
|
|
2216
2218
|
onSwiper: setSwiperInstance,
|
|
2217
2219
|
onSlideChange: (swiper) => setActiveIndex(swiper.activeIndex),
|
|
2218
2220
|
children: items.map((item, index) => /* @__PURE__ */ jsxRuntime.jsx(react$1.SwiperSlide, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: HeroBannerCarousel_module_default.card, children: [
|
|
2219
|
-
item.
|
|
2221
|
+
item.isNewItem && /* @__PURE__ */ jsxRuntime.jsx("div", { className: HeroBannerCarousel_module_default.cardCorner, children: isMobile ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: HeroBannerCarousel_module_default.cardCornerDot }) : /* @__PURE__ */ jsxRuntime.jsx(Icon, { type: "newIcon", className: HeroBannerCarousel_module_default.cardCornerImage }) }),
|
|
2220
2222
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: HeroBannerCarousel_module_default.cardContent, children: [
|
|
2221
2223
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: HeroBannerCarousel_module_default.cardTitle, children: item.title }),
|
|
2222
2224
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: HeroBannerCarousel_module_default.cardBottom, children: [
|
|
@@ -2293,16 +2295,16 @@ var AccordionItem = ({
|
|
|
2293
2295
|
onToggle,
|
|
2294
2296
|
className
|
|
2295
2297
|
}) => {
|
|
2296
|
-
const contentRef =
|
|
2297
|
-
const contentInnerRef =
|
|
2298
|
-
const timelineRef =
|
|
2299
|
-
const [contentHeight, setContentHeight] =
|
|
2300
|
-
|
|
2298
|
+
const contentRef = React64.useRef(null);
|
|
2299
|
+
const contentInnerRef = React64.useRef(null);
|
|
2300
|
+
const timelineRef = React64.useRef(null);
|
|
2301
|
+
const [contentHeight, setContentHeight] = React64.useState(0);
|
|
2302
|
+
React64.useEffect(() => {
|
|
2301
2303
|
if (contentInnerRef.current) {
|
|
2302
2304
|
setContentHeight(contentInnerRef.current.scrollHeight);
|
|
2303
2305
|
}
|
|
2304
2306
|
}, [children]);
|
|
2305
|
-
|
|
2307
|
+
React64.useEffect(() => {
|
|
2306
2308
|
if (contentRef.current && contentHeight > 0) {
|
|
2307
2309
|
if (timelineRef.current) {
|
|
2308
2310
|
timelineRef.current.kill();
|
|
@@ -2387,7 +2389,7 @@ var Accordion = ({
|
|
|
2387
2389
|
allowMultiple = false,
|
|
2388
2390
|
onItemToggle
|
|
2389
2391
|
}) => {
|
|
2390
|
-
const [openIds, setOpenIds] =
|
|
2392
|
+
const [openIds, setOpenIds] = React64.useState(defaultOpenIds);
|
|
2391
2393
|
const handleToggle = (id) => {
|
|
2392
2394
|
setOpenIds((prev) => {
|
|
2393
2395
|
let newOpenIds;
|
|
@@ -2448,10 +2450,10 @@ var InternalBrandsTab_module_default = {
|
|
|
2448
2450
|
var InternalBrandsTab = (props) => {
|
|
2449
2451
|
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;
|
|
2450
2452
|
const { title, subTitle, className, tabs } = props;
|
|
2451
|
-
const [activeIndex, setActiveIndex] =
|
|
2453
|
+
const [activeIndex, setActiveIndex] = React64.useState(0);
|
|
2452
2454
|
const { is } = useViewPort_default();
|
|
2453
2455
|
const isTabletBelow = is("tablet", "below");
|
|
2454
|
-
const accordionItems =
|
|
2456
|
+
const accordionItems = React64.useMemo(() => {
|
|
2455
2457
|
return (tabs == null ? void 0 : tabs.map((tab, index) => {
|
|
2456
2458
|
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j2, _k2, _l2, _m2, _n2;
|
|
2457
2459
|
return {
|
|
@@ -3234,13 +3236,13 @@ var ResourcesGridList = ({
|
|
|
3234
3236
|
defaultSort = "latest"
|
|
3235
3237
|
}) => {
|
|
3236
3238
|
var _a;
|
|
3237
|
-
const [view, setView] =
|
|
3238
|
-
const [isSidebarOpen, setIsSidebarOpen] =
|
|
3239
|
-
const [filterValue, setFilterValue] =
|
|
3240
|
-
const [sortValue, setSortValue] =
|
|
3241
|
-
const [searchQuery, setSearchQuery] =
|
|
3242
|
-
const [currentPage, setCurrentPage] =
|
|
3243
|
-
const [selectedCategory, setSelectedCategory] =
|
|
3239
|
+
const [view, setView] = React64.useState(defaultView);
|
|
3240
|
+
const [isSidebarOpen, setIsSidebarOpen] = React64.useState(false);
|
|
3241
|
+
const [filterValue, setFilterValue] = React64.useState(defaultFilter);
|
|
3242
|
+
const [sortValue, setSortValue] = React64.useState(defaultSort);
|
|
3243
|
+
const [searchQuery, setSearchQuery] = React64.useState("");
|
|
3244
|
+
const [currentPage, setCurrentPage] = React64.useState(1);
|
|
3245
|
+
const [selectedCategory, setSelectedCategory] = React64.useState(() => {
|
|
3244
3246
|
const activeIndex = categories.findIndex((cat) => cat.active);
|
|
3245
3247
|
return activeIndex === -1 ? 0 : activeIndex;
|
|
3246
3248
|
});
|
|
@@ -3798,7 +3800,7 @@ var BlogSearchResultsList = ({
|
|
|
3798
3800
|
});
|
|
3799
3801
|
const searchNode = (_a = slots.search) != null ? _a : searchResult;
|
|
3800
3802
|
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: [
|
|
3801
|
-
typeof searchNode === "string" ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: clsx15__default.default("search-result", BlogSearchResultsList_module_default["search-result"]), children: searchNode }) :
|
|
3803
|
+
typeof searchNode === "string" ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: clsx15__default.default("search-result", BlogSearchResultsList_module_default["search-result"]), children: searchNode }) : React64__default.default.isValidElement(searchNode) ? React64__default.default.cloneElement(searchNode, {
|
|
3802
3804
|
className: clsx15__default.default("search-result", BlogSearchResultsList_module_default["search-result"])
|
|
3803
3805
|
}) : null,
|
|
3804
3806
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: clsx15__default.default("wrapper", BlogSearchResultsList_module_default["wrapper"]), children: [
|
|
@@ -3847,13 +3849,13 @@ function useIntersectionObserver({
|
|
|
3847
3849
|
animateOnce = false,
|
|
3848
3850
|
options = {}
|
|
3849
3851
|
} = {}) {
|
|
3850
|
-
const observeRef =
|
|
3851
|
-
const [isVisible, setIsVisible] =
|
|
3852
|
+
const observeRef = React64.useRef(null);
|
|
3853
|
+
const [isVisible, setIsVisible] = React64.useState(false);
|
|
3852
3854
|
if (typeof IntersectionObserver === "undefined") {
|
|
3853
3855
|
console.warn("IntersectionObserver is not supported in this browser.");
|
|
3854
3856
|
return { observeRef, isVisible: true };
|
|
3855
3857
|
}
|
|
3856
|
-
|
|
3858
|
+
React64.useEffect(() => {
|
|
3857
3859
|
const currentRef = observeRef.current;
|
|
3858
3860
|
if (!currentRef) return;
|
|
3859
3861
|
const observer = new IntersectionObserver((entries) => {
|