@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.
Files changed (178) hide show
  1. package/AdapterDateFnsBase/AdapterDateFnsBase.d.ts +1 -1
  2. package/AdapterDateFnsJalali/AdapterDateFnsJalali.d.ts +1 -1
  3. package/AdapterDayjs/AdapterDayjs.d.ts +1 -1
  4. package/AdapterLuxon/AdapterLuxon.d.ts +1 -1
  5. package/AdapterMoment/AdapterMoment.d.ts +1 -1
  6. package/AdapterMomentHijri/AdapterMomentHijri.d.ts +1 -1
  7. package/AdapterMomentJalaali/AdapterMomentJalaali.d.ts +1 -1
  8. package/CHANGELOG.md +290 -2
  9. package/DateCalendar/DateCalendar.js +1 -2
  10. package/DateCalendar/DayCalendar.js +1 -2
  11. package/DateCalendar/useCalendarState.d.ts +1 -3
  12. package/DateTimePicker/DateTimePickerTabs.js +1 -2
  13. package/DateTimePicker/DateTimePickerToolbar.js +1 -2
  14. package/DesktopDateTimePicker/DesktopDateTimePicker.js +13 -5
  15. package/DesktopDateTimePicker/DesktopDateTimePickerLayout.js +1 -2
  16. package/PickersCalendarHeader/PickersCalendarHeader.js +1 -2
  17. package/PickersLayout/PickersLayout.js +1 -2
  18. package/PickersSectionList/PickersSectionList.js +1 -2
  19. package/PickersTextField/PickersInputBase/PickersInputBase.js +1 -2
  20. package/PickersTextField/PickersOutlinedInput/PickersOutlinedInput.js +1 -2
  21. package/PickersTextField/PickersTextField.js +1 -2
  22. package/TimeClock/Clock.js +1 -2
  23. package/TimeClock/ClockNumbers.d.ts +1 -1
  24. package/TimeClock/TimeClock.js +1 -2
  25. package/TimePicker/TimePickerToolbar.js +1 -2
  26. package/hooks/useClearableField.js +1 -2
  27. package/icons/index.js +1 -2
  28. package/index.js +1 -1
  29. package/internals/components/PickersArrowSwitcher/PickersArrowSwitcher.js +1 -2
  30. package/internals/components/PickersToolbar.js +1 -2
  31. package/internals/demo/DemoContainer.js +1 -2
  32. package/internals/hooks/defaultizedFieldProps.d.ts +3 -3
  33. package/internals/hooks/useClockReferenceDate.d.ts +1 -1
  34. package/internals/hooks/useDesktopPicker/useDesktopPicker.js +1 -2
  35. package/internals/hooks/useField/useField.utils.d.ts +13 -13
  36. package/internals/hooks/useMobilePicker/useMobilePicker.js +1 -2
  37. package/internals/hooks/usePicker/usePickerValue.js +8 -2
  38. package/internals/hooks/usePicker/usePickerValue.types.d.ts +4 -3
  39. package/internals/utils/date-time-utils.d.ts +2 -2
  40. package/internals/utils/date-utils.d.ts +10 -10
  41. package/internals/utils/getDefaultReferenceDate.d.ts +2 -3
  42. package/internals/utils/time-utils.d.ts +6 -6
  43. package/internals/utils/utils.d.ts +1 -1
  44. package/locales/caES.js +26 -30
  45. package/locales/deDE.js +14 -17
  46. package/locales/esES.js +21 -24
  47. package/locales/frFR.js +16 -20
  48. package/locales/svSE.js +23 -28
  49. package/modern/DateCalendar/DateCalendar.js +1 -2
  50. package/modern/DateCalendar/DayCalendar.js +1 -2
  51. package/modern/DateTimePicker/DateTimePickerTabs.js +1 -2
  52. package/modern/DateTimePicker/DateTimePickerToolbar.js +1 -2
  53. package/modern/DesktopDateTimePicker/DesktopDateTimePicker.js +13 -5
  54. package/modern/DesktopDateTimePicker/DesktopDateTimePickerLayout.js +1 -2
  55. package/modern/PickersCalendarHeader/PickersCalendarHeader.js +1 -2
  56. package/modern/PickersLayout/PickersLayout.js +1 -2
  57. package/modern/PickersSectionList/PickersSectionList.js +1 -2
  58. package/modern/PickersTextField/PickersInputBase/PickersInputBase.js +1 -2
  59. package/modern/PickersTextField/PickersOutlinedInput/PickersOutlinedInput.js +1 -2
  60. package/modern/PickersTextField/PickersTextField.js +1 -2
  61. package/modern/TimeClock/Clock.js +1 -2
  62. package/modern/TimeClock/TimeClock.js +1 -2
  63. package/modern/TimePicker/TimePickerToolbar.js +1 -2
  64. package/modern/hooks/useClearableField.js +1 -2
  65. package/modern/icons/index.js +1 -2
  66. package/modern/index.js +1 -1
  67. package/modern/internals/components/PickersArrowSwitcher/PickersArrowSwitcher.js +1 -2
  68. package/modern/internals/components/PickersToolbar.js +1 -2
  69. package/modern/internals/demo/DemoContainer.js +1 -2
  70. package/modern/internals/hooks/useDesktopPicker/useDesktopPicker.js +1 -2
  71. package/modern/internals/hooks/useMobilePicker/useMobilePicker.js +1 -2
  72. package/modern/internals/hooks/usePicker/usePickerValue.js +8 -2
  73. package/modern/locales/caES.js +26 -30
  74. package/modern/locales/deDE.js +14 -17
  75. package/modern/locales/esES.js +21 -24
  76. package/modern/locales/frFR.js +16 -20
  77. package/modern/locales/svSE.js +23 -28
  78. package/node/DateCalendar/DateCalendar.js +1 -1
  79. package/node/DateCalendar/DayCalendar.js +1 -1
  80. package/node/DateCalendar/PickersFadeTransitionGroup.js +1 -1
  81. package/node/DateCalendar/PickersSlideTransition.js +1 -1
  82. package/node/DateCalendar/useCalendarState.js +1 -1
  83. package/node/DateCalendar/useIsDateDisabled.js +1 -1
  84. package/node/DateField/DateField.js +1 -1
  85. package/node/DatePicker/DatePicker.js +1 -1
  86. package/node/DatePicker/DatePickerToolbar.js +1 -1
  87. package/node/DatePicker/shared.js +1 -1
  88. package/node/DateTimeField/DateTimeField.js +1 -1
  89. package/node/DateTimePicker/DateTimePicker.js +1 -1
  90. package/node/DateTimePicker/DateTimePickerTabs.js +1 -1
  91. package/node/DateTimePicker/DateTimePickerToolbar.js +1 -1
  92. package/node/DateTimePicker/shared.js +1 -1
  93. package/node/DayCalendarSkeleton/DayCalendarSkeleton.js +1 -1
  94. package/node/DesktopDatePicker/DesktopDatePicker.js +1 -1
  95. package/node/DesktopDateTimePicker/DesktopDateTimePicker.js +13 -4
  96. package/node/DesktopDateTimePicker/DesktopDateTimePickerLayout.js +1 -1
  97. package/node/DesktopTimePicker/DesktopTimePicker.js +1 -1
  98. package/node/DigitalClock/DigitalClock.js +1 -1
  99. package/node/LocalizationProvider/LocalizationProvider.js +1 -1
  100. package/node/MobileDatePicker/MobileDatePicker.js +1 -1
  101. package/node/MobileDateTimePicker/MobileDateTimePicker.js +1 -1
  102. package/node/MobileTimePicker/MobileTimePicker.js +1 -1
  103. package/node/MonthCalendar/MonthCalendar.js +1 -1
  104. package/node/MonthCalendar/PickersMonth.js +1 -1
  105. package/node/MultiSectionDigitalClock/MultiSectionDigitalClock.js +1 -1
  106. package/node/MultiSectionDigitalClock/MultiSectionDigitalClockSection.js +1 -1
  107. package/node/PickersActionBar/PickersActionBar.js +1 -1
  108. package/node/PickersCalendarHeader/PickersCalendarHeader.js +1 -1
  109. package/node/PickersDay/PickersDay.js +1 -1
  110. package/node/PickersLayout/PickersLayout.js +1 -1
  111. package/node/PickersLayout/usePickerLayout.js +1 -1
  112. package/node/PickersSectionList/PickersSectionList.js +1 -1
  113. package/node/PickersShortcuts/PickersShortcuts.js +1 -1
  114. package/node/PickersTextField/PickersFilledInput/PickersFilledInput.js +1 -1
  115. package/node/PickersTextField/PickersInput/PickersInput.js +1 -1
  116. package/node/PickersTextField/PickersInputBase/PickersInputBase.js +1 -1
  117. package/node/PickersTextField/PickersOutlinedInput/Outline.js +1 -1
  118. package/node/PickersTextField/PickersOutlinedInput/PickersOutlinedInput.js +1 -1
  119. package/node/PickersTextField/PickersTextField.js +1 -1
  120. package/node/StaticDatePicker/StaticDatePicker.js +1 -1
  121. package/node/StaticDateTimePicker/StaticDateTimePicker.js +1 -1
  122. package/node/StaticTimePicker/StaticTimePicker.js +1 -1
  123. package/node/TimeClock/Clock.js +1 -1
  124. package/node/TimeClock/ClockNumber.js +1 -1
  125. package/node/TimeClock/ClockNumbers.js +1 -1
  126. package/node/TimeClock/ClockPointer.js +1 -1
  127. package/node/TimeClock/TimeClock.js +1 -1
  128. package/node/TimeField/TimeField.js +1 -1
  129. package/node/TimePicker/TimePicker.js +1 -1
  130. package/node/TimePicker/TimePickerToolbar.js +1 -1
  131. package/node/TimePicker/shared.js +1 -1
  132. package/node/YearCalendar/PickersYear.js +1 -1
  133. package/node/YearCalendar/YearCalendar.js +1 -1
  134. package/node/dateViewRenderers/dateViewRenderers.js +1 -1
  135. package/node/hooks/useClearableField.js +1 -1
  136. package/node/icons/index.js +1 -1
  137. package/node/index.js +1 -1
  138. package/node/internals/components/PickersArrowSwitcher/PickersArrowSwitcher.js +1 -1
  139. package/node/internals/components/PickersModalDialog.js +1 -1
  140. package/node/internals/components/PickersPopper.js +1 -1
  141. package/node/internals/components/PickersToolbar.js +1 -1
  142. package/node/internals/components/PickersToolbarButton.js +1 -1
  143. package/node/internals/components/PickersToolbarText.js +1 -1
  144. package/node/internals/demo/DemoContainer.js +1 -1
  145. package/node/internals/hooks/date-helpers-hooks.js +1 -1
  146. package/node/internals/hooks/useClockReferenceDate.js +1 -1
  147. package/node/internals/hooks/useDesktopPicker/useDesktopPicker.js +1 -1
  148. package/node/internals/hooks/useField/useField.js +1 -1
  149. package/node/internals/hooks/useField/useFieldCharacterEditing.js +1 -1
  150. package/node/internals/hooks/useField/useFieldState.js +1 -1
  151. package/node/internals/hooks/useField/useFieldV6TextField.js +1 -1
  152. package/node/internals/hooks/useField/useFieldV7TextField.js +1 -1
  153. package/node/internals/hooks/useIsLandscape.js +1 -1
  154. package/node/internals/hooks/useMobilePicker/useMobilePicker.js +1 -1
  155. package/node/internals/hooks/useOpenState.js +1 -1
  156. package/node/internals/hooks/usePicker/usePickerValue.js +9 -3
  157. package/node/internals/hooks/usePicker/usePickerViews.js +1 -1
  158. package/node/internals/hooks/useStaticPicker/useStaticPicker.js +1 -1
  159. package/node/internals/hooks/useUtils.js +1 -1
  160. package/node/internals/hooks/useValidation.js +1 -1
  161. package/node/internals/hooks/useValueWithTimezone.js +1 -1
  162. package/node/internals/hooks/useViews.js +1 -1
  163. package/node/locales/caES.js +26 -30
  164. package/node/locales/deDE.js +14 -17
  165. package/node/locales/esES.js +21 -24
  166. package/node/locales/frFR.js +16 -20
  167. package/node/locales/svSE.js +23 -28
  168. package/node/timeViewRenderers/timeViewRenderers.js +1 -1
  169. package/package.json +3 -5
  170. package/timeViewRenderers/timeViewRenderers.d.ts +1 -1
  171. package/internals/components/DateTimeViewWrapper/DateTimeViewWrapper.d.ts +0 -2
  172. package/internals/components/DateTimeViewWrapper/DateTimeViewWrapper.js +0 -5
  173. package/internals/components/DateTimeViewWrapper/index.d.ts +0 -1
  174. package/internals/components/DateTimeViewWrapper/index.js +0 -1
  175. package/modern/internals/components/DateTimeViewWrapper/DateTimeViewWrapper.js +0 -5
  176. package/modern/internals/components/DateTimeViewWrapper/index.js +0 -1
  177. package/node/internals/components/DateTimeViewWrapper/DateTimeViewWrapper.js +0 -11
  178. 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
