@mui/lab 5.0.0-alpha.61 → 5.0.0-alpha.65
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/CHANGELOG.md +245 -32
- package/ClockPicker/ClockPicker.js +4 -1
- package/DatePicker/DatePicker.js +5 -1
- package/DateRangePicker/DateRangePicker.js +5 -1
- package/DateTimePicker/DateTimePicker.js +5 -1
- package/DesktopDatePicker/DesktopDatePicker.js +5 -1
- package/DesktopDateRangePicker/DesktopDateRangePicker.js +5 -1
- package/DesktopDateTimePicker/DesktopDateTimePicker.js +5 -1
- package/Masonry/Masonry.js +12 -34
- package/MobileDatePicker/MobileDatePicker.js +5 -1
- package/MobileDateRangePicker/MobileDateRangePicker.js +5 -1
- package/MobileDateTimePicker/MobileDateTimePicker.js +5 -1
- package/README.md +4 -4
- package/StaticDatePicker/StaticDatePicker.js +5 -1
- package/StaticDateRangePicker/StaticDateRangePicker.js +5 -1
- package/StaticDateTimePicker/StaticDateTimePicker.js +5 -1
- package/index.js +1 -1
- package/internal/pickers/PickersToolbarText.d.ts +1 -1
- package/internal/pickers/PureDateInput.js +6 -4
- package/legacy/ClockPicker/ClockPicker.js +4 -1
- package/legacy/DatePicker/DatePicker.js +5 -1
- package/legacy/DateRangePicker/DateRangePicker.js +5 -1
- package/legacy/DateTimePicker/DateTimePicker.js +5 -1
- package/legacy/DesktopDatePicker/DesktopDatePicker.js +5 -1
- package/legacy/DesktopDateRangePicker/DesktopDateRangePicker.js +5 -1
- package/legacy/DesktopDateTimePicker/DesktopDateTimePicker.js +5 -1
- package/legacy/Masonry/Masonry.js +12 -34
- package/legacy/MobileDatePicker/MobileDatePicker.js +5 -1
- package/legacy/MobileDateRangePicker/MobileDateRangePicker.js +5 -1
- package/legacy/MobileDateTimePicker/MobileDateTimePicker.js +5 -1
- package/legacy/StaticDatePicker/StaticDatePicker.js +5 -1
- package/legacy/StaticDateRangePicker/StaticDateRangePicker.js +5 -1
- package/legacy/StaticDateTimePicker/StaticDateTimePicker.js +5 -1
- package/legacy/index.js +1 -1
- package/legacy/internal/pickers/PureDateInput.js +6 -4
- package/legacy/internal/pickers/test-utils.js +2 -1
- package/modern/ClockPicker/ClockPicker.js +4 -1
- package/modern/DatePicker/DatePicker.js +5 -1
- package/modern/DateRangePicker/DateRangePicker.js +5 -1
- package/modern/DateTimePicker/DateTimePicker.js +5 -1
- package/modern/DesktopDatePicker/DesktopDatePicker.js +5 -1
- package/modern/DesktopDateRangePicker/DesktopDateRangePicker.js +5 -1
- package/modern/DesktopDateTimePicker/DesktopDateTimePicker.js +5 -1
- package/modern/Masonry/Masonry.js +12 -30
- package/modern/MobileDatePicker/MobileDatePicker.js +5 -1
- package/modern/MobileDateRangePicker/MobileDateRangePicker.js +5 -1
- package/modern/MobileDateTimePicker/MobileDateTimePicker.js +5 -1
- package/modern/StaticDatePicker/StaticDatePicker.js +5 -1
- package/modern/StaticDateRangePicker/StaticDateRangePicker.js +5 -1
- package/modern/StaticDateTimePicker/StaticDateTimePicker.js +5 -1
- package/modern/index.js +1 -1
- package/modern/internal/pickers/PureDateInput.js +6 -4
- package/node/ClockPicker/ClockPicker.js +4 -1
- package/node/DatePicker/DatePicker.js +5 -1
- package/node/DateRangePicker/DateRangePicker.js +5 -1
- package/node/DateTimePicker/DateTimePicker.js +5 -1
- package/node/DesktopDatePicker/DesktopDatePicker.js +5 -1
- package/node/DesktopDateRangePicker/DesktopDateRangePicker.js +5 -1
- package/node/DesktopDateTimePicker/DesktopDateTimePicker.js +5 -1
- package/node/Masonry/Masonry.js +12 -34
- package/node/MobileDatePicker/MobileDatePicker.js +5 -1
- package/node/MobileDateRangePicker/MobileDateRangePicker.js +5 -1
- package/node/MobileDateTimePicker/MobileDateTimePicker.js +5 -1
- package/node/StaticDatePicker/StaticDatePicker.js +5 -1
- package/node/StaticDateRangePicker/StaticDateRangePicker.js +5 -1
- package/node/StaticDateTimePicker/StaticDateTimePicker.js +5 -1
- package/node/index.js +1 -1
- package/node/internal/pickers/PureDateInput.js +6 -4
- package/package.json +7 -7
- package/themeAugmentation/components.d.ts +99 -23
|
@@ -167,36 +167,24 @@ const Masonry = /*#__PURE__*/React.forwardRef(function Masonry(inProps, ref) {
|
|
|
167
167
|
|
|
168
168
|
const classes = useUtilityClasses(ownerState);
|
|
169
169
|
|
|
170
|
-
const handleResize =
|
|
171
|
-
if (!
|
|
170
|
+
const handleResize = masonryChildren => {
|
|
171
|
+
if (!masonryRef.current || !masonryChildren || masonryChildren.length === 0) {
|
|
172
172
|
return;
|
|
173
173
|
}
|
|
174
174
|
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
if (elements[0].target.className.includes(classes.root)) {
|
|
181
|
-
masonry = elements[0].target;
|
|
182
|
-
parentWidth = elements[0].contentRect.width;
|
|
183
|
-
masonryFirstChild = elements[1]?.target || masonry.firstChild;
|
|
184
|
-
childWidth = masonryFirstChild?.contentRect?.width || masonryFirstChild?.clientWidth || 0;
|
|
185
|
-
} else {
|
|
186
|
-
masonryFirstChild = elements[0].target;
|
|
187
|
-
childWidth = elements[0].contentRect.width;
|
|
188
|
-
masonry = elements[1]?.target || masonryFirstChild.parentElement;
|
|
189
|
-
parentWidth = masonry.contentRect?.width || masonry.clientWidth;
|
|
190
|
-
}
|
|
175
|
+
const masonry = masonryRef.current;
|
|
176
|
+
const masonryFirstChild = masonryRef.current.firstChild;
|
|
177
|
+
const parentWidth = masonry.clientWidth;
|
|
178
|
+
const firstChildWidth = masonryFirstChild.clientWidth;
|
|
191
179
|
|
|
192
|
-
if (parentWidth === 0 ||
|
|
180
|
+
if (parentWidth === 0 || firstChildWidth === 0) {
|
|
193
181
|
return;
|
|
194
182
|
}
|
|
195
183
|
|
|
196
184
|
const firstChildComputedStyle = window.getComputedStyle(masonryFirstChild);
|
|
197
185
|
const firstChildMarginLeft = parseToNumber(firstChildComputedStyle.marginLeft);
|
|
198
186
|
const firstChildMarginRight = parseToNumber(firstChildComputedStyle.marginRight);
|
|
199
|
-
const currentNumberOfColumns = Math.round(parentWidth / (
|
|
187
|
+
const currentNumberOfColumns = Math.round(parentWidth / (firstChildWidth + firstChildMarginLeft + firstChildMarginRight));
|
|
200
188
|
const columnHeights = new Array(currentNumberOfColumns).fill(0);
|
|
201
189
|
let skip = false;
|
|
202
190
|
masonry.childNodes.forEach(child => {
|
|
@@ -249,16 +237,10 @@ const Masonry = /*#__PURE__*/React.forwardRef(function Masonry(inProps, ref) {
|
|
|
249
237
|
return undefined;
|
|
250
238
|
}
|
|
251
239
|
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
// this might cause unforeseen problems in some use cases;
|
|
257
|
-
resizeObserver.observe(container);
|
|
258
|
-
|
|
259
|
-
if (container.firstChild) {
|
|
260
|
-
resizeObserver.observe(container.firstChild);
|
|
261
|
-
}
|
|
240
|
+
if (masonryRef.current) {
|
|
241
|
+
masonryRef.current.childNodes.forEach(childNode => {
|
|
242
|
+
resizeObserver.observe(childNode);
|
|
243
|
+
});
|
|
262
244
|
}
|
|
263
245
|
|
|
264
246
|
return () => resizeObserver ? resizeObserver.disconnect() : {};
|
|
@@ -132,7 +132,11 @@ process.env.NODE_ENV !== "production" ? MobileDatePicker.propTypes
|
|
|
132
132
|
* The props used for each slot inside.
|
|
133
133
|
* @default {}
|
|
134
134
|
*/
|
|
135
|
-
componentsProps: PropTypes.
|
|
135
|
+
componentsProps: PropTypes.shape({
|
|
136
|
+
leftArrowButton: PropTypes.object,
|
|
137
|
+
rightArrowButton: PropTypes.object,
|
|
138
|
+
switchViewButton: PropTypes.object
|
|
139
|
+
}),
|
|
136
140
|
|
|
137
141
|
/**
|
|
138
142
|
* Default calendar month displayed when `value={null}`.
|
|
@@ -174,7 +174,11 @@ process.env.NODE_ENV !== "production" ? MobileDateRangePicker.propTypes
|
|
|
174
174
|
* The props used for each slot inside.
|
|
175
175
|
* @default {}
|
|
176
176
|
*/
|
|
177
|
-
componentsProps: PropTypes.
|
|
177
|
+
componentsProps: PropTypes.shape({
|
|
178
|
+
leftArrowButton: PropTypes.object,
|
|
179
|
+
rightArrowButton: PropTypes.object,
|
|
180
|
+
switchViewButton: PropTypes.object
|
|
181
|
+
}),
|
|
178
182
|
|
|
179
183
|
/**
|
|
180
184
|
* Default calendar month displayed when `value={null}`.
|
|
@@ -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.
|
|
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.
|
|
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.
|
|
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.
|
|
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
|
@@ -32,15 +32,17 @@ export const PureDateInput = /*#__PURE__*/React.forwardRef(function PureDateInpu
|
|
|
32
32
|
inputRef,
|
|
33
33
|
error: validationError,
|
|
34
34
|
InputProps: PureDateInputProps,
|
|
35
|
-
inputProps: {
|
|
35
|
+
inputProps: _extends({
|
|
36
36
|
disabled,
|
|
37
37
|
readOnly: true,
|
|
38
38
|
'aria-readonly': true,
|
|
39
39
|
'aria-label': getOpenDialogAriaText(rawValue, utils),
|
|
40
|
-
value: inputValue
|
|
41
|
-
|
|
40
|
+
value: inputValue
|
|
41
|
+
}, !props.readOnly && {
|
|
42
|
+
onClick: onOpen
|
|
43
|
+
}, {
|
|
42
44
|
onKeyDown: onSpaceOrEnter(onOpen)
|
|
43
|
-
}
|
|
45
|
+
})
|
|
44
46
|
}, TextFieldProps));
|
|
45
47
|
});
|
|
46
48
|
PureDateInput.propTypes = {
|
|
@@ -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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
package/node/Masonry/Masonry.js
CHANGED
|
@@ -191,40 +191,24 @@ const Masonry = /*#__PURE__*/React.forwardRef(function Masonry(inProps, ref) {
|
|
|
191
191
|
});
|
|
192
192
|
const classes = useUtilityClasses(ownerState);
|
|
193
193
|
|
|
194
|
-
const handleResize =
|
|
195
|
-
if (!
|
|
194
|
+
const handleResize = masonryChildren => {
|
|
195
|
+
if (!masonryRef.current || !masonryChildren || masonryChildren.length === 0) {
|
|
196
196
|
return;
|
|
197
197
|
}
|
|
198
198
|
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
if (elements[0].target.className.includes(classes.root)) {
|
|
205
|
-
var _elements$, _masonryFirstChild, _masonryFirstChild$co, _masonryFirstChild2;
|
|
206
|
-
|
|
207
|
-
masonry = elements[0].target;
|
|
208
|
-
parentWidth = elements[0].contentRect.width;
|
|
209
|
-
masonryFirstChild = ((_elements$ = elements[1]) == null ? void 0 : _elements$.target) || masonry.firstChild;
|
|
210
|
-
childWidth = ((_masonryFirstChild = masonryFirstChild) == null ? void 0 : (_masonryFirstChild$co = _masonryFirstChild.contentRect) == null ? void 0 : _masonryFirstChild$co.width) || ((_masonryFirstChild2 = masonryFirstChild) == null ? void 0 : _masonryFirstChild2.clientWidth) || 0;
|
|
211
|
-
} else {
|
|
212
|
-
var _elements$2, _masonry$contentRect;
|
|
213
|
-
|
|
214
|
-
masonryFirstChild = elements[0].target;
|
|
215
|
-
childWidth = elements[0].contentRect.width;
|
|
216
|
-
masonry = ((_elements$2 = elements[1]) == null ? void 0 : _elements$2.target) || masonryFirstChild.parentElement;
|
|
217
|
-
parentWidth = ((_masonry$contentRect = masonry.contentRect) == null ? void 0 : _masonry$contentRect.width) || masonry.clientWidth;
|
|
218
|
-
}
|
|
199
|
+
const masonry = masonryRef.current;
|
|
200
|
+
const masonryFirstChild = masonryRef.current.firstChild;
|
|
201
|
+
const parentWidth = masonry.clientWidth;
|
|
202
|
+
const firstChildWidth = masonryFirstChild.clientWidth;
|
|
219
203
|
|
|
220
|
-
if (parentWidth === 0 ||
|
|
204
|
+
if (parentWidth === 0 || firstChildWidth === 0) {
|
|
221
205
|
return;
|
|
222
206
|
}
|
|
223
207
|
|
|
224
208
|
const firstChildComputedStyle = window.getComputedStyle(masonryFirstChild);
|
|
225
209
|
const firstChildMarginLeft = parseToNumber(firstChildComputedStyle.marginLeft);
|
|
226
210
|
const firstChildMarginRight = parseToNumber(firstChildComputedStyle.marginRight);
|
|
227
|
-
const currentNumberOfColumns = Math.round(parentWidth / (
|
|
211
|
+
const currentNumberOfColumns = Math.round(parentWidth / (firstChildWidth + firstChildMarginLeft + firstChildMarginRight));
|
|
228
212
|
const columnHeights = new Array(currentNumberOfColumns).fill(0);
|
|
229
213
|
let skip = false;
|
|
230
214
|
masonry.childNodes.forEach(child => {
|
|
@@ -277,16 +261,10 @@ const Masonry = /*#__PURE__*/React.forwardRef(function Masonry(inProps, ref) {
|
|
|
277
261
|
return undefined;
|
|
278
262
|
}
|
|
279
263
|
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
// this might cause unforeseen problems in some use cases;
|
|
285
|
-
resizeObserver.observe(container);
|
|
286
|
-
|
|
287
|
-
if (container.firstChild) {
|
|
288
|
-
resizeObserver.observe(container.firstChild);
|
|
289
|
-
}
|
|
264
|
+
if (masonryRef.current) {
|
|
265
|
+
masonryRef.current.childNodes.forEach(childNode => {
|
|
266
|
+
resizeObserver.observe(childNode);
|
|
267
|
+
});
|
|
290
268
|
}
|
|
291
269
|
|
|
292
270
|
return () => resizeObserver ? resizeObserver.disconnect() : {};
|
|
@@ -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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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
|
@@ -50,15 +50,17 @@ const PureDateInput = /*#__PURE__*/React.forwardRef(function PureDateInput(props
|
|
|
50
50
|
inputRef,
|
|
51
51
|
error: validationError,
|
|
52
52
|
InputProps: PureDateInputProps,
|
|
53
|
-
inputProps: {
|
|
53
|
+
inputProps: (0, _extends2.default)({
|
|
54
54
|
disabled,
|
|
55
55
|
readOnly: true,
|
|
56
56
|
'aria-readonly': true,
|
|
57
57
|
'aria-label': getOpenDialogAriaText(rawValue, utils),
|
|
58
|
-
value: inputValue
|
|
59
|
-
|
|
58
|
+
value: inputValue
|
|
59
|
+
}, !props.readOnly && {
|
|
60
|
+
onClick: onOpen
|
|
61
|
+
}, {
|
|
60
62
|
onKeyDown: (0, _utils.onSpaceOrEnter)(onOpen)
|
|
61
|
-
}
|
|
63
|
+
})
|
|
62
64
|
}, TextFieldProps));
|
|
63
65
|
});
|
|
64
66
|
exports.PureDateInput = PureDateInput;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mui/lab",
|
|
3
|
-
"version": "5.0.0-alpha.
|
|
3
|
+
"version": "5.0.0-alpha.65",
|
|
4
4
|
"private": false,
|
|
5
5
|
"author": "MUI Team",
|
|
6
6
|
"description": "Laboratory for new MUI modules.",
|
|
@@ -34,8 +34,8 @@
|
|
|
34
34
|
"dayjs": "^1.10.7",
|
|
35
35
|
"luxon": "^1.28.0 || ^2.0.0",
|
|
36
36
|
"moment": "^2.29.1",
|
|
37
|
-
"react": "^17.0.
|
|
38
|
-
"react-dom": "^17.0.
|
|
37
|
+
"react": "^17.0.0",
|
|
38
|
+
"react-dom": "^17.0.0"
|
|
39
39
|
},
|
|
40
40
|
"peerDependenciesMeta": {
|
|
41
41
|
"@types/react": {
|
|
@@ -55,14 +55,14 @@
|
|
|
55
55
|
}
|
|
56
56
|
},
|
|
57
57
|
"dependencies": {
|
|
58
|
-
"@babel/runtime": "^7.16.
|
|
58
|
+
"@babel/runtime": "^7.16.7",
|
|
59
59
|
"@date-io/date-fns": "^2.11.0",
|
|
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.
|
|
64
|
-
"@mui/system": "^5.
|
|
65
|
-
"@mui/utils": "^5.
|
|
63
|
+
"@mui/base": "5.0.0-alpha.65",
|
|
64
|
+
"@mui/system": "^5.3.0",
|
|
65
|
+
"@mui/utils": "^5.3.0",
|
|
66
66
|
"clsx": "^1.1.1",
|
|
67
67
|
"prop-types": "^15.7.2",
|
|
68
68
|
"react-is": "^17.0.2",
|