@mui/lab 5.0.0-alpha.89 → 5.0.0-alpha.92
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/AdapterDateFns/AdapterDateFns.d.ts +3 -0
- package/AdapterDateFns/AdapterDateFns.js +16 -0
- package/AdapterDateFns/index.d.ts +1 -1
- package/AdapterDateFns/index.js +1 -1
- package/AdapterDayjs/AdapterDayjs.d.ts +3 -0
- package/AdapterDayjs/AdapterDayjs.js +16 -0
- package/AdapterDayjs/index.d.ts +1 -1
- package/AdapterDayjs/index.js +1 -1
- package/AdapterLuxon/AdapterLuxon.d.ts +3 -0
- package/AdapterLuxon/AdapterLuxon.js +16 -0
- package/AdapterLuxon/index.d.ts +1 -1
- package/AdapterLuxon/index.js +1 -1
- package/AdapterMoment/AdapterMoment.d.ts +3 -0
- package/AdapterMoment/AdapterMoment.js +16 -0
- package/AdapterMoment/index.d.ts +1 -1
- package/AdapterMoment/index.js +1 -1
- package/CHANGELOG.md +200 -4
- package/CalendarPicker/CalendarPicker.d.ts +5 -1
- package/CalendarPicker/CalendarPicker.js +6 -9
- package/CalendarPicker/index.d.ts +1 -2
- package/CalendarPicker/index.js +1 -1
- package/CalendarPickerSkeleton/CalendarPickerSkeleton.d.ts +4 -1
- package/CalendarPickerSkeleton/CalendarPickerSkeleton.js +10 -23
- package/CalendarPickerSkeleton/index.d.ts +1 -2
- package/CalendarPickerSkeleton/index.js +1 -1
- package/ClockPicker/ClockPicker.d.ts +5 -1
- package/ClockPicker/ClockPicker.js +6 -9
- package/ClockPicker/index.d.ts +1 -2
- package/ClockPicker/index.js +1 -1
- package/DatePicker/DatePicker.d.ts +1 -1
- package/DatePicker/DatePicker.js +4 -448
- package/DatePicker/index.d.ts +1 -1
- package/DatePicker/index.js +2 -1
- package/DateTimePicker/DateTimePicker.d.ts +1 -1
- package/DateTimePicker/DateTimePicker.js +4 -536
- package/DateTimePicker/index.d.ts +1 -1
- package/DateTimePicker/index.js +2 -1
- package/DesktopDatePicker/DesktopDatePicker.d.ts +1 -1
- package/DesktopDatePicker/DesktopDatePicker.js +4 -412
- package/DesktopDatePicker/index.d.ts +1 -1
- package/DesktopDatePicker/index.js +2 -1
- package/DesktopDateTimePicker/DesktopDateTimePicker.d.ts +1 -1
- package/DesktopDateTimePicker/DesktopDateTimePicker.js +4 -500
- package/DesktopDateTimePicker/index.d.ts +1 -1
- package/DesktopDateTimePicker/index.js +2 -1
- package/DesktopTimePicker/DesktopTimePicker.d.ts +1 -1
- package/DesktopTimePicker/DesktopTimePicker.js +4 -330
- package/DesktopTimePicker/index.d.ts +2 -2
- package/DesktopTimePicker/index.js +2 -1
- package/LoadingButton/LoadingButton.js +7 -14
- package/LocalizationProvider/LocalizationProvider.d.ts +1 -1
- package/LocalizationProvider/LocalizationProvider.js +3 -22
- package/LocalizationProvider/index.d.ts +1 -1
- package/LocalizationProvider/index.js +2 -1
- package/Masonry/Masonry.js +14 -7
- package/MobileDatePicker/MobileDatePicker.d.ts +1 -1
- package/MobileDatePicker/MobileDatePicker.js +3 -425
- package/MobileDatePicker/index.d.ts +1 -1
- package/MobileDatePicker/index.js +2 -1
- package/MobileDateTimePicker/MobileDateTimePicker.d.ts +1 -1
- package/MobileDateTimePicker/MobileDateTimePicker.js +4 -514
- package/MobileDateTimePicker/index.d.ts +1 -1
- package/MobileDateTimePicker/index.js +2 -1
- package/MobileTimePicker/MobileTimePicker.d.ts +1 -1
- package/MobileTimePicker/MobileTimePicker.js +4 -344
- package/MobileTimePicker/index.d.ts +1 -1
- package/MobileTimePicker/index.js +2 -1
- package/MonthPicker/MonthPicker.d.ts +4 -1
- package/MonthPicker/MonthPicker.js +10 -9
- package/MonthPicker/index.d.ts +1 -2
- package/MonthPicker/index.js +1 -1
- package/PickersDay/PickersDay.d.ts +4 -1
- package/PickersDay/PickersDay.js +10 -23
- package/PickersDay/index.d.ts +1 -2
- package/PickersDay/index.js +1 -1
- package/StaticDatePicker/StaticDatePicker.d.ts +1 -1
- package/StaticDatePicker/StaticDatePicker.js +4 -386
- package/StaticDatePicker/index.d.ts +1 -1
- package/StaticDatePicker/index.js +2 -1
- package/StaticDateTimePicker/StaticDateTimePicker.d.ts +1 -1
- package/StaticDateTimePicker/StaticDateTimePicker.js +4 -474
- package/StaticDateTimePicker/index.d.ts +1 -1
- package/StaticDateTimePicker/index.js +2 -1
- package/StaticTimePicker/StaticTimePicker.d.ts +1 -1
- package/StaticTimePicker/StaticTimePicker.js +4 -304
- package/StaticTimePicker/index.d.ts +2 -2
- package/StaticTimePicker/index.js +2 -1
- package/TimePicker/TimePicker.d.ts +1 -1
- package/TimePicker/TimePicker.js +4 -366
- package/TimePicker/index.d.ts +1 -1
- package/TimePicker/index.js +2 -1
- package/Timeline/Timeline.d.ts +1 -1
- package/TimelineDot/TimelineDot.d.ts +6 -1
- package/TimelineDot/TimelineDot.js +3 -1
- package/YearPicker/YearPicker.d.ts +5 -1
- package/YearPicker/YearPicker.js +10 -8
- package/YearPicker/index.d.ts +2 -2
- package/YearPicker/index.js +2 -1
- package/index.js +1 -1
- package/legacy/AdapterDateFns/AdapterDateFns.js +19 -0
- package/legacy/AdapterDateFns/index.js +1 -1
- package/legacy/AdapterDayjs/AdapterDayjs.js +19 -0
- package/legacy/AdapterDayjs/index.js +1 -1
- package/legacy/AdapterLuxon/AdapterLuxon.js +19 -0
- package/legacy/AdapterLuxon/index.js +1 -1
- package/legacy/AdapterMoment/AdapterMoment.js +19 -0
- package/legacy/AdapterMoment/index.js +1 -1
- package/legacy/CalendarPicker/CalendarPicker.js +6 -9
- package/legacy/CalendarPicker/index.js +1 -1
- package/legacy/CalendarPickerSkeleton/CalendarPickerSkeleton.js +10 -23
- package/legacy/CalendarPickerSkeleton/index.js +1 -1
- package/legacy/ClockPicker/ClockPicker.js +6 -9
- package/legacy/ClockPicker/index.js +1 -1
- package/legacy/DatePicker/DatePicker.js +4 -448
- package/legacy/DatePicker/index.js +2 -1
- package/legacy/DateTimePicker/DateTimePicker.js +4 -536
- package/legacy/DateTimePicker/index.js +2 -1
- package/legacy/DesktopDatePicker/DesktopDatePicker.js +4 -412
- package/legacy/DesktopDatePicker/index.js +2 -1
- package/legacy/DesktopDateTimePicker/DesktopDateTimePicker.js +4 -500
- package/legacy/DesktopDateTimePicker/index.js +2 -1
- package/legacy/DesktopTimePicker/DesktopTimePicker.js +4 -330
- package/legacy/DesktopTimePicker/index.js +2 -1
- package/legacy/LoadingButton/LoadingButton.js +7 -14
- package/legacy/LocalizationProvider/LocalizationProvider.js +3 -22
- package/legacy/LocalizationProvider/index.js +2 -1
- package/legacy/Masonry/Masonry.js +14 -7
- package/legacy/MobileDatePicker/MobileDatePicker.js +3 -425
- package/legacy/MobileDatePicker/index.js +2 -1
- package/legacy/MobileDateTimePicker/MobileDateTimePicker.js +4 -514
- package/legacy/MobileDateTimePicker/index.js +2 -1
- package/legacy/MobileTimePicker/MobileTimePicker.js +4 -344
- package/legacy/MobileTimePicker/index.js +2 -1
- package/legacy/MonthPicker/MonthPicker.js +10 -9
- package/legacy/MonthPicker/index.js +1 -1
- package/legacy/PickersDay/PickersDay.js +10 -23
- package/legacy/PickersDay/index.js +1 -1
- package/legacy/StaticDatePicker/StaticDatePicker.js +4 -386
- package/legacy/StaticDatePicker/index.js +2 -1
- package/legacy/StaticDateTimePicker/StaticDateTimePicker.js +4 -474
- package/legacy/StaticDateTimePicker/index.js +2 -1
- package/legacy/StaticTimePicker/StaticTimePicker.js +4 -304
- package/legacy/StaticTimePicker/index.js +2 -1
- package/legacy/TimePicker/TimePicker.js +4 -366
- package/legacy/TimePicker/index.js +2 -1
- package/legacy/TimelineDot/TimelineDot.js +3 -1
- package/legacy/YearPicker/YearPicker.js +10 -8
- package/legacy/YearPicker/index.js +2 -1
- package/legacy/index.js +1 -1
- package/modern/AdapterDateFns/AdapterDateFns.js +16 -0
- package/modern/AdapterDateFns/index.js +1 -1
- package/modern/AdapterDayjs/AdapterDayjs.js +16 -0
- package/modern/AdapterDayjs/index.js +1 -1
- package/modern/AdapterLuxon/AdapterLuxon.js +16 -0
- package/modern/AdapterLuxon/index.js +1 -1
- package/modern/AdapterMoment/AdapterMoment.js +16 -0
- package/modern/AdapterMoment/index.js +1 -1
- package/modern/CalendarPicker/CalendarPicker.js +6 -9
- package/modern/CalendarPicker/index.js +1 -1
- package/modern/CalendarPickerSkeleton/CalendarPickerSkeleton.js +10 -23
- package/modern/CalendarPickerSkeleton/index.js +1 -1
- package/modern/ClockPicker/ClockPicker.js +6 -9
- package/modern/ClockPicker/index.js +1 -1
- package/modern/DatePicker/DatePicker.js +4 -448
- package/modern/DatePicker/index.js +2 -1
- package/modern/DateTimePicker/DateTimePicker.js +4 -536
- package/modern/DateTimePicker/index.js +2 -1
- package/modern/DesktopDatePicker/DesktopDatePicker.js +4 -412
- package/modern/DesktopDatePicker/index.js +2 -1
- package/modern/DesktopDateTimePicker/DesktopDateTimePicker.js +4 -500
- package/modern/DesktopDateTimePicker/index.js +2 -1
- package/modern/DesktopTimePicker/DesktopTimePicker.js +4 -330
- package/modern/DesktopTimePicker/index.js +2 -1
- package/modern/LoadingButton/LoadingButton.js +7 -14
- package/modern/LocalizationProvider/LocalizationProvider.js +3 -22
- package/modern/LocalizationProvider/index.js +2 -1
- package/modern/Masonry/Masonry.js +14 -7
- package/modern/MobileDatePicker/MobileDatePicker.js +3 -425
- package/modern/MobileDatePicker/index.js +2 -1
- package/modern/MobileDateTimePicker/MobileDateTimePicker.js +4 -514
- package/modern/MobileDateTimePicker/index.js +2 -1
- package/modern/MobileTimePicker/MobileTimePicker.js +4 -344
- package/modern/MobileTimePicker/index.js +2 -1
- package/modern/MonthPicker/MonthPicker.js +10 -9
- package/modern/MonthPicker/index.js +1 -1
- package/modern/PickersDay/PickersDay.js +10 -23
- package/modern/PickersDay/index.js +1 -1
- package/modern/StaticDatePicker/StaticDatePicker.js +4 -386
- package/modern/StaticDatePicker/index.js +2 -1
- package/modern/StaticDateTimePicker/StaticDateTimePicker.js +4 -474
- package/modern/StaticDateTimePicker/index.js +2 -1
- package/modern/StaticTimePicker/StaticTimePicker.js +4 -304
- package/modern/StaticTimePicker/index.js +2 -1
- package/modern/TimePicker/TimePicker.js +4 -366
- package/modern/TimePicker/index.js +2 -1
- package/modern/TimelineDot/TimelineDot.js +3 -1
- package/modern/YearPicker/YearPicker.js +10 -8
- package/modern/YearPicker/index.js +2 -1
- package/modern/index.js +1 -1
- package/node/AdapterDateFns/AdapterDateFns.js +24 -0
- package/node/AdapterDateFns/index.js +4 -2
- package/node/AdapterDayjs/AdapterDayjs.js +24 -0
- package/node/AdapterDayjs/index.js +4 -2
- package/node/AdapterLuxon/AdapterLuxon.js +24 -0
- package/node/AdapterLuxon/index.js +4 -2
- package/node/AdapterMoment/AdapterMoment.js +24 -0
- package/node/AdapterMoment/index.js +4 -2
- package/node/CalendarPicker/CalendarPicker.js +8 -15
- package/node/CalendarPicker/index.js +17 -10
- package/node/CalendarPickerSkeleton/CalendarPickerSkeleton.js +15 -30
- package/node/CalendarPickerSkeleton/index.js +16 -15
- package/node/ClockPicker/ClockPicker.js +8 -15
- package/node/ClockPicker/index.js +17 -10
- package/node/DatePicker/DatePicker.js +4 -454
- package/node/DatePicker/index.js +18 -3
- package/node/DateTimePicker/DateTimePicker.js +4 -542
- package/node/DateTimePicker/index.js +18 -3
- package/node/DesktopDatePicker/DesktopDatePicker.js +4 -418
- package/node/DesktopDatePicker/index.js +18 -3
- package/node/DesktopDateTimePicker/DesktopDateTimePicker.js +4 -506
- package/node/DesktopDateTimePicker/index.js +18 -3
- package/node/DesktopTimePicker/DesktopTimePicker.js +4 -336
- package/node/DesktopTimePicker/index.js +19 -2
- package/node/LoadingButton/LoadingButton.js +7 -14
- package/node/LocalizationProvider/LocalizationProvider.js +3 -28
- package/node/LocalizationProvider/index.js +18 -3
- package/node/Masonry/Masonry.js +14 -7
- package/node/MobileDatePicker/MobileDatePicker.js +3 -431
- package/node/MobileDatePicker/index.js +18 -3
- package/node/MobileDateTimePicker/MobileDateTimePicker.js +4 -520
- package/node/MobileDateTimePicker/index.js +18 -3
- package/node/MobileTimePicker/MobileTimePicker.js +4 -350
- package/node/MobileTimePicker/index.js +18 -3
- package/node/MonthPicker/MonthPicker.js +15 -15
- package/node/MonthPicker/index.js +16 -15
- package/node/PickersDay/PickersDay.js +15 -30
- package/node/PickersDay/index.js +16 -15
- package/node/StaticDatePicker/StaticDatePicker.js +4 -392
- package/node/StaticDatePicker/index.js +18 -3
- package/node/StaticDateTimePicker/StaticDateTimePicker.js +4 -480
- package/node/StaticDateTimePicker/index.js +18 -3
- package/node/StaticTimePicker/StaticTimePicker.js +4 -310
- package/node/StaticTimePicker/index.js +19 -2
- package/node/TimePicker/TimePicker.js +4 -372
- package/node/TimePicker/index.js +18 -3
- package/node/TimelineDot/TimelineDot.js +3 -1
- package/node/YearPicker/YearPicker.js +15 -19
- package/node/YearPicker/index.js +18 -13
- package/node/index.js +1 -1
- package/package.json +6 -25
- package/themeAugmentation/index.d.ts +0 -2
|
@@ -1,13 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import PropTypes from 'prop-types';
|
|
4
|
-
import { DesktopTimePicker as XDesktopTimePicker } from '@mui/x-date-pickers/DesktopTimePicker';
|
|
5
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
3
|
let warnedOnce = false;
|
|
7
4
|
|
|
8
5
|
const warn = () => {
|
|
9
6
|
if (!warnedOnce) {
|
|
10
|
-
console.warn(['MUI: The DesktopTimePicker component was moved from `@mui/lab` to `@mui/x-date-pickers`.', '
|
|
7
|
+
console.warn(['MUI: The DesktopTimePicker component was moved from `@mui/lab` to `@mui/x-date-pickers`.', '', "You should use `import { DesktopTimePicker } from '@mui/x-date-pickers'`", "or `import { DesktopTimePicker } from '@mui/x-date-pickers/DesktopTimePicker'`", '', 'More information about this migration on our blog: https://mui.com/blog/lab-date-pickers-to-mui-x/.'].join('\n'));
|
|
11
8
|
warnedOnce = true;
|
|
12
9
|
}
|
|
13
10
|
};
|
|
@@ -15,331 +12,8 @@ const warn = () => {
|
|
|
15
12
|
/**
|
|
16
13
|
* @ignore - do not document.
|
|
17
14
|
*/
|
|
18
|
-
const DesktopTimePicker = /*#__PURE__*/React.forwardRef(function DeprecatedDesktopTimePicker(
|
|
15
|
+
const DesktopTimePicker = /*#__PURE__*/React.forwardRef(function DeprecatedDesktopTimePicker() {
|
|
19
16
|
warn();
|
|
20
|
-
return
|
|
21
|
-
ref: ref
|
|
22
|
-
}, props));
|
|
17
|
+
return null;
|
|
23
18
|
});
|
|
24
|
-
process.env.NODE_ENV !== "production" ? DesktopTimePicker.propTypes
|
|
25
|
-
/* remove-proptypes */
|
|
26
|
-
= {
|
|
27
|
-
// ----------------------------- Warning --------------------------------
|
|
28
|
-
// | These PropTypes are generated from the TypeScript type definitions |
|
|
29
|
-
// | To update them edit TypeScript types and run "yarn proptypes" |
|
|
30
|
-
// ----------------------------------------------------------------------
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* Regular expression to detect "accepted" symbols.
|
|
34
|
-
* @default /\dap/gi
|
|
35
|
-
*/
|
|
36
|
-
acceptRegex: PropTypes.instanceOf(RegExp),
|
|
37
|
-
|
|
38
|
-
/**
|
|
39
|
-
* 12h/24h view for hour selection clock.
|
|
40
|
-
* @default false
|
|
41
|
-
*/
|
|
42
|
-
ampm: PropTypes.bool,
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* Display ampm controls under the clock (instead of in the toolbar).
|
|
46
|
-
* @default false
|
|
47
|
-
*/
|
|
48
|
-
ampmInClock: PropTypes.bool,
|
|
49
|
-
|
|
50
|
-
/**
|
|
51
|
-
* @ignore
|
|
52
|
-
*/
|
|
53
|
-
children: PropTypes.node,
|
|
54
|
-
|
|
55
|
-
/**
|
|
56
|
-
* className applied to the root component.
|
|
57
|
-
*/
|
|
58
|
-
className: PropTypes.string,
|
|
59
|
-
|
|
60
|
-
/**
|
|
61
|
-
* If `true`, it shows the clear action in the picker dialog.
|
|
62
|
-
* @default false
|
|
63
|
-
*/
|
|
64
|
-
clearable: PropTypes.bool,
|
|
65
|
-
|
|
66
|
-
/**
|
|
67
|
-
* Clear text message.
|
|
68
|
-
* @default 'Clear'
|
|
69
|
-
*/
|
|
70
|
-
clearText: PropTypes.node,
|
|
71
|
-
|
|
72
|
-
/**
|
|
73
|
-
* The components used for each slot.
|
|
74
|
-
* Either a string to use an HTML element or a component.
|
|
75
|
-
*/
|
|
76
|
-
components: PropTypes.shape({
|
|
77
|
-
OpenPickerIcon: PropTypes.elementType
|
|
78
|
-
}),
|
|
79
|
-
|
|
80
|
-
/**
|
|
81
|
-
* If `true` the popup or dialog will immediately close after submitting full date.
|
|
82
|
-
* @default `true` for Desktop, `false` for Mobile (based on the chosen wrapper and `desktopModeMediaQuery` prop).
|
|
83
|
-
*/
|
|
84
|
-
disableCloseOnSelect: PropTypes.bool,
|
|
85
|
-
|
|
86
|
-
/**
|
|
87
|
-
* If `true`, the picker and text field are disabled.
|
|
88
|
-
*/
|
|
89
|
-
disabled: PropTypes.bool,
|
|
90
|
-
|
|
91
|
-
/**
|
|
92
|
-
* Do not ignore date part when validating min/max time.
|
|
93
|
-
* @default false
|
|
94
|
-
*/
|
|
95
|
-
disableIgnoringDatePartForTimeValidation: PropTypes.bool,
|
|
96
|
-
|
|
97
|
-
/**
|
|
98
|
-
* Disable mask on the keyboard, this should be used rarely. Consider passing proper mask for your format.
|
|
99
|
-
* @default false
|
|
100
|
-
*/
|
|
101
|
-
disableMaskedInput: PropTypes.bool,
|
|
102
|
-
|
|
103
|
-
/**
|
|
104
|
-
* Do not render open picker button (renders only text field with validation).
|
|
105
|
-
* @default false
|
|
106
|
-
*/
|
|
107
|
-
disableOpenPicker: PropTypes.bool,
|
|
108
|
-
|
|
109
|
-
/**
|
|
110
|
-
* Accessible text that helps user to understand which time and view is selected.
|
|
111
|
-
* @template TDate
|
|
112
|
-
* @param {ClockPickerView} view The current view rendered.
|
|
113
|
-
* @param {TDate | null} time The current time.
|
|
114
|
-
* @param {MuiPickersAdapter<TDate>} adapter The current date adapter.
|
|
115
|
-
* @returns {string} The clock label.
|
|
116
|
-
* @default <TDate extends any>(
|
|
117
|
-
* view: ClockView,
|
|
118
|
-
* time: TDate | null,
|
|
119
|
-
* adapter: MuiPickersAdapter<TDate>,
|
|
120
|
-
* ) =>
|
|
121
|
-
* `Select ${view}. ${
|
|
122
|
-
* time === null ? 'No time selected' : `Selected time is ${adapter.format(time, 'fullTime')}`
|
|
123
|
-
* }`
|
|
124
|
-
*/
|
|
125
|
-
getClockLabelText: PropTypes.func,
|
|
126
|
-
|
|
127
|
-
/**
|
|
128
|
-
* Get aria-label text for control that opens picker dialog. Aria-label text must include selected date. @DateIOType
|
|
129
|
-
* @template TDateValue
|
|
130
|
-
* @param {ParseableDate<TDateValue>} value The date from which we want to add an aria-text.
|
|
131
|
-
* @param {MuiPickersAdapter<TDateValue>} utils The utils to manipulate the date.
|
|
132
|
-
* @returns {string} The aria-text to render inside the dialog.
|
|
133
|
-
* @default (value, utils) => `Choose date, selected date is ${utils.format(utils.date(value), 'fullDate')}`
|
|
134
|
-
*/
|
|
135
|
-
getOpenDialogAriaText: PropTypes.func,
|
|
136
|
-
|
|
137
|
-
/**
|
|
138
|
-
* @ignore
|
|
139
|
-
*/
|
|
140
|
-
ignoreInvalidInputs: PropTypes.bool,
|
|
141
|
-
|
|
142
|
-
/**
|
|
143
|
-
* Props to pass to keyboard input adornment.
|
|
144
|
-
*/
|
|
145
|
-
InputAdornmentProps: PropTypes.object,
|
|
146
|
-
|
|
147
|
-
/**
|
|
148
|
-
* Format string.
|
|
149
|
-
*/
|
|
150
|
-
inputFormat: PropTypes.string,
|
|
151
|
-
|
|
152
|
-
/**
|
|
153
|
-
* @ignore
|
|
154
|
-
*/
|
|
155
|
-
InputProps: PropTypes.object,
|
|
156
|
-
|
|
157
|
-
/**
|
|
158
|
-
* Pass a ref to the `input` element.
|
|
159
|
-
*/
|
|
160
|
-
inputRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({
|
|
161
|
-
current: PropTypes.object
|
|
162
|
-
})]),
|
|
163
|
-
|
|
164
|
-
/**
|
|
165
|
-
* @ignore
|
|
166
|
-
*/
|
|
167
|
-
label: PropTypes.node,
|
|
168
|
-
|
|
169
|
-
/**
|
|
170
|
-
* Custom mask. Can be used to override generate from format. (e.g. `__/__/____ __:__` or `__/__/____ __:__ _M`).
|
|
171
|
-
*/
|
|
172
|
-
mask: PropTypes.string,
|
|
173
|
-
|
|
174
|
-
/**
|
|
175
|
-
* Max time acceptable time.
|
|
176
|
-
* For input validation date part of passed object will be ignored if `disableIgnoringDatePartForTimeValidation` not specified.
|
|
177
|
-
*/
|
|
178
|
-
maxTime: PropTypes.any,
|
|
179
|
-
|
|
180
|
-
/**
|
|
181
|
-
* Min time acceptable time.
|
|
182
|
-
* For input validation date part of passed object will be ignored if `disableIgnoringDatePartForTimeValidation` not specified.
|
|
183
|
-
*/
|
|
184
|
-
minTime: PropTypes.any,
|
|
185
|
-
|
|
186
|
-
/**
|
|
187
|
-
* Step over minutes.
|
|
188
|
-
* @default 1
|
|
189
|
-
*/
|
|
190
|
-
minutesStep: PropTypes.number,
|
|
191
|
-
|
|
192
|
-
/**
|
|
193
|
-
* Callback fired when date is accepted @DateIOType.
|
|
194
|
-
* @template TDateValue
|
|
195
|
-
* @param {TDateValue} date The date that was just accepted.
|
|
196
|
-
*/
|
|
197
|
-
onAccept: PropTypes.func,
|
|
198
|
-
|
|
199
|
-
/**
|
|
200
|
-
* Callback fired when the value (the selected date) changes @DateIOType.
|
|
201
|
-
* @template TDate
|
|
202
|
-
* @param {DateRange<TDate>} date The new parsed date.
|
|
203
|
-
* @param {string} keyboardInputValue The current value of the keyboard input.
|
|
204
|
-
*/
|
|
205
|
-
onChange: PropTypes.func.isRequired,
|
|
206
|
-
|
|
207
|
-
/**
|
|
208
|
-
* Callback fired when the popup requests to be closed.
|
|
209
|
-
* Use in controlled mode (see open).
|
|
210
|
-
*/
|
|
211
|
-
onClose: PropTypes.func,
|
|
212
|
-
|
|
213
|
-
/**
|
|
214
|
-
* Callback that fired when input value or new `value` prop validation returns **new** validation error (or value is valid after error).
|
|
215
|
-
* In case of validation error detected `reason` prop return non-null value and `TextField` must be displayed in `error` state.
|
|
216
|
-
* This can be used to render appropriate form error.
|
|
217
|
-
*
|
|
218
|
-
* [Read the guide](https://next.material-ui-pickers.dev/guides/forms) about form integration and error displaying.
|
|
219
|
-
* @DateIOType
|
|
220
|
-
*
|
|
221
|
-
* @template TError, TDateValue
|
|
222
|
-
* @param {TError} reason The reason why the current value is not valid.
|
|
223
|
-
* @param {TDateValue} value The invalid value.
|
|
224
|
-
*/
|
|
225
|
-
onError: PropTypes.func,
|
|
226
|
-
|
|
227
|
-
/**
|
|
228
|
-
* Callback fired when the popup requests to be opened.
|
|
229
|
-
* Use in controlled mode (see open).
|
|
230
|
-
*/
|
|
231
|
-
onOpen: PropTypes.func,
|
|
232
|
-
|
|
233
|
-
/**
|
|
234
|
-
* Callback fired on view change.
|
|
235
|
-
* @param {ClockPickerView} view The new view.
|
|
236
|
-
*/
|
|
237
|
-
onViewChange: PropTypes.func,
|
|
238
|
-
|
|
239
|
-
/**
|
|
240
|
-
* Control the popup or dialog open state.
|
|
241
|
-
*/
|
|
242
|
-
open: PropTypes.bool,
|
|
243
|
-
|
|
244
|
-
/**
|
|
245
|
-
* Props to pass to keyboard adornment button.
|
|
246
|
-
*/
|
|
247
|
-
OpenPickerButtonProps: PropTypes.object,
|
|
248
|
-
|
|
249
|
-
/**
|
|
250
|
-
* First view to show.
|
|
251
|
-
*/
|
|
252
|
-
openTo: PropTypes.oneOf(['hours', 'minutes', 'seconds']),
|
|
253
|
-
|
|
254
|
-
/**
|
|
255
|
-
* Force rendering in particular orientation.
|
|
256
|
-
*/
|
|
257
|
-
orientation: PropTypes.oneOf(['landscape', 'portrait']),
|
|
258
|
-
|
|
259
|
-
/**
|
|
260
|
-
* Paper props passed down to [Paper](https://mui.com/material-ui/api/paper/) component.
|
|
261
|
-
*/
|
|
262
|
-
PaperProps: PropTypes.object,
|
|
263
|
-
|
|
264
|
-
/**
|
|
265
|
-
* Popper props passed down to [Popper](https://mui.com/material-ui/api/popper/) component.
|
|
266
|
-
*/
|
|
267
|
-
PopperProps: PropTypes.object,
|
|
268
|
-
|
|
269
|
-
/**
|
|
270
|
-
* Make picker read only.
|
|
271
|
-
*/
|
|
272
|
-
readOnly: PropTypes.bool,
|
|
273
|
-
|
|
274
|
-
/**
|
|
275
|
-
* The `renderInput` prop allows you to customize the rendered input.
|
|
276
|
-
* The `props` argument of this render prop contains props of [TextField](https://mui.com/material-ui/api/text-field/#props) that you need to forward.
|
|
277
|
-
* Pay specific attention to the `ref` and `inputProps` keys.
|
|
278
|
-
* @example ```jsx
|
|
279
|
-
* renderInput={props => <TextField {...props} />}
|
|
280
|
-
* ````
|
|
281
|
-
* @param {MuiTextFieldPropsType} props The props of the input.
|
|
282
|
-
* @returns {React.ReactNode} The node to render as the input.
|
|
283
|
-
*/
|
|
284
|
-
renderInput: PropTypes.func.isRequired,
|
|
285
|
-
|
|
286
|
-
/**
|
|
287
|
-
* Custom formatter to be passed into Rifm component.
|
|
288
|
-
* @param {string} str The un-formatted string.
|
|
289
|
-
* @returns {string} The formatted string.
|
|
290
|
-
*/
|
|
291
|
-
rifmFormatter: PropTypes.func,
|
|
292
|
-
|
|
293
|
-
/**
|
|
294
|
-
* Dynamically check if time is disabled or not.
|
|
295
|
-
* If returns `false` appropriate time point will ot be acceptable.
|
|
296
|
-
* @param {number} timeValue The value to check.
|
|
297
|
-
* @param {ClockPickerView} clockType The clock type of the timeValue.
|
|
298
|
-
* @returns {boolean} Returns `true` if the time should be disabled
|
|
299
|
-
*/
|
|
300
|
-
shouldDisableTime: PropTypes.func,
|
|
301
|
-
|
|
302
|
-
/**
|
|
303
|
-
* If `true`, show the toolbar even in desktop mode.
|
|
304
|
-
*/
|
|
305
|
-
showToolbar: PropTypes.bool,
|
|
306
|
-
|
|
307
|
-
/**
|
|
308
|
-
* Component that will replace default toolbar renderer.
|
|
309
|
-
* @default TimePickerToolbar
|
|
310
|
-
*/
|
|
311
|
-
ToolbarComponent: PropTypes.elementType,
|
|
312
|
-
|
|
313
|
-
/**
|
|
314
|
-
* Date format, that is displaying in toolbar.
|
|
315
|
-
*/
|
|
316
|
-
toolbarFormat: PropTypes.string,
|
|
317
|
-
|
|
318
|
-
/**
|
|
319
|
-
* Mobile picker date value placeholder, displaying if `value` === `null`.
|
|
320
|
-
* @default '–'
|
|
321
|
-
*/
|
|
322
|
-
toolbarPlaceholder: PropTypes.node,
|
|
323
|
-
|
|
324
|
-
/**
|
|
325
|
-
* Mobile picker title, displaying in the toolbar.
|
|
326
|
-
* @default 'Select time'
|
|
327
|
-
*/
|
|
328
|
-
toolbarTitle: PropTypes.node,
|
|
329
|
-
|
|
330
|
-
/**
|
|
331
|
-
* Custom component for popper [Transition](https://mui.com/material-ui/transitions/#transitioncomponent-prop).
|
|
332
|
-
*/
|
|
333
|
-
TransitionComponent: PropTypes.elementType,
|
|
334
|
-
|
|
335
|
-
/**
|
|
336
|
-
* The value of the picker.
|
|
337
|
-
*/
|
|
338
|
-
value: PropTypes.oneOfType([PropTypes.any, PropTypes.instanceOf(Date), PropTypes.number, PropTypes.string]),
|
|
339
|
-
|
|
340
|
-
/**
|
|
341
|
-
* Array of views to show.
|
|
342
|
-
*/
|
|
343
|
-
views: PropTypes.arrayOf(PropTypes.oneOf(['hours', 'minutes', 'seconds']).isRequired)
|
|
344
|
-
} : void 0;
|
|
345
19
|
export default DesktopTimePicker;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export
|
|
1
|
+
export { default } from './DesktopTimePicker';
|
|
2
|
+
export * from './DesktopTimePicker';
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { default } from './DesktopTimePicker';
|
|
2
|
+
export * from './DesktopTimePicker';
|
|
@@ -145,7 +145,12 @@ const LoadingButton = /*#__PURE__*/React.forwardRef(function LoadingButton(inPro
|
|
|
145
145
|
});
|
|
146
146
|
|
|
147
147
|
const classes = useUtilityClasses(ownerState);
|
|
148
|
-
|
|
148
|
+
const loadingButtonLoadingIndicator = loading ? /*#__PURE__*/_jsx(LoadingButtonLoadingIndicator, {
|
|
149
|
+
className: classes.loadingIndicator,
|
|
150
|
+
ownerState: ownerState,
|
|
151
|
+
children: loadingIndicator
|
|
152
|
+
}) : null;
|
|
153
|
+
return /*#__PURE__*/_jsxs(LoadingButtonRoot, _extends({
|
|
149
154
|
disabled: disabled || loading,
|
|
150
155
|
id: id,
|
|
151
156
|
ref: ref
|
|
@@ -153,19 +158,7 @@ const LoadingButton = /*#__PURE__*/React.forwardRef(function LoadingButton(inPro
|
|
|
153
158
|
variant: variant,
|
|
154
159
|
classes: classes,
|
|
155
160
|
ownerState: ownerState,
|
|
156
|
-
children: ownerState.loadingPosition === 'end' ?
|
|
157
|
-
children: [children, loading && /*#__PURE__*/_jsx(LoadingButtonLoadingIndicator, {
|
|
158
|
-
className: classes.loadingIndicator,
|
|
159
|
-
ownerState: ownerState,
|
|
160
|
-
children: loadingIndicator
|
|
161
|
-
})]
|
|
162
|
-
}) : /*#__PURE__*/_jsxs(React.Fragment, {
|
|
163
|
-
children: [loading && /*#__PURE__*/_jsx(LoadingButtonLoadingIndicator, {
|
|
164
|
-
className: classes.loadingIndicator,
|
|
165
|
-
ownerState: ownerState,
|
|
166
|
-
children: loadingIndicator
|
|
167
|
-
}), children]
|
|
168
|
-
})
|
|
161
|
+
children: [ownerState.loadingPosition === 'end' ? children : loadingButtonLoadingIndicator, ownerState.loadingPosition === 'end' ? loadingButtonLoadingIndicator : children]
|
|
169
162
|
}));
|
|
170
163
|
});
|
|
171
164
|
process.env.NODE_ENV !== "production" ? LoadingButton.propTypes
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { LocalizationProviderProps } from '@mui/x-date-pickers/LocalizationProvider';
|
|
3
2
|
declare type LocalizationProviderComponent = ((props: LocalizationProviderProps & React.RefAttributes<HTMLDivElement>) => JSX.Element) & {
|
|
4
3
|
propTypes?: any;
|
|
5
4
|
};
|
|
@@ -8,3 +7,4 @@ declare type LocalizationProviderComponent = ((props: LocalizationProviderProps
|
|
|
8
7
|
*/
|
|
9
8
|
declare const LocalizationProvider: LocalizationProviderComponent;
|
|
10
9
|
export default LocalizationProvider;
|
|
10
|
+
export declare type LocalizationProviderProps = Record<any, any>;
|
|
@@ -1,13 +1,9 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
1
|
import * as React from 'react';
|
|
3
|
-
import PropTypes from 'prop-types';
|
|
4
|
-
import { LocalizationProvider as XLocalizationProvider } from '@mui/x-date-pickers/LocalizationProvider';
|
|
5
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
2
|
let warnedOnce = false;
|
|
7
3
|
|
|
8
4
|
const warn = () => {
|
|
9
5
|
if (!warnedOnce) {
|
|
10
|
-
console.warn(['MUI: The LocalizationProvider component was moved from `@mui/lab` to `@mui/x-date-pickers`.', '
|
|
6
|
+
console.warn(['MUI: The LocalizationProvider component was moved from `@mui/lab` to `@mui/x-date-pickers`.', '', "You should use `import { LocalizationProvider } from '@mui/x-date-pickers'`", "or `import { LocalizationProvider } from '@mui/x-date-pickers/LocalizationProvider'`", '', 'More information about this migration on our blog: https://mui.com/blog/lab-date-pickers-to-mui-x/.'].join('\n'));
|
|
11
7
|
warnedOnce = true;
|
|
12
8
|
}
|
|
13
9
|
};
|
|
@@ -15,23 +11,8 @@ const warn = () => {
|
|
|
15
11
|
/**
|
|
16
12
|
* @ignore - do not document.
|
|
17
13
|
*/
|
|
18
|
-
const LocalizationProvider = /*#__PURE__*/React.forwardRef(function DeprecatedLocalizationProvider(
|
|
14
|
+
const LocalizationProvider = /*#__PURE__*/React.forwardRef(function DeprecatedLocalizationProvider() {
|
|
19
15
|
warn();
|
|
20
|
-
return
|
|
21
|
-
ref: ref
|
|
22
|
-
}, props));
|
|
16
|
+
return null;
|
|
23
17
|
});
|
|
24
|
-
process.env.NODE_ENV !== "production" ? LocalizationProvider.propTypes
|
|
25
|
-
/* remove-proptypes */
|
|
26
|
-
= {
|
|
27
|
-
// ----------------------------- Warning --------------------------------
|
|
28
|
-
// | These PropTypes are generated from the TypeScript type definitions |
|
|
29
|
-
// | To update them edit TypeScript types and run "yarn proptypes" |
|
|
30
|
-
// ----------------------------------------------------------------------
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* @ignore
|
|
34
|
-
*/
|
|
35
|
-
children: PropTypes.node
|
|
36
|
-
} : void 0;
|
|
37
18
|
export default LocalizationProvider;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { default } from './LocalizationProvider';
|
|
2
|
-
export
|
|
2
|
+
export * from './LocalizationProvider';
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export { default } from './LocalizationProvider';
|
|
1
|
+
export { default } from './LocalizationProvider';
|
|
2
|
+
export * from './LocalizationProvider';
|
package/Masonry/Masonry.js
CHANGED
|
@@ -50,7 +50,7 @@ export const getStyle = ({
|
|
|
50
50
|
|
|
51
51
|
if (ownerState.isSSR) {
|
|
52
52
|
const orderStyleSSR = {};
|
|
53
|
-
const defaultSpacing =
|
|
53
|
+
const defaultSpacing = parseToNumber(theme.spacing(ownerState.defaultSpacing));
|
|
54
54
|
|
|
55
55
|
for (let i = 1; i <= ownerState.defaultColumns; i += 1) {
|
|
56
56
|
orderStyleSSR[`&:nth-of-type(${ownerState.defaultColumns}n+${i % ownerState.defaultColumns})`] = {
|
|
@@ -74,15 +74,22 @@ export const getStyle = ({
|
|
|
74
74
|
const transformer = createUnarySpacing(theme);
|
|
75
75
|
|
|
76
76
|
const spacingStyleFromPropValue = propValue => {
|
|
77
|
-
|
|
78
|
-
|
|
77
|
+
let spacing; // in case of string/number value
|
|
78
|
+
|
|
79
|
+
if (typeof propValue === 'string' && !Number.isNaN(Number(propValue)) || typeof propValue === 'number') {
|
|
80
|
+
const themeSpacingValue = Number(propValue);
|
|
81
|
+
spacing = getValue(transformer, themeSpacingValue);
|
|
82
|
+
} else {
|
|
83
|
+
spacing = propValue;
|
|
84
|
+
}
|
|
85
|
+
|
|
79
86
|
return _extends({
|
|
80
|
-
margin: -(spacing / 2)
|
|
87
|
+
margin: `calc(0px - (${spacing} / 2))`,
|
|
81
88
|
'& > *': {
|
|
82
|
-
margin: spacing / 2
|
|
89
|
+
margin: `calc(${spacing} / 2)`
|
|
83
90
|
}
|
|
84
91
|
}, ownerState.maxColumnHeight && {
|
|
85
|
-
height: Math.ceil(ownerState.maxColumnHeight + spacing)
|
|
92
|
+
height: typeof spacing === 'number' ? Math.ceil(ownerState.maxColumnHeight + parseToNumber(spacing)) : `calc(${ownerState.maxColumnHeight}px + ${spacing})`
|
|
86
93
|
});
|
|
87
94
|
};
|
|
88
95
|
|
|
@@ -97,7 +104,7 @@ export const getStyle = ({
|
|
|
97
104
|
const columnStyleFromPropValue = propValue => {
|
|
98
105
|
const columnValue = Number(propValue);
|
|
99
106
|
const width = `${(100 / columnValue).toFixed(2)}%`;
|
|
100
|
-
const spacing = typeof spacingValues
|
|
107
|
+
const spacing = typeof spacingValues === 'string' && !Number.isNaN(Number(spacingValues)) || typeof spacingValues === 'number' ? getValue(transformer, Number(spacingValues)) : '0px';
|
|
101
108
|
return {
|
|
102
109
|
'& > *': {
|
|
103
110
|
width: `calc(${width} - ${spacing})`
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { MobileDatePickerProps } from '@mui/x-date-pickers/MobileDatePicker';
|
|
3
2
|
declare type MobileDatePickerComponent = (<TDate>(props: MobileDatePickerProps<TDate> & React.RefAttributes<HTMLDivElement>) => JSX.Element) & {
|
|
4
3
|
propTypes?: any;
|
|
5
4
|
};
|
|
@@ -8,3 +7,4 @@ declare type MobileDatePickerComponent = (<TDate>(props: MobileDatePickerProps<T
|
|
|
8
7
|
*/
|
|
9
8
|
declare const MobileDatePicker: MobileDatePickerComponent;
|
|
10
9
|
export default MobileDatePicker;
|
|
10
|
+
export declare type MobileDatePickerProps<TDate> = Record<any, any>;
|