- // startDate: 'Start date',
20
- // startTime: 'Start time',
21
- // endDate: 'End date',
22
- // endTime: 'End time',
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
- // fieldClearLabel: 'Clear value',
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
- // fieldYearPlaceholder: params => 'Y'.repeat(params.digitAmount),
57
- // fieldMonthPlaceholder: params => params.contentType === 'letter' ? 'MMMM' : 'MM',
58
- // fieldDayPlaceholder: () => 'DD',
59
- // fieldWeekDayPlaceholder: params => params.contentType === 'letter' ? 'EEEE' : 'EE',
60
- // fieldHoursPlaceholder: () => 'hh',
61
- // fieldMinutesPlaceholder: () => 'mm',
62
- // fieldSecondsPlaceholder: () => 'ss',
63
- // fieldMeridiemPlaceholder: () => 'aa',
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
- // year: 'Year',
67
- // month: 'Month',
68
- // day: 'Day',
69
- // weekDay: 'Week day',
70
- // hours: 'Hours',
71
- // minutes: 'Minutes',
72
- // seconds: 'Seconds',
73
- // meridiem: 'Meridiem',
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
- // empty: 'Empty',
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 {
@@ -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
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-date-pickers v7.1.1
2
+ * @mui/x-date-pickers v7.3.1
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
@@ -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(() => setIsOpen(true));
274
- const handleClose = useEventCallback(() => setIsOpen(false));
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,
@@ -1,53 +1,51 @@
1
1
  import { getPickersLocalization } from './utils/getPickersLocalization';
2
2
  const views = {
3
- hours: 'les hores',
4
- minutes: 'els minuts',
5
- seconds: 'els segons',
6
- meridiem: '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: 'Últim mes',
11
- nextMonth: 'Pròxim mes',
10
+ previousMonth: 'Mes anterior',
11
+ nextMonth: 'Mes següent',
12
12
  // View navigation
13
13
  openPreviousView: "Obrir l'última vista",
14
- openNextView: 'obrir la següent vista',
15
- calendarViewSwitchingButtonAriaLabel: view => view === 'year' ? "la vista de l'any està oberta, canvie a la vista de calendari" : "la vista de calendari està oberta, canvie a la vista de l'any",
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
- // startDate: 'Start date',
20
- // startTime: 'Start time',
21
- // endDate: 'End date',
22
- // endTime: 'End time',
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: 'Hui',
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) => `Seleccione ${views[view]}. ${time === null ? 'Sense temps seleccionat' : `El temps seleccionat és ${adapter.format(time, 'fullTime')}`}`,
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
- // fieldClearLabel: 'Clear value',
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
- // year: 'Year',
66
- // month: 'Month',
67
- // day: 'Day',
68
- // weekDay: 'Week day',
69
- // hours: 'Hours',
70
- // minutes: 'Minutes',
71
- // seconds: 'Seconds',
72
- // meridiem: 'Meridiem',
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
- // empty: 'Empty',
71
+ empty: 'Buit'
76
72
  };
