@progress/kendo-react-layout 5.10.0-dev.202301161904 → 5.10.0-dev.202301171454
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 +1 -1
- package/dist/es/actionsheet/ActionSheet.js +2 -2
- package/dist/es/actionsheet/ActionSheetItem.js +10 -3
- package/dist/es/actionsheet/interfaces/ActionSheetItemProps.d.ts +4 -0
- package/dist/es/package-metadata.js +1 -1
- package/dist/npm/actionsheet/ActionSheet.d.ts +1 -1
- package/dist/npm/actionsheet/ActionSheet.js +2 -2
- package/dist/npm/actionsheet/ActionSheetItem.js +10 -3
- package/dist/npm/actionsheet/interfaces/ActionSheetItemProps.d.ts +4 -0
- package/dist/npm/package-metadata.js +1 -1
- package/dist/systemjs/kendo-react-layout.js +1 -1
- package/package.json +13 -13
|
@@ -34,7 +34,7 @@ export interface ActionSheetProps {
|
|
|
34
34
|
children?: any;
|
|
35
35
|
}
|
|
36
36
|
/**
|
|
37
|
-
*
|
|
37
|
+
* Represents the [KendoReact ActionSheet]({% slug overview_actionsheet %}) component.
|
|
38
38
|
*/
|
|
39
39
|
export declare class ActionSheet extends React.Component<ActionSheetProps, {}> {
|
|
40
40
|
/**
|
|
@@ -33,7 +33,7 @@ import { headerDisplayName } from './ActionSheetHeader';
|
|
|
33
33
|
import { footerDisplayName } from './ActionSheetFooter';
|
|
34
34
|
import { contentDisplayName } from './ActionSheetContent';
|
|
35
35
|
/**
|
|
36
|
-
*
|
|
36
|
+
* Represents the [KendoReact ActionSheet]({% slug overview_actionsheet %}) component.
|
|
37
37
|
*/
|
|
38
38
|
var ActionSheet = /** @class */ (function (_super) {
|
|
39
39
|
__extends(ActionSheet, _super);
|
|
@@ -81,7 +81,7 @@ var ActionSheet = /** @class */ (function (_super) {
|
|
|
81
81
|
React.createElement("div", { className: "k-actionsheet-content" }, children[contentDisplayName] ||
|
|
82
82
|
React.createElement(React.Fragment, null,
|
|
83
83
|
React.createElement("div", { className: "k-list-ul", role: "group" }, topGroupItems && topGroupItems.map(function (props, idx) {
|
|
84
|
-
return React.createElement(ActionSheetItem, __assign({ key: idx
|
|
84
|
+
return (React.createElement(ActionSheetItem, __assign({}, props, { key: idx, focused: idx === 0, onClick: _this.props.onItemClick })));
|
|
85
85
|
})),
|
|
86
86
|
shouldRenderSeparator && React.createElement("hr", { className: "k-hr" }),
|
|
87
87
|
React.createElement("div", { className: "k-list-ul", role: "group" }, bottomGroupItems && bottomGroupItems.map(function (props, idx) {
|
|
@@ -5,17 +5,24 @@ import { classNames } from '@progress/kendo-react-common';
|
|
|
5
5
|
* The KendoReact ActionSheetItem component.
|
|
6
6
|
*/
|
|
7
7
|
export var ActionSheetItem = function (props) {
|
|
8
|
+
var defaultTabIndex = 0;
|
|
9
|
+
var itemRef = React.useRef(null);
|
|
8
10
|
var onClick = React.useCallback(function (event) {
|
|
9
11
|
if (props.onClick) {
|
|
10
12
|
props.onClick.call(undefined, { syntheticEvent: event, title: props.title });
|
|
11
13
|
}
|
|
12
14
|
}, [props.title, props.onClick]);
|
|
13
|
-
|
|
15
|
+
React.useEffect(function () {
|
|
16
|
+
if (itemRef.current && props.focused) {
|
|
17
|
+
itemRef.current.focus();
|
|
18
|
+
}
|
|
19
|
+
}, [props.focused]);
|
|
20
|
+
return (React.createElement("span", { style: props.style, className: classNames('k-actionsheet-item', 'k-cursor-pointer', props.disabled && 'k-disabled', props.className), role: "button", ref: itemRef, "aria-disabled": props.disabled, tabIndex: props.tabIndex || defaultTabIndex, onClick: onClick },
|
|
14
21
|
React.createElement("span", { className: "k-actionsheet-action" },
|
|
15
22
|
props.icon,
|
|
16
23
|
(props.title || props.description) && (React.createElement("span", { className: "k-actionsheet-item-text" },
|
|
17
|
-
React.createElement("span", { className: "k-actionsheet-item-title" }, props.title),
|
|
18
|
-
React.createElement("span", { className: "k-actionsheet-item-description" }, props.description))))));
|
|
24
|
+
props.title && React.createElement("span", { className: "k-actionsheet-item-title" }, props.title),
|
|
25
|
+
props.description && React.createElement("span", { className: "k-actionsheet-item-description" }, props.description))))));
|
|
19
26
|
};
|
|
20
27
|
ActionSheetItem.propTypes = {
|
|
21
28
|
className: PropTypes.string,
|
|
@@ -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: 1673966117,
|
|
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
|
};
|
|
@@ -34,7 +34,7 @@ export interface ActionSheetProps {
|
|
|
34
34
|
children?: any;
|
|
35
35
|
}
|
|
36
36
|
/**
|
|
37
|
-
*
|
|
37
|
+
* Represents the [KendoReact ActionSheet]({% slug overview_actionsheet %}) component.
|
|
38
38
|
*/
|
|
39
39
|
export declare class ActionSheet extends React.Component<ActionSheetProps, {}> {
|
|
40
40
|
/**
|
|
@@ -36,7 +36,7 @@ var ActionSheetHeader_1 = require("./ActionSheetHeader");
|
|
|
36
36
|
var ActionSheetFooter_1 = require("./ActionSheetFooter");
|
|
37
37
|
var ActionSheetContent_1 = require("./ActionSheetContent");
|
|
38
38
|
/**
|
|
39
|
-
*
|
|
39
|
+
* Represents the [KendoReact ActionSheet]({% slug overview_actionsheet %}) component.
|
|
40
40
|
*/
|
|
41
41
|
var ActionSheet = /** @class */ (function (_super) {
|
|
42
42
|
__extends(ActionSheet, _super);
|
|
@@ -84,7 +84,7 @@ var ActionSheet = /** @class */ (function (_super) {
|
|
|
84
84
|
React.createElement("div", { className: "k-actionsheet-content" }, children[ActionSheetContent_1.contentDisplayName] ||
|
|
85
85
|
React.createElement(React.Fragment, null,
|
|
86
86
|
React.createElement("div", { className: "k-list-ul", role: "group" }, topGroupItems && topGroupItems.map(function (props, idx) {
|
|
87
|
-
return React.createElement(ActionSheetItem_1.ActionSheetItem, __assign({ key: idx
|
|
87
|
+
return (React.createElement(ActionSheetItem_1.ActionSheetItem, __assign({}, props, { key: idx, focused: idx === 0, onClick: _this.props.onItemClick })));
|
|
88
88
|
})),
|
|
89
89
|
shouldRenderSeparator && React.createElement("hr", { className: "k-hr" }),
|
|
90
90
|
React.createElement("div", { className: "k-list-ul", role: "group" }, bottomGroupItems && bottomGroupItems.map(function (props, idx) {
|
|
@@ -8,17 +8,24 @@ var kendo_react_common_1 = require("@progress/kendo-react-common");
|
|
|
8
8
|
* The KendoReact ActionSheetItem component.
|
|
9
9
|
*/
|
|
10
10
|
var ActionSheetItem = function (props) {
|
|
11
|
+
var defaultTabIndex = 0;
|
|
12
|
+
var itemRef = React.useRef(null);
|
|
11
13
|
var onClick = React.useCallback(function (event) {
|
|
12
14
|
if (props.onClick) {
|
|
13
15
|
props.onClick.call(undefined, { syntheticEvent: event, title: props.title });
|
|
14
16
|
}
|
|
15
17
|
}, [props.title, props.onClick]);
|
|
16
|
-
|
|
18
|
+
React.useEffect(function () {
|
|
19
|
+
if (itemRef.current && props.focused) {
|
|
20
|
+
itemRef.current.focus();
|
|
21
|
+
}
|
|
22
|
+
}, [props.focused]);
|
|
23
|
+
return (React.createElement("span", { style: props.style, className: (0, kendo_react_common_1.classNames)('k-actionsheet-item', 'k-cursor-pointer', props.disabled && 'k-disabled', props.className), role: "button", ref: itemRef, "aria-disabled": props.disabled, tabIndex: props.tabIndex || defaultTabIndex, onClick: onClick },
|
|
17
24
|
React.createElement("span", { className: "k-actionsheet-action" },
|
|
18
25
|
props.icon,
|
|
19
26
|
(props.title || props.description) && (React.createElement("span", { className: "k-actionsheet-item-text" },
|
|
20
|
-
React.createElement("span", { className: "k-actionsheet-item-title" }, props.title),
|
|
21
|
-
React.createElement("span", { className: "k-actionsheet-item-description" }, props.description))))));
|
|
27
|
+
props.title && React.createElement("span", { className: "k-actionsheet-item-title" }, props.title),
|
|
28
|
+
props.description && React.createElement("span", { className: "k-actionsheet-item-description" }, props.description))))));
|
|
22
29
|
};
|
|
23
30
|
exports.ActionSheetItem = ActionSheetItem;
|
|
24
31
|
exports.ActionSheetItem.propTypes = {
|
|
@@ -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: 1673966117,
|
|
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
|
};
|