@digital-b2c/coreui-kit 0.14.7 → 0.15.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/LICENSE.txt +21 -21
- package/README.md +52 -52
- package/dist/index.cjs +1233 -511
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +813 -103
- package/dist/index.css.map +1 -1
- package/dist/index.d.cts +96 -2
- package/dist/index.d.ts +96 -2
- package/dist/index.mjs +1166 -447
- package/dist/index.mjs.map +1 -1
- package/dist/types/global.d.ts +25 -25
- package/package.json +100 -101
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import clsx47 from 'clsx';
|
|
2
2
|
import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
|
|
3
|
-
import
|
|
3
|
+
import React70, { forwardRef, useId, useRef, useState, useCallback, useMemo, useEffect, Children, isValidElement, Fragment as Fragment$1 } from 'react';
|
|
4
4
|
import gsap$1, { gsap } from 'gsap';
|
|
5
5
|
import { useGSAP } from '@gsap/react';
|
|
6
6
|
import { ScrollTrigger } from 'gsap/ScrollTrigger';
|
|
@@ -59,7 +59,7 @@ var Picture = (_a) => {
|
|
|
59
59
|
__spreadValues({
|
|
60
60
|
src: desktop.src,
|
|
61
61
|
alt: desktop.alt,
|
|
62
|
-
className:
|
|
62
|
+
className: clsx47(className, Picture_module_default["image-desktop"])
|
|
63
63
|
}, rest)
|
|
64
64
|
),
|
|
65
65
|
/* @__PURE__ */ jsx(
|
|
@@ -67,7 +67,7 @@ var Picture = (_a) => {
|
|
|
67
67
|
__spreadValues({
|
|
68
68
|
src: (_b2 = mobile == null ? void 0 : mobile.src) != null ? _b2 : desktop.src,
|
|
69
69
|
alt: (_c = mobile == null ? void 0 : mobile.alt) != null ? _c : desktop.alt,
|
|
70
|
-
className:
|
|
70
|
+
className: clsx47(className, Picture_module_default["image-mobile"])
|
|
71
71
|
}, rest)
|
|
72
72
|
)
|
|
73
73
|
] });
|
|
@@ -283,6 +283,21 @@ var SvgIconXWhite = (props) => /* @__PURE__ */ jsxs("svg", __spreadProps(__sprea
|
|
|
283
283
|
/* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsx("clipPath", { id: "clip0_942_1878", children: /* @__PURE__ */ jsx("rect", { width: 24, height: 24, fill: "white" }) }) })
|
|
284
284
|
] }));
|
|
285
285
|
var icon_x_white_default = SvgIconXWhite;
|
|
286
|
+
var SvgIconUser = (props) => /* @__PURE__ */ jsxs("svg", __spreadProps(__spreadValues({ xmlns: "http://www.w3.org/2000/svg", width: 24, height: 24, viewBox: "0 0 24 24", fill: "none" }, props), { children: [
|
|
287
|
+
/* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsx("clipPath", { id: "avatar-clip", children: /* @__PURE__ */ jsx("rect", { x: 0.5, y: 0.5, width: 23, height: 23, rx: 11.5 }) }) }),
|
|
288
|
+
/* @__PURE__ */ jsxs("g", { id: "user 1", children: [
|
|
289
|
+
/* @__PURE__ */ jsx("rect", { x: 0.5, y: 0.5, width: 23, height: 23, rx: 11.5, fill: "#EEEEEE" }),
|
|
290
|
+
/* @__PURE__ */ jsxs("g", { clipPath: "url(#avatar-clip)", children: [
|
|
291
|
+
/* @__PURE__ */ jsxs("g", { id: "Vector", children: [
|
|
292
|
+
/* @__PURE__ */ jsx("path", { d: "M21 23V20.6667C21 19.429 20.5259 18.242 19.682 17.3668C18.8381 16.4917 17.6935 16 16.5 16H7.5C6.30653 16 5.16193 16.4917 4.31802 17.3668C3.47411 18.242 3 19.429 3 20.6667V23", fill: "#B5B5B5" }),
|
|
293
|
+
/* @__PURE__ */ jsx("path", { d: "M21 23V20.6667C21 19.429 20.5259 18.242 19.682 17.3668C18.8381 16.4917 17.6935 16 16.5 16H7.5C6.30653 16 5.16193 16.4917 4.31802 17.3668C3.47411 18.242 3 19.429 3 20.6667V23", stroke: "#A8A8A8", strokeLinecap: "round", strokeLinejoin: "round" })
|
|
294
|
+
] }),
|
|
295
|
+
/* @__PURE__ */ jsx("path", { id: "Vector_2", d: "M12 13C14.2091 13 16 11.2091 16 9C16 6.79086 14.2091 5 12 5C9.79086 5 8 6.79086 8 9C8 11.2091 9.79086 13 12 13Z", fill: "#B5B5B5", stroke: "#A8A8A8", strokeLinecap: "round", strokeLinejoin: "round" })
|
|
296
|
+
] }),
|
|
297
|
+
/* @__PURE__ */ jsx("rect", { x: 0.5, y: 0.5, width: 23, height: 23, rx: 11.5, stroke: "#A8A8A8" })
|
|
298
|
+
] })
|
|
299
|
+
] }));
|
|
300
|
+
var icon_user_default = SvgIconUser;
|
|
286
301
|
var SvgIconFilter = (props) => /* @__PURE__ */ jsx("svg", __spreadProps(__spreadValues({ width: 24, height: 24, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, props), { children: /* @__PURE__ */ jsx("path", { d: "M10.9991 20C10.7158 20 10.4783 19.9042 10.2866 19.7125C10.0949 19.5208 9.9991 19.2833 9.9991 19V13L4.1991 5.6C3.9491 5.26667 3.9116 4.91667 4.0866 4.55C4.2616 4.18333 4.56577 4 4.9991 4H18.9991C19.4324 4 19.7366 4.18333 19.9116 4.55C20.0866 4.91667 20.0491 5.26667 19.7991 5.6L13.9991 13V19C13.9991 19.2833 13.9033 19.5208 13.7116 19.7125C13.5199 19.9042 13.2824 20 12.9991 20H10.9991Z", fill: "#080808" }) }));
|
|
287
302
|
var icon_filter_default = SvgIconFilter;
|
|
288
303
|
var SvgIconInternalFilter = (props) => /* @__PURE__ */ jsx("svg", __spreadProps(__spreadValues({ width: 24, height: 24, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, props), { children: /* @__PURE__ */ jsx("path", { d: "M3 18V16H9V18H3ZM3 13V11H15V13H3ZM3 8V6H21V8H3Z", fill: "#080808" }) }));
|
|
@@ -385,9 +400,10 @@ var svgs = {
|
|
|
385
400
|
right: icon_right_default,
|
|
386
401
|
tiltedRight: icon_tilted_right_default,
|
|
387
402
|
xBlack: icon_x_black_default,
|
|
388
|
-
xWhite: icon_x_white_default
|
|
403
|
+
xWhite: icon_x_white_default,
|
|
404
|
+
user: icon_user_default
|
|
389
405
|
};
|
|
390
|
-
var Icon =
|
|
406
|
+
var Icon = React70.memo(
|
|
391
407
|
(_a) => {
|
|
392
408
|
var _b = _a, { type, size } = _b, props = __objRest(_b, ["type", "size"]);
|
|
393
409
|
if (type) {
|
|
@@ -445,7 +461,7 @@ var Button = (_a) => {
|
|
|
445
461
|
]);
|
|
446
462
|
const isLink = !!href;
|
|
447
463
|
const props = __spreadValues(__spreadValues({
|
|
448
|
-
className:
|
|
464
|
+
className: clsx47(
|
|
449
465
|
Button_module_default.button,
|
|
450
466
|
variant ? Button_module_default[variant] : null,
|
|
451
467
|
{ [Button_module_default.fullWidth]: !!fullWidth },
|
|
@@ -677,7 +693,7 @@ var BrandsStrip = ({
|
|
|
677
693
|
"div",
|
|
678
694
|
{
|
|
679
695
|
ref: containerRef,
|
|
680
|
-
className:
|
|
696
|
+
className: clsx47(
|
|
681
697
|
BrandsStrip_module_default.brandsStrip,
|
|
682
698
|
BrandsStrip_module_default[variant],
|
|
683
699
|
{ [BrandsStrip_module_default.small]: size === "small" },
|
|
@@ -686,13 +702,13 @@ var BrandsStrip = ({
|
|
|
686
702
|
onMouseEnter: handleMouseEnter,
|
|
687
703
|
onMouseLeave: handleMouseLeave,
|
|
688
704
|
children: [
|
|
689
|
-
/* @__PURE__ */ jsxs("div", { className:
|
|
690
|
-
title && logos.length === 1 && /* @__PURE__ */ jsx("h2", { className:
|
|
705
|
+
/* @__PURE__ */ jsxs("div", { className: clsx47(BrandsStrip_module_default.container, { [BrandsStrip_module_default.blurred]: show && logos.length > 1 }), children: [
|
|
706
|
+
title && logos.length === 1 && /* @__PURE__ */ jsx("h2", { className: clsx47("body", BrandsStrip_module_default.title), children: title }),
|
|
691
707
|
logos.length > 0 && /* @__PURE__ */ jsx(
|
|
692
708
|
"div",
|
|
693
709
|
{
|
|
694
710
|
ref: marqueeRef,
|
|
695
|
-
className:
|
|
711
|
+
className: clsx47(BrandsStrip_module_default.logos, { [BrandsStrip_module_default.marqueeGSAP]: shouldAnimate }),
|
|
696
712
|
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}`))
|
|
697
713
|
}
|
|
698
714
|
)
|
|
@@ -739,7 +755,7 @@ var Container_module_default = {
|
|
|
739
755
|
var Container = forwardRef(
|
|
740
756
|
(_a, ref) => {
|
|
741
757
|
var _b = _a, { children, className } = _b, props = __objRest(_b, ["children", "className"]);
|
|
742
|
-
return /* @__PURE__ */ jsx("div", __spreadProps(__spreadValues({ ref, className:
|
|
758
|
+
return /* @__PURE__ */ jsx("div", __spreadProps(__spreadValues({ ref, className: clsx47(Container_module_default.container, className) }, props), { children }));
|
|
743
759
|
}
|
|
744
760
|
);
|
|
745
761
|
Container.displayName = "Container";
|
|
@@ -780,14 +796,14 @@ var Card = ({
|
|
|
780
796
|
ConditionalWrapper,
|
|
781
797
|
__spreadProps(__spreadValues({
|
|
782
798
|
ref,
|
|
783
|
-
className:
|
|
799
|
+
className: clsx47(Card_module_default.card, Card_module_default[variant], className),
|
|
784
800
|
wrapper: Anchor,
|
|
785
801
|
fallback: "div",
|
|
786
802
|
condition: isLink
|
|
787
803
|
}, href ? { href, isExternal } : {}), {
|
|
788
804
|
children: [
|
|
789
805
|
/* @__PURE__ */ jsxs("div", { className: Card_module_default.logoContainer, children: [
|
|
790
|
-
(logo == null ? void 0 : logo.src) ? /* @__PURE__ */ jsx(Picture, __spreadValues({ className:
|
|
806
|
+
(logo == null ? void 0 : logo.src) ? /* @__PURE__ */ jsx(Picture, __spreadValues({ className: clsx47(Card_module_default.logo, isLink && Card_module_default.hideLogo) }, logo)) : icon && /* @__PURE__ */ jsx(Icon, { type: icon, className: clsx47(Card_module_default.logo, isLink && Card_module_default.hideLogo) }),
|
|
791
807
|
isLink && /* @__PURE__ */ jsx(Icon, { type: "tiltedRightWhite", className: Card_module_default.logoHover })
|
|
792
808
|
] }),
|
|
793
809
|
/* @__PURE__ */ jsxs("div", { className: Card_module_default.content, children: [
|
|
@@ -822,10 +838,10 @@ var CountingCard = ({ className, title, count, image, children }) => {
|
|
|
822
838
|
title: CountingCardTitle
|
|
823
839
|
});
|
|
824
840
|
const titleNode = (_a = slots.title) != null ? _a : title;
|
|
825
|
-
return /* @__PURE__ */ jsxs("div", { className:
|
|
841
|
+
return /* @__PURE__ */ jsxs("div", { className: clsx47(CountingCard_module_default["counting-card"], className), children: [
|
|
826
842
|
/* @__PURE__ */ jsxs("div", { className: CountingCard_module_default.content, children: [
|
|
827
843
|
titleNode && /* @__PURE__ */ jsx("div", { className: "body", children: titleNode }),
|
|
828
|
-
count && /* @__PURE__ */ jsx("div", { className:
|
|
844
|
+
count && /* @__PURE__ */ jsx("div", { className: clsx47(CountingCard_module_default.count, "h1"), children: count })
|
|
829
845
|
] }),
|
|
830
846
|
image && /* @__PURE__ */ jsx(Picture, __spreadValues({ className: CountingCard_module_default.logo }, image))
|
|
831
847
|
] });
|
|
@@ -911,7 +927,7 @@ function FilterBar({
|
|
|
911
927
|
"button",
|
|
912
928
|
{
|
|
913
929
|
type: "button",
|
|
914
|
-
className:
|
|
930
|
+
className: clsx47(FilterBar_module_default.chip, view === "grid" && FilterBar_module_default.active),
|
|
915
931
|
onClick: () => onViewChange("grid"),
|
|
916
932
|
"aria-pressed": view === "grid",
|
|
917
933
|
children: [
|
|
@@ -924,7 +940,7 @@ function FilterBar({
|
|
|
924
940
|
"button",
|
|
925
941
|
{
|
|
926
942
|
type: "button",
|
|
927
|
-
className:
|
|
943
|
+
className: clsx47(FilterBar_module_default.chip, view === "list" && FilterBar_module_default.active),
|
|
928
944
|
onClick: () => onViewChange("list"),
|
|
929
945
|
"aria-pressed": view === "list",
|
|
930
946
|
children: [
|
|
@@ -938,7 +954,7 @@ function FilterBar({
|
|
|
938
954
|
/* @__PURE__ */ jsxs(
|
|
939
955
|
"div",
|
|
940
956
|
{
|
|
941
|
-
className:
|
|
957
|
+
className: clsx47(
|
|
942
958
|
FilterBar_module_default.dropdownWrapper,
|
|
943
959
|
isMobile && searchState === "open" && FilterBar_module_default.filterFaded,
|
|
944
960
|
isMobile && searchState === "closing" && FilterBar_module_default.filterFading
|
|
@@ -949,7 +965,7 @@ function FilterBar({
|
|
|
949
965
|
"button",
|
|
950
966
|
{
|
|
951
967
|
type: "button",
|
|
952
|
-
className:
|
|
968
|
+
className: clsx47(FilterBar_module_default.chip, filterValue !== "all" && FilterBar_module_default.active),
|
|
953
969
|
onClick: () => setOpenDropdown(openDropdown === "filter" ? null : "filter"),
|
|
954
970
|
"aria-expanded": openDropdown === "filter",
|
|
955
971
|
children: [
|
|
@@ -964,7 +980,7 @@ function FilterBar({
|
|
|
964
980
|
type: "button",
|
|
965
981
|
role: "option",
|
|
966
982
|
"aria-selected": filterValue === opt.value,
|
|
967
|
-
className:
|
|
983
|
+
className: clsx47(
|
|
968
984
|
FilterBar_module_default.dropdownOption,
|
|
969
985
|
filterValue === opt.value && FilterBar_module_default.selected
|
|
970
986
|
),
|
|
@@ -985,7 +1001,7 @@ function FilterBar({
|
|
|
985
1001
|
/* @__PURE__ */ jsxs(
|
|
986
1002
|
"div",
|
|
987
1003
|
{
|
|
988
|
-
className:
|
|
1004
|
+
className: clsx47(
|
|
989
1005
|
FilterBar_module_default.dropdownWrapper,
|
|
990
1006
|
isMobile && searchState === "open" && FilterBar_module_default.filterFaded,
|
|
991
1007
|
isMobile && searchState === "closing" && FilterBar_module_default.filterFading
|
|
@@ -1011,7 +1027,7 @@ function FilterBar({
|
|
|
1011
1027
|
type: "button",
|
|
1012
1028
|
role: "option",
|
|
1013
1029
|
"aria-selected": sortValue === opt.value,
|
|
1014
|
-
className:
|
|
1030
|
+
className: clsx47(
|
|
1015
1031
|
FilterBar_module_default.dropdownOption,
|
|
1016
1032
|
sortValue === opt.value && FilterBar_module_default.selected
|
|
1017
1033
|
),
|
|
@@ -1029,7 +1045,7 @@ function FilterBar({
|
|
|
1029
1045
|
searchState !== "closed" ? /* @__PURE__ */ jsxs(
|
|
1030
1046
|
"div",
|
|
1031
1047
|
{
|
|
1032
|
-
className:
|
|
1048
|
+
className: clsx47(
|
|
1033
1049
|
FilterBar_module_default.searchExpanded,
|
|
1034
1050
|
searchState === "closing" && FilterBar_module_default.searchCollapsing
|
|
1035
1051
|
),
|
|
@@ -1111,9 +1127,9 @@ var InfoCard = ({ className, title, subtitle, icon, badge, children }) => {
|
|
|
1111
1127
|
});
|
|
1112
1128
|
const titleNode = (_a = slots.title) != null ? _a : title;
|
|
1113
1129
|
const subtitleNode = (_b = slots.subtitle) != null ? _b : subtitle;
|
|
1114
|
-
return /* @__PURE__ */ jsxs("div", { className:
|
|
1130
|
+
return /* @__PURE__ */ jsxs("div", { className: clsx47(InfoCard_module_default["info-card"], { [InfoCard_module_default.hasIcon]: !!icon }, className), children: [
|
|
1115
1131
|
/* @__PURE__ */ jsxs("div", { className: InfoCard_module_default.header, children: [
|
|
1116
|
-
icon ? /* @__PURE__ */ jsx(Icon, { type: icon }) : badge ? /* @__PURE__ */ jsx("div", { className:
|
|
1132
|
+
icon ? /* @__PURE__ */ jsx(Icon, { type: icon }) : badge ? /* @__PURE__ */ jsx("div", { className: clsx47(InfoCard_module_default.badge, "h4"), children: badge }) : null,
|
|
1117
1133
|
titleNode && /* @__PURE__ */ jsx("div", { className: "h4", children: titleNode })
|
|
1118
1134
|
] }),
|
|
1119
1135
|
subtitleNode && /* @__PURE__ */ jsx("div", { className: "body", children: subtitleNode })
|
|
@@ -1210,7 +1226,7 @@ var Pagination = ({
|
|
|
1210
1226
|
const prevPage = activePage === 1 ? loop ? totalPages : 1 : activePage - 1;
|
|
1211
1227
|
const nextPage = activePage === totalPages ? loop ? 1 : totalPages : activePage + 1;
|
|
1212
1228
|
const pageItems = showEllipsis ? getPaginationRange(totalPages, activePage, siblingCount, boundaryCount) : Array.from({ length: totalPages }, (_, i) => i + 1);
|
|
1213
|
-
return /* @__PURE__ */ jsxs("div", { className:
|
|
1229
|
+
return /* @__PURE__ */ jsxs("div", { className: clsx47(Pagination_module_default.pagination, className), children: [
|
|
1214
1230
|
!disableArrows && (renderLink ? renderLink({
|
|
1215
1231
|
page: prevPage,
|
|
1216
1232
|
className: Pagination_module_default.prev,
|
|
@@ -1231,7 +1247,7 @@ var Pagination = ({
|
|
|
1231
1247
|
return /* @__PURE__ */ jsx("span", { className: Pagination_module_default.dots, "aria-hidden": "true", children: "\u2026" }, `dots-${index}`);
|
|
1232
1248
|
}
|
|
1233
1249
|
const page = item;
|
|
1234
|
-
const pageClassName =
|
|
1250
|
+
const pageClassName = clsx47(Pagination_module_default.page, {
|
|
1235
1251
|
[Pagination_module_default.active]: activePage === page,
|
|
1236
1252
|
[Pagination_module_default.number]: hasNumber,
|
|
1237
1253
|
[Pagination_module_default["no-border"]]: hidePagesBorder
|
|
@@ -1283,7 +1299,7 @@ var PracticeCard_module_default = {
|
|
|
1283
1299
|
};
|
|
1284
1300
|
var PracticeCard = ({ className, title, cta, image }) => {
|
|
1285
1301
|
const { url: href, isExternal } = cta != null ? cta : {};
|
|
1286
|
-
return /* @__PURE__ */ jsx("div", { className:
|
|
1302
|
+
return /* @__PURE__ */ jsx("div", { className: clsx47(PracticeCard_module_default["practice-card"], className), children: /* @__PURE__ */ jsxs(
|
|
1287
1303
|
ConditionalWrapper,
|
|
1288
1304
|
__spreadProps(__spreadValues({
|
|
1289
1305
|
className: PracticeCard_module_default.wrapper,
|
|
@@ -1294,7 +1310,7 @@ var PracticeCard = ({ className, title, cta, image }) => {
|
|
|
1294
1310
|
children: [
|
|
1295
1311
|
image && /* @__PURE__ */ jsx(Picture, __spreadValues({ className: PracticeCard_module_default.background }, image)),
|
|
1296
1312
|
/* @__PURE__ */ jsxs("div", { className: PracticeCard_module_default.container, children: [
|
|
1297
|
-
title && /* @__PURE__ */ jsx("div", { className:
|
|
1313
|
+
title && /* @__PURE__ */ jsx("div", { className: clsx47(PracticeCard_module_default.title, "h3"), children: title }),
|
|
1298
1314
|
href && /* @__PURE__ */ jsxs("div", { className: PracticeCard_module_default.cta, children: [
|
|
1299
1315
|
/* @__PURE__ */ jsx(Icon, { className: PracticeCard_module_default.ctaRest, type: "right" }),
|
|
1300
1316
|
/* @__PURE__ */ jsx(Icon, { className: PracticeCard_module_default.ctaHover, type: "tiltedRight" })
|
|
@@ -1338,15 +1354,15 @@ var ResourceCardItem = ({ item, view, variant, renderLink }) => {
|
|
|
1338
1354
|
"aria-disabled": isRestricted
|
|
1339
1355
|
} : null;
|
|
1340
1356
|
const cardLink = linkProps && isGlobalSearchVariant ? renderLink ? renderLink(__spreadProps(__spreadValues({}, linkProps), {
|
|
1341
|
-
className:
|
|
1357
|
+
className: clsx47(ResourceCardItem_module_default.cardLink, isGlobalSearchVariant && ResourceCardItem_module_default[variant]),
|
|
1342
1358
|
children: null
|
|
1343
1359
|
})) : /* @__PURE__ */ jsx(
|
|
1344
1360
|
"a",
|
|
1345
1361
|
__spreadProps(__spreadValues({}, linkProps), {
|
|
1346
|
-
className:
|
|
1362
|
+
className: clsx47(ResourceCardItem_module_default.cardLink, isGlobalSearchVariant && ResourceCardItem_module_default[variant])
|
|
1347
1363
|
})
|
|
1348
1364
|
) : null;
|
|
1349
|
-
const linkWrapper = ({ children }) => /* @__PURE__ */ jsx("a", __spreadProps(__spreadValues({}, linkProps), { tabIndex: isGlobalSearchVariant ? -1 : 0, className:
|
|
1365
|
+
const linkWrapper = ({ children }) => /* @__PURE__ */ jsx("a", __spreadProps(__spreadValues({}, linkProps), { tabIndex: isGlobalSearchVariant ? -1 : 0, className: clsx47(ResourceCardItem_module_default.cardLink), children }));
|
|
1350
1366
|
function getIcon() {
|
|
1351
1367
|
switch (item.type) {
|
|
1352
1368
|
case "pdf":
|
|
@@ -1363,7 +1379,7 @@ var ResourceCardItem = ({ item, view, variant, renderLink }) => {
|
|
|
1363
1379
|
return /* @__PURE__ */ jsxs(
|
|
1364
1380
|
"article",
|
|
1365
1381
|
{
|
|
1366
|
-
className:
|
|
1382
|
+
className: clsx47(
|
|
1367
1383
|
ResourceCardItem_module_default.cardGrid,
|
|
1368
1384
|
isGlobalSearchVariant && ResourceCardItem_module_default[variant],
|
|
1369
1385
|
isGlobalSearchVariant && isRestricted ? ResourceCardItem_module_default["restricted"] : null
|
|
@@ -1440,7 +1456,7 @@ var Sidebar = ({
|
|
|
1440
1456
|
return /* @__PURE__ */ jsxs(
|
|
1441
1457
|
"li",
|
|
1442
1458
|
{
|
|
1443
|
-
className:
|
|
1459
|
+
className: clsx47(Sidebar_module_default.sidebarItem, i === selectedIndex && Sidebar_module_default.active),
|
|
1444
1460
|
role: "button",
|
|
1445
1461
|
tabIndex: 0,
|
|
1446
1462
|
"aria-pressed": i === selectedIndex,
|
|
@@ -1498,7 +1514,7 @@ var UpcomingEventCard = ({
|
|
|
1498
1514
|
return /* @__PURE__ */ jsxs(
|
|
1499
1515
|
"article",
|
|
1500
1516
|
{
|
|
1501
|
-
className:
|
|
1517
|
+
className: clsx47(
|
|
1502
1518
|
"card",
|
|
1503
1519
|
UpcomingEventCard_module_default["event-card"],
|
|
1504
1520
|
UpcomingEventCard_module_default[direction],
|
|
@@ -1506,26 +1522,26 @@ var UpcomingEventCard = ({
|
|
|
1506
1522
|
className
|
|
1507
1523
|
),
|
|
1508
1524
|
children: [
|
|
1509
|
-
/* @__PURE__ */ jsxs("div", { className:
|
|
1510
|
-
showImage && image && /* @__PURE__ */ jsx(Picture, __spreadProps(__spreadValues({}, image), { className:
|
|
1525
|
+
/* @__PURE__ */ jsxs("div", { className: clsx47("card-content", UpcomingEventCard_module_default["event-card-content"]), children: [
|
|
1526
|
+
showImage && image && /* @__PURE__ */ jsx(Picture, __spreadProps(__spreadValues({}, image), { className: clsx47("card-image", UpcomingEventCard_module_default["event-card-image"]) })),
|
|
1511
1527
|
/* @__PURE__ */ jsxs(
|
|
1512
1528
|
"div",
|
|
1513
1529
|
{
|
|
1514
|
-
className:
|
|
1530
|
+
className: clsx47(
|
|
1515
1531
|
"card-text-content",
|
|
1516
1532
|
UpcomingEventCard_module_default["event-card-text-content"],
|
|
1517
1533
|
(!showImage || !hasImage) && UpcomingEventCard_module_default["event-card-show-image"]
|
|
1518
1534
|
),
|
|
1519
1535
|
children: [
|
|
1520
1536
|
/* @__PURE__ */ jsx("span", { className: UpcomingEventCard_module_default.date, children: date }),
|
|
1521
|
-
title && /* @__PURE__ */ jsx("h3", { className:
|
|
1537
|
+
title && /* @__PURE__ */ jsx("h3", { className: clsx47("card-text-title"), children: title }),
|
|
1522
1538
|
location && /* @__PURE__ */ jsx("span", { className: UpcomingEventCard_module_default.location, children: location }),
|
|
1523
|
-
description && /* @__PURE__ */ jsx("div", { className:
|
|
1524
|
-
cta && cta.url && /* @__PURE__ */ jsx("div", { className:
|
|
1539
|
+
description && /* @__PURE__ */ jsx("div", { className: clsx47("card-text-description", UpcomingEventCard_module_default.description), children: description }),
|
|
1540
|
+
cta && cta.url && /* @__PURE__ */ jsx("div", { className: clsx47("card-cta-wrapper", UpcomingEventCard_module_default["event-card-cta-wrapper"]), children: /* @__PURE__ */ jsx(
|
|
1525
1541
|
Button,
|
|
1526
1542
|
{
|
|
1527
1543
|
variant: "secondary",
|
|
1528
|
-
className:
|
|
1544
|
+
className: clsx47(
|
|
1529
1545
|
"card-cta",
|
|
1530
1546
|
UpcomingEventCard_module_default["event-card-cta"],
|
|
1531
1547
|
!hasCTAandImage && UpcomingEventCard_module_default.hidden
|
|
@@ -1544,12 +1560,12 @@ var UpcomingEventCard = ({
|
|
|
1544
1560
|
cta && cta.url && /* @__PURE__ */ jsx(
|
|
1545
1561
|
"div",
|
|
1546
1562
|
{
|
|
1547
|
-
className:
|
|
1563
|
+
className: clsx47("card-footer", UpcomingEventCard_module_default["event-card-footer"], hasImage && UpcomingEventCard_module_default.hidden),
|
|
1548
1564
|
children: /* @__PURE__ */ jsx(
|
|
1549
1565
|
Button,
|
|
1550
1566
|
{
|
|
1551
1567
|
variant: "secondary",
|
|
1552
|
-
className:
|
|
1568
|
+
className: clsx47("card-cta", UpcomingEventCard_module_default["event-card-cta"]),
|
|
1553
1569
|
fullWidth: isBelowMobile,
|
|
1554
1570
|
href: cta.url,
|
|
1555
1571
|
icon: cta.icon,
|
|
@@ -1597,7 +1613,7 @@ var Badge = forwardRef(
|
|
|
1597
1613
|
"live",
|
|
1598
1614
|
"clickable"
|
|
1599
1615
|
]);
|
|
1600
|
-
const classes =
|
|
1616
|
+
const classes = clsx47(
|
|
1601
1617
|
Badge_module_default.badge,
|
|
1602
1618
|
Badge_module_default[variant],
|
|
1603
1619
|
Badge_module_default[size],
|
|
@@ -1608,7 +1624,7 @@ var Badge = forwardRef(
|
|
|
1608
1624
|
className
|
|
1609
1625
|
);
|
|
1610
1626
|
const content = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1611
|
-
icon && /* @__PURE__ */ jsx(Icon, __spreadValues({ className:
|
|
1627
|
+
icon && /* @__PURE__ */ jsx(Icon, __spreadValues({ className: clsx47("badge-icon", Badge_module_default["badge-icon"]) }, icon)),
|
|
1612
1628
|
!iconOnly && /* @__PURE__ */ jsx("span", { className: Badge_module_default.label, children })
|
|
1613
1629
|
] });
|
|
1614
1630
|
if (clickable) {
|
|
@@ -1689,7 +1705,7 @@ var Input = forwardRef(
|
|
|
1689
1705
|
return /* @__PURE__ */ jsxs(
|
|
1690
1706
|
"div",
|
|
1691
1707
|
{
|
|
1692
|
-
className:
|
|
1708
|
+
className: clsx47(
|
|
1693
1709
|
"input-field",
|
|
1694
1710
|
Input_module_default["input-field"],
|
|
1695
1711
|
{
|
|
@@ -1703,17 +1719,17 @@ var Input = forwardRef(
|
|
|
1703
1719
|
"label",
|
|
1704
1720
|
{
|
|
1705
1721
|
htmlFor: inputId,
|
|
1706
|
-
className:
|
|
1722
|
+
className: clsx47("input-label", Input_module_default.label, {
|
|
1707
1723
|
["sr-only"]: hideLabel
|
|
1708
1724
|
}),
|
|
1709
1725
|
children: [
|
|
1710
1726
|
label,
|
|
1711
|
-
required && /* @__PURE__ */ jsx("span", { className:
|
|
1727
|
+
required && /* @__PURE__ */ jsx("span", { className: clsx47("input-required", Input_module_default.required), "aria-hidden": "true", children: "*" })
|
|
1712
1728
|
]
|
|
1713
1729
|
}
|
|
1714
1730
|
),
|
|
1715
|
-
/* @__PURE__ */ jsxs("div", { className:
|
|
1716
|
-
startAdornment && /* @__PURE__ */ jsx("span", { className:
|
|
1731
|
+
/* @__PURE__ */ jsxs("div", { className: clsx47("input-wrapper", Input_module_default.wrapper), children: [
|
|
1732
|
+
startAdornment && /* @__PURE__ */ jsx("span", { className: clsx47("input-adornment", Input_module_default.adornment), "aria-hidden": "true", children: startAdornment }),
|
|
1717
1733
|
/* @__PURE__ */ jsx(
|
|
1718
1734
|
"input",
|
|
1719
1735
|
__spreadValues({
|
|
@@ -1724,7 +1740,7 @@ var Input = forwardRef(
|
|
|
1724
1740
|
disabled,
|
|
1725
1741
|
"aria-invalid": !!error,
|
|
1726
1742
|
"aria-describedby": describedBy || void 0,
|
|
1727
|
-
className:
|
|
1743
|
+
className: clsx47(
|
|
1728
1744
|
"input",
|
|
1729
1745
|
Input_module_default.input,
|
|
1730
1746
|
{
|
|
@@ -1735,11 +1751,11 @@ var Input = forwardRef(
|
|
|
1735
1751
|
)
|
|
1736
1752
|
}, props)
|
|
1737
1753
|
),
|
|
1738
|
-
endAdornment && /* @__PURE__ */ jsx("span", { className:
|
|
1739
|
-
endAction && /* @__PURE__ */ jsx("span", { className:
|
|
1754
|
+
endAdornment && /* @__PURE__ */ jsx("span", { className: clsx47("input-adornment", Input_module_default.adornment), "aria-hidden": "true", children: endAdornment }),
|
|
1755
|
+
endAction && /* @__PURE__ */ jsx("span", { className: clsx47("input-end-action"), children: endAction })
|
|
1740
1756
|
] }),
|
|
1741
|
-
helperText && !error && /* @__PURE__ */ jsx("p", { id: helperTextId, className:
|
|
1742
|
-
error && /* @__PURE__ */ jsx("p", { id: errorId, className:
|
|
1757
|
+
helperText && !error && /* @__PURE__ */ jsx("p", { id: helperTextId, className: clsx47("input-helper-text", Input_module_default["helper-text"]), children: helperText }),
|
|
1758
|
+
error && /* @__PURE__ */ jsx("p", { id: errorId, className: clsx47("input-error", Input_module_default.error), role: "alert", children: error })
|
|
1743
1759
|
]
|
|
1744
1760
|
}
|
|
1745
1761
|
);
|
|
@@ -1779,14 +1795,14 @@ var NewsCard = ({
|
|
|
1779
1795
|
href: cta.url,
|
|
1780
1796
|
target: cta.isExternal ? "_blank" : void 0,
|
|
1781
1797
|
rel: cta.isExternal ? "noopener noreferrer" : void 0,
|
|
1782
|
-
className:
|
|
1798
|
+
className: clsx47("news-card-link", NewsCard_module_default["news-card-link"]),
|
|
1783
1799
|
"aria-label": `${title}${cta.label ? ` \u2014 ${cta.label}` : ""}`
|
|
1784
1800
|
} : null;
|
|
1785
1801
|
const cardLink = linkProps ? renderLink ? renderLink(__spreadProps(__spreadValues({}, linkProps), { children: null })) : /* @__PURE__ */ jsx("a", __spreadValues({}, linkProps)) : null;
|
|
1786
1802
|
return /* @__PURE__ */ jsxs(
|
|
1787
1803
|
"article",
|
|
1788
1804
|
{
|
|
1789
|
-
className:
|
|
1805
|
+
className: clsx47(
|
|
1790
1806
|
"news-card",
|
|
1791
1807
|
NewsCard_module_default["news-card"],
|
|
1792
1808
|
NewsCard_module_default[`news-card--${direction}`],
|
|
@@ -1794,28 +1810,28 @@ var NewsCard = ({
|
|
|
1794
1810
|
),
|
|
1795
1811
|
children: [
|
|
1796
1812
|
cardLink,
|
|
1797
|
-
image && /* @__PURE__ */ jsx(Picture, __spreadProps(__spreadValues({}, image), { className:
|
|
1813
|
+
image && /* @__PURE__ */ jsx(Picture, __spreadProps(__spreadValues({}, image), { className: clsx47("news-card-image", NewsCard_module_default["news-card-image"]) })),
|
|
1798
1814
|
/* @__PURE__ */ jsxs(
|
|
1799
1815
|
"div",
|
|
1800
1816
|
{
|
|
1801
|
-
className:
|
|
1817
|
+
className: clsx47("news-card-content", NewsCard_module_default["news-card-content"]),
|
|
1802
1818
|
style: {
|
|
1803
1819
|
"--no-image-padding": image && image.src ? 0 : "1rem"
|
|
1804
1820
|
},
|
|
1805
1821
|
children: [
|
|
1806
|
-
/* @__PURE__ */ jsxs("div", { className:
|
|
1807
|
-
/* @__PURE__ */ jsx(Badge, { className:
|
|
1808
|
-
/* @__PURE__ */ jsx("time", { dateTime: date.value, className:
|
|
1822
|
+
/* @__PURE__ */ jsxs("div", { className: clsx47("news-card-top-content", NewsCard_module_default["news-card-top-content"]), children: [
|
|
1823
|
+
/* @__PURE__ */ jsx(Badge, { className: clsx47("news-card-badge", NewsCard_module_default["news-card-badge"]), children: tag }),
|
|
1824
|
+
/* @__PURE__ */ jsx("time", { dateTime: date.value, className: clsx47("news-card-date", NewsCard_module_default["news-card-date"]), children: date.label })
|
|
1809
1825
|
] }),
|
|
1810
|
-
/* @__PURE__ */ jsxs("div", { className:
|
|
1811
|
-
/* @__PURE__ */ jsx("h3", { className:
|
|
1812
|
-
typeof description === "string" ? /* @__PURE__ */ jsx("p", { className:
|
|
1826
|
+
/* @__PURE__ */ jsxs("div", { className: clsx47("news-card-main-content", NewsCard_module_default["news-card-main-content"]), children: [
|
|
1827
|
+
/* @__PURE__ */ jsx("h3", { className: clsx47("news-card-title", NewsCard_module_default["news-card-title"]), children: title }),
|
|
1828
|
+
typeof description === "string" ? /* @__PURE__ */ jsx("p", { className: clsx47("news-card-description", NewsCard_module_default["news-card-description"]), children: description }) : description
|
|
1813
1829
|
] }),
|
|
1814
|
-
cta && cta.url && /* @__PURE__ */ jsx("div", { className:
|
|
1830
|
+
cta && cta.url && /* @__PURE__ */ jsx("div", { className: clsx47("news-card-cta-wrapper", NewsCard_module_default["news-card-cta-wrapper"]), children: /* @__PURE__ */ jsx(
|
|
1815
1831
|
Button,
|
|
1816
1832
|
{
|
|
1817
1833
|
variant: "secondary",
|
|
1818
|
-
className:
|
|
1834
|
+
className: clsx47("news-card-cta", NewsCard_module_default["news-card-cta"]),
|
|
1819
1835
|
href: cta.url,
|
|
1820
1836
|
icon: cta.icon,
|
|
1821
1837
|
isExternal: cta == null ? void 0 : cta.isExternal,
|
|
@@ -1846,13 +1862,278 @@ var BlogPostContent = ({ className, body, children }) => {
|
|
|
1846
1862
|
body: BlogPostContentBody
|
|
1847
1863
|
});
|
|
1848
1864
|
const bodyNode = (_a = slots.body) != null ? _a : body;
|
|
1849
|
-
return /* @__PURE__ */ jsx("div", { className:
|
|
1865
|
+
return /* @__PURE__ */ jsx("div", { className: clsx47("blog-post-content", BlogPostContent_module_default["blog-post-content"], className), children: bodyNode });
|
|
1850
1866
|
};
|
|
1851
1867
|
|
|
1852
1868
|
// src/components/BlogPostContent/index.ts
|
|
1853
1869
|
var BlogPostContent2 = Object.assign(BlogPostContent, {
|
|
1854
1870
|
Body: BlogPostContentBody
|
|
1855
1871
|
});
|
|
1872
|
+
|
|
1873
|
+
// src/components/Search/Search.module.scss
|
|
1874
|
+
var Search_module_default = {
|
|
1875
|
+
search: "Search_module_search",
|
|
1876
|
+
searchButton: "Search_module_searchButton",
|
|
1877
|
+
searchField: "Search_module_searchField",
|
|
1878
|
+
searchFieldLine: "Search_module_searchFieldLine",
|
|
1879
|
+
searchInput: "Search_module_searchInput",
|
|
1880
|
+
searchFieldPill: "Search_module_searchFieldPill",
|
|
1881
|
+
searchSubmit: "Search_module_searchSubmit"
|
|
1882
|
+
};
|
|
1883
|
+
var Search = ({
|
|
1884
|
+
placeholder = "Search",
|
|
1885
|
+
searchCta,
|
|
1886
|
+
onSearch,
|
|
1887
|
+
variant = "expandable",
|
|
1888
|
+
className
|
|
1889
|
+
}) => {
|
|
1890
|
+
const isPill = variant === "pill";
|
|
1891
|
+
const [isOpen, setIsOpen] = useState(isPill);
|
|
1892
|
+
const [query, setQuery] = useState("");
|
|
1893
|
+
const inputRef = useRef(null);
|
|
1894
|
+
useEffect(() => {
|
|
1895
|
+
var _a;
|
|
1896
|
+
if (isOpen && !isPill) (_a = inputRef.current) == null ? void 0 : _a.focus();
|
|
1897
|
+
}, [isOpen, isPill]);
|
|
1898
|
+
const submit = () => {
|
|
1899
|
+
const value = query.trim();
|
|
1900
|
+
if (!value) return;
|
|
1901
|
+
onSearch == null ? void 0 : onSearch(value);
|
|
1902
|
+
if (searchCta == null ? void 0 : searchCta.url) {
|
|
1903
|
+
const separator = searchCta.url.includes("?") ? "&" : "?";
|
|
1904
|
+
window.location.href = `${searchCta.url}${separator}q=${encodeURIComponent(value)}`;
|
|
1905
|
+
}
|
|
1906
|
+
};
|
|
1907
|
+
const handleKeyDown = (e) => {
|
|
1908
|
+
if (e.key === "Enter") {
|
|
1909
|
+
e.preventDefault();
|
|
1910
|
+
submit();
|
|
1911
|
+
} else if (e.key === "Escape" && !isPill) {
|
|
1912
|
+
setIsOpen(false);
|
|
1913
|
+
}
|
|
1914
|
+
};
|
|
1915
|
+
if (!isOpen) {
|
|
1916
|
+
return /* @__PURE__ */ jsx("div", { className: clsx47(Search_module_default.search, className), children: /* @__PURE__ */ jsx(
|
|
1917
|
+
"button",
|
|
1918
|
+
{
|
|
1919
|
+
type: "button",
|
|
1920
|
+
className: Search_module_default.searchButton,
|
|
1921
|
+
"aria-label": (searchCta == null ? void 0 : searchCta.label) || "Search",
|
|
1922
|
+
"aria-expanded": false,
|
|
1923
|
+
onClick: () => setIsOpen(true),
|
|
1924
|
+
children: /* @__PURE__ */ jsx(Icon, { type: "search", size: 32, "aria-hidden": "true" })
|
|
1925
|
+
}
|
|
1926
|
+
) });
|
|
1927
|
+
}
|
|
1928
|
+
return /* @__PURE__ */ jsx("div", { className: clsx47(Search_module_default.search, className), children: /* @__PURE__ */ jsxs(
|
|
1929
|
+
"div",
|
|
1930
|
+
{
|
|
1931
|
+
className: clsx47(
|
|
1932
|
+
Search_module_default.searchField,
|
|
1933
|
+
isPill ? Search_module_default.searchFieldPill : Search_module_default.searchFieldLine
|
|
1934
|
+
),
|
|
1935
|
+
children: [
|
|
1936
|
+
isPill && /* @__PURE__ */ jsx(
|
|
1937
|
+
"button",
|
|
1938
|
+
{
|
|
1939
|
+
type: "button",
|
|
1940
|
+
className: Search_module_default.searchSubmit,
|
|
1941
|
+
"aria-label": (searchCta == null ? void 0 : searchCta.label) || "Search",
|
|
1942
|
+
onClick: submit,
|
|
1943
|
+
children: /* @__PURE__ */ jsx(Icon, { type: "search", size: 24, "aria-hidden": "true" })
|
|
1944
|
+
}
|
|
1945
|
+
),
|
|
1946
|
+
/* @__PURE__ */ jsx(
|
|
1947
|
+
"input",
|
|
1948
|
+
{
|
|
1949
|
+
ref: inputRef,
|
|
1950
|
+
type: "search",
|
|
1951
|
+
className: Search_module_default.searchInput,
|
|
1952
|
+
placeholder,
|
|
1953
|
+
value: query,
|
|
1954
|
+
"aria-label": placeholder,
|
|
1955
|
+
onChange: (e) => setQuery(e.target.value),
|
|
1956
|
+
onKeyDown: handleKeyDown,
|
|
1957
|
+
onBlur: () => !isPill && !query && setIsOpen(false)
|
|
1958
|
+
}
|
|
1959
|
+
),
|
|
1960
|
+
!isPill ? /* @__PURE__ */ jsx(
|
|
1961
|
+
"button",
|
|
1962
|
+
{
|
|
1963
|
+
type: "button",
|
|
1964
|
+
className: Search_module_default.searchSubmit,
|
|
1965
|
+
"aria-label": (searchCta == null ? void 0 : searchCta.label) || "Search",
|
|
1966
|
+
onClick: submit,
|
|
1967
|
+
children: /* @__PURE__ */ jsx(Icon, { type: "search", size: 24, "aria-hidden": "true" })
|
|
1968
|
+
}
|
|
1969
|
+
) : query && /* @__PURE__ */ jsx(
|
|
1970
|
+
"button",
|
|
1971
|
+
{
|
|
1972
|
+
type: "button",
|
|
1973
|
+
className: Search_module_default.searchSubmit,
|
|
1974
|
+
"aria-label": "Submit search",
|
|
1975
|
+
onClick: submit,
|
|
1976
|
+
children: /* @__PURE__ */ jsx(Icon, { type: "rightBlack", size: 24, "aria-hidden": "true" })
|
|
1977
|
+
}
|
|
1978
|
+
)
|
|
1979
|
+
]
|
|
1980
|
+
}
|
|
1981
|
+
) });
|
|
1982
|
+
};
|
|
1983
|
+
|
|
1984
|
+
// src/components/UserMenu/UserMenu.module.scss
|
|
1985
|
+
var UserMenu_module_default = {
|
|
1986
|
+
userButton: "UserMenu_module_userButton",
|
|
1987
|
+
userMenuWrapper: "UserMenu_module_userMenuWrapper",
|
|
1988
|
+
fullWidth: "UserMenu_module_fullWidth",
|
|
1989
|
+
userChevron: "UserMenu_module_userChevron",
|
|
1990
|
+
userChevronOpen: "UserMenu_module_userChevronOpen",
|
|
1991
|
+
userMenu: "UserMenu_module_userMenu",
|
|
1992
|
+
userMenuUp: "UserMenu_module_userMenuUp",
|
|
1993
|
+
userMenuItem: "UserMenu_module_userMenuItem",
|
|
1994
|
+
userMenuItemDanger: "UserMenu_module_userMenuItemDanger",
|
|
1995
|
+
userAvatar: "UserMenu_module_userAvatar",
|
|
1996
|
+
userInner: "UserMenu_module_userInner",
|
|
1997
|
+
userLabel: "UserMenu_module_userLabel"
|
|
1998
|
+
};
|
|
1999
|
+
var UserMenu = ({ user, className, dropUp, fullWidth }) => {
|
|
2000
|
+
var _a, _b, _c;
|
|
2001
|
+
const [isOpen, setIsOpen] = useState(false);
|
|
2002
|
+
const wrapperRef = useRef(null);
|
|
2003
|
+
const closeTimer = useRef(null);
|
|
2004
|
+
const hasMenu = !!((_a = user.menuItems) == null ? void 0 : _a.length);
|
|
2005
|
+
const openMenu = () => {
|
|
2006
|
+
if (closeTimer.current) clearTimeout(closeTimer.current);
|
|
2007
|
+
setIsOpen(true);
|
|
2008
|
+
};
|
|
2009
|
+
const scheduleClose = () => {
|
|
2010
|
+
if (closeTimer.current) clearTimeout(closeTimer.current);
|
|
2011
|
+
closeTimer.current = setTimeout(() => setIsOpen(false), 120);
|
|
2012
|
+
};
|
|
2013
|
+
const handleBlur = (e) => {
|
|
2014
|
+
var _a2;
|
|
2015
|
+
if (!((_a2 = wrapperRef.current) == null ? void 0 : _a2.contains(e.relatedTarget))) {
|
|
2016
|
+
setIsOpen(false);
|
|
2017
|
+
}
|
|
2018
|
+
};
|
|
2019
|
+
useEffect(() => {
|
|
2020
|
+
return () => {
|
|
2021
|
+
if (closeTimer.current) clearTimeout(closeTimer.current);
|
|
2022
|
+
};
|
|
2023
|
+
}, []);
|
|
2024
|
+
useEffect(() => {
|
|
2025
|
+
if (!isOpen) return;
|
|
2026
|
+
const handleKey = (e) => {
|
|
2027
|
+
if (e.key === "Escape") setIsOpen(false);
|
|
2028
|
+
};
|
|
2029
|
+
const handleOutside = (e) => {
|
|
2030
|
+
if (wrapperRef.current && !wrapperRef.current.contains(e.target)) {
|
|
2031
|
+
setIsOpen(false);
|
|
2032
|
+
}
|
|
2033
|
+
};
|
|
2034
|
+
document.addEventListener("keydown", handleKey);
|
|
2035
|
+
document.addEventListener("pointerdown", handleOutside);
|
|
2036
|
+
return () => {
|
|
2037
|
+
document.removeEventListener("keydown", handleKey);
|
|
2038
|
+
document.removeEventListener("pointerdown", handleOutside);
|
|
2039
|
+
};
|
|
2040
|
+
}, [isOpen]);
|
|
2041
|
+
const avatar = user.avatar ? /* @__PURE__ */ jsx(Picture, { className: UserMenu_module_default.userAvatar, src: user.avatar.src, alt: (_b = user.avatar.alt) != null ? _b : "" }) : /* @__PURE__ */ jsx(Icon, { type: "user", size: 24, className: UserMenu_module_default.userAvatar, "aria-hidden": "true" });
|
|
2042
|
+
if (!hasMenu) {
|
|
2043
|
+
const content = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2044
|
+
avatar,
|
|
2045
|
+
/* @__PURE__ */ jsxs("span", { className: UserMenu_module_default.userInner, children: [
|
|
2046
|
+
/* @__PURE__ */ jsx("span", { className: UserMenu_module_default.userLabel, children: user.label }),
|
|
2047
|
+
/* @__PURE__ */ jsx(Icon, { type: "downChevronBlack", size: 13, "aria-hidden": "true" })
|
|
2048
|
+
] })
|
|
2049
|
+
] });
|
|
2050
|
+
const rootClass = clsx47(UserMenu_module_default.userButton, fullWidth && UserMenu_module_default.fullWidth, className);
|
|
2051
|
+
return user.url ? /* @__PURE__ */ jsx(
|
|
2052
|
+
"a",
|
|
2053
|
+
{
|
|
2054
|
+
href: user.url,
|
|
2055
|
+
className: rootClass,
|
|
2056
|
+
target: user.isExternal ? "_blank" : void 0,
|
|
2057
|
+
rel: user.isExternal ? "noopener noreferrer" : void 0,
|
|
2058
|
+
children: content
|
|
2059
|
+
}
|
|
2060
|
+
) : /* @__PURE__ */ jsx("button", { type: "button", className: rootClass, children: content });
|
|
2061
|
+
}
|
|
2062
|
+
return /* @__PURE__ */ jsxs(
|
|
2063
|
+
"div",
|
|
2064
|
+
{
|
|
2065
|
+
className: clsx47(UserMenu_module_default.userMenuWrapper, fullWidth && UserMenu_module_default.fullWidth, className),
|
|
2066
|
+
ref: wrapperRef,
|
|
2067
|
+
onMouseLeave: scheduleClose,
|
|
2068
|
+
onBlur: handleBlur,
|
|
2069
|
+
children: [
|
|
2070
|
+
/* @__PURE__ */ jsxs(
|
|
2071
|
+
Button,
|
|
2072
|
+
{
|
|
2073
|
+
variant: "grey",
|
|
2074
|
+
type: "button",
|
|
2075
|
+
className: UserMenu_module_default.userButton,
|
|
2076
|
+
"aria-haspopup": "menu",
|
|
2077
|
+
"aria-expanded": isOpen,
|
|
2078
|
+
onMouseEnter: openMenu,
|
|
2079
|
+
onFocus: openMenu,
|
|
2080
|
+
onClick: () => setIsOpen((prev) => !prev),
|
|
2081
|
+
children: [
|
|
2082
|
+
avatar,
|
|
2083
|
+
/* @__PURE__ */ jsxs("span", { className: UserMenu_module_default.userInner, children: [
|
|
2084
|
+
/* @__PURE__ */ jsx("span", { className: UserMenu_module_default.userLabel, children: user.label }),
|
|
2085
|
+
/* @__PURE__ */ jsx("span", { className: clsx47(UserMenu_module_default.userChevron, isOpen && UserMenu_module_default.userChevronOpen), children: /* @__PURE__ */ jsx(Icon, { type: "downChevronBlack", size: 13, "aria-hidden": "true" }) })
|
|
2086
|
+
] })
|
|
2087
|
+
]
|
|
2088
|
+
}
|
|
2089
|
+
),
|
|
2090
|
+
isOpen && /* @__PURE__ */ jsx(
|
|
2091
|
+
"div",
|
|
2092
|
+
{
|
|
2093
|
+
className: clsx47(UserMenu_module_default.userMenu, dropUp && UserMenu_module_default.userMenuUp),
|
|
2094
|
+
role: "menu",
|
|
2095
|
+
onMouseEnter: openMenu,
|
|
2096
|
+
onMouseLeave: scheduleClose,
|
|
2097
|
+
children: (_c = user.menuItems) == null ? void 0 : _c.map((item, i) => {
|
|
2098
|
+
const itemClass = clsx47(
|
|
2099
|
+
UserMenu_module_default.userMenuItem,
|
|
2100
|
+
item.variant === "danger" && UserMenu_module_default.userMenuItemDanger
|
|
2101
|
+
);
|
|
2102
|
+
const handleClick = () => {
|
|
2103
|
+
var _a2;
|
|
2104
|
+
(_a2 = item.onClick) == null ? void 0 : _a2.call(item);
|
|
2105
|
+
setIsOpen(false);
|
|
2106
|
+
};
|
|
2107
|
+
return item.url ? /* @__PURE__ */ jsx(
|
|
2108
|
+
"a",
|
|
2109
|
+
{
|
|
2110
|
+
href: item.url,
|
|
2111
|
+
role: "menuitem",
|
|
2112
|
+
className: itemClass,
|
|
2113
|
+
target: item.isExternal ? "_blank" : void 0,
|
|
2114
|
+
rel: item.isExternal ? "noopener noreferrer" : void 0,
|
|
2115
|
+
onClick: handleClick,
|
|
2116
|
+
children: item.label
|
|
2117
|
+
},
|
|
2118
|
+
i
|
|
2119
|
+
) : /* @__PURE__ */ jsx(
|
|
2120
|
+
"button",
|
|
2121
|
+
{
|
|
2122
|
+
type: "button",
|
|
2123
|
+
role: "menuitem",
|
|
2124
|
+
className: itemClass,
|
|
2125
|
+
onClick: handleClick,
|
|
2126
|
+
children: item.label
|
|
2127
|
+
},
|
|
2128
|
+
i
|
|
2129
|
+
);
|
|
2130
|
+
})
|
|
2131
|
+
}
|
|
2132
|
+
)
|
|
2133
|
+
]
|
|
2134
|
+
}
|
|
2135
|
+
);
|
|
2136
|
+
};
|
|
1856
2137
|
var CardCollectionTitle = ({ children }) => {
|
|
1857
2138
|
return /* @__PURE__ */ jsx(Fragment, { children });
|
|
1858
2139
|
};
|
|
@@ -1932,13 +2213,13 @@ var CardCollection = ({
|
|
|
1932
2213
|
Container,
|
|
1933
2214
|
{
|
|
1934
2215
|
ref: container,
|
|
1935
|
-
className:
|
|
2216
|
+
className: clsx47(CardCollection_module_default["card-collection"], CardCollection_module_default[variant], className),
|
|
1936
2217
|
children: [
|
|
1937
2218
|
/* @__PURE__ */ jsxs("div", { className: CardCollection_module_default.content, children: [
|
|
1938
2219
|
titleNode && /* @__PURE__ */ jsx("h2", { children: titleNode }),
|
|
1939
2220
|
subtitleNode && /* @__PURE__ */ jsx("div", { className: "subheading", children: subtitleNode })
|
|
1940
2221
|
] }),
|
|
1941
|
-
/* @__PURE__ */ jsx("div", { className: CardCollection_module_default.wrapper, children: /* @__PURE__ */ jsxs("div", { className:
|
|
2222
|
+
/* @__PURE__ */ jsx("div", { className: CardCollection_module_default.wrapper, children: /* @__PURE__ */ jsxs("div", { className: clsx47(CardCollection_module_default.cardWrapper, { [CardCollection_module_default["is-expanded"]]: isExpanded }), children: [
|
|
1942
2223
|
visibleCards.map((card, key) => /* @__PURE__ */ jsx(Card2, __spreadValues({ className: CardCollection_module_default.card, variant: theme }, card), key)),
|
|
1943
2224
|
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(
|
|
1944
2225
|
Card2,
|
|
@@ -2039,7 +2320,7 @@ var ContactModule = ({
|
|
|
2039
2320
|
},
|
|
2040
2321
|
{ scope: containerRef, dependencies: [blurred, animateBlur] }
|
|
2041
2322
|
);
|
|
2042
|
-
return /* @__PURE__ */ jsxs("div", { ref: containerRef, className:
|
|
2323
|
+
return /* @__PURE__ */ jsxs("div", { ref: containerRef, className: clsx47(ContactModule_module_default["contact-module"], className), children: [
|
|
2043
2324
|
blurred && /* @__PURE__ */ jsx(
|
|
2044
2325
|
"div",
|
|
2045
2326
|
{
|
|
@@ -2054,8 +2335,8 @@ var ContactModule = ({
|
|
|
2054
2335
|
/* @__PURE__ */ jsxs(Container, { className: ContactModule_module_default.container, children: [
|
|
2055
2336
|
/* @__PURE__ */ jsxs("div", { className: ContactModule_module_default.wrapper, children: [
|
|
2056
2337
|
/* @__PURE__ */ jsxs("div", { className: ContactModule_module_default.content, children: [
|
|
2057
|
-
titleNode && /* @__PURE__ */ jsx("div", { className:
|
|
2058
|
-
subtitleNode && /* @__PURE__ */ jsx("div", { className:
|
|
2338
|
+
titleNode && /* @__PURE__ */ jsx("div", { className: clsx47(ContactModule_module_default.title, "h1"), children: titleNode }),
|
|
2339
|
+
subtitleNode && /* @__PURE__ */ jsx("div", { className: clsx47(ContactModule_module_default.subtitle, "subheading"), children: subtitleNode })
|
|
2059
2340
|
] }),
|
|
2060
2341
|
/* @__PURE__ */ jsx("div", { className: ContactModule_module_default["cta-wrapper"], children: ctas == null ? void 0 : ctas.map((cta, key) => /* @__PURE__ */ jsx(
|
|
2061
2342
|
Button,
|
|
@@ -2124,7 +2405,7 @@ var Footer = ({
|
|
|
2124
2405
|
disclaimer: FooterDisclaimer
|
|
2125
2406
|
});
|
|
2126
2407
|
const titleNode = (_a = slots.disclaimer) != null ? _a : disclaimer;
|
|
2127
|
-
return /* @__PURE__ */ jsx("footer", { className:
|
|
2408
|
+
return /* @__PURE__ */ jsx("footer", { className: clsx47(Footer_module_default.footer, className), children: /* @__PURE__ */ jsxs(Container, { className: Footer_module_default.container, children: [
|
|
2128
2409
|
supportContacts.length > 0 && /* @__PURE__ */ jsxs("div", { className: Footer_module_default["support-section"], children: [
|
|
2129
2410
|
/* @__PURE__ */ jsx("p", { className: Footer_module_default["support-heading"], children: "SUPPORT" }),
|
|
2130
2411
|
/* @__PURE__ */ jsx("div", { className: Footer_module_default.support, children: supportColumns.map((column, colIdx) => /* @__PURE__ */ jsx("div", { className: Footer_module_default["support-column"], children: column.map((group, i) => /* @__PURE__ */ jsxs("div", { className: Footer_module_default["support-group"], children: [
|
|
@@ -2153,7 +2434,7 @@ var Footer = ({
|
|
|
2153
2434
|
index
|
|
2154
2435
|
) : /* @__PURE__ */ jsx("div", { className: Footer_module_default["supporter-link-primary"], children: /* @__PURE__ */ jsx(Picture, __spreadValues({}, supporter.image)) }, index)
|
|
2155
2436
|
) }) }),
|
|
2156
|
-
titleNode && /* @__PURE__ */ jsx("div", { className:
|
|
2437
|
+
titleNode && /* @__PURE__ */ jsx("div", { className: clsx47(Footer_module_default.disclaimer, "p"), children: titleNode }),
|
|
2157
2438
|
copyright && /* @__PURE__ */ jsx("p", { className: Footer_module_default.copyright, children: copyright })
|
|
2158
2439
|
] }),
|
|
2159
2440
|
navigationLinks.length > 0 && /* @__PURE__ */ jsx("nav", { className: Footer_module_default["bottom-right"], children: /* @__PURE__ */ jsx("ul", { className: Footer_module_default["nav-list"], children: navigationLinks.map((link) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(
|
|
@@ -2179,7 +2460,7 @@ var LogoBar_module_default = {
|
|
|
2179
2460
|
};
|
|
2180
2461
|
var LogoBar = ({ className, items }) => {
|
|
2181
2462
|
if (!items || items.length === 0) return null;
|
|
2182
|
-
return /* @__PURE__ */ jsx("div", { className:
|
|
2463
|
+
return /* @__PURE__ */ jsx("div", { className: clsx47(LogoBar_module_default.logoBar, className), children: items.map((item, key) => {
|
|
2183
2464
|
return /* @__PURE__ */ jsx(Anchor, { href: item.url, isExternal: item.isExternal, children: /* @__PURE__ */ jsxs("div", { className: LogoBar_module_default.logoWrapper, children: [
|
|
2184
2465
|
item.logo && /* @__PURE__ */ jsx(Picture, __spreadValues({ className: LogoBar_module_default.logo }, item.logo)),
|
|
2185
2466
|
item.hoverLogo && /* @__PURE__ */ jsx(Picture, __spreadValues({ className: LogoBar_module_default.logoHover }, item.hoverLogo))
|
|
@@ -2251,7 +2532,7 @@ var HeroBanner = ({
|
|
|
2251
2532
|
});
|
|
2252
2533
|
const titleNode = (_a = slots.title) != null ? _a : title;
|
|
2253
2534
|
const subtitleNode = (_b = slots.subtitle) != null ? _b : subtitle;
|
|
2254
|
-
return /* @__PURE__ */ jsxs("div", { className:
|
|
2535
|
+
return /* @__PURE__ */ jsxs("div", { className: clsx47(HeroBanner_module_default.heroBanner, HeroBanner_module_default[variant], className), children: [
|
|
2255
2536
|
/* @__PURE__ */ jsxs("div", { className: HeroBanner_module_default.container, children: [
|
|
2256
2537
|
/* @__PURE__ */ jsxs("div", { className: HeroBanner_module_default.banner, children: [
|
|
2257
2538
|
(titleNode || subtitleNode) && /* @__PURE__ */ jsxs("div", { className: HeroBanner_module_default.text, children: [
|
|
@@ -2261,7 +2542,7 @@ var HeroBanner = ({
|
|
|
2261
2542
|
{
|
|
2262
2543
|
tag: "h2",
|
|
2263
2544
|
promoteToH1,
|
|
2264
|
-
className:
|
|
2545
|
+
className: clsx47(HeroBanner_module_default.title, vBannerPodcast ? "h3" : "h1"),
|
|
2265
2546
|
children: titleNode
|
|
2266
2547
|
}
|
|
2267
2548
|
),
|
|
@@ -2270,7 +2551,7 @@ var HeroBanner = ({
|
|
|
2270
2551
|
{
|
|
2271
2552
|
tag: "div",
|
|
2272
2553
|
promoteToH1: promoteToH1 && !titleNode,
|
|
2273
|
-
className:
|
|
2554
|
+
className: clsx47(HeroBanner_module_default.subtitle, "subheading"),
|
|
2274
2555
|
children: subtitleNode
|
|
2275
2556
|
}
|
|
2276
2557
|
)
|
|
@@ -2347,7 +2628,7 @@ var HeroBannerCarousel = ({
|
|
|
2347
2628
|
const [swiperInstance, setSwiperInstance] = useState(null);
|
|
2348
2629
|
const [activeIndex, setActiveIndex] = useState(0);
|
|
2349
2630
|
if (!items.length) return null;
|
|
2350
|
-
return /* @__PURE__ */ jsx("div", { className:
|
|
2631
|
+
return /* @__PURE__ */ jsx("div", { className: clsx47(HeroBannerCarousel_module_default.heroBannerCarousel, className), children: /* @__PURE__ */ jsxs("div", { className: HeroBannerCarousel_module_default.inner, children: [
|
|
2351
2632
|
/* @__PURE__ */ jsx("div", { className: HeroBannerCarousel_module_default.swiperContainer, children: /* @__PURE__ */ jsx(
|
|
2352
2633
|
Swiper,
|
|
2353
2634
|
{
|
|
@@ -2394,7 +2675,7 @@ var HeroBannerCarousel = ({
|
|
|
2394
2675
|
/* @__PURE__ */ jsx("div", { className: HeroBannerCarousel_module_default.pagination, children: items.map((_, index) => /* @__PURE__ */ jsx(
|
|
2395
2676
|
"button",
|
|
2396
2677
|
{
|
|
2397
|
-
className:
|
|
2678
|
+
className: clsx47(HeroBannerCarousel_module_default.dot, index === activeIndex && HeroBannerCarousel_module_default.dotActive),
|
|
2398
2679
|
onClick: () => swiperInstance == null ? void 0 : swiperInstance.slideTo(index),
|
|
2399
2680
|
"aria-label": `Go to slide ${index + 1}`
|
|
2400
2681
|
},
|
|
@@ -2474,7 +2755,7 @@ var AccordionItem = ({
|
|
|
2474
2755
|
return /* @__PURE__ */ jsxs(
|
|
2475
2756
|
"div",
|
|
2476
2757
|
{
|
|
2477
|
-
className:
|
|
2758
|
+
className: clsx47(
|
|
2478
2759
|
Accordion_module_default.accordionItem,
|
|
2479
2760
|
{
|
|
2480
2761
|
[Accordion_module_default.accordionItemOpen]: isOpen
|
|
@@ -2485,18 +2766,18 @@ var AccordionItem = ({
|
|
|
2485
2766
|
/* @__PURE__ */ jsxs(
|
|
2486
2767
|
"button",
|
|
2487
2768
|
{
|
|
2488
|
-
className:
|
|
2769
|
+
className: clsx47(Accordion_module_default.accordionHeader, {
|
|
2489
2770
|
[Accordion_module_default.accordionHeaderOpen]: isOpen
|
|
2490
2771
|
}),
|
|
2491
2772
|
onClick: handleToggle,
|
|
2492
2773
|
"aria-expanded": isOpen,
|
|
2493
2774
|
"aria-label": `Toggle ${title}`,
|
|
2494
2775
|
children: [
|
|
2495
|
-
/* @__PURE__ */ jsx("div", { className: Accordion_module_default.accordionHeaderLeft, children: /* @__PURE__ */ jsx("span", { className:
|
|
2776
|
+
/* @__PURE__ */ jsx("div", { className: Accordion_module_default.accordionHeaderLeft, children: /* @__PURE__ */ jsx("span", { className: clsx47("body", Accordion_module_default.accordionTitle), children: title }) }),
|
|
2496
2777
|
/* @__PURE__ */ jsx(
|
|
2497
2778
|
"span",
|
|
2498
2779
|
{
|
|
2499
|
-
className:
|
|
2780
|
+
className: clsx47(Accordion_module_default.accordionChevron, {
|
|
2500
2781
|
[Accordion_module_default.accordionChevronOpen]: isOpen
|
|
2501
2782
|
}),
|
|
2502
2783
|
children: isOpen ? /* @__PURE__ */ jsx(Icon, { type: "filledChevronUpBlack", size: 40 }) : /* @__PURE__ */ jsx(Icon, { type: "circleChevronDown", size: 40 })
|
|
@@ -2548,7 +2829,7 @@ var Accordion = ({
|
|
|
2548
2829
|
if (items.length === 0) {
|
|
2549
2830
|
return null;
|
|
2550
2831
|
}
|
|
2551
|
-
return /* @__PURE__ */ jsx("div", { className:
|
|
2832
|
+
return /* @__PURE__ */ jsx("div", { className: clsx47(Accordion_module_default.accordion, className), children: items.map((item) => /* @__PURE__ */ jsx(
|
|
2552
2833
|
AccordionItem,
|
|
2553
2834
|
{
|
|
2554
2835
|
id: item.id,
|
|
@@ -2638,7 +2919,7 @@ var InternalBrandsTab = (props) => {
|
|
|
2638
2919
|
};
|
|
2639
2920
|
})) || [];
|
|
2640
2921
|
}, [tabs]);
|
|
2641
|
-
return /* @__PURE__ */ jsxs(Container, { className:
|
|
2922
|
+
return /* @__PURE__ */ jsxs(Container, { className: clsx47(InternalBrandsTab_module_default.internalBrandsTab, className), children: [
|
|
2642
2923
|
/* @__PURE__ */ jsxs("div", { className: InternalBrandsTab_module_default.textsContainer, children: [
|
|
2643
2924
|
title && /* @__PURE__ */ jsx(Text, { tag: "h2", className: InternalBrandsTab_module_default.title, children: title }),
|
|
2644
2925
|
subTitle && /* @__PURE__ */ jsx("div", { className: InternalBrandsTab_module_default.subTitle, children: subTitle })
|
|
@@ -2654,7 +2935,7 @@ var InternalBrandsTab = (props) => {
|
|
|
2654
2935
|
},
|
|
2655
2936
|
index
|
|
2656
2937
|
)) }),
|
|
2657
|
-
/* @__PURE__ */ jsx("div", { className:
|
|
2938
|
+
/* @__PURE__ */ jsx("div", { className: clsx47(InternalBrandsTab_module_default.contentArea), children: ((_a = tabs == null ? void 0 : tabs[activeIndex]) == null ? void 0 : _a.topContent) && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2658
2939
|
/* @__PURE__ */ jsxs("div", { className: InternalBrandsTab_module_default.topContent, children: [
|
|
2659
2940
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
2660
2941
|
((_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 }),
|
|
@@ -2752,22 +3033,22 @@ var MiniBanner = ({
|
|
|
2752
3033
|
const titleNode = (_b = slots.title) != null ? _b : title;
|
|
2753
3034
|
const subtitleNode = (_c = slots.subtitle) != null ? _c : subtitle;
|
|
2754
3035
|
const goBackNode = slots == null ? void 0 : slots.goBack;
|
|
2755
|
-
return /* @__PURE__ */ jsxs("div", { className:
|
|
3036
|
+
return /* @__PURE__ */ jsxs("div", { className: clsx47(MiniBanner_module_default.minibanner, MiniBanner_module_default[variant], className), children: [
|
|
2756
3037
|
((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)),
|
|
2757
|
-
/* @__PURE__ */ jsx(Container, { className:
|
|
3038
|
+
/* @__PURE__ */ jsx(Container, { className: clsx47(goBackNode && MiniBanner_module_default.container), children: /* @__PURE__ */ jsxs("div", { className: MiniBanner_module_default.wrapper, children: [
|
|
2758
3039
|
/* @__PURE__ */ jsxs("div", { className: MiniBanner_module_default.textContainer, children: [
|
|
2759
3040
|
(logo == null ? void 0 : logo.src) && /* @__PURE__ */ jsx(Picture, __spreadValues({ className: MiniBanner_module_default.logo }, logo)),
|
|
2760
|
-
pretitleNode && /* @__PURE__ */ jsx("div", { className:
|
|
3041
|
+
pretitleNode && /* @__PURE__ */ jsx("div", { className: clsx47(MiniBanner_module_default.pretitle, "small"), children: pretitleNode }),
|
|
2761
3042
|
/* @__PURE__ */ jsxs("div", { className: MiniBanner_module_default.headingWrapper, children: [
|
|
2762
|
-
goBackNode ?
|
|
2763
|
-
className:
|
|
3043
|
+
goBackNode ? React70.cloneElement(goBackNode, {
|
|
3044
|
+
className: clsx47("back-button", MiniBanner_module_default["back-button"])
|
|
2764
3045
|
}) : null,
|
|
2765
|
-
titleNode && /* @__PURE__ */ jsx("div", { className:
|
|
3046
|
+
titleNode && /* @__PURE__ */ jsx("div", { className: clsx47(MiniBanner_module_default.title, isMiniBannerTextLeft ? "h1" : "h4"), children: titleNode })
|
|
2766
3047
|
] }),
|
|
2767
3048
|
subtitleNode && /* @__PURE__ */ jsx(
|
|
2768
3049
|
"div",
|
|
2769
3050
|
{
|
|
2770
|
-
className:
|
|
3051
|
+
className: clsx47(MiniBanner_module_default.title, {
|
|
2771
3052
|
subheading: isMiniBannerNoBG,
|
|
2772
3053
|
h1: !isMiniBannerNoBG && !isMiniBannerTextLeft,
|
|
2773
3054
|
h4: isMiniBannerTextLeft
|
|
@@ -2840,14 +3121,14 @@ var MiniSectionCta = ({
|
|
|
2840
3121
|
return /* @__PURE__ */ jsx(
|
|
2841
3122
|
"div",
|
|
2842
3123
|
{
|
|
2843
|
-
className:
|
|
3124
|
+
className: clsx47(MiniSectionCta_module_default.miniSectionCta, MiniSectionCta_module_default[variant], theme && MiniSectionCta_module_default[theme], className),
|
|
2844
3125
|
children: /* @__PURE__ */ jsx(Container, { children: /* @__PURE__ */ jsxs("div", { className: MiniSectionCta_module_default.wrapper, children: [
|
|
2845
3126
|
/* @__PURE__ */ jsxs("div", { className: MiniSectionCta_module_default.col, children: [
|
|
2846
3127
|
titleNode && /* @__PURE__ */ jsx("h2", { className: variant === "BgColorBlack" || variant === "BgColorGrey" ? "h3" : "h2", children: titleNode }),
|
|
2847
3128
|
subtitleNode && /* @__PURE__ */ jsx(
|
|
2848
3129
|
"div",
|
|
2849
3130
|
{
|
|
2850
|
-
className:
|
|
3131
|
+
className: clsx47(MiniSectionCta_module_default.subtitle, variant === "infoCallout" ? "h4" : "subheading"),
|
|
2851
3132
|
children: subtitleNode
|
|
2852
3133
|
}
|
|
2853
3134
|
)
|
|
@@ -2873,34 +3154,6 @@ var MiniSectionCta2 = Object.assign(MiniSectionCta, {
|
|
|
2873
3154
|
Title: MiniSectionCtaTitle,
|
|
2874
3155
|
Subtitle: MiniSectionCtaSubtitle
|
|
2875
3156
|
});
|
|
2876
|
-
function useIntersectionObserver({
|
|
2877
|
-
animateOnce = false,
|
|
2878
|
-
options = {}
|
|
2879
|
-
} = {}) {
|
|
2880
|
-
const observeRef = useRef(null);
|
|
2881
|
-
const [isVisible, setIsVisible] = useState(false);
|
|
2882
|
-
if (typeof IntersectionObserver === "undefined") {
|
|
2883
|
-
console.warn("IntersectionObserver is not supported in this browser.");
|
|
2884
|
-
return { observeRef, isVisible: true };
|
|
2885
|
-
}
|
|
2886
|
-
useEffect(() => {
|
|
2887
|
-
const currentRef = observeRef.current;
|
|
2888
|
-
if (!currentRef) return;
|
|
2889
|
-
const observer = new IntersectionObserver((entries) => {
|
|
2890
|
-
const entry = entries[0];
|
|
2891
|
-
if (!entry) return;
|
|
2892
|
-
setIsVisible(entry.isIntersecting);
|
|
2893
|
-
if (entry.isIntersecting && animateOnce) {
|
|
2894
|
-
observer.disconnect();
|
|
2895
|
-
}
|
|
2896
|
-
}, options);
|
|
2897
|
-
observer.observe(currentRef);
|
|
2898
|
-
return () => {
|
|
2899
|
-
observer.disconnect();
|
|
2900
|
-
};
|
|
2901
|
-
}, [observeRef, animateOnce, options]);
|
|
2902
|
-
return { observeRef, isVisible };
|
|
2903
|
-
}
|
|
2904
3157
|
var useIsAtTop = () => {
|
|
2905
3158
|
const [isAtTop, setIsAtTop] = useState(true);
|
|
2906
3159
|
useEffect(() => {
|
|
@@ -2914,31 +3167,17 @@ var useIsAtTop = () => {
|
|
|
2914
3167
|
// src/widgets/Navigation/Navigation.module.scss
|
|
2915
3168
|
var Navigation_module_default = {
|
|
2916
3169
|
dropdownTitle: "Navigation_module_dropdownTitle",
|
|
2917
|
-
dropdownLink: "Navigation_module_dropdownLink",
|
|
2918
|
-
dropdownDescription: "Navigation_module_dropdownDescription",
|
|
2919
3170
|
mobileItemLink: "Navigation_module_mobileItemLink",
|
|
2920
3171
|
mobileItemTrigger: "Navigation_module_mobileItemTrigger",
|
|
2921
3172
|
mobileSubLink: "Navigation_module_mobileSubLink",
|
|
2922
|
-
navigationWrapper: "Navigation_module_navigationWrapper",
|
|
2923
3173
|
dropdownOpen: "Navigation_module_dropdownOpen",
|
|
2924
3174
|
variantTransparent: "Navigation_module_variantTransparent",
|
|
2925
3175
|
transparent: "Navigation_module_transparent",
|
|
2926
|
-
|
|
2927
|
-
upperNav: "Navigation_module_upperNav",
|
|
2928
|
-
mainLogo: "Navigation_module_mainLogo",
|
|
2929
|
-
mainLogoLink: "Navigation_module_mainLogoLink",
|
|
3176
|
+
logo: "Navigation_module_logo",
|
|
2930
3177
|
upperRight: "Navigation_module_upperRight",
|
|
2931
|
-
lowerNav: "Navigation_module_lowerNav",
|
|
2932
|
-
lowerNavItem: "Navigation_module_lowerNavItem",
|
|
2933
3178
|
overlay: "Navigation_module_overlay",
|
|
2934
|
-
|
|
2935
|
-
|
|
2936
|
-
dropdownPanel: "Navigation_module_dropdownPanel",
|
|
2937
|
-
dropdownPanelOpen: "Navigation_module_dropdownPanelOpen",
|
|
2938
|
-
dropdownInner: "Navigation_module_dropdownInner",
|
|
2939
|
-
dropdownLinks: "Navigation_module_dropdownLinks",
|
|
2940
|
-
dropdownLinkContainer: "Navigation_module_dropdownLinkContainer",
|
|
2941
|
-
dropdownInfo: "Navigation_module_dropdownInfo",
|
|
3179
|
+
mainLogoLink: "Navigation_module_mainLogoLink",
|
|
3180
|
+
dropdownLinkSpacer: "Navigation_module_dropdownLinkSpacer",
|
|
2942
3181
|
mainLogoMobile: "Navigation_module_mainLogoMobile",
|
|
2943
3182
|
hamburgerButton: "Navigation_module_hamburgerButton",
|
|
2944
3183
|
mobileMenu: "Navigation_module_mobileMenu",
|
|
@@ -2951,116 +3190,53 @@ var Navigation_module_default = {
|
|
|
2951
3190
|
mobileSubItems: "Navigation_module_mobileSubItems",
|
|
2952
3191
|
mobileSubItemsOpen: "Navigation_module_mobileSubItemsOpen",
|
|
2953
3192
|
mobileSubItemsInner: "Navigation_module_mobileSubItemsInner",
|
|
2954
|
-
mobileMenuCtas: "Navigation_module_mobileMenuCtas"
|
|
2955
|
-
|
|
2956
|
-
|
|
2957
|
-
|
|
2958
|
-
|
|
2959
|
-
|
|
2960
|
-
|
|
2961
|
-
|
|
2962
|
-
|
|
2963
|
-
|
|
2964
|
-
|
|
2965
|
-
|
|
2966
|
-
|
|
2967
|
-
|
|
2968
|
-
|
|
2969
|
-
|
|
2970
|
-
|
|
2971
|
-
|
|
2972
|
-
|
|
2973
|
-
|
|
2974
|
-
|
|
2975
|
-
|
|
2976
|
-
|
|
2977
|
-
|
|
2978
|
-
|
|
2979
|
-
|
|
2980
|
-
|
|
2981
|
-
|
|
2982
|
-
|
|
2983
|
-
|
|
2984
|
-
|
|
2985
|
-
|
|
2986
|
-
|
|
2987
|
-
|
|
2988
|
-
|
|
2989
|
-
|
|
2990
|
-
|
|
2991
|
-
|
|
2992
|
-
|
|
2993
|
-
|
|
2994
|
-
|
|
2995
|
-
|
|
2996
|
-
|
|
2997
|
-
|
|
2998
|
-
|
|
2999
|
-
|
|
3000
|
-
|
|
3001
|
-
const isOpen = activeDropdown === index;
|
|
3002
|
-
return item.type === "dropdown" ? /* @__PURE__ */ jsxs(
|
|
3003
|
-
"li",
|
|
3004
|
-
{
|
|
3005
|
-
className: Navigation_module_default.lowerNavItem,
|
|
3006
|
-
ref: (el) => {
|
|
3007
|
-
dropdownWrapperRefs.current[index] = el;
|
|
3008
|
-
},
|
|
3009
|
-
onBlur: (e) => handleDropdownBlur(e, index),
|
|
3010
|
-
children: [
|
|
3011
|
-
/* @__PURE__ */ jsx(
|
|
3012
|
-
Button,
|
|
3013
|
-
{
|
|
3014
|
-
variant: "navnofillblack",
|
|
3015
|
-
className: clsx43(Navigation_module_default.dropdownTrigger, { [Navigation_module_default.dropdownTriggerOpen]: isOpen }),
|
|
3016
|
-
icon: isTransparent ? "downChevronWhite" : "downChevronBlack",
|
|
3017
|
-
isActive: isOpen,
|
|
3018
|
-
"aria-expanded": isOpen,
|
|
3019
|
-
"aria-haspopup": "true",
|
|
3020
|
-
"aria-controls": panelId,
|
|
3021
|
-
onMouseEnter: () => handleDropdownEnter(index),
|
|
3022
|
-
onMouseLeave: handleDropdownLeave,
|
|
3023
|
-
onClick: () => setDropdown(isOpen ? null : index),
|
|
3024
|
-
onKeyDown: (e) => handleTriggerKeyDown(e, index),
|
|
3025
|
-
children: item.title
|
|
3026
|
-
}
|
|
3027
|
-
),
|
|
3028
|
-
/* @__PURE__ */ jsx(
|
|
3029
|
-
"div",
|
|
3030
|
-
{
|
|
3031
|
-
id: panelId,
|
|
3032
|
-
className: clsx43(Navigation_module_default.dropdownPanel, { [Navigation_module_default.dropdownPanelOpen]: isOpen }),
|
|
3033
|
-
"aria-hidden": !isOpen,
|
|
3034
|
-
onMouseEnter: () => handleDropdownEnter(index),
|
|
3035
|
-
onMouseLeave: handleDropdownLeave,
|
|
3036
|
-
onKeyDown: (e) => handleDropdownKeyDown(e, index),
|
|
3037
|
-
children: /* @__PURE__ */ jsxs("div", { className: Navigation_module_default.dropdownInner, children: [
|
|
3038
|
-
/* @__PURE__ */ jsx("ul", { className: Navigation_module_default.dropdownLinks, children: item.items.map(
|
|
3039
|
-
(subItem, i) => {
|
|
3040
|
-
var _a3, _b2;
|
|
3041
|
-
return subItem.type === "link" ? /* @__PURE__ */ jsx("li", { className: Navigation_module_default.dropdownLinkContainer, children: /* @__PURE__ */ jsx(
|
|
3042
|
-
"a",
|
|
3043
|
-
{
|
|
3044
|
-
href: (_a3 = subItem.cta) == null ? void 0 : _a3.url,
|
|
3045
|
-
className: Navigation_module_default.dropdownLink,
|
|
3046
|
-
tabIndex: isOpen ? void 0 : -1,
|
|
3047
|
-
children: (_b2 = subItem.cta) == null ? void 0 : _b2.label
|
|
3048
|
-
}
|
|
3049
|
-
) }, i) : null;
|
|
3050
|
-
}
|
|
3051
|
-
) }),
|
|
3052
|
-
/* @__PURE__ */ jsxs("div", { className: Navigation_module_default.dropdownInfo, children: [
|
|
3053
|
-
/* @__PURE__ */ jsx("h3", { className: Navigation_module_default.dropdownTitle, children: item.title }),
|
|
3054
|
-
/* @__PURE__ */ jsx("p", { className: Navigation_module_default.dropdownDescription, children: item.description })
|
|
3055
|
-
] })
|
|
3056
|
-
] })
|
|
3057
|
-
}
|
|
3058
|
-
)
|
|
3059
|
-
]
|
|
3060
|
-
},
|
|
3061
|
-
index
|
|
3062
|
-
) : /* @__PURE__ */ jsx("li", { className: Navigation_module_default.lowerNavItem, children: /* @__PURE__ */ jsx(Button, { variant: "navnofillblack", href: (_a2 = item.cta) == null ? void 0 : _a2.url, isExternal: (_b = item.cta) == null ? void 0 : _b.isExternal, children: (_c = item.cta) == null ? void 0 : _c.label }) }, index);
|
|
3063
|
-
}) });
|
|
3193
|
+
mobileMenuCtas: "Navigation_module_mobileMenuCtas",
|
|
3194
|
+
Navigation: "Navigation_module_Navigation",
|
|
3195
|
+
mainBar: "Navigation_module_mainBar",
|
|
3196
|
+
navTabLink: "Navigation_module_navTabLink",
|
|
3197
|
+
navTabActive: "Navigation_module_navTabActive",
|
|
3198
|
+
inner: "Navigation_module_inner",
|
|
3199
|
+
topRow: "Navigation_module_topRow",
|
|
3200
|
+
logoLink: "Navigation_module_logoLink",
|
|
3201
|
+
logoMobile: "Navigation_module_logoMobile",
|
|
3202
|
+
hamburger: "Navigation_module_hamburger",
|
|
3203
|
+
bottomRow: "Navigation_module_bottomRow",
|
|
3204
|
+
navTabs: "Navigation_module_navTabs",
|
|
3205
|
+
navTab: "Navigation_module_navTab",
|
|
3206
|
+
navTabTrigger: "Navigation_module_navTabTrigger",
|
|
3207
|
+
navTabTriggerOpen: "Navigation_module_navTabTriggerOpen",
|
|
3208
|
+
dropdownPanel: "Navigation_module_dropdownPanel",
|
|
3209
|
+
dropdownInner: "Navigation_module_dropdownInner",
|
|
3210
|
+
dropdownLinks: "Navigation_module_dropdownLinks",
|
|
3211
|
+
dropdownLinkItem: "Navigation_module_dropdownLinkItem",
|
|
3212
|
+
dropdownLink: "Navigation_module_dropdownLink",
|
|
3213
|
+
dropdownDivider: "Navigation_module_dropdownDivider",
|
|
3214
|
+
dropdownInfo: "Navigation_module_dropdownInfo",
|
|
3215
|
+
dropdownDescription: "Navigation_module_dropdownDescription",
|
|
3216
|
+
brandBars: "Navigation_module_brandBars",
|
|
3217
|
+
brandBar: "Navigation_module_brandBar",
|
|
3218
|
+
brandBarsUnfolded: "Navigation_module_brandBarsUnfolded",
|
|
3219
|
+
brandLogo: "Navigation_module_brandLogo",
|
|
3220
|
+
lenscrafters: "Navigation_module_lenscrafters",
|
|
3221
|
+
forEyes: "Navigation_module_forEyes",
|
|
3222
|
+
optical: "Navigation_module_optical",
|
|
3223
|
+
pearleVision: "Navigation_module_pearleVision",
|
|
3224
|
+
internalMobileMenu: "Navigation_module_internalMobileMenu",
|
|
3225
|
+
internalMobileMenuOpen: "Navigation_module_internalMobileMenuOpen",
|
|
3226
|
+
mobileHeader: "Navigation_module_mobileHeader",
|
|
3227
|
+
mobileClose: "Navigation_module_mobileClose",
|
|
3228
|
+
mobileBrandBars: "Navigation_module_mobileBrandBars",
|
|
3229
|
+
mobileItems: "Navigation_module_mobileItems",
|
|
3230
|
+
internalMobileItem: "Navigation_module_internalMobileItem",
|
|
3231
|
+
internalMobileItemLink: "Navigation_module_internalMobileItemLink",
|
|
3232
|
+
internalMobileItemTrigger: "Navigation_module_internalMobileItemTrigger",
|
|
3233
|
+
internalMobileItemChevron: "Navigation_module_internalMobileItemChevron",
|
|
3234
|
+
internalMobileItemChevronOpen: "Navigation_module_internalMobileItemChevronOpen",
|
|
3235
|
+
internalMobileSubItems: "Navigation_module_internalMobileSubItems",
|
|
3236
|
+
internalMobileSubItemsOpen: "Navigation_module_internalMobileSubItemsOpen",
|
|
3237
|
+
internalMobileSubItemsInner: "Navigation_module_internalMobileSubItemsInner",
|
|
3238
|
+
internalMobileSubLink: "Navigation_module_internalMobileSubLink",
|
|
3239
|
+
mobileFooter: "Navigation_module_mobileFooter"
|
|
3064
3240
|
};
|
|
3065
3241
|
var NavigationLogo = ({
|
|
3066
3242
|
mainLogo,
|
|
@@ -3086,63 +3262,369 @@ var NavigationCtas = ({
|
|
|
3086
3262
|
(rightButton == null ? void 0 : rightButton.label) && /* @__PURE__ */ jsx(Button, { variant: "primary", href: rightButton.url, isExternal: rightButton.isExternal, children: rightButton.label })
|
|
3087
3263
|
] });
|
|
3088
3264
|
};
|
|
3265
|
+
var BRANDS = [
|
|
3266
|
+
{ key: "lenscrafters", className: Navigation_module_default.lenscrafters, label: "LensCrafters" },
|
|
3267
|
+
{ key: "forEyes", className: Navigation_module_default.forEyes, label: "For Eyes" },
|
|
3268
|
+
{ key: "optical", className: Navigation_module_default.optical, label: "Target Optical" },
|
|
3269
|
+
{ key: "pearleVision", className: Navigation_module_default.pearleVision, label: "Pearle Vision" }
|
|
3270
|
+
];
|
|
3271
|
+
var NavigationBrandBars = ({
|
|
3272
|
+
brandLogos,
|
|
3273
|
+
unfolded = false,
|
|
3274
|
+
className
|
|
3275
|
+
}) => {
|
|
3276
|
+
const hasLogos = !!brandLogos;
|
|
3277
|
+
const isUnfolded = hasLogos && unfolded;
|
|
3278
|
+
return /* @__PURE__ */ jsx(
|
|
3279
|
+
"div",
|
|
3280
|
+
{
|
|
3281
|
+
className: clsx47(Navigation_module_default.brandBars, isUnfolded && Navigation_module_default.brandBarsUnfolded, className),
|
|
3282
|
+
"aria-hidden": "true",
|
|
3283
|
+
children: BRANDS.map((brand) => {
|
|
3284
|
+
var _a;
|
|
3285
|
+
const logo = brandLogos == null ? void 0 : brandLogos[brand.key];
|
|
3286
|
+
return /* @__PURE__ */ jsx("span", { className: clsx47(Navigation_module_default.brandBar, brand.className), children: logo && /* @__PURE__ */ jsx("img", { className: Navigation_module_default.brandLogo, src: logo.src, alt: (_a = logo.alt) != null ? _a : brand.label }) }, brand.key);
|
|
3287
|
+
})
|
|
3288
|
+
}
|
|
3289
|
+
);
|
|
3290
|
+
};
|
|
3291
|
+
var NavigationDesktop = ({
|
|
3292
|
+
navItems,
|
|
3293
|
+
openIndex,
|
|
3294
|
+
onOpen,
|
|
3295
|
+
onScheduleClose,
|
|
3296
|
+
baseId,
|
|
3297
|
+
isTransparent = false
|
|
3298
|
+
}) => {
|
|
3299
|
+
if (!(navItems == null ? void 0 : navItems.length)) return null;
|
|
3300
|
+
const handleTriggerKeyDown = (e, index) => {
|
|
3301
|
+
var _a;
|
|
3302
|
+
if (e.key === "Escape") {
|
|
3303
|
+
onOpen(null);
|
|
3304
|
+
} else if ((e.key === "Enter" || e.key === " ") && openIndex !== index) {
|
|
3305
|
+
e.preventDefault();
|
|
3306
|
+
onOpen(index);
|
|
3307
|
+
} else if (e.key === "Tab" && !e.shiftKey && openIndex === index) {
|
|
3308
|
+
const firstLink = (_a = document.getElementById(`${baseId}-panel-${index}`)) == null ? void 0 : _a.querySelector("a, button");
|
|
3309
|
+
if (firstLink) {
|
|
3310
|
+
e.preventDefault();
|
|
3311
|
+
firstLink.focus();
|
|
3312
|
+
}
|
|
3313
|
+
}
|
|
3314
|
+
};
|
|
3315
|
+
return /* @__PURE__ */ jsx("ul", { className: Navigation_module_default.navTabs, children: navItems.map((item, index) => {
|
|
3316
|
+
var _a, _b, _c, _d;
|
|
3317
|
+
const isOpen = openIndex === index;
|
|
3318
|
+
if (item.type === "link") {
|
|
3319
|
+
return /* @__PURE__ */ jsx("li", { className: Navigation_module_default.navTab, children: /* @__PURE__ */ jsx(
|
|
3320
|
+
"a",
|
|
3321
|
+
{
|
|
3322
|
+
href: (_a = item.cta) == null ? void 0 : _a.url,
|
|
3323
|
+
className: clsx47(Navigation_module_default.navTabLink, item.isActive && Navigation_module_default.navTabActive),
|
|
3324
|
+
"aria-current": item.isActive ? "page" : void 0,
|
|
3325
|
+
target: ((_b = item.cta) == null ? void 0 : _b.isExternal) ? "_blank" : void 0,
|
|
3326
|
+
rel: ((_c = item.cta) == null ? void 0 : _c.isExternal) ? "noopener noreferrer" : void 0,
|
|
3327
|
+
onMouseEnter: () => onOpen(null),
|
|
3328
|
+
onFocus: () => onOpen(null),
|
|
3329
|
+
children: /* @__PURE__ */ jsx("span", { children: (_d = item.cta) == null ? void 0 : _d.label })
|
|
3330
|
+
}
|
|
3331
|
+
) }, index);
|
|
3332
|
+
}
|
|
3333
|
+
return /* @__PURE__ */ jsx("li", { className: Navigation_module_default.navTab, children: /* @__PURE__ */ jsxs(
|
|
3334
|
+
"button",
|
|
3335
|
+
{
|
|
3336
|
+
type: "button",
|
|
3337
|
+
id: `${baseId}-trigger-${index}`,
|
|
3338
|
+
className: clsx47(
|
|
3339
|
+
Navigation_module_default.navTabLink,
|
|
3340
|
+
Navigation_module_default.navTabTrigger,
|
|
3341
|
+
(item.isActive || isOpen) && Navigation_module_default.navTabActive,
|
|
3342
|
+
isOpen && Navigation_module_default.navTabTriggerOpen
|
|
3343
|
+
),
|
|
3344
|
+
"aria-expanded": isOpen,
|
|
3345
|
+
"aria-haspopup": "true",
|
|
3346
|
+
"aria-controls": `${baseId}-panel-${index}`,
|
|
3347
|
+
onMouseEnter: () => onOpen(index),
|
|
3348
|
+
onMouseLeave: onScheduleClose,
|
|
3349
|
+
onFocus: () => onOpen(index),
|
|
3350
|
+
onClick: () => onOpen(isOpen ? null : index),
|
|
3351
|
+
onKeyDown: (e) => handleTriggerKeyDown(e, index),
|
|
3352
|
+
children: [
|
|
3353
|
+
/* @__PURE__ */ jsx("span", { children: item.title }),
|
|
3354
|
+
/* @__PURE__ */ jsx(
|
|
3355
|
+
Icon,
|
|
3356
|
+
{
|
|
3357
|
+
type: isTransparent ? "downChevronWhite" : "downChevronBlack",
|
|
3358
|
+
size: 24,
|
|
3359
|
+
"aria-hidden": "true"
|
|
3360
|
+
}
|
|
3361
|
+
)
|
|
3362
|
+
]
|
|
3363
|
+
}
|
|
3364
|
+
) }, index);
|
|
3365
|
+
}) });
|
|
3366
|
+
};
|
|
3367
|
+
var NavigationDropdown = ({
|
|
3368
|
+
item,
|
|
3369
|
+
panelId,
|
|
3370
|
+
baseId,
|
|
3371
|
+
activeIndex,
|
|
3372
|
+
onClose,
|
|
3373
|
+
onMouseEnter,
|
|
3374
|
+
onMouseLeave
|
|
3375
|
+
}) => {
|
|
3376
|
+
if (item.type !== "dropdown") return null;
|
|
3377
|
+
const { title, description, items } = item;
|
|
3378
|
+
const links = items.filter((sub) => sub.type === "link");
|
|
3379
|
+
const handleLinkKeyDown = (e, isFirst, isLast) => {
|
|
3380
|
+
if (e.key !== "Tab") return;
|
|
3381
|
+
const trigger = document.getElementById(`${baseId}-trigger-${activeIndex}`);
|
|
3382
|
+
if (e.shiftKey && isFirst) {
|
|
3383
|
+
e.preventDefault();
|
|
3384
|
+
trigger == null ? void 0 : trigger.focus();
|
|
3385
|
+
} else if (!e.shiftKey && isLast) {
|
|
3386
|
+
const nav = trigger == null ? void 0 : trigger.closest("nav");
|
|
3387
|
+
const panel = document.getElementById(panelId);
|
|
3388
|
+
const focusables = nav ? Array.from(
|
|
3389
|
+
nav.querySelectorAll(
|
|
3390
|
+
'a[href], button:not([disabled]), input:not([disabled]), select, textarea, [tabindex]:not([tabindex="-1"])'
|
|
3391
|
+
)
|
|
3392
|
+
).filter((el) => !(panel == null ? void 0 : panel.contains(el))) : [];
|
|
3393
|
+
const next = trigger ? focusables[focusables.indexOf(trigger) + 1] : void 0;
|
|
3394
|
+
onClose();
|
|
3395
|
+
if (next) {
|
|
3396
|
+
e.preventDefault();
|
|
3397
|
+
next.focus();
|
|
3398
|
+
}
|
|
3399
|
+
}
|
|
3400
|
+
};
|
|
3401
|
+
return /* @__PURE__ */ jsx(
|
|
3402
|
+
"div",
|
|
3403
|
+
{
|
|
3404
|
+
id: panelId,
|
|
3405
|
+
className: clsx47(Navigation_module_default.dropdownPanel, Navigation_module_default.dropdownPanelOpen),
|
|
3406
|
+
onMouseEnter,
|
|
3407
|
+
onMouseLeave,
|
|
3408
|
+
children: /* @__PURE__ */ jsxs("div", { className: Navigation_module_default.dropdownInner, children: [
|
|
3409
|
+
/* @__PURE__ */ jsx("ul", { className: Navigation_module_default.dropdownLinks, children: links.map((sub, i) => {
|
|
3410
|
+
var _a, _b, _c, _d;
|
|
3411
|
+
return /* @__PURE__ */ jsx(
|
|
3412
|
+
"li",
|
|
3413
|
+
{
|
|
3414
|
+
className: clsx47(Navigation_module_default.dropdownLinkItem, {
|
|
3415
|
+
[Navigation_module_default.dropdownLinkSpacer]: sub.variant === "subMenuSpacer"
|
|
3416
|
+
}),
|
|
3417
|
+
children: /* @__PURE__ */ jsx(
|
|
3418
|
+
"a",
|
|
3419
|
+
{
|
|
3420
|
+
href: (_a = sub.cta) == null ? void 0 : _a.url,
|
|
3421
|
+
className: Navigation_module_default.dropdownLink,
|
|
3422
|
+
target: ((_b = sub.cta) == null ? void 0 : _b.isExternal) ? "_blank" : void 0,
|
|
3423
|
+
rel: ((_c = sub.cta) == null ? void 0 : _c.isExternal) ? "noopener noreferrer" : void 0,
|
|
3424
|
+
onKeyDown: (e) => handleLinkKeyDown(e, i === 0, i === links.length - 1),
|
|
3425
|
+
children: (_d = sub.cta) == null ? void 0 : _d.label
|
|
3426
|
+
}
|
|
3427
|
+
)
|
|
3428
|
+
},
|
|
3429
|
+
i
|
|
3430
|
+
);
|
|
3431
|
+
}) }),
|
|
3432
|
+
/* @__PURE__ */ jsx("span", { className: Navigation_module_default.dropdownDivider, "aria-hidden": "true" }),
|
|
3433
|
+
/* @__PURE__ */ jsxs("div", { className: Navigation_module_default.dropdownInfo, children: [
|
|
3434
|
+
/* @__PURE__ */ jsx("h2", { className: Navigation_module_default.dropdownTitle, children: title }),
|
|
3435
|
+
description && /* @__PURE__ */ jsx("div", { className: Navigation_module_default.dropdownDescription, children: description })
|
|
3436
|
+
] })
|
|
3437
|
+
] })
|
|
3438
|
+
}
|
|
3439
|
+
);
|
|
3440
|
+
};
|
|
3089
3441
|
var NavigationMobile = ({
|
|
3090
3442
|
id,
|
|
3091
|
-
|
|
3443
|
+
navItems,
|
|
3092
3444
|
mainLogo,
|
|
3445
|
+
logoAlt = "EssilorLuxottica Eye Care",
|
|
3093
3446
|
homeCta,
|
|
3094
|
-
|
|
3095
|
-
|
|
3447
|
+
user,
|
|
3448
|
+
searchPlaceholder,
|
|
3449
|
+
searchCta,
|
|
3450
|
+
onSearch,
|
|
3096
3451
|
isOpen,
|
|
3097
|
-
onClose
|
|
3452
|
+
onClose,
|
|
3453
|
+
isExternal = false,
|
|
3454
|
+
loginCta,
|
|
3455
|
+
rightButton
|
|
3098
3456
|
}) => {
|
|
3099
|
-
var _a;
|
|
3100
3457
|
const [expanded, setExpanded] = useState([]);
|
|
3101
3458
|
const baseId = useId();
|
|
3102
3459
|
const toggleExpanded = (index) => {
|
|
3103
3460
|
setExpanded((prev) => prev.includes(index) ? prev.filter((i) => i !== index) : [...prev, index]);
|
|
3104
3461
|
};
|
|
3462
|
+
const expandItem = (index) => {
|
|
3463
|
+
setExpanded((prev) => prev.includes(index) ? prev : [...prev, index]);
|
|
3464
|
+
};
|
|
3465
|
+
const collapseItem = (index) => {
|
|
3466
|
+
setExpanded((prev) => prev.filter((i) => i !== index));
|
|
3467
|
+
};
|
|
3468
|
+
const hoverFocusProps = (index) => ({
|
|
3469
|
+
onMouseEnter: () => expandItem(index),
|
|
3470
|
+
onMouseLeave: () => collapseItem(index),
|
|
3471
|
+
onFocus: () => expandItem(index),
|
|
3472
|
+
onBlur: (e) => {
|
|
3473
|
+
if (!e.currentTarget.contains(e.relatedTarget)) collapseItem(index);
|
|
3474
|
+
}
|
|
3475
|
+
});
|
|
3476
|
+
const logo = mainLogo ? /* @__PURE__ */ jsx(Picture, { className: Navigation_module_default.logoMobile, src: mainLogo, alt: logoAlt }) : null;
|
|
3477
|
+
if (isExternal) {
|
|
3478
|
+
return /* @__PURE__ */ jsxs(
|
|
3479
|
+
"div",
|
|
3480
|
+
{
|
|
3481
|
+
id,
|
|
3482
|
+
className: clsx47(Navigation_module_default.mobileMenu, isOpen && Navigation_module_default.mobileMenuOpen),
|
|
3483
|
+
role: "dialog",
|
|
3484
|
+
"aria-modal": "true",
|
|
3485
|
+
"aria-label": "Navigation menu",
|
|
3486
|
+
"aria-hidden": !isOpen,
|
|
3487
|
+
children: [
|
|
3488
|
+
/* @__PURE__ */ jsxs("div", { className: Navigation_module_default.mobileMenuHeader, children: [
|
|
3489
|
+
/* @__PURE__ */ jsx(
|
|
3490
|
+
NavigationLogo,
|
|
3491
|
+
{
|
|
3492
|
+
mainLogo,
|
|
3493
|
+
homeCta,
|
|
3494
|
+
className: Navigation_module_default.mainLogoMobile,
|
|
3495
|
+
onClick: onClose
|
|
3496
|
+
}
|
|
3497
|
+
),
|
|
3498
|
+
/* @__PURE__ */ jsx(
|
|
3499
|
+
Button,
|
|
3500
|
+
{
|
|
3501
|
+
type: "button",
|
|
3502
|
+
variant: "nofill",
|
|
3503
|
+
className: Navigation_module_default.hamburgerButton,
|
|
3504
|
+
onClick: onClose,
|
|
3505
|
+
"aria-label": "Close navigation menu",
|
|
3506
|
+
children: /* @__PURE__ */ jsx(Icon, { type: "xBlack", size: 24, "aria-hidden": "true" })
|
|
3507
|
+
}
|
|
3508
|
+
)
|
|
3509
|
+
] }),
|
|
3510
|
+
/* @__PURE__ */ jsx("ul", { className: Navigation_module_default.mobileMenuItems, children: navItems == null ? void 0 : navItems.map((item, index) => {
|
|
3511
|
+
var _a, _b;
|
|
3512
|
+
const subMenuId = `${baseId}-submenu-${index}`;
|
|
3513
|
+
const isExpanded = expanded.includes(index);
|
|
3514
|
+
return item.type === "dropdown" ? /* @__PURE__ */ jsxs("li", __spreadProps(__spreadValues({ className: Navigation_module_default.mobileItem }, hoverFocusProps(index)), { children: [
|
|
3515
|
+
/* @__PURE__ */ jsxs(
|
|
3516
|
+
"button",
|
|
3517
|
+
{
|
|
3518
|
+
type: "button",
|
|
3519
|
+
className: Navigation_module_default.mobileItemTrigger,
|
|
3520
|
+
onClick: () => toggleExpanded(index),
|
|
3521
|
+
"aria-expanded": isExpanded,
|
|
3522
|
+
"aria-controls": subMenuId,
|
|
3523
|
+
children: [
|
|
3524
|
+
item.title,
|
|
3525
|
+
/* @__PURE__ */ jsx(
|
|
3526
|
+
"span",
|
|
3527
|
+
{
|
|
3528
|
+
className: clsx47(
|
|
3529
|
+
Navigation_module_default.mobileItemChevron,
|
|
3530
|
+
isExpanded && Navigation_module_default.mobileItemChevronOpen
|
|
3531
|
+
),
|
|
3532
|
+
"aria-hidden": "true",
|
|
3533
|
+
children: /* @__PURE__ */ jsx(Icon, { type: "downChevronBlack", size: 24 })
|
|
3534
|
+
}
|
|
3535
|
+
)
|
|
3536
|
+
]
|
|
3537
|
+
}
|
|
3538
|
+
),
|
|
3539
|
+
/* @__PURE__ */ jsx(
|
|
3540
|
+
"div",
|
|
3541
|
+
{
|
|
3542
|
+
id: subMenuId,
|
|
3543
|
+
className: clsx47(Navigation_module_default.mobileSubItems, isExpanded && Navigation_module_default.mobileSubItemsOpen),
|
|
3544
|
+
children: /* @__PURE__ */ jsx("ul", { className: Navigation_module_default.mobileSubItemsInner, children: item.items.map(
|
|
3545
|
+
(subItem, i) => {
|
|
3546
|
+
var _a2, _b2;
|
|
3547
|
+
return subItem.type === "link" ? /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(
|
|
3548
|
+
"a",
|
|
3549
|
+
{
|
|
3550
|
+
href: (_a2 = subItem.cta) == null ? void 0 : _a2.url,
|
|
3551
|
+
className: Navigation_module_default.mobileSubLink,
|
|
3552
|
+
onClick: onClose,
|
|
3553
|
+
children: (_b2 = subItem.cta) == null ? void 0 : _b2.label
|
|
3554
|
+
}
|
|
3555
|
+
) }, i) : null;
|
|
3556
|
+
}
|
|
3557
|
+
) })
|
|
3558
|
+
}
|
|
3559
|
+
)
|
|
3560
|
+
] }), index) : /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx("a", { href: (_a = item.cta) == null ? void 0 : _a.url, className: Navigation_module_default.mobileItemLink, onClick: onClose, children: (_b = item.cta) == null ? void 0 : _b.label }) }, index);
|
|
3561
|
+
}) }),
|
|
3562
|
+
/* @__PURE__ */ jsx(
|
|
3563
|
+
NavigationCtas,
|
|
3564
|
+
{
|
|
3565
|
+
className: Navigation_module_default.mobileMenuCtas,
|
|
3566
|
+
loginCta,
|
|
3567
|
+
rightButton,
|
|
3568
|
+
loginVariant: "nofillblack"
|
|
3569
|
+
}
|
|
3570
|
+
)
|
|
3571
|
+
]
|
|
3572
|
+
}
|
|
3573
|
+
);
|
|
3574
|
+
}
|
|
3105
3575
|
return /* @__PURE__ */ jsxs(
|
|
3106
3576
|
"div",
|
|
3107
3577
|
{
|
|
3108
3578
|
id,
|
|
3109
|
-
className:
|
|
3579
|
+
className: clsx47(Navigation_module_default.internalMobileMenu, isOpen && Navigation_module_default.internalMobileMenuOpen),
|
|
3110
3580
|
role: "dialog",
|
|
3111
3581
|
"aria-modal": "true",
|
|
3112
3582
|
"aria-label": "Navigation menu",
|
|
3113
3583
|
"aria-hidden": !isOpen,
|
|
3114
3584
|
children: [
|
|
3115
|
-
/* @__PURE__ */ jsxs("div", { className: Navigation_module_default.
|
|
3585
|
+
/* @__PURE__ */ jsxs("div", { className: Navigation_module_default.mobileHeader, children: [
|
|
3586
|
+
homeCta && logo ? /* @__PURE__ */ jsx("a", { href: homeCta, className: Navigation_module_default.logoLink, "aria-label": logoAlt, onClick: onClose, children: logo }) : logo,
|
|
3116
3587
|
/* @__PURE__ */ jsx(
|
|
3117
|
-
|
|
3118
|
-
{
|
|
3119
|
-
mainLogo,
|
|
3120
|
-
homeCta,
|
|
3121
|
-
className: Navigation_module_default.mainLogoMobile,
|
|
3122
|
-
onClick: onClose
|
|
3123
|
-
}
|
|
3124
|
-
),
|
|
3125
|
-
/* @__PURE__ */ jsx(
|
|
3126
|
-
"button",
|
|
3588
|
+
Button,
|
|
3127
3589
|
{
|
|
3590
|
+
variant: "ghost",
|
|
3128
3591
|
type: "button",
|
|
3129
|
-
className: Navigation_module_default.
|
|
3592
|
+
className: Navigation_module_default.mobileClose,
|
|
3130
3593
|
onClick: onClose,
|
|
3131
3594
|
"aria-label": "Close navigation menu",
|
|
3132
3595
|
children: /* @__PURE__ */ jsx(Icon, { type: "xBlack", size: 24, "aria-hidden": "true" })
|
|
3133
3596
|
}
|
|
3134
3597
|
)
|
|
3135
3598
|
] }),
|
|
3136
|
-
/* @__PURE__ */
|
|
3137
|
-
|
|
3599
|
+
/* @__PURE__ */ jsxs("div", { className: Navigation_module_default.mobileBrandBars, "aria-hidden": "true", children: [
|
|
3600
|
+
/* @__PURE__ */ jsx("span", { className: clsx47(Navigation_module_default.brandBar, Navigation_module_default.lenscrafters) }),
|
|
3601
|
+
/* @__PURE__ */ jsx("span", { className: clsx47(Navigation_module_default.brandBar, Navigation_module_default.forEyes) }),
|
|
3602
|
+
/* @__PURE__ */ jsx("span", { className: clsx47(Navigation_module_default.brandBar, Navigation_module_default.optical) }),
|
|
3603
|
+
/* @__PURE__ */ jsx("span", { className: clsx47(Navigation_module_default.brandBar, Navigation_module_default.pearleVision) })
|
|
3604
|
+
] }),
|
|
3605
|
+
/* @__PURE__ */ jsx("ul", { className: Navigation_module_default.mobileItems, children: navItems == null ? void 0 : navItems.map((item, index) => {
|
|
3606
|
+
var _a, _b, _c, _d;
|
|
3138
3607
|
const subMenuId = `${baseId}-submenu-${index}`;
|
|
3139
3608
|
const isExpanded = expanded.includes(index);
|
|
3140
|
-
|
|
3609
|
+
if (item.type === "link") {
|
|
3610
|
+
return /* @__PURE__ */ jsx("li", { className: Navigation_module_default.internalMobileItem, children: /* @__PURE__ */ jsx(
|
|
3611
|
+
"a",
|
|
3612
|
+
{
|
|
3613
|
+
href: (_a = item.cta) == null ? void 0 : _a.url,
|
|
3614
|
+
className: Navigation_module_default.internalMobileItemLink,
|
|
3615
|
+
target: ((_b = item.cta) == null ? void 0 : _b.isExternal) ? "_blank" : void 0,
|
|
3616
|
+
rel: ((_c = item.cta) == null ? void 0 : _c.isExternal) ? "noopener noreferrer" : void 0,
|
|
3617
|
+
onClick: onClose,
|
|
3618
|
+
children: (_d = item.cta) == null ? void 0 : _d.label
|
|
3619
|
+
}
|
|
3620
|
+
) }, index);
|
|
3621
|
+
}
|
|
3622
|
+
return /* @__PURE__ */ jsxs("li", __spreadProps(__spreadValues({ className: Navigation_module_default.internalMobileItem }, hoverFocusProps(index)), { children: [
|
|
3141
3623
|
/* @__PURE__ */ jsxs(
|
|
3142
3624
|
"button",
|
|
3143
3625
|
{
|
|
3144
3626
|
type: "button",
|
|
3145
|
-
className: Navigation_module_default.
|
|
3627
|
+
className: Navigation_module_default.internalMobileItemTrigger,
|
|
3146
3628
|
onClick: () => toggleExpanded(index),
|
|
3147
3629
|
"aria-expanded": isExpanded,
|
|
3148
3630
|
"aria-controls": subMenuId,
|
|
@@ -3151,9 +3633,9 @@ var NavigationMobile = ({
|
|
|
3151
3633
|
/* @__PURE__ */ jsx(
|
|
3152
3634
|
"span",
|
|
3153
3635
|
{
|
|
3154
|
-
className:
|
|
3155
|
-
Navigation_module_default.
|
|
3156
|
-
isExpanded && Navigation_module_default.
|
|
3636
|
+
className: clsx47(
|
|
3637
|
+
Navigation_module_default.internalMobileItemChevron,
|
|
3638
|
+
isExpanded && Navigation_module_default.internalMobileItemChevronOpen
|
|
3157
3639
|
),
|
|
3158
3640
|
"aria-hidden": "true",
|
|
3159
3641
|
children: /* @__PURE__ */ jsx(Icon, { type: "downChevronBlack", size: 24 })
|
|
@@ -3166,129 +3648,273 @@ var NavigationMobile = ({
|
|
|
3166
3648
|
"div",
|
|
3167
3649
|
{
|
|
3168
3650
|
id: subMenuId,
|
|
3169
|
-
className:
|
|
3170
|
-
|
|
3171
|
-
|
|
3172
|
-
|
|
3173
|
-
|
|
3651
|
+
className: clsx47(
|
|
3652
|
+
Navigation_module_default.internalMobileSubItems,
|
|
3653
|
+
isExpanded && Navigation_module_default.internalMobileSubItemsOpen
|
|
3654
|
+
),
|
|
3655
|
+
children: /* @__PURE__ */ jsx("ul", { className: Navigation_module_default.internalMobileSubItemsInner, children: item.items.map(
|
|
3656
|
+
(sub, i) => {
|
|
3657
|
+
var _a2, _b2, _c2, _d2;
|
|
3658
|
+
return sub.type === "link" ? /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(
|
|
3174
3659
|
"a",
|
|
3175
3660
|
{
|
|
3176
|
-
href: (
|
|
3177
|
-
className: Navigation_module_default.
|
|
3661
|
+
href: (_a2 = sub.cta) == null ? void 0 : _a2.url,
|
|
3662
|
+
className: Navigation_module_default.internalMobileSubLink,
|
|
3663
|
+
target: ((_b2 = sub.cta) == null ? void 0 : _b2.isExternal) ? "_blank" : void 0,
|
|
3664
|
+
rel: ((_c2 = sub.cta) == null ? void 0 : _c2.isExternal) ? "noopener noreferrer" : void 0,
|
|
3178
3665
|
onClick: onClose,
|
|
3179
|
-
children: (
|
|
3666
|
+
children: (_d2 = sub.cta) == null ? void 0 : _d2.label
|
|
3180
3667
|
}
|
|
3181
3668
|
) }, i) : null;
|
|
3182
3669
|
}
|
|
3183
3670
|
) })
|
|
3184
3671
|
}
|
|
3185
3672
|
)
|
|
3186
|
-
] }
|
|
3673
|
+
] }), index);
|
|
3187
3674
|
}) }),
|
|
3188
|
-
/* @__PURE__ */
|
|
3189
|
-
|
|
3190
|
-
|
|
3191
|
-
|
|
3192
|
-
|
|
3193
|
-
|
|
3194
|
-
|
|
3195
|
-
|
|
3196
|
-
|
|
3675
|
+
/* @__PURE__ */ jsxs("div", { className: Navigation_module_default.mobileFooter, children: [
|
|
3676
|
+
/* @__PURE__ */ jsx(
|
|
3677
|
+
Search,
|
|
3678
|
+
{
|
|
3679
|
+
variant: "pill",
|
|
3680
|
+
placeholder: searchPlaceholder,
|
|
3681
|
+
searchCta,
|
|
3682
|
+
onSearch
|
|
3683
|
+
}
|
|
3684
|
+
),
|
|
3685
|
+
user && /* @__PURE__ */ jsx(UserMenu, { user, dropUp: true, fullWidth: true })
|
|
3686
|
+
] })
|
|
3197
3687
|
]
|
|
3198
3688
|
}
|
|
3199
3689
|
);
|
|
3200
3690
|
};
|
|
3691
|
+
var FOCUSABLE_SELECTOR = 'a[href], button:not([disabled]), input:not([disabled]), [tabindex]:not([tabindex="-1"])';
|
|
3692
|
+
var getFocusable = (root) => Array.from(root.querySelectorAll(FOCUSABLE_SELECTOR)).filter(
|
|
3693
|
+
(el) => el.tabIndex !== -1 && el.offsetParent !== null
|
|
3694
|
+
);
|
|
3201
3695
|
var Navigation2 = (props) => {
|
|
3202
|
-
|
|
3696
|
+
var _a;
|
|
3697
|
+
const {
|
|
3698
|
+
className,
|
|
3699
|
+
variant,
|
|
3700
|
+
transparent,
|
|
3701
|
+
mainLogo,
|
|
3702
|
+
logoAlt = "EssilorLuxottica Eye Care",
|
|
3703
|
+
homeCta,
|
|
3704
|
+
loginCta,
|
|
3705
|
+
rightButton,
|
|
3706
|
+
navigationItems,
|
|
3707
|
+
user,
|
|
3708
|
+
searchPlaceholder = "Search resources",
|
|
3709
|
+
searchCta,
|
|
3710
|
+
onSearch,
|
|
3711
|
+
brandLogos
|
|
3712
|
+
} = props;
|
|
3713
|
+
const isExternal = variant !== "internal";
|
|
3203
3714
|
const [isHovered, setIsHovered] = useState(false);
|
|
3204
|
-
const [
|
|
3715
|
+
const [openIndex, setOpenIndex] = useState(null);
|
|
3205
3716
|
const [isMobileMenuOpen, setIsMobileMenuOpen] = useState(false);
|
|
3717
|
+
const navRef = useRef(null);
|
|
3718
|
+
const closeTimer = useRef(null);
|
|
3206
3719
|
const isAtTop = useIsAtTop();
|
|
3207
3720
|
const { is } = useViewPort_default();
|
|
3208
3721
|
const mobileMenuId = useId();
|
|
3722
|
+
const baseId = useId();
|
|
3209
3723
|
const isTabletBelow = is("tablet", "below");
|
|
3210
|
-
const
|
|
3724
|
+
const dropdownOpen = openIndex !== null && !isTabletBelow;
|
|
3725
|
+
const isTransparent = !!transparent && isAtTop && !isHovered && !dropdownOpen;
|
|
3726
|
+
const openItem = openIndex !== null ? (_a = navigationItems == null ? void 0 : navigationItems.items) == null ? void 0 : _a[openIndex] : void 0;
|
|
3727
|
+
const showLogoUnfolded = !!brandLogos && isAtTop && !dropdownOpen;
|
|
3728
|
+
const openDropdown = (index) => {
|
|
3729
|
+
if (closeTimer.current) clearTimeout(closeTimer.current);
|
|
3730
|
+
setOpenIndex(index);
|
|
3731
|
+
};
|
|
3732
|
+
const scheduleClose = () => {
|
|
3733
|
+
if (closeTimer.current) clearTimeout(closeTimer.current);
|
|
3734
|
+
closeTimer.current = setTimeout(() => setOpenIndex(null), 120);
|
|
3735
|
+
};
|
|
3736
|
+
const handleNavKeyDown = (e) => {
|
|
3737
|
+
if (e.key !== "Tab" || openIndex === null || !navRef.current) return;
|
|
3738
|
+
const nav = navRef.current;
|
|
3739
|
+
const panelId = `${baseId}-panel-${openIndex}`;
|
|
3740
|
+
const panel = nav.querySelector(`#${CSS.escape(panelId)}`);
|
|
3741
|
+
const trigger = nav.querySelector(`[aria-controls="${panelId}"]`);
|
|
3742
|
+
if (!panel || !trigger) return;
|
|
3743
|
+
const panelItems = getFocusable(panel);
|
|
3744
|
+
if (!panelItems.length) return;
|
|
3745
|
+
const first = panelItems[0];
|
|
3746
|
+
const last = panelItems[panelItems.length - 1];
|
|
3747
|
+
const active = document.activeElement;
|
|
3748
|
+
if (!e.shiftKey && active === trigger) {
|
|
3749
|
+
e.preventDefault();
|
|
3750
|
+
first.focus();
|
|
3751
|
+
return;
|
|
3752
|
+
}
|
|
3753
|
+
if (e.shiftKey && active === first) {
|
|
3754
|
+
e.preventDefault();
|
|
3755
|
+
trigger.focus();
|
|
3756
|
+
return;
|
|
3757
|
+
}
|
|
3758
|
+
if (!e.shiftKey && active === last) {
|
|
3759
|
+
const navItems = getFocusable(nav).filter((el) => !panel.contains(el));
|
|
3760
|
+
const idx = navItems.indexOf(trigger);
|
|
3761
|
+
const next = idx !== -1 ? navItems[idx + 1] : void 0;
|
|
3762
|
+
if (next) {
|
|
3763
|
+
e.preventDefault();
|
|
3764
|
+
next.focus();
|
|
3765
|
+
setOpenIndex(null);
|
|
3766
|
+
}
|
|
3767
|
+
}
|
|
3768
|
+
};
|
|
3211
3769
|
useEffect(() => {
|
|
3212
3770
|
document.body.style.overflow = isMobileMenuOpen ? "hidden" : "";
|
|
3213
3771
|
return () => {
|
|
3214
3772
|
document.body.style.overflow = "";
|
|
3215
3773
|
};
|
|
3216
3774
|
}, [isMobileMenuOpen]);
|
|
3775
|
+
useEffect(() => {
|
|
3776
|
+
if (!dropdownOpen) return;
|
|
3777
|
+
const handleKey = (e) => {
|
|
3778
|
+
if (e.key === "Escape") setOpenIndex(null);
|
|
3779
|
+
};
|
|
3780
|
+
const handleOutside = (e) => {
|
|
3781
|
+
if (navRef.current && !navRef.current.contains(e.target)) {
|
|
3782
|
+
setOpenIndex(null);
|
|
3783
|
+
}
|
|
3784
|
+
};
|
|
3785
|
+
document.addEventListener("keydown", handleKey);
|
|
3786
|
+
document.addEventListener("pointerdown", handleOutside);
|
|
3787
|
+
document.addEventListener("focusin", handleOutside);
|
|
3788
|
+
return () => {
|
|
3789
|
+
document.removeEventListener("keydown", handleKey);
|
|
3790
|
+
document.removeEventListener("pointerdown", handleOutside);
|
|
3791
|
+
document.removeEventListener("focusin", handleOutside);
|
|
3792
|
+
};
|
|
3793
|
+
}, [dropdownOpen]);
|
|
3794
|
+
const logo = mainLogo ? /* @__PURE__ */ jsx(
|
|
3795
|
+
Picture,
|
|
3796
|
+
{
|
|
3797
|
+
className: clsx47(Navigation_module_default.logo, isTabletBelow && Navigation_module_default.logoMobile),
|
|
3798
|
+
src: mainLogo,
|
|
3799
|
+
alt: logoAlt
|
|
3800
|
+
}
|
|
3801
|
+
) : null;
|
|
3217
3802
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
3218
|
-
/* @__PURE__ */
|
|
3219
|
-
"
|
|
3803
|
+
/* @__PURE__ */ jsxs(
|
|
3804
|
+
"nav",
|
|
3220
3805
|
{
|
|
3221
|
-
|
|
3222
|
-
|
|
3223
|
-
|
|
3224
|
-
|
|
3225
|
-
|
|
3806
|
+
ref: navRef,
|
|
3807
|
+
className: clsx47(
|
|
3808
|
+
Navigation_module_default.Navigation,
|
|
3809
|
+
dropdownOpen && Navigation_module_default.dropdownOpen,
|
|
3810
|
+
// External-only transparent / hover treatment.
|
|
3811
|
+
isExternal && transparent && Navigation_module_default.variantTransparent,
|
|
3812
|
+
isExternal && isTransparent && Navigation_module_default.transparent,
|
|
3813
|
+
className
|
|
3226
3814
|
),
|
|
3227
|
-
|
|
3228
|
-
|
|
3229
|
-
|
|
3230
|
-
|
|
3231
|
-
|
|
3232
|
-
|
|
3233
|
-
|
|
3234
|
-
|
|
3235
|
-
|
|
3236
|
-
|
|
3237
|
-
|
|
3238
|
-
|
|
3239
|
-
|
|
3240
|
-
|
|
3241
|
-
|
|
3242
|
-
|
|
3243
|
-
|
|
3244
|
-
|
|
3245
|
-
|
|
3246
|
-
|
|
3247
|
-
|
|
3248
|
-
|
|
3249
|
-
|
|
3250
|
-
|
|
3251
|
-
|
|
3252
|
-
|
|
3253
|
-
|
|
3254
|
-
|
|
3255
|
-
|
|
3256
|
-
|
|
3257
|
-
|
|
3258
|
-
|
|
3259
|
-
|
|
3260
|
-
|
|
3261
|
-
|
|
3262
|
-
|
|
3263
|
-
|
|
3264
|
-
|
|
3265
|
-
|
|
3266
|
-
|
|
3267
|
-
|
|
3268
|
-
|
|
3269
|
-
|
|
3270
|
-
|
|
3271
|
-
|
|
3272
|
-
|
|
3273
|
-
|
|
3274
|
-
|
|
3275
|
-
|
|
3276
|
-
|
|
3277
|
-
|
|
3278
|
-
|
|
3279
|
-
|
|
3280
|
-
|
|
3281
|
-
|
|
3815
|
+
"aria-label": "Main",
|
|
3816
|
+
onKeyDown: handleNavKeyDown,
|
|
3817
|
+
onMouseEnter: isExternal ? () => setIsHovered(true) : void 0,
|
|
3818
|
+
onMouseLeave: isExternal ? () => setIsHovered(false) : scheduleClose,
|
|
3819
|
+
children: [
|
|
3820
|
+
/* @__PURE__ */ jsx("div", { className: Navigation_module_default.mainBar, children: /* @__PURE__ */ jsxs("div", { className: Navigation_module_default.inner, children: [
|
|
3821
|
+
/* @__PURE__ */ jsxs("div", { className: Navigation_module_default.topRow, children: [
|
|
3822
|
+
homeCta && logo ? /* @__PURE__ */ jsx(
|
|
3823
|
+
NavigationLogo,
|
|
3824
|
+
{
|
|
3825
|
+
mainLogo,
|
|
3826
|
+
homeCta,
|
|
3827
|
+
className: clsx47(Navigation_module_default.logo, isTabletBelow && Navigation_module_default.logoMobile)
|
|
3828
|
+
}
|
|
3829
|
+
) : logo,
|
|
3830
|
+
isTabletBelow ? /* @__PURE__ */ jsx(
|
|
3831
|
+
Button,
|
|
3832
|
+
{
|
|
3833
|
+
variant: "nofill",
|
|
3834
|
+
type: "button",
|
|
3835
|
+
className: isExternal ? Navigation_module_default.hamburgerButton : Navigation_module_default.hamburger,
|
|
3836
|
+
onClick: () => setIsMobileMenuOpen(true),
|
|
3837
|
+
"aria-label": "Open navigation menu",
|
|
3838
|
+
"aria-haspopup": "dialog",
|
|
3839
|
+
"aria-expanded": isMobileMenuOpen,
|
|
3840
|
+
"aria-controls": mobileMenuId,
|
|
3841
|
+
children: /* @__PURE__ */ jsx(
|
|
3842
|
+
Icon,
|
|
3843
|
+
{
|
|
3844
|
+
type: isExternal && isTransparent ? "menuWhite" : "menuBlack",
|
|
3845
|
+
size: 24,
|
|
3846
|
+
"aria-hidden": "true"
|
|
3847
|
+
}
|
|
3848
|
+
)
|
|
3849
|
+
}
|
|
3850
|
+
) : isExternal ? /* @__PURE__ */ jsx(
|
|
3851
|
+
NavigationCtas,
|
|
3852
|
+
{
|
|
3853
|
+
className: Navigation_module_default.upperRight,
|
|
3854
|
+
loginCta,
|
|
3855
|
+
rightButton,
|
|
3856
|
+
loginVariant: isTransparent ? "ghost" : "nofillblack"
|
|
3857
|
+
}
|
|
3858
|
+
) : user && /* @__PURE__ */ jsx(UserMenu, { user })
|
|
3859
|
+
] }),
|
|
3860
|
+
!isTabletBelow && /* @__PURE__ */ jsxs("div", { className: Navigation_module_default.bottomRow, children: [
|
|
3861
|
+
/* @__PURE__ */ jsx(
|
|
3862
|
+
NavigationDesktop,
|
|
3863
|
+
{
|
|
3864
|
+
navItems: navigationItems == null ? void 0 : navigationItems.items,
|
|
3865
|
+
openIndex,
|
|
3866
|
+
onOpen: openDropdown,
|
|
3867
|
+
onScheduleClose: scheduleClose,
|
|
3868
|
+
baseId,
|
|
3869
|
+
isTransparent
|
|
3870
|
+
}
|
|
3871
|
+
),
|
|
3872
|
+
!isExternal && /* @__PURE__ */ jsx(
|
|
3873
|
+
Search,
|
|
3874
|
+
{
|
|
3875
|
+
placeholder: searchPlaceholder,
|
|
3876
|
+
searchCta,
|
|
3877
|
+
onSearch
|
|
3878
|
+
}
|
|
3879
|
+
)
|
|
3880
|
+
] })
|
|
3881
|
+
] }) }),
|
|
3882
|
+
!isExternal && /* @__PURE__ */ jsx(NavigationBrandBars, { brandLogos, unfolded: showLogoUnfolded }),
|
|
3883
|
+
dropdownOpen && (openItem == null ? void 0 : openItem.type) === "dropdown" && /* @__PURE__ */ jsx(
|
|
3884
|
+
NavigationDropdown,
|
|
3282
3885
|
{
|
|
3283
|
-
|
|
3284
|
-
|
|
3285
|
-
|
|
3886
|
+
item: openItem,
|
|
3887
|
+
panelId: `${baseId}-panel-${openIndex}`,
|
|
3888
|
+
baseId,
|
|
3889
|
+
activeIndex: openIndex,
|
|
3890
|
+
onClose: () => setOpenIndex(null),
|
|
3891
|
+
onMouseEnter: () => openDropdown(openIndex),
|
|
3892
|
+
onMouseLeave: scheduleClose
|
|
3286
3893
|
}
|
|
3287
3894
|
)
|
|
3288
|
-
]
|
|
3895
|
+
]
|
|
3289
3896
|
}
|
|
3290
3897
|
),
|
|
3291
|
-
|
|
3898
|
+
dropdownOpen && /* @__PURE__ */ jsx("div", { className: Navigation_module_default.overlay, "aria-hidden": "true" }),
|
|
3899
|
+
isTabletBelow && /* @__PURE__ */ jsx(
|
|
3900
|
+
NavigationMobile,
|
|
3901
|
+
{
|
|
3902
|
+
id: mobileMenuId,
|
|
3903
|
+
navItems: navigationItems == null ? void 0 : navigationItems.items,
|
|
3904
|
+
mainLogo,
|
|
3905
|
+
logoAlt,
|
|
3906
|
+
homeCta,
|
|
3907
|
+
user,
|
|
3908
|
+
searchPlaceholder,
|
|
3909
|
+
searchCta,
|
|
3910
|
+
onSearch,
|
|
3911
|
+
isOpen: isMobileMenuOpen,
|
|
3912
|
+
onClose: () => setIsMobileMenuOpen(false),
|
|
3913
|
+
isExternal,
|
|
3914
|
+
loginCta,
|
|
3915
|
+
rightButton
|
|
3916
|
+
}
|
|
3917
|
+
)
|
|
3292
3918
|
] });
|
|
3293
3919
|
};
|
|
3294
3920
|
var PracticePathCardsFooter = ({ children }) => {
|
|
@@ -3330,7 +3956,7 @@ var PracticePathCards = ({
|
|
|
3330
3956
|
const titleNode = (_a = slots.title) != null ? _a : title;
|
|
3331
3957
|
const subtitleNode = (_b = slots.subtitle) != null ? _b : subtitle;
|
|
3332
3958
|
const footerNode = (_c = slots.footer) != null ? _c : footer;
|
|
3333
|
-
return /* @__PURE__ */ jsx("div", { className:
|
|
3959
|
+
return /* @__PURE__ */ jsx("div", { className: clsx47(PracticePathCards_module_default["practice-path-cards"], className), children: /* @__PURE__ */ jsxs(Container, { className: PracticePathCards_module_default.container, children: [
|
|
3334
3960
|
/* @__PURE__ */ jsxs("div", { className: PracticePathCards_module_default.wrapper, children: [
|
|
3335
3961
|
/* @__PURE__ */ jsxs("div", { className: PracticePathCards_module_default.content, children: [
|
|
3336
3962
|
titleNode && /* @__PURE__ */ jsx("h2", { children: titleNode }),
|
|
@@ -3384,8 +4010,8 @@ var Teaser5050With3Text = ({
|
|
|
3384
4010
|
title: Teaser5050With3TextTitle
|
|
3385
4011
|
});
|
|
3386
4012
|
const titleNode = (_a = slots.title) != null ? _a : title;
|
|
3387
|
-
return /* @__PURE__ */ jsx("div", { className:
|
|
3388
|
-
titleNode && /* @__PURE__ */ jsx("div", { className:
|
|
4013
|
+
return /* @__PURE__ */ jsx("div", { className: clsx47(Teaser5050With3Text_module_default["teaser5050-3text"], Teaser5050With3Text_module_default[variant], className), children: /* @__PURE__ */ jsxs(Container, { className: Teaser5050With3Text_module_default.container, children: [
|
|
4014
|
+
titleNode && /* @__PURE__ */ jsx("div", { className: clsx47(Teaser5050With3Text_module_default.title, "h3"), children: titleNode }),
|
|
3389
4015
|
/* @__PURE__ */ jsxs("div", { className: Teaser5050With3Text_module_default.content, children: [
|
|
3390
4016
|
/* @__PURE__ */ jsx("div", { className: Teaser5050With3Text_module_default.cards, children: cards == null ? void 0 : cards.map((card, key) => /* @__PURE__ */ jsx(InfoCard2, __spreadValues({}, card), key)) }),
|
|
3391
4017
|
image && /* @__PURE__ */ jsx(Picture, __spreadValues({ className: Teaser5050With3Text_module_default.image }, image))
|
|
@@ -3435,12 +4061,12 @@ var Teaser5050WithCta = ({
|
|
|
3435
4061
|
return /* @__PURE__ */ jsx(
|
|
3436
4062
|
"div",
|
|
3437
4063
|
{
|
|
3438
|
-
className:
|
|
4064
|
+
className: clsx47(Teaser5050WithCta_module_default.teaser5050, Teaser5050WithCta_module_default[variant], className),
|
|
3439
4065
|
style: { backgroundColor: bgColor ? bgColor : "#ffffff" },
|
|
3440
4066
|
children: /* @__PURE__ */ jsxs(Container, { className: Teaser5050WithCta_module_default.container, children: [
|
|
3441
4067
|
/* @__PURE__ */ jsxs("div", { className: Teaser5050WithCta_module_default.wrapper, children: [
|
|
3442
4068
|
/* @__PURE__ */ jsxs("div", { className: Teaser5050WithCta_module_default.content, children: [
|
|
3443
|
-
titleNode && /* @__PURE__ */ jsx("div", { className:
|
|
4069
|
+
titleNode && /* @__PURE__ */ jsx("div", { className: clsx47(Teaser5050WithCta_module_default.title, "h3"), children: titleNode }),
|
|
3444
4070
|
subtitleNode && /* @__PURE__ */ jsx("div", { className: "subheading", children: subtitleNode })
|
|
3445
4071
|
] }),
|
|
3446
4072
|
/* @__PURE__ */ jsx("div", { className: Teaser5050WithCta_module_default.ctaWrapper, children: ctas.map((cta, key) => /* @__PURE__ */ jsx(
|
|
@@ -3492,7 +4118,7 @@ var Carousel = (_a) => {
|
|
|
3492
4118
|
},
|
|
3493
4119
|
role: "region",
|
|
3494
4120
|
"aria-label": ariaLabel,
|
|
3495
|
-
className:
|
|
4121
|
+
className: clsx47(Carousel_module_default.carousel, className),
|
|
3496
4122
|
spaceBetween: 0,
|
|
3497
4123
|
slidesPerView: "auto",
|
|
3498
4124
|
modules: [FreeMode, A11y],
|
|
@@ -3502,7 +4128,7 @@ var Carousel = (_a) => {
|
|
|
3502
4128
|
children: slides.map((slide, index) => /* @__PURE__ */ jsx(
|
|
3503
4129
|
SwiperSlide,
|
|
3504
4130
|
{
|
|
3505
|
-
className:
|
|
4131
|
+
className: clsx47(Carousel_module_default["carousel-item"], props.slideClass),
|
|
3506
4132
|
children: slide
|
|
3507
4133
|
},
|
|
3508
4134
|
index
|
|
@@ -3559,13 +4185,13 @@ var EventList = ({
|
|
|
3559
4185
|
return /* @__PURE__ */ jsx(
|
|
3560
4186
|
"div",
|
|
3561
4187
|
{
|
|
3562
|
-
className:
|
|
4188
|
+
className: clsx47("event-list-module", EventList_module_default["event-list-module"], className),
|
|
3563
4189
|
style: {
|
|
3564
4190
|
backgroundColor
|
|
3565
4191
|
},
|
|
3566
|
-
children: /* @__PURE__ */ jsxs(Container, { className:
|
|
4192
|
+
children: /* @__PURE__ */ jsxs(Container, { className: clsx47(EventList_module_default["event-list-container"]), children: [
|
|
3567
4193
|
/* @__PURE__ */ jsxs("div", { className: EventList_module_default["event-list-header-container"], children: [
|
|
3568
|
-
titleNode && /* @__PURE__ */ jsx("h2", { className:
|
|
4194
|
+
titleNode && /* @__PURE__ */ jsx("h2", { className: clsx47(EventList_module_default["event-list-title"]), children: titleNode }),
|
|
3569
4195
|
cta && cta.url && /* @__PURE__ */ jsx(
|
|
3570
4196
|
Button,
|
|
3571
4197
|
{
|
|
@@ -3583,7 +4209,7 @@ var EventList = ({
|
|
|
3583
4209
|
Carousel,
|
|
3584
4210
|
{
|
|
3585
4211
|
"aria-label": "Upcoming events",
|
|
3586
|
-
wrapperClass:
|
|
4212
|
+
wrapperClass: clsx47(EventList_module_default["carousel-wrapper"], EventList_module_default[variant]),
|
|
3587
4213
|
slideClass: EventList_module_default["carousel-list-item"],
|
|
3588
4214
|
spaceBetween: 16,
|
|
3589
4215
|
slides: items.map((item) => {
|
|
@@ -3591,7 +4217,7 @@ var EventList = ({
|
|
|
3591
4217
|
return /* @__PURE__ */ jsx(
|
|
3592
4218
|
UpcomingEventCard,
|
|
3593
4219
|
__spreadValues({
|
|
3594
|
-
className:
|
|
4220
|
+
className: clsx47(EventList_module_default["event-card"]),
|
|
3595
4221
|
direction: "vertical",
|
|
3596
4222
|
showImage: false
|
|
3597
4223
|
}, item),
|
|
@@ -3604,7 +4230,7 @@ var EventList = ({
|
|
|
3604
4230
|
"ul",
|
|
3605
4231
|
{
|
|
3606
4232
|
"aria-label": "Upcoming events",
|
|
3607
|
-
className:
|
|
4233
|
+
className: clsx47(
|
|
3608
4234
|
EventList_module_default["event-list-wrapper"],
|
|
3609
4235
|
EventList_module_default["horizontal"],
|
|
3610
4236
|
EventList_module_default[variant]
|
|
@@ -3614,11 +4240,11 @@ var EventList = ({
|
|
|
3614
4240
|
return /* @__PURE__ */ jsx(
|
|
3615
4241
|
"li",
|
|
3616
4242
|
{
|
|
3617
|
-
className:
|
|
4243
|
+
className: clsx47(EventList_module_default["card-list-item"]),
|
|
3618
4244
|
children: /* @__PURE__ */ jsx(
|
|
3619
4245
|
UpcomingEventCard,
|
|
3620
4246
|
__spreadProps(__spreadValues({}, item), {
|
|
3621
|
-
className:
|
|
4247
|
+
className: clsx47(EventList_module_default["card-item"]),
|
|
3622
4248
|
showImage: false,
|
|
3623
4249
|
direction: "vertical"
|
|
3624
4250
|
})
|
|
@@ -3633,7 +4259,7 @@ var EventList = ({
|
|
|
3633
4259
|
"ul",
|
|
3634
4260
|
{
|
|
3635
4261
|
"aria-label": "Upcoming events",
|
|
3636
|
-
className:
|
|
4262
|
+
className: clsx47(EventList_module_default["event-list-wrapper"], EventList_module_default[listDirection]),
|
|
3637
4263
|
children: items == null ? void 0 : items.map((item, index) => {
|
|
3638
4264
|
var _a2, _b, _c;
|
|
3639
4265
|
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);
|
|
@@ -3641,8 +4267,8 @@ var EventList = ({
|
|
|
3641
4267
|
}
|
|
3642
4268
|
)
|
|
3643
4269
|
] }),
|
|
3644
|
-
!isNotEmpty && emptyNode ?
|
|
3645
|
-
className:
|
|
4270
|
+
!isNotEmpty && emptyNode ? React70.cloneElement(emptyNode, {
|
|
4271
|
+
className: clsx47("empty-search-result", EventList_module_default["empty-search-result"])
|
|
3646
4272
|
}) : null
|
|
3647
4273
|
] })
|
|
3648
4274
|
}
|
|
@@ -3686,9 +4312,9 @@ var TextEvent = (props) => {
|
|
|
3686
4312
|
});
|
|
3687
4313
|
const titleNode = (_a = slots.title) != null ? _a : title;
|
|
3688
4314
|
const richTextNode = (_b = slots.richText) != null ? _b : richText;
|
|
3689
|
-
return /* @__PURE__ */ jsxs(Container, { className:
|
|
4315
|
+
return /* @__PURE__ */ jsxs(Container, { className: clsx47(TextEvent_module_default.textEvent, className), children: [
|
|
3690
4316
|
/* @__PURE__ */ jsx(Text, { tag: "h2", className: TextEvent_module_default.title, children: titleNode }),
|
|
3691
|
-
/* @__PURE__ */ jsx("div", { className:
|
|
4317
|
+
/* @__PURE__ */ jsx("div", { className: clsx47(TextEvent_module_default.richText, TextEvent_module_default[variant != null ? variant : ""]), children: richTextNode })
|
|
3692
4318
|
] });
|
|
3693
4319
|
};
|
|
3694
4320
|
|
|
@@ -3719,7 +4345,7 @@ var TextBody = (props) => {
|
|
|
3719
4345
|
});
|
|
3720
4346
|
const titleNode = (_a = slots.title) != null ? _a : title;
|
|
3721
4347
|
const bodyNode = (_b = slots.body) != null ? _b : body;
|
|
3722
|
-
return /* @__PURE__ */ jsxs(Container, { className:
|
|
4348
|
+
return /* @__PURE__ */ jsxs(Container, { className: clsx47(TextBody_module_default.textBody, className), children: [
|
|
3723
4349
|
titleNode && /* @__PURE__ */ jsx(Text, { tag: "h2", className: TextBody_module_default.title, children: titleNode }),
|
|
3724
4350
|
/* @__PURE__ */ jsx("div", { className: TextBody_module_default.body, children: bodyNode })
|
|
3725
4351
|
] });
|
|
@@ -3762,7 +4388,7 @@ var TextCenterCtaInBottom = ({
|
|
|
3762
4388
|
});
|
|
3763
4389
|
const titleNode = (_a = slots.title) != null ? _a : title;
|
|
3764
4390
|
const subtitleNode = (_b = slots.subtitle) != null ? _b : subtitle;
|
|
3765
|
-
return /* @__PURE__ */ jsx("div", { className:
|
|
4391
|
+
return /* @__PURE__ */ jsx("div", { className: clsx47(TextCenterCtaInBottom_module_default.textCenterCta, className), children: /* @__PURE__ */ jsxs(Container, { className: TextCenterCtaInBottom_module_default.container, children: [
|
|
3766
4392
|
/* @__PURE__ */ jsxs("div", { className: TextCenterCtaInBottom_module_default.content, children: [
|
|
3767
4393
|
titleNode && /* @__PURE__ */ jsx("div", { className: TextCenterCtaInBottom_module_default.title, children: titleNode }),
|
|
3768
4394
|
subtitleNode && /* @__PURE__ */ jsx("div", { className: TextCenterCtaInBottom_module_default.subtitle, children: subtitleNode })
|
|
@@ -3770,7 +4396,7 @@ var TextCenterCtaInBottom = ({
|
|
|
3770
4396
|
!!(ctas == null ? void 0 : ctas.length) && /* @__PURE__ */ jsx(
|
|
3771
4397
|
"div",
|
|
3772
4398
|
{
|
|
3773
|
-
className:
|
|
4399
|
+
className: clsx47(
|
|
3774
4400
|
TextCenterCtaInBottom_module_default.ctaWrapper,
|
|
3775
4401
|
ctas.every((cta) => !cta.label && cta.logo) && TextCenterCtaInBottom_module_default.iconOnly
|
|
3776
4402
|
),
|
|
@@ -3882,7 +4508,7 @@ var ResourcesGridList = ({
|
|
|
3882
4508
|
const safeCurrentPage = Math.min(currentPage, totalPages);
|
|
3883
4509
|
const pageStart = (safeCurrentPage - 1) * ITEMS_PER_PAGE;
|
|
3884
4510
|
const paginatedItems = displayedItems.slice(pageStart, pageStart + ITEMS_PER_PAGE);
|
|
3885
|
-
return /* @__PURE__ */ jsxs("div", { ref: widgetRef, className:
|
|
4511
|
+
return /* @__PURE__ */ jsxs("div", { ref: widgetRef, className: clsx47(ResourcesGridList_module_default.widget, className), children: [
|
|
3886
4512
|
/* @__PURE__ */ jsx(
|
|
3887
4513
|
FilterBar,
|
|
3888
4514
|
{
|
|
@@ -3901,7 +4527,7 @@ var ResourcesGridList = ({
|
|
|
3901
4527
|
isMobile && /* @__PURE__ */ jsxs(
|
|
3902
4528
|
"div",
|
|
3903
4529
|
{
|
|
3904
|
-
className:
|
|
4530
|
+
className: clsx47(
|
|
3905
4531
|
ResourcesGridList_module_default.mobileSidebarOverlay,
|
|
3906
4532
|
isSidebarOpen && ResourcesGridList_module_default.mobileSidebarOverlayOpen
|
|
3907
4533
|
),
|
|
@@ -3912,7 +4538,7 @@ var ResourcesGridList = ({
|
|
|
3912
4538
|
return /* @__PURE__ */ jsxs(
|
|
3913
4539
|
"li",
|
|
3914
4540
|
{
|
|
3915
|
-
className:
|
|
4541
|
+
className: clsx47(
|
|
3916
4542
|
ResourcesGridList_module_default.mobileSidebarItem,
|
|
3917
4543
|
i === selectedCategory && ResourcesGridList_module_default.active
|
|
3918
4544
|
),
|
|
@@ -3957,7 +4583,7 @@ var ResourcesGridList = ({
|
|
|
3957
4583
|
onSelect: handleSelectCategory
|
|
3958
4584
|
}
|
|
3959
4585
|
),
|
|
3960
|
-
/* @__PURE__ */ jsx("div", { className:
|
|
4586
|
+
/* @__PURE__ */ jsx("div", { className: clsx47(ResourcesGridList_module_default.cardsArea, ResourcesGridList_module_default[view]), children: paginatedItems.map((item) => /* @__PURE__ */ jsx(ResourceCardItem, { item, view }, item.id)) })
|
|
3961
4587
|
] }),
|
|
3962
4588
|
totalPages > 1 && /* @__PURE__ */ jsx(
|
|
3963
4589
|
Pagination,
|
|
@@ -3990,7 +4616,7 @@ var Grid = ({
|
|
|
3990
4616
|
return /* @__PURE__ */ jsx(
|
|
3991
4617
|
Component,
|
|
3992
4618
|
{
|
|
3993
|
-
className:
|
|
4619
|
+
className: clsx47("grid", Grid_module_default.grid, className),
|
|
3994
4620
|
role,
|
|
3995
4621
|
"aria-label": ariaLabel,
|
|
3996
4622
|
"aria-labelledby": ariaLabelledBy,
|
|
@@ -4015,7 +4641,7 @@ var GridItem = ({
|
|
|
4015
4641
|
return /* @__PURE__ */ jsx(
|
|
4016
4642
|
Component,
|
|
4017
4643
|
{
|
|
4018
|
-
className:
|
|
4644
|
+
className: clsx47("grid-item", Grid_module_default["grid-item"], className),
|
|
4019
4645
|
role,
|
|
4020
4646
|
"aria-label": ariaLabel,
|
|
4021
4647
|
"aria-labelledby": ariaLabelledBy,
|
|
@@ -4063,13 +4689,13 @@ var BlogCardGrid = ({
|
|
|
4063
4689
|
title: BlogCardGridTitle
|
|
4064
4690
|
});
|
|
4065
4691
|
const titleNode = (_a = slots.title) != null ? _a : title;
|
|
4066
|
-
const content = /* @__PURE__ */ jsxs("div", { className:
|
|
4067
|
-
title && /* @__PURE__ */ jsxs("div", { className:
|
|
4068
|
-
titleNode && typeof titleNode === "string" ? /* @__PURE__ */ jsx(Text, { tag: "h4", className:
|
|
4069
|
-
cta && (cta == null ? void 0 : cta.url) && /* @__PURE__ */ jsx("div", { className:
|
|
4692
|
+
const content = /* @__PURE__ */ jsxs("div", { className: clsx47("wrapper", BlogCardGrid_module_default["wrapper"]), children: [
|
|
4693
|
+
title && /* @__PURE__ */ jsxs("div", { className: clsx47("header-container", BlogCardGrid_module_default["header-container"]), children: [
|
|
4694
|
+
titleNode && typeof titleNode === "string" ? /* @__PURE__ */ jsx(Text, { tag: "h4", className: clsx47("title", BlogCardGrid_module_default["title"]), children: titleNode }) : titleNode,
|
|
4695
|
+
cta && (cta == null ? void 0 : cta.url) && /* @__PURE__ */ jsx("div", { className: clsx47("cta-wrapper", BlogCardGrid_module_default["cta-wrapper"]), children: /* @__PURE__ */ jsx(
|
|
4070
4696
|
Button,
|
|
4071
4697
|
{
|
|
4072
|
-
className:
|
|
4698
|
+
className: clsx47("cta", BlogCardGrid_module_default["cta"]),
|
|
4073
4699
|
variant: "nofillblack",
|
|
4074
4700
|
href: cta.url,
|
|
4075
4701
|
isExternal: cta == null ? void 0 : cta.isExternal,
|
|
@@ -4095,11 +4721,11 @@ var BlogCardGrid = ({
|
|
|
4095
4721
|
return /* @__PURE__ */ jsx(
|
|
4096
4722
|
"div",
|
|
4097
4723
|
{
|
|
4098
|
-
className:
|
|
4724
|
+
className: clsx47("blog-card-grid", BlogCardGrid_module_default["blog-card-grid"], className),
|
|
4099
4725
|
style: {
|
|
4100
4726
|
backgroundColor
|
|
4101
4727
|
},
|
|
4102
|
-
children: hasContainer ? /* @__PURE__ */ jsx(Container, { className:
|
|
4728
|
+
children: hasContainer ? /* @__PURE__ */ jsx(Container, { className: clsx47("container", BlogCardGrid_module_default["container"]), children: content }) : content
|
|
4103
4729
|
}
|
|
4104
4730
|
);
|
|
4105
4731
|
};
|
|
@@ -4147,13 +4773,13 @@ var FeaturedNewsHighlights = ({
|
|
|
4147
4773
|
const sideCards = items.slice(1);
|
|
4148
4774
|
const isVariantHome = variant === "home";
|
|
4149
4775
|
const isBelowTablet = is("tablet", "below");
|
|
4150
|
-
const content = /* @__PURE__ */ jsxs("div", { className:
|
|
4151
|
-
title && cta && /* @__PURE__ */ jsxs("div", { className:
|
|
4776
|
+
const content = /* @__PURE__ */ jsxs("div", { className: clsx47("wrapper", FeaturedNewsHighlights_module_default["wrapper"]), children: [
|
|
4777
|
+
title && cta && /* @__PURE__ */ jsxs("div", { className: clsx47("header-container", FeaturedNewsHighlights_module_default["header-container"]), children: [
|
|
4152
4778
|
titleNode && typeof titleNode === "string" ? /* @__PURE__ */ jsx(Text, { tag: "h2", children: titleNode }) : titleNode,
|
|
4153
|
-
cta && (cta == null ? void 0 : cta.url) && /* @__PURE__ */ jsx("div", { className:
|
|
4779
|
+
cta && (cta == null ? void 0 : cta.url) && /* @__PURE__ */ jsx("div", { className: clsx47("cta-wrapper", FeaturedNewsHighlights_module_default["cta-wrapper"]), children: /* @__PURE__ */ jsx(
|
|
4154
4780
|
Button,
|
|
4155
4781
|
{
|
|
4156
|
-
className:
|
|
4782
|
+
className: clsx47("cta", FeaturedNewsHighlights_module_default["cta"]),
|
|
4157
4783
|
variant: "nofillblack",
|
|
4158
4784
|
href: cta.url,
|
|
4159
4785
|
isExternal: cta == null ? void 0 : cta.isExternal,
|
|
@@ -4165,9 +4791,9 @@ var FeaturedNewsHighlights = ({
|
|
|
4165
4791
|
isVariantHome && isBelowTablet && /* @__PURE__ */ jsx(
|
|
4166
4792
|
Carousel,
|
|
4167
4793
|
{
|
|
4168
|
-
className:
|
|
4794
|
+
className: clsx47("carousel", FeaturedNewsHighlights_module_default["carousel"]),
|
|
4169
4795
|
"aria-label": "featured news",
|
|
4170
|
-
wrapperClass:
|
|
4796
|
+
wrapperClass: clsx47(FeaturedNewsHighlights_module_default["carousel-wrapper"]),
|
|
4171
4797
|
slideClass: FeaturedNewsHighlights_module_default["carousel-list-item"],
|
|
4172
4798
|
spaceBetween: 16,
|
|
4173
4799
|
slides: items.map((item, index) => {
|
|
@@ -4176,27 +4802,27 @@ var FeaturedNewsHighlights = ({
|
|
|
4176
4802
|
NewsCard,
|
|
4177
4803
|
__spreadProps(__spreadValues({}, item), {
|
|
4178
4804
|
direction: "vertical",
|
|
4179
|
-
className:
|
|
4805
|
+
className: clsx47("carousel-news-card", FeaturedNewsHighlights_module_default["carousel-news-card"])
|
|
4180
4806
|
}),
|
|
4181
4807
|
(_a2 = item == null ? void 0 : item.title) != null ? _a2 : index
|
|
4182
4808
|
);
|
|
4183
4809
|
})
|
|
4184
4810
|
}
|
|
4185
4811
|
),
|
|
4186
|
-
(!isVariantHome || isVariantHome && !isBelowTablet) && /* @__PURE__ */ jsxs("div", { className:
|
|
4812
|
+
(!isVariantHome || isVariantHome && !isBelowTablet) && /* @__PURE__ */ jsxs("div", { className: clsx47("content-wrapper", FeaturedNewsHighlights_module_default["content-wrapper"]), children: [
|
|
4187
4813
|
featuredCard && /* @__PURE__ */ jsx(
|
|
4188
4814
|
NewsCard,
|
|
4189
4815
|
__spreadProps(__spreadValues({}, featuredCard), {
|
|
4190
|
-
className:
|
|
4816
|
+
className: clsx47("featured-card", FeaturedNewsHighlights_module_default["featured-card"]),
|
|
4191
4817
|
renderLink
|
|
4192
4818
|
})
|
|
4193
4819
|
),
|
|
4194
|
-
sideCards && sideCards.length > 0 && /* @__PURE__ */ jsx("div", { className:
|
|
4820
|
+
sideCards && sideCards.length > 0 && /* @__PURE__ */ jsx("div", { className: clsx47("side-content", FeaturedNewsHighlights_module_default["side-content"]), children: sideCards.map((card, index) => {
|
|
4195
4821
|
var _a2;
|
|
4196
4822
|
return /* @__PURE__ */ jsx(
|
|
4197
4823
|
NewsCard,
|
|
4198
4824
|
__spreadProps(__spreadValues({}, card), {
|
|
4199
|
-
className:
|
|
4825
|
+
className: clsx47("side-cards", FeaturedNewsHighlights_module_default["side-cards"]),
|
|
4200
4826
|
direction: "horizontal",
|
|
4201
4827
|
renderLink
|
|
4202
4828
|
}),
|
|
@@ -4208,11 +4834,11 @@ var FeaturedNewsHighlights = ({
|
|
|
4208
4834
|
return /* @__PURE__ */ jsx(
|
|
4209
4835
|
"div",
|
|
4210
4836
|
{
|
|
4211
|
-
className:
|
|
4837
|
+
className: clsx47("featured-news-higlights", FeaturedNewsHighlights_module_default["featured-news-higlights"], className),
|
|
4212
4838
|
style: {
|
|
4213
4839
|
backgroundColor
|
|
4214
4840
|
},
|
|
4215
|
-
children: hasContainer ? /* @__PURE__ */ jsx(Container, { className:
|
|
4841
|
+
children: hasContainer ? /* @__PURE__ */ jsx(Container, { className: clsx47("container", FeaturedNewsHighlights_module_default["container"]), children: content }) : content
|
|
4216
4842
|
}
|
|
4217
4843
|
);
|
|
4218
4844
|
};
|
|
@@ -4256,23 +4882,23 @@ var NewsCardList = ({
|
|
|
4256
4882
|
return /* @__PURE__ */ jsx(
|
|
4257
4883
|
"div",
|
|
4258
4884
|
{
|
|
4259
|
-
className:
|
|
4885
|
+
className: clsx47("news-card-list", NewsCardList_module_default["news-card-list"], className),
|
|
4260
4886
|
style: {
|
|
4261
4887
|
backgroundColor
|
|
4262
4888
|
},
|
|
4263
|
-
children: /* @__PURE__ */ jsxs(Container, { className:
|
|
4264
|
-
/* @__PURE__ */ jsxs("div", { className:
|
|
4889
|
+
children: /* @__PURE__ */ jsxs(Container, { className: clsx47("container", NewsCardList_module_default["container"]), children: [
|
|
4890
|
+
/* @__PURE__ */ jsxs("div", { className: clsx47("wrapper", NewsCardList_module_default["wrapper"]), children: [
|
|
4265
4891
|
/* @__PURE__ */ jsx(
|
|
4266
4892
|
Input,
|
|
4267
4893
|
__spreadValues({
|
|
4268
|
-
className:
|
|
4894
|
+
className: clsx47("search-input", NewsCardList_module_default["search-input"]),
|
|
4269
4895
|
startAdornment: /* @__PURE__ */ jsx(Icon, { type: "search" }),
|
|
4270
4896
|
placeholder: "Search News",
|
|
4271
4897
|
endAction: searchValue ? /* @__PURE__ */ jsx(
|
|
4272
4898
|
Button,
|
|
4273
4899
|
{
|
|
4274
4900
|
variant: "nofillblack",
|
|
4275
|
-
className:
|
|
4901
|
+
className: clsx47(NewsCardList_module_default["end-action-button"]),
|
|
4276
4902
|
"aria-label": "Search",
|
|
4277
4903
|
onClick: onSearchSubmit ? () => onSearchSubmit(searchValue || "") : void 0,
|
|
4278
4904
|
children: /* @__PURE__ */ jsx(Icon, { type: "rightBlack" })
|
|
@@ -4284,7 +4910,7 @@ var NewsCardList = ({
|
|
|
4284
4910
|
} : void 0
|
|
4285
4911
|
}, searchInputProps)
|
|
4286
4912
|
),
|
|
4287
|
-
/* @__PURE__ */ jsxs("div", { className:
|
|
4913
|
+
/* @__PURE__ */ jsxs("div", { className: clsx47("card-wrapper", NewsCardList_module_default["card-wrapper"]), children: [
|
|
4288
4914
|
currentPage === 1 && /* @__PURE__ */ jsx(
|
|
4289
4915
|
FeaturedNewsHighlights2,
|
|
4290
4916
|
{
|
|
@@ -4297,8 +4923,8 @@ var NewsCardList = ({
|
|
|
4297
4923
|
/* @__PURE__ */ jsx(BlogCardGrid2, { items: cards, hasContainer: false, renderLink })
|
|
4298
4924
|
] })
|
|
4299
4925
|
] }),
|
|
4300
|
-
paginationNode ?
|
|
4301
|
-
className:
|
|
4926
|
+
paginationNode ? React70.cloneElement(paginationNode, {
|
|
4927
|
+
className: clsx47("pagination", NewsCardList_module_default["pagination"])
|
|
4302
4928
|
}) : null
|
|
4303
4929
|
] })
|
|
4304
4930
|
}
|
|
@@ -4343,15 +4969,15 @@ var BlogPost = ({
|
|
|
4343
4969
|
});
|
|
4344
4970
|
const titleNode = (_a = slots.title) != null ? _a : title;
|
|
4345
4971
|
const bodyNode = (_b = slots.body) != null ? _b : body;
|
|
4346
|
-
return /* @__PURE__ */ jsx("div", { className:
|
|
4347
|
-
/* @__PURE__ */ jsxs("div", { className:
|
|
4972
|
+
return /* @__PURE__ */ jsx("div", { className: clsx47("blog-post", BlogPost_module_default["blog-post"], className), children: /* @__PURE__ */ jsxs(Container, { className: clsx47("container", BlogPost_module_default["container"]), children: [
|
|
4973
|
+
/* @__PURE__ */ jsxs("div", { className: clsx47("header", BlogPost_module_default["header"]), children: [
|
|
4348
4974
|
titleNode && typeof titleNode === "string" ? /* @__PURE__ */ jsx(Text, { tag: "h1", children: titleNode }) : titleNode,
|
|
4349
|
-
image && /* @__PURE__ */ jsx(Picture, __spreadProps(__spreadValues({}, image), { className:
|
|
4975
|
+
image && /* @__PURE__ */ jsx(Picture, __spreadProps(__spreadValues({}, image), { className: clsx47("image", BlogPost_module_default["image"]) }))
|
|
4350
4976
|
] }),
|
|
4351
|
-
/* @__PURE__ */ jsxs("div", { className:
|
|
4352
|
-
/* @__PURE__ */ jsxs("div", { className:
|
|
4977
|
+
/* @__PURE__ */ jsxs("div", { className: clsx47("content", BlogPost_module_default["content"]), children: [
|
|
4978
|
+
/* @__PURE__ */ jsxs("div", { className: clsx47("content-top", BlogPost_module_default["content-top"]), children: [
|
|
4353
4979
|
/* @__PURE__ */ jsx(Badge, { size: "sm", children: tag }),
|
|
4354
|
-
/* @__PURE__ */ jsxs("span", { className:
|
|
4980
|
+
/* @__PURE__ */ jsxs("span", { className: clsx47("content-date", BlogPost_module_default["content-date"]), children: [
|
|
4355
4981
|
"Published ",
|
|
4356
4982
|
/* @__PURE__ */ jsx("time", { dateTime: date.value, children: date.label })
|
|
4357
4983
|
] })
|
|
@@ -4364,7 +4990,7 @@ var BlogPost = ({
|
|
|
4364
4990
|
title: "More News",
|
|
4365
4991
|
items: relatedArticles,
|
|
4366
4992
|
hasContainer: false,
|
|
4367
|
-
className:
|
|
4993
|
+
className: clsx47("related-articles", BlogPost_module_default["related-articles"])
|
|
4368
4994
|
}
|
|
4369
4995
|
)
|
|
4370
4996
|
] }) });
|
|
@@ -4412,22 +5038,22 @@ var BlogSearchResultsList = ({
|
|
|
4412
5038
|
});
|
|
4413
5039
|
const searchNode = (_a = slots.search) != null ? _a : searchResult;
|
|
4414
5040
|
const paginationNode = slots.pagination;
|
|
4415
|
-
return /* @__PURE__ */ jsx("div", { className:
|
|
4416
|
-
typeof searchNode === "string" ? /* @__PURE__ */ jsx("span", { className:
|
|
4417
|
-
className:
|
|
5041
|
+
return /* @__PURE__ */ jsx("div", { className: clsx47("search-results-list", BlogSearchResultsList_module_default["search-results-list"], className), children: /* @__PURE__ */ jsxs(Container, { className: clsx47("container", BlogSearchResultsList_module_default["container"]), children: [
|
|
5042
|
+
typeof searchNode === "string" ? /* @__PURE__ */ jsx("span", { className: clsx47("search-result", BlogSearchResultsList_module_default["search-result"]), children: searchNode }) : React70.isValidElement(searchNode) ? React70.cloneElement(searchNode, {
|
|
5043
|
+
className: clsx47("search-result", BlogSearchResultsList_module_default["search-result"])
|
|
4418
5044
|
}) : null,
|
|
4419
|
-
/* @__PURE__ */ jsxs("div", { className:
|
|
5045
|
+
/* @__PURE__ */ jsxs("div", { className: clsx47("wrapper", BlogSearchResultsList_module_default["wrapper"]), children: [
|
|
4420
5046
|
/* @__PURE__ */ jsx(
|
|
4421
5047
|
Input,
|
|
4422
5048
|
__spreadValues({
|
|
4423
|
-
className:
|
|
5049
|
+
className: clsx47("search-input", BlogSearchResultsList_module_default["search-input"]),
|
|
4424
5050
|
startAdornment: /* @__PURE__ */ jsx(Icon, { type: "search" }),
|
|
4425
5051
|
placeholder: "Search News",
|
|
4426
5052
|
endAction: searchValue ? /* @__PURE__ */ jsx(
|
|
4427
5053
|
Button,
|
|
4428
5054
|
{
|
|
4429
5055
|
variant: "nofillblack",
|
|
4430
|
-
className:
|
|
5056
|
+
className: clsx47(BlogSearchResultsList_module_default["end-action-button"]),
|
|
4431
5057
|
"aria-label": "Search",
|
|
4432
5058
|
onClick: () => onSearchSubmit(searchValue),
|
|
4433
5059
|
children: /* @__PURE__ */ jsx(Icon, { type: "rightBlack" })
|
|
@@ -4441,8 +5067,8 @@ var BlogSearchResultsList = ({
|
|
|
4441
5067
|
),
|
|
4442
5068
|
/* @__PURE__ */ jsx(BlogCardGrid2, { items, hasContainer: false, renderLink })
|
|
4443
5069
|
] }),
|
|
4444
|
-
paginationNode ?
|
|
4445
|
-
className:
|
|
5070
|
+
paginationNode ? React70.cloneElement(paginationNode, {
|
|
5071
|
+
className: clsx47("pagination", BlogSearchResultsList_module_default["pagination"])
|
|
4446
5072
|
}) : null
|
|
4447
5073
|
] }) });
|
|
4448
5074
|
};
|
|
@@ -4483,11 +5109,11 @@ var GlobalSearchResultsList = ({
|
|
|
4483
5109
|
});
|
|
4484
5110
|
const searchNode = (_a = slots.search) != null ? _a : searchResult;
|
|
4485
5111
|
const paginationNode = slots.pagination;
|
|
4486
|
-
return /* @__PURE__ */ jsx("div", { className:
|
|
4487
|
-
typeof searchNode === "string" ? /* @__PURE__ */ jsx("span", { className:
|
|
4488
|
-
className:
|
|
5112
|
+
return /* @__PURE__ */ jsx("div", { className: clsx47("search-results-list", GlobalSearchResultsList_module_default["search-results-list"], className), children: /* @__PURE__ */ jsxs(Container, { className: clsx47("container", GlobalSearchResultsList_module_default["container"]), children: [
|
|
5113
|
+
typeof searchNode === "string" ? /* @__PURE__ */ jsx("span", { className: clsx47("search-result", GlobalSearchResultsList_module_default["search-result"]), children: searchNode }) : React70.isValidElement(searchNode) ? React70.cloneElement(searchNode, {
|
|
5114
|
+
className: clsx47("search-result", GlobalSearchResultsList_module_default["search-result"])
|
|
4489
5115
|
}) : null,
|
|
4490
|
-
/* @__PURE__ */ jsx("div", { className:
|
|
5116
|
+
/* @__PURE__ */ jsx("div", { className: clsx47("wrapper", GlobalSearchResultsList_module_default["wrapper"]), children: /* @__PURE__ */ jsx(Grid, { role: "list", columns: 3, children: items.map((item, index) => {
|
|
4491
5117
|
var _a2;
|
|
4492
5118
|
return /* @__PURE__ */ jsx(
|
|
4493
5119
|
GridItem,
|
|
@@ -4507,8 +5133,8 @@ var GlobalSearchResultsList = ({
|
|
|
4507
5133
|
item.title ? `${item.title}-${(_a2 = item == null ? void 0 : item.id) != null ? _a2 : index}` : index
|
|
4508
5134
|
);
|
|
4509
5135
|
}) }) }),
|
|
4510
|
-
paginationNode ?
|
|
4511
|
-
className:
|
|
5136
|
+
paginationNode ? React70.cloneElement(paginationNode, {
|
|
5137
|
+
className: clsx47("pagination", GlobalSearchResultsList_module_default["pagination"])
|
|
4512
5138
|
}) : null
|
|
4513
5139
|
] }) });
|
|
4514
5140
|
};
|
|
@@ -4566,7 +5192,7 @@ var TextCenterWithMedia = ({
|
|
|
4566
5192
|
};
|
|
4567
5193
|
const slots = resolveCompoundSlots(children, { title: TextCenterWithMediaTitle });
|
|
4568
5194
|
const titleNode = (_a = slots.title) != null ? _a : title;
|
|
4569
|
-
return /* @__PURE__ */ jsxs("section", { className:
|
|
5195
|
+
return /* @__PURE__ */ jsxs("section", { className: clsx47(TextCenterWithMedia_module_default.textCenterWithMedia, className), children: [
|
|
4570
5196
|
/* @__PURE__ */ jsxs(Container, { children: [
|
|
4571
5197
|
titleNode && /* @__PURE__ */ jsx("h2", { className: "h2", children: titleNode }),
|
|
4572
5198
|
/* @__PURE__ */ jsx("div", { className: TextCenterWithMedia_module_default.thumbnailWrapper, children: thumbnail && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
@@ -4607,6 +5233,99 @@ var TextCenterWithMedia2 = Object.assign(TextCenterWithMedia, {
|
|
|
4607
5233
|
Title: TextCenterWithMediaTitle
|
|
4608
5234
|
});
|
|
4609
5235
|
|
|
4610
|
-
|
|
5236
|
+
// src/widgets/QuoteSectionBlock/QuoteSectionBlock.module.scss
|
|
5237
|
+
var QuoteSectionBlock_module_default = {
|
|
5238
|
+
quoteSectionBlock: "QuoteSectionBlock_module_quoteSectionBlock",
|
|
5239
|
+
inner: "QuoteSectionBlock_module_inner",
|
|
5240
|
+
title: "QuoteSectionBlock_module_title",
|
|
5241
|
+
swiperContainer: "QuoteSectionBlock_module_swiperContainer",
|
|
5242
|
+
card: "QuoteSectionBlock_module_card",
|
|
5243
|
+
quoteLogo: "QuoteSectionBlock_module_quoteLogo",
|
|
5244
|
+
bodyText: "QuoteSectionBlock_module_bodyText",
|
|
5245
|
+
attribution: "QuoteSectionBlock_module_attribution",
|
|
5246
|
+
displayPhoto: "QuoteSectionBlock_module_displayPhoto",
|
|
5247
|
+
displayName: "QuoteSectionBlock_module_displayName",
|
|
5248
|
+
attributionText: "QuoteSectionBlock_module_attributionText",
|
|
5249
|
+
jobTitleLogo: "QuoteSectionBlock_module_jobTitleLogo",
|
|
5250
|
+
controls: "QuoteSectionBlock_module_controls"
|
|
5251
|
+
};
|
|
5252
|
+
var QuoteSectionBlock = ({ className, title, items = [] }) => {
|
|
5253
|
+
const { is } = useViewPort_default();
|
|
5254
|
+
const isMobile = is("tablet", "below");
|
|
5255
|
+
const [swiperInstance, setSwiperInstance] = useState(null);
|
|
5256
|
+
const [activeIndex, setActiveIndex] = useState(0);
|
|
5257
|
+
if (!items.length) return null;
|
|
5258
|
+
return /* @__PURE__ */ jsx("div", { className: clsx47(QuoteSectionBlock_module_default.quoteSectionBlock, className), children: /* @__PURE__ */ jsxs("div", { className: QuoteSectionBlock_module_default.inner, children: [
|
|
5259
|
+
title && /* @__PURE__ */ jsx("h2", { className: QuoteSectionBlock_module_default.title, children: title }),
|
|
5260
|
+
/* @__PURE__ */ jsx("div", { className: QuoteSectionBlock_module_default.swiperContainer, children: /* @__PURE__ */ jsx(
|
|
5261
|
+
Swiper,
|
|
5262
|
+
{
|
|
5263
|
+
slidesPerView: "auto",
|
|
5264
|
+
spaceBetween: isMobile ? 8 : 32,
|
|
5265
|
+
onSwiper: setSwiperInstance,
|
|
5266
|
+
onSlideChange: (swiper) => setActiveIndex(swiper.activeIndex),
|
|
5267
|
+
children: items.map((item, index) => /* @__PURE__ */ jsx(SwiperSlide, { children: /* @__PURE__ */ jsxs("div", { className: QuoteSectionBlock_module_default.card, children: [
|
|
5268
|
+
(item == null ? void 0 : item.quoteLogo) && /* @__PURE__ */ jsx("img", { src: item.quoteLogo, alt: "", className: QuoteSectionBlock_module_default.quoteLogo }),
|
|
5269
|
+
(item == null ? void 0 : item.bodyText) && /* @__PURE__ */ jsx("p", { className: QuoteSectionBlock_module_default.bodyText, children: item.bodyText }),
|
|
5270
|
+
/* @__PURE__ */ jsxs("div", { className: QuoteSectionBlock_module_default.attribution, children: [
|
|
5271
|
+
(item == null ? void 0 : item.displayPhoto) && /* @__PURE__ */ jsx(
|
|
5272
|
+
"img",
|
|
5273
|
+
{
|
|
5274
|
+
src: item.displayPhoto,
|
|
5275
|
+
alt: item.displayName,
|
|
5276
|
+
className: QuoteSectionBlock_module_default.displayPhoto
|
|
5277
|
+
}
|
|
5278
|
+
),
|
|
5279
|
+
/* @__PURE__ */ jsxs("div", { className: QuoteSectionBlock_module_default.attributionText, children: [
|
|
5280
|
+
(item == null ? void 0 : item.displayName) && /* @__PURE__ */ jsx("span", { className: QuoteSectionBlock_module_default.displayName, children: item.displayName }),
|
|
5281
|
+
(item == null ? void 0 : item.jobTitleLogo) && /* @__PURE__ */ jsx("img", { src: item.jobTitleLogo, alt: "", className: QuoteSectionBlock_module_default.jobTitleLogo })
|
|
5282
|
+
] })
|
|
5283
|
+
] })
|
|
5284
|
+
] }) }, index))
|
|
5285
|
+
}
|
|
5286
|
+
) }),
|
|
5287
|
+
/* @__PURE__ */ jsx(
|
|
5288
|
+
Pagination,
|
|
5289
|
+
{
|
|
5290
|
+
className: QuoteSectionBlock_module_default.controls,
|
|
5291
|
+
totalPages: items.length,
|
|
5292
|
+
currentPage: activeIndex + 1,
|
|
5293
|
+
loop: true,
|
|
5294
|
+
onPageChange: (page) => swiperInstance == null ? void 0 : swiperInstance.slideTo(page - 1)
|
|
5295
|
+
},
|
|
5296
|
+
activeIndex
|
|
5297
|
+
)
|
|
5298
|
+
] }) });
|
|
5299
|
+
};
|
|
5300
|
+
function useIntersectionObserver({
|
|
5301
|
+
animateOnce = false,
|
|
5302
|
+
options = {}
|
|
5303
|
+
} = {}) {
|
|
5304
|
+
const observeRef = useRef(null);
|
|
5305
|
+
const [isVisible, setIsVisible] = useState(false);
|
|
5306
|
+
if (typeof IntersectionObserver === "undefined") {
|
|
5307
|
+
console.warn("IntersectionObserver is not supported in this browser.");
|
|
5308
|
+
return { observeRef, isVisible: true };
|
|
5309
|
+
}
|
|
5310
|
+
useEffect(() => {
|
|
5311
|
+
const currentRef = observeRef.current;
|
|
5312
|
+
if (!currentRef) return;
|
|
5313
|
+
const observer = new IntersectionObserver((entries) => {
|
|
5314
|
+
const entry = entries[0];
|
|
5315
|
+
if (!entry) return;
|
|
5316
|
+
setIsVisible(entry.isIntersecting);
|
|
5317
|
+
if (entry.isIntersecting && animateOnce) {
|
|
5318
|
+
observer.disconnect();
|
|
5319
|
+
}
|
|
5320
|
+
}, options);
|
|
5321
|
+
observer.observe(currentRef);
|
|
5322
|
+
return () => {
|
|
5323
|
+
observer.disconnect();
|
|
5324
|
+
};
|
|
5325
|
+
}, [observeRef, animateOnce, options]);
|
|
5326
|
+
return { observeRef, isVisible };
|
|
5327
|
+
}
|
|
5328
|
+
|
|
5329
|
+
export { Anchor, Badge, BlogCardGrid2 as BlogCardGrid, BlogPost2 as BlogPost, BlogPostContent2 as BlogPostContent, BlogSearchResultsList2 as BlogSearchResultsList, BrandsStrip, Button, Card2 as Card, CardCollection2 as CardCollection, ConditionalWrapper, ContactModule2 as ContactModule, Container, CountingCard2 as CountingCard, EventList2 as EventList, FeaturedNewsHighlights2 as FeaturedNewsHighlights, FilterBar, Footer, GlobalSearchResultsList2 as GlobalSearchResultsList, HeroBanner2 as HeroBanner, HeroBannerCarousel, Icon, InfoCard2 as InfoCard, Input, InternalBrandsTab2 as InternalBrandsTab, MiniBanner2 as MiniBanner, MiniSectionCta2 as MiniSectionCta, Navigation2 as Navigation, NewsCard, NewsCardList2 as NewsCardList, Pagination, Picture, PracticeCard, PracticePathCards2 as PracticePathCards, QuoteSectionBlock, ResourceCardItem, ResourcesGridList, Search, Sidebar, Teaser5050With3Text2 as Teaser5050With3Text, Teaser5050WithCta2 as Teaser5050WithCta, TextBody2 as TextBody, TextCenterCtaInBottom2 as TextCenterCtaInBottom, TextCenterWithMedia2 as TextCenterWithMedia, TextEvent2 as TextEvent, UpcomingEventCard, UserMenu, resolveCompoundSlots, svgs, useIntersectionObserver, useIsAtTop };
|
|
4611
5330
|
//# sourceMappingURL=index.mjs.map
|
|
4612
5331
|
//# sourceMappingURL=index.mjs.map
|