@aurora-ds/components 1.7.5 → 1.7.7

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'
@@ -758,6 +763,7 @@ const FAB_STYLES = theme.createStyles((theme) => ({
758
763
  success: { bg: c.successMain, bgHover: c.successHover, bgActive: c.successActive, fg: c.successOn },
759
764
  warning: { bg: c.warningMain, bgHover: c.warningHover, bgActive: c.warningActive, fg: c.warningOn },
760
765
  error: { bg: c.errorMain, bgHover: c.errorHover, bgActive: c.errorActive, fg: c.errorOn },
766
+ 'textPrimary': { bg: c.primaryMain, bgHover: c.primaryHover, bgActive: c.primaryActive, fg: c.primaryOn },
761
767
  };
762
768
  const { bg, bgHover, bgActive, fg } = colorMap[color];
763
769
  const dim = SIZE_MAP[size];
@@ -814,7 +820,7 @@ const FAB_STYLES = theme.createStyles((theme) => ({
814
820
  },
815
821
  }), { id: 'fab' });
816
822
  // Pre-generate CSS for all color/size/extended combinations.
817
- const FAB_COLOR_VALUES = ['primary', 'secondary', 'neutral', 'info', 'success', 'warning', 'error'];
823
+ const FAB_COLOR_VALUES = ['primary', 'secondary', 'neutral', 'info', 'success', 'warning', 'error', 'textPrimary'];
818
824
  const FAB_SIZE_VALUES = ['sm', 'md', 'lg'];
819
825
  FAB_COLOR_VALUES.forEach(color => FAB_SIZE_VALUES.forEach(size => {
820
826
  FAB_STYLES.root({ color, size, extended: false });
@@ -1060,6 +1066,11 @@ const buildToggleIntents = (c) => ({
1060
1066
  on: c.errorOn, subtle: c.errorSubtle, subtleHover: c.errorSubtleHover, subtleActive: c.errorSubtleActive,
1061
1067
  fg: c.errorMain, fgHover: c.errorHover, border: c.errorMain,
1062
1068
  },
1069
+ textPrimary: {
1070
+ main: c.primaryMain, hover: c.primaryHover, active: c.primaryActive,
1071
+ on: c.primaryOn, subtle: c.primarySubtle, subtleHover: c.primarySubtleHover, subtleActive: c.primarySubtleActive,
1072
+ fg: c.textPrimary, fgHover: c.textPrimary, border: c.primaryMain,
1073
+ },
1063
1074
  });
1064
1075
 
1065
1076
  /**
@@ -5908,7 +5919,12 @@ const DrawerItem = ({ startIcon, label, selected = false, endContent, href, onCl
5908
5919
  e.preventDefault();
5909
5920
  return;
5910
5921
  }
5911
- onClick?.();
5922
+ // When an onClick handler is provided (e.g. React Router's navigate),
5923
+ // prevent the browser from following the href and let the handler drive navigation.
5924
+ if (onClick) {
5925
+ e.preventDefault();
5926
+ onClick(e);
5927
+ }
5912
5928
  };
5913
5929
  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
5930
  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 }));