@mui/x-date-pickers 9.0.0-alpha.3 → 9.0.0-rc.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/AdapterDateFnsBase/AdapterDateFnsBase.mjs +1 -1
- package/AdapterDayjs/AdapterDayjs.mjs +1 -1
- package/AdapterLuxon/AdapterLuxon.mjs +1 -1
- package/AdapterMoment/AdapterMoment.mjs +1 -1
- package/AdapterMomentHijri/AdapterMomentHijri.mjs +1 -1
- package/AdapterMomentJalaali/AdapterMomentJalaali.mjs +1 -1
- package/CHANGELOG.md +384 -1
- package/DateCalendar/DateCalendar.js +1 -1
- package/DateCalendar/DateCalendar.mjs +1 -1
- package/DateCalendar/DayCalendar.d.mts +7 -7
- package/DateCalendar/DayCalendar.d.ts +7 -7
- package/DateCalendar/DayCalendar.js +23 -25
- package/DateCalendar/DayCalendar.mjs +23 -25
- package/DateField/DateField.d.mts +1 -1
- package/DateField/DateField.d.ts +1 -1
- package/DateField/DateField.js +26 -8
- package/DateField/DateField.mjs +26 -8
- package/DateField/DateField.types.d.mts +3 -3
- package/DateField/DateField.types.d.ts +3 -3
- package/DateField/useDateField.d.mts +1 -1
- package/DateField/useDateField.d.ts +1 -1
- package/DateField/useDateField.js +1 -1
- package/DateField/useDateField.mjs +1 -1
- package/DatePicker/DatePicker.d.mts +1 -1
- package/DatePicker/DatePicker.d.ts +1 -1
- package/DatePicker/DatePicker.js +1 -5
- package/DatePicker/DatePicker.mjs +1 -5
- package/DatePicker/DatePicker.types.d.mts +3 -3
- package/DatePicker/DatePicker.types.d.ts +3 -3
- package/DateTimeField/DateTimeField.d.mts +1 -1
- package/DateTimeField/DateTimeField.d.ts +1 -1
- package/DateTimeField/DateTimeField.js +26 -8
- package/DateTimeField/DateTimeField.mjs +26 -8
- package/DateTimeField/DateTimeField.types.d.mts +2 -2
- package/DateTimeField/DateTimeField.types.d.ts +2 -2
- package/DateTimeField/useDateTimeField.d.mts +1 -1
- package/DateTimeField/useDateTimeField.d.ts +1 -1
- package/DateTimeField/useDateTimeField.js +1 -1
- package/DateTimeField/useDateTimeField.mjs +1 -1
- package/DateTimePicker/DateTimePicker.d.mts +1 -1
- package/DateTimePicker/DateTimePicker.d.ts +1 -1
- package/DateTimePicker/DateTimePicker.js +1 -5
- package/DateTimePicker/DateTimePicker.mjs +1 -5
- package/DateTimePicker/DateTimePicker.types.d.mts +3 -3
- package/DateTimePicker/DateTimePicker.types.d.ts +3 -3
- package/DesktopDatePicker/DesktopDatePicker.d.mts +1 -1
- package/DesktopDatePicker/DesktopDatePicker.d.ts +1 -1
- package/DesktopDatePicker/DesktopDatePicker.js +1 -5
- package/DesktopDatePicker/DesktopDatePicker.mjs +1 -5
- package/DesktopDatePicker/DesktopDatePicker.types.d.mts +3 -3
- package/DesktopDatePicker/DesktopDatePicker.types.d.ts +3 -3
- package/DesktopDateTimePicker/DesktopDateTimePicker.d.mts +1 -1
- package/DesktopDateTimePicker/DesktopDateTimePicker.d.ts +1 -1
- package/DesktopDateTimePicker/DesktopDateTimePicker.js +1 -5
- package/DesktopDateTimePicker/DesktopDateTimePicker.mjs +1 -5
- package/DesktopDateTimePicker/DesktopDateTimePicker.types.d.mts +3 -3
- package/DesktopDateTimePicker/DesktopDateTimePicker.types.d.ts +3 -3
- package/DesktopTimePicker/DesktopTimePicker.d.mts +1 -1
- package/DesktopTimePicker/DesktopTimePicker.d.ts +1 -1
- package/DesktopTimePicker/DesktopTimePicker.js +0 -4
- package/DesktopTimePicker/DesktopTimePicker.mjs +0 -4
- package/DesktopTimePicker/DesktopTimePicker.types.d.mts +3 -3
- package/DesktopTimePicker/DesktopTimePicker.types.d.ts +3 -3
- package/DigitalClock/DigitalClock.d.mts +1 -1
- package/DigitalClock/DigitalClock.d.ts +1 -1
- package/DigitalClock/DigitalClock.js +5 -3
- package/DigitalClock/DigitalClock.mjs +6 -4
- package/MobileDatePicker/MobileDatePicker.d.mts +1 -1
- package/MobileDatePicker/MobileDatePicker.d.ts +1 -1
- package/MobileDatePicker/MobileDatePicker.js +1 -5
- package/MobileDatePicker/MobileDatePicker.mjs +1 -5
- package/MobileDatePicker/MobileDatePicker.types.d.mts +3 -3
- package/MobileDatePicker/MobileDatePicker.types.d.ts +3 -3
- package/MobileDateTimePicker/MobileDateTimePicker.d.mts +1 -1
- package/MobileDateTimePicker/MobileDateTimePicker.d.ts +1 -1
- package/MobileDateTimePicker/MobileDateTimePicker.js +1 -5
- package/MobileDateTimePicker/MobileDateTimePicker.mjs +1 -5
- package/MobileDateTimePicker/MobileDateTimePicker.types.d.mts +3 -3
- package/MobileDateTimePicker/MobileDateTimePicker.types.d.ts +3 -3
- package/MobileTimePicker/MobileTimePicker.d.mts +1 -1
- package/MobileTimePicker/MobileTimePicker.d.ts +1 -1
- package/MobileTimePicker/MobileTimePicker.js +0 -4
- package/MobileTimePicker/MobileTimePicker.mjs +0 -4
- package/MobileTimePicker/MobileTimePicker.types.d.mts +3 -3
- package/MobileTimePicker/MobileTimePicker.types.d.ts +3 -3
- package/MonthCalendar/MonthCalendarButton.js +2 -2
- package/MonthCalendar/MonthCalendarButton.mjs +3 -3
- package/MultiSectionDigitalClock/MultiSectionDigitalClockSection.js +46 -9
- package/MultiSectionDigitalClock/MultiSectionDigitalClockSection.mjs +47 -10
- package/PickerDay/PickerDay.d.mts +14 -0
- package/PickerDay/PickerDay.d.ts +14 -0
- package/{PickerDay2/PickerDay2.js → PickerDay/PickerDay.js} +110 -45
- package/{PickerDay2/PickerDay2.mjs → PickerDay/PickerDay.mjs} +110 -45
- package/PickerDay/PickerDay.types.d.mts +137 -0
- package/PickerDay/PickerDay.types.d.ts +137 -0
- package/PickerDay/index.d.mts +4 -0
- package/PickerDay/index.d.ts +4 -0
- package/PickerDay/index.js +25 -0
- package/PickerDay/index.mjs +2 -0
- package/{PickerDay2/pickerDay2Classes.d.mts → PickerDay/pickerDayClasses.d.mts} +4 -4
- package/{PickerDay2/pickerDay2Classes.d.ts → PickerDay/pickerDayClasses.d.ts} +4 -4
- package/PickerDay/pickerDayClasses.js +14 -0
- package/PickerDay/pickerDayClasses.mjs +6 -0
- package/PickersTextField/PickersFilledInput/PickersFilledInput.js +27 -1
- package/PickersTextField/PickersFilledInput/PickersFilledInput.mjs +27 -1
- package/PickersTextField/PickersInput/PickersInput.js +27 -1
- package/PickersTextField/PickersInput/PickersInput.mjs +27 -1
- package/PickersTextField/PickersInputBase/PickersInputBase.js +26 -0
- package/PickersTextField/PickersInputBase/PickersInputBase.mjs +26 -0
- package/PickersTextField/PickersInputBase/PickersInputBase.types.d.mts +26 -0
- package/PickersTextField/PickersInputBase/PickersInputBase.types.d.ts +26 -0
- package/PickersTextField/PickersOutlinedInput/Outline.js +1 -1
- package/PickersTextField/PickersOutlinedInput/Outline.mjs +1 -1
- package/PickersTextField/PickersOutlinedInput/PickersOutlinedInput.js +27 -1
- package/PickersTextField/PickersOutlinedInput/PickersOutlinedInput.mjs +27 -1
- package/PickersTextField/PickersTextField.js +42 -2
- package/PickersTextField/PickersTextField.mjs +42 -2
- package/PickersTextField/PickersTextField.types.d.mts +22 -6
- package/PickersTextField/PickersTextField.types.d.ts +22 -6
- package/StaticDatePicker/StaticDatePicker.js +1 -1
- package/StaticDatePicker/StaticDatePicker.mjs +1 -1
- package/StaticDateTimePicker/StaticDateTimePicker.js +1 -1
- package/StaticDateTimePicker/StaticDateTimePicker.mjs +1 -1
- package/TimeField/TimeField.d.mts +1 -1
- package/TimeField/TimeField.d.ts +1 -1
- package/TimeField/TimeField.js +26 -8
- package/TimeField/TimeField.mjs +26 -8
- package/TimeField/TimeField.types.d.mts +2 -2
- package/TimeField/TimeField.types.d.ts +2 -2
- package/TimeField/useTimeField.d.mts +1 -1
- package/TimeField/useTimeField.d.ts +1 -1
- package/TimePicker/TimePicker.d.mts +1 -1
- package/TimePicker/TimePicker.d.ts +1 -1
- package/TimePicker/TimePicker.js +0 -4
- package/TimePicker/TimePicker.mjs +0 -4
- package/TimePicker/TimePicker.types.d.mts +3 -3
- package/TimePicker/TimePicker.types.d.ts +3 -3
- package/YearCalendar/YearCalendarButton.js +2 -2
- package/YearCalendar/YearCalendarButton.mjs +3 -3
- package/hooks/useParsedFormat.js +5 -7
- package/hooks/useParsedFormat.mjs +5 -7
- package/hooks/useSplitFieldProps.d.mts +1 -1
- package/hooks/useSplitFieldProps.d.ts +1 -1
- package/hooks/useSplitFieldProps.js +1 -1
- package/hooks/useSplitFieldProps.mjs +1 -1
- package/index.d.mts +1 -2
- package/index.d.ts +1 -2
- package/index.js +2 -14
- package/index.mjs +2 -3
- package/internals/components/PickerFieldUI.d.mts +22 -13
- package/internals/components/PickerFieldUI.d.ts +22 -13
- package/internals/components/PickerFieldUI.js +22 -80
- package/internals/components/PickerFieldUI.mjs +22 -80
- package/internals/components/PickerPopper/PickerPopper.js +20 -2
- package/internals/components/PickerPopper/PickerPopper.mjs +20 -2
- package/internals/components/PickersToolbar.js +3 -1
- package/internals/components/PickersToolbar.mjs +3 -1
- package/internals/demo/DemoContainer.js +6 -8
- package/internals/demo/DemoContainer.mjs +6 -8
- package/internals/hooks/PickerDay.types.d.mts +12 -0
- package/internals/hooks/PickerDay.types.d.ts +12 -0
- package/internals/hooks/useDesktopPicker/useDesktopPicker.d.mts +2 -2
- package/internals/hooks/useDesktopPicker/useDesktopPicker.d.ts +2 -2
- package/internals/hooks/useDesktopPicker/useDesktopPicker.types.d.mts +6 -6
- package/internals/hooks/useDesktopPicker/useDesktopPicker.types.d.ts +6 -6
- package/internals/hooks/useField/buildSectionsFromFormat.d.mts +0 -1
- package/internals/hooks/useField/buildSectionsFromFormat.d.ts +0 -1
- package/internals/hooks/useField/buildSectionsFromFormat.js +1 -1
- package/internals/hooks/useField/buildSectionsFromFormat.mjs +1 -1
- package/internals/hooks/useField/index.d.mts +1 -1
- package/internals/hooks/useField/index.d.ts +1 -1
- package/internals/hooks/useField/index.js +2 -8
- package/internals/hooks/useField/index.mjs +1 -1
- package/internals/hooks/useField/useField.d.mts +2 -2
- package/internals/hooks/useField/useField.d.ts +2 -2
- package/internals/hooks/useField/useField.js +265 -8
- package/internals/hooks/useField/useField.mjs +264 -8
- package/internals/hooks/useField/useField.types.d.mts +12 -51
- package/internals/hooks/useField/useField.types.d.ts +12 -51
- package/internals/hooks/useField/useField.utils.d.mts +2 -3
- package/internals/hooks/useField/useField.utils.d.ts +2 -3
- package/internals/hooks/useField/useField.utils.js +8 -65
- package/internals/hooks/useField/useField.utils.mjs +6 -62
- package/internals/hooks/useField/useFieldHiddenInputProps.d.mts +2 -4
- package/internals/hooks/useField/useFieldHiddenInputProps.d.ts +2 -4
- package/internals/hooks/useField/useFieldHiddenInputProps.js +1 -3
- package/internals/hooks/useField/useFieldHiddenInputProps.mjs +1 -3
- package/internals/hooks/useField/useFieldInternalPropsWithDefaults.js +2 -3
- package/internals/hooks/useField/useFieldInternalPropsWithDefaults.mjs +2 -3
- package/internals/hooks/useField/useFieldRootProps.d.mts +5 -5
- package/internals/hooks/useField/useFieldRootProps.d.ts +5 -5
- package/internals/hooks/useField/useFieldRootProps.js +183 -11
- package/internals/hooks/useField/useFieldRootProps.mjs +183 -11
- package/internals/hooks/useField/useFieldSectionContainerProps.d.mts +3 -5
- package/internals/hooks/useField/useFieldSectionContainerProps.d.ts +3 -5
- package/internals/hooks/useField/useFieldSectionContainerProps.js +2 -4
- package/internals/hooks/useField/useFieldSectionContainerProps.mjs +2 -4
- package/internals/hooks/useField/useFieldSectionContentProps.d.mts +6 -7
- package/internals/hooks/useField/useFieldSectionContentProps.d.ts +6 -7
- package/internals/hooks/useField/useFieldSectionContentProps.js +2 -4
- package/internals/hooks/useField/useFieldSectionContentProps.mjs +2 -4
- package/internals/hooks/useField/useFieldState.d.mts +4 -4
- package/internals/hooks/useField/useFieldState.d.ts +4 -4
- package/internals/hooks/useField/useFieldState.js +3 -6
- package/internals/hooks/useField/useFieldState.mjs +3 -6
- package/internals/hooks/useMobilePicker/useMobilePicker.d.mts +2 -2
- package/internals/hooks/useMobilePicker/useMobilePicker.d.ts +2 -2
- package/internals/hooks/useMobilePicker/useMobilePicker.types.d.mts +6 -6
- package/internals/hooks/useMobilePicker/useMobilePicker.types.d.ts +6 -6
- package/internals/hooks/useNullableFieldPrivateContext.d.mts +3 -2
- package/internals/hooks/useNullableFieldPrivateContext.d.ts +3 -2
- package/internals/hooks/usePicker/usePicker.js +13 -10
- package/internals/hooks/usePicker/usePicker.mjs +13 -10
- package/internals/hooks/usePicker/usePicker.types.d.mts +2 -1
- package/internals/hooks/usePicker/usePicker.types.d.ts +2 -1
- package/{PickersDay → internals/hooks}/usePickerDayOwnerState.d.mts +2 -3
- package/{PickersDay → internals/hooks}/usePickerDayOwnerState.d.ts +2 -3
- package/{PickersDay → internals/hooks}/usePickerDayOwnerState.js +3 -5
- package/{PickersDay → internals/hooks}/usePickerDayOwnerState.mjs +3 -5
- package/internals/index.d.mts +5 -4
- package/internals/index.d.ts +5 -4
- package/internals/index.js +16 -9
- package/internals/index.mjs +4 -3
- package/internals/models/manager.d.mts +3 -5
- package/internals/models/manager.d.ts +3 -5
- package/internals/utils/isElementInteractive.d.mts +1 -0
- package/internals/utils/isElementInteractive.d.ts +1 -0
- package/internals/utils/isElementInteractive.js +34 -0
- package/internals/utils/isElementInteractive.mjs +28 -0
- package/internals/utils/valueManagers.js +1 -2
- package/internals/utils/valueManagers.mjs +2 -3
- package/managers/index.d.mts +2 -2
- package/managers/index.d.ts +2 -2
- package/managers/useDateManager.d.mts +3 -6
- package/managers/useDateManager.d.ts +3 -6
- package/managers/useDateManager.js +2 -6
- package/managers/useDateManager.mjs +2 -6
- package/managers/useDateTimeManager.d.mts +3 -6
- package/managers/useDateTimeManager.d.ts +3 -6
- package/managers/useDateTimeManager.js +2 -6
- package/managers/useDateTimeManager.mjs +2 -6
- package/managers/useTimeManager.d.mts +4 -6
- package/managers/useTimeManager.d.ts +4 -6
- package/managers/useTimeManager.js +1 -3
- package/managers/useTimeManager.mjs +1 -3
- package/models/fields.d.mts +7 -4
- package/models/fields.d.ts +7 -4
- package/models/manager.d.mts +2 -8
- package/models/manager.d.ts +2 -8
- package/package.json +12 -26
- package/themeAugmentation/components.d.mts +4 -8
- package/themeAugmentation/components.d.ts +4 -8
- package/themeAugmentation/overrides.d.mts +2 -4
- package/themeAugmentation/overrides.d.ts +2 -4
- package/themeAugmentation/props.d.mts +5 -7
- package/themeAugmentation/props.d.ts +5 -7
- package/PickerDay2/PickerDay2.d.mts +0 -7
- package/PickerDay2/PickerDay2.d.ts +0 -7
- package/PickerDay2/PickerDay2.types.d.mts +0 -18
- package/PickerDay2/PickerDay2.types.d.ts +0 -18
- package/PickerDay2/index.d.mts +0 -4
- package/PickerDay2/index.d.ts +0 -4
- package/PickerDay2/index.js +0 -25
- package/PickerDay2/index.mjs +0 -2
- package/PickerDay2/pickerDay2Classes.js +0 -14
- package/PickerDay2/pickerDay2Classes.mjs +0 -6
- package/PickersDay/PickersDay.d.mts +0 -15
- package/PickersDay/PickersDay.d.ts +0 -15
- package/PickersDay/PickersDay.js +0 -384
- package/PickersDay/PickersDay.mjs +0 -377
- package/PickersDay/PickersDay.types.d.mts +0 -114
- package/PickersDay/PickersDay.types.d.ts +0 -114
- package/PickersDay/index.d.mts +0 -4
- package/PickersDay/index.d.ts +0 -4
- package/PickersDay/index.js +0 -25
- package/PickersDay/index.mjs +0 -2
- package/PickersDay/pickersDayClasses.d.mts +0 -19
- package/PickersDay/pickersDayClasses.d.ts +0 -19
- package/PickersDay/pickersDayClasses.js +0 -14
- package/PickersDay/pickersDayClasses.mjs +0 -6
- package/internals/hooks/useField/useFieldRootHandleKeyDown.d.mts +0 -16
- package/internals/hooks/useField/useFieldRootHandleKeyDown.d.ts +0 -16
- package/internals/hooks/useField/useFieldRootHandleKeyDown.js +0 -211
- package/internals/hooks/useField/useFieldRootHandleKeyDown.mjs +0 -205
- package/internals/hooks/useField/useFieldV6TextField.d.mts +0 -26
- package/internals/hooks/useField/useFieldV6TextField.d.ts +0 -26
- package/internals/hooks/useField/useFieldV6TextField.js +0 -421
- package/internals/hooks/useField/useFieldV6TextField.mjs +0 -412
- package/internals/hooks/useField/useFieldV7TextField.d.mts +0 -3
- package/internals/hooks/useField/useFieldV7TextField.d.ts +0 -3
- package/internals/hooks/useField/useFieldV7TextField.js +0 -271
- package/internals/hooks/useField/useFieldV7TextField.mjs +0 -263
- /package/{PickerDay2/PickerDay2.types.js → PickerDay/PickerDay.types.js} +0 -0
- /package/{PickerDay2/PickerDay2.types.mjs → PickerDay/PickerDay.types.mjs} +0 -0
- /package/{PickersDay/PickersDay.types.js → internals/hooks/PickerDay.types.js} +0 -0
- /package/{PickersDay/PickersDay.types.mjs → internals/hooks/PickerDay.types.mjs} +0 -0
|
@@ -217,13 +217,28 @@ process.env.NODE_ENV !== "production" ? PickersTextField.propTypes = {
|
|
|
217
217
|
container: PropTypes.object.isRequired,
|
|
218
218
|
content: PropTypes.object.isRequired
|
|
219
219
|
})).isRequired,
|
|
220
|
+
/**
|
|
221
|
+
* End `InputAdornment` for this component.
|
|
222
|
+
*/
|
|
220
223
|
endAdornment: PropTypes.node,
|
|
224
|
+
/**
|
|
225
|
+
* If `true`, the `input` will indicate an error.
|
|
226
|
+
* @default false
|
|
227
|
+
*/
|
|
221
228
|
error: PropTypes.bool.isRequired,
|
|
222
229
|
/**
|
|
223
230
|
* If `true`, the component is displayed in focused state.
|
|
224
231
|
*/
|
|
225
232
|
focused: PropTypes.bool,
|
|
233
|
+
/**
|
|
234
|
+
* Props applied to the [`FormHelperText`](https://mui.com/material-ui/api/form-helper-text/) element.
|
|
235
|
+
* @deprecated Use `slotProps.formHelperText` instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
236
|
+
*/
|
|
226
237
|
FormHelperTextProps: PropTypes.object,
|
|
238
|
+
/**
|
|
239
|
+
* If `true`, the input will take up the full width of its container.
|
|
240
|
+
* @default false
|
|
241
|
+
*/
|
|
227
242
|
fullWidth: PropTypes.bool,
|
|
228
243
|
/**
|
|
229
244
|
* The helper text content.
|
|
@@ -236,23 +251,45 @@ process.env.NODE_ENV !== "production" ? PickersTextField.propTypes = {
|
|
|
236
251
|
* @default false
|
|
237
252
|
*/
|
|
238
253
|
hiddenLabel: PropTypes.bool,
|
|
254
|
+
/**
|
|
255
|
+
* The id of the `input` element.
|
|
256
|
+
*/
|
|
239
257
|
id: PropTypes.string,
|
|
258
|
+
/**
|
|
259
|
+
* Props applied to the [`InputLabel`](https://mui.com/material-ui/api/input-label/) element.
|
|
260
|
+
* Pointer events like `onClick` are enabled if and only if `shrink` is `true`.
|
|
261
|
+
* @deprecated Use `slotProps.inputLabel` instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
262
|
+
*/
|
|
240
263
|
InputLabelProps: PropTypes.object,
|
|
264
|
+
/**
|
|
265
|
+
* [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input#attributes) applied to the `input` element.
|
|
266
|
+
* @deprecated Use `slotProps.htmlInput` instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
267
|
+
*/
|
|
241
268
|
inputProps: PropTypes.object,
|
|
242
269
|
/**
|
|
243
270
|
* Props applied to the Input element.
|
|
244
|
-
* It will be a [`FilledInput`](/material-ui/api/filled-input/),
|
|
245
|
-
* [`OutlinedInput`](/material-ui/api/outlined-input/) or [`Input`](/material-ui/api/input/)
|
|
271
|
+
* It will be a [`FilledInput`](https://mui.com/material-ui/api/filled-input/),
|
|
272
|
+
* [`OutlinedInput`](https://mui.com/material-ui/api/outlined-input/) or [`Input`](https://mui.com/material-ui/api/input/)
|
|
246
273
|
* component depending on the `variant` prop value.
|
|
274
|
+
* @deprecated Use `slotProps.input` instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
247
275
|
*/
|
|
248
276
|
InputProps: PropTypes.object,
|
|
277
|
+
/**
|
|
278
|
+
* Pass a ref to the `input` element.
|
|
279
|
+
*/
|
|
249
280
|
inputRef: refType,
|
|
281
|
+
/**
|
|
282
|
+
* The label content.
|
|
283
|
+
*/
|
|
250
284
|
label: PropTypes.node,
|
|
251
285
|
/**
|
|
252
286
|
* If `dense` or `normal`, will adjust vertical spacing of this and contained components.
|
|
253
287
|
* @default 'none'
|
|
254
288
|
*/
|
|
255
289
|
margin: PropTypes.oneOf(['dense', 'none', 'normal']),
|
|
290
|
+
/**
|
|
291
|
+
* Name attribute of the `input` element.
|
|
292
|
+
*/
|
|
256
293
|
name: PropTypes.string,
|
|
257
294
|
onBlur: PropTypes.func.isRequired,
|
|
258
295
|
onChange: PropTypes.func.isRequired,
|
|
@@ -280,6 +317,9 @@ process.env.NODE_ENV !== "production" ? PickersTextField.propTypes = {
|
|
|
280
317
|
* @default 'medium'
|
|
281
318
|
*/
|
|
282
319
|
size: PropTypes.oneOf(['medium', 'small']),
|
|
320
|
+
/**
|
|
321
|
+
* Start `InputAdornment` for this component.
|
|
322
|
+
*/
|
|
283
323
|
startAdornment: PropTypes.node,
|
|
284
324
|
style: PropTypes.object,
|
|
285
325
|
/**
|
|
@@ -11,10 +11,23 @@ interface PickersTextFieldPropsUsedByField {
|
|
|
11
11
|
onFocus: React.FocusEventHandler<HTMLDivElement>;
|
|
12
12
|
onBlur: React.FocusEventHandler<HTMLDivElement>;
|
|
13
13
|
disabled: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* If `true`, the `input` will indicate an error.
|
|
16
|
+
* @default false
|
|
17
|
+
*/
|
|
14
18
|
error: boolean;
|
|
15
19
|
}
|
|
16
20
|
export interface PickersBaseTextFieldProps extends PickersInputPropsUsedByField, PickersTextFieldPropsUsedByField, Omit<FormControlProps, keyof PickersInputPropsUsedByField | keyof PickersTextFieldPropsUsedByField> {
|
|
21
|
+
/**
|
|
22
|
+
* Props applied to the [`FormHelperText`](https://mui.com/material-ui/api/form-helper-text/) element.
|
|
23
|
+
* @deprecated Use `slotProps.formHelperText` instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
24
|
+
*/
|
|
17
25
|
FormHelperTextProps?: Partial<FormHelperTextProps>;
|
|
26
|
+
/**
|
|
27
|
+
* Props applied to the [`InputLabel`](https://mui.com/material-ui/api/input-label/) element.
|
|
28
|
+
* Pointer events like `onClick` are enabled if and only if `shrink` is `true`.
|
|
29
|
+
* @deprecated Use `slotProps.inputLabel` instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
30
|
+
*/
|
|
18
31
|
InputLabelProps?: Partial<InputLabelProps>;
|
|
19
32
|
/**
|
|
20
33
|
* The helper text content.
|
|
@@ -29,9 +42,10 @@ export interface PickersStandardTextFieldProps extends PickersBaseTextFieldProps
|
|
|
29
42
|
variant?: 'standard';
|
|
30
43
|
/**
|
|
31
44
|
* Props applied to the Input element.
|
|
32
|
-
* It will be a [`FilledInput`](/material-ui/api/filled-input/),
|
|
33
|
-
* [`OutlinedInput`](/material-ui/api/outlined-input/) or [`Input`](/material-ui/api/input/)
|
|
45
|
+
* It will be a [`FilledInput`](https://mui.com/material-ui/api/filled-input/),
|
|
46
|
+
* [`OutlinedInput`](https://mui.com/material-ui/api/outlined-input/) or [`Input`](https://mui.com/material-ui/api/input/)
|
|
34
47
|
* component depending on the `variant` prop value.
|
|
48
|
+
* @deprecated Use `slotProps.input` instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
35
49
|
*/
|
|
36
50
|
InputProps?: Partial<PickersInputProps>;
|
|
37
51
|
}
|
|
@@ -43,9 +57,10 @@ export interface PickersOutlinedTextFieldProps extends PickersBaseTextFieldProps
|
|
|
43
57
|
variant?: 'outlined';
|
|
44
58
|
/**
|
|
45
59
|
* Props applied to the Input element.
|
|
46
|
-
* It will be a [`FilledInput`](/material-ui/api/filled-input/),
|
|
47
|
-
* [`OutlinedInput`](/material-ui/api/outlined-input/) or [`Input`](/material-ui/api/input/)
|
|
60
|
+
* It will be a [`FilledInput`](https://mui.com/material-ui/api/filled-input/),
|
|
61
|
+
* [`OutlinedInput`](https://mui.com/material-ui/api/outlined-input/) or [`Input`](https://mui.com/material-ui/api/input/)
|
|
48
62
|
* component depending on the `variant` prop value.
|
|
63
|
+
* @deprecated Use `slotProps.input` instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
49
64
|
*/
|
|
50
65
|
InputProps?: Partial<PickersOutlinedInputProps>;
|
|
51
66
|
}
|
|
@@ -57,9 +72,10 @@ export interface PickersFilledTextFieldProps extends PickersBaseTextFieldProps {
|
|
|
57
72
|
variant?: 'filled';
|
|
58
73
|
/**
|
|
59
74
|
* Props applied to the Input element.
|
|
60
|
-
* It will be a [`FilledInput`](/material-ui/api/filled-input/),
|
|
61
|
-
* [`OutlinedInput`](/material-ui/api/outlined-input/) or [`Input`](/material-ui/api/input/)
|
|
75
|
+
* It will be a [`FilledInput`](https://mui.com/material-ui/api/filled-input/),
|
|
76
|
+
* [`OutlinedInput`](https://mui.com/material-ui/api/outlined-input/) or [`Input`](https://mui.com/material-ui/api/input/)
|
|
62
77
|
* component depending on the `variant` prop value.
|
|
78
|
+
* @deprecated Use `slotProps.input` instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
63
79
|
*/
|
|
64
80
|
InputProps?: Partial<PickersFilledInputProps>;
|
|
65
81
|
}
|
|
@@ -11,10 +11,23 @@ interface PickersTextFieldPropsUsedByField {
|
|
|
11
11
|
onFocus: React.FocusEventHandler<HTMLDivElement>;
|
|
12
12
|
onBlur: React.FocusEventHandler<HTMLDivElement>;
|
|
13
13
|
disabled: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* If `true`, the `input` will indicate an error.
|
|
16
|
+
* @default false
|
|
17
|
+
*/
|
|
14
18
|
error: boolean;
|
|
15
19
|
}
|
|
16
20
|
export interface PickersBaseTextFieldProps extends PickersInputPropsUsedByField, PickersTextFieldPropsUsedByField, Omit<FormControlProps, keyof PickersInputPropsUsedByField | keyof PickersTextFieldPropsUsedByField> {
|
|
21
|
+
/**
|
|
22
|
+
* Props applied to the [`FormHelperText`](https://mui.com/material-ui/api/form-helper-text/) element.
|
|
23
|
+
* @deprecated Use `slotProps.formHelperText` instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
24
|
+
*/
|
|
17
25
|
FormHelperTextProps?: Partial<FormHelperTextProps>;
|
|
26
|
+
/**
|
|
27
|
+
* Props applied to the [`InputLabel`](https://mui.com/material-ui/api/input-label/) element.
|
|
28
|
+
* Pointer events like `onClick` are enabled if and only if `shrink` is `true`.
|
|
29
|
+
* @deprecated Use `slotProps.inputLabel` instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
30
|
+
*/
|
|
18
31
|
InputLabelProps?: Partial<InputLabelProps>;
|
|
19
32
|
/**
|
|
20
33
|
* The helper text content.
|
|
@@ -29,9 +42,10 @@ export interface PickersStandardTextFieldProps extends PickersBaseTextFieldProps
|
|
|
29
42
|
variant?: 'standard';
|
|
30
43
|
/**
|
|
31
44
|
* Props applied to the Input element.
|
|
32
|
-
* It will be a [`FilledInput`](/material-ui/api/filled-input/),
|
|
33
|
-
* [`OutlinedInput`](/material-ui/api/outlined-input/) or [`Input`](/material-ui/api/input/)
|
|
45
|
+
* It will be a [`FilledInput`](https://mui.com/material-ui/api/filled-input/),
|
|
46
|
+
* [`OutlinedInput`](https://mui.com/material-ui/api/outlined-input/) or [`Input`](https://mui.com/material-ui/api/input/)
|
|
34
47
|
* component depending on the `variant` prop value.
|
|
48
|
+
* @deprecated Use `slotProps.input` instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
35
49
|
*/
|
|
36
50
|
InputProps?: Partial<PickersInputProps>;
|
|
37
51
|
}
|
|
@@ -43,9 +57,10 @@ export interface PickersOutlinedTextFieldProps extends PickersBaseTextFieldProps
|
|
|
43
57
|
variant?: 'outlined';
|
|
44
58
|
/**
|
|
45
59
|
* Props applied to the Input element.
|
|
46
|
-
* It will be a [`FilledInput`](/material-ui/api/filled-input/),
|
|
47
|
-
* [`OutlinedInput`](/material-ui/api/outlined-input/) or [`Input`](/material-ui/api/input/)
|
|
60
|
+
* It will be a [`FilledInput`](https://mui.com/material-ui/api/filled-input/),
|
|
61
|
+
* [`OutlinedInput`](https://mui.com/material-ui/api/outlined-input/) or [`Input`](https://mui.com/material-ui/api/input/)
|
|
48
62
|
* component depending on the `variant` prop value.
|
|
63
|
+
* @deprecated Use `slotProps.input` instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
49
64
|
*/
|
|
50
65
|
InputProps?: Partial<PickersOutlinedInputProps>;
|
|
51
66
|
}
|
|
@@ -57,9 +72,10 @@ export interface PickersFilledTextFieldProps extends PickersBaseTextFieldProps {
|
|
|
57
72
|
variant?: 'filled';
|
|
58
73
|
/**
|
|
59
74
|
* Props applied to the Input element.
|
|
60
|
-
* It will be a [`FilledInput`](/material-ui/api/filled-input/),
|
|
61
|
-
* [`OutlinedInput`](/material-ui/api/outlined-input/) or [`Input`](/material-ui/api/input/)
|
|
75
|
+
* It will be a [`FilledInput`](https://mui.com/material-ui/api/filled-input/),
|
|
76
|
+
* [`OutlinedInput`](https://mui.com/material-ui/api/outlined-input/) or [`Input`](https://mui.com/material-ui/api/input/)
|
|
62
77
|
* component depending on the `variant` prop value.
|
|
78
|
+
* @deprecated Use `slotProps.input` instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
63
79
|
*/
|
|
64
80
|
InputProps?: Partial<PickersFilledInputProps>;
|
|
65
81
|
}
|
|
@@ -95,7 +95,7 @@ StaticDatePicker.propTypes = {
|
|
|
95
95
|
*/
|
|
96
96
|
disableFuture: _propTypes.default.bool,
|
|
97
97
|
/**
|
|
98
|
-
* If `true`, today's
|
|
98
|
+
* If `true`, today's day is not highlighted.
|
|
99
99
|
* @default false
|
|
100
100
|
*/
|
|
101
101
|
disableHighlightToday: _propTypes.default.bool,
|
|
@@ -88,7 +88,7 @@ StaticDatePicker.propTypes = {
|
|
|
88
88
|
*/
|
|
89
89
|
disableFuture: PropTypes.bool,
|
|
90
90
|
/**
|
|
91
|
-
* If `true`, today's
|
|
91
|
+
* If `true`, today's day is not highlighted.
|
|
92
92
|
* @default false
|
|
93
93
|
*/
|
|
94
94
|
disableHighlightToday: PropTypes.bool,
|
|
@@ -154,7 +154,7 @@ StaticDateTimePicker.propTypes = {
|
|
|
154
154
|
*/
|
|
155
155
|
disableFuture: _propTypes.default.bool,
|
|
156
156
|
/**
|
|
157
|
-
* If `true`, today's
|
|
157
|
+
* If `true`, today's day is not highlighted.
|
|
158
158
|
* @default false
|
|
159
159
|
*/
|
|
160
160
|
disableHighlightToday: _propTypes.default.bool,
|
|
@@ -147,7 +147,7 @@ StaticDateTimePicker.propTypes = {
|
|
|
147
147
|
*/
|
|
148
148
|
disableFuture: PropTypes.bool,
|
|
149
149
|
/**
|
|
150
|
-
* If `true`, today's
|
|
150
|
+
* If `true`, today's day is not highlighted.
|
|
151
151
|
* @default false
|
|
152
152
|
*/
|
|
153
153
|
disableHighlightToday: PropTypes.bool,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { TimeFieldProps } from "./TimeField.types.mjs";
|
|
3
|
-
type TimeFieldComponent = (
|
|
3
|
+
type TimeFieldComponent = ((props: TimeFieldProps & React.RefAttributes<HTMLDivElement>) => React.JSX.Element) & {
|
|
4
4
|
propTypes?: any;
|
|
5
5
|
};
|
|
6
6
|
/**
|
package/TimeField/TimeField.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { TimeFieldProps } from "./TimeField.types.js";
|
|
3
|
-
type TimeFieldComponent = (
|
|
3
|
+
type TimeFieldComponent = ((props: TimeFieldProps & React.RefAttributes<HTMLDivElement>) => React.JSX.Element) & {
|
|
4
4
|
propTypes?: any;
|
|
5
5
|
};
|
|
6
6
|
/**
|
package/TimeField/TimeField.js
CHANGED
|
@@ -64,6 +64,12 @@ process.env.NODE_ENV !== "production" ? TimeField.propTypes = {
|
|
|
64
64
|
* @default adapter.is12HourCycleInCurrentLocale()
|
|
65
65
|
*/
|
|
66
66
|
ampm: _propTypes.default.bool,
|
|
67
|
+
/**
|
|
68
|
+
* Is `true` if the current values equals the empty value.
|
|
69
|
+
* For a single item value, it means that `value === null`
|
|
70
|
+
* For a range value, it means that `value === [null, null]`
|
|
71
|
+
*/
|
|
72
|
+
areAllSectionsEmpty: _propTypes.default.bool,
|
|
67
73
|
/**
|
|
68
74
|
* If `true`, the `input` element is focused during the first mount.
|
|
69
75
|
* @default false
|
|
@@ -115,9 +121,18 @@ process.env.NODE_ENV !== "production" ? TimeField.propTypes = {
|
|
|
115
121
|
*/
|
|
116
122
|
disablePast: _propTypes.default.bool,
|
|
117
123
|
/**
|
|
118
|
-
*
|
|
124
|
+
* End `InputAdornment` for this component.
|
|
119
125
|
*/
|
|
120
|
-
|
|
126
|
+
endAdornment: _propTypes.default.node,
|
|
127
|
+
/**
|
|
128
|
+
* If `true`, the `input` will indicate an error.
|
|
129
|
+
* @default false
|
|
130
|
+
*/
|
|
131
|
+
error: _propTypes.default.bool,
|
|
132
|
+
/**
|
|
133
|
+
* The ref object used to imperatively interact with the field.
|
|
134
|
+
*/
|
|
135
|
+
fieldRef: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object]),
|
|
121
136
|
/**
|
|
122
137
|
* If `true`, the component is displayed in focused state.
|
|
123
138
|
*/
|
|
@@ -155,7 +170,6 @@ process.env.NODE_ENV !== "production" ? TimeField.propTypes = {
|
|
|
155
170
|
hiddenLabel: _propTypes.default.bool,
|
|
156
171
|
/**
|
|
157
172
|
* The id of the `input` element.
|
|
158
|
-
* Use this prop to make `label` and `helperText` accessible for screen readers.
|
|
159
173
|
*/
|
|
160
174
|
id: _propTypes.default.string,
|
|
161
175
|
/**
|
|
@@ -222,6 +236,7 @@ process.env.NODE_ENV !== "production" ? TimeField.propTypes = {
|
|
|
222
236
|
* Callback fired when the clear button is clicked.
|
|
223
237
|
*/
|
|
224
238
|
onClear: _propTypes.default.func,
|
|
239
|
+
onClick: _propTypes.default.func,
|
|
225
240
|
/**
|
|
226
241
|
* Callback fired when the error associated with the current value changes.
|
|
227
242
|
* When a validation error is detected, the `error` parameter contains a non-null value.
|
|
@@ -233,6 +248,9 @@ process.env.NODE_ENV !== "production" ? TimeField.propTypes = {
|
|
|
233
248
|
*/
|
|
234
249
|
onError: _propTypes.default.func,
|
|
235
250
|
onFocus: _propTypes.default.func,
|
|
251
|
+
onInput: _propTypes.default.func,
|
|
252
|
+
onKeyDown: _propTypes.default.func,
|
|
253
|
+
onPaste: _propTypes.default.func,
|
|
236
254
|
/**
|
|
237
255
|
* Callback fired when the selected sections change.
|
|
238
256
|
* @param {FieldSelectedSections} newValue The new selected sections.
|
|
@@ -257,7 +275,7 @@ process.env.NODE_ENV !== "production" ? TimeField.propTypes = {
|
|
|
257
275
|
*/
|
|
258
276
|
referenceDate: _propTypes.default.object,
|
|
259
277
|
/**
|
|
260
|
-
* If `true`, the label
|
|
278
|
+
* If `true`, the label will indicate that the `input` is required.
|
|
261
279
|
* @default false
|
|
262
280
|
*/
|
|
263
281
|
required: _propTypes.default.bool,
|
|
@@ -308,6 +326,10 @@ process.env.NODE_ENV !== "production" ? TimeField.propTypes = {
|
|
|
308
326
|
* @default {}
|
|
309
327
|
*/
|
|
310
328
|
slots: _propTypes.default.object,
|
|
329
|
+
/**
|
|
330
|
+
* Start `InputAdornment` for this component.
|
|
331
|
+
*/
|
|
332
|
+
startAdornment: _propTypes.default.node,
|
|
311
333
|
style: _propTypes.default.object,
|
|
312
334
|
/**
|
|
313
335
|
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
@@ -321,10 +343,6 @@ process.env.NODE_ENV !== "production" ? TimeField.propTypes = {
|
|
|
321
343
|
* @default The timezone of the `value` or `defaultValue` prop is defined, 'default' otherwise.
|
|
322
344
|
*/
|
|
323
345
|
timezone: _propTypes.default.string,
|
|
324
|
-
/**
|
|
325
|
-
* The ref object used to imperatively interact with the field.
|
|
326
|
-
*/
|
|
327
|
-
unstableFieldRef: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object]),
|
|
328
346
|
/**
|
|
329
347
|
* The selected value.
|
|
330
348
|
* Used when the component is controlled.
|
package/TimeField/TimeField.mjs
CHANGED
|
@@ -57,6 +57,12 @@ process.env.NODE_ENV !== "production" ? TimeField.propTypes = {
|
|
|
57
57
|
* @default adapter.is12HourCycleInCurrentLocale()
|
|
58
58
|
*/
|
|
59
59
|
ampm: PropTypes.bool,
|
|
60
|
+
/**
|
|
61
|
+
* Is `true` if the current values equals the empty value.
|
|
62
|
+
* For a single item value, it means that `value === null`
|
|
63
|
+
* For a range value, it means that `value === [null, null]`
|
|
64
|
+
*/
|
|
65
|
+
areAllSectionsEmpty: PropTypes.bool,
|
|
60
66
|
/**
|
|
61
67
|
* If `true`, the `input` element is focused during the first mount.
|
|
62
68
|
* @default false
|
|
@@ -108,9 +114,18 @@ process.env.NODE_ENV !== "production" ? TimeField.propTypes = {
|
|
|
108
114
|
*/
|
|
109
115
|
disablePast: PropTypes.bool,
|
|
110
116
|
/**
|
|
111
|
-
*
|
|
117
|
+
* End `InputAdornment` for this component.
|
|
112
118
|
*/
|
|
113
|
-
|
|
119
|
+
endAdornment: PropTypes.node,
|
|
120
|
+
/**
|
|
121
|
+
* If `true`, the `input` will indicate an error.
|
|
122
|
+
* @default false
|
|
123
|
+
*/
|
|
124
|
+
error: PropTypes.bool,
|
|
125
|
+
/**
|
|
126
|
+
* The ref object used to imperatively interact with the field.
|
|
127
|
+
*/
|
|
128
|
+
fieldRef: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
|
|
114
129
|
/**
|
|
115
130
|
* If `true`, the component is displayed in focused state.
|
|
116
131
|
*/
|
|
@@ -148,7 +163,6 @@ process.env.NODE_ENV !== "production" ? TimeField.propTypes = {
|
|
|
148
163
|
hiddenLabel: PropTypes.bool,
|
|
149
164
|
/**
|
|
150
165
|
* The id of the `input` element.
|
|
151
|
-
* Use this prop to make `label` and `helperText` accessible for screen readers.
|
|
152
166
|
*/
|
|
153
167
|
id: PropTypes.string,
|
|
154
168
|
/**
|
|
@@ -215,6 +229,7 @@ process.env.NODE_ENV !== "production" ? TimeField.propTypes = {
|
|
|
215
229
|
* Callback fired when the clear button is clicked.
|
|
216
230
|
*/
|
|
217
231
|
onClear: PropTypes.func,
|
|
232
|
+
onClick: PropTypes.func,
|
|
218
233
|
/**
|
|
219
234
|
* Callback fired when the error associated with the current value changes.
|
|
220
235
|
* When a validation error is detected, the `error` parameter contains a non-null value.
|
|
@@ -226,6 +241,9 @@ process.env.NODE_ENV !== "production" ? TimeField.propTypes = {
|
|
|
226
241
|
*/
|
|
227
242
|
onError: PropTypes.func,
|
|
228
243
|
onFocus: PropTypes.func,
|
|
244
|
+
onInput: PropTypes.func,
|
|
245
|
+
onKeyDown: PropTypes.func,
|
|
246
|
+
onPaste: PropTypes.func,
|
|
229
247
|
/**
|
|
230
248
|
* Callback fired when the selected sections change.
|
|
231
249
|
* @param {FieldSelectedSections} newValue The new selected sections.
|
|
@@ -250,7 +268,7 @@ process.env.NODE_ENV !== "production" ? TimeField.propTypes = {
|
|
|
250
268
|
*/
|
|
251
269
|
referenceDate: PropTypes.object,
|
|
252
270
|
/**
|
|
253
|
-
* If `true`, the label
|
|
271
|
+
* If `true`, the label will indicate that the `input` is required.
|
|
254
272
|
* @default false
|
|
255
273
|
*/
|
|
256
274
|
required: PropTypes.bool,
|
|
@@ -301,6 +319,10 @@ process.env.NODE_ENV !== "production" ? TimeField.propTypes = {
|
|
|
301
319
|
* @default {}
|
|
302
320
|
*/
|
|
303
321
|
slots: PropTypes.object,
|
|
322
|
+
/**
|
|
323
|
+
* Start `InputAdornment` for this component.
|
|
324
|
+
*/
|
|
325
|
+
startAdornment: PropTypes.node,
|
|
304
326
|
style: PropTypes.object,
|
|
305
327
|
/**
|
|
306
328
|
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
@@ -314,10 +336,6 @@ process.env.NODE_ENV !== "production" ? TimeField.propTypes = {
|
|
|
314
336
|
* @default The timezone of the `value` or `defaultValue` prop is defined, 'default' otherwise.
|
|
315
337
|
*/
|
|
316
338
|
timezone: PropTypes.string,
|
|
317
|
-
/**
|
|
318
|
-
* The ref object used to imperatively interact with the field.
|
|
319
|
-
*/
|
|
320
|
-
unstableFieldRef: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
|
|
321
339
|
/**
|
|
322
340
|
* The selected value.
|
|
323
341
|
* Used when the component is controlled.
|
|
@@ -5,8 +5,8 @@ import { ExportedValidateTimeProps } from "../validation/validateTime.mjs";
|
|
|
5
5
|
import { AmPmProps } from "../internals/models/props/time.mjs";
|
|
6
6
|
import { PickerValue } from "../internals/models/index.mjs";
|
|
7
7
|
import { ExportedPickerFieldUIProps, PickerFieldUISlotProps, PickerFieldUISlots } from "../internals/components/PickerFieldUI.mjs";
|
|
8
|
-
export interface UseTimeFieldProps
|
|
9
|
-
export type TimeFieldProps
|
|
8
|
+
export interface UseTimeFieldProps extends MakeOptional<UseFieldInternalProps<PickerValue, TimeValidationError>, 'format'>, ExportedValidateTimeProps, ExportedPickerFieldUIProps, AmPmProps {}
|
|
9
|
+
export type TimeFieldProps = UseTimeFieldProps & Omit<BuiltInFieldTextFieldProps, keyof UseTimeFieldProps> & {
|
|
10
10
|
/**
|
|
11
11
|
* Overridable component slots.
|
|
12
12
|
* @default {}
|
|
@@ -5,8 +5,8 @@ import { ExportedValidateTimeProps } from "../validation/validateTime.js";
|
|
|
5
5
|
import { AmPmProps } from "../internals/models/props/time.js";
|
|
6
6
|
import { PickerValue } from "../internals/models/index.js";
|
|
7
7
|
import { ExportedPickerFieldUIProps, PickerFieldUISlotProps, PickerFieldUISlots } from "../internals/components/PickerFieldUI.js";
|
|
8
|
-
export interface UseTimeFieldProps
|
|
9
|
-
export type TimeFieldProps
|
|
8
|
+
export interface UseTimeFieldProps extends MakeOptional<UseFieldInternalProps<PickerValue, TimeValidationError>, 'format'>, ExportedValidateTimeProps, ExportedPickerFieldUIProps, AmPmProps {}
|
|
9
|
+
export type TimeFieldProps = UseTimeFieldProps & Omit<BuiltInFieldTextFieldProps, keyof UseTimeFieldProps> & {
|
|
10
10
|
/**
|
|
11
11
|
* Overridable component slots.
|
|
12
12
|
* @default {}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { UseTimeFieldProps } from "./TimeField.types.mjs";
|
|
2
|
-
export declare const useTimeField: <
|
|
2
|
+
export declare const useTimeField: <TProps extends UseTimeFieldProps>(props: TProps) => import("../internals/index.mjs").UseFieldReturnValue<TProps>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { UseTimeFieldProps } from "./TimeField.types.js";
|
|
2
|
-
export declare const useTimeField: <
|
|
2
|
+
export declare const useTimeField: <TProps extends UseTimeFieldProps>(props: TProps) => import("../internals/index.js").UseFieldReturnValue<TProps>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { TimePickerProps } from "./TimePicker.types.mjs";
|
|
3
|
-
type TimePickerComponent = (
|
|
3
|
+
type TimePickerComponent = ((props: TimePickerProps & React.RefAttributes<HTMLDivElement>) => React.JSX.Element) & {
|
|
4
4
|
propTypes?: any;
|
|
5
5
|
};
|
|
6
6
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { TimePickerProps } from "./TimePicker.types.js";
|
|
3
|
-
type TimePickerComponent = (
|
|
3
|
+
type TimePickerComponent = ((props: TimePickerProps & React.RefAttributes<HTMLDivElement>) => React.JSX.Element) & {
|
|
4
4
|
propTypes?: any;
|
|
5
5
|
};
|
|
6
6
|
/**
|
package/TimePicker/TimePicker.js
CHANGED
|
@@ -119,10 +119,6 @@ process.env.NODE_ENV !== "production" ? TimePicker.propTypes = {
|
|
|
119
119
|
* @default false
|
|
120
120
|
*/
|
|
121
121
|
disablePast: _propTypes.default.bool,
|
|
122
|
-
/**
|
|
123
|
-
* @default true
|
|
124
|
-
*/
|
|
125
|
-
enableAccessibleFieldDOMStructure: _propTypes.default.any,
|
|
126
122
|
/**
|
|
127
123
|
* Format of the date when rendered in the input(s).
|
|
128
124
|
* Defaults to localized format based on the used `views`.
|
|
@@ -112,10 +112,6 @@ process.env.NODE_ENV !== "production" ? TimePicker.propTypes = {
|
|
|
112
112
|
* @default false
|
|
113
113
|
*/
|
|
114
114
|
disablePast: PropTypes.bool,
|
|
115
|
-
/**
|
|
116
|
-
* @default true
|
|
117
|
-
*/
|
|
118
|
-
enableAccessibleFieldDOMStructure: PropTypes.any,
|
|
119
115
|
/**
|
|
120
116
|
* Format of the date when rendered in the input(s).
|
|
121
117
|
* Defaults to localized format based on the used `views`.
|
|
@@ -3,8 +3,8 @@ import { BaseSingleInputFieldProps, TimeViewWithMeridiem } from "../internals/mo
|
|
|
3
3
|
import { MobileTimePickerProps, MobileTimePickerSlots, MobileTimePickerSlotProps } from "../MobileTimePicker/index.mjs";
|
|
4
4
|
import { ValidateTimeProps } from "../validation/validateTime.mjs";
|
|
5
5
|
export interface TimePickerSlots extends DesktopTimePickerSlots, MobileTimePickerSlots {}
|
|
6
|
-
export interface TimePickerSlotProps
|
|
7
|
-
export interface TimePickerProps
|
|
6
|
+
export interface TimePickerSlotProps extends DesktopTimePickerSlotProps, MobileTimePickerSlotProps {}
|
|
7
|
+
export interface TimePickerProps extends DesktopTimePickerProps, Omit<MobileTimePickerProps<TimeViewWithMeridiem>, 'views'> {
|
|
8
8
|
/**
|
|
9
9
|
* CSS media query when `Mobile` mode will be changed to `Desktop`.
|
|
10
10
|
* @default '@media (pointer: fine)'
|
|
@@ -20,7 +20,7 @@ export interface TimePickerProps<TEnableAccessibleFieldDOMStructure extends bool
|
|
|
20
20
|
* The props used for each component slot.
|
|
21
21
|
* @default {}
|
|
22
22
|
*/
|
|
23
|
-
slotProps?: TimePickerSlotProps
|
|
23
|
+
slotProps?: TimePickerSlotProps;
|
|
24
24
|
}
|
|
25
25
|
/**
|
|
26
26
|
* Props the field can receive when used inside a Time Picker (<TimePicker />, <DesktopTimePicker /> or <MobileTimePicker /> component).
|
|
@@ -3,8 +3,8 @@ import { BaseSingleInputFieldProps, TimeViewWithMeridiem } from "../internals/mo
|
|
|
3
3
|
import { MobileTimePickerProps, MobileTimePickerSlots, MobileTimePickerSlotProps } from "../MobileTimePicker/index.js";
|
|
4
4
|
import { ValidateTimeProps } from "../validation/validateTime.js";
|
|
5
5
|
export interface TimePickerSlots extends DesktopTimePickerSlots, MobileTimePickerSlots {}
|
|
6
|
-
export interface TimePickerSlotProps
|
|
7
|
-
export interface TimePickerProps
|
|
6
|
+
export interface TimePickerSlotProps extends DesktopTimePickerSlotProps, MobileTimePickerSlotProps {}
|
|
7
|
+
export interface TimePickerProps extends DesktopTimePickerProps, Omit<MobileTimePickerProps<TimeViewWithMeridiem>, 'views'> {
|
|
8
8
|
/**
|
|
9
9
|
* CSS media query when `Mobile` mode will be changed to `Desktop`.
|
|
10
10
|
* @default '@media (pointer: fine)'
|
|
@@ -20,7 +20,7 @@ export interface TimePickerProps<TEnableAccessibleFieldDOMStructure extends bool
|
|
|
20
20
|
* The props used for each component slot.
|
|
21
21
|
* @default {}
|
|
22
22
|
*/
|
|
23
|
-
slotProps?: TimePickerSlotProps
|
|
23
|
+
slotProps?: TimePickerSlotProps;
|
|
24
24
|
}
|
|
25
25
|
/**
|
|
26
26
|
* Props the field can receive when used inside a Time Picker (<TimePicker />, <DesktopTimePicker /> or <MobileTimePicker /> component).
|
|
@@ -45,10 +45,10 @@ const DefaultYearButton = (0, _styles.styled)('button', {
|
|
|
45
45
|
borderRadius: 18,
|
|
46
46
|
cursor: 'pointer',
|
|
47
47
|
'&:focus': {
|
|
48
|
-
backgroundColor: theme.
|
|
48
|
+
backgroundColor: theme.alpha((theme.vars || theme).palette.action.active, (theme.vars || theme).palette.action.focusOpacity)
|
|
49
49
|
},
|
|
50
50
|
'&:hover': {
|
|
51
|
-
backgroundColor: theme.
|
|
51
|
+
backgroundColor: theme.alpha((theme.vars || theme).palette.action.active, (theme.vars || theme).palette.action.hoverOpacity)
|
|
52
52
|
},
|
|
53
53
|
'&:disabled': {
|
|
54
54
|
cursor: 'auto',
|
|
@@ -4,7 +4,7 @@ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWith
|
|
|
4
4
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
5
5
|
const _excluded = ["autoFocus", "classes", "disabled", "selected", "value", "onClick", "onKeyDown", "onFocus", "onBlur", "slots", "slotProps"];
|
|
6
6
|
import * as React from 'react';
|
|
7
|
-
import { styled
|
|
7
|
+
import { styled } from '@mui/material/styles';
|
|
8
8
|
import useSlotProps from '@mui/utils/useSlotProps';
|
|
9
9
|
import composeClasses from '@mui/utils/composeClasses';
|
|
10
10
|
import useEnhancedEffect from '@mui/utils/useEnhancedEffect';
|
|
@@ -38,10 +38,10 @@ const DefaultYearButton = styled('button', {
|
|
|
38
38
|
borderRadius: 18,
|
|
39
39
|
cursor: 'pointer',
|
|
40
40
|
'&:focus': {
|
|
41
|
-
backgroundColor: theme.
|
|
41
|
+
backgroundColor: theme.alpha((theme.vars || theme).palette.action.active, (theme.vars || theme).palette.action.focusOpacity)
|
|
42
42
|
},
|
|
43
43
|
'&:hover': {
|
|
44
|
-
backgroundColor: theme.
|
|
44
|
+
backgroundColor: theme.alpha((theme.vars || theme).palette.action.active, (theme.vars || theme).palette.action.hoverOpacity)
|
|
45
45
|
},
|
|
46
46
|
'&:disabled': {
|
|
47
47
|
cursor: 'auto',
|