@docsvision/material-ui-pickers 3.2.0-beta.26 → 3.2.0-beta.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +62 -135
- package/.size-snapshot.json +0 -26
- package/9db1cba1a61cb58db53f38425bbd1f95.7z +0 -0
- package/build/package.json +0 -62
- package/copy.js +0 -58
- package/remove-prop-types.js +0 -37
- package/rollup.config.js +0 -145
- package/src/DatePicker/DatePicker.tsx +0 -91
- package/src/DatePicker/DatePickerToolbar.tsx +0 -75
- package/src/DatePicker/index.ts +0 -7
- package/src/DateTimePicker/DateTimePicker.tsx +0 -72
- package/src/DateTimePicker/DateTimePickerTabs.tsx +0 -86
- package/src/DateTimePicker/DateTimePickerToolbar.tsx +0 -123
- package/src/DateTimePicker/index.ts +0 -7
- package/src/MuiPickersUtilsProvider.tsx +0 -39
- package/src/Picker/Picker.tsx +0 -275
- package/src/Picker/WrappedKeyboardPicker.tsx +0 -136
- package/src/Picker/WrappedPurePicker.tsx +0 -128
- package/src/Rifm/Rifm.ts +0 -213
- package/src/TimePicker/TimePicker.tsx +0 -67
- package/src/TimePicker/TimePickerToolbar.tsx +0 -180
- package/src/TimePicker/index.tsx +0 -7
- package/src/__tests__/DatePicker/Calendar.test.tsx +0 -51
- package/src/__tests__/DatePicker/Month.test.tsx +0 -36
- package/src/__tests__/DatePicker/MonthSelection.test.tsx +0 -37
- package/src/__tests__/MuiPickersUtilsProvider.test.tsx +0 -21
- package/src/__tests__/TimePicker/Clock.test.tsx +0 -68
- package/src/__tests__/_helpers/date-utils.test.tsx +0 -197
- package/src/__tests__/_helpers/text-field-helper.test.tsx +0 -34
- package/src/__tests__/_shared/ModalDialog.test.tsx +0 -109
- package/src/__tests__/e2e/DatePicker.test.tsx +0 -233
- package/src/__tests__/e2e/DatePickerProps.test.tsx +0 -18
- package/src/__tests__/e2e/DatePickerRoot.test.tsx +0 -154
- package/src/__tests__/e2e/DateTimePicker.test.tsx +0 -86
- package/src/__tests__/e2e/DateTimePickerRoot.test.tsx +0 -72
- package/src/__tests__/e2e/KeyboardDatePicker.test.tsx +0 -140
- package/src/__tests__/e2e/KeyboardDateTimePicker.test.tsx +0 -48
- package/src/__tests__/e2e/Theme.test.tsx +0 -30
- package/src/__tests__/e2e/TimePicker.test.tsx +0 -121
- package/src/__tests__/e2e/commands.tsx +0 -8
- package/src/__tests__/setup.js +0 -26
- package/src/__tests__/test-utils.tsx +0 -45
- package/src/__tests__/tsconfig.json +0 -5
- package/src/_helpers/date-utils.ts +0 -92
- package/src/_helpers/text-field-helper.ts +0 -239
- package/src/_helpers/time-utils.ts +0 -83
- package/src/_helpers/utils.ts +0 -8
- package/src/_shared/KeyboardDateInput.tsx +0 -161
- package/src/_shared/ModalDialog.tsx +0 -114
- package/src/_shared/PickerToolbar.tsx +0 -52
- package/src/_shared/PureDateInput.tsx +0 -45
- package/src/_shared/ToolbarButton.tsx +0 -63
- package/src/_shared/ToolbarText.tsx +0 -49
- package/src/_shared/WithUtils.tsx +0 -19
- package/src/_shared/hooks/useIsLandscape.tsx +0 -27
- package/src/_shared/hooks/useKeyDown.ts +0 -34
- package/src/_shared/hooks/useKeyboardPickerState.ts +0 -72
- package/src/_shared/hooks/useOpenState.ts +0 -22
- package/src/_shared/hooks/usePickerState.ts +0 -134
- package/src/_shared/hooks/useUtils.ts +0 -20
- package/src/_shared/hooks/useViews.tsx +0 -31
- package/src/_shared/icons/ArrowLeftIcon.tsx +0 -11
- package/src/_shared/icons/ArrowRightIcon.tsx +0 -11
- package/src/_shared/icons/DateRangeIcon.tsx +0 -11
- package/src/_shared/icons/KeyboardIcon.tsx +0 -11
- package/src/_shared/icons/TimeIcon.tsx +0 -12
- package/src/constants/ClockType.ts +0 -11
- package/src/constants/dimensions.ts +0 -5
- package/src/constants/prop-types.ts +0 -37
- package/src/index.ts +0 -48
- package/src/typings/BasePicker.tsx +0 -60
- package/src/typings/date.ts +0 -3
- package/src/typings/extendMui.ts +0 -10
- package/src/typings/overrides.ts +0 -44
- package/src/views/Calendar/Calendar.tsx +0 -361
- package/src/views/Calendar/CalendarHeader.tsx +0 -141
- package/src/views/Calendar/Day.tsx +0 -97
- package/src/views/Calendar/DayWrapper.tsx +0 -33
- package/src/views/Calendar/SlideTransition.tsx +0 -100
- package/src/views/Clock/Clock.tsx +0 -172
- package/src/views/Clock/ClockNumber.tsx +0 -91
- package/src/views/Clock/ClockNumbers.tsx +0 -76
- package/src/views/Clock/ClockPointer.tsx +0 -104
- package/src/views/Clock/ClockView.tsx +0 -105
- package/src/views/Month/Month.tsx +0 -76
- package/src/views/Month/MonthView.tsx +0 -94
- package/src/views/Year/Year.tsx +0 -77
- package/src/views/Year/YearView.tsx +0 -91
- package/src/wrappers/InlineWrapper.tsx +0 -80
- package/src/wrappers/ModalWrapper.tsx +0 -113
- package/src/wrappers/StaticWrapper.tsx +0 -22
- package/src/wrappers/Wrapper.tsx +0 -75
- package/tsconfig.json +0 -21
- package/typings.d.ts +0 -6
- /package/{build/DatePicker → DatePicker}/DatePicker.d.ts +0 -0
- /package/{build/DatePicker → DatePicker}/DatePicker.js +0 -0
- /package/{build/DatePicker → DatePicker}/DatePickerToolbar.d.ts +0 -0
- /package/{build/DatePicker → DatePicker}/DatePickerToolbar.js +0 -0
- /package/{build/DatePicker → DatePicker}/index.d.ts +0 -0
- /package/{build/DatePicker → DatePicker}/index.js +0 -0
- /package/{build/DateTimePicker → DateTimePicker}/DateTimePicker.d.ts +0 -0
- /package/{build/DateTimePicker → DateTimePicker}/DateTimePicker.js +0 -0
- /package/{build/DateTimePicker → DateTimePicker}/DateTimePickerTabs.d.ts +0 -0
- /package/{build/DateTimePicker → DateTimePicker}/DateTimePickerTabs.js +0 -0
- /package/{build/DateTimePicker → DateTimePicker}/DateTimePickerToolbar.d.ts +0 -0
- /package/{build/DateTimePicker → DateTimePicker}/DateTimePickerToolbar.js +0 -0
- /package/{build/DateTimePicker → DateTimePicker}/index.d.ts +0 -0
- /package/{build/DateTimePicker → DateTimePicker}/index.js +0 -0
- /package/{build/MuiPickersUtilsProvider.d.ts → MuiPickersUtilsProvider.d.ts} +0 -0
- /package/{build/MuiPickersUtilsProvider.js → MuiPickersUtilsProvider.js} +0 -0
- /package/{build/Picker → Picker}/Picker.d.ts +0 -0
- /package/{build/Picker → Picker}/Picker.js +0 -0
- /package/{build/Picker → Picker}/WrappedKeyboardPicker.d.ts +0 -0
- /package/{build/Picker → Picker}/WrappedKeyboardPicker.js +0 -0
- /package/{build/Picker → Picker}/WrappedPurePicker.d.ts +0 -0
- /package/{build/Picker → Picker}/WrappedPurePicker.js +0 -0
- /package/{build/README.md → README.md} +0 -0
- /package/{build/Rifm → Rifm}/Rifm.d.ts +0 -0
- /package/{build/Rifm → Rifm}/Rifm.js +0 -0
- /package/{build/TimePicker → TimePicker}/TimePicker.d.ts +0 -0
- /package/{build/TimePicker → TimePicker}/TimePicker.js +0 -0
- /package/{build/TimePicker → TimePicker}/TimePickerToolbar.d.ts +0 -0
- /package/{build/TimePicker → TimePicker}/TimePickerToolbar.js +0 -0
- /package/{build/TimePicker → TimePicker}/index.d.ts +0 -0
- /package/{build/TimePicker → TimePicker}/index.js +0 -0
- /package/{build/_helpers → _helpers}/date-utils.d.ts +0 -0
- /package/{build/_helpers → _helpers}/date-utils.js +0 -0
- /package/{build/_helpers → _helpers}/text-field-helper.d.ts +0 -0
- /package/{build/_helpers → _helpers}/text-field-helper.js +0 -0
- /package/{build/_helpers → _helpers}/time-utils.d.ts +0 -0
- /package/{build/_helpers → _helpers}/time-utils.js +0 -0
- /package/{build/_helpers → _helpers}/utils.d.ts +0 -0
- /package/{build/_helpers → _helpers}/utils.js +0 -0
- /package/{build/_shared → _shared}/KeyboardDateInput.d.ts +0 -0
- /package/{build/_shared → _shared}/KeyboardDateInput.js +0 -0
- /package/{build/_shared → _shared}/ModalDialog.d.ts +0 -0
- /package/{build/_shared → _shared}/ModalDialog.js +0 -0
- /package/{build/_shared → _shared}/PickerToolbar.d.ts +0 -0
- /package/{build/_shared → _shared}/PickerToolbar.js +0 -0
- /package/{build/_shared → _shared}/PureDateInput.d.ts +0 -0
- /package/{build/_shared → _shared}/PureDateInput.js +0 -0
- /package/{build/_shared → _shared}/ToolbarButton.d.ts +0 -0
- /package/{build/_shared → _shared}/ToolbarButton.js +0 -0
- /package/{build/_shared → _shared}/ToolbarText.d.ts +0 -0
- /package/{build/_shared → _shared}/ToolbarText.js +0 -0
- /package/{build/_shared → _shared}/WithUtils.d.ts +0 -0
- /package/{build/_shared → _shared}/WithUtils.js +0 -0
- /package/{build/_shared → _shared}/hooks/useIsLandscape.d.ts +0 -0
- /package/{build/_shared → _shared}/hooks/useIsLandscape.js +0 -0
- /package/{build/_shared → _shared}/hooks/useKeyDown.d.ts +0 -0
- /package/{build/_shared → _shared}/hooks/useKeyDown.js +0 -0
- /package/{build/_shared → _shared}/hooks/useKeyboardPickerState.d.ts +0 -0
- /package/{build/_shared → _shared}/hooks/useKeyboardPickerState.js +0 -0
- /package/{build/_shared → _shared}/hooks/useOpenState.d.ts +0 -0
- /package/{build/_shared → _shared}/hooks/useOpenState.js +0 -0
- /package/{build/_shared → _shared}/hooks/usePickerState.d.ts +0 -0
- /package/{build/_shared → _shared}/hooks/usePickerState.js +0 -0
- /package/{build/_shared → _shared}/hooks/useUtils.d.ts +0 -0
- /package/{build/_shared → _shared}/hooks/useUtils.js +0 -0
- /package/{build/_shared → _shared}/hooks/useViews.d.ts +0 -0
- /package/{build/_shared → _shared}/hooks/useViews.js +0 -0
- /package/{build/_shared → _shared}/icons/ArrowLeftIcon.d.ts +0 -0
- /package/{build/_shared → _shared}/icons/ArrowLeftIcon.js +0 -0
- /package/{build/_shared → _shared}/icons/ArrowRightIcon.d.ts +0 -0
- /package/{build/_shared → _shared}/icons/ArrowRightIcon.js +0 -0
- /package/{build/_shared → _shared}/icons/DateRangeIcon.d.ts +0 -0
- /package/{build/_shared → _shared}/icons/DateRangeIcon.js +0 -0
- /package/{build/_shared → _shared}/icons/KeyboardIcon.d.ts +0 -0
- /package/{build/_shared → _shared}/icons/KeyboardIcon.js +0 -0
- /package/{build/_shared → _shared}/icons/TimeIcon.d.ts +0 -0
- /package/{build/_shared → _shared}/icons/TimeIcon.js +0 -0
- /package/{build/constants → constants}/ClockType.d.ts +0 -0
- /package/{build/constants → constants}/ClockType.js +0 -0
- /package/{build/constants → constants}/dimensions.d.ts +0 -0
- /package/{build/constants → constants}/dimensions.js +0 -0
- /package/{build/constants → constants}/prop-types.d.ts +0 -0
- /package/{build/constants → constants}/prop-types.js +0 -0
- /package/{build/dist → dist}/material-ui-pickers.esm.js +0 -0
- /package/{build/dist → dist}/material-ui-pickers.esm.js.map +0 -0
- /package/{build/dist → dist}/material-ui-pickers.js +0 -0
- /package/{build/dist → dist}/material-ui-pickers.js.map +0 -0
- /package/{build/dist → dist}/material-ui-pickers.umd.js +0 -0
- /package/{build/dist → dist}/material-ui-pickers.umd.min.js +0 -0
- /package/{build/index.d.ts → index.d.ts} +0 -0
- /package/{build/index.js → index.js} +0 -0
- /package/{build/typings → typings}/BasePicker.d.ts +0 -0
- /package/{build/typings → typings}/BasePicker.js +0 -0
- /package/{build/typings → typings}/date.d.ts +0 -0
- /package/{build/typings → typings}/date.js +0 -0
- /package/{build/typings → typings}/extendMui.d.ts +0 -0
- /package/{build/typings → typings}/extendMui.js +0 -0
- /package/{build/typings → typings}/overrides.d.ts +0 -0
- /package/{build/typings → typings}/overrides.js +0 -0
- /package/{build/views → views}/Calendar/Calendar.d.ts +0 -0
- /package/{build/views → views}/Calendar/Calendar.js +0 -0
- /package/{build/views → views}/Calendar/CalendarHeader.d.ts +0 -0
- /package/{build/views → views}/Calendar/CalendarHeader.js +0 -0
- /package/{build/views → views}/Calendar/Day.d.ts +0 -0
- /package/{build/views → views}/Calendar/Day.js +0 -0
- /package/{build/views → views}/Calendar/DayWrapper.d.ts +0 -0
- /package/{build/views → views}/Calendar/DayWrapper.js +0 -0
- /package/{build/views → views}/Calendar/SlideTransition.d.ts +0 -0
- /package/{build/views → views}/Calendar/SlideTransition.js +0 -0
- /package/{build/views → views}/Clock/Clock.d.ts +0 -0
- /package/{build/views → views}/Clock/Clock.js +0 -0
- /package/{build/views → views}/Clock/ClockNumber.d.ts +0 -0
- /package/{build/views → views}/Clock/ClockNumber.js +0 -0
- /package/{build/views → views}/Clock/ClockNumbers.d.ts +0 -0
- /package/{build/views → views}/Clock/ClockNumbers.js +0 -0
- /package/{build/views → views}/Clock/ClockPointer.d.ts +0 -0
- /package/{build/views → views}/Clock/ClockPointer.js +0 -0
- /package/{build/views → views}/Clock/ClockView.d.ts +0 -0
- /package/{build/views → views}/Clock/ClockView.js +0 -0
- /package/{build/views → views}/Month/Month.d.ts +0 -0
- /package/{build/views → views}/Month/Month.js +0 -0
- /package/{build/views → views}/Month/MonthView.d.ts +0 -0
- /package/{build/views → views}/Month/MonthView.js +0 -0
- /package/{build/views → views}/Year/Year.d.ts +0 -0
- /package/{build/views → views}/Year/Year.js +0 -0
- /package/{build/views → views}/Year/YearView.d.ts +0 -0
- /package/{build/views → views}/Year/YearView.js +0 -0
- /package/{build/wrappers → wrappers}/InlineWrapper.d.ts +0 -0
- /package/{build/wrappers → wrappers}/InlineWrapper.js +0 -0
- /package/{build/wrappers → wrappers}/ModalWrapper.d.ts +0 -0
- /package/{build/wrappers → wrappers}/ModalWrapper.js +0 -0
- /package/{build/wrappers → wrappers}/StaticWrapper.d.ts +0 -0
- /package/{build/wrappers → wrappers}/StaticWrapper.js +0 -0
- /package/{build/wrappers → wrappers}/Wrapper.d.ts +0 -0
- /package/{build/wrappers → wrappers}/Wrapper.js +0 -0
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import * as PropTypes from 'prop-types';
|
|
3
|
-
import Clock from './Clock';
|
|
4
|
-
import ClockType, { ClockViewType } from '../../constants/ClockType';
|
|
5
|
-
import { useUtils } from '../../_shared/hooks/useUtils';
|
|
6
|
-
import { MaterialUiPickersDate } from '../../typings/date';
|
|
7
|
-
import { getHourNumbers, getMinutesNumbers } from './ClockNumbers';
|
|
8
|
-
import { convertToMeridiem, getMeridiem } from '../../_helpers/time-utils';
|
|
9
|
-
|
|
10
|
-
export interface TimePickerViewProps {
|
|
11
|
-
/** TimePicker value */
|
|
12
|
-
date: MaterialUiPickersDate;
|
|
13
|
-
/** Clock type */
|
|
14
|
-
type: ClockViewType;
|
|
15
|
-
/** 12h/24h clock mode */
|
|
16
|
-
ampm?: boolean;
|
|
17
|
-
/** Minutes step */
|
|
18
|
-
minutesStep?: number;
|
|
19
|
-
/** On hour change */
|
|
20
|
-
onHourChange: (date: MaterialUiPickersDate, isFinish?: boolean) => void;
|
|
21
|
-
/** On minutes change */
|
|
22
|
-
onMinutesChange: (date: MaterialUiPickersDate, isFinish?: boolean) => void;
|
|
23
|
-
/** On seconds change */
|
|
24
|
-
onSecondsChange: (date: MaterialUiPickersDate, isFinish?: boolean) => void;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export const TimePickerView: React.FC<TimePickerViewProps> = ({
|
|
28
|
-
type,
|
|
29
|
-
onHourChange,
|
|
30
|
-
onMinutesChange,
|
|
31
|
-
onSecondsChange,
|
|
32
|
-
ampm,
|
|
33
|
-
date,
|
|
34
|
-
minutesStep,
|
|
35
|
-
}) => {
|
|
36
|
-
const utils = useUtils();
|
|
37
|
-
const viewProps = React.useMemo(() => {
|
|
38
|
-
switch (type) {
|
|
39
|
-
case ClockType.HOURS:
|
|
40
|
-
return {
|
|
41
|
-
value: utils.getHours(date),
|
|
42
|
-
children: getHourNumbers({ date, utils, ampm: Boolean(ampm) }),
|
|
43
|
-
onChange: (value: number, isFinish?: boolean) => {
|
|
44
|
-
const currentMeridiem = getMeridiem(date, utils);
|
|
45
|
-
const updatedTimeWithMeridiem = convertToMeridiem(
|
|
46
|
-
utils.setHours(date, value),
|
|
47
|
-
currentMeridiem,
|
|
48
|
-
Boolean(ampm),
|
|
49
|
-
utils
|
|
50
|
-
);
|
|
51
|
-
|
|
52
|
-
onHourChange(updatedTimeWithMeridiem, isFinish);
|
|
53
|
-
},
|
|
54
|
-
};
|
|
55
|
-
|
|
56
|
-
case ClockType.MINUTES:
|
|
57
|
-
const minutesValue = utils.getMinutes(date);
|
|
58
|
-
return {
|
|
59
|
-
value: minutesValue,
|
|
60
|
-
children: getMinutesNumbers({ value: minutesValue, utils }),
|
|
61
|
-
onChange: (value: number, isFinish?: boolean) => {
|
|
62
|
-
const updatedTime = utils.setMinutes(date, value);
|
|
63
|
-
|
|
64
|
-
onMinutesChange(updatedTime, isFinish);
|
|
65
|
-
},
|
|
66
|
-
};
|
|
67
|
-
|
|
68
|
-
case ClockType.SECONDS:
|
|
69
|
-
const secondsValue = utils.getSeconds(date);
|
|
70
|
-
return {
|
|
71
|
-
value: secondsValue,
|
|
72
|
-
children: getMinutesNumbers({ value: secondsValue, utils }),
|
|
73
|
-
onChange: (value: number, isFinish?: boolean) => {
|
|
74
|
-
const updatedTime = utils.setSeconds(date, value);
|
|
75
|
-
|
|
76
|
-
onSecondsChange(updatedTime, isFinish);
|
|
77
|
-
},
|
|
78
|
-
};
|
|
79
|
-
|
|
80
|
-
default:
|
|
81
|
-
throw new Error('You must provide the type for TimePickerView');
|
|
82
|
-
}
|
|
83
|
-
}, [ampm, date, onHourChange, onMinutesChange, onSecondsChange, type, utils]);
|
|
84
|
-
|
|
85
|
-
return <Clock type={type} ampm={ampm} minutesStep={minutesStep} {...viewProps} />;
|
|
86
|
-
};
|
|
87
|
-
|
|
88
|
-
TimePickerView.displayName = 'TimePickerView';
|
|
89
|
-
|
|
90
|
-
TimePickerView.propTypes = {
|
|
91
|
-
date: PropTypes.object.isRequired,
|
|
92
|
-
onHourChange: PropTypes.func.isRequired,
|
|
93
|
-
onMinutesChange: PropTypes.func.isRequired,
|
|
94
|
-
onSecondsChange: PropTypes.func.isRequired,
|
|
95
|
-
ampm: PropTypes.bool,
|
|
96
|
-
minutesStep: PropTypes.number,
|
|
97
|
-
type: PropTypes.oneOf(Object.keys(ClockType).map(key => ClockType[key as any])).isRequired,
|
|
98
|
-
} as any;
|
|
99
|
-
|
|
100
|
-
TimePickerView.defaultProps = {
|
|
101
|
-
ampm: true,
|
|
102
|
-
minutesStep: 1,
|
|
103
|
-
};
|
|
104
|
-
|
|
105
|
-
export default React.memo(TimePickerView);
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import clsx from 'clsx';
|
|
3
|
-
import Typography from '@material-ui/core/Typography';
|
|
4
|
-
import { makeStyles } from '@material-ui/core/styles';
|
|
5
|
-
|
|
6
|
-
export interface MonthProps {
|
|
7
|
-
children: React.ReactNode;
|
|
8
|
-
disabled?: boolean;
|
|
9
|
-
onSelect: (value: any) => void;
|
|
10
|
-
selected?: boolean;
|
|
11
|
-
value: any;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export const useStyles = makeStyles(
|
|
15
|
-
theme => ({
|
|
16
|
-
root: {
|
|
17
|
-
flex: '1 0 33.33%',
|
|
18
|
-
display: 'flex',
|
|
19
|
-
alignItems: 'center',
|
|
20
|
-
justifyContent: 'center',
|
|
21
|
-
cursor: 'pointer',
|
|
22
|
-
outline: 'none',
|
|
23
|
-
height: 75,
|
|
24
|
-
transition: theme.transitions.create('font-size', { duration: '100ms' }),
|
|
25
|
-
'&:focus': {
|
|
26
|
-
color: theme.palette.primary.main,
|
|
27
|
-
fontWeight: theme.typography.fontWeightMedium,
|
|
28
|
-
},
|
|
29
|
-
},
|
|
30
|
-
monthSelected: {
|
|
31
|
-
color: theme.palette.primary.main,
|
|
32
|
-
fontWeight: theme.typography.fontWeightMedium,
|
|
33
|
-
},
|
|
34
|
-
monthDisabled: {
|
|
35
|
-
pointerEvents: 'none',
|
|
36
|
-
color: theme.palette.text.hint,
|
|
37
|
-
},
|
|
38
|
-
}),
|
|
39
|
-
{ name: 'MuiPickersMonth' }
|
|
40
|
-
);
|
|
41
|
-
|
|
42
|
-
export const Month: React.FC<MonthProps> = ({
|
|
43
|
-
selected,
|
|
44
|
-
onSelect,
|
|
45
|
-
disabled,
|
|
46
|
-
value,
|
|
47
|
-
children,
|
|
48
|
-
...other
|
|
49
|
-
}) => {
|
|
50
|
-
const classes = useStyles();
|
|
51
|
-
const handleSelection = React.useCallback(() => {
|
|
52
|
-
onSelect(value);
|
|
53
|
-
}, [onSelect, value]);
|
|
54
|
-
|
|
55
|
-
return (
|
|
56
|
-
<Typography
|
|
57
|
-
role="button"
|
|
58
|
-
component="div"
|
|
59
|
-
className={clsx(classes.root, {
|
|
60
|
-
[classes.monthSelected]: selected,
|
|
61
|
-
[classes.monthDisabled]: disabled,
|
|
62
|
-
})}
|
|
63
|
-
tabIndex={disabled ? -1 : 0}
|
|
64
|
-
onClick={handleSelection}
|
|
65
|
-
onKeyPress={handleSelection}
|
|
66
|
-
color={selected ? 'primary' : undefined}
|
|
67
|
-
variant={selected ? 'h5' : 'subtitle1'}
|
|
68
|
-
children={children}
|
|
69
|
-
{...other}
|
|
70
|
-
/>
|
|
71
|
-
);
|
|
72
|
-
};
|
|
73
|
-
|
|
74
|
-
Month.displayName = 'Month';
|
|
75
|
-
|
|
76
|
-
export default Month;
|
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import Month from './Month';
|
|
3
|
-
import { makeStyles } from '@material-ui/core/styles';
|
|
4
|
-
import { useUtils } from '../../_shared/hooks/useUtils';
|
|
5
|
-
import { ParsableDate } from '../../constants/prop-types';
|
|
6
|
-
import { MaterialUiPickersDate } from '../../typings/date';
|
|
7
|
-
|
|
8
|
-
export interface MonthSelectionProps {
|
|
9
|
-
date: MaterialUiPickersDate;
|
|
10
|
-
minDate?: ParsableDate;
|
|
11
|
-
maxDate?: ParsableDate;
|
|
12
|
-
onChange: (date: MaterialUiPickersDate, isFinish: boolean) => void;
|
|
13
|
-
disablePast?: boolean | null | undefined;
|
|
14
|
-
disableFuture?: boolean | null | undefined;
|
|
15
|
-
onMonthChange?: (date: MaterialUiPickersDate) => void | Promise<void>;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export const useStyles = makeStyles(
|
|
19
|
-
{
|
|
20
|
-
container: {
|
|
21
|
-
width: 310,
|
|
22
|
-
display: 'flex',
|
|
23
|
-
flexWrap: 'wrap',
|
|
24
|
-
alignContent: 'stretch',
|
|
25
|
-
},
|
|
26
|
-
},
|
|
27
|
-
{ name: 'MuiPickersMonthSelection' }
|
|
28
|
-
);
|
|
29
|
-
|
|
30
|
-
export const MonthSelection: React.FC<MonthSelectionProps> = ({
|
|
31
|
-
disablePast,
|
|
32
|
-
disableFuture,
|
|
33
|
-
minDate,
|
|
34
|
-
maxDate,
|
|
35
|
-
date,
|
|
36
|
-
onMonthChange,
|
|
37
|
-
onChange,
|
|
38
|
-
}) => {
|
|
39
|
-
const utils = useUtils();
|
|
40
|
-
const classes = useStyles();
|
|
41
|
-
const currentMonth = utils.getMonth(date);
|
|
42
|
-
|
|
43
|
-
const shouldDisableMonth = (month: MaterialUiPickersDate) => {
|
|
44
|
-
const now = utils.date();
|
|
45
|
-
const utilMinDate = utils.date(minDate);
|
|
46
|
-
const utilMaxDate = utils.date(maxDate);
|
|
47
|
-
|
|
48
|
-
const firstEnabledMonth = utils.startOfMonth(
|
|
49
|
-
disablePast && utils.isAfter(now, utilMinDate) ? now : utilMinDate
|
|
50
|
-
);
|
|
51
|
-
|
|
52
|
-
const lastEnabledMonth = utils.startOfMonth(
|
|
53
|
-
disableFuture && utils.isBefore(now, utilMaxDate) ? now : utilMaxDate
|
|
54
|
-
);
|
|
55
|
-
|
|
56
|
-
const isBeforeFirstEnabled = utils.isBefore(month, firstEnabledMonth);
|
|
57
|
-
const isAfterLastEnabled = utils.isAfter(month, lastEnabledMonth);
|
|
58
|
-
|
|
59
|
-
return isBeforeFirstEnabled || isAfterLastEnabled;
|
|
60
|
-
};
|
|
61
|
-
|
|
62
|
-
const onMonthSelect = React.useCallback(
|
|
63
|
-
(month: number) => {
|
|
64
|
-
const newDate = utils.setMonth(date, month);
|
|
65
|
-
|
|
66
|
-
onChange(newDate, true);
|
|
67
|
-
if (onMonthChange) {
|
|
68
|
-
onMonthChange(newDate);
|
|
69
|
-
}
|
|
70
|
-
},
|
|
71
|
-
[date, onChange, onMonthChange, utils]
|
|
72
|
-
);
|
|
73
|
-
|
|
74
|
-
return (
|
|
75
|
-
<div className={classes.container}>
|
|
76
|
-
{utils.getMonthArray(date).map(month => {
|
|
77
|
-
const monthNumber = utils.getMonth(month);
|
|
78
|
-
const monthText = utils.format(month, 'MMM');
|
|
79
|
-
|
|
80
|
-
return (
|
|
81
|
-
<Month
|
|
82
|
-
key={monthText}
|
|
83
|
-
value={monthNumber}
|
|
84
|
-
selected={monthNumber === currentMonth}
|
|
85
|
-
onSelect={onMonthSelect}
|
|
86
|
-
disabled={shouldDisableMonth(month)}
|
|
87
|
-
>
|
|
88
|
-
{monthText}
|
|
89
|
-
</Month>
|
|
90
|
-
);
|
|
91
|
-
})}
|
|
92
|
-
</div>
|
|
93
|
-
);
|
|
94
|
-
};
|
package/src/views/Year/Year.tsx
DELETED
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import clsx from 'clsx';
|
|
3
|
-
import Typography from '@material-ui/core/Typography';
|
|
4
|
-
import { makeStyles } from '@material-ui/core/styles';
|
|
5
|
-
|
|
6
|
-
export interface YearProps {
|
|
7
|
-
children: React.ReactNode;
|
|
8
|
-
disabled?: boolean;
|
|
9
|
-
onSelect: (value: any) => void;
|
|
10
|
-
selected?: boolean;
|
|
11
|
-
value: any;
|
|
12
|
-
forwardedRef?: React.Ref<HTMLElement | null>;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export const useStyles = makeStyles(
|
|
16
|
-
theme => ({
|
|
17
|
-
root: {
|
|
18
|
-
height: 40,
|
|
19
|
-
display: 'flex',
|
|
20
|
-
alignItems: 'center',
|
|
21
|
-
justifyContent: 'center',
|
|
22
|
-
cursor: 'pointer',
|
|
23
|
-
outline: 'none',
|
|
24
|
-
'&:focus': {
|
|
25
|
-
color: theme.palette.primary.main,
|
|
26
|
-
fontWeight: theme.typography.fontWeightMedium,
|
|
27
|
-
},
|
|
28
|
-
},
|
|
29
|
-
yearSelected: {
|
|
30
|
-
margin: '10px 0',
|
|
31
|
-
fontWeight: theme.typography.fontWeightMedium,
|
|
32
|
-
},
|
|
33
|
-
yearDisabled: {
|
|
34
|
-
pointerEvents: 'none',
|
|
35
|
-
color: theme.palette.text.hint,
|
|
36
|
-
},
|
|
37
|
-
}),
|
|
38
|
-
{ name: 'MuiPickersYear' }
|
|
39
|
-
);
|
|
40
|
-
|
|
41
|
-
export const Year: React.FC<YearProps> = ({
|
|
42
|
-
onSelect,
|
|
43
|
-
forwardedRef,
|
|
44
|
-
value,
|
|
45
|
-
selected,
|
|
46
|
-
disabled,
|
|
47
|
-
children,
|
|
48
|
-
...other
|
|
49
|
-
}) => {
|
|
50
|
-
const classes = useStyles();
|
|
51
|
-
const handleClick = React.useCallback(() => onSelect(value), [onSelect, value]);
|
|
52
|
-
|
|
53
|
-
return (
|
|
54
|
-
<Typography
|
|
55
|
-
role="button"
|
|
56
|
-
component="div"
|
|
57
|
-
tabIndex={disabled ? -1 : 0}
|
|
58
|
-
onClick={handleClick}
|
|
59
|
-
onKeyPress={handleClick}
|
|
60
|
-
color={selected ? 'primary' : undefined}
|
|
61
|
-
variant={selected ? 'h5' : 'subtitle1'}
|
|
62
|
-
children={children}
|
|
63
|
-
ref={forwardedRef}
|
|
64
|
-
className={clsx(classes.root, {
|
|
65
|
-
[classes.yearSelected]: selected,
|
|
66
|
-
[classes.yearDisabled]: disabled,
|
|
67
|
-
})}
|
|
68
|
-
{...other}
|
|
69
|
-
/>
|
|
70
|
-
);
|
|
71
|
-
};
|
|
72
|
-
|
|
73
|
-
Year.displayName = 'Year';
|
|
74
|
-
|
|
75
|
-
export default React.forwardRef<HTMLElement, YearProps>((props, ref) => (
|
|
76
|
-
<Year {...props} forwardedRef={ref} />
|
|
77
|
-
));
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import Year from './Year';
|
|
3
|
-
import { DateType } from '@date-io/type';
|
|
4
|
-
import { makeStyles } from '@material-ui/core/styles';
|
|
5
|
-
import { useUtils } from '../../_shared/hooks/useUtils';
|
|
6
|
-
import { VariantContext } from '../../wrappers/Wrapper';
|
|
7
|
-
import { MaterialUiPickersDate } from '../../typings/date';
|
|
8
|
-
|
|
9
|
-
export interface YearSelectionProps {
|
|
10
|
-
date: MaterialUiPickersDate;
|
|
11
|
-
minDate: DateType;
|
|
12
|
-
maxDate: DateType;
|
|
13
|
-
onChange: (date: MaterialUiPickersDate, isFinish: boolean) => void;
|
|
14
|
-
disablePast?: boolean | null | undefined;
|
|
15
|
-
disableFuture?: boolean | null | undefined;
|
|
16
|
-
animateYearScrolling?: boolean | null | undefined;
|
|
17
|
-
onYearChange?: (date: MaterialUiPickersDate) => void;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export const useStyles = makeStyles(
|
|
21
|
-
{
|
|
22
|
-
container: {
|
|
23
|
-
height: 300,
|
|
24
|
-
overflowY: 'auto',
|
|
25
|
-
},
|
|
26
|
-
},
|
|
27
|
-
{ name: 'MuiPickersYearSelection' }
|
|
28
|
-
);
|
|
29
|
-
|
|
30
|
-
export const YearSelection: React.FC<YearSelectionProps> = ({
|
|
31
|
-
date,
|
|
32
|
-
onChange,
|
|
33
|
-
onYearChange,
|
|
34
|
-
minDate,
|
|
35
|
-
maxDate,
|
|
36
|
-
disablePast,
|
|
37
|
-
disableFuture,
|
|
38
|
-
animateYearScrolling,
|
|
39
|
-
}) => {
|
|
40
|
-
const utils = useUtils();
|
|
41
|
-
const classes = useStyles();
|
|
42
|
-
const currentVariant = React.useContext(VariantContext);
|
|
43
|
-
const selectedYearRef = React.useRef<HTMLElement>(null);
|
|
44
|
-
|
|
45
|
-
React.useEffect(() => {
|
|
46
|
-
if (selectedYearRef.current && selectedYearRef.current.scrollIntoView) {
|
|
47
|
-
selectedYearRef.current.scrollIntoView({
|
|
48
|
-
block: currentVariant === 'static' ? 'nearest' : 'center',
|
|
49
|
-
behavior: animateYearScrolling ? 'smooth' : 'auto',
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
}, []); // eslint-disable-line
|
|
53
|
-
|
|
54
|
-
const currentYear = utils.getYear(date);
|
|
55
|
-
const onYearSelect = React.useCallback(
|
|
56
|
-
(year: number) => {
|
|
57
|
-
const newDate = utils.setYear(date, year);
|
|
58
|
-
if (onYearChange) {
|
|
59
|
-
onYearChange(newDate);
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
onChange(newDate, true);
|
|
63
|
-
},
|
|
64
|
-
[date, onChange, onYearChange, utils]
|
|
65
|
-
);
|
|
66
|
-
|
|
67
|
-
return (
|
|
68
|
-
<div className={classes.container}>
|
|
69
|
-
{utils.getYearRange(minDate, maxDate).map(year => {
|
|
70
|
-
const yearNumber = utils.getYear(year);
|
|
71
|
-
const selected = yearNumber === currentYear;
|
|
72
|
-
|
|
73
|
-
return (
|
|
74
|
-
<Year
|
|
75
|
-
key={utils.getYearText(year)}
|
|
76
|
-
selected={selected}
|
|
77
|
-
value={yearNumber}
|
|
78
|
-
onSelect={onYearSelect}
|
|
79
|
-
ref={selected ? selectedYearRef : undefined}
|
|
80
|
-
disabled={Boolean(
|
|
81
|
-
(disablePast && utils.isBeforeYear(year, utils.date())) ||
|
|
82
|
-
(disableFuture && utils.isAfterYear(year, utils.date()))
|
|
83
|
-
)}
|
|
84
|
-
>
|
|
85
|
-
{utils.getYearText(year)}
|
|
86
|
-
</Year>
|
|
87
|
-
);
|
|
88
|
-
})}
|
|
89
|
-
</div>
|
|
90
|
-
);
|
|
91
|
-
};
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import * as PropTypes from 'prop-types';
|
|
3
|
-
import clsx from 'clsx';
|
|
4
|
-
import Popover, { PopoverProps as PopoverPropsType } from '@material-ui/core/Popover';
|
|
5
|
-
import { WrapperProps } from './Wrapper';
|
|
6
|
-
import { makeStyles } from '@material-ui/core/styles';
|
|
7
|
-
import { useKeyDown } from '../_shared/hooks/useKeyDown';
|
|
8
|
-
import { TextFieldProps } from '@material-ui/core/TextField';
|
|
9
|
-
import { DIALOG_WIDTH, DIALOG_WIDTH_WIDER } from '../constants/dimensions';
|
|
10
|
-
|
|
11
|
-
export const useStyles = makeStyles(
|
|
12
|
-
{
|
|
13
|
-
popoverPaper: {
|
|
14
|
-
width: DIALOG_WIDTH,
|
|
15
|
-
paddingBottom: 8,
|
|
16
|
-
},
|
|
17
|
-
popoverPaperWider: {
|
|
18
|
-
width: DIALOG_WIDTH_WIDER,
|
|
19
|
-
},
|
|
20
|
-
},
|
|
21
|
-
{ name: 'MuiPickersInlineWrapper' }
|
|
22
|
-
);
|
|
23
|
-
|
|
24
|
-
export interface InlineWrapperProps<T = TextFieldProps> extends WrapperProps<T> {
|
|
25
|
-
/** Popover props passed to material-ui Popover (with variant="inline") */
|
|
26
|
-
PopoverProps?: Partial<PopoverPropsType>;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export const InlineWrapper: React.FC<InlineWrapperProps> = ({
|
|
30
|
-
open,
|
|
31
|
-
wider,
|
|
32
|
-
children,
|
|
33
|
-
PopoverProps,
|
|
34
|
-
onClear,
|
|
35
|
-
onDismiss,
|
|
36
|
-
onSetToday,
|
|
37
|
-
onAccept,
|
|
38
|
-
showTabs,
|
|
39
|
-
DateInputProps,
|
|
40
|
-
InputComponent,
|
|
41
|
-
...other
|
|
42
|
-
}) => {
|
|
43
|
-
const ref = React.useRef();
|
|
44
|
-
const classes = useStyles();
|
|
45
|
-
|
|
46
|
-
useKeyDown(open, {
|
|
47
|
-
Enter: onAccept,
|
|
48
|
-
});
|
|
49
|
-
|
|
50
|
-
return (
|
|
51
|
-
<React.Fragment>
|
|
52
|
-
<InputComponent {...other} {...DateInputProps} inputRef={ref} />
|
|
53
|
-
|
|
54
|
-
<Popover
|
|
55
|
-
open={open}
|
|
56
|
-
onClose={onDismiss}
|
|
57
|
-
anchorEl={ref.current}
|
|
58
|
-
classes={{
|
|
59
|
-
paper: clsx(classes.popoverPaper, { [classes.popoverPaperWider]: wider }),
|
|
60
|
-
}}
|
|
61
|
-
anchorOrigin={{
|
|
62
|
-
vertical: 'bottom',
|
|
63
|
-
horizontal: 'center',
|
|
64
|
-
}}
|
|
65
|
-
transformOrigin={{
|
|
66
|
-
vertical: 'top',
|
|
67
|
-
horizontal: 'center',
|
|
68
|
-
}}
|
|
69
|
-
children={children}
|
|
70
|
-
{...PopoverProps}
|
|
71
|
-
/>
|
|
72
|
-
</React.Fragment>
|
|
73
|
-
);
|
|
74
|
-
};
|
|
75
|
-
|
|
76
|
-
InlineWrapper.propTypes = {
|
|
77
|
-
onOpen: PropTypes.func,
|
|
78
|
-
onClose: PropTypes.func,
|
|
79
|
-
PopoverProps: PropTypes.object,
|
|
80
|
-
} as any;
|
|
@@ -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
|
-
};
|