@mui/x-date-pickers 7.0.0-beta.7 → 7.1.0
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/AdapterDateFns/AdapterDateFns.js +1 -1
- package/AdapterDateFnsBase/AdapterDateFnsBase.js +1 -2
- package/AdapterDateFnsJalali/AdapterDateFnsJalali.js +2 -4
- package/AdapterDateFnsV3/AdapterDateFnsV3.js +1 -1
- package/AdapterDayjs/AdapterDayjs.js +2 -4
- package/AdapterLuxon/AdapterLuxon.js +12 -9
- package/AdapterMoment/AdapterMoment.js +5 -6
- package/CHANGELOG.md +266 -12
- package/DateCalendar/DateCalendar.js +14 -16
- package/DateCalendar/DayCalendar.js +5 -6
- package/DateField/DateField.js +3 -4
- package/DatePicker/DatePicker.js +1 -1
- package/DatePicker/DatePickerToolbar.js +11 -6
- package/DatePicker/shared.d.ts +2 -1
- package/DatePicker/shared.js +3 -5
- package/DateTimeField/DateTimeField.js +3 -4
- package/DateTimePicker/DateTimePicker.js +1 -1
- package/DateTimePicker/DateTimePickerToolbar.js +98 -46
- package/DateTimePicker/shared.d.ts +2 -1
- package/DateTimePicker/shared.js +11 -13
- package/DayCalendarSkeleton/DayCalendarSkeleton.js +12 -8
- package/DesktopDatePicker/DesktopDatePicker.js +7 -11
- package/DesktopDateTimePicker/DesktopDateTimePicker.js +72 -37
- package/DesktopDateTimePicker/DesktopDateTimePickerLayout.d.ts +12 -0
- package/DesktopDateTimePicker/DesktopDateTimePickerLayout.js +101 -0
- package/DesktopDateTimePicker/index.d.ts +1 -0
- package/DesktopDateTimePicker/index.js +2 -1
- package/DesktopTimePicker/DesktopTimePicker.js +8 -12
- package/DigitalClock/DigitalClock.js +16 -9
- package/LocalizationProvider/LocalizationProvider.js +1 -2
- package/MobileDatePicker/MobileDatePicker.js +6 -10
- package/MobileDateTimePicker/MobileDateTimePicker.js +8 -12
- package/MobileTimePicker/MobileTimePicker.js +6 -10
- package/MonthCalendar/MonthCalendar.js +4 -4
- package/MonthCalendar/PickersMonth.js +13 -8
- package/MultiSectionDigitalClock/MultiSectionDigitalClock.js +1 -1
- package/MultiSectionDigitalClock/MultiSectionDigitalClock.utils.js +1 -1
- package/MultiSectionDigitalClock/MultiSectionDigitalClockSection.js +16 -9
- package/PickersActionBar/PickersActionBar.js +1 -1
- package/PickersCalendarHeader/PickersCalendarHeader.js +17 -14
- package/PickersDay/PickersDay.js +30 -15
- package/PickersLayout/PickersLayout.js +31 -17
- package/PickersLayout/usePickerLayout.js +8 -9
- package/PickersSectionList/PickersSectionList.js +9 -11
- package/PickersTextField/PickersFilledInput/PickersFilledInput.js +138 -74
- package/PickersTextField/PickersInput/PickersInput.js +77 -55
- package/PickersTextField/PickersInputBase/PickersInputBase.js +67 -28
- package/PickersTextField/PickersInputBase/PickersInputBase.types.d.ts +7 -0
- package/PickersTextField/PickersOutlinedInput/Outline.js +58 -41
- package/PickersTextField/PickersOutlinedInput/PickersOutlinedInput.js +33 -14
- package/README.md +1 -1
- package/StaticDatePicker/StaticDatePicker.js +4 -5
- package/StaticDateTimePicker/StaticDateTimePicker.js +6 -7
- package/StaticTimePicker/StaticTimePicker.js +3 -4
- package/TimeClock/Clock.js +48 -35
- package/TimeClock/ClockNumber.js +12 -7
- package/TimeClock/ClockPointer.js +23 -13
- package/TimeClock/TimeClock.js +1 -1
- package/TimeField/TimeField.js +2 -3
- package/TimePicker/TimePickerToolbar.js +25 -16
- package/TimePicker/shared.d.ts +2 -1
- package/TimePicker/shared.js +5 -7
- package/YearCalendar/PickersYear.js +12 -6
- package/YearCalendar/YearCalendar.js +5 -6
- package/hooks/useClearableField.js +6 -7
- package/index.js +1 -1
- package/internals/components/PickersArrowSwitcher/PickersArrowSwitcher.js +19 -15
- package/internals/components/PickersModalDialog.js +6 -7
- package/internals/components/PickersPopper.js +25 -24
- package/internals/components/PickersToolbar.js +42 -24
- package/internals/hooks/date-helpers-hooks.js +1 -1
- package/internals/hooks/defaultizedFieldProps.js +15 -18
- package/internals/hooks/useClockReferenceDate.js +1 -1
- package/internals/hooks/useDesktopPicker/index.d.ts +1 -1
- package/internals/hooks/useDesktopPicker/useDesktopPicker.js +11 -12
- package/internals/hooks/useDesktopPicker/useDesktopPicker.types.d.ts +2 -2
- package/internals/hooks/useField/buildSectionsFromFormat.js +35 -31
- package/internals/hooks/useField/useField.js +6 -4
- package/internals/hooks/useField/useField.types.d.ts +1 -0
- package/internals/hooks/useField/useField.utils.js +4 -7
- package/internals/hooks/useField/useFieldCharacterEditing.js +1 -2
- package/internals/hooks/useField/useFieldState.js +1 -1
- package/internals/hooks/useField/useFieldV6TextField.js +17 -18
- package/internals/hooks/useField/useFieldV7TextField.js +9 -11
- package/internals/hooks/useMobilePicker/useMobilePicker.js +7 -8
- package/internals/hooks/useOpenState.js +1 -1
- package/internals/hooks/usePicker/index.d.ts +1 -0
- package/internals/hooks/usePicker/usePickerViews.d.ts +4 -2
- package/internals/hooks/usePicker/usePickerViews.js +1 -2
- package/internals/hooks/useStaticPicker/useStaticPicker.js +13 -17
- package/internals/hooks/useValueWithTimezone.js +5 -6
- package/internals/hooks/useViews.js +3 -4
- package/internals/index.d.ts +1 -1
- package/internals/models/validation.d.ts +1 -1
- package/internals/utils/convertFieldResponseIntoMuiTextFieldProps.js +3 -3
- package/internals/utils/date-time-utils.js +2 -5
- package/internals/utils/fields.js +1 -1
- package/internals/utils/getDefaultReferenceDate.js +2 -6
- package/internals/utils/views.js +1 -1
- package/locales/csCZ.js +1 -4
- package/locales/daDK.js +1 -4
- package/locales/deDE.js +1 -4
- package/locales/huHU.js +1 -4
- package/locales/itIT.js +16 -20
- package/locales/jaJP.js +1 -4
- package/locales/roRO.js +1 -4
- package/locales/skSK.js +1 -4
- package/locales/zhHK.js +14 -17
- package/modern/AdapterLuxon/AdapterLuxon.js +9 -4
- package/modern/DateCalendar/DateCalendar.js +1 -1
- package/modern/DateField/DateField.js +1 -1
- package/modern/DatePicker/DatePicker.js +1 -1
- package/modern/DatePicker/DatePickerToolbar.js +11 -6
- package/modern/DateTimeField/DateTimeField.js +1 -1
- package/modern/DateTimePicker/DateTimePicker.js +1 -1
- package/modern/DateTimePicker/DateTimePickerToolbar.js +97 -45
- package/modern/DayCalendarSkeleton/DayCalendarSkeleton.js +12 -8
- package/modern/DesktopDatePicker/DesktopDatePicker.js +1 -1
- package/modern/DesktopDateTimePicker/DesktopDateTimePicker.js +64 -25
- package/modern/DesktopDateTimePicker/DesktopDateTimePickerLayout.js +101 -0
- package/modern/DesktopDateTimePicker/index.js +2 -1
- package/modern/DigitalClock/DigitalClock.js +14 -6
- package/modern/MobileDatePicker/MobileDatePicker.js +1 -1
- package/modern/MobileDateTimePicker/MobileDateTimePicker.js +1 -1
- package/modern/MonthCalendar/PickersMonth.js +12 -6
- package/modern/MultiSectionDigitalClock/MultiSectionDigitalClockSection.js +13 -4
- package/modern/PickersCalendarHeader/PickersCalendarHeader.js +13 -9
- package/modern/PickersDay/PickersDay.js +30 -15
- package/modern/PickersLayout/PickersLayout.js +31 -17
- package/modern/PickersTextField/PickersFilledInput/PickersFilledInput.js +137 -72
- package/modern/PickersTextField/PickersInput/PickersInput.js +76 -54
- package/modern/PickersTextField/PickersInputBase/PickersInputBase.js +64 -24
- package/modern/PickersTextField/PickersOutlinedInput/Outline.js +58 -41
- package/modern/PickersTextField/PickersOutlinedInput/PickersOutlinedInput.js +31 -12
- package/modern/StaticDatePicker/StaticDatePicker.js +1 -1
- package/modern/StaticDateTimePicker/StaticDateTimePicker.js +1 -1
- package/modern/TimeClock/Clock.js +48 -35
- package/modern/TimeClock/ClockNumber.js +12 -7
- package/modern/TimeClock/ClockPointer.js +23 -13
- package/modern/TimePicker/TimePickerToolbar.js +25 -16
- package/modern/YearCalendar/PickersYear.js +12 -6
- package/modern/index.js +1 -1
- package/modern/internals/components/PickersArrowSwitcher/PickersArrowSwitcher.js +11 -6
- package/modern/internals/components/PickersPopper.js +13 -9
- package/modern/internals/components/PickersToolbar.js +39 -18
- package/modern/internals/hooks/useField/buildSectionsFromFormat.js +34 -30
- package/modern/internals/hooks/useField/useField.js +4 -2
- package/modern/internals/hooks/useField/useFieldV6TextField.js +8 -3
- package/modern/internals/hooks/useField/useFieldV7TextField.js +1 -1
- package/modern/internals/hooks/useOpenState.js +1 -1
- package/modern/internals/utils/fields.js +1 -1
- package/modern/locales/itIT.js +16 -20
- package/modern/locales/zhHK.js +14 -17
- package/node/AdapterLuxon/AdapterLuxon.js +9 -4
- package/node/DateCalendar/DateCalendar.js +1 -1
- package/node/DateField/DateField.js +1 -1
- package/node/DatePicker/DatePicker.js +1 -1
- package/node/DatePicker/DatePickerToolbar.js +11 -6
- package/node/DateTimeField/DateTimeField.js +1 -1
- package/node/DateTimePicker/DateTimePicker.js +1 -1
- package/node/DateTimePicker/DateTimePickerToolbar.js +97 -45
- package/node/DayCalendarSkeleton/DayCalendarSkeleton.js +12 -8
- package/node/DesktopDatePicker/DesktopDatePicker.js +1 -1
- package/node/DesktopDateTimePicker/DesktopDateTimePicker.js +63 -25
- package/node/DesktopDateTimePicker/DesktopDateTimePickerLayout.js +108 -0
- package/node/DesktopDateTimePicker/index.js +8 -1
- package/node/DigitalClock/DigitalClock.js +14 -6
- package/node/MobileDatePicker/MobileDatePicker.js +1 -1
- package/node/MobileDateTimePicker/MobileDateTimePicker.js +1 -1
- package/node/MonthCalendar/PickersMonth.js +12 -6
- package/node/MultiSectionDigitalClock/MultiSectionDigitalClockSection.js +13 -4
- package/node/PickersCalendarHeader/PickersCalendarHeader.js +13 -9
- package/node/PickersDay/PickersDay.js +30 -15
- package/node/PickersLayout/PickersLayout.js +31 -17
- package/node/PickersTextField/PickersFilledInput/PickersFilledInput.js +137 -72
- package/node/PickersTextField/PickersInput/PickersInput.js +76 -54
- package/node/PickersTextField/PickersInputBase/PickersInputBase.js +64 -24
- package/node/PickersTextField/PickersOutlinedInput/Outline.js +58 -41
- package/node/PickersTextField/PickersOutlinedInput/PickersOutlinedInput.js +31 -12
- package/node/StaticDatePicker/StaticDatePicker.js +1 -1
- package/node/StaticDateTimePicker/StaticDateTimePicker.js +1 -1
- package/node/TimeClock/Clock.js +48 -35
- package/node/TimeClock/ClockNumber.js +12 -7
- package/node/TimeClock/ClockPointer.js +23 -13
- package/node/TimePicker/TimePickerToolbar.js +25 -16
- package/node/YearCalendar/PickersYear.js +12 -6
- package/node/index.js +1 -1
- package/node/internals/components/PickersArrowSwitcher/PickersArrowSwitcher.js +11 -6
- package/node/internals/components/PickersPopper.js +13 -9
- package/node/internals/components/PickersToolbar.js +39 -18
- package/node/internals/hooks/useField/buildSectionsFromFormat.js +34 -30
- package/node/internals/hooks/useField/useField.js +4 -2
- package/node/internals/hooks/useField/useFieldV6TextField.js +8 -3
- package/node/internals/hooks/useField/useFieldV7TextField.js +1 -1
- package/node/internals/hooks/useOpenState.js +1 -1
- package/node/internals/utils/fields.js +1 -1
- package/node/locales/itIT.js +16 -20
- package/node/locales/zhHK.js +14 -17
- package/package.json +5 -5
- package/timeViewRenderers/timeViewRenderers.js +1 -1
- package/dateTimeViewRenderers/dateTimeViewRenderers.d.ts +0 -15
- package/dateTimeViewRenderers/dateTimeViewRenderers.js +0 -163
- package/dateTimeViewRenderers/index.d.ts +0 -2
- package/dateTimeViewRenderers/index.js +0 -1
- package/dateTimeViewRenderers/package.json +0 -6
- package/modern/dateTimeViewRenderers/dateTimeViewRenderers.js +0 -162
- package/modern/dateTimeViewRenderers/index.js +0 -1
- package/node/dateTimeViewRenderers/dateTimeViewRenderers.js +0 -171
- package/node/dateTimeViewRenderers/index.js +0 -12
|
@@ -40,20 +40,41 @@ const DateTimePickerToolbarRoot = styled(PickersToolbar, {
|
|
|
40
40
|
slot: 'Root',
|
|
41
41
|
overridesResolver: (props, styles) => styles.root
|
|
42
42
|
})(({
|
|
43
|
-
theme
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
paddingRight: ownerState.toolbarVariant === 'desktop' && !ownerState.isLandscape ? 0 : 16,
|
|
48
|
-
borderBottom: ownerState.toolbarVariant === 'desktop' ? `1px solid ${(theme.vars || theme).palette.divider}` : undefined,
|
|
49
|
-
borderRight: ownerState.toolbarVariant === 'desktop' && ownerState.isLandscape ? `1px solid ${(theme.vars || theme).palette.divider}` : undefined,
|
|
43
|
+
theme
|
|
44
|
+
}) => ({
|
|
45
|
+
paddingLeft: 16,
|
|
46
|
+
paddingRight: 16,
|
|
50
47
|
justifyContent: 'space-around',
|
|
51
|
-
position: 'relative'
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
48
|
+
position: 'relative',
|
|
49
|
+
variants: [{
|
|
50
|
+
props: {
|
|
51
|
+
toolbarVariant: 'desktop'
|
|
52
|
+
},
|
|
53
|
+
style: {
|
|
54
|
+
borderBottom: `1px solid ${(theme.vars || theme).palette.divider}`,
|
|
55
|
+
[`& .${pickersToolbarClasses.content} .${pickersToolbarTextClasses.selected}`]: {
|
|
56
|
+
color: (theme.vars || theme).palette.primary.main,
|
|
57
|
+
fontWeight: theme.typography.fontWeightBold
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}, {
|
|
61
|
+
props: {
|
|
62
|
+
toolbarVariant: 'desktop',
|
|
63
|
+
isLandscape: true
|
|
64
|
+
},
|
|
65
|
+
style: {
|
|
66
|
+
borderRight: `1px solid ${(theme.vars || theme).palette.divider}`
|
|
67
|
+
}
|
|
68
|
+
}, {
|
|
69
|
+
props: {
|
|
70
|
+
toolbarVariant: 'desktop',
|
|
71
|
+
isLandscape: false
|
|
72
|
+
},
|
|
73
|
+
style: {
|
|
74
|
+
paddingLeft: 24,
|
|
75
|
+
paddingRight: 0
|
|
76
|
+
}
|
|
77
|
+
}]
|
|
57
78
|
}));
|
|
58
79
|
DateTimePickerToolbarRoot.propTypes = {
|
|
59
80
|
// ----------------------------- Warning --------------------------------
|
|
@@ -86,19 +107,35 @@ const DateTimePickerToolbarTimeContainer = styled('div', {
|
|
|
86
107
|
slot: 'TimeContainer',
|
|
87
108
|
overridesResolver: (props, styles) => styles.timeContainer
|
|
88
109
|
})(({
|
|
89
|
-
theme
|
|
90
|
-
ownerState
|
|
110
|
+
theme
|
|
91
111
|
}) => {
|
|
92
|
-
const direction = ownerState.isLandscape && ownerState.toolbarVariant !== 'desktop' ? 'column' : 'row';
|
|
93
112
|
return _extends({
|
|
94
113
|
display: 'flex',
|
|
95
|
-
flexDirection:
|
|
96
|
-
},
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
114
|
+
flexDirection: 'row'
|
|
115
|
+
}, theme.direction === 'rtl' && {
|
|
116
|
+
flexDirection: 'row-reverse'
|
|
117
|
+
}, {
|
|
118
|
+
variants: [{
|
|
119
|
+
props: ({
|
|
120
|
+
isLandscape,
|
|
121
|
+
toolbarVariant
|
|
122
|
+
}) => isLandscape && toolbarVariant !== 'desktop',
|
|
123
|
+
style: _extends({
|
|
124
|
+
flexDirection: 'column'
|
|
125
|
+
}, theme.direction === 'rtl' && {
|
|
126
|
+
flexDirection: 'column-reverse'
|
|
127
|
+
})
|
|
128
|
+
}, {
|
|
129
|
+
props: {
|
|
130
|
+
toolbarVariant: 'desktop',
|
|
131
|
+
isLandscape: false
|
|
132
|
+
},
|
|
133
|
+
style: {
|
|
134
|
+
gap: 9,
|
|
135
|
+
marginRight: 4,
|
|
136
|
+
alignSelf: 'flex-end'
|
|
137
|
+
}
|
|
138
|
+
}]
|
|
102
139
|
});
|
|
103
140
|
});
|
|
104
141
|
const DateTimePickerToolbarTimeDigitsContainer = styled('div', {
|
|
@@ -106,14 +143,20 @@ const DateTimePickerToolbarTimeDigitsContainer = styled('div', {
|
|
|
106
143
|
slot: 'TimeDigitsContainer',
|
|
107
144
|
overridesResolver: (props, styles) => styles.timeDigitsContainer
|
|
108
145
|
})(({
|
|
109
|
-
theme
|
|
110
|
-
ownerState
|
|
146
|
+
theme
|
|
111
147
|
}) => _extends({
|
|
112
148
|
display: 'flex'
|
|
113
|
-
}, ownerState.toolbarVariant === 'desktop' && {
|
|
114
|
-
gap: 1.5
|
|
115
149
|
}, theme.direction === 'rtl' && {
|
|
116
150
|
flexDirection: 'row-reverse'
|
|
151
|
+
}, {
|
|
152
|
+
variants: [{
|
|
153
|
+
props: {
|
|
154
|
+
toolbarVariant: 'desktop'
|
|
155
|
+
},
|
|
156
|
+
style: {
|
|
157
|
+
gap: 1.5
|
|
158
|
+
}
|
|
159
|
+
}]
|
|
117
160
|
}));
|
|
118
161
|
DateTimePickerToolbarTimeContainer.propTypes = {
|
|
119
162
|
// ----------------------------- Warning --------------------------------
|
|
@@ -128,12 +171,18 @@ const DateTimePickerToolbarSeparator = styled(PickersToolbarText, {
|
|
|
128
171
|
name: 'MuiDateTimePickerToolbar',
|
|
129
172
|
slot: 'Separator',
|
|
130
173
|
overridesResolver: (props, styles) => styles.separator
|
|
131
|
-
})(
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
174
|
+
})({
|
|
175
|
+
margin: '0 4px 0 2px',
|
|
176
|
+
cursor: 'default',
|
|
177
|
+
variants: [{
|
|
178
|
+
props: {
|
|
179
|
+
toolbarVariant: 'desktop'
|
|
180
|
+
},
|
|
181
|
+
style: {
|
|
182
|
+
margin: 0
|
|
183
|
+
}
|
|
184
|
+
}]
|
|
185
|
+
});
|
|
137
186
|
|
|
138
187
|
// Taken from TimePickerToolbar
|
|
139
188
|
const DateTimePickerToolbarAmPmSelection = styled('div', {
|
|
@@ -144,23 +193,26 @@ const DateTimePickerToolbarAmPmSelection = styled('div', {
|
|
|
144
193
|
}, {
|
|
145
194
|
[`&.${dateTimePickerToolbarClasses.ampmLandscape}`]: styles.ampmLandscape
|
|
146
195
|
}, styles.ampmSelection]
|
|
147
|
-
})(
|
|
148
|
-
ownerState
|
|
149
|
-
}) => _extends({
|
|
196
|
+
})({
|
|
150
197
|
display: 'flex',
|
|
151
198
|
flexDirection: 'column',
|
|
152
199
|
marginRight: 'auto',
|
|
153
|
-
marginLeft: 12
|
|
154
|
-
}, ownerState.isLandscape && {
|
|
155
|
-
margin: '4px 0 auto',
|
|
156
|
-
flexDirection: 'row',
|
|
157
|
-
justifyContent: 'space-around',
|
|
158
|
-
width: '100%'
|
|
159
|
-
}, {
|
|
200
|
+
marginLeft: 12,
|
|
160
201
|
[`& .${dateTimePickerToolbarClasses.ampmLabel}`]: {
|
|
161
202
|
fontSize: 17
|
|
162
|
-
}
|
|
163
|
-
|
|
203
|
+
},
|
|
204
|
+
variants: [{
|
|
205
|
+
props: {
|
|
206
|
+
isLandscape: true
|
|
207
|
+
},
|
|
208
|
+
style: {
|
|
209
|
+
margin: '4px 0 auto',
|
|
210
|
+
flexDirection: 'row',
|
|
211
|
+
justifyContent: 'space-around',
|
|
212
|
+
width: '100%'
|
|
213
|
+
}
|
|
214
|
+
}]
|
|
215
|
+
});
|
|
164
216
|
|
|
165
217
|
/**
|
|
166
218
|
* Demos:
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
2
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
+
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
3
|
const _excluded = ["className"];
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
@@ -41,13 +41,17 @@ const DayCalendarSkeletonDay = styled(Skeleton, {
|
|
|
41
41
|
name: 'MuiDayCalendarSkeleton',
|
|
42
42
|
slot: 'DaySkeleton',
|
|
43
43
|
overridesResolver: (props, styles) => styles.daySkeleton
|
|
44
|
-
})(
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
44
|
+
})({
|
|
45
|
+
margin: `0 ${DAY_MARGIN}px`,
|
|
46
|
+
variants: [{
|
|
47
|
+
props: {
|
|
48
|
+
day: 0
|
|
49
|
+
},
|
|
50
|
+
style: {
|
|
51
|
+
visibility: 'hidden'
|
|
52
|
+
}
|
|
53
|
+
}]
|
|
54
|
+
});
|
|
51
55
|
DayCalendarSkeletonDay.propTypes = {
|
|
52
56
|
// ----------------------------- Warning --------------------------------
|
|
53
57
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
@@ -281,7 +281,7 @@ DesktopDatePicker.propTypes = {
|
|
|
281
281
|
/**
|
|
282
282
|
* Disable specific date.
|
|
283
283
|
*
|
|
284
|
-
* Warning: This function can be called multiple times (
|
|
284
|
+
* Warning: This function can be called multiple times (for example when rendering date calendar, checking if focus can be moved to a certain date, etc.). Expensive computations can impact performance.
|
|
285
285
|
*
|
|
286
286
|
* @template TDate
|
|
287
287
|
* @param {TDate} day The date to test.
|
|
@@ -1,19 +1,64 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
+
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
|
+
const _excluded = ["openTo", "focusedView", "timeViewsCount"];
|
|
2
4
|
import * as React from 'react';
|
|
3
5
|
import PropTypes from 'prop-types';
|
|
4
6
|
import { resolveComponentProps } from '@mui/base/utils';
|
|
5
7
|
import { refType } from '@mui/utils';
|
|
8
|
+
import Divider from '@mui/material/Divider';
|
|
6
9
|
import { singleItemValueManager } from '../internals/utils/valueManagers';
|
|
7
10
|
import { DateTimeField } from '../DateTimeField';
|
|
8
11
|
import { useDateTimePickerDefaultizedProps } from '../DateTimePicker/shared';
|
|
9
12
|
import { renderDateViewCalendar } from '../dateViewRenderers/dateViewRenderers';
|
|
10
|
-
import { renderDesktopDateTimeView } from '../dateTimeViewRenderers';
|
|
11
13
|
import { useLocaleText, useUtils } from '../internals/hooks/useUtils';
|
|
12
14
|
import { validateDateTime } from '../internals/utils/validation/validateDateTime';
|
|
13
15
|
import { CalendarIcon } from '../icons';
|
|
14
16
|
import { useDesktopPicker } from '../internals/hooks/useDesktopPicker';
|
|
15
17
|
import { extractValidationProps } from '../internals/utils/validation/extractValidationProps';
|
|
16
18
|
import { resolveDateTimeFormat, resolveTimeViewsResponse } from '../internals/utils/date-time-utils';
|
|
19
|
+
import { renderDigitalClockTimeView, renderMultiSectionDigitalClockTimeView } from '../timeViewRenderers';
|
|
20
|
+
import { VIEW_HEIGHT, isDatePickerView, isInternalTimeView } from '../internals';
|
|
21
|
+
import { multiSectionDigitalClockClasses, multiSectionDigitalClockSectionClasses } from '../MultiSectionDigitalClock';
|
|
22
|
+
import { digitalClockClasses } from '../DigitalClock';
|
|
23
|
+
import { DesktopDateTimePickerLayout } from './DesktopDateTimePickerLayout';
|
|
24
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
25
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
26
|
+
const rendererInterceptor = function rendererInterceptor(inViewRenderers, popperView, rendererProps) {
|
|
27
|
+
const {
|
|
28
|
+
openTo,
|
|
29
|
+
focusedView,
|
|
30
|
+
timeViewsCount
|
|
31
|
+
} = rendererProps,
|
|
32
|
+
otherProps = _objectWithoutPropertiesLoose(rendererProps, _excluded);
|
|
33
|
+
const finalProps = _extends({}, otherProps, {
|
|
34
|
+
focusedView: null,
|
|
35
|
+
sx: [{
|
|
36
|
+
[`&.${multiSectionDigitalClockClasses.root}`]: {
|
|
37
|
+
borderBottom: 0
|
|
38
|
+
},
|
|
39
|
+
[`&.${multiSectionDigitalClockClasses.root}, .${multiSectionDigitalClockSectionClasses.root}, &.${digitalClockClasses.root}`]: {
|
|
40
|
+
maxHeight: VIEW_HEIGHT
|
|
41
|
+
}
|
|
42
|
+
}]
|
|
43
|
+
});
|
|
44
|
+
const isTimeViewActive = isInternalTimeView(popperView);
|
|
45
|
+
return /*#__PURE__*/_jsxs(React.Fragment, {
|
|
46
|
+
children: [inViewRenderers[!isTimeViewActive ? popperView : 'day']?.(_extends({}, rendererProps, {
|
|
47
|
+
view: !isTimeViewActive ? popperView : 'day',
|
|
48
|
+
focusedView: focusedView && isDatePickerView(focusedView) ? focusedView : null,
|
|
49
|
+
views: rendererProps.views.filter(isDatePickerView)
|
|
50
|
+
})), timeViewsCount > 0 && /*#__PURE__*/_jsxs(React.Fragment, {
|
|
51
|
+
children: [/*#__PURE__*/_jsx(Divider, {
|
|
52
|
+
orientation: "vertical"
|
|
53
|
+
}), inViewRenderers[isTimeViewActive ? popperView : 'hours']?.(_extends({}, finalProps, {
|
|
54
|
+
view: isTimeViewActive ? popperView : 'hours',
|
|
55
|
+
focusedView: focusedView && isInternalTimeView(focusedView) ? focusedView : null,
|
|
56
|
+
openTo: isInternalTimeView(openTo) ? openTo : 'hours',
|
|
57
|
+
views: rendererProps.views.filter(isInternalTimeView)
|
|
58
|
+
}))]
|
|
59
|
+
})]
|
|
60
|
+
});
|
|
61
|
+
};
|
|
17
62
|
/**
|
|
18
63
|
* Demos:
|
|
19
64
|
*
|
|
@@ -33,32 +78,24 @@ const DesktopDateTimePicker = /*#__PURE__*/React.forwardRef(function DesktopDate
|
|
|
33
78
|
const {
|
|
34
79
|
shouldRenderTimeInASingleColumn,
|
|
35
80
|
thresholdToRenderTimeInASingleColumn,
|
|
36
|
-
views,
|
|
81
|
+
views: resolvedViews,
|
|
37
82
|
timeSteps
|
|
38
83
|
} = resolveTimeViewsResponse(defaultizedProps);
|
|
39
|
-
const
|
|
40
|
-
const viewRenderers =
|
|
41
|
-
// we can only ensure the expected two-column layout if none of the renderers are overridden
|
|
42
|
-
shouldUseNewRenderer ? {
|
|
43
|
-
day: renderDesktopDateTimeView,
|
|
44
|
-
month: renderDesktopDateTimeView,
|
|
45
|
-
year: renderDesktopDateTimeView,
|
|
46
|
-
hours: renderDesktopDateTimeView,
|
|
47
|
-
minutes: renderDesktopDateTimeView,
|
|
48
|
-
seconds: renderDesktopDateTimeView,
|
|
49
|
-
meridiem: renderDesktopDateTimeView
|
|
50
|
-
} : _extends({
|
|
84
|
+
const renderTimeView = shouldRenderTimeInASingleColumn ? renderDigitalClockTimeView : renderMultiSectionDigitalClockTimeView;
|
|
85
|
+
const viewRenderers = _extends({
|
|
51
86
|
day: renderDateViewCalendar,
|
|
52
87
|
month: renderDateViewCalendar,
|
|
53
88
|
year: renderDateViewCalendar,
|
|
54
|
-
hours:
|
|
55
|
-
minutes:
|
|
56
|
-
seconds:
|
|
57
|
-
meridiem:
|
|
89
|
+
hours: renderTimeView,
|
|
90
|
+
minutes: renderTimeView,
|
|
91
|
+
seconds: renderTimeView,
|
|
92
|
+
meridiem: renderTimeView
|
|
58
93
|
}, defaultizedProps.viewRenderers);
|
|
59
94
|
const ampmInClock = defaultizedProps.ampmInClock ?? true;
|
|
60
|
-
//
|
|
61
|
-
const
|
|
95
|
+
// Need to avoid adding the `meridiem` view when unexpected renderer is specified
|
|
96
|
+
const shouldHoursRendererContainMeridiemView = viewRenderers.hours?.name === renderMultiSectionDigitalClockTimeView.name;
|
|
97
|
+
const views = !shouldHoursRendererContainMeridiemView ? resolvedViews.filter(view => view !== 'meridiem') : resolvedViews;
|
|
98
|
+
const actionBarActions = shouldRenderTimeInASingleColumn ? [] : ['accept'];
|
|
62
99
|
|
|
63
100
|
// Props with the default values specific to the desktop variant
|
|
64
101
|
const props = _extends({}, defaultizedProps, {
|
|
@@ -72,6 +109,7 @@ const DesktopDateTimePicker = /*#__PURE__*/React.forwardRef(function DesktopDate
|
|
|
72
109
|
shouldRenderTimeInASingleColumn,
|
|
73
110
|
slots: _extends({
|
|
74
111
|
field: DateTimeField,
|
|
112
|
+
layout: DesktopDateTimePickerLayout,
|
|
75
113
|
openPickerIcon: CalendarIcon
|
|
76
114
|
}, defaultizedProps.slots),
|
|
77
115
|
slotProps: _extends({}, defaultizedProps.slotProps, {
|
|
@@ -81,14 +119,14 @@ const DesktopDateTimePicker = /*#__PURE__*/React.forwardRef(function DesktopDate
|
|
|
81
119
|
toolbar: _extends({
|
|
82
120
|
hidden: true,
|
|
83
121
|
ampmInClock,
|
|
84
|
-
toolbarVariant:
|
|
122
|
+
toolbarVariant: 'desktop'
|
|
85
123
|
}, defaultizedProps.slotProps?.toolbar),
|
|
86
124
|
tabs: _extends({
|
|
87
125
|
hidden: true
|
|
88
126
|
}, defaultizedProps.slotProps?.tabs),
|
|
89
|
-
actionBar: _extends({
|
|
127
|
+
actionBar: ownerState => _extends({
|
|
90
128
|
actions: actionBarActions
|
|
91
|
-
}, defaultizedProps.slotProps?.actionBar)
|
|
129
|
+
}, resolveComponentProps(defaultizedProps.slotProps?.actionBar, ownerState))
|
|
92
130
|
})
|
|
93
131
|
});
|
|
94
132
|
const {
|
|
@@ -98,7 +136,8 @@ const DesktopDateTimePicker = /*#__PURE__*/React.forwardRef(function DesktopDate
|
|
|
98
136
|
valueManager: singleItemValueManager,
|
|
99
137
|
valueType: 'date-time',
|
|
100
138
|
getOpenDialogAriaText: props.localeText?.openDatePickerDialogue ?? localeText.openDatePickerDialogue,
|
|
101
|
-
validator: validateDateTime
|
|
139
|
+
validator: validateDateTime,
|
|
140
|
+
rendererInterceptor
|
|
102
141
|
});
|
|
103
142
|
return renderPicker();
|
|
104
143
|
});
|
|
@@ -357,7 +396,7 @@ DesktopDateTimePicker.propTypes = {
|
|
|
357
396
|
/**
|
|
358
397
|
* Disable specific date.
|
|
359
398
|
*
|
|
360
|
-
* Warning: This function can be called multiple times (
|
|
399
|
+
* Warning: This function can be called multiple times (for example when rendering date calendar, checking if focus can be moved to a certain date, etc.). Expensive computations can impact performance.
|
|
361
400
|
*
|
|
362
401
|
* @template TDate
|
|
363
402
|
* @param {TDate} day The date to test.
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import clsx from 'clsx';
|
|
4
|
+
import Divider from '@mui/material/Divider';
|
|
5
|
+
import { PickersLayoutContentWrapper, PickersLayoutRoot, pickersLayoutClasses, usePickerLayout } from '../PickersLayout';
|
|
6
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
8
|
+
/**
|
|
9
|
+
* @ignore - internal component.
|
|
10
|
+
*/
|
|
11
|
+
function DesktopDateTimePickerLayout(props) {
|
|
12
|
+
const {
|
|
13
|
+
toolbar,
|
|
14
|
+
tabs,
|
|
15
|
+
content,
|
|
16
|
+
actionBar,
|
|
17
|
+
shortcuts
|
|
18
|
+
} = usePickerLayout(props);
|
|
19
|
+
const {
|
|
20
|
+
sx,
|
|
21
|
+
className,
|
|
22
|
+
isLandscape,
|
|
23
|
+
ref
|
|
24
|
+
} = props;
|
|
25
|
+
const isActionBarVisible = actionBar && (actionBar.props.actions?.length ?? 0) > 0;
|
|
26
|
+
return /*#__PURE__*/_jsxs(PickersLayoutRoot, {
|
|
27
|
+
ref: ref,
|
|
28
|
+
className: clsx(className, pickersLayoutClasses.root),
|
|
29
|
+
sx: [{
|
|
30
|
+
[`& .${pickersLayoutClasses.tabs}`]: {
|
|
31
|
+
gridRow: 4,
|
|
32
|
+
gridColumn: '1 / 4'
|
|
33
|
+
},
|
|
34
|
+
[`& .${pickersLayoutClasses.actionBar}`]: {
|
|
35
|
+
gridRow: 5
|
|
36
|
+
}
|
|
37
|
+
}, ...(Array.isArray(sx) ? sx : [sx])],
|
|
38
|
+
ownerState: props,
|
|
39
|
+
children: [isLandscape ? shortcuts : toolbar, isLandscape ? toolbar : shortcuts, /*#__PURE__*/_jsxs(PickersLayoutContentWrapper, {
|
|
40
|
+
className: pickersLayoutClasses.contentWrapper,
|
|
41
|
+
sx: {
|
|
42
|
+
display: 'grid'
|
|
43
|
+
},
|
|
44
|
+
children: [content, tabs, isActionBarVisible && /*#__PURE__*/_jsx(Divider, {
|
|
45
|
+
sx: {
|
|
46
|
+
gridRow: 3,
|
|
47
|
+
gridColumn: '1 / 4'
|
|
48
|
+
}
|
|
49
|
+
})]
|
|
50
|
+
}), actionBar]
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
process.env.NODE_ENV !== "production" ? DesktopDateTimePickerLayout.propTypes = {
|
|
54
|
+
// ----------------------------- Warning --------------------------------
|
|
55
|
+
// | These PropTypes are generated from the TypeScript type definitions |
|
|
56
|
+
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
|
57
|
+
// ----------------------------------------------------------------------
|
|
58
|
+
children: PropTypes.node,
|
|
59
|
+
/**
|
|
60
|
+
* Override or extend the styles applied to the component.
|
|
61
|
+
*/
|
|
62
|
+
classes: PropTypes.object,
|
|
63
|
+
className: PropTypes.string,
|
|
64
|
+
disabled: PropTypes.bool,
|
|
65
|
+
isLandscape: PropTypes.bool.isRequired,
|
|
66
|
+
isValid: PropTypes.func.isRequired,
|
|
67
|
+
onAccept: PropTypes.func.isRequired,
|
|
68
|
+
onCancel: PropTypes.func.isRequired,
|
|
69
|
+
onChange: PropTypes.func.isRequired,
|
|
70
|
+
onClear: PropTypes.func.isRequired,
|
|
71
|
+
onClose: PropTypes.func.isRequired,
|
|
72
|
+
onDismiss: PropTypes.func.isRequired,
|
|
73
|
+
onOpen: PropTypes.func.isRequired,
|
|
74
|
+
onSelectShortcut: PropTypes.func.isRequired,
|
|
75
|
+
onSetToday: PropTypes.func.isRequired,
|
|
76
|
+
onViewChange: PropTypes.func.isRequired,
|
|
77
|
+
/**
|
|
78
|
+
* Force rendering in particular orientation.
|
|
79
|
+
*/
|
|
80
|
+
orientation: PropTypes.oneOf(['landscape', 'portrait']),
|
|
81
|
+
readOnly: PropTypes.bool,
|
|
82
|
+
/**
|
|
83
|
+
* The props used for each component slot.
|
|
84
|
+
* @default {}
|
|
85
|
+
*/
|
|
86
|
+
slotProps: PropTypes.object,
|
|
87
|
+
/**
|
|
88
|
+
* Overridable component slots.
|
|
89
|
+
* @default {}
|
|
90
|
+
*/
|
|
91
|
+
slots: PropTypes.object,
|
|
92
|
+
/**
|
|
93
|
+
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
94
|
+
*/
|
|
95
|
+
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
96
|
+
value: PropTypes.any,
|
|
97
|
+
view: PropTypes.oneOf(['day', 'hours', 'meridiem', 'minutes', 'month', 'seconds', 'year']),
|
|
98
|
+
views: PropTypes.arrayOf(PropTypes.oneOf(['day', 'hours', 'meridiem', 'minutes', 'month', 'seconds', 'year']).isRequired).isRequired,
|
|
99
|
+
wrapperVariant: PropTypes.oneOf(['desktop', 'mobile'])
|
|
100
|
+
} : void 0;
|
|
101
|
+
export { DesktopDateTimePickerLayout };
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export { DesktopDateTimePicker } from './DesktopDateTimePicker';
|
|
1
|
+
export { DesktopDateTimePicker } from './DesktopDateTimePicker';
|
|
2
|
+
export { DesktopDateTimePickerLayout } from './DesktopDateTimePickerLayout';
|
|
@@ -36,16 +36,24 @@ const DigitalClockRoot = styled(PickerViewRoot, {
|
|
|
36
36
|
name: 'MuiDigitalClock',
|
|
37
37
|
slot: 'Root',
|
|
38
38
|
overridesResolver: (props, styles) => styles.root
|
|
39
|
-
})(
|
|
40
|
-
ownerState
|
|
41
|
-
}) => ({
|
|
39
|
+
})({
|
|
42
40
|
overflowY: 'auto',
|
|
43
41
|
width: '100%',
|
|
44
42
|
'@media (prefers-reduced-motion: no-preference)': {
|
|
45
|
-
scrollBehavior:
|
|
43
|
+
scrollBehavior: 'auto'
|
|
46
44
|
},
|
|
47
|
-
maxHeight: DIGITAL_CLOCK_VIEW_HEIGHT
|
|
48
|
-
|
|
45
|
+
maxHeight: DIGITAL_CLOCK_VIEW_HEIGHT,
|
|
46
|
+
variants: [{
|
|
47
|
+
props: {
|
|
48
|
+
alreadyRendered: true
|
|
49
|
+
},
|
|
50
|
+
style: {
|
|
51
|
+
'@media (prefers-reduced-motion: no-preference)': {
|
|
52
|
+
scrollBehavior: 'smooth'
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}]
|
|
56
|
+
});
|
|
49
57
|
const DigitalClockList = styled(MenuList, {
|
|
50
58
|
name: 'MuiDigitalClock',
|
|
51
59
|
slot: 'List',
|
|
@@ -278,7 +278,7 @@ MobileDatePicker.propTypes = {
|
|
|
278
278
|
/**
|
|
279
279
|
* Disable specific date.
|
|
280
280
|
*
|
|
281
|
-
* Warning: This function can be called multiple times (
|
|
281
|
+
* Warning: This function can be called multiple times (for example when rendering date calendar, checking if focus can be moved to a certain date, etc.). Expensive computations can impact performance.
|
|
282
282
|
*
|
|
283
283
|
* @template TDate
|
|
284
284
|
* @param {TDate} day The date to test.
|
|
@@ -326,7 +326,7 @@ MobileDateTimePicker.propTypes = {
|
|
|
326
326
|
/**
|
|
327
327
|
* Disable specific date.
|
|
328
328
|
*
|
|
329
|
-
* Warning: This function can be called multiple times (
|
|
329
|
+
* Warning: This function can be called multiple times (for example when rendering date calendar, checking if focus can be moved to a certain date, etc.). Expensive computations can impact performance.
|
|
330
330
|
*
|
|
331
331
|
* @template TDate
|
|
332
332
|
* @param {TDate} day The date to test.
|
|
@@ -22,14 +22,20 @@ const PickersMonthRoot = styled('div', {
|
|
|
22
22
|
name: 'MuiPickersMonth',
|
|
23
23
|
slot: 'Root',
|
|
24
24
|
overridesResolver: (_, styles) => [styles.root]
|
|
25
|
-
})(
|
|
26
|
-
ownerState
|
|
27
|
-
}) => ({
|
|
28
|
-
flexBasis: ownerState.monthsPerRow === 3 ? '33.3%' : '25%',
|
|
25
|
+
})({
|
|
29
26
|
display: 'flex',
|
|
30
27
|
alignItems: 'center',
|
|
31
|
-
justifyContent: 'center'
|
|
32
|
-
|
|
28
|
+
justifyContent: 'center',
|
|
29
|
+
flexBasis: '33.3%',
|
|
30
|
+
variants: [{
|
|
31
|
+
props: {
|
|
32
|
+
monthsPerRow: 4
|
|
33
|
+
},
|
|
34
|
+
style: {
|
|
35
|
+
flexBasis: '25%'
|
|
36
|
+
}
|
|
37
|
+
}]
|
|
38
|
+
});
|
|
33
39
|
const PickersMonthButton = styled('button', {
|
|
34
40
|
name: 'MuiPickersMonth',
|
|
35
41
|
slot: 'MonthButton',
|
|
@@ -26,15 +26,14 @@ const MultiSectionDigitalClockSectionRoot = styled(MenuList, {
|
|
|
26
26
|
slot: 'Root',
|
|
27
27
|
overridesResolver: (_, styles) => styles.root
|
|
28
28
|
})(({
|
|
29
|
-
theme
|
|
30
|
-
ownerState
|
|
29
|
+
theme
|
|
31
30
|
}) => ({
|
|
32
31
|
maxHeight: DIGITAL_CLOCK_VIEW_HEIGHT,
|
|
33
32
|
width: 56,
|
|
34
33
|
padding: 0,
|
|
35
34
|
overflow: 'hidden',
|
|
36
35
|
'@media (prefers-reduced-motion: no-preference)': {
|
|
37
|
-
scrollBehavior:
|
|
36
|
+
scrollBehavior: 'auto'
|
|
38
37
|
},
|
|
39
38
|
'@media (pointer: fine)': {
|
|
40
39
|
'&:hover': {
|
|
@@ -52,7 +51,17 @@ const MultiSectionDigitalClockSectionRoot = styled(MenuList, {
|
|
|
52
51
|
content: '""',
|
|
53
52
|
// subtracting the height of one item, extra margin and borders to make sure the max height is correct
|
|
54
53
|
height: 'calc(100% - 40px - 6px)'
|
|
55
|
-
}
|
|
54
|
+
},
|
|
55
|
+
variants: [{
|
|
56
|
+
props: {
|
|
57
|
+
alreadyRendered: true
|
|
58
|
+
},
|
|
59
|
+
style: {
|
|
60
|
+
'@media (prefers-reduced-motion: no-preference)': {
|
|
61
|
+
scrollBehavior: 'smooth'
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}]
|
|
56
65
|
}));
|
|
57
66
|
const MultiSectionDigitalClockSectionItem = styled(MenuItem, {
|
|
58
67
|
name: 'MuiMultiSectionDigitalClockSection',
|
|
@@ -72,15 +72,19 @@ const PickersCalendarHeaderSwitchViewButton = styled(IconButton, {
|
|
|
72
72
|
name: 'MuiPickersCalendarHeader',
|
|
73
73
|
slot: 'SwitchViewButton',
|
|
74
74
|
overridesResolver: (_, styles) => styles.switchViewButton
|
|
75
|
-
})(
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
75
|
+
})({
|
|
76
|
+
marginRight: 'auto',
|
|
77
|
+
variants: [{
|
|
78
|
+
props: {
|
|
79
|
+
view: 'year'
|
|
80
|
+
},
|
|
81
|
+
style: {
|
|
82
|
+
[`.${pickersCalendarHeaderClasses.switchViewIcon}`]: {
|
|
83
|
+
transform: 'rotate(180deg)'
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}]
|
|
87
|
+
});
|
|
84
88
|
const PickersCalendarHeaderSwitchViewIcon = styled(ArrowDropDownIcon, {
|
|
85
89
|
name: 'MuiPickersCalendarHeader',
|
|
86
90
|
slot: 'SwitchViewIcon',
|