@mui/lab 5.0.0-alpha.53 → 5.0.0-alpha.57
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 +299 -9
- package/CalendarPicker/CalendarPicker.d.ts +106 -96
- package/CalendarPicker/CalendarPicker.js +13 -1
- package/CalendarPicker/PickersCalendar.d.ts +47 -45
- package/CalendarPicker/PickersCalendar.js +9 -3
- package/CalendarPicker/PickersCalendarHeader.d.ts +43 -42
- package/CalendarPicker/PickersCalendarHeader.js +5 -4
- package/CalendarPicker/PickersFadeTransitionGroup.d.ts +12 -12
- package/CalendarPicker/PickersFadeTransitionGroup.js +1 -1
- package/CalendarPicker/PickersSlideTransition.d.ts +16 -16
- package/CalendarPicker/PickersSlideTransition.js +1 -1
- 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/CalendarPickerSkeleton.js +2 -2
- package/CalendarPickerSkeleton/index.d.ts +3 -3
- package/ClockPicker/Clock.d.ts +28 -28
- package/ClockPicker/ClockNumber.d.ts +19 -19
- package/ClockPicker/ClockNumber.js +1 -1
- package/ClockPicker/ClockNumbers.d.ts +24 -24
- package/ClockPicker/ClockPicker.d.ts +121 -121
- package/ClockPicker/ClockPicker.js +1 -1
- 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/DatePicker.js +2 -0
- package/DatePicker/DatePickerToolbar.d.ts +23 -23
- package/DatePicker/DatePickerToolbar.js +1 -1
- package/DatePicker/index.d.ts +2 -2
- package/DatePicker/shared.d.ts +45 -45
- package/DateRangePicker/DateRangePicker.d.ts +65 -65
- package/DateRangePicker/DateRangePicker.js +2 -0
- package/DateRangePicker/DateRangePickerInput.d.ts +35 -35
- package/DateRangePicker/DateRangePickerToolbar.d.ts +15 -15
- package/DateRangePicker/DateRangePickerToolbar.js +1 -1
- 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/DateRangePickerDay.js +2 -2
- package/DateRangePickerDay/index.d.ts +2 -2
- package/DateTimePicker/DateTimePicker.d.ts +27 -27
- package/DateTimePicker/DateTimePicker.js +2 -0
- package/DateTimePicker/DateTimePickerTabs.d.ts +13 -13
- package/DateTimePicker/DateTimePickerToolbar.d.ts +7 -7
- package/DateTimePicker/DateTimePickerToolbar.js +1 -1
- package/DateTimePicker/index.d.ts +2 -2
- package/DateTimePicker/shared.d.ts +67 -67
- package/DesktopDatePicker/DesktopDatePicker.d.ts +20 -20
- package/DesktopDatePicker/DesktopDatePicker.js +2 -0
- package/DesktopDatePicker/index.d.ts +2 -2
- package/DesktopDateRangePicker/DesktopDateRangePicker.d.ts +64 -64
- package/DesktopDateRangePicker/DesktopDateRangePicker.js +2 -0
- package/DesktopDateRangePicker/index.d.ts +2 -2
- package/DesktopDateTimePicker/DesktopDateTimePicker.d.ts +20 -20
- package/DesktopDateTimePicker/DesktopDateTimePicker.js +2 -0
- 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/LoadingButton.js +20 -7
- package/LoadingButton/loadingButtonClasses.d.ts +22 -22
- package/LoadingButton/loadingButtonClasses.js +1 -1
- package/LocalizationProvider/LocalizationProvider.d.ts +35 -35
- package/LocalizationProvider/index.d.ts +2 -2
- package/Masonry/Masonry.js +83 -98
- package/Masonry/masonryClasses.d.ts +8 -8
- package/Masonry/masonryClasses.js +1 -1
- package/MobileDatePicker/MobileDatePicker.d.ts +20 -20
- package/MobileDatePicker/MobileDatePicker.js +2 -0
- package/MobileDatePicker/index.d.ts +2 -2
- package/MobileDateRangePicker/MobileDateRangePicker.d.ts +64 -64
- package/MobileDateRangePicker/MobileDateRangePicker.js +2 -0
- package/MobileDateRangePicker/index.d.ts +2 -2
- package/MobileDateTimePicker/MobileDateTimePicker.d.ts +20 -20
- package/MobileDateTimePicker/MobileDateTimePicker.js +2 -0
- 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 -49
- package/MonthPicker/MonthPicker.js +23 -6
- package/MonthPicker/PickersMonth.d.ts +15 -15
- package/MonthPicker/PickersMonth.js +19 -14
- package/MonthPicker/index.d.ts +3 -3
- package/PickersDay/PickersDay.d.ts +93 -93
- package/PickersDay/PickersDay.js +2 -2
- package/PickersDay/index.d.ts +4 -4
- package/StaticDatePicker/StaticDatePicker.d.ts +25 -25
- package/StaticDatePicker/StaticDatePicker.js +2 -0
- package/StaticDatePicker/index.d.ts +2 -2
- package/StaticDateRangePicker/StaticDateRangePicker.d.ts +67 -67
- package/StaticDateRangePicker/StaticDateRangePicker.js +2 -0
- package/StaticDateRangePicker/index.d.ts +2 -2
- package/StaticDateTimePicker/StaticDateTimePicker.d.ts +25 -25
- package/StaticDateTimePicker/StaticDateTimePicker.js +2 -0
- package/StaticDateTimePicker/index.d.ts +2 -2
- package/StaticTimePicker/StaticTimePicker.d.ts +25 -25
- package/StaticTimePicker/index.d.ts +2 -2
- package/TabPanel/TabPanel.js +2 -2
- package/TabPanel/tabPanelClasses.d.ts +8 -8
- package/TabPanel/tabPanelClasses.js +1 -1
- package/TimePicker/TimePicker.d.ts +27 -27
- package/TimePicker/TimePickerToolbar.d.ts +23 -23
- package/TimePicker/TimePickerToolbar.js +1 -1
- package/TimePicker/index.d.ts +2 -2
- package/TimePicker/shared.d.ts +36 -36
- package/Timeline/Timeline.d.ts +59 -59
- package/Timeline/Timeline.js +2 -2
- package/Timeline/TimelineContext.d.ts +6 -6
- package/Timeline/index.d.ts +5 -5
- package/Timeline/timelineClasses.d.ts +3 -3
- package/Timeline/timelineClasses.js +1 -1
- package/TimelineConnector/TimelineConnector.js +2 -2
- package/TimelineConnector/timelineConnectorClasses.d.ts +8 -8
- package/TimelineConnector/timelineConnectorClasses.js +1 -1
- package/TimelineContent/TimelineContent.js +2 -2
- package/TimelineContent/timelineContentClasses.d.ts +14 -14
- package/TimelineContent/timelineContentClasses.js +1 -1
- package/TimelineDot/TimelineDot.js +2 -2
- package/TimelineDot/timelineDotClasses.d.ts +24 -24
- package/TimelineDot/timelineDotClasses.js +1 -1
- package/TimelineItem/TimelineItem.js +2 -2
- package/TimelineItem/timelineItemClasses.d.ts +16 -16
- package/TimelineItem/timelineItemClasses.js +1 -1
- package/TimelineOppositeContent/TimelineOppositeContent.js +2 -2
- package/TimelineOppositeContent/timelineOppositeContentClasses.d.ts +14 -14
- package/TimelineOppositeContent/timelineOppositeContentClasses.js +1 -1
- package/TimelineSeparator/TimelineSeparator.js +2 -2
- package/TimelineSeparator/timelineSeparatorClasses.d.ts +8 -8
- package/TimelineSeparator/timelineSeparatorClasses.js +1 -1
- package/TreeItem/TreeItem.js +2 -2
- package/TreeItem/treeItemClasses.d.ts +24 -24
- package/TreeItem/treeItemClasses.js +1 -1
- package/TreeView/TreeView.js +2 -2
- package/TreeView/treeViewClasses.d.ts +8 -8
- package/TreeView/treeViewClasses.js +1 -1
- package/YearPicker/PickersYear.d.ts +28 -28
- package/YearPicker/PickersYear.js +2 -2
- package/YearPicker/YearPicker.d.ts +44 -42
- package/YearPicker/YearPicker.js +18 -2
- package/YearPicker/index.d.ts +5 -5
- package/YearPicker/yearPickerClasses.d.ts +3 -3
- package/YearPicker/yearPickerClasses.js +1 -1
- package/index.d.ts +3 -0
- package/index.js +4 -2
- 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 +33 -33
- package/internal/pickers/PickersToolbar.d.ts +14 -14
- package/internal/pickers/PickersToolbar.js +1 -1
- package/internal/pickers/PickersToolbarButton.d.ts +13 -13
- package/internal/pickers/PickersToolbarText.d.ts +8 -8
- package/internal/pickers/PickersToolbarText.js +1 -1
- 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/test-utils.js +17 -7
- 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/CalendarPicker/CalendarPicker.js +13 -1
- package/legacy/CalendarPicker/PickersCalendar.js +10 -3
- package/legacy/CalendarPicker/PickersCalendarHeader.js +5 -4
- package/legacy/CalendarPicker/PickersFadeTransitionGroup.js +1 -1
- package/legacy/CalendarPicker/PickersSlideTransition.js +1 -1
- package/legacy/CalendarPickerSkeleton/CalendarPickerSkeleton.js +2 -2
- package/legacy/ClockPicker/ClockNumber.js +1 -1
- package/legacy/ClockPicker/ClockPicker.js +1 -1
- package/legacy/DatePicker/DatePicker.js +2 -0
- package/legacy/DatePicker/DatePickerToolbar.js +1 -1
- package/legacy/DateRangePicker/DateRangePicker.js +2 -0
- package/legacy/DateRangePicker/DateRangePickerToolbar.js +1 -1
- package/legacy/DateRangePickerDay/DateRangePickerDay.js +2 -2
- package/legacy/DateTimePicker/DateTimePicker.js +2 -0
- package/legacy/DateTimePicker/DateTimePickerToolbar.js +1 -1
- package/legacy/DesktopDatePicker/DesktopDatePicker.js +2 -0
- package/legacy/DesktopDateRangePicker/DesktopDateRangePicker.js +2 -0
- package/legacy/DesktopDateTimePicker/DesktopDateTimePicker.js +2 -0
- package/legacy/LoadingButton/LoadingButton.js +20 -6
- package/legacy/LoadingButton/loadingButtonClasses.js +1 -1
- package/legacy/Masonry/Masonry.js +83 -96
- package/legacy/Masonry/masonryClasses.js +1 -1
- package/legacy/MobileDatePicker/MobileDatePicker.js +2 -0
- package/legacy/MobileDateRangePicker/MobileDateRangePicker.js +2 -0
- package/legacy/MobileDateTimePicker/MobileDateTimePicker.js +2 -0
- package/legacy/MonthPicker/MonthPicker.js +22 -5
- package/legacy/MonthPicker/PickersMonth.js +20 -15
- package/legacy/PickersDay/PickersDay.js +2 -2
- package/legacy/StaticDatePicker/StaticDatePicker.js +2 -0
- package/legacy/StaticDateRangePicker/StaticDateRangePicker.js +2 -0
- package/legacy/StaticDateTimePicker/StaticDateTimePicker.js +2 -0
- package/legacy/TabPanel/TabPanel.js +2 -2
- package/legacy/TabPanel/tabPanelClasses.js +1 -1
- package/legacy/TimePicker/TimePickerToolbar.js +1 -1
- package/legacy/Timeline/Timeline.js +2 -2
- package/legacy/Timeline/timelineClasses.js +1 -1
- package/legacy/TimelineConnector/TimelineConnector.js +2 -2
- package/legacy/TimelineConnector/timelineConnectorClasses.js +1 -1
- package/legacy/TimelineContent/TimelineContent.js +2 -2
- package/legacy/TimelineContent/timelineContentClasses.js +1 -1
- package/legacy/TimelineDot/TimelineDot.js +2 -2
- package/legacy/TimelineDot/timelineDotClasses.js +1 -1
- package/legacy/TimelineItem/TimelineItem.js +2 -2
- package/legacy/TimelineItem/timelineItemClasses.js +1 -1
- package/legacy/TimelineOppositeContent/TimelineOppositeContent.js +2 -2
- package/legacy/TimelineOppositeContent/timelineOppositeContentClasses.js +1 -1
- package/legacy/TimelineSeparator/TimelineSeparator.js +2 -2
- package/legacy/TimelineSeparator/timelineSeparatorClasses.js +1 -1
- package/legacy/TreeItem/TreeItem.js +2 -2
- package/legacy/TreeItem/treeItemClasses.js +1 -1
- package/legacy/TreeView/TreeView.js +2 -2
- package/legacy/TreeView/treeViewClasses.js +1 -1
- package/legacy/YearPicker/PickersYear.js +2 -2
- package/legacy/YearPicker/YearPicker.js +18 -2
- package/legacy/YearPicker/yearPickerClasses.js +1 -1
- package/legacy/index.js +4 -2
- package/legacy/internal/pickers/PickersToolbar.js +1 -1
- package/legacy/internal/pickers/PickersToolbarText.js +1 -1
- package/legacy/internal/pickers/test-utils.js +13 -8
- package/legacy/useAutocomplete/index.js +1 -1
- package/modern/CalendarPicker/CalendarPicker.js +13 -1
- package/modern/CalendarPicker/PickersCalendar.js +9 -3
- package/modern/CalendarPicker/PickersCalendarHeader.js +5 -4
- package/modern/CalendarPicker/PickersFadeTransitionGroup.js +1 -1
- package/modern/CalendarPicker/PickersSlideTransition.js +1 -1
- package/modern/CalendarPickerSkeleton/CalendarPickerSkeleton.js +2 -2
- package/modern/ClockPicker/ClockNumber.js +1 -1
- package/modern/ClockPicker/ClockPicker.js +1 -1
- package/modern/DatePicker/DatePicker.js +2 -0
- package/modern/DatePicker/DatePickerToolbar.js +1 -1
- package/modern/DateRangePicker/DateRangePicker.js +2 -0
- package/modern/DateRangePicker/DateRangePickerToolbar.js +1 -1
- package/modern/DateRangePickerDay/DateRangePickerDay.js +2 -2
- package/modern/DateTimePicker/DateTimePicker.js +2 -0
- package/modern/DateTimePicker/DateTimePickerToolbar.js +1 -1
- package/modern/DesktopDatePicker/DesktopDatePicker.js +2 -0
- package/modern/DesktopDateRangePicker/DesktopDateRangePicker.js +2 -0
- package/modern/DesktopDateTimePicker/DesktopDateTimePicker.js +2 -0
- package/modern/LoadingButton/LoadingButton.js +20 -7
- package/modern/LoadingButton/loadingButtonClasses.js +1 -1
- package/modern/Masonry/Masonry.js +79 -98
- package/modern/Masonry/masonryClasses.js +1 -1
- package/modern/MobileDatePicker/MobileDatePicker.js +2 -0
- package/modern/MobileDateRangePicker/MobileDateRangePicker.js +2 -0
- package/modern/MobileDateTimePicker/MobileDateTimePicker.js +2 -0
- package/modern/MonthPicker/MonthPicker.js +23 -6
- package/modern/MonthPicker/PickersMonth.js +19 -14
- package/modern/PickersDay/PickersDay.js +2 -2
- package/modern/StaticDatePicker/StaticDatePicker.js +2 -0
- package/modern/StaticDateRangePicker/StaticDateRangePicker.js +2 -0
- package/modern/StaticDateTimePicker/StaticDateTimePicker.js +2 -0
- package/modern/TabPanel/TabPanel.js +2 -2
- package/modern/TabPanel/tabPanelClasses.js +1 -1
- package/modern/TimePicker/TimePickerToolbar.js +1 -1
- package/modern/Timeline/Timeline.js +2 -2
- package/modern/Timeline/timelineClasses.js +1 -1
- package/modern/TimelineConnector/TimelineConnector.js +2 -2
- package/modern/TimelineConnector/timelineConnectorClasses.js +1 -1
- package/modern/TimelineContent/TimelineContent.js +2 -2
- package/modern/TimelineContent/timelineContentClasses.js +1 -1
- package/modern/TimelineDot/TimelineDot.js +2 -2
- package/modern/TimelineDot/timelineDotClasses.js +1 -1
- package/modern/TimelineItem/TimelineItem.js +2 -2
- package/modern/TimelineItem/timelineItemClasses.js +1 -1
- package/modern/TimelineOppositeContent/TimelineOppositeContent.js +2 -2
- package/modern/TimelineOppositeContent/timelineOppositeContentClasses.js +1 -1
- package/modern/TimelineSeparator/TimelineSeparator.js +2 -2
- package/modern/TimelineSeparator/timelineSeparatorClasses.js +1 -1
- package/modern/TreeItem/TreeItem.js +2 -2
- package/modern/TreeItem/treeItemClasses.js +1 -1
- package/modern/TreeView/TreeView.js +2 -2
- package/modern/TreeView/treeViewClasses.js +1 -1
- package/modern/YearPicker/PickersYear.js +2 -2
- package/modern/YearPicker/YearPicker.js +18 -2
- package/modern/YearPicker/yearPickerClasses.js +1 -1
- package/modern/index.js +4 -2
- package/modern/internal/pickers/PickersToolbar.js +1 -1
- package/modern/internal/pickers/PickersToolbarText.js +1 -1
- package/modern/internal/pickers/test-utils.js +17 -7
- package/modern/useAutocomplete/index.js +1 -1
- package/node/CalendarPicker/CalendarPicker.js +16 -4
- package/node/CalendarPicker/PickersCalendar.js +9 -3
- package/node/CalendarPicker/PickersCalendarHeader.js +5 -4
- package/node/CalendarPicker/PickersFadeTransitionGroup.js +2 -2
- package/node/CalendarPicker/PickersSlideTransition.js +2 -2
- package/node/CalendarPickerSkeleton/CalendarPickerSkeleton.js +5 -5
- package/node/ClockPicker/ClockNumber.js +2 -2
- package/node/ClockPicker/ClockPicker.js +4 -4
- package/node/DatePicker/DatePicker.js +2 -0
- package/node/DatePicker/DatePickerToolbar.js +2 -2
- package/node/DateRangePicker/DateRangePicker.js +2 -0
- package/node/DateRangePicker/DateRangePickerToolbar.js +2 -2
- package/node/DateRangePickerDay/DateRangePickerDay.js +5 -5
- package/node/DateTimePicker/DateTimePicker.js +2 -0
- package/node/DateTimePicker/DateTimePickerToolbar.js +2 -2
- package/node/DesktopDatePicker/DesktopDatePicker.js +2 -0
- package/node/DesktopDateRangePicker/DesktopDateRangePicker.js +2 -0
- package/node/DesktopDateTimePicker/DesktopDateTimePicker.js +2 -0
- package/node/LoadingButton/LoadingButton.js +21 -8
- package/node/LoadingButton/loadingButtonClasses.js +3 -3
- package/node/Masonry/Masonry.js +88 -100
- package/node/Masonry/masonryClasses.js +3 -3
- package/node/MobileDatePicker/MobileDatePicker.js +2 -0
- package/node/MobileDateRangePicker/MobileDateRangePicker.js +2 -0
- package/node/MobileDateTimePicker/MobileDateTimePicker.js +2 -0
- package/node/MonthPicker/MonthPicker.js +26 -9
- package/node/MonthPicker/PickersMonth.js +20 -15
- package/node/PickersDay/PickersDay.js +5 -5
- package/node/StaticDatePicker/StaticDatePicker.js +2 -0
- package/node/StaticDateRangePicker/StaticDateRangePicker.js +2 -0
- package/node/StaticDateTimePicker/StaticDateTimePicker.js +2 -0
- package/node/TabPanel/TabPanel.js +3 -3
- package/node/TabPanel/tabPanelClasses.js +3 -3
- package/node/TimePicker/TimePickerToolbar.js +4 -4
- package/node/Timeline/Timeline.js +3 -3
- package/node/Timeline/timelineClasses.js +3 -3
- package/node/TimelineConnector/TimelineConnector.js +3 -3
- package/node/TimelineConnector/timelineConnectorClasses.js +3 -3
- package/node/TimelineContent/TimelineContent.js +3 -3
- package/node/TimelineContent/timelineContentClasses.js +3 -3
- package/node/TimelineDot/TimelineDot.js +3 -3
- package/node/TimelineDot/timelineDotClasses.js +3 -3
- package/node/TimelineItem/TimelineItem.js +3 -3
- package/node/TimelineItem/timelineItemClasses.js +3 -3
- package/node/TimelineOppositeContent/TimelineOppositeContent.js +3 -3
- package/node/TimelineOppositeContent/timelineOppositeContentClasses.js +3 -3
- package/node/TimelineSeparator/TimelineSeparator.js +3 -3
- package/node/TimelineSeparator/timelineSeparatorClasses.js +3 -3
- package/node/TreeItem/TreeItem.js +3 -3
- package/node/TreeItem/treeItemClasses.js +3 -3
- package/node/TreeView/TreeView.js +3 -3
- package/node/TreeView/treeViewClasses.js +3 -3
- package/node/YearPicker/PickersYear.js +5 -5
- package/node/YearPicker/YearPicker.js +19 -3
- package/node/YearPicker/yearPickerClasses.js +3 -3
- package/node/index.js +23 -2
- package/node/internal/pickers/PickersToolbar.js +2 -2
- package/node/internal/pickers/PickersToolbarText.js +2 -2
- package/node/internal/pickers/test-utils.js +17 -7
- package/node/useAutocomplete/index.js +3 -3
- package/package.json +7 -6
- package/themeAugmentation/components.d.ts +10 -0
- package/useAutocomplete/index.d.ts +1 -1
- package/useAutocomplete/index.js +1 -1
|
@@ -1,45 +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
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
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
|
+
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;
|
|
@@ -70,6 +70,7 @@ function PickersCalendar(props) {
|
|
|
70
70
|
className,
|
|
71
71
|
currentMonth,
|
|
72
72
|
date,
|
|
73
|
+
disabled,
|
|
73
74
|
disableHighlightToday,
|
|
74
75
|
focusedDay,
|
|
75
76
|
isDateDisabled,
|
|
@@ -77,6 +78,7 @@ function PickersCalendar(props) {
|
|
|
77
78
|
loading,
|
|
78
79
|
onChange,
|
|
79
80
|
onMonthSwitchingAnimationEnd,
|
|
81
|
+
readOnly,
|
|
80
82
|
reduceAnimations,
|
|
81
83
|
renderDay,
|
|
82
84
|
renderLoading = () => _span || (_span = /*#__PURE__*/_jsx("span", {
|
|
@@ -89,10 +91,14 @@ function PickersCalendar(props) {
|
|
|
89
91
|
const now = useNow();
|
|
90
92
|
const utils = useUtils();
|
|
91
93
|
const handleDaySelect = React.useCallback((day, isFinish = 'finish') => {
|
|
92
|
-
|
|
94
|
+
if (readOnly) {
|
|
95
|
+
return;
|
|
96
|
+
} // TODO possibly buggy line figure out and add tests
|
|
97
|
+
|
|
98
|
+
|
|
93
99
|
const finalDate = Array.isArray(date) ? day : utils.mergeDateAndTime(day, date || now);
|
|
94
100
|
onChange(finalDate, isFinish);
|
|
95
|
-
}, [date, now, onChange, utils]);
|
|
101
|
+
}, [date, now, onChange, readOnly, utils]);
|
|
96
102
|
const currentMonthNumber = utils.getMonth(currentMonth);
|
|
97
103
|
const selectedDates = (Array.isArray(date) ? date : [date]).filter(Boolean).map(selectedDateItem => selectedDateItem && utils.startOfDay(selectedDateItem)); // need a new ref whenever the `key` of the transition changes: https://reactcommunity.org/react-transition-group/transition#Transition-prop-nodeRef.
|
|
98
104
|
|
|
@@ -126,7 +132,7 @@ function PickersCalendar(props) {
|
|
|
126
132
|
key: day == null ? void 0 : day.toString(),
|
|
127
133
|
day,
|
|
128
134
|
isAnimating: isMonthSwitchingAnimating,
|
|
129
|
-
disabled: isDateDisabled(day),
|
|
135
|
+
disabled: disabled || isDateDisabled(day),
|
|
130
136
|
allowSameDateSelection,
|
|
131
137
|
autoFocus: autoFocus && focusedDay !== null && utils.isSameDay(day, focusedDay),
|
|
132
138
|
today: utils.isSameDay(day, now),
|
|
@@ -1,42 +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
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
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
|
+
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;
|
|
@@ -74,6 +74,7 @@ function PickersCalendarHeader(props) {
|
|
|
74
74
|
components = {},
|
|
75
75
|
componentsProps = {},
|
|
76
76
|
currentMonth: month,
|
|
77
|
+
disabled,
|
|
77
78
|
disableFuture,
|
|
78
79
|
disablePast,
|
|
79
80
|
getViewSwitchingButtonText = getSwitchingViewAriaText,
|
|
@@ -95,16 +96,16 @@ function PickersCalendarHeader(props) {
|
|
|
95
96
|
const selectPreviousMonth = () => onMonthChange(utils.getPreviousMonth(month), 'right');
|
|
96
97
|
|
|
97
98
|
const isNextMonthDisabled = useNextMonthDisabled(month, {
|
|
98
|
-
disableFuture,
|
|
99
|
+
disableFuture: disableFuture || disabled,
|
|
99
100
|
maxDate
|
|
100
101
|
});
|
|
101
102
|
const isPreviousMonthDisabled = usePreviousMonthDisabled(month, {
|
|
102
|
-
disablePast,
|
|
103
|
+
disablePast: disablePast || disabled,
|
|
103
104
|
minDate
|
|
104
105
|
});
|
|
105
106
|
|
|
106
107
|
const handleToggleView = () => {
|
|
107
|
-
if (views.length === 1 || !onViewChange) {
|
|
108
|
+
if (views.length === 1 || !onViewChange || disabled) {
|
|
108
109
|
return;
|
|
109
110
|
}
|
|
110
111
|
|
|
@@ -145,7 +146,7 @@ function PickersCalendarHeader(props) {
|
|
|
145
146
|
ownerState: ownerState,
|
|
146
147
|
children: utils.format(month, 'year')
|
|
147
148
|
})
|
|
148
|
-
}), views.length > 1 && /*#__PURE__*/_jsx(PickersCalendarHeaderSwitchViewButton, _extends({
|
|
149
|
+
}), views.length > 1 && !disabled && /*#__PURE__*/_jsx(PickersCalendarHeaderSwitchViewButton, _extends({
|
|
149
150
|
size: "small",
|
|
150
151
|
as: components.SwitchViewButton,
|
|
151
152
|
"aria-label": getViewSwitchingButtonText(currentView)
|
|
@@ -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;
|
|
@@ -2,7 +2,7 @@ import * as React from 'react';
|
|
|
2
2
|
import clsx from 'clsx';
|
|
3
3
|
import Fade from '@mui/material/Fade';
|
|
4
4
|
import { styled } from '@mui/material/styles';
|
|
5
|
-
import { generateUtilityClasses } from '@mui/
|
|
5
|
+
import { generateUtilityClasses } from '@mui/base';
|
|
6
6
|
import { TransitionGroup } from 'react-transition-group';
|
|
7
7
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
8
|
const classes = generateUtilityClasses('PrivatePickersFadeTransitionGroup', ['root']);
|
|
@@ -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;
|
|
@@ -4,7 +4,7 @@ const _excluded = ["children", "className", "reduceAnimations", "slideDirection"
|
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import clsx from 'clsx';
|
|
6
6
|
import { styled } from '@mui/material/styles';
|
|
7
|
-
import { generateUtilityClasses } from '@mui/
|
|
7
|
+
import { generateUtilityClasses } from '@mui/base';
|
|
8
8
|
import { CSSTransition, TransitionGroup } from 'react-transition-group';
|
|
9
9
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
10
10
|
const classes = generateUtilityClasses('PrivatePickersSlideTransition', ['root', 'slideEnter-left', 'slideEnter-right', 'slideEnterActive', 'slideEnterActive', 'slideExit', 'slideExitActiveLeft-left', 'slideExitActiveLeft-right']);
|
|
@@ -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 {};
|
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { Theme } from '@mui/material/styles';
|
|
3
|
-
import { SxProps } from '@mui/system';
|
|
4
|
-
declare type HTMLDivProps = JSX.IntrinsicElements['div'];
|
|
5
|
-
export interface CalendarPickerSkeletonClasses {
|
|
6
|
-
/** Styles applied to the root element. */
|
|
7
|
-
root: string;
|
|
8
|
-
/** Styles applied to the week element. */
|
|
9
|
-
week: string;
|
|
10
|
-
/** Styles applied to the day element. */
|
|
11
|
-
daySkeleton: string;
|
|
12
|
-
}
|
|
13
|
-
export interface CalendarPickerSkeletonProps extends HTMLDivProps {
|
|
14
|
-
/**
|
|
15
|
-
* Override or extend the styles applied to the component.
|
|
16
|
-
*/
|
|
17
|
-
classes?: Partial<CalendarPickerSkeletonClasses>;
|
|
18
|
-
/**
|
|
19
|
-
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
20
|
-
*/
|
|
21
|
-
sx?: SxProps<Theme>;
|
|
22
|
-
ref?: React.Ref<HTMLDivElement>;
|
|
23
|
-
}
|
|
24
|
-
export declare type CalendarPickerSkeletonClassKey = keyof CalendarPickerSkeletonClasses;
|
|
25
|
-
export declare function getCalendarPickerSkeletonUtilityClass(slot: string): string;
|
|
26
|
-
export declare const calendarPickerSkeletonClasses: CalendarPickerSkeletonClasses;
|
|
27
|
-
/**
|
|
28
|
-
*
|
|
29
|
-
* Demos:
|
|
30
|
-
*
|
|
31
|
-
* - [Date Picker](https://mui.com/components/date-picker/)
|
|
32
|
-
*
|
|
33
|
-
* API:
|
|
34
|
-
*
|
|
35
|
-
* - [CalendarPickerSkeleton API](https://mui.com/api/calendar-picker-skeleton/)
|
|
36
|
-
*/
|
|
37
|
-
declare function CalendarPickerSkeleton(props: CalendarPickerSkeletonProps): JSX.Element;
|
|
38
|
-
declare namespace CalendarPickerSkeleton {
|
|
39
|
-
var propTypes: any;
|
|
40
|
-
}
|
|
41
|
-
export default CalendarPickerSkeleton;
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Theme } from '@mui/material/styles';
|
|
3
|
+
import { SxProps } from '@mui/system';
|
|
4
|
+
declare type HTMLDivProps = JSX.IntrinsicElements['div'];
|
|
5
|
+
export interface CalendarPickerSkeletonClasses {
|
|
6
|
+
/** Styles applied to the root element. */
|
|
7
|
+
root: string;
|
|
8
|
+
/** Styles applied to the week element. */
|
|
9
|
+
week: string;
|
|
10
|
+
/** Styles applied to the day element. */
|
|
11
|
+
daySkeleton: string;
|
|
12
|
+
}
|
|
13
|
+
export interface CalendarPickerSkeletonProps extends HTMLDivProps {
|
|
14
|
+
/**
|
|
15
|
+
* Override or extend the styles applied to the component.
|
|
16
|
+
*/
|
|
17
|
+
classes?: Partial<CalendarPickerSkeletonClasses>;
|
|
18
|
+
/**
|
|
19
|
+
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
20
|
+
*/
|
|
21
|
+
sx?: SxProps<Theme>;
|
|
22
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
23
|
+
}
|
|
24
|
+
export declare type CalendarPickerSkeletonClassKey = keyof CalendarPickerSkeletonClasses;
|
|
25
|
+
export declare function getCalendarPickerSkeletonUtilityClass(slot: string): string;
|
|
26
|
+
export declare const calendarPickerSkeletonClasses: CalendarPickerSkeletonClasses;
|
|
27
|
+
/**
|
|
28
|
+
*
|
|
29
|
+
* Demos:
|
|
30
|
+
*
|
|
31
|
+
* - [Date Picker](https://mui.com/components/date-picker/)
|
|
32
|
+
*
|
|
33
|
+
* API:
|
|
34
|
+
*
|
|
35
|
+
* - [CalendarPickerSkeleton API](https://mui.com/api/calendar-picker-skeleton/)
|
|
36
|
+
*/
|
|
37
|
+
declare function CalendarPickerSkeleton(props: CalendarPickerSkeletonProps): JSX.Element;
|
|
38
|
+
declare namespace CalendarPickerSkeleton {
|
|
39
|
+
var propTypes: any;
|
|
40
|
+
}
|
|
41
|
+
export default CalendarPickerSkeleton;
|
|
@@ -6,7 +6,7 @@ import PropTypes from 'prop-types';
|
|
|
6
6
|
import clsx from 'clsx';
|
|
7
7
|
import Skeleton from '@mui/material/Skeleton';
|
|
8
8
|
import { styled, useThemeProps } from '@mui/material/styles';
|
|
9
|
-
import { unstable_composeClasses as composeClasses, generateUtilityClass, generateUtilityClasses } from '@mui/
|
|
9
|
+
import { unstable_composeClasses as composeClasses, generateUtilityClass, generateUtilityClasses } from '@mui/base';
|
|
10
10
|
import { DAY_SIZE, DAY_MARGIN } from '../internal/pickers/constants/dimensions';
|
|
11
11
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
12
12
|
export function getCalendarPickerSkeletonUtilityClass(slot) {
|
|
@@ -144,6 +144,6 @@ process.env.NODE_ENV !== "production" ? CalendarPickerSkeleton.propTypes
|
|
|
144
144
|
/**
|
|
145
145
|
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
146
146
|
*/
|
|
147
|
-
sx: PropTypes.oneOfType([PropTypes.func, PropTypes.object])
|
|
147
|
+
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object])), PropTypes.func, PropTypes.object])
|
|
148
148
|
} : void 0;
|
|
149
149
|
export default CalendarPickerSkeleton;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { default, calendarPickerSkeletonClasses, getCalendarPickerSkeletonUtilityClass, } from './CalendarPickerSkeleton';
|
|
2
|
-
export declare type CalendarPickerSkeletonClassKey = import('./CalendarPickerSkeleton').CalendarPickerSkeletonClassKey;
|
|
3
|
-
export declare type CalendarPickerSkeletonProps = import('./CalendarPickerSkeleton').CalendarPickerSkeletonProps;
|
|
1
|
+
export { default, calendarPickerSkeletonClasses, getCalendarPickerSkeletonUtilityClass, } from './CalendarPickerSkeleton';
|
|
2
|
+
export declare type CalendarPickerSkeletonClassKey = import('./CalendarPickerSkeleton').CalendarPickerSkeletonClassKey;
|
|
3
|
+
export declare type CalendarPickerSkeletonProps = import('./CalendarPickerSkeleton').CalendarPickerSkeletonProps;
|
package/ClockPicker/Clock.d.ts
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { MuiPickersAdapter } from '../internal/pickers/hooks/useUtils';
|
|
3
|
-
import { PickerSelectionState } from '../internal/pickers/hooks/usePickerState';
|
|
4
|
-
import { useMeridiemMode } from '../internal/pickers/hooks/date-helpers-hooks';
|
|
5
|
-
import { ClockView } from './shared';
|
|
6
|
-
export interface ClockProps<TDate> extends ReturnType<typeof useMeridiemMode> {
|
|
7
|
-
ampm: boolean;
|
|
8
|
-
ampmInClock: boolean;
|
|
9
|
-
autoFocus?: boolean;
|
|
10
|
-
children: readonly React.ReactNode[];
|
|
11
|
-
date: TDate | null;
|
|
12
|
-
getClockLabelText: (view: ClockView, time: TDate | null, adapter: MuiPickersAdapter<TDate>) => string;
|
|
13
|
-
isTimeDisabled: (timeValue: number, type: ClockView) => boolean;
|
|
14
|
-
minutesStep?: number;
|
|
15
|
-
onChange: (value: number, isFinish?: PickerSelectionState) => void;
|
|
16
|
-
/**
|
|
17
|
-
* DOM id that the selected option should have
|
|
18
|
-
* Should only be `undefined` on the server
|
|
19
|
-
*/
|
|
20
|
-
selectedId: string | undefined;
|
|
21
|
-
type: ClockView;
|
|
22
|
-
value: number;
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* @ignore - internal component.
|
|
26
|
-
*/
|
|
27
|
-
declare function Clock<TDate>(props: ClockProps<TDate>): JSX.Element;
|
|
28
|
-
export default Clock;
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { MuiPickersAdapter } from '../internal/pickers/hooks/useUtils';
|
|
3
|
+
import { PickerSelectionState } from '../internal/pickers/hooks/usePickerState';
|
|
4
|
+
import { useMeridiemMode } from '../internal/pickers/hooks/date-helpers-hooks';
|
|
5
|
+
import { ClockView } from './shared';
|
|
6
|
+
export interface ClockProps<TDate> extends ReturnType<typeof useMeridiemMode> {
|
|
7
|
+
ampm: boolean;
|
|
8
|
+
ampmInClock: boolean;
|
|
9
|
+
autoFocus?: boolean;
|
|
10
|
+
children: readonly React.ReactNode[];
|
|
11
|
+
date: TDate | null;
|
|
12
|
+
getClockLabelText: (view: ClockView, time: TDate | null, adapter: MuiPickersAdapter<TDate>) => string;
|
|
13
|
+
isTimeDisabled: (timeValue: number, type: ClockView) => boolean;
|
|
14
|
+
minutesStep?: number;
|
|
15
|
+
onChange: (value: number, isFinish?: PickerSelectionState) => void;
|
|
16
|
+
/**
|
|
17
|
+
* DOM id that the selected option should have
|
|
18
|
+
* Should only be `undefined` on the server
|
|
19
|
+
*/
|
|
20
|
+
selectedId: string | undefined;
|
|
21
|
+
type: ClockView;
|
|
22
|
+
value: number;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* @ignore - internal component.
|
|
26
|
+
*/
|
|
27
|
+
declare function Clock<TDate>(props: ClockProps<TDate>): JSX.Element;
|
|
28
|
+
export default Clock;
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
export interface ClockNumberProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
3
|
-
'aria-label': string;
|
|
4
|
-
disabled: boolean;
|
|
5
|
-
/**
|
|
6
|
-
* Make sure callers pass an id which. It should be defined if selected.
|
|
7
|
-
*/
|
|
8
|
-
id: string | undefined;
|
|
9
|
-
index: number;
|
|
10
|
-
inner: boolean;
|
|
11
|
-
label: string;
|
|
12
|
-
selected: boolean;
|
|
13
|
-
}
|
|
14
|
-
export declare const classes: Record<"selected" | "disabled", string>;
|
|
15
|
-
/**
|
|
16
|
-
* @ignore - internal component.
|
|
17
|
-
*/
|
|
18
|
-
declare function ClockNumber(props: ClockNumberProps): JSX.Element;
|
|
19
|
-
export default ClockNumber;
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export interface ClockNumberProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
3
|
+
'aria-label': string;
|
|
4
|
+
disabled: boolean;
|
|
5
|
+
/**
|
|
6
|
+
* Make sure callers pass an id which. It should be defined if selected.
|
|
7
|
+
*/
|
|
8
|
+
id: string | undefined;
|
|
9
|
+
index: number;
|
|
10
|
+
inner: boolean;
|
|
11
|
+
label: string;
|
|
12
|
+
selected: boolean;
|
|
13
|
+
}
|
|
14
|
+
export declare const classes: Record<"selected" | "disabled", string>;
|
|
15
|
+
/**
|
|
16
|
+
* @ignore - internal component.
|
|
17
|
+
*/
|
|
18
|
+
declare function ClockNumber(props: ClockNumberProps): JSX.Element;
|
|
19
|
+
export default ClockNumber;
|
|
@@ -4,7 +4,7 @@ const _excluded = ["className", "disabled", "index", "inner", "label", "selected
|
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import clsx from 'clsx';
|
|
6
6
|
import { styled } from '@mui/material/styles';
|
|
7
|
-
import { generateUtilityClasses } from '@mui/
|
|
7
|
+
import { generateUtilityClasses } from '@mui/base';
|
|
8
8
|
import { CLOCK_WIDTH, CLOCK_HOUR_WIDTH } from './shared';
|
|
9
9
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
10
10
|
export const classes = generateUtilityClasses('PrivateClockNumber', ['selected', 'disabled']);
|