@mui/x-date-pickers 8.0.0-alpha.3 → 8.0.0-alpha.4
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 +274 -0
- package/DateField/useDateField.d.ts +1 -1
- package/DatePicker/DatePickerToolbar.js +8 -9
- package/DateTimeField/useDateTimeField.d.ts +1 -1
- package/DateTimePicker/DateTimePickerToolbar.d.ts +6 -2
- package/DateTimePicker/DateTimePickerToolbar.js +53 -39
- package/DesktopDateTimePicker/DesktopDateTimePicker.js +1 -2
- package/DigitalClock/DigitalClock.js +13 -11
- package/DigitalClock/DigitalClock.types.d.ts +8 -2
- package/MultiSectionDigitalClock/MultiSectionDigitalClock.js +8 -7
- package/MultiSectionDigitalClock/MultiSectionDigitalClockSection.js +12 -10
- package/PickersLayout/PickersLayout.js +2 -2
- package/PickersLayout/PickersLayout.types.d.ts +4 -2
- package/PickersLayout/usePickerLayout.js +3 -3
- package/README.md +1 -1
- package/TimeClock/Clock.js +18 -21
- package/TimeClock/ClockNumber.js +15 -11
- package/TimeClock/ClockPointer.d.ts +6 -1
- package/TimeClock/ClockPointer.js +14 -10
- package/TimeClock/TimeClock.js +9 -8
- package/TimeField/useTimeField.d.ts +1 -1
- package/TimePicker/TimePickerToolbar.js +14 -17
- package/hooks/useClearableField.d.ts +5 -3
- package/hooks/useClearableField.js +4 -2
- package/index.js +1 -1
- package/internals/components/PickerProvider.d.ts +1 -1
- package/internals/components/PickersPopper.d.ts +11 -7
- package/internals/components/PickersPopper.js +18 -20
- package/internals/components/PickersToolbar.js +15 -12
- package/internals/components/PickersToolbarButton.js +4 -6
- package/internals/components/PickersToolbarText.js +11 -13
- package/internals/hooks/useDesktopPicker/useDesktopPicker.types.d.ts +3 -2
- package/internals/hooks/useMobilePicker/useMobilePicker.types.d.ts +3 -2
- package/internals/hooks/usePicker/usePicker.js +3 -3
- package/internals/hooks/usePicker/usePicker.types.d.ts +3 -2
- package/internals/hooks/usePicker/usePickerProvider.d.ts +15 -4
- package/internals/hooks/usePicker/usePickerProvider.js +8 -4
- package/internals/hooks/usePicker/usePickerViews.d.ts +5 -15
- package/internals/hooks/usePicker/usePickerViews.js +5 -6
- package/internals/hooks/useToolbarOwnerState.d.ts +10 -0
- package/internals/hooks/useToolbarOwnerState.js +13 -0
- package/internals/index.d.ts +5 -1
- package/internals/index.js +3 -1
- package/internals/models/common.d.ts +1 -1
- package/locales/roRO.js +15 -18
- package/modern/DatePicker/DatePickerToolbar.js +8 -9
- package/modern/DateTimePicker/DateTimePickerToolbar.js +53 -39
- package/modern/DesktopDateTimePicker/DesktopDateTimePicker.js +1 -2
- package/modern/DigitalClock/DigitalClock.js +13 -11
- package/modern/MultiSectionDigitalClock/MultiSectionDigitalClock.js +8 -7
- package/modern/MultiSectionDigitalClock/MultiSectionDigitalClockSection.js +12 -10
- package/modern/PickersLayout/PickersLayout.js +2 -2
- package/modern/PickersLayout/usePickerLayout.js +3 -3
- package/modern/TimeClock/Clock.js +18 -21
- package/modern/TimeClock/ClockNumber.js +15 -11
- package/modern/TimeClock/ClockPointer.js +14 -10
- package/modern/TimeClock/TimeClock.js +9 -8
- package/modern/TimePicker/TimePickerToolbar.js +14 -17
- package/modern/hooks/useClearableField.js +4 -2
- package/modern/index.js +1 -1
- package/modern/internals/components/PickersPopper.js +18 -20
- package/modern/internals/components/PickersToolbar.js +15 -12
- package/modern/internals/components/PickersToolbarButton.js +4 -6
- package/modern/internals/components/PickersToolbarText.js +11 -13
- package/modern/internals/hooks/usePicker/usePicker.js +3 -3
- package/modern/internals/hooks/usePicker/usePickerProvider.js +8 -4
- package/modern/internals/hooks/usePicker/usePickerViews.js +5 -6
- package/modern/internals/hooks/useToolbarOwnerState.js +13 -0
- package/modern/internals/index.js +3 -1
- package/modern/locales/roRO.js +15 -18
- package/node/DatePicker/DatePickerToolbar.js +8 -9
- package/node/DateTimePicker/DateTimePickerToolbar.js +54 -39
- package/node/DesktopDateTimePicker/DesktopDateTimePicker.js +1 -2
- package/node/DigitalClock/DigitalClock.js +13 -11
- package/node/MultiSectionDigitalClock/MultiSectionDigitalClock.js +8 -7
- package/node/MultiSectionDigitalClock/MultiSectionDigitalClockSection.js +12 -10
- package/node/PickersLayout/PickersLayout.js +2 -2
- package/node/PickersLayout/usePickerLayout.js +3 -3
- package/node/TimeClock/Clock.js +18 -21
- package/node/TimeClock/ClockNumber.js +15 -11
- package/node/TimeClock/ClockPointer.js +14 -10
- package/node/TimeClock/TimeClock.js +9 -8
- package/node/TimePicker/TimePickerToolbar.js +14 -17
- package/node/hooks/useClearableField.js +4 -2
- package/node/index.js +1 -1
- package/node/internals/components/PickersPopper.js +18 -20
- package/node/internals/components/PickersToolbar.js +15 -12
- package/node/internals/components/PickersToolbarButton.js +4 -6
- package/node/internals/components/PickersToolbarText.js +10 -12
- package/node/internals/hooks/usePicker/usePicker.js +3 -3
- package/node/internals/hooks/usePicker/usePickerProvider.js +8 -4
- package/node/internals/hooks/usePicker/usePickerViews.js +5 -6
- package/node/internals/hooks/useToolbarOwnerState.js +21 -0
- package/node/internals/index.js +15 -1
- package/node/locales/roRO.js +15 -18
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,133 @@
|
|
|
5
5
|
All notable changes to this project will be documented in this file.
|
|
6
6
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
7
7
|
|
|
8
|
+
## 8.0.0-alpha.4
|
|
9
|
+
|
|
10
|
+
_Dec 13, 2024_
|
|
11
|
+
|
|
12
|
+
We'd like to offer a big thanks to the 11 contributors who made this release possible. Here are some highlights ✨:
|
|
13
|
+
|
|
14
|
+
- 🌍 Improve Romanian locale on the Data Grid and Pickers
|
|
15
|
+
- 📚 Documentation improvements
|
|
16
|
+
- 🐞 Bugfixes
|
|
17
|
+
|
|
18
|
+
Special thanks go out to the community contributors who have helped make this release possible:
|
|
19
|
+
@k-rajat19, @nusr, @rares985, @zivl.
|
|
20
|
+
Following are all team members who have contributed to this release:
|
|
21
|
+
@alexfauquette, @arminmeh, @flaviendelangle, @JCQuintas, @KenanYusuf, @LukasTy, @MBilalShafi.
|
|
22
|
+
|
|
23
|
+
<!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
|
|
24
|
+
|
|
25
|
+
### Data Grid
|
|
26
|
+
|
|
27
|
+
#### Breaking changes
|
|
28
|
+
|
|
29
|
+
- The selectors signature has been updated due to the support of arguments in the selectors. Pass `undefined` as `arguments` if the selector doesn't use any arguments.
|
|
30
|
+
|
|
31
|
+
```diff
|
|
32
|
+
-mySelector(state, instanceId)
|
|
33
|
+
+mySelector(state, arguments, instanceId)
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
- The `useGridSelector` signature has been updated due to the introduction of arguments parameter in the selectors. Pass `undefined` as `arguments` if the selector doesn't use any arguments.
|
|
37
|
+
|
|
38
|
+
```diff
|
|
39
|
+
-const output = useGridSelector(apiRef, selector, equals)
|
|
40
|
+
+const output = useGridSelector(apiRef, selector, arguments, equals)
|
|
41
|
+
```
|
|
42
|
+
- The default variant for text fields and selects in the filter panel has been changed to `outlined`.
|
|
43
|
+
- The "row spanning" feature is now stable.
|
|
44
|
+
```diff
|
|
45
|
+
<DataGrid
|
|
46
|
+
- unstable_rowSpanning
|
|
47
|
+
+ rowSpanning
|
|
48
|
+
/>
|
|
49
|
+
```
|
|
50
|
+
- Selected row is now deselected when clicked again.
|
|
51
|
+
|
|
52
|
+
#### `@mui/x-data-grid@8.0.0-alpha.4`
|
|
53
|
+
|
|
54
|
+
- [DataGrid] Deselect selected row on click (#15509) @k-rajat19
|
|
55
|
+
- [DataGrid] Fix "No rows" displaying when all rows are pinned (#15335) @nusr
|
|
56
|
+
- [DataGrid] Make row spanning feature stable (#15742) @MBilalShafi
|
|
57
|
+
- [DataGrid] Round dimensions to avoid subpixel rendering error (#15850) @KenanYusuf
|
|
58
|
+
- [DataGrid] Toggle menu on click in `<GridActionsCell />` (#15867) @k-rajat19
|
|
59
|
+
- [DataGrid] Trigger row spanning computation on rows update (#15858) @MBilalShafi
|
|
60
|
+
- [DataGrid] Update filter panel input variant (#15807) @KenanYusuf
|
|
61
|
+
- [DataGrid] Use `columnsManagement` slot (#15817) @k-rajat19
|
|
62
|
+
- [DataGrid] Use new selector signature (#15200) @MBilalShafi
|
|
63
|
+
- [l10n] Improve Romanian (ro-RO) locale (#15745) @rares985
|
|
64
|
+
|
|
65
|
+
#### `@mui/x-data-grid-pro@8.0.0-alpha.4` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
66
|
+
|
|
67
|
+
Same changes as in `@mui/x-data-grid@8.0.0-alpha.4`, plus:
|
|
68
|
+
|
|
69
|
+
- [DataGridPro] Make row reordering work with pagination (#15355) @k-rajat19
|
|
70
|
+
|
|
71
|
+
#### `@mui/x-data-grid-premium@8.0.0-alpha.4` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
72
|
+
|
|
73
|
+
Same changes as in `@mui/x-data-grid-pro@8.0.0-alpha.4`, plus:
|
|
74
|
+
|
|
75
|
+
- [DataGridPremium] Fix group column ignoring `valueOptions` for `singleSelect` column type (#15739) @arminmeh
|
|
76
|
+
|
|
77
|
+
### Date and Time Pickers
|
|
78
|
+
|
|
79
|
+
#### `@mui/x-date-pickers@8.0.0-alpha.4`
|
|
80
|
+
|
|
81
|
+
- [l10n] Improve Romanian (ro-RO) locale (#15745) @rares985
|
|
82
|
+
- [pickers] Clean `usePicker` logic (#15763) @flaviendelangle
|
|
83
|
+
- [pickers] Rename layout `ownerState` property from `isRtl` to `layoutDirection` (#15803) @flaviendelangle
|
|
84
|
+
- [pickers] Use the new `ownerState` in `useClearableField` (#15776) @flaviendelangle
|
|
85
|
+
- [pickers] Use the new `ownerState` in the toolbar components (#15777) @flaviendelangle
|
|
86
|
+
- [pickers] Use the new `ownerState` object for the clock components and the desktop / mobile wrappers (#15669) @flaviendelangle
|
|
87
|
+
|
|
88
|
+
#### `@mui/x-date-pickers-pro@8.0.0-alpha.4` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
89
|
+
|
|
90
|
+
Same changes as in `@mui/x-date-pickers@8.0.0-alpha.4`.
|
|
91
|
+
|
|
92
|
+
### Charts
|
|
93
|
+
|
|
94
|
+
#### Breaking changes
|
|
95
|
+
|
|
96
|
+
- The default styling of the charts tooltip has been updated.
|
|
97
|
+
|
|
98
|
+
#### `@mui/x-charts@8.0.0-alpha.4`
|
|
99
|
+
|
|
100
|
+
- [charts] Fix hydration missmatch (#15647) @alexfauquette
|
|
101
|
+
- [charts] Fix internal spelling typo (#15805) @zivl
|
|
102
|
+
- [charts] Fix scatter dataset with missing data (#15802) @alexfauquette
|
|
103
|
+
- [charts] HTML Labels (#15813) @JCQuintas
|
|
104
|
+
- [charts] Only access store values by using hooks (#15764) @alexfauquette
|
|
105
|
+
- [charts] Update Tooltip style (#15630) @alexfauquette
|
|
106
|
+
|
|
107
|
+
#### `@mui/x-charts-pro@8.0.0-alpha.4` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
108
|
+
|
|
109
|
+
Same changes as in `@mui/x-charts@8.0.0-alpha.4`.
|
|
110
|
+
|
|
111
|
+
### Tree View
|
|
112
|
+
|
|
113
|
+
#### `@mui/x-tree-view@8.0.0-alpha.4`
|
|
114
|
+
|
|
115
|
+
No changes, releasing to keep the versions in sync.
|
|
116
|
+
|
|
117
|
+
#### `@mui/x-tree-view-pro@8.0.0-alpha.4` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
118
|
+
|
|
119
|
+
Releasing to benefit from license package fix (#15814).
|
|
120
|
+
|
|
121
|
+
### Docs
|
|
122
|
+
|
|
123
|
+
- [docs] Clean Joy and Browser custom field demos (#15707) @flaviendelangle
|
|
124
|
+
- [docs] Fix outdated link to handbook (#15855) @oliviertassinari
|
|
125
|
+
- [docs] Improve Pickers accessible DOM migration section description (#15596) @LukasTy
|
|
126
|
+
- [docs] Use `updateRows` method for list view demos (#15732) @KenanYusuf
|
|
127
|
+
- [docs] Use date library version from package dev dependencies for sandboxes (#15762) @LukasTy
|
|
128
|
+
|
|
129
|
+
### Core
|
|
130
|
+
|
|
131
|
+
- [code-infra] Add Charts sandbox generation (#15830) @JCQuintas
|
|
132
|
+
- [code-infra] Remove redundant `@type/react-test-renderer` dep (#15766) @LukasTy
|
|
133
|
+
- [license] Use `console.log` for the error message on Codesandbox to avoid rendering error (#15814) @arminmeh
|
|
134
|
+
|
|
8
135
|
## 8.0.0-alpha.3
|
|
9
136
|
|
|
10
137
|
_Dec 5, 2024_
|
|
@@ -567,6 +694,153 @@ Same changes as in `@mui/x-charts@8.0.0-alpha.0`.
|
|
|
567
694
|
- [release] v8 preparation (#15054) @michelengelen
|
|
568
695
|
- [test] Fix advanced list view regression test snapshot (#15260) @KenanYusuf
|
|
569
696
|
|
|
697
|
+
## 7.23.2
|
|
698
|
+
|
|
699
|
+
_Dec 12, 2024_
|
|
700
|
+
|
|
701
|
+
We'd like to offer a big thanks to the 11 contributors who made this release possible. Here are some highlights ✨:
|
|
702
|
+
|
|
703
|
+
- 🌍 Improve Romanian and Turkish locales on the Data Grid
|
|
704
|
+
- 🌍 Improve Romanian locale on the Pickers
|
|
705
|
+
- 📚 Documentation improvements
|
|
706
|
+
- 🐞 Bugfixes
|
|
707
|
+
|
|
708
|
+
Special thanks go out to the community contributors who have helped make this release possible:
|
|
709
|
+
@ihsanberkozcan, @k-rajat19, @lhilgert9, @nusr, @rares985.
|
|
710
|
+
|
|
711
|
+
Following are all team members who have contributed to this release:
|
|
712
|
+
@alexfauquette, @arminmeh, @flaviendelangle, @JCQuintas, @KenanYusuf, @LukasTy.
|
|
713
|
+
|
|
714
|
+
<!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
|
|
715
|
+
|
|
716
|
+
### Data Grid
|
|
717
|
+
|
|
718
|
+
#### `@mui/x-data-grid@7.23.2`
|
|
719
|
+
|
|
720
|
+
- [DataGrid] Fix "No rows" displaying when all rows are pinned (#15851) @nusr
|
|
721
|
+
- [DataGrid] Use `columnsManagement` slot (#15821) @k-rajat19
|
|
722
|
+
- [l10n] Improve Romanian (ro-RO) locale (#15751) @rares985
|
|
723
|
+
- [l10n] Improve Turkish (tr-TR) locale (#15748) @ihsanberkozcan
|
|
724
|
+
|
|
725
|
+
#### `@mui/x-data-grid-pro@7.23.2` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
726
|
+
|
|
727
|
+
Same changes as in `@mui/x-data-grid@7.23.2`, plus:
|
|
728
|
+
|
|
729
|
+
- [DataGridPro] Make Row reordering work with pagination (#15782) @k-rajat19
|
|
730
|
+
|
|
731
|
+
#### `@mui/x-data-grid-premium@7.23.2` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
732
|
+
|
|
733
|
+
Same changes as in `@mui/x-data-grid-pro@7.23.2`, plus:
|
|
734
|
+
|
|
735
|
+
- [DataGridPremium] Fix group column ignoring `valueOptions` for `singleSelect` column type (#15754) @arminmeh
|
|
736
|
+
|
|
737
|
+
### Date and Time Pickers
|
|
738
|
+
|
|
739
|
+
#### `@mui/x-date-pickers@7.23.2`
|
|
740
|
+
|
|
741
|
+
- [l10n] Improve Romanian (ro-RO) locale (#15751) @rares985
|
|
742
|
+
|
|
743
|
+
#### `@mui/x-date-pickers-pro@7.23.2` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
744
|
+
|
|
745
|
+
Same changes as in `@mui/x-date-pickers@7.23.2`.
|
|
746
|
+
|
|
747
|
+
### Charts
|
|
748
|
+
|
|
749
|
+
#### `@mui/x-charts@7.23.2`
|
|
750
|
+
|
|
751
|
+
- [charts] Fix key generation for the ChartsGrid (#15864) @alexfauquette
|
|
752
|
+
- [charts] Fix scatter dataset with missing data (#15804) @alexfauquette
|
|
753
|
+
|
|
754
|
+
#### `@mui/x-charts-pro@7.23.2` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
755
|
+
|
|
756
|
+
Same changes as in `@mui/x-charts@7.23.2`.
|
|
757
|
+
|
|
758
|
+
#### `@mui/x-tree-view@v7.23.2`
|
|
759
|
+
|
|
760
|
+
No changes, releasing to keep the versions in sync.
|
|
761
|
+
|
|
762
|
+
#### `@mui/x-tree-view-pro@7.23.2` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
763
|
+
|
|
764
|
+
Releasing to benefit from license package fix (#15818).
|
|
765
|
+
|
|
766
|
+
### Docs
|
|
767
|
+
|
|
768
|
+
- [docs] Fix typo in charts axis documentation (#15746) @JCQuintas
|
|
769
|
+
- [docs] Improve Pickers accessible DOM structure description (#15752) @LukasTy
|
|
770
|
+
- [docs] Use `updateRows` method for list view demos (#15824) @KenanYusuf
|
|
771
|
+
- [docs] Use date library version from package dev dependencies for sandboxes (#15767) @LukasTy
|
|
772
|
+
|
|
773
|
+
### Core
|
|
774
|
+
|
|
775
|
+
- [core] Add `@mui/x-tree-view-pro` to `releaseChangelog` (#15747) @flaviendelangle
|
|
776
|
+
- [license] Use `console.log` for the error message on Codesandbox to avoid rendering error (#15818) @arminmeh
|
|
777
|
+
|
|
778
|
+
## 7.23.1
|
|
779
|
+
|
|
780
|
+
_Dec 5, 2024_
|
|
781
|
+
|
|
782
|
+
We'd like to offer a big thanks to the 7 contributors who made this release possible. Here are some highlights ✨:
|
|
783
|
+
|
|
784
|
+
- 🌍 Improve German locale on the Data Grid component
|
|
785
|
+
- 🐞 Bugfixes
|
|
786
|
+
|
|
787
|
+
Special thanks go out to the community contributors who have helped make this release possible:
|
|
788
|
+
@lhilgert9.
|
|
789
|
+
|
|
790
|
+
Following are all team members who have contributed to this release:
|
|
791
|
+
@arthurbalduini, @cherniavskii, @flaviendelangle, @JCQuintas, @LukasTy and @MBilalShafi.
|
|
792
|
+
|
|
793
|
+
<!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
|
|
794
|
+
|
|
795
|
+
### Data Grid
|
|
796
|
+
|
|
797
|
+
#### `@mui/x-data-grid@7.23.1`
|
|
798
|
+
|
|
799
|
+
- [DataGrid] Make column autosizing work with flex columns (#15712) @cherniavskii
|
|
800
|
+
- [l10n] Improve German (de-DE) locale (#15641) @lhilgert9
|
|
801
|
+
|
|
802
|
+
#### `@mui/x-data-grid-pro@7.23.1` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
803
|
+
|
|
804
|
+
Same changes as in `@mui/x-data-grid@7.23.1`, plus:
|
|
805
|
+
|
|
806
|
+
- [DataGridPro] Cleanup pinned rows on removal (#15702) @cherniavskii
|
|
807
|
+
|
|
808
|
+
#### `@mui/x-data-grid-premium@7.23.1` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
809
|
+
|
|
810
|
+
Same changes as in `@mui/x-data-grid-pro@7.23.1`.
|
|
811
|
+
|
|
812
|
+
### Date and Time Pickers
|
|
813
|
+
|
|
814
|
+
#### `@mui/x-date-pickers@7.23.1`
|
|
815
|
+
|
|
816
|
+
- [TimePicker] Prevent mouse events after `touchend` event (#15430) @arthurbalduini
|
|
817
|
+
|
|
818
|
+
#### `@mui/x-date-pickers-pro@7.23.1` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
819
|
+
|
|
820
|
+
Same changes as in `@mui/x-date-pickers@7.23.1`.
|
|
821
|
+
|
|
822
|
+
### Charts
|
|
823
|
+
|
|
824
|
+
#### `@mui/x-charts@7.23.1`
|
|
825
|
+
|
|
826
|
+
- [charts] Improve SVG `pattern` and `gradient` support (#15724) @JCQuintas
|
|
827
|
+
|
|
828
|
+
#### `@mui/x-charts-pro@7.23.1` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
829
|
+
|
|
830
|
+
Same changes as in `@mui/x-charts@7.23.1`.
|
|
831
|
+
|
|
832
|
+
### Docs
|
|
833
|
+
|
|
834
|
+
- [docs] Fix Pickers theme augmentation example (#15675) @LukasTy
|
|
835
|
+
- [docs] Remove duplicated warning (#15715) @cherniavskii
|
|
836
|
+
- [test] Force hover in headless Chrome (#15711) @cherniavskii
|
|
837
|
+
- [docs-infra] Bump `@mui/internal-markdown` to support nested demo imports (#15738) @alexfauquette
|
|
838
|
+
- [docs] Improve SEO titles for the Data Grid (#15695) @MBilalShafi
|
|
839
|
+
|
|
840
|
+
### Core
|
|
841
|
+
|
|
842
|
+
- [core] Add `@mui/x-tree-view-pro` to `releaseChangelog` (#15747) @flaviendelangle
|
|
843
|
+
|
|
570
844
|
## 7.23.0
|
|
571
845
|
|
|
572
846
|
_Nov 29, 2024_
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { UseDateFieldProps } from './DateField.types';
|
|
2
|
-
export declare const useDateField: <TEnableAccessibleFieldDOMStructure extends boolean, TAllProps extends UseDateFieldProps<TEnableAccessibleFieldDOMStructure>>(inProps: TAllProps) => import("../internals").UseFieldResponse<TEnableAccessibleFieldDOMStructure, Omit<TAllProps & Omit<UseDateFieldProps<TEnableAccessibleFieldDOMStructure>, keyof import("../internals/hooks/defaultizedFieldProps").UseDefaultizedDateFieldBaseProps> & Required<Pick<UseDateFieldProps<TEnableAccessibleFieldDOMStructure>, keyof import("../internals/hooks/defaultizedFieldProps").UseDefaultizedDateFieldBaseProps>>, "disabled" | "format" | "onChange" | "onError" | "defaultValue" | "value" | "readOnly" | "
|
|
2
|
+
export declare const useDateField: <TEnableAccessibleFieldDOMStructure extends boolean, TAllProps extends UseDateFieldProps<TEnableAccessibleFieldDOMStructure>>(inProps: TAllProps) => import("../internals").UseFieldResponse<TEnableAccessibleFieldDOMStructure, Omit<TAllProps & Omit<UseDateFieldProps<TEnableAccessibleFieldDOMStructure>, keyof import("../internals/hooks/defaultizedFieldProps").UseDefaultizedDateFieldBaseProps> & Required<Pick<UseDateFieldProps<TEnableAccessibleFieldDOMStructure>, keyof import("../internals/hooks/defaultizedFieldProps").UseDefaultizedDateFieldBaseProps>>, "disabled" | "format" | "onChange" | "onError" | "defaultValue" | "value" | "readOnly" | "timezone" | "referenceDate" | "formatDensity" | "shouldRespectLeadingZeros" | "selectedSections" | "onSelectedSectionsChange" | "unstableFieldRef" | "enableAccessibleFieldDOMStructure" | "shouldDisableDate" | "shouldDisableMonth" | "shouldDisableYear" | keyof import("../internals").BaseDateValidationProps | "dateSeparator">>;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
4
4
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
5
|
-
const _excluded = ["value", "isLandscape", "onChange", "toolbarFormat", "toolbarPlaceholder", "views", "className", "onViewChange", "view"];
|
|
5
|
+
const _excluded = ["value", "isLandscape", "onChange", "toolbarFormat", "toolbarPlaceholder", "views", "className", "classes", "onViewChange", "view"];
|
|
6
6
|
import * as React from 'react';
|
|
7
7
|
import clsx from 'clsx';
|
|
8
8
|
import PropTypes from 'prop-types';
|
|
@@ -14,11 +14,9 @@ import { usePickerTranslations } from "../hooks/usePickerTranslations.js";
|
|
|
14
14
|
import { useUtils } from "../internals/hooks/useUtils.js";
|
|
15
15
|
import { getDatePickerToolbarUtilityClass } from "./datePickerToolbarClasses.js";
|
|
16
16
|
import { resolveDateFormat } from "../internals/utils/date-utils.js";
|
|
17
|
+
import { useToolbarOwnerState } from "../internals/hooks/useToolbarOwnerState.js";
|
|
17
18
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
18
|
-
const useUtilityClasses =
|
|
19
|
-
const {
|
|
20
|
-
classes
|
|
21
|
-
} = ownerState;
|
|
19
|
+
const useUtilityClasses = classes => {
|
|
22
20
|
const slots = {
|
|
23
21
|
root: ['root'],
|
|
24
22
|
title: ['title']
|
|
@@ -37,7 +35,7 @@ const DatePickerToolbarTitle = styled(Typography, {
|
|
|
37
35
|
})({
|
|
38
36
|
variants: [{
|
|
39
37
|
props: {
|
|
40
|
-
|
|
38
|
+
pickerOrientation: 'landscape'
|
|
41
39
|
},
|
|
42
40
|
style: {
|
|
43
41
|
margin: 'auto 16px auto auto'
|
|
@@ -65,12 +63,14 @@ export const DatePickerToolbar = /*#__PURE__*/React.forwardRef(function DatePick
|
|
|
65
63
|
toolbarFormat,
|
|
66
64
|
toolbarPlaceholder = '––',
|
|
67
65
|
views,
|
|
68
|
-
className
|
|
66
|
+
className,
|
|
67
|
+
classes: classesProp
|
|
69
68
|
} = props,
|
|
70
69
|
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
71
70
|
const utils = useUtils();
|
|
72
71
|
const translations = usePickerTranslations();
|
|
73
|
-
const
|
|
72
|
+
const ownerState = useToolbarOwnerState();
|
|
73
|
+
const classes = useUtilityClasses(classesProp);
|
|
74
74
|
const dateText = React.useMemo(() => {
|
|
75
75
|
if (!value) {
|
|
76
76
|
return toolbarPlaceholder;
|
|
@@ -81,7 +81,6 @@ export const DatePickerToolbar = /*#__PURE__*/React.forwardRef(function DatePick
|
|
|
81
81
|
}, true);
|
|
82
82
|
return utils.formatByString(value, formatFromViews);
|
|
83
83
|
}, [value, toolbarFormat, toolbarPlaceholder, utils, views]);
|
|
84
|
-
const ownerState = props;
|
|
85
84
|
return /*#__PURE__*/_jsx(DatePickerToolbarRoot, _extends({
|
|
86
85
|
ref: ref,
|
|
87
86
|
toolbarTitle: translations.datePickerToolbarTitle,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { UseDateTimeFieldProps } from './DateTimeField.types';
|
|
2
|
-
export declare const useDateTimeField: <TEnableAccessibleFieldDOMStructure extends boolean, TAllProps extends UseDateTimeFieldProps<TEnableAccessibleFieldDOMStructure>>(inProps: TAllProps) => import("../internals").UseFieldResponse<TEnableAccessibleFieldDOMStructure, Omit<TAllProps & Omit<UseDateTimeFieldProps<TEnableAccessibleFieldDOMStructure>, keyof import("../internals/hooks/defaultizedFieldProps").UseDefaultizedDateTimeFieldBaseProps> & Required<Pick<UseDateTimeFieldProps<TEnableAccessibleFieldDOMStructure>, keyof import("../internals/hooks/defaultizedFieldProps").UseDefaultizedDateTimeFieldBaseProps>>, "disabled" | "format" | "onChange" | "onError" | "defaultValue" | "value" | "readOnly" | "
|
|
2
|
+
export declare const useDateTimeField: <TEnableAccessibleFieldDOMStructure extends boolean, TAllProps extends UseDateTimeFieldProps<TEnableAccessibleFieldDOMStructure>>(inProps: TAllProps) => import("../internals").UseFieldResponse<TEnableAccessibleFieldDOMStructure, Omit<TAllProps & Omit<UseDateTimeFieldProps<TEnableAccessibleFieldDOMStructure>, keyof import("../internals/hooks/defaultizedFieldProps").UseDefaultizedDateTimeFieldBaseProps> & Required<Pick<UseDateTimeFieldProps<TEnableAccessibleFieldDOMStructure>, keyof import("../internals/hooks/defaultizedFieldProps").UseDefaultizedDateTimeFieldBaseProps>>, "disabled" | "format" | "onChange" | "onError" | "defaultValue" | "value" | "readOnly" | "ampm" | "disableFuture" | "disablePast" | "maxDate" | "minDate" | "timezone" | "referenceDate" | "formatDensity" | "shouldRespectLeadingZeros" | "selectedSections" | "onSelectedSectionsChange" | "unstableFieldRef" | "enableAccessibleFieldDOMStructure" | "minutesStep" | "shouldDisableDate" | "shouldDisableMonth" | "shouldDisableYear" | "minTime" | "maxTime" | "shouldDisableTime" | "disableIgnoringDatePartForTimeValidation" | "minDateTime" | "maxDateTime" | "dateSeparator">>;
|
|
@@ -2,7 +2,7 @@ import * as React from 'react';
|
|
|
2
2
|
import { MakeOptional } from '@mui/x-internals/types';
|
|
3
3
|
import { BaseToolbarProps, ExportedBaseToolbarProps } from '../internals/models/props/toolbar';
|
|
4
4
|
import { DateTimePickerToolbarClasses } from './dateTimePickerToolbarClasses';
|
|
5
|
-
import { DateOrTimeViewWithMeridiem, PickerValue
|
|
5
|
+
import { DateOrTimeViewWithMeridiem, PickerValue } from '../internals/models';
|
|
6
6
|
export interface ExportedDateTimePickerToolbarProps extends ExportedBaseToolbarProps {
|
|
7
7
|
/**
|
|
8
8
|
* Override or extend the styles applied to the component.
|
|
@@ -10,7 +10,6 @@ export interface ExportedDateTimePickerToolbarProps extends ExportedBaseToolbarP
|
|
|
10
10
|
classes?: Partial<DateTimePickerToolbarClasses>;
|
|
11
11
|
}
|
|
12
12
|
export interface DateTimePickerToolbarProps extends ExportedDateTimePickerToolbarProps, MakeOptional<BaseToolbarProps<PickerValue, DateOrTimeViewWithMeridiem>, 'view'> {
|
|
13
|
-
toolbarVariant?: PickerVariant;
|
|
14
13
|
/**
|
|
15
14
|
* If provided, it will be used instead of `dateTimePickerToolbarTitle` from localization.
|
|
16
15
|
*/
|
|
@@ -18,6 +17,11 @@ export interface DateTimePickerToolbarProps extends ExportedDateTimePickerToolba
|
|
|
18
17
|
ampm?: boolean;
|
|
19
18
|
ampmInClock?: boolean;
|
|
20
19
|
}
|
|
20
|
+
/**
|
|
21
|
+
* If this context value is set to true, the toolbar will always be rendered in the desktop mode.
|
|
22
|
+
* This is used by the Date Time Range Picker Toolbar.
|
|
23
|
+
*/
|
|
24
|
+
export declare const DateTimePickerToolbarForceDesktopVariant: React.Context<boolean>;
|
|
21
25
|
/**
|
|
22
26
|
* Demos:
|
|
23
27
|
*
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
4
4
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
5
|
-
const _excluded = ["ampm", "ampmInClock", "value", "onChange", "view", "isLandscape", "onViewChange", "toolbarFormat", "toolbarPlaceholder", "views", "
|
|
5
|
+
const _excluded = ["ampm", "ampmInClock", "value", "onChange", "view", "isLandscape", "onViewChange", "toolbarFormat", "toolbarPlaceholder", "views", "toolbarTitle", "className", "classes"];
|
|
6
6
|
import * as React from 'react';
|
|
7
|
+
import clsx from 'clsx';
|
|
7
8
|
import PropTypes from 'prop-types';
|
|
8
|
-
import { useRtl } from '@mui/system/RtlProvider';
|
|
9
9
|
import { styled, useThemeProps } from '@mui/material/styles';
|
|
10
10
|
import composeClasses from '@mui/utils/composeClasses';
|
|
11
|
-
import
|
|
11
|
+
import { shouldForwardProp } from '@mui/system/createStyled';
|
|
12
12
|
import { PickersToolbarText } from "../internals/components/PickersToolbarText.js";
|
|
13
13
|
import { PickersToolbar } from "../internals/components/PickersToolbar.js";
|
|
14
14
|
import { PickersToolbarButton } from "../internals/components/PickersToolbarButton.js";
|
|
@@ -21,20 +21,20 @@ import { formatMeridiem } from "../internals/utils/date-utils.js";
|
|
|
21
21
|
import { pickersToolbarTextClasses } from "../internals/components/pickersToolbarTextClasses.js";
|
|
22
22
|
import { pickersToolbarClasses } from "../internals/components/pickersToolbarClasses.js";
|
|
23
23
|
import { usePickerContext } from "../hooks/usePickerContext.js";
|
|
24
|
+
import { useToolbarOwnerState } from "../internals/hooks/useToolbarOwnerState.js";
|
|
24
25
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
25
|
-
const useUtilityClasses = ownerState => {
|
|
26
|
+
const useUtilityClasses = (classes, ownerState) => {
|
|
26
27
|
const {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
isRtl
|
|
28
|
+
pickerOrientation,
|
|
29
|
+
toolbarDirection
|
|
30
30
|
} = ownerState;
|
|
31
31
|
const slots = {
|
|
32
32
|
root: ['root'],
|
|
33
33
|
dateContainer: ['dateContainer'],
|
|
34
|
-
timeContainer: ['timeContainer',
|
|
35
|
-
timeDigitsContainer: ['timeDigitsContainer',
|
|
34
|
+
timeContainer: ['timeContainer', toolbarDirection === 'rtl' && 'timeLabelReverse'],
|
|
35
|
+
timeDigitsContainer: ['timeDigitsContainer', toolbarDirection === 'rtl' && 'timeLabelReverse'],
|
|
36
36
|
separator: ['separator'],
|
|
37
|
-
ampmSelection: ['ampmSelection',
|
|
37
|
+
ampmSelection: ['ampmSelection', pickerOrientation === 'landscape' && 'ampmLandscape'],
|
|
38
38
|
ampmLabel: ['ampmLabel']
|
|
39
39
|
};
|
|
40
40
|
return composeClasses(slots, getDateTimePickerToolbarUtilityClass, classes);
|
|
@@ -42,7 +42,8 @@ const useUtilityClasses = ownerState => {
|
|
|
42
42
|
const DateTimePickerToolbarRoot = styled(PickersToolbar, {
|
|
43
43
|
name: 'MuiDateTimePickerToolbar',
|
|
44
44
|
slot: 'Root',
|
|
45
|
-
overridesResolver: (props, styles) => styles.root
|
|
45
|
+
overridesResolver: (props, styles) => styles.root,
|
|
46
|
+
shouldForwardProp: prop => shouldForwardProp(prop) && prop !== 'toolbarVariant'
|
|
46
47
|
})(({
|
|
47
48
|
theme
|
|
48
49
|
}) => ({
|
|
@@ -64,7 +65,7 @@ const DateTimePickerToolbarRoot = styled(PickersToolbar, {
|
|
|
64
65
|
}, {
|
|
65
66
|
props: {
|
|
66
67
|
toolbarVariant: 'desktop',
|
|
67
|
-
|
|
68
|
+
pickerOrientation: 'landscape'
|
|
68
69
|
},
|
|
69
70
|
style: {
|
|
70
71
|
borderRight: `1px solid ${(theme.vars || theme).palette.divider}`
|
|
@@ -72,7 +73,7 @@ const DateTimePickerToolbarRoot = styled(PickersToolbar, {
|
|
|
72
73
|
}, {
|
|
73
74
|
props: {
|
|
74
75
|
toolbarVariant: 'desktop',
|
|
75
|
-
|
|
76
|
+
pickerOrientation: 'portrait'
|
|
76
77
|
},
|
|
77
78
|
style: {
|
|
78
79
|
paddingLeft: 24,
|
|
@@ -92,13 +93,14 @@ const DateTimePickerToolbarDateContainer = styled('div', {
|
|
|
92
93
|
const DateTimePickerToolbarTimeContainer = styled('div', {
|
|
93
94
|
name: 'MuiDateTimePickerToolbar',
|
|
94
95
|
slot: 'TimeContainer',
|
|
95
|
-
overridesResolver: (props, styles) => styles.timeContainer
|
|
96
|
+
overridesResolver: (props, styles) => styles.timeContainer,
|
|
97
|
+
shouldForwardProp: prop => shouldForwardProp(prop) && prop !== 'toolbarVariant'
|
|
96
98
|
})({
|
|
97
99
|
display: 'flex',
|
|
98
100
|
flexDirection: 'row',
|
|
99
101
|
variants: [{
|
|
100
102
|
props: {
|
|
101
|
-
|
|
103
|
+
toolbarDirection: 'rtl'
|
|
102
104
|
},
|
|
103
105
|
style: {
|
|
104
106
|
flexDirection: 'row-reverse'
|
|
@@ -106,7 +108,7 @@ const DateTimePickerToolbarTimeContainer = styled('div', {
|
|
|
106
108
|
}, {
|
|
107
109
|
props: {
|
|
108
110
|
toolbarVariant: 'desktop',
|
|
109
|
-
|
|
111
|
+
pickerOrientation: 'portrait'
|
|
110
112
|
},
|
|
111
113
|
style: {
|
|
112
114
|
gap: 9,
|
|
@@ -115,18 +117,18 @@ const DateTimePickerToolbarTimeContainer = styled('div', {
|
|
|
115
117
|
}
|
|
116
118
|
}, {
|
|
117
119
|
props: ({
|
|
118
|
-
|
|
120
|
+
pickerOrientation,
|
|
119
121
|
toolbarVariant
|
|
120
|
-
}) =>
|
|
122
|
+
}) => pickerOrientation === 'landscape' && toolbarVariant !== 'desktop',
|
|
121
123
|
style: {
|
|
122
124
|
flexDirection: 'column'
|
|
123
125
|
}
|
|
124
126
|
}, {
|
|
125
127
|
props: ({
|
|
126
|
-
|
|
128
|
+
pickerOrientation,
|
|
127
129
|
toolbarVariant,
|
|
128
|
-
|
|
129
|
-
}) =>
|
|
130
|
+
toolbarDirection
|
|
131
|
+
}) => pickerOrientation === 'landscape' && toolbarVariant !== 'desktop' && toolbarDirection === 'rtl',
|
|
130
132
|
style: {
|
|
131
133
|
flexDirection: 'column-reverse'
|
|
132
134
|
}
|
|
@@ -135,12 +137,13 @@ const DateTimePickerToolbarTimeContainer = styled('div', {
|
|
|
135
137
|
const DateTimePickerToolbarTimeDigitsContainer = styled('div', {
|
|
136
138
|
name: 'MuiDateTimePickerToolbar',
|
|
137
139
|
slot: 'TimeDigitsContainer',
|
|
138
|
-
overridesResolver: (props, styles) => styles.timeDigitsContainer
|
|
140
|
+
overridesResolver: (props, styles) => styles.timeDigitsContainer,
|
|
141
|
+
shouldForwardProp: prop => shouldForwardProp(prop) && prop !== 'toolbarVariant'
|
|
139
142
|
})({
|
|
140
143
|
display: 'flex',
|
|
141
144
|
variants: [{
|
|
142
145
|
props: {
|
|
143
|
-
|
|
146
|
+
toolbarDirection: 'rtl'
|
|
144
147
|
},
|
|
145
148
|
style: {
|
|
146
149
|
flexDirection: 'row-reverse'
|
|
@@ -157,7 +160,8 @@ const DateTimePickerToolbarTimeDigitsContainer = styled('div', {
|
|
|
157
160
|
const DateTimePickerToolbarSeparator = styled(PickersToolbarText, {
|
|
158
161
|
name: 'MuiDateTimePickerToolbar',
|
|
159
162
|
slot: 'Separator',
|
|
160
|
-
overridesResolver: (props, styles) => styles.separator
|
|
163
|
+
overridesResolver: (props, styles) => styles.separator,
|
|
164
|
+
shouldForwardProp: prop => shouldForwardProp(prop) && prop !== 'toolbarVariant'
|
|
161
165
|
})({
|
|
162
166
|
margin: '0 4px 0 2px',
|
|
163
167
|
cursor: 'default',
|
|
@@ -190,7 +194,7 @@ const DateTimePickerToolbarAmPmSelection = styled('div', {
|
|
|
190
194
|
},
|
|
191
195
|
variants: [{
|
|
192
196
|
props: {
|
|
193
|
-
|
|
197
|
+
pickerOrientation: 'landscape'
|
|
194
198
|
},
|
|
195
199
|
style: {
|
|
196
200
|
margin: '4px 0 auto',
|
|
@@ -201,6 +205,12 @@ const DateTimePickerToolbarAmPmSelection = styled('div', {
|
|
|
201
205
|
}]
|
|
202
206
|
});
|
|
203
207
|
|
|
208
|
+
/**
|
|
209
|
+
* If this context value is set to true, the toolbar will always be rendered in the desktop mode.
|
|
210
|
+
* This is used by the Date Time Range Picker Toolbar.
|
|
211
|
+
*/
|
|
212
|
+
export const DateTimePickerToolbarForceDesktopVariant = /*#__PURE__*/React.createContext(false);
|
|
213
|
+
|
|
204
214
|
/**
|
|
205
215
|
* Demos:
|
|
206
216
|
*
|
|
@@ -227,28 +237,28 @@ function DateTimePickerToolbar(inProps) {
|
|
|
227
237
|
toolbarFormat,
|
|
228
238
|
toolbarPlaceholder = '––',
|
|
229
239
|
views,
|
|
230
|
-
toolbarVariant = 'mobile',
|
|
231
240
|
toolbarTitle: inToolbarTitle,
|
|
232
|
-
className
|
|
241
|
+
className,
|
|
242
|
+
classes: classesProp
|
|
233
243
|
} = props,
|
|
234
244
|
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
235
|
-
const isRtl = useRtl();
|
|
236
245
|
const {
|
|
237
246
|
disabled,
|
|
238
|
-
readOnly
|
|
247
|
+
readOnly,
|
|
248
|
+
variant
|
|
239
249
|
} = usePickerContext();
|
|
240
|
-
const ownerState =
|
|
241
|
-
|
|
242
|
-
});
|
|
250
|
+
const ownerState = useToolbarOwnerState();
|
|
251
|
+
const classes = useUtilityClasses(classesProp, ownerState);
|
|
243
252
|
const utils = useUtils();
|
|
244
253
|
const {
|
|
245
254
|
meridiemMode,
|
|
246
255
|
handleMeridiemChange
|
|
247
256
|
} = useMeridiemMode(value, ampm, onChange);
|
|
248
|
-
const showAmPmControl = Boolean(ampm && !ampmInClock);
|
|
249
|
-
const isDesktop = toolbarVariant === 'desktop';
|
|
250
257
|
const translations = usePickerTranslations();
|
|
251
|
-
const
|
|
258
|
+
const forceDesktopVariant = React.useContext(DateTimePickerToolbarForceDesktopVariant);
|
|
259
|
+
const toolbarVariant = forceDesktopVariant ? 'desktop' : variant;
|
|
260
|
+
const isDesktop = toolbarVariant === 'desktop';
|
|
261
|
+
const showAmPmControl = Boolean(ampm && !ampmInClock);
|
|
252
262
|
const toolbarTitle = inToolbarTitle ?? translations.dateTimePickerToolbarTitle;
|
|
253
263
|
const formatHours = time => ampm ? utils.format(time, 'hours12h') : utils.format(time, 'hours24h');
|
|
254
264
|
const dateText = React.useMemo(() => {
|
|
@@ -263,7 +273,8 @@ function DateTimePickerToolbar(inProps) {
|
|
|
263
273
|
return /*#__PURE__*/_jsxs(DateTimePickerToolbarRoot, _extends({
|
|
264
274
|
isLandscape: isLandscape,
|
|
265
275
|
className: clsx(classes.root, className),
|
|
266
|
-
toolbarTitle: toolbarTitle
|
|
276
|
+
toolbarTitle: toolbarTitle,
|
|
277
|
+
toolbarVariant: toolbarVariant
|
|
267
278
|
}, other, {
|
|
268
279
|
ownerState: ownerState,
|
|
269
280
|
children: [/*#__PURE__*/_jsxs(DateTimePickerToolbarDateContainer, {
|
|
@@ -285,9 +296,11 @@ function DateTimePickerToolbar(inProps) {
|
|
|
285
296
|
}), /*#__PURE__*/_jsxs(DateTimePickerToolbarTimeContainer, {
|
|
286
297
|
className: classes.timeContainer,
|
|
287
298
|
ownerState: ownerState,
|
|
299
|
+
toolbarVariant: toolbarVariant,
|
|
288
300
|
children: [/*#__PURE__*/_jsxs(DateTimePickerToolbarTimeDigitsContainer, {
|
|
289
301
|
className: classes.timeDigitsContainer,
|
|
290
302
|
ownerState: ownerState,
|
|
303
|
+
toolbarVariant: toolbarVariant,
|
|
291
304
|
children: [views.includes('hours') && /*#__PURE__*/_jsxs(React.Fragment, {
|
|
292
305
|
children: [/*#__PURE__*/_jsx(PickersToolbarButton, {
|
|
293
306
|
variant: isDesktop ? 'h5' : 'h3',
|
|
@@ -299,7 +312,8 @@ function DateTimePickerToolbar(inProps) {
|
|
|
299
312
|
variant: isDesktop ? 'h5' : 'h3',
|
|
300
313
|
value: ":",
|
|
301
314
|
className: classes.separator,
|
|
302
|
-
ownerState: ownerState
|
|
315
|
+
ownerState: ownerState,
|
|
316
|
+
toolbarVariant: toolbarVariant
|
|
303
317
|
}), /*#__PURE__*/_jsx(PickersToolbarButton, {
|
|
304
318
|
variant: isDesktop ? 'h5' : 'h3',
|
|
305
319
|
width: isDesktop && !isLandscape ? MULTI_SECTION_CLOCK_SECTION_WIDTH : undefined,
|
|
@@ -313,7 +327,8 @@ function DateTimePickerToolbar(inProps) {
|
|
|
313
327
|
variant: isDesktop ? 'h5' : 'h3',
|
|
314
328
|
value: ":",
|
|
315
329
|
className: classes.separator,
|
|
316
|
-
ownerState: ownerState
|
|
330
|
+
ownerState: ownerState,
|
|
331
|
+
toolbarVariant: toolbarVariant
|
|
317
332
|
}), /*#__PURE__*/_jsx(PickersToolbarButton, {
|
|
318
333
|
variant: isDesktop ? 'h5' : 'h3',
|
|
319
334
|
width: isDesktop && !isLandscape ? MULTI_SECTION_CLOCK_SECTION_WIDTH : undefined,
|
|
@@ -393,7 +408,6 @@ process.env.NODE_ENV !== "production" ? DateTimePickerToolbar.propTypes = {
|
|
|
393
408
|
* If provided, it will be used instead of `dateTimePickerToolbarTitle` from localization.
|
|
394
409
|
*/
|
|
395
410
|
toolbarTitle: PropTypes.node,
|
|
396
|
-
toolbarVariant: PropTypes.oneOf(['desktop', 'mobile']),
|
|
397
411
|
value: PropTypes.object,
|
|
398
412
|
/**
|
|
399
413
|
* Currently visible picker view.
|
|
@@ -131,8 +131,7 @@ const DesktopDateTimePicker = /*#__PURE__*/React.forwardRef(function DesktopDate
|
|
|
131
131
|
}),
|
|
132
132
|
toolbar: _extends({
|
|
133
133
|
hidden: true,
|
|
134
|
-
ampmInClock
|
|
135
|
-
toolbarVariant: 'desktop'
|
|
134
|
+
ampmInClock
|
|
136
135
|
}, defaultizedProps.slotProps?.toolbar),
|
|
137
136
|
tabs: _extends({
|
|
138
137
|
hidden: true
|