77
73
  export const caES = getPickersLocalization(caESPickers);
@@ -17,11 +17,10 @@ const deDEPickers = {
17
17
  // DateRange labels
18
18
  start: 'Beginn',
19
19
  end: 'Ende',
20
- // startDate: 'Start date',
21
- // startTime: 'Start time',
22
- // endDate: 'End date',
23
- // endTime: 'End time',
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
- // year: 'Year',
66
- // month: 'Month',
67
- // day: 'Day',
68
- // weekDay: 'Week day',
69
- // hours: 'Hours',
70
- // minutes: 'Minutes',
71
- // seconds: 'Seconds',
72
- // meridiem: 'Meridiem',
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
- // empty: 'Empty',
72
+ empty: 'Leer'
76
73
  };
77
74
  export const deDE = getPickersLocalization(deDEPickers);
@@ -1,26 +1,25 @@
1
1
  import { getPickersLocalization } from './utils/getPickersLocalization';
2
2
  const views = {
3
- hours: 'las horas',
4
- minutes: 'los minutos',
5
- seconds: 'los segundos',
6
- meridiem: 'meridiano'
3
+ hours: 'Horas',
4
+ minutes: 'Minutos',
5
+ seconds: 'Segundos',
6
+ meridiem: 'Meridiano'
7
7
  };
8
8
  const esESPickers = {
9
9
  // Calendar navigation
10
- previousMonth: 'Último mes',
11
- nextMonth: 'Próximo mes',
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 del año está abierta, cambie a la vista de calendario' : 'la vista de calendario está abierta, cambie a la vista del año',
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
- // startDate: 'Start date',
20
- // startTime: 'Start time',
21
- // endDate: 'End date',
22
- // endTime: 'End time',
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
- // year: 'Year',
65
- // month: 'Month',
66
- // day: 'Day',
67
- // weekDay: 'Week day',
68
- // hours: 'Hours',
69
- // minutes: 'Minutes',
70
- // seconds: 'Seconds',
71
- // meridiem: 'Meridiem',
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
- // empty: 'Empty',
71
+ empty: 'Vacío'
75
72
  };
76
73
  export const esES = getPickersLocalization(esESPickers);