@mui/x-date-pickers-pro 8.0.0-alpha.6 → 8.0.0-alpha.7
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/{AdapterDateFnsJalaliV3 → AdapterDateFnsJalaliV2}/index.d.ts +1 -1
- package/{AdapterDateFnsJalaliV3 → AdapterDateFnsJalaliV2}/index.js +1 -1
- package/{AdapterDateFnsJalaliV3 → AdapterDateFnsJalaliV2}/package.json +1 -1
- package/{AdapterDateFnsV3 → AdapterDateFnsV2}/index.d.ts +1 -1
- package/{AdapterDateFnsV3 → AdapterDateFnsV2}/index.js +1 -1
- package/{AdapterDateFnsV3 → AdapterDateFnsV2}/package.json +1 -1
- package/CHANGELOG.md +127 -1
- package/DateRangeCalendar/DateRangeCalendar.js +9 -7
- package/DateRangePicker/DateRangePicker.js +1 -1
- package/DateRangePicker/DateRangePicker.types.d.ts +5 -0
- package/DateRangePicker/DateRangePickerToolbar.d.ts +2 -3
- package/DateRangePicker/DateRangePickerToolbar.js +25 -17
- package/DateRangePicker/shared.d.ts +1 -1
- package/DateTimeRangePicker/DateTimeRangePicker.js +2 -2
- package/DateTimeRangePicker/DateTimeRangePickerTabs.d.ts +3 -4
- package/DateTimeRangePicker/DateTimeRangePickerTabs.js +8 -7
- package/DateTimeRangePicker/DateTimeRangePickerTimeWrapper.d.ts +8 -10
- package/DateTimeRangePicker/DateTimeRangePickerTimeWrapper.js +7 -5
- package/DateTimeRangePicker/DateTimeRangePickerToolbar.d.ts +2 -3
- package/DateTimeRangePicker/DateTimeRangePickerToolbar.js +26 -28
- package/DateTimeRangePicker/shared.d.ts +2 -2
- package/DesktopDateRangePicker/DesktopDateRangePicker.js +9 -3
- package/DesktopDateRangePicker/DesktopDateRangePicker.types.d.ts +5 -0
- package/DesktopDateTimeRangePicker/DesktopDateTimeRangePicker.js +17 -14
- package/MobileDateRangePicker/MobileDateRangePicker.js +2 -2
- package/MobileDateTimeRangePicker/MobileDateTimeRangePicker.js +15 -8
- package/SingleInputDateRangeField/useSingleInputDateRangeField.d.ts +1 -1
- package/SingleInputDateRangeField/useSingleInputDateRangeField.js +13 -14
- package/SingleInputDateTimeRangeField/useSingleInputDateTimeRangeField.d.ts +1 -1
- package/SingleInputDateTimeRangeField/useSingleInputDateTimeRangeField.js +13 -14
- package/SingleInputTimeRangeField/useSingleInputTimeRangeField.d.ts +1 -1
- package/SingleInputTimeRangeField/useSingleInputTimeRangeField.js +13 -14
- package/dateRangeViewRenderers/dateRangeViewRenderers.d.ts +2 -2
- package/dateRangeViewRenderers/dateRangeViewRenderers.js +0 -6
- package/hooks/index.d.ts +1 -0
- package/hooks/index.js +1 -0
- package/hooks/package.json +6 -0
- package/hooks/usePickerRangePositionContext.d.ts +7 -0
- package/hooks/usePickerRangePositionContext.js +15 -0
- package/index.d.ts +2 -0
- package/index.js +4 -2
- package/internals/hooks/models/useRangePicker.d.ts +2 -2
- package/internals/hooks/useDesktopRangePicker/useDesktopRangePicker.js +26 -43
- package/internals/hooks/useDesktopRangePicker/useDesktopRangePicker.types.d.ts +3 -5
- package/internals/hooks/useEnrichedRangePickerFieldProps.d.ts +5 -5
- package/internals/hooks/useEnrichedRangePickerFieldProps.js +3 -3
- package/internals/hooks/useMobileRangePicker/useMobileRangePicker.js +21 -35
- package/internals/hooks/useMobileRangePicker/useMobileRangePicker.types.d.ts +3 -5
- package/internals/hooks/useMultiInputFieldSelectedSections.d.ts +10 -12
- package/internals/hooks/useMultiInputRangeField/useMultiInputDateRangeField.d.ts +1 -1
- package/internals/hooks/useMultiInputRangeField/useMultiInputDateRangeField.js +11 -6
- package/internals/hooks/useMultiInputRangeField/useMultiInputDateTimeRangeField.d.ts +2 -2
- package/internals/hooks/useMultiInputRangeField/useMultiInputDateTimeRangeField.js +12 -7
- package/internals/hooks/useMultiInputRangeField/useMultiInputTimeRangeField.d.ts +2 -2
- package/internals/hooks/useMultiInputRangeField/useMultiInputTimeRangeField.js +13 -8
- package/internals/hooks/useNullablePickerRangePositionContext.d.ts +5 -0
- package/internals/hooks/useNullablePickerRangePositionContext.js +10 -0
- package/internals/hooks/useRangePosition.d.ts +1 -1
- package/internals/hooks/useStaticRangePicker/useStaticRangePicker.js +14 -24
- package/internals/hooks/useStaticRangePicker/useStaticRangePicker.types.d.ts +2 -2
- package/internals/utils/date-range-manager.js +2 -1
- package/internals/utils/releaseInfo.js +1 -1
- package/internals/utils/valueManagers.js +7 -7
- package/managers/index.d.ts +6 -0
- package/managers/index.js +3 -0
- package/managers/package.json +6 -0
- package/managers/useDateRangeManager.d.ts +15 -0
- package/managers/useDateRangeManager.js +31 -0
- package/managers/useDateTimeRangeManager.d.ts +15 -0
- package/managers/useDateTimeRangeManager.js +31 -0
- package/managers/useTimeRangeManager.d.ts +15 -0
- package/managers/useTimeRangeManager.js +29 -0
- package/models/range.d.ts +0 -1
- package/modern/{AdapterDateFnsJalaliV3 → AdapterDateFnsJalaliV2}/index.js +1 -1
- package/modern/{AdapterDateFnsV3 → AdapterDateFnsV2}/index.js +1 -1
- package/modern/DateRangeCalendar/DateRangeCalendar.js +9 -7
- package/modern/DateRangePicker/DateRangePicker.js +1 -1
- package/modern/DateRangePicker/DateRangePickerToolbar.js +25 -17
- package/modern/DateTimeRangePicker/DateTimeRangePicker.js +2 -2
- package/modern/DateTimeRangePicker/DateTimeRangePickerTabs.js +8 -7
- package/modern/DateTimeRangePicker/DateTimeRangePickerTimeWrapper.js +7 -5
- package/modern/DateTimeRangePicker/DateTimeRangePickerToolbar.js +26 -28
- package/modern/DesktopDateRangePicker/DesktopDateRangePicker.js +9 -3
- package/modern/DesktopDateTimeRangePicker/DesktopDateTimeRangePicker.js +17 -14
- package/modern/MobileDateRangePicker/MobileDateRangePicker.js +2 -2
- package/modern/MobileDateTimeRangePicker/MobileDateTimeRangePicker.js +15 -8
- package/modern/SingleInputDateRangeField/useSingleInputDateRangeField.js +13 -14
- package/modern/SingleInputDateTimeRangeField/useSingleInputDateTimeRangeField.js +13 -14
- package/modern/SingleInputTimeRangeField/useSingleInputTimeRangeField.js +13 -14
- package/modern/dateRangeViewRenderers/dateRangeViewRenderers.js +0 -6
- package/modern/hooks/index.js +1 -0
- package/modern/hooks/usePickerRangePositionContext.js +15 -0
- package/modern/index.js +4 -2
- package/modern/internals/hooks/useDesktopRangePicker/useDesktopRangePicker.js +26 -43
- package/modern/internals/hooks/useEnrichedRangePickerFieldProps.js +3 -3
- package/modern/internals/hooks/useMobileRangePicker/useMobileRangePicker.js +21 -35
- package/modern/internals/hooks/useMultiInputRangeField/useMultiInputDateRangeField.js +11 -6
- package/modern/internals/hooks/useMultiInputRangeField/useMultiInputDateTimeRangeField.js +12 -7
- package/modern/internals/hooks/useMultiInputRangeField/useMultiInputTimeRangeField.js +13 -8
- package/modern/internals/hooks/useNullablePickerRangePositionContext.js +10 -0
- package/modern/internals/hooks/useStaticRangePicker/useStaticRangePicker.js +14 -24
- package/modern/internals/utils/date-range-manager.js +2 -1
- package/modern/internals/utils/releaseInfo.js +1 -1
- package/modern/internals/utils/valueManagers.js +7 -7
- package/modern/managers/index.js +3 -0
- package/modern/managers/useDateRangeManager.js +31 -0
- package/modern/managers/useDateTimeRangeManager.js +31 -0
- package/modern/managers/useTimeRangeManager.js +29 -0
- package/node/{AdapterDateFnsJalaliV3 → AdapterDateFnsJalaliV2}/index.js +1 -1
- package/node/{AdapterDateFnsV3 → AdapterDateFnsV2}/index.js +1 -1
- package/node/DateRangeCalendar/DateRangeCalendar.js +9 -7
- package/node/DateRangePicker/DateRangePicker.js +1 -1
- package/node/DateRangePicker/DateRangePickerToolbar.js +24 -16
- package/node/DateTimeRangePicker/DateTimeRangePicker.js +2 -2
- package/node/DateTimeRangePicker/DateTimeRangePickerTabs.js +8 -7
- package/node/DateTimeRangePicker/DateTimeRangePickerTimeWrapper.js +7 -5
- package/node/DateTimeRangePicker/DateTimeRangePickerToolbar.js +26 -28
- package/node/DesktopDateRangePicker/DesktopDateRangePicker.js +9 -3
- package/node/DesktopDateTimeRangePicker/DesktopDateTimeRangePicker.js +17 -14
- package/node/MobileDateRangePicker/MobileDateRangePicker.js +2 -2
- package/node/MobileDateTimeRangePicker/MobileDateTimeRangePicker.js +15 -8
- package/node/SingleInputDateRangeField/useSingleInputDateRangeField.js +12 -14
- package/node/SingleInputDateTimeRangeField/useSingleInputDateTimeRangeField.js +12 -14
- package/node/SingleInputTimeRangeField/useSingleInputTimeRangeField.js +12 -14
- package/node/dateRangeViewRenderers/dateRangeViewRenderers.js +0 -6
- package/node/hooks/index.js +12 -0
- package/node/hooks/usePickerRangePositionContext.js +22 -0
- package/node/index.js +23 -1
- package/node/internals/hooks/useDesktopRangePicker/useDesktopRangePicker.js +26 -43
- package/node/internals/hooks/useEnrichedRangePickerFieldProps.js +3 -3
- package/node/internals/hooks/useMobileRangePicker/useMobileRangePicker.js +21 -35
- package/node/internals/hooks/useMultiInputRangeField/useMultiInputDateRangeField.js +10 -5
- package/node/internals/hooks/useMultiInputRangeField/useMultiInputDateTimeRangeField.js +11 -6
- package/node/internals/hooks/useMultiInputRangeField/useMultiInputTimeRangeField.js +12 -7
- package/node/internals/hooks/useNullablePickerRangePositionContext.js +16 -0
- package/node/internals/hooks/useStaticRangePicker/useStaticRangePicker.js +14 -24
- package/node/internals/utils/date-range-manager.js +2 -1
- package/node/internals/utils/releaseInfo.js +1 -1
- package/node/internals/utils/valueManagers.js +7 -7
- package/node/managers/index.js +26 -0
- package/node/managers/useDateRangeManager.js +38 -0
- package/node/managers/useDateTimeRangeManager.js +38 -0
- package/node/managers/useTimeRangeManager.js +36 -0
- package/package.json +5 -5
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
4
4
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
5
|
-
const _excluded = ["
|
|
5
|
+
const _excluded = ["className", "classes", "classes", "ampm", "hidden", "toolbarFormat", "toolbarPlaceholder", "titleId", "sx"];
|
|
6
6
|
import * as React from 'react';
|
|
7
7
|
import PropTypes from 'prop-types';
|
|
8
8
|
import clsx from 'clsx';
|
|
@@ -13,6 +13,7 @@ import { usePickerContext, usePickerTranslations } from '@mui/x-date-pickers/hoo
|
|
|
13
13
|
import { DateTimePickerToolbar } from '@mui/x-date-pickers/DateTimePicker';
|
|
14
14
|
import { getDateTimeRangePickerToolbarUtilityClass } from "./dateTimeRangePickerToolbarClasses.js";
|
|
15
15
|
import { calculateRangeChange } from "../internals/utils/date-range-manager.js";
|
|
16
|
+
import { usePickerRangePositionContext } from "../hooks/index.js";
|
|
16
17
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
17
18
|
const useUtilityClasses = classes => {
|
|
18
19
|
const slots = {
|
|
@@ -50,13 +51,8 @@ const DateTimeRangePickerToolbar = /*#__PURE__*/React.forwardRef(function DateTi
|
|
|
50
51
|
});
|
|
51
52
|
const utils = useUtils();
|
|
52
53
|
const {
|
|
53
|
-
value: [start, end],
|
|
54
|
-
rangePosition,
|
|
55
|
-
onRangePositionChange,
|
|
56
54
|
className,
|
|
57
55
|
classes: classesProp,
|
|
58
|
-
onChange,
|
|
59
|
-
isLandscape,
|
|
60
56
|
ampm,
|
|
61
57
|
hidden,
|
|
62
58
|
toolbarFormat,
|
|
@@ -66,17 +62,22 @@ const DateTimeRangePickerToolbar = /*#__PURE__*/React.forwardRef(function DateTi
|
|
|
66
62
|
} = props,
|
|
67
63
|
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
68
64
|
const {
|
|
65
|
+
value,
|
|
66
|
+
setValue,
|
|
69
67
|
disabled,
|
|
70
68
|
readOnly,
|
|
71
69
|
view,
|
|
72
|
-
|
|
70
|
+
setView,
|
|
73
71
|
views
|
|
74
72
|
} = usePickerContext();
|
|
75
73
|
const translations = usePickerTranslations();
|
|
76
74
|
const ownerState = useToolbarOwnerState();
|
|
75
|
+
const {
|
|
76
|
+
rangePosition,
|
|
77
|
+
onRangePositionChange
|
|
78
|
+
} = usePickerRangePositionContext();
|
|
77
79
|
const classes = useUtilityClasses(classesProp);
|
|
78
80
|
const commonToolbarProps = {
|
|
79
|
-
isLandscape,
|
|
80
81
|
views,
|
|
81
82
|
ampm,
|
|
82
83
|
disabled,
|
|
@@ -85,20 +86,22 @@ const DateTimeRangePickerToolbar = /*#__PURE__*/React.forwardRef(function DateTi
|
|
|
85
86
|
toolbarFormat,
|
|
86
87
|
toolbarPlaceholder
|
|
87
88
|
};
|
|
88
|
-
const
|
|
89
|
+
const wrappedSetValue = React.useCallback(newDate => {
|
|
89
90
|
const {
|
|
90
91
|
nextSelection,
|
|
91
92
|
newRange
|
|
92
93
|
} = calculateRangeChange({
|
|
93
94
|
newDate,
|
|
94
95
|
utils,
|
|
95
|
-
range:
|
|
96
|
+
range: value,
|
|
96
97
|
rangePosition,
|
|
97
98
|
allowRangeFlip: true
|
|
98
99
|
});
|
|
99
100
|
onRangePositionChange(nextSelection);
|
|
100
|
-
|
|
101
|
-
|
|
101
|
+
setValue(newRange, {
|
|
102
|
+
changeImportance: 'set'
|
|
103
|
+
});
|
|
104
|
+
}, [setValue, onRangePositionChange, value, rangePosition, utils]);
|
|
102
105
|
const startOverrides = React.useMemo(() => {
|
|
103
106
|
const handleStartRangeViewChange = newView => {
|
|
104
107
|
if (newView === 'year' || newView === 'month') {
|
|
@@ -107,14 +110,16 @@ const DateTimeRangePickerToolbar = /*#__PURE__*/React.forwardRef(function DateTi
|
|
|
107
110
|
if (rangePosition !== 'start') {
|
|
108
111
|
onRangePositionChange('start');
|
|
109
112
|
}
|
|
110
|
-
|
|
113
|
+
setView(newView);
|
|
111
114
|
};
|
|
112
115
|
return {
|
|
116
|
+
value: value[0],
|
|
117
|
+
setValue: wrappedSetValue,
|
|
113
118
|
forceDesktopVariant: true,
|
|
114
|
-
|
|
119
|
+
setView: handleStartRangeViewChange,
|
|
115
120
|
view: rangePosition === 'start' ? view : null
|
|
116
121
|
};
|
|
117
|
-
}, [rangePosition, view, onRangePositionChange,
|
|
122
|
+
}, [value, wrappedSetValue, rangePosition, view, onRangePositionChange, setView]);
|
|
118
123
|
const endOverrides = React.useMemo(() => {
|
|
119
124
|
const handleEndRangeViewChange = newView => {
|
|
120
125
|
if (newView === 'year' || newView === 'month') {
|
|
@@ -123,14 +128,16 @@ const DateTimeRangePickerToolbar = /*#__PURE__*/React.forwardRef(function DateTi
|
|
|
123
128
|
if (rangePosition !== 'end') {
|
|
124
129
|
onRangePositionChange('end');
|
|
125
130
|
}
|
|
126
|
-
|
|
131
|
+
setView(newView);
|
|
127
132
|
};
|
|
128
133
|
return {
|
|
134
|
+
value: value[1],
|
|
135
|
+
setValue: wrappedSetValue,
|
|
129
136
|
forceDesktopVariant: true,
|
|
130
|
-
|
|
137
|
+
setView: handleEndRangeViewChange,
|
|
131
138
|
view: rangePosition === 'end' ? view : null
|
|
132
139
|
};
|
|
133
|
-
}, [rangePosition, view, onRangePositionChange,
|
|
140
|
+
}, [value, wrappedSetValue, rangePosition, view, onRangePositionChange, setView]);
|
|
134
141
|
if (hidden) {
|
|
135
142
|
return null;
|
|
136
143
|
}
|
|
@@ -143,21 +150,17 @@ const DateTimeRangePickerToolbar = /*#__PURE__*/React.forwardRef(function DateTi
|
|
|
143
150
|
children: [/*#__PURE__*/_jsx(DateTimePickerToolbarOverrideContext.Provider, {
|
|
144
151
|
value: startOverrides,
|
|
145
152
|
children: /*#__PURE__*/_jsx(DateTimeRangePickerToolbarStart, _extends({
|
|
146
|
-
value: start,
|
|
147
153
|
toolbarTitle: translations.start,
|
|
148
154
|
ownerState: ownerState,
|
|
149
155
|
className: classes.startToolbar,
|
|
150
|
-
onChange: handleOnChange,
|
|
151
156
|
titleId: titleId ? `${titleId}-start-toolbar` : undefined
|
|
152
157
|
}, commonToolbarProps))
|
|
153
158
|
}), /*#__PURE__*/_jsx(DateTimePickerToolbarOverrideContext.Provider, {
|
|
154
159
|
value: endOverrides,
|
|
155
160
|
children: /*#__PURE__*/_jsx(DateTimeRangePickerToolbarEnd, _extends({
|
|
156
|
-
value: end,
|
|
157
161
|
toolbarTitle: translations.end,
|
|
158
162
|
ownerState: ownerState,
|
|
159
163
|
className: classes.endToolbar,
|
|
160
|
-
onChange: handleOnChange,
|
|
161
164
|
titleId: titleId ? `${titleId}-end-toolbar` : undefined
|
|
162
165
|
}, commonToolbarProps))
|
|
163
166
|
})]
|
|
@@ -179,10 +182,6 @@ process.env.NODE_ENV !== "production" ? DateTimeRangePickerToolbar.propTypes = {
|
|
|
179
182
|
* @default `true` for Desktop, `false` for Mobile.
|
|
180
183
|
*/
|
|
181
184
|
hidden: PropTypes.bool,
|
|
182
|
-
isLandscape: PropTypes.bool.isRequired,
|
|
183
|
-
onChange: PropTypes.func.isRequired,
|
|
184
|
-
onRangePositionChange: PropTypes.func.isRequired,
|
|
185
|
-
rangePosition: PropTypes.oneOf(['end', 'start']).isRequired,
|
|
186
185
|
/**
|
|
187
186
|
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
188
187
|
*/
|
|
@@ -196,7 +195,6 @@ process.env.NODE_ENV !== "production" ? DateTimeRangePickerToolbar.propTypes = {
|
|
|
196
195
|
* Toolbar value placeholder—it is displayed when the value is empty.
|
|
197
196
|
* @default "––"
|
|
198
197
|
*/
|
|
199
|
-
toolbarPlaceholder: PropTypes.node
|
|
200
|
-
value: PropTypes.arrayOf(PropTypes.object).isRequired
|
|
198
|
+
toolbarPlaceholder: PropTypes.node
|
|
201
199
|
} : void 0;
|
|
202
200
|
export { DateTimeRangePickerToolbar };
|
|
@@ -13,6 +13,8 @@ import { renderDateRangeViewCalendar } from "../dateRangeViewRenderers/index.js"
|
|
|
13
13
|
import { MultiInputDateRangeField } from "../MultiInputDateRangeField/index.js";
|
|
14
14
|
import { useDesktopRangePicker } from "../internals/hooks/useDesktopRangePicker/index.js";
|
|
15
15
|
import { validateDateRange } from "../validation/index.js";
|
|
16
|
+
const emptyActions = [];
|
|
17
|
+
|
|
16
18
|
/**
|
|
17
19
|
* Demos:
|
|
18
20
|
*
|
|
@@ -32,6 +34,7 @@ const DesktopDateRangePicker = /*#__PURE__*/React.forwardRef(function DesktopDat
|
|
|
32
34
|
day: renderDateRangeViewCalendar
|
|
33
35
|
}, defaultizedProps.viewRenderers);
|
|
34
36
|
const props = _extends({}, defaultizedProps, {
|
|
37
|
+
closeOnSelect: defaultizedProps.closeOnSelect ?? true,
|
|
35
38
|
viewRenderers,
|
|
36
39
|
format: utils.formats.keyboardDate,
|
|
37
40
|
calendars: defaultizedProps.calendars ?? 2,
|
|
@@ -46,7 +49,10 @@ const DesktopDateRangePicker = /*#__PURE__*/React.forwardRef(function DesktopDat
|
|
|
46
49
|
}),
|
|
47
50
|
toolbar: _extends({
|
|
48
51
|
hidden: true
|
|
49
|
-
}, defaultizedProps.slotProps?.toolbar)
|
|
52
|
+
}, defaultizedProps.slotProps?.toolbar),
|
|
53
|
+
actionBar: ownerState => _extends({
|
|
54
|
+
actions: emptyActions
|
|
55
|
+
}, resolveComponentProps(defaultizedProps.slotProps?.actionBar, ownerState))
|
|
50
56
|
})
|
|
51
57
|
});
|
|
52
58
|
const {
|
|
@@ -78,8 +84,8 @@ DesktopDateRangePicker.propTypes = {
|
|
|
78
84
|
calendars: PropTypes.oneOf([1, 2, 3]),
|
|
79
85
|
className: PropTypes.string,
|
|
80
86
|
/**
|
|
81
|
-
* If `true`, the
|
|
82
|
-
* @default
|
|
87
|
+
* If `true`, the Picker will close after submitting the full date.
|
|
88
|
+
* @default true
|
|
83
89
|
*/
|
|
84
90
|
closeOnSelect: PropTypes.bool,
|
|
85
91
|
/**
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
4
4
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
5
|
-
const _excluded = ["openTo"
|
|
5
|
+
const _excluded = ["openTo"];
|
|
6
6
|
import * as React from 'react';
|
|
7
7
|
import PropTypes from 'prop-types';
|
|
8
8
|
import { isDatePickerView, isInternalTimeView, resolveDateTimeFormat, useUtils } from '@mui/x-date-pickers/internals';
|
|
@@ -22,15 +22,22 @@ import { useDateTimeRangePickerDefaultizedProps } from "../DateTimeRangePicker/s
|
|
|
22
22
|
import { MultiInputDateTimeRangeField } from "../MultiInputDateTimeRangeField/index.js";
|
|
23
23
|
import { DateTimeRangePickerTimeWrapper } from "../DateTimeRangePicker/DateTimeRangePickerTimeWrapper.js";
|
|
24
24
|
import { RANGE_VIEW_HEIGHT } from "../internals/constants/dimensions.js";
|
|
25
|
+
import { usePickerRangePositionContext } from "../hooks/index.js";
|
|
25
26
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
26
|
-
const rendererInterceptor = function
|
|
27
|
+
const rendererInterceptor = function RendererInterceptor(props) {
|
|
27
28
|
const {
|
|
28
|
-
|
|
29
|
-
|
|
29
|
+
viewRenderers,
|
|
30
|
+
popperView,
|
|
31
|
+
rendererProps
|
|
32
|
+
} = props;
|
|
33
|
+
const {
|
|
34
|
+
openTo
|
|
30
35
|
} = rendererProps,
|
|
31
36
|
otherProps = _objectWithoutPropertiesLoose(rendererProps, _excluded);
|
|
37
|
+
const {
|
|
38
|
+
rangePosition
|
|
39
|
+
} = usePickerRangePositionContext();
|
|
32
40
|
const finalProps = _extends({}, otherProps, {
|
|
33
|
-
rangePosition,
|
|
34
41
|
focusedView: null,
|
|
35
42
|
sx: [{
|
|
36
43
|
[`&.${multiSectionDigitalClockClasses.root}`]: {
|
|
@@ -43,7 +50,7 @@ const rendererInterceptor = function rendererInterceptor(inViewRenderers, popper
|
|
|
43
50
|
});
|
|
44
51
|
const isTimeViewActive = isInternalTimeView(popperView);
|
|
45
52
|
return /*#__PURE__*/_jsxs(React.Fragment, {
|
|
46
|
-
children: [
|
|
53
|
+
children: [viewRenderers.day?.(_extends({}, rendererProps, {
|
|
47
54
|
availableRangePositions: [rangePosition],
|
|
48
55
|
view: !isTimeViewActive ? popperView : 'day',
|
|
49
56
|
views: rendererProps.views.filter(isDatePickerView),
|
|
@@ -59,7 +66,7 @@ const rendererInterceptor = function rendererInterceptor(inViewRenderers, popper
|
|
|
59
66
|
view: isTimeViewActive ? popperView : 'hours',
|
|
60
67
|
views: finalProps.views.filter(isInternalTimeView),
|
|
61
68
|
openTo: isInternalTimeView(openTo) ? openTo : 'hours',
|
|
62
|
-
viewRenderer:
|
|
69
|
+
viewRenderer: viewRenderers[isTimeViewActive ? popperView : 'hours'],
|
|
63
70
|
sx: [{
|
|
64
71
|
gridColumn: 3
|
|
65
72
|
}, ...finalProps.sx]
|
|
@@ -92,7 +99,6 @@ const DesktopDateTimeRangePicker = /*#__PURE__*/React.forwardRef(function Deskto
|
|
|
92
99
|
// Need to avoid adding the `meridiem` view when unexpected renderer is specified
|
|
93
100
|
const shouldHoursRendererContainMeridiemView = viewRenderers.hours?.name === renderMultiSectionDigitalClockTimeView.name;
|
|
94
101
|
const views = !shouldHoursRendererContainMeridiemView ? defaultizedProps.views.filter(view => view !== 'meridiem') : defaultizedProps.views;
|
|
95
|
-
const actionBarActions = defaultizedProps.shouldRenderTimeInASingleColumn ? [] : ['accept'];
|
|
96
102
|
const props = _extends({}, defaultizedProps, {
|
|
97
103
|
views,
|
|
98
104
|
viewRenderers,
|
|
@@ -113,10 +119,7 @@ const DesktopDateTimeRangePicker = /*#__PURE__*/React.forwardRef(function Deskto
|
|
|
113
119
|
}, defaultizedProps.slotProps?.tabs),
|
|
114
120
|
toolbar: _extends({
|
|
115
121
|
hidden: true
|
|
116
|
-
}, defaultizedProps.slotProps?.toolbar)
|
|
117
|
-
actionBar: ownerState => _extends({
|
|
118
|
-
actions: actionBarActions
|
|
119
|
-
}, resolveComponentProps(defaultizedProps.slotProps?.actionBar, ownerState))
|
|
122
|
+
}, defaultizedProps.slotProps?.toolbar)
|
|
120
123
|
})
|
|
121
124
|
});
|
|
122
125
|
const {
|
|
@@ -154,8 +157,8 @@ DesktopDateTimeRangePicker.propTypes = {
|
|
|
154
157
|
calendars: PropTypes.oneOf([1, 2, 3]),
|
|
155
158
|
className: PropTypes.string,
|
|
156
159
|
/**
|
|
157
|
-
* If `true`, the
|
|
158
|
-
* @default
|
|
160
|
+
* If `true`, the Picker will close after submitting the full date.
|
|
161
|
+
* @default false
|
|
159
162
|
*/
|
|
160
163
|
closeOnSelect: PropTypes.bool,
|
|
161
164
|
/**
|
|
@@ -74,8 +74,8 @@ MobileDateRangePicker.propTypes = {
|
|
|
74
74
|
autoFocus: PropTypes.bool,
|
|
75
75
|
className: PropTypes.string,
|
|
76
76
|
/**
|
|
77
|
-
* If `true`, the
|
|
78
|
-
* @default
|
|
77
|
+
* If `true`, the Picker will close after submitting the full date.
|
|
78
|
+
* @default false
|
|
79
79
|
*/
|
|
80
80
|
closeOnSelect: PropTypes.bool,
|
|
81
81
|
/**
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
4
4
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
5
|
-
const _excluded = ["view", "openTo"
|
|
5
|
+
const _excluded = ["view", "openTo"];
|
|
6
6
|
import * as React from 'react';
|
|
7
7
|
import PropTypes from 'prop-types';
|
|
8
8
|
import { refType } from '@mui/utils';
|
|
@@ -20,16 +20,23 @@ import { useDateTimeRangePickerDefaultizedProps } from "../DateTimeRangePicker/s
|
|
|
20
20
|
import { MultiInputDateTimeRangeField } from "../MultiInputDateTimeRangeField/index.js";
|
|
21
21
|
import { DateTimeRangePickerTimeWrapper } from "../DateTimeRangePicker/DateTimeRangePickerTimeWrapper.js";
|
|
22
22
|
import { RANGE_VIEW_HEIGHT } from "../internals/constants/dimensions.js";
|
|
23
|
+
import { usePickerRangePositionContext } from "../hooks/index.js";
|
|
23
24
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
24
|
-
const rendererInterceptor = function
|
|
25
|
+
const rendererInterceptor = function RendererInterceptor(props) {
|
|
26
|
+
const {
|
|
27
|
+
viewRenderers,
|
|
28
|
+
popperView,
|
|
29
|
+
rendererProps
|
|
30
|
+
} = props;
|
|
31
|
+
const {
|
|
32
|
+
rangePosition
|
|
33
|
+
} = usePickerRangePositionContext();
|
|
25
34
|
const {
|
|
26
35
|
view,
|
|
27
|
-
openTo
|
|
28
|
-
rangePosition
|
|
36
|
+
openTo
|
|
29
37
|
} = rendererProps,
|
|
30
38
|
otherRendererProps = _objectWithoutPropertiesLoose(rendererProps, _excluded);
|
|
31
39
|
const finalProps = _extends({}, otherRendererProps, {
|
|
32
|
-
rangePosition,
|
|
33
40
|
focusedView: null,
|
|
34
41
|
sx: [{
|
|
35
42
|
width: DIALOG_WIDTH,
|
|
@@ -53,7 +60,7 @@ const rendererInterceptor = function rendererInterceptor(inViewRenderers, popper
|
|
|
53
60
|
}]
|
|
54
61
|
});
|
|
55
62
|
const isTimeView = isInternalTimeView(popperView);
|
|
56
|
-
const viewRenderer =
|
|
63
|
+
const viewRenderer = viewRenderers[popperView];
|
|
57
64
|
if (!viewRenderer) {
|
|
58
65
|
return null;
|
|
59
66
|
}
|
|
@@ -148,8 +155,8 @@ MobileDateTimeRangePicker.propTypes = {
|
|
|
148
155
|
autoFocus: PropTypes.bool,
|
|
149
156
|
className: PropTypes.string,
|
|
150
157
|
/**
|
|
151
|
-
* If `true`, the
|
|
152
|
-
* @default
|
|
158
|
+
* If `true`, the Picker will close after submitting the full date.
|
|
159
|
+
* @default false
|
|
153
160
|
*/
|
|
154
161
|
closeOnSelect: PropTypes.bool,
|
|
155
162
|
/**
|
|
@@ -1,25 +1,24 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import
|
|
4
|
-
import { useField, useDefaultizedDateField } from '@mui/x-date-pickers/internals';
|
|
3
|
+
import { useField, useFieldInternalPropsWithDefaults } from '@mui/x-date-pickers/internals';
|
|
5
4
|
import { useSplitFieldProps } from '@mui/x-date-pickers/hooks';
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
const props = useDefaultizedDateField(inProps);
|
|
5
|
+
import { useDateRangeManager } from "../managers/index.js";
|
|
6
|
+
export const useSingleInputDateRangeField = props => {
|
|
7
|
+
const manager = useDateRangeManager(props);
|
|
10
8
|
const {
|
|
11
9
|
forwardedProps,
|
|
12
10
|
internalProps
|
|
13
11
|
} = useSplitFieldProps(props, 'date');
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
|
|
12
|
+
const internalPropsWithDefaults = useFieldInternalPropsWithDefaults({
|
|
13
|
+
manager,
|
|
14
|
+
internalProps
|
|
15
|
+
});
|
|
17
16
|
return useField({
|
|
18
17
|
forwardedProps,
|
|
19
|
-
internalProps,
|
|
20
|
-
valueManager:
|
|
21
|
-
fieldValueManager,
|
|
22
|
-
validator:
|
|
23
|
-
valueType:
|
|
18
|
+
internalProps: internalPropsWithDefaults,
|
|
19
|
+
valueManager: manager.internal_valueManager,
|
|
20
|
+
fieldValueManager: manager.internal_fieldValueManager,
|
|
21
|
+
validator: manager.validator,
|
|
22
|
+
valueType: manager.valueType
|
|
24
23
|
});
|
|
25
24
|
};
|
|
@@ -1,25 +1,24 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import
|
|
4
|
-
import { useField, useDefaultizedDateTimeField } from '@mui/x-date-pickers/internals';
|
|
3
|
+
import { useField, useFieldInternalPropsWithDefaults } from '@mui/x-date-pickers/internals';
|
|
5
4
|
import { useSplitFieldProps } from '@mui/x-date-pickers/hooks';
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
const props = useDefaultizedDateTimeField(inProps);
|
|
5
|
+
import { useDateTimeRangeManager } from "../managers/index.js";
|
|
6
|
+
export const useSingleInputDateTimeRangeField = props => {
|
|
7
|
+
const manager = useDateTimeRangeManager(props);
|
|
10
8
|
const {
|
|
11
9
|
forwardedProps,
|
|
12
10
|
internalProps
|
|
13
11
|
} = useSplitFieldProps(props, 'date-time');
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
|
|
12
|
+
const internalPropsWithDefaults = useFieldInternalPropsWithDefaults({
|
|
13
|
+
manager,
|
|
14
|
+
internalProps
|
|
15
|
+
});
|
|
17
16
|
return useField({
|
|
18
17
|
forwardedProps,
|
|
19
|
-
internalProps,
|
|
20
|
-
valueManager:
|
|
21
|
-
fieldValueManager,
|
|
22
|
-
validator:
|
|
23
|
-
valueType:
|
|
18
|
+
internalProps: internalPropsWithDefaults,
|
|
19
|
+
valueManager: manager.internal_valueManager,
|
|
20
|
+
fieldValueManager: manager.internal_fieldValueManager,
|
|
21
|
+
validator: manager.validator,
|
|
22
|
+
valueType: manager.valueType
|
|
24
23
|
});
|
|
25
24
|
};
|
|
@@ -1,25 +1,24 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import
|
|
4
|
-
import { useField, useDefaultizedTimeField } from '@mui/x-date-pickers/internals';
|
|
3
|
+
import { useField, useFieldInternalPropsWithDefaults } from '@mui/x-date-pickers/internals';
|
|
5
4
|
import { useSplitFieldProps } from '@mui/x-date-pickers/hooks';
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
const props = useDefaultizedTimeField(inProps);
|
|
5
|
+
import { useTimeRangeManager } from "../managers/index.js";
|
|
6
|
+
export const useSingleInputTimeRangeField = props => {
|
|
7
|
+
const manager = useTimeRangeManager(props);
|
|
10
8
|
const {
|
|
11
9
|
forwardedProps,
|
|
12
10
|
internalProps
|
|
13
11
|
} = useSplitFieldProps(props, 'time');
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
|
|
12
|
+
const internalPropsWithDefaults = useFieldInternalPropsWithDefaults({
|
|
13
|
+
manager,
|
|
14
|
+
internalProps
|
|
15
|
+
});
|
|
17
16
|
return useField({
|
|
18
17
|
forwardedProps,
|
|
19
|
-
internalProps,
|
|
20
|
-
valueManager:
|
|
21
|
-
fieldValueManager,
|
|
22
|
-
validator:
|
|
23
|
-
valueType:
|
|
18
|
+
internalProps: internalPropsWithDefaults,
|
|
19
|
+
valueManager: manager.internal_valueManager,
|
|
20
|
+
fieldValueManager: manager.internal_fieldValueManager,
|
|
21
|
+
validator: manager.validator,
|
|
22
|
+
valueType: manager.valueType
|
|
24
23
|
});
|
|
25
24
|
};
|
|
@@ -19,9 +19,6 @@ export const renderDateRangeViewCalendar = ({
|
|
|
19
19
|
shouldDisableDate,
|
|
20
20
|
reduceAnimations,
|
|
21
21
|
onMonthChange,
|
|
22
|
-
rangePosition,
|
|
23
|
-
defaultRangePosition,
|
|
24
|
-
onRangePositionChange,
|
|
25
22
|
calendars,
|
|
26
23
|
currentMonthCalendarPosition,
|
|
27
24
|
slots,
|
|
@@ -58,9 +55,6 @@ export const renderDateRangeViewCalendar = ({
|
|
|
58
55
|
shouldDisableDate: shouldDisableDate,
|
|
59
56
|
reduceAnimations: reduceAnimations,
|
|
60
57
|
onMonthChange: onMonthChange,
|
|
61
|
-
rangePosition: rangePosition,
|
|
62
|
-
defaultRangePosition: defaultRangePosition,
|
|
63
|
-
onRangePositionChange: onRangePositionChange,
|
|
64
58
|
calendars: calendars,
|
|
65
59
|
currentMonthCalendarPosition: currentMonthCalendarPosition,
|
|
66
60
|
slots: slots,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { usePickerRangePositionContext } from "./usePickerRangePositionContext.js";
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
export const PickerRangePositionContext = /*#__PURE__*/React.createContext(null);
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Returns information about the range position of the picker that wraps the current component.
|
|
8
|
+
*/
|
|
9
|
+
export function usePickerRangePositionContext() {
|
|
10
|
+
const value = React.useContext(PickerRangePositionContext);
|
|
11
|
+
if (value == null) {
|
|
12
|
+
throw new Error(['MUI X: The `usePickerRangePositionContext` can only be called in components that are used inside a picker component'].join('\n'));
|
|
13
|
+
}
|
|
14
|
+
return value;
|
|
15
|
+
}
|
package/modern/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @mui/x-date-pickers-pro v8.0.0-alpha.
|
|
2
|
+
* @mui/x-date-pickers-pro v8.0.0-alpha.7
|
|
3
3
|
*
|
|
4
4
|
* @license MUI X Commercial
|
|
5
5
|
* This source code is licensed under the commercial license found in the
|
|
@@ -32,4 +32,6 @@ export * from "./MobileDateTimeRangePicker/index.js";
|
|
|
32
32
|
// View renderers
|
|
33
33
|
export * from "./dateRangeViewRenderers/index.js";
|
|
34
34
|
export * from "./models/index.js";
|
|
35
|
-
export * from "./
|
|
35
|
+
export * from "./hooks/index.js";
|
|
36
|
+
export * from "./validation/index.js";
|
|
37
|
+
export * from "./managers/index.js";
|
|
@@ -9,6 +9,7 @@ import { executeInTheNextEventLoopTick, getActiveElement, usePicker, PickersPopp
|
|
|
9
9
|
import { useEnrichedRangePickerFieldProps } from "../useEnrichedRangePickerFieldProps.js";
|
|
10
10
|
import { getReleaseInfo } from "../../utils/releaseInfo.js";
|
|
11
11
|
import { useRangePosition } from "../useRangePosition.js";
|
|
12
|
+
import { PickerRangePositionContext } from "../../../hooks/usePickerRangePositionContext.js";
|
|
12
13
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
14
|
const releaseInfo = getReleaseInfo();
|
|
14
15
|
export const useDesktopRangePicker = _ref => {
|
|
@@ -46,20 +47,16 @@ export const useDesktopRangePicker = _ref => {
|
|
|
46
47
|
const singleInputFieldRef = React.useRef(null);
|
|
47
48
|
const initialView = React.useRef(props.openTo ?? null);
|
|
48
49
|
const fieldType = slots.field.fieldType ?? 'multi-input';
|
|
49
|
-
const
|
|
50
|
-
rangePosition,
|
|
51
|
-
onRangePositionChange
|
|
52
|
-
} = useRangePosition(props, fieldType === 'single-input' ? singleInputFieldRef : undefined);
|
|
50
|
+
const rangePositionResponse = useRangePosition(props, fieldType === 'single-input' ? singleInputFieldRef : undefined);
|
|
53
51
|
let fieldRef;
|
|
54
52
|
if (fieldType === 'single-input') {
|
|
55
53
|
fieldRef = singleInputFieldRef;
|
|
56
|
-
} else if (rangePosition === 'start') {
|
|
54
|
+
} else if (rangePositionResponse.rangePosition === 'start') {
|
|
57
55
|
fieldRef = startFieldRef;
|
|
58
56
|
} else {
|
|
59
57
|
fieldRef = endFieldRef;
|
|
60
58
|
}
|
|
61
59
|
const {
|
|
62
|
-
layoutProps,
|
|
63
60
|
providerProps,
|
|
64
61
|
renderCurrentView,
|
|
65
62
|
shouldRestoreFocus,
|
|
@@ -70,11 +67,7 @@ export const useDesktopRangePicker = _ref => {
|
|
|
70
67
|
variant: 'desktop',
|
|
71
68
|
autoFocusView: false,
|
|
72
69
|
fieldRef,
|
|
73
|
-
localeText
|
|
74
|
-
additionalViewProps: {
|
|
75
|
-
rangePosition,
|
|
76
|
-
onRangePositionChange
|
|
77
|
-
}
|
|
70
|
+
localeText
|
|
78
71
|
}));
|
|
79
72
|
React.useEffect(() => {
|
|
80
73
|
if (providerProps.contextValue.view) {
|
|
@@ -121,7 +114,7 @@ export const useDesktopRangePicker = _ref => {
|
|
|
121
114
|
}),
|
|
122
115
|
ownerState
|
|
123
116
|
});
|
|
124
|
-
const enrichedFieldProps = useEnrichedRangePickerFieldProps({
|
|
117
|
+
const enrichedFieldProps = useEnrichedRangePickerFieldProps(_extends({
|
|
125
118
|
variant: 'desktop',
|
|
126
119
|
fieldType,
|
|
127
120
|
// These direct access to `providerProps` will go away once the range fields handle the picker opening
|
|
@@ -132,8 +125,6 @@ export const useDesktopRangePicker = _ref => {
|
|
|
132
125
|
label,
|
|
133
126
|
localeText,
|
|
134
127
|
onBlur: handleBlur,
|
|
135
|
-
rangePosition,
|
|
136
|
-
onRangePositionChange,
|
|
137
128
|
pickerSlotProps: slotProps,
|
|
138
129
|
pickerSlots: slots,
|
|
139
130
|
fieldProps,
|
|
@@ -142,37 +133,29 @@ export const useDesktopRangePicker = _ref => {
|
|
|
142
133
|
endFieldRef,
|
|
143
134
|
singleInputFieldRef,
|
|
144
135
|
currentView: providerProps.contextValue.view !== props.openTo ? providerProps.contextValue.view : undefined,
|
|
145
|
-
initialView: initialView.current ?? undefined
|
|
146
|
-
|
|
147
|
-
});
|
|
148
|
-
const slotPropsForLayout = _extends({}, slotProps, {
|
|
149
|
-
tabs: _extends({}, slotProps?.tabs, {
|
|
150
|
-
rangePosition,
|
|
151
|
-
onRangePositionChange
|
|
152
|
-
}),
|
|
153
|
-
toolbar: _extends({}, slotProps?.toolbar, {
|
|
154
|
-
rangePosition,
|
|
155
|
-
onRangePositionChange
|
|
156
|
-
})
|
|
157
|
-
});
|
|
136
|
+
initialView: initialView.current ?? undefined
|
|
137
|
+
}, rangePositionResponse));
|
|
158
138
|
const Layout = slots?.layout ?? PickersLayout;
|
|
159
|
-
const renderPicker = () => /*#__PURE__*/
|
|
160
|
-
children:
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
shouldRestoreFocus: shouldRestoreFocus,
|
|
169
|
-
reduceAnimations: reduceAnimations,
|
|
170
|
-
children: /*#__PURE__*/_jsx(Layout, _extends({}, layoutProps, slotProps?.layout, {
|
|
139
|
+
const renderPicker = () => /*#__PURE__*/_jsx(PickerProvider, _extends({}, providerProps, {
|
|
140
|
+
children: /*#__PURE__*/_jsxs(PickerRangePositionContext.Provider, {
|
|
141
|
+
value: rangePositionResponse,
|
|
142
|
+
children: [/*#__PURE__*/_jsx(Field, _extends({}, enrichedFieldProps)), /*#__PURE__*/_jsx(PickersPopper, {
|
|
143
|
+
role: "tooltip",
|
|
144
|
+
placement: "bottom-start",
|
|
145
|
+
containerRef: popperRef,
|
|
146
|
+
anchorEl: anchorRef.current,
|
|
147
|
+
onBlur: handleBlur,
|
|
171
148
|
slots: slots,
|
|
172
|
-
slotProps:
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
149
|
+
slotProps: slotProps,
|
|
150
|
+
shouldRestoreFocus: shouldRestoreFocus,
|
|
151
|
+
reduceAnimations: reduceAnimations,
|
|
152
|
+
children: /*#__PURE__*/_jsx(Layout, _extends({}, slotProps?.layout, {
|
|
153
|
+
slots: slots,
|
|
154
|
+
slotProps: slotProps,
|
|
155
|
+
children: renderCurrentView()
|
|
156
|
+
}))
|
|
157
|
+
})]
|
|
158
|
+
})
|
|
176
159
|
}));
|
|
177
160
|
return {
|
|
178
161
|
renderPicker
|