@progress/kendo-react-layout 14.5.0-develop.13 → 14.5.0-develop.14
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/MenuMcpWrapper.d.ts +17 -0
- package/MenuMcpWrapper.js +8 -0
- package/MenuMcpWrapper.mjs +18 -0
- package/dist/cdn/js/kendo-react-layout.js +1 -1
- package/drawer/Drawer.js +1 -1
- package/drawer/Drawer.mjs +63 -63
- package/drawer/interfaces/DrawerProps.d.ts +8 -0
- package/index.d.mts +1 -2
- package/index.d.ts +1 -2
- package/index.js +1 -1
- package/index.mjs +128 -130
- package/menu/MenuProps.d.ts +6 -0
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -2
- package/package.json +8 -8
- package/panelbar/PanelBar.js +1 -1
- package/panelbar/PanelBar.mjs +92 -90
- package/panelbar/interfaces/PanelBarProps.d.ts +8 -0
- package/stepper/Stepper.js +1 -1
- package/stepper/Stepper.mjs +109 -107
- package/stepper/interfaces/StepperProps.d.ts +8 -1
- package/tabstrip/TabStrip.d.ts +8 -1
- package/tabstrip/TabStrip.js +1 -1
- package/tabstrip/TabStrip.mjs +126 -125
package/stepper/Stepper.mjs
CHANGED
|
@@ -6,83 +6,85 @@
|
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
8
|
import * as e from "react";
|
|
9
|
-
import
|
|
10
|
-
import { StepperContext as
|
|
11
|
-
import {
|
|
12
|
-
import { Step as
|
|
13
|
-
import { ProgressBar as
|
|
14
|
-
import { DEFAULT_ANIMATION_DURATION as
|
|
15
|
-
import { useLocalization as
|
|
16
|
-
import { progBarAriaLabel as
|
|
17
|
-
const
|
|
9
|
+
import o from "prop-types";
|
|
10
|
+
import { StepperContext as se } from "./context/StepperContext.mjs";
|
|
11
|
+
import { useWebMcpRegister as oe, focusFirstFocusableChild as re, useDir as ie, dispatchEvent as L, Navigation as le, classNames as A, svgIconPropType as P } from "@progress/kendo-react-common";
|
|
12
|
+
import { Step as ae } from "./Step.mjs";
|
|
13
|
+
import { ProgressBar as ce } from "@progress/kendo-react-progressbars";
|
|
14
|
+
import { DEFAULT_ANIMATION_DURATION as ue, NO_ANIMATION as de } from "./contants.mjs";
|
|
15
|
+
import { useLocalization as me } from "@progress/kendo-react-intl";
|
|
16
|
+
import { progBarAriaLabel as V, messages as pe } from "./messages/index.mjs";
|
|
17
|
+
const z = e.forwardRef((b, H) => {
|
|
18
18
|
const {
|
|
19
|
-
animationDuration:
|
|
19
|
+
animationDuration: k,
|
|
20
20
|
children: K,
|
|
21
21
|
className: x,
|
|
22
22
|
disabled: m,
|
|
23
23
|
errorIcon: G,
|
|
24
|
-
errorSVGIcon:
|
|
24
|
+
errorSVGIcon: _,
|
|
25
25
|
item: N,
|
|
26
26
|
items: p,
|
|
27
27
|
linear: g,
|
|
28
|
-
mode:
|
|
29
|
-
orientation:
|
|
28
|
+
mode: B,
|
|
29
|
+
orientation: h,
|
|
30
30
|
selectOnFocus: v,
|
|
31
|
-
style:
|
|
32
|
-
successIcon:
|
|
33
|
-
successSVGIcon:
|
|
31
|
+
style: R,
|
|
32
|
+
successIcon: U,
|
|
33
|
+
successSVGIcon: j,
|
|
34
34
|
value: a = 0,
|
|
35
|
-
onChange:
|
|
36
|
-
onFocus:
|
|
37
|
-
} =
|
|
38
|
-
|
|
39
|
-
|
|
35
|
+
onChange: I,
|
|
36
|
+
onFocus: C
|
|
37
|
+
} = b, q = me().toLanguageString(V, pe[V]), f = e.useRef(null), D = e.useRef(null);
|
|
38
|
+
oe("stepper", D, b, b.webMcp);
|
|
39
|
+
const w = e.useCallback(() => {
|
|
40
|
+
f.current && re(f.current);
|
|
41
|
+
}, []), E = e.useCallback(
|
|
40
42
|
() => ({
|
|
41
43
|
element: f.current,
|
|
42
|
-
focus:
|
|
44
|
+
focus: w
|
|
43
45
|
}),
|
|
44
|
-
[
|
|
46
|
+
[w]
|
|
45
47
|
);
|
|
46
|
-
e.useImperativeHandle(
|
|
47
|
-
const [
|
|
48
|
+
e.useImperativeHandle(H, E), e.useImperativeHandle(D, E);
|
|
49
|
+
const [W, u] = e.useState(a), d = p ? p.length : 0, s = h === "vertical", S = ie(f, b.dir), J = typeof k == "number" ? k : k !== !1 ? ue : de;
|
|
48
50
|
e.useEffect(() => {
|
|
49
51
|
u(a);
|
|
50
52
|
}, [a]);
|
|
51
|
-
const
|
|
53
|
+
const T = e.useCallback(
|
|
52
54
|
(l, r) => {
|
|
53
55
|
const t = r === a - 1, n = r === a, i = r === a + 1;
|
|
54
|
-
a !== r &&
|
|
56
|
+
a !== r && I && !m && (!g || t || n || i) && (L(I, l, E(), {
|
|
55
57
|
value: r
|
|
56
58
|
}), u(r));
|
|
57
59
|
},
|
|
58
|
-
[a, g,
|
|
60
|
+
[a, g, I, m, u]
|
|
59
61
|
), Q = e.useCallback(
|
|
60
62
|
(l) => {
|
|
61
63
|
const r = l.value, t = l.syntheticEvent;
|
|
62
|
-
|
|
64
|
+
T(t, r);
|
|
63
65
|
},
|
|
64
|
-
[
|
|
65
|
-
),
|
|
66
|
+
[T]
|
|
67
|
+
), X = e.useCallback(
|
|
66
68
|
(l) => {
|
|
67
|
-
|
|
68
|
-
|
|
69
|
+
C && !m && L(
|
|
70
|
+
C,
|
|
69
71
|
l.syntheticEvent,
|
|
70
|
-
|
|
72
|
+
E(),
|
|
71
73
|
void 0
|
|
72
74
|
);
|
|
73
75
|
},
|
|
74
|
-
[
|
|
75
|
-
),
|
|
76
|
-
const l =
|
|
77
|
-
return new
|
|
76
|
+
[C, m]
|
|
77
|
+
), y = e.useMemo(() => {
|
|
78
|
+
const l = S === "rtl", r = p.length - 1;
|
|
79
|
+
return new le({
|
|
78
80
|
root: f,
|
|
79
81
|
selectors: ["ol.k-step-list li.k-step a.k-step-link"],
|
|
80
82
|
tabIndex: 0,
|
|
81
83
|
keyboardEvents: {
|
|
82
84
|
keydown: {
|
|
83
85
|
Tab: (t, n, i) => {
|
|
84
|
-
const c = n.elements.indexOf(t),
|
|
85
|
-
i.shiftKey ? !l && c > 0 ? (i.preventDefault(), n.focusPrevious(t), u(c - 1), v &&
|
|
86
|
+
const c = n.elements.indexOf(t), M = n.previous(t).children[0], O = n.next(t).children[0];
|
|
87
|
+
i.shiftKey ? !l && c > 0 ? (i.preventDefault(), n.focusPrevious(t), u(c - 1), v && M.click()) : l && c < r && (i.preventDefault(), n.focusNext(t), u(c + 1), v && O.click()) : !l && c < r ? (i.preventDefault(), n.focusNext(t), u(c + 1), v && O.click()) : l && c > 0 && (i.preventDefault(), n.focusPrevious(t), u(c - 1), v && M.click());
|
|
86
88
|
},
|
|
87
89
|
Home: (t, n, i) => {
|
|
88
90
|
i.preventDefault(), n.focusElement(n.first, t), u(0);
|
|
@@ -99,9 +101,9 @@ const V = e.forwardRef((S, z) => {
|
|
|
99
101
|
}
|
|
100
102
|
}
|
|
101
103
|
});
|
|
102
|
-
}, [
|
|
103
|
-
e.useEffect(() => (
|
|
104
|
-
const
|
|
104
|
+
}, [S, p.length, u, v]);
|
|
105
|
+
e.useEffect(() => (y.initializeRovingTab(a), () => y.removeFocusListener()), []);
|
|
106
|
+
const Y = e.useCallback(y.triggerKeyboardEvent.bind(y), []), Z = e.useMemo(
|
|
105
107
|
() => A(
|
|
106
108
|
"k-stepper",
|
|
107
109
|
{
|
|
@@ -110,89 +112,89 @@ const V = e.forwardRef((S, z) => {
|
|
|
110
112
|
x
|
|
111
113
|
),
|
|
112
114
|
[g, x]
|
|
113
|
-
),
|
|
115
|
+
), $ = e.useMemo(
|
|
114
116
|
() => ({
|
|
115
117
|
display: "grid",
|
|
116
|
-
gridTemplateColumns:
|
|
117
|
-
gridTemplateRows:
|
|
118
|
-
...
|
|
118
|
+
gridTemplateColumns: s ? void 0 : "repeat(" + d * 2 + ", 1fr)",
|
|
119
|
+
gridTemplateRows: s ? "repeat(" + d + ", 1fr)" : void 0,
|
|
120
|
+
...R
|
|
119
121
|
}),
|
|
120
|
-
[
|
|
121
|
-
),
|
|
122
|
+
[s, d, R]
|
|
123
|
+
), ee = e.useMemo(
|
|
122
124
|
() => A("k-step-list", {
|
|
123
|
-
"k-step-list-horizontal": !
|
|
124
|
-
"k-step-list-vertical":
|
|
125
|
+
"k-step-list-horizontal": !s,
|
|
126
|
+
"k-step-list-vertical": s
|
|
125
127
|
}),
|
|
126
|
-
[
|
|
127
|
-
),
|
|
128
|
+
[s]
|
|
129
|
+
), te = e.useMemo(
|
|
128
130
|
() => ({
|
|
129
|
-
gridColumnStart:
|
|
130
|
-
gridColumnEnd:
|
|
131
|
-
gridRowStart:
|
|
132
|
-
gridRowEnd:
|
|
131
|
+
gridColumnStart: s ? void 0 : 1,
|
|
132
|
+
gridColumnEnd: s ? void 0 : -1,
|
|
133
|
+
gridRowStart: s ? 1 : void 0,
|
|
134
|
+
gridRowEnd: s ? -1 : void 0
|
|
133
135
|
}),
|
|
134
|
-
[
|
|
135
|
-
),
|
|
136
|
+
[s]
|
|
137
|
+
), ne = e.useMemo(
|
|
136
138
|
() => ({
|
|
137
|
-
gridColumnStart:
|
|
138
|
-
gridColumnEnd:
|
|
139
|
-
gridRowStart:
|
|
140
|
-
gridRowEnd:
|
|
141
|
-
top:
|
|
139
|
+
gridColumnStart: s ? void 0 : 2,
|
|
140
|
+
gridColumnEnd: s ? void 0 : d * 2,
|
|
141
|
+
gridRowStart: s ? 1 : void 0,
|
|
142
|
+
gridRowEnd: s ? d : void 0,
|
|
143
|
+
top: s ? 17 : void 0
|
|
142
144
|
}),
|
|
143
|
-
[
|
|
144
|
-
),
|
|
145
|
+
[s, d]
|
|
146
|
+
), F = p && p.map((l, r) => {
|
|
145
147
|
const t = {
|
|
146
148
|
index: r,
|
|
147
149
|
disabled: m || l.disabled,
|
|
148
|
-
focused: r ===
|
|
150
|
+
focused: r === W,
|
|
149
151
|
current: r === a,
|
|
150
152
|
...l
|
|
151
|
-
}, n = N ||
|
|
153
|
+
}, n = N || ae;
|
|
152
154
|
return /* @__PURE__ */ e.createElement(n, { key: r, ...t });
|
|
153
155
|
});
|
|
154
156
|
return /* @__PURE__ */ e.createElement(
|
|
155
|
-
|
|
157
|
+
se.Provider,
|
|
156
158
|
{
|
|
157
159
|
value: {
|
|
158
|
-
animationDuration:
|
|
159
|
-
isVertical:
|
|
160
|
+
animationDuration: k,
|
|
161
|
+
isVertical: s,
|
|
160
162
|
item: N,
|
|
161
163
|
linear: g,
|
|
162
|
-
mode:
|
|
164
|
+
mode: B,
|
|
163
165
|
numOfSteps: d,
|
|
164
166
|
value: a,
|
|
165
|
-
successIcon:
|
|
166
|
-
successSVGIcon:
|
|
167
|
+
successIcon: U,
|
|
168
|
+
successSVGIcon: j,
|
|
167
169
|
errorIcon: G,
|
|
168
|
-
errorSVGIcon:
|
|
170
|
+
errorSVGIcon: _,
|
|
169
171
|
onChange: Q,
|
|
170
|
-
onFocus:
|
|
172
|
+
onFocus: X
|
|
171
173
|
}
|
|
172
174
|
},
|
|
173
175
|
/* @__PURE__ */ e.createElement(
|
|
174
176
|
"nav",
|
|
175
177
|
{
|
|
176
|
-
className:
|
|
177
|
-
style:
|
|
178
|
-
dir:
|
|
178
|
+
className: Z,
|
|
179
|
+
style: $,
|
|
180
|
+
dir: S,
|
|
179
181
|
role: "navigation",
|
|
180
182
|
ref: f,
|
|
181
|
-
onKeyDown:
|
|
183
|
+
onKeyDown: Y
|
|
182
184
|
},
|
|
183
|
-
/* @__PURE__ */ e.createElement("ol", { className:
|
|
185
|
+
/* @__PURE__ */ e.createElement("ol", { className: ee, style: te }, F || K),
|
|
184
186
|
/* @__PURE__ */ e.createElement(
|
|
185
|
-
|
|
187
|
+
ce,
|
|
186
188
|
{
|
|
187
|
-
style:
|
|
189
|
+
style: ne,
|
|
188
190
|
labelPlacement: "start",
|
|
189
191
|
animation: { duration: J },
|
|
190
|
-
ariaLabel:
|
|
192
|
+
ariaLabel: q,
|
|
191
193
|
"aria-hidden": !0,
|
|
192
194
|
max: d - 1,
|
|
193
195
|
labelVisible: !1,
|
|
194
|
-
orientation:
|
|
195
|
-
reverse:
|
|
196
|
+
orientation: h,
|
|
197
|
+
reverse: h === "vertical",
|
|
196
198
|
value: a,
|
|
197
199
|
disabled: m,
|
|
198
200
|
tabIndex: -1
|
|
@@ -201,27 +203,27 @@ const V = e.forwardRef((S, z) => {
|
|
|
201
203
|
)
|
|
202
204
|
);
|
|
203
205
|
});
|
|
204
|
-
|
|
205
|
-
animationDuration:
|
|
206
|
-
children:
|
|
207
|
-
className:
|
|
208
|
-
dir:
|
|
209
|
-
disabled:
|
|
210
|
-
errorIcon:
|
|
211
|
-
errorSVGIcon:
|
|
212
|
-
item:
|
|
213
|
-
items:
|
|
214
|
-
linear:
|
|
215
|
-
mode:
|
|
216
|
-
orientation:
|
|
217
|
-
style:
|
|
218
|
-
successIcon:
|
|
219
|
-
successSVGIcon:
|
|
220
|
-
value:
|
|
221
|
-
onChange:
|
|
222
|
-
onFocus:
|
|
206
|
+
z.propTypes = {
|
|
207
|
+
animationDuration: o.oneOfType([o.bool, o.number]),
|
|
208
|
+
children: o.any,
|
|
209
|
+
className: o.string,
|
|
210
|
+
dir: o.string,
|
|
211
|
+
disabled: o.bool,
|
|
212
|
+
errorIcon: o.string,
|
|
213
|
+
errorSVGIcon: P,
|
|
214
|
+
item: o.any,
|
|
215
|
+
items: o.any,
|
|
216
|
+
linear: o.bool,
|
|
217
|
+
mode: o.oneOf(["steps", "labels"]),
|
|
218
|
+
orientation: o.oneOf(["horizontal", "vertical"]),
|
|
219
|
+
style: o.object,
|
|
220
|
+
successIcon: o.string,
|
|
221
|
+
successSVGIcon: P,
|
|
222
|
+
value: o.number.isRequired,
|
|
223
|
+
onChange: o.func,
|
|
224
|
+
onFocus: o.func
|
|
223
225
|
};
|
|
224
|
-
|
|
226
|
+
z.displayName = "KendoStepper";
|
|
225
227
|
export {
|
|
226
|
-
|
|
228
|
+
z as Stepper
|
|
227
229
|
};
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
import { StepProps } from './StepProps';
|
|
9
9
|
import { StepperChangeEvent } from './StepperChangeEvent';
|
|
10
10
|
import { StepperFocusEvent } from './StepperFocusEvent';
|
|
11
|
-
import { SVGIcon } from '@progress/kendo-react-common';
|
|
11
|
+
import { SVGIcon, WebMcpProps } from '@progress/kendo-react-common';
|
|
12
12
|
import * as React from 'react';
|
|
13
13
|
/**
|
|
14
14
|
* Represents the props of the [KendoReact Stepper component](https://www.telerik.com/kendo-react-ui/components/layout/stepper).
|
|
@@ -213,4 +213,11 @@ export interface StepperProps {
|
|
|
213
213
|
* ```
|
|
214
214
|
*/
|
|
215
215
|
onFocus?: (event: StepperFocusEvent) => void;
|
|
216
|
+
/**
|
|
217
|
+
* Enables Web MCP tool registration so AI agents can interact with this Stepper.
|
|
218
|
+
* Set to `true` to use the provider-level `dataName`, or pass a config object to override.
|
|
219
|
+
*
|
|
220
|
+
* Requires a `WebMcpProvider` ancestor from `@progress/kendo-react-webmcp`.
|
|
221
|
+
*/
|
|
222
|
+
webMcp?: boolean | WebMcpProps;
|
|
216
223
|
}
|
package/tabstrip/TabStrip.d.ts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
import { KendoReactComponentBaseProps } from '@progress/kendo-react-common';
|
|
8
|
+
import { KendoReactComponentBaseProps, WebMcpProps } from '@progress/kendo-react-common';
|
|
9
9
|
import { ButtonProps } from '@progress/kendo-react-buttons';
|
|
10
10
|
import * as React from 'react';
|
|
11
11
|
/**
|
|
@@ -208,6 +208,13 @@ export interface TabStripProps extends KendoReactComponentBaseProps, TabStripScr
|
|
|
208
208
|
* ```
|
|
209
209
|
*/
|
|
210
210
|
onSelect?: (e: TabStripSelectEventArguments) => void;
|
|
211
|
+
/**
|
|
212
|
+
* Enables Web MCP tool registration so AI agents can interact with this TabStrip.
|
|
213
|
+
* Set to `true` to use the provider-level `dataName`, or pass a config object to override.
|
|
214
|
+
*
|
|
215
|
+
* Requires a `WebMcpProvider` ancestor from `@progress/kendo-react-webmcp`.
|
|
216
|
+
*/
|
|
217
|
+
webMcp?: boolean | WebMcpProps;
|
|
211
218
|
}
|
|
212
219
|
/**
|
|
213
220
|
* @hidden
|
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 ce=require("react"),l=require("prop-types"),
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const ce=require("react"),l=require("prop-types"),ne=require("./TabStripNavigation.js"),ae=require("./TabStripContent.js"),B=require("@progress/kendo-react-common");function ue(g){const C=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(g){for(const u in g)if(u!=="default"){const p=Object.getOwnPropertyDescriptor(g,u);Object.defineProperty(C,u,p.get?p:{enumerable:!0,get:()=>g[u]})}}return C.default=g,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((g,C)=>{const u=n.useMemo(()=>({...de,...g}),[g]),{id:p,animation:H,children:j,selected:d,onSelect:z,style:oe,tabContentStyle:q,tabPosition:f,tabAlignment:W,tabIndex:L,className:K,dir:x,renderAllContent:O,keepTabsMounted:_,size:k,scrollable:h,scrollButtons:R,scrollButtonsPosition:F,buttonScrollSpeed:U,mouseScrollSpeed:$,prevButton:G,nextButton:J}=u,[S,se]=n.useState(null),Q=n.useRef({props:u}),I=n.useRef(null),A=n.useRef(null),y=n.useRef(void 0),P=n.useRef(void 0),V=n.useCallback(()=>({props:u}),[u]);n.useImperativeHandle(Q,V),n.useImperativeHandle(C,V),B.useWebMcpRegister("tabstrip",Q,u,u.webMcp);const w=n.useMemo(()=>p?p+"-content-panel-id":void 0,[p]),M=n.useMemo(()=>p?p+"-nav-item-id":void 0,[p]),v=n.useMemo(()=>n.Children.toArray(j).filter(Boolean),[j]),X=n.useCallback(()=>/top|bottom/.test(f||"top"),[f]),T=n.useCallback(()=>{const s=X(),i=A.current;if(!i)return;const a=i.scrollLeft,t=i.clientWidth,e=i.scrollWidth,r=i.scrollTop,o=i.scrollHeight,b=i.clientHeight;let c=null;const ie=s?e>t:o>b,te=x==="rtl";ie?s?a+t===e||(te&&t-a)===e?c="end":a===0||te&&-a===0?c="start":a>0&&a+t<e||-a>0&&t-a<e?c="middle":c=null:o-(r+b)===0?c="bottom":r===0?c="top":r>0&&o-(r+b)>0?c="middle":c=null:c=null,se(c)},[X,x]),N=n.useCallback(s=>{d!==s&&z&&z({selected:s})},[d,z]),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)||N(s)},[v,N]),Y=n.useCallback(s=>{P.current&&P.current.triggerKeyboardEvent(s)},[]);n.useEffect(()=>{var a;const s=I.current,i=s&&getComputedStyle(s).direction==="rtl"||!1;return s&&(P.current=new B.Navigation({tabIndex:0,root:I,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),b=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(b))},ArrowRight:(t,e,r)=>{r.preventDefault();const o=e.elements.indexOf(t),b=o!==0?o-1:e.elements.length-1,c=o!==e.elements.length-1?o+1:0;i?(e.focusPrevious(t),m(b)):(e.focusNext(t),m(c))},ArrowDown:(t,e,r)=>{r.preventDefault();const o=e.elements.indexOf(t),b=o!==e.elements.length-1?o+1:0;e.focusNext(t),m(b)},ArrowUp:(t,e,r)=>{r.preventDefault();const o=e.elements.indexOf(t),b=o!==0?o-1:e.elements.length-1;e.focusPrevious(t),m(b)},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(d),T(),y.current=window.ResizeObserver&&new ResizeObserver(()=>T()),I.current&&y.current&&y.current.observe(I.current)),()=>{var t;(t=P.current)==null||t.removeFocusListener(),y.current&&y.current.disconnect()}},[d,m,T]);const re=n.useMemo(()=>{const s=n.Children.count(v);return d<s&&d>-1?n.createElement(ae.TabStripContent,{index:d,selected:d,contentPanelId:w,navItemId:M,animation:H,keepTabsMounted:_,renderAllContent:O,style:q},v):null},[d,v,w,M,H,_,O,q]),D=R==="hidden"||S===null&&R==="auto"?"hidden":"visible",Z=n.useMemo(()=>({itemsNavRef:A,children:v,selected:d,tabIndex:L,tabPosition:f,tabAlignment:W,size:k,scrollable:h,scrollButtons:D,scrollButtonsPosition:F,buttonScrollSpeed:U,mouseScrollSpeed:$,prevButton:G,nextButton:J,dir:x,contentPanelId:w,renderAllContent:O,navItemId:M,onKeyDown:Y,onSelect:N,onScroll:T,containerScrollPosition:S}),[A,v,d,L,f,W,k,h,D,F,U,$,G,J,x,w,O,M,Y,N,T,S]),ee=f==="bottom",le=n.useMemo(()=>B.classNames("k-tabstrip k-pos-relative",{[`k-tabstrip-${B.kendoThemeMaps.sizeMap[k||"medium"]||k}`]:k,"k-tabstrip-left":f==="left","k-tabstrip-right":f==="right","k-tabstrip-bottom":f==="bottom","k-tabstrip-top":f==="top","k-tabstrip-scrollable":h,"k-tabstrip-scrollable-start k-tabstrip-scrollable-end":h&&D==="visible","k-tabstrip-scrollable-start":h&&R==="auto"&&(S==="end"||S==="middle"),"k-tabstrip-scrollable-end":h&&R==="auto"&&(S==="start"||S==="middle")},K),[k,f,h,R,D,S,K]);return n.createElement("div",{id:p,ref:I,dir:x,className:le,style:oe,onScroll:T},!ee&&n.createElement(ne.TabStripNavigation,{...Z}),re,ee&&n.createElement(ne.TabStripNavigation,{...Z}))});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;
|