@mui/x-date-pickers-pro 7.4.0 → 7.5.1
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 -5395
- package/DateRangeCalendar/DateRangeCalendar.js +1 -1
- package/DateRangeCalendar/DateRangeCalendar.types.d.ts +1 -1
- package/DateRangePicker/DateRangePicker.js +1 -1
- package/DateRangePicker/DateRangePickerToolbar.js +1 -1
- package/DateRangePickerDay/DateRangePickerDay.js +1 -15
- package/DateTimeRangePicker/DateTimeRangePicker.js +1 -1
- package/DateTimeRangePicker/DateTimeRangePickerTabs.js +1 -1
- package/DateTimeRangePicker/DateTimeRangePickerToolbar.js +1 -1
- package/DesktopDateRangePicker/DesktopDateRangePicker.js +1 -1
- package/DesktopDateTimeRangePicker/DesktopDateTimeRangePicker.js +1 -1
- package/LocalizationProvider/index.d.ts +1 -0
- package/LocalizationProvider/index.js +1 -0
- package/LocalizationProvider/package.json +6 -0
- package/MobileDateRangePicker/MobileDateRangePicker.js +1 -1
- package/MobileDateTimeRangePicker/MobileDateTimeRangePicker.js +1 -1
- package/MultiInputDateRangeField/MultiInputDateRangeField.js +1 -1
- package/MultiInputDateRangeField/MultiInputDateRangeField.types.d.ts +1 -2
- package/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.js +1 -1
- package/MultiInputTimeRangeField/MultiInputTimeRangeField.js +1 -1
- package/PickersRangeCalendarHeader/PickersRangeCalendarHeader.js +1 -1
- package/SingleInputDateRangeField/SingleInputDateRangeField.js +1 -1
- package/SingleInputDateRangeField/SingleInputDateRangeField.types.d.ts +1 -2
- package/SingleInputDateTimeRangeField/SingleInputDateTimeRangeField.js +1 -1
- package/SingleInputTimeRangeField/SingleInputTimeRangeField.js +1 -1
- package/StaticDateRangePicker/StaticDateRangePicker.js +1 -1
- package/index.d.ts +0 -1
- package/index.js +1 -1
- package/internals/hooks/useEnrichedRangePickerFieldProps.d.ts +1 -2
- package/internals/models/dateRange.d.ts +0 -4
- package/internals/utils/releaseInfo.js +1 -1
- package/internals/utils/validation/validateDateRange.d.ts +1 -1
- package/models/dateRange.d.ts +8 -0
- package/models/dateRange.js +1 -0
- package/models/index.d.ts +1 -0
- package/models/index.js +1 -0
- package/modern/DateRangeCalendar/DateRangeCalendar.js +1 -1
- package/modern/DateRangePicker/DateRangePicker.js +1 -1
- package/modern/DateRangePicker/DateRangePickerToolbar.js +1 -1
- package/modern/DateRangePickerDay/DateRangePickerDay.js +1 -15
- package/modern/DateTimeRangePicker/DateTimeRangePicker.js +1 -1
- package/modern/DateTimeRangePicker/DateTimeRangePickerTabs.js +1 -1
- package/modern/DateTimeRangePicker/DateTimeRangePickerToolbar.js +1 -1
- package/modern/DesktopDateRangePicker/DesktopDateRangePicker.js +1 -1
- package/modern/DesktopDateTimeRangePicker/DesktopDateTimeRangePicker.js +1 -1
- package/modern/LocalizationProvider/index.js +1 -0
- package/modern/MobileDateRangePicker/MobileDateRangePicker.js +1 -1
- package/modern/MobileDateTimeRangePicker/MobileDateTimeRangePicker.js +1 -1
- package/modern/MultiInputDateRangeField/MultiInputDateRangeField.js +1 -1
- package/modern/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.js +1 -1
- package/modern/MultiInputTimeRangeField/MultiInputTimeRangeField.js +1 -1
- package/modern/PickersRangeCalendarHeader/PickersRangeCalendarHeader.js +1 -1
- package/modern/SingleInputDateRangeField/SingleInputDateRangeField.js +1 -1
- package/modern/SingleInputDateTimeRangeField/SingleInputDateTimeRangeField.js +1 -1
- package/modern/SingleInputTimeRangeField/SingleInputTimeRangeField.js +1 -1
- package/modern/StaticDateRangePicker/StaticDateRangePicker.js +1 -1
- package/modern/index.js +1 -1
- package/modern/internals/utils/releaseInfo.js +1 -1
- package/modern/models/dateRange.js +1 -0
- package/modern/models/index.js +1 -0
- package/node/DateRangeCalendar/DateRangeCalendar.js +1 -1
- package/node/DateRangePicker/DateRangePicker.js +1 -1
- package/node/DateRangePicker/DateRangePickerToolbar.js +1 -1
- package/node/DateRangePickerDay/DateRangePickerDay.js +1 -15
- package/node/DateTimeRangePicker/DateTimeRangePicker.js +1 -1
- package/node/DateTimeRangePicker/DateTimeRangePickerTabs.js +1 -1
- package/node/DateTimeRangePicker/DateTimeRangePickerToolbar.js +1 -1
- package/node/DesktopDateRangePicker/DesktopDateRangePicker.js +1 -1
- package/node/DesktopDateTimeRangePicker/DesktopDateTimeRangePicker.js +1 -1
- package/node/LocalizationProvider/index.js +12 -0
- package/node/MobileDateRangePicker/MobileDateRangePicker.js +1 -1
- package/node/MobileDateTimeRangePicker/MobileDateTimeRangePicker.js +1 -1
- package/node/MultiInputDateRangeField/MultiInputDateRangeField.js +1 -1
- package/node/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.js +1 -1
- package/node/MultiInputTimeRangeField/MultiInputTimeRangeField.js +1 -1
- package/node/PickersRangeCalendarHeader/PickersRangeCalendarHeader.js +1 -1
- package/node/SingleInputDateRangeField/SingleInputDateRangeField.js +1 -1
- package/node/SingleInputDateTimeRangeField/SingleInputDateTimeRangeField.js +1 -1
- package/node/SingleInputTimeRangeField/SingleInputTimeRangeField.js +1 -1
- package/node/StaticDateRangePicker/StaticDateRangePicker.js +1 -1
- package/node/index.js +1 -1
- package/node/internals/utils/releaseInfo.js +1 -1
- package/node/models/dateRange.js +5 -0
- package/node/models/index.js +11 -0
- package/package.json +4 -4
|
@@ -471,7 +471,7 @@ const DateRangeCalendar = /*#__PURE__*/React.forwardRef(function DateRangeCalend
|
|
|
471
471
|
process.env.NODE_ENV !== "production" ? DateRangeCalendar.propTypes = {
|
|
472
472
|
// ----------------------------- Warning --------------------------------
|
|
473
473
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
474
|
-
// | To update them edit the TypeScript types and run "
|
|
474
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
475
475
|
// ----------------------------------------------------------------------
|
|
476
476
|
/**
|
|
477
477
|
* If `true`, the main element is focused during the first mount.
|
|
@@ -5,7 +5,7 @@ import { Theme } from '@mui/material/styles';
|
|
|
5
5
|
import { PickerValidDate, TimezoneProps } from '@mui/x-date-pickers/models';
|
|
6
6
|
import { PickersCalendarHeader, PickersCalendarHeaderSlots, PickersCalendarHeaderSlotProps } from '@mui/x-date-pickers/PickersCalendarHeader';
|
|
7
7
|
import { BaseDateValidationProps, DefaultizedProps, ExportedDayCalendarProps, DayCalendarSlots, DayCalendarSlotProps, PickersArrowSwitcherSlots, PickersArrowSwitcherSlotProps, DayCalendarProps, ExportedUseViewsOptions } from '@mui/x-date-pickers/internals';
|
|
8
|
-
import { DayRangeValidationProps } from '../internals/models';
|
|
8
|
+
import { DayRangeValidationProps } from '../internals/models/dateRange';
|
|
9
9
|
import { DateRange } from '../models';
|
|
10
10
|
import { DateRangeCalendarClasses } from './dateRangeCalendarClasses';
|
|
11
11
|
import { DateRangePickerDay, DateRangePickerDayProps } from '../DateRangePickerDay';
|
|
@@ -45,7 +45,7 @@ const DateRangePicker = /*#__PURE__*/React.forwardRef(function DateRangePicker(i
|
|
|
45
45
|
process.env.NODE_ENV !== "production" ? DateRangePicker.propTypes = {
|
|
46
46
|
// ----------------------------- Warning --------------------------------
|
|
47
47
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
48
|
-
// | To update them edit the TypeScript types and run "
|
|
48
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
49
49
|
// ----------------------------------------------------------------------
|
|
50
50
|
/**
|
|
51
51
|
* If `true`, the main element is focused during the first mount.
|
|
@@ -90,7 +90,7 @@ const DateRangePickerToolbar = /*#__PURE__*/React.forwardRef(function DateRangeP
|
|
|
90
90
|
process.env.NODE_ENV !== "production" ? DateRangePickerToolbar.propTypes = {
|
|
91
91
|
// ----------------------------- Warning --------------------------------
|
|
92
92
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
93
|
-
// | To update them edit the TypeScript types and run "
|
|
93
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
94
94
|
// ----------------------------------------------------------------------
|
|
95
95
|
/**
|
|
96
96
|
* Override or extend the styles applied to the component.
|
|
@@ -118,13 +118,6 @@ const DateRangePickerDayRoot = styled('div', {
|
|
|
118
118
|
})
|
|
119
119
|
}]
|
|
120
120
|
}));
|
|
121
|
-
DateRangePickerDayRoot.propTypes = {
|
|
122
|
-
// ----------------------------- Warning --------------------------------
|
|
123
|
-
// | These PropTypes are generated from the TypeScript type definitions |
|
|
124
|
-
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
|
125
|
-
// ----------------------------------------------------------------------
|
|
126
|
-
ownerState: PropTypes.object.isRequired
|
|
127
|
-
};
|
|
128
121
|
const DateRangePickerDayRangeIntervalPreview = styled('div', {
|
|
129
122
|
name: 'MuiDateRangePickerDay',
|
|
130
123
|
slot: 'RangeIntervalPreview',
|
|
@@ -177,13 +170,6 @@ const DateRangePickerDayRangeIntervalPreview = styled('div', {
|
|
|
177
170
|
}, endBorderStyle)
|
|
178
171
|
}]
|
|
179
172
|
}));
|
|
180
|
-
DateRangePickerDayRangeIntervalPreview.propTypes = {
|
|
181
|
-
// ----------------------------- Warning --------------------------------
|
|
182
|
-
// | These PropTypes are generated from the TypeScript type definitions |
|
|
183
|
-
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
|
184
|
-
// ----------------------------------------------------------------------
|
|
185
|
-
ownerState: PropTypes.object.isRequired
|
|
186
|
-
};
|
|
187
173
|
const DateRangePickerDayDay = styled(PickersDay, {
|
|
188
174
|
name: 'MuiDateRangePickerDay',
|
|
189
175
|
slot: 'Day',
|
|
@@ -270,7 +256,7 @@ const DateRangePickerDayRaw = /*#__PURE__*/React.forwardRef(function DateRangePi
|
|
|
270
256
|
process.env.NODE_ENV !== "production" ? DateRangePickerDayRaw.propTypes = {
|
|
271
257
|
// ----------------------------- Warning --------------------------------
|
|
272
258
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
273
|
-
// | To update them edit the TypeScript types and run "
|
|
259
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
274
260
|
// ----------------------------------------------------------------------
|
|
275
261
|
/**
|
|
276
262
|
* A ref for imperative actions.
|
|
@@ -45,7 +45,7 @@ const DateTimeRangePicker = /*#__PURE__*/React.forwardRef(function DateTimeRange
|
|
|
45
45
|
process.env.NODE_ENV !== "production" ? DateTimeRangePicker.propTypes = {
|
|
46
46
|
// ----------------------------- Warning --------------------------------
|
|
47
47
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
48
|
-
// | To update them edit the TypeScript types and run "
|
|
48
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
49
49
|
// ----------------------------------------------------------------------
|
|
50
50
|
/**
|
|
51
51
|
* 12h/24h view for hour selection clock.
|
|
@@ -146,7 +146,7 @@ const DateTimeRangePickerTabs = function DateTimeRangePickerTabs(inProps) {
|
|
|
146
146
|
process.env.NODE_ENV !== "production" ? DateTimeRangePickerTabs.propTypes = {
|
|
147
147
|
// ----------------------------- Warning --------------------------------
|
|
148
148
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
149
|
-
// | To update them edit the TypeScript types and run "
|
|
149
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
150
150
|
// ----------------------------------------------------------------------
|
|
151
151
|
/**
|
|
152
152
|
* Override or extend the styles applied to the component.
|
|
@@ -172,7 +172,7 @@ const DateTimeRangePickerToolbar = /*#__PURE__*/React.forwardRef(function DateTi
|
|
|
172
172
|
process.env.NODE_ENV !== "production" ? DateTimeRangePickerToolbar.propTypes = {
|
|
173
173
|
// ----------------------------- Warning --------------------------------
|
|
174
174
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
175
|
-
// | To update them edit the TypeScript types and run "
|
|
175
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
176
176
|
// ----------------------------------------------------------------------
|
|
177
177
|
ampm: PropTypes.bool,
|
|
178
178
|
/**
|
|
@@ -56,7 +56,7 @@ const DesktopDateRangePicker = /*#__PURE__*/React.forwardRef(function DesktopDat
|
|
|
56
56
|
DesktopDateRangePicker.propTypes = {
|
|
57
57
|
// ----------------------------- Warning --------------------------------
|
|
58
58
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
59
|
-
// | To update them edit the TypeScript types and run "
|
|
59
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
60
60
|
// ----------------------------------------------------------------------
|
|
61
61
|
/**
|
|
62
62
|
* If `true`, the main element is focused during the first mount.
|
|
@@ -129,7 +129,7 @@ const DesktopDateTimeRangePicker = /*#__PURE__*/React.forwardRef(function Deskto
|
|
|
129
129
|
DesktopDateTimeRangePicker.propTypes = {
|
|
130
130
|
// ----------------------------- Warning --------------------------------
|
|
131
131
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
132
|
-
// | To update them edit the TypeScript types and run "
|
|
132
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
133
133
|
// ----------------------------------------------------------------------
|
|
134
134
|
/**
|
|
135
135
|
* 12h/24h view for hour selection clock.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { LocalizationProvider } from '@mui/x-date-pickers/LocalizationProvider';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { LocalizationProvider } from '@mui/x-date-pickers/LocalizationProvider';
|
|
@@ -57,7 +57,7 @@ const MobileDateRangePicker = /*#__PURE__*/React.forwardRef(function MobileDateR
|
|
|
57
57
|
MobileDateRangePicker.propTypes = {
|
|
58
58
|
// ----------------------------- Warning --------------------------------
|
|
59
59
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
60
|
-
// | To update them edit the TypeScript types and run "
|
|
60
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
61
61
|
// ----------------------------------------------------------------------
|
|
62
62
|
/**
|
|
63
63
|
* If `true`, the main element is focused during the first mount.
|
|
@@ -128,7 +128,7 @@ const MobileDateTimeRangePicker = /*#__PURE__*/React.forwardRef(function MobileD
|
|
|
128
128
|
MobileDateTimeRangePicker.propTypes = {
|
|
129
129
|
// ----------------------------- Warning --------------------------------
|
|
130
130
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
131
|
-
// | To update them edit the TypeScript types and run "
|
|
131
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
132
132
|
// ----------------------------------------------------------------------
|
|
133
133
|
/**
|
|
134
134
|
* 12h/24h view for hour selection clock.
|
|
@@ -128,7 +128,7 @@ const MultiInputDateRangeField = /*#__PURE__*/React.forwardRef(function MultiInp
|
|
|
128
128
|
process.env.NODE_ENV !== "production" ? MultiInputDateRangeField.propTypes = {
|
|
129
129
|
// ----------------------------- Warning --------------------------------
|
|
130
130
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
131
|
-
// | To update them edit the TypeScript types and run "
|
|
131
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
132
132
|
// ----------------------------------------------------------------------
|
|
133
133
|
/**
|
|
134
134
|
* If `true`, the `input` element is focused during the first mount.
|
|
@@ -4,9 +4,8 @@ import { SlotComponentProps } from '@mui/base/utils';
|
|
|
4
4
|
import Typography from '@mui/material/Typography';
|
|
5
5
|
import Stack, { StackProps } from '@mui/material/Stack';
|
|
6
6
|
import TextField from '@mui/material/TextField';
|
|
7
|
-
import { UseDateRangeFieldProps } from '../internals/models/dateRange';
|
|
8
7
|
import { UseMultiInputRangeFieldParams } from '../internals/hooks/useMultiInputRangeField/useMultiInputRangeField.types';
|
|
9
|
-
import { MultiInputFieldRefs, MultiInputRangeFieldClasses, RangePosition } from '../models';
|
|
8
|
+
import { MultiInputFieldRefs, MultiInputRangeFieldClasses, RangePosition, UseDateRangeFieldProps } from '../models';
|
|
10
9
|
export type UseMultiInputDateRangeFieldParams<TDate extends PickerValidDate, TEnableAccessibleFieldDOMStructure extends boolean, TTextFieldSlotProps extends {}> = UseMultiInputRangeFieldParams<UseMultiInputDateRangeFieldProps<TDate, TEnableAccessibleFieldDOMStructure>, TTextFieldSlotProps>;
|
|
11
10
|
export interface UseMultiInputDateRangeFieldProps<TDate extends PickerValidDate, TEnableAccessibleFieldDOMStructure extends boolean> extends Omit<UseDateRangeFieldProps<TDate, TEnableAccessibleFieldDOMStructure>, 'unstableFieldRef' | 'clearable' | 'onClear'>, MultiInputFieldRefs {
|
|
12
11
|
}
|
|
@@ -128,7 +128,7 @@ const MultiInputDateTimeRangeField = /*#__PURE__*/React.forwardRef(function Mult
|
|
|
128
128
|
process.env.NODE_ENV !== "production" ? MultiInputDateTimeRangeField.propTypes = {
|
|
129
129
|
// ----------------------------- Warning --------------------------------
|
|
130
130
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
131
|
-
// | To update them edit the TypeScript types and run "
|
|
131
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
132
132
|
// ----------------------------------------------------------------------
|
|
133
133
|
/**
|
|
134
134
|
* 12h/24h view for hour selection clock.
|
|
@@ -128,7 +128,7 @@ const MultiInputTimeRangeField = /*#__PURE__*/React.forwardRef(function MultiInp
|
|
|
128
128
|
process.env.NODE_ENV !== "production" ? MultiInputTimeRangeField.propTypes = {
|
|
129
129
|
// ----------------------------- Warning --------------------------------
|
|
130
130
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
131
|
-
// | To update them edit the TypeScript types and run "
|
|
131
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
132
132
|
// ----------------------------------------------------------------------
|
|
133
133
|
/**
|
|
134
134
|
* 12h/24h view for hour selection clock.
|
|
@@ -69,7 +69,7 @@ const PickersRangeCalendarHeader = /*#__PURE__*/React.forwardRef(function Picker
|
|
|
69
69
|
process.env.NODE_ENV !== "production" ? PickersRangeCalendarHeader.propTypes = {
|
|
70
70
|
// ----------------------------- Warning --------------------------------
|
|
71
71
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
72
|
-
// | To update them edit the TypeScript types and run "
|
|
72
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
73
73
|
// ----------------------------------------------------------------------
|
|
74
74
|
/**
|
|
75
75
|
* The number of calendars rendered.
|
|
@@ -61,7 +61,7 @@ SingleInputDateRangeField.fieldType = 'single-input';
|
|
|
61
61
|
process.env.NODE_ENV !== "production" ? SingleInputDateRangeField.propTypes = {
|
|
62
62
|
// ----------------------------- Warning --------------------------------
|
|
63
63
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
64
|
-
// | To update them edit the TypeScript types and run "
|
|
64
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
65
65
|
// ----------------------------------------------------------------------
|
|
66
66
|
/**
|
|
67
67
|
* If `true`, the `input` element is focused during the first mount.
|
|
@@ -4,8 +4,7 @@ import TextField from '@mui/material/TextField';
|
|
|
4
4
|
import { UseFieldInternalProps } from '@mui/x-date-pickers/internals';
|
|
5
5
|
import { BuiltInFieldTextFieldProps, PickerValidDate } from '@mui/x-date-pickers/models';
|
|
6
6
|
import { ExportedUseClearableFieldProps, UseClearableFieldSlots, UseClearableFieldSlotProps } from '@mui/x-date-pickers/hooks';
|
|
7
|
-
import { UseDateRangeFieldProps } from '../
|
|
8
|
-
import type { DateRange, RangeFieldSection, DateRangeValidationError } from '../models';
|
|
7
|
+
import type { DateRange, RangeFieldSection, DateRangeValidationError, UseDateRangeFieldProps } from '../models';
|
|
9
8
|
export interface UseSingleInputDateRangeFieldProps<TDate extends PickerValidDate, TEnableAccessibleFieldDOMStructure extends boolean> extends UseDateRangeFieldProps<TDate, TEnableAccessibleFieldDOMStructure>, ExportedUseClearableFieldProps, Pick<UseFieldInternalProps<DateRange<TDate>, TDate, RangeFieldSection, TEnableAccessibleFieldDOMStructure, DateRangeValidationError>, 'unstableFieldRef'> {
|
|
10
9
|
}
|
|
11
10
|
export type SingleInputDateRangeFieldProps<TDate extends PickerValidDate, TEnableAccessibleFieldDOMStructure extends boolean = false> = Omit<BuiltInFieldTextFieldProps<TEnableAccessibleFieldDOMStructure>, keyof UseSingleInputDateRangeFieldProps<TDate, TEnableAccessibleFieldDOMStructure>> & UseSingleInputDateRangeFieldProps<TDate, TEnableAccessibleFieldDOMStructure> & {
|
|
@@ -61,7 +61,7 @@ SingleInputDateTimeRangeField.fieldType = 'single-input';
|
|
|
61
61
|
process.env.NODE_ENV !== "production" ? SingleInputDateTimeRangeField.propTypes = {
|
|
62
62
|
// ----------------------------- Warning --------------------------------
|
|
63
63
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
64
|
-
// | To update them edit the TypeScript types and run "
|
|
64
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
65
65
|
// ----------------------------------------------------------------------
|
|
66
66
|
/**
|
|
67
67
|
* 12h/24h view for hour selection clock.
|
|
@@ -61,7 +61,7 @@ SingleInputTimeRangeField.fieldType = 'single-input';
|
|
|
61
61
|
process.env.NODE_ENV !== "production" ? SingleInputTimeRangeField.propTypes = {
|
|
62
62
|
// ----------------------------- Warning --------------------------------
|
|
63
63
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
64
|
-
// | To update them edit the TypeScript types and run "
|
|
64
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
65
65
|
// ----------------------------------------------------------------------
|
|
66
66
|
/**
|
|
67
67
|
* 12h/24h view for hour selection clock.
|
|
@@ -50,7 +50,7 @@ const StaticDateRangePicker = /*#__PURE__*/React.forwardRef(function StaticDateR
|
|
|
50
50
|
StaticDateRangePicker.propTypes = {
|
|
51
51
|
// ----------------------------- Warning --------------------------------
|
|
52
52
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
53
|
-
// | To update them edit the TypeScript types and run "
|
|
53
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
54
54
|
// ----------------------------------------------------------------------
|
|
55
55
|
/**
|
|
56
56
|
* If `true`, the main element is focused during the first mount.
|
package/index.d.ts
CHANGED
|
@@ -23,5 +23,4 @@ export * from './DateTimeRangePicker';
|
|
|
23
23
|
export * from './DesktopDateTimeRangePicker';
|
|
24
24
|
export * from './MobileDateTimeRangePicker';
|
|
25
25
|
export * from './dateRangeViewRenderers';
|
|
26
|
-
export type { UseDateRangeFieldProps } from './internals/models/dateRange';
|
|
27
26
|
export * from './models';
|
package/index.js
CHANGED
|
@@ -7,8 +7,7 @@ import { BaseSingleInputFieldProps, FieldRef, PickerValidDate } from '@mui/x-dat
|
|
|
7
7
|
import { UseClearableFieldSlots, UseClearableFieldSlotProps } from '@mui/x-date-pickers/hooks';
|
|
8
8
|
import { PickersInputLocaleText } from '@mui/x-date-pickers/locales';
|
|
9
9
|
import { BaseFieldProps, UsePickerResponse, WrapperVariant, UsePickerProps, SlotComponentPropsFromProps, DateOrTimeViewWithMeridiem } from '@mui/x-date-pickers/internals';
|
|
10
|
-
import { UseDateRangeFieldProps } from '
|
|
11
|
-
import { BaseMultiInputFieldProps, RangeFieldSection, DateRange, RangePosition, FieldType } from '../../models';
|
|
10
|
+
import { BaseMultiInputFieldProps, RangeFieldSection, DateRange, RangePosition, FieldType, UseDateRangeFieldProps } from '../../models';
|
|
12
11
|
import { UseRangePositionResponse } from './useRangePosition';
|
|
13
12
|
export interface RangePickerFieldSlots extends UseClearableFieldSlots {
|
|
14
13
|
field: React.ElementType;
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import { BaseDateValidationProps, MakeOptional, UseFieldInternalProps } from '@mui/x-date-pickers/internals';
|
|
2
1
|
import { PickerValidDate } from '@mui/x-date-pickers/models';
|
|
3
|
-
import { DateRangeValidationError, RangeFieldSection, DateRange, RangeFieldSeparatorProps } from '../../models';
|
|
4
2
|
/**
|
|
5
3
|
* Props used to validate a day value in range pickers.
|
|
6
4
|
*/
|
|
@@ -17,5 +15,3 @@ export interface DayRangeValidationProps<TDate extends PickerValidDate> {
|
|
|
17
15
|
*/
|
|
18
16
|
shouldDisableDate?: (day: TDate, position: 'start' | 'end') => boolean;
|
|
19
17
|
}
|
|
20
|
-
export interface UseDateRangeFieldProps<TDate extends PickerValidDate, TEnableAccessibleFieldDOMStructure extends boolean> extends MakeOptional<Omit<UseFieldInternalProps<DateRange<TDate>, TDate, RangeFieldSection, TEnableAccessibleFieldDOMStructure, DateRangeValidationError>, 'unstableFieldRef'>, 'format'>, RangeFieldSeparatorProps, DayRangeValidationProps<TDate>, BaseDateValidationProps<TDate> {
|
|
21
|
-
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ponyfillGlobal } from '@mui/utils';
|
|
2
2
|
export const getReleaseInfo = () => {
|
|
3
|
-
const releaseInfo = "
|
|
3
|
+
const releaseInfo = "MTcxNjQxNTIwMDAwMA==";
|
|
4
4
|
if (process.env.NODE_ENV !== 'production') {
|
|
5
5
|
// A simple hack to set the value in the test environment (has no build step).
|
|
6
6
|
// eslint-disable-next-line no-useless-concat
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PickerValidDate, TimezoneProps } from '@mui/x-date-pickers/models';
|
|
2
2
|
import { Validator, BaseDateValidationProps, DefaultizedProps } from '@mui/x-date-pickers/internals';
|
|
3
|
-
import { DayRangeValidationProps } from '../../models';
|
|
3
|
+
import { DayRangeValidationProps } from '../../models/dateRange';
|
|
4
4
|
import { DateRangeValidationError, DateRange } from '../../../models';
|
|
5
5
|
export interface DateRangeComponentValidationProps<TDate extends PickerValidDate> extends DayRangeValidationProps<TDate>, Required<BaseDateValidationProps<TDate>>, DefaultizedProps<TimezoneProps, 'timezone'> {
|
|
6
6
|
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { BaseDateValidationProps, MakeOptional, UseFieldInternalProps } from '@mui/x-date-pickers/internals';
|
|
2
|
+
import { PickerValidDate } from '@mui/x-date-pickers/models';
|
|
3
|
+
import { RangeFieldSection, RangeFieldSeparatorProps } from './fields';
|
|
4
|
+
import { DateRangeValidationError } from './validation';
|
|
5
|
+
import { DateRange } from './range';
|
|
6
|
+
import { DayRangeValidationProps } from '../internals/models/dateRange';
|
|
7
|
+
export interface UseDateRangeFieldProps<TDate extends PickerValidDate, TEnableAccessibleFieldDOMStructure extends boolean> extends MakeOptional<Omit<UseFieldInternalProps<DateRange<TDate>, TDate, RangeFieldSection, TEnableAccessibleFieldDOMStructure, DateRangeValidationError>, 'unstableFieldRef'>, 'format'>, RangeFieldSeparatorProps, DayRangeValidationProps<TDate>, BaseDateValidationProps<TDate> {
|
|
8
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/models/index.d.ts
CHANGED
package/models/index.js
CHANGED
|
@@ -471,7 +471,7 @@ const DateRangeCalendar = /*#__PURE__*/React.forwardRef(function DateRangeCalend
|
|
|
471
471
|
process.env.NODE_ENV !== "production" ? DateRangeCalendar.propTypes = {
|
|
472
472
|
// ----------------------------- Warning --------------------------------
|
|
473
473
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
474
|
-
// | To update them edit the TypeScript types and run "
|
|
474
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
475
475
|
// ----------------------------------------------------------------------
|
|
476
476
|
/**
|
|
477
477
|
* If `true`, the main element is focused during the first mount.
|
|
@@ -45,7 +45,7 @@ const DateRangePicker = /*#__PURE__*/React.forwardRef(function DateRangePicker(i
|
|
|
45
45
|
process.env.NODE_ENV !== "production" ? DateRangePicker.propTypes = {
|
|
46
46
|
// ----------------------------- Warning --------------------------------
|
|
47
47
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
48
|
-
// | To update them edit the TypeScript types and run "
|
|
48
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
49
49
|
// ----------------------------------------------------------------------
|
|
50
50
|
/**
|
|
51
51
|
* If `true`, the main element is focused during the first mount.
|
|
@@ -90,7 +90,7 @@ const DateRangePickerToolbar = /*#__PURE__*/React.forwardRef(function DateRangeP
|
|
|
90
90
|
process.env.NODE_ENV !== "production" ? DateRangePickerToolbar.propTypes = {
|
|
91
91
|
// ----------------------------- Warning --------------------------------
|
|
92
92
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
93
|
-
// | To update them edit the TypeScript types and run "
|
|
93
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
94
94
|
// ----------------------------------------------------------------------
|
|
95
95
|
/**
|
|
96
96
|
* Override or extend the styles applied to the component.
|
|
@@ -118,13 +118,6 @@ const DateRangePickerDayRoot = styled('div', {
|
|
|
118
118
|
})
|
|
119
119
|
}]
|
|
120
120
|
}));
|
|
121
|
-
DateRangePickerDayRoot.propTypes = {
|
|
122
|
-
// ----------------------------- Warning --------------------------------
|
|
123
|
-
// | These PropTypes are generated from the TypeScript type definitions |
|
|
124
|
-
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
|
125
|
-
// ----------------------------------------------------------------------
|
|
126
|
-
ownerState: PropTypes.object.isRequired
|
|
127
|
-
};
|
|
128
121
|
const DateRangePickerDayRangeIntervalPreview = styled('div', {
|
|
129
122
|
name: 'MuiDateRangePickerDay',
|
|
130
123
|
slot: 'RangeIntervalPreview',
|
|
@@ -177,13 +170,6 @@ const DateRangePickerDayRangeIntervalPreview = styled('div', {
|
|
|
177
170
|
}, endBorderStyle)
|
|
178
171
|
}]
|
|
179
172
|
}));
|
|
180
|
-
DateRangePickerDayRangeIntervalPreview.propTypes = {
|
|
181
|
-
// ----------------------------- Warning --------------------------------
|
|
182
|
-
// | These PropTypes are generated from the TypeScript type definitions |
|
|
183
|
-
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
|
184
|
-
// ----------------------------------------------------------------------
|
|
185
|
-
ownerState: PropTypes.object.isRequired
|
|
186
|
-
};
|
|
187
173
|
const DateRangePickerDayDay = styled(PickersDay, {
|
|
188
174
|
name: 'MuiDateRangePickerDay',
|
|
189
175
|
slot: 'Day',
|
|
@@ -270,7 +256,7 @@ const DateRangePickerDayRaw = /*#__PURE__*/React.forwardRef(function DateRangePi
|
|
|
270
256
|
process.env.NODE_ENV !== "production" ? DateRangePickerDayRaw.propTypes = {
|
|
271
257
|
// ----------------------------- Warning --------------------------------
|
|
272
258
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
273
|
-
// | To update them edit the TypeScript types and run "
|
|
259
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
274
260
|
// ----------------------------------------------------------------------
|
|
275
261
|
/**
|
|
276
262
|
* A ref for imperative actions.
|
|
@@ -45,7 +45,7 @@ const DateTimeRangePicker = /*#__PURE__*/React.forwardRef(function DateTimeRange
|
|
|
45
45
|
process.env.NODE_ENV !== "production" ? DateTimeRangePicker.propTypes = {
|
|
46
46
|
// ----------------------------- Warning --------------------------------
|
|
47
47
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
48
|
-
// | To update them edit the TypeScript types and run "
|
|
48
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
49
49
|
// ----------------------------------------------------------------------
|
|
50
50
|
/**
|
|
51
51
|
* 12h/24h view for hour selection clock.
|
|
@@ -146,7 +146,7 @@ const DateTimeRangePickerTabs = function DateTimeRangePickerTabs(inProps) {
|
|
|
146
146
|
process.env.NODE_ENV !== "production" ? DateTimeRangePickerTabs.propTypes = {
|
|
147
147
|
// ----------------------------- Warning --------------------------------
|
|
148
148
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
149
|
-
// | To update them edit the TypeScript types and run "
|
|
149
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
150
150
|
// ----------------------------------------------------------------------
|
|
151
151
|
/**
|
|
152
152
|
* Override or extend the styles applied to the component.
|
|
@@ -172,7 +172,7 @@ const DateTimeRangePickerToolbar = /*#__PURE__*/React.forwardRef(function DateTi
|
|
|
172
172
|
process.env.NODE_ENV !== "production" ? DateTimeRangePickerToolbar.propTypes = {
|
|
173
173
|
// ----------------------------- Warning --------------------------------
|
|
174
174
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
175
|
-
// | To update them edit the TypeScript types and run "
|
|
175
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
176
176
|
// ----------------------------------------------------------------------
|
|
177
177
|
ampm: PropTypes.bool,
|
|
178
178
|
/**
|
|
@@ -56,7 +56,7 @@ const DesktopDateRangePicker = /*#__PURE__*/React.forwardRef(function DesktopDat
|
|
|
56
56
|
DesktopDateRangePicker.propTypes = {
|
|
57
57
|
// ----------------------------- Warning --------------------------------
|
|
58
58
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
59
|
-
// | To update them edit the TypeScript types and run "
|
|
59
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
60
60
|
// ----------------------------------------------------------------------
|
|
61
61
|
/**
|
|
62
62
|
* If `true`, the main element is focused during the first mount.
|
|
@@ -129,7 +129,7 @@ const DesktopDateTimeRangePicker = /*#__PURE__*/React.forwardRef(function Deskto
|
|
|
129
129
|
DesktopDateTimeRangePicker.propTypes = {
|
|
130
130
|
// ----------------------------- Warning --------------------------------
|
|
131
131
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
132
|
-
// | To update them edit the TypeScript types and run "
|
|
132
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
133
133
|
// ----------------------------------------------------------------------
|
|
134
134
|
/**
|
|
135
135
|
* 12h/24h view for hour selection clock.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { LocalizationProvider } from '@mui/x-date-pickers/LocalizationProvider';
|
|
@@ -57,7 +57,7 @@ const MobileDateRangePicker = /*#__PURE__*/React.forwardRef(function MobileDateR
|
|
|
57
57
|
MobileDateRangePicker.propTypes = {
|
|
58
58
|
// ----------------------------- Warning --------------------------------
|
|
59
59
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
60
|
-
// | To update them edit the TypeScript types and run "
|
|
60
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
61
61
|
// ----------------------------------------------------------------------
|
|
62
62
|
/**
|
|
63
63
|
* If `true`, the main element is focused during the first mount.
|
|
@@ -128,7 +128,7 @@ const MobileDateTimeRangePicker = /*#__PURE__*/React.forwardRef(function MobileD
|
|
|
128
128
|
MobileDateTimeRangePicker.propTypes = {
|
|
129
129
|
// ----------------------------- Warning --------------------------------
|
|
130
130
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
131
|
-
// | To update them edit the TypeScript types and run "
|
|
131
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
132
132
|
// ----------------------------------------------------------------------
|
|
133
133
|
/**
|
|
134
134
|
* 12h/24h view for hour selection clock.
|
|
@@ -128,7 +128,7 @@ const MultiInputDateRangeField = /*#__PURE__*/React.forwardRef(function MultiInp
|
|
|
128
128
|
process.env.NODE_ENV !== "production" ? MultiInputDateRangeField.propTypes = {
|
|
129
129
|
// ----------------------------- Warning --------------------------------
|
|
130
130
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
131
|
-
// | To update them edit the TypeScript types and run "
|
|
131
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
132
132
|
// ----------------------------------------------------------------------
|
|
133
133
|
/**
|
|
134
134
|
* If `true`, the `input` element is focused during the first mount.
|
|
@@ -128,7 +128,7 @@ const MultiInputDateTimeRangeField = /*#__PURE__*/React.forwardRef(function Mult
|
|
|
128
128
|
process.env.NODE_ENV !== "production" ? MultiInputDateTimeRangeField.propTypes = {
|
|
129
129
|
// ----------------------------- Warning --------------------------------
|
|
130
130
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
131
|
-
// | To update them edit the TypeScript types and run "
|
|
131
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
132
132
|
// ----------------------------------------------------------------------
|
|
133
133
|
/**
|
|
134
134
|
* 12h/24h view for hour selection clock.
|
|
@@ -128,7 +128,7 @@ const MultiInputTimeRangeField = /*#__PURE__*/React.forwardRef(function MultiInp
|
|
|
128
128
|
process.env.NODE_ENV !== "production" ? MultiInputTimeRangeField.propTypes = {
|
|
129
129
|
// ----------------------------- Warning --------------------------------
|
|
130
130
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
131
|
-
// | To update them edit the TypeScript types and run "
|
|
131
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
132
132
|
// ----------------------------------------------------------------------
|
|
133
133
|
/**
|
|
134
134
|
* 12h/24h view for hour selection clock.
|
|
@@ -69,7 +69,7 @@ const PickersRangeCalendarHeader = /*#__PURE__*/React.forwardRef(function Picker
|
|
|
69
69
|
process.env.NODE_ENV !== "production" ? PickersRangeCalendarHeader.propTypes = {
|
|
70
70
|
// ----------------------------- Warning --------------------------------
|
|
71
71
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
72
|
-
// | To update them edit the TypeScript types and run "
|
|
72
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
73
73
|
// ----------------------------------------------------------------------
|
|
74
74
|
/**
|
|
75
75
|
* The number of calendars rendered.
|
|
@@ -61,7 +61,7 @@ SingleInputDateRangeField.fieldType = 'single-input';
|
|
|
61
61
|
process.env.NODE_ENV !== "production" ? SingleInputDateRangeField.propTypes = {
|
|
62
62
|
// ----------------------------- Warning --------------------------------
|
|
63
63
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
64
|
-
// | To update them edit the TypeScript types and run "
|
|
64
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
65
65
|
// ----------------------------------------------------------------------
|
|
66
66
|
/**
|
|
67
67
|
* If `true`, the `input` element is focused during the first mount.
|
|
@@ -61,7 +61,7 @@ SingleInputDateTimeRangeField.fieldType = 'single-input';
|
|
|
61
61
|
process.env.NODE_ENV !== "production" ? SingleInputDateTimeRangeField.propTypes = {
|
|
62
62
|
// ----------------------------- Warning --------------------------------
|
|
63
63
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
64
|
-
// | To update them edit the TypeScript types and run "
|
|
64
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
65
65
|
// ----------------------------------------------------------------------
|
|
66
66
|
/**
|
|
67
67
|
* 12h/24h view for hour selection clock.
|
|
@@ -61,7 +61,7 @@ SingleInputTimeRangeField.fieldType = 'single-input';
|
|
|
61
61
|
process.env.NODE_ENV !== "production" ? SingleInputTimeRangeField.propTypes = {
|
|
62
62
|
// ----------------------------- Warning --------------------------------
|
|
63
63
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
64
|
-
// | To update them edit the TypeScript types and run "
|
|
64
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
65
65
|
// ----------------------------------------------------------------------
|
|
66
66
|
/**
|
|
67
67
|
* 12h/24h view for hour selection clock.
|
|
@@ -50,7 +50,7 @@ const StaticDateRangePicker = /*#__PURE__*/React.forwardRef(function StaticDateR
|
|
|
50
50
|
StaticDateRangePicker.propTypes = {
|
|
51
51
|
// ----------------------------- Warning --------------------------------
|
|
52
52
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
53
|
-
// | To update them edit the TypeScript types and run "
|
|
53
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
54
54
|
// ----------------------------------------------------------------------
|
|
55
55
|
/**
|
|
56
56
|
* If `true`, the main element is focused during the first mount.
|
package/modern/index.js
CHANGED