@mui/x-date-pickers 7.10.0 → 7.11.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 +85 -0
- package/DesktopDateTimePicker/DesktopDateTimePickerLayout.d.ts +4 -4
- package/DesktopDateTimePicker/DesktopDateTimePickerLayout.js +2 -3
- package/PickersCalendarHeader/PickersCalendarHeader.js +1 -1
- package/PickersCalendarHeader/PickersCalendarHeader.types.d.ts +1 -1
- package/PickersLayout/PickersLayout.d.ts +4 -4
- package/PickersLayout/PickersLayout.js +2 -4
- package/PickersLayout/PickersLayout.types.d.ts +0 -4
- package/PickersTextField/PickersInput/pickersInputClasses.d.ts +1 -1
- package/TimeClock/Clock.js +21 -32
- package/TimeClock/clockClasses.d.ts +2 -0
- package/TimeClock/clockClasses.js +1 -1
- package/index.js +1 -1
- package/internals/components/PickersArrowSwitcher/PickersArrowSwitcher.js +11 -5
- package/internals/components/PickersArrowSwitcher/PickersArrowSwitcher.types.d.ts +2 -2
- package/internals/components/PickersArrowSwitcher/pickersArrowSwitcherClasses.d.ts +9 -1
- package/internals/components/PickersArrowSwitcher/pickersArrowSwitcherClasses.js +1 -1
- package/locales/koKR.js +14 -16
- package/locales/ruRU.js +15 -18
- package/models/pickers.d.ts +1 -1
- package/modern/DesktopDateTimePicker/DesktopDateTimePickerLayout.js +2 -3
- package/modern/PickersCalendarHeader/PickersCalendarHeader.js +1 -1
- package/modern/PickersLayout/PickersLayout.js +2 -4
- package/modern/TimeClock/Clock.js +21 -32
- package/modern/TimeClock/clockClasses.js +1 -1
- package/modern/index.js +1 -1
- package/modern/internals/components/PickersArrowSwitcher/PickersArrowSwitcher.js +11 -5
- package/modern/internals/components/PickersArrowSwitcher/pickersArrowSwitcherClasses.js +1 -1
- package/modern/locales/koKR.js +14 -16
- package/modern/locales/ruRU.js +15 -18
- package/node/DesktopDateTimePicker/DesktopDateTimePickerLayout.js +3 -4
- package/node/PickersCalendarHeader/PickersCalendarHeader.js +1 -1
- package/node/PickersLayout/PickersLayout.js +2 -4
- package/node/TimeClock/Clock.js +21 -32
- package/node/TimeClock/clockClasses.js +1 -1
- package/node/index.js +1 -1
- package/node/internals/components/PickersArrowSwitcher/PickersArrowSwitcher.js +11 -5
- package/node/internals/components/PickersArrowSwitcher/pickersArrowSwitcherClasses.js +1 -1
- package/node/locales/koKR.js +14 -16
- package/node/locales/ruRU.js +15 -18
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,91 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## 7.11.0
|
|
7
|
+
|
|
8
|
+
_Jul 18, 2024_
|
|
9
|
+
|
|
10
|
+
We'd like to offer a big thanks to the 13 contributors who made this release possible. Here are some highlights ✨:
|
|
11
|
+
|
|
12
|
+
- 🎨 Add [color legend](https://mui.com/x/react-charts/legend/#color-legend) for charts (#13700) @alexfauquette
|
|
13
|
+
- 🌍 Improve Korean (ko-KR) locale on the Date and Time Pickers
|
|
14
|
+
- 🌍 Improve Russian (ru-RU) locale on the Date and Time Pickers and Data Grid
|
|
15
|
+
- 🐞 Bugfixes
|
|
16
|
+
- 📚 Documentation improvements
|
|
17
|
+
|
|
18
|
+
<!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
|
|
19
|
+
|
|
20
|
+
### Data Grid
|
|
21
|
+
|
|
22
|
+
#### `@mui/x-data-grid@7.11.0`
|
|
23
|
+
|
|
24
|
+
- [DataGrid] Expose `gridEditRowsStateSelector` (#13877) @romgrk
|
|
25
|
+
- [DataGrid] Fix `columnResizeStop` event not emitted when column is not resized (#13307) @mateuseap
|
|
26
|
+
- [DataGrid] Fix delete filter inconsistent behavior (#13353) @oukunan
|
|
27
|
+
- [DataGrid] Enable flip on preferences panel (#13803) @romgrk
|
|
28
|
+
- [DataGrid] Support `date` and `datetime-local` input types in `GridFilterInputMultipleValue` type (#13411) @karudedios
|
|
29
|
+
- [l10n] Improve Russian (ru-RU) locale (#13735) @diro-atk
|
|
30
|
+
|
|
31
|
+
#### `@mui/x-data-grid-pro@7.11.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
32
|
+
|
|
33
|
+
Same changes as in `@mui/x-data-grid@7.11.0`.
|
|
34
|
+
|
|
35
|
+
#### `@mui/x-data-grid-premium@7.11.0` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
36
|
+
|
|
37
|
+
Same changes as in `@mui/x-data-grid-pro@7.11.0`.
|
|
38
|
+
|
|
39
|
+
### Date and Time Pickers
|
|
40
|
+
|
|
41
|
+
#### `@mui/x-date-pickers@7.11.0`
|
|
42
|
+
|
|
43
|
+
- [l10n] Improve Korean (ko-KR) locale (#13651) @100pearlcent
|
|
44
|
+
- [l10n] Improve Russian (ru-RU) locale (#13871) @Inv1x
|
|
45
|
+
- [pickers] Add more conformance tests improving API docs precision (#13800) @LukasTy
|
|
46
|
+
- [TimePicker] Add `Mui-selected` class to `TimeClock` meridiem buttons (#13848) @LukasTy
|
|
47
|
+
|
|
48
|
+
#### `@mui/x-date-pickers-pro@7.11.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
49
|
+
|
|
50
|
+
Same changes as in `@mui/x-date-pickers@7.11.0`, plus:
|
|
51
|
+
|
|
52
|
+
- [DateRangePicker] Fix `name` prop propagation regression (#13821) @LukasTy
|
|
53
|
+
|
|
54
|
+
### Charts
|
|
55
|
+
|
|
56
|
+
#### `@mui/x-charts@7.11.0`
|
|
57
|
+
|
|
58
|
+
- [charts] Create color legend (#13700) @alexfauquette
|
|
59
|
+
- [charts] Defaultize axis on top level `useChartContainerProps` (#13817) @JCQuintas
|
|
60
|
+
- [charts] Fix charts not passing `className` to root element (#13647) @JCQuintas
|
|
61
|
+
- [charts] Generate API documentation for pro components (#13822) @alexfauquette
|
|
62
|
+
- [charts] Improve zoomed highlight behaviour (unreleased) (#13868) @JCQuintas
|
|
63
|
+
- [charts] Allow zoom on Y axis and add zoom options to configure zooming behaviour (unreleased) (#13726) @JCQuintas
|
|
64
|
+
- [charts] Disable animations while zooming (unreleased) (#13807) @JCQuintas
|
|
65
|
+
|
|
66
|
+
### Tree View
|
|
67
|
+
|
|
68
|
+
#### `@mui/x-tree-view@7.11.0`
|
|
69
|
+
|
|
70
|
+
- [TreeView] Extract some logic outside of the `useTreeView` hook (#13845) @flaviendelangle
|
|
71
|
+
|
|
72
|
+
### Docs
|
|
73
|
+
|
|
74
|
+
- [docs] Add warning about `process.env.NODE_ENV` in production (#13869) @cherniavskii
|
|
75
|
+
- [docs] Allow controlling the demo form from the example (#13796) @JCQuintas
|
|
76
|
+
- [docs] Clarify Pickers clearable behavior not working on mobile (#13786) @lnhrdt
|
|
77
|
+
- [docs] Improve the documentation of the picker's `onChange` and `onAccept` props (#13543) @flaviendelangle
|
|
78
|
+
- [docs] Replace company name with project name @oliviertassinari
|
|
79
|
+
- [docs] Sort Pickers & Charts API slots alphabetically (#13843) @LukasTy
|
|
80
|
+
|
|
81
|
+
### Core
|
|
82
|
+
|
|
83
|
+
- [core] Add MUI Internal `renovate` group (#13846) @LukasTy
|
|
84
|
+
- [core] Link GitHub issue for `import/prefer-default-export` rule @oliviertassinari
|
|
85
|
+
- [core] Normalize `...other` and test imports in charts (#13844) @JCQuintas
|
|
86
|
+
- [core] Normalize rest / other to match the most common used @oliviertassinari
|
|
87
|
+
- [code-infra] Follow `next` tag for `@mui/docs` package bumps (#13813) @LukasTy
|
|
88
|
+
- [code-infra] Use specific version for `@mui/docs` dependency (#13760) @LukasTy
|
|
89
|
+
- [internals] Move `EventManager` to `@mui/x-internals` package (#13815) @flaviendelangle
|
|
90
|
+
|
|
6
91
|
## 7.10.0
|
|
7
92
|
|
|
8
93
|
_Jul 11, 2024_
|
|
@@ -2,11 +2,11 @@ import * as React from 'react';
|
|
|
2
2
|
import { PickersLayoutProps } from '../PickersLayout';
|
|
3
3
|
import { PickerValidDate } from '../models';
|
|
4
4
|
import { DateOrTimeViewWithMeridiem } from '../internals/models/common';
|
|
5
|
+
type DesktopDateTimePickerLayoutComponent = (<TValue, TDate extends PickerValidDate, TView extends DateOrTimeViewWithMeridiem>(props: PickersLayoutProps<TValue, TDate, TView> & React.RefAttributes<HTMLDivElement>) => React.JSX.Element) & {
|
|
6
|
+
propTypes?: any;
|
|
7
|
+
};
|
|
5
8
|
/**
|
|
6
9
|
* @ignore - internal component.
|
|
7
10
|
*/
|
|
8
|
-
declare
|
|
9
|
-
declare namespace DesktopDateTimePickerLayout {
|
|
10
|
-
var propTypes: any;
|
|
11
|
-
}
|
|
11
|
+
declare const DesktopDateTimePickerLayout: DesktopDateTimePickerLayoutComponent;
|
|
12
12
|
export { DesktopDateTimePickerLayout };
|
|
@@ -9,7 +9,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
9
9
|
/**
|
|
10
10
|
* @ignore - internal component.
|
|
11
11
|
*/
|
|
12
|
-
function DesktopDateTimePickerLayout(props) {
|
|
12
|
+
const DesktopDateTimePickerLayout = /*#__PURE__*/React.forwardRef(function DesktopDateTimePickerLayout(props, ref) {
|
|
13
13
|
const isRtl = useRtl();
|
|
14
14
|
const {
|
|
15
15
|
toolbar,
|
|
@@ -22,7 +22,6 @@ function DesktopDateTimePickerLayout(props) {
|
|
|
22
22
|
sx,
|
|
23
23
|
className,
|
|
24
24
|
isLandscape,
|
|
25
|
-
ref,
|
|
26
25
|
classes
|
|
27
26
|
} = props;
|
|
28
27
|
const isActionBarVisible = actionBar && (actionBar.props.actions?.length ?? 0) > 0;
|
|
@@ -55,7 +54,7 @@ function DesktopDateTimePickerLayout(props) {
|
|
|
55
54
|
})]
|
|
56
55
|
}), actionBar]
|
|
57
56
|
});
|
|
58
|
-
}
|
|
57
|
+
});
|
|
59
58
|
process.env.NODE_ENV !== "production" ? DesktopDateTimePickerLayout.propTypes = {
|
|
60
59
|
// ----------------------------- Warning --------------------------------
|
|
61
60
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
@@ -152,7 +152,7 @@ const PickersCalendarHeader = /*#__PURE__*/React.forwardRef(function PickersCale
|
|
|
152
152
|
const _useSlotProps = useSlotProps({
|
|
153
153
|
elementType: SwitchViewIcon,
|
|
154
154
|
externalSlotProps: slotProps?.switchViewIcon,
|
|
155
|
-
ownerState
|
|
155
|
+
ownerState,
|
|
156
156
|
className: classes.switchViewIcon
|
|
157
157
|
}),
|
|
158
158
|
switchViewIconProps = _objectWithoutPropertiesLoose(_useSlotProps, _excluded2);
|
|
@@ -25,7 +25,7 @@ export interface PickersCalendarHeaderSlotPropsOverrides {
|
|
|
25
25
|
export type PickersCalendarHeaderOwnerState<TDate extends PickerValidDate> = PickersCalendarHeaderProps<TDate>;
|
|
26
26
|
export interface PickersCalendarHeaderSlotProps<TDate extends PickerValidDate> extends PickersArrowSwitcherSlotProps {
|
|
27
27
|
switchViewButton?: SlotComponentProps<typeof IconButton, PickersCalendarHeaderSlotPropsOverrides, PickersCalendarHeaderOwnerState<TDate>>;
|
|
28
|
-
switchViewIcon?: SlotComponentProps<typeof SvgIcon, PickersCalendarHeaderSlotPropsOverrides,
|
|
28
|
+
switchViewIcon?: SlotComponentProps<typeof SvgIcon, PickersCalendarHeaderSlotPropsOverrides, PickersCalendarHeaderOwnerState<TDate>>;
|
|
29
29
|
}
|
|
30
30
|
export interface PickersCalendarHeaderProps<TDate extends PickerValidDate> extends ExportedPickersArrowSwitcherProps, MonthValidationOptions<TDate> {
|
|
31
31
|
/**
|
|
@@ -6,6 +6,9 @@ export declare const PickersLayoutRoot: import("@emotion/styled").StyledComponen
|
|
|
6
6
|
ownerState: PickersLayoutProps<any, any, any>;
|
|
7
7
|
}, Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof React.ClassAttributes<HTMLDivElement> | keyof React.HTMLAttributes<HTMLDivElement>>, {}>;
|
|
8
8
|
export declare const PickersLayoutContentWrapper: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof React.ClassAttributes<HTMLDivElement> | keyof React.HTMLAttributes<HTMLDivElement>>, {}>;
|
|
9
|
+
type PickersLayoutComponent = (<TValue, TDate extends PickerValidDate, TView extends DateOrTimeViewWithMeridiem>(props: PickersLayoutProps<TValue, TDate, TView> & React.RefAttributes<HTMLDivElement>) => React.JSX.Element) & {
|
|
10
|
+
propTypes?: any;
|
|
11
|
+
};
|
|
9
12
|
/**
|
|
10
13
|
* Demos:
|
|
11
14
|
*
|
|
@@ -15,8 +18,5 @@ export declare const PickersLayoutContentWrapper: import("@emotion/styled").Styl
|
|
|
15
18
|
*
|
|
16
19
|
* - [PickersLayout API](https://mui.com/x/api/date-pickers/pickers-layout/)
|
|
17
20
|
*/
|
|
18
|
-
declare const PickersLayout:
|
|
19
|
-
<TValue, TDate extends PickerValidDate, TView extends DateOrTimeViewWithMeridiem>(inProps: PickersLayoutProps<TValue, TDate, TView>): React.JSX.Element;
|
|
20
|
-
propTypes: any;
|
|
21
|
-
};
|
|
21
|
+
declare const PickersLayout: PickersLayoutComponent;
|
|
22
22
|
export { PickersLayout };
|
|
@@ -89,7 +89,6 @@ export const PickersLayoutContentWrapper = styled('div', {
|
|
|
89
89
|
display: 'flex',
|
|
90
90
|
flexDirection: 'column'
|
|
91
91
|
});
|
|
92
|
-
|
|
93
92
|
/**
|
|
94
93
|
* Demos:
|
|
95
94
|
*
|
|
@@ -99,7 +98,7 @@ export const PickersLayoutContentWrapper = styled('div', {
|
|
|
99
98
|
*
|
|
100
99
|
* - [PickersLayout API](https://mui.com/x/api/date-pickers/pickers-layout/)
|
|
101
100
|
*/
|
|
102
|
-
const PickersLayout = function PickersLayout(inProps) {
|
|
101
|
+
const PickersLayout = /*#__PURE__*/React.forwardRef(function PickersLayout(inProps, ref) {
|
|
103
102
|
const props = useThemeProps({
|
|
104
103
|
props: inProps,
|
|
105
104
|
name: 'MuiPickersLayout'
|
|
@@ -115,7 +114,6 @@ const PickersLayout = function PickersLayout(inProps) {
|
|
|
115
114
|
sx,
|
|
116
115
|
className,
|
|
117
116
|
isLandscape,
|
|
118
|
-
ref,
|
|
119
117
|
wrapperVariant
|
|
120
118
|
} = props;
|
|
121
119
|
const classes = useUtilityClasses(props);
|
|
@@ -133,7 +131,7 @@ const PickersLayout = function PickersLayout(inProps) {
|
|
|
133
131
|
})
|
|
134
132
|
}), actionBar]
|
|
135
133
|
});
|
|
136
|
-
};
|
|
134
|
+
});
|
|
137
135
|
process.env.NODE_ENV !== "production" ? PickersLayout.propTypes = {
|
|
138
136
|
// ----------------------------- Warning --------------------------------
|
|
139
137
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
@@ -76,10 +76,6 @@ export interface PickersLayoutProps<TValue, TDate extends PickerValidDate, TView
|
|
|
76
76
|
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
77
77
|
*/
|
|
78
78
|
sx?: SxProps<Theme>;
|
|
79
|
-
/**
|
|
80
|
-
* Ref to pass to the root element
|
|
81
|
-
*/
|
|
82
|
-
ref?: React.Ref<HTMLDivElement>;
|
|
83
79
|
/**
|
|
84
80
|
* Override or extend the styles applied to the component.
|
|
85
81
|
*/
|
package/TimeClock/Clock.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
1
2
|
import * as React from 'react';
|
|
2
3
|
import clsx from 'clsx';
|
|
3
4
|
import IconButton from '@mui/material/IconButton';
|
|
@@ -13,7 +14,8 @@ import { formatMeridiem } from '../internals/utils/date-utils';
|
|
|
13
14
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
14
15
|
const useUtilityClasses = ownerState => {
|
|
15
16
|
const {
|
|
16
|
-
classes
|
|
17
|
+
classes,
|
|
18
|
+
meridiemMode
|
|
17
19
|
} = ownerState;
|
|
18
20
|
const slots = {
|
|
19
21
|
root: ['root'],
|
|
@@ -21,8 +23,8 @@ const useUtilityClasses = ownerState => {
|
|
|
21
23
|
wrapper: ['wrapper'],
|
|
22
24
|
squareMask: ['squareMask'],
|
|
23
25
|
pin: ['pin'],
|
|
24
|
-
amButton: ['amButton'],
|
|
25
|
-
pmButton: ['pmButton'],
|
|
26
|
+
amButton: ['amButton', meridiemMode === 'am' && 'selected'],
|
|
27
|
+
pmButton: ['pmButton', meridiemMode === 'pm' && 'selected'],
|
|
26
28
|
meridiemText: ['meridiemText']
|
|
27
29
|
};
|
|
28
30
|
return composeClasses(slots, getClockUtilityClass, classes);
|
|
@@ -105,23 +107,15 @@ const ClockPin = styled('div', {
|
|
|
105
107
|
left: '50%',
|
|
106
108
|
transform: 'translate(-50%, -50%)'
|
|
107
109
|
}));
|
|
108
|
-
const
|
|
109
|
-
name: 'MuiClock',
|
|
110
|
-
slot: 'AmButton',
|
|
111
|
-
overridesResolver: (_, styles) => styles.amButton
|
|
112
|
-
})(({
|
|
113
|
-
theme
|
|
114
|
-
}) => ({
|
|
110
|
+
const meridiemButtonCommonStyles = (theme, meridiemMode) => ({
|
|
115
111
|
zIndex: 1,
|
|
116
|
-
position: 'absolute',
|
|
117
112
|
bottom: 8,
|
|
118
|
-
left: 8,
|
|
119
113
|
paddingLeft: 4,
|
|
120
114
|
paddingRight: 4,
|
|
121
115
|
width: CLOCK_HOUR_WIDTH,
|
|
122
116
|
variants: [{
|
|
123
117
|
props: {
|
|
124
|
-
meridiemMode
|
|
118
|
+
meridiemMode
|
|
125
119
|
},
|
|
126
120
|
style: {
|
|
127
121
|
backgroundColor: (theme.vars || theme).palette.primary.main,
|
|
@@ -131,6 +125,17 @@ const ClockAmButton = styled(IconButton, {
|
|
|
131
125
|
}
|
|
132
126
|
}
|
|
133
127
|
}]
|
|
128
|
+
});
|
|
129
|
+
const ClockAmButton = styled(IconButton, {
|
|
130
|
+
name: 'MuiClock',
|
|
131
|
+
slot: 'AmButton',
|
|
132
|
+
overridesResolver: (_, styles) => styles.amButton
|
|
133
|
+
})(({
|
|
134
|
+
theme
|
|
135
|
+
}) => _extends({}, meridiemButtonCommonStyles(theme, 'am'), {
|
|
136
|
+
// keeping it here to make TS happy
|
|
137
|
+
position: 'absolute',
|
|
138
|
+
left: 8
|
|
134
139
|
}));
|
|
135
140
|
const ClockPmButton = styled(IconButton, {
|
|
136
141
|
name: 'MuiClock',
|
|
@@ -138,26 +143,10 @@ const ClockPmButton = styled(IconButton, {
|
|
|
138
143
|
overridesResolver: (_, styles) => styles.pmButton
|
|
139
144
|
})(({
|
|
140
145
|
theme
|
|
141
|
-
}) => ({
|
|
142
|
-
|
|
146
|
+
}) => _extends({}, meridiemButtonCommonStyles(theme, 'pm'), {
|
|
147
|
+
// keeping it here to make TS happy
|
|
143
148
|
position: 'absolute',
|
|
144
|
-
|
|
145
|
-
right: 8,
|
|
146
|
-
paddingLeft: 4,
|
|
147
|
-
paddingRight: 4,
|
|
148
|
-
width: CLOCK_HOUR_WIDTH,
|
|
149
|
-
variants: [{
|
|
150
|
-
props: {
|
|
151
|
-
meridiemMode: 'pm'
|
|
152
|
-
},
|
|
153
|
-
style: {
|
|
154
|
-
backgroundColor: (theme.vars || theme).palette.primary.main,
|
|
155
|
-
color: (theme.vars || theme).palette.primary.contrastText,
|
|
156
|
-
'&:hover': {
|
|
157
|
-
backgroundColor: (theme.vars || theme).palette.primary.light
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
}]
|
|
149
|
+
right: 8
|
|
161
150
|
}));
|
|
162
151
|
const ClockMeridiemText = styled(Typography, {
|
|
163
152
|
name: 'MuiClock',
|
|
@@ -15,6 +15,8 @@ export interface ClockClasses {
|
|
|
15
15
|
pmButton: string;
|
|
16
16
|
/** Styles applied to the meridiem typography element. */
|
|
17
17
|
meridiemText: string;
|
|
18
|
+
/** Styles applied to the selected meridiem button element */
|
|
19
|
+
selected: string;
|
|
18
20
|
}
|
|
19
21
|
export type ClockClassKey = keyof ClockClasses;
|
|
20
22
|
export declare function getClockUtilityClass(slot: string): string;
|
|
@@ -2,4 +2,4 @@ import { unstable_generateUtilityClass as generateUtilityClass, unstable_generat
|
|
|
2
2
|
export function getClockUtilityClass(slot) {
|
|
3
3
|
return generateUtilityClass('MuiClock', slot);
|
|
4
4
|
}
|
|
5
|
-
export const clockClasses = generateUtilityClasses('MuiClock', ['root', 'clock', 'wrapper', 'squareMask', 'pin', 'amButton', 'pmButton', 'meridiemText']);
|
|
5
|
+
export const clockClasses = generateUtilityClasses('MuiClock', ['root', 'clock', 'wrapper', 'squareMask', 'pin', 'amButton', 'pmButton', 'meridiemText', 'selected']);
|
package/index.js
CHANGED
|
@@ -51,7 +51,11 @@ const useUtilityClasses = ownerState => {
|
|
|
51
51
|
const slots = {
|
|
52
52
|
root: ['root'],
|
|
53
53
|
spacer: ['spacer'],
|
|
54
|
-
button: ['button']
|
|
54
|
+
button: ['button'],
|
|
55
|
+
previousIconButton: ['previousIconButton'],
|
|
56
|
+
nextIconButton: ['nextIconButton'],
|
|
57
|
+
leftArrowIcon: ['leftArrowIcon'],
|
|
58
|
+
rightArrowIcon: ['rightArrowIcon']
|
|
55
59
|
};
|
|
56
60
|
return composeClasses(slots, getPickersArrowSwitcherUtilityClass, classes);
|
|
57
61
|
};
|
|
@@ -106,7 +110,7 @@ export const PickersArrowSwitcher = /*#__PURE__*/React.forwardRef(function Picke
|
|
|
106
110
|
ownerState: _extends({}, ownerState, {
|
|
107
111
|
hidden: previousProps.isHidden
|
|
108
112
|
}),
|
|
109
|
-
className: classes.button
|
|
113
|
+
className: clsx(classes.button, classes.previousIconButton)
|
|
110
114
|
});
|
|
111
115
|
const NextIconButton = slots?.nextIconButton ?? PickersArrowSwitcherButton;
|
|
112
116
|
const nextIconButtonProps = useSlotProps({
|
|
@@ -123,7 +127,7 @@ export const PickersArrowSwitcher = /*#__PURE__*/React.forwardRef(function Picke
|
|
|
123
127
|
ownerState: _extends({}, ownerState, {
|
|
124
128
|
hidden: nextProps.isHidden
|
|
125
129
|
}),
|
|
126
|
-
className: classes.button
|
|
130
|
+
className: clsx(classes.button, classes.nextIconButton)
|
|
127
131
|
});
|
|
128
132
|
const LeftArrowIcon = slots?.leftArrowIcon ?? ArrowLeftIcon;
|
|
129
133
|
// The spread is here to avoid this bug mui/material-ui#34056
|
|
@@ -133,7 +137,8 @@ export const PickersArrowSwitcher = /*#__PURE__*/React.forwardRef(function Picke
|
|
|
133
137
|
additionalProps: {
|
|
134
138
|
fontSize: 'inherit'
|
|
135
139
|
},
|
|
136
|
-
ownerState
|
|
140
|
+
ownerState,
|
|
141
|
+
className: classes.leftArrowIcon
|
|
137
142
|
}),
|
|
138
143
|
leftArrowIconProps = _objectWithoutPropertiesLoose(_useSlotProps, _excluded2);
|
|
139
144
|
const RightArrowIcon = slots?.rightArrowIcon ?? ArrowRightIcon;
|
|
@@ -144,7 +149,8 @@ export const PickersArrowSwitcher = /*#__PURE__*/React.forwardRef(function Picke
|
|
|
144
149
|
additionalProps: {
|
|
145
150
|
fontSize: 'inherit'
|
|
146
151
|
},
|
|
147
|
-
ownerState
|
|
152
|
+
ownerState,
|
|
153
|
+
className: classes.rightArrowIcon
|
|
148
154
|
}),
|
|
149
155
|
rightArrowIconProps = _objectWithoutPropertiesLoose(_useSlotProps2, _excluded3);
|
|
150
156
|
return /*#__PURE__*/_jsxs(PickersArrowSwitcherRoot, _extends({
|
|
@@ -67,6 +67,6 @@ export interface PickersArrowSwitcherButtonSlotOwnerState extends PickersArrowSw
|
|
|
67
67
|
export interface PickersArrowSwitcherSlotProps {
|
|
68
68
|
previousIconButton?: SlotComponentProps<typeof IconButton, PickersArrowSwitcherSlotPropsOverrides, PickersArrowSwitcherButtonSlotOwnerState>;
|
|
69
69
|
nextIconButton?: SlotComponentProps<typeof IconButton, PickersArrowSwitcherSlotPropsOverrides, PickersArrowSwitcherButtonSlotOwnerState>;
|
|
70
|
-
leftArrowIcon?: SlotComponentProps<typeof SvgIcon, PickersArrowSwitcherSlotPropsOverrides,
|
|
71
|
-
rightArrowIcon?: SlotComponentProps<typeof SvgIcon, PickersArrowSwitcherSlotPropsOverrides,
|
|
70
|
+
leftArrowIcon?: SlotComponentProps<typeof SvgIcon, PickersArrowSwitcherSlotPropsOverrides, PickersArrowSwitcherButtonSlotOwnerState>;
|
|
71
|
+
rightArrowIcon?: SlotComponentProps<typeof SvgIcon, PickersArrowSwitcherSlotPropsOverrides, PickersArrowSwitcherButtonSlotOwnerState>;
|
|
72
72
|
}
|
|
@@ -5,7 +5,15 @@ export interface PickersArrowSwitcherClasses {
|
|
|
5
5
|
spacer: string;
|
|
6
6
|
/** Styles applied to the button element. */
|
|
7
7
|
button: string;
|
|
8
|
+
/** Styles applied to the previous icon button element. */
|
|
9
|
+
previousIconButton: string;
|
|
10
|
+
/** Styles applied to the next icon button element. */
|
|
11
|
+
nextIconButton: string;
|
|
12
|
+
/** Styles applied to the left icon element. */
|
|
13
|
+
leftArrowIcon: string;
|
|
14
|
+
/** Styles applied to the right icon element. */
|
|
15
|
+
rightArrowIcon: string;
|
|
8
16
|
}
|
|
9
17
|
export type PickersArrowSwitcherClassKey = keyof PickersArrowSwitcherClasses;
|
|
10
18
|
export declare function getPickersArrowSwitcherUtilityClass(slot: string): string;
|
|
11
|
-
export declare const pickersArrowSwitcherClasses: Record<"button" | "root" | "spacer", string>;
|
|
19
|
+
export declare const pickersArrowSwitcherClasses: Record<"button" | "root" | "spacer" | "previousIconButton" | "nextIconButton" | "leftArrowIcon" | "rightArrowIcon", string>;
|
|
@@ -2,4 +2,4 @@ import { unstable_generateUtilityClass as generateUtilityClass, unstable_generat
|
|
|
2
2
|
export function getPickersArrowSwitcherUtilityClass(slot) {
|
|
3
3
|
return generateUtilityClass('MuiPickersArrowSwitcher', slot);
|
|
4
4
|
}
|
|
5
|
-
export const pickersArrowSwitcherClasses = generateUtilityClasses('MuiPickersArrowSwitcher', ['root', 'spacer', 'button']);
|
|
5
|
+
export const pickersArrowSwitcherClasses = generateUtilityClasses('MuiPickersArrowSwitcher', ['root', 'spacer', 'button', 'previousIconButton', 'nextIconButton', 'leftArrowIcon', 'rightArrowIcon']);
|
package/locales/koKR.js
CHANGED
|
@@ -16,11 +16,10 @@ const koKRPickers = {
|
|
|
16
16
|
// DateRange labels
|
|
17
17
|
start: '시작',
|
|
18
18
|
end: '종료',
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
19
|
+
startDate: '시작 날짜',
|
|
20
|
+
startTime: '시작 시간',
|
|
21
|
+
endDate: '종료 날짜',
|
|
22
|
+
endTime: '종료 시간',
|
|
24
23
|
// Action bar
|
|
25
24
|
cancelButtonLabel: '취소',
|
|
26
25
|
clearButtonLabel: '초기화',
|
|
@@ -54,23 +53,22 @@ const koKRPickers = {
|
|
|
54
53
|
fieldYearPlaceholder: params => 'Y'.repeat(params.digitAmount),
|
|
55
54
|
fieldMonthPlaceholder: params => params.contentType === 'letter' ? 'MMMM' : 'MM',
|
|
56
55
|
fieldDayPlaceholder: () => 'DD',
|
|
57
|
-
|
|
56
|
+
fieldWeekDayPlaceholder: params => params.contentType === 'letter' ? 'EEEE' : 'EE',
|
|
58
57
|
fieldHoursPlaceholder: () => 'hh',
|
|
59
58
|
fieldMinutesPlaceholder: () => 'mm',
|
|
60
59
|
fieldSecondsPlaceholder: () => 'ss',
|
|
61
|
-
fieldMeridiemPlaceholder: () => 'aa'
|
|
62
|
-
|
|
60
|
+
fieldMeridiemPlaceholder: () => 'aa',
|
|
63
61
|
// View names
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
62
|
+
year: '년',
|
|
63
|
+
month: '월',
|
|
64
|
+
day: '일',
|
|
65
|
+
weekDay: '평일',
|
|
66
|
+
hours: '시간',
|
|
67
|
+
minutes: '분',
|
|
68
|
+
seconds: '초',
|
|
71
69
|
// meridiem: 'Meridiem',
|
|
72
70
|
|
|
73
71
|
// Common
|
|
74
|
-
|
|
72
|
+
empty: '공란'
|
|
75
73
|
};
|
|
76
74
|
export const koKR = getPickersLocalization(koKRPickers);
|
package/locales/ruRU.js
CHANGED
|
@@ -17,11 +17,10 @@ const ruRUPickers = {
|
|
|
17
17
|
// DateRange labels
|
|
18
18
|
start: 'Начало',
|
|
19
19
|
end: 'Конец',
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
20
|
+
startDate: 'Начальная дата',
|
|
21
|
+
startTime: 'Начальное время',
|
|
22
|
+
endDate: 'Конечная дата',
|
|
23
|
+
endTime: 'Конечное время',
|
|
25
24
|
// Action bar
|
|
26
25
|
cancelButtonLabel: 'Отмена',
|
|
27
26
|
clearButtonLabel: 'Очистить',
|
|
@@ -55,23 +54,21 @@ const ruRUPickers = {
|
|
|
55
54
|
fieldYearPlaceholder: params => 'Г'.repeat(params.digitAmount),
|
|
56
55
|
fieldMonthPlaceholder: params => params.contentType === 'letter' ? 'ММММ' : 'ММ',
|
|
57
56
|
fieldDayPlaceholder: () => 'ДД',
|
|
58
|
-
|
|
57
|
+
fieldWeekDayPlaceholder: params => params.contentType === 'letter' ? 'ДДДД' : 'ДД',
|
|
59
58
|
fieldHoursPlaceholder: () => 'чч',
|
|
60
59
|
fieldMinutesPlaceholder: () => 'мм',
|
|
61
60
|
fieldSecondsPlaceholder: () => 'сс',
|
|
62
|
-
fieldMeridiemPlaceholder: () => '(д|п)п'
|
|
63
|
-
|
|
61
|
+
fieldMeridiemPlaceholder: () => '(д|п)п',
|
|
64
62
|
// View names
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
63
|
+
year: 'Год',
|
|
64
|
+
month: 'Месяц',
|
|
65
|
+
day: 'День',
|
|
66
|
+
weekDay: 'День недели',
|
|
67
|
+
hours: 'Часы',
|
|
68
|
+
minutes: 'Минуты',
|
|
69
|
+
seconds: 'Секунды',
|
|
70
|
+
meridiem: 'Меридием',
|
|
74
71
|
// Common
|
|
75
|
-
|
|
72
|
+
empty: 'Пустой'
|
|
76
73
|
};
|
|
77
74
|
export const ruRU = getPickersLocalization(ruRUPickers);
|
package/models/pickers.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import type { PickersShortcutsItemContext } from '../PickersShortcuts';
|
|
|
2
2
|
export interface PickerChangeHandlerContext<TError> {
|
|
3
3
|
validationError: TError;
|
|
4
4
|
/**
|
|
5
|
-
* Shortcut causing this `onChange` call.
|
|
5
|
+
* Shortcut causing this `onChange` or `onAccept` call.
|
|
6
6
|
* If the call has not been caused by a shortcut selection, this property will be `undefined`.
|
|
7
7
|
*/
|
|
8
8
|
shortcut?: PickersShortcutsItemContext;
|
|
@@ -9,7 +9,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
9
9
|
/**
|
|
10
10
|
* @ignore - internal component.
|
|
11
11
|
*/
|
|
12
|
-
function DesktopDateTimePickerLayout(props) {
|
|
12
|
+
const DesktopDateTimePickerLayout = /*#__PURE__*/React.forwardRef(function DesktopDateTimePickerLayout(props, ref) {
|
|
13
13
|
const isRtl = useRtl();
|
|
14
14
|
const {
|
|
15
15
|
toolbar,
|
|
@@ -22,7 +22,6 @@ function DesktopDateTimePickerLayout(props) {
|
|
|
22
22
|
sx,
|
|
23
23
|
className,
|
|
24
24
|
isLandscape,
|
|
25
|
-
ref,
|
|
26
25
|
classes
|
|
27
26
|
} = props;
|
|
28
27
|
const isActionBarVisible = actionBar && (actionBar.props.actions?.length ?? 0) > 0;
|
|
@@ -55,7 +54,7 @@ function DesktopDateTimePickerLayout(props) {
|
|
|
55
54
|
})]
|
|
56
55
|
}), actionBar]
|
|
57
56
|
});
|
|
58
|
-
}
|
|
57
|
+
});
|
|
59
58
|
process.env.NODE_ENV !== "production" ? DesktopDateTimePickerLayout.propTypes = {
|
|
60
59
|
// ----------------------------- Warning --------------------------------
|
|
61
60
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
@@ -152,7 +152,7 @@ const PickersCalendarHeader = /*#__PURE__*/React.forwardRef(function PickersCale
|
|
|
152
152
|
const _useSlotProps = useSlotProps({
|
|
153
153
|
elementType: SwitchViewIcon,
|
|
154
154
|
externalSlotProps: slotProps?.switchViewIcon,
|
|
155
|
-
ownerState
|
|
155
|
+
ownerState,
|
|
156
156
|
className: classes.switchViewIcon
|
|
157
157
|
}),
|
|
158
158
|
switchViewIconProps = _objectWithoutPropertiesLoose(_useSlotProps, _excluded2);
|
|
@@ -89,7 +89,6 @@ export const PickersLayoutContentWrapper = styled('div', {
|
|
|
89
89
|
display: 'flex',
|
|
90
90
|
flexDirection: 'column'
|
|
91
91
|
});
|
|
92
|
-
|
|
93
92
|
/**
|
|
94
93
|
* Demos:
|
|
95
94
|
*
|
|
@@ -99,7 +98,7 @@ export const PickersLayoutContentWrapper = styled('div', {
|
|
|
99
98
|
*
|
|
100
99
|
* - [PickersLayout API](https://mui.com/x/api/date-pickers/pickers-layout/)
|
|
101
100
|
*/
|
|
102
|
-
const PickersLayout = function PickersLayout(inProps) {
|
|
101
|
+
const PickersLayout = /*#__PURE__*/React.forwardRef(function PickersLayout(inProps, ref) {
|
|
103
102
|
const props = useThemeProps({
|
|
104
103
|
props: inProps,
|
|
105
104
|
name: 'MuiPickersLayout'
|
|
@@ -115,7 +114,6 @@ const PickersLayout = function PickersLayout(inProps) {
|
|
|
115
114
|
sx,
|
|
116
115
|
className,
|
|
117
116
|
isLandscape,
|
|
118
|
-
ref,
|
|
119
117
|
wrapperVariant
|
|
120
118
|
} = props;
|
|
121
119
|
const classes = useUtilityClasses(props);
|
|
@@ -133,7 +131,7 @@ const PickersLayout = function PickersLayout(inProps) {
|
|
|
133
131
|
})
|
|
134
132
|
}), actionBar]
|
|
135
133
|
});
|
|
136
|
-
};
|
|
134
|
+
});
|
|
137
135
|
process.env.NODE_ENV !== "production" ? PickersLayout.propTypes = {
|
|
138
136
|
// ----------------------------- Warning --------------------------------
|
|
139
137
|
// | These PropTypes are generated from the TypeScript type definitions |
|