@mui/lab 5.0.0-alpha.54 → 5.0.0-alpha.58
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 +257 -10
- package/CalendarPicker/CalendarPicker.d.ts +106 -106
- package/CalendarPicker/CalendarPicker.js +1 -1
- package/CalendarPicker/PickersCalendar.d.ts +47 -47
- package/CalendarPicker/PickersCalendarHeader.d.ts +43 -43
- 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 +1 -1
- 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/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/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 +1 -1
- 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/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/index.d.ts +2 -2
- package/DesktopDateRangePicker/DesktopDateRangePicker.d.ts +64 -64
- package/DesktopDateRangePicker/index.d.ts +2 -2
- package/DesktopDateTimePicker/DesktopDateTimePicker.d.ts +20 -20
- package/DesktopDateTimePicker/index.d.ts +2 -2
- package/DesktopTimePicker/DesktopTimePicker.d.ts +20 -20
- package/DesktopTimePicker/index.d.ts +2 -2
- package/LoadingButton/LoadingButton.js +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 +73 -51
- package/Masonry/masonryClasses.d.ts +8 -8
- package/Masonry/masonryClasses.js +1 -1
- package/MobileDatePicker/MobileDatePicker.d.ts +20 -20
- package/MobileDatePicker/index.d.ts +2 -2
- package/MobileDateRangePicker/MobileDateRangePicker.d.ts +64 -64
- package/MobileDateRangePicker/index.d.ts +2 -2
- package/MobileDateTimePicker/MobileDateTimePicker.d.ts +20 -20
- package/MobileDateTimePicker/index.d.ts +2 -2
- package/MobileTimePicker/MobileTimePicker.d.ts +20 -20
- package/MobileTimePicker/index.d.ts +2 -2
- package/MonthPicker/MonthPicker.d.ts +53 -53
- package/MonthPicker/MonthPicker.js +3 -2
- 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 +1 -1
- 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/TabPanel.js +1 -1
- 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 +1 -1
- 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 +1 -1
- package/TimelineConnector/timelineConnectorClasses.d.ts +8 -8
- package/TimelineConnector/timelineConnectorClasses.js +1 -1
- package/TimelineContent/TimelineContent.js +1 -1
- package/TimelineContent/timelineContentClasses.d.ts +14 -14
- package/TimelineContent/timelineContentClasses.js +1 -1
- package/TimelineDot/TimelineDot.js +1 -1
- package/TimelineDot/timelineDotClasses.d.ts +24 -24
- package/TimelineDot/timelineDotClasses.js +1 -1
- package/TimelineItem/TimelineItem.js +1 -1
- package/TimelineItem/timelineItemClasses.d.ts +16 -16
- package/TimelineItem/timelineItemClasses.js +1 -1
- package/TimelineOppositeContent/TimelineOppositeContent.js +1 -1
- package/TimelineOppositeContent/timelineOppositeContentClasses.d.ts +14 -14
- package/TimelineOppositeContent/timelineOppositeContentClasses.js +1 -1
- package/TimelineSeparator/TimelineSeparator.js +1 -1
- package/TimelineSeparator/timelineSeparatorClasses.d.ts +8 -8
- package/TimelineSeparator/timelineSeparatorClasses.js +1 -1
- package/TreeItem/TreeItem.js +1 -1
- package/TreeItem/treeItemClasses.d.ts +24 -24
- package/TreeItem/treeItemClasses.js +1 -1
- package/TreeView/TreeView.js +1 -1
- 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 -44
- package/YearPicker/YearPicker.js +1 -1
- 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 +14 -6
- 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 +1 -1
- package/legacy/CalendarPicker/PickersFadeTransitionGroup.js +1 -1
- package/legacy/CalendarPicker/PickersSlideTransition.js +1 -1
- package/legacy/CalendarPickerSkeleton/CalendarPickerSkeleton.js +1 -1
- package/legacy/ClockPicker/ClockNumber.js +1 -1
- package/legacy/ClockPicker/ClockPicker.js +1 -1
- package/legacy/DatePicker/DatePickerToolbar.js +1 -1
- package/legacy/DateRangePicker/DateRangePickerToolbar.js +1 -1
- package/legacy/DateRangePickerDay/DateRangePickerDay.js +1 -1
- package/legacy/DateTimePicker/DateTimePickerToolbar.js +1 -1
- package/legacy/LoadingButton/LoadingButton.js +20 -6
- package/legacy/LoadingButton/loadingButtonClasses.js +1 -1
- package/legacy/Masonry/Masonry.js +73 -49
- package/legacy/Masonry/masonryClasses.js +1 -1
- package/legacy/MonthPicker/MonthPicker.js +3 -2
- package/legacy/MonthPicker/PickersMonth.js +20 -15
- package/legacy/PickersDay/PickersDay.js +1 -1
- package/legacy/TabPanel/TabPanel.js +1 -1
- package/legacy/TabPanel/tabPanelClasses.js +1 -1
- package/legacy/TimePicker/TimePickerToolbar.js +1 -1
- package/legacy/Timeline/Timeline.js +1 -1
- package/legacy/Timeline/timelineClasses.js +1 -1
- package/legacy/TimelineConnector/TimelineConnector.js +1 -1
- package/legacy/TimelineConnector/timelineConnectorClasses.js +1 -1
- package/legacy/TimelineContent/TimelineContent.js +1 -1
- package/legacy/TimelineContent/timelineContentClasses.js +1 -1
- package/legacy/TimelineDot/TimelineDot.js +1 -1
- package/legacy/TimelineDot/timelineDotClasses.js +1 -1
- package/legacy/TimelineItem/TimelineItem.js +1 -1
- package/legacy/TimelineItem/timelineItemClasses.js +1 -1
- package/legacy/TimelineOppositeContent/TimelineOppositeContent.js +1 -1
- package/legacy/TimelineOppositeContent/timelineOppositeContentClasses.js +1 -1
- package/legacy/TimelineSeparator/TimelineSeparator.js +1 -1
- package/legacy/TimelineSeparator/timelineSeparatorClasses.js +1 -1
- package/legacy/TreeItem/TreeItem.js +1 -1
- package/legacy/TreeItem/treeItemClasses.js +1 -1
- package/legacy/TreeView/TreeView.js +1 -1
- package/legacy/TreeView/treeViewClasses.js +1 -1
- package/legacy/YearPicker/PickersYear.js +2 -2
- package/legacy/YearPicker/YearPicker.js +1 -1
- 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 +11 -7
- package/legacy/useAutocomplete/index.js +1 -1
- package/modern/CalendarPicker/CalendarPicker.js +1 -1
- package/modern/CalendarPicker/PickersFadeTransitionGroup.js +1 -1
- package/modern/CalendarPicker/PickersSlideTransition.js +1 -1
- package/modern/CalendarPickerSkeleton/CalendarPickerSkeleton.js +1 -1
- package/modern/ClockPicker/ClockNumber.js +1 -1
- package/modern/ClockPicker/ClockPicker.js +1 -1
- package/modern/DatePicker/DatePickerToolbar.js +1 -1
- package/modern/DateRangePicker/DateRangePickerToolbar.js +1 -1
- package/modern/DateRangePickerDay/DateRangePickerDay.js +1 -1
- package/modern/DateTimePicker/DateTimePickerToolbar.js +1 -1
- package/modern/LoadingButton/LoadingButton.js +20 -7
- package/modern/LoadingButton/loadingButtonClasses.js +1 -1
- package/modern/Masonry/Masonry.js +69 -51
- package/modern/Masonry/masonryClasses.js +1 -1
- package/modern/MonthPicker/MonthPicker.js +3 -2
- package/modern/MonthPicker/PickersMonth.js +19 -14
- package/modern/PickersDay/PickersDay.js +1 -1
- package/modern/TabPanel/TabPanel.js +1 -1
- package/modern/TabPanel/tabPanelClasses.js +1 -1
- package/modern/TimePicker/TimePickerToolbar.js +1 -1
- package/modern/Timeline/Timeline.js +1 -1
- package/modern/Timeline/timelineClasses.js +1 -1
- package/modern/TimelineConnector/TimelineConnector.js +1 -1
- package/modern/TimelineConnector/timelineConnectorClasses.js +1 -1
- package/modern/TimelineContent/TimelineContent.js +1 -1
- package/modern/TimelineContent/timelineContentClasses.js +1 -1
- package/modern/TimelineDot/TimelineDot.js +1 -1
- package/modern/TimelineDot/timelineDotClasses.js +1 -1
- package/modern/TimelineItem/TimelineItem.js +1 -1
- package/modern/TimelineItem/timelineItemClasses.js +1 -1
- package/modern/TimelineOppositeContent/TimelineOppositeContent.js +1 -1
- package/modern/TimelineOppositeContent/timelineOppositeContentClasses.js +1 -1
- package/modern/TimelineSeparator/TimelineSeparator.js +1 -1
- package/modern/TimelineSeparator/timelineSeparatorClasses.js +1 -1
- package/modern/TreeItem/TreeItem.js +1 -1
- package/modern/TreeItem/treeItemClasses.js +1 -1
- package/modern/TreeView/TreeView.js +1 -1
- package/modern/TreeView/treeViewClasses.js +1 -1
- package/modern/YearPicker/PickersYear.js +2 -2
- package/modern/YearPicker/YearPicker.js +1 -1
- 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 +14 -6
- package/modern/useAutocomplete/index.js +1 -1
- package/node/CalendarPicker/CalendarPicker.js +4 -4
- package/node/CalendarPicker/PickersFadeTransitionGroup.js +2 -2
- package/node/CalendarPicker/PickersSlideTransition.js +2 -2
- package/node/CalendarPickerSkeleton/CalendarPickerSkeleton.js +4 -4
- package/node/ClockPicker/ClockNumber.js +2 -2
- package/node/ClockPicker/ClockPicker.js +4 -4
- package/node/DatePicker/DatePickerToolbar.js +2 -2
- package/node/DateRangePicker/DateRangePickerToolbar.js +2 -2
- package/node/DateRangePickerDay/DateRangePickerDay.js +4 -4
- package/node/DateTimePicker/DateTimePickerToolbar.js +2 -2
- package/node/LoadingButton/LoadingButton.js +21 -8
- package/node/LoadingButton/loadingButtonClasses.js +3 -3
- package/node/Masonry/Masonry.js +74 -52
- package/node/Masonry/masonryClasses.js +3 -3
- package/node/MonthPicker/MonthPicker.js +6 -5
- package/node/MonthPicker/PickersMonth.js +20 -15
- package/node/PickersDay/PickersDay.js +4 -4
- package/node/TabPanel/TabPanel.js +2 -2
- package/node/TabPanel/tabPanelClasses.js +3 -3
- package/node/TimePicker/TimePickerToolbar.js +4 -4
- package/node/Timeline/Timeline.js +2 -2
- package/node/Timeline/timelineClasses.js +3 -3
- package/node/TimelineConnector/TimelineConnector.js +2 -2
- package/node/TimelineConnector/timelineConnectorClasses.js +3 -3
- package/node/TimelineContent/TimelineContent.js +2 -2
- package/node/TimelineContent/timelineContentClasses.js +3 -3
- package/node/TimelineDot/TimelineDot.js +2 -2
- package/node/TimelineDot/timelineDotClasses.js +3 -3
- package/node/TimelineItem/TimelineItem.js +2 -2
- package/node/TimelineItem/timelineItemClasses.js +3 -3
- package/node/TimelineOppositeContent/TimelineOppositeContent.js +2 -2
- package/node/TimelineOppositeContent/timelineOppositeContentClasses.js +3 -3
- package/node/TimelineSeparator/TimelineSeparator.js +2 -2
- package/node/TimelineSeparator/timelineSeparatorClasses.js +3 -3
- package/node/TreeItem/TreeItem.js +2 -2
- package/node/TreeItem/treeItemClasses.js +3 -3
- package/node/TreeView/TreeView.js +2 -2
- package/node/TreeView/treeViewClasses.js +3 -3
- package/node/YearPicker/PickersYear.js +5 -5
- package/node/YearPicker/YearPicker.js +2 -2
- 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 +15 -7
- package/node/useAutocomplete/index.js +3 -3
- package/package.json +7 -7
- package/themeAugmentation/components.d.ts +10 -0
- package/useAutocomplete/index.d.ts +1 -1
- package/useAutocomplete/index.js +1 -1
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { BaseDateTimePickerProps } from '../DateTimePicker/shared';
|
|
3
|
-
import { DesktopWrapperProps } from '../internal/pickers/wrappers/DesktopWrapper';
|
|
4
|
-
export interface DesktopDateTimePickerProps<TDate = unknown> extends BaseDateTimePickerProps<TDate>, DesktopWrapperProps {
|
|
5
|
-
}
|
|
6
|
-
declare type DesktopDateTimePickerComponent = (<TDate>(props: DesktopDateTimePickerProps<TDate> & React.RefAttributes<HTMLDivElement>) => JSX.Element) & {
|
|
7
|
-
propTypes?: any;
|
|
8
|
-
};
|
|
9
|
-
/**
|
|
10
|
-
*
|
|
11
|
-
* Demos:
|
|
12
|
-
*
|
|
13
|
-
* - [Date Time Picker](https://mui.com/components/date-time-picker/)
|
|
14
|
-
*
|
|
15
|
-
* API:
|
|
16
|
-
*
|
|
17
|
-
* - [DesktopDateTimePicker API](https://mui.com/api/desktop-date-time-picker/)
|
|
18
|
-
*/
|
|
19
|
-
declare const DesktopDateTimePicker: DesktopDateTimePickerComponent;
|
|
20
|
-
export default DesktopDateTimePicker;
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { BaseDateTimePickerProps } from '../DateTimePicker/shared';
|
|
3
|
+
import { DesktopWrapperProps } from '../internal/pickers/wrappers/DesktopWrapper';
|
|
4
|
+
export interface DesktopDateTimePickerProps<TDate = unknown> extends BaseDateTimePickerProps<TDate>, DesktopWrapperProps {
|
|
5
|
+
}
|
|
6
|
+
declare type DesktopDateTimePickerComponent = (<TDate>(props: DesktopDateTimePickerProps<TDate> & React.RefAttributes<HTMLDivElement>) => JSX.Element) & {
|
|
7
|
+
propTypes?: any;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
*
|
|
11
|
+
* Demos:
|
|
12
|
+
*
|
|
13
|
+
* - [Date Time Picker](https://mui.com/components/date-time-picker/)
|
|
14
|
+
*
|
|
15
|
+
* API:
|
|
16
|
+
*
|
|
17
|
+
* - [DesktopDateTimePicker API](https://mui.com/api/desktop-date-time-picker/)
|
|
18
|
+
*/
|
|
19
|
+
declare const DesktopDateTimePicker: DesktopDateTimePickerComponent;
|
|
20
|
+
export default DesktopDateTimePicker;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './DesktopDateTimePicker';
|
|
2
|
-
export { default } from './DesktopDateTimePicker';
|
|
1
|
+
export * from './DesktopDateTimePicker';
|
|
2
|
+
export { default } from './DesktopDateTimePicker';
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { BaseTimePickerProps } from '../TimePicker/shared';
|
|
3
|
-
import { DesktopWrapperProps } from '../internal/pickers/wrappers/DesktopWrapper';
|
|
4
|
-
export interface DesktopTimePickerProps<TDate = unknown> extends BaseTimePickerProps<TDate>, DesktopWrapperProps {
|
|
5
|
-
}
|
|
6
|
-
declare type DesktopTimePickerComponent = (<TDate>(props: DesktopTimePickerProps<TDate> & React.RefAttributes<HTMLDivElement>) => JSX.Element) & {
|
|
7
|
-
propTypes?: any;
|
|
8
|
-
};
|
|
9
|
-
/**
|
|
10
|
-
*
|
|
11
|
-
* Demos:
|
|
12
|
-
*
|
|
13
|
-
* - [Time Picker](https://mui.com/components/time-picker/)
|
|
14
|
-
*
|
|
15
|
-
* API:
|
|
16
|
-
*
|
|
17
|
-
* - [DesktopTimePicker API](https://mui.com/api/desktop-time-picker/)
|
|
18
|
-
*/
|
|
19
|
-
declare const DesktopTimePicker: DesktopTimePickerComponent;
|
|
20
|
-
export default DesktopTimePicker;
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { BaseTimePickerProps } from '../TimePicker/shared';
|
|
3
|
+
import { DesktopWrapperProps } from '../internal/pickers/wrappers/DesktopWrapper';
|
|
4
|
+
export interface DesktopTimePickerProps<TDate = unknown> extends BaseTimePickerProps<TDate>, DesktopWrapperProps {
|
|
5
|
+
}
|
|
6
|
+
declare type DesktopTimePickerComponent = (<TDate>(props: DesktopTimePickerProps<TDate> & React.RefAttributes<HTMLDivElement>) => JSX.Element) & {
|
|
7
|
+
propTypes?: any;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
*
|
|
11
|
+
* Demos:
|
|
12
|
+
*
|
|
13
|
+
* - [Time Picker](https://mui.com/components/time-picker/)
|
|
14
|
+
*
|
|
15
|
+
* API:
|
|
16
|
+
*
|
|
17
|
+
* - [DesktopTimePicker API](https://mui.com/api/desktop-time-picker/)
|
|
18
|
+
*/
|
|
19
|
+
declare const DesktopTimePicker: DesktopTimePickerComponent;
|
|
20
|
+
export default DesktopTimePicker;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { default } from './DesktopTimePicker';
|
|
2
|
-
export * from './DesktopTimePicker';
|
|
1
|
+
export { default } from './DesktopTimePicker';
|
|
2
|
+
export * from './DesktopTimePicker';
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
2
2
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
|
-
const _excluded = ["children", "disabled", "loading", "loadingIndicator", "loadingPosition"];
|
|
3
|
+
const _excluded = ["children", "disabled", "loading", "loadingIndicator", "loadingPosition", "variant"];
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
6
|
import { chainPropTypes } from '@mui/utils';
|
|
7
7
|
import { capitalize } from '@mui/material/utils';
|
|
8
|
-
import { unstable_composeClasses as composeClasses } from '@mui/
|
|
8
|
+
import { unstable_composeClasses as composeClasses } from '@mui/base';
|
|
9
9
|
import { styled, useThemeProps } from '@mui/material/styles';
|
|
10
10
|
import Button from '@mui/material/Button';
|
|
11
11
|
import CircularProgress from '@mui/material/CircularProgress';
|
|
@@ -93,14 +93,18 @@ const LoadingButtonLoadingIndicator = styled('div', {
|
|
|
93
93
|
position: 'absolute',
|
|
94
94
|
visibility: 'visible',
|
|
95
95
|
display: 'flex'
|
|
96
|
-
}, ownerState.loadingPosition === 'start' && {
|
|
96
|
+
}, ownerState.loadingPosition === 'start' && (ownerState.variant === 'outlined' || ownerState.variant === 'contained') && {
|
|
97
97
|
left: 14
|
|
98
|
+
}, ownerState.loadingPosition === 'start' && ownerState.variant === 'text' && {
|
|
99
|
+
left: 6
|
|
98
100
|
}, ownerState.loadingPosition === 'center' && {
|
|
99
101
|
left: '50%',
|
|
100
102
|
transform: 'translate(-50%)',
|
|
101
103
|
color: theme.palette.action.disabled
|
|
102
|
-
}, ownerState.loadingPosition === 'end' && {
|
|
104
|
+
}, ownerState.loadingPosition === 'end' && (ownerState.variant === 'outlined' || ownerState.variant === 'contained') && {
|
|
103
105
|
right: 14
|
|
106
|
+
}, ownerState.loadingPosition === 'end' && ownerState.variant === 'text' && {
|
|
107
|
+
right: 6
|
|
104
108
|
}, ownerState.loadingPosition === 'start' && ownerState.fullWidth && {
|
|
105
109
|
position: 'relative',
|
|
106
110
|
left: -10
|
|
@@ -125,7 +129,8 @@ const LoadingButton = /*#__PURE__*/React.forwardRef(function LoadingButton(inPro
|
|
|
125
129
|
disabled = false,
|
|
126
130
|
loading = false,
|
|
127
131
|
loadingIndicator = LoadingIndicator,
|
|
128
|
-
loadingPosition = 'center'
|
|
132
|
+
loadingPosition = 'center',
|
|
133
|
+
variant = 'text'
|
|
129
134
|
} = props,
|
|
130
135
|
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
131
136
|
|
|
@@ -133,7 +138,8 @@ const LoadingButton = /*#__PURE__*/React.forwardRef(function LoadingButton(inPro
|
|
|
133
138
|
disabled,
|
|
134
139
|
loading,
|
|
135
140
|
loadingIndicator,
|
|
136
|
-
loadingPosition
|
|
141
|
+
loadingPosition,
|
|
142
|
+
variant
|
|
137
143
|
});
|
|
138
144
|
|
|
139
145
|
const classes = useUtilityClasses(ownerState);
|
|
@@ -141,6 +147,7 @@ const LoadingButton = /*#__PURE__*/React.forwardRef(function LoadingButton(inPro
|
|
|
141
147
|
disabled: disabled || loading,
|
|
142
148
|
ref: ref
|
|
143
149
|
}, other, {
|
|
150
|
+
variant: variant,
|
|
144
151
|
classes: classes,
|
|
145
152
|
ownerState: ownerState,
|
|
146
153
|
children: ownerState.loadingPosition === 'end' ? /*#__PURE__*/_jsxs(React.Fragment, {
|
|
@@ -213,6 +220,12 @@ process.env.NODE_ENV !== "production" ? LoadingButton.propTypes
|
|
|
213
220
|
/**
|
|
214
221
|
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
215
222
|
*/
|
|
216
|
-
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object])), PropTypes.func, PropTypes.object])
|
|
223
|
+
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object])), PropTypes.func, PropTypes.object]),
|
|
224
|
+
|
|
225
|
+
/**
|
|
226
|
+
* The variant to use.
|
|
227
|
+
* @default 'text'
|
|
228
|
+
*/
|
|
229
|
+
variant: PropTypes.oneOf(['contained', 'outlined', 'text'])
|
|
217
230
|
} : void 0;
|
|
218
231
|
export default LoadingButton;
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
export interface LoadingButtonClasses {
|
|
2
|
-
/** Styles applied to the root element. */
|
|
3
|
-
root: string;
|
|
4
|
-
/** Styles applied to the root element if `loading={true}`. */
|
|
5
|
-
loading: string;
|
|
6
|
-
/** Styles applied to the loadingIndicator element. */
|
|
7
|
-
loadingIndicator: string;
|
|
8
|
-
/** Styles applied to the loadingIndicator element if `loadingPosition="center"`. */
|
|
9
|
-
loadingIndicatorCenter: string;
|
|
10
|
-
/** Styles applied to the loadingIndicator element if `loadingPosition="start"`. */
|
|
11
|
-
loadingIndicatorStart: string;
|
|
12
|
-
/** Styles applied to the loadingIndicator element if `loadingPosition="end"`. */
|
|
13
|
-
loadingIndicatorEnd: string;
|
|
14
|
-
/** Styles applied to the endIcon element if `loading={true}` and `loadingPosition="end"`. */
|
|
15
|
-
endIconLoadingEnd: string;
|
|
16
|
-
/** Styles applied to the startIcon element if `loading={true}` and `loadingPosition="start"`. */
|
|
17
|
-
startIconLoadingStart: string;
|
|
18
|
-
}
|
|
19
|
-
export declare type LoadingButtonClassKey = keyof LoadingButtonClasses;
|
|
20
|
-
export declare function getLoadingButtonUtilityClass(slot: string): string;
|
|
21
|
-
declare const loadingButtonClasses: LoadingButtonClasses;
|
|
22
|
-
export default loadingButtonClasses;
|
|
1
|
+
export interface LoadingButtonClasses {
|
|
2
|
+
/** Styles applied to the root element. */
|
|
3
|
+
root: string;
|
|
4
|
+
/** Styles applied to the root element if `loading={true}`. */
|
|
5
|
+
loading: string;
|
|
6
|
+
/** Styles applied to the loadingIndicator element. */
|
|
7
|
+
loadingIndicator: string;
|
|
8
|
+
/** Styles applied to the loadingIndicator element if `loadingPosition="center"`. */
|
|
9
|
+
loadingIndicatorCenter: string;
|
|
10
|
+
/** Styles applied to the loadingIndicator element if `loadingPosition="start"`. */
|
|
11
|
+
loadingIndicatorStart: string;
|
|
12
|
+
/** Styles applied to the loadingIndicator element if `loadingPosition="end"`. */
|
|
13
|
+
loadingIndicatorEnd: string;
|
|
14
|
+
/** Styles applied to the endIcon element if `loading={true}` and `loadingPosition="end"`. */
|
|
15
|
+
endIconLoadingEnd: string;
|
|
16
|
+
/** Styles applied to the startIcon element if `loading={true}` and `loadingPosition="start"`. */
|
|
17
|
+
startIconLoadingStart: string;
|
|
18
|
+
}
|
|
19
|
+
export declare type LoadingButtonClassKey = keyof LoadingButtonClasses;
|
|
20
|
+
export declare function getLoadingButtonUtilityClass(slot: string): string;
|
|
21
|
+
declare const loadingButtonClasses: LoadingButtonClasses;
|
|
22
|
+
export default loadingButtonClasses;
|
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { DateIOFormats, IUtils } from '@date-io/core/IUtils';
|
|
3
|
-
export declare type MuiPickersAdapter<TDate> = IUtils<TDate>;
|
|
4
|
-
export interface MuiPickersAdapterContextValue<TDate> {
|
|
5
|
-
defaultDates: {
|
|
6
|
-
minDate: TDate;
|
|
7
|
-
maxDate: TDate;
|
|
8
|
-
};
|
|
9
|
-
utils: MuiPickersAdapter<TDate>;
|
|
10
|
-
}
|
|
11
|
-
export declare const MuiPickersAdapterContext: React.Context<MuiPickersAdapterContextValue<unknown> | null>;
|
|
12
|
-
export interface LocalizationProviderProps {
|
|
13
|
-
children?: React.ReactNode;
|
|
14
|
-
/** DateIO adapter class function */
|
|
15
|
-
dateAdapter: new (...args: any) => MuiPickersAdapter<unknown>;
|
|
16
|
-
/** Formats that are used for any child pickers */
|
|
17
|
-
dateFormats?: Partial<DateIOFormats>;
|
|
18
|
-
/**
|
|
19
|
-
* Date library instance you are using, if it has some global overrides
|
|
20
|
-
* ```jsx
|
|
21
|
-
* dateLibInstance={momentTimeZone}
|
|
22
|
-
* ```
|
|
23
|
-
*/
|
|
24
|
-
dateLibInstance?: any;
|
|
25
|
-
/** Locale for the date library you are using */
|
|
26
|
-
locale?: string | object;
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* @ignore - do not document.
|
|
30
|
-
*/
|
|
31
|
-
declare function LocalizationProvider(props: LocalizationProviderProps): JSX.Element;
|
|
32
|
-
declare namespace LocalizationProvider {
|
|
33
|
-
var propTypes: any;
|
|
34
|
-
}
|
|
35
|
-
export default LocalizationProvider;
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { DateIOFormats, IUtils } from '@date-io/core/IUtils';
|
|
3
|
+
export declare type MuiPickersAdapter<TDate> = IUtils<TDate>;
|
|
4
|
+
export interface MuiPickersAdapterContextValue<TDate> {
|
|
5
|
+
defaultDates: {
|
|
6
|
+
minDate: TDate;
|
|
7
|
+
maxDate: TDate;
|
|
8
|
+
};
|
|
9
|
+
utils: MuiPickersAdapter<TDate>;
|
|
10
|
+
}
|
|
11
|
+
export declare const MuiPickersAdapterContext: React.Context<MuiPickersAdapterContextValue<unknown> | null>;
|
|
12
|
+
export interface LocalizationProviderProps {
|
|
13
|
+
children?: React.ReactNode;
|
|
14
|
+
/** DateIO adapter class function */
|
|
15
|
+
dateAdapter: new (...args: any) => MuiPickersAdapter<unknown>;
|
|
16
|
+
/** Formats that are used for any child pickers */
|
|
17
|
+
dateFormats?: Partial<DateIOFormats>;
|
|
18
|
+
/**
|
|
19
|
+
* Date library instance you are using, if it has some global overrides
|
|
20
|
+
* ```jsx
|
|
21
|
+
* dateLibInstance={momentTimeZone}
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
dateLibInstance?: any;
|
|
25
|
+
/** Locale for the date library you are using */
|
|
26
|
+
locale?: string | object;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* @ignore - do not document.
|
|
30
|
+
*/
|
|
31
|
+
declare function LocalizationProvider(props: LocalizationProviderProps): JSX.Element;
|
|
32
|
+
declare namespace LocalizationProvider {
|
|
33
|
+
var propTypes: any;
|
|
34
|
+
}
|
|
35
|
+
export default LocalizationProvider;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './LocalizationProvider';
|
|
2
|
-
export { default } from './LocalizationProvider';
|
|
1
|
+
export * from './LocalizationProvider';
|
|
2
|
+
export { default } from './LocalizationProvider';
|
package/Masonry/Masonry.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
2
2
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
3
|
const _excluded = ["children", "className", "component", "columns", "spacing", "defaultColumns", "defaultHeight", "defaultSpacing"];
|
|
4
|
-
import { unstable_composeClasses as composeClasses } from '@mui/
|
|
4
|
+
import { unstable_composeClasses as composeClasses } from '@mui/base';
|
|
5
5
|
import { styled, useThemeProps } from '@mui/material/styles';
|
|
6
6
|
import { createUnarySpacing, getValue, handleBreakpoints, unstable_resolveBreakpointValues as resolveBreakpointValues } from '@mui/system';
|
|
7
7
|
import { deepmerge, unstable_useForkRef as useForkRef } from '@mui/utils';
|
|
@@ -166,72 +166,96 @@ const Masonry = /*#__PURE__*/React.forwardRef(function Masonry(inProps, ref) {
|
|
|
166
166
|
});
|
|
167
167
|
|
|
168
168
|
const classes = useUtilityClasses(ownerState);
|
|
169
|
-
React.useEffect(() => {
|
|
170
|
-
const handleResize = () => {
|
|
171
|
-
const parentWidth = masonryRef.current.clientWidth;
|
|
172
|
-
const childWidth = masonryRef.current.firstChild.clientWidth;
|
|
173
|
-
const firstChildComputedStyle = window.getComputedStyle(masonryRef.current.firstChild);
|
|
174
|
-
const firstChildMarginLeft = parseToNumber(firstChildComputedStyle.marginLeft);
|
|
175
|
-
const firstChildMarginRight = parseToNumber(firstChildComputedStyle.marginRight);
|
|
176
|
-
|
|
177
|
-
if (parentWidth === 0 || childWidth === 0) {
|
|
178
|
-
return;
|
|
179
|
-
}
|
|
180
169
|
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
if (child.nodeType !== Node.ELEMENT_NODE || child.dataset.class === 'line-break' || skip) {
|
|
186
|
-
return;
|
|
187
|
-
}
|
|
170
|
+
const handleResize = elements => {
|
|
171
|
+
if (!elements) {
|
|
172
|
+
return;
|
|
173
|
+
}
|
|
188
174
|
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
175
|
+
let masonry;
|
|
176
|
+
let masonryFirstChild;
|
|
177
|
+
let parentWidth;
|
|
178
|
+
let childWidth;
|
|
179
|
+
|
|
180
|
+
if (elements[0].target.className.includes(classes.root)) {
|
|
181
|
+
var _elements$, _masonryFirstChild, _masonryFirstChild$co, _masonryFirstChild2;
|
|
182
|
+
|
|
183
|
+
masonry = elements[0].target;
|
|
184
|
+
parentWidth = elements[0].contentRect.width;
|
|
185
|
+
masonryFirstChild = ((_elements$ = elements[1]) == null ? void 0 : _elements$.target) || masonry.firstChild;
|
|
186
|
+
childWidth = ((_masonryFirstChild = masonryFirstChild) == null ? void 0 : (_masonryFirstChild$co = _masonryFirstChild.contentRect) == null ? void 0 : _masonryFirstChild$co.width) || ((_masonryFirstChild2 = masonryFirstChild) == null ? void 0 : _masonryFirstChild2.clientWidth) || 0;
|
|
187
|
+
} else {
|
|
188
|
+
var _elements$2, _masonry$contentRect;
|
|
189
|
+
|
|
190
|
+
masonryFirstChild = elements[0].target;
|
|
191
|
+
childWidth = elements[0].contentRect.width;
|
|
192
|
+
masonry = ((_elements$2 = elements[1]) == null ? void 0 : _elements$2.target) || masonryFirstChild.parentElement;
|
|
193
|
+
parentWidth = ((_masonry$contentRect = masonry.contentRect) == null ? void 0 : _masonry$contentRect.width) || masonry.clientWidth;
|
|
194
|
+
}
|
|
192
195
|
|
|
193
|
-
|
|
196
|
+
if (parentWidth === 0 || childWidth === 0 || !masonry || !masonryFirstChild) {
|
|
197
|
+
return;
|
|
198
|
+
}
|
|
194
199
|
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
200
|
+
const firstChildComputedStyle = window.getComputedStyle(masonryFirstChild);
|
|
201
|
+
const firstChildMarginLeft = parseToNumber(firstChildComputedStyle.marginLeft);
|
|
202
|
+
const firstChildMarginRight = parseToNumber(firstChildComputedStyle.marginRight);
|
|
203
|
+
const currentNumberOfColumns = Math.round(parentWidth / (childWidth + firstChildMarginLeft + firstChildMarginRight));
|
|
204
|
+
const columnHeights = new Array(currentNumberOfColumns).fill(0);
|
|
205
|
+
let skip = false;
|
|
206
|
+
masonry.childNodes.forEach(child => {
|
|
207
|
+
if (child.nodeType !== Node.ELEMENT_NODE || child.dataset.class === 'line-break' || skip) {
|
|
208
|
+
return;
|
|
209
|
+
}
|
|
199
210
|
|
|
211
|
+
const childComputedStyle = window.getComputedStyle(child);
|
|
212
|
+
const childMarginTop = parseToNumber(childComputedStyle.marginTop);
|
|
213
|
+
const childMarginBottom = parseToNumber(childComputedStyle.marginBottom); // if any one of children isn't rendered yet, masonry's height shouldn't be computed yet
|
|
200
214
|
|
|
201
|
-
|
|
202
|
-
const nestedChild = child.childNodes[i];
|
|
215
|
+
const childHeight = parseToNumber(childComputedStyle.height) ? Math.ceil(parseToNumber(childComputedStyle.height)) + childMarginTop + childMarginBottom : 0;
|
|
203
216
|
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
217
|
+
if (childHeight === 0) {
|
|
218
|
+
skip = true;
|
|
219
|
+
return;
|
|
220
|
+
} // if there is a nested image that isn't rendered yet, masonry's height shouldn't be computed yet
|
|
221
|
+
|
|
222
|
+
|
|
223
|
+
for (let i = 0; i < child.childNodes.length; i += 1) {
|
|
224
|
+
const nestedChild = child.childNodes[i];
|
|
209
225
|
|
|
210
|
-
if (
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
columnHeights[currentMinColumnIndex] += childHeight;
|
|
214
|
-
const order = currentMinColumnIndex + 1;
|
|
215
|
-
child.style.order = order;
|
|
226
|
+
if (nestedChild.tagName === 'IMG' && nestedChild.clientHeight === 0) {
|
|
227
|
+
skip = true;
|
|
228
|
+
break;
|
|
216
229
|
}
|
|
217
|
-
}
|
|
230
|
+
}
|
|
218
231
|
|
|
219
232
|
if (!skip) {
|
|
220
|
-
|
|
221
|
-
const
|
|
222
|
-
|
|
233
|
+
// find the current shortest column (where the current item will be placed)
|
|
234
|
+
const currentMinColumnIndex = columnHeights.indexOf(Math.min(...columnHeights));
|
|
235
|
+
columnHeights[currentMinColumnIndex] += childHeight;
|
|
236
|
+
const order = currentMinColumnIndex + 1;
|
|
237
|
+
child.style.order = order;
|
|
223
238
|
}
|
|
224
|
-
};
|
|
239
|
+
});
|
|
225
240
|
|
|
241
|
+
if (!skip) {
|
|
242
|
+
setMaxColumnHeight(Math.max(...columnHeights));
|
|
243
|
+
const numOfLineBreaks = currentNumberOfColumns > 0 ? currentNumberOfColumns - 1 : 0;
|
|
244
|
+
setNumberOfLineBreaks(numOfLineBreaks);
|
|
245
|
+
}
|
|
246
|
+
};
|
|
226
247
|
|
|
227
|
-
|
|
248
|
+
const observer = React.useRef(typeof ResizeObserver === 'undefined' ? undefined : new ResizeObserver(handleResize));
|
|
249
|
+
React.useEffect(() => {
|
|
250
|
+
const resizeObserver = observer.current; // IE and old browsers are not supported
|
|
251
|
+
|
|
252
|
+
if (resizeObserver === undefined) {
|
|
228
253
|
return undefined;
|
|
229
254
|
}
|
|
230
255
|
|
|
231
|
-
const resizeObserver = new ResizeObserver(handleResize);
|
|
232
256
|
const container = masonryRef.current;
|
|
233
257
|
|
|
234
|
-
if (container) {
|
|
258
|
+
if (container && resizeObserver) {
|
|
235
259
|
// only the masonry container and its first child are observed for resizing;
|
|
236
260
|
// this might cause unforeseen problems in some use cases;
|
|
237
261
|
resizeObserver.observe(container);
|
|
@@ -241,9 +265,7 @@ const Masonry = /*#__PURE__*/React.forwardRef(function Masonry(inProps, ref) {
|
|
|
241
265
|
}
|
|
242
266
|
}
|
|
243
267
|
|
|
244
|
-
return () => {
|
|
245
|
-
resizeObserver.disconnect();
|
|
246
|
-
};
|
|
268
|
+
return () => resizeObserver ? resizeObserver.disconnect() : {};
|
|
247
269
|
}, [columns, spacing, children]);
|
|
248
270
|
const handleRef = useForkRef(ref, masonryRef);
|
|
249
271
|
const lineBreakStyle = {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export interface MasonryClasses {
|
|
2
|
-
/** Styles applied to the root element. */
|
|
3
|
-
root: string;
|
|
4
|
-
}
|
|
5
|
-
export declare type MasonryClassKey = keyof MasonryClasses;
|
|
6
|
-
export declare function getMasonryUtilityClass(slot: string): string;
|
|
7
|
-
declare const masonryClasses: MasonryClasses;
|
|
8
|
-
export default masonryClasses;
|
|
1
|
+
export interface MasonryClasses {
|
|
2
|
+
/** Styles applied to the root element. */
|
|
3
|
+
root: string;
|
|
4
|
+
}
|
|
5
|
+
export declare type MasonryClassKey = keyof MasonryClasses;
|
|
6
|
+
export declare function getMasonryUtilityClass(slot: string): string;
|
|
7
|
+
declare const masonryClasses: MasonryClasses;
|
|
8
|
+
export default masonryClasses;
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { BaseDatePickerProps } from '../DatePicker/shared';
|
|
3
|
-
import { MobileWrapperProps } from '../internal/pickers/wrappers/MobileWrapper';
|
|
4
|
-
export interface MobileDatePickerProps<TDate = unknown> extends BaseDatePickerProps<TDate>, MobileWrapperProps {
|
|
5
|
-
}
|
|
6
|
-
declare type MobileDatePickerComponent = (<TDate>(props: MobileDatePickerProps<TDate> & React.RefAttributes<HTMLDivElement>) => JSX.Element) & {
|
|
7
|
-
propTypes?: any;
|
|
8
|
-
};
|
|
9
|
-
/**
|
|
10
|
-
*
|
|
11
|
-
* Demos:
|
|
12
|
-
*
|
|
13
|
-
* - [Date Picker](https://mui.com/components/date-picker/)
|
|
14
|
-
*
|
|
15
|
-
* API:
|
|
16
|
-
*
|
|
17
|
-
* - [MobileDatePicker API](https://mui.com/api/mobile-date-picker/)
|
|
18
|
-
*/
|
|
19
|
-
declare const MobileDatePicker: MobileDatePickerComponent;
|
|
20
|
-
export default MobileDatePicker;
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { BaseDatePickerProps } from '../DatePicker/shared';
|
|
3
|
+
import { MobileWrapperProps } from '../internal/pickers/wrappers/MobileWrapper';
|
|
4
|
+
export interface MobileDatePickerProps<TDate = unknown> extends BaseDatePickerProps<TDate>, MobileWrapperProps {
|
|
5
|
+
}
|
|
6
|
+
declare type MobileDatePickerComponent = (<TDate>(props: MobileDatePickerProps<TDate> & React.RefAttributes<HTMLDivElement>) => JSX.Element) & {
|
|
7
|
+
propTypes?: any;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
*
|
|
11
|
+
* Demos:
|
|
12
|
+
*
|
|
13
|
+
* - [Date Picker](https://mui.com/components/date-picker/)
|
|
14
|
+
*
|
|
15
|
+
* API:
|
|
16
|
+
*
|
|
17
|
+
* - [MobileDatePicker API](https://mui.com/api/mobile-date-picker/)
|
|
18
|
+
*/
|
|
19
|
+
declare const MobileDatePicker: MobileDatePickerComponent;
|
|
20
|
+
export default MobileDatePicker;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './MobileDatePicker';
|
|
2
|
-
export { default } from './MobileDatePicker';
|
|
1
|
+
export * from './MobileDatePicker';
|
|
2
|
+
export { default } from './MobileDatePicker';
|