@digital-b2c/coreui-kit 0.17.0 → 0.17.2
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 +167 -137
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +652 -574
- 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/dist/types/global.d.ts +25 -25
- package/package.json +101 -100
package/dist/index.d.cts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.mjs
CHANGED
|
@@ -3223,81 +3223,9 @@ var useIsAtTop = () => {
|
|
|
3223
3223
|
return isAtTop;
|
|
3224
3224
|
};
|
|
3225
3225
|
|
|
3226
|
-
// src/widgets/Navigation/
|
|
3227
|
-
var
|
|
3228
|
-
|
|
3229
|
-
mobileItemLink: "Navigation_module_mobileItemLink",
|
|
3230
|
-
mobileItemTrigger: "Navigation_module_mobileItemTrigger",
|
|
3231
|
-
mobileSubLink: "Navigation_module_mobileSubLink",
|
|
3232
|
-
dropdownOpen: "Navigation_module_dropdownOpen",
|
|
3233
|
-
variantTransparent: "Navigation_module_variantTransparent",
|
|
3234
|
-
transparent: "Navigation_module_transparent",
|
|
3235
|
-
logo: "Navigation_module_logo",
|
|
3236
|
-
upperRight: "Navigation_module_upperRight",
|
|
3237
|
-
overlay: "Navigation_module_overlay",
|
|
3238
|
-
mainLogoLink: "Navigation_module_mainLogoLink",
|
|
3239
|
-
dropdownLinkSpacer: "Navigation_module_dropdownLinkSpacer",
|
|
3240
|
-
mainLogoMobile: "Navigation_module_mainLogoMobile",
|
|
3241
|
-
hamburgerButton: "Navigation_module_hamburgerButton",
|
|
3242
|
-
mobileMenu: "Navigation_module_mobileMenu",
|
|
3243
|
-
mobileMenuOpen: "Navigation_module_mobileMenuOpen",
|
|
3244
|
-
mobileMenuHeader: "Navigation_module_mobileMenuHeader",
|
|
3245
|
-
mobileMenuItems: "Navigation_module_mobileMenuItems",
|
|
3246
|
-
mobileItem: "Navigation_module_mobileItem",
|
|
3247
|
-
mobileItemChevron: "Navigation_module_mobileItemChevron",
|
|
3248
|
-
mobileItemChevronOpen: "Navigation_module_mobileItemChevronOpen",
|
|
3249
|
-
mobileSubItems: "Navigation_module_mobileSubItems",
|
|
3250
|
-
mobileSubItemsOpen: "Navigation_module_mobileSubItemsOpen",
|
|
3251
|
-
mobileSubItemsInner: "Navigation_module_mobileSubItemsInner",
|
|
3252
|
-
mobileSubLinkActive: "Navigation_module_mobileSubLinkActive",
|
|
3253
|
-
mobileMenuCtas: "Navigation_module_mobileMenuCtas",
|
|
3254
|
-
Navigation: "Navigation_module_Navigation",
|
|
3255
|
-
mainBar: "Navigation_module_mainBar",
|
|
3256
|
-
navTabLink: "Navigation_module_navTabLink",
|
|
3257
|
-
navTabTrigger: "Navigation_module_navTabTrigger",
|
|
3258
|
-
navTabActive: "Navigation_module_navTabActive",
|
|
3259
|
-
inner: "Navigation_module_inner",
|
|
3260
|
-
topRow: "Navigation_module_topRow",
|
|
3261
|
-
logoLink: "Navigation_module_logoLink",
|
|
3262
|
-
logoMobile: "Navigation_module_logoMobile",
|
|
3263
|
-
hamburger: "Navigation_module_hamburger",
|
|
3264
|
-
bottomRow: "Navigation_module_bottomRow",
|
|
3265
|
-
navTabs: "Navigation_module_navTabs",
|
|
3266
|
-
navTab: "Navigation_module_navTab",
|
|
3267
|
-
navTabTriggerOpen: "Navigation_module_navTabTriggerOpen",
|
|
3268
|
-
dropdownPanel: "Navigation_module_dropdownPanel",
|
|
3269
|
-
dropdownInner: "Navigation_module_dropdownInner",
|
|
3270
|
-
dropdownLinks: "Navigation_module_dropdownLinks",
|
|
3271
|
-
dropdownLinkItem: "Navigation_module_dropdownLinkItem",
|
|
3272
|
-
dropdownLink: "Navigation_module_dropdownLink",
|
|
3273
|
-
dropdownDivider: "Navigation_module_dropdownDivider",
|
|
3274
|
-
dropdownInfo: "Navigation_module_dropdownInfo",
|
|
3275
|
-
dropdownDescription: "Navigation_module_dropdownDescription",
|
|
3276
|
-
brandBars: "Navigation_module_brandBars",
|
|
3277
|
-
brandBar: "Navigation_module_brandBar",
|
|
3278
|
-
brandBarsUnfolded: "Navigation_module_brandBarsUnfolded",
|
|
3279
|
-
brandLogo: "Navigation_module_brandLogo",
|
|
3280
|
-
lenscrafters: "Navigation_module_lenscrafters",
|
|
3281
|
-
forEyes: "Navigation_module_forEyes",
|
|
3282
|
-
optical: "Navigation_module_optical",
|
|
3283
|
-
pearleVision: "Navigation_module_pearleVision",
|
|
3284
|
-
internalMobileMenu: "Navigation_module_internalMobileMenu",
|
|
3285
|
-
internalMobileMenuOpen: "Navigation_module_internalMobileMenuOpen",
|
|
3286
|
-
mobileHeader: "Navigation_module_mobileHeader",
|
|
3287
|
-
mobileBrandBars: "Navigation_module_mobileBrandBars",
|
|
3288
|
-
mobileClose: "Navigation_module_mobileClose",
|
|
3289
|
-
mobileItems: "Navigation_module_mobileItems",
|
|
3290
|
-
internalMobileItem: "Navigation_module_internalMobileItem",
|
|
3291
|
-
internalMobileItemLink: "Navigation_module_internalMobileItemLink",
|
|
3292
|
-
internalMobileItemTrigger: "Navigation_module_internalMobileItemTrigger",
|
|
3293
|
-
internalMobileItemChevron: "Navigation_module_internalMobileItemChevron",
|
|
3294
|
-
internalMobileItemChevronOpen: "Navigation_module_internalMobileItemChevronOpen",
|
|
3295
|
-
internalMobileSubItems: "Navigation_module_internalMobileSubItems",
|
|
3296
|
-
internalMobileSubItemsOpen: "Navigation_module_internalMobileSubItemsOpen",
|
|
3297
|
-
internalMobileSubItemsInner: "Navigation_module_internalMobileSubItemsInner",
|
|
3298
|
-
internalMobileSubLink: "Navigation_module_internalMobileSubLink",
|
|
3299
|
-
internalMobileSubLinkActive: "Navigation_module_internalMobileSubLinkActive",
|
|
3300
|
-
mobileFooter: "Navigation_module_mobileFooter"
|
|
3226
|
+
// src/widgets/Navigation/NavigationLogo.module.scss
|
|
3227
|
+
var NavigationLogo_module_default = {
|
|
3228
|
+
mainLogoLink: "NavigationLogo_module_mainLogoLink"
|
|
3301
3229
|
};
|
|
3302
3230
|
var NavigationLogo = ({
|
|
3303
3231
|
mainLogo,
|
|
@@ -3308,7 +3236,7 @@ var NavigationLogo = ({
|
|
|
3308
3236
|
}) => {
|
|
3309
3237
|
if (!mainLogo) return null;
|
|
3310
3238
|
if (homeCta) {
|
|
3311
|
-
return /* @__PURE__ */ jsx("a", { href: homeCta, className:
|
|
3239
|
+
return /* @__PURE__ */ jsx("a", { href: homeCta, className: NavigationLogo_module_default.mainLogoLink, onClick, "aria-label": logoAlt, children: /* @__PURE__ */ jsx(Picture, { className, src: mainLogo, alt: logoAlt || "" }) });
|
|
3312
3240
|
}
|
|
3313
3241
|
return /* @__PURE__ */ jsx(Picture, { className, src: mainLogo, alt: logoAlt });
|
|
3314
3242
|
};
|
|
@@ -3323,11 +3251,23 @@ var NavigationCtas = ({
|
|
|
3323
3251
|
(rightButton == null ? void 0 : rightButton.label) && /* @__PURE__ */ jsx(Button, { variant: "primary", href: rightButton.url, isExternal: rightButton.isExternal, children: rightButton.label })
|
|
3324
3252
|
] });
|
|
3325
3253
|
};
|
|
3254
|
+
|
|
3255
|
+
// src/widgets/Navigation/NavigationBrandBars.module.scss
|
|
3256
|
+
var NavigationBrandBars_module_default = {
|
|
3257
|
+
brandBars: "NavigationBrandBars_module_brandBars",
|
|
3258
|
+
brandBar: "NavigationBrandBars_module_brandBar",
|
|
3259
|
+
brandBarsUnfolded: "NavigationBrandBars_module_brandBarsUnfolded",
|
|
3260
|
+
brandLogo: "NavigationBrandBars_module_brandLogo",
|
|
3261
|
+
lenscrafters: "NavigationBrandBars_module_lenscrafters",
|
|
3262
|
+
forEyes: "NavigationBrandBars_module_forEyes",
|
|
3263
|
+
optical: "NavigationBrandBars_module_optical",
|
|
3264
|
+
pearleVision: "NavigationBrandBars_module_pearleVision"
|
|
3265
|
+
};
|
|
3326
3266
|
var BRANDS = [
|
|
3327
|
-
{ key: "lenscrafters", className:
|
|
3328
|
-
{ key: "forEyes", className:
|
|
3329
|
-
{ key: "optical", className:
|
|
3330
|
-
{ key: "pearleVision", className:
|
|
3267
|
+
{ key: "lenscrafters", className: NavigationBrandBars_module_default.lenscrafters, label: "LensCrafters" },
|
|
3268
|
+
{ key: "forEyes", className: NavigationBrandBars_module_default.forEyes, label: "For Eyes" },
|
|
3269
|
+
{ key: "optical", className: NavigationBrandBars_module_default.optical, label: "Target Optical" },
|
|
3270
|
+
{ key: "pearleVision", className: NavigationBrandBars_module_default.pearleVision, label: "Pearle Vision" }
|
|
3331
3271
|
];
|
|
3332
3272
|
var NavigationBrandBars = ({
|
|
3333
3273
|
brandLogos,
|
|
@@ -3339,12 +3279,12 @@ var NavigationBrandBars = ({
|
|
|
3339
3279
|
return /* @__PURE__ */ jsx(
|
|
3340
3280
|
"div",
|
|
3341
3281
|
{
|
|
3342
|
-
className: clsx49(
|
|
3282
|
+
className: clsx49(NavigationBrandBars_module_default.brandBars, isUnfolded && NavigationBrandBars_module_default.brandBarsUnfolded, className),
|
|
3343
3283
|
"aria-hidden": "true",
|
|
3344
3284
|
children: BRANDS.map((brand) => {
|
|
3345
3285
|
var _a;
|
|
3346
3286
|
const logo = brandLogos == null ? void 0 : brandLogos[brand.key];
|
|
3347
|
-
return /* @__PURE__ */ jsx("span", { className: clsx49(
|
|
3287
|
+
return /* @__PURE__ */ jsx("span", { className: clsx49(NavigationBrandBars_module_default.brandBar, brand.className), children: logo && /* @__PURE__ */ jsx("img", { className: NavigationBrandBars_module_default.brandLogo, src: logo.src, alt: (_a = logo.alt) != null ? _a : brand.label }) }, brand.key);
|
|
3348
3288
|
})
|
|
3349
3289
|
}
|
|
3350
3290
|
);
|
|
@@ -3372,6 +3312,16 @@ var isPathActive = (url, pathname) => {
|
|
|
3372
3312
|
}
|
|
3373
3313
|
return normalize(targetPath) === normalize(pathname);
|
|
3374
3314
|
};
|
|
3315
|
+
|
|
3316
|
+
// src/widgets/Navigation/NavigationDesktop.module.scss
|
|
3317
|
+
var NavigationDesktop_module_default = {
|
|
3318
|
+
navTabs: "NavigationDesktop_module_navTabs",
|
|
3319
|
+
navTab: "NavigationDesktop_module_navTab",
|
|
3320
|
+
navTabLink: "NavigationDesktop_module_navTabLink",
|
|
3321
|
+
navTabTrigger: "NavigationDesktop_module_navTabTrigger",
|
|
3322
|
+
navTabTriggerOpen: "NavigationDesktop_module_navTabTriggerOpen",
|
|
3323
|
+
navTabActive: "NavigationDesktop_module_navTabActive"
|
|
3324
|
+
};
|
|
3375
3325
|
var NavigationDesktop = ({
|
|
3376
3326
|
navItems,
|
|
3377
3327
|
openIndex,
|
|
@@ -3396,16 +3346,16 @@ var NavigationDesktop = ({
|
|
|
3396
3346
|
}
|
|
3397
3347
|
}
|
|
3398
3348
|
};
|
|
3399
|
-
return /* @__PURE__ */ jsx("ul", { className:
|
|
3349
|
+
return /* @__PURE__ */ jsx("ul", { className: NavigationDesktop_module_default.navTabs, children: navItems.map((item, index) => {
|
|
3400
3350
|
var _a, _b, _c, _d, _e;
|
|
3401
3351
|
const isOpen = openIndex === index;
|
|
3402
3352
|
if (item.type === "link") {
|
|
3403
3353
|
const isCurrent2 = item.isActive || isPathActive((_a = item.cta) == null ? void 0 : _a.url, pathname);
|
|
3404
|
-
return /* @__PURE__ */ jsx("li", { className:
|
|
3354
|
+
return /* @__PURE__ */ jsx("li", { className: NavigationDesktop_module_default.navTab, children: /* @__PURE__ */ jsx(
|
|
3405
3355
|
"a",
|
|
3406
3356
|
{
|
|
3407
3357
|
href: (_b = item.cta) == null ? void 0 : _b.url,
|
|
3408
|
-
className: clsx49(
|
|
3358
|
+
className: clsx49(NavigationDesktop_module_default.navTabLink, isCurrent2 && NavigationDesktop_module_default.navTabActive),
|
|
3409
3359
|
"aria-current": isCurrent2 ? "page" : void 0,
|
|
3410
3360
|
target: ((_c = item.cta) == null ? void 0 : _c.isExternal) ? "_blank" : void 0,
|
|
3411
3361
|
rel: ((_d = item.cta) == null ? void 0 : _d.isExternal) ? "noopener noreferrer" : void 0,
|
|
@@ -3419,16 +3369,16 @@ var NavigationDesktop = ({
|
|
|
3419
3369
|
var _a2;
|
|
3420
3370
|
return sub.type === "link" && isPathActive((_a2 = sub.cta) == null ? void 0 : _a2.url, pathname);
|
|
3421
3371
|
});
|
|
3422
|
-
return /* @__PURE__ */ jsx("li", { className:
|
|
3372
|
+
return /* @__PURE__ */ jsx("li", { className: NavigationDesktop_module_default.navTab, children: /* @__PURE__ */ jsxs(
|
|
3423
3373
|
"button",
|
|
3424
3374
|
{
|
|
3425
3375
|
type: "button",
|
|
3426
3376
|
id: `${baseId}-trigger-${index}`,
|
|
3427
3377
|
className: clsx49(
|
|
3428
|
-
|
|
3429
|
-
|
|
3430
|
-
(isCurrent || isOpen) &&
|
|
3431
|
-
isOpen &&
|
|
3378
|
+
NavigationDesktop_module_default.navTabLink,
|
|
3379
|
+
NavigationDesktop_module_default.navTabTrigger,
|
|
3380
|
+
(isCurrent || isOpen) && NavigationDesktop_module_default.navTabActive,
|
|
3381
|
+
isOpen && NavigationDesktop_module_default.navTabTriggerOpen
|
|
3432
3382
|
),
|
|
3433
3383
|
"aria-expanded": isOpen,
|
|
3434
3384
|
"aria-haspopup": "true",
|
|
@@ -3446,6 +3396,20 @@ var NavigationDesktop = ({
|
|
|
3446
3396
|
) }, index);
|
|
3447
3397
|
}) });
|
|
3448
3398
|
};
|
|
3399
|
+
|
|
3400
|
+
// src/widgets/Navigation/NavigationDropdown.module.scss
|
|
3401
|
+
var NavigationDropdown_module_default = {
|
|
3402
|
+
dropdownTitle: "NavigationDropdown_module_dropdownTitle",
|
|
3403
|
+
dropdownPanel: "NavigationDropdown_module_dropdownPanel",
|
|
3404
|
+
dropdownInner: "NavigationDropdown_module_dropdownInner",
|
|
3405
|
+
dropdownLinks: "NavigationDropdown_module_dropdownLinks",
|
|
3406
|
+
dropdownLinkItem: "NavigationDropdown_module_dropdownLinkItem",
|
|
3407
|
+
dropdownLink: "NavigationDropdown_module_dropdownLink",
|
|
3408
|
+
dropdownLinkSpacer: "NavigationDropdown_module_dropdownLinkSpacer",
|
|
3409
|
+
dropdownDivider: "NavigationDropdown_module_dropdownDivider",
|
|
3410
|
+
dropdownInfo: "NavigationDropdown_module_dropdownInfo",
|
|
3411
|
+
dropdownDescription: "NavigationDropdown_module_dropdownDescription"
|
|
3412
|
+
};
|
|
3449
3413
|
var NavigationDropdown = ({
|
|
3450
3414
|
item,
|
|
3451
3415
|
panelId,
|
|
@@ -3484,23 +3448,23 @@ var NavigationDropdown = ({
|
|
|
3484
3448
|
"div",
|
|
3485
3449
|
{
|
|
3486
3450
|
id: panelId,
|
|
3487
|
-
className: clsx49(
|
|
3451
|
+
className: clsx49(NavigationDropdown_module_default.dropdownPanel, NavigationDropdown_module_default.dropdownPanelOpen),
|
|
3488
3452
|
onMouseEnter,
|
|
3489
3453
|
onMouseLeave,
|
|
3490
|
-
children: /* @__PURE__ */ jsxs("div", { className:
|
|
3491
|
-
/* @__PURE__ */ jsx("ul", { className:
|
|
3454
|
+
children: /* @__PURE__ */ jsxs("div", { className: NavigationDropdown_module_default.dropdownInner, children: [
|
|
3455
|
+
/* @__PURE__ */ jsx("ul", { className: NavigationDropdown_module_default.dropdownLinks, children: links.map((sub, i) => {
|
|
3492
3456
|
var _a, _b, _c, _d;
|
|
3493
3457
|
return /* @__PURE__ */ jsx(
|
|
3494
3458
|
"li",
|
|
3495
3459
|
{
|
|
3496
|
-
className: clsx49(
|
|
3497
|
-
[
|
|
3460
|
+
className: clsx49(NavigationDropdown_module_default.dropdownLinkItem, {
|
|
3461
|
+
[NavigationDropdown_module_default.dropdownLinkSpacer]: sub.variant === "subMenuSpacer"
|
|
3498
3462
|
}),
|
|
3499
3463
|
children: /* @__PURE__ */ jsx(
|
|
3500
3464
|
"a",
|
|
3501
3465
|
{
|
|
3502
3466
|
href: (_a = sub.cta) == null ? void 0 : _a.url,
|
|
3503
|
-
className:
|
|
3467
|
+
className: NavigationDropdown_module_default.dropdownLink,
|
|
3504
3468
|
target: ((_b = sub.cta) == null ? void 0 : _b.isExternal) ? "_blank" : void 0,
|
|
3505
3469
|
rel: ((_c = sub.cta) == null ? void 0 : _c.isExternal) ? "noopener noreferrer" : void 0,
|
|
3506
3470
|
onKeyDown: (e) => handleLinkKeyDown(e, i === 0, i === links.length - 1),
|
|
@@ -3511,15 +3475,55 @@ var NavigationDropdown = ({
|
|
|
3511
3475
|
i
|
|
3512
3476
|
);
|
|
3513
3477
|
}) }),
|
|
3514
|
-
/* @__PURE__ */ jsx("span", { className:
|
|
3515
|
-
/* @__PURE__ */ jsxs("div", { className:
|
|
3516
|
-
/* @__PURE__ */ jsx("h2", { className:
|
|
3517
|
-
description && /* @__PURE__ */ jsx("div", { className:
|
|
3478
|
+
/* @__PURE__ */ jsx("span", { className: NavigationDropdown_module_default.dropdownDivider, "aria-hidden": "true" }),
|
|
3479
|
+
/* @__PURE__ */ jsxs("div", { className: NavigationDropdown_module_default.dropdownInfo, children: [
|
|
3480
|
+
/* @__PURE__ */ jsx("h2", { className: NavigationDropdown_module_default.dropdownTitle, children: title }),
|
|
3481
|
+
description && /* @__PURE__ */ jsx("div", { className: NavigationDropdown_module_default.dropdownDescription, children: description })
|
|
3518
3482
|
] })
|
|
3519
3483
|
] })
|
|
3520
3484
|
}
|
|
3521
3485
|
);
|
|
3522
3486
|
};
|
|
3487
|
+
|
|
3488
|
+
// src/widgets/Navigation/NavigationMobile.module.scss
|
|
3489
|
+
var NavigationMobile_module_default = {
|
|
3490
|
+
mobileItemLink: "NavigationMobile_module_mobileItemLink",
|
|
3491
|
+
mobileItemTrigger: "NavigationMobile_module_mobileItemTrigger",
|
|
3492
|
+
mobileSubLink: "NavigationMobile_module_mobileSubLink",
|
|
3493
|
+
logoLink: "NavigationMobile_module_logoLink",
|
|
3494
|
+
logoMobile: "NavigationMobile_module_logoMobile",
|
|
3495
|
+
mainLogoMobile: "NavigationMobile_module_mainLogoMobile",
|
|
3496
|
+
hamburgerButton: "NavigationMobile_module_hamburgerButton",
|
|
3497
|
+
mobileClose: "NavigationMobile_module_mobileClose",
|
|
3498
|
+
mobileMenu: "NavigationMobile_module_mobileMenu",
|
|
3499
|
+
mobileMenuOpen: "NavigationMobile_module_mobileMenuOpen",
|
|
3500
|
+
mobileMenuHeader: "NavigationMobile_module_mobileMenuHeader",
|
|
3501
|
+
mobileMenuItems: "NavigationMobile_module_mobileMenuItems",
|
|
3502
|
+
mobileItem: "NavigationMobile_module_mobileItem",
|
|
3503
|
+
mobileItemChevron: "NavigationMobile_module_mobileItemChevron",
|
|
3504
|
+
mobileItemChevronOpen: "NavigationMobile_module_mobileItemChevronOpen",
|
|
3505
|
+
mobileSubItems: "NavigationMobile_module_mobileSubItems",
|
|
3506
|
+
mobileSubItemsOpen: "NavigationMobile_module_mobileSubItemsOpen",
|
|
3507
|
+
mobileSubItemsInner: "NavigationMobile_module_mobileSubItemsInner",
|
|
3508
|
+
mobileSubLinkActive: "NavigationMobile_module_mobileSubLinkActive",
|
|
3509
|
+
mobileMenuCtas: "NavigationMobile_module_mobileMenuCtas",
|
|
3510
|
+
internalMobileMenu: "NavigationMobile_module_internalMobileMenu",
|
|
3511
|
+
internalMobileMenuOpen: "NavigationMobile_module_internalMobileMenuOpen",
|
|
3512
|
+
mobileHeader: "NavigationMobile_module_mobileHeader",
|
|
3513
|
+
mobileBrandBars: "NavigationMobile_module_mobileBrandBars",
|
|
3514
|
+
mobileItems: "NavigationMobile_module_mobileItems",
|
|
3515
|
+
internalMobileItem: "NavigationMobile_module_internalMobileItem",
|
|
3516
|
+
internalMobileItemLink: "NavigationMobile_module_internalMobileItemLink",
|
|
3517
|
+
internalMobileItemTrigger: "NavigationMobile_module_internalMobileItemTrigger",
|
|
3518
|
+
internalMobileItemChevron: "NavigationMobile_module_internalMobileItemChevron",
|
|
3519
|
+
internalMobileItemChevronOpen: "NavigationMobile_module_internalMobileItemChevronOpen",
|
|
3520
|
+
internalMobileSubItems: "NavigationMobile_module_internalMobileSubItems",
|
|
3521
|
+
internalMobileSubItemsOpen: "NavigationMobile_module_internalMobileSubItemsOpen",
|
|
3522
|
+
internalMobileSubItemsInner: "NavigationMobile_module_internalMobileSubItemsInner",
|
|
3523
|
+
internalMobileSubLink: "NavigationMobile_module_internalMobileSubLink",
|
|
3524
|
+
internalMobileSubLinkActive: "NavigationMobile_module_internalMobileSubLinkActive",
|
|
3525
|
+
mobileFooter: "NavigationMobile_module_mobileFooter"
|
|
3526
|
+
};
|
|
3523
3527
|
var NavigationMobile = ({
|
|
3524
3528
|
id,
|
|
3525
3529
|
navItems,
|
|
@@ -3559,25 +3563,25 @@ var NavigationMobile = ({
|
|
|
3559
3563
|
if (!e.currentTarget.contains(e.relatedTarget)) collapseItem(index);
|
|
3560
3564
|
}
|
|
3561
3565
|
};
|
|
3562
|
-
const logo = mainLogo ? /* @__PURE__ */ jsx(Picture, { className:
|
|
3566
|
+
const logo = mainLogo ? /* @__PURE__ */ jsx(Picture, { className: NavigationMobile_module_default.logoMobile, src: mainLogo, alt: logoAlt }) : null;
|
|
3563
3567
|
if (isExternal) {
|
|
3564
3568
|
return /* @__PURE__ */ jsxs(
|
|
3565
3569
|
"div",
|
|
3566
3570
|
{
|
|
3567
3571
|
id,
|
|
3568
|
-
className: clsx49(
|
|
3572
|
+
className: clsx49(NavigationMobile_module_default.mobileMenu, isOpen && NavigationMobile_module_default.mobileMenuOpen),
|
|
3569
3573
|
role: "dialog",
|
|
3570
3574
|
"aria-modal": "true",
|
|
3571
3575
|
"aria-label": "Navigation menu",
|
|
3572
3576
|
"aria-hidden": !isOpen,
|
|
3573
3577
|
children: [
|
|
3574
|
-
/* @__PURE__ */ jsxs("div", { className:
|
|
3578
|
+
/* @__PURE__ */ jsxs("div", { className: NavigationMobile_module_default.mobileMenuHeader, children: [
|
|
3575
3579
|
/* @__PURE__ */ jsx(
|
|
3576
3580
|
NavigationLogo,
|
|
3577
3581
|
{
|
|
3578
3582
|
mainLogo,
|
|
3579
3583
|
homeCta,
|
|
3580
|
-
className:
|
|
3584
|
+
className: NavigationMobile_module_default.mainLogoMobile,
|
|
3581
3585
|
onClick: onClose
|
|
3582
3586
|
}
|
|
3583
3587
|
),
|
|
@@ -3586,23 +3590,23 @@ var NavigationMobile = ({
|
|
|
3586
3590
|
{
|
|
3587
3591
|
type: "button",
|
|
3588
3592
|
variant: "nofill",
|
|
3589
|
-
className:
|
|
3593
|
+
className: NavigationMobile_module_default.hamburgerButton,
|
|
3590
3594
|
onClick: onClose,
|
|
3591
3595
|
"aria-label": "Close navigation menu",
|
|
3592
3596
|
children: /* @__PURE__ */ jsx(Icon, { type: "xBlack", size: 24, "aria-hidden": "true" })
|
|
3593
3597
|
}
|
|
3594
3598
|
)
|
|
3595
3599
|
] }),
|
|
3596
|
-
/* @__PURE__ */ jsx("ul", { className:
|
|
3600
|
+
/* @__PURE__ */ jsx("ul", { className: NavigationMobile_module_default.mobileMenuItems, children: navItems == null ? void 0 : navItems.map((item, index) => {
|
|
3597
3601
|
var _a, _b;
|
|
3598
3602
|
const subMenuId = `${baseId}-submenu-${index}`;
|
|
3599
3603
|
const isExpanded = expanded === index;
|
|
3600
|
-
return item.type === "dropdown" ? /* @__PURE__ */ jsxs("li", __spreadProps(__spreadValues({ className:
|
|
3604
|
+
return item.type === "dropdown" ? /* @__PURE__ */ jsxs("li", __spreadProps(__spreadValues({ className: NavigationMobile_module_default.mobileItem }, hoverFocusProps(index)), { children: [
|
|
3601
3605
|
/* @__PURE__ */ jsxs(
|
|
3602
3606
|
"button",
|
|
3603
3607
|
{
|
|
3604
3608
|
type: "button",
|
|
3605
|
-
className:
|
|
3609
|
+
className: NavigationMobile_module_default.mobileItemTrigger,
|
|
3606
3610
|
onClick: () => toggleExpanded(index),
|
|
3607
3611
|
"aria-expanded": isExpanded,
|
|
3608
3612
|
"aria-controls": subMenuId,
|
|
@@ -3612,8 +3616,8 @@ var NavigationMobile = ({
|
|
|
3612
3616
|
"span",
|
|
3613
3617
|
{
|
|
3614
3618
|
className: clsx49(
|
|
3615
|
-
|
|
3616
|
-
isExpanded &&
|
|
3619
|
+
NavigationMobile_module_default.mobileItemChevron,
|
|
3620
|
+
isExpanded && NavigationMobile_module_default.mobileItemChevronOpen
|
|
3617
3621
|
),
|
|
3618
3622
|
"aria-hidden": "true",
|
|
3619
3623
|
children: /* @__PURE__ */ jsx(Icon, { type: "downChevronBlack", size: 24 })
|
|
@@ -3626,8 +3630,8 @@ var NavigationMobile = ({
|
|
|
3626
3630
|
"div",
|
|
3627
3631
|
{
|
|
3628
3632
|
id: subMenuId,
|
|
3629
|
-
className: clsx49(
|
|
3630
|
-
children: /* @__PURE__ */ jsx("ul", { className:
|
|
3633
|
+
className: clsx49(NavigationMobile_module_default.mobileSubItems, isExpanded && NavigationMobile_module_default.mobileSubItemsOpen),
|
|
3634
|
+
children: /* @__PURE__ */ jsx("ul", { className: NavigationMobile_module_default.mobileSubItemsInner, children: item.items.map(
|
|
3631
3635
|
(subItem, i) => {
|
|
3632
3636
|
var _a2, _b2;
|
|
3633
3637
|
return subItem.type === "link" ? /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(
|
|
@@ -3635,8 +3639,8 @@ var NavigationMobile = ({
|
|
|
3635
3639
|
{
|
|
3636
3640
|
href: (_a2 = subItem.cta) == null ? void 0 : _a2.url,
|
|
3637
3641
|
className: clsx49(
|
|
3638
|
-
|
|
3639
|
-
subItem.isActive &&
|
|
3642
|
+
NavigationMobile_module_default.mobileSubLink,
|
|
3643
|
+
subItem.isActive && NavigationMobile_module_default.mobileSubLinkActive
|
|
3640
3644
|
),
|
|
3641
3645
|
onClick: onClose,
|
|
3642
3646
|
children: (_b2 = subItem.cta) == null ? void 0 : _b2.label
|
|
@@ -3646,12 +3650,12 @@ var NavigationMobile = ({
|
|
|
3646
3650
|
) })
|
|
3647
3651
|
}
|
|
3648
3652
|
)
|
|
3649
|
-
] }), index) : /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx("a", { href: (_a = item.cta) == null ? void 0 : _a.url, className:
|
|
3653
|
+
] }), index) : /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ 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);
|
|
3650
3654
|
}) }),
|
|
3651
3655
|
/* @__PURE__ */ jsx(
|
|
3652
3656
|
NavigationCtas,
|
|
3653
3657
|
{
|
|
3654
|
-
className:
|
|
3658
|
+
className: NavigationMobile_module_default.mobileMenuCtas,
|
|
3655
3659
|
loginCta,
|
|
3656
3660
|
rightButton,
|
|
3657
3661
|
loginVariant: "nofillblack"
|
|
@@ -3665,20 +3669,20 @@ var NavigationMobile = ({
|
|
|
3665
3669
|
"div",
|
|
3666
3670
|
{
|
|
3667
3671
|
id,
|
|
3668
|
-
className: clsx49(
|
|
3672
|
+
className: clsx49(NavigationMobile_module_default.internalMobileMenu, isOpen && NavigationMobile_module_default.internalMobileMenuOpen),
|
|
3669
3673
|
role: "dialog",
|
|
3670
3674
|
"aria-modal": "true",
|
|
3671
3675
|
"aria-label": "Navigation menu",
|
|
3672
3676
|
"aria-hidden": !isOpen,
|
|
3673
3677
|
children: [
|
|
3674
|
-
/* @__PURE__ */ jsxs("div", { className:
|
|
3675
|
-
homeCta && logo ? /* @__PURE__ */ jsx("a", { href: homeCta, className:
|
|
3678
|
+
/* @__PURE__ */ jsxs("div", { className: NavigationMobile_module_default.mobileHeader, children: [
|
|
3679
|
+
homeCta && logo ? /* @__PURE__ */ jsx("a", { href: homeCta, className: NavigationMobile_module_default.logoLink, "aria-label": logoAlt, onClick: onClose, children: logo }) : logo,
|
|
3676
3680
|
/* @__PURE__ */ jsx(
|
|
3677
3681
|
Button,
|
|
3678
3682
|
{
|
|
3679
3683
|
variant: "ghost",
|
|
3680
3684
|
type: "button",
|
|
3681
|
-
className:
|
|
3685
|
+
className: NavigationMobile_module_default.mobileClose,
|
|
3682
3686
|
onClick: onClose,
|
|
3683
3687
|
"aria-label": "Close navigation menu",
|
|
3684
3688
|
children: /* @__PURE__ */ jsx(Icon, { type: "xBlack", size: 24, "aria-hidden": "true" })
|
|
@@ -3690,19 +3694,19 @@ var NavigationMobile = ({
|
|
|
3690
3694
|
{
|
|
3691
3695
|
brandLogos,
|
|
3692
3696
|
unfolded: false,
|
|
3693
|
-
className:
|
|
3697
|
+
className: NavigationMobile_module_default.mobileBrandBars
|
|
3694
3698
|
}
|
|
3695
3699
|
),
|
|
3696
|
-
/* @__PURE__ */ jsx("ul", { className:
|
|
3700
|
+
/* @__PURE__ */ jsx("ul", { className: NavigationMobile_module_default.mobileItems, children: navItems == null ? void 0 : navItems.map((item, index) => {
|
|
3697
3701
|
var _a, _b, _c, _d;
|
|
3698
3702
|
const subMenuId = `${baseId}-submenu-${index}`;
|
|
3699
3703
|
const isExpanded = expanded === index;
|
|
3700
3704
|
if (item.type === "link") {
|
|
3701
|
-
return /* @__PURE__ */ jsx("li", { className:
|
|
3705
|
+
return /* @__PURE__ */ jsx("li", { className: NavigationMobile_module_default.internalMobileItem, children: /* @__PURE__ */ jsx(
|
|
3702
3706
|
"a",
|
|
3703
3707
|
{
|
|
3704
3708
|
href: (_a = item.cta) == null ? void 0 : _a.url,
|
|
3705
|
-
className:
|
|
3709
|
+
className: NavigationMobile_module_default.internalMobileItemLink,
|
|
3706
3710
|
target: ((_b = item.cta) == null ? void 0 : _b.isExternal) ? "_blank" : void 0,
|
|
3707
3711
|
rel: ((_c = item.cta) == null ? void 0 : _c.isExternal) ? "noopener noreferrer" : void 0,
|
|
3708
3712
|
onClick: onClose,
|
|
@@ -3710,12 +3714,12 @@ var NavigationMobile = ({
|
|
|
3710
3714
|
}
|
|
3711
3715
|
) }, index);
|
|
3712
3716
|
}
|
|
3713
|
-
return /* @__PURE__ */ jsxs("li", __spreadProps(__spreadValues({ className:
|
|
3717
|
+
return /* @__PURE__ */ jsxs("li", __spreadProps(__spreadValues({ className: NavigationMobile_module_default.internalMobileItem }, hoverFocusProps(index)), { children: [
|
|
3714
3718
|
/* @__PURE__ */ jsxs(
|
|
3715
3719
|
"button",
|
|
3716
3720
|
{
|
|
3717
3721
|
type: "button",
|
|
3718
|
-
className:
|
|
3722
|
+
className: NavigationMobile_module_default.internalMobileItemTrigger,
|
|
3719
3723
|
onClick: () => toggleExpanded(index),
|
|
3720
3724
|
"aria-expanded": isExpanded,
|
|
3721
3725
|
"aria-controls": subMenuId,
|
|
@@ -3725,8 +3729,8 @@ var NavigationMobile = ({
|
|
|
3725
3729
|
"span",
|
|
3726
3730
|
{
|
|
3727
3731
|
className: clsx49(
|
|
3728
|
-
|
|
3729
|
-
isExpanded &&
|
|
3732
|
+
NavigationMobile_module_default.internalMobileItemChevron,
|
|
3733
|
+
isExpanded && NavigationMobile_module_default.internalMobileItemChevronOpen
|
|
3730
3734
|
),
|
|
3731
3735
|
"aria-hidden": "true",
|
|
3732
3736
|
children: /* @__PURE__ */ jsx(Icon, { type: "downChevronBlack", size: 24 })
|
|
@@ -3740,10 +3744,10 @@ var NavigationMobile = ({
|
|
|
3740
3744
|
{
|
|
3741
3745
|
id: subMenuId,
|
|
3742
3746
|
className: clsx49(
|
|
3743
|
-
|
|
3744
|
-
isExpanded &&
|
|
3747
|
+
NavigationMobile_module_default.internalMobileSubItems,
|
|
3748
|
+
isExpanded && NavigationMobile_module_default.internalMobileSubItemsOpen
|
|
3745
3749
|
),
|
|
3746
|
-
children: /* @__PURE__ */ jsx("ul", { className:
|
|
3750
|
+
children: /* @__PURE__ */ jsx("ul", { className: NavigationMobile_module_default.internalMobileSubItemsInner, children: item.items.map(
|
|
3747
3751
|
(sub, i) => {
|
|
3748
3752
|
var _a2, _b2, _c2, _d2;
|
|
3749
3753
|
return sub.type === "link" ? /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(
|
|
@@ -3751,8 +3755,8 @@ var NavigationMobile = ({
|
|
|
3751
3755
|
{
|
|
3752
3756
|
href: (_a2 = sub.cta) == null ? void 0 : _a2.url,
|
|
3753
3757
|
className: clsx49(
|
|
3754
|
-
|
|
3755
|
-
sub.isActive &&
|
|
3758
|
+
NavigationMobile_module_default.internalMobileSubLink,
|
|
3759
|
+
sub.isActive && NavigationMobile_module_default.internalMobileSubLinkActive
|
|
3756
3760
|
),
|
|
3757
3761
|
target: ((_b2 = sub.cta) == null ? void 0 : _b2.isExternal) ? "_blank" : void 0,
|
|
3758
3762
|
rel: ((_c2 = sub.cta) == null ? void 0 : _c2.isExternal) ? "noopener noreferrer" : void 0,
|
|
@@ -3766,7 +3770,7 @@ var NavigationMobile = ({
|
|
|
3766
3770
|
)
|
|
3767
3771
|
] }), index);
|
|
3768
3772
|
}) }),
|
|
3769
|
-
/* @__PURE__ */ jsxs("div", { className:
|
|
3773
|
+
/* @__PURE__ */ jsxs("div", { className: NavigationMobile_module_default.mobileFooter, children: [
|
|
3770
3774
|
/* @__PURE__ */ jsx(
|
|
3771
3775
|
Search,
|
|
3772
3776
|
{
|
|
@@ -3782,6 +3786,24 @@ var NavigationMobile = ({
|
|
|
3782
3786
|
}
|
|
3783
3787
|
);
|
|
3784
3788
|
};
|
|
3789
|
+
|
|
3790
|
+
// src/widgets/Navigation/Navigation.module.scss
|
|
3791
|
+
var Navigation_module_default = {
|
|
3792
|
+
overlay: "Navigation_module_overlay",
|
|
3793
|
+
navigation: "Navigation_module_navigation",
|
|
3794
|
+
dropdownOpen: "Navigation_module_dropdownOpen",
|
|
3795
|
+
mainBar: "Navigation_module_mainBar",
|
|
3796
|
+
variantTransparent: "Navigation_module_variantTransparent",
|
|
3797
|
+
transparent: "Navigation_module_transparent",
|
|
3798
|
+
logo: "Navigation_module_logo",
|
|
3799
|
+
inner: "Navigation_module_inner",
|
|
3800
|
+
topRow: "Navigation_module_topRow",
|
|
3801
|
+
upperRight: "Navigation_module_upperRight",
|
|
3802
|
+
logoMobile: "Navigation_module_logoMobile",
|
|
3803
|
+
hamburger: "Navigation_module_hamburger",
|
|
3804
|
+
hamburgerButton: "Navigation_module_hamburgerButton",
|
|
3805
|
+
bottomRow: "Navigation_module_bottomRow"
|
|
3806
|
+
};
|
|
3785
3807
|
var FOCUSABLE_SELECTOR = 'a[href], button:not([disabled]), input:not([disabled]), [tabindex]:not([tabindex="-1"])';
|
|
3786
3808
|
var getFocusable = (root) => Array.from(root.querySelectorAll(FOCUSABLE_SELECTOR)).filter(
|
|
3787
3809
|
(el) => el.tabIndex !== -1 && el.offsetParent !== null
|
|
@@ -3899,7 +3921,7 @@ var Navigation2 = (props) => {
|
|
|
3899
3921
|
{
|
|
3900
3922
|
ref: navRef,
|
|
3901
3923
|
className: clsx49(
|
|
3902
|
-
Navigation_module_default.
|
|
3924
|
+
Navigation_module_default.navigation,
|
|
3903
3925
|
dropdownOpen && Navigation_module_default.dropdownOpen,
|
|
3904
3926
|
// External-only transparent / hover treatment.
|
|
3905
3927
|
isExternal && transparent && Navigation_module_default.variantTransparent,
|
|
@@ -4438,15 +4460,23 @@ var TextBodyBody = ({ children }) => {
|
|
|
4438
4460
|
};
|
|
4439
4461
|
var TextBody = (props) => {
|
|
4440
4462
|
var _a, _b;
|
|
4441
|
-
const { className, body, title, children } = props;
|
|
4463
|
+
const { className, variant, body, title, titleAlign = "text-left", children } = props;
|
|
4442
4464
|
const slots = resolveCompoundSlots(children, {
|
|
4443
4465
|
title: TextBodyTitle,
|
|
4444
4466
|
body: TextBodyBody
|
|
4445
4467
|
});
|
|
4446
4468
|
const titleNode = (_a = slots.title) != null ? _a : title;
|
|
4447
4469
|
const bodyNode = (_b = slots.body) != null ? _b : body;
|
|
4470
|
+
const isTableCenter = variant === "table-center";
|
|
4448
4471
|
return /* @__PURE__ */ jsxs(Container, { className: clsx49(TextBody_module_default.textBody, className), children: [
|
|
4449
|
-
titleNode && /* @__PURE__ */ jsx(
|
|
4472
|
+
titleNode && /* @__PURE__ */ jsx(
|
|
4473
|
+
Text,
|
|
4474
|
+
{
|
|
4475
|
+
tag: isTableCenter ? "h4" : "h3",
|
|
4476
|
+
className: clsx49(TextBody_module_default.title, isTableCenter ? "text-center" : titleAlign),
|
|
4477
|
+
children: titleNode
|
|
4478
|
+
}
|
|
4479
|
+
),
|
|
4450
4480
|
/* @__PURE__ */ jsx("div", { className: TextBody_module_default.body, children: bodyNode })
|
|
4451
4481
|
] });
|
|
4452
4482
|
};
|