@mui/codemod 6.0.0-alpha.0 → 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 +742 -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/badge-props.js +22 -0
- package/node/deprecations/badge-props/index.js +13 -0
- package/node/deprecations/badge-props/test-cases/actual.js +59 -0
- package/node/deprecations/badge-props/test-cases/expected.js +51 -0
- package/node/deprecations/badge-props/test-cases/theme.actual.js +73 -0
- package/node/deprecations/badge-props/test-cases/theme.expected.js +65 -0
- 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/all/index.js +13 -0
- package/node/v6.0.0/all/postcss.config.js +9 -0
- package/node/v6.0.0/all/v6-all.js +17 -0
- 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 +9 -9
|
@@ -5,7 +5,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.default = AppSearch;
|
|
8
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
8
|
var React = _interopRequireWildcard(require("react"));
|
|
10
9
|
var _reactDom = require("react-dom");
|
|
11
10
|
var _helpers = require("docs/src/modules/utils/helpers");
|
|
@@ -351,11 +350,12 @@ function AppSearch() {
|
|
|
351
350
|
canonicalAs,
|
|
352
351
|
canonicalPathname
|
|
353
352
|
} = (0, _helpers.pathnameToLanguage)(`${parseUrl.pathname}${parseUrl.hash}`);
|
|
354
|
-
return
|
|
353
|
+
return {
|
|
354
|
+
...item,
|
|
355
355
|
pathname: canonicalPathname,
|
|
356
356
|
as: canonicalAs,
|
|
357
357
|
userLanguage
|
|
358
|
-
}
|
|
358
|
+
};
|
|
359
359
|
});
|
|
360
360
|
},
|
|
361
361
|
hitComponent: DocSearchHit,
|
|
@@ -433,16 +433,16 @@ function AppSearch() {
|
|
|
433
433
|
transition: 'margin 0.2s',
|
|
434
434
|
fontSize: theme.typography.pxToRem(16)
|
|
435
435
|
},
|
|
436
|
-
'& .DocSearch-Modal':
|
|
436
|
+
'& .DocSearch-Modal': {
|
|
437
437
|
maxWidth: '700px',
|
|
438
|
-
boxShadow: `0px 4px 20px ${theme.palette.mode === 'dark' ? (0, _styles.alpha)(theme.palette.background.paper, 0.7) : (0, _styles.alpha)(theme.palette.grey[700], 0.2)}
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
438
|
+
boxShadow: `0px 4px 20px ${theme.palette.mode === 'dark' ? (0, _styles.alpha)(theme.palette.background.paper, 0.7) : (0, _styles.alpha)(theme.palette.grey[700], 0.2)}`,
|
|
439
|
+
...(theme.palette.mode === 'dark' && {
|
|
440
|
+
border: '1px solid',
|
|
441
|
+
borderColor: theme.palette.primaryDark[700]
|
|
442
|
+
}),
|
|
443
443
|
// docsearch.css: <= 750px will be full screen modal
|
|
444
444
|
borderRadius: `clamp(0px, (100vw - 750px) * 9999, ${theme.shape.borderRadius}px)`
|
|
445
|
-
}
|
|
445
|
+
},
|
|
446
446
|
'& .DocSearch-SearchBar': {
|
|
447
447
|
borderBottom: '1px solid',
|
|
448
448
|
borderColor: theme.palette.mode === 'dark' ? theme.palette.primaryDark[700] : theme.palette.grey[200],
|
|
@@ -5,7 +5,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.default = AppSearch;
|
|
8
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
8
|
var React = _interopRequireWildcard(require("react"));
|
|
10
9
|
var _reactDom = require("react-dom");
|
|
11
10
|
var _helpers = require("docs/src/modules/utils/helpers");
|
|
@@ -351,11 +350,12 @@ function AppSearch() {
|
|
|
351
350
|
canonicalAs,
|
|
352
351
|
canonicalPathname
|
|
353
352
|
} = (0, _helpers.pathnameToLanguage)(`${parseUrl.pathname}${parseUrl.hash}`);
|
|
354
|
-
return
|
|
353
|
+
return {
|
|
354
|
+
...item,
|
|
355
355
|
pathname: canonicalPathname,
|
|
356
356
|
as: canonicalAs,
|
|
357
357
|
userLanguage
|
|
358
|
-
}
|
|
358
|
+
};
|
|
359
359
|
});
|
|
360
360
|
},
|
|
361
361
|
hitComponent: DocSearchHit,
|
|
@@ -433,16 +433,16 @@ function AppSearch() {
|
|
|
433
433
|
transition: 'margin 0.2s',
|
|
434
434
|
fontSize: theme.typography.pxToRem(16)
|
|
435
435
|
},
|
|
436
|
-
'& .DocSearch-Modal':
|
|
436
|
+
'& .DocSearch-Modal': {
|
|
437
437
|
maxWidth: '700px',
|
|
438
|
-
boxShadow: `0px 4px 20px ${theme.palette.mode === 'dark' ? (0, _styles.alpha)(theme.palette.background.paper, 0.7) : (0, _styles.alpha)(theme.palette.grey[700], 0.2)}
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
438
|
+
boxShadow: `0px 4px 20px ${theme.palette.mode === 'dark' ? (0, _styles.alpha)(theme.palette.background.paper, 0.7) : (0, _styles.alpha)(theme.palette.grey[700], 0.2)}`,
|
|
439
|
+
...(theme.palette.mode === 'dark' && {
|
|
440
|
+
border: '1px solid',
|
|
441
|
+
borderColor: theme.palette.primaryDark[700]
|
|
442
|
+
}),
|
|
443
443
|
// docsearch.css: <= 750px will be full screen modal
|
|
444
444
|
borderRadius: `clamp(0px, (100vw - 750px) * 9999, ${theme.shape.borderRadius}px)`
|
|
445
|
-
}
|
|
445
|
+
},
|
|
446
446
|
'& .DocSearch-SearchBar': {
|
|
447
447
|
borderBottom: '1px solid',
|
|
448
448
|
borderColor: theme.palette.mode === 'dark' ? theme.palette.primaryDark[700] : theme.palette.grey[200],
|
|
@@ -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
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
Object.defineProperty(exports, "default", {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: function () {
|
|
10
|
+
return _v6All.default;
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
var _v6All = _interopRequireDefault(require("./v6-all"));
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = v6All;
|
|
7
|
+
/**
|
|
8
|
+
* @param {import('jscodeshift').FileInfo} file
|
|
9
|
+
* @param {import('jscodeshift').API} api
|
|
10
|
+
*/
|
|
11
|
+
function v6All(file) {
|
|
12
|
+
// Currently empty, when adding the first codemod:
|
|
13
|
+
// - Read mui-codemod/CONTRIBUTING.md
|
|
14
|
+
// - Follow mui-codemod/src/deprecations/all/deprecations-all.js as a guide
|
|
15
|
+
// - Remove this comment
|
|
16
|
+
return file.source;
|
|
17
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
Object.defineProperty(exports, "default", {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: function () {
|
|
10
|
+
return _styledV.default;
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
var _styledV = _interopRequireDefault(require("./styled-v6"));
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = styledV6;
|
|
8
|
+
var _migrateToVariants = _interopRequireDefault(require("../../util/migrateToVariants"));
|
|
9
|
+
/**
|
|
10
|
+
* @param {import('jscodeshift').FileInfo} file
|
|
11
|
+
* @param {import('jscodeshift').API} api
|
|
12
|
+
*/
|
|
13
|
+
function styledV6(file, api, options) {
|
|
14
|
+
const j = api.jscodeshift;
|
|
15
|
+
const root = j(file.source);
|
|
16
|
+
const printOptions = options.printOptions;
|
|
17
|
+
let shouldTransform = false;
|
|
18
|
+
root.find(j.CallExpression).forEach(path => {
|
|
19
|
+
const styles = [];
|
|
20
|
+
let args = [];
|
|
21
|
+
|
|
22
|
+
// styled('div')(...arguments)
|
|
23
|
+
if (path.node.callee.type === 'Identifier' && path.node.callee.name === 'styled' && path.parentPath.node.type === 'CallExpression') {
|
|
24
|
+
args = path.parentPath.node.arguments;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
// styled.div(...arguments)
|
|
28
|
+
if (path.node.callee.type === 'MemberExpression' && path.node.callee.object.type === 'Identifier' && path.node.callee.object.name === 'styled') {
|
|
29
|
+
args = path.node.arguments;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
// 1. collecting styles that should be tranformed
|
|
33
|
+
args.forEach(arg => {
|
|
34
|
+
if (arg.type === 'ArrowFunctionExpression' && arg.params[0] && arg.params[0].type === 'ObjectPattern') {
|
|
35
|
+
styles.push(arg);
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
if (!shouldTransform && styles.length > 0) {
|
|
39
|
+
shouldTransform = true;
|
|
40
|
+
}
|
|
41
|
+
(0, _migrateToVariants.default)(j, styles);
|
|
42
|
+
|
|
43
|
+
// Replace arrow function with object expression if the arg properties is empty
|
|
44
|
+
args.forEach((arg, index) => {
|
|
45
|
+
if (arg.type === 'ArrowFunctionExpression' && arg.params[0] && arg.params[0].type === 'ObjectPattern' && arg.params[0].properties.length === 0) {
|
|
46
|
+
if (arg.body.type === 'ObjectExpression') {
|
|
47
|
+
args[index] = arg.body;
|
|
48
|
+
}
|
|
49
|
+
if (arg.body.type === 'BlockStatement') {
|
|
50
|
+
const returnStatement = arg.body.body.find(item => item.type === 'ReturnStatement');
|
|
51
|
+
if (returnStatement) {
|
|
52
|
+
args[index] = returnStatement.argument;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
});
|
|
58
|
+
const transformed = root.toSource(printOptions);
|
|
59
|
+
if (shouldTransform) {
|
|
60
|
+
// recast adds extra newlines that we don't want, https://github.com/facebook/jscodeshift/issues/249
|
|
61
|
+
// need to remove them manually
|
|
62
|
+
const lines = [];
|
|
63
|
+
let isInStyled = false;
|
|
64
|
+
transformed.split('\n').forEach((line, index, array) => {
|
|
65
|
+
if (!isInStyled) {
|
|
66
|
+
lines.push(line);
|
|
67
|
+
} else if (line !== '' || line === '' && array[index + 1] && array[index + 1].includes('return')) {
|
|
68
|
+
if (line.match(/^}\)+(\({}\)|\(\))?;?$/) || line.match(/^\);?$/)) {
|
|
69
|
+
isInStyled = false;
|
|
70
|
+
}
|
|
71
|
+
lines.push(line);
|
|
72
|
+
}
|
|
73
|
+
if (line.includes('styled.') || line.includes('styled(')) {
|
|
74
|
+
isInStyled = true;
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
return lines.join('\n');
|
|
78
|
+
}
|
|
79
|
+
return transformed;
|
|
80
|
+
}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
const FormHelperTextRoot = styled('p')(({
|
|
4
|
+
theme,
|
|
5
|
+
ownerState,
|
|
6
|
+
disabled
|
|
7
|
+
}) => ({
|
|
8
|
+
color: (theme.vars || theme).palette.text.secondary,
|
|
9
|
+
...theme.typography.caption,
|
|
10
|
+
textAlign: 'left',
|
|
11
|
+
[`&.${formHelperTextClasses.disabled}`]: {
|
|
12
|
+
color: (theme.vars || theme).palette.text.disabled
|
|
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
|
+
})
|
|
40
|
+
}));
|
|
41
|
+
const Component = styled.div(({
|
|
42
|
+
theme,
|
|
43
|
+
ownerState
|
|
44
|
+
}) => ({
|
|
45
|
+
...theme.typography.caption,
|
|
46
|
+
...(ownerState.size === 'small' && {
|
|
47
|
+
marginTop: (theme.vars || theme).spacing(1)
|
|
48
|
+
})
|
|
49
|
+
}));
|
|
50
|
+
const ImageListRoot = styled('ul')(({
|
|
51
|
+
ownerState
|
|
52
|
+
}) => {
|
|
53
|
+
return {
|
|
54
|
+
display: 'grid',
|
|
55
|
+
overflowY: 'auto',
|
|
56
|
+
listStyle: 'none',
|
|
57
|
+
padding: 0,
|
|
58
|
+
// Add iOS momentum scrolling for iOS < 13.0
|
|
59
|
+
WebkitOverflowScrolling: 'touch',
|
|
60
|
+
...(ownerState.variant === 'masonry' && {
|
|
61
|
+
display: 'block'
|
|
62
|
+
})
|
|
63
|
+
};
|
|
64
|
+
});
|
|
65
|
+
const ImageListItemRoot = styled('li')(({
|
|
66
|
+
ownerState
|
|
67
|
+
}) => ({
|
|
68
|
+
display: 'block',
|
|
69
|
+
position: 'relative',
|
|
70
|
+
[`& .${imageListItemClasses.img}`]: {
|
|
71
|
+
objectFit: 'cover',
|
|
72
|
+
width: '100%',
|
|
73
|
+
height: '100%',
|
|
74
|
+
display: 'block',
|
|
75
|
+
...(ownerState.variant === 'standard' && {
|
|
76
|
+
height: 'auto',
|
|
77
|
+
flexGrow: 1
|
|
78
|
+
}),
|
|
79
|
+
'&:hover': {
|
|
80
|
+
'&[data-shape="circular"]': {
|
|
81
|
+
borderRadius: '50%',
|
|
82
|
+
...(ownerState.variant === 'unique' && {
|
|
83
|
+
height: 'auto',
|
|
84
|
+
flexGrow: 1
|
|
85
|
+
})
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}));
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
const FormHelperTextRoot = styled('p')(({
|
|
4
|
+
theme
|
|
5
|
+
}) => ({
|
|
6
|
+
color: (theme.vars || theme).palette.text.secondary,
|
|
7
|
+
...theme.typography.caption,
|
|
8
|
+
textAlign: 'left',
|
|
9
|
+
[`&.${formHelperTextClasses.disabled}`]: {
|
|
10
|
+
color: (theme.vars || theme).palette.text.disabled
|
|
11
|
+
},
|
|
12
|
+
variants: [{
|
|
13
|
+
props: {
|
|
14
|
+
size: 'small'
|
|
15
|
+
},
|
|
16
|
+
style: {
|
|
17
|
+
marginTop: 4
|
|
18
|
+
}
|
|
19
|
+
}, {
|
|
20
|
+
props: {
|
|
21
|
+
variant: 'contained',
|
|
22
|
+
size: 'small'
|
|
23
|
+
},
|
|
24
|
+
style: {
|
|
25
|
+
marginTop: 6
|
|
26
|
+
}
|
|
27
|
+
}, {
|
|
28
|
+
props: ({
|
|
29
|
+
disabled,
|
|
30
|
+
ownerState
|
|
31
|
+
}) => ownerState.size === 'small' && ownerState.variant === 'contained' && disabled,
|
|
32
|
+
style: {
|
|
33
|
+
marginTop: 6
|
|
34
|
+
}
|
|
35
|
+
}, {
|
|
36
|
+
props: ({
|
|
37
|
+
ownerState
|
|
38
|
+
}) => ownerState.size !== 'small',
|
|
39
|
+
style: {
|
|
40
|
+
marginBottom: 4
|
|
41
|
+
}
|
|
42
|
+
}, {
|
|
43
|
+
props: ({
|
|
44
|
+
disabled,
|
|
45
|
+
ownerState
|
|
46
|
+
}) => ownerState.size !== 'small' && ownerState.variant !== 'contained' && !disabled,
|
|
47
|
+
style: {
|
|
48
|
+
marginBottom: 6
|
|
49
|
+
}
|
|
50
|
+
}, {
|
|
51
|
+
props: ({
|
|
52
|
+
ownerState
|
|
53
|
+
}) => ownerState.contained,
|
|
54
|
+
style: {
|
|
55
|
+
marginLeft: 14,
|
|
56
|
+
marginRight: 14
|
|
57
|
+
}
|
|
58
|
+
}, {
|
|
59
|
+
props: ({
|
|
60
|
+
ownerState
|
|
61
|
+
}) => !ownerState.contained,
|
|
62
|
+
style: {
|
|
63
|
+
marginTop: 14,
|
|
64
|
+
marginBottom: 14
|
|
65
|
+
}
|
|
66
|
+
}, {
|
|
67
|
+
props: ({
|
|
68
|
+
ownerState
|
|
69
|
+
}) => !!ownerState.disabled,
|
|
70
|
+
style: {
|
|
71
|
+
opacity: 0.5
|
|
72
|
+
}
|
|
73
|
+
}]
|
|
74
|
+
}));
|
|
75
|
+
const Component = styled.div(({
|
|
76
|
+
theme
|
|
77
|
+
}) => ({
|
|
78
|
+
...theme.typography.caption,
|
|
79
|
+
variants: [{
|
|
80
|
+
props: {
|
|
81
|
+
size: 'small'
|
|
82
|
+
},
|
|
83
|
+
style: {
|
|
84
|
+
marginTop: (theme.vars || theme).spacing(1)
|
|
85
|
+
}
|
|
86
|
+
}]
|
|
87
|
+
}));
|
|
88
|
+
const ImageListRoot = styled('ul')({
|
|
89
|
+
display: 'grid',
|
|
90
|
+
overflowY: 'auto',
|
|
91
|
+
listStyle: 'none',
|
|
92
|
+
padding: 0,
|
|
93
|
+
// Add iOS momentum scrolling for iOS < 13.0
|
|
94
|
+
WebkitOverflowScrolling: 'touch',
|
|
95
|
+
variants: [{
|
|
96
|
+
props: {
|
|
97
|
+
variant: 'masonry'
|
|
98
|
+
},
|
|
99
|
+
style: {
|
|
100
|
+
display: 'block'
|
|
101
|
+
}
|
|
102
|
+
}]
|
|
103
|
+
});
|
|
104
|
+
const ImageListItemRoot = styled('li')({
|
|
105
|
+
display: 'block',
|
|
106
|
+
position: 'relative',
|
|
107
|
+
[`& .${imageListItemClasses.img}`]: {
|
|
108
|
+
objectFit: 'cover',
|
|
109
|
+
width: '100%',
|
|
110
|
+
height: '100%',
|
|
111
|
+
display: 'block',
|
|
112
|
+
'&:hover': {
|
|
113
|
+
'&[data-shape="circular"]': {
|
|
114
|
+
borderRadius: '50%'
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
variants: [{
|
|
119
|
+
props: {
|
|
120
|
+
variant: 'standard'
|
|
121
|
+
},
|
|
122
|
+
style: {
|
|
123
|
+
[`& .${imageListItemClasses.img}`]: {
|
|
124
|
+
height: 'auto',
|
|
125
|
+
flexGrow: 1
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
}, {
|
|
129
|
+
props: {
|
|
130
|
+
variant: 'unique'
|
|
131
|
+
},
|
|
132
|
+
style: {
|
|
133
|
+
[`& .${imageListItemClasses.img}`]: {
|
|
134
|
+
'&:hover': {
|
|
135
|
+
'&[data-shape="circular"]': {
|
|
136
|
+
height: 'auto',
|
|
137
|
+
flexGrow: 1
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
}]
|
|
143
|
+
});
|