@mui/codemod 6.0.0-dev.240424162023-9968b4889d → 6.0.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/README.md +1037 -294
- package/codemod.js +0 -2
- 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 +38 -14
- package/node/deprecations/all/postcss.config.js +10 -1
- package/node/deprecations/autocomplete-props/autocomplete-props.js +22 -0
- package/node/deprecations/autocomplete-props/index.js +13 -0
- package/node/deprecations/autocomplete-props/test-cases/actual.js +75 -0
- package/node/deprecations/autocomplete-props/test-cases/expected.js +75 -0
- package/node/deprecations/autocomplete-props/test-cases/theme.actual.js +47 -0
- package/node/deprecations/autocomplete-props/test-cases/theme.expected.js +47 -0
- package/node/deprecations/avatar-group-props/avatar-group-props.js +81 -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/backdrop-props.js +3 -5
- package/node/deprecations/backdrop-props/test-cases/actual.js +30 -13
- package/node/deprecations/backdrop-props/test-cases/expected.js +23 -13
- package/node/deprecations/backdrop-props/test-cases/theme.actual.js +32 -6
- package/node/deprecations/backdrop-props/test-cases/theme.expected.js +27 -5
- 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 +28 -15
- package/node/deprecations/divider-props/test-cases/actual.js +3 -0
- package/node/deprecations/divider-props/test-cases/expected.js +5 -8
- package/node/deprecations/divider-props/test-cases/theme.actual.js +28 -0
- package/node/deprecations/divider-props/test-cases/theme.expected.js +25 -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/image-list-item-bar-classes/image-list-item-bar-classes.js +77 -0
- package/node/deprecations/image-list-item-bar-classes/index.js +13 -0
- package/node/deprecations/image-list-item-bar-classes/postcss-plugin.js +39 -0
- package/node/deprecations/image-list-item-bar-classes/postcss.config.js +8 -0
- package/node/deprecations/image-list-item-bar-classes/test-cases/actual.js +11 -0
- package/node/deprecations/image-list-item-bar-classes/test-cases/expected.js +11 -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-label-props/step-label-props.js +0 -14
- package/node/deprecations/step-label-props/test-cases/actual.js +0 -23
- package/node/deprecations/step-label-props/test-cases/expected.js +4 -26
- package/node/deprecations/step-label-props/test-cases/theme.actual.js +0 -22
- package/node/deprecations/step-label-props/test-cases/theme.expected.js +4 -28
- package/node/deprecations/tab-classes/index.js +13 -0
- package/node/deprecations/tab-classes/postcss-plugin.js +30 -0
- package/node/deprecations/tab-classes/postcss.config.js +8 -0
- package/node/deprecations/tab-classes/tab-classes.js +53 -0
- package/node/deprecations/tab-classes/test-cases/actual.js +5 -0
- package/node/deprecations/tab-classes/test-cases/expected.js +5 -0
- package/node/deprecations/table-sort-label-classes/index.js +13 -0
- package/node/deprecations/table-sort-label-classes/postcss-plugin.js +33 -0
- package/node/deprecations/table-sort-label-classes/postcss.config.js +8 -0
- package/node/deprecations/table-sort-label-classes/table-sort-label-classes.js +77 -0
- package/node/deprecations/table-sort-label-classes/test-cases/actual.js +7 -0
- package/node/deprecations/table-sort-label-classes/test-cases/expected.js +7 -0
- 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/typography-props/index.js +13 -0
- package/node/deprecations/typography-props/test-cases/actual.js +80 -0
- package/node/deprecations/typography-props/test-cases/expected.js +86 -0
- package/node/deprecations/typography-props/test-cases/theme.actual.js +85 -0
- package/node/deprecations/typography-props/test-cases/theme.expected.js +86 -0
- package/node/deprecations/typography-props/typography-props.js +81 -0
- package/node/deprecations/utils/movePropIntoSlotProps.js +4 -12
- package/node/deprecations/utils/movePropIntoSlots.js +4 -12
- package/node/deprecations/utils/replaceComponentsWithSlots.js +32 -25
- package/node/util/getReturnExpression.js +19 -0
- package/node/util/migrateToVariants.js +586 -0
- package/node/util/propsToObject.js +2 -6
- package/node/util/renameClassKey.js +1 -2
- package/node/v0.15.0/import-path.js +2 -2
- package/node/v5.0.0/avatar-circle-circular.js +2 -4
- package/node/v5.0.0/badge-overlap-value.js +4 -7
- 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-hook-imports.js +1 -2
- 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 +1 -2
- package/node/v5.0.0/base-remove-unstyled-suffix.test/actual.js +5 -5
- package/node/v5.0.0/base-remove-unstyled-suffix.test/expected.js +4 -4
- package/node/v5.0.0/base-rename-components-to-slots.js +1 -1
- package/node/v5.0.0/base-use-named-exports.js +5 -8
- package/node/v5.0.0/box-sx-prop.js +1 -2
- 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/button-color-prop.js +1 -2
- package/node/v5.0.0/chip-variant-prop.js +1 -2
- package/node/v5.0.0/circularprogress-variant.js +2 -4
- 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/fab-variant.js +2 -4
- package/node/v5.0.0/grid-list-component.test/actual.js +1 -1
- package/node/v5.0.0/grid-list-component.test/expected.js +1 -1
- package/node/v5.0.0/joy-avatar-remove-imgProps.js +3 -7
- package/node/v5.0.0/joy-rename-components-to-slots.js +1 -1
- package/node/v5.0.0/joy-rename-row-prop.js +1 -2
- package/node/v5.0.0/joy-text-field-to-input.js +4 -7
- 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.js +4 -6
- 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/actual-withStyles.js +4 -4
- package/node/v5.0.0/jss-to-tss-react.test/expected-mixins-pattern.js +6 -5
- package/node/v5.0.0/jss-to-tss-react.test/expected-withStyles.js +4 -4
- package/node/v5.0.0/link-underline-hover.js +1 -4
- package/node/v5.0.0/pagination-round-circular.js +3 -8
- 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/root-ref.test/expected.js +4 -4
- package/node/v5.0.0/skeleton-variant.js +3 -5
- package/node/v5.0.0/table-props.js +4 -9
- 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/tabs-scroll-buttons.js +4 -5
- package/node/v5.0.0/theme-spacing.test/large-actual.js +11 -11
- package/node/v5.0.0/theme-spacing.test/large-expected.js +11 -11
- 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/all/v6-all.js +4 -5
- package/node/v6.0.0/grid-v2-props/grid-v2-props.js +142 -0
- package/node/v6.0.0/grid-v2-props/index.js +13 -0
- package/node/v6.0.0/grid-v2-props/test-cases/actual.js +89 -0
- package/node/v6.0.0/grid-v2-props/test-cases/custom-breakpoints.actual.js +18 -0
- package/node/v6.0.0/grid-v2-props/test-cases/custom-breakpoints.expected.js +22 -0
- package/node/v6.0.0/grid-v2-props/test-cases/expected.js +101 -0
- package/node/v6.0.0/list-item-button-prop/index.js +13 -0
- package/node/v6.0.0/list-item-button-prop/list-item-button-prop.js +93 -0
- package/node/v6.0.0/list-item-button-prop/test-cases/actual.js +31 -0
- package/node/v6.0.0/list-item-button-prop/test-cases/expected.js +20 -0
- package/node/v6.0.0/list-item-button-prop/test-cases/theme.actual.js +20 -0
- package/node/v6.0.0/list-item-button-prop/test-cases/theme.expected.js +24 -0
- package/node/v6.0.0/styled/styled-v6.js +2 -415
- 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 +98 -61
- package/node/v6.0.0/styled/test-cases/ConditionalStyled.expected.js +54 -29
- package/node/v6.0.0/styled/test-cases/DynamicPropsStyled.actual.js +39 -0
- package/node/v6.0.0/styled/test-cases/DynamicPropsStyled.expected.js +65 -0
- package/node/v6.0.0/styled/test-cases/LogicalStyled.actual.js +31 -1
- package/node/v6.0.0/styled/test-cases/LogicalStyled.expected.js +39 -1
- package/node/v6.0.0/styled/test-cases/NestedSpread.actual.js +33 -28
- package/node/v6.0.0/styled/test-cases/NestedSpread.expected.js +20 -22
- 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 +411 -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-applyStyles.actual.js +89 -0
- package/node/v6.0.0/sx-prop/test-cases/sx-applyStyles.expected.js +82 -0
- package/node/v6.0.0/sx-prop/test-cases/sx-condition.actual.js +92 -0
- package/node/v6.0.0/sx-prop/test-cases/sx-condition.expected.js +89 -0
- package/node/v6.0.0/sx-prop/test-cases/sx-css-vars.actual.js +55 -0
- package/node/v6.0.0/sx-prop/test-cases/sx-css-vars.expected.js +88 -0
- package/node/v6.0.0/sx-prop/test-cases/sx-dynamic.actual.js +107 -0
- package/node/v6.0.0/sx-prop/test-cases/sx-dynamic.expected.js +120 -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/sx-prop/test-cases/sx-inheritance.actual.js +17 -0
- package/node/v6.0.0/sx-prop/test-cases/sx-inheritance.expected.js +17 -0
- package/node/v6.0.0/sx-prop/test-cases/sx-line-break.actual.js +69 -0
- package/node/v6.0.0/sx-prop/test-cases/sx-line-break.expected.js +69 -0
- package/node/v6.0.0/sx-prop/test-cases/sx-value-callback.actual.js +102 -0
- package/node/v6.0.0/sx-prop/test-cases/sx-value-callback.expected.js +111 -0
- package/node/v6.0.0/system-props/index.js +13 -0
- package/node/v6.0.0/system-props/removeSystemProps.js +233 -0
- package/node/v6.0.0/system-props/test-cases/system-props.actual.js +83 -0
- package/node/v6.0.0/system-props/test-cases/system-props.expected.js +98 -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 +86 -0
- package/package.json +11 -11
|
@@ -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,46 +76,77 @@ 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
|
-
}
|
|
115
|
-
});
|
|
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
|
+
}));
|
|
@@ -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',
|
|
@@ -22,6 +18,7 @@ const LinearProgressBar1 = styled('span', {
|
|
|
22
18
|
variant: 'buffer'
|
|
23
19
|
},
|
|
24
20
|
style: {
|
|
21
|
+
backgroundColor: (theme.vars || theme).palette[ownerState.color].light,
|
|
25
22
|
'&:hover': {}
|
|
26
23
|
}
|
|
27
24
|
}, {
|
|
@@ -32,14 +29,6 @@ const LinearProgressBar1 = styled('span', {
|
|
|
32
29
|
style: {
|
|
33
30
|
backgroundColor: 'currentColor'
|
|
34
31
|
}
|
|
35
|
-
}, {
|
|
36
|
-
props: {
|
|
37
|
-
variant: 'buffer',
|
|
38
|
-
color: 'normal'
|
|
39
|
-
},
|
|
40
|
-
style: {
|
|
41
|
-
backgroundColor: (theme.vars || theme).palette[ownerState.color].light
|
|
42
|
-
}
|
|
43
32
|
}, {
|
|
44
33
|
props: ({
|
|
45
34
|
variant,
|
|
@@ -62,27 +51,33 @@ const LinearProgressBar1 = styled('span', {
|
|
|
62
51
|
}
|
|
63
52
|
}, {
|
|
64
53
|
props: ({
|
|
65
|
-
ownerState
|
|
66
|
-
|
|
67
|
-
}) => ownerState.variant !== 'buffer' && color === 'inherit',
|
|
54
|
+
ownerState
|
|
55
|
+
}) => ownerState.variant !== 'buffer',
|
|
68
56
|
style: {
|
|
69
|
-
backgroundColor:
|
|
57
|
+
backgroundColor: (theme.vars || theme).palette[ownerState.color].main
|
|
70
58
|
}
|
|
71
59
|
}, {
|
|
72
60
|
props: ({
|
|
73
|
-
ownerState
|
|
74
|
-
|
|
61
|
+
ownerState,
|
|
62
|
+
color
|
|
63
|
+
}) => ownerState.variant !== 'buffer' && color === 'inherit',
|
|
75
64
|
style: {
|
|
76
|
-
backgroundColor:
|
|
65
|
+
backgroundColor: 'currentColor'
|
|
77
66
|
}
|
|
78
67
|
}]
|
|
79
68
|
}));
|
|
80
69
|
const ExpandMore = styled(props => {
|
|
81
|
-
const
|
|
82
|
-
|
|
70
|
+
const {
|
|
71
|
+
expand,
|
|
72
|
+
...other
|
|
73
|
+
} = props;
|
|
74
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(IconButton, {
|
|
75
|
+
...other
|
|
76
|
+
});
|
|
83
77
|
})(({
|
|
84
78
|
theme
|
|
85
79
|
}) => ({
|
|
80
|
+
transform: 'rotate(180deg)',
|
|
86
81
|
marginLeft: 'auto',
|
|
87
82
|
transition: theme.transitions.create('transform', {
|
|
88
83
|
duration: theme.transitions.duration.shortest
|
|
@@ -94,13 +89,6 @@ const ExpandMore = styled(props => {
|
|
|
94
89
|
style: {
|
|
95
90
|
transform: 'rotate(0deg)'
|
|
96
91
|
}
|
|
97
|
-
}, {
|
|
98
|
-
props: ({
|
|
99
|
-
expand
|
|
100
|
-
}) => !!expand,
|
|
101
|
-
style: {
|
|
102
|
-
transform: 'rotate(180deg)'
|
|
103
|
-
}
|
|
104
92
|
}]
|
|
105
93
|
}));
|
|
106
94
|
const Main = styled('main', {
|
|
@@ -203,4 +191,41 @@ const StyledAppContainer = styled(AppContainer, {
|
|
|
203
191
|
}
|
|
204
192
|
}]
|
|
205
193
|
};
|
|
206
|
-
});
|
|
194
|
+
});
|
|
195
|
+
const DialogContentRoot = styled('div', {
|
|
196
|
+
name: 'MuiDialogContent',
|
|
197
|
+
slot: 'Root',
|
|
198
|
+
overridesResolver: (props, styles) => {
|
|
199
|
+
const {
|
|
200
|
+
ownerState
|
|
201
|
+
} = props;
|
|
202
|
+
return [styles.root, ownerState.dividers && styles.dividers];
|
|
203
|
+
}
|
|
204
|
+
})(({
|
|
205
|
+
theme
|
|
206
|
+
}) => ({
|
|
207
|
+
flex: '1 1 auto',
|
|
208
|
+
// Add iOS momentum scrolling for iOS < 13.0
|
|
209
|
+
WebkitOverflowScrolling: 'touch',
|
|
210
|
+
overflowY: 'auto',
|
|
211
|
+
padding: '20px 24px',
|
|
212
|
+
variants: [{
|
|
213
|
+
props: ({
|
|
214
|
+
ownerState
|
|
215
|
+
}) => ownerState.dividers,
|
|
216
|
+
style: {
|
|
217
|
+
padding: '16px 24px',
|
|
218
|
+
borderTop: `1px solid ${(theme.vars || theme).palette.divider}`,
|
|
219
|
+
borderBottom: `1px solid ${(theme.vars || theme).palette.divider}`
|
|
220
|
+
}
|
|
221
|
+
}, {
|
|
222
|
+
props: ({
|
|
223
|
+
ownerState
|
|
224
|
+
}) => !ownerState.dividers,
|
|
225
|
+
style: {
|
|
226
|
+
[`.${dialogTitleClasses.root} + &`]: {
|
|
227
|
+
paddingTop: 0
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
}]
|
|
231
|
+
}));
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _styles = require("@mui/material/styles");
|
|
8
|
+
const DemoToolbarRoot = (0, _styles.styled)('div', {
|
|
9
|
+
shouldForwardProp: prop => prop !== 'demoOptions' && prop !== 'openDemoSource'
|
|
10
|
+
})(({
|
|
11
|
+
theme,
|
|
12
|
+
demoOptions,
|
|
13
|
+
openDemoSource
|
|
14
|
+
}) => [{
|
|
15
|
+
display: 'none',
|
|
16
|
+
[theme.breakpoints.up('sm')]: {
|
|
17
|
+
top: 0,
|
|
18
|
+
maxHeight: 50,
|
|
19
|
+
display: 'block',
|
|
20
|
+
marginTop: demoOptions.bg === 'inline' ? theme.spacing(1) : -1,
|
|
21
|
+
padding: theme.spacing(0.5, 1),
|
|
22
|
+
border: `1px solid ${(theme.vars || theme).palette.divider}`,
|
|
23
|
+
borderTopWidth: demoOptions.bg === 'inline' ? 1 : 0,
|
|
24
|
+
backgroundColor: (0, _styles.alpha)(theme.palette.grey[50], 0.2),
|
|
25
|
+
borderRadius: openDemoSource ? 0 : '0 0 12px 12px',
|
|
26
|
+
transition: theme.transitions.create('border-radius'),
|
|
27
|
+
...(theme.direction === 'rtl' && {
|
|
28
|
+
left: theme.spacing(1)
|
|
29
|
+
}),
|
|
30
|
+
...(theme.direction !== 'rtl' && {
|
|
31
|
+
right: theme.spacing(1)
|
|
32
|
+
})
|
|
33
|
+
}
|
|
34
|
+
}, theme.applyDarkStyles({
|
|
35
|
+
[theme.breakpoints.up('sm')]: {
|
|
36
|
+
backgroundColor: (0, _styles.alpha)(theme.palette.primaryDark[800], 0.2)
|
|
37
|
+
}
|
|
38
|
+
})]);
|
|
39
|
+
var _default = exports.default = DemoToolbarRoot;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _styles = require("@mui/material/styles");
|
|
8
|
+
const DemoToolbarRoot = (0, _styles.styled)('div', {
|
|
9
|
+
shouldForwardProp: prop => prop !== 'demoOptions' && prop !== 'openDemoSource'
|
|
10
|
+
})(({
|
|
11
|
+
theme
|
|
12
|
+
}) => [{
|
|
13
|
+
display: 'none',
|
|
14
|
+
[theme.breakpoints.up('sm')]: {
|
|
15
|
+
top: 0,
|
|
16
|
+
maxHeight: 50,
|
|
17
|
+
display: 'block',
|
|
18
|
+
marginTop: -1,
|
|
19
|
+
padding: theme.spacing(0.5, 1),
|
|
20
|
+
border: `1px solid ${(theme.vars || theme).palette.divider}`,
|
|
21
|
+
borderTopWidth: 0,
|
|
22
|
+
backgroundColor: (0, _styles.alpha)(theme.palette.grey[50], 0.2),
|
|
23
|
+
borderRadius: '0 0 12px 12px',
|
|
24
|
+
transition: theme.transitions.create('border-radius'),
|
|
25
|
+
...theme.applyStyles("rtl", {
|
|
26
|
+
left: theme.spacing(1)
|
|
27
|
+
}),
|
|
28
|
+
...theme.applyStyles("rtl", {
|
|
29
|
+
right: theme.spacing(1)
|
|
30
|
+
})
|
|
31
|
+
},
|
|
32
|
+
variants: [{
|
|
33
|
+
props: {
|
|
34
|
+
bg: 'inline'
|
|
35
|
+
},
|
|
36
|
+
style: {
|
|
37
|
+
[theme.breakpoints.up('sm')]: {
|
|
38
|
+
marginTop: theme.spacing(1)
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}, {
|
|
42
|
+
props: {
|
|
43
|
+
bg: 'inline'
|
|
44
|
+
},
|
|
45
|
+
style: {
|
|
46
|
+
[theme.breakpoints.up('sm')]: {
|
|
47
|
+
borderTopWidth: 1
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}, {
|
|
51
|
+
props: ({
|
|
52
|
+
openDemoSource
|
|
53
|
+
}) => openDemoSource,
|
|
54
|
+
style: {
|
|
55
|
+
[theme.breakpoints.up('sm')]: {
|
|
56
|
+
borderRadius: 0
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}]
|
|
60
|
+
}, theme.applyDarkStyles({
|
|
61
|
+
[theme.breakpoints.up('sm')]: {
|
|
62
|
+
backgroundColor: (0, _styles.alpha)(theme.palette.primaryDark[800], 0.2)
|
|
63
|
+
}
|
|
64
|
+
})]);
|
|
65
|
+
var _default = exports.default = DemoToolbarRoot;
|
|
@@ -25,4 +25,34 @@ const ToolbarRoot = styled('div', {
|
|
|
25
25
|
disabled
|
|
26
26
|
}) => ownerState.variant !== 'regular' && !disabled && theme.mixins.toolbar4, ({
|
|
27
27
|
theme
|
|
28
|
-
}) => theme.vars && theme.mixins.toolbar5);
|
|
28
|
+
}) => theme.vars && theme.mixins.toolbar5);
|
|
29
|
+
const ToggleButton = styled('button')(({
|
|
30
|
+
theme,
|
|
31
|
+
'aria-pressed': pressed = 'false'
|
|
32
|
+
}) => ({
|
|
33
|
+
padding: '0.5rem 1rem',
|
|
34
|
+
borderRadius: theme.vars.radius.sm,
|
|
35
|
+
display: 'inline-flex',
|
|
36
|
+
justifyContent: 'center',
|
|
37
|
+
gap: '8px',
|
|
38
|
+
minHeight: 40,
|
|
39
|
+
fontFamily: theme.vars.fontFamily.body,
|
|
40
|
+
fontSize: theme.vars.fontSize.md,
|
|
41
|
+
fontWeight: theme.vars.fontWeight.md,
|
|
42
|
+
alignItems: 'center',
|
|
43
|
+
border: '1px solid',
|
|
44
|
+
borderColor: theme.vars.palette.neutral.outlinedBorder,
|
|
45
|
+
backgroundColor: theme.vars.palette.background.body,
|
|
46
|
+
boxShadow: theme.vars.shadow.md,
|
|
47
|
+
[theme.focus.selector]: theme.focus.default,
|
|
48
|
+
...theme.variants.plain.neutral,
|
|
49
|
+
...(pressed === 'false' && {
|
|
50
|
+
'&:hover': theme.variants.plainHover.neutral,
|
|
51
|
+
'&:active': theme.variants.plainActive.neutral
|
|
52
|
+
}),
|
|
53
|
+
...(pressed === 'true' && {
|
|
54
|
+
color: theme.vars.palette.danger.plainColor,
|
|
55
|
+
backgroundColor: theme.vars.palette.background.body,
|
|
56
|
+
boxShadow: theme.shadow.sm.replace(/,/g, ', inset')
|
|
57
|
+
})
|
|
58
|
+
}));
|
|
@@ -49,4 +49,42 @@ const ToolbarRoot = styled('div', {
|
|
|
49
49
|
}]
|
|
50
50
|
}), ({
|
|
51
51
|
theme
|
|
52
|
-
}) => theme.vars && theme.mixins.toolbar5);
|
|
52
|
+
}) => theme.vars && theme.mixins.toolbar5);
|
|
53
|
+
const ToggleButton = styled('button')(({
|
|
54
|
+
theme
|
|
55
|
+
}) => ({
|
|
56
|
+
padding: '0.5rem 1rem',
|
|
57
|
+
borderRadius: theme.vars.radius.sm,
|
|
58
|
+
display: 'inline-flex',
|
|
59
|
+
justifyContent: 'center',
|
|
60
|
+
gap: '8px',
|
|
61
|
+
minHeight: 40,
|
|
62
|
+
fontFamily: theme.vars.fontFamily.body,
|
|
63
|
+
fontSize: theme.vars.fontSize.md,
|
|
64
|
+
fontWeight: theme.vars.fontWeight.md,
|
|
65
|
+
alignItems: 'center',
|
|
66
|
+
border: '1px solid',
|
|
67
|
+
borderColor: theme.vars.palette.neutral.outlinedBorder,
|
|
68
|
+
backgroundColor: theme.vars.palette.background.body,
|
|
69
|
+
boxShadow: theme.vars.shadow.md,
|
|
70
|
+
[theme.focus.selector]: theme.focus.default,
|
|
71
|
+
...theme.variants.plain.neutral,
|
|
72
|
+
variants: [{
|
|
73
|
+
props: {
|
|
74
|
+
"aria-pressed": 'false'
|
|
75
|
+
},
|
|
76
|
+
style: {
|
|
77
|
+
'&:hover': theme.variants.plainHover.neutral,
|
|
78
|
+
'&:active': theme.variants.plainActive.neutral
|
|
79
|
+
}
|
|
80
|
+
}, {
|
|
81
|
+
props: {
|
|
82
|
+
"aria-pressed": 'true'
|
|
83
|
+
},
|
|
84
|
+
style: {
|
|
85
|
+
color: theme.vars.palette.danger.plainColor,
|
|
86
|
+
backgroundColor: theme.vars.palette.background.body,
|
|
87
|
+
boxShadow: theme.shadow.sm.replace(/,/g, ', inset')
|
|
88
|
+
}
|
|
89
|
+
}]
|
|
90
|
+
}));
|
|
@@ -1,42 +1,47 @@
|
|
|
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
|
-
|
|
10
|
-
|
|
11
|
-
return (0, _extends2.default)({
|
|
7
|
+
const palette = (theme.vars || theme).palette?.[ownerState.color];
|
|
8
|
+
return {
|
|
12
9
|
overflow: 'visible',
|
|
13
10
|
// Explicitly set the default value to solve a bug on IE11.
|
|
14
11
|
color: (theme.vars || theme).palette.action.active,
|
|
15
12
|
transition: theme.transitions.create('background-color', {
|
|
16
13
|
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'
|
|
14
|
+
}),
|
|
15
|
+
...(!ownerState.disableRipple && {
|
|
16
|
+
'&:hover': {
|
|
17
|
+
backgroundColor: theme.vars ? `rgba(${theme.vars.palette.action.activeChannel} / ${theme.vars.palette.action.hoverOpacity})` : alpha(theme.palette.action.active, theme.palette.action.hoverOpacity),
|
|
18
|
+
// Reset on touch devices, it doesn't add specificity
|
|
19
|
+
'@media (hover: none)': {
|
|
20
|
+
backgroundColor: 'transparent'
|
|
21
|
+
}
|
|
39
22
|
}
|
|
23
|
+
}),
|
|
24
|
+
...(ownerState.edge === 'start' && {
|
|
25
|
+
marginLeft: ownerState.size === 'small' ? -3 : -12
|
|
26
|
+
}),
|
|
27
|
+
...(ownerState.edge === 'end' && {
|
|
28
|
+
marginRight: ownerState.size === 'small' ? -3 : -12
|
|
29
|
+
}),
|
|
30
|
+
...(ownerState.color !== 'inherit' && ownerState.color !== 'default' && {
|
|
31
|
+
color: palette?.main,
|
|
32
|
+
...(!ownerState.disableRipple && {
|
|
33
|
+
'&:hover': {
|
|
34
|
+
// The codemod won't handle this case when the variable is not declared in the style argument.
|
|
35
|
+
// In this case, the `palette` create a new variable in the style argument.
|
|
36
|
+
...(palette && {
|
|
37
|
+
backgroundColor: theme.vars ? `rgba(${palette.mainChannel} / ${theme.vars.palette.action.hoverOpacity})` : alpha(palette.main, theme.palette.action.hoverOpacity)
|
|
38
|
+
}),
|
|
39
|
+
// Reset on touch devices, it doesn't add specificity
|
|
40
|
+
'@media (hover: none)': {
|
|
41
|
+
backgroundColor: 'transparent'
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
})
|
|
40
45
|
})
|
|
41
|
-
}
|
|
46
|
+
};
|
|
42
47
|
});
|
|
@@ -1,12 +1,9 @@
|
|
|
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
|
}) => {
|
|
8
|
-
|
|
9
|
-
const palette = (_palette = (theme.vars || theme).palette) == null ? void 0 : _palette[ownerState.color];
|
|
6
|
+
const palette = (theme.vars || theme).palette?.[ownerState.color];
|
|
10
7
|
return {
|
|
11
8
|
// Explicitly set the default value to solve a bug on IE11.
|
|
12
9
|
overflow: 'visible',
|
|
@@ -27,6 +24,13 @@ const Component = styled('div')(({
|
|
|
27
24
|
}
|
|
28
25
|
}
|
|
29
26
|
}
|
|
27
|
+
}, {
|
|
28
|
+
props: {
|
|
29
|
+
edge: 'start'
|
|
30
|
+
},
|
|
31
|
+
style: {
|
|
32
|
+
marginLeft: -12
|
|
33
|
+
}
|
|
30
34
|
}, {
|
|
31
35
|
props: {
|
|
32
36
|
edge: 'start',
|
|
@@ -36,12 +40,11 @@ const Component = styled('div')(({
|
|
|
36
40
|
marginLeft: -3
|
|
37
41
|
}
|
|
38
42
|
}, {
|
|
39
|
-
props:
|
|
40
|
-
edge
|
|
41
|
-
|
|
42
|
-
}) => edge === 'start' && ownerState.size !== 'small',
|
|
43
|
+
props: {
|
|
44
|
+
edge: 'end'
|
|
45
|
+
},
|
|
43
46
|
style: {
|
|
44
|
-
|
|
47
|
+
marginRight: -12
|
|
45
48
|
}
|
|
46
49
|
}, {
|
|
47
50
|
props: {
|
|
@@ -51,34 +54,29 @@ const Component = styled('div')(({
|
|
|
51
54
|
style: {
|
|
52
55
|
marginRight: -3
|
|
53
56
|
}
|
|
54
|
-
}, {
|
|
55
|
-
props: ({
|
|
56
|
-
edge,
|
|
57
|
-
ownerState
|
|
58
|
-
}) => edge === 'end' && ownerState.size !== 'small',
|
|
59
|
-
style: {
|
|
60
|
-
marginRight: -12
|
|
61
|
-
}
|
|
62
57
|
}, {
|
|
63
58
|
props: ({
|
|
64
59
|
ownerState
|
|
65
60
|
}) => ownerState.color !== 'inherit' && ownerState.color !== 'default',
|
|
66
61
|
style: {
|
|
67
|
-
color: palette
|
|
62
|
+
color: palette?.main
|
|
68
63
|
}
|
|
69
64
|
}, {
|
|
70
65
|
props: ({
|
|
71
66
|
ownerState
|
|
72
67
|
}) => ownerState.color !== 'inherit' && ownerState.color !== 'default' && !ownerState.disableRipple,
|
|
73
68
|
style: {
|
|
74
|
-
'&:hover':
|
|
75
|
-
|
|
76
|
-
|
|
69
|
+
'&:hover': {
|
|
70
|
+
// The codemod won't handle this case when the variable is not declared in the style argument.
|
|
71
|
+
// In this case, the `palette` create a new variable in the style argument.
|
|
72
|
+
...(palette && {
|
|
73
|
+
backgroundColor: theme.vars ? `rgba(${palette.mainChannel} / ${theme.vars.palette.action.hoverOpacity})` : alpha(palette.main, theme.palette.action.hoverOpacity)
|
|
74
|
+
}),
|
|
77
75
|
// Reset on touch devices, it doesn't add specificity
|
|
78
76
|
'@media (hover: none)': {
|
|
79
77
|
backgroundColor: 'transparent'
|
|
80
78
|
}
|
|
81
|
-
}
|
|
79
|
+
}
|
|
82
80
|
}
|
|
83
81
|
}]
|
|
84
82
|
};
|