@mui/x-date-pickers-pro 6.0.0-alpha.12 → 6.0.0-alpha.13
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/CHANGELOG.md +132 -0
- package/DateRangeCalendar/DateRangeCalendar.js +7 -1
- package/DateRangeCalendar/DateRangeCalendar.types.d.ts +37 -37
- package/DateRangePicker/DateRangePicker.js +0 -5
- package/DateRangePicker/DateRangePickerView.d.ts +3 -3
- package/DateRangePicker/DateRangePickerView.js +6 -3
- package/DateRangePicker/DateRangePickerViewMobile.js +1 -1
- package/DateRangePickerDay/DateRangePickerDay.js +72 -1
- package/DesktopDateRangePicker/DesktopDateRangePicker.d.ts +5 -0
- package/DesktopDateRangePicker/DesktopDateRangePicker.js +0 -5
- package/DesktopNextDateRangePicker/DesktopNextDateRangePicker.js +22 -8
- package/MobileDateRangePicker/MobileDateRangePicker.d.ts +5 -0
- package/MobileDateRangePicker/MobileDateRangePicker.js +0 -5
- package/MobileNextDateRangePicker/MobileNextDateRangePicker.js +22 -8
- package/MultiInputDateRangeField/MultiInputDateRangeField.js +46 -13
- package/MultiInputDateRangeField/MultiInputDateRangeField.types.d.ts +2 -2
- package/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.js +45 -10
- package/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.types.d.ts +3 -3
- package/MultiInputTimeRangeField/MultiInputTimeRangeField.js +45 -10
- package/MultiInputTimeRangeField/MultiInputTimeRangeField.types.d.ts +2 -2
- package/NextDateRangePicker/NextDateRangePicker.js +16 -2
- package/NextDateRangePicker/shared.d.ts +9 -2
- package/SingleInputDateRangeField/SingleInputDateRangeField.js +110 -5
- package/SingleInputDateRangeField/SingleInputDateRangeField.types.d.ts +3 -2
- package/StaticDateRangePicker/StaticDateRangePicker.js +0 -5
- package/StaticNextDateRangePicker/StaticNextDateRangePicker.js +20 -6
- package/dateRangeViewRenderers/dateRangeViewRenderers.d.ts +13 -0
- package/{internal/utils/viewRenderers.js → dateRangeViewRenderers/dateRangeViewRenderers.js} +3 -4
- package/dateRangeViewRenderers/index.d.ts +2 -0
- package/dateRangeViewRenderers/index.js +1 -0
- package/dateRangeViewRenderers/package.json +6 -0
- package/index.d.ts +1 -0
- package/index.js +5 -2
- package/internal/hooks/useDesktopRangePicker/useDesktopRangePicker.d.ts +1 -1
- package/internal/hooks/useDesktopRangePicker/useDesktopRangePicker.js +2 -4
- package/internal/hooks/useDesktopRangePicker/useDesktopRangePicker.types.d.ts +4 -5
- package/internal/hooks/useMobileRangePicker/useMobileRangePicker.d.ts +1 -1
- package/internal/hooks/useMobileRangePicker/useMobileRangePicker.js +2 -4
- package/internal/hooks/useMobileRangePicker/useMobileRangePicker.types.d.ts +4 -5
- package/internal/hooks/useMultiInputRangeField/useMultiInputDateRangeField.js +7 -1
- package/internal/hooks/useMultiInputRangeField/useMultiInputDateTimeRangeField.js +7 -1
- package/internal/hooks/useMultiInputRangeField/useMultiInputRangeField.types.d.ts +2 -0
- package/internal/hooks/useMultiInputRangeField/useMultiInputTimeRangeField.js +7 -1
- package/internal/hooks/useRangePickerInputProps.d.ts +4 -6
- package/internal/hooks/useRangePickerInputProps.js +5 -6
- package/internal/hooks/useStaticRangePicker/useStaticRangePicker.d.ts +1 -1
- package/internal/hooks/useStaticRangePicker/useStaticRangePicker.js +0 -2
- package/internal/hooks/useStaticRangePicker/useStaticRangePicker.types.d.ts +2 -2
- package/internal/models/dateRange.d.ts +11 -1
- package/internal/models/dateTimeRange.d.ts +2 -2
- package/internal/models/timeRange.d.ts +2 -1
- package/internal/utils/date-fields-utils.d.ts +17 -1
- package/internal/utils/releaseInfo.js +1 -1
- package/internal/utils/valueManagers.js +15 -21
- package/legacy/DateRangeCalendar/DateRangeCalendar.js +7 -1
- package/legacy/DateRangePicker/DateRangePicker.js +0 -5
- package/legacy/DateRangePicker/DateRangePickerView.js +7 -2
- package/legacy/DateRangePicker/DateRangePickerViewMobile.js +1 -1
- package/legacy/DateRangePickerDay/DateRangePickerDay.js +72 -1
- package/legacy/DesktopDateRangePicker/DesktopDateRangePicker.js +0 -5
- package/legacy/DesktopNextDateRangePicker/DesktopNextDateRangePicker.js +22 -8
- package/legacy/MobileDateRangePicker/MobileDateRangePicker.js +0 -5
- package/legacy/MobileNextDateRangePicker/MobileNextDateRangePicker.js +22 -8
- package/legacy/MultiInputDateRangeField/MultiInputDateRangeField.js +44 -11
- package/legacy/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.js +43 -8
- package/legacy/MultiInputTimeRangeField/MultiInputTimeRangeField.js +43 -8
- package/legacy/NextDateRangePicker/NextDateRangePicker.js +16 -2
- package/legacy/SingleInputDateRangeField/SingleInputDateRangeField.js +109 -4
- package/legacy/StaticDateRangePicker/StaticDateRangePicker.js +0 -5
- package/legacy/StaticNextDateRangePicker/StaticNextDateRangePicker.js +20 -6
- package/legacy/{internal/utils/viewRenderers.js → dateRangeViewRenderers/dateRangeViewRenderers.js} +3 -4
- package/legacy/dateRangeViewRenderers/index.js +1 -0
- package/legacy/index.js +5 -2
- package/legacy/internal/hooks/useDesktopRangePicker/useDesktopRangePicker.js +2 -4
- package/legacy/internal/hooks/useMobileRangePicker/useMobileRangePicker.js +2 -4
- package/legacy/internal/hooks/useMultiInputRangeField/useMultiInputDateRangeField.js +7 -1
- package/legacy/internal/hooks/useMultiInputRangeField/useMultiInputDateTimeRangeField.js +7 -1
- package/legacy/internal/hooks/useMultiInputRangeField/useMultiInputTimeRangeField.js +7 -1
- package/legacy/internal/hooks/useRangePickerInputProps.js +5 -6
- package/legacy/internal/hooks/useStaticRangePicker/useStaticRangePicker.js +0 -2
- package/legacy/internal/utils/releaseInfo.js +1 -1
- package/legacy/internal/utils/valueManagers.js +15 -23
- package/legacy/tests/describeRangeValidation/testTextFieldRangeValidation.js +1 -1
- package/modern/DateRangeCalendar/DateRangeCalendar.js +7 -1
- package/modern/DateRangePicker/DateRangePicker.js +0 -5
- package/modern/DateRangePicker/DateRangePickerView.js +6 -3
- package/modern/DateRangePicker/DateRangePickerViewMobile.js +1 -1
- package/modern/DateRangePickerDay/DateRangePickerDay.js +72 -1
- package/modern/DesktopDateRangePicker/DesktopDateRangePicker.js +0 -5
- package/modern/DesktopNextDateRangePicker/DesktopNextDateRangePicker.js +22 -8
- package/modern/MobileDateRangePicker/MobileDateRangePicker.js +0 -5
- package/modern/MobileNextDateRangePicker/MobileNextDateRangePicker.js +22 -8
- package/modern/MultiInputDateRangeField/MultiInputDateRangeField.js +46 -13
- package/modern/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.js +45 -10
- package/modern/MultiInputTimeRangeField/MultiInputTimeRangeField.js +45 -10
- package/modern/NextDateRangePicker/NextDateRangePicker.js +16 -2
- package/modern/SingleInputDateRangeField/SingleInputDateRangeField.js +110 -5
- package/modern/StaticDateRangePicker/StaticDateRangePicker.js +0 -5
- package/modern/StaticNextDateRangePicker/StaticNextDateRangePicker.js +20 -6
- package/modern/{internal/utils/viewRenderers.js → dateRangeViewRenderers/dateRangeViewRenderers.js} +3 -4
- package/modern/dateRangeViewRenderers/index.js +1 -0
- package/modern/index.js +5 -2
- package/modern/internal/hooks/useDesktopRangePicker/useDesktopRangePicker.js +2 -4
- package/modern/internal/hooks/useMobileRangePicker/useMobileRangePicker.js +2 -4
- package/modern/internal/hooks/useMultiInputRangeField/useMultiInputDateRangeField.js +7 -1
- package/modern/internal/hooks/useMultiInputRangeField/useMultiInputDateTimeRangeField.js +7 -1
- package/modern/internal/hooks/useMultiInputRangeField/useMultiInputTimeRangeField.js +7 -1
- package/modern/internal/hooks/useRangePickerInputProps.js +5 -6
- package/modern/internal/hooks/useStaticRangePicker/useStaticRangePicker.js +0 -2
- package/modern/internal/utils/releaseInfo.js +1 -1
- package/modern/internal/utils/valueManagers.js +15 -21
- package/modern/tests/describeRangeValidation/testTextFieldRangeValidation.js +1 -1
- package/node/DateRangeCalendar/DateRangeCalendar.js +7 -1
- package/node/DateRangePicker/DateRangePicker.js +0 -5
- package/node/DateRangePicker/DateRangePickerView.js +6 -3
- package/node/DateRangePicker/DateRangePickerViewMobile.js +1 -1
- package/node/DateRangePickerDay/DateRangePickerDay.js +72 -1
- package/node/DesktopDateRangePicker/DesktopDateRangePicker.js +0 -5
- package/node/DesktopNextDateRangePicker/DesktopNextDateRangePicker.js +22 -8
- package/node/MobileDateRangePicker/MobileDateRangePicker.js +0 -5
- package/node/MobileNextDateRangePicker/MobileNextDateRangePicker.js +22 -8
- package/node/MultiInputDateRangeField/MultiInputDateRangeField.js +46 -13
- package/node/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.js +45 -10
- package/node/MultiInputTimeRangeField/MultiInputTimeRangeField.js +45 -10
- package/node/NextDateRangePicker/NextDateRangePicker.js +16 -2
- package/node/SingleInputDateRangeField/SingleInputDateRangeField.js +110 -5
- package/node/StaticDateRangePicker/StaticDateRangePicker.js +0 -5
- package/node/StaticNextDateRangePicker/StaticNextDateRangePicker.js +20 -6
- package/node/{internal/utils/viewRenderers.js → dateRangeViewRenderers/dateRangeViewRenderers.js} +4 -4
- package/node/dateRangeViewRenderers/index.js +12 -0
- package/node/index.js +13 -1
- package/node/internal/hooks/useDesktopRangePicker/useDesktopRangePicker.js +2 -4
- package/node/internal/hooks/useMobileRangePicker/useMobileRangePicker.js +2 -4
- package/node/internal/hooks/useMultiInputRangeField/useMultiInputDateRangeField.js +7 -1
- package/node/internal/hooks/useMultiInputRangeField/useMultiInputDateTimeRangeField.js +7 -1
- package/node/internal/hooks/useMultiInputRangeField/useMultiInputTimeRangeField.js +7 -1
- package/node/internal/hooks/useRangePickerInputProps.js +5 -6
- package/node/internal/hooks/useStaticRangePicker/useStaticRangePicker.js +0 -2
- package/node/internal/utils/releaseInfo.js +1 -1
- package/node/internal/utils/valueManagers.js +14 -20
- package/node/tests/describeRangeValidation/testTextFieldRangeValidation.js +1 -1
- package/package.json +3 -3
- package/tests/describeRangeValidation/testTextFieldRangeValidation.js +1 -1
- package/internal/utils/viewRenderers.d.ts +0 -7
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
2
2
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
|
-
var _excluded = ["components", "componentsProps", "value", "defaultValue", "format", "onChange", "readOnly", "onError", "shouldDisableDate", "minDate", "maxDate", "disableFuture", "disablePast", "selectedSections", "onSelectedSectionsChange", "autoFocus"],
|
|
4
|
-
_excluded2 = ["onKeyDown", "ref"],
|
|
5
|
-
_excluded3 = ["onKeyDown", "ref"];
|
|
3
|
+
var _excluded = ["components", "componentsProps", "value", "defaultValue", "format", "onChange", "readOnly", "disabled", "onError", "shouldDisableDate", "minDate", "maxDate", "disableFuture", "disablePast", "selectedSections", "onSelectedSectionsChange", "autoFocus"],
|
|
4
|
+
_excluded2 = ["onKeyDown", "ref", "readOnly", "inputMode"],
|
|
5
|
+
_excluded3 = ["onKeyDown", "ref", "readOnly", "inputMode"];
|
|
6
6
|
import * as React from 'react';
|
|
7
7
|
import PropTypes from 'prop-types';
|
|
8
8
|
import Stack from '@mui/material/Stack';
|
|
@@ -15,21 +15,18 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
15
15
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
16
16
|
var MultiInputDateRangeFieldRoot = styled( /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
17
17
|
return /*#__PURE__*/_jsx(Stack, _extends({
|
|
18
|
-
ref: ref
|
|
19
|
-
}, props, {
|
|
18
|
+
ref: ref,
|
|
20
19
|
spacing: 2,
|
|
21
20
|
direction: "row",
|
|
22
|
-
alignItems: "
|
|
23
|
-
}));
|
|
21
|
+
alignItems: "baseline"
|
|
22
|
+
}, props));
|
|
24
23
|
}), {
|
|
25
24
|
name: 'MuiMultiInputDateRangeField',
|
|
26
25
|
slot: 'Root',
|
|
27
26
|
overridesResolver: function overridesResolver(props, styles) {
|
|
28
27
|
return styles.root;
|
|
29
28
|
}
|
|
30
|
-
})({
|
|
31
|
-
alignItems: 'baseline'
|
|
32
|
-
});
|
|
29
|
+
})({});
|
|
33
30
|
var MultiInputDateRangeFieldSeparator = styled(function (props) {
|
|
34
31
|
var _props$children;
|
|
35
32
|
return /*#__PURE__*/_jsx(Typography, _extends({}, props, {
|
|
@@ -55,6 +52,7 @@ var MultiInputDateRangeField = /*#__PURE__*/React.forwardRef(function MultiInput
|
|
|
55
52
|
format = themeProps.format,
|
|
56
53
|
onChange = themeProps.onChange,
|
|
57
54
|
readOnly = themeProps.readOnly,
|
|
55
|
+
disabled = themeProps.disabled,
|
|
58
56
|
onError = themeProps.onError,
|
|
59
57
|
shouldDisableDate = themeProps.shouldDisableDate,
|
|
60
58
|
minDate = themeProps.minDate,
|
|
@@ -107,6 +105,7 @@ var MultiInputDateRangeField = /*#__PURE__*/React.forwardRef(function MultiInput
|
|
|
107
105
|
format: format,
|
|
108
106
|
onChange: onChange,
|
|
109
107
|
readOnly: readOnly,
|
|
108
|
+
disabled: disabled,
|
|
110
109
|
onError: onError,
|
|
111
110
|
shouldDisableDate: shouldDisableDate,
|
|
112
111
|
minDate: minDate,
|
|
@@ -124,20 +123,28 @@ var MultiInputDateRangeField = /*#__PURE__*/React.forwardRef(function MultiInput
|
|
|
124
123
|
_useMultiInputDateRan2 = _useMultiInputDateRan.startDate,
|
|
125
124
|
onStartInputKeyDown = _useMultiInputDateRan2.onKeyDown,
|
|
126
125
|
startInputRef = _useMultiInputDateRan2.ref,
|
|
126
|
+
startReadOnly = _useMultiInputDateRan2.readOnly,
|
|
127
|
+
startInputMode = _useMultiInputDateRan2.inputMode,
|
|
127
128
|
startDateProps = _objectWithoutProperties(_useMultiInputDateRan2, _excluded2),
|
|
128
129
|
_useMultiInputDateRan3 = _useMultiInputDateRan.endDate,
|
|
129
130
|
onEndInputKeyDown = _useMultiInputDateRan3.onKeyDown,
|
|
130
131
|
endInputRef = _useMultiInputDateRan3.ref,
|
|
132
|
+
endReadOnly = _useMultiInputDateRan3.readOnly,
|
|
133
|
+
endInputMode = _useMultiInputDateRan3.inputMode,
|
|
131
134
|
endDateProps = _objectWithoutProperties(_useMultiInputDateRan3, _excluded3);
|
|
132
135
|
return /*#__PURE__*/_jsxs(Root, _extends({}, rootProps, {
|
|
133
136
|
children: [/*#__PURE__*/_jsx(Input, _extends({}, startDateProps, {
|
|
134
137
|
inputProps: _extends({}, startDateProps.inputProps, {
|
|
135
138
|
ref: startInputRef,
|
|
139
|
+
readOnly: startReadOnly,
|
|
140
|
+
inputMode: startInputMode,
|
|
136
141
|
onKeyDown: onStartInputKeyDown
|
|
137
142
|
})
|
|
138
143
|
})), /*#__PURE__*/_jsx(Separator, _extends({}, separatorProps)), /*#__PURE__*/_jsx(Input, _extends({}, endDateProps, {
|
|
139
144
|
inputProps: _extends({}, endDateProps.inputProps, {
|
|
140
145
|
ref: endInputRef,
|
|
146
|
+
readOnly: endReadOnly,
|
|
147
|
+
inputMode: endInputMode,
|
|
141
148
|
onKeyDown: onEndInputKeyDown
|
|
142
149
|
})
|
|
143
150
|
}))]
|
|
@@ -149,6 +156,7 @@ process.env.NODE_ENV !== "production" ? MultiInputDateRangeField.propTypes = {
|
|
|
149
156
|
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
|
150
157
|
// ----------------------------------------------------------------------
|
|
151
158
|
autoFocus: PropTypes.bool,
|
|
159
|
+
className: PropTypes.string,
|
|
152
160
|
/**
|
|
153
161
|
* Overrideable components.
|
|
154
162
|
* @default {}
|
|
@@ -163,6 +171,17 @@ process.env.NODE_ENV !== "production" ? MultiInputDateRangeField.propTypes = {
|
|
|
163
171
|
* The default value. Use when the component is not controlled.
|
|
164
172
|
*/
|
|
165
173
|
defaultValue: PropTypes.arrayOf(PropTypes.any),
|
|
174
|
+
/**
|
|
175
|
+
* Defines the `flex-direction` style property.
|
|
176
|
+
* It is applied for all screen sizes.
|
|
177
|
+
* @default 'column'
|
|
178
|
+
*/
|
|
179
|
+
direction: PropTypes.oneOfType([PropTypes.oneOf(['column-reverse', 'column', 'row-reverse', 'row']), PropTypes.arrayOf(PropTypes.oneOf(['column-reverse', 'column', 'row-reverse', 'row'])), PropTypes.object]),
|
|
180
|
+
/**
|
|
181
|
+
* If `true`, the component is disabled.
|
|
182
|
+
* @default false
|
|
183
|
+
*/
|
|
184
|
+
disabled: PropTypes.bool,
|
|
166
185
|
/**
|
|
167
186
|
* If `true` disable values before the current date for date components, time for time components and both for date time components.
|
|
168
187
|
* @default false
|
|
@@ -173,6 +192,10 @@ process.env.NODE_ENV !== "production" ? MultiInputDateRangeField.propTypes = {
|
|
|
173
192
|
* @default false
|
|
174
193
|
*/
|
|
175
194
|
disablePast: PropTypes.bool,
|
|
195
|
+
/**
|
|
196
|
+
* Add an element between each child.
|
|
197
|
+
*/
|
|
198
|
+
divider: PropTypes.node,
|
|
176
199
|
/**
|
|
177
200
|
* Format of the date when rendered in the input(s).
|
|
178
201
|
*/
|
|
@@ -219,7 +242,7 @@ process.env.NODE_ENV !== "production" ? MultiInputDateRangeField.propTypes = {
|
|
|
219
242
|
* 4. If `null` is provided, no section will be selected
|
|
220
243
|
* If not provided, the selected sections will be handled internally.
|
|
221
244
|
*/
|
|
222
|
-
selectedSections: PropTypes.oneOfType([PropTypes.oneOf(['day', 'hours', 'meridiem', 'minutes', 'month', 'seconds', 'year']), PropTypes.number, PropTypes.shape({
|
|
245
|
+
selectedSections: PropTypes.oneOfType([PropTypes.oneOf(['all', 'day', 'hours', 'meridiem', 'minutes', 'month', 'seconds', 'year']), PropTypes.number, PropTypes.shape({
|
|
223
246
|
endIndex: PropTypes.number.isRequired,
|
|
224
247
|
startIndex: PropTypes.number.isRequired
|
|
225
248
|
})]),
|
|
@@ -231,6 +254,16 @@ process.env.NODE_ENV !== "production" ? MultiInputDateRangeField.propTypes = {
|
|
|
231
254
|
* @returns {boolean} Returns `true` if the date should be disabled.
|
|
232
255
|
*/
|
|
233
256
|
shouldDisableDate: PropTypes.func,
|
|
257
|
+
/**
|
|
258
|
+
* Defines the space between immediate children.
|
|
259
|
+
* @default 0
|
|
260
|
+
*/
|
|
261
|
+
spacing: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.number, PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.string]),
|
|
262
|
+
style: PropTypes.object,
|
|
263
|
+
/**
|
|
264
|
+
* The system prop, which allows defining system overrides as well as additional CSS styles.
|
|
265
|
+
*/
|
|
266
|
+
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
234
267
|
/**
|
|
235
268
|
* The selected value.
|
|
236
269
|
* Used when the component is controlled.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
2
2
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
|
-
var _excluded = ["components", "componentsProps", "value", "defaultValue", "format", "onChange", "readOnly", "onError", "shouldDisableDate", "minDate", "maxDate", "minTime", "maxTime", "minDateTime", "maxDateTime", "minutesStep", "shouldDisableTime", "disableFuture", "disablePast", "selectedSections", "onSelectedSectionsChange"],
|
|
4
|
-
_excluded2 = ["onKeyDown", "ref"],
|
|
5
|
-
_excluded3 = ["onKeyDown", "ref"];
|
|
3
|
+
var _excluded = ["components", "componentsProps", "value", "defaultValue", "format", "onChange", "readOnly", "disabled", "onError", "shouldDisableDate", "minDate", "maxDate", "minTime", "maxTime", "minDateTime", "maxDateTime", "minutesStep", "shouldDisableTime", "disableFuture", "disablePast", "selectedSections", "onSelectedSectionsChange"],
|
|
4
|
+
_excluded2 = ["onKeyDown", "ref", "readOnly", "inputMode"],
|
|
5
|
+
_excluded3 = ["onKeyDown", "ref", "readOnly", "inputMode"];
|
|
6
6
|
import * as React from 'react';
|
|
7
7
|
import PropTypes from 'prop-types';
|
|
8
8
|
import Stack from '@mui/material/Stack';
|
|
@@ -15,12 +15,11 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
15
15
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
16
16
|
var MultiInputDateTimeRangeFieldRoot = styled( /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
17
17
|
return /*#__PURE__*/_jsx(Stack, _extends({
|
|
18
|
-
ref: ref
|
|
19
|
-
}, props, {
|
|
18
|
+
ref: ref,
|
|
20
19
|
spacing: 2,
|
|
21
20
|
direction: "row",
|
|
22
|
-
alignItems: "
|
|
23
|
-
}));
|
|
21
|
+
alignItems: "baseline"
|
|
22
|
+
}, props));
|
|
24
23
|
}), {
|
|
25
24
|
name: 'MuiMultiInputDateTimeRangeField',
|
|
26
25
|
slot: 'Root',
|
|
@@ -53,6 +52,7 @@ var MultiInputDateTimeRangeField = /*#__PURE__*/React.forwardRef(function MultiI
|
|
|
53
52
|
format = themeProps.format,
|
|
54
53
|
onChange = themeProps.onChange,
|
|
55
54
|
readOnly = themeProps.readOnly,
|
|
55
|
+
disabled = themeProps.disabled,
|
|
56
56
|
onError = themeProps.onError,
|
|
57
57
|
shouldDisableDate = themeProps.shouldDisableDate,
|
|
58
58
|
minDate = themeProps.minDate,
|
|
@@ -107,6 +107,7 @@ var MultiInputDateTimeRangeField = /*#__PURE__*/React.forwardRef(function MultiI
|
|
|
107
107
|
format: format,
|
|
108
108
|
onChange: onChange,
|
|
109
109
|
readOnly: readOnly,
|
|
110
|
+
disabled: disabled,
|
|
110
111
|
onError: onError,
|
|
111
112
|
shouldDisableDate: shouldDisableDate,
|
|
112
113
|
minDate: minDate,
|
|
@@ -130,20 +131,28 @@ var MultiInputDateTimeRangeField = /*#__PURE__*/React.forwardRef(function MultiI
|
|
|
130
131
|
_useMultiInputDateTim2 = _useMultiInputDateTim.startDate,
|
|
131
132
|
onStartInputKeyDown = _useMultiInputDateTim2.onKeyDown,
|
|
132
133
|
startInputRef = _useMultiInputDateTim2.ref,
|
|
134
|
+
startReadOnly = _useMultiInputDateTim2.readOnly,
|
|
135
|
+
startInputMode = _useMultiInputDateTim2.inputMode,
|
|
133
136
|
startDateProps = _objectWithoutProperties(_useMultiInputDateTim2, _excluded2),
|
|
134
137
|
_useMultiInputDateTim3 = _useMultiInputDateTim.endDate,
|
|
135
138
|
onEndInputKeyDown = _useMultiInputDateTim3.onKeyDown,
|
|
136
139
|
endInputRef = _useMultiInputDateTim3.ref,
|
|
140
|
+
endReadOnly = _useMultiInputDateTim3.readOnly,
|
|
141
|
+
endInputMode = _useMultiInputDateTim3.inputMode,
|
|
137
142
|
endDateProps = _objectWithoutProperties(_useMultiInputDateTim3, _excluded3);
|
|
138
143
|
return /*#__PURE__*/_jsxs(Root, _extends({}, rootProps, {
|
|
139
144
|
children: [/*#__PURE__*/_jsx(Input, _extends({}, startDateProps, {
|
|
140
145
|
inputProps: _extends({}, startDateProps.inputProps, {
|
|
141
146
|
ref: startInputRef,
|
|
147
|
+
readOnly: startReadOnly,
|
|
148
|
+
inputMode: startInputMode,
|
|
142
149
|
onKeyDown: onStartInputKeyDown
|
|
143
150
|
})
|
|
144
151
|
})), /*#__PURE__*/_jsx(Separator, _extends({}, separatorProps)), /*#__PURE__*/_jsx(Input, _extends({}, endDateProps, {
|
|
145
152
|
inputProps: _extends({}, endDateProps.inputProps, {
|
|
146
153
|
ref: endInputRef,
|
|
154
|
+
readOnly: endReadOnly,
|
|
155
|
+
inputMode: endInputMode,
|
|
147
156
|
onKeyDown: onEndInputKeyDown
|
|
148
157
|
})
|
|
149
158
|
}))]
|
|
@@ -159,6 +168,7 @@ process.env.NODE_ENV !== "production" ? MultiInputDateTimeRangeField.propTypes =
|
|
|
159
168
|
* @default `utils.is12HourCycleInCurrentLocale()`
|
|
160
169
|
*/
|
|
161
170
|
ampm: PropTypes.bool,
|
|
171
|
+
className: PropTypes.string,
|
|
162
172
|
/**
|
|
163
173
|
* Overrideable components.
|
|
164
174
|
* @default {}
|
|
@@ -173,6 +183,17 @@ process.env.NODE_ENV !== "production" ? MultiInputDateTimeRangeField.propTypes =
|
|
|
173
183
|
* The default value. Use when the component is not controlled.
|
|
174
184
|
*/
|
|
175
185
|
defaultValue: PropTypes.arrayOf(PropTypes.any),
|
|
186
|
+
/**
|
|
187
|
+
* Defines the `flex-direction` style property.
|
|
188
|
+
* It is applied for all screen sizes.
|
|
189
|
+
* @default 'column'
|
|
190
|
+
*/
|
|
191
|
+
direction: PropTypes.oneOfType([PropTypes.oneOf(['column-reverse', 'column', 'row-reverse', 'row']), PropTypes.arrayOf(PropTypes.oneOf(['column-reverse', 'column', 'row-reverse', 'row'])), PropTypes.object]),
|
|
192
|
+
/**
|
|
193
|
+
* If `true`, the component is disabled.
|
|
194
|
+
* @default false
|
|
195
|
+
*/
|
|
196
|
+
disabled: PropTypes.bool,
|
|
176
197
|
/**
|
|
177
198
|
* If `true` disable values before the current date for date components, time for time components and both for date time components.
|
|
178
199
|
* @default false
|
|
@@ -188,6 +209,10 @@ process.env.NODE_ENV !== "production" ? MultiInputDateTimeRangeField.propTypes =
|
|
|
188
209
|
* @default false
|
|
189
210
|
*/
|
|
190
211
|
disablePast: PropTypes.bool,
|
|
212
|
+
/**
|
|
213
|
+
* Add an element between each child.
|
|
214
|
+
*/
|
|
215
|
+
divider: PropTypes.node,
|
|
191
216
|
/**
|
|
192
217
|
* Format of the date when rendered in the input(s).
|
|
193
218
|
*/
|
|
@@ -257,7 +282,7 @@ process.env.NODE_ENV !== "production" ? MultiInputDateTimeRangeField.propTypes =
|
|
|
257
282
|
* 4. If `null` is provided, no section will be selected
|
|
258
283
|
* If not provided, the selected sections will be handled internally.
|
|
259
284
|
*/
|
|
260
|
-
selectedSections: PropTypes.oneOfType([PropTypes.oneOf(['day', 'hours', 'meridiem', 'minutes', 'month', 'seconds', 'year']), PropTypes.number, PropTypes.shape({
|
|
285
|
+
selectedSections: PropTypes.oneOfType([PropTypes.oneOf(['all', 'day', 'hours', 'meridiem', 'minutes', 'month', 'seconds', 'year']), PropTypes.number, PropTypes.shape({
|
|
261
286
|
endIndex: PropTypes.number.isRequired,
|
|
262
287
|
startIndex: PropTypes.number.isRequired
|
|
263
288
|
})]),
|
|
@@ -276,6 +301,16 @@ process.env.NODE_ENV !== "production" ? MultiInputDateTimeRangeField.propTypes =
|
|
|
276
301
|
* @returns {boolean} If `true` the time will be disabled.
|
|
277
302
|
*/
|
|
278
303
|
shouldDisableTime: PropTypes.func,
|
|
304
|
+
/**
|
|
305
|
+
* Defines the space between immediate children.
|
|
306
|
+
* @default 0
|
|
307
|
+
*/
|
|
308
|
+
spacing: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.number, PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.string]),
|
|
309
|
+
style: PropTypes.object,
|
|
310
|
+
/**
|
|
311
|
+
* The system prop, which allows defining system overrides as well as additional CSS styles.
|
|
312
|
+
*/
|
|
313
|
+
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
279
314
|
/**
|
|
280
315
|
* The selected value.
|
|
281
316
|
* Used when the component is controlled.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
2
2
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
|
-
var _excluded = ["components", "componentsProps", "value", "defaultValue", "format", "onChange", "readOnly", "onError", "minTime", "maxTime", "minutesStep", "shouldDisableTime", "disableFuture", "disablePast", "selectedSections", "onSelectedSectionsChange"],
|
|
4
|
-
_excluded2 = ["onKeyDown", "ref"],
|
|
5
|
-
_excluded3 = ["onKeyDown", "ref"];
|
|
3
|
+
var _excluded = ["components", "componentsProps", "value", "defaultValue", "format", "onChange", "readOnly", "disabled", "onError", "minTime", "maxTime", "minutesStep", "shouldDisableTime", "disableFuture", "disablePast", "selectedSections", "onSelectedSectionsChange"],
|
|
4
|
+
_excluded2 = ["onKeyDown", "ref", "readOnly", "inputMode"],
|
|
5
|
+
_excluded3 = ["onKeyDown", "ref", "readOnly", "inputMode"];
|
|
6
6
|
import * as React from 'react';
|
|
7
7
|
import PropTypes from 'prop-types';
|
|
8
8
|
import Stack from '@mui/material/Stack';
|
|
@@ -15,12 +15,11 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
15
15
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
16
16
|
var MultiInputTimeRangeFieldRoot = styled( /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
17
17
|
return /*#__PURE__*/_jsx(Stack, _extends({
|
|
18
|
-
ref: ref
|
|
19
|
-
}, props, {
|
|
18
|
+
ref: ref,
|
|
20
19
|
spacing: 2,
|
|
21
20
|
direction: "row",
|
|
22
|
-
alignItems: "
|
|
23
|
-
}));
|
|
21
|
+
alignItems: "baseline"
|
|
22
|
+
}, props));
|
|
24
23
|
}), {
|
|
25
24
|
name: 'MuiMultiInputTimeRangeField',
|
|
26
25
|
slot: 'Root',
|
|
@@ -53,6 +52,7 @@ var MultiInputTimeRangeField = /*#__PURE__*/React.forwardRef(function MultiInput
|
|
|
53
52
|
format = themeProps.format,
|
|
54
53
|
onChange = themeProps.onChange,
|
|
55
54
|
readOnly = themeProps.readOnly,
|
|
55
|
+
disabled = themeProps.disabled,
|
|
56
56
|
onError = themeProps.onError,
|
|
57
57
|
minTime = themeProps.minTime,
|
|
58
58
|
maxTime = themeProps.maxTime,
|
|
@@ -102,6 +102,7 @@ var MultiInputTimeRangeField = /*#__PURE__*/React.forwardRef(function MultiInput
|
|
|
102
102
|
format: format,
|
|
103
103
|
onChange: onChange,
|
|
104
104
|
readOnly: readOnly,
|
|
105
|
+
disabled: disabled,
|
|
105
106
|
onError: onError,
|
|
106
107
|
minTime: minTime,
|
|
107
108
|
maxTime: maxTime,
|
|
@@ -120,20 +121,28 @@ var MultiInputTimeRangeField = /*#__PURE__*/React.forwardRef(function MultiInput
|
|
|
120
121
|
_useMultiInputTimeRan2 = _useMultiInputTimeRan.startDate,
|
|
121
122
|
onStartInputKeyDown = _useMultiInputTimeRan2.onKeyDown,
|
|
122
123
|
startInputRef = _useMultiInputTimeRan2.ref,
|
|
124
|
+
startReadOnly = _useMultiInputTimeRan2.readOnly,
|
|
125
|
+
startInputMode = _useMultiInputTimeRan2.inputMode,
|
|
123
126
|
startDateProps = _objectWithoutProperties(_useMultiInputTimeRan2, _excluded2),
|
|
124
127
|
_useMultiInputTimeRan3 = _useMultiInputTimeRan.endDate,
|
|
125
128
|
onEndInputKeyDown = _useMultiInputTimeRan3.onKeyDown,
|
|
126
129
|
endInputRef = _useMultiInputTimeRan3.ref,
|
|
130
|
+
endReadOnly = _useMultiInputTimeRan3.readOnly,
|
|
131
|
+
endInputMode = _useMultiInputTimeRan3.inputMode,
|
|
127
132
|
endDateProps = _objectWithoutProperties(_useMultiInputTimeRan3, _excluded3);
|
|
128
133
|
return /*#__PURE__*/_jsxs(Root, _extends({}, rootProps, {
|
|
129
134
|
children: [/*#__PURE__*/_jsx(Input, _extends({}, startDateProps, {
|
|
130
135
|
inputProps: _extends({}, startDateProps.inputProps, {
|
|
131
136
|
ref: startInputRef,
|
|
137
|
+
readOnly: startReadOnly,
|
|
138
|
+
inputMode: startInputMode,
|
|
132
139
|
onKeyDown: onStartInputKeyDown
|
|
133
140
|
})
|
|
134
141
|
})), /*#__PURE__*/_jsx(Separator, _extends({}, separatorProps)), /*#__PURE__*/_jsx(Input, _extends({}, endDateProps, {
|
|
135
142
|
inputProps: _extends({}, endDateProps.inputProps, {
|
|
136
143
|
ref: endInputRef,
|
|
144
|
+
readOnly: endReadOnly,
|
|
145
|
+
inputMode: endInputMode,
|
|
137
146
|
onKeyDown: onEndInputKeyDown
|
|
138
147
|
})
|
|
139
148
|
}))]
|
|
@@ -149,6 +158,7 @@ process.env.NODE_ENV !== "production" ? MultiInputTimeRangeField.propTypes = {
|
|
|
149
158
|
* @default `utils.is12HourCycleInCurrentLocale()`
|
|
150
159
|
*/
|
|
151
160
|
ampm: PropTypes.bool,
|
|
161
|
+
className: PropTypes.string,
|
|
152
162
|
/**
|
|
153
163
|
* Overrideable components.
|
|
154
164
|
* @default {}
|
|
@@ -163,6 +173,17 @@ process.env.NODE_ENV !== "production" ? MultiInputTimeRangeField.propTypes = {
|
|
|
163
173
|
* The default value. Use when the component is not controlled.
|
|
164
174
|
*/
|
|
165
175
|
defaultValue: PropTypes.arrayOf(PropTypes.any),
|
|
176
|
+
/**
|
|
177
|
+
* Defines the `flex-direction` style property.
|
|
178
|
+
* It is applied for all screen sizes.
|
|
179
|
+
* @default 'column'
|
|
180
|
+
*/
|
|
181
|
+
direction: PropTypes.oneOfType([PropTypes.oneOf(['column-reverse', 'column', 'row-reverse', 'row']), PropTypes.arrayOf(PropTypes.oneOf(['column-reverse', 'column', 'row-reverse', 'row'])), PropTypes.object]),
|
|
182
|
+
/**
|
|
183
|
+
* If `true`, the component is disabled.
|
|
184
|
+
* @default false
|
|
185
|
+
*/
|
|
186
|
+
disabled: PropTypes.bool,
|
|
166
187
|
/**
|
|
167
188
|
* If `true` disable values before the current date for date components, time for time components and both for date time components.
|
|
168
189
|
* @default false
|
|
@@ -178,6 +199,10 @@ process.env.NODE_ENV !== "production" ? MultiInputTimeRangeField.propTypes = {
|
|
|
178
199
|
* @default false
|
|
179
200
|
*/
|
|
180
201
|
disablePast: PropTypes.bool,
|
|
202
|
+
/**
|
|
203
|
+
* Add an element between each child.
|
|
204
|
+
*/
|
|
205
|
+
divider: PropTypes.node,
|
|
181
206
|
/**
|
|
182
207
|
* Format of the date when rendered in the input(s).
|
|
183
208
|
*/
|
|
@@ -231,7 +256,7 @@ process.env.NODE_ENV !== "production" ? MultiInputTimeRangeField.propTypes = {
|
|
|
231
256
|
* 4. If `null` is provided, no section will be selected
|
|
232
257
|
* If not provided, the selected sections will be handled internally.
|
|
233
258
|
*/
|
|
234
|
-
selectedSections: PropTypes.oneOfType([PropTypes.oneOf(['day', 'hours', 'meridiem', 'minutes', 'month', 'seconds', 'year']), PropTypes.number, PropTypes.shape({
|
|
259
|
+
selectedSections: PropTypes.oneOfType([PropTypes.oneOf(['all', 'day', 'hours', 'meridiem', 'minutes', 'month', 'seconds', 'year']), PropTypes.number, PropTypes.shape({
|
|
235
260
|
endIndex: PropTypes.number.isRequired,
|
|
236
261
|
startIndex: PropTypes.number.isRequired
|
|
237
262
|
})]),
|
|
@@ -242,6 +267,16 @@ process.env.NODE_ENV !== "production" ? MultiInputTimeRangeField.propTypes = {
|
|
|
242
267
|
* @returns {boolean} If `true` the time will be disabled.
|
|
243
268
|
*/
|
|
244
269
|
shouldDisableTime: PropTypes.func,
|
|
270
|
+
/**
|
|
271
|
+
* Defines the space between immediate children.
|
|
272
|
+
* @default 0
|
|
273
|
+
*/
|
|
274
|
+
spacing: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.number, PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.string]),
|
|
275
|
+
style: PropTypes.object,
|
|
276
|
+
/**
|
|
277
|
+
* The system prop, which allows defining system overrides as well as additional CSS styles.
|
|
278
|
+
*/
|
|
279
|
+
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
245
280
|
/**
|
|
246
281
|
* The selected value.
|
|
247
282
|
* Used when the component is controlled.
|
|
@@ -35,6 +35,12 @@ process.env.NODE_ENV !== "production" ? NextDateRangePicker.propTypes = {
|
|
|
35
35
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
36
36
|
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
|
37
37
|
// ----------------------------------------------------------------------
|
|
38
|
+
/**
|
|
39
|
+
* If `true`, the main element is focused during the first mount.
|
|
40
|
+
* This main element is:
|
|
41
|
+
* - the element chosen by the visible view if any (i.e: the selected day on the `day` view).
|
|
42
|
+
* - the `input` element if there is a field rendered.
|
|
43
|
+
*/
|
|
38
44
|
autoFocus: PropTypes.bool,
|
|
39
45
|
/**
|
|
40
46
|
* The number of calendars to render on **desktop**.
|
|
@@ -221,7 +227,7 @@ process.env.NODE_ENV !== "production" ? NextDateRangePicker.propTypes = {
|
|
|
221
227
|
* 4. If `null` is provided, no section will be selected
|
|
222
228
|
* If not provided, the selected sections will be handled internally.
|
|
223
229
|
*/
|
|
224
|
-
selectedSections: PropTypes.oneOfType([PropTypes.oneOf(['day', 'hours', 'meridiem', 'minutes', 'month', 'seconds', 'year']), PropTypes.number, PropTypes.shape({
|
|
230
|
+
selectedSections: PropTypes.oneOfType([PropTypes.oneOf(['all', 'day', 'hours', 'meridiem', 'minutes', 'month', 'seconds', 'year']), PropTypes.number, PropTypes.shape({
|
|
225
231
|
endIndex: PropTypes.number.isRequired,
|
|
226
232
|
startIndex: PropTypes.number.isRequired
|
|
227
233
|
})]),
|
|
@@ -251,6 +257,14 @@ process.env.NODE_ENV !== "production" ? NextDateRangePicker.propTypes = {
|
|
|
251
257
|
* The selected value.
|
|
252
258
|
* Used when the component is controlled.
|
|
253
259
|
*/
|
|
254
|
-
value: PropTypes.arrayOf(PropTypes.any)
|
|
260
|
+
value: PropTypes.arrayOf(PropTypes.any),
|
|
261
|
+
/**
|
|
262
|
+
* Define custom view renderers for each section.
|
|
263
|
+
* If `null`, the section will only have field editing.
|
|
264
|
+
* If `undefined`, internally defined view will be the used.
|
|
265
|
+
*/
|
|
266
|
+
viewRenderers: PropTypes.shape({
|
|
267
|
+
day: PropTypes.func
|
|
268
|
+
})
|
|
255
269
|
} : void 0;
|
|
256
270
|
export { NextDateRangePicker };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
3
3
|
var _excluded = ["components", "componentsProps"],
|
|
4
|
-
_excluded2 = ["ref", "onPaste", "inputMode"];
|
|
4
|
+
_excluded2 = ["ref", "onPaste", "inputMode", "readOnly"];
|
|
5
5
|
import * as React from 'react';
|
|
6
6
|
import PropTypes from 'prop-types';
|
|
7
7
|
import TextField from '@mui/material/TextField';
|
|
@@ -33,6 +33,7 @@ var SingleInputDateRangeField = /*#__PURE__*/React.forwardRef(function SingleInp
|
|
|
33
33
|
inputRef = _useSingleInputDateRa.ref,
|
|
34
34
|
onPaste = _useSingleInputDateRa.onPaste,
|
|
35
35
|
inputMode = _useSingleInputDateRa.inputMode,
|
|
36
|
+
readOnly = _useSingleInputDateRa.readOnly,
|
|
36
37
|
fieldProps = _objectWithoutProperties(_useSingleInputDateRa, _excluded2);
|
|
37
38
|
return /*#__PURE__*/_jsx(Input, _extends({
|
|
38
39
|
ref: ref
|
|
@@ -40,7 +41,8 @@ var SingleInputDateRangeField = /*#__PURE__*/React.forwardRef(function SingleInp
|
|
|
40
41
|
inputProps: _extends({}, fieldProps.inputProps, {
|
|
41
42
|
ref: inputRef,
|
|
42
43
|
onPaste: onPaste,
|
|
43
|
-
inputMode: inputMode
|
|
44
|
+
inputMode: inputMode,
|
|
45
|
+
readOnly: readOnly
|
|
44
46
|
})
|
|
45
47
|
}));
|
|
46
48
|
});
|
|
@@ -49,6 +51,19 @@ process.env.NODE_ENV !== "production" ? SingleInputDateRangeField.propTypes = {
|
|
|
49
51
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
50
52
|
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
|
51
53
|
// ----------------------------------------------------------------------
|
|
54
|
+
/**
|
|
55
|
+
* If `true`, the `input` element is focused during the first mount.
|
|
56
|
+
* @default false
|
|
57
|
+
*/
|
|
58
|
+
autoFocus: PropTypes.bool,
|
|
59
|
+
className: PropTypes.string,
|
|
60
|
+
/**
|
|
61
|
+
* The color of the component.
|
|
62
|
+
* It supports both default and custom theme colors, which can be added as shown in the
|
|
63
|
+
* [palette customization guide](https://mui.com/material-ui/customization/palette/#adding-new-colors).
|
|
64
|
+
* @default 'primary'
|
|
65
|
+
*/
|
|
66
|
+
color: PropTypes.oneOf(['error', 'info', 'primary', 'secondary', 'success', 'warning']),
|
|
52
67
|
/**
|
|
53
68
|
* Overrideable components.
|
|
54
69
|
* @default {}
|
|
@@ -63,6 +78,11 @@ process.env.NODE_ENV !== "production" ? SingleInputDateRangeField.propTypes = {
|
|
|
63
78
|
* The default value. Use when the component is not controlled.
|
|
64
79
|
*/
|
|
65
80
|
defaultValue: PropTypes.arrayOf(PropTypes.any),
|
|
81
|
+
/**
|
|
82
|
+
* If `true`, the component is disabled.
|
|
83
|
+
* @default false
|
|
84
|
+
*/
|
|
85
|
+
disabled: PropTypes.bool,
|
|
66
86
|
/**
|
|
67
87
|
* If `true` disable values before the current date for date components, time for time components and both for date time components.
|
|
68
88
|
* @default false
|
|
@@ -73,10 +93,70 @@ process.env.NODE_ENV !== "production" ? SingleInputDateRangeField.propTypes = {
|
|
|
73
93
|
* @default false
|
|
74
94
|
*/
|
|
75
95
|
disablePast: PropTypes.bool,
|
|
96
|
+
/**
|
|
97
|
+
* If `true`, the component is displayed in focused state.
|
|
98
|
+
*/
|
|
99
|
+
focused: PropTypes.bool,
|
|
76
100
|
/**
|
|
77
101
|
* Format of the date when rendered in the input(s).
|
|
78
102
|
*/
|
|
79
103
|
format: PropTypes.string,
|
|
104
|
+
/**
|
|
105
|
+
* Props applied to the [`FormHelperText`](/material-ui/api/form-helper-text/) element.
|
|
106
|
+
*/
|
|
107
|
+
FormHelperTextProps: PropTypes.object,
|
|
108
|
+
/**
|
|
109
|
+
* If `true`, the input will take up the full width of its container.
|
|
110
|
+
* @default false
|
|
111
|
+
*/
|
|
112
|
+
fullWidth: PropTypes.bool,
|
|
113
|
+
/**
|
|
114
|
+
* The helper text content.
|
|
115
|
+
*/
|
|
116
|
+
helperText: PropTypes.node,
|
|
117
|
+
/**
|
|
118
|
+
* If `true`, the label is hidden.
|
|
119
|
+
* This is used to increase density for a `FilledInput`.
|
|
120
|
+
* Be sure to add `aria-label` to the `input` element.
|
|
121
|
+
* @default false
|
|
122
|
+
*/
|
|
123
|
+
hiddenLabel: PropTypes.bool,
|
|
124
|
+
/**
|
|
125
|
+
* The id of the `input` element.
|
|
126
|
+
* Use this prop to make `label` and `helperText` accessible for screen readers.
|
|
127
|
+
*/
|
|
128
|
+
id: PropTypes.string,
|
|
129
|
+
/**
|
|
130
|
+
* Props applied to the [`InputLabel`](/material-ui/api/input-label/) element.
|
|
131
|
+
* Pointer events like `onClick` are enabled if and only if `shrink` is `true`.
|
|
132
|
+
*/
|
|
133
|
+
InputLabelProps: PropTypes.object,
|
|
134
|
+
/**
|
|
135
|
+
* [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element.
|
|
136
|
+
*/
|
|
137
|
+
inputProps: PropTypes.object,
|
|
138
|
+
/**
|
|
139
|
+
* Props applied to the Input element.
|
|
140
|
+
* It will be a [`FilledInput`](/material-ui/api/filled-input/),
|
|
141
|
+
* [`OutlinedInput`](/material-ui/api/outlined-input/) or [`Input`](/material-ui/api/input/)
|
|
142
|
+
* component depending on the `variant` prop value.
|
|
143
|
+
*/
|
|
144
|
+
InputProps: PropTypes.object,
|
|
145
|
+
/**
|
|
146
|
+
* Pass a ref to the `input` element.
|
|
147
|
+
*/
|
|
148
|
+
inputRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({
|
|
149
|
+
current: PropTypes.any.isRequired
|
|
150
|
+
})]),
|
|
151
|
+
/**
|
|
152
|
+
* The label content.
|
|
153
|
+
*/
|
|
154
|
+
label: PropTypes.node,
|
|
155
|
+
/**
|
|
156
|
+
* If `dense` or `normal`, will adjust vertical spacing of this and contained components.
|
|
157
|
+
* @default 'none'
|
|
158
|
+
*/
|
|
159
|
+
margin: PropTypes.oneOf(['dense', 'none', 'normal']),
|
|
80
160
|
/**
|
|
81
161
|
* Maximal selectable date.
|
|
82
162
|
*/
|
|
@@ -85,6 +165,11 @@ process.env.NODE_ENV !== "production" ? SingleInputDateRangeField.propTypes = {
|
|
|
85
165
|
* Minimal selectable date.
|
|
86
166
|
*/
|
|
87
167
|
minDate: PropTypes.any,
|
|
168
|
+
/**
|
|
169
|
+
* Name attribute of the `input` element.
|
|
170
|
+
*/
|
|
171
|
+
name: PropTypes.string,
|
|
172
|
+
onBlur: PropTypes.func,
|
|
88
173
|
/**
|
|
89
174
|
* Callback fired when the value changes.
|
|
90
175
|
* @template TValue, TError
|
|
@@ -99,6 +184,7 @@ process.env.NODE_ENV !== "production" ? SingleInputDateRangeField.propTypes = {
|
|
|
99
184
|
* @param {TValue} value The value associated to the error.
|
|
100
185
|
*/
|
|
101
186
|
onError: PropTypes.func,
|
|
187
|
+
onFocus: PropTypes.func,
|
|
102
188
|
/**
|
|
103
189
|
* Callback fired when the selected sections change.
|
|
104
190
|
* @param {FieldSelectedSections} newValue The new selected sections.
|
|
@@ -110,6 +196,11 @@ process.env.NODE_ENV !== "production" ? SingleInputDateRangeField.propTypes = {
|
|
|
110
196
|
* @default false
|
|
111
197
|
*/
|
|
112
198
|
readOnly: PropTypes.bool,
|
|
199
|
+
/**
|
|
200
|
+
* If `true`, the label is displayed as required and the `input` element is required.
|
|
201
|
+
* @default false
|
|
202
|
+
*/
|
|
203
|
+
required: PropTypes.bool,
|
|
113
204
|
/**
|
|
114
205
|
* The currently selected sections.
|
|
115
206
|
* This prop accept four formats:
|
|
@@ -119,7 +210,7 @@ process.env.NODE_ENV !== "production" ? SingleInputDateRangeField.propTypes = {
|
|
|
119
210
|
* 4. If `null` is provided, no section will be selected
|
|
120
211
|
* If not provided, the selected sections will be handled internally.
|
|
121
212
|
*/
|
|
122
|
-
selectedSections: PropTypes.oneOfType([PropTypes.oneOf(['day', 'hours', 'meridiem', 'minutes', 'month', 'seconds', 'year']), PropTypes.number, PropTypes.shape({
|
|
213
|
+
selectedSections: PropTypes.oneOfType([PropTypes.oneOf(['all', 'day', 'hours', 'meridiem', 'minutes', 'month', 'seconds', 'year']), PropTypes.number, PropTypes.shape({
|
|
123
214
|
endIndex: PropTypes.number.isRequired,
|
|
124
215
|
startIndex: PropTypes.number.isRequired
|
|
125
216
|
})]),
|
|
@@ -131,10 +222,24 @@ process.env.NODE_ENV !== "production" ? SingleInputDateRangeField.propTypes = {
|
|
|
131
222
|
* @returns {boolean} Returns `true` if the date should be disabled.
|
|
132
223
|
*/
|
|
133
224
|
shouldDisableDate: PropTypes.func,
|
|
225
|
+
/**
|
|
226
|
+
* The size of the component.
|
|
227
|
+
*/
|
|
228
|
+
size: PropTypes.oneOf(['medium', 'small']),
|
|
229
|
+
style: PropTypes.object,
|
|
230
|
+
/**
|
|
231
|
+
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
232
|
+
*/
|
|
233
|
+
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
134
234
|
/**
|
|
135
235
|
* The selected value.
|
|
136
236
|
* Used when the component is controlled.
|
|
137
237
|
*/
|
|
138
|
-
value: PropTypes.arrayOf(PropTypes.any)
|
|
238
|
+
value: PropTypes.arrayOf(PropTypes.any),
|
|
239
|
+
/**
|
|
240
|
+
* The variant to use.
|
|
241
|
+
* @default 'outlined'
|
|
242
|
+
*/
|
|
243
|
+
variant: PropTypes.oneOf(['filled', 'outlined', 'standard'])
|
|
139
244
|
} : void 0;
|
|
140
245
|
export { SingleInputDateRangeField };
|
|
@@ -248,11 +248,6 @@ process.env.NODE_ENV !== "production" ? StaticDateRangePicker.propTypes = {
|
|
|
248
248
|
* @returns {void|Promise} -
|
|
249
249
|
*/
|
|
250
250
|
onMonthChange: PropTypes.func,
|
|
251
|
-
/**
|
|
252
|
-
* Callback fired on view change.
|
|
253
|
-
* @param {DateView} view The new view.
|
|
254
|
-
*/
|
|
255
|
-
onViewChange: PropTypes.func,
|
|
256
251
|
/**
|
|
257
252
|
* Props to pass to keyboard adornment button.
|
|
258
253
|
*/
|