@progress/kendo-react-layout 14.5.0-develop.14 → 14.5.0-develop.16
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/actionsheet/ActionSheet.js +1 -1
- package/actionsheet/ActionSheet.mjs +18 -19
- package/actionsheet/ActionSheetItem.js +1 -1
- package/actionsheet/ActionSheetItem.mjs +1 -3
- package/bottomnavigation/BottomNavigation.js +1 -1
- package/bottomnavigation/BottomNavigation.mjs +85 -69
- package/bottomnavigation/BottomNavigationItem.js +1 -1
- package/bottomnavigation/BottomNavigationItem.mjs +34 -33
- package/bottomnavigation/messages/index.d.ts +17 -0
- package/bottomnavigation/messages/index.js +8 -0
- package/bottomnavigation/messages/index.mjs +14 -0
- package/breadcrumb/Breadcrumb.js +1 -1
- package/breadcrumb/Breadcrumb.mjs +30 -28
- package/breadcrumb/BreadcrumbLink.js +1 -1
- package/breadcrumb/BreadcrumbLink.mjs +26 -26
- package/breadcrumb/messages/index.d.ts +17 -0
- package/breadcrumb/messages/index.js +8 -0
- package/breadcrumb/messages/index.mjs +14 -0
- package/dist/cdn/js/kendo-react-layout.js +1 -1
- package/drawer/DrawerItem.js +1 -1
- package/drawer/DrawerItem.mjs +22 -23
- package/expansionpanel/ExpansionPanel.js +1 -1
- package/expansionpanel/ExpansionPanel.mjs +50 -50
- package/expansionpanel/ExpansionPanelContent.js +1 -1
- package/expansionpanel/ExpansionPanelContent.mjs +7 -4
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -2
- package/package.json +8 -8
- package/panelbar/PanelBar.js +1 -1
- package/panelbar/PanelBar.mjs +5 -4
- package/panelbar/PanelBarItem.js +1 -1
- package/panelbar/PanelBarItem.mjs +13 -15
- package/panelbar/interfaces/RenderPanelBarItem.d.ts +1 -0
- package/panelbar/util.d.ts +1 -1
- package/panelbar/util.js +1 -1
- package/panelbar/util.mjs +62 -59
- package/splitter/SplitterBar.d.ts +1 -0
- package/splitter/SplitterBar.js +1 -1
- package/splitter/SplitterBar.mjs +64 -56
- package/stepper/Step.js +1 -1
- package/stepper/Step.mjs +79 -85
- package/stepper/Stepper.js +1 -1
- package/stepper/Stepper.mjs +103 -104
- package/stepper/messages/index.d.ts +12 -2
- package/stepper/messages/index.js +1 -1
- package/stepper/messages/index.mjs +8 -4
- package/tilelayout/InternalTile.js +1 -1
- package/tilelayout/InternalTile.mjs +119 -115
- package/tilelayout/TileLayout.js +1 -1
- package/tilelayout/TileLayout.mjs +58 -58
- package/timeline/TimelineCard.d.ts +2 -0
- package/timeline/TimelineCard.js +1 -1
- package/timeline/TimelineCard.mjs +16 -15
- package/timeline/TimelineHorizontal.js +1 -1
- package/timeline/TimelineHorizontal.mjs +105 -101
package/drawer/DrawerItem.js
CHANGED
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const E=require("react"),r=require("prop-types"),c=require("@progress/kendo-react-common"),O=require("./context/DrawerContext.js");function R(t){const
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const E=require("react"),r=require("prop-types"),c=require("@progress/kendo-react-common"),O=require("./context/DrawerContext.js");function R(t){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const l=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(a,n,l.get?l:{enumerable:!0,get:()=>t[n]})}}return a.default=t,Object.freeze(a)}const e=R(E),d=e.forwardRef((t,a)=>{const{className:n,style:l,text:p,icon:i,svgIcon:u,separator:g,disabled:o,selected:I,onSelect:m,index:b,tabIndex:k,children:y,...w}=t,{expanded:T,mini:P,item:x}=e.useContext(O.DrawerContext),s=e.useRef(null),f=e.useCallback(()=>{s.current&&s.current.focus()},[]);e.useImperativeHandle(a,()=>({element:s.current,focus:f,props:t}));const C=c.classNames("k-drawer-item",{"k-selected":I,"k-disabled":o},n),N=e.useCallback(D=>{if(m&&!o){const j={element:s.current,focus:f,props:t};m(j,b,D)}},[m,b,o]),v=e.createElement(e.Fragment,null,(i||u)&&e.createElement(c.IconWrap,{name:i&&c.toIconName(i),icon:u}),e.createElement("span",{className:"k-item-text"},p));return g?e.createElement("li",{className:"k-drawer-item k-drawer-separator",role:"separator"}):e.createElement("li",{ref:s,className:C,style:l,role:"menuitem","aria-disabled":o||void 0,onClick:N,tabIndex:c.getTabIndex(k,o),...w},x?y:v)});d.propTypes={className:r.string,style:r.object,text:r.string,icon:r.string,svgIcon:c.svgIconPropType,separator:r.bool,selected:r.bool,disabled:r.bool,targetItem:r.any};d.displayName="KendoDrawerItem";exports.DrawerItem=d;
|
package/drawer/DrawerItem.mjs
CHANGED
|
@@ -7,63 +7,62 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import * as e from "react";
|
|
9
9
|
import t from "prop-types";
|
|
10
|
-
import { classNames as
|
|
10
|
+
import { classNames as h, IconWrap as R, toIconName as T, getTabIndex as D, svgIconPropType as P } from "@progress/kendo-react-common";
|
|
11
11
|
import { DrawerContext as j } from "./context/DrawerContext.mjs";
|
|
12
|
-
const
|
|
12
|
+
const i = e.forwardRef((s, d) => {
|
|
13
13
|
const {
|
|
14
|
-
className:
|
|
15
|
-
style:
|
|
16
|
-
text:
|
|
14
|
+
className: p,
|
|
15
|
+
style: u,
|
|
16
|
+
text: f,
|
|
17
17
|
icon: n,
|
|
18
|
-
svgIcon:
|
|
18
|
+
svgIcon: l,
|
|
19
19
|
separator: b,
|
|
20
20
|
disabled: a,
|
|
21
21
|
selected: I,
|
|
22
22
|
onSelect: o,
|
|
23
|
-
index:
|
|
23
|
+
index: c,
|
|
24
24
|
tabIndex: x,
|
|
25
25
|
children: k,
|
|
26
26
|
...g
|
|
27
|
-
} = s, { expanded: F, mini: H, item: N } = e.useContext(j), r = e.useRef(null),
|
|
27
|
+
} = s, { expanded: F, mini: H, item: N } = e.useContext(j), r = e.useRef(null), m = e.useCallback(() => {
|
|
28
28
|
r.current && r.current.focus();
|
|
29
29
|
}, []);
|
|
30
30
|
e.useImperativeHandle(
|
|
31
|
-
|
|
31
|
+
d,
|
|
32
32
|
() => ({
|
|
33
33
|
element: r.current,
|
|
34
|
-
focus:
|
|
34
|
+
focus: m,
|
|
35
35
|
props: s
|
|
36
36
|
})
|
|
37
37
|
);
|
|
38
|
-
const w =
|
|
38
|
+
const w = h(
|
|
39
39
|
"k-drawer-item",
|
|
40
40
|
{
|
|
41
41
|
"k-selected": I,
|
|
42
42
|
"k-disabled": a
|
|
43
43
|
},
|
|
44
|
-
|
|
44
|
+
p
|
|
45
45
|
), C = e.useCallback(
|
|
46
46
|
(E) => {
|
|
47
47
|
if (o && !a) {
|
|
48
|
-
const
|
|
48
|
+
const v = {
|
|
49
49
|
element: r.current,
|
|
50
|
-
focus:
|
|
50
|
+
focus: m,
|
|
51
51
|
props: s
|
|
52
52
|
};
|
|
53
|
-
o(
|
|
53
|
+
o(v, c, E);
|
|
54
54
|
}
|
|
55
55
|
},
|
|
56
|
-
[o,
|
|
57
|
-
), y = /* @__PURE__ */ e.createElement(e.Fragment, null, (n ||
|
|
56
|
+
[o, c, a]
|
|
57
|
+
), y = /* @__PURE__ */ e.createElement(e.Fragment, null, (n || l) && /* @__PURE__ */ e.createElement(R, { name: n && T(n), icon: l }), /* @__PURE__ */ e.createElement("span", { className: "k-item-text" }, f));
|
|
58
58
|
return b ? /* @__PURE__ */ e.createElement("li", { className: "k-drawer-item k-drawer-separator", role: "separator" }) : /* @__PURE__ */ e.createElement(
|
|
59
59
|
"li",
|
|
60
60
|
{
|
|
61
61
|
ref: r,
|
|
62
62
|
className: w,
|
|
63
|
-
style:
|
|
63
|
+
style: u,
|
|
64
64
|
role: "menuitem",
|
|
65
|
-
"aria-
|
|
66
|
-
"aria-disabled": a,
|
|
65
|
+
"aria-disabled": a || void 0,
|
|
67
66
|
onClick: C,
|
|
68
67
|
tabIndex: D(x, a),
|
|
69
68
|
...g
|
|
@@ -71,7 +70,7 @@ const d = e.forwardRef((s, p) => {
|
|
|
71
70
|
N ? k : y
|
|
72
71
|
);
|
|
73
72
|
});
|
|
74
|
-
|
|
73
|
+
i.propTypes = {
|
|
75
74
|
className: t.string,
|
|
76
75
|
style: t.object,
|
|
77
76
|
text: t.string,
|
|
@@ -82,7 +81,7 @@ d.propTypes = {
|
|
|
82
81
|
disabled: t.bool,
|
|
83
82
|
targetItem: t.any
|
|
84
83
|
};
|
|
85
|
-
|
|
84
|
+
i.displayName = "KendoDrawerItem";
|
|
86
85
|
export {
|
|
87
|
-
|
|
86
|
+
i as DrawerItem
|
|
88
87
|
};
|
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const w=require("react"),a=require("prop-types"),t=require("@progress/kendo-react-common"),g=require("@progress/kendo-svg-icons");function P(e){const d=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const s in e)if(s!=="default"){const i=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(d,s,i.get?i:{enumerable:!0,get:()=>e[s]})}}return d.default=e,Object.freeze(d)}const n=P(w),f=n.forwardRef((e,d)=>{const s=n.useRef(null),[i,p]=n.useState(!1),k=t.useId(),b=n.useCallback(()=>({element:s.current}),[]);n.useImperativeHandle(d,b);const{expanded:o=!1,disabled:c,title:v,subtitle:x,onAction:r,expandIcon:u,collapseIcon:m,expandSVGIcon:y,collapseSVGIcon:I}=e,N=n.useCallback(l=>{t.dispatchEvent(r,l,b(),{expanded:o})},[r,o]),E=n.useCallback(l=>{(l.keyCode===t.Keys.enter||l.keyCode===t.Keys.space)&&(l.preventDefault(),t.dispatchEvent(r,l,b(),{expanded:o}))},[r,o]),h=n.useCallback(()=>{e.disabled||p(!0)},[e.disabled]),C=n.useCallback(()=>{e.disabled||p(!1)},[e.disabled]),{onFocus:S,onBlur:R}=t.useAsyncFocusBlur({onFocus:h,onBlur:C});return n.createElement("div",{ref:s,className:t.classNames("k-expander",e.className,{"k-expanded":o,"k-focus":i&&!c,"k-disabled":c}),onFocus:S,onBlur:R,style:e.style,id:e.id,dir:t.useRtl(s,e.dir),onKeyDown:c?void 0:E},n.createElement("div",{role:"button","aria-controls":e.ariaControls||k,"aria-expanded":o,"aria-disabled":c||void 0,tabIndex:t.getTabIndex(e.tabIndex,c),className:"k-expander-header",onClick:c?void 0:N},v!==void 0?n.createElement("div",{className:"k-expander-title"},v):void 0,n.createElement("span",{className:"k-spacer"}),x!==void 0?n.createElement("div",{className:"k-expander-sub-title"},x):void 0,n.createElement("span",{className:"k-expander-indicator"},n.createElement(t.IconWrap,{name:o?m?void 0:"chevron-up":u?void 0:"chevron-down",icon:o?!I&&!m?g.chevronUpIcon:I:!y&&!u?g.chevronDownIcon:y,className:t.classNames(o?{[String(m)]:!!m}:{[String(u)]:!!u})}))),n.createElement("div",{id:k,className:t.classNames("k-expander-content-wrapper",{"k-hidden":!o})},e.children))});f.propTypes={children:a.node,className:a.string,style:a.object,dir:a.string,id:a.string,tabIndex:a.number,title:a.node,subtitle:a.node,expandIcon:a.string,collapseIcon:a.string,expanded:a.bool,disabled:a.bool,onAction:a.func};f.displayName="KendoReactExpansionPanel";exports.ExpansionPanel=f;
|
|
@@ -7,89 +7,89 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import * as e from "react";
|
|
9
9
|
import n from "prop-types";
|
|
10
|
-
import { dispatchEvent as
|
|
11
|
-
import { chevronDownIcon as
|
|
12
|
-
const
|
|
13
|
-
const i = e.useRef(null), [
|
|
14
|
-
e.useImperativeHandle(
|
|
10
|
+
import { useId as F, dispatchEvent as v, Keys as I, useAsyncFocusBlur as S, useRtl as D, classNames as u, getTabIndex as K, IconWrap as A } from "@progress/kendo-react-common";
|
|
11
|
+
import { chevronDownIcon as P, chevronUpIcon as T } from "@progress/kendo-svg-icons";
|
|
12
|
+
const y = e.forwardRef((a, N) => {
|
|
13
|
+
const i = e.useRef(null), [h, m] = e.useState(!1), b = F(), r = e.useCallback(() => ({ element: i.current }), []);
|
|
14
|
+
e.useImperativeHandle(N, r);
|
|
15
15
|
const {
|
|
16
|
-
expanded:
|
|
17
|
-
disabled:
|
|
18
|
-
title:
|
|
19
|
-
subtitle:
|
|
20
|
-
onAction:
|
|
21
|
-
expandIcon:
|
|
16
|
+
expanded: t = !1,
|
|
17
|
+
disabled: o,
|
|
18
|
+
title: k,
|
|
19
|
+
subtitle: p,
|
|
20
|
+
onAction: d,
|
|
21
|
+
expandIcon: s,
|
|
22
22
|
collapseIcon: c,
|
|
23
|
-
expandSVGIcon:
|
|
24
|
-
collapseSVGIcon:
|
|
25
|
-
} = a,
|
|
26
|
-
(
|
|
27
|
-
|
|
28
|
-
expanded:
|
|
23
|
+
expandSVGIcon: x,
|
|
24
|
+
collapseSVGIcon: f
|
|
25
|
+
} = a, E = e.useCallback(
|
|
26
|
+
(l) => {
|
|
27
|
+
v(d, l, r(), {
|
|
28
|
+
expanded: t
|
|
29
29
|
});
|
|
30
30
|
},
|
|
31
|
-
[
|
|
31
|
+
[d, t]
|
|
32
32
|
), C = e.useCallback(
|
|
33
|
-
(
|
|
34
|
-
(
|
|
35
|
-
expanded:
|
|
33
|
+
(l) => {
|
|
34
|
+
(l.keyCode === I.enter || l.keyCode === I.space) && (l.preventDefault(), v(d, l, r(), {
|
|
35
|
+
expanded: t
|
|
36
36
|
}));
|
|
37
37
|
},
|
|
38
|
-
[
|
|
39
|
-
),
|
|
40
|
-
a.disabled ||
|
|
41
|
-
}, [a.disabled]),
|
|
42
|
-
a.disabled ||
|
|
43
|
-
}, [a.disabled]), { onFocus: B, onBlur: R } =
|
|
38
|
+
[d, t]
|
|
39
|
+
), g = e.useCallback(() => {
|
|
40
|
+
a.disabled || m(!0);
|
|
41
|
+
}, [a.disabled]), w = e.useCallback(() => {
|
|
42
|
+
a.disabled || m(!1);
|
|
43
|
+
}, [a.disabled]), { onFocus: B, onBlur: R } = S({ onFocus: g, onBlur: w });
|
|
44
44
|
return /* @__PURE__ */ e.createElement(
|
|
45
45
|
"div",
|
|
46
46
|
{
|
|
47
47
|
ref: i,
|
|
48
|
-
className:
|
|
49
|
-
"k-expanded":
|
|
50
|
-
"k-focus":
|
|
51
|
-
"k-disabled":
|
|
48
|
+
className: u("k-expander", a.className, {
|
|
49
|
+
"k-expanded": t,
|
|
50
|
+
"k-focus": h && !o,
|
|
51
|
+
"k-disabled": o
|
|
52
52
|
}),
|
|
53
53
|
onFocus: B,
|
|
54
54
|
onBlur: R,
|
|
55
55
|
style: a.style,
|
|
56
56
|
id: a.id,
|
|
57
|
-
dir:
|
|
58
|
-
onKeyDown:
|
|
57
|
+
dir: D(i, a.dir),
|
|
58
|
+
onKeyDown: o ? void 0 : C
|
|
59
59
|
},
|
|
60
60
|
/* @__PURE__ */ e.createElement(
|
|
61
61
|
"div",
|
|
62
62
|
{
|
|
63
63
|
role: "button",
|
|
64
|
-
"aria-controls": a.ariaControls,
|
|
65
|
-
"aria-expanded":
|
|
66
|
-
"aria-disabled":
|
|
67
|
-
tabIndex:
|
|
64
|
+
"aria-controls": a.ariaControls || b,
|
|
65
|
+
"aria-expanded": t,
|
|
66
|
+
"aria-disabled": o || void 0,
|
|
67
|
+
tabIndex: K(a.tabIndex, o),
|
|
68
68
|
className: "k-expander-header",
|
|
69
|
-
onClick:
|
|
69
|
+
onClick: o ? void 0 : E
|
|
70
70
|
},
|
|
71
|
-
|
|
71
|
+
k !== void 0 ? /* @__PURE__ */ e.createElement("div", { className: "k-expander-title" }, k) : void 0,
|
|
72
72
|
/* @__PURE__ */ e.createElement("span", { className: "k-spacer" }),
|
|
73
|
-
|
|
73
|
+
p !== void 0 ? /* @__PURE__ */ e.createElement("div", { className: "k-expander-sub-title" }, p) : void 0,
|
|
74
74
|
/* @__PURE__ */ e.createElement("span", { className: "k-expander-indicator" }, /* @__PURE__ */ e.createElement(
|
|
75
|
-
|
|
75
|
+
A,
|
|
76
76
|
{
|
|
77
|
-
name:
|
|
78
|
-
icon:
|
|
79
|
-
className:
|
|
80
|
-
|
|
77
|
+
name: t ? c ? void 0 : "chevron-up" : s ? void 0 : "chevron-down",
|
|
78
|
+
icon: t ? !f && !c ? T : f : !x && !s ? P : x,
|
|
79
|
+
className: u(
|
|
80
|
+
t ? {
|
|
81
81
|
[String(c)]: !!c
|
|
82
82
|
} : {
|
|
83
|
-
[String(
|
|
83
|
+
[String(s)]: !!s
|
|
84
84
|
}
|
|
85
85
|
)
|
|
86
86
|
}
|
|
87
87
|
))
|
|
88
88
|
),
|
|
89
|
-
a.children
|
|
89
|
+
/* @__PURE__ */ e.createElement("div", { id: b, className: u("k-expander-content-wrapper", { "k-hidden": !t }) }, a.children)
|
|
90
90
|
);
|
|
91
91
|
});
|
|
92
|
-
|
|
92
|
+
y.propTypes = {
|
|
93
93
|
children: n.node,
|
|
94
94
|
className: n.string,
|
|
95
95
|
style: n.object,
|
|
@@ -104,7 +104,7 @@ I.propTypes = {
|
|
|
104
104
|
disabled: n.bool,
|
|
105
105
|
onAction: n.func
|
|
106
106
|
};
|
|
107
|
-
|
|
107
|
+
y.displayName = "KendoReactExpansionPanel";
|
|
108
108
|
export {
|
|
109
|
-
|
|
109
|
+
y as ExpansionPanel
|
|
110
110
|
};
|
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("@progress/kendo-react-common"),s=require("react");function l(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const a=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,a.get?a:{enumerable:!0,get:()=>e[t]})}}return n.default=e,Object.freeze(n)}const o=l(s),r=o.forwardRef((e,n)=>{const{children:t,...a}=e;return o.createElement("div",{ref:n,...a,className:c.classNames("k-expander-content",a.className)},t)});r.displayName="KendoReactExpansionPanelContent";exports.ExpansionPanelContent=r;
|
|
@@ -5,10 +5,13 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
import { classNames as
|
|
9
|
-
import * as
|
|
10
|
-
const r =
|
|
11
|
-
(
|
|
8
|
+
import { classNames as s } from "@progress/kendo-react-common";
|
|
9
|
+
import * as n from "react";
|
|
10
|
+
const r = n.forwardRef(
|
|
11
|
+
(a, t) => {
|
|
12
|
+
const { children: o, ...e } = a;
|
|
13
|
+
return /* @__PURE__ */ n.createElement("div", { ref: t, ...e, className: s("k-expander-content", e.className) }, o);
|
|
14
|
+
}
|
|
12
15
|
);
|
|
13
16
|
r.displayName = "KendoReactExpansionPanelContent";
|
|
14
17
|
export {
|
package/package-metadata.js
CHANGED
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=Object.freeze({name:"@progress/kendo-react-layout",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate:
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=Object.freeze({name:"@progress/kendo-react-layout",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate: 1778828047,version:"14.5.0-develop.16",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"});exports.packageMetadata=e;
|
package/package-metadata.mjs
CHANGED
|
@@ -7,7 +7,7 @@ export const packageMetadata = Object.freeze({
|
|
|
7
7
|
productName: 'KendoReact',
|
|
8
8
|
productCode: 'KENDOUIREACT',
|
|
9
9
|
productCodes: ['KENDOUIREACT'],
|
|
10
|
-
publishDate:
|
|
11
|
-
version: '14.5.0-develop.
|
|
10
|
+
publishDate: 1778828047,
|
|
11
|
+
version: '14.5.0-develop.16',
|
|
12
12
|
licensingDocsUrl: 'https://www.telerik.com/kendo-react-ui/components/my-license/'
|
|
13
13
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-react-layout",
|
|
3
|
-
"version": "14.5.0-develop.
|
|
3
|
+
"version": "14.5.0-develop.16",
|
|
4
4
|
"description": "React Layout components enable you to create a perceptive and intuitive layout of web projects. KendoReact Layout package",
|
|
5
5
|
"author": "Progress",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
@@ -26,12 +26,12 @@
|
|
|
26
26
|
"sideEffects": false,
|
|
27
27
|
"peerDependencies": {
|
|
28
28
|
"@progress/kendo-licensing": "^1.7.2",
|
|
29
|
-
"@progress/kendo-react-animation": "14.5.0-develop.
|
|
30
|
-
"@progress/kendo-react-buttons": "14.5.0-develop.
|
|
31
|
-
"@progress/kendo-react-common": "14.5.0-develop.
|
|
32
|
-
"@progress/kendo-react-intl": "14.5.0-develop.
|
|
33
|
-
"@progress/kendo-react-popup": "14.5.0-develop.
|
|
34
|
-
"@progress/kendo-react-progressbars": "14.5.0-develop.
|
|
29
|
+
"@progress/kendo-react-animation": "14.5.0-develop.16",
|
|
30
|
+
"@progress/kendo-react-buttons": "14.5.0-develop.16",
|
|
31
|
+
"@progress/kendo-react-common": "14.5.0-develop.16",
|
|
32
|
+
"@progress/kendo-react-intl": "14.5.0-develop.16",
|
|
33
|
+
"@progress/kendo-react-popup": "14.5.0-develop.16",
|
|
34
|
+
"@progress/kendo-react-progressbars": "14.5.0-develop.16",
|
|
35
35
|
"@progress/kendo-svg-icons": "^4.9.0 || ^5.0.0",
|
|
36
36
|
"react": "^18.0.0 || ^19.0.0",
|
|
37
37
|
"react-dom": "^18.0.0 || ^19.0.0"
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
"package": {
|
|
77
77
|
"productName": "KendoReact",
|
|
78
78
|
"productCode": "KENDOUIREACT",
|
|
79
|
-
"publishDate":
|
|
79
|
+
"publishDate": 1778828047,
|
|
80
80
|
"licensingDocsUrl": "https://www.telerik.com/kendo-react-ui/components/my-license/"
|
|
81
81
|
}
|
|
82
82
|
},
|
package/panelbar/PanelBar.js
CHANGED
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Q=require("react"),m=require("prop-types"),L=require("./PanelBarItem.js"),b=require("./util.js"),d=require("@progress/kendo-react-common"),a=require("./interfaces/NavigationAction.js");function X(o){const c=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(o){for(const r in o)if(r!=="default"){const k=Object.getOwnPropertyDescriptor(o,r);Object.defineProperty(c,r,k.get?k:{enumerable:!0,get:()=>o[r]})}}return c.default=o,Object.freeze(c)}const i=X(Q),w=o=>{const{animation:c=!0,children:r,dir:k,selected:I,expanded:U,expandMode:R="multiple",className:D,keepItemsMounted:S=!1,onSelect:x,style:j,isControlled:W}=o,K=i.useRef(null),_=i.useRef(null),T=i.useRef(void 0),N=i.useRef(null);d.useWebMcpRegister("panelbar",_,o,o.webMcp);const[p,g]=i.useState(()=>{const t=R||"multiple",u=b.getInitialState(o,t);return u.focused||(u.focused=b.getFirstId(o)),u}),B=R||"multiple",M=I!==void 0?I:p.selected,h=W?U||[]:p.expanded,F=i.useCallback(t=>{N.current=window.setTimeout(()=>t())},[]),C=i.useCallback(t=>{const u=A,s=b.flatChildren(i.Children.toArray(u));let n,l;switch(s.forEach(e=>{e.props.uniquePrivateKey===(t.uniquePrivateKey||p.focused)&&(n=e)}),B){case"single":l=[...n.props.parentUniquePrivateKey,n.props.uniquePrivateKey],b.isArrayEqual(h,l)&&(n.props.parentUniquePrivateKey?l=[...n.props.parentUniquePrivateKey]:l=[]);break;case"multiple":{l=h.slice();const e=l.indexOf(n.props.uniquePrivateKey);e===-1?l.push(n.props.uniquePrivateKey):l.splice(e,1);break}default:l=h.slice();break}g(e=>({...e,selected:n.props.uniquePrivateKey,expanded:l})),x&&x({target:n,expandedItems:l})},[r,p.focused,B,h,x]),f=i.useCallback((t,u=0,s)=>{const n=A,l=b.flatVisibleChildren(i.Children.toArray(n)),e=b.getFocusedChild(l,u,t,p.focused,s);if(e){const v=h.slice();if(s===a.NavigationAction.Right&&e&&e.props&&e.props.children&&e.props.children.length>0){if(v.push(e.props.uniquePrivateKey),g(y=>({...y,expanded:[...new Set(v)]})),e.props.expanded){const y=e.props.children[0]
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Q=require("react"),m=require("prop-types"),L=require("./PanelBarItem.js"),b=require("./util.js"),d=require("@progress/kendo-react-common"),a=require("./interfaces/NavigationAction.js");function X(o){const c=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(o){for(const r in o)if(r!=="default"){const k=Object.getOwnPropertyDescriptor(o,r);Object.defineProperty(c,r,k.get?k:{enumerable:!0,get:()=>o[r]})}}return c.default=o,Object.freeze(c)}const i=X(Q),w=o=>{const{animation:c=!0,children:r,dir:k,selected:I,expanded:U,expandMode:R="multiple",className:D,keepItemsMounted:S=!1,onSelect:x,style:j,isControlled:W}=o,K=i.useRef(null),_=i.useRef(null),T=i.useRef(void 0),N=i.useRef(null);d.useWebMcpRegister("panelbar",_,o,o.webMcp);const[p,g]=i.useState(()=>{const t=R||"multiple",u=b.getInitialState(o,t);return u.focused||(u.focused=b.getFirstId(o)),u}),B=R||"multiple",M=I!==void 0?I:p.selected,h=W?U||[]:p.expanded,F=i.useCallback(t=>{N.current=window.setTimeout(()=>t())},[]),C=i.useCallback(t=>{const u=A,s=b.flatChildren(i.Children.toArray(u));let n,l;switch(s.forEach(e=>{e.props.uniquePrivateKey===(t.uniquePrivateKey||p.focused)&&(n=e)}),B){case"single":l=[...n.props.parentUniquePrivateKey,n.props.uniquePrivateKey],b.isArrayEqual(h,l)&&(n.props.parentUniquePrivateKey?l=[...n.props.parentUniquePrivateKey]:l=[]);break;case"multiple":{l=h.slice();const e=l.indexOf(n.props.uniquePrivateKey);e===-1?l.push(n.props.uniquePrivateKey):l.splice(e,1);break}default:l=h.slice();break}g(e=>({...e,selected:n.props.uniquePrivateKey,expanded:l})),x&&x({target:n,expandedItems:l})},[r,p.focused,B,h,x]),f=i.useCallback((t,u=0,s)=>{const n=A,l=b.flatVisibleChildren(i.Children.toArray(n)),e=b.getFocusedChild(l,u,t,p.focused,s);if(e){const v=h.slice();if(s===a.NavigationAction.Right&&e&&e.props&&e.props.children&&e.props.children.length>0){if(v.push(e.props.uniquePrivateKey),g(y=>({...y,expanded:[...new Set(v)]})),e.props.expanded){const y=e.props.children[0];g(P=>({...P,focused:y.props.uniquePrivateKey}))}}else if(s===a.NavigationAction.Left&&(e&&e.props&&e.props.parentUniquePrivateKey&&e.props.parentUniquePrivateKey.length>0||e&&e.props&&!e.props.disabled&&e.props.children&&e.props.children.length>0)){const y=e.props.parentUniquePrivateKey;if(e.props.expanded){const P=e.props.uniquePrivateKey,q=v.indexOf(P);v.splice(q,1),g(J=>({...J,expanded:v}))}else if(e.props.level>0){const P=e.props.parentUniquePrivateKey[y.length-1];g(q=>({...q,focused:P}))}}else g(y=>({...y,focused:e.props.uniquePrivateKey}))}},[r,p.focused,h]),E=i.useCallback(t=>{C(t),f(t)},[C,f]),A=i.useMemo(()=>b.renderChildren({animation:c,keepItemsMounted:S,state:{...p,selected:M},expanded:h,handleSelect:E,children:r,activeDescendantRef:T}),[c,S,p,M,h,r,E]),O=i.useCallback((t,u)=>{let s;switch(u){case a.NavigationAction.First:f(t,s,a.NavigationAction.First);break;case a.NavigationAction.Last:f(t,s,a.NavigationAction.Last);break;case a.NavigationAction.Left:f(t,s,a.NavigationAction.Left);break;case a.NavigationAction.Right:f(t,s,a.NavigationAction.Right);break;case a.NavigationAction.Previous:s=-1,f(t,s);break;case a.NavigationAction.Next:s=1,f(t,s);break;case a.NavigationAction.Toggle:C(t);break}},[f,C]),$=i.useCallback(()=>{clearTimeout(N.current),p.wrapperFocused||g(t=>({...t,wrapperFocused:!0}))},[p.wrapperFocused]),z=i.useCallback(()=>{F(()=>{g(t=>({...t,wrapperFocused:!1}))})},[F]),H=i.useCallback(t=>{const u=K.current&&getComputedStyle(K.current).direction==="rtl"||!1;if(t.target===t.currentTarget){const s=t.keyCode;let n;switch(s){case d.Keys.left:n=u?a.NavigationAction.Right:a.NavigationAction.Left;break;case d.Keys.up:n=a.NavigationAction.Previous;break;case d.Keys.right:n=u?a.NavigationAction.Left:a.NavigationAction.Right;break;case d.Keys.down:n=a.NavigationAction.Next;break;case d.Keys.home:n=a.NavigationAction.First;break;case d.Keys.end:n=a.NavigationAction.Last;break;case d.Keys.space:case d.Keys.enter:n=a.NavigationAction.Toggle;break;default:n=null;break}n!==null&&(t.preventDefault(),O(t,n))}},[O]);i.useEffect(()=>()=>{N.current&&clearTimeout(N.current)},[]);const V={"aria-activedescendant":T.current},G=d.classNames("k-panelbar",D);return i.createElement("ul",{ref:K,dir:k,role:"tree",tabIndex:0,onKeyDown:H,onFocus:$,onBlur:z,className:G,style:j,...V},A)};w.propTypes={children:m.oneOfType([m.arrayOf(function(o,c){return o[c].type!==L.PanelBarItem?new Error("PanelBar children should be either PanelBarItem or an array of PanelBarItem."):null}),function(o,c){const r=o[c];return r&&r.type!==L.PanelBarItem?new Error("PanelBar children should be either PanelBarItem or an array of PanelBarItem."):null}]),selected:m.string,expandMode(o,c){const r=o[c];return r!=="single"&&r!=="multiple"&&r!=="default"?new Error(`Invalid value '${r}' given to '${c}'. It must be either 'single', 'multiple' or 'default'.`):null},animation:m.bool,keepItemsMounted:m.bool,onSelect:m.func};w.defaultProps={expandMode:"multiple",animation:!0,keepItemsMounted:!1};exports.PanelBar=w;
|
package/panelbar/PanelBar.mjs
CHANGED
|
@@ -64,8 +64,8 @@ const U = (c) => {
|
|
|
64
64
|
const k = h.slice();
|
|
65
65
|
if (s === n.Right && e && e.props && e.props.children && e.props.children.length > 0) {
|
|
66
66
|
if (k.push(e.props.uniquePrivateKey), f((b) => ({ ...b, expanded: [...new Set(k)] })), e.props.expanded) {
|
|
67
|
-
const b = e.props.children[0]
|
|
68
|
-
f((P) => ({ ...P, focused: b }));
|
|
67
|
+
const b = e.props.children[0];
|
|
68
|
+
f((P) => ({ ...P, focused: b.props.uniquePrivateKey }));
|
|
69
69
|
}
|
|
70
70
|
} else if (s === n.Left && (e && e.props && e.props.parentUniquePrivateKey && e.props.parentUniquePrivateKey.length > 0 || e && e.props && !e.props.disabled && e.props.children && e.props.children.length > 0)) {
|
|
71
71
|
const b = e.props.parentUniquePrivateKey;
|
|
@@ -77,7 +77,7 @@ const U = (c) => {
|
|
|
77
77
|
f((q) => ({ ...q, focused: P }));
|
|
78
78
|
}
|
|
79
79
|
} else
|
|
80
|
-
|
|
80
|
+
f((b) => ({ ...b, focused: e.props.uniquePrivateKey }));
|
|
81
81
|
}
|
|
82
82
|
},
|
|
83
83
|
[o, p.focused, h]
|
|
@@ -92,7 +92,8 @@ const U = (c) => {
|
|
|
92
92
|
state: { ...p, selected: F },
|
|
93
93
|
expanded: h,
|
|
94
94
|
handleSelect: B,
|
|
95
|
-
children: o
|
|
95
|
+
children: o,
|
|
96
|
+
activeDescendantRef: T
|
|
96
97
|
}), [u, R, p, F, h, o, B]), S = a.useCallback(
|
|
97
98
|
(t, i) => {
|
|
98
99
|
let s;
|
package/panelbar/PanelBarItem.js
CHANGED
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const z=require("react"),n=require("prop-types"),i=require("@progress/kendo-react-common"),N=require("@progress/kendo-svg-icons"),G=require("@progress/kendo-react-animation");function $(a){const c=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(a){for(const r in a)if(r!=="default"){const t=Object.getOwnPropertyDescriptor(a,r);Object.defineProperty(c,r,t.get?t:{enumerable:!0,get:()=>a[r]})}}return c.default=a,Object.freeze(c)}const e=$(z);function J({imageUrl:a,icon:c,svgIcon:r,iconClass:t}){return a?e.createElement("img",{role:"presentation",className:"k-panelbar-item-icon k-image",src:a}):c||r?e.createElement(i.IconWrap,{className:"k-panelbar-item-icon",name:c,icon:r}):t?e.createElement("span",{role:"presentation",className:"k-panelbar-item-icon "+t}):null}const d=e.forwardRef((a,c)=>{const{id:r,children:t,title:E
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const z=require("react"),n=require("prop-types"),i=require("@progress/kendo-react-common"),N=require("@progress/kendo-svg-icons"),G=require("@progress/kendo-react-animation");function $(a){const c=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(a){for(const r in a)if(r!=="default"){const t=Object.getOwnPropertyDescriptor(a,r);Object.defineProperty(c,r,t.get?t:{enumerable:!0,get:()=>a[r]})}}return c.default=a,Object.freeze(c)}const e=$(z);function J({imageUrl:a,icon:c,svgIcon:r,iconClass:t}){return a?e.createElement("img",{role:"presentation",className:"k-panelbar-item-icon k-image",src:a}):c||r?e.createElement(i.IconWrap,{className:"k-panelbar-item-icon",name:c,icon:r}):t?e.createElement("span",{role:"presentation",className:"k-panelbar-item-icon "+t}):null}const d=e.forwardRef((a,c)=>{const{id:r,children:t,title:h=E.title,uniquePrivateKey:m,disabled:l,selected:b,focused:C,expanded:s,className:P,level:k,headerClassName:R,animation:y,keepItemsMounted:o,onSelect:u,imageUrl:S,icon:B,svgIcon:x,iconClass:O}=a,p=e.useRef({props:a}),D=e.useRef(null);e.useImperativeHandle(p,()=>({props:a})),e.useImperativeHandle(c,()=>p.current);const[w,g]=e.useState(s||!1),T=e.useCallback(()=>{u&&!l&&u({uniquePrivateKey:m,id:r,target:p.current})},[u,l,m,r]),q=e.useCallback(f=>o?e.cloneElement(f,{...f.props,in:s}):f,[o,s]),A=e.useCallback(()=>{o&&g(!0)},[o]),j=e.useCallback(()=>{o&&g(!1)},[o]),U={role:"treeitem","aria-disabled":l,"aria-selected":!l&&b,"aria-expanded":t?!l&&s:void 0},M=i.classNames("k-panelbar-item",{"k-panelbar-header":k===0,"k-expanded":s&&!!t,"k-disabled":l},`k-level-${k}`,P),_=i.classNames("k-link",{"k-selected":!l&&b,"k-focus":C},R),H={display:"block"},L=J({imageUrl:S,icon:B,svgIcon:x,iconClass:O}),F=!l&&t?e.createElement(i.IconWrap,{name:s?"chevron-up":"chevron-down",icon:s?N.chevronUpIcon:N.chevronDownIcon,className:i.classNames("k-panelbar-toggle",s?"k-panelbar-collapse":"k-panelbar-expand")}):null;let I=!1;t&&t[0]&&Array.isArray(t)&&(I=t[0].type===d);const K=o&&!w?"none":"block",v=!l&&s||o?I?e.createElement("ul",{role:"group",className:"k-panelbar-group",style:{display:K}},t):t:null,W=(y===void 0||y)&&!l&&t?e.createElement(G.Reveal,{transitionEnterDuration:200,transitionExitDuration:200,key:m+"_animation",style:H,children:v,childFactory:o?q:void 0,unmountOnExit:!o,onBeforeEnter:A,onAfterExited:j}):v;return e.createElement("li",{ref:D,id:r,className:M,...U},e.createElement("span",{className:_,onClick:T},L,e.createElement("span",{className:"k-panelbar-item-text"},h),F),W)}),E={title:"Untitled"};d.propTypes={animation:n.bool,children:n.any,className:n.string,icon:n.string,iconClass:n.string,imageUrl:n.string,svgIcon:i.svgIconPropType,expanded:n.bool,disabled:n.bool,onSelect:n.func,selected:n.bool,level:n.number,title:n.oneOfType([n.string,n.element]),id:n.oneOfType([n.string,n.number]),focused:n.bool,keepItemsMounted:n.bool};d.displayName="KendoReactPanelBarItem";exports.PanelBarItem=d;exports.panelBarItemDefaultProps=E;
|
|
@@ -7,21 +7,21 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import * as e from "react";
|
|
9
9
|
import n from "prop-types";
|
|
10
|
-
import { classNames as u, IconWrap as
|
|
10
|
+
import { classNames as u, IconWrap as E, svgIconPropType as _ } from "@progress/kendo-react-common";
|
|
11
11
|
import { chevronUpIcon as $, chevronDownIcon as j } from "@progress/kendo-svg-icons";
|
|
12
12
|
import { Reveal as z } from "@progress/kendo-react-animation";
|
|
13
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(
|
|
14
|
+
return o ? /* @__PURE__ */ e.createElement("img", { role: "presentation", className: "k-panelbar-item-icon k-image", src: o }) : i || s ? /* @__PURE__ */ e.createElement(E, { 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
16
|
const f = e.forwardRef((o, i) => {
|
|
17
17
|
const {
|
|
18
18
|
id: s,
|
|
19
19
|
children: a,
|
|
20
|
-
title:
|
|
20
|
+
title: N = Q.title,
|
|
21
21
|
uniquePrivateKey: c,
|
|
22
22
|
disabled: t,
|
|
23
23
|
selected: k,
|
|
24
|
-
focused:
|
|
24
|
+
focused: h,
|
|
25
25
|
expanded: r,
|
|
26
26
|
className: C,
|
|
27
27
|
level: b,
|
|
@@ -57,9 +57,8 @@ const f = e.forwardRef((o, i) => {
|
|
|
57
57
|
}, [l]), L = {
|
|
58
58
|
role: "treeitem",
|
|
59
59
|
"aria-disabled": t,
|
|
60
|
-
"aria-hidden": !t && !r ? "true" : "false",
|
|
61
60
|
"aria-selected": !t && k,
|
|
62
|
-
"aria-expanded": !t && r
|
|
61
|
+
"aria-expanded": a ? !t && r : void 0
|
|
63
62
|
}, O = u(
|
|
64
63
|
"k-panelbar-item",
|
|
65
64
|
{
|
|
@@ -73,24 +72,23 @@ const f = e.forwardRef((o, i) => {
|
|
|
73
72
|
"k-link",
|
|
74
73
|
{
|
|
75
74
|
"k-selected": !t && k,
|
|
76
|
-
"k-focus":
|
|
75
|
+
"k-focus": h
|
|
77
76
|
},
|
|
78
77
|
x
|
|
79
78
|
), K = { display: "block" }, M = J({ imageUrl: B, icon: R, svgIcon: w, iconClass: P }), q = !t && a ? /* @__PURE__ */ e.createElement(
|
|
80
|
-
|
|
79
|
+
E,
|
|
81
80
|
{
|
|
82
81
|
name: r ? "chevron-up" : "chevron-down",
|
|
83
82
|
icon: r ? $ : j,
|
|
84
83
|
className: u("k-panelbar-toggle", r ? "k-panelbar-collapse" : "k-panelbar-expand")
|
|
85
84
|
}
|
|
86
85
|
) : null;
|
|
87
|
-
let
|
|
88
|
-
a && a[0] && Array.isArray(a) && (
|
|
89
|
-
const G = l && !A ? "none" : "block",
|
|
86
|
+
let v = !1;
|
|
87
|
+
a && a[0] && Array.isArray(a) && (v = a[0].type === f);
|
|
88
|
+
const G = l && !A ? "none" : "block", I = !t && r || l ? v ? /* @__PURE__ */ e.createElement(
|
|
90
89
|
"ul",
|
|
91
90
|
{
|
|
92
91
|
role: "group",
|
|
93
|
-
"aria-hidden": r ? "false" : "true",
|
|
94
92
|
className: "k-panelbar-group",
|
|
95
93
|
style: { display: G }
|
|
96
94
|
},
|
|
@@ -102,14 +100,14 @@ const f = e.forwardRef((o, i) => {
|
|
|
102
100
|
transitionExitDuration: 200,
|
|
103
101
|
key: c + "_animation",
|
|
104
102
|
style: K,
|
|
105
|
-
children:
|
|
103
|
+
children: I,
|
|
106
104
|
childFactory: l ? T : void 0,
|
|
107
105
|
unmountOnExit: !l,
|
|
108
106
|
onBeforeEnter: U,
|
|
109
107
|
onAfterExited: H
|
|
110
108
|
}
|
|
111
|
-
) :
|
|
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" },
|
|
109
|
+
) : I;
|
|
110
|
+
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" }, N), q), W);
|
|
113
111
|
}), Q = {
|
|
114
112
|
title: "Untitled"
|
|
115
113
|
};
|
package/panelbar/util.d.ts
CHANGED
|
@@ -14,7 +14,7 @@ import * as React from 'react';
|
|
|
14
14
|
/**
|
|
15
15
|
* @hidden
|
|
16
16
|
*/
|
|
17
|
-
export declare const renderChildren: ({ animation, keepItemsMounted, state, expanded, handleSelect, children, parentExpanded, level, parentPrivateKey }: RenderPanelBarItem) => React.ReactNode;
|
|
17
|
+
export declare const renderChildren: ({ animation, keepItemsMounted, state, expanded, handleSelect, children, parentExpanded, level, parentPrivateKey, activeDescendantRef }: RenderPanelBarItem) => React.ReactNode;
|
|
18
18
|
/**
|
|
19
19
|
* @hidden
|
|
20
20
|
*/
|
package/panelbar/util.js
CHANGED
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const O=require("react"),l=require("./PanelBarItem.js"),d=require("./interfaces/NavigationAction.js");function N(r){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const e in r)if(e!=="default"){const o=Object.getOwnPropertyDescriptor(r,e);Object.defineProperty(n,e,o.get?o:{enumerable:!0,get:()=>r[e]})}}return n.default=r,Object.freeze(n)}const a=N(O),S=r=>typeof r!="object"||!("type"in r)||r.type!==l.PanelBarItem,P=({animation:r=!0,keepItemsMounted:n=!1,state:e,expanded:o,handleSelect:p,children:t,parentExpanded:c=!0,level:s=0,parentPrivateKey:f=[],activeDescendantRef:g})=>{const m=a.Children.toArray(t).filter(S),F=m.length?m:t;return a.Children.map(F,(i,A)=>{if(i&&i.type===l.PanelBarItem){let y;const u=b(i,f,A);if(i.props.children){const B={animation:r,keepItemsMounted:n,state:e,expanded:o,handleSelect:p,children:i.props.children,parentExpanded:(o||[]).indexOf(u)>-1,level:s+1,parentPrivateKey:[...f,u],activeDescendantRef:g};y=P(B)}const I=i.props.id||`k-panelbar-item-default-${u}`;return g&&e.wrapperFocused&&e.focused===u&&(g.current=I),a.cloneElement(i,{...i.props,animation:i.props.animation!==void 0?i.props.animation:r,keepItemsMounted:n,id:I,uniquePrivateKey:u,parentUniquePrivateKey:f,parentExpanded:c,level:s,expanded:(o||[]).indexOf(u)>-1,focused:e.focused===u&&e.wrapperFocused,selected:e.selected===u,children:y,onSelect:p})}return a.createElement("div",{className:"k-panelbar-content","aria-hidden":c?void 0:"true"},i)})},j=r=>{const n=a.Children.toArray(r.children)[0];return n?b(n,[],0):""},v=(r,n,e={expanded:r.expanded||[],selected:r.selected||"",focused:r.focused||"",wrapperFocused:!1},o=!0,p=[])=>(a.Children.map(r.children,(t,c)=>{if(t&&t.type===l.PanelBarItem){const s=b(t,p,c);!t.props.disabled&&o&&(t.props.selected&&(e.selected=s),t.props.focused&&(e.focused=s),t.props.expanded&&(n==="multiple"?e.expanded.push(s):n==="single"&&(e.expanded=[s])),t.props.children&&(e=v(t.props,n,e,!!t.props.expanded,[...p,s])))}}),e),b=(r,n,e)=>r&&r.props&&r.props.id?r.props.id:n.length?n[n.length-1]+`.${e}`:`.${e}`;function E(r,n=[]){return(r||[]).forEach(e=>{e.disabled||(n.push(e),e.expanded&&e.children&&E(e.children,n))}),n}function q(r,n=[]){return a.Children.forEach(r,e=>{e&&e.props&&!e.props.disabled&&(n.push(e),e.props.children&&q(e.props.children,n))}),n}function C(r,n=[]){return a.Children.forEach(r,e=>{e&&e.props&&(e.props.expanded||e.props.parentExpanded)&&(n.push(e),e.props.children&&C(e.props.children,n))}),n}const x=r=>r!=null;exports.PanelBarUtils=void 0;(r=>{function n(e){return e.map((o,p)=>{let t;return o.content&&(t=o.content),o.children&&(t=n(o.children)),a.createElement(l.PanelBarItem,{...o,children:t,key:o.id||p})})}r.mapItemsToComponents=n})(exports.PanelBarUtils||(exports.PanelBarUtils={}));const h=(r,n)=>r.length!==n.length?!1:r.every((e,o)=>e===n[o]),k=(r,n,e,o,p)=>{let t;if(p===d.NavigationAction.First||p===d.NavigationAction.Last)switch(p){case d.NavigationAction.First:t=r[0];break;case d.NavigationAction.Last:t=r[r.length-1];break}else r.forEach((c,s)=>{if(c.props.uniquePrivateKey===(e.uniquePrivateKey||o)){const f=s+n<0?r.length-1:s+n>r.length-1?0:s+n;t=r[f]}});return t};exports.flatChildren=q;exports.flatVisibleChildren=C;exports.flatVisibleItems=E;exports.getFirstId=j;exports.getFocusedChild=k;exports.getInitialState=v;exports.isArrayEqual=h;exports.isPresent=x;exports.renderChildren=P;
|