@mui/material 6.0.0-alpha.4 → 6.0.0-alpha.6

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.
Files changed (272) hide show
  1. package/Accordion/Accordion.d.ts +2 -2
  2. package/Accordion/Accordion.js +2 -2
  3. package/AccordionSummary/accordionSummaryClasses.d.ts +1 -1
  4. package/Alert/Alert.d.ts +2 -2
  5. package/Alert/Alert.js +2 -2
  6. package/Alert/alertClasses.d.ts +12 -12
  7. package/Avatar/Avatar.d.ts +1 -1
  8. package/Avatar/Avatar.js +1 -1
  9. package/Backdrop/Backdrop.d.ts +1 -1
  10. package/Backdrop/Backdrop.js +1 -1
  11. package/Badge/Badge.d.ts +2 -2
  12. package/Badge/Badge.js +2 -2
  13. package/Breadcrumbs/BreadcrumbCollapsed.js +1 -1
  14. package/Button/Button.js +1 -1
  15. package/Button/buttonClasses.d.ts +33 -33
  16. package/ButtonGroup/buttonGroupClasses.d.ts +17 -17
  17. package/CHANGELOG.md +86 -0
  18. package/Checkbox/Checkbox.js +3 -1
  19. package/Chip/chipClasses.d.ts +28 -26
  20. package/Chip/chipClasses.js +1 -1
  21. package/Collapse/Collapse.js +66 -35
  22. package/Dialog/Dialog.js +105 -61
  23. package/DialogActions/DialogActions.js +16 -12
  24. package/DialogContent/DialogContent.js +25 -15
  25. package/DialogContentText/DialogContentText.js +3 -2
  26. package/DialogTitle/DialogTitle.js +2 -2
  27. package/Divider/Divider.d.ts +1 -1
  28. package/Divider/Divider.js +1 -1
  29. package/Drawer/Drawer.js +73 -32
  30. package/Fab/Fab.js +1 -1
  31. package/FilledInput/FilledInput.d.ts +1 -0
  32. package/FilledInput/FilledInput.js +170 -87
  33. package/FormControlLabel/FormControlLabel.d.ts +21 -14
  34. package/FormControlLabel/FormControlLabel.js +22 -4
  35. package/FormHelperText/FormHelperText.js +2 -2
  36. package/FormLabel/FormLabel.js +23 -13
  37. package/Grow/Grow.js +3 -1
  38. package/Icon/Icon.js +63 -23
  39. package/ImageList/ImageList.js +2 -2
  40. package/ImageListItem/ImageListItem.js +2 -2
  41. package/ImageListItemBar/ImageListItemBar.js +2 -2
  42. package/Input/Input.d.ts +1 -0
  43. package/Input/Input.js +84 -61
  44. package/InputAdornment/InputAdornment.js +37 -21
  45. package/InputBase/InputBase.js +58 -28
  46. package/InputLabel/InputLabel.js +120 -58
  47. package/Link/Link.js +99 -54
  48. package/Link/getTextDecoration.d.ts +2 -8
  49. package/Link/getTextDecoration.js +16 -8
  50. package/List/List.js +22 -13
  51. package/ListItem/ListItem.js +2 -2
  52. package/ListItemAvatar/ListItemAvatar.js +2 -2
  53. package/ListItemButton/ListItemButton.js +3 -2
  54. package/ListItemIcon/ListItemIcon.js +14 -9
  55. package/ListItemSecondaryAction/ListItemSecondaryAction.js +2 -2
  56. package/ListItemText/ListItemText.js +2 -2
  57. package/ListSubheader/ListSubheader.js +5 -3
  58. package/Menu/Menu.js +3 -2
  59. package/MenuItem/MenuItem.js +47 -27
  60. package/NativeSelect/NativeSelectInput.js +78 -49
  61. package/OutlinedInput/NotchedOutline.js +60 -43
  62. package/OutlinedInput/OutlinedInput.js +97 -39
  63. package/Pagination/Pagination.js +2 -2
  64. package/PaginationItem/PaginationItem.d.ts +26 -14
  65. package/PaginationItem/PaginationItem.js +64 -20
  66. package/PaginationItem/paginationItemClasses.d.ts +4 -4
  67. package/Paper/Paper.js +44 -21
  68. package/Radio/Radio.js +5 -3
  69. package/Radio/RadioButtonIcon.js +1 -1
  70. package/Rating/Rating.js +3 -2
  71. package/Select/Select.js +2 -1
  72. package/Select/SelectInput.js +8 -6
  73. package/Skeleton/Skeleton.js +109 -61
  74. package/Slider/Slider.d.ts +2 -2
  75. package/Slider/Slider.js +2 -2
  76. package/Snackbar/Snackbar.js +66 -40
  77. package/SnackbarContent/SnackbarContent.js +2 -2
  78. package/SpeedDial/SpeedDial.d.ts +28 -1
  79. package/SpeedDial/SpeedDial.js +107 -49
  80. package/SpeedDialAction/SpeedDialAction.js +50 -24
  81. package/SpeedDialIcon/SpeedDialIcon.js +37 -16
  82. package/StepConnector/stepConnectorClasses.d.ts +2 -2
  83. package/StepLabel/StepLabel.d.ts +3 -3
  84. package/StepLabel/StepLabel.js +3 -3
  85. package/SvgIcon/SvgIcon.js +73 -21
  86. package/SwipeableDrawer/SwipeArea.js +39 -18
  87. package/Tab/Tab.js +127 -55
  88. package/TabScrollButton/TabScrollButton.js +27 -15
  89. package/Table/Table.js +2 -2
  90. package/TableBody/TableBody.js +2 -2
  91. package/TableCell/TableCell.js +2 -2
  92. package/TableContainer/TableContainer.js +2 -2
  93. package/TableFooter/TableFooter.js +2 -2
  94. package/TableHead/TableHead.js +2 -2
  95. package/TablePagination/TablePagination.js +2 -2
  96. package/TableRow/TableRow.js +2 -2
  97. package/TableSortLabel/TableSortLabel.js +2 -2
  98. package/Tabs/Tabs.js +107 -54
  99. package/TextField/TextField.js +2 -2
  100. package/ToggleButtonGroup/toggleButtonGroupClasses.d.ts +2 -2
  101. package/Toolbar/Toolbar.js +3 -7
  102. package/Tooltip/Tooltip.js +185 -88
  103. package/Typography/Typography.js +89 -39
  104. package/index.js +1 -1
  105. package/internal/SwitchBase.js +39 -11
  106. package/modern/Accordion/Accordion.js +2 -2
  107. package/modern/Alert/Alert.js +2 -2
  108. package/modern/Avatar/Avatar.js +1 -1
  109. package/modern/Backdrop/Backdrop.js +1 -1
  110. package/modern/Badge/Badge.js +2 -2
  111. package/modern/Breadcrumbs/BreadcrumbCollapsed.js +1 -1
  112. package/modern/Button/Button.js +1 -1
  113. package/modern/Checkbox/Checkbox.js +3 -1
  114. package/modern/Chip/chipClasses.js +1 -1
  115. package/modern/Collapse/Collapse.js +66 -35
  116. package/modern/Dialog/Dialog.js +105 -61
  117. package/modern/DialogActions/DialogActions.js +16 -12
  118. package/modern/DialogContent/DialogContent.js +25 -15
  119. package/modern/DialogContentText/DialogContentText.js +3 -2
  120. package/modern/DialogTitle/DialogTitle.js +2 -2
  121. package/modern/Divider/Divider.js +1 -1
  122. package/modern/Drawer/Drawer.js +73 -32
  123. package/modern/Fab/Fab.js +1 -1
  124. package/modern/FilledInput/FilledInput.js +170 -87
  125. package/modern/FormControlLabel/FormControlLabel.js +22 -4
  126. package/modern/FormHelperText/FormHelperText.js +2 -2
  127. package/modern/FormLabel/FormLabel.js +23 -13
  128. package/modern/Grow/Grow.js +3 -1
  129. package/modern/Icon/Icon.js +63 -23
  130. package/modern/ImageList/ImageList.js +2 -2
  131. package/modern/ImageListItem/ImageListItem.js +2 -2
  132. package/modern/ImageListItemBar/ImageListItemBar.js +2 -2
  133. package/modern/Input/Input.js +84 -61
  134. package/modern/InputAdornment/InputAdornment.js +37 -21
  135. package/modern/InputBase/InputBase.js +58 -28
  136. package/modern/InputLabel/InputLabel.js +120 -58
  137. package/modern/Link/Link.js +99 -54
  138. package/modern/Link/getTextDecoration.js +16 -8
  139. package/modern/List/List.js +22 -13
  140. package/modern/ListItem/ListItem.js +2 -2
  141. package/modern/ListItemAvatar/ListItemAvatar.js +2 -2
  142. package/modern/ListItemButton/ListItemButton.js +3 -2
  143. package/modern/ListItemIcon/ListItemIcon.js +14 -9
  144. package/modern/ListItemSecondaryAction/ListItemSecondaryAction.js +2 -2
  145. package/modern/ListItemText/ListItemText.js +2 -2
  146. package/modern/ListSubheader/ListSubheader.js +5 -3
  147. package/modern/Menu/Menu.js +3 -2
  148. package/modern/MenuItem/MenuItem.js +47 -27
  149. package/modern/NativeSelect/NativeSelectInput.js +78 -49
  150. package/modern/OutlinedInput/NotchedOutline.js +60 -43
  151. package/modern/OutlinedInput/OutlinedInput.js +97 -39
  152. package/modern/Pagination/Pagination.js +2 -2
  153. package/modern/PaginationItem/PaginationItem.js +64 -20
  154. package/modern/Paper/Paper.js +44 -21
  155. package/modern/Radio/Radio.js +5 -3
  156. package/modern/Radio/RadioButtonIcon.js +1 -1
  157. package/modern/Rating/Rating.js +3 -2
  158. package/modern/Select/Select.js +2 -1
  159. package/modern/Select/SelectInput.js +8 -6
  160. package/modern/Skeleton/Skeleton.js +109 -61
  161. package/modern/Slider/Slider.js +2 -2
  162. package/modern/Snackbar/Snackbar.js +66 -40
  163. package/modern/SnackbarContent/SnackbarContent.js +2 -2
  164. package/modern/SpeedDial/SpeedDial.js +107 -49
  165. package/modern/SpeedDialAction/SpeedDialAction.js +50 -24
  166. package/modern/SpeedDialIcon/SpeedDialIcon.js +37 -16
  167. package/modern/StepLabel/StepLabel.js +3 -3
  168. package/modern/SvgIcon/SvgIcon.js +73 -21
  169. package/modern/SwipeableDrawer/SwipeArea.js +39 -18
  170. package/modern/Tab/Tab.js +127 -55
  171. package/modern/TabScrollButton/TabScrollButton.js +27 -15
  172. package/modern/Table/Table.js +2 -2
  173. package/modern/TableBody/TableBody.js +2 -2
  174. package/modern/TableCell/TableCell.js +2 -2
  175. package/modern/TableContainer/TableContainer.js +2 -2
  176. package/modern/TableFooter/TableFooter.js +2 -2
  177. package/modern/TableHead/TableHead.js +2 -2
  178. package/modern/TablePagination/TablePagination.js +2 -2
  179. package/modern/TableRow/TableRow.js +2 -2
  180. package/modern/TableSortLabel/TableSortLabel.js +2 -2
  181. package/modern/Tabs/Tabs.js +107 -54
  182. package/modern/TextField/TextField.js +2 -2
  183. package/modern/Toolbar/Toolbar.js +3 -7
  184. package/modern/Tooltip/Tooltip.js +185 -88
  185. package/modern/Typography/Typography.js +89 -39
  186. package/modern/index.js +1 -1
  187. package/modern/internal/SwitchBase.js +39 -11
  188. package/node/Accordion/Accordion.js +2 -2
  189. package/node/Alert/Alert.js +2 -2
  190. package/node/Avatar/Avatar.js +1 -1
  191. package/node/Backdrop/Backdrop.js +1 -1
  192. package/node/Badge/Badge.js +2 -2
  193. package/node/Breadcrumbs/BreadcrumbCollapsed.js +3 -3
  194. package/node/Button/Button.js +2 -2
  195. package/node/Checkbox/Checkbox.js +3 -1
  196. package/node/Chip/chipClasses.js +1 -1
  197. package/node/Collapse/Collapse.js +70 -39
  198. package/node/Dialog/Dialog.js +110 -66
  199. package/node/DialogActions/DialogActions.js +18 -14
  200. package/node/DialogContent/DialogContent.js +27 -17
  201. package/node/DialogContentText/DialogContentText.js +6 -5
  202. package/node/DialogTitle/DialogTitle.js +4 -4
  203. package/node/Divider/Divider.js +1 -1
  204. package/node/Drawer/Drawer.js +78 -37
  205. package/node/Fab/Fab.js +2 -2
  206. package/node/FilledInput/FilledInput.js +176 -91
  207. package/node/FormControlLabel/FormControlLabel.js +23 -5
  208. package/node/FormHelperText/FormHelperText.js +4 -4
  209. package/node/FormLabel/FormLabel.js +26 -16
  210. package/node/Grow/Grow.js +3 -1
  211. package/node/Icon/Icon.js +65 -25
  212. package/node/ImageList/ImageList.js +4 -4
  213. package/node/ImageListItem/ImageListItem.js +4 -4
  214. package/node/ImageListItemBar/ImageListItemBar.js +8 -8
  215. package/node/Input/Input.js +87 -64
  216. package/node/InputAdornment/InputAdornment.js +39 -23
  217. package/node/InputBase/InputBase.js +61 -31
  218. package/node/InputLabel/InputLabel.js +123 -61
  219. package/node/Link/Link.js +101 -56
  220. package/node/Link/getTextDecoration.js +18 -10
  221. package/node/List/List.js +24 -15
  222. package/node/ListItem/ListItem.js +5 -5
  223. package/node/ListItemAvatar/ListItemAvatar.js +4 -4
  224. package/node/ListItemButton/ListItemButton.js +6 -5
  225. package/node/ListItemIcon/ListItemIcon.js +16 -11
  226. package/node/ListItemSecondaryAction/ListItemSecondaryAction.js +4 -4
  227. package/node/ListItemText/ListItemText.js +4 -4
  228. package/node/ListSubheader/ListSubheader.js +7 -5
  229. package/node/Menu/Menu.js +8 -7
  230. package/node/MenuItem/MenuItem.js +50 -30
  231. package/node/NativeSelect/NativeSelectInput.js +80 -53
  232. package/node/OutlinedInput/NotchedOutline.js +64 -47
  233. package/node/OutlinedInput/OutlinedInput.js +101 -43
  234. package/node/Pagination/Pagination.js +5 -5
  235. package/node/PaginationItem/PaginationItem.js +65 -20
  236. package/node/Paper/Paper.js +49 -28
  237. package/node/Radio/Radio.js +6 -4
  238. package/node/Radio/RadioButtonIcon.js +2 -2
  239. package/node/Rating/Rating.js +9 -8
  240. package/node/Select/Select.js +6 -5
  241. package/node/Select/SelectInput.js +9 -7
  242. package/node/Skeleton/Skeleton.js +113 -65
  243. package/node/Slider/Slider.js +2 -2
  244. package/node/Snackbar/Snackbar.js +68 -42
  245. package/node/SnackbarContent/SnackbarContent.js +6 -6
  246. package/node/SpeedDial/SpeedDial.js +111 -53
  247. package/node/SpeedDialAction/SpeedDialAction.js +54 -28
  248. package/node/SpeedDialIcon/SpeedDialIcon.js +39 -18
  249. package/node/StepLabel/StepLabel.js +3 -3
  250. package/node/SvgIcon/SvgIcon.js +79 -24
  251. package/node/SwipeableDrawer/SwipeArea.js +41 -20
  252. package/node/Tab/Tab.js +129 -57
  253. package/node/TabScrollButton/TabScrollButton.js +29 -17
  254. package/node/Table/Table.js +4 -4
  255. package/node/TableBody/TableBody.js +4 -4
  256. package/node/TableCell/TableCell.js +4 -4
  257. package/node/TableContainer/TableContainer.js +4 -4
  258. package/node/TableFooter/TableFooter.js +4 -4
  259. package/node/TableHead/TableHead.js +4 -4
  260. package/node/TablePagination/TablePagination.js +10 -10
  261. package/node/TableRow/TableRow.js +4 -4
  262. package/node/TableSortLabel/TableSortLabel.js +5 -5
  263. package/node/Tabs/Tabs.js +113 -60
  264. package/node/TextField/TextField.js +4 -4
  265. package/node/Toolbar/Toolbar.js +5 -9
  266. package/node/Tooltip/Tooltip.js +189 -92
  267. package/node/Typography/Typography.js +90 -40
  268. package/node/index.js +1 -1
  269. package/node/internal/SwitchBase.js +41 -13
  270. package/package.json +6 -6
  271. package/umd/material-ui.development.js +2777 -1334
  272. package/umd/material-ui.production.min.js +4 -4
