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