@mui/lab 5.0.0-alpha.51 → 5.0.0-alpha.55
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/CHANGELOG.md +287 -6
- package/CalendarPicker/CalendarPicker.d.ts +10 -0
- package/CalendarPicker/CalendarPicker.js +13 -1
- package/CalendarPicker/PickersCalendar.d.ts +2 -0
- package/CalendarPicker/PickersCalendar.js +9 -3
- package/CalendarPicker/PickersCalendarHeader.d.ts +1 -0
- package/CalendarPicker/PickersCalendarHeader.js +5 -4
- package/CalendarPicker/PickersFadeTransitionGroup.js +3 -3
- package/CalendarPicker/PickersSlideTransition.js +1 -1
- package/CalendarPickerSkeleton/CalendarPickerSkeleton.d.ts +2 -1
- package/CalendarPickerSkeleton/CalendarPickerSkeleton.js +2 -2
- package/ClockPicker/ClockNumber.js +1 -1
- package/ClockPicker/ClockPicker.js +1 -1
- package/DatePicker/DatePicker.js +2 -0
- package/DatePicker/DatePickerToolbar.js +1 -1
- package/DateRangePicker/DateRangePicker.js +2 -0
- package/DateRangePicker/DateRangePickerToolbar.js +1 -1
- package/DateRangePickerDay/DateRangePickerDay.js +2 -2
- package/DateTimePicker/DateTimePicker.js +2 -0
- package/DateTimePicker/DateTimePickerToolbar.js +1 -1
- package/DesktopDatePicker/DesktopDatePicker.js +2 -0
- package/DesktopDateRangePicker/DesktopDateRangePicker.js +2 -0
- package/DesktopDateTimePicker/DesktopDateTimePicker.js +2 -0
- package/LoadingButton/LoadingButton.js +56 -13
- package/LoadingButton/loadingButtonClasses.js +1 -1
- package/Masonry/Masonry.d.ts +13 -1
- package/Masonry/Masonry.js +232 -60
- package/Masonry/masonryClasses.js +1 -1
- package/MobileDatePicker/MobileDatePicker.js +2 -0
- package/MobileDateRangePicker/MobileDateRangePicker.js +2 -0
- package/MobileDateTimePicker/MobileDateTimePicker.js +2 -0
- package/MonthPicker/MonthPicker.d.ts +4 -0
- package/MonthPicker/MonthPicker.js +23 -6
- package/MonthPicker/PickersMonth.js +19 -14
- package/PickersDay/PickersDay.js +2 -2
- package/StaticDatePicker/StaticDatePicker.js +2 -0
- package/StaticDateRangePicker/StaticDateRangePicker.js +2 -0
- package/StaticDateTimePicker/StaticDateTimePicker.js +2 -0
- package/TabPanel/TabPanel.js +2 -2
- package/TabPanel/tabPanelClasses.js +1 -1
- package/TimePicker/TimePickerToolbar.js +1 -1
- package/Timeline/Timeline.js +2 -2
- package/Timeline/timelineClasses.js +1 -1
- package/TimelineConnector/TimelineConnector.js +2 -2
- package/TimelineConnector/timelineConnectorClasses.js +1 -1
- package/TimelineContent/TimelineContent.js +2 -2
- package/TimelineContent/timelineContentClasses.js +1 -1
- package/TimelineDot/TimelineDot.js +2 -2
- package/TimelineDot/timelineDotClasses.js +1 -1
- package/TimelineItem/TimelineItem.js +2 -2
- package/TimelineItem/timelineItemClasses.js +1 -1
- package/TimelineOppositeContent/TimelineOppositeContent.js +2 -2
- package/TimelineOppositeContent/timelineOppositeContentClasses.js +1 -1
- package/TimelineSeparator/TimelineSeparator.js +2 -2
- package/TimelineSeparator/timelineSeparatorClasses.js +1 -1
- package/TreeItem/TreeItem.js +2 -2
- package/TreeItem/treeItemClasses.js +1 -1
- package/TreeView/TreeView.js +2 -2
- package/TreeView/treeViewClasses.js +1 -1
- package/YearPicker/PickersYear.js +2 -2
- package/YearPicker/YearPicker.d.ts +2 -0
- package/YearPicker/YearPicker.js +18 -2
- package/YearPicker/yearPickerClasses.js +1 -1
- package/index.js +1 -1
- package/internal/pickers/Picker/Picker.d.ts +1 -1
- package/internal/pickers/Picker/PickerView.d.ts +1 -1
- package/internal/pickers/PickersArrowSwitcher.d.ts +2 -2
- package/internal/pickers/PickersArrowSwitcher.js +1 -3
- package/internal/pickers/PickersToolbar.js +1 -1
- package/internal/pickers/PickersToolbarText.js +1 -1
- package/internal/pickers/test-utils.js +14 -7
- package/legacy/CalendarPicker/CalendarPicker.js +13 -1
- package/legacy/CalendarPicker/PickersCalendar.js +10 -3
- package/legacy/CalendarPicker/PickersCalendarHeader.js +5 -4
- package/legacy/CalendarPicker/PickersFadeTransitionGroup.js +4 -6
- package/legacy/CalendarPicker/PickersSlideTransition.js +1 -1
- package/legacy/CalendarPickerSkeleton/CalendarPickerSkeleton.js +2 -2
- package/legacy/ClockPicker/ClockNumber.js +1 -1
- package/legacy/ClockPicker/ClockPicker.js +1 -1
- package/legacy/DatePicker/DatePicker.js +2 -0
- package/legacy/DatePicker/DatePickerToolbar.js +1 -1
- package/legacy/DateRangePicker/DateRangePicker.js +2 -0
- package/legacy/DateRangePicker/DateRangePickerToolbar.js +1 -1
- package/legacy/DateRangePickerDay/DateRangePickerDay.js +2 -2
- package/legacy/DateTimePicker/DateTimePicker.js +2 -0
- package/legacy/DateTimePicker/DateTimePickerToolbar.js +1 -1
- package/legacy/DesktopDatePicker/DesktopDatePicker.js +2 -0
- package/legacy/DesktopDateRangePicker/DesktopDateRangePicker.js +2 -0
- package/legacy/DesktopDateTimePicker/DesktopDateTimePicker.js +2 -0
- package/legacy/LoadingButton/LoadingButton.js +55 -15
- package/legacy/LoadingButton/loadingButtonClasses.js +1 -1
- package/legacy/Masonry/Masonry.js +241 -58
- package/legacy/Masonry/masonryClasses.js +1 -1
- package/legacy/MobileDatePicker/MobileDatePicker.js +2 -0
- package/legacy/MobileDateRangePicker/MobileDateRangePicker.js +2 -0
- package/legacy/MobileDateTimePicker/MobileDateTimePicker.js +2 -0
- package/legacy/MonthPicker/MonthPicker.js +22 -5
- package/legacy/MonthPicker/PickersMonth.js +20 -15
- package/legacy/PickersDay/PickersDay.js +2 -2
- package/legacy/StaticDatePicker/StaticDatePicker.js +2 -0
- package/legacy/StaticDateRangePicker/StaticDateRangePicker.js +2 -0
- package/legacy/StaticDateTimePicker/StaticDateTimePicker.js +2 -0
- package/legacy/TabPanel/TabPanel.js +2 -2
- package/legacy/TabPanel/tabPanelClasses.js +1 -1
- package/legacy/TimePicker/TimePickerToolbar.js +1 -1
- package/legacy/Timeline/Timeline.js +2 -2
- package/legacy/Timeline/timelineClasses.js +1 -1
- package/legacy/TimelineConnector/TimelineConnector.js +2 -2
- package/legacy/TimelineConnector/timelineConnectorClasses.js +1 -1
- package/legacy/TimelineContent/TimelineContent.js +2 -2
- package/legacy/TimelineContent/timelineContentClasses.js +1 -1
- package/legacy/TimelineDot/TimelineDot.js +2 -2
- package/legacy/TimelineDot/timelineDotClasses.js +1 -1
- package/legacy/TimelineItem/TimelineItem.js +2 -2
- package/legacy/TimelineItem/timelineItemClasses.js +1 -1
- package/legacy/TimelineOppositeContent/TimelineOppositeContent.js +2 -2
- package/legacy/TimelineOppositeContent/timelineOppositeContentClasses.js +1 -1
- package/legacy/TimelineSeparator/TimelineSeparator.js +2 -2
- package/legacy/TimelineSeparator/timelineSeparatorClasses.js +1 -1
- package/legacy/TreeItem/TreeItem.js +2 -2
- package/legacy/TreeItem/treeItemClasses.js +1 -1
- package/legacy/TreeView/TreeView.js +2 -2
- package/legacy/TreeView/treeViewClasses.js +1 -1
- package/legacy/YearPicker/PickersYear.js +2 -2
- package/legacy/YearPicker/YearPicker.js +18 -2
- package/legacy/YearPicker/yearPickerClasses.js +1 -1
- package/legacy/index.js +1 -1
- package/legacy/internal/pickers/PickersArrowSwitcher.js +1 -3
- package/legacy/internal/pickers/PickersToolbar.js +1 -1
- package/legacy/internal/pickers/PickersToolbarText.js +1 -1
- package/legacy/internal/pickers/test-utils.js +11 -8
- package/legacy/useAutocomplete/index.js +1 -1
- package/modern/CalendarPicker/CalendarPicker.js +13 -1
- package/modern/CalendarPicker/PickersCalendar.js +9 -3
- package/modern/CalendarPicker/PickersCalendarHeader.js +5 -4
- package/modern/CalendarPicker/PickersFadeTransitionGroup.js +3 -3
- package/modern/CalendarPicker/PickersSlideTransition.js +1 -1
- package/modern/CalendarPickerSkeleton/CalendarPickerSkeleton.js +2 -2
- package/modern/ClockPicker/ClockNumber.js +1 -1
- package/modern/ClockPicker/ClockPicker.js +1 -1
- package/modern/DatePicker/DatePicker.js +2 -0
- package/modern/DatePicker/DatePickerToolbar.js +1 -1
- package/modern/DateRangePicker/DateRangePicker.js +2 -0
- package/modern/DateRangePicker/DateRangePickerToolbar.js +1 -1
- package/modern/DateRangePickerDay/DateRangePickerDay.js +2 -2
- package/modern/DateTimePicker/DateTimePicker.js +2 -0
- package/modern/DateTimePicker/DateTimePickerToolbar.js +1 -1
- package/modern/DesktopDatePicker/DesktopDatePicker.js +2 -0
- package/modern/DesktopDateRangePicker/DesktopDateRangePicker.js +2 -0
- package/modern/DesktopDateTimePicker/DesktopDateTimePicker.js +2 -0
- package/modern/LoadingButton/LoadingButton.js +56 -13
- package/modern/LoadingButton/loadingButtonClasses.js +1 -1
- package/modern/Masonry/Masonry.js +228 -60
- package/modern/Masonry/masonryClasses.js +1 -1
- package/modern/MobileDatePicker/MobileDatePicker.js +2 -0
- package/modern/MobileDateRangePicker/MobileDateRangePicker.js +2 -0
- package/modern/MobileDateTimePicker/MobileDateTimePicker.js +2 -0
- package/modern/MonthPicker/MonthPicker.js +23 -6
- package/modern/MonthPicker/PickersMonth.js +19 -14
- package/modern/PickersDay/PickersDay.js +2 -2
- package/modern/StaticDatePicker/StaticDatePicker.js +2 -0
- package/modern/StaticDateRangePicker/StaticDateRangePicker.js +2 -0
- package/modern/StaticDateTimePicker/StaticDateTimePicker.js +2 -0
- package/modern/TabPanel/TabPanel.js +2 -2
- package/modern/TabPanel/tabPanelClasses.js +1 -1
- package/modern/TimePicker/TimePickerToolbar.js +1 -1
- package/modern/Timeline/Timeline.js +2 -2
- package/modern/Timeline/timelineClasses.js +1 -1
- package/modern/TimelineConnector/TimelineConnector.js +2 -2
- package/modern/TimelineConnector/timelineConnectorClasses.js +1 -1
- package/modern/TimelineContent/TimelineContent.js +2 -2
- package/modern/TimelineContent/timelineContentClasses.js +1 -1
- package/modern/TimelineDot/TimelineDot.js +2 -2
- package/modern/TimelineDot/timelineDotClasses.js +1 -1
- package/modern/TimelineItem/TimelineItem.js +2 -2
- package/modern/TimelineItem/timelineItemClasses.js +1 -1
- package/modern/TimelineOppositeContent/TimelineOppositeContent.js +2 -2
- package/modern/TimelineOppositeContent/timelineOppositeContentClasses.js +1 -1
- package/modern/TimelineSeparator/TimelineSeparator.js +2 -2
- package/modern/TimelineSeparator/timelineSeparatorClasses.js +1 -1
- package/modern/TreeItem/TreeItem.js +2 -2
- package/modern/TreeItem/treeItemClasses.js +1 -1
- package/modern/TreeView/TreeView.js +2 -2
- package/modern/TreeView/treeViewClasses.js +1 -1
- package/modern/YearPicker/PickersYear.js +2 -2
- package/modern/YearPicker/YearPicker.js +18 -2
- package/modern/YearPicker/yearPickerClasses.js +1 -1
- package/modern/index.js +1 -1
- package/modern/internal/pickers/PickersArrowSwitcher.js +1 -3
- package/modern/internal/pickers/PickersToolbar.js +1 -1
- package/modern/internal/pickers/PickersToolbarText.js +1 -1
- package/modern/internal/pickers/test-utils.js +14 -7
- package/modern/useAutocomplete/index.js +1 -1
- package/node/CalendarPicker/CalendarPicker.js +16 -4
- package/node/CalendarPicker/PickersCalendar.js +9 -3
- package/node/CalendarPicker/PickersCalendarHeader.js +5 -4
- package/node/CalendarPicker/PickersFadeTransitionGroup.js +4 -4
- package/node/CalendarPicker/PickersSlideTransition.js +2 -2
- package/node/CalendarPickerSkeleton/CalendarPickerSkeleton.js +5 -5
- package/node/ClockPicker/ClockNumber.js +2 -2
- package/node/ClockPicker/ClockPicker.js +4 -4
- package/node/DatePicker/DatePicker.js +2 -0
- package/node/DatePicker/DatePickerToolbar.js +2 -2
- package/node/DateRangePicker/DateRangePicker.js +2 -0
- package/node/DateRangePicker/DateRangePickerToolbar.js +2 -2
- package/node/DateRangePickerDay/DateRangePickerDay.js +5 -5
- package/node/DateTimePicker/DateTimePicker.js +2 -0
- package/node/DateTimePicker/DateTimePickerToolbar.js +2 -2
- package/node/DesktopDatePicker/DesktopDatePicker.js +2 -0
- package/node/DesktopDateRangePicker/DesktopDateRangePicker.js +2 -0
- package/node/DesktopDateTimePicker/DesktopDateTimePicker.js +2 -0
- package/node/LoadingButton/LoadingButton.js +57 -14
- package/node/LoadingButton/loadingButtonClasses.js +3 -3
- package/node/Masonry/Masonry.js +237 -65
- package/node/Masonry/masonryClasses.js +3 -3
- package/node/MobileDatePicker/MobileDatePicker.js +2 -0
- package/node/MobileDateRangePicker/MobileDateRangePicker.js +2 -0
- package/node/MobileDateTimePicker/MobileDateTimePicker.js +2 -0
- package/node/MonthPicker/MonthPicker.js +26 -9
- package/node/MonthPicker/PickersMonth.js +20 -15
- package/node/PickersDay/PickersDay.js +5 -5
- package/node/StaticDatePicker/StaticDatePicker.js +2 -0
- package/node/StaticDateRangePicker/StaticDateRangePicker.js +2 -0
- package/node/StaticDateTimePicker/StaticDateTimePicker.js +2 -0
- package/node/TabPanel/TabPanel.js +3 -3
- package/node/TabPanel/tabPanelClasses.js +3 -3
- package/node/TimePicker/TimePickerToolbar.js +4 -4
- package/node/Timeline/Timeline.js +3 -3
- package/node/Timeline/timelineClasses.js +3 -3
- package/node/TimelineConnector/TimelineConnector.js +3 -3
- package/node/TimelineConnector/timelineConnectorClasses.js +3 -3
- package/node/TimelineContent/TimelineContent.js +3 -3
- package/node/TimelineContent/timelineContentClasses.js +3 -3
- package/node/TimelineDot/TimelineDot.js +3 -3
- package/node/TimelineDot/timelineDotClasses.js +3 -3
- package/node/TimelineItem/TimelineItem.js +3 -3
- package/node/TimelineItem/timelineItemClasses.js +3 -3
- package/node/TimelineOppositeContent/TimelineOppositeContent.js +3 -3
- package/node/TimelineOppositeContent/timelineOppositeContentClasses.js +3 -3
- package/node/TimelineSeparator/TimelineSeparator.js +3 -3
- package/node/TimelineSeparator/timelineSeparatorClasses.js +3 -3
- package/node/TreeItem/TreeItem.js +3 -3
- package/node/TreeItem/treeItemClasses.js +3 -3
- package/node/TreeView/TreeView.js +3 -3
- package/node/TreeView/treeViewClasses.js +3 -3
- package/node/YearPicker/PickersYear.js +5 -5
- package/node/YearPicker/YearPicker.js +19 -3
- package/node/YearPicker/yearPickerClasses.js +3 -3
- package/node/index.js +1 -1
- package/node/internal/pickers/PickersArrowSwitcher.js +1 -3
- package/node/internal/pickers/PickersToolbar.js +2 -2
- package/node/internal/pickers/PickersToolbarText.js +2 -2
- package/node/internal/pickers/test-utils.js +14 -7
- package/node/useAutocomplete/index.js +3 -3
- package/package.json +6 -5
- package/useAutocomplete/index.d.ts +1 -1
- package/useAutocomplete/index.js +1 -1
- package/Masonry/MasonryContext.js +0 -12
- package/MasonryItem/MasonryItem.d.ts +0 -49
- package/MasonryItem/MasonryItem.js +0 -196
- package/MasonryItem/index.d.ts +0 -5
- package/MasonryItem/index.js +0 -3
- package/MasonryItem/masonryItemClasses.d.ts +0 -8
- package/MasonryItem/masonryItemClasses.js +0 -6
- package/MasonryItem/package.json +0 -6
- package/legacy/Masonry/MasonryContext.js +0 -12
- package/legacy/MasonryItem/MasonryItem.js +0 -201
- package/legacy/MasonryItem/index.js +0 -3
- package/legacy/MasonryItem/masonryItemClasses.js +0 -6
- package/modern/Masonry/MasonryContext.js +0 -12
- package/modern/MasonryItem/MasonryItem.js +0 -196
- package/modern/MasonryItem/index.js +0 -3
- package/modern/MasonryItem/masonryItemClasses.js +0 -6
- package/node/Masonry/MasonryContext.js +0 -24
- package/node/MasonryItem/MasonryItem.js +0 -220
- package/node/MasonryItem/index.js +0 -42
- package/node/MasonryItem/masonryItemClasses.js +0 -17
|
@@ -152,6 +152,7 @@ process.env.NODE_ENV !== "production" ? MobileDatePicker.propTypes
|
|
|
152
152
|
|
|
153
153
|
/**
|
|
154
154
|
* If `true`, the picker and text field are disabled.
|
|
155
|
+
* @default false
|
|
155
156
|
*/
|
|
156
157
|
disabled: PropTypes.bool,
|
|
157
158
|
|
|
@@ -333,6 +334,7 @@ process.env.NODE_ENV !== "production" ? MobileDatePicker.propTypes
|
|
|
333
334
|
|
|
334
335
|
/**
|
|
335
336
|
* Make picker read only.
|
|
337
|
+
* @default false
|
|
336
338
|
*/
|
|
337
339
|
readOnly: PropTypes.bool,
|
|
338
340
|
|
|
@@ -200,6 +200,7 @@ process.env.NODE_ENV !== "production" ? MobileDateRangePicker.propTypes
|
|
|
200
200
|
|
|
201
201
|
/**
|
|
202
202
|
* If `true`, the picker and text field are disabled.
|
|
203
|
+
* @default false
|
|
203
204
|
*/
|
|
204
205
|
disabled: PropTypes.bool,
|
|
205
206
|
|
|
@@ -380,6 +381,7 @@ process.env.NODE_ENV !== "production" ? MobileDateRangePicker.propTypes
|
|
|
380
381
|
|
|
381
382
|
/**
|
|
382
383
|
* Make picker read only.
|
|
384
|
+
* @default false
|
|
383
385
|
*/
|
|
384
386
|
readOnly: PropTypes.bool,
|
|
385
387
|
|
|
@@ -169,6 +169,7 @@ process.env.NODE_ENV !== "production" ? MobileDateTimePicker.propTypes
|
|
|
169
169
|
|
|
170
170
|
/**
|
|
171
171
|
* If `true`, the picker and text field are disabled.
|
|
172
|
+
* @default false
|
|
172
173
|
*/
|
|
173
174
|
disabled: PropTypes.bool,
|
|
174
175
|
|
|
@@ -402,6 +403,7 @@ process.env.NODE_ENV !== "production" ? MobileDateTimePicker.propTypes
|
|
|
402
403
|
|
|
403
404
|
/**
|
|
404
405
|
* Make picker read only.
|
|
406
|
+
* @default false
|
|
405
407
|
*/
|
|
406
408
|
readOnly: PropTypes.bool,
|
|
407
409
|
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
|
-
const _excluded = ["className", "date", "disableFuture", "disablePast", "maxDate", "minDate", "onChange", "onMonthChange"];
|
|
3
|
+
const _excluded = ["className", "date", "disabled", "disableFuture", "disablePast", "maxDate", "minDate", "onChange", "onMonthChange", "readOnly"];
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
6
|
import clsx from 'clsx';
|
|
7
7
|
import { styled, useThemeProps } from '@mui/material/styles';
|
|
8
|
-
import { unstable_composeClasses as composeClasses, generateUtilityClass, generateUtilityClasses } from '@mui/
|
|
8
|
+
import { unstable_composeClasses as composeClasses, generateUtilityClass, generateUtilityClasses } from '@mui/base';
|
|
9
9
|
import PickersMonth from './PickersMonth';
|
|
10
10
|
import { useUtils, useNow } from '../internal/pickers/hooks/useUtils';
|
|
11
11
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -32,7 +32,8 @@ const MonthPickerRoot = styled('div', {
|
|
|
32
32
|
width: 310,
|
|
33
33
|
display: 'flex',
|
|
34
34
|
flexWrap: 'wrap',
|
|
35
|
-
alignContent: 'stretch'
|
|
35
|
+
alignContent: 'stretch',
|
|
36
|
+
margin: '0 4px'
|
|
36
37
|
});
|
|
37
38
|
const MonthPicker = /*#__PURE__*/React.forwardRef(function MonthPicker(inProps, ref) {
|
|
38
39
|
const props = useThemeProps({
|
|
@@ -43,12 +44,14 @@ const MonthPicker = /*#__PURE__*/React.forwardRef(function MonthPicker(inProps,
|
|
|
43
44
|
const {
|
|
44
45
|
className,
|
|
45
46
|
date,
|
|
47
|
+
disabled,
|
|
46
48
|
disableFuture,
|
|
47
49
|
disablePast,
|
|
48
50
|
maxDate,
|
|
49
51
|
minDate,
|
|
50
52
|
onChange,
|
|
51
|
-
onMonthChange
|
|
53
|
+
onMonthChange,
|
|
54
|
+
readOnly
|
|
52
55
|
} = props,
|
|
53
56
|
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
54
57
|
|
|
@@ -67,6 +70,10 @@ const MonthPicker = /*#__PURE__*/React.forwardRef(function MonthPicker(inProps,
|
|
|
67
70
|
};
|
|
68
71
|
|
|
69
72
|
const onMonthSelect = month => {
|
|
73
|
+
if (readOnly) {
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
|
|
70
77
|
const newDate = utils.setMonth(date || now, month);
|
|
71
78
|
onChange(newDate, 'finish');
|
|
72
79
|
|
|
@@ -87,7 +94,7 @@ const MonthPicker = /*#__PURE__*/React.forwardRef(function MonthPicker(inProps,
|
|
|
87
94
|
value: monthNumber,
|
|
88
95
|
selected: monthNumber === currentMonth,
|
|
89
96
|
onSelect: onMonthSelect,
|
|
90
|
-
disabled: shouldDisableMonth(month),
|
|
97
|
+
disabled: disabled || shouldDisableMonth(month),
|
|
91
98
|
children: monthText
|
|
92
99
|
}, monthText);
|
|
93
100
|
})
|
|
@@ -116,6 +123,11 @@ process.env.NODE_ENV !== "production" ? MonthPicker.propTypes
|
|
|
116
123
|
*/
|
|
117
124
|
date: PropTypes.any,
|
|
118
125
|
|
|
126
|
+
/**
|
|
127
|
+
* If `true` picker is disabled
|
|
128
|
+
*/
|
|
129
|
+
disabled: PropTypes.bool,
|
|
130
|
+
|
|
119
131
|
/**
|
|
120
132
|
* If `true` future days are disabled.
|
|
121
133
|
*/
|
|
@@ -146,10 +158,15 @@ process.env.NODE_ENV !== "production" ? MonthPicker.propTypes
|
|
|
146
158
|
*/
|
|
147
159
|
onMonthChange: PropTypes.func,
|
|
148
160
|
|
|
161
|
+
/**
|
|
162
|
+
* If `true` picker is readonly
|
|
163
|
+
*/
|
|
164
|
+
readOnly: PropTypes.bool,
|
|
165
|
+
|
|
149
166
|
/**
|
|
150
167
|
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
151
168
|
*/
|
|
152
|
-
sx: PropTypes.object
|
|
169
|
+
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object])), PropTypes.func, PropTypes.object])
|
|
153
170
|
} : void 0;
|
|
154
171
|
/**
|
|
155
172
|
*
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
1
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
2
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
3
|
const _excluded = ["disabled", "onSelect", "selected", "value"];
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import clsx from 'clsx';
|
|
6
6
|
import Typography from '@mui/material/Typography';
|
|
7
|
-
import { styled } from '@mui/material/styles';
|
|
8
|
-
import { generateUtilityClasses } from '@mui/
|
|
7
|
+
import { styled, alpha } from '@mui/material/styles';
|
|
8
|
+
import { generateUtilityClasses } from '@mui/base';
|
|
9
9
|
import { onSpaceOrEnter } from '../internal/pickers/utils';
|
|
10
10
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
11
11
|
const classes = generateUtilityClasses('PrivatePickersMonth', ['root', 'selected']);
|
|
@@ -13,28 +13,33 @@ const PickersMonthRoot = styled(Typography, {
|
|
|
13
13
|
skipSx: true
|
|
14
14
|
})(({
|
|
15
15
|
theme
|
|
16
|
-
}) => ({
|
|
16
|
+
}) => _extends({
|
|
17
17
|
flex: '1 0 33.33%',
|
|
18
18
|
display: 'flex',
|
|
19
19
|
alignItems: 'center',
|
|
20
20
|
justifyContent: 'center',
|
|
21
|
+
color: 'unset',
|
|
22
|
+
backgroundColor: 'transparent',
|
|
23
|
+
border: 0,
|
|
24
|
+
outline: 0
|
|
25
|
+
}, theme.typography.subtitle1, {
|
|
26
|
+
margin: '8px 0',
|
|
27
|
+
height: 36,
|
|
28
|
+
borderRadius: 18,
|
|
21
29
|
cursor: 'pointer',
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
transition: theme.transitions.create('font-size', {
|
|
25
|
-
duration: '100ms'
|
|
26
|
-
}),
|
|
27
|
-
'&:focus': {
|
|
28
|
-
color: theme.palette.primary.main,
|
|
29
|
-
fontWeight: theme.typography.fontWeightMedium
|
|
30
|
+
'&:focus, &:hover': {
|
|
31
|
+
backgroundColor: alpha(theme.palette.action.active, theme.palette.action.hoverOpacity)
|
|
30
32
|
},
|
|
31
33
|
'&:disabled': {
|
|
32
34
|
pointerEvents: 'none',
|
|
33
35
|
color: theme.palette.text.secondary
|
|
34
36
|
},
|
|
35
37
|
[`&.${classes.selected}`]: {
|
|
36
|
-
color: theme.palette.primary.
|
|
37
|
-
|
|
38
|
+
color: theme.palette.primary.contrastText,
|
|
39
|
+
backgroundColor: theme.palette.primary.main,
|
|
40
|
+
'&:focus, &:hover': {
|
|
41
|
+
backgroundColor: theme.palette.primary.dark
|
|
42
|
+
}
|
|
38
43
|
}
|
|
39
44
|
}));
|
|
40
45
|
/**
|
|
@@ -6,7 +6,7 @@ import PropTypes from 'prop-types';
|
|
|
6
6
|
import clsx from 'clsx';
|
|
7
7
|
import ButtonBase from '@mui/material/ButtonBase';
|
|
8
8
|
import { unstable_useEnhancedEffect as useEnhancedEffect } from '@mui/utils';
|
|
9
|
-
import { unstable_composeClasses as composeClasses, generateUtilityClass, generateUtilityClasses } from '@mui/
|
|
9
|
+
import { unstable_composeClasses as composeClasses, generateUtilityClass, generateUtilityClasses } from '@mui/base';
|
|
10
10
|
import { useTheme, alpha, styled, useThemeProps } from '@mui/material/styles';
|
|
11
11
|
import { useForkRef } from '@mui/material/utils';
|
|
12
12
|
import { useUtils } from '../internal/pickers/hooks/useUtils';
|
|
@@ -374,7 +374,7 @@ process.env.NODE_ENV !== "production" ? PickersDay.propTypes
|
|
|
374
374
|
/**
|
|
375
375
|
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
376
376
|
*/
|
|
377
|
-
sx: PropTypes.object,
|
|
377
|
+
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object])), PropTypes.func, PropTypes.object]),
|
|
378
378
|
|
|
379
379
|
/**
|
|
380
380
|
* If `true`, renders as today date.
|
|
@@ -121,6 +121,7 @@ process.env.NODE_ENV !== "production" ? StaticDatePicker.propTypes
|
|
|
121
121
|
|
|
122
122
|
/**
|
|
123
123
|
* If `true`, the picker and text field are disabled.
|
|
124
|
+
* @default false
|
|
124
125
|
*/
|
|
125
126
|
disabled: PropTypes.bool,
|
|
126
127
|
|
|
@@ -302,6 +303,7 @@ process.env.NODE_ENV !== "production" ? StaticDatePicker.propTypes
|
|
|
302
303
|
|
|
303
304
|
/**
|
|
304
305
|
* Make picker read only.
|
|
306
|
+
* @default false
|
|
305
307
|
*/
|
|
306
308
|
readOnly: PropTypes.bool,
|
|
307
309
|
|
|
@@ -170,6 +170,7 @@ process.env.NODE_ENV !== "production" ? StaticDateRangePicker.propTypes
|
|
|
170
170
|
|
|
171
171
|
/**
|
|
172
172
|
* If `true`, the picker and text field are disabled.
|
|
173
|
+
* @default false
|
|
173
174
|
*/
|
|
174
175
|
disabled: PropTypes.bool,
|
|
175
176
|
|
|
@@ -348,6 +349,7 @@ process.env.NODE_ENV !== "production" ? StaticDateRangePicker.propTypes
|
|
|
348
349
|
|
|
349
350
|
/**
|
|
350
351
|
* Make picker read only.
|
|
352
|
+
* @default false
|
|
351
353
|
*/
|
|
352
354
|
readOnly: PropTypes.bool,
|
|
353
355
|
|
|
@@ -138,6 +138,7 @@ process.env.NODE_ENV !== "production" ? StaticDateTimePicker.propTypes
|
|
|
138
138
|
|
|
139
139
|
/**
|
|
140
140
|
* If `true`, the picker and text field are disabled.
|
|
141
|
+
* @default false
|
|
141
142
|
*/
|
|
142
143
|
disabled: PropTypes.bool,
|
|
143
144
|
|
|
@@ -371,6 +372,7 @@ process.env.NODE_ENV !== "production" ? StaticDateTimePicker.propTypes
|
|
|
371
372
|
|
|
372
373
|
/**
|
|
373
374
|
* Make picker read only.
|
|
375
|
+
* @default false
|
|
374
376
|
*/
|
|
375
377
|
readOnly: PropTypes.bool,
|
|
376
378
|
|
|
@@ -5,7 +5,7 @@ import * as React from 'react';
|
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
6
|
import clsx from 'clsx';
|
|
7
7
|
import { styled, useThemeProps } from '@mui/material/styles';
|
|
8
|
-
import { unstable_composeClasses as composeClasses } from '@mui/
|
|
8
|
+
import { unstable_composeClasses as composeClasses } from '@mui/base';
|
|
9
9
|
import { getTabPanelUtilityClass } from './tabPanelClasses';
|
|
10
10
|
import { getPanelId, getTabId, useTabContext } from '../TabContext';
|
|
11
11
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -91,7 +91,7 @@ process.env.NODE_ENV !== "production" ? TabPanel.propTypes
|
|
|
91
91
|
/**
|
|
92
92
|
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
93
93
|
*/
|
|
94
|
-
sx: PropTypes.object,
|
|
94
|
+
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object])), PropTypes.func, PropTypes.object]),
|
|
95
95
|
|
|
96
96
|
/**
|
|
97
97
|
* The `value` of the corresponding `Tab`. Must use the index of the `Tab` when
|
|
@@ -4,7 +4,7 @@ const _excluded = ["ampm", "ampmInClock", "date", "isLandscape", "isMobileKeyboa
|
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import clsx from 'clsx';
|
|
6
6
|
import { useTheme, styled } from '@mui/material/styles';
|
|
7
|
-
import { unstable_composeClasses as composeClasses, generateUtilityClass, generateUtilityClasses } from '@mui/
|
|
7
|
+
import { unstable_composeClasses as composeClasses, generateUtilityClass, generateUtilityClasses } from '@mui/base';
|
|
8
8
|
import PickersToolbarText from '../internal/pickers/PickersToolbarText';
|
|
9
9
|
import PickersToolbarButton from '../internal/pickers/PickersToolbarButton';
|
|
10
10
|
import PickersToolbar from '../internal/pickers/PickersToolbar';
|
|
@@ -5,7 +5,7 @@ import * as React from 'react';
|
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
6
|
import clsx from 'clsx';
|
|
7
7
|
import { capitalize } from '@mui/material/utils';
|
|
8
|
-
import { unstable_composeClasses as composeClasses } from '@mui/
|
|
8
|
+
import { unstable_composeClasses as composeClasses } from '@mui/base';
|
|
9
9
|
import { styled, useThemeProps } from '@mui/material/styles';
|
|
10
10
|
import TimelineContext from './TimelineContext';
|
|
11
11
|
import { getTimelineUtilityClass } from './timelineClasses';
|
|
@@ -109,7 +109,7 @@ process.env.NODE_ENV !== "production" ? Timeline.propTypes
|
|
|
109
109
|
/**
|
|
110
110
|
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
111
111
|
*/
|
|
112
|
-
sx: PropTypes.object
|
|
112
|
+
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object])), PropTypes.func, PropTypes.object])
|
|
113
113
|
} : void 0;
|
|
114
114
|
/**
|
|
115
115
|
*
|
|
@@ -4,7 +4,7 @@ const _excluded = ["className"];
|
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
6
|
import clsx from 'clsx';
|
|
7
|
-
import { unstable_composeClasses as composeClasses } from '@mui/
|
|
7
|
+
import { unstable_composeClasses as composeClasses } from '@mui/base';
|
|
8
8
|
import { styled, useThemeProps } from '@mui/material/styles';
|
|
9
9
|
import { getTimelineConnectorUtilityClass } from './timelineConnectorClasses';
|
|
10
10
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -77,6 +77,6 @@ process.env.NODE_ENV !== "production" ? TimelineConnector.propTypes
|
|
|
77
77
|
/**
|
|
78
78
|
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
79
79
|
*/
|
|
80
|
-
sx: PropTypes.object
|
|
80
|
+
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object])), PropTypes.func, PropTypes.object])
|
|
81
81
|
} : void 0;
|
|
82
82
|
export default TimelineConnector;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { generateUtilityClass, generateUtilityClasses } from '@mui/
|
|
1
|
+
import { generateUtilityClass, generateUtilityClasses } from '@mui/base';
|
|
2
2
|
export function getTimelineConnectorUtilityClass(slot) {
|
|
3
3
|
return generateUtilityClass('MuiTimelineConnector', slot);
|
|
4
4
|
}
|
|
@@ -6,7 +6,7 @@ import PropTypes from 'prop-types';
|
|
|
6
6
|
import clsx from 'clsx';
|
|
7
7
|
import { capitalize } from '@mui/material/utils';
|
|
8
8
|
import { styled, useThemeProps } from '@mui/material/styles';
|
|
9
|
-
import { unstable_composeClasses as composeClasses } from '@mui/
|
|
9
|
+
import { unstable_composeClasses as composeClasses } from '@mui/base';
|
|
10
10
|
import Typography from '@mui/material/Typography';
|
|
11
11
|
import TimelineContext from '../Timeline/TimelineContext';
|
|
12
12
|
import { getTimelineContentUtilityClass } from './timelineContentClasses';
|
|
@@ -94,6 +94,6 @@ process.env.NODE_ENV !== "production" ? TimelineContent.propTypes
|
|
|
94
94
|
/**
|
|
95
95
|
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
96
96
|
*/
|
|
97
|
-
sx: PropTypes.object
|
|
97
|
+
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object])), PropTypes.func, PropTypes.object])
|
|
98
98
|
} : void 0;
|
|
99
99
|
export default TimelineContent;
|
|
@@ -6,7 +6,7 @@ import PropTypes from 'prop-types';
|
|
|
6
6
|
import clsx from 'clsx';
|
|
7
7
|
import { styled, useThemeProps } from '@mui/material/styles';
|
|
8
8
|
import { capitalize } from '@mui/material/utils';
|
|
9
|
-
import { unstable_composeClasses as composeClasses } from '@mui/
|
|
9
|
+
import { unstable_composeClasses as composeClasses } from '@mui/base';
|
|
10
10
|
import { getTimelineDotUtilityClass } from './timelineDotClasses';
|
|
11
11
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
12
12
|
|
|
@@ -116,7 +116,7 @@ process.env.NODE_ENV !== "production" ? TimelineDot.propTypes
|
|
|
116
116
|
/**
|
|
117
117
|
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
118
118
|
*/
|
|
119
|
-
sx: PropTypes.object,
|
|
119
|
+
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object])), PropTypes.func, PropTypes.object]),
|
|
120
120
|
|
|
121
121
|
/**
|
|
122
122
|
* The dot can appear filled or outlined.
|
|
@@ -6,7 +6,7 @@ import PropTypes from 'prop-types';
|
|
|
6
6
|
import clsx from 'clsx';
|
|
7
7
|
import { capitalize, isMuiElement } from '@mui/material/utils';
|
|
8
8
|
import { styled, useThemeProps } from '@mui/material/styles';
|
|
9
|
-
import { unstable_composeClasses as composeClasses } from '@mui/
|
|
9
|
+
import { unstable_composeClasses as composeClasses } from '@mui/base';
|
|
10
10
|
import { timelineContentClasses } from '../TimelineContent';
|
|
11
11
|
import { timelineOppositeContentClasses } from '../TimelineOppositeContent';
|
|
12
12
|
import TimelineContext from '../Timeline/TimelineContext';
|
|
@@ -130,6 +130,6 @@ process.env.NODE_ENV !== "production" ? TimelineItem.propTypes
|
|
|
130
130
|
/**
|
|
131
131
|
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
132
132
|
*/
|
|
133
|
-
sx: PropTypes.object
|
|
133
|
+
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object])), PropTypes.func, PropTypes.object])
|
|
134
134
|
} : void 0;
|
|
135
135
|
export default TimelineItem;
|
|
@@ -6,7 +6,7 @@ import PropTypes from 'prop-types';
|
|
|
6
6
|
import clsx from 'clsx';
|
|
7
7
|
import { styled, useThemeProps } from '@mui/material/styles';
|
|
8
8
|
import { capitalize } from '@mui/material/utils';
|
|
9
|
-
import { unstable_composeClasses as composeClasses } from '@mui/
|
|
9
|
+
import { unstable_composeClasses as composeClasses } from '@mui/base';
|
|
10
10
|
import Typography from '@mui/material/Typography';
|
|
11
11
|
import TimelineContext from '../Timeline/TimelineContext';
|
|
12
12
|
import { getTimelineOppositeContentUtilityClass } from './timelineOppositeContentClasses';
|
|
@@ -95,7 +95,7 @@ process.env.NODE_ENV !== "production" ? TimelineOppositeContent.propTypes
|
|
|
95
95
|
/**
|
|
96
96
|
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
97
97
|
*/
|
|
98
|
-
sx: PropTypes.object
|
|
98
|
+
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object])), PropTypes.func, PropTypes.object])
|
|
99
99
|
} : void 0;
|
|
100
100
|
TimelineOppositeContent.muiName = 'TimelineOppositeContent';
|
|
101
101
|
export default TimelineOppositeContent;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { generateUtilityClass, generateUtilityClasses } from '@mui/
|
|
1
|
+
import { generateUtilityClass, generateUtilityClasses } from '@mui/base';
|
|
2
2
|
export function getTimelineOppositeContentUtilityClass(slot) {
|
|
3
3
|
return generateUtilityClass('MuiTimelineOppositeContent', slot);
|
|
4
4
|
}
|
|
@@ -4,7 +4,7 @@ const _excluded = ["className"];
|
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
6
|
import clsx from 'clsx';
|
|
7
|
-
import { unstable_composeClasses as composeClasses } from '@mui/
|
|
7
|
+
import { unstable_composeClasses as composeClasses } from '@mui/base';
|
|
8
8
|
import { styled, useThemeProps } from '@mui/material/styles';
|
|
9
9
|
import { getTimelineSeparatorUtilityClass } from './timelineSeparatorClasses';
|
|
10
10
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -74,6 +74,6 @@ process.env.NODE_ENV !== "production" ? TimelineSeparator.propTypes
|
|
|
74
74
|
/**
|
|
75
75
|
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
76
76
|
*/
|
|
77
|
-
sx: PropTypes.object
|
|
77
|
+
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object])), PropTypes.func, PropTypes.object])
|
|
78
78
|
} : void 0;
|
|
79
79
|
export default TimelineSeparator;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { generateUtilityClass, generateUtilityClasses } from '@mui/
|
|
1
|
+
import { generateUtilityClass, generateUtilityClasses } from '@mui/base';
|
|
2
2
|
export function getTimelineSeparatorUtilityClass(slot) {
|
|
3
3
|
return generateUtilityClass('MuiTimelineSeparator', slot);
|
|
4
4
|
}
|
|
@@ -8,7 +8,7 @@ import { elementTypeAcceptingRef } from '@mui/utils';
|
|
|
8
8
|
import Collapse from '@mui/material/Collapse';
|
|
9
9
|
import { alpha, styled, useThemeProps } from '@mui/material/styles';
|
|
10
10
|
import { ownerDocument, useForkRef, unsupportedProp } from '@mui/material/utils';
|
|
11
|
-
import { unstable_composeClasses as composeClasses } from '@mui/
|
|
11
|
+
import { unstable_composeClasses as composeClasses } from '@mui/base';
|
|
12
12
|
import TreeViewContext from '../TreeView/TreeViewContext';
|
|
13
13
|
import { DescendantProvider, useDescendant } from '../TreeView/descendants';
|
|
14
14
|
import TreeItemContent from './TreeItemContent';
|
|
@@ -405,7 +405,7 @@ process.env.NODE_ENV !== "production" ? TreeItem.propTypes
|
|
|
405
405
|
/**
|
|
406
406
|
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
407
407
|
*/
|
|
408
|
-
sx: PropTypes.object,
|
|
408
|
+
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object])), PropTypes.func, PropTypes.object]),
|
|
409
409
|
|
|
410
410
|
/**
|
|
411
411
|
* The component used for the transition.
|
|
@@ -5,7 +5,7 @@ import * as React from 'react';
|
|
|
5
5
|
import clsx from 'clsx';
|
|
6
6
|
import PropTypes from 'prop-types';
|
|
7
7
|
import { styled, useTheme, useThemeProps } from '@mui/material/styles';
|
|
8
|
-
import { unstable_composeClasses as composeClasses } from '@mui/
|
|
8
|
+
import { unstable_composeClasses as composeClasses } from '@mui/base';
|
|
9
9
|
import { useControlled, useForkRef, ownerDocument, unstable_useId as useId } from '@mui/material/utils';
|
|
10
10
|
import TreeViewContext from './TreeViewContext';
|
|
11
11
|
import { DescendantProvider } from './descendants';
|
|
@@ -973,6 +973,6 @@ process.env.NODE_ENV !== "production" ? TreeView.propTypes
|
|
|
973
973
|
/**
|
|
974
974
|
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
975
975
|
*/
|
|
976
|
-
sx: PropTypes.object
|
|
976
|
+
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object])), PropTypes.func, PropTypes.object])
|
|
977
977
|
} : void 0;
|
|
978
978
|
export default TreeView;
|
|
@@ -3,7 +3,7 @@ import * as React from 'react';
|
|
|
3
3
|
import clsx from 'clsx';
|
|
4
4
|
import { useForkRef, capitalize } from '@mui/material/utils';
|
|
5
5
|
import { alpha, styled } from '@mui/material/styles';
|
|
6
|
-
import { unstable_composeClasses as composeClasses, generateUtilityClass, generateUtilityClasses } from '@mui/
|
|
6
|
+
import { unstable_composeClasses as composeClasses, generateUtilityClass, generateUtilityClasses } from '@mui/base';
|
|
7
7
|
import { WrapperVariantContext } from '../internal/pickers/wrappers/WrapperVariantContext';
|
|
8
8
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
9
|
export function getPickersYearUtilityClass(slot) {
|
|
@@ -50,7 +50,7 @@ const PickersYearButton = styled('button', {
|
|
|
50
50
|
margin: '8px 0',
|
|
51
51
|
height: 36,
|
|
52
52
|
width: 72,
|
|
53
|
-
borderRadius:
|
|
53
|
+
borderRadius: 18,
|
|
54
54
|
cursor: 'pointer',
|
|
55
55
|
'&:focus, &:hover': {
|
|
56
56
|
backgroundColor: alpha(theme.palette.action.active, theme.palette.action.hoverOpacity)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import { useTheme, styled, useThemeProps as useThemProps } from '@mui/material/styles';
|
|
4
|
-
import { unstable_composeClasses as composeClasses } from '@mui/
|
|
4
|
+
import { unstable_composeClasses as composeClasses } from '@mui/base';
|
|
5
5
|
import clsx from 'clsx';
|
|
6
6
|
import PickersYear from './PickersYear';
|
|
7
7
|
import { useUtils, useNow } from '../internal/pickers/hooks/useUtils';
|
|
@@ -41,6 +41,7 @@ const YearPicker = /*#__PURE__*/React.forwardRef(function YearPicker(inProps, re
|
|
|
41
41
|
autoFocus,
|
|
42
42
|
className,
|
|
43
43
|
date,
|
|
44
|
+
disabled,
|
|
44
45
|
disableFuture,
|
|
45
46
|
disablePast,
|
|
46
47
|
isDateDisabled,
|
|
@@ -49,6 +50,7 @@ const YearPicker = /*#__PURE__*/React.forwardRef(function YearPicker(inProps, re
|
|
|
49
50
|
onChange,
|
|
50
51
|
onFocusedDayChange,
|
|
51
52
|
onYearChange,
|
|
53
|
+
readOnly,
|
|
52
54
|
shouldDisableYear
|
|
53
55
|
} = props;
|
|
54
56
|
const ownerState = props;
|
|
@@ -63,6 +65,10 @@ const YearPicker = /*#__PURE__*/React.forwardRef(function YearPicker(inProps, re
|
|
|
63
65
|
const [focusedYear, setFocusedYear] = React.useState(currentYear);
|
|
64
66
|
|
|
65
67
|
const handleYearSelection = (event, year, isFinish = 'finish') => {
|
|
68
|
+
if (readOnly) {
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
|
|
66
72
|
const submitDate = newDate => {
|
|
67
73
|
onChange(newDate, isFinish);
|
|
68
74
|
|
|
@@ -141,7 +147,7 @@ const YearPicker = /*#__PURE__*/React.forwardRef(function YearPicker(inProps, re
|
|
|
141
147
|
onKeyDown: handleKeyDown,
|
|
142
148
|
autoFocus: autoFocus && yearNumber === focusedYear,
|
|
143
149
|
ref: selected ? selectedYearRef : undefined,
|
|
144
|
-
disabled: disablePast && utils.isBeforeYear(year, now) || disableFuture && utils.isAfterYear(year, now) || shouldDisableYear && shouldDisableYear(year),
|
|
150
|
+
disabled: disabled || disablePast && utils.isBeforeYear(year, now) || disableFuture && utils.isAfterYear(year, now) || shouldDisableYear && shouldDisableYear(year),
|
|
145
151
|
children: utils.format(year, 'year')
|
|
146
152
|
}, utils.format(year, 'year'));
|
|
147
153
|
})
|
|
@@ -175,6 +181,11 @@ process.env.NODE_ENV !== "production" ? YearPicker.propTypes
|
|
|
175
181
|
*/
|
|
176
182
|
date: PropTypes.any,
|
|
177
183
|
|
|
184
|
+
/**
|
|
185
|
+
* @ignore
|
|
186
|
+
*/
|
|
187
|
+
disabled: PropTypes.bool,
|
|
188
|
+
|
|
178
189
|
/**
|
|
179
190
|
* @ignore
|
|
180
191
|
*/
|
|
@@ -215,6 +226,11 @@ process.env.NODE_ENV !== "production" ? YearPicker.propTypes
|
|
|
215
226
|
*/
|
|
216
227
|
onYearChange: PropTypes.func,
|
|
217
228
|
|
|
229
|
+
/**
|
|
230
|
+
* @ignore
|
|
231
|
+
*/
|
|
232
|
+
readOnly: PropTypes.bool,
|
|
233
|
+
|
|
218
234
|
/**
|
|
219
235
|
* Disable specific years dynamically.
|
|
220
236
|
* Works like `shouldDisableDate` but for year selection view @DateIOType.
|
package/modern/index.js
CHANGED
|
@@ -9,9 +9,7 @@ import ArrowLeftIcon from '../svg-icons/ArrowLeft';
|
|
|
9
9
|
import ArrowRightIcon from '../svg-icons/ArrowRight';
|
|
10
10
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
11
11
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
12
|
-
const PickersArrowSwitcherRoot = styled('div'
|
|
13
|
-
skipSx: true
|
|
14
|
-
})({
|
|
12
|
+
const PickersArrowSwitcherRoot = styled('div')({
|
|
15
13
|
display: 'flex'
|
|
16
14
|
});
|
|
17
15
|
const PickersArrowSwitcherSpacer = styled('div', {
|