@progress/kendo-react-layout 7.4.0 → 7.5.0-develop.10

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/drawer/Drawer.mjs CHANGED
@@ -12,11 +12,11 @@ import { DrawerContext as S } from "./context/DrawerContext.mjs";
12
12
  import { DrawerNavigation as I } from "./DrawerNavigation.mjs";
13
13
  import { validatePackage as W, useDir as O, classNames as T } from "@progress/kendo-react-common";
14
14
  import { packageMetadata as j } from "../package-metadata.mjs";
15
- const s = t.forwardRef((l, u) => {
15
+ const l = t.forwardRef((d, u) => {
16
16
  W(j);
17
17
  const {
18
- expanded: d,
19
- mode: n,
18
+ expanded: n,
19
+ mode: i,
20
20
  position: p,
21
21
  className: f,
22
22
  children: v,
@@ -29,8 +29,8 @@ const s = t.forwardRef((l, u) => {
29
29
  item: k,
30
30
  tabIndex: g,
31
31
  onOverlayClick: x,
32
- onSelect: i
33
- } = l, r = t.useRef(null), E = t.useCallback(
32
+ onSelect: o
33
+ } = d, r = t.useRef(null), E = t.useCallback(
34
34
  () => {
35
35
  r.current && r.current.focus();
36
36
  },
@@ -41,26 +41,26 @@ const s = t.forwardRef((l, u) => {
41
41
  focus: E
42
42
  }));
43
43
  const N = t.useCallback(
44
- (D, P, o) => {
45
- if (a && i) {
44
+ (D, P, s) => {
45
+ if (a && o) {
46
46
  const R = {
47
47
  itemTarget: D,
48
48
  itemIndex: P,
49
- syntheticEvent: o,
50
- nativeEvent: o && o.nativeEvent,
49
+ syntheticEvent: s,
50
+ nativeEvent: s && s.nativeEvent,
51
51
  target: void 0
52
52
  };
53
- i.call(void 0, R);
53
+ o.call(void 0, R);
54
54
  }
55
55
  },
56
- [a, i]
57
- ), c = O(r, l.dir), C = T(
56
+ [a, o]
57
+ ), c = O(r, d.dir), C = T(
58
58
  {
59
59
  "k-drawer-container": !0,
60
- "k-drawer-expanded": d,
61
- "k-drawer-overlay": n === "overlay",
62
- "k-drawer-push": n === "push",
63
- "k-drawer-mini": m
60
+ "k-drawer-expanded": n,
61
+ "k-drawer-overlay": i === "overlay",
62
+ "k-drawer-push": i === "push",
63
+ "k-drawer-mini": m && !n
64
64
  },
65
65
  f
66
66
  );
@@ -69,8 +69,8 @@ const s = t.forwardRef((l, u) => {
69
69
  {
70
70
  value: {
71
71
  animation: y,
72
- expanded: d,
73
- mode: n,
72
+ expanded: n,
73
+ mode: i,
74
74
  position: p,
75
75
  mini: m,
76
76
  dir: c,
@@ -96,7 +96,7 @@ const s = t.forwardRef((l, u) => {
96
96
  )
97
97
  );
98
98
  });
99
- s.propTypes = {
99
+ l.propTypes = {
100
100
  animation: e.any,
101
101
  expanded: e.bool,
102
102
  children: e.any,
@@ -121,10 +121,10 @@ const H = {
121
121
  mini: !1,
122
122
  dir: "ltr",
123
123
  width: 240,
124
- miniWidth: 50
124
+ miniWidth: 48
125
125
  };
126
- s.defaultProps = H;
127
- s.displayName = "KendoDrawer";
126
+ l.defaultProps = H;
127
+ l.displayName = "KendoDrawer";
128
128
  export {
129
- s as Drawer
129
+ l as Drawer
130
130
  };
@@ -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 client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const R=require("react"),n=require("prop-types"),o=require("@progress/kendo-react-common"),T=require("./context/DrawerContext.js");function P(t){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const r in t)if(r!=="default"){const l=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(a,r,l.get?l:{enumerable:!0,get:()=>t[r]})}}return a.default=t,Object.freeze(a)}const e=P(R),d=e.forwardRef((t,a)=>{const{className:r,style:l,text:u,icon:i,svgIcon:b,separator:g,disabled:s,selected:I,onSelect:m,index:f,tabIndex:k,children:y,...w}=t,{expanded:x,mini:C,item:N}=e.useContext(T.DrawerContext),c=e.useRef(null),p=e.useCallback(()=>{c.current&&c.current.focus()},[]);e.useImperativeHandle(a,()=>({element:c.current,focus:p,props:t}));const D=o.classNames("k-drawer-item",{"k-selected":I,"k-disabled":s},r),j=e.useCallback(E=>{if(m&&!s){const O={element:c.current,focus:p,props:t};m(O,f,E)}},[m,f,s]),v=e.createElement(e.Fragment,null,(i||b)&&e.createElement(o.IconWrap,{name:i&&o.toIconName(i),icon:b}),!x&&C?null:e.createElement("span",{className:"k-item-text"},u));return g?e.createElement("li",{className:"k-drawer-item k-drawer-separator",role:"separator"}):e.createElement("li",{ref:c,className:D,style:l,role:"menuitem","aria-label":u,"aria-disabled":s,onClick:j,tabIndex:o.getTabIndex(k,s),...w},N?y:v)});d.propTypes={className:n.string,style:n.object,text:n.string,icon:n.string,svgIcon:o.svgIconPropType,separator:n.bool,selected:n.bool,disabled:n.bool,targetItem:n.any};d.displayName="KendoDrawerItem";exports.DrawerItem=d;
8
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const E=require("react"),r=require("prop-types"),o=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:u,icon:i,svgIcon:b,separator:g,disabled:s,selected:I,onSelect:m,index:f,tabIndex:k,children:y,...w}=t,{expanded:T,mini:P,item:x}=e.useContext(O.DrawerContext),c=e.useRef(null),p=e.useCallback(()=>{c.current&&c.current.focus()},[]);e.useImperativeHandle(a,()=>({element:c.current,focus:p,props:t}));const C=o.classNames("k-drawer-item",{"k-selected":I,"k-disabled":s},n),N=e.useCallback(j=>{if(m&&!s){const v={element:c.current,focus:p,props:t};m(v,f,j)}},[m,f,s]),D=e.createElement(e.Fragment,null,(i||b)&&e.createElement(o.IconWrap,{name:i&&o.toIconName(i),icon:b}),e.createElement("span",{className:"k-item-text"},u));return g?e.createElement("li",{className:"k-drawer-item k-drawer-separator",role:"separator"}):e.createElement("li",{ref:c,className:C,style:l,role:"menuitem","aria-label":u,"aria-disabled":s,onClick:N,tabIndex:o.getTabIndex(k,s),...w},x?y:D)});d.propTypes={className:r.string,style:r.object,text:r.string,icon:r.string,svgIcon:o.svgIconPropType,separator:r.bool,selected:r.bool,disabled:r.bool,targetItem:r.any};d.displayName="KendoDrawerItem";exports.DrawerItem=d;
@@ -8,24 +8,24 @@
8
8
  "use client";
9
9
  import * as e from "react";
10
10
  import t from "prop-types";
11
- import { classNames as T, IconWrap as D, toIconName as P, getTabIndex as j, svgIconPropType as F } from "@progress/kendo-react-common";
12
- import { DrawerContext as H } from "./context/DrawerContext.mjs";
11
+ import { classNames as v, IconWrap as R, toIconName as T, getTabIndex as D, svgIconPropType as P } from "@progress/kendo-react-common";
12
+ import { DrawerContext as j } from "./context/DrawerContext.mjs";
13
13
  const d = e.forwardRef((s, u) => {
14
14
  const {
15
15
  className: p,
16
16
  style: f,
17
- text: o,
17
+ text: l,
18
18
  icon: n,
19
19
  svgIcon: c,
20
20
  separator: b,
21
21
  disabled: a,
22
22
  selected: I,
23
- onSelect: l,
23
+ onSelect: o,
24
24
  index: m,
25
25
  tabIndex: x,
26
26
  children: k,
27
27
  ...g
28
- } = s, { expanded: N, mini: w, item: C } = e.useContext(H), r = e.useRef(null), i = e.useCallback(
28
+ } = s, { expanded: F, mini: H, item: N } = e.useContext(j), r = e.useRef(null), i = e.useCallback(
29
29
  () => {
30
30
  r.current && r.current.focus();
31
31
  },
@@ -36,40 +36,40 @@ const d = e.forwardRef((s, u) => {
36
36
  focus: i,
37
37
  props: s
38
38
  }));
39
- const y = T(
39
+ const w = v(
40
40
  "k-drawer-item",
41
41
  {
42
42
  "k-selected": I,
43
43
  "k-disabled": a
44
44
  },
45
45
  p
46
- ), E = e.useCallback(
47
- (v) => {
48
- if (l && !a) {
49
- const R = {
46
+ ), C = e.useCallback(
47
+ (E) => {
48
+ if (o && !a) {
49
+ const h = {
50
50
  element: r.current,
51
51
  focus: i,
52
52
  props: s
53
53
  };
54
- l(R, m, v);
54
+ o(h, m, E);
55
55
  }
56
56
  },
57
- [l, m, a]
58
- ), h = /* @__PURE__ */ e.createElement(e.Fragment, null, (n || c) && /* @__PURE__ */ e.createElement(D, { name: n && P(n), icon: c }), !N && w ? null : /* @__PURE__ */ e.createElement("span", { className: "k-item-text" }, o));
57
+ [o, m, a]
58
+ ), y = /* @__PURE__ */ e.createElement(e.Fragment, null, (n || c) && /* @__PURE__ */ e.createElement(R, { name: n && T(n), icon: c }), /* @__PURE__ */ e.createElement("span", { className: "k-item-text" }, l));
59
59
  return b ? /* @__PURE__ */ e.createElement("li", { className: "k-drawer-item k-drawer-separator", role: "separator" }) : /* @__PURE__ */ e.createElement(
60
60
  "li",
61
61
  {
62
62
  ref: r,
63
- className: y,
63
+ className: w,
64
64
  style: f,
65
65
  role: "menuitem",
66
- "aria-label": o,
66
+ "aria-label": l,
67
67
  "aria-disabled": a,
68
- onClick: E,
69
- tabIndex: j(x, a),
68
+ onClick: C,
69
+ tabIndex: D(x, a),
70
70
  ...g
71
71
  },
72
- C ? k : h
72
+ N ? k : y
73
73
  );
74
74
  });
75
75
  d.propTypes = {
@@ -77,7 +77,7 @@ d.propTypes = {
77
77
  style: t.object,
78
78
  text: t.string,
79
79
  icon: t.string,
80
- svgIcon: F,
80
+ svgIcon: P,
81
81
  separator: t.bool,
82
82
  selected: t.bool,
83
83
  disabled: t.bool,
@@ -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 client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const U=require("react"),i=require("prop-types"),H=require("./context/DrawerContext.js"),B=require("./DrawerItem.js"),u=require("@progress/kendo-react-common"),h=require("../package-metadata.js");function z(a){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(a){for(const n in a)if(n!=="default"){const l=Object.getOwnPropertyDescriptor(a,n);Object.defineProperty(r,n,l.get?l:{enumerable:!0,get:()=>a[n]})}}return r.default=a,Object.freeze(r)}const t=z(U),K=240,V=50,G={type:"slide",duration:200},J={type:"slide",duration:0},y=t.forwardRef((a,r)=>{const{children:n,className:l,style:f}=a;u.validatePackage(h.packageMetadata);const O=u.shouldShowValidationUI(h.packageMetadata),{animation:p,expanded:c,mode:d,position:s,onOverlayClick:E,mini:o,dir:w,width:k,miniWidth:v,items:b,item:W,onSelect:M}=t.useContext(H.DrawerContext),m=t.useRef(null),x=t.useCallback(()=>{m.current&&m.current.focus()},[]),e=typeof p!="boolean"?p:p===!1?J:G,N=k||K,g=v||V;t.useImperativeHandle(r,()=>({element:m.current,focus:x}));const A=t.useMemo(()=>"k-widget k-drawer "+u.classNames({"k-drawer-start":s==="start","k-drawer-end":s==="end"},l),[s]),C={opacity:1,flexBasis:N,WebkitTransition:"all "+(e&&e.duration)+"ms",transition:"all "+(e&&e.duration)+"ms"},P={opacity:1,transform:"translateX(0px)",WebkitTransition:"all "+(e&&e.duration)+"ms",transition:"all "+(e&&e.duration)+"ms"},_={opacity:o?1:0,flexBasis:o?g:0,WebkitTransition:"all "+(e&&e.duration)+"ms",transition:"all "+(e&&e.duration)+"ms"},R={opacity:0,transform:"translateX(-100%)",WebkitTransition:"all "+(e&&e.duration)+"ms",transition:"all "+(e&&e.duration)+"ms"},S={opacity:0,transform:"translateX(100%)",WebkitTransition:"all "+(e&&e.duration)+"ms",transition:"all "+(e&&e.duration)+"ms"},D={transform:"translateX(0%)",WebkitTransitionDuration:(e&&e.duration)+"ms",transitionDuration:(e&&e.duration)+"ms"},j=c?d==="push"?C:P:d==="push"?_:w==="ltr"&&s==="start"||w==="rtl"&&s==="end"?o?D:R:o?D:S,q=b&&t.createElement("ul",{className:"k-drawer-items",role:"menubar","aria-label":"drawer-list","aria-expanded":c},b.map((X,I)=>{const F={index:I,...X,onSelect:M},L=W||B.DrawerItem;return t.createElement(L,{key:I,...F})})),T=t.createElement("div",{style:e?{...j,...f}:f,className:A,ref:m},t.createElement("div",{className:"k-drawer-wrapper",style:!c&&o&&d==="overlay"?{width:g}:{width:N}},q||n),O&&t.createElement(u.WatermarkOverlay,null));return d==="overlay"?t.createElement(t.Fragment,null,c&&t.createElement("div",{className:"k-overlay",onClick:E}),T):T});y.propTypes={children:i.any,className:i.string,style:i.object,item:i.any,tabIndex:i.number};y.displayName="KendoDrawerNavigation";exports.DrawerNavigation=y;
8
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const V=require("react"),i=require("prop-types"),$=require("./context/DrawerContext.js"),G=require("./DrawerItem.js"),l=require("@progress/kendo-react-common"),O=require("../package-metadata.js");function J(a){const s=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(a){for(const n in a)if(n!=="default"){const c=Object.getOwnPropertyDescriptor(a,n);Object.defineProperty(s,n,c.get?c:{enumerable:!0,get:()=>a[n]})}}return s.default=a,Object.freeze(s)}const t=J(V),Q=240,Y=50,Z={type:"slide",duration:200},ee={type:"slide",duration:0},f=t.forwardRef((a,s)=>{const{children:n,className:c,style:k}=a;l.validatePackage(O.packageMetadata);const E=l.shouldShowValidationUI(O.packageMetadata),{animation:p,expanded:m,mode:d,position:o,onOverlayClick:W,mini:r,dir:w,width:v,miniWidth:N,items:b,item:C,onSelect:M}=t.useContext($.DrawerContext),u=t.useRef(null),x=t.useCallback(()=>{u.current&&u.current.focus()},[]),e=typeof p!="boolean"?p:p===!1?ee:Z,g=v||Q,D=N||Y;t.useImperativeHandle(s,()=>({element:u.current,focus:x}));const A=t.useMemo(()=>"k-drawer "+l.classNames({"k-drawer-start":o==="start","k-drawer-end":o==="end"},c),[o]),P={opacity:1,flexBasis:g,WebkitTransition:"all "+(e&&e.duration)+"ms",transition:"all "+(e&&e.duration)+"ms"},_={opacity:1,transform:"translateX(0px)",WebkitTransition:"all "+(e&&e.duration)+"ms",transition:"all "+(e&&e.duration)+"ms"},R={opacity:r?1:0,flexBasis:r?D:0,WebkitTransition:"all "+(e&&e.duration)+"ms",transition:"all "+(e&&e.duration)+"ms"},S={opacity:0,transform:"translateX(-100%)",WebkitTransition:"all "+(e&&e.duration)+"ms",transition:"all "+(e&&e.duration)+"ms"},j={opacity:0,transform:"translateX(100%)",WebkitTransition:"all "+(e&&e.duration)+"ms",transition:"all "+(e&&e.duration)+"ms"},T={transform:"translateX(0%)",WebkitTransitionDuration:(e&&e.duration)+"ms",transitionDuration:(e&&e.duration)+"ms"},q=m?d==="push"?P:_:d==="push"?R:w==="ltr"&&o==="start"||w==="rtl"&&o==="end"?r?T:S:r?T:j,L=b&&t.createElement("ul",{className:"k-drawer-items",role:"menubar","aria-label":"drawer-list","aria-expanded":m},b.map((X,I)=>{const{className:F,level:y,...U}=X,H=y!=null?y:0,B=l.classNames(F,r?"":`k-level-${H}`),z={index:I,className:B,...U,onSelect:M},K=C||G.DrawerItem;return t.createElement(K,{key:I,...z})})),h=t.createElement("div",{style:e?{...q,...k}:k,className:A,ref:u},t.createElement("div",{className:"k-drawer-wrapper",style:!m&&r&&d==="overlay"?{width:D}:{width:g}},L||n),E&&t.createElement(l.WatermarkOverlay,null));return d==="overlay"?t.createElement(t.Fragment,null,m&&t.createElement("div",{className:"k-overlay",onClick:W}),h):h});f.propTypes={children:i.any,className:i.string,style:i.object,item:i.any,tabIndex:i.number};f.displayName="KendoDrawerNavigation";exports.DrawerNavigation=f;
@@ -7,82 +7,82 @@
7
7
  */
8
8
  "use client";
9
9
  import * as a from "react";
10
- import n from "prop-types";
11
- import { DrawerContext as S } from "./context/DrawerContext.mjs";
12
- import { DrawerItem as B } from "./DrawerItem.mjs";
13
- import { validatePackage as j, shouldShowValidationUI as K, classNames as V, WatermarkOverlay as q } from "@progress/kendo-react-common";
14
- import { packageMetadata as N } from "../package-metadata.mjs";
15
- const z = 240, G = 50, J = { type: "slide", duration: 200 }, Q = { type: "slide", duration: 0 }, h = a.forwardRef((I, T) => {
16
- const { children: b, className: D, style: m } = I;
17
- j(N);
18
- const E = K(N), {
10
+ import r from "prop-types";
11
+ import { DrawerContext as q } from "./context/DrawerContext.mjs";
12
+ import { DrawerItem as z } from "./DrawerItem.mjs";
13
+ import { validatePackage as G, shouldShowValidationUI as J, classNames as h, WatermarkOverlay as Q } from "@progress/kendo-react-common";
14
+ import { packageMetadata as I } from "../package-metadata.mjs";
15
+ const Y = 240, Z = 50, tt = { type: "slide", duration: 200 }, at = { type: "slide", duration: 0 }, T = a.forwardRef((b, D) => {
16
+ const { children: E, className: W, style: c } = b;
17
+ G(I);
18
+ const x = J(I), {
19
19
  animation: l,
20
20
  expanded: s,
21
21
  mode: o,
22
- position: e,
23
- onOverlayClick: W,
24
- mini: r,
25
- dir: c,
26
- width: d,
27
- miniWidth: u,
28
- items: p,
29
- item: g,
30
- onSelect: x
31
- } = a.useContext(S), i = a.useRef(null), A = a.useCallback(
22
+ position: n,
23
+ onOverlayClick: g,
24
+ mini: e,
25
+ dir: d,
26
+ width: u,
27
+ miniWidth: p,
28
+ items: y,
29
+ item: A,
30
+ onSelect: C
31
+ } = a.useContext(q), i = a.useRef(null), O = a.useCallback(
32
32
  () => {
33
33
  i.current && i.current.focus();
34
34
  },
35
35
  []
36
- ), t = typeof l != "boolean" ? l : l === !1 ? Q : J, y = d || z, f = u || G;
37
- a.useImperativeHandle(T, () => ({
36
+ ), t = typeof l != "boolean" ? l : l === !1 ? at : tt, f = u || Y, k = p || Z;
37
+ a.useImperativeHandle(D, () => ({
38
38
  element: i.current,
39
- focus: A
39
+ focus: O
40
40
  }));
41
- const O = a.useMemo(
42
- () => "k-widget k-drawer " + V(
41
+ const M = a.useMemo(
42
+ () => "k-drawer " + h(
43
43
  {
44
- "k-drawer-start": e === "start",
45
- "k-drawer-end": e === "end"
44
+ "k-drawer-start": n === "start",
45
+ "k-drawer-end": n === "end"
46
46
  },
47
- D
47
+ W
48
48
  ),
49
- [e]
50
- ), C = {
49
+ [n]
50
+ ), P = {
51
51
  opacity: 1,
52
- flexBasis: y,
52
+ flexBasis: f,
53
53
  WebkitTransition: "all " + (t && t.duration) + "ms",
54
54
  /* Safari */
55
55
  transition: "all " + (t && t.duration) + "ms"
56
- }, M = {
56
+ }, _ = {
57
57
  opacity: 1,
58
58
  transform: "translateX(0px)",
59
59
  WebkitTransition: "all " + (t && t.duration) + "ms",
60
60
  /* Safari */
61
61
  transition: "all " + (t && t.duration) + "ms"
62
- }, P = {
63
- opacity: r ? 1 : 0,
64
- flexBasis: r ? f : 0,
62
+ }, L = {
63
+ opacity: e ? 1 : 0,
64
+ flexBasis: e ? k : 0,
65
65
  WebkitTransition: "all " + (t && t.duration) + "ms",
66
66
  /* Safari */
67
67
  transition: "all " + (t && t.duration) + "ms"
68
- }, _ = {
68
+ }, R = {
69
69
  opacity: 0,
70
70
  transform: "translateX(-100%)",
71
71
  WebkitTransition: "all " + (t && t.duration) + "ms",
72
72
  /* Safari */
73
73
  transition: "all " + (t && t.duration) + "ms"
74
- }, R = {
74
+ }, X = {
75
75
  opacity: 0,
76
76
  transform: "translateX(100%)",
77
77
  WebkitTransition: "all " + (t && t.duration) + "ms",
78
78
  /* Safari */
79
79
  transition: "all " + (t && t.duration) + "ms"
80
- }, w = {
80
+ }, v = {
81
81
  transform: "translateX(0%)",
82
82
  WebkitTransitionDuration: (t && t.duration) + "ms",
83
83
  /* Safari */
84
84
  transitionDuration: (t && t.duration) + "ms"
85
- }, X = s ? o === "push" ? C : M : o === "push" ? P : c === "ltr" && e === "start" || c === "rtl" && e === "end" ? r ? w : _ : r ? w : R, F = p && /* @__PURE__ */ a.createElement(
85
+ }, F = s ? o === "push" ? P : _ : o === "push" ? L : d === "ltr" && n === "start" || d === "rtl" && n === "end" ? e ? v : R : e ? v : X, U = y && /* @__PURE__ */ a.createElement(
86
86
  "ul",
87
87
  {
88
88
  className: "k-drawer-items",
@@ -90,43 +90,47 @@ const z = 240, G = 50, J = { type: "slide", duration: 200 }, Q = { type: "slide"
90
90
  "aria-label": "drawer-list",
91
91
  "aria-expanded": s
92
92
  },
93
- p.map(
94
- (L, v) => {
95
- const U = {
96
- index: v,
97
- ...L,
98
- onSelect: x
99
- }, H = g || B;
100
- return /* @__PURE__ */ a.createElement(H, { key: v, ...U });
93
+ y.map(
94
+ (H, N) => {
95
+ const { className: S, level: m, ...B } = H, j = m != null ? m : 0, K = h(
96
+ S,
97
+ e ? "" : `k-level-${j}`
98
+ ), V = {
99
+ index: N,
100
+ className: K,
101
+ ...B,
102
+ onSelect: C
103
+ }, $ = A || z;
104
+ return /* @__PURE__ */ a.createElement($, { key: N, ...V });
101
105
  }
102
106
  )
103
- ), k = /* @__PURE__ */ a.createElement(
107
+ ), w = /* @__PURE__ */ a.createElement(
104
108
  "div",
105
109
  {
106
- style: t ? { ...X, ...m } : m,
107
- className: O,
110
+ style: t ? { ...F, ...c } : c,
111
+ className: M,
108
112
  ref: i
109
113
  },
110
114
  /* @__PURE__ */ a.createElement(
111
115
  "div",
112
116
  {
113
117
  className: "k-drawer-wrapper",
114
- style: !s && r && o === "overlay" ? { width: f } : { width: y }
118
+ style: !s && e && o === "overlay" ? { width: k } : { width: f }
115
119
  },
116
- F || b
120
+ U || E
117
121
  ),
118
- E && /* @__PURE__ */ a.createElement(q, null)
122
+ x && /* @__PURE__ */ a.createElement(Q, null)
119
123
  );
120
- return o === "overlay" ? /* @__PURE__ */ a.createElement(a.Fragment, null, s && /* @__PURE__ */ a.createElement("div", { className: "k-overlay", onClick: W }), k) : k;
124
+ return o === "overlay" ? /* @__PURE__ */ a.createElement(a.Fragment, null, s && /* @__PURE__ */ a.createElement("div", { className: "k-overlay", onClick: g }), w) : w;
121
125
  });
122
- h.propTypes = {
123
- children: n.any,
124
- className: n.string,
125
- style: n.object,
126
- item: n.any,
127
- tabIndex: n.number
126
+ T.propTypes = {
127
+ children: r.any,
128
+ className: r.string,
129
+ style: r.object,
130
+ item: r.any,
131
+ tabIndex: r.number
128
132
  };
129
- h.displayName = "KendoDrawerNavigation";
133
+ T.displayName = "KendoDrawerNavigation";
130
134
  export {
131
- h as DrawerNavigation
135
+ T as DrawerNavigation
132
136
  };
package/index.d.mts CHANGED
@@ -1112,7 +1112,7 @@ export declare interface BreadcrumbLinkHandle {
1112
1112
  /**
1113
1113
  * The current element or `null` if there is none.
1114
1114
  */
1115
- element: HTMLLIElement | null;
1115
+ element: HTMLAnchorElement | null;
1116
1116
  /**
1117
1117
  * The props values of the BreadcrumbLink.
1118
1118
  */
@@ -1903,6 +1903,11 @@ export declare interface DrawerItemProps {
1903
1903
  * Sets a custom property. Contained in the DrawerItem props that are returned from the `onSelect` Drawer event.
1904
1904
  */
1905
1905
  [customProp: string]: any;
1906
+ /**
1907
+ * This property is used in scenarios with hierarchical drawer. The rendering of the component requires each node to have a "`k-level-` + the level of nesting" className.
1908
+ * The nesting levels should be handled by the developer. The root level items have a level of 0.
1909
+ */
1910
+ level?: number;
1906
1911
  /**
1907
1912
  * @hidden
1908
1913
  */
package/index.d.ts CHANGED
@@ -1112,7 +1112,7 @@ export declare interface BreadcrumbLinkHandle {
1112
1112
  /**
1113
1113
  * The current element or `null` if there is none.
1114
1114
  */
1115
- element: HTMLLIElement | null;
1115
+ element: HTMLAnchorElement | null;
1116
1116
  /**
1117
1117
  * The props values of the BreadcrumbLink.
1118
1118
  */
@@ -1903,6 +1903,11 @@ export declare interface DrawerItemProps {
1903
1903
  * Sets a custom property. Contained in the DrawerItem props that are returned from the `onSelect` Drawer event.
1904
1904
  */
1905
1905
  [customProp: string]: any;
1906
+ /**
1907
+ * This property is used in scenarios with hierarchical drawer. The rendering of the component requires each node to have a "`k-level-` + the level of nesting" className.
1908
+ * The nesting levels should be handled by the developer. The root level items have a level of 0.
1909
+ */
1910
+ level?: number;
1906
1911
  /**
1907
1912
  * @hidden
1908
1913
  */
@@ -10,7 +10,7 @@ const e = {
10
10
  name: "@progress/kendo-react-layout",
11
11
  productName: "KendoReact",
12
12
  productCodes: ["KENDOUIREACT", "KENDOUICOMPLETE"],
13
- publishDate: 1712846563,
13
+ publishDate: 1714396966,
14
14
  version: "",
15
15
  licensingDocsUrl: "https://www.telerik.com/kendo-react-ui/components/my-license/"
16
16
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@progress/kendo-react-layout",
3
- "version": "7.4.0",
3
+ "version": "7.5.0-develop.10",
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",
@@ -23,11 +23,11 @@
23
23
  "sideEffects": false,
24
24
  "peerDependencies": {
25
25
  "@progress/kendo-licensing": "^1.3.4",
26
- "@progress/kendo-react-animation": "7.4.0",
27
- "@progress/kendo-react-common": "7.4.0",
28
- "@progress/kendo-react-intl": "7.4.0",
29
- "@progress/kendo-react-popup": "7.4.0",
30
- "@progress/kendo-react-progressbars": "7.4.0",
26
+ "@progress/kendo-react-animation": "7.5.0-develop.10",
27
+ "@progress/kendo-react-common": "7.5.0-develop.10",
28
+ "@progress/kendo-react-intl": "7.5.0-develop.10",
29
+ "@progress/kendo-react-popup": "7.5.0-develop.10",
30
+ "@progress/kendo-react-progressbars": "7.5.0-develop.10",
31
31
  "@progress/kendo-svg-icons": "^2.1.0",
32
32
  "react": "^16.8.2 || ^17.0.0 || ^18.0.0",
33
33
  "react-dom": "^16.8.2 || ^17.0.0 || ^18.0.0"
@@ -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 client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const v=require("react"),r=require("prop-types"),g=require("./PanelBarItem.js"),d=require("./util.js"),o=require("@progress/kendo-react-common"),y=require("../package-metadata.js"),l=require("./interfaces/NavigationAction.js");function x(p){const s=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(p){for(const a in p)if(a!=="default"){const e=Object.getOwnPropertyDescriptor(p,a);Object.defineProperty(s,a,e.get?e:{enumerable:!0,get:()=>p[a]})}}return s.default=p,Object.freeze(s)}const u=x(v),h=class h extends u.Component{constructor(s){super(s),this._element=null,this.showLicenseWatermark=!1,this.handleSelect=e=>{this.onSelect(e),this.onFocus(e)},this.onSelect=e=>{const n=d.flatChildren(u.Children.toArray(this.children));let i,t;switch(n.forEach(c=>{c.props.uniquePrivateKey===(e.uniquePrivateKey||this.state.focused)&&(i=c)}),this.expandMode){case"single":t=[...i.props.parentUniquePrivateKey,i.props.uniquePrivateKey],d.isArrayEqual(this.expandedItems,t)&&(i.props.parentUniquePrivateKey?t=[...i.props.parentUniquePrivateKey]:t=[]);break;case"multiple":{t=this.expandedItems.slice();const c=t.indexOf(i.props.uniquePrivateKey);c===-1?t.push(i.props.uniquePrivateKey):t.splice(c,1);break}default:t=this.expandedItems.slice();break}this.setState({selected:i.props.uniquePrivateKey,expanded:t}),this.props.onSelect&&this.props.onSelect.call(void 0,{target:i,expandedItems:t})},this.onFocus=(e,n=0)=>{const i=d.flatVisibleChildren(u.Children.toArray(this.children));let t;i.forEach((c,f)=>{if(c.props.uniquePrivateKey===(e.uniquePrivateKey||this.state.focused)){const k=f+n<0?0:f+n>i.length?i.length-1:f+n;t=i[k]}}),t&&(this.activeDescendant=t.props.id,this.setState({focused:t.props.uniquePrivateKey}))},this.onNavigate=(e,n)=>{let i;switch(n){case l.NavigationAction.Previous:i=-1,this.onFocus(e,i);break;case l.NavigationAction.Next:i=1,this.onFocus(e,i);break;case l.NavigationAction.Toggle:this.onSelect(e);break}},this.handleWrapperFocus=()=>{clearTimeout(this.nextTickId),this.state.wrapperFocused||this.setState({wrapperFocused:!0})},this.handleWrapperBlur=()=>{this.nextTick(()=>{this.setState({wrapperFocused:!1})})},this.handleKeyDown=e=>{const n=this._element&&getComputedStyle(this._element).direction==="rtl"||!1;if(e.target===e.currentTarget){const i=e.keyCode;let t;switch(i){case o.Keys.left:t=n?l.NavigationAction.Next:l.NavigationAction.Previous;break;case o.Keys.up:t=l.NavigationAction.Previous;break;case o.Keys.right:t=n?l.NavigationAction.Previous:l.NavigationAction.Next;break;case o.Keys.down:t=l.NavigationAction.Next;break;case o.Keys.space:case o.Keys.enter:t=l.NavigationAction.Toggle;break;default:t=null;break}t!==null&&(e.preventDefault(),this.onNavigate(e,t))}},o.validatePackage(y.packageMetadata),this.showLicenseWatermark=o.shouldShowValidationUI(y.packageMetadata);const a=d.getInitialState(s,this.expandMode);a.focused||(a.focused=d.getFirstId(s)),this.state=a}get expandMode(){return this.props.expandMode||"multiple"}get selectedItem(){const{selected:s=this.state.selected}=this.props;return s}get expandedItems(){return this.props.isControlled?this.props.expanded||[]:this.state.expanded}get children(){const s={...this.state,selected:this.selectedItem},a={animation:this.props.animation,keepItemsMounted:this.props.keepItemsMounted,state:s,expanded:this.expandedItems,handleSelect:this.handleSelect,children:this.props.children};return d.renderChildren(a)}render(){const s={"aria-activedescendant":this.activeDescendant},a=o.classNames("k-panelbar","k-pos-relative",this.props.className);return u.createElement("ul",{ref:e=>{this._element=e},dir:this.props.dir,role:"tree",tabIndex:0,onKeyDown:this.handleKeyDown,onFocus:this.handleWrapperFocus,onBlur:this.handleWrapperBlur,className:a,style:this.props.style,...s},this.children,this.showLicenseWatermark&&u.createElement(o.WatermarkOverlay,null))}nextTick(s){this.nextTickId=window.setTimeout(()=>s())}};h.propTypes={animation:r.bool,children:function(s,a){const e=s[a];if(e){if(Array.isArray(e)){for(const n of e)if(!n.type||n.type!==g.PanelBarItem)return new Error("PanelBar children should be either PanelBarItem or Array of PanelBarItem.")}else if(e.type!==g.PanelBarItem)return new Error("PanelBar child should be either PanelBarItem or Array of PanelBarItem.");return null}return null},dir:r.string,selected:r.string,expanded:r.arrayOf(r.string),focused:r.string,expandMode:r.oneOf(["single","multiple"]),className:r.string,keepItemsMounted:r.bool,onSelect:r.func,style:r.object},h.defaultProps={expandMode:"multiple",animation:!0,keepItemsMounted:!1};let m=h;exports.PanelBar=m;
8
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const v=require("react"),r=require("prop-types"),g=require("./PanelBarItem.js"),d=require("./util.js"),o=require("@progress/kendo-react-common"),y=require("../package-metadata.js"),l=require("./interfaces/NavigationAction.js");function x(p){const s=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(p){for(const a in p)if(a!=="default"){const e=Object.getOwnPropertyDescriptor(p,a);Object.defineProperty(s,a,e.get?e:{enumerable:!0,get:()=>p[a]})}}return s.default=p,Object.freeze(s)}const u=x(v),h=class h extends u.Component{constructor(s){super(s),this._element=null,this.showLicenseWatermark=!1,this.handleSelect=e=>{this.onSelect(e),this.onFocus(e)},this.onSelect=e=>{const n=d.flatChildren(u.Children.toArray(this.children));let i,t;switch(n.forEach(c=>{c.props.uniquePrivateKey===(e.uniquePrivateKey||this.state.focused)&&(i=c)}),this.expandMode){case"single":t=[...i.props.parentUniquePrivateKey,i.props.uniquePrivateKey],d.isArrayEqual(this.expandedItems,t)&&(i.props.parentUniquePrivateKey?t=[...i.props.parentUniquePrivateKey]:t=[]);break;case"multiple":{t=this.expandedItems.slice();const c=t.indexOf(i.props.uniquePrivateKey);c===-1?t.push(i.props.uniquePrivateKey):t.splice(c,1);break}default:t=this.expandedItems.slice();break}this.setState({selected:i.props.uniquePrivateKey,expanded:t}),this.props.onSelect&&this.props.onSelect.call(void 0,{target:i,expandedItems:t})},this.onFocus=(e,n=0)=>{const i=d.flatVisibleChildren(u.Children.toArray(this.children));let t;i.forEach((c,f)=>{if(c.props.uniquePrivateKey===(e.uniquePrivateKey||this.state.focused)){const k=f+n<0?0:f+n>i.length?i.length-1:f+n;t=i[k]}}),t&&(this.activeDescendant=t.props.id,this.setState({focused:t.props.uniquePrivateKey}))},this.onNavigate=(e,n)=>{let i;switch(n){case l.NavigationAction.Previous:i=-1,this.onFocus(e,i);break;case l.NavigationAction.Next:i=1,this.onFocus(e,i);break;case l.NavigationAction.Toggle:this.onSelect(e);break}},this.handleWrapperFocus=()=>{clearTimeout(this.nextTickId),this.state.wrapperFocused||this.setState({wrapperFocused:!0})},this.handleWrapperBlur=()=>{this.nextTick(()=>{this.setState({wrapperFocused:!1})})},this.handleKeyDown=e=>{const n=this._element&&getComputedStyle(this._element).direction==="rtl"||!1;if(e.target===e.currentTarget){const i=e.keyCode;let t;switch(i){case o.Keys.left:t=n?l.NavigationAction.Next:l.NavigationAction.Previous;break;case o.Keys.up:t=l.NavigationAction.Previous;break;case o.Keys.right:t=n?l.NavigationAction.Previous:l.NavigationAction.Next;break;case o.Keys.down:t=l.NavigationAction.Next;break;case o.Keys.space:case o.Keys.enter:t=l.NavigationAction.Toggle;break;default:t=null;break}t!==null&&(e.preventDefault(),this.onNavigate(e,t))}},o.validatePackage(y.packageMetadata),this.showLicenseWatermark=o.shouldShowValidationUI(y.packageMetadata);const a=d.getInitialState(s,this.expandMode);a.focused||(a.focused=d.getFirstId(s)),this.state=a}get expandMode(){return this.props.expandMode||"multiple"}get selectedItem(){const{selected:s=this.state.selected}=this.props;return s}get expandedItems(){return this.props.isControlled?this.props.expanded||[]:this.state.expanded}get children(){const s={...this.state,selected:this.selectedItem},a={animation:this.props.animation,keepItemsMounted:this.props.keepItemsMounted,state:s,expanded:this.expandedItems,handleSelect:this.handleSelect,children:this.props.children};return d.renderChildren(a)}render(){const s={"aria-activedescendant":this.activeDescendant},a=o.classNames("k-panelbar",this.props.className);return u.createElement("ul",{ref:e=>{this._element=e},dir:this.props.dir,role:"tree",tabIndex:0,onKeyDown:this.handleKeyDown,onFocus:this.handleWrapperFocus,onBlur:this.handleWrapperBlur,className:a,style:this.props.style,...s},this.children,this.showLicenseWatermark&&u.createElement(o.WatermarkOverlay,null))}nextTick(s){this.nextTickId=window.setTimeout(()=>s())}};h.propTypes={animation:r.bool,children:function(s,a){const e=s[a];if(e){if(Array.isArray(e)){for(const n of e)if(!n.type||n.type!==g.PanelBarItem)return new Error("PanelBar children should be either PanelBarItem or Array of PanelBarItem.")}else if(e.type!==g.PanelBarItem)return new Error("PanelBar child should be either PanelBarItem or Array of PanelBarItem.");return null}return null},dir:r.string,selected:r.string,expanded:r.arrayOf(r.string),focused:r.string,expandMode:r.oneOf(["single","multiple"]),className:r.string,keepItemsMounted:r.bool,onSelect:r.func,style:r.object},h.defaultProps={expandMode:"multiple",animation:!0,keepItemsMounted:!1};let m=h;exports.PanelBar=m;
@@ -9,8 +9,8 @@
9
9
  import * as p from "react";
10
10
  import a from "prop-types";
11
11
  import { PanelBarItem as u } from "./PanelBarItem.mjs";
12
- import { flatChildren as x, isArrayEqual as k, flatVisibleChildren as g, getInitialState as P, getFirstId as I, renderChildren as v } from "./util.mjs";
13
- import { Keys as d, validatePackage as b, shouldShowValidationUI as w, classNames as S, WatermarkOverlay as K } from "@progress/kendo-react-common";
12
+ import { flatChildren as x, isArrayEqual as g, flatVisibleChildren as k, getInitialState as P, getFirstId as I, renderChildren as b } from "./util.mjs";
13
+ import { Keys as d, validatePackage as v, shouldShowValidationUI as w, classNames as S, WatermarkOverlay as K } from "@progress/kendo-react-common";
14
14
  import { packageMetadata as m } from "../package-metadata.mjs";
15
15
  import { NavigationAction as n } from "./interfaces/NavigationAction.mjs";
16
16
  const c = class c extends p.Component {
@@ -24,7 +24,7 @@ const c = class c extends p.Component {
24
24
  l.props.uniquePrivateKey === (t.uniquePrivateKey || this.state.focused) && (s = l);
25
25
  }), this.expandMode) {
26
26
  case "single":
27
- e = [...s.props.parentUniquePrivateKey, s.props.uniquePrivateKey], k(this.expandedItems, e) && (s.props.parentUniquePrivateKey ? e = [...s.props.parentUniquePrivateKey] : e = []);
27
+ e = [...s.props.parentUniquePrivateKey, s.props.uniquePrivateKey], g(this.expandedItems, e) && (s.props.parentUniquePrivateKey ? e = [...s.props.parentUniquePrivateKey] : e = []);
28
28
  break;
29
29
  case "multiple": {
30
30
  e = this.expandedItems.slice();
@@ -41,7 +41,7 @@ const c = class c extends p.Component {
41
41
  expandedItems: e
42
42
  });
43
43
  }, this.onFocus = (t, r = 0) => {
44
- const s = g(p.Children.toArray(this.children));
44
+ const s = k(p.Children.toArray(this.children));
45
45
  let e;
46
46
  s.forEach((l, h) => {
47
47
  if (l.props.uniquePrivateKey === (t.uniquePrivateKey || this.state.focused)) {
@@ -96,7 +96,7 @@ const c = class c extends p.Component {
96
96
  }
97
97
  e !== null && (t.preventDefault(), this.onNavigate(t, e));
98
98
  }
99
- }, b(m), this.showLicenseWatermark = w(m);
99
+ }, v(m), this.showLicenseWatermark = w(m);
100
100
  const o = P(i, this.expandMode);
101
101
  o.focused || (o.focused = I(i)), this.state = o;
102
102
  }
@@ -119,7 +119,7 @@ const c = class c extends p.Component {
119
119
  handleSelect: this.handleSelect,
120
120
  children: this.props.children
121
121
  };
122
- return v(o);
122
+ return b(o);
123
123
  }
124
124
  /**
125
125
  * @hidden
@@ -129,7 +129,6 @@ const c = class c extends p.Component {
129
129
  "aria-activedescendant": this.activeDescendant
130
130
  }, o = S(
131
131
  "k-panelbar",
132
- "k-pos-relative",
133
132
  this.props.className
134
133
  );
135
134
  return /* @__PURE__ */ p.createElement(
@@ -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 client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const w=require("react"),t=require("prop-types"),c=require("@progress/kendo-react-common"),f=require("@progress/kendo-svg-icons"),C=require("@progress/kendo-react-animation");function P(i){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(i){for(const e in i)if(e!=="default"){const o=Object.getOwnPropertyDescriptor(i,e);Object.defineProperty(n,e,o.get?o:{enumerable:!0,get:()=>i[e]})}}return n.default=i,Object.freeze(n)}const a=P(w);function T({imageUrl:i,icon:n,svgIcon:e,iconClass:o}){return i?a.createElement("img",{role:"presentation",className:"k-panelbar-item-icon k-image",src:i}):n||e?a.createElement(c.IconWrap,{className:"k-panelbar-item-icon",name:n,icon:e}):o?a.createElement("span",{role:"presentation",className:"k-panelbar-item-icon "+o}):null}const p=class p extends a.PureComponent{constructor(n){super(n),this.handleItemClick=()=>{const{onSelect:e,disabled:o,id:d}=this.props;e&&!o&&e.call(void 0,{uniquePrivateKey:this.props.uniquePrivateKey,id:d,target:this})},this.childFactory=e=>this.props.keepItemsMounted?a.cloneElement(e,{...e.props,in:this.props.expanded}):e,this.state={show:n.expanded||!1}}render(){const{id:n,children:e,title:o,uniquePrivateKey:d,disabled:s,selected:m,focused:g,expanded:r,className:y,level:h,headerClassName:v,animation:b,keepItemsMounted:l}=this.props,N={role:"treeitem","aria-disabled":s,"aria-hidden":!s&&!r,"aria-selected":!s&&m,"aria-expanded":!s&&r&&!!e},E=c.classNames("k-panelbar-item",{"k-panelbar-header":h===0,"k-expanded":r&&!!e,"k-disabled":s},`k-level-${h}`,y),x=c.classNames("k-link",{"k-selected":!s&&m,"k-focus":!s&&g},v),I={display:"block"},S=T(this.props),O=!s&&e?a.createElement(c.IconWrap,{name:r?"chevron-up":"chevron-down",icon:r?f.chevronUpIcon:f.chevronDownIcon,className:c.classNames("k-panelbar-toggle",r?"k-panelbar-collapse":"k-panelbar-expand")}):null,k=!s&&r||l?a.createElement("ul",{role:"group","aria-expanded":r,"aria-hidden":!r,className:"k-panelbar-group k-panel k-group",style:{display:l?this.state.show?"block":"none":"block"}},e):null,q=(b===void 0||b)&&!s&&e?a.createElement(C.Reveal,{transitionEnterDuration:200,transitionExitDuration:200,key:d+"_animation",style:I,children:k,childFactory:l&&this.childFactory,unmountOnExit:!l,onBeforeEnter:()=>l&&this.setState({show:!0}),onAfterExited:()=>l&&this.setState({show:!1})}):k;return a.createElement("li",{id:n,className:E,...N},a.createElement("span",{className:x,onClick:this.handleItemClick},S,a.createElement("span",{className:"k-panelbar-item-text"},o),O),q)}};p.propTypes={animation:t.bool,children:t.any,className:t.string,icon:t.string,iconClass:t.string,imageUrl:t.string,svgIcon:c.svgIconPropType,expanded:t.bool,disabled:t.bool,onSelect:t.func,selected:t.bool,level:t.number,title:t.oneOfType([t.string,t.element]),id:t.oneOfType([t.string,t.number]),focused:t.bool,keepItemsMounted:t.bool},p.defaultProps={title:"Untitled"};let u=p;exports.PanelBarItem=u;
8
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const P=require("react"),t=require("prop-types"),c=require("@progress/kendo-react-common"),y=require("@progress/kendo-svg-icons"),T=require("@progress/kendo-react-animation");function A(i){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(i){for(const e in i)if(e!=="default"){const r=Object.getOwnPropertyDescriptor(i,e);Object.defineProperty(n,e,r.get?r:{enumerable:!0,get:()=>i[e]})}}return n.default=i,Object.freeze(n)}const a=A(P);function j({imageUrl:i,icon:n,svgIcon:e,iconClass:r}){return i?a.createElement("img",{role:"presentation",className:"k-panelbar-item-icon k-image",src:i}):n||e?a.createElement(c.IconWrap,{className:"k-panelbar-item-icon",name:n,icon:e}):r?a.createElement("span",{role:"presentation",className:"k-panelbar-item-icon "+r}):null}const d=class d extends a.PureComponent{constructor(n){super(n),this.handleItemClick=()=>{const{onSelect:e,disabled:r,id:p}=this.props;e&&!r&&e.call(void 0,{uniquePrivateKey:this.props.uniquePrivateKey,id:p,target:this})},this.childFactory=e=>this.props.keepItemsMounted?a.cloneElement(e,{...e.props,in:this.props.expanded}):e,this.state={show:n.expanded||!1}}render(){const{id:n,children:e,title:r,uniquePrivateKey:p,disabled:s,selected:m,focused:g,expanded:o,className:v,level:h,headerClassName:N,animation:b,keepItemsMounted:l}=this.props,E={role:"treeitem","aria-disabled":s,"aria-hidden":!s&&!o,"aria-selected":!s&&m,"aria-expanded":!s&&o&&!!e},x=c.classNames("k-panelbar-item",{"k-panelbar-header":h===0,"k-expanded":o&&!!e,"k-disabled":s},`k-level-${h}`,v),I=c.classNames("k-link",{"k-selected":!s&&m,"k-focus":!s&&g},N),S={display:"block"},C=j(this.props),O=!s&&e?a.createElement(c.IconWrap,{name:o?"chevron-up":"chevron-down",icon:o?y.chevronUpIcon:y.chevronDownIcon,className:c.classNames("k-panelbar-toggle",o?"k-panelbar-collapse":"k-panelbar-expand")}):null;let k=!1;e&&Array.isArray(e)&&(k=e[0].type===d);const q=k?a.createElement("ul",{role:"group","aria-expanded":o,"aria-hidden":!o,className:"k-panelbar-group",style:{display:l?this.state.show?"block":"none":"block"}},e):e,f=!s&&o||l?q:null,w=(b===void 0||b)&&!s&&e?a.createElement(T.Reveal,{transitionEnterDuration:200,transitionExitDuration:200,key:p+"_animation",style:S,children:f,childFactory:l&&this.childFactory,unmountOnExit:!l,onBeforeEnter:()=>l&&this.setState({show:!0}),onAfterExited:()=>l&&this.setState({show:!1})}):f;return a.createElement("li",{id:n,className:x,...E},a.createElement("span",{className:I,onClick:this.handleItemClick},C,a.createElement("span",{className:"k-panelbar-item-text"},r),O),w)}};d.propTypes={animation:t.bool,children:t.any,className:t.string,icon:t.string,iconClass:t.string,imageUrl:t.string,svgIcon:c.svgIconPropType,expanded:t.bool,disabled:t.bool,onSelect:t.func,selected:t.bool,level:t.number,title:t.oneOfType([t.string,t.element]),id:t.oneOfType([t.string,t.number]),focused:t.bool,keepItemsMounted:t.bool},d.defaultProps={title:"Untitled"};let u=d;exports.PanelBarItem=u;