@mui/lab 5.0.0-alpha.60 → 5.0.0-alpha.64

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 (64) hide show
  1. package/CHANGELOG.md +230 -32
  2. package/ClockPicker/ClockPicker.d.ts +1 -1
  3. package/ClockPicker/ClockPicker.js +5 -2
  4. package/DatePicker/DatePicker.js +5 -1
  5. package/DateRangePicker/DateRangePicker.js +5 -1
  6. package/DateTimePicker/DateTimePicker.js +5 -1
  7. package/DesktopDatePicker/DesktopDatePicker.js +5 -1
  8. package/DesktopDateRangePicker/DesktopDateRangePicker.js +5 -1
  9. package/DesktopDateTimePicker/DesktopDateTimePicker.js +5 -1
  10. package/LoadingButton/LoadingButton.d.ts +2 -0
  11. package/LoadingButton/LoadingButton.js +19 -9
  12. package/MobileDatePicker/MobileDatePicker.js +5 -1
  13. package/MobileDateRangePicker/MobileDateRangePicker.js +5 -1
  14. package/MobileDateTimePicker/MobileDateTimePicker.js +5 -1
  15. package/StaticDatePicker/StaticDatePicker.js +5 -1
  16. package/StaticDateRangePicker/StaticDateRangePicker.js +5 -1
  17. package/StaticDateTimePicker/StaticDateTimePicker.js +5 -1
  18. package/index.js +1 -1
  19. package/legacy/ClockPicker/ClockPicker.js +5 -2
  20. package/legacy/DatePicker/DatePicker.js +5 -1
  21. package/legacy/DateRangePicker/DateRangePicker.js +5 -1
  22. package/legacy/DateTimePicker/DateTimePicker.js +5 -1
  23. package/legacy/DesktopDatePicker/DesktopDatePicker.js +5 -1
  24. package/legacy/DesktopDateRangePicker/DesktopDateRangePicker.js +5 -1
  25. package/legacy/DesktopDateTimePicker/DesktopDateTimePicker.js +5 -1
  26. package/legacy/LoadingButton/LoadingButton.js +19 -10
  27. package/legacy/MobileDatePicker/MobileDatePicker.js +5 -1
  28. package/legacy/MobileDateRangePicker/MobileDateRangePicker.js +5 -1
  29. package/legacy/MobileDateTimePicker/MobileDateTimePicker.js +5 -1
  30. package/legacy/StaticDatePicker/StaticDatePicker.js +5 -1
  31. package/legacy/StaticDateRangePicker/StaticDateRangePicker.js +5 -1
  32. package/legacy/StaticDateTimePicker/StaticDateTimePicker.js +5 -1
  33. package/legacy/index.js +1 -1
  34. package/modern/ClockPicker/ClockPicker.js +5 -2
  35. package/modern/DatePicker/DatePicker.js +5 -1
  36. package/modern/DateRangePicker/DateRangePicker.js +5 -1
  37. package/modern/DateTimePicker/DateTimePicker.js +5 -1
  38. package/modern/DesktopDatePicker/DesktopDatePicker.js +5 -1
  39. package/modern/DesktopDateRangePicker/DesktopDateRangePicker.js +5 -1
  40. package/modern/DesktopDateTimePicker/DesktopDateTimePicker.js +5 -1
  41. package/modern/LoadingButton/LoadingButton.js +20 -9
  42. package/modern/MobileDatePicker/MobileDatePicker.js +5 -1
  43. package/modern/MobileDateRangePicker/MobileDateRangePicker.js +5 -1
  44. package/modern/MobileDateTimePicker/MobileDateTimePicker.js +5 -1
  45. package/modern/StaticDatePicker/StaticDatePicker.js +5 -1
  46. package/modern/StaticDateRangePicker/StaticDateRangePicker.js +5 -1
  47. package/modern/StaticDateTimePicker/StaticDateTimePicker.js +5 -1
  48. package/modern/index.js +1 -1
  49. package/node/ClockPicker/ClockPicker.js +5 -2
  50. package/node/DatePicker/DatePicker.js +5 -1
  51. package/node/DateRangePicker/DateRangePicker.js +5 -1
  52. package/node/DateTimePicker/DateTimePicker.js +5 -1
  53. package/node/DesktopDatePicker/DesktopDatePicker.js +5 -1
  54. package/node/DesktopDateRangePicker/DesktopDateRangePicker.js +5 -1
  55. package/node/DesktopDateTimePicker/DesktopDateTimePicker.js +5 -1
  56. package/node/LoadingButton/LoadingButton.js +17 -6
  57. package/node/MobileDatePicker/MobileDatePicker.js +5 -1
  58. package/node/MobileDateRangePicker/MobileDateRangePicker.js +5 -1
  59. package/node/MobileDateTimePicker/MobileDateTimePicker.js +5 -1
  60. package/node/StaticDatePicker/StaticDatePicker.js +5 -1
  61. package/node/StaticDateRangePicker/StaticDateRangePicker.js +5 -1
  62. package/node/StaticDateTimePicker/StaticDateTimePicker.js +5 -1
  63. package/node/index.js +1 -1
  64. package/package.json +3 -3
