@mui/x-date-pickers 8.0.0-beta.0 → 8.0.0-beta.2

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 (237) hide show
  1. package/CHANGELOG.md +171 -0
  2. package/DateCalendar/DateCalendar.js +4 -8
  3. package/DateCalendar/DayCalendar.d.ts +3 -7
  4. package/DateCalendar/DayCalendar.js +18 -10
  5. package/DateCalendar/index.d.ts +0 -1
  6. package/DateField/useDateField.d.ts +1 -1
  7. package/DateField/useDateField.js +2 -16
  8. package/DatePicker/DatePicker.js +1 -0
  9. package/DatePicker/shared.js +3 -9
  10. package/DateTimeField/useDateTimeField.d.ts +1 -1
  11. package/DateTimeField/useDateTimeField.js +2 -16
  12. package/DateTimePicker/DateTimePicker.js +1 -0
  13. package/DateTimePicker/shared.js +3 -13
  14. package/DesktopDatePicker/DesktopDatePicker.js +1 -0
  15. package/DesktopDateTimePicker/DesktopDateTimePicker.js +1 -0
  16. package/DesktopTimePicker/DesktopTimePicker.js +1 -0
  17. package/MobileDatePicker/MobileDatePicker.js +1 -0
  18. package/MobileDateTimePicker/MobileDateTimePicker.js +1 -0
  19. package/MobileTimePicker/MobileTimePicker.js +1 -0
  20. package/MonthCalendar/MonthCalendar.js +4 -9
  21. package/PickersDay/PickersDay.d.ts +1 -72
  22. package/PickersDay/PickersDay.js +30 -28
  23. package/PickersDay/PickersDay.types.d.ts +114 -0
  24. package/PickersDay/PickersDay.types.js +5 -0
  25. package/PickersDay/index.d.ts +1 -1
  26. package/PickersDay/usePickerDayOwnerState.d.ts +14 -0
  27. package/PickersDay/usePickerDayOwnerState.js +40 -0
  28. package/PickersSectionList/PickersSectionList.d.ts +1 -1
  29. package/PickersSectionList/PickersSectionList.types.d.ts +2 -6
  30. package/TimeField/useTimeField.d.ts +1 -1
  31. package/TimeField/useTimeField.js +2 -16
  32. package/TimePicker/TimePicker.js +1 -0
  33. package/TimePicker/shared.js +3 -3
  34. package/YearCalendar/YearCalendar.js +4 -10
  35. package/esm/DateCalendar/DateCalendar.js +6 -10
  36. package/esm/DateCalendar/DayCalendar.d.ts +3 -7
  37. package/esm/DateCalendar/DayCalendar.js +18 -10
  38. package/esm/DateCalendar/index.d.ts +0 -1
  39. package/esm/DateField/useDateField.d.ts +1 -1
  40. package/esm/DateField/useDateField.js +3 -17
  41. package/esm/DatePicker/DatePicker.js +1 -0
  42. package/esm/DatePicker/shared.js +3 -9
  43. package/esm/DateTimeField/useDateTimeField.d.ts +1 -1
  44. package/esm/DateTimeField/useDateTimeField.js +3 -17
  45. package/esm/DateTimePicker/DateTimePicker.js +1 -0
  46. package/esm/DateTimePicker/shared.js +4 -14
  47. package/esm/DesktopDatePicker/DesktopDatePicker.js +1 -0
  48. package/esm/DesktopDateTimePicker/DesktopDateTimePicker.js +1 -0
  49. package/esm/DesktopTimePicker/DesktopTimePicker.js +1 -0
  50. package/esm/MobileDatePicker/MobileDatePicker.js +1 -0
  51. package/esm/MobileDateTimePicker/MobileDateTimePicker.js +1 -0
  52. package/esm/MobileTimePicker/MobileTimePicker.js +1 -0
  53. package/esm/MonthCalendar/MonthCalendar.js +6 -11
  54. package/esm/PickersDay/PickersDay.d.ts +1 -72
  55. package/esm/PickersDay/PickersDay.js +30 -28
  56. package/esm/PickersDay/PickersDay.types.d.ts +114 -0
  57. package/esm/PickersDay/PickersDay.types.js +1 -0
  58. package/esm/PickersDay/index.d.ts +1 -1
  59. package/esm/PickersDay/usePickerDayOwnerState.d.ts +14 -0
  60. package/esm/PickersDay/usePickerDayOwnerState.js +32 -0
  61. package/esm/PickersSectionList/PickersSectionList.d.ts +1 -1
  62. package/esm/PickersSectionList/PickersSectionList.types.d.ts +2 -6
  63. package/esm/TimeField/useTimeField.d.ts +1 -1
  64. package/esm/TimeField/useTimeField.js +3 -17
  65. package/esm/TimePicker/TimePicker.js +1 -0
  66. package/esm/TimePicker/shared.js +3 -3
  67. package/esm/YearCalendar/YearCalendar.js +5 -11
  68. package/esm/hooks/useSplitFieldProps.d.ts +1 -1
  69. package/esm/index.js +1 -1
  70. package/esm/internals/components/PickerFieldUI.d.ts +5 -5
  71. package/esm/internals/hooks/useField/buildSectionsFromFormat.d.ts +2 -2
  72. package/esm/internals/hooks/useField/buildSectionsFromFormat.js +9 -9
  73. package/esm/internals/hooks/useField/index.d.ts +1 -1
  74. package/esm/internals/hooks/useField/syncSelectionToDOM.d.ts +9 -0
  75. package/esm/internals/hooks/useField/syncSelectionToDOM.js +50 -0
  76. package/esm/internals/hooks/useField/useField.d.ts +2 -4
  77. package/esm/internals/hooks/useField/useField.js +5 -229
  78. package/esm/internals/hooks/useField/useField.types.d.ts +55 -68
  79. package/esm/internals/hooks/useField/useField.utils.d.ts +3 -8
  80. package/esm/internals/hooks/useField/useField.utils.js +7 -149
  81. package/esm/internals/hooks/useField/useFieldCharacterEditing.d.ts +19 -26
  82. package/esm/internals/hooks/useField/useFieldCharacterEditing.js +42 -60
  83. package/esm/internals/hooks/useField/useFieldHiddenInputProps.d.ts +20 -0
  84. package/esm/internals/hooks/useField/useFieldHiddenInputProps.js +31 -0
  85. package/esm/internals/hooks/useField/useFieldInternalPropsWithDefaults.js +8 -10
  86. package/esm/internals/hooks/useField/useFieldRootHandleKeyDown.d.ts +16 -0
  87. package/esm/internals/hooks/useField/useFieldRootHandleKeyDown.js +205 -0
  88. package/esm/internals/hooks/useField/useFieldRootProps.d.ts +32 -0
  89. package/esm/internals/hooks/useField/useFieldRootProps.js +150 -0
  90. package/esm/internals/hooks/useField/useFieldSectionContainerProps.d.ts +15 -0
  91. package/esm/internals/hooks/useField/useFieldSectionContainerProps.js +29 -0
  92. package/esm/internals/hooks/useField/useFieldSectionContentProps.d.ts +23 -0
  93. package/esm/internals/hooks/useField/useFieldSectionContentProps.js +226 -0
  94. package/esm/internals/hooks/useField/useFieldState.d.ts +23 -13
  95. package/esm/internals/hooks/useField/useFieldState.js +103 -30
  96. package/esm/internals/hooks/useField/useFieldV6TextField.d.ts +3 -3
  97. package/esm/internals/hooks/useField/useFieldV6TextField.js +202 -135
  98. package/esm/internals/hooks/useField/useFieldV7TextField.d.ts +3 -2
  99. package/esm/internals/hooks/useField/useFieldV7TextField.js +200 -367
  100. package/esm/internals/hooks/usePicker/usePicker.types.d.ts +1 -0
  101. package/esm/internals/index.d.ts +6 -5
  102. package/esm/internals/index.js +4 -3
  103. package/esm/locales/deDE.js +2 -3
  104. package/esm/managers/useDateManager.d.ts +4 -13
  105. package/esm/managers/useDateManager.js +21 -31
  106. package/esm/managers/useDateTimeManager.d.ts +4 -13
  107. package/esm/managers/useDateTimeManager.js +26 -36
  108. package/esm/managers/useTimeManager.d.ts +4 -13
  109. package/esm/managers/useTimeManager.js +17 -27
  110. package/esm/models/fields.d.ts +2 -2
  111. package/esm/models/manager.d.ts +6 -10
  112. package/esm/validation/validateDate.js +3 -4
  113. package/hooks/useSplitFieldProps.d.ts +1 -1
  114. package/index.js +1 -1
  115. package/internals/components/PickerFieldUI.d.ts +5 -5
  116. package/internals/hooks/useField/buildSectionsFromFormat.d.ts +2 -2
  117. package/internals/hooks/useField/buildSectionsFromFormat.js +9 -9
  118. package/internals/hooks/useField/index.d.ts +1 -1
  119. package/internals/hooks/useField/syncSelectionToDOM.d.ts +9 -0
  120. package/internals/hooks/useField/syncSelectionToDOM.js +56 -0
  121. package/internals/hooks/useField/useField.d.ts +2 -4
  122. package/internals/hooks/useField/useField.js +5 -231
  123. package/internals/hooks/useField/useField.types.d.ts +55 -68
  124. package/internals/hooks/useField/useField.utils.d.ts +3 -8
  125. package/internals/hooks/useField/useField.utils.js +9 -154
  126. package/internals/hooks/useField/useFieldCharacterEditing.d.ts +19 -26
  127. package/internals/hooks/useField/useFieldCharacterEditing.js +41 -59
  128. package/internals/hooks/useField/useFieldHiddenInputProps.d.ts +20 -0
  129. package/internals/hooks/useField/useFieldHiddenInputProps.js +39 -0
  130. package/internals/hooks/useField/useFieldInternalPropsWithDefaults.js +8 -10
  131. package/internals/hooks/useField/useFieldRootHandleKeyDown.d.ts +16 -0
  132. package/internals/hooks/useField/useFieldRootHandleKeyDown.js +211 -0
  133. package/internals/hooks/useField/useFieldRootProps.d.ts +32 -0
  134. package/internals/hooks/useField/useFieldRootProps.js +156 -0
  135. package/internals/hooks/useField/useFieldSectionContainerProps.d.ts +15 -0
  136. package/internals/hooks/useField/useFieldSectionContainerProps.js +37 -0
  137. package/internals/hooks/useField/useFieldSectionContentProps.d.ts +23 -0
  138. package/internals/hooks/useField/useFieldSectionContentProps.js +234 -0
  139. package/internals/hooks/useField/useFieldState.d.ts +23 -13
  140. package/internals/hooks/useField/useFieldState.js +102 -29
  141. package/internals/hooks/useField/useFieldV6TextField.d.ts +3 -3
  142. package/internals/hooks/useField/useFieldV6TextField.js +202 -135
  143. package/internals/hooks/useField/useFieldV7TextField.d.ts +3 -2
  144. package/internals/hooks/useField/useFieldV7TextField.js +200 -367
  145. package/internals/hooks/usePicker/usePicker.types.d.ts +1 -0
  146. package/internals/index.d.ts +6 -5
  147. package/internals/index.js +25 -18
  148. package/locales/deDE.js +2 -3
  149. package/managers/useDateManager.d.ts +4 -13
  150. package/managers/useDateManager.js +21 -31
  151. package/managers/useDateTimeManager.d.ts +4 -13
  152. package/managers/useDateTimeManager.js +26 -36
  153. package/managers/useTimeManager.d.ts +4 -13
  154. package/managers/useTimeManager.js +18 -28
  155. package/models/fields.d.ts +2 -2
  156. package/models/manager.d.ts +6 -10
  157. package/modern/DateCalendar/DateCalendar.js +6 -10
  158. package/modern/DateCalendar/DayCalendar.d.ts +3 -7
  159. package/modern/DateCalendar/DayCalendar.js +18 -10
  160. package/modern/DateCalendar/index.d.ts +0 -1
  161. package/modern/DateField/useDateField.d.ts +1 -1
  162. package/modern/DateField/useDateField.js +3 -17
  163. package/modern/DatePicker/DatePicker.js +1 -0
  164. package/modern/DatePicker/shared.js +3 -9
  165. package/modern/DateTimeField/useDateTimeField.d.ts +1 -1
  166. package/modern/DateTimeField/useDateTimeField.js +3 -17
  167. package/modern/DateTimePicker/DateTimePicker.js +1 -0
  168. package/modern/DateTimePicker/shared.js +4 -14
  169. package/modern/DesktopDatePicker/DesktopDatePicker.js +1 -0
  170. package/modern/DesktopDateTimePicker/DesktopDateTimePicker.js +1 -0
  171. package/modern/DesktopTimePicker/DesktopTimePicker.js +1 -0
  172. package/modern/MobileDatePicker/MobileDatePicker.js +1 -0
  173. package/modern/MobileDateTimePicker/MobileDateTimePicker.js +1 -0
  174. package/modern/MobileTimePicker/MobileTimePicker.js +1 -0
  175. package/modern/MonthCalendar/MonthCalendar.js +6 -11
  176. package/modern/PickersDay/PickersDay.d.ts +1 -72
  177. package/modern/PickersDay/PickersDay.js +30 -28
  178. package/modern/PickersDay/PickersDay.types.d.ts +114 -0
  179. package/modern/PickersDay/PickersDay.types.js +1 -0
  180. package/modern/PickersDay/index.d.ts +1 -1
  181. package/modern/PickersDay/usePickerDayOwnerState.d.ts +14 -0
  182. package/modern/PickersDay/usePickerDayOwnerState.js +32 -0
  183. package/modern/PickersSectionList/PickersSectionList.d.ts +1 -1
  184. package/modern/PickersSectionList/PickersSectionList.types.d.ts +2 -6
  185. package/modern/TimeField/useTimeField.d.ts +1 -1
  186. package/modern/TimeField/useTimeField.js +3 -17
  187. package/modern/TimePicker/TimePicker.js +1 -0
  188. package/modern/TimePicker/shared.js +3 -3
  189. package/modern/YearCalendar/YearCalendar.js +5 -11
  190. package/modern/hooks/useSplitFieldProps.d.ts +1 -1
  191. package/modern/index.js +1 -1
  192. package/modern/internals/components/PickerFieldUI.d.ts +5 -5
  193. package/modern/internals/hooks/useField/buildSectionsFromFormat.d.ts +2 -2
  194. package/modern/internals/hooks/useField/buildSectionsFromFormat.js +9 -9
  195. package/modern/internals/hooks/useField/index.d.ts +1 -1
  196. package/modern/internals/hooks/useField/syncSelectionToDOM.d.ts +9 -0
  197. package/modern/internals/hooks/useField/syncSelectionToDOM.js +50 -0
  198. package/modern/internals/hooks/useField/useField.d.ts +2 -4
  199. package/modern/internals/hooks/useField/useField.js +5 -229
  200. package/modern/internals/hooks/useField/useField.types.d.ts +55 -68
  201. package/modern/internals/hooks/useField/useField.utils.d.ts +3 -8
  202. package/modern/internals/hooks/useField/useField.utils.js +7 -149
  203. package/modern/internals/hooks/useField/useFieldCharacterEditing.d.ts +19 -26
  204. package/modern/internals/hooks/useField/useFieldCharacterEditing.js +42 -60
  205. package/modern/internals/hooks/useField/useFieldHiddenInputProps.d.ts +20 -0
  206. package/modern/internals/hooks/useField/useFieldHiddenInputProps.js +31 -0
  207. package/modern/internals/hooks/useField/useFieldInternalPropsWithDefaults.js +8 -10
  208. package/modern/internals/hooks/useField/useFieldRootHandleKeyDown.d.ts +16 -0
  209. package/modern/internals/hooks/useField/useFieldRootHandleKeyDown.js +205 -0
  210. package/modern/internals/hooks/useField/useFieldRootProps.d.ts +32 -0
  211. package/modern/internals/hooks/useField/useFieldRootProps.js +150 -0
  212. package/modern/internals/hooks/useField/useFieldSectionContainerProps.d.ts +15 -0
  213. package/modern/internals/hooks/useField/useFieldSectionContainerProps.js +29 -0
  214. package/modern/internals/hooks/useField/useFieldSectionContentProps.d.ts +23 -0
  215. package/modern/internals/hooks/useField/useFieldSectionContentProps.js +226 -0
  216. package/modern/internals/hooks/useField/useFieldState.d.ts +23 -13
  217. package/modern/internals/hooks/useField/useFieldState.js +103 -30
  218. package/modern/internals/hooks/useField/useFieldV6TextField.d.ts +3 -3
  219. package/modern/internals/hooks/useField/useFieldV6TextField.js +202 -135
  220. package/modern/internals/hooks/useField/useFieldV7TextField.d.ts +3 -2
  221. package/modern/internals/hooks/useField/useFieldV7TextField.js +200 -367
  222. package/modern/internals/hooks/usePicker/usePicker.types.d.ts +1 -0
  223. package/modern/internals/index.d.ts +6 -5
  224. package/modern/internals/index.js +4 -3
  225. package/modern/locales/deDE.js +2 -3
  226. package/modern/managers/useDateManager.d.ts +4 -13
  227. package/modern/managers/useDateManager.js +21 -31
  228. package/modern/managers/useDateTimeManager.d.ts +4 -13
  229. package/modern/managers/useDateTimeManager.js +26 -36
  230. package/modern/managers/useTimeManager.d.ts +4 -13
  231. package/modern/managers/useTimeManager.js +17 -27
  232. package/modern/models/fields.d.ts +2 -2
  233. package/modern/models/manager.d.ts +6 -10
  234. package/modern/validation/validateDate.js +3 -4
  235. package/package.json +2 -2
  236. package/tsconfig.build.tsbuildinfo +1 -1
  237. package/validation/validateDate.js +3 -4
