@docsvision/material-ui-pickers 3.2.0-beta.3 → 3.2.0-beta.30

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 (313) hide show
  1. package/{build/DatePicker → DatePicker}/DatePicker.d.ts +2 -2
  2. package/{build/DatePicker → DatePicker}/DatePicker.js +1 -1
  3. package/{build/DatePicker → DatePicker}/DatePickerToolbar.js +3 -3
  4. package/{build/DateTimePicker → DateTimePicker}/DateTimePicker.d.ts +2 -2
  5. package/{build/DateTimePicker → DateTimePicker}/DateTimePicker.js +3 -3
  6. package/{build/DateTimePicker → DateTimePicker}/DateTimePickerToolbar.js +4 -4
  7. package/{build/MuiPickersUtilsProvider.d.ts → MuiPickersUtilsProvider.d.ts} +1 -1
  8. package/{build/MuiPickersUtilsProvider.js → MuiPickersUtilsProvider.js} +11 -5
  9. package/{build/Picker → Picker}/Picker.d.ts +5 -3
  10. package/{build/Picker → Picker}/Picker.js +15 -12
  11. package/{build/Picker → Picker}/WrappedKeyboardPicker.js +2 -2
  12. package/{build/Picker → Picker}/WrappedPurePicker.js +4 -3
  13. package/{build/README.md → README.md} +1 -1
  14. package/Rifm/Rifm.d.ts +17 -0
  15. package/Rifm/Rifm.js +166 -0
  16. package/{build/TimePicker → TimePicker}/TimePicker.d.ts +4 -2
  17. package/{build/TimePicker → TimePicker}/TimePicker.js +3 -3
  18. package/{build/TimePicker → TimePicker}/TimePickerToolbar.js +3 -3
  19. package/{build/_helpers → _helpers}/date-utils.d.ts +2 -2
  20. package/{build/_helpers → _helpers}/date-utils.js +3 -3
  21. package/_helpers/text-field-helper.d.ts +32 -0
  22. package/_helpers/text-field-helper.js +144 -0
  23. package/{build/_helpers → _helpers}/time-utils.d.ts +2 -2
  24. package/{build/_shared → _shared}/KeyboardDateInput.d.ts +5 -0
  25. package/{build/_shared → _shared}/KeyboardDateInput.js +29 -5
  26. package/{build/_shared → _shared}/ModalDialog.d.ts +2 -2
  27. package/{build/_shared → _shared}/PureDateInput.js +1 -1
  28. package/{build/_shared → _shared}/ToolbarButton.d.ts +2 -2
  29. package/{build/_shared → _shared}/WithUtils.d.ts +1 -1
  30. package/{build/_shared → _shared}/hooks/useIsLandscape.js +1 -1
  31. package/{build/_shared → _shared}/hooks/useKeyboardPickerState.d.ts +1 -1
  32. package/{build/_shared → _shared}/hooks/useKeyboardPickerState.js +3 -3
  33. package/{build/_shared → _shared}/hooks/usePickerState.d.ts +1 -1
  34. package/{build/_shared → _shared}/hooks/usePickerState.js +2 -3
  35. package/{build/_shared → _shared}/hooks/useUtils.d.ts +2 -2
  36. package/{build/constants → constants}/prop-types.js +2 -2
  37. package/{build/dist → dist}/material-ui-pickers.esm.js +1467 -837
  38. package/dist/material-ui-pickers.esm.js.map +1 -0
  39. package/{build/dist → dist}/material-ui-pickers.js +1483 -853
  40. package/dist/material-ui-pickers.js.map +1 -0
  41. package/{build/dist → dist}/material-ui-pickers.umd.js +29819 -22160
  42. package/dist/material-ui-pickers.umd.min.js +1 -0
  43. package/{build/index.d.ts → index.d.ts} +11 -11
  44. package/package.json +14 -88
  45. package/{build/typings → typings}/BasePicker.d.ts +2 -0
  46. package/{build/typings → typings}/overrides.d.ts +2 -2
  47. package/{build/views → views}/Calendar/Calendar.js +4 -3
  48. package/{build/views → views}/Calendar/CalendarHeader.js +1 -1
  49. package/{build/views → views}/Clock/Clock.d.ts +1 -1
  50. package/{build/views → views}/Clock/Clock.js +1 -1
  51. package/{build/views → views}/Clock/ClockNumbers.d.ts +2 -2
  52. package/{build/views → views}/Clock/ClockPointer.d.ts +1 -1
  53. package/{build/views → views}/Clock/ClockView.js +1 -1
  54. package/{build/views → views}/Month/MonthView.js +1 -1
  55. package/{build/views → views}/Year/YearView.js +2 -2
  56. package/.size-snapshot.json +0 -26
  57. package/build/_helpers/text-field-helper.d.ts +0 -32
  58. package/build/_helpers/text-field-helper.js +0 -88
  59. package/build/dist/material-ui-pickers.esm.js.map +0 -1
  60. package/build/dist/material-ui-pickers.js.map +0 -1
  61. package/build/dist/material-ui-pickers.umd.min.js +0 -1
  62. package/build/package.json +0 -63
  63. package/copy.js +0 -58
  64. package/coverage/clover.xml +0 -1589
  65. package/coverage/coverage-final.json +0 -57
  66. package/coverage/lcov-report/base.css +0 -224
  67. package/coverage/lcov-report/block-navigation.js +0 -79
  68. package/coverage/lcov-report/index.html +0 -279
  69. package/coverage/lcov-report/prettify.css +0 -1
  70. package/coverage/lcov-report/prettify.js +0 -2
  71. package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
  72. package/coverage/lcov-report/sorter.js +0 -170
  73. package/coverage/lcov-report/src/DatePicker/DatePicker.tsx.html +0 -342
  74. package/coverage/lcov-report/src/DatePicker/DatePickerToolbar.tsx.html +0 -294
  75. package/coverage/lcov-report/src/DatePicker/index.html +0 -123
  76. package/coverage/lcov-report/src/DatePicker/index.ts.html +0 -90
  77. package/coverage/lcov-report/src/DateTimePicker/DateTimePicker.tsx.html +0 -285
  78. package/coverage/lcov-report/src/DateTimePicker/DateTimePickerTabs.tsx.html +0 -327
  79. package/coverage/lcov-report/src/DateTimePicker/DateTimePickerToolbar.tsx.html +0 -438
  80. package/coverage/lcov-report/src/DateTimePicker/index.html +0 -123
  81. package/coverage/lcov-report/src/MuiPickersUtilsProvider.tsx.html +0 -186
  82. package/coverage/lcov-report/src/Picker/Picker.tsx.html +0 -873
  83. package/coverage/lcov-report/src/Picker/WrappedKeyboardPicker.tsx.html +0 -465
  84. package/coverage/lcov-report/src/Picker/WrappedPurePicker.tsx.html +0 -435
  85. package/coverage/lcov-report/src/Picker/index.html +0 -123
  86. package/coverage/lcov-report/src/TimePicker/TimePicker.tsx.html +0 -270
  87. package/coverage/lcov-report/src/TimePicker/TimePickerToolbar.tsx.html +0 -609
  88. package/coverage/lcov-report/src/TimePicker/index.html +0 -110
  89. package/coverage/lcov-report/src/_helpers/date-utils.ts.html +0 -345
  90. package/coverage/lcov-report/src/_helpers/index.html +0 -136
  91. package/coverage/lcov-report/src/_helpers/text-field-helper.ts.html +0 -564
  92. package/coverage/lcov-report/src/_helpers/time-utils.ts.html +0 -318
  93. package/coverage/lcov-report/src/_helpers/utils.ts.html +0 -93
  94. package/coverage/lcov-report/src/_shared/KeyboardDateInput.tsx.html +0 -438
  95. package/coverage/lcov-report/src/_shared/ModalDialog.tsx.html +0 -411
  96. package/coverage/lcov-report/src/_shared/PickerToolbar.tsx.html +0 -225
  97. package/coverage/lcov-report/src/_shared/PureDateInput.tsx.html +0 -204
  98. package/coverage/lcov-report/src/_shared/ToolbarButton.tsx.html +0 -258
  99. package/coverage/lcov-report/src/_shared/ToolbarText.tsx.html +0 -216
  100. package/coverage/lcov-report/src/_shared/WithUtils.tsx.html +0 -126
  101. package/coverage/lcov-report/src/_shared/hooks/index.html +0 -175
  102. package/coverage/lcov-report/src/_shared/hooks/useIsLandscape.tsx.html +0 -150
  103. package/coverage/lcov-report/src/_shared/hooks/useKeyDown.ts.html +0 -171
  104. package/coverage/lcov-report/src/_shared/hooks/useKeyboardPickerState.ts.html +0 -285
  105. package/coverage/lcov-report/src/_shared/hooks/useOpenState.ts.html +0 -135
  106. package/coverage/lcov-report/src/_shared/hooks/usePickerState.ts.html +0 -474
  107. package/coverage/lcov-report/src/_shared/hooks/useUtils.ts.html +0 -129
  108. package/coverage/lcov-report/src/_shared/hooks/useViews.tsx.html +0 -162
  109. package/coverage/lcov-report/src/_shared/icons/ArrowLeftIcon.tsx.html +0 -102
  110. package/coverage/lcov-report/src/_shared/icons/ArrowRightIcon.tsx.html +0 -102
  111. package/coverage/lcov-report/src/_shared/icons/DateRangeIcon.tsx.html +0 -102
  112. package/coverage/lcov-report/src/_shared/icons/KeyboardIcon.tsx.html +0 -102
  113. package/coverage/lcov-report/src/_shared/icons/TimeIcon.tsx.html +0 -105
  114. package/coverage/lcov-report/src/_shared/icons/index.html +0 -149
  115. package/coverage/lcov-report/src/_shared/index.html +0 -175
  116. package/coverage/lcov-report/src/constants/ClockType.ts.html +0 -102
  117. package/coverage/lcov-report/src/constants/dimensions.ts.html +0 -84
  118. package/coverage/lcov-report/src/constants/index.html +0 -123
  119. package/coverage/lcov-report/src/constants/prop-types.ts.html +0 -180
  120. package/coverage/lcov-report/src/index.html +0 -97
  121. package/coverage/lcov-report/src/views/Calendar/Calendar.tsx.html +0 -1149
  122. package/coverage/lcov-report/src/views/Calendar/CalendarHeader.tsx.html +0 -492
  123. package/coverage/lcov-report/src/views/Calendar/Day.tsx.html +0 -360
  124. package/coverage/lcov-report/src/views/Calendar/DayWrapper.tsx.html +0 -168
  125. package/coverage/lcov-report/src/views/Calendar/SlideTransition.tsx.html +0 -369
  126. package/coverage/lcov-report/src/views/Calendar/index.html +0 -149
  127. package/coverage/lcov-report/src/views/Clock/Clock.tsx.html +0 -585
  128. package/coverage/lcov-report/src/views/Clock/ClockNumber.tsx.html +0 -342
  129. package/coverage/lcov-report/src/views/Clock/ClockNumbers.tsx.html +0 -297
  130. package/coverage/lcov-report/src/views/Clock/ClockPointer.tsx.html +0 -381
  131. package/coverage/lcov-report/src/views/Clock/ClockView.tsx.html +0 -384
  132. package/coverage/lcov-report/src/views/Clock/index.html +0 -149
  133. package/coverage/lcov-report/src/views/Month/Month.tsx.html +0 -297
  134. package/coverage/lcov-report/src/views/Month/MonthView.tsx.html +0 -351
  135. package/coverage/lcov-report/src/views/Month/index.html +0 -110
  136. package/coverage/lcov-report/src/views/Year/Year.tsx.html +0 -300
  137. package/coverage/lcov-report/src/views/Year/YearView.tsx.html +0 -342
  138. package/coverage/lcov-report/src/views/Year/index.html +0 -110
  139. package/coverage/lcov-report/src/wrappers/InlineWrapper.tsx.html +0 -309
  140. package/coverage/lcov-report/src/wrappers/ModalWrapper.tsx.html +0 -408
  141. package/coverage/lcov-report/src/wrappers/StaticWrapper.tsx.html +0 -135
  142. package/coverage/lcov-report/src/wrappers/Wrapper.tsx.html +0 -294
  143. package/coverage/lcov-report/src/wrappers/index.html +0 -136
  144. package/coverage/lcov.info +0 -2815
  145. package/remove-prop-types.js +0 -37
  146. package/rollup.config.js +0 -143
  147. package/src/DatePicker/DatePicker.tsx +0 -91
  148. package/src/DatePicker/DatePickerToolbar.tsx +0 -75
  149. package/src/DatePicker/index.ts +0 -7
  150. package/src/DateTimePicker/DateTimePicker.tsx +0 -72
  151. package/src/DateTimePicker/DateTimePickerTabs.tsx +0 -86
  152. package/src/DateTimePicker/DateTimePickerToolbar.tsx +0 -123
  153. package/src/DateTimePicker/index.ts +0 -7
  154. package/src/MuiPickersUtilsProvider.tsx +0 -39
  155. package/src/Picker/Picker.tsx +0 -268
  156. package/src/Picker/WrappedKeyboardPicker.tsx +0 -132
  157. package/src/Picker/WrappedPurePicker.tsx +0 -124
  158. package/src/TimePicker/TimePicker.tsx +0 -67
  159. package/src/TimePicker/TimePickerToolbar.tsx +0 -180
  160. package/src/TimePicker/index.tsx +0 -7
  161. package/src/__tests__/DatePicker/Calendar.test.tsx +0 -51
  162. package/src/__tests__/DatePicker/Month.test.tsx +0 -36
  163. package/src/__tests__/DatePicker/MonthSelection.test.tsx +0 -37
  164. package/src/__tests__/MuiPickersUtilsProvider.test.tsx +0 -21
  165. package/src/__tests__/TimePicker/Clock.test.tsx +0 -68
  166. package/src/__tests__/_helpers/date-utils.test.tsx +0 -197
  167. package/src/__tests__/_helpers/text-field-helper.test.tsx +0 -34
  168. package/src/__tests__/_shared/ModalDialog.test.tsx +0 -109
  169. package/src/__tests__/e2e/DatePicker.test.tsx +0 -233
  170. package/src/__tests__/e2e/DatePickerProps.test.tsx +0 -18
  171. package/src/__tests__/e2e/DatePickerRoot.test.tsx +0 -154
  172. package/src/__tests__/e2e/DateTimePicker.test.tsx +0 -86
  173. package/src/__tests__/e2e/DateTimePickerRoot.test.tsx +0 -72
  174. package/src/__tests__/e2e/KeyboardDatePicker.test.tsx +0 -140
  175. package/src/__tests__/e2e/KeyboardDateTimePicker.test.tsx +0 -48
  176. package/src/__tests__/e2e/Theme.test.tsx +0 -30
  177. package/src/__tests__/e2e/TimePicker.test.tsx +0 -121
  178. package/src/__tests__/e2e/commands.tsx +0 -8
  179. package/src/__tests__/setup.js +0 -26
  180. package/src/__tests__/test-utils.tsx +0 -45
  181. package/src/__tests__/tsconfig.json +0 -5
  182. package/src/_helpers/date-utils.ts +0 -92
  183. package/src/_helpers/text-field-helper.ts +0 -165
  184. package/src/_helpers/time-utils.ts +0 -83
  185. package/src/_helpers/utils.ts +0 -8
  186. package/src/_shared/KeyboardDateInput.tsx +0 -123
  187. package/src/_shared/ModalDialog.tsx +0 -114
  188. package/src/_shared/PickerToolbar.tsx +0 -52
  189. package/src/_shared/PureDateInput.tsx +0 -45
  190. package/src/_shared/ToolbarButton.tsx +0 -63
  191. package/src/_shared/ToolbarText.tsx +0 -49
  192. package/src/_shared/WithUtils.tsx +0 -19
  193. package/src/_shared/hooks/useIsLandscape.tsx +0 -27
  194. package/src/_shared/hooks/useKeyDown.ts +0 -34
  195. package/src/_shared/hooks/useKeyboardPickerState.ts +0 -72
  196. package/src/_shared/hooks/useOpenState.ts +0 -22
  197. package/src/_shared/hooks/usePickerState.ts +0 -135
  198. package/src/_shared/hooks/useUtils.ts +0 -20
  199. package/src/_shared/hooks/useViews.tsx +0 -31
  200. package/src/_shared/icons/ArrowLeftIcon.tsx +0 -11
  201. package/src/_shared/icons/ArrowRightIcon.tsx +0 -11
  202. package/src/_shared/icons/DateRangeIcon.tsx +0 -11
  203. package/src/_shared/icons/KeyboardIcon.tsx +0 -11
  204. package/src/_shared/icons/TimeIcon.tsx +0 -12
  205. package/src/constants/ClockType.ts +0 -11
  206. package/src/constants/dimensions.ts +0 -5
  207. package/src/constants/prop-types.ts +0 -37
  208. package/src/index.ts +0 -48
  209. package/src/typings/BasePicker.tsx +0 -58
  210. package/src/typings/date.ts +0 -3
  211. package/src/typings/extendMui.ts +0 -10
  212. package/src/typings/overrides.ts +0 -54
  213. package/src/views/Calendar/Calendar.tsx +0 -360
  214. package/src/views/Calendar/CalendarHeader.tsx +0 -141
  215. package/src/views/Calendar/Day.tsx +0 -97
  216. package/src/views/Calendar/DayWrapper.tsx +0 -33
  217. package/src/views/Calendar/SlideTransition.tsx +0 -100
  218. package/src/views/Clock/Clock.tsx +0 -172
  219. package/src/views/Clock/ClockNumber.tsx +0 -91
  220. package/src/views/Clock/ClockNumbers.tsx +0 -76
  221. package/src/views/Clock/ClockPointer.tsx +0 -104
  222. package/src/views/Clock/ClockView.tsx +0 -105
  223. package/src/views/Month/Month.tsx +0 -76
  224. package/src/views/Month/MonthView.tsx +0 -94
  225. package/src/views/Year/Year.tsx +0 -77
  226. package/src/views/Year/YearView.tsx +0 -91
  227. package/src/wrappers/InlineWrapper.tsx +0 -80
  228. package/src/wrappers/ModalWrapper.tsx +0 -113
  229. package/src/wrappers/StaticWrapper.tsx +0 -22
  230. package/src/wrappers/Wrapper.tsx +0 -75
  231. package/tsconfig.json +0 -21
  232. package/typings.d.ts +0 -6
  233. /package/{build/DatePicker → DatePicker}/DatePickerToolbar.d.ts +0 -0
  234. /package/{build/DatePicker → DatePicker}/index.d.ts +0 -0
  235. /package/{build/DatePicker → DatePicker}/index.js +0 -0
  236. /package/{build/DateTimePicker → DateTimePicker}/DateTimePickerTabs.d.ts +0 -0
  237. /package/{build/DateTimePicker → DateTimePicker}/DateTimePickerTabs.js +0 -0
  238. /package/{build/DateTimePicker → DateTimePicker}/DateTimePickerToolbar.d.ts +0 -0
  239. /package/{build/DateTimePicker → DateTimePicker}/index.d.ts +0 -0
  240. /package/{build/DateTimePicker → DateTimePicker}/index.js +0 -0
  241. /package/{build/Picker → Picker}/WrappedKeyboardPicker.d.ts +0 -0
  242. /package/{build/Picker → Picker}/WrappedPurePicker.d.ts +0 -0
  243. /package/{build/TimePicker → TimePicker}/TimePickerToolbar.d.ts +0 -0
  244. /package/{build/TimePicker → TimePicker}/index.d.ts +0 -0
  245. /package/{build/TimePicker → TimePicker}/index.js +0 -0
  246. /package/{build/_helpers → _helpers}/time-utils.js +0 -0
  247. /package/{build/_helpers → _helpers}/utils.d.ts +0 -0
  248. /package/{build/_helpers → _helpers}/utils.js +0 -0
  249. /package/{build/_shared → _shared}/ModalDialog.js +0 -0
  250. /package/{build/_shared → _shared}/PickerToolbar.d.ts +0 -0
  251. /package/{build/_shared → _shared}/PickerToolbar.js +0 -0
  252. /package/{build/_shared → _shared}/PureDateInput.d.ts +0 -0
  253. /package/{build/_shared → _shared}/ToolbarButton.js +0 -0
  254. /package/{build/_shared → _shared}/ToolbarText.d.ts +0 -0
  255. /package/{build/_shared → _shared}/ToolbarText.js +0 -0
  256. /package/{build/_shared → _shared}/WithUtils.js +0 -0
  257. /package/{build/_shared → _shared}/hooks/useIsLandscape.d.ts +0 -0
  258. /package/{build/_shared → _shared}/hooks/useKeyDown.d.ts +0 -0
  259. /package/{build/_shared → _shared}/hooks/useKeyDown.js +0 -0
  260. /package/{build/_shared → _shared}/hooks/useOpenState.d.ts +0 -0
  261. /package/{build/_shared → _shared}/hooks/useOpenState.js +0 -0
  262. /package/{build/_shared → _shared}/hooks/useUtils.js +0 -0
  263. /package/{build/_shared → _shared}/hooks/useViews.d.ts +0 -0
  264. /package/{build/_shared → _shared}/hooks/useViews.js +0 -0
  265. /package/{build/_shared → _shared}/icons/ArrowLeftIcon.d.ts +0 -0
  266. /package/{build/_shared → _shared}/icons/ArrowLeftIcon.js +0 -0
  267. /package/{build/_shared → _shared}/icons/ArrowRightIcon.d.ts +0 -0
  268. /package/{build/_shared → _shared}/icons/ArrowRightIcon.js +0 -0
  269. /package/{build/_shared → _shared}/icons/DateRangeIcon.d.ts +0 -0
  270. /package/{build/_shared → _shared}/icons/DateRangeIcon.js +0 -0
  271. /package/{build/_shared → _shared}/icons/KeyboardIcon.d.ts +0 -0
  272. /package/{build/_shared → _shared}/icons/KeyboardIcon.js +0 -0
  273. /package/{build/_shared → _shared}/icons/TimeIcon.d.ts +0 -0
  274. /package/{build/_shared → _shared}/icons/TimeIcon.js +0 -0
  275. /package/{build/constants → constants}/ClockType.d.ts +0 -0
  276. /package/{build/constants → constants}/ClockType.js +0 -0
  277. /package/{build/constants → constants}/dimensions.d.ts +0 -0
  278. /package/{build/constants → constants}/dimensions.js +0 -0
  279. /package/{build/constants → constants}/prop-types.d.ts +0 -0
  280. /package/{build/index.js → index.js} +0 -0
  281. /package/{build/typings → typings}/BasePicker.js +0 -0
  282. /package/{build/typings → typings}/date.d.ts +0 -0
  283. /package/{build/typings → typings}/date.js +0 -0
  284. /package/{build/typings → typings}/extendMui.d.ts +0 -0
  285. /package/{build/typings → typings}/extendMui.js +0 -0
  286. /package/{build/typings → typings}/overrides.js +0 -0
  287. /package/{build/views → views}/Calendar/Calendar.d.ts +0 -0
  288. /package/{build/views → views}/Calendar/CalendarHeader.d.ts +0 -0
  289. /package/{build/views → views}/Calendar/Day.d.ts +0 -0
  290. /package/{build/views → views}/Calendar/Day.js +0 -0
  291. /package/{build/views → views}/Calendar/DayWrapper.d.ts +0 -0
  292. /package/{build/views → views}/Calendar/DayWrapper.js +0 -0
  293. /package/{build/views → views}/Calendar/SlideTransition.d.ts +0 -0
  294. /package/{build/views → views}/Calendar/SlideTransition.js +0 -0
  295. /package/{build/views → views}/Clock/ClockNumber.d.ts +0 -0
  296. /package/{build/views → views}/Clock/ClockNumber.js +0 -0
  297. /package/{build/views → views}/Clock/ClockNumbers.js +0 -0
  298. /package/{build/views → views}/Clock/ClockPointer.js +0 -0
  299. /package/{build/views → views}/Clock/ClockView.d.ts +0 -0
  300. /package/{build/views → views}/Month/Month.d.ts +0 -0
  301. /package/{build/views → views}/Month/Month.js +0 -0
  302. /package/{build/views → views}/Month/MonthView.d.ts +0 -0
  303. /package/{build/views → views}/Year/Year.d.ts +0 -0
  304. /package/{build/views → views}/Year/Year.js +0 -0
  305. /package/{build/views → views}/Year/YearView.d.ts +0 -0
  306. /package/{build/wrappers → wrappers}/InlineWrapper.d.ts +0 -0
  307. /package/{build/wrappers → wrappers}/InlineWrapper.js +0 -0
  308. /package/{build/wrappers → wrappers}/ModalWrapper.d.ts +0 -0
  309. /package/{build/wrappers → wrappers}/ModalWrapper.js +0 -0
  310. /package/{build/wrappers → wrappers}/StaticWrapper.d.ts +0 -0
  311. /package/{build/wrappers → wrappers}/StaticWrapper.js +0 -0
  312. /package/{build/wrappers → wrappers}/Wrapper.d.ts +0 -0
  313. /package/{build/wrappers → wrappers}/Wrapper.js +0 -0