@@ -144,7 +144,11 @@ process.env.NODE_ENV !== "production" ? MobileDateTimePicker.propTypes
144
144
  * The props used for each slot inside.
145
145
  * @default {}
146
146
  */
147
- componentsProps: PropTypes.object,
147
+ componentsProps: PropTypes.shape({
148
+ leftArrowButton: PropTypes.object,
149
+ rightArrowButton: PropTypes.object,
150
+ switchViewButton: PropTypes.object
151
+ }),
148
152
 
149
153
  /**
150
154
  * Date tab icon.
@@ -106,7 +106,11 @@ process.env.NODE_ENV !== "production" ? StaticDatePicker.propTypes
106
106
  * The props used for each slot inside.
107
107
  * @default {}
108
108
  */
109
- componentsProps: PropTypes.object,
109
+ componentsProps: PropTypes.shape({
110
+ leftArrowButton: PropTypes.object,
111
+ rightArrowButton: PropTypes.object,
112
+ switchViewButton: PropTypes.object
113
+ }),
110
114
 
111
115
  /**
112
116
  * Default calendar month displayed when `value={null}`.
@@ -149,7 +149,11 @@ process.env.NODE_ENV !== "production" ? StaticDateRangePicker.propTypes
149
149
  * The props used for each slot inside.
150
150
  * @default {}
151
151
  */
152
- componentsProps: PropTypes.object,
152
+ componentsProps: PropTypes.shape({
153
+ leftArrowButton: PropTypes.object,
154
+ rightArrowButton: PropTypes.object,
155
+ switchViewButton: PropTypes.object
156
+ }),
153
157
 
154
158
  /**
155
159
  * Default calendar month displayed when `value={null}`.
@@ -118,7 +118,11 @@ process.env.NODE_ENV !== "production" ? StaticDateTimePicker.propTypes
118
118
  * The props used for each slot inside.
119
119
  * @default {}
120
120
  */
121
- componentsProps: PropTypes.object,
121
+ componentsProps: PropTypes.shape({
122
+ leftArrowButton: PropTypes.object,
123
+ rightArrowButton: PropTypes.object,
124
+ switchViewButton: PropTypes.object
125
+ }),
122
126
 
123
127
  /**
124
128
  * Date tab icon.
package/modern/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license MUI v5.0.0-alpha.60
1
+ /** @license MUI v5.0.0-alpha.64
2
2
  *
3
3
  * This source code is licensed under the MIT license found in the
4
4
  * LICENSE file in the root directory of this source tree.
@@ -59,7 +59,7 @@ const useUtilityClasses = ownerState => {
59
59
 
60
60
  const ClockPickerArrowSwitcher = (0, _styles.styled)(_PickersArrowSwitcher.default, {
61
61
  name: 'MuiClockPicker',
62
- slot: 'ArrowSwticher',
62
+ slot: 'ArrowSwitcher',
63
63
  overridesResolver: (props, styles) => styles.arrowSwitcher
64
64
  })({
65
65
  position: 'absolute',
@@ -295,7 +295,10 @@ process.env.NODE_ENV !== "production" ? ClockPicker.propTypes
295
295
  /**
296
296
  * The props used for each slot inside.
297
297
  */