@@ -5,9 +5,9 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
- exports.nativeSelectSelectStyles = exports.nativeSelectIconStyles = exports.default = void 0;
9
- var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
8
+ exports.default = exports.StyledSelectSelect = exports.StyledSelectIcon = void 0;
10
9
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
10
+ var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
11
11
  var React = _interopRequireWildcard(require("react"));
12
12
  var _propTypes = _interopRequireDefault(require("prop-types"));
13
13
  var _clsx = _interopRequireDefault(require("clsx"));
@@ -15,7 +15,8 @@ var _refType = _interopRequireDefault(require("@mui/utils/refType"));
15
15
  var _composeClasses = _interopRequireDefault(require("@mui/utils/composeClasses"));
16
16
  var _capitalize = _interopRequireDefault(require("../utils/capitalize"));
17
17
  var _nativeSelectClasses = _interopRequireWildcard(require("./nativeSelectClasses"));
18
- var _styled = _interopRequireWildcard(require("../styles/styled"));
18
+ var _zeroStyled = require("../zero-styled");
19
+ var _rootShouldForwardProp = _interopRequireDefault(require("../styles/rootShouldForwardProp"));
19
20
  var _jsxRuntime = require("react/jsx-runtime");
20
21
  const _excluded = ["className", "disabled", "error", "IconComponent", "inputRef", "variant"];
