@aurora-ds/components 1.7.3 → 1.7.4

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
@@ -928,6 +928,10 @@ const LINK_STYLES = theme.createStyles((theme) => ({
928
928
  const hoverColor = color === 'secondary' ? theme.colors.textTertiary : theme.colors.linkHover;
929
929
  const activeColor = color === 'secondary' ? theme.colors.textPrimary : theme.colors.linkActive;
930
930
  const disabledColor = color === 'secondary' ? theme.colors.textDisabled : theme.colors.linkDisabled;
931
+ // We always set `text-decoration: underline` and drive visibility via
932
+ // `text-decoration-color` so the transition is smooth.
933
+ const underlineVisible = underline === 'always' ? mainColor : 'transparent';
934
+ const underlineHover = underline !== 'none' ? hoverColor : 'transparent';
931
935
  return {
932
936
  display: 'inline-flex',
933
937
  alignItems: 'center',
@@ -937,22 +941,25 @@ const LINK_STYLES = theme.createStyles((theme) => ({
937
941
  fontSize: 'inherit',
938
942
  lineHeight: 'inherit',
939
943
  fontWeight: 'inherit',
940
- textDecoration: underline === 'always' ? 'underline' : 'none',
944
+ textDecoration: 'underline',
945
+ textDecorationColor: underlineVisible,
946
+ textUnderlineOffset: '0.2em',
941
947
  cursor: 'pointer',
942
948
  borderRadius: theme.radius.xs,
943
- transition: `color ${theme.transition.fast}`,
949
+ transition: `color ${theme.transition.fast}, text-decoration-color ${theme.transition.fast}`,
944
950
  ':hover:not([aria-disabled="true"])': {
945
951
  color: hoverColor,
946
- textDecoration: underline !== 'none' ? 'underline' : 'none',
952
+ textDecorationColor: underlineHover,
947
953
  },
948
954
  ':active:not([aria-disabled="true"])': {
949
955
  color: activeColor,
956
+ textDecorationColor: underline !== 'none' ? activeColor : 'transparent',
950
957
  },
951
958
  ':focus-visible': getFocusRingStyles(theme),
952
959
  '&[aria-disabled="true"]': {
953
960
  color: disabledColor,
954
961
  cursor: 'not-allowed',
955
- textDecoration: 'none',
962
+ textDecorationColor: 'transparent',
956
963
  },
957
964
  };
958
965
  },
@@ -987,7 +994,12 @@ const Link = ({ ref, label, fontSize = 'sm', underline = 'hover', color = 'defau
987
994
  e.preventDefault();
988
995
  return;
989
996
  }
990
- onClick?.(e);
997
+ // When an onClick handler is provided (e.g. React Router's navigate),
998
+ // prevent the browser from following the href and let the handler drive navigation.
999
+ if (onClick) {
1000
+ e.preventDefault();
1001
+ onClick(e);
1002
+ }
991
1003
  };
992
1004
  const handleKeyDown = (e) => {
993
1005
  if (disabled && e.key === 'Enter') {
@@ -7045,8 +7057,8 @@ const lightPalette = {
7045
7057
  skeletonSecondary: '#edf0f5',
7046
7058
  // Link (Blue)
7047
7059
  linkMain: '#1e40af',
7048
- linkHover: '#1d4ed8',
7049
- linkActive: '#2563eb',
7060
+ linkHover: '#2563eb',
7061
+ linkActive: '#4f46e5',
7050
7062
  linkDisabled: '#93c5fd',
7051
7063
  };
7052
7064
 
@@ -7323,11 +7335,11 @@ const darkPalette = {
7323
7335
  // Skeleton — visible shimmer on dark surfaces
7324
7336
  skeletonPrimary: '#1e293b',
7325
7337
  skeletonSecondary: '#334155',
7326
- // Link (Blue)
7338
+ // Link — 3-step progression: sky blue → indigo → violet
7327
7339
  // linkMain (#60a5fa) → contrast ~6.7:1 on surfaceBackground ✓ (AA)
7328
7340
  linkMain: '#60a5fa',
7329
- linkHover: '#93c5fd',
7330
- linkActive: '#bfdbfe',
7341
+ linkHover: '#818cf8',
7342
+ linkActive: '#c4b5fd',
7331
7343
  linkDisabled: '#1e40af',
7332
7344
  };
7333
7345