@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 +11 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +11 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +7 -3
- package/package.json +92 -92
- package/dist/cjs/index.css +0 -1
- package/dist/esm/index.css +0 -1
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'
|
|
@@ -5888,7 +5893,12 @@ const DrawerItem = ({ startIcon, label, selected = false, endContent, href, onCl
|
|
|
5888
5893
|
e.preventDefault();
|
|
5889
5894
|
return;
|
|
5890
5895
|
}
|
|
5891
|
-
onClick
|
|
5896
|
+
// When an onClick handler is provided (e.g. React Router's navigate),
|
|
5897
|
+
// prevent the browser from following the href and let the handler drive navigation.
|
|
5898
|
+
if (onClick) {
|
|
5899
|
+
e.preventDefault();
|
|
5900
|
+
onClick(e);
|
|
5901
|
+
}
|
|
5892
5902
|
};
|
|
5893
5903
|
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
5904
|
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 }));
|