@mui/x-date-pickers 6.18.0 → 7.0.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AdapterLuxon/AdapterLuxon.js +13 -3
- package/CHANGELOG.md +212 -5
- package/DateCalendar/DateCalendar.js +4 -20
- package/DateCalendar/DateCalendar.types.d.ts +12 -3
- package/DateCalendar/DayCalendar.d.ts +12 -3
- package/DateCalendar/DayCalendar.js +3 -5
- package/DateCalendar/useCalendarState.js +2 -3
- package/DateField/DateField.js +5 -21
- package/DateField/DateField.types.d.ts +12 -3
- package/DatePicker/DatePicker.js +0 -12
- package/DatePicker/DatePicker.types.d.ts +1 -14
- package/DatePicker/shared.d.ts +3 -15
- package/DatePicker/shared.js +2 -5
- package/DateTimeField/DateTimeField.js +5 -21
- package/DateTimeField/DateTimeField.types.d.ts +2 -15
- package/DateTimePicker/DateTimePicker.js +0 -12
- package/DateTimePicker/DateTimePicker.types.d.ts +1 -14
- package/DateTimePicker/shared.d.ts +3 -16
- package/DateTimePicker/shared.js +4 -7
- package/DesktopDatePicker/DesktopDatePicker.js +0 -12
- package/DesktopDatePicker/DesktopDatePicker.types.d.ts +2 -15
- package/DesktopDateTimePicker/DesktopDateTimePicker.js +0 -12
- package/DesktopDateTimePicker/DesktopDateTimePicker.types.d.ts +2 -15
- package/DesktopTimePicker/DesktopTimePicker.js +0 -12
- package/DesktopTimePicker/DesktopTimePicker.types.d.ts +2 -15
- package/DigitalClock/DigitalClock.js +15 -24
- package/DigitalClock/DigitalClock.types.d.ts +2 -15
- package/MobileDatePicker/MobileDatePicker.js +0 -12
- package/MobileDatePicker/MobileDatePicker.types.d.ts +2 -15
- package/MobileDateTimePicker/MobileDateTimePicker.js +0 -12
- package/MobileDateTimePicker/MobileDateTimePicker.types.d.ts +2 -15
- package/MobileTimePicker/MobileTimePicker.js +0 -12
- package/MobileTimePicker/MobileTimePicker.types.d.ts +2 -15
- package/MonthCalendar/MonthCalendar.js +3 -7
- package/MultiSectionDigitalClock/MultiSectionDigitalClock.js +7 -18
- package/MultiSectionDigitalClock/MultiSectionDigitalClock.types.d.ts +3 -15
- package/MultiSectionDigitalClock/MultiSectionDigitalClock.utils.d.ts +2 -1
- package/MultiSectionDigitalClock/MultiSectionDigitalClock.utils.js +16 -6
- package/MultiSectionDigitalClock/MultiSectionDigitalClockSection.d.ts +1 -2
- package/MultiSectionDigitalClock/MultiSectionDigitalClockSection.js +13 -10
- package/PickersCalendarHeader/PickersCalendarHeader.js +4 -17
- package/PickersCalendarHeader/PickersCalendarHeader.types.d.ts +3 -16
- package/PickersLayout/PickersLayout.js +0 -12
- package/PickersLayout/PickersLayout.types.d.ts +6 -19
- package/PickersLayout/usePickerLayout.js +2 -7
- package/StaticDatePicker/StaticDatePicker.js +0 -12
- package/StaticDatePicker/StaticDatePicker.types.d.ts +2 -14
- package/StaticDateTimePicker/StaticDateTimePicker.js +0 -12
- package/StaticDateTimePicker/StaticDateTimePicker.types.d.ts +2 -14
- package/StaticTimePicker/StaticTimePicker.js +0 -12
- package/StaticTimePicker/StaticTimePicker.types.d.ts +2 -14
- package/TimeClock/TimeClock.js +3 -20
- package/TimeClock/TimeClock.types.d.ts +1 -14
- package/TimeField/TimeField.js +5 -21
- package/TimeField/TimeField.types.d.ts +2 -15
- package/TimePicker/TimePicker.js +0 -12
- package/TimePicker/TimePicker.types.d.ts +1 -14
- package/TimePicker/shared.d.ts +2 -15
- package/TimePicker/shared.js +4 -7
- package/YearCalendar/YearCalendar.js +3 -7
- package/dateTimeViewRenderers/dateTimeViewRenderers.d.ts +2 -2
- package/dateTimeViewRenderers/dateTimeViewRenderers.js +2 -8
- package/dateViewRenderers/dateViewRenderers.d.ts +1 -1
- package/dateViewRenderers/dateViewRenderers.js +0 -4
- package/hooks/useClearableField.d.ts +1 -3
- package/hooks/useClearableField.js +6 -8
- package/index.js +1 -1
- package/internals/components/PickersArrowSwitcher/PickersArrowSwitcher.types.d.ts +5 -6
- package/internals/components/PickersModalDialog.d.ts +4 -5
- package/internals/components/PickersPopper.d.ts +5 -6
- package/internals/hooks/useDesktopPicker/useDesktopPicker.types.d.ts +7 -8
- package/internals/hooks/useField/useField.types.d.ts +2 -2
- package/internals/hooks/useMobilePicker/useMobilePicker.types.d.ts +3 -4
- package/internals/hooks/useStaticPicker/useStaticPicker.types.d.ts +1 -14
- package/internals/hooks/useViews.js +2 -1
- package/internals/index.d.ts +0 -2
- package/internals/index.js +0 -1
- package/legacy/AdapterLuxon/AdapterLuxon.js +13 -3
- package/legacy/DateCalendar/DateCalendar.js +4 -20
- package/legacy/DateCalendar/DayCalendar.js +3 -5
- package/legacy/DateCalendar/useCalendarState.js +2 -3
- package/legacy/DateField/DateField.js +6 -22
- package/legacy/DatePicker/DatePicker.js +0 -12
- package/legacy/DatePicker/shared.js +2 -5
- package/legacy/DateTimeField/DateTimeField.js +6 -22
- package/legacy/DateTimePicker/DateTimePicker.js +0 -12
- package/legacy/DateTimePicker/shared.js +4 -7
- package/legacy/DesktopDatePicker/DesktopDatePicker.js +0 -12
- package/legacy/DesktopDateTimePicker/DesktopDateTimePicker.js +0 -12
- package/legacy/DesktopTimePicker/DesktopTimePicker.js +0 -12
- package/legacy/DigitalClock/DigitalClock.js +17 -24
- package/legacy/MobileDatePicker/MobileDatePicker.js +0 -12
- package/legacy/MobileDateTimePicker/MobileDateTimePicker.js +0 -12
- package/legacy/MobileTimePicker/MobileTimePicker.js +0 -12
- package/legacy/MonthCalendar/MonthCalendar.js +3 -6
- package/legacy/MultiSectionDigitalClock/MultiSectionDigitalClock.js +11 -18
- package/legacy/MultiSectionDigitalClock/MultiSectionDigitalClock.utils.js +16 -6
- package/legacy/MultiSectionDigitalClock/MultiSectionDigitalClockSection.js +15 -10
- package/legacy/PickersCalendarHeader/PickersCalendarHeader.js +4 -18
- package/legacy/PickersLayout/PickersLayout.js +0 -12
- package/legacy/PickersLayout/usePickerLayout.js +2 -7
- package/legacy/StaticDatePicker/StaticDatePicker.js +0 -12
- package/legacy/StaticDateTimePicker/StaticDateTimePicker.js +0 -12
- package/legacy/StaticTimePicker/StaticTimePicker.js +0 -12
- package/legacy/TimeClock/TimeClock.js +3 -20
- package/legacy/TimeField/TimeField.js +5 -21
- package/legacy/TimePicker/TimePicker.js +0 -12
- package/legacy/TimePicker/shared.js +4 -7
- package/legacy/YearCalendar/YearCalendar.js +3 -6
- package/legacy/dateTimeViewRenderers/dateTimeViewRenderers.js +2 -8
- package/legacy/dateViewRenderers/dateViewRenderers.js +0 -4
- package/legacy/hooks/useClearableField.js +6 -8
- package/legacy/index.js +1 -1
- package/legacy/internals/hooks/useViews.js +2 -1
- package/legacy/internals/index.js +0 -1
- package/legacy/locales/esES.js +6 -7
- package/legacy/locales/eu.js +94 -0
- package/legacy/locales/index.js +1 -0
- package/legacy/timeViewRenderers/timeViewRenderers.js +0 -12
- package/locales/esES.js +6 -7
- package/locales/eu.d.ts +54 -0
- package/locales/eu.js +58 -0
- package/locales/index.d.ts +1 -0
- package/locales/index.js +1 -0
- package/modern/AdapterLuxon/AdapterLuxon.js +13 -3
- package/modern/DateCalendar/DateCalendar.js +3 -19
- package/modern/DateCalendar/DayCalendar.js +2 -4
- package/modern/DateCalendar/useCalendarState.js +2 -3
- package/modern/DateField/DateField.js +4 -20
- package/modern/DatePicker/DatePicker.js +0 -12
- package/modern/DatePicker/shared.js +1 -4
- package/modern/DateTimeField/DateTimeField.js +4 -20
- package/modern/DateTimePicker/DateTimePicker.js +0 -12
- package/modern/DateTimePicker/shared.js +3 -6
- package/modern/DesktopDatePicker/DesktopDatePicker.js +0 -12
- package/modern/DesktopDateTimePicker/DesktopDateTimePicker.js +0 -12
- package/modern/DesktopTimePicker/DesktopTimePicker.js +0 -12
- package/modern/DigitalClock/DigitalClock.js +14 -23
- package/modern/MobileDatePicker/MobileDatePicker.js +0 -12
- package/modern/MobileDateTimePicker/MobileDateTimePicker.js +0 -12
- package/modern/MobileTimePicker/MobileTimePicker.js +0 -12
- package/modern/MonthCalendar/MonthCalendar.js +3 -7
- package/modern/MultiSectionDigitalClock/MultiSectionDigitalClock.js +7 -18
- package/modern/MultiSectionDigitalClock/MultiSectionDigitalClock.utils.js +16 -6
- package/modern/MultiSectionDigitalClock/MultiSectionDigitalClockSection.js +13 -10
- package/modern/PickersCalendarHeader/PickersCalendarHeader.js +3 -16
- package/modern/PickersLayout/PickersLayout.js +0 -12
- package/modern/PickersLayout/usePickerLayout.js +2 -7
- package/modern/StaticDatePicker/StaticDatePicker.js +0 -12
- package/modern/StaticDateTimePicker/StaticDateTimePicker.js +0 -12
- package/modern/StaticTimePicker/StaticTimePicker.js +0 -12
- package/modern/TimeClock/TimeClock.js +3 -20
- package/modern/TimeField/TimeField.js +4 -20
- package/modern/TimePicker/TimePicker.js +0 -12
- package/modern/TimePicker/shared.js +3 -6
- package/modern/YearCalendar/YearCalendar.js +3 -7
- package/modern/dateTimeViewRenderers/dateTimeViewRenderers.js +1 -7
- package/modern/dateViewRenderers/dateViewRenderers.js +0 -4
- package/modern/hooks/useClearableField.js +5 -7
- package/modern/index.js +1 -1
- package/modern/internals/hooks/useViews.js +2 -1
- package/modern/internals/index.js +0 -1
- package/modern/locales/esES.js +6 -7
- package/modern/locales/eu.js +58 -0
- package/modern/locales/index.js +1 -0
- package/modern/timeViewRenderers/timeViewRenderers.js +0 -12
- package/node/AdapterLuxon/AdapterLuxon.js +13 -3
- package/node/DateCalendar/DateCalendar.js +3 -19
- package/node/DateCalendar/DayCalendar.js +2 -4
- package/node/DateCalendar/useCalendarState.js +1 -2
- package/node/DateField/DateField.js +4 -20
- package/node/DatePicker/DatePicker.js +0 -12
- package/node/DatePicker/shared.js +1 -4
- package/node/DateTimeField/DateTimeField.js +4 -20
- package/node/DateTimePicker/DateTimePicker.js +0 -12
- package/node/DateTimePicker/shared.js +3 -6
- package/node/DesktopDatePicker/DesktopDatePicker.js +0 -12
- package/node/DesktopDateTimePicker/DesktopDateTimePicker.js +0 -12
- package/node/DesktopTimePicker/DesktopTimePicker.js +0 -12
- package/node/DigitalClock/DigitalClock.js +14 -23
- package/node/MobileDatePicker/MobileDatePicker.js +0 -12
- package/node/MobileDateTimePicker/MobileDateTimePicker.js +0 -12
- package/node/MobileTimePicker/MobileTimePicker.js +0 -12
- package/node/MonthCalendar/MonthCalendar.js +3 -7
- package/node/MultiSectionDigitalClock/MultiSectionDigitalClock.js +7 -18
- package/node/MultiSectionDigitalClock/MultiSectionDigitalClock.utils.js +16 -6
- package/node/MultiSectionDigitalClock/MultiSectionDigitalClockSection.js +13 -10
- package/node/PickersCalendarHeader/PickersCalendarHeader.js +3 -16
- package/node/PickersLayout/PickersLayout.js +0 -12
- package/node/PickersLayout/usePickerLayout.js +2 -7
- package/node/StaticDatePicker/StaticDatePicker.js +0 -12
- package/node/StaticDateTimePicker/StaticDateTimePicker.js +0 -12
- package/node/StaticTimePicker/StaticTimePicker.js +0 -12
- package/node/TimeClock/TimeClock.js +3 -20
- package/node/TimeField/TimeField.js +4 -20
- package/node/TimePicker/TimePicker.js +0 -12
- package/node/TimePicker/shared.js +3 -6
- package/node/YearCalendar/YearCalendar.js +3 -7
- package/node/dateTimeViewRenderers/dateTimeViewRenderers.js +1 -7
- package/node/dateViewRenderers/dateViewRenderers.js +0 -4
- package/node/hooks/useClearableField.js +5 -7
- package/node/index.js +1 -1
- package/node/internals/hooks/useViews.js +2 -1
- package/node/internals/index.js +0 -7
- package/node/locales/esES.js +6 -7
- package/node/locales/eu.js +64 -0
- package/node/locales/index.js +11 -0
- package/node/timeViewRenderers/timeViewRenderers.js +0 -12
- package/package.json +1 -1
- package/timeViewRenderers/timeViewRenderers.d.ts +3 -3
- package/timeViewRenderers/timeViewRenderers.js +0 -12
- package/internals/utils/slots-migration.d.ts +0 -36
- package/internals/utils/slots-migration.js +0 -13
- package/legacy/internals/utils/slots-migration.js +0 -14
- package/modern/internals/utils/slots-migration.js +0 -13
- package/node/internals/utils/slots-migration.js +0 -21
|
@@ -5,7 +5,6 @@ import { unstable_composeClasses as composeClasses } from '@mui/utils';
|
|
|
5
5
|
import { PickersActionBar } from '../PickersActionBar';
|
|
6
6
|
import { getPickersLayoutUtilityClass } from './pickersLayoutClasses';
|
|
7
7
|
import { PickersShortcuts } from '../PickersShortcuts';
|
|
8
|
-
import { uncapitalizeObjectKeys } from '../internals/utils/slots-migration';
|
|
9
8
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
10
9
|
function toolbarHasView(toolbarProps) {
|
|
11
10
|
return toolbarProps.view !== null;
|
|
@@ -43,12 +42,8 @@ var usePickerLayout = function usePickerLayout(props) {
|
|
|
43
42
|
disabled = _ref.disabled,
|
|
44
43
|
readOnly = _ref.readOnly,
|
|
45
44
|
children = _ref.children,
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
innerSlots = _ref.slots,
|
|
49
|
-
innerSlotProps = _ref.slotProps;
|
|
50
|
-
var slots = innerSlots != null ? innerSlots : uncapitalizeObjectKeys(components);
|
|
51
|
-
var slotProps = innerSlotProps != null ? innerSlotProps : componentsProps;
|
|
45
|
+
slots = _ref.slots,
|
|
46
|
+
slotProps = _ref.slotProps;
|
|
52
47
|
var classes = useUtilityClasses(props);
|
|
53
48
|
|
|
54
49
|
// Action bar
|
|
@@ -63,18 +63,6 @@ StaticDatePicker.propTypes = {
|
|
|
63
63
|
* Class name applied to the root element.
|
|
64
64
|
*/
|
|
65
65
|
className: PropTypes.string,
|
|
66
|
-
/**
|
|
67
|
-
* Overridable components.
|
|
68
|
-
* @default {}
|
|
69
|
-
* @deprecated Please use `slots`.
|
|
70
|
-
*/
|
|
71
|
-
components: PropTypes.object,
|
|
72
|
-
/**
|
|
73
|
-
* The props used for each component slot.
|
|
74
|
-
* @default {}
|
|
75
|
-
* @deprecated Please use `slotProps`.
|
|
76
|
-
*/
|
|
77
|
-
componentsProps: PropTypes.object,
|
|
78
66
|
/**
|
|
79
67
|
* Formats the day of week displayed in the calendar header.
|
|
80
68
|
* @param {string} day The day of week provided by the adapter. Deprecated, will be removed in v7: Use `date` instead.
|
|
@@ -83,18 +83,6 @@ StaticDateTimePicker.propTypes = {
|
|
|
83
83
|
* Class name applied to the root element.
|
|
84
84
|
*/
|
|
85
85
|
className: PropTypes.string,
|
|
86
|
-
/**
|
|
87
|
-
* Overridable components.
|
|
88
|
-
* @default {}
|
|
89
|
-
* @deprecated Please use `slots`.
|
|
90
|
-
*/
|
|
91
|
-
components: PropTypes.object,
|
|
92
|
-
/**
|
|
93
|
-
* The props used for each component slot.
|
|
94
|
-
* @default {}
|
|
95
|
-
* @deprecated Please use `slotProps`.
|
|
96
|
-
*/
|
|
97
|
-
componentsProps: PropTypes.object,
|
|
98
86
|
/**
|
|
99
87
|
* Formats the day of week displayed in the calendar header.
|
|
100
88
|
* @param {string} day The day of week provided by the adapter. Deprecated, will be removed in v7: Use `date` instead.
|
|
@@ -75,18 +75,6 @@ StaticTimePicker.propTypes = {
|
|
|
75
75
|
* Class name applied to the root element.
|
|
76
76
|
*/
|
|
77
77
|
className: PropTypes.string,
|
|
78
|
-
/**
|
|
79
|
-
* Overridable components.
|
|
80
|
-
* @default {}
|
|
81
|
-
* @deprecated Please use `slots`.
|
|
82
|
-
*/
|
|
83
|
-
components: PropTypes.object,
|
|
84
|
-
/**
|
|
85
|
-
* The props used for each component slot.
|
|
86
|
-
* @default {}
|
|
87
|
-
* @deprecated Please use `slotProps`.
|
|
88
|
-
*/
|
|
89
|
-
componentsProps: PropTypes.object,
|
|
90
78
|
/**
|
|
91
79
|
* The default value.
|
|
92
80
|
* Used when the component is not controlled.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
3
|
-
var _excluded = ["ampm", "ampmInClock", "autoFocus", "
|
|
3
|
+
var _excluded = ["ampm", "ampmInClock", "autoFocus", "slots", "slotProps", "value", "defaultValue", "referenceDate", "disableIgnoringDatePartForTimeValidation", "maxTime", "minTime", "disableFuture", "disablePast", "minutesStep", "shouldDisableClock", "shouldDisableTime", "showViewSwitcher", "onChange", "view", "views", "openTo", "onViewChange", "focusedView", "onFocusedViewChange", "className", "disabled", "readOnly", "timezone"];
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import clsx from 'clsx';
|
|
6
6
|
import PropTypes from 'prop-types';
|
|
@@ -17,7 +17,6 @@ import { Clock } from './Clock';
|
|
|
17
17
|
import { getHourNumbers, getMinutesNumbers } from './ClockNumbers';
|
|
18
18
|
import { useControlledValueWithTimezone } from '../internals/hooks/useValueWithTimezone';
|
|
19
19
|
import { singleItemValueManager } from '../internals/utils/valueManagers';
|
|
20
|
-
import { uncapitalizeObjectKeys } from '../internals/utils/slots-migration';
|
|
21
20
|
import { useClockReferenceDate } from '../internals/hooks/useClockReferenceDate';
|
|
22
21
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
23
22
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
@@ -74,10 +73,8 @@ export var TimeClock = /*#__PURE__*/React.forwardRef(function TimeClock(inProps,
|
|
|
74
73
|
_props$ampmInClock = props.ampmInClock,
|
|
75
74
|
ampmInClock = _props$ampmInClock === void 0 ? false : _props$ampmInClock,
|
|
76
75
|
autoFocus = props.autoFocus,
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
innerSlots = props.slots,
|
|
80
|
-
innerSlotProps = props.slotProps,
|
|
76
|
+
slots = props.slots,
|
|
77
|
+
slotProps = props.slotProps,
|
|
81
78
|
valueProp = props.value,
|
|
82
79
|
defaultValue = props.defaultValue,
|
|
83
80
|
referenceDateProp = props.referenceDate,
|
|
@@ -105,8 +102,6 @@ export var TimeClock = /*#__PURE__*/React.forwardRef(function TimeClock(inProps,
|
|
|
105
102
|
readOnly = props.readOnly,
|
|
106
103
|
timezoneProp = props.timezone,
|
|
107
104
|
other = _objectWithoutProperties(props, _excluded);
|
|
108
|
-
var slots = innerSlots != null ? innerSlots : uncapitalizeObjectKeys(components);
|
|
109
|
-
var slotProps = innerSlotProps != null ? innerSlotProps : componentsProps;
|
|
110
105
|
var _useControlledValueWi = useControlledValueWithTimezone({
|
|
111
106
|
name: 'TimeClock',
|
|
112
107
|
timezone: timezoneProp,
|
|
@@ -358,18 +353,6 @@ process.env.NODE_ENV !== "production" ? TimeClock.propTypes = {
|
|
|
358
353
|
*/
|
|
359
354
|
classes: PropTypes.object,
|
|
360
355
|
className: PropTypes.string,
|
|
361
|
-
/**
|
|
362
|
-
* Overridable components.
|
|
363
|
-
* @default {}
|
|
364
|
-
* @deprecated Please use `slots`.
|
|
365
|
-
*/
|
|
366
|
-
components: PropTypes.object,
|
|
367
|
-
/**
|
|
368
|
-
* The props used for each component slot.
|
|
369
|
-
* @default {}
|
|
370
|
-
* @deprecated Please use `slotProps`.
|
|
371
|
-
*/
|
|
372
|
-
componentsProps: PropTypes.object,
|
|
373
356
|
/**
|
|
374
357
|
* The default selected value.
|
|
375
358
|
* Used when the component is not controlled.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
3
|
-
var _excluded = ["slots", "slotProps", "
|
|
3
|
+
var _excluded = ["slots", "slotProps", "InputProps", "inputProps"],
|
|
4
4
|
_excluded2 = ["inputRef"],
|
|
5
5
|
_excluded3 = ["ref", "onPaste", "onKeyDown", "inputMode", "readOnly", "clearable", "onClear"];
|
|
6
6
|
import * as React from 'react';
|
|
@@ -23,23 +23,21 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
23
23
|
* - [TimeField API](https://mui.com/x/api/date-pickers/time-field/)
|
|
24
24
|
*/
|
|
25
25
|
var TimeField = /*#__PURE__*/React.forwardRef(function TimeField(inProps, ref) {
|
|
26
|
-
var
|
|
26
|
+
var _slots$textField;
|
|
27
27
|
var themeProps = useThemeProps({
|
|
28
28
|
props: inProps,
|
|
29
29
|
name: 'MuiTimeField'
|
|
30
30
|
});
|
|
31
31
|
var slots = themeProps.slots,
|
|
32
32
|
slotProps = themeProps.slotProps,
|
|
33
|
-
components = themeProps.components,
|
|
34
|
-
componentsProps = themeProps.componentsProps,
|
|
35
33
|
InputProps = themeProps.InputProps,
|
|
36
34
|
inputProps = themeProps.inputProps,
|
|
37
35
|
other = _objectWithoutProperties(themeProps, _excluded);
|
|
38
36
|
var ownerState = themeProps;
|
|
39
|
-
var TextField = (
|
|
37
|
+
var TextField = (_slots$textField = slots == null ? void 0 : slots.textField) != null ? _slots$textField : MuiTextField;
|
|
40
38
|
var _useSlotProps = useSlotProps({
|
|
41
39
|
elementType: TextField,
|
|
42
|
-
externalSlotProps:
|
|
40
|
+
externalSlotProps: slotProps == null ? void 0 : slotProps.textField,
|
|
43
41
|
externalForwardedProps: other,
|
|
44
42
|
ownerState: ownerState
|
|
45
43
|
}),
|
|
@@ -67,9 +65,7 @@ var TimeField = /*#__PURE__*/React.forwardRef(function TimeField(inProps, ref) {
|
|
|
67
65
|
fieldProps: fieldProps,
|
|
68
66
|
InputProps: fieldProps.InputProps,
|
|
69
67
|
slots: slots,
|
|
70
|
-
slotProps: slotProps
|
|
71
|
-
components: components,
|
|
72
|
-
componentsProps: componentsProps
|
|
68
|
+
slotProps: slotProps
|
|
73
69
|
}),
|
|
74
70
|
ProcessedInputProps = _useClearableField.InputProps,
|
|
75
71
|
processedFieldProps = _useClearableField.fieldProps;
|
|
@@ -116,18 +112,6 @@ process.env.NODE_ENV !== "production" ? TimeField.propTypes = {
|
|
|
116
112
|
*/
|
|
117
113
|
color: PropTypes.oneOf(['error', 'info', 'primary', 'secondary', 'success', 'warning']),
|
|
118
114
|
component: PropTypes.elementType,
|
|
119
|
-
/**
|
|
120
|
-
* Overridable components.
|
|
121
|
-
* @default {}
|
|
122
|
-
* @deprecated Please use `slots`.
|
|
123
|
-
*/
|
|
124
|
-
components: PropTypes.object,
|
|
125
|
-
/**
|
|
126
|
-
* The props used for each component slot.
|
|
127
|
-
* @default {}
|
|
128
|
-
* @deprecated Please use `slotProps`.
|
|
129
|
-
*/
|
|
130
|
-
componentsProps: PropTypes.object,
|
|
131
115
|
/**
|
|
132
116
|
* The default value. Use when the component is not controlled.
|
|
133
117
|
*/
|
|
@@ -73,18 +73,6 @@ process.env.NODE_ENV !== "production" ? TimePicker.propTypes = {
|
|
|
73
73
|
* @default `true` for desktop, `false` for mobile (based on the chosen wrapper and `desktopModeMediaQuery` prop).
|
|
74
74
|
*/
|
|
75
75
|
closeOnSelect: PropTypes.bool,
|
|
76
|
-
/**
|
|
77
|
-
* Overridable components.
|
|
78
|
-
* @default {}
|
|
79
|
-
* @deprecated Please use `slots`.
|
|
80
|
-
*/
|
|
81
|
-
components: PropTypes.object,
|
|
82
|
-
/**
|
|
83
|
-
* The props used for each component slot.
|
|
84
|
-
* @default {}
|
|
85
|
-
* @deprecated Please use `slotProps`.
|
|
86
|
-
*/
|
|
87
|
-
componentsProps: PropTypes.object,
|
|
88
76
|
/**
|
|
89
77
|
* The default value.
|
|
90
78
|
* Used when the component is not controlled.
|
|
@@ -4,9 +4,8 @@ import { useThemeProps } from '@mui/material/styles';
|
|
|
4
4
|
import { useUtils } from '../internals/hooks/useUtils';
|
|
5
5
|
import { TimePickerToolbar } from './TimePickerToolbar';
|
|
6
6
|
import { applyDefaultViewProps } from '../internals/utils/views';
|
|
7
|
-
import { uncapitalizeObjectKeys } from '../internals/utils/slots-migration';
|
|
8
7
|
export function useTimePickerDefaultizedProps(props, name) {
|
|
9
|
-
var _themeProps$ampm, _themeProps$
|
|
8
|
+
var _themeProps$ampm, _themeProps$disableFu, _themeProps$disablePa, _themeProps$slotProps;
|
|
10
9
|
var utils = useUtils();
|
|
11
10
|
var themeProps = useThemeProps({
|
|
12
11
|
props: props,
|
|
@@ -22,8 +21,6 @@ export function useTimePickerDefaultizedProps(props, name) {
|
|
|
22
21
|
timePickerToolbarTitle: themeProps.localeText.toolbarTitle
|
|
23
22
|
});
|
|
24
23
|
}, [themeProps.localeText]);
|
|
25
|
-
var slots = (_themeProps$slots = themeProps.slots) != null ? _themeProps$slots : uncapitalizeObjectKeys(themeProps.components);
|
|
26
|
-
var slotProps = (_themeProps$slotProps = themeProps.slotProps) != null ? _themeProps$slotProps : themeProps.componentsProps;
|
|
27
24
|
return _extends({}, themeProps, {
|
|
28
25
|
ampm: ampm,
|
|
29
26
|
localeText: localeText
|
|
@@ -37,12 +34,12 @@ export function useTimePickerDefaultizedProps(props, name) {
|
|
|
37
34
|
disablePast: (_themeProps$disablePa = themeProps.disablePast) != null ? _themeProps$disablePa : false,
|
|
38
35
|
slots: _extends({
|
|
39
36
|
toolbar: TimePickerToolbar
|
|
40
|
-
}, slots),
|
|
41
|
-
slotProps: _extends({}, slotProps, {
|
|
37
|
+
}, themeProps.slots),
|
|
38
|
+
slotProps: _extends({}, themeProps.slotProps, {
|
|
42
39
|
toolbar: _extends({
|
|
43
40
|
ampm: ampm,
|
|
44
41
|
ampmInClock: themeProps.ampmInClock
|
|
45
|
-
}, slotProps == null ? void 0 : slotProps.toolbar)
|
|
42
|
+
}, (_themeProps$slotProps = themeProps.slotProps) == null ? void 0 : _themeProps$slotProps.toolbar)
|
|
46
43
|
})
|
|
47
44
|
});
|
|
48
45
|
}
|
|
@@ -127,13 +127,10 @@ export var YearCalendar = /*#__PURE__*/React.forwardRef(function YearCalendar(in
|
|
|
127
127
|
if (value != null) {
|
|
128
128
|
return utils.getYear(value);
|
|
129
129
|
}
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
}
|
|
133
|
-
return utils.getYear(referenceDate);
|
|
134
|
-
}, [value, utils, disableHighlightToday, referenceDate]);
|
|
130
|
+
return null;
|
|
131
|
+
}, [value, utils]);
|
|
135
132
|
var _React$useState = React.useState(function () {
|
|
136
|
-
return selectedYear ||
|
|
133
|
+
return selectedYear || utils.getYear(referenceDate);
|
|
137
134
|
}),
|
|
138
135
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
139
136
|
focusedYear = _React$useState2[0],
|
|
@@ -14,7 +14,7 @@ import { VIEW_HEIGHT } from '../internals/constants/dimensions';
|
|
|
14
14
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
15
15
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
16
16
|
export var renderDesktopDateTimeView = function renderDesktopDateTimeView(_ref) {
|
|
17
|
-
var _resolveComponentProp
|
|
17
|
+
var _resolveComponentProp;
|
|
18
18
|
var view = _ref.view,
|
|
19
19
|
onViewChange = _ref.onViewChange,
|
|
20
20
|
views = _ref.views,
|
|
@@ -45,8 +45,6 @@ export var renderDesktopDateTimeView = function renderDesktopDateTimeView(_ref)
|
|
|
45
45
|
onYearChange = _ref.onYearChange,
|
|
46
46
|
yearsPerRow = _ref.yearsPerRow,
|
|
47
47
|
defaultCalendarMonth = _ref.defaultCalendarMonth,
|
|
48
|
-
components = _ref.components,
|
|
49
|
-
componentsProps = _ref.componentsProps,
|
|
50
48
|
slots = _ref.slots,
|
|
51
49
|
slotProps = _ref.slotProps,
|
|
52
50
|
loading = _ref.loading,
|
|
@@ -66,7 +64,7 @@ export var renderDesktopDateTimeView = function renderDesktopDateTimeView(_ref)
|
|
|
66
64
|
skipDisabled = _ref.skipDisabled,
|
|
67
65
|
timeViewsCount = _ref.timeViewsCount,
|
|
68
66
|
shouldRenderTimeInASingleColumn = _ref.shouldRenderTimeInASingleColumn;
|
|
69
|
-
var isActionBarVisible = !!((_resolveComponentProp = resolveComponentProps(
|
|
67
|
+
var isActionBarVisible = !!((_resolveComponentProp = resolveComponentProps(slotProps == null ? void 0 : slotProps.actionBar, {})) != null && (_resolveComponentProp = _resolveComponentProp.actions) != null && _resolveComponentProp.length);
|
|
70
68
|
var commonTimeProps = {
|
|
71
69
|
view: isInternalTimeView(view) ? view : 'hours',
|
|
72
70
|
onViewChange: onViewChange,
|
|
@@ -87,8 +85,6 @@ export var renderDesktopDateTimeView = function renderDesktopDateTimeView(_ref)
|
|
|
87
85
|
shouldDisableClock: shouldDisableClock,
|
|
88
86
|
minutesStep: minutesStep,
|
|
89
87
|
ampm: ampm,
|
|
90
|
-
components: components,
|
|
91
|
-
componentsProps: componentsProps,
|
|
92
88
|
slots: slots,
|
|
93
89
|
slotProps: slotProps,
|
|
94
90
|
readOnly: readOnly,
|
|
@@ -126,8 +122,6 @@ export var renderDesktopDateTimeView = function renderDesktopDateTimeView(_ref)
|
|
|
126
122
|
onYearChange: onYearChange,
|
|
127
123
|
yearsPerRow: yearsPerRow,
|
|
128
124
|
defaultCalendarMonth: defaultCalendarMonth,
|
|
129
|
-
components: components,
|
|
130
|
-
componentsProps: componentsProps,
|
|
131
125
|
slots: slots,
|
|
132
126
|
slotProps: slotProps,
|
|
133
127
|
loading: loading,
|
|
@@ -27,8 +27,6 @@ export var renderDateViewCalendar = function renderDateViewCalendar(_ref) {
|
|
|
27
27
|
onYearChange = _ref.onYearChange,
|
|
28
28
|
yearsPerRow = _ref.yearsPerRow,
|
|
29
29
|
defaultCalendarMonth = _ref.defaultCalendarMonth,
|
|
30
|
-
components = _ref.components,
|
|
31
|
-
componentsProps = _ref.componentsProps,
|
|
32
30
|
slots = _ref.slots,
|
|
33
31
|
slotProps = _ref.slotProps,
|
|
34
32
|
loading = _ref.loading,
|
|
@@ -68,8 +66,6 @@ export var renderDateViewCalendar = function renderDateViewCalendar(_ref) {
|
|
|
68
66
|
onYearChange: onYearChange,
|
|
69
67
|
yearsPerRow: yearsPerRow,
|
|
70
68
|
defaultCalendarMonth: defaultCalendarMonth,
|
|
71
|
-
components: components,
|
|
72
|
-
componentsProps: componentsProps,
|
|
73
69
|
slots: slots,
|
|
74
70
|
slotProps: slotProps,
|
|
75
71
|
loading: loading,
|
|
@@ -11,21 +11,19 @@ import { useLocaleText } from '../internals';
|
|
|
11
11
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
12
12
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
13
|
export var useClearableField = function useClearableField(_ref) {
|
|
14
|
-
var
|
|
14
|
+
var _slots$clearButton, _slots$clearIcon;
|
|
15
15
|
var clearable = _ref.clearable,
|
|
16
16
|
forwardedFieldProps = _ref.fieldProps,
|
|
17
17
|
ForwardedInputProps = _ref.InputProps,
|
|
18
18
|
onClear = _ref.onClear,
|
|
19
19
|
slots = _ref.slots,
|
|
20
|
-
slotProps = _ref.slotProps
|
|
21
|
-
components = _ref.components,
|
|
22
|
-
componentsProps = _ref.componentsProps;
|
|
20
|
+
slotProps = _ref.slotProps;
|
|
23
21
|
var localeText = useLocaleText();
|
|
24
|
-
var IconButton = (
|
|
22
|
+
var IconButton = (_slots$clearButton = slots == null ? void 0 : slots.clearButton) != null ? _slots$clearButton : MuiIconButton;
|
|
25
23
|
// The spread is here to avoid this bug mui/material-ui#34056
|
|
26
24
|
var _useSlotProps = useSlotProps({
|
|
27
25
|
elementType: IconButton,
|
|
28
|
-
externalSlotProps:
|
|
26
|
+
externalSlotProps: slotProps == null ? void 0 : slotProps.clearButton,
|
|
29
27
|
ownerState: {},
|
|
30
28
|
className: 'clearButton',
|
|
31
29
|
additionalProps: {
|
|
@@ -34,10 +32,10 @@ export var useClearableField = function useClearableField(_ref) {
|
|
|
34
32
|
}),
|
|
35
33
|
ownerState = _useSlotProps.ownerState,
|
|
36
34
|
iconButtonProps = _objectWithoutProperties(_useSlotProps, _excluded);
|
|
37
|
-
var EndClearIcon = (
|
|
35
|
+
var EndClearIcon = (_slots$clearIcon = slots == null ? void 0 : slots.clearIcon) != null ? _slots$clearIcon : ClearIcon;
|
|
38
36
|
var endClearIconProps = useSlotProps({
|
|
39
37
|
elementType: EndClearIcon,
|
|
40
|
-
externalSlotProps:
|
|
38
|
+
externalSlotProps: slotProps == null ? void 0 : slotProps.clearIcon,
|
|
41
39
|
ownerState: {}
|
|
42
40
|
});
|
|
43
41
|
var InputProps = _extends({}, ForwardedInputProps, {
|
package/legacy/index.js
CHANGED
|
@@ -116,7 +116,8 @@ export function useViews(_ref) {
|
|
|
116
116
|
setFocusedView: handleFocusedViewChange,
|
|
117
117
|
nextView: nextView,
|
|
118
118
|
previousView: previousView,
|
|
119
|
-
|
|
119
|
+
// Always return up to date default view instead of the initial one (i.e. defaultView.current)
|
|
120
|
+
defaultView: views.includes(openTo) ? openTo : views[0],
|
|
120
121
|
goToNextView: goToNextView,
|
|
121
122
|
setValueAndGoToNextView: setValueAndGoToNextView,
|
|
122
123
|
setValueAndGoToView: setValueAndGoToView
|
|
@@ -26,6 +26,5 @@ export { validateDate } from './utils/validation/validateDate';
|
|
|
26
26
|
export { validateDateTime } from './utils/validation/validateDateTime';
|
|
27
27
|
export { validateTime } from './utils/validation/validateTime';
|
|
28
28
|
export { buildDeprecatedPropsWarning, buildWarning } from './utils/warning';
|
|
29
|
-
export { uncapitalizeObjectKeys } from './utils/slots-migration';
|
|
30
29
|
export { DayCalendar } from '../DateCalendar/DayCalendar';
|
|
31
30
|
export { useCalendarState } from '../DateCalendar/useCalendarState';
|
package/legacy/locales/esES.js
CHANGED
|
@@ -30,7 +30,7 @@ var esESPickers = {
|
|
|
30
30
|
dateRangePickerToolbarTitle: 'Seleccionar rango de fecha',
|
|
31
31
|
// Clock labels
|
|
32
32
|
clockLabelText: function clockLabelText(view, time, adapter) {
|
|
33
|
-
return "Seleccione ".concat(views[view], ". ").concat(time === null ? '
|
|
33
|
+
return "Seleccione ".concat(views[view], ". ").concat(time === null ? 'No hay hora seleccionada' : "La hora seleccionada es ".concat(adapter.format(time, 'fullTime')));
|
|
34
34
|
},
|
|
35
35
|
hoursClockNumberText: function hoursClockNumberText(hours) {
|
|
36
36
|
return "".concat(hours, " horas");
|
|
@@ -56,16 +56,15 @@ var esESPickers = {
|
|
|
56
56
|
},
|
|
57
57
|
// Open picker labels
|
|
58
58
|
openDatePickerDialogue: function openDatePickerDialogue(value, utils) {
|
|
59
|
-
return value !== null && utils.isValid(value) ? "Elige
|
|
59
|
+
return value !== null && utils.isValid(value) ? "Elige fecha, la fecha elegida es ".concat(utils.format(value, 'fullDate')) : 'Elige fecha';
|
|
60
60
|
},
|
|
61
61
|
openTimePickerDialogue: function openTimePickerDialogue(value, utils) {
|
|
62
|
-
return value !== null && utils.isValid(value) ? "Elige
|
|
62
|
+
return value !== null && utils.isValid(value) ? "Elige hora, la hora elegida es ".concat(utils.format(value, 'fullTime')) : 'Elige hora';
|
|
63
63
|
},
|
|
64
|
-
|
|
65
|
-
|
|
64
|
+
fieldClearLabel: 'Limpiar valor',
|
|
66
65
|
// Table labels
|
|
67
|
-
timeTableLabel: 'elige
|
|
68
|
-
dateTableLabel: 'elige
|
|
66
|
+
timeTableLabel: 'elige hora',
|
|
67
|
+
dateTableLabel: 'elige fecha',
|
|
69
68
|
// Field section placeholders
|
|
70
69
|
fieldYearPlaceholder: function fieldYearPlaceholder(params) {
|
|
71
70
|
return 'A'.repeat(params.digitAmount);
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { getPickersLocalization } from './utils/getPickersLocalization';
|
|
2
|
+
var views = {
|
|
3
|
+
hours: 'orduak',
|
|
4
|
+
minutes: 'minutuak',
|
|
5
|
+
seconds: 'segunduak',
|
|
6
|
+
meridiem: 'meridianoa'
|
|
7
|
+
};
|
|
8
|
+
var euPickers = {
|
|
9
|
+
// Calendar navigation
|
|
10
|
+
previousMonth: 'Azken hilabetea',
|
|
11
|
+
nextMonth: 'Hurrengo hilabetea',
|
|
12
|
+
// View navigation
|
|
13
|
+
openPreviousView: 'azken bista ireki',
|
|
14
|
+
openNextView: 'hurrengo bista ireki',
|
|
15
|
+
calendarViewSwitchingButtonAriaLabel: function calendarViewSwitchingButtonAriaLabel(view) {
|
|
16
|
+
return view === 'year' ? 'urteko bista irekita dago, aldatu egutegi bistara' : 'egutegi bista irekita dago, aldatu urteko bistara';
|
|
17
|
+
},
|
|
18
|
+
// DateRange placeholders
|
|
19
|
+
start: 'Hasi',
|
|
20
|
+
end: 'Bukatu',
|
|
21
|
+
// Action bar
|
|
22
|
+
cancelButtonLabel: 'Utxi',
|
|
23
|
+
clearButtonLabel: 'Garbitu',
|
|
24
|
+
okButtonLabel: 'OK',
|
|
25
|
+
todayButtonLabel: 'Gaur',
|
|
26
|
+
// Toolbar titles
|
|
27
|
+
datePickerToolbarTitle: 'Data aukeratu',
|
|
28
|
+
dateTimePickerToolbarTitle: 'Data eta ordua aukeratu',
|
|
29
|
+
timePickerToolbarTitle: 'Ordua aukeratu',
|
|
30
|
+
dateRangePickerToolbarTitle: 'Data tartea aukeratu',
|
|
31
|
+
// Clock labels
|
|
32
|
+
clockLabelText: function clockLabelText(view, time, adapter) {
|
|
33
|
+
return "Aukeratu ".concat(views[view], ". ").concat(time === null ? 'Ez da ordurik aukertau' : "Aukeratutako ordua ".concat(adapter.format(time, 'fullTime'), " da"));
|
|
34
|
+
},
|
|
35
|
+
hoursClockNumberText: function hoursClockNumberText(hours) {
|
|
36
|
+
return "".concat(hours, " ordu");
|
|
37
|
+
},
|
|
38
|
+
minutesClockNumberText: function minutesClockNumberText(minutes) {
|
|
39
|
+
return "".concat(minutes, " minutu");
|
|
40
|
+
},
|
|
41
|
+
secondsClockNumberText: function secondsClockNumberText(seconds) {
|
|
42
|
+
return "".concat(seconds, " segundu");
|
|
43
|
+
},
|
|
44
|
+
// Digital clock labels
|
|
45
|
+
selectViewText: function selectViewText(view) {
|
|
46
|
+
return "Aukeratu ".concat(views[view]);
|
|
47
|
+
},
|
|
48
|
+
// Calendar labels
|
|
49
|
+
calendarWeekNumberHeaderLabel: 'Astea zenbakia',
|
|
50
|
+
calendarWeekNumberHeaderText: '#',
|
|
51
|
+
calendarWeekNumberAriaLabelText: function calendarWeekNumberAriaLabelText(weekNumber) {
|
|
52
|
+
return "".concat(weekNumber, " astea");
|
|
53
|
+
},
|
|
54
|
+
calendarWeekNumberText: function calendarWeekNumberText(weekNumber) {
|
|
55
|
+
return "".concat(weekNumber);
|
|
56
|
+
},
|
|
57
|
+
// Open picker labels
|
|
58
|
+
openDatePickerDialogue: function openDatePickerDialogue(value, utils) {
|
|
59
|
+
return value !== null && utils.isValid(value) ? "Data aukeratu, aukeratutako data ".concat(utils.format(value, 'fullDate'), " da") : 'Data aukeratu';
|
|
60
|
+
},
|
|
61
|
+
openTimePickerDialogue: function openTimePickerDialogue(value, utils) {
|
|
62
|
+
return value !== null && utils.isValid(value) ? "Ordua aukeratu, aukeratutako ordua ".concat(utils.format(value, 'fullTime'), " da") : 'Ordua aukeratu';
|
|
63
|
+
},
|
|
64
|
+
fieldClearLabel: 'Balioa garbitu',
|
|
65
|
+
// Table labels
|
|
66
|
+
timeTableLabel: 'ordua aukeratu',
|
|
67
|
+
dateTableLabel: 'data aukeratu',
|
|
68
|
+
// Field section placeholders
|
|
69
|
+
fieldYearPlaceholder: function fieldYearPlaceholder(params) {
|
|
70
|
+
return 'Y'.repeat(params.digitAmount);
|
|
71
|
+
},
|
|
72
|
+
fieldMonthPlaceholder: function fieldMonthPlaceholder(params) {
|
|
73
|
+
return params.contentType === 'letter' ? 'MMMM' : 'MM';
|
|
74
|
+
},
|
|
75
|
+
fieldDayPlaceholder: function fieldDayPlaceholder() {
|
|
76
|
+
return 'DD';
|
|
77
|
+
},
|
|
78
|
+
fieldWeekDayPlaceholder: function fieldWeekDayPlaceholder(params) {
|
|
79
|
+
return params.contentType === 'letter' ? 'EEEE' : 'EE';
|
|
80
|
+
},
|
|
81
|
+
fieldHoursPlaceholder: function fieldHoursPlaceholder() {
|
|
82
|
+
return 'hh';
|
|
83
|
+
},
|
|
84
|
+
fieldMinutesPlaceholder: function fieldMinutesPlaceholder() {
|
|
85
|
+
return 'mm';
|
|
86
|
+
},
|
|
87
|
+
fieldSecondsPlaceholder: function fieldSecondsPlaceholder() {
|
|
88
|
+
return 'ss';
|
|
89
|
+
},
|
|
90
|
+
fieldMeridiemPlaceholder: function fieldMeridiemPlaceholder() {
|
|
91
|
+
return 'aa';
|
|
92
|
+
}
|
|
93
|
+
};
|
|
94
|
+
export var eu = getPickersLocalization(euPickers);
|
package/legacy/locales/index.js
CHANGED
|
@@ -25,8 +25,6 @@ export var renderTimeViewClock = function renderTimeViewClock(_ref) {
|
|
|
25
25
|
minutesStep = _ref.minutesStep,
|
|
26
26
|
ampm = _ref.ampm,
|
|
27
27
|
ampmInClock = _ref.ampmInClock,
|
|
28
|
-
components = _ref.components,
|
|
29
|
-
componentsProps = _ref.componentsProps,
|
|
30
28
|
slots = _ref.slots,
|
|
31
29
|
slotProps = _ref.slotProps,
|
|
32
30
|
readOnly = _ref.readOnly,
|
|
@@ -57,8 +55,6 @@ export var renderTimeViewClock = function renderTimeViewClock(_ref) {
|
|
|
57
55
|
minutesStep: minutesStep,
|
|
58
56
|
ampm: ampm,
|
|
59
57
|
ampmInClock: ampmInClock,
|
|
60
|
-
components: components,
|
|
61
|
-
componentsProps: componentsProps,
|
|
62
58
|
slots: slots,
|
|
63
59
|
slotProps: slotProps,
|
|
64
60
|
readOnly: readOnly,
|
|
@@ -90,8 +86,6 @@ export var renderDigitalClockTimeView = function renderDigitalClockTimeView(_ref
|
|
|
90
86
|
shouldDisableClock = _ref2.shouldDisableClock,
|
|
91
87
|
minutesStep = _ref2.minutesStep,
|
|
92
88
|
ampm = _ref2.ampm,
|
|
93
|
-
components = _ref2.components,
|
|
94
|
-
componentsProps = _ref2.componentsProps,
|
|
95
89
|
slots = _ref2.slots,
|
|
96
90
|
slotProps = _ref2.slotProps,
|
|
97
91
|
readOnly = _ref2.readOnly,
|
|
@@ -122,8 +116,6 @@ export var renderDigitalClockTimeView = function renderDigitalClockTimeView(_ref
|
|
|
122
116
|
shouldDisableClock: shouldDisableClock,
|
|
123
117
|
minutesStep: minutesStep,
|
|
124
118
|
ampm: ampm,
|
|
125
|
-
components: components,
|
|
126
|
-
componentsProps: componentsProps,
|
|
127
119
|
slots: slots,
|
|
128
120
|
slotProps: slotProps,
|
|
129
121
|
readOnly: readOnly,
|
|
@@ -156,8 +148,6 @@ export var renderMultiSectionDigitalClockTimeView = function renderMultiSectionD
|
|
|
156
148
|
shouldDisableClock = _ref3.shouldDisableClock,
|
|
157
149
|
minutesStep = _ref3.minutesStep,
|
|
158
150
|
ampm = _ref3.ampm,
|
|
159
|
-
components = _ref3.components,
|
|
160
|
-
componentsProps = _ref3.componentsProps,
|
|
161
151
|
slots = _ref3.slots,
|
|
162
152
|
slotProps = _ref3.slotProps,
|
|
163
153
|
readOnly = _ref3.readOnly,
|
|
@@ -188,8 +178,6 @@ export var renderMultiSectionDigitalClockTimeView = function renderMultiSectionD
|
|
|
188
178
|
shouldDisableClock: shouldDisableClock,
|
|
189
179
|
minutesStep: minutesStep,
|
|
190
180
|
ampm: ampm,
|
|
191
|
-
components: components,
|
|
192
|
-
componentsProps: componentsProps,
|
|
193
181
|
slots: slots,
|
|
194
182
|
slotProps: slotProps,
|
|
195
183
|
readOnly: readOnly,
|
package/locales/esES.js
CHANGED
|
@@ -27,7 +27,7 @@ const esESPickers = {
|
|
|
27
27
|
timePickerToolbarTitle: 'Seleccionar hora',
|
|
28
28
|
dateRangePickerToolbarTitle: 'Seleccionar rango de fecha',
|
|
29
29
|
// Clock labels
|
|
30
|
-
clockLabelText: (view, time, adapter) => `Seleccione ${views[view]}. ${time === null ? '
|
|
30
|
+
clockLabelText: (view, time, adapter) => `Seleccione ${views[view]}. ${time === null ? 'No hay hora seleccionada' : `La hora seleccionada es ${adapter.format(time, 'fullTime')}`}`,
|
|
31
31
|
hoursClockNumberText: hours => `${hours} horas`,
|
|
32
32
|
minutesClockNumberText: minutes => `${minutes} minutos`,
|
|
33
33
|
secondsClockNumberText: seconds => `${seconds} segundos`,
|
|
@@ -39,13 +39,12 @@ const esESPickers = {
|
|
|
39
39
|
calendarWeekNumberAriaLabelText: weekNumber => `Semana ${weekNumber}`,
|
|
40
40
|
calendarWeekNumberText: weekNumber => `${weekNumber}`,
|
|
41
41
|
// Open picker labels
|
|
42
|
-
openDatePickerDialogue: (value, utils) => value !== null && utils.isValid(value) ? `Elige
|
|
43
|
-
openTimePickerDialogue: (value, utils) => value !== null && utils.isValid(value) ? `Elige
|
|
44
|
-
|
|
45
|
-
|
|
42
|
+
openDatePickerDialogue: (value, utils) => value !== null && utils.isValid(value) ? `Elige fecha, la fecha elegida es ${utils.format(value, 'fullDate')}` : 'Elige fecha',
|
|
43
|
+
openTimePickerDialogue: (value, utils) => value !== null && utils.isValid(value) ? `Elige hora, la hora elegida es ${utils.format(value, 'fullTime')}` : 'Elige hora',
|
|
44
|
+
fieldClearLabel: 'Limpiar valor',
|
|
46
45
|
// Table labels
|
|
47
|
-
timeTableLabel: 'elige
|
|
48
|
-
dateTableLabel: 'elige
|
|
46
|
+
timeTableLabel: 'elige hora',
|
|
47
|
+
dateTableLabel: 'elige fecha',
|
|
49
48
|
// Field section placeholders
|
|
50
49
|
fieldYearPlaceholder: params => 'A'.repeat(params.digitAmount),
|
|
51
50
|
fieldMonthPlaceholder: params => params.contentType === 'letter' ? 'MMMM' : 'MM',
|