@mui/lab 5.0.0-alpha.63 → 5.0.0-alpha.67
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 +284 -33
- package/CalendarPicker/PickersCalendar.js +6 -18
- package/CalendarPicker/PickersCalendarHeader.js +5 -15
- package/CalendarPicker/PickersFadeTransitionGroup.js +1 -3
- package/CalendarPicker/PickersSlideTransition.js +1 -3
- package/ClockPicker/Clock.js +6 -18
- package/ClockPicker/ClockNumber.js +1 -3
- package/ClockPicker/ClockPicker.js +4 -1
- package/ClockPicker/ClockPointer.js +2 -6
- package/DatePicker/DatePicker.js +5 -1
- package/DatePicker/DatePickerToolbar.js +2 -6
- package/DateRangePicker/DateRangePicker.js +5 -1
- package/DateRangePicker/DateRangePickerInput.js +1 -3
- package/DateRangePicker/DateRangePickerToolbar.js +2 -6
- package/DateRangePicker/DateRangePickerViewDesktop.js +4 -12
- package/DateTimePicker/DateTimePicker.js +5 -1
- package/DateTimePicker/DateTimePickerTabs.js +2 -4
- package/DateTimePicker/DateTimePickerToolbar.js +4 -12
- 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/MonthPicker/PickersMonth.js +1 -3
- package/README.md +4 -4
- package/StaticDatePicker/StaticDatePicker.js +5 -1
- package/StaticDateRangePicker/StaticDateRangePicker.js +5 -1
- package/StaticDateTimePicker/StaticDateTimePicker.js +5 -1
- package/TimePicker/TimePickerToolbar.js +4 -12
- package/TreeView/TreeView.js +4 -0
- package/YearPicker/PickersYear.js +2 -6
- package/index.js +1 -1
- package/internal/pickers/Picker/Picker.js +1 -3
- package/internal/pickers/PickersArrowSwitcher.js +2 -6
- package/internal/pickers/PickersModalDialog.js +3 -9
- package/internal/pickers/PickersPopper.js +2 -6
- package/internal/pickers/PickersToolbar.js +2 -6
- package/internal/pickers/PickersToolbarButton.js +1 -3
- package/internal/pickers/PickersToolbarText.d.ts +1 -1
- package/internal/pickers/PickersToolbarText.js +1 -3
- package/internal/pickers/PureDateInput.js +6 -4
- package/internal/pickers/wrappers/PickerStaticWrapper.js +1 -2
- package/legacy/CalendarPicker/PickersCalendar.js +6 -18
- package/legacy/CalendarPicker/PickersCalendarHeader.js +5 -15
- package/legacy/CalendarPicker/PickersFadeTransitionGroup.js +1 -3
- package/legacy/CalendarPicker/PickersSlideTransition.js +1 -3
- package/legacy/ClockPicker/Clock.js +6 -18
- package/legacy/ClockPicker/ClockNumber.js +1 -3
- package/legacy/ClockPicker/ClockPicker.js +4 -1
- package/legacy/ClockPicker/ClockPointer.js +2 -6
- package/legacy/DatePicker/DatePicker.js +5 -1
- package/legacy/DatePicker/DatePickerToolbar.js +2 -6
- package/legacy/DateRangePicker/DateRangePicker.js +5 -1
- package/legacy/DateRangePicker/DateRangePickerInput.js +1 -3
- package/legacy/DateRangePicker/DateRangePickerToolbar.js +2 -6
- package/legacy/DateRangePicker/DateRangePickerViewDesktop.js +4 -12
- package/legacy/DateTimePicker/DateTimePicker.js +5 -1
- package/legacy/DateTimePicker/DateTimePickerTabs.js +2 -4
- package/legacy/DateTimePicker/DateTimePickerToolbar.js +4 -12
- 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/MonthPicker/PickersMonth.js +1 -3
- package/legacy/StaticDatePicker/StaticDatePicker.js +5 -1
- package/legacy/StaticDateRangePicker/StaticDateRangePicker.js +5 -1
- package/legacy/StaticDateTimePicker/StaticDateTimePicker.js +5 -1
- package/legacy/TimePicker/TimePickerToolbar.js +4 -12
- package/legacy/TreeView/TreeView.js +4 -0
- package/legacy/YearPicker/PickersYear.js +2 -6
- package/legacy/index.js +1 -1
- package/legacy/internal/pickers/Picker/Picker.js +1 -3
- package/legacy/internal/pickers/PickersArrowSwitcher.js +2 -6
- package/legacy/internal/pickers/PickersModalDialog.js +3 -9
- package/legacy/internal/pickers/PickersPopper.js +2 -6
- package/legacy/internal/pickers/PickersToolbar.js +2 -6
- package/legacy/internal/pickers/PickersToolbarButton.js +1 -3
- package/legacy/internal/pickers/PickersToolbarText.js +1 -3
- package/legacy/internal/pickers/PureDateInput.js +6 -4
- package/legacy/internal/pickers/test-utils.js +2 -1
- package/legacy/internal/pickers/wrappers/PickerStaticWrapper.js +1 -2
- package/modern/CalendarPicker/PickersCalendar.js +6 -18
- package/modern/CalendarPicker/PickersCalendarHeader.js +5 -15
- package/modern/CalendarPicker/PickersFadeTransitionGroup.js +1 -3
- package/modern/CalendarPicker/PickersSlideTransition.js +1 -3
- package/modern/ClockPicker/Clock.js +6 -18
- package/modern/ClockPicker/ClockNumber.js +1 -3
- package/modern/ClockPicker/ClockPicker.js +4 -1
- package/modern/ClockPicker/ClockPointer.js +2 -6
- package/modern/DatePicker/DatePicker.js +5 -1
- package/modern/DatePicker/DatePickerToolbar.js +2 -6
- package/modern/DateRangePicker/DateRangePicker.js +5 -1
- package/modern/DateRangePicker/DateRangePickerInput.js +1 -3
- package/modern/DateRangePicker/DateRangePickerToolbar.js +2 -6
- package/modern/DateRangePicker/DateRangePickerViewDesktop.js +4 -12
- package/modern/DateTimePicker/DateTimePicker.js +5 -1
- package/modern/DateTimePicker/DateTimePickerTabs.js +2 -4
- package/modern/DateTimePicker/DateTimePickerToolbar.js +4 -12
- 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/MonthPicker/PickersMonth.js +1 -3
- package/modern/StaticDatePicker/StaticDatePicker.js +5 -1
- package/modern/StaticDateRangePicker/StaticDateRangePicker.js +5 -1
- package/modern/StaticDateTimePicker/StaticDateTimePicker.js +5 -1
- package/modern/TimePicker/TimePickerToolbar.js +4 -12
- package/modern/TreeView/TreeView.js +4 -0
- package/modern/YearPicker/PickersYear.js +2 -6
- package/modern/index.js +1 -1
- package/modern/internal/pickers/Picker/Picker.js +1 -3
- package/modern/internal/pickers/PickersArrowSwitcher.js +2 -6
- package/modern/internal/pickers/PickersModalDialog.js +3 -9
- package/modern/internal/pickers/PickersPopper.js +2 -6
- package/modern/internal/pickers/PickersToolbar.js +2 -6
- package/modern/internal/pickers/PickersToolbarButton.js +1 -3
- package/modern/internal/pickers/PickersToolbarText.js +1 -3
- package/modern/internal/pickers/PureDateInput.js +6 -4
- package/modern/internal/pickers/wrappers/PickerStaticWrapper.js +1 -2
- package/node/CalendarPicker/PickersCalendar.js +6 -18
- package/node/CalendarPicker/PickersCalendarHeader.js +5 -15
- package/node/CalendarPicker/PickersFadeTransitionGroup.js +1 -3
- package/node/CalendarPicker/PickersSlideTransition.js +1 -3
- package/node/ClockPicker/Clock.js +6 -18
- package/node/ClockPicker/ClockNumber.js +1 -3
- package/node/ClockPicker/ClockPicker.js +4 -1
- package/node/ClockPicker/ClockPointer.js +2 -6
- package/node/DatePicker/DatePicker.js +5 -1
- package/node/DatePicker/DatePickerToolbar.js +2 -6
- package/node/DateRangePicker/DateRangePicker.js +5 -1
- package/node/DateRangePicker/DateRangePickerInput.js +1 -3
- package/node/DateRangePicker/DateRangePickerToolbar.js +2 -6
- package/node/DateRangePicker/DateRangePickerViewDesktop.js +4 -12
- package/node/DateTimePicker/DateTimePicker.js +5 -1
- package/node/DateTimePicker/DateTimePickerTabs.js +2 -4
- package/node/DateTimePicker/DateTimePickerToolbar.js +4 -12
- 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/MonthPicker/PickersMonth.js +1 -3
- package/node/StaticDatePicker/StaticDatePicker.js +5 -1
- package/node/StaticDateRangePicker/StaticDateRangePicker.js +5 -1
- package/node/StaticDateTimePicker/StaticDateTimePicker.js +5 -1
- package/node/TimePicker/TimePickerToolbar.js +4 -12
- package/node/TreeView/TreeView.js +4 -0
- package/node/YearPicker/PickersYear.js +2 -6
- package/node/index.js +1 -1
- package/node/internal/pickers/Picker/Picker.js +1 -3
- package/node/internal/pickers/PickersArrowSwitcher.js +2 -6
- package/node/internal/pickers/PickersModalDialog.js +3 -9
- package/node/internal/pickers/PickersPopper.js +2 -6
- package/node/internal/pickers/PickersToolbar.js +2 -6
- package/node/internal/pickers/PickersToolbarButton.js +1 -3
- package/node/internal/pickers/PickersToolbarText.js +1 -3
- package/node/internal/pickers/PureDateInput.js +6 -4
- package/node/internal/pickers/wrappers/PickerStaticWrapper.js +1 -2
- package/package.json +7 -7
- package/themeAugmentation/components.d.ts +99 -23
|
@@ -173,40 +173,24 @@ var Masonry = /*#__PURE__*/React.forwardRef(function Masonry(inProps, ref) {
|
|
|
173
173
|
|
|
174
174
|
var classes = useUtilityClasses(ownerState);
|
|
175
175
|
|
|
176
|
-
var handleResize = function handleResize(
|
|
177
|
-
if (!
|
|
176
|
+
var handleResize = function handleResize(masonryChildren) {
|
|
177
|
+
if (!masonryRef.current || !masonryChildren || masonryChildren.length === 0) {
|
|
178
178
|
return;
|
|
179
179
|
}
|
|
180
180
|
|
|
181
|
-
var masonry;
|
|
182
|
-
var masonryFirstChild;
|
|
183
|
-
var parentWidth;
|
|
184
|
-
var
|
|
185
|
-
|
|
186
|
-
if (elements[0].target.className.includes(classes.root)) {
|
|
187
|
-
var _elements$, _masonryFirstChild, _masonryFirstChild$co, _masonryFirstChild2;
|
|
188
|
-
|
|
189
|
-
masonry = elements[0].target;
|
|
190
|
-
parentWidth = elements[0].contentRect.width;
|
|
191
|
-
masonryFirstChild = ((_elements$ = elements[1]) == null ? void 0 : _elements$.target) || masonry.firstChild;
|
|
192
|
-
childWidth = ((_masonryFirstChild = masonryFirstChild) == null ? void 0 : (_masonryFirstChild$co = _masonryFirstChild.contentRect) == null ? void 0 : _masonryFirstChild$co.width) || ((_masonryFirstChild2 = masonryFirstChild) == null ? void 0 : _masonryFirstChild2.clientWidth) || 0;
|
|
193
|
-
} else {
|
|
194
|
-
var _elements$2, _masonry$contentRect;
|
|
195
|
-
|
|
196
|
-
masonryFirstChild = elements[0].target;
|
|
197
|
-
childWidth = elements[0].contentRect.width;
|
|
198
|
-
masonry = ((_elements$2 = elements[1]) == null ? void 0 : _elements$2.target) || masonryFirstChild.parentElement;
|
|
199
|
-
parentWidth = ((_masonry$contentRect = masonry.contentRect) == null ? void 0 : _masonry$contentRect.width) || masonry.clientWidth;
|
|
200
|
-
}
|
|
181
|
+
var masonry = masonryRef.current;
|
|
182
|
+
var masonryFirstChild = masonryRef.current.firstChild;
|
|
183
|
+
var parentWidth = masonry.clientWidth;
|
|
184
|
+
var firstChildWidth = masonryFirstChild.clientWidth;
|
|
201
185
|
|
|
202
|
-
if (parentWidth === 0 ||
|
|
186
|
+
if (parentWidth === 0 || firstChildWidth === 0) {
|
|
203
187
|
return;
|
|
204
188
|
}
|
|
205
189
|
|
|
206
190
|
var firstChildComputedStyle = window.getComputedStyle(masonryFirstChild);
|
|
207
191
|
var firstChildMarginLeft = parseToNumber(firstChildComputedStyle.marginLeft);
|
|
208
192
|
var firstChildMarginRight = parseToNumber(firstChildComputedStyle.marginRight);
|
|
209
|
-
var currentNumberOfColumns = Math.round(parentWidth / (
|
|
193
|
+
var currentNumberOfColumns = Math.round(parentWidth / (firstChildWidth + firstChildMarginLeft + firstChildMarginRight));
|
|
210
194
|
var columnHeights = new Array(currentNumberOfColumns).fill(0);
|
|
211
195
|
var skip = false;
|
|
212
196
|
masonry.childNodes.forEach(function (child) {
|
|
@@ -259,16 +243,10 @@ var Masonry = /*#__PURE__*/React.forwardRef(function Masonry(inProps, ref) {
|
|
|
259
243
|
return undefined;
|
|
260
244
|
}
|
|
261
245
|
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
// this might cause unforeseen problems in some use cases;
|
|
267
|
-
resizeObserver.observe(container);
|
|
268
|
-
|
|
269
|
-
if (container.firstChild) {
|
|
270
|
-
resizeObserver.observe(container.firstChild);
|
|
271
|
-
}
|
|
246
|
+
if (masonryRef.current) {
|
|
247
|
+
masonryRef.current.childNodes.forEach(function (childNode) {
|
|
248
|
+
resizeObserver.observe(childNode);
|
|
249
|
+
});
|
|
272
250
|
}
|
|
273
251
|
|
|
274
252
|
return function () {
|
|
@@ -135,7 +135,11 @@ process.env.NODE_ENV !== "production" ? MobileDatePicker.propTypes
|
|
|
135
135
|
* The props used for each slot inside.
|
|
136
136
|
* @default {}
|
|
137
137
|
*/
|
|
138
|
-
componentsProps: PropTypes.
|
|
138
|
+
componentsProps: PropTypes.shape({
|
|
139
|
+
leftArrowButton: PropTypes.object,
|
|
140
|
+
rightArrowButton: PropTypes.object,
|
|
141
|
+
switchViewButton: PropTypes.object
|
|
142
|
+
}),
|
|
139
143
|
|
|
140
144
|
/**
|
|
141
145
|
* Default calendar month displayed when `value={null}`.
|
|
@@ -180,7 +180,11 @@ process.env.NODE_ENV !== "production" ? MobileDateRangePicker.propTypes
|
|
|
180
180
|
* The props used for each slot inside.
|
|
181
181
|
* @default {}
|
|
182
182
|
*/
|
|
183
|
-
componentsProps: PropTypes.
|
|
183
|
+
componentsProps: PropTypes.shape({
|
|
184
|
+
leftArrowButton: PropTypes.object,
|
|
185
|
+
rightArrowButton: PropTypes.object,
|
|
186
|
+
switchViewButton: PropTypes.object
|
|
187
|
+
}),
|
|
184
188
|
|
|
185
189
|
/**
|
|
186
190
|
* Default calendar month displayed when `value={null}`.
|
|
@@ -147,7 +147,11 @@ process.env.NODE_ENV !== "production" ? MobileDateTimePicker.propTypes
|
|
|
147
147
|
* The props used for each slot inside.
|
|
148
148
|
* @default {}
|
|
149
149
|
*/
|
|
150
|
-
componentsProps: PropTypes.
|
|
150
|
+
componentsProps: PropTypes.shape({
|
|
151
|
+
leftArrowButton: PropTypes.object,
|
|
152
|
+
rightArrowButton: PropTypes.object,
|
|
153
|
+
switchViewButton: PropTypes.object
|
|
154
|
+
}),
|
|
151
155
|
|
|
152
156
|
/**
|
|
153
157
|
* Date tab icon.
|
|
@@ -9,9 +9,7 @@ import { generateUtilityClasses } from '@mui/base';
|
|
|
9
9
|
import { onSpaceOrEnter } from '../internal/pickers/utils';
|
|
10
10
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
11
11
|
var classes = generateUtilityClasses('PrivatePickersMonth', ['root', 'selected']);
|
|
12
|
-
var PickersMonthRoot = styled(Typography
|
|
13
|
-
skipSx: true
|
|
14
|
-
})(function (_ref) {
|
|
12
|
+
var PickersMonthRoot = styled(Typography)(function (_ref) {
|
|
15
13
|
var theme = _ref.theme;
|
|
16
14
|
return _extends({
|
|
17
15
|
flex: '1 0 33.33%',
|
|
@@ -110,7 +110,11 @@ process.env.NODE_ENV !== "production" ? StaticDatePicker.propTypes
|
|
|
110
110
|
* The props used for each slot inside.
|
|
111
111
|
* @default {}
|
|
112
112
|
*/
|
|
113
|
-
componentsProps: PropTypes.
|
|
113
|
+
componentsProps: PropTypes.shape({
|
|
114
|
+
leftArrowButton: PropTypes.object,
|
|
115
|
+
rightArrowButton: PropTypes.object,
|
|
116
|
+
switchViewButton: PropTypes.object
|
|
117
|
+
}),
|
|
114
118
|
|
|
115
119
|
/**
|
|
116
120
|
* Default calendar month displayed when `value={null}`.
|
|
@@ -156,7 +156,11 @@ process.env.NODE_ENV !== "production" ? StaticDateRangePicker.propTypes
|
|
|
156
156
|
* The props used for each slot inside.
|
|
157
157
|
* @default {}
|
|
158
158
|
*/
|
|
159
|
-
componentsProps: PropTypes.
|
|
159
|
+
componentsProps: PropTypes.shape({
|
|
160
|
+
leftArrowButton: PropTypes.object,
|
|
161
|
+
rightArrowButton: PropTypes.object,
|
|
162
|
+
switchViewButton: PropTypes.object
|
|
163
|
+
}),
|
|
160
164
|
|
|
161
165
|
/**
|
|
162
166
|
* Default calendar month displayed when `value={null}`.
|
|
@@ -122,7 +122,11 @@ process.env.NODE_ENV !== "production" ? StaticDateTimePicker.propTypes
|
|
|
122
122
|
* The props used for each slot inside.
|
|
123
123
|
* @default {}
|
|
124
124
|
*/
|
|
125
|
-
componentsProps: PropTypes.
|
|
125
|
+
componentsProps: PropTypes.shape({
|
|
126
|
+
leftArrowButton: PropTypes.object,
|
|
127
|
+
rightArrowButton: PropTypes.object,
|
|
128
|
+
switchViewButton: PropTypes.object
|
|
129
|
+
}),
|
|
126
130
|
|
|
127
131
|
/**
|
|
128
132
|
* Date tab icon.
|
|
@@ -32,21 +32,15 @@ var useUtilityClasses = function useUtilityClasses(ownerState) {
|
|
|
32
32
|
return composeClasses(slots, getTimePickerToolbarUtilityClass, classes);
|
|
33
33
|
};
|
|
34
34
|
|
|
35
|
-
var TimePickerToolbarRoot = styled(PickersToolbar, {
|
|
36
|
-
skipSx: true
|
|
37
|
-
})(_defineProperty({}, "& .".concat(timePickerToolbarClasses.penIconLandscape), {
|
|
35
|
+
var TimePickerToolbarRoot = styled(PickersToolbar)(_defineProperty({}, "& .".concat(timePickerToolbarClasses.penIconLandscape), {
|
|
38
36
|
marginTop: 'auto'
|
|
39
37
|
}));
|
|
40
|
-
var TimePickerToolbarSeparator = styled(PickersToolbarText
|
|
41
|
-
skipSx: true
|
|
42
|
-
})({
|
|
38
|
+
var TimePickerToolbarSeparator = styled(PickersToolbarText)({
|
|
43
39
|
outline: 0,
|
|
44
40
|
margin: '0 4px 0 2px',
|
|
45
41
|
cursor: 'default'
|
|
46
42
|
});
|
|
47
|
-
var TimePickerToolbarHourMinuteLabel = styled('div'
|
|
48
|
-
skipSx: true
|
|
49
|
-
})(function (_ref) {
|
|
43
|
+
var TimePickerToolbarHourMinuteLabel = styled('div')(function (_ref) {
|
|
50
44
|
var theme = _ref.theme,
|
|
51
45
|
ownerState = _ref.ownerState;
|
|
52
46
|
return _extends({
|
|
@@ -59,9 +53,7 @@ var TimePickerToolbarHourMinuteLabel = styled('div', {
|
|
|
59
53
|
flexDirection: 'row-reverse'
|
|
60
54
|
});
|
|
61
55
|
});
|
|
62
|
-
var TimePickerToolbarAmPmSelection = styled('div'
|
|
63
|
-
skipSx: true
|
|
64
|
-
})(function (_ref2) {
|
|
56
|
+
var TimePickerToolbarAmPmSelection = styled('div')(function (_ref2) {
|
|
65
57
|
var ownerState = _ref2.ownerState;
|
|
66
58
|
return _extends({
|
|
67
59
|
display: 'flex',
|
|
@@ -751,6 +751,10 @@ var TreeView = /*#__PURE__*/React.forwardRef(function TreeView(inProps, ref) {
|
|
|
751
751
|
if (isExpandable(focusedNodeId)) {
|
|
752
752
|
toggleExpansion(event);
|
|
753
753
|
flag = true;
|
|
754
|
+
} else if (multiSelect) {
|
|
755
|
+
flag = selectNode(event, focusedNodeId, true);
|
|
756
|
+
} else {
|
|
757
|
+
flag = selectNode(event, focusedNodeId);
|
|
754
758
|
}
|
|
755
759
|
}
|
|
756
760
|
|
|
@@ -24,9 +24,7 @@ var useUtilityClasses = function useUtilityClasses(ownerState) {
|
|
|
24
24
|
return composeClasses(slots, getPickersYearUtilityClass, classes);
|
|
25
25
|
};
|
|
26
26
|
|
|
27
|
-
var PickersYearRoot = styled('div'
|
|
28
|
-
skipSx: true
|
|
29
|
-
})(function (_ref) {
|
|
27
|
+
var PickersYearRoot = styled('div')(function (_ref) {
|
|
30
28
|
var ownerState = _ref.ownerState;
|
|
31
29
|
return _extends({
|
|
32
30
|
flexBasis: '33.3%',
|
|
@@ -37,9 +35,7 @@ var PickersYearRoot = styled('div', {
|
|
|
37
35
|
flexBasis: '25%'
|
|
38
36
|
});
|
|
39
37
|
});
|
|
40
|
-
var PickersYearButton = styled('button'
|
|
41
|
-
skipSx: true
|
|
42
|
-
})(function (_ref2) {
|
|
38
|
+
var PickersYearButton = styled('button')(function (_ref2) {
|
|
43
39
|
var _extends2;
|
|
44
40
|
|
|
45
41
|
var theme = _ref2.theme;
|
package/legacy/index.js
CHANGED
|
@@ -14,9 +14,7 @@ import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
14
14
|
export var MobileKeyboardInputView = styled('div')({
|
|
15
15
|
padding: '16px 24px'
|
|
16
16
|
});
|
|
17
|
-
var PickerRoot = styled('div'
|
|
18
|
-
skipSx: true
|
|
19
|
-
})(function (_ref) {
|
|
17
|
+
var PickerRoot = styled('div')(function (_ref) {
|
|
20
18
|
var ownerState = _ref.ownerState;
|
|
21
19
|
return _extends({
|
|
22
20
|
display: 'flex',
|
|
@@ -11,17 +11,13 @@ import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
11
11
|
var PickersArrowSwitcherRoot = styled('div')({
|
|
12
12
|
display: 'flex'
|
|
13
13
|
});
|
|
14
|
-
var PickersArrowSwitcherSpacer = styled('div'
|
|
15
|
-
skipSx: true
|
|
16
|
-
})(function (_ref) {
|
|
14
|
+
var PickersArrowSwitcherSpacer = styled('div')(function (_ref) {
|
|
17
15
|
var theme = _ref.theme;
|
|
18
16
|
return {
|
|
19
17
|
width: theme.spacing(3)
|
|
20
18
|
};
|
|
21
19
|
});
|
|
22
|
-
var PickersArrowSwitcherButton = styled(IconButton
|
|
23
|
-
skipSx: true
|
|
24
|
-
})(function (_ref2) {
|
|
20
|
+
var PickersArrowSwitcherButton = styled(IconButton)(function (_ref2) {
|
|
25
21
|
var ownerState = _ref2.ownerState;
|
|
26
22
|
return _extends({}, ownerState.hidden && {
|
|
27
23
|
visibility: 'hidden'
|
|
@@ -12,24 +12,18 @@ import { styled } from '@mui/material/styles';
|
|
|
12
12
|
import { DIALOG_WIDTH } from './constants/dimensions';
|
|
13
13
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
14
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
15
|
-
var PickersModalDialogRoot = styled(Dialog, {
|
|
16
|
-
skipSx: true
|
|
17
|
-
})((_styled = {}, _defineProperty(_styled, "& .".concat(dialogClasses.container), {
|
|
15
|
+
var PickersModalDialogRoot = styled(Dialog)((_styled = {}, _defineProperty(_styled, "& .".concat(dialogClasses.container), {
|
|
18
16
|
outline: 0
|
|
19
17
|
}), _defineProperty(_styled, "& .".concat(dialogClasses.paper), {
|
|
20
18
|
outline: 0,
|
|
21
19
|
minWidth: DIALOG_WIDTH
|
|
22
20
|
}), _styled));
|
|
23
|
-
var PickersModalDialogContent = styled(DialogContent
|
|
24
|
-
skipSx: true
|
|
25
|
-
})({
|
|
21
|
+
var PickersModalDialogContent = styled(DialogContent)({
|
|
26
22
|
'&:first-of-type': {
|
|
27
23
|
padding: 0
|
|
28
24
|
}
|
|
29
25
|
});
|
|
30
|
-
var PickersModalDialogActions = styled(DialogActions
|
|
31
|
-
skipSx: true
|
|
32
|
-
})(function (_ref) {
|
|
26
|
+
var PickersModalDialogActions = styled(DialogActions)(function (_ref) {
|
|
33
27
|
var ownerState = _ref.ownerState;
|
|
34
28
|
return _extends({}, (ownerState.clearable || ownerState.showTodayButton) && {
|
|
35
29
|
// set justifyContent to default value to fix IE11 layout bug
|
|
@@ -9,17 +9,13 @@ import TrapFocus from '@mui/material/Unstable_TrapFocus';
|
|
|
9
9
|
import { useForkRef, useEventCallback, ownerDocument } from '@mui/material/utils';
|
|
10
10
|
import { styled } from '@mui/material/styles';
|
|
11
11
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
12
|
-
var PickersPopperRoot = styled(Popper
|
|
13
|
-
skipSx: true
|
|
14
|
-
})(function (_ref) {
|
|
12
|
+
var PickersPopperRoot = styled(Popper)(function (_ref) {
|
|
15
13
|
var theme = _ref.theme;
|
|
16
14
|
return {
|
|
17
15
|
zIndex: theme.zIndex.modal
|
|
18
16
|
};
|
|
19
17
|
});
|
|
20
|
-
var PickersPopperPaper = styled(Paper
|
|
21
|
-
skipSx: true
|
|
22
|
-
})(function (_ref2) {
|
|
18
|
+
var PickersPopperPaper = styled(Paper)(function (_ref2) {
|
|
23
19
|
var ownerState = _ref2.ownerState;
|
|
24
20
|
return _extends({
|
|
25
21
|
transformOrigin: 'top center',
|
|
@@ -15,9 +15,7 @@ import ClockIcon from '../svg-icons/Clock';
|
|
|
15
15
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
16
16
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
17
17
|
var classes = generateUtilityClasses('PrivatePickersToolbar', ['root', 'dateTitleContainer']);
|
|
18
|
-
var PickersToolbarRoot = styled('div'
|
|
19
|
-
skipSx: true
|
|
20
|
-
})(function (_ref) {
|
|
18
|
+
var PickersToolbarRoot = styled('div')(function (_ref) {
|
|
21
19
|
var theme = _ref.theme,
|
|
22
20
|
ownerState = _ref.ownerState;
|
|
23
21
|
return _extends({
|
|
@@ -34,9 +32,7 @@ var PickersToolbarRoot = styled('div', {
|
|
|
34
32
|
flexWrap: 'wrap'
|
|
35
33
|
});
|
|
36
34
|
});
|
|
37
|
-
var PickersToolbarGrid = styled(Grid
|
|
38
|
-
skipSx: true
|
|
39
|
-
})({
|
|
35
|
+
var PickersToolbarGrid = styled(Grid)({
|
|
40
36
|
flex: 1
|
|
41
37
|
});
|
|
42
38
|
|
|
@@ -5,9 +5,7 @@ import Button from '@mui/material/Button';
|
|
|
5
5
|
import { styled } from '@mui/material/styles';
|
|
6
6
|
import PickersToolbarText from './PickersToolbarText';
|
|
7
7
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
|
-
var PickersToolbarButtonRoot = styled(Button
|
|
9
|
-
skipSx: true
|
|
10
|
-
})({
|
|
8
|
+
var PickersToolbarButtonRoot = styled(Button)({
|
|
11
9
|
padding: 0,
|
|
12
10
|
minWidth: 16,
|
|
13
11
|
textTransform: 'none'
|
|
@@ -8,9 +8,7 @@ import { styled } from '@mui/material/styles';
|
|
|
8
8
|
import { generateUtilityClasses } from '@mui/base';
|
|
9
9
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
10
10
|
var classes = generateUtilityClasses('PrivatePickersToolbarText', ['selected']);
|
|
11
|
-
var PickersToolbarTextRoot = styled(Typography
|
|
12
|
-
skipSx: true
|
|
13
|
-
})(function (_ref) {
|
|
11
|
+
var PickersToolbarTextRoot = styled(Typography)(function (_ref) {
|
|
14
12
|
var theme = _ref.theme;
|
|
15
13
|
return _defineProperty({
|
|
16
14
|
transition: theme.transitions.create('color'),
|
|
@@ -34,15 +34,17 @@ export var PureDateInput = /*#__PURE__*/React.forwardRef(function PureDateInput(
|
|
|
34
34
|
inputRef: inputRef,
|
|
35
35
|
error: validationError,
|
|
36
36
|
InputProps: PureDateInputProps,
|
|
37
|
-
inputProps: {
|
|
37
|
+
inputProps: _extends({
|
|
38
38
|
disabled: disabled,
|
|
39
39
|
readOnly: true,
|
|
40
40
|
'aria-readonly': true,
|
|
41
41
|
'aria-label': getOpenDialogAriaText(rawValue, utils),
|
|
42
|
-
value: inputValue
|
|
43
|
-
|
|
42
|
+
value: inputValue
|
|
43
|
+
}, !props.readOnly && {
|
|
44
|
+
onClick: onOpen
|
|
45
|
+
}, {
|
|
44
46
|
onKeyDown: onSpaceOrEnter(onOpen)
|
|
45
|
-
}
|
|
47
|
+
})
|
|
46
48
|
}, TextFieldProps));
|
|
47
49
|
});
|
|
48
50
|
PureDateInput.propTypes = {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
3
|
+
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
3
4
|
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
4
5
|
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
5
6
|
import _possibleConstructorReturn from "@babel/runtime/helpers/esm/possibleConstructorReturn";
|
|
@@ -58,7 +59,7 @@ export var AdapterClassToUse = /*#__PURE__*/function (_AdapterDateFns) {
|
|
|
58
59
|
return _this;
|
|
59
60
|
}
|
|
60
61
|
|
|
61
|
-
return AdapterClassToUse;
|
|
62
|
+
return _createClass(AdapterClassToUse);
|
|
62
63
|
}(AdapterDateFns);
|
|
63
64
|
export var adapterToUse = new AdapterClassToUse();
|
|
64
65
|
export var FakeTransitionComponent = /*#__PURE__*/React.forwardRef(function FakeTransitionComponent(_ref, ref) {
|
|
@@ -12,16 +12,12 @@ import SlideTransition from './PickersSlideTransition';
|
|
|
12
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
13
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
14
14
|
const weeksContainerHeight = (DAY_SIZE + DAY_MARGIN * 4) * 6;
|
|
15
|
-
const PickersCalendarDayHeader = styled('div'
|
|
16
|
-
skipSx: true
|
|
17
|
-
})({
|
|
15
|
+
const PickersCalendarDayHeader = styled('div')({
|
|
18
16
|
display: 'flex',
|
|
19
17
|
justifyContent: 'center',
|
|
20
18
|
alignItems: 'center'
|
|
21
19
|
});
|
|
22
|
-
const PickersCalendarWeekDayLabel = styled(Typography
|
|
23
|
-
skipSx: true
|
|
24
|
-
})(({
|
|
20
|
+
const PickersCalendarWeekDayLabel = styled(Typography)(({
|
|
25
21
|
theme
|
|
26
22
|
}) => ({
|
|
27
23
|
width: 36,
|
|
@@ -33,27 +29,19 @@ const PickersCalendarWeekDayLabel = styled(Typography, {
|
|
|
33
29
|
alignItems: 'center',
|
|
34
30
|
color: theme.palette.text.secondary
|
|
35
31
|
}));
|
|
36
|
-
const PickersCalendarLoadingContainer = styled('div'
|
|
37
|
-
skipSx: true
|
|
38
|
-
})({
|
|
32
|
+
const PickersCalendarLoadingContainer = styled('div')({
|
|
39
33
|
display: 'flex',
|
|
40
34
|
justifyContent: 'center',
|
|
41
35
|
alignItems: 'center',
|
|
42
36
|
minHeight: weeksContainerHeight
|
|
43
37
|
});
|
|
44
|
-
const PickersCalendarSlideTransition = styled(SlideTransition
|
|
45
|
-
skipSx: true
|
|
46
|
-
})({
|
|
38
|
+
const PickersCalendarSlideTransition = styled(SlideTransition)({
|
|
47
39
|
minHeight: weeksContainerHeight
|
|
48
40
|
});
|
|
49
|
-
const PickersCalendarWeekContainer = styled('div'
|
|
50
|
-
skipSx: true
|
|
51
|
-
})({
|
|
41
|
+
const PickersCalendarWeekContainer = styled('div')({
|
|
52
42
|
overflow: 'hidden'
|
|
53
43
|
});
|
|
54
|
-
const PickersCalendarWeek = styled('div'
|
|
55
|
-
skipSx: true
|
|
56
|
-
})({
|
|
44
|
+
const PickersCalendarWeek = styled('div')({
|
|
57
45
|
margin: `${DAY_MARGIN}px 0`,
|
|
58
46
|
display: 'flex',
|
|
59
47
|
justifyContent: 'center'
|
|
@@ -11,9 +11,7 @@ import PickersArrowSwitcher from '../internal/pickers/PickersArrowSwitcher';
|
|
|
11
11
|
import { usePreviousMonthDisabled, useNextMonthDisabled } from '../internal/pickers/hooks/date-helpers-hooks';
|
|
12
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
13
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
14
|
-
const PickersCalendarHeaderRoot = styled('div'
|
|
15
|
-
skipSx: true
|
|
16
|
-
})({
|
|
14
|
+
const PickersCalendarHeaderRoot = styled('div')({
|
|
17
15
|
display: 'flex',
|
|
18
16
|
alignItems: 'center',
|
|
19
17
|
marginTop: 16,
|
|
@@ -24,9 +22,7 @@ const PickersCalendarHeaderRoot = styled('div', {
|
|
|
24
22
|
maxHeight: 30,
|
|
25
23
|
minHeight: 30
|
|
26
24
|
});
|
|
27
|
-
const PickersCalendarHeaderLabel = styled('div'
|
|
28
|
-
skipSx: true
|
|
29
|
-
})(({
|
|
25
|
+
const PickersCalendarHeaderLabel = styled('div')(({
|
|
30
26
|
theme
|
|
31
27
|
}) => _extends({
|
|
32
28
|
display: 'flex',
|
|
@@ -38,19 +34,13 @@ const PickersCalendarHeaderLabel = styled('div', {
|
|
|
38
34
|
}, theme.typography.body1, {
|
|
39
35
|
fontWeight: theme.typography.fontWeightMedium
|
|
40
36
|
}));
|
|
41
|
-
const PickersCalendarHeaderLabelItem = styled('div'
|
|
42
|
-
skipSx: true
|
|
43
|
-
})({
|
|
37
|
+
const PickersCalendarHeaderLabelItem = styled('div')({
|
|
44
38
|
marginRight: 6
|
|
45
39
|
});
|
|
46
|
-
const PickersCalendarHeaderSwitchViewButton = styled(IconButton
|
|
47
|
-
skipSx: true
|
|
48
|
-
})({
|
|
40
|
+
const PickersCalendarHeaderSwitchViewButton = styled(IconButton)({
|
|
49
41
|
marginRight: 'auto'
|
|
50
42
|
});
|
|
51
|
-
const PickersCalendarHeaderSwitchView = styled(ArrowDropDownIcon
|
|
52
|
-
skipSx: true
|
|
53
|
-
})(({
|
|
43
|
+
const PickersCalendarHeaderSwitchView = styled(ArrowDropDownIcon)(({
|
|
54
44
|
theme,
|
|
55
45
|
ownerState
|
|
56
46
|
}) => _extends({
|
|
@@ -7,9 +7,7 @@ import { TransitionGroup } from 'react-transition-group';
|
|
|
7
7
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
8
|
const classes = generateUtilityClasses('PrivatePickersFadeTransitionGroup', ['root']);
|
|
9
9
|
const animationDuration = 500;
|
|
10
|
-
const PickersFadeTransitionGroupRoot = styled(TransitionGroup
|
|
11
|
-
skipSx: true
|
|
12
|
-
})({
|
|
10
|
+
const PickersFadeTransitionGroupRoot = styled(TransitionGroup)({
|
|
13
11
|
display: 'block',
|
|
14
12
|
position: 'relative'
|
|
15
13
|
});
|
|
@@ -9,9 +9,7 @@ import { CSSTransition, TransitionGroup } from 'react-transition-group';
|
|
|
9
9
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
10
10
|
const classes = generateUtilityClasses('PrivatePickersSlideTransition', ['root', 'slideEnter-left', 'slideEnter-right', 'slideEnterActive', 'slideEnterActive', 'slideExit', 'slideExitActiveLeft-left', 'slideExitActiveLeft-right']);
|
|
11
11
|
export const slideAnimationDuration = 350;
|
|
12
|
-
const PickersSlideTransitionRoot = styled(TransitionGroup
|
|
13
|
-
skipSx: true
|
|
14
|
-
})(({
|
|
12
|
+
const PickersSlideTransitionRoot = styled(TransitionGroup)(({
|
|
15
13
|
theme
|
|
16
14
|
}) => {
|
|
17
15
|
const slideTransition = theme.transitions.create('transform', {
|
|
@@ -13,9 +13,7 @@ import { WrapperVariantContext } from '../internal/pickers/wrappers/WrapperVaria
|
|
|
13
13
|
import { getHours, getMinutes } from './shared';
|
|
14
14
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
15
15
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
16
|
-
const ClockRoot = styled('div'
|
|
17
|
-
skipSx: true
|
|
18
|
-
})(({
|
|
16
|
+
const ClockRoot = styled('div')(({
|
|
19
17
|
theme
|
|
20
18
|
}) => ({
|
|
21
19
|
display: 'flex',
|
|
@@ -23,9 +21,7 @@ const ClockRoot = styled('div', {
|
|
|
23
21
|
alignItems: 'center',
|
|
24
22
|
margin: theme.spacing(2)
|
|
25
23
|
}));
|
|
26
|
-
const ClockClock = styled('div'
|
|
27
|
-
skipSx: true
|
|
28
|
-
})({
|
|
24
|
+
const ClockClock = styled('div')({
|
|
29
25
|
backgroundColor: 'rgba(0,0,0,.07)',
|
|
30
26
|
borderRadius: '50%',
|
|
31
27
|
height: 220,
|
|
@@ -34,9 +30,7 @@ const ClockClock = styled('div', {
|
|
|
34
30
|
position: 'relative',
|
|
35
31
|
pointerEvents: 'none'
|
|
36
32
|
});
|
|
37
|
-
const ClockSquareMask = styled('div'
|
|
38
|
-
skipSx: true
|
|
39
|
-
})({
|
|
33
|
+
const ClockSquareMask = styled('div')({
|
|
40
34
|
width: '100%',
|
|
41
35
|
height: '100%',
|
|
42
36
|
position: 'absolute',
|
|
@@ -53,9 +47,7 @@ const ClockSquareMask = styled('div', {
|
|
|
53
47
|
cursor: 'move'
|
|
54
48
|
}
|
|
55
49
|
});
|
|
56
|
-
const ClockPin = styled('div'
|
|
57
|
-
skipSx: true
|
|
58
|
-
})(({
|
|
50
|
+
const ClockPin = styled('div')(({
|
|
59
51
|
theme
|
|
60
52
|
}) => ({
|
|
61
53
|
width: 6,
|
|
@@ -67,9 +59,7 @@ const ClockPin = styled('div', {
|
|
|
67
59
|
left: '50%',
|
|
68
60
|
transform: 'translate(-50%, -50%)'
|
|
69
61
|
}));
|
|
70
|
-
const ClockAmButton = styled(IconButton
|
|
71
|
-
skipSx: true
|
|
72
|
-
})(({
|
|
62
|
+
const ClockAmButton = styled(IconButton)(({
|
|
73
63
|
theme,
|
|
74
64
|
ownerState
|
|
75
65
|
}) => _extends({
|
|
@@ -84,9 +74,7 @@ const ClockAmButton = styled(IconButton, {
|
|
|
84
74
|
backgroundColor: theme.palette.primary.light
|
|
85
75
|
}
|
|
86
76
|
}));
|
|
87
|
-
const ClockPmButton = styled(IconButton
|
|
88
|
-
skipSx: true
|
|
89
|
-
})(({
|
|
77
|
+
const ClockPmButton = styled(IconButton)(({
|
|
90
78
|
theme,
|
|
91
79
|
ownerState
|
|
92
80
|
}) => _extends({
|
|
@@ -8,9 +8,7 @@ import { generateUtilityClasses } from '@mui/base';
|
|
|
8
8
|
import { CLOCK_WIDTH, CLOCK_HOUR_WIDTH } from './shared';
|
|
9
9
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
10
10
|
export const classes = generateUtilityClasses('PrivateClockNumber', ['selected', 'disabled']);
|
|
11
|
-
const ClockNumberRoot = styled('span'
|
|
12
|
-
skipSx: true
|
|
13
|
-
})(({
|
|
11
|
+
const ClockNumberRoot = styled('span')(({
|
|
14
12
|
theme,
|
|
15
13
|
ownerState
|
|
16
14
|
}) => _extends({
|
|
@@ -266,7 +266,10 @@ process.env.NODE_ENV !== "production" ? ClockPicker.propTypes
|
|
|
266
266
|
/**
|
|
267
267
|
* The props used for each slot inside.
|
|
268
268
|
*/
|
|
269
|
-
componentsProps: PropTypes.
|
|
269
|
+
componentsProps: PropTypes.shape({
|
|
270
|
+
leftArrowButton: PropTypes.object,
|
|
271
|
+
rightArrowButton: PropTypes.object
|
|
272
|
+
}),
|
|
270
273
|
|
|
271
274
|
/**
|
|
272
275
|
* Selected date @DateIOType.
|
|
@@ -5,9 +5,7 @@ import * as React from 'react';
|
|
|
5
5
|
import { styled } from '@mui/material/styles';
|
|
6
6
|
import { CLOCK_WIDTH, CLOCK_HOUR_WIDTH } from './shared';
|
|
7
7
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
|
-
const ClockPointerRoot = styled('div'
|
|
9
|
-
skipSx: true
|
|
10
|
-
})(({
|
|
8
|
+
const ClockPointerRoot = styled('div')(({
|
|
11
9
|
theme,
|
|
12
10
|
ownerState
|
|
13
11
|
}) => _extends({
|
|
@@ -20,9 +18,7 @@ const ClockPointerRoot = styled('div', {
|
|
|
20
18
|
}, ownerState.toAnimateTransform && {
|
|
21
19
|
transition: theme.transitions.create(['transform', 'height'])
|
|
22
20
|
}));
|
|
23
|
-
const ClockPointerThumb = styled('div'
|
|
24
|
-
skipSx: true
|
|
25
|
-
})(({
|
|
21
|
+
const ClockPointerThumb = styled('div')(({
|
|
26
22
|
theme,
|
|
27
23
|
ownerState
|
|
28
24
|
}) => _extends({
|