@mui/x-date-pickers 6.0.1 → 6.0.3
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/index.js +2 -0
- package/AdapterDateFnsJalali/index.js +1 -0
- package/AdapterDayjs/index.js +6 -0
- package/AdapterLuxon/index.js +1 -0
- package/AdapterMoment/index.js +6 -0
- package/AdapterMomentHijri/index.d.ts +1 -1
- package/AdapterMomentHijri/index.js +5 -0
- package/AdapterMomentJalaali/index.js +5 -0
- package/CHANGELOG.md +116 -10
- package/DateField/DateField.js +4 -0
- package/DateField/DateField.types.d.ts +2 -2
- package/DateField/useDateField.js +5 -3
- package/DateTimeField/DateTimeField.js +4 -0
- package/DateTimeField/DateTimeField.types.d.ts +2 -2
- package/DateTimeField/useDateTimeField.js +5 -3
- package/PickersDay/PickersDay.js +4 -4
- package/TimeField/TimeField.js +4 -0
- package/TimeField/TimeField.types.d.ts +2 -2
- package/TimeField/useTimeField.js +5 -3
- package/index.d.ts +1 -6
- package/index.js +4 -2
- package/internals/components/PickersArrowSwitcher/PickersArrowSwitcher.js +8 -2
- package/internals/components/PickersModalDialog.d.ts +2 -2
- package/internals/components/PickersPopper.d.ts +1 -1
- package/internals/hooks/useDesktopPicker/useDesktopPicker.types.d.ts +5 -4
- package/internals/hooks/useField/index.d.ts +2 -2
- package/internals/hooks/useField/index.js +1 -1
- package/internals/hooks/useField/useField.d.ts +1 -1
- package/internals/hooks/useField/useField.js +62 -27
- package/internals/hooks/useField/useField.types.d.ts +37 -20
- package/internals/hooks/useField/useField.utils.d.ts +3 -3
- package/internals/hooks/useField/useField.utils.js +63 -35
- package/internals/hooks/useField/useFieldCharacterEditing.js +4 -9
- package/internals/hooks/useField/useFieldState.d.ts +1 -2
- package/internals/hooks/useField/useFieldState.js +44 -43
- package/internals/hooks/useMobilePicker/useMobilePicker.types.d.ts +5 -4
- package/internals/hooks/usePicker/usePicker.d.ts +2 -1
- package/internals/hooks/usePicker/usePicker.types.d.ts +4 -3
- package/internals/hooks/usePicker/usePickerValue.d.ts +8 -8
- package/internals/hooks/usePicker/usePickerValue.js +7 -11
- package/internals/hooks/useStaticPicker/useStaticPicker.types.d.ts +2 -1
- package/internals/index.d.ts +2 -2
- package/internals/index.js +2 -2
- package/internals/models/fields.d.ts +3 -3
- package/internals/utils/date-utils.d.ts +1 -0
- package/internals/utils/date-utils.js +6 -0
- package/internals/utils/valueManagers.js +15 -12
- package/legacy/AdapterDateFns/index.js +2 -0
- package/legacy/AdapterDateFnsJalali/index.js +1 -0
- package/legacy/AdapterDayjs/index.js +6 -0
- package/legacy/AdapterLuxon/index.js +1 -0
- package/legacy/AdapterMoment/index.js +6 -0
- package/legacy/AdapterMomentHijri/index.js +5 -0
- package/legacy/AdapterMomentJalaali/index.js +5 -0
- package/legacy/DateField/DateField.js +4 -0
- package/legacy/DateField/useDateField.js +4 -2
- package/legacy/DateTimeField/DateTimeField.js +4 -0
- package/legacy/DateTimeField/useDateTimeField.js +4 -2
- package/legacy/PickersDay/PickersDay.js +4 -4
- package/legacy/TimeField/TimeField.js +4 -0
- package/legacy/TimeField/useTimeField.js +4 -2
- package/legacy/index.js +4 -2
- package/legacy/internals/components/PickersArrowSwitcher/PickersArrowSwitcher.js +8 -2
- package/legacy/internals/hooks/useField/index.js +1 -1
- package/legacy/internals/hooks/useField/useField.js +86 -40
- package/legacy/internals/hooks/useField/useField.utils.js +64 -36
- package/legacy/internals/hooks/useField/useFieldCharacterEditing.js +4 -9
- package/legacy/internals/hooks/useField/useFieldState.js +46 -47
- package/legacy/internals/hooks/usePicker/usePickerValue.js +9 -13
- package/legacy/internals/index.js +2 -2
- package/legacy/internals/utils/date-utils.js +6 -0
- package/legacy/internals/utils/valueManagers.js +7 -8
- package/legacy/locales/deDE.js +8 -5
- package/legacy/locales/faIR.js +33 -16
- package/legacy/locales/frFR.js +30 -15
- package/legacy/locales/heIL.js +71 -0
- package/legacy/locales/index.js +1 -0
- package/legacy/locales/nlNL.js +12 -10
- package/legacy/locales/plPL.js +12 -10
- package/legacy/models/index.js +1 -0
- package/legacy/tests/describeValue/testPickerOpenCloseLifeCycle.js +19 -1
- package/locales/deDE.js +4 -5
- package/locales/faIR.js +13 -16
- package/locales/frFR.js +12 -15
- package/locales/heIL.d.ts +51 -0
- package/locales/heIL.js +57 -0
- package/locales/index.d.ts +1 -0
- package/locales/index.js +1 -0
- package/locales/nlNL.js +8 -10
- package/locales/plPL.js +8 -10
- package/models/index.d.ts +6 -0
- package/models/index.js +1 -0
- package/models/package.json +6 -0
- package/modern/AdapterDateFns/index.js +2 -0
- package/modern/AdapterDateFnsJalali/index.js +1 -0
- package/modern/AdapterDayjs/index.js +6 -0
- package/modern/AdapterLuxon/index.js +1 -0
- package/modern/AdapterMoment/index.js +6 -0
- package/modern/AdapterMomentHijri/index.js +5 -0
- package/modern/AdapterMomentJalaali/index.js +5 -0
- package/modern/DateField/DateField.js +4 -0
- package/modern/DateField/useDateField.js +5 -3
- package/modern/DateTimeField/DateTimeField.js +4 -0
- package/modern/DateTimeField/useDateTimeField.js +5 -3
- package/modern/PickersDay/PickersDay.js +4 -4
- package/modern/TimeField/TimeField.js +4 -0
- package/modern/TimeField/useTimeField.js +5 -3
- package/modern/index.js +4 -2
- package/modern/internals/components/PickersArrowSwitcher/PickersArrowSwitcher.js +8 -2
- package/modern/internals/hooks/useField/index.js +1 -1
- package/modern/internals/hooks/useField/useField.js +61 -27
- package/modern/internals/hooks/useField/useField.utils.js +63 -35
- package/modern/internals/hooks/useField/useFieldCharacterEditing.js +4 -9
- package/modern/internals/hooks/useField/useFieldState.js +44 -43
- package/modern/internals/hooks/usePicker/usePickerValue.js +7 -11
- package/modern/internals/index.js +2 -2
- package/modern/internals/utils/date-utils.js +6 -0
- package/modern/internals/utils/valueManagers.js +15 -12
- package/modern/locales/deDE.js +4 -5
- package/modern/locales/faIR.js +13 -16
- package/modern/locales/frFR.js +12 -15
- package/modern/locales/heIL.js +57 -0
- package/modern/locales/index.js +1 -0
- package/modern/locales/nlNL.js +8 -10
- package/modern/locales/plPL.js +8 -10
- package/modern/models/index.js +1 -0
- package/modern/tests/describeValue/testPickerOpenCloseLifeCycle.js +19 -1
- package/node/AdapterDateFns/index.js +2 -0
- package/node/AdapterDateFnsJalali/index.js +1 -0
- package/node/AdapterDayjs/index.js +6 -0
- package/node/AdapterLuxon/index.js +1 -0
- package/node/AdapterMoment/index.js +6 -0
- package/node/AdapterMomentHijri/index.js +5 -0
- package/node/AdapterMomentJalaali/index.js +5 -0
- package/node/DateField/DateField.js +4 -0
- package/node/DateField/useDateField.js +5 -3
- package/node/DateTimeField/DateTimeField.js +4 -0
- package/node/DateTimeField/useDateTimeField.js +5 -3
- package/node/PickersDay/PickersDay.js +4 -4
- package/node/TimeField/TimeField.js +4 -0
- package/node/TimeField/useTimeField.js +5 -3
- package/node/index.js +14 -2
- package/node/internals/components/PickersArrowSwitcher/PickersArrowSwitcher.js +8 -2
- package/node/internals/hooks/useField/index.js +0 -6
- package/node/internals/hooks/useField/useField.js +60 -26
- package/node/internals/hooks/useField/useField.utils.js +66 -38
- package/node/internals/hooks/useField/useFieldCharacterEditing.js +3 -8
- package/node/internals/hooks/useField/useFieldState.js +44 -43
- package/node/internals/hooks/usePicker/usePickerValue.js +7 -11
- package/node/internals/index.js +6 -6
- package/node/internals/utils/date-utils.js +9 -2
- package/node/internals/utils/valueManagers.js +13 -10
- package/node/locales/deDE.js +4 -5
- package/node/locales/faIR.js +13 -16
- package/node/locales/frFR.js +12 -15
- package/node/locales/heIL.js +64 -0
- package/node/locales/index.js +11 -0
- package/node/locales/nlNL.js +8 -10
- package/node/locales/plPL.js +8 -10
- package/node/models/index.js +5 -0
- package/node/tests/describeValue/testPickerOpenCloseLifeCycle.js +18 -0
- package/package.json +3 -3
- package/tests/describeValue/testPickerOpenCloseLifeCycle.js +19 -1
package/AdapterDateFns/index.js
CHANGED
|
@@ -31,6 +31,7 @@ const formatTokenMap = {
|
|
|
31
31
|
// Day of the month
|
|
32
32
|
d: 'day',
|
|
33
33
|
dd: 'day',
|
|
34
|
+
do: 'day',
|
|
34
35
|
// Day of the week
|
|
35
36
|
E: {
|
|
36
37
|
sectionType: 'weekDay',
|
|
@@ -135,6 +136,7 @@ export class AdapterDateFns extends BaseAdapterDateFns {
|
|
|
135
136
|
return token;
|
|
136
137
|
}).join('');
|
|
137
138
|
};
|
|
139
|
+
// Redefined here just to show how it can be written using expandFormat
|
|
138
140
|
this.getFormatHelperText = format => {
|
|
139
141
|
return this.expandFormat(format).replace(/(aaa|aa|a)/g, '(a|p)m').toLocaleLowerCase();
|
|
140
142
|
};
|
|
@@ -68,6 +68,7 @@ export class AdapterDateFnsJalali extends BaseAdapterDateFnsJalali {
|
|
|
68
68
|
return token;
|
|
69
69
|
}).join('');
|
|
70
70
|
};
|
|
71
|
+
// Redefined here just to show how it can be written using expandFormat
|
|
71
72
|
this.getFormatHelperText = format => {
|
|
72
73
|
return this.expandFormat(format).replace(/(aaa|aa|a)/g, '(a|p)m').toLocaleLowerCase();
|
|
73
74
|
};
|
package/AdapterDayjs/index.js
CHANGED
|
@@ -22,6 +22,7 @@ const formatTokenMap = {
|
|
|
22
22
|
// Day of the month
|
|
23
23
|
D: 'day',
|
|
24
24
|
DD: 'day',
|
|
25
|
+
Do: 'day',
|
|
25
26
|
// Day of the week
|
|
26
27
|
d: 'weekDay',
|
|
27
28
|
dd: {
|
|
@@ -75,6 +76,10 @@ export class AdapterDayjs extends BaseAdapterDayjs {
|
|
|
75
76
|
/* istanbul ignore next */
|
|
76
77
|
return /A|a/.test(this.getLocaleFormats().LT || '');
|
|
77
78
|
};
|
|
79
|
+
/**
|
|
80
|
+
* The current getFormatHelperText method uses an outdated format parsing logic.
|
|
81
|
+
* We should use this one in the future to support all localized formats.
|
|
82
|
+
*/
|
|
78
83
|
this.expandFormat = format => {
|
|
79
84
|
const localeFormats = this.getLocaleFormats();
|
|
80
85
|
|
|
@@ -85,6 +90,7 @@ export class AdapterDayjs extends BaseAdapterDayjs {
|
|
|
85
90
|
return a || localeFormats[b] || t(localeFormats[B]);
|
|
86
91
|
});
|
|
87
92
|
};
|
|
93
|
+
// Redefined here just to show how it can be written using expandFormat
|
|
88
94
|
this.getFormatHelperText = format => {
|
|
89
95
|
return this.expandFormat(format).replace(/a/gi, '(a|p)m').toLocaleLowerCase();
|
|
90
96
|
};
|
package/AdapterLuxon/index.js
CHANGED
|
@@ -91,6 +91,7 @@ export class AdapterLuxon extends BaseAdapterLuxon {
|
|
|
91
91
|
locale: this.locale
|
|
92
92
|
}).replace('yyyyy', 'yyyy');
|
|
93
93
|
};
|
|
94
|
+
// Redefined here just to show how it can be written using expandFormat
|
|
94
95
|
this.getFormatHelperText = format => {
|
|
95
96
|
return this.expandFormat(format).replace(/(a)/g, '(a|p)m').toLocaleLowerCase();
|
|
96
97
|
};
|
package/AdapterMoment/index.js
CHANGED
|
@@ -21,6 +21,7 @@ const formatTokenMap = {
|
|
|
21
21
|
// Day of the month
|
|
22
22
|
D: 'day',
|
|
23
23
|
DD: 'day',
|
|
24
|
+
Do: 'day',
|
|
24
25
|
// Day of the week
|
|
25
26
|
E: 'weekDay',
|
|
26
27
|
e: 'weekDay',
|
|
@@ -63,6 +64,10 @@ export class AdapterMoment extends BaseAdapterMoment {
|
|
|
63
64
|
start: '[',
|
|
64
65
|
end: ']'
|
|
65
66
|
};
|
|
67
|
+
/**
|
|
68
|
+
* The current getFormatHelperText method uses an outdated format parsing logic.
|
|
69
|
+
* We should use this one in the future to support all localized formats.
|
|
70
|
+
*/
|
|
66
71
|
this.expandFormat = format => {
|
|
67
72
|
// @see https://github.com/moment/moment/blob/develop/src/lib/format/format.js#L6
|
|
68
73
|
const localFormattingTokens = /(\[[^[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})|./g;
|
|
@@ -77,6 +82,7 @@ export class AdapterMoment extends BaseAdapterMoment {
|
|
|
77
82
|
this.getCurrentLocaleCode = () => {
|
|
78
83
|
return this.locale || defaultMoment.locale();
|
|
79
84
|
};
|
|
85
|
+
// Redefined here just to show how it can be written using expandFormat
|
|
80
86
|
this.getFormatHelperText = format => {
|
|
81
87
|
return this.expandFormat(format).replace(/a/gi, '(a|p)m').toLocaleLowerCase();
|
|
82
88
|
};
|
|
@@ -14,5 +14,5 @@ export declare class AdapterMomentHijri extends BaseAdapterMomentHijri implement
|
|
|
14
14
|
*/
|
|
15
15
|
expandFormat: (format: string) => string;
|
|
16
16
|
getFormatHelperText: (format: string) => string;
|
|
17
|
-
getWeekNumber: (date: defaultMoment.Moment) =>
|
|
17
|
+
getWeekNumber: (date: defaultMoment.Moment) => number;
|
|
18
18
|
}
|
|
@@ -48,6 +48,10 @@ export class AdapterMomentHijri extends BaseAdapterMomentHijri {
|
|
|
48
48
|
start: '[',
|
|
49
49
|
end: ']'
|
|
50
50
|
};
|
|
51
|
+
/**
|
|
52
|
+
* The current getFormatHelperText method uses an outdated format parsing logic.
|
|
53
|
+
* We should use this one in the future to support all localized formats.
|
|
54
|
+
*/
|
|
51
55
|
this.expandFormat = format => {
|
|
52
56
|
// @see https://github.com/moment/moment/blob/develop/src/lib/format/format.js#L6
|
|
53
57
|
const localFormattingTokens = /(\[[^[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})|./g;
|
|
@@ -59,6 +63,7 @@ export class AdapterMomentHijri extends BaseAdapterMomentHijri {
|
|
|
59
63
|
return token;
|
|
60
64
|
}).join('').replace('dd', 'iDD'); // Fix for https://github.com/dmtrKovalenko/date-io/pull/632
|
|
61
65
|
};
|
|
66
|
+
// Redefined here just to show how it can be written using expandFormat
|
|
62
67
|
this.getFormatHelperText = format => {
|
|
63
68
|
return this.expandFormat(format).replace(/a/gi, '(a|p)m').replace('iY', 'Y').replace('iM', 'M').replace('iD', 'D').toLocaleLowerCase();
|
|
64
69
|
};
|
|
@@ -45,6 +45,10 @@ export class AdapterMomentJalaali extends BaseAdapterMomentJalaali {
|
|
|
45
45
|
start: '[',
|
|
46
46
|
end: ']'
|
|
47
47
|
};
|
|
48
|
+
/**
|
|
49
|
+
* The current getFormatHelperText method uses an outdated format parsing logic.
|
|
50
|
+
* We should use this one in the future to support all localized formats.
|
|
51
|
+
*/
|
|
48
52
|
this.expandFormat = format => {
|
|
49
53
|
// @see https://github.com/moment/moment/blob/develop/src/lib/format/format.js#L6
|
|
50
54
|
const localFormattingTokens = /(\[[^[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})|./g;
|
|
@@ -56,6 +60,7 @@ export class AdapterMomentJalaali extends BaseAdapterMomentJalaali {
|
|
|
56
60
|
return token;
|
|
57
61
|
}).join('').replace('dd', 'jDD'); // Fix for https://github.com/dmtrKovalenko/date-io/pull/632;
|
|
58
62
|
};
|
|
63
|
+
// Redefined here just to show how it can be written using expandFormat
|
|
59
64
|
this.getFormatHelperText = format => {
|
|
60
65
|
return this.expandFormat(format).replace(/a/gi, '(a|p)m').replace('jY', 'Y').replace('jM', 'M').replace('jD', 'D').toLocaleLowerCase();
|
|
61
66
|
};
|
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,113 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## 6.0.3
|
|
7
|
+
|
|
8
|
+
_Mar 23, 2023_
|
|
9
|
+
|
|
10
|
+
We'd like to offer a big thanks to the 11 contributors who made this release possible. Here are some highlights ✨:
|
|
11
|
+
|
|
12
|
+
- 🌍 Improve Bulgarian (bg-BG), Persian (fa-IR), Polish (pl-PL), and Dutch (nl-NL) locales
|
|
13
|
+
- 🐞 Bugfixes
|
|
14
|
+
- 📚 Documentation improvements
|
|
15
|
+
|
|
16
|
+
### `@mui/x-data-grid@v6.0.3` / `@mui/x-data-grid-pro@v6.0.3` / `@mui/x-data-grid-premium@v6.0.3`
|
|
17
|
+
|
|
18
|
+
#### Changes
|
|
19
|
+
|
|
20
|
+
- [DataGrid] Fix overflow calculation issue in column group headers (#8246) @MBilalShafi
|
|
21
|
+
- [DataGridPro] Fix column reorder glitches (#8335) @cherniavskii
|
|
22
|
+
- [l10n] Improve Bulgarian (bg-BG) locale (#8315) @todevmilen
|
|
23
|
+
- [l10n] Improve Persian (fa-IR) locale (#8268) @fakhamatia
|
|
24
|
+
- [l10n] improve Dutch (nl-NL) locale (#8317) @developenguin
|
|
25
|
+
|
|
26
|
+
### `@mui/x-date-pickers@v6.0.3` / `@mui/x-date-pickers-pro@v6.0.3`
|
|
27
|
+
|
|
28
|
+
#### Changes
|
|
29
|
+
|
|
30
|
+
- [fields] Allow to reset the value from the outside (#8287) @flaviendelangle
|
|
31
|
+
- [fields] Cleanup section order generation (#8290) @flaviendelangle
|
|
32
|
+
- [fields] Fix Safari input selection resetting regression (#8295) @LukasTy
|
|
33
|
+
- [fields] Fix editing when all sections are selected (#8330) @flaviendelangle
|
|
34
|
+
- [fields] Fix iOS browser scroll jumping when entering data (#8328) @LukasTy
|
|
35
|
+
- [fields] New prop `unstableFieldRef` to imperatively interact with the selected sections (#8235) @flaviendelangle
|
|
36
|
+
- [pickers] Align date calendar colors (#8318) @LukasTy
|
|
37
|
+
- [pickers] Support invalid dates from the field (#8298) @flaviendelangle
|
|
38
|
+
- [l10n] Improve Persian (fa-IR) locale (#8268) @fakhamatia
|
|
39
|
+
- [l10n] Improve Polish (pl-PL) locale (#8344) @drmats
|
|
40
|
+
- [l10n] improve Dutch (nl-NL) locale (#8317) @developenguin
|
|
41
|
+
|
|
42
|
+
### Docs
|
|
43
|
+
|
|
44
|
+
- [docs] Create examples of pickers with custom fields (#8034) @flaviendelangle
|
|
45
|
+
- [docs] Fix 301 redirections @oliviertassinari
|
|
46
|
+
- [docs] Fix link to React's docs @oliviertassinari
|
|
47
|
+
- [docs] Fix pro license links to point to the same page (#8303) @LukasTy
|
|
48
|
+
- [docs] Give an incentive to upgrade (#8269) @oliviertassinari
|
|
49
|
+
- [docs] Improve contrast on data grid navigation (#8239) @oliviertassinari
|
|
50
|
+
- [docs] Update shortcuts page to use slotProps (#8288) @dcorb
|
|
51
|
+
- [docs] Explain the `shouldDisableTime` migration in more depth (#8348) @LukasTy
|
|
52
|
+
|
|
53
|
+
### Core
|
|
54
|
+
|
|
55
|
+
- [core] Remove unused `visx` chart package (#8259) @LukasTy
|
|
56
|
+
- [core] Upgrade monorepo (#8331) @cherniavskii
|
|
57
|
+
- [charts] Project setup (#8308) @alexfauquette
|
|
58
|
+
- [test] Track visual regressions of column menu and filter/column panels (#8095) @cherniavskii
|
|
59
|
+
|
|
60
|
+
## 6.0.2
|
|
61
|
+
|
|
62
|
+
_Mar 16, 2023_
|
|
63
|
+
|
|
64
|
+
We'd like to offer a big thanks to the 10 contributors who made this release possible. Here are some highlights ✨:
|
|
65
|
+
|
|
66
|
+
- 🚀 Fire `onChange` when filling a partial date (#8082) @flaviendelangle
|
|
67
|
+
- 🎁 Support date format like `1st` (`do`) (#8188) @flaviendelangle
|
|
68
|
+
- 🌍 Add Hebrew (he-IL) locale (#8222) @ylarom
|
|
69
|
+
- 🌍 Improve Brazilian Portuguese (pt-BR), German (de-DE), and French (fr-FR) locales
|
|
70
|
+
- 📚 Documentation improvements
|
|
71
|
+
- 🐞 Bugfixes
|
|
72
|
+
|
|
73
|
+
### `@mui/x-data-grid@v6.0.2` / `@mui/x-data-grid-pro@v6.0.2` / `@mui/x-data-grid-premium@v6.0.2`
|
|
74
|
+
|
|
75
|
+
#### Changes
|
|
76
|
+
|
|
77
|
+
- [DataGrid] Fix <kbd>Space</kbd> triggering edit mode (#8180) @m4theushw
|
|
78
|
+
- [DataGrid] Remove warning when adding a custom column type (#8227) @m4theushw
|
|
79
|
+
- [l10n] Improve Brazilian Portuguese (pt-BR) locale (#8198) @JoaoSerafim3001
|
|
80
|
+
|
|
81
|
+
### `@mui/x-date-pickers@v6.0.2` / `@mui/x-date-pickers-pro@v6.0.2`
|
|
82
|
+
|
|
83
|
+
#### Changes
|
|
84
|
+
|
|
85
|
+
- [l10n] Add Hebrew (he-IL) locale (#8222) @ylarom
|
|
86
|
+
- [l10n] Improve German (de-DE) locale (#8204) @sebkasanzew
|
|
87
|
+
- [l10n] Improve French (fr-FR) locale (#8229) @marvinroger
|
|
88
|
+
- [DateRangePicker] Allow overriding `slotProps.textField` (#8201) @LukasTy
|
|
89
|
+
- [fields] Fire `onChange` when filling a partial date (#8082) @flaviendelangle
|
|
90
|
+
- [fields] Fix editing in shadow dom (#8254) @flaviendelangle
|
|
91
|
+
- [fields] Remove the duplicated warning about invalid adapter (#8187) @flaviendelangle
|
|
92
|
+
- [fields] Support date format like `1st` (`do`) (#8188) @flaviendelangle
|
|
93
|
+
- [pickers] Fix to avoid selecting sections on mobile picker field (#8228) @LukasTy
|
|
94
|
+
- [pickers] Inherit previous and next icons size from their parent button (#8218) @flaviendelangle
|
|
95
|
+
|
|
96
|
+
### Docs
|
|
97
|
+
|
|
98
|
+
- [docs] Add a warning in the migration guide for people re-enabling the clock on desktop (#8184) @flaviendelangle
|
|
99
|
+
- [docs] Add a warning for `luxon` macro tokens (#8245) @flaviendelangle
|
|
100
|
+
- [docs] Complete pickers customization pages (#8066) @alexfauquette
|
|
101
|
+
- [docs] Fix 301 redirection @oliviertassinari
|
|
102
|
+
- [docs] Fix 404 links to customization Material UI APIs (#8200) @oliviertassinari
|
|
103
|
+
- [docs] Fix `moment-hijri` demo (#8255) @LukasTy
|
|
104
|
+
- [docs] Improve migration diff (#8240) @oliviertassinari
|
|
105
|
+
- [docs] Change **What's new** page url to point to announcement blog post (#8186) @joserodolfofreitas
|
|
106
|
+
- [docs] Resolve 301 in changelog @oliviertassinari
|
|
107
|
+
|
|
108
|
+
### Core
|
|
109
|
+
|
|
110
|
+
- [core] Regen api docs (#8220) @flaviendelangle
|
|
111
|
+
- [core] Remove duplicated `/` (#8223) @alexfauquette
|
|
112
|
+
|
|
6
113
|
## 6.0.1
|
|
7
114
|
|
|
8
115
|
_Mar 9, 2023_
|
|
@@ -45,11 +152,9 @@ We'd like to offer a big thanks to the 8 contributors who made this release poss
|
|
|
45
152
|
|
|
46
153
|
_Mar 3, 2023_
|
|
47
154
|
|
|
48
|
-
We're
|
|
155
|
+
We're excited to [announce the first v6 stable release](https://mui.com/blog/mui-x-v6/)! 🎉🚀
|
|
49
156
|
|
|
50
157
|
This is now the officially supported major version, where we'll keep rolling out new features, bug fixes, and improvements.
|
|
51
|
-
Head over to the [what's new](https://mui.com/x/whats-new/) page to check the highlighted new features.
|
|
52
|
-
|
|
53
158
|
Migration guides are available with a complete list of the breaking changes:
|
|
54
159
|
|
|
55
160
|
- [Data Grid](https://mui.com/x/migration/migration-data-grid-v5/)
|
|
@@ -66,6 +171,7 @@ We'd like to offer a big thanks to the 12 contributors who made this release pos
|
|
|
66
171
|
- experimentalFeatures={{ rowPinning: true }}
|
|
67
172
|
/>
|
|
68
173
|
```
|
|
174
|
+
|
|
69
175
|
- ⚡️ Improved grid performance by rows and cells memoization (#7846) @m4theushw
|
|
70
176
|
- ✨ Fields have a distinct visual state when empty (#8069) @LukasTy
|
|
71
177
|
- 🌍 Improve Czech (cs-CZ) locale (#8113) @BlastyCZ
|
|
@@ -503,14 +609,14 @@ We'd like to offer a big thanks to the 10 contributors who made this release pos
|
|
|
503
609
|
```
|
|
504
610
|
|
|
505
611
|
- The `error` and `onError` props were removed - the grid no longer catches errors during rendering.
|
|
506
|
-
To catch errors that happen during rendering use the [error boundary](https://
|
|
612
|
+
To catch errors that happen during rendering use the [error boundary](https://react.dev/reference/react/Component#catching-rendering-errors-with-an-error-boundary).
|
|
507
613
|
|
|
508
614
|
- The `components.ErrorOverlay` slot was removed.
|
|
509
615
|
|
|
510
616
|
- The `GridErrorOverlay` component was removed.
|
|
511
617
|
|
|
512
618
|
- The `componentError` event was removed.
|
|
513
|
-
Use the [error boundary](https://
|
|
619
|
+
Use the [error boundary](https://react.dev/reference/react/Component#catching-rendering-errors-with-an-error-boundary) to catch errors thrown during rendering.
|
|
514
620
|
|
|
515
621
|
- The `apiRef.current.showError` method was removed.
|
|
516
622
|
The UI for errors is no longer handled by the grid.
|
|
@@ -1025,7 +1131,7 @@ We'd like to offer a big thanks to the 6 contributors who made this release poss
|
|
|
1025
1131
|
<DataGridPremium unstable_cellSelection />
|
|
1026
1132
|
```
|
|
1027
1133
|
|
|
1028
|
-
See [the documentation](https://mui.com/x/react-data-grid/
|
|
1134
|
+
See [the documentation](https://mui.com/x/react-data-grid/cell-selection/) for more information
|
|
1029
1135
|
|
|
1030
1136
|
- 🌍 Support the Right To Left orientation on the fields components
|
|
1031
1137
|
- 📚 Documentation improvements
|
|
@@ -3082,7 +3188,7 @@ _Sep 2, 2022_
|
|
|
3082
3188
|
|
|
3083
3189
|
🎉 We are excited to finally introduce a stable release (v5.0.0) for the `@mui/x-date-pickers` and `@mui/x-date-pickers-pro` packages!
|
|
3084
3190
|
|
|
3085
|
-
If you are still using picker components from the `lab`, take a look at the [migration guide](https://mui.com/x/
|
|
3191
|
+
If you are still using picker components from the `lab`, take a look at the [migration guide](https://mui.com/x/migration/migration-pickers-lab/).
|
|
3086
3192
|
|
|
3087
3193
|
We'd like to offer a big thanks to the 9 contributors who made this release possible. Here are some highlights ✨:
|
|
3088
3194
|
|
|
@@ -4133,7 +4239,7 @@ We'd like to offer a big thanks to the 7 contributors who made this release poss
|
|
|
4133
4239
|
|
|
4134
4240
|
Date and time picker components have been moved to the MUI X repository.
|
|
4135
4241
|
They are now accessible in their own packages: `@mui/x-date-pickers` and `@mui/x-date-pickers-pro`.
|
|
4136
|
-
For more information, you can read the [blog article](https://mui.com/blog/lab-date-pickers-to-mui-x/) and the [migration guide](https://mui.com/x/
|
|
4242
|
+
For more information, you can read the [blog article](https://mui.com/blog/lab-date-pickers-to-mui-x/) and the [migration guide](https://mui.com/x/migration/migration-pickers-lab/).
|
|
4137
4243
|
|
|
4138
4244
|
- 📝 Add `onProcessRowUpdateError` prop to simplify error management in edit mode (#4267) @m4theushw
|
|
4139
4245
|
- ✨ Add generic typing to `GridColDef` and derived interfaces (#4064) @flaviendelangle
|
|
@@ -6781,7 +6887,7 @@ Big thanks to the 11 contributors who made this release possible. Here are some
|
|
|
6781
6887
|
- 💅 Add `columnHeader`, `row` and `cell` to the `classes` prop (#1660) @DanailH
|
|
6782
6888
|
- ✅ Add the `isRowSelectable` prop to disable selection on certain rows (#1659) @m4theushw
|
|
6783
6889
|
|
|
6784
|
-
See the documentation for [more details](https://mui.com/
|
|
6890
|
+
See the documentation for [more details](https://v4.mui.com/components/data-grid/selection/#disable-selection-on-certain-rows).
|
|
6785
6891
|
|
|
6786
6892
|
- ⚡️ Add new icon slot to be displayed when the column is unsorted (#1415) @m4theushw
|
|
6787
6893
|
- ⚙ Improve consistency of the API to prepare for the first beta release
|
|
@@ -7309,7 +7415,7 @@ Big thanks to the 4 contributors who made this release possible. Here are some h
|
|
|
7309
7415
|
- 📍 Add support for default locales (#983) @DanailH
|
|
7310
7416
|
We have built the infrastructure to support around 100 [default locales](https://mui.com/x/react-data-grid/localization/#supported-locales). If you have localized the data grid in your application. Please do consider contributing new translations back to Material UI by opening a pull request.
|
|
7311
7417
|
- 🎁 Add new `selectionModel` prop (#986) @dtassone
|
|
7312
|
-
The prop can be used to control the selected rows in the data grid. [See the docs](https://mui.com/
|
|
7418
|
+
The prop can be used to control the selected rows in the data grid. [See the docs](https://v4.mui.com/components/data-grid/selection/#controlled-selection).
|
|
7313
7419
|
- 💅 Add support for default props from theme (#1019) @DanailH
|
|
7314
7420
|
- 🙌 Fix scrollbar size on windows (#1061) @dtassone
|
|
7315
7421
|
- 🐛 Polish existing features, fix 9 issues.
|
package/DateField/DateField.js
CHANGED
|
@@ -269,6 +269,10 @@ process.env.NODE_ENV !== "production" ? DateField.propTypes = {
|
|
|
269
269
|
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
270
270
|
*/
|
|
271
271
|
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
272
|
+
/**
|
|
273
|
+
* The ref object used to imperatively interact with the field.
|
|
274
|
+
*/
|
|
275
|
+
unstableFieldRef: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
|
|
272
276
|
/**
|
|
273
277
|
* The selected value.
|
|
274
278
|
* Used when the component is controlled.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { SlotComponentProps } from '@mui/base/utils';
|
|
3
3
|
import TextField from '@mui/material/TextField';
|
|
4
|
-
import { UseFieldInternalProps } from '../internals/hooks/useField';
|
|
4
|
+
import { FieldSection, UseFieldInternalProps } from '../internals/hooks/useField';
|
|
5
5
|
import { DateValidationError } from '../internals/hooks/validation/useDateValidation';
|
|
6
6
|
import { DefaultizedProps, MakeOptional } from '../internals/models/helpers';
|
|
7
7
|
import { BaseDateValidationProps, DayValidationProps, MonthValidationProps, YearValidationProps } from '../internals/hooks/validation/models';
|
|
@@ -11,7 +11,7 @@ export interface UseDateFieldParams<TDate, TChildProps extends {}> {
|
|
|
11
11
|
props: UseDateFieldComponentProps<TDate, TChildProps>;
|
|
12
12
|
inputRef?: React.Ref<HTMLInputElement>;
|
|
13
13
|
}
|
|
14
|
-
export interface UseDateFieldProps<TDate> extends MakeOptional<UseFieldInternalProps<TDate | null, DateValidationError>, 'format'>, DayValidationProps<TDate>, MonthValidationProps<TDate>, YearValidationProps<TDate>, BaseDateValidationProps<TDate> {
|
|
14
|
+
export interface UseDateFieldProps<TDate> extends MakeOptional<UseFieldInternalProps<TDate | null, FieldSection, DateValidationError>, 'format'>, DayValidationProps<TDate>, MonthValidationProps<TDate>, YearValidationProps<TDate>, BaseDateValidationProps<TDate> {
|
|
15
15
|
}
|
|
16
16
|
export type UseDateFieldDefaultizedProps<TDate> = DefaultizedProps<UseDateFieldProps<TDate>, keyof BaseDateValidationProps<TDate> | 'format'>;
|
|
17
17
|
export type UseDateFieldComponentProps<TDate, TChildProps extends {}> = Omit<TChildProps, keyof UseDateFieldProps<TDate>> & UseDateFieldProps<TDate>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
2
2
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
|
-
const _excluded = ["value", "defaultValue", "format", "onChange", "readOnly", "onError", "shouldDisableDate", "shouldDisableMonth", "shouldDisableYear", "minDate", "maxDate", "disableFuture", "disablePast", "selectedSections", "onSelectedSectionsChange"];
|
|
3
|
+
const _excluded = ["value", "defaultValue", "format", "onChange", "readOnly", "onError", "shouldDisableDate", "shouldDisableMonth", "shouldDisableYear", "minDate", "maxDate", "disableFuture", "disablePast", "selectedSections", "onSelectedSectionsChange", "unstableFieldRef"];
|
|
4
4
|
import { singleItemFieldValueManager, singleItemValueManager } from '../internals/utils/valueManagers';
|
|
5
5
|
import { useField } from '../internals/hooks/useField';
|
|
6
6
|
import { validateDate } from '../internals/hooks/validation/useDateValidation';
|
|
@@ -38,7 +38,8 @@ export const useDateField = ({
|
|
|
38
38
|
disableFuture,
|
|
39
39
|
disablePast,
|
|
40
40
|
selectedSections,
|
|
41
|
-
onSelectedSectionsChange
|
|
41
|
+
onSelectedSectionsChange,
|
|
42
|
+
unstableFieldRef
|
|
42
43
|
} = _useDefaultizedDateFi,
|
|
43
44
|
other = _objectWithoutPropertiesLoose(_useDefaultizedDateFi, _excluded);
|
|
44
45
|
return useField({
|
|
@@ -59,7 +60,8 @@ export const useDateField = ({
|
|
|
59
60
|
disableFuture,
|
|
60
61
|
disablePast,
|
|
61
62
|
selectedSections,
|
|
62
|
-
onSelectedSectionsChange
|
|
63
|
+
onSelectedSectionsChange,
|
|
64
|
+
unstableFieldRef
|
|
63
65
|
},
|
|
64
66
|
valueManager: singleItemValueManager,
|
|
65
67
|
fieldValueManager: singleItemFieldValueManager,
|
|
@@ -317,6 +317,10 @@ process.env.NODE_ENV !== "production" ? DateTimeField.propTypes = {
|
|
|
317
317
|
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
318
318
|
*/
|
|
319
319
|
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
320
|
+
/**
|
|
321
|
+
* The ref object used to imperatively interact with the field.
|
|
322
|
+
*/
|
|
323
|
+
unstableFieldRef: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
|
|
320
324
|
/**
|
|
321
325
|
* The selected value.
|
|
322
326
|
* Used when the component is controlled.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { SlotComponentProps } from '@mui/base/utils';
|
|
3
3
|
import TextField from '@mui/material/TextField';
|
|
4
|
-
import { UseFieldInternalProps } from '../internals/hooks/useField';
|
|
4
|
+
import { FieldSection, UseFieldInternalProps } from '../internals/hooks/useField';
|
|
5
5
|
import { DateTimeValidationError } from '../internals/hooks/validation/useDateTimeValidation';
|
|
6
6
|
import { DefaultizedProps, MakeOptional } from '../internals/models/helpers';
|
|
7
7
|
import { BaseDateValidationProps, BaseTimeValidationProps, DayValidationProps, MonthValidationProps, TimeValidationProps, YearValidationProps } from '../internals/hooks/validation/models';
|
|
@@ -10,7 +10,7 @@ export interface UseDateTimeFieldParams<TDate, TChildProps extends {}> {
|
|
|
10
10
|
props: UseDateTimeFieldComponentProps<TDate, TChildProps>;
|
|
11
11
|
inputRef?: React.Ref<HTMLInputElement>;
|
|
12
12
|
}
|
|
13
|
-
export interface UseDateTimeFieldProps<TDate> extends MakeOptional<UseFieldInternalProps<TDate | null, DateTimeValidationError>, 'format'>, DayValidationProps<TDate>, MonthValidationProps<TDate>, YearValidationProps<TDate>, BaseDateValidationProps<TDate>, TimeValidationProps<TDate>, BaseTimeValidationProps {
|
|
13
|
+
export interface UseDateTimeFieldProps<TDate> extends MakeOptional<UseFieldInternalProps<TDate | null, FieldSection, DateTimeValidationError>, 'format'>, DayValidationProps<TDate>, MonthValidationProps<TDate>, YearValidationProps<TDate>, BaseDateValidationProps<TDate>, TimeValidationProps<TDate>, BaseTimeValidationProps {
|
|
14
14
|
/**
|
|
15
15
|
* 12h/24h view for hour selection clock.
|
|
16
16
|
* @default `utils.is12HourCycleInCurrentLocale()`
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
2
2
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
|
-
const _excluded = ["value", "defaultValue", "format", "onChange", "readOnly", "onError", "shouldDisableDate", "shouldDisableMonth", "shouldDisableYear", "minDate", "maxDate", "disableFuture", "disablePast", "minTime", "maxTime", "minDateTime", "maxDateTime", "minutesStep", "disableIgnoringDatePartForTimeValidation", "shouldDisableClock", "shouldDisableTime", "selectedSections", "onSelectedSectionsChange", "ampm"];
|
|
3
|
+
const _excluded = ["value", "defaultValue", "format", "onChange", "readOnly", "onError", "shouldDisableDate", "shouldDisableMonth", "shouldDisableYear", "minDate", "maxDate", "disableFuture", "disablePast", "minTime", "maxTime", "minDateTime", "maxDateTime", "minutesStep", "disableIgnoringDatePartForTimeValidation", "shouldDisableClock", "shouldDisableTime", "selectedSections", "onSelectedSectionsChange", "ampm", "unstableFieldRef"];
|
|
4
4
|
import { singleItemFieldValueManager, singleItemValueManager } from '../internals/utils/valueManagers';
|
|
5
5
|
import { useField } from '../internals/hooks/useField';
|
|
6
6
|
import { validateDateTime } from '../internals/hooks/validation/useDateTimeValidation';
|
|
@@ -50,7 +50,8 @@ export const useDateTimeField = ({
|
|
|
50
50
|
shouldDisableTime,
|
|
51
51
|
selectedSections,
|
|
52
52
|
onSelectedSectionsChange,
|
|
53
|
-
ampm
|
|
53
|
+
ampm,
|
|
54
|
+
unstableFieldRef
|
|
54
55
|
} = _useDefaultizedDateTi,
|
|
55
56
|
other = _objectWithoutPropertiesLoose(_useDefaultizedDateTi, _excluded);
|
|
56
57
|
return useField({
|
|
@@ -78,7 +79,8 @@ export const useDateTimeField = ({
|
|
|
78
79
|
disableIgnoringDatePartForTimeValidation,
|
|
79
80
|
selectedSections,
|
|
80
81
|
onSelectedSectionsChange,
|
|
81
|
-
ampm
|
|
82
|
+
ampm,
|
|
83
|
+
unstableFieldRef
|
|
82
84
|
},
|
|
83
85
|
valueManager: singleItemValueManager,
|
|
84
86
|
fieldValueManager: singleItemFieldValueManager,
|
package/PickersDay/PickersDay.js
CHANGED
|
@@ -36,16 +36,16 @@ const styleArg = ({
|
|
|
36
36
|
height: DAY_SIZE,
|
|
37
37
|
borderRadius: '50%',
|
|
38
38
|
padding: 0,
|
|
39
|
-
//
|
|
40
|
-
backgroundColor:
|
|
39
|
+
// explicitly setting to `transparent` to avoid potentially getting impacted by change from the overridden component
|
|
40
|
+
backgroundColor: 'transparent',
|
|
41
41
|
color: (theme.vars || theme).palette.text.primary,
|
|
42
42
|
'@media (pointer: fine)': {
|
|
43
43
|
'&:hover': {
|
|
44
|
-
backgroundColor: theme.vars ? `rgba(${theme.vars.palette.
|
|
44
|
+
backgroundColor: theme.vars ? `rgba(${theme.vars.palette.primary.mainChannel} / ${theme.vars.palette.action.hoverOpacity})` : alpha(theme.palette.primary.main, theme.palette.action.hoverOpacity)
|
|
45
45
|
}
|
|
46
46
|
},
|
|
47
47
|
'&:focus': {
|
|
48
|
-
backgroundColor: theme.vars ? `rgba(${theme.vars.palette.
|
|
48
|
+
backgroundColor: theme.vars ? `rgba(${theme.vars.palette.primary.mainChannel} / ${theme.vars.palette.action.focusOpacity})` : alpha(theme.palette.primary.main, theme.palette.action.focusOpacity),
|
|
49
49
|
[`&.${pickersDayClasses.selected}`]: {
|
|
50
50
|
willChange: 'background-color',
|
|
51
51
|
backgroundColor: (theme.vars || theme).palette.primary.dark
|
package/TimeField/TimeField.js
CHANGED
|
@@ -280,6 +280,10 @@ process.env.NODE_ENV !== "production" ? TimeField.propTypes = {
|
|
|
280
280
|
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
281
281
|
*/
|
|
282
282
|
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
283
|
+
/**
|
|
284
|
+
* The ref object used to imperatively interact with the field.
|
|
285
|
+
*/
|
|
286
|
+
unstableFieldRef: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
|
|
283
287
|
/**
|
|
284
288
|
* The selected value.
|
|
285
289
|
* Used when the component is controlled.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { SlotComponentProps } from '@mui/base/utils';
|
|
3
3
|
import TextField from '@mui/material/TextField';
|
|
4
|
-
import { UseFieldInternalProps } from '../internals/hooks/useField';
|
|
4
|
+
import { FieldSection, UseFieldInternalProps } from '../internals/hooks/useField';
|
|
5
5
|
import { TimeValidationError } from '../internals/hooks/validation/useTimeValidation';
|
|
6
6
|
import { DefaultizedProps, MakeOptional } from '../internals/models/helpers';
|
|
7
7
|
import { BaseTimeValidationProps, TimeValidationProps } from '../internals/hooks/validation/models';
|
|
@@ -10,7 +10,7 @@ export interface UseTimeFieldParams<TDate, TChildProps extends {}> {
|
|
|
10
10
|
props: UseTimeFieldComponentProps<TDate, TChildProps>;
|
|
11
11
|
inputRef?: React.Ref<HTMLInputElement>;
|
|
12
12
|
}
|
|
13
|
-
export interface UseTimeFieldProps<TDate> extends MakeOptional<UseFieldInternalProps<TDate | null, TimeValidationError>, 'format'>, TimeValidationProps<TDate>, BaseTimeValidationProps {
|
|
13
|
+
export interface UseTimeFieldProps<TDate> extends MakeOptional<UseFieldInternalProps<TDate | null, FieldSection, TimeValidationError>, 'format'>, TimeValidationProps<TDate>, BaseTimeValidationProps {
|
|
14
14
|
/**
|
|
15
15
|
* 12h/24h view for hour selection clock.
|
|
16
16
|
* @default `utils.is12HourCycleInCurrentLocale()`
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
2
2
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
|
-
const _excluded = ["value", "defaultValue", "format", "onChange", "readOnly", "onError", "disableFuture", "disablePast", "minTime", "maxTime", "minutesStep", "shouldDisableClock", "shouldDisableTime", "disableIgnoringDatePartForTimeValidation", "selectedSections", "onSelectedSectionsChange", "ampm"];
|
|
3
|
+
const _excluded = ["value", "defaultValue", "format", "onChange", "readOnly", "onError", "disableFuture", "disablePast", "minTime", "maxTime", "minutesStep", "shouldDisableClock", "shouldDisableTime", "disableIgnoringDatePartForTimeValidation", "selectedSections", "onSelectedSectionsChange", "ampm", "unstableFieldRef"];
|
|
4
4
|
import { singleItemFieldValueManager, singleItemValueManager } from '../internals/utils/valueManagers';
|
|
5
5
|
import { useField } from '../internals/hooks/useField';
|
|
6
6
|
import { validateTime } from '../internals/hooks/validation/useTimeValidation';
|
|
@@ -38,7 +38,8 @@ export const useTimeField = ({
|
|
|
38
38
|
disableIgnoringDatePartForTimeValidation,
|
|
39
39
|
selectedSections,
|
|
40
40
|
onSelectedSectionsChange,
|
|
41
|
-
ampm
|
|
41
|
+
ampm,
|
|
42
|
+
unstableFieldRef
|
|
42
43
|
} = _useDefaultizedTimeFi,
|
|
43
44
|
other = _objectWithoutPropertiesLoose(_useDefaultizedTimeFi, _excluded);
|
|
44
45
|
return useField({
|
|
@@ -61,7 +62,8 @@ export const useTimeField = ({
|
|
|
61
62
|
disableIgnoringDatePartForTimeValidation,
|
|
62
63
|
selectedSections,
|
|
63
64
|
onSelectedSectionsChange,
|
|
64
|
-
ampm
|
|
65
|
+
ampm,
|
|
66
|
+
unstableFieldRef
|
|
65
67
|
},
|
|
66
68
|
valueManager: singleItemValueManager,
|
|
67
69
|
fieldValueManager: singleItemFieldValueManager,
|
package/index.d.ts
CHANGED
|
@@ -5,8 +5,6 @@ export * from './locales';
|
|
|
5
5
|
export * from './DateField';
|
|
6
6
|
export * from './TimeField';
|
|
7
7
|
export * from './DateTimeField';
|
|
8
|
-
export type { FieldSection, FieldSelectedSections } from './internals/hooks/useField';
|
|
9
|
-
export type { BaseSingleInputFieldProps } from './internals/models/fields';
|
|
10
8
|
export * from './DateCalendar';
|
|
11
9
|
export * from './MonthCalendar';
|
|
12
10
|
export * from './YearCalendar';
|
|
@@ -28,8 +26,5 @@ export * from './timeViewRenderers';
|
|
|
28
26
|
export * from './PickersLayout';
|
|
29
27
|
export * from './PickersActionBar';
|
|
30
28
|
export * from './PickersShortcuts';
|
|
31
|
-
export type { FieldSectionType } from './internals/models/muiPickersAdapter';
|
|
32
|
-
export type { DateValidationError } from './internals/hooks/validation/useDateValidation';
|
|
33
|
-
export type { TimeValidationError } from './internals/hooks/validation/useTimeValidation';
|
|
34
|
-
export type { DateTimeValidationError } from './internals/hooks/validation/useDateTimeValidation';
|
|
35
29
|
export { DEFAULT_DESKTOP_MODE_MEDIA_QUERY } from './internals/utils/utils';
|
|
30
|
+
export * from './models';
|
package/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @mui/x-date-pickers v6.0.
|
|
2
|
+
* @mui/x-date-pickers v6.0.3
|
|
3
3
|
*
|
|
4
4
|
* @license MIT
|
|
5
5
|
* This source code is licensed under the MIT license found in the
|
|
@@ -14,6 +14,7 @@ export * from './locales';
|
|
|
14
14
|
export * from './DateField';
|
|
15
15
|
export * from './TimeField';
|
|
16
16
|
export * from './DateTimeField';
|
|
17
|
+
|
|
17
18
|
// Calendars
|
|
18
19
|
export * from './DateCalendar';
|
|
19
20
|
export * from './MonthCalendar';
|
|
@@ -42,4 +43,5 @@ export * from './timeViewRenderers';
|
|
|
42
43
|
export * from './PickersLayout';
|
|
43
44
|
export * from './PickersActionBar';
|
|
44
45
|
export * from './PickersShortcuts';
|
|
45
|
-
export { DEFAULT_DESKTOP_MODE_MEDIA_QUERY } from './internals/utils/utils';
|
|
46
|
+
export { DEFAULT_DESKTOP_MODE_MEDIA_QUERY } from './internals/utils/utils';
|
|
47
|
+
export * from './models';
|
|
@@ -95,7 +95,7 @@ export const PickersArrowSwitcher = /*#__PURE__*/React.forwardRef(function Picke
|
|
|
95
95
|
elementType: PreviousIconButton,
|
|
96
96
|
externalSlotProps: (_slotProps$previousIc = slotProps == null ? void 0 : slotProps.previousIconButton) != null ? _slotProps$previousIc : componentsProps == null ? void 0 : componentsProps.previousIconButton,
|
|
97
97
|
additionalProps: {
|
|
98
|
-
size: '
|
|
98
|
+
size: 'medium',
|
|
99
99
|
title: leftProps.label,
|
|
100
100
|
'aria-label': leftProps.label,
|
|
101
101
|
disabled: leftProps.isDisabled,
|
|
@@ -112,7 +112,7 @@ export const PickersArrowSwitcher = /*#__PURE__*/React.forwardRef(function Picke
|
|
|
112
112
|
elementType: NextIconButton,
|
|
113
113
|
externalSlotProps: (_slotProps$nextIconBu = slotProps == null ? void 0 : slotProps.nextIconButton) != null ? _slotProps$nextIconBu : componentsProps == null ? void 0 : componentsProps.nextIconButton,
|
|
114
114
|
additionalProps: {
|
|
115
|
-
size: '
|
|
115
|
+
size: 'medium',
|
|
116
116
|
title: rightProps.label,
|
|
117
117
|
'aria-label': rightProps.label,
|
|
118
118
|
disabled: rightProps.isDisabled,
|
|
@@ -129,6 +129,9 @@ export const PickersArrowSwitcher = /*#__PURE__*/React.forwardRef(function Picke
|
|
|
129
129
|
const _useSlotProps = useSlotProps({
|
|
130
130
|
elementType: LeftArrowIcon,
|
|
131
131
|
externalSlotProps: (_slotProps$leftArrowI = slotProps == null ? void 0 : slotProps.leftArrowIcon) != null ? _slotProps$leftArrowI : componentsProps == null ? void 0 : componentsProps.leftArrowIcon,
|
|
132
|
+
additionalProps: {
|
|
133
|
+
fontSize: 'inherit'
|
|
134
|
+
},
|
|
132
135
|
ownerState: undefined
|
|
133
136
|
}),
|
|
134
137
|
leftArrowIconProps = _objectWithoutPropertiesLoose(_useSlotProps, _excluded2);
|
|
@@ -137,6 +140,9 @@ export const PickersArrowSwitcher = /*#__PURE__*/React.forwardRef(function Picke
|
|
|
137
140
|
const _useSlotProps2 = useSlotProps({
|
|
138
141
|
elementType: RightArrowIcon,
|
|
139
142
|
externalSlotProps: (_slotProps$rightArrow = slotProps == null ? void 0 : slotProps.rightArrowIcon) != null ? _slotProps$rightArrow : componentsProps == null ? void 0 : componentsProps.rightArrowIcon,
|
|
143
|
+
additionalProps: {
|
|
144
|
+
fontSize: 'inherit'
|
|
145
|
+
},
|
|
140
146
|
ownerState: undefined
|
|
141
147
|
}),
|
|
142
148
|
rightArrowIconProps = _objectWithoutPropertiesLoose(_useSlotProps2, _excluded3);
|
|
@@ -16,7 +16,7 @@ export interface PickersModalDialogSlotsComponent {
|
|
|
16
16
|
*/
|
|
17
17
|
MobilePaper?: React.JSXElementConstructor<MuiPaperProps>;
|
|
18
18
|
/**
|
|
19
|
-
* Custom component for the mobile dialog [Transition](https://mui.com/material-ui/transitions).
|
|
19
|
+
* Custom component for the mobile dialog [Transition](https://mui.com/material-ui/transitions/).
|
|
20
20
|
* @default Fade from @mui/material
|
|
21
21
|
*/
|
|
22
22
|
MobileTransition?: React.JSXElementConstructor<MuiTransitionProps>;
|
|
@@ -31,7 +31,7 @@ export interface PickersModalDialogSlotsComponentsProps {
|
|
|
31
31
|
*/
|
|
32
32
|
mobilePaper?: Partial<MuiPaperProps>;
|
|
33
33
|
/**
|
|
34
|
-
* Props passed down to the mobile [Transition](https://mui.com/material-ui/transitions) component.
|
|
34
|
+
* Props passed down to the mobile [Transition](https://mui.com/material-ui/transitions/) component.
|
|
35
35
|
*/
|
|
36
36
|
mobileTransition?: Partial<MuiTransitionProps>;
|
|
37
37
|
}
|