@mui/codemod 6.0.0-alpha.1 → 6.0.0-alpha.10
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/README.md +713 -2
- package/node/deprecations/accordion-props/accordion-props.js +11 -71
- package/node/deprecations/accordion-props/test-cases/actual.js +22 -3
- package/node/deprecations/accordion-props/test-cases/expected.js +23 -5
- package/node/deprecations/accordion-props/test-cases/theme.actual.js +24 -0
- package/node/deprecations/accordion-props/test-cases/theme.expected.js +25 -0
- package/node/deprecations/alert-props/test-cases/expected.js +12 -4
- package/node/deprecations/alert-props/test-cases/theme.expected.js +12 -5
- package/node/deprecations/all/deprecations-all.js +36 -8
- package/node/deprecations/all/postcss.config.js +10 -1
- package/node/deprecations/autocomplete-props/autocomplete-props.js +54 -0
- package/node/deprecations/autocomplete-props/index.js +13 -0
- package/node/deprecations/autocomplete-props/test-cases/actual.js +97 -0
- package/node/deprecations/autocomplete-props/test-cases/expected.js +103 -0
- package/node/deprecations/autocomplete-props/test-cases/theme.actual.js +65 -0
- package/node/deprecations/autocomplete-props/test-cases/theme.expected.js +69 -0
- package/node/deprecations/avatar-group-props/avatar-group-props.js +87 -0
- package/node/deprecations/avatar-group-props/index.js +13 -0
- package/node/deprecations/avatar-group-props/test-cases/actual.js +56 -0
- package/node/deprecations/avatar-group-props/test-cases/expected.js +58 -0
- package/node/deprecations/avatar-group-props/test-cases/theme.actual.js +48 -0
- package/node/deprecations/avatar-group-props/test-cases/theme.expected.js +50 -0
- package/node/deprecations/avatar-props/avatar-props.js +5 -39
- package/node/deprecations/avatar-props/test-cases/actual.js +10 -0
- package/node/deprecations/avatar-props/test-cases/expected.js +12 -0
- package/node/deprecations/avatar-props/test-cases/theme.actual.js +14 -0
- package/node/deprecations/avatar-props/test-cases/theme.expected.js +16 -0
- package/node/deprecations/backdrop-props/backdrop-props.js +8 -59
- package/node/deprecations/backdrop-props/test-cases/actual.js +56 -8
- package/node/deprecations/backdrop-props/test-cases/expected.js +52 -9
- package/node/deprecations/backdrop-props/test-cases/theme.actual.js +65 -0
- package/node/deprecations/backdrop-props/test-cases/theme.expected.js +63 -2
- package/node/deprecations/badge-props/test-cases/expected.js +12 -5
- package/node/deprecations/badge-props/test-cases/theme.expected.js +12 -5
- package/node/deprecations/circular-progress-classes/circular-progress-classes.js +77 -0
- package/node/deprecations/circular-progress-classes/index.js +13 -0
- package/node/deprecations/circular-progress-classes/postcss-plugin.js +33 -0
- package/node/deprecations/circular-progress-classes/postcss.config.js +8 -0
- package/node/deprecations/circular-progress-classes/test-cases/actual.js +7 -0
- package/node/deprecations/circular-progress-classes/test-cases/expected.js +7 -0
- package/node/deprecations/divider-props/divider-props.js +36 -30
- package/node/deprecations/divider-props/test-cases/actual.js +3 -0
- package/node/deprecations/divider-props/test-cases/expected.js +3 -0
- package/node/deprecations/divider-props/test-cases/theme.actual.js +7 -0
- package/node/deprecations/divider-props/test-cases/theme.expected.js +7 -0
- package/node/deprecations/filled-input-props/filled-input-props.js +22 -0
- package/node/deprecations/filled-input-props/index.js +13 -0
- package/node/deprecations/filled-input-props/test-cases/actual.js +60 -0
- package/node/deprecations/filled-input-props/test-cases/expected.js +52 -0
- package/node/deprecations/filled-input-props/test-cases/theme.actual.js +73 -0
- package/node/deprecations/filled-input-props/test-cases/theme.expected.js +65 -0
- package/node/deprecations/form-control-label-props/form-control-label-props.js +22 -0
- package/node/deprecations/form-control-label-props/index.js +13 -0
- package/node/deprecations/form-control-label-props/test-cases/actual.js +21 -0
- package/node/deprecations/form-control-label-props/test-cases/expected.js +21 -0
- package/node/deprecations/form-control-label-props/test-cases/theme.actual.js +23 -0
- package/node/deprecations/form-control-label-props/test-cases/theme.expected.js +23 -0
- package/node/deprecations/grid-props/grid-props.js +51 -0
- package/node/deprecations/grid-props/index.js +13 -0
- package/node/deprecations/grid-props/test-cases/actual.js +25 -0
- package/node/deprecations/grid-props/test-cases/expected.js +23 -0
- package/node/deprecations/grid-props/test-cases/theme.actual.js +24 -0
- package/node/deprecations/grid-props/test-cases/theme.expected.js +23 -0
- package/node/deprecations/input-base-props/index.js +13 -0
- package/node/deprecations/input-base-props/input-base-props.js +22 -0
- package/node/deprecations/input-base-props/test-cases/actual.js +60 -0
- package/node/deprecations/input-base-props/test-cases/expected.js +52 -0
- package/node/deprecations/input-base-props/test-cases/theme.actual.js +73 -0
- package/node/deprecations/input-base-props/test-cases/theme.expected.js +65 -0
- package/node/deprecations/input-props/index.js +13 -0
- package/node/deprecations/input-props/input-props.js +22 -0
- package/node/deprecations/input-props/test-cases/actual.js +60 -0
- package/node/deprecations/input-props/test-cases/expected.js +52 -0
- package/node/deprecations/input-props/test-cases/theme.actual.js +73 -0
- package/node/deprecations/input-props/test-cases/theme.expected.js +65 -0
- package/node/deprecations/list-item-props/index.js +13 -0
- package/node/deprecations/list-item-props/list-item-props.js +22 -0
- package/node/deprecations/list-item-props/test-cases/actual.js +43 -0
- package/node/deprecations/list-item-props/test-cases/expected.js +40 -0
- package/node/deprecations/list-item-props/test-cases/theme.actual.js +56 -0
- package/node/deprecations/list-item-props/test-cases/theme.expected.js +53 -0
- package/node/deprecations/modal-props/index.js +13 -0
- package/node/deprecations/modal-props/modal-props.js +22 -0
- package/node/deprecations/modal-props/test-cases/actual.js +43 -0
- package/node/deprecations/modal-props/test-cases/expected.js +40 -0
- package/node/deprecations/modal-props/test-cases/theme.actual.js +56 -0
- package/node/deprecations/modal-props/test-cases/theme.expected.js +53 -0
- package/node/deprecations/outlined-input-props/index.js +13 -0
- package/node/deprecations/outlined-input-props/outlined-input-props.js +22 -0
- package/node/deprecations/outlined-input-props/test-cases/actual.js +60 -0
- package/node/deprecations/outlined-input-props/test-cases/expected.js +52 -0
- package/node/deprecations/outlined-input-props/test-cases/theme.actual.js +73 -0
- package/node/deprecations/outlined-input-props/test-cases/theme.expected.js +65 -0
- package/node/deprecations/pagination-item-props/index.js +13 -0
- package/node/deprecations/pagination-item-props/pagination-item-props.js +22 -0
- package/node/deprecations/pagination-item-props/test-cases/actual.js +27 -0
- package/node/deprecations/pagination-item-props/test-cases/expected.js +21 -0
- package/node/deprecations/pagination-item-props/test-cases/theme.actual.js +28 -0
- package/node/deprecations/pagination-item-props/test-cases/theme.expected.js +26 -0
- package/node/deprecations/popper-props/index.js +13 -0
- package/node/deprecations/popper-props/popper-props.js +22 -0
- package/node/deprecations/popper-props/test-cases/actual.js +27 -0
- package/node/deprecations/popper-props/test-cases/expected.js +24 -0
- package/node/deprecations/popper-props/test-cases/theme.actual.js +32 -0
- package/node/deprecations/popper-props/test-cases/theme.expected.js +29 -0
- package/node/deprecations/slider-props/test-cases/expected.js +12 -4
- package/node/deprecations/slider-props/test-cases/theme.expected.js +12 -5
- package/node/deprecations/speed-dial-props/index.js +13 -0
- package/node/deprecations/speed-dial-props/speed-dial-props.js +31 -0
- package/node/deprecations/speed-dial-props/test-cases/actual.js +41 -0
- package/node/deprecations/speed-dial-props/test-cases/expected.js +54 -0
- package/node/deprecations/speed-dial-props/test-cases/theme.actual.js +33 -0
- package/node/deprecations/speed-dial-props/test-cases/theme.expected.js +40 -0
- package/node/deprecations/step-connector-classes/index.js +13 -0
- package/node/deprecations/step-connector-classes/postcss-plugin.js +33 -0
- package/node/deprecations/step-connector-classes/postcss.config.js +8 -0
- package/node/deprecations/step-connector-classes/step-connector-classes.js +77 -0
- package/node/deprecations/step-connector-classes/test-cases/actual.js +7 -0
- package/node/deprecations/step-connector-classes/test-cases/expected.js +7 -0
- package/node/deprecations/step-label-props/step-label-props.js +14 -0
- package/node/deprecations/step-label-props/test-cases/actual.js +23 -0
- package/node/deprecations/step-label-props/test-cases/expected.js +31 -2
- package/node/deprecations/step-label-props/test-cases/theme.actual.js +22 -0
- package/node/deprecations/step-label-props/test-cases/theme.expected.js +32 -3
- package/node/deprecations/text-field-props/index.js +13 -0
- package/node/deprecations/text-field-props/test-cases/actual.js +27 -0
- package/node/deprecations/text-field-props/test-cases/expected.js +31 -0
- package/node/deprecations/text-field-props/test-cases/theme.actual.js +13 -0
- package/node/deprecations/text-field-props/test-cases/theme.expected.js +15 -0
- package/node/deprecations/text-field-props/text-field-props.js +48 -0
- package/node/deprecations/toggle-button-group-classes/index.js +13 -0
- package/node/deprecations/toggle-button-group-classes/postcss-plugin.js +33 -0
- package/node/deprecations/toggle-button-group-classes/postcss.config.js +8 -0
- package/node/deprecations/toggle-button-group-classes/test-cases/actual.js +7 -0
- package/node/deprecations/toggle-button-group-classes/test-cases/expected.js +7 -0
- package/node/deprecations/toggle-button-group-classes/toggle-button-group-classes.js +77 -0
- package/node/deprecations/tooltip-props/index.js +13 -0
- package/node/deprecations/tooltip-props/test-cases/actual.js +92 -0
- package/node/deprecations/tooltip-props/test-cases/expected.js +84 -0
- package/node/deprecations/tooltip-props/test-cases/theme.actual.js +73 -0
- package/node/deprecations/tooltip-props/test-cases/theme.expected.js +65 -0
- package/node/deprecations/tooltip-props/tooltip-props.js +22 -0
- package/node/deprecations/utils/movePropIntoSlotProps.js +111 -0
- package/node/deprecations/utils/movePropIntoSlots.js +101 -0
- package/node/deprecations/utils/replaceComponentsWithSlots.js +29 -17
- package/node/util/getReturnExpression.js +20 -0
- package/node/util/migrateToVariants.js +549 -0
- package/node/v5.0.0/badge-overlap-value.test/actual.js +3 -4
- package/node/v5.0.0/badge-overlap-value.test/expected.js +3 -4
- package/node/v5.0.0/base-remove-component-prop.test/actual.js +4 -4
- package/node/v5.0.0/base-remove-component-prop.test/expected.js +4 -4
- package/node/v5.0.0/base-remove-unstyled-suffix.js +4 -4
- package/node/v5.0.0/box-sx-prop.test/actual.js +4 -4
- package/node/v5.0.0/box-sx-prop.test/expected.js +3 -3
- package/node/v5.0.0/create-theme.test/custom-fn.actual.js +3 -4
- package/node/v5.0.0/create-theme.test/custom-fn.expected.js +3 -4
- package/node/v5.0.0/jss-to-styled.test/first.actual.js +11 -14
- package/node/v5.0.0/jss-to-styled.test/first.expected.js +11 -14
- package/node/v5.0.0/jss-to-styled.test/seventh.actual.js +4 -4
- package/node/v5.0.0/jss-to-styled.test/seventh.expected.js +4 -4
- package/node/v5.0.0/jss-to-styled.test/sixth.actual.js +3 -3
- package/node/v5.0.0/jss-to-styled.test/sixth.expected.js +3 -3
- package/node/v5.0.0/jss-to-styled.test/withCreateStyles.actual.js +3 -3
- package/node/v5.0.0/jss-to-styled.test/withCreateStyles.expected.js +3 -4
- package/node/v5.0.0/jss-to-styled.test/withCreateStyles1.actual.js +3 -3
- package/node/v5.0.0/jss-to-styled.test/withCreateStyles1.expected.js +3 -4
- package/node/v5.0.0/jss-to-styled.test/withCreateStyles2.actual.js +3 -3
- package/node/v5.0.0/jss-to-styled.test/withCreateStyles2.expected.js +3 -4
- package/node/v5.0.0/jss-to-styled.test/withCreateStyles3.actual.js +3 -3
- package/node/v5.0.0/jss-to-styled.test/withCreateStyles3.expected.js +3 -4
- package/node/v5.0.0/jss-to-tss-react.test/actual-mixins-pattern.js +6 -5
- package/node/v5.0.0/jss-to-tss-react.test/expected-mixins-pattern.js +6 -5
- package/node/v5.0.0/preset-safe.test/actual.js +6 -4
- package/node/v5.0.0/preset-safe.test/expected.js +9 -6
- package/node/v5.0.0/styled-engine-provider.test/theme-provider.expected.js +3 -3
- package/node/v5.0.0/table-props.test/actual.js +4 -5
- package/node/v5.0.0/table-props.test/expected.js +4 -5
- package/node/v5.0.0/theme-spacing.test/large-actual.js +10 -10
- package/node/v5.0.0/theme-spacing.test/large-expected.js +10 -10
- package/node/v5.0.0/variant-prop.test/actual.js +12 -6
- package/node/v5.0.0/variant-prop.test/expected.js +15 -12
- package/node/v5.0.0/with-mobile-dialog.test/expected.js +6 -5
- package/node/v5.0.0/with-width.test/expected.js +6 -5
- package/node/v6.0.0/styled/index.js +13 -0
- package/node/v6.0.0/styled/styled-v6.js +80 -0
- package/node/v6.0.0/styled/test-cases/BasicStyled.actual.js +89 -0
- package/node/v6.0.0/styled/test-cases/BasicStyled.expected.js +143 -0
- package/node/v6.0.0/styled/test-cases/ConditionalStyled.actual.js +152 -0
- package/node/v6.0.0/styled/test-cases/ConditionalStyled.expected.js +244 -0
- package/node/v6.0.0/styled/test-cases/LogicalStyled.actual.js +28 -0
- package/node/v6.0.0/styled/test-cases/LogicalStyled.expected.js +52 -0
- package/node/v6.0.0/styled/test-cases/NestedSpread.actual.js +48 -0
- package/node/v6.0.0/styled/test-cases/NestedSpread.expected.js +86 -0
- package/node/v6.0.0/styled/test-cases/ObjectMap.actual.js +36 -0
- package/node/v6.0.0/styled/test-cases/ObjectMap.expected.js +109 -0
- package/node/v6.0.0/styled/test-cases/ThemePaletteMode.actual.js +62 -0
- package/node/v6.0.0/styled/test-cases/ThemePaletteMode.expected.js +78 -0
- package/node/v6.0.0/styled/test-cases/VariantAndModeStyled.actual.js +12 -0
- package/node/v6.0.0/styled/test-cases/VariantAndModeStyled.expected.js +19 -0
- package/node/v6.0.0/sx-prop/index.js +13 -0
- package/node/v6.0.0/sx-prop/sx-v6.js +355 -0
- package/node/v6.0.0/sx-prop/test-cases/basic-sx.actual.js +36 -0
- package/node/v6.0.0/sx-prop/test-cases/basic-sx.expected.js +46 -0
- package/node/v6.0.0/sx-prop/test-cases/sx-css-vars.actual.js +41 -0
- package/node/v6.0.0/sx-prop/test-cases/sx-css-vars.expected.js +71 -0
- package/node/v6.0.0/sx-prop/test-cases/sx-dynamic.actual.js +87 -0
- package/node/v6.0.0/sx-prop/test-cases/sx-dynamic.expected.js +102 -0
- package/node/v6.0.0/sx-prop/test-cases/sx-dynamic2.actual.js +49 -0
- package/node/v6.0.0/sx-prop/test-cases/sx-dynamic2.expected.js +64 -0
- package/node/v6.0.0/system-props/index.js +13 -0
- package/node/v6.0.0/system-props/removeSystemProps.js +242 -0
- package/node/v6.0.0/system-props/test-cases/system-props.actual.js +79 -0
- package/node/v6.0.0/system-props/test-cases/system-props.expected.js +92 -0
- package/node/v6.0.0/theme-v6/index.js +13 -0
- package/node/v6.0.0/theme-v6/test-cases/basicTheme.actual.js +559 -0
- package/node/v6.0.0/theme-v6/test-cases/basicTheme.expected.js +644 -0
- package/node/v6.0.0/theme-v6/test-cases/themeVariants.actual.js +65 -0
- package/node/v6.0.0/theme-v6/test-cases/themeVariants.expected.js +74 -0
- package/node/v6.0.0/theme-v6/theme-v6.js +87 -0
- package/package.json +8 -8
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
4
|
+
const LinearProgressBar1 = styled('span', {
|
|
5
|
+
name: 'MuiLinearProgress',
|
|
6
|
+
slot: 'Bar1',
|
|
7
|
+
overridesResolver: (props, styles) => {
|
|
8
|
+
const {
|
|
9
|
+
ownerState
|
|
10
|
+
} = props;
|
|
11
|
+
return [styles.bar, styles[`barColor${capitalize(ownerState.color)}`], (ownerState.variant === 'indeterminate' || ownerState.variant === 'query') && styles.bar1Indeterminate, ownerState.variant === 'determinate' && styles.bar1Determinate, ownerState.variant === 'buffer' && styles.bar1Buffer];
|
|
12
|
+
}
|
|
13
|
+
})(({
|
|
14
|
+
ownerState,
|
|
15
|
+
theme
|
|
16
|
+
}) => ({
|
|
17
|
+
...(ownerState.variant === 'buffer' && {
|
|
18
|
+
backgroundColor: ownerState.color !== 'normal' ? 'currentColor' : (theme.vars || theme).palette[ownerState.color].light,
|
|
19
|
+
'&:hover': {
|
|
20
|
+
...(ownerState.color !== 'inherit' ? {
|
|
21
|
+
backgroundColor: (theme.vars || theme).palette[ownerState.color].dark
|
|
22
|
+
} : {
|
|
23
|
+
backgroundColor: 'currentColor'
|
|
24
|
+
})
|
|
25
|
+
}
|
|
26
|
+
}),
|
|
27
|
+
...(ownerState.variant !== 'buffer' && {
|
|
28
|
+
backgroundColor: ownerState.color === 'inherit' ? 'currentColor' : (theme.vars || theme).palette[ownerState.color].main
|
|
29
|
+
})
|
|
30
|
+
}));
|
|
31
|
+
const ExpandMore = styled(props => {
|
|
32
|
+
const {
|
|
33
|
+
expand,
|
|
34
|
+
...other
|
|
35
|
+
} = props;
|
|
36
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(IconButton, {
|
|
37
|
+
...other
|
|
38
|
+
});
|
|
39
|
+
})(({
|
|
40
|
+
theme,
|
|
41
|
+
expand
|
|
42
|
+
}) => ({
|
|
43
|
+
transform: !expand ? 'rotate(0deg)' : 'rotate(180deg)',
|
|
44
|
+
marginLeft: 'auto',
|
|
45
|
+
transition: theme.transitions.create('transform', {
|
|
46
|
+
duration: theme.transitions.duration.shortest
|
|
47
|
+
})
|
|
48
|
+
}));
|
|
49
|
+
const Main = styled('main', {
|
|
50
|
+
shouldForwardProp: prop => prop !== 'disableToc'
|
|
51
|
+
})(({
|
|
52
|
+
disableToc,
|
|
53
|
+
theme
|
|
54
|
+
}) => ({
|
|
55
|
+
minHeight: '100vh',
|
|
56
|
+
display: 'grid',
|
|
57
|
+
width: '100%',
|
|
58
|
+
...(disableToc ? {
|
|
59
|
+
[theme.breakpoints.up('md')]: {
|
|
60
|
+
marginRight: TOC_WIDTH / 2
|
|
61
|
+
}
|
|
62
|
+
} : {
|
|
63
|
+
[theme.breakpoints.up('md')]: {
|
|
64
|
+
gridTemplateColumns: `1fr ${TOC_WIDTH}px`
|
|
65
|
+
}
|
|
66
|
+
}),
|
|
67
|
+
'& .markdown-body .comment-link': {
|
|
68
|
+
display: 'flex'
|
|
69
|
+
}
|
|
70
|
+
}));
|
|
71
|
+
const StyledAppContainer = styled(AppContainer, {
|
|
72
|
+
shouldForwardProp: prop => prop !== 'disableAd' && prop !== 'hasTabs' && prop !== 'disableToc'
|
|
73
|
+
})(({
|
|
74
|
+
disableAd,
|
|
75
|
+
hasTabs,
|
|
76
|
+
disableToc,
|
|
77
|
+
theme
|
|
78
|
+
}) => {
|
|
79
|
+
return {
|
|
80
|
+
position: 'relative',
|
|
81
|
+
// By default, a grid item cannot be smaller than the size of its content.
|
|
82
|
+
// https://stackoverflow.com/questions/43311943/prevent-content-from-expanding-grid-items
|
|
83
|
+
minWidth: 0,
|
|
84
|
+
...(disableToc ? {
|
|
85
|
+
// 105ch ≈ 930px
|
|
86
|
+
maxWidth: `calc(105ch + ${TOC_WIDTH / 2}px)`
|
|
87
|
+
} : {
|
|
88
|
+
// We're mostly hosting text content so max-width by px does not make sense considering font-size is system-adjustable.
|
|
89
|
+
fontFamily: 'Arial',
|
|
90
|
+
// 105ch ≈ 930px
|
|
91
|
+
maxWidth: '105ch'
|
|
92
|
+
}),
|
|
93
|
+
...(!disableAd && {
|
|
94
|
+
...(hasTabs ? {
|
|
95
|
+
'&& .component-tabs .MuiTabs-root': {
|
|
96
|
+
// 40px matches MarkdownElement h2 margin-top.
|
|
97
|
+
marginBottom: `calc(${theme.spacing(AD_MARGIN_TOP)} + ${AD_HEIGHT_MOBILE}px + 40px)`,
|
|
98
|
+
[theme.breakpoints.up('sm')]: {
|
|
99
|
+
marginBottom: `calc(${theme.spacing(AD_MARGIN_TOP)} + ${AD_HEIGHT}px + 40px)`
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
'&& .component-tabs.ad .MuiTabs-root': {
|
|
103
|
+
marginBottom: 0
|
|
104
|
+
}
|
|
105
|
+
} : {
|
|
106
|
+
'&& .description': {
|
|
107
|
+
marginBottom: theme.spacing(AD_MARGIN_BOTTOM),
|
|
108
|
+
paddingBottom: `calc(${theme.spacing(AD_MARGIN_TOP)} + ${AD_HEIGHT_MOBILE}px)`,
|
|
109
|
+
[theme.breakpoints.up('sm')]: {
|
|
110
|
+
paddingBottom: `calc(${theme.spacing(AD_MARGIN_TOP)} + ${AD_HEIGHT}px)`
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
'&& .description.ad': {
|
|
114
|
+
paddingBottom: 0,
|
|
115
|
+
marginBottom: 0
|
|
116
|
+
}
|
|
117
|
+
})
|
|
118
|
+
}),
|
|
119
|
+
[theme.breakpoints.up('lg')]: {
|
|
120
|
+
paddingLeft: '60px',
|
|
121
|
+
paddingRight: '60px'
|
|
122
|
+
}
|
|
123
|
+
};
|
|
124
|
+
});
|
|
125
|
+
const DialogContentRoot = styled('div', {
|
|
126
|
+
name: 'MuiDialogContent',
|
|
127
|
+
slot: 'Root',
|
|
128
|
+
overridesResolver: (props, styles) => {
|
|
129
|
+
const {
|
|
130
|
+
ownerState
|
|
131
|
+
} = props;
|
|
132
|
+
return [styles.root, ownerState.dividers && styles.dividers];
|
|
133
|
+
}
|
|
134
|
+
})(({
|
|
135
|
+
theme,
|
|
136
|
+
ownerState
|
|
137
|
+
}) => ({
|
|
138
|
+
flex: '1 1 auto',
|
|
139
|
+
// Add iOS momentum scrolling for iOS < 13.0
|
|
140
|
+
WebkitOverflowScrolling: 'touch',
|
|
141
|
+
overflowY: 'auto',
|
|
142
|
+
padding: '20px 24px',
|
|
143
|
+
...(ownerState.dividers ? {
|
|
144
|
+
padding: '16px 24px',
|
|
145
|
+
borderTop: `1px solid ${(theme.vars || theme).palette.divider}`,
|
|
146
|
+
borderBottom: `1px solid ${(theme.vars || theme).palette.divider}`
|
|
147
|
+
} : {
|
|
148
|
+
[`.${dialogTitleClasses.root} + &`]: {
|
|
149
|
+
paddingTop: 0
|
|
150
|
+
}
|
|
151
|
+
})
|
|
152
|
+
}));
|
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
4
|
+
const LinearProgressBar1 = styled('span', {
|
|
5
|
+
name: 'MuiLinearProgress',
|
|
6
|
+
slot: 'Bar1',
|
|
7
|
+
overridesResolver: (props, styles) => {
|
|
8
|
+
const {
|
|
9
|
+
ownerState
|
|
10
|
+
} = props;
|
|
11
|
+
return [styles.bar, styles[`barColor${capitalize(ownerState.color)}`], (ownerState.variant === 'indeterminate' || ownerState.variant === 'query') && styles.bar1Indeterminate, ownerState.variant === 'determinate' && styles.bar1Determinate, ownerState.variant === 'buffer' && styles.bar1Buffer];
|
|
12
|
+
}
|
|
13
|
+
})(({
|
|
14
|
+
theme
|
|
15
|
+
}) => ({
|
|
16
|
+
variants: [{
|
|
17
|
+
props: {
|
|
18
|
+
variant: 'buffer'
|
|
19
|
+
},
|
|
20
|
+
style: {
|
|
21
|
+
'&:hover': {}
|
|
22
|
+
}
|
|
23
|
+
}, {
|
|
24
|
+
props: ({
|
|
25
|
+
variant,
|
|
26
|
+
ownerState
|
|
27
|
+
}) => variant === 'buffer' && ownerState.color !== 'normal',
|
|
28
|
+
style: {
|
|
29
|
+
backgroundColor: 'currentColor'
|
|
30
|
+
}
|
|
31
|
+
}, {
|
|
32
|
+
props: {
|
|
33
|
+
variant: 'buffer',
|
|
34
|
+
color: 'normal'
|
|
35
|
+
},
|
|
36
|
+
style: {
|
|
37
|
+
backgroundColor: (theme.vars || theme).palette[ownerState.color].light
|
|
38
|
+
}
|
|
39
|
+
}, {
|
|
40
|
+
props: ({
|
|
41
|
+
variant,
|
|
42
|
+
ownerState
|
|
43
|
+
}) => variant === 'buffer' && ownerState.color !== 'inherit',
|
|
44
|
+
style: {
|
|
45
|
+
'&:hover': {
|
|
46
|
+
backgroundColor: (theme.vars || theme).palette[ownerState.color].dark
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}, {
|
|
50
|
+
props: {
|
|
51
|
+
variant: 'buffer',
|
|
52
|
+
color: 'inherit'
|
|
53
|
+
},
|
|
54
|
+
style: {
|
|
55
|
+
'&:hover': {
|
|
56
|
+
backgroundColor: 'currentColor'
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}, {
|
|
60
|
+
props: ({
|
|
61
|
+
ownerState,
|
|
62
|
+
color
|
|
63
|
+
}) => ownerState.variant !== 'buffer' && color === 'inherit',
|
|
64
|
+
style: {
|
|
65
|
+
backgroundColor: 'currentColor'
|
|
66
|
+
}
|
|
67
|
+
}, {
|
|
68
|
+
props: ({
|
|
69
|
+
ownerState
|
|
70
|
+
}) => ownerState.variant !== 'buffer' && ownerState.color !== 'inherit',
|
|
71
|
+
style: {
|
|
72
|
+
backgroundColor: (theme.vars || theme).palette[ownerState.color].main
|
|
73
|
+
}
|
|
74
|
+
}]
|
|
75
|
+
}));
|
|
76
|
+
const ExpandMore = styled(props => {
|
|
77
|
+
const {
|
|
78
|
+
expand,
|
|
79
|
+
...other
|
|
80
|
+
} = props;
|
|
81
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(IconButton, {
|
|
82
|
+
...other
|
|
83
|
+
});
|
|
84
|
+
})(({
|
|
85
|
+
theme
|
|
86
|
+
}) => ({
|
|
87
|
+
marginLeft: 'auto',
|
|
88
|
+
transition: theme.transitions.create('transform', {
|
|
89
|
+
duration: theme.transitions.duration.shortest
|
|
90
|
+
}),
|
|
91
|
+
variants: [{
|
|
92
|
+
props: ({
|
|
93
|
+
expand
|
|
94
|
+
}) => !expand,
|
|
95
|
+
style: {
|
|
96
|
+
transform: 'rotate(0deg)'
|
|
97
|
+
}
|
|
98
|
+
}, {
|
|
99
|
+
props: ({
|
|
100
|
+
expand
|
|
101
|
+
}) => !!expand,
|
|
102
|
+
style: {
|
|
103
|
+
transform: 'rotate(180deg)'
|
|
104
|
+
}
|
|
105
|
+
}]
|
|
106
|
+
}));
|
|
107
|
+
const Main = styled('main', {
|
|
108
|
+
shouldForwardProp: prop => prop !== 'disableToc'
|
|
109
|
+
})(({
|
|
110
|
+
theme
|
|
111
|
+
}) => ({
|
|
112
|
+
minHeight: '100vh',
|
|
113
|
+
display: 'grid',
|
|
114
|
+
width: '100%',
|
|
115
|
+
'& .markdown-body .comment-link': {
|
|
116
|
+
display: 'flex'
|
|
117
|
+
},
|
|
118
|
+
variants: [{
|
|
119
|
+
props: ({
|
|
120
|
+
disableToc
|
|
121
|
+
}) => disableToc,
|
|
122
|
+
style: {
|
|
123
|
+
[theme.breakpoints.up('md')]: {
|
|
124
|
+
marginRight: TOC_WIDTH / 2
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}, {
|
|
128
|
+
props: ({
|
|
129
|
+
disableToc
|
|
130
|
+
}) => !disableToc,
|
|
131
|
+
style: {
|
|
132
|
+
[theme.breakpoints.up('md')]: {
|
|
133
|
+
gridTemplateColumns: `1fr ${TOC_WIDTH}px`
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}]
|
|
137
|
+
}));
|
|
138
|
+
const StyledAppContainer = styled(AppContainer, {
|
|
139
|
+
shouldForwardProp: prop => prop !== 'disableAd' && prop !== 'hasTabs' && prop !== 'disableToc'
|
|
140
|
+
})(({
|
|
141
|
+
theme
|
|
142
|
+
}) => {
|
|
143
|
+
return {
|
|
144
|
+
position: 'relative',
|
|
145
|
+
// By default, a grid item cannot be smaller than the size of its content.
|
|
146
|
+
// https://stackoverflow.com/questions/43311943/prevent-content-from-expanding-grid-items
|
|
147
|
+
minWidth: 0,
|
|
148
|
+
[theme.breakpoints.up('lg')]: {
|
|
149
|
+
paddingLeft: '60px',
|
|
150
|
+
paddingRight: '60px'
|
|
151
|
+
},
|
|
152
|
+
variants: [{
|
|
153
|
+
props: ({
|
|
154
|
+
disableToc
|
|
155
|
+
}) => disableToc,
|
|
156
|
+
style: {
|
|
157
|
+
// 105ch ≈ 930px
|
|
158
|
+
maxWidth: `calc(105ch + ${TOC_WIDTH / 2}px)`
|
|
159
|
+
}
|
|
160
|
+
}, {
|
|
161
|
+
props: ({
|
|
162
|
+
disableToc
|
|
163
|
+
}) => !disableToc,
|
|
164
|
+
style: {
|
|
165
|
+
// We're mostly hosting text content so max-width by px does not make sense considering font-size is system-adjustable.
|
|
166
|
+
fontFamily: 'Arial',
|
|
167
|
+
// 105ch ≈ 930px
|
|
168
|
+
maxWidth: '105ch'
|
|
169
|
+
}
|
|
170
|
+
}, {
|
|
171
|
+
props: ({
|
|
172
|
+
disableAd,
|
|
173
|
+
hasTabs
|
|
174
|
+
}) => !disableAd && hasTabs,
|
|
175
|
+
style: {
|
|
176
|
+
'&& .component-tabs .MuiTabs-root': {
|
|
177
|
+
// 40px matches MarkdownElement h2 margin-top.
|
|
178
|
+
marginBottom: `calc(${theme.spacing(AD_MARGIN_TOP)} + ${AD_HEIGHT_MOBILE}px + 40px)`,
|
|
179
|
+
[theme.breakpoints.up('sm')]: {
|
|
180
|
+
marginBottom: `calc(${theme.spacing(AD_MARGIN_TOP)} + ${AD_HEIGHT}px + 40px)`
|
|
181
|
+
}
|
|
182
|
+
},
|
|
183
|
+
'&& .component-tabs.ad .MuiTabs-root': {
|
|
184
|
+
marginBottom: 0
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
}, {
|
|
188
|
+
props: ({
|
|
189
|
+
disableAd,
|
|
190
|
+
hasTabs
|
|
191
|
+
}) => !disableAd && !hasTabs,
|
|
192
|
+
style: {
|
|
193
|
+
'&& .description': {
|
|
194
|
+
marginBottom: theme.spacing(AD_MARGIN_BOTTOM),
|
|
195
|
+
paddingBottom: `calc(${theme.spacing(AD_MARGIN_TOP)} + ${AD_HEIGHT_MOBILE}px)`,
|
|
196
|
+
[theme.breakpoints.up('sm')]: {
|
|
197
|
+
paddingBottom: `calc(${theme.spacing(AD_MARGIN_TOP)} + ${AD_HEIGHT}px)`
|
|
198
|
+
}
|
|
199
|
+
},
|
|
200
|
+
'&& .description.ad': {
|
|
201
|
+
paddingBottom: 0,
|
|
202
|
+
marginBottom: 0
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
}]
|
|
206
|
+
};
|
|
207
|
+
});
|
|
208
|
+
const DialogContentRoot = styled('div', {
|
|
209
|
+
name: 'MuiDialogContent',
|
|
210
|
+
slot: 'Root',
|
|
211
|
+
overridesResolver: (props, styles) => {
|
|
212
|
+
const {
|
|
213
|
+
ownerState
|
|
214
|
+
} = props;
|
|
215
|
+
return [styles.root, ownerState.dividers && styles.dividers];
|
|
216
|
+
}
|
|
217
|
+
})(({
|
|
218
|
+
theme
|
|
219
|
+
}) => ({
|
|
220
|
+
flex: '1 1 auto',
|
|
221
|
+
// Add iOS momentum scrolling for iOS < 13.0
|
|
222
|
+
WebkitOverflowScrolling: 'touch',
|
|
223
|
+
overflowY: 'auto',
|
|
224
|
+
padding: '20px 24px',
|
|
225
|
+
variants: [{
|
|
226
|
+
props: ({
|
|
227
|
+
ownerState
|
|
228
|
+
}) => ownerState.dividers,
|
|
229
|
+
style: {
|
|
230
|
+
padding: '16px 24px',
|
|
231
|
+
borderTop: `1px solid ${(theme.vars || theme).palette.divider}`,
|
|
232
|
+
borderBottom: `1px solid ${(theme.vars || theme).palette.divider}`
|
|
233
|
+
}
|
|
234
|
+
}, {
|
|
235
|
+
props: ({
|
|
236
|
+
ownerState
|
|
237
|
+
}) => !ownerState.dividers,
|
|
238
|
+
style: {
|
|
239
|
+
[`.${dialogTitleClasses.root} + &`]: {
|
|
240
|
+
paddingTop: 0
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
}]
|
|
244
|
+
}));
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
const ToolbarRoot = styled('div', {
|
|
4
|
+
name: 'MuiToolbar',
|
|
5
|
+
slot: 'Root',
|
|
6
|
+
overridesResolver: (props, styles) => {
|
|
7
|
+
const {
|
|
8
|
+
ownerState
|
|
9
|
+
} = props;
|
|
10
|
+
return [styles.root, !ownerState.disableGutters && styles.gutters, styles[ownerState.variant]];
|
|
11
|
+
}
|
|
12
|
+
})(({
|
|
13
|
+
theme,
|
|
14
|
+
ownerState
|
|
15
|
+
}) => ownerState.variant === 'regular' && theme.mixins.toolbar, ({
|
|
16
|
+
theme,
|
|
17
|
+
ownerState
|
|
18
|
+
}) => ownerState.variant !== 'regular' && theme.mixins.toolbar2, ({
|
|
19
|
+
theme,
|
|
20
|
+
ownerState,
|
|
21
|
+
disabled
|
|
22
|
+
}) => ownerState.variant === 'regular' && disabled && theme.mixins.toolbar3, ({
|
|
23
|
+
theme,
|
|
24
|
+
ownerState,
|
|
25
|
+
disabled
|
|
26
|
+
}) => ownerState.variant !== 'regular' && !disabled && theme.mixins.toolbar4, ({
|
|
27
|
+
theme
|
|
28
|
+
}) => theme.vars && theme.mixins.toolbar5);
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
const ToolbarRoot = styled('div', {
|
|
4
|
+
name: 'MuiToolbar',
|
|
5
|
+
slot: 'Root',
|
|
6
|
+
overridesResolver: (props, styles) => {
|
|
7
|
+
const {
|
|
8
|
+
ownerState
|
|
9
|
+
} = props;
|
|
10
|
+
return [styles.root, !ownerState.disableGutters && styles.gutters, styles[ownerState.variant]];
|
|
11
|
+
}
|
|
12
|
+
})(({
|
|
13
|
+
theme
|
|
14
|
+
}) => ({
|
|
15
|
+
variants: [{
|
|
16
|
+
props: {
|
|
17
|
+
variant: 'regular'
|
|
18
|
+
},
|
|
19
|
+
style: theme.mixins.toolbar
|
|
20
|
+
}]
|
|
21
|
+
}), ({
|
|
22
|
+
theme
|
|
23
|
+
}) => ({
|
|
24
|
+
variants: [{
|
|
25
|
+
props: ({
|
|
26
|
+
ownerState
|
|
27
|
+
}) => ownerState.variant !== 'regular',
|
|
28
|
+
style: theme.mixins.toolbar2
|
|
29
|
+
}]
|
|
30
|
+
}), ({
|
|
31
|
+
theme
|
|
32
|
+
}) => ({
|
|
33
|
+
variants: [{
|
|
34
|
+
props: ({
|
|
35
|
+
disabled,
|
|
36
|
+
ownerState
|
|
37
|
+
}) => ownerState.variant === 'regular' && disabled,
|
|
38
|
+
style: theme.mixins.toolbar3
|
|
39
|
+
}]
|
|
40
|
+
}), ({
|
|
41
|
+
theme
|
|
42
|
+
}) => ({
|
|
43
|
+
variants: [{
|
|
44
|
+
props: ({
|
|
45
|
+
disabled,
|
|
46
|
+
ownerState
|
|
47
|
+
}) => ownerState.variant !== 'regular' && !disabled,
|
|
48
|
+
style: theme.mixins.toolbar4
|
|
49
|
+
}]
|
|
50
|
+
}), ({
|
|
51
|
+
theme
|
|
52
|
+
}) => theme.vars && theme.mixins.toolbar5);
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
const Component = styled('div')(({
|
|
4
|
+
theme,
|
|
5
|
+
ownerState
|
|
6
|
+
}) => {
|
|
7
|
+
var _palette;
|
|
8
|
+
const palette = (_palette = (theme.vars || theme).palette) == null ? void 0 : _palette[ownerState.color];
|
|
9
|
+
return {
|
|
10
|
+
overflow: 'visible',
|
|
11
|
+
// Explicitly set the default value to solve a bug on IE11.
|
|
12
|
+
color: (theme.vars || theme).palette.action.active,
|
|
13
|
+
transition: theme.transitions.create('background-color', {
|
|
14
|
+
duration: theme.transitions.duration.shortest
|
|
15
|
+
}),
|
|
16
|
+
...(!ownerState.disableRipple && {
|
|
17
|
+
'&:hover': {
|
|
18
|
+
backgroundColor: theme.vars ? `rgba(${theme.vars.palette.action.activeChannel} / ${theme.vars.palette.action.hoverOpacity})` : alpha(theme.palette.action.active, theme.palette.action.hoverOpacity),
|
|
19
|
+
// Reset on touch devices, it doesn't add specificity
|
|
20
|
+
'@media (hover: none)': {
|
|
21
|
+
backgroundColor: 'transparent'
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}),
|
|
25
|
+
...(ownerState.edge === 'start' && {
|
|
26
|
+
marginLeft: ownerState.size === 'small' ? -3 : -12
|
|
27
|
+
}),
|
|
28
|
+
...(ownerState.edge === 'end' && {
|
|
29
|
+
marginRight: ownerState.size === 'small' ? -3 : -12
|
|
30
|
+
}),
|
|
31
|
+
...(ownerState.color !== 'inherit' && ownerState.color !== 'default' && {
|
|
32
|
+
color: palette == null ? void 0 : palette.main,
|
|
33
|
+
...(!ownerState.disableRipple && {
|
|
34
|
+
'&:hover': {
|
|
35
|
+
// The codemod won't handle this case when the variable is not declared in the style argument.
|
|
36
|
+
// In this case, the `palette` create a new variable in the style argument.
|
|
37
|
+
...(palette && {
|
|
38
|
+
backgroundColor: theme.vars ? `rgba(${palette.mainChannel} / ${theme.vars.palette.action.hoverOpacity})` : alpha(palette.main, theme.palette.action.hoverOpacity)
|
|
39
|
+
}),
|
|
40
|
+
// Reset on touch devices, it doesn't add specificity
|
|
41
|
+
'@media (hover: none)': {
|
|
42
|
+
backgroundColor: 'transparent'
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
})
|
|
46
|
+
})
|
|
47
|
+
};
|
|
48
|
+
});
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
const Component = styled('div')(({
|
|
4
|
+
theme
|
|
5
|
+
}) => {
|
|
6
|
+
var _palette;
|
|
7
|
+
const palette = (_palette = (theme.vars || theme).palette) == null ? void 0 : _palette[ownerState.color];
|
|
8
|
+
return {
|
|
9
|
+
// Explicitly set the default value to solve a bug on IE11.
|
|
10
|
+
overflow: 'visible',
|
|
11
|
+
color: (theme.vars || theme).palette.action.active,
|
|
12
|
+
transition: theme.transitions.create('background-color', {
|
|
13
|
+
duration: theme.transitions.duration.shortest
|
|
14
|
+
}),
|
|
15
|
+
variants: [{
|
|
16
|
+
props: ({
|
|
17
|
+
ownerState
|
|
18
|
+
}) => !ownerState.disableRipple,
|
|
19
|
+
style: {
|
|
20
|
+
'&:hover': {
|
|
21
|
+
backgroundColor: theme.vars ? `rgba(${theme.vars.palette.action.activeChannel} / ${theme.vars.palette.action.hoverOpacity})` : alpha(theme.palette.action.active, theme.palette.action.hoverOpacity),
|
|
22
|
+
// Reset on touch devices, it doesn't add specificity
|
|
23
|
+
'@media (hover: none)': {
|
|
24
|
+
backgroundColor: 'transparent'
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}, {
|
|
29
|
+
props: {
|
|
30
|
+
edge: 'start',
|
|
31
|
+
size: 'small'
|
|
32
|
+
},
|
|
33
|
+
style: {
|
|
34
|
+
marginLeft: -3
|
|
35
|
+
}
|
|
36
|
+
}, {
|
|
37
|
+
props: ({
|
|
38
|
+
edge,
|
|
39
|
+
ownerState
|
|
40
|
+
}) => edge === 'start' && ownerState.size !== 'small',
|
|
41
|
+
style: {
|
|
42
|
+
marginLeft: -12
|
|
43
|
+
}
|
|
44
|
+
}, {
|
|
45
|
+
props: {
|
|
46
|
+
edge: 'end',
|
|
47
|
+
size: 'small'
|
|
48
|
+
},
|
|
49
|
+
style: {
|
|
50
|
+
marginRight: -3
|
|
51
|
+
}
|
|
52
|
+
}, {
|
|
53
|
+
props: ({
|
|
54
|
+
edge,
|
|
55
|
+
ownerState
|
|
56
|
+
}) => edge === 'end' && ownerState.size !== 'small',
|
|
57
|
+
style: {
|
|
58
|
+
marginRight: -12
|
|
59
|
+
}
|
|
60
|
+
}, {
|
|
61
|
+
props: ({
|
|
62
|
+
ownerState
|
|
63
|
+
}) => ownerState.color !== 'inherit' && ownerState.color !== 'default',
|
|
64
|
+
style: {
|
|
65
|
+
color: palette == null ? void 0 : palette.main
|
|
66
|
+
}
|
|
67
|
+
}, {
|
|
68
|
+
props: ({
|
|
69
|
+
ownerState
|
|
70
|
+
}) => ownerState.color !== 'inherit' && ownerState.color !== 'default' && !ownerState.disableRipple,
|
|
71
|
+
style: {
|
|
72
|
+
'&:hover': {
|
|
73
|
+
// The codemod won't handle this case when the variable is not declared in the style argument.
|
|
74
|
+
// In this case, the `palette` create a new variable in the style argument.
|
|
75
|
+
...(palette && {
|
|
76
|
+
backgroundColor: theme.vars ? `rgba(${palette.mainChannel} / ${theme.vars.palette.action.hoverOpacity})` : alpha(palette.main, theme.palette.action.hoverOpacity)
|
|
77
|
+
}),
|
|
78
|
+
// Reset on touch devices, it doesn't add specificity
|
|
79
|
+
'@media (hover: none)': {
|
|
80
|
+
backgroundColor: 'transparent'
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}]
|
|
85
|
+
};
|
|
86
|
+
});
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
const IconRoot = styled('span')(({
|
|
4
|
+
theme,
|
|
5
|
+
ownerState
|
|
6
|
+
}) => ({
|
|
7
|
+
userSelect: 'none',
|
|
8
|
+
width: '1em',
|
|
9
|
+
height: '1em',
|
|
10
|
+
// Chrome fix for https://bugs.chromium.org/p/chromium/issues/detail?id=820541
|
|
11
|
+
// To remove at some point.
|
|
12
|
+
overflow: 'hidden',
|
|
13
|
+
display: 'inline-block',
|
|
14
|
+
// allow overflow hidden to take action
|
|
15
|
+
textAlign: 'center',
|
|
16
|
+
// support non-square icon
|
|
17
|
+
flexShrink: 0,
|
|
18
|
+
fontSize: {
|
|
19
|
+
inherit: 'inherit',
|
|
20
|
+
small: theme.typography.pxToRem(20),
|
|
21
|
+
medium: theme.typography.pxToRem(24),
|
|
22
|
+
large: theme.typography.pxToRem(36)
|
|
23
|
+
}[ownerState.fontSize],
|
|
24
|
+
// TODO v5 deprecate, v6 remove for sx
|
|
25
|
+
color: {
|
|
26
|
+
primary: (theme.vars || theme).palette.primary.main,
|
|
27
|
+
secondary: (theme.vars || theme).palette.secondary.main,
|
|
28
|
+
info: (theme.vars || theme).palette.info.main,
|
|
29
|
+
success: (theme.vars || theme).palette.success.main,
|
|
30
|
+
warning: (theme.vars || theme).palette.warning.main,
|
|
31
|
+
action: (theme.vars || theme).palette.action.active,
|
|
32
|
+
error: (theme.vars || theme).palette.error.main,
|
|
33
|
+
disabled: (theme.vars || theme).palette.action.disabled,
|
|
34
|
+
inherit: undefined
|
|
35
|
+
}[ownerState.color]
|
|
36
|
+
}));
|