@digital-b2c/coreui-kit 0.15.0 → 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/dist/index.cjs +33 -19
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +26 -86
- package/dist/index.css.map +1 -1
- package/dist/index.mjs +33 -19
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -3166,7 +3166,7 @@ var useIsAtTop = () => {
|
|
|
3166
3166
|
|
|
3167
3167
|
// src/widgets/Navigation/Navigation.module.scss
|
|
3168
3168
|
var Navigation_module_default = {
|
|
3169
|
-
|
|
3169
|
+
dropdownTitle: "Navigation_module_dropdownTitle",
|
|
3170
3170
|
mobileItemLink: "Navigation_module_mobileItemLink",
|
|
3171
3171
|
mobileItemTrigger: "Navigation_module_mobileItemTrigger",
|
|
3172
3172
|
mobileSubLink: "Navigation_module_mobileSubLink",
|
|
@@ -3194,6 +3194,7 @@ var Navigation_module_default = {
|
|
|
3194
3194
|
Navigation: "Navigation_module_Navigation",
|
|
3195
3195
|
mainBar: "Navigation_module_mainBar",
|
|
3196
3196
|
navTabLink: "Navigation_module_navTabLink",
|
|
3197
|
+
navTabActive: "Navigation_module_navTabActive",
|
|
3197
3198
|
inner: "Navigation_module_inner",
|
|
3198
3199
|
topRow: "Navigation_module_topRow",
|
|
3199
3200
|
logoLink: "Navigation_module_logoLink",
|
|
@@ -3204,15 +3205,14 @@ var Navigation_module_default = {
|
|
|
3204
3205
|
navTab: "Navigation_module_navTab",
|
|
3205
3206
|
navTabTrigger: "Navigation_module_navTabTrigger",
|
|
3206
3207
|
navTabTriggerOpen: "Navigation_module_navTabTriggerOpen",
|
|
3207
|
-
|
|
3208
|
-
|
|
3209
|
-
|
|
3210
|
-
internalDropdownLinks: "Navigation_module_internalDropdownLinks",
|
|
3208
|
+
dropdownPanel: "Navigation_module_dropdownPanel",
|
|
3209
|
+
dropdownInner: "Navigation_module_dropdownInner",
|
|
3210
|
+
dropdownLinks: "Navigation_module_dropdownLinks",
|
|
3211
3211
|
dropdownLinkItem: "Navigation_module_dropdownLinkItem",
|
|
3212
|
-
|
|
3212
|
+
dropdownLink: "Navigation_module_dropdownLink",
|
|
3213
3213
|
dropdownDivider: "Navigation_module_dropdownDivider",
|
|
3214
|
-
|
|
3215
|
-
|
|
3214
|
+
dropdownInfo: "Navigation_module_dropdownInfo",
|
|
3215
|
+
dropdownDescription: "Navigation_module_dropdownDescription",
|
|
3216
3216
|
brandBars: "Navigation_module_brandBars",
|
|
3217
3217
|
brandBar: "Navigation_module_brandBar",
|
|
3218
3218
|
brandBarsUnfolded: "Navigation_module_brandBarsUnfolded",
|
|
@@ -3402,11 +3402,11 @@ var NavigationDropdown = ({
|
|
|
3402
3402
|
"div",
|
|
3403
3403
|
{
|
|
3404
3404
|
id: panelId,
|
|
3405
|
-
className: clsx47(Navigation_module_default.
|
|
3405
|
+
className: clsx47(Navigation_module_default.dropdownPanel, Navigation_module_default.dropdownPanelOpen),
|
|
3406
3406
|
onMouseEnter,
|
|
3407
3407
|
onMouseLeave,
|
|
3408
|
-
children: /* @__PURE__ */ jsxs("div", { className: Navigation_module_default.
|
|
3409
|
-
/* @__PURE__ */ jsx("ul", { className: Navigation_module_default.
|
|
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
3410
|
var _a, _b, _c, _d;
|
|
3411
3411
|
return /* @__PURE__ */ jsx(
|
|
3412
3412
|
"li",
|
|
@@ -3418,7 +3418,7 @@ var NavigationDropdown = ({
|
|
|
3418
3418
|
"a",
|
|
3419
3419
|
{
|
|
3420
3420
|
href: (_a = sub.cta) == null ? void 0 : _a.url,
|
|
3421
|
-
className: Navigation_module_default.
|
|
3421
|
+
className: Navigation_module_default.dropdownLink,
|
|
3422
3422
|
target: ((_b = sub.cta) == null ? void 0 : _b.isExternal) ? "_blank" : void 0,
|
|
3423
3423
|
rel: ((_c = sub.cta) == null ? void 0 : _c.isExternal) ? "noopener noreferrer" : void 0,
|
|
3424
3424
|
onKeyDown: (e) => handleLinkKeyDown(e, i === 0, i === links.length - 1),
|
|
@@ -3430,9 +3430,9 @@ var NavigationDropdown = ({
|
|
|
3430
3430
|
);
|
|
3431
3431
|
}) }),
|
|
3432
3432
|
/* @__PURE__ */ jsx("span", { className: Navigation_module_default.dropdownDivider, "aria-hidden": "true" }),
|
|
3433
|
-
/* @__PURE__ */ jsxs("div", { className: Navigation_module_default.
|
|
3434
|
-
/* @__PURE__ */ jsx("h2", { className: Navigation_module_default.
|
|
3435
|
-
description && /* @__PURE__ */ jsx("
|
|
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
3436
|
] })
|
|
3437
3437
|
] })
|
|
3438
3438
|
}
|
|
@@ -3459,6 +3459,20 @@ var NavigationMobile = ({
|
|
|
3459
3459
|
const toggleExpanded = (index) => {
|
|
3460
3460
|
setExpanded((prev) => prev.includes(index) ? prev.filter((i) => i !== index) : [...prev, index]);
|
|
3461
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
|
+
});
|
|
3462
3476
|
const logo = mainLogo ? /* @__PURE__ */ jsx(Picture, { className: Navigation_module_default.logoMobile, src: mainLogo, alt: logoAlt }) : null;
|
|
3463
3477
|
if (isExternal) {
|
|
3464
3478
|
return /* @__PURE__ */ jsxs(
|
|
@@ -3497,7 +3511,7 @@ var NavigationMobile = ({
|
|
|
3497
3511
|
var _a, _b;
|
|
3498
3512
|
const subMenuId = `${baseId}-submenu-${index}`;
|
|
3499
3513
|
const isExpanded = expanded.includes(index);
|
|
3500
|
-
return item.type === "dropdown" ? /* @__PURE__ */ jsxs("li", { className: Navigation_module_default.mobileItem, children: [
|
|
3514
|
+
return item.type === "dropdown" ? /* @__PURE__ */ jsxs("li", __spreadProps(__spreadValues({ className: Navigation_module_default.mobileItem }, hoverFocusProps(index)), { children: [
|
|
3501
3515
|
/* @__PURE__ */ jsxs(
|
|
3502
3516
|
"button",
|
|
3503
3517
|
{
|
|
@@ -3543,7 +3557,7 @@ var NavigationMobile = ({
|
|
|
3543
3557
|
) })
|
|
3544
3558
|
}
|
|
3545
3559
|
)
|
|
3546
|
-
] }, 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);
|
|
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);
|
|
3547
3561
|
}) }),
|
|
3548
3562
|
/* @__PURE__ */ jsx(
|
|
3549
3563
|
NavigationCtas,
|
|
@@ -3605,7 +3619,7 @@ var NavigationMobile = ({
|
|
|
3605
3619
|
}
|
|
3606
3620
|
) }, index);
|
|
3607
3621
|
}
|
|
3608
|
-
return /* @__PURE__ */ jsxs("li", { className: Navigation_module_default.internalMobileItem, children: [
|
|
3622
|
+
return /* @__PURE__ */ jsxs("li", __spreadProps(__spreadValues({ className: Navigation_module_default.internalMobileItem }, hoverFocusProps(index)), { children: [
|
|
3609
3623
|
/* @__PURE__ */ jsxs(
|
|
3610
3624
|
"button",
|
|
3611
3625
|
{
|
|
@@ -3656,7 +3670,7 @@ var NavigationMobile = ({
|
|
|
3656
3670
|
) })
|
|
3657
3671
|
}
|
|
3658
3672
|
)
|
|
3659
|
-
] }, index);
|
|
3673
|
+
] }), index);
|
|
3660
3674
|
}) }),
|
|
3661
3675
|
/* @__PURE__ */ jsxs("div", { className: Navigation_module_default.mobileFooter, children: [
|
|
3662
3676
|
/* @__PURE__ */ jsx(
|