@digital-b2c/coreui-kit 0.17.19 → 0.17.20

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 CHANGED
@@ -3295,39 +3295,18 @@ var NavigationCtas = ({
3295
3295
  // src/widgets/Navigation/NavigationBrandBars.module.scss
3296
3296
  var NavigationBrandBars_module_default = {
3297
3297
  brandBars: "NavigationBrandBars_module_brandBars",
3298
- brandBar: "NavigationBrandBars_module_brandBar",
3299
- brandBarsUnfolded: "NavigationBrandBars_module_brandBarsUnfolded",
3300
- brandLogo: "NavigationBrandBars_module_brandLogo",
3301
- lenscrafters: "NavigationBrandBars_module_lenscrafters",
3302
- forEyes: "NavigationBrandBars_module_forEyes",
3303
- optical: "NavigationBrandBars_module_optical",
3304
- pearleVision: "NavigationBrandBars_module_pearleVision"
3305
- };
3306
- var BRANDS = [
3307
- { key: "lenscrafters", className: NavigationBrandBars_module_default.lenscrafters, label: "LensCrafters" },
3308
- { key: "forEyes", className: NavigationBrandBars_module_default.forEyes, label: "For Eyes" },
3309
- { key: "optical", className: NavigationBrandBars_module_default.optical, label: "Target Optical" },
3310
- { key: "pearleVision", className: NavigationBrandBars_module_default.pearleVision, label: "Pearle Vision" }
3311
- ];
3312
- var NavigationBrandBars = ({
3313
- brandLogos,
3314
- unfolded = false,
3315
- className
3316
- }) => {
3317
- const hasLogos = !!brandLogos;
3318
- const isUnfolded = hasLogos && unfolded;
3319
- return /* @__PURE__ */ jsxRuntime.jsx(
3320
- "div",
3298
+ brandBar: "NavigationBrandBars_module_brandBar"
3299
+ };
3300
+ var NavigationBrandBars = ({ brandBars, className }) => {
3301
+ if ((brandBars == null ? void 0 : brandBars.length) === 0) return;
3302
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: clsx49__default.default(NavigationBrandBars_module_default.brandBars, className), "aria-hidden": "true", children: brandBars && brandBars.map((bar, index) => /* @__PURE__ */ jsxRuntime.jsx(
3303
+ "span",
3321
3304
  {
3322
- className: clsx49__default.default(NavigationBrandBars_module_default.brandBars, isUnfolded && NavigationBrandBars_module_default.brandBarsUnfolded, className),
3323
- "aria-hidden": "true",
3324
- children: BRANDS.map((brand) => {
3325
- var _a;
3326
- const logo = brandLogos == null ? void 0 : brandLogos[brand.key];
3327
- 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);
3328
- })
3329
- }
3330
- );
3305
+ className: NavigationBrandBars_module_default.brandBar,
3306
+ style: { backgroundColor: bar.backgroundColor }
3307
+ },
3308
+ `${bar.backgroundColor}-${index}`
3309
+ )) });
3331
3310
  };
3332
3311
  var getPathname = () => typeof window === "undefined" ? "" : window.location.pathname;
3333
3312
  var useActivePath = () => {
@@ -3574,7 +3553,7 @@ var NavigationMobile = ({
3574
3553
  searchPlaceholder,
3575
3554
  searchCta,
3576
3555
  onSearch,
3577
- brandLogos,
3556
+ brandBars,
3578
3557
  isOpen,
3579
3558
  onClose,
3580
3559
  isExternal = false,
@@ -3729,14 +3708,7 @@ var NavigationMobile = ({
3729
3708
  }
3730
3709
  )
3731
3710
  ] }),
3732
- /* @__PURE__ */ jsxRuntime.jsx(
3733
- NavigationBrandBars,
3734
- {
3735
- brandLogos,
3736
- unfolded: false,
3737
- className: NavigationMobile_module_default.mobileBrandBars
3738
- }
3739
- ),
3711
+ /* @__PURE__ */ jsxRuntime.jsx(NavigationBrandBars, { brandBars, className: NavigationMobile_module_default.mobileBrandBars }),
3740
3712
  /* @__PURE__ */ jsxRuntime.jsx("ul", { className: NavigationMobile_module_default.mobileItems, children: navItems == null ? void 0 : navItems.map((item, index) => {
3741
3713
  var _a, _b, _c, _d;
3742
3714
  const subMenuId = `${baseId}-submenu-${index}`;
@@ -3864,7 +3836,7 @@ var Navigation2 = (props) => {
3864
3836
  searchPlaceholder = "Search resources",
3865
3837
  searchCta,
3866
3838
  onSearch,
3867
- brandLogos
3839
+ brandBars
3868
3840
  } = props;
3869
3841
  const isExternal = variant !== "internal";
3870
3842
  const slots = resolveCompoundSlots(props.children, {
@@ -3884,7 +3856,6 @@ var Navigation2 = (props) => {
3884
3856
  const dropdownOpen = openIndex !== null && !isTabletBelow;
3885
3857
  const isTransparent = !!transparent && isAtTop && !isHovered && !dropdownOpen;
3886
3858
  const openItem = openIndex !== null ? (_a = navigationItems == null ? void 0 : navigationItems.items) == null ? void 0 : _a[openIndex] : void 0;
3887
- const showLogoUnfolded = !!brandLogos && isAtTop && !dropdownOpen;
3888
3859
  const openDropdown = (index) => {
3889
3860
  if (closeTimer.current) clearTimeout(closeTimer.current);
3890
3861
  setOpenIndex(index);
@@ -4040,13 +4011,7 @@ var Navigation2 = (props) => {
4040
4011
  )
4041
4012
  ] })
4042
4013
  ] }) }),
4043
- !isExternal && /* @__PURE__ */ jsxRuntime.jsx(
4044
- NavigationBrandBars,
4045
- {
4046
- brandLogos,
4047
- unfolded: showLogoUnfolded && !isMobileMenuOpen
4048
- }
4049
- ),
4014
+ !isExternal && /* @__PURE__ */ jsxRuntime.jsx(NavigationBrandBars, { brandBars }),
4050
4015
  dropdownOpen && (openItem == null ? void 0 : openItem.type) === "dropdown" && /* @__PURE__ */ jsxRuntime.jsx(
4051
4016
  NavigationDropdown,
4052
4017
  {
@@ -4075,7 +4040,7 @@ var Navigation2 = (props) => {
4075
4040
  searchPlaceholder,
4076
4041
  searchCta,
4077
4042
  onSearch,
4078
- brandLogos,
4043
+ brandBars,
4079
4044
  isOpen: isMobileMenuOpen,
4080
4045
  onClose: () => setIsMobileMenuOpen(false),
4081
4046
  isExternal,