@digital-b2c/coreui-kit 0.15.2 → 0.15.4

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.mjs CHANGED
@@ -3455,6 +3455,9 @@ var NavigationMobile = ({
3455
3455
  rightButton
3456
3456
  }) => {
3457
3457
  const [expanded, setExpanded] = useState([]);
3458
+ const [supportsHover] = useState(
3459
+ () => typeof window !== "undefined" && window.matchMedia("(hover: hover)").matches
3460
+ );
3458
3461
  const baseId = useId();
3459
3462
  const toggleExpanded = (index) => {
3460
3463
  setExpanded((prev) => prev.includes(index) ? prev.filter((i) => i !== index) : [...prev, index]);
@@ -3465,14 +3468,14 @@ var NavigationMobile = ({
3465
3468
  const collapseItem = (index) => {
3466
3469
  setExpanded((prev) => prev.filter((i) => i !== index));
3467
3470
  };
3468
- const hoverFocusProps = (index) => ({
3471
+ const hoverFocusProps = (index) => !supportsHover ? {} : {
3469
3472
  onMouseEnter: () => expandItem(index),
3470
3473
  onMouseLeave: () => collapseItem(index),
3471
3474
  onFocus: () => expandItem(index),
3472
3475
  onBlur: (e) => {
3473
3476
  if (!e.currentTarget.contains(e.relatedTarget)) collapseItem(index);
3474
3477
  }
3475
- });
3478
+ };
3476
3479
  const logo = mainLogo ? /* @__PURE__ */ jsx(Picture, { className: Navigation_module_default.logoMobile, src: mainLogo, alt: logoAlt }) : null;
3477
3480
  if (isExternal) {
3478
3481
  return /* @__PURE__ */ jsxs(