@progress/kendo-react-layout 13.4.0-develop.5 → 14.0.0-develop.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cdn/js/kendo-react-layout.js +1 -1
- package/index.d.mts +1 -0
- package/index.d.ts +1 -0
- package/index.js +1 -1
- package/index.mjs +105 -104
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +1 -1
- package/package.json +10 -10
- package/panelbar/PanelBar.d.ts +4 -65
- package/panelbar/PanelBar.js +1 -1
- package/panelbar/PanelBar.mjs +182 -161
- package/panelbar/PanelBarItem.d.ts +8 -46
- package/panelbar/PanelBarItem.js +1 -1
- package/panelbar/PanelBarItem.mjs +125 -119
- package/panelbar/interfaces/PanelBarItemClickEventArguments.d.ts +2 -2
- package/panelbar/interfaces/PanelBarItemHandle.d.ts +17 -0
- package/tabstrip/TabStrip.d.ts +13 -79
- package/tabstrip/TabStrip.js +1 -1
- package/tabstrip/TabStrip.mjs +179 -132
- package/tabstrip/TabStripContent.d.ts +1 -21
- package/tabstrip/TabStripContent.js +1 -1
- package/tabstrip/TabStripContent.mjs +75 -83
- package/tabstrip/TabStripNavigation.d.ts +1 -41
- package/tabstrip/TabStripNavigation.js +1 -1
- package/tabstrip/TabStripNavigation.mjs +159 -146
- package/tabstrip/TabStripNavigationItem.d.ts +5 -27
- package/tabstrip/TabStripNavigationItem.js +1 -1
- package/tabstrip/TabStripNavigationItem.mjs +56 -46
- package/tabstrip/TabStripTab.d.ts +1 -16
- package/tabstrip/TabStripTab.js +1 -1
- package/tabstrip/TabStripTab.mjs +3 -11
|
@@ -5,128 +5,134 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
import * as
|
|
9
|
-
import
|
|
10
|
-
import {
|
|
11
|
-
import { chevronUpIcon as
|
|
12
|
-
import { Reveal as
|
|
13
|
-
function
|
|
14
|
-
return
|
|
8
|
+
import * as e from "react";
|
|
9
|
+
import n from "prop-types";
|
|
10
|
+
import { classNames as u, IconWrap as v, svgIconPropType as _ } from "@progress/kendo-react-common";
|
|
11
|
+
import { chevronUpIcon as $, chevronDownIcon as j } from "@progress/kendo-svg-icons";
|
|
12
|
+
import { Reveal as z } from "@progress/kendo-react-animation";
|
|
13
|
+
function J({ imageUrl: o, icon: i, svgIcon: s, iconClass: a }) {
|
|
14
|
+
return o ? /* @__PURE__ */ e.createElement("img", { role: "presentation", className: "k-panelbar-item-icon k-image", src: o }) : i || s ? /* @__PURE__ */ e.createElement(v, { className: "k-panelbar-item-icon", name: i, icon: s }) : a ? /* @__PURE__ */ e.createElement("span", { role: "presentation", className: "k-panelbar-item-icon " + a }) : null;
|
|
15
15
|
}
|
|
16
|
-
const
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
16
|
+
const f = e.forwardRef((o, i) => {
|
|
17
|
+
const {
|
|
18
|
+
id: s,
|
|
19
|
+
children: a,
|
|
20
|
+
title: E = Q.title,
|
|
21
|
+
uniquePrivateKey: c,
|
|
22
|
+
disabled: t,
|
|
23
|
+
selected: k,
|
|
24
|
+
focused: N,
|
|
25
|
+
expanded: r,
|
|
26
|
+
className: C,
|
|
27
|
+
level: b,
|
|
28
|
+
headerClassName: x,
|
|
29
|
+
animation: y,
|
|
30
|
+
keepItemsMounted: l,
|
|
31
|
+
onSelect: m,
|
|
32
|
+
imageUrl: B,
|
|
33
|
+
icon: R,
|
|
34
|
+
svgIcon: w,
|
|
35
|
+
iconClass: P
|
|
36
|
+
} = o, d = e.useRef({ props: o }), S = e.useRef(null);
|
|
37
|
+
e.useImperativeHandle(d, () => ({ props: o })), e.useImperativeHandle(
|
|
38
|
+
i,
|
|
39
|
+
() => d.current
|
|
40
|
+
);
|
|
41
|
+
const [A, g] = e.useState(r || !1), D = e.useCallback(() => {
|
|
42
|
+
m && !t && m({
|
|
40
43
|
uniquePrivateKey: c,
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
children: t.any,
|
|
112
|
-
className: t.string,
|
|
113
|
-
icon: t.string,
|
|
114
|
-
iconClass: t.string,
|
|
115
|
-
imageUrl: t.string,
|
|
116
|
-
svgIcon: P,
|
|
117
|
-
expanded: t.bool,
|
|
118
|
-
disabled: t.bool,
|
|
119
|
-
onSelect: t.func,
|
|
120
|
-
selected: t.bool,
|
|
121
|
-
level: t.number,
|
|
122
|
-
title: t.oneOfType([t.string, t.element]),
|
|
123
|
-
id: t.oneOfType([t.string, t.number]),
|
|
124
|
-
focused: t.bool,
|
|
125
|
-
keepItemsMounted: t.bool
|
|
126
|
-
}, l.defaultProps = {
|
|
44
|
+
id: s,
|
|
45
|
+
target: d.current
|
|
46
|
+
});
|
|
47
|
+
}, [m, t, c, s]), T = e.useCallback(
|
|
48
|
+
(p) => l ? e.cloneElement(p, {
|
|
49
|
+
...p.props,
|
|
50
|
+
in: r
|
|
51
|
+
}) : p,
|
|
52
|
+
[l, r]
|
|
53
|
+
), U = e.useCallback(() => {
|
|
54
|
+
l && g(!0);
|
|
55
|
+
}, [l]), H = e.useCallback(() => {
|
|
56
|
+
l && g(!1);
|
|
57
|
+
}, [l]), L = {
|
|
58
|
+
role: "treeitem",
|
|
59
|
+
"aria-disabled": t,
|
|
60
|
+
"aria-hidden": !t && !r ? "true" : "false",
|
|
61
|
+
"aria-selected": !t && k,
|
|
62
|
+
"aria-expanded": !t && r && !!a
|
|
63
|
+
}, O = u(
|
|
64
|
+
"k-panelbar-item",
|
|
65
|
+
{
|
|
66
|
+
"k-panelbar-header": b === 0,
|
|
67
|
+
"k-expanded": r && !!a,
|
|
68
|
+
"k-disabled": t
|
|
69
|
+
},
|
|
70
|
+
`k-level-${b}`,
|
|
71
|
+
C
|
|
72
|
+
), F = u(
|
|
73
|
+
"k-link",
|
|
74
|
+
{
|
|
75
|
+
"k-selected": !t && k,
|
|
76
|
+
"k-focus": N
|
|
77
|
+
},
|
|
78
|
+
x
|
|
79
|
+
), K = { display: "block" }, M = J({ imageUrl: B, icon: R, svgIcon: w, iconClass: P }), q = !t && a ? /* @__PURE__ */ e.createElement(
|
|
80
|
+
v,
|
|
81
|
+
{
|
|
82
|
+
name: r ? "chevron-up" : "chevron-down",
|
|
83
|
+
icon: r ? $ : j,
|
|
84
|
+
className: u("k-panelbar-toggle", r ? "k-panelbar-collapse" : "k-panelbar-expand")
|
|
85
|
+
}
|
|
86
|
+
) : null;
|
|
87
|
+
let I = !1;
|
|
88
|
+
a && a[0] && Array.isArray(a) && (I = a[0].type === f);
|
|
89
|
+
const G = l && !A ? "none" : "block", h = !t && r || l ? I ? /* @__PURE__ */ e.createElement(
|
|
90
|
+
"ul",
|
|
91
|
+
{
|
|
92
|
+
role: "group",
|
|
93
|
+
"aria-hidden": r ? "false" : "true",
|
|
94
|
+
className: "k-panelbar-group",
|
|
95
|
+
style: { display: G }
|
|
96
|
+
},
|
|
97
|
+
a
|
|
98
|
+
) : a : null, W = (y === void 0 || y) && !t && a ? /* @__PURE__ */ e.createElement(
|
|
99
|
+
z,
|
|
100
|
+
{
|
|
101
|
+
transitionEnterDuration: 200,
|
|
102
|
+
transitionExitDuration: 200,
|
|
103
|
+
key: c + "_animation",
|
|
104
|
+
style: K,
|
|
105
|
+
children: h,
|
|
106
|
+
childFactory: l ? T : void 0,
|
|
107
|
+
unmountOnExit: !l,
|
|
108
|
+
onBeforeEnter: U,
|
|
109
|
+
onAfterExited: H
|
|
110
|
+
}
|
|
111
|
+
) : h;
|
|
112
|
+
return /* @__PURE__ */ e.createElement("li", { ref: S, id: s, className: O, ...L }, /* @__PURE__ */ e.createElement("span", { className: F, onClick: D }, M, /* @__PURE__ */ e.createElement("span", { className: "k-panelbar-item-text" }, E), q), W);
|
|
113
|
+
}), Q = {
|
|
127
114
|
title: "Untitled"
|
|
128
115
|
};
|
|
129
|
-
|
|
116
|
+
f.propTypes = {
|
|
117
|
+
animation: n.bool,
|
|
118
|
+
children: n.any,
|
|
119
|
+
className: n.string,
|
|
120
|
+
icon: n.string,
|
|
121
|
+
iconClass: n.string,
|
|
122
|
+
imageUrl: n.string,
|
|
123
|
+
svgIcon: _,
|
|
124
|
+
expanded: n.bool,
|
|
125
|
+
disabled: n.bool,
|
|
126
|
+
onSelect: n.func,
|
|
127
|
+
selected: n.bool,
|
|
128
|
+
level: n.number,
|
|
129
|
+
title: n.oneOfType([n.string, n.element]),
|
|
130
|
+
id: n.oneOfType([n.string, n.number]),
|
|
131
|
+
focused: n.bool,
|
|
132
|
+
keepItemsMounted: n.bool
|
|
133
|
+
};
|
|
134
|
+
f.displayName = "KendoReactPanelBarItem";
|
|
130
135
|
export {
|
|
131
|
-
f as PanelBarItem
|
|
136
|
+
f as PanelBarItem,
|
|
137
|
+
Q as panelBarItemDefaultProps
|
|
132
138
|
};
|
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
import
|
|
8
|
+
import * as React from 'react';
|
|
9
9
|
/**
|
|
10
10
|
* @hidden
|
|
11
11
|
*/
|
|
12
12
|
export interface PanelBarItemClickEventArguments {
|
|
13
13
|
uniquePrivateKey: number;
|
|
14
|
-
target:
|
|
14
|
+
target: React.ReactElement;
|
|
15
15
|
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import { PanelBarItemProps } from './PanelBarItemProps.js';
|
|
9
|
+
/**
|
|
10
|
+
* Represents the handle of the PanelBarItem component.
|
|
11
|
+
*/
|
|
12
|
+
export interface PanelBarItemHandle {
|
|
13
|
+
/**
|
|
14
|
+
* The props of the PanelBarItem component.
|
|
15
|
+
*/
|
|
16
|
+
props: PanelBarItemProps;
|
|
17
|
+
}
|
package/tabstrip/TabStrip.d.ts
CHANGED
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
import { default as PropTypes } from 'prop-types';
|
|
9
8
|
import { KendoReactComponentBaseProps } from '@progress/kendo-react-common';
|
|
10
9
|
import { ButtonProps } from '@progress/kendo-react-buttons';
|
|
11
10
|
import * as React from 'react';
|
|
@@ -37,6 +36,12 @@ export interface TabStripScrollableProps {
|
|
|
37
36
|
* @default 100
|
|
38
37
|
*/
|
|
39
38
|
buttonScrollSpeed?: number;
|
|
39
|
+
/**
|
|
40
|
+
* Sets the tab list scroll speed in pixels when scrolling via mouse wheel.
|
|
41
|
+
*
|
|
42
|
+
* @default 10
|
|
43
|
+
*/
|
|
44
|
+
mouseScrollSpeed?: number;
|
|
40
45
|
/**
|
|
41
46
|
* Sets the visibility of the scroll buttons.
|
|
42
47
|
*
|
|
@@ -166,6 +171,8 @@ export interface TabStripProps extends KendoReactComponentBaseProps, TabStripScr
|
|
|
166
171
|
/**
|
|
167
172
|
* Specifies the possible sizes of the TabStrip.
|
|
168
173
|
*
|
|
174
|
+
* @default undefined (theme-controlled)
|
|
175
|
+
*
|
|
169
176
|
* @example
|
|
170
177
|
* ```jsx
|
|
171
178
|
* <TabStrip size="small" />
|
|
@@ -212,86 +219,13 @@ export type StateScrollPosition = 'start' | 'end' | 'top' | 'bottom' | 'middle'
|
|
|
212
219
|
export interface TabStripStateProps {
|
|
213
220
|
containerScrollPosition: StateScrollPosition;
|
|
214
221
|
}
|
|
222
|
+
export declare const TabStrip: React.ForwardRefExoticComponent<TabStripProps & React.RefAttributes<TabStripHandle | null>>;
|
|
215
223
|
/**
|
|
216
|
-
* Represents the TabStrip component.
|
|
217
|
-
*
|
|
218
|
-
* @remarks
|
|
219
|
-
* Supported children components are: {@link TabStripTab}.
|
|
224
|
+
* Represents the `ref` of the TabStrip component.
|
|
220
225
|
*/
|
|
221
|
-
export
|
|
222
|
-
/**
|
|
223
|
-
* @hidden
|
|
224
|
-
*/
|
|
225
|
-
static propTypes: {
|
|
226
|
-
id: PropTypes.Requireable<string>;
|
|
227
|
-
animation: PropTypes.Requireable<boolean>;
|
|
228
|
-
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
229
|
-
onSelect: PropTypes.Requireable<(...args: any[]) => any>;
|
|
230
|
-
selected: PropTypes.Requireable<number>;
|
|
231
|
-
style: PropTypes.Requireable<object>;
|
|
232
|
-
tabContentStyle: PropTypes.Requireable<object>;
|
|
233
|
-
tabPosition: PropTypes.Requireable<string>;
|
|
234
|
-
tabAlignment: PropTypes.Requireable<string>;
|
|
235
|
-
tabIndex: PropTypes.Requireable<number>;
|
|
236
|
-
className: PropTypes.Requireable<string>;
|
|
237
|
-
dir: PropTypes.Requireable<string>;
|
|
238
|
-
renderAllContent: PropTypes.Requireable<boolean>;
|
|
239
|
-
size: PropTypes.Requireable<string | null>;
|
|
240
|
-
scrollButtons: PropTypes.Requireable<string>;
|
|
241
|
-
scrollButtonsPosition: PropTypes.Requireable<string>;
|
|
242
|
-
};
|
|
243
|
-
/**
|
|
244
|
-
* @hidden
|
|
245
|
-
*/
|
|
246
|
-
static defaultProps: {
|
|
247
|
-
animation: boolean;
|
|
248
|
-
tabPosition: string;
|
|
249
|
-
tabAlignment: string;
|
|
250
|
-
keepTabsMounted: boolean;
|
|
251
|
-
buttonScrollSpeed: number;
|
|
252
|
-
mouseScrollSpeed: number;
|
|
253
|
-
scrollButtons: string;
|
|
254
|
-
scrollButtonsPosition: string;
|
|
255
|
-
size: undefined;
|
|
256
|
-
renderAllContent: boolean;
|
|
257
|
-
};
|
|
258
|
-
private tabStripRef;
|
|
259
|
-
private itemsNavRef;
|
|
260
|
-
private resizeObserver?;
|
|
261
|
-
private get contentPanelId();
|
|
262
|
-
private get navItemId();
|
|
263
|
-
private navigation?;
|
|
264
|
-
constructor(props: TabStripProps);
|
|
265
|
-
/** @hidden */
|
|
266
|
-
componentDidMount(): void;
|
|
267
|
-
/** @hidden */
|
|
268
|
-
componentWillUnmount(): void;
|
|
269
|
-
private horizontalScroll;
|
|
270
|
-
/**
|
|
271
|
-
* @hidden
|
|
272
|
-
*/
|
|
273
|
-
private onScroll;
|
|
226
|
+
export interface TabStripHandle {
|
|
274
227
|
/**
|
|
275
|
-
*
|
|
276
|
-
*/
|
|
277
|
-
onSelect: (index: any) => void;
|
|
278
|
-
/**
|
|
279
|
-
* @hidden
|
|
280
|
-
*/
|
|
281
|
-
onKeyDown: (event: React.KeyboardEvent<HTMLElement>) => void;
|
|
282
|
-
/**
|
|
283
|
-
* @hidden
|
|
228
|
+
* The props of the TabStrip component.
|
|
284
229
|
*/
|
|
285
|
-
|
|
286
|
-
/**
|
|
287
|
-
* @hidden
|
|
288
|
-
*/
|
|
289
|
-
render(): React.JSX.Element;
|
|
290
|
-
private renderContent;
|
|
291
|
-
private children;
|
|
292
|
-
}
|
|
293
|
-
/**
|
|
294
|
-
* Represent the `ref` of the TabStrip component.
|
|
295
|
-
*/
|
|
296
|
-
export interface TabStripHandle extends Pick<TabStrip, keyof TabStrip> {
|
|
230
|
+
props: TabStripProps;
|
|
297
231
|
}
|
package/tabstrip/TabStrip.js
CHANGED
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const ce=require("react"),l=require("prop-types"),ee=require("./TabStripNavigation.js"),ae=require("./TabStripContent.js"),A=require("@progress/kendo-react-common");function ue(S){const C=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(S){for(const f in S)if(f!=="default"){const b=Object.getOwnPropertyDescriptor(S,f);Object.defineProperty(C,f,b.get?b:{enumerable:!0,get:()=>S[f]})}}return C.default=S,Object.freeze(C)}const n=ue(ce),de={animation:!0,tabPosition:"top",tabAlignment:"start",keepTabsMounted:!1,buttonScrollSpeed:100,mouseScrollSpeed:10,scrollButtons:"auto",scrollButtonsPosition:"split",renderAllContent:!1},E=n.forwardRef((S,C)=>{const f={...de,...S},{id:b,animation:H,children:j,selected:u,onSelect:B,style:te,tabContentStyle:q,tabPosition:p,tabAlignment:L,tabIndex:W,className:K,dir:x,renderAllContent:O,keepTabsMounted:_,size:k,scrollable:h,scrollButtons:I,scrollButtonsPosition:F,buttonScrollSpeed:U,mouseScrollSpeed:ne,prevButton:$,nextButton:G}=f,[g,oe]=n.useState(null),se=n.useRef({props:f}),R=n.useRef(null),z=n.useRef(null),y=n.useRef(void 0),P=n.useRef(void 0),J=n.useCallback(()=>({props:f}),[f]);n.useImperativeHandle(se,J),n.useImperativeHandle(C,J);const w=n.useMemo(()=>b?b+"-content-panel-id":void 0,[b]),N=n.useMemo(()=>b?b+"-nav-item-id":void 0,[b]),v=n.useMemo(()=>n.Children.toArray(j).filter(Boolean),[j]),Q=n.useCallback(()=>/top|bottom/.test(p||"top"),[p]),T=n.useCallback(()=>{const s=Q(),i=z.current;if(!i)return;const a=i.scrollLeft,t=i.clientWidth,e=i.scrollWidth,r=i.scrollTop,o=i.scrollHeight,d=i.clientHeight;let c=null;const ie=s?e>t:o>d,Z=x==="rtl";ie?s?a+t===e||(Z&&t-a)===e?c="end":a===0||Z&&-a===0?c="start":a>0&&a+t<e||-a>0&&t-a<e?c="middle":c=null:o-(r+d)===0?c="bottom":r===0?c="top":r>0&&o-(r+d)>0?c="middle":c=null:c=null,oe(c)},[Q,x]),D=n.useCallback(s=>{u!==s&&B&&B({selected:s})},[u,B]),m=n.useCallback(s=>{var t,e;const i=v;((e=(t=i==null?void 0:i[s])==null?void 0:t.props)==null?void 0:e.disabled)||D(s)},[v,D]),V=n.useCallback(s=>{P.current&&P.current.triggerKeyboardEvent(s)},[]);n.useEffect(()=>{var a;const s=R.current,i=s&&getComputedStyle(s).direction==="rtl"||!1;return s&&(P.current=new A.Navigation({tabIndex:0,root:R,rovingTabIndex:!0,focusClass:"k-focus",selectors:[".k-tabstrip .k-tabstrip-item"],keyboardEvents:{keydown:{ArrowLeft:(t,e,r)=>{r.preventDefault();const o=e.elements.indexOf(t),d=o!==0?o-1:e.elements.length-1,c=o!==e.elements.length-1?o+1:0;i?(e.focusNext(t),m(c)):(e.focusPrevious(t),m(d))},ArrowRight:(t,e,r)=>{r.preventDefault();const o=e.elements.indexOf(t),d=o!==0?o-1:e.elements.length-1,c=o!==e.elements.length-1?o+1:0;i?(e.focusPrevious(t),m(d)):(e.focusNext(t),m(c))},ArrowDown:(t,e,r)=>{r.preventDefault();const o=e.elements.indexOf(t),d=o!==e.elements.length-1?o+1:0;e.focusNext(t),m(d)},ArrowUp:(t,e,r)=>{r.preventDefault();const o=e.elements.indexOf(t),d=o!==0?o-1:e.elements.length-1;e.focusPrevious(t),m(d)},Home:(t,e,r)=>{r.preventDefault(),e.focusElement(e.first,t),m(0)},End:(t,e,r)=>{r.preventDefault(),e.focusElement(e.last,t),m(e.elements.length-1)}}}}),(a=P.current)==null||a.initializeRovingTab(u),T(),y.current=window.ResizeObserver&&new ResizeObserver(()=>T()),R.current&&y.current&&y.current.observe(R.current)),()=>{var t;(t=P.current)==null||t.removeFocusListener(),y.current&&y.current.disconnect()}},[u,m,T]);const re=n.useMemo(()=>{const s=n.Children.count(v);return u<s&&u>-1?n.createElement(ae.TabStripContent,{index:u,selected:u,contentPanelId:w,navItemId:N,animation:H,keepTabsMounted:_,renderAllContent:O,style:q},v):null},[u,v,w,N,H,_,O,q]),M=I==="hidden"||g===null&&I==="auto"?"hidden":"visible",X=n.useMemo(()=>({itemsNavRef:z,children:v,selected:u,tabIndex:W,tabPosition:p,tabAlignment:L,size:k,scrollable:h,scrollButtons:M,scrollButtonsPosition:F,buttonScrollSpeed:U,mouseScrollSpeed:ne,prevButton:$,nextButton:G,dir:x,contentPanelId:w,renderAllContent:O,navItemId:N,onKeyDown:V,onSelect:D,onScroll:T,containerScrollPosition:g}),[z,v,u,W,p,L,k,h,M,F,U,$,G,x,w,O,N,V,D,T,g]),Y=p==="bottom",le=n.useMemo(()=>A.classNames("k-tabstrip k-pos-relative",{[`k-tabstrip-${A.kendoThemeMaps.sizeMap[k||"medium"]||k}`]:k,"k-tabstrip-left":p==="left","k-tabstrip-right":p==="right","k-tabstrip-bottom":p==="bottom","k-tabstrip-top":p==="top","k-tabstrip-scrollable":h,"k-tabstrip-scrollable-start k-tabstrip-scrollable-end":h&&M==="visible","k-tabstrip-scrollable-start":h&&I==="auto"&&(g==="end"||g==="middle"),"k-tabstrip-scrollable-end":h&&I==="auto"&&(g==="start"||g==="middle")},K),[k,p,h,I,M,g,K]);return n.createElement("div",{id:b,ref:R,dir:x,className:le,style:te,onScroll:T},!Y&&n.createElement(ee.TabStripNavigation,{...X}),re,Y&&n.createElement(ee.TabStripNavigation,{...X}))});E.displayName="TabStrip";E.propTypes={id:l.string,animation:l.bool,children:l.node,onSelect:l.func,selected:l.number,style:l.object,tabContentStyle:l.object,tabPosition:l.string,tabAlignment:l.string,tabIndex:l.number,className:l.string,dir:l.string,renderAllContent:l.bool,size:l.oneOf(["small","medium","large"]),scrollButtons:l.oneOf(["auto","visible","hidden"]),scrollButtonsPosition:l.oneOf(["split","start","end","around","before","after"])};const be=E;exports.TabStrip=be;
|