@mui/lab 5.0.0-alpha.67 → 5.0.0-alpha.68
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.d.ts +1 -1
- package/AdapterDayjs/index.d.ts +1 -1
- package/AdapterLuxon/index.d.ts +1 -1
- package/AdapterMoment/index.d.ts +1 -1
- package/CHANGELOG.md +100 -28
- package/CalendarPicker/CalendarPicker.d.ts +106 -106
- package/CalendarPicker/PickersCalendar.d.ts +47 -47
- package/CalendarPicker/PickersCalendarHeader.d.ts +43 -43
- package/CalendarPicker/PickersFadeTransitionGroup.d.ts +12 -12
- package/CalendarPicker/PickersSlideTransition.d.ts +16 -16
- package/CalendarPicker/index.d.ts +5 -5
- package/CalendarPicker/shared.d.ts +1 -1
- package/CalendarPicker/useCalendarState.d.ts +32 -32
- package/CalendarPickerSkeleton/CalendarPickerSkeleton.d.ts +41 -41
- package/CalendarPickerSkeleton/index.d.ts +3 -3
- package/ClockPicker/Clock.d.ts +28 -28
- package/ClockPicker/ClockNumber.d.ts +19 -19
- package/ClockPicker/ClockNumber.js +1 -0
- package/ClockPicker/ClockNumbers.d.ts +24 -24
- package/ClockPicker/ClockPicker.d.ts +121 -121
- package/ClockPicker/ClockPickerStandalone.d.ts +28 -28
- package/ClockPicker/ClockPointer.d.ts +23 -23
- package/ClockPicker/index.d.ts +5 -5
- package/ClockPicker/shared.d.ts +5 -5
- package/DatePicker/DatePicker.d.ts +27 -27
- package/DatePicker/DatePickerToolbar.d.ts +23 -23
- package/DatePicker/index.d.ts +2 -2
- package/DatePicker/shared.d.ts +45 -45
- package/DateRangePicker/DateRangePicker.d.ts +65 -65
- package/DateRangePicker/DateRangePickerInput.d.ts +35 -35
- package/DateRangePicker/DateRangePickerToolbar.d.ts +15 -15
- package/DateRangePicker/DateRangePickerView.d.ts +44 -44
- package/DateRangePicker/DateRangePickerViewDesktop.d.ts +29 -29
- package/DateRangePicker/DateRangePickerViewMobile.d.ts +17 -17
- package/DateRangePicker/RangeTypes.d.ts +8 -8
- package/DateRangePicker/date-range-manager.d.ts +14 -14
- package/DateRangePicker/index.d.ts +3 -3
- package/DateRangePickerDay/DateRangePickerDay.d.ts +79 -79
- package/DateRangePickerDay/index.d.ts +2 -2
- package/DateTimePicker/DateTimePicker.d.ts +27 -27
- package/DateTimePicker/DateTimePickerTabs.d.ts +13 -13
- package/DateTimePicker/DateTimePickerToolbar.d.ts +7 -7
- package/DateTimePicker/index.d.ts +2 -2
- package/DateTimePicker/shared.d.ts +67 -67
- package/DesktopDatePicker/DesktopDatePicker.d.ts +20 -20
- package/DesktopDatePicker/index.d.ts +2 -2
- package/DesktopDateRangePicker/DesktopDateRangePicker.d.ts +64 -64
- package/DesktopDateRangePicker/index.d.ts +2 -2
- package/DesktopDateTimePicker/DesktopDateTimePicker.d.ts +20 -20
- package/DesktopDateTimePicker/index.d.ts +2 -2
- package/DesktopTimePicker/DesktopTimePicker.d.ts +20 -20
- package/DesktopTimePicker/index.d.ts +2 -2
- package/LoadingButton/LoadingButton.js +3 -1
- package/LoadingButton/loadingButtonClasses.d.ts +22 -22
- package/LocalizationProvider/LocalizationProvider.d.ts +35 -35
- package/LocalizationProvider/index.d.ts +2 -2
- package/Masonry/masonryClasses.d.ts +8 -8
- package/MobileDatePicker/MobileDatePicker.d.ts +20 -20
- package/MobileDatePicker/index.d.ts +2 -2
- package/MobileDateRangePicker/MobileDateRangePicker.d.ts +64 -64
- package/MobileDateRangePicker/index.d.ts +2 -2
- package/MobileDateTimePicker/MobileDateTimePicker.d.ts +20 -20
- package/MobileDateTimePicker/index.d.ts +2 -2
- package/MobileTimePicker/MobileTimePicker.d.ts +20 -20
- package/MobileTimePicker/index.d.ts +2 -2
- package/MonthPicker/MonthPicker.d.ts +53 -53
- package/MonthPicker/PickersMonth.d.ts +15 -15
- package/MonthPicker/index.d.ts +3 -3
- package/PickersDay/PickersDay.d.ts +93 -93
- package/PickersDay/index.d.ts +4 -4
- package/StaticDatePicker/StaticDatePicker.d.ts +25 -25
- package/StaticDatePicker/index.d.ts +2 -2
- package/StaticDateRangePicker/StaticDateRangePicker.d.ts +67 -67
- package/StaticDateRangePicker/index.d.ts +2 -2
- package/StaticDateTimePicker/StaticDateTimePicker.d.ts +25 -25
- package/StaticDateTimePicker/index.d.ts +2 -2
- package/StaticTimePicker/StaticTimePicker.d.ts +25 -25
- package/StaticTimePicker/index.d.ts +2 -2
- package/TabPanel/tabPanelClasses.d.ts +8 -8
- package/TimePicker/TimePicker.d.ts +27 -27
- package/TimePicker/TimePickerToolbar.d.ts +23 -23
- package/TimePicker/index.d.ts +2 -2
- package/TimePicker/shared.d.ts +36 -36
- package/Timeline/Timeline.d.ts +59 -59
- package/Timeline/TimelineContext.d.ts +6 -6
- package/Timeline/index.d.ts +5 -5
- package/Timeline/timelineClasses.d.ts +3 -3
- package/TimelineConnector/timelineConnectorClasses.d.ts +8 -8
- package/TimelineContent/timelineContentClasses.d.ts +14 -14
- package/TimelineDot/timelineDotClasses.d.ts +24 -24
- package/TimelineItem/timelineItemClasses.d.ts +16 -16
- package/TimelineOppositeContent/timelineOppositeContentClasses.d.ts +14 -14
- package/TimelineSeparator/timelineSeparatorClasses.d.ts +8 -8
- package/TreeItem/TreeItem.js +1 -1
- package/TreeItem/treeItemClasses.d.ts +24 -24
- package/TreeView/treeViewClasses.d.ts +8 -8
- package/YearPicker/PickersYear.d.ts +28 -28
- package/YearPicker/YearPicker.d.ts +44 -44
- package/YearPicker/index.d.ts +5 -5
- package/YearPicker/yearPickerClasses.d.ts +3 -3
- package/index.js +1 -1
- package/internal/pickers/KeyboardDateInput.d.ts +4 -4
- package/internal/pickers/Picker/Picker.d.ts +33 -33
- package/internal/pickers/Picker/PickerView.d.ts +3 -3
- package/internal/pickers/PickersArrowSwitcher.d.ts +41 -41
- package/internal/pickers/PickersModalDialog.d.ts +47 -47
- package/internal/pickers/PickersModalDialog.js +1 -1
- package/internal/pickers/PickersPopper.d.ts +33 -33
- package/internal/pickers/PickersToolbar.d.ts +14 -14
- package/internal/pickers/PickersToolbarButton.d.ts +13 -13
- package/internal/pickers/PickersToolbarText.d.ts +8 -8
- package/internal/pickers/PureDateInput.d.ts +80 -80
- package/internal/pickers/constants/dimensions.d.ts +4 -4
- package/internal/pickers/constants/prop-types.d.ts +1 -1
- package/internal/pickers/date-time-utils.d.ts +8 -8
- package/internal/pickers/date-utils.d.ts +52 -52
- package/internal/pickers/hooks/date-helpers-hooks.d.ts +16 -16
- package/internal/pickers/hooks/useIsLandscape.d.ts +4 -4
- package/internal/pickers/hooks/useMaskedInput.d.ts +7 -7
- package/internal/pickers/hooks/useOpenState.d.ts +10 -10
- package/internal/pickers/hooks/usePickerState.d.ts +38 -38
- package/internal/pickers/hooks/usePickerState.js +6 -4
- package/internal/pickers/hooks/useUtils.d.ts +7 -7
- package/internal/pickers/hooks/useValidation.d.ts +23 -23
- package/internal/pickers/hooks/useViews.d.ts +19 -19
- package/internal/pickers/text-field-helper.d.ts +11 -11
- package/internal/pickers/time-utils.d.ts +33 -33
- package/internal/pickers/typings/BasePicker.d.ts +95 -95
- package/internal/pickers/typings/Views.d.ts +1 -1
- package/internal/pickers/typings/helpers.d.ts +9 -9
- package/internal/pickers/utils.d.ts +7 -7
- package/internal/pickers/wrappers/DesktopTooltipWrapper.d.ts +4 -4
- package/internal/pickers/wrappers/DesktopWrapper.d.ts +16 -16
- package/internal/pickers/wrappers/MobileWrapper.d.ts +14 -14
- package/internal/pickers/wrappers/PickerStaticWrapper.d.ts +21 -21
- package/internal/pickers/wrappers/ResponsiveWrapper.d.ts +23 -23
- package/internal/pickers/wrappers/WrapperProps.d.ts +13 -13
- package/internal/pickers/wrappers/WrapperVariantContext.d.ts +11 -11
- package/internal/svg-icons/ArrowDropDown.d.ts +7 -7
- package/internal/svg-icons/ArrowLeft.d.ts +7 -7
- package/internal/svg-icons/ArrowRight.d.ts +7 -7
- package/internal/svg-icons/Calendar.d.ts +7 -7
- package/internal/svg-icons/Clock.d.ts +7 -7
- package/internal/svg-icons/DateRange.d.ts +7 -7
- package/internal/svg-icons/Pen.d.ts +7 -7
- package/internal/svg-icons/Time.d.ts +7 -7
- package/legacy/ClockPicker/ClockNumber.js +1 -0
- package/legacy/LoadingButton/LoadingButton.js +3 -1
- package/legacy/TreeItem/TreeItem.js +1 -1
- package/legacy/index.js +1 -1
- package/legacy/internal/pickers/PickersModalDialog.js +1 -1
- package/legacy/internal/pickers/hooks/usePickerState.js +11 -6
- package/modern/ClockPicker/ClockNumber.js +1 -0
- package/modern/LoadingButton/LoadingButton.js +3 -1
- package/modern/TreeItem/TreeItem.js +1 -1
- package/modern/index.js +1 -1
- package/modern/internal/pickers/PickersModalDialog.js +1 -1
- package/modern/internal/pickers/hooks/usePickerState.js +6 -4
- package/node/ClockPicker/ClockNumber.js +1 -0
- package/node/LoadingButton/LoadingButton.js +3 -1
- package/node/TreeItem/TreeItem.js +1 -1
- package/node/index.js +1 -1
- package/node/internal/pickers/PickersModalDialog.js +1 -1
- package/node/internal/pickers/hooks/usePickerState.js +6 -4
- package/package.json +7 -7
|
@@ -1,121 +1,121 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { MuiPickersAdapter } from '../internal/pickers/hooks/useUtils';
|
|
3
|
-
import { TimeValidationProps } from '../internal/pickers/time-utils';
|
|
4
|
-
import { PickerOnChangeFn } from '../internal/pickers/hooks/useViews';
|
|
5
|
-
import { ClockView } from './shared';
|
|
6
|
-
export interface ClockPickerClasses {
|
|
7
|
-
/** Styles applied to the arrowSwitcher element. */
|
|
8
|
-
arrowSwitcher: string;
|
|
9
|
-
}
|
|
10
|
-
export declare type ClockPickerClassKey = keyof ClockPickerClasses;
|
|
11
|
-
export interface ClockPickerComponentsPropsOverrides {
|
|
12
|
-
}
|
|
13
|
-
export declare function getClockPickerUtilityClass(slot: string): string;
|
|
14
|
-
export declare const clockPickerClasses: ClockPickerClasses;
|
|
15
|
-
export interface ExportedClockPickerProps<TDate> extends TimeValidationProps<TDate> {
|
|
16
|
-
/**
|
|
17
|
-
* 12h/24h view for hour selection clock.
|
|
18
|
-
* @default false
|
|
19
|
-
*/
|
|
20
|
-
ampm?: boolean;
|
|
21
|
-
/**
|
|
22
|
-
* Step over minutes.
|
|
23
|
-
* @default 1
|
|
24
|
-
*/
|
|
25
|
-
minutesStep?: number;
|
|
26
|
-
/**
|
|
27
|
-
* Display ampm controls under the clock (instead of in the toolbar).
|
|
28
|
-
* @default false
|
|
29
|
-
*/
|
|
30
|
-
ampmInClock?: boolean;
|
|
31
|
-
/**
|
|
32
|
-
* Accessible text that helps user to understand which time and view is selected.
|
|
33
|
-
* @default <TDate extends any>(
|
|
34
|
-
* view: ClockView,
|
|
35
|
-
* time: TDate | null,
|
|
36
|
-
* adapter: MuiPickersAdapter<TDate>,
|
|
37
|
-
* ) =>
|
|
38
|
-
* `Select ${view}. ${
|
|
39
|
-
* time === null ? 'No time selected' : `Selected time is ${adapter.format(time, 'fullTime')}`
|
|
40
|
-
* }`
|
|
41
|
-
*/
|
|
42
|
-
getClockLabelText?: (view: ClockView, time: TDate | null, adapter: MuiPickersAdapter<TDate>) => string;
|
|
43
|
-
}
|
|
44
|
-
export interface ClockPickerProps<TDate> extends ExportedClockPickerProps<TDate> {
|
|
45
|
-
/**
|
|
46
|
-
* Set to `true` if focus should be moved to clock picker.
|
|
47
|
-
*/
|
|
48
|
-
autoFocus?: boolean;
|
|
49
|
-
/**
|
|
50
|
-
* Override or extend the styles applied to the component.
|
|
51
|
-
*/
|
|
52
|
-
classes?: Partial<ClockPickerClasses>;
|
|
53
|
-
/**
|
|
54
|
-
* The components used for each slot.
|
|
55
|
-
* Either a string to use a HTML element or a component.
|
|
56
|
-
*/
|
|
57
|
-
components?: {
|
|
58
|
-
LeftArrowButton?: React.ElementType;
|
|
59
|
-
LeftArrowIcon?: React.ElementType;
|
|
60
|
-
RightArrowButton?: React.ElementType;
|
|
61
|
-
RightArrowIcon?: React.ElementType;
|
|
62
|
-
};
|
|
63
|
-
/**
|
|
64
|
-
* The props used for each slot inside.
|
|
65
|
-
*/
|
|
66
|
-
componentsProps?: {
|
|
67
|
-
leftArrowButton?: React.SVGAttributes<SVGSVGElement> & ClockPickerComponentsPropsOverrides;
|
|
68
|
-
rightArrowButton?: React.SVGAttributes<SVGSVGElement> & ClockPickerComponentsPropsOverrides;
|
|
69
|
-
};
|
|
70
|
-
/**
|
|
71
|
-
* Selected date @DateIOType.
|
|
72
|
-
*/
|
|
73
|
-
date: TDate | null;
|
|
74
|
-
/**
|
|
75
|
-
* Get clock number aria-text for hours.
|
|
76
|
-
* @default (hours: string) => `${hours} hours`
|
|
77
|
-
*/
|
|
78
|
-
getHoursClockNumberText?: (hours: string) => string;
|
|
79
|
-
/**
|
|
80
|
-
* Get clock number aria-text for minutes.
|
|
81
|
-
* @default (minutes: string) => `${minutes} minutes`
|
|
82
|
-
*/
|
|
83
|
-
getMinutesClockNumberText?: (minutes: string) => string;
|
|
84
|
-
/**
|
|
85
|
-
* Get clock number aria-text for seconds.
|
|
86
|
-
* @default (seconds: string) => `${seconds} seconds`
|
|
87
|
-
*/
|
|
88
|
-
getSecondsClockNumberText?: (seconds: string) => string;
|
|
89
|
-
/**
|
|
90
|
-
* Left arrow icon aria-label text.
|
|
91
|
-
* @default 'open previous view'
|
|
92
|
-
*/
|
|
93
|
-
leftArrowButtonText?: string;
|
|
94
|
-
previousViewAvailable: boolean;
|
|
95
|
-
nextViewAvailable: boolean;
|
|
96
|
-
/**
|
|
97
|
-
* On change callback @DateIOType.
|
|
98
|
-
*/
|
|
99
|
-
onChange: PickerOnChangeFn<TDate>;
|
|
100
|
-
openNextView: () => void;
|
|
101
|
-
openPreviousView: () => void;
|
|
102
|
-
/**
|
|
103
|
-
* Right arrow icon aria-label text.
|
|
104
|
-
* @default 'open next view'
|
|
105
|
-
*/
|
|
106
|
-
rightArrowButtonText?: string;
|
|
107
|
-
showViewSwitcher?: boolean;
|
|
108
|
-
view: ClockView;
|
|
109
|
-
}
|
|
110
|
-
declare const _default: <TDate>(props: ClockPickerProps<TDate>) => JSX.Element;
|
|
111
|
-
/**
|
|
112
|
-
*
|
|
113
|
-
* Demos:
|
|
114
|
-
*
|
|
115
|
-
* - [Time Picker](https://mui.com/components/time-picker/)
|
|
116
|
-
*
|
|
117
|
-
* API:
|
|
118
|
-
*
|
|
119
|
-
* - [ClockPicker API](https://mui.com/api/clock-picker/)
|
|
120
|
-
*/
|
|
121
|
-
export default _default;
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { MuiPickersAdapter } from '../internal/pickers/hooks/useUtils';
|
|
3
|
+
import { TimeValidationProps } from '../internal/pickers/time-utils';
|
|
4
|
+
import { PickerOnChangeFn } from '../internal/pickers/hooks/useViews';
|
|
5
|
+
import { ClockView } from './shared';
|
|
6
|
+
export interface ClockPickerClasses {
|
|
7
|
+
/** Styles applied to the arrowSwitcher element. */
|
|
8
|
+
arrowSwitcher: string;
|
|
9
|
+
}
|
|
10
|
+
export declare type ClockPickerClassKey = keyof ClockPickerClasses;
|
|
11
|
+
export interface ClockPickerComponentsPropsOverrides {
|
|
12
|
+
}
|
|
13
|
+
export declare function getClockPickerUtilityClass(slot: string): string;
|
|
14
|
+
export declare const clockPickerClasses: ClockPickerClasses;
|
|
15
|
+
export interface ExportedClockPickerProps<TDate> extends TimeValidationProps<TDate> {
|
|
16
|
+
/**
|
|
17
|
+
* 12h/24h view for hour selection clock.
|
|
18
|
+
* @default false
|
|
19
|
+
*/
|
|
20
|
+
ampm?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Step over minutes.
|
|
23
|
+
* @default 1
|
|
24
|
+
*/
|
|
25
|
+
minutesStep?: number;
|
|
26
|
+
/**
|
|
27
|
+
* Display ampm controls under the clock (instead of in the toolbar).
|
|
28
|
+
* @default false
|
|
29
|
+
*/
|
|
30
|
+
ampmInClock?: boolean;
|
|
31
|
+
/**
|
|
32
|
+
* Accessible text that helps user to understand which time and view is selected.
|
|
33
|
+
* @default <TDate extends any>(
|
|
34
|
+
* view: ClockView,
|
|
35
|
+
* time: TDate | null,
|
|
36
|
+
* adapter: MuiPickersAdapter<TDate>,
|
|
37
|
+
* ) =>
|
|
38
|
+
* `Select ${view}. ${
|
|
39
|
+
* time === null ? 'No time selected' : `Selected time is ${adapter.format(time, 'fullTime')}`
|
|
40
|
+
* }`
|
|
41
|
+
*/
|
|
42
|
+
getClockLabelText?: (view: ClockView, time: TDate | null, adapter: MuiPickersAdapter<TDate>) => string;
|
|
43
|
+
}
|
|
44
|
+
export interface ClockPickerProps<TDate> extends ExportedClockPickerProps<TDate> {
|
|
45
|
+
/**
|
|
46
|
+
* Set to `true` if focus should be moved to clock picker.
|
|
47
|
+
*/
|
|
48
|
+
autoFocus?: boolean;
|
|
49
|
+
/**
|
|
50
|
+
* Override or extend the styles applied to the component.
|
|
51
|
+
*/
|
|
52
|
+
classes?: Partial<ClockPickerClasses>;
|
|
53
|
+
/**
|
|
54
|
+
* The components used for each slot.
|
|
55
|
+
* Either a string to use a HTML element or a component.
|
|
56
|
+
*/
|
|
57
|
+
components?: {
|
|
58
|
+
LeftArrowButton?: React.ElementType;
|
|
59
|
+
LeftArrowIcon?: React.ElementType;
|
|
60
|
+
RightArrowButton?: React.ElementType;
|
|
61
|
+
RightArrowIcon?: React.ElementType;
|
|
62
|
+
};
|
|
63
|
+
/**
|
|
64
|
+
* The props used for each slot inside.
|
|
65
|
+
*/
|
|
66
|
+
componentsProps?: {
|
|
67
|
+
leftArrowButton?: React.SVGAttributes<SVGSVGElement> & ClockPickerComponentsPropsOverrides;
|
|
68
|
+
rightArrowButton?: React.SVGAttributes<SVGSVGElement> & ClockPickerComponentsPropsOverrides;
|
|
69
|
+
};
|
|
70
|
+
/**
|
|
71
|
+
* Selected date @DateIOType.
|
|
72
|
+
*/
|
|
73
|
+
date: TDate | null;
|
|
74
|
+
/**
|
|
75
|
+
* Get clock number aria-text for hours.
|
|
76
|
+
* @default (hours: string) => `${hours} hours`
|
|
77
|
+
*/
|
|
78
|
+
getHoursClockNumberText?: (hours: string) => string;
|
|
79
|
+
/**
|
|
80
|
+
* Get clock number aria-text for minutes.
|
|
81
|
+
* @default (minutes: string) => `${minutes} minutes`
|
|
82
|
+
*/
|
|
83
|
+
getMinutesClockNumberText?: (minutes: string) => string;
|
|
84
|
+
/**
|
|
85
|
+
* Get clock number aria-text for seconds.
|
|
86
|
+
* @default (seconds: string) => `${seconds} seconds`
|
|
87
|
+
*/
|
|
88
|
+
getSecondsClockNumberText?: (seconds: string) => string;
|
|
89
|
+
/**
|
|
90
|
+
* Left arrow icon aria-label text.
|
|
91
|
+
* @default 'open previous view'
|
|
92
|
+
*/
|
|
93
|
+
leftArrowButtonText?: string;
|
|
94
|
+
previousViewAvailable: boolean;
|
|
95
|
+
nextViewAvailable: boolean;
|
|
96
|
+
/**
|
|
97
|
+
* On change callback @DateIOType.
|
|
98
|
+
*/
|
|
99
|
+
onChange: PickerOnChangeFn<TDate>;
|
|
100
|
+
openNextView: () => void;
|
|
101
|
+
openPreviousView: () => void;
|
|
102
|
+
/**
|
|
103
|
+
* Right arrow icon aria-label text.
|
|
104
|
+
* @default 'open next view'
|
|
105
|
+
*/
|
|
106
|
+
rightArrowButtonText?: string;
|
|
107
|
+
showViewSwitcher?: boolean;
|
|
108
|
+
view: ClockView;
|
|
109
|
+
}
|
|
110
|
+
declare const _default: <TDate>(props: ClockPickerProps<TDate>) => JSX.Element;
|
|
111
|
+
/**
|
|
112
|
+
*
|
|
113
|
+
* Demos:
|
|
114
|
+
*
|
|
115
|
+
* - [Time Picker](https://mui.com/components/time-picker/)
|
|
116
|
+
*
|
|
117
|
+
* API:
|
|
118
|
+
*
|
|
119
|
+
* - [ClockPicker API](https://mui.com/api/clock-picker/)
|
|
120
|
+
*/
|
|
121
|
+
export default _default;
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { ClockPickerProps } from './ClockPicker';
|
|
3
|
-
import { ClockView } from './shared';
|
|
4
|
-
export interface ClockPickerStandaloneProps<TDate> extends Omit<ClockPickerProps<TDate>, 'view' | 'openNextView' | 'openPreviousView' | 'nextViewAvailable' | 'previousViewAvailable'> {
|
|
5
|
-
className?: string;
|
|
6
|
-
/**
|
|
7
|
-
* Callback fired on view change.
|
|
8
|
-
*/
|
|
9
|
-
onViewChange?: (view: ClockView) => void;
|
|
10
|
-
/**
|
|
11
|
-
* Initially opened view.
|
|
12
|
-
*/
|
|
13
|
-
openTo?: ClockView;
|
|
14
|
-
/**
|
|
15
|
-
* Controlled clock view.
|
|
16
|
-
*/
|
|
17
|
-
view?: ClockView;
|
|
18
|
-
/**
|
|
19
|
-
* Available views for clock.
|
|
20
|
-
*/
|
|
21
|
-
views?: readonly ClockView[];
|
|
22
|
-
}
|
|
23
|
-
declare const _default: <TDate>(props: ClockPickerStandaloneProps<TDate> & React.RefAttributes<HTMLDivElement>) => JSX.Element;
|
|
24
|
-
/**
|
|
25
|
-
* Wrapping public API for better standalone usage of './ClockPicker'
|
|
26
|
-
* @ignore - internal component.
|
|
27
|
-
*/
|
|
28
|
-
export default _default;
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { ClockPickerProps } from './ClockPicker';
|
|
3
|
+
import { ClockView } from './shared';
|
|
4
|
+
export interface ClockPickerStandaloneProps<TDate> extends Omit<ClockPickerProps<TDate>, 'view' | 'openNextView' | 'openPreviousView' | 'nextViewAvailable' | 'previousViewAvailable'> {
|
|
5
|
+
className?: string;
|
|
6
|
+
/**
|
|
7
|
+
* Callback fired on view change.
|
|
8
|
+
*/
|
|
9
|
+
onViewChange?: (view: ClockView) => void;
|
|
10
|
+
/**
|
|
11
|
+
* Initially opened view.
|
|
12
|
+
*/
|
|
13
|
+
openTo?: ClockView;
|
|
14
|
+
/**
|
|
15
|
+
* Controlled clock view.
|
|
16
|
+
*/
|
|
17
|
+
view?: ClockView;
|
|
18
|
+
/**
|
|
19
|
+
* Available views for clock.
|
|
20
|
+
*/
|
|
21
|
+
views?: readonly ClockView[];
|
|
22
|
+
}
|
|
23
|
+
declare const _default: <TDate>(props: ClockPickerStandaloneProps<TDate> & React.RefAttributes<HTMLDivElement>) => JSX.Element;
|
|
24
|
+
/**
|
|
25
|
+
* Wrapping public API for better standalone usage of './ClockPicker'
|
|
26
|
+
* @ignore - internal component.
|
|
27
|
+
*/
|
|
28
|
+
export default _default;
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { ClockView } from './shared';
|
|
3
|
-
export interface ClockPointerProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
4
|
-
hasSelected: boolean;
|
|
5
|
-
isInner: boolean;
|
|
6
|
-
type: ClockView;
|
|
7
|
-
value: number;
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* @ignore - internal component.
|
|
11
|
-
*/
|
|
12
|
-
declare class ClockPointer extends React.Component<ClockPointerProps> {
|
|
13
|
-
static getDerivedStateFromProps: (nextProps: ClockPointerProps, state: ClockPointer['state']) => {
|
|
14
|
-
toAnimateTransform: boolean;
|
|
15
|
-
previousType: ClockView;
|
|
16
|
-
};
|
|
17
|
-
state: {
|
|
18
|
-
toAnimateTransform: boolean;
|
|
19
|
-
previousType: undefined;
|
|
20
|
-
};
|
|
21
|
-
render(): JSX.Element;
|
|
22
|
-
}
|
|
23
|
-
export default ClockPointer;
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { ClockView } from './shared';
|
|
3
|
+
export interface ClockPointerProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
hasSelected: boolean;
|
|
5
|
+
isInner: boolean;
|
|
6
|
+
type: ClockView;
|
|
7
|
+
value: number;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* @ignore - internal component.
|
|
11
|
+
*/
|
|
12
|
+
declare class ClockPointer extends React.Component<ClockPointerProps> {
|
|
13
|
+
static getDerivedStateFromProps: (nextProps: ClockPointerProps, state: ClockPointer['state']) => {
|
|
14
|
+
toAnimateTransform: boolean;
|
|
15
|
+
previousType: ClockView;
|
|
16
|
+
};
|
|
17
|
+
state: {
|
|
18
|
+
toAnimateTransform: boolean;
|
|
19
|
+
previousType: undefined;
|
|
20
|
+
};
|
|
21
|
+
render(): JSX.Element;
|
|
22
|
+
}
|
|
23
|
+
export default ClockPointer;
|
package/ClockPicker/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { default } from './ClockPickerStandalone';
|
|
2
|
-
export { clockPickerClasses } from './ClockPicker';
|
|
3
|
-
export type { ClockPickerClasses, ClockPickerClassKey } from './ClockPicker';
|
|
4
|
-
export declare type ClockPickerProps<TDate> = import('./ClockPickerStandalone').ClockPickerStandaloneProps<TDate>;
|
|
5
|
-
export declare type ClockPickerView = NonNullable<ClockPickerProps<unknown>['view']>;
|
|
1
|
+
export { default } from './ClockPickerStandalone';
|
|
2
|
+
export { clockPickerClasses } from './ClockPicker';
|
|
3
|
+
export type { ClockPickerClasses, ClockPickerClassKey } from './ClockPicker';
|
|
4
|
+
export declare type ClockPickerProps<TDate> = import('./ClockPickerStandalone').ClockPickerStandaloneProps<TDate>;
|
|
5
|
+
export declare type ClockPickerView = NonNullable<ClockPickerProps<unknown>['view']>;
|
package/ClockPicker/shared.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export declare const CLOCK_WIDTH = 220;
|
|
2
|
-
export declare const CLOCK_HOUR_WIDTH = 36;
|
|
3
|
-
export declare type ClockView = 'hours' | 'minutes' | 'seconds';
|
|
4
|
-
export declare const getMinutes: (offsetX: number, offsetY: number, step?: number) => number;
|
|
5
|
-
export declare const getHours: (offsetX: number, offsetY: number, ampm: boolean) => number;
|
|
1
|
+
export declare const CLOCK_WIDTH = 220;
|
|
2
|
+
export declare const CLOCK_HOUR_WIDTH = 36;
|
|
3
|
+
export declare type ClockView = 'hours' | 'minutes' | 'seconds';
|
|
4
|
+
export declare const getMinutes: (offsetX: number, offsetY: number, step?: number) => number;
|
|
5
|
+
export declare const getHours: (offsetX: number, offsetY: number, ampm: boolean) => number;
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { DesktopDatePickerProps } from '../DesktopDatePicker';
|
|
3
|
-
import { MobileDatePickerProps } from '../MobileDatePicker';
|
|
4
|
-
export interface DatePickerProps<TDate = unknown> extends DesktopDatePickerProps<TDate>, MobileDatePickerProps<TDate> {
|
|
5
|
-
/**
|
|
6
|
-
* CSS media query when `Mobile` mode will be changed to `Desktop`.
|
|
7
|
-
* @default '@media (pointer: fine)'
|
|
8
|
-
* @example '@media (min-width: 720px)' or theme.breakpoints.up("sm")
|
|
9
|
-
*/
|
|
10
|
-
desktopModeMediaQuery?: string;
|
|
11
|
-
}
|
|
12
|
-
declare type DatePickerComponent = (<TDate>(props: DatePickerProps<TDate> & React.RefAttributes<HTMLDivElement>) => JSX.Element) & {
|
|
13
|
-
propTypes?: any;
|
|
14
|
-
};
|
|
15
|
-
/**
|
|
16
|
-
*
|
|
17
|
-
* Demos:
|
|
18
|
-
*
|
|
19
|
-
* - [Date Picker](https://mui.com/components/date-picker/)
|
|
20
|
-
* - [Pickers](https://mui.com/components/pickers/)
|
|
21
|
-
*
|
|
22
|
-
* API:
|
|
23
|
-
*
|
|
24
|
-
* - [DatePicker API](https://mui.com/api/date-picker/)
|
|
25
|
-
*/
|
|
26
|
-
declare const DatePicker: DatePickerComponent;
|
|
27
|
-
export default DatePicker;
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { DesktopDatePickerProps } from '../DesktopDatePicker';
|
|
3
|
+
import { MobileDatePickerProps } from '../MobileDatePicker';
|
|
4
|
+
export interface DatePickerProps<TDate = unknown> extends DesktopDatePickerProps<TDate>, MobileDatePickerProps<TDate> {
|
|
5
|
+
/**
|
|
6
|
+
* CSS media query when `Mobile` mode will be changed to `Desktop`.
|
|
7
|
+
* @default '@media (pointer: fine)'
|
|
8
|
+
* @example '@media (min-width: 720px)' or theme.breakpoints.up("sm")
|
|
9
|
+
*/
|
|
10
|
+
desktopModeMediaQuery?: string;
|
|
11
|
+
}
|
|
12
|
+
declare type DatePickerComponent = (<TDate>(props: DatePickerProps<TDate> & React.RefAttributes<HTMLDivElement>) => JSX.Element) & {
|
|
13
|
+
propTypes?: any;
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
*
|
|
17
|
+
* Demos:
|
|
18
|
+
*
|
|
19
|
+
* - [Date Picker](https://mui.com/components/date-picker/)
|
|
20
|
+
* - [Pickers](https://mui.com/components/pickers/)
|
|
21
|
+
*
|
|
22
|
+
* API:
|
|
23
|
+
*
|
|
24
|
+
* - [DatePicker API](https://mui.com/api/date-picker/)
|
|
25
|
+
*/
|
|
26
|
+
declare const DatePicker: DatePickerComponent;
|
|
27
|
+
export default DatePicker;
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
/**
|
|
3
|
-
* @ignore - internal component.
|
|
4
|
-
*/
|
|
5
|
-
declare const DatePickerToolbar: React.ForwardRefExoticComponent<import("../CalendarPicker/CalendarPicker").ExportedCalendarPickerProps<unknown> & import("../ClockPicker/ClockPicker").ExportedClockPickerProps<unknown> & {
|
|
6
|
-
ampmInClock?: boolean | undefined;
|
|
7
|
-
date: unknown;
|
|
8
|
-
dateRangeIcon?: React.ReactNode;
|
|
9
|
-
getMobileKeyboardInputViewButtonText?: (() => string) | undefined;
|
|
10
|
-
hideTabs?: boolean | undefined;
|
|
11
|
-
isLandscape: boolean;
|
|
12
|
-
isMobileKeyboardViewOpen: boolean;
|
|
13
|
-
onChange: import("../internal/pickers/hooks/useViews").PickerOnChangeFn<unknown>;
|
|
14
|
-
openView: import("../internal/pickers/typings/Views").AllAvailableViews;
|
|
15
|
-
setOpenView: (view: import("../internal/pickers/typings/Views").AllAvailableViews) => void;
|
|
16
|
-
timeIcon?: React.ReactNode;
|
|
17
|
-
toggleMobileKeyboardView: () => void;
|
|
18
|
-
toolbarFormat?: string | undefined;
|
|
19
|
-
toolbarPlaceholder?: React.ReactNode;
|
|
20
|
-
toolbarTitle?: React.ReactNode;
|
|
21
|
-
views: readonly import("../internal/pickers/typings/Views").AllAvailableViews[];
|
|
22
|
-
} & React.RefAttributes<HTMLDivElement>>;
|
|
23
|
-
export default DatePickerToolbar;
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* @ignore - internal component.
|
|
4
|
+
*/
|
|
5
|
+
declare const DatePickerToolbar: React.ForwardRefExoticComponent<import("../CalendarPicker/CalendarPicker").ExportedCalendarPickerProps<unknown> & import("../ClockPicker/ClockPicker").ExportedClockPickerProps<unknown> & {
|
|
6
|
+
ampmInClock?: boolean | undefined;
|
|
7
|
+
date: unknown;
|
|
8
|
+
dateRangeIcon?: React.ReactNode;
|
|
9
|
+
getMobileKeyboardInputViewButtonText?: (() => string) | undefined;
|
|
10
|
+
hideTabs?: boolean | undefined;
|
|
11
|
+
isLandscape: boolean;
|
|
12
|
+
isMobileKeyboardViewOpen: boolean;
|
|
13
|
+
onChange: import("../internal/pickers/hooks/useViews").PickerOnChangeFn<unknown>;
|
|
14
|
+
openView: import("../internal/pickers/typings/Views").AllAvailableViews;
|
|
15
|
+
setOpenView: (view: import("../internal/pickers/typings/Views").AllAvailableViews) => void;
|
|
16
|
+
timeIcon?: React.ReactNode;
|
|
17
|
+
toggleMobileKeyboardView: () => void;
|
|
18
|
+
toolbarFormat?: string | undefined;
|
|
19
|
+
toolbarPlaceholder?: React.ReactNode;
|
|
20
|
+
toolbarTitle?: React.ReactNode;
|
|
21
|
+
views: readonly import("../internal/pickers/typings/Views").AllAvailableViews[];
|
|
22
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
23
|
+
export default DatePickerToolbar;
|
package/DatePicker/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { default } from './DatePicker';
|
|
2
|
-
export * from './DatePicker';
|
|
1
|
+
export { default } from './DatePicker';
|
|
2
|
+
export * from './DatePicker';
|
package/DatePicker/shared.d.ts
CHANGED
|
@@ -1,45 +1,45 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { ParseableDate } from '../internal/pickers/constants/prop-types';
|
|
3
|
-
import { OverrideParseableDateProps } from '../internal/pickers/hooks/date-helpers-hooks';
|
|
4
|
-
import { CalendarPickerView } from '../CalendarPicker';
|
|
5
|
-
import { ExportedCalendarPickerProps } from '../CalendarPicker/CalendarPicker';
|
|
6
|
-
import { DateValidationError, ValidationProps } from '../internal/pickers/hooks/useValidation';
|
|
7
|
-
import { ExportedDateInputProps } from '../internal/pickers/PureDateInput';
|
|
8
|
-
import { BasePickerProps, ToolbarComponentProps } from '../internal/pickers/typings/BasePicker';
|
|
9
|
-
export declare type DatePickerView = 'year' | 'day' | 'month';
|
|
10
|
-
export interface BaseDatePickerProps<TDate> extends ExportedCalendarPickerProps<TDate>, BasePickerProps<ParseableDate<TDate>, TDate | null>, ValidationProps<DateValidationError, ParseableDate<TDate>>, ExportedDateInputProps<ParseableDate<TDate>, TDate | null> {
|
|
11
|
-
/**
|
|
12
|
-
* The components used for each slot.
|
|
13
|
-
* Either a string to use a HTML element or a component.
|
|
14
|
-
* @default {}
|
|
15
|
-
*/
|
|
16
|
-
components?: OverrideParseableDateProps<TDate, ExportedCalendarPickerProps<TDate>, 'minDate' | 'maxDate'>['components'] & ExportedDateInputProps<ParseableDate<TDate>, TDate | null>['components'];
|
|
17
|
-
/**
|
|
18
|
-
* Callback fired on view change.
|
|
19
|
-
*/
|
|
20
|
-
onViewChange?: (view: DatePickerView) => void;
|
|
21
|
-
/**
|
|
22
|
-
* First view to show.
|
|
23
|
-
*/
|
|
24
|
-
openTo?: DatePickerView;
|
|
25
|
-
/**
|
|
26
|
-
* Component that will replace default toolbar renderer.
|
|
27
|
-
* @default DatePickerToolbar
|
|
28
|
-
*/
|
|
29
|
-
ToolbarComponent?: React.JSXElementConstructor<ToolbarComponentProps<TDate | null>>;
|
|
30
|
-
/**
|
|
31
|
-
* Mobile picker title, displaying in the toolbar.
|
|
32
|
-
* @default 'Select date'
|
|
33
|
-
*/
|
|
34
|
-
toolbarTitle?: React.ReactNode;
|
|
35
|
-
/**
|
|
36
|
-
* Array of views to show.
|
|
37
|
-
*/
|
|
38
|
-
views?: readonly DatePickerView[];
|
|
39
|
-
}
|
|
40
|
-
export declare const isYearOnlyView: (views: readonly CalendarPickerView[]) => views is readonly "year"[];
|
|
41
|
-
export declare const isYearAndMonthViews: (views: readonly CalendarPickerView[]) => views is readonly ("month" | "year")[];
|
|
42
|
-
export declare type DefaultizedProps<Props> = Props & {
|
|
43
|
-
inputFormat: string;
|
|
44
|
-
};
|
|
45
|
-
export declare function useDatePickerDefaultizedProps<Props extends BaseDatePickerProps<unknown>>({ openTo, views, minDate: minDateProp, maxDate: maxDateProp, ...other }: Props, name: string): DefaultizedProps<Props> & Required<Pick<BaseDatePickerProps<unknown>, 'openTo' | 'views'>>;
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ParseableDate } from '../internal/pickers/constants/prop-types';
|
|
3
|
+
import { OverrideParseableDateProps } from '../internal/pickers/hooks/date-helpers-hooks';
|
|
4
|
+
import { CalendarPickerView } from '../CalendarPicker';
|
|
5
|
+
import { ExportedCalendarPickerProps } from '../CalendarPicker/CalendarPicker';
|
|
6
|
+
import { DateValidationError, ValidationProps } from '../internal/pickers/hooks/useValidation';
|
|
7
|
+
import { ExportedDateInputProps } from '../internal/pickers/PureDateInput';
|
|
8
|
+
import { BasePickerProps, ToolbarComponentProps } from '../internal/pickers/typings/BasePicker';
|
|
9
|
+
export declare type DatePickerView = 'year' | 'day' | 'month';
|
|
10
|
+
export interface BaseDatePickerProps<TDate> extends ExportedCalendarPickerProps<TDate>, BasePickerProps<ParseableDate<TDate>, TDate | null>, ValidationProps<DateValidationError, ParseableDate<TDate>>, ExportedDateInputProps<ParseableDate<TDate>, TDate | null> {
|
|
11
|
+
/**
|
|
12
|
+
* The components used for each slot.
|
|
13
|
+
* Either a string to use a HTML element or a component.
|
|
14
|
+
* @default {}
|
|
15
|
+
*/
|
|
16
|
+
components?: OverrideParseableDateProps<TDate, ExportedCalendarPickerProps<TDate>, 'minDate' | 'maxDate'>['components'] & ExportedDateInputProps<ParseableDate<TDate>, TDate | null>['components'];
|
|
17
|
+
/**
|
|
18
|
+
* Callback fired on view change.
|
|
19
|
+
*/
|
|
20
|
+
onViewChange?: (view: DatePickerView) => void;
|
|
21
|
+
/**
|
|
22
|
+
* First view to show.
|
|
23
|
+
*/
|
|
24
|
+
openTo?: DatePickerView;
|
|
25
|
+
/**
|
|
26
|
+
* Component that will replace default toolbar renderer.
|
|
27
|
+
* @default DatePickerToolbar
|
|
28
|
+
*/
|
|
29
|
+
ToolbarComponent?: React.JSXElementConstructor<ToolbarComponentProps<TDate | null>>;
|
|
30
|
+
/**
|
|
31
|
+
* Mobile picker title, displaying in the toolbar.
|
|
32
|
+
* @default 'Select date'
|
|
33
|
+
*/
|
|
34
|
+
toolbarTitle?: React.ReactNode;
|
|
35
|
+
/**
|
|
36
|
+
* Array of views to show.
|
|
37
|
+
*/
|
|
38
|
+
views?: readonly DatePickerView[];
|
|
39
|
+
}
|
|
40
|
+
export declare const isYearOnlyView: (views: readonly CalendarPickerView[]) => views is readonly "year"[];
|
|
41
|
+
export declare const isYearAndMonthViews: (views: readonly CalendarPickerView[]) => views is readonly ("month" | "year")[];
|
|
42
|
+
export declare type DefaultizedProps<Props> = Props & {
|
|
43
|
+
inputFormat: string;
|
|
44
|
+
};
|
|
45
|
+
export declare function useDatePickerDefaultizedProps<Props extends BaseDatePickerProps<unknown>>({ openTo, views, minDate: minDateProp, maxDate: maxDateProp, ...other }: Props, name: string): DefaultizedProps<Props> & Required<Pick<BaseDatePickerProps<unknown>, 'openTo' | 'views'>>;
|