@mui/x-date-pickers-pro 6.0.3 → 6.1.0
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 -0
- package/DateRangeCalendar/useDragRange.d.ts +1 -1
- package/DateRangePicker/DateRangePicker.js +12 -0
- package/DateRangePicker/DateRangePickerToolbar.d.ts +1 -1
- package/DateRangePicker/shared.d.ts +1 -1
- package/DesktopDateRangePicker/DesktopDateRangePicker.js +12 -0
- package/MobileDateRangePicker/MobileDateRangePicker.js +12 -0
- package/MultiInputDateRangeField/MultiInputDateRangeField.js +10 -0
- package/MultiInputDateRangeField/MultiInputDateRangeField.types.d.ts +1 -1
- package/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.js +10 -0
- package/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.types.d.ts +1 -1
- package/MultiInputTimeRangeField/MultiInputTimeRangeField.js +10 -0
- package/MultiInputTimeRangeField/MultiInputTimeRangeField.types.d.ts +1 -1
- package/README.md +2 -2
- package/SingleInputDateRangeField/SingleInputDateRangeField.d.ts +1 -0
- package/SingleInputDateRangeField/SingleInputDateRangeField.js +23 -11
- package/SingleInputDateTimeRangeField/SingleInputDateTimeRangeField.d.ts +1 -0
- package/SingleInputDateTimeRangeField/SingleInputDateTimeRangeField.js +27 -15
- package/SingleInputTimeRangeField/SingleInputTimeRangeField.d.ts +1 -0
- package/SingleInputTimeRangeField/SingleInputTimeRangeField.js +27 -15
- package/dateRangeViewRenderers/dateRangeViewRenderers.d.ts +1 -1
- package/index.js +1 -1
- package/internal/hooks/useDesktopRangePicker/useDesktopRangePicker.d.ts +1 -1
- package/internal/hooks/useDesktopRangePicker/useDesktopRangePicker.js +32 -40
- package/internal/hooks/useDesktopRangePicker/useDesktopRangePicker.types.d.ts +9 -29
- package/internal/hooks/useEnrichedRangePickerFieldProps.d.ts +53 -0
- package/internal/hooks/useEnrichedRangePickerFieldProps.js +202 -0
- package/internal/hooks/useMobileRangePicker/useMobileRangePicker.d.ts +1 -1
- package/internal/hooks/useMobileRangePicker/useMobileRangePicker.js +36 -39
- package/internal/hooks/useMobileRangePicker/useMobileRangePicker.types.d.ts +9 -28
- package/internal/hooks/useMultiInputRangeField/useMultiInputDateRangeField.d.ts +1 -1
- package/internal/hooks/useMultiInputRangeField/useMultiInputDateTimeRangeField.d.ts +1 -1
- package/internal/hooks/useMultiInputRangeField/useMultiInputRangeField.types.d.ts +3 -3
- package/internal/hooks/useMultiInputRangeField/useMultiInputTimeRangeField.d.ts +1 -1
- package/internal/hooks/useRangePosition.d.ts +4 -0
- package/internal/hooks/useRangePosition.js +16 -1
- package/internal/hooks/useStaticRangePicker/useStaticRangePicker.d.ts +1 -1
- package/internal/hooks/useStaticRangePicker/useStaticRangePicker.types.d.ts +3 -2
- package/internal/hooks/validation/useDateRangeValidation.d.ts +2 -1
- package/internal/hooks/validation/useDateTimeRangeValidation.d.ts +2 -1
- package/internal/hooks/validation/useTimeRangeValidation.d.ts +2 -1
- package/internal/models/fields.d.ts +7 -2
- package/internal/models/index.d.ts +1 -0
- package/internal/models/index.js +2 -1
- package/internal/models/rangePickerProps.d.ts +17 -0
- package/internal/models/rangePickerProps.js +1 -0
- package/internal/utils/date-range-manager.d.ts +1 -1
- package/internal/utils/date-utils.d.ts +1 -1
- package/internal/utils/releaseInfo.js +1 -1
- package/internal/utils/valueManagers.d.ts +1 -1
- package/internal/utils/valueManagers.js +23 -21
- package/legacy/DateRangePicker/DateRangePicker.js +12 -0
- package/legacy/DesktopDateRangePicker/DesktopDateRangePicker.js +12 -0
- package/legacy/MobileDateRangePicker/MobileDateRangePicker.js +12 -0
- package/legacy/MultiInputDateRangeField/MultiInputDateRangeField.js +10 -0
- package/legacy/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.js +10 -0
- package/legacy/MultiInputTimeRangeField/MultiInputTimeRangeField.js +10 -0
- package/legacy/SingleInputDateRangeField/SingleInputDateRangeField.js +20 -10
- package/legacy/SingleInputDateTimeRangeField/SingleInputDateTimeRangeField.js +24 -14
- package/legacy/SingleInputTimeRangeField/SingleInputTimeRangeField.js +24 -14
- package/legacy/index.js +1 -1
- package/legacy/internal/hooks/useDesktopRangePicker/useDesktopRangePicker.js +32 -40
- package/legacy/internal/hooks/useEnrichedRangePickerFieldProps.js +200 -0
- package/legacy/internal/hooks/useMobileRangePicker/useMobileRangePicker.js +36 -39
- package/legacy/internal/hooks/useRangePosition.js +16 -1
- package/legacy/internal/models/index.js +2 -1
- package/legacy/internal/models/rangePickerProps.js +1 -0
- package/legacy/internal/utils/releaseInfo.js +1 -1
- package/legacy/internal/utils/valueManagers.js +24 -22
- package/modern/DateRangePicker/DateRangePicker.js +12 -0
- package/modern/DesktopDateRangePicker/DesktopDateRangePicker.js +12 -0
- package/modern/MobileDateRangePicker/MobileDateRangePicker.js +12 -0
- package/modern/MultiInputDateRangeField/MultiInputDateRangeField.js +10 -0
- package/modern/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.js +10 -0
- package/modern/MultiInputTimeRangeField/MultiInputTimeRangeField.js +10 -0
- package/modern/SingleInputDateRangeField/SingleInputDateRangeField.js +23 -11
- package/modern/SingleInputDateTimeRangeField/SingleInputDateTimeRangeField.js +27 -15
- package/modern/SingleInputTimeRangeField/SingleInputTimeRangeField.js +27 -15
- package/modern/index.js +1 -1
- package/modern/internal/hooks/useDesktopRangePicker/useDesktopRangePicker.js +30 -38
- package/modern/internal/hooks/useEnrichedRangePickerFieldProps.js +195 -0
- package/modern/internal/hooks/useMobileRangePicker/useMobileRangePicker.js +35 -38
- package/modern/internal/hooks/useRangePosition.js +16 -1
- package/modern/internal/models/index.js +2 -1
- package/modern/internal/models/rangePickerProps.js +1 -0
- package/modern/internal/utils/releaseInfo.js +1 -1
- package/modern/internal/utils/valueManagers.js +23 -21
- package/node/DateRangePicker/DateRangePicker.js +12 -0
- package/node/DesktopDateRangePicker/DesktopDateRangePicker.js +12 -0
- package/node/MobileDateRangePicker/MobileDateRangePicker.js +12 -0
- package/node/MultiInputDateRangeField/MultiInputDateRangeField.js +10 -0
- package/node/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.js +10 -0
- package/node/MultiInputTimeRangeField/MultiInputTimeRangeField.js +10 -0
- package/node/SingleInputDateRangeField/SingleInputDateRangeField.js +23 -11
- package/node/SingleInputDateTimeRangeField/SingleInputDateTimeRangeField.js +26 -14
- package/node/SingleInputTimeRangeField/SingleInputTimeRangeField.js +26 -14
- package/node/index.js +1 -1
- package/node/internal/hooks/useDesktopRangePicker/useDesktopRangePicker.js +29 -37
- package/node/internal/hooks/useEnrichedRangePickerFieldProps.js +205 -0
- package/node/internal/hooks/useMobileRangePicker/useMobileRangePicker.js +34 -37
- package/node/internal/hooks/useRangePosition.js +18 -1
- package/node/internal/models/index.js +11 -0
- package/node/internal/models/rangePickerProps.js +5 -0
- package/node/internal/utils/releaseInfo.js +1 -1
- package/node/internal/utils/valueManagers.js +22 -20
- package/package.json +5 -5
- package/internal/hooks/useRangePickerInputProps.d.ts +0 -19
- package/internal/hooks/useRangePickerInputProps.js +0 -89
- package/legacy/internal/hooks/useRangePickerInputProps.js +0 -88
- package/modern/internal/hooks/useRangePickerInputProps.js +0 -86
- package/node/internal/hooks/useRangePickerInputProps.js +0 -96
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,125 @@
|
|
|
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.1.0
|
|
7
|
+
|
|
8
|
+
_Apr 7, 2023_
|
|
9
|
+
|
|
10
|
+
We'd like to offer a big thanks to the 15 contributors who made this release possible. Here are some highlights ✨:
|
|
11
|
+
|
|
12
|
+
- 🌍 Add Catalan (ca-ES), Kazakh (kz-KZ) and improve Spanish (es-ES), Dutch (nl-NL), Hebrew (he-IL), Hungarian (hu-HU), Japanese (ja-JP), Portuguese (pt-BR), and Russian (ru-RU) locales
|
|
13
|
+
- ✨ Allow to control visibility of columns shown in the columns panel (#8401) @MBilalShafi
|
|
14
|
+
- 🐞 Bugfixes
|
|
15
|
+
- 📚 Documentation improvements
|
|
16
|
+
|
|
17
|
+
### `@mui/x-data-grid@v6.1.0` / `@mui/x-data-grid-pro@v6.1.0` / `@mui/x-data-grid-premium@v6.1.0`
|
|
18
|
+
|
|
19
|
+
#### Changes
|
|
20
|
+
|
|
21
|
+
- [DataGrid] Allow to control visibility of columns shown in the `ColumnsPanel` component (#8401) @MBilalShafi
|
|
22
|
+
- [DataGrid] Fix filters with empty array value not being removed from the filter model (#8501) @cherniavskii
|
|
23
|
+
- [DataGrid] Fix memory leaks in development (#8301) @cherniavskii
|
|
24
|
+
- [DataGrid] Sync `date` column value when entering edit mode by pressing a digit (#8364) @m4theushw
|
|
25
|
+
- [DataGrid] Wrap column menu button with a tooltip (#7890) @cherniavskii
|
|
26
|
+
- [l10n] Improve Dutch (nl-NL) locale (#8491) @thedutchruben
|
|
27
|
+
- [l10n] Improve Hungarian (hu-HU) locale (#8486) @PetakCC
|
|
28
|
+
- [l10n] Improve Japanese (ja-JP) locale (#8462) @megos
|
|
29
|
+
- [l10n] Improve Portuguese (pt-BR) locale (#8480) @pwnedev
|
|
30
|
+
- [l10n] Improve Russian (ru-RU) locale (#8510) @alexrapro
|
|
31
|
+
|
|
32
|
+
### `@mui/x-date-pickers@v6.1.0` / `@mui/x-date-pickers-pro@v6.1.0`
|
|
33
|
+
|
|
34
|
+
#### Changes
|
|
35
|
+
|
|
36
|
+
- [fields] Fix RTL navigation (#8490) @alexfauquette
|
|
37
|
+
- [fields] Fix usage of `slotProps.textField.InputProps` (#8428) @flaviendelangle
|
|
38
|
+
- [pickers] Fix `componentsProps.dialog` propagation (#8509) @LukasTy
|
|
39
|
+
- [pickers] Move `hasError` from `fieldValueManager` to `valueManager` (#8453) @flaviendelangle
|
|
40
|
+
- [pickers] Move the adapters interfaces to the X repository (#8412) @flaviendelangle
|
|
41
|
+
- [pickers] Update peer dependency versions (#8531) @LukasTy
|
|
42
|
+
- [pickers] Fix `isValid` regression (#8543) @LukasTy
|
|
43
|
+
- [l10n] Add Catalan (Spain) (ca-ES) and improve Spanish (es-ES) locales (#8498) @makenshikuro
|
|
44
|
+
- [l10n] Add Kazakh (kz-KZ) locale (#8451) @zhunus
|
|
45
|
+
- [l10n] Improve Dutch (nl-NL) locale (#8491) @thedutchruben
|
|
46
|
+
- [l10n] Improve Hebrew (he-IL) locale (#8464) @soris1989
|
|
47
|
+
- [l10n] Improve Japanese (ja-JP) locale (#8462) @megos
|
|
48
|
+
- [l10n] Improve Portuguese (pt-BR) locale (#8480) @pwnedev
|
|
49
|
+
|
|
50
|
+
### Docs
|
|
51
|
+
|
|
52
|
+
- [docs] Fix 301 redirect (#8524) @alexfauquette
|
|
53
|
+
- [docs] Fix 404 links (#8454) @alexfauquette
|
|
54
|
+
- [docs] Fix broken API reference link (#8460) @oliviertassinari
|
|
55
|
+
|
|
56
|
+
### Core
|
|
57
|
+
|
|
58
|
+
- [core] Avoid 301 links (#8383) @oliviertassinari
|
|
59
|
+
- [core] Fix the l10n helper by using danger instead of actions (#8512) @alexfauquette
|
|
60
|
+
- [core] Help contributors for l10n PRs (#8503) @alexfauquette
|
|
61
|
+
- [core] Remove legacy token (#8457) @oliviertassinari
|
|
62
|
+
- [charts] Add a styling system (#8445) @alexfauquette
|
|
63
|
+
|
|
64
|
+
## 6.0.4
|
|
65
|
+
|
|
66
|
+
_Mar 30, 2023_
|
|
67
|
+
|
|
68
|
+
We'd like to offer a big thanks to the 9 contributors who made this release possible. Here are some highlights ✨:
|
|
69
|
+
|
|
70
|
+
- 🌍 Add Danish (da-DK), and improve Norwegian (nb-NO), Spanish (es-ES), and Swedish (sv-SE) locales
|
|
71
|
+
- 🐞 Bugfixes
|
|
72
|
+
- 📚 Documentation improvements
|
|
73
|
+
|
|
74
|
+
### `@mui/x-data-grid@v6.0.4` / `@mui/x-data-grid-pro@v6.0.4` / `@mui/x-data-grid-premium@v6.0.4`
|
|
75
|
+
|
|
76
|
+
#### Changes
|
|
77
|
+
|
|
78
|
+
- [DataGrid] Fix column header tooltip not showing when the title is truncated (#8433) @rohitnatesh
|
|
79
|
+
- [DataGrid] Fix filter model buttons' display condition (#8415) @MBilalShafi
|
|
80
|
+
- [DataGrid] Fix infinite rerender in a flex parent (#8436) @cherniavskii
|
|
81
|
+
- [DataGrid] Prevent reopening column menu when clicking in the button while it is open (#8286) @tanuj-22
|
|
82
|
+
- [DataGrid] Rename `components` by `slots` in column menu API (#7999) @MBilalShafi
|
|
83
|
+
- [DataGrid] Remove hardcoded CSS classes' usages (#8444) @MBilalShafi
|
|
84
|
+
- [DataGridPremium] Fix aggregation initial state causing issue with quick filter (#8441) @MBilalShafi
|
|
85
|
+
- [l10n] Improve Danish (da-DK) locale (#8368) @BossElijah
|
|
86
|
+
- [l10n] Improve Danish (da-DK) locale (#8378) @BossElijah
|
|
87
|
+
- [l10n] Improve Norwegian (nb-NO) locale (#8367) @BossElijah
|
|
88
|
+
- [l10n] Improve Norwegian (nb-NO) locale (#8409) @BossElijah
|
|
89
|
+
- [l10n] Improve Spanish (es-ES) locale (#8420) @martjanz
|
|
90
|
+
- [l10n] Improve Swedish (sv-SE) locale (#8381) @BossElijah
|
|
91
|
+
|
|
92
|
+
### `@mui/x-date-pickers@v6.0.4` / `@mui/x-date-pickers-pro@v6.0.4`
|
|
93
|
+
|
|
94
|
+
#### Changes
|
|
95
|
+
|
|
96
|
+
- [fields] Add missing tokens to `AdapterDateFnsJalali` (#8402) @flaviendelangle
|
|
97
|
+
- [fields] Clean the active date manager (#8370) @flaviendelangle
|
|
98
|
+
- [fields] Cleanup `useFieldState` (#8292) @flaviendelangle
|
|
99
|
+
- [fields] Only add RTL characters when needed (#8325) @flaviendelangle
|
|
100
|
+
- [pickers] Add support for single input fields in range pickers (#7927) @flaviendelangle
|
|
101
|
+
- [pickers] Allows non token characters in format (#8256) @alexfauquette
|
|
102
|
+
- [pickers] Avoid root imports and move public models to the models folder (#8337) @flaviendelangle
|
|
103
|
+
- [pickers] Update `view` when `views` or `openTo` changes (#8361) @LukasTy
|
|
104
|
+
- [l10n] Improve Norwegian (nb-NO) locale (#8382) @BossElijah
|
|
105
|
+
- [l10n] Add Danish (da-DK) locale (#8379) @BossElijah
|
|
106
|
+
- [l10n] Improve Swedish (sv-SE) locale (#8381) @BossElijah
|
|
107
|
+
|
|
108
|
+
### `@mui/x-codemod@v6.0.4`
|
|
109
|
+
|
|
110
|
+
#### Changes
|
|
111
|
+
|
|
112
|
+
- [codemod] Fix `remove-stabilized-experimentalFeatures` codemod (#8289) @alexfauquette
|
|
113
|
+
|
|
114
|
+
### Docs
|
|
115
|
+
|
|
116
|
+
- [docs] Fix `GridCellParams` signature in migration guide (#8427) @cherniavskii
|
|
117
|
+
- [docs] Fix "Custom field" demos responsive styles (#8408) @LukasTy
|
|
118
|
+
- [docs] Remove `label` from demos where it reduces clarity (#8416) @LukasTy
|
|
119
|
+
- [docs] Update slots' references in Data Grid migration guide (#8159) @MBilalShafi
|
|
120
|
+
|
|
121
|
+
### Core
|
|
122
|
+
|
|
123
|
+
- [charts] Work on typing (#8421) @flaviendelangle
|
|
124
|
+
|
|
6
125
|
## 6.0.3
|
|
7
126
|
|
|
8
127
|
_Mar 23, 2023_
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { MuiPickersAdapter } from '@mui/x-date-pickers/
|
|
2
|
+
import { MuiPickersAdapter } from '@mui/x-date-pickers/models';
|
|
3
3
|
import { DateRangePosition } from './DateRangeCalendar.types';
|
|
4
4
|
import { DateRange } from '../internal/models';
|
|
5
5
|
interface UseDragRangeParams<TDate> {
|
|
@@ -147,6 +147,18 @@ process.env.NODE_ENV !== "production" ? DateRangePicker.propTypes = {
|
|
|
147
147
|
* Defaults to localized format based on the used `views`.
|
|
148
148
|
*/
|
|
149
149
|
format: PropTypes.string,
|
|
150
|
+
/**
|
|
151
|
+
* Pass a ref to the `input` element.
|
|
152
|
+
* Ignored if the field has several inputs.
|
|
153
|
+
*/
|
|
154
|
+
inputRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({
|
|
155
|
+
current: PropTypes.object
|
|
156
|
+
})]),
|
|
157
|
+
/**
|
|
158
|
+
* The label content.
|
|
159
|
+
* Ignored if the field has several inputs.
|
|
160
|
+
*/
|
|
161
|
+
label: PropTypes.node,
|
|
150
162
|
/**
|
|
151
163
|
* If `true`, calls `renderLoading` instead of rendering the day calendar.
|
|
152
164
|
* Can be used to preload information and show it in calendar.
|
|
@@ -3,7 +3,7 @@ import { BaseToolbarProps, ExportedBaseToolbarProps } from '@mui/x-date-pickers/
|
|
|
3
3
|
import { DateRange } from '../internal/models';
|
|
4
4
|
import { UseRangePositionResponse } from '../internal/hooks/useRangePosition';
|
|
5
5
|
import { DateRangePickerToolbarClasses } from './dateRangePickerToolbarClasses';
|
|
6
|
-
export interface DateRangePickerToolbarProps<TDate> extends Omit<BaseToolbarProps<DateRange<TDate>, 'day'>, 'views' | 'view' | 'onViewChange' | 'onChange' | 'isLandscape'>, UseRangePositionResponse {
|
|
6
|
+
export interface DateRangePickerToolbarProps<TDate> extends Omit<BaseToolbarProps<DateRange<TDate>, 'day'>, 'views' | 'view' | 'onViewChange' | 'onChange' | 'isLandscape'>, Pick<UseRangePositionResponse, 'rangePosition' | 'onRangePositionChange'> {
|
|
7
7
|
classes?: Partial<DateRangePickerToolbarClasses>;
|
|
8
8
|
}
|
|
9
9
|
export interface ExportedDateRangePickerToolbarProps extends ExportedBaseToolbarProps {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { LocalizedComponent } from '@mui/x-date-pickers';
|
|
2
|
+
import { LocalizedComponent } from '@mui/x-date-pickers/locales';
|
|
3
3
|
import { DefaultizedProps, BaseDateValidationProps, BasePickerInputProps, PickerViewRendererLookup, UncapitalizeObjectKeys } from '@mui/x-date-pickers/internals';
|
|
4
4
|
import { DateRangeValidationError } from '../internal/hooks/validation/useDateRangeValidation';
|
|
5
5
|
import { DateRange } from '../internal/models';
|
|
@@ -155,6 +155,18 @@ DesktopDateRangePicker.propTypes = {
|
|
|
155
155
|
* Defaults to localized format based on the used `views`.
|
|
156
156
|
*/
|
|
157
157
|
format: PropTypes.string,
|
|
158
|
+
/**
|
|
159
|
+
* Pass a ref to the `input` element.
|
|
160
|
+
* Ignored if the field has several inputs.
|
|
161
|
+
*/
|
|
162
|
+
inputRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({
|
|
163
|
+
current: PropTypes.object
|
|
164
|
+
})]),
|
|
165
|
+
/**
|
|
166
|
+
* The label content.
|
|
167
|
+
* Ignored if the field has several inputs.
|
|
168
|
+
*/
|
|
169
|
+
label: PropTypes.node,
|
|
158
170
|
/**
|
|
159
171
|
* If `true`, calls `renderLoading` instead of rendering the day calendar.
|
|
160
172
|
* Can be used to preload information and show it in calendar.
|
|
@@ -158,6 +158,18 @@ MobileDateRangePicker.propTypes = {
|
|
|
158
158
|
* Defaults to localized format based on the used `views`.
|
|
159
159
|
*/
|
|
160
160
|
format: PropTypes.string,
|
|
161
|
+
/**
|
|
162
|
+
* Pass a ref to the `input` element.
|
|
163
|
+
* Ignored if the field has several inputs.
|
|
164
|
+
*/
|
|
165
|
+
inputRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({
|
|
166
|
+
current: PropTypes.object
|
|
167
|
+
})]),
|
|
168
|
+
/**
|
|
169
|
+
* The label content.
|
|
170
|
+
* Ignored if the field has several inputs.
|
|
171
|
+
*/
|
|
172
|
+
label: PropTypes.node,
|
|
161
173
|
/**
|
|
162
174
|
* If `true`, calls `renderLoading` instead of rendering the day calendar.
|
|
163
175
|
* Can be used to preload information and show it in calendar.
|
|
@@ -289,6 +289,16 @@ process.env.NODE_ENV !== "production" ? MultiInputDateRangeField.propTypes = {
|
|
|
289
289
|
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
290
290
|
unstableEndFieldRef: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
|
|
291
291
|
unstableStartFieldRef: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
|
|
292
|
+
/**
|
|
293
|
+
* If `true`, the CSS flexbox `gap` is used instead of applying `margin` to children.
|
|
294
|
+
*
|
|
295
|
+
* While CSS `gap` removes the [known limitations](https://mui.com/joy-ui/react-stack#limitations),
|
|
296
|
+
* it is not fully supported in some browsers. We recommend checking https://caniuse.com/?search=flex%20gap before using this flag.
|
|
297
|
+
*
|
|
298
|
+
* To enable this flag globally, follow the [theme's default props](https://mui.com/material-ui/customization/theme-components/#default-props) configuration.
|
|
299
|
+
* @default false
|
|
300
|
+
*/
|
|
301
|
+
useFlexGap: PropTypes.bool,
|
|
292
302
|
/**
|
|
293
303
|
* The selected value.
|
|
294
304
|
* Used when the component is controlled.
|
|
@@ -9,7 +9,7 @@ import { UseDateRangeFieldProps } from '../internal/models/dateRange';
|
|
|
9
9
|
import { RangePosition } from '../internal/models/range';
|
|
10
10
|
import { UseMultiInputRangeFieldParams } from '../internal/hooks/useMultiInputRangeField/useMultiInputRangeField.types';
|
|
11
11
|
import { RangeFieldSection } from '../internal/models/fields';
|
|
12
|
-
export type UseMultiInputDateRangeFieldParams<TDate,
|
|
12
|
+
export type UseMultiInputDateRangeFieldParams<TDate, TTextFieldSlotProps extends {}> = UseMultiInputRangeFieldParams<UseMultiInputDateRangeFieldProps<TDate>, TTextFieldSlotProps>;
|
|
13
13
|
export interface UseMultiInputDateRangeFieldProps<TDate> extends Omit<UseDateRangeFieldProps<TDate>, 'unstableFieldRef'> {
|
|
14
14
|
unstableStartFieldRef?: React.Ref<FieldRef<RangeFieldSection>>;
|
|
15
15
|
unstableEndFieldRef?: React.Ref<FieldRef<RangeFieldSection>>;
|
|
@@ -355,6 +355,16 @@ process.env.NODE_ENV !== "production" ? MultiInputDateTimeRangeField.propTypes =
|
|
|
355
355
|
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
356
356
|
unstableEndFieldRef: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
|
|
357
357
|
unstableStartFieldRef: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
|
|
358
|
+
/**
|
|
359
|
+
* If `true`, the CSS flexbox `gap` is used instead of applying `margin` to children.
|
|
360
|
+
*
|
|
361
|
+
* While CSS `gap` removes the [known limitations](https://mui.com/joy-ui/react-stack#limitations),
|
|
362
|
+
* it is not fully supported in some browsers. We recommend checking https://caniuse.com/?search=flex%20gap before using this flag.
|
|
363
|
+
*
|
|
364
|
+
* To enable this flag globally, follow the [theme's default props](https://mui.com/material-ui/customization/theme-components/#default-props) configuration.
|
|
365
|
+
* @default false
|
|
366
|
+
*/
|
|
367
|
+
useFlexGap: PropTypes.bool,
|
|
358
368
|
/**
|
|
359
369
|
* The selected value.
|
|
360
370
|
* Used when the component is controlled.
|
|
@@ -9,7 +9,7 @@ import { UseDateTimeRangeFieldDefaultizedProps, UseDateTimeRangeFieldProps } fro
|
|
|
9
9
|
import { RangePosition } from '../internal/models/range';
|
|
10
10
|
import { RangeFieldSection } from '../internal/models/fields';
|
|
11
11
|
import { UseMultiInputRangeFieldParams } from '../internal/hooks/useMultiInputRangeField/useMultiInputRangeField.types';
|
|
12
|
-
export type UseMultiInputDateTimeRangeFieldParams<TDate,
|
|
12
|
+
export type UseMultiInputDateTimeRangeFieldParams<TDate, TTextFieldSlotProps extends {}> = UseMultiInputRangeFieldParams<UseMultiInputDateTimeRangeFieldProps<TDate>, TTextFieldSlotProps>;
|
|
13
13
|
export interface UseMultiInputDateTimeRangeFieldProps<TDate> extends Omit<UseDateTimeRangeFieldProps<TDate>, 'unstableFieldRef'> {
|
|
14
14
|
unstableStartFieldRef?: React.Ref<FieldRef<RangeFieldSection>>;
|
|
15
15
|
unstableEndFieldRef?: React.Ref<FieldRef<RangeFieldSection>>;
|
|
@@ -321,6 +321,16 @@ process.env.NODE_ENV !== "production" ? MultiInputTimeRangeField.propTypes = {
|
|
|
321
321
|
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
322
322
|
unstableEndFieldRef: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
|
|
323
323
|
unstableStartFieldRef: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
|
|
324
|
+
/**
|
|
325
|
+
* If `true`, the CSS flexbox `gap` is used instead of applying `margin` to children.
|
|
326
|
+
*
|
|
327
|
+
* While CSS `gap` removes the [known limitations](https://mui.com/joy-ui/react-stack#limitations),
|
|
328
|
+
* it is not fully supported in some browsers. We recommend checking https://caniuse.com/?search=flex%20gap before using this flag.
|
|
329
|
+
*
|
|
330
|
+
* To enable this flag globally, follow the [theme's default props](https://mui.com/material-ui/customization/theme-components/#default-props) configuration.
|
|
331
|
+
* @default false
|
|
332
|
+
*/
|
|
333
|
+
useFlexGap: PropTypes.bool,
|
|
324
334
|
/**
|
|
325
335
|
* The selected value.
|
|
326
336
|
* Used when the component is controlled.
|
|
@@ -9,7 +9,7 @@ import { UseTimeRangeFieldDefaultizedProps, UseTimeRangeFieldProps } from '../in
|
|
|
9
9
|
import { RangePosition } from '../internal/models/range';
|
|
10
10
|
import { UseMultiInputRangeFieldParams } from '../internal/hooks/useMultiInputRangeField/useMultiInputRangeField.types';
|
|
11
11
|
import { RangeFieldSection } from '../internal/models/fields';
|
|
12
|
-
export type UseMultiInputTimeRangeFieldParams<TDate,
|
|
12
|
+
export type UseMultiInputTimeRangeFieldParams<TDate, TTextFieldSlotProps extends {}> = UseMultiInputRangeFieldParams<UseMultiInputTimeRangeFieldProps<TDate>, TTextFieldSlotProps>;
|
|
13
13
|
export interface UseMultiInputTimeRangeFieldProps<TDate> extends Omit<UseTimeRangeFieldProps<TDate>, 'unstableFieldRef'> {
|
|
14
14
|
unstableStartFieldRef?: React.Ref<FieldRef<RangeFieldSection>>;
|
|
15
15
|
unstableEndFieldRef?: React.Ref<FieldRef<RangeFieldSection>>;
|
package/README.md
CHANGED
|
@@ -34,8 +34,8 @@ This component has the following peer dependencies that you will need to install
|
|
|
34
34
|
|
|
35
35
|
```json
|
|
36
36
|
"peerDependencies": {
|
|
37
|
-
"@mui/material": "^5.
|
|
38
|
-
"@mui/system": "^5.
|
|
37
|
+
"@mui/material": "^5.8.6",
|
|
38
|
+
"@mui/system": "^5.8.0",
|
|
39
39
|
"react": "^17.0.2 || ^18.0.0",
|
|
40
40
|
"react-dom": "^17.0.2 || ^18.0.0"
|
|
41
41
|
},
|
|
@@ -2,6 +2,7 @@ import * as React from 'react';
|
|
|
2
2
|
import { SingleInputDateRangeFieldProps } from './SingleInputDateRangeField.types';
|
|
3
3
|
type DateRangeFieldComponent = (<TDate>(props: SingleInputDateRangeFieldProps<TDate> & React.RefAttributes<HTMLInputElement>) => JSX.Element) & {
|
|
4
4
|
propTypes?: any;
|
|
5
|
+
fieldType?: string;
|
|
5
6
|
};
|
|
6
7
|
declare const SingleInputDateRangeField: DateRangeFieldComponent;
|
|
7
8
|
export { SingleInputDateRangeField };
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
|
-
const _excluded = ["slots", "slotProps", "components", "componentsProps"],
|
|
4
|
-
_excluded2 = ["
|
|
3
|
+
const _excluded = ["slots", "slotProps", "components", "componentsProps", "InputProps", "inputProps"],
|
|
4
|
+
_excluded2 = ["inputRef"],
|
|
5
|
+
_excluded3 = ["ref", "onPaste", "inputMode", "readOnly"];
|
|
5
6
|
import * as React from 'react';
|
|
6
7
|
import PropTypes from 'prop-types';
|
|
7
8
|
import MuiTextField from '@mui/material/TextField';
|
|
@@ -19,20 +20,30 @@ const SingleInputDateRangeField = /*#__PURE__*/React.forwardRef(function SingleI
|
|
|
19
20
|
slots,
|
|
20
21
|
slotProps,
|
|
21
22
|
components,
|
|
22
|
-
componentsProps
|
|
23
|
+
componentsProps,
|
|
24
|
+
InputProps,
|
|
25
|
+
inputProps
|
|
23
26
|
} = themeProps,
|
|
24
27
|
other = _objectWithoutPropertiesLoose(themeProps, _excluded);
|
|
25
28
|
const ownerState = themeProps;
|
|
26
29
|
const TextField = (_ref = (_slots$textField = slots == null ? void 0 : slots.textField) != null ? _slots$textField : components == null ? void 0 : components.TextField) != null ? _ref : MuiTextField;
|
|
27
|
-
const
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
const _useSlotProps = useSlotProps({
|
|
31
|
+
elementType: TextField,
|
|
32
|
+
externalSlotProps: (_slotProps$textField = slotProps == null ? void 0 : slotProps.textField) != null ? _slotProps$textField : componentsProps == null ? void 0 : componentsProps.textField,
|
|
33
|
+
externalForwardedProps: other,
|
|
34
|
+
ownerState
|
|
35
|
+
}),
|
|
36
|
+
{
|
|
37
|
+
inputRef: externalInputRef
|
|
38
|
+
} = _useSlotProps,
|
|
39
|
+
textFieldProps = _objectWithoutPropertiesLoose(_useSlotProps, _excluded2);
|
|
40
|
+
|
|
41
|
+
// TODO: Remove when mui/material-ui#35088 will be merged
|
|
42
|
+
textFieldProps.inputProps = _extends({}, textFieldProps.inputProps, inputProps);
|
|
43
|
+
textFieldProps.InputProps = _extends({}, textFieldProps.InputProps, InputProps);
|
|
33
44
|
const _useSingleInputDateRa = useSingleInputDateRangeField({
|
|
34
45
|
props: textFieldProps,
|
|
35
|
-
inputRef:
|
|
46
|
+
inputRef: externalInputRef
|
|
36
47
|
}),
|
|
37
48
|
{
|
|
38
49
|
ref: inputRef,
|
|
@@ -40,7 +51,7 @@ const SingleInputDateRangeField = /*#__PURE__*/React.forwardRef(function SingleI
|
|
|
40
51
|
inputMode,
|
|
41
52
|
readOnly
|
|
42
53
|
} = _useSingleInputDateRa,
|
|
43
|
-
fieldProps = _objectWithoutPropertiesLoose(_useSingleInputDateRa,
|
|
54
|
+
fieldProps = _objectWithoutPropertiesLoose(_useSingleInputDateRa, _excluded3);
|
|
44
55
|
return /*#__PURE__*/_jsx(TextField, _extends({
|
|
45
56
|
ref: ref
|
|
46
57
|
}, fieldProps, {
|
|
@@ -52,6 +63,7 @@ const SingleInputDateRangeField = /*#__PURE__*/React.forwardRef(function SingleI
|
|
|
52
63
|
})
|
|
53
64
|
}));
|
|
54
65
|
});
|
|
66
|
+
SingleInputDateRangeField.fieldType = 'single-input';
|
|
55
67
|
process.env.NODE_ENV !== "production" ? SingleInputDateRangeField.propTypes = {
|
|
56
68
|
// ----------------------------- Warning --------------------------------
|
|
57
69
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
@@ -2,6 +2,7 @@ import * as React from 'react';
|
|
|
2
2
|
import { SingleInputDateTimeRangeFieldProps } from './SingleInputDateTimeRangeField.types';
|
|
3
3
|
type DateRangeFieldComponent = (<TDate>(props: SingleInputDateTimeRangeFieldProps<TDate> & React.RefAttributes<HTMLInputElement>) => JSX.Element) & {
|
|
4
4
|
propTypes?: any;
|
|
5
|
+
fieldType?: string;
|
|
5
6
|
};
|
|
6
7
|
declare const SingleInputDateTimeRangeField: DateRangeFieldComponent;
|
|
7
8
|
export { SingleInputDateTimeRangeField };
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
|
-
const _excluded = ["slots", "slotProps", "components", "componentsProps"],
|
|
4
|
-
_excluded2 = ["
|
|
3
|
+
const _excluded = ["slots", "slotProps", "components", "componentsProps", "InputProps", "inputProps"],
|
|
4
|
+
_excluded2 = ["inputRef"],
|
|
5
|
+
_excluded3 = ["ref", "onPaste", "inputMode", "readOnly"];
|
|
5
6
|
import * as React from 'react';
|
|
6
7
|
import PropTypes from 'prop-types';
|
|
7
|
-
import
|
|
8
|
+
import MuiTextField from '@mui/material/TextField';
|
|
8
9
|
import { useThemeProps } from '@mui/material/styles';
|
|
9
10
|
import { useSlotProps } from '@mui/base/utils';
|
|
10
11
|
import { useSingleInputDateTimeRangeField } from './useSingleInputDateTimeRangeField';
|
|
@@ -19,20 +20,30 @@ const SingleInputDateTimeRangeField = /*#__PURE__*/React.forwardRef(function Sin
|
|
|
19
20
|
slots,
|
|
20
21
|
slotProps,
|
|
21
22
|
components,
|
|
22
|
-
componentsProps
|
|
23
|
+
componentsProps,
|
|
24
|
+
InputProps,
|
|
25
|
+
inputProps
|
|
23
26
|
} = themeProps,
|
|
24
27
|
other = _objectWithoutPropertiesLoose(themeProps, _excluded);
|
|
25
28
|
const ownerState = themeProps;
|
|
26
|
-
const
|
|
27
|
-
const
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
29
|
+
const TextField = (_ref = (_slots$textField = slots == null ? void 0 : slots.textField) != null ? _slots$textField : components == null ? void 0 : components.TextField) != null ? _ref : MuiTextField;
|
|
30
|
+
const _useSlotProps = useSlotProps({
|
|
31
|
+
elementType: TextField,
|
|
32
|
+
externalSlotProps: (_slotProps$textField = slotProps == null ? void 0 : slotProps.textField) != null ? _slotProps$textField : componentsProps == null ? void 0 : componentsProps.textField,
|
|
33
|
+
externalForwardedProps: other,
|
|
34
|
+
ownerState
|
|
35
|
+
}),
|
|
36
|
+
{
|
|
37
|
+
inputRef: externalInputRef
|
|
38
|
+
} = _useSlotProps,
|
|
39
|
+
textFieldProps = _objectWithoutPropertiesLoose(_useSlotProps, _excluded2);
|
|
40
|
+
|
|
41
|
+
// TODO: Remove when mui/material-ui#35088 will be merged
|
|
42
|
+
textFieldProps.inputProps = _extends({}, textFieldProps.inputProps, inputProps);
|
|
43
|
+
textFieldProps.InputProps = _extends({}, textFieldProps.InputProps, InputProps);
|
|
33
44
|
const _useSingleInputDateTi = useSingleInputDateTimeRangeField({
|
|
34
|
-
props:
|
|
35
|
-
inputRef:
|
|
45
|
+
props: textFieldProps,
|
|
46
|
+
inputRef: externalInputRef
|
|
36
47
|
}),
|
|
37
48
|
{
|
|
38
49
|
ref: inputRef,
|
|
@@ -40,8 +51,8 @@ const SingleInputDateTimeRangeField = /*#__PURE__*/React.forwardRef(function Sin
|
|
|
40
51
|
inputMode,
|
|
41
52
|
readOnly
|
|
42
53
|
} = _useSingleInputDateTi,
|
|
43
|
-
fieldProps = _objectWithoutPropertiesLoose(_useSingleInputDateTi,
|
|
44
|
-
return /*#__PURE__*/_jsx(
|
|
54
|
+
fieldProps = _objectWithoutPropertiesLoose(_useSingleInputDateTi, _excluded3);
|
|
55
|
+
return /*#__PURE__*/_jsx(TextField, _extends({
|
|
45
56
|
ref: ref
|
|
46
57
|
}, fieldProps, {
|
|
47
58
|
inputProps: _extends({}, fieldProps.inputProps, {
|
|
@@ -52,6 +63,7 @@ const SingleInputDateTimeRangeField = /*#__PURE__*/React.forwardRef(function Sin
|
|
|
52
63
|
})
|
|
53
64
|
}));
|
|
54
65
|
});
|
|
66
|
+
SingleInputDateTimeRangeField.fieldType = 'single-input';
|
|
55
67
|
process.env.NODE_ENV !== "production" ? SingleInputDateTimeRangeField.propTypes = {
|
|
56
68
|
// ----------------------------- Warning --------------------------------
|
|
57
69
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
@@ -2,6 +2,7 @@ import * as React from 'react';
|
|
|
2
2
|
import { SingleInputTimeRangeFieldProps } from './SingleInputTimeRangeField.types';
|
|
3
3
|
type DateRangeFieldComponent = (<TDate>(props: SingleInputTimeRangeFieldProps<TDate> & React.RefAttributes<HTMLInputElement>) => JSX.Element) & {
|
|
4
4
|
propTypes?: any;
|
|
5
|
+
fieldType?: string;
|
|
5
6
|
};
|
|
6
7
|
declare const SingleInputTimeRangeField: DateRangeFieldComponent;
|
|
7
8
|
export { SingleInputTimeRangeField };
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
|
-
const _excluded = ["slots", "slotProps", "components", "componentsProps"],
|
|
4
|
-
_excluded2 = ["
|
|
3
|
+
const _excluded = ["slots", "slotProps", "components", "componentsProps", "InputProps", "inputProps"],
|
|
4
|
+
_excluded2 = ["inputRef"],
|
|
5
|
+
_excluded3 = ["ref", "onPaste", "inputMode", "readOnly"];
|
|
5
6
|
import * as React from 'react';
|
|
6
7
|
import PropTypes from 'prop-types';
|
|
7
|
-
import
|
|
8
|
+
import MuiTextField from '@mui/material/TextField';
|
|
8
9
|
import { useThemeProps } from '@mui/material/styles';
|
|
9
10
|
import { useSlotProps } from '@mui/base/utils';
|
|
10
11
|
import { useSingleInputTimeRangeField } from './useSingleInputTimeRangeField';
|
|
@@ -19,20 +20,30 @@ const SingleInputTimeRangeField = /*#__PURE__*/React.forwardRef(function SingleI
|
|
|
19
20
|
slots,
|
|
20
21
|
slotProps,
|
|
21
22
|
components,
|
|
22
|
-
componentsProps
|
|
23
|
+
componentsProps,
|
|
24
|
+
InputProps,
|
|
25
|
+
inputProps
|
|
23
26
|
} = themeProps,
|
|
24
27
|
other = _objectWithoutPropertiesLoose(themeProps, _excluded);
|
|
25
28
|
const ownerState = themeProps;
|
|
26
|
-
const
|
|
27
|
-
const
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
29
|
+
const TextField = (_ref = (_slots$textField = slots == null ? void 0 : slots.textField) != null ? _slots$textField : components == null ? void 0 : components.TextField) != null ? _ref : MuiTextField;
|
|
30
|
+
const _useSlotProps = useSlotProps({
|
|
31
|
+
elementType: TextField,
|
|
32
|
+
externalSlotProps: (_slotProps$textField = slotProps == null ? void 0 : slotProps.textField) != null ? _slotProps$textField : componentsProps == null ? void 0 : componentsProps.textField,
|
|
33
|
+
externalForwardedProps: other,
|
|
34
|
+
ownerState
|
|
35
|
+
}),
|
|
36
|
+
{
|
|
37
|
+
inputRef: externalInputRef
|
|
38
|
+
} = _useSlotProps,
|
|
39
|
+
textFieldProps = _objectWithoutPropertiesLoose(_useSlotProps, _excluded2);
|
|
40
|
+
|
|
41
|
+
// TODO: Remove when mui/material-ui#35088 will be merged
|
|
42
|
+
textFieldProps.inputProps = _extends({}, textFieldProps.inputProps, inputProps);
|
|
43
|
+
textFieldProps.InputProps = _extends({}, textFieldProps.InputProps, InputProps);
|
|
33
44
|
const _useSingleInputTimeRa = useSingleInputTimeRangeField({
|
|
34
|
-
props:
|
|
35
|
-
inputRef:
|
|
45
|
+
props: textFieldProps,
|
|
46
|
+
inputRef: externalInputRef
|
|
36
47
|
}),
|
|
37
48
|
{
|
|
38
49
|
ref: inputRef,
|
|
@@ -40,8 +51,8 @@ const SingleInputTimeRangeField = /*#__PURE__*/React.forwardRef(function SingleI
|
|
|
40
51
|
inputMode,
|
|
41
52
|
readOnly
|
|
42
53
|
} = _useSingleInputTimeRa,
|
|
43
|
-
fieldProps = _objectWithoutPropertiesLoose(_useSingleInputTimeRa,
|
|
44
|
-
return /*#__PURE__*/_jsx(
|
|
54
|
+
fieldProps = _objectWithoutPropertiesLoose(_useSingleInputTimeRa, _excluded3);
|
|
55
|
+
return /*#__PURE__*/_jsx(TextField, _extends({
|
|
45
56
|
ref: ref
|
|
46
57
|
}, fieldProps, {
|
|
47
58
|
inputProps: _extends({}, fieldProps.inputProps, {
|
|
@@ -52,6 +63,7 @@ const SingleInputTimeRangeField = /*#__PURE__*/React.forwardRef(function SingleI
|
|
|
52
63
|
})
|
|
53
64
|
}));
|
|
54
65
|
});
|
|
66
|
+
SingleInputTimeRangeField.fieldType = 'single-input';
|
|
55
67
|
process.env.NODE_ENV !== "production" ? SingleInputTimeRangeField.propTypes = {
|
|
56
68
|
// ----------------------------- Warning --------------------------------
|
|
57
69
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { DateOrTimeView } from '@mui/x-date-pickers/
|
|
2
|
+
import { DateOrTimeView } from '@mui/x-date-pickers/models';
|
|
3
3
|
import { DateRangeCalendarProps } from '../DateRangeCalendar';
|
|
4
4
|
export interface DateRangeViewRendererProps<TDate, TView extends DateOrTimeView> extends DateRangeCalendarProps<TDate> {
|
|
5
5
|
view: TView;
|
package/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { DateOrTimeView } from '@mui/x-date-pickers/
|
|
2
|
+
import { DateOrTimeView } from '@mui/x-date-pickers/models';
|
|
3
3
|
import { UseDesktopRangePickerParams, UseDesktopRangePickerProps } from './useDesktopRangePicker.types';
|
|
4
4
|
export declare const useDesktopRangePicker: <TDate, TView extends DateOrTimeView, TExternalProps extends UseDesktopRangePickerProps<TDate, TView, any, TExternalProps>>({ props, valueManager, validator, }: UseDesktopRangePickerParams<TDate, TView, TExternalProps>) => {
|
|
5
5
|
renderPicker: () => JSX.Element;
|