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

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/index.d.mts CHANGED
@@ -517,12 +517,20 @@ export declare interface AppBarSpacerProps {
517
517
  * Specifies the theme color of the AppBar ([see example]({% slug appearance_appbar %})).
518
518
  *
519
519
  * * The possible values are:
520
- * * `inherit`
521
520
  * * `light` (Default)
522
- * * `dark`
521
+ * * 'primary'
522
+ * * 'secondary'
523
+ * * 'tertiary'
524
+ * * 'info'
525
+ * * 'success'
526
+ * * 'warning'
527
+ * * 'error'
528
+ * * 'dark'
529
+ * * 'inherit'
530
+ * * 'inverse'
523
531
  *
524
532
  */
525
- export declare type AppBarThemeColor = 'light' | 'dark' | 'inherit';
533
+ export declare type AppBarThemeColor = 'base' | 'primary' | 'secondary' | 'tertiary' | 'info' | 'success' | 'warning' | 'error' | 'dark' | 'light' | 'inherit' | 'inverse';
526
534
 
527
535
  export declare const Avatar: React_2.FunctionComponent<AvatarProps>;
528
536
 
@@ -1104,7 +1112,7 @@ export declare interface BreadcrumbLinkHandle {
1104
1112
  /**
1105
1113
  * The current element or `null` if there is none.
1106
1114
  */
1107
- element: HTMLLIElement | null;
1115
+ element: HTMLAnchorElement | null;
1108
1116
  /**
1109
1117
  * The props values of the BreadcrumbLink.
1110
1118
  */
@@ -2445,7 +2453,7 @@ export declare const isArrayEqual: (firstArray: any[], secondArray: any[]) => bo
2445
2453
  /**
2446
2454
  * @hidden
2447
2455
  */
2448
- export declare const isPresent: Function;
2456
+ export declare const isPresent: (value: any) => boolean;
2449
2457
 
2450
2458
  /**
2451
2459
  * @hidden
@@ -3040,15 +3048,15 @@ export declare interface PanelBarProps {
3040
3048
  */
3041
3049
  dir?: string;
3042
3050
  /**
3043
- * If set, overrides the currently selected property in the PanelBar state.
3051
+ * If set, overrides the currently selected property in the PanelBar state. Takes the `id` of the item.
3044
3052
  */
3045
3053
  selected?: string;
3046
3054
  /**
3047
- * Sets the initial expanded state of the PanelBar.
3055
+ * Sets the initial expanded state of the PanelBar. Takes the `id` of the item.
3048
3056
  */
3049
3057
  expanded?: string[];
3050
3058
  /**
3051
- * Sets the initial focused state of the PanelBar.
3059
+ * Sets the initial focused state of the PanelBar. Takes the `id` of the item.
3052
3060
  */
3053
3061
  focused?: string;
3054
3062
  /**
@@ -3105,7 +3113,7 @@ export declare namespace PanelBarUtils {
3105
3113
  * @param items - A collection of PanelBarItemProps.
3106
3114
  * @return {PanelBarItem[]} Returns an array of PanelBarItem components.
3107
3115
  */
3108
- export function mapItemsToComponents(items: Array<PanelBarItemProps>): PanelBarItem[];
3116
+ export function mapItemsToComponents(items: Array<PanelBarItemProps>): React_2.ReactNode[];
3109
3117
  }
3110
3118
 
3111
3119
  /**
package/index.d.ts CHANGED
@@ -517,12 +517,20 @@ export declare interface AppBarSpacerProps {
517
517
  * Specifies the theme color of the AppBar ([see example]({% slug appearance_appbar %})).
518
518
  *
519
519
  * * The possible values are:
520
- * * `inherit`
521
520
  * * `light` (Default)
522
- * * `dark`
521
+ * * 'primary'
522
+ * * 'secondary'
523
+ * * 'tertiary'
524
+ * * 'info'
525
+ * * 'success'
526
+ * * 'warning'
527
+ * * 'error'
528
+ * * 'dark'
529
+ * * 'inherit'
530
+ * * 'inverse'
523
531
  *
524
532
  */
525
- export declare type AppBarThemeColor = 'light' | 'dark' | 'inherit';
533
+ export declare type AppBarThemeColor = 'base' | 'primary' | 'secondary' | 'tertiary' | 'info' | 'success' | 'warning' | 'error' | 'dark' | 'light' | 'inherit' | 'inverse';
526
534
 
527
535
  export declare const Avatar: React_2.FunctionComponent<AvatarProps>;
528
536
 
@@ -1104,7 +1112,7 @@ export declare interface BreadcrumbLinkHandle {
1104
1112
  /**
1105
1113
  * The current element or `null` if there is none.
1106
1114
  */
1107
- element: HTMLLIElement | null;
1115
+ element: HTMLAnchorElement | null;
1108
1116
  /**
1109
1117
  * The props values of the BreadcrumbLink.
1110
1118
  */
@@ -2445,7 +2453,7 @@ export declare const isArrayEqual: (firstArray: any[], secondArray: any[]) => bo
2445
2453
  /**
2446
2454
  * @hidden
2447
2455
  */
2448
- export declare const isPresent: Function;
2456
+ export declare const isPresent: (value: any) => boolean;
2449
2457
 
2450
2458
  /**
2451
2459
  * @hidden
@@ -3040,15 +3048,15 @@ export declare interface PanelBarProps {
3040
3048
  */
3041
3049
  dir?: string;
3042
3050
  /**
3043
- * If set, overrides the currently selected property in the PanelBar state.
3051
+ * If set, overrides the currently selected property in the PanelBar state. Takes the `id` of the item.
3044
3052
  */
3045
3053
  selected?: string;
3046
3054
  /**
3047
- * Sets the initial expanded state of the PanelBar.
3055
+ * Sets the initial expanded state of the PanelBar. Takes the `id` of the item.
3048
3056
  */
3049
3057
  expanded?: string[];
3050
3058
  /**
3051
- * Sets the initial focused state of the PanelBar.
3059
+ * Sets the initial focused state of the PanelBar. Takes the `id` of the item.
3052
3060
  */
3053
3061
  focused?: string;
3054
3062
  /**
@@ -3105,7 +3113,7 @@ export declare namespace PanelBarUtils {
3105
3113
  * @param items - A collection of PanelBarItemProps.
3106
3114
  * @return {PanelBarItem[]} Returns an array of PanelBarItem components.
3107
3115
  */
3108
- export function mapItemsToComponents(items: Array<PanelBarItemProps>): PanelBarItem[];
3116
+ export function mapItemsToComponents(items: Array<PanelBarItemProps>): React_2.ReactNode[];
3109
3117
  }
3110
3118
 
3111
3119
  /**
@@ -10,7 +10,7 @@ const e = {
10
10
  name: "@progress/kendo-react-layout",
11
11
  productName: "KendoReact",
12
12
  productCodes: ["KENDOUIREACT", "KENDOUICOMPLETE"],
13
- publishDate: 1711533057,
13
+ publishDate: 1712850582,
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-develop.9",
3
+ "version": "7.5.0-develop.1",
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-develop.9",
27
- "@progress/kendo-react-common": "7.4.0-develop.9",
28
- "@progress/kendo-react-intl": "7.4.0-develop.9",
29
- "@progress/kendo-react-popup": "7.4.0-develop.9",
30
- "@progress/kendo-react-progressbars": "7.4.0-develop.9",
26
+ "@progress/kendo-react-animation": "7.5.0-develop.1",
27
+ "@progress/kendo-react-common": "7.5.0-develop.1",
28
+ "@progress/kendo-react-intl": "7.5.0-develop.1",
29
+ "@progress/kendo-react-popup": "7.5.0-develop.1",
30
+ "@progress/kendo-react-progressbars": "7.5.0-develop.1",
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"),n=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 a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(p){for(const s in p)if(s!=="default"){const e=Object.getOwnPropertyDescriptor(p,s);Object.defineProperty(a,s,e.get?e:{enumerable:!0,get:()=>p[s]})}}return a.default=p,Object.freeze(a)}const u=x(v),h=class h extends u.Component{constructor(a){super(a),this._element=null,this.showLicenseWatermark=!1,this.handleSelect=e=>{this.onSelect(e),this.onFocus(e)},this.onSelect=e=>{const r=d.flatChildren(u.Children.toArray(this.children));let i,t;switch(r.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();let 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,r=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)){let k=f+r<0?0:f+r>i.length?i.length-1:f+r;t=i[k]}}),t&&(this.activeDescendant=t.props.id,this.setState({focused:t.props.uniquePrivateKey}))},this.onNavigate=(e,r)=>{let i;switch(r){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 r=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=r?l.NavigationAction.Next:l.NavigationAction.Previous;break;case o.Keys.up:t=l.NavigationAction.Previous;break;case o.Keys.right:t=r?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 s=d.getInitialState(a,this.expandMode);s.focused||(s.focused=d.getFirstId(a)),this.state=s}get expandMode(){return this.props.expandMode||"multiple"}get selectedItem(){const{selected:a=this.state.selected}=this.props;return a}get expandedItems(){return this.props.isControlled?this.props.expanded||[]:this.state.expanded}get children(){const a={...this.state,selected:this.selectedItem},s={animation:this.props.animation,keepItemsMounted:this.props.keepItemsMounted,state:a,expanded:this.expandedItems,handleSelect:this.handleSelect,children:this.props.children};return d.renderChildren(s)}render(){const a={"aria-activedescendant":this.activeDescendant},s=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:s,style:this.props.style,...a},this.children,this.showLicenseWatermark&&u.createElement(o.WatermarkOverlay,null))}nextTick(a){this.nextTickId=window.setTimeout(()=>a())}};h.propTypes={animation:n.bool,children:function(a,s){const e=a[s];if(e){if(Array.isArray(e)){for(let r of e)if(!r.type||r.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:n.string,selected:n.string,expanded:n.arrayOf(n.string),focused:n.string,expandMode:n.oneOf(["single","multiple"]),className:n.string,keepItemsMounted:n.bool,onSelect:n.func,style:n.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,11 +24,11 @@ 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();
31
- let l = e.indexOf(s.props.uniquePrivateKey);
31
+ const l = e.indexOf(s.props.uniquePrivateKey);
32
32
  l === -1 ? e.push(s.props.uniquePrivateKey) : e.splice(l, 1);
33
33
  break;
34
34
  }
@@ -41,11 +41,11 @@ 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)) {
48
- let y = h + r < 0 ? 0 : h + r > s.length ? s.length - 1 : h + r;
48
+ const y = h + r < 0 ? 0 : h + r > s.length ? s.length - 1 : h + r;
49
49
  e = s[y];
50
50
  }
51
51
  }), e && (this.activeDescendant = e.props.id, this.setState({ focused: e.props.uniquePrivateKey }));
@@ -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(
@@ -162,7 +161,7 @@ c.propTypes = {
162
161
  const t = i[o];
163
162
  if (t) {
164
163
  if (Array.isArray(t)) {
165
- for (let r of t)
164
+ for (const r of t)
166
165
  if (!r.type || r.type !== u)
167
166
  return new Error(
168
167
  "PanelBar children should be either PanelBarItem or Array of PanelBarItem."
@@ -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;
@@ -7,27 +7,27 @@
7
7
  */
8
8
  "use client";
9
9
  import * as n from "react";
10
- import e from "prop-types";
11
- import { svgIconPropType as T, classNames as p, IconWrap as f } from "@progress/kendo-react-common";
12
- import { chevronUpIcon as P, chevronDownIcon as q } from "@progress/kendo-svg-icons";
13
- import { Reveal as A } from "@progress/kendo-react-animation";
14
- function D({ imageUrl: d, icon: o, svgIcon: t, iconClass: r }) {
15
- return d ? /* @__PURE__ */ n.createElement("img", { role: "presentation", className: "k-panelbar-item-icon k-image", src: d }) : o || t ? /* @__PURE__ */ n.createElement(f, { className: "k-panelbar-item-icon", name: o, icon: t }) : r ? /* @__PURE__ */ n.createElement("span", { role: "presentation", className: "k-panelbar-item-icon " + r }) : null;
10
+ import t from "prop-types";
11
+ import { svgIconPropType as P, classNames as p, IconWrap as y } from "@progress/kendo-react-common";
12
+ import { chevronUpIcon as q, chevronDownIcon as D } from "@progress/kendo-svg-icons";
13
+ import { Reveal as F } from "@progress/kendo-react-animation";
14
+ function K({ imageUrl: d, icon: r, svgIcon: e, iconClass: o }) {
15
+ return d ? /* @__PURE__ */ n.createElement("img", { role: "presentation", className: "k-panelbar-item-icon k-image", src: d }) : r || e ? /* @__PURE__ */ n.createElement(y, { className: "k-panelbar-item-icon", name: r, icon: e }) : o ? /* @__PURE__ */ n.createElement("span", { role: "presentation", className: "k-panelbar-item-icon " + o }) : null;
16
16
  }
17
17
  const l = class l extends n.PureComponent {
18
- constructor(o) {
19
- super(o), this.handleItemClick = () => {
20
- const { onSelect: t, disabled: r, id: c } = this.props;
21
- t && !r && t.call(void 0, {
18
+ constructor(r) {
19
+ super(r), this.handleItemClick = () => {
20
+ const { onSelect: e, disabled: o, id: c } = this.props;
21
+ e && !o && e.call(void 0, {
22
22
  uniquePrivateKey: this.props.uniquePrivateKey,
23
23
  id: c,
24
24
  target: this
25
25
  });
26
- }, this.childFactory = (t) => this.props.keepItemsMounted ? n.cloneElement(t, {
27
- ...t.props,
26
+ }, this.childFactory = (e) => this.props.keepItemsMounted ? n.cloneElement(e, {
27
+ ...e.props,
28
28
  in: this.props.expanded
29
- }) : t, this.state = {
30
- show: o.expanded || !1
29
+ }) : e, this.state = {
30
+ show: r.expanded || !1
31
31
  };
32
32
  }
33
33
  /**
@@ -35,114 +35,117 @@ const l = class l extends n.PureComponent {
35
35
  */
36
36
  render() {
37
37
  const {
38
- id: o,
39
- children: t,
40
- title: r,
38
+ id: r,
39
+ children: e,
40
+ title: o,
41
41
  uniquePrivateKey: c,
42
42
  disabled: a,
43
43
  selected: m,
44
- focused: y,
44
+ focused: E,
45
45
  expanded: s,
46
- className: E,
46
+ className: g,
47
47
  level: u,
48
- headerClassName: g,
48
+ headerClassName: v,
49
49
  animation: h,
50
50
  keepItemsMounted: i
51
- } = this.props, v = {
51
+ } = this.props, x = {
52
52
  role: "treeitem",
53
53
  "aria-disabled": a,
54
54
  "aria-hidden": !a && !s,
55
55
  "aria-selected": !a && m,
56
- "aria-expanded": !a && s && !!t
57
- }, x = p(
56
+ "aria-expanded": !a && s && !!e
57
+ }, N = p(
58
58
  "k-panelbar-item",
59
59
  {
60
60
  "k-panelbar-header": u === 0,
61
- "k-expanded": s && !!t,
61
+ "k-expanded": s && !!e,
62
62
  "k-disabled": a
63
63
  },
64
64
  `k-level-${u}`,
65
- E
66
- ), N = p(
65
+ g
66
+ ), C = p(
67
67
  "k-link",
68
68
  {
69
69
  "k-selected": !a && m,
70
- "k-focus": !a && y
70
+ "k-focus": !a && E
71
71
  },
72
- g
73
- ), I = { display: "block" }, w = D(this.props), C = !a && t ? /* @__PURE__ */ n.createElement(
74
- f,
72
+ v
73
+ ), I = { display: "block" }, w = K(this.props), A = !a && e ? /* @__PURE__ */ n.createElement(
74
+ y,
75
75
  {
76
76
  name: s ? "chevron-up" : "chevron-down",
77
- icon: s ? P : q,
77
+ icon: s ? q : D,
78
78
  className: p(
79
79
  "k-panelbar-toggle",
80
80
  s ? "k-panelbar-collapse" : "k-panelbar-expand"
81
81
  )
82
82
  }
83
- ) : null, k = !a && s || i ? /* @__PURE__ */ n.createElement(
83
+ ) : null;
84
+ let k = !1;
85
+ e && Array.isArray(e) && (k = e[0].type === l);
86
+ const S = k ? /* @__PURE__ */ n.createElement(
84
87
  "ul",
85
88
  {
86
89
  role: "group",
87
90
  "aria-expanded": s,
88
91
  "aria-hidden": !s,
89
- className: "k-panelbar-group k-panel k-group",
92
+ className: "k-panelbar-group",
90
93
  style: { display: i ? this.state.show ? "block" : "none" : "block" }
91
94
  },
92
- t
93
- ) : null, S = (h === void 0 || h) && !a && t ? /* @__PURE__ */ n.createElement(
94
- A,
95
+ e
96
+ ) : e, b = !a && s || i ? S : null, T = (h === void 0 || h) && !a && e ? /* @__PURE__ */ n.createElement(
97
+ F,
95
98
  {
96
99
  transitionEnterDuration: 200,
97
100
  transitionExitDuration: 200,
98
101
  key: c + "_animation",
99
102
  style: I,
100
- children: k,
103
+ children: b,
101
104
  childFactory: i && this.childFactory,
102
105
  unmountOnExit: !i,
103
106
  onBeforeEnter: () => i && this.setState({ show: !0 }),
104
107
  onAfterExited: () => i && this.setState({ show: !1 })
105
108
  }
106
- ) : k;
109
+ ) : b;
107
110
  return /* @__PURE__ */ n.createElement(
108
111
  "li",
109
112
  {
110
- id: o,
111
- className: x,
112
- ...v
113
+ id: r,
114
+ className: N,
115
+ ...x
113
116
  },
114
- /* @__PURE__ */ n.createElement("span", { className: N, onClick: this.handleItemClick }, w, /* @__PURE__ */ n.createElement("span", { className: "k-panelbar-item-text" }, r), C),
115
- S
117
+ /* @__PURE__ */ n.createElement("span", { className: C, onClick: this.handleItemClick }, w, /* @__PURE__ */ n.createElement("span", { className: "k-panelbar-item-text" }, o), A),
118
+ T
116
119
  );
117
120
  }
118
121
  };
119
122
  l.propTypes = {
120
- animation: e.bool,
121
- children: e.any,
122
- className: e.string,
123
- icon: e.string,
124
- iconClass: e.string,
125
- imageUrl: e.string,
126
- svgIcon: T,
127
- expanded: e.bool,
128
- disabled: e.bool,
129
- onSelect: e.func,
130
- selected: e.bool,
131
- level: e.number,
132
- title: e.oneOfType([
133
- e.string,
134
- e.element
123
+ animation: t.bool,
124
+ children: t.any,
125
+ className: t.string,
126
+ icon: t.string,
127
+ iconClass: t.string,
128
+ imageUrl: t.string,
129
+ svgIcon: P,
130
+ expanded: t.bool,
131
+ disabled: t.bool,
132
+ onSelect: t.func,
133
+ selected: t.bool,
134
+ level: t.number,
135
+ title: t.oneOfType([
136
+ t.string,
137
+ t.element
135
138
  ]),
136
- id: e.oneOfType([
137
- e.string,
138
- e.number
139
+ id: t.oneOfType([
140
+ t.string,
141
+ t.number
139
142
  ]),
140
- focused: e.bool,
141
- keepItemsMounted: e.bool
143
+ focused: t.bool,
144
+ keepItemsMounted: t.bool
142
145
  }, l.defaultProps = {
143
146
  title: "Untitled"
144
147
  };
145
- let b = l;
148
+ let f = l;
146
149
  export {
147
- b as PanelBarItem
150
+ f as PanelBarItem
148
151
  };
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 client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x=require("react"),d=require("./PanelBarItem.js");function O(n){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const e in n)if(e!=="default"){const t=Object.getOwnPropertyDescriptor(n,e);Object.defineProperty(r,e,t.get?t:{enumerable:!0,get:()=>n[e]})}}return r.default=n,Object.freeze(r)}const a=O(x),m=({animation:n=!0,keepItemsMounted:r=!1,state:e,expanded:t,handleSelect:i,children:p,parentExpanded:u=!0,level:o=0,parentPrivateKey:l=[]})=>a.Children.map(p,(s,E)=>{if(s&&s.type===d.PanelBarItem){let g,f=c(s,l,E);if(s.props.children){const P={animation:n,keepItemsMounted:r,state:e,expanded:t,handleSelect:i,children:s.props.children,parentExpanded:(t||[]).indexOf(f)>-1,level:o+1,parentPrivateKey:[...l,f]};g=m(P)}return a.cloneElement(s,{...s.props,animation:s.props.animation!==void 0?s.props.animation:n,keepItemsMounted:r,id:s.props.id||`k-panelbar-item-default-${f}`,uniquePrivateKey:f,parentUniquePrivateKey:l,parentExpanded:u,level:o,expanded:(t||[]).indexOf(f)>-1,focused:e.focused===f&&e.wrapperFocused,selected:e.selected===f,children:g,onSelect:i})}else return a.createElement("div",{className:"k-panelbar-content k-content"},s)}),B=n=>{const r=a.Children.toArray(n.children)[0];return r?c(r,[],0):""},b=(n,r,e={expanded:n.expanded||[],selected:n.selected||"",focused:n.focused||"",wrapperFocused:!1},t=!0,i=[])=>(a.Children.map(n.children,(p,u)=>{if(p&&p.type===d.PanelBarItem){let o=c(p,i,u);!p.props.disabled&&t&&(p.props.selected&&(e.selected=o),p.props.focused&&(e.focused=o),p.props.expanded&&(r==="multiple"?e.expanded.push(o):r==="single"&&(e.expanded=[o])),p.props.children&&(e=b(p.props,r,e,!!p.props.expanded,[...i,o])))}}),e),c=(n,r,e)=>n&&n.props&&n.props.id?n.props.id:r.length?r[r.length-1]+`.${e}`:`.${e}`;function I(n,r=[]){return(n||[]).forEach(e=>{e.disabled||(r.push(e),e.expanded&&e.children&&I(e.children,r))}),r}function y(n,r=[]){return a.Children.forEach(n,e=>{e&&e.props&&!e.props.disabled&&(r.push(e),e.props.children&&y(e.props.children,r))}),r}function C(n,r=[]){return a.Children.forEach(n,e=>{e&&e.props&&!e.props.disabled&&(e.props.expanded||e.props.parentExpanded)&&(r.push(e),e.props.children&&C(e.props.children,r))}),r}const S=n=>n!=null;exports.PanelBarUtils=void 0;(n=>{function r(e){return e.map((t,i)=>{let p;return t.content&&(p=t.content),t.children&&(p=r(t.children)),a.createElement(d.PanelBarItem,{...t,children:p,key:t.id||i})})}n.mapItemsToComponents=r})(exports.PanelBarUtils||(exports.PanelBarUtils={}));const q=(n,r)=>n.length!==r.length?!1:n.every((e,t)=>e===r[t]);exports.flatChildren=y;exports.flatVisibleChildren=C;exports.flatVisibleItems=I;exports.getFirstId=B;exports.getInitialState=b;exports.isArrayEqual=q;exports.isPresent=S;exports.renderChildren=m;
8
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const O=require("react"),l=require("./PanelBarItem.js");function S(n){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const e in n)if(e!=="default"){const t=Object.getOwnPropertyDescriptor(n,e);Object.defineProperty(r,e,t.get?t:{enumerable:!0,get:()=>n[e]})}}return r.default=n,Object.freeze(r)}const p=S(O),j=n=>typeof n!="object"||!("type"in n)||n.type!==l.PanelBarItem,m=({animation:n=!0,keepItemsMounted:r=!1,state:e,expanded:t,handleSelect:i,children:o,parentExpanded:u=!0,level:a=0,parentPrivateKey:d=[]})=>{const b=p.Children.toArray(o).filter(j),E=b.length?b:o;return p.Children.map(E,(s,x)=>{if(s&&s.type===l.PanelBarItem){let g;const f=c(s,d,x);if(s.props.children){const B={animation:n,keepItemsMounted:r,state:e,expanded:t,handleSelect:i,children:s.props.children,parentExpanded:(t||[]).indexOf(f)>-1,level:a+1,parentPrivateKey:[...d,f]};g=m(B)}return p.cloneElement(s,{...s.props,animation:s.props.animation!==void 0?s.props.animation:n,keepItemsMounted:r,id:s.props.id||`k-panelbar-item-default-${f}`,uniquePrivateKey:f,parentUniquePrivateKey:d,parentExpanded:u,level:a,expanded:(t||[]).indexOf(f)>-1,focused:e.focused===f&&e.wrapperFocused,selected:e.selected===f,children:g,onSelect:i})}else return p.createElement("div",{className:"k-panelbar-content"},s)})},q=n=>{const r=p.Children.toArray(n.children)[0];return r?c(r,[],0):""},y=(n,r,e={expanded:n.expanded||[],selected:n.selected||"",focused:n.focused||"",wrapperFocused:!1},t=!0,i=[])=>(p.Children.map(n.children,(o,u)=>{if(o&&o.type===l.PanelBarItem){const a=c(o,i,u);!o.props.disabled&&t&&(o.props.selected&&(e.selected=a),o.props.focused&&(e.focused=a),o.props.expanded&&(r==="multiple"?e.expanded.push(a):r==="single"&&(e.expanded=[a])),o.props.children&&(e=y(o.props,r,e,!!o.props.expanded,[...i,a])))}}),e),c=(n,r,e)=>n&&n.props&&n.props.id?n.props.id:r.length?r[r.length-1]+`.${e}`:`.${e}`;function I(n,r=[]){return(n||[]).forEach(e=>{e.disabled||(r.push(e),e.expanded&&e.children&&I(e.children,r))}),r}function C(n,r=[]){return p.Children.forEach(n,e=>{e&&e.props&&!e.props.disabled&&(r.push(e),e.props.children&&C(e.props.children,r))}),r}function P(n,r=[]){return p.Children.forEach(n,e=>{e&&e.props&&!e.props.disabled&&(e.props.expanded||e.props.parentExpanded)&&(r.push(e),e.props.children&&P(e.props.children,r))}),r}const v=n=>n!=null;exports.PanelBarUtils=void 0;(n=>{function r(e){return e.map((t,i)=>{let o;return t.content&&(o=t.content),t.children&&(o=r(t.children)),p.createElement(l.PanelBarItem,{...t,children:o,key:t.id||i})})}n.mapItemsToComponents=r})(exports.PanelBarUtils||(exports.PanelBarUtils={}));const F=(n,r)=>n.length!==r.length?!1:n.every((e,t)=>e===r[t]);exports.flatChildren=C;exports.flatVisibleChildren=P;exports.flatVisibleItems=I;exports.getFirstId=q;exports.getInitialState=y;exports.isArrayEqual=F;exports.isPresent=v;exports.renderChildren=m;