@mui/x-date-pickers 7.0.0 → 7.1.0
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/CHANGELOG.md +71 -0
- package/DatePicker/DatePickerToolbar.js +11 -6
- package/DateTimePicker/DateTimePickerToolbar.js +97 -45
- package/DayCalendarSkeleton/DayCalendarSkeleton.js +12 -8
- package/DigitalClock/DigitalClock.js +14 -6
- package/MonthCalendar/PickersMonth.js +12 -6
- package/MultiSectionDigitalClock/MultiSectionDigitalClockSection.js +13 -4
- package/PickersCalendarHeader/PickersCalendarHeader.js +13 -9
- package/PickersDay/PickersDay.js +30 -15
- package/PickersLayout/PickersLayout.js +31 -17
- package/PickersTextField/PickersFilledInput/PickersFilledInput.js +137 -72
- package/PickersTextField/PickersInput/PickersInput.js +76 -54
- package/PickersTextField/PickersInputBase/PickersInputBase.js +64 -24
- package/PickersTextField/PickersInputBase/PickersInputBase.types.d.ts +7 -0
- package/PickersTextField/PickersOutlinedInput/Outline.js +58 -41
- package/PickersTextField/PickersOutlinedInput/PickersOutlinedInput.js +31 -12
- package/TimeClock/Clock.js +48 -35
- package/TimeClock/ClockNumber.js +12 -7
- package/TimeClock/ClockPointer.js +23 -13
- package/TimePicker/TimePickerToolbar.js +25 -16
- package/YearCalendar/PickersYear.js +12 -6
- package/index.js +1 -1
- package/internals/components/PickersArrowSwitcher/PickersArrowSwitcher.js +11 -6
- package/internals/components/PickersPopper.js +12 -8
- package/internals/components/PickersToolbar.js +39 -18
- package/internals/hooks/useField/useField.js +4 -2
- package/internals/hooks/useField/useField.types.d.ts +1 -0
- package/internals/hooks/useField/useFieldV6TextField.js +8 -3
- package/locales/itIT.js +16 -20
- package/locales/zhHK.js +14 -17
- package/modern/DatePicker/DatePickerToolbar.js +11 -6
- package/modern/DateTimePicker/DateTimePickerToolbar.js +97 -45
- package/modern/DayCalendarSkeleton/DayCalendarSkeleton.js +12 -8
- package/modern/DigitalClock/DigitalClock.js +14 -6
- package/modern/MonthCalendar/PickersMonth.js +12 -6
- package/modern/MultiSectionDigitalClock/MultiSectionDigitalClockSection.js +13 -4
- package/modern/PickersCalendarHeader/PickersCalendarHeader.js +13 -9
- package/modern/PickersDay/PickersDay.js +30 -15
- package/modern/PickersLayout/PickersLayout.js +31 -17
- package/modern/PickersTextField/PickersFilledInput/PickersFilledInput.js +137 -72
- package/modern/PickersTextField/PickersInput/PickersInput.js +76 -54
- package/modern/PickersTextField/PickersInputBase/PickersInputBase.js +64 -24
- package/modern/PickersTextField/PickersOutlinedInput/Outline.js +58 -41
- package/modern/PickersTextField/PickersOutlinedInput/PickersOutlinedInput.js +31 -12
- package/modern/TimeClock/Clock.js +48 -35
- package/modern/TimeClock/ClockNumber.js +12 -7
- package/modern/TimeClock/ClockPointer.js +23 -13
- package/modern/TimePicker/TimePickerToolbar.js +25 -16
- package/modern/YearCalendar/PickersYear.js +12 -6
- package/modern/index.js +1 -1
- package/modern/internals/components/PickersArrowSwitcher/PickersArrowSwitcher.js +11 -6
- package/modern/internals/components/PickersPopper.js +12 -8
- package/modern/internals/components/PickersToolbar.js +39 -18
- package/modern/internals/hooks/useField/useField.js +4 -2
- package/modern/internals/hooks/useField/useFieldV6TextField.js +8 -3
- package/modern/locales/itIT.js +16 -20
- package/modern/locales/zhHK.js +14 -17
- package/node/DatePicker/DatePickerToolbar.js +11 -6
- package/node/DateTimePicker/DateTimePickerToolbar.js +97 -45
- package/node/DayCalendarSkeleton/DayCalendarSkeleton.js +12 -8
- package/node/DigitalClock/DigitalClock.js +14 -6
- package/node/MonthCalendar/PickersMonth.js +12 -6
- package/node/MultiSectionDigitalClock/MultiSectionDigitalClockSection.js +13 -4
- package/node/PickersCalendarHeader/PickersCalendarHeader.js +13 -9
- package/node/PickersDay/PickersDay.js +30 -15
- package/node/PickersLayout/PickersLayout.js +31 -17
- package/node/PickersTextField/PickersFilledInput/PickersFilledInput.js +137 -72
- package/node/PickersTextField/PickersInput/PickersInput.js +76 -54
- package/node/PickersTextField/PickersInputBase/PickersInputBase.js +64 -24
- package/node/PickersTextField/PickersOutlinedInput/Outline.js +58 -41
- package/node/PickersTextField/PickersOutlinedInput/PickersOutlinedInput.js +31 -12
- package/node/TimeClock/Clock.js +48 -35
- package/node/TimeClock/ClockNumber.js +12 -7
- package/node/TimeClock/ClockPointer.js +23 -13
- package/node/TimePicker/TimePickerToolbar.js +25 -16
- package/node/YearCalendar/PickersYear.js +12 -6
- package/node/index.js +1 -1
- package/node/internals/components/PickersArrowSwitcher/PickersArrowSwitcher.js +11 -6
- package/node/internals/components/PickersPopper.js +12 -8
- package/node/internals/components/PickersToolbar.js +39 -18
- package/node/internals/hooks/useField/useField.js +4 -2
- package/node/internals/hooks/useField/useFieldV6TextField.js +8 -3
- package/node/locales/itIT.js +16 -20
- package/node/locales/zhHK.js +14 -17
- package/package.json +1 -1
|
@@ -5,8 +5,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.default = Outline;
|
|
8
|
-
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
|
|
9
8
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
|
+
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
|
|
10
10
|
var React = _interopRequireWildcard(require("react"));
|
|
11
11
|
var _styles = require("@mui/material/styles");
|
|
12
12
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
@@ -46,51 +46,68 @@ const OutlineLabel = (0, _styles.styled)('span')(({
|
|
|
46
46
|
fontSize: 'inherit'
|
|
47
47
|
}));
|
|
48
48
|
const OutlineLegend = (0, _styles.styled)('legend')(({
|
|
49
|
-
ownerState,
|
|
50
49
|
theme
|
|
51
|
-
}) => (
|
|
50
|
+
}) => ({
|
|
52
51
|
float: 'unset',
|
|
53
52
|
// Fix conflict with bootstrap
|
|
54
53
|
width: 'auto',
|
|
55
54
|
// Fix conflict with bootstrap
|
|
56
|
-
overflow: 'hidden'
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
55
|
+
overflow: 'hidden',
|
|
56
|
+
// Fix Horizontal scroll when label too long
|
|
57
|
+
variants: [{
|
|
58
|
+
props: {
|
|
59
|
+
withLabel: false
|
|
60
|
+
},
|
|
61
|
+
style: {
|
|
62
|
+
padding: 0,
|
|
63
|
+
lineHeight: '11px',
|
|
64
|
+
// sync with `height` in `legend` styles
|
|
65
|
+
transition: theme.transitions.create('width', {
|
|
66
|
+
duration: 150,
|
|
67
|
+
easing: theme.transitions.easing.easeOut
|
|
68
|
+
})
|
|
69
|
+
}
|
|
70
|
+
}, {
|
|
71
|
+
props: {
|
|
72
|
+
withLabel: true
|
|
73
|
+
},
|
|
74
|
+
style: {
|
|
75
|
+
display: 'block',
|
|
76
|
+
// Fix conflict with normalize.css and sanitize.css
|
|
77
|
+
padding: 0,
|
|
78
|
+
height: 11,
|
|
79
|
+
// sync with `lineHeight` in `legend` styles
|
|
80
|
+
fontSize: '0.75em',
|
|
81
|
+
visibility: 'hidden',
|
|
82
|
+
maxWidth: 0.01,
|
|
83
|
+
transition: theme.transitions.create('max-width', {
|
|
84
|
+
duration: 50,
|
|
85
|
+
easing: theme.transitions.easing.easeOut
|
|
86
|
+
}),
|
|
87
|
+
whiteSpace: 'nowrap',
|
|
88
|
+
'& > span': {
|
|
89
|
+
paddingLeft: 5,
|
|
90
|
+
paddingRight: 5,
|
|
91
|
+
display: 'inline-block',
|
|
92
|
+
opacity: 0,
|
|
93
|
+
visibility: 'visible'
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}, {
|
|
97
|
+
props: {
|
|
98
|
+
withLabel: true,
|
|
99
|
+
notched: true
|
|
100
|
+
},
|
|
101
|
+
style: {
|
|
102
|
+
maxWidth: '100%',
|
|
103
|
+
transition: theme.transitions.create('max-width', {
|
|
104
|
+
duration: 100,
|
|
105
|
+
easing: theme.transitions.easing.easeOut,
|
|
106
|
+
delay: 50
|
|
107
|
+
})
|
|
108
|
+
}
|
|
109
|
+
}]
|
|
110
|
+
}));
|
|
94
111
|
|
|
95
112
|
/**
|
|
96
113
|
* @ignore - internal component.
|
|
@@ -26,8 +26,7 @@ const PickersOutlinedInputRoot = (0, _styles.styled)(_PickersInputBase2.PickersI
|
|
|
26
26
|
slot: 'Root',
|
|
27
27
|
overridesResolver: (props, styles) => styles.root
|
|
28
28
|
})(({
|
|
29
|
-
theme
|
|
30
|
-
ownerState
|
|
29
|
+
theme
|
|
31
30
|
}) => {
|
|
32
31
|
const borderColor = theme.palette.mode === 'light' ? 'rgba(0, 0, 0, 0.23)' : 'rgba(255, 255, 255, 0.23)';
|
|
33
32
|
return {
|
|
@@ -44,8 +43,6 @@ const PickersOutlinedInputRoot = (0, _styles.styled)(_PickersInputBase2.PickersI
|
|
|
44
43
|
},
|
|
45
44
|
[`&.${_pickersOutlinedInputClasses.pickersOutlinedInputClasses.focused} .${_pickersOutlinedInputClasses.pickersOutlinedInputClasses.notchedOutline}`]: {
|
|
46
45
|
borderStyle: 'solid',
|
|
47
|
-
// @ts-ignore
|
|
48
|
-
borderColor: (theme.vars || theme).palette[ownerState.color].main,
|
|
49
46
|
borderWidth: 2
|
|
50
47
|
},
|
|
51
48
|
[`&.${_pickersOutlinedInputClasses.pickersOutlinedInputClasses.disabled}`]: {
|
|
@@ -58,20 +55,37 @@ const PickersOutlinedInputRoot = (0, _styles.styled)(_PickersInputBase2.PickersI
|
|
|
58
55
|
},
|
|
59
56
|
[`&.${_pickersOutlinedInputClasses.pickersOutlinedInputClasses.error} .${_pickersOutlinedInputClasses.pickersOutlinedInputClasses.notchedOutline}`]: {
|
|
60
57
|
borderColor: (theme.vars || theme).palette.error.main
|
|
61
|
-
}
|
|
58
|
+
},
|
|
59
|
+
variants: Object.keys((theme.vars ?? theme).palette)
|
|
60
|
+
// @ts-ignore
|
|
61
|
+
.filter(key => (theme.vars ?? theme).palette[key].main).map(color => ({
|
|
62
|
+
props: {
|
|
63
|
+
color
|
|
64
|
+
},
|
|
65
|
+
style: {
|
|
66
|
+
[`&.${_pickersOutlinedInputClasses.pickersOutlinedInputClasses.focused}:not(.${_pickersOutlinedInputClasses.pickersOutlinedInputClasses.error}) .${_pickersOutlinedInputClasses.pickersOutlinedInputClasses.notchedOutline}`]: {
|
|
67
|
+
// @ts-ignore
|
|
68
|
+
borderColor: (theme.vars || theme).palette[color].main
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}))
|
|
62
72
|
};
|
|
63
73
|
});
|
|
64
74
|
const PickersOutlinedInputSectionsContainer = (0, _styles.styled)(_PickersInputBase2.PickersInputBaseSectionsContainer, {
|
|
65
75
|
name: 'MuiPickersOutlinedInput',
|
|
66
76
|
slot: 'SectionsContainer',
|
|
67
77
|
overridesResolver: (props, styles) => styles.sectionsContainer
|
|
68
|
-
})(
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
78
|
+
})({
|
|
79
|
+
padding: '16.5px 0',
|
|
80
|
+
variants: [{
|
|
81
|
+
props: {
|
|
82
|
+
size: 'small'
|
|
83
|
+
},
|
|
84
|
+
style: {
|
|
85
|
+
padding: '8.5px 0'
|
|
86
|
+
}
|
|
87
|
+
}]
|
|
88
|
+
});
|
|
75
89
|
const useUtilityClasses = ownerState => {
|
|
76
90
|
const {
|
|
77
91
|
classes
|
|
@@ -180,6 +194,11 @@ process.env.NODE_ENV !== "production" ? PickersOutlinedInput.propTypes = {
|
|
|
180
194
|
getSectionIndexFromDOMElement: _propTypes.default.func.isRequired
|
|
181
195
|
})
|
|
182
196
|
})]),
|
|
197
|
+
/**
|
|
198
|
+
* The props used for each component slot.
|
|
199
|
+
* @default {}
|
|
200
|
+
*/
|
|
201
|
+
slotProps: _propTypes.default.object,
|
|
183
202
|
/**
|
|
184
203
|
* The components used for each slot inside.
|
|
185
204
|
*
|
package/node/TimeClock/Clock.js
CHANGED
|
@@ -5,7 +5,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.Clock = Clock;
|
|
8
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
8
|
var React = _interopRequireWildcard(require("react"));
|
|
10
9
|
var _clsx = _interopRequireDefault(require("clsx"));
|
|
11
10
|
var _IconButton = _interopRequireDefault(require("@mui/material/IconButton"));
|
|
@@ -74,9 +73,7 @@ const ClockSquareMask = (0, _styles.styled)('div', {
|
|
|
74
73
|
name: 'MuiClock',
|
|
75
74
|
slot: 'SquareMask',
|
|
76
75
|
overridesResolver: (_, styles) => styles.squareMask
|
|
77
|
-
})(
|
|
78
|
-
ownerState
|
|
79
|
-
}) => (0, _extends2.default)({
|
|
76
|
+
})({
|
|
80
77
|
width: '100%',
|
|
81
78
|
height: '100%',
|
|
82
79
|
position: 'absolute',
|
|
@@ -84,16 +81,22 @@ const ClockSquareMask = (0, _styles.styled)('div', {
|
|
|
84
81
|
outline: 0,
|
|
85
82
|
// Disable scroll capabilities.
|
|
86
83
|
touchAction: 'none',
|
|
87
|
-
userSelect: 'none'
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
}
|
|
84
|
+
userSelect: 'none',
|
|
85
|
+
variants: [{
|
|
86
|
+
props: {
|
|
87
|
+
disabled: false
|
|
88
|
+
},
|
|
89
|
+
style: {
|
|
90
|
+
'@media (pointer: fine)': {
|
|
91
|
+
cursor: 'pointer',
|
|
92
|
+
borderRadius: '50%'
|
|
93
|
+
},
|
|
94
|
+
'&:active': {
|
|
95
|
+
cursor: 'move'
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}]
|
|
99
|
+
});
|
|
97
100
|
const ClockPin = (0, _styles.styled)('div', {
|
|
98
101
|
name: 'MuiClock',
|
|
99
102
|
slot: 'Pin',
|
|
@@ -115,44 +118,54 @@ const ClockAmButton = (0, _styles.styled)(_IconButton.default, {
|
|
|
115
118
|
slot: 'AmButton',
|
|
116
119
|
overridesResolver: (_, styles) => styles.amButton
|
|
117
120
|
})(({
|
|
118
|
-
theme
|
|
119
|
-
|
|
120
|
-
}) => (0, _extends2.default)({
|
|
121
|
+
theme
|
|
122
|
+
}) => ({
|
|
121
123
|
zIndex: 1,
|
|
122
124
|
position: 'absolute',
|
|
123
125
|
bottom: 8,
|
|
124
126
|
left: 8,
|
|
125
127
|
paddingLeft: 4,
|
|
126
128
|
paddingRight: 4,
|
|
127
|
-
width: _shared.CLOCK_HOUR_WIDTH
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
129
|
+
width: _shared.CLOCK_HOUR_WIDTH,
|
|
130
|
+
variants: [{
|
|
131
|
+
props: {
|
|
132
|
+
meridiemMode: 'am'
|
|
133
|
+
},
|
|
134
|
+
style: {
|
|
135
|
+
backgroundColor: (theme.vars || theme).palette.primary.main,
|
|
136
|
+
color: (theme.vars || theme).palette.primary.contrastText,
|
|
137
|
+
'&:hover': {
|
|
138
|
+
backgroundColor: (theme.vars || theme).palette.primary.light
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
}]
|
|
134
142
|
}));
|
|
135
143
|
const ClockPmButton = (0, _styles.styled)(_IconButton.default, {
|
|
136
144
|
name: 'MuiClock',
|
|
137
145
|
slot: 'PmButton',
|
|
138
146
|
overridesResolver: (_, styles) => styles.pmButton
|
|
139
147
|
})(({
|
|
140
|
-
theme
|
|
141
|
-
|
|
142
|
-
}) => (0, _extends2.default)({
|
|
148
|
+
theme
|
|
149
|
+
}) => ({
|
|
143
150
|
zIndex: 1,
|
|
144
151
|
position: 'absolute',
|
|
145
152
|
bottom: 8,
|
|
146
153
|
right: 8,
|
|
147
154
|
paddingLeft: 4,
|
|
148
155
|
paddingRight: 4,
|
|
149
|
-
width: _shared.CLOCK_HOUR_WIDTH
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
+
width: _shared.CLOCK_HOUR_WIDTH,
|
|
157
|
+
variants: [{
|
|
158
|
+
props: {
|
|
159
|
+
meridiemMode: 'pm'
|
|
160
|
+
},
|
|
161
|
+
style: {
|
|
162
|
+
backgroundColor: (theme.vars || theme).palette.primary.main,
|
|
163
|
+
color: (theme.vars || theme).palette.primary.contrastText,
|
|
164
|
+
'&:hover': {
|
|
165
|
+
backgroundColor: (theme.vars || theme).palette.primary.light
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
}]
|
|
156
169
|
}));
|
|
157
170
|
const ClockMeridiemText = (0, _styles.styled)(_Typography.default, {
|
|
158
171
|
name: 'MuiClock',
|
|
@@ -186,7 +199,7 @@ function Clock(inProps) {
|
|
|
186
199
|
selectedId,
|
|
187
200
|
type,
|
|
188
201
|
viewValue,
|
|
189
|
-
disabled,
|
|
202
|
+
disabled = false,
|
|
190
203
|
readOnly,
|
|
191
204
|
className
|
|
192
205
|
} = props;
|
|
@@ -37,9 +37,8 @@ const ClockNumberRoot = (0, _styles.styled)('span', {
|
|
|
37
37
|
[`&.${_clockNumberClasses.clockNumberClasses.selected}`]: styles.selected
|
|
38
38
|
}]
|
|
39
39
|
})(({
|
|
40
|
-
theme
|
|
41
|
-
|
|
42
|
-
}) => (0, _extends2.default)({
|
|
40
|
+
theme
|
|
41
|
+
}) => ({
|
|
43
42
|
height: _shared.CLOCK_HOUR_WIDTH,
|
|
44
43
|
width: _shared.CLOCK_HOUR_WIDTH,
|
|
45
44
|
position: 'absolute',
|
|
@@ -59,10 +58,16 @@ const ClockNumberRoot = (0, _styles.styled)('span', {
|
|
|
59
58
|
[`&.${_clockNumberClasses.clockNumberClasses.disabled}`]: {
|
|
60
59
|
pointerEvents: 'none',
|
|
61
60
|
color: (theme.vars || theme).palette.text.disabled
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
61
|
+
},
|
|
62
|
+
variants: [{
|
|
63
|
+
props: {
|
|
64
|
+
inner: true
|
|
65
|
+
},
|
|
66
|
+
style: (0, _extends2.default)({}, theme.typography.body2, {
|
|
67
|
+
color: (theme.vars || theme).palette.text.secondary
|
|
68
|
+
})
|
|
69
|
+
}]
|
|
70
|
+
}));
|
|
66
71
|
|
|
67
72
|
/**
|
|
68
73
|
* @ignore - internal component.
|
|
@@ -5,8 +5,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.ClockPointer = ClockPointer;
|
|
8
|
-
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
|
|
9
8
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
|
+
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
|
|
10
10
|
var React = _interopRequireWildcard(require("react"));
|
|
11
11
|
var _clsx = _interopRequireDefault(require("clsx"));
|
|
12
12
|
var _styles = require("@mui/material/styles");
|
|
@@ -32,26 +32,30 @@ const ClockPointerRoot = (0, _styles.styled)('div', {
|
|
|
32
32
|
slot: 'Root',
|
|
33
33
|
overridesResolver: (_, styles) => styles.root
|
|
34
34
|
})(({
|
|
35
|
-
theme
|
|
36
|
-
|
|
37
|
-
}) => (0, _extends2.default)({
|
|
35
|
+
theme
|
|
36
|
+
}) => ({
|
|
38
37
|
width: 2,
|
|
39
38
|
backgroundColor: (theme.vars || theme).palette.primary.main,
|
|
40
39
|
position: 'absolute',
|
|
41
40
|
left: 'calc(50% - 1px)',
|
|
42
41
|
bottom: '50%',
|
|
43
|
-
transformOrigin: 'center bottom 0px'
|
|
44
|
-
|
|
45
|
-
|
|
42
|
+
transformOrigin: 'center bottom 0px',
|
|
43
|
+
variants: [{
|
|
44
|
+
props: {
|
|
45
|
+
shouldAnimate: true
|
|
46
|
+
},
|
|
47
|
+
style: {
|
|
48
|
+
transition: theme.transitions.create(['transform', 'height'])
|
|
49
|
+
}
|
|
50
|
+
}]
|
|
46
51
|
}));
|
|
47
52
|
const ClockPointerThumb = (0, _styles.styled)('div', {
|
|
48
53
|
name: 'MuiClockPointer',
|
|
49
54
|
slot: 'Thumb',
|
|
50
55
|
overridesResolver: (_, styles) => styles.thumb
|
|
51
56
|
})(({
|
|
52
|
-
theme
|
|
53
|
-
|
|
54
|
-
}) => (0, _extends2.default)({
|
|
57
|
+
theme
|
|
58
|
+
}) => ({
|
|
55
59
|
width: 4,
|
|
56
60
|
height: 4,
|
|
57
61
|
backgroundColor: (theme.vars || theme).palette.primary.contrastText,
|
|
@@ -60,9 +64,15 @@ const ClockPointerThumb = (0, _styles.styled)('div', {
|
|
|
60
64
|
top: -21,
|
|
61
65
|
left: `calc(50% - ${_shared.CLOCK_HOUR_WIDTH / 2}px)`,
|
|
62
66
|
border: `${(_shared.CLOCK_HOUR_WIDTH - 4) / 2}px solid ${(theme.vars || theme).palette.primary.main}`,
|
|
63
|
-
boxSizing: 'content-box'
|
|
64
|
-
|
|
65
|
-
|
|
67
|
+
boxSizing: 'content-box',
|
|
68
|
+
variants: [{
|
|
69
|
+
props: {
|
|
70
|
+
hasSelected: true
|
|
71
|
+
},
|
|
72
|
+
style: {
|
|
73
|
+
backgroundColor: (theme.vars || theme).palette.primary.main
|
|
74
|
+
}
|
|
75
|
+
}]
|
|
66
76
|
}));
|
|
67
77
|
|
|
68
78
|
/**
|
|
@@ -61,16 +61,22 @@ const TimePickerToolbarHourMinuteLabel = (0, _styles.styled)('div', {
|
|
|
61
61
|
[`&.${_timePickerToolbarClasses.timePickerToolbarClasses.hourMinuteLabelReverse}`]: styles.hourMinuteLabelReverse
|
|
62
62
|
}, styles.hourMinuteLabel]
|
|
63
63
|
})(({
|
|
64
|
-
theme
|
|
65
|
-
ownerState
|
|
64
|
+
theme
|
|
66
65
|
}) => (0, _extends2.default)({
|
|
67
66
|
display: 'flex',
|
|
68
67
|
justifyContent: 'flex-end',
|
|
69
68
|
alignItems: 'flex-end'
|
|
70
|
-
}, ownerState.isLandscape && {
|
|
71
|
-
marginTop: 'auto'
|
|
72
69
|
}, theme.direction === 'rtl' && {
|
|
73
70
|
flexDirection: 'row-reverse'
|
|
71
|
+
}, {
|
|
72
|
+
variants: [{
|
|
73
|
+
props: {
|
|
74
|
+
isLandscape: true
|
|
75
|
+
},
|
|
76
|
+
style: {
|
|
77
|
+
marginTop: 'auto'
|
|
78
|
+
}
|
|
79
|
+
}]
|
|
74
80
|
}));
|
|
75
81
|
TimePickerToolbarHourMinuteLabel.propTypes = {
|
|
76
82
|
// ----------------------------- Warning --------------------------------
|
|
@@ -89,23 +95,26 @@ const TimePickerToolbarAmPmSelection = (0, _styles.styled)('div', {
|
|
|
89
95
|
}, {
|
|
90
96
|
[`&.${_timePickerToolbarClasses.timePickerToolbarClasses.ampmLandscape}`]: styles.ampmLandscape
|
|
91
97
|
}, styles.ampmSelection]
|
|
92
|
-
})(
|
|
93
|
-
ownerState
|
|
94
|
-
}) => (0, _extends2.default)({
|
|
98
|
+
})({
|
|
95
99
|
display: 'flex',
|
|
96
100
|
flexDirection: 'column',
|
|
97
101
|
marginRight: 'auto',
|
|
98
|
-
marginLeft: 12
|
|
99
|
-
}, ownerState.isLandscape && {
|
|
100
|
-
margin: '4px 0 auto',
|
|
101
|
-
flexDirection: 'row',
|
|
102
|
-
justifyContent: 'space-around',
|
|
103
|
-
flexBasis: '100%'
|
|
104
|
-
}, {
|
|
102
|
+
marginLeft: 12,
|
|
105
103
|
[`& .${_timePickerToolbarClasses.timePickerToolbarClasses.ampmLabel}`]: {
|
|
106
104
|
fontSize: 17
|
|
107
|
-
}
|
|
108
|
-
|
|
105
|
+
},
|
|
106
|
+
variants: [{
|
|
107
|
+
props: {
|
|
108
|
+
isLandscape: true
|
|
109
|
+
},
|
|
110
|
+
style: {
|
|
111
|
+
margin: '4px 0 auto',
|
|
112
|
+
flexDirection: 'row',
|
|
113
|
+
justifyContent: 'space-around',
|
|
114
|
+
flexBasis: '100%'
|
|
115
|
+
}
|
|
116
|
+
}]
|
|
117
|
+
});
|
|
109
118
|
TimePickerToolbarAmPmSelection.propTypes = {
|
|
110
119
|
// ----------------------------- Warning --------------------------------
|
|
111
120
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
@@ -32,14 +32,20 @@ const PickersYearRoot = (0, _styles.styled)('div', {
|
|
|
32
32
|
name: 'MuiPickersYear',
|
|
33
33
|
slot: 'Root',
|
|
34
34
|
overridesResolver: (_, styles) => [styles.root]
|
|
35
|
-
})(
|
|
36
|
-
ownerState
|
|
37
|
-
}) => ({
|
|
38
|
-
flexBasis: ownerState.yearsPerRow === 3 ? '33.3%' : '25%',
|
|
35
|
+
})({
|
|
39
36
|
display: 'flex',
|
|
40
37
|
alignItems: 'center',
|
|
41
|
-
justifyContent: 'center'
|
|
42
|
-
|
|
38
|
+
justifyContent: 'center',
|
|
39
|
+
flexBasis: '33.3%',
|
|
40
|
+
variants: [{
|
|
41
|
+
props: {
|
|
42
|
+
yearsPerRow: 4
|
|
43
|
+
},
|
|
44
|
+
style: {
|
|
45
|
+
flexBasis: '25%'
|
|
46
|
+
}
|
|
47
|
+
}]
|
|
48
|
+
});
|
|
43
49
|
const PickersYearButton = (0, _styles.styled)('button', {
|
|
44
50
|
name: 'MuiPickersYear',
|
|
45
51
|
slot: 'YearButton',
|
package/node/index.js
CHANGED
|
@@ -5,8 +5,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.PickersArrowSwitcher = void 0;
|
|
8
|
-
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
|
|
9
8
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
|
+
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
|
|
10
10
|
var React = _interopRequireWildcard(require("react"));
|
|
11
11
|
var _clsx = _interopRequireDefault(require("clsx"));
|
|
12
12
|
var _Typography = _interopRequireDefault(require("@mui/material/Typography"));
|
|
@@ -42,11 +42,16 @@ const PickersArrowSwitcherButton = (0, _styles.styled)(_IconButton.default, {
|
|
|
42
42
|
name: 'MuiPickersArrowSwitcher',
|
|
43
43
|
slot: 'Button',
|
|
44
44
|
overridesResolver: (props, styles) => styles.button
|
|
45
|
-
})(
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
}
|
|
45
|
+
})({
|
|
46
|
+
variants: [{
|
|
47
|
+
props: {
|
|
48
|
+
hidden: true
|
|
49
|
+
},
|
|
50
|
+
style: {
|
|
51
|
+
visibility: 'hidden'
|
|
52
|
+
}
|
|
53
|
+
}]
|
|
54
|
+
});
|
|
50
55
|
const useUtilityClasses = ownerState => {
|
|
51
56
|
const {
|
|
52
57
|
classes
|
|
@@ -5,8 +5,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.PickersPopper = PickersPopper;
|
|
8
|
-
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
|
|
9
8
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
|
+
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
|
|
10
10
|
var React = _interopRequireWildcard(require("react"));
|
|
11
11
|
var _utils = require("@mui/base/utils");
|
|
12
12
|
var _Grow = _interopRequireDefault(require("@mui/material/Grow"));
|
|
@@ -46,14 +46,18 @@ const PickersPopperPaper = (0, _styles.styled)(_Paper.default, {
|
|
|
46
46
|
name: 'MuiPickersPopper',
|
|
47
47
|
slot: 'Paper',
|
|
48
48
|
overridesResolver: (_, styles) => styles.paper
|
|
49
|
-
})(
|
|
50
|
-
ownerState
|
|
51
|
-
}) => (0, _extends2.default)({
|
|
49
|
+
})({
|
|
52
50
|
outline: 0,
|
|
53
|
-
transformOrigin: 'top center'
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
51
|
+
transformOrigin: 'top center',
|
|
52
|
+
variants: [{
|
|
53
|
+
props: ({
|
|
54
|
+
placement
|
|
55
|
+
}) => ['top', 'top-start', 'top-end'].includes(placement),
|
|
56
|
+
style: {
|
|
57
|
+
transformOrigin: 'bottom center'
|
|
58
|
+
}
|
|
59
|
+
}]
|
|
60
|
+
});
|
|
57
61
|
function clickedRootScrollbar(event, doc) {
|
|
58
62
|
return doc.documentElement.clientWidth < event.clientX || doc.documentElement.clientHeight < event.clientY;
|
|
59
63
|
}
|