@kiefer-tek/sophea-design-system 0.15.2 → 0.15.3

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.js CHANGED
@@ -8325,19 +8325,23 @@ const AppShellRail = forwardRef(function AppShellRail2({ collapsed, header: head
8325
8325
  });
8326
8326
  AppShellRail[ROLE] = "drawer";
8327
8327
  const AppShellRailItem = forwardRef(
8328
- function AppShellRailItem2({ icon: Icon, label: label2, selected: selected2 = false, onSelect, asChild = false, hideLabel = false, className, children, "aria-label": ariaLabel, ...rest }, ref) {
8328
+ function AppShellRailItem2({ icon: Icon, label: label2, selected: selected2 = false, onSelect, asChild = false, hideLabel = false, className, children, onClick, "aria-label": ariaLabel, ...rest }, ref) {
8329
8329
  const Comp = asChild ? Slot : "button";
8330
8330
  const accessibleName = ariaLabel ?? (hideLabel && typeof label2 === "string" ? label2 : void 0);
8331
+ const handleClick = (event) => {
8332
+ onClick?.(event);
8333
+ if (!event.defaultPrevented) onSelect?.();
8334
+ };
8331
8335
  return /* @__PURE__ */ jsxs(
8332
8336
  Comp,
8333
8337
  {
8334
8338
  ref,
8335
8339
  className: cx(styles$g.railItem, hideLabel && styles$g.railItemIconOnly, className),
8336
8340
  "data-selected": selected2 ? "true" : "false",
8337
- onClick: onSelect,
8338
8341
  ...accessibleName ? { "aria-label": accessibleName } : {},
8339
8342
  ...asChild ? {} : { type: "button", "aria-pressed": selected2 },
8340
8343
  ...rest,
8344
+ onClick: handleClick,
8341
8345
  children: [
8342
8346
  /* @__PURE__ */ jsx(Slottable, { children: asChild ? children : null }),
8343
8347
  selected2 ? /* @__PURE__ */ jsx("span", { className: styles$g.railItemPill, "aria-hidden": "true" }) : null,