@progress/kendo-react-layout 5.12.0-dev.202302271006 → 5.12.0-dev.202303130940
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/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/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
|
@@ -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: 1678699363,
|
|
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);
|
|
@@ -32,7 +32,7 @@ exports.BottomNavigationItem = React.forwardRef(function (props, ref) {
|
|
|
32
32
|
}, [onKeyDown, index, disabled]);
|
|
33
33
|
var renderer = render;
|
|
34
34
|
var ItemComp = item;
|
|
35
|
-
var bottomNavItem = (React.createElement("span", { ref: elementRef, className: itemClasses, style: style, role: 'link', id: id, tabIndex: tabIndex, onClick: handleClick, onKeyDown: handleKeyDown, "aria-
|
|
35
|
+
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 }) :
|
|
36
36
|
(React.createElement(React.Fragment, null,
|
|
37
37
|
(icon || svgIcon) && React.createElement(kendo_react_common_1.IconWrap, { className: 'k-bottom-nav-item-icon', name: icon, icon: svgIcon }),
|
|
38
38
|
text && React.createElement("span", { className: 'k-bottom-nav-item-text', style: { userSelect: 'none' } }, text)))));
|
|
@@ -22,7 +22,7 @@ exports.BreadcrumbDelimiter = React.forwardRef(function (props, ref) {
|
|
|
22
22
|
});
|
|
23
23
|
});
|
|
24
24
|
React.useImperativeHandle(ref, function () { return target.current; });
|
|
25
|
-
return (React.createElement(kendo_react_common_1.IconWrap, { ref: breadcrumbDelimiterRef, id: props.id, tabIndex: props.tabIndex, style: props.style, name: "chevron-right", icon: kendo_svg_icons_1.chevronRightIcon, className: "k-breadcrumb-delimiter-icon" }));
|
|
25
|
+
return (React.createElement(kendo_react_common_1.IconWrap, { ref: breadcrumbDelimiterRef, id: props.id, "aria-hidden": true, tabIndex: props.tabIndex, style: props.style, name: "chevron-right", icon: kendo_svg_icons_1.chevronRightIcon, className: "k-breadcrumb-delimiter-icon" }));
|
|
26
26
|
});
|
|
27
27
|
var propTypes = {
|
|
28
28
|
id: PropTypes.string,
|
|
@@ -31,7 +31,7 @@ exports.BreadcrumbLink = React.forwardRef(function (props, ref) {
|
|
|
31
31
|
(0, kendo_react_common_1.dispatchEvent)(props.onKeyDown, event, event.target, { id: props.id });
|
|
32
32
|
}
|
|
33
33
|
}, [props.onKeyDown]);
|
|
34
|
-
return (React.createElement("span", { "aria-current": props.ariaCurrent ? props.ariaCurrent : props.isLast, id: props.id, ref: linkRef, style: props.style, dir: (0, kendo_react_common_1.useDir)(linkRef, props.dir), tabIndex: (0, kendo_react_common_1.getTabIndex)(props.tabIndex, props.disabled), className: (0, kendo_react_common_1.classNames)('k-cursor-pointer k-flex-none k-breadcrumb-link k-breadcrumb-icontext-link', {
|
|
34
|
+
return (React.createElement("span", { "aria-current": props.ariaCurrent ? props.ariaCurrent : props.isLast, role: 'link', id: props.id, ref: linkRef, style: props.style, dir: (0, kendo_react_common_1.useDir)(linkRef, props.dir), tabIndex: (0, kendo_react_common_1.getTabIndex)(props.tabIndex, props.disabled), className: (0, kendo_react_common_1.classNames)('k-cursor-pointer k-flex-none k-breadcrumb-link k-breadcrumb-icontext-link', {
|
|
35
35
|
'k-disabled': props.disabled
|
|
36
36
|
}), onClick: handleItemSelect, onKeyDown: handleKeyDown },
|
|
37
37
|
props.iconClass
|
|
@@ -87,8 +87,8 @@ exports.DrawerItem = React.forwardRef(function (props, target) {
|
|
|
87
87
|
(icon || svgIcon) && React.createElement(kendo_react_common_1.IconWrap, { name: icon ? (0, kendo_react_common_1.toIconName)(icon) : icon, icon: svgIcon }),
|
|
88
88
|
!expanded && mini ? null : React.createElement("span", { className: 'k-item-text' }, text)));
|
|
89
89
|
return (separator
|
|
90
|
-
? React.createElement("li", { className: 'k-drawer-item k-drawer-separator', role: "
|
|
91
|
-
: (React.createElement("li", __assign({ ref: elementRef, className: itemClassNames, style: style, role: "
|
|
90
|
+
? React.createElement("li", { className: 'k-drawer-item k-drawer-separator', role: "separator" })
|
|
91
|
+
: (React.createElement("li", __assign({ ref: elementRef, className: itemClassNames, style: style, role: "menuitem", "aria-label": text, "aria-disabled": disabled, onClick: handleClick, tabIndex: (0, kendo_react_common_1.getTabIndex)(tabIndex, disabled) }, others), !item ? drawerItemContent : children)));
|
|
92
92
|
});
|
|
93
93
|
exports.DrawerItem.propTypes = {
|
|
94
94
|
className: PropTypes.string,
|
|
@@ -127,7 +127,7 @@ exports.DrawerNavigation = React.forwardRef(function (props, target) {
|
|
|
127
127
|
(dir === 'ltr' && position === 'start') || (dir === 'rtl' && position === 'end') ?
|
|
128
128
|
mini ? collapseOverlayMini : collapseOverlay :
|
|
129
129
|
mini ? collapseOverlayMini : collapseOverlayRtl;
|
|
130
|
-
var drawerItems = (items && (React.createElement("ul", { className: 'k-drawer-items', role: "
|
|
130
|
+
var drawerItems = (items && (React.createElement("ul", { className: 'k-drawer-items', role: "menubar", "aria-label": "drawer-list", "aria-expanded": expanded }, items
|
|
131
131
|
.map(function (element, index) {
|
|
132
132
|
var drawerItemProps = __assign(__assign({ index: index }, element), { onSelect: onSelect });
|
|
133
133
|
var ItemComp = item || DrawerItem_1.DrawerItem;
|
|
@@ -53,7 +53,7 @@ var MenuItemArrow = /** @class */ (function (_super) {
|
|
|
53
53
|
* @hidden
|
|
54
54
|
*/
|
|
55
55
|
MenuItemArrow.prototype.render = function () {
|
|
56
|
-
return React.createElement(kendo_react_common_1.IconWrap, __assign({ className: 'k-menu-expand-arrow' }, this.getIcon()));
|
|
56
|
+
return React.createElement(kendo_react_common_1.IconWrap, __assign({ "aria-hidden": true, className: 'k-menu-expand-arrow' }, this.getIcon()));
|
|
57
57
|
};
|
|
58
58
|
MenuItemArrow.prototype.getIcon = function () {
|
|
59
59
|
var childrenPosition = (0, misc_1.getChildrenPosition)(this.props.itemId, this.props.verticalMenu === true, this.props.dir === 'rtl');
|
|
@@ -8,7 +8,7 @@ exports.packageMetadata = {
|
|
|
8
8
|
name: '@progress/kendo-react-layout',
|
|
9
9
|
productName: 'KendoReact',
|
|
10
10
|
productCodes: ['KENDOUIREACT', 'KENDOUICOMPLETE'],
|
|
11
|
-
publishDate:
|
|
11
|
+
publishDate: 1678699363,
|
|
12
12
|
version: '',
|
|
13
13
|
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'
|
|
14
14
|
};
|
|
@@ -104,7 +104,7 @@ var PanelBarItem = /** @class */ (function (_super) {
|
|
|
104
104
|
: null;
|
|
105
105
|
var opened = (!disabled && expanded);
|
|
106
106
|
var content = opened || keepItemsMounted
|
|
107
|
-
? (React.createElement("ul", { role: "group", className: "k-panelbar-group k-panel k-group", style: { display: keepItemsMounted
|
|
107
|
+
? (React.createElement("ul", { role: "group", "aria-expanded": expanded, "aria-hidden": !expanded, className: "k-panelbar-group k-panel k-group", style: { display: keepItemsMounted
|
|
108
108
|
? (this.state.show ? 'block' : 'none')
|
|
109
109
|
: 'block' } }, children))
|
|
110
110
|
: null;
|
|
@@ -44,6 +44,8 @@ var SplitterBar_1 = require("./SplitterBar");
|
|
|
44
44
|
var kendo_react_common_1 = require("@progress/kendo-react-common");
|
|
45
45
|
var kendo_react_common_2 = require("@progress/kendo-react-common");
|
|
46
46
|
var package_metadata_1 = require("../package-metadata");
|
|
47
|
+
var messages_1 = require("./messages");
|
|
48
|
+
var kendo_react_intl_1 = require("@progress/kendo-react-intl");
|
|
47
49
|
/**
|
|
48
50
|
* @hidden
|
|
49
51
|
*/
|
|
@@ -115,13 +117,14 @@ var Splitter = /** @class */ (function (_super) {
|
|
|
115
117
|
return paneOptions;
|
|
116
118
|
};
|
|
117
119
|
_this.mapSplitterPanes = function (panes, panesContent) {
|
|
120
|
+
var ariaLabel = (0, kendo_react_intl_1.provideLocalizationService)(_this).toLanguageString(messages_1.splitBarLabel, messages_1.messages[messages_1.splitBarLabel]);
|
|
118
121
|
return panes.map(function (pane, index) {
|
|
119
122
|
var splitterBar;
|
|
120
123
|
var paneKey = index * 2;
|
|
121
124
|
var barKey = paneKey + 1;
|
|
122
125
|
if (index + 1 < panes.length) {
|
|
123
126
|
var next = panes[index + 1];
|
|
124
|
-
splitterBar = (React.createElement(SplitterBar_1.SplitterBar, { key: barKey, index: index, orientation: pane.orientation, prev: pane, next: next, onDrag: _this.onBarDragResize, onToggle: _this.onBarToggle, onKeyboardResize: _this.onBarKeyboardResize }));
|
|
127
|
+
splitterBar = (React.createElement(SplitterBar_1.SplitterBar, { key: barKey, index: index, orientation: pane.orientation, prev: pane, next: next, ariaLabel: ariaLabel, onDrag: _this.onBarDragResize, onToggle: _this.onBarToggle, onKeyboardResize: _this.onBarKeyboardResize }));
|
|
125
128
|
}
|
|
126
129
|
var splitterPane = (React.createElement(SplitterPane_1.SplitterPane, __assign({ key: paneKey }, pane), panesContent[index]));
|
|
127
130
|
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;
|
|
@@ -142,7 +142,7 @@ var SplitterBar = /** @class */ (function (_super) {
|
|
|
142
142
|
_a['k-splitbar-static-vertical'] = !isHorizontal && isStatic,
|
|
143
143
|
_a));
|
|
144
144
|
return (React.createElement(kendo_react_common_1.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; } },
|
|
145
|
-
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 },
|
|
145
|
+
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 },
|
|
146
146
|
this.props.prev.collapsible && React.createElement("div", { className: 'k-collapse-prev', onClick: this.onPrevToggle },
|
|
147
147
|
React.createElement(kendo_react_common_1.IconWrap, { name: this.props.prev.collapsible
|
|
148
148
|
? isHorizontal
|
|
@@ -40,7 +40,7 @@ var SplitterPane = /** @class */ (function (_super) {
|
|
|
40
40
|
_a['k-pane-static'] = !resizable && !collapsible || fixedSize,
|
|
41
41
|
_a['k-scrollable'] = scrollable,
|
|
42
42
|
_a));
|
|
43
|
-
return (React.createElement("div", { id: id, style: style, className: paneClasses },
|
|
43
|
+
return (React.createElement("div", { id: id, role: 'group', style: style, className: paneClasses },
|
|
44
44
|
!collapsed || keepMounted ? this.props.children : undefined,
|
|
45
45
|
overlay ? React.createElement("div", { className: 'k-splitter-overlay k-overlay' }) : undefined));
|
|
46
46
|
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var _a;
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.messages = exports.splitBarLabel = void 0;
|
|
5
|
+
/**
|
|
6
|
+
* @hidden
|
|
7
|
+
*/
|
|
8
|
+
exports.splitBarLabel = 'splitBarLabel';
|
|
9
|
+
/**
|
|
10
|
+
* @hidden
|
|
11
|
+
*/
|
|
12
|
+
exports.messages = (_a = {},
|
|
13
|
+
_a[exports.splitBarLabel] = 'split bar',
|
|
14
|
+
_a);
|
package/dist/npm/stepper/Step.js
CHANGED
|
@@ -120,7 +120,7 @@ exports.Step = React.forwardRef(function (props, target) {
|
|
|
120
120
|
stepIndicator,
|
|
121
121
|
stepLabel));
|
|
122
122
|
return (React.createElement("li", __assign({ ref: elementRef, className: itemClassNames, style: itemStyles }, others),
|
|
123
|
-
React.createElement("a", { className: "k-step-link", title: label ? label : undefined, onClick: handleClick, onFocus: handleFocus, tabIndex: tabIndex ? tabIndex : focused ? 0 : -1, "aria-current": current
|
|
123
|
+
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)));
|
|
124
124
|
});
|
|
125
125
|
exports.Step.propTypes = {
|
|
126
126
|
children: PropTypes.any,
|
|
@@ -21,6 +21,8 @@ var kendo_react_progressbars_1 = require("@progress/kendo-react-progressbars");
|
|
|
21
21
|
var contants_1 = require("./contants");
|
|
22
22
|
var kendo_react_common_2 = require("@progress/kendo-react-common");
|
|
23
23
|
var package_metadata_1 = require("../package-metadata");
|
|
24
|
+
var kendo_react_intl_1 = require("@progress/kendo-react-intl");
|
|
25
|
+
var messages_1 = require("./messages");
|
|
24
26
|
/**
|
|
25
27
|
* Represents the [KendoReact Stepper component]({% slug overview_stepper %}).
|
|
26
28
|
*
|
|
@@ -43,6 +45,8 @@ var package_metadata_1 = require("../package-metadata");
|
|
|
43
45
|
exports.Stepper = React.forwardRef(function (props, target) {
|
|
44
46
|
(0, kendo_react_common_2.validatePackage)(package_metadata_1.packageMetadata);
|
|
45
47
|
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;
|
|
48
|
+
var localizationService = (0, kendo_react_intl_1.useLocalization)();
|
|
49
|
+
var pbAriaLabel = localizationService.toLanguageString(messages_1.progBarAriaLabel, messages_1.messages[messages_1.progBarAriaLabel]);
|
|
46
50
|
var elementRef = React.useRef(null);
|
|
47
51
|
var focusElement = React.useCallback(function () {
|
|
48
52
|
if (elementRef.current) {
|
|
@@ -191,7 +195,7 @@ exports.Stepper = React.forwardRef(function (props, target) {
|
|
|
191
195
|
} },
|
|
192
196
|
React.createElement("nav", { className: stepperClasses, style: stepperStyles, dir: dir, onKeyDown: handleKeyDown },
|
|
193
197
|
React.createElement("ol", { className: listClasses, style: listStyles }, steps ? steps : children),
|
|
194
|
-
React.createElement(kendo_react_progressbars_1.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 }))));
|
|
198
|
+
React.createElement(kendo_react_progressbars_1.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 }))));
|
|
195
199
|
});
|
|
196
200
|
exports.Stepper.propTypes = {
|
|
197
201
|
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
|
};
|
|
@@ -1,14 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var _a;
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.messages = exports.optionalText = void 0;
|
|
4
|
+
exports.messages = exports.progBarAriaLabel = exports.optionalText = void 0;
|
|
5
5
|
/**
|
|
6
6
|
* @hidden
|
|
7
7
|
*/
|
|
8
8
|
exports.optionalText = 'stepper.optionalText';
|
|
9
|
+
/**
|
|
10
|
+
* @hidden
|
|
11
|
+
*/
|
|
12
|
+
exports.progBarAriaLabel = 'stepper.progBarAriaLabel';
|
|
9
13
|
/**
|
|
10
14
|
* @hidden
|
|
11
15
|
*/
|
|
12
16
|
exports.messages = (_a = {},
|
|
13
17
|
_a[exports.optionalText] = '(Optional)',
|
|
18
|
+
_a[exports.progBarAriaLabel] = 'progressbar',
|
|
14
19
|
_a);
|