@mui/lab 5.0.0-alpha.98 → 6.0.0-alpha.0
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.d.ts +3 -0
- package/AdapterDateFns/AdapterDateFns.js +4 -4
- package/AdapterDayjs/AdapterDayjs.d.ts +3 -0
- package/AdapterDayjs/AdapterDayjs.js +4 -4
- package/AdapterLuxon/AdapterLuxon.d.ts +3 -0
- package/AdapterLuxon/AdapterLuxon.js +4 -4
- package/AdapterMoment/AdapterMoment.d.ts +3 -0
- package/AdapterMoment/AdapterMoment.js +4 -4
- package/Alert/Alert.js +3 -2
- package/AlertTitle/AlertTitle.js +3 -2
- package/Autocomplete/Autocomplete.js +3 -2
- package/AvatarGroup/AvatarGroup.js +3 -2
- package/CHANGELOG.md +5895 -397
- package/CalendarPicker/CalendarPicker.d.ts +6 -5
- package/CalendarPicker/CalendarPicker.js +3 -2
- package/CalendarPickerSkeleton/CalendarPickerSkeleton.d.ts +4 -3
- package/CalendarPickerSkeleton/CalendarPickerSkeleton.js +3 -2
- package/ClockPicker/ClockPicker.d.ts +6 -5
- package/ClockPicker/ClockPicker.js +3 -2
- package/DatePicker/DatePicker.d.ts +2 -2
- package/DatePicker/DatePicker.js +2 -2
- package/DateRangePicker/DateRangePicker.d.ts +4 -3
- package/DateRangePicker/DateRangePicker.js +1 -2
- package/DateRangePickerDay/DateRangePickerDay.d.ts +5 -4
- package/DateRangePickerDay/DateRangePickerDay.js +1 -2
- package/DateTimePicker/DateTimePicker.d.ts +3 -2
- package/DateTimePicker/DateTimePicker.js +3 -2
- package/DesktopDatePicker/DesktopDatePicker.d.ts +3 -2
- package/DesktopDatePicker/DesktopDatePicker.js +3 -2
- package/DesktopDateRangePicker/DesktopDateRangePicker.d.ts +3 -2
- package/DesktopDateRangePicker/DesktopDateRangePicker.js +1 -2
- package/DesktopDateTimePicker/DesktopDateTimePicker.d.ts +3 -2
- package/DesktopDateTimePicker/DesktopDateTimePicker.js +3 -2
- package/DesktopTimePicker/DesktopTimePicker.d.ts +3 -2
- package/DesktopTimePicker/DesktopTimePicker.js +3 -2
- package/LoadingButton/LoadingButton.d.ts +53 -50
- package/LoadingButton/LoadingButton.js +28 -44
- package/LoadingButton/loadingButtonClasses.d.ts +1 -1
- package/LoadingButton/loadingButtonClasses.js +2 -1
- package/LocalizationProvider/LocalizationProvider.d.ts +3 -2
- package/LocalizationProvider/LocalizationProvider.js +3 -2
- package/Masonry/Masonry.d.ts +51 -41
- package/Masonry/Masonry.js +75 -89
- package/Masonry/masonryClasses.d.ts +1 -1
- package/Masonry/masonryClasses.js +2 -1
- package/MobileDatePicker/MobileDatePicker.d.ts +3 -2
- package/MobileDatePicker/MobileDatePicker.js +3 -2
- package/MobileDateRangePicker/MobileDateRangePicker.d.ts +3 -2
- package/MobileDateRangePicker/MobileDateRangePicker.js +1 -2
- package/MobileDateTimePicker/MobileDateTimePicker.d.ts +3 -2
- package/MobileDateTimePicker/MobileDateTimePicker.js +3 -2
- package/MobileTimePicker/MobileTimePicker.d.ts +3 -2
- package/MobileTimePicker/MobileTimePicker.js +3 -2
- package/MonthPicker/MonthPicker.d.ts +4 -3
- package/MonthPicker/MonthPicker.js +3 -2
- package/Pagination/Pagination.js +3 -2
- package/Pagination/usePagination.js +2 -0
- package/PaginationItem/PaginationItem.js +3 -2
- package/PickersDay/PickersDay.d.ts +4 -3
- package/PickersDay/PickersDay.js +3 -2
- package/README.md +5 -13
- package/Rating/Rating.js +3 -2
- package/Skeleton/Skeleton.js +3 -2
- package/SpeedDial/SpeedDial.js +3 -2
- package/SpeedDialAction/SpeedDialAction.js +3 -2
- package/SpeedDialIcon/SpeedDialIcon.js +3 -2
- package/StaticDatePicker/StaticDatePicker.d.ts +3 -2
- package/StaticDatePicker/StaticDatePicker.js +3 -2
- package/StaticDateRangePicker/StaticDateRangePicker.d.ts +3 -2
- package/StaticDateRangePicker/StaticDateRangePicker.js +1 -2
- package/StaticDateTimePicker/StaticDateTimePicker.d.ts +3 -2
- package/StaticDateTimePicker/StaticDateTimePicker.js +3 -2
- package/StaticTimePicker/StaticTimePicker.d.ts +3 -2
- package/StaticTimePicker/StaticTimePicker.js +3 -2
- package/TabContext/TabContext.d.ts +1 -1
- package/TabContext/TabContext.js +10 -19
- package/TabList/TabList.d.ts +14 -12
- package/TabList/TabList.js +10 -15
- package/TabPanel/TabPanel.js +12 -24
- package/TabPanel/tabPanelClasses.d.ts +1 -1
- package/TabPanel/tabPanelClasses.js +2 -1
- package/TimePicker/TimePicker.d.ts +3 -2
- package/TimePicker/TimePicker.js +3 -2
- package/Timeline/Timeline.d.ts +2 -37
- package/Timeline/Timeline.js +23 -31
- package/Timeline/Timeline.types.d.ts +28 -0
- package/Timeline/Timeline.types.js +1 -0
- package/Timeline/TimelineContext.js +1 -3
- package/Timeline/index.d.ts +1 -2
- package/Timeline/index.js +1 -0
- package/Timeline/timelineClasses.d.ts +14 -1
- package/Timeline/timelineClasses.js +3 -2
- package/TimelineConnector/TimelineConnector.js +10 -18
- package/TimelineConnector/timelineConnectorClasses.d.ts +1 -1
- package/TimelineConnector/timelineConnectorClasses.js +2 -1
- package/TimelineContent/TimelineContent.js +13 -23
- package/TimelineContent/timelineContentClasses.d.ts +3 -1
- package/TimelineContent/timelineContentClasses.js +3 -2
- package/TimelineDot/TimelineDot.js +14 -29
- package/TimelineDot/timelineDotClasses.d.ts +1 -1
- package/TimelineDot/timelineDotClasses.js +2 -1
- package/TimelineItem/TimelineItem.d.ts +1 -1
- package/TimelineItem/TimelineItem.js +23 -32
- package/TimelineItem/timelineItemClasses.d.ts +3 -1
- package/TimelineItem/timelineItemClasses.js +3 -2
- package/TimelineOppositeContent/TimelineOppositeContent.js +13 -23
- package/TimelineOppositeContent/timelineOppositeContentClasses.d.ts +3 -1
- package/TimelineOppositeContent/timelineOppositeContentClasses.js +3 -2
- package/TimelineSeparator/TimelineSeparator.js +10 -18
- package/TimelineSeparator/timelineSeparatorClasses.d.ts +1 -1
- package/TimelineSeparator/timelineSeparatorClasses.js +2 -1
- package/ToggleButton/ToggleButton.js +3 -2
- package/ToggleButtonGroup/ToggleButtonGroup.js +3 -2
- package/TreeItem/TreeItem.d.ts +8 -84
- package/TreeItem/TreeItem.js +15 -419
- package/TreeItem/index.d.ts +0 -5
- package/TreeItem/index.js +1 -3
- package/TreeView/TreeView.d.ts +8 -141
- package/TreeView/TreeView.js +16 -978
- package/TreeView/index.d.ts +0 -3
- package/TreeView/index.js +1 -2
- package/YearPicker/YearPicker.d.ts +5 -4
- package/YearPicker/YearPicker.js +3 -3
- package/index.js +5 -2
- package/internal/convertTimelinePositionToClass.d.ts +1 -0
- package/internal/convertTimelinePositionToClass.js +4 -0
- package/internal/svg-icons/ArrowDropDown.js +3 -1
- package/internal/svg-icons/ArrowLeft.js +3 -1
- package/internal/svg-icons/ArrowRight.js +3 -1
- package/internal/svg-icons/Calendar.js +3 -1
- package/internal/svg-icons/Clock.js +4 -3
- package/internal/svg-icons/DateRange.js +3 -1
- package/internal/svg-icons/Pen.js +3 -1
- package/internal/svg-icons/Time.js +4 -3
- package/legacy/AdapterDateFns/AdapterDateFns.js +4 -5
- package/legacy/AdapterDayjs/AdapterDayjs.js +4 -5
- package/legacy/AdapterLuxon/AdapterLuxon.js +4 -5
- package/legacy/AdapterMoment/AdapterMoment.js +4 -5
- package/legacy/Alert/Alert.js +3 -2
- package/legacy/AlertTitle/AlertTitle.js +3 -2
- package/legacy/Autocomplete/Autocomplete.js +3 -2
- package/legacy/AvatarGroup/AvatarGroup.js +3 -2
- package/legacy/CalendarPicker/CalendarPicker.js +3 -2
- package/legacy/CalendarPickerSkeleton/CalendarPickerSkeleton.js +3 -2
- package/legacy/ClockPicker/ClockPicker.js +3 -2
- package/legacy/DatePicker/DatePicker.js +2 -2
- package/legacy/DateRangePicker/DateRangePicker.js +1 -2
- package/legacy/DateRangePickerDay/DateRangePickerDay.js +1 -2
- package/legacy/DateTimePicker/DateTimePicker.js +3 -2
- package/legacy/DesktopDatePicker/DesktopDatePicker.js +3 -2
- package/legacy/DesktopDateRangePicker/DesktopDateRangePicker.js +1 -2
- package/legacy/DesktopDateTimePicker/DesktopDateTimePicker.js +3 -2
- package/legacy/DesktopTimePicker/DesktopTimePicker.js +3 -2
- package/legacy/LoadingButton/LoadingButton.js +33 -49
- package/legacy/LoadingButton/loadingButtonClasses.js +2 -1
- package/legacy/LocalizationProvider/LocalizationProvider.js +3 -2
- package/legacy/Masonry/Masonry.js +80 -98
- package/legacy/Masonry/masonryClasses.js +2 -1
- package/legacy/MobileDatePicker/MobileDatePicker.js +3 -2
- package/legacy/MobileDateRangePicker/MobileDateRangePicker.js +1 -2
- package/legacy/MobileDateTimePicker/MobileDateTimePicker.js +3 -2
- package/legacy/MobileTimePicker/MobileTimePicker.js +3 -2
- package/legacy/MonthPicker/MonthPicker.js +3 -2
- package/legacy/Pagination/Pagination.js +3 -2
- package/legacy/Pagination/usePagination.js +2 -0
- package/legacy/PaginationItem/PaginationItem.js +3 -2
- package/legacy/PickersDay/PickersDay.js +3 -2
- package/legacy/Rating/Rating.js +3 -2
- package/legacy/Skeleton/Skeleton.js +3 -2
- package/legacy/SpeedDial/SpeedDial.js +3 -2
- package/legacy/SpeedDialAction/SpeedDialAction.js +3 -2
- package/legacy/SpeedDialIcon/SpeedDialIcon.js +3 -2
- package/legacy/StaticDatePicker/StaticDatePicker.js +3 -2
- package/legacy/StaticDateRangePicker/StaticDateRangePicker.js +1 -2
- package/legacy/StaticDateTimePicker/StaticDateTimePicker.js +3 -2
- package/legacy/StaticTimePicker/StaticTimePicker.js +3 -2
- package/legacy/TabContext/TabContext.js +13 -23
- package/legacy/TabList/TabList.js +8 -13
- package/legacy/TabPanel/TabPanel.js +10 -22
- package/legacy/TabPanel/tabPanelClasses.js +2 -1
- package/legacy/TimePicker/TimePicker.js +3 -2
- package/legacy/Timeline/Timeline.js +25 -31
- package/legacy/Timeline/Timeline.types.js +1 -0
- package/legacy/Timeline/TimelineContext.js +1 -3
- package/legacy/Timeline/index.js +1 -0
- package/legacy/Timeline/timelineClasses.js +3 -2
- package/legacy/TimelineConnector/TimelineConnector.js +8 -16
- package/legacy/TimelineConnector/timelineConnectorClasses.js +2 -1
- package/legacy/TimelineContent/TimelineContent.js +13 -23
- package/legacy/TimelineContent/timelineContentClasses.js +3 -2
- package/legacy/TimelineDot/TimelineDot.js +17 -32
- package/legacy/TimelineDot/timelineDotClasses.js +2 -1
- package/legacy/TimelineItem/TimelineItem.js +31 -43
- package/legacy/TimelineItem/timelineItemClasses.js +3 -2
- package/legacy/TimelineOppositeContent/TimelineOppositeContent.js +13 -23
- package/legacy/TimelineOppositeContent/timelineOppositeContentClasses.js +3 -2
- package/legacy/TimelineSeparator/TimelineSeparator.js +8 -16
- package/legacy/TimelineSeparator/timelineSeparatorClasses.js +2 -1
- package/legacy/ToggleButton/ToggleButton.js +3 -2
- package/legacy/ToggleButtonGroup/ToggleButtonGroup.js +3 -2
- package/legacy/TreeItem/TreeItem.js +15 -421
- package/legacy/TreeItem/index.js +1 -3
- package/legacy/TreeView/TreeView.js +16 -1041
- package/legacy/TreeView/index.js +1 -2
- package/legacy/YearPicker/YearPicker.js +3 -3
- package/legacy/index.js +5 -2
- package/legacy/internal/convertTimelinePositionToClass.js +4 -0
- package/legacy/internal/svg-icons/ArrowDropDown.js +3 -1
- package/legacy/internal/svg-icons/ArrowLeft.js +3 -1
- package/legacy/internal/svg-icons/ArrowRight.js +3 -1
- package/legacy/internal/svg-icons/Calendar.js +3 -1
- package/legacy/internal/svg-icons/Clock.js +4 -3
- package/legacy/internal/svg-icons/DateRange.js +3 -1
- package/legacy/internal/svg-icons/Pen.js +3 -1
- package/legacy/internal/svg-icons/Time.js +4 -3
- package/modern/AdapterDateFns/AdapterDateFns.js +4 -4
- package/modern/AdapterDayjs/AdapterDayjs.js +4 -4
- package/modern/AdapterLuxon/AdapterLuxon.js +4 -4
- package/modern/AdapterMoment/AdapterMoment.js +4 -4
- package/modern/Alert/Alert.js +3 -2
- package/modern/AlertTitle/AlertTitle.js +3 -2
- package/modern/Autocomplete/Autocomplete.js +3 -2
- package/modern/AvatarGroup/AvatarGroup.js +3 -2
- package/modern/CalendarPicker/CalendarPicker.js +3 -2
- package/modern/CalendarPickerSkeleton/CalendarPickerSkeleton.js +3 -2
- package/modern/ClockPicker/ClockPicker.js +3 -2
- package/modern/DatePicker/DatePicker.js +2 -2
- package/modern/DateRangePicker/DateRangePicker.js +1 -2
- package/modern/DateRangePickerDay/DateRangePickerDay.js +1 -2
- package/modern/DateTimePicker/DateTimePicker.js +3 -2
- package/modern/DesktopDatePicker/DesktopDatePicker.js +3 -2
- package/modern/DesktopDateRangePicker/DesktopDateRangePicker.js +1 -2
- package/modern/DesktopDateTimePicker/DesktopDateTimePicker.js +3 -2
- package/modern/DesktopTimePicker/DesktopTimePicker.js +3 -2
- package/modern/LoadingButton/LoadingButton.js +27 -44
- package/modern/LoadingButton/loadingButtonClasses.js +2 -1
- package/modern/LocalizationProvider/LocalizationProvider.js +3 -2
- package/modern/Masonry/Masonry.js +75 -89
- package/modern/Masonry/masonryClasses.js +2 -1
- package/modern/MobileDatePicker/MobileDatePicker.js +3 -2
- package/modern/MobileDateRangePicker/MobileDateRangePicker.js +1 -2
- package/modern/MobileDateTimePicker/MobileDateTimePicker.js +3 -2
- package/modern/MobileTimePicker/MobileTimePicker.js +3 -2
- package/modern/MonthPicker/MonthPicker.js +3 -2
- package/modern/Pagination/Pagination.js +3 -2
- package/modern/Pagination/usePagination.js +2 -0
- package/modern/PaginationItem/PaginationItem.js +3 -2
- package/modern/PickersDay/PickersDay.js +3 -2
- package/modern/Rating/Rating.js +3 -2
- package/modern/Skeleton/Skeleton.js +3 -2
- package/modern/SpeedDial/SpeedDial.js +3 -2
- package/modern/SpeedDialAction/SpeedDialAction.js +3 -2
- package/modern/SpeedDialIcon/SpeedDialIcon.js +3 -2
- package/modern/StaticDatePicker/StaticDatePicker.js +3 -2
- package/modern/StaticDateRangePicker/StaticDateRangePicker.js +1 -2
- package/modern/StaticDateTimePicker/StaticDateTimePicker.js +3 -2
- package/modern/StaticTimePicker/StaticTimePicker.js +3 -2
- package/modern/TabContext/TabContext.js +10 -19
- package/modern/TabList/TabList.js +10 -15
- package/modern/TabPanel/TabPanel.js +12 -24
- package/modern/TabPanel/tabPanelClasses.js +2 -1
- package/modern/TimePicker/TimePicker.js +3 -2
- package/modern/Timeline/Timeline.js +23 -31
- package/modern/Timeline/Timeline.types.js +1 -0
- package/modern/Timeline/TimelineContext.js +1 -3
- package/modern/Timeline/index.js +1 -0
- package/modern/Timeline/timelineClasses.js +3 -2
- package/modern/TimelineConnector/TimelineConnector.js +10 -18
- package/modern/TimelineConnector/timelineConnectorClasses.js +2 -1
- package/modern/TimelineContent/TimelineContent.js +13 -23
- package/modern/TimelineContent/timelineContentClasses.js +3 -2
- package/modern/TimelineDot/TimelineDot.js +14 -29
- package/modern/TimelineDot/timelineDotClasses.js +2 -1
- package/modern/TimelineItem/TimelineItem.js +23 -32
- package/modern/TimelineItem/timelineItemClasses.js +3 -2
- package/modern/TimelineOppositeContent/TimelineOppositeContent.js +13 -23
- package/modern/TimelineOppositeContent/timelineOppositeContentClasses.js +3 -2
- package/modern/TimelineSeparator/TimelineSeparator.js +10 -18
- package/modern/TimelineSeparator/timelineSeparatorClasses.js +2 -1
- package/modern/ToggleButton/ToggleButton.js +3 -2
- package/modern/ToggleButtonGroup/ToggleButtonGroup.js +3 -2
- package/modern/TreeItem/TreeItem.js +15 -419
- package/modern/TreeItem/index.js +1 -3
- package/modern/TreeView/TreeView.js +16 -978
- package/modern/TreeView/index.js +1 -2
- package/modern/YearPicker/YearPicker.js +3 -3
- package/modern/index.js +5 -2
- package/modern/internal/convertTimelinePositionToClass.js +4 -0
- package/modern/internal/svg-icons/ArrowDropDown.js +3 -1
- package/modern/internal/svg-icons/ArrowLeft.js +3 -1
- package/modern/internal/svg-icons/ArrowRight.js +3 -1
- package/modern/internal/svg-icons/Calendar.js +3 -1
- package/modern/internal/svg-icons/Clock.js +4 -3
- package/modern/internal/svg-icons/DateRange.js +3 -1
- package/modern/internal/svg-icons/Pen.js +3 -1
- package/modern/internal/svg-icons/Time.js +4 -3
- package/node/AdapterDateFns/AdapterDateFns.js +4 -5
- package/node/AdapterDateFns/index.js +0 -2
- package/node/AdapterDayjs/AdapterDayjs.js +4 -5
- package/node/AdapterDayjs/index.js +0 -2
- package/node/AdapterLuxon/AdapterLuxon.js +4 -5
- package/node/AdapterLuxon/index.js +0 -2
- package/node/AdapterMoment/AdapterMoment.js +4 -5
- package/node/AdapterMoment/index.js +0 -2
- package/node/Alert/Alert.js +6 -16
- package/node/Alert/index.js +0 -2
- package/node/AlertTitle/AlertTitle.js +6 -16
- package/node/AlertTitle/index.js +0 -2
- package/node/Autocomplete/Autocomplete.js +6 -16
- package/node/Autocomplete/index.js +0 -2
- package/node/AvatarGroup/AvatarGroup.js +6 -16
- package/node/AvatarGroup/index.js +0 -2
- package/node/CalendarPicker/CalendarPicker.js +7 -13
- package/node/CalendarPicker/index.js +2 -6
- package/node/CalendarPickerSkeleton/CalendarPickerSkeleton.js +7 -15
- package/node/CalendarPickerSkeleton/index.js +2 -6
- package/node/ClockPicker/ClockPicker.js +7 -13
- package/node/ClockPicker/index.js +2 -6
- package/node/DatePicker/DatePicker.js +5 -11
- package/node/DatePicker/index.js +2 -6
- package/node/DateRangePicker/DateRangePicker.js +5 -10
- package/node/DateRangePicker/index.js +2 -6
- package/node/DateRangePickerDay/DateRangePickerDay.js +5 -12
- package/node/DateRangePickerDay/index.js +2 -6
- package/node/DateTimePicker/DateTimePicker.js +6 -11
- package/node/DateTimePicker/index.js +2 -6
- package/node/DesktopDatePicker/DesktopDatePicker.js +6 -11
- package/node/DesktopDatePicker/index.js +2 -6
- package/node/DesktopDateRangePicker/DesktopDateRangePicker.js +5 -10
- package/node/DesktopDateRangePicker/index.js +2 -6
- package/node/DesktopDateTimePicker/DesktopDateTimePicker.js +6 -11
- package/node/DesktopDateTimePicker/index.js +2 -6
- package/node/DesktopTimePicker/DesktopTimePicker.js +6 -11
- package/node/DesktopTimePicker/index.js +2 -6
- package/node/LoadingButton/LoadingButton.js +28 -57
- package/node/LoadingButton/index.js +2 -8
- package/node/LoadingButton/loadingButtonClasses.js +6 -8
- package/node/LocalizationProvider/LocalizationProvider.js +5 -10
- package/node/LocalizationProvider/index.js +2 -6
- package/node/Masonry/Masonry.js +75 -105
- package/node/Masonry/index.js +2 -8
- package/node/Masonry/masonryClasses.js +6 -8
- package/node/MobileDatePicker/MobileDatePicker.js +6 -11
- package/node/MobileDatePicker/index.js +2 -6
- package/node/MobileDateRangePicker/MobileDateRangePicker.js +5 -10
- package/node/MobileDateRangePicker/index.js +2 -6
- package/node/MobileDateTimePicker/MobileDateTimePicker.js +6 -11
- package/node/MobileDateTimePicker/index.js +2 -6
- package/node/MobileTimePicker/MobileTimePicker.js +6 -11
- package/node/MobileTimePicker/index.js +2 -6
- package/node/MonthPicker/MonthPicker.js +7 -15
- package/node/MonthPicker/index.js +2 -6
- package/node/Pagination/Pagination.js +6 -16
- package/node/Pagination/index.js +0 -3
- package/node/Pagination/usePagination.js +1 -2
- package/node/PaginationItem/PaginationItem.js +6 -16
- package/node/PaginationItem/index.js +0 -2
- package/node/PickersDay/PickersDay.js +7 -15
- package/node/PickersDay/index.js +2 -6
- package/node/Rating/Rating.js +6 -16
- package/node/Rating/index.js +0 -2
- package/node/Skeleton/Skeleton.js +6 -16
- package/node/Skeleton/index.js +0 -2
- package/node/SpeedDial/SpeedDial.js +6 -16
- package/node/SpeedDial/index.js +0 -2
- package/node/SpeedDialAction/SpeedDialAction.js +6 -16
- package/node/SpeedDialAction/index.js +0 -2
- package/node/SpeedDialIcon/SpeedDialIcon.js +6 -16
- package/node/SpeedDialIcon/index.js +0 -2
- package/node/StaticDatePicker/StaticDatePicker.js +6 -11
- package/node/StaticDatePicker/index.js +2 -6
- package/node/StaticDateRangePicker/StaticDateRangePicker.js +5 -10
- package/node/StaticDateRangePicker/index.js +2 -6
- package/node/StaticDateTimePicker/StaticDateTimePicker.js +6 -11
- package/node/StaticDateTimePicker/index.js +2 -6
- package/node/StaticTimePicker/StaticTimePicker.js +6 -11
- package/node/StaticTimePicker/index.js +2 -6
- package/node/TabContext/TabContext.js +11 -32
- package/node/TabContext/index.js +2 -6
- package/node/TabList/TabList.js +12 -30
- package/node/TabList/index.js +0 -2
- package/node/TabPanel/TabPanel.js +14 -39
- package/node/TabPanel/index.js +2 -8
- package/node/TabPanel/tabPanelClasses.js +6 -8
- package/node/TimePicker/TimePicker.js +6 -11
- package/node/TimePicker/index.js +2 -6
- package/node/Timeline/Timeline.js +25 -47
- package/node/Timeline/Timeline.types.js +5 -0
- package/node/Timeline/TimelineContext.js +3 -10
- package/node/Timeline/index.js +14 -8
- package/node/Timeline/timelineClasses.js +6 -8
- package/node/TimelineConnector/TimelineConnector.js +12 -33
- package/node/TimelineConnector/index.js +2 -8
- package/node/TimelineConnector/timelineConnectorClasses.js +6 -8
- package/node/TimelineContent/TimelineContent.js +15 -39
- package/node/TimelineContent/index.js +2 -8
- package/node/TimelineContent/timelineContentClasses.js +6 -8
- package/node/TimelineDot/TimelineDot.js +16 -44
- package/node/TimelineDot/index.js +2 -8
- package/node/TimelineDot/timelineDotClasses.js +6 -8
- package/node/TimelineItem/TimelineItem.js +24 -48
- package/node/TimelineItem/index.js +2 -8
- package/node/TimelineItem/timelineItemClasses.js +6 -8
- package/node/TimelineOppositeContent/TimelineOppositeContent.js +15 -39
- package/node/TimelineOppositeContent/index.js +2 -8
- package/node/TimelineOppositeContent/timelineOppositeContentClasses.js +6 -8
- package/node/TimelineSeparator/TimelineSeparator.js +12 -33
- package/node/TimelineSeparator/index.js +2 -8
- package/node/TimelineSeparator/timelineSeparatorClasses.js +6 -8
- package/node/ToggleButton/ToggleButton.js +6 -16
- package/node/ToggleButton/index.js +0 -2
- package/node/ToggleButtonGroup/ToggleButtonGroup.js +6 -16
- package/node/ToggleButtonGroup/index.js +0 -2
- package/node/TreeItem/TreeItem.js +17 -438
- package/node/TreeItem/index.js +7 -32
- package/node/TreeView/TreeView.js +18 -993
- package/node/TreeView/index.js +7 -23
- package/node/YearPicker/YearPicker.js +5 -11
- package/node/YearPicker/index.js +2 -6
- package/node/index.js +5 -109
- package/node/internal/convertTimelinePositionToClass.js +10 -0
- package/node/internal/svg-icons/ArrowDropDown.js +5 -12
- package/node/internal/svg-icons/ArrowLeft.js +5 -12
- package/node/internal/svg-icons/ArrowRight.js +5 -12
- package/node/internal/svg-icons/Calendar.js +5 -12
- package/node/internal/svg-icons/Clock.js +5 -12
- package/node/internal/svg-icons/DateRange.js +5 -12
- package/node/internal/svg-icons/Pen.js +5 -12
- package/node/internal/svg-icons/Time.js +5 -12
- package/node/useAutocomplete/index.js +0 -1
- package/package.json +15 -14
- package/themeAugmentation/components.d.ts +5 -10
- package/themeAugmentation/overrides.d.ts +2 -4
- package/themeAugmentation/props.d.ts +2 -4
- package/TreeItem/TreeItemContent.d.ts +0 -50
- package/TreeItem/TreeItemContent.js +0 -128
- package/TreeItem/treeItemClasses.d.ts +0 -24
- package/TreeItem/treeItemClasses.js +0 -6
- package/TreeItem/useTreeItem.d.ts +0 -11
- package/TreeItem/useTreeItem.js +0 -74
- package/TreeView/TreeViewContext.js +0 -12
- package/TreeView/descendants.js +0 -198
- package/TreeView/treeViewClasses.d.ts +0 -8
- package/TreeView/treeViewClasses.js +0 -6
- package/legacy/TreeItem/TreeItemContent.js +0 -125
- package/legacy/TreeItem/treeItemClasses.js +0 -6
- package/legacy/TreeItem/useTreeItem.js +0 -74
- package/legacy/TreeView/TreeViewContext.js +0 -12
- package/legacy/TreeView/descendants.js +0 -211
- package/legacy/TreeView/treeViewClasses.js +0 -6
- package/modern/TreeItem/TreeItemContent.js +0 -128
- package/modern/TreeItem/treeItemClasses.js +0 -6
- package/modern/TreeItem/useTreeItem.js +0 -74
- package/modern/TreeView/TreeViewContext.js +0 -12
- package/modern/TreeView/descendants.js +0 -198
- package/modern/TreeView/treeViewClasses.js +0 -6
- package/node/TreeItem/TreeItemContent.js +0 -147
- package/node/TreeItem/treeItemClasses.js +0 -17
- package/node/TreeItem/useTreeItem.js +0 -89
- package/node/TreeView/TreeViewContext.js +0 -24
- package/node/TreeView/descendants.js +0 -217
- package/node/TreeView/treeViewClasses.js +0 -17
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
1
3
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
2
4
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
5
|
const _excluded = ["className"];
|
|
@@ -5,24 +7,22 @@ import * as React from 'react';
|
|
|
5
7
|
import PropTypes from 'prop-types';
|
|
6
8
|
import clsx from 'clsx';
|
|
7
9
|
import { styled, useThemeProps } from '@mui/material/styles';
|
|
8
|
-
import { capitalize } from '@mui/material/utils';
|
|
9
10
|
import { unstable_composeClasses as composeClasses } from '@mui/base';
|
|
10
11
|
import Typography from '@mui/material/Typography';
|
|
11
12
|
import TimelineContext from '../Timeline/TimelineContext';
|
|
12
13
|
import { getTimelineOppositeContentUtilityClass } from './timelineOppositeContentClasses';
|
|
14
|
+
import convertTimelinePositionToClass from '../internal/convertTimelinePositionToClass';
|
|
13
15
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
|
-
|
|
15
16
|
const useUtilityClasses = ownerState => {
|
|
16
17
|
const {
|
|
17
18
|
position,
|
|
18
19
|
classes
|
|
19
20
|
} = ownerState;
|
|
20
21
|
const slots = {
|
|
21
|
-
root: ['root',
|
|
22
|
+
root: ['root', convertTimelinePositionToClass(position)]
|
|
22
23
|
};
|
|
23
24
|
return composeClasses(slots, getTimelineOppositeContentUtilityClass, classes);
|
|
24
25
|
};
|
|
25
|
-
|
|
26
26
|
const TimelineOppositeContentRoot = styled(Typography, {
|
|
27
27
|
name: 'MuiTimelineOppositeContent',
|
|
28
28
|
slot: 'Root',
|
|
@@ -30,7 +30,7 @@ const TimelineOppositeContentRoot = styled(Typography, {
|
|
|
30
30
|
const {
|
|
31
31
|
ownerState
|
|
32
32
|
} = props;
|
|
33
|
-
return [styles.root, styles[
|
|
33
|
+
return [styles.root, styles[convertTimelinePositionToClass(ownerState.position)]];
|
|
34
34
|
}
|
|
35
35
|
})(({
|
|
36
36
|
ownerState
|
|
@@ -47,20 +47,16 @@ const TimelineOppositeContent = /*#__PURE__*/React.forwardRef(function TimelineO
|
|
|
47
47
|
props: inProps,
|
|
48
48
|
name: 'MuiTimelineOppositeContent'
|
|
49
49
|
});
|
|
50
|
-
|
|
51
50
|
const {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
51
|
+
className
|
|
52
|
+
} = props,
|
|
53
|
+
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
56
54
|
const {
|
|
57
55
|
position: positionContext
|
|
58
56
|
} = React.useContext(TimelineContext);
|
|
59
|
-
|
|
60
57
|
const ownerState = _extends({}, props, {
|
|
61
58
|
position: positionContext || 'left'
|
|
62
59
|
});
|
|
63
|
-
|
|
64
60
|
const classes = useUtilityClasses(ownerState);
|
|
65
61
|
return /*#__PURE__*/_jsx(TimelineOppositeContentRoot, _extends({
|
|
66
62
|
component: "div",
|
|
@@ -69,29 +65,23 @@ const TimelineOppositeContent = /*#__PURE__*/React.forwardRef(function TimelineO
|
|
|
69
65
|
ref: ref
|
|
70
66
|
}, other));
|
|
71
67
|
});
|
|
72
|
-
process.env.NODE_ENV !== "production" ? TimelineOppositeContent.propTypes
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
//
|
|
76
|
-
//
|
|
77
|
-
// | To update them edit the d.ts file and run "yarn proptypes" |
|
|
78
|
-
// ----------------------------------------------------------------------
|
|
79
|
-
|
|
68
|
+
process.env.NODE_ENV !== "production" ? TimelineOppositeContent.propTypes /* remove-proptypes */ = {
|
|
69
|
+
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
70
|
+
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
71
|
+
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
72
|
+
// └─────────────────────────────────────────────────────────────────────┘
|
|
80
73
|
/**
|
|
81
74
|
* The content of the component.
|
|
82
75
|
*/
|
|
83
76
|
children: PropTypes.node,
|
|
84
|
-
|
|
85
77
|
/**
|
|
86
78
|
* Override or extend the styles applied to the component.
|
|
87
79
|
*/
|
|
88
80
|
classes: PropTypes.object,
|
|
89
|
-
|
|
90
81
|
/**
|
|
91
82
|
* @ignore
|
|
92
83
|
*/
|
|
93
84
|
className: PropTypes.string,
|
|
94
|
-
|
|
95
85
|
/**
|
|
96
86
|
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
97
87
|
*/
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import generateUtilityClass from '@mui/utils/generateUtilityClass';
|
|
2
|
+
import generateUtilityClasses from '@mui/utils/generateUtilityClasses';
|
|
2
3
|
export function getTimelineOppositeContentUtilityClass(slot) {
|
|
3
4
|
return generateUtilityClass('MuiTimelineOppositeContent', slot);
|
|
4
5
|
}
|
|
5
|
-
const timelineOppositeContentClasses = generateUtilityClasses('MuiTimelineOppositeContent', ['root', 'positionLeft', 'positionRight', 'positionAlternate']);
|
|
6
|
+
const timelineOppositeContentClasses = generateUtilityClasses('MuiTimelineOppositeContent', ['root', 'positionLeft', 'positionRight', 'positionAlternate', 'positionAlternateReverse']);
|
|
6
7
|
export default timelineOppositeContentClasses;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
1
3
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
4
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
5
|
const _excluded = ["className"];
|
|
@@ -8,7 +10,6 @@ import { unstable_composeClasses as composeClasses } from '@mui/base';
|
|
|
8
10
|
import { styled, useThemeProps } from '@mui/material/styles';
|
|
9
11
|
import { getTimelineSeparatorUtilityClass } from './timelineSeparatorClasses';
|
|
10
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
11
|
-
|
|
12
13
|
const useUtilityClasses = ownerState => {
|
|
13
14
|
const {
|
|
14
15
|
classes
|
|
@@ -18,7 +19,6 @@ const useUtilityClasses = ownerState => {
|
|
|
18
19
|
};
|
|
19
20
|
return composeClasses(slots, getTimelineSeparatorUtilityClass, classes);
|
|
20
21
|
};
|
|
21
|
-
|
|
22
22
|
const TimelineSeparatorRoot = styled('div', {
|
|
23
23
|
name: 'MuiTimelineSeparator',
|
|
24
24
|
slot: 'Root',
|
|
@@ -34,12 +34,10 @@ const TimelineSeparator = /*#__PURE__*/React.forwardRef(function TimelineSeparat
|
|
|
34
34
|
props: inProps,
|
|
35
35
|
name: 'MuiTimelineSeparator'
|
|
36
36
|
});
|
|
37
|
-
|
|
38
37
|
const {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
38
|
+
className
|
|
39
|
+
} = props,
|
|
40
|
+
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
43
41
|
const ownerState = props;
|
|
44
42
|
const classes = useUtilityClasses(ownerState);
|
|
45
43
|
return /*#__PURE__*/_jsx(TimelineSeparatorRoot, _extends({
|
|
@@ -48,29 +46,23 @@ const TimelineSeparator = /*#__PURE__*/React.forwardRef(function TimelineSeparat
|
|
|
48
46
|
ref: ref
|
|
49
47
|
}, other));
|
|
50
48
|
});
|
|
51
|
-
process.env.NODE_ENV !== "production" ? TimelineSeparator.propTypes
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
//
|
|
55
|
-
//
|
|
56
|
-
// | To update them edit the d.ts file and run "yarn proptypes" |
|
|
57
|
-
// ----------------------------------------------------------------------
|
|
58
|
-
|
|
49
|
+
process.env.NODE_ENV !== "production" ? TimelineSeparator.propTypes /* remove-proptypes */ = {
|
|
50
|
+
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
51
|
+
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
52
|
+
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
53
|
+
// └─────────────────────────────────────────────────────────────────────┘
|
|
59
54
|
/**
|
|
60
55
|
* The content of the component.
|
|
61
56
|
*/
|
|
62
57
|
children: PropTypes.node,
|
|
63
|
-
|
|
64
58
|
/**
|
|
65
59
|
* Override or extend the styles applied to the component.
|
|
66
60
|
*/
|
|
67
61
|
classes: PropTypes.object,
|
|
68
|
-
|
|
69
62
|
/**
|
|
70
63
|
* @ignore
|
|
71
64
|
*/
|
|
72
65
|
className: PropTypes.string,
|
|
73
|
-
|
|
74
66
|
/**
|
|
75
67
|
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
76
68
|
*/
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import generateUtilityClass from '@mui/utils/generateUtilityClass';
|
|
2
|
+
import generateUtilityClasses from '@mui/utils/generateUtilityClasses';
|
|
2
3
|
export function getTimelineSeparatorUtilityClass(slot) {
|
|
3
4
|
return generateUtilityClass('MuiTimelineSeparator', slot);
|
|
4
5
|
}
|
|
@@ -1,18 +1,19 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
1
3
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
4
|
import * as React from 'react';
|
|
3
5
|
import ToggleButton from '@mui/material/ToggleButton';
|
|
4
6
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
7
|
let warnedOnce = false;
|
|
8
|
+
|
|
6
9
|
/**
|
|
7
10
|
* @ignore - do not document.
|
|
8
11
|
*/
|
|
9
|
-
|
|
10
12
|
export default /*#__PURE__*/React.forwardRef(function DeprecatedToggleButton(props, ref) {
|
|
11
13
|
if (!warnedOnce) {
|
|
12
14
|
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
15
|
warnedOnce = true;
|
|
14
16
|
}
|
|
15
|
-
|
|
16
17
|
return /*#__PURE__*/_jsx(ToggleButton, _extends({
|
|
17
18
|
ref: ref
|
|
18
19
|
}, props));
|
|
@@ -1,18 +1,19 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
1
3
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
4
|
import * as React from 'react';
|
|
3
5
|
import ToggleButtonGroup from '@mui/material/ToggleButtonGroup';
|
|
4
6
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
7
|
let warnedOnce = false;
|
|
8
|
+
|
|
6
9
|
/**
|
|
7
10
|
* @ignore - do not document.
|
|
8
11
|
*/
|
|
9
|
-
|
|
10
12
|
export default /*#__PURE__*/React.forwardRef(function DeprecatedToggleButtonGroup(props, ref) {
|
|
11
13
|
if (!warnedOnce) {
|
|
12
14
|
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
15
|
warnedOnce = true;
|
|
14
16
|
}
|
|
15
|
-
|
|
16
17
|
return /*#__PURE__*/_jsx(ToggleButtonGroup, _extends({
|
|
17
18
|
ref: ref
|
|
18
19
|
}, props));
|
|
@@ -1,423 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
|
-
const _excluded = ["children", "className", "collapseIcon", "ContentComponent", "ContentProps", "endIcon", "expandIcon", "disabled", "icon", "id", "label", "nodeId", "onClick", "onMouseDown", "TransitionComponent", "TransitionProps"];
|
|
4
|
-
import * as React from 'react';
|
|
5
|
-
import clsx from 'clsx';
|
|
6
|
-
import PropTypes from 'prop-types';
|
|
7
|
-
import { elementTypeAcceptingRef } from '@mui/utils';
|
|
8
|
-
import Collapse from '@mui/material/Collapse';
|
|
9
|
-
import { alpha, styled, useThemeProps } from '@mui/material/styles';
|
|
10
|
-
import { ownerDocument, useForkRef, unsupportedProp } from '@mui/material/utils';
|
|
11
|
-
import { unstable_composeClasses as composeClasses } from '@mui/base';
|
|
12
|
-
import TreeViewContext from '../TreeView/TreeViewContext';
|
|
13
|
-
import { DescendantProvider, useDescendant } from '../TreeView/descendants';
|
|
14
|
-
import TreeItemContent from './TreeItemContent';
|
|
15
|
-
import treeItemClasses, { getTreeItemUtilityClass } from './treeItemClasses';
|
|
16
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
17
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
18
|
-
|
|
19
|
-
const useUtilityClasses = ownerState => {
|
|
20
|
-
const {
|
|
21
|
-
classes
|
|
22
|
-
} = ownerState;
|
|
23
|
-
const slots = {
|
|
24
|
-
root: ['root'],
|
|
25
|
-
content: ['content'],
|
|
26
|
-
expanded: ['expanded'],
|
|
27
|
-
selected: ['selected'],
|
|
28
|
-
focused: ['focused'],
|
|
29
|
-
disabled: ['disabled'],
|
|
30
|
-
iconContainer: ['iconContainer'],
|
|
31
|
-
label: ['label'],
|
|
32
|
-
group: ['group']
|
|
33
|
-
};
|
|
34
|
-
return composeClasses(slots, getTreeItemUtilityClass, classes);
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
const TreeItemRoot = styled('li', {
|
|
38
|
-
name: 'MuiTreeItem',
|
|
39
|
-
slot: 'Root',
|
|
40
|
-
overridesResolver: (props, styles) => styles.root
|
|
41
|
-
})({
|
|
42
|
-
listStyle: 'none',
|
|
43
|
-
margin: 0,
|
|
44
|
-
padding: 0,
|
|
45
|
-
outline: 0
|
|
46
|
-
});
|
|
47
|
-
const StyledTreeItemContent = styled(TreeItemContent, {
|
|
48
|
-
name: 'MuiTreeItem',
|
|
49
|
-
slot: 'Content',
|
|
50
|
-
overridesResolver: (props, styles) => {
|
|
51
|
-
return [styles.content, styles.iconContainer && {
|
|
52
|
-
[`& .${treeItemClasses.iconContainer}`]: styles.iconContainer
|
|
53
|
-
}, styles.label && {
|
|
54
|
-
[`& .${treeItemClasses.label}`]: styles.label
|
|
55
|
-
}];
|
|
56
|
-
}
|
|
57
|
-
})(({
|
|
58
|
-
theme
|
|
59
|
-
}) => ({
|
|
60
|
-
padding: '0 8px',
|
|
61
|
-
width: '100%',
|
|
62
|
-
display: 'flex',
|
|
63
|
-
alignItems: 'center',
|
|
64
|
-
cursor: 'pointer',
|
|
65
|
-
WebkitTapHighlightColor: 'transparent',
|
|
66
|
-
'&:hover': {
|
|
67
|
-
backgroundColor: (theme.vars || theme).palette.action.hover,
|
|
68
|
-
// Reset on touch devices, it doesn't add specificity
|
|
69
|
-
'@media (hover: none)': {
|
|
70
|
-
backgroundColor: 'transparent'
|
|
71
|
-
}
|
|
72
|
-
},
|
|
73
|
-
[`&.${treeItemClasses.disabled}`]: {
|
|
74
|
-
opacity: (theme.vars || theme).palette.action.disabledOpacity,
|
|
75
|
-
backgroundColor: 'transparent'
|
|
76
|
-
},
|
|
77
|
-
[`&.${treeItemClasses.focused}`]: {
|
|
78
|
-
backgroundColor: (theme.vars || theme).palette.action.focus
|
|
79
|
-
},
|
|
80
|
-
[`&.${treeItemClasses.selected}`]: {
|
|
81
|
-
backgroundColor: theme.vars ? `rgba(${theme.vars.palette.primary.mainChannel} / ${theme.vars.palette.action.selectedOpacity})` : alpha(theme.palette.primary.main, theme.palette.action.selectedOpacity),
|
|
82
|
-
'&:hover': {
|
|
83
|
-
backgroundColor: theme.vars ? `rgba(${theme.vars.palette.primary.mainChannel} / calc(${theme.vars.palette.action.selectedOpacity} + ${theme.vars.palette.action.hoverOpacity}))` : alpha(theme.palette.primary.main, theme.palette.action.selectedOpacity + theme.palette.action.hoverOpacity),
|
|
84
|
-
// Reset on touch devices, it doesn't add specificity
|
|
85
|
-
'@media (hover: none)': {
|
|
86
|
-
backgroundColor: theme.vars ? `rgba(${theme.vars.palette.primary.mainChannel} / ${theme.vars.palette.action.selectedOpacity})` : alpha(theme.palette.primary.main, theme.palette.action.selectedOpacity)
|
|
87
|
-
}
|
|
88
|
-
},
|
|
89
|
-
[`&.${treeItemClasses.focused}`]: {
|
|
90
|
-
backgroundColor: theme.vars ? `rgba(${theme.vars.palette.primary.mainChannel} / calc(${theme.vars.palette.action.selectedOpacity} + ${theme.vars.palette.action.focusOpacity}))` : alpha(theme.palette.primary.main, theme.palette.action.selectedOpacity + theme.palette.action.focusOpacity)
|
|
91
|
-
}
|
|
92
|
-
},
|
|
93
|
-
[`& .${treeItemClasses.iconContainer}`]: {
|
|
94
|
-
marginRight: 4,
|
|
95
|
-
width: 15,
|
|
96
|
-
display: 'flex',
|
|
97
|
-
flexShrink: 0,
|
|
98
|
-
justifyContent: 'center',
|
|
99
|
-
'& svg': {
|
|
100
|
-
fontSize: 18
|
|
101
|
-
}
|
|
102
|
-
},
|
|
103
|
-
[`& .${treeItemClasses.label}`]: _extends({
|
|
104
|
-
width: '100%',
|
|
105
|
-
// fixes overflow - see https://github.com/mui/material-ui/issues/27372
|
|
106
|
-
minWidth: 0,
|
|
107
|
-
paddingLeft: 4,
|
|
108
|
-
position: 'relative'
|
|
109
|
-
}, theme.typography.body1)
|
|
110
|
-
}));
|
|
111
|
-
const TreeItemGroup = styled(Collapse, {
|
|
112
|
-
name: 'MuiTreeItem',
|
|
113
|
-
slot: 'Group',
|
|
114
|
-
overridesResolver: (props, styles) => styles.group
|
|
115
|
-
})({
|
|
116
|
-
margin: 0,
|
|
117
|
-
padding: 0,
|
|
118
|
-
marginLeft: 17
|
|
119
|
-
});
|
|
120
|
-
const TreeItem = /*#__PURE__*/React.forwardRef(function TreeItem(inProps, ref) {
|
|
121
|
-
const props = useThemeProps({
|
|
122
|
-
props: inProps,
|
|
123
|
-
name: 'MuiTreeItem'
|
|
124
|
-
});
|
|
125
|
-
|
|
126
|
-
const {
|
|
127
|
-
children,
|
|
128
|
-
className,
|
|
129
|
-
collapseIcon,
|
|
130
|
-
ContentComponent = TreeItemContent,
|
|
131
|
-
ContentProps,
|
|
132
|
-
endIcon,
|
|
133
|
-
expandIcon,
|
|
134
|
-
disabled: disabledProp,
|
|
135
|
-
icon,
|
|
136
|
-
id: idProp,
|
|
137
|
-
label,
|
|
138
|
-
nodeId,
|
|
139
|
-
onClick,
|
|
140
|
-
onMouseDown,
|
|
141
|
-
TransitionComponent = Collapse,
|
|
142
|
-
TransitionProps
|
|
143
|
-
} = props,
|
|
144
|
-
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
145
|
-
|
|
146
|
-
const {
|
|
147
|
-
icons: contextIcons = {},
|
|
148
|
-
focus,
|
|
149
|
-
isExpanded,
|
|
150
|
-
isFocused,
|
|
151
|
-
isSelected,
|
|
152
|
-
isDisabled,
|
|
153
|
-
multiSelect,
|
|
154
|
-
disabledItemsFocusable,
|
|
155
|
-
mapFirstChar,
|
|
156
|
-
unMapFirstChar,
|
|
157
|
-
registerNode,
|
|
158
|
-
unregisterNode,
|
|
159
|
-
treeId
|
|
160
|
-
} = React.useContext(TreeViewContext);
|
|
161
|
-
let id = null;
|
|
162
|
-
|
|
163
|
-
if (idProp != null) {
|
|
164
|
-
id = idProp;
|
|
165
|
-
} else if (treeId && nodeId) {
|
|
166
|
-
id = `${treeId}-${nodeId}`;
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
const [treeitemElement, setTreeitemElement] = React.useState(null);
|
|
170
|
-
const contentRef = React.useRef(null);
|
|
171
|
-
const handleRef = useForkRef(setTreeitemElement, ref);
|
|
172
|
-
const descendant = React.useMemo(() => ({
|
|
173
|
-
element: treeitemElement,
|
|
174
|
-
id: nodeId
|
|
175
|
-
}), [nodeId, treeitemElement]);
|
|
176
|
-
const {
|
|
177
|
-
index,
|
|
178
|
-
parentId
|
|
179
|
-
} = useDescendant(descendant);
|
|
180
|
-
const expandable = Boolean(Array.isArray(children) ? children.length : children);
|
|
181
|
-
const expanded = isExpanded ? isExpanded(nodeId) : false;
|
|
182
|
-
const focused = isFocused ? isFocused(nodeId) : false;
|
|
183
|
-
const selected = isSelected ? isSelected(nodeId) : false;
|
|
184
|
-
const disabled = isDisabled ? isDisabled(nodeId) : false;
|
|
185
|
-
|
|
186
|
-
const ownerState = _extends({}, props, {
|
|
187
|
-
expanded,
|
|
188
|
-
focused,
|
|
189
|
-
selected,
|
|
190
|
-
disabled
|
|
191
|
-
});
|
|
192
|
-
|
|
193
|
-
const classes = useUtilityClasses(ownerState);
|
|
194
|
-
let displayIcon;
|
|
195
|
-
let expansionIcon;
|
|
196
|
-
|
|
197
|
-
if (expandable) {
|
|
198
|
-
if (!expanded) {
|
|
199
|
-
expansionIcon = expandIcon || contextIcons.defaultExpandIcon;
|
|
200
|
-
} else {
|
|
201
|
-
expansionIcon = collapseIcon || contextIcons.defaultCollapseIcon;
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
if (expandable) {
|
|
206
|
-
displayIcon = contextIcons.defaultParentIcon;
|
|
207
|
-
} else {
|
|
208
|
-
displayIcon = endIcon || contextIcons.defaultEndIcon;
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
React.useEffect(() => {
|
|
212
|
-
// On the first render a node's index will be -1. We want to wait for the real index.
|
|
213
|
-
if (registerNode && unregisterNode && index !== -1) {
|
|
214
|
-
registerNode({
|
|
215
|
-
id: nodeId,
|
|
216
|
-
idAttribute: id,
|
|
217
|
-
index,
|
|
218
|
-
parentId,
|
|
219
|
-
expandable,
|
|
220
|
-
disabled: disabledProp
|
|
221
|
-
});
|
|
222
|
-
return () => {
|
|
223
|
-
unregisterNode(nodeId);
|
|
224
|
-
};
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
return undefined;
|
|
228
|
-
}, [registerNode, unregisterNode, parentId, index, nodeId, expandable, disabledProp, id]);
|
|
229
|
-
React.useEffect(() => {
|
|
230
|
-
if (mapFirstChar && unMapFirstChar && label) {
|
|
231
|
-
mapFirstChar(nodeId, contentRef.current.textContent.substring(0, 1).toLowerCase());
|
|
232
|
-
return () => {
|
|
233
|
-
unMapFirstChar(nodeId);
|
|
234
|
-
};
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
return undefined;
|
|
238
|
-
}, [mapFirstChar, unMapFirstChar, nodeId, label]);
|
|
239
|
-
let ariaSelected;
|
|
240
|
-
|
|
241
|
-
if (multiSelect) {
|
|
242
|
-
ariaSelected = selected;
|
|
243
|
-
} else if (selected) {
|
|
244
|
-
/* single-selection trees unset aria-selected on un-selected items.
|
|
245
|
-
*
|
|
246
|
-
* If the tree does not support multiple selection, aria-selected
|
|
247
|
-
* is set to true for the selected node and it is not present on any other node in the tree.
|
|
248
|
-
* Source: https://www.w3.org/WAI/ARIA/apg/patterns/treeview/
|
|
249
|
-
*/
|
|
250
|
-
ariaSelected = true;
|
|
251
|
-
}
|
|
252
|
-
|
|
253
|
-
function handleFocus(event) {
|
|
254
|
-
// DOM focus stays on the tree which manages focus with aria-activedescendant
|
|
255
|
-
if (event.target === event.currentTarget) {
|
|
256
|
-
ownerDocument(event.target).getElementById(treeId).focus({
|
|
257
|
-
preventScroll: true
|
|
258
|
-
});
|
|
259
|
-
}
|
|
1
|
+
'use client';
|
|
260
2
|
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
}
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
let warnedOnce = false;
|
|
5
|
+
const warn = () => {
|
|
6
|
+
if (!warnedOnce) {
|
|
7
|
+
console.warn(['MUI: The TreeItem component was moved from `@mui/lab` to `@mui/x-tree-view`.', '', "You should use `import { TreeItem } from '@mui/x-tree-view'`", "or `import { TreeItem } from '@mui/x-tree-view/TreeItem'`", '', 'More information about this migration on our blog: https://mui.com/blog/lab-tree-view-to-mui-x/.'].join('\n'));
|
|
8
|
+
warnedOnce = true;
|
|
266
9
|
}
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
id: id,
|
|
276
|
-
tabIndex: -1
|
|
277
|
-
}, other, {
|
|
278
|
-
ownerState: ownerState,
|
|
279
|
-
onFocus: handleFocus,
|
|
280
|
-
children: [/*#__PURE__*/_jsx(StyledTreeItemContent, _extends({
|
|
281
|
-
as: ContentComponent,
|
|
282
|
-
ref: contentRef,
|
|
283
|
-
classes: {
|
|
284
|
-
root: classes.content,
|
|
285
|
-
expanded: classes.expanded,
|
|
286
|
-
selected: classes.selected,
|
|
287
|
-
focused: classes.focused,
|
|
288
|
-
disabled: classes.disabled,
|
|
289
|
-
iconContainer: classes.iconContainer,
|
|
290
|
-
label: classes.label
|
|
291
|
-
},
|
|
292
|
-
label: label,
|
|
293
|
-
nodeId: nodeId,
|
|
294
|
-
onClick: onClick,
|
|
295
|
-
onMouseDown: onMouseDown,
|
|
296
|
-
icon: icon,
|
|
297
|
-
expansionIcon: expansionIcon,
|
|
298
|
-
displayIcon: displayIcon,
|
|
299
|
-
ownerState: ownerState
|
|
300
|
-
}, ContentProps)), children && /*#__PURE__*/_jsx(DescendantProvider, {
|
|
301
|
-
id: nodeId,
|
|
302
|
-
children: /*#__PURE__*/_jsx(TreeItemGroup, _extends({
|
|
303
|
-
as: TransitionComponent,
|
|
304
|
-
unmountOnExit: true,
|
|
305
|
-
className: classes.group,
|
|
306
|
-
in: expanded,
|
|
307
|
-
component: "ul",
|
|
308
|
-
role: "group"
|
|
309
|
-
}, TransitionProps, {
|
|
310
|
-
children: children
|
|
311
|
-
}))
|
|
312
|
-
})]
|
|
313
|
-
}));
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* @deprecated The TreeItem component was moved from `@mui/lab` to `@mui/x-tree-view`. More information about this migration on our blog: https://mui.com/blog/lab-tree-view-to-mui-x/.
|
|
13
|
+
* @ignore - do not document.
|
|
14
|
+
*/
|
|
15
|
+
const TreeItem = /*#__PURE__*/React.forwardRef(function DeprecatedTreeItem() {
|
|
16
|
+
warn();
|
|
17
|
+
return null;
|
|
314
18
|
});
|
|
315
|
-
process.env.NODE_ENV !== "production" ? TreeItem.propTypes
|
|
316
|
-
/* remove-proptypes */
|
|
317
|
-
= {
|
|
318
|
-
// ----------------------------- Warning --------------------------------
|
|
319
|
-
// | These PropTypes are generated from the TypeScript type definitions |
|
|
320
|
-
// | To update them edit the d.ts file and run "yarn proptypes" |
|
|
321
|
-
// ----------------------------------------------------------------------
|
|
322
|
-
|
|
323
|
-
/**
|
|
324
|
-
* The content of the component.
|
|
325
|
-
*/
|
|
326
|
-
children: PropTypes.node,
|
|
327
|
-
|
|
328
|
-
/**
|
|
329
|
-
* Override or extend the styles applied to the component.
|
|
330
|
-
*/
|
|
331
|
-
classes: PropTypes.object,
|
|
332
|
-
|
|
333
|
-
/**
|
|
334
|
-
* @ignore
|
|
335
|
-
*/
|
|
336
|
-
className: PropTypes.string,
|
|
337
|
-
|
|
338
|
-
/**
|
|
339
|
-
* The icon used to collapse the node.
|
|
340
|
-
*/
|
|
341
|
-
collapseIcon: PropTypes.node,
|
|
342
|
-
|
|
343
|
-
/**
|
|
344
|
-
* The component used for the content node.
|
|
345
|
-
* @default TreeItemContent
|
|
346
|
-
*/
|
|
347
|
-
ContentComponent: elementTypeAcceptingRef,
|
|
348
|
-
|
|
349
|
-
/**
|
|
350
|
-
* Props applied to ContentComponent
|
|
351
|
-
*/
|
|
352
|
-
ContentProps: PropTypes.object,
|
|
353
|
-
|
|
354
|
-
/**
|
|
355
|
-
* If `true`, the node is disabled.
|
|
356
|
-
*/
|
|
357
|
-
disabled: PropTypes.bool,
|
|
358
|
-
|
|
359
|
-
/**
|
|
360
|
-
* The icon displayed next to a end node.
|
|
361
|
-
*/
|
|
362
|
-
endIcon: PropTypes.node,
|
|
363
|
-
|
|
364
|
-
/**
|
|
365
|
-
* The icon used to expand the node.
|
|
366
|
-
*/
|
|
367
|
-
expandIcon: PropTypes.node,
|
|
368
|
-
|
|
369
|
-
/**
|
|
370
|
-
* The icon to display next to the tree node's label.
|
|
371
|
-
*/
|
|
372
|
-
icon: PropTypes.node,
|
|
373
|
-
|
|
374
|
-
/**
|
|
375
|
-
* @ignore
|
|
376
|
-
*/
|
|
377
|
-
id: PropTypes.string,
|
|
378
|
-
|
|
379
|
-
/**
|
|
380
|
-
* The tree node label.
|
|
381
|
-
*/
|
|
382
|
-
label: PropTypes.node,
|
|
383
|
-
|
|
384
|
-
/**
|
|
385
|
-
* The id of the node.
|
|
386
|
-
*/
|
|
387
|
-
nodeId: PropTypes.string.isRequired,
|
|
388
|
-
|
|
389
|
-
/**
|
|
390
|
-
* @ignore
|
|
391
|
-
*/
|
|
392
|
-
onClick: PropTypes.func,
|
|
393
|
-
|
|
394
|
-
/**
|
|
395
|
-
* This prop isn't supported.
|
|
396
|
-
* Use the `onNodeFocus` callback on the tree if you need to monitor a node's focus.
|
|
397
|
-
*/
|
|
398
|
-
onFocus: unsupportedProp,
|
|
399
|
-
|
|
400
|
-
/**
|
|
401
|
-
* @ignore
|
|
402
|
-
*/
|
|
403
|
-
onMouseDown: PropTypes.func,
|
|
404
|
-
|
|
405
|
-
/**
|
|
406
|
-
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
407
|
-
*/
|
|
408
|
-
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
409
|
-
|
|
410
|
-
/**
|
|
411
|
-
* The component used for the transition.
|
|
412
|
-
* [Follow this guide](/material-ui/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.
|
|
413
|
-
* @default Collapse
|
|
414
|
-
*/
|
|
415
|
-
TransitionComponent: PropTypes.elementType,
|
|
416
|
-
|
|
417
|
-
/**
|
|
418
|
-
* Props applied to the transition element.
|
|
419
|
-
* By default, the element is based on this [`Transition`](http://reactcommunity.org/react-transition-group/transition/) component.
|
|
420
|
-
*/
|
|
421
|
-
TransitionProps: PropTypes.object
|
|
422
|
-
} : void 0;
|
|
423
19
|
export default TreeItem;
|
package/modern/TreeItem/index.js
CHANGED