@mui/lab 5.0.0-alpha.55 → 5.0.0-alpha.56

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.
Files changed (151) hide show
  1. package/AdapterDateFns/index.d.ts +1 -1
  2. package/AdapterDayjs/index.d.ts +1 -1
  3. package/AdapterLuxon/index.d.ts +1 -1
  4. package/AdapterMoment/index.d.ts +1 -1
  5. package/CHANGELOG.md +93 -2
  6. package/CalendarPicker/CalendarPicker.d.ts +106 -106
  7. package/CalendarPicker/PickersCalendar.d.ts +47 -47
  8. package/CalendarPicker/PickersCalendarHeader.d.ts +43 -43
  9. package/CalendarPicker/PickersFadeTransitionGroup.d.ts +12 -12
  10. package/CalendarPicker/PickersSlideTransition.d.ts +16 -16
  11. package/CalendarPicker/index.d.ts +5 -5
  12. package/CalendarPicker/shared.d.ts +1 -1
  13. package/CalendarPicker/useCalendarState.d.ts +32 -32
  14. package/CalendarPickerSkeleton/CalendarPickerSkeleton.d.ts +41 -41
  15. package/CalendarPickerSkeleton/index.d.ts +3 -3
  16. package/ClockPicker/Clock.d.ts +28 -28
  17. package/ClockPicker/ClockNumber.d.ts +19 -19
  18. package/ClockPicker/ClockNumbers.d.ts +24 -24
  19. package/ClockPicker/ClockPicker.d.ts +121 -121
  20. package/ClockPicker/ClockPickerStandalone.d.ts +28 -28
  21. package/ClockPicker/ClockPointer.d.ts +23 -23
  22. package/ClockPicker/index.d.ts +5 -5
  23. package/ClockPicker/shared.d.ts +5 -5
  24. package/DatePicker/DatePicker.d.ts +27 -27
  25. package/DatePicker/DatePickerToolbar.d.ts +23 -23
  26. package/DatePicker/index.d.ts +2 -2
  27. package/DatePicker/shared.d.ts +45 -45
  28. package/DateRangePicker/DateRangePicker.d.ts +65 -65
  29. package/DateRangePicker/DateRangePickerInput.d.ts +35 -35
  30. package/DateRangePicker/DateRangePickerToolbar.d.ts +15 -15
  31. package/DateRangePicker/DateRangePickerView.d.ts +44 -44
  32. package/DateRangePicker/DateRangePickerViewDesktop.d.ts +29 -29
  33. package/DateRangePicker/DateRangePickerViewMobile.d.ts +17 -17
  34. package/DateRangePicker/RangeTypes.d.ts +8 -8
  35. package/DateRangePicker/date-range-manager.d.ts +14 -14
  36. package/DateRangePicker/index.d.ts +3 -3
  37. package/DateRangePickerDay/DateRangePickerDay.d.ts +79 -79
  38. package/DateRangePickerDay/index.d.ts +2 -2
  39. package/DateTimePicker/DateTimePicker.d.ts +27 -27
  40. package/DateTimePicker/DateTimePickerTabs.d.ts +13 -13
  41. package/DateTimePicker/DateTimePickerToolbar.d.ts +7 -7
  42. package/DateTimePicker/index.d.ts +2 -2
  43. package/DateTimePicker/shared.d.ts +67 -67
  44. package/DesktopDatePicker/DesktopDatePicker.d.ts +20 -20
  45. package/DesktopDatePicker/index.d.ts +2 -2
  46. package/DesktopDateRangePicker/DesktopDateRangePicker.d.ts +64 -64
  47. package/DesktopDateRangePicker/index.d.ts +2 -2
  48. package/DesktopDateTimePicker/DesktopDateTimePicker.d.ts +20 -20
  49. package/DesktopDateTimePicker/index.d.ts +2 -2
  50. package/DesktopTimePicker/DesktopTimePicker.d.ts +20 -20
  51. package/DesktopTimePicker/index.d.ts +2 -2
  52. package/LoadingButton/loadingButtonClasses.d.ts +22 -22
  53. package/LocalizationProvider/LocalizationProvider.d.ts +35 -35
  54. package/LocalizationProvider/index.d.ts +2 -2
  55. package/Masonry/masonryClasses.d.ts +8 -8
  56. package/MobileDatePicker/MobileDatePicker.d.ts +20 -20
  57. package/MobileDatePicker/index.d.ts +2 -2
  58. package/MobileDateRangePicker/MobileDateRangePicker.d.ts +64 -64
  59. package/MobileDateRangePicker/index.d.ts +2 -2
  60. package/MobileDateTimePicker/MobileDateTimePicker.d.ts +20 -20
  61. package/MobileDateTimePicker/index.d.ts +2 -2
  62. package/MobileTimePicker/MobileTimePicker.d.ts +20 -20
  63. package/MobileTimePicker/index.d.ts +2 -2
  64. package/MonthPicker/MonthPicker.d.ts +53 -53
  65. package/MonthPicker/PickersMonth.d.ts +15 -15
  66. package/MonthPicker/index.d.ts +3 -3
  67. package/PickersDay/PickersDay.d.ts +93 -93
  68. package/PickersDay/index.d.ts +4 -4
  69. package/StaticDatePicker/StaticDatePicker.d.ts +25 -25
  70. package/StaticDatePicker/index.d.ts +2 -2
  71. package/StaticDateRangePicker/StaticDateRangePicker.d.ts +67 -67
  72. package/StaticDateRangePicker/index.d.ts +2 -2
  73. package/StaticDateTimePicker/StaticDateTimePicker.d.ts +25 -25
  74. package/StaticDateTimePicker/index.d.ts +2 -2
  75. package/StaticTimePicker/StaticTimePicker.d.ts +25 -25
  76. package/StaticTimePicker/index.d.ts +2 -2
  77. package/TabPanel/tabPanelClasses.d.ts +8 -8
  78. package/TimePicker/TimePicker.d.ts +27 -27
  79. package/TimePicker/TimePickerToolbar.d.ts +23 -23
  80. package/TimePicker/index.d.ts +2 -2
  81. package/TimePicker/shared.d.ts +36 -36
  82. package/Timeline/Timeline.d.ts +59 -59
  83. package/Timeline/TimelineContext.d.ts +6 -6
  84. package/Timeline/index.d.ts +5 -5
  85. package/Timeline/timelineClasses.d.ts +3 -3
  86. package/TimelineConnector/timelineConnectorClasses.d.ts +8 -8
  87. package/TimelineContent/timelineContentClasses.d.ts +14 -14
  88. package/TimelineDot/timelineDotClasses.d.ts +24 -24
  89. package/TimelineItem/timelineItemClasses.d.ts +16 -16
  90. package/TimelineOppositeContent/timelineOppositeContentClasses.d.ts +14 -14
  91. package/TimelineSeparator/timelineSeparatorClasses.d.ts +8 -8
  92. package/TreeItem/treeItemClasses.d.ts +24 -24
  93. package/TreeView/treeViewClasses.d.ts +8 -8
  94. package/YearPicker/PickersYear.d.ts +28 -28
  95. package/YearPicker/YearPicker.d.ts +44 -44
  96. package/YearPicker/index.d.ts +5 -5
  97. package/YearPicker/yearPickerClasses.d.ts +3 -3
  98. package/index.d.ts +3 -0
  99. package/index.js +4 -2
  100. package/internal/pickers/KeyboardDateInput.d.ts +4 -4
  101. package/internal/pickers/Picker/Picker.d.ts +33 -33
  102. package/internal/pickers/Picker/PickerView.d.ts +3 -3
  103. package/internal/pickers/PickersArrowSwitcher.d.ts +41 -41
  104. package/internal/pickers/PickersModalDialog.d.ts +47 -47
  105. package/internal/pickers/PickersPopper.d.ts +33 -33
  106. package/internal/pickers/PickersToolbar.d.ts +14 -14
  107. package/internal/pickers/PickersToolbarButton.d.ts +13 -13
  108. package/internal/pickers/PickersToolbarText.d.ts +8 -8
  109. package/internal/pickers/PureDateInput.d.ts +80 -80
  110. package/internal/pickers/constants/dimensions.d.ts +4 -4
  111. package/internal/pickers/constants/prop-types.d.ts +1 -1
  112. package/internal/pickers/date-time-utils.d.ts +8 -8
  113. package/internal/pickers/date-utils.d.ts +52 -52
  114. package/internal/pickers/hooks/date-helpers-hooks.d.ts +16 -16
  115. package/internal/pickers/hooks/useIsLandscape.d.ts +4 -4
  116. package/internal/pickers/hooks/useMaskedInput.d.ts +7 -7
  117. package/internal/pickers/hooks/useOpenState.d.ts +10 -10
  118. package/internal/pickers/hooks/usePickerState.d.ts +38 -38
  119. package/internal/pickers/hooks/useUtils.d.ts +7 -7
  120. package/internal/pickers/hooks/useValidation.d.ts +23 -23
  121. package/internal/pickers/hooks/useViews.d.ts +19 -19
  122. package/internal/pickers/test-utils.js +3 -0
  123. package/internal/pickers/text-field-helper.d.ts +11 -11
  124. package/internal/pickers/time-utils.d.ts +33 -33
  125. package/internal/pickers/typings/BasePicker.d.ts +95 -95
  126. package/internal/pickers/typings/Views.d.ts +1 -1
  127. package/internal/pickers/typings/helpers.d.ts +9 -9
  128. package/internal/pickers/utils.d.ts +7 -7
  129. package/internal/pickers/wrappers/DesktopTooltipWrapper.d.ts +4 -4
  130. package/internal/pickers/wrappers/DesktopWrapper.d.ts +16 -16
  131. package/internal/pickers/wrappers/MobileWrapper.d.ts +14 -14
  132. package/internal/pickers/wrappers/ResponsiveWrapper.d.ts +23 -23
  133. package/internal/pickers/wrappers/StaticWrapper.d.ts +10 -10
  134. package/internal/pickers/wrappers/WrapperProps.d.ts +13 -13
  135. package/internal/pickers/wrappers/WrapperVariantContext.d.ts +11 -11
  136. package/internal/svg-icons/ArrowDropDown.d.ts +7 -7
  137. package/internal/svg-icons/ArrowLeft.d.ts +7 -7
  138. package/internal/svg-icons/ArrowRight.d.ts +7 -7
  139. package/internal/svg-icons/Calendar.d.ts +7 -7
  140. package/internal/svg-icons/Clock.d.ts +7 -7
  141. package/internal/svg-icons/DateRange.d.ts +7 -7
  142. package/internal/svg-icons/Pen.d.ts +7 -7
  143. package/internal/svg-icons/Time.d.ts +7 -7
  144. package/legacy/index.js +4 -2
  145. package/legacy/internal/pickers/test-utils.js +2 -0
  146. package/modern/index.js +4 -2
  147. package/modern/internal/pickers/test-utils.js +3 -0
  148. package/node/index.js +23 -2
  149. package/node/internal/pickers/test-utils.js +3 -0
  150. package/package.json +5 -5
  151. package/themeAugmentation/components.d.ts +10 -0
