@aurora-ds/components 1.7.5 → 1.7.6

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/cjs/index.js CHANGED
@@ -372,6 +372,11 @@ const buildActionButtonRootStyle = (theme, variant, color, focusOptions) => {
372
372
  on: c.errorOn, subtle: c.errorSubtle, subtleHover: c.errorSubtleHover, subtleActive: c.errorSubtleActive,
373
373
  fg: c.errorMain, fgHover: c.errorHover, border: c.errorMain,
374
374
  },
375
+ textPrimary: {
376
+ main: c.primaryMain, hover: c.primaryHover, active: c.primaryActive,
377
+ on: c.primaryOn, subtle: c.primarySubtle, subtleHover: c.primarySubtleHover, subtleActive: c.primarySubtleActive,
378
+ fg: c.textPrimary, fgHover: c.textPrimary, border: c.primaryMain,
379
+ },
375
380
  };
376
381
  const intent = intents[color];
377
382
  const colorVariantStyles = variant === 'contained'
@@ -5908,7 +5913,12 @@ const DrawerItem = ({ startIcon, label, selected = false, endContent, href, onCl
5908
5913
  e.preventDefault();
5909
5914
  return;
5910
5915
  }
5911
- onClick?.();
5916
+ // When an onClick handler is provided (e.g. React Router's navigate),
5917
+ // prevent the browser from following the href and let the handler drive navigation.
5918
+ if (onClick) {
5919
+ e.preventDefault();
5920
+ onClick(e);
5921
+ }
5912
5922
  };
5913
5923
  const innerContent = (jsxRuntime.jsxs(Stack, { width: '100%', justifyContent: 'start', children: [jsxRuntime.jsx("span", { className: DRAWER_ITEM_STYLES.iconWrap, children: jsxRuntime.jsx(Icon, { icon: startIcon, size: 'md' }) }), isLabelVisible && (jsxRuntime.jsxs("span", { className: DRAWER_ITEM_STYLES.labelWrapper({ isFadingIn: isLabelFadingIn }), children: [jsxRuntime.jsx(Text, { variant: 'span', fontSize: 'sm', fontWeight: 'medium', className: DRAWER_ITEM_STYLES.label, textAlign: 'start', children: label }), endContent && (jsxRuntime.jsx("span", { className: DRAWER_ITEM_STYLES.endContent, children: endContent }))] }))] }));
5914
5924
  const item = href ? (jsxRuntime.jsx("a", { href: href, className: rootClassName, "aria-disabled": disabled || undefined, "aria-current": computedAriaCurrent, "aria-label": computedAriaLabel, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, "aria-controls": ariaControls, "aria-expanded": ariaExpanded, "aria-haspopup": ariaHasPopup, tabIndex: disabled ? -1 : undefined, onClick: handleClick, children: innerContent })) : (jsxRuntime.jsx("button", { type: 'button', className: rootClassName, disabled: disabled, "aria-current": computedAriaCurrent, "aria-label": computedAriaLabel, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, "aria-controls": ariaControls, "aria-expanded": ariaExpanded, "aria-haspopup": ariaHasPopup, onClick: handleClick, children: innerContent }));