@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/esm/index.js CHANGED
@@ -352,6 +352,11 @@ const buildActionButtonRootStyle = (theme, variant, color, focusOptions) => {
352
352
  on: c.errorOn, subtle: c.errorSubtle, subtleHover: c.errorSubtleHover, subtleActive: c.errorSubtleActive,
353
353
  fg: c.errorMain, fgHover: c.errorHover, border: c.errorMain,
354
354
  },
355
+ 'textPrimary': {
356
+ main: c.primaryMain, hover: c.primaryHover, active: c.primaryActive,
357
+ on: c.primaryOn, subtle: c.primarySubtle, subtleHover: c.primarySubtleHover, subtleActive: c.primarySubtleActive,
358
+ fg: c.textPrimary, fgHover: c.textPrimary, border: c.primaryMain,
359
+ },
355
360
  };
356
361
  const intent = intents[color];
357
362
  const colorVariantStyles = variant === 'contained'
@@ -738,6 +743,7 @@ const FAB_STYLES = createStyles((theme) => ({
738
743
  success: { bg: c.successMain, bgHover: c.successHover, bgActive: c.successActive, fg: c.successOn },
739
744
  warning: { bg: c.warningMain, bgHover: c.warningHover, bgActive: c.warningActive, fg: c.warningOn },
740
745
  error: { bg: c.errorMain, bgHover: c.errorHover, bgActive: c.errorActive, fg: c.errorOn },
746
+ 'textPrimary': { bg: c.primaryMain, bgHover: c.primaryHover, bgActive: c.primaryActive, fg: c.primaryOn },
741
747
  };
742
748
  const { bg, bgHover, bgActive, fg } = colorMap[color];
743
749
  const dim = SIZE_MAP[size];
@@ -794,7 +800,7 @@ const FAB_STYLES = createStyles((theme) => ({
794
800
  },
795
801
  }), { id: 'fab' });
796
802
  // Pre-generate CSS for all color/size/extended combinations.
797
- const FAB_COLOR_VALUES = ['primary', 'secondary', 'neutral', 'info', 'success', 'warning', 'error'];
803
+ const FAB_COLOR_VALUES = ['primary', 'secondary', 'neutral', 'info', 'success', 'warning', 'error', 'textPrimary'];
798
804
  const FAB_SIZE_VALUES = ['sm', 'md', 'lg'];
799
805
  FAB_COLOR_VALUES.forEach(color => FAB_SIZE_VALUES.forEach(size => {
800
806
  FAB_STYLES.root({ color, size, extended: false });
@@ -1040,6 +1046,11 @@ const buildToggleIntents = (c) => ({
1040
1046
  on: c.errorOn, subtle: c.errorSubtle, subtleHover: c.errorSubtleHover, subtleActive: c.errorSubtleActive,
1041
1047
  fg: c.errorMain, fgHover: c.errorHover, border: c.errorMain,
1042
1048
  },
1049
+ textPrimary: {
1050
+ main: c.primaryMain, hover: c.primaryHover, active: c.primaryActive,
1051
+ on: c.primaryOn, subtle: c.primarySubtle, subtleHover: c.primarySubtleHover, subtleActive: c.primarySubtleActive,
1052
+ fg: c.textPrimary, fgHover: c.textPrimary, border: c.primaryMain,
1053
+ },
1043
1054
  });
1044
1055
 
1045
1056
  /**
@@ -5888,7 +5899,12 @@ const DrawerItem = ({ startIcon, label, selected = false, endContent, href, onCl
5888
5899
  e.preventDefault();
5889
5900
  return;
5890
5901
  }
5891
- onClick?.();
5902
+ // When an onClick handler is provided (e.g. React Router's navigate),
5903
+ // prevent the browser from following the href and let the handler drive navigation.
5904
+ if (onClick) {
5905
+ e.preventDefault();
5906
+ onClick(e);
5907
+ }
5892
5908
  };
5893
5909
  const innerContent = (jsxs(Stack, { width: '100%', justifyContent: 'start', children: [jsx("span", { className: DRAWER_ITEM_STYLES.iconWrap, children: jsx(Icon, { icon: startIcon, size: 'md' }) }), isLabelVisible && (jsxs("span", { className: DRAWER_ITEM_STYLES.labelWrapper({ isFadingIn: isLabelFadingIn }), children: [jsx(Text, { variant: 'span', fontSize: 'sm', fontWeight: 'medium', className: DRAWER_ITEM_STYLES.label, textAlign: 'start', children: label }), endContent && (jsx("span", { className: DRAWER_ITEM_STYLES.endContent, children: endContent }))] }))] }));
5894
5910
  const item = href ? (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 })) : (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 }));