298
- componentsProps: _propTypes.default.object,
298
+ componentsProps: _propTypes.default.shape({
299
+ leftArrowButton: _propTypes.default.object,
300
+ rightArrowButton: _propTypes.default.object
301
+ }),
299
302
 
300
303
  /**
301
304
  * Selected date @DateIOType.
@@ -148,7 +148,11 @@ process.env.NODE_ENV !== "production" ? DatePicker.propTypes
148
148
  * The props used for each slot inside.
149
149
  * @default {}
150
150
  */
151
- componentsProps: _propTypes.default.object,
151
+ componentsProps: _propTypes.default.shape({
152
+ leftArrowButton: _propTypes.default.object,
153
+ rightArrowButton: _propTypes.default.object,
154
+ switchViewButton: _propTypes.default.object
155
+ }),
152
156
 
153
157
  /**
154
158
  * Default calendar month displayed when `value={null}`.
@@ -196,7 +196,11 @@ process.env.NODE_ENV !== "production" ? DateRangePicker.propTypes
196
196
  * The props used for each slot inside.
197
197
  * @default {}
198
198
  */
199
- componentsProps: _propTypes.default.object,
199
+ componentsProps: _propTypes.default.shape({
200
+ leftArrowButton: _propTypes.default.object,
201
+ rightArrowButton: _propTypes.default.object,
202
+ switchViewButton: _propTypes.default.object
203
+ }),
200
204
 
201
205
  /**
202
206
  * Default calendar month displayed when `value={null}`.
@@ -160,7 +160,11 @@ process.env.NODE_ENV !== "production" ? DateTimePicker.propTypes
160
160
  * The props used for each slot inside.
161
161
  * @default {}
162
162
  */
163
- componentsProps: _propTypes.default.object,
163
+ componentsProps: _propTypes.default.shape({
164
+ leftArrowButton: _propTypes.default.object,
165
+ rightArrowButton: _propTypes.default.object,
166
+ switchViewButton: _propTypes.default.object
167
+ }),
164
168
 
165
169
  /**
166
170
  * Date tab icon.
@@ -143,7 +143,11 @@ process.env.NODE_ENV !== "production" ? DesktopDatePicker.propTypes
143
143
  * The props used for each slot inside.
144
144
  * @default {}
145
145
  */
146
- componentsProps: _propTypes.default.object,
146
+ componentsProps: _propTypes.default.shape({
147
+ leftArrowButton: _propTypes.default.object,
148
+ rightArrowButton: _propTypes.default.object,
149
+ switchViewButton: _propTypes.default.object
150
+ }),
147
151
 
148
152
  /**
149
153
  * Default calendar month displayed when `value={null}`.
@@ -180,7 +180,11 @@ process.env.NODE_ENV !== "production" ? DesktopDateRangePicker.propTypes
180
180
  * The props used for each slot inside.
181
181
  * @default {}
182
182
  */
183
- componentsProps: _propTypes.default.object,
183
+ componentsProps: _propTypes.default.shape({
184
+ leftArrowButton: _propTypes.default.object,
185
+ rightArrowButton: _propTypes.default.object,
186
+ switchViewButton: _propTypes.default.object
187
+ }),
184
188
 
185
189
  /**
186
190
  * Default calendar month displayed when `value={null}`.
@@ -153,7 +153,11 @@ process.env.NODE_ENV !== "production" ? DesktopDateTimePicker.propTypes
153
153
  * The props used for each slot inside.
154
154
  * @default {}
155
155
  */
156
- componentsProps: _propTypes.default.object,
156
+ componentsProps: _propTypes.default.shape({
157
+ leftArrowButton: _propTypes.default.object,
158
+ rightArrowButton: _propTypes.default.object,
159
+ switchViewButton: _propTypes.default.object
160
+ }),
157
161
 
