@progress/kendo-react-layout 7.3.0 → 7.4.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/index.d.mts CHANGED
@@ -732,7 +732,7 @@ export declare interface BottomNavigationEvent extends BaseEvent<BottomNavigatio
732
732
  export declare type BottomNavigationFill = 'solid' | 'flat';
733
733
 
734
734
  /**
735
- * Represents the Object which is passed to the [`ref`](https://reactjs.org/docs/refs-and-the-dom.html)
735
+ * Represents the Object which is passed to the [`ref`](https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom)
736
736
  * callback of the BottomNavigation component.
737
737
  */
738
738
  export declare interface BottomNavigationHandle {
@@ -2279,7 +2279,7 @@ export declare interface GridLayoutGap {
2279
2279
  }
2280
2280
 
2281
2281
  /**
2282
- * Represents the Object which is passed to the [`ref`](https://reactjs.org/docs/refs-and-the-dom.html)
2282
+ * Represents the Object which is passed to the [`ref`](https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom)
2283
2283
  * callback of the GridLayout component.
2284
2284
  */
2285
2285
  export declare interface GridLayoutHandle {
@@ -2317,7 +2317,7 @@ export declare interface GridLayoutHandle {
2317
2317
  export declare const GridLayoutItem: React_2.ForwardRefExoticComponent<GridLayoutItemProps & React_2.RefAttributes<GridLayoutItemHandle | null>>;
2318
2318
 
2319
2319
  /**
2320
- * Represents the Object which is passed to the [`ref`](https://reactjs.org/docs/refs-and-the-dom.html)
2320
+ * Represents the Object which is passed to the [`ref`](https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom)
2321
2321
  * callback of the GridLayoutItem component.
2322
2322
  */
2323
2323
  export declare interface GridLayoutItemHandle {
@@ -2445,7 +2445,7 @@ export declare const isArrayEqual: (firstArray: any[], secondArray: any[]) => bo
2445
2445
  /**
2446
2446
  * @hidden
2447
2447
  */
2448
- export declare const isPresent: Function;
2448
+ export declare const isPresent: (value: any) => boolean;
2449
2449
 
2450
2450
  /**
2451
2451
  * @hidden
@@ -3044,11 +3044,11 @@ export declare interface PanelBarProps {
3044
3044
  */
3045
3045
  selected?: string;
3046
3046
  /**
3047
- * Sets the initial expanded state of the PanelBar.
3047
+ * Sets the initial expanded state of the PanelBar. Takes the `id` of the item.
3048
3048
  */
3049
3049
  expanded?: string[];
3050
3050
  /**
3051
- * Sets the initial focused state of the PanelBar.
3051
+ * Sets the initial focused state of the PanelBar. Takes the `id` of the item.
3052
3052
  */
3053
3053
  focused?: string;
3054
3054
  /**
@@ -3105,7 +3105,7 @@ export declare namespace PanelBarUtils {
3105
3105
  * @param items - A collection of PanelBarItemProps.
3106
3106
  * @return {PanelBarItem[]} Returns an array of PanelBarItem components.
3107
3107
  */
3108
- export function mapItemsToComponents(items: Array<PanelBarItemProps>): PanelBarItem[];
3108
+ export function mapItemsToComponents(items: Array<PanelBarItemProps>): React_2.ReactNode[];
3109
3109
  }
3110
3110
 
3111
3111
  /**
@@ -3422,7 +3422,7 @@ export declare interface StackLayoutAlign {
3422
3422
  }
3423
3423
 
3424
3424
  /**
3425
- * Represents the Object which is passed to the [`ref`](https://reactjs.org/docs/refs-and-the-dom.html)
3425
+ * Represents the Object which is passed to the [`ref`](https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom)
3426
3426
  * callback of the StackLayout component.
3427
3427
  */
3428
3428
  export declare interface StackLayoutHandle {
@@ -3792,6 +3792,7 @@ export declare class TabStripClassComponent extends React_2.Component<TabStripPr
3792
3792
  keepTabsMounted: boolean;
3793
3793
  buttonScrollSpeed: number;
3794
3794
  mouseScrollSpeed: number;
3795
+ renderAllContent: boolean;
3795
3796
  };
3796
3797
  private _element;
3797
3798
  private get contentPanelId();
@@ -3834,8 +3835,9 @@ export declare class TabStripContent extends React_2.Component<TabStripContentPr
3834
3835
  /**
3835
3836
  * @hidden
3836
3837
  */
3837
- render(): JSX_2.Element;
3838
+ render(): JSX_2.Element | JSX_2.Element[] | null | undefined;
3838
3839
  private renderContent;
3840
+ private renderAllContent;
3839
3841
  private renderChild;
3840
3842
  private childFactory;
3841
3843
  }
@@ -3864,6 +3866,10 @@ export declare interface TabStripContentProps {
3864
3866
  * @hidden
3865
3867
  */
3866
3868
  keepTabsMounted?: boolean;
3869
+ /**
3870
+ * @hidden
3871
+ */
3872
+ renderAllContent?: boolean;
3867
3873
  /**
3868
3874
  * @hidden
3869
3875
  */
@@ -3983,6 +3989,10 @@ export declare interface TabStripNavigationItemProps {
3983
3989
  * @hidden
3984
3990
  */
3985
3991
  contentPanelId?: string;
3992
+ /**
3993
+ * @hidden
3994
+ */
3995
+ renderAllContent?: boolean;
3986
3996
  }
3987
3997
 
3988
3998
  /**
@@ -4045,6 +4055,10 @@ export declare interface TabStripNavigationProps {
4045
4055
  * @hidden
4046
4056
  */
4047
4057
  navItemId?: string;
4058
+ /**
4059
+ * @hidden
4060
+ */
4061
+ renderAllContent?: boolean;
4048
4062
  }
4049
4063
 
4050
4064
  /**
@@ -4101,6 +4115,12 @@ export declare interface TabStripProps extends KendoReactComponentBaseProps, Tab
4101
4115
  * Defines if the tabs will remain mounted after another tab is selected. Defaults to `false`.
4102
4116
  */
4103
4117
  keepTabsMounted?: boolean;
4118
+ /**
4119
+ * @default false
4120
+ * Defines if the all component tabs will be rendered by default. Defaults to `false`.
4121
+ * If set to `false`, the component will render only the currently selected tab. This can be useful when the content of the tabs is heavy and you want to improve the initial loading time. Check also the [keepTabsMounted]({% slug api_layout_tabstripprops %}#toc-keeptabsmounted) prop.
4122
+ */
4123
+ renderAllContent?: boolean;
4104
4124
  /**
4105
4125
  * Fires each time the user makes a selection.
4106
4126
  */
package/index.d.ts CHANGED
@@ -732,7 +732,7 @@ export declare interface BottomNavigationEvent extends BaseEvent<BottomNavigatio
732
732
  export declare type BottomNavigationFill = 'solid' | 'flat';
733
733
 
734
734
  /**
735
- * Represents the Object which is passed to the [`ref`](https://reactjs.org/docs/refs-and-the-dom.html)
735
+ * Represents the Object which is passed to the [`ref`](https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom)
736
736
  * callback of the BottomNavigation component.
737
737
  */
738
738
  export declare interface BottomNavigationHandle {
@@ -2279,7 +2279,7 @@ export declare interface GridLayoutGap {
2279
2279
  }
2280
2280
 
2281
2281
  /**
2282
- * Represents the Object which is passed to the [`ref`](https://reactjs.org/docs/refs-and-the-dom.html)
2282
+ * Represents the Object which is passed to the [`ref`](https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom)
2283
2283
  * callback of the GridLayout component.
2284
2284
  */
2285
2285
  export declare interface GridLayoutHandle {
@@ -2317,7 +2317,7 @@ export declare interface GridLayoutHandle {
2317
2317
  export declare const GridLayoutItem: React_2.ForwardRefExoticComponent<GridLayoutItemProps & React_2.RefAttributes<GridLayoutItemHandle | null>>;
2318
2318
 
2319
2319
  /**
2320
- * Represents the Object which is passed to the [`ref`](https://reactjs.org/docs/refs-and-the-dom.html)
2320
+ * Represents the Object which is passed to the [`ref`](https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom)
2321
2321
  * callback of the GridLayoutItem component.
2322
2322
  */
2323
2323
  export declare interface GridLayoutItemHandle {
@@ -2445,7 +2445,7 @@ export declare const isArrayEqual: (firstArray: any[], secondArray: any[]) => bo
2445
2445
  /**
2446
2446
  * @hidden
2447
2447
  */
2448
- export declare const isPresent: Function;
2448
+ export declare const isPresent: (value: any) => boolean;
2449
2449
 
2450
2450
  /**
2451
2451
  * @hidden
@@ -3044,11 +3044,11 @@ export declare interface PanelBarProps {
3044
3044
  */
3045
3045
  selected?: string;
3046
3046
  /**
3047
- * Sets the initial expanded state of the PanelBar.
3047
+ * Sets the initial expanded state of the PanelBar. Takes the `id` of the item.
3048
3048
  */
3049
3049
  expanded?: string[];
3050
3050
  /**
3051
- * Sets the initial focused state of the PanelBar.
3051
+ * Sets the initial focused state of the PanelBar. Takes the `id` of the item.
3052
3052
  */
3053
3053
  focused?: string;
3054
3054
  /**
@@ -3105,7 +3105,7 @@ export declare namespace PanelBarUtils {
3105
3105
  * @param items - A collection of PanelBarItemProps.
3106
3106
  * @return {PanelBarItem[]} Returns an array of PanelBarItem components.
3107
3107
  */
3108
- export function mapItemsToComponents(items: Array<PanelBarItemProps>): PanelBarItem[];
3108
+ export function mapItemsToComponents(items: Array<PanelBarItemProps>): React_2.ReactNode[];
3109
3109
  }
3110
3110
 
3111
3111
  /**
@@ -3422,7 +3422,7 @@ export declare interface StackLayoutAlign {
3422
3422
  }
3423
3423
 
3424
3424
  /**
3425
- * Represents the Object which is passed to the [`ref`](https://reactjs.org/docs/refs-and-the-dom.html)
3425
+ * Represents the Object which is passed to the [`ref`](https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom)
3426
3426
  * callback of the StackLayout component.
3427
3427
  */
3428
3428
  export declare interface StackLayoutHandle {
@@ -3792,6 +3792,7 @@ export declare class TabStripClassComponent extends React_2.Component<TabStripPr
3792
3792
  keepTabsMounted: boolean;
3793
3793
  buttonScrollSpeed: number;
3794
3794
  mouseScrollSpeed: number;
3795
+ renderAllContent: boolean;
3795
3796
  };
3796
3797
  private _element;
3797
3798
  private get contentPanelId();
@@ -3834,8 +3835,9 @@ export declare class TabStripContent extends React_2.Component<TabStripContentPr
3834
3835
  /**
3835
3836
  * @hidden
3836
3837
  */
3837
- render(): JSX_2.Element;
3838
+ render(): JSX_2.Element | JSX_2.Element[] | null | undefined;
3838
3839
  private renderContent;
3840
+ private renderAllContent;
3839
3841
  private renderChild;
3840
3842
  private childFactory;
3841
3843
  }
@@ -3864,6 +3866,10 @@ export declare interface TabStripContentProps {
3864
3866
  * @hidden
3865
3867
  */
3866
3868
  keepTabsMounted?: boolean;
3869
+ /**
3870
+ * @hidden
3871
+ */
3872
+ renderAllContent?: boolean;
3867
3873
  /**
3868
3874
  * @hidden
3869
3875
  */
@@ -3983,6 +3989,10 @@ export declare interface TabStripNavigationItemProps {
3983
3989
  * @hidden
3984
3990
  */
3985
3991
  contentPanelId?: string;
3992
+ /**
3993
+ * @hidden
3994
+ */
3995
+ renderAllContent?: boolean;
3986
3996
  }
3987
3997
 
3988
3998
  /**
@@ -4045,6 +4055,10 @@ export declare interface TabStripNavigationProps {
4045
4055
  * @hidden
4046
4056
  */
4047
4057
  navItemId?: string;
4058
+ /**
4059
+ * @hidden
4060
+ */
4061
+ renderAllContent?: boolean;
4048
4062
  }
4049
4063
 
4050
4064
  /**
@@ -4101,6 +4115,12 @@ export declare interface TabStripProps extends KendoReactComponentBaseProps, Tab
4101
4115
  * Defines if the tabs will remain mounted after another tab is selected. Defaults to `false`.
4102
4116
  */
4103
4117
  keepTabsMounted?: boolean;
4118
+ /**
4119
+ * @default false
4120
+ * Defines if the all component tabs will be rendered by default. Defaults to `false`.
4121
+ * If set to `false`, the component will render only the currently selected tab. This can be useful when the content of the tabs is heavy and you want to improve the initial loading time. Check also the [keepTabsMounted]({% slug api_layout_tabstripprops %}#toc-keeptabsmounted) prop.
4122
+ */
4123
+ renderAllContent?: boolean;
4104
4124
  /**
4105
4125
  * Fires each time the user makes a selection.
4106
4126
  */
@@ -10,7 +10,7 @@ const e = {
10
10
  name: "@progress/kendo-react-layout",
11
11
  productName: "KendoReact",
12
12
  productCodes: ["KENDOUIREACT", "KENDOUICOMPLETE"],
13
- publishDate: 1710323653,
13
+ publishDate: 1711700558,
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.3.0",
3
+ "version": "7.4.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.3.0",
27
- "@progress/kendo-react-common": "7.3.0",
28
- "@progress/kendo-react-intl": "7.3.0",
29
- "@progress/kendo-react-popup": "7.3.0",
30
- "@progress/kendo-react-progressbars": "7.3.0",
26
+ "@progress/kendo-react-animation": "7.4.0-develop.10",
27
+ "@progress/kendo-react-common": "7.4.0-develop.10",
28
+ "@progress/kendo-react-intl": "7.4.0-develop.10",
29
+ "@progress/kendo-react-popup": "7.4.0-develop.10",
30
+ "@progress/kendo-react-progressbars": "7.4.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"),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","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;
@@ -28,7 +28,7 @@ const c = class c extends p.Component {
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
  }
@@ -45,7 +45,7 @@ const c = class c extends p.Component {
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 }));
@@ -162,7 +162,7 @@ c.propTypes = {
162
162
  const t = i[o];
163
163
  if (t) {
164
164
  if (Array.isArray(t)) {
165
- for (let r of t)
165
+ for (const r of t)
166
166
  if (!r.type || r.type !== u)
167
167
  return new Error(
168
168
  "PanelBar children should be either PanelBarItem or Array of PanelBarItem."
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 x=require("react"),l=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:s,parentExpanded:u=!0,level:p=0,parentPrivateKey:d=[]})=>a.Children.map(s,(o,E)=>{if(o&&o.type===l.PanelBarItem){let g;const f=c(o,d,E);if(o.props.children){const P={animation:n,keepItemsMounted:r,state:e,expanded:t,handleSelect:i,children:o.props.children,parentExpanded:(t||[]).indexOf(f)>-1,level:p+1,parentPrivateKey:[...d,f]};g=m(P)}return a.cloneElement(o,{...o.props,animation:o.props.animation!==void 0?o.props.animation:n,keepItemsMounted:r,id:o.props.id||`k-panelbar-item-default-${f}`,uniquePrivateKey:f,parentUniquePrivateKey:d,parentExpanded:u,level:p,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"},o)}),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,(s,u)=>{if(s&&s.type===l.PanelBarItem){const p=c(s,i,u);!s.props.disabled&&t&&(s.props.selected&&(e.selected=p),s.props.focused&&(e.focused=p),s.props.expanded&&(r==="multiple"?e.expanded.push(p):r==="single"&&(e.expanded=[p])),s.props.children&&(e=b(s.props,r,e,!!s.props.expanded,[...i,p])))}}),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 s;return t.content&&(s=t.content),t.children&&(s=r(t.children)),a.createElement(l.PanelBarItem,{...t,children:s,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;
package/panelbar/util.mjs CHANGED
@@ -20,7 +20,8 @@ const C = ({
20
20
  parentPrivateKey: u = []
21
21
  }) => a.Children.map(p, (s, E) => {
22
22
  if (s && s.type === c) {
23
- let m, d = l(s, u, E);
23
+ let m;
24
+ const d = l(s, u, E);
24
25
  if (s.props.children) {
25
26
  const g = {
26
27
  animation: n,
@@ -65,7 +66,7 @@ const C = ({
65
66
  wrapperFocused: !1
66
67
  }, o = !0, f = []) => (a.Children.map(n.children, (p, i) => {
67
68
  if (p && p.type === c) {
68
- let t = l(p, f, i);
69
+ const t = l(p, f, i);
69
70
  !p.props.disabled && o && (p.props.selected && (e.selected = t), p.props.focused && (e.focused = t), p.props.expanded && (r === "multiple" ? e.expanded.push(t) : r === "single" && (e.expanded = [t])), p.props.children && (e = b(
70
71
  p.props,
71
72
  r,
@@ -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"),o=require("prop-types"),p=require("./TabStripNavigation.js"),y=require("./TabStripContent.js"),i=require("@progress/kendo-react-common"),b=require("../package-metadata.js");function f(c){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(c){for(const e in c)if(e!=="default"){const t=Object.getOwnPropertyDescriptor(c,e);Object.defineProperty(n,e,t.get?t:{enumerable:!0,get:()=>c[e]})}}return n.default=c,Object.freeze(n)}const a=f(u),h=class h extends a.Component{constructor(n){super(n),this._element=null,this.showLicenseWatermark=!1,this.keyBinding={[i.Keys.left]:()=>this.prevNavigatableTab(),[i.Keys.right]:()=>this.nextNavigatableTab(),[i.Keys.down]:()=>this.nextNavigatableTab(),[i.Keys.up]:()=>this.prevNavigatableTab(),[i.Keys.home]:()=>0,[i.Keys.end]:()=>a.Children.count(this.props.children)-1},this.onSelect=e=>{this.props.selected!==e&&this.props.onSelect&&this.props.onSelect({selected:e})},this.onKeyDown=e=>{let t;switch(e.keyCode){case i.Keys.left:t=this.keyBinding[this.invertKeys(i.Keys.left,i.Keys.right)];break;case i.Keys.right:t=this.keyBinding[this.invertKeys(i.Keys.right,i.Keys.left)];break;case i.Keys.up:t=this.keyBinding[i.Keys.up];break;case i.Keys.down:t=this.keyBinding[i.Keys.down];break;case i.Keys.home:t=this.keyBinding[i.Keys.home];break;case i.Keys.end:t=this.keyBinding[i.Keys.end];break}t&&(e.preventDefault(),this.onSelect(t()))},this.renderContent=e=>{const{selected:t,children:s,tabContentStyle:r}=e,l=a.Children.count(s);return t<l&&t>-1?a.createElement(y.TabStripContent,{index:t,...e,style:r}):null},this.firstNavigatableTab=()=>{const e=this.children(),t=a.Children.count(e);if(e){for(let s=0;s<t;s++)if(!e[s].props.disabled)return s}},this.lastNavigatableTab=()=>{const e=this.children(),t=a.Children.count(e);if(e){for(let s=t-1;s>0;s--)if(!e[s].props.disabled)return s}},this.prevNavigatableTab=()=>{const e=this.children(),{selected:t}=this.props,s=t?t-1:-1;if(s<0)return this.lastNavigatableTab();if(e)for(let r=s;r>-1;r--){if(!e[r].props.disabled)return r;if(r===0)return this.lastNavigatableTab()}},this.nextNavigatableTab=()=>{const e=this.children(),{selected:t}=this.props,s=t?t+1:1,r=a.Children.count(e);if(s>=r)return this.firstNavigatableTab();if(e)for(let l=s;l<r;l++){if(!e[l].props.disabled)return l;if(l+1===r)return this.firstNavigatableTab()}},i.validatePackage(b.packageMetadata),this.showLicenseWatermark=i.shouldShowValidationUI(b.packageMetadata)}get contentPanelId(){return this.props.id+"-content-panel-id"}get navItemId(){return this.props.id+"-nav-item-id"}render(){const n={...this.props,children:this.children(),contentPanelId:this.contentPanelId,navItemId:this.navItemId,onKeyDown:this.onKeyDown,onSelect:this.onSelect},{tabPosition:e,tabIndex:t=0}=n,s=e==="bottom",r=i.classNames("k-tabstrip k-pos-relative",{"k-tabstrip-left":e==="left","k-tabstrip-right":e==="right","k-tabstrip-bottom":e==="bottom","k-tabstrip-top":e==="top","k-tabstrip-scrollable":this.props.scrollable},this.props.className);return a.createElement("div",{id:this.props.id,ref:l=>this._element=l,dir:this.props.dir,className:r,style:this.props.style},!s&&a.createElement(p.TabStripNavigation,{...n,tabIndex:t}),this.renderContent(n),s&&a.createElement(p.TabStripNavigation,{...n,tabIndex:t}),this.showLicenseWatermark&&a.createElement(i.WatermarkOverlay,null))}invertKeys(n,e){return this._element&&getComputedStyle(this._element).direction==="rtl"||!1?e:n}children(){return a.Children.toArray(this.props.children).filter(n=>n)}};h.propTypes={animation:o.bool,children:o.node,onSelect:o.func,selected:o.number,style:o.object,tabContentStyle:o.object,tabPosition:o.string,tabIndex:o.number,className:o.string,dir:o.string},h.defaultProps={animation:!0,tabPosition:"top",keepTabsMounted:!1,buttonScrollSpeed:100,mouseScrollSpeed:10};let d=h;exports.TabStrip=d;
8
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("react"),o=require("prop-types"),p=require("./TabStripNavigation.js"),y=require("./TabStripContent.js"),n=require("@progress/kendo-react-common"),b=require("../package-metadata.js");function f(c){const s=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(c){for(const e in c)if(e!=="default"){const t=Object.getOwnPropertyDescriptor(c,e);Object.defineProperty(s,e,t.get?t:{enumerable:!0,get:()=>c[e]})}}return s.default=c,Object.freeze(s)}const a=f(u),h=class h extends a.Component{constructor(s){super(s),this._element=null,this.showLicenseWatermark=!1,this.keyBinding={[n.Keys.left]:()=>this.prevNavigatableTab(),[n.Keys.right]:()=>this.nextNavigatableTab(),[n.Keys.down]:()=>this.nextNavigatableTab(),[n.Keys.up]:()=>this.prevNavigatableTab(),[n.Keys.home]:()=>0,[n.Keys.end]:()=>a.Children.count(this.props.children)-1},this.onSelect=e=>{this.props.selected!==e&&this.props.onSelect&&this.props.onSelect({selected:e})},this.onKeyDown=e=>{let t;switch(e.keyCode){case n.Keys.left:t=this.keyBinding[this.invertKeys(n.Keys.left,n.Keys.right)];break;case n.Keys.right:t=this.keyBinding[this.invertKeys(n.Keys.right,n.Keys.left)];break;case n.Keys.up:t=this.keyBinding[n.Keys.up];break;case n.Keys.down:t=this.keyBinding[n.Keys.down];break;case n.Keys.home:t=this.keyBinding[n.Keys.home];break;case n.Keys.end:t=this.keyBinding[n.Keys.end];break}t&&(e.preventDefault(),this.onSelect(t()))},this.renderContent=e=>{const{selected:t,children:i,tabContentStyle:r}=e,l=a.Children.count(i);return t<l&&t>-1?a.createElement(y.TabStripContent,{index:t,...e,style:r}):null},this.firstNavigatableTab=()=>{const e=this.children(),t=a.Children.count(e);if(e){for(let i=0;i<t;i++)if(!e[i].props.disabled)return i}},this.lastNavigatableTab=()=>{const e=this.children(),t=a.Children.count(e);if(e){for(let i=t-1;i>0;i--)if(!e[i].props.disabled)return i}},this.prevNavigatableTab=()=>{const e=this.children(),{selected:t}=this.props,i=t?t-1:-1;if(i<0)return this.lastNavigatableTab();if(e)for(let r=i;r>-1;r--){if(!e[r].props.disabled)return r;if(r===0)return this.lastNavigatableTab()}},this.nextNavigatableTab=()=>{const e=this.children(),{selected:t}=this.props,i=t?t+1:1,r=a.Children.count(e);if(i>=r)return this.firstNavigatableTab();if(e)for(let l=i;l<r;l++){if(!e[l].props.disabled)return l;if(l+1===r)return this.firstNavigatableTab()}},n.validatePackage(b.packageMetadata),this.showLicenseWatermark=n.shouldShowValidationUI(b.packageMetadata)}get contentPanelId(){return this.props.id+"-content-panel-id"}get navItemId(){return this.props.id+"-nav-item-id"}render(){const s={...this.props,children:this.children(),contentPanelId:this.contentPanelId,renderAllContent:this.props.renderAllContent,navItemId:this.navItemId,onKeyDown:this.onKeyDown,onSelect:this.onSelect},{tabPosition:e,tabIndex:t=0}=s,i=e==="bottom",r=n.classNames("k-tabstrip k-pos-relative",{"k-tabstrip-left":e==="left","k-tabstrip-right":e==="right","k-tabstrip-bottom":e==="bottom","k-tabstrip-top":e==="top","k-tabstrip-scrollable":this.props.scrollable},this.props.className);return a.createElement("div",{id:this.props.id,ref:l=>this._element=l,dir:this.props.dir,className:r,style:this.props.style},!i&&a.createElement(p.TabStripNavigation,{...s,tabIndex:t}),this.renderContent(s),i&&a.createElement(p.TabStripNavigation,{...s,tabIndex:t}),this.showLicenseWatermark&&a.createElement(n.WatermarkOverlay,null))}invertKeys(s,e){return this._element&&getComputedStyle(this._element).direction==="rtl"||!1?e:s}children(){return a.Children.toArray(this.props.children).filter(s=>s)}};h.propTypes={animation:o.bool,children:o.node,onSelect:o.func,selected:o.number,style:o.object,tabContentStyle:o.object,tabPosition:o.string,tabIndex:o.number,className:o.string,dir:o.string},h.defaultProps={animation:!0,tabPosition:"top",keepTabsMounted:!1,buttonScrollSpeed:100,mouseScrollSpeed:10,renderAllContent:!1};let d=h;exports.TabStrip=d;
@@ -7,14 +7,14 @@
7
7
  */
8
8
  "use client";
9
9
  import * as r from "react";
10
- import o from "prop-types";
10
+ import a from "prop-types";
11
11
  import { TabStripNavigation as c } from "./TabStripNavigation.mjs";
12
12
  import { TabStripContent as b } from "./TabStripContent.mjs";
13
13
  import { Keys as n, validatePackage as m, shouldShowValidationUI as f, classNames as u, WatermarkOverlay as g } from "@progress/kendo-react-common";
14
14
  import { packageMetadata as d } from "../package-metadata.mjs";
15
15
  const h = class h extends r.Component {
16
- constructor(a) {
17
- super(a), this._element = null, this.showLicenseWatermark = !1, this.keyBinding = {
16
+ constructor(o) {
17
+ super(o), this._element = null, this.showLicenseWatermark = !1, this.keyBinding = {
18
18
  [n.left]: () => this.prevNavigatableTab(),
19
19
  [n.right]: () => this.nextNavigatableTab(),
20
20
  [n.down]: () => this.nextNavigatableTab(),
@@ -99,14 +99,15 @@ const h = class h extends r.Component {
99
99
  * @hidden
100
100
  */
101
101
  render() {
102
- const a = {
102
+ const o = {
103
103
  ...this.props,
104
104
  children: this.children(),
105
105
  contentPanelId: this.contentPanelId,
106
+ renderAllContent: this.props.renderAllContent,
106
107
  navItemId: this.navItemId,
107
108
  onKeyDown: this.onKeyDown,
108
109
  onSelect: this.onSelect
109
- }, { tabPosition: t, tabIndex: e = 0 } = a, i = t === "bottom", s = u(
110
+ }, { tabPosition: t, tabIndex: e = 0 } = o, i = t === "bottom", s = u(
110
111
  "k-tabstrip k-pos-relative",
111
112
  {
112
113
  "k-tabstrip-left": t === "left",
@@ -126,36 +127,37 @@ const h = class h extends r.Component {
126
127
  className: s,
127
128
  style: this.props.style
128
129
  },
129
- !i && /* @__PURE__ */ r.createElement(c, { ...a, tabIndex: e }),
130
- this.renderContent(a),
131
- i && /* @__PURE__ */ r.createElement(c, { ...a, tabIndex: e }),
130
+ !i && /* @__PURE__ */ r.createElement(c, { ...o, tabIndex: e }),
131
+ this.renderContent(o),
132
+ i && /* @__PURE__ */ r.createElement(c, { ...o, tabIndex: e }),
132
133
  this.showLicenseWatermark && /* @__PURE__ */ r.createElement(g, null)
133
134
  );
134
135
  }
135
- invertKeys(a, t) {
136
- return this._element && getComputedStyle(this._element).direction === "rtl" || !1 ? t : a;
136
+ invertKeys(o, t) {
137
+ return this._element && getComputedStyle(this._element).direction === "rtl" || !1 ? t : o;
137
138
  }
138
139
  children() {
139
- return r.Children.toArray(this.props.children).filter((a) => a);
140
+ return r.Children.toArray(this.props.children).filter((o) => o);
140
141
  }
141
142
  };
142
143
  h.propTypes = {
143
- animation: o.bool,
144
- children: o.node,
145
- onSelect: o.func,
146
- selected: o.number,
147
- style: o.object,
148
- tabContentStyle: o.object,
149
- tabPosition: o.string,
150
- tabIndex: o.number,
151
- className: o.string,
152
- dir: o.string
144
+ animation: a.bool,
145
+ children: a.node,
146
+ onSelect: a.func,
147
+ selected: a.number,
148
+ style: a.object,
149
+ tabContentStyle: a.object,
150
+ tabPosition: a.string,
151
+ tabIndex: a.number,
152
+ className: a.string,
153
+ dir: a.string
153
154
  }, h.defaultProps = {
154
155
  animation: !0,
155
156
  tabPosition: "top",
156
157
  keepTabsMounted: !1,
157
158
  buttonScrollSpeed: 100,
158
- mouseScrollSpeed: 10
159
+ mouseScrollSpeed: 10,
160
+ renderAllContent: !1
159
161
  };
160
162
  let p = h;
161
163
  export {
@@ -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 h=require("react"),s=require("prop-types"),u=require("@progress/kendo-react-animation"),m=require("@progress/kendo-react-common");function y(o){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(o){for(const t in o)if(t!=="default"){const n=Object.getOwnPropertyDescriptor(o,t);Object.defineProperty(e,t,n.get?n:{enumerable:!0,get:()=>o[t]})}}return e.default=o,Object.freeze(e)}const r=y(h),p=class p extends r.Component{constructor(){super(...arguments),this.contentId=this.props.contentPanelId,this.childFactory=e=>r.cloneElement(e,{...e.props,in:e.props.children.props.id===String(this.contentId+this.props.selected)})}render(){const{children:e,selected:t,contentPanelId:n,keepTabsMounted:i,navItemId:a}=this.props,l=e&&typeof t=="number"&&r.Children.toArray(e)[t],d=m.classNames("k-tabstrip-content","k-active",l&&l.props.contentClassName);return r.createElement("div",{className:d,style:this.props.style,id:n,role:"tabpanel","aria-hidden":i,"aria-labelledby":`${a}-${(t==null?void 0:t.toString())||""}`},this.renderContent(e))}renderContent(e){return this.props.keepTabsMounted?r.Children.map(this.props.children,(t,n)=>this.renderChild(t,n)):this.renderChild(r.Children.toArray(e)[this.props.selected],this.props.selected)}renderChild(e,t){const n=t===this.props.selected,i={style:{display:n?void 0:"none"}},a={position:"initial",display:n?void 0:"none"};return e.props.disabled?null:this.props.animation?r.createElement(u.Fade,{appear:!0,exit:this.props.keepTabsMounted,style:a,childFactory:this.props.keepTabsMounted?this.childFactory:void 0},r.createElement("div",{...i,id:String(this.contentId+t),key:t},e.props.children)):r.createElement("div",{...i,key:t},e.props.children)}};p.propTypes={animation:s.bool,children:s.oneOfType([s.element,s.arrayOf(s.element)]),selected:s.number,style:s.object};let c=p;exports.TabStripContent=c;
8
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("react"),i=require("prop-types"),h=require("@progress/kendo-react-animation"),u=require("@progress/kendo-react-common");function b(a){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(a){for(const t in a)if(t!=="default"){const n=Object.getOwnPropertyDescriptor(a,t);Object.defineProperty(e,t,n.get?n:{enumerable:!0,get:()=>a[t]})}}return e.default=a,Object.freeze(e)}const r=b(y),c=class c extends r.Component{constructor(){super(...arguments),this.contentId=this.props.contentPanelId,this.childFactory=e=>r.cloneElement(e,{...e.props,in:e.props.children.props.id===String(this.contentId+this.props.selected)})}render(){const{children:e,selected:t,contentPanelId:n,keepTabsMounted:s,navItemId:o,renderAllContent:l}=this.props,d=e&&typeof t=="number"&&r.Children.toArray(e)[t],m=u.classNames("k-tabstrip-content","k-active",d&&d.props.contentClassName);return l?this.renderAllContent(e):r.createElement("div",{className:m,style:this.props.style,id:n,role:"tabpanel","aria-hidden":s,"aria-labelledby":`${o}-${(t==null?void 0:t.toString())||""}`},this.renderContent(e))}renderContent(e){return this.props.keepTabsMounted?r.Children.map(this.props.children,(t,n)=>this.renderChild(t,n)):this.renderChild(r.Children.toArray(e)[this.props.selected],this.props.selected)}renderAllContent(e){return r.Children.map(e,(t,n)=>{const s=t,o=n===this.props.selected,l=u.classNames("k-tabstrip-content",{"k-active":o},s.props.contentClassName);return r.createElement("div",{className:l,style:this.props.style,id:`${this.props.contentPanelId}-${n}`,role:"tabpanel","aria-hidden":!o,hidden:!o,"aria-labelledby":`${this.props.navItemId}-${n}`},this.props.animation?r.createElement(h.Fade,{key:`${n}-${o}`,appear:!0,enter:!0,exit:!1},s.props.children):s.props.children)})}renderChild(e,t){const n=t===this.props.selected,s={style:{display:n?void 0:"none"}},o={position:"initial",display:n?void 0:"none"};return e.props.disabled?null:this.props.animation?r.createElement(h.Fade,{appear:!0,exit:this.props.keepTabsMounted,style:o,childFactory:this.props.keepTabsMounted?this.childFactory:void 0},r.createElement("div",{...s,id:String(this.contentId+t),key:t},e.props.children)):r.createElement("div",{...s,key:t},e.props.children)}};c.propTypes={animation:i.bool,children:i.oneOfType([i.element,i.arrayOf(i.element)]),selected:i.number,style:i.object};let p=c;exports.TabStripContent=p;