@@ -1,317 +1,185 @@
1
1
  "use strict";
2
2
 
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
3
  var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
4
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
8
  exports.useFieldV7TextField = void 0;
9
+ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
9
10
  var React = _interopRequireWildcard(require("react"));
10
11
  var _useForkRef = _interopRequireDefault(require("@mui/utils/useForkRef"));
11
12
  var _useEventCallback = _interopRequireDefault(require("@mui/utils/useEventCallback"));
12
13
  var _useEnhancedEffect = _interopRequireDefault(require("@mui/utils/useEnhancedEffect"));
13
- var _useId = _interopRequireDefault(require("@mui/utils/useId"));
14
14
  var _useField = require("./useField.utils");
15
15
  var _utils = require("../../utils/utils");
16
- var _usePickerTranslations = require("../../../hooks/usePickerTranslations");
17
- var _useUtils = require("../useUtils");
18
- const useFieldV7TextField = params => {
16
+ var _hooks = require("../../../hooks");
17
+ var _useFieldCharacterEditing = require("./useFieldCharacterEditing");
18
+ var _useFieldState = require("./useFieldState");
19
+ var _useFieldInternalPropsWithDefaults = require("./useFieldInternalPropsWithDefaults");
20
+ var _syncSelectionToDOM = require("./syncSelectionToDOM");
21
+ var _useFieldRootProps = require("./useFieldRootProps");
22
+ var _useFieldHiddenInputProps = require("./useFieldHiddenInputProps");
23
+ var _useFieldSectionContainerProps = require("./useFieldSectionContainerProps");
24
+ var _useFieldSectionContentProps = require("./useFieldSectionContentProps");
25
+ const useFieldV7TextField = parameters => {
19
26
  const {
20
- internalProps: {
21
- disabled,
22
- readOnly = false,
23
- autoFocus = false,
24
- focused: focusedProp
25
- },
26
- forwardedProps: {
27
- sectionListRef: inSectionListRef,
28
- onBlur,
29
- onClick,
30
- onFocus,
31
- onInput,
32
- onPaste
33
- },
34
- fieldValueManager,
35
- applyCharacterEditing,
36
- resetCharacterQuery,
37
- setSelectedSections,
27
+ props,
28
+ manager,
29
+ skipContextFieldRefAssignment,
30
+ manager: {
31
+ valueType,
32
+ internal_useOpenPickerButtonAriaLabel: useOpenPickerButtonAriaLabel
33
+ }
34
+ } = parameters;
35
+ const {
36
+ internalProps,
37
+ forwardedProps
38
+ } = (0, _hooks.useSplitFieldProps)(props, valueType);
39
+ const internalPropsWithDefaults = (0, _useFieldInternalPropsWithDefaults.useFieldInternalPropsWithDefaults)({
40
+ manager,
41
+ internalProps,
42
+ skipContextFieldRefAssignment
43
+ });
44
+ const {
45
+ sectionListRef: sectionListRefProp,
46
+ onBlur,
47
+ onClick,
48
+ onFocus,
49
+ onInput,
50
+ onPaste,
51
+ onKeyDown,
52
+ onClear,
53
+ clearable
54
+ } = forwardedProps;
55
+ const {
56
+ disabled = false,
57
+ readOnly = false,
58
+ autoFocus = false,
59
+ focused: focusedProp,
60
+ unstableFieldRef
61
+ } = internalPropsWithDefaults;
62
+ const sectionListRef = React.useRef(null);
63
+ const handleSectionListRef = (0, _useForkRef.default)(sectionListRefProp, sectionListRef);
64
+ const domGetters = React.useMemo(() => ({
65
+ isReady: () => sectionListRef.current != null,
66
+ getRoot: () => sectionListRef.current.getRoot(),
67
+ getSectionContainer: sectionIndex => sectionListRef.current.getSectionContainer(sectionIndex),
68
+ getSectionContent: sectionIndex => sectionListRef.current.getSectionContent(sectionIndex),
69
+ getSectionIndexFromDOMElement: element => sectionListRef.current.getSectionIndexFromDOMElement(element)
70
+ }), [sectionListRef]);
71
+ const stateResponse = (0, _useFieldState.useFieldState)({
72
+ manager,
73
+ internalPropsWithDefaults,
74
+ forwardedProps
75
+ });
76
+ const {
77
+ // States and derived states
78
+ areAllSectionsEmpty,
79
+ error,
38
80
  parsedSelectedSections,
81
+ sectionOrder,
39
82
  state,
40
- clearActiveSection,
83
+ value,
84
+ // Methods to update the states
41
85
  clearValue,
42
- updateSectionValue,
43
- updateValueFromValueStr,
44
- sectionOrder,
45
- areAllSectionsEmpty,
46
- sectionsValueBoundaries
47
- } = params;
48
- const sectionListRef = React.useRef(null);
49
- const handleSectionListRef = (0, _useForkRef.default)(inSectionListRef, sectionListRef);
50
- const translations = (0, _usePickerTranslations.usePickerTranslations)();
51
- const utils = (0, _useUtils.useUtils)();
52
- const id = (0, _useId.default)();
53
- const [focused, setFocused] = React.useState(false);
54
- const interactions = React.useMemo(() => ({
55
- syncSelectionToDOM: () => {
56
- if (!sectionListRef.current) {
57
- return;
58
- }
59
- const selection = document.getSelection();
60
- if (!selection) {
61
- return;
62
- }
63
- if (parsedSelectedSections == null) {
64
- // If the selection contains an element inside the field, we reset it.
65
- if (selection.rangeCount > 0 && sectionListRef.current.getRoot().contains(selection.getRangeAt(0).startContainer)) {
66
- selection.removeAllRanges();
67
- }
68
- if (focused) {
69
- sectionListRef.current.getRoot().blur();
70
- }
71
- return;
72
- }
73
-
74
- // On multi input range pickers we want to update selection range only for the active input
75
- if (!sectionListRef.current.getRoot().contains((0, _utils.getActiveElement)(document))) {
76
- return;
77
- }
78
- const range = new window.Range();
79
- let target;
80
- if (parsedSelectedSections === 'all') {
81
- target = sectionListRef.current.getRoot();
82
- } else {
83
- const section = state.sections[parsedSelectedSections];
84
- if (section.type === 'empty') {
85
- target = sectionListRef.current.getSectionContainer(parsedSelectedSections);
86
- } else {
87
- target = sectionListRef.current.getSectionContent(parsedSelectedSections);
88
- }
89
- }
90
- range.selectNodeContents(target);
91
- target.focus();
92
- selection.removeAllRanges();
93
- selection.addRange(range);
94
- },
95
- getActiveSectionIndexFromDOM: () => {
96
- const activeElement = (0, _utils.getActiveElement)(document);
97
- if (!activeElement || !sectionListRef.current || !sectionListRef.current.getRoot().contains(activeElement)) {
98
- return null;
99
- }
100
- return sectionListRef.current.getSectionIndexFromDOMElement(activeElement);
101
- },
102
- focusField: (newSelectedSections = 0) => {
103
- if (!sectionListRef.current ||
104
- // if the field is already focused, we don't need to focus it again
105
- interactions.getActiveSectionIndexFromDOM() != null) {
106
- return;
107
- }
108
- const newParsedSelectedSections = (0, _useField.parseSelectedSections)(newSelectedSections, state.sections);
109
- setFocused(true);
110
- sectionListRef.current.getSectionContent(newParsedSelectedSections).focus();
111
- },
112
- setSelectedSections: newSelectedSections => {
113
- if (!sectionListRef.current) {
114
- return;
115
- }
116
- const newParsedSelectedSections = (0, _useField.parseSelectedSections)(newSelectedSections, state.sections);
117
- const newActiveSectionIndex = newParsedSelectedSections === 'all' ? 0 : newParsedSelectedSections;
118
- setFocused(newActiveSectionIndex !== null);
119
- setSelectedSections(newSelectedSections);
120
- },
121
- isFieldFocused: () => {
122
- const activeElement = (0, _utils.getActiveElement)(document);
123
- return !!sectionListRef.current && sectionListRef.current.getRoot().contains(activeElement);
124
- }
125
- }), [parsedSelectedSections, setSelectedSections, state.sections, focused]);
126
-
127
- /**
128
- * If a section content has been updated with a value we don't want to keep,
129
- * Then we need to imperatively revert it (we can't let React do it because the value did not change in his internal representation).
130
- */
131
- const revertDOMSectionChange = (0, _useEventCallback.default)(sectionIndex => {
132
- if (!sectionListRef.current) {
133
- return;
134
- }
135
- const section = state.sections[sectionIndex];
136
- sectionListRef.current.getSectionContent(sectionIndex).innerHTML = section.value || section.placeholder;
137
- interactions.syncSelectionToDOM();
86
+ setSelectedSections
87
+ } = stateResponse;
88
+ const applyCharacterEditing = (0, _useFieldCharacterEditing.useFieldCharacterEditing)({
89
+ stateResponse
138
90
  });
139
- const handleContainerClick = (0, _useEventCallback.default)((event, ...args) => {
140
- // The click event on the clear button would propagate to the input, trigger this handler and result in a wrong section selection.
141
- // We avoid this by checking if the call of `handleContainerClick` is actually intended, or a side effect.
142
- if (event.isDefaultPrevented() || !sectionListRef.current) {
91
+ const openPickerAriaLabel = useOpenPickerButtonAriaLabel(value);
92
+ const [focused, setFocused] = React.useState(false);
93
+ function focusField(newSelectedSections = 0) {
94
+ if (!sectionListRef.current ||
95
+ // if the field is already focused, we don't need to focus it again
96
+ getActiveSectionIndex(sectionListRef) != null) {
143
97
  return;
144
98
  }
99
+ const newParsedSelectedSections = (0, _useField.parseSelectedSections)(newSelectedSections, state.sections);
145
100
  setFocused(true);
146
- onClick?.(event, ...args);
147
- if (parsedSelectedSections === 'all') {
148
- setTimeout(() => {
149
- const cursorPosition = document.getSelection().getRangeAt(0).startOffset;
150
- if (cursorPosition === 0) {
151
- setSelectedSections(sectionOrder.startIndex);
152
- return;
153
- }
154
- let sectionIndex = 0;
155
- let cursorOnStartOfSection = 0;
156
- while (cursorOnStartOfSection < cursorPosition && sectionIndex < state.sections.length) {
157
- const section = state.sections[sectionIndex];
158
- sectionIndex += 1;
159
- cursorOnStartOfSection += `${section.startSeparator}${section.value || section.placeholder}${section.endSeparator}`.length;
160
- }
161
- setSelectedSections(sectionIndex - 1);
162
- });
163
- } else if (!focused) {
164
- setFocused(true);
165
- setSelectedSections(sectionOrder.startIndex);
166
- } else {
167
- const hasClickedOnASection = sectionListRef.current.getRoot().contains(event.target);
168
- if (!hasClickedOnASection) {
169
- setSelectedSections(sectionOrder.startIndex);
170
- }
171
- }
101
+ sectionListRef.current.getSectionContent(newParsedSelectedSections).focus();
102
+ }
103
+ const rootProps = (0, _useFieldRootProps.useFieldRootProps)({
104
+ manager,
105
+ internalPropsWithDefaults,
106
+ stateResponse,
107
+ applyCharacterEditing,
108
+ focused,
109
+ setFocused,
110
+ domGetters
172
111
  });
173
- const handleContainerInput = (0, _useEventCallback.default)(event => {
174
- onInput?.(event);
175
- if (!sectionListRef.current || parsedSelectedSections !== 'all') {
176
- return;
177
- }
178
- const target = event.target;
179
- const keyPressed = target.textContent ?? '';
180
- sectionListRef.current.getRoot().innerHTML = state.sections.map(section => `${section.startSeparator}${section.value || section.placeholder}${section.endSeparator}`).join('');
181
- interactions.syncSelectionToDOM();
182
- if (keyPressed.length === 0 || keyPressed.charCodeAt(0) === 10) {
183
- resetCharacterQuery();
184
- clearValue();
185
- setSelectedSections('all');
186
- } else if (keyPressed.length > 1) {
187
- updateValueFromValueStr(keyPressed);
188
- } else {
189
- if (parsedSelectedSections === 'all') {
190
- setSelectedSections(0);
191
- }
192
- applyCharacterEditing({
193
- keyPressed,
194
- sectionIndex: 0
195
- });
196
- }
112
+ const hiddenInputProps = (0, _useFieldHiddenInputProps.useFieldHiddenInputProps)({
113
+ manager,
114
+ stateResponse
197
115
  });
198
- const handleContainerPaste = (0, _useEventCallback.default)(event => {
199
- onPaste?.(event);
200
- if (readOnly || parsedSelectedSections !== 'all') {
201
- event.preventDefault();
202
- return;
203
- }
204
- const pastedValue = event.clipboardData.getData('text');
205
- event.preventDefault();
206
- resetCharacterQuery();
207
- updateValueFromValueStr(pastedValue);
116
+ const createSectionContainerProps = (0, _useFieldSectionContainerProps.useFieldSectionContainerProps)({
117
+ stateResponse
208
118
  });
209
- const handleContainerFocus = (0, _useEventCallback.default)(event => {
210
- onFocus?.(event);
211
- if (focused || !sectionListRef.current) {
212
- return;
213
- }
214
- const activeElement = (0, _utils.getActiveElement)(document);
215
- setFocused(true);
216
- const isFocusInsideASection = sectionListRef.current.getSectionIndexFromDOMElement(activeElement) != null;
217
- if (!isFocusInsideASection) {
218
- setSelectedSections(sectionOrder.startIndex);
219
- }
119
+ const createSectionContentProps = (0, _useFieldSectionContentProps.useFieldSectionContentProps)({
120
+ manager,
121
+ stateResponse,
122
+ applyCharacterEditing,
123
+ internalPropsWithDefaults,
124
+ domGetters,
125
+ focused
126
+ });
127
+ const handleRootKeyDown = (0, _useEventCallback.default)(event => {
128
+ onKeyDown?.(event);
129
+ rootProps.onKeyDown(event);
220
130
  });
221
- const handleContainerBlur = (0, _useEventCallback.default)(event => {
131
+ const handleRootBlur = (0, _useEventCallback.default)(event => {
222
132
  onBlur?.(event);
223
- setTimeout(() => {
224
- if (!sectionListRef.current) {
225
- return;
226
- }
227
- const activeElement = (0, _utils.getActiveElement)(document);
228
- const shouldBlur = !sectionListRef.current.getRoot().contains(activeElement);
229
- if (shouldBlur) {
230
- setFocused(false);
231
- setSelectedSections(null);
232
- }
233
- });
133
+ rootProps.onBlur(event);
234
134
  });
235
- const getInputContainerClickHandler = (0, _useEventCallback.default)(sectionIndex => event => {
236
- // The click event on the clear button would propagate to the input, trigger this handler and result in a wrong section selection.
237
- // We avoid this by checking if the call to this function is actually intended, or a side effect.
238
- if (event.isDefaultPrevented()) {
239
- return;
240
- }
241
- setSelectedSections(sectionIndex);
135
+ const handleRootFocus = (0, _useEventCallback.default)(event => {
136
+ onFocus?.(event);
137
+ rootProps.onFocus(event);
242
138
  });
243
- const handleInputContentMouseUp = (0, _useEventCallback.default)(event => {
244
- // Without this, the browser will remove the selected when clicking inside an already-selected section.
245
- event.preventDefault();
139
+ const handleRootClick = (0, _useEventCallback.default)(event => {
140
+ onClick?.(event);
141
+ rootProps.onClick(event);
142
+ });
143
+ const handleRootPaste = (0, _useEventCallback.default)(event => {
144
+ onPaste?.(event);
145
+ rootProps.onPaste(event);
246
146
  });
247
- const getInputContentFocusHandler = (0, _useEventCallback.default)(sectionIndex => () => {
248
- setSelectedSections(sectionIndex);
147
+ const handleRootInput = (0, _useEventCallback.default)(event => {
148
+ onInput?.(event);
149
+ rootProps.onInput(event);
249
150
  });
250
- const handleInputContentPaste = (0, _useEventCallback.default)(event => {
251
- // prevent default to avoid the input `onInput` handler being called
151
+ const handleClear = (0, _useEventCallback.default)((event, ...args) => {
252
152
  event.preventDefault();
253
- if (readOnly || disabled || typeof parsedSelectedSections !== 'number') {
254
- return;
255
- }
256
- const activeSection = state.sections[parsedSelectedSections];
257
- const pastedValue = event.clipboardData.getData('text');
258
- const lettersOnly = /^[a-zA-Z]+$/.test(pastedValue);
259
- const digitsOnly = /^[0-9]+$/.test(pastedValue);
260
- const digitsAndLetterOnly = /^(([a-zA-Z]+)|)([0-9]+)(([a-zA-Z]+)|)$/.test(pastedValue);
261
- const isValidPastedValue = activeSection.contentType === 'letter' && lettersOnly || activeSection.contentType === 'digit' && digitsOnly || activeSection.contentType === 'digit-with-letter' && digitsAndLetterOnly;
262
- if (isValidPastedValue) {
263
- resetCharacterQuery();
264
- updateSectionValue({
265
- section: activeSection,
266
- newSectionValue: pastedValue,
267
- shouldGoToNextSection: true
268
- });
269
- }
270
- // If the pasted value corresponds to a single section, but not the expected type, we skip the modification
271
- else if (!lettersOnly && !digitsOnly) {
272
- resetCharacterQuery();
273
- updateValueFromValueStr(pastedValue);
153
+ onClear?.(event, ...args);
154
+ clearValue();
155
+ if (!isFieldFocused(sectionListRef)) {
156
+ // setSelectedSections is called internally
157
+ focusField(0);
158
+ } else {
159
+ setSelectedSections(sectionOrder.startIndex);
274
160
  }
275
161
  });
276
- const handleInputContentDragOver = (0, _useEventCallback.default)(event => {
277
- event.preventDefault();
278
- event.dataTransfer.dropEffect = 'none';
279
- });
280
- const handleInputContentInput = (0, _useEventCallback.default)(event => {
281
- if (!sectionListRef.current) {
282
- return;
283
- }
284
- const target = event.target;
285
- const keyPressed = target.textContent ?? '';
286
- const sectionIndex = sectionListRef.current.getSectionIndexFromDOMElement(target);
287
- const section = state.sections[sectionIndex];
288
- if (readOnly || !sectionListRef.current) {
289
- revertDOMSectionChange(sectionIndex);
290
- return;
291
- }
292
- if (keyPressed.length === 0) {
293
- if (section.value === '') {
294
- revertDOMSectionChange(sectionIndex);
295
- return;
296
- }
297
- const inputType = event.nativeEvent.inputType;
298
- if (inputType === 'insertParagraph' || inputType === 'insertLineBreak') {
299
- revertDOMSectionChange(sectionIndex);
300
- return;
162
+ const elements = React.useMemo(() => {
163
+ return state.sections.map((section, sectionIndex) => ({
164
+ container: createSectionContainerProps(sectionIndex),
165
+ content: createSectionContentProps(section, sectionIndex),
166
+ before: {
167
+ children: section.startSeparator
168
+ },
169
+ after: {
170
+ children: section.endSeparator
301
171
  }
302
- resetCharacterQuery();
303
- revertDOMSectionChange(sectionIndex);
304
- clearActiveSection();
305
- return;
172
+ }));
173
+ }, [state.sections, createSectionContainerProps, createSectionContentProps]);
174
+ React.useEffect(() => {
175
+ if (sectionListRef.current == null) {
176
+ throw new Error(['MUI X: The `sectionListRef` prop has not been initialized by `PickersSectionList`', 'You probably tried to pass a component to the `textField` slot that contains an `<input />` element instead of a `PickersSectionList`.', '', 'If you want to keep using an `<input />` HTML element for the editing, please remove the `enableAccessibleFieldDOMStructure` prop from your Picker or Field component:', '', '<DatePicker slots={{ textField: MyCustomTextField }} />', '', 'Learn more about the field accessible DOM structure on the MUI documentation: https://mui.com/x/react-date-pickers/fields/#fields-to-edit-a-single-element'].join('\n'));
306
177
  }
307
- applyCharacterEditing({
308
- keyPressed,
309
- sectionIndex
310
- });
178
+ if (autoFocus && sectionListRef.current) {
179
+ sectionListRef.current.getSectionContent(sectionOrder.startIndex).focus();
180
+ }
181
+ }, []); // eslint-disable-line react-hooks/exhaustive-deps
311
182
 
312
- // The DOM value needs to remain the one React is expecting.
313
- revertDOMSectionChange(sectionIndex);
314
- });
315
183
  (0, _useEnhancedEffect.default)(() => {
316
184
  if (!focused || !sectionListRef.current) {
317
185
  return;
@@ -325,95 +193,60 @@ const useFieldV7TextField = params => {
325
193
  }
326
194
  }
327
195
  }, [parsedSelectedSections, focused]);
328
- const sectionBoundaries = React.useMemo(() => {
329
- return state.sections.reduce((acc, next) => {
330
- acc[next.type] = sectionsValueBoundaries[next.type]({
331
- currentDate: null,
332
- contentType: next.contentType,
333
- format: next.format
334
- });
335
- return acc;
336
- }, {});
337
- }, [sectionsValueBoundaries, state.sections]);
338
- const isContainerEditable = parsedSelectedSections === 'all';
339
- const elements = React.useMemo(() => {
340
- return state.sections.map((section, index) => {
341
- const isEditable = !isContainerEditable && !disabled && !readOnly;
342
- return {
343
- container: {
344
- 'data-sectionindex': index,
345
- onClick: getInputContainerClickHandler(index)
346
- },
347
- content: {
348
- tabIndex: isContainerEditable || index > 0 ? -1 : 0,
349
- contentEditable: !isContainerEditable && !disabled && !readOnly,
350
- role: 'spinbutton',
351
- id: `${id}-${section.type}`,
352
- 'aria-labelledby': `${id}-${section.type}`,
353
- 'aria-readonly': readOnly,
354
- 'aria-valuenow': (0, _useField.getSectionValueNow)(section, utils),
355
- 'aria-valuemin': sectionBoundaries[section.type].minimum,
356
- 'aria-valuemax': sectionBoundaries[section.type].maximum,
357
- 'aria-valuetext': section.value ? (0, _useField.getSectionValueText)(section, utils) : translations.empty,
358
- 'aria-label': translations[section.type],
359
- 'aria-disabled': disabled,
360
- spellCheck: isEditable ? false : undefined,
361
- autoCapitalize: isEditable ? 'off' : undefined,
362
- autoCorrect: isEditable ? 'off' : undefined,
363
- [parseInt(React.version, 10) >= 17 ? 'enterKeyHint' : 'enterkeyhint']: isEditable ? 'next' : undefined,
364
- children: section.value || section.placeholder,
365
- onInput: handleInputContentInput,
366
- onPaste: handleInputContentPaste,
367
- onFocus: getInputContentFocusHandler(index),
368
- onDragOver: handleInputContentDragOver,
369
- onMouseUp: handleInputContentMouseUp,
370
- inputMode: section.contentType === 'letter' ? 'text' : 'numeric'
371
- },
372
- before: {
373
- children: section.startSeparator
374
- },
375
- after: {
376
- children: section.endSeparator
377
- }
378
- };
196
+ (0, _useEnhancedEffect.default)(() => {
197
+ (0, _syncSelectionToDOM.syncSelectionToDOM)({
198
+ focused,
199
+ domGetters,
200
+ stateResponse
379
201
  });
380
- }, [state.sections, getInputContentFocusHandler, handleInputContentPaste, handleInputContentDragOver, handleInputContentInput, getInputContainerClickHandler, handleInputContentMouseUp, disabled, readOnly, isContainerEditable, translations, utils, sectionBoundaries, id]);
381
- const handleValueStrChange = (0, _useEventCallback.default)(event => {
382
- updateValueFromValueStr(event.target.value);
383
202
  });
384
- const valueStr = React.useMemo(() => areAllSectionsEmpty ? '' : fieldValueManager.getV7HiddenInputValueFromSections(state.sections), [areAllSectionsEmpty, state.sections, fieldValueManager]);
385
- React.useEffect(() => {
386
- if (sectionListRef.current == null) {
387
- throw new Error(['MUI X: The `sectionListRef` prop has not been initialized by `PickersSectionList`', 'You probably tried to pass a component to the `textField` slot that contains an `<input />` element instead of a `PickersSectionList`.', '', 'If you want to keep using an `<input />` HTML element for the editing, please remove the `enableAccessibleFieldDOMStructure` prop from your Picker or Field component:', '', '<DatePicker slots={{ textField: MyCustomTextField }} />', '', 'Learn more about the field accessible DOM structure on the MUI documentation: https://mui.com/x/react-date-pickers/fields/#fields-to-edit-a-single-element'].join('\n'));
388
- }
389
- if (autoFocus && sectionListRef.current) {
390
- sectionListRef.current.getSectionContent(sectionOrder.startIndex).focus();
391
- }
392
- }, []); // eslint-disable-line react-hooks/exhaustive-deps
393
-
394
- return {
395
- interactions,
396
- returnedValue: {
397
- // Forwarded
398
- autoFocus,
399
- readOnly,
400
- focused: focusedProp ?? focused,
401
- sectionListRef: handleSectionListRef,
402
- onBlur: handleContainerBlur,
403
- onClick: handleContainerClick,
404
- onFocus: handleContainerFocus,
405
- onInput: handleContainerInput,
406
- onPaste: handleContainerPaste,
407
- // Additional
408
- enableAccessibleFieldDOMStructure: true,
409
- elements,
410
- // TODO v7: Try to set to undefined when there is a section selected.
411
- tabIndex: parsedSelectedSections === 0 ? -1 : 0,
412
- contentEditable: isContainerEditable,
413
- value: valueStr,
414
- onChange: handleValueStrChange,
415
- areAllSectionsEmpty
416
- }
417
- };
203
+ React.useImperativeHandle(unstableFieldRef, () => ({
204
+ getSections: () => state.sections,
205
+ getActiveSectionIndex: () => getActiveSectionIndex(sectionListRef),
206
+ setSelectedSections: newSelectedSections => {
207
+ if (!sectionListRef.current) {
208
+ return;
209
+ }
210
+ const newParsedSelectedSections = (0, _useField.parseSelectedSections)(newSelectedSections, state.sections);
211
+ const newActiveSectionIndex = newParsedSelectedSections === 'all' ? 0 : newParsedSelectedSections;
212
+ setFocused(newActiveSectionIndex !== null);
213
+ setSelectedSections(newSelectedSections);
214
+ },
215
+ focusField,
216
+ isFieldFocused: () => isFieldFocused(sectionListRef)
217
+ }));
218
+ return (0, _extends2.default)({}, forwardedProps, rootProps, {
219
+ onBlur: handleRootBlur,
220
+ onClick: handleRootClick,
221
+ onFocus: handleRootFocus,
222
+ onInput: handleRootInput,
223
+ onPaste: handleRootPaste,
224
+ onKeyDown: handleRootKeyDown,
225
+ onClear: handleClear
226
+ }, hiddenInputProps, {
227
+ error,
228
+ clearable: Boolean(clearable && !areAllSectionsEmpty && !readOnly && !disabled),
229
+ focused: focusedProp ?? focused,
230
+ sectionListRef: handleSectionListRef,
231
+ // Additional
232
+ enableAccessibleFieldDOMStructure: true,
233
+ elements,
234
+ areAllSectionsEmpty,
235
+ disabled,
236
+ readOnly,
237
+ autoFocus,
238
+ openPickerAriaLabel
239
+ });
418
240
  };
419
- exports.useFieldV7TextField = useFieldV7TextField;
241
+ exports.useFieldV7TextField = useFieldV7TextField;
242
+ function getActiveSectionIndex(sectionListRef) {
243
+ const activeElement = (0, _utils.getActiveElement)(document);
244
+ if (!activeElement || !sectionListRef.current || !sectionListRef.current.getRoot().contains(activeElement)) {
245
+ return null;
246
+ }
247
+ return sectionListRef.current.getSectionIndexFromDOMElement(activeElement);
248
+ }
249
+ function isFieldFocused(sectionListRef) {
250
+ const activeElement = (0, _utils.getActiveElement)(document);
251
+ return !!sectionListRef.current && sectionListRef.current.getRoot().contains(activeElement);
252
+ }
@@ -89,6 +89,7 @@ export interface UsePickerNonStaticProps extends Omit<PickerFieldPrivateContextV
89
89
  format?: string;
90
90
  /**
91
91
  * If `true`, the button to open the Picker will not be rendered (it will only render the field).
92
+ * @deprecated Use the [field component](https://next.mui.com/x/react-date-pickers/fields/) instead.
92
93
  * @default false
93
94
  */
94
95
  disableOpenPicker?: boolean;
@@ -26,7 +26,7 @@ export { DAY_MARGIN, DIALOG_WIDTH, VIEW_HEIGHT, MULTI_SECTION_CLOCK_SECTION_WIDT
26
26
  export { useControlledValue } from "./hooks/useControlledValue.js";
27
27
  export type { DesktopOnlyPickerProps } from './hooks/useDesktopPicker';
28
28
  export { useField, useFieldInternalPropsWithDefaults, createDateStrForV7HiddenInputFromSections, createDateStrForV6InputFromSections } from "./hooks/useField/index.js";
29
- export type { UseFieldInternalProps, UseFieldParams, UseFieldResponse, FieldValueManager, FieldChangeHandler, FieldChangeHandlerContext } from './hooks/useField';
29
+ export type { UseFieldInternalProps, UseFieldParameters, UseFieldReturnValue, FieldValueManager, FieldChangeHandler, FieldChangeHandlerContext } from './hooks/useField';
30
30
  export { useFieldOwnerState } from "./hooks/useFieldOwnerState.js";
31
31
  export type { MobileOnlyPickerProps } from './hooks/useMobilePicker';
32
32
  export { useNullableFieldPrivateContext } from "./hooks/useNullableFieldPrivateContext.js";
@@ -42,7 +42,7 @@ export { useLocalizationContext, useDefaultDates, useUtils, useNow } from "./hoo
42
42
  export type { ExportedUseViewsOptions, UseViewsOptions } from './hooks/useViews';
43
43
  export { useViews } from "./hooks/useViews.js";
44
44
  export { usePreviousMonthDisabled, useNextMonthDisabled } from "./hooks/date-helpers-hooks.js";
45
- export type { PickerAnyManager, PickerManagerFieldInternalProps, PickerManagerEnableAccessibleFieldDOMStructure, PickerManagerError, PickerValueManager } from './models/manager';
45
+ export type { PickerAnyManager, PickerManagerFieldInternalProps, PickerManagerFieldInternalPropsWithDefaults, PickerManagerEnableAccessibleFieldDOMStructure, PickerManagerError, PickerValueManager } from './models/manager';
46
46
  export type { RangePosition } from './models/pickers';
47
47
  export type { BaseSingleInputFieldProps, FieldRangeSection } from './models/fields';
48
48
  export type { BasePickerProps, BasePickerInputProps } from './models/props/basePickerProps';
@@ -65,6 +65,7 @@ export type { DayCalendarProps, DayCalendarSlots, DayCalendarSlotProps, Exported
65
65
  export type { ExportedDateCalendarProps } from '../DateCalendar/DateCalendar.types';
66
66
  export { useCalendarState } from "../DateCalendar/useCalendarState.js";
67
67
  export { DateTimePickerToolbarOverrideContext } from "../DateTimePicker/DateTimePickerToolbar.js";
68
- export { getDateFieldInternalPropsDefaults } from "../managers/useDateManager.js";
69
- export { getTimeFieldInternalPropsDefaults } from "../managers/useTimeManager.js";
70
- export { getDateTimeFieldInternalPropsDefaults } from "../managers/useDateTimeManager.js";
68
+ export { usePickerDayOwnerState } from "../PickersDay/usePickerDayOwnerState.js";
69
+ export { useApplyDefaultValuesToDateValidationProps } from "../managers/useDateManager.js";
70
+ export { useApplyDefaultValuesToTimeValidationProps } from "../managers/useTimeManager.js";
71
+ export { useApplyDefaultValuesToDateTimeValidationProps } from "../managers/useDateTimeManager.js";