@aurora-ds/components 0.24.1 → 0.24.3
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 +7 -19
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/utils/ui/components/data-display/status/getStatusColorStyles.utils.d.ts +2 -2
- package/dist/esm/index.js +7 -19
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/utils/ui/components/data-display/status/getStatusColorStyles.utils.d.ts +2 -2
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -374,24 +374,12 @@ const getStatusColorStyles = (theme, color, variant, disabled) => {
|
|
|
374
374
|
};
|
|
375
375
|
return colorMap[color][variant];
|
|
376
376
|
};
|
|
377
|
-
const getStatusTextColor = (
|
|
377
|
+
const getStatusTextColor = (color, disabled) => {
|
|
378
378
|
if (disabled) {
|
|
379
|
-
return
|
|
379
|
+
return 'disabledText';
|
|
380
380
|
}
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
primary: theme.colors.primary,
|
|
384
|
-
success: theme.colors.success,
|
|
385
|
-
warning: theme.colors.warning,
|
|
386
|
-
error: theme.colors.error,
|
|
387
|
-
info: theme.colors.info,
|
|
388
|
-
highlight: theme.colors.highlight,
|
|
389
|
-
accent: theme.colors.accent,
|
|
390
|
-
new: theme.colors.new,
|
|
391
|
-
rose: theme.colors.rose,
|
|
392
|
-
yellow: theme.colors.yellow,
|
|
393
|
-
};
|
|
394
|
-
return colorMap[color];
|
|
381
|
+
// Retourne directement la clé de couleur du thème
|
|
382
|
+
return color;
|
|
395
383
|
};
|
|
396
384
|
|
|
397
385
|
/**
|
|
@@ -480,8 +468,7 @@ const getStatusContentSize = (size) => {
|
|
|
480
468
|
*/
|
|
481
469
|
const Status = ({ label, icon, variant = 'filled', color = 'default', size = 'md', gap, radius, disabled = false, ariaLabel, ariaLabelledBy, ariaDescribedBy, role, tabIndex, }) => {
|
|
482
470
|
const isIconOnly = Boolean(icon) && !label;
|
|
483
|
-
const
|
|
484
|
-
const textColor = getStatusTextColor(theme$1, color, disabled);
|
|
471
|
+
const textColor = getStatusTextColor(color, disabled);
|
|
485
472
|
return (jsxRuntime.jsxs("span", { className: STATUS_STYLES.root({
|
|
486
473
|
variant,
|
|
487
474
|
color,
|
|
@@ -2830,6 +2817,7 @@ const MODAL_STYLES = theme.createStyles((theme) => ({
|
|
|
2830
2817
|
height: 'fit-content',
|
|
2831
2818
|
alignItems: 'flex-start',
|
|
2832
2819
|
gap: theme.spacing.md,
|
|
2820
|
+
border: `1px solid ${theme.colors.border}`,
|
|
2833
2821
|
}),
|
|
2834
2822
|
}));
|
|
2835
2823
|
|
|
@@ -2903,7 +2891,7 @@ const DRAWER_ITEM_STYLES = theme.createStyles((theme) => ({
|
|
|
2903
2891
|
* Similar to a text button with selected state support.
|
|
2904
2892
|
*/
|
|
2905
2893
|
const DrawerItem = ({ label, startIcon, endIcon, selected = false, onClick, disabled, chip, ariaLabel, ariaLabelledBy, ariaDescribedBy, role, tabIndex, }) => {
|
|
2906
|
-
return (jsxRuntime.jsxs("button", { onClick: onClick, disabled: disabled, type: 'button', className: DRAWER_ITEM_STYLES.root({ selected }), "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, role: role, tabIndex: tabIndex, children: [jsxRuntime.jsxs(Stack, { children: [startIcon && (jsxRuntime.jsx(Icon, { children: startIcon })), jsxRuntime.jsx(Text, { variant: 'label', maxLines: 1, children: label }), endIcon && (jsxRuntime.jsx(Icon, { children: endIcon }))] }), chip && !selected && (jsxRuntime.jsx(Status, { ...chip, size: '2xs', color: chip.color ?? 'info', disabled: disabled }))] }));
|
|
2894
|
+
return (jsxRuntime.jsxs("button", { onClick: onClick, disabled: disabled, type: 'button', className: DRAWER_ITEM_STYLES.root({ selected }), "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, role: role, tabIndex: tabIndex, children: [jsxRuntime.jsxs(Stack, { children: [startIcon && (jsxRuntime.jsx(Icon, { color: selected ? 'surface' : 'textSecondary', children: startIcon })), jsxRuntime.jsx(Text, { variant: 'label', maxLines: 1, color: selected ? 'surface' : 'textSecondary', children: label }), endIcon && (jsxRuntime.jsx(Icon, { color: selected ? 'surface' : 'textSecondary', children: endIcon }))] }), chip && !selected && (jsxRuntime.jsx(Status, { ...chip, size: '2xs', color: chip.color ?? 'info', disabled: disabled }))] }));
|
|
2907
2895
|
};
|
|
2908
2896
|
DrawerItem.displayName = 'DrawerItem';
|
|
2909
2897
|
|