@mui/x-date-pickers 8.0.0-alpha.4 → 8.0.0-alpha.6
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 +182 -0
- package/DatePicker/DatePickerToolbar.d.ts +1 -2
- package/DatePicker/DatePickerToolbar.js +6 -17
- package/DateTimePicker/DateTimePicker.types.d.ts +2 -2
- package/DateTimePicker/DateTimePickerTabs.d.ts +2 -5
- package/DateTimePicker/DateTimePickerTabs.js +6 -13
- package/DateTimePicker/DateTimePickerToolbar.d.ts +8 -4
- package/DateTimePicker/DateTimePickerToolbar.js +13 -24
- package/DateTimePicker/shared.d.ts +2 -2
- package/DesktopDatePicker/DesktopDatePicker.types.d.ts +2 -3
- package/DesktopDateTimePicker/DesktopDateTimePicker.types.d.ts +2 -2
- package/DesktopDateTimePicker/DesktopDateTimePickerLayout.d.ts +1 -2
- package/DesktopDateTimePicker/DesktopDateTimePickerLayout.js +1 -11
- package/DesktopTimePicker/DesktopTimePicker.types.d.ts +2 -2
- package/MobileDatePicker/MobileDatePicker.types.d.ts +2 -3
- package/MobileDateTimePicker/MobileDateTimePicker.types.d.ts +4 -4
- package/MobileTimePicker/MobileTimePicker.types.d.ts +4 -4
- package/MonthCalendar/MonthCalendar.d.ts +1 -1
- package/MonthCalendar/MonthCalendar.js +31 -11
- package/MonthCalendar/MonthCalendar.types.d.ts +2 -2
- package/MonthCalendar/MonthCalendarButton.d.ts +24 -0
- package/MonthCalendar/{PickersMonth.js → MonthCalendarButton.js} +20 -61
- package/MonthCalendar/index.d.ts +0 -3
- package/MonthCalendar/index.js +1 -2
- package/MonthCalendar/monthCalendarClasses.d.ts +7 -1
- package/MonthCalendar/monthCalendarClasses.js +1 -1
- package/MultiSectionDigitalClock/MultiSectionDigitalClock.js +3 -0
- package/PickersActionBar/PickersActionBar.d.ts +0 -4
- package/PickersActionBar/PickersActionBar.js +12 -13
- package/PickersLayout/PickersLayout.d.ts +2 -2
- package/PickersLayout/PickersLayout.js +1 -11
- package/PickersLayout/PickersLayout.types.d.ts +12 -14
- package/PickersLayout/usePickerLayout.d.ts +2 -2
- package/PickersLayout/usePickerLayout.js +3 -18
- package/PickersSectionList/PickersSectionList.js +21 -16
- package/PickersSectionList/PickersSectionList.types.d.ts +13 -6
- package/PickersTextField/PickersFilledInput/PickersFilledInput.d.ts +7 -0
- package/PickersTextField/PickersFilledInput/PickersFilledInput.js +34 -28
- package/PickersTextField/PickersFilledInput/pickersFilledInputClasses.d.ts +1 -1
- package/PickersTextField/PickersInput/PickersInput.js +20 -14
- package/PickersTextField/PickersInput/pickersInputClasses.d.ts +3 -2
- package/PickersTextField/PickersInput/pickersInputClasses.js +1 -1
- package/PickersTextField/PickersInputBase/PickersInputBase.d.ts +3 -6
- package/PickersTextField/PickersInputBase/PickersInputBase.js +36 -37
- package/PickersTextField/PickersInputBase/PickersInputBase.types.d.ts +1 -0
- package/PickersTextField/PickersOutlinedInput/Outline.d.ts +0 -1
- package/PickersTextField/PickersOutlinedInput/Outline.js +13 -10
- package/PickersTextField/PickersOutlinedInput/PickersOutlinedInput.js +8 -14
- package/PickersTextField/PickersTextField.js +75 -62
- package/PickersTextField/PickersTextField.types.d.ts +43 -4
- package/PickersTextField/usePickerTextFieldOwnerState.d.ts +4 -0
- package/PickersTextField/usePickerTextFieldOwnerState.js +11 -0
- package/StaticDatePicker/StaticDatePicker.types.d.ts +2 -3
- package/StaticDateTimePicker/StaticDateTimePicker.types.d.ts +2 -2
- package/StaticTimePicker/StaticTimePicker.types.d.ts +2 -2
- package/TimeClock/Clock.d.ts +4 -0
- package/TimeClock/Clock.js +9 -6
- package/TimeClock/TimeClock.js +21 -4
- package/TimePicker/TimePicker.types.d.ts +2 -2
- package/TimePicker/TimePickerToolbar.d.ts +2 -2
- package/TimePicker/TimePickerToolbar.js +6 -20
- package/YearCalendar/YearCalendar.js +46 -13
- package/YearCalendar/YearCalendar.types.d.ts +2 -2
- package/YearCalendar/YearCalendarButton.d.ts +23 -0
- package/YearCalendar/{PickersYear.js → YearCalendarButton.js} +20 -59
- package/YearCalendar/index.d.ts +0 -3
- package/YearCalendar/index.js +1 -2
- package/YearCalendar/yearCalendarClasses.d.ts +7 -1
- package/YearCalendar/yearCalendarClasses.js +1 -1
- package/hooks/index.d.ts +1 -0
- package/hooks/index.js +2 -1
- package/hooks/usePickerActionsContext.d.ts +5 -0
- package/hooks/usePickerActionsContext.js +16 -0
- package/hooks/usePickerContext.d.ts +3 -1
- package/hooks/usePickerContext.js +0 -1
- package/index.js +1 -1
- package/internals/components/PickerProvider.d.ts +11 -6
- package/internals/components/PickerProvider.js +12 -6
- package/internals/components/PickersArrowSwitcher/PickersArrowSwitcher.js +3 -3
- package/internals/components/PickersArrowSwitcher/PickersArrowSwitcher.types.d.ts +1 -1
- package/internals/components/PickersModalDialog.d.ts +1 -3
- package/internals/components/PickersModalDialog.js +9 -3
- package/internals/components/PickersPopper.d.ts +1 -3
- package/internals/components/PickersPopper.js +11 -6
- package/internals/components/PickersToolbar.d.ts +3 -3
- package/internals/hooks/useDesktopPicker/useDesktopPicker.js +9 -9
- package/internals/hooks/useDesktopPicker/useDesktopPicker.types.d.ts +5 -5
- package/internals/hooks/useFieldOwnerState.d.ts +1 -0
- package/internals/hooks/useFieldOwnerState.js +6 -2
- package/internals/hooks/useMobilePicker/useMobilePicker.js +8 -7
- package/internals/hooks/useMobilePicker/useMobilePicker.types.d.ts +5 -5
- package/internals/hooks/usePicker/usePicker.js +1 -3
- package/internals/hooks/usePicker/usePicker.types.d.ts +2 -2
- package/internals/hooks/usePicker/usePickerProvider.js +5 -4
- package/internals/hooks/usePicker/usePickerValue.js +46 -64
- package/internals/hooks/usePicker/usePickerValue.types.d.ts +38 -17
- package/internals/hooks/usePicker/usePickerViews.d.ts +15 -4
- package/internals/hooks/usePicker/usePickerViews.js +9 -7
- package/internals/hooks/useStaticPicker/useStaticPicker.types.d.ts +4 -4
- package/internals/index.d.ts +4 -4
- package/internals/index.js +1 -1
- package/internals/models/props/tabs.d.ts +0 -13
- package/internals/models/props/toolbar.d.ts +1 -16
- package/models/fields.d.ts +11 -1
- package/modern/DatePicker/DatePickerToolbar.js +6 -17
- package/modern/DateTimePicker/DateTimePickerTabs.js +6 -13
- package/modern/DateTimePicker/DateTimePickerToolbar.js +13 -24
- package/modern/DesktopDateTimePicker/DesktopDateTimePickerLayout.js +1 -11
- package/modern/MonthCalendar/MonthCalendar.js +31 -11
- package/modern/MonthCalendar/{PickersMonth.js → MonthCalendarButton.js} +20 -61
- package/modern/MonthCalendar/index.js +1 -2
- package/modern/MonthCalendar/monthCalendarClasses.js +1 -1
- package/modern/MultiSectionDigitalClock/MultiSectionDigitalClock.js +3 -0
- package/modern/PickersActionBar/PickersActionBar.js +12 -13
- package/modern/PickersLayout/PickersLayout.js +1 -11
- package/modern/PickersLayout/usePickerLayout.js +3 -18
- package/modern/PickersSectionList/PickersSectionList.js +21 -16
- package/modern/PickersTextField/PickersFilledInput/PickersFilledInput.js +34 -28
- package/modern/PickersTextField/PickersInput/PickersInput.js +20 -14
- package/modern/PickersTextField/PickersInput/pickersInputClasses.js +1 -1
- package/modern/PickersTextField/PickersInputBase/PickersInputBase.js +36 -37
- package/modern/PickersTextField/PickersOutlinedInput/Outline.js +13 -10
- package/modern/PickersTextField/PickersOutlinedInput/PickersOutlinedInput.js +8 -14
- package/modern/PickersTextField/PickersTextField.js +75 -62
- package/modern/PickersTextField/usePickerTextFieldOwnerState.js +11 -0
- package/modern/TimeClock/Clock.js +9 -6
- package/modern/TimeClock/TimeClock.js +21 -4
- package/modern/TimePicker/TimePickerToolbar.js +6 -20
- package/modern/YearCalendar/YearCalendar.js +46 -13
- package/modern/YearCalendar/{PickersYear.js → YearCalendarButton.js} +20 -59
- package/modern/YearCalendar/index.js +1 -2
- package/modern/YearCalendar/yearCalendarClasses.js +1 -1
- package/modern/hooks/index.js +2 -1
- package/modern/hooks/usePickerActionsContext.js +16 -0
- package/modern/hooks/usePickerContext.js +0 -1
- package/modern/index.js +1 -1
- package/modern/internals/components/PickerProvider.js +12 -6
- package/modern/internals/components/PickersArrowSwitcher/PickersArrowSwitcher.js +3 -3
- package/modern/internals/components/PickersModalDialog.js +9 -3
- package/modern/internals/components/PickersPopper.js +11 -6
- package/modern/internals/hooks/useDesktopPicker/useDesktopPicker.js +9 -9
- package/modern/internals/hooks/useFieldOwnerState.js +6 -2
- package/modern/internals/hooks/useMobilePicker/useMobilePicker.js +8 -7
- package/modern/internals/hooks/usePicker/usePicker.js +1 -3
- package/modern/internals/hooks/usePicker/usePickerProvider.js +5 -4
- package/modern/internals/hooks/usePicker/usePickerValue.js +46 -64
- package/modern/internals/hooks/usePicker/usePickerViews.js +9 -7
- package/modern/internals/index.js +1 -1
- package/node/DatePicker/DatePickerToolbar.js +6 -17
- package/node/DateTimePicker/DateTimePickerTabs.js +6 -13
- package/node/DateTimePicker/DateTimePickerToolbar.js +14 -25
- package/node/DesktopDateTimePicker/DesktopDateTimePickerLayout.js +1 -11
- package/node/MonthCalendar/MonthCalendar.js +31 -11
- package/node/MonthCalendar/{PickersMonth.js → MonthCalendarButton.js} +20 -61
- package/node/MonthCalendar/index.js +1 -8
- package/node/MonthCalendar/monthCalendarClasses.js +1 -1
- package/node/MultiSectionDigitalClock/MultiSectionDigitalClock.js +3 -0
- package/node/PickersActionBar/PickersActionBar.js +12 -13
- package/node/PickersLayout/PickersLayout.js +1 -11
- package/node/PickersLayout/usePickerLayout.js +3 -18
- package/node/PickersSectionList/PickersSectionList.js +21 -16
- package/node/PickersTextField/PickersFilledInput/PickersFilledInput.js +34 -28
- package/node/PickersTextField/PickersInput/PickersInput.js +20 -14
- package/node/PickersTextField/PickersInput/pickersInputClasses.js +1 -1
- package/node/PickersTextField/PickersInputBase/PickersInputBase.js +36 -37
- package/node/PickersTextField/PickersOutlinedInput/Outline.js +13 -10
- package/node/PickersTextField/PickersOutlinedInput/PickersOutlinedInput.js +8 -14
- package/node/PickersTextField/PickersTextField.js +75 -62
- package/node/PickersTextField/usePickerTextFieldOwnerState.js +18 -0
- package/node/TimeClock/Clock.js +9 -6
- package/node/TimeClock/TimeClock.js +21 -4
- package/node/TimePicker/TimePickerToolbar.js +6 -20
- package/node/YearCalendar/YearCalendar.js +45 -12
- package/node/YearCalendar/{PickersYear.js → YearCalendarButton.js} +20 -59
- package/node/YearCalendar/index.js +1 -8
- package/node/YearCalendar/yearCalendarClasses.js +1 -1
- package/node/hooks/index.js +8 -1
- package/node/hooks/usePickerActionsContext.js +22 -0
- package/node/index.js +1 -1
- package/node/internals/components/PickerProvider.js +13 -7
- package/node/internals/components/PickersArrowSwitcher/PickersArrowSwitcher.js +3 -3
- package/node/internals/components/PickersModalDialog.js +9 -3
- package/node/internals/components/PickersPopper.js +11 -6
- package/node/internals/hooks/useDesktopPicker/useDesktopPicker.js +9 -9
- package/node/internals/hooks/useFieldOwnerState.js +6 -2
- package/node/internals/hooks/useMobilePicker/useMobilePicker.js +8 -7
- package/node/internals/hooks/usePicker/usePicker.js +1 -3
- package/node/internals/hooks/usePicker/usePickerProvider.js +5 -4
- package/node/internals/hooks/usePicker/usePickerValue.js +46 -64
- package/node/internals/hooks/usePicker/usePickerViews.js +9 -7
- package/node/internals/index.js +2 -2
- package/package.json +3 -3
- package/themeAugmentation/components.d.ts +0 -8
- package/themeAugmentation/overrides.d.ts +2 -4
- package/themeAugmentation/props.d.ts +4 -7
- package/MonthCalendar/PickersMonth.d.ts +0 -28
- package/MonthCalendar/pickersMonthClasses.d.ts +0 -13
- package/MonthCalendar/pickersMonthClasses.js +0 -5
- package/YearCalendar/PickersYear.d.ts +0 -27
- package/YearCalendar/pickersYearClasses.d.ts +0 -13
- package/YearCalendar/pickersYearClasses.js +0 -5
- package/modern/MonthCalendar/pickersMonthClasses.js +0 -5
- package/modern/YearCalendar/pickersYearClasses.js +0 -5
- package/node/MonthCalendar/pickersMonthClasses.js +0 -12
- package/node/YearCalendar/pickersYearClasses.js +0 -12
|
@@ -5,51 +5,31 @@ var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWild
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.
|
|
8
|
+
exports.MonthCalendarButton = void 0;
|
|
9
9
|
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
|
|
10
10
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
11
|
var React = _interopRequireWildcard(require("react"));
|
|
12
|
-
var _clsx = _interopRequireDefault(require("clsx"));
|
|
13
12
|
var _styles = require("@mui/material/styles");
|
|
14
13
|
var _useSlotProps = _interopRequireDefault(require("@mui/utils/useSlotProps"));
|
|
15
14
|
var _composeClasses = _interopRequireDefault(require("@mui/utils/composeClasses"));
|
|
16
15
|
var _useEnhancedEffect = _interopRequireDefault(require("@mui/utils/useEnhancedEffect"));
|
|
17
|
-
var _pickersMonthClasses = require("./pickersMonthClasses");
|
|
18
16
|
var _usePickerPrivateContext = require("../internals/hooks/usePickerPrivateContext");
|
|
17
|
+
var _monthCalendarClasses = require("./monthCalendarClasses");
|
|
19
18
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
20
|
-
const _excluded = ["autoFocus", "
|
|
19
|
+
const _excluded = ["autoFocus", "classes", "disabled", "selected", "value", "onClick", "onKeyDown", "onFocus", "onBlur", "slots", "slotProps"];
|
|
21
20
|
const useUtilityClasses = (classes, ownerState) => {
|
|
22
21
|
const slots = {
|
|
23
|
-
|
|
24
|
-
monthButton: ['monthButton', ownerState.isMonthDisabled && 'disabled', ownerState.isMonthSelected && 'selected']
|
|
22
|
+
button: ['button', ownerState.isMonthDisabled && 'disabled', ownerState.isMonthSelected && 'selected']
|
|
25
23
|
};
|
|
26
|
-
return (0, _composeClasses.default)(slots,
|
|
24
|
+
return (0, _composeClasses.default)(slots, _monthCalendarClasses.getMonthCalendarUtilityClass, classes);
|
|
27
25
|
};
|
|
28
|
-
const
|
|
29
|
-
name: '
|
|
30
|
-
slot: '
|
|
31
|
-
overridesResolver: (_, styles) => [styles.
|
|
32
|
-
}
|
|
33
|
-
display: 'flex',
|
|
34
|
-
alignItems: 'center',
|
|
35
|
-
justifyContent: 'center',
|
|
36
|
-
flexBasis: '33.3%',
|
|
37
|
-
variants: [{
|
|
38
|
-
props: {
|
|
39
|
-
monthsPerRow: 4
|
|
40
|
-
},
|
|
41
|
-
style: {
|
|
42
|
-
flexBasis: '25%'
|
|
43
|
-
}
|
|
44
|
-
}]
|
|
45
|
-
});
|
|
46
|
-
const MonthCalendarButton = (0, _styles.styled)('button', {
|
|
47
|
-
name: 'MuiPickersMonth',
|
|
48
|
-
slot: 'MonthButton',
|
|
49
|
-
overridesResolver: (_, styles) => [styles.monthButton, {
|
|
50
|
-
[`&.${_pickersMonthClasses.pickersMonthClasses.disabled}`]: styles.disabled
|
|
26
|
+
const DefaultMonthButton = (0, _styles.styled)('button', {
|
|
27
|
+
name: 'MuiMonthCalendar',
|
|
28
|
+
slot: 'Button',
|
|
29
|
+
overridesResolver: (_, styles) => [styles.button, {
|
|
30
|
+
[`&.${_monthCalendarClasses.monthCalendarClasses.disabled}`]: styles.disabled
|
|
51
31
|
}, {
|
|
52
|
-
[`&.${
|
|
32
|
+
[`&.${_monthCalendarClasses.monthCalendarClasses.selected}`]: styles.selected
|
|
53
33
|
}]
|
|
54
34
|
})(({
|
|
55
35
|
theme
|
|
@@ -59,7 +39,6 @@ const MonthCalendarButton = (0, _styles.styled)('button', {
|
|
|
59
39
|
border: 0,
|
|
60
40
|
outline: 0
|
|
61
41
|
}, theme.typography.subtitle1, {
|
|
62
|
-
margin: '8px 0',
|
|
63
42
|
height: 36,
|
|
64
43
|
width: 72,
|
|
65
44
|
borderRadius: 18,
|
|
@@ -74,10 +53,10 @@ const MonthCalendarButton = (0, _styles.styled)('button', {
|
|
|
74
53
|
cursor: 'auto',
|
|
75
54
|
pointerEvents: 'none'
|
|
76
55
|
},
|
|
77
|
-
[`&.${
|
|
56
|
+
[`&.${_monthCalendarClasses.monthCalendarClasses.disabled}`]: {
|
|
78
57
|
color: (theme.vars || theme).palette.text.secondary
|
|
79
58
|
},
|
|
80
|
-
[`&.${
|
|
59
|
+
[`&.${_monthCalendarClasses.monthCalendarClasses.selected}`]: {
|
|
81
60
|
color: (theme.vars || theme).palette.primary.contrastText,
|
|
82
61
|
backgroundColor: (theme.vars || theme).palette.primary.main,
|
|
83
62
|
'&:focus, &:hover': {
|
|
@@ -89,29 +68,17 @@ const MonthCalendarButton = (0, _styles.styled)('button', {
|
|
|
89
68
|
/**
|
|
90
69
|
* @ignore - do not document.
|
|
91
70
|
*/
|
|
92
|
-
const
|
|
93
|
-
const props = (0, _styles.useThemeProps)({
|
|
94
|
-
props: inProps,
|
|
95
|
-
name: 'MuiPickersMonth'
|
|
96
|
-
});
|
|
71
|
+
const MonthCalendarButton = exports.MonthCalendarButton = /*#__PURE__*/React.memo(function MonthCalendarButton(props) {
|
|
97
72
|
const {
|
|
98
73
|
autoFocus,
|
|
99
|
-
className,
|
|
100
74
|
classes: classesProp,
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
selected = false,
|
|
75
|
+
disabled,
|
|
76
|
+
selected,
|
|
104
77
|
value,
|
|
105
|
-
tabIndex,
|
|
106
78
|
onClick,
|
|
107
79
|
onKeyDown,
|
|
108
80
|
onFocus,
|
|
109
81
|
onBlur,
|
|
110
|
-
'aria-current': ariaCurrent,
|
|
111
|
-
'aria-label': ariaLabel
|
|
112
|
-
// We don't want to forward this prop to the root element
|
|
113
|
-
,
|
|
114
|
-
|
|
115
82
|
slots,
|
|
116
83
|
slotProps
|
|
117
84
|
} = props,
|
|
@@ -133,32 +100,24 @@ const PickersMonth = exports.PickersMonth = /*#__PURE__*/React.memo(function Pic
|
|
|
133
100
|
ref.current?.focus();
|
|
134
101
|
}
|
|
135
102
|
}, [autoFocus]);
|
|
136
|
-
const MonthButton = slots?.monthButton ??
|
|
103
|
+
const MonthButton = slots?.monthButton ?? DefaultMonthButton;
|
|
137
104
|
const monthButtonProps = (0, _useSlotProps.default)({
|
|
138
105
|
elementType: MonthButton,
|
|
139
106
|
externalSlotProps: slotProps?.monthButton,
|
|
107
|
+
externalForwardedProps: other,
|
|
140
108
|
additionalProps: {
|
|
141
|
-
children,
|
|
142
109
|
disabled,
|
|
143
|
-
tabIndex,
|
|
144
110
|
ref,
|
|
145
111
|
type: 'button',
|
|
146
112
|
role: 'radio',
|
|
147
|
-
'aria-current': ariaCurrent,
|
|
148
113
|
'aria-checked': selected,
|
|
149
|
-
'aria-label': ariaLabel,
|
|
150
114
|
onClick: event => onClick(event, value),
|
|
151
115
|
onKeyDown: event => onKeyDown(event, value),
|
|
152
116
|
onFocus: event => onFocus(event, value),
|
|
153
117
|
onBlur: event => onBlur(event, value)
|
|
154
118
|
},
|
|
155
119
|
ownerState,
|
|
156
|
-
className: classes.
|
|
120
|
+
className: classes.button
|
|
157
121
|
});
|
|
158
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
159
|
-
className: (0, _clsx.default)(classes.root, className),
|
|
160
|
-
ownerState: ownerState
|
|
161
|
-
}, other, {
|
|
162
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(MonthButton, (0, _extends2.default)({}, monthButtonProps))
|
|
163
|
-
}));
|
|
122
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(MonthButton, (0, _extends2.default)({}, monthButtonProps));
|
|
164
123
|
});
|
|
@@ -21,12 +21,5 @@ Object.defineProperty(exports, "monthCalendarClasses", {
|
|
|
21
21
|
return _monthCalendarClasses.monthCalendarClasses;
|
|
22
22
|
}
|
|
23
23
|
});
|
|
24
|
-
Object.defineProperty(exports, "pickersMonthClasses", {
|
|
25
|
-
enumerable: true,
|
|
26
|
-
get: function () {
|
|
27
|
-
return _pickersMonthClasses.pickersMonthClasses;
|
|
28
|
-
}
|
|
29
|
-
});
|
|
30
24
|
var _MonthCalendar = require("./MonthCalendar");
|
|
31
|
-
var _monthCalendarClasses = require("./monthCalendarClasses");
|
|
32
|
-
var _pickersMonthClasses = require("./pickersMonthClasses");
|
|
25
|
+
var _monthCalendarClasses = require("./monthCalendarClasses");
|
|
@@ -9,4 +9,4 @@ var _utils = require("@mui/utils");
|
|
|
9
9
|
function getMonthCalendarUtilityClass(slot) {
|
|
10
10
|
return (0, _utils.unstable_generateUtilityClass)('MuiMonthCalendar', slot);
|
|
11
11
|
}
|
|
12
|
-
const monthCalendarClasses = exports.monthCalendarClasses = (0, _utils.unstable_generateUtilityClasses)('MuiMonthCalendar', ['root']);
|
|
12
|
+
const monthCalendarClasses = exports.monthCalendarClasses = (0, _utils.unstable_generateUtilityClasses)('MuiMonthCalendar', ['root', 'button', 'disabled', 'selected']);
|
|
@@ -196,6 +196,9 @@ const MultiSectionDigitalClock = exports.MultiSectionDigitalClock = /*#__PURE__*
|
|
|
196
196
|
{
|
|
197
197
|
const valueWithMeridiem = (0, _timeUtils.convertValueToMeridiem)(rawValue, meridiemMode, ampm);
|
|
198
198
|
const dateWithNewHours = utils.setHours(valueOrReferenceDate, valueWithMeridiem);
|
|
199
|
+
if (utils.getHours(dateWithNewHours) !== valueWithMeridiem) {
|
|
200
|
+
return true;
|
|
201
|
+
}
|
|
199
202
|
const start = utils.setSeconds(utils.setMinutes(dateWithNewHours, 0), 0);
|
|
200
203
|
const end = utils.setSeconds(utils.setMinutes(dateWithNewHours, 59), 59);
|
|
201
204
|
return !containsValidTime({
|
|
@@ -15,8 +15,9 @@ var _styles = require("@mui/material/styles");
|
|
|
15
15
|
var _Button = _interopRequireDefault(require("@mui/material/Button"));
|
|
16
16
|
var _DialogActions = _interopRequireDefault(require("@mui/material/DialogActions"));
|
|
17
17
|
var _usePickerTranslations = require("../hooks/usePickerTranslations");
|
|
18
|
+
var _hooks = require("../hooks");
|
|
18
19
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
19
|
-
const _excluded = ["
|
|
20
|
+
const _excluded = ["actions"];
|
|
20
21
|
const PickersActionBarRoot = (0, _styles.styled)(_DialogActions.default, {
|
|
21
22
|
name: 'MuiPickersLayout',
|
|
22
23
|
slot: 'ActionBar',
|
|
@@ -35,14 +36,16 @@ const PickersActionBarRoot = (0, _styles.styled)(_DialogActions.default, {
|
|
|
35
36
|
*/
|
|
36
37
|
function PickersActionBar(props) {
|
|
37
38
|
const {
|
|
38
|
-
onAccept,
|
|
39
|
-
onClear,
|
|
40
|
-
onCancel,
|
|
41
|
-
onSetToday,
|
|
42
39
|
actions
|
|
43
40
|
} = props,
|
|
44
41
|
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
|
|
45
42
|
const translations = (0, _usePickerTranslations.usePickerTranslations)();
|
|
43
|
+
const {
|
|
44
|
+
clearValue,
|
|
45
|
+
setValueToToday,
|
|
46
|
+
acceptValueChanges,
|
|
47
|
+
cancelValueChanges
|
|
48
|
+
} = (0, _hooks.usePickerActionsContext)();
|
|
46
49
|
if (actions == null || actions.length === 0) {
|
|
47
50
|
return null;
|
|
48
51
|
}
|
|
@@ -50,22 +53,22 @@ function PickersActionBar(props) {
|
|
|
50
53
|
switch (actionType) {
|
|
51
54
|
case 'clear':
|
|
52
55
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Button.default, {
|
|
53
|
-
onClick:
|
|
56
|
+
onClick: clearValue,
|
|
54
57
|
children: translations.clearButtonLabel
|
|
55
58
|
}, actionType);
|
|
56
59
|
case 'cancel':
|
|
57
60
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Button.default, {
|
|
58
|
-
onClick:
|
|
61
|
+
onClick: cancelValueChanges,
|
|
59
62
|
children: translations.cancelButtonLabel
|
|
60
63
|
}, actionType);
|
|
61
64
|
case 'accept':
|
|
62
65
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Button.default, {
|
|
63
|
-
onClick:
|
|
66
|
+
onClick: acceptValueChanges,
|
|
64
67
|
children: translations.okButtonLabel
|
|
65
68
|
}, actionType);
|
|
66
69
|
case 'today':
|
|
67
70
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Button.default, {
|
|
68
|
-
onClick:
|
|
71
|
+
onClick: setValueToToday,
|
|
69
72
|
children: translations.todayButtonLabel
|
|
70
73
|
}, actionType);
|
|
71
74
|
default:
|
|
@@ -92,10 +95,6 @@ process.env.NODE_ENV !== "production" ? PickersActionBar.propTypes = {
|
|
|
92
95
|
* @default false
|
|
93
96
|
*/
|
|
94
97
|
disableSpacing: _propTypes.default.bool,
|
|
95
|
-
onAccept: _propTypes.default.func.isRequired,
|
|
96
|
-
onCancel: _propTypes.default.func.isRequired,
|
|
97
|
-
onClear: _propTypes.default.func.isRequired,
|
|
98
|
-
onSetToday: _propTypes.default.func.isRequired,
|
|
99
98
|
/**
|
|
100
99
|
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
101
100
|
*/
|
|
@@ -158,16 +158,8 @@ process.env.NODE_ENV !== "production" ? PickersLayout.propTypes = {
|
|
|
158
158
|
classes: _propTypes.default.object,
|
|
159
159
|
className: _propTypes.default.string,
|
|
160
160
|
isValid: _propTypes.default.func.isRequired,
|
|
161
|
-
onAccept: _propTypes.default.func.isRequired,
|
|
162
|
-
onCancel: _propTypes.default.func.isRequired,
|
|
163
161
|
onChange: _propTypes.default.func.isRequired,
|
|
164
|
-
onClear: _propTypes.default.func.isRequired,
|
|
165
|
-
onClose: _propTypes.default.func.isRequired,
|
|
166
|
-
onDismiss: _propTypes.default.func.isRequired,
|
|
167
|
-
onOpen: _propTypes.default.func.isRequired,
|
|
168
162
|
onSelectShortcut: _propTypes.default.func.isRequired,
|
|
169
|
-
onSetToday: _propTypes.default.func.isRequired,
|
|
170
|
-
onViewChange: _propTypes.default.func.isRequired,
|
|
171
163
|
/**
|
|
172
164
|
* The props used for each component slot.
|
|
173
165
|
* @default {}
|
|
@@ -182,7 +174,5 @@ process.env.NODE_ENV !== "production" ? PickersLayout.propTypes = {
|
|
|
182
174
|
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
183
175
|
*/
|
|
184
176
|
sx: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object, _propTypes.default.bool])), _propTypes.default.func, _propTypes.default.object]),
|
|
185
|
-
value: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.object), _propTypes.default.object])
|
|
186
|
-
view: _propTypes.default.oneOf(['day', 'hours', 'meridiem', 'minutes', 'month', 'seconds', 'year']),
|
|
187
|
-
views: _propTypes.default.arrayOf(_propTypes.default.oneOf(['day', 'hours', 'meridiem', 'minutes', 'month', 'seconds', 'year']).isRequired).isRequired
|
|
177
|
+
value: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.object), _propTypes.default.object])
|
|
188
178
|
} : void 0;
|
|
@@ -42,17 +42,11 @@ const usePickerLayout = props => {
|
|
|
42
42
|
} = (0, _usePickerPrivateContext.usePickerPrivateContext)();
|
|
43
43
|
const {
|
|
44
44
|
variant,
|
|
45
|
-
orientation
|
|
45
|
+
orientation,
|
|
46
|
+
view
|
|
46
47
|
} = (0, _hooks.usePickerContext)();
|
|
47
48
|
const isRtl = (0, _RtlProvider.useRtl)();
|
|
48
49
|
const {
|
|
49
|
-
onAccept,
|
|
50
|
-
onClear,
|
|
51
|
-
onCancel,
|
|
52
|
-
onSetToday,
|
|
53
|
-
view,
|
|
54
|
-
views,
|
|
55
|
-
onViewChange,
|
|
56
50
|
value,
|
|
57
51
|
onChange,
|
|
58
52
|
onSelectShortcut,
|
|
@@ -77,10 +71,6 @@ const usePickerLayout = props => {
|
|
|
77
71
|
elementType: ActionBar,
|
|
78
72
|
externalSlotProps: slotProps?.actionBar,
|
|
79
73
|
additionalProps: {
|
|
80
|
-
onAccept,
|
|
81
|
-
onClear,
|
|
82
|
-
onCancel,
|
|
83
|
-
onSetToday,
|
|
84
74
|
actions: variant === 'desktop' ? [] : ['cancel', 'accept']
|
|
85
75
|
},
|
|
86
76
|
className: classes.actionBar,
|
|
@@ -97,10 +87,7 @@ const usePickerLayout = props => {
|
|
|
97
87
|
isLandscape: orientation === 'landscape',
|
|
98
88
|
// Will be removed in a follow up PR?
|
|
99
89
|
onChange,
|
|
100
|
-
value
|
|
101
|
-
view,
|
|
102
|
-
onViewChange,
|
|
103
|
-
views
|
|
90
|
+
value
|
|
104
91
|
},
|
|
105
92
|
className: classes.toolbar,
|
|
106
93
|
ownerState
|
|
@@ -113,8 +100,6 @@ const usePickerLayout = props => {
|
|
|
113
100
|
// Tabs
|
|
114
101
|
const Tabs = slots?.tabs;
|
|
115
102
|
const tabs = view && Tabs ? /*#__PURE__*/(0, _jsxRuntime.jsx)(Tabs, (0, _extends2.default)({
|
|
116
|
-
view: view,
|
|
117
|
-
onViewChange: onViewChange,
|
|
118
103
|
className: classes.tabs
|
|
119
104
|
}, slotProps?.tabs)) : null;
|
|
120
105
|
|
|
@@ -16,8 +16,9 @@ var _composeClasses = _interopRequireDefault(require("@mui/utils/composeClasses"
|
|
|
16
16
|
var _useForkRef = _interopRequireDefault(require("@mui/utils/useForkRef"));
|
|
17
17
|
var _styles = require("@mui/material/styles");
|
|
18
18
|
var _pickersSectionListClasses = require("./pickersSectionListClasses");
|
|
19
|
+
var _usePickerPrivateContext = require("../internals/hooks/usePickerPrivateContext");
|
|
19
20
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
20
|
-
const _excluded = ["slots", "slotProps", "elements", "sectionListRef"];
|
|
21
|
+
const _excluded = ["slots", "slotProps", "elements", "sectionListRef", "classes"];
|
|
21
22
|
const PickersSectionListRoot = exports.PickersSectionListRoot = (0, _styles.styled)('div', {
|
|
22
23
|
name: 'MuiPickersSectionList',
|
|
23
24
|
slot: 'Root',
|
|
@@ -45,10 +46,7 @@ const PickersSectionListSectionContent = exports.PickersSectionListSectionConten
|
|
|
45
46
|
})({
|
|
46
47
|
outline: 'none'
|
|
47
48
|
});
|
|
48
|
-
const useUtilityClasses =
|
|
49
|
-
const {
|
|
50
|
-
classes
|
|
51
|
-
} = ownerState;
|
|
49
|
+
const useUtilityClasses = classes => {
|
|
52
50
|
const slots = {
|
|
53
51
|
root: ['root'],
|
|
54
52
|
section: ['section'],
|
|
@@ -63,13 +61,16 @@ function PickersSection(props) {
|
|
|
63
61
|
element,
|
|
64
62
|
classes
|
|
65
63
|
} = props;
|
|
64
|
+
const {
|
|
65
|
+
ownerState
|
|
66
|
+
} = (0, _usePickerPrivateContext.usePickerPrivateContext)();
|
|
66
67
|
const Section = slots?.section ?? PickersSectionListSection;
|
|
67
68
|
const sectionProps = (0, _useSlotProps.default)({
|
|
68
69
|
elementType: Section,
|
|
69
70
|
externalSlotProps: slotProps?.section,
|
|
70
71
|
externalForwardedProps: element.container,
|
|
71
72
|
className: classes.section,
|
|
72
|
-
ownerState
|
|
73
|
+
ownerState
|
|
73
74
|
});
|
|
74
75
|
const SectionContent = slots?.sectionContent ?? PickersSectionListSectionContent;
|
|
75
76
|
const sectionContentProps = (0, _useSlotProps.default)({
|
|
@@ -80,24 +81,24 @@ function PickersSection(props) {
|
|
|
80
81
|
suppressContentEditableWarning: true
|
|
81
82
|
},
|
|
82
83
|
className: classes.sectionContent,
|
|
83
|
-
ownerState
|
|
84
|
+
ownerState
|
|
84
85
|
});
|
|
85
86
|
const SectionSeparator = slots?.sectionSeparator ?? PickersSectionListSectionSeparator;
|
|
86
87
|
const sectionSeparatorBeforeProps = (0, _useSlotProps.default)({
|
|
87
88
|
elementType: SectionSeparator,
|
|
88
89
|
externalSlotProps: slotProps?.sectionSeparator,
|
|
89
90
|
externalForwardedProps: element.before,
|
|
90
|
-
ownerState: {
|
|
91
|
-
|
|
92
|
-
}
|
|
91
|
+
ownerState: (0, _extends2.default)({}, ownerState, {
|
|
92
|
+
separatorPosition: 'before'
|
|
93
|
+
})
|
|
93
94
|
});
|
|
94
95
|
const sectionSeparatorAfterProps = (0, _useSlotProps.default)({
|
|
95
96
|
elementType: SectionSeparator,
|
|
96
97
|
externalSlotProps: slotProps?.sectionSeparator,
|
|
97
98
|
externalForwardedProps: element.after,
|
|
98
|
-
ownerState: {
|
|
99
|
-
|
|
100
|
-
}
|
|
99
|
+
ownerState: (0, _extends2.default)({}, ownerState, {
|
|
100
|
+
separatorPosition: 'after'
|
|
101
|
+
})
|
|
101
102
|
});
|
|
102
103
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(Section, (0, _extends2.default)({}, sectionProps, {
|
|
103
104
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(SectionSeparator, (0, _extends2.default)({}, sectionSeparatorBeforeProps)), /*#__PURE__*/(0, _jsxRuntime.jsx)(SectionContent, (0, _extends2.default)({}, sectionContentProps)), /*#__PURE__*/(0, _jsxRuntime.jsx)(SectionSeparator, (0, _extends2.default)({}, sectionSeparatorAfterProps))]
|
|
@@ -142,10 +143,14 @@ const PickersSectionList = exports.PickersSectionList = /*#__PURE__*/React.forwa
|
|
|
142
143
|
slots,
|
|
143
144
|
slotProps,
|
|
144
145
|
elements,
|
|
145
|
-
sectionListRef
|
|
146
|
+
sectionListRef,
|
|
147
|
+
classes: classesProp
|
|
146
148
|
} = props,
|
|
147
149
|
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
|
|
148
|
-
const classes = useUtilityClasses(
|
|
150
|
+
const classes = useUtilityClasses(classesProp);
|
|
151
|
+
const {
|
|
152
|
+
ownerState
|
|
153
|
+
} = (0, _usePickerPrivateContext.usePickerPrivateContext)();
|
|
149
154
|
const rootRef = React.useRef(null);
|
|
150
155
|
const handleRootRef = (0, _useForkRef.default)(ref, rootRef);
|
|
151
156
|
const getRoot = methodName => {
|
|
@@ -193,7 +198,7 @@ const PickersSectionList = exports.PickersSectionList = /*#__PURE__*/React.forwa
|
|
|
193
198
|
suppressContentEditableWarning: true
|
|
194
199
|
},
|
|
195
200
|
className: classes.root,
|
|
196
|
-
ownerState
|
|
201
|
+
ownerState
|
|
197
202
|
});
|
|
198
203
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(Root, (0, _extends2.default)({}, rootProps, {
|
|
199
204
|
children: rootProps.contentEditable ? elements.map(({
|
|
@@ -10,7 +10,6 @@ var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runt
|
|
|
10
10
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
11
|
var React = _interopRequireWildcard(require("react"));
|
|
12
12
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
13
|
-
var _FormControl = require("@mui/material/FormControl");
|
|
14
13
|
var _styles = require("@mui/material/styles");
|
|
15
14
|
var _system = require("@mui/system");
|
|
16
15
|
var _utils = require("@mui/utils");
|
|
@@ -18,8 +17,9 @@ var _composeClasses = _interopRequireDefault(require("@mui/utils/composeClasses"
|
|
|
18
17
|
var _pickersFilledInputClasses = require("./pickersFilledInputClasses");
|
|
19
18
|
var _PickersInputBase = require("../PickersInputBase");
|
|
20
19
|
var _PickersInputBase2 = require("../PickersInputBase/PickersInputBase");
|
|
20
|
+
var _usePickerTextFieldOwnerState = require("../usePickerTextFieldOwnerState");
|
|
21
21
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
22
|
-
const _excluded = ["label", "autoFocus", "disableUnderline", "
|
|
22
|
+
const _excluded = ["label", "autoFocus", "disableUnderline", "hiddenLabel", "classes"];
|
|
23
23
|
const PickersFilledInputRoot = (0, _styles.styled)(_PickersInputBase2.PickersInputBaseRoot, {
|
|
24
24
|
name: 'MuiPickersFilledInput',
|
|
25
25
|
slot: 'Root',
|
|
@@ -58,7 +58,7 @@ const PickersFilledInputRoot = (0, _styles.styled)(_PickersInputBase2.PickersInp
|
|
|
58
58
|
// @ts-ignore
|
|
59
59
|
.filter(key => (theme.vars ?? theme).palette[key].main).map(color => ({
|
|
60
60
|
props: {
|
|
61
|
-
color,
|
|
61
|
+
inputColor: color,
|
|
62
62
|
disableUnderline: false
|
|
63
63
|
},
|
|
64
64
|
style: {
|
|
@@ -117,16 +117,16 @@ const PickersFilledInputRoot = (0, _styles.styled)(_PickersInputBase2.PickersInp
|
|
|
117
117
|
}
|
|
118
118
|
}
|
|
119
119
|
}, {
|
|
120
|
-
props:
|
|
121
|
-
|
|
122
|
-
}
|
|
120
|
+
props: {
|
|
121
|
+
hasStartAdornment: true
|
|
122
|
+
},
|
|
123
123
|
style: {
|
|
124
124
|
paddingLeft: 12
|
|
125
125
|
}
|
|
126
126
|
}, {
|
|
127
|
-
props:
|
|
128
|
-
|
|
129
|
-
}
|
|
127
|
+
props: {
|
|
128
|
+
hasEndAdornment: true
|
|
129
|
+
},
|
|
130
130
|
style: {
|
|
131
131
|
paddingRight: 12
|
|
132
132
|
}
|
|
@@ -136,7 +136,8 @@ const PickersFilledInputRoot = (0, _styles.styled)(_PickersInputBase2.PickersInp
|
|
|
136
136
|
const PickersFilledSectionsContainer = (0, _styles.styled)(_PickersInputBase2.PickersInputBaseSectionsContainer, {
|
|
137
137
|
name: 'MuiPickersFilledInput',
|
|
138
138
|
slot: 'sectionsContainer',
|
|
139
|
-
overridesResolver: (props, styles) => styles.sectionsContainer
|
|
139
|
+
overridesResolver: (props, styles) => styles.sectionsContainer,
|
|
140
|
+
shouldForwardProp: prop => (0, _system.shouldForwardProp)(prop) && prop !== 'hiddenLabel'
|
|
140
141
|
})({
|
|
141
142
|
paddingTop: 25,
|
|
142
143
|
paddingRight: 12,
|
|
@@ -144,23 +145,23 @@ const PickersFilledSectionsContainer = (0, _styles.styled)(_PickersInputBase2.Pi
|
|
|
144
145
|
paddingLeft: 12,
|
|
145
146
|
variants: [{
|
|
146
147
|
props: {
|
|
147
|
-
|
|
148
|
+
inputSize: 'small'
|
|
148
149
|
},
|
|
149
150
|
style: {
|
|
150
151
|
paddingTop: 21,
|
|
151
152
|
paddingBottom: 4
|
|
152
153
|
}
|
|
153
154
|
}, {
|
|
154
|
-
props:
|
|
155
|
-
|
|
156
|
-
}
|
|
155
|
+
props: {
|
|
156
|
+
hasStartAdornment: true
|
|
157
|
+
},
|
|
157
158
|
style: {
|
|
158
159
|
paddingLeft: 0
|
|
159
160
|
}
|
|
160
161
|
}, {
|
|
161
|
-
props:
|
|
162
|
-
|
|
163
|
-
}
|
|
162
|
+
props: {
|
|
163
|
+
hasEndAdornment: true
|
|
164
|
+
},
|
|
164
165
|
style: {
|
|
165
166
|
paddingRight: 0
|
|
166
167
|
}
|
|
@@ -175,7 +176,7 @@ const PickersFilledSectionsContainer = (0, _styles.styled)(_PickersInputBase2.Pi
|
|
|
175
176
|
}, {
|
|
176
177
|
props: {
|
|
177
178
|
hiddenLabel: true,
|
|
178
|
-
|
|
179
|
+
inputSize: 'small'
|
|
179
180
|
},
|
|
180
181
|
style: {
|
|
181
182
|
paddingTop: 8,
|
|
@@ -183,18 +184,18 @@ const PickersFilledSectionsContainer = (0, _styles.styled)(_PickersInputBase2.Pi
|
|
|
183
184
|
}
|
|
184
185
|
}]
|
|
185
186
|
});
|
|
186
|
-
const useUtilityClasses = ownerState => {
|
|
187
|
+
const useUtilityClasses = (classes, ownerState) => {
|
|
187
188
|
const {
|
|
188
|
-
|
|
189
|
-
disableUnderline
|
|
189
|
+
inputHasUnderline
|
|
190
190
|
} = ownerState;
|
|
191
191
|
const slots = {
|
|
192
|
-
root: ['root',
|
|
192
|
+
root: ['root', inputHasUnderline && 'underline'],
|
|
193
193
|
input: ['input']
|
|
194
194
|
};
|
|
195
195
|
const composedClasses = (0, _composeClasses.default)(slots, _pickersFilledInputClasses.getPickersFilledInputUtilityClass, classes);
|
|
196
196
|
return (0, _extends2.default)({}, classes, composedClasses);
|
|
197
197
|
};
|
|
198
|
+
|
|
198
199
|
/**
|
|
199
200
|
* @ignore - internal component.
|
|
200
201
|
*/
|
|
@@ -206,14 +207,15 @@ const PickersFilledInput = exports.PickersFilledInput = /*#__PURE__*/React.forwa
|
|
|
206
207
|
const {
|
|
207
208
|
label,
|
|
208
209
|
disableUnderline = false,
|
|
209
|
-
|
|
210
|
+
hiddenLabel = false,
|
|
211
|
+
classes: classesProp
|
|
210
212
|
} = props,
|
|
211
213
|
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
|
|
212
|
-
const
|
|
213
|
-
const ownerState = (0, _extends2.default)({},
|
|
214
|
-
|
|
214
|
+
const pickerTextFieldOwnerState = (0, _usePickerTextFieldOwnerState.usePickerTextFieldOwnerState)();
|
|
215
|
+
const ownerState = (0, _extends2.default)({}, pickerTextFieldOwnerState, {
|
|
216
|
+
inputHasUnderline: !disableUnderline
|
|
215
217
|
});
|
|
216
|
-
const classes = useUtilityClasses(ownerState);
|
|
218
|
+
const classes = useUtilityClasses(classesProp, ownerState);
|
|
217
219
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_PickersInputBase.PickersInputBase, (0, _extends2.default)({
|
|
218
220
|
slots: {
|
|
219
221
|
root: PickersFilledInputRoot,
|
|
@@ -222,12 +224,16 @@ const PickersFilledInput = exports.PickersFilledInput = /*#__PURE__*/React.forwa
|
|
|
222
224
|
slotProps: {
|
|
223
225
|
root: {
|
|
224
226
|
disableUnderline
|
|
227
|
+
},
|
|
228
|
+
input: {
|
|
229
|
+
hiddenLabel
|
|
225
230
|
}
|
|
226
231
|
}
|
|
227
232
|
}, other, {
|
|
228
233
|
label: label,
|
|
229
234
|
classes: classes,
|
|
230
|
-
ref: ref
|
|
235
|
+
ref: ref,
|
|
236
|
+
ownerState: ownerState
|
|
231
237
|
}));
|
|
232
238
|
});
|
|
233
239
|
process.env.NODE_ENV !== "production" ? PickersFilledInput.propTypes = {
|