@mui/x-date-pickers-pro 6.11.0 → 6.11.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.
- package/CHANGELOG.md +119 -1
- package/DateRangeCalendar/DateRangeCalendar.js +2 -2
- package/DateRangeCalendar/DateRangeCalendar.types.d.ts +2 -2
- package/DateRangePicker/DateRangePicker.js +2 -2
- package/DateRangePickerDay/DateRangePickerDay.js +1 -0
- package/DesktopDateRangePicker/DesktopDateRangePicker.js +2 -2
- package/MobileDateRangePicker/MobileDateRangePicker.js +2 -2
- package/MultiInputDateRangeField/MultiInputDateRangeField.d.ts +3 -0
- package/MultiInputDateRangeField/MultiInputDateRangeField.js +27 -4
- package/MultiInputDateRangeField/MultiInputDateRangeField.types.d.ts +5 -0
- package/MultiInputDateRangeField/index.d.ts +1 -1
- package/MultiInputDateRangeField/index.js +1 -1
- package/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.d.ts +3 -0
- package/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.js +27 -4
- package/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.types.d.ts +5 -0
- package/MultiInputDateTimeRangeField/index.d.ts +1 -1
- package/MultiInputDateTimeRangeField/index.js +1 -1
- package/MultiInputTimeRangeField/MultiInputTimeRangeField.d.ts +3 -0
- package/MultiInputTimeRangeField/MultiInputTimeRangeField.js +27 -4
- package/MultiInputTimeRangeField/MultiInputTimeRangeField.types.d.ts +5 -0
- package/MultiInputTimeRangeField/index.d.ts +1 -1
- package/MultiInputTimeRangeField/index.js +1 -1
- package/SingleInputDateRangeField/SingleInputDateRangeField.js +1 -0
- package/SingleInputDateTimeRangeField/SingleInputDateTimeRangeField.js +1 -0
- package/SingleInputTimeRangeField/SingleInputTimeRangeField.js +1 -0
- package/StaticDateRangePicker/StaticDateRangePicker.js +2 -2
- package/index.js +1 -1
- package/internals/hooks/useDesktopRangePicker/useDesktopRangePicker.js +3 -1
- package/internals/utils/releaseInfo.js +1 -1
- package/legacy/DateRangeCalendar/DateRangeCalendar.js +2 -2
- package/legacy/DateRangePicker/DateRangePicker.js +2 -2
- package/legacy/DateRangePickerDay/DateRangePickerDay.js +1 -0
- package/legacy/DesktopDateRangePicker/DesktopDateRangePicker.js +2 -2
- package/legacy/MobileDateRangePicker/MobileDateRangePicker.js +2 -2
- package/legacy/MultiInputDateRangeField/MultiInputDateRangeField.js +26 -3
- package/legacy/MultiInputDateRangeField/index.js +1 -1
- package/legacy/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.js +26 -3
- package/legacy/MultiInputDateTimeRangeField/index.js +1 -1
- package/legacy/MultiInputTimeRangeField/MultiInputTimeRangeField.js +26 -3
- package/legacy/MultiInputTimeRangeField/index.js +1 -1
- package/legacy/SingleInputDateRangeField/SingleInputDateRangeField.js +1 -0
- package/legacy/SingleInputDateTimeRangeField/SingleInputDateTimeRangeField.js +1 -0
- package/legacy/SingleInputTimeRangeField/SingleInputTimeRangeField.js +1 -0
- package/legacy/StaticDateRangePicker/StaticDateRangePicker.js +2 -2
- package/legacy/index.js +1 -1
- package/legacy/internals/hooks/useDesktopRangePicker/useDesktopRangePicker.js +3 -1
- package/legacy/internals/utils/releaseInfo.js +1 -1
- package/legacy/models/index.js +2 -1
- package/legacy/models/multiInputRangeFieldClasses.js +1 -0
- package/legacy/tests/describeRangeValidation/testDayViewRangeValidation.js +1 -1
- package/legacy/tests/describeRangeValidation/testTextFieldKeyboardRangeValidation.js +1 -1
- package/legacy/tests/describeRangeValidation/testTextFieldRangeValidation.js +1 -1
- package/models/index.d.ts +1 -0
- package/models/index.js +2 -1
- package/models/multiInputRangeFieldClasses.d.ts +7 -0
- package/models/multiInputRangeFieldClasses.js +1 -0
- package/modern/DateRangeCalendar/DateRangeCalendar.js +2 -2
- package/modern/DateRangePicker/DateRangePicker.js +2 -2
- package/modern/DateRangePickerDay/DateRangePickerDay.js +1 -0
- package/modern/DesktopDateRangePicker/DesktopDateRangePicker.js +2 -2
- package/modern/MobileDateRangePicker/MobileDateRangePicker.js +2 -2
- package/modern/MultiInputDateRangeField/MultiInputDateRangeField.js +27 -4
- package/modern/MultiInputDateRangeField/index.js +1 -1
- package/modern/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.js +27 -4
- package/modern/MultiInputDateTimeRangeField/index.js +1 -1
- package/modern/MultiInputTimeRangeField/MultiInputTimeRangeField.js +27 -4
- package/modern/MultiInputTimeRangeField/index.js +1 -1
- package/modern/SingleInputDateRangeField/SingleInputDateRangeField.js +1 -0
- package/modern/SingleInputDateTimeRangeField/SingleInputDateTimeRangeField.js +1 -0
- package/modern/SingleInputTimeRangeField/SingleInputTimeRangeField.js +1 -0
- package/modern/StaticDateRangePicker/StaticDateRangePicker.js +2 -2
- package/modern/index.js +1 -1
- package/modern/internals/hooks/useDesktopRangePicker/useDesktopRangePicker.js +3 -1
- package/modern/internals/utils/releaseInfo.js +1 -1
- package/modern/models/index.js +2 -1
- package/modern/models/multiInputRangeFieldClasses.js +1 -0
- package/modern/tests/describeRangeValidation/testDayViewRangeValidation.js +1 -1
- package/modern/tests/describeRangeValidation/testTextFieldKeyboardRangeValidation.js +1 -1
- package/modern/tests/describeRangeValidation/testTextFieldRangeValidation.js +1 -1
- package/node/DateRangeCalendar/DateRangeCalendar.js +2 -2
- package/node/DateRangePicker/DateRangePicker.js +2 -2
- package/node/DateRangePickerDay/DateRangePickerDay.js +1 -0
- package/node/DesktopDateRangePicker/DesktopDateRangePicker.js +2 -2
- package/node/MobileDateRangePicker/MobileDateRangePicker.js +2 -2
- package/node/MultiInputDateRangeField/MultiInputDateRangeField.js +30 -5
- package/node/MultiInputDateRangeField/index.js +12 -0
- package/node/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.js +30 -5
- package/node/MultiInputDateTimeRangeField/index.js +12 -0
- package/node/MultiInputTimeRangeField/MultiInputTimeRangeField.js +30 -5
- package/node/MultiInputTimeRangeField/index.js +12 -0
- package/node/SingleInputDateRangeField/SingleInputDateRangeField.js +1 -0
- package/node/SingleInputDateTimeRangeField/SingleInputDateTimeRangeField.js +1 -0
- package/node/SingleInputTimeRangeField/SingleInputTimeRangeField.js +1 -0
- package/node/StaticDateRangePicker/StaticDateRangePicker.js +2 -2
- package/node/index.js +1 -1
- package/node/internals/hooks/useDesktopRangePicker/useDesktopRangePicker.js +3 -1
- package/node/internals/utils/releaseInfo.js +1 -1
- package/node/models/index.js +11 -0
- package/node/models/multiInputRangeFieldClasses.js +5 -0
- package/node/tests/describeRangeValidation/testDayViewRangeValidation.js +21 -21
- package/node/tests/describeRangeValidation/testTextFieldKeyboardRangeValidation.js +30 -30
- package/node/tests/describeRangeValidation/testTextFieldRangeValidation.js +32 -32
- package/package.json +4 -4
- package/tests/describeRangeValidation/testDayViewRangeValidation.js +1 -1
- package/tests/describeRangeValidation/testTextFieldKeyboardRangeValidation.js +1 -1
- package/tests/describeRangeValidation/testTextFieldRangeValidation.js +1 -1
- package/themeAugmentation/components.d.ts +0 -7
- package/themeAugmentation/overrides.d.ts +4 -14
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,124 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## 6.11.2
|
|
7
|
+
|
|
8
|
+
_Aug 17, 2023_
|
|
9
|
+
|
|
10
|
+
We'd like to offer a big thanks to the 8 contributors who made this release possible. Here are some highlights ✨:
|
|
11
|
+
|
|
12
|
+
- 🏎️ Lower the filtering delay in the grid
|
|
13
|
+
- 🌍 Improve Spanish (es-ES) locale on the data grid
|
|
14
|
+
- 🐞 Bugfixes
|
|
15
|
+
- 📚 Documentation improvements
|
|
16
|
+
|
|
17
|
+
### Data Grid
|
|
18
|
+
|
|
19
|
+
#### `@mui/x-data-grid@v6.11.2`
|
|
20
|
+
|
|
21
|
+
- [DataGrid] Fix `eval` blocked by CSP (#9863) @romgrk
|
|
22
|
+
- [DataGrid] Fix row id bug (#10051) @romgrk
|
|
23
|
+
- [DataGrid] Honor `disableExport` flag in Print Export (#10044) @MBilalShafi
|
|
24
|
+
- [DataGrid] Lower filter debounce delay (#9712) @romgrk
|
|
25
|
+
- [DataGrid] Unhide potential ref binding issue (#9965) @oliviertassinari
|
|
26
|
+
- [l10n] Improve Chinese (zh-CN) and Chinese(traditional) (zh-TW) locales (#9999) @MyNameIsTakenOMG
|
|
27
|
+
- [l10n] Improve Spanish (es-ES) locale (#10037) @Macampu420
|
|
28
|
+
|
|
29
|
+
#### `@mui/x-data-grid-pro@v6.11.2` [](https://mui.com/r/x-pro-svg-link)
|
|
30
|
+
|
|
31
|
+
Same changes as in `@mui/x-data-grid@v6.11.2`.
|
|
32
|
+
|
|
33
|
+
#### `@mui/x-data-grid-premium@v6.11.2` [](https://mui.com/r/x-premium-svg-link)
|
|
34
|
+
|
|
35
|
+
Same changes as in `@mui/x-data-grid-pro@v6.11.2`.
|
|
36
|
+
|
|
37
|
+
### Date Pickers
|
|
38
|
+
|
|
39
|
+
#### `@mui/x-date-pickers@v6.11.2`
|
|
40
|
+
|
|
41
|
+
- [pickers] Fix month switcher RTL (#10003) @alexfauquette
|
|
42
|
+
- [pickers] Follow-up on using device motion reduction preference (#9858) @LukasTy
|
|
43
|
+
- [pickers] Pass the shortcut information in the `onChange` context (#9985) @flaviendelangle
|
|
44
|
+
- [pickers] Replace `Grid` toolbar component with a styled `div` (#10052) @LukasTy
|
|
45
|
+
|
|
46
|
+
#### `@mui/x-date-pickers-pro@v6.11.2` [](https://mui.com/r/x-pro-svg-link)
|
|
47
|
+
|
|
48
|
+
Same changes as in `@mui/x-date-pickers@v6.11.2`.
|
|
49
|
+
|
|
50
|
+
### Docs
|
|
51
|
+
|
|
52
|
+
- [docs] Add migration guide for the Tree View (#9987) @flaviendelangle
|
|
53
|
+
- [docs] Fix en-US changelog @oliviertassinari
|
|
54
|
+
- [docs] Update column types (#10040) @romgrk
|
|
55
|
+
|
|
56
|
+
### Core
|
|
57
|
+
|
|
58
|
+
- [core] Remove unnecessary Box (#9831) @oliviertassinari
|
|
59
|
+
- [core] Set GitHub Action top level permission @oliviertassinari
|
|
60
|
+
- [core] Split the pickers test utils (#9976) @flaviendelangle
|
|
61
|
+
|
|
62
|
+
## 6.11.1
|
|
63
|
+
|
|
64
|
+
_Aug 11, 2023_
|
|
65
|
+
|
|
66
|
+
We'd like to offer a big thanks to the 8 contributors who made this release possible. Here are some highlights ✨:
|
|
67
|
+
|
|
68
|
+
- 💫 Add theme augmentation to `@mui/x-tree-view`
|
|
69
|
+
- 📈 Enable charts customization using `slot` and `slotProps` props
|
|
70
|
+
- 🌍 Improve Finnish (fi-FI) and Icelandic (is-IS) locales on the pickers
|
|
71
|
+
- 🐞 Bugfixes
|
|
72
|
+
- 📚 Documentation improvements
|
|
73
|
+
|
|
74
|
+
### Data Grid
|
|
75
|
+
|
|
76
|
+
#### `@mui/x-data-grid@6.11.1`
|
|
77
|
+
|
|
78
|
+
- [DataGrid] `getCellAggregationResult`: Handle `null` `rowNode` case (#9915) @romgrk
|
|
79
|
+
|
|
80
|
+
#### `@mui/x-data-grid-pro@6.11.1` [](https://mui.com/r/x-pro-svg-link)
|
|
81
|
+
|
|
82
|
+
Same changes as in `@mui/x-data-grid@6.11.1`.
|
|
83
|
+
|
|
84
|
+
#### `@mui/x-data-grid-premium@6.11.1` [](https://mui.com/r/x-premium-svg-link)
|
|
85
|
+
|
|
86
|
+
Same changes as in `@mui/x-data-grid-pro@6.11.1`.
|
|
87
|
+
|
|
88
|
+
### Date Pickers
|
|
89
|
+
|
|
90
|
+
#### `@mui/x-date-pickers@6.11.1`
|
|
91
|
+
|
|
92
|
+
- [fields] Use `numeric` `inputmode` instead of `tel` (#9918) @LukasTy
|
|
93
|
+
- [pickers] Always respect locale when formatting meridiem (#9979) @flaviendelangle
|
|
94
|
+
- [pickers] Call `onChange` when selecting a shortcut with `changeImportance="set"` (#9974) @flaviendelangle
|
|
95
|
+
- [pickers] Refactor `themeAugmentation` `styleOverrides` (#9978) @LukasTy
|
|
96
|
+
- [l10n] Improve Finnish (fi-FI) locale (#9795) @kurkle
|
|
97
|
+
- [l10n] Improve Icelandic (is-IS) locale (#9639) @magnimarels
|
|
98
|
+
|
|
99
|
+
#### `@mui/x-date-pickers-pro@6.11.1` [](https://mui.com/r/x-pro-svg-link)
|
|
100
|
+
|
|
101
|
+
Same changes as in `@mui/x-date-pickers@6.11.1`.
|
|
102
|
+
|
|
103
|
+
### Charts / `@mui/x-charts@v6.0.0-alpha.7`
|
|
104
|
+
|
|
105
|
+
- [charts] Fix label and tick alignment (#9952) @LukasTy
|
|
106
|
+
- [charts] Remove not functional component `styleOverrides` (#9996) @LukasTy
|
|
107
|
+
- [charts] Set custom ticks number (#9922) @alexfauquette
|
|
108
|
+
- [charts] Use `slot`/`slotProps` for customization (#9744) @alexfauquette
|
|
109
|
+
- [charts] Extend cheerful fiesta palette (#9980) @noraleonte
|
|
110
|
+
|
|
111
|
+
### Tree View / `@mui/x-tree-view@v6.0.0-alpha.1`
|
|
112
|
+
|
|
113
|
+
- [TreeView] Add theme augmentation (#9967) @flaviendelangle
|
|
114
|
+
|
|
115
|
+
### Docs
|
|
116
|
+
|
|
117
|
+
- [docs] Clarify the `shouldDisableClock` migration code options (#9920) @LukasTy
|
|
118
|
+
|
|
119
|
+
### Core
|
|
120
|
+
|
|
121
|
+
- [core] Port GitHub workflow for ensuring triage label is present (#9924) @DanailH
|
|
122
|
+
- [docs-infra] Fix the import samples in Api pages (#9898) @alexfauquette
|
|
123
|
+
|
|
6
124
|
## 6.11.0
|
|
7
125
|
|
|
8
126
|
_Aug 4, 2023_
|
|
@@ -2810,7 +2928,7 @@ We'd like to offer a big thanks to the 8 contributors who made this release poss
|
|
|
2810
2928
|
|
|
2811
2929
|
#### Changes
|
|
2812
2930
|
|
|
2813
|
-
- [DateRangePicker] Fix input focused style and mobile
|
|
2931
|
+
- [DateRangePicker] Fix input focused style and mobile behavior (#6645) @LukasTy
|
|
2814
2932
|
- [fields] Update sections when the locale changes (#6649) @flaviendelangle
|
|
2815
2933
|
- [pickers] Add Ukrainian (uk-UA) locale (#6661) @Dufran
|
|
2816
2934
|
- [pickers] Allow non-controlled usage of the calendar components (#6643) @flaviendelangle
|
|
@@ -610,8 +610,8 @@ process.env.NODE_ENV !== "production" ? DateRangeCalendar.propTypes = {
|
|
|
610
610
|
*/
|
|
611
611
|
readOnly: PropTypes.bool,
|
|
612
612
|
/**
|
|
613
|
-
*
|
|
614
|
-
* @default typeof navigator !== 'undefined' && /(android)/i.test(navigator.userAgent)
|
|
613
|
+
* If `true`, disable heavy animations.
|
|
614
|
+
* @default `@media(prefers-reduced-motion: reduce)` || typeof navigator !== 'undefined' && /(android)/i.test(navigator.userAgent)
|
|
615
615
|
*/
|
|
616
616
|
reduceAnimations: PropTypes.bool,
|
|
617
617
|
/**
|
|
@@ -45,8 +45,8 @@ export interface ExportedDateRangeCalendarProps<TDate> extends ExportedDayCalend
|
|
|
45
45
|
*/
|
|
46
46
|
readOnly?: boolean;
|
|
47
47
|
/**
|
|
48
|
-
*
|
|
49
|
-
* @default typeof navigator !== 'undefined' && /(android)/i.test(navigator.userAgent)
|
|
48
|
+
* If `true`, disable heavy animations.
|
|
49
|
+
* @default `@media(prefers-reduced-motion: reduce)` || typeof navigator !== 'undefined' && /(android)/i.test(navigator.userAgent)
|
|
50
50
|
*/
|
|
51
51
|
reduceAnimations?: boolean;
|
|
52
52
|
/**
|
|
@@ -251,8 +251,8 @@ process.env.NODE_ENV !== "production" ? DateRangePicker.propTypes = {
|
|
|
251
251
|
rangePosition: PropTypes.oneOf(['end', 'start']),
|
|
252
252
|
readOnly: PropTypes.bool,
|
|
253
253
|
/**
|
|
254
|
-
*
|
|
255
|
-
* @default typeof navigator !== 'undefined' && /(android)/i.test(navigator.userAgent)
|
|
254
|
+
* If `true`, disable heavy animations.
|
|
255
|
+
* @default `@media(prefers-reduced-motion: reduce)` || typeof navigator !== 'undefined' && /(android)/i.test(navigator.userAgent)
|
|
256
256
|
*/
|
|
257
257
|
reduceAnimations: PropTypes.bool,
|
|
258
258
|
/**
|
|
@@ -260,8 +260,8 @@ DesktopDateRangePicker.propTypes = {
|
|
|
260
260
|
rangePosition: PropTypes.oneOf(['end', 'start']),
|
|
261
261
|
readOnly: PropTypes.bool,
|
|
262
262
|
/**
|
|
263
|
-
*
|
|
264
|
-
* @default typeof navigator !== 'undefined' && /(android)/i.test(navigator.userAgent)
|
|
263
|
+
* If `true`, disable heavy animations.
|
|
264
|
+
* @default `@media(prefers-reduced-motion: reduce)` || typeof navigator !== 'undefined' && /(android)/i.test(navigator.userAgent)
|
|
265
265
|
*/
|
|
266
266
|
reduceAnimations: PropTypes.bool,
|
|
267
267
|
/**
|
|
@@ -260,8 +260,8 @@ MobileDateRangePicker.propTypes = {
|
|
|
260
260
|
rangePosition: PropTypes.oneOf(['end', 'start']),
|
|
261
261
|
readOnly: PropTypes.bool,
|
|
262
262
|
/**
|
|
263
|
-
*
|
|
264
|
-
* @default typeof navigator !== 'undefined' && /(android)/i.test(navigator.userAgent)
|
|
263
|
+
* If `true`, disable heavy animations.
|
|
264
|
+
* @default `@media(prefers-reduced-motion: reduce)` || typeof navigator !== 'undefined' && /(android)/i.test(navigator.userAgent)
|
|
265
265
|
*/
|
|
266
266
|
reduceAnimations: PropTypes.bool,
|
|
267
267
|
/**
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { MultiInputDateRangeFieldProps } from './MultiInputDateRangeField.types';
|
|
3
|
+
import { MultiInputRangeFieldClasses } from '../models';
|
|
4
|
+
export declare const multiInputDateRangeFieldClasses: MultiInputRangeFieldClasses;
|
|
5
|
+
export declare const getMultiInputDateRangeFieldUtilityClass: (slot: string) => string;
|
|
3
6
|
type MultiInputDateRangeFieldComponent = (<TDate>(props: MultiInputDateRangeFieldProps<TDate> & React.RefAttributes<HTMLInputElement>) => React.JSX.Element) & {
|
|
4
7
|
propTypes?: any;
|
|
5
8
|
};
|
|
@@ -1,19 +1,33 @@
|
|
|
1
1
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
2
2
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
|
-
const _excluded = ["slots", "slotProps", "components", "componentsProps", "disabled", "autoFocus", "unstableStartFieldRef", "unstableEndFieldRef"],
|
|
3
|
+
const _excluded = ["slots", "slotProps", "components", "componentsProps", "disabled", "autoFocus", "unstableStartFieldRef", "unstableEndFieldRef", "className"],
|
|
4
4
|
_excluded2 = ["onKeyDown", "ref", "readOnly", "inputMode"],
|
|
5
5
|
_excluded3 = ["onKeyDown", "ref", "readOnly", "inputMode"];
|
|
6
6
|
import * as React from 'react';
|
|
7
7
|
import PropTypes from 'prop-types';
|
|
8
|
+
import clsx from 'clsx';
|
|
8
9
|
import Stack from '@mui/material/Stack';
|
|
9
10
|
import MuiTextField from '@mui/material/TextField';
|
|
10
11
|
import Typography from '@mui/material/Typography';
|
|
11
12
|
import { styled, useThemeProps } from '@mui/material/styles';
|
|
12
13
|
import { useSlotProps } from '@mui/base/utils';
|
|
14
|
+
import { unstable_composeClasses as composeClasses, unstable_generateUtilityClass as generateUtilityClass, unstable_generateUtilityClasses as generateUtilityClasses } from '@mui/utils';
|
|
13
15
|
import { splitFieldInternalAndForwardedProps, uncapitalizeObjectKeys } from '@mui/x-date-pickers/internals';
|
|
14
16
|
import { useMultiInputDateRangeField } from '../internals/hooks/useMultiInputRangeField/useMultiInputDateRangeField';
|
|
15
17
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
16
18
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
19
|
+
export const multiInputDateRangeFieldClasses = generateUtilityClasses('MuiMultiInputDateRangeField', ['root', 'separator']);
|
|
20
|
+
export const getMultiInputDateRangeFieldUtilityClass = slot => generateUtilityClass('MuiMultiInputDateRangeField', slot);
|
|
21
|
+
const useUtilityClasses = ownerState => {
|
|
22
|
+
const {
|
|
23
|
+
classes
|
|
24
|
+
} = ownerState;
|
|
25
|
+
const slots = {
|
|
26
|
+
root: ['root'],
|
|
27
|
+
separator: ['separator']
|
|
28
|
+
};
|
|
29
|
+
return composeClasses(slots, getMultiInputDateRangeFieldUtilityClass, classes);
|
|
30
|
+
};
|
|
17
31
|
const MultiInputDateRangeFieldRoot = styled( /*#__PURE__*/React.forwardRef((props, ref) => /*#__PURE__*/_jsx(Stack, _extends({
|
|
18
32
|
ref: ref,
|
|
19
33
|
spacing: 2,
|
|
@@ -52,12 +66,14 @@ const MultiInputDateRangeField = /*#__PURE__*/React.forwardRef(function MultiInp
|
|
|
52
66
|
disabled,
|
|
53
67
|
autoFocus,
|
|
54
68
|
unstableStartFieldRef,
|
|
55
|
-
unstableEndFieldRef
|
|
69
|
+
unstableEndFieldRef,
|
|
70
|
+
className
|
|
56
71
|
} = forwardedProps,
|
|
57
72
|
otherForwardedProps = _objectWithoutPropertiesLoose(forwardedProps, _excluded);
|
|
58
73
|
const slots = innerSlots != null ? innerSlots : uncapitalizeObjectKeys(components);
|
|
59
74
|
const slotProps = innerSlotProps != null ? innerSlotProps : componentsProps;
|
|
60
75
|
const ownerState = themeProps;
|
|
76
|
+
const classes = useUtilityClasses(ownerState);
|
|
61
77
|
const Root = (_slots$root = slots == null ? void 0 : slots.root) != null ? _slots$root : MultiInputDateRangeFieldRoot;
|
|
62
78
|
const rootProps = useSlotProps({
|
|
63
79
|
elementType: Root,
|
|
@@ -66,7 +82,8 @@ const MultiInputDateRangeField = /*#__PURE__*/React.forwardRef(function MultiInp
|
|
|
66
82
|
additionalProps: {
|
|
67
83
|
ref
|
|
68
84
|
},
|
|
69
|
-
ownerState
|
|
85
|
+
ownerState,
|
|
86
|
+
className: clsx(className, classes.root)
|
|
70
87
|
});
|
|
71
88
|
const TextField = (_slots$textField = slots == null ? void 0 : slots.textField) != null ? _slots$textField : MuiTextField;
|
|
72
89
|
const startTextFieldProps = useSlotProps({
|
|
@@ -90,7 +107,8 @@ const MultiInputDateRangeField = /*#__PURE__*/React.forwardRef(function MultiInp
|
|
|
90
107
|
const separatorProps = useSlotProps({
|
|
91
108
|
elementType: Separator,
|
|
92
109
|
externalSlotProps: (_slotProps$separator = slotProps == null ? void 0 : slotProps.separator) != null ? _slotProps$separator : componentsProps == null ? void 0 : componentsProps.separator,
|
|
93
|
-
ownerState
|
|
110
|
+
ownerState,
|
|
111
|
+
className: classes.separator
|
|
94
112
|
});
|
|
95
113
|
const _useMultiInputDateRan = useMultiInputDateRangeField({
|
|
96
114
|
sharedProps: _extends({}, dateFieldInternalProps, {
|
|
@@ -152,7 +170,12 @@ process.env.NODE_ENV !== "production" ? MultiInputDateRangeField.propTypes = {
|
|
|
152
170
|
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
|
153
171
|
// ----------------------------------------------------------------------
|
|
154
172
|
autoFocus: PropTypes.bool,
|
|
173
|
+
/**
|
|
174
|
+
* Override or extend the styles applied to the component.
|
|
175
|
+
*/
|
|
176
|
+
classes: PropTypes.object,
|
|
155
177
|
className: PropTypes.string,
|
|
178
|
+
component: PropTypes.elementType,
|
|
156
179
|
/**
|
|
157
180
|
* Overridable components.
|
|
158
181
|
* @default {}
|
|
@@ -9,6 +9,7 @@ import { UseDateRangeFieldProps } from '../internals/models/dateRange';
|
|
|
9
9
|
import { RangePosition } from '../internals/models/range';
|
|
10
10
|
import { UseMultiInputRangeFieldParams } from '../internals/hooks/useMultiInputRangeField/useMultiInputRangeField.types';
|
|
11
11
|
import { RangeFieldSection } from '../internals/models/fields';
|
|
12
|
+
import { MultiInputRangeFieldClasses } from '../models';
|
|
12
13
|
export type UseMultiInputDateRangeFieldParams<TDate, TTextFieldSlotProps extends {}> = UseMultiInputRangeFieldParams<UseMultiInputDateRangeFieldProps<TDate>, TTextFieldSlotProps>;
|
|
13
14
|
export interface UseMultiInputDateRangeFieldProps<TDate> extends Omit<UseDateRangeFieldProps<TDate>, 'unstableFieldRef'> {
|
|
14
15
|
unstableStartFieldRef?: React.Ref<FieldRef<RangeFieldSection>>;
|
|
@@ -17,6 +18,10 @@ export interface UseMultiInputDateRangeFieldProps<TDate> extends Omit<UseDateRan
|
|
|
17
18
|
export type UseMultiInputDateRangeFieldComponentProps<TDate, TChildProps extends {}> = Omit<TChildProps, keyof UseMultiInputDateRangeFieldProps<TDate>> & UseMultiInputDateRangeFieldProps<TDate>;
|
|
18
19
|
export interface MultiInputDateRangeFieldProps<TDate> extends UseMultiInputDateRangeFieldComponentProps<TDate, Omit<StackProps, 'position'>> {
|
|
19
20
|
autoFocus?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Override or extend the styles applied to the component.
|
|
23
|
+
*/
|
|
24
|
+
classes?: Partial<MultiInputRangeFieldClasses>;
|
|
20
25
|
/**
|
|
21
26
|
* Overridable components.
|
|
22
27
|
* @default {}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { MultiInputDateRangeField } from './MultiInputDateRangeField';
|
|
1
|
+
export { MultiInputDateRangeField, getMultiInputDateRangeFieldUtilityClass, multiInputDateRangeFieldClasses, } from './MultiInputDateRangeField';
|
|
2
2
|
export { useMultiInputDateRangeField as unstable_useMultiInputDateRangeField } from '../internals/hooks/useMultiInputRangeField/useMultiInputDateRangeField';
|
|
3
3
|
export type { UseMultiInputDateRangeFieldProps, UseMultiInputDateRangeFieldComponentProps, MultiInputDateRangeFieldProps, } from './MultiInputDateRangeField.types';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { MultiInputDateRangeField } from './MultiInputDateRangeField';
|
|
1
|
+
export { MultiInputDateRangeField, getMultiInputDateRangeFieldUtilityClass, multiInputDateRangeFieldClasses } from './MultiInputDateRangeField';
|
|
2
2
|
export { useMultiInputDateRangeField as unstable_useMultiInputDateRangeField } from '../internals/hooks/useMultiInputRangeField/useMultiInputDateRangeField';
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { MultiInputDateTimeRangeFieldProps } from './MultiInputDateTimeRangeField.types';
|
|
3
|
+
import { MultiInputRangeFieldClasses } from '../models';
|
|
4
|
+
export declare const multiInputDateTimeRangeFieldClasses: MultiInputRangeFieldClasses;
|
|
5
|
+
export declare const getMultiInputDateTimeRangeFieldUtilityClass: (slot: string) => string;
|
|
3
6
|
type MultiInputDateTimeRangeFieldComponent = (<TDate>(props: MultiInputDateTimeRangeFieldProps<TDate> & React.RefAttributes<HTMLInputElement>) => React.JSX.Element) & {
|
|
4
7
|
propTypes?: any;
|
|
5
8
|
};
|
|
@@ -1,19 +1,33 @@
|
|
|
1
1
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
2
2
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
|
-
const _excluded = ["slots", "slotProps", "components", "componentsProps", "disabled", "autoFocus", "unstableStartFieldRef", "unstableEndFieldRef"],
|
|
3
|
+
const _excluded = ["slots", "slotProps", "components", "componentsProps", "disabled", "autoFocus", "unstableStartFieldRef", "unstableEndFieldRef", "className"],
|
|
4
4
|
_excluded2 = ["onKeyDown", "ref", "readOnly", "inputMode"],
|
|
5
5
|
_excluded3 = ["onKeyDown", "ref", "readOnly", "inputMode"];
|
|
6
6
|
import * as React from 'react';
|
|
7
7
|
import PropTypes from 'prop-types';
|
|
8
|
+
import clsx from 'clsx';
|
|
8
9
|
import Stack from '@mui/material/Stack';
|
|
9
10
|
import MuiTextField from '@mui/material/TextField';
|
|
10
11
|
import Typography from '@mui/material/Typography';
|
|
11
12
|
import { styled, useThemeProps } from '@mui/material/styles';
|
|
12
13
|
import { useSlotProps } from '@mui/base/utils';
|
|
14
|
+
import { unstable_composeClasses as composeClasses, unstable_generateUtilityClass as generateUtilityClass, unstable_generateUtilityClasses as generateUtilityClasses } from '@mui/utils';
|
|
13
15
|
import { splitFieldInternalAndForwardedProps, uncapitalizeObjectKeys } from '@mui/x-date-pickers/internals';
|
|
14
16
|
import { useMultiInputDateTimeRangeField } from '../internals/hooks/useMultiInputRangeField/useMultiInputDateTimeRangeField';
|
|
15
17
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
16
18
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
19
|
+
export const multiInputDateTimeRangeFieldClasses = generateUtilityClasses('MuiMultiInputDateTimeRangeField', ['root', 'separator']);
|
|
20
|
+
export const getMultiInputDateTimeRangeFieldUtilityClass = slot => generateUtilityClass('MuiMultiInputDateTimeRangeField', slot);
|
|
21
|
+
const useUtilityClasses = ownerState => {
|
|
22
|
+
const {
|
|
23
|
+
classes
|
|
24
|
+
} = ownerState;
|
|
25
|
+
const slots = {
|
|
26
|
+
root: ['root'],
|
|
27
|
+
separator: ['separator']
|
|
28
|
+
};
|
|
29
|
+
return composeClasses(slots, getMultiInputDateTimeRangeFieldUtilityClass, classes);
|
|
30
|
+
};
|
|
17
31
|
const MultiInputDateTimeRangeFieldRoot = styled( /*#__PURE__*/React.forwardRef((props, ref) => /*#__PURE__*/_jsx(Stack, _extends({
|
|
18
32
|
ref: ref,
|
|
19
33
|
spacing: 2,
|
|
@@ -52,12 +66,14 @@ const MultiInputDateTimeRangeField = /*#__PURE__*/React.forwardRef(function Mult
|
|
|
52
66
|
disabled,
|
|
53
67
|
autoFocus,
|
|
54
68
|
unstableStartFieldRef,
|
|
55
|
-
unstableEndFieldRef
|
|
69
|
+
unstableEndFieldRef,
|
|
70
|
+
className
|
|
56
71
|
} = forwardedProps,
|
|
57
72
|
otherForwardedProps = _objectWithoutPropertiesLoose(forwardedProps, _excluded);
|
|
58
73
|
const slots = innerSlots != null ? innerSlots : uncapitalizeObjectKeys(components);
|
|
59
74
|
const slotProps = innerSlotProps != null ? innerSlotProps : componentsProps;
|
|
60
75
|
const ownerState = themeProps;
|
|
76
|
+
const classes = useUtilityClasses(ownerState);
|
|
61
77
|
const Root = (_slots$root = slots == null ? void 0 : slots.root) != null ? _slots$root : MultiInputDateTimeRangeFieldRoot;
|
|
62
78
|
const rootProps = useSlotProps({
|
|
63
79
|
elementType: Root,
|
|
@@ -66,7 +82,8 @@ const MultiInputDateTimeRangeField = /*#__PURE__*/React.forwardRef(function Mult
|
|
|
66
82
|
additionalProps: {
|
|
67
83
|
ref
|
|
68
84
|
},
|
|
69
|
-
ownerState
|
|
85
|
+
ownerState,
|
|
86
|
+
className: clsx(className, classes.root)
|
|
70
87
|
});
|
|
71
88
|
const TextField = (_slots$textField = slots == null ? void 0 : slots.textField) != null ? _slots$textField : MuiTextField;
|
|
72
89
|
const startTextFieldProps = useSlotProps({
|
|
@@ -90,7 +107,8 @@ const MultiInputDateTimeRangeField = /*#__PURE__*/React.forwardRef(function Mult
|
|
|
90
107
|
const separatorProps = useSlotProps({
|
|
91
108
|
elementType: Separator,
|
|
92
109
|
externalSlotProps: slotProps == null ? void 0 : slotProps.separator,
|
|
93
|
-
ownerState
|
|
110
|
+
ownerState,
|
|
111
|
+
className: classes.separator
|
|
94
112
|
});
|
|
95
113
|
const _useMultiInputDateTim = useMultiInputDateTimeRangeField({
|
|
96
114
|
sharedProps: _extends({}, dateTimeFieldInternalProps, {
|
|
@@ -157,7 +175,12 @@ process.env.NODE_ENV !== "production" ? MultiInputDateTimeRangeField.propTypes =
|
|
|
157
175
|
*/
|
|
158
176
|
ampm: PropTypes.bool,
|
|
159
177
|
autoFocus: PropTypes.bool,
|
|
178
|
+
/**
|
|
179
|
+
* Override or extend the styles applied to the component.
|
|
180
|
+
*/
|
|
181
|
+
classes: PropTypes.object,
|
|
160
182
|
className: PropTypes.string,
|
|
183
|
+
component: PropTypes.elementType,
|
|
161
184
|
/**
|
|
162
185
|
* Overridable components.
|
|
163
186
|
* @default {}
|
|
@@ -9,6 +9,7 @@ import { UseDateTimeRangeFieldDefaultizedProps, UseDateTimeRangeFieldProps } fro
|
|
|
9
9
|
import { RangePosition } from '../internals/models/range';
|
|
10
10
|
import { RangeFieldSection } from '../internals/models/fields';
|
|
11
11
|
import { UseMultiInputRangeFieldParams } from '../internals/hooks/useMultiInputRangeField/useMultiInputRangeField.types';
|
|
12
|
+
import { MultiInputRangeFieldClasses } from '../models';
|
|
12
13
|
export type UseMultiInputDateTimeRangeFieldParams<TDate, TTextFieldSlotProps extends {}> = UseMultiInputRangeFieldParams<UseMultiInputDateTimeRangeFieldProps<TDate>, TTextFieldSlotProps>;
|
|
13
14
|
export interface UseMultiInputDateTimeRangeFieldProps<TDate> extends Omit<UseDateTimeRangeFieldProps<TDate>, 'unstableFieldRef'> {
|
|
14
15
|
unstableStartFieldRef?: React.Ref<FieldRef<RangeFieldSection>>;
|
|
@@ -17,6 +18,10 @@ export interface UseMultiInputDateTimeRangeFieldProps<TDate> extends Omit<UseDat
|
|
|
17
18
|
export type UseMultiInputDateTimeRangeFieldComponentProps<TDate, TChildProps extends {}> = Omit<TChildProps, keyof UseMultiInputDateTimeRangeFieldProps<TDate>> & UseMultiInputDateTimeRangeFieldProps<TDate>;
|
|
18
19
|
export interface MultiInputDateTimeRangeFieldProps<TDate> extends UseMultiInputDateTimeRangeFieldComponentProps<TDate, Omit<StackProps, 'position'>> {
|
|
19
20
|
autoFocus?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Override or extend the styles applied to the component.
|
|
23
|
+
*/
|
|
24
|
+
classes?: Partial<MultiInputRangeFieldClasses>;
|
|
20
25
|
/**
|
|
21
26
|
* Overridable components.
|
|
22
27
|
* @default {}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { MultiInputDateTimeRangeField } from './MultiInputDateTimeRangeField';
|
|
1
|
+
export { MultiInputDateTimeRangeField, getMultiInputDateTimeRangeFieldUtilityClass, multiInputDateTimeRangeFieldClasses, } from './MultiInputDateTimeRangeField';
|
|
2
2
|
export { useMultiInputDateTimeRangeField as unstable_useMultiInputDateTimeRangeField } from '../internals/hooks/useMultiInputRangeField/useMultiInputDateTimeRangeField';
|
|
3
3
|
export type { UseMultiInputDateTimeRangeFieldProps, UseMultiInputDateTimeRangeFieldComponentProps, MultiInputDateTimeRangeFieldProps, } from './MultiInputDateTimeRangeField.types';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { MultiInputDateTimeRangeField } from './MultiInputDateTimeRangeField';
|
|
1
|
+
export { MultiInputDateTimeRangeField, getMultiInputDateTimeRangeFieldUtilityClass, multiInputDateTimeRangeFieldClasses } from './MultiInputDateTimeRangeField';
|
|
2
2
|
export { useMultiInputDateTimeRangeField as unstable_useMultiInputDateTimeRangeField } from '../internals/hooks/useMultiInputRangeField/useMultiInputDateTimeRangeField';
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { MultiInputTimeRangeFieldProps } from './MultiInputTimeRangeField.types';
|
|
3
|
+
import { MultiInputRangeFieldClasses } from '../models';
|
|
4
|
+
export declare const multiInputTimeRangeFieldClasses: MultiInputRangeFieldClasses;
|
|
5
|
+
export declare const getMultiInputTimeRangeFieldUtilityClass: (slot: string) => string;
|
|
3
6
|
type MultiInputTimeRangeFieldComponent = (<TDate>(props: MultiInputTimeRangeFieldProps<TDate> & React.RefAttributes<HTMLInputElement>) => React.JSX.Element) & {
|
|
4
7
|
propTypes?: any;
|
|
5
8
|
};
|
|
@@ -1,19 +1,33 @@
|
|
|
1
1
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
2
2
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
|
-
const _excluded = ["slots", "slotProps", "components", "componentsProps", "disabled", "autoFocus", "unstableStartFieldRef", "unstableEndFieldRef"],
|
|
3
|
+
const _excluded = ["slots", "slotProps", "components", "componentsProps", "disabled", "autoFocus", "unstableStartFieldRef", "unstableEndFieldRef", "className"],
|
|
4
4
|
_excluded2 = ["onKeyDown", "ref", "readOnly", "inputMode"],
|
|
5
5
|
_excluded3 = ["onKeyDown", "ref", "readOnly", "inputMode"];
|
|
6
6
|
import * as React from 'react';
|
|
7
7
|
import PropTypes from 'prop-types';
|
|
8
|
+
import { clsx } from 'clsx';
|
|
8
9
|
import Stack from '@mui/material/Stack';
|
|
9
10
|
import MuiTextField from '@mui/material/TextField';
|
|
10
11
|
import Typography from '@mui/material/Typography';
|
|
11
12
|
import { styled, useThemeProps } from '@mui/material/styles';
|
|
12
13
|
import { useSlotProps } from '@mui/base/utils';
|
|
14
|
+
import { unstable_composeClasses as composeClasses, unstable_generateUtilityClass as generateUtilityClass, unstable_generateUtilityClasses as generateUtilityClasses } from '@mui/utils';
|
|
13
15
|
import { splitFieldInternalAndForwardedProps, uncapitalizeObjectKeys } from '@mui/x-date-pickers/internals';
|
|
14
16
|
import { useMultiInputTimeRangeField } from '../internals/hooks/useMultiInputRangeField/useMultiInputTimeRangeField';
|
|
15
17
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
16
18
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
19
|
+
export const multiInputTimeRangeFieldClasses = generateUtilityClasses('MuiMultiInputTimeRangeField', ['root', 'separator']);
|
|
20
|
+
export const getMultiInputTimeRangeFieldUtilityClass = slot => generateUtilityClass('MuiMultiInputTimeRangeField', slot);
|
|
21
|
+
const useUtilityClasses = ownerState => {
|
|
22
|
+
const {
|
|
23
|
+
classes
|
|
24
|
+
} = ownerState;
|
|
25
|
+
const slots = {
|
|
26
|
+
root: ['root'],
|
|
27
|
+
separator: ['separator']
|
|
28
|
+
};
|
|
29
|
+
return composeClasses(slots, getMultiInputTimeRangeFieldUtilityClass, classes);
|
|
30
|
+
};
|
|
17
31
|
const MultiInputTimeRangeFieldRoot = styled( /*#__PURE__*/React.forwardRef((props, ref) => /*#__PURE__*/_jsx(Stack, _extends({
|
|
18
32
|
ref: ref,
|
|
19
33
|
spacing: 2,
|
|
@@ -52,12 +66,14 @@ const MultiInputTimeRangeField = /*#__PURE__*/React.forwardRef(function MultiInp
|
|
|
52
66
|
disabled,
|
|
53
67
|
autoFocus,
|
|
54
68
|
unstableStartFieldRef,
|
|
55
|
-
unstableEndFieldRef
|
|
69
|
+
unstableEndFieldRef,
|
|
70
|
+
className
|
|
56
71
|
} = forwardedProps,
|
|
57
72
|
otherForwardedProps = _objectWithoutPropertiesLoose(forwardedProps, _excluded);
|
|
58
73
|
const slots = innerSlots != null ? innerSlots : uncapitalizeObjectKeys(components);
|
|
59
74
|
const slotProps = innerSlotProps != null ? innerSlotProps : componentsProps;
|
|
60
75
|
const ownerState = themeProps;
|
|
76
|
+
const classes = useUtilityClasses(ownerState);
|
|
61
77
|
const Root = (_slots$root = slots == null ? void 0 : slots.root) != null ? _slots$root : MultiInputTimeRangeFieldRoot;
|
|
62
78
|
const rootProps = useSlotProps({
|
|
63
79
|
elementType: Root,
|
|
@@ -66,7 +82,8 @@ const MultiInputTimeRangeField = /*#__PURE__*/React.forwardRef(function MultiInp
|
|
|
66
82
|
additionalProps: {
|
|
67
83
|
ref
|
|
68
84
|
},
|
|
69
|
-
ownerState
|
|
85
|
+
ownerState,
|
|
86
|
+
className: clsx(className, classes.root)
|
|
70
87
|
});
|
|
71
88
|
const TextField = (_slots$textField = slots == null ? void 0 : slots.textField) != null ? _slots$textField : MuiTextField;
|
|
72
89
|
const startTextFieldProps = useSlotProps({
|
|
@@ -90,7 +107,8 @@ const MultiInputTimeRangeField = /*#__PURE__*/React.forwardRef(function MultiInp
|
|
|
90
107
|
const separatorProps = useSlotProps({
|
|
91
108
|
elementType: Separator,
|
|
92
109
|
externalSlotProps: slotProps == null ? void 0 : slotProps.separator,
|
|
93
|
-
ownerState
|
|
110
|
+
ownerState,
|
|
111
|
+
className: classes.separator
|
|
94
112
|
});
|
|
95
113
|
const _useMultiInputTimeRan = useMultiInputTimeRangeField({
|
|
96
114
|
sharedProps: _extends({}, timeFieldInternalProps, {
|
|
@@ -157,7 +175,12 @@ process.env.NODE_ENV !== "production" ? MultiInputTimeRangeField.propTypes = {
|
|
|
157
175
|
*/
|
|
158
176
|
ampm: PropTypes.bool,
|
|
159
177
|
autoFocus: PropTypes.bool,
|
|
178
|
+
/**
|
|
179
|
+
* Override or extend the styles applied to the component.
|
|
180
|
+
*/
|
|
181
|
+
classes: PropTypes.object,
|
|
160
182
|
className: PropTypes.string,
|
|
183
|
+
component: PropTypes.elementType,
|
|
161
184
|
/**
|
|
162
185
|
* Overridable components.
|
|
163
186
|
* @default {}
|
|
@@ -9,6 +9,7 @@ import { UseTimeRangeFieldDefaultizedProps, UseTimeRangeFieldProps } from '../in
|
|
|
9
9
|
import { RangePosition } from '../internals/models/range';
|
|
10
10
|
import { UseMultiInputRangeFieldParams } from '../internals/hooks/useMultiInputRangeField/useMultiInputRangeField.types';
|
|
11
11
|
import { RangeFieldSection } from '../internals/models/fields';
|
|
12
|
+
import { MultiInputRangeFieldClasses } from '../models';
|
|
12
13
|
export type UseMultiInputTimeRangeFieldParams<TDate, TTextFieldSlotProps extends {}> = UseMultiInputRangeFieldParams<UseMultiInputTimeRangeFieldProps<TDate>, TTextFieldSlotProps>;
|
|
13
14
|
export interface UseMultiInputTimeRangeFieldProps<TDate> extends Omit<UseTimeRangeFieldProps<TDate>, 'unstableFieldRef'> {
|
|
14
15
|
unstableStartFieldRef?: React.Ref<FieldRef<RangeFieldSection>>;
|
|
@@ -17,6 +18,10 @@ export interface UseMultiInputTimeRangeFieldProps<TDate> extends Omit<UseTimeRan
|
|
|
17
18
|
export type UseMultiInputTimeRangeFieldComponentProps<TDate, TChildProps extends {}> = Omit<TChildProps, keyof UseMultiInputTimeRangeFieldProps<TDate>> & UseMultiInputTimeRangeFieldProps<TDate>;
|
|
18
19
|
export interface MultiInputTimeRangeFieldProps<TDate> extends UseMultiInputTimeRangeFieldComponentProps<TDate, Omit<StackProps, 'position'>> {
|
|
19
20
|
autoFocus?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Override or extend the styles applied to the component.
|
|
23
|
+
*/
|
|
24
|
+
classes?: Partial<MultiInputRangeFieldClasses>;
|
|
20
25
|
/**
|
|
21
26
|
* Overridable components.
|
|
22
27
|
* @default {}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { MultiInputTimeRangeField } from './MultiInputTimeRangeField';
|
|
1
|
+
export { MultiInputTimeRangeField, getMultiInputTimeRangeFieldUtilityClass, multiInputTimeRangeFieldClasses, } from './MultiInputTimeRangeField';
|
|
2
2
|
export { useMultiInputTimeRangeField as unstable_useMultiInputTimeRangeField } from '../internals/hooks/useMultiInputRangeField/useMultiInputTimeRangeField';
|
|
3
3
|
export type { UseMultiInputTimeRangeFieldProps, UseMultiInputTimeRangeFieldComponentProps, MultiInputTimeRangeFieldProps, } from './MultiInputTimeRangeField.types';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { MultiInputTimeRangeField } from './MultiInputTimeRangeField';
|
|
1
|
+
export { MultiInputTimeRangeField, getMultiInputTimeRangeFieldUtilityClass, multiInputTimeRangeFieldClasses } from './MultiInputTimeRangeField';
|
|
2
2
|
export { useMultiInputTimeRangeField as unstable_useMultiInputTimeRangeField } from '../internals/hooks/useMultiInputRangeField/useMultiInputTimeRangeField';
|
|
@@ -86,6 +86,7 @@ process.env.NODE_ENV !== "production" ? SingleInputDateRangeField.propTypes = {
|
|
|
86
86
|
* @default 'primary'
|
|
87
87
|
*/
|
|
88
88
|
color: PropTypes.oneOf(['error', 'info', 'primary', 'secondary', 'success', 'warning']),
|
|
89
|
+
component: PropTypes.elementType,
|
|
89
90
|
/**
|
|
90
91
|
* Overridable components.
|
|
91
92
|
* @default {}
|
|
@@ -91,6 +91,7 @@ process.env.NODE_ENV !== "production" ? SingleInputDateTimeRangeField.propTypes
|
|
|
91
91
|
* @default 'primary'
|
|
92
92
|
*/
|
|
93
93
|
color: PropTypes.oneOf(['error', 'info', 'primary', 'secondary', 'success', 'warning']),
|
|
94
|
+
component: PropTypes.elementType,
|
|
94
95
|
/**
|
|
95
96
|
* Overridable components.
|
|
96
97
|
* @default {}
|
|
@@ -91,6 +91,7 @@ process.env.NODE_ENV !== "production" ? SingleInputTimeRangeField.propTypes = {
|
|
|
91
91
|
* @default 'primary'
|
|
92
92
|
*/
|
|
93
93
|
color: PropTypes.oneOf(['error', 'info', 'primary', 'secondary', 'success', 'warning']),
|
|
94
|
+
component: PropTypes.elementType,
|
|
94
95
|
/**
|
|
95
96
|
* Overridable components.
|
|
96
97
|
* @default {}
|
|
@@ -210,8 +210,8 @@ StaticDateRangePicker.propTypes = {
|
|
|
210
210
|
rangePosition: PropTypes.oneOf(['end', 'start']),
|
|
211
211
|
readOnly: PropTypes.bool,
|
|
212
212
|
/**
|
|
213
|
-
*
|
|
214
|
-
* @default typeof navigator !== 'undefined' && /(android)/i.test(navigator.userAgent)
|
|
213
|
+
* If `true`, disable heavy animations.
|
|
214
|
+
* @default `@media(prefers-reduced-motion: reduce)` || typeof navigator !== 'undefined' && /(android)/i.test(navigator.userAgent)
|
|
215
215
|
*/
|
|
216
216
|
reduceAnimations: PropTypes.bool,
|
|
217
217
|
/**
|
package/index.js
CHANGED