@digital-b2c/coreui-kit 0.11.8 → 0.11.10
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 +117 -99
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +5 -0
- package/dist/index.css.map +1 -1
- package/dist/index.d.cts +19 -8
- package/dist/index.d.ts +19 -8
- package/dist/index.mjs +64 -46
- 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 React65 = 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 React65__default = /*#__PURE__*/_interopDefault(React65);
|
|
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 = React65__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] = React65.useState(
|
|
499
499
|
() => typeof window !== "undefined" ? getDeviceType(window.innerWidth) : "desktop"
|
|
500
500
|
);
|
|
501
|
-
const getOtherDevices =
|
|
501
|
+
const getOtherDevices = React65.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 = React65.useCallback(() => {
|
|
509
509
|
setDevice(getDeviceType(window.innerWidth));
|
|
510
510
|
}, []);
|
|
511
511
|
const onWindowResizeDebounce = useDebounce_default(onWindowResize, 100);
|
|
512
|
-
|
|
512
|
+
React65.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] = React65.useState(false);
|
|
566
|
+
const [shouldAnimate, setShouldAnimate] = React65.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 = React65.useRef(null);
|
|
570
|
+
const marqueeRef = React65.useRef(null);
|
|
571
|
+
const timeline = React65.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 = React65.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
|
+
React65.Children.forEach(children, (child) => {
|
|
719
|
+
if (!React65.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 = React65.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] = React65.useState(null);
|
|
875
|
+
const [searchState, setSearchState] = React65.useState("closed");
|
|
876
|
+
const filterRef = React65.useRef(null);
|
|
877
|
+
const sortRef = React65.useRef(null);
|
|
878
|
+
const searchInputRef = React65.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
|
+
React65.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
|
+
React65.useEffect(() => {
|
|
899
899
|
var _a;
|
|
900
900
|
if (searchState === "open") (_a = searchInputRef.current) == null ? void 0 : _a.focus();
|
|
901
901
|
}, [searchState]);
|
|
@@ -1137,9 +1137,10 @@ var Pagination = ({
|
|
|
1137
1137
|
loop = true,
|
|
1138
1138
|
hasNumber = false,
|
|
1139
1139
|
disableArrows = false,
|
|
1140
|
-
onPageChange
|
|
1140
|
+
onPageChange,
|
|
1141
|
+
renderLink
|
|
1141
1142
|
}) => {
|
|
1142
|
-
const [activePage, setActivePage] =
|
|
1143
|
+
const [activePage, setActivePage] = React65.useState(currentPage);
|
|
1143
1144
|
const goToPage = (page) => {
|
|
1144
1145
|
if (page < 1 || page > totalPages) return;
|
|
1145
1146
|
setActivePage(page);
|
|
@@ -1169,8 +1170,15 @@ var Pagination = ({
|
|
|
1169
1170
|
setActivePage(page);
|
|
1170
1171
|
onPageChange == null ? void 0 : onPageChange(page);
|
|
1171
1172
|
};
|
|
1173
|
+
const prevPage = activePage === 1 ? loop ? totalPages : 1 : activePage - 1;
|
|
1174
|
+
const nextPage = activePage === totalPages ? loop ? 1 : totalPages : activePage + 1;
|
|
1172
1175
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: clsx15__default.default(Pagination_module_default.pagination, className), children: [
|
|
1173
|
-
!disableArrows &&
|
|
1176
|
+
!disableArrows && (renderLink ? renderLink({
|
|
1177
|
+
page: prevPage,
|
|
1178
|
+
className: Pagination_module_default.prev,
|
|
1179
|
+
"aria-label": "Go to previous page",
|
|
1180
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { type: "filledChevronLeft" })
|
|
1181
|
+
}) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
1174
1182
|
"button",
|
|
1175
1183
|
{
|
|
1176
1184
|
className: Pagination_module_default.prev,
|
|
@@ -1179,24 +1187,35 @@ var Pagination = ({
|
|
|
1179
1187
|
"aria-label": "Go to previous page",
|
|
1180
1188
|
children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { type: "filledChevronLeft" })
|
|
1181
1189
|
}
|
|
1182
|
-
),
|
|
1190
|
+
)),
|
|
1183
1191
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: Pagination_module_default.pages, children: Array.from({ length: totalPages }, (_, i) => {
|
|
1184
1192
|
const page = i + 1;
|
|
1185
|
-
|
|
1193
|
+
const pageClassName = clsx15__default.default(Pagination_module_default.page, {
|
|
1194
|
+
[Pagination_module_default.active]: activePage === page,
|
|
1195
|
+
[Pagination_module_default.number]: hasNumber
|
|
1196
|
+
});
|
|
1197
|
+
return renderLink ? /* @__PURE__ */ jsxRuntime.jsx(React65.Fragment, { children: renderLink({
|
|
1198
|
+
page,
|
|
1199
|
+
className: pageClassName,
|
|
1200
|
+
"aria-label": `Go to page ${page}`,
|
|
1201
|
+
children: hasNumber ? page : null
|
|
1202
|
+
}) }, page) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
1186
1203
|
"button",
|
|
1187
1204
|
{
|
|
1188
1205
|
onClick: () => goToPage(page),
|
|
1189
|
-
className:
|
|
1190
|
-
[Pagination_module_default.active]: activePage === page,
|
|
1191
|
-
[Pagination_module_default.number]: hasNumber
|
|
1192
|
-
}),
|
|
1206
|
+
className: pageClassName,
|
|
1193
1207
|
"aria-label": `Go to page ${page}`,
|
|
1194
1208
|
children: hasNumber ? page : null
|
|
1195
1209
|
},
|
|
1196
1210
|
page
|
|
1197
1211
|
);
|
|
1198
1212
|
}) }),
|
|
1199
|
-
!disableArrows &&
|
|
1213
|
+
!disableArrows && (renderLink ? renderLink({
|
|
1214
|
+
page: nextPage,
|
|
1215
|
+
className: Pagination_module_default.next,
|
|
1216
|
+
"aria-label": "Go to next page",
|
|
1217
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { type: "filledChevronRight" })
|
|
1218
|
+
}) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
1200
1219
|
"button",
|
|
1201
1220
|
{
|
|
1202
1221
|
className: Pagination_module_default.next,
|
|
@@ -1205,7 +1224,7 @@ var Pagination = ({
|
|
|
1205
1224
|
"aria-label": "Go to next page",
|
|
1206
1225
|
children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { type: "filledChevronRight" })
|
|
1207
1226
|
}
|
|
1208
|
-
)
|
|
1227
|
+
))
|
|
1209
1228
|
] });
|
|
1210
1229
|
};
|
|
1211
1230
|
|
|
@@ -1458,7 +1477,7 @@ var Badge_module_default = {
|
|
|
1458
1477
|
icon: "Badge_module_icon",
|
|
1459
1478
|
iconOnly: "Badge_module_iconOnly"
|
|
1460
1479
|
};
|
|
1461
|
-
var Badge =
|
|
1480
|
+
var Badge = React65.forwardRef(
|
|
1462
1481
|
(_a, ref) => {
|
|
1463
1482
|
var _b = _a, {
|
|
1464
1483
|
children,
|
|
@@ -1532,7 +1551,7 @@ var Input_module_default = {
|
|
|
1532
1551
|
error: "Input_module_error",
|
|
1533
1552
|
"input-field--error": "Input_module_input-field--error",
|
|
1534
1553
|
"input-field--disabled": "Input_module_input-field--disabled"};
|
|
1535
|
-
var Input =
|
|
1554
|
+
var Input = React65.forwardRef(
|
|
1536
1555
|
(_a, ref) => {
|
|
1537
1556
|
var _b = _a, {
|
|
1538
1557
|
id,
|
|
@@ -1563,7 +1582,7 @@ var Input = React64.forwardRef(
|
|
|
1563
1582
|
"hideLabel",
|
|
1564
1583
|
"type"
|
|
1565
1584
|
]);
|
|
1566
|
-
const generatedId =
|
|
1585
|
+
const generatedId = React65.useId();
|
|
1567
1586
|
const inputId = id || generatedId;
|
|
1568
1587
|
const helperTextId = `${inputId}-helper`;
|
|
1569
1588
|
const errorId = `${inputId}-error`;
|
|
@@ -1747,10 +1766,10 @@ var CardCollection = ({
|
|
|
1747
1766
|
children
|
|
1748
1767
|
}) => {
|
|
1749
1768
|
var _a, _b;
|
|
1750
|
-
const container =
|
|
1751
|
-
const revealWrapper =
|
|
1752
|
-
const extraCard =
|
|
1753
|
-
const [isExpanded, setIsExpanded] =
|
|
1769
|
+
const container = React65.useRef(null);
|
|
1770
|
+
const revealWrapper = React65.useRef(null);
|
|
1771
|
+
const extraCard = React65.useRef(null);
|
|
1772
|
+
const [isExpanded, setIsExpanded] = React65.useState(false);
|
|
1754
1773
|
const slots = resolveCompoundSlots(children, {
|
|
1755
1774
|
title: CardCollectionTitle,
|
|
1756
1775
|
subtitle: CardCollectionSubtitle
|
|
@@ -1761,7 +1780,7 @@ var CardCollection = ({
|
|
|
1761
1780
|
const visibleCards = isExamCard ? cards.slice(0, 8) : cards;
|
|
1762
1781
|
const hiddenCards = isExamCard ? cards.slice(8) : [];
|
|
1763
1782
|
const { contextSafe } = react.useGSAP({ scope: container });
|
|
1764
|
-
const handleShowMore =
|
|
1783
|
+
const handleShowMore = React65.useCallback(() => {
|
|
1765
1784
|
contextSafe(() => {
|
|
1766
1785
|
setIsExpanded(true);
|
|
1767
1786
|
const tl = gsap__default.default.timeline({ defaults: { ease: "power3.inOut" } });
|
|
@@ -1865,8 +1884,8 @@ var ContactModule = ({
|
|
|
1865
1884
|
animateBlur = true
|
|
1866
1885
|
}) => {
|
|
1867
1886
|
var _a, _b;
|
|
1868
|
-
const containerRef =
|
|
1869
|
-
const blurRef =
|
|
1887
|
+
const containerRef = React65.useRef(null);
|
|
1888
|
+
const blurRef = React65.useRef(null);
|
|
1870
1889
|
const slots = resolveCompoundSlots(children, {
|
|
1871
1890
|
title: ContactModuleTitle,
|
|
1872
1891
|
subtitle: ContactModuleSubtitle
|
|
@@ -2205,8 +2224,8 @@ var HeroBannerCarousel = ({
|
|
|
2205
2224
|
}) => {
|
|
2206
2225
|
const { is } = useViewPort_default();
|
|
2207
2226
|
const isMobile = is("tablet", "below");
|
|
2208
|
-
const [swiperInstance, setSwiperInstance] =
|
|
2209
|
-
const [activeIndex, setActiveIndex] =
|
|
2227
|
+
const [swiperInstance, setSwiperInstance] = React65.useState(null);
|
|
2228
|
+
const [activeIndex, setActiveIndex] = React65.useState(0);
|
|
2210
2229
|
if (!items.length) return null;
|
|
2211
2230
|
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: [
|
|
2212
2231
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: HeroBannerCarousel_module_default.swiperContainer, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -2295,16 +2314,16 @@ var AccordionItem = ({
|
|
|
2295
2314
|
onToggle,
|
|
2296
2315
|
className
|
|
2297
2316
|
}) => {
|
|
2298
|
-
const contentRef =
|
|
2299
|
-
const contentInnerRef =
|
|
2300
|
-
const timelineRef =
|
|
2301
|
-
const [contentHeight, setContentHeight] =
|
|
2302
|
-
|
|
2317
|
+
const contentRef = React65.useRef(null);
|
|
2318
|
+
const contentInnerRef = React65.useRef(null);
|
|
2319
|
+
const timelineRef = React65.useRef(null);
|
|
2320
|
+
const [contentHeight, setContentHeight] = React65.useState(0);
|
|
2321
|
+
React65.useEffect(() => {
|
|
2303
2322
|
if (contentInnerRef.current) {
|
|
2304
2323
|
setContentHeight(contentInnerRef.current.scrollHeight);
|
|
2305
2324
|
}
|
|
2306
2325
|
}, [children]);
|
|
2307
|
-
|
|
2326
|
+
React65.useEffect(() => {
|
|
2308
2327
|
if (contentRef.current && contentHeight > 0) {
|
|
2309
2328
|
if (timelineRef.current) {
|
|
2310
2329
|
timelineRef.current.kill();
|
|
@@ -2389,7 +2408,7 @@ var Accordion = ({
|
|
|
2389
2408
|
allowMultiple = false,
|
|
2390
2409
|
onItemToggle
|
|
2391
2410
|
}) => {
|
|
2392
|
-
const [openIds, setOpenIds] =
|
|
2411
|
+
const [openIds, setOpenIds] = React65.useState(defaultOpenIds);
|
|
2393
2412
|
const handleToggle = (id) => {
|
|
2394
2413
|
setOpenIds((prev) => {
|
|
2395
2414
|
let newOpenIds;
|
|
@@ -2450,10 +2469,10 @@ var InternalBrandsTab_module_default = {
|
|
|
2450
2469
|
var InternalBrandsTab = (props) => {
|
|
2451
2470
|
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;
|
|
2452
2471
|
const { title, subTitle, className, tabs } = props;
|
|
2453
|
-
const [activeIndex, setActiveIndex] =
|
|
2472
|
+
const [activeIndex, setActiveIndex] = React65.useState(0);
|
|
2454
2473
|
const { is } = useViewPort_default();
|
|
2455
2474
|
const isTabletBelow = is("tablet", "below");
|
|
2456
|
-
const accordionItems =
|
|
2475
|
+
const accordionItems = React65.useMemo(() => {
|
|
2457
2476
|
return (tabs == null ? void 0 : tabs.map((tab, index) => {
|
|
2458
2477
|
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j2, _k2, _l2, _m2, _n2;
|
|
2459
2478
|
return {
|
|
@@ -3236,13 +3255,13 @@ var ResourcesGridList = ({
|
|
|
3236
3255
|
defaultSort = "latest"
|
|
3237
3256
|
}) => {
|
|
3238
3257
|
var _a;
|
|
3239
|
-
const [view, setView] =
|
|
3240
|
-
const [isSidebarOpen, setIsSidebarOpen] =
|
|
3241
|
-
const [filterValue, setFilterValue] =
|
|
3242
|
-
const [sortValue, setSortValue] =
|
|
3243
|
-
const [searchQuery, setSearchQuery] =
|
|
3244
|
-
const [currentPage, setCurrentPage] =
|
|
3245
|
-
const [selectedCategory, setSelectedCategory] =
|
|
3258
|
+
const [view, setView] = React65.useState(defaultView);
|
|
3259
|
+
const [isSidebarOpen, setIsSidebarOpen] = React65.useState(false);
|
|
3260
|
+
const [filterValue, setFilterValue] = React65.useState(defaultFilter);
|
|
3261
|
+
const [sortValue, setSortValue] = React65.useState(defaultSort);
|
|
3262
|
+
const [searchQuery, setSearchQuery] = React65.useState("");
|
|
3263
|
+
const [currentPage, setCurrentPage] = React65.useState(1);
|
|
3264
|
+
const [selectedCategory, setSelectedCategory] = React65.useState(() => {
|
|
3246
3265
|
const activeIndex = categories.findIndex((cat) => cat.active);
|
|
3247
3266
|
return activeIndex === -1 ? 0 : activeIndex;
|
|
3248
3267
|
});
|
|
@@ -3355,10 +3374,7 @@ var ResourcesGridList = ({
|
|
|
3355
3374
|
onSelect: handleSelectCategory
|
|
3356
3375
|
}
|
|
3357
3376
|
),
|
|
3358
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: clsx15__default.default(ResourcesGridList_module_default.cardsArea, ResourcesGridList_module_default[view]), children: paginatedItems.map((item
|
|
3359
|
-
var _a2;
|
|
3360
|
-
return /* @__PURE__ */ jsxRuntime.jsx(ResourceCardItem, { item, view }, (_a2 = item.href) != null ? _a2 : i);
|
|
3361
|
-
}) })
|
|
3377
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: clsx15__default.default(ResourcesGridList_module_default.cardsArea, ResourcesGridList_module_default[view]), children: paginatedItems.map((item) => /* @__PURE__ */ jsxRuntime.jsx(ResourceCardItem, { item, view }, item.id)) })
|
|
3362
3378
|
] }),
|
|
3363
3379
|
totalPages > 1 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
3364
3380
|
Pagination,
|
|
@@ -3631,21 +3647,27 @@ var NewsCardList_module_default = {
|
|
|
3631
3647
|
"end-action-button": "NewsCardList_module_end-action-button",
|
|
3632
3648
|
pagination: "NewsCardList_module_pagination"
|
|
3633
3649
|
};
|
|
3650
|
+
var NewsCardListPagination = ({ children }) => {
|
|
3651
|
+
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children });
|
|
3652
|
+
};
|
|
3634
3653
|
var NewsCardList = ({
|
|
3635
3654
|
items,
|
|
3636
3655
|
backgroundColor,
|
|
3637
3656
|
className,
|
|
3638
3657
|
currentPage,
|
|
3639
|
-
totalPages = 0,
|
|
3640
3658
|
searchValue,
|
|
3641
|
-
onPageChange,
|
|
3642
3659
|
onSearchChange,
|
|
3643
3660
|
onSearchSubmit,
|
|
3644
3661
|
searchInputProps,
|
|
3645
|
-
renderLink
|
|
3662
|
+
renderLink,
|
|
3663
|
+
children
|
|
3646
3664
|
}) => {
|
|
3647
3665
|
const featuredCards = items.slice(0, 4);
|
|
3648
3666
|
const cards = currentPage !== 1 ? items : items.slice(4);
|
|
3667
|
+
const slots = resolveCompoundSlots(children, {
|
|
3668
|
+
pagination: NewsCardListPagination
|
|
3669
|
+
});
|
|
3670
|
+
const paginationNode = slots.pagination;
|
|
3649
3671
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3650
3672
|
"div",
|
|
3651
3673
|
{
|
|
@@ -3690,21 +3712,19 @@ var NewsCardList = ({
|
|
|
3690
3712
|
/* @__PURE__ */ jsxRuntime.jsx(BlogCardGrid2, { items: cards, hasContainer: false, renderLink })
|
|
3691
3713
|
] })
|
|
3692
3714
|
] }),
|
|
3693
|
-
|
|
3694
|
-
|
|
3695
|
-
|
|
3696
|
-
currentPage: currentPage || 1,
|
|
3697
|
-
totalPages: totalPages || 0,
|
|
3698
|
-
onPageChange,
|
|
3699
|
-
className: clsx15__default.default("pagination", NewsCardList_module_default["pagination"]),
|
|
3700
|
-
hasNumber: true
|
|
3701
|
-
}
|
|
3702
|
-
) : null
|
|
3715
|
+
paginationNode ? React65__default.default.cloneElement(paginationNode, {
|
|
3716
|
+
className: clsx15__default.default("pagination", NewsCardList_module_default["pagination"])
|
|
3717
|
+
}) : null
|
|
3703
3718
|
] })
|
|
3704
3719
|
}
|
|
3705
3720
|
);
|
|
3706
3721
|
};
|
|
3707
3722
|
|
|
3723
|
+
// src/widgets/NewsCardList/index.ts
|
|
3724
|
+
var NewsCardList2 = Object.assign(NewsCardList, {
|
|
3725
|
+
Pagination: NewsCardListPagination
|
|
3726
|
+
});
|
|
3727
|
+
|
|
3708
3728
|
// src/widgets/BlogPost/BlogPost.module.scss
|
|
3709
3729
|
var BlogPost_module_default = {
|
|
3710
3730
|
"blog-post": "BlogPost_module_blog-post",
|
|
@@ -3784,26 +3804,30 @@ var BlogSearchResultsList_module_default = {
|
|
|
3784
3804
|
"end-action-button": "BlogSearchResultsList_module_end-action-button",
|
|
3785
3805
|
pagination: "BlogSearchResultsList_module_pagination"
|
|
3786
3806
|
};
|
|
3807
|
+
var BlogSearchResultsListPagination = ({
|
|
3808
|
+
children
|
|
3809
|
+
}) => {
|
|
3810
|
+
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children });
|
|
3811
|
+
};
|
|
3787
3812
|
var BlogSearchResultsList = ({
|
|
3788
3813
|
items,
|
|
3789
3814
|
searchResult,
|
|
3790
3815
|
onSearchChange,
|
|
3791
3816
|
onSearchSubmit,
|
|
3792
|
-
onPageChange,
|
|
3793
3817
|
searchValue,
|
|
3794
|
-
currentPage,
|
|
3795
|
-
totalPages = 0,
|
|
3796
3818
|
className,
|
|
3797
3819
|
renderLink,
|
|
3798
3820
|
children
|
|
3799
3821
|
}) => {
|
|
3800
3822
|
var _a;
|
|
3801
3823
|
const slots = resolveCompoundSlots(children, {
|
|
3802
|
-
search: BlogSearchResultsListSearch
|
|
3824
|
+
search: BlogSearchResultsListSearch,
|
|
3825
|
+
pagination: BlogSearchResultsListPagination
|
|
3803
3826
|
});
|
|
3804
3827
|
const searchNode = (_a = slots.search) != null ? _a : searchResult;
|
|
3828
|
+
const paginationNode = slots.pagination;
|
|
3805
3829
|
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: [
|
|
3806
|
-
typeof searchNode === "string" ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: clsx15__default.default("search-result", BlogSearchResultsList_module_default["search-result"]), children: searchNode }) :
|
|
3830
|
+
typeof searchNode === "string" ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: clsx15__default.default("search-result", BlogSearchResultsList_module_default["search-result"]), children: searchNode }) : React65__default.default.isValidElement(searchNode) ? React65__default.default.cloneElement(searchNode, {
|
|
3807
3831
|
className: clsx15__default.default("search-result", BlogSearchResultsList_module_default["search-result"])
|
|
3808
3832
|
}) : null,
|
|
3809
3833
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: clsx15__default.default("wrapper", BlogSearchResultsList_module_default["wrapper"]), children: [
|
|
@@ -3831,34 +3855,28 @@ var BlogSearchResultsList = ({
|
|
|
3831
3855
|
),
|
|
3832
3856
|
/* @__PURE__ */ jsxRuntime.jsx(BlogCardGrid2, { items, hasContainer: false, renderLink })
|
|
3833
3857
|
] }),
|
|
3834
|
-
|
|
3835
|
-
|
|
3836
|
-
|
|
3837
|
-
currentPage: currentPage || 1,
|
|
3838
|
-
totalPages: totalPages || 0,
|
|
3839
|
-
onPageChange,
|
|
3840
|
-
className: clsx15__default.default("pagination", BlogSearchResultsList_module_default["pagination"]),
|
|
3841
|
-
hasNumber: true
|
|
3842
|
-
}
|
|
3843
|
-
) : null
|
|
3858
|
+
paginationNode ? React65__default.default.cloneElement(paginationNode, {
|
|
3859
|
+
className: clsx15__default.default("pagination", BlogSearchResultsList_module_default["pagination"])
|
|
3860
|
+
}) : null
|
|
3844
3861
|
] }) });
|
|
3845
3862
|
};
|
|
3846
3863
|
|
|
3847
3864
|
// src/widgets/BlogSearchResultsList/index.ts
|
|
3848
3865
|
var BlogSearchResultsList2 = Object.assign(BlogSearchResultsList, {
|
|
3849
|
-
Search: BlogSearchResultsListSearch
|
|
3866
|
+
Search: BlogSearchResultsListSearch,
|
|
3867
|
+
Pagination: BlogSearchResultsListPagination
|
|
3850
3868
|
});
|
|
3851
3869
|
function useIntersectionObserver({
|
|
3852
3870
|
animateOnce = false,
|
|
3853
3871
|
options = {}
|
|
3854
3872
|
} = {}) {
|
|
3855
|
-
const observeRef =
|
|
3856
|
-
const [isVisible, setIsVisible] =
|
|
3873
|
+
const observeRef = React65.useRef(null);
|
|
3874
|
+
const [isVisible, setIsVisible] = React65.useState(false);
|
|
3857
3875
|
if (typeof IntersectionObserver === "undefined") {
|
|
3858
3876
|
console.warn("IntersectionObserver is not supported in this browser.");
|
|
3859
3877
|
return { observeRef, isVisible: true };
|
|
3860
3878
|
}
|
|
3861
|
-
|
|
3879
|
+
React65.useEffect(() => {
|
|
3862
3880
|
const currentRef = observeRef.current;
|
|
3863
3881
|
if (!currentRef) return;
|
|
3864
3882
|
const observer = new IntersectionObserver((entries) => {
|
|
@@ -3903,7 +3921,7 @@ exports.InternalBrandsTab = InternalBrandsTab2;
|
|
|
3903
3921
|
exports.MiniBanner = MiniBanner2;
|
|
3904
3922
|
exports.MiniSectionCta = MiniSectionCta2;
|
|
3905
3923
|
exports.NewsCard = NewsCard;
|
|
3906
|
-
exports.NewsCardList =
|
|
3924
|
+
exports.NewsCardList = NewsCardList2;
|
|
3907
3925
|
exports.Pagination = Pagination;
|
|
3908
3926
|
exports.Picture = Picture;
|
|
3909
3927
|
exports.PracticeCard = PracticeCard;
|