@mui/lab 5.0.0-alpha.49 → 5.0.0-alpha.53
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 +251 -0
- package/CalendarPicker/CalendarPicker.d.ts +96 -96
- package/CalendarPicker/PickersCalendar.d.ts +45 -45
- package/CalendarPicker/PickersCalendarHeader.d.ts +42 -42
- package/CalendarPicker/PickersFadeTransitionGroup.d.ts +12 -12
- package/CalendarPicker/PickersFadeTransitionGroup.js +2 -2
- package/CalendarPicker/PickersSlideTransition.d.ts +16 -16
- package/CalendarPicker/index.d.ts +5 -5
- package/CalendarPicker/shared.d.ts +1 -1
- package/CalendarPicker/useCalendarState.d.ts +32 -32
- package/CalendarPickerSkeleton/CalendarPickerSkeleton.d.ts +41 -40
- 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/ClockNumbers.d.ts +24 -24
- package/ClockPicker/ClockPicker.d.ts +121 -121
- package/ClockPicker/ClockPickerStandalone.d.ts +28 -28
- package/ClockPicker/ClockPointer.d.ts +23 -23
- package/ClockPicker/index.d.ts +5 -5
- package/ClockPicker/shared.d.ts +5 -5
- package/DatePicker/DatePicker.d.ts +27 -27
- package/DatePicker/DatePicker.js +5 -0
- package/DatePicker/DatePickerToolbar.d.ts +23 -23
- package/DatePicker/index.d.ts +2 -2
- package/DatePicker/shared.d.ts +45 -41
- package/DateRangePicker/DateRangePicker.d.ts +65 -65
- package/DateRangePicker/DateRangePicker.js +5 -0
- package/DateRangePicker/DateRangePickerInput.d.ts +35 -35
- package/DateRangePicker/DateRangePickerToolbar.d.ts +15 -15
- package/DateRangePicker/DateRangePickerView.d.ts +44 -44
- package/DateRangePicker/DateRangePickerViewDesktop.d.ts +29 -29
- package/DateRangePicker/DateRangePickerViewMobile.d.ts +17 -17
- package/DateRangePicker/RangeTypes.d.ts +8 -8
- package/DateRangePicker/date-range-manager.d.ts +14 -14
- package/DateRangePicker/index.d.ts +3 -3
- package/DateRangePickerDay/DateRangePickerDay.d.ts +79 -79
- package/DateRangePickerDay/DateRangePickerDay.js +1 -1
- package/DateRangePickerDay/index.d.ts +2 -2
- package/DateTimePicker/DateTimePicker.d.ts +27 -27
- package/DateTimePicker/DateTimePicker.js +5 -0
- package/DateTimePicker/DateTimePickerTabs.d.ts +13 -13
- package/DateTimePicker/DateTimePickerToolbar.d.ts +7 -7
- package/DateTimePicker/index.d.ts +2 -2
- package/DateTimePicker/shared.d.ts +67 -63
- package/DesktopDatePicker/DesktopDatePicker.d.ts +20 -20
- package/DesktopDatePicker/DesktopDatePicker.js +8 -1
- package/DesktopDatePicker/index.d.ts +2 -2
- package/DesktopDateRangePicker/DesktopDateRangePicker.d.ts +64 -64
- package/DesktopDateRangePicker/DesktopDateRangePicker.js +5 -0
- package/DesktopDateRangePicker/index.d.ts +2 -2
- package/DesktopDateTimePicker/DesktopDateTimePicker.d.ts +20 -20
- package/DesktopDateTimePicker/DesktopDateTimePicker.js +5 -0
- package/DesktopDateTimePicker/index.d.ts +2 -2
- package/DesktopTimePicker/DesktopTimePicker.d.ts +20 -20
- package/DesktopTimePicker/DesktopTimePicker.js +10 -0
- package/DesktopTimePicker/index.d.ts +2 -2
- package/LICENSE +21 -21
- package/LoadingButton/LoadingButton.js +37 -7
- package/LoadingButton/loadingButtonClasses.d.ts +22 -22
- package/LocalizationProvider/LocalizationProvider.d.ts +35 -35
- package/LocalizationProvider/index.d.ts +2 -2
- package/Masonry/Masonry.d.ts +13 -1
- package/Masonry/Masonry.js +246 -59
- package/Masonry/masonryClasses.d.ts +8 -8
- package/MobileDatePicker/MobileDatePicker.d.ts +20 -20
- package/MobileDatePicker/index.d.ts +2 -2
- package/MobileDateRangePicker/MobileDateRangePicker.d.ts +64 -64
- package/MobileDateRangePicker/index.d.ts +2 -2
- package/MobileDateTimePicker/MobileDateTimePicker.d.ts +20 -20
- package/MobileDateTimePicker/index.d.ts +2 -2
- package/MobileTimePicker/MobileTimePicker.d.ts +20 -20
- package/MobileTimePicker/MobileTimePicker.js +5 -0
- package/MobileTimePicker/index.d.ts +2 -2
- package/MonthPicker/MonthPicker.d.ts +49 -49
- package/MonthPicker/MonthPicker.js +1 -1
- package/MonthPicker/PickersMonth.d.ts +15 -15
- 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/StaticTimePicker.js +5 -0
- package/StaticTimePicker/index.d.ts +2 -2
- package/TabPanel/TabPanel.js +1 -1
- package/TabPanel/tabPanelClasses.d.ts +8 -8
- package/TimePicker/TimePicker.d.ts +27 -27
- package/TimePicker/TimePicker.js +10 -0
- package/TimePicker/TimePickerToolbar.d.ts +23 -23
- package/TimePicker/index.d.ts +2 -2
- package/TimePicker/shared.d.ts +36 -32
- 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/TimelineConnector/TimelineConnector.js +1 -1
- package/TimelineConnector/timelineConnectorClasses.d.ts +8 -8
- package/TimelineContent/TimelineContent.js +1 -1
- package/TimelineContent/timelineContentClasses.d.ts +14 -14
- package/TimelineDot/TimelineDot.js +1 -1
- package/TimelineDot/timelineDotClasses.d.ts +24 -24
- package/TimelineItem/TimelineItem.js +1 -1
- package/TimelineItem/timelineItemClasses.d.ts +16 -16
- package/TimelineOppositeContent/TimelineOppositeContent.js +1 -1
- package/TimelineOppositeContent/timelineOppositeContentClasses.d.ts +14 -14
- package/TimelineSeparator/TimelineSeparator.js +1 -1
- package/TimelineSeparator/timelineSeparatorClasses.d.ts +8 -8
- package/TreeItem/TreeItem.js +1 -1
- package/TreeItem/treeItemClasses.d.ts +24 -24
- package/TreeView/TreeView.js +1 -1
- package/TreeView/treeViewClasses.d.ts +8 -8
- package/YearPicker/PickersYear.d.ts +28 -28
- package/YearPicker/YearPicker.d.ts +42 -42
- package/YearPicker/index.d.ts +5 -5
- package/YearPicker/yearPickerClasses.d.ts +3 -3
- package/index.js +1 -1
- package/internal/pickers/KeyboardDateInput.d.ts +4 -4
- package/internal/pickers/Picker/Picker.d.ts +33 -33
- package/internal/pickers/Picker/Picker.js +12 -6
- package/internal/pickers/Picker/PickerView.d.ts +3 -7
- package/internal/pickers/PickersArrowSwitcher.d.ts +41 -41
- package/internal/pickers/PickersArrowSwitcher.js +1 -3
- package/internal/pickers/PickersModalDialog.d.ts +47 -47
- package/internal/pickers/PickersPopper.d.ts +33 -25
- package/internal/pickers/PickersPopper.js +31 -7
- package/internal/pickers/PickersToolbar.d.ts +14 -14
- package/internal/pickers/PickersToolbarButton.d.ts +13 -13
- package/internal/pickers/PickersToolbarText.d.ts +8 -8
- package/internal/pickers/PureDateInput.d.ts +80 -80
- package/internal/pickers/constants/dimensions.d.ts +4 -4
- package/internal/pickers/constants/prop-types.d.ts +1 -1
- package/internal/pickers/date-time-utils.d.ts +8 -8
- package/internal/pickers/date-utils.d.ts +52 -52
- package/internal/pickers/hooks/date-helpers-hooks.d.ts +16 -16
- package/internal/pickers/hooks/useIsLandscape.d.ts +4 -4
- package/internal/pickers/hooks/useMaskedInput.d.ts +7 -7
- package/internal/pickers/hooks/useOpenState.d.ts +10 -10
- package/internal/pickers/hooks/usePickerState.d.ts +38 -38
- package/internal/pickers/hooks/useUtils.d.ts +7 -7
- package/internal/pickers/hooks/useValidation.d.ts +23 -23
- package/internal/pickers/hooks/useViews.d.ts +19 -19
- package/internal/pickers/test-utils.js +18 -26
- 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/DesktopWrapper.js +2 -0
- 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/PickersFadeTransitionGroup.js +3 -5
- package/legacy/CalendarPickerSkeleton/CalendarPickerSkeleton.js +1 -1
- package/legacy/DatePicker/DatePicker.js +5 -0
- package/legacy/DateRangePicker/DateRangePicker.js +5 -0
- package/legacy/DateRangePickerDay/DateRangePickerDay.js +1 -1
- package/legacy/DateTimePicker/DateTimePicker.js +5 -0
- package/legacy/DesktopDatePicker/DesktopDatePicker.js +8 -1
- package/legacy/DesktopDateRangePicker/DesktopDateRangePicker.js +5 -0
- package/legacy/DesktopDateTimePicker/DesktopDateTimePicker.js +5 -0
- package/legacy/DesktopTimePicker/DesktopTimePicker.js +10 -0
- package/legacy/LoadingButton/LoadingButton.js +36 -10
- package/legacy/Masonry/Masonry.js +255 -59
- package/legacy/MobileTimePicker/MobileTimePicker.js +5 -0
- package/legacy/MonthPicker/MonthPicker.js +1 -1
- package/legacy/PickersDay/PickersDay.js +1 -1
- package/legacy/StaticTimePicker/StaticTimePicker.js +5 -0
- package/legacy/TabPanel/TabPanel.js +1 -1
- package/legacy/TimePicker/TimePicker.js +10 -0
- package/legacy/Timeline/Timeline.js +1 -1
- package/legacy/TimelineConnector/TimelineConnector.js +1 -1
- package/legacy/TimelineContent/TimelineContent.js +1 -1
- package/legacy/TimelineDot/TimelineDot.js +1 -1
- package/legacy/TimelineItem/TimelineItem.js +1 -1
- package/legacy/TimelineOppositeContent/TimelineOppositeContent.js +1 -1
- package/legacy/TimelineSeparator/TimelineSeparator.js +1 -1
- package/legacy/TreeItem/TreeItem.js +1 -1
- package/legacy/TreeView/TreeView.js +1 -1
- package/legacy/index.js +1 -1
- package/legacy/internal/pickers/Picker/Picker.js +12 -8
- package/legacy/internal/pickers/PickersArrowSwitcher.js +1 -3
- package/legacy/internal/pickers/PickersPopper.js +29 -7
- package/legacy/internal/pickers/test-utils.js +22 -33
- package/legacy/internal/pickers/wrappers/DesktopWrapper.js +2 -0
- package/modern/CalendarPicker/PickersFadeTransitionGroup.js +2 -2
- package/modern/CalendarPickerSkeleton/CalendarPickerSkeleton.js +1 -1
- package/modern/DatePicker/DatePicker.js +5 -0
- package/modern/DateRangePicker/DateRangePicker.js +5 -0
- package/modern/DateRangePickerDay/DateRangePickerDay.js +1 -1
- package/modern/DateTimePicker/DateTimePicker.js +5 -0
- package/modern/DesktopDatePicker/DesktopDatePicker.js +8 -1
- package/modern/DesktopDateRangePicker/DesktopDateRangePicker.js +5 -0
- package/modern/DesktopDateTimePicker/DesktopDateTimePicker.js +5 -0
- package/modern/DesktopTimePicker/DesktopTimePicker.js +10 -0
- package/modern/LoadingButton/LoadingButton.js +37 -7
- package/modern/Masonry/Masonry.js +246 -59
- package/modern/MobileTimePicker/MobileTimePicker.js +5 -0
- package/modern/MonthPicker/MonthPicker.js +1 -1
- package/modern/PickersDay/PickersDay.js +1 -1
- package/modern/StaticTimePicker/StaticTimePicker.js +5 -0
- package/modern/TabPanel/TabPanel.js +1 -1
- package/modern/TimePicker/TimePicker.js +10 -0
- package/modern/Timeline/Timeline.js +1 -1
- package/modern/TimelineConnector/TimelineConnector.js +1 -1
- package/modern/TimelineContent/TimelineContent.js +1 -1
- package/modern/TimelineDot/TimelineDot.js +1 -1
- package/modern/TimelineItem/TimelineItem.js +1 -1
- package/modern/TimelineOppositeContent/TimelineOppositeContent.js +1 -1
- package/modern/TimelineSeparator/TimelineSeparator.js +1 -1
- package/modern/TreeItem/TreeItem.js +1 -1
- package/modern/TreeView/TreeView.js +1 -1
- package/modern/index.js +1 -1
- package/modern/internal/pickers/Picker/Picker.js +12 -6
- package/modern/internal/pickers/PickersArrowSwitcher.js +1 -3
- package/modern/internal/pickers/PickersPopper.js +31 -7
- package/modern/internal/pickers/test-utils.js +18 -26
- package/modern/internal/pickers/wrappers/DesktopWrapper.js +2 -0
- package/node/CalendarPicker/CalendarPicker.js +1 -1
- package/node/CalendarPicker/PickersFadeTransitionGroup.js +2 -2
- package/node/CalendarPicker/PickersSlideTransition.js +1 -1
- package/node/CalendarPicker/index.js +4 -4
- package/node/CalendarPicker/useCalendarState.js +1 -1
- package/node/CalendarPickerSkeleton/CalendarPickerSkeleton.js +2 -2
- package/node/CalendarPickerSkeleton/index.js +4 -4
- package/node/ClockPicker/ClockPicker.js +1 -1
- package/node/ClockPicker/index.js +4 -4
- package/node/ClockPicker/shared.js +1 -1
- package/node/DatePicker/DatePicker.js +5 -0
- package/node/DatePicker/shared.js +1 -1
- package/node/DateRangePicker/DateRangePicker.js +5 -0
- package/node/DateRangePickerDay/DateRangePickerDay.js +2 -2
- package/node/DateTimePicker/DateTimePicker.js +5 -0
- package/node/DesktopDatePicker/DesktopDatePicker.js +8 -1
- package/node/DesktopDateRangePicker/DesktopDateRangePicker.js +5 -0
- package/node/DesktopDateTimePicker/DesktopDateTimePicker.js +5 -0
- package/node/DesktopTimePicker/DesktopTimePicker.js +10 -0
- package/node/LoadingButton/LoadingButton.js +37 -7
- package/node/LoadingButton/loadingButtonClasses.js +1 -1
- package/node/Masonry/Masonry.js +247 -63
- package/node/Masonry/masonryClasses.js +1 -1
- package/node/MobileTimePicker/MobileTimePicker.js +5 -0
- package/node/MonthPicker/MonthPicker.js +3 -2
- package/node/PickersDay/PickersDay.js +3 -2
- package/node/PickersDay/index.js +4 -4
- package/node/StaticTimePicker/StaticTimePicker.js +5 -0
- package/node/TabContext/TabContext.js +1 -1
- package/node/TabPanel/TabPanel.js +1 -1
- package/node/TabPanel/tabPanelClasses.js +1 -1
- package/node/TimePicker/TimePicker.js +10 -0
- package/node/TimePicker/TimePickerToolbar.js +2 -1
- package/node/Timeline/Timeline.js +1 -1
- package/node/Timeline/timelineClasses.js +1 -1
- package/node/TimelineConnector/TimelineConnector.js +1 -1
- package/node/TimelineConnector/timelineConnectorClasses.js +1 -1
- package/node/TimelineContent/TimelineContent.js +1 -1
- package/node/TimelineContent/timelineContentClasses.js +1 -1
- package/node/TimelineDot/TimelineDot.js +1 -1
- package/node/TimelineDot/timelineDotClasses.js +1 -1
- package/node/TimelineItem/TimelineItem.js +1 -1
- package/node/TimelineItem/timelineItemClasses.js +1 -1
- package/node/TimelineOppositeContent/TimelineOppositeContent.js +1 -1
- package/node/TimelineOppositeContent/timelineOppositeContentClasses.js +1 -1
- package/node/TimelineSeparator/TimelineSeparator.js +1 -1
- package/node/TimelineSeparator/timelineSeparatorClasses.js +1 -1
- package/node/TreeItem/TreeItem.js +1 -1
- package/node/TreeItem/index.js +4 -4
- package/node/TreeItem/treeItemClasses.js +1 -1
- package/node/TreeView/TreeView.js +1 -1
- package/node/TreeView/descendants.js +1 -1
- package/node/TreeView/treeViewClasses.js +1 -1
- package/node/YearPicker/PickersYear.js +2 -1
- package/node/YearPicker/yearPickerClasses.js +1 -1
- package/node/index.js +7 -7
- package/node/internal/pickers/Picker/Picker.js +12 -6
- package/node/internal/pickers/PickersArrowSwitcher.js +1 -3
- package/node/internal/pickers/PickersPopper.js +31 -7
- package/node/internal/pickers/constants/dimensions.js +1 -1
- package/node/internal/pickers/date-utils.js +2 -1
- package/node/internal/pickers/hooks/date-helpers-hooks.js +1 -1
- package/node/internal/pickers/hooks/useIsLandscape.js +1 -1
- package/node/internal/pickers/hooks/useMaskedInput.js +1 -1
- package/node/internal/pickers/hooks/useOpenState.js +1 -1
- package/node/internal/pickers/hooks/useUtils.js +1 -1
- package/node/internal/pickers/hooks/useValidation.js +3 -3
- package/node/internal/pickers/test-utils.js +20 -39
- package/node/internal/pickers/text-field-helper.js +3 -2
- package/node/internal/pickers/time-utils.js +2 -1
- package/node/internal/pickers/utils.js +1 -1
- package/node/internal/pickers/wrappers/DesktopWrapper.js +2 -0
- package/node/internal/pickers/wrappers/WrapperVariantContext.js +1 -1
- package/node/useAutocomplete/index.js +4 -4
- package/package.json +9 -9
- package/Masonry/MasonryContext.js +0 -12
- package/MasonryItem/MasonryItem.d.ts +0 -49
- package/MasonryItem/MasonryItem.js +0 -196
- package/MasonryItem/index.d.ts +0 -5
- package/MasonryItem/index.js +0 -3
- package/MasonryItem/masonryItemClasses.d.ts +0 -8
- package/MasonryItem/masonryItemClasses.js +0 -6
- package/MasonryItem/package.json +0 -6
- package/legacy/Masonry/MasonryContext.js +0 -12
- package/legacy/MasonryItem/MasonryItem.js +0 -201
- package/legacy/MasonryItem/index.js +0 -3
- package/legacy/MasonryItem/masonryItemClasses.js +0 -6
- package/modern/Masonry/MasonryContext.js +0 -12
- package/modern/MasonryItem/MasonryItem.js +0 -196
- package/modern/MasonryItem/index.js +0 -3
- package/modern/MasonryItem/masonryItemClasses.js +0 -6
- package/node/Masonry/MasonryContext.js +0 -24
- package/node/MasonryItem/MasonryItem.js +0 -220
- package/node/MasonryItem/index.js +0 -42
- package/node/MasonryItem/masonryItemClasses.js +0 -17
|
@@ -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.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ import { MasonryClasses } from './masonryClasses';
|
|
|
6
6
|
export interface MasonryTypeMap<P = {}, D extends React.ElementType = 'div'> {
|
|
7
7
|
props: P & {
|
|
8
8
|
/**
|
|
9
|
-
* The content of the component.
|
|
9
|
+
* The content of the component.
|
|
10
10
|
*/
|
|
11
11
|
children: NonNullable<React.ReactNode>;
|
|
12
12
|
/**
|
|
@@ -18,6 +18,18 @@ export interface MasonryTypeMap<P = {}, D extends React.ElementType = 'div'> {
|
|
|
18
18
|
* @default 4
|
|
19
19
|
*/
|
|
20
20
|
columns?: ResponsiveStyleValue<number | string>;
|
|
21
|
+
/**
|
|
22
|
+
* The default number of columns of the component. This is provided for server-side rendering.
|
|
23
|
+
*/
|
|
24
|
+
defaultColumns?: number;
|
|
25
|
+
/**
|
|
26
|
+
* The default height of the component in px. This is provided for server-side rendering.
|
|
27
|
+
*/
|
|
28
|
+
defaultHeight?: number;
|
|
29
|
+
/**
|
|
30
|
+
* The default spacing of the component. Like `spacing`, it is a factor of the theme's spacing. This is provided for server-side rendering.
|
|
31
|
+
*/
|
|
32
|
+
defaultSpacing?: number;
|
|
21
33
|
/**
|
|
22
34
|
* Defines the space between children. It is a factor of the theme's spacing.
|
|
23
35
|
* @default 1
|
package/Masonry/Masonry.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
2
2
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
|
-
const _excluded = ["children", "className", "component", "columns", "spacing"];
|
|
4
|
-
import * as React from 'react';
|
|
5
|
-
import PropTypes from 'prop-types';
|
|
6
|
-
import clsx from 'clsx';
|
|
7
|
-
import { createUnarySpacing, getValue, handleBreakpoints, unstable_resolveBreakpointValues as resolveBreakpointValues } from '@mui/system';
|
|
8
|
-
import { deepmerge, unstable_useForkRef as useForkRef } from '@mui/utils';
|
|
3
|
+
const _excluded = ["children", "className", "component", "columns", "spacing", "defaultColumns", "defaultHeight", "defaultSpacing"];
|
|
9
4
|
import { unstable_composeClasses as composeClasses } from '@mui/core';
|
|
10
5
|
import { styled, useThemeProps } from '@mui/material/styles';
|
|
6
|
+
import { createUnarySpacing, getValue, handleBreakpoints, unstable_resolveBreakpointValues as resolveBreakpointValues } from '@mui/system';
|
|
7
|
+
import { deepmerge, unstable_useForkRef as useForkRef } from '@mui/utils';
|
|
8
|
+
import clsx from 'clsx';
|
|
9
|
+
import PropTypes from 'prop-types';
|
|
10
|
+
import * as React from 'react';
|
|
11
11
|
import { getMasonryUtilityClass } from './masonryClasses';
|
|
12
|
-
import MasonryContext from './MasonryContext';
|
|
13
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
14
14
|
|
|
15
15
|
const useUtilityClasses = ownerState => {
|
|
16
16
|
const {
|
|
@@ -20,56 +20,146 @@ const useUtilityClasses = ownerState => {
|
|
|
20
20
|
root: ['root']
|
|
21
21
|
};
|
|
22
22
|
return composeClasses(slots, getMasonryUtilityClass, classes);
|
|
23
|
+
}; // compute base for responsive values; e.g.,
|
|
24
|
+
// [1,2,3] => {xs: true, sm: true, md: true}
|
|
25
|
+
// {xs: 1, sm: 2, md: 3} => {xs: true, sm: true, md: true}
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
const computeBreakpointsBase = (breakpoints, prop) => {
|
|
29
|
+
const base = {};
|
|
30
|
+
|
|
31
|
+
if (Array.isArray(prop)) {
|
|
32
|
+
Object.keys(breakpoints.values).forEach((breakpoint, i, arr) => {
|
|
33
|
+
if (i < arr.length) {
|
|
34
|
+
base[breakpoint] = true;
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
} else {
|
|
38
|
+
Object.keys(breakpoints.values).forEach(breakpoint => {
|
|
39
|
+
if (prop[breakpoint] != null) {
|
|
40
|
+
base[breakpoint] = true;
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
return base;
|
|
46
|
+
}; // if prop is an array, convert to object; e.g.,
|
|
47
|
+
// (base: {xs: true, sm: true, md: true}, prop: [1,2,3]) => {xs: 1, sm: 2, md: 3}
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
const validatePropValues = (base, prop) => {
|
|
51
|
+
const values = {};
|
|
52
|
+
|
|
53
|
+
if (Array.isArray(prop)) {
|
|
54
|
+
Object.keys(base).forEach((breakpoint, i) => {
|
|
55
|
+
values[breakpoint] = prop[i];
|
|
56
|
+
});
|
|
57
|
+
return values;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
return prop;
|
|
23
61
|
};
|
|
24
62
|
|
|
25
|
-
export const
|
|
63
|
+
export const getStyle = ({
|
|
26
64
|
ownerState,
|
|
27
65
|
theme
|
|
28
66
|
}) => {
|
|
29
67
|
let styles = {
|
|
30
|
-
display: 'grid',
|
|
31
|
-
gridAutoRows: 0,
|
|
32
|
-
padding: 0,
|
|
33
|
-
overflow: 'auto',
|
|
34
68
|
width: '100%',
|
|
35
|
-
|
|
36
|
-
|
|
69
|
+
display: 'flex',
|
|
70
|
+
flexFlow: 'column wrap',
|
|
71
|
+
alignContent: 'space-between',
|
|
72
|
+
boxSizing: 'border-box',
|
|
73
|
+
'& > *': {
|
|
74
|
+
boxSizing: 'border-box'
|
|
75
|
+
}
|
|
37
76
|
};
|
|
38
|
-
const
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
77
|
+
const stylesSSR = {};
|
|
78
|
+
|
|
79
|
+
if (ownerState.isSSR) {
|
|
80
|
+
const orderStyleSSR = {};
|
|
81
|
+
const defaultSpacing = Number(theme.spacing(ownerState.defaultSpacing).replace('px', ''));
|
|
82
|
+
|
|
83
|
+
for (let i = 1; i <= ownerState.defaultColumns; i += 1) {
|
|
84
|
+
orderStyleSSR[`&:nth-of-type(${ownerState.defaultColumns}n+${i % ownerState.defaultColumns})`] = {
|
|
85
|
+
order: i
|
|
86
|
+
};
|
|
42
87
|
}
|
|
43
|
-
|
|
88
|
+
|
|
89
|
+
stylesSSR.height = ownerState.defaultHeight;
|
|
90
|
+
stylesSSR.margin = -(defaultSpacing / 2);
|
|
91
|
+
stylesSSR['& > *'] = _extends({}, styles['& > *'], orderStyleSSR, {
|
|
92
|
+
margin: defaultSpacing / 2,
|
|
93
|
+
width: `calc(${(100 / ownerState.defaultColumns).toFixed(2)}% - ${defaultSpacing}px)`
|
|
94
|
+
});
|
|
95
|
+
return _extends({}, styles, stylesSSR);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
const spacingBreakpointsBase = computeBreakpointsBase(theme.breakpoints, ownerState.spacing);
|
|
44
99
|
const spacingValues = resolveBreakpointValues({
|
|
45
|
-
values: ownerState.spacing,
|
|
46
|
-
base
|
|
100
|
+
values: validatePropValues(spacingBreakpointsBase, ownerState.spacing),
|
|
101
|
+
base: spacingBreakpointsBase
|
|
47
102
|
});
|
|
48
103
|
const transformer = createUnarySpacing(theme);
|
|
49
104
|
|
|
50
105
|
const spacingStyleFromPropValue = propValue => {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
106
|
+
const themeSpacingValue = Number(propValue);
|
|
107
|
+
const spacing = Number(getValue(transformer, themeSpacingValue).replace('px', ''));
|
|
108
|
+
return _extends({
|
|
109
|
+
margin: -(spacing / 2),
|
|
110
|
+
'& > *': {
|
|
111
|
+
margin: spacing / 2
|
|
112
|
+
}
|
|
113
|
+
}, ownerState.maxColumnHeight && {
|
|
114
|
+
height: Math.ceil(ownerState.maxColumnHeight + spacing)
|
|
115
|
+
});
|
|
54
116
|
};
|
|
55
117
|
|
|
56
|
-
styles =
|
|
118
|
+
styles = deepmerge(styles, handleBreakpoints({
|
|
57
119
|
theme
|
|
58
120
|
}, spacingValues, spacingStyleFromPropValue));
|
|
121
|
+
const columnBreakpointsBase = computeBreakpointsBase(theme.breakpoints, ownerState.columns);
|
|
59
122
|
const columnValues = resolveBreakpointValues({
|
|
60
|
-
values: ownerState.columns,
|
|
61
|
-
base
|
|
123
|
+
values: validatePropValues(columnBreakpointsBase, ownerState.columns),
|
|
124
|
+
base: columnBreakpointsBase
|
|
62
125
|
});
|
|
63
126
|
|
|
64
127
|
const columnStyleFromPropValue = propValue => {
|
|
128
|
+
const columnValue = Number(propValue);
|
|
129
|
+
const width = `${(100 / columnValue).toFixed(2)}%`;
|
|
130
|
+
const spacing = typeof spacingValues !== 'object' ? getValue(transformer, Number(spacingValues)) : '0px';
|
|
65
131
|
return {
|
|
66
|
-
|
|
132
|
+
'& > *': {
|
|
133
|
+
width: `calc(${width} - ${spacing})`
|
|
134
|
+
}
|
|
67
135
|
};
|
|
68
136
|
};
|
|
69
137
|
|
|
70
138
|
styles = deepmerge(styles, handleBreakpoints({
|
|
71
139
|
theme
|
|
72
|
-
}, columnValues, columnStyleFromPropValue));
|
|
140
|
+
}, columnValues, columnStyleFromPropValue)); // configure width for responsive spacing values
|
|
141
|
+
|
|
142
|
+
if (typeof spacingValues === 'object') {
|
|
143
|
+
styles = deepmerge(styles, handleBreakpoints({
|
|
144
|
+
theme
|
|
145
|
+
}, spacingValues, (propValue, breakpoint) => {
|
|
146
|
+
if (breakpoint) {
|
|
147
|
+
const themeSpacingValue = Number(propValue);
|
|
148
|
+
const lastBreakpoint = Object.keys(columnValues).pop();
|
|
149
|
+
const spacing = getValue(transformer, themeSpacingValue);
|
|
150
|
+
const column = typeof columnValues === 'object' ? columnValues[breakpoint] || columnValues[lastBreakpoint] : columnValues;
|
|
151
|
+
const width = `${(100 / column).toFixed(2)}%`;
|
|
152
|
+
return {
|
|
153
|
+
'& > *': {
|
|
154
|
+
width: `calc(${width} - ${spacing})`
|
|
155
|
+
}
|
|
156
|
+
};
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
return null;
|
|
160
|
+
}));
|
|
161
|
+
}
|
|
162
|
+
|
|
73
163
|
return styles;
|
|
74
164
|
};
|
|
75
165
|
const MasonryRoot = styled('div', {
|
|
@@ -78,61 +168,143 @@ const MasonryRoot = styled('div', {
|
|
|
78
168
|
overridesResolver: (props, styles) => {
|
|
79
169
|
return [styles.root];
|
|
80
170
|
}
|
|
81
|
-
})(
|
|
171
|
+
})(getStyle);
|
|
82
172
|
const Masonry = /*#__PURE__*/React.forwardRef(function Masonry(inProps, ref) {
|
|
83
173
|
const props = useThemeProps({
|
|
84
174
|
props: inProps,
|
|
85
175
|
name: 'MuiMasonry'
|
|
86
176
|
});
|
|
87
|
-
const masonryRef = React.useRef();
|
|
88
177
|
|
|
89
178
|
const {
|
|
90
179
|
children,
|
|
91
180
|
className,
|
|
92
181
|
component = 'div',
|
|
93
182
|
columns = 4,
|
|
94
|
-
spacing = 1
|
|
183
|
+
spacing = 1,
|
|
184
|
+
defaultColumns,
|
|
185
|
+
defaultHeight,
|
|
186
|
+
defaultSpacing
|
|
95
187
|
} = props,
|
|
96
188
|
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
97
189
|
|
|
190
|
+
const masonryRef = React.useRef();
|
|
191
|
+
const [maxColumnHeight, setMaxColumnHeight] = React.useState();
|
|
192
|
+
const isSSR = !maxColumnHeight && defaultHeight && defaultColumns !== undefined && defaultSpacing !== undefined;
|
|
193
|
+
const [numberOfLineBreaks, setNumberOfLineBreaks] = React.useState(isSSR ? defaultColumns - 1 : 0);
|
|
194
|
+
|
|
98
195
|
const ownerState = _extends({}, props, {
|
|
99
196
|
spacing,
|
|
100
|
-
columns
|
|
197
|
+
columns,
|
|
198
|
+
maxColumnHeight,
|
|
199
|
+
defaultColumns,
|
|
200
|
+
defaultHeight,
|
|
201
|
+
defaultSpacing,
|
|
202
|
+
isSSR
|
|
101
203
|
});
|
|
102
204
|
|
|
103
205
|
const classes = useUtilityClasses(ownerState);
|
|
104
|
-
const contextValue = React.useMemo(() => ({
|
|
105
|
-
spacing
|
|
106
|
-
}), [spacing]);
|
|
107
|
-
let didWarn = false;
|
|
108
206
|
React.useEffect(() => {
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
207
|
+
const handleResize = () => {
|
|
208
|
+
const parentWidth = masonryRef.current.clientWidth;
|
|
209
|
+
const childWidth = masonryRef.current.firstChild.clientWidth;
|
|
210
|
+
const firstChildComputedStyle = window.getComputedStyle(masonryRef.current.firstChild);
|
|
211
|
+
const firstChildMarginLeft = Number(firstChildComputedStyle.marginLeft.replace('px', ''));
|
|
212
|
+
const firstChildMarginRight = Number(firstChildComputedStyle.marginRight.replace('px', ''));
|
|
113
213
|
|
|
114
|
-
|
|
214
|
+
if (parentWidth === 0 || childWidth === 0) {
|
|
215
|
+
return;
|
|
115
216
|
}
|
|
116
|
-
};
|
|
117
217
|
|
|
218
|
+
const currentNumberOfColumns = Math.round(parentWidth / (childWidth + firstChildMarginLeft + firstChildMarginRight));
|
|
219
|
+
const columnHeights = new Array(currentNumberOfColumns).fill(0);
|
|
220
|
+
let skip = false;
|
|
221
|
+
masonryRef.current.childNodes.forEach(child => {
|
|
222
|
+
if (child.nodeType !== Node.ELEMENT_NODE || child.dataset.class === 'line-break' || skip) {
|
|
223
|
+
return;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
const childComputedStyle = window.getComputedStyle(child);
|
|
227
|
+
const childMarginTop = Number(childComputedStyle.marginTop.replace('px', ''));
|
|
228
|
+
const childMarginBottom = Number(childComputedStyle.marginBottom.replace('px', '')); // if any one of children isn't rendered yet, masonry's height shouldn't be computed yet
|
|
229
|
+
|
|
230
|
+
const childHeight = child.clientHeight ? Math.ceil(child.clientHeight) + childMarginTop + childMarginBottom : 0;
|
|
231
|
+
|
|
232
|
+
if (childHeight === 0) {
|
|
233
|
+
skip = true;
|
|
234
|
+
return;
|
|
235
|
+
} // if there is a nested image that isn't rendered yet, masonry's height shouldn't be computed yet
|
|
236
|
+
|
|
237
|
+
|
|
238
|
+
for (let i = 0; i < child.childNodes.length; i += 1) {
|
|
239
|
+
const nestedChild = child.childNodes[i];
|
|
240
|
+
|
|
241
|
+
if (nestedChild.tagName === 'IMG' && nestedChild.clientHeight === 0) {
|
|
242
|
+
skip = true;
|
|
243
|
+
break;
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
if (!skip) {
|
|
248
|
+
// find the current shortest column (where the current item will be placed)
|
|
249
|
+
const currentMinColumnIndex = columnHeights.indexOf(Math.min(...columnHeights));
|
|
250
|
+
columnHeights[currentMinColumnIndex] += childHeight;
|
|
251
|
+
const order = currentMinColumnIndex + 1;
|
|
252
|
+
child.style.order = order;
|
|
253
|
+
}
|
|
254
|
+
});
|
|
255
|
+
|
|
256
|
+
if (!skip) {
|
|
257
|
+
setMaxColumnHeight(Math.max(...columnHeights));
|
|
258
|
+
const numOfLineBreaks = currentNumberOfColumns > 0 ? currentNumberOfColumns - 1 : 0;
|
|
259
|
+
setNumberOfLineBreaks(numOfLineBreaks);
|
|
260
|
+
}
|
|
261
|
+
}; // IE and old browsers are not supported
|
|
262
|
+
|
|
263
|
+
|
|
264
|
+
if (typeof ResizeObserver === 'undefined') {
|
|
265
|
+
return null;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
const resizeObserver = new ResizeObserver(handleResize);
|
|
118
269
|
const container = masonryRef.current;
|
|
119
|
-
|
|
270
|
+
|
|
271
|
+
if (container) {
|
|
272
|
+
// only the masonry container and its first child are observed for resizing;
|
|
273
|
+
// this might cause unforeseen problems in some use cases;
|
|
274
|
+
resizeObserver.observe(container);
|
|
275
|
+
|
|
276
|
+
if (container.firstChild) {
|
|
277
|
+
resizeObserver.observe(container.firstChild);
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
|
|
120
281
|
return () => {
|
|
121
|
-
|
|
282
|
+
resizeObserver.disconnect();
|
|
122
283
|
};
|
|
123
|
-
}, []);
|
|
284
|
+
}, [columns, spacing]);
|
|
124
285
|
const handleRef = useForkRef(ref, masonryRef);
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
286
|
+
const lineBreakStyle = {
|
|
287
|
+
flexBasis: '100%',
|
|
288
|
+
width: 0,
|
|
289
|
+
margin: 0,
|
|
290
|
+
padding: 0
|
|
291
|
+
}; // columns are likely to have different heights and hence can start to merge;
|
|
292
|
+
// a line break at the end of each column prevents columns from merging
|
|
293
|
+
|
|
294
|
+
const lineBreaks = new Array(numberOfLineBreaks).fill('').map((_, index) => /*#__PURE__*/_jsx("span", {
|
|
295
|
+
"data-class": "line-break",
|
|
296
|
+
style: _extends({}, lineBreakStyle, {
|
|
297
|
+
order: index + 1
|
|
298
|
+
})
|
|
299
|
+
}, index));
|
|
300
|
+
return /*#__PURE__*/_jsxs(MasonryRoot, _extends({
|
|
301
|
+
as: component,
|
|
302
|
+
className: clsx(classes.root, className),
|
|
303
|
+
ref: handleRef,
|
|
304
|
+
ownerState: ownerState
|
|
305
|
+
}, other, {
|
|
306
|
+
children: [children, lineBreaks]
|
|
307
|
+
}));
|
|
136
308
|
});
|
|
137
309
|
process.env.NODE_ENV !== "production" ? Masonry.propTypes
|
|
138
310
|
/* remove-proptypes */
|
|
@@ -143,7 +315,7 @@ process.env.NODE_ENV !== "production" ? Masonry.propTypes
|
|
|
143
315
|
// ----------------------------------------------------------------------
|
|
144
316
|
|
|
145
317
|
/**
|
|
146
|
-
* The content of the component.
|
|
318
|
+
* The content of the component.
|
|
147
319
|
*/
|
|
148
320
|
children: PropTypes
|
|
149
321
|
/* @typescript-to-proptypes-ignore */
|
|
@@ -171,6 +343,21 @@ process.env.NODE_ENV !== "production" ? Masonry.propTypes
|
|
|
171
343
|
*/
|
|
172
344
|
component: PropTypes.elementType,
|
|
173
345
|
|
|
346
|
+
/**
|
|
347
|
+
* The default number of columns of the component. This is provided for server-side rendering.
|
|
348
|
+
*/
|
|
349
|
+
defaultColumns: PropTypes.number,
|
|
350
|
+
|
|
351
|
+
/**
|
|
352
|
+
* The default height of the component in px. This is provided for server-side rendering.
|
|
353
|
+
*/
|
|
354
|
+
defaultHeight: PropTypes.number,
|
|
355
|
+
|
|
356
|
+
/**
|
|
357
|
+
* The default spacing of the component. Like `spacing`, it is a factor of the theme's spacing. This is provided for server-side rendering.
|
|
358
|
+
*/
|
|
359
|
+
defaultSpacing: PropTypes.number,
|
|
360
|
+
|
|
174
361
|
/**
|
|
175
362
|
* Defines the space between children. It is a factor of the theme's spacing.
|
|
176
363
|
* @default 1
|
|
@@ -180,6 +367,6 @@ process.env.NODE_ENV !== "production" ? Masonry.propTypes
|
|
|
180
367
|
/**
|
|
181
368
|
* Allows defining system overrides as well as additional CSS styles.
|
|
182
369
|
*/
|
|
183
|
-
sx: PropTypes.object
|
|
370
|
+
sx: PropTypes.oneOfType([PropTypes.func, PropTypes.object])
|
|
184
371
|
} : void 0;
|
|
185
372
|
export default Masonry;
|
|
@@ -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';
|