@mui/codemod 6.0.0-alpha.7 → 6.0.0-alpha.9
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 +227 -30
- package/node/deprecations/accordion-props/test-cases/actual.js +6 -3
- package/node/deprecations/accordion-props/test-cases/expected.js +14 -10
- package/node/deprecations/accordion-props/test-cases/theme.expected.js +8 -7
- 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 +6 -0
- package/node/deprecations/autocomplete-props/test-cases/expected.js +8 -6
- package/node/deprecations/autocomplete-props/test-cases/theme.expected.js +8 -7
- 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/test-cases/expected.js +8 -6
- package/node/deprecations/avatar-props/test-cases/theme.expected.js +8 -7
- package/node/deprecations/backdrop-props/test-cases/actual.js +3 -2
- package/node/deprecations/backdrop-props/test-cases/expected.js +3 -3
- 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/form-control-label-props/test-cases/expected.js +4 -2
- package/node/deprecations/form-control-label-props/test-cases/theme.expected.js +4 -3
- 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/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/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/test-cases/actual.js +3 -2
- package/node/deprecations/speed-dial-props/test-cases/expected.js +3 -3
- package/node/deprecations/step-label-props/test-cases/expected.js +8 -3
- package/node/deprecations/step-label-props/test-cases/theme.expected.js +8 -4
- 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/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/replaceComponentsWithSlots.js +29 -17
- package/node/util/migrateToVariants.js +198 -121
- 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/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/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/test-cases/BasicStyled.actual.js +55 -44
- package/node/v6.0.0/styled/test-cases/BasicStyled.expected.js +5 -6
- package/node/v6.0.0/styled/test-cases/ConditionalStyled.actual.js +80 -70
- package/node/v6.0.0/styled/test-cases/ConditionalStyled.expected.js +7 -6
- package/node/v6.0.0/styled/test-cases/NestedSpread.actual.js +32 -26
- package/node/v6.0.0/styled/test-cases/NestedSpread.expected.js +7 -6
- package/node/v6.0.0/styled/test-cases/ThemePaletteMode.expected.js +28 -26
- package/node/v6.0.0/styled/test-cases/VariantAndModeStyled.actual.js +6 -5
- package/node/v6.0.0/styled/test-cases/VariantAndModeStyled.expected.js +8 -8
- 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/test-cases/basicTheme.actual.js +254 -225
- package/node/v6.0.0/theme-v6/test-cases/basicTheme.expected.js +180 -162
- package/node/v6.0.0/theme-v6/test-cases/themeVariants.actual.js +23 -21
- package/node/v6.0.0/theme-v6/test-cases/themeVariants.expected.js +20 -19
- package/node/v6.0.0/theme-v6/theme-v6.js +2 -2
- package/package.json +4 -4
|
@@ -5,7 +5,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.default = TextFieldComponent;
|
|
8
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
8
|
var React = _interopRequireWildcard(require("react"));
|
|
10
9
|
var _TextField4 = _interopRequireDefault(require("@material-ui/core/TextField"));
|
|
11
10
|
var _Select5 = _interopRequireDefault(require("@material-ui/core/Select"));
|
|
@@ -20,19 +19,25 @@ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e;
|
|
|
20
19
|
const Select2 = () => _MuiSelect || (_MuiSelect = /*#__PURE__*/(0, _jsxRuntime.jsx)(_Select6.default, {}));
|
|
21
20
|
function TextFieldComponent(props) {
|
|
22
21
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
23
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_TextField4.default,
|
|
22
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_TextField4.default, {
|
|
23
|
+
...props
|
|
24
|
+
}), _TextField || (_TextField = /*#__PURE__*/(0, _jsxRuntime.jsx)(_TextField4.default, {
|
|
24
25
|
variant: "outlined"
|
|
25
26
|
})), _TextField2 || (_TextField2 = /*#__PURE__*/(0, _jsxRuntime.jsx)(_TextField4.default, {
|
|
26
27
|
variant: "standard"
|
|
27
28
|
})), _TextField3 || (_TextField3 = /*#__PURE__*/(0, _jsxRuntime.jsx)(_TextField4.default, {
|
|
28
29
|
variant: "filled"
|
|
29
|
-
})), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Select5.default,
|
|
30
|
+
})), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Select5.default, {
|
|
31
|
+
...props
|
|
32
|
+
}), _Select || (_Select = /*#__PURE__*/(0, _jsxRuntime.jsx)(_Select5.default, {
|
|
30
33
|
variant: "outlined"
|
|
31
34
|
})), _Select2 || (_Select2 = /*#__PURE__*/(0, _jsxRuntime.jsx)(_Select5.default, {
|
|
32
35
|
variant: "standard"
|
|
33
36
|
})), _Select3 || (_Select3 = /*#__PURE__*/(0, _jsxRuntime.jsx)(_Select5.default, {
|
|
34
37
|
variant: "filled"
|
|
35
|
-
})), /*#__PURE__*/(0, _jsxRuntime.jsx)(_FormControl4.default,
|
|
38
|
+
})), /*#__PURE__*/(0, _jsxRuntime.jsx)(_FormControl4.default, {
|
|
39
|
+
...props
|
|
40
|
+
}), _FormControl || (_FormControl = /*#__PURE__*/(0, _jsxRuntime.jsx)(_FormControl4.default, {
|
|
36
41
|
variant: "outlined"
|
|
37
42
|
})), _FormControl2 || (_FormControl2 = /*#__PURE__*/(0, _jsxRuntime.jsx)(_FormControl4.default, {
|
|
38
43
|
variant: "standard"
|
|
@@ -41,10 +46,11 @@ function TextFieldComponent(props) {
|
|
|
41
46
|
})), /*#__PURE__*/(0, _jsxRuntime.jsx)(Autocomplete, {
|
|
42
47
|
options: [],
|
|
43
48
|
getOptionLabel: option => option.title,
|
|
44
|
-
renderInput: params => /*#__PURE__*/(0, _jsxRuntime.jsx)(_TextField4.default,
|
|
49
|
+
renderInput: params => /*#__PURE__*/(0, _jsxRuntime.jsx)(_TextField4.default, {
|
|
50
|
+
...params,
|
|
45
51
|
label: "Combo box",
|
|
46
52
|
variant: "outlined"
|
|
47
|
-
})
|
|
53
|
+
})
|
|
48
54
|
}), _CustomSelect || (_CustomSelect = /*#__PURE__*/(0, _jsxRuntime.jsx)(CustomSelect, {})), _SelectedRoute || (_SelectedRoute = /*#__PURE__*/(0, _jsxRuntime.jsx)(SelectedRoute, {})), _FromToSelect || (_FromToSelect = /*#__PURE__*/(0, _jsxRuntime.jsx)(FromToSelect, {})), _FromToSelectDrawer || (_FromToSelectDrawer = /*#__PURE__*/(0, _jsxRuntime.jsx)(FromToSelectDrawer, {})), _MuiTextField || (_MuiTextField = /*#__PURE__*/(0, _jsxRuntime.jsx)(_TextField5.default, {})), _Select4 || (_Select4 = /*#__PURE__*/(0, _jsxRuntime.jsx)(Select2, {})), _MuiFormControl || (_MuiFormControl = /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.FormControl, {}))]
|
|
49
55
|
});
|
|
50
56
|
}
|
|
@@ -5,7 +5,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.default = TextFieldComponent;
|
|
8
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
8
|
var React = _interopRequireWildcard(require("react"));
|
|
10
9
|
var _TextField4 = _interopRequireDefault(require("@material-ui/core/TextField"));
|
|
11
10
|
var _Select5 = _interopRequireDefault(require("@material-ui/core/Select"));
|
|
@@ -22,25 +21,28 @@ const Select2 = () => _MuiSelect || (_MuiSelect = /*#__PURE__*/(0, _jsxRuntime.j
|
|
|
22
21
|
}));
|
|
23
22
|
function TextFieldComponent(props) {
|
|
24
23
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
25
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_TextField4.default,
|
|
26
|
-
variant: "standard"
|
|
27
|
-
|
|
24
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_TextField4.default, {
|
|
25
|
+
variant: "standard",
|
|
26
|
+
...props
|
|
27
|
+
}), _TextField || (_TextField = /*#__PURE__*/(0, _jsxRuntime.jsx)(_TextField4.default, {
|
|
28
28
|
variant: "outlined"
|
|
29
29
|
})), _TextField2 || (_TextField2 = /*#__PURE__*/(0, _jsxRuntime.jsx)(_TextField4.default, {
|
|
30
30
|
variant: "standard"
|
|
31
31
|
})), _TextField3 || (_TextField3 = /*#__PURE__*/(0, _jsxRuntime.jsx)(_TextField4.default, {
|
|
32
32
|
variant: "filled"
|
|
33
|
-
})), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Select5.default,
|
|
34
|
-
variant: "standard"
|
|
35
|
-
|
|
33
|
+
})), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Select5.default, {
|
|
34
|
+
variant: "standard",
|
|
35
|
+
...props
|
|
36
|
+
}), _Select || (_Select = /*#__PURE__*/(0, _jsxRuntime.jsx)(_Select5.default, {
|
|
36
37
|
variant: "outlined"
|
|
37
38
|
})), _Select2 || (_Select2 = /*#__PURE__*/(0, _jsxRuntime.jsx)(_Select5.default, {
|
|
38
39
|
variant: "standard"
|
|
39
40
|
})), _Select3 || (_Select3 = /*#__PURE__*/(0, _jsxRuntime.jsx)(_Select5.default, {
|
|
40
41
|
variant: "filled"
|
|
41
|
-
})), /*#__PURE__*/(0, _jsxRuntime.jsx)(_FormControl4.default,
|
|
42
|
-
variant: "standard"
|
|
43
|
-
|
|
42
|
+
})), /*#__PURE__*/(0, _jsxRuntime.jsx)(_FormControl4.default, {
|
|
43
|
+
variant: "standard",
|
|
44
|
+
...props
|
|
45
|
+
}), _FormControl || (_FormControl = /*#__PURE__*/(0, _jsxRuntime.jsx)(_FormControl4.default, {
|
|
44
46
|
variant: "outlined"
|
|
45
47
|
})), _FormControl2 || (_FormControl2 = /*#__PURE__*/(0, _jsxRuntime.jsx)(_FormControl4.default, {
|
|
46
48
|
variant: "standard"
|
|
@@ -49,10 +51,11 @@ function TextFieldComponent(props) {
|
|
|
49
51
|
})), /*#__PURE__*/(0, _jsxRuntime.jsx)(Autocomplete, {
|
|
50
52
|
options: [],
|
|
51
53
|
getOptionLabel: option => option.title,
|
|
52
|
-
renderInput: params => /*#__PURE__*/(0, _jsxRuntime.jsx)(_TextField4.default,
|
|
54
|
+
renderInput: params => /*#__PURE__*/(0, _jsxRuntime.jsx)(_TextField4.default, {
|
|
55
|
+
...params,
|
|
53
56
|
label: "Combo box",
|
|
54
57
|
variant: "outlined"
|
|
55
|
-
})
|
|
58
|
+
})
|
|
56
59
|
}), _CustomSelect || (_CustomSelect = /*#__PURE__*/(0, _jsxRuntime.jsx)(CustomSelect, {})), _SelectedRoute || (_SelectedRoute = /*#__PURE__*/(0, _jsxRuntime.jsx)(SelectedRoute, {})), _FromToSelect || (_FromToSelect = /*#__PURE__*/(0, _jsxRuntime.jsx)(FromToSelect, {})), _FromToSelectDrawer || (_FromToSelectDrawer = /*#__PURE__*/(0, _jsxRuntime.jsx)(FromToSelectDrawer, {})), _MuiTextField || (_MuiTextField = /*#__PURE__*/(0, _jsxRuntime.jsx)(_TextField5.default, {
|
|
57
60
|
variant: "standard"
|
|
58
61
|
})), _Select4 || (_Select4 = /*#__PURE__*/(0, _jsxRuntime.jsx)(Select2, {})), _MuiFormControl || (_MuiFormControl = /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.FormControl, {
|
|
@@ -5,20 +5,21 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.default = void 0;
|
|
8
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
8
|
var _Button = _interopRequireDefault(require("@material-ui/core/Button"));
|
|
10
9
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
10
|
// FIXME checkout https://mui.com/components/use-media-query/#using-material-uis-breakpoint-helpers
|
|
12
|
-
const withMuiMobileDialog = () => WrappedComponent => props => /*#__PURE__*/(0, _jsxRuntime.jsx)(WrappedComponent,
|
|
11
|
+
const withMuiMobileDialog = () => WrappedComponent => props => /*#__PURE__*/(0, _jsxRuntime.jsx)(WrappedComponent, {
|
|
12
|
+
...props,
|
|
13
13
|
width: "lg",
|
|
14
14
|
fullScreen: false
|
|
15
|
-
})
|
|
15
|
+
});
|
|
16
16
|
|
|
17
17
|
// FIXME checkout https://mui.com/components/use-media-query/#using-material-uis-breakpoint-helpers
|
|
18
|
-
const withMobileDialog = () => WrappedComponent => props => /*#__PURE__*/(0, _jsxRuntime.jsx)(WrappedComponent,
|
|
18
|
+
const withMobileDialog = () => WrappedComponent => props => /*#__PURE__*/(0, _jsxRuntime.jsx)(WrappedComponent, {
|
|
19
|
+
...props,
|
|
19
20
|
width: "lg",
|
|
20
21
|
fullScreen: false
|
|
21
|
-
})
|
|
22
|
+
});
|
|
22
23
|
const A = withMobileDialog()(props => {
|
|
23
24
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
24
25
|
children: props.width
|
|
@@ -5,18 +5,19 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.default = void 0;
|
|
8
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
8
|
var _Button = _interopRequireDefault(require("@material-ui/core/Button"));
|
|
10
9
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
10
|
// FIXME checkout https://mui.com/components/use-media-query/#migrating-from-withwidth
|
|
12
|
-
const withMuiWidth = () => WrappedComponent => props => /*#__PURE__*/(0, _jsxRuntime.jsx)(WrappedComponent,
|
|
11
|
+
const withMuiWidth = () => WrappedComponent => props => /*#__PURE__*/(0, _jsxRuntime.jsx)(WrappedComponent, {
|
|
12
|
+
...props,
|
|
13
13
|
width: "xs"
|
|
14
|
-
})
|
|
14
|
+
});
|
|
15
15
|
|
|
16
16
|
// FIXME checkout https://mui.com/components/use-media-query/#migrating-from-withwidth
|
|
17
|
-
const withWidth = () => WrappedComponent => props => /*#__PURE__*/(0, _jsxRuntime.jsx)(WrappedComponent,
|
|
17
|
+
const withWidth = () => WrappedComponent => props => /*#__PURE__*/(0, _jsxRuntime.jsx)(WrappedComponent, {
|
|
18
|
+
...props,
|
|
18
19
|
width: "xs"
|
|
19
|
-
})
|
|
20
|
+
});
|
|
20
21
|
const A = withWidth()(props => {
|
|
21
22
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
22
23
|
children: props.width
|
|
@@ -1,78 +1,89 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
5
3
|
const FormHelperTextRoot = styled('p')(({
|
|
6
4
|
theme,
|
|
7
5
|
ownerState,
|
|
8
6
|
disabled
|
|
9
|
-
}) => (
|
|
10
|
-
color: (theme.vars || theme).palette.text.secondary
|
|
11
|
-
|
|
7
|
+
}) => ({
|
|
8
|
+
color: (theme.vars || theme).palette.text.secondary,
|
|
9
|
+
...theme.typography.caption,
|
|
12
10
|
textAlign: 'left',
|
|
13
11
|
[`&.${formHelperTextClasses.disabled}`]: {
|
|
14
12
|
color: (theme.vars || theme).palette.text.disabled
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
},
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
},
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
13
|
+
},
|
|
14
|
+
...(ownerState.size === 'small' && {
|
|
15
|
+
marginTop: 4
|
|
16
|
+
}),
|
|
17
|
+
...(ownerState.size === 'small' && ownerState.variant === 'contained' && {
|
|
18
|
+
marginTop: 6
|
|
19
|
+
}),
|
|
20
|
+
...(ownerState.size === 'small' && ownerState.variant === 'contained' && disabled && {
|
|
21
|
+
marginTop: 6
|
|
22
|
+
}),
|
|
23
|
+
...(ownerState.size !== 'small' && {
|
|
24
|
+
marginBottom: 4
|
|
25
|
+
}),
|
|
26
|
+
...(ownerState.size !== 'small' && ownerState.variant !== 'contained' && !disabled && {
|
|
27
|
+
marginBottom: 6
|
|
28
|
+
}),
|
|
29
|
+
...(ownerState.contained && {
|
|
30
|
+
marginLeft: 14,
|
|
31
|
+
marginRight: 14
|
|
32
|
+
}),
|
|
33
|
+
...(!ownerState.contained && {
|
|
34
|
+
marginTop: 14,
|
|
35
|
+
marginBottom: 14
|
|
36
|
+
}),
|
|
37
|
+
...(!!ownerState.disabled && {
|
|
38
|
+
opacity: 0.5
|
|
39
|
+
})
|
|
34
40
|
}));
|
|
35
41
|
const Component = styled.div(({
|
|
36
42
|
theme,
|
|
37
43
|
ownerState
|
|
38
|
-
}) => (
|
|
39
|
-
|
|
44
|
+
}) => ({
|
|
45
|
+
...theme.typography.caption,
|
|
46
|
+
...(ownerState.size === 'small' && {
|
|
47
|
+
marginTop: (theme.vars || theme).spacing(1)
|
|
48
|
+
})
|
|
40
49
|
}));
|
|
41
50
|
const ImageListRoot = styled('ul')(({
|
|
42
51
|
ownerState
|
|
43
52
|
}) => {
|
|
44
|
-
return
|
|
53
|
+
return {
|
|
45
54
|
display: 'grid',
|
|
46
55
|
overflowY: 'auto',
|
|
47
56
|
listStyle: 'none',
|
|
48
57
|
padding: 0,
|
|
49
58
|
// Add iOS momentum scrolling for iOS < 13.0
|
|
50
|
-
WebkitOverflowScrolling: 'touch'
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
59
|
+
WebkitOverflowScrolling: 'touch',
|
|
60
|
+
...(ownerState.variant === 'masonry' && {
|
|
61
|
+
display: 'block'
|
|
62
|
+
})
|
|
63
|
+
};
|
|
54
64
|
});
|
|
55
65
|
const ImageListItemRoot = styled('li')(({
|
|
56
66
|
ownerState
|
|
57
67
|
}) => ({
|
|
58
68
|
display: 'block',
|
|
59
69
|
position: 'relative',
|
|
60
|
-
[`& .${imageListItemClasses.img}`]:
|
|
70
|
+
[`& .${imageListItemClasses.img}`]: {
|
|
61
71
|
objectFit: 'cover',
|
|
62
72
|
width: '100%',
|
|
63
73
|
height: '100%',
|
|
64
|
-
display: 'block'
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
74
|
+
display: 'block',
|
|
75
|
+
...(ownerState.variant === 'standard' && {
|
|
76
|
+
height: 'auto',
|
|
77
|
+
flexGrow: 1
|
|
78
|
+
}),
|
|
69
79
|
'&:hover': {
|
|
70
|
-
'&[data-shape="circular"]':
|
|
71
|
-
borderRadius: '50%'
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
80
|
+
'&[data-shape="circular"]': {
|
|
81
|
+
borderRadius: '50%',
|
|
82
|
+
...(ownerState.variant === 'unique' && {
|
|
83
|
+
height: 'auto',
|
|
84
|
+
flexGrow: 1
|
|
85
|
+
})
|
|
86
|
+
}
|
|
76
87
|
}
|
|
77
|
-
}
|
|
88
|
+
}
|
|
78
89
|
}));
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
5
3
|
const FormHelperTextRoot = styled('p')(({
|
|
6
4
|
theme
|
|
7
|
-
}) => (
|
|
8
|
-
color: (theme.vars || theme).palette.text.secondary
|
|
9
|
-
|
|
5
|
+
}) => ({
|
|
6
|
+
color: (theme.vars || theme).palette.text.secondary,
|
|
7
|
+
...theme.typography.caption,
|
|
10
8
|
textAlign: 'left',
|
|
11
9
|
[`&.${formHelperTextClasses.disabled}`]: {
|
|
12
10
|
color: (theme.vars || theme).palette.text.disabled
|
|
@@ -76,7 +74,8 @@ const FormHelperTextRoot = styled('p')(({
|
|
|
76
74
|
}));
|
|
77
75
|
const Component = styled.div(({
|
|
78
76
|
theme
|
|
79
|
-
}) => (
|
|
77
|
+
}) => ({
|
|
78
|
+
...theme.typography.caption,
|
|
80
79
|
variants: [{
|
|
81
80
|
props: {
|
|
82
81
|
size: 'small'
|
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
|
|
5
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
6
3
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
7
|
-
const _excluded = ["expand"];
|
|
8
4
|
const LinearProgressBar1 = styled('span', {
|
|
9
5
|
name: 'MuiLinearProgress',
|
|
10
6
|
slot: 'Bar1',
|
|
@@ -17,19 +13,29 @@ const LinearProgressBar1 = styled('span', {
|
|
|
17
13
|
})(({
|
|
18
14
|
ownerState,
|
|
19
15
|
theme
|
|
20
|
-
}) => (
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
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
|
|
26
29
|
})
|
|
27
|
-
}, ownerState.variant !== 'buffer' && {
|
|
28
|
-
backgroundColor: ownerState.color === 'inherit' ? 'currentColor' : (theme.vars || theme).palette[ownerState.color].main
|
|
29
30
|
}));
|
|
30
31
|
const ExpandMore = styled(props => {
|
|
31
|
-
const
|
|
32
|
-
|
|
32
|
+
const {
|
|
33
|
+
expand,
|
|
34
|
+
...other
|
|
35
|
+
} = props;
|
|
36
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(IconButton, {
|
|
37
|
+
...other
|
|
38
|
+
});
|
|
33
39
|
})(({
|
|
34
40
|
theme,
|
|
35
41
|
expand
|
|
@@ -45,19 +51,19 @@ const Main = styled('main', {
|
|
|
45
51
|
})(({
|
|
46
52
|
disableToc,
|
|
47
53
|
theme
|
|
48
|
-
}) => (
|
|
54
|
+
}) => ({
|
|
49
55
|
minHeight: '100vh',
|
|
50
56
|
display: 'grid',
|
|
51
|
-
width: '100%'
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
} : {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
},
|
|
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
|
+
}),
|
|
61
67
|
'& .markdown-body .comment-link': {
|
|
62
68
|
display: 'flex'
|
|
63
69
|
}
|
|
@@ -70,48 +76,51 @@ const StyledAppContainer = styled(AppContainer, {
|
|
|
70
76
|
disableToc,
|
|
71
77
|
theme
|
|
72
78
|
}) => {
|
|
73
|
-
return
|
|
79
|
+
return {
|
|
74
80
|
position: 'relative',
|
|
75
81
|
// By default, a grid item cannot be smaller than the size of its content.
|
|
76
82
|
// https://stackoverflow.com/questions/43311943/prevent-content-from-expanding-grid-items
|
|
77
|
-
minWidth: 0
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
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
|
+
}),
|
|
110
119
|
[theme.breakpoints.up('lg')]: {
|
|
111
120
|
paddingLeft: '60px',
|
|
112
121
|
paddingRight: '60px'
|
|
113
122
|
}
|
|
114
|
-
}
|
|
123
|
+
};
|
|
115
124
|
});
|
|
116
125
|
const DialogContentRoot = styled('div', {
|
|
117
126
|
name: 'MuiDialogContent',
|
|
@@ -125,18 +134,19 @@ const DialogContentRoot = styled('div', {
|
|
|
125
134
|
})(({
|
|
126
135
|
theme,
|
|
127
136
|
ownerState
|
|
128
|
-
}) => (
|
|
137
|
+
}) => ({
|
|
129
138
|
flex: '1 1 auto',
|
|
130
139
|
// Add iOS momentum scrolling for iOS < 13.0
|
|
131
140
|
WebkitOverflowScrolling: 'touch',
|
|
132
141
|
overflowY: 'auto',
|
|
133
|
-
padding: '20px 24px'
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
} : {
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
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
|
+
})
|
|
142
152
|
}));
|
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
5
|
-
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
|
|
6
3
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
7
|
-
const _excluded = ["expand"];
|
|
8
4
|
const LinearProgressBar1 = styled('span', {
|
|
9
5
|
name: 'MuiLinearProgress',
|
|
10
6
|
slot: 'Bar1',
|
|
@@ -78,8 +74,13 @@ const LinearProgressBar1 = styled('span', {
|
|
|
78
74
|
}]
|
|
79
75
|
}));
|
|
80
76
|
const ExpandMore = styled(props => {
|
|
81
|
-
const
|
|
82
|
-
|
|
77
|
+
const {
|
|
78
|
+
expand,
|
|
79
|
+
...other
|
|
80
|
+
} = props;
|
|
81
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(IconButton, {
|
|
82
|
+
...other
|
|
83
|
+
});
|
|
83
84
|
})(({
|
|
84
85
|
theme
|
|
85
86
|
}) => ({
|
|
@@ -1,42 +1,48 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
5
3
|
const Component = styled('div')(({
|
|
6
4
|
theme,
|
|
7
5
|
ownerState
|
|
8
6
|
}) => {
|
|
9
7
|
var _palette;
|
|
10
8
|
const palette = (_palette = (theme.vars || theme).palette) == null ? void 0 : _palette[ownerState.color];
|
|
11
|
-
return
|
|
9
|
+
return {
|
|
12
10
|
overflow: 'visible',
|
|
13
11
|
// Explicitly set the default value to solve a bug on IE11.
|
|
14
12
|
color: (theme.vars || theme).palette.action.active,
|
|
15
13
|
transition: theme.transitions.create('background-color', {
|
|
16
14
|
duration: theme.transitions.duration.shortest
|
|
17
|
-
})
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}
|
|
26
|
-
}, ownerState.edge === 'start' && {
|
|
27
|
-
marginLeft: ownerState.size === 'small' ? -3 : -12
|
|
28
|
-
}, ownerState.edge === 'end' && {
|
|
29
|
-
marginRight: ownerState.size === 'small' ? -3 : -12
|
|
30
|
-
}, ownerState.color !== 'inherit' && ownerState.color !== 'default' && (0, _extends2.default)({
|
|
31
|
-
color: palette == null ? void 0 : palette.main
|
|
32
|
-
}, !ownerState.disableRipple && {
|
|
33
|
-
'&:hover': (0, _extends2.default)({}, palette && {
|
|
34
|
-
backgroundColor: theme.vars ? `rgba(${palette.mainChannel} / ${theme.vars.palette.action.hoverOpacity})` : alpha(palette.main, theme.palette.action.hoverOpacity)
|
|
35
|
-
}, {
|
|
36
|
-
// Reset on touch devices, it doesn't add specificity
|
|
37
|
-
'@media (hover: none)': {
|
|
38
|
-
backgroundColor: 'transparent'
|
|
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
|
+
}
|
|
39
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
|
+
})
|
|
40
46
|
})
|
|
41
|
-
}
|
|
47
|
+
};
|
|
42
48
|
});
|