@mui/x-date-pickers 7.0.0-alpha.3 → 7.0.0-alpha.4
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/AdapterLuxon/AdapterLuxon.d.ts +27 -27
- package/AdapterLuxon/AdapterLuxon.js +0 -1
- package/CHANGELOG.md +123 -0
- package/DateCalendar/useCalendarState.js +0 -1
- package/MonthCalendar/MonthCalendar.js +0 -1
- package/MultiSectionDigitalClock/MultiSectionDigitalClockSection.js +8 -2
- package/MultiSectionDigitalClock/multiSectionDigitalClockSectionClasses.js +2 -2
- package/PickersCalendarHeader/PickersCalendarHeader.js +4 -4
- package/TimeClock/Clock.js +0 -1
- package/TimeClock/ClockPointer.js +0 -1
- package/YearCalendar/YearCalendar.js +0 -1
- package/index.js +1 -1
- package/internals/components/PickersTextField/Outline.d.ts +7 -1
- package/internals/components/PickersTextField/Outline.js +2 -4
- package/internals/components/PickersTextField/PickersInput.d.ts +1 -2
- package/internals/components/PickersTextField/PickersInput.js +117 -112
- package/internals/components/PickersTextField/PickersInput.types.d.ts +35 -20
- package/internals/components/PickersTextField/PickersTextField.js +57 -48
- package/internals/components/PickersTextField/PickersTextField.types.d.ts +19 -16
- package/internals/components/PickersTextField/pickersTextFieldClasses.d.ts +11 -7
- package/internals/components/PickersTextField/pickersTextFieldClasses.js +1 -1
- package/internals/constants/dimensions.d.ts +1 -1
- package/internals/constants/dimensions.js +1 -1
- package/internals/demo/DemoContainer.d.ts +4 -0
- package/internals/demo/DemoContainer.js +47 -19
- package/internals/hooks/useClockReferenceDate.js +0 -1
- package/internals/hooks/useField/useField.utils.js +0 -2
- package/internals/hooks/useViews.js +0 -1
- package/legacy/AdapterLuxon/AdapterLuxon.js +0 -1
- package/legacy/DateCalendar/useCalendarState.js +0 -1
- package/legacy/MonthCalendar/MonthCalendar.js +0 -1
- package/legacy/MultiSectionDigitalClock/MultiSectionDigitalClockSection.js +8 -2
- package/legacy/MultiSectionDigitalClock/multiSectionDigitalClockSectionClasses.js +2 -2
- package/legacy/PickersCalendarHeader/PickersCalendarHeader.js +4 -4
- package/legacy/TimeClock/Clock.js +0 -1
- package/legacy/TimeClock/ClockPointer.js +0 -1
- package/legacy/YearCalendar/YearCalendar.js +0 -1
- package/legacy/index.js +1 -1
- package/legacy/internals/components/PickersTextField/Outline.js +1 -4
- package/legacy/internals/components/PickersTextField/PickersInput.js +119 -115
- package/legacy/internals/components/PickersTextField/PickersTextField.js +51 -51
- package/legacy/internals/components/PickersTextField/pickersTextFieldClasses.js +1 -1
- package/legacy/internals/constants/dimensions.js +1 -1
- package/legacy/internals/demo/DemoContainer.js +45 -19
- package/legacy/internals/hooks/useClockReferenceDate.js +0 -1
- package/legacy/internals/hooks/useField/useField.utils.js +0 -2
- package/legacy/internals/hooks/useViews.js +0 -1
- package/legacy/locales/plPL.js +0 -1
- package/legacy/locales/svSE.js +0 -1
- package/legacy/locales/urPK.js +0 -1
- package/locales/plPL.js +0 -1
- package/locales/svSE.js +0 -1
- package/locales/urPK.js +0 -1
- package/modern/AdapterLuxon/AdapterLuxon.js +0 -1
- package/modern/DateCalendar/useCalendarState.js +0 -1
- package/modern/MonthCalendar/MonthCalendar.js +0 -1
- package/modern/MultiSectionDigitalClock/MultiSectionDigitalClockSection.js +8 -2
- package/modern/MultiSectionDigitalClock/multiSectionDigitalClockSectionClasses.js +2 -2
- package/modern/PickersCalendarHeader/PickersCalendarHeader.js +4 -4
- package/modern/TimeClock/Clock.js +0 -1
- package/modern/TimeClock/ClockPointer.js +0 -1
- package/modern/YearCalendar/YearCalendar.js +0 -1
- package/modern/index.js +1 -1
- package/modern/internals/components/PickersTextField/Outline.js +2 -4
- package/modern/internals/components/PickersTextField/PickersInput.js +116 -112
- package/modern/internals/components/PickersTextField/PickersTextField.js +57 -47
- package/modern/internals/components/PickersTextField/pickersTextFieldClasses.js +1 -1
- package/modern/internals/constants/dimensions.js +1 -1
- package/modern/internals/demo/DemoContainer.js +47 -19
- package/modern/internals/hooks/useClockReferenceDate.js +0 -1
- package/modern/internals/hooks/useField/useField.utils.js +0 -2
- package/modern/internals/hooks/useViews.js +0 -1
- package/modern/locales/plPL.js +0 -1
- package/modern/locales/svSE.js +0 -1
- package/modern/locales/urPK.js +0 -1
- package/node/AdapterLuxon/AdapterLuxon.js +0 -1
- package/node/DateCalendar/useCalendarState.js +0 -1
- package/node/MonthCalendar/MonthCalendar.js +0 -1
- package/node/MultiSectionDigitalClock/MultiSectionDigitalClockSection.js +8 -2
- package/node/MultiSectionDigitalClock/multiSectionDigitalClockSectionClasses.js +2 -2
- package/node/PickersCalendarHeader/PickersCalendarHeader.js +4 -4
- package/node/TimeClock/Clock.js +0 -1
- package/node/TimeClock/ClockPointer.js +0 -1
- package/node/YearCalendar/YearCalendar.js +0 -1
- package/node/index.js +1 -1
- package/node/internals/components/PickersTextField/Outline.js +2 -4
- package/node/internals/components/PickersTextField/PickersInput.js +119 -115
- package/node/internals/components/PickersTextField/PickersTextField.js +58 -48
- package/node/internals/components/PickersTextField/pickersTextFieldClasses.js +1 -1
- package/node/internals/constants/dimensions.js +1 -1
- package/node/internals/demo/DemoContainer.js +47 -19
- package/node/internals/hooks/useClockReferenceDate.js +0 -1
- package/node/internals/hooks/useField/useField.utils.js +0 -2
- package/node/internals/hooks/useViews.js +0 -1
- package/node/locales/plPL.js +0 -1
- package/node/locales/svSE.js +0 -1
- package/node/locales/urPK.js +0 -1
- package/package.json +5 -5
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
-
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
3
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
4
|
-
var _excluded = ["
|
|
3
|
+
var _excluded = ["onFocus", "onBlur", "className", "color", "disabled", "error", "required", "variant", "InputProps", "inputProps", "inputRef", "sectionsContainerRef", "elements", "areAllSectionsEmpty", "onClick", "onKeyDown", "onKeyUp", "onPaste", "onInput", "endAdornment", "startAdornment", "tabIndex", "contentEditable", "focused", "value", "onChange", "fullWidth", "id", "helperText", "FormHelperTextProps", "label", "InputLabelProps"];
|
|
5
4
|
import * as React from 'react';
|
|
6
5
|
import clsx from 'clsx';
|
|
7
6
|
import { styled } from '@mui/material/styles';
|
|
@@ -11,7 +10,7 @@ import InputLabel from '@mui/material/InputLabel';
|
|
|
11
10
|
import FormHelperText from '@mui/material/FormHelperText';
|
|
12
11
|
import FormControl from '@mui/material/FormControl';
|
|
13
12
|
import { getPickersTextFieldUtilityClass } from './pickersTextFieldClasses';
|
|
14
|
-
import PickersInput from './PickersInput';
|
|
13
|
+
import { PickersInput } from './PickersInput';
|
|
15
14
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
16
15
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
17
16
|
var PickersTextFieldRoot = styled(FormControl, {
|
|
@@ -32,7 +31,8 @@ var useUtilityClasses = function useUtilityClasses(ownerState) {
|
|
|
32
31
|
return composeClasses(slots, getPickersTextFieldUtilityClass, classes);
|
|
33
32
|
};
|
|
34
33
|
export var PickersTextField = /*#__PURE__*/React.forwardRef(function PickersTextField(props, ref) {
|
|
35
|
-
var
|
|
34
|
+
var onFocus = props.onFocus,
|
|
35
|
+
onBlur = props.onBlur,
|
|
36
36
|
className = props.className,
|
|
37
37
|
_props$color = props.color,
|
|
38
38
|
color = _props$color === void 0 ? 'primary' : _props$color,
|
|
@@ -40,33 +40,38 @@ export var PickersTextField = /*#__PURE__*/React.forwardRef(function PickersText
|
|
|
40
40
|
disabled = _props$disabled === void 0 ? false : _props$disabled,
|
|
41
41
|
_props$error = props.error,
|
|
42
42
|
error = _props$error === void 0 ? false : _props$error,
|
|
43
|
-
|
|
43
|
+
_props$required = props.required,
|
|
44
|
+
required = _props$required === void 0 ? false : _props$required,
|
|
44
45
|
_props$variant = props.variant,
|
|
45
46
|
variant = _props$variant === void 0 ? 'outlined' : _props$variant,
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
47
|
+
InputProps = props.InputProps,
|
|
48
|
+
inputProps = props.inputProps,
|
|
49
|
+
inputRef = props.inputRef,
|
|
50
|
+
sectionsContainerRef = props.sectionsContainerRef,
|
|
51
|
+
elements = props.elements,
|
|
52
|
+
areAllSectionsEmpty = props.areAllSectionsEmpty,
|
|
53
|
+
onClick = props.onClick,
|
|
54
|
+
onKeyDown = props.onKeyDown,
|
|
55
|
+
onKeyUp = props.onKeyUp,
|
|
56
|
+
onPaste = props.onPaste,
|
|
57
|
+
onInput = props.onInput,
|
|
58
|
+
endAdornment = props.endAdornment,
|
|
59
|
+
startAdornment = props.startAdornment,
|
|
60
|
+
tabIndex = props.tabIndex,
|
|
61
|
+
contentEditable = props.contentEditable,
|
|
62
|
+
focused = props.focused,
|
|
63
|
+
value = props.value,
|
|
64
|
+
onChange = props.onChange,
|
|
65
|
+
fullWidth = props.fullWidth,
|
|
66
|
+
idProp = props.id,
|
|
49
67
|
helperText = props.helperText,
|
|
50
|
-
valueType = props.valueType,
|
|
51
|
-
idOverride = props.id,
|
|
52
68
|
FormHelperTextProps = props.FormHelperTextProps,
|
|
69
|
+
label = props.label,
|
|
53
70
|
InputLabelProps = props.InputLabelProps,
|
|
54
|
-
inputProps = props.inputProps,
|
|
55
|
-
InputProps = props.InputProps,
|
|
56
|
-
_props$required = props.required,
|
|
57
|
-
required = _props$required === void 0 ? false : _props$required,
|
|
58
|
-
focusedProp = props.focused,
|
|
59
|
-
ownerStateProp = props.ownerState,
|
|
60
71
|
other = _objectWithoutProperties(props, _excluded);
|
|
61
|
-
var _React$useState = React.useState(focusedProp),
|
|
62
|
-
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
63
|
-
focused = _React$useState2[0],
|
|
64
|
-
setFocused = _React$useState2[1];
|
|
65
72
|
var rootRef = React.useRef(null);
|
|
66
73
|
var handleRootRef = useForkRef(ref, rootRef);
|
|
67
|
-
var
|
|
68
|
-
var handleInputRef = useForkRef(inputRef, InputProps == null ? void 0 : InputProps.ref);
|
|
69
|
-
var id = useId(idOverride);
|
|
74
|
+
var id = useId(idProp);
|
|
70
75
|
var helperTextId = helperText && id ? "".concat(id, "-helper-text") : undefined;
|
|
71
76
|
var inputLabelId = label && id ? "".concat(id, "-label") : undefined;
|
|
72
77
|
var ownerState = _extends({}, props, {
|
|
@@ -74,38 +79,23 @@ export var PickersTextField = /*#__PURE__*/React.forwardRef(function PickersText
|
|
|
74
79
|
disabled: disabled,
|
|
75
80
|
error: error,
|
|
76
81
|
focused: focused,
|
|
82
|
+
required: required,
|
|
77
83
|
variant: variant
|
|
78
84
|
});
|
|
79
85
|
var classes = useUtilityClasses(ownerState);
|
|
80
|
-
|
|
81
|
-
// TODO: delete after behavior implementation
|
|
82
|
-
var onWrapperClick = function onWrapperClick() {
|
|
83
|
-
if (!focused) {
|
|
84
|
-
var _inputRef$current;
|
|
85
|
-
setFocused(true);
|
|
86
|
-
var container = rootRef.current;
|
|
87
|
-
|
|
88
|
-
// Find the first input element within the container
|
|
89
|
-
var firstInput = container == null ? void 0 : container.querySelector('.content');
|
|
90
|
-
|
|
91
|
-
// Check if the input element exists before focusing it
|
|
92
|
-
if (firstInput) {
|
|
93
|
-
firstInput.focus();
|
|
94
|
-
}
|
|
95
|
-
(_inputRef$current = inputRef.current) == null || _inputRef$current.focus();
|
|
96
|
-
}
|
|
97
|
-
};
|
|
98
|
-
return /*#__PURE__*/_jsxs(PickersTextFieldRoot, {
|
|
86
|
+
return /*#__PURE__*/_jsxs(PickersTextFieldRoot, _extends({
|
|
99
87
|
className: clsx(classes.root, className),
|
|
100
88
|
ref: handleRootRef,
|
|
101
89
|
focused: focused,
|
|
90
|
+
onFocus: onFocus,
|
|
91
|
+
onBlur: onBlur,
|
|
102
92
|
disabled: disabled,
|
|
103
93
|
variant: variant,
|
|
104
94
|
error: error,
|
|
105
95
|
color: color,
|
|
106
|
-
fullWidth: fullWidth,
|
|
107
96
|
required: required,
|
|
108
|
-
ownerState: ownerState
|
|
97
|
+
ownerState: ownerState
|
|
98
|
+
}, other, {
|
|
109
99
|
children: [/*#__PURE__*/_jsx(InputLabel, _extends({
|
|
110
100
|
htmlFor: id,
|
|
111
101
|
id: inputLabelId
|
|
@@ -113,17 +103,27 @@ export var PickersTextField = /*#__PURE__*/React.forwardRef(function PickersText
|
|
|
113
103
|
children: label
|
|
114
104
|
})), /*#__PURE__*/_jsx(PickersInput, _extends({
|
|
115
105
|
elements: elements,
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
106
|
+
areAllSectionsEmpty: areAllSectionsEmpty,
|
|
107
|
+
onClick: onClick,
|
|
108
|
+
onKeyDown: onKeyDown,
|
|
109
|
+
onInput: onInput,
|
|
110
|
+
onPaste: onPaste,
|
|
111
|
+
endAdornment: endAdornment,
|
|
112
|
+
startAdornment: startAdornment,
|
|
113
|
+
tabIndex: tabIndex,
|
|
114
|
+
contentEditable: contentEditable,
|
|
115
|
+
value: value,
|
|
116
|
+
onChange: onChange,
|
|
117
|
+
id: id,
|
|
118
|
+
fullWidth: fullWidth,
|
|
119
119
|
inputProps: inputProps,
|
|
120
|
+
inputRef: inputRef,
|
|
121
|
+
sectionsContainerRef: sectionsContainerRef,
|
|
120
122
|
label: label
|
|
121
|
-
},
|
|
122
|
-
ref: handleInputRef
|
|
123
|
-
})), helperText && /*#__PURE__*/_jsx(FormHelperText, _extends({
|
|
123
|
+
}, InputProps)), helperText && /*#__PURE__*/_jsx(FormHelperText, _extends({
|
|
124
124
|
id: helperTextId
|
|
125
125
|
}, FormHelperTextProps, {
|
|
126
126
|
children: helperText
|
|
127
127
|
}))]
|
|
128
|
-
});
|
|
128
|
+
}));
|
|
129
129
|
});
|
|
@@ -6,4 +6,4 @@ export var pickersTextFieldClasses = generateUtilityClasses('MuiPickersTextField
|
|
|
6
6
|
export function getPickersInputUtilityClass(slot) {
|
|
7
7
|
return generateUtilityClass('MuiPickersInput', slot);
|
|
8
8
|
}
|
|
9
|
-
export var pickersInputClasses = generateUtilityClasses('MuiPickersInput', ['root', 'focused', 'disabled', 'error', 'notchedOutline', '
|
|
9
|
+
export var pickersInputClasses = generateUtilityClasses('MuiPickersInput', ['root', 'focused', 'disabled', 'error', 'notchedOutline', 'adornedStart', 'adornedEnd', 'input', 'sectionsContainer', 'sectionContent', 'sectionBefore', 'sectionAfter']);
|
|
@@ -2,6 +2,6 @@ export var DAY_SIZE = 36;
|
|
|
2
2
|
export var DAY_MARGIN = 2;
|
|
3
3
|
export var DIALOG_WIDTH = 320;
|
|
4
4
|
export var MAX_CALENDAR_HEIGHT = 280;
|
|
5
|
-
export var VIEW_HEIGHT =
|
|
5
|
+
export var VIEW_HEIGHT = 336;
|
|
6
6
|
export var DIGITAL_CLOCK_VIEW_HEIGHT = 232;
|
|
7
7
|
export var MULTI_SECTION_CLOCK_SECTION_WIDTH = 48;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
1
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
2
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
3
|
import * as React from 'react';
|
|
4
|
-
import Stack from '@mui/material/Stack';
|
|
4
|
+
import Stack, { stackClasses } from '@mui/material/Stack';
|
|
5
5
|
import Typography from '@mui/material/Typography';
|
|
6
6
|
import { textFieldClasses } from '@mui/material/TextField';
|
|
7
7
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -40,17 +40,17 @@ var getSupportedSectionFromChildName = function getSupportedSectionFromChildName
|
|
|
40
40
|
export function DemoItem(props) {
|
|
41
41
|
var label = props.label,
|
|
42
42
|
children = props.children,
|
|
43
|
-
component = props.component
|
|
43
|
+
component = props.component,
|
|
44
|
+
sxProp = props.sx;
|
|
44
45
|
var spacing;
|
|
45
|
-
var sx;
|
|
46
|
+
var sx = sxProp;
|
|
46
47
|
if (component && getChildTypeFromChildName(component) === 'multi-input-range-field') {
|
|
47
48
|
spacing = 1.5;
|
|
48
|
-
sx = _defineProperty({}, "& .".concat(textFieldClasses.root), {
|
|
49
|
+
sx = _extends({}, sx, _defineProperty({}, "& .".concat(textFieldClasses.root), {
|
|
49
50
|
flexGrow: 1
|
|
50
|
-
});
|
|
51
|
+
}));
|
|
51
52
|
} else {
|
|
52
53
|
spacing = 1;
|
|
53
|
-
sx = undefined;
|
|
54
54
|
}
|
|
55
55
|
return /*#__PURE__*/_jsxs(Stack, {
|
|
56
56
|
direction: "column",
|
|
@@ -63,7 +63,14 @@ export function DemoItem(props) {
|
|
|
63
63
|
}), children]
|
|
64
64
|
});
|
|
65
65
|
}
|
|
66
|
-
|
|
66
|
+
DemoItem.displayName = 'DemoItem';
|
|
67
|
+
var isDemoItem = function isDemoItem(child) {
|
|
68
|
+
if ( /*#__PURE__*/React.isValidElement(child) && typeof child.type !== 'string') {
|
|
69
|
+
// @ts-ignore
|
|
70
|
+
return child.type.displayName === 'DemoItem';
|
|
71
|
+
}
|
|
72
|
+
return false;
|
|
73
|
+
};
|
|
67
74
|
/**
|
|
68
75
|
* WARNING: This is an internal component used in documentation to achieve a desired layout.
|
|
69
76
|
* Please do not use it in your application.
|
|
@@ -86,6 +93,8 @@ export function DemoContainer(props) {
|
|
|
86
93
|
};
|
|
87
94
|
var direction;
|
|
88
95
|
var spacing;
|
|
96
|
+
var extraSx = {};
|
|
97
|
+
var demoItemSx = {};
|
|
89
98
|
var sx = _extends({
|
|
90
99
|
overflow: 'auto',
|
|
91
100
|
// Add padding as overflow can hide the outline text field label.
|
|
@@ -108,30 +117,47 @@ export function DemoContainer(props) {
|
|
|
108
117
|
// noop
|
|
109
118
|
} else if (childrenTypes.has('single-input-range-field')) {
|
|
110
119
|
if (!childrenSupportedSections.has('date-time')) {
|
|
111
|
-
|
|
120
|
+
extraSx = _defineProperty({}, "& > .".concat(textFieldClasses.root), {
|
|
112
121
|
minWidth: 300
|
|
113
|
-
})
|
|
122
|
+
});
|
|
114
123
|
} else {
|
|
115
|
-
|
|
124
|
+
extraSx = _defineProperty({}, "& > .".concat(textFieldClasses.root), {
|
|
116
125
|
minWidth: {
|
|
117
126
|
xs: 300,
|
|
118
|
-
|
|
127
|
+
// If demo also contains MultiInputDateTimeRangeField, increase width to avoid cutting off the value.
|
|
128
|
+
md: childrenTypes.has('multi-input-range-field') ? 460 : 400
|
|
119
129
|
}
|
|
120
|
-
})
|
|
130
|
+
});
|
|
121
131
|
}
|
|
122
132
|
} else if (childrenSupportedSections.has('date-time')) {
|
|
123
|
-
|
|
133
|
+
extraSx = _defineProperty({}, "& > .".concat(textFieldClasses.root), {
|
|
124
134
|
minWidth: 270
|
|
125
|
-
})
|
|
135
|
+
});
|
|
136
|
+
if (childrenTypes.has('multi-input-range-field')) {
|
|
137
|
+
// increase width for the multi input date time range fields
|
|
138
|
+
demoItemSx = _defineProperty({}, "& > .".concat(stackClasses.root, " > .").concat(textFieldClasses.root), {
|
|
139
|
+
minWidth: 210
|
|
140
|
+
});
|
|
141
|
+
}
|
|
126
142
|
} else {
|
|
127
|
-
|
|
143
|
+
extraSx = _defineProperty({}, "& > .".concat(textFieldClasses.root), {
|
|
128
144
|
minWidth: 200
|
|
129
|
-
})
|
|
145
|
+
});
|
|
130
146
|
}
|
|
147
|
+
var finalSx = _extends({}, sx, extraSx);
|
|
131
148
|
return /*#__PURE__*/_jsx(Stack, {
|
|
132
149
|
direction: direction,
|
|
133
150
|
spacing: spacing,
|
|
134
|
-
sx:
|
|
135
|
-
children: children
|
|
151
|
+
sx: finalSx,
|
|
152
|
+
children: React.Children.map(children, function (child) {
|
|
153
|
+
if ( /*#__PURE__*/React.isValidElement(child) && isDemoItem(child)) {
|
|
154
|
+
// Inject sx styles to the `DemoItem` if it is a direct child of `DemoContainer`.
|
|
155
|
+
// @ts-ignore
|
|
156
|
+
return /*#__PURE__*/React.cloneElement(child, {
|
|
157
|
+
sx: _extends({}, extraSx, demoItemSx)
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
return child;
|
|
161
|
+
})
|
|
136
162
|
});
|
|
137
163
|
}
|
|
@@ -133,7 +133,6 @@ export var adjustSectionValue = function adjustSectionValue(utils, timezone, sec
|
|
|
133
133
|
if (delta < 0 || isStart) {
|
|
134
134
|
newSectionValueNumber += step - (step + newSectionValueNumber) % step; // for JS -3 % 5 = -3 (should be 2)
|
|
135
135
|
}
|
|
136
|
-
|
|
137
136
|
if (delta > 0 || isEnd) {
|
|
138
137
|
newSectionValueNumber -= newSectionValueNumber % step;
|
|
139
138
|
}
|
|
@@ -413,7 +412,6 @@ export var splitFormatIntoSections = function splitFormatIntoSections(utils, tim
|
|
|
413
412
|
}) // Sort to put longest word first
|
|
414
413
|
.join('|'), ")"), 'g') // used to get access to lastIndex state
|
|
415
414
|
;
|
|
416
|
-
|
|
417
415
|
var currentTokenValue = '';
|
|
418
416
|
var _loop = function _loop(_i) {
|
|
419
417
|
var escapedPartOfCurrentChar = escapedParts.find(function (escapeIndex) {
|
package/legacy/locales/plPL.js
CHANGED
package/legacy/locales/svSE.js
CHANGED
package/legacy/locales/urPK.js
CHANGED
package/locales/plPL.js
CHANGED
package/locales/svSE.js
CHANGED
package/locales/urPK.js
CHANGED
|
@@ -230,7 +230,6 @@ export class AdapterLuxon {
|
|
|
230
230
|
if (typeof Intl === 'undefined' || typeof Intl.DateTimeFormat === 'undefined') {
|
|
231
231
|
return true; // Luxon defaults to en-US if Intl not found
|
|
232
232
|
}
|
|
233
|
-
|
|
234
233
|
return Boolean(new Intl.DateTimeFormat(this.locale, {
|
|
235
234
|
hour: 'numeric'
|
|
236
235
|
})?.resolvedOptions()?.hour12);
|
|
@@ -110,7 +110,6 @@ export const MonthCalendar = /*#__PURE__*/React.forwardRef(function MonthCalenda
|
|
|
110
110
|
granularity: SECTION_TYPE_GRANULARITY.month
|
|
111
111
|
}), [] // eslint-disable-line react-hooks/exhaustive-deps
|
|
112
112
|
);
|
|
113
|
-
|
|
114
113
|
const ownerState = props;
|
|
115
114
|
const classes = useUtilityClasses(ownerState);
|
|
116
115
|
const todayMonth = React.useMemo(() => utils.getMonth(now), [utils, now]);
|
|
@@ -36,7 +36,12 @@ const MultiSectionDigitalClockSectionRoot = styled(MenuList, {
|
|
|
36
36
|
'@media (prefers-reduced-motion: no-preference)': {
|
|
37
37
|
scrollBehavior: ownerState.alreadyRendered ? 'smooth' : 'auto'
|
|
38
38
|
},
|
|
39
|
-
'
|
|
39
|
+
'@media (pointer: fine)': {
|
|
40
|
+
'&:hover': {
|
|
41
|
+
overflowY: 'auto'
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
'@media (pointer: none), (pointer: coarse)': {
|
|
40
45
|
overflowY: 'auto'
|
|
41
46
|
},
|
|
42
47
|
'&:not(:first-of-type)': {
|
|
@@ -152,7 +157,8 @@ export const MultiSectionDigitalClockSection = /*#__PURE__*/React.forwardRef(fun
|
|
|
152
157
|
"aria-disabled": readOnly,
|
|
153
158
|
"aria-label": option.ariaLabel,
|
|
154
159
|
"aria-selected": isSelected,
|
|
155
|
-
tabIndex: tabIndex
|
|
160
|
+
tabIndex: tabIndex,
|
|
161
|
+
className: classes.item
|
|
156
162
|
}, slotProps?.digitalClockSectionItem, {
|
|
157
163
|
children: option.label
|
|
158
164
|
}), option.label);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import generateUtilityClass from '@mui/utils/generateUtilityClass';
|
|
2
2
|
import generateUtilityClasses from '@mui/utils/generateUtilityClasses';
|
|
3
3
|
export function getMultiSectionDigitalClockSectionUtilityClass(slot) {
|
|
4
|
-
return generateUtilityClass('
|
|
4
|
+
return generateUtilityClass('MuiMultiSectionDigitalClockSection', slot);
|
|
5
5
|
}
|
|
6
|
-
export const multiSectionDigitalClockSectionClasses = generateUtilityClasses('
|
|
6
|
+
export const multiSectionDigitalClockSectionClasses = generateUtilityClasses('MuiMultiSectionDigitalClockSection', ['root', 'item']);
|
|
@@ -38,13 +38,13 @@ const PickersCalendarHeaderRoot = styled('div', {
|
|
|
38
38
|
})({
|
|
39
39
|
display: 'flex',
|
|
40
40
|
alignItems: 'center',
|
|
41
|
-
marginTop:
|
|
42
|
-
marginBottom:
|
|
41
|
+
marginTop: 12,
|
|
42
|
+
marginBottom: 4,
|
|
43
43
|
paddingLeft: 24,
|
|
44
44
|
paddingRight: 12,
|
|
45
45
|
// prevent jumping in safari
|
|
46
|
-
maxHeight:
|
|
47
|
-
minHeight:
|
|
46
|
+
maxHeight: 40,
|
|
47
|
+
minHeight: 40
|
|
48
48
|
});
|
|
49
49
|
const PickersCalendarHeaderLabelContainer = styled('div', {
|
|
50
50
|
name: 'MuiPickersCalendarHeader',
|
|
@@ -115,7 +115,6 @@ export const YearCalendar = /*#__PURE__*/React.forwardRef(function YearCalendar(
|
|
|
115
115
|
granularity: SECTION_TYPE_GRANULARITY.year
|
|
116
116
|
}), [] // eslint-disable-line react-hooks/exhaustive-deps
|
|
117
117
|
);
|
|
118
|
-
|
|
119
118
|
const ownerState = props;
|
|
120
119
|
const classes = useUtilityClasses(ownerState);
|
|
121
120
|
const todayYear = React.useMemo(() => utils.getYear(now), [utils, now]);
|
package/modern/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
2
2
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
|
-
const _excluded = ["children", "
|
|
3
|
+
const _excluded = ["children", "className", "label"];
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import { styled } from '@mui/material/styles';
|
|
6
6
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -69,13 +69,11 @@ const OutlineLegend = styled('legend')(({
|
|
|
69
69
|
export default function Outline(props) {
|
|
70
70
|
const {
|
|
71
71
|
className,
|
|
72
|
-
label
|
|
73
|
-
notched
|
|
72
|
+
label
|
|
74
73
|
} = props,
|
|
75
74
|
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
76
75
|
const withLabel = label != null && label !== '';
|
|
77
76
|
const ownerState = _extends({}, props, {
|
|
78
|
-
notched,
|
|
79
77
|
withLabel
|
|
80
78
|
});
|
|
81
79
|
return /*#__PURE__*/_jsx(OutlineRoot, _extends({
|