@@ -1,83 +0,0 @@
1
- import { IUtils } from '@date-io/core/IUtils';
2
- import { MaterialUiPickersDate } from '../typings/date';
3
-
4
- const center = {
5
- x: 260 / 2,
6
- y: 260 / 2,
7
- };
8
-
9
- const basePoint = {
10
- x: center.x,
11
- y: 0,
12
- };
13
-
14
- const cx = basePoint.x - center.x;
15
- const cy = basePoint.y - center.y;
16
-
17
- const rad2deg = (rad: number) => rad * 57.29577951308232;
18
-
19
- const getAngleValue = (step: number, offsetX: number, offsetY: number) => {
20
- const x = offsetX - center.x;
21
- const y = offsetY - center.y;
22
-
23
- const atan = Math.atan2(cx, cy) - Math.atan2(x, y);
24
-
25
- let deg = rad2deg(atan);
26
- deg = Math.round(deg / step) * step;
27
- deg %= 360;
28
-
29
- const value = Math.floor(deg / step) || 0;
30
- const delta = Math.pow(x, 2) + Math.pow(y, 2);
31
- const distance = Math.sqrt(delta);
32
-
33
- return { value, distance };
34
- };
35
-
36
- export const getHours = (offsetX: number, offsetY: number, ampm: boolean) => {
37
- let { value, distance } = getAngleValue(30, offsetX, offsetY);
38
- value = value || 12;
39
-
40
- if (!ampm) {
41
- if (distance < 90) {
42
- value += 12;
43
- value %= 24;
44
- }
45
- } else {
46
- value %= 12;
47
- }
48
-
49
- return value;
50
- };
51
-
52
- export const getMinutes = (offsetX: number, offsetY: number, step = 1) => {
53
- const angleStep = step * 6;
54
- let { value } = getAngleValue(angleStep, offsetX, offsetY);
55
- value = (value * step) % 60;
56
-
57
- return value;
58
- };
59
-
60
- export const getMeridiem = (
61
- date: MaterialUiPickersDate,
62
- utils: IUtils<MaterialUiPickersDate>
63
- ): 'am' | 'pm' => {
64
- return utils.getHours(date) >= 12 ? 'pm' : 'am';
65
- };
66
-
67
- export const convertToMeridiem = (
68
- time: MaterialUiPickersDate,
69
- meridiem: 'am' | 'pm',
70
- ampm: boolean,
71
- utils: IUtils<MaterialUiPickersDate>
72
- ) => {
73
- if (ampm) {
74
- const currentMeridiem = utils.getHours(time) >= 12 ? 'pm' : 'am';
75
- if (currentMeridiem !== meridiem) {
76
- const hours = meridiem === 'am' ? utils.getHours(time) - 12 : utils.getHours(time) + 12;
77
-
78
- return utils.setHours(time, hours);
79
- }
80
- }
81
-
82
- return time;
83
- };
@@ -1,8 +0,0 @@
1
- /** Use it instead of .includes method for IE support */
2
- export function arrayIncludes<T>(array: T[], itemOrItems: T | T[]) {
3
- if (Array.isArray(itemOrItems)) {
4
- return itemOrItems.every(item => array.indexOf(item) !== -1);
5
- }
6
-
7
- return array.indexOf(itemOrItems) !== -1;
8
- }
@@ -1,123 +0,0 @@
1
- import * as React from 'react';
2
- import InputAdornment, { InputAdornmentProps } from '@material-ui/core/InputAdornment';
3
- import TextField, { BaseTextFieldProps, TextFieldProps } from '@material-ui/core/TextField';
4
- import { Rifm } from 'rifm';
5
- import { IconButton } from '@material-ui/core';
6
- import { ExtendMui } from '../typings/extendMui';
7
- import { KeyboardIcon } from './icons/KeyboardIcon';
8
- import { IconButtonProps } from '@material-ui/core/IconButton';
9
- import { makeMaskFromFormat, maskedDateFormatter } from '../_helpers/text-field-helper';
10
-
11
- export interface KeyboardDateInputProps
12
- extends ExtendMui<BaseTextFieldProps, 'variant' | 'onError' | 'onChange' | 'value'> {
13
- format: string;
14
- onChange: (value: string | null) => void;
15
- onClick?: () => void;
16
- validationError?: React.ReactNode;
17
- inputValue: string;
18
- InputProps?: TextFieldProps['InputProps'];
19
- /** Override input component */
20
- TextFieldComponent?: React.ComponentType<TextFieldProps>;
21
- /** Icon displaying for open picker button */
22
- keyboardIcon?: React.ReactNode;
23
- /** Pass material-ui text field variant down, bypass internal variant prop */
24
- inputVariant?: TextFieldProps['variant'];
25
- /**
26
- * Custom mask. Can be used to override generate from format. (e.g. __/__/____ __:__)
27
- */
28
- mask?: string;
29
- /**
30
- * Char string that will be replaced with number (for "_" mask will be "__/__/____")
31
- * @default '_'
32
- */
33
- maskChar?: string;
34
- /**
35
- * Refuse values regexp
36
- * @default /[^\d]+/gi
37
- */
38
- refuse?: RegExp;
39
- /**
40
- * Props to pass to keyboard input adornment
41
- * @type {Partial<InputAdornmentProps>}
42
- */
43
- InputAdornmentProps?: Partial<InputAdornmentProps>;
44
- /**
45
- * Props to pass to keyboard adornment button
46
- * @type {Partial<IconButtonProps>}
47
- */
48
- KeyboardButtonProps?: Partial<IconButtonProps>;
49
- /** Custom formatter to be passed into Rifm component */
50
- rifmFormatter?: (str: string) => string;
51
- }
52
-
53
- const KeyboardDateInput: React.FunctionComponent<KeyboardDateInputProps> = ({
54
- inputValue,
55
- inputVariant,
56
- validationError,
57
- KeyboardButtonProps,
58
- InputAdornmentProps,
59
- onClick,
60
- onChange,
61
- InputProps,
62
- mask,
63
- maskChar = '_',
64
- refuse = /[^\d]+/gi,
65
- format,
66
- keyboardIcon,
67
- disabled,
68
- rifmFormatter,
69
- TextFieldComponent = TextField,
70
- ...other
71
- }) => {
72
- const inputMask = mask || makeMaskFromFormat(format, maskChar);
73
- // prettier-ignore
74
- const formatter = React.useCallback(
75
- maskedDateFormatter(inputMask, maskChar, refuse),
76
- [mask, maskChar]
77
- );
78
-
79
- const position =
80
- InputAdornmentProps && InputAdornmentProps.position ? InputAdornmentProps.position : 'end';
81
-
82
- const handleChange = (text: string) => {
83
- const finalString = text === '' || text === inputMask ? null : text;
84
- onChange(finalString);
85
- };
86
-
87
- return (
88
- <Rifm
89
- value={inputValue}
90
- onChange={handleChange}
91
- refuse={refuse}
92
- format={rifmFormatter || formatter}
93
- >
94
- {({ onChange, value }) => (
95
- <TextFieldComponent
96
- disabled={disabled}
97
- error={Boolean(validationError)}
98
- helperText={validationError}
99
- {...other}
100
- value={value}
101
- onChange={onChange}
102
- variant={inputVariant as any}
103
- InputProps={{
104
- ...InputProps,
105
- [`${position}Adornment`]: (
106
- <InputAdornment position={position} {...InputAdornmentProps}>
107
- <IconButton disabled={disabled} {...KeyboardButtonProps} onClick={onClick}>
108
- {keyboardIcon}
109
- </IconButton>
110
- </InputAdornment>
111
- ),
112
- }}
113
- />
114
- )}
115
- </Rifm>
116
- );
117
- };
118
-
119
- KeyboardDateInput.defaultProps = {
120
- keyboardIcon: <KeyboardIcon />,
121
- };
122
-
123
- export default KeyboardDateInput;
@@ -1,114 +0,0 @@
1
- import * as React from 'react';
2
- import clsx from 'clsx';
3
- import Button from '@material-ui/core/Button';
4
- import DialogActions from '@material-ui/core/DialogActions';
5
- import DialogContent from '@material-ui/core/DialogContent';
6
- import Dialog, { DialogProps } from '@material-ui/core/Dialog';
7
- import { DIALOG_WIDTH } from '../constants/dimensions';
8
- import { createStyles, WithStyles, withStyles } from '@material-ui/core/styles';
9
-
10
- export interface ModalDialogProps extends DialogProps {
11
- onAccept: () => void;
12
- onDismiss: () => void;
13
- onClear: () => void;
14
- onSetToday: () => void;
15
- okLabel?: React.ReactNode;
16
- cancelLabel?: React.ReactNode;
17
- clearLabel?: React.ReactNode;
18
- todayLabel?: React.ReactNode;
19
- clearable?: boolean;
20
- showTodayButton?: boolean;
21
- showTabs?: boolean;
22
- wider?: boolean;
23
- }
24
-
25
- export const ModalDialog: React.SFC<ModalDialogProps & WithStyles<typeof styles>> = ({
26
- children,
27
- classes,
28
- onAccept,
29
- onDismiss,
30
- onClear,
31
- onSetToday,
32
- okLabel,
33
- cancelLabel,
34
- clearLabel,
35
- todayLabel,
36
- clearable,
37
- showTodayButton,
38
- showTabs,
39
- wider,
40
- ...other
41
- }) => (
42
- <Dialog
43
- role="dialog"
44
- onClose={onDismiss}
45
- classes={{
46
- paper: clsx(classes.dialogRoot, {
47
- [classes.dialogRootWider]: wider,
48
- }),
49
- }}
50
- {...other}
51
- >
52
- <DialogContent children={children} className={classes.dialog} />
53
-
54
- <DialogActions
55
- classes={{
56
- root: clsx({
57
- [classes.withAdditionalAction]: clearable || showTodayButton,
58
- }),
59
- }}
60
- >
61
- {clearable && (
62
- <Button color="primary" onClick={onClear}>
63
- {clearLabel}
64
- </Button>
65
- )}
66
-
67
- {!clearable && showTodayButton && (
68
- <Button color="primary" onClick={onSetToday}>
69
- {todayLabel}
70
- </Button>
71
- )}
72
-
73
- {cancelLabel && (
74
- <Button color="primary" onClick={onDismiss}>
75
- {cancelLabel}
76
- </Button>
77
- )}
78
-
79
- {okLabel && (
80
- <Button color="primary" onClick={onAccept}>
81
- {okLabel}
82
- </Button>
83
- )}
84
- </DialogActions>
85
- </Dialog>
86
- );
87
-
88
- ModalDialog.displayName = 'ModalDialog';
89
-
90
- export const styles = createStyles({
91
- dialogRoot: {
92
- minWidth: DIALOG_WIDTH,
93
- // maxWidth: DIALOG_WIDTH_WIDER,
94
- },
95
- dialogRootWider: {
96
- // minWidth: DIALOG_WIDTH_WIDER,
97
- },
98
- dialog: {
99
- '&:first-child': {
100
- padding: 0,
101
- },
102
- },
103
- withAdditionalAction: {
104
- // set justifyContent to default value to fix IE11 layout bug
105
- // see https://github.com/dmtrKovalenko/material-ui-pickers/pull/267
106
- justifyContent: 'flex-start',
107
-
108
- '& > *:first-child': {
109
- marginRight: 'auto',
110
- },
111
- },
112
- });
113
-
114
- export default withStyles(styles, { name: 'MuiPickersModal' })(ModalDialog);
@@ -1,52 +0,0 @@
1
- import * as React from 'react';
2
- import clsx from 'clsx';
3
- import Toolbar, { ToolbarProps } from '@material-ui/core/Toolbar';
4
- import { ExtendMui } from '../typings/extendMui';
5
- import { makeStyles } from '@material-ui/core/styles';
6
-
7
- export const useStyles = makeStyles(
8
- theme => ({
9
- toolbar: {
10
- display: 'flex',
11
- flexDirection: 'row',
12
- alignItems: 'center',
13
- justifyContent: 'center',
14
- height: 100,
15
- backgroundColor:
16
- theme.palette.type === 'light'
17
- ? theme.palette.primary.main
18
- : theme.palette.background.default,
19
- },
20
- toolbarLandscape: {
21
- height: 'auto',
22
- maxWidth: 150,
23
- padding: 8,
24
- justifyContent: 'flex-start',
25
- },
26
- }),
27
- { name: 'MuiPickersToolbar' }
28
- );
29
-
30
- interface PickerToolbarProps extends ExtendMui<ToolbarProps> {
31
- isLandscape: boolean;
32
- }
33
-
34
- const PickerToolbar: React.SFC<PickerToolbarProps> = ({
35
- children,
36
- isLandscape,
37
- className = null,
38
- ...other
39
- }) => {
40
- const classes = useStyles();
41
-
42
- return (
43
- <Toolbar
44
- className={clsx(classes.toolbar, { [classes.toolbarLandscape]: isLandscape }, className)}
45
- {...other}
46
- >
47
- {children}
48
- </Toolbar>
49
- );
50
- };
51
-
52
- export default PickerToolbar;
@@ -1,45 +0,0 @@
1
- import * as React from 'react';
2
- import TextField, { BaseTextFieldProps, TextFieldProps } from '@material-ui/core/TextField';
3
- import { ExtendMui } from '../typings/extendMui';
4
-
5
- export interface PureDateInputProps
6
- extends ExtendMui<BaseTextFieldProps, 'variant' | 'onError' | 'onChange' | 'value'> {
7
- /** Pass material-ui text field variant down, bypass internal variant prop */
8
- inputVariant?: TextFieldProps['variant'];
9
- /** Override input component */
10
- TextFieldComponent?: React.ComponentType<TextFieldProps>;
11
- InputProps?: TextFieldProps['InputProps'];
12
- inputValue: string;
13
- validationError?: React.ReactNode;
14
- }
15
-
16
- export const PureDateInput: React.FC<PureDateInputProps> = ({
17
- inputValue,
18
- inputVariant,
19
- validationError,
20
- InputProps,
21
- TextFieldComponent = TextField,
22
- ...other
23
- }) => {
24
- const PureDateInputProps = React.useMemo(
25
- () => ({
26
- ...InputProps,
27
- readOnly: true,
28
- }),
29
- [InputProps]
30
- );
31
-
32
- return (
33
- <TextFieldComponent
34
- error={Boolean(validationError)}
35
- helperText={validationError}
36
- {...other}
37
- // do not overridable
38
- value={inputValue}
39
- variant={inputVariant as any}
40
- InputProps={PureDateInputProps}
41
- />
42
- );
43
- };
44
-
45
- PureDateInput.displayName = 'PureDateInput';
@@ -1,63 +0,0 @@
1
- import * as React from 'react';
2
- import * as PropTypes from 'prop-types';
3
- import clsx from 'clsx';
4
- import ToolbarText from './ToolbarText';
5
- import Button, { ButtonProps } from '@material-ui/core/Button';
6
- import { ExtendMui } from '../typings/extendMui';
7
- import { TypographyProps } from '@material-ui/core/Typography';
8
- import { createStyles, withStyles, WithStyles } from '@material-ui/core/styles';
9
-
10
- export interface ToolbarButtonProps
11
- extends ExtendMui<ButtonProps, 'variant'>,
12
- WithStyles<typeof styles> {
13
- variant: TypographyProps['variant'];
14
- selected: boolean;
15
- label: string;
16
- align?: TypographyProps['align'];
17
- typographyClassName?: string;
18
- }
19
-
20
- const ToolbarButton: React.FunctionComponent<ToolbarButtonProps> = ({
21
- classes,
22
- className = null,
23
- label,
24
- selected,
25
- variant,
26
- align,
27
- typographyClassName,
28
- ...other
29
- }) => {
30
- return (
31
- <Button variant="text" className={clsx(classes.toolbarBtn, className)} {...other}>
32
- <ToolbarText
33
- align={align}
34
- className={typographyClassName}
35
- variant={variant}
36
- label={label}
37
- selected={selected}
38
- />
39
- </Button>
40
- );
41
- };
42
-
43
- (ToolbarButton as any).propTypes = {
44
- selected: PropTypes.bool.isRequired,
45
- label: PropTypes.string.isRequired,
46
- classes: PropTypes.any.isRequired,
47
- className: PropTypes.string,
48
- innerRef: PropTypes.any,
49
- };
50
-
51
- ToolbarButton.defaultProps = {
52
- className: '',
53
- };
54
-
55
- export const styles = createStyles({
56
- toolbarBtn: {
57
- padding: 0,
58
- minWidth: '16px',
59
- textTransform: 'none',
60
- },
61
- });
62
-
63
- export default withStyles(styles, { name: 'MuiPickersToolbarButton' })(ToolbarButton);
@@ -1,49 +0,0 @@
1
- import * as React from 'react';
2
- import clsx from 'clsx';
3
- import Typography, { TypographyProps } from '@material-ui/core/Typography';
4
- import { ExtendMui } from '../typings/extendMui';
5
- import { makeStyles, fade } from '@material-ui/core/styles';
6
-
7
- export interface ToolbarTextProps extends ExtendMui<TypographyProps> {
8
- selected?: boolean;
9
- label: string;
10
- }
11
-
12
- export const useStyles = makeStyles(
13
- theme => {
14
- const textColor =
15
- theme.palette.type === 'light'
16
- ? theme.palette.primary.contrastText
17
- : theme.palette.getContrastText(theme.palette.background.default);
18
-
19
- return {
20
- toolbarTxt: {
21
- color: fade(textColor, 0.54),
22
- },
23
- toolbarBtnSelected: {
24
- color: textColor,
25
- },
26
- };
27
- },
28
- { name: 'MuiPickersToolbarText' }
29
- );
30
-
31
- const ToolbarText: React.FunctionComponent<ToolbarTextProps> = ({
32
- selected,
33
- label,
34
- className = null,
35
- ...other
36
- }) => {
37
- const classes = useStyles();
38
- return (
39
- <Typography
40
- children={label}
41
- className={clsx(classes.toolbarTxt, className, {
42
- [classes.toolbarBtnSelected]: selected,
43
- })}
44
- {...other}
45
- />
46
- );
47
- };
48
-
49
- export default ToolbarText;
@@ -1,19 +0,0 @@
1
- import * as React from 'react';
2
- import { Omit } from '@material-ui/core';
3
- import { useUtils } from './hooks/useUtils';
4
- import { IUtils } from '@date-io/core/IUtils';
5
- import { MaterialUiPickersDate } from '../typings/date';
6
-
7
- export interface WithUtilsProps {
8
- utils: IUtils<MaterialUiPickersDate>;
9
- }
10
-
11
- export const withUtils = () => <P extends WithUtilsProps>(Component: React.ComponentType<P>) => {
12
- const WithUtils: React.SFC<Omit<P, keyof WithUtilsProps>> = props => {
13
- const utils = useUtils();
14
- return <Component utils={utils} {...(props as any)} />;
15
- };
16
-
17
- WithUtils.displayName = `WithUtils(${Component.displayName || Component.name})`;
18
- return WithUtils;
19
- };
@@ -1,27 +0,0 @@
1
- import * as React from 'react';
2
- import { useIsomorphicEffect } from './useKeyDown';
3
- import { BasePickerProps } from '../../typings/BasePicker';
4
-
5
- const getOrientation = () =>
6
- typeof window !== 'undefined' &&
7
- window.screen &&
8
- window.orientation &&
9
- Math.abs(window.screen.orientation.angle) === 90
10
- ? 'landscape'
11
- : 'portrait';
12
-
13
- export function useIsLandscape(customOrientation?: BasePickerProps['orientation']) {
14
- const [orientation, setOrientation] = React.useState<BasePickerProps['orientation']>(
15
- getOrientation()
16
- );
17
-
18
- const eventHandler = React.useCallback(() => setOrientation(getOrientation()), []);
19
-
20
- useIsomorphicEffect(() => {
21
- window.addEventListener('orientationchange', eventHandler);
22
- return () => window.removeEventListener('orientationchange', eventHandler);
23
- }, [eventHandler]);
24
-
25
- const orientationToUse = customOrientation || orientation;
26
- return orientationToUse === 'landscape';
27
- }
@@ -1,34 +0,0 @@
1
- import * as React from 'react';
2
-
3
- export const useIsomorphicEffect =
4
- typeof window === 'undefined' ? React.useEffect : React.useLayoutEffect;
5
-
6
- type KeyHandlers = Record<KeyboardEvent['key'], () => void>;
7
-
8
- export function runKeyHandler(e: KeyboardEvent, keyHandlers: KeyHandlers) {
9
- const handler = keyHandlers[e.key];
10
- if (handler) {
11
- handler();
12
- // if event was handled prevent other side effects (e.g. page scroll)
13
- e.preventDefault();
14
- }
15
- }
16
-
17
- export function useKeyDown(active: boolean, keyHandlers: KeyHandlers) {
18
- const keyHandlersRef = React.useRef(keyHandlers);
19
- useIsomorphicEffect(() => {
20
- keyHandlersRef.current = keyHandlers;
21
- });
22
-
23
- React.useEffect(() => {
24
- if (active) {
25
- const handleKeyDown = (event: KeyboardEvent) => {
26
- runKeyHandler(event, keyHandlers);
27
- };
28
- window.addEventListener('keydown', handleKeyDown);
29
- return () => {
30
- window.removeEventListener('keydown', handleKeyDown);
31
- };
32
- }
33
- }, [active, keyHandlers]);
34
- }
@@ -1,72 +0,0 @@
1
- import { useUtils } from './useUtils';
2
- import { Omit } from '@material-ui/core';
3
- import { IUtils } from '@date-io/core/IUtils';
4
- import { BasePickerProps } from '../../typings/BasePicker';
5
- import { MaterialUiPickersDate } from '../../typings/date';
6
- import { useCallback, useEffect, useMemo, useState } from 'react';
7
- import { getDisplayDate } from '../../_helpers/text-field-helper';
8
- import { StateHookOptions, usePickerState } from './usePickerState';
9
-
10
- export interface BaseKeyboardPickerProps extends Omit<BasePickerProps, 'onChange'> {
11
- /** String value for controlling value with pure input string. Overrides value prop */
12
- inputValue?: string;
13
- /** Keyboard onChange callback */
14
- onChange: (date: MaterialUiPickersDate | null, value?: string | null) => void;
15
- }
16
-
17
- function parseInputString(value: string, utils: IUtils<any>, format: string) {
18
- try {
19
- return utils.parse(value, format);
20
- } catch {
21
- return null;
22
- }
23
- }
24
-
25
- export function useKeyboardPickerState(props: BaseKeyboardPickerProps, options: StateHookOptions) {
26
- const { format = options.getDefaultFormat(), inputValue, onChange, value } = props;
27
- const utils = useUtils();
28
-
29
- const displayDate = getDisplayDate(value, format, utils, value === null, props);
30
- const [innerInputValue, setInnerInputValue] = useState(displayDate);
31
- const dateValue = inputValue ? parseInputString(inputValue, utils, format) : value;
32
-
33
- useEffect(() => {
34
- if (value === null || utils.isValid(value)) {
35
- setInnerInputValue(displayDate);
36
- }
37
- }, [displayDate, setInnerInputValue, utils, value]);
38
-
39
- const handleKeyboardChange = useCallback(
40
- (date: MaterialUiPickersDate) => {
41
- onChange(date, date === null ? null : utils.format(date, format));
42
- },
43
- [format, onChange, utils]
44
- );
45
-
46
- const { inputProps: innerInputProps, wrapperProps, pickerProps } = usePickerState(
47
- // Extend props interface
48
- { ...props, value: dateValue, onChange: handleKeyboardChange },
49
- options
50
- );
51
-
52
- const inputProps = useMemo(
53
- () => ({
54
- ...innerInputProps, // reuse validation and open/close logic
55
- format: wrapperProps.format,
56
- inputValue: inputValue || innerInputValue,
57
- onChange: (value: string | null) => {
58
- setInnerInputValue(value || '');
59
- const date = value === null ? null : utils.parse(value, wrapperProps.format);
60
-
61
- onChange(date, value);
62
- },
63
- }),
64
- [innerInputProps, innerInputValue, inputValue, onChange, utils, wrapperProps.format]
65
- );
66
-
67
- return {
68
- inputProps,
69
- wrapperProps,
70
- pickerProps,
71
- };
72
- }