@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 +22 -10
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +22 -10
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/package.json +1 -1
package/dist/esm/index.js
CHANGED
|
@@ -908,6 +908,10 @@ const LINK_STYLES = createStyles((theme) => ({
|
|
|
908
908
|
const hoverColor = color === 'secondary' ? theme.colors.textTertiary : theme.colors.linkHover;
|
|
909
909
|
const activeColor = color === 'secondary' ? theme.colors.textPrimary : theme.colors.linkActive;
|
|
910
910
|
const disabledColor = color === 'secondary' ? theme.colors.textDisabled : theme.colors.linkDisabled;
|
|
911
|
+
// We always set `text-decoration: underline` and drive visibility via
|
|
912
|
+
// `text-decoration-color` so the transition is smooth.
|
|
913
|
+
const underlineVisible = underline === 'always' ? mainColor : 'transparent';
|
|
914
|
+
const underlineHover = underline !== 'none' ? hoverColor : 'transparent';
|
|
911
915
|
return {
|
|
912
916
|
display: 'inline-flex',
|
|
913
917
|
alignItems: 'center',
|
|
@@ -917,22 +921,25 @@ const LINK_STYLES = createStyles((theme) => ({
|
|
|
917
921
|
fontSize: 'inherit',
|
|
918
922
|
lineHeight: 'inherit',
|
|
919
923
|
fontWeight: 'inherit',
|
|
920
|
-
textDecoration:
|
|
924
|
+
textDecoration: 'underline',
|
|
925
|
+
textDecorationColor: underlineVisible,
|
|
926
|
+
textUnderlineOffset: '0.2em',
|
|
921
927
|
cursor: 'pointer',
|
|
922
928
|
borderRadius: theme.radius.xs,
|
|
923
|
-
transition: `color ${theme.transition.fast}`,
|
|
929
|
+
transition: `color ${theme.transition.fast}, text-decoration-color ${theme.transition.fast}`,
|
|
924
930
|
':hover:not([aria-disabled="true"])': {
|
|
925
931
|
color: hoverColor,
|
|
926
|
-
|
|
932
|
+
textDecorationColor: underlineHover,
|
|
927
933
|
},
|
|
928
934
|
':active:not([aria-disabled="true"])': {
|
|
929
935
|
color: activeColor,
|
|
936
|
+
textDecorationColor: underline !== 'none' ? activeColor : 'transparent',
|
|
930
937
|
},
|
|
931
938
|
':focus-visible': getFocusRingStyles(theme),
|
|
932
939
|
'&[aria-disabled="true"]': {
|
|
933
940
|
color: disabledColor,
|
|
934
941
|
cursor: 'not-allowed',
|
|
935
|
-
|
|
942
|
+
textDecorationColor: 'transparent',
|
|
936
943
|
},
|
|
937
944
|
};
|
|
938
945
|
},
|
|
@@ -967,7 +974,12 @@ const Link = ({ ref, label, fontSize = 'sm', underline = 'hover', color = 'defau
|
|
|
967
974
|
e.preventDefault();
|
|
968
975
|
return;
|
|
969
976
|
}
|
|
970
|
-
onClick
|
|
977
|
+
// When an onClick handler is provided (e.g. React Router's navigate),
|
|
978
|
+
// prevent the browser from following the href and let the handler drive navigation.
|
|
979
|
+
if (onClick) {
|
|
980
|
+
e.preventDefault();
|
|
981
|
+
onClick(e);
|
|
982
|
+
}
|
|
971
983
|
};
|
|
972
984
|
const handleKeyDown = (e) => {
|
|
973
985
|
if (disabled && e.key === 'Enter') {
|
|
@@ -7025,8 +7037,8 @@ const lightPalette = {
|
|
|
7025
7037
|
skeletonSecondary: '#edf0f5',
|
|
7026
7038
|
// Link (Blue)
|
|
7027
7039
|
linkMain: '#1e40af',
|
|
7028
|
-
linkHover: '#
|
|
7029
|
-
linkActive: '#
|
|
7040
|
+
linkHover: '#2563eb',
|
|
7041
|
+
linkActive: '#4f46e5',
|
|
7030
7042
|
linkDisabled: '#93c5fd',
|
|
7031
7043
|
};
|
|
7032
7044
|
|
|
@@ -7303,11 +7315,11 @@ const darkPalette = {
|
|
|
7303
7315
|
// Skeleton — visible shimmer on dark surfaces
|
|
7304
7316
|
skeletonPrimary: '#1e293b',
|
|
7305
7317
|
skeletonSecondary: '#334155',
|
|
7306
|
-
// Link
|
|
7318
|
+
// Link — 3-step progression: sky blue → indigo → violet
|
|
7307
7319
|
// linkMain (#60a5fa) → contrast ~6.7:1 on surfaceBackground ✓ (AA)
|
|
7308
7320
|
linkMain: '#60a5fa',
|
|
7309
|
-
linkHover: '#
|
|
7310
|
-
linkActive: '#
|
|
7321
|
+
linkHover: '#818cf8',
|
|
7322
|
+
linkActive: '#c4b5fd',
|
|
7311
7323
|
linkDisabled: '#1e40af',
|
|
7312
7324
|
};
|
|
7313
7325
|
|