@mui/lab 5.0.0-alpha.107 → 5.0.0-alpha.109
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/AdapterDateFns.js +2 -4
- package/AdapterDayjs/AdapterDayjs.js +2 -4
- package/AdapterLuxon/AdapterLuxon.js +2 -4
- package/AdapterMoment/AdapterMoment.js +2 -4
- package/Alert/Alert.js +1 -2
- package/AlertTitle/AlertTitle.js +1 -2
- package/Autocomplete/Autocomplete.js +1 -2
- package/AvatarGroup/AvatarGroup.js +1 -2
- package/CHANGELOG.md +132 -2
- package/CalendarPicker/CalendarPicker.js +0 -2
- package/CalendarPickerSkeleton/CalendarPickerSkeleton.js +0 -2
- package/ClockPicker/ClockPicker.js +0 -2
- package/DatePicker/DatePicker.js +0 -2
- package/DateRangePicker/DateRangePicker.js +0 -2
- package/DateRangePickerDay/DateRangePickerDay.js +0 -2
- package/DateTimePicker/DateTimePicker.js +0 -2
- package/DesktopDatePicker/DesktopDatePicker.js +0 -2
- package/DesktopDateRangePicker/DesktopDateRangePicker.js +0 -2
- package/DesktopDateTimePicker/DesktopDateTimePicker.js +0 -2
- package/DesktopTimePicker/DesktopTimePicker.js +0 -2
- package/LoadingButton/LoadingButton.js +13 -34
- package/LocalizationProvider/LocalizationProvider.js +0 -2
- package/Masonry/Masonry.js +27 -68
- package/MobileDatePicker/MobileDatePicker.js +0 -2
- package/MobileDateRangePicker/MobileDateRangePicker.js +0 -2
- package/MobileDateTimePicker/MobileDateTimePicker.js +0 -2
- package/MobileTimePicker/MobileTimePicker.js +0 -2
- package/MonthPicker/MonthPicker.js +0 -2
- package/Pagination/Pagination.js +1 -2
- package/PaginationItem/PaginationItem.js +1 -2
- package/PickersDay/PickersDay.js +0 -2
- package/Rating/Rating.js +1 -2
- package/Skeleton/Skeleton.js +1 -2
- package/SpeedDial/SpeedDial.js +1 -2
- package/SpeedDialAction/SpeedDialAction.js +1 -2
- package/SpeedDialIcon/SpeedDialIcon.js +1 -2
- package/StaticDatePicker/StaticDatePicker.js +0 -2
- package/StaticDateRangePicker/StaticDateRangePicker.js +0 -2
- package/StaticDateTimePicker/StaticDateTimePicker.js +0 -2
- package/StaticTimePicker/StaticTimePicker.js +0 -2
- package/TabContext/TabContext.js +3 -14
- package/TabList/TabList.js +4 -11
- package/TabPanel/TabPanel.js +6 -20
- package/TimePicker/TimePicker.js +0 -2
- package/Timeline/Timeline.js +9 -20
- package/Timeline/TimelineContext.js +1 -3
- package/TimelineConnector/TimelineConnector.js +4 -14
- package/TimelineContent/TimelineContent.js +4 -16
- package/TimelineDot/TimelineDot.js +8 -25
- package/TimelineItem/TimelineItem.js +5 -18
- package/TimelineOppositeContent/TimelineOppositeContent.js +4 -16
- package/TimelineSeparator/TimelineSeparator.js +4 -14
- package/ToggleButton/ToggleButton.js +1 -2
- package/ToggleButtonGroup/ToggleButtonGroup.js +1 -2
- package/TreeItem/TreeItem.js +19 -58
- package/TreeItem/TreeItemContent.js +12 -28
- package/TreeItem/useTreeItem.js +2 -8
- package/TreeView/TreeView.js +53 -197
- package/TreeView/TreeViewContext.js +1 -3
- package/TreeView/descendants.js +19 -31
- package/YearPicker/YearPicker.js +1 -3
- package/index.js +3 -2
- package/internal/svg-icons/ArrowDropDown.js +1 -1
- package/internal/svg-icons/ArrowLeft.js +1 -1
- package/internal/svg-icons/ArrowRight.js +1 -1
- package/internal/svg-icons/Calendar.js +1 -1
- package/internal/svg-icons/Clock.js +1 -1
- package/internal/svg-icons/DateRange.js +1 -1
- package/internal/svg-icons/Pen.js +1 -1
- package/internal/svg-icons/Time.js +1 -1
- package/legacy/AdapterDateFns/AdapterDateFns.js +2 -5
- package/legacy/AdapterDayjs/AdapterDayjs.js +2 -5
- package/legacy/AdapterLuxon/AdapterLuxon.js +2 -5
- package/legacy/AdapterMoment/AdapterMoment.js +2 -5
- package/legacy/Alert/Alert.js +1 -2
- package/legacy/AlertTitle/AlertTitle.js +1 -2
- package/legacy/Autocomplete/Autocomplete.js +1 -2
- package/legacy/AvatarGroup/AvatarGroup.js +1 -2
- package/legacy/CalendarPicker/CalendarPicker.js +0 -2
- package/legacy/CalendarPickerSkeleton/CalendarPickerSkeleton.js +0 -2
- package/legacy/ClockPicker/ClockPicker.js +0 -2
- package/legacy/DatePicker/DatePicker.js +0 -2
- package/legacy/DateRangePicker/DateRangePicker.js +0 -2
- package/legacy/DateRangePickerDay/DateRangePickerDay.js +0 -2
- package/legacy/DateTimePicker/DateTimePicker.js +0 -2
- package/legacy/DesktopDatePicker/DesktopDatePicker.js +0 -2
- package/legacy/DesktopDateRangePicker/DesktopDateRangePicker.js +0 -2
- package/legacy/DesktopDateTimePicker/DesktopDateTimePicker.js +0 -2
- package/legacy/DesktopTimePicker/DesktopTimePicker.js +0 -2
- package/legacy/LoadingButton/LoadingButton.js +19 -40
- package/legacy/LocalizationProvider/LocalizationProvider.js +0 -2
- package/legacy/Masonry/Masonry.js +33 -77
- package/legacy/MobileDatePicker/MobileDatePicker.js +0 -2
- package/legacy/MobileDateRangePicker/MobileDateRangePicker.js +0 -2
- package/legacy/MobileDateTimePicker/MobileDateTimePicker.js +0 -2
- package/legacy/MobileTimePicker/MobileTimePicker.js +0 -2
- package/legacy/MonthPicker/MonthPicker.js +0 -2
- package/legacy/Pagination/Pagination.js +1 -2
- package/legacy/PaginationItem/PaginationItem.js +1 -2
- package/legacy/PickersDay/PickersDay.js +0 -2
- package/legacy/Rating/Rating.js +1 -2
- package/legacy/Skeleton/Skeleton.js +1 -2
- package/legacy/SpeedDial/SpeedDial.js +1 -2
- package/legacy/SpeedDialAction/SpeedDialAction.js +1 -2
- package/legacy/SpeedDialIcon/SpeedDialIcon.js +1 -2
- package/legacy/StaticDatePicker/StaticDatePicker.js +0 -2
- package/legacy/StaticDateRangePicker/StaticDateRangePicker.js +0 -2
- package/legacy/StaticDateTimePicker/StaticDateTimePicker.js +0 -2
- package/legacy/StaticTimePicker/StaticTimePicker.js +0 -2
- package/legacy/TabContext/TabContext.js +6 -18
- package/legacy/TabList/TabList.js +2 -9
- package/legacy/TabPanel/TabPanel.js +4 -18
- package/legacy/TimePicker/TimePicker.js +0 -2
- package/legacy/Timeline/Timeline.js +9 -20
- package/legacy/Timeline/TimelineContext.js +1 -3
- package/legacy/TimelineConnector/TimelineConnector.js +2 -12
- package/legacy/TimelineContent/TimelineContent.js +4 -16
- package/legacy/TimelineDot/TimelineDot.js +11 -28
- package/legacy/TimelineItem/TimelineItem.js +6 -21
- package/legacy/TimelineOppositeContent/TimelineOppositeContent.js +4 -16
- package/legacy/TimelineSeparator/TimelineSeparator.js +2 -12
- package/legacy/ToggleButton/ToggleButton.js +1 -2
- package/legacy/ToggleButtonGroup/ToggleButtonGroup.js +1 -2
- package/legacy/TreeItem/TreeItem.js +37 -81
- package/legacy/TreeItem/TreeItemContent.js +17 -34
- package/legacy/TreeItem/useTreeItem.js +12 -19
- package/legacy/TreeView/TreeView.js +85 -238
- package/legacy/TreeView/TreeViewContext.js +1 -3
- package/legacy/TreeView/descendants.js +26 -44
- package/legacy/YearPicker/YearPicker.js +1 -3
- package/legacy/index.js +3 -2
- package/legacy/internal/svg-icons/ArrowDropDown.js +1 -1
- package/legacy/internal/svg-icons/ArrowLeft.js +1 -1
- package/legacy/internal/svg-icons/ArrowRight.js +1 -1
- package/legacy/internal/svg-icons/Calendar.js +1 -1
- package/legacy/internal/svg-icons/Clock.js +1 -1
- package/legacy/internal/svg-icons/DateRange.js +1 -1
- package/legacy/internal/svg-icons/Pen.js +1 -1
- package/legacy/internal/svg-icons/Time.js +1 -1
- package/modern/AdapterDateFns/AdapterDateFns.js +2 -4
- package/modern/AdapterDayjs/AdapterDayjs.js +2 -4
- package/modern/AdapterLuxon/AdapterLuxon.js +2 -4
- package/modern/AdapterMoment/AdapterMoment.js +2 -4
- package/modern/Alert/Alert.js +1 -2
- package/modern/AlertTitle/AlertTitle.js +1 -2
- package/modern/Autocomplete/Autocomplete.js +1 -2
- package/modern/AvatarGroup/AvatarGroup.js +1 -2
- package/modern/CalendarPicker/CalendarPicker.js +0 -2
- package/modern/CalendarPickerSkeleton/CalendarPickerSkeleton.js +0 -2
- package/modern/ClockPicker/ClockPicker.js +0 -2
- package/modern/DatePicker/DatePicker.js +0 -2
- package/modern/DateRangePicker/DateRangePicker.js +0 -2
- package/modern/DateRangePickerDay/DateRangePickerDay.js +0 -2
- package/modern/DateTimePicker/DateTimePicker.js +0 -2
- package/modern/DesktopDatePicker/DesktopDatePicker.js +0 -2
- package/modern/DesktopDateRangePicker/DesktopDateRangePicker.js +0 -2
- package/modern/DesktopDateTimePicker/DesktopDateTimePicker.js +0 -2
- package/modern/DesktopTimePicker/DesktopTimePicker.js +0 -2
- package/modern/LoadingButton/LoadingButton.js +13 -35
- package/modern/LocalizationProvider/LocalizationProvider.js +0 -2
- package/modern/Masonry/Masonry.js +27 -68
- package/modern/MobileDatePicker/MobileDatePicker.js +0 -2
- package/modern/MobileDateRangePicker/MobileDateRangePicker.js +0 -2
- package/modern/MobileDateTimePicker/MobileDateTimePicker.js +0 -2
- package/modern/MobileTimePicker/MobileTimePicker.js +0 -2
- package/modern/MonthPicker/MonthPicker.js +0 -2
- package/modern/Pagination/Pagination.js +1 -2
- package/modern/PaginationItem/PaginationItem.js +1 -2
- package/modern/PickersDay/PickersDay.js +0 -2
- package/modern/Rating/Rating.js +1 -2
- package/modern/Skeleton/Skeleton.js +1 -2
- package/modern/SpeedDial/SpeedDial.js +1 -2
- package/modern/SpeedDialAction/SpeedDialAction.js +1 -2
- package/modern/SpeedDialIcon/SpeedDialIcon.js +1 -2
- package/modern/StaticDatePicker/StaticDatePicker.js +0 -2
- package/modern/StaticDateRangePicker/StaticDateRangePicker.js +0 -2
- package/modern/StaticDateTimePicker/StaticDateTimePicker.js +0 -2
- package/modern/StaticTimePicker/StaticTimePicker.js +0 -2
- package/modern/TabContext/TabContext.js +3 -14
- package/modern/TabList/TabList.js +4 -11
- package/modern/TabPanel/TabPanel.js +6 -20
- package/modern/TimePicker/TimePicker.js +0 -2
- package/modern/Timeline/Timeline.js +9 -20
- package/modern/Timeline/TimelineContext.js +1 -3
- package/modern/TimelineConnector/TimelineConnector.js +4 -14
- package/modern/TimelineContent/TimelineContent.js +4 -16
- package/modern/TimelineDot/TimelineDot.js +8 -25
- package/modern/TimelineItem/TimelineItem.js +5 -18
- package/modern/TimelineOppositeContent/TimelineOppositeContent.js +4 -16
- package/modern/TimelineSeparator/TimelineSeparator.js +4 -14
- package/modern/ToggleButton/ToggleButton.js +1 -2
- package/modern/ToggleButtonGroup/ToggleButtonGroup.js +1 -2
- package/modern/TreeItem/TreeItem.js +19 -58
- package/modern/TreeItem/TreeItemContent.js +12 -28
- package/modern/TreeItem/useTreeItem.js +2 -8
- package/modern/TreeView/TreeView.js +53 -197
- package/modern/TreeView/TreeViewContext.js +1 -3
- package/modern/TreeView/descendants.js +19 -31
- package/modern/YearPicker/YearPicker.js +1 -3
- package/modern/index.js +3 -2
- package/modern/internal/svg-icons/ArrowDropDown.js +1 -1
- package/modern/internal/svg-icons/ArrowLeft.js +1 -1
- package/modern/internal/svg-icons/ArrowRight.js +1 -1
- package/modern/internal/svg-icons/Calendar.js +1 -1
- package/modern/internal/svg-icons/Clock.js +1 -1
- package/modern/internal/svg-icons/DateRange.js +1 -1
- package/modern/internal/svg-icons/Pen.js +1 -1
- package/modern/internal/svg-icons/Time.js +1 -1
- package/node/AdapterDateFns/AdapterDateFns.js +2 -5
- package/node/AdapterDateFns/index.js +0 -2
- package/node/AdapterDayjs/AdapterDayjs.js +2 -5
- package/node/AdapterDayjs/index.js +0 -2
- package/node/AdapterLuxon/AdapterLuxon.js +2 -5
- package/node/AdapterLuxon/index.js +0 -2
- package/node/AdapterMoment/AdapterMoment.js +2 -5
- package/node/AdapterMoment/index.js +0 -2
- package/node/Alert/Alert.js +1 -11
- package/node/Alert/index.js +0 -2
- package/node/AlertTitle/AlertTitle.js +1 -11
- package/node/AlertTitle/index.js +0 -2
- package/node/Autocomplete/Autocomplete.js +1 -11
- package/node/Autocomplete/index.js +0 -2
- package/node/AvatarGroup/AvatarGroup.js +1 -11
- package/node/AvatarGroup/index.js +0 -2
- package/node/CalendarPicker/CalendarPicker.js +1 -6
- package/node/CalendarPicker/index.js +0 -4
- package/node/CalendarPickerSkeleton/CalendarPickerSkeleton.js +1 -8
- package/node/CalendarPickerSkeleton/index.js +0 -4
- package/node/ClockPicker/ClockPicker.js +1 -6
- package/node/ClockPicker/index.js +0 -4
- package/node/DatePicker/DatePicker.js +1 -6
- package/node/DatePicker/index.js +0 -4
- package/node/DateRangePicker/DateRangePicker.js +1 -6
- package/node/DateRangePicker/index.js +0 -4
- package/node/DateRangePickerDay/DateRangePickerDay.js +1 -8
- package/node/DateRangePickerDay/index.js +0 -4
- package/node/DateTimePicker/DateTimePicker.js +1 -6
- package/node/DateTimePicker/index.js +0 -4
- package/node/DesktopDatePicker/DesktopDatePicker.js +1 -6
- package/node/DesktopDatePicker/index.js +0 -4
- package/node/DesktopDateRangePicker/DesktopDateRangePicker.js +1 -6
- package/node/DesktopDateRangePicker/index.js +0 -4
- package/node/DesktopDateTimePicker/DesktopDateTimePicker.js +1 -6
- package/node/DesktopDateTimePicker/index.js +0 -4
- package/node/DesktopTimePicker/DesktopTimePicker.js +1 -6
- package/node/DesktopTimePicker/index.js +0 -4
- package/node/LoadingButton/LoadingButton.js +13 -46
- package/node/LoadingButton/index.js +0 -6
- package/node/LoadingButton/loadingButtonClasses.js +0 -5
- package/node/LocalizationProvider/LocalizationProvider.js +0 -6
- package/node/LocalizationProvider/index.js +0 -4
- package/node/Masonry/Masonry.js +27 -83
- package/node/Masonry/index.js +0 -6
- package/node/Masonry/masonryClasses.js +0 -5
- package/node/MobileDatePicker/MobileDatePicker.js +1 -6
- package/node/MobileDatePicker/index.js +0 -4
- package/node/MobileDateRangePicker/MobileDateRangePicker.js +1 -6
- package/node/MobileDateRangePicker/index.js +0 -4
- package/node/MobileDateTimePicker/MobileDateTimePicker.js +1 -6
- package/node/MobileDateTimePicker/index.js +0 -4
- package/node/MobileTimePicker/MobileTimePicker.js +1 -6
- package/node/MobileTimePicker/index.js +0 -4
- package/node/MonthPicker/MonthPicker.js +1 -8
- package/node/MonthPicker/index.js +0 -4
- package/node/Pagination/Pagination.js +1 -11
- package/node/Pagination/index.js +0 -3
- package/node/Pagination/usePagination.js +0 -2
- package/node/PaginationItem/PaginationItem.js +1 -11
- package/node/PaginationItem/index.js +0 -2
- package/node/PickersDay/PickersDay.js +1 -8
- package/node/PickersDay/index.js +0 -4
- package/node/Rating/Rating.js +1 -11
- package/node/Rating/index.js +0 -2
- package/node/Skeleton/Skeleton.js +1 -11
- package/node/Skeleton/index.js +0 -2
- package/node/SpeedDial/SpeedDial.js +1 -11
- package/node/SpeedDial/index.js +0 -2
- package/node/SpeedDialAction/SpeedDialAction.js +1 -11
- package/node/SpeedDialAction/index.js +0 -2
- package/node/SpeedDialIcon/SpeedDialIcon.js +1 -11
- package/node/SpeedDialIcon/index.js +0 -2
- package/node/StaticDatePicker/StaticDatePicker.js +1 -6
- package/node/StaticDatePicker/index.js +0 -4
- package/node/StaticDateRangePicker/StaticDateRangePicker.js +1 -6
- package/node/StaticDateRangePicker/index.js +0 -4
- package/node/StaticDateTimePicker/StaticDateTimePicker.js +1 -6
- package/node/StaticDateTimePicker/index.js +0 -4
- package/node/StaticTimePicker/StaticTimePicker.js +1 -6
- package/node/StaticTimePicker/index.js +0 -4
- package/node/TabContext/TabContext.js +2 -23
- package/node/TabContext/index.js +0 -4
- package/node/TabList/TabList.js +4 -22
- package/node/TabList/index.js +0 -2
- package/node/TabPanel/TabPanel.js +6 -31
- package/node/TabPanel/index.js +0 -6
- package/node/TabPanel/tabPanelClasses.js +0 -5
- package/node/TimePicker/TimePicker.js +1 -6
- package/node/TimePicker/index.js +0 -4
- package/node/Timeline/Timeline.js +9 -32
- package/node/Timeline/TimelineContext.js +0 -6
- package/node/Timeline/index.js +0 -6
- package/node/Timeline/timelineClasses.js +0 -5
- package/node/TimelineConnector/TimelineConnector.js +4 -25
- package/node/TimelineConnector/index.js +0 -6
- package/node/TimelineConnector/timelineConnectorClasses.js +0 -5
- package/node/TimelineContent/TimelineContent.js +4 -28
- package/node/TimelineContent/index.js +0 -6
- package/node/TimelineContent/timelineContentClasses.js +0 -5
- package/node/TimelineDot/TimelineDot.js +8 -36
- package/node/TimelineDot/index.js +0 -6
- package/node/TimelineDot/timelineDotClasses.js +0 -5
- package/node/TimelineItem/TimelineItem.js +5 -31
- package/node/TimelineItem/index.js +0 -6
- package/node/TimelineItem/timelineItemClasses.js +0 -5
- package/node/TimelineOppositeContent/TimelineOppositeContent.js +4 -28
- package/node/TimelineOppositeContent/index.js +0 -6
- package/node/TimelineOppositeContent/timelineOppositeContentClasses.js +0 -5
- package/node/TimelineSeparator/TimelineSeparator.js +4 -25
- package/node/TimelineSeparator/index.js +0 -6
- package/node/TimelineSeparator/timelineSeparatorClasses.js +0 -5
- package/node/ToggleButton/ToggleButton.js +1 -11
- package/node/ToggleButton/index.js +0 -2
- package/node/ToggleButtonGroup/ToggleButtonGroup.js +1 -11
- package/node/ToggleButtonGroup/index.js +0 -2
- package/node/TreeItem/TreeItem.js +19 -73
- package/node/TreeItem/TreeItemContent.js +11 -38
- package/node/TreeItem/index.js +0 -7
- package/node/TreeItem/treeItemClasses.js +0 -5
- package/node/TreeItem/useTreeItem.js +2 -14
- package/node/TreeView/TreeView.js +53 -207
- package/node/TreeView/TreeViewContext.js +0 -6
- package/node/TreeView/descendants.js +18 -40
- package/node/TreeView/index.js +0 -6
- package/node/TreeView/treeViewClasses.js +0 -5
- package/node/YearPicker/YearPicker.js +1 -6
- package/node/YearPicker/index.js +0 -4
- package/node/index.js +1 -107
- package/node/internal/svg-icons/ArrowDropDown.js +0 -7
- package/node/internal/svg-icons/ArrowLeft.js +0 -7
- package/node/internal/svg-icons/ArrowRight.js +0 -7
- package/node/internal/svg-icons/Calendar.js +0 -7
- package/node/internal/svg-icons/Clock.js +0 -7
- package/node/internal/svg-icons/DateRange.js +0 -7
- package/node/internal/svg-icons/Pen.js +0 -7
- package/node/internal/svg-icons/Time.js +0 -7
- package/node/useAutocomplete/index.js +0 -1
- package/package.json +6 -6
|
@@ -8,17 +8,15 @@ import { capitalize } from '@mui/material/utils';
|
|
|
8
8
|
import { unstable_composeClasses as composeClasses } from '@mui/base';
|
|
9
9
|
import { getTimelineDotUtilityClass } from './timelineDotClasses';
|
|
10
10
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
11
|
-
|
|
12
11
|
var useUtilityClasses = function useUtilityClasses(ownerState) {
|
|
13
12
|
var color = ownerState.color,
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
variant = ownerState.variant,
|
|
14
|
+
classes = ownerState.classes;
|
|
16
15
|
var slots = {
|
|
17
16
|
root: ['root', variant, color !== 'inherit' && "".concat(variant).concat(capitalize(color))]
|
|
18
17
|
};
|
|
19
18
|
return composeClasses(slots, getTimelineDotUtilityClass, classes);
|
|
20
19
|
};
|
|
21
|
-
|
|
22
20
|
var TimelineDotRoot = styled('span', {
|
|
23
21
|
name: 'MuiTimelineDot',
|
|
24
22
|
slot: 'Root',
|
|
@@ -28,7 +26,7 @@ var TimelineDotRoot = styled('span', {
|
|
|
28
26
|
}
|
|
29
27
|
})(function (_ref) {
|
|
30
28
|
var ownerState = _ref.ownerState,
|
|
31
|
-
|
|
29
|
+
theme = _ref.theme;
|
|
32
30
|
return _extends({
|
|
33
31
|
display: 'flex',
|
|
34
32
|
alignSelf: 'baseline',
|
|
@@ -60,19 +58,16 @@ var TimelineDot = /*#__PURE__*/React.forwardRef(function TimelineDot(inProps, re
|
|
|
60
58
|
props: inProps,
|
|
61
59
|
name: 'MuiTimelineDot'
|
|
62
60
|
});
|
|
63
|
-
|
|
64
61
|
var className = props.className,
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
62
|
+
_props$color = props.color,
|
|
63
|
+
color = _props$color === void 0 ? 'grey' : _props$color,
|
|
64
|
+
_props$variant = props.variant,
|
|
65
|
+
variant = _props$variant === void 0 ? 'filled' : _props$variant,
|
|
66
|
+
other = _objectWithoutProperties(props, ["className", "color", "variant"]);
|
|
71
67
|
var ownerState = _extends({}, props, {
|
|
72
68
|
color: color,
|
|
73
69
|
variant: variant
|
|
74
70
|
});
|
|
75
|
-
|
|
76
71
|
var classes = useUtilityClasses(ownerState);
|
|
77
72
|
return /*#__PURE__*/_jsx(TimelineDotRoot, _extends({
|
|
78
73
|
className: clsx(classes.root, className),
|
|
@@ -80,48 +75,36 @@ var TimelineDot = /*#__PURE__*/React.forwardRef(function TimelineDot(inProps, re
|
|
|
80
75
|
ref: ref
|
|
81
76
|
}, other));
|
|
82
77
|
});
|
|
83
|
-
process.env.NODE_ENV !== "production" ? TimelineDot.propTypes
|
|
84
|
-
/* remove-proptypes */
|
|
85
|
-
= {
|
|
78
|
+
process.env.NODE_ENV !== "production" ? TimelineDot.propTypes /* remove-proptypes */ = {
|
|
86
79
|
// ----------------------------- Warning --------------------------------
|
|
87
80
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
88
81
|
// | To update them edit the d.ts file and run "yarn proptypes" |
|
|
89
82
|
// ----------------------------------------------------------------------
|
|
90
|
-
|
|
91
83
|
/**
|
|
92
84
|
* The content of the component.
|
|
93
85
|
*/
|
|
94
86
|
children: PropTypes.node,
|
|
95
|
-
|
|
96
87
|
/**
|
|
97
88
|
* Override or extend the styles applied to the component.
|
|
98
89
|
*/
|
|
99
90
|
classes: PropTypes.object,
|
|
100
|
-
|
|
101
91
|
/**
|
|
102
92
|
* @ignore
|
|
103
93
|
*/
|
|
104
94
|
className: PropTypes.string,
|
|
105
|
-
|
|
106
95
|
/**
|
|
107
96
|
* The dot can have a different colors.
|
|
108
97
|
* @default 'grey'
|
|
109
98
|
*/
|
|
110
|
-
color: PropTypes
|
|
111
|
-
/* @typescript-to-proptypes-ignore */
|
|
112
|
-
.oneOfType([PropTypes.oneOf(['error', 'grey', 'info', 'inherit', 'primary', 'secondary', 'success', 'warning']), PropTypes.string]),
|
|
113
|
-
|
|
99
|
+
color: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['error', 'grey', 'info', 'inherit', 'primary', 'secondary', 'success', 'warning']), PropTypes.string]),
|
|
114
100
|
/**
|
|
115
101
|
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
116
102
|
*/
|
|
117
103
|
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
118
|
-
|
|
119
104
|
/**
|
|
120
105
|
* The dot can appear filled or outlined.
|
|
121
106
|
* @default 'filled'
|
|
122
107
|
*/
|
|
123
|
-
variant: PropTypes
|
|
124
|
-
/* @typescript-to-proptypes-ignore */
|
|
125
|
-
.oneOfType([PropTypes.oneOf(['filled', 'outlined']), PropTypes.string])
|
|
108
|
+
variant: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['filled', 'outlined']), PropTypes.string])
|
|
126
109
|
} : void 0;
|
|
127
110
|
export default TimelineDot;
|
|
@@ -12,17 +12,15 @@ import { timelineOppositeContentClasses } from '../TimelineOppositeContent';
|
|
|
12
12
|
import TimelineContext from '../Timeline/TimelineContext';
|
|
13
13
|
import { getTimelineItemUtilityClass } from './timelineItemClasses';
|
|
14
14
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
15
|
-
|
|
16
15
|
var useUtilityClasses = function useUtilityClasses(ownerState) {
|
|
17
16
|
var position = ownerState.position,
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
classes = ownerState.classes,
|
|
18
|
+
hasOppositeContent = ownerState.hasOppositeContent;
|
|
20
19
|
var slots = {
|
|
21
20
|
root: ['root', "position".concat(capitalize(position)), !hasOppositeContent && 'missingOppositeContent']
|
|
22
21
|
};
|
|
23
22
|
return composeClasses(slots, getTimelineItemUtilityClass, classes);
|
|
24
23
|
};
|
|
25
|
-
|
|
26
24
|
var TimelineItemRoot = styled('li', {
|
|
27
25
|
name: 'MuiTimelineItem',
|
|
28
26
|
slot: 'Root',
|
|
@@ -32,7 +30,6 @@ var TimelineItemRoot = styled('li', {
|
|
|
32
30
|
}
|
|
33
31
|
})(function (_ref) {
|
|
34
32
|
var _nthOfTypeEven;
|
|
35
|
-
|
|
36
33
|
var ownerState = _ref.ownerState;
|
|
37
34
|
return _extends({
|
|
38
35
|
listStyle: 'none',
|
|
@@ -62,26 +59,21 @@ var TimelineItem = /*#__PURE__*/React.forwardRef(function TimelineItem(inProps,
|
|
|
62
59
|
props: inProps,
|
|
63
60
|
name: 'MuiTimelineItem'
|
|
64
61
|
});
|
|
65
|
-
|
|
66
62
|
var positionProp = props.position,
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
63
|
+
className = props.className,
|
|
64
|
+
other = _objectWithoutProperties(props, ["position", "className"]);
|
|
70
65
|
var _React$useContext = React.useContext(TimelineContext),
|
|
71
|
-
|
|
72
|
-
|
|
66
|
+
positionContext = _React$useContext.position;
|
|
73
67
|
var hasOppositeContent = false;
|
|
74
68
|
React.Children.forEach(props.children, function (child) {
|
|
75
69
|
if (isMuiElement(child, ['TimelineOppositeContent'])) {
|
|
76
70
|
hasOppositeContent = true;
|
|
77
71
|
}
|
|
78
72
|
});
|
|
79
|
-
|
|
80
73
|
var ownerState = _extends({}, props, {
|
|
81
74
|
position: positionProp || positionContext || 'right',
|
|
82
75
|
hasOppositeContent: hasOppositeContent
|
|
83
76
|
});
|
|
84
|
-
|
|
85
77
|
var classes = useUtilityClasses(ownerState);
|
|
86
78
|
var contextValue = React.useMemo(function () {
|
|
87
79
|
return {
|
|
@@ -97,34 +89,27 @@ var TimelineItem = /*#__PURE__*/React.forwardRef(function TimelineItem(inProps,
|
|
|
97
89
|
}, other))
|
|
98
90
|
});
|
|
99
91
|
});
|
|
100
|
-
process.env.NODE_ENV !== "production" ? TimelineItem.propTypes
|
|
101
|
-
/* remove-proptypes */
|
|
102
|
-
= {
|
|
92
|
+
process.env.NODE_ENV !== "production" ? TimelineItem.propTypes /* remove-proptypes */ = {
|
|
103
93
|
// ----------------------------- Warning --------------------------------
|
|
104
94
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
105
95
|
// | To update them edit the d.ts file and run "yarn proptypes" |
|
|
106
96
|
// ----------------------------------------------------------------------
|
|
107
|
-
|
|
108
97
|
/**
|
|
109
98
|
* The content of the component.
|
|
110
99
|
*/
|
|
111
100
|
children: PropTypes.node,
|
|
112
|
-
|
|
113
101
|
/**
|
|
114
102
|
* Override or extend the styles applied to the component.
|
|
115
103
|
*/
|
|
116
104
|
classes: PropTypes.object,
|
|
117
|
-
|
|
118
105
|
/**
|
|
119
106
|
* @ignore
|
|
120
107
|
*/
|
|
121
108
|
className: PropTypes.string,
|
|
122
|
-
|
|
123
109
|
/**
|
|
124
110
|
* The position where the timeline's item should appear.
|
|
125
111
|
*/
|
|
126
112
|
position: PropTypes.oneOf(['left', 'right']),
|
|
127
|
-
|
|
128
113
|
/**
|
|
129
114
|
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
130
115
|
*/
|
|
@@ -10,16 +10,14 @@ import Typography from '@mui/material/Typography';
|
|
|
10
10
|
import TimelineContext from '../Timeline/TimelineContext';
|
|
11
11
|
import { getTimelineOppositeContentUtilityClass } from './timelineOppositeContentClasses';
|
|
12
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
-
|
|
14
13
|
var useUtilityClasses = function useUtilityClasses(ownerState) {
|
|
15
14
|
var position = ownerState.position,
|
|
16
|
-
|
|
15
|
+
classes = ownerState.classes;
|
|
17
16
|
var slots = {
|
|
18
17
|
root: ['root', "position".concat(capitalize(position))]
|
|
19
18
|
};
|
|
20
19
|
return composeClasses(slots, getTimelineOppositeContentUtilityClass, classes);
|
|
21
20
|
};
|
|
22
|
-
|
|
23
21
|
var TimelineOppositeContentRoot = styled(Typography, {
|
|
24
22
|
name: 'MuiTimelineOppositeContent',
|
|
25
23
|
slot: 'Root',
|
|
@@ -43,17 +41,13 @@ var TimelineOppositeContent = /*#__PURE__*/React.forwardRef(function TimelineOpp
|
|
|
43
41
|
props: inProps,
|
|
44
42
|
name: 'MuiTimelineOppositeContent'
|
|
45
43
|
});
|
|
46
|
-
|
|
47
44
|
var className = props.className,
|
|
48
|
-
|
|
49
|
-
|
|
45
|
+
other = _objectWithoutProperties(props, ["className"]);
|
|
50
46
|
var _React$useContext = React.useContext(TimelineContext),
|
|
51
|
-
|
|
52
|
-
|
|
47
|
+
positionContext = _React$useContext.position;
|
|
53
48
|
var ownerState = _extends({}, props, {
|
|
54
49
|
position: positionContext || 'left'
|
|
55
50
|
});
|
|
56
|
-
|
|
57
51
|
var classes = useUtilityClasses(ownerState);
|
|
58
52
|
return /*#__PURE__*/_jsx(TimelineOppositeContentRoot, _extends({
|
|
59
53
|
component: "div",
|
|
@@ -62,29 +56,23 @@ var TimelineOppositeContent = /*#__PURE__*/React.forwardRef(function TimelineOpp
|
|
|
62
56
|
ref: ref
|
|
63
57
|
}, other));
|
|
64
58
|
});
|
|
65
|
-
process.env.NODE_ENV !== "production" ? TimelineOppositeContent.propTypes
|
|
66
|
-
/* remove-proptypes */
|
|
67
|
-
= {
|
|
59
|
+
process.env.NODE_ENV !== "production" ? TimelineOppositeContent.propTypes /* remove-proptypes */ = {
|
|
68
60
|
// ----------------------------- Warning --------------------------------
|
|
69
61
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
70
62
|
// | To update them edit the d.ts file and run "yarn proptypes" |
|
|
71
63
|
// ----------------------------------------------------------------------
|
|
72
|
-
|
|
73
64
|
/**
|
|
74
65
|
* The content of the component.
|
|
75
66
|
*/
|
|
76
67
|
children: PropTypes.node,
|
|
77
|
-
|
|
78
68
|
/**
|
|
79
69
|
* Override or extend the styles applied to the component.
|
|
80
70
|
*/
|
|
81
71
|
classes: PropTypes.object,
|
|
82
|
-
|
|
83
72
|
/**
|
|
84
73
|
* @ignore
|
|
85
74
|
*/
|
|
86
75
|
className: PropTypes.string,
|
|
87
|
-
|
|
88
76
|
/**
|
|
89
77
|
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
90
78
|
*/
|
|
@@ -7,7 +7,6 @@ import { unstable_composeClasses as composeClasses } from '@mui/base';
|
|
|
7
7
|
import { styled, useThemeProps } from '@mui/material/styles';
|
|
8
8
|
import { getTimelineSeparatorUtilityClass } from './timelineSeparatorClasses';
|
|
9
9
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
10
|
-
|
|
11
10
|
var useUtilityClasses = function useUtilityClasses(ownerState) {
|
|
12
11
|
var classes = ownerState.classes;
|
|
13
12
|
var slots = {
|
|
@@ -15,7 +14,6 @@ var useUtilityClasses = function useUtilityClasses(ownerState) {
|
|
|
15
14
|
};
|
|
16
15
|
return composeClasses(slots, getTimelineSeparatorUtilityClass, classes);
|
|
17
16
|
};
|
|
18
|
-
|
|
19
17
|
var TimelineSeparatorRoot = styled('div', {
|
|
20
18
|
name: 'MuiTimelineSeparator',
|
|
21
19
|
slot: 'Root',
|
|
@@ -33,10 +31,8 @@ var TimelineSeparator = /*#__PURE__*/React.forwardRef(function TimelineSeparator
|
|
|
33
31
|
props: inProps,
|
|
34
32
|
name: 'MuiTimelineSeparator'
|
|
35
33
|
});
|
|
36
|
-
|
|
37
34
|
var className = props.className,
|
|
38
|
-
|
|
39
|
-
|
|
35
|
+
other = _objectWithoutProperties(props, ["className"]);
|
|
40
36
|
var ownerState = props;
|
|
41
37
|
var classes = useUtilityClasses(ownerState);
|
|
42
38
|
return /*#__PURE__*/_jsx(TimelineSeparatorRoot, _extends({
|
|
@@ -45,29 +41,23 @@ var TimelineSeparator = /*#__PURE__*/React.forwardRef(function TimelineSeparator
|
|
|
45
41
|
ref: ref
|
|
46
42
|
}, other));
|
|
47
43
|
});
|
|
48
|
-
process.env.NODE_ENV !== "production" ? TimelineSeparator.propTypes
|
|
49
|
-
/* remove-proptypes */
|
|
50
|
-
= {
|
|
44
|
+
process.env.NODE_ENV !== "production" ? TimelineSeparator.propTypes /* remove-proptypes */ = {
|
|
51
45
|
// ----------------------------- Warning --------------------------------
|
|
52
46
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
53
47
|
// | To update them edit the d.ts file and run "yarn proptypes" |
|
|
54
48
|
// ----------------------------------------------------------------------
|
|
55
|
-
|
|
56
49
|
/**
|
|
57
50
|
* The content of the component.
|
|
58
51
|
*/
|
|
59
52
|
children: PropTypes.node,
|
|
60
|
-
|
|
61
53
|
/**
|
|
62
54
|
* Override or extend the styles applied to the component.
|
|
63
55
|
*/
|
|
64
56
|
classes: PropTypes.object,
|
|
65
|
-
|
|
66
57
|
/**
|
|
67
58
|
* @ignore
|
|
68
59
|
*/
|
|
69
60
|
className: PropTypes.string,
|
|
70
|
-
|
|
71
61
|
/**
|
|
72
62
|
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
73
63
|
*/
|
|
@@ -3,16 +3,15 @@ import * as React from 'react';
|
|
|
3
3
|
import ToggleButton from '@mui/material/ToggleButton';
|
|
4
4
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
5
|
var warnedOnce = false;
|
|
6
|
+
|
|
6
7
|
/**
|
|
7
8
|
* @ignore - do not document.
|
|
8
9
|
*/
|
|
9
|
-
|
|
10
10
|
export default /*#__PURE__*/React.forwardRef(function DeprecatedToggleButton(props, ref) {
|
|
11
11
|
if (!warnedOnce) {
|
|
12
12
|
console.warn(['MUI: The ToggleButton component was moved from the lab to the core.', '', "You should use `import { ToggleButton } from '@mui/material'`", "or `import ToggleButton from '@mui/material/ToggleButton'`"].join('\n'));
|
|
13
13
|
warnedOnce = true;
|
|
14
14
|
}
|
|
15
|
-
|
|
16
15
|
return /*#__PURE__*/_jsx(ToggleButton, _extends({
|
|
17
16
|
ref: ref
|
|
18
17
|
}, props));
|
|
@@ -3,16 +3,15 @@ import * as React from 'react';
|
|
|
3
3
|
import ToggleButtonGroup from '@mui/material/ToggleButtonGroup';
|
|
4
4
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
5
|
var warnedOnce = false;
|
|
6
|
+
|
|
6
7
|
/**
|
|
7
8
|
* @ignore - do not document.
|
|
8
9
|
*/
|
|
9
|
-
|
|
10
10
|
export default /*#__PURE__*/React.forwardRef(function DeprecatedToggleButtonGroup(props, ref) {
|
|
11
11
|
if (!warnedOnce) {
|
|
12
12
|
console.warn(['MUI: The ToggleButtonGroup component was moved from the lab to the core.', '', "You should use `import { ToggleButtonGroup } from '@mui/material'`", "or `import ToggleButtonGroup from '@mui/material/ToggleButtonGroup'`"].join('\n'));
|
|
13
13
|
warnedOnce = true;
|
|
14
14
|
}
|
|
15
|
-
|
|
16
15
|
return /*#__PURE__*/_jsx(ToggleButtonGroup, _extends({
|
|
17
16
|
ref: ref
|
|
18
17
|
}, props));
|
|
@@ -15,7 +15,6 @@ import TreeItemContent from './TreeItemContent';
|
|
|
15
15
|
import treeItemClasses, { getTreeItemUtilityClass } from './treeItemClasses';
|
|
16
16
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
17
17
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
18
|
-
|
|
19
18
|
var useUtilityClasses = function useUtilityClasses(ownerState) {
|
|
20
19
|
var classes = ownerState.classes;
|
|
21
20
|
var slots = {
|
|
@@ -31,7 +30,6 @@ var useUtilityClasses = function useUtilityClasses(ownerState) {
|
|
|
31
30
|
};
|
|
32
31
|
return composeClasses(slots, getTreeItemUtilityClass, classes);
|
|
33
32
|
};
|
|
34
|
-
|
|
35
33
|
var TreeItemRoot = styled('li', {
|
|
36
34
|
name: 'MuiTreeItem',
|
|
37
35
|
slot: 'Root',
|
|
@@ -52,7 +50,6 @@ var StyledTreeItemContent = styled(TreeItemContent, {
|
|
|
52
50
|
}
|
|
53
51
|
})(function (_ref3) {
|
|
54
52
|
var _ref4;
|
|
55
|
-
|
|
56
53
|
var theme = _ref3.theme;
|
|
57
54
|
return _ref4 = {
|
|
58
55
|
padding: '0 8px',
|
|
@@ -117,55 +114,49 @@ var TreeItem = /*#__PURE__*/React.forwardRef(function TreeItem(inProps, ref) {
|
|
|
117
114
|
props: inProps,
|
|
118
115
|
name: 'MuiTreeItem'
|
|
119
116
|
});
|
|
120
|
-
|
|
121
117
|
var children = props.children,
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
118
|
+
className = props.className,
|
|
119
|
+
collapseIcon = props.collapseIcon,
|
|
120
|
+
_props$ContentCompone = props.ContentComponent,
|
|
121
|
+
ContentComponent = _props$ContentCompone === void 0 ? TreeItemContent : _props$ContentCompone,
|
|
122
|
+
ContentProps = props.ContentProps,
|
|
123
|
+
endIcon = props.endIcon,
|
|
124
|
+
expandIcon = props.expandIcon,
|
|
125
|
+
disabledProp = props.disabled,
|
|
126
|
+
icon = props.icon,
|
|
127
|
+
idProp = props.id,
|
|
128
|
+
label = props.label,
|
|
129
|
+
nodeId = props.nodeId,
|
|
130
|
+
onClick = props.onClick,
|
|
131
|
+
onMouseDown = props.onMouseDown,
|
|
132
|
+
_props$TransitionComp = props.TransitionComponent,
|
|
133
|
+
TransitionComponent = _props$TransitionComp === void 0 ? Collapse : _props$TransitionComp,
|
|
134
|
+
TransitionProps = props.TransitionProps,
|
|
135
|
+
other = _objectWithoutProperties(props, ["children", "className", "collapseIcon", "ContentComponent", "ContentProps", "endIcon", "expandIcon", "disabled", "icon", "id", "label", "nodeId", "onClick", "onMouseDown", "TransitionComponent", "TransitionProps"]);
|
|
141
136
|
var _React$useContext = React.useContext(TreeViewContext),
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
137
|
+
_React$useContext$ico = _React$useContext.icons,
|
|
138
|
+
contextIcons = _React$useContext$ico === void 0 ? {} : _React$useContext$ico,
|
|
139
|
+
focus = _React$useContext.focus,
|
|
140
|
+
isExpanded = _React$useContext.isExpanded,
|
|
141
|
+
isFocused = _React$useContext.isFocused,
|
|
142
|
+
isSelected = _React$useContext.isSelected,
|
|
143
|
+
isDisabled = _React$useContext.isDisabled,
|
|
144
|
+
multiSelect = _React$useContext.multiSelect,
|
|
145
|
+
disabledItemsFocusable = _React$useContext.disabledItemsFocusable,
|
|
146
|
+
mapFirstChar = _React$useContext.mapFirstChar,
|
|
147
|
+
unMapFirstChar = _React$useContext.unMapFirstChar,
|
|
148
|
+
registerNode = _React$useContext.registerNode,
|
|
149
|
+
unregisterNode = _React$useContext.unregisterNode,
|
|
150
|
+
treeId = _React$useContext.treeId;
|
|
157
151
|
var id = null;
|
|
158
|
-
|
|
159
152
|
if (idProp != null) {
|
|
160
153
|
id = idProp;
|
|
161
154
|
} else if (treeId && nodeId) {
|
|
162
155
|
id = "".concat(treeId, "-").concat(nodeId);
|
|
163
156
|
}
|
|
164
|
-
|
|
165
157
|
var _React$useState = React.useState(null),
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
158
|
+
treeitemElement = _React$useState[0],
|
|
159
|
+
setTreeitemElement = _React$useState[1];
|
|
169
160
|
var contentRef = React.useRef(null);
|
|
170
161
|
var handleRef = useForkRef(setTreeitemElement, ref);
|
|
171
162
|
var descendant = React.useMemo(function () {
|
|
@@ -174,28 +165,23 @@ var TreeItem = /*#__PURE__*/React.forwardRef(function TreeItem(inProps, ref) {
|
|
|
174
165
|
id: nodeId
|
|
175
166
|
};
|
|
176
167
|
}, [nodeId, treeitemElement]);
|
|
177
|
-
|
|
178
168
|
var _useDescendant = useDescendant(descendant),
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
169
|
+
index = _useDescendant.index,
|
|
170
|
+
parentId = _useDescendant.parentId;
|
|
182
171
|
var expandable = Boolean(Array.isArray(children) ? children.length : children);
|
|
183
172
|
var expanded = isExpanded ? isExpanded(nodeId) : false;
|
|
184
173
|
var focused = isFocused ? isFocused(nodeId) : false;
|
|
185
174
|
var selected = isSelected ? isSelected(nodeId) : false;
|
|
186
175
|
var disabled = isDisabled ? isDisabled(nodeId) : false;
|
|
187
|
-
|
|
188
176
|
var ownerState = _extends({}, props, {
|
|
189
177
|
expanded: expanded,
|
|
190
178
|
focused: focused,
|
|
191
179
|
selected: selected,
|
|
192
180
|
disabled: disabled
|
|
193
181
|
});
|
|
194
|
-
|
|
195
182
|
var classes = useUtilityClasses(ownerState);
|
|
196
183
|
var displayIcon;
|
|
197
184
|
var expansionIcon;
|
|
198
|
-
|
|
199
185
|
if (expandable) {
|
|
200
186
|
if (!expanded) {
|
|
201
187
|
expansionIcon = expandIcon || contextIcons.defaultExpandIcon;
|
|
@@ -203,13 +189,11 @@ var TreeItem = /*#__PURE__*/React.forwardRef(function TreeItem(inProps, ref) {
|
|
|
203
189
|
expansionIcon = collapseIcon || contextIcons.defaultCollapseIcon;
|
|
204
190
|
}
|
|
205
191
|
}
|
|
206
|
-
|
|
207
192
|
if (expandable) {
|
|
208
193
|
displayIcon = contextIcons.defaultParentIcon;
|
|
209
194
|
} else {
|
|
210
195
|
displayIcon = endIcon || contextIcons.defaultEndIcon;
|
|
211
196
|
}
|
|
212
|
-
|
|
213
197
|
React.useEffect(function () {
|
|
214
198
|
// On the first render a node's index will be -1. We want to wait for the real index.
|
|
215
199
|
if (registerNode && unregisterNode && index !== -1) {
|
|
@@ -225,7 +209,6 @@ var TreeItem = /*#__PURE__*/React.forwardRef(function TreeItem(inProps, ref) {
|
|
|
225
209
|
unregisterNode(nodeId);
|
|
226
210
|
};
|
|
227
211
|
}
|
|
228
|
-
|
|
229
212
|
return undefined;
|
|
230
213
|
}, [registerNode, unregisterNode, parentId, index, nodeId, expandable, disabledProp, id]);
|
|
231
214
|
React.useEffect(function () {
|
|
@@ -235,11 +218,9 @@ var TreeItem = /*#__PURE__*/React.forwardRef(function TreeItem(inProps, ref) {
|
|
|
235
218
|
unMapFirstChar(nodeId);
|
|
236
219
|
};
|
|
237
220
|
}
|
|
238
|
-
|
|
239
221
|
return undefined;
|
|
240
222
|
}, [mapFirstChar, unMapFirstChar, nodeId, label]);
|
|
241
223
|
var ariaSelected;
|
|
242
|
-
|
|
243
224
|
if (multiSelect) {
|
|
244
225
|
ariaSelected = selected;
|
|
245
226
|
} else if (selected) {
|
|
@@ -251,7 +232,6 @@ var TreeItem = /*#__PURE__*/React.forwardRef(function TreeItem(inProps, ref) {
|
|
|
251
232
|
*/
|
|
252
233
|
ariaSelected = true;
|
|
253
234
|
}
|
|
254
|
-
|
|
255
235
|
function handleFocus(event) {
|
|
256
236
|
// DOM focus stays on the tree which manages focus with aria-activedescendant
|
|
257
237
|
if (event.target === event.currentTarget) {
|
|
@@ -259,14 +239,11 @@ var TreeItem = /*#__PURE__*/React.forwardRef(function TreeItem(inProps, ref) {
|
|
|
259
239
|
preventScroll: true
|
|
260
240
|
});
|
|
261
241
|
}
|
|
262
|
-
|
|
263
242
|
var unfocusable = !disabledItemsFocusable && disabled;
|
|
264
|
-
|
|
265
243
|
if (!focused && event.currentTarget === event.target && !unfocusable) {
|
|
266
244
|
focus(event, nodeId);
|
|
267
245
|
}
|
|
268
246
|
}
|
|
269
|
-
|
|
270
247
|
return /*#__PURE__*/_jsxs(TreeItemRoot, _extends({
|
|
271
248
|
className: clsx(classes.root, className),
|
|
272
249
|
role: "treeitem",
|
|
@@ -314,108 +291,87 @@ var TreeItem = /*#__PURE__*/React.forwardRef(function TreeItem(inProps, ref) {
|
|
|
314
291
|
})]
|
|
315
292
|
}));
|
|
316
293
|
});
|
|
317
|
-
process.env.NODE_ENV !== "production" ? TreeItem.propTypes
|
|
318
|
-
/* remove-proptypes */
|
|
319
|
-
= {
|
|
294
|
+
process.env.NODE_ENV !== "production" ? TreeItem.propTypes /* remove-proptypes */ = {
|
|
320
295
|
// ----------------------------- Warning --------------------------------
|
|
321
296
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
322
297
|
// | To update them edit the d.ts file and run "yarn proptypes" |
|
|
323
298
|
// ----------------------------------------------------------------------
|
|
324
|
-
|
|
325
299
|
/**
|
|
326
300
|
* The content of the component.
|
|
327
301
|
*/
|
|
328
302
|
children: PropTypes.node,
|
|
329
|
-
|
|
330
303
|
/**
|
|
331
304
|
* Override or extend the styles applied to the component.
|
|
332
305
|
*/
|
|
333
306
|
classes: PropTypes.object,
|
|
334
|
-
|
|
335
307
|
/**
|
|
336
308
|
* @ignore
|
|
337
309
|
*/
|
|
338
310
|
className: PropTypes.string,
|
|
339
|
-
|
|
340
311
|
/**
|
|
341
312
|
* The icon used to collapse the node.
|
|
342
313
|
*/
|
|
343
314
|
collapseIcon: PropTypes.node,
|
|
344
|
-
|
|
345
315
|
/**
|
|
346
316
|
* The component used for the content node.
|
|
347
317
|
* @default TreeItemContent
|
|
348
318
|
*/
|
|
349
319
|
ContentComponent: elementTypeAcceptingRef,
|
|
350
|
-
|
|
351
320
|
/**
|
|
352
321
|
* Props applied to ContentComponent
|
|
353
322
|
*/
|
|
354
323
|
ContentProps: PropTypes.object,
|
|
355
|
-
|
|
356
324
|
/**
|
|
357
325
|
* If `true`, the node is disabled.
|
|
358
326
|
*/
|
|
359
327
|
disabled: PropTypes.bool,
|
|
360
|
-
|
|
361
328
|
/**
|
|
362
329
|
* The icon displayed next to a end node.
|
|
363
330
|
*/
|
|
364
331
|
endIcon: PropTypes.node,
|
|
365
|
-
|
|
366
332
|
/**
|
|
367
333
|
* The icon used to expand the node.
|
|
368
334
|
*/
|
|
369
335
|
expandIcon: PropTypes.node,
|
|
370
|
-
|
|
371
336
|
/**
|
|
372
337
|
* The icon to display next to the tree node's label.
|
|
373
338
|
*/
|
|
374
339
|
icon: PropTypes.node,
|
|
375
|
-
|
|
376
340
|
/**
|
|
377
341
|
* @ignore
|
|
378
342
|
*/
|
|
379
343
|
id: PropTypes.string,
|
|
380
|
-
|
|
381
344
|
/**
|
|
382
345
|
* The tree node label.
|
|
383
346
|
*/
|
|
384
347
|
label: PropTypes.node,
|
|
385
|
-
|
|
386
348
|
/**
|
|
387
349
|
* The id of the node.
|
|
388
350
|
*/
|
|
389
351
|
nodeId: PropTypes.string.isRequired,
|
|
390
|
-
|
|
391
352
|
/**
|
|
392
353
|
* @ignore
|
|
393
354
|
*/
|
|
394
355
|
onClick: PropTypes.func,
|
|
395
|
-
|
|
396
356
|
/**
|
|
397
357
|
* This prop isn't supported.
|
|
398
358
|
* Use the `onNodeFocus` callback on the tree if you need to monitor a node's focus.
|
|
399
359
|
*/
|
|
400
360
|
onFocus: unsupportedProp,
|
|
401
|
-
|
|
402
361
|
/**
|
|
403
362
|
* @ignore
|
|
404
363
|
*/
|
|
405
364
|
onMouseDown: PropTypes.func,
|
|
406
|
-
|
|
407
365
|
/**
|
|
408
366
|
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
409
367
|
*/
|
|
410
368
|
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
411
|
-
|
|
412
369
|
/**
|
|
413
370
|
* The component used for the transition.
|
|
414
371
|
* [Follow this guide](/material-ui/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.
|
|
415
372
|
* @default Collapse
|
|
416
373
|
*/
|
|
417
374
|
TransitionComponent: PropTypes.elementType,
|
|
418
|
-
|
|
419
375
|
/**
|
|
420
376
|
* Props applied to the transition element.
|
|
421
377
|
* By default, the element is based on this [`Transition`](http://reactcommunity.org/react-transition-group/transition/) component.
|