@progress/kendo-react-layout 14.0.0-develop.1 → 14.0.0-develop.2
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/index.d.mts +1 -0
- package/index.d.ts +1 -0
- package/index.js +1 -1
- package/index.mjs +105 -104
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +1 -1
- package/package.json +10 -10
- package/panelbar/PanelBar.d.ts +4 -65
- package/panelbar/PanelBar.js +1 -1
- package/panelbar/PanelBar.mjs +182 -161
- package/panelbar/PanelBarItem.d.ts +8 -46
- package/panelbar/PanelBarItem.js +1 -1
- package/panelbar/PanelBarItem.mjs +125 -119
- package/panelbar/interfaces/PanelBarItemClickEventArguments.d.ts +2 -2
- package/panelbar/interfaces/PanelBarItemHandle.d.ts +17 -0
|
@@ -5,128 +5,134 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
import * as
|
|
9
|
-
import
|
|
10
|
-
import {
|
|
11
|
-
import { chevronUpIcon as
|
|
12
|
-
import { Reveal as
|
|
13
|
-
function
|
|
14
|
-
return
|
|
8
|
+
import * as e from "react";
|
|
9
|
+
import n from "prop-types";
|
|
10
|
+
import { classNames as u, IconWrap as v, svgIconPropType as _ } from "@progress/kendo-react-common";
|
|
11
|
+
import { chevronUpIcon as $, chevronDownIcon as j } from "@progress/kendo-svg-icons";
|
|
12
|
+
import { Reveal as z } from "@progress/kendo-react-animation";
|
|
13
|
+
function J({ imageUrl: o, icon: i, svgIcon: s, iconClass: a }) {
|
|
14
|
+
return o ? /* @__PURE__ */ e.createElement("img", { role: "presentation", className: "k-panelbar-item-icon k-image", src: o }) : i || s ? /* @__PURE__ */ e.createElement(v, { className: "k-panelbar-item-icon", name: i, icon: s }) : a ? /* @__PURE__ */ e.createElement("span", { role: "presentation", className: "k-panelbar-item-icon " + a }) : null;
|
|
15
15
|
}
|
|
16
|
-
const
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
16
|
+
const f = e.forwardRef((o, i) => {
|
|
17
|
+
const {
|
|
18
|
+
id: s,
|
|
19
|
+
children: a,
|
|
20
|
+
title: E = Q.title,
|
|
21
|
+
uniquePrivateKey: c,
|
|
22
|
+
disabled: t,
|
|
23
|
+
selected: k,
|
|
24
|
+
focused: N,
|
|
25
|
+
expanded: r,
|
|
26
|
+
className: C,
|
|
27
|
+
level: b,
|
|
28
|
+
headerClassName: x,
|
|
29
|
+
animation: y,
|
|
30
|
+
keepItemsMounted: l,
|
|
31
|
+
onSelect: m,
|
|
32
|
+
imageUrl: B,
|
|
33
|
+
icon: R,
|
|
34
|
+
svgIcon: w,
|
|
35
|
+
iconClass: P
|
|
36
|
+
} = o, d = e.useRef({ props: o }), S = e.useRef(null);
|
|
37
|
+
e.useImperativeHandle(d, () => ({ props: o })), e.useImperativeHandle(
|
|
38
|
+
i,
|
|
39
|
+
() => d.current
|
|
40
|
+
);
|
|
41
|
+
const [A, g] = e.useState(r || !1), D = e.useCallback(() => {
|
|
42
|
+
m && !t && m({
|
|
40
43
|
uniquePrivateKey: c,
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
children: t.any,
|
|
112
|
-
className: t.string,
|
|
113
|
-
icon: t.string,
|
|
114
|
-
iconClass: t.string,
|
|
115
|
-
imageUrl: t.string,
|
|
116
|
-
svgIcon: P,
|
|
117
|
-
expanded: t.bool,
|
|
118
|
-
disabled: t.bool,
|
|
119
|
-
onSelect: t.func,
|
|
120
|
-
selected: t.bool,
|
|
121
|
-
level: t.number,
|
|
122
|
-
title: t.oneOfType([t.string, t.element]),
|
|
123
|
-
id: t.oneOfType([t.string, t.number]),
|
|
124
|
-
focused: t.bool,
|
|
125
|
-
keepItemsMounted: t.bool
|
|
126
|
-
}, l.defaultProps = {
|
|
44
|
+
id: s,
|
|
45
|
+
target: d.current
|
|
46
|
+
});
|
|
47
|
+
}, [m, t, c, s]), T = e.useCallback(
|
|
48
|
+
(p) => l ? e.cloneElement(p, {
|
|
49
|
+
...p.props,
|
|
50
|
+
in: r
|
|
51
|
+
}) : p,
|
|
52
|
+
[l, r]
|
|
53
|
+
), U = e.useCallback(() => {
|
|
54
|
+
l && g(!0);
|
|
55
|
+
}, [l]), H = e.useCallback(() => {
|
|
56
|
+
l && g(!1);
|
|
57
|
+
}, [l]), L = {
|
|
58
|
+
role: "treeitem",
|
|
59
|
+
"aria-disabled": t,
|
|
60
|
+
"aria-hidden": !t && !r ? "true" : "false",
|
|
61
|
+
"aria-selected": !t && k,
|
|
62
|
+
"aria-expanded": !t && r && !!a
|
|
63
|
+
}, O = u(
|
|
64
|
+
"k-panelbar-item",
|
|
65
|
+
{
|
|
66
|
+
"k-panelbar-header": b === 0,
|
|
67
|
+
"k-expanded": r && !!a,
|
|
68
|
+
"k-disabled": t
|
|
69
|
+
},
|
|
70
|
+
`k-level-${b}`,
|
|
71
|
+
C
|
|
72
|
+
), F = u(
|
|
73
|
+
"k-link",
|
|
74
|
+
{
|
|
75
|
+
"k-selected": !t && k,
|
|
76
|
+
"k-focus": N
|
|
77
|
+
},
|
|
78
|
+
x
|
|
79
|
+
), K = { display: "block" }, M = J({ imageUrl: B, icon: R, svgIcon: w, iconClass: P }), q = !t && a ? /* @__PURE__ */ e.createElement(
|
|
80
|
+
v,
|
|
81
|
+
{
|
|
82
|
+
name: r ? "chevron-up" : "chevron-down",
|
|
83
|
+
icon: r ? $ : j,
|
|
84
|
+
className: u("k-panelbar-toggle", r ? "k-panelbar-collapse" : "k-panelbar-expand")
|
|
85
|
+
}
|
|
86
|
+
) : null;
|
|
87
|
+
let I = !1;
|
|
88
|
+
a && a[0] && Array.isArray(a) && (I = a[0].type === f);
|
|
89
|
+
const G = l && !A ? "none" : "block", h = !t && r || l ? I ? /* @__PURE__ */ e.createElement(
|
|
90
|
+
"ul",
|
|
91
|
+
{
|
|
92
|
+
role: "group",
|
|
93
|
+
"aria-hidden": r ? "false" : "true",
|
|
94
|
+
className: "k-panelbar-group",
|
|
95
|
+
style: { display: G }
|
|
96
|
+
},
|
|
97
|
+
a
|
|
98
|
+
) : a : null, W = (y === void 0 || y) && !t && a ? /* @__PURE__ */ e.createElement(
|
|
99
|
+
z,
|
|
100
|
+
{
|
|
101
|
+
transitionEnterDuration: 200,
|
|
102
|
+
transitionExitDuration: 200,
|
|
103
|
+
key: c + "_animation",
|
|
104
|
+
style: K,
|
|
105
|
+
children: h,
|
|
106
|
+
childFactory: l ? T : void 0,
|
|
107
|
+
unmountOnExit: !l,
|
|
108
|
+
onBeforeEnter: U,
|
|
109
|
+
onAfterExited: H
|
|
110
|
+
}
|
|
111
|
+
) : h;
|
|
112
|
+
return /* @__PURE__ */ e.createElement("li", { ref: S, id: s, className: O, ...L }, /* @__PURE__ */ e.createElement("span", { className: F, onClick: D }, M, /* @__PURE__ */ e.createElement("span", { className: "k-panelbar-item-text" }, E), q), W);
|
|
113
|
+
}), Q = {
|
|
127
114
|
title: "Untitled"
|
|
128
115
|
};
|
|
129
|
-
|
|
116
|
+
f.propTypes = {
|
|
117
|
+
animation: n.bool,
|
|
118
|
+
children: n.any,
|
|
119
|
+
className: n.string,
|
|
120
|
+
icon: n.string,
|
|
121
|
+
iconClass: n.string,
|
|
122
|
+
imageUrl: n.string,
|
|
123
|
+
svgIcon: _,
|
|
124
|
+
expanded: n.bool,
|
|
125
|
+
disabled: n.bool,
|
|
126
|
+
onSelect: n.func,
|
|
127
|
+
selected: n.bool,
|
|
128
|
+
level: n.number,
|
|
129
|
+
title: n.oneOfType([n.string, n.element]),
|
|
130
|
+
id: n.oneOfType([n.string, n.number]),
|
|
131
|
+
focused: n.bool,
|
|
132
|
+
keepItemsMounted: n.bool
|
|
133
|
+
};
|
|
134
|
+
f.displayName = "KendoReactPanelBarItem";
|
|
130
135
|
export {
|
|
131
|
-
f as PanelBarItem
|
|
136
|
+
f as PanelBarItem,
|
|
137
|
+
Q as panelBarItemDefaultProps
|
|
132
138
|
};
|
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
import
|
|
8
|
+
import * as React from 'react';
|
|
9
9
|
/**
|
|
10
10
|
* @hidden
|
|
11
11
|
*/
|
|
12
12
|
export interface PanelBarItemClickEventArguments {
|
|
13
13
|
uniquePrivateKey: number;
|
|
14
|
-
target:
|
|
14
|
+
target: React.ReactElement;
|
|
15
15
|
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import { PanelBarItemProps } from './PanelBarItemProps.js';
|
|
9
|
+
/**
|
|
10
|
+
* Represents the handle of the PanelBarItem component.
|
|
11
|
+
*/
|
|
12
|
+
export interface PanelBarItemHandle {
|
|
13
|
+
/**
|
|
14
|
+
* The props of the PanelBarItem component.
|
|
15
|
+
*/
|
|
16
|
+
props: PanelBarItemProps;
|
|
17
|
+
}
|