@mui/lab 5.0.0-alpha.48 → 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/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 +56 -0
- package/CalendarPicker/CalendarPicker.d.ts +96 -96
- package/CalendarPicker/PickersCalendar.d.ts +45 -45
- package/CalendarPicker/PickersCalendarHeader.d.ts +42 -42
- 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 +40 -40
- 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 +41 -41
- 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 +63 -63
- 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/LICENSE +21 -21
- 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/MasonryItem/masonryItemClasses.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 +49 -49
- 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 +32 -32
- 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 +28 -28
- package/YearPicker/YearPicker.d.ts +42 -42
- 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 +7 -7
- package/internal/pickers/PickersArrowSwitcher.d.ts +41 -41
- package/internal/pickers/PickersModalDialog.d.ts +47 -47
- package/internal/pickers/PickersPopper.d.ts +25 -25
- 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/ResponsiveWrapper.d.ts +23 -23
- package/internal/pickers/wrappers/StaticWrapper.d.ts +10 -10
- 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 +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default } from '@date-io/date-fns';
|
|
1
|
+
export { default } from '@date-io/date-fns';
|
package/AdapterDayjs/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default } from '@date-io/dayjs';
|
|
1
|
+
export { default } from '@date-io/dayjs';
|
package/AdapterLuxon/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default } from '@date-io/luxon';
|
|
1
|
+
export { default } from '@date-io/luxon';
|
package/AdapterMoment/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default } from '@date-io/moment';
|
|
1
|
+
export { default } from '@date-io/moment';
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,61 @@
|
|
|
1
1
|
### [Versions](https://mui.com/versions/)
|
|
2
2
|
|
|
3
|
+
## 5.0.2
|
|
4
|
+
|
|
5
|
+
<!-- generated comparing v5.0.1..master -->
|
|
6
|
+
|
|
7
|
+
_Sep 29, 2021_
|
|
8
|
+
|
|
9
|
+
A big thanks to the 15 contributors who made this release possible. Here are some highlights ✨:
|
|
10
|
+
|
|
11
|
+
- 🔧 Improve `jss-to-styled` codemod to use new package names.
|
|
12
|
+
- And many more 🐛 bug fixes and 📚 improvements.
|
|
13
|
+
|
|
14
|
+
### `@mui/material@5.0.2`
|
|
15
|
+
|
|
16
|
+
- ​<!-- 28 -->[Checkbox] Fix form submission with empty value (#28423) @garronej
|
|
17
|
+
- ​<!-- 08 -->[Slider] Don't error on minimal changes with readonly value (#28472) @eps1lon
|
|
18
|
+
- ​<!-- 07 -->[Switch] Fix style overrides on input (#28576) @praveenkumar-kalidass
|
|
19
|
+
- ​<!-- 03 -->[useMediaQuery] Add types for `matchMedia` option and deprecate exported interfaces (#28413) @eps1lon
|
|
20
|
+
|
|
21
|
+
### `@mui/codemod@5.0.2`
|
|
22
|
+
|
|
23
|
+
- ​<!-- 27 -->[codemod] Add MenuItem v.1.0.0 transform for primaryText property (#28640) @dmitry-yudakov
|
|
24
|
+
- ​<!-- 26 -->[codemod] Update the imports in `jss-to-styled` to match the new package names (#28667) @mnajdova
|
|
25
|
+
|
|
26
|
+
### `@mui/system@5.0.2`
|
|
27
|
+
|
|
28
|
+
- ​<!-- 06 -->[system] Fix types to support theme callbacks on pseudo and nested selectors (#28570) @mnajdova
|
|
29
|
+
|
|
30
|
+
### Docs
|
|
31
|
+
|
|
32
|
+
- ​<!-- 23 -->[docs] Remove languages: fr, de, ja, es, ru (#28663) @mnajdova
|
|
33
|
+
- ​<!-- 22 -->[docs] Improve old doc versions discoverability (#28651) @danilo-leal
|
|
34
|
+
- ​<!-- 21 -->[docs] Make the Toggle Button size demo use default icon size (#28656) @danilo-leal
|
|
35
|
+
- ​<!-- 20 -->[docs] Uniformize the code's font family (#28582) @oliviertassinari
|
|
36
|
+
- ​<!-- 19 -->[docs] Removed duplicate line in date-ranger-picker.md file (#28635) @naveen-bharathi
|
|
37
|
+
- ​<!-- 18 -->[docs] Fix title MUI x2 (#28634) @oliviertassinari
|
|
38
|
+
- ​<!-- 17 -->[docs] Polish email validation logic (#28255) @kiznick
|
|
39
|
+
- ​<!-- 16 -->[docs] Improve migration-v4.md phrasing (#28253) @adamthewebguy
|
|
40
|
+
- ​<!-- 15 -->[docs] Fix color in example (#28527) @alexeagleson
|
|
41
|
+
- ​<!-- 14 -->[docs] Fix typo in generated class names section (#28549) @fxlemire
|
|
42
|
+
- ​<!-- 13 -->[docs] Mention Premium pricing cap (#28581) @oliviertassinari
|
|
43
|
+
- ​<!-- 12 -->[docs] Update examples to use latest mui #28565 @siriwatknp
|
|
44
|
+
- ​<!-- 11 -->[docs] Push the fixes on Next.js's Link to the examples (#28178) @oliviertassinari
|
|
45
|
+
- ​<!-- 10 -->[docs] Fix wrong name for zIndex's property example in /system/ (#28541) @chetrit
|
|
46
|
+
- ​<!-- 08 -->[examples] Nextjs Link missing passHref #28588 (#28661) @Brlaney
|
|
47
|
+
- ​<!-- 02 -->[website] Iteration on the pricing page (#28406) @danilo-leal
|
|
48
|
+
- ​<!-- 01 -->[website] Batch fixes (#28564) @siriwatknp
|
|
49
|
+
|
|
50
|
+
### Core
|
|
51
|
+
|
|
52
|
+
- ​<!-- 25 -->[core] Improve Renovate groups (#28642) @eps1lon
|
|
53
|
+
- ​<!-- 24 -->[core] Batch small changes (#28553) @oliviertassinari
|
|
54
|
+
- ​<!-- 05 -->[test] Document where the value for SwitchBase#value comes from (#28638) @eps1lon
|
|
55
|
+
- ​<!-- 04 -->[test] Make `seconds` `views` test pass in browsers (#28511) @eps1lon
|
|
56
|
+
|
|
57
|
+
All contributors of this release in alphabetical order: @adamthewebguy, @alexeagleson, @Brlaney, @chetrit, @danilo-leal, @dmitry-yudakov, @eps1lon, @fxlemire, @garronej, @kiznick, @mnajdova, @naveen-bharathi, @oliviertassinari, @praveenkumar-kalidass, @siriwatknp
|
|
58
|
+
|
|
3
59
|
## 5.0.1
|
|
4
60
|
|
|
5
61
|
<!-- generated comparing v5.0.0..master -->
|
|
@@ -1,96 +1,96 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { ExportedCalendarProps } from './PickersCalendar';
|
|
3
|
-
import { PickerOnChangeFn } from '../internal/pickers/hooks/useViews';
|
|
4
|
-
import { ExportedCalendarHeaderProps } from './PickersCalendarHeader';
|
|
5
|
-
import { ExportedYearPickerProps } from '../YearPicker/YearPicker';
|
|
6
|
-
import { CalendarPickerView } from './shared';
|
|
7
|
-
export interface CalendarPickerClasses {
|
|
8
|
-
/** Styles applied to the root element. */
|
|
9
|
-
root: string;
|
|
10
|
-
/** Styles applied to the transition group element. */
|
|
11
|
-
viewTransitionContainer: string;
|
|
12
|
-
}
|
|
13
|
-
export declare type CalendarPickerClassKey = keyof CalendarPickerClasses;
|
|
14
|
-
export interface CalendarPickerProps<TDate> extends ExportedCalendarProps<TDate>, ExportedYearPickerProps<TDate>, ExportedCalendarHeaderProps<TDate> {
|
|
15
|
-
className?: string;
|
|
16
|
-
date: TDate | null;
|
|
17
|
-
/**
|
|
18
|
-
* Default calendar month displayed when `value={null}`.
|
|
19
|
-
*/
|
|
20
|
-
defaultCalendarMonth?: TDate;
|
|
21
|
-
/**
|
|
22
|
-
* @default false
|
|
23
|
-
*/
|
|
24
|
-
disableFuture?: boolean;
|
|
25
|
-
/**
|
|
26
|
-
* @default false
|
|
27
|
-
*/
|
|
28
|
-
disablePast?: boolean;
|
|
29
|
-
/**
|
|
30
|
-
* Max selectable date. @DateIOType
|
|
31
|
-
*/
|
|
32
|
-
maxDate?: TDate;
|
|
33
|
-
/**
|
|
34
|
-
* Min selectable date. @DateIOType
|
|
35
|
-
*/
|
|
36
|
-
minDate?: TDate;
|
|
37
|
-
/**
|
|
38
|
-
* Callback fired on view change.
|
|
39
|
-
*/
|
|
40
|
-
onViewChange?: (view: CalendarPickerView) => void;
|
|
41
|
-
/**
|
|
42
|
-
* Callback fired on date change
|
|
43
|
-
*/
|
|
44
|
-
onChange: PickerOnChangeFn<TDate>;
|
|
45
|
-
/**
|
|
46
|
-
* Callback firing on month change. @DateIOType
|
|
47
|
-
*/
|
|
48
|
-
onMonthChange?: (date: TDate) => void;
|
|
49
|
-
/**
|
|
50
|
-
* Initially open view.
|
|
51
|
-
* @default 'day'
|
|
52
|
-
*/
|
|
53
|
-
openTo?: CalendarPickerView;
|
|
54
|
-
/**
|
|
55
|
-
* Disable heavy animations.
|
|
56
|
-
* @default typeof navigator !== 'undefined' && /(android)/i.test(navigator.userAgent)
|
|
57
|
-
*/
|
|
58
|
-
reduceAnimations?: boolean;
|
|
59
|
-
/**
|
|
60
|
-
* Component displaying when passed `loading` true.
|
|
61
|
-
* @default () => <span data-mui-test="loading-progress">...</span>
|
|
62
|
-
*/
|
|
63
|
-
renderLoading?: () => React.ReactNode;
|
|
64
|
-
/**
|
|
65
|
-
* Disable specific date. @DateIOType
|
|
66
|
-
*/
|
|
67
|
-
shouldDisableDate?: (day: TDate) => boolean;
|
|
68
|
-
/**
|
|
69
|
-
* Controlled open view.
|
|
70
|
-
*/
|
|
71
|
-
view?: CalendarPickerView;
|
|
72
|
-
/**
|
|
73
|
-
* Views for calendar picker.
|
|
74
|
-
* @default ['year', 'day']
|
|
75
|
-
*/
|
|
76
|
-
views?: readonly CalendarPickerView[];
|
|
77
|
-
}
|
|
78
|
-
export declare type ExportedCalendarPickerProps<TDate> = Omit<CalendarPickerProps<TDate>, 'date' | 'view' | 'views' | 'openTo' | 'onChange' | 'changeView' | 'slideDirection' | 'currentMonth' | 'className'>;
|
|
79
|
-
interface CalendarPickerPropsWithClasses<TDate> extends CalendarPickerProps<TDate> {
|
|
80
|
-
classes?: Partial<CalendarPickerClasses>;
|
|
81
|
-
}
|
|
82
|
-
export declare function getCalendarPickerUtilityClass(slot: string): string;
|
|
83
|
-
export declare const calendarPickerClasses: CalendarPickerClasses;
|
|
84
|
-
export declare const defaultReduceAnimations: boolean;
|
|
85
|
-
declare const _default: <TDate>(props: CalendarPickerPropsWithClasses<TDate> & React.RefAttributes<HTMLDivElement>) => JSX.Element;
|
|
86
|
-
/**
|
|
87
|
-
*
|
|
88
|
-
* Demos:
|
|
89
|
-
*
|
|
90
|
-
* - [Date Picker](https://mui.com/components/date-picker/)
|
|
91
|
-
*
|
|
92
|
-
* API:
|
|
93
|
-
*
|
|
94
|
-
* - [CalendarPicker API](https://mui.com/api/calendar-picker/)
|
|
95
|
-
*/
|
|
96
|
-
export default _default;
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { ExportedCalendarProps } from './PickersCalendar';
|
|
3
|
+
import { PickerOnChangeFn } from '../internal/pickers/hooks/useViews';
|
|
4
|
+
import { ExportedCalendarHeaderProps } from './PickersCalendarHeader';
|
|
5
|
+
import { ExportedYearPickerProps } from '../YearPicker/YearPicker';
|
|
6
|
+
import { CalendarPickerView } from './shared';
|
|
7
|
+
export interface CalendarPickerClasses {
|
|
8
|
+
/** Styles applied to the root element. */
|
|
9
|
+
root: string;
|
|
10
|
+
/** Styles applied to the transition group element. */
|
|
11
|
+
viewTransitionContainer: string;
|
|
12
|
+
}
|
|
13
|
+
export declare type CalendarPickerClassKey = keyof CalendarPickerClasses;
|
|
14
|
+
export interface CalendarPickerProps<TDate> extends ExportedCalendarProps<TDate>, ExportedYearPickerProps<TDate>, ExportedCalendarHeaderProps<TDate> {
|
|
15
|
+
className?: string;
|
|
16
|
+
date: TDate | null;
|
|
17
|
+
/**
|
|
18
|
+
* Default calendar month displayed when `value={null}`.
|
|
19
|
+
*/
|
|
20
|
+
defaultCalendarMonth?: TDate;
|
|
21
|
+
/**
|
|
22
|
+
* @default false
|
|
23
|
+
*/
|
|
24
|
+
disableFuture?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* @default false
|
|
27
|
+
*/
|
|
28
|
+
disablePast?: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Max selectable date. @DateIOType
|
|
31
|
+
*/
|
|
32
|
+
maxDate?: TDate;
|
|
33
|
+
/**
|
|
34
|
+
* Min selectable date. @DateIOType
|
|
35
|
+
*/
|
|
36
|
+
minDate?: TDate;
|
|
37
|
+
/**
|
|
38
|
+
* Callback fired on view change.
|
|
39
|
+
*/
|
|
40
|
+
onViewChange?: (view: CalendarPickerView) => void;
|
|
41
|
+
/**
|
|
42
|
+
* Callback fired on date change
|
|
43
|
+
*/
|
|
44
|
+
onChange: PickerOnChangeFn<TDate>;
|
|
45
|
+
/**
|
|
46
|
+
* Callback firing on month change. @DateIOType
|
|
47
|
+
*/
|
|
48
|
+
onMonthChange?: (date: TDate) => void;
|
|
49
|
+
/**
|
|
50
|
+
* Initially open view.
|
|
51
|
+
* @default 'day'
|
|
52
|
+
*/
|
|
53
|
+
openTo?: CalendarPickerView;
|
|
54
|
+
/**
|
|
55
|
+
* Disable heavy animations.
|
|
56
|
+
* @default typeof navigator !== 'undefined' && /(android)/i.test(navigator.userAgent)
|
|
57
|
+
*/
|
|
58
|
+
reduceAnimations?: boolean;
|
|
59
|
+
/**
|
|
60
|
+
* Component displaying when passed `loading` true.
|
|
61
|
+
* @default () => <span data-mui-test="loading-progress">...</span>
|
|
62
|
+
*/
|
|
63
|
+
renderLoading?: () => React.ReactNode;
|
|
64
|
+
/**
|
|
65
|
+
* Disable specific date. @DateIOType
|
|
66
|
+
*/
|
|
67
|
+
shouldDisableDate?: (day: TDate) => boolean;
|
|
68
|
+
/**
|
|
69
|
+
* Controlled open view.
|
|
70
|
+
*/
|
|
71
|
+
view?: CalendarPickerView;
|
|
72
|
+
/**
|
|
73
|
+
* Views for calendar picker.
|
|
74
|
+
* @default ['year', 'day']
|
|
75
|
+
*/
|
|
76
|
+
views?: readonly CalendarPickerView[];
|
|
77
|
+
}
|
|
78
|
+
export declare type ExportedCalendarPickerProps<TDate> = Omit<CalendarPickerProps<TDate>, 'date' | 'view' | 'views' | 'openTo' | 'onChange' | 'changeView' | 'slideDirection' | 'currentMonth' | 'className'>;
|
|
79
|
+
interface CalendarPickerPropsWithClasses<TDate> extends CalendarPickerProps<TDate> {
|
|
80
|
+
classes?: Partial<CalendarPickerClasses>;
|
|
81
|
+
}
|
|
82
|
+
export declare function getCalendarPickerUtilityClass(slot: string): string;
|
|
83
|
+
export declare const calendarPickerClasses: CalendarPickerClasses;
|
|
84
|
+
export declare const defaultReduceAnimations: boolean;
|
|
85
|
+
declare const _default: <TDate>(props: CalendarPickerPropsWithClasses<TDate> & React.RefAttributes<HTMLDivElement>) => JSX.Element;
|
|
86
|
+
/**
|
|
87
|
+
*
|
|
88
|
+
* Demos:
|
|
89
|
+
*
|
|
90
|
+
* - [Date Picker](https://mui.com/components/date-picker/)
|
|
91
|
+
*
|
|
92
|
+
* API:
|
|
93
|
+
*
|
|
94
|
+
* - [CalendarPicker API](https://mui.com/api/calendar-picker/)
|
|
95
|
+
*/
|
|
96
|
+
export default _default;
|
|
@@ -1,45 +1,45 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { PickersDayProps } from '../PickersDay/PickersDay';
|
|
3
|
-
import { PickerOnChangeFn } from '../internal/pickers/hooks/useViews';
|
|
4
|
-
import { SlideDirection, SlideTransitionProps } from './PickersSlideTransition';
|
|
5
|
-
export interface ExportedCalendarProps<TDate> extends Pick<PickersDayProps<TDate>, 'disableHighlightToday' | 'showDaysOutsideCurrentMonth' | 'allowSameDateSelection'> {
|
|
6
|
-
autoFocus?: boolean;
|
|
7
|
-
/**
|
|
8
|
-
* If `true` renders `LoadingComponent` in calendar instead of calendar view.
|
|
9
|
-
* Can be used to preload information and show it in calendar.
|
|
10
|
-
* @default false
|
|
11
|
-
*/
|
|
12
|
-
loading?: boolean;
|
|
13
|
-
/**
|
|
14
|
-
* Calendar onChange.
|
|
15
|
-
*/
|
|
16
|
-
onChange: PickerOnChangeFn<TDate>;
|
|
17
|
-
/**
|
|
18
|
-
* Custom renderer for day. Check the [PickersDay](https://mui.com/api/pickers-day/) component.
|
|
19
|
-
*/
|
|
20
|
-
renderDay?: (day: TDate, selectedDates: Array<TDate | null>, pickersDayProps: PickersDayProps<TDate>) => JSX.Element;
|
|
21
|
-
/**
|
|
22
|
-
* Component displaying when passed `loading` true.
|
|
23
|
-
* @default () => "..."
|
|
24
|
-
*/
|
|
25
|
-
renderLoading?: () => React.ReactNode;
|
|
26
|
-
}
|
|
27
|
-
export interface PickersCalendarProps<TDate> extends ExportedCalendarProps<TDate> {
|
|
28
|
-
autoFocus?: boolean;
|
|
29
|
-
className?: string;
|
|
30
|
-
currentMonth: TDate;
|
|
31
|
-
date: TDate | [TDate | null, TDate | null] | null;
|
|
32
|
-
focusedDay: TDate | null;
|
|
33
|
-
isDateDisabled: (day: TDate) => boolean;
|
|
34
|
-
isMonthSwitchingAnimating: boolean;
|
|
35
|
-
onFocusedDayChange: (newFocusedDay: TDate) => void;
|
|
36
|
-
onMonthSwitchingAnimationEnd: () => void;
|
|
37
|
-
reduceAnimations: boolean;
|
|
38
|
-
slideDirection: SlideDirection;
|
|
39
|
-
TransitionProps?: Partial<SlideTransitionProps>;
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* @ignore - do not document.
|
|
43
|
-
*/
|
|
44
|
-
declare function PickersCalendar<TDate>(props: PickersCalendarProps<TDate>): JSX.Element;
|
|
45
|
-
export default PickersCalendar;
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { PickersDayProps } from '../PickersDay/PickersDay';
|
|
3
|
+
import { PickerOnChangeFn } from '../internal/pickers/hooks/useViews';
|
|
4
|
+
import { SlideDirection, SlideTransitionProps } from './PickersSlideTransition';
|
|
5
|
+
export interface ExportedCalendarProps<TDate> extends Pick<PickersDayProps<TDate>, 'disableHighlightToday' | 'showDaysOutsideCurrentMonth' | 'allowSameDateSelection'> {
|
|
6
|
+
autoFocus?: boolean;
|
|
7
|
+
/**
|
|
8
|
+
* If `true` renders `LoadingComponent` in calendar instead of calendar view.
|
|
9
|
+
* Can be used to preload information and show it in calendar.
|
|
10
|
+
* @default false
|
|
11
|
+
*/
|
|
12
|
+
loading?: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* Calendar onChange.
|
|
15
|
+
*/
|
|
16
|
+
onChange: PickerOnChangeFn<TDate>;
|
|
17
|
+
/**
|
|
18
|
+
* Custom renderer for day. Check the [PickersDay](https://mui.com/api/pickers-day/) component.
|
|
19
|
+
*/
|
|
20
|
+
renderDay?: (day: TDate, selectedDates: Array<TDate | null>, pickersDayProps: PickersDayProps<TDate>) => JSX.Element;
|
|
21
|
+
/**
|
|
22
|
+
* Component displaying when passed `loading` true.
|
|
23
|
+
* @default () => "..."
|
|
24
|
+
*/
|
|
25
|
+
renderLoading?: () => React.ReactNode;
|
|
26
|
+
}
|
|
27
|
+
export interface PickersCalendarProps<TDate> extends ExportedCalendarProps<TDate> {
|
|
28
|
+
autoFocus?: boolean;
|
|
29
|
+
className?: string;
|
|
30
|
+
currentMonth: TDate;
|
|
31
|
+
date: TDate | [TDate | null, TDate | null] | null;
|
|
32
|
+
focusedDay: TDate | null;
|
|
33
|
+
isDateDisabled: (day: TDate) => boolean;
|
|
34
|
+
isMonthSwitchingAnimating: boolean;
|
|
35
|
+
onFocusedDayChange: (newFocusedDay: TDate) => void;
|
|
36
|
+
onMonthSwitchingAnimationEnd: () => void;
|
|
37
|
+
reduceAnimations: boolean;
|
|
38
|
+
slideDirection: SlideDirection;
|
|
39
|
+
TransitionProps?: Partial<SlideTransitionProps>;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* @ignore - do not document.
|
|
43
|
+
*/
|
|
44
|
+
declare function PickersCalendar<TDate>(props: PickersCalendarProps<TDate>): JSX.Element;
|
|
45
|
+
export default PickersCalendar;
|
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import IconButton from '@mui/material/IconButton';
|
|
3
|
-
import { SlideDirection } from './PickersSlideTransition';
|
|
4
|
-
import { DateValidationProps } from '../internal/pickers/date-utils';
|
|
5
|
-
import { ExportedArrowSwitcherProps } from '../internal/pickers/PickersArrowSwitcher';
|
|
6
|
-
import { CalendarPickerView } from './shared';
|
|
7
|
-
export declare type ExportedCalendarHeaderProps<TDate> = Pick<PickersCalendarHeaderProps<TDate>, 'components' | 'componentsProps' | 'getViewSwitchingButtonText' | 'leftArrowButtonText' | 'rightArrowButtonText'>;
|
|
8
|
-
export interface PickersCalendarHeaderComponentsPropsOverides {
|
|
9
|
-
}
|
|
10
|
-
export interface PickersCalendarHeaderProps<TDate> extends ExportedArrowSwitcherProps, Omit<DateValidationProps<TDate>, 'shouldDisableDate'> {
|
|
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?: ExportedArrowSwitcherProps['components'] & {
|
|
17
|
-
SwitchViewButton?: React.ElementType;
|
|
18
|
-
SwitchViewIcon?: React.ElementType;
|
|
19
|
-
};
|
|
20
|
-
/**
|
|
21
|
-
* The props used for each slot inside.
|
|
22
|
-
* @default {}
|
|
23
|
-
*/
|
|
24
|
-
componentsProps?: ExportedArrowSwitcherProps['componentsProps'] & {
|
|
25
|
-
switchViewButton?: React.ComponentPropsWithRef<typeof IconButton> & PickersCalendarHeaderComponentsPropsOverides;
|
|
26
|
-
};
|
|
27
|
-
currentMonth: TDate;
|
|
28
|
-
views: readonly CalendarPickerView[];
|
|
29
|
-
/**
|
|
30
|
-
* Get aria-label text for switching between views button.
|
|
31
|
-
*/
|
|
32
|
-
getViewSwitchingButtonText?: (currentView: CalendarPickerView) => string;
|
|
33
|
-
onMonthChange: (date: TDate, slideDirection: SlideDirection) => void;
|
|
34
|
-
openView: CalendarPickerView;
|
|
35
|
-
reduceAnimations: boolean;
|
|
36
|
-
onViewChange?: (view: CalendarPickerView) => void;
|
|
37
|
-
}
|
|
38
|
-
/**
|
|
39
|
-
* @ignore - do not document.
|
|
40
|
-
*/
|
|
41
|
-
declare function PickersCalendarHeader<TDate>(props: PickersCalendarHeaderProps<TDate>): JSX.Element | null;
|
|
42
|
-
export default PickersCalendarHeader;
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import IconButton from '@mui/material/IconButton';
|
|
3
|
+
import { SlideDirection } from './PickersSlideTransition';
|
|
4
|
+
import { DateValidationProps } from '../internal/pickers/date-utils';
|
|
5
|
+
import { ExportedArrowSwitcherProps } from '../internal/pickers/PickersArrowSwitcher';
|
|
6
|
+
import { CalendarPickerView } from './shared';
|
|
7
|
+
export declare type ExportedCalendarHeaderProps<TDate> = Pick<PickersCalendarHeaderProps<TDate>, 'components' | 'componentsProps' | 'getViewSwitchingButtonText' | 'leftArrowButtonText' | 'rightArrowButtonText'>;
|
|
8
|
+
export interface PickersCalendarHeaderComponentsPropsOverides {
|
|
9
|
+
}
|
|
10
|
+
export interface PickersCalendarHeaderProps<TDate> extends ExportedArrowSwitcherProps, Omit<DateValidationProps<TDate>, 'shouldDisableDate'> {
|
|
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?: ExportedArrowSwitcherProps['components'] & {
|
|
17
|
+
SwitchViewButton?: React.ElementType;
|
|
18
|
+
SwitchViewIcon?: React.ElementType;
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* The props used for each slot inside.
|
|
22
|
+
* @default {}
|
|
23
|
+
*/
|
|
24
|
+
componentsProps?: ExportedArrowSwitcherProps['componentsProps'] & {
|
|
25
|
+
switchViewButton?: React.ComponentPropsWithRef<typeof IconButton> & PickersCalendarHeaderComponentsPropsOverides;
|
|
26
|
+
};
|
|
27
|
+
currentMonth: TDate;
|
|
28
|
+
views: readonly CalendarPickerView[];
|
|
29
|
+
/**
|
|
30
|
+
* Get aria-label text for switching between views button.
|
|
31
|
+
*/
|
|
32
|
+
getViewSwitchingButtonText?: (currentView: CalendarPickerView) => string;
|
|
33
|
+
onMonthChange: (date: TDate, slideDirection: SlideDirection) => void;
|
|
34
|
+
openView: CalendarPickerView;
|
|
35
|
+
reduceAnimations: boolean;
|
|
36
|
+
onViewChange?: (view: CalendarPickerView) => void;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* @ignore - do not document.
|
|
40
|
+
*/
|
|
41
|
+
declare function PickersCalendarHeader<TDate>(props: PickersCalendarHeaderProps<TDate>): JSX.Element | null;
|
|
42
|
+
export default PickersCalendarHeader;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
interface FadeTransitionProps {
|
|
3
|
-
children: React.ReactElement;
|
|
4
|
-
className?: string;
|
|
5
|
-
reduceAnimations: boolean;
|
|
6
|
-
transKey: React.Key;
|
|
7
|
-
}
|
|
8
|
-
/**
|
|
9
|
-
* @ignore - do not document.
|
|
10
|
-
*/
|
|
11
|
-
declare const PickersFadeTransitionGroup: ({ children, className, reduceAnimations, transKey, }: FadeTransitionProps) => JSX.Element;
|
|
12
|
-
export default PickersFadeTransitionGroup;
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
interface FadeTransitionProps {
|
|
3
|
+
children: React.ReactElement;
|
|
4
|
+
className?: string;
|
|
5
|
+
reduceAnimations: boolean;
|
|
6
|
+
transKey: React.Key;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* @ignore - do not document.
|
|
10
|
+
*/
|
|
11
|
+
declare const PickersFadeTransitionGroup: ({ children, className, reduceAnimations, transKey, }: FadeTransitionProps) => JSX.Element;
|
|
12
|
+
export default PickersFadeTransitionGroup;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { CSSTransitionProps } from 'react-transition-group/CSSTransition';
|
|
3
|
-
export declare type SlideDirection = 'right' | 'left';
|
|
4
|
-
export interface SlideTransitionProps extends Omit<CSSTransitionProps, 'timeout'> {
|
|
5
|
-
children: React.ReactElement;
|
|
6
|
-
className?: string;
|
|
7
|
-
reduceAnimations: boolean;
|
|
8
|
-
slideDirection: SlideDirection;
|
|
9
|
-
transKey: React.Key;
|
|
10
|
-
}
|
|
11
|
-
export declare const slideAnimationDuration = 350;
|
|
12
|
-
/**
|
|
13
|
-
* @ignore - do not document.
|
|
14
|
-
*/
|
|
15
|
-
declare const PickersSlideTransition: ({ children, className, reduceAnimations, slideDirection, transKey, ...other }: SlideTransitionProps) => JSX.Element;
|
|
16
|
-
export default PickersSlideTransition;
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { CSSTransitionProps } from 'react-transition-group/CSSTransition';
|
|
3
|
+
export declare type SlideDirection = 'right' | 'left';
|
|
4
|
+
export interface SlideTransitionProps extends Omit<CSSTransitionProps, 'timeout'> {
|
|
5
|
+
children: React.ReactElement;
|
|
6
|
+
className?: string;
|
|
7
|
+
reduceAnimations: boolean;
|
|
8
|
+
slideDirection: SlideDirection;
|
|
9
|
+
transKey: React.Key;
|
|
10
|
+
}
|
|
11
|
+
export declare const slideAnimationDuration = 350;
|
|
12
|
+
/**
|
|
13
|
+
* @ignore - do not document.
|
|
14
|
+
*/
|
|
15
|
+
declare const PickersSlideTransition: ({ children, className, reduceAnimations, slideDirection, transKey, ...other }: SlideTransitionProps) => JSX.Element;
|
|
16
|
+
export default PickersSlideTransition;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { default, calendarPickerClasses } from './CalendarPicker';
|
|
2
|
-
export declare type CalendarPickerClassKey = import('./CalendarPicker').CalendarPickerClassKey;
|
|
3
|
-
export declare type CalendarPickerClasses = import('./CalendarPicker').CalendarPickerClasses;
|
|
4
|
-
export declare type CalendarPickerProps<TDate> = import('./CalendarPicker').CalendarPickerProps<TDate>;
|
|
5
|
-
export declare type CalendarPickerView = NonNullable<CalendarPickerProps<unknown>['view']>;
|
|
1
|
+
export { default, calendarPickerClasses } from './CalendarPicker';
|
|
2
|
+
export declare type CalendarPickerClassKey = import('./CalendarPicker').CalendarPickerClassKey;
|
|
3
|
+
export declare type CalendarPickerClasses = import('./CalendarPicker').CalendarPickerClasses;
|
|
4
|
+
export declare type CalendarPickerProps<TDate> = import('./CalendarPicker').CalendarPickerProps<TDate>;
|
|
5
|
+
export declare type CalendarPickerView = NonNullable<CalendarPickerProps<unknown>['view']>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare type CalendarPickerView = 'year' | 'day' | 'month';
|
|
1
|
+
export declare type CalendarPickerView = 'year' | 'day' | 'month';
|
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
import { SlideDirection } from './PickersSlideTransition';
|
|
2
|
-
import { MuiPickersAdapter } from '../internal/pickers/hooks/useUtils';
|
|
3
|
-
interface CalendarState<TDate> {
|
|
4
|
-
currentMonth: TDate;
|
|
5
|
-
focusedDay: TDate | null;
|
|
6
|
-
isMonthSwitchingAnimating: boolean;
|
|
7
|
-
slideDirection: SlideDirection;
|
|
8
|
-
}
|
|
9
|
-
declare type ReducerAction<TType, TAdditional = {}> = {
|
|
10
|
-
type: TType;
|
|
11
|
-
} & TAdditional;
|
|
12
|
-
interface ChangeMonthPayload<TDate> {
|
|
13
|
-
direction: SlideDirection;
|
|
14
|
-
newMonth: TDate;
|
|
15
|
-
}
|
|
16
|
-
export declare const createCalendarStateReducer: <TDate extends unknown>(reduceAnimations: boolean, disableSwitchToMonthOnDayFocus: boolean, utils: MuiPickersAdapter<TDate>) => (state: CalendarState<TDate>, action: {
|
|
17
|
-
type: "finishMonthSwitchingAnimation";
|
|
18
|
-
} | ReducerAction<"changeMonth", ChangeMonthPayload<TDate>> | ReducerAction<"changeFocusedDay", {
|
|
19
|
-
focusedDay: TDate;
|
|
20
|
-
}>) => CalendarState<TDate>;
|
|
21
|
-
declare type CalendarStateInput<TDate> = Pick<import('./CalendarPicker').CalendarPickerProps<TDate>, 'date' | 'defaultCalendarMonth' | 'disableFuture' | 'disablePast' | 'minDate' | 'maxDate' | 'onMonthChange' | 'reduceAnimations' | 'shouldDisableDate'> & {
|
|
22
|
-
disableSwitchToMonthOnDayFocus?: boolean;
|
|
23
|
-
};
|
|
24
|
-
export declare function useCalendarState<TDate>({ date, defaultCalendarMonth, disableFuture, disablePast, disableSwitchToMonthOnDayFocus, maxDate, minDate, onMonthChange, reduceAnimations, shouldDisableDate, }: CalendarStateInput<TDate>): {
|
|
25
|
-
calendarState: CalendarState<TDate>;
|
|
26
|
-
changeMonth: (newDate: TDate) => void;
|
|
27
|
-
changeFocusedDay: (newFocusedDate: TDate) => void;
|
|
28
|
-
isDateDisabled: (day: TDate | null) => boolean;
|
|
29
|
-
onMonthSwitchingAnimationEnd: () => void;
|
|
30
|
-
handleChangeMonth: (payload: ChangeMonthPayload<TDate>) => void;
|
|
31
|
-
};
|
|
32
|
-
export {};
|
|
1
|
+
import { SlideDirection } from './PickersSlideTransition';
|
|
2
|
+
import { MuiPickersAdapter } from '../internal/pickers/hooks/useUtils';
|
|
3
|
+
interface CalendarState<TDate> {
|
|
4
|
+
currentMonth: TDate;
|
|
5
|
+
focusedDay: TDate | null;
|
|
6
|
+
isMonthSwitchingAnimating: boolean;
|
|
7
|
+
slideDirection: SlideDirection;
|
|
8
|
+
}
|
|
9
|
+
declare type ReducerAction<TType, TAdditional = {}> = {
|
|
10
|
+
type: TType;
|
|
11
|
+
} & TAdditional;
|
|
12
|
+
interface ChangeMonthPayload<TDate> {
|
|
13
|
+
direction: SlideDirection;
|
|
14
|
+
newMonth: TDate;
|
|
15
|
+
}
|
|
16
|
+
export declare const createCalendarStateReducer: <TDate extends unknown>(reduceAnimations: boolean, disableSwitchToMonthOnDayFocus: boolean, utils: MuiPickersAdapter<TDate>) => (state: CalendarState<TDate>, action: {
|
|
17
|
+
type: "finishMonthSwitchingAnimation";
|
|
18
|
+
} | ReducerAction<"changeMonth", ChangeMonthPayload<TDate>> | ReducerAction<"changeFocusedDay", {
|
|
19
|
+
focusedDay: TDate;
|
|
20
|
+
}>) => CalendarState<TDate>;
|
|
21
|
+
declare type CalendarStateInput<TDate> = Pick<import('./CalendarPicker').CalendarPickerProps<TDate>, 'date' | 'defaultCalendarMonth' | 'disableFuture' | 'disablePast' | 'minDate' | 'maxDate' | 'onMonthChange' | 'reduceAnimations' | 'shouldDisableDate'> & {
|
|
22
|
+
disableSwitchToMonthOnDayFocus?: boolean;
|
|
23
|
+
};
|
|
24
|
+
export declare function useCalendarState<TDate>({ date, defaultCalendarMonth, disableFuture, disablePast, disableSwitchToMonthOnDayFocus, maxDate, minDate, onMonthChange, reduceAnimations, shouldDisableDate, }: CalendarStateInput<TDate>): {
|
|
25
|
+
calendarState: CalendarState<TDate>;
|
|
26
|
+
changeMonth: (newDate: TDate) => void;
|
|
27
|
+
changeFocusedDay: (newFocusedDate: TDate) => void;
|
|
28
|
+
isDateDisabled: (day: TDate | null) => boolean;
|
|
29
|
+
onMonthSwitchingAnimationEnd: () => void;
|
|
30
|
+
handleChangeMonth: (payload: ChangeMonthPayload<TDate>) => void;
|
|
31
|
+
};
|
|
32
|
+
export {};
|