@digital-b2c/coreui-kit 0.17.0 → 0.17.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +167 -137
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +629 -573
- package/dist/index.css.map +1 -1
- package/dist/index.d.cts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.mjs +167 -137
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -3232,81 +3232,9 @@ var useIsAtTop = () => {
|
|
|
3232
3232
|
return isAtTop;
|
|
3233
3233
|
};
|
|
3234
3234
|
|
|
3235
|
-
// src/widgets/Navigation/
|
|
3236
|
-
var
|
|
3237
|
-
|
|
3238
|
-
mobileItemLink: "Navigation_module_mobileItemLink",
|
|
3239
|
-
mobileItemTrigger: "Navigation_module_mobileItemTrigger",
|
|
3240
|
-
mobileSubLink: "Navigation_module_mobileSubLink",
|
|
3241
|
-
dropdownOpen: "Navigation_module_dropdownOpen",
|
|
3242
|
-
variantTransparent: "Navigation_module_variantTransparent",
|
|
3243
|
-
transparent: "Navigation_module_transparent",
|
|
3244
|
-
logo: "Navigation_module_logo",
|
|
3245
|
-
upperRight: "Navigation_module_upperRight",
|
|
3246
|
-
overlay: "Navigation_module_overlay",
|
|
3247
|
-
mainLogoLink: "Navigation_module_mainLogoLink",
|
|
3248
|
-
dropdownLinkSpacer: "Navigation_module_dropdownLinkSpacer",
|
|
3249
|
-
mainLogoMobile: "Navigation_module_mainLogoMobile",
|
|
3250
|
-
hamburgerButton: "Navigation_module_hamburgerButton",
|
|
3251
|
-
mobileMenu: "Navigation_module_mobileMenu",
|
|
3252
|
-
mobileMenuOpen: "Navigation_module_mobileMenuOpen",
|
|
3253
|
-
mobileMenuHeader: "Navigation_module_mobileMenuHeader",
|
|
3254
|
-
mobileMenuItems: "Navigation_module_mobileMenuItems",
|
|
3255
|
-
mobileItem: "Navigation_module_mobileItem",
|
|
3256
|
-
mobileItemChevron: "Navigation_module_mobileItemChevron",
|
|
3257
|
-
mobileItemChevronOpen: "Navigation_module_mobileItemChevronOpen",
|
|
3258
|
-
mobileSubItems: "Navigation_module_mobileSubItems",
|
|
3259
|
-
mobileSubItemsOpen: "Navigation_module_mobileSubItemsOpen",
|
|
3260
|
-
mobileSubItemsInner: "Navigation_module_mobileSubItemsInner",
|
|
3261
|
-
mobileSubLinkActive: "Navigation_module_mobileSubLinkActive",
|
|
3262
|
-
mobileMenuCtas: "Navigation_module_mobileMenuCtas",
|
|
3263
|
-
Navigation: "Navigation_module_Navigation",
|
|
3264
|
-
mainBar: "Navigation_module_mainBar",
|
|
3265
|
-
navTabLink: "Navigation_module_navTabLink",
|
|
3266
|
-
navTabTrigger: "Navigation_module_navTabTrigger",
|
|
3267
|
-
navTabActive: "Navigation_module_navTabActive",
|
|
3268
|
-
inner: "Navigation_module_inner",
|
|
3269
|
-
topRow: "Navigation_module_topRow",
|
|
3270
|
-
logoLink: "Navigation_module_logoLink",
|
|
3271
|
-
logoMobile: "Navigation_module_logoMobile",
|
|
3272
|
-
hamburger: "Navigation_module_hamburger",
|
|
3273
|
-
bottomRow: "Navigation_module_bottomRow",
|
|
3274
|
-
navTabs: "Navigation_module_navTabs",
|
|
3275
|
-
navTab: "Navigation_module_navTab",
|
|
3276
|
-
navTabTriggerOpen: "Navigation_module_navTabTriggerOpen",
|
|
3277
|
-
dropdownPanel: "Navigation_module_dropdownPanel",
|
|
3278
|
-
dropdownInner: "Navigation_module_dropdownInner",
|
|
3279
|
-
dropdownLinks: "Navigation_module_dropdownLinks",
|
|
3280
|
-
dropdownLinkItem: "Navigation_module_dropdownLinkItem",
|
|
3281
|
-
dropdownLink: "Navigation_module_dropdownLink",
|
|
3282
|
-
dropdownDivider: "Navigation_module_dropdownDivider",
|
|
3283
|
-
dropdownInfo: "Navigation_module_dropdownInfo",
|
|
3284
|
-
dropdownDescription: "Navigation_module_dropdownDescription",
|
|
3285
|
-
brandBars: "Navigation_module_brandBars",
|
|
3286
|
-
brandBar: "Navigation_module_brandBar",
|
|
3287
|
-
brandBarsUnfolded: "Navigation_module_brandBarsUnfolded",
|
|
3288
|
-
brandLogo: "Navigation_module_brandLogo",
|
|
3289
|
-
lenscrafters: "Navigation_module_lenscrafters",
|
|
3290
|
-
forEyes: "Navigation_module_forEyes",
|
|
3291
|
-
optical: "Navigation_module_optical",
|
|
3292
|
-
pearleVision: "Navigation_module_pearleVision",
|
|
3293
|
-
internalMobileMenu: "Navigation_module_internalMobileMenu",
|
|
3294
|
-
internalMobileMenuOpen: "Navigation_module_internalMobileMenuOpen",
|
|
3295
|
-
mobileHeader: "Navigation_module_mobileHeader",
|
|
3296
|
-
mobileBrandBars: "Navigation_module_mobileBrandBars",
|
|
3297
|
-
mobileClose: "Navigation_module_mobileClose",
|
|
3298
|
-
mobileItems: "Navigation_module_mobileItems",
|
|
3299
|
-
internalMobileItem: "Navigation_module_internalMobileItem",
|
|
3300
|
-
internalMobileItemLink: "Navigation_module_internalMobileItemLink",
|
|
3301
|
-
internalMobileItemTrigger: "Navigation_module_internalMobileItemTrigger",
|
|
3302
|
-
internalMobileItemChevron: "Navigation_module_internalMobileItemChevron",
|
|
3303
|
-
internalMobileItemChevronOpen: "Navigation_module_internalMobileItemChevronOpen",
|
|
3304
|
-
internalMobileSubItems: "Navigation_module_internalMobileSubItems",
|
|
3305
|
-
internalMobileSubItemsOpen: "Navigation_module_internalMobileSubItemsOpen",
|
|
3306
|
-
internalMobileSubItemsInner: "Navigation_module_internalMobileSubItemsInner",
|
|
3307
|
-
internalMobileSubLink: "Navigation_module_internalMobileSubLink",
|
|
3308
|
-
internalMobileSubLinkActive: "Navigation_module_internalMobileSubLinkActive",
|
|
3309
|
-
mobileFooter: "Navigation_module_mobileFooter"
|
|
3235
|
+
// src/widgets/Navigation/NavigationLogo.module.scss
|
|
3236
|
+
var NavigationLogo_module_default = {
|
|
3237
|
+
mainLogoLink: "NavigationLogo_module_mainLogoLink"
|
|
3310
3238
|
};
|
|
3311
3239
|
var NavigationLogo = ({
|
|
3312
3240
|
mainLogo,
|
|
@@ -3317,7 +3245,7 @@ var NavigationLogo = ({
|
|
|
3317
3245
|
}) => {
|
|
3318
3246
|
if (!mainLogo) return null;
|
|
3319
3247
|
if (homeCta) {
|
|
3320
|
-
return /* @__PURE__ */ jsxRuntime.jsx("a", { href: homeCta, className:
|
|
3248
|
+
return /* @__PURE__ */ jsxRuntime.jsx("a", { href: homeCta, className: NavigationLogo_module_default.mainLogoLink, onClick, "aria-label": logoAlt, children: /* @__PURE__ */ jsxRuntime.jsx(Picture, { className, src: mainLogo, alt: logoAlt || "" }) });
|
|
3321
3249
|
}
|
|
3322
3250
|
return /* @__PURE__ */ jsxRuntime.jsx(Picture, { className, src: mainLogo, alt: logoAlt });
|
|
3323
3251
|
};
|
|
@@ -3332,11 +3260,23 @@ var NavigationCtas = ({
|
|
|
3332
3260
|
(rightButton == null ? void 0 : rightButton.label) && /* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "primary", href: rightButton.url, isExternal: rightButton.isExternal, children: rightButton.label })
|
|
3333
3261
|
] });
|
|
3334
3262
|
};
|
|
3263
|
+
|
|
3264
|
+
// src/widgets/Navigation/NavigationBrandBars.module.scss
|
|
3265
|
+
var NavigationBrandBars_module_default = {
|
|
3266
|
+
brandBars: "NavigationBrandBars_module_brandBars",
|
|
3267
|
+
brandBar: "NavigationBrandBars_module_brandBar",
|
|
3268
|
+
brandBarsUnfolded: "NavigationBrandBars_module_brandBarsUnfolded",
|
|
3269
|
+
brandLogo: "NavigationBrandBars_module_brandLogo",
|
|
3270
|
+
lenscrafters: "NavigationBrandBars_module_lenscrafters",
|
|
3271
|
+
forEyes: "NavigationBrandBars_module_forEyes",
|
|
3272
|
+
optical: "NavigationBrandBars_module_optical",
|
|
3273
|
+
pearleVision: "NavigationBrandBars_module_pearleVision"
|
|
3274
|
+
};
|
|
3335
3275
|
var BRANDS = [
|
|
3336
|
-
{ key: "lenscrafters", className:
|
|
3337
|
-
{ key: "forEyes", className:
|
|
3338
|
-
{ key: "optical", className:
|
|
3339
|
-
{ key: "pearleVision", className:
|
|
3276
|
+
{ key: "lenscrafters", className: NavigationBrandBars_module_default.lenscrafters, label: "LensCrafters" },
|
|
3277
|
+
{ key: "forEyes", className: NavigationBrandBars_module_default.forEyes, label: "For Eyes" },
|
|
3278
|
+
{ key: "optical", className: NavigationBrandBars_module_default.optical, label: "Target Optical" },
|
|
3279
|
+
{ key: "pearleVision", className: NavigationBrandBars_module_default.pearleVision, label: "Pearle Vision" }
|
|
3340
3280
|
];
|
|
3341
3281
|
var NavigationBrandBars = ({
|
|
3342
3282
|
brandLogos,
|
|
@@ -3348,12 +3288,12 @@ var NavigationBrandBars = ({
|
|
|
3348
3288
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3349
3289
|
"div",
|
|
3350
3290
|
{
|
|
3351
|
-
className: clsx49__default.default(
|
|
3291
|
+
className: clsx49__default.default(NavigationBrandBars_module_default.brandBars, isUnfolded && NavigationBrandBars_module_default.brandBarsUnfolded, className),
|
|
3352
3292
|
"aria-hidden": "true",
|
|
3353
3293
|
children: BRANDS.map((brand) => {
|
|
3354
3294
|
var _a;
|
|
3355
3295
|
const logo = brandLogos == null ? void 0 : brandLogos[brand.key];
|
|
3356
|
-
return /* @__PURE__ */ jsxRuntime.jsx("span", { className: clsx49__default.default(
|
|
3296
|
+
return /* @__PURE__ */ jsxRuntime.jsx("span", { className: clsx49__default.default(NavigationBrandBars_module_default.brandBar, brand.className), children: logo && /* @__PURE__ */ jsxRuntime.jsx("img", { className: NavigationBrandBars_module_default.brandLogo, src: logo.src, alt: (_a = logo.alt) != null ? _a : brand.label }) }, brand.key);
|
|
3357
3297
|
})
|
|
3358
3298
|
}
|
|
3359
3299
|
);
|
|
@@ -3381,6 +3321,16 @@ var isPathActive = (url, pathname) => {
|
|
|
3381
3321
|
}
|
|
3382
3322
|
return normalize(targetPath) === normalize(pathname);
|
|
3383
3323
|
};
|
|
3324
|
+
|
|
3325
|
+
// src/widgets/Navigation/NavigationDesktop.module.scss
|
|
3326
|
+
var NavigationDesktop_module_default = {
|
|
3327
|
+
navTabs: "NavigationDesktop_module_navTabs",
|
|
3328
|
+
navTab: "NavigationDesktop_module_navTab",
|
|
3329
|
+
navTabLink: "NavigationDesktop_module_navTabLink",
|
|
3330
|
+
navTabTrigger: "NavigationDesktop_module_navTabTrigger",
|
|
3331
|
+
navTabTriggerOpen: "NavigationDesktop_module_navTabTriggerOpen",
|
|
3332
|
+
navTabActive: "NavigationDesktop_module_navTabActive"
|
|
3333
|
+
};
|
|
3384
3334
|
var NavigationDesktop = ({
|
|
3385
3335
|
navItems,
|
|
3386
3336
|
openIndex,
|
|
@@ -3405,16 +3355,16 @@ var NavigationDesktop = ({
|
|
|
3405
3355
|
}
|
|
3406
3356
|
}
|
|
3407
3357
|
};
|
|
3408
|
-
return /* @__PURE__ */ jsxRuntime.jsx("ul", { className:
|
|
3358
|
+
return /* @__PURE__ */ jsxRuntime.jsx("ul", { className: NavigationDesktop_module_default.navTabs, children: navItems.map((item, index) => {
|
|
3409
3359
|
var _a, _b, _c, _d, _e;
|
|
3410
3360
|
const isOpen = openIndex === index;
|
|
3411
3361
|
if (item.type === "link") {
|
|
3412
3362
|
const isCurrent2 = item.isActive || isPathActive((_a = item.cta) == null ? void 0 : _a.url, pathname);
|
|
3413
|
-
return /* @__PURE__ */ jsxRuntime.jsx("li", { className:
|
|
3363
|
+
return /* @__PURE__ */ jsxRuntime.jsx("li", { className: NavigationDesktop_module_default.navTab, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3414
3364
|
"a",
|
|
3415
3365
|
{
|
|
3416
3366
|
href: (_b = item.cta) == null ? void 0 : _b.url,
|
|
3417
|
-
className: clsx49__default.default(
|
|
3367
|
+
className: clsx49__default.default(NavigationDesktop_module_default.navTabLink, isCurrent2 && NavigationDesktop_module_default.navTabActive),
|
|
3418
3368
|
"aria-current": isCurrent2 ? "page" : void 0,
|
|
3419
3369
|
target: ((_c = item.cta) == null ? void 0 : _c.isExternal) ? "_blank" : void 0,
|
|
3420
3370
|
rel: ((_d = item.cta) == null ? void 0 : _d.isExternal) ? "noopener noreferrer" : void 0,
|
|
@@ -3428,16 +3378,16 @@ var NavigationDesktop = ({
|
|
|
3428
3378
|
var _a2;
|
|
3429
3379
|
return sub.type === "link" && isPathActive((_a2 = sub.cta) == null ? void 0 : _a2.url, pathname);
|
|
3430
3380
|
});
|
|
3431
|
-
return /* @__PURE__ */ jsxRuntime.jsx("li", { className:
|
|
3381
|
+
return /* @__PURE__ */ jsxRuntime.jsx("li", { className: NavigationDesktop_module_default.navTab, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3432
3382
|
"button",
|
|
3433
3383
|
{
|
|
3434
3384
|
type: "button",
|
|
3435
3385
|
id: `${baseId}-trigger-${index}`,
|
|
3436
3386
|
className: clsx49__default.default(
|
|
3437
|
-
|
|
3438
|
-
|
|
3439
|
-
(isCurrent || isOpen) &&
|
|
3440
|
-
isOpen &&
|
|
3387
|
+
NavigationDesktop_module_default.navTabLink,
|
|
3388
|
+
NavigationDesktop_module_default.navTabTrigger,
|
|
3389
|
+
(isCurrent || isOpen) && NavigationDesktop_module_default.navTabActive,
|
|
3390
|
+
isOpen && NavigationDesktop_module_default.navTabTriggerOpen
|
|
3441
3391
|
),
|
|
3442
3392
|
"aria-expanded": isOpen,
|
|
3443
3393
|
"aria-haspopup": "true",
|
|
@@ -3455,6 +3405,20 @@ var NavigationDesktop = ({
|
|
|
3455
3405
|
) }, index);
|
|
3456
3406
|
}) });
|
|
3457
3407
|
};
|
|
3408
|
+
|
|
3409
|
+
// src/widgets/Navigation/NavigationDropdown.module.scss
|
|
3410
|
+
var NavigationDropdown_module_default = {
|
|
3411
|
+
dropdownTitle: "NavigationDropdown_module_dropdownTitle",
|
|
3412
|
+
dropdownPanel: "NavigationDropdown_module_dropdownPanel",
|
|
3413
|
+
dropdownInner: "NavigationDropdown_module_dropdownInner",
|
|
3414
|
+
dropdownLinks: "NavigationDropdown_module_dropdownLinks",
|
|
3415
|
+
dropdownLinkItem: "NavigationDropdown_module_dropdownLinkItem",
|
|
3416
|
+
dropdownLink: "NavigationDropdown_module_dropdownLink",
|
|
3417
|
+
dropdownLinkSpacer: "NavigationDropdown_module_dropdownLinkSpacer",
|
|
3418
|
+
dropdownDivider: "NavigationDropdown_module_dropdownDivider",
|
|
3419
|
+
dropdownInfo: "NavigationDropdown_module_dropdownInfo",
|
|
3420
|
+
dropdownDescription: "NavigationDropdown_module_dropdownDescription"
|
|
3421
|
+
};
|
|
3458
3422
|
var NavigationDropdown = ({
|
|
3459
3423
|
item,
|
|
3460
3424
|
panelId,
|
|
@@ -3493,23 +3457,23 @@ var NavigationDropdown = ({
|
|
|
3493
3457
|
"div",
|
|
3494
3458
|
{
|
|
3495
3459
|
id: panelId,
|
|
3496
|
-
className: clsx49__default.default(
|
|
3460
|
+
className: clsx49__default.default(NavigationDropdown_module_default.dropdownPanel, NavigationDropdown_module_default.dropdownPanelOpen),
|
|
3497
3461
|
onMouseEnter,
|
|
3498
3462
|
onMouseLeave,
|
|
3499
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className:
|
|
3500
|
-
/* @__PURE__ */ jsxRuntime.jsx("ul", { className:
|
|
3463
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: NavigationDropdown_module_default.dropdownInner, children: [
|
|
3464
|
+
/* @__PURE__ */ jsxRuntime.jsx("ul", { className: NavigationDropdown_module_default.dropdownLinks, children: links.map((sub, i) => {
|
|
3501
3465
|
var _a, _b, _c, _d;
|
|
3502
3466
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3503
3467
|
"li",
|
|
3504
3468
|
{
|
|
3505
|
-
className: clsx49__default.default(
|
|
3506
|
-
[
|
|
3469
|
+
className: clsx49__default.default(NavigationDropdown_module_default.dropdownLinkItem, {
|
|
3470
|
+
[NavigationDropdown_module_default.dropdownLinkSpacer]: sub.variant === "subMenuSpacer"
|
|
3507
3471
|
}),
|
|
3508
3472
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3509
3473
|
"a",
|
|
3510
3474
|
{
|
|
3511
3475
|
href: (_a = sub.cta) == null ? void 0 : _a.url,
|
|
3512
|
-
className:
|
|
3476
|
+
className: NavigationDropdown_module_default.dropdownLink,
|
|
3513
3477
|
target: ((_b = sub.cta) == null ? void 0 : _b.isExternal) ? "_blank" : void 0,
|
|
3514
3478
|
rel: ((_c = sub.cta) == null ? void 0 : _c.isExternal) ? "noopener noreferrer" : void 0,
|
|
3515
3479
|
onKeyDown: (e) => handleLinkKeyDown(e, i === 0, i === links.length - 1),
|
|
@@ -3520,15 +3484,55 @@ var NavigationDropdown = ({
|
|
|
3520
3484
|
i
|
|
3521
3485
|
);
|
|
3522
3486
|
}) }),
|
|
3523
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className:
|
|
3524
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className:
|
|
3525
|
-
/* @__PURE__ */ jsxRuntime.jsx("h2", { className:
|
|
3526
|
-
description && /* @__PURE__ */ jsxRuntime.jsx("div", { className:
|
|
3487
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: NavigationDropdown_module_default.dropdownDivider, "aria-hidden": "true" }),
|
|
3488
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: NavigationDropdown_module_default.dropdownInfo, children: [
|
|
3489
|
+
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: NavigationDropdown_module_default.dropdownTitle, children: title }),
|
|
3490
|
+
description && /* @__PURE__ */ jsxRuntime.jsx("div", { className: NavigationDropdown_module_default.dropdownDescription, children: description })
|
|
3527
3491
|
] })
|
|
3528
3492
|
] })
|
|
3529
3493
|
}
|
|
3530
3494
|
);
|
|
3531
3495
|
};
|
|
3496
|
+
|
|
3497
|
+
// src/widgets/Navigation/NavigationMobile.module.scss
|
|
3498
|
+
var NavigationMobile_module_default = {
|
|
3499
|
+
mobileItemLink: "NavigationMobile_module_mobileItemLink",
|
|
3500
|
+
mobileItemTrigger: "NavigationMobile_module_mobileItemTrigger",
|
|
3501
|
+
mobileSubLink: "NavigationMobile_module_mobileSubLink",
|
|
3502
|
+
logoLink: "NavigationMobile_module_logoLink",
|
|
3503
|
+
logoMobile: "NavigationMobile_module_logoMobile",
|
|
3504
|
+
mainLogoMobile: "NavigationMobile_module_mainLogoMobile",
|
|
3505
|
+
hamburgerButton: "NavigationMobile_module_hamburgerButton",
|
|
3506
|
+
mobileClose: "NavigationMobile_module_mobileClose",
|
|
3507
|
+
mobileMenu: "NavigationMobile_module_mobileMenu",
|
|
3508
|
+
mobileMenuOpen: "NavigationMobile_module_mobileMenuOpen",
|
|
3509
|
+
mobileMenuHeader: "NavigationMobile_module_mobileMenuHeader",
|
|
3510
|
+
mobileMenuItems: "NavigationMobile_module_mobileMenuItems",
|
|
3511
|
+
mobileItem: "NavigationMobile_module_mobileItem",
|
|
3512
|
+
mobileItemChevron: "NavigationMobile_module_mobileItemChevron",
|
|
3513
|
+
mobileItemChevronOpen: "NavigationMobile_module_mobileItemChevronOpen",
|
|
3514
|
+
mobileSubItems: "NavigationMobile_module_mobileSubItems",
|
|
3515
|
+
mobileSubItemsOpen: "NavigationMobile_module_mobileSubItemsOpen",
|
|
3516
|
+
mobileSubItemsInner: "NavigationMobile_module_mobileSubItemsInner",
|
|
3517
|
+
mobileSubLinkActive: "NavigationMobile_module_mobileSubLinkActive",
|
|
3518
|
+
mobileMenuCtas: "NavigationMobile_module_mobileMenuCtas",
|
|
3519
|
+
internalMobileMenu: "NavigationMobile_module_internalMobileMenu",
|
|
3520
|
+
internalMobileMenuOpen: "NavigationMobile_module_internalMobileMenuOpen",
|
|
3521
|
+
mobileHeader: "NavigationMobile_module_mobileHeader",
|
|
3522
|
+
mobileBrandBars: "NavigationMobile_module_mobileBrandBars",
|
|
3523
|
+
mobileItems: "NavigationMobile_module_mobileItems",
|
|
3524
|
+
internalMobileItem: "NavigationMobile_module_internalMobileItem",
|
|
3525
|
+
internalMobileItemLink: "NavigationMobile_module_internalMobileItemLink",
|
|
3526
|
+
internalMobileItemTrigger: "NavigationMobile_module_internalMobileItemTrigger",
|
|
3527
|
+
internalMobileItemChevron: "NavigationMobile_module_internalMobileItemChevron",
|
|
3528
|
+
internalMobileItemChevronOpen: "NavigationMobile_module_internalMobileItemChevronOpen",
|
|
3529
|
+
internalMobileSubItems: "NavigationMobile_module_internalMobileSubItems",
|
|
3530
|
+
internalMobileSubItemsOpen: "NavigationMobile_module_internalMobileSubItemsOpen",
|
|
3531
|
+
internalMobileSubItemsInner: "NavigationMobile_module_internalMobileSubItemsInner",
|
|
3532
|
+
internalMobileSubLink: "NavigationMobile_module_internalMobileSubLink",
|
|
3533
|
+
internalMobileSubLinkActive: "NavigationMobile_module_internalMobileSubLinkActive",
|
|
3534
|
+
mobileFooter: "NavigationMobile_module_mobileFooter"
|
|
3535
|
+
};
|
|
3532
3536
|
var NavigationMobile = ({
|
|
3533
3537
|
id,
|
|
3534
3538
|
navItems,
|
|
@@ -3568,25 +3572,25 @@ var NavigationMobile = ({
|
|
|
3568
3572
|
if (!e.currentTarget.contains(e.relatedTarget)) collapseItem(index);
|
|
3569
3573
|
}
|
|
3570
3574
|
};
|
|
3571
|
-
const logo = mainLogo ? /* @__PURE__ */ jsxRuntime.jsx(Picture, { className:
|
|
3575
|
+
const logo = mainLogo ? /* @__PURE__ */ jsxRuntime.jsx(Picture, { className: NavigationMobile_module_default.logoMobile, src: mainLogo, alt: logoAlt }) : null;
|
|
3572
3576
|
if (isExternal) {
|
|
3573
3577
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3574
3578
|
"div",
|
|
3575
3579
|
{
|
|
3576
3580
|
id,
|
|
3577
|
-
className: clsx49__default.default(
|
|
3581
|
+
className: clsx49__default.default(NavigationMobile_module_default.mobileMenu, isOpen && NavigationMobile_module_default.mobileMenuOpen),
|
|
3578
3582
|
role: "dialog",
|
|
3579
3583
|
"aria-modal": "true",
|
|
3580
3584
|
"aria-label": "Navigation menu",
|
|
3581
3585
|
"aria-hidden": !isOpen,
|
|
3582
3586
|
children: [
|
|
3583
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className:
|
|
3587
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: NavigationMobile_module_default.mobileMenuHeader, children: [
|
|
3584
3588
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3585
3589
|
NavigationLogo,
|
|
3586
3590
|
{
|
|
3587
3591
|
mainLogo,
|
|
3588
3592
|
homeCta,
|
|
3589
|
-
className:
|
|
3593
|
+
className: NavigationMobile_module_default.mainLogoMobile,
|
|
3590
3594
|
onClick: onClose
|
|
3591
3595
|
}
|
|
3592
3596
|
),
|
|
@@ -3595,23 +3599,23 @@ var NavigationMobile = ({
|
|
|
3595
3599
|
{
|
|
3596
3600
|
type: "button",
|
|
3597
3601
|
variant: "nofill",
|
|
3598
|
-
className:
|
|
3602
|
+
className: NavigationMobile_module_default.hamburgerButton,
|
|
3599
3603
|
onClick: onClose,
|
|
3600
3604
|
"aria-label": "Close navigation menu",
|
|
3601
3605
|
children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { type: "xBlack", size: 24, "aria-hidden": "true" })
|
|
3602
3606
|
}
|
|
3603
3607
|
)
|
|
3604
3608
|
] }),
|
|
3605
|
-
/* @__PURE__ */ jsxRuntime.jsx("ul", { className:
|
|
3609
|
+
/* @__PURE__ */ jsxRuntime.jsx("ul", { className: NavigationMobile_module_default.mobileMenuItems, children: navItems == null ? void 0 : navItems.map((item, index) => {
|
|
3606
3610
|
var _a, _b;
|
|
3607
3611
|
const subMenuId = `${baseId}-submenu-${index}`;
|
|
3608
3612
|
const isExpanded = expanded === index;
|
|
3609
|
-
return item.type === "dropdown" ? /* @__PURE__ */ jsxRuntime.jsxs("li", __spreadProps(__spreadValues({ className:
|
|
3613
|
+
return item.type === "dropdown" ? /* @__PURE__ */ jsxRuntime.jsxs("li", __spreadProps(__spreadValues({ className: NavigationMobile_module_default.mobileItem }, hoverFocusProps(index)), { children: [
|
|
3610
3614
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
3611
3615
|
"button",
|
|
3612
3616
|
{
|
|
3613
3617
|
type: "button",
|
|
3614
|
-
className:
|
|
3618
|
+
className: NavigationMobile_module_default.mobileItemTrigger,
|
|
3615
3619
|
onClick: () => toggleExpanded(index),
|
|
3616
3620
|
"aria-expanded": isExpanded,
|
|
3617
3621
|
"aria-controls": subMenuId,
|
|
@@ -3621,8 +3625,8 @@ var NavigationMobile = ({
|
|
|
3621
3625
|
"span",
|
|
3622
3626
|
{
|
|
3623
3627
|
className: clsx49__default.default(
|
|
3624
|
-
|
|
3625
|
-
isExpanded &&
|
|
3628
|
+
NavigationMobile_module_default.mobileItemChevron,
|
|
3629
|
+
isExpanded && NavigationMobile_module_default.mobileItemChevronOpen
|
|
3626
3630
|
),
|
|
3627
3631
|
"aria-hidden": "true",
|
|
3628
3632
|
children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { type: "downChevronBlack", size: 24 })
|
|
@@ -3635,8 +3639,8 @@ var NavigationMobile = ({
|
|
|
3635
3639
|
"div",
|
|
3636
3640
|
{
|
|
3637
3641
|
id: subMenuId,
|
|
3638
|
-
className: clsx49__default.default(
|
|
3639
|
-
children: /* @__PURE__ */ jsxRuntime.jsx("ul", { className:
|
|
3642
|
+
className: clsx49__default.default(NavigationMobile_module_default.mobileSubItems, isExpanded && NavigationMobile_module_default.mobileSubItemsOpen),
|
|
3643
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("ul", { className: NavigationMobile_module_default.mobileSubItemsInner, children: item.items.map(
|
|
3640
3644
|
(subItem, i) => {
|
|
3641
3645
|
var _a2, _b2;
|
|
3642
3646
|
return subItem.type === "link" ? /* @__PURE__ */ jsxRuntime.jsx("li", { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -3644,8 +3648,8 @@ var NavigationMobile = ({
|
|
|
3644
3648
|
{
|
|
3645
3649
|
href: (_a2 = subItem.cta) == null ? void 0 : _a2.url,
|
|
3646
3650
|
className: clsx49__default.default(
|
|
3647
|
-
|
|
3648
|
-
subItem.isActive &&
|
|
3651
|
+
NavigationMobile_module_default.mobileSubLink,
|
|
3652
|
+
subItem.isActive && NavigationMobile_module_default.mobileSubLinkActive
|
|
3649
3653
|
),
|
|
3650
3654
|
onClick: onClose,
|
|
3651
3655
|
children: (_b2 = subItem.cta) == null ? void 0 : _b2.label
|
|
@@ -3655,12 +3659,12 @@ var NavigationMobile = ({
|
|
|
3655
3659
|
) })
|
|
3656
3660
|
}
|
|
3657
3661
|
)
|
|
3658
|
-
] }), index) : /* @__PURE__ */ jsxRuntime.jsx("li", { children: /* @__PURE__ */ jsxRuntime.jsx("a", { href: (_a = item.cta) == null ? void 0 : _a.url, className:
|
|
3662
|
+
] }), index) : /* @__PURE__ */ jsxRuntime.jsx("li", { children: /* @__PURE__ */ jsxRuntime.jsx("a", { href: (_a = item.cta) == null ? void 0 : _a.url, className: NavigationMobile_module_default.mobileItemLink, onClick: onClose, children: (_b = item.cta) == null ? void 0 : _b.label }) }, index);
|
|
3659
3663
|
}) }),
|
|
3660
3664
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3661
3665
|
NavigationCtas,
|
|
3662
3666
|
{
|
|
3663
|
-
className:
|
|
3667
|
+
className: NavigationMobile_module_default.mobileMenuCtas,
|
|
3664
3668
|
loginCta,
|
|
3665
3669
|
rightButton,
|
|
3666
3670
|
loginVariant: "nofillblack"
|
|
@@ -3674,20 +3678,20 @@ var NavigationMobile = ({
|
|
|
3674
3678
|
"div",
|
|
3675
3679
|
{
|
|
3676
3680
|
id,
|
|
3677
|
-
className: clsx49__default.default(
|
|
3681
|
+
className: clsx49__default.default(NavigationMobile_module_default.internalMobileMenu, isOpen && NavigationMobile_module_default.internalMobileMenuOpen),
|
|
3678
3682
|
role: "dialog",
|
|
3679
3683
|
"aria-modal": "true",
|
|
3680
3684
|
"aria-label": "Navigation menu",
|
|
3681
3685
|
"aria-hidden": !isOpen,
|
|
3682
3686
|
children: [
|
|
3683
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className:
|
|
3684
|
-
homeCta && logo ? /* @__PURE__ */ jsxRuntime.jsx("a", { href: homeCta, className:
|
|
3687
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: NavigationMobile_module_default.mobileHeader, children: [
|
|
3688
|
+
homeCta && logo ? /* @__PURE__ */ jsxRuntime.jsx("a", { href: homeCta, className: NavigationMobile_module_default.logoLink, "aria-label": logoAlt, onClick: onClose, children: logo }) : logo,
|
|
3685
3689
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3686
3690
|
Button,
|
|
3687
3691
|
{
|
|
3688
3692
|
variant: "ghost",
|
|
3689
3693
|
type: "button",
|
|
3690
|
-
className:
|
|
3694
|
+
className: NavigationMobile_module_default.mobileClose,
|
|
3691
3695
|
onClick: onClose,
|
|
3692
3696
|
"aria-label": "Close navigation menu",
|
|
3693
3697
|
children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { type: "xBlack", size: 24, "aria-hidden": "true" })
|
|
@@ -3699,19 +3703,19 @@ var NavigationMobile = ({
|
|
|
3699
3703
|
{
|
|
3700
3704
|
brandLogos,
|
|
3701
3705
|
unfolded: false,
|
|
3702
|
-
className:
|
|
3706
|
+
className: NavigationMobile_module_default.mobileBrandBars
|
|
3703
3707
|
}
|
|
3704
3708
|
),
|
|
3705
|
-
/* @__PURE__ */ jsxRuntime.jsx("ul", { className:
|
|
3709
|
+
/* @__PURE__ */ jsxRuntime.jsx("ul", { className: NavigationMobile_module_default.mobileItems, children: navItems == null ? void 0 : navItems.map((item, index) => {
|
|
3706
3710
|
var _a, _b, _c, _d;
|
|
3707
3711
|
const subMenuId = `${baseId}-submenu-${index}`;
|
|
3708
3712
|
const isExpanded = expanded === index;
|
|
3709
3713
|
if (item.type === "link") {
|
|
3710
|
-
return /* @__PURE__ */ jsxRuntime.jsx("li", { className:
|
|
3714
|
+
return /* @__PURE__ */ jsxRuntime.jsx("li", { className: NavigationMobile_module_default.internalMobileItem, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3711
3715
|
"a",
|
|
3712
3716
|
{
|
|
3713
3717
|
href: (_a = item.cta) == null ? void 0 : _a.url,
|
|
3714
|
-
className:
|
|
3718
|
+
className: NavigationMobile_module_default.internalMobileItemLink,
|
|
3715
3719
|
target: ((_b = item.cta) == null ? void 0 : _b.isExternal) ? "_blank" : void 0,
|
|
3716
3720
|
rel: ((_c = item.cta) == null ? void 0 : _c.isExternal) ? "noopener noreferrer" : void 0,
|
|
3717
3721
|
onClick: onClose,
|
|
@@ -3719,12 +3723,12 @@ var NavigationMobile = ({
|
|
|
3719
3723
|
}
|
|
3720
3724
|
) }, index);
|
|
3721
3725
|
}
|
|
3722
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("li", __spreadProps(__spreadValues({ className:
|
|
3726
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("li", __spreadProps(__spreadValues({ className: NavigationMobile_module_default.internalMobileItem }, hoverFocusProps(index)), { children: [
|
|
3723
3727
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
3724
3728
|
"button",
|
|
3725
3729
|
{
|
|
3726
3730
|
type: "button",
|
|
3727
|
-
className:
|
|
3731
|
+
className: NavigationMobile_module_default.internalMobileItemTrigger,
|
|
3728
3732
|
onClick: () => toggleExpanded(index),
|
|
3729
3733
|
"aria-expanded": isExpanded,
|
|
3730
3734
|
"aria-controls": subMenuId,
|
|
@@ -3734,8 +3738,8 @@ var NavigationMobile = ({
|
|
|
3734
3738
|
"span",
|
|
3735
3739
|
{
|
|
3736
3740
|
className: clsx49__default.default(
|
|
3737
|
-
|
|
3738
|
-
isExpanded &&
|
|
3741
|
+
NavigationMobile_module_default.internalMobileItemChevron,
|
|
3742
|
+
isExpanded && NavigationMobile_module_default.internalMobileItemChevronOpen
|
|
3739
3743
|
),
|
|
3740
3744
|
"aria-hidden": "true",
|
|
3741
3745
|
children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { type: "downChevronBlack", size: 24 })
|
|
@@ -3749,10 +3753,10 @@ var NavigationMobile = ({
|
|
|
3749
3753
|
{
|
|
3750
3754
|
id: subMenuId,
|
|
3751
3755
|
className: clsx49__default.default(
|
|
3752
|
-
|
|
3753
|
-
isExpanded &&
|
|
3756
|
+
NavigationMobile_module_default.internalMobileSubItems,
|
|
3757
|
+
isExpanded && NavigationMobile_module_default.internalMobileSubItemsOpen
|
|
3754
3758
|
),
|
|
3755
|
-
children: /* @__PURE__ */ jsxRuntime.jsx("ul", { className:
|
|
3759
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("ul", { className: NavigationMobile_module_default.internalMobileSubItemsInner, children: item.items.map(
|
|
3756
3760
|
(sub, i) => {
|
|
3757
3761
|
var _a2, _b2, _c2, _d2;
|
|
3758
3762
|
return sub.type === "link" ? /* @__PURE__ */ jsxRuntime.jsx("li", { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -3760,8 +3764,8 @@ var NavigationMobile = ({
|
|
|
3760
3764
|
{
|
|
3761
3765
|
href: (_a2 = sub.cta) == null ? void 0 : _a2.url,
|
|
3762
3766
|
className: clsx49__default.default(
|
|
3763
|
-
|
|
3764
|
-
sub.isActive &&
|
|
3767
|
+
NavigationMobile_module_default.internalMobileSubLink,
|
|
3768
|
+
sub.isActive && NavigationMobile_module_default.internalMobileSubLinkActive
|
|
3765
3769
|
),
|
|
3766
3770
|
target: ((_b2 = sub.cta) == null ? void 0 : _b2.isExternal) ? "_blank" : void 0,
|
|
3767
3771
|
rel: ((_c2 = sub.cta) == null ? void 0 : _c2.isExternal) ? "noopener noreferrer" : void 0,
|
|
@@ -3775,7 +3779,7 @@ var NavigationMobile = ({
|
|
|
3775
3779
|
)
|
|
3776
3780
|
] }), index);
|
|
3777
3781
|
}) }),
|
|
3778
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className:
|
|
3782
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: NavigationMobile_module_default.mobileFooter, children: [
|
|
3779
3783
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3780
3784
|
Search,
|
|
3781
3785
|
{
|
|
@@ -3791,6 +3795,24 @@ var NavigationMobile = ({
|
|
|
3791
3795
|
}
|
|
3792
3796
|
);
|
|
3793
3797
|
};
|
|
3798
|
+
|
|
3799
|
+
// src/widgets/Navigation/Navigation.module.scss
|
|
3800
|
+
var Navigation_module_default = {
|
|
3801
|
+
overlay: "Navigation_module_overlay",
|
|
3802
|
+
navigation: "Navigation_module_navigation",
|
|
3803
|
+
dropdownOpen: "Navigation_module_dropdownOpen",
|
|
3804
|
+
mainBar: "Navigation_module_mainBar",
|
|
3805
|
+
variantTransparent: "Navigation_module_variantTransparent",
|
|
3806
|
+
transparent: "Navigation_module_transparent",
|
|
3807
|
+
logo: "Navigation_module_logo",
|
|
3808
|
+
inner: "Navigation_module_inner",
|
|
3809
|
+
topRow: "Navigation_module_topRow",
|
|
3810
|
+
upperRight: "Navigation_module_upperRight",
|
|
3811
|
+
logoMobile: "Navigation_module_logoMobile",
|
|
3812
|
+
hamburger: "Navigation_module_hamburger",
|
|
3813
|
+
hamburgerButton: "Navigation_module_hamburgerButton",
|
|
3814
|
+
bottomRow: "Navigation_module_bottomRow"
|
|
3815
|
+
};
|
|
3794
3816
|
var FOCUSABLE_SELECTOR = 'a[href], button:not([disabled]), input:not([disabled]), [tabindex]:not([tabindex="-1"])';
|
|
3795
3817
|
var getFocusable = (root) => Array.from(root.querySelectorAll(FOCUSABLE_SELECTOR)).filter(
|
|
3796
3818
|
(el) => el.tabIndex !== -1 && el.offsetParent !== null
|
|
@@ -3908,7 +3930,7 @@ var Navigation2 = (props) => {
|
|
|
3908
3930
|
{
|
|
3909
3931
|
ref: navRef,
|
|
3910
3932
|
className: clsx49__default.default(
|
|
3911
|
-
Navigation_module_default.
|
|
3933
|
+
Navigation_module_default.navigation,
|
|
3912
3934
|
dropdownOpen && Navigation_module_default.dropdownOpen,
|
|
3913
3935
|
// External-only transparent / hover treatment.
|
|
3914
3936
|
isExternal && transparent && Navigation_module_default.variantTransparent,
|
|
@@ -4447,15 +4469,23 @@ var TextBodyBody = ({ children }) => {
|
|
|
4447
4469
|
};
|
|
4448
4470
|
var TextBody = (props) => {
|
|
4449
4471
|
var _a, _b;
|
|
4450
|
-
const { className, body, title, children } = props;
|
|
4472
|
+
const { className, variant, body, title, titleAlign = "text-left", children } = props;
|
|
4451
4473
|
const slots = resolveCompoundSlots(children, {
|
|
4452
4474
|
title: TextBodyTitle,
|
|
4453
4475
|
body: TextBodyBody
|
|
4454
4476
|
});
|
|
4455
4477
|
const titleNode = (_a = slots.title) != null ? _a : title;
|
|
4456
4478
|
const bodyNode = (_b = slots.body) != null ? _b : body;
|
|
4479
|
+
const isTableCenter = variant === "table-center";
|
|
4457
4480
|
return /* @__PURE__ */ jsxRuntime.jsxs(Container, { className: clsx49__default.default(TextBody_module_default.textBody, className), children: [
|
|
4458
|
-
titleNode && /* @__PURE__ */ jsxRuntime.jsx(
|
|
4481
|
+
titleNode && /* @__PURE__ */ jsxRuntime.jsx(
|
|
4482
|
+
Text,
|
|
4483
|
+
{
|
|
4484
|
+
tag: isTableCenter ? "h4" : "h3",
|
|
4485
|
+
className: clsx49__default.default(TextBody_module_default.title, isTableCenter ? "text-center" : titleAlign),
|
|
4486
|
+
children: titleNode
|
|
4487
|
+
}
|
|
4488
|
+
),
|
|
4459
4489
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: TextBody_module_default.body, children: bodyNode })
|
|
4460
4490
|
] });
|
|
4461
4491
|
};
|