@mui/lab 5.0.0-alpha.74 → 5.0.0-alpha.75
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 +98 -0
- 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/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/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/treeItemClasses.d.ts +24 -24
- package/TreeView/treeViewClasses.d.ts +8 -8
- package/YearPicker/PickersYear.d.ts +27 -27
- 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/PickersPopper.d.ts +44 -44
- 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/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/index.js +1 -1
- package/modern/index.js +1 -1
- package/node/index.js +1 -1
- package/package.json +4 -4
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'>>;
|
|
@@ -1,65 +1,65 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { ResponsiveWrapperProps } from '../internal/pickers/wrappers/ResponsiveWrapper';
|
|
3
|
-
import { RangeInput, DateRange } from './RangeTypes';
|
|
4
|
-
import { ValidationProps } from '../internal/pickers/hooks/useValidation';
|
|
5
|
-
import { ExportedDateRangePickerViewProps } from './DateRangePickerView';
|
|
6
|
-
import { ExportedDateRangePickerInputProps } from './DateRangePickerInput';
|
|
7
|
-
import { DateRangeValidationError } from '../internal/pickers/date-utils';
|
|
8
|
-
interface BaseDateRangePickerProps<TDate> extends ExportedDateRangePickerViewProps<TDate>, ValidationProps<DateRangeValidationError, RangeInput<TDate>>, ExportedDateRangePickerInputProps {
|
|
9
|
-
/**
|
|
10
|
-
* The components used for each slot.
|
|
11
|
-
* Either a string to use a HTML element or a component.
|
|
12
|
-
* @default {}
|
|
13
|
-
*/
|
|
14
|
-
components?: ExportedDateRangePickerViewProps<TDate>['components'] & ExportedDateRangePickerInputProps['components'];
|
|
15
|
-
/**
|
|
16
|
-
* Text for end input label and toolbar placeholder.
|
|
17
|
-
* @default 'End'
|
|
18
|
-
*/
|
|
19
|
-
endText?: React.ReactNode;
|
|
20
|
-
/**
|
|
21
|
-
* Custom mask. Can be used to override generate from format. (e.g. `__/__/____ __:__` or `__/__/____ __:__ _M`).
|
|
22
|
-
* @default '__/__/____'
|
|
23
|
-
*/
|
|
24
|
-
mask?: ExportedDateRangePickerInputProps['mask'];
|
|
25
|
-
/**
|
|
26
|
-
* Min selectable date. @DateIOType
|
|
27
|
-
* @default defaultMinDate
|
|
28
|
-
*/
|
|
29
|
-
minDate?: TDate;
|
|
30
|
-
/**
|
|
31
|
-
* Max selectable date. @DateIOType
|
|
32
|
-
* @default defaultMaxDate
|
|
33
|
-
*/
|
|
34
|
-
maxDate?: TDate;
|
|
35
|
-
/**
|
|
36
|
-
* Callback fired when the value (the selected date range) changes @DateIOType.
|
|
37
|
-
*/
|
|
38
|
-
onChange: (date: DateRange<TDate>, keyboardInputValue?: string) => void;
|
|
39
|
-
/**
|
|
40
|
-
* Text for start input label and toolbar placeholder.
|
|
41
|
-
* @default 'Start'
|
|
42
|
-
*/
|
|
43
|
-
startText?: React.ReactNode;
|
|
44
|
-
/**
|
|
45
|
-
* The value of the date range picker.
|
|
46
|
-
*/
|
|
47
|
-
value: RangeInput<TDate>;
|
|
48
|
-
}
|
|
49
|
-
export interface DateRangePickerProps<TDate> extends BaseDateRangePickerProps<TDate>, ResponsiveWrapperProps {
|
|
50
|
-
}
|
|
51
|
-
declare type DateRangePickerComponent = (<TDate>(props: DateRangePickerProps<TDate> & React.RefAttributes<HTMLDivElement>) => JSX.Element) & {
|
|
52
|
-
propTypes: unknown;
|
|
53
|
-
};
|
|
54
|
-
/**
|
|
55
|
-
*
|
|
56
|
-
* Demos:
|
|
57
|
-
*
|
|
58
|
-
* - [Date Range Picker](https://mui.com/components/date-range-picker/)
|
|
59
|
-
*
|
|
60
|
-
* API:
|
|
61
|
-
*
|
|
62
|
-
* - [DateRangePicker API](https://mui.com/api/date-range-picker/)
|
|
63
|
-
*/
|
|
64
|
-
declare const DateRangePicker: DateRangePickerComponent;
|
|
65
|
-
export default DateRangePicker;
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { ResponsiveWrapperProps } from '../internal/pickers/wrappers/ResponsiveWrapper';
|
|
3
|
+
import { RangeInput, DateRange } from './RangeTypes';
|
|
4
|
+
import { ValidationProps } from '../internal/pickers/hooks/useValidation';
|
|
5
|
+
import { ExportedDateRangePickerViewProps } from './DateRangePickerView';
|
|
6
|
+
import { ExportedDateRangePickerInputProps } from './DateRangePickerInput';
|
|
7
|
+
import { DateRangeValidationError } from '../internal/pickers/date-utils';
|
|
8
|
+
interface BaseDateRangePickerProps<TDate> extends ExportedDateRangePickerViewProps<TDate>, ValidationProps<DateRangeValidationError, RangeInput<TDate>>, ExportedDateRangePickerInputProps {
|
|
9
|
+
/**
|
|
10
|
+
* The components used for each slot.
|
|
11
|
+
* Either a string to use a HTML element or a component.
|
|
12
|
+
* @default {}
|
|
13
|
+
*/
|
|
14
|
+
components?: ExportedDateRangePickerViewProps<TDate>['components'] & ExportedDateRangePickerInputProps['components'];
|
|
15
|
+
/**
|
|
16
|
+
* Text for end input label and toolbar placeholder.
|
|
17
|
+
* @default 'End'
|
|
18
|
+
*/
|
|
19
|
+
endText?: React.ReactNode;
|
|
20
|
+
/**
|
|
21
|
+
* Custom mask. Can be used to override generate from format. (e.g. `__/__/____ __:__` or `__/__/____ __:__ _M`).
|
|
22
|
+
* @default '__/__/____'
|
|
23
|
+
*/
|
|
24
|
+
mask?: ExportedDateRangePickerInputProps['mask'];
|
|
25
|
+
/**
|
|
26
|
+
* Min selectable date. @DateIOType
|
|
27
|
+
* @default defaultMinDate
|
|
28
|
+
*/
|
|
29
|
+
minDate?: TDate;
|
|
30
|
+
/**
|
|
31
|
+
* Max selectable date. @DateIOType
|
|
32
|
+
* @default defaultMaxDate
|
|
33
|
+
*/
|
|
34
|
+
maxDate?: TDate;
|
|
35
|
+
/**
|
|
36
|
+
* Callback fired when the value (the selected date range) changes @DateIOType.
|
|
37
|
+
*/
|
|
38
|
+
onChange: (date: DateRange<TDate>, keyboardInputValue?: string) => void;
|
|
39
|
+
/**
|
|
40
|
+
* Text for start input label and toolbar placeholder.
|
|
41
|
+
* @default 'Start'
|
|
42
|
+
*/
|
|
43
|
+
startText?: React.ReactNode;
|
|
44
|
+
/**
|
|
45
|
+
* The value of the date range picker.
|
|
46
|
+
*/
|
|
47
|
+
value: RangeInput<TDate>;
|
|
48
|
+
}
|
|
49
|
+
export interface DateRangePickerProps<TDate> extends BaseDateRangePickerProps<TDate>, ResponsiveWrapperProps {
|
|
50
|
+
}
|
|
51
|
+
declare type DateRangePickerComponent = (<TDate>(props: DateRangePickerProps<TDate> & React.RefAttributes<HTMLDivElement>) => JSX.Element) & {
|
|
52
|
+
propTypes: unknown;
|
|
53
|
+
};
|
|
54
|
+
/**
|
|
55
|
+
*
|
|
56
|
+
* Demos:
|
|
57
|
+
*
|
|
58
|
+
* - [Date Range Picker](https://mui.com/components/date-range-picker/)
|
|
59
|
+
*
|
|
60
|
+
* API:
|
|
61
|
+
*
|
|
62
|
+
* - [DateRangePicker API](https://mui.com/api/date-range-picker/)
|
|
63
|
+
*/
|
|
64
|
+
declare const DateRangePicker: DateRangePickerComponent;
|
|
65
|
+
export default DateRangePicker;
|
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { RangeInput, DateRange, CurrentlySelectingRangeEndProps } from './RangeTypes';
|
|
3
|
-
import { DateRangeValidationError } from '../internal/pickers/date-utils';
|
|
4
|
-
import { DateInputProps, ExportedDateInputProps, MuiTextFieldProps } from '../internal/pickers/PureDateInput';
|
|
5
|
-
export interface ExportedDateRangePickerInputProps extends Omit<ExportedDateInputProps<RangeInput<any>, DateRange<any>>, 'renderInput'> {
|
|
6
|
-
/**
|
|
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://mui.com/api/text-field/#textfield-api),
|
|
9
|
-
* that you need to forward to the range start/end inputs respectively.
|
|
10
|
-
* Pay specific attention to the `ref` and `inputProps` keys.
|
|
11
|
-
* @example
|
|
12
|
-
* ```jsx
|
|
13
|
-
* <DateRangePicker
|
|
14
|
-
* renderInput={(startProps, endProps) => (
|
|
15
|
-
* <React.Fragment>
|
|
16
|
-
* <TextField {...startProps} />
|
|
17
|
-
* <Box sx={{ mx: 2 }}> to </Box>
|
|
18
|
-
* <TextField {...endProps} />
|
|
19
|
-
* </React.Fragment>;
|
|
20
|
-
* )}
|
|
21
|
-
* />
|
|
22
|
-
* ````
|
|
23
|
-
*/
|
|
24
|
-
renderInput: (startProps: MuiTextFieldProps, endProps: MuiTextFieldProps) => React.ReactElement;
|
|
25
|
-
}
|
|
26
|
-
export interface DateRangeInputProps extends ExportedDateRangePickerInputProps, CurrentlySelectingRangeEndProps, Omit<DateInputProps<RangeInput<any>, DateRange<any>>, 'validationError' | 'renderInput'> {
|
|
27
|
-
startText: React.ReactNode;
|
|
28
|
-
endText: React.ReactNode;
|
|
29
|
-
validationError: DateRangeValidationError;
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* @ignore - internal component.
|
|
33
|
-
*/
|
|
34
|
-
declare const DateRangePickerInput: React.ForwardRefExoticComponent<DateRangeInputProps & React.RefAttributes<HTMLDivElement>>;
|
|
35
|
-
export default DateRangePickerInput;
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { RangeInput, DateRange, CurrentlySelectingRangeEndProps } from './RangeTypes';
|
|
3
|
+
import { DateRangeValidationError } from '../internal/pickers/date-utils';
|
|
4
|
+
import { DateInputProps, ExportedDateInputProps, MuiTextFieldProps } from '../internal/pickers/PureDateInput';
|
|
5
|
+
export interface ExportedDateRangePickerInputProps extends Omit<ExportedDateInputProps<RangeInput<any>, DateRange<any>>, 'renderInput'> {
|
|
6
|
+
/**
|
|
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://mui.com/api/text-field/#textfield-api),
|
|
9
|
+
* that you need to forward to the range start/end inputs respectively.
|
|
10
|
+
* Pay specific attention to the `ref` and `inputProps` keys.
|
|
11
|
+
* @example
|
|
12
|
+
* ```jsx
|
|
13
|
+
* <DateRangePicker
|
|
14
|
+
* renderInput={(startProps, endProps) => (
|
|
15
|
+
* <React.Fragment>
|
|
16
|
+
* <TextField {...startProps} />
|
|
17
|
+
* <Box sx={{ mx: 2 }}> to </Box>
|
|
18
|
+
* <TextField {...endProps} />
|
|
19
|
+
* </React.Fragment>;
|
|
20
|
+
* )}
|
|
21
|
+
* />
|
|
22
|
+
* ````
|
|
23
|
+
*/
|
|
24
|
+
renderInput: (startProps: MuiTextFieldProps, endProps: MuiTextFieldProps) => React.ReactElement;
|
|
25
|
+
}
|
|
26
|
+
export interface DateRangeInputProps extends ExportedDateRangePickerInputProps, CurrentlySelectingRangeEndProps, Omit<DateInputProps<RangeInput<any>, DateRange<any>>, 'validationError' | 'renderInput'> {
|
|
27
|
+
startText: React.ReactNode;
|
|
28
|
+
endText: React.ReactNode;
|
|
29
|
+
validationError: DateRangeValidationError;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* @ignore - internal component.
|
|
33
|
+
*/
|
|
34
|
+
declare const DateRangePickerInput: React.ForwardRefExoticComponent<DateRangeInputProps & React.RefAttributes<HTMLDivElement>>;
|
|
35
|
+
export default DateRangePickerInput;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { ToolbarComponentProps } from '../internal/pickers/typings/BasePicker';
|
|
3
|
-
import { DateRange, CurrentlySelectingRangeEndProps } from './RangeTypes';
|
|
4
|
-
interface DateRangePickerToolbarProps extends CurrentlySelectingRangeEndProps, Pick<ToolbarComponentProps, 'isMobileKeyboardViewOpen' | 'toggleMobileKeyboardView' | 'toolbarTitle' | 'toolbarFormat'> {
|
|
5
|
-
date: DateRange<unknown>;
|
|
6
|
-
startText: React.ReactNode;
|
|
7
|
-
endText: React.ReactNode;
|
|
8
|
-
currentlySelectingRangeEnd: 'start' | 'end';
|
|
9
|
-
setCurrentlySelectingRangeEnd: (newSelectingEnd: 'start' | 'end') => void;
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* @ignore - internal component.
|
|
13
|
-
*/
|
|
14
|
-
declare const DateRangePickerToolbar: ({ currentlySelectingRangeEnd, date: [start, end], endText, isMobileKeyboardViewOpen, setCurrentlySelectingRangeEnd, startText, toggleMobileKeyboardView, toolbarFormat, toolbarTitle, }: DateRangePickerToolbarProps) => JSX.Element;
|
|
15
|
-
export default DateRangePickerToolbar;
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { ToolbarComponentProps } from '../internal/pickers/typings/BasePicker';
|
|
3
|
+
import { DateRange, CurrentlySelectingRangeEndProps } from './RangeTypes';
|
|
4
|
+
interface DateRangePickerToolbarProps extends CurrentlySelectingRangeEndProps, Pick<ToolbarComponentProps, 'isMobileKeyboardViewOpen' | 'toggleMobileKeyboardView' | 'toolbarTitle' | 'toolbarFormat'> {
|
|
5
|
+
date: DateRange<unknown>;
|
|
6
|
+
startText: React.ReactNode;
|
|
7
|
+
endText: React.ReactNode;
|
|
8
|
+
currentlySelectingRangeEnd: 'start' | 'end';
|
|
9
|
+
setCurrentlySelectingRangeEnd: (newSelectingEnd: 'start' | 'end') => void;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* @ignore - internal component.
|
|
13
|
+
*/
|
|
14
|
+
declare const DateRangePickerToolbar: ({ currentlySelectingRangeEnd, date: [start, end], endText, isMobileKeyboardViewOpen, setCurrentlySelectingRangeEnd, startText, toggleMobileKeyboardView, toolbarFormat, toolbarTitle, }: DateRangePickerToolbarProps) => JSX.Element;
|
|
15
|
+
export default DateRangePickerToolbar;
|
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
|
-
import { BasePickerProps } from '../internal/pickers/typings/BasePicker';
|
|
4
|
-
import { WrapperVariant } from '../internal/pickers/wrappers/WrapperVariantContext';
|
|
5
|
-
import { DateRangeInputProps } from './DateRangePickerInput';
|
|
6
|
-
import { DateRange, CurrentlySelectingRangeEndProps, RangeInput } from './RangeTypes';
|
|
7
|
-
import { ExportedCalendarPickerProps } from '../CalendarPicker/CalendarPicker';
|
|
8
|
-
import { ExportedDesktopDateRangeCalendarProps } from './DateRangePickerViewDesktop';
|
|
9
|
-
import { PickerSelectionState } from '../internal/pickers/hooks/usePickerState';
|
|
10
|
-
declare type BaseCalendarPropsToReuse<TDate> = Omit<ExportedCalendarPickerProps<TDate>, 'onYearChange' | 'renderDay'>;
|
|
11
|
-
export interface ExportedDateRangePickerViewProps<TDate> extends BaseCalendarPropsToReuse<TDate>, ExportedDesktopDateRangeCalendarProps<TDate>, Omit<BasePickerProps<RangeInput<TDate>, DateRange<TDate>>, 'value' | 'onChange'> {
|
|
12
|
-
/**
|
|
13
|
-
* If `true`, after selecting `start` date calendar will not automatically switch to the month of `end` date.
|
|
14
|
-
* @default false
|
|
15
|
-
*/
|
|
16
|
-
disableAutoMonthSwitching?: boolean;
|
|
17
|
-
/**
|
|
18
|
-
* Mobile picker title, displaying in the toolbar.
|
|
19
|
-
* @default 'Select date range'
|
|
20
|
-
*/
|
|
21
|
-
toolbarTitle?: React.ReactNode;
|
|
22
|
-
}
|
|
23
|
-
interface DateRangePickerViewProps<TDate> extends CurrentlySelectingRangeEndProps, ExportedDateRangePickerViewProps<TDate> {
|
|
24
|
-
calendars: 1 | 2 | 3;
|
|
25
|
-
open: boolean;
|
|
26
|
-
startText: React.ReactNode;
|
|
27
|
-
endText: React.ReactNode;
|
|
28
|
-
isMobileKeyboardViewOpen: boolean;
|
|
29
|
-
toggleMobileKeyboardView: () => void;
|
|
30
|
-
DateInputProps: DateRangeInputProps;
|
|
31
|
-
date: DateRange<TDate>;
|
|
32
|
-
onDateChange: (date: DateRange<TDate>, currentWrapperVariant: WrapperVariant, isFinish?: PickerSelectionState) => void;
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* @ignore - internal component.
|
|
36
|
-
*/
|
|
37
|
-
export declare function DateRangePickerView<TDate>(props: DateRangePickerViewProps<TDate>): JSX.Element;
|
|
38
|
-
export declare namespace DateRangePickerView {
|
|
39
|
-
var propTypes: {
|
|
40
|
-
calendars: PropTypes.Requireable<number>;
|
|
41
|
-
disableAutoMonthSwitching: PropTypes.Requireable<boolean>;
|
|
42
|
-
};
|
|
43
|
-
}
|
|
44
|
-
export {};
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import { BasePickerProps } from '../internal/pickers/typings/BasePicker';
|
|
4
|
+
import { WrapperVariant } from '../internal/pickers/wrappers/WrapperVariantContext';
|
|
5
|
+
import { DateRangeInputProps } from './DateRangePickerInput';
|
|
6
|
+
import { DateRange, CurrentlySelectingRangeEndProps, RangeInput } from './RangeTypes';
|
|
7
|
+
import { ExportedCalendarPickerProps } from '../CalendarPicker/CalendarPicker';
|
|
8
|
+
import { ExportedDesktopDateRangeCalendarProps } from './DateRangePickerViewDesktop';
|
|
9
|
+
import { PickerSelectionState } from '../internal/pickers/hooks/usePickerState';
|
|
10
|
+
declare type BaseCalendarPropsToReuse<TDate> = Omit<ExportedCalendarPickerProps<TDate>, 'onYearChange' | 'renderDay'>;
|
|
11
|
+
export interface ExportedDateRangePickerViewProps<TDate> extends BaseCalendarPropsToReuse<TDate>, ExportedDesktopDateRangeCalendarProps<TDate>, Omit<BasePickerProps<RangeInput<TDate>, DateRange<TDate>>, 'value' | 'onChange'> {
|
|
12
|
+
/**
|
|
13
|
+
* If `true`, after selecting `start` date calendar will not automatically switch to the month of `end` date.
|
|
14
|
+
* @default false
|
|
15
|
+
*/
|
|
16
|
+
disableAutoMonthSwitching?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Mobile picker title, displaying in the toolbar.
|
|
19
|
+
* @default 'Select date range'
|
|
20
|
+
*/
|
|
21
|
+
toolbarTitle?: React.ReactNode;
|
|
22
|
+
}
|
|
23
|
+
interface DateRangePickerViewProps<TDate> extends CurrentlySelectingRangeEndProps, ExportedDateRangePickerViewProps<TDate> {
|
|
24
|
+
calendars: 1 | 2 | 3;
|
|
25
|
+
open: boolean;
|
|
26
|
+
startText: React.ReactNode;
|
|
27
|
+
endText: React.ReactNode;
|
|
28
|
+
isMobileKeyboardViewOpen: boolean;
|
|
29
|
+
toggleMobileKeyboardView: () => void;
|
|
30
|
+
DateInputProps: DateRangeInputProps;
|
|
31
|
+
date: DateRange<TDate>;
|
|
32
|
+
onDateChange: (date: DateRange<TDate>, currentWrapperVariant: WrapperVariant, isFinish?: PickerSelectionState) => void;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* @ignore - internal component.
|
|
36
|
+
*/
|
|
37
|
+
export declare function DateRangePickerView<TDate>(props: DateRangePickerViewProps<TDate>): JSX.Element;
|
|
38
|
+
export declare namespace DateRangePickerView {
|
|
39
|
+
var propTypes: {
|
|
40
|
+
calendars: PropTypes.Requireable<number>;
|
|
41
|
+
disableAutoMonthSwitching: PropTypes.Requireable<boolean>;
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
export {};
|
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { DateRange } from './RangeTypes';
|
|
3
|
-
import { PickersCalendarProps } from '../CalendarPicker/PickersCalendar';
|
|
4
|
-
import { DateRangePickerDayProps } from '../DateRangePickerDay';
|
|
5
|
-
import { ExportedArrowSwitcherProps } from '../internal/pickers/PickersArrowSwitcher';
|
|
6
|
-
import { DateValidationProps } from '../internal/pickers/date-utils';
|
|
7
|
-
export interface ExportedDesktopDateRangeCalendarProps<TDate> {
|
|
8
|
-
/**
|
|
9
|
-
* The number of calendars that render on **desktop**.
|
|
10
|
-
* @default 2
|
|
11
|
-
*/
|
|
12
|
-
calendars?: 1 | 2 | 3;
|
|
13
|
-
/**
|
|
14
|
-
* Custom renderer for `<DateRangePicker />` days. @DateIOType
|
|
15
|
-
* @example (date, dateRangePickerDayProps) => <DateRangePickerDay {...dateRangePickerDayProps} />
|
|
16
|
-
*/
|
|
17
|
-
renderDay?: (date: TDate, dateRangePickerDayProps: DateRangePickerDayProps<TDate>) => JSX.Element;
|
|
18
|
-
}
|
|
19
|
-
interface DesktopDateRangeCalendarProps<TDate> extends ExportedDesktopDateRangeCalendarProps<TDate>, Omit<PickersCalendarProps<TDate>, 'renderDay' | 'onFocusedDayChange'>, DateValidationProps<TDate>, ExportedArrowSwitcherProps {
|
|
20
|
-
calendars: 1 | 2 | 3;
|
|
21
|
-
date: DateRange<TDate | null>;
|
|
22
|
-
changeMonth: (date: TDate) => void;
|
|
23
|
-
currentlySelectingRangeEnd: 'start' | 'end';
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* @ignore - internal component.
|
|
27
|
-
*/
|
|
28
|
-
declare function DateRangePickerViewDesktop<TDate>(props: DesktopDateRangeCalendarProps<TDate>): JSX.Element;
|
|
29
|
-
export default DateRangePickerViewDesktop;
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { DateRange } from './RangeTypes';
|
|
3
|
+
import { PickersCalendarProps } from '../CalendarPicker/PickersCalendar';
|
|
4
|
+
import { DateRangePickerDayProps } from '../DateRangePickerDay';
|
|
5
|
+
import { ExportedArrowSwitcherProps } from '../internal/pickers/PickersArrowSwitcher';
|
|
6
|
+
import { DateValidationProps } from '../internal/pickers/date-utils';
|
|
7
|
+
export interface ExportedDesktopDateRangeCalendarProps<TDate> {
|
|
8
|
+
/**
|
|
9
|
+
* The number of calendars that render on **desktop**.
|
|
10
|
+
* @default 2
|
|
11
|
+
*/
|
|
12
|
+
calendars?: 1 | 2 | 3;
|
|
13
|
+
/**
|
|
14
|
+
* Custom renderer for `<DateRangePicker />` days. @DateIOType
|
|
15
|
+
* @example (date, dateRangePickerDayProps) => <DateRangePickerDay {...dateRangePickerDayProps} />
|
|
16
|
+
*/
|
|
17
|
+
renderDay?: (date: TDate, dateRangePickerDayProps: DateRangePickerDayProps<TDate>) => JSX.Element;
|
|
18
|
+
}
|
|
19
|
+
interface DesktopDateRangeCalendarProps<TDate> extends ExportedDesktopDateRangeCalendarProps<TDate>, Omit<PickersCalendarProps<TDate>, 'renderDay' | 'onFocusedDayChange'>, DateValidationProps<TDate>, ExportedArrowSwitcherProps {
|
|
20
|
+
calendars: 1 | 2 | 3;
|
|
21
|
+
date: DateRange<TDate | null>;
|
|
22
|
+
changeMonth: (date: TDate) => void;
|
|
23
|
+
currentlySelectingRangeEnd: 'start' | 'end';
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* @ignore - internal component.
|
|
27
|
+
*/
|
|
28
|
+
declare function DateRangePickerViewDesktop<TDate>(props: DesktopDateRangeCalendarProps<TDate>): JSX.Element;
|
|
29
|
+
export default DateRangePickerViewDesktop;
|