@mui/lab 5.0.0-alpha.45 → 5.0.0-alpha.49
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/Alert/Alert.js +1 -1
- package/AlertTitle/AlertTitle.js +1 -1
- package/Autocomplete/Autocomplete.js +1 -1
- package/AvatarGroup/AvatarGroup.js +1 -1
- package/CHANGELOG.md +337 -48
- package/CalendarPicker/CalendarPicker.d.ts +2 -2
- package/CalendarPicker/CalendarPicker.js +2 -2
- package/CalendarPicker/PickersCalendar.d.ts +1 -1
- package/CalendarPicker/PickersCalendarHeader.d.ts +4 -1
- package/CalendarPicker/PickersCalendarHeader.js +0 -1
- package/CalendarPickerSkeleton/CalendarPickerSkeleton.d.ts +2 -2
- package/CalendarPickerSkeleton/CalendarPickerSkeleton.js +4 -4
- package/ClockPicker/Clock.js +3 -3
- package/ClockPicker/ClockPicker.d.ts +6 -4
- package/ClockPicker/ClockPicker.js +3 -3
- package/ClockPicker/shared.js +1 -1
- package/DatePicker/DatePicker.d.ts +3 -3
- package/DatePicker/DatePicker.js +7 -7
- package/DateRangePicker/DateRangePicker.d.ts +2 -2
- package/DateRangePicker/DateRangePicker.js +5 -5
- package/DateRangePicker/DateRangePickerInput.d.ts +1 -1
- package/DateRangePickerDay/DateRangePickerDay.d.ts +2 -2
- package/DateRangePickerDay/DateRangePickerDay.js +2 -2
- package/DateTimePicker/DateTimePicker.d.ts +3 -3
- package/DateTimePicker/DateTimePicker.js +9 -9
- package/DateTimePicker/DateTimePickerToolbar.js +27 -14
- package/DateTimePicker/shared.d.ts +1 -1
- package/DesktopDatePicker/DesktopDatePicker.d.ts +2 -2
- package/DesktopDatePicker/DesktopDatePicker.js +6 -6
- package/DesktopDateRangePicker/DesktopDateRangePicker.d.ts +2 -2
- package/DesktopDateRangePicker/DesktopDateRangePicker.js +5 -5
- package/DesktopDateTimePicker/DesktopDateTimePicker.d.ts +2 -2
- package/DesktopDateTimePicker/DesktopDateTimePicker.js +8 -8
- package/DesktopTimePicker/DesktopTimePicker.d.ts +2 -2
- package/DesktopTimePicker/DesktopTimePicker.js +5 -5
- package/LoadingButton/LoadingButton.d.ts +3 -3
- package/LoadingButton/LoadingButton.js +2 -2
- package/Masonry/Masonry.d.ts +2 -2
- package/Masonry/Masonry.js +1 -1
- package/MasonryItem/MasonryItem.d.ts +2 -2
- package/MasonryItem/MasonryItem.js +15 -27
- package/MobileDatePicker/MobileDatePicker.d.ts +2 -2
- package/MobileDatePicker/MobileDatePicker.js +4 -4
- package/MobileDateRangePicker/MobileDateRangePicker.d.ts +2 -2
- package/MobileDateRangePicker/MobileDateRangePicker.js +3 -3
- package/MobileDateTimePicker/MobileDateTimePicker.d.ts +2 -2
- package/MobileDateTimePicker/MobileDateTimePicker.js +6 -6
- package/MobileTimePicker/MobileTimePicker.d.ts +2 -2
- package/MobileTimePicker/MobileTimePicker.js +3 -3
- package/MonthPicker/MonthPicker.d.ts +2 -2
- package/MonthPicker/MonthPicker.js +2 -2
- package/Pagination/Pagination.js +1 -1
- package/PaginationItem/PaginationItem.js +1 -1
- package/PickersDay/PickersDay.d.ts +2 -2
- package/PickersDay/PickersDay.js +3 -3
- package/README.md +11 -7
- package/Rating/Rating.js +1 -1
- package/Skeleton/Skeleton.js +1 -1
- package/SpeedDial/SpeedDial.js +1 -1
- package/SpeedDialAction/SpeedDialAction.js +1 -1
- package/SpeedDialIcon/SpeedDialIcon.js +1 -1
- package/StaticDatePicker/StaticDatePicker.d.ts +2 -2
- package/StaticDatePicker/StaticDatePicker.js +4 -4
- package/StaticDateRangePicker/StaticDateRangePicker.d.ts +2 -2
- package/StaticDateRangePicker/StaticDateRangePicker.js +3 -3
- package/StaticDateTimePicker/StaticDateTimePicker.d.ts +2 -2
- package/StaticDateTimePicker/StaticDateTimePicker.js +6 -6
- package/StaticTimePicker/StaticTimePicker.d.ts +2 -2
- package/StaticTimePicker/StaticTimePicker.js +3 -3
- package/TabContext/TabContext.d.ts +2 -2
- package/TabList/TabList.d.ts +3 -3
- package/TabPanel/TabPanel.d.ts +2 -2
- package/TimePicker/TimePicker.d.ts +3 -3
- package/TimePicker/TimePicker.js +6 -6
- package/Timeline/Timeline.d.ts +4 -4
- package/Timeline/Timeline.js +4 -4
- package/TimelineConnector/TimelineConnector.d.ts +2 -2
- package/TimelineContent/TimelineContent.d.ts +3 -3
- package/TimelineDot/TimelineDot.d.ts +2 -2
- package/TimelineItem/TimelineItem.d.ts +2 -2
- package/TimelineOppositeContent/TimelineOppositeContent.d.ts +3 -3
- package/TimelineSeparator/TimelineSeparator.d.ts +2 -2
- package/ToggleButton/ToggleButton.js +1 -1
- package/ToggleButtonGroup/ToggleButtonGroup.js +1 -1
- package/TreeItem/TreeItem.d.ts +3 -3
- package/TreeItem/TreeItem.js +1 -1
- package/TreeView/TreeView.d.ts +2 -2
- package/YearPicker/PickersYear.js +1 -1
- package/YearPicker/YearPicker.d.ts +2 -2
- package/YearPicker/YearPicker.js +2 -2
- package/index.js +1 -1
- package/internal/pickers/PickersArrowSwitcher.d.ts +3 -3
- package/internal/pickers/PickersPopper.d.ts +2 -2
- package/internal/pickers/PureDateInput.d.ts +1 -1
- package/internal/pickers/hooks/date-helpers-hooks.js +1 -1
- package/legacy/Alert/Alert.js +1 -1
- package/legacy/AlertTitle/AlertTitle.js +1 -1
- package/legacy/Autocomplete/Autocomplete.js +1 -1
- package/legacy/AvatarGroup/AvatarGroup.js +1 -1
- package/legacy/CalendarPicker/CalendarPicker.js +2 -2
- package/legacy/CalendarPicker/PickersCalendarHeader.js +0 -1
- package/legacy/CalendarPickerSkeleton/CalendarPickerSkeleton.js +4 -4
- package/legacy/ClockPicker/Clock.js +3 -3
- package/legacy/ClockPicker/ClockPicker.js +3 -3
- package/legacy/ClockPicker/shared.js +1 -1
- package/legacy/DatePicker/DatePicker.js +7 -7
- package/legacy/DateRangePicker/DateRangePicker.js +5 -5
- package/legacy/DateRangePickerDay/DateRangePickerDay.js +2 -2
- package/legacy/DateTimePicker/DateTimePicker.js +9 -9
- package/legacy/DateTimePicker/DateTimePickerToolbar.js +30 -15
- package/legacy/DesktopDatePicker/DesktopDatePicker.js +6 -6
- package/legacy/DesktopDateRangePicker/DesktopDateRangePicker.js +5 -5
- package/legacy/DesktopDateTimePicker/DesktopDateTimePicker.js +8 -8
- package/legacy/DesktopTimePicker/DesktopTimePicker.js +5 -5
- package/legacy/LoadingButton/LoadingButton.js +2 -2
- package/legacy/Masonry/Masonry.js +1 -1
- package/legacy/MasonryItem/MasonryItem.js +18 -30
- package/legacy/MobileDatePicker/MobileDatePicker.js +4 -4
- package/legacy/MobileDateRangePicker/MobileDateRangePicker.js +3 -3
- package/legacy/MobileDateTimePicker/MobileDateTimePicker.js +6 -6
- package/legacy/MobileTimePicker/MobileTimePicker.js +3 -3
- package/legacy/MonthPicker/MonthPicker.js +2 -2
- package/legacy/Pagination/Pagination.js +1 -1
- package/legacy/PaginationItem/PaginationItem.js +1 -1
- package/legacy/PickersDay/PickersDay.js +3 -3
- package/legacy/Rating/Rating.js +1 -1
- package/legacy/Skeleton/Skeleton.js +1 -1
- package/legacy/SpeedDial/SpeedDial.js +1 -1
- package/legacy/SpeedDialAction/SpeedDialAction.js +1 -1
- package/legacy/SpeedDialIcon/SpeedDialIcon.js +1 -1
- package/legacy/StaticDatePicker/StaticDatePicker.js +4 -4
- package/legacy/StaticDateRangePicker/StaticDateRangePicker.js +3 -3
- package/legacy/StaticDateTimePicker/StaticDateTimePicker.js +6 -6
- package/legacy/StaticTimePicker/StaticTimePicker.js +3 -3
- package/legacy/TimePicker/TimePicker.js +6 -6
- package/legacy/Timeline/Timeline.js +4 -4
- package/legacy/ToggleButton/ToggleButton.js +1 -1
- package/legacy/ToggleButtonGroup/ToggleButtonGroup.js +1 -1
- package/legacy/TreeItem/TreeItem.js +1 -1
- package/legacy/YearPicker/PickersYear.js +1 -1
- package/legacy/YearPicker/YearPicker.js +2 -2
- package/legacy/index.js +1 -1
- package/legacy/internal/pickers/hooks/date-helpers-hooks.js +1 -1
- package/modern/Alert/Alert.js +1 -1
- package/modern/AlertTitle/AlertTitle.js +1 -1
- package/modern/Autocomplete/Autocomplete.js +1 -1
- package/modern/AvatarGroup/AvatarGroup.js +1 -1
- package/modern/CalendarPicker/CalendarPicker.js +2 -2
- package/modern/CalendarPicker/PickersCalendarHeader.js +0 -1
- package/modern/CalendarPickerSkeleton/CalendarPickerSkeleton.js +4 -4
- package/modern/ClockPicker/Clock.js +3 -3
- package/modern/ClockPicker/ClockPicker.js +3 -3
- package/modern/ClockPicker/shared.js +1 -1
- package/modern/DatePicker/DatePicker.js +7 -7
- package/modern/DateRangePicker/DateRangePicker.js +5 -5
- package/modern/DateRangePickerDay/DateRangePickerDay.js +2 -2
- package/modern/DateTimePicker/DateTimePicker.js +9 -9
- package/modern/DateTimePicker/DateTimePickerToolbar.js +27 -14
- package/modern/DesktopDatePicker/DesktopDatePicker.js +6 -6
- package/modern/DesktopDateRangePicker/DesktopDateRangePicker.js +5 -5
- package/modern/DesktopDateTimePicker/DesktopDateTimePicker.js +8 -8
- package/modern/DesktopTimePicker/DesktopTimePicker.js +5 -5
- package/modern/LoadingButton/LoadingButton.js +2 -2
- package/modern/Masonry/Masonry.js +1 -1
- package/modern/MasonryItem/MasonryItem.js +15 -27
- package/modern/MobileDatePicker/MobileDatePicker.js +4 -4
- package/modern/MobileDateRangePicker/MobileDateRangePicker.js +3 -3
- package/modern/MobileDateTimePicker/MobileDateTimePicker.js +6 -6
- package/modern/MobileTimePicker/MobileTimePicker.js +3 -3
- package/modern/MonthPicker/MonthPicker.js +2 -2
- package/modern/Pagination/Pagination.js +1 -1
- package/modern/PaginationItem/PaginationItem.js +1 -1
- package/modern/PickersDay/PickersDay.js +3 -3
- package/modern/Rating/Rating.js +1 -1
- package/modern/Skeleton/Skeleton.js +1 -1
- package/modern/SpeedDial/SpeedDial.js +1 -1
- package/modern/SpeedDialAction/SpeedDialAction.js +1 -1
- package/modern/SpeedDialIcon/SpeedDialIcon.js +1 -1
- package/modern/StaticDatePicker/StaticDatePicker.js +4 -4
- package/modern/StaticDateRangePicker/StaticDateRangePicker.js +3 -3
- package/modern/StaticDateTimePicker/StaticDateTimePicker.js +6 -6
- package/modern/StaticTimePicker/StaticTimePicker.js +3 -3
- package/modern/TimePicker/TimePicker.js +6 -6
- package/modern/Timeline/Timeline.js +4 -4
- package/modern/ToggleButton/ToggleButton.js +1 -1
- package/modern/ToggleButtonGroup/ToggleButtonGroup.js +1 -1
- package/modern/TreeItem/TreeItem.js +1 -1
- package/modern/YearPicker/PickersYear.js +1 -1
- package/modern/YearPicker/YearPicker.js +2 -2
- package/modern/index.js +1 -1
- package/modern/internal/pickers/hooks/date-helpers-hooks.js +1 -1
- package/node/Alert/Alert.js +1 -1
- package/node/AlertTitle/AlertTitle.js +1 -1
- package/node/Autocomplete/Autocomplete.js +1 -1
- package/node/AvatarGroup/AvatarGroup.js +1 -1
- package/node/CalendarPicker/CalendarPicker.js +2 -2
- package/node/CalendarPicker/PickersCalendarHeader.js +0 -1
- package/node/CalendarPickerSkeleton/CalendarPickerSkeleton.js +4 -4
- package/node/ClockPicker/Clock.js +3 -3
- package/node/ClockPicker/ClockPicker.js +3 -3
- package/node/ClockPicker/shared.js +1 -1
- package/node/DatePicker/DatePicker.js +7 -7
- package/node/DateRangePicker/DateRangePicker.js +5 -5
- package/node/DateRangePickerDay/DateRangePickerDay.js +2 -2
- package/node/DateTimePicker/DateTimePicker.js +9 -9
- package/node/DateTimePicker/DateTimePickerToolbar.js +27 -14
- package/node/DesktopDatePicker/DesktopDatePicker.js +6 -6
- package/node/DesktopDateRangePicker/DesktopDateRangePicker.js +5 -5
- package/node/DesktopDateTimePicker/DesktopDateTimePicker.js +8 -8
- package/node/DesktopTimePicker/DesktopTimePicker.js +5 -5
- package/node/LoadingButton/LoadingButton.js +2 -2
- package/node/Masonry/Masonry.js +1 -1
- package/node/MasonryItem/MasonryItem.js +14 -26
- package/node/MobileDatePicker/MobileDatePicker.js +4 -4
- package/node/MobileDateRangePicker/MobileDateRangePicker.js +3 -3
- package/node/MobileDateTimePicker/MobileDateTimePicker.js +6 -6
- package/node/MobileTimePicker/MobileTimePicker.js +3 -3
- package/node/MonthPicker/MonthPicker.js +2 -2
- package/node/Pagination/Pagination.js +1 -1
- package/node/PaginationItem/PaginationItem.js +1 -1
- package/node/PickersDay/PickersDay.js +3 -3
- package/node/Rating/Rating.js +1 -1
- package/node/Skeleton/Skeleton.js +1 -1
- package/node/SpeedDial/SpeedDial.js +1 -1
- package/node/SpeedDialAction/SpeedDialAction.js +1 -1
- package/node/SpeedDialIcon/SpeedDialIcon.js +1 -1
- package/node/StaticDatePicker/StaticDatePicker.js +4 -4
- package/node/StaticDateRangePicker/StaticDateRangePicker.js +3 -3
- package/node/StaticDateTimePicker/StaticDateTimePicker.js +6 -6
- package/node/StaticTimePicker/StaticTimePicker.js +3 -3
- package/node/TimePicker/TimePicker.js +6 -6
- package/node/Timeline/Timeline.js +4 -4
- package/node/ToggleButton/ToggleButton.js +1 -1
- package/node/ToggleButtonGroup/ToggleButtonGroup.js +1 -1
- package/node/TreeItem/TreeItem.js +1 -1
- package/node/YearPicker/PickersYear.js +1 -1
- package/node/YearPicker/YearPicker.js +2 -2
- package/node/index.js +1 -1
- package/node/internal/pickers/hooks/date-helpers-hooks.js +1 -1
- package/package.json +13 -13
|
@@ -87,10 +87,10 @@ declare const _default: <TDate>(props: CalendarPickerPropsWithClasses<TDate> & R
|
|
|
87
87
|
*
|
|
88
88
|
* Demos:
|
|
89
89
|
*
|
|
90
|
-
* - [Date Picker](https://
|
|
90
|
+
* - [Date Picker](https://mui.com/components/date-picker/)
|
|
91
91
|
*
|
|
92
92
|
* API:
|
|
93
93
|
*
|
|
94
|
-
* - [CalendarPicker API](https://
|
|
94
|
+
* - [CalendarPicker API](https://mui.com/api/calendar-picker/)
|
|
95
95
|
*/
|
|
96
96
|
export default _default;
|
|
@@ -316,11 +316,11 @@ process.env.NODE_ENV !== "production" ? CalendarPicker.propTypes
|
|
|
316
316
|
*
|
|
317
317
|
* Demos:
|
|
318
318
|
*
|
|
319
|
-
* - [Date Picker](https://
|
|
319
|
+
* - [Date Picker](https://mui.com/components/date-picker/)
|
|
320
320
|
*
|
|
321
321
|
* API:
|
|
322
322
|
*
|
|
323
|
-
* - [CalendarPicker API](https://
|
|
323
|
+
* - [CalendarPicker API](https://mui.com/api/calendar-picker/)
|
|
324
324
|
*/
|
|
325
325
|
|
|
326
326
|
export default CalendarPicker;
|
|
@@ -15,7 +15,7 @@ export interface ExportedCalendarProps<TDate> extends Pick<PickersDayProps<TDate
|
|
|
15
15
|
*/
|
|
16
16
|
onChange: PickerOnChangeFn<TDate>;
|
|
17
17
|
/**
|
|
18
|
-
* Custom renderer for day. Check the [PickersDay](https://
|
|
18
|
+
* Custom renderer for day. Check the [PickersDay](https://mui.com/api/pickers-day/) component.
|
|
19
19
|
*/
|
|
20
20
|
renderDay?: (day: TDate, selectedDates: Array<TDate | null>, pickersDayProps: PickersDayProps<TDate>) => JSX.Element;
|
|
21
21
|
/**
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
import IconButton from '@mui/material/IconButton';
|
|
2
3
|
import { SlideDirection } from './PickersSlideTransition';
|
|
3
4
|
import { DateValidationProps } from '../internal/pickers/date-utils';
|
|
4
5
|
import { ExportedArrowSwitcherProps } from '../internal/pickers/PickersArrowSwitcher';
|
|
5
6
|
import { CalendarPickerView } from './shared';
|
|
6
7
|
export declare type ExportedCalendarHeaderProps<TDate> = Pick<PickersCalendarHeaderProps<TDate>, 'components' | 'componentsProps' | 'getViewSwitchingButtonText' | 'leftArrowButtonText' | 'rightArrowButtonText'>;
|
|
8
|
+
export interface PickersCalendarHeaderComponentsPropsOverides {
|
|
9
|
+
}
|
|
7
10
|
export interface PickersCalendarHeaderProps<TDate> extends ExportedArrowSwitcherProps, Omit<DateValidationProps<TDate>, 'shouldDisableDate'> {
|
|
8
11
|
/**
|
|
9
12
|
* The components used for each slot.
|
|
@@ -19,7 +22,7 @@ export interface PickersCalendarHeaderProps<TDate> extends ExportedArrowSwitcher
|
|
|
19
22
|
* @default {}
|
|
20
23
|
*/
|
|
21
24
|
componentsProps?: ExportedArrowSwitcherProps['componentsProps'] & {
|
|
22
|
-
switchViewButton?:
|
|
25
|
+
switchViewButton?: React.ComponentPropsWithRef<typeof IconButton> & PickersCalendarHeaderComponentsPropsOverides;
|
|
23
26
|
};
|
|
24
27
|
currentMonth: TDate;
|
|
25
28
|
views: readonly CalendarPickerView[];
|
|
@@ -150,7 +150,6 @@ function PickersCalendarHeader(props) {
|
|
|
150
150
|
as: components.SwitchViewButton,
|
|
151
151
|
"aria-label": getViewSwitchingButtonText(currentView)
|
|
152
152
|
}, switchViewButtonProps, {
|
|
153
|
-
ownerState: _extends({}, ownerState, switchViewButtonProps),
|
|
154
153
|
children: /*#__PURE__*/_jsx(PickersCalendarHeaderSwitchView, {
|
|
155
154
|
as: components.SwitchViewIcon,
|
|
156
155
|
ownerState: ownerState
|
|
@@ -27,11 +27,11 @@ export declare const calendarPickerSkeletonClasses: CalendarPickerSkeletonClasse
|
|
|
27
27
|
*
|
|
28
28
|
* Demos:
|
|
29
29
|
*
|
|
30
|
-
* - [Date Picker](https://
|
|
30
|
+
* - [Date Picker](https://mui.com/components/date-picker/)
|
|
31
31
|
*
|
|
32
32
|
* API:
|
|
33
33
|
*
|
|
34
|
-
* - [CalendarPickerSkeleton API](https://
|
|
34
|
+
* - [CalendarPickerSkeleton API](https://mui.com/api/calendar-picker-skeleton/)
|
|
35
35
|
*/
|
|
36
36
|
declare function CalendarPickerSkeleton(props: CalendarPickerSkeletonProps): JSX.Element;
|
|
37
37
|
declare namespace CalendarPickerSkeleton {
|
|
@@ -76,11 +76,11 @@ const monthMap = [[0, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1,
|
|
|
76
76
|
*
|
|
77
77
|
* Demos:
|
|
78
78
|
*
|
|
79
|
-
* - [Date Picker](https://
|
|
79
|
+
* - [Date Picker](https://mui.com/components/date-picker/)
|
|
80
80
|
*
|
|
81
81
|
* API:
|
|
82
82
|
*
|
|
83
|
-
* - [CalendarPickerSkeleton API](https://
|
|
83
|
+
* - [CalendarPickerSkeleton API](https://mui.com/api/calendar-picker-skeleton/)
|
|
84
84
|
*/
|
|
85
85
|
|
|
86
86
|
function CalendarPickerSkeleton(props) {
|
|
@@ -115,11 +115,11 @@ function CalendarPickerSkeleton(props) {
|
|
|
115
115
|
*
|
|
116
116
|
* Demos:
|
|
117
117
|
*
|
|
118
|
-
* - [Date Picker](https://
|
|
118
|
+
* - [Date Picker](https://mui.com/components/date-picker/)
|
|
119
119
|
*
|
|
120
120
|
* API:
|
|
121
121
|
*
|
|
122
|
-
* - [CalendarPickerSkeleton API](https://
|
|
122
|
+
* - [CalendarPickerSkeleton API](https://mui.com/api/calendar-picker-skeleton/)
|
|
123
123
|
*/
|
|
124
124
|
|
|
125
125
|
|
package/ClockPicker/Clock.js
CHANGED
|
@@ -75,7 +75,7 @@ const ClockAmButton = styled(IconButton, {
|
|
|
75
75
|
}) => _extends({
|
|
76
76
|
zIndex: 1,
|
|
77
77
|
position: 'absolute',
|
|
78
|
-
bottom: 8,
|
|
78
|
+
bottom: ownerState.ampmInClock ? 64 : 8,
|
|
79
79
|
left: 8
|
|
80
80
|
}, ownerState.meridiemMode === 'am' && {
|
|
81
81
|
backgroundColor: theme.palette.primary.main,
|
|
@@ -92,7 +92,7 @@ const ClockPmButton = styled(IconButton, {
|
|
|
92
92
|
}) => _extends({
|
|
93
93
|
zIndex: 1,
|
|
94
94
|
position: 'absolute',
|
|
95
|
-
bottom: 8,
|
|
95
|
+
bottom: ownerState.ampmInClock ? 64 : 8,
|
|
96
96
|
right: 8
|
|
97
97
|
}, ownerState.meridiemMode === 'pm' && {
|
|
98
98
|
backgroundColor: theme.palette.primary.main,
|
|
@@ -193,7 +193,7 @@ function Clock(props) {
|
|
|
193
193
|
|
|
194
194
|
useEnhancedEffect(() => {
|
|
195
195
|
if (autoFocus) {
|
|
196
|
-
// The ref not being resolved would be a bug in
|
|
196
|
+
// The ref not being resolved would be a bug in MUI.
|
|
197
197
|
listboxRef.current.focus();
|
|
198
198
|
}
|
|
199
199
|
}, [autoFocus]);
|
|
@@ -8,6 +8,8 @@ export interface ClockPickerClasses {
|
|
|
8
8
|
arrowSwitcher: string;
|
|
9
9
|
}
|
|
10
10
|
export declare type ClockPickerClassKey = keyof ClockPickerClasses;
|
|
11
|
+
export interface ClockPickerComponentsPropsOverrides {
|
|
12
|
+
}
|
|
11
13
|
export declare function getClockPickerUtilityClass(slot: string): string;
|
|
12
14
|
export declare const clockPickerClasses: ClockPickerClasses;
|
|
13
15
|
export interface ExportedClockPickerProps<TDate> extends TimeValidationProps<TDate> {
|
|
@@ -62,8 +64,8 @@ export interface ClockPickerProps<TDate> extends ExportedClockPickerProps<TDate>
|
|
|
62
64
|
* The props used for each slot inside.
|
|
63
65
|
*/
|
|
64
66
|
componentsProps?: {
|
|
65
|
-
leftArrowButton?:
|
|
66
|
-
rightArrowButton?:
|
|
67
|
+
leftArrowButton?: React.SVGAttributes<SVGSVGElement> & ClockPickerComponentsPropsOverrides;
|
|
68
|
+
rightArrowButton?: React.SVGAttributes<SVGSVGElement> & ClockPickerComponentsPropsOverrides;
|
|
67
69
|
};
|
|
68
70
|
/**
|
|
69
71
|
* Selected date @DateIOType.
|
|
@@ -110,10 +112,10 @@ declare const _default: <TDate>(props: ClockPickerProps<TDate>) => JSX.Element;
|
|
|
110
112
|
*
|
|
111
113
|
* Demos:
|
|
112
114
|
*
|
|
113
|
-
* - [Time Picker](https://
|
|
115
|
+
* - [Time Picker](https://mui.com/components/time-picker/)
|
|
114
116
|
*
|
|
115
117
|
* API:
|
|
116
118
|
*
|
|
117
|
-
* - [ClockPicker API](https://
|
|
119
|
+
* - [ClockPicker API](https://mui.com/api/clock-picker/)
|
|
118
120
|
*/
|
|
119
121
|
export default _default;
|
|
@@ -49,7 +49,7 @@ const defaultGetSecondsClockNumberText = seconds => `${seconds} seconds`;
|
|
|
49
49
|
*
|
|
50
50
|
* API:
|
|
51
51
|
*
|
|
52
|
-
* - [ClockPicker API](https://
|
|
52
|
+
* - [ClockPicker API](https://mui.com/api/clock-picker/)
|
|
53
53
|
*/
|
|
54
54
|
|
|
55
55
|
|
|
@@ -385,11 +385,11 @@ process.env.NODE_ENV !== "production" ? ClockPicker.propTypes
|
|
|
385
385
|
*
|
|
386
386
|
* Demos:
|
|
387
387
|
*
|
|
388
|
-
* - [Time Picker](https://
|
|
388
|
+
* - [Time Picker](https://mui.com/components/time-picker/)
|
|
389
389
|
*
|
|
390
390
|
* API:
|
|
391
391
|
*
|
|
392
|
-
* - [ClockPicker API](https://
|
|
392
|
+
* - [ClockPicker API](https://mui.com/api/clock-picker/)
|
|
393
393
|
*/
|
|
394
394
|
|
|
395
395
|
export default ClockPicker;
|
package/ClockPicker/shared.js
CHANGED
|
@@ -16,12 +16,12 @@ declare type DatePickerComponent = (<TDate>(props: DatePickerProps<TDate> & Reac
|
|
|
16
16
|
*
|
|
17
17
|
* Demos:
|
|
18
18
|
*
|
|
19
|
-
* - [Date Picker](https://
|
|
20
|
-
* - [Pickers](https://
|
|
19
|
+
* - [Date Picker](https://mui.com/components/date-picker/)
|
|
20
|
+
* - [Pickers](https://mui.com/components/pickers/)
|
|
21
21
|
*
|
|
22
22
|
* API:
|
|
23
23
|
*
|
|
24
|
-
* - [DatePicker API](https://
|
|
24
|
+
* - [DatePicker API](https://mui.com/api/date-picker/)
|
|
25
25
|
*/
|
|
26
26
|
declare const DatePicker: DatePickerComponent;
|
|
27
27
|
export default DatePicker;
|
package/DatePicker/DatePicker.js
CHANGED
|
@@ -13,12 +13,12 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
13
13
|
*
|
|
14
14
|
* Demos:
|
|
15
15
|
*
|
|
16
|
-
* - [Date Picker](https://
|
|
17
|
-
* - [Pickers](https://
|
|
16
|
+
* - [Date Picker](https://mui.com/components/date-picker/)
|
|
17
|
+
* - [Pickers](https://mui.com/components/pickers/)
|
|
18
18
|
*
|
|
19
19
|
* API:
|
|
20
20
|
*
|
|
21
|
-
* - [DatePicker API](https://
|
|
21
|
+
* - [DatePicker API](https://mui.com/api/date-picker/)
|
|
22
22
|
*/
|
|
23
23
|
const DatePicker = /*#__PURE__*/React.forwardRef(function DatePicker(inProps, ref) {
|
|
24
24
|
const props = useThemeProps({
|
|
@@ -335,7 +335,7 @@ process.env.NODE_ENV !== "production" ? DatePicker.propTypes
|
|
|
335
335
|
orientation: PropTypes.oneOf(['landscape', 'portrait']),
|
|
336
336
|
|
|
337
337
|
/**
|
|
338
|
-
* Popper props passed down to [Popper](https://
|
|
338
|
+
* Popper props passed down to [Popper](https://mui.com/api/popper/) component.
|
|
339
339
|
*/
|
|
340
340
|
PopperProps: PropTypes.object,
|
|
341
341
|
|
|
@@ -351,13 +351,13 @@ process.env.NODE_ENV !== "production" ? DatePicker.propTypes
|
|
|
351
351
|
reduceAnimations: PropTypes.bool,
|
|
352
352
|
|
|
353
353
|
/**
|
|
354
|
-
* Custom renderer for day. Check the [PickersDay](https://
|
|
354
|
+
* Custom renderer for day. Check the [PickersDay](https://mui.com/api/pickers-day/) component.
|
|
355
355
|
*/
|
|
356
356
|
renderDay: PropTypes.func,
|
|
357
357
|
|
|
358
358
|
/**
|
|
359
359
|
* The `renderInput` prop allows you to customize the rendered input.
|
|
360
|
-
* The `props` argument of this render prop contains props of [TextField](https://
|
|
360
|
+
* The `props` argument of this render prop contains props of [TextField](https://mui.com/api/text-field/#textfield-api) that you need to forward.
|
|
361
361
|
* Pay specific attention to the `ref` and `inputProps` keys.
|
|
362
362
|
* @example ```jsx
|
|
363
363
|
* renderInput={props => <TextField {...props} />}
|
|
@@ -439,7 +439,7 @@ process.env.NODE_ENV !== "production" ? DatePicker.propTypes
|
|
|
439
439
|
toolbarTitle: PropTypes.node,
|
|
440
440
|
|
|
441
441
|
/**
|
|
442
|
-
* Custom component for popper [Transition](https://
|
|
442
|
+
* Custom component for popper [Transition](https://mui.com/components/transitions/#transitioncomponent-prop).
|
|
443
443
|
*/
|
|
444
444
|
TransitionComponent: PropTypes.elementType,
|
|
445
445
|
|
|
@@ -55,11 +55,11 @@ declare type DateRangePickerComponent = (<TDate>(props: DateRangePickerProps<TDa
|
|
|
55
55
|
*
|
|
56
56
|
* Demos:
|
|
57
57
|
*
|
|
58
|
-
* - [Date Range Picker](https://
|
|
58
|
+
* - [Date Range Picker](https://mui.com/components/date-range-picker/)
|
|
59
59
|
*
|
|
60
60
|
* API:
|
|
61
61
|
*
|
|
62
|
-
* - [DateRangePicker API](https://
|
|
62
|
+
* - [DateRangePicker API](https://mui.com/api/date-range-picker/)
|
|
63
63
|
*/
|
|
64
64
|
declare const DateRangePicker: DateRangePickerComponent;
|
|
65
65
|
export default DateRangePicker;
|
|
@@ -24,11 +24,11 @@ const rangePickerValueManager = {
|
|
|
24
24
|
*
|
|
25
25
|
* Demos:
|
|
26
26
|
*
|
|
27
|
-
* - [Date Range Picker](https://
|
|
27
|
+
* - [Date Range Picker](https://mui.com/components/date-range-picker/)
|
|
28
28
|
*
|
|
29
29
|
* API:
|
|
30
30
|
*
|
|
31
|
-
* - [DateRangePicker API](https://
|
|
31
|
+
* - [DateRangePicker API](https://mui.com/api/date-range-picker/)
|
|
32
32
|
*/
|
|
33
33
|
const DateRangePicker = /*#__PURE__*/React.forwardRef(function DateRangePicker(inProps, ref) {
|
|
34
34
|
const props = useThemeProps({
|
|
@@ -388,7 +388,7 @@ process.env.NODE_ENV !== "production" ? DateRangePicker.propTypes
|
|
|
388
388
|
orientation: PropTypes.oneOf(['landscape', 'portrait']),
|
|
389
389
|
|
|
390
390
|
/**
|
|
391
|
-
* Popper props passed down to [Popper](https://
|
|
391
|
+
* Popper props passed down to [Popper](https://mui.com/api/popper/) component.
|
|
392
392
|
*/
|
|
393
393
|
PopperProps: PropTypes.object,
|
|
394
394
|
|
|
@@ -411,7 +411,7 @@ process.env.NODE_ENV !== "production" ? DateRangePicker.propTypes
|
|
|
411
411
|
|
|
412
412
|
/**
|
|
413
413
|
* The `renderInput` prop allows you to customize the rendered input.
|
|
414
|
-
* The `startProps` and `endProps` arguments of this render prop contains props of [TextField](https://
|
|
414
|
+
* The `startProps` and `endProps` arguments of this render prop contains props of [TextField](https://mui.com/api/text-field/#textfield-api),
|
|
415
415
|
* that you need to forward to the range start/end inputs respectively.
|
|
416
416
|
* Pay specific attention to the `ref` and `inputProps` keys.
|
|
417
417
|
* @example
|
|
@@ -508,7 +508,7 @@ process.env.NODE_ENV !== "production" ? DateRangePicker.propTypes
|
|
|
508
508
|
toolbarTitle: PropTypes.node,
|
|
509
509
|
|
|
510
510
|
/**
|
|
511
|
-
* Custom component for popper [Transition](https://
|
|
511
|
+
* Custom component for popper [Transition](https://mui.com/components/transitions/#transitioncomponent-prop).
|
|
512
512
|
*/
|
|
513
513
|
TransitionComponent: PropTypes.elementType,
|
|
514
514
|
|
|
@@ -5,7 +5,7 @@ import { DateInputProps, ExportedDateInputProps, MuiTextFieldProps } from '../in
|
|
|
5
5
|
export interface ExportedDateRangePickerInputProps extends Omit<ExportedDateInputProps<RangeInput<any>, DateRange<any>>, 'renderInput'> {
|
|
6
6
|
/**
|
|
7
7
|
* The `renderInput` prop allows you to customize the rendered input.
|
|
8
|
-
* The `startProps` and `endProps` arguments of this render prop contains props of [TextField](https://
|
|
8
|
+
* The `startProps` and `endProps` arguments of this render prop contains props of [TextField](https://mui.com/api/text-field/#textfield-api),
|
|
9
9
|
* that you need to forward to the range start/end inputs respectively.
|
|
10
10
|
* Pay specific attention to the `ref` and `inputProps` keys.
|
|
11
11
|
* @example
|
|
@@ -70,10 +70,10 @@ declare const _default: <TDate>(props: DateRangePickerDayProps<TDate> & React.Re
|
|
|
70
70
|
*
|
|
71
71
|
* Demos:
|
|
72
72
|
*
|
|
73
|
-
* - [Date Range Picker](https://
|
|
73
|
+
* - [Date Range Picker](https://mui.com/components/date-range-picker/)
|
|
74
74
|
*
|
|
75
75
|
* API:
|
|
76
76
|
*
|
|
77
|
-
* - [DateRangePickerDay API](https://
|
|
77
|
+
* - [DateRangePickerDay API](https://mui.com/api/date-range-picker-day/)
|
|
78
78
|
*/
|
|
79
79
|
export default _default;
|
|
@@ -234,11 +234,11 @@ process.env.NODE_ENV !== "production" ? DateRangePickerDay.propTypes
|
|
|
234
234
|
*
|
|
235
235
|
* Demos:
|
|
236
236
|
*
|
|
237
|
-
* - [Date Range Picker](https://
|
|
237
|
+
* - [Date Range Picker](https://mui.com/components/date-range-picker/)
|
|
238
238
|
*
|
|
239
239
|
* API:
|
|
240
240
|
*
|
|
241
|
-
* - [DateRangePickerDay API](https://
|
|
241
|
+
* - [DateRangePickerDay API](https://mui.com/api/date-range-picker-day/)
|
|
242
242
|
*/
|
|
243
243
|
|
|
244
244
|
export default /*#__PURE__*/React.memo(DateRangePickerDay, (prevProps, nextProps) => {
|
|
@@ -16,12 +16,12 @@ declare type DateTimePickerComponent = (<TDate>(props: DateTimePickerProps<TDate
|
|
|
16
16
|
*
|
|
17
17
|
* Demos:
|
|
18
18
|
*
|
|
19
|
-
* - [Date Time Picker](https://
|
|
20
|
-
* - [Pickers](https://
|
|
19
|
+
* - [Date Time Picker](https://mui.com/components/date-time-picker/)
|
|
20
|
+
* - [Pickers](https://mui.com/components/pickers/)
|
|
21
21
|
*
|
|
22
22
|
* API:
|
|
23
23
|
*
|
|
24
|
-
* - [DateTimePicker API](https://
|
|
24
|
+
* - [DateTimePicker API](https://mui.com/api/date-time-picker/)
|
|
25
25
|
*/
|
|
26
26
|
declare const DateTimePicker: DateTimePickerComponent;
|
|
27
27
|
export default DateTimePicker;
|
|
@@ -13,12 +13,12 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
13
13
|
*
|
|
14
14
|
* Demos:
|
|
15
15
|
*
|
|
16
|
-
* - [Date Time Picker](https://
|
|
17
|
-
* - [Pickers](https://
|
|
16
|
+
* - [Date Time Picker](https://mui.com/components/date-time-picker/)
|
|
17
|
+
* - [Pickers](https://mui.com/components/pickers/)
|
|
18
18
|
*
|
|
19
19
|
* API:
|
|
20
20
|
*
|
|
21
|
-
* - [DateTimePicker API](https://
|
|
21
|
+
* - [DateTimePicker API](https://mui.com/api/date-time-picker/)
|
|
22
22
|
*/
|
|
23
23
|
const DateTimePicker = /*#__PURE__*/React.forwardRef(function DateTimePicker(inProps, ref) {
|
|
24
24
|
const props = useThemeProps({
|
|
@@ -396,7 +396,7 @@ process.env.NODE_ENV !== "production" ? DateTimePicker.propTypes
|
|
|
396
396
|
/**
|
|
397
397
|
* First view to show.
|
|
398
398
|
*/
|
|
399
|
-
openTo: PropTypes.oneOf(['day', 'hours', 'minutes', 'month', 'year']),
|
|
399
|
+
openTo: PropTypes.oneOf(['day', 'hours', 'minutes', 'month', 'seconds', 'year']),
|
|
400
400
|
|
|
401
401
|
/**
|
|
402
402
|
* Force rendering in particular orientation.
|
|
@@ -404,7 +404,7 @@ process.env.NODE_ENV !== "production" ? DateTimePicker.propTypes
|
|
|
404
404
|
orientation: PropTypes.oneOf(['landscape', 'portrait']),
|
|
405
405
|
|
|
406
406
|
/**
|
|
407
|
-
* Popper props passed down to [Popper](https://
|
|
407
|
+
* Popper props passed down to [Popper](https://mui.com/api/popper/) component.
|
|
408
408
|
*/
|
|
409
409
|
PopperProps: PropTypes.object,
|
|
410
410
|
|
|
@@ -420,13 +420,13 @@ process.env.NODE_ENV !== "production" ? DateTimePicker.propTypes
|
|
|
420
420
|
reduceAnimations: PropTypes.bool,
|
|
421
421
|
|
|
422
422
|
/**
|
|
423
|
-
* Custom renderer for day. Check the [PickersDay](https://
|
|
423
|
+
* Custom renderer for day. Check the [PickersDay](https://mui.com/api/pickers-day/) component.
|
|
424
424
|
*/
|
|
425
425
|
renderDay: PropTypes.func,
|
|
426
426
|
|
|
427
427
|
/**
|
|
428
428
|
* The `renderInput` prop allows you to customize the rendered input.
|
|
429
|
-
* The `props` argument of this render prop contains props of [TextField](https://
|
|
429
|
+
* The `props` argument of this render prop contains props of [TextField](https://mui.com/api/text-field/#textfield-api) that you need to forward.
|
|
430
430
|
* Pay specific attention to the `ref` and `inputProps` keys.
|
|
431
431
|
* @example ```jsx
|
|
432
432
|
* renderInput={props => <TextField {...props} />}
|
|
@@ -519,7 +519,7 @@ process.env.NODE_ENV !== "production" ? DateTimePicker.propTypes
|
|
|
519
519
|
toolbarTitle: PropTypes.node,
|
|
520
520
|
|
|
521
521
|
/**
|
|
522
|
-
* Custom component for popper [Transition](https://
|
|
522
|
+
* Custom component for popper [Transition](https://mui.com/components/transitions/#transitioncomponent-prop).
|
|
523
523
|
*/
|
|
524
524
|
TransitionComponent: PropTypes.elementType,
|
|
525
525
|
|
|
@@ -531,6 +531,6 @@ process.env.NODE_ENV !== "production" ? DateTimePicker.propTypes
|
|
|
531
531
|
/**
|
|
532
532
|
* Array of views to show.
|
|
533
533
|
*/
|
|
534
|
-
views: PropTypes.arrayOf(PropTypes.oneOf(['day', 'hours', 'minutes', 'month', 'year']).isRequired)
|
|
534
|
+
views: PropTypes.arrayOf(PropTypes.oneOf(['day', 'hours', 'minutes', 'month', 'seconds', 'year']).isRequired)
|
|
535
535
|
} : void 0;
|
|
536
536
|
export default DateTimePicker;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
3
|
|
|
4
|
-
var _DateTimePickerToolba;
|
|
4
|
+
var _DateTimePickerToolba, _DateTimePickerToolba2;
|
|
5
5
|
|
|
6
|
-
const _excluded = ["ampm", "date", "dateRangeIcon", "hideTabs", "isMobileKeyboardViewOpen", "onChange", "openView", "setOpenView", "timeIcon", "toggleMobileKeyboardView", "toolbarFormat", "toolbarPlaceholder", "toolbarTitle"];
|
|
6
|
+
const _excluded = ["ampm", "date", "dateRangeIcon", "hideTabs", "isMobileKeyboardViewOpen", "onChange", "openView", "setOpenView", "timeIcon", "toggleMobileKeyboardView", "toolbarFormat", "toolbarPlaceholder", "toolbarTitle", "views"];
|
|
7
7
|
import * as React from 'react';
|
|
8
8
|
import { styled } from '@mui/material/styles';
|
|
9
9
|
import { generateUtilityClasses } from '@mui/core';
|
|
@@ -63,7 +63,8 @@ const DateTimePickerToolbar = props => {
|
|
|
63
63
|
toggleMobileKeyboardView,
|
|
64
64
|
toolbarFormat,
|
|
65
65
|
toolbarPlaceholder = '––',
|
|
66
|
-
toolbarTitle = 'Select date & time'
|
|
66
|
+
toolbarTitle = 'Select date & time',
|
|
67
|
+
views
|
|
67
68
|
} = props,
|
|
68
69
|
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
69
70
|
|
|
@@ -93,13 +94,13 @@ const DateTimePickerToolbar = props => {
|
|
|
93
94
|
}, other, {
|
|
94
95
|
isLandscape: false,
|
|
95
96
|
children: [/*#__PURE__*/_jsxs(DateTimePickerToolbarDateContainer, {
|
|
96
|
-
children: [/*#__PURE__*/_jsx(PickersToolbarButton, {
|
|
97
|
+
children: [views.includes('year') && /*#__PURE__*/_jsx(PickersToolbarButton, {
|
|
97
98
|
tabIndex: -1,
|
|
98
99
|
variant: "subtitle1",
|
|
99
100
|
onClick: () => setOpenView('year'),
|
|
100
101
|
selected: openView === 'year',
|
|
101
102
|
value: date ? utils.format(date, 'year') : '–'
|
|
102
|
-
}), /*#__PURE__*/_jsx(PickersToolbarButton, {
|
|
103
|
+
}), views.includes('day') && /*#__PURE__*/_jsx(PickersToolbarButton, {
|
|
103
104
|
tabIndex: -1,
|
|
104
105
|
variant: "h4",
|
|
105
106
|
onClick: () => setOpenView('day'),
|
|
@@ -107,19 +108,31 @@ const DateTimePickerToolbar = props => {
|
|
|
107
108
|
value: dateText
|
|
108
109
|
})]
|
|
109
110
|
}), /*#__PURE__*/_jsxs(DateTimePickerToolbarTimeContainer, {
|
|
110
|
-
children: [/*#__PURE__*/_jsx(PickersToolbarButton, {
|
|
111
|
+
children: [views.includes('hours') && /*#__PURE__*/_jsx(PickersToolbarButton, {
|
|
111
112
|
variant: "h3",
|
|
112
113
|
onClick: () => setOpenView('hours'),
|
|
113
114
|
selected: openView === 'hours',
|
|
114
115
|
value: date ? formatHours(date) : '--'
|
|
115
|
-
}),
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
116
|
+
}), views.includes('minutes') && /*#__PURE__*/_jsxs(React.Fragment, {
|
|
117
|
+
children: [_DateTimePickerToolba || (_DateTimePickerToolba = /*#__PURE__*/_jsx(DateTimePickerToolbarSeparator, {
|
|
118
|
+
variant: "h3",
|
|
119
|
+
value: ":"
|
|
120
|
+
})), /*#__PURE__*/_jsx(PickersToolbarButton, {
|
|
121
|
+
variant: "h3",
|
|
122
|
+
onClick: () => setOpenView('minutes'),
|
|
123
|
+
selected: openView === 'minutes',
|
|
124
|
+
value: date ? utils.format(date, 'minutes') : '--'
|
|
125
|
+
})]
|
|
126
|
+
}), views.includes('seconds') && /*#__PURE__*/_jsxs(React.Fragment, {
|
|
127
|
+
children: [_DateTimePickerToolba2 || (_DateTimePickerToolba2 = /*#__PURE__*/_jsx(DateTimePickerToolbarSeparator, {
|
|
128
|
+
variant: "h3",
|
|
129
|
+
value: ":"
|
|
130
|
+
})), /*#__PURE__*/_jsx(PickersToolbarButton, {
|
|
131
|
+
variant: "h3",
|
|
132
|
+
onClick: () => setOpenView('seconds'),
|
|
133
|
+
selected: openView === 'seconds',
|
|
134
|
+
value: date ? utils.format(date, 'seconds') : '--'
|
|
135
|
+
})]
|
|
123
136
|
})]
|
|
124
137
|
})]
|
|
125
138
|
})), showTabs && /*#__PURE__*/_jsx(DateTimePickerTabs, {
|
|
@@ -5,7 +5,7 @@ import { DateTimeValidationError, ValidationProps } from '../internal/pickers/ho
|
|
|
5
5
|
import { ParseableDate } from '../internal/pickers/constants/prop-types';
|
|
6
6
|
import { BasePickerProps, ToolbarComponentProps } from '../internal/pickers/typings/BasePicker';
|
|
7
7
|
import { ExportedDateInputProps } from '../internal/pickers/PureDateInput';
|
|
8
|
-
export declare type DateTimePickerView = 'year' | 'day' | 'month' | 'hours' | 'minutes';
|
|
8
|
+
export declare type DateTimePickerView = 'year' | 'day' | 'month' | 'hours' | 'minutes' | 'seconds';
|
|
9
9
|
export interface BaseDateTimePickerProps<TDate> extends ExportedClockPickerProps<TDate>, ExportedCalendarPickerProps<TDate>, BasePickerProps<ParseableDate<TDate>, TDate | null>, ValidationProps<DateTimeValidationError, ParseableDate<TDate>>, ExportedDateInputProps<ParseableDate<TDate>, TDate | null> {
|
|
10
10
|
/**
|
|
11
11
|
* The components used for each slot.
|
|
@@ -10,11 +10,11 @@ declare type DesktopDatePickerComponent = (<TDate>(props: DesktopDatePickerProps
|
|
|
10
10
|
*
|
|
11
11
|
* Demos:
|
|
12
12
|
*
|
|
13
|
-
* - [Date Picker](https://
|
|
13
|
+
* - [Date Picker](https://mui.com/components/date-picker/)
|
|
14
14
|
*
|
|
15
15
|
* API:
|
|
16
16
|
*
|
|
17
|
-
* - [DesktopDatePicker API](https://
|
|
17
|
+
* - [DesktopDatePicker API](https://mui.com/api/desktop-date-picker/)
|
|
18
18
|
*/
|
|
19
19
|
declare const DesktopDatePicker: DesktopDatePickerComponent;
|
|
20
20
|
export default DesktopDatePicker;
|
|
@@ -22,11 +22,11 @@ const valueManager = {
|
|
|
22
22
|
*
|
|
23
23
|
* Demos:
|
|
24
24
|
*
|
|
25
|
-
* - [Date Picker](https://
|
|
25
|
+
* - [Date Picker](https://mui.com/components/date-picker/)
|
|
26
26
|
*
|
|
27
27
|
* API:
|
|
28
28
|
*
|
|
29
|
-
* - [DesktopDatePicker API](https://
|
|
29
|
+
* - [DesktopDatePicker API](https://mui.com/api/desktop-date-picker/)
|
|
30
30
|
*/
|
|
31
31
|
const DesktopDatePicker = /*#__PURE__*/React.forwardRef(function DesktopDatePicker(inProps, ref) {
|
|
32
32
|
// TODO: TDate needs to be instantiated at every usage.
|
|
@@ -306,7 +306,7 @@ process.env.NODE_ENV !== "production" ? DesktopDatePicker.propTypes
|
|
|
306
306
|
orientation: PropTypes.oneOf(['landscape', 'portrait']),
|
|
307
307
|
|
|
308
308
|
/**
|
|
309
|
-
* Popper props passed down to [Popper](https://
|
|
309
|
+
* Popper props passed down to [Popper](https://mui.com/api/popper/) component.
|
|
310
310
|
*/
|
|
311
311
|
PopperProps: PropTypes.object,
|
|
312
312
|
|
|
@@ -322,13 +322,13 @@ process.env.NODE_ENV !== "production" ? DesktopDatePicker.propTypes
|
|
|
322
322
|
reduceAnimations: PropTypes.bool,
|
|
323
323
|
|
|
324
324
|
/**
|
|
325
|
-
* Custom renderer for day. Check the [PickersDay](https://
|
|
325
|
+
* Custom renderer for day. Check the [PickersDay](https://mui.com/api/pickers-day/) component.
|
|
326
326
|
*/
|
|
327
327
|
renderDay: PropTypes.func,
|
|
328
328
|
|
|
329
329
|
/**
|
|
330
330
|
* The `renderInput` prop allows you to customize the rendered input.
|
|
331
|
-
* The `props` argument of this render prop contains props of [TextField](https://
|
|
331
|
+
* The `props` argument of this render prop contains props of [TextField](https://mui.com/api/text-field/#textfield-api) that you need to forward.
|
|
332
332
|
* Pay specific attention to the `ref` and `inputProps` keys.
|
|
333
333
|
* @example ```jsx
|
|
334
334
|
* renderInput={props => <TextField {...props} />}
|
|
@@ -398,7 +398,7 @@ process.env.NODE_ENV !== "production" ? DesktopDatePicker.propTypes
|
|
|
398
398
|
toolbarTitle: PropTypes.node,
|
|
399
399
|
|
|
400
400
|
/**
|
|
401
|
-
* Custom component for popper [Transition](https://
|
|
401
|
+
* Custom component for popper [Transition](https://mui.com/components/transitions/#transitioncomponent-prop).
|
|
402
402
|
*/
|
|
403
403
|
TransitionComponent: PropTypes.elementType,
|
|
404
404
|
|
|
@@ -54,11 +54,11 @@ declare type DesktopDateRangePickerComponent = (<TDate>(props: DesktopDateRangeP
|
|
|
54
54
|
*
|
|
55
55
|
* Demos:
|
|
56
56
|
*
|
|
57
|
-
* - [Date Range Picker](https://
|
|
57
|
+
* - [Date Range Picker](https://mui.com/components/date-range-picker/)
|
|
58
58
|
*
|
|
59
59
|
* API:
|
|
60
60
|
*
|
|
61
|
-
* - [DesktopDateRangePicker API](https://
|
|
61
|
+
* - [DesktopDateRangePicker API](https://mui.com/api/desktop-date-range-picker/)
|
|
62
62
|
*/
|
|
63
63
|
declare const DesktopDateRangePicker: DesktopDateRangePickerComponent;
|
|
64
64
|
export default DesktopDateRangePicker;
|