@@ -1 +1 @@
1
- export { default } from '@date-io/date-fns';
1
+ export { default } from '@date-io/date-fns';
@@ -1 +1 @@
1
- export { default } from '@date-io/dayjs';
1
+ export { default } from '@date-io/dayjs';
@@ -1 +1 @@
1
- export { default } from '@date-io/luxon';
1
+ export { default } from '@date-io/luxon';
@@ -1 +1 @@
1
- export { default } from '@date-io/moment';
1
+ export { default } from '@date-io/moment';
package/CHANGELOG.md CHANGED
@@ -1,5 +1,87 @@
1
1
  ### [Versions](https://mui.com/versions/)
2
2
 
3
+ ## 5.2.0
4
+
5
+ <!-- generated comparing v5.1.1..master -->
6
+
7
+ _Nov 23, 2021_
8
+
9
+ A big thanks to the 18 contributors who made this release possible. Here are some highlights ✨:
10
+
11
+ - 🧪 Created another unstyled component: [TabsUnstyled](https://mui.com/components/tabs/#unstyled) (#29597) @mnajdova.
12
+ - 🎉 Updated the Material Icons set with the latest changes from Google (#29328) @michaldudak / (#29818) @chao813.
13
+ This update adds 200 new icons and tweaks the appearance of many more.
14
+ With it, we're getting close to having 2000 icons in our set.
15
+ - 🐛 Fixed bugs and improved the infrastructure and documentation 📚.
16
+
17
+ ### `@mui/material@5.2.0`
18
+
19
+ - [IconButton] Remove on hover effect when `disableRipple` is set (#29298) @adamfitzgibbon
20
+ - [i18n] Add the amharic language (#29153) @NatiG100
21
+ - [material] Fix types for `variants.style` to accept callbacks (#29610) @mnajdova
22
+ - [Popper] Simplify prop types (#29680) @michaldudak
23
+ - [Select] Include aria-selected=false when option not selected (#29695) @michaldudak
24
+ - [useMediaQuery] Fix crash in Safari < 14 and IE 11 (#29776) @eps1lon
25
+ - [useMediaQuery] Ensure no tearing in React 18 (#28491) @eps1lon
26
+
27
+ ### `@mui/codemod@5.2.0`
28
+
29
+ - [codemod] Fix `jss-to-styled` to support multiple withStyles (#29824) @siriwatknp
30
+
31
+ ### `@mui/icons-material@5.2.0`
32
+
33
+ - [icons] Sync new Google Material Icons (#29818) @chao813
34
+ - [icons] Sync recent Material Icons from Google (#29328) @michaldudak
35
+
36
+ ### `@mui/system@5.2.0`
37
+
38
+ - [Box] Fix `sx` prop runtime issue when used as function (#29830) @mnajdova
39
+ - [system] Fix `sx` throw error when value is `null` or `undefined` (#29756) @siriwatknp
40
+ - [system] Fix minor CssVars issues (#29747) @siriwatknp
41
+
42
+ ### `@mui/styled-engine@5.2.0`
43
+
44
+ - [styled-engine] Fix props inference in styled-engine (#29739) @Janpot
45
+
46
+ ### `@mui/base@5.0.0-alpha.56`
47
+
48
+ - [FormControlUnstyled] `focused` is always false unless explicitly set to `true` @mwilkins91
49
+ - [TabsUnstyled] Introduce new component (#29597) @mnajdova
50
+
51
+ ### `@mui/lab@5.0.0-alpha.56`
52
+
53
+ - [DatePicker][timepicker] Add missing component declarations (#29517) @longzheng
54
+ - [Masonry] exports from root package (#29754) @abhinav-22-tech
55
+ - [pickers] Widen accepted `luxon` version range (#29761) @eps1lon
56
+
57
+ ### Docs
58
+
59
+ - [blog] MUI X v5 blog post (#29590) @DanailH
60
+ - [blog] Polish the Benny Joo joins MUI post (#29697) @oliviertassinari
61
+ - [CHANGELOG] Explain why we do breaking changes @oliviertassinari
62
+ - [core] Update latest issue template for codesandbox CI (#29783) @eps1lon
63
+ - [core] Ensure `@mui/core` is an alias for `@mui/base` (#29762) @eps1lon
64
+ - [docs] Fix broken Next and Previous links (#29711) @scallaway
65
+ - [docs] Add a note that ToggleButton exclusive does not enforce selection (#29812) @mmacu
66
+ - [docs] Update the list of supported locales (#29831) @michaldudak
67
+ - [docs] Update tooltip doc to better define touch action (#29717) @gnowland
68
+ - [website] Standardize the background color from the MUI team photos (#29738) @danilo-leal
69
+ - [website] Add Bharat to the About Us Page (#29714) @bharatkashyap
70
+ - [website] Add about page entry for jan (#29701) @Janpot
71
+ - [website] Adding Prakhar to the about page (#29737) @danilo-leal
72
+
73
+ ### Core
74
+
75
+ - [test] Allow debugging with Chrome and VSCode inspector (#29777) @eps1lon
76
+ - [test] Use renderer clock instead of custom useFakeTimers call (#29778) @eps1lon
77
+ - [test] Only mock Date in regression tests (#29763) @eps1lon
78
+ - [test] Disable nightly integration tests on `next` branch (#29748) @eps1lon
79
+ - [test] Allow configuring clock directly from `createRenderer` (#29684) @eps1lon
80
+ - [test] Accept backslashes as path separators in test CLI (#29694) @michaldudak
81
+ - [utils] Use built-in hook when available for useId (#26489) @eps1lon
82
+
83
+ All contributors of this release in alphabetical order: @abhinav-22-tech, @adamfitzgibbon, @bharatkashyap, @chao813, @DanailH, @danilo-leal, @eps1lon, @gnowland, @Janpot, @longzheng, @michaldudak, @mmacu, @mnajdova, @mwilkins91, @NatiG100, @oliviertassinari, @scallaway, @siriwatknp
84
+
3
85
  ## 5.1.1
4
86
 
5
87
  <!-- generated comparing v5.1.0..master -->
@@ -8,7 +90,7 @@ _Nov 16, 2021_
8
90
 
9
91
  A big thanks to the 15 contributors who made this release possible. Here are some highlights ✨:
10
92
 
11
- - 🛠 Rename `@mui/core` to `@mui/base`. (#29585) @michaldudak
93
+ - 🛠 Renamed `@mui/core` to `@mui/base` (#29585) @michaldudak.
12
94
  - And many more 🐛 bug fixes and 📚 improvements.
13
95
 
14
96
  ### `@mui/material@5.1.1`
@@ -22,10 +104,19 @@ A big thanks to the 15 contributors who made this release possible. Here are som
22
104
 
23
105
  ### `@mui/base@5.0.0-alpha.55`
24
106
 
25
- #### BREAKING CHANGE
107
+ #### Breaking changes
26
108
 
27
109
  - &#8203;<!-- 27 -->[core] Rename mui/core to mui/base (#29585) @michaldudak
28
110
 
111
+ Based on the results of the [poll](https://twitter.com/michaldudak/status/1452630484706635779) and our internal discussions, we decided to rename the `@mui/core` package to `@mui/base`. The main rationale for this is the fact that we use the term "Core" to refer to the core components product family, the one that includes Material Design components, unstyled components, System utilities, etc. Therefore, @mui/core was effectively a subset of MUI Core. This was confusing.
112
+
113
+ The new name better reflects the purpose of the package: it contains unstyled components, hooks, and utilities that serve as a **base** to build on.
114
+
115
+ ```diff
116
+ -import { useSwitch } from '@mui/core/SwitchUnstyled';
117
+ +import { useSwitch } from '@mui/base/SwitchUnstyled';
118
+ ```
119
+
29
120
  ### `@mui/lab@5.0.0-alpha.55`
30
121
 
31
122
  - &#8203;<!-- 12 -->[LoadingButton] Text variant spacing fixed for both start and end (#29194) @joshua-lawrence
@@ -1,106 +1,106 @@
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
- * If `true`, the picker and text field are disabled.
23
- * @default false
24
- */
25
- disabled?: boolean;
26
- /**
27
- * @default false
28
- */
29
- disableFuture?: boolean;
30
- /**
31
- * @default false
32
- */
33
- disablePast?: boolean;
34
- /**
35
- * Max selectable date. @DateIOType
36
- */
37
- maxDate?: TDate;
38
- /**
39
- * Min selectable date. @DateIOType
40
- */
41
- minDate?: TDate;
42
- /**
43
- * Callback fired on view change.
44
- */
45
- onViewChange?: (view: CalendarPickerView) => void;
46
- /**
47
- * Callback fired on date change
48
- */
49
- onChange: PickerOnChangeFn<TDate>;
50
- /**
51
- * Callback firing on month change. @DateIOType
52
- */
53
- onMonthChange?: (date: TDate) => void;
54
- /**
55
- * Initially open view.
56
- * @default 'day'
57
- */
58
- openTo?: CalendarPickerView;
59
- /**
60
- * Make picker read only.
61
- * @default false
62
- */
63
- readOnly?: boolean;
64
- /**
65
- * Disable heavy animations.
66
- * @default typeof navigator !== 'undefined' && /(android)/i.test(navigator.userAgent)
67
- */
68
- reduceAnimations?: boolean;
69
- /**
70
- * Component displaying when passed `loading` true.
71
- * @default () => <span data-mui-test="loading-progress">...</span>
72
- */
73
- renderLoading?: () => React.ReactNode;
74
- /**
75
- * Disable specific date. @DateIOType
76
- */
77
- shouldDisableDate?: (day: TDate) => boolean;
78
- /**
79
- * Controlled open view.
80
- */
81
- view?: CalendarPickerView;
82
- /**
83
- * Views for calendar picker.
84
- * @default ['year', 'day']
85
- */
86
- views?: readonly CalendarPickerView[];
87
- }
88
- export declare type ExportedCalendarPickerProps<TDate> = Omit<CalendarPickerProps<TDate>, 'date' | 'view' | 'views' | 'openTo' | 'onChange' | 'changeView' | 'slideDirection' | 'currentMonth' | 'className'>;
89
- interface CalendarPickerPropsWithClasses<TDate> extends CalendarPickerProps<TDate> {
90
- classes?: Partial<CalendarPickerClasses>;
91
- }
92
- export declare function getCalendarPickerUtilityClass(slot: string): string;
93
- export declare const calendarPickerClasses: CalendarPickerClasses;
94
- export declare const defaultReduceAnimations: boolean;
95
- declare const _default: <TDate>(props: CalendarPickerPropsWithClasses<TDate> & React.RefAttributes<HTMLDivElement>) => JSX.Element;
96
- /**
97
- *
98
- * Demos:
99
- *
100
- * - [Date Picker](https://mui.com/components/date-picker/)
101
- *
102
- * API:
103
- *
104
- * - [CalendarPicker API](https://mui.com/api/calendar-picker/)
105
- */
106
- 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
+ * If `true`, the picker and text field are disabled.
23
+ * @default false
24
+ */
25
+ disabled?: boolean;
26
+ /**
27
+ * @default false
28
+ */
29
+ disableFuture?: boolean;
30
+ /**
31
+ * @default false
32
+ */
33
+ disablePast?: boolean;
34
+ /**
35
+ * Max selectable date. @DateIOType
36
+ */
37
+ maxDate?: TDate;
38
+ /**
39
+ * Min selectable date. @DateIOType
40
+ */
41
+ minDate?: TDate;
42
+ /**
43
+ * Callback fired on view change.
44
+ */
45
+ onViewChange?: (view: CalendarPickerView) => void;
46
+ /**
47
+ * Callback fired on date change
48
+ */
49
+ onChange: PickerOnChangeFn<TDate>;
50
+ /**
51
+ * Callback firing on month change. @DateIOType
52
+ */
53
+ onMonthChange?: (date: TDate) => void;
54
+ /**
55
+ * Initially open view.
56
+ * @default 'day'
57
+ */
58
+ openTo?: CalendarPickerView;
59
+ /**
60
+ * Make picker read only.
61
+ * @default false
62
+ */
63
+ readOnly?: boolean;
64
+ /**
65
+ * Disable heavy animations.
66
+ * @default typeof navigator !== 'undefined' && /(android)/i.test(navigator.userAgent)
67
+ */
68
+ reduceAnimations?: boolean;
69
+ /**
70
+ * Component displaying when passed `loading` true.
71
+ * @default () => <span data-mui-test="loading-progress">...</span>
72
+ */
73
+ renderLoading?: () => React.ReactNode;
74
+ /**
75
+ * Disable specific date. @DateIOType
76
+ */
77
+ shouldDisableDate?: (day: TDate) => boolean;
78
+ /**
79
+ * Controlled open view.
80
+ */
81
+ view?: CalendarPickerView;
82
+ /**
83
+ * Views for calendar picker.
84
+ * @default ['year', 'day']
85
+ */
86
+ views?: readonly CalendarPickerView[];
87
+ }
88
+ export declare type ExportedCalendarPickerProps<TDate> = Omit<CalendarPickerProps<TDate>, 'date' | 'view' | 'views' | 'openTo' | 'onChange' | 'changeView' | 'slideDirection' | 'currentMonth' | 'className'>;
89
+ interface CalendarPickerPropsWithClasses<TDate> extends CalendarPickerProps<TDate> {
90
+ classes?: Partial<CalendarPickerClasses>;
91
+ }
92
+ export declare function getCalendarPickerUtilityClass(slot: string): string;
93
+ export declare const calendarPickerClasses: CalendarPickerClasses;
94
+ export declare const defaultReduceAnimations: boolean;
95
+ declare const _default: <TDate>(props: CalendarPickerPropsWithClasses<TDate> & React.RefAttributes<HTMLDivElement>) => JSX.Element;
96
+ /**
97
+ *
98
+ * Demos:
99
+ *
100
+ * - [Date Picker](https://mui.com/components/date-picker/)
101
+ *
102
+ * API:
103
+ *
104
+ * - [CalendarPicker API](https://mui.com/api/calendar-picker/)
105
+ */
106
+ export default _default;
@@ -1,47 +1,47 @@
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
- disabled?: boolean;
33
- focusedDay: TDate | null;
34
- isDateDisabled: (day: TDate) => boolean;
35
- isMonthSwitchingAnimating: boolean;
36
- onFocusedDayChange: (newFocusedDay: TDate) => void;
37
- onMonthSwitchingAnimationEnd: () => void;
38
- readOnly?: boolean;
39
- reduceAnimations: boolean;
40
- slideDirection: SlideDirection;
41
- TransitionProps?: Partial<SlideTransitionProps>;
42
- }
43
- /**
44
- * @ignore - do not document.
45
- */
46
- declare function PickersCalendar<TDate>(props: PickersCalendarProps<TDate>): JSX.Element;
47
- 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
+ disabled?: boolean;
33
+ focusedDay: TDate | null;
34
+ isDateDisabled: (day: TDate) => boolean;
35
+ isMonthSwitchingAnimating: boolean;
36
+ onFocusedDayChange: (newFocusedDay: TDate) => void;
37
+ onMonthSwitchingAnimationEnd: () => void;
38
+ readOnly?: boolean;
39
+ reduceAnimations: boolean;
40
+ slideDirection: SlideDirection;
41
+ TransitionProps?: Partial<SlideTransitionProps>;
42
+ }
43
+ /**
44
+ * @ignore - do not document.
45
+ */
46
+ declare function PickersCalendar<TDate>(props: PickersCalendarProps<TDate>): JSX.Element;
47
+ export default PickersCalendar;
@@ -1,43 +1,43 @@
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
- disabled?: boolean;
29
- views: readonly CalendarPickerView[];
30
- /**
31
- * Get aria-label text for switching between views button.
32
- */
33
- getViewSwitchingButtonText?: (currentView: CalendarPickerView) => string;
34
- onMonthChange: (date: TDate, slideDirection: SlideDirection) => void;
35
- openView: CalendarPickerView;
36
- reduceAnimations: boolean;
37
- onViewChange?: (view: CalendarPickerView) => void;
38
- }
39
- /**
40
- * @ignore - do not document.
41
- */
42
- declare function PickersCalendarHeader<TDate>(props: PickersCalendarHeaderProps<TDate>): JSX.Element | null;
43
- 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
+ disabled?: boolean;
29
+ views: readonly CalendarPickerView[];
30
+ /**
31
+ * Get aria-label text for switching between views button.
32
+ */
33
+ getViewSwitchingButtonText?: (currentView: CalendarPickerView) => string;
34
+ onMonthChange: (date: TDate, slideDirection: SlideDirection) => void;
35
+ openView: CalendarPickerView;
36
+ reduceAnimations: boolean;
37
+ onViewChange?: (view: CalendarPickerView) => void;
38
+ }
39
+ /**
40
+ * @ignore - do not document.
41
+ */
42
+ declare function PickersCalendarHeader<TDate>(props: PickersCalendarHeaderProps<TDate>): JSX.Element | null;
43
+ 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';