@pisell/date-picker 1.0.143 → 1.0.145
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/README.md +2 -2
- package/es/ActionBar/index.d.ts +19 -20
- package/es/ActionBar/index.less +70 -70
- package/es/AdapterDateFns/index.d.ts +1 -1
- package/es/AdapterDateFnsJalali/index.d.ts +1 -1
- package/es/AdapterDayjs/index.d.ts +1 -1
- package/es/AdapterLuxon/index.d.ts +1 -1
- package/es/AdapterMoment/index.d.ts +1 -1
- package/es/AdapterMomentHijri/index.d.ts +1 -1
- package/es/AdapterMomentJalaali/index.d.ts +1 -1
- package/es/CustomCalendarHeader/index.d.ts +2 -3
- package/es/DatePickerLocales/index.d.ts +1 -1
- package/es/DateRangeCalendar/DateRangeCalendar.d.ts +7 -7
- package/es/DateRangeCalendar/DateRangeCalendar.js +122 -122
- package/es/DateRangeCalendar/DateRangeCalendar.types.d.ts +123 -123
- package/es/DateRangeCalendar/dateRangeCalendarClasses.d.ts +11 -11
- package/es/DateRangeCalendar/index.d.ts +4 -4
- package/es/DateRangeCalendar/useDragRange.d.ts +33 -33
- package/es/DateRangePicker/DateRangePicker.d.ts +7 -7
- package/es/DateRangePicker/DateRangePicker.js +184 -184
- package/es/DateRangePicker/DateRangePicker.types.d.ts +37 -37
- package/es/DateRangePicker/DateRangePickerToolbar.d.ts +12 -12
- package/es/DateRangePicker/DateRangePickerToolbar.js +10 -10
- package/es/DateRangePicker/dateRangePickerToolbarClasses.d.ts +9 -9
- package/es/DateRangePicker/index.d.ts +6 -6
- package/es/DateRangePicker/shared.d.ts +51 -51
- package/es/DateRangePickerDay/DateRangePickerDay.js +96 -96
- package/es/DateRangePickerDay/dateRangePickerDayClasses.d.ts +41 -41
- package/es/DateRangePickerDay/index.d.ts +4 -4
- package/es/DesktopDateRangePicker/DesktopDateRangePicker.d.ts +7 -7
- package/es/DesktopDateRangePicker/DesktopDateRangePicker.js +180 -180
- package/es/DesktopDateRangePicker/DesktopDateRangePicker.types.d.ts +36 -36
- package/es/DesktopDateRangePicker/index.d.ts +2 -2
- package/es/Dialog/index.d.ts +2 -3
- package/es/Drawer/index.d.ts +11 -11
- package/es/Drawer/index.less +39 -39
- package/es/MobileDateRangePicker/MobileDateRangePicker.d.ts +7 -7
- package/es/MobileDateRangePicker/MobileDateRangePicker.js +180 -180
- package/es/MobileDateRangePicker/MobileDateRangePicker.types.d.ts +36 -36
- package/es/MobileDateRangePicker/index.d.ts +2 -2
- package/es/MultiInputDateRangeField/MultiInputDateRangeField.d.ts +7 -7
- package/es/MultiInputDateRangeField/MultiInputDateRangeField.js +113 -113
- package/es/MultiInputDateRangeField/MultiInputDateRangeField.types.d.ts +69 -69
- package/es/MultiInputDateRangeField/index.d.ts +3 -3
- package/es/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.d.ts +7 -7
- package/es/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.js +144 -144
- package/es/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.types.d.ts +70 -70
- package/es/MultiInputDateTimeRangeField/index.d.ts +3 -3
- package/es/MultiInputTimeRangeField/MultiInputTimeRangeField.d.ts +7 -7
- package/es/MultiInputTimeRangeField/MultiInputTimeRangeField.js +130 -130
- package/es/MultiInputTimeRangeField/MultiInputTimeRangeField.types.d.ts +70 -70
- package/es/MultiInputTimeRangeField/index.d.ts +3 -3
- package/es/OldActionBar/index.d.ts +18 -19
- package/es/OldActionBar/index.less +17 -17
- package/es/OldPisellDateRangePicker/index.d.ts +79 -79
- package/es/OldPisellDateRangePicker/index.less +102 -102
- package/es/PisellDateRangePicker/LocaleContext.d.ts +7 -7
- package/es/PisellDateRangePicker/index.less +183 -183
- package/es/PisellDateRangePicker/useCssVariables.d.ts +8 -8
- package/es/Shortcuts/index.d.ts +15 -16
- package/es/Shortcuts/index.less +17 -17
- package/es/SingleInputDateRangeField/SingleInputDateRangeField.d.ts +8 -8
- package/es/SingleInputDateRangeField/SingleInputDateRangeField.js +152 -152
- package/es/SingleInputDateRangeField/SingleInputDateRangeField.types.d.ts +49 -49
- package/es/SingleInputDateRangeField/index.d.ts +3 -3
- package/es/SingleInputDateRangeField/useSingleInputDateRangeField.d.ts +3 -3
- package/es/SingleInputDateTimeRangeField/SingleInputDateTimeRangeField.d.ts +8 -8
- package/es/SingleInputDateTimeRangeField/SingleInputDateTimeRangeField.js +183 -183
- package/es/SingleInputDateTimeRangeField/SingleInputDateTimeRangeField.types.d.ts +50 -50
- package/es/SingleInputDateTimeRangeField/index.d.ts +3 -3
- package/es/SingleInputDateTimeRangeField/useSingleInputDateTimeRangeField.d.ts +3 -3
- package/es/SingleInputTimeRangeField/SingleInputTimeRangeField.d.ts +8 -8
- package/es/SingleInputTimeRangeField/SingleInputTimeRangeField.js +169 -169
- package/es/SingleInputTimeRangeField/SingleInputTimeRangeField.types.d.ts +50 -50
- package/es/SingleInputTimeRangeField/index.d.ts +3 -3
- package/es/SingleInputTimeRangeField/useSingleInputTimeRangeField.d.ts +3 -3
- package/es/StaticDateRangePicker/StaticDateRangePicker.d.ts +7 -7
- package/es/StaticDateRangePicker/StaticDateRangePicker.js +148 -148
- package/es/StaticDateRangePicker/StaticDateRangePicker.types.d.ts +31 -31
- package/es/StaticDateRangePicker/index.d.ts +2 -2
- package/es/Toolbar/index.d.ts +3 -4
- package/es/Toolbar/index.less +34 -34
- package/es/browserSelect/index.d.ts +15 -15
- package/es/browserSelect/index.js +7 -7
- package/es/browserSelect/index.less +17 -17
- package/es/constants.d.ts +58 -58
- package/es/dateRangeViewRenderers/dateRangeViewRenderers.d.ts +12 -13
- package/es/dateRangeViewRenderers/dateRangeViewRenderers.js +3 -3
- package/es/dateRangeViewRenderers/index.d.ts +2 -2
- package/es/hooks/useDocumentVisibility.d.ts +2 -2
- package/es/hooks/useNextDay.d.ts +2 -2
- package/es/hooks/useUpdateEffect.d.ts +2 -2
- package/es/icon/ChevronLeft.d.ts +5 -6
- package/es/icon/ChevronLeftDouble.d.ts +5 -6
- package/es/icon/ChevronRight.d.ts +5 -6
- package/es/icon/ChevronRightDouble.d.ts +5 -6
- package/es/icon/CloseCircle.d.ts +5 -6
- package/es/index.d.ts +26 -26
- package/es/internals/hooks/useDesktopRangePicker/index.d.ts +2 -2
- package/es/internals/hooks/useDesktopRangePicker/useDesktopRangePicker.types.d.ts +34 -34
- package/es/internals/hooks/useEnrichedRangePickerFieldProps.d.ts +54 -54
- package/es/internals/hooks/useMobileRangePicker/index.d.ts +2 -2
- package/es/internals/hooks/useMobileRangePicker/useMobileRangePicker.types.d.ts +30 -30
- package/es/internals/hooks/useMultiInputRangeField/useMultiInputDateRangeField.d.ts +3 -3
- package/es/internals/hooks/useMultiInputRangeField/useMultiInputDateTimeRangeField.d.ts +4 -4
- package/es/internals/hooks/useMultiInputRangeField/useMultiInputRangeField.types.d.ts +17 -17
- package/es/internals/hooks/useMultiInputRangeField/useMultiInputTimeRangeField.d.ts +4 -4
- package/es/internals/hooks/useRangePosition.d.ts +28 -28
- package/es/internals/hooks/useStaticRangePicker/index.d.ts +2 -2
- package/es/internals/hooks/useStaticRangePicker/useStaticRangePicker.d.ts +9 -10
- package/es/internals/hooks/useStaticRangePicker/useStaticRangePicker.js +3 -3
- package/es/internals/hooks/useStaticRangePicker/useStaticRangePicker.types.d.ts +33 -33
- package/es/internals/models/dateRange.d.ts +30 -30
- package/es/internals/models/dateTimeRange.d.ts +13 -13
- package/es/internals/models/fields.d.ts +43 -43
- package/es/internals/models/index.d.ts +6 -6
- package/es/internals/models/range.d.ts +3 -3
- package/es/internals/models/rangePickerProps.d.ts +17 -17
- package/es/internals/models/timeRange.d.ts +13 -13
- package/es/internals/utils/date-fields-utils.d.ts +25 -25
- package/es/internals/utils/date-range-manager.d.ts +21 -21
- package/es/internals/utils/date-utils.d.ts +6 -6
- package/es/internals/utils/releaseInfo.d.ts +1 -1
- package/es/internals/utils/validation/validateDateRange.d.ts +7 -7
- package/es/internals/utils/validation/validateDateTimeRange.d.ts +8 -8
- package/es/internals/utils/validation/validateTimeRange.d.ts +7 -7
- package/es/internals/utils/valueManagers.d.ts +7 -7
- package/es/locales/en-US.d.ts +26 -26
- package/es/locales/index.d.ts +2 -2
- package/es/locales/ja.d.ts +26 -26
- package/es/locales/pt.d.ts +26 -26
- package/es/locales/zh-CN.d.ts +26 -26
- package/es/locales/zh-TW.d.ts +26 -26
- package/es/models/index.d.ts +1 -1
- package/es/models/validation.d.ts +9 -9
- package/es/themeAugmentation/components.d.ts +66 -66
- package/es/themeAugmentation/overrides.d.ts +33 -33
- package/es/themeAugmentation/props.d.ts +42 -42
- package/es/typings.d.ts +4 -4
- package/es/utils/index.d.ts +42 -42
- package/es/utils/index.js +19 -19
- package/lib/ActionBar/index.d.ts +19 -20
- package/lib/ActionBar/index.less +70 -70
- package/lib/AdapterDateFns/index.d.ts +1 -1
- package/lib/AdapterDateFnsJalali/index.d.ts +1 -1
- package/lib/AdapterDayjs/index.d.ts +1 -1
- package/lib/AdapterLuxon/index.d.ts +1 -1
- package/lib/AdapterMoment/index.d.ts +1 -1
- package/lib/AdapterMomentHijri/index.d.ts +1 -1
- package/lib/AdapterMomentJalaali/index.d.ts +1 -1
- package/lib/CustomCalendarHeader/index.d.ts +2 -3
- package/lib/DatePickerLocales/index.d.ts +1 -1
- package/lib/DateRangeCalendar/DateRangeCalendar.d.ts +7 -7
- package/lib/DateRangeCalendar/DateRangeCalendar.types.d.ts +123 -123
- package/lib/DateRangeCalendar/dateRangeCalendarClasses.d.ts +11 -11
- package/lib/DateRangeCalendar/index.d.ts +4 -4
- package/lib/DateRangeCalendar/useDragRange.d.ts +33 -33
- package/lib/DateRangePicker/DateRangePicker.d.ts +7 -7
- package/lib/DateRangePicker/DateRangePicker.types.d.ts +37 -37
- package/lib/DateRangePicker/DateRangePickerToolbar.d.ts +12 -12
- package/lib/DateRangePicker/dateRangePickerToolbarClasses.d.ts +9 -9
- package/lib/DateRangePicker/index.d.ts +6 -6
- package/lib/DateRangePicker/shared.d.ts +51 -51
- package/lib/DateRangePickerDay/dateRangePickerDayClasses.d.ts +41 -41
- package/lib/DateRangePickerDay/index.d.ts +4 -4
- package/lib/DesktopDateRangePicker/DesktopDateRangePicker.d.ts +7 -7
- package/lib/DesktopDateRangePicker/DesktopDateRangePicker.types.d.ts +36 -36
- package/lib/DesktopDateRangePicker/index.d.ts +2 -2
- package/lib/Dialog/index.d.ts +2 -3
- package/lib/Drawer/index.d.ts +11 -11
- package/lib/Drawer/index.less +39 -39
- package/lib/MobileDateRangePicker/MobileDateRangePicker.d.ts +7 -7
- package/lib/MobileDateRangePicker/MobileDateRangePicker.types.d.ts +36 -36
- package/lib/MobileDateRangePicker/index.d.ts +2 -2
- package/lib/MultiInputDateRangeField/MultiInputDateRangeField.d.ts +7 -7
- package/lib/MultiInputDateRangeField/MultiInputDateRangeField.types.d.ts +69 -69
- package/lib/MultiInputDateRangeField/index.d.ts +3 -3
- package/lib/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.d.ts +7 -7
- package/lib/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.types.d.ts +70 -70
- package/lib/MultiInputDateTimeRangeField/index.d.ts +3 -3
- package/lib/MultiInputTimeRangeField/MultiInputTimeRangeField.d.ts +7 -7
- package/lib/MultiInputTimeRangeField/MultiInputTimeRangeField.types.d.ts +70 -70
- package/lib/MultiInputTimeRangeField/index.d.ts +3 -3
- package/lib/OldActionBar/index.d.ts +18 -19
- package/lib/OldActionBar/index.less +17 -17
- package/lib/OldPisellDateRangePicker/index.d.ts +79 -79
- package/lib/OldPisellDateRangePicker/index.less +102 -102
- package/lib/PisellDateRangePicker/LocaleContext.d.ts +7 -7
- package/lib/PisellDateRangePicker/index.less +183 -183
- package/lib/PisellDateRangePicker/useCssVariables.d.ts +8 -8
- package/lib/Shortcuts/index.d.ts +15 -16
- package/lib/Shortcuts/index.less +17 -17
- package/lib/SingleInputDateRangeField/SingleInputDateRangeField.d.ts +8 -8
- package/lib/SingleInputDateRangeField/SingleInputDateRangeField.types.d.ts +49 -49
- package/lib/SingleInputDateRangeField/index.d.ts +3 -3
- package/lib/SingleInputDateRangeField/useSingleInputDateRangeField.d.ts +3 -3
- package/lib/SingleInputDateTimeRangeField/SingleInputDateTimeRangeField.d.ts +8 -8
- package/lib/SingleInputDateTimeRangeField/SingleInputDateTimeRangeField.types.d.ts +50 -50
- package/lib/SingleInputDateTimeRangeField/index.d.ts +3 -3
- package/lib/SingleInputDateTimeRangeField/useSingleInputDateTimeRangeField.d.ts +3 -3
- package/lib/SingleInputTimeRangeField/SingleInputTimeRangeField.d.ts +8 -8
- package/lib/SingleInputTimeRangeField/SingleInputTimeRangeField.types.d.ts +50 -50
- package/lib/SingleInputTimeRangeField/index.d.ts +3 -3
- package/lib/SingleInputTimeRangeField/useSingleInputTimeRangeField.d.ts +3 -3
- package/lib/StaticDateRangePicker/StaticDateRangePicker.d.ts +7 -7
- package/lib/StaticDateRangePicker/StaticDateRangePicker.types.d.ts +31 -31
- package/lib/StaticDateRangePicker/index.d.ts +2 -2
- package/lib/Toolbar/index.d.ts +3 -4
- package/lib/Toolbar/index.less +34 -34
- package/lib/browserSelect/index.d.ts +15 -15
- package/lib/browserSelect/index.less +17 -17
- package/lib/constants.d.ts +58 -58
- package/lib/dateRangeViewRenderers/dateRangeViewRenderers.d.ts +12 -13
- package/lib/dateRangeViewRenderers/index.d.ts +2 -2
- package/lib/hooks/useDocumentVisibility.d.ts +2 -2
- package/lib/hooks/useNextDay.d.ts +2 -2
- package/lib/hooks/useUpdateEffect.d.ts +2 -2
- package/lib/icon/ChevronLeft.d.ts +5 -6
- package/lib/icon/ChevronLeftDouble.d.ts +5 -6
- package/lib/icon/ChevronRight.d.ts +5 -6
- package/lib/icon/ChevronRightDouble.d.ts +5 -6
- package/lib/icon/CloseCircle.d.ts +5 -6
- package/lib/index.d.ts +26 -26
- package/lib/internals/hooks/useDesktopRangePicker/index.d.ts +2 -2
- package/lib/internals/hooks/useDesktopRangePicker/useDesktopRangePicker.types.d.ts +34 -34
- package/lib/internals/hooks/useEnrichedRangePickerFieldProps.d.ts +54 -54
- package/lib/internals/hooks/useMobileRangePicker/index.d.ts +2 -2
- package/lib/internals/hooks/useMobileRangePicker/useMobileRangePicker.types.d.ts +30 -30
- package/lib/internals/hooks/useMultiInputRangeField/useMultiInputDateRangeField.d.ts +3 -3
- package/lib/internals/hooks/useMultiInputRangeField/useMultiInputDateTimeRangeField.d.ts +4 -4
- package/lib/internals/hooks/useMultiInputRangeField/useMultiInputRangeField.types.d.ts +17 -17
- package/lib/internals/hooks/useMultiInputRangeField/useMultiInputTimeRangeField.d.ts +4 -4
- package/lib/internals/hooks/useRangePosition.d.ts +28 -28
- package/lib/internals/hooks/useStaticRangePicker/index.d.ts +2 -2
- package/lib/internals/hooks/useStaticRangePicker/useStaticRangePicker.d.ts +9 -10
- package/lib/internals/hooks/useStaticRangePicker/useStaticRangePicker.types.d.ts +33 -33
- package/lib/internals/models/dateRange.d.ts +30 -30
- package/lib/internals/models/dateTimeRange.d.ts +13 -13
- package/lib/internals/models/fields.d.ts +43 -43
- package/lib/internals/models/index.d.ts +6 -6
- package/lib/internals/models/range.d.ts +3 -3
- package/lib/internals/models/rangePickerProps.d.ts +17 -17
- package/lib/internals/models/timeRange.d.ts +13 -13
- package/lib/internals/utils/date-fields-utils.d.ts +25 -25
- package/lib/internals/utils/date-range-manager.d.ts +21 -21
- package/lib/internals/utils/date-utils.d.ts +6 -6
- package/lib/internals/utils/releaseInfo.d.ts +1 -1
- package/lib/internals/utils/validation/validateDateRange.d.ts +7 -7
- package/lib/internals/utils/validation/validateDateTimeRange.d.ts +8 -8
- package/lib/internals/utils/validation/validateTimeRange.d.ts +7 -7
- package/lib/internals/utils/valueManagers.d.ts +7 -7
- package/lib/locales/en-US.d.ts +26 -26
- package/lib/locales/index.d.ts +2 -2
- package/lib/locales/ja.d.ts +26 -26
- package/lib/locales/pt.d.ts +26 -26
- package/lib/locales/zh-CN.d.ts +26 -26
- package/lib/locales/zh-TW.d.ts +26 -26
- package/lib/models/index.d.ts +1 -1
- package/lib/models/validation.d.ts +9 -9
- package/lib/themeAugmentation/components.d.ts +66 -66
- package/lib/themeAugmentation/overrides.d.ts +33 -33
- package/lib/themeAugmentation/props.d.ts +42 -42
- package/lib/typings.d.ts +4 -4
- package/lib/utils/index.d.ts +42 -42
- package/package.json +2 -2
- package/es/DateRangePickerDay/DateRangePickerDay.d.ts +0 -50
- package/es/PisellDateRangePicker/index.d.ts +0 -83
- package/es/internals/hooks/useDesktopRangePicker/useDesktopRangePicker.d.ts +0 -6
- package/es/internals/hooks/useMobileRangePicker/useMobileRangePicker.d.ts +0 -6
- package/es/themeAugmentation/index.d.ts +0 -3
- package/lib/DateRangePickerDay/DateRangePickerDay.d.ts +0 -50
- package/lib/PisellDateRangePicker/index.d.ts +0 -83
- package/lib/internals/hooks/useDesktopRangePicker/useDesktopRangePicker.d.ts +0 -6
- package/lib/internals/hooks/useMobileRangePicker/useMobileRangePicker.d.ts +0 -6
- package/lib/themeAugmentation/index.d.ts +0 -3
|
@@ -151,204 +151,204 @@ MultiInputTimeRangeField.propTypes = {
|
|
|
151
151
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
152
152
|
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
|
153
153
|
// ----------------------------------------------------------------------
|
|
154
|
-
/**
|
|
155
|
-
* 12h/24h view for hour selection clock.
|
|
156
|
-
* @default `utils.is12HourCycleInCurrentLocale()`
|
|
154
|
+
/**
|
|
155
|
+
* 12h/24h view for hour selection clock.
|
|
156
|
+
* @default `utils.is12HourCycleInCurrentLocale()`
|
|
157
157
|
*/
|
|
158
158
|
ampm: PropTypes.bool,
|
|
159
159
|
autoFocus: PropTypes.bool,
|
|
160
160
|
className: PropTypes.string,
|
|
161
|
-
/**
|
|
162
|
-
* Overridable components.
|
|
163
|
-
* @default {}
|
|
164
|
-
* @deprecated Please use `slots`.
|
|
161
|
+
/**
|
|
162
|
+
* Overridable components.
|
|
163
|
+
* @default {}
|
|
164
|
+
* @deprecated Please use `slots`.
|
|
165
165
|
*/
|
|
166
166
|
components: PropTypes.object,
|
|
167
|
-
/**
|
|
168
|
-
* The props used for each component slot.
|
|
169
|
-
* @default {}
|
|
170
|
-
* @deprecated Please use `slotProps`.
|
|
167
|
+
/**
|
|
168
|
+
* The props used for each component slot.
|
|
169
|
+
* @default {}
|
|
170
|
+
* @deprecated Please use `slotProps`.
|
|
171
171
|
*/
|
|
172
172
|
componentsProps: PropTypes.object,
|
|
173
|
-
/**
|
|
174
|
-
* The default value. Use when the component is not controlled.
|
|
173
|
+
/**
|
|
174
|
+
* The default value. Use when the component is not controlled.
|
|
175
175
|
*/
|
|
176
176
|
defaultValue: PropTypes.arrayOf(PropTypes.any),
|
|
177
|
-
/**
|
|
178
|
-
* Defines the `flex-direction` style property.
|
|
179
|
-
* It is applied for all screen sizes.
|
|
180
|
-
* @default 'column'
|
|
177
|
+
/**
|
|
178
|
+
* Defines the `flex-direction` style property.
|
|
179
|
+
* It is applied for all screen sizes.
|
|
180
|
+
* @default 'column'
|
|
181
181
|
*/
|
|
182
182
|
direction: PropTypes.oneOfType([PropTypes.oneOf(['column-reverse', 'column', 'row-reverse', 'row']), PropTypes.arrayOf(PropTypes.oneOf(['column-reverse', 'column', 'row-reverse', 'row'])), PropTypes.object]),
|
|
183
|
-
/**
|
|
184
|
-
* If `true`, the component is disabled.
|
|
185
|
-
* @default false
|
|
183
|
+
/**
|
|
184
|
+
* If `true`, the component is disabled.
|
|
185
|
+
* @default false
|
|
186
186
|
*/
|
|
187
187
|
disabled: PropTypes.bool,
|
|
188
|
-
/**
|
|
189
|
-
* If `true`, disable values after the current date for date components, time for time components and both for date time components.
|
|
190
|
-
* @default false
|
|
188
|
+
/**
|
|
189
|
+
* If `true`, disable values after the current date for date components, time for time components and both for date time components.
|
|
190
|
+
* @default false
|
|
191
191
|
*/
|
|
192
192
|
disableFuture: PropTypes.bool,
|
|
193
|
-
/**
|
|
194
|
-
* Do not ignore date part when validating min/max time.
|
|
195
|
-
* @default false
|
|
193
|
+
/**
|
|
194
|
+
* Do not ignore date part when validating min/max time.
|
|
195
|
+
* @default false
|
|
196
196
|
*/
|
|
197
197
|
disableIgnoringDatePartForTimeValidation: PropTypes.bool,
|
|
198
|
-
/**
|
|
199
|
-
* If `true`, disable values before the current date for date components, time for time components and both for date time components.
|
|
200
|
-
* @default false
|
|
198
|
+
/**
|
|
199
|
+
* If `true`, disable values before the current date for date components, time for time components and both for date time components.
|
|
200
|
+
* @default false
|
|
201
201
|
*/
|
|
202
202
|
disablePast: PropTypes.bool,
|
|
203
|
-
/**
|
|
204
|
-
* Add an element between each child.
|
|
203
|
+
/**
|
|
204
|
+
* Add an element between each child.
|
|
205
205
|
*/
|
|
206
206
|
divider: PropTypes.node,
|
|
207
|
-
/**
|
|
208
|
-
* Format of the date when rendered in the input(s).
|
|
207
|
+
/**
|
|
208
|
+
* Format of the date when rendered in the input(s).
|
|
209
209
|
*/
|
|
210
210
|
format: PropTypes.string,
|
|
211
|
-
/**
|
|
212
|
-
* Density of the format when rendered in the input.
|
|
213
|
-
* Setting `formatDensity` to `"spacious"` will add a space before and after each `/`, `-` and `.` character.
|
|
214
|
-
* @default "dense"
|
|
211
|
+
/**
|
|
212
|
+
* Density of the format when rendered in the input.
|
|
213
|
+
* Setting `formatDensity` to `"spacious"` will add a space before and after each `/`, `-` and `.` character.
|
|
214
|
+
* @default "dense"
|
|
215
215
|
*/
|
|
216
216
|
formatDensity: PropTypes.oneOf(['dense', 'spacious']),
|
|
217
|
-
/**
|
|
218
|
-
* Maximal selectable time.
|
|
219
|
-
* The date part of the object will be ignored unless `props.disableIgnoringDatePartForTimeValidation === true`.
|
|
217
|
+
/**
|
|
218
|
+
* Maximal selectable time.
|
|
219
|
+
* The date part of the object will be ignored unless `props.disableIgnoringDatePartForTimeValidation === true`.
|
|
220
220
|
*/
|
|
221
221
|
maxTime: PropTypes.any,
|
|
222
|
-
/**
|
|
223
|
-
* Minimal selectable time.
|
|
224
|
-
* The date part of the object will be ignored unless `props.disableIgnoringDatePartForTimeValidation === true`.
|
|
222
|
+
/**
|
|
223
|
+
* Minimal selectable time.
|
|
224
|
+
* The date part of the object will be ignored unless `props.disableIgnoringDatePartForTimeValidation === true`.
|
|
225
225
|
*/
|
|
226
226
|
minTime: PropTypes.any,
|
|
227
|
-
/**
|
|
228
|
-
* Step over minutes.
|
|
229
|
-
* @default 1
|
|
227
|
+
/**
|
|
228
|
+
* Step over minutes.
|
|
229
|
+
* @default 1
|
|
230
230
|
*/
|
|
231
231
|
minutesStep: PropTypes.number,
|
|
232
|
-
/**
|
|
233
|
-
* Callback fired when the value changes.
|
|
234
|
-
* @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value.
|
|
235
|
-
* @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value.
|
|
236
|
-
* @param {TValue} value The new value.
|
|
237
|
-
* @param {FieldChangeHandlerContext<TError>} context The context containing the validation result of the current value.
|
|
232
|
+
/**
|
|
233
|
+
* Callback fired when the value changes.
|
|
234
|
+
* @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value.
|
|
235
|
+
* @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value.
|
|
236
|
+
* @param {TValue} value The new value.
|
|
237
|
+
* @param {FieldChangeHandlerContext<TError>} context The context containing the validation result of the current value.
|
|
238
238
|
*/
|
|
239
239
|
onChange: PropTypes.func,
|
|
240
|
-
/**
|
|
241
|
-
* Callback fired when the error associated to the current value changes.
|
|
242
|
-
* @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value.
|
|
243
|
-
* @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value.
|
|
244
|
-
* @param {TError} error The new error.
|
|
245
|
-
* @param {TValue} value The value associated to the error.
|
|
240
|
+
/**
|
|
241
|
+
* Callback fired when the error associated to the current value changes.
|
|
242
|
+
* @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value.
|
|
243
|
+
* @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value.
|
|
244
|
+
* @param {TError} error The new error.
|
|
245
|
+
* @param {TValue} value The value associated to the error.
|
|
246
246
|
*/
|
|
247
247
|
onError: PropTypes.func,
|
|
248
|
-
/**
|
|
249
|
-
* Callback fired when the selected sections change.
|
|
250
|
-
* @param {FieldSelectedSections} newValue The new selected sections.
|
|
248
|
+
/**
|
|
249
|
+
* Callback fired when the selected sections change.
|
|
250
|
+
* @param {FieldSelectedSections} newValue The new selected sections.
|
|
251
251
|
*/
|
|
252
252
|
onSelectedSectionsChange: PropTypes.func,
|
|
253
|
-
/**
|
|
254
|
-
* It prevents the user from changing the value of the field
|
|
255
|
-
* (not from interacting with the field).
|
|
256
|
-
* @default false
|
|
253
|
+
/**
|
|
254
|
+
* It prevents the user from changing the value of the field
|
|
255
|
+
* (not from interacting with the field).
|
|
256
|
+
* @default false
|
|
257
257
|
*/
|
|
258
258
|
readOnly: PropTypes.bool,
|
|
259
|
-
/**
|
|
260
|
-
* The date used to generate a part of the new value that is not present in the format when both `value` and `defaultValue` are empty.
|
|
261
|
-
* For example, on time fields it will be used to determine the date to set.
|
|
262
|
-
* @default The closest valid date using the validation props, except callbacks such as `shouldDisableDate`. Value is rounded to the most granular section used.
|
|
259
|
+
/**
|
|
260
|
+
* The date used to generate a part of the new value that is not present in the format when both `value` and `defaultValue` are empty.
|
|
261
|
+
* For example, on time fields it will be used to determine the date to set.
|
|
262
|
+
* @default The closest valid date using the validation props, except callbacks such as `shouldDisableDate`. Value is rounded to the most granular section used.
|
|
263
263
|
*/
|
|
264
264
|
referenceDate: PropTypes.any,
|
|
265
|
-
/**
|
|
266
|
-
* The currently selected sections.
|
|
267
|
-
* This prop accept four formats:
|
|
268
|
-
* 1. If a number is provided, the section at this index will be selected.
|
|
269
|
-
* 2. If an object with a `startIndex` and `endIndex` properties are provided, the sections between those two indexes will be selected.
|
|
270
|
-
* 3. If a string of type `FieldSectionType` is provided, the first section with that name will be selected.
|
|
271
|
-
* 4. If `null` is provided, no section will be selected
|
|
272
|
-
* If not provided, the selected sections will be handled internally.
|
|
265
|
+
/**
|
|
266
|
+
* The currently selected sections.
|
|
267
|
+
* This prop accept four formats:
|
|
268
|
+
* 1. If a number is provided, the section at this index will be selected.
|
|
269
|
+
* 2. If an object with a `startIndex` and `endIndex` properties are provided, the sections between those two indexes will be selected.
|
|
270
|
+
* 3. If a string of type `FieldSectionType` is provided, the first section with that name will be selected.
|
|
271
|
+
* 4. If `null` is provided, no section will be selected
|
|
272
|
+
* If not provided, the selected sections will be handled internally.
|
|
273
273
|
*/
|
|
274
274
|
selectedSections: PropTypes.oneOfType([PropTypes.oneOf(['all', 'day', 'hours', 'meridiem', 'minutes', 'month', 'seconds', 'weekDay', 'year']), PropTypes.number, PropTypes.shape({
|
|
275
275
|
endIndex: PropTypes.number.isRequired,
|
|
276
276
|
startIndex: PropTypes.number.isRequired
|
|
277
277
|
})]),
|
|
278
|
-
/**
|
|
279
|
-
* Disable specific clock time.
|
|
280
|
-
* @param {number} clockValue The value to check.
|
|
281
|
-
* @param {TimeView} view The clock type of the timeValue.
|
|
282
|
-
* @returns {boolean} If `true` the time will be disabled.
|
|
283
|
-
* @deprecated Consider using `shouldDisableTime`.
|
|
278
|
+
/**
|
|
279
|
+
* Disable specific clock time.
|
|
280
|
+
* @param {number} clockValue The value to check.
|
|
281
|
+
* @param {TimeView} view The clock type of the timeValue.
|
|
282
|
+
* @returns {boolean} If `true` the time will be disabled.
|
|
283
|
+
* @deprecated Consider using `shouldDisableTime`.
|
|
284
284
|
*/
|
|
285
285
|
shouldDisableClock: PropTypes.func,
|
|
286
|
-
/**
|
|
287
|
-
* Disable specific time.
|
|
288
|
-
* @template TDate
|
|
289
|
-
* @param {TDate} value The value to check.
|
|
290
|
-
* @param {TimeView} view The clock type of the timeValue.
|
|
291
|
-
* @returns {boolean} If `true` the time will be disabled.
|
|
286
|
+
/**
|
|
287
|
+
* Disable specific time.
|
|
288
|
+
* @template TDate
|
|
289
|
+
* @param {TDate} value The value to check.
|
|
290
|
+
* @param {TimeView} view The clock type of the timeValue.
|
|
291
|
+
* @returns {boolean} If `true` the time will be disabled.
|
|
292
292
|
*/
|
|
293
293
|
shouldDisableTime: PropTypes.func,
|
|
294
|
-
/**
|
|
295
|
-
* If `true`, the format will respect the leading zeroes (e.g: on dayjs, the format `M/D/YYYY` will render `8/16/2018`)
|
|
296
|
-
* If `false`, the format will always add leading zeroes (e.g: on dayjs, the format `M/D/YYYY` will render `08/16/2018`)
|
|
297
|
-
*
|
|
298
|
-
* Warning n°1: Luxon is not able to respect the leading zeroes when using macro tokens (e.g: "DD"), so `shouldRespectLeadingZeros={true}` might lead to inconsistencies when using `AdapterLuxon`.
|
|
299
|
-
*
|
|
300
|
-
* Warning n°2: When `shouldRespectLeadingZeros={true}`, the field will add an invisible character on the sections containing a single digit to make sure `onChange` is fired.
|
|
301
|
-
* If you need to get the clean value from the input, you can remove this character using `input.value.replace(/\u200e/g, '')`.
|
|
302
|
-
*
|
|
303
|
-
* Warning n°3: When used in strict mode, dayjs and moment require to respect the leading zeros.
|
|
304
|
-
* This mean that when using `shouldRespectLeadingZeros={false}`, if you retrieve the value directly from the input (not listening to `onChange`) and your format contains tokens without leading zeros, the value will not be parsed by your library.
|
|
305
|
-
*
|
|
306
|
-
* @default `false`
|
|
294
|
+
/**
|
|
295
|
+
* If `true`, the format will respect the leading zeroes (e.g: on dayjs, the format `M/D/YYYY` will render `8/16/2018`)
|
|
296
|
+
* If `false`, the format will always add leading zeroes (e.g: on dayjs, the format `M/D/YYYY` will render `08/16/2018`)
|
|
297
|
+
*
|
|
298
|
+
* Warning n°1: Luxon is not able to respect the leading zeroes when using macro tokens (e.g: "DD"), so `shouldRespectLeadingZeros={true}` might lead to inconsistencies when using `AdapterLuxon`.
|
|
299
|
+
*
|
|
300
|
+
* Warning n°2: When `shouldRespectLeadingZeros={true}`, the field will add an invisible character on the sections containing a single digit to make sure `onChange` is fired.
|
|
301
|
+
* If you need to get the clean value from the input, you can remove this character using `input.value.replace(/\u200e/g, '')`.
|
|
302
|
+
*
|
|
303
|
+
* Warning n°3: When used in strict mode, dayjs and moment require to respect the leading zeros.
|
|
304
|
+
* This mean that when using `shouldRespectLeadingZeros={false}`, if you retrieve the value directly from the input (not listening to `onChange`) and your format contains tokens without leading zeros, the value will not be parsed by your library.
|
|
305
|
+
*
|
|
306
|
+
* @default `false`
|
|
307
307
|
*/
|
|
308
308
|
shouldRespectLeadingZeros: PropTypes.bool,
|
|
309
|
-
/**
|
|
310
|
-
* The props used for each component slot.
|
|
311
|
-
* @default {}
|
|
309
|
+
/**
|
|
310
|
+
* The props used for each component slot.
|
|
311
|
+
* @default {}
|
|
312
312
|
*/
|
|
313
313
|
slotProps: PropTypes.object,
|
|
314
|
-
/**
|
|
315
|
-
* Overridable slots.
|
|
316
|
-
* @default {}
|
|
314
|
+
/**
|
|
315
|
+
* Overridable slots.
|
|
316
|
+
* @default {}
|
|
317
317
|
*/
|
|
318
318
|
slots: PropTypes.object,
|
|
319
|
-
/**
|
|
320
|
-
* Defines the space between immediate children.
|
|
321
|
-
* @default 0
|
|
319
|
+
/**
|
|
320
|
+
* Defines the space between immediate children.
|
|
321
|
+
* @default 0
|
|
322
322
|
*/
|
|
323
323
|
spacing: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.number, PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.string]),
|
|
324
324
|
style: PropTypes.object,
|
|
325
|
-
/**
|
|
326
|
-
* The system prop, which allows defining system overrides as well as additional CSS styles.
|
|
325
|
+
/**
|
|
326
|
+
* The system prop, which allows defining system overrides as well as additional CSS styles.
|
|
327
327
|
*/
|
|
328
328
|
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
329
|
-
/**
|
|
330
|
-
* Choose which timezone to use for the value.
|
|
331
|
-
* Example: "default", "system", "UTC", "America/New_York".
|
|
332
|
-
* If you pass values from other timezones to some props, they will be converted to this timezone before being used.
|
|
333
|
-
* @see See the {@link https://mui.com/x/react-date-pickers/timezone/ timezones documention} for more details.
|
|
334
|
-
* @default The timezone of the `value` or `defaultValue` prop is defined, 'default' otherwise.
|
|
329
|
+
/**
|
|
330
|
+
* Choose which timezone to use for the value.
|
|
331
|
+
* Example: "default", "system", "UTC", "America/New_York".
|
|
332
|
+
* If you pass values from other timezones to some props, they will be converted to this timezone before being used.
|
|
333
|
+
* @see See the {@link https://mui.com/x/react-date-pickers/timezone/ timezones documention} for more details.
|
|
334
|
+
* @default The timezone of the `value` or `defaultValue` prop is defined, 'default' otherwise.
|
|
335
335
|
*/
|
|
336
336
|
timezone: PropTypes.string,
|
|
337
337
|
unstableEndFieldRef: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
|
|
338
338
|
unstableStartFieldRef: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
|
|
339
|
-
/**
|
|
340
|
-
* If `true`, the CSS flexbox `gap` is used instead of applying `margin` to children.
|
|
341
|
-
*
|
|
342
|
-
* While CSS `gap` removes the [known limitations](https://mui.com/joy-ui/react-stack/#limitations),
|
|
343
|
-
* it is not fully supported in some browsers. We recommend checking https://caniuse.com/?search=flex%20gap before using this flag.
|
|
344
|
-
*
|
|
345
|
-
* To enable this flag globally, follow the [theme's default props](https://mui.com/material-ui/customization/theme-components/#default-props) configuration.
|
|
346
|
-
* @default false
|
|
339
|
+
/**
|
|
340
|
+
* If `true`, the CSS flexbox `gap` is used instead of applying `margin` to children.
|
|
341
|
+
*
|
|
342
|
+
* While CSS `gap` removes the [known limitations](https://mui.com/joy-ui/react-stack/#limitations),
|
|
343
|
+
* it is not fully supported in some browsers. We recommend checking https://caniuse.com/?search=flex%20gap before using this flag.
|
|
344
|
+
*
|
|
345
|
+
* To enable this flag globally, follow the [theme's default props](https://mui.com/material-ui/customization/theme-components/#default-props) configuration.
|
|
346
|
+
* @default false
|
|
347
347
|
*/
|
|
348
348
|
useFlexGap: PropTypes.bool,
|
|
349
|
-
/**
|
|
350
|
-
* The selected value.
|
|
351
|
-
* Used when the component is controlled.
|
|
349
|
+
/**
|
|
350
|
+
* The selected value.
|
|
351
|
+
* Used when the component is controlled.
|
|
352
352
|
*/
|
|
353
353
|
value: PropTypes.arrayOf(PropTypes.any)
|
|
354
354
|
};
|
|
@@ -1,70 +1,70 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { SlotComponentProps } from '@mui/base/utils';
|
|
3
|
-
import Typography from '@mui/material/Typography';
|
|
4
|
-
import Stack, { StackProps } from '@mui/material/Stack';
|
|
5
|
-
import TextField from '@mui/material/TextField';
|
|
6
|
-
import { FieldRef } from '@mui/x-date-pickers/models';
|
|
7
|
-
import { UncapitalizeObjectKeys } from '@mui/x-date-pickers/internals';
|
|
8
|
-
import { UseTimeRangeFieldDefaultizedProps, UseTimeRangeFieldProps } from '../internals/models/timeRange';
|
|
9
|
-
import { RangePosition } from '../internals/models/range';
|
|
10
|
-
import { UseMultiInputRangeFieldParams } from '../internals/hooks/useMultiInputRangeField/useMultiInputRangeField.types';
|
|
11
|
-
import { RangeFieldSection } from '../internals/models/fields';
|
|
12
|
-
export declare type UseMultiInputTimeRangeFieldParams<TDate, TTextFieldSlotProps extends {}> = UseMultiInputRangeFieldParams<UseMultiInputTimeRangeFieldProps<TDate>, TTextFieldSlotProps>;
|
|
13
|
-
export interface UseMultiInputTimeRangeFieldProps<TDate> extends Omit<UseTimeRangeFieldProps<TDate>, 'unstableFieldRef'> {
|
|
14
|
-
unstableStartFieldRef?: React.Ref<FieldRef<RangeFieldSection>>;
|
|
15
|
-
unstableEndFieldRef?: React.Ref<FieldRef<RangeFieldSection>>;
|
|
16
|
-
}
|
|
17
|
-
export declare type UseMultiInputTimeRangeFieldComponentProps<TDate, TChildProps extends {}> = Omit<TChildProps, keyof UseMultiInputTimeRangeFieldProps<TDate>> & UseMultiInputTimeRangeFieldProps<TDate>;
|
|
18
|
-
export interface MultiInputTimeRangeFieldProps<TDate> extends UseMultiInputTimeRangeFieldComponentProps<TDate, Omit<StackProps, 'position'>> {
|
|
19
|
-
autoFocus?: boolean;
|
|
20
|
-
/**
|
|
21
|
-
* Overridable components.
|
|
22
|
-
* @default {}
|
|
23
|
-
* @deprecated Please use `slots`.
|
|
24
|
-
*/
|
|
25
|
-
components?: MultiInputTimeRangeFieldSlotsComponent;
|
|
26
|
-
/**
|
|
27
|
-
* The props used for each component slot.
|
|
28
|
-
* @default {}
|
|
29
|
-
* @deprecated Please use `slotProps`.
|
|
30
|
-
*/
|
|
31
|
-
componentsProps?: MultiInputTimeRangeFieldSlotsComponentsProps<TDate>;
|
|
32
|
-
/**
|
|
33
|
-
* Overridable slots.
|
|
34
|
-
* @default {}
|
|
35
|
-
*/
|
|
36
|
-
slots?: UncapitalizeObjectKeys<MultiInputTimeRangeFieldSlotsComponent>;
|
|
37
|
-
/**
|
|
38
|
-
* The props used for each component slot.
|
|
39
|
-
* @default {}
|
|
40
|
-
*/
|
|
41
|
-
slotProps?: MultiInputTimeRangeFieldSlotsComponentsProps<TDate>;
|
|
42
|
-
}
|
|
43
|
-
export declare type MultiInputTimeRangeFieldOwnerState<TDate> = MultiInputTimeRangeFieldProps<TDate>;
|
|
44
|
-
export interface MultiInputTimeRangeFieldSlotsComponent {
|
|
45
|
-
/**
|
|
46
|
-
* Element rendered at the root.
|
|
47
|
-
* @default MultiInputTimeRangeFieldRoot
|
|
48
|
-
*/
|
|
49
|
-
Root?: React.ElementType;
|
|
50
|
-
/**
|
|
51
|
-
* Form control with an input to render a time.
|
|
52
|
-
* It is rendered twice: once for the start time and once for the end time.
|
|
53
|
-
* Receives the same props as `@mui/material/TextField`.
|
|
54
|
-
* @default TextField from '@mui/material'
|
|
55
|
-
*/
|
|
56
|
-
TextField?: React.ElementType;
|
|
57
|
-
/**
|
|
58
|
-
* Element rendered between the two inputs.
|
|
59
|
-
* @default MultiInputTimeRangeFieldSeparator
|
|
60
|
-
*/
|
|
61
|
-
Separator?: React.ElementType;
|
|
62
|
-
}
|
|
63
|
-
export interface MultiInputTimeRangeFieldSlotsComponentsProps<TDate> {
|
|
64
|
-
root?: SlotComponentProps<typeof Stack, {}, MultiInputTimeRangeFieldOwnerState<TDate>>;
|
|
65
|
-
textField?: SlotComponentProps<typeof TextField, {}, MultiInputTimeRangeFieldOwnerState<TDate> & {
|
|
66
|
-
position: RangePosition;
|
|
67
|
-
}>;
|
|
68
|
-
separator?: SlotComponentProps<typeof Typography, {}, MultiInputTimeRangeFieldOwnerState<TDate>>;
|
|
69
|
-
}
|
|
70
|
-
export declare type UseMultiInputTimeRangeFieldDefaultizedProps<TDate, AdditionalProps extends {}> = UseTimeRangeFieldDefaultizedProps<TDate> & Omit<AdditionalProps, 'value' | 'defaultValue' | 'onChange'>;
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { SlotComponentProps } from '@mui/base/utils';
|
|
3
|
+
import Typography from '@mui/material/Typography';
|
|
4
|
+
import Stack, { StackProps } from '@mui/material/Stack';
|
|
5
|
+
import TextField from '@mui/material/TextField';
|
|
6
|
+
import { FieldRef } from '@mui/x-date-pickers/models';
|
|
7
|
+
import { UncapitalizeObjectKeys } from '@mui/x-date-pickers/internals';
|
|
8
|
+
import { UseTimeRangeFieldDefaultizedProps, UseTimeRangeFieldProps } from '../internals/models/timeRange';
|
|
9
|
+
import { RangePosition } from '../internals/models/range';
|
|
10
|
+
import { UseMultiInputRangeFieldParams } from '../internals/hooks/useMultiInputRangeField/useMultiInputRangeField.types';
|
|
11
|
+
import { RangeFieldSection } from '../internals/models/fields';
|
|
12
|
+
export declare type UseMultiInputTimeRangeFieldParams<TDate, TTextFieldSlotProps extends {}> = UseMultiInputRangeFieldParams<UseMultiInputTimeRangeFieldProps<TDate>, TTextFieldSlotProps>;
|
|
13
|
+
export interface UseMultiInputTimeRangeFieldProps<TDate> extends Omit<UseTimeRangeFieldProps<TDate>, 'unstableFieldRef'> {
|
|
14
|
+
unstableStartFieldRef?: React.Ref<FieldRef<RangeFieldSection>>;
|
|
15
|
+
unstableEndFieldRef?: React.Ref<FieldRef<RangeFieldSection>>;
|
|
16
|
+
}
|
|
17
|
+
export declare type UseMultiInputTimeRangeFieldComponentProps<TDate, TChildProps extends {}> = Omit<TChildProps, keyof UseMultiInputTimeRangeFieldProps<TDate>> & UseMultiInputTimeRangeFieldProps<TDate>;
|
|
18
|
+
export interface MultiInputTimeRangeFieldProps<TDate> extends UseMultiInputTimeRangeFieldComponentProps<TDate, Omit<StackProps, 'position'>> {
|
|
19
|
+
autoFocus?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Overridable components.
|
|
22
|
+
* @default {}
|
|
23
|
+
* @deprecated Please use `slots`.
|
|
24
|
+
*/
|
|
25
|
+
components?: MultiInputTimeRangeFieldSlotsComponent;
|
|
26
|
+
/**
|
|
27
|
+
* The props used for each component slot.
|
|
28
|
+
* @default {}
|
|
29
|
+
* @deprecated Please use `slotProps`.
|
|
30
|
+
*/
|
|
31
|
+
componentsProps?: MultiInputTimeRangeFieldSlotsComponentsProps<TDate>;
|
|
32
|
+
/**
|
|
33
|
+
* Overridable slots.
|
|
34
|
+
* @default {}
|
|
35
|
+
*/
|
|
36
|
+
slots?: UncapitalizeObjectKeys<MultiInputTimeRangeFieldSlotsComponent>;
|
|
37
|
+
/**
|
|
38
|
+
* The props used for each component slot.
|
|
39
|
+
* @default {}
|
|
40
|
+
*/
|
|
41
|
+
slotProps?: MultiInputTimeRangeFieldSlotsComponentsProps<TDate>;
|
|
42
|
+
}
|
|
43
|
+
export declare type MultiInputTimeRangeFieldOwnerState<TDate> = MultiInputTimeRangeFieldProps<TDate>;
|
|
44
|
+
export interface MultiInputTimeRangeFieldSlotsComponent {
|
|
45
|
+
/**
|
|
46
|
+
* Element rendered at the root.
|
|
47
|
+
* @default MultiInputTimeRangeFieldRoot
|
|
48
|
+
*/
|
|
49
|
+
Root?: React.ElementType;
|
|
50
|
+
/**
|
|
51
|
+
* Form control with an input to render a time.
|
|
52
|
+
* It is rendered twice: once for the start time and once for the end time.
|
|
53
|
+
* Receives the same props as `@mui/material/TextField`.
|
|
54
|
+
* @default TextField from '@mui/material'
|
|
55
|
+
*/
|
|
56
|
+
TextField?: React.ElementType;
|
|
57
|
+
/**
|
|
58
|
+
* Element rendered between the two inputs.
|
|
59
|
+
* @default MultiInputTimeRangeFieldSeparator
|
|
60
|
+
*/
|
|
61
|
+
Separator?: React.ElementType;
|
|
62
|
+
}
|
|
63
|
+
export interface MultiInputTimeRangeFieldSlotsComponentsProps<TDate> {
|
|
64
|
+
root?: SlotComponentProps<typeof Stack, {}, MultiInputTimeRangeFieldOwnerState<TDate>>;
|
|
65
|
+
textField?: SlotComponentProps<typeof TextField, {}, MultiInputTimeRangeFieldOwnerState<TDate> & {
|
|
66
|
+
position: RangePosition;
|
|
67
|
+
}>;
|
|
68
|
+
separator?: SlotComponentProps<typeof Typography, {}, MultiInputTimeRangeFieldOwnerState<TDate>>;
|
|
69
|
+
}
|
|
70
|
+
export declare type UseMultiInputTimeRangeFieldDefaultizedProps<TDate, AdditionalProps extends {}> = UseTimeRangeFieldDefaultizedProps<TDate> & Omit<AdditionalProps, 'value' | 'defaultValue' | 'onChange'>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { MultiInputTimeRangeField } from './MultiInputTimeRangeField';
|
|
2
|
-
export { useMultiInputTimeRangeField as unstable_useMultiInputTimeRangeField } from '../internals/hooks/useMultiInputRangeField/useMultiInputTimeRangeField';
|
|
3
|
-
export type { UseMultiInputTimeRangeFieldProps, UseMultiInputTimeRangeFieldComponentProps, MultiInputTimeRangeFieldProps, } from './MultiInputTimeRangeField.types';
|
|
1
|
+
export { MultiInputTimeRangeField } from './MultiInputTimeRangeField';
|
|
2
|
+
export { useMultiInputTimeRangeField as unstable_useMultiInputTimeRangeField } from '../internals/hooks/useMultiInputRangeField/useMultiInputTimeRangeField';
|
|
3
|
+
export type { UseMultiInputTimeRangeFieldProps, UseMultiInputTimeRangeFieldComponentProps, MultiInputTimeRangeFieldProps, } from './MultiInputTimeRangeField.types';
|
|
@@ -1,19 +1,18 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
export default ActionBar;
|
|
1
|
+
import { ButtonProps } from "antd";
|
|
2
|
+
import { Dayjs } from "dayjs";
|
|
3
|
+
import "./index.less";
|
|
4
|
+
interface ActionBarProps {
|
|
5
|
+
ownerState: any;
|
|
6
|
+
onCancel: () => void;
|
|
7
|
+
onChange: (val: any[], type?: "time") => void;
|
|
8
|
+
onOk: () => void;
|
|
9
|
+
value: any[];
|
|
10
|
+
showTime?: boolean | {
|
|
11
|
+
defaultValue: Dayjs;
|
|
12
|
+
[key: string]: any;
|
|
13
|
+
}[];
|
|
14
|
+
okButtonProps?: ButtonProps;
|
|
15
|
+
cancelButtonProps?: ButtonProps;
|
|
16
|
+
}
|
|
17
|
+
declare const ActionBar: (props: ActionBarProps) => JSX.Element;
|
|
18
|
+
export default ActionBar;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
.date-picker-action-bar {
|
|
2
|
-
display: flex;
|
|
3
|
-
.date-picker-action-bar-left {
|
|
4
|
-
width: 192px;
|
|
5
|
-
border-right: 1px solid rgba(0, 0, 0, 0.12);
|
|
6
|
-
}
|
|
7
|
-
.date-picker-action-bar-right {
|
|
8
|
-
flex: 1;
|
|
9
|
-
display: flex;
|
|
10
|
-
justify-content: space-between;
|
|
11
|
-
padding: 16px;
|
|
12
|
-
border-top: 1px solid rgba(0, 0, 0, 0.12);
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
.date-picker-action-bar-time-picker-popup {
|
|
17
|
-
z-index: 1400;
|
|
1
|
+
.date-picker-action-bar {
|
|
2
|
+
display: flex;
|
|
3
|
+
.date-picker-action-bar-left {
|
|
4
|
+
width: 192px;
|
|
5
|
+
border-right: 1px solid rgba(0, 0, 0, 0.12);
|
|
6
|
+
}
|
|
7
|
+
.date-picker-action-bar-right {
|
|
8
|
+
flex: 1;
|
|
9
|
+
display: flex;
|
|
10
|
+
justify-content: space-between;
|
|
11
|
+
padding: 16px;
|
|
12
|
+
border-top: 1px solid rgba(0, 0, 0, 0.12);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.date-picker-action-bar-time-picker-popup {
|
|
17
|
+
z-index: 1400;
|
|
18
18
|
}
|