21
22
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
@@ -35,27 +36,23 @@ const useUtilityClasses = ownerState => {
35
36
  };
36
37
  return (0, _composeClasses.default)(slots, _nativeSelectClasses.getNativeSelectUtilityClasses, classes);
37
38
  };
38
- const nativeSelectSelectStyles = ({
39
- ownerState,
39
+ const StyledSelectSelect = exports.StyledSelectSelect = (0, _zeroStyled.styled)('select')(({
40
40
  theme
41
- }) => (0, _extends2.default)({
41
+ }) => ({
42
+ // Reset
42
43
  MozAppearance: 'none',
43
44
  // Reset
44
45
  WebkitAppearance: 'none',
45
- // Reset
46
46
  // When interacting quickly, the text can end up selected.
47
47
  // Native select can't be selected either.
48
48
  userSelect: 'none',
49
- borderRadius: 0,
50
49
  // Reset
50
+ borderRadius: 0,
51
51
  cursor: 'pointer',
52
- '&:focus': (0, _extends2.default)({}, theme.vars ? {
53
- backgroundColor: `rgba(${theme.vars.palette.common.onBackgroundChannel} / 0.05)`
54
- } : {
55
- backgroundColor: theme.palette.mode === 'light' ? 'rgba(0, 0, 0, 0.05)' : 'rgba(255, 255, 255, 0.05)'
56
- }, {
57
- borderRadius: 0 // Reset Chrome style
58
- }),
52
+ '&:focus': {
53
+ // Reset Chrome style
54
+ borderRadius: 0
55
+ },
59
56
  // Remove IE11 arrow
60
57
  '&::-ms-expand': {
61
58
  display: 'none'
@@ -69,29 +66,45 @@ const nativeSelectSelectStyles = ({
69
66
  '&:not([multiple]) option, &:not([multiple]) optgroup': {
70
67
  backgroundColor: (theme.vars || theme).palette.background.paper
71
68
  },
72
- // Bump specificity to allow extending custom inputs
73
- '&&&': {
74
- paddingRight: 24,
75
- minWidth: 16 // So it doesn't collapse.
76
- }
77
- }, ownerState.variant === 'filled' && {
78
- '&&&': {
79
- paddingRight: 32
80
- }
81
- }, ownerState.variant === 'outlined' && {
82
- borderRadius: (theme.vars || theme).shape.borderRadius,
83
- '&:focus': {
84
- borderRadius: (theme.vars || theme).shape.borderRadius // Reset the reset for Chrome style
85
- },
86
- '&&&': {
87
- paddingRight: 32
88
- }
89
- });
90
- exports.nativeSelectSelectStyles = nativeSelectSelectStyles;
91
- const NativeSelectSelect = (0, _styled.default)('select', {
69
+ variants: [{
70
+ props: ({
71
+ ownerState
72
+ }) => ownerState.variant !== 'filled' && ownerState.variant !== 'outlined',
73
+ style: {
74
+ // Bump specificity to allow extending custom inputs
75
+ '&&&': {
76
+ paddingRight: 24,
77
+ minWidth: 16 // So it doesn't collapse.
78
+ }
79
+ }
80
+ }, {
81
+ props: {
82
+ variant: 'filled'
83
+ },
84
+ style: {
85
+ '&&&': {
86
+ paddingRight: 32
87
+ }
88
+ }
89
+ }, {
90
+ props: {
91
+ variant: 'outlined'
92
+ },
93
+ style: {
94
+ borderRadius: (theme.vars || theme).shape.borderRadius,
95
+ '&:focus': {
96
+ borderRadius: (theme.vars || theme).shape.borderRadius // Reset the reset for Chrome style
97
+ },
98
+ '&&&': {
99
+ paddingRight: 32
100
+ }
101
+ }
102
+ }]
103
+ }));
104
+ const NativeSelectSelect = (0, _zeroStyled.styled)(StyledSelectSelect, {
92
105
  name: 'MuiNativeSelect',
93
106
  slot: 'Select',
94
- shouldForwardProp: _styled.rootShouldForwardProp,
107
+ shouldForwardProp: _rootShouldForwardProp.default,
95
108
  overridesResolver: (props, styles) => {
96
109
  const {
97
110
  ownerState
@@ -100,32 +113,46 @@ const NativeSelectSelect = (0, _styled.default)('select', {
100
113
  [`&.${_nativeSelectClasses.default.multiple}`]: styles.multiple
101
114
  }];
102
115
  }
103
- })(nativeSelectSelectStyles);
104
- const nativeSelectIconStyles = ({
105
- ownerState,
116
+ })({});
117
+ const StyledSelectIcon = exports.StyledSelectIcon = (0, _zeroStyled.styled)('svg')(({
106
118
  theme
107
- }) => (0, _extends2.default)({
119
+ }) => ({
108
120
  // We use a position absolute over a flexbox in order to forward the pointer events
109
121
  // to the input and to support wrapping tags..
110
122
  position: 'absolute',
111
123
  right: 0,
112
- top: 'calc(50% - .5em)',
113
124
  // Center vertically, height is 1em
114
- pointerEvents: 'none',
125
+ top: 'calc(50% - .5em)',
115
126
  // Don't block pointer events on the select under the icon.
127
+ pointerEvents: 'none',
116
128
  color: (theme.vars || theme).palette.action.active,
117
129
  [`&.${_nativeSelectClasses.default.disabled}`]: {
118
130
  color: (theme.vars || theme).palette.action.disabled
119
- }
120
- }, ownerState.open && {
121
- transform: 'rotate(180deg)'
122
- }, ownerState.variant === 'filled' && {
123
- right: 7
124
- }, ownerState.variant === 'outlined' && {
125
- right: 7
126
- });
127
- exports.nativeSelectIconStyles = nativeSelectIconStyles;
128
- const NativeSelectIcon = (0, _styled.default)('svg', {
131
+ },
132
+ variants: [{
133
+ props: ({
134
+ ownerState
135
+ }) => ownerState.open,
136
+ style: {
137
+ transform: 'rotate(180deg)'
138
+ }
139
+ }, {
140
+ props: {
141
+ variant: 'filled'
142
+ },
143
+ style: {
144
+ right: 7
145
+ }
146
+ }, {
147
+ props: {
148
+ variant: 'outlined'
149
+ },
150
+ style: {
151
+ right: 7
152
+ }
153
+ }]
154
+ }));
155
+ const NativeSelectIcon = (0, _zeroStyled.styled)(StyledSelectIcon, {
129
156
  name: 'MuiNativeSelect',
130
157
  slot: 'Icon',
131
158
  overridesResolver: (props, styles) => {
@@ -134,7 +161,7 @@ const NativeSelectIcon = (0, _styled.default)('svg', {
134
161
  } = props;
135
162
  return [styles.icon, ownerState.variant && styles[`icon${(0, _capitalize.default)(ownerState.variant)}`], ownerState.open && styles.iconOpen];
136
163
  }
137
- })(nativeSelectIconStyles);
164
+ })({});
138
165
 
139
166
  /**
140
167
  * @ignore - internal component.
@@ -6,18 +6,19 @@ Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
8
  exports.default = NotchedOutline;
9
- var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
10
9
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
10
+ var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
11
11
  var React = _interopRequireWildcard(require("react"));
12
12
  var _propTypes = _interopRequireDefault(require("prop-types"));
13
- var _styled = _interopRequireWildcard(require("../styles/styled"));
13
+ var _rootShouldForwardProp = _interopRequireDefault(require("../styles/rootShouldForwardProp"));
14
+ var _zeroStyled = require("../zero-styled");
14
15
  var _jsxRuntime = require("react/jsx-runtime");
15
16
  var _span;
16
17
  const _excluded = ["children", "classes", "className", "label", "notched"];
17
18
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
18
19
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
19
- const NotchedOutlineRoot = (0, _styled.default)('fieldset', {
20
- shouldForwardProp: _styled.rootShouldForwardProp
20
+ const NotchedOutlineRoot = (0, _zeroStyled.styled)('fieldset', {
21
+ shouldForwardProp: _rootShouldForwardProp.default
21
22
  })({
22
23
  textAlign: 'left',
23
24
  position: 'absolute',
@@ -34,54 +35,70 @@ const NotchedOutlineRoot = (0, _styled.default)('fieldset', {
34
35
  overflow: 'hidden',
35
36
  minWidth: '0%'
36
37
  });
37
- const NotchedOutlineLegend = (0, _styled.default)('legend', {
38
- shouldForwardProp: _styled.rootShouldForwardProp
38
+ const NotchedOutlineLegend = (0, _zeroStyled.styled)('legend', {
39
+ shouldForwardProp: _rootShouldForwardProp.default
39
40
  })(({
40
- ownerState,
41
41
  theme
42
- }) => (0, _extends2.default)({
42
+ }) => ({
43
43
  float: 'unset',
44
44
  // Fix conflict with bootstrap
45
45
  width: 'auto',
46
46
  // Fix conflict with bootstrap
47
- overflow: 'hidden'
48
- }, !ownerState.withLabel && {
49
- padding: 0,
50
- lineHeight: '11px',
51
- // sync with `height` in `legend` styles
52
- transition: theme.transitions.create('width', {
53
- duration: 150,
54
- easing: theme.transitions.easing.easeOut
55
- })
56
- }, ownerState.withLabel && (0, _extends2.default)({
57
- display: 'block',
58
- // Fix conflict with normalize.css and sanitize.css
59
- padding: 0,
60
- height: 11,
61
- // sync with `lineHeight` in `legend` styles
62
- fontSize: '0.75em',
63
- visibility: 'hidden',
64
- maxWidth: 0.01,
65
- transition: theme.transitions.create('max-width', {
66
- duration: 50,
67
- easing: theme.transitions.easing.easeOut
68
- }),
69
- whiteSpace: 'nowrap',
70
- '& > span': {
71
- paddingLeft: 5,
72
- paddingRight: 5,
73
- display: 'inline-block',
74
- opacity: 0,
75
- visibility: 'visible'
76
- }
77
- }, ownerState.notched && {
78
- maxWidth: '100%',
79
- transition: theme.transitions.create('max-width', {
80
- duration: 100,
81
- easing: theme.transitions.easing.easeOut,
82
- delay: 50
83
- })
84
- })));
47
+ overflow: 'hidden',
48
+ // Fix Horizontal scroll when label too long
49
+ variants: [{
50
+ props: ({
51
+ ownerState
52
+ }) => !ownerState.withLabel,
53
+ style: {
54
+ padding: 0,
55
+ lineHeight: '11px',
56
+ // sync with `height` in `legend` styles
57
+ transition: theme.transitions.create('width', {
58
+ duration: 150,
59
+ easing: theme.transitions.easing.easeOut
60
+ })
61
+ }
62
+ }, {
63
+ props: ({
64
+ ownerState
65
+ }) => ownerState.withLabel,
66
+ style: {
67
+ display: 'block',
68
+ // Fix conflict with normalize.css and sanitize.css
69
+ padding: 0,
70
+ height: 11,
71
+ // sync with `lineHeight` in `legend` styles
72
+ fontSize: '0.75em',
73
+ visibility: 'hidden',
74
+ maxWidth: 0.01,
75
+ transition: theme.transitions.create('max-width', {
76
+ duration: 50,
77
+ easing: theme.transitions.easing.easeOut
78
+ }),
79
+ whiteSpace: 'nowrap',
80
+ '& > span': {
81
+ paddingLeft: 5,
82
+ paddingRight: 5,
83
+ display: 'inline-block',
84
+ opacity: 0,
85
+ visibility: 'visible'
86
+ }
87
+ }
88
+ }, {
89
+ props: ({
90
+ ownerState
91
+ }) => ownerState.withLabel && ownerState.notched,
92
+ style: {
93
+ maxWidth: '100%',
94
+ transition: theme.transitions.create('max-width', {
95
+ duration: 100,
96
+ easing: theme.transitions.easing.easeOut,
97
+ delay: 50
98
+ })
99
+ }
100
+ }]
101
+ }));
85
102
 
86
103
  /**
87
104
  * @ignore - internal component.
@@ -115,7 +132,7 @@ function NotchedOutline(props) {
115
132
  })
116
133
  }));
117
134
  }
118
- process.env.NODE_ENV !== "production" ? NotchedOutline.propTypes = {
135
+ process.env.NODE_ENV !== "production" ? NotchedOutline.propTypes /* remove-proptypes */ = {
119
136
  /**
120
137
  * The content of the component.
121
138
  */
@@ -15,14 +15,15 @@ var _composeClasses = _interopRequireDefault(require("@mui/utils/composeClasses"
15
15
  var _NotchedOutline = _interopRequireDefault(require("./NotchedOutline"));
16
16
  var _useFormControl = _interopRequireDefault(require("../FormControl/useFormControl"));
17
17
  var _formControlState = _interopRequireDefault(require("../FormControl/formControlState"));
18
- var _styled = _interopRequireWildcard(require("../styles/styled"));
18
+ var _rootShouldForwardProp = _interopRequireDefault(require("../styles/rootShouldForwardProp"));
19
+ var _zeroStyled = require("../zero-styled");
19
20
  var _outlinedInputClasses = _interopRequireWildcard(require("./outlinedInputClasses"));
20
21
  var _InputBase = _interopRequireWildcard(require("../InputBase/InputBase"));
21
- var _useThemeProps = _interopRequireDefault(require("../styles/useThemeProps"));
22
22
  var _jsxRuntime = require("react/jsx-runtime");
23
23
  const _excluded = ["components", "fullWidth", "inputComponent", "label", "multiline", "notched", "slots", "type"];
24
24
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
25
25
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
26
+ const useThemeProps = (0, _zeroStyled.createUseThemeProps)('MuiOutlinedInput');
26
27
  const useUtilityClasses = ownerState => {
27
28
  const {
28
29
  classes
@@ -35,49 +36,83 @@ const useUtilityClasses = ownerState => {
35
36
  const composedClasses = (0, _composeClasses.default)(slots, _outlinedInputClasses.getOutlinedInputUtilityClass, classes);
36
37
  return (0, _extends2.default)({}, classes, composedClasses);
37
38
  };
38
- const OutlinedInputRoot = (0, _styled.default)(_InputBase.InputBaseRoot, {
39
- shouldForwardProp: prop => (0, _styled.rootShouldForwardProp)(prop) || prop === 'classes',
39
+ const OutlinedInputRoot = (0, _zeroStyled.styled)(_InputBase.InputBaseRoot, {
40
+ shouldForwardProp: prop => (0, _rootShouldForwardProp.default)(prop) || prop === 'classes',
40
41
  name: 'MuiOutlinedInput',
41
42
  slot: 'Root',
42
43
  overridesResolver: _InputBase.rootOverridesResolver
43
44
  })(({
44
- theme,
45
- ownerState
45
+ theme
46
46
  }) => {
47
47
  const borderColor = theme.palette.mode === 'light' ? 'rgba(0, 0, 0, 0.23)' : 'rgba(255, 255, 255, 0.23)';
48
- return (0, _extends2.default)({
48
+ return {
49
49
  position: 'relative',
50
50
  borderRadius: (theme.vars || theme).shape.borderRadius,
51
51
  [`&:hover .${_outlinedInputClasses.default.notchedOutline}`]: {
52
52
  borderColor: (theme.vars || theme).palette.text.primary
53
53
  },
54
- // Reset on touch devices, it doesn't add specificity
55
- '@media (hover: none)': {
56
- [`&:hover .${_outlinedInputClasses.default.notchedOutline}`]: {
57
- borderColor: theme.vars ? `rgba(${theme.vars.palette.common.onBackgroundChannel} / 0.23)` : borderColor
58
- }
59
- },
60
54
  [`&.${_outlinedInputClasses.default.focused} .${_outlinedInputClasses.default.notchedOutline}`]: {
61
- borderColor: (theme.vars || theme).palette[ownerState.color].main,
62
55
  borderWidth: 2
63
56
  },
64
- [`&.${_outlinedInputClasses.default.error} .${_outlinedInputClasses.default.notchedOutline}`]: {
65
- borderColor: (theme.vars || theme).palette.error.main
66
- },
67
- [`&.${_outlinedInputClasses.default.disabled} .${_outlinedInputClasses.default.notchedOutline}`]: {
68
- borderColor: (theme.vars || theme).palette.action.disabled
69
- }
70
- }, ownerState.startAdornment && {
71
- paddingLeft: 14
72
- }, ownerState.endAdornment && {
73
- paddingRight: 14
74
- }, ownerState.multiline && (0, _extends2.default)({
75
- padding: '16.5px 14px'
76
- }, ownerState.size === 'small' && {
77
- padding: '8.5px 14px'
78
- }));
57
+ variants: [...Object.entries(theme.palette).filter(([, value]) => value.main).map(([color]) => ({
58
+ props: {
59
+ color
60
+ },
61
+ style: {
62
+ [`&.${_outlinedInputClasses.default.focused} .${_outlinedInputClasses.default.notchedOutline}`]: {
63
+ borderColor: (theme.vars || theme).palette[color].main
64
+ }
65
+ }
66
+ })), {
67
+ props: {},
68
+ // to overide the above style
69
+ style: {
70
+ // Reset on touch devices, it doesn't add specificity
71
+ '@media (hover: none)': {
72
+ [`&:hover .${_outlinedInputClasses.default.notchedOutline}`]: {
73
+ borderColor: theme.vars ? `rgba(${theme.vars.palette.common.onBackgroundChannel} / 0.23)` : borderColor
74
+ }
75
+ },
76
+ [`&.${_outlinedInputClasses.default.error} .${_outlinedInputClasses.default.notchedOutline}`]: {
77
+ borderColor: (theme.vars || theme).palette.error.main
78
+ },
79
+ [`&.${_outlinedInputClasses.default.disabled} .${_outlinedInputClasses.default.notchedOutline}`]: {
80
+ borderColor: (theme.vars || theme).palette.action.disabled
81
+ }
82
+ }
83
+ }, {
84
+ props: ({
85
+ ownerState
86
+ }) => ownerState.startAdornment,
87
+ style: {
88
+ paddingLeft: 14
89
+ }
90
+ }, {
91
+ props: ({
92
+ ownerState
93
+ }) => ownerState.endAdornment,
94
+ style: {
95
+ paddingRight: 14
96
+ }
97
+ }, {
98
+ props: ({
99
+ ownerState
100
+ }) => ownerState.multiline,
101
+ style: {
102
+ padding: '16.5px 14px'
103
+ }
104
+ }, {
105
+ props: ({
106
+ ownerState,
107
+ size
108
+ }) => ownerState.multiline && size === 'small',
109
+ style: {
110
+ padding: '8.5px 14px'
111
+ }
112
+ }]
113
+ };
79
114
  });
80
- const NotchedOutlineRoot = (0, _styled.default)(_NotchedOutline.default, {
115
+ const NotchedOutlineRoot = (0, _zeroStyled.styled)(_NotchedOutline.default, {
81
116
  name: 'MuiOutlinedInput',
82
117
  slot: 'NotchedOutline',
83
118
  overridesResolver: (props, styles) => styles.notchedOutline
@@ -89,13 +124,12 @@ const NotchedOutlineRoot = (0, _styled.default)(_NotchedOutline.default, {
89
124
  borderColor: theme.vars ? `rgba(${theme.vars.palette.common.onBackgroundChannel} / 0.23)` : borderColor
90
125
  };
91
126
  });
92
- const OutlinedInputInput = (0, _styled.default)(_InputBase.InputBaseComponent, {
127
+ const OutlinedInputInput = (0, _zeroStyled.styled)(_InputBase.InputBaseInput, {
93
128
  name: 'MuiOutlinedInput',
94
129
  slot: 'Input',
95
130
  overridesResolver: _InputBase.inputOverridesResolver
96
131
  })(({
97
- theme,
98
- ownerState
132
+ theme
99
133
  }) => (0, _extends2.default)({
100
134
  padding: '16.5px 14px'
101
135
  }, !theme.vars && {
@@ -116,18 +150,40 @@ const OutlinedInputInput = (0, _styled.default)(_InputBase.InputBaseComponent, {
116
150
  caretColor: '#fff'
117
151
  }
118
152
  }
119
- }, ownerState.size === 'small' && {
120
- padding: '8.5px 14px'
121
- }, ownerState.multiline && {
122
- padding: 0
123
- }, ownerState.startAdornment && {
124
- paddingLeft: 0
125
- }, ownerState.endAdornment && {
126
- paddingRight: 0
153
+ }, {
154
+ variants: [{
155
+ props: {
156
+ size: 'small'
157
+ },
158
+ style: {
159
+ padding: '8.5px 14px'
160
+ }
161
+ }, {
162
+ props: ({
163
+ ownerState
164
+ }) => ownerState.multiline,
165
+ style: {
166
+ padding: 0
167
+ }
168
+ }, {
169
+ props: ({
170
+ ownerState
171
+ }) => ownerState.startAdornment,
172
+ style: {
173
+ paddingLeft: 0
174
+ }
175
+ }, {
176
+ props: ({
177
+ ownerState
178
+ }) => ownerState.endAdornment,
179
+ style: {
180
+ paddingRight: 0
181
+ }
182
+ }]
127
183
  }));
128
184
  const OutlinedInput = /*#__PURE__*/React.forwardRef(function OutlinedInput(inProps, ref) {
129
185
  var _ref, _slots$root, _ref2, _slots$input, _React$Fragment;
130
- const props = (0, _useThemeProps.default)({
186
+ const props = useThemeProps({
131
187
  props: inProps,
132
188
  name: 'MuiOutlinedInput'
133
189
  });
@@ -353,5 +409,7 @@ process.env.NODE_ENV !== "production" ? OutlinedInput.propTypes /* remove-propty
353
409
  */
354
410
  value: _propTypes.default.any
355
411
  } : void 0;
356
- OutlinedInput.muiName = 'Input';
412
+ if (OutlinedInput) {
413
+ OutlinedInput.muiName = 'Input';
414
+ }
357
415
  var _default = exports.default = OutlinedInput;
@@ -13,15 +13,15 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
13
13
  var _clsx = _interopRequireDefault(require("clsx"));
14
14
  var _composeClasses = _interopRequireDefault(require("@mui/utils/composeClasses"));
15
15
  var _integerPropType = _interopRequireDefault(require("@mui/utils/integerPropType"));
16
- var _useThemeProps = _interopRequireDefault(require("../styles/useThemeProps"));
17
16
  var _paginationClasses = require("./paginationClasses");
18
17
  var _usePagination = _interopRequireDefault(require("../usePagination"));
19
18
  var _PaginationItem = _interopRequireDefault(require("../PaginationItem"));
20
- var _styled = _interopRequireDefault(require("../styles/styled"));
19
+ var _zeroStyled = require("../zero-styled");
21
20
  var _jsxRuntime = require("react/jsx-runtime");
22
21
  const _excluded = ["boundaryCount", "className", "color", "count", "defaultPage", "disabled", "getItemAriaLabel", "hideNextButton", "hidePrevButton", "onChange", "page", "renderItem", "shape", "showFirstButton", "showLastButton", "siblingCount", "size", "variant"];
23
22
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
24
23
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
24
+ const useThemeProps = (0, _zeroStyled.createUseThemeProps)('MuiPagination');
25
25
  const useUtilityClasses = ownerState => {
26
26
  const {
27
27
  classes,
@@ -33,7 +33,7 @@ const useUtilityClasses = ownerState => {
33
33
  };
34
34
  return (0, _composeClasses.default)(slots, _paginationClasses.getPaginationUtilityClass, classes);
35
35
  };
36
- const PaginationRoot = (0, _styled.default)('nav', {
36
+ const PaginationRoot = (0, _zeroStyled.styled)('nav', {
37
37
  name: 'MuiPagination',
38
38
  slot: 'Root',
39
39
  overridesResolver: (props, styles) => {
@@ -43,7 +43,7 @@ const PaginationRoot = (0, _styled.default)('nav', {
43
43
  return [styles.root, styles[ownerState.variant]];
44
44
  }
45
45
  })({});
46
- const PaginationUl = (0, _styled.default)('ul', {
46
+ const PaginationUl = (0, _zeroStyled.styled)('ul', {
47
47
  name: 'MuiPagination',
48
48
  slot: 'Ul',
49
49
  overridesResolver: (props, styles) => styles.ul
@@ -62,7 +62,7 @@ function defaultGetAriaLabel(type, page, selected) {
62
62
  return `Go to ${type} page`;
63
63
  }
64
64
  const Pagination = /*#__PURE__*/React.forwardRef(function Pagination(inProps, ref) {
65
- const props = (0, _useThemeProps.default)({
65
+ const props = useThemeProps({
66
66
  props: inProps,
67
67
  name: 'MuiPagination'
68
68
  });