@mui/x-date-pickers 5.0.6 → 5.0.8

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 CHANGED
@@ -3,6 +3,60 @@
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
+ ## 5.17.11
7
+
8
+ _Nov 10, 2022_
9
+
10
+ We'd like to offer a big thanks to the 5 contributors who made this release possible. Here are some highlights ✨:
11
+
12
+ - 🐞 Bugfixes
13
+
14
+ ### `@mui/x-data-grid@v5.17.11` / `@mui/x-data-grid-pro@v5.17.11` / `@mui/x-data-grid-premium@v5.17.11`
15
+
16
+ #### Changes
17
+
18
+ - [DataGrid] Fix for cell focus preventing scroll when virtualization enabled (#6622) @yaredtsy
19
+ - [DataGridPro] Opt-out for column jump back on re-order (#6697) @gavbrennan
20
+
21
+ ### `@mui/x-date-pickers@v5.0.8` / `@mui/x-date-pickers-pro@v5.0.8`
22
+
23
+ #### Changes
24
+
25
+ - [pickers] Fix pickers toolbar styling (#6793) @LukasTy
26
+
27
+ ### Docs
28
+
29
+ - [docs] Fix link to localization page (#6766) @alexfauquette
30
+
31
+ ### Core
32
+
33
+ - [license] Add new license status 'Out of scope' (#6774) @oliviertassinari
34
+
35
+ ## 5.17.10
36
+
37
+ _Nov 4, 2022_
38
+
39
+ We'd like to offer a big thanks to the 4 contributors who made this release possible. Here are some highlights ✨:
40
+
41
+ - 🌍 Add Ukrainian (uk-UA) locale to pickers (#6661) @Dufran
42
+
43
+ ### `@mui/x-data-grid@v5.17.10` / `@mui/x-data-grid-pro@v5.17.10` / `@mui/x-data-grid-premium@v5.17.10`
44
+
45
+ #### Changes
46
+
47
+ - [DataGrid] Remove `React.memo` from `GridCellCheckboxRenderer` (#6688) @mattcorner
48
+
49
+ ### `@mui/x-date-pickers@v5.0.7` / `@mui/x-date-pickers-pro@v5.0.7`
50
+
51
+ #### Changes
52
+
53
+ - [DateRangePicker] Fix input focused style and mobile behaviour (#6645) (#6714) @LukasTy
54
+ - [pickers] Add Ukrainian (uk-UA) locale on the date picker (#6661) @Dufran
55
+
56
+ ### Docs
57
+
58
+ - [docs] Mark data grid column group available (#6659) @alexfauquette
59
+
6
60
  ## 5.17.9
7
61
 
8
62
  _Oct 28, 2022_
@@ -6,7 +6,6 @@ import Typography from '@mui/material/Typography';
6
6
  import { styled, useThemeProps } from '@mui/material/styles';
7
7
  import { unstable_composeClasses as composeClasses } from '@mui/material';
8
8
  import { PickersToolbar } from '../internals/components/PickersToolbar';
9
- import { pickersToolbarClasses } from '../internals/components/pickersToolbarClasses';
10
9
  import { useLocaleText, useUtils } from '../internals/hooks/useUtils';
11
10
  import { isYearAndMonthViews, isYearOnlyView } from './shared';
12
11
  import { getDatePickerToolbarUtilityClass } from './datePickerToolbarClasses';
@@ -27,12 +26,7 @@ const DatePickerToolbarRoot = styled(PickersToolbar, {
27
26
  name: 'MuiDatePickerToolbar',
28
27
  slot: 'Root',
29
28
  overridesResolver: (_, styles) => styles.root
30
- })({
31
- [`& .${pickersToolbarClasses.penIconButton}`]: {
32
- position: 'relative',
33
- top: 4
34
- }
35
- });
29
+ })({});
36
30
  const DatePickerToolbarTitle = styled(Typography, {
37
31
  name: 'MuiDatePickerToolbar',
38
32
  slot: 'Title',
@@ -97,7 +91,6 @@ export const DatePickerToolbar = /*#__PURE__*/React.forwardRef(function DatePick
97
91
  isMobileKeyboardViewOpen: isMobileKeyboardViewOpen,
98
92
  toggleMobileKeyboardView: toggleMobileKeyboardView,
99
93
  isLandscape: isLandscape,
100
- ownerState: ownerState,
101
94
  className: classes.root
102
95
  }, other, {
103
96
  children: /*#__PURE__*/_jsx(DatePickerToolbarTitle, {
@@ -1,5 +1,5 @@
1
- import _extends from "@babel/runtime/helpers/esm/extends";
2
1
  import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
2
+ import _extends from "@babel/runtime/helpers/esm/extends";
3
3
  const _excluded = ["ampm", "parsedValue", "isMobileKeyboardViewOpen", "onChange", "openView", "setOpenView", "toggleMobileKeyboardView", "toolbarFormat", "toolbarPlaceholder", "toolbarTitle", "views"];
4
4
  import * as React from 'react';
5
5
  import { styled, useThemeProps } from '@mui/material/styles';
@@ -30,16 +30,22 @@ const DateTimePickerToolbarRoot = styled(PickersToolbar, {
30
30
  name: 'MuiDateTimePickerToolbar',
31
31
  slot: 'Root',
32
32
  overridesResolver: (props, styles) => styles.root
33
- })({
33
+ })(({
34
+ theme
35
+ }) => ({
34
36
  paddingLeft: 16,
35
37
  paddingRight: 16,
36
38
  justifyContent: 'space-around',
37
- [`& .${pickersToolbarClasses.penIconButton}`]: {
39
+ position: 'relative',
40
+ [`& .${pickersToolbarClasses.penIconButton}`]: _extends({
38
41
  position: 'absolute',
39
- top: 8,
42
+ top: 8
43
+ }, theme.direction === 'rtl' ? {
44
+ left: 8
45
+ } : {
40
46
  right: 8
41
- }
42
- });
47
+ })
48
+ }));
43
49
  const DateTimePickerToolbarDateContainer = styled('div', {
44
50
  name: 'MuiDateTimePickerToolbar',
45
51
  slot: 'DateContainer',
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license MUI v5.0.6
1
+ /** @license MUI v5.0.8
2
2
  *
3
3
  * This source code is licensed under the MIT license found in the
4
4
  * LICENSE file in the root directory of this source tree.
@@ -49,9 +49,13 @@ const PickersToolbarContent = styled(Grid, {
49
49
  name: 'MuiPickersToolbar',
50
50
  slot: 'Content',
51
51
  overridesResolver: (props, styles) => styles.content
52
- })({
52
+ })(({
53
+ ownerState
54
+ }) => _extends({
53
55
  flex: 1
54
- });
56
+ }, !ownerState.isLandscape && {
57
+ alignItems: 'center'
58
+ }));
55
59
  const PickersToolbarPenIconButton = styled(IconButton, {
56
60
  name: 'MuiPickersToolbar',
57
61
  slot: 'PenIconButton',
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
2
  export declare function arrayIncludes<T>(array: T[] | readonly T[], itemOrItems: T | T[]): boolean;
3
- export declare const onSpaceOrEnter: (innerFn: () => void, onFocus?: ((event: React.KeyboardEvent<any>) => void) | undefined) => (event: React.KeyboardEvent) => void;
3
+ export declare const onSpaceOrEnter: (innerFn: (ev: React.MouseEvent<any> | React.KeyboardEvent<any>) => void, onFocus?: ((event: React.KeyboardEvent<any>) => void) | undefined) => (event: React.KeyboardEvent) => void;
4
4
  export declare const executeInTheNextEventLoopTick: (fn: () => void) => void;
5
5
  export declare const doNothing: () => void;
@@ -8,7 +8,7 @@ export function arrayIncludes(array, itemOrItems) {
8
8
  }
9
9
  export const onSpaceOrEnter = (innerFn, onFocus) => event => {
10
10
  if (event.key === 'Enter' || event.key === ' ') {
11
- innerFn(); // prevent any side effects
11
+ innerFn(event); // prevent any side effects
12
12
 
13
13
  event.preventDefault();
14
14
  event.stopPropagation();
@@ -1,13 +1,11 @@
1
1
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
2
2
  import _extends from "@babel/runtime/helpers/esm/extends";
3
- import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
4
3
  var _excluded = ["parsedValue", "isLandscape", "isMobileKeyboardViewOpen", "onChange", "toggleMobileKeyboardView", "toolbarFormat", "toolbarPlaceholder", "toolbarTitle", "views"];
5
4
  import * as React from 'react';
6
5
  import Typography from '@mui/material/Typography';
7
6
  import { styled, useThemeProps } from '@mui/material/styles';
8
7
  import { unstable_composeClasses as composeClasses } from '@mui/material';
9
8
  import { PickersToolbar } from '../internals/components/PickersToolbar';
10
- import { pickersToolbarClasses } from '../internals/components/pickersToolbarClasses';
11
9
  import { useLocaleText, useUtils } from '../internals/hooks/useUtils';
12
10
  import { isYearAndMonthViews, isYearOnlyView } from './shared';
13
11
  import { getDatePickerToolbarUtilityClass } from './datePickerToolbarClasses';
@@ -28,10 +26,7 @@ var DatePickerToolbarRoot = styled(PickersToolbar, {
28
26
  overridesResolver: function overridesResolver(_, styles) {
29
27
  return styles.root;
30
28
  }
31
- })(_defineProperty({}, "& .".concat(pickersToolbarClasses.penIconButton), {
32
- position: 'relative',
33
- top: 4
34
- }));
29
+ })({});
35
30
  var DatePickerToolbarTitle = styled(Typography, {
36
31
  name: 'MuiDatePickerToolbar',
37
32
  slot: 'Title',
@@ -99,7 +94,6 @@ export var DatePickerToolbar = /*#__PURE__*/React.forwardRef(function DatePicker
99
94
  isMobileKeyboardViewOpen: isMobileKeyboardViewOpen,
100
95
  toggleMobileKeyboardView: toggleMobileKeyboardView,
101
96
  isLandscape: isLandscape,
102
- ownerState: ownerState,
103
97
  className: classes.root
104
98
  }, other, {
105
99
  children: /*#__PURE__*/_jsx(DatePickerToolbarTitle, {
@@ -1,6 +1,6 @@
1
- import _extends from "@babel/runtime/helpers/esm/extends";
2
1
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
3
2
  import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
3
+ import _extends from "@babel/runtime/helpers/esm/extends";
4
4
  var _excluded = ["ampm", "parsedValue", "isMobileKeyboardViewOpen", "onChange", "openView", "setOpenView", "toggleMobileKeyboardView", "toolbarFormat", "toolbarPlaceholder", "toolbarTitle", "views"];
5
5
  import * as React from 'react';
6
6
  import { styled, useThemeProps } from '@mui/material/styles';
@@ -31,15 +31,22 @@ var DateTimePickerToolbarRoot = styled(PickersToolbar, {
31
31
  overridesResolver: function overridesResolver(props, styles) {
32
32
  return styles.root;
33
33
  }
34
- })(_defineProperty({
35
- paddingLeft: 16,
36
- paddingRight: 16,
37
- justifyContent: 'space-around'
38
- }, "& .".concat(pickersToolbarClasses.penIconButton), {
39
- position: 'absolute',
40
- top: 8,
41
- right: 8
42
- }));
34
+ })(function (_ref) {
35
+ var theme = _ref.theme;
36
+ return _defineProperty({
37
+ paddingLeft: 16,
38
+ paddingRight: 16,
39
+ justifyContent: 'space-around',
40
+ position: 'relative'
41
+ }, "& .".concat(pickersToolbarClasses.penIconButton), _extends({
42
+ position: 'absolute',
43
+ top: 8
44
+ }, theme.direction === 'rtl' ? {
45
+ left: 8
46
+ } : {
47
+ right: 8
48
+ }));
49
+ });
43
50
  var DateTimePickerToolbarDateContainer = styled('div', {
44
51
  name: 'MuiDateTimePickerToolbar',
45
52
  slot: 'DateContainer',
package/legacy/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license MUI v5.0.6
1
+ /** @license MUI v5.0.8
2
2
  *
3
3
  * This source code is licensed under the MIT license found in the
4
4
  * LICENSE file in the root directory of this source tree.
@@ -53,8 +53,13 @@ var PickersToolbarContent = styled(Grid, {
53
53
  overridesResolver: function overridesResolver(props, styles) {
54
54
  return styles.content;
55
55
  }
56
- })({
57
- flex: 1
56
+ })(function (_ref2) {
57
+ var ownerState = _ref2.ownerState;
58
+ return _extends({
59
+ flex: 1
60
+ }, !ownerState.isLandscape && {
61
+ alignItems: 'center'
62
+ });
58
63
  });
59
64
  var PickersToolbarPenIconButton = styled(IconButton, {
60
65
  name: 'MuiPickersToolbar',
@@ -11,7 +11,7 @@ export function arrayIncludes(array, itemOrItems) {
11
11
  export var onSpaceOrEnter = function onSpaceOrEnter(innerFn, onFocus) {
12
12
  return function (event) {
13
13
  if (event.key === 'Enter' || event.key === ' ') {
14
- innerFn(); // prevent any side effects
14
+ innerFn(event); // prevent any side effects
15
15
 
16
16
  event.preventDefault();
17
17
  event.stopPropagation();
@@ -15,4 +15,5 @@ export * from './zhCN';
15
15
  export * from './koKR';
16
16
  export * from './isIS';
17
17
  export * from './jaJP';
18
+ export * from './ukUA';
18
19
  export * from './utils/pickersLocaleTextApi';
@@ -0,0 +1,53 @@
1
+ import { getPickersLocalization } from './utils/getPickersLocalization';
2
+ // This object is not Partial<PickersLocaleText> because it is the default values
3
+ var ukUAPickers = {
4
+ // Calendar navigation
5
+ previousMonth: 'Попередній місяць',
6
+ nextMonth: 'Наступний місяць',
7
+ // View navigation
8
+ openPreviousView: 'відкрити попередній вигляд',
9
+ openNextView: 'відкрити наступний вигляд',
10
+ calendarViewSwitchingButtonAriaLabel: function calendarViewSwitchingButtonAriaLabel(view) {
11
+ return view === 'year' ? 'річний вигляд відкрито, перейти до календарного вигляду' : 'календарний вигляд відкрито, перейти до річного вигляду';
12
+ },
13
+ inputModeToggleButtonAriaLabel: function inputModeToggleButtonAriaLabel(isKeyboardInputOpen, viewType) {
14
+ return isKeyboardInputOpen ? "\u0442\u0435\u043A\u0441\u0442\u043E\u0432\u0435 \u043F\u043E\u043B\u0435 \u0432\u0456\u0434\u043A\u0440\u0438\u0442\u0435, \u043F\u0435\u0440\u0435\u0439\u0442\u0438 \u0434\u043E ".concat(viewType, " \u0432\u0438\u0433\u043B\u044F\u0434\u0443") : "".concat(viewType, " \u0432\u0438\u0433\u043B\u044F\u0434 \u043D\u0430\u0440\u0430\u0437\u0456 \u0432\u0456\u0434\u043A\u0440\u0438\u0442\u043E, \u043F\u0435\u0440\u0435\u0439\u0442\u0438 \u0434\u043E \u0442\u0435\u043A\u0441\u0442\u043E\u0432\u043E\u0433\u043E \u043F\u043E\u043B\u044F");
15
+ },
16
+ // DateRange placeholders
17
+ start: 'Початок',
18
+ end: 'Кінець',
19
+ // Action bar
20
+ cancelButtonLabel: 'Відміна',
21
+ clearButtonLabel: 'Очистити',
22
+ okButtonLabel: 'OK',
23
+ todayButtonLabel: 'Сьогодні',
24
+ // Toolbar titles
25
+ datePickerDefaultToolbarTitle: 'Вибрати дату',
26
+ dateTimePickerDefaultToolbarTitle: 'Вибрати дату і час',
27
+ timePickerDefaultToolbarTitle: 'Вибрати час',
28
+ dateRangePickerDefaultToolbarTitle: 'Вибрати календарний період',
29
+ // Clock labels
30
+ clockLabelText: function clockLabelText(view, time, adapter) {
31
+ return "Select ".concat(view, ". ").concat(time === null ? 'Час не вибраний' : "\u0412\u0438\u0431\u0440\u0430\u043D\u043E \u0447\u0430\u0441 ".concat(adapter.format(time, 'fullTime')));
32
+ },
33
+ hoursClockNumberText: function hoursClockNumberText(hours) {
34
+ return "".concat(hours, " \u0433\u043E\u0434\u0438\u043D");
35
+ },
36
+ minutesClockNumberText: function minutesClockNumberText(minutes) {
37
+ return "".concat(minutes, " \u0445\u0432\u0438\u043B\u0438\u043D");
38
+ },
39
+ secondsClockNumberText: function secondsClockNumberText(seconds) {
40
+ return "".concat(seconds, " \u0441\u0435\u043A\u0443\u043D\u0434");
41
+ },
42
+ // Open picker labels
43
+ openDatePickerDialogue: function openDatePickerDialogue(value, utils) {
44
+ return value !== null && utils.isValid(value) ? "\u041E\u0431\u0435\u0440\u0456\u0442\u044C \u0434\u0430\u0442\u0443, \u043E\u0431\u0440\u0430\u043D\u0430 \u0434\u0430\u0442\u0430 ".concat(utils.format(value, 'fullDate')) : 'Оберіть дату';
45
+ },
46
+ openTimePickerDialogue: function openTimePickerDialogue(value, utils) {
47
+ return value !== null && utils.isValid(value) ? "\u041E\u0431\u0435\u0440\u0456\u0442\u044C \u0447\u0430\u0441, \u043E\u0431\u0440\u0430\u043D\u0438\u0439 \u0447\u0430\u0441 ".concat(utils.format(value, 'fullTime')) : 'Оберіть час';
48
+ },
49
+ // Table labels
50
+ timeTableLabel: 'оберіть час',
51
+ dateTableLabel: 'оберіть дату'
52
+ };
53
+ export var ukUA = getPickersLocalization(ukUAPickers);
@@ -15,4 +15,5 @@ export * from './zhCN';
15
15
  export * from './koKR';
16
16
  export * from './isIS';
17
17
  export * from './jaJP';
18
+ export * from './ukUA';
18
19
  export * from './utils/pickersLocaleTextApi';
package/locales/index.js CHANGED
@@ -15,4 +15,5 @@ export * from './zhCN';
15
15
  export * from './koKR';
16
16
  export * from './isIS';
17
17
  export * from './jaJP';
18
+ export * from './ukUA';
18
19
  export * from './utils/pickersLocaleTextApi';
@@ -0,0 +1,35 @@
1
+ import { CalendarPickerView } from '../internals/models';
2
+ export declare const ukUA: {
3
+ components: {
4
+ MuiLocalizationProvider: {
5
+ defaultProps: {
6
+ localeText: {
7
+ previousMonth?: string | undefined;
8
+ nextMonth?: string | undefined;
9
+ openPreviousView?: string | undefined;
10
+ openNextView?: string | undefined;
11
+ cancelButtonLabel?: string | undefined;
12
+ clearButtonLabel?: string | undefined;
13
+ okButtonLabel?: string | undefined;
14
+ todayButtonLabel?: string | undefined;
15
+ start?: string | undefined;
16
+ end?: string | undefined;
17
+ calendarViewSwitchingButtonAriaLabel?: ((currentView: CalendarPickerView) => string) | undefined;
18
+ inputModeToggleButtonAriaLabel?: ((isKeyboardInputOpen: boolean, viewType: "calendar" | "clock") => string) | undefined;
19
+ clockLabelText?: ((view: import("../internals/models").ClockPickerView, time: any, adapter: import("../internals/models").MuiPickersAdapter<any>) => string) | undefined;
20
+ hoursClockNumberText?: ((hours: string) => string) | undefined;
21
+ minutesClockNumberText?: ((minutes: string) => string) | undefined;
22
+ secondsClockNumberText?: ((seconds: string) => string) | undefined;
23
+ openDatePickerDialogue?: ((date: any, utils: import("../internals/models").MuiPickersAdapter<any>) => string) | undefined;
24
+ openTimePickerDialogue?: ((date: any, utils: import("../internals/models").MuiPickersAdapter<any>) => string) | undefined;
25
+ timeTableLabel?: string | undefined;
26
+ dateTableLabel?: string | undefined;
27
+ datePickerDefaultToolbarTitle?: string | undefined;
28
+ dateTimePickerDefaultToolbarTitle?: string | undefined;
29
+ timePickerDefaultToolbarTitle?: string | undefined;
30
+ dateRangePickerDefaultToolbarTitle?: string | undefined;
31
+ };
32
+ };
33
+ };
34
+ };
35
+ };
@@ -0,0 +1,37 @@
1
+ import { getPickersLocalization } from './utils/getPickersLocalization';
2
+ // This object is not Partial<PickersLocaleText> because it is the default values
3
+ const ukUAPickers = {
4
+ // Calendar navigation
5
+ previousMonth: 'Попередній місяць',
6
+ nextMonth: 'Наступний місяць',
7
+ // View navigation
8
+ openPreviousView: 'відкрити попередній вигляд',
9
+ openNextView: 'відкрити наступний вигляд',
10
+ calendarViewSwitchingButtonAriaLabel: view => view === 'year' ? 'річний вигляд відкрито, перейти до календарного вигляду' : 'календарний вигляд відкрито, перейти до річного вигляду',
11
+ inputModeToggleButtonAriaLabel: (isKeyboardInputOpen, viewType) => isKeyboardInputOpen ? `текстове поле відкрите, перейти до ${viewType} вигляду` : `${viewType} вигляд наразі відкрито, перейти до текстового поля`,
12
+ // DateRange placeholders
13
+ start: 'Початок',
14
+ end: 'Кінець',
15
+ // Action bar
16
+ cancelButtonLabel: 'Відміна',
17
+ clearButtonLabel: 'Очистити',
18
+ okButtonLabel: 'OK',
19
+ todayButtonLabel: 'Сьогодні',
20
+ // Toolbar titles
21
+ datePickerDefaultToolbarTitle: 'Вибрати дату',
22
+ dateTimePickerDefaultToolbarTitle: 'Вибрати дату і час',
23
+ timePickerDefaultToolbarTitle: 'Вибрати час',
24
+ dateRangePickerDefaultToolbarTitle: 'Вибрати календарний період',
25
+ // Clock labels
26
+ clockLabelText: (view, time, adapter) => `Select ${view}. ${time === null ? 'Час не вибраний' : `Вибрано час ${adapter.format(time, 'fullTime')}`}`,
27
+ hoursClockNumberText: hours => `${hours} годин`,
28
+ minutesClockNumberText: minutes => `${minutes} хвилин`,
29
+ secondsClockNumberText: seconds => `${seconds} секунд`,
30
+ // Open picker labels
31
+ openDatePickerDialogue: (value, utils) => value !== null && utils.isValid(value) ? `Оберіть дату, обрана дата ${utils.format(value, 'fullDate')}` : 'Оберіть дату',
32
+ openTimePickerDialogue: (value, utils) => value !== null && utils.isValid(value) ? `Оберіть час, обраний час ${utils.format(value, 'fullTime')}` : 'Оберіть час',
33
+ // Table labels
34
+ timeTableLabel: 'оберіть час',
35
+ dateTableLabel: 'оберіть дату'
36
+ };
37
+ export const ukUA = getPickersLocalization(ukUAPickers);
@@ -6,7 +6,6 @@ import Typography from '@mui/material/Typography';
6
6
  import { styled, useThemeProps } from '@mui/material/styles';
7
7
  import { unstable_composeClasses as composeClasses } from '@mui/material';
8
8
  import { PickersToolbar } from '../internals/components/PickersToolbar';
9
- import { pickersToolbarClasses } from '../internals/components/pickersToolbarClasses';
10
9
  import { useLocaleText, useUtils } from '../internals/hooks/useUtils';
11
10
  import { isYearAndMonthViews, isYearOnlyView } from './shared';
12
11
  import { getDatePickerToolbarUtilityClass } from './datePickerToolbarClasses';
@@ -27,12 +26,7 @@ const DatePickerToolbarRoot = styled(PickersToolbar, {
27
26
  name: 'MuiDatePickerToolbar',
28
27
  slot: 'Root',
29
28
  overridesResolver: (_, styles) => styles.root
30
- })({
31
- [`& .${pickersToolbarClasses.penIconButton}`]: {
32
- position: 'relative',
33
- top: 4
34
- }
35
- });
29
+ })({});
36
30
  const DatePickerToolbarTitle = styled(Typography, {
37
31
  name: 'MuiDatePickerToolbar',
38
32
  slot: 'Title',
@@ -97,7 +91,6 @@ export const DatePickerToolbar = /*#__PURE__*/React.forwardRef(function DatePick
97
91
  isMobileKeyboardViewOpen: isMobileKeyboardViewOpen,
98
92
  toggleMobileKeyboardView: toggleMobileKeyboardView,
99
93
  isLandscape: isLandscape,
100
- ownerState: ownerState,
101
94
  className: classes.root
102
95
  }, other, {
103
96
  children: /*#__PURE__*/_jsx(DatePickerToolbarTitle, {
@@ -1,5 +1,5 @@
1
- import _extends from "@babel/runtime/helpers/esm/extends";
2
1
  import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
2
+ import _extends from "@babel/runtime/helpers/esm/extends";
3
3
  const _excluded = ["ampm", "parsedValue", "isMobileKeyboardViewOpen", "onChange", "openView", "setOpenView", "toggleMobileKeyboardView", "toolbarFormat", "toolbarPlaceholder", "toolbarTitle", "views"];
4
4
  import * as React from 'react';
5
5
  import { styled, useThemeProps } from '@mui/material/styles';
@@ -30,16 +30,22 @@ const DateTimePickerToolbarRoot = styled(PickersToolbar, {
30
30
  name: 'MuiDateTimePickerToolbar',
31
31
  slot: 'Root',
32
32
  overridesResolver: (props, styles) => styles.root
33
- })({
33
+ })(({
34
+ theme
35
+ }) => ({
34
36
  paddingLeft: 16,
35
37
  paddingRight: 16,
36
38
  justifyContent: 'space-around',
37
- [`& .${pickersToolbarClasses.penIconButton}`]: {
39
+ position: 'relative',
40
+ [`& .${pickersToolbarClasses.penIconButton}`]: _extends({
38
41
  position: 'absolute',
39
- top: 8,
42
+ top: 8
43
+ }, theme.direction === 'rtl' ? {
44
+ left: 8
45
+ } : {
40
46
  right: 8
41
- }
42
- });
47
+ })
48
+ }));
43
49
  const DateTimePickerToolbarDateContainer = styled('div', {
44
50
  name: 'MuiDateTimePickerToolbar',
45
51
  slot: 'DateContainer',
package/modern/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license MUI v5.0.6
1
+ /** @license MUI v5.0.8
2
2
  *
3
3
  * This source code is licensed under the MIT license found in the
4
4
  * LICENSE file in the root directory of this source tree.
@@ -49,9 +49,13 @@ const PickersToolbarContent = styled(Grid, {
49
49
  name: 'MuiPickersToolbar',
50
50
  slot: 'Content',
51
51
  overridesResolver: (props, styles) => styles.content
52
- })({
52
+ })(({
53
+ ownerState
54
+ }) => _extends({
53
55
  flex: 1
54
- });
56
+ }, !ownerState.isLandscape && {
57
+ alignItems: 'center'
58
+ }));
55
59
  const PickersToolbarPenIconButton = styled(IconButton, {
56
60
  name: 'MuiPickersToolbar',
57
61
  slot: 'PenIconButton',
@@ -8,7 +8,7 @@ export function arrayIncludes(array, itemOrItems) {
8
8
  }
9
9
  export const onSpaceOrEnter = (innerFn, onFocus) => event => {
10
10
  if (event.key === 'Enter' || event.key === ' ') {
11
- innerFn(); // prevent any side effects
11
+ innerFn(event); // prevent any side effects
12
12
 
13
13
  event.preventDefault();
14
14
  event.stopPropagation();
@@ -15,4 +15,5 @@ export * from './zhCN';
15
15
  export * from './koKR';
16
16
  export * from './isIS';
17
17
  export * from './jaJP';
18
+ export * from './ukUA';
18
19
  export * from './utils/pickersLocaleTextApi';
@@ -0,0 +1,37 @@
1
+ import { getPickersLocalization } from './utils/getPickersLocalization';
2
+ // This object is not Partial<PickersLocaleText> because it is the default values
3
+ const ukUAPickers = {
4
+ // Calendar navigation
5
+ previousMonth: 'Попередній місяць',
6
+ nextMonth: 'Наступний місяць',
7
+ // View navigation
8
+ openPreviousView: 'відкрити попередній вигляд',
9
+ openNextView: 'відкрити наступний вигляд',
10
+ calendarViewSwitchingButtonAriaLabel: view => view === 'year' ? 'річний вигляд відкрито, перейти до календарного вигляду' : 'календарний вигляд відкрито, перейти до річного вигляду',
11
+ inputModeToggleButtonAriaLabel: (isKeyboardInputOpen, viewType) => isKeyboardInputOpen ? `текстове поле відкрите, перейти до ${viewType} вигляду` : `${viewType} вигляд наразі відкрито, перейти до текстового поля`,
12
+ // DateRange placeholders
13
+ start: 'Початок',
14
+ end: 'Кінець',
15
+ // Action bar
16
+ cancelButtonLabel: 'Відміна',
17
+ clearButtonLabel: 'Очистити',
18
+ okButtonLabel: 'OK',
19
+ todayButtonLabel: 'Сьогодні',
20
+ // Toolbar titles
21
+ datePickerDefaultToolbarTitle: 'Вибрати дату',
22
+ dateTimePickerDefaultToolbarTitle: 'Вибрати дату і час',
23
+ timePickerDefaultToolbarTitle: 'Вибрати час',
24
+ dateRangePickerDefaultToolbarTitle: 'Вибрати календарний період',
25
+ // Clock labels
26
+ clockLabelText: (view, time, adapter) => `Select ${view}. ${time === null ? 'Час не вибраний' : `Вибрано час ${adapter.format(time, 'fullTime')}`}`,
27
+ hoursClockNumberText: hours => `${hours} годин`,
28
+ minutesClockNumberText: minutes => `${minutes} хвилин`,
29
+ secondsClockNumberText: seconds => `${seconds} секунд`,
30
+ // Open picker labels
31
+ openDatePickerDialogue: (value, utils) => value !== null && utils.isValid(value) ? `Оберіть дату, обрана дата ${utils.format(value, 'fullDate')}` : 'Оберіть дату',
32
+ openTimePickerDialogue: (value, utils) => value !== null && utils.isValid(value) ? `Оберіть час, обраний час ${utils.format(value, 'fullTime')}` : 'Оберіть час',
33
+ // Table labels
34
+ timeTableLabel: 'оберіть час',
35
+ dateTableLabel: 'оберіть дату'
36
+ };
37
+ export const ukUA = getPickersLocalization(ukUAPickers);
@@ -21,8 +21,6 @@ var _material = require("@mui/material");
21
21
 
22
22
  var _PickersToolbar = require("../internals/components/PickersToolbar");
23
23
 
24
- var _pickersToolbarClasses = require("../internals/components/pickersToolbarClasses");
25
-
26
24
  var _useUtils = require("../internals/hooks/useUtils");
27
25
 
28
26
  var _shared = require("./shared");
@@ -52,12 +50,7 @@ const DatePickerToolbarRoot = (0, _styles.styled)(_PickersToolbar.PickersToolbar
52
50
  name: 'MuiDatePickerToolbar',
53
51
  slot: 'Root',
54
52
  overridesResolver: (_, styles) => styles.root
55
- })({
56
- [`& .${_pickersToolbarClasses.pickersToolbarClasses.penIconButton}`]: {
57
- position: 'relative',
58
- top: 4
59
- }
60
- });
53
+ })({});
61
54
  const DatePickerToolbarTitle = (0, _styles.styled)(_Typography.default, {
62
55
  name: 'MuiDatePickerToolbar',
63
56
  slot: 'Title',
@@ -120,7 +113,6 @@ const DatePickerToolbar = /*#__PURE__*/React.forwardRef(function DatePickerToolb
120
113
  isMobileKeyboardViewOpen: isMobileKeyboardViewOpen,
121
114
  toggleMobileKeyboardView: toggleMobileKeyboardView,
122
115
  isLandscape: isLandscape,
123
- ownerState: ownerState,
124
116
  className: classes.root
125
117
  }, other, {
126
118
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(DatePickerToolbarTitle, {
@@ -7,10 +7,10 @@ Object.defineProperty(exports, "__esModule", {
7
7
  });
8
8
  exports.DateTimePickerToolbar = DateTimePickerToolbar;
9
9
 
10
- var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
11
-
12
10
  var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
13
11
 
12
+ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
13
+
14
14
  var React = _interopRequireWildcard(require("react"));
15
15
 
16
16
  var _styles = require("@mui/material/styles");
@@ -54,16 +54,22 @@ const DateTimePickerToolbarRoot = (0, _styles.styled)(_PickersToolbar.PickersToo
54
54
  name: 'MuiDateTimePickerToolbar',
55
55
  slot: 'Root',
56
56
  overridesResolver: (props, styles) => styles.root
57
- })({
57
+ })(({
58
+ theme
59
+ }) => ({
58
60
  paddingLeft: 16,
59
61
  paddingRight: 16,
60
62
  justifyContent: 'space-around',
61
- [`& .${_pickersToolbarClasses.pickersToolbarClasses.penIconButton}`]: {
63
+ position: 'relative',
64
+ [`& .${_pickersToolbarClasses.pickersToolbarClasses.penIconButton}`]: (0, _extends2.default)({
62
65
  position: 'absolute',
63
- top: 8,
66
+ top: 8
67
+ }, theme.direction === 'rtl' ? {
68
+ left: 8
69
+ } : {
64
70
  right: 8
65
- }
66
- });
71
+ })
72
+ }));
67
73
  const DateTimePickerToolbarDateContainer = (0, _styles.styled)('div', {
68
74
  name: 'MuiDateTimePickerToolbar',
69
75
  slot: 'DateContainer',
package/node/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license MUI v5.0.6
1
+ /** @license MUI v5.0.8
2
2
  *
3
3
  * This source code is licensed under the MIT license found in the
4
4
  * LICENSE file in the root directory of this source tree.
@@ -72,9 +72,13 @@ const PickersToolbarContent = (0, _styles.styled)(_Grid.default, {
72
72
  name: 'MuiPickersToolbar',
73
73
  slot: 'Content',
74
74
  overridesResolver: (props, styles) => styles.content
75
- })({
75
+ })(({
76
+ ownerState
77
+ }) => (0, _extends2.default)({
76
78
  flex: 1
77
- });
79
+ }, !ownerState.isLandscape && {
80
+ alignItems: 'center'
81
+ }));
78
82
  const PickersToolbarPenIconButton = (0, _styles.styled)(_IconButton.default, {
79
83
  name: 'MuiPickersToolbar',
80
84
  slot: 'PenIconButton',
@@ -17,7 +17,7 @@ function arrayIncludes(array, itemOrItems) {
17
17
 
18
18
  const onSpaceOrEnter = (innerFn, onFocus) => event => {
19
19
  if (event.key === 'Enter' || event.key === ' ') {
20
- innerFn(); // prevent any side effects
20
+ innerFn(event); // prevent any side effects
21
21
 
22
22
  event.preventDefault();
23
23
  event.stopPropagation();
@@ -225,6 +225,19 @@ Object.keys(_jaJP).forEach(function (key) {
225
225
  });
226
226
  });
227
227
 
228
+ var _ukUA = require("./ukUA");
229
+
230
+ Object.keys(_ukUA).forEach(function (key) {
231
+ if (key === "default" || key === "__esModule") return;
232
+ if (key in exports && exports[key] === _ukUA[key]) return;
233
+ Object.defineProperty(exports, key, {
234
+ enumerable: true,
235
+ get: function () {
236
+ return _ukUA[key];
237
+ }
238
+ });
239
+ });
240
+
228
241
  var _pickersLocaleTextApi = require("./utils/pickersLocaleTextApi");
229
242
 
230
243
  Object.keys(_pickersLocaleTextApi).forEach(function (key) {
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.ukUA = void 0;
7
+
8
+ var _getPickersLocalization = require("./utils/getPickersLocalization");
9
+
10
+ // This object is not Partial<PickersLocaleText> because it is the default values
11
+ const ukUAPickers = {
12
+ // Calendar navigation
13
+ previousMonth: 'Попередній місяць',
14
+ nextMonth: 'Наступний місяць',
15
+ // View navigation
16
+ openPreviousView: 'відкрити попередній вигляд',
17
+ openNextView: 'відкрити наступний вигляд',
18
+ calendarViewSwitchingButtonAriaLabel: view => view === 'year' ? 'річний вигляд відкрито, перейти до календарного вигляду' : 'календарний вигляд відкрито, перейти до річного вигляду',
19
+ inputModeToggleButtonAriaLabel: (isKeyboardInputOpen, viewType) => isKeyboardInputOpen ? `текстове поле відкрите, перейти до ${viewType} вигляду` : `${viewType} вигляд наразі відкрито, перейти до текстового поля`,
20
+ // DateRange placeholders
21
+ start: 'Початок',
22
+ end: 'Кінець',
23
+ // Action bar
24
+ cancelButtonLabel: 'Відміна',
25
+ clearButtonLabel: 'Очистити',
26
+ okButtonLabel: 'OK',
27
+ todayButtonLabel: 'Сьогодні',
28
+ // Toolbar titles
29
+ datePickerDefaultToolbarTitle: 'Вибрати дату',
30
+ dateTimePickerDefaultToolbarTitle: 'Вибрати дату і час',
31
+ timePickerDefaultToolbarTitle: 'Вибрати час',
32
+ dateRangePickerDefaultToolbarTitle: 'Вибрати календарний період',
33
+ // Clock labels
34
+ clockLabelText: (view, time, adapter) => `Select ${view}. ${time === null ? 'Час не вибраний' : `Вибрано час ${adapter.format(time, 'fullTime')}`}`,
35
+ hoursClockNumberText: hours => `${hours} годин`,
36
+ minutesClockNumberText: minutes => `${minutes} хвилин`,
37
+ secondsClockNumberText: seconds => `${seconds} секунд`,
38
+ // Open picker labels
39
+ openDatePickerDialogue: (value, utils) => value !== null && utils.isValid(value) ? `Оберіть дату, обрана дата ${utils.format(value, 'fullDate')}` : 'Оберіть дату',
40
+ openTimePickerDialogue: (value, utils) => value !== null && utils.isValid(value) ? `Оберіть час, обраний час ${utils.format(value, 'fullTime')}` : 'Оберіть час',
41
+ // Table labels
42
+ timeTableLabel: 'оберіть час',
43
+ dateTableLabel: 'оберіть дату'
44
+ };
45
+ const ukUA = (0, _getPickersLocalization.getPickersLocalization)(ukUAPickers);
46
+ exports.ukUA = ukUA;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mui/x-date-pickers",
3
- "version": "5.0.6",
3
+ "version": "5.0.8",
4
4
  "description": "The community edition of the date picker components (MUI X).",
5
5
  "author": "MUI Team",
6
6
  "main": "./node/index.js",