@mui/x-date-pickers 7.5.0 → 7.6.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/CHANGELOG.md +148 -5418
- package/DateCalendar/DateCalendar.js +1 -1
- package/DateField/DateField.js +1 -1
- package/DatePicker/DatePicker.js +1 -1
- package/DatePicker/DatePickerToolbar.js +1 -1
- package/DateTimeField/DateTimeField.js +1 -1
- package/DateTimePicker/DateTimePicker.js +1 -1
- package/DateTimePicker/DateTimePickerTabs.js +1 -1
- package/DateTimePicker/DateTimePickerToolbar.js +1 -27
- package/DayCalendarSkeleton/DayCalendarSkeleton.js +1 -10
- package/DesktopDatePicker/DesktopDatePicker.js +1 -1
- package/DesktopDateTimePicker/DesktopDateTimePicker.js +1 -1
- package/DesktopDateTimePicker/DesktopDateTimePickerLayout.js +5 -4
- package/DesktopTimePicker/DesktopTimePicker.js +1 -1
- package/DigitalClock/DigitalClock.js +1 -1
- package/LocalizationProvider/LocalizationProvider.js +1 -1
- package/MobileDatePicker/MobileDatePicker.js +1 -1
- package/MobileDateTimePicker/MobileDateTimePicker.js +1 -1
- package/MobileTimePicker/MobileTimePicker.js +1 -1
- package/MonthCalendar/MonthCalendar.js +1 -1
- package/MultiSectionDigitalClock/MultiSectionDigitalClock.js +1 -1
- package/PickersActionBar/PickersActionBar.js +1 -1
- package/PickersCalendarHeader/PickersCalendarHeader.js +1 -1
- package/PickersDay/PickersDay.js +1 -1
- package/PickersLayout/PickersLayout.d.ts +1 -2
- package/PickersLayout/PickersLayout.js +2 -14
- package/PickersSectionList/PickersSectionList.js +1 -1
- package/PickersShortcuts/PickersShortcuts.js +1 -1
- package/PickersTextField/PickersFilledInput/PickersFilledInput.js +1 -1
- package/PickersTextField/PickersInput/PickersInput.js +1 -1
- package/PickersTextField/PickersInputBase/PickersInputBase.js +1 -1
- package/PickersTextField/PickersOutlinedInput/PickersOutlinedInput.js +2 -2
- package/PickersTextField/PickersTextField.js +1 -1
- package/StaticDatePicker/StaticDatePicker.js +1 -1
- package/StaticDateTimePicker/StaticDateTimePicker.js +1 -1
- package/StaticTimePicker/StaticTimePicker.js +1 -1
- package/TimeClock/TimeClock.js +1 -1
- package/TimeField/TimeField.js +1 -1
- package/TimePicker/TimePicker.js +1 -1
- package/TimePicker/TimePickerToolbar.js +1 -19
- package/YearCalendar/YearCalendar.js +1 -1
- package/index.js +1 -1
- package/internals/hooks/useDesktopPicker/useDesktopPicker.js +2 -1
- package/internals/hooks/usePicker/usePickerViews.d.ts +2 -3
- package/internals/hooks/usePicker/usePickerViews.js +2 -5
- package/locales/fiFI.js +16 -20
- package/models/adapters.d.ts +1 -1
- 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 +1 -1
- package/modern/DateTimeField/DateTimeField.js +1 -1
- package/modern/DateTimePicker/DateTimePicker.js +1 -1
- package/modern/DateTimePicker/DateTimePickerTabs.js +1 -1
- package/modern/DateTimePicker/DateTimePickerToolbar.js +1 -27
- package/modern/DayCalendarSkeleton/DayCalendarSkeleton.js +1 -10
- package/modern/DesktopDatePicker/DesktopDatePicker.js +1 -1
- package/modern/DesktopDateTimePicker/DesktopDateTimePicker.js +1 -1
- package/modern/DesktopDateTimePicker/DesktopDateTimePickerLayout.js +5 -4
- package/modern/DesktopTimePicker/DesktopTimePicker.js +1 -1
- package/modern/DigitalClock/DigitalClock.js +1 -1
- package/modern/LocalizationProvider/LocalizationProvider.js +1 -1
- package/modern/MobileDatePicker/MobileDatePicker.js +1 -1
- package/modern/MobileDateTimePicker/MobileDateTimePicker.js +1 -1
- package/modern/MobileTimePicker/MobileTimePicker.js +1 -1
- package/modern/MonthCalendar/MonthCalendar.js +1 -1
- package/modern/MultiSectionDigitalClock/MultiSectionDigitalClock.js +1 -1
- package/modern/PickersActionBar/PickersActionBar.js +1 -1
- package/modern/PickersCalendarHeader/PickersCalendarHeader.js +1 -1
- package/modern/PickersDay/PickersDay.js +1 -1
- package/modern/PickersLayout/PickersLayout.js +2 -14
- package/modern/PickersSectionList/PickersSectionList.js +1 -1
- package/modern/PickersShortcuts/PickersShortcuts.js +1 -1
- package/modern/PickersTextField/PickersFilledInput/PickersFilledInput.js +1 -1
- package/modern/PickersTextField/PickersInput/PickersInput.js +1 -1
- package/modern/PickersTextField/PickersInputBase/PickersInputBase.js +1 -1
- package/modern/PickersTextField/PickersOutlinedInput/PickersOutlinedInput.js +2 -2
- package/modern/PickersTextField/PickersTextField.js +1 -1
- package/modern/StaticDatePicker/StaticDatePicker.js +1 -1
- package/modern/StaticDateTimePicker/StaticDateTimePicker.js +1 -1
- package/modern/StaticTimePicker/StaticTimePicker.js +1 -1
- package/modern/TimeClock/TimeClock.js +1 -1
- package/modern/TimeField/TimeField.js +1 -1
- package/modern/TimePicker/TimePicker.js +1 -1
- package/modern/TimePicker/TimePickerToolbar.js +1 -19
- package/modern/YearCalendar/YearCalendar.js +1 -1
- package/modern/index.js +1 -1
- package/modern/internals/hooks/useDesktopPicker/useDesktopPicker.js +2 -1
- package/modern/internals/hooks/usePicker/usePickerViews.js +2 -5
- package/modern/locales/fiFI.js +16 -20
- 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 +1 -1
- package/node/DateTimeField/DateTimeField.js +1 -1
- package/node/DateTimePicker/DateTimePicker.js +1 -1
- package/node/DateTimePicker/DateTimePickerTabs.js +1 -1
- package/node/DateTimePicker/DateTimePickerToolbar.js +1 -27
- package/node/DayCalendarSkeleton/DayCalendarSkeleton.js +1 -10
- package/node/DesktopDatePicker/DesktopDatePicker.js +1 -1
- package/node/DesktopDateTimePicker/DesktopDateTimePicker.js +1 -1
- package/node/DesktopDateTimePicker/DesktopDateTimePickerLayout.js +5 -4
- package/node/DesktopTimePicker/DesktopTimePicker.js +1 -1
- package/node/DigitalClock/DigitalClock.js +1 -1
- package/node/LocalizationProvider/LocalizationProvider.js +1 -1
- package/node/MobileDatePicker/MobileDatePicker.js +1 -1
- package/node/MobileDateTimePicker/MobileDateTimePicker.js +1 -1
- package/node/MobileTimePicker/MobileTimePicker.js +1 -1
- package/node/MonthCalendar/MonthCalendar.js +1 -1
- package/node/MultiSectionDigitalClock/MultiSectionDigitalClock.js +1 -1
- package/node/PickersActionBar/PickersActionBar.js +1 -1
- package/node/PickersCalendarHeader/PickersCalendarHeader.js +1 -1
- package/node/PickersDay/PickersDay.js +1 -1
- package/node/PickersLayout/PickersLayout.js +1 -12
- package/node/PickersSectionList/PickersSectionList.js +1 -1
- package/node/PickersShortcuts/PickersShortcuts.js +1 -1
- package/node/PickersTextField/PickersFilledInput/PickersFilledInput.js +1 -1
- package/node/PickersTextField/PickersInput/PickersInput.js +1 -1
- package/node/PickersTextField/PickersInputBase/PickersInputBase.js +1 -1
- package/node/PickersTextField/PickersOutlinedInput/PickersOutlinedInput.js +2 -2
- package/node/PickersTextField/PickersTextField.js +1 -1
- package/node/StaticDatePicker/StaticDatePicker.js +1 -1
- package/node/StaticDateTimePicker/StaticDateTimePicker.js +1 -1
- package/node/StaticTimePicker/StaticTimePicker.js +1 -1
- package/node/TimeClock/TimeClock.js +1 -1
- package/node/TimeField/TimeField.js +1 -1
- package/node/TimePicker/TimePicker.js +1 -1
- package/node/TimePicker/TimePickerToolbar.js +1 -19
- package/node/YearCalendar/YearCalendar.js +1 -1
- package/node/index.js +1 -1
- package/node/internals/hooks/useDesktopPicker/useDesktopPicker.js +2 -1
- package/node/internals/hooks/usePicker/usePickerViews.js +2 -5
- package/node/locales/fiFI.js +16 -20
- package/package.json +3 -3
|
@@ -61,7 +61,7 @@ const StaticTimePicker = exports.StaticTimePicker = /*#__PURE__*/React.forwardRe
|
|
|
61
61
|
StaticTimePicker.propTypes = {
|
|
62
62
|
// ----------------------------- Warning --------------------------------
|
|
63
63
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
64
|
-
// | To update them edit the TypeScript types and run "
|
|
64
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
65
65
|
// ----------------------------------------------------------------------
|
|
66
66
|
/**
|
|
67
67
|
* 12h/24h view for hour selection clock.
|
|
@@ -321,7 +321,7 @@ const TimeClock = exports.TimeClock = /*#__PURE__*/React.forwardRef(function Tim
|
|
|
321
321
|
process.env.NODE_ENV !== "production" ? TimeClock.propTypes = {
|
|
322
322
|
// ----------------------------- Warning --------------------------------
|
|
323
323
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
324
|
-
// | To update them edit the TypeScript types and run "
|
|
324
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
325
325
|
// ----------------------------------------------------------------------
|
|
326
326
|
/**
|
|
327
327
|
* 12h/24h view for hour selection clock.
|
|
@@ -69,7 +69,7 @@ const TimeField = exports.TimeField = /*#__PURE__*/React.forwardRef(function Tim
|
|
|
69
69
|
process.env.NODE_ENV !== "production" ? TimeField.propTypes = {
|
|
70
70
|
// ----------------------------- Warning --------------------------------
|
|
71
71
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
72
|
-
// | To update them edit the TypeScript types and run "
|
|
72
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
73
73
|
// ----------------------------------------------------------------------
|
|
74
74
|
/**
|
|
75
75
|
* 12h/24h view for hour selection clock.
|
|
@@ -55,7 +55,7 @@ const TimePicker = exports.TimePicker = /*#__PURE__*/React.forwardRef(function T
|
|
|
55
55
|
process.env.NODE_ENV !== "production" ? TimePicker.propTypes = {
|
|
56
56
|
// ----------------------------- Warning --------------------------------
|
|
57
57
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
58
|
-
// | To update them edit the TypeScript types and run "
|
|
58
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
59
59
|
// ----------------------------------------------------------------------
|
|
60
60
|
/**
|
|
61
61
|
* 12h/24h view for hour selection clock.
|
|
@@ -78,15 +78,6 @@ const TimePickerToolbarHourMinuteLabel = (0, _styles.styled)('div', {
|
|
|
78
78
|
}
|
|
79
79
|
}]
|
|
80
80
|
}));
|
|
81
|
-
TimePickerToolbarHourMinuteLabel.propTypes = {
|
|
82
|
-
// ----------------------------- Warning --------------------------------
|
|
83
|
-
// | These PropTypes are generated from the TypeScript type definitions |
|
|
84
|
-
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
|
85
|
-
// ----------------------------------------------------------------------
|
|
86
|
-
as: _propTypes.default.elementType,
|
|
87
|
-
ownerState: _propTypes.default.object.isRequired,
|
|
88
|
-
sx: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object, _propTypes.default.bool])), _propTypes.default.func, _propTypes.default.object])
|
|
89
|
-
};
|
|
90
81
|
const TimePickerToolbarAmPmSelection = (0, _styles.styled)('div', {
|
|
91
82
|
name: 'MuiTimePickerToolbar',
|
|
92
83
|
slot: 'AmPmSelection',
|
|
@@ -115,15 +106,6 @@ const TimePickerToolbarAmPmSelection = (0, _styles.styled)('div', {
|
|
|
115
106
|
}
|
|
116
107
|
}]
|
|
117
108
|
});
|
|
118
|
-
TimePickerToolbarAmPmSelection.propTypes = {
|
|
119
|
-
// ----------------------------- Warning --------------------------------
|
|
120
|
-
// | These PropTypes are generated from the TypeScript type definitions |
|
|
121
|
-
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
|
122
|
-
// ----------------------------------------------------------------------
|
|
123
|
-
as: _propTypes.default.elementType,
|
|
124
|
-
ownerState: _propTypes.default.object.isRequired,
|
|
125
|
-
sx: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object, _propTypes.default.bool])), _propTypes.default.func, _propTypes.default.object])
|
|
126
|
-
};
|
|
127
109
|
|
|
128
110
|
/**
|
|
129
111
|
* Demos:
|
|
@@ -228,7 +210,7 @@ function TimePickerToolbar(inProps) {
|
|
|
228
210
|
process.env.NODE_ENV !== "production" ? TimePickerToolbar.propTypes = {
|
|
229
211
|
// ----------------------------- Warning --------------------------------
|
|
230
212
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
231
|
-
// | To update them edit the TypeScript types and run "
|
|
213
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
232
214
|
// ----------------------------------------------------------------------
|
|
233
215
|
ampm: _propTypes.default.bool,
|
|
234
216
|
ampmInClock: _propTypes.default.bool,
|
|
@@ -266,7 +266,7 @@ const YearCalendar = exports.YearCalendar = /*#__PURE__*/React.forwardRef(functi
|
|
|
266
266
|
process.env.NODE_ENV !== "production" ? YearCalendar.propTypes = {
|
|
267
267
|
// ----------------------------- Warning --------------------------------
|
|
268
268
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
269
|
-
// | To update them edit the TypeScript types and run "
|
|
269
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
270
270
|
// ----------------------------------------------------------------------
|
|
271
271
|
autoFocus: _propTypes.default.bool,
|
|
272
272
|
/**
|
package/node/index.js
CHANGED
|
@@ -130,7 +130,8 @@ const useDesktopPicker = _ref => {
|
|
|
130
130
|
// TODO: Move to `useSlotProps` when https://github.com/mui/material-ui/pull/35088 will be merged
|
|
131
131
|
if (hasUIView) {
|
|
132
132
|
fieldProps.InputProps = (0, _extends2.default)({}, fieldProps.InputProps, {
|
|
133
|
-
ref: containerRef
|
|
133
|
+
ref: containerRef
|
|
134
|
+
}, !props.disableOpenPicker && {
|
|
134
135
|
[`${inputAdornmentProps.position}Adornment`]: /*#__PURE__*/(0, _jsxRuntime.jsx)(InputAdornment, (0, _extends2.default)({}, inputAdornmentProps, {
|
|
135
136
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(OpenPickerButton, (0, _extends2.default)({}, openPickerButtonProps, {
|
|
136
137
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(OpenPickerIcon, (0, _extends2.default)({}, innerSlotProps?.openPickerIcon))
|
|
@@ -50,7 +50,6 @@ const usePickerViews = ({
|
|
|
50
50
|
views,
|
|
51
51
|
openTo,
|
|
52
52
|
onViewChange,
|
|
53
|
-
disableOpenPicker,
|
|
54
53
|
viewRenderers,
|
|
55
54
|
timezone
|
|
56
55
|
} = props;
|
|
@@ -75,9 +74,7 @@ const usePickerViews = ({
|
|
|
75
74
|
viewModeLookup
|
|
76
75
|
} = React.useMemo(() => views.reduce((acc, viewForReduce) => {
|
|
77
76
|
let viewMode;
|
|
78
|
-
if (
|
|
79
|
-
viewMode = 'field';
|
|
80
|
-
} else if (viewRenderers[viewForReduce] != null) {
|
|
77
|
+
if (viewRenderers[viewForReduce] != null) {
|
|
81
78
|
viewMode = 'UI';
|
|
82
79
|
} else {
|
|
83
80
|
viewMode = 'field';
|
|
@@ -90,7 +87,7 @@ const usePickerViews = ({
|
|
|
90
87
|
}, {
|
|
91
88
|
hasUIView: false,
|
|
92
89
|
viewModeLookup: {}
|
|
93
|
-
}), [
|
|
90
|
+
}), [viewRenderers, views]);
|
|
94
91
|
const timeViewsCount = React.useMemo(() => views.reduce((acc, viewForReduce) => {
|
|
95
92
|
if (viewRenderers[viewForReduce] != null && (0, _timeUtils.isTimeView)(viewForReduce)) {
|
|
96
93
|
return acc + 1;
|
package/node/locales/fiFI.js
CHANGED
|
@@ -22,11 +22,10 @@ const fiFIPickers = {
|
|
|
22
22
|
// DateRange labels
|
|
23
23
|
start: 'Alku',
|
|
24
24
|
end: 'Loppu',
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
25
|
+
startDate: 'Alkamispäivämäärä',
|
|
26
|
+
startTime: 'Alkamisaika',
|
|
27
|
+
endDate: 'Päättymispäivämäärä',
|
|
28
|
+
endTime: 'Päättymisaika',
|
|
30
29
|
// Action bar
|
|
31
30
|
cancelButtonLabel: 'Peruuta',
|
|
32
31
|
clearButtonLabel: 'Tyhjennä',
|
|
@@ -41,7 +40,7 @@ const fiFIPickers = {
|
|
|
41
40
|
clockLabelText: (view, time, adapter) => `Valitse ${views[view]}. ${time === null ? 'Ei aikaa valittuna' : `Valittu aika on ${adapter.format(time, 'fullTime')}`}`,
|
|
42
41
|
hoursClockNumberText: hours => `${hours} tuntia`,
|
|
43
42
|
minutesClockNumberText: minutes => `${minutes} minuuttia`,
|
|
44
|
-
secondsClockNumberText: seconds => `${seconds}
|
|
43
|
+
secondsClockNumberText: seconds => `${seconds} sekuntia`,
|
|
45
44
|
// Digital clock labels
|
|
46
45
|
selectViewText: view => `Valitse ${views[view]}`,
|
|
47
46
|
// Calendar labels
|
|
@@ -52,8 +51,7 @@ const fiFIPickers = {
|
|
|
52
51
|
// Open picker labels
|
|
53
52
|
openDatePickerDialogue: (value, utils) => value !== null && utils.isValid(value) ? `Valitse päivä, valittu päivä on ${utils.format(value, 'fullDate')}` : 'Valitse päivä',
|
|
54
53
|
openTimePickerDialogue: (value, utils) => value !== null && utils.isValid(value) ? `Valitse aika, valittu aika on ${utils.format(value, 'fullTime')}` : 'Valitse aika',
|
|
55
|
-
|
|
56
|
-
|
|
54
|
+
fieldClearLabel: 'Tyhjennä arvo',
|
|
57
55
|
// Table labels
|
|
58
56
|
timeTableLabel: 'valitse aika',
|
|
59
57
|
dateTableLabel: 'valitse päivä',
|
|
@@ -65,19 +63,17 @@ const fiFIPickers = {
|
|
|
65
63
|
fieldHoursPlaceholder: () => 'tt',
|
|
66
64
|
fieldMinutesPlaceholder: () => 'mm',
|
|
67
65
|
fieldSecondsPlaceholder: () => 'ss',
|
|
68
|
-
fieldMeridiemPlaceholder: () => 'aa'
|
|
69
|
-
|
|
66
|
+
fieldMeridiemPlaceholder: () => 'aa',
|
|
70
67
|
// View names
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
68
|
+
year: 'Vuosi',
|
|
69
|
+
month: 'Kuukausi',
|
|
70
|
+
day: 'Päivä',
|
|
71
|
+
weekDay: 'Viikonpäivä',
|
|
72
|
+
hours: 'Tunnit',
|
|
73
|
+
minutes: 'Minuutit',
|
|
74
|
+
seconds: 'Sekunnit',
|
|
75
|
+
meridiem: 'Iltapäivä',
|
|
80
76
|
// Common
|
|
81
|
-
|
|
77
|
+
empty: 'Tyhjä'
|
|
82
78
|
};
|
|
83
79
|
const fiFI = exports.fiFI = (0, _getPickersLocalization.getPickersLocalization)(fiFIPickers);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mui/x-date-pickers",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.6.0",
|
|
4
4
|
"description": "The community edition of the Date and Time Picker components (MUI X).",
|
|
5
5
|
"author": "MUI Team",
|
|
6
6
|
"main": "./node/index.js",
|
|
@@ -35,9 +35,9 @@
|
|
|
35
35
|
"directory": "packages/x-date-pickers"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@babel/runtime": "^7.24.
|
|
38
|
+
"@babel/runtime": "^7.24.6",
|
|
39
39
|
"@mui/base": "^5.0.0-beta.40",
|
|
40
|
-
"@mui/system": "^5.15.
|
|
40
|
+
"@mui/system": "^5.15.15",
|
|
41
41
|
"@mui/utils": "^5.15.14",
|
|
42
42
|
"@types/react-transition-group": "^4.4.10",
|
|
43
43
|
"clsx": "^2.1.1",
|