@progress/kendo-react-layout 5.12.0-dev.202302211107 → 5.12.0-dev.202303021526
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/dist/cdn/js/kendo-react-layout.js +1 -1
- package/dist/es/actionsheet/ActionSheet.d.ts +32 -20
- package/dist/es/actionsheet/ActionSheet.js +91 -52
- package/dist/es/bottomnavigation/BottomNavigationItem.js +1 -1
- package/dist/es/breadcrumb/BreadcrumbDelimiter.js +1 -1
- package/dist/es/breadcrumb/BreadcrumbLink.js +1 -1
- package/dist/es/drawer/DrawerItem.js +2 -2
- package/dist/es/drawer/DrawerNavigation.js +1 -1
- package/dist/es/menu/components/MenuItemArrow.js +1 -1
- package/dist/es/package-metadata.js +1 -1
- package/dist/es/panelbar/PanelBarItem.js +1 -1
- package/dist/es/splitter/Splitter.js +4 -1
- package/dist/es/splitter/SplitterBar.d.ts +1 -0
- package/dist/es/splitter/SplitterBar.js +1 -1
- package/dist/es/splitter/SplitterPane.js +1 -1
- package/dist/es/splitter/messages/index.d.ts +10 -0
- package/dist/es/splitter/messages/index.js +11 -0
- package/dist/es/stepper/Step.js +1 -1
- package/dist/es/stepper/Stepper.js +5 -1
- package/dist/es/stepper/messages/index.d.ts +5 -0
- package/dist/es/stepper/messages/index.js +5 -0
- package/dist/npm/actionsheet/ActionSheet.d.ts +32 -20
- package/dist/npm/actionsheet/ActionSheet.js +90 -51
- package/dist/npm/bottomnavigation/BottomNavigationItem.js +1 -1
- package/dist/npm/breadcrumb/BreadcrumbDelimiter.js +1 -1
- package/dist/npm/breadcrumb/BreadcrumbLink.js +1 -1
- package/dist/npm/drawer/DrawerItem.js +2 -2
- package/dist/npm/drawer/DrawerNavigation.js +1 -1
- package/dist/npm/menu/components/MenuItemArrow.js +1 -1
- package/dist/npm/package-metadata.js +1 -1
- package/dist/npm/panelbar/PanelBarItem.js +1 -1
- package/dist/npm/splitter/Splitter.js +4 -1
- package/dist/npm/splitter/SplitterBar.d.ts +1 -0
- package/dist/npm/splitter/SplitterBar.js +1 -1
- package/dist/npm/splitter/SplitterPane.js +1 -1
- package/dist/npm/splitter/messages/index.d.ts +10 -0
- package/dist/npm/splitter/messages/index.js +14 -0
- package/dist/npm/stepper/Step.js +1 -1
- package/dist/npm/stepper/Stepper.js +5 -1
- package/dist/npm/stepper/messages/index.d.ts +5 -0
- package/dist/npm/stepper/messages/index.js +6 -1
- package/dist/systemjs/kendo-react-layout.js +1 -1
- package/package.json +13 -13
|
@@ -62,18 +62,33 @@ export interface ActionSheetProps {
|
|
|
62
62
|
* Specifies the selectors of the navigatable elements inside the templates of the ActionSheet.
|
|
63
63
|
*/
|
|
64
64
|
navigatableElements: string[];
|
|
65
|
+
/**
|
|
66
|
+
* Controls the popup animation. By default, the open and close animations are disabled.
|
|
67
|
+
*/
|
|
68
|
+
animation?: boolean;
|
|
69
|
+
/**
|
|
70
|
+
* The CSS classes that will be rendered on the inner ActionSheet element.
|
|
71
|
+
*/
|
|
72
|
+
className?: string;
|
|
73
|
+
/**
|
|
74
|
+
* Specifies the state of the ActionSheet.
|
|
75
|
+
*/
|
|
76
|
+
expand?: boolean;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* @hidden
|
|
80
|
+
*/
|
|
81
|
+
export interface ActionSheetState {
|
|
82
|
+
show?: boolean;
|
|
83
|
+
slide?: boolean;
|
|
65
84
|
}
|
|
66
85
|
/**
|
|
67
86
|
* Represents the [KendoReact ActionSheet]({% slug overview_actionsheet %}) component.
|
|
68
87
|
*/
|
|
69
|
-
export declare class ActionSheet extends React.Component<ActionSheetProps> {
|
|
70
|
-
/**
|
|
71
|
-
* @hidden
|
|
72
|
-
*/
|
|
88
|
+
export declare class ActionSheet extends React.Component<ActionSheetProps, ActionSheetState> {
|
|
89
|
+
/** @hidden */
|
|
73
90
|
static displayName: string;
|
|
74
|
-
/**
|
|
75
|
-
* @hidden
|
|
76
|
-
*/
|
|
91
|
+
/** @hidden */
|
|
77
92
|
static propTypes: {
|
|
78
93
|
items: PropTypes.Requireable<any[]>;
|
|
79
94
|
subTitle: PropTypes.Requireable<string>;
|
|
@@ -81,28 +96,24 @@ export declare class ActionSheet extends React.Component<ActionSheetProps> {
|
|
|
81
96
|
navigatable: PropTypes.Requireable<boolean>;
|
|
82
97
|
navigatableElements: PropTypes.Requireable<any[]>;
|
|
83
98
|
};
|
|
84
|
-
/**
|
|
85
|
-
* @hidden
|
|
86
|
-
*/
|
|
99
|
+
/** @hidden */
|
|
87
100
|
static defaultProps: {
|
|
88
101
|
navigatable: boolean;
|
|
89
102
|
navigatableElements: never[];
|
|
90
103
|
};
|
|
91
|
-
private
|
|
104
|
+
private actionSheetRef;
|
|
92
105
|
private actionSheetTitleClass;
|
|
93
106
|
private ariaLabeledBy;
|
|
94
107
|
private navigation?;
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
108
|
+
private animationDuration;
|
|
109
|
+
private bottomPosition;
|
|
110
|
+
/** @hidden */
|
|
98
111
|
constructor(props: ActionSheetProps);
|
|
99
|
-
/**
|
|
100
|
-
* @hidden
|
|
101
|
-
*/
|
|
112
|
+
/** @hidden */
|
|
102
113
|
componentDidMount(): void;
|
|
103
|
-
/**
|
|
104
|
-
|
|
105
|
-
|
|
114
|
+
/** @hidden */
|
|
115
|
+
componentDidUpdate(_prevProps: Readonly<ActionSheetProps>, prevState: Readonly<ActionSheetState>): void;
|
|
116
|
+
/** @hidden */
|
|
106
117
|
render(): JSX.Element;
|
|
107
118
|
private handleKeyDown;
|
|
108
119
|
private onTab;
|
|
@@ -110,5 +121,6 @@ export declare class ActionSheet extends React.Component<ActionSheetProps> {
|
|
|
110
121
|
private handleItemClick;
|
|
111
122
|
private onEnter;
|
|
112
123
|
private onEscape;
|
|
124
|
+
private hideActionSheet;
|
|
113
125
|
private children;
|
|
114
126
|
}
|
|
@@ -35,7 +35,8 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
35
35
|
};
|
|
36
36
|
import * as React from 'react';
|
|
37
37
|
import * as PropTypes from 'prop-types';
|
|
38
|
-
import {
|
|
38
|
+
import { Animation } from '@progress/kendo-react-animation';
|
|
39
|
+
import { validatePackage, Navigation, FOCUSABLE_ELEMENTS, classNames } from '@progress/kendo-react-common';
|
|
39
40
|
import { packageMetadata } from '../package-metadata';
|
|
40
41
|
import { ActionSheetItem } from './ActionSheetItem';
|
|
41
42
|
import { headerDisplayName } from './ActionSheetHeader';
|
|
@@ -46,14 +47,14 @@ import { contentDisplayName } from './ActionSheetContent';
|
|
|
46
47
|
*/
|
|
47
48
|
var ActionSheet = /** @class */ (function (_super) {
|
|
48
49
|
__extends(ActionSheet, _super);
|
|
49
|
-
/**
|
|
50
|
-
* @hidden
|
|
51
|
-
*/
|
|
50
|
+
/** @hidden */
|
|
52
51
|
function ActionSheet(props) {
|
|
53
52
|
var _this = _super.call(this, props) || this;
|
|
54
|
-
_this.
|
|
53
|
+
_this.actionSheetRef = React.createRef();
|
|
55
54
|
_this.actionSheetTitleClass = 'k-actionsheet-title';
|
|
56
55
|
_this.ariaLabeledBy = _this.actionSheetTitleClass + 1;
|
|
56
|
+
_this.animationDuration = 300;
|
|
57
|
+
_this.bottomPosition = { bottom: '0', width: '100%' };
|
|
57
58
|
_this.handleKeyDown = function (e) {
|
|
58
59
|
if (_this.props.navigatable) {
|
|
59
60
|
_this.navigation.triggerKeyboardEvent(e);
|
|
@@ -69,24 +70,36 @@ var ActionSheet = /** @class */ (function (_super) {
|
|
|
69
70
|
}
|
|
70
71
|
};
|
|
71
72
|
_this.handleOverlayClick = function (ev) {
|
|
73
|
+
/** Deprecated */
|
|
72
74
|
if (_this.props.onOverlayClick) {
|
|
73
75
|
_this.props.onOverlayClick.call(undefined, ev);
|
|
74
76
|
}
|
|
75
77
|
if (_this.props.onClose) {
|
|
76
78
|
_this.props.onClose.call(undefined, ev);
|
|
77
79
|
}
|
|
80
|
+
if (!_this.props.animation) {
|
|
81
|
+
_this.hideActionSheet();
|
|
82
|
+
}
|
|
78
83
|
};
|
|
79
84
|
_this.handleItemClick = function (ev) {
|
|
85
|
+
/** Deprecated */
|
|
80
86
|
if (_this.props.onItemClick) {
|
|
81
87
|
_this.props.onItemClick.call(undefined, ev);
|
|
82
88
|
}
|
|
83
89
|
if (_this.props.onItemSelect) {
|
|
84
90
|
_this.props.onItemSelect.call(undefined, ev);
|
|
85
91
|
}
|
|
92
|
+
if (!_this.props.animation) {
|
|
93
|
+
_this.hideActionSheet();
|
|
94
|
+
}
|
|
86
95
|
};
|
|
87
96
|
_this.onEnter = function (target, nav, ev) {
|
|
97
|
+
if (target.ariaDisabled) {
|
|
98
|
+
return;
|
|
99
|
+
}
|
|
88
100
|
var isItem = target.className && target.className.indexOf('k-actionsheet-item') !== -1;
|
|
89
101
|
var allItems = nav.elements.filter(function (e) { return e.className.indexOf('k-actionsheet-item') !== -1; });
|
|
102
|
+
/** Deprecated */
|
|
90
103
|
if (isItem && _this.props.onItemClick) {
|
|
91
104
|
ev.preventDefault();
|
|
92
105
|
var item = _this.props.items[allItems.indexOf(target)];
|
|
@@ -105,8 +118,12 @@ var ActionSheet = /** @class */ (function (_super) {
|
|
|
105
118
|
title: item && item.title
|
|
106
119
|
});
|
|
107
120
|
}
|
|
121
|
+
if (!_this.props.animation) {
|
|
122
|
+
_this.hideActionSheet();
|
|
123
|
+
}
|
|
108
124
|
};
|
|
109
125
|
_this.onEscape = function (_target, _nav, ev) {
|
|
126
|
+
/** Deprecated */
|
|
110
127
|
if (_this.props.onOverlayClick) {
|
|
111
128
|
ev.preventDefault();
|
|
112
129
|
_this.props.onOverlayClick.call(undefined, ev);
|
|
@@ -115,22 +132,55 @@ var ActionSheet = /** @class */ (function (_super) {
|
|
|
115
132
|
ev.preventDefault();
|
|
116
133
|
_this.props.onClose.call(undefined, ev);
|
|
117
134
|
}
|
|
135
|
+
if (!_this.props.animation) {
|
|
136
|
+
_this.hideActionSheet();
|
|
137
|
+
}
|
|
138
|
+
};
|
|
139
|
+
_this.hideActionSheet = function () {
|
|
140
|
+
_this.setState({ show: false });
|
|
141
|
+
};
|
|
142
|
+
_this.children = function (children) {
|
|
143
|
+
var components = {};
|
|
144
|
+
React.Children.forEach(children, function (child) {
|
|
145
|
+
components[child.type.displayName] = child;
|
|
146
|
+
});
|
|
147
|
+
return components;
|
|
148
|
+
};
|
|
149
|
+
_this.state = {
|
|
150
|
+
show: false,
|
|
151
|
+
slide: false
|
|
118
152
|
};
|
|
119
153
|
validatePackage(packageMetadata);
|
|
120
154
|
return _this;
|
|
121
155
|
}
|
|
122
|
-
/**
|
|
123
|
-
* @hidden
|
|
124
|
-
*/
|
|
156
|
+
/** @hidden */
|
|
125
157
|
ActionSheet.prototype.componentDidMount = function () {
|
|
158
|
+
if (this.props.expand && !this.state.show) {
|
|
159
|
+
this.setState({ show: true });
|
|
160
|
+
}
|
|
161
|
+
};
|
|
162
|
+
/** @hidden */
|
|
163
|
+
ActionSheet.prototype.componentDidUpdate = function (_prevProps, prevState) {
|
|
126
164
|
var _this = this;
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
this.
|
|
165
|
+
var currentRef = this.actionSheetRef.current;
|
|
166
|
+
if (this.props.expand && !this.state.show) {
|
|
167
|
+
this.setState({ show: true });
|
|
168
|
+
}
|
|
169
|
+
if (this.props.expand && this.state.show && !this.state.slide) {
|
|
170
|
+
this.setState({ slide: true });
|
|
171
|
+
}
|
|
172
|
+
if (!this.props.expand && this.state.show && this.state.slide) {
|
|
173
|
+
this.setState({ slide: false });
|
|
174
|
+
}
|
|
175
|
+
if (prevState !== this.state && this.state.slide && currentRef && !this.props.className) {
|
|
176
|
+
currentRef.style.setProperty('--kendo-actionsheet-height', 'auto');
|
|
177
|
+
currentRef.style.setProperty('--kendo-actionsheet-max-height', 'none');
|
|
178
|
+
}
|
|
179
|
+
if (currentRef) {
|
|
130
180
|
if (this.props.navigatable) {
|
|
131
181
|
this.navigation = new Navigation({
|
|
132
182
|
tabIndex: this.props.tabIndex || 0,
|
|
133
|
-
root: this.
|
|
183
|
+
root: this.actionSheetRef,
|
|
134
184
|
rovingTabIndex: false,
|
|
135
185
|
selectors: __spreadArray([
|
|
136
186
|
'.k-actionsheet-item'
|
|
@@ -153,9 +203,8 @@ var ActionSheet = /** @class */ (function (_super) {
|
|
|
153
203
|
}
|
|
154
204
|
}
|
|
155
205
|
};
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
*/
|
|
206
|
+
;
|
|
207
|
+
/** @hidden */
|
|
159
208
|
ActionSheet.prototype.render = function () {
|
|
160
209
|
var _this = this;
|
|
161
210
|
var _a, _b;
|
|
@@ -163,43 +212,35 @@ var ActionSheet = /** @class */ (function (_super) {
|
|
|
163
212
|
var bottomGroupItems = (_b = this.props.items) === null || _b === void 0 ? void 0 : _b.filter(function (item) { return item.group === 'bottom'; });
|
|
164
213
|
var shouldRenderSeparator = (topGroupItems && topGroupItems.length > 0) && (bottomGroupItems && bottomGroupItems.length > 0);
|
|
165
214
|
var children = this.children(this.props.children);
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
React.Children.forEach(children, function (child) {
|
|
191
|
-
components[child.type.displayName] = child;
|
|
192
|
-
});
|
|
193
|
-
return components;
|
|
215
|
+
var actionSheetPanel = this.state.slide && React.createElement("div", { className: classNames('k-actionsheet', this.props.className, {
|
|
216
|
+
'k-actionsheet-bottom': !this.props.className
|
|
217
|
+
}), role: "dialog", "aria-modal": "true", "aria-hidden": false, "aria-labelledby": this.ariaLabeledBy, ref: this.actionSheetRef, onKeyDown: this.handleKeyDown },
|
|
218
|
+
(children[headerDisplayName] || this.props.title || this.props.subTitle) && (React.createElement("div", { className: "k-actionsheet-titlebar" },
|
|
219
|
+
React.createElement("div", { className: "k-actionsheet-titlebar-group k-hbox" },
|
|
220
|
+
React.createElement("div", { className: this.actionSheetTitleClass, id: this.ariaLabeledBy }, children[headerDisplayName] ||
|
|
221
|
+
React.createElement(React.Fragment, null,
|
|
222
|
+
React.createElement("div", { className: "k-text-center" }, this.props.title),
|
|
223
|
+
this.props.subTitle && React.createElement("div", { className: "k-actionsheet-subtitle k-text-center" }, this.props.subTitle)))))),
|
|
224
|
+
children[contentDisplayName] || React.createElement("div", { className: "k-actionsheet-content" },
|
|
225
|
+
React.createElement("div", { className: "k-list-ul", role: "group" }, topGroupItems && topGroupItems.map(function (item, idx) {
|
|
226
|
+
return (React.createElement(ActionSheetItem, __assign({}, item, { id: idx, key: idx, item: item, tabIndex: _this.props.tabIndex || 0, onClick: _this.handleItemClick })));
|
|
227
|
+
})),
|
|
228
|
+
shouldRenderSeparator && React.createElement("hr", { className: "k-hr" }),
|
|
229
|
+
React.createElement("div", { className: "k-list-ul", role: "group" }, bottomGroupItems && bottomGroupItems.map(function (item, idx) {
|
|
230
|
+
return (React.createElement(ActionSheetItem, __assign({}, item, { id: idx + ((topGroupItems === null || topGroupItems === void 0 ? void 0 : topGroupItems.length) || 0), key: idx, item: item, tabIndex: _this.props.tabIndex || 0, onClick: _this.handleItemClick })));
|
|
231
|
+
}))),
|
|
232
|
+
children[footerDisplayName]);
|
|
233
|
+
return (React.createElement(React.Fragment, null, this.props.expand || this.state.show ? (React.createElement(React.Fragment, null,
|
|
234
|
+
React.createElement("div", { className: "k-actionsheet-container" },
|
|
235
|
+
React.createElement("div", { className: "k-overlay", onClick: this.handleOverlayClick }),
|
|
236
|
+
this.props.animation ? React.createElement(Animation, { transitionName: this.state.slide ? 'slide-up' : 'slide-down', onExited: this.hideActionSheet, transitionEnterDuration: this.animationDuration, transitionExitDuration: this.animationDuration, animationEnteringStyle: this.bottomPosition, animationEnteredStyle: this.bottomPosition, animationExitingStyle: this.bottomPosition, exit: true, enter: true, appear: false }, actionSheetPanel)
|
|
237
|
+
: actionSheetPanel)))
|
|
238
|
+
: null));
|
|
194
239
|
};
|
|
195
240
|
;
|
|
196
|
-
/**
|
|
197
|
-
* @hidden
|
|
198
|
-
*/
|
|
241
|
+
/** @hidden */
|
|
199
242
|
ActionSheet.displayName = 'KendoReactActionSheet';
|
|
200
|
-
/**
|
|
201
|
-
* @hidden
|
|
202
|
-
*/
|
|
243
|
+
/** @hidden */
|
|
203
244
|
ActionSheet.propTypes = {
|
|
204
245
|
items: PropTypes.array,
|
|
205
246
|
subTitle: PropTypes.string,
|
|
@@ -207,9 +248,7 @@ var ActionSheet = /** @class */ (function (_super) {
|
|
|
207
248
|
navigatable: PropTypes.bool,
|
|
208
249
|
navigatableElements: PropTypes.array
|
|
209
250
|
};
|
|
210
|
-
/**
|
|
211
|
-
* @hidden
|
|
212
|
-
*/
|
|
251
|
+
/** @hidden */
|
|
213
252
|
ActionSheet.defaultProps = {
|
|
214
253
|
navigatable: true,
|
|
215
254
|
navigatableElements: []
|
|
@@ -29,7 +29,7 @@ export var BottomNavigationItem = React.forwardRef(function (props, ref) {
|
|
|
29
29
|
}, [onKeyDown, index, disabled]);
|
|
30
30
|
var renderer = render;
|
|
31
31
|
var ItemComp = item;
|
|
32
|
-
var bottomNavItem = (React.createElement("span", { ref: elementRef, className: itemClasses, style: style, role: 'link', id: id, tabIndex: tabIndex, onClick: handleClick, onKeyDown: handleKeyDown, "aria-
|
|
32
|
+
var bottomNavItem = (React.createElement("span", { ref: elementRef, className: itemClasses, style: style, role: 'link', id: id, tabIndex: tabIndex, onClick: handleClick, onKeyDown: handleKeyDown, "aria-current": selected, "aria-disabled": disabled }, ItemComp ? React.createElement(ItemComp, { itemIndex: index, item: dataItem }) :
|
|
33
33
|
(React.createElement(React.Fragment, null,
|
|
34
34
|
(icon || svgIcon) && React.createElement(IconWrap, { className: 'k-bottom-nav-item-icon', name: icon, icon: svgIcon }),
|
|
35
35
|
text && React.createElement("span", { className: 'k-bottom-nav-item-text', style: { userSelect: 'none' } }, text)))));
|
|
@@ -19,7 +19,7 @@ export var BreadcrumbDelimiter = React.forwardRef(function (props, ref) {
|
|
|
19
19
|
});
|
|
20
20
|
});
|
|
21
21
|
React.useImperativeHandle(ref, function () { return target.current; });
|
|
22
|
-
return (React.createElement(IconWrap, { ref: breadcrumbDelimiterRef, id: props.id, tabIndex: props.tabIndex, style: props.style, name: "chevron-right", icon: chevronRightIcon, className: "k-breadcrumb-delimiter-icon" }));
|
|
22
|
+
return (React.createElement(IconWrap, { ref: breadcrumbDelimiterRef, id: props.id, "aria-hidden": true, tabIndex: props.tabIndex, style: props.style, name: "chevron-right", icon: chevronRightIcon, className: "k-breadcrumb-delimiter-icon" }));
|
|
23
23
|
});
|
|
24
24
|
var propTypes = {
|
|
25
25
|
id: PropTypes.string,
|
|
@@ -28,7 +28,7 @@ export var BreadcrumbLink = React.forwardRef(function (props, ref) {
|
|
|
28
28
|
dispatchEvent(props.onKeyDown, event, event.target, { id: props.id });
|
|
29
29
|
}
|
|
30
30
|
}, [props.onKeyDown]);
|
|
31
|
-
return (React.createElement("span", { "aria-current": props.ariaCurrent ? props.ariaCurrent : props.isLast, id: props.id, ref: linkRef, style: props.style, dir: useDir(linkRef, props.dir), tabIndex: getTabIndex(props.tabIndex, props.disabled), className: classNames('k-cursor-pointer k-flex-none k-breadcrumb-link k-breadcrumb-icontext-link', {
|
|
31
|
+
return (React.createElement("span", { "aria-current": props.ariaCurrent ? props.ariaCurrent : props.isLast, role: 'link', id: props.id, ref: linkRef, style: props.style, dir: useDir(linkRef, props.dir), tabIndex: getTabIndex(props.tabIndex, props.disabled), className: classNames('k-cursor-pointer k-flex-none k-breadcrumb-link k-breadcrumb-icontext-link', {
|
|
32
32
|
'k-disabled': props.disabled
|
|
33
33
|
}), onClick: handleItemSelect, onKeyDown: handleKeyDown },
|
|
34
34
|
props.iconClass
|
|
@@ -84,8 +84,8 @@ export var DrawerItem = React.forwardRef(function (props, target) {
|
|
|
84
84
|
(icon || svgIcon) && React.createElement(IconWrap, { name: icon ? toIconName(icon) : icon, icon: svgIcon }),
|
|
85
85
|
!expanded && mini ? null : React.createElement("span", { className: 'k-item-text' }, text)));
|
|
86
86
|
return (separator
|
|
87
|
-
? React.createElement("li", { className: 'k-drawer-item k-drawer-separator', role: "
|
|
88
|
-
: (React.createElement("li", __assign({ ref: elementRef, className: itemClassNames, style: style, role: "
|
|
87
|
+
? React.createElement("li", { className: 'k-drawer-item k-drawer-separator', role: "separator" })
|
|
88
|
+
: (React.createElement("li", __assign({ ref: elementRef, className: itemClassNames, style: style, role: "menuitem", "aria-label": text, "aria-disabled": disabled, onClick: handleClick, tabIndex: getTabIndex(tabIndex, disabled) }, others), !item ? drawerItemContent : children)));
|
|
89
89
|
});
|
|
90
90
|
DrawerItem.propTypes = {
|
|
91
91
|
className: PropTypes.string,
|
|
@@ -124,7 +124,7 @@ export var DrawerNavigation = React.forwardRef(function (props, target) {
|
|
|
124
124
|
(dir === 'ltr' && position === 'start') || (dir === 'rtl' && position === 'end') ?
|
|
125
125
|
mini ? collapseOverlayMini : collapseOverlay :
|
|
126
126
|
mini ? collapseOverlayMini : collapseOverlayRtl;
|
|
127
|
-
var drawerItems = (items && (React.createElement("ul", { className: 'k-drawer-items', role: "
|
|
127
|
+
var drawerItems = (items && (React.createElement("ul", { className: 'k-drawer-items', role: "menubar", "aria-label": "drawer-list", "aria-expanded": expanded }, items
|
|
128
128
|
.map(function (element, index) {
|
|
129
129
|
var drawerItemProps = __assign(__assign({ index: index }, element), { onSelect: onSelect });
|
|
130
130
|
var ItemComp = item || DrawerItem;
|
|
@@ -50,7 +50,7 @@ var MenuItemArrow = /** @class */ (function (_super) {
|
|
|
50
50
|
* @hidden
|
|
51
51
|
*/
|
|
52
52
|
MenuItemArrow.prototype.render = function () {
|
|
53
|
-
return React.createElement(IconWrap, __assign({ className: 'k-menu-expand-arrow' }, this.getIcon()));
|
|
53
|
+
return React.createElement(IconWrap, __assign({ "aria-hidden": true, className: 'k-menu-expand-arrow' }, this.getIcon()));
|
|
54
54
|
};
|
|
55
55
|
MenuItemArrow.prototype.getIcon = function () {
|
|
56
56
|
var childrenPosition = getChildrenPosition(this.props.itemId, this.props.verticalMenu === true, this.props.dir === 'rtl');
|
|
@@ -5,7 +5,7 @@ export var packageMetadata = {
|
|
|
5
5
|
name: '@progress/kendo-react-layout',
|
|
6
6
|
productName: 'KendoReact',
|
|
7
7
|
productCodes: ['KENDOUIREACT', 'KENDOUICOMPLETE'],
|
|
8
|
-
publishDate:
|
|
8
|
+
publishDate: 1677769327,
|
|
9
9
|
version: '',
|
|
10
10
|
licensingDocsUrl: 'https://www.telerik.com/kendo-react-ui/my-license/?utm_medium=product&utm_source=kendoreact&utm_campaign=kendo-ui-react-purchase-license-keys-warning'
|
|
11
11
|
};
|
|
@@ -101,7 +101,7 @@ var PanelBarItem = /** @class */ (function (_super) {
|
|
|
101
101
|
: null;
|
|
102
102
|
var opened = (!disabled && expanded);
|
|
103
103
|
var content = opened || keepItemsMounted
|
|
104
|
-
? (React.createElement("ul", { role: "group", className: "k-panelbar-group k-panel k-group", style: { display: keepItemsMounted
|
|
104
|
+
? (React.createElement("ul", { role: "group", "aria-expanded": expanded, "aria-hidden": !expanded, className: "k-panelbar-group k-panel k-group", style: { display: keepItemsMounted
|
|
105
105
|
? (this.state.show ? 'block' : 'none')
|
|
106
106
|
: 'block' } }, children))
|
|
107
107
|
: null;
|
|
@@ -41,6 +41,8 @@ import { SplitterBar } from './SplitterBar';
|
|
|
41
41
|
import { classNames } from '@progress/kendo-react-common';
|
|
42
42
|
import { validatePackage } from '@progress/kendo-react-common';
|
|
43
43
|
import { packageMetadata } from '../package-metadata';
|
|
44
|
+
import { messages, splitBarLabel } from './messages';
|
|
45
|
+
import { provideLocalizationService } from '@progress/kendo-react-intl';
|
|
44
46
|
/**
|
|
45
47
|
* @hidden
|
|
46
48
|
*/
|
|
@@ -112,13 +114,14 @@ var Splitter = /** @class */ (function (_super) {
|
|
|
112
114
|
return paneOptions;
|
|
113
115
|
};
|
|
114
116
|
_this.mapSplitterPanes = function (panes, panesContent) {
|
|
117
|
+
var ariaLabel = provideLocalizationService(_this).toLanguageString(splitBarLabel, messages[splitBarLabel]);
|
|
115
118
|
return panes.map(function (pane, index) {
|
|
116
119
|
var splitterBar;
|
|
117
120
|
var paneKey = index * 2;
|
|
118
121
|
var barKey = paneKey + 1;
|
|
119
122
|
if (index + 1 < panes.length) {
|
|
120
123
|
var next = panes[index + 1];
|
|
121
|
-
splitterBar = (React.createElement(SplitterBar, { key: barKey, index: index, orientation: pane.orientation, prev: pane, next: next, onDrag: _this.onBarDragResize, onToggle: _this.onBarToggle, onKeyboardResize: _this.onBarKeyboardResize }));
|
|
124
|
+
splitterBar = (React.createElement(SplitterBar, { key: barKey, index: index, orientation: pane.orientation, prev: pane, next: next, ariaLabel: ariaLabel, onDrag: _this.onBarDragResize, onToggle: _this.onBarToggle, onKeyboardResize: _this.onBarKeyboardResize }));
|
|
122
125
|
}
|
|
123
126
|
var splitterPane = (React.createElement(SplitterPane, __assign({ key: paneKey }, pane), panesContent[index]));
|
|
124
127
|
return [splitterPane, splitterBar];
|
|
@@ -8,6 +8,7 @@ export interface SplitterBarProps {
|
|
|
8
8
|
index: number;
|
|
9
9
|
prev: SplitterPaneExtendedProps;
|
|
10
10
|
next: SplitterPaneExtendedProps;
|
|
11
|
+
ariaLabel?: string;
|
|
11
12
|
onDrag: (event: any, element: HTMLDivElement, index: number, isFirst: boolean, isLast: boolean) => void;
|
|
12
13
|
onToggle: (index: number, nativeEvent: React.MouseEvent<HTMLDivElement, MouseEvent> | React.KeyboardEvent<HTMLDivElement>) => void;
|
|
13
14
|
onKeyboardResize: (element: HTMLDivElement, index: number, delta: number, nativeEvent: React.KeyboardEvent<HTMLDivElement>) => void;
|
|
@@ -139,7 +139,7 @@ var SplitterBar = /** @class */ (function (_super) {
|
|
|
139
139
|
_a['k-splitbar-static-vertical'] = !isHorizontal && isStatic,
|
|
140
140
|
_a));
|
|
141
141
|
return (React.createElement(Draggable, { onPress: function (event) { return _this.onDrag(event, true, false); }, onDrag: function (event) { return _this.onDrag(event, false, false); }, onRelease: function (event) { return _this.onDrag(event, false, true); }, ref: function (component) { _this.draggable = component; } },
|
|
142
|
-
React.createElement("div", { tabIndex: isStatic ? -1 : 0, role: 'separator', className: barClasses, style: { touchAction: 'none' }, onFocus: this.onFocus, onBlur: this.onBlur, onDoubleClick: this.onToggle, onKeyDown: this.onKeyDown },
|
|
142
|
+
React.createElement("div", { tabIndex: isStatic ? -1 : 0, role: 'separator', "aria-valuenow": 0, "aria-label": this.props.ariaLabel, "aria-orientation": isHorizontal ? 'vertical' : undefined, className: barClasses, style: { touchAction: 'none' }, onFocus: this.onFocus, onBlur: this.onBlur, onDoubleClick: this.onToggle, onKeyDown: this.onKeyDown },
|
|
143
143
|
this.props.prev.collapsible && React.createElement("div", { className: 'k-collapse-prev', onClick: this.onPrevToggle },
|
|
144
144
|
React.createElement(IconWrap, { name: this.props.prev.collapsible
|
|
145
145
|
? isHorizontal
|
|
@@ -37,7 +37,7 @@ var SplitterPane = /** @class */ (function (_super) {
|
|
|
37
37
|
_a['k-pane-static'] = !resizable && !collapsible || fixedSize,
|
|
38
38
|
_a['k-scrollable'] = scrollable,
|
|
39
39
|
_a));
|
|
40
|
-
return (React.createElement("div", { id: id, style: style, className: paneClasses },
|
|
40
|
+
return (React.createElement("div", { id: id, role: 'group', style: style, className: paneClasses },
|
|
41
41
|
!collapsed || keepMounted ? this.props.children : undefined,
|
|
42
42
|
overlay ? React.createElement("div", { className: 'k-splitter-overlay k-overlay' }) : undefined));
|
|
43
43
|
};
|
package/dist/es/stepper/Step.js
CHANGED
|
@@ -117,7 +117,7 @@ export var Step = React.forwardRef(function (props, target) {
|
|
|
117
117
|
stepIndicator,
|
|
118
118
|
stepLabel));
|
|
119
119
|
return (React.createElement("li", __assign({ ref: elementRef, className: itemClassNames, style: itemStyles }, others),
|
|
120
|
-
React.createElement("a", { className: "k-step-link", title: label ? label : undefined, onClick: handleClick, onFocus: handleFocus, tabIndex: tabIndex ? tabIndex : focused ? 0 : -1, "aria-current": current
|
|
120
|
+
React.createElement("a", { className: "k-step-link", title: label ? label : undefined, onClick: handleClick, onFocus: handleFocus, tabIndex: tabIndex ? tabIndex : focused ? 0 : -1, "aria-current": current, "aria-disabled": disabled || !allowClick || undefined, "aria-invalid": isValid !== undefined && !isValid || undefined }, !item ? stepLink : children)));
|
|
121
121
|
});
|
|
122
122
|
Step.propTypes = {
|
|
123
123
|
children: PropTypes.any,
|
|
@@ -18,6 +18,8 @@ import { ProgressBar } from '@progress/kendo-react-progressbars';
|
|
|
18
18
|
import { DEFAULT_ANIMATION_DURATION, NO_ANIMATION } from './contants';
|
|
19
19
|
import { validatePackage } from '@progress/kendo-react-common';
|
|
20
20
|
import { packageMetadata } from '../package-metadata';
|
|
21
|
+
import { useLocalization } from '@progress/kendo-react-intl';
|
|
22
|
+
import { messages, progBarAriaLabel } from './messages';
|
|
21
23
|
/**
|
|
22
24
|
* Represents the [KendoReact Stepper component]({% slug overview_stepper %}).
|
|
23
25
|
*
|
|
@@ -40,6 +42,8 @@ import { packageMetadata } from '../package-metadata';
|
|
|
40
42
|
export var Stepper = React.forwardRef(function (props, target) {
|
|
41
43
|
validatePackage(packageMetadata);
|
|
42
44
|
var animationDuration = props.animationDuration, children = props.children, className = props.className, disabled = props.disabled, errorIcon = props.errorIcon, errorSVGIcon = props.errorSVGIcon, item = props.item, items = props.items, linear = props.linear, mode = props.mode, orientation = props.orientation, style = props.style, successIcon = props.successIcon, successSVGIcon = props.successSVGIcon, onChange = props.onChange, onFocus = props.onFocus;
|
|
45
|
+
var localizationService = useLocalization();
|
|
46
|
+
var pbAriaLabel = localizationService.toLanguageString(progBarAriaLabel, messages[progBarAriaLabel]);
|
|
43
47
|
var elementRef = React.useRef(null);
|
|
44
48
|
var focusElement = React.useCallback(function () {
|
|
45
49
|
if (elementRef.current) {
|
|
@@ -188,7 +192,7 @@ export var Stepper = React.forwardRef(function (props, target) {
|
|
|
188
192
|
} },
|
|
189
193
|
React.createElement("nav", { className: stepperClasses, style: stepperStyles, dir: dir, onKeyDown: handleKeyDown },
|
|
190
194
|
React.createElement("ol", { className: listClasses, style: listStyles }, steps ? steps : children),
|
|
191
|
-
React.createElement(ProgressBar, { style: progressbarStyles, animation: { duration: animation }, "aria-hidden": true, max: numOfSteps - 1, labelVisible: false, orientation: orientation, reverse: orientation === 'vertical', value: value, disabled: disabled, tabIndex: -1 }))));
|
|
195
|
+
React.createElement(ProgressBar, { style: progressbarStyles, animation: { duration: animation }, ariaLabel: pbAriaLabel, "aria-hidden": true, max: numOfSteps - 1, labelVisible: false, orientation: orientation, reverse: orientation === 'vertical', value: value, disabled: disabled, tabIndex: -1 }))));
|
|
192
196
|
});
|
|
193
197
|
Stepper.propTypes = {
|
|
194
198
|
animationDuration: PropTypes.oneOfType([PropTypes.bool, PropTypes.number]),
|
|
@@ -2,9 +2,14 @@
|
|
|
2
2
|
* @hidden
|
|
3
3
|
*/
|
|
4
4
|
export declare const optionalText = "stepper.optionalText";
|
|
5
|
+
/**
|
|
6
|
+
* @hidden
|
|
7
|
+
*/
|
|
8
|
+
export declare const progBarAriaLabel = "stepper.progBarAriaLabel";
|
|
5
9
|
/**
|
|
6
10
|
* @hidden
|
|
7
11
|
*/
|
|
8
12
|
export declare const messages: {
|
|
9
13
|
"stepper.optionalText": string;
|
|
14
|
+
"stepper.progBarAriaLabel": string;
|
|
10
15
|
};
|
|
@@ -3,9 +3,14 @@ var _a;
|
|
|
3
3
|
* @hidden
|
|
4
4
|
*/
|
|
5
5
|
export var optionalText = 'stepper.optionalText';
|
|
6
|
+
/**
|
|
7
|
+
* @hidden
|
|
8
|
+
*/
|
|
9
|
+
export var progBarAriaLabel = 'stepper.progBarAriaLabel';
|
|
6
10
|
/**
|
|
7
11
|
* @hidden
|
|
8
12
|
*/
|
|
9
13
|
export var messages = (_a = {},
|
|
10
14
|
_a[optionalText] = '(Optional)',
|
|
15
|
+
_a[progBarAriaLabel] = 'progressbar',
|
|
11
16
|
_a);
|