@digital-b2c/coreui-kit 0.9.0 → 0.10.1
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 +530 -364
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +429 -388
- package/dist/index.css.map +1 -1
- package/dist/index.d.cts +55 -16
- package/dist/index.d.ts +55 -16
- package/dist/index.mjs +527 -364
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import clsx25 from 'clsx';
|
|
2
2
|
import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
|
|
3
3
|
import React62, { forwardRef, useRef, useState, useCallback, useMemo, Children, isValidElement, useEffect } from 'react';
|
|
4
4
|
import gsap$1, { gsap } from 'gsap';
|
|
@@ -58,7 +58,7 @@ var Picture = (_a) => {
|
|
|
58
58
|
__spreadValues({
|
|
59
59
|
src: desktop.src,
|
|
60
60
|
alt: desktop.alt,
|
|
61
|
-
className:
|
|
61
|
+
className: clsx25(className, Picture_module_default["image-desktop"])
|
|
62
62
|
}, rest)
|
|
63
63
|
),
|
|
64
64
|
/* @__PURE__ */ jsx(
|
|
@@ -66,7 +66,7 @@ var Picture = (_a) => {
|
|
|
66
66
|
__spreadValues({
|
|
67
67
|
src: (_b2 = mobile == null ? void 0 : mobile.src) != null ? _b2 : desktop.src,
|
|
68
68
|
alt: (_c = mobile == null ? void 0 : mobile.alt) != null ? _c : desktop.alt,
|
|
69
|
-
className:
|
|
69
|
+
className: clsx25(className, Picture_module_default["image-mobile"])
|
|
70
70
|
}, rest)
|
|
71
71
|
)
|
|
72
72
|
] });
|
|
@@ -425,7 +425,7 @@ var Button = (_a) => {
|
|
|
425
425
|
]);
|
|
426
426
|
const isLink = !!href;
|
|
427
427
|
const props = __spreadValues(__spreadValues({
|
|
428
|
-
className:
|
|
428
|
+
className: clsx25(
|
|
429
429
|
Button_module_default.button,
|
|
430
430
|
variant ? Button_module_default[variant] : null,
|
|
431
431
|
{ [Button_module_default.fullWidth]: !!fullWidth },
|
|
@@ -657,7 +657,7 @@ var BrandsStrip = ({
|
|
|
657
657
|
"div",
|
|
658
658
|
{
|
|
659
659
|
ref: containerRef,
|
|
660
|
-
className:
|
|
660
|
+
className: clsx25(
|
|
661
661
|
BrandsStrip_module_default.brandsStrip,
|
|
662
662
|
BrandsStrip_module_default[variant],
|
|
663
663
|
{ [BrandsStrip_module_default.small]: size === "small" },
|
|
@@ -666,13 +666,13 @@ var BrandsStrip = ({
|
|
|
666
666
|
onMouseEnter: handleMouseEnter,
|
|
667
667
|
onMouseLeave: handleMouseLeave,
|
|
668
668
|
children: [
|
|
669
|
-
/* @__PURE__ */ jsxs("div", { className:
|
|
670
|
-
title && logos.length === 1 && /* @__PURE__ */ jsx("h2", { className:
|
|
669
|
+
/* @__PURE__ */ jsxs("div", { className: clsx25(BrandsStrip_module_default.container, { [BrandsStrip_module_default.blurred]: show && logos.length > 1 }), children: [
|
|
670
|
+
title && logos.length === 1 && /* @__PURE__ */ jsx("h2", { className: clsx25("body", BrandsStrip_module_default.title), children: title }),
|
|
671
671
|
logos.length > 0 && /* @__PURE__ */ jsx(
|
|
672
672
|
"div",
|
|
673
673
|
{
|
|
674
674
|
ref: marqueeRef,
|
|
675
|
-
className:
|
|
675
|
+
className: clsx25(BrandsStrip_module_default.logos, { [BrandsStrip_module_default.marqueeGSAP]: shouldAnimate }),
|
|
676
676
|
children: duplicatedLogos.map((logo, index) => /* @__PURE__ */ jsx("div", { className: BrandsStrip_module_default.logoWrapper, children: /* @__PURE__ */ jsx(Picture, __spreadValues({ className: BrandsStrip_module_default.logo }, logo)) }, `${logo.alt}-${index}`))
|
|
677
677
|
}
|
|
678
678
|
)
|
|
@@ -719,7 +719,7 @@ var Container_module_default = {
|
|
|
719
719
|
var Container = forwardRef(
|
|
720
720
|
(_a, ref) => {
|
|
721
721
|
var _b = _a, { children, className } = _b, props = __objRest(_b, ["children", "className"]);
|
|
722
|
-
return /* @__PURE__ */ jsx("div", __spreadProps(__spreadValues({ ref, className:
|
|
722
|
+
return /* @__PURE__ */ jsx("div", __spreadProps(__spreadValues({ ref, className: clsx25(Container_module_default.container, className) }, props), { children }));
|
|
723
723
|
}
|
|
724
724
|
);
|
|
725
725
|
Container.displayName = "Container";
|
|
@@ -760,14 +760,14 @@ var Card = ({
|
|
|
760
760
|
ConditionalWrapper,
|
|
761
761
|
__spreadProps(__spreadValues({
|
|
762
762
|
ref,
|
|
763
|
-
className:
|
|
763
|
+
className: clsx25(Card_module_default.card, Card_module_default[variant], className),
|
|
764
764
|
wrapper: Anchor,
|
|
765
765
|
fallback: "div",
|
|
766
766
|
condition: isLink
|
|
767
767
|
}, href ? { href, isExternal } : {}), {
|
|
768
768
|
children: [
|
|
769
769
|
/* @__PURE__ */ jsxs("div", { className: Card_module_default.logoContainer, children: [
|
|
770
|
-
(logo == null ? void 0 : logo.src) ? /* @__PURE__ */ jsx(Picture, __spreadValues({ className:
|
|
770
|
+
(logo == null ? void 0 : logo.src) ? /* @__PURE__ */ jsx(Picture, __spreadValues({ className: clsx25(Card_module_default.logo, isLink && Card_module_default.hideLogo) }, logo)) : icon && /* @__PURE__ */ jsx(Icon, { type: icon, className: clsx25(Card_module_default.logo, isLink && Card_module_default.hideLogo) }),
|
|
771
771
|
isLink && /* @__PURE__ */ jsx(Icon, { type: "tiltedRightWhite", className: Card_module_default.logoHover })
|
|
772
772
|
] }),
|
|
773
773
|
/* @__PURE__ */ jsxs("div", { className: Card_module_default.content, children: [
|
|
@@ -802,10 +802,10 @@ var CountingCard = ({ className, title, count, image, children }) => {
|
|
|
802
802
|
title: CountingCardTitle
|
|
803
803
|
});
|
|
804
804
|
const titleNode = (_a = slots.title) != null ? _a : title;
|
|
805
|
-
return /* @__PURE__ */ jsxs("div", { className:
|
|
805
|
+
return /* @__PURE__ */ jsxs("div", { className: clsx25(CountingCard_module_default["counting-card"], className), children: [
|
|
806
806
|
/* @__PURE__ */ jsxs("div", { className: CountingCard_module_default.content, children: [
|
|
807
807
|
titleNode && /* @__PURE__ */ jsx("div", { className: "body", children: titleNode }),
|
|
808
|
-
count && /* @__PURE__ */ jsx("div", { className:
|
|
808
|
+
count && /* @__PURE__ */ jsx("div", { className: clsx25(CountingCard_module_default.count, "h1"), children: count })
|
|
809
809
|
] }),
|
|
810
810
|
image && /* @__PURE__ */ jsx(Picture, __spreadValues({ className: CountingCard_module_default.logo }, image))
|
|
811
811
|
] });
|
|
@@ -815,6 +815,280 @@ var CountingCard = ({ className, title, count, image, children }) => {
|
|
|
815
815
|
var CountingCard2 = Object.assign(CountingCard, {
|
|
816
816
|
Title: CountingCardTitle
|
|
817
817
|
});
|
|
818
|
+
|
|
819
|
+
// src/components/FilterBar/FilterBar.module.scss
|
|
820
|
+
var FilterBar_module_default = {
|
|
821
|
+
filterBar: "FilterBar_module_filterBar",
|
|
822
|
+
viewToggle: "FilterBar_module_viewToggle",
|
|
823
|
+
filterActions: "FilterBar_module_filterActions",
|
|
824
|
+
chip: "FilterBar_module_chip",
|
|
825
|
+
active: "FilterBar_module_active",
|
|
826
|
+
chipLabel: "FilterBar_module_chipLabel",
|
|
827
|
+
dropdownWrapper: "FilterBar_module_dropdownWrapper",
|
|
828
|
+
searchExpanded: "FilterBar_module_searchExpanded",
|
|
829
|
+
searchCollapsing: "FilterBar_module_searchCollapsing",
|
|
830
|
+
searchIconInner: "FilterBar_module_searchIconInner",
|
|
831
|
+
searchInput: "FilterBar_module_searchInput",
|
|
832
|
+
searchClear: "FilterBar_module_searchClear",
|
|
833
|
+
dropdownPanel: "FilterBar_module_dropdownPanel",
|
|
834
|
+
searchPanel: "FilterBar_module_searchPanel",
|
|
835
|
+
dropdownOption: "FilterBar_module_dropdownOption",
|
|
836
|
+
selected: "FilterBar_module_selected"
|
|
837
|
+
};
|
|
838
|
+
var FILTER_OPTIONS = [
|
|
839
|
+
{ value: "link", label: "Link", icon: "externalLink" },
|
|
840
|
+
{ value: "pdf", label: "PDF", icon: "pdf" }
|
|
841
|
+
];
|
|
842
|
+
var SORT_OPTIONS = [
|
|
843
|
+
{ value: "latest", label: "Latest" },
|
|
844
|
+
{ value: "oldest", label: "Oldest" },
|
|
845
|
+
{ value: "az", label: "A \u2192 Z" },
|
|
846
|
+
{ value: "za", label: "Z \u2192 A" }
|
|
847
|
+
];
|
|
848
|
+
function FilterBar({
|
|
849
|
+
view,
|
|
850
|
+
onViewChange,
|
|
851
|
+
isMobile,
|
|
852
|
+
filterValue,
|
|
853
|
+
onFilterChange,
|
|
854
|
+
sortValue,
|
|
855
|
+
onSortChange,
|
|
856
|
+
searchValue,
|
|
857
|
+
onSearchChange
|
|
858
|
+
}) {
|
|
859
|
+
const [openDropdown, setOpenDropdown] = useState(null);
|
|
860
|
+
const [searchState, setSearchState] = useState("closed");
|
|
861
|
+
const filterRef = useRef(null);
|
|
862
|
+
const sortRef = useRef(null);
|
|
863
|
+
const searchRef = useRef(null);
|
|
864
|
+
const searchInputRef = useRef(null);
|
|
865
|
+
const closeSearch = () => {
|
|
866
|
+
setSearchState("closing");
|
|
867
|
+
onSearchChange("");
|
|
868
|
+
};
|
|
869
|
+
const clearSearch = () => {
|
|
870
|
+
var _a;
|
|
871
|
+
onSearchChange("");
|
|
872
|
+
(_a = searchInputRef.current) == null ? void 0 : _a.focus();
|
|
873
|
+
};
|
|
874
|
+
useEffect(() => {
|
|
875
|
+
const handleMouseDown = (e) => {
|
|
876
|
+
var _a, _b, _c;
|
|
877
|
+
const target = e.target;
|
|
878
|
+
if (((_a = filterRef.current) == null ? void 0 : _a.contains(target)) || ((_b = sortRef.current) == null ? void 0 : _b.contains(target)) || ((_c = searchRef.current) == null ? void 0 : _c.contains(target)))
|
|
879
|
+
return;
|
|
880
|
+
setOpenDropdown(null);
|
|
881
|
+
};
|
|
882
|
+
document.addEventListener("mousedown", handleMouseDown);
|
|
883
|
+
return () => document.removeEventListener("mousedown", handleMouseDown);
|
|
884
|
+
}, []);
|
|
885
|
+
useEffect(() => {
|
|
886
|
+
var _a;
|
|
887
|
+
if (searchState === "open") (_a = searchInputRef.current) == null ? void 0 : _a.focus();
|
|
888
|
+
}, [searchState]);
|
|
889
|
+
useEffect(() => {
|
|
890
|
+
var _a;
|
|
891
|
+
if (openDropdown === "search") (_a = searchInputRef.current) == null ? void 0 : _a.focus();
|
|
892
|
+
}, [openDropdown]);
|
|
893
|
+
return /* @__PURE__ */ jsxs("div", { className: FilterBar_module_default.filterBar, children: [
|
|
894
|
+
/* @__PURE__ */ jsxs("div", { className: FilterBar_module_default.viewToggle, children: [
|
|
895
|
+
/* @__PURE__ */ jsxs(
|
|
896
|
+
"button",
|
|
897
|
+
{
|
|
898
|
+
type: "button",
|
|
899
|
+
className: clsx25(FilterBar_module_default.chip, view === "grid" && FilterBar_module_default.active),
|
|
900
|
+
onClick: () => onViewChange("grid"),
|
|
901
|
+
"aria-pressed": view === "grid",
|
|
902
|
+
children: [
|
|
903
|
+
/* @__PURE__ */ jsx(Icon, { type: "grid", size: 20, "aria-hidden": "true" }),
|
|
904
|
+
/* @__PURE__ */ jsx("span", { className: FilterBar_module_default.chipLabel, children: "Grid" })
|
|
905
|
+
]
|
|
906
|
+
}
|
|
907
|
+
),
|
|
908
|
+
/* @__PURE__ */ jsxs(
|
|
909
|
+
"button",
|
|
910
|
+
{
|
|
911
|
+
type: "button",
|
|
912
|
+
className: clsx25(FilterBar_module_default.chip, view === "list" && FilterBar_module_default.active),
|
|
913
|
+
onClick: () => onViewChange("list"),
|
|
914
|
+
"aria-pressed": view === "list",
|
|
915
|
+
children: [
|
|
916
|
+
/* @__PURE__ */ jsx(Icon, { type: "list", size: 20, "aria-hidden": "true" }),
|
|
917
|
+
/* @__PURE__ */ jsx("span", { className: FilterBar_module_default.chipLabel, children: "List" })
|
|
918
|
+
]
|
|
919
|
+
}
|
|
920
|
+
)
|
|
921
|
+
] }),
|
|
922
|
+
/* @__PURE__ */ jsxs("div", { className: FilterBar_module_default.filterActions, children: [
|
|
923
|
+
/* @__PURE__ */ jsxs("div", { className: FilterBar_module_default.dropdownWrapper, ref: filterRef, children: [
|
|
924
|
+
/* @__PURE__ */ jsxs(
|
|
925
|
+
"button",
|
|
926
|
+
{
|
|
927
|
+
type: "button",
|
|
928
|
+
className: clsx25(FilterBar_module_default.chip, filterValue !== "all" && FilterBar_module_default.active),
|
|
929
|
+
onClick: () => setOpenDropdown(openDropdown === "filter" ? null : "filter"),
|
|
930
|
+
"aria-expanded": openDropdown === "filter",
|
|
931
|
+
children: [
|
|
932
|
+
/* @__PURE__ */ jsx(Icon, { type: "filter", size: 20, "aria-hidden": "true" }),
|
|
933
|
+
!isMobile && /* @__PURE__ */ jsx("span", { className: FilterBar_module_default.chipLabel, children: "Filter" })
|
|
934
|
+
]
|
|
935
|
+
}
|
|
936
|
+
),
|
|
937
|
+
openDropdown === "filter" && /* @__PURE__ */ jsx("div", { className: FilterBar_module_default.dropdownPanel, role: "listbox", "aria-label": "Filter by type", children: FILTER_OPTIONS.map((opt) => /* @__PURE__ */ jsxs(
|
|
938
|
+
"button",
|
|
939
|
+
{
|
|
940
|
+
type: "button",
|
|
941
|
+
role: "option",
|
|
942
|
+
"aria-selected": filterValue === opt.value,
|
|
943
|
+
className: clsx25(
|
|
944
|
+
FilterBar_module_default.dropdownOption,
|
|
945
|
+
filterValue === opt.value && FilterBar_module_default.selected
|
|
946
|
+
),
|
|
947
|
+
onClick: () => {
|
|
948
|
+
onFilterChange(filterValue === opt.value ? "all" : opt.value);
|
|
949
|
+
setOpenDropdown(null);
|
|
950
|
+
},
|
|
951
|
+
children: [
|
|
952
|
+
/* @__PURE__ */ jsx(Icon, { type: opt.icon, size: 20, "aria-hidden": "true" }),
|
|
953
|
+
opt.label
|
|
954
|
+
]
|
|
955
|
+
},
|
|
956
|
+
opt.value
|
|
957
|
+
)) })
|
|
958
|
+
] }),
|
|
959
|
+
/* @__PURE__ */ jsxs("div", { className: FilterBar_module_default.dropdownWrapper, ref: sortRef, children: [
|
|
960
|
+
/* @__PURE__ */ jsxs(
|
|
961
|
+
"button",
|
|
962
|
+
{
|
|
963
|
+
type: "button",
|
|
964
|
+
className: FilterBar_module_default.chip,
|
|
965
|
+
onClick: () => setOpenDropdown(openDropdown === "sort" ? null : "sort"),
|
|
966
|
+
"aria-expanded": openDropdown === "sort",
|
|
967
|
+
children: [
|
|
968
|
+
/* @__PURE__ */ jsx(Icon, { type: "internalFilter", size: 20, "aria-hidden": "true" }),
|
|
969
|
+
!isMobile && /* @__PURE__ */ jsx("span", { className: FilterBar_module_default.chipLabel, children: "Sort" })
|
|
970
|
+
]
|
|
971
|
+
}
|
|
972
|
+
),
|
|
973
|
+
openDropdown === "sort" && /* @__PURE__ */ jsx("div", { className: FilterBar_module_default.dropdownPanel, role: "listbox", "aria-label": "Sort by", children: SORT_OPTIONS.map((opt) => /* @__PURE__ */ jsx(
|
|
974
|
+
"button",
|
|
975
|
+
{
|
|
976
|
+
type: "button",
|
|
977
|
+
role: "option",
|
|
978
|
+
"aria-selected": sortValue === opt.value,
|
|
979
|
+
className: clsx25(
|
|
980
|
+
FilterBar_module_default.dropdownOption,
|
|
981
|
+
sortValue === opt.value && FilterBar_module_default.selected
|
|
982
|
+
),
|
|
983
|
+
onClick: () => {
|
|
984
|
+
onSortChange(opt.value);
|
|
985
|
+
setOpenDropdown(null);
|
|
986
|
+
},
|
|
987
|
+
children: opt.label
|
|
988
|
+
},
|
|
989
|
+
opt.value
|
|
990
|
+
)) })
|
|
991
|
+
] }),
|
|
992
|
+
isMobile ? (
|
|
993
|
+
/* Mobile — popup panel, mirroring the Filter/Sort dropdowns */
|
|
994
|
+
/* @__PURE__ */ jsxs("div", { className: FilterBar_module_default.dropdownWrapper, ref: searchRef, children: [
|
|
995
|
+
/* @__PURE__ */ jsx(
|
|
996
|
+
"button",
|
|
997
|
+
{
|
|
998
|
+
type: "button",
|
|
999
|
+
className: clsx25(FilterBar_module_default.chip, searchValue !== "" && FilterBar_module_default.active),
|
|
1000
|
+
onClick: () => setOpenDropdown(openDropdown === "search" ? null : "search"),
|
|
1001
|
+
"aria-expanded": openDropdown === "search",
|
|
1002
|
+
"aria-label": "Search",
|
|
1003
|
+
children: /* @__PURE__ */ jsx(Icon, { type: "search", size: 20, "aria-hidden": "true" })
|
|
1004
|
+
}
|
|
1005
|
+
),
|
|
1006
|
+
openDropdown === "search" && /* @__PURE__ */ jsxs("div", { className: FilterBar_module_default.searchPanel, children: [
|
|
1007
|
+
/* @__PURE__ */ jsx("span", { className: FilterBar_module_default.searchIconInner, children: /* @__PURE__ */ jsx(Icon, { type: "search", size: 20, "aria-hidden": "true" }) }),
|
|
1008
|
+
/* @__PURE__ */ jsx(
|
|
1009
|
+
"input",
|
|
1010
|
+
{
|
|
1011
|
+
ref: searchInputRef,
|
|
1012
|
+
type: "text",
|
|
1013
|
+
className: FilterBar_module_default.searchInput,
|
|
1014
|
+
placeholder: "Search\u2026",
|
|
1015
|
+
value: searchValue,
|
|
1016
|
+
onChange: (e) => onSearchChange(e.target.value),
|
|
1017
|
+
onKeyDown: (e) => {
|
|
1018
|
+
if (e.key === "Escape") {
|
|
1019
|
+
if (searchValue) clearSearch();
|
|
1020
|
+
else setOpenDropdown(null);
|
|
1021
|
+
}
|
|
1022
|
+
}
|
|
1023
|
+
}
|
|
1024
|
+
),
|
|
1025
|
+
searchValue && /* @__PURE__ */ jsx(
|
|
1026
|
+
"button",
|
|
1027
|
+
{
|
|
1028
|
+
type: "button",
|
|
1029
|
+
className: FilterBar_module_default.searchClear,
|
|
1030
|
+
"aria-label": "Clear search",
|
|
1031
|
+
onClick: clearSearch,
|
|
1032
|
+
children: /* @__PURE__ */ jsx(Icon, { type: "xBlack", size: 16, "aria-hidden": "true" })
|
|
1033
|
+
}
|
|
1034
|
+
)
|
|
1035
|
+
] })
|
|
1036
|
+
] })
|
|
1037
|
+
) : searchState !== "closed" ? (
|
|
1038
|
+
/* Desktop — animated inline expand */
|
|
1039
|
+
/* @__PURE__ */ jsxs(
|
|
1040
|
+
"div",
|
|
1041
|
+
{
|
|
1042
|
+
className: clsx25(
|
|
1043
|
+
FilterBar_module_default.searchExpanded,
|
|
1044
|
+
searchState === "closing" && FilterBar_module_default.searchCollapsing
|
|
1045
|
+
),
|
|
1046
|
+
onAnimationEnd: () => {
|
|
1047
|
+
if (searchState === "closing") setSearchState("closed");
|
|
1048
|
+
},
|
|
1049
|
+
children: [
|
|
1050
|
+
/* @__PURE__ */ jsx("span", { className: FilterBar_module_default.searchIconInner, children: /* @__PURE__ */ jsx(Icon, { type: "search", size: 20, "aria-hidden": "true" }) }),
|
|
1051
|
+
/* @__PURE__ */ jsx(
|
|
1052
|
+
"input",
|
|
1053
|
+
{
|
|
1054
|
+
ref: searchInputRef,
|
|
1055
|
+
type: "text",
|
|
1056
|
+
className: FilterBar_module_default.searchInput,
|
|
1057
|
+
placeholder: "Search\u2026",
|
|
1058
|
+
value: searchValue,
|
|
1059
|
+
onChange: (e) => onSearchChange(e.target.value),
|
|
1060
|
+
onKeyDown: (e) => {
|
|
1061
|
+
if (e.key === "Escape") {
|
|
1062
|
+
if (searchValue) clearSearch();
|
|
1063
|
+
else closeSearch();
|
|
1064
|
+
}
|
|
1065
|
+
},
|
|
1066
|
+
onBlur: () => {
|
|
1067
|
+
if (!searchValue) closeSearch();
|
|
1068
|
+
}
|
|
1069
|
+
}
|
|
1070
|
+
),
|
|
1071
|
+
searchValue && /* @__PURE__ */ jsx(
|
|
1072
|
+
"button",
|
|
1073
|
+
{
|
|
1074
|
+
type: "button",
|
|
1075
|
+
className: FilterBar_module_default.searchClear,
|
|
1076
|
+
"aria-label": "Clear search",
|
|
1077
|
+
onMouseDown: (e) => e.preventDefault(),
|
|
1078
|
+
onClick: clearSearch,
|
|
1079
|
+
children: /* @__PURE__ */ jsx(Icon, { type: "xBlack", size: 16, "aria-hidden": "true" })
|
|
1080
|
+
}
|
|
1081
|
+
)
|
|
1082
|
+
]
|
|
1083
|
+
}
|
|
1084
|
+
)
|
|
1085
|
+
) : /* @__PURE__ */ jsxs("button", { type: "button", className: FilterBar_module_default.chip, onClick: () => setSearchState("open"), children: [
|
|
1086
|
+
/* @__PURE__ */ jsx(Icon, { type: "search", size: 20, "aria-hidden": "true" }),
|
|
1087
|
+
/* @__PURE__ */ jsx("span", { className: FilterBar_module_default.chipLabel, children: "Search" })
|
|
1088
|
+
] })
|
|
1089
|
+
] })
|
|
1090
|
+
] });
|
|
1091
|
+
}
|
|
818
1092
|
var InfoCardTitle = ({ children }) => {
|
|
819
1093
|
return /* @__PURE__ */ jsx(Fragment, { children });
|
|
820
1094
|
};
|
|
@@ -837,9 +1111,9 @@ var InfoCard = ({ className, title, subtitle, icon, badge, children }) => {
|
|
|
837
1111
|
});
|
|
838
1112
|
const titleNode = (_a = slots.title) != null ? _a : title;
|
|
839
1113
|
const subtitleNode = (_b = slots.subtitle) != null ? _b : subtitle;
|
|
840
|
-
return /* @__PURE__ */ jsxs("div", { className:
|
|
1114
|
+
return /* @__PURE__ */ jsxs("div", { className: clsx25(InfoCard_module_default["info-card"], { [InfoCard_module_default.hasIcon]: !!icon }, className), children: [
|
|
841
1115
|
/* @__PURE__ */ jsxs("div", { className: InfoCard_module_default.header, children: [
|
|
842
|
-
icon ? /* @__PURE__ */ jsx(Icon, { type: icon }) : badge ? /* @__PURE__ */ jsx("div", { className:
|
|
1116
|
+
icon ? /* @__PURE__ */ jsx(Icon, { type: icon }) : badge ? /* @__PURE__ */ jsx("div", { className: clsx25(InfoCard_module_default.badge, "h4"), children: badge }) : null,
|
|
843
1117
|
titleNode && /* @__PURE__ */ jsx("div", { className: "h4", children: titleNode })
|
|
844
1118
|
] }),
|
|
845
1119
|
subtitleNode && /* @__PURE__ */ jsx("div", { className: "body", children: subtitleNode })
|
|
@@ -901,7 +1175,7 @@ var Pagination = ({
|
|
|
901
1175
|
setActivePage(page);
|
|
902
1176
|
onPageChange == null ? void 0 : onPageChange(page);
|
|
903
1177
|
};
|
|
904
|
-
return /* @__PURE__ */ jsxs("div", { className:
|
|
1178
|
+
return /* @__PURE__ */ jsxs("div", { className: clsx25(Pagination_module_default.pagination, className), children: [
|
|
905
1179
|
!disableArrows && /* @__PURE__ */ jsx(
|
|
906
1180
|
"button",
|
|
907
1181
|
{
|
|
@@ -918,7 +1192,7 @@ var Pagination = ({
|
|
|
918
1192
|
"button",
|
|
919
1193
|
{
|
|
920
1194
|
onClick: () => goToPage(page),
|
|
921
|
-
className:
|
|
1195
|
+
className: clsx25(Pagination_module_default.page, {
|
|
922
1196
|
[Pagination_module_default.active]: activePage === page,
|
|
923
1197
|
[Pagination_module_default.number]: hasNumber
|
|
924
1198
|
}),
|
|
@@ -954,7 +1228,7 @@ var PracticeCard_module_default = {
|
|
|
954
1228
|
};
|
|
955
1229
|
var PracticeCard = ({ className, title, cta, image }) => {
|
|
956
1230
|
const { url: href, isExternal } = cta != null ? cta : {};
|
|
957
|
-
return /* @__PURE__ */ jsx("div", { className:
|
|
1231
|
+
return /* @__PURE__ */ jsx("div", { className: clsx25(PracticeCard_module_default["practice-card"], className), children: /* @__PURE__ */ jsxs(
|
|
958
1232
|
ConditionalWrapper,
|
|
959
1233
|
__spreadProps(__spreadValues({
|
|
960
1234
|
className: PracticeCard_module_default.wrapper,
|
|
@@ -965,7 +1239,7 @@ var PracticeCard = ({ className, title, cta, image }) => {
|
|
|
965
1239
|
children: [
|
|
966
1240
|
image && /* @__PURE__ */ jsx(Picture, __spreadValues({ className: PracticeCard_module_default.background }, image)),
|
|
967
1241
|
/* @__PURE__ */ jsxs("div", { className: PracticeCard_module_default.container, children: [
|
|
968
|
-
title && /* @__PURE__ */ jsx("div", { className:
|
|
1242
|
+
title && /* @__PURE__ */ jsx("div", { className: clsx25(PracticeCard_module_default.title, "h3"), children: title }),
|
|
969
1243
|
href && /* @__PURE__ */ jsxs("div", { className: PracticeCard_module_default.cta, children: [
|
|
970
1244
|
/* @__PURE__ */ jsx(Icon, { className: PracticeCard_module_default.ctaRest, type: "right" }),
|
|
971
1245
|
/* @__PURE__ */ jsx(Icon, { className: PracticeCard_module_default.ctaHover, type: "tiltedRight" })
|
|
@@ -976,6 +1250,106 @@ var PracticeCard = ({ className, title, cta, image }) => {
|
|
|
976
1250
|
) });
|
|
977
1251
|
};
|
|
978
1252
|
|
|
1253
|
+
// src/components/ResourceCardItem/ResourceCardItem.module.scss
|
|
1254
|
+
var ResourceCardItem_module_default = {
|
|
1255
|
+
cardLink: "ResourceCardItem_module_cardLink",
|
|
1256
|
+
cardGrid: "ResourceCardItem_module_cardGrid",
|
|
1257
|
+
cardBody: "ResourceCardItem_module_cardBody",
|
|
1258
|
+
cardIconTitle: "ResourceCardItem_module_cardIconTitle",
|
|
1259
|
+
cardTitle: "ResourceCardItem_module_cardTitle",
|
|
1260
|
+
cardMeta: "ResourceCardItem_module_cardMeta",
|
|
1261
|
+
cardDate: "ResourceCardItem_module_cardDate",
|
|
1262
|
+
cardList: "ResourceCardItem_module_cardList",
|
|
1263
|
+
cardListLeft: "ResourceCardItem_module_cardListLeft",
|
|
1264
|
+
cardListRight: "ResourceCardItem_module_cardListRight",
|
|
1265
|
+
notificationDot: "ResourceCardItem_module_notificationDot",
|
|
1266
|
+
iconWrapper: "ResourceCardItem_module_iconWrapper"
|
|
1267
|
+
};
|
|
1268
|
+
var ResourceIcon = ({ image, type }) => {
|
|
1269
|
+
if (!image) return null;
|
|
1270
|
+
return /* @__PURE__ */ jsx("div", { className: ResourceCardItem_module_default.iconWrapper, children: /* @__PURE__ */ jsx("img", { src: image, alt: type != null ? type : "", width: 32, height: 32 }) });
|
|
1271
|
+
};
|
|
1272
|
+
var ResourceCardItem = ({ item, view }) => {
|
|
1273
|
+
const hasHref = Boolean(item.href);
|
|
1274
|
+
const linkWrapper = ({ children }) => /* @__PURE__ */ jsx("a", { href: item.href, className: ResourceCardItem_module_default.cardLink, target: "_blank", rel: "noopener noreferrer", children });
|
|
1275
|
+
if (view === "grid") {
|
|
1276
|
+
return /* @__PURE__ */ jsx("article", { className: ResourceCardItem_module_default.cardGrid, children: /* @__PURE__ */ jsxs("div", { className: ResourceCardItem_module_default.cardBody, children: [
|
|
1277
|
+
/* @__PURE__ */ jsx(ConditionalWrapper, { condition: hasHref, wrapper: linkWrapper, children: /* @__PURE__ */ jsxs("div", { className: ResourceCardItem_module_default.cardIconTitle, children: [
|
|
1278
|
+
/* @__PURE__ */ jsx(ResourceIcon, { image: item.image, type: item.type }),
|
|
1279
|
+
/* @__PURE__ */ jsx("span", { className: ResourceCardItem_module_default.cardTitle, children: item.title })
|
|
1280
|
+
] }) }),
|
|
1281
|
+
/* @__PURE__ */ jsxs("div", { className: ResourceCardItem_module_default.cardMeta, children: [
|
|
1282
|
+
/* @__PURE__ */ jsx("span", { className: ResourceCardItem_module_default.cardDate, children: item.date }),
|
|
1283
|
+
item.hasNotification && /* @__PURE__ */ jsx("span", { className: ResourceCardItem_module_default.notificationDot, "aria-label": "New" })
|
|
1284
|
+
] })
|
|
1285
|
+
] }) });
|
|
1286
|
+
}
|
|
1287
|
+
return /* @__PURE__ */ jsxs("article", { className: ResourceCardItem_module_default.cardList, children: [
|
|
1288
|
+
/* @__PURE__ */ jsxs("div", { className: ResourceCardItem_module_default.cardListLeft, children: [
|
|
1289
|
+
item.hasNotification && /* @__PURE__ */ jsx("span", { className: ResourceCardItem_module_default.notificationDot, "aria-label": "New" }),
|
|
1290
|
+
/* @__PURE__ */ jsx("span", { className: ResourceCardItem_module_default.cardDate, children: item.date })
|
|
1291
|
+
] }),
|
|
1292
|
+
/* @__PURE__ */ jsx(ConditionalWrapper, { condition: hasHref, wrapper: linkWrapper, children: /* @__PURE__ */ jsxs("div", { className: ResourceCardItem_module_default.cardListRight, children: [
|
|
1293
|
+
/* @__PURE__ */ jsx(ResourceIcon, { image: item.image, type: item.type }),
|
|
1294
|
+
/* @__PURE__ */ jsx("span", { className: ResourceCardItem_module_default.cardTitle, children: item.title })
|
|
1295
|
+
] }) })
|
|
1296
|
+
] });
|
|
1297
|
+
};
|
|
1298
|
+
|
|
1299
|
+
// src/components/Sidebar/Sidebar.module.scss
|
|
1300
|
+
var Sidebar_module_default = {
|
|
1301
|
+
sidebar: "Sidebar_module_sidebar",
|
|
1302
|
+
sidebarItem: "Sidebar_module_sidebarItem",
|
|
1303
|
+
active: "Sidebar_module_active",
|
|
1304
|
+
sidebarMobile: "Sidebar_module_sidebarMobile",
|
|
1305
|
+
hamburger: "Sidebar_module_hamburger",
|
|
1306
|
+
notificationDot: "Sidebar_module_notificationDot"
|
|
1307
|
+
};
|
|
1308
|
+
var Sidebar = ({
|
|
1309
|
+
categories,
|
|
1310
|
+
isMobile,
|
|
1311
|
+
onToggle,
|
|
1312
|
+
selectedIndex,
|
|
1313
|
+
onSelect
|
|
1314
|
+
}) => {
|
|
1315
|
+
if (isMobile) {
|
|
1316
|
+
return /* @__PURE__ */ jsx("div", { className: Sidebar_module_default.sidebarMobile, children: /* @__PURE__ */ jsx(
|
|
1317
|
+
"button",
|
|
1318
|
+
{
|
|
1319
|
+
type: "button",
|
|
1320
|
+
className: Sidebar_module_default.hamburger,
|
|
1321
|
+
"aria-label": "Open categories",
|
|
1322
|
+
onClick: onToggle,
|
|
1323
|
+
children: /* @__PURE__ */ jsx(Icon, { type: "menuBlack", size: 20, "aria-hidden": "true" })
|
|
1324
|
+
}
|
|
1325
|
+
) });
|
|
1326
|
+
}
|
|
1327
|
+
return /* @__PURE__ */ jsx("nav", { className: Sidebar_module_default.sidebar, "aria-label": "Resource categories", children: /* @__PURE__ */ jsx("ul", { children: categories.map((cat, i) => {
|
|
1328
|
+
var _a;
|
|
1329
|
+
return /* @__PURE__ */ jsxs(
|
|
1330
|
+
"li",
|
|
1331
|
+
{
|
|
1332
|
+
className: clsx25(Sidebar_module_default.sidebarItem, i === selectedIndex && Sidebar_module_default.active),
|
|
1333
|
+
role: "button",
|
|
1334
|
+
tabIndex: 0,
|
|
1335
|
+
"aria-pressed": i === selectedIndex,
|
|
1336
|
+
onClick: () => onSelect(i),
|
|
1337
|
+
onKeyDown: (e) => {
|
|
1338
|
+
if (e.key === "Enter" || e.key === " ") {
|
|
1339
|
+
e.preventDefault();
|
|
1340
|
+
onSelect(i);
|
|
1341
|
+
}
|
|
1342
|
+
},
|
|
1343
|
+
children: [
|
|
1344
|
+
/* @__PURE__ */ jsx("span", { children: cat.label }),
|
|
1345
|
+
cat.hasNotification && /* @__PURE__ */ jsx("span", { className: Sidebar_module_default.notificationDot, "aria-label": "New" })
|
|
1346
|
+
]
|
|
1347
|
+
},
|
|
1348
|
+
(_a = cat.label) != null ? _a : i
|
|
1349
|
+
);
|
|
1350
|
+
}) }) });
|
|
1351
|
+
};
|
|
1352
|
+
|
|
979
1353
|
// src/components/LogoBar/LogoBar.module.scss
|
|
980
1354
|
var LogoBar_module_default = {
|
|
981
1355
|
logoBar: "LogoBar_module_logoBar",
|
|
@@ -985,7 +1359,7 @@ var LogoBar_module_default = {
|
|
|
985
1359
|
};
|
|
986
1360
|
var LogoBar = ({ className, items }) => {
|
|
987
1361
|
if (!items || items.length === 0) return null;
|
|
988
|
-
return /* @__PURE__ */ jsx("div", { className:
|
|
1362
|
+
return /* @__PURE__ */ jsx("div", { className: clsx25(LogoBar_module_default.logoBar, className), children: items.map((item, key) => {
|
|
989
1363
|
return /* @__PURE__ */ jsx(Anchor, { href: item.url, isExternal: item.isExternal, children: /* @__PURE__ */ jsxs("div", { className: LogoBar_module_default.logoWrapper, children: [
|
|
990
1364
|
item.logo && /* @__PURE__ */ jsx(Picture, __spreadValues({ className: LogoBar_module_default.logo }, item.logo)),
|
|
991
1365
|
item.hoverLogo && /* @__PURE__ */ jsx(Picture, __spreadValues({ className: LogoBar_module_default.logoHover }, item.hoverLogo))
|
|
@@ -1071,13 +1445,13 @@ var CardCollection = ({
|
|
|
1071
1445
|
Container,
|
|
1072
1446
|
{
|
|
1073
1447
|
ref: container,
|
|
1074
|
-
className:
|
|
1448
|
+
className: clsx25(CardCollection_module_default["card-collection"], CardCollection_module_default[variant], className),
|
|
1075
1449
|
children: [
|
|
1076
1450
|
/* @__PURE__ */ jsxs("div", { className: CardCollection_module_default.content, children: [
|
|
1077
1451
|
titleNode && /* @__PURE__ */ jsx("h2", { children: titleNode }),
|
|
1078
1452
|
subtitleNode && /* @__PURE__ */ jsx("div", { className: "subheading", children: subtitleNode })
|
|
1079
1453
|
] }),
|
|
1080
|
-
/* @__PURE__ */ jsx("div", { className: CardCollection_module_default.wrapper, children: /* @__PURE__ */ jsxs("div", { className:
|
|
1454
|
+
/* @__PURE__ */ jsx("div", { className: CardCollection_module_default.wrapper, children: /* @__PURE__ */ jsxs("div", { className: clsx25(CardCollection_module_default.cardWrapper, { [CardCollection_module_default["is-expanded"]]: isExpanded }), children: [
|
|
1081
1455
|
visibleCards.map((card, key) => /* @__PURE__ */ jsx(Card2, __spreadValues({ className: CardCollection_module_default.card, variant: theme }, card), key)),
|
|
1082
1456
|
isExamCard && hiddenCards.length > 0 && /* @__PURE__ */ jsx("div", { ref: revealWrapper, className: CardCollection_module_default["reveal-wrapper"], children: /* @__PURE__ */ jsx("div", { className: CardCollection_module_default["reveal-inner"], children: hiddenCards.map((card, key) => /* @__PURE__ */ jsx(
|
|
1083
1457
|
Card2,
|
|
@@ -1178,7 +1552,7 @@ var ContactModule = ({
|
|
|
1178
1552
|
},
|
|
1179
1553
|
{ scope: containerRef, dependencies: [blurred, animateBlur] }
|
|
1180
1554
|
);
|
|
1181
|
-
return /* @__PURE__ */ jsxs("div", { ref: containerRef, className:
|
|
1555
|
+
return /* @__PURE__ */ jsxs("div", { ref: containerRef, className: clsx25(ContactModule_module_default["contact-module"], className), children: [
|
|
1182
1556
|
blurred && /* @__PURE__ */ jsx(
|
|
1183
1557
|
"div",
|
|
1184
1558
|
{
|
|
@@ -1193,8 +1567,8 @@ var ContactModule = ({
|
|
|
1193
1567
|
/* @__PURE__ */ jsxs(Container, { className: ContactModule_module_default.container, children: [
|
|
1194
1568
|
/* @__PURE__ */ jsxs("div", { className: ContactModule_module_default.wrapper, children: [
|
|
1195
1569
|
/* @__PURE__ */ jsxs("div", { className: ContactModule_module_default.content, children: [
|
|
1196
|
-
titleNode && /* @__PURE__ */ jsx("div", { className:
|
|
1197
|
-
subtitleNode && /* @__PURE__ */ jsx("div", { className:
|
|
1570
|
+
titleNode && /* @__PURE__ */ jsx("div", { className: clsx25(ContactModule_module_default.title, "h1"), children: titleNode }),
|
|
1571
|
+
subtitleNode && /* @__PURE__ */ jsx("div", { className: clsx25(ContactModule_module_default.subtitle, "subheading"), children: subtitleNode })
|
|
1198
1572
|
] }),
|
|
1199
1573
|
/* @__PURE__ */ jsx("div", { className: ContactModule_module_default["cta-wrapper"], children: ctas == null ? void 0 : ctas.map((cta, key) => /* @__PURE__ */ jsx(
|
|
1200
1574
|
Button,
|
|
@@ -1255,7 +1629,7 @@ var Footer = ({
|
|
|
1255
1629
|
disclaimer: FooterDisclaimer
|
|
1256
1630
|
});
|
|
1257
1631
|
const titleNode = (_a = slots.disclaimer) != null ? _a : disclaimer;
|
|
1258
|
-
return /* @__PURE__ */ jsx("footer", { className:
|
|
1632
|
+
return /* @__PURE__ */ jsx("footer", { className: clsx25(Footer_module_default.footer, className), children: /* @__PURE__ */ jsxs(Container, { className: Footer_module_default.container, children: [
|
|
1259
1633
|
/* @__PURE__ */ jsxs("div", { className: Footer_module_default.bottom, children: [
|
|
1260
1634
|
/* @__PURE__ */ jsxs("div", { className: Footer_module_default["bottom-left"], children: [
|
|
1261
1635
|
supporters.length > 0 && /* @__PURE__ */ jsx("div", { className: Footer_module_default.supporters, children: /* @__PURE__ */ jsx("div", { className: Footer_module_default["supporters-logos"], children: supporters.map(
|
|
@@ -1271,7 +1645,7 @@ var Footer = ({
|
|
|
1271
1645
|
index
|
|
1272
1646
|
) : /* @__PURE__ */ jsx("div", { className: Footer_module_default["supporter-link-primary"], children: /* @__PURE__ */ jsx(Picture, __spreadValues({}, supporter.image)) }, index)
|
|
1273
1647
|
) }) }),
|
|
1274
|
-
titleNode && /* @__PURE__ */ jsx("div", { className:
|
|
1648
|
+
titleNode && /* @__PURE__ */ jsx("div", { className: clsx25(Footer_module_default.disclaimer, "p"), children: titleNode }),
|
|
1275
1649
|
copyright && /* @__PURE__ */ jsx("p", { className: Footer_module_default.copyright, children: copyright })
|
|
1276
1650
|
] }),
|
|
1277
1651
|
columns.length > 0 && /* @__PURE__ */ jsx("nav", { className: Footer_module_default["bottom-right"], children: columns.map((column, colIndex) => /* @__PURE__ */ jsx("ul", { className: Footer_module_default["nav-list"], children: column.map((link) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(
|
|
@@ -1337,7 +1711,7 @@ var HeroBanner = ({
|
|
|
1337
1711
|
var _a, _b;
|
|
1338
1712
|
const { is } = useViewPort_default();
|
|
1339
1713
|
const isTabletBelow = is("tablet", "below");
|
|
1340
|
-
const
|
|
1714
|
+
const vMainHeroBanner = variant === "mainHeroBanner";
|
|
1341
1715
|
const vBannerPodcast = variant === "bannerPodcast";
|
|
1342
1716
|
const isTitleLogo = (logo == null ? void 0 : logo.variant) === "titleLogo";
|
|
1343
1717
|
const GRADIENT_BANDS = [
|
|
@@ -1352,7 +1726,7 @@ var HeroBanner = ({
|
|
|
1352
1726
|
});
|
|
1353
1727
|
const titleNode = (_a = slots.title) != null ? _a : title;
|
|
1354
1728
|
const subtitleNode = (_b = slots.subtitle) != null ? _b : subtitle;
|
|
1355
|
-
return /* @__PURE__ */ jsxs("div", { className:
|
|
1729
|
+
return /* @__PURE__ */ jsxs("div", { className: clsx25(HeroBanner_module_default.heroBanner, HeroBanner_module_default[variant], className), children: [
|
|
1356
1730
|
/* @__PURE__ */ jsxs("div", { className: HeroBanner_module_default.container, children: [
|
|
1357
1731
|
/* @__PURE__ */ jsxs("div", { className: HeroBanner_module_default.banner, children: [
|
|
1358
1732
|
(titleNode || subtitleNode) && /* @__PURE__ */ jsxs("div", { className: HeroBanner_module_default.text, children: [
|
|
@@ -1362,7 +1736,7 @@ var HeroBanner = ({
|
|
|
1362
1736
|
{
|
|
1363
1737
|
tag: "h2",
|
|
1364
1738
|
promoteToH1,
|
|
1365
|
-
className:
|
|
1739
|
+
className: clsx25(HeroBanner_module_default.title, vBannerPodcast ? "h3" : "h1"),
|
|
1366
1740
|
children: titleNode
|
|
1367
1741
|
}
|
|
1368
1742
|
),
|
|
@@ -1371,7 +1745,7 @@ var HeroBanner = ({
|
|
|
1371
1745
|
{
|
|
1372
1746
|
tag: "div",
|
|
1373
1747
|
promoteToH1: promoteToH1 && !titleNode,
|
|
1374
|
-
className:
|
|
1748
|
+
className: clsx25(HeroBanner_module_default.subtitle, "subheading"),
|
|
1375
1749
|
children: subtitleNode
|
|
1376
1750
|
}
|
|
1377
1751
|
)
|
|
@@ -1382,7 +1756,7 @@ var HeroBanner = ({
|
|
|
1382
1756
|
{
|
|
1383
1757
|
href: cta2.url,
|
|
1384
1758
|
isExternal: cta2.isExternal,
|
|
1385
|
-
variant: key % 2 ?
|
|
1759
|
+
variant: key % 2 ? vMainHeroBanner && !isTabletBelow ? "grey" : "nofill" : "primary",
|
|
1386
1760
|
fullWidth: isTabletBelow,
|
|
1387
1761
|
logo: cta2.logo,
|
|
1388
1762
|
children: cta2.label
|
|
@@ -1398,7 +1772,7 @@ var HeroBanner = ({
|
|
|
1398
1772
|
__spreadValues({
|
|
1399
1773
|
className: HeroBanner_module_default.brandsStrip,
|
|
1400
1774
|
variant: "light",
|
|
1401
|
-
size: isTabletBelow ||
|
|
1775
|
+
size: isTabletBelow || vMainHeroBanner ? void 0 : "small"
|
|
1402
1776
|
}, brands)
|
|
1403
1777
|
),
|
|
1404
1778
|
backgroundImage && !vBannerPodcast && /* @__PURE__ */ jsx(Picture, __spreadValues({ className: HeroBanner_module_default.backgroundImage }, backgroundImage))
|
|
@@ -1448,7 +1822,7 @@ var HeroBannerCarousel = ({
|
|
|
1448
1822
|
const [swiperInstance, setSwiperInstance] = useState(null);
|
|
1449
1823
|
const [activeIndex, setActiveIndex] = useState(0);
|
|
1450
1824
|
if (!items.length) return null;
|
|
1451
|
-
return /* @__PURE__ */ jsx("div", { className:
|
|
1825
|
+
return /* @__PURE__ */ jsx("div", { className: clsx25(HeroBannerCarousel_module_default.heroBannerCarousel, className), children: /* @__PURE__ */ jsxs("div", { className: HeroBannerCarousel_module_default.inner, children: [
|
|
1452
1826
|
/* @__PURE__ */ jsx("div", { className: HeroBannerCarousel_module_default.swiperContainer, children: /* @__PURE__ */ jsx(
|
|
1453
1827
|
Swiper,
|
|
1454
1828
|
{
|
|
@@ -1495,7 +1869,7 @@ var HeroBannerCarousel = ({
|
|
|
1495
1869
|
/* @__PURE__ */ jsx("div", { className: HeroBannerCarousel_module_default.pagination, children: items.map((_, index) => /* @__PURE__ */ jsx(
|
|
1496
1870
|
"button",
|
|
1497
1871
|
{
|
|
1498
|
-
className:
|
|
1872
|
+
className: clsx25(HeroBannerCarousel_module_default.dot, index === activeIndex && HeroBannerCarousel_module_default.dotActive),
|
|
1499
1873
|
onClick: () => swiperInstance == null ? void 0 : swiperInstance.slideTo(index),
|
|
1500
1874
|
"aria-label": `Go to slide ${index + 1}`
|
|
1501
1875
|
},
|
|
@@ -1575,7 +1949,7 @@ var AccordionItem = ({
|
|
|
1575
1949
|
return /* @__PURE__ */ jsxs(
|
|
1576
1950
|
"div",
|
|
1577
1951
|
{
|
|
1578
|
-
className:
|
|
1952
|
+
className: clsx25(
|
|
1579
1953
|
Accordion_module_default.accordionItem,
|
|
1580
1954
|
{
|
|
1581
1955
|
[Accordion_module_default.accordionItemOpen]: isOpen
|
|
@@ -1586,18 +1960,18 @@ var AccordionItem = ({
|
|
|
1586
1960
|
/* @__PURE__ */ jsxs(
|
|
1587
1961
|
"button",
|
|
1588
1962
|
{
|
|
1589
|
-
className:
|
|
1963
|
+
className: clsx25(Accordion_module_default.accordionHeader, {
|
|
1590
1964
|
[Accordion_module_default.accordionHeaderOpen]: isOpen
|
|
1591
1965
|
}),
|
|
1592
1966
|
onClick: handleToggle,
|
|
1593
1967
|
"aria-expanded": isOpen,
|
|
1594
1968
|
"aria-label": `Toggle ${title}`,
|
|
1595
1969
|
children: [
|
|
1596
|
-
/* @__PURE__ */ jsx("div", { className: Accordion_module_default.accordionHeaderLeft, children: /* @__PURE__ */ jsx("span", { className:
|
|
1970
|
+
/* @__PURE__ */ jsx("div", { className: Accordion_module_default.accordionHeaderLeft, children: /* @__PURE__ */ jsx("span", { className: clsx25("body", Accordion_module_default.accordionTitle), children: title }) }),
|
|
1597
1971
|
/* @__PURE__ */ jsx(
|
|
1598
1972
|
"span",
|
|
1599
1973
|
{
|
|
1600
|
-
className:
|
|
1974
|
+
className: clsx25(Accordion_module_default.accordionChevron, {
|
|
1601
1975
|
[Accordion_module_default.accordionChevronOpen]: isOpen
|
|
1602
1976
|
}),
|
|
1603
1977
|
children: isOpen ? /* @__PURE__ */ jsx(Icon, { type: "filledChevronUpBlack", size: 40 }) : /* @__PURE__ */ jsx(Icon, { type: "circleChevronDown", size: 40 })
|
|
@@ -1649,7 +2023,7 @@ var Accordion = ({
|
|
|
1649
2023
|
if (items.length === 0) {
|
|
1650
2024
|
return null;
|
|
1651
2025
|
}
|
|
1652
|
-
return /* @__PURE__ */ jsx("div", { className:
|
|
2026
|
+
return /* @__PURE__ */ jsx("div", { className: clsx25(Accordion_module_default.accordion, className), children: items.map((item) => /* @__PURE__ */ jsx(
|
|
1653
2027
|
AccordionItem,
|
|
1654
2028
|
{
|
|
1655
2029
|
id: item.id,
|
|
@@ -1739,7 +2113,7 @@ var InternalBrandsTab = (props) => {
|
|
|
1739
2113
|
};
|
|
1740
2114
|
})) || [];
|
|
1741
2115
|
}, [tabs]);
|
|
1742
|
-
return /* @__PURE__ */ jsxs(Container, { className:
|
|
2116
|
+
return /* @__PURE__ */ jsxs(Container, { className: clsx25(InternalBrandsTab_module_default.internalBrandsTab, className), children: [
|
|
1743
2117
|
/* @__PURE__ */ jsxs("div", { className: InternalBrandsTab_module_default.textsContainer, children: [
|
|
1744
2118
|
title && /* @__PURE__ */ jsx(Text, { tag: "h2", className: InternalBrandsTab_module_default.title, children: title }),
|
|
1745
2119
|
subTitle && /* @__PURE__ */ jsx("div", { className: InternalBrandsTab_module_default.subTitle, children: subTitle })
|
|
@@ -1755,7 +2129,7 @@ var InternalBrandsTab = (props) => {
|
|
|
1755
2129
|
},
|
|
1756
2130
|
index
|
|
1757
2131
|
)) }),
|
|
1758
|
-
/* @__PURE__ */ jsx("div", { className:
|
|
2132
|
+
/* @__PURE__ */ jsx("div", { className: clsx25(InternalBrandsTab_module_default.contentArea), children: ((_a = tabs == null ? void 0 : tabs[activeIndex]) == null ? void 0 : _a.topContent) && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1759
2133
|
/* @__PURE__ */ jsxs("div", { className: InternalBrandsTab_module_default.topContent, children: [
|
|
1760
2134
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
1761
2135
|
((_b = tabs[activeIndex].topContent) == null ? void 0 : _b.title) && /* @__PURE__ */ jsx("p", { className: InternalBrandsTab_module_default.topContentTitle, children: (_c = tabs[activeIndex].topContent) == null ? void 0 : _c.title }),
|
|
@@ -1846,17 +2220,17 @@ var MiniBanner = ({
|
|
|
1846
2220
|
const pretitleNode = (_a = slots.pretitle) != null ? _a : pretitle;
|
|
1847
2221
|
const titleNode = (_b = slots.title) != null ? _b : title;
|
|
1848
2222
|
const subtitleNode = (_c = slots.subtitle) != null ? _c : subtitle;
|
|
1849
|
-
return /* @__PURE__ */ jsxs("div", { className:
|
|
2223
|
+
return /* @__PURE__ */ jsxs("div", { className: clsx25(MiniBanner_module_default.minibanner, MiniBanner_module_default[variant], className), children: [
|
|
1850
2224
|
((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__ */ jsx(Picture, __spreadValues({ className: MiniBanner_module_default.background }, background)),
|
|
1851
2225
|
/* @__PURE__ */ jsxs("div", { className: MiniBanner_module_default.wrapper, children: [
|
|
1852
2226
|
/* @__PURE__ */ jsxs("div", { className: MiniBanner_module_default.textContainer, children: [
|
|
1853
2227
|
(logo == null ? void 0 : logo.src) && /* @__PURE__ */ jsx(Picture, __spreadValues({ className: MiniBanner_module_default.logo }, logo)),
|
|
1854
|
-
pretitleNode && /* @__PURE__ */ jsx("div", { className:
|
|
1855
|
-
/* @__PURE__ */ jsx("div", { className: MiniBanner_module_default.headingWrapper, children: titleNode && /* @__PURE__ */ jsx("div", { className:
|
|
2228
|
+
pretitleNode && /* @__PURE__ */ jsx("div", { className: clsx25(MiniBanner_module_default.pretitle, "small"), children: pretitleNode }),
|
|
2229
|
+
/* @__PURE__ */ jsx("div", { className: MiniBanner_module_default.headingWrapper, children: titleNode && /* @__PURE__ */ jsx("div", { className: clsx25(MiniBanner_module_default.title, isMiniBannerTextLeft ? "h1" : "h4"), children: titleNode }) }),
|
|
1856
2230
|
subtitleNode && /* @__PURE__ */ jsx(
|
|
1857
2231
|
"div",
|
|
1858
2232
|
{
|
|
1859
|
-
className:
|
|
2233
|
+
className: clsx25(MiniBanner_module_default.title, {
|
|
1860
2234
|
subheading: isMiniBannerNoBG || isMiniBannerTextLeft,
|
|
1861
2235
|
h1: !isMiniBannerNoBG && !isMiniBannerTextLeft
|
|
1862
2236
|
}),
|
|
@@ -1927,14 +2301,14 @@ var MiniSectionCta = ({
|
|
|
1927
2301
|
return /* @__PURE__ */ jsx(
|
|
1928
2302
|
"div",
|
|
1929
2303
|
{
|
|
1930
|
-
className:
|
|
2304
|
+
className: clsx25(MiniSectionCta_module_default.miniSectionCta, MiniSectionCta_module_default[variant], theme && MiniSectionCta_module_default[theme], className),
|
|
1931
2305
|
children: /* @__PURE__ */ jsx(Container, { children: /* @__PURE__ */ jsxs("div", { className: MiniSectionCta_module_default.wrapper, children: [
|
|
1932
2306
|
/* @__PURE__ */ jsxs("div", { className: MiniSectionCta_module_default.col, children: [
|
|
1933
2307
|
titleNode && /* @__PURE__ */ jsx("h2", { className: variant === "BgColorBlack" || variant === "BgColorGrey" ? "h3" : "h2", children: titleNode }),
|
|
1934
2308
|
subtitleNode && /* @__PURE__ */ jsx(
|
|
1935
2309
|
"div",
|
|
1936
2310
|
{
|
|
1937
|
-
className:
|
|
2311
|
+
className: clsx25(MiniSectionCta_module_default.subtitle, variant === "infoCallout" ? "h4" : "subheading"),
|
|
1938
2312
|
children: subtitleNode
|
|
1939
2313
|
}
|
|
1940
2314
|
)
|
|
@@ -1999,7 +2373,7 @@ var PracticePathCards = ({
|
|
|
1999
2373
|
const titleNode = (_a = slots.title) != null ? _a : title;
|
|
2000
2374
|
const subtitleNode = (_b = slots.subtitle) != null ? _b : subtitle;
|
|
2001
2375
|
const footerNode = (_c = slots.footer) != null ? _c : footer;
|
|
2002
|
-
return /* @__PURE__ */ jsx("div", { className:
|
|
2376
|
+
return /* @__PURE__ */ jsx("div", { className: clsx25(PracticePathCards_module_default["practice-path-cards"], className), children: /* @__PURE__ */ jsxs(Container, { className: PracticePathCards_module_default.container, children: [
|
|
2003
2377
|
/* @__PURE__ */ jsxs("div", { className: PracticePathCards_module_default.wrapper, children: [
|
|
2004
2378
|
/* @__PURE__ */ jsxs("div", { className: PracticePathCards_module_default.content, children: [
|
|
2005
2379
|
titleNode && /* @__PURE__ */ jsx("h2", { children: titleNode }),
|
|
@@ -2053,8 +2427,8 @@ var Teaser5050With3Text = ({
|
|
|
2053
2427
|
title: Teaser5050With3TextTitle
|
|
2054
2428
|
});
|
|
2055
2429
|
const titleNode = (_a = slots.title) != null ? _a : title;
|
|
2056
|
-
return /* @__PURE__ */ jsx("div", { className:
|
|
2057
|
-
titleNode && /* @__PURE__ */ jsx("div", { className:
|
|
2430
|
+
return /* @__PURE__ */ jsx("div", { className: clsx25(Teaser5050With3Text_module_default["teaser5050-3text"], Teaser5050With3Text_module_default[variant], className), children: /* @__PURE__ */ jsxs(Container, { className: Teaser5050With3Text_module_default.container, children: [
|
|
2431
|
+
titleNode && /* @__PURE__ */ jsx("div", { className: clsx25(Teaser5050With3Text_module_default.title, "h3"), children: titleNode }),
|
|
2058
2432
|
/* @__PURE__ */ jsxs("div", { className: Teaser5050With3Text_module_default.content, children: [
|
|
2059
2433
|
/* @__PURE__ */ jsx("div", { className: Teaser5050With3Text_module_default.cards, children: cards == null ? void 0 : cards.map((card, key) => /* @__PURE__ */ jsx(InfoCard2, __spreadValues({}, card), key)) }),
|
|
2060
2434
|
image && /* @__PURE__ */ jsx(Picture, __spreadValues({ className: Teaser5050With3Text_module_default.image }, image))
|
|
@@ -2104,12 +2478,12 @@ var Teaser5050WithCta = ({
|
|
|
2104
2478
|
return /* @__PURE__ */ jsx(
|
|
2105
2479
|
"div",
|
|
2106
2480
|
{
|
|
2107
|
-
className:
|
|
2481
|
+
className: clsx25(Teaser5050WithCta_module_default.teaser5050, Teaser5050WithCta_module_default[variant], className),
|
|
2108
2482
|
style: { backgroundColor: bgColor ? bgColor : "#ffffff" },
|
|
2109
2483
|
children: /* @__PURE__ */ jsxs(Container, { className: Teaser5050WithCta_module_default.container, children: [
|
|
2110
2484
|
/* @__PURE__ */ jsxs("div", { className: Teaser5050WithCta_module_default.wrapper, children: [
|
|
2111
2485
|
/* @__PURE__ */ jsxs("div", { className: Teaser5050WithCta_module_default.content, children: [
|
|
2112
|
-
titleNode && /* @__PURE__ */ jsx("div", { className:
|
|
2486
|
+
titleNode && /* @__PURE__ */ jsx("div", { className: clsx25(Teaser5050WithCta_module_default.title, "h3"), children: titleNode }),
|
|
2113
2487
|
subtitleNode && /* @__PURE__ */ jsx("div", { className: "subheading", children: subtitleNode })
|
|
2114
2488
|
] }),
|
|
2115
2489
|
(ctas == null ? void 0 : ctas.length) && /* @__PURE__ */ jsx("div", { className: Teaser5050WithCta_module_default.ctaWrapper, children: ctas.map((cta, key) => /* @__PURE__ */ jsx(
|
|
@@ -2173,7 +2547,7 @@ var UpcomingEventCard = ({
|
|
|
2173
2547
|
return /* @__PURE__ */ jsxs(
|
|
2174
2548
|
"article",
|
|
2175
2549
|
{
|
|
2176
|
-
className:
|
|
2550
|
+
className: clsx25(
|
|
2177
2551
|
"card",
|
|
2178
2552
|
UpcomingEventCard_module_default["event-card"],
|
|
2179
2553
|
UpcomingEventCard_module_default[direction],
|
|
@@ -2181,26 +2555,26 @@ var UpcomingEventCard = ({
|
|
|
2181
2555
|
className
|
|
2182
2556
|
),
|
|
2183
2557
|
children: [
|
|
2184
|
-
/* @__PURE__ */ jsxs("div", { className:
|
|
2185
|
-
showImage && image && /* @__PURE__ */ jsx(Picture, __spreadProps(__spreadValues({}, image), { className:
|
|
2558
|
+
/* @__PURE__ */ jsxs("div", { className: clsx25("card-content", UpcomingEventCard_module_default["event-card-content"]), children: [
|
|
2559
|
+
showImage && image && /* @__PURE__ */ jsx(Picture, __spreadProps(__spreadValues({}, image), { className: clsx25("card-image", UpcomingEventCard_module_default["event-card-image"]) })),
|
|
2186
2560
|
/* @__PURE__ */ jsxs(
|
|
2187
2561
|
"div",
|
|
2188
2562
|
{
|
|
2189
|
-
className:
|
|
2563
|
+
className: clsx25(
|
|
2190
2564
|
"card-text-content",
|
|
2191
2565
|
UpcomingEventCard_module_default["event-card-text-content"],
|
|
2192
2566
|
(!showImage || !hasImage) && UpcomingEventCard_module_default["event-card-show-image"]
|
|
2193
2567
|
),
|
|
2194
2568
|
children: [
|
|
2195
2569
|
/* @__PURE__ */ jsx("span", { className: UpcomingEventCard_module_default.date, children: date }),
|
|
2196
|
-
title && /* @__PURE__ */ jsx("h3", { className:
|
|
2570
|
+
title && /* @__PURE__ */ jsx("h3", { className: clsx25("card-text-title"), children: title }),
|
|
2197
2571
|
location && /* @__PURE__ */ jsx("span", { className: UpcomingEventCard_module_default.location, children: location }),
|
|
2198
|
-
description && /* @__PURE__ */ jsx("div", { className:
|
|
2572
|
+
description && /* @__PURE__ */ jsx("div", { className: clsx25("card-text-description", UpcomingEventCard_module_default.description), children: description }),
|
|
2199
2573
|
cta && cta.url && /* @__PURE__ */ jsx(
|
|
2200
2574
|
Button,
|
|
2201
2575
|
{
|
|
2202
2576
|
variant: "secondary",
|
|
2203
|
-
className:
|
|
2577
|
+
className: clsx25(
|
|
2204
2578
|
"card-cta",
|
|
2205
2579
|
UpcomingEventCard_module_default["event-card-cta"],
|
|
2206
2580
|
!hasCTAandImage && UpcomingEventCard_module_default.hidden
|
|
@@ -2219,12 +2593,12 @@ var UpcomingEventCard = ({
|
|
|
2219
2593
|
cta && cta.url && /* @__PURE__ */ jsx(
|
|
2220
2594
|
"div",
|
|
2221
2595
|
{
|
|
2222
|
-
className:
|
|
2596
|
+
className: clsx25("card-footer", UpcomingEventCard_module_default["event-card-footer"], hasImage && UpcomingEventCard_module_default.hidden),
|
|
2223
2597
|
children: /* @__PURE__ */ jsx(
|
|
2224
2598
|
Button,
|
|
2225
2599
|
{
|
|
2226
2600
|
variant: "secondary",
|
|
2227
|
-
className:
|
|
2601
|
+
className: clsx25("card-cta", UpcomingEventCard_module_default["event-card-cta"]),
|
|
2228
2602
|
fullWidth: isBelowMobile,
|
|
2229
2603
|
href: cta.url,
|
|
2230
2604
|
icon: cta.icon,
|
|
@@ -2261,7 +2635,7 @@ var Carousel = (_a) => {
|
|
|
2261
2635
|
},
|
|
2262
2636
|
role: "region",
|
|
2263
2637
|
"aria-label": ariaLabel,
|
|
2264
|
-
className:
|
|
2638
|
+
className: clsx25(Carousel_module_default.carousel, className),
|
|
2265
2639
|
spaceBetween: 0,
|
|
2266
2640
|
slidesPerView: "auto",
|
|
2267
2641
|
modules: [FreeMode, A11y],
|
|
@@ -2271,7 +2645,7 @@ var Carousel = (_a) => {
|
|
|
2271
2645
|
children: slides.map((slide, index) => /* @__PURE__ */ jsx(
|
|
2272
2646
|
SwiperSlide,
|
|
2273
2647
|
{
|
|
2274
|
-
className:
|
|
2648
|
+
className: clsx25(Carousel_module_default["carousel-item"], props.slideClass),
|
|
2275
2649
|
children: slide
|
|
2276
2650
|
},
|
|
2277
2651
|
index
|
|
@@ -2321,13 +2695,13 @@ var EventList = ({
|
|
|
2321
2695
|
return /* @__PURE__ */ jsx(
|
|
2322
2696
|
"div",
|
|
2323
2697
|
{
|
|
2324
|
-
className:
|
|
2698
|
+
className: clsx25("event-list-module", EventList_module_default["event-list-module"], className),
|
|
2325
2699
|
style: {
|
|
2326
2700
|
backgroundColor
|
|
2327
2701
|
},
|
|
2328
|
-
children: /* @__PURE__ */ jsxs(Container, { className:
|
|
2702
|
+
children: /* @__PURE__ */ jsxs(Container, { className: clsx25(EventList_module_default["event-list-container"]), children: [
|
|
2329
2703
|
/* @__PURE__ */ jsxs("div", { className: EventList_module_default["event-list-header-container"], children: [
|
|
2330
|
-
titleNode && /* @__PURE__ */ jsx("h2", { className:
|
|
2704
|
+
titleNode && /* @__PURE__ */ jsx("h2", { className: clsx25(EventList_module_default["event-list-title"]), children: titleNode }),
|
|
2331
2705
|
cta && cta.url && /* @__PURE__ */ jsx(
|
|
2332
2706
|
Button,
|
|
2333
2707
|
{
|
|
@@ -2344,7 +2718,7 @@ var EventList = ({
|
|
|
2344
2718
|
Carousel,
|
|
2345
2719
|
{
|
|
2346
2720
|
"aria-label": "Upcoming events",
|
|
2347
|
-
wrapperClass:
|
|
2721
|
+
wrapperClass: clsx25(EventList_module_default["carousel-wrapper"], EventList_module_default[variant]),
|
|
2348
2722
|
slideClass: EventList_module_default["carousel-list-item"],
|
|
2349
2723
|
spaceBetween: 16,
|
|
2350
2724
|
slides: items.map((item) => {
|
|
@@ -2352,7 +2726,7 @@ var EventList = ({
|
|
|
2352
2726
|
return /* @__PURE__ */ jsx(
|
|
2353
2727
|
UpcomingEventCard,
|
|
2354
2728
|
__spreadValues({
|
|
2355
|
-
className:
|
|
2729
|
+
className: clsx25(EventList_module_default["event-card"]),
|
|
2356
2730
|
direction: "vertical",
|
|
2357
2731
|
showImage: false
|
|
2358
2732
|
}, item),
|
|
@@ -2365,17 +2739,17 @@ var EventList = ({
|
|
|
2365
2739
|
"ul",
|
|
2366
2740
|
{
|
|
2367
2741
|
"aria-label": "Upcoming events",
|
|
2368
|
-
className:
|
|
2742
|
+
className: clsx25(EventList_module_default["event-list-wrapper"], EventList_module_default["horizontal"], EventList_module_default[variant]),
|
|
2369
2743
|
children: items == null ? void 0 : items.map((item, index) => {
|
|
2370
2744
|
var _a2, _b, _c;
|
|
2371
2745
|
return /* @__PURE__ */ jsx(
|
|
2372
2746
|
"li",
|
|
2373
2747
|
{
|
|
2374
|
-
className:
|
|
2748
|
+
className: clsx25(EventList_module_default["card-list-item"]),
|
|
2375
2749
|
children: /* @__PURE__ */ jsx(
|
|
2376
2750
|
UpcomingEventCard,
|
|
2377
2751
|
__spreadProps(__spreadValues({}, item), {
|
|
2378
|
-
className:
|
|
2752
|
+
className: clsx25(EventList_module_default["card-item"]),
|
|
2379
2753
|
showImage: false,
|
|
2380
2754
|
direction: "vertical"
|
|
2381
2755
|
})
|
|
@@ -2390,7 +2764,7 @@ var EventList = ({
|
|
|
2390
2764
|
"ul",
|
|
2391
2765
|
{
|
|
2392
2766
|
"aria-label": "Upcoming events",
|
|
2393
|
-
className:
|
|
2767
|
+
className: clsx25(EventList_module_default["event-list-wrapper"], EventList_module_default[listDirection]),
|
|
2394
2768
|
children: items == null ? void 0 : items.map((item, index) => {
|
|
2395
2769
|
var _a2, _b, _c;
|
|
2396
2770
|
return /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(UpcomingEventCard, __spreadProps(__spreadValues({}, item), { direction: cardDirection })) }, (_c = (_b = (_a2 = item.title) != null ? _a2 : item.date) != null ? _b : item.location) != null ? _c : index);
|
|
@@ -2437,9 +2811,9 @@ var TextEvent = (props) => {
|
|
|
2437
2811
|
});
|
|
2438
2812
|
const titleNode = (_a = slots.title) != null ? _a : title;
|
|
2439
2813
|
const richTextNode = (_b = slots.richText) != null ? _b : richText;
|
|
2440
|
-
return /* @__PURE__ */ jsxs(Container, { className:
|
|
2814
|
+
return /* @__PURE__ */ jsxs(Container, { className: clsx25(TextEvent_module_default.textEvent, className), children: [
|
|
2441
2815
|
/* @__PURE__ */ jsx(Text, { tag: "h2", className: TextEvent_module_default.title, children: titleNode }),
|
|
2442
|
-
/* @__PURE__ */ jsx("div", { className:
|
|
2816
|
+
/* @__PURE__ */ jsx("div", { className: clsx25(TextEvent_module_default.richText, TextEvent_module_default[variant != null ? variant : ""]), children: richTextNode })
|
|
2443
2817
|
] });
|
|
2444
2818
|
};
|
|
2445
2819
|
|
|
@@ -2470,7 +2844,7 @@ var TextBody = (props) => {
|
|
|
2470
2844
|
});
|
|
2471
2845
|
const titleNode = (_a = slots.title) != null ? _a : title;
|
|
2472
2846
|
const bodyNode = (_b = slots.body) != null ? _b : body;
|
|
2473
|
-
return /* @__PURE__ */ jsxs(Container, { className:
|
|
2847
|
+
return /* @__PURE__ */ jsxs(Container, { className: clsx25(TextBody_module_default.textBody, className), children: [
|
|
2474
2848
|
titleNode && /* @__PURE__ */ jsx(Text, { tag: "h2", className: TextBody_module_default.title, children: titleNode }),
|
|
2475
2849
|
/* @__PURE__ */ jsx("div", { className: TextBody_module_default.body, children: bodyNode })
|
|
2476
2850
|
] });
|
|
@@ -2513,7 +2887,7 @@ var TextCenterCtaInBottom = ({
|
|
|
2513
2887
|
});
|
|
2514
2888
|
const titleNode = (_a = slots.title) != null ? _a : title;
|
|
2515
2889
|
const subtitleNode = (_b = slots.subtitle) != null ? _b : subtitle;
|
|
2516
|
-
return /* @__PURE__ */ jsx("div", { className:
|
|
2890
|
+
return /* @__PURE__ */ jsx("div", { className: clsx25(TextCenterCtaInBottom_module_default.textCenterCta, className), children: /* @__PURE__ */ jsxs(Container, { className: TextCenterCtaInBottom_module_default.container, children: [
|
|
2517
2891
|
/* @__PURE__ */ jsxs("div", { className: TextCenterCtaInBottom_module_default.content, children: [
|
|
2518
2892
|
titleNode && /* @__PURE__ */ jsx("div", { className: TextCenterCtaInBottom_module_default.title, children: titleNode }),
|
|
2519
2893
|
subtitleNode && /* @__PURE__ */ jsx("div", { className: TextCenterCtaInBottom_module_default.subtitle, children: subtitleNode })
|
|
@@ -2521,7 +2895,7 @@ var TextCenterCtaInBottom = ({
|
|
|
2521
2895
|
!!(ctas == null ? void 0 : ctas.length) && /* @__PURE__ */ jsx(
|
|
2522
2896
|
"div",
|
|
2523
2897
|
{
|
|
2524
|
-
className:
|
|
2898
|
+
className: clsx25(
|
|
2525
2899
|
TextCenterCtaInBottom_module_default.ctaWrapper,
|
|
2526
2900
|
ctas.every((cta) => !cta.label && cta.logo) && TextCenterCtaInBottom_module_default.iconOnly
|
|
2527
2901
|
),
|
|
@@ -2551,290 +2925,21 @@ var TextCenterCtaInBottom2 = Object.assign(TextCenterCtaInBottom, {
|
|
|
2551
2925
|
// src/widgets/ResourcesGridList/ResourcesGridList.module.scss
|
|
2552
2926
|
var ResourcesGridList_module_default = {
|
|
2553
2927
|
widget: "ResourcesGridList_module_widget",
|
|
2554
|
-
filterBar: "ResourcesGridList_module_filterBar",
|
|
2555
|
-
viewToggle: "ResourcesGridList_module_viewToggle",
|
|
2556
|
-
filterActions: "ResourcesGridList_module_filterActions",
|
|
2557
|
-
chip: "ResourcesGridList_module_chip",
|
|
2558
|
-
active: "ResourcesGridList_module_active",
|
|
2559
|
-
chipLabel: "ResourcesGridList_module_chipLabel",
|
|
2560
|
-
dropdownWrapper: "ResourcesGridList_module_dropdownWrapper",
|
|
2561
|
-
searchExpanded: "ResourcesGridList_module_searchExpanded",
|
|
2562
|
-
searchExpand: "ResourcesGridList_module_searchExpand",
|
|
2563
|
-
searchCollapsing: "ResourcesGridList_module_searchCollapsing",
|
|
2564
|
-
searchCollapse: "ResourcesGridList_module_searchCollapse",
|
|
2565
|
-
searchIconInner: "ResourcesGridList_module_searchIconInner",
|
|
2566
|
-
searchInput: "ResourcesGridList_module_searchInput",
|
|
2567
|
-
dropdownPanel: "ResourcesGridList_module_dropdownPanel",
|
|
2568
|
-
dropdownOption: "ResourcesGridList_module_dropdownOption",
|
|
2569
|
-
selected: "ResourcesGridList_module_selected",
|
|
2570
2928
|
content: "ResourcesGridList_module_content",
|
|
2571
2929
|
mobileSidebarOverlay: "ResourcesGridList_module_mobileSidebarOverlay",
|
|
2572
2930
|
mobileSidebarOverlayOpen: "ResourcesGridList_module_mobileSidebarOverlayOpen",
|
|
2573
2931
|
mobileCategoriesPanel: "ResourcesGridList_module_mobileCategoriesPanel",
|
|
2574
2932
|
mobileCategoriesList: "ResourcesGridList_module_mobileCategoriesList",
|
|
2575
2933
|
mobileSidebarItem: "ResourcesGridList_module_mobileSidebarItem",
|
|
2934
|
+
active: "ResourcesGridList_module_active",
|
|
2576
2935
|
mobileSidebarCloseColumn: "ResourcesGridList_module_mobileSidebarCloseColumn",
|
|
2577
|
-
sidebar: "ResourcesGridList_module_sidebar",
|
|
2578
|
-
sidebarItem: "ResourcesGridList_module_sidebarItem",
|
|
2579
|
-
sidebarMobile: "ResourcesGridList_module_sidebarMobile",
|
|
2580
2936
|
hamburger: "ResourcesGridList_module_hamburger",
|
|
2581
2937
|
cardsArea: "ResourcesGridList_module_cardsArea",
|
|
2582
2938
|
grid: "ResourcesGridList_module_grid",
|
|
2583
2939
|
list: "ResourcesGridList_module_list",
|
|
2584
|
-
|
|
2585
|
-
cardBody: "ResourcesGridList_module_cardBody",
|
|
2586
|
-
cardIconTitle: "ResourcesGridList_module_cardIconTitle",
|
|
2587
|
-
cardTitle: "ResourcesGridList_module_cardTitle",
|
|
2588
|
-
cardMeta: "ResourcesGridList_module_cardMeta",
|
|
2589
|
-
cardDate: "ResourcesGridList_module_cardDate",
|
|
2590
|
-
cardList: "ResourcesGridList_module_cardList",
|
|
2591
|
-
cardListLeft: "ResourcesGridList_module_cardListLeft",
|
|
2592
|
-
cardListRight: "ResourcesGridList_module_cardListRight",
|
|
2593
|
-
notificationDot: "ResourcesGridList_module_notificationDot",
|
|
2594
|
-
iconWrapper: "ResourcesGridList_module_iconWrapper",
|
|
2595
|
-
pagination: "ResourcesGridList_module_pagination",
|
|
2596
|
-
pageArrow: "ResourcesGridList_module_pageArrow",
|
|
2597
|
-
pageDotActive: "ResourcesGridList_module_pageDotActive",
|
|
2598
|
-
pageDot: "ResourcesGridList_module_pageDot"
|
|
2940
|
+
notificationDot: "ResourcesGridList_module_notificationDot"
|
|
2599
2941
|
};
|
|
2600
|
-
var
|
|
2601
|
-
{ value: "link", label: "Link", icon: "externalLink" },
|
|
2602
|
-
{ value: "pdf", label: "PDF", icon: "pdf" }
|
|
2603
|
-
];
|
|
2604
|
-
var SORT_OPTIONS = [
|
|
2605
|
-
{ value: "latest", label: "Latest" },
|
|
2606
|
-
{ value: "oldest", label: "Oldest" },
|
|
2607
|
-
{ value: "az", label: "A \u2192 Z" },
|
|
2608
|
-
{ value: "za", label: "Z \u2192 A" }
|
|
2609
|
-
];
|
|
2610
|
-
function FilterBar({
|
|
2611
|
-
view,
|
|
2612
|
-
onViewChange,
|
|
2613
|
-
isMobile,
|
|
2614
|
-
filterValue,
|
|
2615
|
-
onFilterChange,
|
|
2616
|
-
sortValue,
|
|
2617
|
-
onSortChange
|
|
2618
|
-
}) {
|
|
2619
|
-
const [openDropdown, setOpenDropdown] = useState(null);
|
|
2620
|
-
const [searchState, setSearchState] = useState("closed");
|
|
2621
|
-
const [searchQuery, setSearchQuery] = useState("");
|
|
2622
|
-
const filterRef = useRef(null);
|
|
2623
|
-
const sortRef = useRef(null);
|
|
2624
|
-
const searchInputRef = useRef(null);
|
|
2625
|
-
const closeSearch = () => {
|
|
2626
|
-
setSearchState("closing");
|
|
2627
|
-
setSearchQuery("");
|
|
2628
|
-
};
|
|
2629
|
-
useEffect(() => {
|
|
2630
|
-
const handleMouseDown = (e) => {
|
|
2631
|
-
var _a, _b;
|
|
2632
|
-
const target = e.target;
|
|
2633
|
-
if (((_a = filterRef.current) == null ? void 0 : _a.contains(target)) || ((_b = sortRef.current) == null ? void 0 : _b.contains(target))) return;
|
|
2634
|
-
setOpenDropdown(null);
|
|
2635
|
-
};
|
|
2636
|
-
document.addEventListener("mousedown", handleMouseDown);
|
|
2637
|
-
return () => document.removeEventListener("mousedown", handleMouseDown);
|
|
2638
|
-
}, []);
|
|
2639
|
-
useEffect(() => {
|
|
2640
|
-
var _a;
|
|
2641
|
-
if (searchState === "open") (_a = searchInputRef.current) == null ? void 0 : _a.focus();
|
|
2642
|
-
}, [searchState]);
|
|
2643
|
-
return /* @__PURE__ */ jsxs("div", { className: ResourcesGridList_module_default.filterBar, children: [
|
|
2644
|
-
/* @__PURE__ */ jsxs("div", { className: ResourcesGridList_module_default.viewToggle, children: [
|
|
2645
|
-
/* @__PURE__ */ jsxs(
|
|
2646
|
-
"button",
|
|
2647
|
-
{
|
|
2648
|
-
type: "button",
|
|
2649
|
-
className: clsx23(ResourcesGridList_module_default.chip, view === "grid" && ResourcesGridList_module_default.active),
|
|
2650
|
-
onClick: () => onViewChange("grid"),
|
|
2651
|
-
"aria-pressed": view === "grid",
|
|
2652
|
-
children: [
|
|
2653
|
-
/* @__PURE__ */ jsx(Icon, { type: "grid", size: 20, "aria-hidden": "true" }),
|
|
2654
|
-
/* @__PURE__ */ jsx("span", { className: ResourcesGridList_module_default.chipLabel, children: "Grid" })
|
|
2655
|
-
]
|
|
2656
|
-
}
|
|
2657
|
-
),
|
|
2658
|
-
/* @__PURE__ */ jsxs(
|
|
2659
|
-
"button",
|
|
2660
|
-
{
|
|
2661
|
-
type: "button",
|
|
2662
|
-
className: clsx23(ResourcesGridList_module_default.chip, view === "list" && ResourcesGridList_module_default.active),
|
|
2663
|
-
onClick: () => onViewChange("list"),
|
|
2664
|
-
"aria-pressed": view === "list",
|
|
2665
|
-
children: [
|
|
2666
|
-
/* @__PURE__ */ jsx(Icon, { type: "list", size: 20, "aria-hidden": "true" }),
|
|
2667
|
-
/* @__PURE__ */ jsx("span", { className: ResourcesGridList_module_default.chipLabel, children: "List" })
|
|
2668
|
-
]
|
|
2669
|
-
}
|
|
2670
|
-
)
|
|
2671
|
-
] }),
|
|
2672
|
-
/* @__PURE__ */ jsxs("div", { className: ResourcesGridList_module_default.filterActions, children: [
|
|
2673
|
-
/* @__PURE__ */ jsxs("div", { className: ResourcesGridList_module_default.dropdownWrapper, ref: filterRef, children: [
|
|
2674
|
-
/* @__PURE__ */ jsxs(
|
|
2675
|
-
"button",
|
|
2676
|
-
{
|
|
2677
|
-
type: "button",
|
|
2678
|
-
className: clsx23(ResourcesGridList_module_default.chip, filterValue !== "all" && ResourcesGridList_module_default.active),
|
|
2679
|
-
onClick: () => setOpenDropdown(openDropdown === "filter" ? null : "filter"),
|
|
2680
|
-
"aria-expanded": openDropdown === "filter",
|
|
2681
|
-
children: [
|
|
2682
|
-
/* @__PURE__ */ jsx(Icon, { type: "filter", size: 20, "aria-hidden": "true" }),
|
|
2683
|
-
!isMobile && /* @__PURE__ */ jsx("span", { className: ResourcesGridList_module_default.chipLabel, children: "Filter" })
|
|
2684
|
-
]
|
|
2685
|
-
}
|
|
2686
|
-
),
|
|
2687
|
-
openDropdown === "filter" && /* @__PURE__ */ jsx("div", { className: ResourcesGridList_module_default.dropdownPanel, role: "listbox", "aria-label": "Filter by type", children: FILTER_OPTIONS.map((opt) => /* @__PURE__ */ jsxs(
|
|
2688
|
-
"button",
|
|
2689
|
-
{
|
|
2690
|
-
type: "button",
|
|
2691
|
-
role: "option",
|
|
2692
|
-
"aria-selected": filterValue === opt.value,
|
|
2693
|
-
className: clsx23(
|
|
2694
|
-
ResourcesGridList_module_default.dropdownOption,
|
|
2695
|
-
filterValue === opt.value && ResourcesGridList_module_default.selected
|
|
2696
|
-
),
|
|
2697
|
-
onClick: () => {
|
|
2698
|
-
onFilterChange(filterValue === opt.value ? "all" : opt.value);
|
|
2699
|
-
setOpenDropdown(null);
|
|
2700
|
-
},
|
|
2701
|
-
children: [
|
|
2702
|
-
/* @__PURE__ */ jsx(Icon, { type: opt.icon, size: 20, "aria-hidden": "true" }),
|
|
2703
|
-
opt.label
|
|
2704
|
-
]
|
|
2705
|
-
},
|
|
2706
|
-
opt.value
|
|
2707
|
-
)) })
|
|
2708
|
-
] }),
|
|
2709
|
-
/* @__PURE__ */ jsxs("div", { className: ResourcesGridList_module_default.dropdownWrapper, ref: sortRef, children: [
|
|
2710
|
-
/* @__PURE__ */ jsxs(
|
|
2711
|
-
"button",
|
|
2712
|
-
{
|
|
2713
|
-
type: "button",
|
|
2714
|
-
className: ResourcesGridList_module_default.chip,
|
|
2715
|
-
onClick: () => setOpenDropdown(openDropdown === "sort" ? null : "sort"),
|
|
2716
|
-
"aria-expanded": openDropdown === "sort",
|
|
2717
|
-
children: [
|
|
2718
|
-
/* @__PURE__ */ jsx(Icon, { type: "internalFilter", size: 20, "aria-hidden": "true" }),
|
|
2719
|
-
!isMobile && /* @__PURE__ */ jsx("span", { className: ResourcesGridList_module_default.chipLabel, children: "Sort" })
|
|
2720
|
-
]
|
|
2721
|
-
}
|
|
2722
|
-
),
|
|
2723
|
-
openDropdown === "sort" && /* @__PURE__ */ jsx("div", { className: ResourcesGridList_module_default.dropdownPanel, role: "listbox", "aria-label": "Sort by", children: SORT_OPTIONS.map((opt) => /* @__PURE__ */ jsx(
|
|
2724
|
-
"button",
|
|
2725
|
-
{
|
|
2726
|
-
type: "button",
|
|
2727
|
-
role: "option",
|
|
2728
|
-
"aria-selected": sortValue === opt.value,
|
|
2729
|
-
className: clsx23(
|
|
2730
|
-
ResourcesGridList_module_default.dropdownOption,
|
|
2731
|
-
sortValue === opt.value && ResourcesGridList_module_default.selected
|
|
2732
|
-
),
|
|
2733
|
-
onClick: () => {
|
|
2734
|
-
onSortChange(opt.value);
|
|
2735
|
-
setOpenDropdown(null);
|
|
2736
|
-
},
|
|
2737
|
-
children: opt.label
|
|
2738
|
-
},
|
|
2739
|
-
opt.value
|
|
2740
|
-
)) })
|
|
2741
|
-
] }),
|
|
2742
|
-
searchState !== "closed" ? /* @__PURE__ */ jsxs(
|
|
2743
|
-
"div",
|
|
2744
|
-
{
|
|
2745
|
-
className: clsx23(
|
|
2746
|
-
ResourcesGridList_module_default.searchExpanded,
|
|
2747
|
-
searchState === "closing" && ResourcesGridList_module_default.searchCollapsing
|
|
2748
|
-
),
|
|
2749
|
-
onAnimationEnd: () => {
|
|
2750
|
-
if (searchState === "closing") setSearchState("closed");
|
|
2751
|
-
},
|
|
2752
|
-
children: [
|
|
2753
|
-
/* @__PURE__ */ jsx("span", { className: ResourcesGridList_module_default.searchIconInner, children: /* @__PURE__ */ jsx(Icon, { type: "search", size: 20, "aria-hidden": "true" }) }),
|
|
2754
|
-
/* @__PURE__ */ jsx(
|
|
2755
|
-
"input",
|
|
2756
|
-
{
|
|
2757
|
-
ref: searchInputRef,
|
|
2758
|
-
type: "text",
|
|
2759
|
-
className: ResourcesGridList_module_default.searchInput,
|
|
2760
|
-
placeholder: "Search\u2026",
|
|
2761
|
-
value: searchQuery,
|
|
2762
|
-
onChange: (e) => setSearchQuery(e.target.value),
|
|
2763
|
-
onKeyDown: (e) => {
|
|
2764
|
-
if (e.key === "Escape") closeSearch();
|
|
2765
|
-
},
|
|
2766
|
-
onBlur: closeSearch
|
|
2767
|
-
}
|
|
2768
|
-
)
|
|
2769
|
-
]
|
|
2770
|
-
}
|
|
2771
|
-
) : /* @__PURE__ */ jsxs("button", { type: "button", className: ResourcesGridList_module_default.chip, onClick: () => setSearchState("open"), children: [
|
|
2772
|
-
/* @__PURE__ */ jsx(Icon, { type: "search", size: 20, "aria-hidden": "true" }),
|
|
2773
|
-
!isMobile && /* @__PURE__ */ jsx("span", { className: ResourcesGridList_module_default.chipLabel, children: "Search" })
|
|
2774
|
-
] })
|
|
2775
|
-
] })
|
|
2776
|
-
] });
|
|
2777
|
-
}
|
|
2778
|
-
var Sidebar = ({ categories, isMobile, onToggle }) => {
|
|
2779
|
-
if (isMobile) {
|
|
2780
|
-
return /* @__PURE__ */ jsx("div", { className: ResourcesGridList_module_default.sidebarMobile, children: /* @__PURE__ */ jsx(
|
|
2781
|
-
"button",
|
|
2782
|
-
{
|
|
2783
|
-
type: "button",
|
|
2784
|
-
className: ResourcesGridList_module_default.hamburger,
|
|
2785
|
-
"aria-label": "Open categories",
|
|
2786
|
-
onClick: onToggle,
|
|
2787
|
-
children: /* @__PURE__ */ jsx(Icon, { type: "menuBlack", size: 20, "aria-hidden": "true" })
|
|
2788
|
-
}
|
|
2789
|
-
) });
|
|
2790
|
-
}
|
|
2791
|
-
return /* @__PURE__ */ jsx("nav", { className: ResourcesGridList_module_default.sidebar, "aria-label": "Resource categories", children: /* @__PURE__ */ jsx("ul", { children: categories.map((cat, i) => {
|
|
2792
|
-
var _a;
|
|
2793
|
-
return /* @__PURE__ */ jsxs(
|
|
2794
|
-
"li",
|
|
2795
|
-
{
|
|
2796
|
-
className: clsx23(ResourcesGridList_module_default.sidebarItem, cat.active && ResourcesGridList_module_default.active),
|
|
2797
|
-
children: [
|
|
2798
|
-
/* @__PURE__ */ jsx("span", { children: cat.label }),
|
|
2799
|
-
cat.hasNotification && /* @__PURE__ */ jsx("span", { className: ResourcesGridList_module_default.notificationDot, "aria-label": "New" })
|
|
2800
|
-
]
|
|
2801
|
-
},
|
|
2802
|
-
(_a = cat.label) != null ? _a : i
|
|
2803
|
-
);
|
|
2804
|
-
}) }) });
|
|
2805
|
-
};
|
|
2806
|
-
var ResourceIcon = ({ type }) => /* @__PURE__ */ jsx("div", { className: ResourcesGridList_module_default.iconWrapper, children: /* @__PURE__ */ jsx(Icon, { type: type === "pdf" ? "pdf" : "externalLink", size: 32, "aria-hidden": "true" }) });
|
|
2807
|
-
var ResourceCardItem = ({ item, view }) => {
|
|
2808
|
-
if (view === "grid") {
|
|
2809
|
-
return /* @__PURE__ */ jsx("article", { className: ResourcesGridList_module_default.cardGrid, children: /* @__PURE__ */ jsxs("div", { className: ResourcesGridList_module_default.cardBody, children: [
|
|
2810
|
-
/* @__PURE__ */ jsxs("div", { className: ResourcesGridList_module_default.cardIconTitle, children: [
|
|
2811
|
-
/* @__PURE__ */ jsx(ResourceIcon, { type: item.type }),
|
|
2812
|
-
/* @__PURE__ */ jsx("span", { className: ResourcesGridList_module_default.cardTitle, children: item.title })
|
|
2813
|
-
] }),
|
|
2814
|
-
/* @__PURE__ */ jsxs("div", { className: ResourcesGridList_module_default.cardMeta, children: [
|
|
2815
|
-
/* @__PURE__ */ jsx("span", { className: ResourcesGridList_module_default.cardDate, children: item.date }),
|
|
2816
|
-
item.hasNotification && /* @__PURE__ */ jsx("span", { className: ResourcesGridList_module_default.notificationDot, "aria-label": "New" })
|
|
2817
|
-
] })
|
|
2818
|
-
] }) });
|
|
2819
|
-
}
|
|
2820
|
-
return /* @__PURE__ */ jsxs("article", { className: ResourcesGridList_module_default.cardList, children: [
|
|
2821
|
-
/* @__PURE__ */ jsxs("div", { className: ResourcesGridList_module_default.cardListLeft, children: [
|
|
2822
|
-
/* @__PURE__ */ jsx("span", { className: ResourcesGridList_module_default.cardDate, children: item.date }),
|
|
2823
|
-
item.hasNotification && /* @__PURE__ */ jsx("span", { className: ResourcesGridList_module_default.notificationDot, "aria-label": "New" })
|
|
2824
|
-
] }),
|
|
2825
|
-
/* @__PURE__ */ jsxs("div", { className: ResourcesGridList_module_default.cardListRight, children: [
|
|
2826
|
-
/* @__PURE__ */ jsx(ResourceIcon, { type: item.type }),
|
|
2827
|
-
/* @__PURE__ */ jsx("span", { className: ResourcesGridList_module_default.cardTitle, children: item.title })
|
|
2828
|
-
] })
|
|
2829
|
-
] });
|
|
2830
|
-
};
|
|
2831
|
-
var Pagination3 = () => /* @__PURE__ */ jsxs("div", { className: ResourcesGridList_module_default.pagination, "aria-label": "Pagination", children: [
|
|
2832
|
-
/* @__PURE__ */ jsx("button", { type: "button", className: ResourcesGridList_module_default.pageArrow, "aria-label": "Previous page", children: /* @__PURE__ */ jsx(Icon, { type: "chevronLeftBlack", size: 32, "aria-hidden": "true" }) }),
|
|
2833
|
-
/* @__PURE__ */ jsx("span", { className: ResourcesGridList_module_default.pageDotActive, "aria-current": "page" }),
|
|
2834
|
-
/* @__PURE__ */ jsx("span", { className: ResourcesGridList_module_default.pageDot }),
|
|
2835
|
-
/* @__PURE__ */ jsx("span", { className: ResourcesGridList_module_default.pageDot }),
|
|
2836
|
-
/* @__PURE__ */ jsx("button", { type: "button", className: ResourcesGridList_module_default.pageArrow, "aria-label": "Next page", children: /* @__PURE__ */ jsx(Icon, { type: "chevronRightBlack", size: 32, "aria-hidden": "true" }) })
|
|
2837
|
-
] });
|
|
2942
|
+
var ITEMS_PER_PAGE = 12;
|
|
2838
2943
|
var ResourcesGridList = ({
|
|
2839
2944
|
className,
|
|
2840
2945
|
items = [],
|
|
@@ -2843,20 +2948,52 @@ var ResourcesGridList = ({
|
|
|
2843
2948
|
defaultFilter = "all",
|
|
2844
2949
|
defaultSort = "latest"
|
|
2845
2950
|
}) => {
|
|
2951
|
+
var _a;
|
|
2846
2952
|
const [view, setView] = useState(defaultView);
|
|
2847
2953
|
const [isSidebarOpen, setIsSidebarOpen] = useState(false);
|
|
2848
2954
|
const [filterValue, setFilterValue] = useState(defaultFilter);
|
|
2849
2955
|
const [sortValue, setSortValue] = useState(defaultSort);
|
|
2956
|
+
const [searchQuery, setSearchQuery] = useState("");
|
|
2957
|
+
const [currentPage, setCurrentPage] = useState(1);
|
|
2958
|
+
const [selectedCategory, setSelectedCategory] = useState(() => {
|
|
2959
|
+
const activeIndex = categories.findIndex((cat) => cat.active);
|
|
2960
|
+
return activeIndex === -1 ? 0 : activeIndex;
|
|
2961
|
+
});
|
|
2850
2962
|
const { is } = useViewPort_default();
|
|
2851
2963
|
const isMobile = is("tablet", "below");
|
|
2852
|
-
const
|
|
2964
|
+
const selectedValue = (_a = categories[selectedCategory]) == null ? void 0 : _a.value;
|
|
2965
|
+
const handleSelectCategory = (index) => {
|
|
2966
|
+
setSelectedCategory(index);
|
|
2967
|
+
setCurrentPage(1);
|
|
2968
|
+
if (isMobile) setIsSidebarOpen(false);
|
|
2969
|
+
};
|
|
2970
|
+
const handleFilterChange = (value) => {
|
|
2971
|
+
setFilterValue(value);
|
|
2972
|
+
setCurrentPage(1);
|
|
2973
|
+
};
|
|
2974
|
+
const handleSortChange = (value) => {
|
|
2975
|
+
setSortValue(value);
|
|
2976
|
+
setCurrentPage(1);
|
|
2977
|
+
};
|
|
2978
|
+
const handleSearchChange = (value) => {
|
|
2979
|
+
setSearchQuery(value);
|
|
2980
|
+
setCurrentPage(1);
|
|
2981
|
+
};
|
|
2982
|
+
const displayedItems = [...items].filter((item) => filterValue === "all" || item.type === filterValue).filter((item) => selectedValue == null || item.category === selectedValue).filter((item) => {
|
|
2983
|
+
const q = searchQuery.trim().toLowerCase();
|
|
2984
|
+
return q === "" || item.title.toLowerCase().includes(q);
|
|
2985
|
+
}).sort((a, b) => {
|
|
2853
2986
|
if (sortValue === "latest") return new Date(b.date).getTime() - new Date(a.date).getTime();
|
|
2854
2987
|
if (sortValue === "oldest") return new Date(a.date).getTime() - new Date(b.date).getTime();
|
|
2855
2988
|
if (sortValue === "az") return a.title.localeCompare(b.title);
|
|
2856
2989
|
if (sortValue === "za") return b.title.localeCompare(a.title);
|
|
2857
2990
|
return 0;
|
|
2858
2991
|
});
|
|
2859
|
-
|
|
2992
|
+
const totalPages = Math.max(1, Math.ceil(displayedItems.length / ITEMS_PER_PAGE));
|
|
2993
|
+
const safeCurrentPage = Math.min(currentPage, totalPages);
|
|
2994
|
+
const pageStart = (safeCurrentPage - 1) * ITEMS_PER_PAGE;
|
|
2995
|
+
const paginatedItems = displayedItems.slice(pageStart, pageStart + ITEMS_PER_PAGE);
|
|
2996
|
+
return /* @__PURE__ */ jsxs("div", { className: clsx25(ResourcesGridList_module_default.widget, className), children: [
|
|
2860
2997
|
/* @__PURE__ */ jsx(
|
|
2861
2998
|
FilterBar,
|
|
2862
2999
|
{
|
|
@@ -2864,33 +3001,48 @@ var ResourcesGridList = ({
|
|
|
2864
3001
|
onViewChange: setView,
|
|
2865
3002
|
isMobile,
|
|
2866
3003
|
filterValue,
|
|
2867
|
-
onFilterChange:
|
|
3004
|
+
onFilterChange: handleFilterChange,
|
|
2868
3005
|
sortValue,
|
|
2869
|
-
onSortChange:
|
|
3006
|
+
onSortChange: handleSortChange,
|
|
3007
|
+
searchValue: searchQuery,
|
|
3008
|
+
onSearchChange: handleSearchChange
|
|
2870
3009
|
}
|
|
2871
3010
|
),
|
|
2872
3011
|
/* @__PURE__ */ jsxs("div", { className: ResourcesGridList_module_default.content, children: [
|
|
2873
3012
|
isMobile && /* @__PURE__ */ jsxs(
|
|
2874
3013
|
"div",
|
|
2875
3014
|
{
|
|
2876
|
-
className:
|
|
3015
|
+
className: clsx25(
|
|
2877
3016
|
ResourcesGridList_module_default.mobileSidebarOverlay,
|
|
2878
3017
|
isSidebarOpen && ResourcesGridList_module_default.mobileSidebarOverlayOpen
|
|
2879
3018
|
),
|
|
2880
3019
|
"aria-hidden": !isSidebarOpen,
|
|
2881
3020
|
children: [
|
|
2882
3021
|
/* @__PURE__ */ jsx("nav", { className: ResourcesGridList_module_default.mobileCategoriesPanel, "aria-label": "Resource categories", children: /* @__PURE__ */ jsx("ul", { className: ResourcesGridList_module_default.mobileCategoriesList, children: categories.map((cat, i) => {
|
|
2883
|
-
var
|
|
3022
|
+
var _a2;
|
|
2884
3023
|
return /* @__PURE__ */ jsxs(
|
|
2885
3024
|
"li",
|
|
2886
3025
|
{
|
|
2887
|
-
className:
|
|
3026
|
+
className: clsx25(
|
|
3027
|
+
ResourcesGridList_module_default.mobileSidebarItem,
|
|
3028
|
+
i === selectedCategory && ResourcesGridList_module_default.active
|
|
3029
|
+
),
|
|
3030
|
+
role: "button",
|
|
3031
|
+
tabIndex: 0,
|
|
3032
|
+
"aria-pressed": i === selectedCategory,
|
|
3033
|
+
onClick: () => handleSelectCategory(i),
|
|
3034
|
+
onKeyDown: (e) => {
|
|
3035
|
+
if (e.key === "Enter" || e.key === " ") {
|
|
3036
|
+
e.preventDefault();
|
|
3037
|
+
handleSelectCategory(i);
|
|
3038
|
+
}
|
|
3039
|
+
},
|
|
2888
3040
|
children: [
|
|
2889
3041
|
/* @__PURE__ */ jsx("span", { children: cat.label }),
|
|
2890
3042
|
cat.hasNotification && /* @__PURE__ */ jsx("span", { className: ResourcesGridList_module_default.notificationDot, "aria-label": "New" })
|
|
2891
3043
|
]
|
|
2892
3044
|
},
|
|
2893
|
-
(
|
|
3045
|
+
(_a2 = cat.label) != null ? _a2 : i
|
|
2894
3046
|
);
|
|
2895
3047
|
}) }) }),
|
|
2896
3048
|
/* @__PURE__ */ jsx("div", { className: ResourcesGridList_module_default.mobileSidebarCloseColumn, children: /* @__PURE__ */ jsx(
|
|
@@ -2911,15 +3063,26 @@ var ResourcesGridList = ({
|
|
|
2911
3063
|
{
|
|
2912
3064
|
categories,
|
|
2913
3065
|
isMobile,
|
|
2914
|
-
onToggle: () => setIsSidebarOpen(true)
|
|
3066
|
+
onToggle: () => setIsSidebarOpen(true),
|
|
3067
|
+
selectedIndex: selectedCategory,
|
|
3068
|
+
onSelect: handleSelectCategory
|
|
2915
3069
|
}
|
|
2916
3070
|
),
|
|
2917
|
-
/* @__PURE__ */ jsx("div", { className:
|
|
2918
|
-
var
|
|
2919
|
-
return /* @__PURE__ */ jsx(ResourceCardItem, { item, view }, (
|
|
3071
|
+
/* @__PURE__ */ jsx("div", { className: clsx25(ResourcesGridList_module_default.cardsArea, ResourcesGridList_module_default[view]), children: paginatedItems.map((item, i) => {
|
|
3072
|
+
var _a2;
|
|
3073
|
+
return /* @__PURE__ */ jsx(ResourceCardItem, { item, view }, (_a2 = item.title) != null ? _a2 : i);
|
|
2920
3074
|
}) })
|
|
2921
3075
|
] }),
|
|
2922
|
-
/* @__PURE__ */ jsx(
|
|
3076
|
+
totalPages > 1 && /* @__PURE__ */ jsx(
|
|
3077
|
+
Pagination,
|
|
3078
|
+
{
|
|
3079
|
+
currentPage: safeCurrentPage,
|
|
3080
|
+
totalPages,
|
|
3081
|
+
loop: false,
|
|
3082
|
+
onPageChange: setCurrentPage
|
|
3083
|
+
},
|
|
3084
|
+
`${selectedCategory}-${filterValue}-${sortValue}-${searchQuery}`
|
|
3085
|
+
)
|
|
2923
3086
|
] });
|
|
2924
3087
|
};
|
|
2925
3088
|
function useIntersectionObserver({
|
|
@@ -2951,6 +3114,6 @@ function useIntersectionObserver({
|
|
|
2951
3114
|
return { observeRef, isVisible };
|
|
2952
3115
|
}
|
|
2953
3116
|
|
|
2954
|
-
export { Anchor, BrandsStrip, Button, Card2 as Card, CardCollection2 as CardCollection, ConditionalWrapper, ContactModule2 as ContactModule, Container, CountingCard2 as CountingCard, EventList2 as EventList, Footer, HeroBanner2 as HeroBanner, HeroBannerCarousel, Icon, InfoCard2 as InfoCard, InternalBrandsTab2 as InternalBrandsTab, LogoBar, MiniBanner2 as MiniBanner, MiniSectionCta2 as MiniSectionCta, Pagination, Picture, PracticeCard, PracticePathCards2 as PracticePathCards, ResourcesGridList, Teaser5050With3Text2 as Teaser5050With3Text, Teaser5050WithCta2 as Teaser5050WithCta, TextBody2 as TextBody, TextCenterCtaInBottom2 as TextCenterCtaInBottom, TextEvent2 as TextEvent, resolveCompoundSlots, svgs, useIntersectionObserver };
|
|
3117
|
+
export { Anchor, BrandsStrip, Button, Card2 as Card, CardCollection2 as CardCollection, ConditionalWrapper, ContactModule2 as ContactModule, Container, CountingCard2 as CountingCard, EventList2 as EventList, FilterBar, Footer, HeroBanner2 as HeroBanner, HeroBannerCarousel, Icon, InfoCard2 as InfoCard, InternalBrandsTab2 as InternalBrandsTab, LogoBar, MiniBanner2 as MiniBanner, MiniSectionCta2 as MiniSectionCta, Pagination, Picture, PracticeCard, PracticePathCards2 as PracticePathCards, ResourceCardItem, ResourcesGridList, Sidebar, Teaser5050With3Text2 as Teaser5050With3Text, Teaser5050WithCta2 as Teaser5050WithCta, TextBody2 as TextBody, TextCenterCtaInBottom2 as TextCenterCtaInBottom, TextEvent2 as TextEvent, resolveCompoundSlots, svgs, useIntersectionObserver };
|
|
2955
3118
|
//# sourceMappingURL=index.mjs.map
|
|
2956
3119
|
//# sourceMappingURL=index.mjs.map
|