@mui/x-date-pickers 7.11.1 → 7.12.1
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 +5 -2
- package/AdapterDateFnsBase/AdapterDateFnsBase.d.ts +4 -4
- package/AdapterDateFnsBase/AdapterDateFnsBase.js +5 -9
- package/AdapterDateFnsJalali/AdapterDateFnsJalali.d.ts +0 -1
- package/AdapterDateFnsJalali/AdapterDateFnsJalali.js +5 -5
- package/AdapterDateFnsJalaliV3/AdapterDateFnsJalaliV3.d.ts +0 -1
- package/AdapterDateFnsJalaliV3/AdapterDateFnsJalaliV3.js +8 -8
- package/AdapterDateFnsV3/AdapterDateFnsV3.js +8 -5
- package/AdapterDayjs/AdapterDayjs.js +2 -1
- package/AdapterLuxon/AdapterLuxon.js +1 -0
- package/AdapterMomentJalaali/AdapterMomentJalaali.d.ts +1 -0
- package/AdapterMomentJalaali/AdapterMomentJalaali.js +3 -0
- package/CHANGELOG.md +178 -4
- package/DateCalendar/DateCalendar.js +3 -1
- package/DateCalendar/DateCalendar.types.d.ts +1 -1
- package/DateCalendar/DayCalendar.js +1 -1
- package/DateField/DateField.js +3 -1
- package/DateField/DateField.types.d.ts +1 -1
- package/DatePicker/DatePicker.js +2 -0
- package/DatePicker/DatePickerToolbar.js +1 -1
- package/DateTimeField/DateTimeField.js +3 -1
- package/DateTimeField/DateTimeField.types.d.ts +1 -1
- package/DateTimePicker/DateTimePicker.js +2 -0
- package/DayCalendarSkeleton/DayCalendarSkeleton.js +1 -1
- package/DesktopDatePicker/DesktopDatePicker.js +3 -1
- package/DesktopDateTimePicker/DesktopDateTimePicker.js +3 -1
- package/DesktopTimePicker/DesktopTimePicker.js +1 -1
- package/DigitalClock/DigitalClock.js +1 -1
- package/DigitalClock/DigitalClock.types.d.ts +1 -1
- package/MobileDatePicker/MobileDatePicker.js +3 -1
- package/MobileDateTimePicker/MobileDateTimePicker.js +3 -1
- package/MobileTimePicker/MobileTimePicker.js +1 -1
- package/MonthCalendar/MonthCalendar.js +2 -0
- package/MonthCalendar/PickersMonth.js +1 -1
- package/MultiSectionDigitalClock/MultiSectionDigitalClock.types.d.ts +1 -1
- package/PickersCalendarHeader/PickersCalendarHeader.js +2 -2
- package/PickersCalendarHeader/PickersCalendarHeader.types.d.ts +1 -1
- package/PickersLayout/PickersLayout.js +1 -1
- package/PickersLayout/PickersLayout.types.d.ts +1 -1
- package/PickersLayout/usePickerLayout.js +2 -2
- package/PickersSectionList/PickersSectionList.js +1 -1
- package/PickersSectionList/PickersSectionList.types.d.ts +1 -1
- package/PickersTextField/PickersInputBase/PickersInputBase.js +1 -1
- package/PickersTextField/PickersTextField.js +2 -0
- package/StaticDatePicker/StaticDatePicker.js +2 -0
- package/StaticDateTimePicker/StaticDateTimePicker.js +2 -0
- package/TimeClock/ClockNumber.js +1 -1
- package/TimeClock/ClockPointer.js +1 -1
- package/TimeField/TimeField.js +1 -1
- package/TimeField/TimeField.types.d.ts +1 -1
- package/TimePicker/TimePickerToolbar.js +1 -1
- package/YearCalendar/PickersYear.js +1 -1
- package/YearCalendar/YearCalendar.js +2 -0
- package/hooks/useClearableField.d.ts +1 -1
- package/hooks/useClearableField.js +1 -1
- package/index.js +1 -1
- package/internals/components/PickersArrowSwitcher/PickersArrowSwitcher.js +2 -2
- package/internals/components/PickersArrowSwitcher/PickersArrowSwitcher.types.d.ts +1 -1
- package/internals/components/PickersPopper.d.ts +2 -2
- package/internals/components/PickersPopper.js +1 -1
- package/internals/components/PickersToolbar.js +1 -1
- package/internals/components/PickersToolbarButton.js +1 -1
- package/internals/components/PickersToolbarText.js +1 -1
- package/internals/hooks/useDesktopPicker/useDesktopPicker.js +1 -1
- package/internals/hooks/useDesktopPicker/useDesktopPicker.types.d.ts +1 -1
- package/internals/hooks/useField/useField.utils.js +1 -1
- package/internals/hooks/useMobilePicker/useMobilePicker.js +1 -1
- package/internals/hooks/useMobilePicker/useMobilePicker.types.d.ts +1 -1
- package/internals/models/validation.d.ts +2 -0
- package/locales/fiFI.js +2 -2
- package/locales/nlNL.js +15 -19
- package/modern/AdapterDateFns/AdapterDateFns.js +5 -2
- package/modern/AdapterDateFnsBase/AdapterDateFnsBase.js +5 -9
- package/modern/AdapterDateFnsJalali/AdapterDateFnsJalali.js +5 -5
- package/modern/AdapterDateFnsJalaliV3/AdapterDateFnsJalaliV3.js +8 -8
- package/modern/AdapterDateFnsV3/AdapterDateFnsV3.js +8 -5
- package/modern/AdapterDayjs/AdapterDayjs.js +2 -1
- package/modern/AdapterLuxon/AdapterLuxon.js +1 -0
- package/modern/AdapterMomentJalaali/AdapterMomentJalaali.js +3 -0
- package/modern/DateCalendar/DateCalendar.js +3 -1
- package/modern/DateCalendar/DayCalendar.js +1 -1
- package/modern/DateField/DateField.js +3 -1
- package/modern/DatePicker/DatePicker.js +2 -0
- package/modern/DatePicker/DatePickerToolbar.js +1 -1
- package/modern/DateTimeField/DateTimeField.js +3 -1
- package/modern/DateTimePicker/DateTimePicker.js +2 -0
- package/modern/DayCalendarSkeleton/DayCalendarSkeleton.js +1 -1
- package/modern/DesktopDatePicker/DesktopDatePicker.js +3 -1
- package/modern/DesktopDateTimePicker/DesktopDateTimePicker.js +3 -1
- package/modern/DesktopTimePicker/DesktopTimePicker.js +1 -1
- package/modern/DigitalClock/DigitalClock.js +1 -1
- package/modern/MobileDatePicker/MobileDatePicker.js +3 -1
- package/modern/MobileDateTimePicker/MobileDateTimePicker.js +3 -1
- package/modern/MobileTimePicker/MobileTimePicker.js +1 -1
- package/modern/MonthCalendar/MonthCalendar.js +2 -0
- package/modern/MonthCalendar/PickersMonth.js +1 -1
- package/modern/PickersCalendarHeader/PickersCalendarHeader.js +2 -2
- package/modern/PickersLayout/PickersLayout.js +1 -1
- package/modern/PickersLayout/usePickerLayout.js +2 -2
- package/modern/PickersSectionList/PickersSectionList.js +1 -1
- package/modern/PickersTextField/PickersInputBase/PickersInputBase.js +1 -1
- package/modern/PickersTextField/PickersTextField.js +2 -0
- package/modern/StaticDatePicker/StaticDatePicker.js +2 -0
- package/modern/StaticDateTimePicker/StaticDateTimePicker.js +2 -0
- package/modern/TimeClock/ClockNumber.js +1 -1
- package/modern/TimeClock/ClockPointer.js +1 -1
- package/modern/TimeField/TimeField.js +1 -1
- package/modern/TimePicker/TimePickerToolbar.js +1 -1
- package/modern/YearCalendar/PickersYear.js +1 -1
- package/modern/YearCalendar/YearCalendar.js +2 -0
- package/modern/hooks/useClearableField.js +1 -1
- package/modern/index.js +1 -1
- package/modern/internals/components/PickersArrowSwitcher/PickersArrowSwitcher.js +2 -2
- package/modern/internals/components/PickersPopper.js +1 -1
- package/modern/internals/components/PickersToolbar.js +1 -1
- package/modern/internals/components/PickersToolbarButton.js +1 -1
- package/modern/internals/components/PickersToolbarText.js +1 -1
- package/modern/internals/hooks/useDesktopPicker/useDesktopPicker.js +1 -1
- package/modern/internals/hooks/useField/useField.utils.js +1 -1
- package/modern/internals/hooks/useMobilePicker/useMobilePicker.js +1 -1
- package/modern/locales/fiFI.js +2 -2
- package/modern/locales/nlNL.js +15 -19
- package/node/AdapterDateFns/AdapterDateFns.js +5 -2
- package/node/AdapterDateFnsBase/AdapterDateFnsBase.js +5 -9
- package/node/AdapterDateFnsJalali/AdapterDateFnsJalali.js +5 -5
- package/node/AdapterDateFnsJalaliV3/AdapterDateFnsJalaliV3.js +8 -8
- package/node/AdapterDateFnsV3/AdapterDateFnsV3.js +8 -5
- package/node/AdapterDayjs/AdapterDayjs.js +2 -1
- package/node/AdapterLuxon/AdapterLuxon.js +1 -0
- package/node/AdapterMomentJalaali/AdapterMomentJalaali.js +3 -0
- package/node/DateCalendar/DateCalendar.js +10 -8
- package/node/DateCalendar/DayCalendar.js +5 -5
- package/node/DateField/DateField.js +6 -4
- package/node/DatePicker/DatePicker.js +2 -0
- package/node/DatePicker/DatePickerToolbar.js +2 -2
- package/node/DateTimeField/DateTimeField.js +6 -4
- package/node/DateTimePicker/DateTimePicker.js +2 -0
- package/node/DayCalendarSkeleton/DayCalendarSkeleton.js +2 -2
- package/node/DesktopDatePicker/DesktopDatePicker.js +6 -4
- package/node/DesktopDateTimePicker/DesktopDateTimePicker.js +7 -5
- package/node/DesktopTimePicker/DesktopTimePicker.js +4 -4
- package/node/DigitalClock/DigitalClock.js +2 -2
- package/node/MobileDatePicker/MobileDatePicker.js +6 -4
- package/node/MobileDateTimePicker/MobileDateTimePicker.js +6 -4
- package/node/MobileTimePicker/MobileTimePicker.js +4 -4
- package/node/MonthCalendar/MonthCalendar.js +2 -0
- package/node/MonthCalendar/PickersMonth.js +2 -2
- package/node/PickersCalendarHeader/PickersCalendarHeader.js +5 -5
- package/node/PickersLayout/PickersLayout.js +2 -2
- package/node/PickersLayout/usePickerLayout.js +6 -6
- package/node/PickersSectionList/PickersSectionList.js +6 -6
- package/node/PickersTextField/PickersInputBase/PickersInputBase.js +2 -2
- package/node/PickersTextField/PickersTextField.js +2 -0
- package/node/StaticDatePicker/StaticDatePicker.js +2 -0
- package/node/StaticDateTimePicker/StaticDateTimePicker.js +2 -0
- package/node/TimeClock/ClockNumber.js +2 -2
- package/node/TimeClock/ClockPointer.js +2 -2
- package/node/TimeField/TimeField.js +4 -4
- package/node/TimePicker/TimePickerToolbar.js +6 -6
- package/node/YearCalendar/PickersYear.js +2 -2
- package/node/YearCalendar/YearCalendar.js +2 -0
- package/node/hooks/useClearableField.js +3 -3
- package/node/index.js +1 -1
- package/node/internals/components/PickersArrowSwitcher/PickersArrowSwitcher.js +7 -7
- package/node/internals/components/PickersPopper.js +13 -13
- package/node/internals/components/PickersToolbar.js +2 -2
- package/node/internals/components/PickersToolbarButton.js +2 -2
- package/node/internals/components/PickersToolbarText.js +2 -2
- package/node/internals/hooks/useDesktopPicker/useDesktopPicker.js +4 -4
- package/node/internals/hooks/useField/useField.utils.js +1 -1
- package/node/internals/hooks/useMobilePicker/useMobilePicker.js +4 -4
- package/node/locales/fiFI.js +2 -2
- package/node/locales/nlNL.js +15 -19
- package/package.json +2 -3
|
@@ -116,11 +116,14 @@ export class AdapterDateFnsJalali extends AdapterDateFnsBase {
|
|
|
116
116
|
locale,
|
|
117
117
|
formats
|
|
118
118
|
} = {}) {
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
119
|
+
/* istanbul ignore next */
|
|
120
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
121
|
+
if (typeof addDays !== 'function') {
|
|
122
|
+
throw new Error([`MUI: The \`date-fns-jalali\` package v2.x is not compatible with this adapter.`, 'Please, install v3.x of the package or use the `AdapterDateFnsJalali` instead.'].join('\n'));
|
|
123
|
+
}
|
|
124
|
+
if (!longFormatters) {
|
|
125
|
+
throw new Error('MUI: The minimum supported `date-fns-jalali` package version compatible with this adapter is `3.2.x`.');
|
|
126
|
+
}
|
|
124
127
|
}
|
|
125
128
|
super({
|
|
126
129
|
locale: locale ?? defaultLocale,
|
|
@@ -139,9 +142,6 @@ export class AdapterDateFnsJalali extends AdapterDateFnsBase {
|
|
|
139
142
|
locale: this.locale
|
|
140
143
|
});
|
|
141
144
|
};
|
|
142
|
-
this.getCurrentLocaleCode = () => {
|
|
143
|
-
return this.locale?.code || 'fa-IR';
|
|
144
|
-
};
|
|
145
145
|
this.isValid = value => {
|
|
146
146
|
if (value == null) {
|
|
147
147
|
return false;
|
|
@@ -79,11 +79,14 @@ export class AdapterDateFns extends AdapterDateFnsBase {
|
|
|
79
79
|
locale,
|
|
80
80
|
formats
|
|
81
81
|
} = {}) {
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
82
|
+
/* istanbul ignore next */
|
|
83
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
84
|
+
if (typeof addDays !== 'function') {
|
|
85
|
+
throw new Error([`MUI: The \`date-fns\` package v2.x is not compatible with this adapter.`, 'Please, install v3.x of the package or use the `AdapterDateFns` instead.'].join('\n'));
|
|
86
|
+
}
|
|
87
|
+
if (!longFormatters) {
|
|
88
|
+
throw new Error('MUI: The minimum supported `date-fns` package version compatible with this adapter is `3.2.x`.');
|
|
89
|
+
}
|
|
87
90
|
}
|
|
88
91
|
super({
|
|
89
92
|
locale: locale ?? enUS,
|
|
@@ -233,6 +233,7 @@ export class AdapterDayjs {
|
|
|
233
233
|
const locale = this.locale || 'en';
|
|
234
234
|
let localeObject = locales[locale];
|
|
235
235
|
if (localeObject === undefined) {
|
|
236
|
+
/* istanbul ignore next */
|
|
236
237
|
if (process.env.NODE_ENV !== 'production') {
|
|
237
238
|
warnOnce(['MUI X: Your locale has not been found.', 'Either the locale key is not a supported one. Locales supported by dayjs are available here: https://github.com/iamkun/dayjs/tree/dev/src/locale.', "Or you forget to import the locale from 'dayjs/locale/{localeUsed}'", 'fallback on English locale.']);
|
|
238
239
|
}
|
|
@@ -254,7 +255,7 @@ export class AdapterDayjs {
|
|
|
254
255
|
if (timezone !== 'UTC') {
|
|
255
256
|
const fixedValue = value.tz(this.cleanTimezone(timezone), true);
|
|
256
257
|
// @ts-ignore
|
|
257
|
-
if (
|
|
258
|
+
if (fixedValue.$offset === (value.$offset ?? 0)) {
|
|
258
259
|
return value;
|
|
259
260
|
}
|
|
260
261
|
// Change only what is needed to avoid creating a new object with unwanted data
|
|
@@ -201,6 +201,9 @@ export class AdapterMomentJalaali extends AdapterMoment {
|
|
|
201
201
|
this.getDate = value => {
|
|
202
202
|
return value.jDate();
|
|
203
203
|
};
|
|
204
|
+
this.getDaysInMonth = value => {
|
|
205
|
+
return this.moment.jDaysInMonth(value.jYear(), value.jMonth());
|
|
206
|
+
};
|
|
204
207
|
this.setYear = (value, year) => {
|
|
205
208
|
return value.clone().jYear(year);
|
|
206
209
|
};
|
|
@@ -4,7 +4,7 @@ const _excluded = ["autoFocus", "onViewChange", "value", "defaultValue", "refere
|
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
6
|
import clsx from 'clsx';
|
|
7
|
-
import
|
|
7
|
+
import useSlotProps from '@mui/utils/useSlotProps';
|
|
8
8
|
import { styled, useThemeProps } from '@mui/material/styles';
|
|
9
9
|
import { unstable_composeClasses as composeClasses, unstable_useId as useId, unstable_useEventCallback as useEventCallback } from '@mui/utils';
|
|
10
10
|
import { useCalendarState } from './useCalendarState';
|
|
@@ -412,10 +412,12 @@ process.env.NODE_ENV !== "production" ? DateCalendar.propTypes = {
|
|
|
412
412
|
loading: PropTypes.bool,
|
|
413
413
|
/**
|
|
414
414
|
* Maximal selectable date.
|
|
415
|
+
* @default 2099-12-31
|
|
415
416
|
*/
|
|
416
417
|
maxDate: PropTypes.object,
|
|
417
418
|
/**
|
|
418
419
|
* Minimal selectable date.
|
|
420
|
+
* @default 1900-01-01
|
|
419
421
|
*/
|
|
420
422
|
minDate: PropTypes.object,
|
|
421
423
|
/**
|
|
@@ -5,7 +5,7 @@ const _excluded = ["parentProps", "day", "focusableDay", "selectedDays", "isDate
|
|
|
5
5
|
import * as React from 'react';
|
|
6
6
|
import useEventCallback from '@mui/utils/useEventCallback';
|
|
7
7
|
import Typography from '@mui/material/Typography';
|
|
8
|
-
import
|
|
8
|
+
import useSlotProps from '@mui/utils/useSlotProps';
|
|
9
9
|
import { useRtl } from '@mui/system/RtlProvider';
|
|
10
10
|
import { styled, useThemeProps } from '@mui/material/styles';
|
|
11
11
|
import { unstable_composeClasses as composeClasses, unstable_useControlled as useControlled } from '@mui/utils';
|
|
@@ -5,7 +5,7 @@ import * as React from 'react';
|
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
6
|
import MuiTextField from '@mui/material/TextField';
|
|
7
7
|
import { useThemeProps } from '@mui/material/styles';
|
|
8
|
-
import
|
|
8
|
+
import useSlotProps from '@mui/utils/useSlotProps';
|
|
9
9
|
import { refType } from '@mui/utils';
|
|
10
10
|
import { useDateField } from './useDateField';
|
|
11
11
|
import { useClearableField } from '../hooks';
|
|
@@ -174,10 +174,12 @@ process.env.NODE_ENV !== "production" ? DateField.propTypes = {
|
|
|
174
174
|
margin: PropTypes.oneOf(['dense', 'none', 'normal']),
|
|
175
175
|
/**
|
|
176
176
|
* Maximal selectable date.
|
|
177
|
+
* @default 2099-12-31
|
|
177
178
|
*/
|
|
178
179
|
maxDate: PropTypes.object,
|
|
179
180
|
/**
|
|
180
181
|
* Minimal selectable date.
|
|
182
|
+
* @default 1900-01-01
|
|
181
183
|
*/
|
|
182
184
|
minDate: PropTypes.object,
|
|
183
185
|
/**
|
|
@@ -149,10 +149,12 @@ process.env.NODE_ENV !== "production" ? DatePicker.propTypes = {
|
|
|
149
149
|
localeText: PropTypes.object,
|
|
150
150
|
/**
|
|
151
151
|
* Maximal selectable date.
|
|
152
|
+
* @default 2099-12-31
|
|
152
153
|
*/
|
|
153
154
|
maxDate: PropTypes.object,
|
|
154
155
|
/**
|
|
155
156
|
* Minimal selectable date.
|
|
157
|
+
* @default 1900-01-01
|
|
156
158
|
*/
|
|
157
159
|
minDate: PropTypes.object,
|
|
158
160
|
/**
|
|
@@ -6,7 +6,7 @@ import clsx from 'clsx';
|
|
|
6
6
|
import PropTypes from 'prop-types';
|
|
7
7
|
import Typography from '@mui/material/Typography';
|
|
8
8
|
import { styled, useThemeProps } from '@mui/material/styles';
|
|
9
|
-
import
|
|
9
|
+
import composeClasses from '@mui/utils/composeClasses';
|
|
10
10
|
import { PickersToolbar } from '../internals/components/PickersToolbar';
|
|
11
11
|
import { usePickersTranslations } from '../hooks/usePickersTranslations';
|
|
12
12
|
import { useUtils } from '../internals/hooks/useUtils';
|
|
@@ -5,7 +5,7 @@ import * as React from 'react';
|
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
6
|
import MuiTextField from '@mui/material/TextField';
|
|
7
7
|
import { useThemeProps } from '@mui/material/styles';
|
|
8
|
-
import
|
|
8
|
+
import useSlotProps from '@mui/utils/useSlotProps';
|
|
9
9
|
import { refType } from '@mui/utils';
|
|
10
10
|
import { useDateTimeField } from './useDateTimeField';
|
|
11
11
|
import { useClearableField } from '../hooks';
|
|
@@ -184,6 +184,7 @@ process.env.NODE_ENV !== "production" ? DateTimeField.propTypes = {
|
|
|
184
184
|
margin: PropTypes.oneOf(['dense', 'none', 'normal']),
|
|
185
185
|
/**
|
|
186
186
|
* Maximal selectable date.
|
|
187
|
+
* @default 2099-12-31
|
|
187
188
|
*/
|
|
188
189
|
maxDate: PropTypes.object,
|
|
189
190
|
/**
|
|
@@ -197,6 +198,7 @@ process.env.NODE_ENV !== "production" ? DateTimeField.propTypes = {
|
|
|
197
198
|
maxTime: PropTypes.object,
|
|
198
199
|
/**
|
|
199
200
|
* Minimal selectable date.
|
|
201
|
+
* @default 1900-01-01
|
|
200
202
|
*/
|
|
201
203
|
minDate: PropTypes.object,
|
|
202
204
|
/**
|
|
@@ -164,6 +164,7 @@ process.env.NODE_ENV !== "production" ? DateTimePicker.propTypes = {
|
|
|
164
164
|
localeText: PropTypes.object,
|
|
165
165
|
/**
|
|
166
166
|
* Maximal selectable date.
|
|
167
|
+
* @default 2099-12-31
|
|
167
168
|
*/
|
|
168
169
|
maxDate: PropTypes.object,
|
|
169
170
|
/**
|
|
@@ -177,6 +178,7 @@ process.env.NODE_ENV !== "production" ? DateTimePicker.propTypes = {
|
|
|
177
178
|
maxTime: PropTypes.object,
|
|
178
179
|
/**
|
|
179
180
|
* Minimal selectable date.
|
|
181
|
+
* @default 1900-01-01
|
|
180
182
|
*/
|
|
181
183
|
minDate: PropTypes.object,
|
|
182
184
|
/**
|
|
@@ -6,7 +6,7 @@ import PropTypes from 'prop-types';
|
|
|
6
6
|
import clsx from 'clsx';
|
|
7
7
|
import Skeleton from '@mui/material/Skeleton';
|
|
8
8
|
import { styled, useThemeProps } from '@mui/material/styles';
|
|
9
|
-
import
|
|
9
|
+
import composeClasses from '@mui/utils/composeClasses';
|
|
10
10
|
import { DAY_SIZE, DAY_MARGIN } from '../internals/constants/dimensions';
|
|
11
11
|
import { getDayCalendarSkeletonUtilityClass } from './dayCalendarSkeletonClasses';
|
|
12
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
|
-
import
|
|
4
|
+
import resolveComponentProps from '@mui/utils/resolveComponentProps';
|
|
5
5
|
import { refType } from '@mui/utils';
|
|
6
6
|
import { singleItemValueManager } from '../internals/utils/valueManagers';
|
|
7
7
|
import { useDatePickerDefaultizedProps } from '../DatePicker/shared';
|
|
@@ -165,10 +165,12 @@ DesktopDatePicker.propTypes = {
|
|
|
165
165
|
localeText: PropTypes.object,
|
|
166
166
|
/**
|
|
167
167
|
* Maximal selectable date.
|
|
168
|
+
* @default 2099-12-31
|
|
168
169
|
*/
|
|
169
170
|
maxDate: PropTypes.object,
|
|
170
171
|
/**
|
|
171
172
|
* Minimal selectable date.
|
|
173
|
+
* @default 1900-01-01
|
|
172
174
|
*/
|
|
173
175
|
minDate: PropTypes.object,
|
|
174
176
|
/**
|
|
@@ -3,7 +3,7 @@ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWith
|
|
|
3
3
|
const _excluded = ["openTo", "focusedView", "timeViewsCount"];
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
|
-
import
|
|
6
|
+
import resolveComponentProps from '@mui/utils/resolveComponentProps';
|
|
7
7
|
import { refType } from '@mui/utils';
|
|
8
8
|
import Divider from '@mui/material/Divider';
|
|
9
9
|
import { singleItemValueManager } from '../internals/utils/valueManagers';
|
|
@@ -267,6 +267,7 @@ DesktopDateTimePicker.propTypes = {
|
|
|
267
267
|
localeText: PropTypes.object,
|
|
268
268
|
/**
|
|
269
269
|
* Maximal selectable date.
|
|
270
|
+
* @default 2099-12-31
|
|
270
271
|
*/
|
|
271
272
|
maxDate: PropTypes.object,
|
|
272
273
|
/**
|
|
@@ -280,6 +281,7 @@ DesktopDateTimePicker.propTypes = {
|
|
|
280
281
|
maxTime: PropTypes.object,
|
|
281
282
|
/**
|
|
282
283
|
* Minimal selectable date.
|
|
284
|
+
* @default 1900-01-01
|
|
283
285
|
*/
|
|
284
286
|
minDate: PropTypes.object,
|
|
285
287
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
|
-
import
|
|
4
|
+
import resolveComponentProps from '@mui/utils/resolveComponentProps';
|
|
5
5
|
import { refType } from '@mui/utils';
|
|
6
6
|
import { singleItemValueManager } from '../internals/utils/valueManagers';
|
|
7
7
|
import { TimeField } from '../TimeField';
|
|
@@ -4,7 +4,7 @@ const _excluded = ["ampm", "timeStep", "autoFocus", "slots", "slotProps", "value
|
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import clsx from 'clsx';
|
|
6
6
|
import PropTypes from 'prop-types';
|
|
7
|
-
import
|
|
7
|
+
import useSlotProps from '@mui/utils/useSlotProps';
|
|
8
8
|
import { alpha, styled, useThemeProps } from '@mui/material/styles';
|
|
9
9
|
import useEventCallback from '@mui/utils/useEventCallback';
|
|
10
10
|
import composeClasses from '@mui/utils/composeClasses';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
|
-
import
|
|
4
|
+
import resolveComponentProps from '@mui/utils/resolveComponentProps';
|
|
5
5
|
import { refType } from '@mui/utils';
|
|
6
6
|
import { useMobilePicker } from '../internals/hooks/useMobilePicker';
|
|
7
7
|
import { useDatePickerDefaultizedProps } from '../DatePicker/shared';
|
|
@@ -162,10 +162,12 @@ MobileDatePicker.propTypes = {
|
|
|
162
162
|
localeText: PropTypes.object,
|
|
163
163
|
/**
|
|
164
164
|
* Maximal selectable date.
|
|
165
|
+
* @default 2099-12-31
|
|
165
166
|
*/
|
|
166
167
|
maxDate: PropTypes.object,
|
|
167
168
|
/**
|
|
168
169
|
* Minimal selectable date.
|
|
170
|
+
* @default 1900-01-01
|
|
169
171
|
*/
|
|
170
172
|
minDate: PropTypes.object,
|
|
171
173
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
|
-
import
|
|
4
|
+
import resolveComponentProps from '@mui/utils/resolveComponentProps';
|
|
5
5
|
import { refType } from '@mui/utils';
|
|
6
6
|
import { singleItemValueManager } from '../internals/utils/valueManagers';
|
|
7
7
|
import { DateTimeField } from '../DateTimeField';
|
|
@@ -187,6 +187,7 @@ MobileDateTimePicker.propTypes = {
|
|
|
187
187
|
localeText: PropTypes.object,
|
|
188
188
|
/**
|
|
189
189
|
* Maximal selectable date.
|
|
190
|
+
* @default 2099-12-31
|
|
190
191
|
*/
|
|
191
192
|
maxDate: PropTypes.object,
|
|
192
193
|
/**
|
|
@@ -200,6 +201,7 @@ MobileDateTimePicker.propTypes = {
|
|
|
200
201
|
maxTime: PropTypes.object,
|
|
201
202
|
/**
|
|
202
203
|
* Minimal selectable date.
|
|
204
|
+
* @default 1900-01-01
|
|
203
205
|
*/
|
|
204
206
|
minDate: PropTypes.object,
|
|
205
207
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
|
-
import
|
|
4
|
+
import resolveComponentProps from '@mui/utils/resolveComponentProps';
|
|
5
5
|
import { refType } from '@mui/utils';
|
|
6
6
|
import { singleItemValueManager } from '../internals/utils/valueManagers';
|
|
7
7
|
import { TimeField } from '../TimeField';
|
|
@@ -272,10 +272,12 @@ process.env.NODE_ENV !== "production" ? MonthCalendar.propTypes = {
|
|
|
272
272
|
hasFocus: PropTypes.bool,
|
|
273
273
|
/**
|
|
274
274
|
* Maximal selectable date.
|
|
275
|
+
* @default 2099-12-31
|
|
275
276
|
*/
|
|
276
277
|
maxDate: PropTypes.object,
|
|
277
278
|
/**
|
|
278
279
|
* Minimal selectable date.
|
|
280
|
+
* @default 1900-01-01
|
|
279
281
|
*/
|
|
280
282
|
minDate: PropTypes.object,
|
|
281
283
|
/**
|
|
@@ -4,7 +4,7 @@ const _excluded = ["autoFocus", "className", "children", "disabled", "selected",
|
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import clsx from 'clsx';
|
|
6
6
|
import { styled, alpha, useThemeProps } from '@mui/material/styles';
|
|
7
|
-
import
|
|
7
|
+
import useSlotProps from '@mui/utils/useSlotProps';
|
|
8
8
|
import composeClasses from '@mui/utils/composeClasses';
|
|
9
9
|
import useEnhancedEffect from '@mui/utils/useEnhancedEffect';
|
|
10
10
|
import { getPickersMonthUtilityClass, pickersMonthClasses } from './pickersMonthClasses';
|
|
@@ -7,8 +7,8 @@ import PropTypes from 'prop-types';
|
|
|
7
7
|
import clsx from 'clsx';
|
|
8
8
|
import Fade from '@mui/material/Fade';
|
|
9
9
|
import { styled, useThemeProps } from '@mui/material/styles';
|
|
10
|
-
import
|
|
11
|
-
import
|
|
10
|
+
import useSlotProps from '@mui/utils/useSlotProps';
|
|
11
|
+
import composeClasses from '@mui/utils/composeClasses';
|
|
12
12
|
import IconButton from '@mui/material/IconButton';
|
|
13
13
|
import { usePickersTranslations } from '../hooks/usePickersTranslations';
|
|
14
14
|
import { useUtils } from '../internals/hooks/useUtils';
|
|
@@ -2,7 +2,7 @@ import * as React from 'react';
|
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import clsx from 'clsx';
|
|
4
4
|
import { styled, useThemeProps } from '@mui/material/styles';
|
|
5
|
-
import
|
|
5
|
+
import composeClasses from '@mui/utils/composeClasses';
|
|
6
6
|
import { pickersLayoutClasses, getPickersLayoutUtilityClass } from './pickersLayoutClasses';
|
|
7
7
|
import usePickerLayout from './usePickerLayout';
|
|
8
8
|
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import
|
|
4
|
-
import
|
|
3
|
+
import useSlotProps from '@mui/utils/useSlotProps';
|
|
4
|
+
import composeClasses from '@mui/utils/composeClasses';
|
|
5
5
|
import { PickersActionBar } from '../PickersActionBar';
|
|
6
6
|
import { getPickersLayoutUtilityClass } from './pickersLayoutClasses';
|
|
7
7
|
import { PickersShortcuts } from '../PickersShortcuts';
|
|
@@ -3,7 +3,7 @@ import _extends from "@babel/runtime/helpers/esm/extends";
|
|
|
3
3
|
const _excluded = ["slots", "slotProps", "elements", "sectionListRef"];
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
|
-
import
|
|
6
|
+
import useSlotProps from '@mui/utils/useSlotProps';
|
|
7
7
|
import composeClasses from '@mui/utils/composeClasses';
|
|
8
8
|
import useForkRef from '@mui/utils/useForkRef';
|
|
9
9
|
import { styled, useThemeProps } from '@mui/material/styles';
|
|
@@ -9,7 +9,7 @@ import useForkRef from '@mui/utils/useForkRef';
|
|
|
9
9
|
import { refType } from '@mui/utils';
|
|
10
10
|
import composeClasses from '@mui/utils/composeClasses';
|
|
11
11
|
import capitalize from '@mui/utils/capitalize';
|
|
12
|
-
import
|
|
12
|
+
import useSlotProps from '@mui/utils/useSlotProps';
|
|
13
13
|
import visuallyHidden from '@mui/utils/visuallyHidden';
|
|
14
14
|
import { useRtl } from '@mui/system/RtlProvider';
|
|
15
15
|
import { pickersInputBaseClasses, getPickersInputBaseUtilityClass } from './pickersInputBaseClasses';
|
|
@@ -63,6 +63,7 @@ const PickersTextField = /*#__PURE__*/React.forwardRef(function PickersTextField
|
|
|
63
63
|
areAllSectionsEmpty,
|
|
64
64
|
onClick,
|
|
65
65
|
onKeyDown,
|
|
66
|
+
onKeyUp,
|
|
66
67
|
onPaste,
|
|
67
68
|
onInput,
|
|
68
69
|
endAdornment,
|
|
@@ -122,6 +123,7 @@ const PickersTextField = /*#__PURE__*/React.forwardRef(function PickersTextField
|
|
|
122
123
|
areAllSectionsEmpty: areAllSectionsEmpty,
|
|
123
124
|
onClick: onClick,
|
|
124
125
|
onKeyDown: onKeyDown,
|
|
126
|
+
onKeyUp: onKeyUp,
|
|
125
127
|
onInput: onInput,
|
|
126
128
|
onPaste: onPaste,
|
|
127
129
|
endAdornment: endAdornment,
|
|
@@ -119,10 +119,12 @@ StaticDatePicker.propTypes = {
|
|
|
119
119
|
localeText: PropTypes.object,
|
|
120
120
|
/**
|
|
121
121
|
* Maximal selectable date.
|
|
122
|
+
* @default 2099-12-31
|
|
122
123
|
*/
|
|
123
124
|
maxDate: PropTypes.object,
|
|
124
125
|
/**
|
|
125
126
|
* Minimal selectable date.
|
|
127
|
+
* @default 1900-01-01
|
|
126
128
|
*/
|
|
127
129
|
minDate: PropTypes.object,
|
|
128
130
|
/**
|
|
@@ -144,6 +144,7 @@ StaticDateTimePicker.propTypes = {
|
|
|
144
144
|
localeText: PropTypes.object,
|
|
145
145
|
/**
|
|
146
146
|
* Maximal selectable date.
|
|
147
|
+
* @default 2099-12-31
|
|
147
148
|
*/
|
|
148
149
|
maxDate: PropTypes.object,
|
|
149
150
|
/**
|
|
@@ -157,6 +158,7 @@ StaticDateTimePicker.propTypes = {
|
|
|
157
158
|
maxTime: PropTypes.object,
|
|
158
159
|
/**
|
|
159
160
|
* Minimal selectable date.
|
|
161
|
+
* @default 1900-01-01
|
|
160
162
|
*/
|
|
161
163
|
minDate: PropTypes.object,
|
|
162
164
|
/**
|
|
@@ -4,7 +4,7 @@ const _excluded = ["className", "disabled", "index", "inner", "label", "selected
|
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import clsx from 'clsx';
|
|
6
6
|
import { styled, useThemeProps } from '@mui/material/styles';
|
|
7
|
-
import
|
|
7
|
+
import composeClasses from '@mui/utils/composeClasses';
|
|
8
8
|
import { CLOCK_WIDTH, CLOCK_HOUR_WIDTH } from './shared';
|
|
9
9
|
import { getClockNumberUtilityClass, clockNumberClasses } from './clockNumberClasses';
|
|
10
10
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -4,7 +4,7 @@ const _excluded = ["className", "hasSelected", "isInner", "type", "viewValue"];
|
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import clsx from 'clsx';
|
|
6
6
|
import { styled, useThemeProps } from '@mui/material/styles';
|
|
7
|
-
import
|
|
7
|
+
import composeClasses from '@mui/utils/composeClasses';
|
|
8
8
|
import { CLOCK_WIDTH, CLOCK_HOUR_WIDTH } from './shared';
|
|
9
9
|
import { getClockPointerUtilityClass } from './clockPointerClasses';
|
|
10
10
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -5,7 +5,7 @@ import * as React from 'react';
|
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
6
|
import MuiTextField from '@mui/material/TextField';
|
|
7
7
|
import { useThemeProps } from '@mui/material/styles';
|
|
8
|
-
import
|
|
8
|
+
import useSlotProps from '@mui/utils/useSlotProps';
|
|
9
9
|
import { refType } from '@mui/utils';
|
|
10
10
|
import { useTimeField } from './useTimeField';
|
|
11
11
|
import { useClearableField } from '../hooks';
|
|
@@ -6,7 +6,7 @@ import clsx from 'clsx';
|
|
|
6
6
|
import PropTypes from 'prop-types';
|
|
7
7
|
import { useRtl } from '@mui/system/RtlProvider';
|
|
8
8
|
import { styled, useThemeProps } from '@mui/material/styles';
|
|
9
|
-
import
|
|
9
|
+
import composeClasses from '@mui/utils/composeClasses';
|
|
10
10
|
import { PickersToolbarText } from '../internals/components/PickersToolbarText';
|
|
11
11
|
import { PickersToolbarButton } from '../internals/components/PickersToolbarButton';
|
|
12
12
|
import { PickersToolbar } from '../internals/components/PickersToolbar';
|
|
@@ -4,7 +4,7 @@ const _excluded = ["autoFocus", "className", "children", "disabled", "selected",
|
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import clsx from 'clsx';
|
|
6
6
|
import { styled, alpha, useThemeProps } from '@mui/material/styles';
|
|
7
|
-
import
|
|
7
|
+
import useSlotProps from '@mui/utils/useSlotProps';
|
|
8
8
|
import composeClasses from '@mui/utils/composeClasses';
|
|
9
9
|
import useEnhancedEffect from '@mui/utils/useEnhancedEffect';
|
|
10
10
|
import { getPickersYearUtilityClass, pickersYearClasses } from './pickersYearClasses';
|
|
@@ -297,10 +297,12 @@ process.env.NODE_ENV !== "production" ? YearCalendar.propTypes = {
|
|
|
297
297
|
hasFocus: PropTypes.bool,
|
|
298
298
|
/**
|
|
299
299
|
* Maximal selectable date.
|
|
300
|
+
* @default 2099-12-31
|
|
300
301
|
*/
|
|
301
302
|
maxDate: PropTypes.object,
|
|
302
303
|
/**
|
|
303
304
|
* Minimal selectable date.
|
|
305
|
+
* @default 1900-01-01
|
|
304
306
|
*/
|
|
305
307
|
minDate: PropTypes.object,
|
|
306
308
|
/**
|
|
@@ -3,7 +3,7 @@ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWith
|
|
|
3
3
|
const _excluded = ["clearable", "onClear", "InputProps", "sx", "slots", "slotProps"],
|
|
4
4
|
_excluded2 = ["ownerState"];
|
|
5
5
|
import * as React from 'react';
|
|
6
|
-
import
|
|
6
|
+
import useSlotProps from '@mui/utils/useSlotProps';
|
|
7
7
|
import MuiIconButton from '@mui/material/IconButton';
|
|
8
8
|
import InputAdornment from '@mui/material/InputAdornment';
|
|
9
9
|
import { ClearIcon } from '../icons';
|
package/modern/index.js
CHANGED
|
@@ -8,8 +8,8 @@ import clsx from 'clsx';
|
|
|
8
8
|
import Typography from '@mui/material/Typography';
|
|
9
9
|
import { useRtl } from '@mui/system/RtlProvider';
|
|
10
10
|
import { styled, useThemeProps } from '@mui/material/styles';
|
|
11
|
-
import
|
|
12
|
-
import
|
|
11
|
+
import composeClasses from '@mui/utils/composeClasses';
|
|
12
|
+
import useSlotProps from '@mui/utils/useSlotProps';
|
|
13
13
|
import IconButton from '@mui/material/IconButton';
|
|
14
14
|
import { ArrowLeftIcon, ArrowRightIcon } from '../../../icons';
|
|
15
15
|
import { getPickersArrowSwitcherUtilityClass } from './pickersArrowSwitcherClasses';
|
|
@@ -2,7 +2,7 @@ import _extends from "@babel/runtime/helpers/esm/extends";
|
|
|
2
2
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
3
|
const _excluded = ["PaperComponent", "popperPlacement", "ownerState", "children", "paperSlotProps", "paperClasses", "onPaperClick", "onPaperTouchStart"];
|
|
4
4
|
import * as React from 'react';
|
|
5
|
-
import
|
|
5
|
+
import useSlotProps from '@mui/utils/useSlotProps';
|
|
6
6
|
import Grow from '@mui/material/Grow';
|
|
7
7
|
import Fade from '@mui/material/Fade';
|
|
8
8
|
import MuiPaper from '@mui/material/Paper';
|
|
@@ -5,7 +5,7 @@ import * as React from 'react';
|
|
|
5
5
|
import clsx from 'clsx';
|
|
6
6
|
import Typography from '@mui/material/Typography';
|
|
7
7
|
import { styled, useThemeProps } from '@mui/material/styles';
|
|
8
|
-
import
|
|
8
|
+
import composeClasses from '@mui/utils/composeClasses';
|
|
9
9
|
import { getPickersToolbarUtilityClass } from './pickersToolbarClasses';
|
|
10
10
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
11
11
|
const useUtilityClasses = ownerState => {
|
|
@@ -5,7 +5,7 @@ import * as React from 'react';
|
|
|
5
5
|
import clsx from 'clsx';
|
|
6
6
|
import Button from '@mui/material/Button';
|
|
7
7
|
import { styled, useThemeProps } from '@mui/material/styles';
|
|
8
|
-
import
|
|
8
|
+
import composeClasses from '@mui/utils/composeClasses';
|
|
9
9
|
import { PickersToolbarText } from './PickersToolbarText';
|
|
10
10
|
import { getPickersToolbarUtilityClass } from './pickersToolbarClasses';
|
|
11
11
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -5,7 +5,7 @@ import * as React from 'react';
|
|
|
5
5
|
import clsx from 'clsx';
|
|
6
6
|
import Typography from '@mui/material/Typography';
|
|
7
7
|
import { styled, useThemeProps } from '@mui/material/styles';
|
|
8
|
-
import
|
|
8
|
+
import composeClasses from '@mui/utils/composeClasses';
|
|
9
9
|
import { getPickersToolbarTextUtilityClass, pickersToolbarTextClasses } from './pickersToolbarTextClasses';
|
|
10
10
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
11
11
|
const useUtilityClasses = ownerState => {
|
|
@@ -4,7 +4,7 @@ const _excluded = ["props", "getOpenDialogAriaText"],
|
|
|
4
4
|
_excluded2 = ["ownerState"],
|
|
5
5
|
_excluded3 = ["ownerState"];
|
|
6
6
|
import * as React from 'react';
|
|
7
|
-
import
|
|
7
|
+
import useSlotProps from '@mui/utils/useSlotProps';
|
|
8
8
|
import MuiInputAdornment from '@mui/material/InputAdornment';
|
|
9
9
|
import IconButton from '@mui/material/IconButton';
|
|
10
10
|
import useForkRef from '@mui/utils/useForkRef';
|