158
162
  /**
159
163
  * Date tab icon.
@@ -31,7 +31,7 @@ var _loadingButtonClasses = _interopRequireWildcard(require("./loadingButtonClas
31
31
 
32
32
  var _jsxRuntime = require("react/jsx-runtime");
33
33
 
34
- const _excluded = ["children", "disabled", "loading", "loadingIndicator", "loadingPosition", "variant"];
34
+ const _excluded = ["children", "disabled", "id", "loading", "loadingIndicator", "loadingPosition", "variant"];
35
35
 
36
36
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
37
37
 
@@ -136,10 +136,6 @@ const LoadingButtonLoadingIndicator = (0, _styles.styled)('div', {
136
136
  position: 'relative',
137
137
  right: -10
138
138
  }));
139
- const LoadingIndicator = /*#__PURE__*/(0, _jsxRuntime.jsx)(_CircularProgress.default, {
140
- color: "inherit",
141
- size: 16
142
- });
143
139
  const LoadingButton = /*#__PURE__*/React.forwardRef(function LoadingButton(inProps, ref) {
144
140
  const props = (0, _styles.useThemeProps)({
145
141
  props: inProps,
@@ -148,12 +144,19 @@ const LoadingButton = /*#__PURE__*/React.forwardRef(function LoadingButton(inPro
148
144
  const {
149
145
  children,
150
146
  disabled = false,
147
+ id: idProp,
151
148
  loading = false,
152
- loadingIndicator = LoadingIndicator,
149
+ loadingIndicator: loadingIndicatorProp,
153
150
  loadingPosition = 'center',
154
151
  variant = 'text'
155
152
  } = props,
156
153
  other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
154
+ const id = (0, _utils2.unstable_useId)(idProp);
155
+ const loadingIndicator = loadingIndicatorProp != null ? loadingIndicatorProp : /*#__PURE__*/(0, _jsxRuntime.jsx)(_CircularProgress.default, {
156
+ "aria-labelledby": id,
157
+ color: "inherit",
158
+ size: 16
159
+ });
157
160
  const ownerState = (0, _extends2.default)({}, props, {
158
161
  disabled,
159
162
  loading,
@@ -164,6 +167,7 @@ const LoadingButton = /*#__PURE__*/React.forwardRef(function LoadingButton(inPro
164
167
  const classes = useUtilityClasses(ownerState);
165
168
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(LoadingButtonRoot, (0, _extends2.default)({
166
169
  disabled: disabled || loading,
170
+ id: id,
167
171
  ref: ref
168
172
  }, other, {
169
173
  variant: variant,
@@ -208,6 +212,11 @@ process.env.NODE_ENV !== "production" ? LoadingButton.propTypes
208
212
  */
209
213
  disabled: _propTypes.default.bool,
210
214
 
215
+ /**
216
+ * @ignore
217
+ */
218
+ id: _propTypes.default.string,
219
+
211
220
  /**
212
221
  * If `true`, the loading indicator is shown.
213
222
  * @default false
@@ -216,6 +225,8 @@ process.env.NODE_ENV !== "production" ? LoadingButton.propTypes
216
225
 
217
226
  /**
218
227
  * Element placed before the children if the button is in loading state.
228
+ * The node should contain an element with `role="progressbar"` with an accessible name.
229
+ * By default we render a `CircularProgress` that is labelled by the button itself.
219
230
  * @default <CircularProgress color="inherit" size={16} />
220
231
  */
221
232
  loadingIndicator: _propTypes.default.node,
@@ -157,7 +157,11 @@ process.env.NODE_ENV !== "production" ? MobileDatePicker.propTypes
157
157
  * The props used for each slot inside.
158
158
  * @default {}
159
159
  */
160
- componentsProps: _propTypes.default.object,
160
+ componentsProps: _propTypes.default.shape({
161
+ leftArrowButton: _propTypes.default.object,
162
+ rightArrowButton: _propTypes.default.object,
163
+ switchViewButton: _propTypes.default.object
164
+ }),
161
165
 
162
166
  /**
163
167
  * Default calendar month displayed when `value={null}`.
@@ -194,7 +194,11 @@ process.env.NODE_ENV !== "production" ? MobileDateRangePicker.propTypes
194
194
  * The props used for each slot inside.
195
195
  * @default {}
196
196
  */
197
- componentsProps: _propTypes.default.object,
197
+ componentsProps: _propTypes.default.shape({
198
+ leftArrowButton: _propTypes.default.object,
199
+ rightArrowButton: _propTypes.default.object,
200
+ switchViewButton: _propTypes.default.object
201
+ }),
198
202
 
199
203
  /**
200
204
  * Default calendar month displayed when `value={null}`.
@@ -169,7 +169,11 @@ process.env.NODE_ENV !== "production" ? MobileDateTimePicker.propTypes
169
169
  * The props used for each slot inside.
170
170
  * @default {}
171
171
  */
172
- componentsProps: _propTypes.default.object,
172
+ componentsProps: _propTypes.default.shape({
173
+ leftArrowButton: _propTypes.default.object,
174
+ rightArrowButton: _propTypes.default.object,
175
+ switchViewButton: _propTypes.default.object
176
+ }),
173
177
 
174
178
  /**
175
179
  * Date tab icon.
@@ -130,7 +130,11 @@ process.env.NODE_ENV !== "production" ? StaticDatePicker.propTypes
130
130
  * The props used for each slot inside.
131
131
  * @default {}
132
132
  */
133
- componentsProps: _propTypes.default.object,
133
+ componentsProps: _propTypes.default.shape({
134
+ leftArrowButton: _propTypes.default.object,
135
+ rightArrowButton: _propTypes.default.object,
136
+ switchViewButton: _propTypes.default.object
137
+ }),
134
138
 
135
139
  /**
136
140
  * Default calendar month displayed when `value={null}`.
@@ -168,7 +168,11 @@ process.env.NODE_ENV !== "production" ? StaticDateRangePicker.propTypes
168
168
  * The props used for each slot inside.
169
169
  * @default {}
170
170
  */
171
- componentsProps: _propTypes.default.object,
171
+ componentsProps: _propTypes.default.shape({
172
+ leftArrowButton: _propTypes.default.object,
173
+ rightArrowButton: _propTypes.default.object,
174
+ switchViewButton: _propTypes.default.object
175
+ }),
172
176
 
173
177
  /**
174
178
  * Default calendar month displayed when `value={null}`.
@@ -142,7 +142,11 @@ process.env.NODE_ENV !== "production" ? StaticDateTimePicker.propTypes
142
142
  * The props used for each slot inside.
143
143
  * @default {}
144
144
  */
145
- componentsProps: _propTypes.default.object,
145
+ componentsProps: _propTypes.default.shape({
146
+ leftArrowButton: _propTypes.default.object,
147
+ rightArrowButton: _propTypes.default.object,
148
+ switchViewButton: _propTypes.default.object
149
+ }),
146
150
 
147
151
  /**
148
152
  * Date tab icon.
package/node/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license MUI v5.0.0-alpha.60
1
+ /** @license MUI v5.0.0-alpha.64
2
2
  *
3
3
  * This source code is licensed under the MIT license found in the
4
4
  * LICENSE file in the root directory of this source tree.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mui/lab",
3
- "version": "5.0.0-alpha.60",
3
+ "version": "5.0.0-alpha.64",
4
4
  "private": false,
5
5
  "author": "MUI Team",
6
6
  "description": "Laboratory for new MUI modules.",
@@ -60,8 +60,8 @@
60
60
  "@date-io/dayjs": "^2.11.0",
61
61
  "@date-io/luxon": "^2.11.1",
62
62
  "@date-io/moment": "^2.11.0",
63
- "@mui/base": "5.0.0-alpha.60",
64
- "@mui/system": "^5.2.4",
63
+ "@mui/base": "5.0.0-alpha.64",
64
+ "@mui/system": "^5.2.8",
65
65
  "@mui/utils": "^5.2.3",
66
66
  "clsx": "^1.1.1",
67
67
  "prop-types": "^15.7.2",