@mui/material 9.0.1 → 9.1.0
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/Accordion/Accordion.d.mts +2 -2
- package/Accordion/Accordion.d.ts +2 -2
- package/Accordion/Accordion.js +3 -2
- package/Accordion/Accordion.mjs +3 -2
- package/AccordionSummary/AccordionSummary.js +27 -29
- package/AccordionSummary/AccordionSummary.mjs +27 -29
- package/Autocomplete/Autocomplete.js +8 -6
- package/Autocomplete/Autocomplete.mjs +8 -6
- package/Backdrop/Backdrop.d.mts +2 -2
- package/Backdrop/Backdrop.d.ts +2 -2
- package/Badge/Badge.js +28 -24
- package/Badge/Badge.mjs +28 -24
- package/BottomNavigationAction/BottomNavigationAction.js +6 -2
- package/BottomNavigationAction/BottomNavigationAction.mjs +6 -2
- package/Button/Button.js +11 -15
- package/Button/Button.mjs +11 -15
- package/ButtonBase/Ripple.js +21 -11
- package/ButtonBase/Ripple.mjs +21 -11
- package/ButtonBase/TouchRipple.js +252 -116
- package/ButtonBase/TouchRipple.mjs +253 -117
- package/CHANGELOG.md +84 -0
- package/CardActionArea/CardActionArea.js +2 -1
- package/CardActionArea/CardActionArea.mjs +2 -1
- package/Chip/Chip.js +2 -1
- package/Chip/Chip.mjs +2 -1
- package/CircularProgress/CircularProgress.js +85 -55
- package/CircularProgress/CircularProgress.mjs +84 -55
- package/Collapse/Collapse.d.mts +15 -3
- package/Collapse/Collapse.d.ts +15 -3
- package/Collapse/Collapse.js +44 -31
- package/Collapse/Collapse.mjs +43 -30
- package/Dialog/Dialog.d.mts +2 -2
- package/Dialog/Dialog.d.ts +2 -2
- package/Dialog/Dialog.js +2 -0
- package/Dialog/Dialog.mjs +2 -0
- package/Drawer/Drawer.d.mts +2 -2
- package/Drawer/Drawer.d.ts +2 -2
- package/Fab/Fab.js +2 -1
- package/Fab/Fab.mjs +2 -1
- package/Fade/Fade.d.mts +15 -2
- package/Fade/Fade.d.ts +15 -2
- package/Fade/Fade.js +46 -19
- package/Fade/Fade.mjs +45 -18
- package/FilledInput/FilledInput.js +4 -3
- package/FilledInput/FilledInput.mjs +4 -3
- package/Grow/Grow.d.mts +15 -2
- package/Grow/Grow.d.ts +15 -2
- package/Grow/Grow.js +45 -28
- package/Grow/Grow.mjs +44 -27
- package/IconButton/IconButton.js +2 -1
- package/IconButton/IconButton.mjs +2 -1
- package/Input/Input.js +3 -2
- package/Input/Input.mjs +3 -2
- package/InputBase/InputBase.js +2 -1
- package/InputBase/InputBase.mjs +2 -1
- package/InputLabel/InputLabel.js +2 -1
- package/InputLabel/InputLabel.mjs +2 -1
- package/LICENSE +1 -1
- package/LinearProgress/LinearProgress.js +187 -120
- package/LinearProgress/LinearProgress.mjs +186 -120
- package/ListItem/ListItem.js +2 -1
- package/ListItem/ListItem.mjs +2 -1
- package/ListItemButton/ListItemButton.js +2 -1
- package/ListItemButton/ListItemButton.mjs +2 -1
- package/Menu/Menu.d.mts +1 -1
- package/Menu/Menu.d.ts +1 -1
- package/MobileStepper/MobileStepper.js +2 -1
- package/MobileStepper/MobileStepper.mjs +2 -1
- package/OutlinedInput/NotchedOutline.js +4 -3
- package/OutlinedInput/NotchedOutline.mjs +4 -3
- package/PaginationItem/PaginationItem.js +2 -1
- package/PaginationItem/PaginationItem.mjs +2 -1
- package/Paper/Paper.js +2 -1
- package/Paper/Paper.mjs +2 -1
- package/Popover/Popover.d.mts +1 -1
- package/Popover/Popover.d.ts +1 -1
- package/README.md +3 -2
- package/Radio/RadioButtonIcon.js +3 -2
- package/Radio/RadioButtonIcon.mjs +3 -2
- package/Rating/Rating.js +2 -1
- package/Rating/Rating.mjs +2 -1
- package/Select/SelectInput.js +115 -25
- package/Select/SelectInput.mjs +115 -25
- package/Select/utils/closedTypeahead.js +73 -0
- package/Select/utils/closedTypeahead.mjs +63 -0
- package/Skeleton/Skeleton.js +22 -2
- package/Skeleton/Skeleton.mjs +22 -2
- package/Slide/Slide.d.mts +15 -2
- package/Slide/Slide.d.ts +15 -2
- package/Slide/Slide.js +53 -25
- package/Slide/Slide.mjs +52 -24
- package/Slider/Slider.js +4 -3
- package/Slider/Slider.mjs +4 -3
- package/Slider/useSlider.js +1 -1
- package/Slider/useSlider.mjs +1 -1
- package/Snackbar/Snackbar.d.mts +2 -2
- package/Snackbar/Snackbar.d.ts +2 -2
- package/SpeedDial/SpeedDial.d.mts +1 -1
- package/SpeedDial/SpeedDial.d.ts +1 -1
- package/SpeedDial/SpeedDial.js +6 -2
- package/SpeedDial/SpeedDial.mjs +6 -2
- package/SpeedDialAction/SpeedDialAction.js +11 -2
- package/SpeedDialAction/SpeedDialAction.mjs +12 -3
- package/SpeedDialIcon/SpeedDialIcon.js +40 -37
- package/SpeedDialIcon/SpeedDialIcon.mjs +40 -37
- package/Step/Step.js +47 -15
- package/Step/Step.mjs +47 -15
- package/StepButton/StepButton.js +9 -3
- package/StepButton/StepButton.mjs +9 -3
- package/StepConnector/StepConnector.js +10 -0
- package/StepConnector/StepConnector.mjs +10 -0
- package/StepContent/StepContent.d.mts +2 -2
- package/StepContent/StepContent.d.ts +2 -2
- package/StepContent/StepContent.js +26 -2
- package/StepContent/StepContent.mjs +26 -2
- package/StepIcon/StepIcon.js +2 -1
- package/StepIcon/StepIcon.mjs +2 -1
- package/StepLabel/StepLabel.js +52 -7
- package/StepLabel/StepLabel.mjs +52 -7
- package/Stepper/Stepper.d.mts +2 -0
- package/Stepper/Stepper.d.ts +2 -0
- package/Stepper/Stepper.js +18 -0
- package/Stepper/Stepper.mjs +18 -0
- package/SvgIcon/SvgIcon.js +2 -1
- package/SvgIcon/SvgIcon.mjs +2 -1
- package/SwipeableDrawer/SwipeableDrawer.js +14 -3
- package/SwipeableDrawer/SwipeableDrawer.mjs +14 -3
- package/Switch/Switch.js +3 -2
- package/Switch/Switch.mjs +3 -2
- package/TableSortLabel/TableSortLabel.js +2 -1
- package/TableSortLabel/TableSortLabel.mjs +2 -1
- package/Tabs/Tabs.js +14 -3
- package/Tabs/Tabs.mjs +14 -3
- package/Tooltip/Tooltip.d.mts +2 -2
- package/Tooltip/Tooltip.d.ts +2 -2
- package/Tooltip/Tooltip.js +3 -0
- package/Tooltip/Tooltip.mjs +3 -0
- package/Unstable_TrapFocus/FocusTrap.js +42 -8
- package/Unstable_TrapFocus/FocusTrap.mjs +42 -8
- package/Zoom/Zoom.d.mts +15 -2
- package/Zoom/Zoom.d.ts +15 -2
- package/Zoom/Zoom.js +43 -16
- package/Zoom/Zoom.mjs +42 -15
- package/index.js +1 -1
- package/index.mjs +1 -1
- package/internal/Transition.d.mts +34 -0
- package/internal/Transition.d.ts +34 -0
- package/internal/Transition.js +444 -0
- package/internal/Transition.mjs +436 -0
- package/internal/react-transition-group.d.mts +8 -0
- package/internal/react-transition-group.d.ts +8 -0
- package/package.json +6 -6
- package/styles/createMotion.d.mts +8 -0
- package/styles/createMotion.d.ts +8 -0
- package/styles/createMotion.js +13 -0
- package/styles/createMotion.mjs +7 -0
- package/styles/createThemeFoundation.d.mts +2 -0
- package/styles/createThemeFoundation.d.ts +2 -0
- package/styles/createThemeNoVars.d.mts +3 -0
- package/styles/createThemeNoVars.d.ts +3 -0
- package/styles/createThemeNoVars.js +5 -0
- package/styles/createThemeNoVars.mjs +5 -0
- package/styles/createTransitions.d.mts +6 -2
- package/styles/createTransitions.d.ts +6 -2
- package/styles/createTransitions.js +12 -4
- package/styles/createTransitions.mjs +12 -4
- package/styles/enhanceHighContrast.d.mts +70 -0
- package/styles/enhanceHighContrast.d.ts +70 -0
- package/styles/enhanceHighContrast.js +502 -0
- package/styles/enhanceHighContrast.mjs +495 -0
- package/styles/index.d.mts +2 -0
- package/styles/index.d.ts +2 -0
- package/styles/index.js +8 -0
- package/styles/index.mjs +1 -0
- package/styles/reducedMotion.d.mts +7 -0
- package/styles/reducedMotion.d.ts +7 -0
- package/styles/reducedMotion.js +21 -0
- package/styles/reducedMotion.mjs +14 -0
- package/styles/shouldSkipGeneratingVar.js +1 -1
- package/styles/shouldSkipGeneratingVar.mjs +1 -1
- package/styles/stringifyTheme.js +1 -0
- package/styles/stringifyTheme.mjs +1 -0
- package/transitions/index.d.mts +1 -1
- package/transitions/index.d.ts +1 -1
- package/transitions/index.js +0 -11
- package/transitions/index.mjs +1 -1
- package/transitions/transition.d.mts +1 -12
- package/transitions/transition.d.ts +1 -12
- package/transitions/types.d.mts +73 -0
- package/transitions/types.d.ts +73 -0
- package/transitions/useReducedMotion.d.mts +14 -0
- package/transitions/useReducedMotion.d.ts +14 -0
- package/transitions/useReducedMotion.js +117 -0
- package/transitions/useReducedMotion.mjs +110 -0
- package/transitions/utils.d.mts +34 -2
- package/transitions/utils.d.ts +34 -2
- package/transitions/utils.js +33 -4
- package/transitions/utils.mjs +31 -4
- package/useAutocomplete/useAutocomplete.d.mts +8 -1
- package/useAutocomplete/useAutocomplete.d.ts +8 -1
- package/useAutocomplete/useAutocomplete.js +66 -4
- package/useAutocomplete/useAutocomplete.mjs +66 -4
- package/version/index.js +3 -3
- package/version/index.mjs +3 -3
- /package/transitions/{transition.js → types.js} +0 -0
- /package/transitions/{transition.mjs → types.mjs} +0 -0
|
@@ -18,7 +18,11 @@ export const duration: Duration;
|
|
|
18
18
|
export interface TransitionsOptions {
|
|
19
19
|
easing?: Partial<Easing> | undefined;
|
|
20
20
|
duration?: Partial<Duration> | undefined;
|
|
21
|
-
create?: ((props
|
|
21
|
+
create?: ((props?: string | string[], options?: Partial<{
|
|
22
|
+
duration: number | string;
|
|
23
|
+
easing: string;
|
|
24
|
+
delay: number | string;
|
|
25
|
+
}>) => string) | ((props: string | string[], options?: Partial<{
|
|
22
26
|
duration: number | string;
|
|
23
27
|
easing: string;
|
|
24
28
|
delay: number | string;
|
|
@@ -31,7 +35,7 @@ export interface TransitionsOptions {
|
|
|
31
35
|
* @param props
|
|
32
36
|
* @param options
|
|
33
37
|
*/
|
|
34
|
-
export function create(props
|
|
38
|
+
export function create(props?: string | string[], options?: Partial<{
|
|
35
39
|
duration: number | string;
|
|
36
40
|
easing: string;
|
|
37
41
|
delay: number | string;
|
|
@@ -18,7 +18,11 @@ export const duration: Duration;
|
|
|
18
18
|
export interface TransitionsOptions {
|
|
19
19
|
easing?: Partial<Easing> | undefined;
|
|
20
20
|
duration?: Partial<Duration> | undefined;
|
|
21
|
-
create?: ((props
|
|
21
|
+
create?: ((props?: string | string[], options?: Partial<{
|
|
22
|
+
duration: number | string;
|
|
23
|
+
easing: string;
|
|
24
|
+
delay: number | string;
|
|
25
|
+
}>) => string) | ((props: string | string[], options?: Partial<{
|
|
22
26
|
duration: number | string;
|
|
23
27
|
easing: string;
|
|
24
28
|
delay: number | string;
|
|
@@ -31,7 +35,7 @@ export interface TransitionsOptions {
|
|
|
31
35
|
* @param props
|
|
32
36
|
* @param options
|
|
33
37
|
*/
|
|
34
|
-
export function create(props
|
|
38
|
+
export function create(props?: string | string[], options?: Partial<{
|
|
35
39
|
duration: number | string;
|
|
36
40
|
easing: string;
|
|
37
41
|
delay: number | string;
|
|
@@ -5,6 +5,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = createTransitions;
|
|
7
7
|
exports.easing = exports.duration = void 0;
|
|
8
|
+
const DEFAULT_TRANSITION_PROPS = ['all'];
|
|
9
|
+
const EMPTY_OPTIONS = {};
|
|
10
|
+
|
|
8
11
|
// Follow https://material.google.com/motion/duration-easing.html#duration-easing-natural-easing-curves
|
|
9
12
|
// to learn the context in which each easing should be used.
|
|
10
13
|
const easing = exports.easing = {
|
|
@@ -47,15 +50,19 @@ function getAutoHeightDuration(height) {
|
|
|
47
50
|
return Math.min(Math.round((4 + 15 * constant ** 0.25 + constant / 5) * 10), 3000);
|
|
48
51
|
}
|
|
49
52
|
function createTransitions(inputTransitions) {
|
|
53
|
+
const transitions = {
|
|
54
|
+
...inputTransitions
|
|
55
|
+
};
|
|
56
|
+
delete transitions.reducedMotion;
|
|
50
57
|
const mergedEasing = {
|
|
51
58
|
...easing,
|
|
52
|
-
...
|
|
59
|
+
...transitions.easing
|
|
53
60
|
};
|
|
54
61
|
const mergedDuration = {
|
|
55
62
|
...duration,
|
|
56
|
-
...
|
|
63
|
+
...transitions.duration
|
|
57
64
|
};
|
|
58
|
-
const
|
|
65
|
+
const createTransitionValue = (props = DEFAULT_TRANSITION_PROPS, options = EMPTY_OPTIONS) => {
|
|
59
66
|
const {
|
|
60
67
|
duration: durationOption = mergedDuration.standard,
|
|
61
68
|
easing: easingOption = mergedEasing.easeInOut,
|
|
@@ -86,10 +93,11 @@ function createTransitions(inputTransitions) {
|
|
|
86
93
|
}
|
|
87
94
|
return (Array.isArray(props) ? props : [props]).map(animatedProp => `${animatedProp} ${typeof durationOption === 'string' ? durationOption : formatMs(durationOption)} ${easingOption} ${typeof delay === 'string' ? delay : formatMs(delay)}`).join(',');
|
|
88
95
|
};
|
|
96
|
+
const create = transitions.create ?? createTransitionValue;
|
|
89
97
|
return {
|
|
90
98
|
getAutoHeightDuration,
|
|
91
99
|
create,
|
|
92
|
-
...
|
|
100
|
+
...transitions,
|
|
93
101
|
easing: mergedEasing,
|
|
94
102
|
duration: mergedDuration
|
|
95
103
|
};
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
const DEFAULT_TRANSITION_PROPS = ['all'];
|
|
2
|
+
const EMPTY_OPTIONS = {};
|
|
3
|
+
|
|
1
4
|
// Follow https://material.google.com/motion/duration-easing.html#duration-easing-natural-easing-curves
|
|
2
5
|
// to learn the context in which each easing should be used.
|
|
3
6
|
export const easing = {
|
|
@@ -40,15 +43,19 @@ function getAutoHeightDuration(height) {
|
|
|
40
43
|
return Math.min(Math.round((4 + 15 * constant ** 0.25 + constant / 5) * 10), 3000);
|
|
41
44
|
}
|
|
42
45
|
export default function createTransitions(inputTransitions) {
|
|
46
|
+
const transitions = {
|
|
47
|
+
...inputTransitions
|
|
48
|
+
};
|
|
49
|
+
delete transitions.reducedMotion;
|
|
43
50
|
const mergedEasing = {
|
|
44
51
|
...easing,
|
|
45
|
-
...
|
|
52
|
+
...transitions.easing
|
|
46
53
|
};
|
|
47
54
|
const mergedDuration = {
|
|
48
55
|
...duration,
|
|
49
|
-
...
|
|
56
|
+
...transitions.duration
|
|
50
57
|
};
|
|
51
|
-
const
|
|
58
|
+
const createTransitionValue = (props = DEFAULT_TRANSITION_PROPS, options = EMPTY_OPTIONS) => {
|
|
52
59
|
const {
|
|
53
60
|
duration: durationOption = mergedDuration.standard,
|
|
54
61
|
easing: easingOption = mergedEasing.easeInOut,
|
|
@@ -79,10 +86,11 @@ export default function createTransitions(inputTransitions) {
|
|
|
79
86
|
}
|
|
80
87
|
return (Array.isArray(props) ? props : [props]).map(animatedProp => `${animatedProp} ${typeof durationOption === 'string' ? durationOption : formatMs(durationOption)} ${easingOption} ${typeof delay === 'string' ? delay : formatMs(delay)}`).join(',');
|
|
81
88
|
};
|
|
89
|
+
const create = transitions.create ?? createTransitionValue;
|
|
82
90
|
return {
|
|
83
91
|
getAutoHeightDuration,
|
|
84
92
|
create,
|
|
85
|
-
...
|
|
93
|
+
...transitions,
|
|
86
94
|
easing: mergedEasing,
|
|
87
95
|
duration: mergedDuration
|
|
88
96
|
};
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { Theme } from "./createTheme.mjs";
|
|
2
|
+
export interface HighContrastTokens {
|
|
3
|
+
/**
|
|
4
|
+
* Color for disabled elements.
|
|
5
|
+
* @default 'GrayText'
|
|
6
|
+
*/
|
|
7
|
+
disabled?: string | undefined;
|
|
8
|
+
/**
|
|
9
|
+
* Color for error states.
|
|
10
|
+
* @default 'ActiveText'
|
|
11
|
+
*/
|
|
12
|
+
error?: string | undefined;
|
|
13
|
+
/**
|
|
14
|
+
* Background color for selected items.
|
|
15
|
+
* @default 'SelectedItem'
|
|
16
|
+
*/
|
|
17
|
+
selectedBackground?: string | undefined;
|
|
18
|
+
/**
|
|
19
|
+
* Text color on selected items.
|
|
20
|
+
* @default 'SelectedItemText'
|
|
21
|
+
*/
|
|
22
|
+
selectedText?: string | undefined;
|
|
23
|
+
/**
|
|
24
|
+
* Background color for active/toggled controls.
|
|
25
|
+
* @default 'Highlight'
|
|
26
|
+
*/
|
|
27
|
+
activeBackground?: string | undefined;
|
|
28
|
+
/**
|
|
29
|
+
* Text color on active/toggled controls.
|
|
30
|
+
* @default 'HighlightText'
|
|
31
|
+
*/
|
|
32
|
+
activeText?: string | undefined;
|
|
33
|
+
/**
|
|
34
|
+
* Border color for interactive controls.
|
|
35
|
+
* @default 'ButtonBorder'
|
|
36
|
+
*/
|
|
37
|
+
buttonBorder?: string | undefined;
|
|
38
|
+
/**
|
|
39
|
+
* Text/icon color on buttons.
|
|
40
|
+
* @default 'ButtonText'
|
|
41
|
+
*/
|
|
42
|
+
buttonText?: string | undefined;
|
|
43
|
+
/**
|
|
44
|
+
* Background color for the page/canvas.
|
|
45
|
+
* @default 'Canvas'
|
|
46
|
+
*/
|
|
47
|
+
canvas?: string | undefined;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Enhances a theme with styles for Windows High Contrast Mode (forced-colors).
|
|
51
|
+
*
|
|
52
|
+
* Accepts a fully-created theme, merges in HCM component overrides using arrays
|
|
53
|
+
* so that Emotion emits each entry as a separate CSS rule and the browser
|
|
54
|
+
* cascade (rather than JS object merging) resolves specificity.
|
|
55
|
+
*
|
|
56
|
+
* @param themeInput - The theme to enhance.
|
|
57
|
+
* @param tokens - Override any of the default system color tokens.
|
|
58
|
+
* @returns The enhanced theme (same type as the input).
|
|
59
|
+
*
|
|
60
|
+
* @example
|
|
61
|
+
* // Use defaults
|
|
62
|
+
* const theme = enhanceHighContrast(createTheme({ palette: { ... } }));
|
|
63
|
+
*
|
|
64
|
+
* @example
|
|
65
|
+
* // Override specific tokens
|
|
66
|
+
* const theme = enhanceHighContrast(createTheme(), { disabled: 'ButtonText' });
|
|
67
|
+
*/
|
|
68
|
+
export default function enhanceHighContrast<T extends {
|
|
69
|
+
components?: Theme['components'] | undefined;
|
|
70
|
+
}>(themeInput: T, tokens?: HighContrastTokens): T;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { Theme } from "./createTheme.js";
|
|
2
|
+
export interface HighContrastTokens {
|
|
3
|
+
/**
|
|
4
|
+
* Color for disabled elements.
|
|
5
|
+
* @default 'GrayText'
|
|
6
|
+
*/
|
|
7
|
+
disabled?: string | undefined;
|
|
8
|
+
/**
|
|
9
|
+
* Color for error states.
|
|
10
|
+
* @default 'ActiveText'
|
|
11
|
+
*/
|
|
12
|
+
error?: string | undefined;
|
|
13
|
+
/**
|
|
14
|
+
* Background color for selected items.
|
|
15
|
+
* @default 'SelectedItem'
|
|
16
|
+
*/
|
|
17
|
+
selectedBackground?: string | undefined;
|
|
18
|
+
/**
|
|
19
|
+
* Text color on selected items.
|
|
20
|
+
* @default 'SelectedItemText'
|
|
21
|
+
*/
|
|
22
|
+
selectedText?: string | undefined;
|
|
23
|
+
/**
|
|
24
|
+
* Background color for active/toggled controls.
|
|
25
|
+
* @default 'Highlight'
|
|
26
|
+
*/
|
|
27
|
+
activeBackground?: string | undefined;
|
|
28
|
+
/**
|
|
29
|
+
* Text color on active/toggled controls.
|
|
30
|
+
* @default 'HighlightText'
|
|
31
|
+
*/
|
|
32
|
+
activeText?: string | undefined;
|
|
33
|
+
/**
|
|
34
|
+
* Border color for interactive controls.
|
|
35
|
+
* @default 'ButtonBorder'
|
|
36
|
+
*/
|
|
37
|
+
buttonBorder?: string | undefined;
|
|
38
|
+
/**
|
|
39
|
+
* Text/icon color on buttons.
|
|
40
|
+
* @default 'ButtonText'
|
|
41
|
+
*/
|
|
42
|
+
buttonText?: string | undefined;
|
|
43
|
+
/**
|
|
44
|
+
* Background color for the page/canvas.
|
|
45
|
+
* @default 'Canvas'
|
|
46
|
+
*/
|
|
47
|
+
canvas?: string | undefined;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Enhances a theme with styles for Windows High Contrast Mode (forced-colors).
|
|
51
|
+
*
|
|
52
|
+
* Accepts a fully-created theme, merges in HCM component overrides using arrays
|
|
53
|
+
* so that Emotion emits each entry as a separate CSS rule and the browser
|
|
54
|
+
* cascade (rather than JS object merging) resolves specificity.
|
|
55
|
+
*
|
|
56
|
+
* @param themeInput - The theme to enhance.
|
|
57
|
+
* @param tokens - Override any of the default system color tokens.
|
|
58
|
+
* @returns The enhanced theme (same type as the input).
|
|
59
|
+
*
|
|
60
|
+
* @example
|
|
61
|
+
* // Use defaults
|
|
62
|
+
* const theme = enhanceHighContrast(createTheme({ palette: { ... } }));
|
|
63
|
+
*
|
|
64
|
+
* @example
|
|
65
|
+
* // Override specific tokens
|
|
66
|
+
* const theme = enhanceHighContrast(createTheme(), { disabled: 'ButtonText' });
|
|
67
|
+
*/
|
|
68
|
+
export default function enhanceHighContrast<T extends {
|
|
69
|
+
components?: Theme['components'] | undefined;
|
|
70
|
+
}>(themeInput: T, tokens?: HighContrastTokens): T;
|