@mui/x-date-pickers 7.1.1 → 7.3.1
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.d.ts +1 -1
- package/AdapterDateFnsJalali/AdapterDateFnsJalali.d.ts +1 -1
- package/AdapterDayjs/AdapterDayjs.d.ts +1 -1
- package/AdapterLuxon/AdapterLuxon.d.ts +1 -1
- package/AdapterMoment/AdapterMoment.d.ts +1 -1
- package/AdapterMomentHijri/AdapterMomentHijri.d.ts +1 -1
- package/AdapterMomentJalaali/AdapterMomentJalaali.d.ts +1 -1
- package/CHANGELOG.md +290 -2
- package/DateCalendar/DateCalendar.js +1 -2
- package/DateCalendar/DayCalendar.js +1 -2
- package/DateCalendar/useCalendarState.d.ts +1 -3
- package/DateTimePicker/DateTimePickerTabs.js +1 -2
- package/DateTimePicker/DateTimePickerToolbar.js +1 -2
- package/DesktopDateTimePicker/DesktopDateTimePicker.js +13 -5
- package/DesktopDateTimePicker/DesktopDateTimePickerLayout.js +1 -2
- package/PickersCalendarHeader/PickersCalendarHeader.js +1 -2
- package/PickersLayout/PickersLayout.js +1 -2
- package/PickersSectionList/PickersSectionList.js +1 -2
- package/PickersTextField/PickersInputBase/PickersInputBase.js +1 -2
- package/PickersTextField/PickersOutlinedInput/PickersOutlinedInput.js +1 -2
- package/PickersTextField/PickersTextField.js +1 -2
- package/TimeClock/Clock.js +1 -2
- package/TimeClock/ClockNumbers.d.ts +1 -1
- package/TimeClock/TimeClock.js +1 -2
- package/TimePicker/TimePickerToolbar.js +1 -2
- package/hooks/useClearableField.js +1 -2
- package/icons/index.js +1 -2
- package/index.js +1 -1
- package/internals/components/PickersArrowSwitcher/PickersArrowSwitcher.js +1 -2
- package/internals/components/PickersToolbar.js +1 -2
- package/internals/demo/DemoContainer.js +1 -2
- package/internals/hooks/defaultizedFieldProps.d.ts +3 -3
- package/internals/hooks/useClockReferenceDate.d.ts +1 -1
- package/internals/hooks/useDesktopPicker/useDesktopPicker.js +1 -2
- package/internals/hooks/useField/useField.utils.d.ts +13 -13
- package/internals/hooks/useMobilePicker/useMobilePicker.js +1 -2
- package/internals/hooks/usePicker/usePickerValue.js +8 -2
- package/internals/hooks/usePicker/usePickerValue.types.d.ts +4 -3
- package/internals/utils/date-time-utils.d.ts +2 -2
- package/internals/utils/date-utils.d.ts +10 -10
- package/internals/utils/getDefaultReferenceDate.d.ts +2 -3
- package/internals/utils/time-utils.d.ts +6 -6
- package/internals/utils/utils.d.ts +1 -1
- package/locales/caES.js +26 -30
- package/locales/deDE.js +14 -17
- package/locales/esES.js +21 -24
- package/locales/frFR.js +16 -20
- package/locales/svSE.js +23 -28
- package/modern/DateCalendar/DateCalendar.js +1 -2
- package/modern/DateCalendar/DayCalendar.js +1 -2
- package/modern/DateTimePicker/DateTimePickerTabs.js +1 -2
- package/modern/DateTimePicker/DateTimePickerToolbar.js +1 -2
- package/modern/DesktopDateTimePicker/DesktopDateTimePicker.js +13 -5
- package/modern/DesktopDateTimePicker/DesktopDateTimePickerLayout.js +1 -2
- package/modern/PickersCalendarHeader/PickersCalendarHeader.js +1 -2
- package/modern/PickersLayout/PickersLayout.js +1 -2
- package/modern/PickersSectionList/PickersSectionList.js +1 -2
- package/modern/PickersTextField/PickersInputBase/PickersInputBase.js +1 -2
- package/modern/PickersTextField/PickersOutlinedInput/PickersOutlinedInput.js +1 -2
- package/modern/PickersTextField/PickersTextField.js +1 -2
- package/modern/TimeClock/Clock.js +1 -2
- package/modern/TimeClock/TimeClock.js +1 -2
- package/modern/TimePicker/TimePickerToolbar.js +1 -2
- package/modern/hooks/useClearableField.js +1 -2
- package/modern/icons/index.js +1 -2
- package/modern/index.js +1 -1
- package/modern/internals/components/PickersArrowSwitcher/PickersArrowSwitcher.js +1 -2
- package/modern/internals/components/PickersToolbar.js +1 -2
- package/modern/internals/demo/DemoContainer.js +1 -2
- package/modern/internals/hooks/useDesktopPicker/useDesktopPicker.js +1 -2
- package/modern/internals/hooks/useMobilePicker/useMobilePicker.js +1 -2
- package/modern/internals/hooks/usePicker/usePickerValue.js +8 -2
- package/modern/locales/caES.js +26 -30
- package/modern/locales/deDE.js +14 -17
- package/modern/locales/esES.js +21 -24
- package/modern/locales/frFR.js +16 -20
- package/modern/locales/svSE.js +23 -28
- package/node/DateCalendar/DateCalendar.js +1 -1
- package/node/DateCalendar/DayCalendar.js +1 -1
- package/node/DateCalendar/PickersFadeTransitionGroup.js +1 -1
- package/node/DateCalendar/PickersSlideTransition.js +1 -1
- package/node/DateCalendar/useCalendarState.js +1 -1
- package/node/DateCalendar/useIsDateDisabled.js +1 -1
- package/node/DateField/DateField.js +1 -1
- package/node/DatePicker/DatePicker.js +1 -1
- package/node/DatePicker/DatePickerToolbar.js +1 -1
- package/node/DatePicker/shared.js +1 -1
- package/node/DateTimeField/DateTimeField.js +1 -1
- package/node/DateTimePicker/DateTimePicker.js +1 -1
- package/node/DateTimePicker/DateTimePickerTabs.js +1 -1
- package/node/DateTimePicker/DateTimePickerToolbar.js +1 -1
- package/node/DateTimePicker/shared.js +1 -1
- package/node/DayCalendarSkeleton/DayCalendarSkeleton.js +1 -1
- package/node/DesktopDatePicker/DesktopDatePicker.js +1 -1
- package/node/DesktopDateTimePicker/DesktopDateTimePicker.js +13 -4
- package/node/DesktopDateTimePicker/DesktopDateTimePickerLayout.js +1 -1
- package/node/DesktopTimePicker/DesktopTimePicker.js +1 -1
- package/node/DigitalClock/DigitalClock.js +1 -1
- package/node/LocalizationProvider/LocalizationProvider.js +1 -1
- package/node/MobileDatePicker/MobileDatePicker.js +1 -1
- package/node/MobileDateTimePicker/MobileDateTimePicker.js +1 -1
- package/node/MobileTimePicker/MobileTimePicker.js +1 -1
- package/node/MonthCalendar/MonthCalendar.js +1 -1
- package/node/MonthCalendar/PickersMonth.js +1 -1
- package/node/MultiSectionDigitalClock/MultiSectionDigitalClock.js +1 -1
- package/node/MultiSectionDigitalClock/MultiSectionDigitalClockSection.js +1 -1
- package/node/PickersActionBar/PickersActionBar.js +1 -1
- package/node/PickersCalendarHeader/PickersCalendarHeader.js +1 -1
- package/node/PickersDay/PickersDay.js +1 -1
- package/node/PickersLayout/PickersLayout.js +1 -1
- package/node/PickersLayout/usePickerLayout.js +1 -1
- package/node/PickersSectionList/PickersSectionList.js +1 -1
- package/node/PickersShortcuts/PickersShortcuts.js +1 -1
- package/node/PickersTextField/PickersFilledInput/PickersFilledInput.js +1 -1
- package/node/PickersTextField/PickersInput/PickersInput.js +1 -1
- package/node/PickersTextField/PickersInputBase/PickersInputBase.js +1 -1
- package/node/PickersTextField/PickersOutlinedInput/Outline.js +1 -1
- package/node/PickersTextField/PickersOutlinedInput/PickersOutlinedInput.js +1 -1
- package/node/PickersTextField/PickersTextField.js +1 -1
- package/node/StaticDatePicker/StaticDatePicker.js +1 -1
- package/node/StaticDateTimePicker/StaticDateTimePicker.js +1 -1
- package/node/StaticTimePicker/StaticTimePicker.js +1 -1
- package/node/TimeClock/Clock.js +1 -1
- package/node/TimeClock/ClockNumber.js +1 -1
- package/node/TimeClock/ClockNumbers.js +1 -1
- package/node/TimeClock/ClockPointer.js +1 -1
- package/node/TimeClock/TimeClock.js +1 -1
- package/node/TimeField/TimeField.js +1 -1
- package/node/TimePicker/TimePicker.js +1 -1
- package/node/TimePicker/TimePickerToolbar.js +1 -1
- package/node/TimePicker/shared.js +1 -1
- package/node/YearCalendar/PickersYear.js +1 -1
- package/node/YearCalendar/YearCalendar.js +1 -1
- package/node/dateViewRenderers/dateViewRenderers.js +1 -1
- package/node/hooks/useClearableField.js +1 -1
- package/node/icons/index.js +1 -1
- package/node/index.js +1 -1
- package/node/internals/components/PickersArrowSwitcher/PickersArrowSwitcher.js +1 -1
- package/node/internals/components/PickersModalDialog.js +1 -1
- package/node/internals/components/PickersPopper.js +1 -1
- package/node/internals/components/PickersToolbar.js +1 -1
- package/node/internals/components/PickersToolbarButton.js +1 -1
- package/node/internals/components/PickersToolbarText.js +1 -1
- package/node/internals/demo/DemoContainer.js +1 -1
- package/node/internals/hooks/date-helpers-hooks.js +1 -1
- package/node/internals/hooks/useClockReferenceDate.js +1 -1
- package/node/internals/hooks/useDesktopPicker/useDesktopPicker.js +1 -1
- package/node/internals/hooks/useField/useField.js +1 -1
- package/node/internals/hooks/useField/useFieldCharacterEditing.js +1 -1
- package/node/internals/hooks/useField/useFieldState.js +1 -1
- package/node/internals/hooks/useField/useFieldV6TextField.js +1 -1
- package/node/internals/hooks/useField/useFieldV7TextField.js +1 -1
- package/node/internals/hooks/useIsLandscape.js +1 -1
- package/node/internals/hooks/useMobilePicker/useMobilePicker.js +1 -1
- package/node/internals/hooks/useOpenState.js +1 -1
- package/node/internals/hooks/usePicker/usePickerValue.js +9 -3
- package/node/internals/hooks/usePicker/usePickerViews.js +1 -1
- package/node/internals/hooks/useStaticPicker/useStaticPicker.js +1 -1
- package/node/internals/hooks/useUtils.js +1 -1
- package/node/internals/hooks/useValidation.js +1 -1
- package/node/internals/hooks/useValueWithTimezone.js +1 -1
- package/node/internals/hooks/useViews.js +1 -1
- package/node/locales/caES.js +26 -30
- package/node/locales/deDE.js +14 -17
- package/node/locales/esES.js +21 -24
- package/node/locales/frFR.js +16 -20
- package/node/locales/svSE.js +23 -28
- package/node/timeViewRenderers/timeViewRenderers.js +1 -1
- package/package.json +3 -5
- package/timeViewRenderers/timeViewRenderers.d.ts +1 -1
- package/internals/components/DateTimeViewWrapper/DateTimeViewWrapper.d.ts +0 -2
- package/internals/components/DateTimeViewWrapper/DateTimeViewWrapper.js +0 -5
- package/internals/components/DateTimeViewWrapper/index.d.ts +0 -1
- package/internals/components/DateTimeViewWrapper/index.js +0 -1
- package/modern/internals/components/DateTimeViewWrapper/DateTimeViewWrapper.js +0 -5
- package/modern/internals/components/DateTimeViewWrapper/index.js +0 -1
- package/node/internals/components/DateTimeViewWrapper/DateTimeViewWrapper.js +0 -11
- package/node/internals/components/DateTimeViewWrapper/index.js +0 -12
package/locales/svSE.js
CHANGED
|
@@ -16,11 +16,10 @@ const svSEPickers = {
|
|
|
16
16
|
// DateRange labels
|
|
17
17
|
start: 'Start',
|
|
18
18
|
end: 'Slut',
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
19
|
+
startDate: 'Startdatum',
|
|
20
|
+
startTime: 'Starttid',
|
|
21
|
+
endDate: 'Slutdatum',
|
|
22
|
+
endTime: 'Sluttid',
|
|
24
23
|
// Action bar
|
|
25
24
|
cancelButtonLabel: 'Avbryt',
|
|
26
25
|
clearButtonLabel: 'Rensa',
|
|
@@ -46,33 +45,29 @@ const svSEPickers = {
|
|
|
46
45
|
// Open picker labels
|
|
47
46
|
openDatePickerDialogue: (value, utils) => value !== null && utils.isValid(value) ? `Välj datum, valt datum är ${utils.format(value, 'fullDate')}` : 'Välj datum',
|
|
48
47
|
openTimePickerDialogue: (value, utils) => value !== null && utils.isValid(value) ? `Välj tid, vald tid är ${utils.format(value, 'fullTime')}` : 'Välj tid',
|
|
49
|
-
|
|
50
|
-
|
|
48
|
+
fieldClearLabel: 'Rensa värde',
|
|
51
49
|
// Table labels
|
|
52
50
|
timeTableLabel: 'välj tid',
|
|
53
|
-
dateTableLabel: 'välj datum'
|
|
54
|
-
|
|
51
|
+
dateTableLabel: 'välj datum',
|
|
55
52
|
// Field section placeholders
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
53
|
+
fieldYearPlaceholder: params => 'Å'.repeat(params.digitAmount),
|
|
54
|
+
fieldMonthPlaceholder: params => params.contentType === 'letter' ? 'MMMM' : 'MM',
|
|
55
|
+
fieldDayPlaceholder: () => 'DD',
|
|
56
|
+
fieldWeekDayPlaceholder: params => params.contentType === 'letter' ? 'EEEE' : 'EE',
|
|
57
|
+
fieldHoursPlaceholder: () => 'tt',
|
|
58
|
+
fieldMinutesPlaceholder: () => 'mm',
|
|
59
|
+
fieldSecondsPlaceholder: () => 'ss',
|
|
60
|
+
fieldMeridiemPlaceholder: () => 'aa',
|
|
65
61
|
// View names
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
62
|
+
year: 'År',
|
|
63
|
+
month: 'Månad',
|
|
64
|
+
day: 'Dag',
|
|
65
|
+
weekDay: 'Veckodag',
|
|
66
|
+
hours: 'Timmar',
|
|
67
|
+
minutes: 'Minuter',
|
|
68
|
+
seconds: 'Sekunder',
|
|
69
|
+
meridiem: 'Meridiem',
|
|
75
70
|
// Common
|
|
76
|
-
|
|
71
|
+
empty: 'Tom'
|
|
77
72
|
};
|
|
78
73
|
export const svSE = getPickersLocalization(svSEPickers);
|
|
@@ -22,8 +22,7 @@ import { getDateCalendarUtilityClass } from './dateCalendarClasses';
|
|
|
22
22
|
import { useControlledValueWithTimezone } from '../internals/hooks/useValueWithTimezone';
|
|
23
23
|
import { singleItemValueManager } from '../internals/utils/valueManagers';
|
|
24
24
|
import { VIEW_HEIGHT } from '../internals/constants/dimensions';
|
|
25
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
26
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
25
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
27
26
|
const useUtilityClasses = ownerState => {
|
|
28
27
|
const {
|
|
29
28
|
classes
|
|
@@ -16,8 +16,7 @@ import { PickersSlideTransition } from './PickersSlideTransition';
|
|
|
16
16
|
import { useIsDateDisabled } from './useIsDateDisabled';
|
|
17
17
|
import { findClosestEnabledDate, getWeekdays } from '../internals/utils/date-utils';
|
|
18
18
|
import { getDayCalendarUtilityClass } from './dayCalendarClasses';
|
|
19
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
20
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
19
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
21
20
|
const useUtilityClasses = ownerState => {
|
|
22
21
|
const {
|
|
23
22
|
classes
|
|
@@ -9,8 +9,7 @@ import { TimeIcon, DateRangeIcon } from '../icons';
|
|
|
9
9
|
import { useLocaleText } from '../internals/hooks/useUtils';
|
|
10
10
|
import { getDateTimePickerTabsUtilityClass } from './dateTimePickerTabsClasses';
|
|
11
11
|
import { isDatePickerView } from '../internals/utils/date-utils';
|
|
12
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
12
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
14
13
|
const viewToTab = view => {
|
|
15
14
|
if (isDatePickerView(view)) {
|
|
16
15
|
return 'date';
|
|
@@ -16,8 +16,7 @@ import { MULTI_SECTION_CLOCK_SECTION_WIDTH } from '../internals/constants/dimens
|
|
|
16
16
|
import { formatMeridiem } from '../internals/utils/date-utils';
|
|
17
17
|
import { pickersToolbarTextClasses } from '../internals/components/pickersToolbarTextClasses';
|
|
18
18
|
import { pickersToolbarClasses } from '../internals';
|
|
19
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
20
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
19
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
21
20
|
const useUtilityClasses = ownerState => {
|
|
22
21
|
const {
|
|
23
22
|
classes,
|
|
@@ -21,8 +21,7 @@ import { VIEW_HEIGHT, isDatePickerView, isInternalTimeView } from '../internals'
|
|
|
21
21
|
import { multiSectionDigitalClockClasses, multiSectionDigitalClockSectionClasses } from '../MultiSectionDigitalClock';
|
|
22
22
|
import { digitalClockClasses } from '../DigitalClock';
|
|
23
23
|
import { DesktopDateTimePickerLayout } from './DesktopDateTimePickerLayout';
|
|
24
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
25
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
24
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
26
25
|
const rendererInterceptor = function rendererInterceptor(inViewRenderers, popperView, rendererProps) {
|
|
27
26
|
const {
|
|
28
27
|
openTo,
|
|
@@ -46,15 +45,24 @@ const rendererInterceptor = function rendererInterceptor(inViewRenderers, popper
|
|
|
46
45
|
children: [inViewRenderers[!isTimeViewActive ? popperView : 'day']?.(_extends({}, rendererProps, {
|
|
47
46
|
view: !isTimeViewActive ? popperView : 'day',
|
|
48
47
|
focusedView: focusedView && isDatePickerView(focusedView) ? focusedView : null,
|
|
49
|
-
views: rendererProps.views.filter(isDatePickerView)
|
|
48
|
+
views: rendererProps.views.filter(isDatePickerView),
|
|
49
|
+
sx: [{
|
|
50
|
+
gridColumn: 1
|
|
51
|
+
}, ...finalProps.sx]
|
|
50
52
|
})), timeViewsCount > 0 && /*#__PURE__*/_jsxs(React.Fragment, {
|
|
51
53
|
children: [/*#__PURE__*/_jsx(Divider, {
|
|
52
|
-
orientation: "vertical"
|
|
54
|
+
orientation: "vertical",
|
|
55
|
+
sx: {
|
|
56
|
+
gridColumn: 2
|
|
57
|
+
}
|
|
53
58
|
}), inViewRenderers[isTimeViewActive ? popperView : 'hours']?.(_extends({}, finalProps, {
|
|
54
59
|
view: isTimeViewActive ? popperView : 'hours',
|
|
55
60
|
focusedView: focusedView && isInternalTimeView(focusedView) ? focusedView : null,
|
|
56
61
|
openTo: isInternalTimeView(openTo) ? openTo : 'hours',
|
|
57
|
-
views: rendererProps.views.filter(isInternalTimeView)
|
|
62
|
+
views: rendererProps.views.filter(isInternalTimeView),
|
|
63
|
+
sx: [{
|
|
64
|
+
gridColumn: 3
|
|
65
|
+
}, ...finalProps.sx]
|
|
58
66
|
}))]
|
|
59
67
|
})]
|
|
60
68
|
});
|
|
@@ -3,8 +3,7 @@ import PropTypes from 'prop-types';
|
|
|
3
3
|
import clsx from 'clsx';
|
|
4
4
|
import Divider from '@mui/material/Divider';
|
|
5
5
|
import { PickersLayoutContentWrapper, PickersLayoutRoot, pickersLayoutClasses, usePickerLayout } from '../PickersLayout';
|
|
6
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
6
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
8
7
|
/**
|
|
9
8
|
* @ignore - internal component.
|
|
10
9
|
*/
|
|
@@ -16,8 +16,7 @@ import { ArrowDropDownIcon } from '../icons';
|
|
|
16
16
|
import { PickersArrowSwitcher } from '../internals/components/PickersArrowSwitcher';
|
|
17
17
|
import { usePreviousMonthDisabled, useNextMonthDisabled } from '../internals/hooks/date-helpers-hooks';
|
|
18
18
|
import { getPickersCalendarHeaderUtilityClass, pickersCalendarHeaderClasses } from './pickersCalendarHeaderClasses';
|
|
19
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
20
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
19
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
21
20
|
const useUtilityClasses = ownerState => {
|
|
22
21
|
const {
|
|
23
22
|
classes
|
|
@@ -5,8 +5,7 @@ import { styled, useThemeProps } from '@mui/material/styles';
|
|
|
5
5
|
import { unstable_composeClasses as composeClasses } from '@mui/utils';
|
|
6
6
|
import { pickersLayoutClasses, getPickersLayoutUtilityClass } from './pickersLayoutClasses';
|
|
7
7
|
import usePickerLayout from './usePickerLayout';
|
|
8
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
9
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
|
+
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
10
9
|
const useUtilityClasses = ownerState => {
|
|
11
10
|
const {
|
|
12
11
|
isLandscape,
|
|
@@ -8,8 +8,7 @@ import composeClasses from '@mui/utils/composeClasses';
|
|
|
8
8
|
import useForkRef from '@mui/utils/useForkRef';
|
|
9
9
|
import { styled, useThemeProps } from '@mui/material/styles';
|
|
10
10
|
import { getPickersSectionListUtilityClass, pickersSectionListClasses } from './pickersSectionListClasses';
|
|
11
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
12
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
11
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
12
|
export const PickersSectionListRoot = styled('div', {
|
|
14
13
|
name: 'MuiPickersSectionList',
|
|
15
14
|
slot: 'Root',
|
|
@@ -13,8 +13,7 @@ import { useSlotProps } from '@mui/base/utils';
|
|
|
13
13
|
import visuallyHidden from '@mui/utils/visuallyHidden';
|
|
14
14
|
import { pickersInputBaseClasses, getPickersInputBaseUtilityClass } from './pickersInputBaseClasses';
|
|
15
15
|
import { Unstable_PickersSectionList as PickersSectionList, Unstable_PickersSectionListRoot as PickersSectionListRoot, Unstable_PickersSectionListSection as PickersSectionListSection, Unstable_PickersSectionListSectionSeparator as PickersSectionListSectionSeparator, Unstable_PickersSectionListSectionContent as PickersSectionListSectionContent } from '../../PickersSectionList';
|
|
16
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
17
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
16
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
18
17
|
const round = value => Math.round(value * 1e5) / 1e5;
|
|
19
18
|
export const PickersInputBaseRoot = styled('div', {
|
|
20
19
|
name: 'MuiPickersInputBase',
|
|
@@ -11,8 +11,7 @@ import { pickersOutlinedInputClasses, getPickersOutlinedInputUtilityClass } from
|
|
|
11
11
|
import Outline from './Outline';
|
|
12
12
|
import { PickersInputBase } from '../PickersInputBase';
|
|
13
13
|
import { PickersInputBaseRoot, PickersInputBaseSectionsContainer } from '../PickersInputBase/PickersInputBase';
|
|
14
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
15
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
|
+
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
16
15
|
const PickersOutlinedInputRoot = styled(PickersInputBaseRoot, {
|
|
17
16
|
name: 'MuiPickersOutlinedInput',
|
|
18
17
|
slot: 'Root',
|
|
@@ -16,8 +16,7 @@ import { getPickersTextFieldUtilityClass } from './pickersTextFieldClasses';
|
|
|
16
16
|
import { PickersOutlinedInput } from './PickersOutlinedInput';
|
|
17
17
|
import { PickersFilledInput } from './PickersFilledInput';
|
|
18
18
|
import { PickersInput } from './PickersInput';
|
|
19
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
20
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
19
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
21
20
|
const VARIANT_COMPONENT = {
|
|
22
21
|
standard: PickersInput,
|
|
23
22
|
filled: PickersFilledInput,
|
|
@@ -9,8 +9,7 @@ import { useLocaleText, useUtils } from '../internals/hooks/useUtils';
|
|
|
9
9
|
import { CLOCK_HOUR_WIDTH, getHours, getMinutes } from './shared';
|
|
10
10
|
import { getClockUtilityClass } from './clockClasses';
|
|
11
11
|
import { formatMeridiem } from '../internals/utils/date-utils';
|
|
12
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
12
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
14
13
|
const useUtilityClasses = ownerState => {
|
|
15
14
|
const {
|
|
16
15
|
classes
|
|
@@ -18,8 +18,7 @@ import { getHourNumbers, getMinutesNumbers } from './ClockNumbers';
|
|
|
18
18
|
import { useControlledValueWithTimezone } from '../internals/hooks/useValueWithTimezone';
|
|
19
19
|
import { singleItemValueManager } from '../internals/utils/valueManagers';
|
|
20
20
|
import { useClockReferenceDate } from '../internals/hooks/useClockReferenceDate';
|
|
21
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
22
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
21
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
23
22
|
const useUtilityClasses = ownerState => {
|
|
24
23
|
const {
|
|
25
24
|
classes
|
|
@@ -14,8 +14,7 @@ import { useLocaleText, useUtils } from '../internals/hooks/useUtils';
|
|
|
14
14
|
import { useMeridiemMode } from '../internals/hooks/date-helpers-hooks';
|
|
15
15
|
import { getTimePickerToolbarUtilityClass, timePickerToolbarClasses } from './timePickerToolbarClasses';
|
|
16
16
|
import { formatMeridiem } from '../internals/utils/date-utils';
|
|
17
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
18
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
17
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
19
18
|
const useUtilityClasses = ownerState => {
|
|
20
19
|
const {
|
|
21
20
|
theme,
|
|
@@ -8,8 +8,7 @@ import MuiIconButton from '@mui/material/IconButton';
|
|
|
8
8
|
import InputAdornment from '@mui/material/InputAdornment';
|
|
9
9
|
import { ClearIcon } from '../icons';
|
|
10
10
|
import { useLocaleText } from '../internals/hooks/useUtils';
|
|
11
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
12
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
11
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
12
|
export const useClearableField = props => {
|
|
14
13
|
const localeText = useLocaleText();
|
|
15
14
|
const {
|
package/modern/icons/index.js
CHANGED
|
@@ -4,8 +4,7 @@ import * as React from 'react';
|
|
|
4
4
|
/**
|
|
5
5
|
* @ignore - internal component.
|
|
6
6
|
*/
|
|
7
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
7
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
9
8
|
export const ArrowDropDownIcon = createSvgIcon( /*#__PURE__*/_jsx("path", {
|
|
10
9
|
d: "M7 10l5 5 5-5z"
|
|
11
10
|
}), 'ArrowDropDown');
|
package/modern/index.js
CHANGED
|
@@ -12,8 +12,7 @@ import { useSlotProps } from '@mui/base/utils';
|
|
|
12
12
|
import IconButton from '@mui/material/IconButton';
|
|
13
13
|
import { ArrowLeftIcon, ArrowRightIcon } from '../../../icons';
|
|
14
14
|
import { getPickersArrowSwitcherUtilityClass } from './pickersArrowSwitcherClasses';
|
|
15
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
16
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
15
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
17
16
|
const PickersArrowSwitcherRoot = styled('div', {
|
|
18
17
|
name: 'MuiPickersArrowSwitcher',
|
|
19
18
|
slot: 'Root',
|
|
@@ -7,8 +7,7 @@ import Typography from '@mui/material/Typography';
|
|
|
7
7
|
import { styled, useThemeProps } from '@mui/material/styles';
|
|
8
8
|
import { unstable_composeClasses as composeClasses } from '@mui/utils';
|
|
9
9
|
import { getPickersToolbarUtilityClass } from './pickersToolbarClasses';
|
|
10
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
11
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
10
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
12
11
|
const useUtilityClasses = ownerState => {
|
|
13
12
|
const {
|
|
14
13
|
classes,
|
|
@@ -4,8 +4,7 @@ import Stack, { stackClasses } from '@mui/material/Stack';
|
|
|
4
4
|
import Typography from '@mui/material/Typography';
|
|
5
5
|
import { textFieldClasses } from '@mui/material/TextField';
|
|
6
6
|
import { pickersTextFieldClasses } from '@mui/x-date-pickers/PickersTextField';
|
|
7
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
7
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
9
8
|
const getChildTypeFromChildName = childName => {
|
|
10
9
|
if (childName.match(/^([A-Za-z]+)Range(Calendar|Clock)$/)) {
|
|
11
10
|
return 'multi-panel-UI-view';
|
|
@@ -14,8 +14,7 @@ import { useUtils } from '../useUtils';
|
|
|
14
14
|
import { usePicker } from '../usePicker';
|
|
15
15
|
import { LocalizationProvider } from '../../../LocalizationProvider';
|
|
16
16
|
import { PickersLayout } from '../../../PickersLayout';
|
|
17
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
18
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
17
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
19
18
|
/**
|
|
20
19
|
* Hook managing all the single-date desktop pickers:
|
|
21
20
|
* - DesktopDatePicker
|
|
@@ -11,8 +11,7 @@ import { onSpaceOrEnter } from '../../utils/utils';
|
|
|
11
11
|
import { useUtils } from '../useUtils';
|
|
12
12
|
import { LocalizationProvider } from '../../../LocalizationProvider';
|
|
13
13
|
import { PickersLayout } from '../../../PickersLayout';
|
|
14
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
15
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
14
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
16
15
|
/**
|
|
17
16
|
* Hook managing all the single-date mobile pickers:
|
|
18
17
|
* - MobileDatePicker
|
|
@@ -270,8 +270,14 @@ export const usePickerValue = ({
|
|
|
270
270
|
pickerAction: 'today'
|
|
271
271
|
});
|
|
272
272
|
});
|
|
273
|
-
const handleOpen = useEventCallback(
|
|
274
|
-
|
|
273
|
+
const handleOpen = useEventCallback(event => {
|
|
274
|
+
event.preventDefault();
|
|
275
|
+
setIsOpen(true);
|
|
276
|
+
});
|
|
277
|
+
const handleClose = useEventCallback(event => {
|
|
278
|
+
event?.preventDefault();
|
|
279
|
+
setIsOpen(false);
|
|
280
|
+
});
|
|
275
281
|
const handleChange = useEventCallback((newValue, selectionState = 'partial') => updateDate({
|
|
276
282
|
name: 'setValueFromView',
|
|
277
283
|
value: newValue,
|
package/modern/locales/caES.js
CHANGED
|
@@ -1,53 +1,51 @@
|
|
|
1
1
|
import { getPickersLocalization } from './utils/getPickersLocalization';
|
|
2
2
|
const views = {
|
|
3
|
-
hours: '
|
|
4
|
-
minutes: '
|
|
5
|
-
seconds: '
|
|
6
|
-
meridiem: '
|
|
3
|
+
hours: 'Hores',
|
|
4
|
+
minutes: 'Minuts',
|
|
5
|
+
seconds: 'Segons',
|
|
6
|
+
meridiem: 'Meridià'
|
|
7
7
|
};
|
|
8
8
|
const caESPickers = {
|
|
9
9
|
// Calendar navigation
|
|
10
|
-
previousMonth: '
|
|
11
|
-
nextMonth: '
|
|
10
|
+
previousMonth: 'Mes anterior',
|
|
11
|
+
nextMonth: 'Mes següent',
|
|
12
12
|
// View navigation
|
|
13
13
|
openPreviousView: "Obrir l'última vista",
|
|
14
|
-
openNextView: '
|
|
15
|
-
calendarViewSwitchingButtonAriaLabel: view => view === 'year' ?
|
|
14
|
+
openNextView: 'Obrir la següent vista',
|
|
15
|
+
calendarViewSwitchingButtonAriaLabel: view => view === 'year' ? 'la vista anual està oberta, canvia a la vista de calendari' : 'la vista de calendari està oberta, canvia a la vista anual',
|
|
16
16
|
// DateRange labels
|
|
17
17
|
start: 'Començar',
|
|
18
18
|
end: 'Terminar',
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
19
|
+
startDate: 'Data inicial',
|
|
20
|
+
startTime: 'Hora inicial',
|
|
21
|
+
endDate: 'Data final',
|
|
22
|
+
endTime: 'Hora final',
|
|
24
23
|
// Action bar
|
|
25
24
|
cancelButtonLabel: 'Cancel·lar',
|
|
26
25
|
clearButtonLabel: 'Netejar',
|
|
27
26
|
okButtonLabel: 'OK',
|
|
28
|
-
todayButtonLabel: '
|
|
27
|
+
todayButtonLabel: 'Avuí',
|
|
29
28
|
// Toolbar titles
|
|
30
29
|
datePickerToolbarTitle: 'Seleccionar data',
|
|
31
30
|
dateTimePickerToolbarTitle: 'Seleccionar data i hora',
|
|
32
31
|
timePickerToolbarTitle: 'Seleccionar hora',
|
|
33
32
|
dateRangePickerToolbarTitle: 'Seleccionar rang de dates',
|
|
34
33
|
// Clock labels
|
|
35
|
-
clockLabelText: (view, time, adapter) => `
|
|
34
|
+
clockLabelText: (view, time, adapter) => `Selecciona ${views[view]}. ${time === null ? 'Hora no seleccionada' : `L'hora seleccionada és ${adapter.format(time, 'fullTime')}`}`,
|
|
36
35
|
hoursClockNumberText: hours => `${hours} hores`,
|
|
37
36
|
minutesClockNumberText: minutes => `${minutes} minuts`,
|
|
38
37
|
secondsClockNumberText: seconds => `${seconds} segons`,
|
|
39
38
|
// Digital clock labels
|
|
40
39
|
selectViewText: view => `Seleccionar ${views[view]}`,
|
|
41
40
|
// Calendar labels
|
|
42
|
-
calendarWeekNumberHeaderLabel: 'Número de setmana',
|
|
41
|
+
calendarWeekNumberHeaderLabel: 'Número de la setmana',
|
|
43
42
|
calendarWeekNumberHeaderText: '#',
|
|
44
43
|
calendarWeekNumberAriaLabelText: weekNumber => `Setmana ${weekNumber}`,
|
|
45
44
|
calendarWeekNumberText: weekNumber => `${weekNumber}`,
|
|
46
45
|
// Open picker labels
|
|
47
46
|
openDatePickerDialogue: (value, utils) => value !== null && utils.isValid(value) ? `Tria la data, la data triada és ${utils.format(value, 'fullDate')}` : 'Tria la data',
|
|
48
47
|
openTimePickerDialogue: (value, utils) => value !== null && utils.isValid(value) ? `Tria l'hora, l'hora triada és ${utils.format(value, 'fullTime')}` : "Tria l'hora",
|
|
49
|
-
|
|
50
|
-
|
|
48
|
+
fieldClearLabel: 'Netega el valor',
|
|
51
49
|
// Table labels
|
|
52
50
|
timeTableLabel: 'tria la data',
|
|
53
51
|
dateTableLabel: "tria l'hora",
|
|
@@ -59,19 +57,17 @@ const caESPickers = {
|
|
|
59
57
|
fieldHoursPlaceholder: () => 'hh',
|
|
60
58
|
fieldMinutesPlaceholder: () => 'mm',
|
|
61
59
|
fieldSecondsPlaceholder: () => 'ss',
|
|
62
|
-
fieldMeridiemPlaceholder: () => 'aa'
|
|
63
|
-
|
|
60
|
+
fieldMeridiemPlaceholder: () => 'aa',
|
|
64
61
|
// View names
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
62
|
+
year: 'Any',
|
|
63
|
+
month: 'Mes',
|
|
64
|
+
day: 'Dia',
|
|
65
|
+
weekDay: 'Dia de la setmana',
|
|
66
|
+
hours: 'Hores',
|
|
67
|
+
minutes: 'Minuts',
|
|
68
|
+
seconds: 'Segons',
|
|
69
|
+
meridiem: 'Meridià',
|
|
74
70
|
// Common
|
|
75
|
-
|
|
71
|
+
empty: 'Buit'
|
|
76
72
|
};
|
|
77
73
|
export const caES = getPickersLocalization(caESPickers);
|
package/modern/locales/deDE.js
CHANGED
|
@@ -17,11 +17,10 @@ const deDEPickers = {
|
|
|
17
17
|
// DateRange labels
|
|
18
18
|
start: 'Beginn',
|
|
19
19
|
end: 'Ende',
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
20
|
+
startDate: 'Startdatum',
|
|
21
|
+
startTime: 'Startzeit',
|
|
22
|
+
endDate: 'Enddatum',
|
|
23
|
+
endTime: 'Endzeit',
|
|
25
24
|
// Action bar
|
|
26
25
|
cancelButtonLabel: 'Abbrechen',
|
|
27
26
|
clearButtonLabel: 'Löschen',
|
|
@@ -59,19 +58,17 @@ const deDEPickers = {
|
|
|
59
58
|
fieldHoursPlaceholder: () => 'hh',
|
|
60
59
|
fieldMinutesPlaceholder: () => 'mm',
|
|
61
60
|
fieldSecondsPlaceholder: () => 'ss',
|
|
62
|
-
fieldMeridiemPlaceholder: () => 'aa'
|
|
63
|
-
|
|
61
|
+
fieldMeridiemPlaceholder: () => 'aa',
|
|
64
62
|
// View names
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
63
|
+
year: 'Jahr',
|
|
64
|
+
month: 'Monat',
|
|
65
|
+
day: 'Tag',
|
|
66
|
+
weekDay: 'Wochentag',
|
|
67
|
+
hours: 'Stunden',
|
|
68
|
+
minutes: 'Minuten',
|
|
69
|
+
seconds: 'Sekunden',
|
|
70
|
+
meridiem: 'Tageszeit',
|
|
74
71
|
// Common
|
|
75
|
-
|
|
72
|
+
empty: 'Leer'
|
|
76
73
|
};
|
|
77
74
|
export const deDE = getPickersLocalization(deDEPickers);
|
package/modern/locales/esES.js
CHANGED
|
@@ -1,26 +1,25 @@
|
|
|
1
1
|
import { getPickersLocalization } from './utils/getPickersLocalization';
|
|
2
2
|
const views = {
|
|
3
|
-
hours: '
|
|
4
|
-
minutes: '
|
|
5
|
-
seconds: '
|
|
6
|
-
meridiem: '
|
|
3
|
+
hours: 'Horas',
|
|
4
|
+
minutes: 'Minutos',
|
|
5
|
+
seconds: 'Segundos',
|
|
6
|
+
meridiem: 'Meridiano'
|
|
7
7
|
};
|
|
8
8
|
const esESPickers = {
|
|
9
9
|
// Calendar navigation
|
|
10
|
-
previousMonth: '
|
|
11
|
-
nextMonth: '
|
|
10
|
+
previousMonth: 'Mes anterior',
|
|
11
|
+
nextMonth: 'Mes siguiente',
|
|
12
12
|
// View navigation
|
|
13
13
|
openPreviousView: 'Abrir la última vista',
|
|
14
14
|
openNextView: 'Abrir la siguiente vista',
|
|
15
|
-
calendarViewSwitchingButtonAriaLabel: view => view === 'year' ? 'la vista
|
|
15
|
+
calendarViewSwitchingButtonAriaLabel: view => view === 'year' ? 'la vista anual está abierta, cambie a la vista de calendario' : 'la vista de calendario está abierta, cambie a la vista anual',
|
|
16
16
|
// DateRange labels
|
|
17
17
|
start: 'Empezar',
|
|
18
18
|
end: 'Terminar',
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
19
|
+
startDate: 'Fecha inicio',
|
|
20
|
+
startTime: 'Hora inicio',
|
|
21
|
+
endDate: 'Fecha final',
|
|
22
|
+
endTime: 'Hora final',
|
|
24
23
|
// Action bar
|
|
25
24
|
cancelButtonLabel: 'Cancelar',
|
|
26
25
|
clearButtonLabel: 'Limpiar',
|
|
@@ -58,19 +57,17 @@ const esESPickers = {
|
|
|
58
57
|
fieldHoursPlaceholder: () => 'hh',
|
|
59
58
|
fieldMinutesPlaceholder: () => 'mm',
|
|
60
59
|
fieldSecondsPlaceholder: () => 'ss',
|
|
61
|
-
fieldMeridiemPlaceholder: () => 'aa'
|
|
62
|
-
|
|
60
|
+
fieldMeridiemPlaceholder: () => 'aa',
|
|
63
61
|
// View names
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
62
|
+
year: 'Año',
|
|
63
|
+
month: 'Mes',
|
|
64
|
+
day: 'Dia',
|
|
65
|
+
weekDay: 'Dia de la semana',
|
|
66
|
+
hours: 'Horas',
|
|
67
|
+
minutes: 'Minutos',
|
|
68
|
+
seconds: 'Segundos',
|
|
69
|
+
meridiem: 'Meridiano',
|
|
73
70
|
// Common
|
|
74
|
-
|
|
71
|
+
empty: 'Vacío'
|
|
75
72
|
};
|
|
76
73
|
export const esES = getPickersLocalization(esESPickers);
|