@aurora-ds/components 0.15.0 → 0.15.2
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/components/overlay/menu/MenuItem/MenuItem.props.d.ts +3 -0
- package/dist/cjs/constants/globalConstants.d.ts +1 -0
- package/dist/cjs/index.js +8 -2
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/components/overlay/menu/MenuItem/MenuItem.props.d.ts +3 -0
- package/dist/esm/constants/globalConstants.d.ts +1 -0
- package/dist/esm/index.js +8 -2
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +2 -0
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -419,6 +419,7 @@ const Chip = ({ label, icon, variant = 'filled', color = 'default', size = 'md',
|
|
|
419
419
|
Chip.displayName = 'Chip';
|
|
420
420
|
|
|
421
421
|
const BUTTON_SIZE = 36;
|
|
422
|
+
const MENU_ITEM_SIZE = 32;
|
|
422
423
|
const DRAWER_ITEM_HEIGHT = 32;
|
|
423
424
|
const DEFAULT_TRANSITION_DURATION_MS = 150;
|
|
424
425
|
|
|
@@ -1274,6 +1275,8 @@ const MENU_STYLES = theme.createStyles((theme) => ({
|
|
|
1274
1275
|
border: `1px solid ${theme.colors.border}`,
|
|
1275
1276
|
boxShadow: theme.shadows.md,
|
|
1276
1277
|
minWidth: 150,
|
|
1278
|
+
maxHeight: MENU_ITEM_SIZE * 8,
|
|
1279
|
+
overflowY: 'auto',
|
|
1277
1280
|
width,
|
|
1278
1281
|
opacity: isFadingIn ? 1 : 0,
|
|
1279
1282
|
transform: isFadingIn ? 'scale(1)' : 'scale(0.95)',
|
|
@@ -1424,6 +1427,9 @@ const MENU_ITEM_STYLES = theme.createStyles((theme) => ({
|
|
|
1424
1427
|
outline: 'none',
|
|
1425
1428
|
border: 'none',
|
|
1426
1429
|
cursor: 'pointer',
|
|
1430
|
+
minHeight: MENU_ITEM_SIZE,
|
|
1431
|
+
maxHeight: MENU_ITEM_SIZE,
|
|
1432
|
+
flexShrink: 0,
|
|
1427
1433
|
transition: 'background-color 150ms ease-in-out',
|
|
1428
1434
|
':hover': {
|
|
1429
1435
|
backgroundColor: theme.colors.surfaceHover,
|
|
@@ -1431,8 +1437,8 @@ const MENU_ITEM_STYLES = theme.createStyles((theme) => ({
|
|
|
1431
1437
|
},
|
|
1432
1438
|
}));
|
|
1433
1439
|
|
|
1434
|
-
const MenuItem = ({ label, icon, onClick }) => {
|
|
1435
|
-
return (jsxRuntime.jsxs("button", { className: MENU_ITEM_STYLES.root, onClick: onClick, children: [icon && (jsxRuntime.jsx(Icon, { color: 'text', children: icon })), jsxRuntime.jsx(Text, { children: label })] }));
|
|
1440
|
+
const MenuItem = ({ label, icon, onClick, textColor, iconColor }) => {
|
|
1441
|
+
return (jsxRuntime.jsxs("button", { className: MENU_ITEM_STYLES.root, onClick: onClick, children: [icon && (jsxRuntime.jsx(Icon, { color: iconColor ?? 'text', children: icon })), jsxRuntime.jsx(Text, { variant: 'label', color: textColor ?? 'text', maxLines: 1, children: label })] }));
|
|
1436
1442
|
};
|
|
1437
1443
|
MenuItem.displayName = 'MenuItem';
|
|
1438
1444
|
|