@syscore/ui-library 1.7.0 → 1.7.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/dist/index.es.js CHANGED
@@ -4409,7 +4409,7 @@ const NavigationTray = React.forwardRef(
4409
4409
  _renderTriggerOnly,
4410
4410
  ...props
4411
4411
  }, ref) => {
4412
- const { light, activeIndex, setActiveIndex, setIsOpen } = useNavigation();
4412
+ const { light, activeIndex, setActiveIndex, setIsOpen, isOpen } = useNavigation();
4413
4413
  const isActive = activeIndex === _index;
4414
4414
  const handleMouseEnter = () => {
4415
4415
  setIsOpen(true);
@@ -4439,7 +4439,7 @@ const NavigationTray = React.forwardRef(
4439
4439
  _index === 1 && !light && /* @__PURE__ */ jsx("div", { className: "navigation-tray-trigger__static-indicator", children: /* @__PURE__ */ jsx("div", { className: "navigation-tray-trigger__static-indicator-shape" }) })
4440
4440
  ] });
4441
4441
  }
4442
- return /* @__PURE__ */ jsxs("div", { ref, className: cn("navigation-tray", className), ...props, children: [
4442
+ return /* @__PURE__ */ jsxs("div", { ref, className: cn("navigation-tray", className), ...props, "data-open": isOpen, children: [
4443
4443
  /* @__PURE__ */ jsx(
4444
4444
  "h2",
4445
4445
  {
@@ -4476,9 +4476,13 @@ const NavigationColumn = React.forwardRef(({ className, title, children, ...prop
4476
4476
  });
4477
4477
  NavigationColumn.displayName = "NavigationColumn";
4478
4478
  const NavigationLink = React.forwardRef(
4479
- ({ className, asChild, sub, bullet, badge, children, ...props }, ref) => {
4479
+ ({ className, asChild, sub, bullet, badge, children, onClick, ...props }, ref) => {
4480
4480
  const { light } = useNavigation();
4481
4481
  const Comp = asChild ? Slot : "a";
4482
+ const handleClick = (e) => {
4483
+ e.stopPropagation();
4484
+ onClick == null ? void 0 : onClick(e);
4485
+ };
4482
4486
  const isSubItem = sub || bullet;
4483
4487
  const baseClassName = isSubItem ? cn(
4484
4488
  "body-small navigation-link--sub",
@@ -4491,7 +4495,7 @@ const NavigationLink = React.forwardRef(
4491
4495
  const bulletElement = bullet ? /* @__PURE__ */ jsx(NavBullet, { color: bullet }) : /* @__PURE__ */ jsx("div", { className: "navigation-link__bullet" });
4492
4496
  return /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsxs("div", { className: "navigation-link__container", children: [
4493
4497
  bulletElement,
4494
- /* @__PURE__ */ jsx(Comp, { ref, className: cn(baseClassName, className), ...props, children })
4498
+ /* @__PURE__ */ jsx(Comp, { ref, className: cn(baseClassName, className), onClick: handleClick, ...props, children })
4495
4499
  ] }) });
4496
4500
  }
4497
4501
  const linkClassName = cn(
@@ -4501,11 +4505,11 @@ const NavigationLink = React.forwardRef(
4501
4505
  );
4502
4506
  if (badge) {
4503
4507
  return /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsxs("span", { className: "navigation-link__badge-wrapper", children: [
4504
- /* @__PURE__ */ jsx(Comp, { ref, className: cn(baseClassName, className), ...props, children }),
4508
+ /* @__PURE__ */ jsx(Comp, { ref, className: cn(baseClassName, className), onClick: handleClick, ...props, children }),
4505
4509
  /* @__PURE__ */ jsx("span", { className: "overline-small navigation-link__badge", children: badge })
4506
4510
  ] }) });
4507
4511
  }
4508
- return /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(Comp, { ref, className: linkClassName, ...props, children }) });
4512
+ return /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(Comp, { ref, className: linkClassName, onClick: handleClick, ...props, children }) });
4509
4513
  }
4510
4514
  );
4511
4515
  NavigationLink.displayName = "NavigationLink";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@syscore/ui-library",
3
- "version": "1.7.0",
3
+ "version": "1.7.2",
4
4
  "description": "A comprehensive React component library built with Radix UI, Tailwind CSS, and TypeScript",
5
5
  "private": false,
6
6
  "type": "module",