@mui/lab 5.0.0-alpha.88 → 5.0.0-alpha.91

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