@docsvision/material-ui-pickers 3.2.0-beta.26 → 3.2.0-beta.28

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 (233) hide show
  1. package/{build/DatePicker → DatePicker}/DatePickerToolbar.js +3 -3
  2. package/{build/DateTimePicker → DateTimePicker}/DateTimePicker.d.ts +2 -2
  3. package/{build/DateTimePicker → DateTimePicker}/DateTimePicker.js +2 -2
  4. package/{build/DateTimePicker → DateTimePicker}/DateTimePickerToolbar.js +4 -4
  5. package/{build/MuiPickersUtilsProvider.d.ts → MuiPickersUtilsProvider.d.ts} +1 -1
  6. package/{build/Picker → Picker}/Picker.d.ts +3 -3
  7. package/{build/Picker → Picker}/Picker.js +1 -1
  8. package/{build/Picker → Picker}/WrappedPurePicker.js +2 -1
  9. package/{build/TimePicker → TimePicker}/TimePicker.d.ts +4 -2
  10. package/{build/TimePicker → TimePicker}/TimePicker.js +2 -2
  11. package/{build/TimePicker → TimePicker}/TimePickerToolbar.js +3 -3
  12. package/{build/_helpers → _helpers}/date-utils.d.ts +2 -2
  13. package/{build/_helpers → _helpers}/date-utils.js +3 -3
  14. package/_helpers/text-field-helper.d.ts +32 -0
  15. package/{build/_helpers → _helpers}/text-field-helper.js +1 -1
  16. package/{build/_helpers → _helpers}/time-utils.d.ts +2 -2
  17. package/{build/_shared → _shared}/WithUtils.d.ts +1 -1
  18. package/{build/_shared → _shared}/hooks/useKeyboardPickerState.js +1 -1
  19. package/{build/_shared → _shared}/hooks/useUtils.d.ts +2 -2
  20. package/{build/dist → dist}/material-ui-pickers.esm.js +1187 -834
  21. package/dist/material-ui-pickers.esm.js.map +1 -0
  22. package/{build/dist → dist}/material-ui-pickers.js +1187 -834
  23. package/dist/material-ui-pickers.js.map +1 -0
  24. package/{build/dist → dist}/material-ui-pickers.umd.js +1178 -825
  25. package/dist/material-ui-pickers.umd.min.js +1 -0
  26. package/{build/index.d.ts → index.d.ts} +11 -11
  27. package/package.json +62 -135
  28. package/{build/typings → typings}/BasePicker.d.ts +1 -1
  29. package/{build/views → views}/Calendar/Calendar.js +1 -1
  30. package/{build/views → views}/Calendar/CalendarHeader.js +1 -1
  31. package/{build/views → views}/Clock/Clock.js +1 -1
  32. package/{build/views → views}/Clock/ClockNumbers.d.ts +2 -2
  33. package/{build/views → views}/Clock/ClockView.js +1 -1
  34. package/{build/views → views}/Month/MonthView.js +1 -1
  35. package/{build/views → views}/Year/YearView.js +2 -2
  36. package/.size-snapshot.json +0 -26
  37. package/9db1cba1a61cb58db53f38425bbd1f95.7z +0 -0
  38. package/build/_helpers/text-field-helper.d.ts +0 -32
  39. package/build/dist/material-ui-pickers.esm.js.map +0 -1
  40. package/build/dist/material-ui-pickers.js.map +0 -1
  41. package/build/dist/material-ui-pickers.umd.min.js +0 -1
  42. package/build/package.json +0 -62
  43. package/copy.js +0 -58
  44. package/remove-prop-types.js +0 -37
  45. package/rollup.config.js +0 -145
  46. package/src/DatePicker/DatePicker.tsx +0 -91
  47. package/src/DatePicker/DatePickerToolbar.tsx +0 -75
  48. package/src/DatePicker/index.ts +0 -7
  49. package/src/DateTimePicker/DateTimePicker.tsx +0 -72
  50. package/src/DateTimePicker/DateTimePickerTabs.tsx +0 -86
  51. package/src/DateTimePicker/DateTimePickerToolbar.tsx +0 -123
  52. package/src/DateTimePicker/index.ts +0 -7
  53. package/src/MuiPickersUtilsProvider.tsx +0 -39
  54. package/src/Picker/Picker.tsx +0 -275
  55. package/src/Picker/WrappedKeyboardPicker.tsx +0 -136
  56. package/src/Picker/WrappedPurePicker.tsx +0 -128
  57. package/src/Rifm/Rifm.ts +0 -213
  58. package/src/TimePicker/TimePicker.tsx +0 -67
  59. package/src/TimePicker/TimePickerToolbar.tsx +0 -180
  60. package/src/TimePicker/index.tsx +0 -7
  61. package/src/__tests__/DatePicker/Calendar.test.tsx +0 -51
  62. package/src/__tests__/DatePicker/Month.test.tsx +0 -36
  63. package/src/__tests__/DatePicker/MonthSelection.test.tsx +0 -37
  64. package/src/__tests__/MuiPickersUtilsProvider.test.tsx +0 -21
  65. package/src/__tests__/TimePicker/Clock.test.tsx +0 -68
  66. package/src/__tests__/_helpers/date-utils.test.tsx +0 -197
  67. package/src/__tests__/_helpers/text-field-helper.test.tsx +0 -34
  68. package/src/__tests__/_shared/ModalDialog.test.tsx +0 -109
  69. package/src/__tests__/e2e/DatePicker.test.tsx +0 -233
  70. package/src/__tests__/e2e/DatePickerProps.test.tsx +0 -18
  71. package/src/__tests__/e2e/DatePickerRoot.test.tsx +0 -154
  72. package/src/__tests__/e2e/DateTimePicker.test.tsx +0 -86
  73. package/src/__tests__/e2e/DateTimePickerRoot.test.tsx +0 -72
  74. package/src/__tests__/e2e/KeyboardDatePicker.test.tsx +0 -140
  75. package/src/__tests__/e2e/KeyboardDateTimePicker.test.tsx +0 -48
  76. package/src/__tests__/e2e/Theme.test.tsx +0 -30
  77. package/src/__tests__/e2e/TimePicker.test.tsx +0 -121
  78. package/src/__tests__/e2e/commands.tsx +0 -8
  79. package/src/__tests__/setup.js +0 -26
  80. package/src/__tests__/test-utils.tsx +0 -45
  81. package/src/__tests__/tsconfig.json +0 -5
  82. package/src/_helpers/date-utils.ts +0 -92
  83. package/src/_helpers/text-field-helper.ts +0 -239
  84. package/src/_helpers/time-utils.ts +0 -83
  85. package/src/_helpers/utils.ts +0 -8
  86. package/src/_shared/KeyboardDateInput.tsx +0 -161
  87. package/src/_shared/ModalDialog.tsx +0 -114
  88. package/src/_shared/PickerToolbar.tsx +0 -52
  89. package/src/_shared/PureDateInput.tsx +0 -45
  90. package/src/_shared/ToolbarButton.tsx +0 -63
  91. package/src/_shared/ToolbarText.tsx +0 -49
  92. package/src/_shared/WithUtils.tsx +0 -19
  93. package/src/_shared/hooks/useIsLandscape.tsx +0 -27
  94. package/src/_shared/hooks/useKeyDown.ts +0 -34
  95. package/src/_shared/hooks/useKeyboardPickerState.ts +0 -72
  96. package/src/_shared/hooks/useOpenState.ts +0 -22
  97. package/src/_shared/hooks/usePickerState.ts +0 -134
  98. package/src/_shared/hooks/useUtils.ts +0 -20
  99. package/src/_shared/hooks/useViews.tsx +0 -31
  100. package/src/_shared/icons/ArrowLeftIcon.tsx +0 -11
  101. package/src/_shared/icons/ArrowRightIcon.tsx +0 -11
  102. package/src/_shared/icons/DateRangeIcon.tsx +0 -11
  103. package/src/_shared/icons/KeyboardIcon.tsx +0 -11
  104. package/src/_shared/icons/TimeIcon.tsx +0 -12
  105. package/src/constants/ClockType.ts +0 -11
  106. package/src/constants/dimensions.ts +0 -5
  107. package/src/constants/prop-types.ts +0 -37
  108. package/src/index.ts +0 -48
  109. package/src/typings/BasePicker.tsx +0 -60
  110. package/src/typings/date.ts +0 -3
  111. package/src/typings/extendMui.ts +0 -10
  112. package/src/typings/overrides.ts +0 -44
  113. package/src/views/Calendar/Calendar.tsx +0 -361
  114. package/src/views/Calendar/CalendarHeader.tsx +0 -141
  115. package/src/views/Calendar/Day.tsx +0 -97
  116. package/src/views/Calendar/DayWrapper.tsx +0 -33
  117. package/src/views/Calendar/SlideTransition.tsx +0 -100
  118. package/src/views/Clock/Clock.tsx +0 -172
  119. package/src/views/Clock/ClockNumber.tsx +0 -91
  120. package/src/views/Clock/ClockNumbers.tsx +0 -76
  121. package/src/views/Clock/ClockPointer.tsx +0 -104
  122. package/src/views/Clock/ClockView.tsx +0 -105
  123. package/src/views/Month/Month.tsx +0 -76
  124. package/src/views/Month/MonthView.tsx +0 -94
  125. package/src/views/Year/Year.tsx +0 -77
  126. package/src/views/Year/YearView.tsx +0 -91
  127. package/src/wrappers/InlineWrapper.tsx +0 -80
  128. package/src/wrappers/ModalWrapper.tsx +0 -113
  129. package/src/wrappers/StaticWrapper.tsx +0 -22
  130. package/src/wrappers/Wrapper.tsx +0 -75
  131. package/tsconfig.json +0 -21
  132. package/typings.d.ts +0 -6
  133. /package/{build/DatePicker → DatePicker}/DatePicker.d.ts +0 -0
  134. /package/{build/DatePicker → DatePicker}/DatePicker.js +0 -0
  135. /package/{build/DatePicker → DatePicker}/DatePickerToolbar.d.ts +0 -0
  136. /package/{build/DatePicker → DatePicker}/index.d.ts +0 -0
  137. /package/{build/DatePicker → DatePicker}/index.js +0 -0
  138. /package/{build/DateTimePicker → DateTimePicker}/DateTimePickerTabs.d.ts +0 -0
  139. /package/{build/DateTimePicker → DateTimePicker}/DateTimePickerTabs.js +0 -0
  140. /package/{build/DateTimePicker → DateTimePicker}/DateTimePickerToolbar.d.ts +0 -0
  141. /package/{build/DateTimePicker → DateTimePicker}/index.d.ts +0 -0
  142. /package/{build/DateTimePicker → DateTimePicker}/index.js +0 -0
  143. /package/{build/MuiPickersUtilsProvider.js → MuiPickersUtilsProvider.js} +0 -0
  144. /package/{build/Picker → Picker}/WrappedKeyboardPicker.d.ts +0 -0
  145. /package/{build/Picker → Picker}/WrappedKeyboardPicker.js +0 -0
  146. /package/{build/Picker → Picker}/WrappedPurePicker.d.ts +0 -0
  147. /package/{build/README.md → README.md} +0 -0
  148. /package/{build/Rifm → Rifm}/Rifm.d.ts +0 -0
  149. /package/{build/Rifm → Rifm}/Rifm.js +0 -0
  150. /package/{build/TimePicker → TimePicker}/TimePickerToolbar.d.ts +0 -0
  151. /package/{build/TimePicker → TimePicker}/index.d.ts +0 -0
  152. /package/{build/TimePicker → TimePicker}/index.js +0 -0
  153. /package/{build/_helpers → _helpers}/time-utils.js +0 -0
  154. /package/{build/_helpers → _helpers}/utils.d.ts +0 -0
  155. /package/{build/_helpers → _helpers}/utils.js +0 -0
  156. /package/{build/_shared → _shared}/KeyboardDateInput.d.ts +0 -0
  157. /package/{build/_shared → _shared}/KeyboardDateInput.js +0 -0
  158. /package/{build/_shared → _shared}/ModalDialog.d.ts +0 -0
  159. /package/{build/_shared → _shared}/ModalDialog.js +0 -0
  160. /package/{build/_shared → _shared}/PickerToolbar.d.ts +0 -0
  161. /package/{build/_shared → _shared}/PickerToolbar.js +0 -0
  162. /package/{build/_shared → _shared}/PureDateInput.d.ts +0 -0
  163. /package/{build/_shared → _shared}/PureDateInput.js +0 -0
  164. /package/{build/_shared → _shared}/ToolbarButton.d.ts +0 -0
  165. /package/{build/_shared → _shared}/ToolbarButton.js +0 -0
  166. /package/{build/_shared → _shared}/ToolbarText.d.ts +0 -0
  167. /package/{build/_shared → _shared}/ToolbarText.js +0 -0
  168. /package/{build/_shared → _shared}/WithUtils.js +0 -0
  169. /package/{build/_shared → _shared}/hooks/useIsLandscape.d.ts +0 -0
  170. /package/{build/_shared → _shared}/hooks/useIsLandscape.js +0 -0
  171. /package/{build/_shared → _shared}/hooks/useKeyDown.d.ts +0 -0
  172. /package/{build/_shared → _shared}/hooks/useKeyDown.js +0 -0
  173. /package/{build/_shared → _shared}/hooks/useKeyboardPickerState.d.ts +0 -0
  174. /package/{build/_shared → _shared}/hooks/useOpenState.d.ts +0 -0
  175. /package/{build/_shared → _shared}/hooks/useOpenState.js +0 -0
  176. /package/{build/_shared → _shared}/hooks/usePickerState.d.ts +0 -0
  177. /package/{build/_shared → _shared}/hooks/usePickerState.js +0 -0
  178. /package/{build/_shared → _shared}/hooks/useUtils.js +0 -0
  179. /package/{build/_shared → _shared}/hooks/useViews.d.ts +0 -0
  180. /package/{build/_shared → _shared}/hooks/useViews.js +0 -0
  181. /package/{build/_shared → _shared}/icons/ArrowLeftIcon.d.ts +0 -0
  182. /package/{build/_shared → _shared}/icons/ArrowLeftIcon.js +0 -0
  183. /package/{build/_shared → _shared}/icons/ArrowRightIcon.d.ts +0 -0
  184. /package/{build/_shared → _shared}/icons/ArrowRightIcon.js +0 -0
  185. /package/{build/_shared → _shared}/icons/DateRangeIcon.d.ts +0 -0
  186. /package/{build/_shared → _shared}/icons/DateRangeIcon.js +0 -0
  187. /package/{build/_shared → _shared}/icons/KeyboardIcon.d.ts +0 -0
  188. /package/{build/_shared → _shared}/icons/KeyboardIcon.js +0 -0
  189. /package/{build/_shared → _shared}/icons/TimeIcon.d.ts +0 -0
  190. /package/{build/_shared → _shared}/icons/TimeIcon.js +0 -0
  191. /package/{build/constants → constants}/ClockType.d.ts +0 -0
  192. /package/{build/constants → constants}/ClockType.js +0 -0
  193. /package/{build/constants → constants}/dimensions.d.ts +0 -0
  194. /package/{build/constants → constants}/dimensions.js +0 -0
  195. /package/{build/constants → constants}/prop-types.d.ts +0 -0
  196. /package/{build/constants → constants}/prop-types.js +0 -0
  197. /package/{build/index.js → index.js} +0 -0
  198. /package/{build/typings → typings}/BasePicker.js +0 -0
  199. /package/{build/typings → typings}/date.d.ts +0 -0
  200. /package/{build/typings → typings}/date.js +0 -0
  201. /package/{build/typings → typings}/extendMui.d.ts +0 -0
  202. /package/{build/typings → typings}/extendMui.js +0 -0
  203. /package/{build/typings → typings}/overrides.d.ts +0 -0
  204. /package/{build/typings → typings}/overrides.js +0 -0
  205. /package/{build/views → views}/Calendar/Calendar.d.ts +0 -0
  206. /package/{build/views → views}/Calendar/CalendarHeader.d.ts +0 -0
  207. /package/{build/views → views}/Calendar/Day.d.ts +0 -0
  208. /package/{build/views → views}/Calendar/Day.js +0 -0
  209. /package/{build/views → views}/Calendar/DayWrapper.d.ts +0 -0
  210. /package/{build/views → views}/Calendar/DayWrapper.js +0 -0
  211. /package/{build/views → views}/Calendar/SlideTransition.d.ts +0 -0
  212. /package/{build/views → views}/Calendar/SlideTransition.js +0 -0
  213. /package/{build/views → views}/Clock/Clock.d.ts +0 -0
  214. /package/{build/views → views}/Clock/ClockNumber.d.ts +0 -0
  215. /package/{build/views → views}/Clock/ClockNumber.js +0 -0
  216. /package/{build/views → views}/Clock/ClockNumbers.js +0 -0
  217. /package/{build/views → views}/Clock/ClockPointer.d.ts +0 -0
  218. /package/{build/views → views}/Clock/ClockPointer.js +0 -0
  219. /package/{build/views → views}/Clock/ClockView.d.ts +0 -0
  220. /package/{build/views → views}/Month/Month.d.ts +0 -0
  221. /package/{build/views → views}/Month/Month.js +0 -0
  222. /package/{build/views → views}/Month/MonthView.d.ts +0 -0
  223. /package/{build/views → views}/Year/Year.d.ts +0 -0
  224. /package/{build/views → views}/Year/Year.js +0 -0
  225. /package/{build/views → views}/Year/YearView.d.ts +0 -0
  226. /package/{build/wrappers → wrappers}/InlineWrapper.d.ts +0 -0
  227. /package/{build/wrappers → wrappers}/InlineWrapper.js +0 -0
  228. /package/{build/wrappers → wrappers}/ModalWrapper.d.ts +0 -0
  229. /package/{build/wrappers → wrappers}/ModalWrapper.js +0 -0
  230. /package/{build/wrappers → wrappers}/StaticWrapper.d.ts +0 -0
  231. /package/{build/wrappers → wrappers}/StaticWrapper.js +0 -0
  232. /package/{build/wrappers → wrappers}/Wrapper.d.ts +0 -0
  233. /package/{build/wrappers → wrappers}/Wrapper.js +0 -0
