@mui/x-date-pickers 7.18.0 → 7.20.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/AdapterDateFnsBase/AdapterDateFnsBase.js +1 -0
- package/AdapterMoment/AdapterMoment.js +1 -0
- package/CHANGELOG.md +213 -11
- package/DateCalendar/DateCalendar.js +1 -1
- package/DateCalendar/DateCalendar.types.d.ts +1 -1
- package/DateField/DateField.types.d.ts +2 -7
- package/DateField/index.d.ts +1 -1
- package/DateField/useDateField.d.ts +1 -1
- package/DatePicker/DatePicker.js +1 -1
- package/DatePicker/DatePicker.types.d.ts +8 -1
- package/DatePicker/index.d.ts +1 -1
- package/DateTimeField/DateTimeField.types.d.ts +2 -7
- package/DateTimeField/index.d.ts +1 -1
- package/DateTimeField/useDateTimeField.d.ts +1 -1
- package/DateTimePicker/DateTimePicker.js +1 -1
- package/DateTimePicker/DateTimePicker.types.d.ts +9 -1
- package/DateTimePicker/index.d.ts +1 -1
- package/DesktopDatePicker/DesktopDatePicker.js +1 -1
- package/DesktopDateTimePicker/DesktopDateTimePicker.js +1 -1
- package/DesktopDateTimePicker/DesktopDateTimePickerLayout.js +1 -1
- package/DigitalClock/DigitalClock.js +39 -0
- package/MobileDatePicker/MobileDatePicker.js +1 -1
- package/MobileDateTimePicker/MobileDateTimePicker.js +1 -1
- package/MultiSectionDigitalClock/MultiSectionDigitalClockSection.js +38 -1
- package/PickersCalendarHeader/PickersCalendarHeader.js +1 -1
- package/PickersLayout/PickersLayout.d.ts +2 -2
- package/PickersLayout/PickersLayout.js +1 -1
- package/PickersSectionList/PickersSectionList.d.ts +4 -4
- package/PickersTextField/PickersInputBase/PickersInputBase.d.ts +2 -2
- package/StaticDatePicker/StaticDatePicker.js +1 -1
- package/StaticDateTimePicker/StaticDateTimePicker.js +1 -1
- package/TimeClock/Clock.js +9 -1
- package/TimeClock/ClockNumber.js +1 -1
- package/TimeClock/ClockPointer.js +1 -1
- package/TimeField/TimeField.types.d.ts +2 -7
- package/TimeField/index.d.ts +1 -1
- package/TimeField/useTimeField.d.ts +1 -1
- package/TimePicker/TimePicker.types.d.ts +9 -1
- package/TimePicker/index.d.ts +1 -1
- package/YearCalendar/YearCalendar.js +1 -1
- package/hooks/index.d.ts +2 -0
- package/hooks/index.js +3 -1
- package/hooks/useParsedFormat.d.ts +15 -0
- package/hooks/useParsedFormat.js +43 -0
- package/hooks/usePickersContext.d.ts +4 -0
- package/hooks/usePickersContext.js +15 -0
- package/index.js +1 -1
- package/internals/components/PickerViewRoot/PickerViewRoot.d.ts +1 -1
- package/internals/components/PickersProvider.d.ts +34 -0
- package/internals/components/PickersProvider.js +26 -0
- package/internals/components/PickersToolbarButton.js +1 -1
- package/internals/components/PickersToolbarText.js +1 -1
- package/internals/hooks/useDesktopPicker/useDesktopPicker.js +7 -4
- package/internals/hooks/useField/buildSectionsFromFormat.d.ts +1 -2
- package/internals/hooks/useField/buildSectionsFromFormat.js +4 -5
- package/internals/hooks/useField/useField.utils.d.ts +3 -3
- package/internals/hooks/useField/useField.utils.js +13 -13
- package/internals/hooks/useField/useFieldCharacterEditing.js +2 -2
- package/internals/hooks/useField/useFieldState.js +3 -5
- package/internals/hooks/useMobilePicker/useMobilePicker.js +7 -4
- package/internals/hooks/usePicker/usePicker.js +3 -1
- package/internals/hooks/usePicker/usePickerValue.js +7 -2
- package/internals/hooks/usePicker/usePickerValue.types.d.ts +2 -0
- package/internals/index.d.ts +1 -0
- package/internals/index.js +1 -0
- package/internals/utils/utils.d.ts +7 -0
- package/internals/utils/utils.js +11 -0
- package/locales/bgBG.d.ts +80 -0
- package/locales/bgBG.js +73 -0
- package/locales/csCZ.js +16 -20
- package/locales/hrHR.d.ts +80 -0
- package/locales/hrHR.js +90 -0
- package/locales/index.d.ts +3 -0
- package/locales/index.js +3 -0
- package/locales/ptBR.js +3 -4
- package/locales/ptPT.d.ts +80 -0
- package/locales/ptPT.js +73 -0
- package/models/pickers.d.ts +1 -1
- package/modern/AdapterDateFnsBase/AdapterDateFnsBase.js +1 -0
- package/modern/AdapterMoment/AdapterMoment.js +1 -0
- package/modern/DateCalendar/DateCalendar.js +1 -1
- package/modern/DatePicker/DatePicker.js +1 -1
- package/modern/DateTimePicker/DateTimePicker.js +1 -1
- package/modern/DesktopDatePicker/DesktopDatePicker.js +1 -1
- package/modern/DesktopDateTimePicker/DesktopDateTimePicker.js +1 -1
- package/modern/DesktopDateTimePicker/DesktopDateTimePickerLayout.js +1 -1
- package/modern/DigitalClock/DigitalClock.js +39 -0
- package/modern/MobileDatePicker/MobileDatePicker.js +1 -1
- package/modern/MobileDateTimePicker/MobileDateTimePicker.js +1 -1
- package/modern/MultiSectionDigitalClock/MultiSectionDigitalClockSection.js +38 -1
- package/modern/PickersCalendarHeader/PickersCalendarHeader.js +1 -1
- package/modern/PickersLayout/PickersLayout.js +1 -1
- package/modern/StaticDatePicker/StaticDatePicker.js +1 -1
- package/modern/StaticDateTimePicker/StaticDateTimePicker.js +1 -1
- package/modern/TimeClock/Clock.js +9 -1
- package/modern/TimeClock/ClockNumber.js +1 -1
- package/modern/TimeClock/ClockPointer.js +1 -1
- package/modern/YearCalendar/YearCalendar.js +1 -1
- package/modern/hooks/index.js +3 -1
- package/modern/hooks/useParsedFormat.js +43 -0
- package/modern/hooks/usePickersContext.js +15 -0
- package/modern/index.js +1 -1
- package/modern/internals/components/PickersProvider.js +26 -0
- package/modern/internals/components/PickersToolbarButton.js +1 -1
- package/modern/internals/components/PickersToolbarText.js +1 -1
- package/modern/internals/hooks/useDesktopPicker/useDesktopPicker.js +7 -4
- package/modern/internals/hooks/useField/buildSectionsFromFormat.js +4 -5
- package/modern/internals/hooks/useField/useField.utils.js +13 -13
- package/modern/internals/hooks/useField/useFieldCharacterEditing.js +2 -2
- package/modern/internals/hooks/useField/useFieldState.js +3 -5
- package/modern/internals/hooks/useMobilePicker/useMobilePicker.js +7 -4
- package/modern/internals/hooks/usePicker/usePicker.js +3 -1
- package/modern/internals/hooks/usePicker/usePickerValue.js +7 -2
- package/modern/internals/index.js +1 -0
- package/modern/internals/utils/utils.js +11 -0
- package/modern/locales/bgBG.js +73 -0
- package/modern/locales/csCZ.js +16 -20
- package/modern/locales/hrHR.js +90 -0
- package/modern/locales/index.js +3 -0
- package/modern/locales/ptBR.js +3 -4
- package/modern/locales/ptPT.js +73 -0
- package/node/AdapterDateFnsBase/AdapterDateFnsBase.js +1 -0
- package/node/AdapterMoment/AdapterMoment.js +1 -0
- package/node/DateCalendar/DateCalendar.js +1 -1
- package/node/DatePicker/DatePicker.js +1 -1
- package/node/DateTimePicker/DateTimePicker.js +1 -1
- package/node/DesktopDatePicker/DesktopDatePicker.js +1 -1
- package/node/DesktopDateTimePicker/DesktopDateTimePicker.js +1 -1
- package/node/DesktopDateTimePicker/DesktopDateTimePickerLayout.js +1 -1
- package/node/DigitalClock/DigitalClock.js +39 -0
- package/node/MobileDatePicker/MobileDatePicker.js +1 -1
- package/node/MobileDateTimePicker/MobileDateTimePicker.js +1 -1
- package/node/MultiSectionDigitalClock/MultiSectionDigitalClockSection.js +38 -1
- package/node/PickersCalendarHeader/PickersCalendarHeader.js +1 -1
- package/node/PickersLayout/PickersLayout.js +1 -1
- package/node/StaticDatePicker/StaticDatePicker.js +1 -1
- package/node/StaticDateTimePicker/StaticDateTimePicker.js +1 -1
- package/node/TimeClock/Clock.js +9 -1
- package/node/TimeClock/ClockNumber.js +1 -1
- package/node/TimeClock/ClockPointer.js +1 -1
- package/node/YearCalendar/YearCalendar.js +1 -1
- package/node/hooks/index.js +15 -1
- package/node/hooks/useParsedFormat.js +50 -0
- package/node/hooks/usePickersContext.js +21 -0
- package/node/index.js +1 -1
- package/node/internals/components/PickersProvider.js +34 -0
- package/node/internals/components/PickersToolbarButton.js +1 -1
- package/node/internals/components/PickersToolbarText.js +1 -1
- package/node/internals/hooks/useDesktopPicker/useDesktopPicker.js +5 -3
- package/node/internals/hooks/useField/buildSectionsFromFormat.js +4 -5
- package/node/internals/hooks/useField/useField.utils.js +13 -13
- package/node/internals/hooks/useField/useFieldCharacterEditing.js +2 -2
- package/node/internals/hooks/useField/useFieldState.js +3 -5
- package/node/internals/hooks/useMobilePicker/useMobilePicker.js +5 -3
- package/node/internals/hooks/usePicker/usePicker.js +3 -1
- package/node/internals/hooks/usePicker/usePickerValue.js +7 -1
- package/node/internals/index.js +7 -0
- package/node/internals/utils/utils.js +13 -1
- package/node/locales/bgBG.js +79 -0
- package/node/locales/csCZ.js +16 -20
- package/node/locales/hrHR.js +96 -0
- package/node/locales/index.js +33 -0
- package/node/locales/ptBR.js +3 -4
- package/node/locales/ptPT.js +79 -0
- package/package.json +4 -4
package/node/locales/index.js
CHANGED
|
@@ -14,6 +14,17 @@ Object.keys(_beBY).forEach(function (key) {
|
|
|
14
14
|
}
|
|
15
15
|
});
|
|
16
16
|
});
|
|
17
|
+
var _bgBG = require("./bgBG");
|
|
18
|
+
Object.keys(_bgBG).forEach(function (key) {
|
|
19
|
+
if (key === "default" || key === "__esModule") return;
|
|
20
|
+
if (key in exports && exports[key] === _bgBG[key]) return;
|
|
21
|
+
Object.defineProperty(exports, key, {
|
|
22
|
+
enumerable: true,
|
|
23
|
+
get: function () {
|
|
24
|
+
return _bgBG[key];
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
});
|
|
17
28
|
var _caES = require("./caES");
|
|
18
29
|
Object.keys(_caES).forEach(function (key) {
|
|
19
30
|
if (key === "default" || key === "__esModule") return;
|
|
@@ -146,6 +157,17 @@ Object.keys(_heIL).forEach(function (key) {
|
|
|
146
157
|
}
|
|
147
158
|
});
|
|
148
159
|
});
|
|
160
|
+
var _hrHR = require("./hrHR");
|
|
161
|
+
Object.keys(_hrHR).forEach(function (key) {
|
|
162
|
+
if (key === "default" || key === "__esModule") return;
|
|
163
|
+
if (key in exports && exports[key] === _hrHR[key]) return;
|
|
164
|
+
Object.defineProperty(exports, key, {
|
|
165
|
+
enumerable: true,
|
|
166
|
+
get: function () {
|
|
167
|
+
return _hrHR[key];
|
|
168
|
+
}
|
|
169
|
+
});
|
|
170
|
+
});
|
|
149
171
|
var _huHU = require("./huHU");
|
|
150
172
|
Object.keys(_huHU).forEach(function (key) {
|
|
151
173
|
if (key === "default" || key === "__esModule") return;
|
|
@@ -278,6 +300,17 @@ Object.keys(_ptBR).forEach(function (key) {
|
|
|
278
300
|
}
|
|
279
301
|
});
|
|
280
302
|
});
|
|
303
|
+
var _ptPT = require("./ptPT");
|
|
304
|
+
Object.keys(_ptPT).forEach(function (key) {
|
|
305
|
+
if (key === "default" || key === "__esModule") return;
|
|
306
|
+
if (key in exports && exports[key] === _ptPT[key]) return;
|
|
307
|
+
Object.defineProperty(exports, key, {
|
|
308
|
+
enumerable: true,
|
|
309
|
+
get: function () {
|
|
310
|
+
return _ptPT[key];
|
|
311
|
+
}
|
|
312
|
+
});
|
|
313
|
+
});
|
|
281
314
|
var _roRO = require("./roRO");
|
|
282
315
|
Object.keys(_roRO).forEach(function (key) {
|
|
283
316
|
if (key === "default" || key === "__esModule") return;
|
package/node/locales/ptBR.js
CHANGED
|
@@ -16,8 +16,8 @@ const ptBRPickers = {
|
|
|
16
16
|
previousMonth: 'Mês anterior',
|
|
17
17
|
nextMonth: 'Próximo mês',
|
|
18
18
|
// View navigation
|
|
19
|
-
openPreviousView: 'Abrir
|
|
20
|
-
openNextView: 'Abrir seleção
|
|
19
|
+
openPreviousView: 'Abrir seleção anterior',
|
|
20
|
+
openNextView: 'Abrir próxima seleção',
|
|
21
21
|
calendarViewSwitchingButtonAriaLabel: view => view === 'year' ? 'Seleção de ano está aberta, alternando para seleção de calendário' : 'Seleção de calendários está aberta, alternando para seleção de ano',
|
|
22
22
|
// DateRange labels
|
|
23
23
|
start: 'Início',
|
|
@@ -51,8 +51,7 @@ const ptBRPickers = {
|
|
|
51
51
|
// Open picker labels
|
|
52
52
|
openDatePickerDialogue: (value, utils, formattedDate) => formattedDate || value !== null && utils.isValid(value) ? `Escolha uma data, data selecionada ${formattedDate ?? utils.format(value, 'fullDate')}` : 'Escolha uma data',
|
|
53
53
|
openTimePickerDialogue: (value, utils, formattedTime) => formattedTime || value !== null && utils.isValid(value) ? `Escolha uma hora, hora selecionada ${formattedTime ?? utils.format(value, 'fullTime')}` : 'Escolha uma hora',
|
|
54
|
-
|
|
55
|
-
|
|
54
|
+
fieldClearLabel: 'Limpar valor',
|
|
56
55
|
// Table labels
|
|
57
56
|
timeTableLabel: 'escolha uma hora',
|
|
58
57
|
dateTableLabel: 'escolha uma data',
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.ptPT = void 0;
|
|
7
|
+
var _getPickersLocalization = require("./utils/getPickersLocalization");
|
|
8
|
+
const timeViews = {
|
|
9
|
+
hours: 'horas',
|
|
10
|
+
minutes: 'minutos',
|
|
11
|
+
seconds: 'segundos',
|
|
12
|
+
meridiem: 'meridiano'
|
|
13
|
+
};
|
|
14
|
+
const ptPTPickers = {
|
|
15
|
+
// Calendar navigation
|
|
16
|
+
previousMonth: 'Mês anterior',
|
|
17
|
+
nextMonth: 'Próximo mês',
|
|
18
|
+
// View navigation
|
|
19
|
+
openPreviousView: 'Abrir seleção anterior',
|
|
20
|
+
openNextView: 'Abrir próxima seleção',
|
|
21
|
+
calendarViewSwitchingButtonAriaLabel: view => view === 'year' ? 'A seleção do ano está aberta, altere para a seleção do calendário' : 'A seleção do calendários está aberta, altere para a seleção do ano',
|
|
22
|
+
// DateRange labels
|
|
23
|
+
start: 'Início',
|
|
24
|
+
end: 'Fim',
|
|
25
|
+
startDate: 'Data de início',
|
|
26
|
+
startTime: 'Hora de início',
|
|
27
|
+
endDate: 'Data de fim',
|
|
28
|
+
endTime: 'Hora de fim',
|
|
29
|
+
// Action bar
|
|
30
|
+
cancelButtonLabel: 'Cancelar',
|
|
31
|
+
clearButtonLabel: 'Limpar',
|
|
32
|
+
okButtonLabel: 'OK',
|
|
33
|
+
todayButtonLabel: 'Hoje',
|
|
34
|
+
// Toolbar titles
|
|
35
|
+
datePickerToolbarTitle: 'Selecione a data',
|
|
36
|
+
dateTimePickerToolbarTitle: 'Selecione a data e a hora',
|
|
37
|
+
timePickerToolbarTitle: 'Selecione a hora',
|
|
38
|
+
dateRangePickerToolbarTitle: 'Selecione o intervalo de datas',
|
|
39
|
+
// Clock labels
|
|
40
|
+
clockLabelText: (view, time, utils, formattedTime) => `Selecione ${timeViews[view]}. ${!formattedTime && (time === null || !utils.isValid(time)) ? 'Hora não selecionada' : `Selecionado a hora ${formattedTime ?? utils.format(time, 'fullTime')}`}`,
|
|
41
|
+
hoursClockNumberText: hours => `${hours} horas`,
|
|
42
|
+
minutesClockNumberText: minutes => `${minutes} minutos`,
|
|
43
|
+
secondsClockNumberText: seconds => `${seconds} segundos`,
|
|
44
|
+
// Digital clock labels
|
|
45
|
+
selectViewText: view => `Selecione ${timeViews[view]}`,
|
|
46
|
+
// Calendar labels
|
|
47
|
+
calendarWeekNumberHeaderLabel: 'Número da semana',
|
|
48
|
+
calendarWeekNumberHeaderText: 'N.º',
|
|
49
|
+
calendarWeekNumberAriaLabelText: weekNumber => `Semana ${weekNumber}`,
|
|
50
|
+
calendarWeekNumberText: weekNumber => `${weekNumber}`,
|
|
51
|
+
// Open picker labels
|
|
52
|
+
openDatePickerDialogue: (value, utils, formattedDate) => formattedDate || value !== null && utils.isValid(value) ? `Escolha uma data, a data selecionada é ${formattedDate ?? utils.format(value, 'fullDate')}` : 'Escolha uma data',
|
|
53
|
+
openTimePickerDialogue: (value, utils, formattedTime) => formattedTime || value !== null && utils.isValid(value) ? `Escolha uma hora, a hora selecionada é ${formattedTime ?? utils.format(value, 'fullTime')}` : 'Escolha uma hora',
|
|
54
|
+
fieldClearLabel: 'Limpar valor',
|
|
55
|
+
// Table labels
|
|
56
|
+
timeTableLabel: 'escolha uma hora',
|
|
57
|
+
dateTableLabel: 'escolha uma data',
|
|
58
|
+
// Field section placeholders
|
|
59
|
+
fieldYearPlaceholder: params => 'A'.repeat(params.digitAmount),
|
|
60
|
+
fieldMonthPlaceholder: params => params.contentType === 'letter' ? 'MMMM' : 'MM',
|
|
61
|
+
fieldDayPlaceholder: () => 'DD',
|
|
62
|
+
fieldWeekDayPlaceholder: params => params.contentType === 'letter' ? 'SSSS' : 'SS',
|
|
63
|
+
fieldHoursPlaceholder: () => 'hh',
|
|
64
|
+
fieldMinutesPlaceholder: () => 'mm',
|
|
65
|
+
fieldSecondsPlaceholder: () => 'ss',
|
|
66
|
+
fieldMeridiemPlaceholder: () => 'aa',
|
|
67
|
+
// View names
|
|
68
|
+
year: 'Ano',
|
|
69
|
+
month: 'Mês',
|
|
70
|
+
day: 'Dia',
|
|
71
|
+
weekDay: 'Dia da Semana',
|
|
72
|
+
hours: 'Horas',
|
|
73
|
+
minutes: 'Minutos',
|
|
74
|
+
seconds: 'Segundos',
|
|
75
|
+
meridiem: 'Meridiano',
|
|
76
|
+
// Common
|
|
77
|
+
empty: 'Vazio'
|
|
78
|
+
};
|
|
79
|
+
const ptPT = exports.ptPT = (0, _getPickersLocalization.getPickersLocalization)(ptPTPickers);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mui/x-date-pickers",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.20.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,13 +35,13 @@
|
|
|
35
35
|
"directory": "packages/x-date-pickers"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@babel/runtime": "^7.25.
|
|
39
|
-
"@mui/utils": "^5.16.6",
|
|
38
|
+
"@babel/runtime": "^7.25.7",
|
|
39
|
+
"@mui/utils": "^5.16.6 || ^6.0.0",
|
|
40
40
|
"@types/react-transition-group": "^4.4.11",
|
|
41
41
|
"clsx": "^2.1.1",
|
|
42
42
|
"prop-types": "^15.8.1",
|
|
43
43
|
"react-transition-group": "^4.4.5",
|
|
44
|
-
"@mui/x-internals": "7.
|
|
44
|
+
"@mui/x-internals": "7.20.0"
|
|
45
45
|
},
|
|
46
46
|
"peerDependencies": {
|
|
47
47
|
"@emotion/react": "^11.9.0",
|