@@ -1,113 +0,0 @@
1
- import * as React from 'react';
2
- import * as PropTypes from 'prop-types';
3
- import ModalDialog from '../_shared/ModalDialog';
4
- import { Omit } from '@material-ui/core';
5
- import { WrapperProps } from './Wrapper';
6
- import { useKeyDown } from '../_shared/hooks/useKeyDown';
7
- import { DialogProps as MuiDialogProps } from '@material-ui/core/Dialog';
8
-
9
- export interface ModalWrapperProps<T = {}> extends WrapperProps<T> {
10
- /**
11
- * "OK" label message
12
- * @default "OK"
13
- */
14
- okLabel?: React.ReactNode;
15
- /**
16
- * "CANCEL" label message
17
- * @default "CANCEL"
18
- */
19
- cancelLabel?: React.ReactNode;
20
- /**
21
- * "CLEAR" label message
22
- * @default "CLEAR"
23
- */
24
- clearLabel?: React.ReactNode;
25
- /**
26
- * "TODAY" label message
27
- * @default "TODAY"
28
- */
29
- todayLabel?: React.ReactNode;
30
- /**
31
- * If true today button will be displayed <b>Note*</b> that clear button has higher priority
32
- * @default false
33
- */
34
- showTodayButton?: boolean;
35
- /**
36
- * Show clear action in picker dialog
37
- * @default false
38
- */
39
- clearable?: boolean;
40
- /**
41
- * Props to be passed directly to material-ui Dialog
42
- * @type {Partial<MuiDialogProps>}
43
- */
44
- DialogProps?: Partial<Omit<MuiDialogProps, 'classes'>>;
45
- }
46
-
47
- export const ModalWrapper: React.FC<ModalWrapperProps<any>> = ({
48
- open,
49
- children,
50
- okLabel,
51
- cancelLabel,
52
- clearLabel,
53
- todayLabel,
54
- showTodayButton,
55
- clearable,
56
- DialogProps,
57
- showTabs,
58
- wider,
59
- InputComponent,
60
- DateInputProps,
61
- onClear,
62
- onAccept,
63
- onDismiss,
64
- onSetToday,
65
- ...other
66
- }) => {
67
- useKeyDown(open, {
68
- Enter: onAccept,
69
- });
70
-
71
- return (
72
- <React.Fragment>
73
- <InputComponent {...other} {...DateInputProps} />
74
-
75
- <ModalDialog
76
- wider={wider}
77
- showTabs={showTabs}
78
- open={open}
79
- onClear={onClear}
80
- onAccept={onAccept}
81
- onDismiss={onDismiss}
82
- onSetToday={onSetToday}
83
- clearLabel={clearLabel}
84
- todayLabel={todayLabel}
85
- okLabel={okLabel}
86
- cancelLabel={cancelLabel}
87
- clearable={clearable}
88
- showTodayButton={showTodayButton}
89
- children={children}
90
- {...DialogProps}
91
- />
92
- </React.Fragment>
93
- );
94
- };
95
-
96
- ModalWrapper.propTypes = {
97
- okLabel: PropTypes.node,
98
- cancelLabel: PropTypes.node,
99
- clearLabel: PropTypes.node,
100
- clearable: PropTypes.bool,
101
- todayLabel: PropTypes.node,
102
- showTodayButton: PropTypes.bool,
103
- DialogProps: PropTypes.object,
104
- } as any;
105
-
106
- ModalWrapper.defaultProps = {
107
- okLabel: 'OK',
108
- cancelLabel: 'Cancel',
109
- clearLabel: 'Clear',
110
- todayLabel: 'Today',
111
- clearable: false,
112
- showTodayButton: false,
113
- };
@@ -1,22 +0,0 @@
1
- import * as React from 'react';
2
- import { makeStyles } from '@material-ui/core';
3
- import { DIALOG_WIDTH } from '../constants/dimensions';
4
-
5
- const useStyles = makeStyles(
6
- theme => ({
7
- staticWrapperRoot: {
8
- overflow: 'hidden',
9
- minWidth: DIALOG_WIDTH,
10
- display: 'flex',
11
- flexDirection: 'column',
12
- backgroundColor: theme.palette.background.paper,
13
- },
14
- }),
15
- { name: 'MuiPickersStaticWrapper' }
16
- );
17
-
18
- export const StaticWrapper: React.FC = ({ children }) => {
19
- const classes = useStyles();
20
-
21
- return <div className={classes.staticWrapperRoot} children={children} />;
22
- };
@@ -1,75 +0,0 @@
1
- import * as React from 'react';
2
- import { Omit } from '@material-ui/core';
3
- import { StaticWrapper } from './StaticWrapper';
4
- import { PureDateInputProps } from '../_shared/PureDateInput';
5
- import { ModalWrapper, ModalWrapperProps } from './ModalWrapper';
6
- import { InlineWrapper, InlineWrapperProps } from './InlineWrapper';
7
- import { KeyboardDateInputProps } from '../_shared/KeyboardDateInput';
8
-
9
- export type WrapperVariant = 'dialog' | 'inline' | 'static';
10
-
11
- export interface WrapperProps<T> {
12
- open: boolean;
13
- onAccept: () => void;
14
- onDismiss: () => void;
15
- onClear: () => void;
16
- onSetToday: () => void;
17
- InputComponent: React.FC<T>;
18
- DateInputProps: T;
19
- wider?: boolean;
20
- showTabs?: boolean;
21
- }
22
-
23
- type OmitInnerWrapperProps<T extends WrapperProps<any>> = Omit<
24
- T,
25
- keyof WrapperProps<any> | 'showTabs'
26
- >;
27
-
28
- export type ModalRoot = OmitInnerWrapperProps<ModalWrapperProps>;
29
-
30
- export type InlineRoot = OmitInnerWrapperProps<InlineWrapperProps>;
31
-
32
- // prettier-ignore
33
- export type ExtendWrapper<TInput extends PureDateInputProps | KeyboardDateInputProps> = {
34
- /**
35
- * Picker container option
36
- * @default 'dialog'
37
- */
38
- variant?: WrapperVariant
39
- } & ModalRoot
40
- & InlineRoot
41
- & Omit<TInput, 'inputValue' | 'onChange' | 'format' | 'validationError' | 'format' | 'forwardedRef'>
42
-
43
- export function getWrapperFromVariant<T>(
44
- variant?: WrapperVariant
45
- ): React.ComponentType<InlineWrapperProps<T> | ModalWrapperProps<T>> {
46
- switch (variant) {
47
- case 'inline':
48
- return InlineWrapper as any;
49
-
50
- case 'static':
51
- return StaticWrapper as any;
52
-
53
- default:
54
- return ModalWrapper as any;
55
- }
56
- }
57
-
58
- type Props<T> = {
59
- variant?: WrapperVariant;
60
- children?: React.ReactChild;
61
- } & (ModalWrapperProps<T> | InlineWrapperProps<T>);
62
-
63
- export const VariantContext = React.createContext<WrapperVariant | null>(null);
64
-
65
- export const Wrapper: <T extends KeyboardDateInputProps | PureDateInputProps>(
66
- p: Props<T>
67
- ) => React.ReactElement<Props<T>> = ({ variant, ...props }) => {
68
- const Component = getWrapperFromVariant<typeof props.DateInputProps>(variant);
69
-
70
- return (
71
- <VariantContext.Provider value={variant || 'dialog'}>
72
- <Component {...props} />
73
- </VariantContext.Provider>
74
- );
75
- };
package/tsconfig.json DELETED
@@ -1,21 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "module": "commonjs",
4
- "outDir": "build",
5
- "declaration": true,
6
- "target": "es5",
7
- "lib": ["dom", "es2016"],
8
- "skipLibCheck": true,
9
- "jsx": "react",
10
- "moduleResolution": "node",
11
- "noImplicitAny": true,
12
- "strict": true,
13
- "allowSyntheticDefaultImports": true,
14
- "forceConsistentCasingInFileNames": true,
15
- "esModuleInterop": true,
16
- "suppressImplicitAnyIndexErrors": true,
17
- "resolveJsonModule": true
18
- },
19
- "include": ["src/**/*.ts*", "typings.d.ts"],
20
- "exclude": ["./src/__tests__/**/*", "build"]
21
- }
package/typings.d.ts DELETED
@@ -1,6 +0,0 @@
1
- declare module '@date-io/type' {
2
- import { Moment } from 'moment';
3
- import { DateTime } from 'luxon';
4
-
5
- export type DateType = Moment | DateTime | Date;
6
- }
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes