@progress/kendo-react-buttons 14.2.2-develop.1 → 14.3.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/SegmentedControl/SegmentedControl.d.ts +10 -0
- package/SegmentedControl/SegmentedControl.js +8 -0
- package/SegmentedControl/SegmentedControl.mjs +140 -0
- package/SegmentedControl/index.d.ts +9 -0
- package/SegmentedControl/interfaces/SegmentedControlTypes.d.ts +168 -0
- package/SegmentedControl/interfaces/index.d.ts +8 -0
- package/dist/cdn/js/kendo-react-buttons.js +1 -1
- package/index.d.mts +1 -0
- package/index.d.ts +1 -0
- package/index.js +1 -1
- package/index.mjs +12 -10
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +1 -1
- package/package.json +5 -5
|
@@ -0,0 +1,10 @@
|
|
|
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 { SegmentedControlHandle, SegmentedControlProps } from './interfaces/index.js';
|
|
9
|
+
import * as React from 'react';
|
|
10
|
+
export declare const SegmentedControl: React.ForwardRefExoticComponent<SegmentedControlProps & React.RefAttributes<SegmentedControlHandle>>;
|
|
@@ -0,0 +1,8 @@
|
|
|
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
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const F=require("react"),m=require("@progress/kendo-react-common");function H(c){const u=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(c){for(const l in c)if(l!=="default"){const a=Object.getOwnPropertyDescriptor(c,l);Object.defineProperty(u,l,a.get?a:{enumerable:!0,get:()=>c[l]})}}return u.default=c,Object.freeze(u)}const n=H(F),R=n.forwardRef((c,u)=>{const{items:l=[],size:a,layoutMode:O="compact",value:d,onChange:b,itemTemplate:y,defaultValue:E,className:I,...z}=c,V=a?m.kendoThemeMaps.sizeMap[a]:void 0,k=n.useRef(null),S=n.useRef(null),[v,j]=n.useState({selectedValue:E,focusedValue:void 0}),h=d!=null?d:v.selectedValue,w=v.focusedValue,o=n.useCallback(()=>{const e=k.current,t=S.current;if(!e||!t)return;const s=e.querySelector(".k-segmented-control-button.k-selected");if(!s)return;const r=e.offsetWidth,{offsetWidth:g,offsetLeft:f}=s,p=`${f}px`,C=`${r-f-g}px`;t.style.left!==p&&(t.style.left=p),t.style.right!==C&&(t.style.right=C)},[]),i=e=>{j(t=>({...t,...e}))},T=n.useCallback(e=>t=>{var s,r;if(h===e.value){(s=e.onClick)==null||s.call(e,t);return}d===void 0&&e&&i({selectedValue:e.value}),b==null||b(e.value),(r=e.onClick)==null||r.call(e,t),o()},[d,b,o,h]),W=n.useCallback((e,t)=>s=>{i({hoveredValue:e}),t==null||t(s)},[]),x=n.useCallback(e=>t=>{i({hoveredValue:void 0}),e==null||e(t)},[]),P=n.useCallback((e,t)=>s=>{i({focusedValue:e}),t==null||t(s)},[]),q=n.useCallback(e=>t=>{i({focusedValue:void 0}),e==null||e(t)},[]);return n.useLayoutEffect(()=>{o()},[h,o]),n.useEffect(()=>{const e=k.current;if(!e)return;const t=new ResizeObserver(()=>{o()});return t.observe(e),()=>{t.disconnect()}},[o]),n.useImperativeHandle(u,()=>({element:k.current}),[]),n.createElement("div",{ref:k,className:m.classNames("k-segmented-control",V&&`k-segmented-control-${V}`,{"k-segmented-control-stretched":O==="stretch"},I),...z},n.createElement("div",{className:"k-segmented-control-thumb",ref:S,"aria-hidden":"true"}),l.map(e=>{const{value:t,disabled:s,text:r,svgIcon:g,iconClassName:f,type:p="button",onClick:C,onMouseEnter:L,onMouseLeave:M,onFocus:_,onBlur:$,...A}=e,N=h===t;return n.createElement("button",{key:t,type:p,className:m.classNames("k-segmented-control-button",{"k-selected":N,"k-hover":v.hoveredValue===t&&!s,"k-focus":w===t&&!s,"k-disabled":s}),disabled:s,onClick:T(e),onMouseEnter:W(t,L),onMouseLeave:x(M),onFocus:P(t,_),onBlur:q($),...A},y?y(e):n.createElement(n.Fragment,null,g&&n.createElement(m.IconWrap,{className:m.classNames("k-segmented-control-button-icon",{...f&&{[f]:N}}),icon:g}),n.createElement("span",{className:"k-segmented-control-button-text"},r)))}))});R.displayName="KendoReactSegmentedControl";exports.SegmentedControl=R;
|
|
@@ -0,0 +1,140 @@
|
|
|
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 * as s from "react";
|
|
9
|
+
import { kendoThemeMaps as M, classNames as b, IconWrap as P } from "@progress/kendo-react-common";
|
|
10
|
+
const j = s.forwardRef((y, N) => {
|
|
11
|
+
const {
|
|
12
|
+
items: R = [],
|
|
13
|
+
size: v,
|
|
14
|
+
layoutMode: S = "compact",
|
|
15
|
+
value: o,
|
|
16
|
+
onChange: d,
|
|
17
|
+
itemTemplate: p,
|
|
18
|
+
defaultValue: E,
|
|
19
|
+
className: I,
|
|
20
|
+
...x
|
|
21
|
+
} = y, g = v ? M.sizeMap[v] : void 0, a = s.useRef(null), C = s.useRef(null), [k, z] = s.useState({
|
|
22
|
+
selectedValue: E,
|
|
23
|
+
focusedValue: void 0
|
|
24
|
+
}), i = o != null ? o : k.selectedValue, W = k.focusedValue, l = s.useCallback(() => {
|
|
25
|
+
const e = a.current, t = C.current;
|
|
26
|
+
if (!e || !t)
|
|
27
|
+
return;
|
|
28
|
+
const n = e.querySelector(".k-segmented-control-button.k-selected");
|
|
29
|
+
if (!n)
|
|
30
|
+
return;
|
|
31
|
+
const c = e.offsetWidth, { offsetWidth: f, offsetLeft: u } = n, m = `${u}px`, h = `${c - u - f}px`;
|
|
32
|
+
t.style.left !== m && (t.style.left = m), t.style.right !== h && (t.style.right = h);
|
|
33
|
+
}, []), r = (e) => {
|
|
34
|
+
z((t) => ({ ...t, ...e }));
|
|
35
|
+
}, w = s.useCallback(
|
|
36
|
+
(e) => (t) => {
|
|
37
|
+
var n, c;
|
|
38
|
+
if (i === e.value) {
|
|
39
|
+
(n = e.onClick) == null || n.call(e, t);
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
o === void 0 && e && r({ selectedValue: e.value }), d == null || d(e.value), (c = e.onClick) == null || c.call(e, t), l();
|
|
43
|
+
},
|
|
44
|
+
[o, d, l, i]
|
|
45
|
+
), L = s.useCallback(
|
|
46
|
+
(e, t) => (n) => {
|
|
47
|
+
r({ hoveredValue: e }), t == null || t(n);
|
|
48
|
+
},
|
|
49
|
+
[]
|
|
50
|
+
), T = s.useCallback((e) => (t) => {
|
|
51
|
+
r({ hoveredValue: void 0 }), e == null || e(t);
|
|
52
|
+
}, []), $ = s.useCallback((e, t) => (n) => {
|
|
53
|
+
r({ focusedValue: e }), t == null || t(n);
|
|
54
|
+
}, []), O = s.useCallback((e) => (t) => {
|
|
55
|
+
r({ focusedValue: void 0 }), e == null || e(t);
|
|
56
|
+
}, []);
|
|
57
|
+
return s.useLayoutEffect(() => {
|
|
58
|
+
l();
|
|
59
|
+
}, [i, l]), s.useEffect(() => {
|
|
60
|
+
const e = a.current;
|
|
61
|
+
if (!e)
|
|
62
|
+
return;
|
|
63
|
+
const t = new ResizeObserver(() => {
|
|
64
|
+
l();
|
|
65
|
+
});
|
|
66
|
+
return t.observe(e), () => {
|
|
67
|
+
t.disconnect();
|
|
68
|
+
};
|
|
69
|
+
}, [l]), s.useImperativeHandle(
|
|
70
|
+
N,
|
|
71
|
+
() => ({
|
|
72
|
+
element: a.current
|
|
73
|
+
}),
|
|
74
|
+
[]
|
|
75
|
+
), /* @__PURE__ */ s.createElement(
|
|
76
|
+
"div",
|
|
77
|
+
{
|
|
78
|
+
ref: a,
|
|
79
|
+
className: b(
|
|
80
|
+
"k-segmented-control",
|
|
81
|
+
g && `k-segmented-control-${g}`,
|
|
82
|
+
{
|
|
83
|
+
"k-segmented-control-stretched": S === "stretch"
|
|
84
|
+
},
|
|
85
|
+
I
|
|
86
|
+
),
|
|
87
|
+
...x
|
|
88
|
+
},
|
|
89
|
+
/* @__PURE__ */ s.createElement("div", { className: "k-segmented-control-thumb", ref: C, "aria-hidden": "true" }),
|
|
90
|
+
R.map((e) => {
|
|
91
|
+
const {
|
|
92
|
+
value: t,
|
|
93
|
+
disabled: n,
|
|
94
|
+
text: c,
|
|
95
|
+
svgIcon: f,
|
|
96
|
+
iconClassName: u,
|
|
97
|
+
type: m = "button",
|
|
98
|
+
onClick: h,
|
|
99
|
+
onMouseEnter: q,
|
|
100
|
+
onMouseLeave: A,
|
|
101
|
+
onFocus: F,
|
|
102
|
+
onBlur: H,
|
|
103
|
+
...K
|
|
104
|
+
} = e, V = i === t;
|
|
105
|
+
return /* @__PURE__ */ s.createElement(
|
|
106
|
+
"button",
|
|
107
|
+
{
|
|
108
|
+
key: t,
|
|
109
|
+
type: m,
|
|
110
|
+
className: b("k-segmented-control-button", {
|
|
111
|
+
"k-selected": V,
|
|
112
|
+
"k-hover": k.hoveredValue === t && !n,
|
|
113
|
+
"k-focus": W === t && !n,
|
|
114
|
+
"k-disabled": n
|
|
115
|
+
}),
|
|
116
|
+
disabled: n,
|
|
117
|
+
onClick: w(e),
|
|
118
|
+
onMouseEnter: L(t, q),
|
|
119
|
+
onMouseLeave: T(A),
|
|
120
|
+
onFocus: $(t, F),
|
|
121
|
+
onBlur: O(H),
|
|
122
|
+
...K
|
|
123
|
+
},
|
|
124
|
+
p ? p(e) : /* @__PURE__ */ s.createElement(s.Fragment, null, f && /* @__PURE__ */ s.createElement(
|
|
125
|
+
P,
|
|
126
|
+
{
|
|
127
|
+
className: b("k-segmented-control-button-icon", {
|
|
128
|
+
...u && { [u]: V }
|
|
129
|
+
}),
|
|
130
|
+
icon: f
|
|
131
|
+
}
|
|
132
|
+
), /* @__PURE__ */ s.createElement("span", { className: "k-segmented-control-button-text" }, c))
|
|
133
|
+
);
|
|
134
|
+
})
|
|
135
|
+
);
|
|
136
|
+
});
|
|
137
|
+
j.displayName = "KendoReactSegmentedControl";
|
|
138
|
+
export {
|
|
139
|
+
j as SegmentedControl
|
|
140
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
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
|
+
export * from './SegmentedControl.js';
|
|
9
|
+
export * from './interfaces/index.js';
|
|
@@ -0,0 +1,168 @@
|
|
|
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 { ButtonProps } from '../../Button.js';
|
|
9
|
+
import { SVGIcon } from '@progress/kendo-svg-icons';
|
|
10
|
+
/**
|
|
11
|
+
* Represents the properties of a single item within the SegmentedControl component.
|
|
12
|
+
*/
|
|
13
|
+
export interface SegmentedItemProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
14
|
+
/**
|
|
15
|
+
* The unique identifier for the SegmentedItem. Used to match against the SegmentedControl's `value` to determine selection.
|
|
16
|
+
*/
|
|
17
|
+
value: string;
|
|
18
|
+
/**
|
|
19
|
+
* Sets an SVG icon to render inside the item using an `IconWrap` element.
|
|
20
|
+
* Only rendered when `itemTemplate` is not provided.
|
|
21
|
+
*/
|
|
22
|
+
svgIcon?: SVGIcon;
|
|
23
|
+
/**
|
|
24
|
+
* Specifies the text label of the SegmentedItem.
|
|
25
|
+
* Rendered inside a `<span>` element. Only rendered when `itemTemplate` is not provided.
|
|
26
|
+
*/
|
|
27
|
+
text?: string;
|
|
28
|
+
/**
|
|
29
|
+
* CSS class name applied to the icon element only when the item is selected (`isSelected` is `true`).
|
|
30
|
+
* Has no effect when `itemTemplate` is provided.
|
|
31
|
+
*/
|
|
32
|
+
iconClassName?: string;
|
|
33
|
+
/**
|
|
34
|
+
* Sets the `title` HTML attribute of the item button.
|
|
35
|
+
*/
|
|
36
|
+
title?: string;
|
|
37
|
+
/**
|
|
38
|
+
* Represents the `dir` HTML attribute of the item button, controlling text directionality.
|
|
39
|
+
*/
|
|
40
|
+
dir?: string;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Represents a reference handle to the SegmentedControl component, exposed via `React.forwardRef`.
|
|
44
|
+
*
|
|
45
|
+
* Provides access to the underlying root DOM element of the SegmentedControl.
|
|
46
|
+
*/
|
|
47
|
+
export interface SegmentedControlHandle {
|
|
48
|
+
/**
|
|
49
|
+
* The root `<div>` DOM element of the SegmentedControl.
|
|
50
|
+
*/
|
|
51
|
+
element: HTMLDivElement | null;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Represents the properties of the SegmentedControl component.
|
|
55
|
+
*
|
|
56
|
+
* The SegmentedControl displays a horizontal set of mutually exclusive button segments, allowing the user to select one option at a time.
|
|
57
|
+
*/
|
|
58
|
+
export interface SegmentedControlProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange'> {
|
|
59
|
+
/**
|
|
60
|
+
* Specifies the collection of items rendered as buttons inside the SegmentedControl.
|
|
61
|
+
*/
|
|
62
|
+
items?: Array<SegmentedItemProps>;
|
|
63
|
+
/**
|
|
64
|
+
* Sets the size of the SegmentedControl items. The value is mapped through `kendoThemeMaps.sizeMap` to the corresponding CSS size class.
|
|
65
|
+
*/
|
|
66
|
+
size?: ButtonProps['size'];
|
|
67
|
+
/**
|
|
68
|
+
* Specifies the layout mode of the SegmentedControl.
|
|
69
|
+
*
|
|
70
|
+
* - `compact`: Items are sized based on their content (default).
|
|
71
|
+
* - `stretch`: Items stretch to fill the available horizontal space, applying the `k-segmented-control-stretched` CSS class.
|
|
72
|
+
*
|
|
73
|
+
* @default "compact"
|
|
74
|
+
*/
|
|
75
|
+
layoutMode?: 'compact' | 'stretch';
|
|
76
|
+
/**
|
|
77
|
+
* The currently selected item value.
|
|
78
|
+
* When provided, the component operates in controlled mode and `onChange` must be used to update this value.
|
|
79
|
+
* The item whose `value` matches this prop receives the `k-selected` CSS class.
|
|
80
|
+
*
|
|
81
|
+
* @example
|
|
82
|
+
* ```tsx
|
|
83
|
+
* <SegmentedControl
|
|
84
|
+
* value="option1"
|
|
85
|
+
* onChange={(value) => setSelectedValue(value)}
|
|
86
|
+
* items={items}
|
|
87
|
+
* />
|
|
88
|
+
* ```
|
|
89
|
+
*/
|
|
90
|
+
value?: string;
|
|
91
|
+
/**
|
|
92
|
+
* Sets the initially selected item value when the component is in uncontrolled mode (i.e., `value` is not provided).
|
|
93
|
+
* Once set, subsequent changes to `defaultValue` are ignored.
|
|
94
|
+
*
|
|
95
|
+
* @example
|
|
96
|
+
* ```tsx
|
|
97
|
+
* <SegmentedControl
|
|
98
|
+
* defaultValue="option2"
|
|
99
|
+
* onChange={(value) => console.log('Selected:', value)}
|
|
100
|
+
* items={items}
|
|
101
|
+
* />
|
|
102
|
+
* ```
|
|
103
|
+
*/
|
|
104
|
+
defaultValue?: string;
|
|
105
|
+
/**
|
|
106
|
+
* Callback fired when a non-selected item is clicked and the selection changes.
|
|
107
|
+
* Not triggered when the already-selected item is clicked.
|
|
108
|
+
* Receives the `value` of the newly selected item.
|
|
109
|
+
*
|
|
110
|
+
* @example
|
|
111
|
+
* ```tsx
|
|
112
|
+
* <SegmentedControl
|
|
113
|
+
* onChange={(value) => {
|
|
114
|
+
* console.log('Selected value:', value);
|
|
115
|
+
* }}
|
|
116
|
+
* items={items}
|
|
117
|
+
* />
|
|
118
|
+
* ```
|
|
119
|
+
*/
|
|
120
|
+
onChange?: (value: string) => void;
|
|
121
|
+
/**
|
|
122
|
+
* A custom render function for the item content. When provided, it replaces the default rendering (SVG icon + text span) entirely.
|
|
123
|
+
* Receives the full item configuration object and must return a React node.
|
|
124
|
+
*
|
|
125
|
+
* @param itemData - The item configuration object containing value, text, svgIcon, etc.
|
|
126
|
+
* @returns React node to render inside the item button
|
|
127
|
+
*
|
|
128
|
+
* @example
|
|
129
|
+
* ```tsx
|
|
130
|
+
* <SegmentedControl
|
|
131
|
+
* items={items}
|
|
132
|
+
* itemTemplate={(itemData) => (
|
|
133
|
+
* <div className="custom-item-content">
|
|
134
|
+
* {itemData.svgIcon && <span className="icon">{itemData.svgIcon}</span>}
|
|
135
|
+
* <span className="text">{itemData.text}</span>
|
|
136
|
+
* <span className="badge">New</span>
|
|
137
|
+
* </div>
|
|
138
|
+
* )}
|
|
139
|
+
* />
|
|
140
|
+
* ```
|
|
141
|
+
*/
|
|
142
|
+
itemTemplate?: (itemData: SegmentedItemProps) => React.ReactNode;
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* Represents the internal interaction state of the SegmentedControl component.
|
|
146
|
+
*
|
|
147
|
+
* Tracks which items are currently selected, hovered over, or have keyboard focus,
|
|
148
|
+
* used to apply the corresponding CSS state classes (`k-selected`, `k-hover`, `k-focus`) during user interactions.
|
|
149
|
+
*
|
|
150
|
+
* @hidden
|
|
151
|
+
*/
|
|
152
|
+
export interface SegmentedControlState {
|
|
153
|
+
/**
|
|
154
|
+
* The `value` of the currently selected item in uncontrolled mode.
|
|
155
|
+
* Undefined when no item has been selected yet.
|
|
156
|
+
*/
|
|
157
|
+
selectedValue?: string;
|
|
158
|
+
/**
|
|
159
|
+
* The `value` of the item currently being hovered over.
|
|
160
|
+
* Set on `mouseenter` and cleared on `mouseleave`. Undefined when no item is hovered.
|
|
161
|
+
*/
|
|
162
|
+
hoveredValue?: string;
|
|
163
|
+
/**
|
|
164
|
+
* The `value` of the item that currently has keyboard focus.
|
|
165
|
+
* Set on `focus` and cleared on `blur`. Undefined when no item is focused.
|
|
166
|
+
*/
|
|
167
|
+
focusedValue?: string;
|
|
168
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
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
|
+
export * from './SegmentedControlTypes.js';
|
|
@@ -12,4 +12,4 @@
|
|
|
12
12
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
13
13
|
*-------------------------------------------------------------------------------------------
|
|
14
14
|
*/
|
|
15
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("prop-types"),require("@progress/kendo-react-common"),require("@progress/kendo-react-popup"),require("@progress/kendo-svg-icons"),require("@progress/kendo-react-intl"),require("@progress/kendo-webspeech-common"),require("@progress/kendo-smartpaste-common")):"function"==typeof define&&define.amd?define(["exports","react","prop-types","@progress/kendo-react-common","@progress/kendo-react-popup","@progress/kendo-svg-icons","@progress/kendo-react-intl","@progress/kendo-webspeech-common","@progress/kendo-smartpaste-common"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).KendoReactButtons={},e.React,e.PropTypes,e.KendoReactCommon,e.KendoReactPopup,e.KendoSvgIcons,e.KendoReactIntl,e.KendoWebspeechCommon,e.KendoSmartpasteCommon)}(this,function(e,t,n,s,o,r,i,a,l){"use strict";function c(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(n){if("default"!==n){var s=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,s.get?s:{enumerable:!0,get:function(){return e[n]}})}}),t.default=e,Object.freeze(t)}var d=c(t);const u=d.forwardRef((e,t)=>{const{children:n,togglable:o,dir:r,disabled:i,selected:a,icon:l,iconClass:c,svgIcon:u,imageUrl:m,imageAlt:h,className:f,startIcon:v,endIcon:g,onClick:b,size:y=p.size,rounded:k=p.rounded,fillMode:C=p.fillMode,themeColor:I=p.themeColor,ariaPressed:x,iconSize:w,...E}=e,D=d.useRef(void 0),N=d.useRef(null),[S,B]=d.useState(!0===o&&!0===a),K=void 0!==u||void 0!==l||void 0!==c||void 0!==m,R=void 0!==n,O=s.useUnstyled(),M=e.unstyled||O,z=M&&M.uButton;d.useImperativeHandle(t,()=>({element:N.current,selected:void 0!==D.current?D.current:S})),d.useMemo(()=>{o&&void 0!==a&&a!==S&&B(a)},[o,a]),d.useEffect(()=>{D.current=void 0},[S]);const F=function({imageUrl:e,name:t,iconClass:n,svgIcon:o,imageAlt:r,buttonClasses:i,iconSize:a}){return e?d.createElement("img",{role:"presentation",className:s.classNames(s.uButton.icon({c:i})),alt:r,src:e}):t||o?d.createElement(s.IconWrap,{className:s.classNames(s.uButton.icon({c:i})),name:t,icon:o,size:a}):n?d.createElement("span",{role:"presentation",className:s.classNames(s.uButton.icon({c:i}),n)}):null}({name:l,svgIcon:u,iconClass:c,imageUrl:m,imageAlt:h,buttonClasses:z,iconSize:w}),P=e=>d.cloneElement(e,{className:s.classNames(s.uButton.icon({c:z}),e.props.className)}),T=d.useMemo(()=>o?S:x||void 0,[]);return d.createElement("button",{ref:N,"aria-pressed":T,...E,dir:r,disabled:i,onClick:e=>{o&&void 0===a&&(D.current=!S,B(!S)),b&&b.call(void 0,e)},className:s.classNames(s.uButton.wrapper({c:z,isRtl:"rtl"===r,selected:S,disabled:i,size:y,fillMode:C,rounded:k,themeColor:I,iconButton:!R&&K}),f)},v&&P(v),F,n&&d.createElement("span",{className:s.classNames(s.uButton.text({c:z}))},n),g&&P(g))}),p={size:void 0,rounded:void 0,fillMode:void 0,themeColor:void 0};u.displayName="KendoReactButton",u.propTypes={children:n.node,selected:n.bool,togglable:n.bool,icon:n.string,svgIcon:s.svgIconPropType,iconClass:n.string,imageUrl:n.string,imageAlt:n.string,size:n.oneOf(["small","medium","large"]),rounded:n.oneOf(["small","medium","large","full","none"]),fillMode:n.oneOf(["flat","link","outline","solid","clear"]),themeColor:n.oneOf(["base","primary","secondary","tertiary","info","success","warning","error","dark","light","inverse"])};const m=e=>{const{children:t,className:n,dir:o,disabled:r,width:i}=e,a=s.useUnstyled(),l=e.unstyled||a,c=l&&l.uButtonGroup,u=(e,t)=>{const n={...i?{width:i}:{},...e.props.style||{}},s=r||e.props.disabled,o={...e.props,...t?{className:t}:{},...Object.keys(n).length?{style:n}:{},...void 0!==s?{disabled:s}:{}};return d.Children.count(e.props.children)>0?d.cloneElement(e,o,e.props.children):d.cloneElement(e,o)},p=d.useRef(null),m=(e=>{const t=d.Children.count(e),n=void 0!==o?"rtl"===o:p.current&&"rtl"===getComputedStyle(p.current).direction||!1;return d.Children.map(e,(e,o)=>{if(d.isValidElement(e)){const r=o===t-1,i=n,a=s.classNames(e.props.className,s.uButtonGroup.position({c:c,start:i?r:0===o,end:i?0===o:r}));return u(e,a)}return e})})(t),h=s.classNames(s.uButtonGroup.wrapper({c:c,stretched:!!i,disabled:r}),n),f={className:h,style:{width:`${i}`},dir:o,role:"group","aria-disabled":r};return d.createElement("div",{ref:p,...f,className:h},m)};m.propTypes={children:n.oneOfType([n.arrayOf(n.element),n.element]),className:n.string,disabled:n.bool,width:n.string,dir:n.string};const h=e=>{const t=s.useUnstyled(),n=e.unstyled||t,o=n&&n.uDropDownButton,r=d.useCallback(t=>{e.onClick(t,e.index)},[e]),i=e.dataItem.render||e.item||(void 0===e.item?e.render:null),a=void 0!==e.dataItem.text?e.dataItem.text:e.textField?e.dataItem[e.textField]:e.dataItem,l=d.createElement("li",{id:e.id,className:s.classNames(s.uDropDownButton.li({c:o,focused:e.focused}),e.className),tabIndex:-1,onClick:r,onMouseDown:e.onDown,onPointerDown:e.onDown,role:"menuitem","aria-disabled":e.dataItem.disabled||void 0},d.createElement("span",{tabIndex:-1,className:s.classNames(s.uDropDownButton.link({c:o,selected:e.dataItem.selected,disabled:e.dataItem.disabled})),key:"icon"},i?d.createElement(i,{item:e.dataItem,itemIndex:e.index}):d.createElement(d.Fragment,null,(e.dataItem.icon||e.dataItem.iconClass||e.dataItem.svgIcon)&&d.createElement(s.IconWrap,{className:e.dataItem.iconClass,name:e.dataItem.icon,icon:e.dataItem.svgIcon}),e.dataItem.imageUrl&&d.createElement("img",{role:"presentation",alt:"",src:e.dataItem.imageUrl,className:"k-icon"}),a&&d.createElement("span",{className:"k-menu-link-text"},a))));return void 0!==e.item&&void 0!==e.render?e.render.call(void 0,l,e):l};h.displayName="KendoReactButtonItem";const f=class extends d.Component{render(){return null}};f.propTypes={text:n.string,icon:n.string,iconClass:n.string,imageUrl:n.string,disabled:n.bool,render:n.any};let v=f;const g=(e,t,n,o)=>{if(n)return e;const r=Math.min(o-1,Math.max(0,e));switch(t){case s.Keys.enter:case s.Keys.space:case s.Keys.esc:return-1;case s.Keys.up:case s.Keys.left:return r-1<0?o-1:r-1;case s.Keys.down:case s.Keys.right:return r+1>=o?0:r+1;case s.Keys.home:return 0;case s.Keys.end:return o-1;default:return e}};function b(e){const t={horizontal:"left",vertical:"bottom"};return e&&(t.horizontal="right"),t}function y(e){const t={horizontal:"left",vertical:"top"};return e&&(t.horizontal="right"),t}const k=Object.freeze({name:"@progress/kendo-react-buttons",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate:0,version:"14.2.2-develop.1",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"}),C=class extends d.Component{constructor(e){super(e),this.state={focused:!1,focusedIndex:-1,opened:!1},this.wrapper=null,this.mainButton=null,this.list=null,this.skipFocus=!1,this.buttonsData=[],this.showLicenseWatermark=!1,this.onKeyDown=e=>{const{focusedIndex:t}=this.state;if(e.altKey)return void(this.opened||e.keyCode!==s.Keys.down?this.opened&&e.keyCode===s.Keys.up&&(e.preventDefault(),this.setState({focusedIndex:-1}),this.setOpen(!1,e)):(e.preventDefault(),this.setState({focusedIndex:0}),this.setOpen(!0,e)));let n;if(e.keyCode===s.Keys.enter||e.keyCode===s.Keys.space){if(e.preventDefault(),this.dispatchClickEvent(e,t),t>=0){n={focusedIndex:this.opened?-1:0};const t=!this.opened;this.setOpen(t,e)}}else if(this.opened&&e.keyCode===s.Keys.esc)return this.setState({focusedIndex:-1}),void this.setOpen(!1,e);if(this.opened){const o=g(t,e.keyCode,e.altKey,this.buttonsData.length);o!==t&&(n=n||{},n.focusedIndex=o);const r=e.keyCode===s.Keys.up||e.keyCode===s.Keys.down||e.keyCode===s.Keys.left||e.keyCode===s.Keys.right;!e.altKey&&(r||e.keyCode===s.Keys.home||e.keyCode===s.Keys.end)&&e.preventDefault()}n&&this.setState(n)},this.switchFocus=e=>{this.skipFocus=!0,e(),window.setTimeout(()=>this.skipFocus=!1,0)},this.onFocus=e=>{this.skipFocus||(s.dispatchEvent(this.props.onFocus,e,this,void 0),this.setState({focused:!0}))},this.setOpen=(e,t)=>{this.opened!==e&&(this.openedDuringOnChange=e,this.setState({opened:e}),t?this.dispatchPopupEvent(t,e):this.openedDuringOnChange=void 0)},this.onItemClick=(e,t)=>{this.opened&&this.setState({focusedIndex:0}),this.dispatchClickEvent(e,t),this.setOpen(!1,e)},this.onBlur=e=>{this.skipFocus||(this.setState({focused:!1,focusedIndex:-1}),s.dispatchEvent(this.props.onBlur,e,this,void 0),setTimeout(()=>{this.setOpen(!1,e)},0))},this.onPopupClose=e=>{var t;const n=s.getActiveElement(document);this.element&&this.element.removeAttribute("tabindex"),(n===this.list||null!=(t=this.list)&&t.contains(n))&&this.switchFocus(()=>{this.element&&this.element.focus({preventScroll:!0})}),this.props.popupSettings&&this.props.popupSettings.onClose&&this.props.popupSettings.onClose.call(void 0,e)},this.listRef=e=>{this.list=e,e&&this.state.focused&&this.switchFocus(()=>{e.focus({preventScroll:!0}),this.element&&(this.element.tabIndex=-1)})},this.onSplitPartClick=e=>{if(this.buttonsData.length){const t=!this.opened;this.setState({focusedIndex:t?0:-1,focused:!0}),this.setOpen(t,e)}},this.onDownSplitPart=e=>{e.preventDefault();const t=s.getActiveElement(document);this.element&&t!==this.element&&t!==this.list&&this.element.focus()},this.onItemDown=e=>{s.getActiveElement(document)===this.list&&e.preventDefault()},this.dispatchPopupEvent=(e,t)=>{s.dispatchEvent(t?this.props.onOpen:this.props.onClose,e,this,void 0),this.openedDuringOnChange=void 0},this.showLicenseWatermark=!s.validatePackage(k,{component:"SplitButton"}),this.licenseMessage=s.getLicenseMessage(k)}get guid(){return this.props.id?this.props.id+"-accessibility-id":this.props.id}get opened(){return void 0!==this.openedDuringOnChange?this.openedDuringOnChange:void 0===this.props.opened?this.state.opened:this.props.opened}render(){this.buttonsData=this.props.items||d.Children.toArray(this.props.children).filter(e=>e&&e.type===v).map(e=>e.props);const e=this.isRtl(),t=e?"rtl":void 0,{id:n,style:o,tabIndex:i,disabled:a}=this.props;return d.createElement(d.Fragment,null,d.createElement("div",{id:n,style:o,className:s.classNames("k-split-button","k-button-group",{"k-focus":this.state.focused},this.props.rounded&&`k-rounded-${s.kendoThemeMaps.roundedMap[this.props.rounded]}`,this.props.className),onKeyDown:this.onKeyDown,onFocus:this.onFocus,onBlur:this.onBlur,dir:t,ref:e=>{this.wrapper=e}},d.createElement(u,{ref:e=>{this.mainButton=e&&e.element},type:"button",size:this.props.size,rounded:this.props.rounded,fillMode:this.props.fillMode,themeColor:this.props.themeColor,onClick:e=>this.onItemClick(e,-1),disabled:a||void 0,tabIndex:i,accessKey:this.props.accessKey,className:this.props.buttonClass,icon:this.props.icon,svgIcon:this.props.svgIcon,iconClass:this.props.iconClass,startIcon:this.props.startIcon,endIcon:this.props.endIcon,imageUrl:this.props.imageUrl,dir:t,"aria-disabled":a,"aria-haspopup":!0,"aria-expanded":this.opened||void 0,"aria-label":this.props.ariaLabel,"aria-controls":this.opened?this.guid:void 0,id:"button-"+this.guid,title:this.props.title},this.props.text),d.createElement(u,{type:"button",size:this.props.size,rounded:this.props.rounded,fillMode:this.props.fillMode,themeColor:this.props.themeColor,icon:"caret-alt-down",svgIcon:r.caretAltDownIcon,className:"k-split-button-arrow",disabled:a||void 0,tabIndex:-1,onClick:this.onSplitPartClick,onMouseDown:this.onDownSplitPart,onPointerDown:this.onDownSplitPart,dir:t,"aria-label":"menu toggling button"}),this.renderPopup(e)),this.showLicenseWatermark&&d.createElement(s.WatermarkOverlay,{message:this.licenseMessage}))}componentDidMount(){(void 0===this.props.dir&&this.isRtl()||this.opened)&&this.forceUpdate()}get element(){return this.mainButton}dispatchClickEvent(e,t){this.isItemDisabled(t)||(-1===t?s.dispatchEvent(this.props.onButtonClick,e,this,void 0):s.dispatchEvent(this.props.onItemClick,e,this,{item:this.buttonsData[t],itemIndex:t}))}renderPopup(e){const{popupSettings:t={}}=this.props,{focusedIndex:n}=this.state;return d.createElement(o.Popup,{anchor:this.wrapper,show:this.opened,animate:t.animate,popupClass:s.classNames("k-menu-popup",t.popupClass),anchorAlign:t.anchorAlign||b(e),popupAlign:t.popupAlign||y(e),style:e?{direction:"rtl"}:void 0,onClose:this.onPopupClose},d.createElement("ul",{role:"menu",id:this.guid,"aria-labelledby":"button-"+this.guid,tabIndex:-1,ref:this.listRef,"aria-activedescendant":n>=0?`${this.guid}-${n}`:void 0,className:s.classNames("k-menu-group",{[`k-menu-group-${s.kendoThemeMaps.sizeMap[this.props.size]||this.props.size}`]:this.props.size})},this.renderChildItems()))}renderChildItems(){const{item:e,itemRender:t,textField:n}=this.props;return this.buttonsData.length>0?this.buttonsData.map((o,r)=>d.createElement(h,{className:s.classNames("k-menu-item",{"k-first":0===r},{"k-last":r===this.buttonsData.length-1}),dataItem:o,textField:n,focused:this.state.focusedIndex===r,onClick:this.onItemClick,onDown:this.onItemDown,render:t,item:e,key:r,index:r,id:`${this.guid}-${r}`})):null}isItemDisabled(e){return this.buttonsData[e]?this.buttonsData[e].disabled:this.props.disabled}isRtl(){return void 0!==this.props.dir?"rtl"===this.props.dir:!!this.wrapper&&"rtl"===getComputedStyle(this.wrapper).direction}};C.propTypes={accessKey:n.string,ariaLabel:n.string,title:n.string,onButtonClick:n.func,onFocus:n.func,onBlur:n.func,onItemClick:n.func,onOpen:n.func,onClose:n.func,text:n.string,items:n.arrayOf(n.any),textField:n.string,tabIndex:n.number,disabled:n.bool,icon:n.string,svgIcon:s.svgIconPropType,imageUrl:n.string,popupSettings:n.object,itemRender:n.any,item:n.func,className:n.string,buttonClass:n.string,dir:n.string,size:n.oneOf(["small","medium","large"]),rounded:n.oneOf(["small","medium","large","full","none"]),fillMode:n.oneOf(["flat","link","outline","solid","clear"]),themeColor:n.oneOf(["base","primary","secondary","tertiary","info","success","warning","error","dark","light","inverse"])},C.defaultProps={size:void 0,rounded:void 0,fillMode:void 0,themeColor:void 0};let I=C;const x=class extends d.Component{render(){return null}};x.propTypes={text:n.string,icon:n.string,iconClass:n.string,imageUrl:n.string,selected:n.bool,disabled:n.bool,render:n.any};let w=x;const E=class extends d.Component{constructor(e){super(e),this.state={opened:!1,focused:!1,focusedIndex:-1},this.mainButton=null,this.list=null,this.skipFocus=!1,this.showLicenseWatermark=!1,this.buttonsData=[],this.onKeyDown=e=>{const{focusedIndex:t}=this.state;if(e.altKey)return void(this.opened||e.keyCode!==s.Keys.down?this.opened&&e.keyCode===s.Keys.up&&(e.preventDefault(),this.setState({focusedIndex:-1}),this.setOpen(!1,e)):(e.preventDefault(),this.setOpen(!0,e),this.setState({focusedIndex:0})));const n={...this.state};if(e.keyCode===s.Keys.enter||e.keyCode===s.Keys.space){e.preventDefault(),t>=0&&this.dispatchClickEvent(e,t);const n=!this.opened;return this.setState({focused:!0,focusedIndex:n?0:-1}),void this.setOpen(n,e)}if(this.opened&&e.keyCode===s.Keys.esc)return this.setState({focusedIndex:-1}),void this.setOpen(!1,e);if(this.opened){const o=g(t,e.keyCode,e.altKey,this.buttonsData.length);n.focusedIndex=o;const r=e.keyCode===s.Keys.up||e.keyCode===s.Keys.down||e.keyCode===s.Keys.left||e.keyCode===s.Keys.right;!e.altKey&&(r||e.keyCode===s.Keys.home||e.keyCode===s.Keys.end)&&e.preventDefault()}this.setState(n)},this.switchFocus=e=>{this.skipFocus=!0,e(),window.setTimeout(()=>this.skipFocus=!1,0)},this.handleFocus=e=>{this.skipFocus||(this.setState({focused:!0,focusedIndex:this.opened?0:-1}),s.dispatchEvent(this.props.onFocus,e,this,void 0))},this.handleButtonBlur=e=>{this.opened||(this.setState({focused:!1}),s.dispatchEvent(this.props.onBlur,e,this,void 0))},this.handleMenuBlur=e=>{this.skipFocus||(this.setState({focused:!1,focusedIndex:-1}),s.dispatchEvent(this.props.onBlur,e,this,void 0),setTimeout(()=>{this.setOpen(!1,e)},0))},this.setOpen=(e,t)=>{this.opened!==e&&(this.openedDuringOnChange=e,this.setState({opened:e}),t?this.dispatchPopupEvent(t,e):this.openedDuringOnChange=void 0)},this.onItemClick=(e,t)=>{this.setState({focusedIndex:-1}),this.dispatchClickEvent(e,t),this.setOpen(!1,e)},this.onItemDown=e=>{s.getActiveElement(document)===this.list&&e.preventDefault()},this.mouseDown=e=>{e.preventDefault();const t=s.getActiveElement(document);this.element&&t!==this.element&&t!==this.list&&this.element.focus()},this.onPopupClose=e=>{var t;const n=s.getActiveElement(document);this.element&&this.element.removeAttribute("tabindex"),(n===this.list||null!=(t=this.list)&&t.contains(n))&&this.switchFocus(()=>{this.element&&this.element.focus({preventScroll:!0})}),this.props.popupSettings&&this.props.popupSettings.onClose&&this.props.popupSettings.onClose.call(void 0,e)},this.listRef=e=>{this.list=e,e&&this.state.focused&&this.switchFocus(()=>{e.focus({preventScroll:!0}),this.element&&(this.element.tabIndex=-1)})},this.onClickMainButton=e=>{if(s.dispatchEvent(this.props.onClick,e,this,void 0),!this.buttonsData.length)return;const t=!this.opened;this.setState({focused:!0,focusedIndex:t?0:-1}),this.setOpen(t,e)},this.dispatchPopupEvent=(e,t)=>{s.dispatchEvent(t?this.props.onOpen:this.props.onClose,e,this,void 0),this.openedDuringOnChange=void 0},this.showLicenseWatermark=!s.validatePackage(k,{component:"DropDownButton"}),this.licenseMessage=s.getLicenseMessage(k)}get guid(){return this.props.id+"-accessibility-id"}get opened(){return void 0!==this.openedDuringOnChange?this.openedDuringOnChange:void 0===this.props.opened?this.state.opened:this.props.opened}render(){const e=this.isRtl(),t=this.props.unstyled&&this.props.unstyled.uDropDownButton,n=e?"rtl":void 0,{id:o,style:r,tabIndex:i,disabled:a,size:l,rounded:c,fillMode:p,themeColor:m,ariaLabel:h,title:f,accessKey:v,icon:g,svgIcon:b,iconClass:y,buttonClass:k,className:C,imageUrl:I,startIcon:x,endIcon:E}=this.props;return this.buttonsData=this.props.items||d.Children.toArray(this.props.children).filter(e=>e&&e.type===w).map(e=>e.props),d.createElement(d.Fragment,null,d.createElement(u,{id:o,size:l,style:r,rounded:c,fillMode:p,themeColor:m,onClick:this.onClickMainButton,onMouseDown:this.mouseDown,onKeyDown:this.onKeyDown,onFocus:this.handleFocus,onBlur:this.handleButtonBlur,"aria-disabled":a?"true":void 0,tabIndex:i,accessKey:v,icon:g,svgIcon:b,iconClass:y,className:s.classNames(k,C,s.uDropDownButton.wrapper({c:t,focused:this.state.focused,disabled:a})),imageUrl:I,dir:n,ref:e=>{this.mainButton=(null==e?void 0:e.element)||null},type:"button","aria-expanded":this.opened?"true":"false","aria-label":h,"aria-controls":this.opened?this.guid:void 0,title:f,startIcon:x,endIcon:E},this.props.text),this.showLicenseWatermark&&d.createElement(s.WatermarkOverlay,{message:this.licenseMessage}),this.renderPopup(e))}componentDidMount(){(void 0===this.props.dir&&this.isRtl()||this.opened)&&this.forceUpdate()}get element(){return this.mainButton}dispatchClickEvent(e,t){this.isItemDisabled(t)||s.dispatchEvent(this.props.onItemClick,e,this,{item:this.buttonsData[t],itemIndex:t})}renderPopup(e){const{popupSettings:t={},_zIndex:n,unstyled:r}=this.props,i=n?n+2e3:12e3,a=r&&r.uDropDownButton,{focusedIndex:l}=this.state;return d.createElement(s.ZIndexContext.Provider,{value:i},d.createElement(o.Popup,{anchor:this.mainButton,show:this.opened,animate:t.animate,popupClass:s.classNames(s.uDropDownButton.popup({c:a}),t.popupClass),anchorAlign:t.anchorAlign||b(e),popupAlign:t.popupAlign||y(e),style:e?{direction:"rtl"}:void 0,onClose:this.onPopupClose},d.createElement("ul",{role:"list",id:this.guid,tabIndex:-1,"aria-activedescendant":l>=0?`${this.guid}-${l}`:void 0,ref:this.listRef,onKeyDown:this.onKeyDown,onBlur:this.handleMenuBlur,className:s.classNames(s.uDropDownButton.ul({c:a,size:this.props.size}))},this.renderChildItems())))}renderChildItems(){const{item:e,itemRender:t,textField:n,unstyled:o}=this.props,r=o&&o.uDropDownButton;return this.buttonsData.length>0?this.buttonsData.map((o,i)=>d.createElement(h,{className:s.classNames(s.uDropDownButton.item({c:r}),o.className,{"k-first":0===i},{"k-last":i===this.buttonsData.length-1}),dataItem:o,textField:n,focused:this.state.focusedIndex===i,onClick:this.onItemClick,onDown:this.onItemDown,render:t,item:e,index:i,key:i,id:`${this.guid}-${i}`})):null}isItemDisabled(e){return this.buttonsData[e]?this.buttonsData[e].disabled:this.props.disabled}isRtl(){return void 0!==this.props.dir?"rtl"===this.props.dir:!!this.mainButton&&"rtl"===getComputedStyle(this.mainButton).direction}};E.propTypes={accessKey:n.string,ariaLabel:n.string,title:n.string,onFocus:n.func,onBlur:n.func,onClick:n.func,onItemClick:n.func,onOpen:n.func,onClose:n.func,items:n.arrayOf(n.any),textField:n.string,tabIndex:n.number,disabled:n.bool,icon:n.string,svgIcon:s.svgIconPropType,iconClass:n.string,imageUrl:n.string,popupSettings:n.object,itemRender:n.func,item:n.func,className:n.string,buttonClass:n.string,dir:n.string,size:n.oneOf(["small","medium","large"]),rounded:n.oneOf(["small","medium","large","full","none"]),fillMode:n.oneOf(["flat","link","outline","solid","clear"]),themeColor:n.oneOf(["base","primary","secondary","tertiary","info","success","warning","error","dark","light","inverse"])},E.defaultProps={size:void 0,rounded:void 0,fillMode:void 0,themeColor:void 0};let D=E;const N=s.createPropsContext(),S=s.withIdHOC(s.withPropsContext(N,s.withUnstyledHOC(s.withZIndexContext(D))));S.displayName="KendoReactDropDownButton";const B=":not(.k-dropdownlist button):not(.k-colorpicker button):not(.k-split-button .k-split-button-arrow)",K=["button"+B,".k-button-group > button"+B,".k-colorpicker",".k-dropdownlist"],R=e=>d.createElement("div",{ref:e._ref,className:s.classNames("k-toolbar-separator k-separator",e.className)}),O="prevArrow.title",M="nextArrow.title",z="moreButtonTitle.title",F={[O]:"Previous scroll button",[M]:"Next scroll button",[z]:"More button"},P=e=>{const t=i.useLocalization(),{disabled:n,type:o,scrollContentRef:a,buttonScrollSpeed:l,prevButton:c,nextButton:u}=e,p="prev"===o?c||"span":u||"span";return d.createElement(p,{className:s.classNames("k-button","k-icon-button",`k-toolbar-${o}`,{"k-disabled":n}),title:`${"prev"===o?t.toLanguageString(O,F[O]):t.toLanguageString(M,F[M])}`,"aria-hidden":!0,tabIndex:n?-1:void 0,onClick:e=>{a&&a.current&&l&&a.current.scrollBy({left:"next"===o?l:-l,behavior:"smooth"})}},d.createElement(s.SvgIcon,{icon:"prev"===o?r.caretAltLeftIcon:r.caretAltRightIcon,className:"k-button-icon"}))},T=e=>{const{scrollButtons:t,scrollButtonsPosition:n,isOverflowing:s,scrollContentRef:o,buttonScrollSpeed:r,dir:i,isScrollStartPosition:a,isScrollEndPosition:l,prevButton:c,nextButton:u,children:p}=e,m=(e,t)=>d.createElement(P,{type:e,disabled:t,scrollContentRef:o,buttonScrollSpeed:r,prevButton:c,nextButton:u}),h="visible"===t||"auto"===t&&s;return d.createElement(d.Fragment,null,h&&"split"===n&&d.createElement(d.Fragment,null,m("rtl"!==i?"prev":"next",a),d.createElement(R,{className:"k-toolbar-button-separator"})),h&&"start"===n&&d.createElement(d.Fragment,null,m("rtl"!==i?"prev":"next",a),m("rtl"!==i?"next":"prev",l),d.createElement(R,{className:"k-toolbar-button-separator"})),d.createElement("span",{className:"k-toolbar-items k-toolbar-items-scroll",ref:o},p),h&&"split"===n&&d.createElement(d.Fragment,null,d.createElement(R,{className:"k-toolbar-button-separator"}),m("rtl"!==i?"next":"prev",l)),h&&"end"===n&&d.createElement(d.Fragment,null,d.createElement(R,{className:"k-toolbar-button-separator"}),m("rtl"!==i?"prev":"next",a),m("rtl"!==i?"next":"prev",l)))},A=e=>{var t;const{toolbarRef:n,children:a,fillMode:l,size:c}=e,[p,m]=d.useState(!1),h=d.useRef(d.Children.toArray(a).filter(e=>d.isValidElement(e)).map((e,t)=>d.cloneElement(e,{key:e.key||t}))),f=d.useRef([]),v=d.useRef(0),g=d.useRef(null),b=d.useRef(null),y=i.useLocalization(),[k,C]=d.useReducer(e=>e+1,0),I=()=>{if(!n.current)return;let e=0;const t=n.current.clientWidth,s=parseInt(window.getComputedStyle(n.current).gap||"0",10),o=Array.from(n.current.children).reduce((e,t,n)=>e+=Math.ceil(t.clientWidth),0),r=Array.from(n.current.children).length;if(e=o+r*s+2*s,e>t){const e=[...h.current],n=e.pop();v.current=t,h.current=e,n&&(f.current=[n,...f.current])}else if(t>v.current+s*r){const e=[...f.current],n=e.shift();f.current=e,n&&(h.current=[...h.current,n]),v.current=t}C()};d.useEffect(()=>{I();const e=new ResizeObserver(I),t=n.current;return t&&e.observe(t),()=>{t&&e.unobserve(t)}},[]);return d.createElement(d.Fragment,null,h.current.length>0&&h.current,f.current.length>0&&d.createElement(d.Fragment,null,d.createElement(R,{_ref:b,className:"k-toolbar-button-separator"}),d.createElement(u,{ref:g,className:"k-toolbar-overflow-button",fillMode:"flat",svgIcon:r.moreHorizontalIcon,title:y.toLanguageString(z,F[z]),onClick:()=>{m(!p)}}),d.createElement(o.Popup,{anchor:n.current,show:p,popupClass:"k-toolbar-popup",style:{width:null==(t=n.current)?void 0:t.offsetWidth}},d.createElement("span",{className:`k-toolbar-items-list k-toolbar-items-list-${s.kendoThemeMaps.sizeMap[c]} k-toolbar-items-list-${l}`},f.current.length>0&&f.current))))},L=d.forwardRef((e,t)=>{const{children:n,className:o,id:r,ariaLabel:i,keyboardNavigation:a,role:l,onResize:c,style:u,tabIndex:p=$.tabIndex,size:m=$.size,fillMode:h=$.fillMode,overflow:f,scrollButtons:v=$.scrollButtons,scrollButtonsPosition:g=$.scrollButtonsPosition,buttonScrollSpeed:b=$.buttonScrollSpeed,prevButton:y,nextButton:k,_ariaControls:C}=e,I=d.useRef(!1),x=d.useRef(null),w=d.useRef(null),E=d.useRef(0),D=d.useRef(0),N=d.useRef([]),S=d.useRef({element:null,props:e}),[B,R]=d.useState(!1),[O,M]=d.useState(!0),[z,F]=d.useState(!1),P=s.useDir(x,e.dir),L=d.useMemo(()=>e.buttons||K,[e.buttons]),W=d.useMemo(()=>L.map(e=>e+":focus").join(","),[L]),H=()=>{const e=x.current&&x.current.querySelector(W);return Math.max(0,N.current.findIndex(t=>t===e))};d.useImperativeHandle(S,()=>({element:x.current,props:e})),d.useImperativeHandle(t,()=>S.current),d.useEffect(()=>(window.addEventListener("resize",q),x.current&&(D.current=x.current.offsetWidth,E.current=x.current.offsetHeight,!1!==a&&(N.current=Array.from(x.current.querySelectorAll(L.join(","))),U(0))),()=>{window.removeEventListener("resize",q),N.current.length=0}),[]),d.useEffect(()=>{if(I.current){if(!x.current||!1===a)return;N.current=Array.from(x.current.querySelectorAll(L.join(","))),U(H()),V()}else I.current=!0});const U=e=>{N.current.forEach((t,n)=>{t.tabIndex=n===e?p:-1})},j=(e,t)=>{const n=N.current[t];if(n){n.tabIndex=p,n.focus();const t=N.current[e];t&&(t.tabIndex=-1)}},q=e=>{if(!x.current)return;const t=x.current.offsetWidth,n=x.current.offsetHeight;if(D.current!==t||E.current!==n){D.current=t,E.current=n;const s={offsetWidth:D.current,offsetHeight:E.current};c&&c.call(void 0,{target:S.current,...s,nativeEvent:e})}V()},V=d.useCallback(()=>{const e=w.current;e&&R(e.scrollWidth>e.clientWidth||e.scrollHeight>e.clientHeight)},[]),G=d.useCallback(()=>{const e=w.current;if(e){const t=0===e.scrollLeft,n="rtl"!==P?e.scrollLeft+e.clientWidth===e.scrollWidth:e.clientWidth-e.scrollLeft===e.scrollWidth;t&&M(!0),n&&F(!0),!t&&!n&&(M(!1),F(!1))}},[P]);return d.useEffect(()=>{const e=w.current;if(e)return e.addEventListener("scroll",G),()=>{e.removeEventListener("scroll",G)}},[G]),d.createElement("div",{id:r,"aria-label":i,"aria-controls":C,className:s.classNames("k-toolbar",{[`k-toolbar-${s.kendoThemeMaps.sizeMap[m]||m}`]:m,[`k-toolbar-${h}`]:h,"k-toolbar-scrollable":"scroll"===f,"k-toolbar-scrollable-overlay":"scroll"===f&&("hidden"===v||void 0===v),"k-toolbar-scrollable-start":"scroll"===f&&"hidden"===v&&O,"k-toolbar-scrollable-end":"scroll"===f&&"hidden"===v&&z,"k-toolbar-section":e.overflow&&"section"===f},o),style:u,role:void 0!==l?l||void 0:"toolbar",dir:P,ref:x,onKeyDown:!1!==a?e=>{const t=e.keyCode===s.Keys.left||e.keyCode===s.Keys.right||e.keyCode===s.Keys.home||e.keyCode===s.Keys.end,n=H();!t||e.defaultPrevented||-1===N.current.findIndex(t=>t===e.target)||(e.keyCode===s.Keys.left?j(n,0===n?N.current.length-1:n-1):j(n,n===N.current.length-1?0:n+1),e.keyCode===s.Keys.home&&j(n,0),e.keyCode===s.Keys.end&&j(n,N.current.length-1))}:void 0},"scroll"===f&&d.createElement(T,{scrollButtons:v,scrollButtonsPosition:g,prevButton:y,nextButton:k,isOverflowing:B,scrollContentRef:w,buttonScrollSpeed:b,dir:P,isScrollStartPosition:O,isScrollEndPosition:z,children:n}),"section"===f&&d.createElement(A,{toolbarRef:x,fillMode:h,size:m},n),("none"===f||void 0===f)&&n)}),$={tabIndex:0,size:void 0,fillMode:void 0,scrollButtons:"auto",scrollButtonsPosition:"split",buttonScrollSpeed:100};L.displayName="KendoReactToolbar",L.propTypes={tabIndex:n.number,dir:n.string,keyboardNavigation:n.bool,style:n.object,className:n.string,role:n.string,onResize:n.func,buttons:n.arrayOf(n.string.isRequired),size:n.oneOf(["small","medium","large"]),fillMode:n.oneOf(["solid","flat","outline"]),overflow:n.oneOf(["none","section","scroll"]),scrollButtons:n.oneOf(["hidden","visible","auto"]),scrollButtonsPosition:n.oneOf(["start","end","split"]),buttonScrollSpeed:n.number};const W=d.forwardRef((e,t)=>{const{id:n,className:o,style:r,children:i}=e,a=d.useRef(null);return d.useImperativeHandle(t,()=>({element:a.current})),d.createElement("div",{id:n,className:s.classNames("k-toolbar-item",o),style:r,ref:a},i)});W.displayName="KendoReactToolbarItem",W.propTypes={className:n.string};const H=d.forwardRef((e,t)=>{const n=d.useRef(null),o=d.useRef(null);d.useImperativeHandle(o,()=>({element:n.current})),d.useImperativeHandle(t,()=>({element:n.current}));const r=d.useMemo(()=>s.classNames("k-spacer",e.className),[e.className]);return d.createElement("span",{ref:n,className:r})});H.displayName="KendoReactToolbarSpacer",H.propTypes={className:n.string};const U=d.createContext([null,e=>{}]),j=d.createContext([null,e=>{}]),q=d.createContext([null,e=>{}]);var V=(e=>(e.next="next",e.prev="prev",e.current="current",e.reset="reset",e))(V||{});var G=(e=>(e.remove="remove",e.add="add",e.reorder="reorder",e))(G||{});var Z=(e=>(e.toggle="toggle",e.remove="remove",e))(Z||{});const _=d.forwardRef((e,t)=>{const n=d.useRef(null),o=d.useRef(null),{disabled:i=Q.disabled,fillMode:a=Q.fillMode,themeColor:l=Q.themeColor,size:c=Q.size,rounded:u=Q.rounded,dir:p=Q.dir,removeIcon:m=Q.removeIcon,removeSvgIcon:h=Q.removeSvgIcon,removable:f=Q.removable}=e,v=s.useDir(o,p);d.useImperativeHandle(n,()=>({element:o.current,props:e})),d.useImperativeHandle(t,()=>n.current);const[g,b]=d.useContext(U),[y,k]=d.useContext(j),[,C]=d.useContext(q),I=d.useMemo(()=>e.selected||(Array.isArray(g)?g.some(t=>t===e.value):g===e.value),[e.selected,e.value,g]),x=d.useMemo(()=>y===e.value,[e.value,y]);d.useEffect(()=>{x&&o.current&&o.current.focus()},[x]);const w=d.useCallback(t=>{b({type:Z.toggle,payload:e.value,event:t})},[b,e.value]),E=d.useCallback(t=>{f&&(C({type:G.remove,payload:e.value,event:t}),k({type:V.reset,payload:e.value,event:t}),b({type:Z.remove,payload:e.value,event:t}),e.onRemove&&e.onRemove.call(void 0,{target:n.current,syntheticEvent:t}))},[e.onRemove,e.value,f,C,k,b]),D=d.useCallback(t=>{switch(t.keyCode){case s.Keys.left:k({type:V.prev,payload:e.value,event:t});break;case s.Keys.right:k({type:V.next,payload:e.value,event:t});break;case s.Keys.enter:b({type:Z.toggle,payload:e.value,event:t});break;case s.Keys.delete:E(t)}e.onKeyDown&&e.onKeyDown.call(void 0,{target:n.current,syntheticEvent:t})},[e.onKeyDown,e.value,k,b,E]),N=d.useCallback(t=>{k({payload:e.value,type:V.current,event:t}),e.onFocus&&e.onFocus.call(void 0,{target:n.current,syntheticEvent:t})},[e.onFocus,e.value,k]),S=d.useCallback(t=>{e.onBlur&&e.onBlur.call(void 0,{target:n.current,syntheticEvent:t})},[e.onBlur]),B=s.useMouse(e,n,{onClick:w});return d.createElement("div",{...B,role:e.role||"button",id:e.value,style:e.style,ref:o,dir:v,tabIndex:s.getTabIndex(e.tabIndex,i,void 0),className:s.classNames("k-chip",{"k-rtl":"rtl"===v,"k-disabled":i,"k-selected":I,"k-focus":x,[`k-chip-${s.kendoThemeMaps.sizeMap[c]||c}`]:c,[`k-rounded-${s.kendoThemeMaps.roundedMap[u]||u}`]:u,[`k-chip-${a}`]:a,[`k-chip-${l}`]:!!l},e.className),"aria-pressed":e.role?void 0:I,"aria-disabled":i,"aria-describedby":e.ariaDescribedBy,"aria-keyshortcuts":f?"Enter Delete":void 0,onFocus:N,onBlur:S,onKeyDown:D},I&&(e.selectedIcon||e.selectedSvgIcon)&&d.createElement(s.IconWrap,{className:"k-chip-icon",name:e.selectedIcon?s.toIconName(e.selectedIcon):void 0,icon:e.selectedSvgIcon,size:"small"}),(e.icon||e.svgIcon)&&d.createElement(s.IconWrap,{className:"k-chip-icon",name:e.icon?s.toIconName(e.icon):void 0,icon:e.svgIcon,size:"small"}),e.avatar&&d.createElement("div",{className:s.classNames("k-chip-avatar","k-avatar",e.avatar.rounded&&`k-rounded-${e.avatar.rounded}`),style:e.avatar.style},d.createElement("span",{className:"k-avatar-image"},d.createElement("img",{src:e.avatar.image,alt:e.avatar.imageAlt}))),d.createElement("span",{className:"k-chip-content"},void 0!==e.children?e.children:e.text&&d.createElement("span",{"aria-label":e.ariaLabel||e.text,className:"k-chip-label"},e.text)),f&&d.createElement("span",{className:"k-chip-actions"},d.createElement("span",{className:s.classNames("k-chip-action","k-chip-remove-action"),onClick:E},d.createElement(s.IconWrap,{name:m?s.toIconName(m):void 0,icon:h||r.xCircleIcon,size:"small"}))))}),J={id:n.string,text:n.string,value:n.any,dir:n.oneOf(["ltr","rtl"]),removable:n.bool,removeIcon:n.string,removeIconSvg:s.svgIconPropType,disabled:n.bool,icon:n.string,svgIcon:s.svgIconPropType,selectedIcon:n.string,selectedIconSvg:s.svgIconPropType,onRemove:n.func,dataItem:n.any,selected:n.bool,ariaDescribedBy:n.string,size:n.oneOf(["small","medium","large"]),rounded:n.oneOf(["small","medium","large","full","none"]),fillMode:n.oneOf(["outline","solid"]),themeColor:n.oneOf(["base","info","success","warning","error"])},Q={disabled:!1,removable:!1,removeIcon:"k-i-x-circle",removeSvgIcon:r.xCircleIcon,dir:"ltr",size:void 0,rounded:void 0,fillMode:void 0,themeColor:void 0};_.displayName="KendoReactChip",_.propTypes=J;const X=(e,t,n)=>{"multiple"===t.selection?Array.isArray(e)||(e=e?[e]:null):"single"===t.selection&&Array.isArray(e)&&(e=e?e.join(""):null);const[s,o]=d.useState(e);return[s,e=>{const r=((e,t)=>{switch(t.selection){case"single":switch(t.type){case"toggle":if(!Array.isArray(e)||null===e)return t.payload===e?null:t.payload;throw new Error("State cannot be an array in single selection");case"remove":return t.payload===e?null:e;default:return e}case"multiple":switch(t.type){case"toggle":if(Array.isArray(e))return e.some(e=>e===t.payload)?e.filter(e=>e!==t.payload):[...e,t.payload];if(null===e)return[t.payload];throw new Error("State cannot be non-array in multiple selection");case"remove":return Array.isArray(e)?e.some(e=>e===t.payload)?e.filter(e=>e!==t.payload):[...e,t.payload]:e;default:return e}case"none":return null;default:return e}})(t.state||s,{...e,...t});n&&n(r,e.event),"none"!==t.selection&&o(r)}]},Y=d.forwardRef((e,t)=>{const n=d.useRef(null),o=d.useRef(null),{id:r,style:i,tabIndex:a,className:l,ariaDescribedBy:c,ariaLabelledBy:u,ariaLabel:p,value:m,defaultData:h=te.defaultData,chip:f=te.chip,disabled:v=te.disabled,size:g=te.size,defaultValue:b=te.defaultValue,selection:y=te.selection,valueField:k=te.valueField,textField:C=te.textField,dir:I=te.dir,onChange:x,onDataChange:w}=e,E=s.useDir(o,I),D=d.useMemo(()=>f||_,[f,_]);d.useImperativeHandle(n,()=>({element:o.current,props:e})),d.useImperativeHandle(t,()=>n.current);const N=d.useCallback((e,t)=>{x&&n.current&&x.call(void 0,{value:e,target:n.current,syntheticEvent:t})},[x]),[S,B]=X(m||b,{selection:y,state:m},N),K=d.useCallback((e,t)=>{w&&n.current&&w.call(void 0,{value:e,target:n.current,syntheticEvent:t})},[w]),[R,O]=((e,t,n)=>{const[s,o]=d.useState(e);return[s,e=>{const r=((e,t)=>{switch(t.type){case"add":case"reorder":break;case"remove":return e.filter(e=>e[t.valueField]!==t.payload);default:return e}})(t.state||s,{...e,...t});n&&n(r,e.event),o(r)}]})(e.data||h,{state:e.data,valueField:k},K),M=d.useCallback((e,t)=>(e.push(t[k]),e),[k]),z=d.useMemo(()=>e.data||R,[e.data,R]),F=d.useMemo(()=>m||S,[m,S]),P=d.useMemo(()=>z.reduce(M,[]),[z,M]),T=d.useCallback(e=>s.getter(k)(e),[k]),A=d.useCallback(e=>s.getter(C)(e),[C]),[L,$]=(e=>{const[t,n]=d.useState(null);return[t,t=>{const s=((e,t)=>{const n=t.items.findIndex(t=>t===e);switch(t.type){case"next":return n===t.items.length-1?e:t.items[n+1];case"prev":return 0===n?e:t.items[n-1];case"current":return t.payload;case"reset":return null;default:return e}})(t.payload,{...t,...e});n(s)}]})({items:P}),W=s.useMouse(e,n);return d.createElement(U.Provider,{value:[F,B]},d.createElement(j.Provider,{value:[L,$]},d.createElement(q.Provider,{value:[z,O]},d.createElement("div",{ref:o,...W,role:v?void 0:"listbox",id:r,dir:E,style:i,tabIndex:s.getTabIndex(a,v,void 0),className:s.classNames("k-chip-list",{"k-rtl":"rtl"===E,"k-disabled":v,[`k-chip-list-${s.kendoThemeMaps.sizeMap[g]||g}`]:g},l),"aria-label":p,"aria-labelledby":u,"aria-describedby":c,"aria-orientation":"horizontal","aria-multiselectable":"multiple"===y},z.map((e,t)=>d.createElement(D,{role:"option",dataItem:e,size:g,key:[T(e),t].join("-"),text:A(e),value:T(e),ariaLabel:e.ariaLabel,svgIcon:e.svgIcon||void 0}))))))}),ee={id:n.string,className:n.string,tabIndex:n.number,data:n.any,defaultData:n.arrayOf(n.any),onDataChange:n.func,value:n.oneOfType([n.any,n.arrayOf(n.any)]),defaultValue:n.oneOfType([n.any,n.arrayOf(n.any)]),onChange:n.func,selection:n.oneOf(["single","none","multiple"]),textField:n.string,valueField:n.string,disabled:n.bool,dir:n.oneOf(["ltr","rtl"]),ariaLabelledBy:n.string,ariaDescribedBy:n.string,size:n.oneOf(["small","medium","large"])},te={chip:_,size:void 0,disabled:!1,defaultValue:null,defaultData:[],dir:"ltr",selection:"none",textField:"text",valueField:"value"};Y.displayName="KendoReactChipList",Y.propTypes=ee;const ne=d.forwardRef((e,t)=>{const{className:n,disabled:o,text:r,icon:i,style:a,id:l,focused:c,tabIndex:u,index:p,dataItem:m,item:h,svgIcon:f,onDown:v,onClick:g,...b}=e,y=d.useRef(null),k=d.useCallback(()=>{y.current&&y.current.focus()},[]),C=d.useCallback(()=>({element:y.current,focus:k}),[k]);d.useImperativeHandle(t,C);const I=d.useCallback(e=>{g&&void 0!==p&&!o&&g(e,p)},[g,p]),x=d.useMemo(()=>s.classNames("k-fab-item",{"k-focus":c,"k-disabled":o},n),[n,o,c]),w=h;return d.createElement("li",{ref:y,id:l,className:x,style:a,role:"menuitem",tabIndex:s.getTabIndex(u,o),"aria-disabled":o,"aria-label":`${r||""} floatingactionbutton item`,onClick:I,onMouseDown:v,onPointerDown:v,...b},w?d.createElement(w,{itemIndex:p,item:m}):d.createElement(d.Fragment,null,r&&d.createElement("span",{className:"k-fab-item-text"},r),i||f?d.createElement(s.IconWrap,{className:"k-fab-item-icon",name:i,icon:f}):null))});ne.propTypes={className:n.string,style:n.object,children:n.any,disabled:n.bool,focused:n.bool,index:n.number,icon:n.string,svgIcon:s.svgIconPropType,text:n.string,tabIndex:n.number,customProp:n.any},ne.displayName="KendoFloatingActionButtonItem";const se="16px",oe=e=>"number"==typeof e?e+"px":e,re=(e,t)=>{const n={horizontal:t?"right":"left",vertical:"bottom"};return"end"===e.horizontal&&(n.horizontal=t?"left":"right"),n},ie=(e,t)=>{const n={horizontal:t?"right":"left",vertical:"top"};return"end"===e.horizontal&&(n.horizontal=t?"left":"right"),n},ae=(e,t)=>({rtl:{end:"k-text-left",start:"k-text-right"},ltr:{start:"k-text-left",end:"k-text-right"}}[e]["end"===t?"end":"start"]),le=(e,t,n,s)=>{const o=t.horizontal,r=t.vertical;if(e.current){const i=n&&void 0!==n.x?oe(n.x):se,a=n&&void 0!==n.x?`calc(50% + ${oe(n.x)})`:"50%",l=n&&void 0!==n.y?oe(n.y):se,c=n&&void 0!==n.y?`calc(50% + ${oe(n.y)})`:"50%";e.current.style.setProperty(ce(t,s),"center"===o?a:i),e.current.style.setProperty(de(t),"middle"===r?c:l),s&&(("top"===r||"bottom"===r)&&"start"===o&&e.current.style.setProperty("left","unset"),"middle"===r&&"end"===o&&e.current.style.setProperty("right","unset"),"middle"===r&&"start"===o&&e.current.style.setProperty("left","unset"))}},ce=(e,t)=>{const{horizontal:n}=e;return{end:t?"left":"right",center:"left",start:t?"right":"left"}[n||"end"]},de=e=>({top:"top",middle:"top",bottom:"bottom"}[e.vertical||"bottom"]),ue=d.forwardRef((e,t)=>{const{align:n=pe.align,alignOffset:r,className:i,disabled:a,icon:l,svgIcon:c,iconClass:u,id:p,items:m,item:h,text:f,positionMode:v=pe.positionMode,size:g=pe.size,style:b,rounded:y=pe.rounded,themeColor:k=pe.themeColor,overlayStyle:C,tabIndex:I,accessKey:x,popupSettings:w={},modal:E,onClick:D,onItemClick:N,onFocus:S,onBlur:B,onKeyDown:K,onOpen:R,onClose:O,...M}=e,z=s.useZIndexContext(),F=z?z+2:100,P=d.useRef(null),T=d.useRef(null),A=d.useRef(null),L=d.useRef(null),$=d.useCallback(()=>{T.current&&T.current.focus()},[]),W=d.useCallback(()=>({element:T.current,focus:$}),[$]);d.useImperativeHandle(P,W),d.useImperativeHandle(t,()=>P.current);const[H,U]=d.useState(!1),[j,q]=d.useState(!1),[V,G]=d.useState(-1),Z=s.useId()+"-button-id",_=s.useDir(T,e.dir),J="rtl"===_,Q=s.useId()+"-list-id";d.useEffect(()=>{le(T,n,r,J)},[T,n,r,J]),d.useEffect(()=>{j&&T&&T.current&&T.current.focus()},[j,T]);const X=d.useCallback((e,t)=>{m&&s.dispatchEvent(t?R:O,e,W(),void 0)},[R,O,m]),Y=d.useCallback(e=>{!e.target||a||(!m&&D?s.dispatchEvent(D,e,W(),void 0):(U(!H),q(!0),G(H?-1:0),X(e,!H)))},[U,q,G,D,X,H,m,a]),ee=d.useCallback(e=>{q(!0),G(H?0:-1),S&&s.dispatchEvent(S,e,W(),void 0)},[S,q,G]),te=d.useCallback(e=>{q(!1),U(!1),G(-1),s.dispatchEvent(B,e,W(),void 0),H&&X(e,!1)},[B,q,U,G,X]),se=d.useCallback(e=>{e.preventDefault()},[]),oe=d.useCallback((e,t)=>{m&&(m[t].disabled||s.dispatchEvent(N,e,W(),{itemProps:m[t],itemIndex:t}))},[N]),ce=d.useCallback((e,t)=>{!e.target||!m||(G(t),U(!1),oe(e,t),X(e,!1))},[G,U,oe,X]),de=d.useCallback(e=>{s.getActiveElement(document)===T.current&&e.preventDefault()},[T]),ue=d.useCallback(e=>{const t=V,n=m?m.length:-1;if(e.altKey)return!H&&e.keyCode===s.Keys.down&&(e.preventDefault(),U(!0),G(0)),void(H&&e.keyCode===s.Keys.up&&(e.preventDefault(),U(!1),G(-1)));switch(e.keyCode){case s.Keys.enter:case s.Keys.space:t>=0&&oe(e,t),m||Y(e),e.preventDefault(),U(!H),G(H?-1:0);break;case s.Keys.esc:e.preventDefault(),U(!1),G(-1);break;case s.Keys.home:e.preventDefault(),G(0);break;case s.Keys.end:e.preventDefault(),G(n-1);break;case s.Keys.down:case s.Keys.right:e.preventDefault(),G(t+1>=n?0:t+1);break;case s.Keys.up:case s.Keys.left:e.preventDefault(),G(t-1<0?n-1:t-1)}s.dispatchEvent(K,e,W(),void 0)},[K,V,G,J,U]),me=d.useMemo(()=>s.classNames("k-fab",{"k-fab-sm":"small"===g,"k-fab-md":"medium"===g,"k-fab-lg":"large"===g,"k-disabled":a,"k-pos-absolute":"absolute"===v,"k-pos-fixed":"fixed"===v,"k-focus":j,[`k-rounded-${s.kendoThemeMaps.roundedMap[y]||y}`]:y,[`k-fab-${k}`]:k},`k-${n.vertical}-${n.horizontal}`,i),[k,g,y,a,v,n,j,i]),he=m&&m.map((e,t)=>d.createElement(ne,{...e,key:t,index:t,id:`${Q}-${t}`,disabled:a||e.disabled,focused:V===t,dataItem:e,item:h,className:s.classNames(e.className,ae(_||"ltr",n.horizontal)),onClick:ce,onDown:de})),fe=!(!l&&!c||f),ve=(T.current?T.current.offsetWidth:0)/2-16;let ge;return ge=l||c?d.createElement(s.IconWrap,{className:"k-fab-icon",name:l,icon:c}):u?d.createElement("span",{role:"presentation",className:u}):null,d.createElement(s.ZIndexContext.Provider,{value:F},d.createElement(d.Fragment,null,d.createElement("button",{ref:T,id:p||Z,role:"button",type:"button","aria-disabled":a,"aria-expanded":m?H:void 0,"aria-haspopup":!!m,"aria-label":`${f||""} floatingactionbutton`,"aria-owns":m?Q:void 0,"aria-activedescendant":V>=0&&m?`${Q}-${V}`:void 0,tabIndex:s.getTabIndex(I,a),accessKey:x,dir:_,disabled:a,className:me,style:b,onClick:Y,onMouseDown:se,onFocus:ee,onBlur:te,onKeyDown:ue,...M},ge,f&&d.createElement("span",{className:"k-fab-text"},f)),E&&H&&d.createElement("div",{className:"k-overlay",style:{zIndex:F,...C}}),d.createElement(o.Popup,{ref:L,anchor:T.current,show:H,animate:w.animate,popupClass:s.classNames("k-popup-transparent k-fab-popup",w.popupClass),anchorAlign:w.anchorAlign||re(n,J),popupAlign:w.popupAlign||ie(n,J),style:{boxShadow:"none"}},d.createElement("ul",{ref:A,role:"menu","aria-labelledby":p,id:Q,className:s.classNames("k-fab-items",{"k-fab-items-bottom":"bottom"!==n.vertical,"k-fab-items-top":"bottom"===n.vertical}),style:{paddingLeft:fe?ve:void 0,paddingRight:fe?ve:void 0}},he))))});ue.propTypes={className:n.string,style:n.object,id:n.string,dir:n.string,tabIndex:n.number,accessKey:n.string,disabled:n.bool,icon:n.string,svgIcon:s.svgIconPropType,iconClass:n.string,text:n.string,alignOffset:n.shape({x:n.oneOfType([n.number,n.string]).isRequired,y:n.oneOfType([n.number,n.string]).isRequired}),align:n.shape({vertical:n.oneOf(["top","middle","bottom"]).isRequired,horizontal:n.oneOf(["start","center","end"]).isRequired}),positionMode:n.oneOf(["absolute","fixed"]),size:n.oneOf(["small","medium","large"]),rounded:n.oneOf(["small","medium","large","full","none"]),themeColor:n.oneOf(["primary","secondary","tertiary","info","success","warning","error","dark","light","inverse"]),modal:n.bool,overlayStyle:n.object};const pe={align:{vertical:"bottom",horizontal:"end"},size:void 0,rounded:void 0,themeColor:void 0,positionMode:"fixed"};ue.displayName="KendoFloatingActionButton";const me="speechToTextButton.ariaLabel",he="speechToTextButton.title",fe={[me]:"Start speech recognition",[he]:"Speech to Text Button"},ve=d.forwardRef((e,t)=>{const n=!s.validatePackage(k,{component:"SpeechToTextButton"}),o=s.getLicenseMessage(k),l=i.useLocalization(),{fillMode:c,rounded:p,size:m,themeColor:h,ariaLabel:f,svgIcon:v,disabled:g,iconSize:b,title:y,className:C,id:I,style:x,lang:w="en-US",continuous:E=!1,interimResults:D=!1,maxAlternatives:N=1,integrationMode:S="webSpeech",onStart:B,onResult:K,onEnd:R,onError:O,...M}=e,z=d.useRef(null),F=d.useRef(!1),[P,T]=d.useState(!1),A=d.useCallback(async()=>{F.current=!0,T(!0),B&&await B()},[B]),L=d.useCallback(async()=>{F.current=!1,T(!1),R&&await R()},[R]),$=d.useCallback(e=>{const t=e.results,n=t[t.length-1],s=Array.from(n).map(e=>({transcript:e.transcript,confidence:e.confidence}));null==K||K({isFinal:n.isFinal,alternatives:s})},[K]),W=d.useCallback(e=>{T(!1),F.current=!1,null==O||O({errorMessage:e.error})},[O]),H=d.useCallback(()=>{var e;F.current||null==(e=z.current)||e.start()},[]),U=d.useCallback(()=>{var e;F.current&&(null==(e=z.current)||e.stop())},[]),j=d.useCallback(()=>{var e;F.current&&(null==(e=z.current)||e.abort(),F.current=!1,T(!1))},[]),q=()=>F.current;d.useImperativeHandle(t,()=>({start:H,stop:U,abort:j,isActive:q})),d.useEffect(()=>((()=>{var e;"undefined"==typeof window||"webkitSpeechRecognition"in window||"SpeechRecognition"in window?(null!=(e=z.current)&&e.isActive()&&z.current.stop(),z.current=new a.KendoSpeechRecognition({lang:w,continuous:E,interimResults:D,maxAlternatives:N,events:{start:A,end:L,result:$,error:W}})):O&&O({errorMessage:"Speech Recognition API is not supported in this browser."})})(),()=>{F.current&&U()}),[w,E,D,N,S]);const V=void 0!==e.icon||void 0!==e.iconClass,G=d.useMemo(()=>P?r.stopSmIcon:v||r.microphoneOutlineIcon,[P,v]);return d.createElement(d.Fragment,null,d.createElement(u,{id:I,className:s.classNames({"k-speech-to-text-button":!0,"k-listening":P},C),style:x,svgIcon:V?void 0:G,iconSize:b,fillMode:c,rounded:p,size:m,themeColor:h,"aria-label":null!=f?f:l.toLanguageString(me,fe[me]),"aria-pressed":P,disabled:g,title:null!=y?y:l.toLanguageString(he,fe[he]),onClick:()=>{P?U():H()},...M},e.children),n&&d.createElement(s.WatermarkOverlay,{message:o}))});ve.displayName="KendoSpeechToTextButton";const ge=[".k-input",".k-picker",".k-checkbox",".k-radio",".k-switch",".k-rating",".k-slider"],be=d.forwardRef((e,t)=>{const{disabled:n,fillMode:o="solid",rounded:i="medium",size:a="medium",svgIcon:c=r.pasteSparkleIcon,formFields:p,onClick:m,children:h,...f}=e,v=d.useRef(null);d.useImperativeHandle(t,()=>{var e,t,n,s;return{element:null!=(t=null==(e=v.current)?void 0:e.element)?t:null,selected:null!=(s=null==(n=v.current)?void 0:n.selected)&&s,click:()=>{var e,t;return null==(t=null==(e=v.current)?void 0:e.element)?void 0:t.click()}}});const g=d.useRef(null),b=d.useCallback(()=>{var e;return(null==(e=v.current)?void 0:e.element)?(null!=g.current||(g.current=new l.KendoSmartPaste({getElement:()=>{var e,t;return null!=(t=null==(e=v.current)?void 0:e.element)?t:null},customInputs:ge.map(e=>({identifier:e})),getSmartPasteField:e=>{const t=(e=>{const t=e.querySelector("input, select, textarea");return(null==t?void 0:t.getAttribute("name"))||(null==t?void 0:t.getAttribute("id"))||e.getAttribute("id")||null})(e.element);return t?{...e,field:t}:e}})),g.current):null},[]);return d.createElement(u,{ref:v,disabled:n,fillMode:o,rounded:i,size:a,svgIcon:c,onClick:async e=>{if(n)return;const t=await(async()=>{try{return await navigator.clipboard.readText()}catch{return""}})(),o=(()=>{const e=b();if(!e)return p;const t=e.extractFormConfig().reduce((e,t)=>e.some(e=>e.field===t.field)?e:[...e,t],[]);return p?p.map(e=>{const n=t.find(t=>t.field===e.field);return n?{...n,...e,element:n.element}:e}):t})(),r=null==o?void 0:o.map(e=>{var t;const{element:n,...s}=e;return{...s,field:s.field||"",allowedValues:null!=(t=s.allowedValues)?t:[]}}),i=Object.assign(e,{requestData:{content:t,formFields:r},setResponse:e=>{null!=e&&e.fieldValues&&((e,t)=>{var n;if(!e||!t)return;const o=Object.entries(e).reduce((e,[t,n])=>(null!=n&&(e[t]=n),e),{}),r=null==(n=v.current)?void 0:n.element;if(r){const e=s.getKendoPasteEventTarget(r);s.dispatchKendoPasteEvent(e,o)}const i=b();i&&i.populateFormFields({fieldValues:o},t)})(e.fieldValues,o)}});null==m||m(i)},type:"button",...f},h)});be.displayName="KendoReactSmartPasteButton";const ye=s.withIdHOC(S);ye.displayName="KendoReactDropDownButton";const ke=s.withIdHOC(I);ke.displayName="KendoReactSplitButton",e.Button=u,e.ButtonGroup=m,e.Chip=_,e.ChipList=Y,e.DropDownButton=ye,e.DropDownButtonClassComponent=S,e.DropDownButtonItem=w,e.FloatingActionButton=ue,e.FloatingActionButtonItem=ne,e.SmartPasteButton=be,e.SpeechToTextButton=ve,e.SplitButton=ke,e.SplitButtonClassComponent=I,e.SplitButtonItem=v,e.Toolbar=L,e.ToolbarItem=W,e.ToolbarSeparator=R,e.ToolbarSpacer=H,e.toolbarButtons=K});
|
|
15
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("prop-types"),require("@progress/kendo-react-common"),require("@progress/kendo-react-popup"),require("@progress/kendo-svg-icons"),require("@progress/kendo-react-intl"),require("@progress/kendo-webspeech-common"),require("@progress/kendo-smartpaste-common")):"function"==typeof define&&define.amd?define(["exports","react","prop-types","@progress/kendo-react-common","@progress/kendo-react-popup","@progress/kendo-svg-icons","@progress/kendo-react-intl","@progress/kendo-webspeech-common","@progress/kendo-smartpaste-common"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).KendoReactButtons={},e.React,e.PropTypes,e.KendoReactCommon,e.KendoReactPopup,e.KendoSvgIcons,e.KendoReactIntl,e.KendoWebspeechCommon,e.KendoSmartpasteCommon)}(this,function(e,t,n,s,o,r,a,l,i){"use strict";function c(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(n){if("default"!==n){var s=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,s.get?s:{enumerable:!0,get:function(){return e[n]}})}}),t.default=e,Object.freeze(t)}var d=c(t);const u=d.forwardRef((e,t)=>{const{children:n,togglable:o,dir:r,disabled:a,selected:l,icon:i,iconClass:c,svgIcon:u,imageUrl:m,imageAlt:h,className:f,startIcon:v,endIcon:g,onClick:b,size:y=p.size,rounded:k=p.rounded,fillMode:C=p.fillMode,themeColor:I=p.themeColor,ariaPressed:x,iconSize:w,...E}=e,N=d.useRef(void 0),D=d.useRef(null),[S,B]=d.useState(!0===o&&!0===l),K=void 0!==u||void 0!==i||void 0!==c||void 0!==m,R=void 0!==n,O=s.useUnstyled(),M=e.unstyled||O,z=M&&M.uButton;d.useImperativeHandle(t,()=>({element:D.current,selected:void 0!==N.current?N.current:S})),d.useMemo(()=>{o&&void 0!==l&&l!==S&&B(l)},[o,l]),d.useEffect(()=>{N.current=void 0},[S]);const F=function({imageUrl:e,name:t,iconClass:n,svgIcon:o,imageAlt:r,buttonClasses:a,iconSize:l}){return e?d.createElement("img",{role:"presentation",className:s.classNames(s.uButton.icon({c:a})),alt:r,src:e}):t||o?d.createElement(s.IconWrap,{className:s.classNames(s.uButton.icon({c:a})),name:t,icon:o,size:l}):n?d.createElement("span",{role:"presentation",className:s.classNames(s.uButton.icon({c:a}),n)}):null}({name:i,svgIcon:u,iconClass:c,imageUrl:m,imageAlt:h,buttonClasses:z,iconSize:w}),P=e=>d.cloneElement(e,{className:s.classNames(s.uButton.icon({c:z}),e.props.className)}),T=d.useMemo(()=>o?S:x||void 0,[]);return d.createElement("button",{ref:D,"aria-pressed":T,...E,dir:r,disabled:a,onClick:e=>{o&&void 0===l&&(N.current=!S,B(!S)),b&&b.call(void 0,e)},className:s.classNames(s.uButton.wrapper({c:z,isRtl:"rtl"===r,selected:S,disabled:a,size:y,fillMode:C,rounded:k,themeColor:I,iconButton:!R&&K}),f)},v&&P(v),F,n&&d.createElement("span",{className:s.classNames(s.uButton.text({c:z}))},n),g&&P(g))}),p={size:void 0,rounded:void 0,fillMode:void 0,themeColor:void 0};u.displayName="KendoReactButton",u.propTypes={children:n.node,selected:n.bool,togglable:n.bool,icon:n.string,svgIcon:s.svgIconPropType,iconClass:n.string,imageUrl:n.string,imageAlt:n.string,size:n.oneOf(["small","medium","large"]),rounded:n.oneOf(["small","medium","large","full","none"]),fillMode:n.oneOf(["flat","link","outline","solid","clear"]),themeColor:n.oneOf(["base","primary","secondary","tertiary","info","success","warning","error","dark","light","inverse"])};const m=e=>{const{children:t,className:n,dir:o,disabled:r,width:a}=e,l=s.useUnstyled(),i=e.unstyled||l,c=i&&i.uButtonGroup,u=(e,t)=>{const n={...a?{width:a}:{},...e.props.style||{}},s=r||e.props.disabled,o={...e.props,...t?{className:t}:{},...Object.keys(n).length?{style:n}:{},...void 0!==s?{disabled:s}:{}};return d.Children.count(e.props.children)>0?d.cloneElement(e,o,e.props.children):d.cloneElement(e,o)},p=d.useRef(null),m=(e=>{const t=d.Children.count(e),n=void 0!==o?"rtl"===o:p.current&&"rtl"===getComputedStyle(p.current).direction||!1;return d.Children.map(e,(e,o)=>{if(d.isValidElement(e)){const r=o===t-1,a=n,l=s.classNames(e.props.className,s.uButtonGroup.position({c:c,start:a?r:0===o,end:a?0===o:r}));return u(e,l)}return e})})(t),h=s.classNames(s.uButtonGroup.wrapper({c:c,stretched:!!a,disabled:r}),n),f={className:h,style:{width:`${a}`},dir:o,role:"group","aria-disabled":r};return d.createElement("div",{ref:p,...f,className:h},m)};m.propTypes={children:n.oneOfType([n.arrayOf(n.element),n.element]),className:n.string,disabled:n.bool,width:n.string,dir:n.string};const h=e=>{const t=s.useUnstyled(),n=e.unstyled||t,o=n&&n.uDropDownButton,r=d.useCallback(t=>{e.onClick(t,e.index)},[e]),a=e.dataItem.render||e.item||(void 0===e.item?e.render:null),l=void 0!==e.dataItem.text?e.dataItem.text:e.textField?e.dataItem[e.textField]:e.dataItem,i=d.createElement("li",{id:e.id,className:s.classNames(s.uDropDownButton.li({c:o,focused:e.focused}),e.className),tabIndex:-1,onClick:r,onMouseDown:e.onDown,onPointerDown:e.onDown,role:"menuitem","aria-disabled":e.dataItem.disabled||void 0},d.createElement("span",{tabIndex:-1,className:s.classNames(s.uDropDownButton.link({c:o,selected:e.dataItem.selected,disabled:e.dataItem.disabled})),key:"icon"},a?d.createElement(a,{item:e.dataItem,itemIndex:e.index}):d.createElement(d.Fragment,null,(e.dataItem.icon||e.dataItem.iconClass||e.dataItem.svgIcon)&&d.createElement(s.IconWrap,{className:e.dataItem.iconClass,name:e.dataItem.icon,icon:e.dataItem.svgIcon}),e.dataItem.imageUrl&&d.createElement("img",{role:"presentation",alt:"",src:e.dataItem.imageUrl,className:"k-icon"}),l&&d.createElement("span",{className:"k-menu-link-text"},l))));return void 0!==e.item&&void 0!==e.render?e.render.call(void 0,i,e):i};h.displayName="KendoReactButtonItem";const f=class extends d.Component{render(){return null}};f.propTypes={text:n.string,icon:n.string,iconClass:n.string,imageUrl:n.string,disabled:n.bool,render:n.any};let v=f;const g=(e,t,n,o)=>{if(n)return e;const r=Math.min(o-1,Math.max(0,e));switch(t){case s.Keys.enter:case s.Keys.space:case s.Keys.esc:return-1;case s.Keys.up:case s.Keys.left:return r-1<0?o-1:r-1;case s.Keys.down:case s.Keys.right:return r+1>=o?0:r+1;case s.Keys.home:return 0;case s.Keys.end:return o-1;default:return e}};function b(e){const t={horizontal:"left",vertical:"bottom"};return e&&(t.horizontal="right"),t}function y(e){const t={horizontal:"left",vertical:"top"};return e&&(t.horizontal="right"),t}const k=Object.freeze({name:"@progress/kendo-react-buttons",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate:0,version:"14.3.0-develop.2",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"}),C=class extends d.Component{constructor(e){super(e),this.state={focused:!1,focusedIndex:-1,opened:!1},this.wrapper=null,this.mainButton=null,this.list=null,this.skipFocus=!1,this.buttonsData=[],this.showLicenseWatermark=!1,this.onKeyDown=e=>{const{focusedIndex:t}=this.state;if(e.altKey)return void(this.opened||e.keyCode!==s.Keys.down?this.opened&&e.keyCode===s.Keys.up&&(e.preventDefault(),this.setState({focusedIndex:-1}),this.setOpen(!1,e)):(e.preventDefault(),this.setState({focusedIndex:0}),this.setOpen(!0,e)));let n;if(e.keyCode===s.Keys.enter||e.keyCode===s.Keys.space){if(e.preventDefault(),this.dispatchClickEvent(e,t),t>=0){n={focusedIndex:this.opened?-1:0};const t=!this.opened;this.setOpen(t,e)}}else if(this.opened&&e.keyCode===s.Keys.esc)return this.setState({focusedIndex:-1}),void this.setOpen(!1,e);if(this.opened){const o=g(t,e.keyCode,e.altKey,this.buttonsData.length);o!==t&&(n=n||{},n.focusedIndex=o);const r=e.keyCode===s.Keys.up||e.keyCode===s.Keys.down||e.keyCode===s.Keys.left||e.keyCode===s.Keys.right;!e.altKey&&(r||e.keyCode===s.Keys.home||e.keyCode===s.Keys.end)&&e.preventDefault()}n&&this.setState(n)},this.switchFocus=e=>{this.skipFocus=!0,e(),window.setTimeout(()=>this.skipFocus=!1,0)},this.onFocus=e=>{this.skipFocus||(s.dispatchEvent(this.props.onFocus,e,this,void 0),this.setState({focused:!0}))},this.setOpen=(e,t)=>{this.opened!==e&&(this.openedDuringOnChange=e,this.setState({opened:e}),t?this.dispatchPopupEvent(t,e):this.openedDuringOnChange=void 0)},this.onItemClick=(e,t)=>{this.opened&&this.setState({focusedIndex:0}),this.dispatchClickEvent(e,t),this.setOpen(!1,e)},this.onBlur=e=>{this.skipFocus||(this.setState({focused:!1,focusedIndex:-1}),s.dispatchEvent(this.props.onBlur,e,this,void 0),setTimeout(()=>{this.setOpen(!1,e)},0))},this.onPopupClose=e=>{var t;const n=s.getActiveElement(document);this.element&&this.element.removeAttribute("tabindex"),(n===this.list||null!=(t=this.list)&&t.contains(n))&&this.switchFocus(()=>{this.element&&this.element.focus({preventScroll:!0})}),this.props.popupSettings&&this.props.popupSettings.onClose&&this.props.popupSettings.onClose.call(void 0,e)},this.listRef=e=>{this.list=e,e&&this.state.focused&&this.switchFocus(()=>{e.focus({preventScroll:!0}),this.element&&(this.element.tabIndex=-1)})},this.onSplitPartClick=e=>{if(this.buttonsData.length){const t=!this.opened;this.setState({focusedIndex:t?0:-1,focused:!0}),this.setOpen(t,e)}},this.onDownSplitPart=e=>{e.preventDefault();const t=s.getActiveElement(document);this.element&&t!==this.element&&t!==this.list&&this.element.focus()},this.onItemDown=e=>{s.getActiveElement(document)===this.list&&e.preventDefault()},this.dispatchPopupEvent=(e,t)=>{s.dispatchEvent(t?this.props.onOpen:this.props.onClose,e,this,void 0),this.openedDuringOnChange=void 0},this.showLicenseWatermark=!s.validatePackage(k,{component:"SplitButton"}),this.licenseMessage=s.getLicenseMessage(k)}get guid(){return this.props.id?this.props.id+"-accessibility-id":this.props.id}get opened(){return void 0!==this.openedDuringOnChange?this.openedDuringOnChange:void 0===this.props.opened?this.state.opened:this.props.opened}render(){this.buttonsData=this.props.items||d.Children.toArray(this.props.children).filter(e=>e&&e.type===v).map(e=>e.props);const e=this.isRtl(),t=e?"rtl":void 0,{id:n,style:o,tabIndex:a,disabled:l}=this.props;return d.createElement(d.Fragment,null,d.createElement("div",{id:n,style:o,className:s.classNames("k-split-button","k-button-group",{"k-focus":this.state.focused},this.props.rounded&&`k-rounded-${s.kendoThemeMaps.roundedMap[this.props.rounded]}`,this.props.className),onKeyDown:this.onKeyDown,onFocus:this.onFocus,onBlur:this.onBlur,dir:t,ref:e=>{this.wrapper=e}},d.createElement(u,{ref:e=>{this.mainButton=e&&e.element},type:"button",size:this.props.size,rounded:this.props.rounded,fillMode:this.props.fillMode,themeColor:this.props.themeColor,onClick:e=>this.onItemClick(e,-1),disabled:l||void 0,tabIndex:a,accessKey:this.props.accessKey,className:this.props.buttonClass,icon:this.props.icon,svgIcon:this.props.svgIcon,iconClass:this.props.iconClass,startIcon:this.props.startIcon,endIcon:this.props.endIcon,imageUrl:this.props.imageUrl,dir:t,"aria-disabled":l,"aria-haspopup":!0,"aria-expanded":this.opened||void 0,"aria-label":this.props.ariaLabel,"aria-controls":this.opened?this.guid:void 0,id:"button-"+this.guid,title:this.props.title},this.props.text),d.createElement(u,{type:"button",size:this.props.size,rounded:this.props.rounded,fillMode:this.props.fillMode,themeColor:this.props.themeColor,icon:"caret-alt-down",svgIcon:r.caretAltDownIcon,className:"k-split-button-arrow",disabled:l||void 0,tabIndex:-1,onClick:this.onSplitPartClick,onMouseDown:this.onDownSplitPart,onPointerDown:this.onDownSplitPart,dir:t,"aria-label":"menu toggling button"}),this.renderPopup(e)),this.showLicenseWatermark&&d.createElement(s.WatermarkOverlay,{message:this.licenseMessage}))}componentDidMount(){(void 0===this.props.dir&&this.isRtl()||this.opened)&&this.forceUpdate()}get element(){return this.mainButton}dispatchClickEvent(e,t){this.isItemDisabled(t)||(-1===t?s.dispatchEvent(this.props.onButtonClick,e,this,void 0):s.dispatchEvent(this.props.onItemClick,e,this,{item:this.buttonsData[t],itemIndex:t}))}renderPopup(e){const{popupSettings:t={}}=this.props,{focusedIndex:n}=this.state;return d.createElement(o.Popup,{anchor:this.wrapper,show:this.opened,animate:t.animate,popupClass:s.classNames("k-menu-popup",t.popupClass),anchorAlign:t.anchorAlign||b(e),popupAlign:t.popupAlign||y(e),style:e?{direction:"rtl"}:void 0,onClose:this.onPopupClose},d.createElement("ul",{role:"menu",id:this.guid,"aria-labelledby":"button-"+this.guid,tabIndex:-1,ref:this.listRef,"aria-activedescendant":n>=0?`${this.guid}-${n}`:void 0,className:s.classNames("k-menu-group",{[`k-menu-group-${s.kendoThemeMaps.sizeMap[this.props.size]||this.props.size}`]:this.props.size})},this.renderChildItems()))}renderChildItems(){const{item:e,itemRender:t,textField:n}=this.props;return this.buttonsData.length>0?this.buttonsData.map((o,r)=>d.createElement(h,{className:s.classNames("k-menu-item",{"k-first":0===r},{"k-last":r===this.buttonsData.length-1}),dataItem:o,textField:n,focused:this.state.focusedIndex===r,onClick:this.onItemClick,onDown:this.onItemDown,render:t,item:e,key:r,index:r,id:`${this.guid}-${r}`})):null}isItemDisabled(e){return this.buttonsData[e]?this.buttonsData[e].disabled:this.props.disabled}isRtl(){return void 0!==this.props.dir?"rtl"===this.props.dir:!!this.wrapper&&"rtl"===getComputedStyle(this.wrapper).direction}};C.propTypes={accessKey:n.string,ariaLabel:n.string,title:n.string,onButtonClick:n.func,onFocus:n.func,onBlur:n.func,onItemClick:n.func,onOpen:n.func,onClose:n.func,text:n.string,items:n.arrayOf(n.any),textField:n.string,tabIndex:n.number,disabled:n.bool,icon:n.string,svgIcon:s.svgIconPropType,imageUrl:n.string,popupSettings:n.object,itemRender:n.any,item:n.func,className:n.string,buttonClass:n.string,dir:n.string,size:n.oneOf(["small","medium","large"]),rounded:n.oneOf(["small","medium","large","full","none"]),fillMode:n.oneOf(["flat","link","outline","solid","clear"]),themeColor:n.oneOf(["base","primary","secondary","tertiary","info","success","warning","error","dark","light","inverse"])},C.defaultProps={size:void 0,rounded:void 0,fillMode:void 0,themeColor:void 0};let I=C;const x=class extends d.Component{render(){return null}};x.propTypes={text:n.string,icon:n.string,iconClass:n.string,imageUrl:n.string,selected:n.bool,disabled:n.bool,render:n.any};let w=x;const E=class extends d.Component{constructor(e){super(e),this.state={opened:!1,focused:!1,focusedIndex:-1},this.mainButton=null,this.list=null,this.skipFocus=!1,this.showLicenseWatermark=!1,this.buttonsData=[],this.onKeyDown=e=>{const{focusedIndex:t}=this.state;if(e.altKey)return void(this.opened||e.keyCode!==s.Keys.down?this.opened&&e.keyCode===s.Keys.up&&(e.preventDefault(),this.setState({focusedIndex:-1}),this.setOpen(!1,e)):(e.preventDefault(),this.setOpen(!0,e),this.setState({focusedIndex:0})));const n={...this.state};if(e.keyCode===s.Keys.enter||e.keyCode===s.Keys.space){e.preventDefault(),t>=0&&this.dispatchClickEvent(e,t);const n=!this.opened;return this.setState({focused:!0,focusedIndex:n?0:-1}),void this.setOpen(n,e)}if(this.opened&&e.keyCode===s.Keys.esc)return this.setState({focusedIndex:-1}),void this.setOpen(!1,e);if(this.opened){const o=g(t,e.keyCode,e.altKey,this.buttonsData.length);n.focusedIndex=o;const r=e.keyCode===s.Keys.up||e.keyCode===s.Keys.down||e.keyCode===s.Keys.left||e.keyCode===s.Keys.right;!e.altKey&&(r||e.keyCode===s.Keys.home||e.keyCode===s.Keys.end)&&e.preventDefault()}this.setState(n)},this.switchFocus=e=>{this.skipFocus=!0,e(),window.setTimeout(()=>this.skipFocus=!1,0)},this.handleFocus=e=>{this.skipFocus||(this.setState({focused:!0,focusedIndex:this.opened?0:-1}),s.dispatchEvent(this.props.onFocus,e,this,void 0))},this.handleButtonBlur=e=>{this.opened||(this.setState({focused:!1}),s.dispatchEvent(this.props.onBlur,e,this,void 0))},this.handleMenuBlur=e=>{this.skipFocus||(this.setState({focused:!1,focusedIndex:-1}),s.dispatchEvent(this.props.onBlur,e,this,void 0),setTimeout(()=>{this.setOpen(!1,e)},0))},this.setOpen=(e,t)=>{this.opened!==e&&(this.openedDuringOnChange=e,this.setState({opened:e}),t?this.dispatchPopupEvent(t,e):this.openedDuringOnChange=void 0)},this.onItemClick=(e,t)=>{this.setState({focusedIndex:-1}),this.dispatchClickEvent(e,t),this.setOpen(!1,e)},this.onItemDown=e=>{s.getActiveElement(document)===this.list&&e.preventDefault()},this.mouseDown=e=>{e.preventDefault();const t=s.getActiveElement(document);this.element&&t!==this.element&&t!==this.list&&this.element.focus()},this.onPopupClose=e=>{var t;const n=s.getActiveElement(document);this.element&&this.element.removeAttribute("tabindex"),(n===this.list||null!=(t=this.list)&&t.contains(n))&&this.switchFocus(()=>{this.element&&this.element.focus({preventScroll:!0})}),this.props.popupSettings&&this.props.popupSettings.onClose&&this.props.popupSettings.onClose.call(void 0,e)},this.listRef=e=>{this.list=e,e&&this.state.focused&&this.switchFocus(()=>{e.focus({preventScroll:!0}),this.element&&(this.element.tabIndex=-1)})},this.onClickMainButton=e=>{if(s.dispatchEvent(this.props.onClick,e,this,void 0),!this.buttonsData.length)return;const t=!this.opened;this.setState({focused:!0,focusedIndex:t?0:-1}),this.setOpen(t,e)},this.dispatchPopupEvent=(e,t)=>{s.dispatchEvent(t?this.props.onOpen:this.props.onClose,e,this,void 0),this.openedDuringOnChange=void 0},this.showLicenseWatermark=!s.validatePackage(k,{component:"DropDownButton"}),this.licenseMessage=s.getLicenseMessage(k)}get guid(){return this.props.id+"-accessibility-id"}get opened(){return void 0!==this.openedDuringOnChange?this.openedDuringOnChange:void 0===this.props.opened?this.state.opened:this.props.opened}render(){const e=this.isRtl(),t=this.props.unstyled&&this.props.unstyled.uDropDownButton,n=e?"rtl":void 0,{id:o,style:r,tabIndex:a,disabled:l,size:i,rounded:c,fillMode:p,themeColor:m,ariaLabel:h,title:f,accessKey:v,icon:g,svgIcon:b,iconClass:y,buttonClass:k,className:C,imageUrl:I,startIcon:x,endIcon:E}=this.props;return this.buttonsData=this.props.items||d.Children.toArray(this.props.children).filter(e=>e&&e.type===w).map(e=>e.props),d.createElement(d.Fragment,null,d.createElement(u,{id:o,size:i,style:r,rounded:c,fillMode:p,themeColor:m,onClick:this.onClickMainButton,onMouseDown:this.mouseDown,onKeyDown:this.onKeyDown,onFocus:this.handleFocus,onBlur:this.handleButtonBlur,"aria-disabled":l?"true":void 0,tabIndex:a,accessKey:v,icon:g,svgIcon:b,iconClass:y,className:s.classNames(k,C,s.uDropDownButton.wrapper({c:t,focused:this.state.focused,disabled:l})),imageUrl:I,dir:n,ref:e=>{this.mainButton=(null==e?void 0:e.element)||null},type:"button","aria-expanded":this.opened?"true":"false","aria-label":h,"aria-controls":this.opened?this.guid:void 0,title:f,startIcon:x,endIcon:E},this.props.text),this.showLicenseWatermark&&d.createElement(s.WatermarkOverlay,{message:this.licenseMessage}),this.renderPopup(e))}componentDidMount(){(void 0===this.props.dir&&this.isRtl()||this.opened)&&this.forceUpdate()}get element(){return this.mainButton}dispatchClickEvent(e,t){this.isItemDisabled(t)||s.dispatchEvent(this.props.onItemClick,e,this,{item:this.buttonsData[t],itemIndex:t})}renderPopup(e){const{popupSettings:t={},_zIndex:n,unstyled:r}=this.props,a=n?n+2e3:12e3,l=r&&r.uDropDownButton,{focusedIndex:i}=this.state;return d.createElement(s.ZIndexContext.Provider,{value:a},d.createElement(o.Popup,{anchor:this.mainButton,show:this.opened,animate:t.animate,popupClass:s.classNames(s.uDropDownButton.popup({c:l}),t.popupClass),anchorAlign:t.anchorAlign||b(e),popupAlign:t.popupAlign||y(e),style:e?{direction:"rtl"}:void 0,onClose:this.onPopupClose},d.createElement("ul",{role:"list",id:this.guid,tabIndex:-1,"aria-activedescendant":i>=0?`${this.guid}-${i}`:void 0,ref:this.listRef,onKeyDown:this.onKeyDown,onBlur:this.handleMenuBlur,className:s.classNames(s.uDropDownButton.ul({c:l,size:this.props.size}))},this.renderChildItems())))}renderChildItems(){const{item:e,itemRender:t,textField:n,unstyled:o}=this.props,r=o&&o.uDropDownButton;return this.buttonsData.length>0?this.buttonsData.map((o,a)=>d.createElement(h,{className:s.classNames(s.uDropDownButton.item({c:r}),o.className,{"k-first":0===a},{"k-last":a===this.buttonsData.length-1}),dataItem:o,textField:n,focused:this.state.focusedIndex===a,onClick:this.onItemClick,onDown:this.onItemDown,render:t,item:e,index:a,key:a,id:`${this.guid}-${a}`})):null}isItemDisabled(e){return this.buttonsData[e]?this.buttonsData[e].disabled:this.props.disabled}isRtl(){return void 0!==this.props.dir?"rtl"===this.props.dir:!!this.mainButton&&"rtl"===getComputedStyle(this.mainButton).direction}};E.propTypes={accessKey:n.string,ariaLabel:n.string,title:n.string,onFocus:n.func,onBlur:n.func,onClick:n.func,onItemClick:n.func,onOpen:n.func,onClose:n.func,items:n.arrayOf(n.any),textField:n.string,tabIndex:n.number,disabled:n.bool,icon:n.string,svgIcon:s.svgIconPropType,iconClass:n.string,imageUrl:n.string,popupSettings:n.object,itemRender:n.func,item:n.func,className:n.string,buttonClass:n.string,dir:n.string,size:n.oneOf(["small","medium","large"]),rounded:n.oneOf(["small","medium","large","full","none"]),fillMode:n.oneOf(["flat","link","outline","solid","clear"]),themeColor:n.oneOf(["base","primary","secondary","tertiary","info","success","warning","error","dark","light","inverse"])},E.defaultProps={size:void 0,rounded:void 0,fillMode:void 0,themeColor:void 0};let N=E;const D=s.createPropsContext(),S=s.withIdHOC(s.withPropsContext(D,s.withUnstyledHOC(s.withZIndexContext(N))));S.displayName="KendoReactDropDownButton";const B=":not(.k-dropdownlist button):not(.k-colorpicker button):not(.k-split-button .k-split-button-arrow)",K=["button"+B,".k-button-group > button"+B,".k-colorpicker",".k-dropdownlist"],R=e=>d.createElement("div",{ref:e._ref,className:s.classNames("k-toolbar-separator k-separator",e.className)}),O="prevArrow.title",M="nextArrow.title",z="moreButtonTitle.title",F={[O]:"Previous scroll button",[M]:"Next scroll button",[z]:"More button"},P=e=>{const t=a.useLocalization(),{disabled:n,type:o,scrollContentRef:l,buttonScrollSpeed:i,prevButton:c,nextButton:u}=e,p="prev"===o?c||"span":u||"span";return d.createElement(p,{className:s.classNames("k-button","k-icon-button",`k-toolbar-${o}`,{"k-disabled":n}),title:`${"prev"===o?t.toLanguageString(O,F[O]):t.toLanguageString(M,F[M])}`,"aria-hidden":!0,tabIndex:n?-1:void 0,onClick:e=>{l&&l.current&&i&&l.current.scrollBy({left:"next"===o?i:-i,behavior:"smooth"})}},d.createElement(s.SvgIcon,{icon:"prev"===o?r.caretAltLeftIcon:r.caretAltRightIcon,className:"k-button-icon"}))},T=e=>{const{scrollButtons:t,scrollButtonsPosition:n,isOverflowing:s,scrollContentRef:o,buttonScrollSpeed:r,dir:a,isScrollStartPosition:l,isScrollEndPosition:i,prevButton:c,nextButton:u,children:p}=e,m=(e,t)=>d.createElement(P,{type:e,disabled:t,scrollContentRef:o,buttonScrollSpeed:r,prevButton:c,nextButton:u}),h="visible"===t||"auto"===t&&s;return d.createElement(d.Fragment,null,h&&"split"===n&&d.createElement(d.Fragment,null,m("rtl"!==a?"prev":"next",l),d.createElement(R,{className:"k-toolbar-button-separator"})),h&&"start"===n&&d.createElement(d.Fragment,null,m("rtl"!==a?"prev":"next",l),m("rtl"!==a?"next":"prev",i),d.createElement(R,{className:"k-toolbar-button-separator"})),d.createElement("span",{className:"k-toolbar-items k-toolbar-items-scroll",ref:o},p),h&&"split"===n&&d.createElement(d.Fragment,null,d.createElement(R,{className:"k-toolbar-button-separator"}),m("rtl"!==a?"next":"prev",i)),h&&"end"===n&&d.createElement(d.Fragment,null,d.createElement(R,{className:"k-toolbar-button-separator"}),m("rtl"!==a?"prev":"next",l),m("rtl"!==a?"next":"prev",i)))},A=e=>{var t;const{toolbarRef:n,children:l,fillMode:i,size:c}=e,[p,m]=d.useState(!1),h=d.useRef(d.Children.toArray(l).filter(e=>d.isValidElement(e)).map((e,t)=>d.cloneElement(e,{key:e.key||t}))),f=d.useRef([]),v=d.useRef(0),g=d.useRef(null),b=d.useRef(null),y=a.useLocalization(),[k,C]=d.useReducer(e=>e+1,0),I=()=>{if(!n.current)return;let e=0;const t=n.current.clientWidth,s=parseInt(window.getComputedStyle(n.current).gap||"0",10),o=Array.from(n.current.children).reduce((e,t,n)=>e+=Math.ceil(t.clientWidth),0),r=Array.from(n.current.children).length;if(e=o+r*s+2*s,e>t){const e=[...h.current],n=e.pop();v.current=t,h.current=e,n&&(f.current=[n,...f.current])}else if(t>v.current+s*r){const e=[...f.current],n=e.shift();f.current=e,n&&(h.current=[...h.current,n]),v.current=t}C()};d.useEffect(()=>{I();const e=new ResizeObserver(I),t=n.current;return t&&e.observe(t),()=>{t&&e.unobserve(t)}},[]);return d.createElement(d.Fragment,null,h.current.length>0&&h.current,f.current.length>0&&d.createElement(d.Fragment,null,d.createElement(R,{_ref:b,className:"k-toolbar-button-separator"}),d.createElement(u,{ref:g,className:"k-toolbar-overflow-button",fillMode:"flat",svgIcon:r.moreHorizontalIcon,title:y.toLanguageString(z,F[z]),onClick:()=>{m(!p)}}),d.createElement(o.Popup,{anchor:n.current,show:p,popupClass:"k-toolbar-popup",style:{width:null==(t=n.current)?void 0:t.offsetWidth}},d.createElement("span",{className:`k-toolbar-items-list k-toolbar-items-list-${s.kendoThemeMaps.sizeMap[c]} k-toolbar-items-list-${i}`},f.current.length>0&&f.current))))},L=d.forwardRef((e,t)=>{const{children:n,className:o,id:r,ariaLabel:a,keyboardNavigation:l,role:i,onResize:c,style:u,tabIndex:p=$.tabIndex,size:m=$.size,fillMode:h=$.fillMode,overflow:f,scrollButtons:v=$.scrollButtons,scrollButtonsPosition:g=$.scrollButtonsPosition,buttonScrollSpeed:b=$.buttonScrollSpeed,prevButton:y,nextButton:k,_ariaControls:C}=e,I=d.useRef(!1),x=d.useRef(null),w=d.useRef(null),E=d.useRef(0),N=d.useRef(0),D=d.useRef([]),S=d.useRef({element:null,props:e}),[B,R]=d.useState(!1),[O,M]=d.useState(!0),[z,F]=d.useState(!1),P=s.useDir(x,e.dir),L=d.useMemo(()=>e.buttons||K,[e.buttons]),W=d.useMemo(()=>L.map(e=>e+":focus").join(","),[L]),H=()=>{const e=x.current&&x.current.querySelector(W);return Math.max(0,D.current.findIndex(t=>t===e))};d.useImperativeHandle(S,()=>({element:x.current,props:e})),d.useImperativeHandle(t,()=>S.current),d.useEffect(()=>(window.addEventListener("resize",j),x.current&&(N.current=x.current.offsetWidth,E.current=x.current.offsetHeight,!1!==l&&(D.current=Array.from(x.current.querySelectorAll(L.join(","))),U(0))),()=>{window.removeEventListener("resize",j),D.current.length=0}),[]),d.useEffect(()=>{if(I.current){if(!x.current||!1===l)return;D.current=Array.from(x.current.querySelectorAll(L.join(","))),U(H()),q()}else I.current=!0});const U=e=>{D.current.forEach((t,n)=>{t.tabIndex=n===e?p:-1})},V=(e,t)=>{const n=D.current[t];if(n){n.tabIndex=p,n.focus();const t=D.current[e];t&&(t.tabIndex=-1)}},j=e=>{if(!x.current)return;const t=x.current.offsetWidth,n=x.current.offsetHeight;if(N.current!==t||E.current!==n){N.current=t,E.current=n;const s={offsetWidth:N.current,offsetHeight:E.current};c&&c.call(void 0,{target:S.current,...s,nativeEvent:e})}q()},q=d.useCallback(()=>{const e=w.current;e&&R(e.scrollWidth>e.clientWidth||e.scrollHeight>e.clientHeight)},[]),G=d.useCallback(()=>{const e=w.current;if(e){const t=0===e.scrollLeft,n="rtl"!==P?e.scrollLeft+e.clientWidth===e.scrollWidth:e.clientWidth-e.scrollLeft===e.scrollWidth;t&&M(!0),n&&F(!0),!t&&!n&&(M(!1),F(!1))}},[P]);return d.useEffect(()=>{const e=w.current;if(e)return e.addEventListener("scroll",G),()=>{e.removeEventListener("scroll",G)}},[G]),d.createElement("div",{id:r,"aria-label":a,"aria-controls":C,className:s.classNames("k-toolbar",{[`k-toolbar-${s.kendoThemeMaps.sizeMap[m]||m}`]:m,[`k-toolbar-${h}`]:h,"k-toolbar-scrollable":"scroll"===f,"k-toolbar-scrollable-overlay":"scroll"===f&&("hidden"===v||void 0===v),"k-toolbar-scrollable-start":"scroll"===f&&"hidden"===v&&O,"k-toolbar-scrollable-end":"scroll"===f&&"hidden"===v&&z,"k-toolbar-section":e.overflow&&"section"===f},o),style:u,role:void 0!==i?i||void 0:"toolbar",dir:P,ref:x,onKeyDown:!1!==l?e=>{const t=e.keyCode===s.Keys.left||e.keyCode===s.Keys.right||e.keyCode===s.Keys.home||e.keyCode===s.Keys.end,n=H();!t||e.defaultPrevented||-1===D.current.findIndex(t=>t===e.target)||(e.keyCode===s.Keys.left?V(n,0===n?D.current.length-1:n-1):V(n,n===D.current.length-1?0:n+1),e.keyCode===s.Keys.home&&V(n,0),e.keyCode===s.Keys.end&&V(n,D.current.length-1))}:void 0},"scroll"===f&&d.createElement(T,{scrollButtons:v,scrollButtonsPosition:g,prevButton:y,nextButton:k,isOverflowing:B,scrollContentRef:w,buttonScrollSpeed:b,dir:P,isScrollStartPosition:O,isScrollEndPosition:z,children:n}),"section"===f&&d.createElement(A,{toolbarRef:x,fillMode:h,size:m},n),("none"===f||void 0===f)&&n)}),$={tabIndex:0,size:void 0,fillMode:void 0,scrollButtons:"auto",scrollButtonsPosition:"split",buttonScrollSpeed:100};L.displayName="KendoReactToolbar",L.propTypes={tabIndex:n.number,dir:n.string,keyboardNavigation:n.bool,style:n.object,className:n.string,role:n.string,onResize:n.func,buttons:n.arrayOf(n.string.isRequired),size:n.oneOf(["small","medium","large"]),fillMode:n.oneOf(["solid","flat","outline"]),overflow:n.oneOf(["none","section","scroll"]),scrollButtons:n.oneOf(["hidden","visible","auto"]),scrollButtonsPosition:n.oneOf(["start","end","split"]),buttonScrollSpeed:n.number};const W=d.forwardRef((e,t)=>{const{id:n,className:o,style:r,children:a}=e,l=d.useRef(null);return d.useImperativeHandle(t,()=>({element:l.current})),d.createElement("div",{id:n,className:s.classNames("k-toolbar-item",o),style:r,ref:l},a)});W.displayName="KendoReactToolbarItem",W.propTypes={className:n.string};const H=d.forwardRef((e,t)=>{const n=d.useRef(null),o=d.useRef(null);d.useImperativeHandle(o,()=>({element:n.current})),d.useImperativeHandle(t,()=>({element:n.current}));const r=d.useMemo(()=>s.classNames("k-spacer",e.className),[e.className]);return d.createElement("span",{ref:n,className:r})});H.displayName="KendoReactToolbarSpacer",H.propTypes={className:n.string};const U=d.createContext([null,e=>{}]),V=d.createContext([null,e=>{}]),j=d.createContext([null,e=>{}]);var q=(e=>(e.next="next",e.prev="prev",e.current="current",e.reset="reset",e))(q||{});var G=(e=>(e.remove="remove",e.add="add",e.reorder="reorder",e))(G||{});var Z=(e=>(e.toggle="toggle",e.remove="remove",e))(Z||{});const _=d.forwardRef((e,t)=>{const n=d.useRef(null),o=d.useRef(null),{disabled:a=Q.disabled,fillMode:l=Q.fillMode,themeColor:i=Q.themeColor,size:c=Q.size,rounded:u=Q.rounded,dir:p=Q.dir,removeIcon:m=Q.removeIcon,removeSvgIcon:h=Q.removeSvgIcon,removable:f=Q.removable}=e,v=s.useDir(o,p);d.useImperativeHandle(n,()=>({element:o.current,props:e})),d.useImperativeHandle(t,()=>n.current);const[g,b]=d.useContext(U),[y,k]=d.useContext(V),[,C]=d.useContext(j),I=d.useMemo(()=>e.selected||(Array.isArray(g)?g.some(t=>t===e.value):g===e.value),[e.selected,e.value,g]),x=d.useMemo(()=>y===e.value,[e.value,y]);d.useEffect(()=>{x&&o.current&&o.current.focus()},[x]);const w=d.useCallback(t=>{b({type:Z.toggle,payload:e.value,event:t})},[b,e.value]),E=d.useCallback(t=>{f&&(C({type:G.remove,payload:e.value,event:t}),k({type:q.reset,payload:e.value,event:t}),b({type:Z.remove,payload:e.value,event:t}),e.onRemove&&e.onRemove.call(void 0,{target:n.current,syntheticEvent:t}))},[e.onRemove,e.value,f,C,k,b]),N=d.useCallback(t=>{switch(t.keyCode){case s.Keys.left:k({type:q.prev,payload:e.value,event:t});break;case s.Keys.right:k({type:q.next,payload:e.value,event:t});break;case s.Keys.enter:b({type:Z.toggle,payload:e.value,event:t});break;case s.Keys.delete:E(t)}e.onKeyDown&&e.onKeyDown.call(void 0,{target:n.current,syntheticEvent:t})},[e.onKeyDown,e.value,k,b,E]),D=d.useCallback(t=>{k({payload:e.value,type:q.current,event:t}),e.onFocus&&e.onFocus.call(void 0,{target:n.current,syntheticEvent:t})},[e.onFocus,e.value,k]),S=d.useCallback(t=>{e.onBlur&&e.onBlur.call(void 0,{target:n.current,syntheticEvent:t})},[e.onBlur]),B=s.useMouse(e,n,{onClick:w});return d.createElement("div",{...B,role:e.role||"button",id:e.value,style:e.style,ref:o,dir:v,tabIndex:s.getTabIndex(e.tabIndex,a,void 0),className:s.classNames("k-chip",{"k-rtl":"rtl"===v,"k-disabled":a,"k-selected":I,"k-focus":x,[`k-chip-${s.kendoThemeMaps.sizeMap[c]||c}`]:c,[`k-rounded-${s.kendoThemeMaps.roundedMap[u]||u}`]:u,[`k-chip-${l}`]:l,[`k-chip-${i}`]:!!i},e.className),"aria-pressed":e.role?void 0:I,"aria-disabled":a,"aria-describedby":e.ariaDescribedBy,"aria-keyshortcuts":f?"Enter Delete":void 0,onFocus:D,onBlur:S,onKeyDown:N},I&&(e.selectedIcon||e.selectedSvgIcon)&&d.createElement(s.IconWrap,{className:"k-chip-icon",name:e.selectedIcon?s.toIconName(e.selectedIcon):void 0,icon:e.selectedSvgIcon,size:"small"}),(e.icon||e.svgIcon)&&d.createElement(s.IconWrap,{className:"k-chip-icon",name:e.icon?s.toIconName(e.icon):void 0,icon:e.svgIcon,size:"small"}),e.avatar&&d.createElement("div",{className:s.classNames("k-chip-avatar","k-avatar",e.avatar.rounded&&`k-rounded-${e.avatar.rounded}`),style:e.avatar.style},d.createElement("span",{className:"k-avatar-image"},d.createElement("img",{src:e.avatar.image,alt:e.avatar.imageAlt}))),d.createElement("span",{className:"k-chip-content"},void 0!==e.children?e.children:e.text&&d.createElement("span",{"aria-label":e.ariaLabel||e.text,className:"k-chip-label"},e.text)),f&&d.createElement("span",{className:"k-chip-actions"},d.createElement("span",{className:s.classNames("k-chip-action","k-chip-remove-action"),onClick:E},d.createElement(s.IconWrap,{name:m?s.toIconName(m):void 0,icon:h||r.xCircleIcon,size:"small"}))))}),J={id:n.string,text:n.string,value:n.any,dir:n.oneOf(["ltr","rtl"]),removable:n.bool,removeIcon:n.string,removeIconSvg:s.svgIconPropType,disabled:n.bool,icon:n.string,svgIcon:s.svgIconPropType,selectedIcon:n.string,selectedIconSvg:s.svgIconPropType,onRemove:n.func,dataItem:n.any,selected:n.bool,ariaDescribedBy:n.string,size:n.oneOf(["small","medium","large"]),rounded:n.oneOf(["small","medium","large","full","none"]),fillMode:n.oneOf(["outline","solid"]),themeColor:n.oneOf(["base","info","success","warning","error"])},Q={disabled:!1,removable:!1,removeIcon:"k-i-x-circle",removeSvgIcon:r.xCircleIcon,dir:"ltr",size:void 0,rounded:void 0,fillMode:void 0,themeColor:void 0};_.displayName="KendoReactChip",_.propTypes=J;const X=(e,t,n)=>{"multiple"===t.selection?Array.isArray(e)||(e=e?[e]:null):"single"===t.selection&&Array.isArray(e)&&(e=e?e.join(""):null);const[s,o]=d.useState(e);return[s,e=>{const r=((e,t)=>{switch(t.selection){case"single":switch(t.type){case"toggle":if(!Array.isArray(e)||null===e)return t.payload===e?null:t.payload;throw new Error("State cannot be an array in single selection");case"remove":return t.payload===e?null:e;default:return e}case"multiple":switch(t.type){case"toggle":if(Array.isArray(e))return e.some(e=>e===t.payload)?e.filter(e=>e!==t.payload):[...e,t.payload];if(null===e)return[t.payload];throw new Error("State cannot be non-array in multiple selection");case"remove":return Array.isArray(e)?e.some(e=>e===t.payload)?e.filter(e=>e!==t.payload):[...e,t.payload]:e;default:return e}case"none":return null;default:return e}})(t.state||s,{...e,...t});n&&n(r,e.event),"none"!==t.selection&&o(r)}]},Y=d.forwardRef((e,t)=>{const n=d.useRef(null),o=d.useRef(null),{id:r,style:a,tabIndex:l,className:i,ariaDescribedBy:c,ariaLabelledBy:u,ariaLabel:p,value:m,defaultData:h=te.defaultData,chip:f=te.chip,disabled:v=te.disabled,size:g=te.size,defaultValue:b=te.defaultValue,selection:y=te.selection,valueField:k=te.valueField,textField:C=te.textField,dir:I=te.dir,onChange:x,onDataChange:w}=e,E=s.useDir(o,I),N=d.useMemo(()=>f||_,[f,_]);d.useImperativeHandle(n,()=>({element:o.current,props:e})),d.useImperativeHandle(t,()=>n.current);const D=d.useCallback((e,t)=>{x&&n.current&&x.call(void 0,{value:e,target:n.current,syntheticEvent:t})},[x]),[S,B]=X(m||b,{selection:y,state:m},D),K=d.useCallback((e,t)=>{w&&n.current&&w.call(void 0,{value:e,target:n.current,syntheticEvent:t})},[w]),[R,O]=((e,t,n)=>{const[s,o]=d.useState(e);return[s,e=>{const r=((e,t)=>{switch(t.type){case"add":case"reorder":break;case"remove":return e.filter(e=>e[t.valueField]!==t.payload);default:return e}})(t.state||s,{...e,...t});n&&n(r,e.event),o(r)}]})(e.data||h,{state:e.data,valueField:k},K),M=d.useCallback((e,t)=>(e.push(t[k]),e),[k]),z=d.useMemo(()=>e.data||R,[e.data,R]),F=d.useMemo(()=>m||S,[m,S]),P=d.useMemo(()=>z.reduce(M,[]),[z,M]),T=d.useCallback(e=>s.getter(k)(e),[k]),A=d.useCallback(e=>s.getter(C)(e),[C]),[L,$]=(e=>{const[t,n]=d.useState(null);return[t,t=>{const s=((e,t)=>{const n=t.items.findIndex(t=>t===e);switch(t.type){case"next":return n===t.items.length-1?e:t.items[n+1];case"prev":return 0===n?e:t.items[n-1];case"current":return t.payload;case"reset":return null;default:return e}})(t.payload,{...t,...e});n(s)}]})({items:P}),W=s.useMouse(e,n);return d.createElement(U.Provider,{value:[F,B]},d.createElement(V.Provider,{value:[L,$]},d.createElement(j.Provider,{value:[z,O]},d.createElement("div",{ref:o,...W,role:v?void 0:"listbox",id:r,dir:E,style:a,tabIndex:s.getTabIndex(l,v,void 0),className:s.classNames("k-chip-list",{"k-rtl":"rtl"===E,"k-disabled":v,[`k-chip-list-${s.kendoThemeMaps.sizeMap[g]||g}`]:g},i),"aria-label":p,"aria-labelledby":u,"aria-describedby":c,"aria-orientation":"horizontal","aria-multiselectable":"multiple"===y},z.map((e,t)=>d.createElement(N,{role:"option",dataItem:e,size:g,key:[T(e),t].join("-"),text:A(e),value:T(e),ariaLabel:e.ariaLabel,svgIcon:e.svgIcon||void 0}))))))}),ee={id:n.string,className:n.string,tabIndex:n.number,data:n.any,defaultData:n.arrayOf(n.any),onDataChange:n.func,value:n.oneOfType([n.any,n.arrayOf(n.any)]),defaultValue:n.oneOfType([n.any,n.arrayOf(n.any)]),onChange:n.func,selection:n.oneOf(["single","none","multiple"]),textField:n.string,valueField:n.string,disabled:n.bool,dir:n.oneOf(["ltr","rtl"]),ariaLabelledBy:n.string,ariaDescribedBy:n.string,size:n.oneOf(["small","medium","large"])},te={chip:_,size:void 0,disabled:!1,defaultValue:null,defaultData:[],dir:"ltr",selection:"none",textField:"text",valueField:"value"};Y.displayName="KendoReactChipList",Y.propTypes=ee;const ne=d.forwardRef((e,t)=>{const{className:n,disabled:o,text:r,icon:a,style:l,id:i,focused:c,tabIndex:u,index:p,dataItem:m,item:h,svgIcon:f,onDown:v,onClick:g,...b}=e,y=d.useRef(null),k=d.useCallback(()=>{y.current&&y.current.focus()},[]),C=d.useCallback(()=>({element:y.current,focus:k}),[k]);d.useImperativeHandle(t,C);const I=d.useCallback(e=>{g&&void 0!==p&&!o&&g(e,p)},[g,p]),x=d.useMemo(()=>s.classNames("k-fab-item",{"k-focus":c,"k-disabled":o},n),[n,o,c]),w=h;return d.createElement("li",{ref:y,id:i,className:x,style:l,role:"menuitem",tabIndex:s.getTabIndex(u,o),"aria-disabled":o,"aria-label":`${r||""} floatingactionbutton item`,onClick:I,onMouseDown:v,onPointerDown:v,...b},w?d.createElement(w,{itemIndex:p,item:m}):d.createElement(d.Fragment,null,r&&d.createElement("span",{className:"k-fab-item-text"},r),a||f?d.createElement(s.IconWrap,{className:"k-fab-item-icon",name:a,icon:f}):null))});ne.propTypes={className:n.string,style:n.object,children:n.any,disabled:n.bool,focused:n.bool,index:n.number,icon:n.string,svgIcon:s.svgIconPropType,text:n.string,tabIndex:n.number,customProp:n.any},ne.displayName="KendoFloatingActionButtonItem";const se="16px",oe=e=>"number"==typeof e?e+"px":e,re=(e,t)=>{const n={horizontal:t?"right":"left",vertical:"bottom"};return"end"===e.horizontal&&(n.horizontal=t?"left":"right"),n},ae=(e,t)=>{const n={horizontal:t?"right":"left",vertical:"top"};return"end"===e.horizontal&&(n.horizontal=t?"left":"right"),n},le=(e,t)=>({rtl:{end:"k-text-left",start:"k-text-right"},ltr:{start:"k-text-left",end:"k-text-right"}}[e]["end"===t?"end":"start"]),ie=(e,t,n,s)=>{const o=t.horizontal,r=t.vertical;if(e.current){const a=n&&void 0!==n.x?oe(n.x):se,l=n&&void 0!==n.x?`calc(50% + ${oe(n.x)})`:"50%",i=n&&void 0!==n.y?oe(n.y):se,c=n&&void 0!==n.y?`calc(50% + ${oe(n.y)})`:"50%";e.current.style.setProperty(ce(t,s),"center"===o?l:a),e.current.style.setProperty(de(t),"middle"===r?c:i),s&&(("top"===r||"bottom"===r)&&"start"===o&&e.current.style.setProperty("left","unset"),"middle"===r&&"end"===o&&e.current.style.setProperty("right","unset"),"middle"===r&&"start"===o&&e.current.style.setProperty("left","unset"))}},ce=(e,t)=>{const{horizontal:n}=e;return{end:t?"left":"right",center:"left",start:t?"right":"left"}[n||"end"]},de=e=>({top:"top",middle:"top",bottom:"bottom"}[e.vertical||"bottom"]),ue=d.forwardRef((e,t)=>{const{align:n=pe.align,alignOffset:r,className:a,disabled:l,icon:i,svgIcon:c,iconClass:u,id:p,items:m,item:h,text:f,positionMode:v=pe.positionMode,size:g=pe.size,style:b,rounded:y=pe.rounded,themeColor:k=pe.themeColor,overlayStyle:C,tabIndex:I,accessKey:x,popupSettings:w={},modal:E,onClick:N,onItemClick:D,onFocus:S,onBlur:B,onKeyDown:K,onOpen:R,onClose:O,...M}=e,z=s.useZIndexContext(),F=z?z+2:100,P=d.useRef(null),T=d.useRef(null),A=d.useRef(null),L=d.useRef(null),$=d.useCallback(()=>{T.current&&T.current.focus()},[]),W=d.useCallback(()=>({element:T.current,focus:$}),[$]);d.useImperativeHandle(P,W),d.useImperativeHandle(t,()=>P.current);const[H,U]=d.useState(!1),[V,j]=d.useState(!1),[q,G]=d.useState(-1),Z=s.useId()+"-button-id",_=s.useDir(T,e.dir),J="rtl"===_,Q=s.useId()+"-list-id";d.useEffect(()=>{ie(T,n,r,J)},[T,n,r,J]),d.useEffect(()=>{V&&T&&T.current&&T.current.focus()},[V,T]);const X=d.useCallback((e,t)=>{m&&s.dispatchEvent(t?R:O,e,W(),void 0)},[R,O,m]),Y=d.useCallback(e=>{!e.target||l||(!m&&N?s.dispatchEvent(N,e,W(),void 0):(U(!H),j(!0),G(H?-1:0),X(e,!H)))},[U,j,G,N,X,H,m,l]),ee=d.useCallback(e=>{j(!0),G(H?0:-1),S&&s.dispatchEvent(S,e,W(),void 0)},[S,j,G]),te=d.useCallback(e=>{j(!1),U(!1),G(-1),s.dispatchEvent(B,e,W(),void 0),H&&X(e,!1)},[B,j,U,G,X]),se=d.useCallback(e=>{e.preventDefault()},[]),oe=d.useCallback((e,t)=>{m&&(m[t].disabled||s.dispatchEvent(D,e,W(),{itemProps:m[t],itemIndex:t}))},[D]),ce=d.useCallback((e,t)=>{!e.target||!m||(G(t),U(!1),oe(e,t),X(e,!1))},[G,U,oe,X]),de=d.useCallback(e=>{s.getActiveElement(document)===T.current&&e.preventDefault()},[T]),ue=d.useCallback(e=>{const t=q,n=m?m.length:-1;if(e.altKey)return!H&&e.keyCode===s.Keys.down&&(e.preventDefault(),U(!0),G(0)),void(H&&e.keyCode===s.Keys.up&&(e.preventDefault(),U(!1),G(-1)));switch(e.keyCode){case s.Keys.enter:case s.Keys.space:t>=0&&oe(e,t),m||Y(e),e.preventDefault(),U(!H),G(H?-1:0);break;case s.Keys.esc:e.preventDefault(),U(!1),G(-1);break;case s.Keys.home:e.preventDefault(),G(0);break;case s.Keys.end:e.preventDefault(),G(n-1);break;case s.Keys.down:case s.Keys.right:e.preventDefault(),G(t+1>=n?0:t+1);break;case s.Keys.up:case s.Keys.left:e.preventDefault(),G(t-1<0?n-1:t-1)}s.dispatchEvent(K,e,W(),void 0)},[K,q,G,J,U]),me=d.useMemo(()=>s.classNames("k-fab",{"k-fab-sm":"small"===g,"k-fab-md":"medium"===g,"k-fab-lg":"large"===g,"k-disabled":l,"k-pos-absolute":"absolute"===v,"k-pos-fixed":"fixed"===v,"k-focus":V,[`k-rounded-${s.kendoThemeMaps.roundedMap[y]||y}`]:y,[`k-fab-${k}`]:k},`k-${n.vertical}-${n.horizontal}`,a),[k,g,y,l,v,n,V,a]),he=m&&m.map((e,t)=>d.createElement(ne,{...e,key:t,index:t,id:`${Q}-${t}`,disabled:l||e.disabled,focused:q===t,dataItem:e,item:h,className:s.classNames(e.className,le(_||"ltr",n.horizontal)),onClick:ce,onDown:de})),fe=!(!i&&!c||f),ve=(T.current?T.current.offsetWidth:0)/2-16;let ge;return ge=i||c?d.createElement(s.IconWrap,{className:"k-fab-icon",name:i,icon:c}):u?d.createElement("span",{role:"presentation",className:u}):null,d.createElement(s.ZIndexContext.Provider,{value:F},d.createElement(d.Fragment,null,d.createElement("button",{ref:T,id:p||Z,role:"button",type:"button","aria-disabled":l,"aria-expanded":m?H:void 0,"aria-haspopup":!!m,"aria-label":`${f||""} floatingactionbutton`,"aria-owns":m?Q:void 0,"aria-activedescendant":q>=0&&m?`${Q}-${q}`:void 0,tabIndex:s.getTabIndex(I,l),accessKey:x,dir:_,disabled:l,className:me,style:b,onClick:Y,onMouseDown:se,onFocus:ee,onBlur:te,onKeyDown:ue,...M},ge,f&&d.createElement("span",{className:"k-fab-text"},f)),E&&H&&d.createElement("div",{className:"k-overlay",style:{zIndex:F,...C}}),d.createElement(o.Popup,{ref:L,anchor:T.current,show:H,animate:w.animate,popupClass:s.classNames("k-popup-transparent k-fab-popup",w.popupClass),anchorAlign:w.anchorAlign||re(n,J),popupAlign:w.popupAlign||ae(n,J),style:{boxShadow:"none"}},d.createElement("ul",{ref:A,role:"menu","aria-labelledby":p,id:Q,className:s.classNames("k-fab-items",{"k-fab-items-bottom":"bottom"!==n.vertical,"k-fab-items-top":"bottom"===n.vertical}),style:{paddingLeft:fe?ve:void 0,paddingRight:fe?ve:void 0}},he))))});ue.propTypes={className:n.string,style:n.object,id:n.string,dir:n.string,tabIndex:n.number,accessKey:n.string,disabled:n.bool,icon:n.string,svgIcon:s.svgIconPropType,iconClass:n.string,text:n.string,alignOffset:n.shape({x:n.oneOfType([n.number,n.string]).isRequired,y:n.oneOfType([n.number,n.string]).isRequired}),align:n.shape({vertical:n.oneOf(["top","middle","bottom"]).isRequired,horizontal:n.oneOf(["start","center","end"]).isRequired}),positionMode:n.oneOf(["absolute","fixed"]),size:n.oneOf(["small","medium","large"]),rounded:n.oneOf(["small","medium","large","full","none"]),themeColor:n.oneOf(["primary","secondary","tertiary","info","success","warning","error","dark","light","inverse"]),modal:n.bool,overlayStyle:n.object};const pe={align:{vertical:"bottom",horizontal:"end"},size:void 0,rounded:void 0,themeColor:void 0,positionMode:"fixed"};ue.displayName="KendoFloatingActionButton";const me="speechToTextButton.ariaLabel",he="speechToTextButton.title",fe={[me]:"Start speech recognition",[he]:"Speech to Text Button"},ve=d.forwardRef((e,t)=>{const n=!s.validatePackage(k,{component:"SpeechToTextButton"}),o=s.getLicenseMessage(k),i=a.useLocalization(),{fillMode:c,rounded:p,size:m,themeColor:h,ariaLabel:f,svgIcon:v,disabled:g,iconSize:b,title:y,className:C,id:I,style:x,lang:w="en-US",continuous:E=!1,interimResults:N=!1,maxAlternatives:D=1,integrationMode:S="webSpeech",onStart:B,onResult:K,onEnd:R,onError:O,...M}=e,z=d.useRef(null),F=d.useRef(!1),[P,T]=d.useState(!1),A=d.useCallback(async()=>{F.current=!0,T(!0),B&&await B()},[B]),L=d.useCallback(async()=>{F.current=!1,T(!1),R&&await R()},[R]),$=d.useCallback(e=>{const t=e.results,n=t[t.length-1],s=Array.from(n).map(e=>({transcript:e.transcript,confidence:e.confidence}));null==K||K({isFinal:n.isFinal,alternatives:s})},[K]),W=d.useCallback(e=>{T(!1),F.current=!1,null==O||O({errorMessage:e.error})},[O]),H=d.useCallback(()=>{var e;F.current||null==(e=z.current)||e.start()},[]),U=d.useCallback(()=>{var e;F.current&&(null==(e=z.current)||e.stop())},[]),V=d.useCallback(()=>{var e;F.current&&(null==(e=z.current)||e.abort(),F.current=!1,T(!1))},[]),j=()=>F.current;d.useImperativeHandle(t,()=>({start:H,stop:U,abort:V,isActive:j})),d.useEffect(()=>((()=>{var e;"undefined"==typeof window||"webkitSpeechRecognition"in window||"SpeechRecognition"in window?(null!=(e=z.current)&&e.isActive()&&z.current.stop(),z.current=new l.KendoSpeechRecognition({lang:w,continuous:E,interimResults:N,maxAlternatives:D,events:{start:A,end:L,result:$,error:W}})):O&&O({errorMessage:"Speech Recognition API is not supported in this browser."})})(),()=>{F.current&&U()}),[w,E,N,D,S]);const q=void 0!==e.icon||void 0!==e.iconClass,G=d.useMemo(()=>P?r.stopSmIcon:v||r.microphoneOutlineIcon,[P,v]);return d.createElement(d.Fragment,null,d.createElement(u,{id:I,className:s.classNames({"k-speech-to-text-button":!0,"k-listening":P},C),style:x,svgIcon:q?void 0:G,iconSize:b,fillMode:c,rounded:p,size:m,themeColor:h,"aria-label":null!=f?f:i.toLanguageString(me,fe[me]),"aria-pressed":P,disabled:g,title:null!=y?y:i.toLanguageString(he,fe[he]),onClick:()=>{P?U():H()},...M},e.children),n&&d.createElement(s.WatermarkOverlay,{message:o}))});ve.displayName="KendoSpeechToTextButton";const ge=d.forwardRef((e,t)=>{const{items:n=[],size:o,layoutMode:r="compact",value:a,onChange:l,itemTemplate:i,defaultValue:c,className:u,...p}=e,m=o?s.kendoThemeMaps.sizeMap[o]:void 0,h=d.useRef(null),f=d.useRef(null),[v,g]=d.useState({selectedValue:c,focusedValue:void 0}),b=null!=a?a:v.selectedValue,y=v.focusedValue,k=d.useCallback(()=>{const e=h.current,t=f.current;if(!e||!t)return;const n=e.querySelector(".k-segmented-control-button.k-selected");if(!n)return;const s=e.offsetWidth,{offsetWidth:o,offsetLeft:r}=n,a=`${r}px`,l=s-r-o+"px";t.style.left!==a&&(t.style.left=a),t.style.right!==l&&(t.style.right=l)},[]),C=e=>{g(t=>({...t,...e}))},I=d.useCallback(e=>t=>{var n,s;b!==e.value?(void 0===a&&e&&C({selectedValue:e.value}),null==l||l(e.value),null==(s=e.onClick)||s.call(e,t),k()):null==(n=e.onClick)||n.call(e,t)},[a,l,k,b]),x=d.useCallback((e,t)=>n=>{C({hoveredValue:e}),null==t||t(n)},[]),w=d.useCallback(e=>t=>{C({hoveredValue:void 0}),null==e||e(t)},[]),E=d.useCallback((e,t)=>n=>{C({focusedValue:e}),null==t||t(n)},[]),N=d.useCallback(e=>t=>{C({focusedValue:void 0}),null==e||e(t)},[]);return d.useLayoutEffect(()=>{k()},[b,k]),d.useEffect(()=>{const e=h.current;if(!e)return;const t=new ResizeObserver(()=>{k()});return t.observe(e),()=>{t.disconnect()}},[k]),d.useImperativeHandle(t,()=>({element:h.current}),[]),d.createElement("div",{ref:h,className:s.classNames("k-segmented-control",m&&`k-segmented-control-${m}`,{"k-segmented-control-stretched":"stretch"===r},u),...p},d.createElement("div",{className:"k-segmented-control-thumb",ref:f,"aria-hidden":"true"}),n.map(e=>{const{value:t,disabled:n,text:o,svgIcon:r,iconClassName:a,type:l="button",onClick:c,onMouseEnter:u,onMouseLeave:p,onFocus:m,onBlur:h,...f}=e,g=b===t;return d.createElement("button",{key:t,type:l,className:s.classNames("k-segmented-control-button",{"k-selected":g,"k-hover":v.hoveredValue===t&&!n,"k-focus":y===t&&!n,"k-disabled":n}),disabled:n,onClick:I(e),onMouseEnter:x(t,u),onMouseLeave:w(p),onFocus:E(t,m),onBlur:N(h),...f},i?i(e):d.createElement(d.Fragment,null,r&&d.createElement(s.IconWrap,{className:s.classNames("k-segmented-control-button-icon",{...a&&{[a]:g}}),icon:r}),d.createElement("span",{className:"k-segmented-control-button-text"},o)))}))});ge.displayName="KendoReactSegmentedControl";const be=[".k-input",".k-picker",".k-checkbox",".k-radio",".k-switch",".k-rating",".k-slider"],ye=d.forwardRef((e,t)=>{const{disabled:n,fillMode:o="solid",rounded:a="medium",size:l="medium",svgIcon:c=r.pasteSparkleIcon,formFields:p,onClick:m,children:h,...f}=e,v=d.useRef(null);d.useImperativeHandle(t,()=>{var e,t,n,s;return{element:null!=(t=null==(e=v.current)?void 0:e.element)?t:null,selected:null!=(s=null==(n=v.current)?void 0:n.selected)&&s,click:()=>{var e,t;return null==(t=null==(e=v.current)?void 0:e.element)?void 0:t.click()}}});const g=d.useRef(null),b=d.useCallback(()=>{var e;return(null==(e=v.current)?void 0:e.element)?(null!=g.current||(g.current=new i.KendoSmartPaste({getElement:()=>{var e,t;return null!=(t=null==(e=v.current)?void 0:e.element)?t:null},customInputs:be.map(e=>({identifier:e})),getSmartPasteField:e=>{const t=(e=>{const t=e.querySelector("input, select, textarea");return(null==t?void 0:t.getAttribute("name"))||(null==t?void 0:t.getAttribute("id"))||e.getAttribute("id")||null})(e.element);return t?{...e,field:t}:e}})),g.current):null},[]);return d.createElement(u,{ref:v,disabled:n,fillMode:o,rounded:a,size:l,svgIcon:c,onClick:async e=>{if(n)return;const t=await(async()=>{try{return await navigator.clipboard.readText()}catch{return""}})(),o=(()=>{const e=b();if(!e)return p;const t=e.extractFormConfig().reduce((e,t)=>e.some(e=>e.field===t.field)?e:[...e,t],[]);return p?p.map(e=>{const n=t.find(t=>t.field===e.field);return n?{...n,...e,element:n.element}:e}):t})(),r=null==o?void 0:o.map(e=>{var t;const{element:n,...s}=e;return{...s,field:s.field||"",allowedValues:null!=(t=s.allowedValues)?t:[]}}),a=Object.assign(e,{requestData:{content:t,formFields:r},setResponse:e=>{null!=e&&e.fieldValues&&((e,t)=>{var n;if(!e||!t)return;const o=Object.entries(e).reduce((e,[t,n])=>(null!=n&&(e[t]=n),e),{}),r=null==(n=v.current)?void 0:n.element;if(r){const e=s.getKendoPasteEventTarget(r);s.dispatchKendoPasteEvent(e,o)}const a=b();a&&a.populateFormFields({fieldValues:o},t)})(e.fieldValues,o)}});null==m||m(a)},type:"button",...f},h)});ye.displayName="KendoReactSmartPasteButton";const ke=s.withIdHOC(S);ke.displayName="KendoReactDropDownButton";const Ce=s.withIdHOC(I);Ce.displayName="KendoReactSplitButton",e.Button=u,e.ButtonGroup=m,e.Chip=_,e.ChipList=Y,e.DropDownButton=ke,e.DropDownButtonClassComponent=S,e.DropDownButtonItem=w,e.FloatingActionButton=ue,e.FloatingActionButtonItem=ne,e.SegmentedControl=ge,e.SmartPasteButton=ye,e.SpeechToTextButton=ve,e.SplitButton=Ce,e.SplitButtonClassComponent=I,e.SplitButtonItem=v,e.Toolbar=L,e.ToolbarItem=W,e.ToolbarSeparator=R,e.ToolbarSpacer=H,e.toolbarButtons=K});
|
package/index.d.mts
CHANGED
|
@@ -44,6 +44,7 @@ import { SpeechToTextButtonHandle } from './SpeechToTextButton/interfaces/Speech
|
|
|
44
44
|
import { SpeechToTextButtonProps, SpeechToTextResultEvent, SpeechToTextErrorEvent } from './SpeechToTextButton/interfaces/SpeechToTextButtonProps.js';
|
|
45
45
|
export * from './FloatingActionButton/models/events.js';
|
|
46
46
|
export * from './SmartPasteButton/index.js';
|
|
47
|
+
export * from './SegmentedControl/index.js';
|
|
47
48
|
/** @hidden */
|
|
48
49
|
declare const DropDownButton: import('react').ForwardRefExoticComponent<DropDownButtonProps & import('react').RefAttributes<any>>;
|
|
49
50
|
/** @hidden */
|
package/index.d.ts
CHANGED
|
@@ -44,6 +44,7 @@ import { SpeechToTextButtonHandle } from './SpeechToTextButton/interfaces/Speech
|
|
|
44
44
|
import { SpeechToTextButtonProps, SpeechToTextResultEvent, SpeechToTextErrorEvent } from './SpeechToTextButton/interfaces/SpeechToTextButtonProps.js';
|
|
45
45
|
export * from './FloatingActionButton/models/events.js';
|
|
46
46
|
export * from './SmartPasteButton/index.js';
|
|
47
|
+
export * from './SegmentedControl/index.js';
|
|
47
48
|
/** @hidden */
|
|
48
49
|
declare const DropDownButton: import('react').ForwardRefExoticComponent<DropDownButtonProps & import('react').RefAttributes<any>>;
|
|
49
50
|
/** @hidden */
|
package/index.js
CHANGED
|
@@ -6,4 +6,4 @@
|
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
8
|
"use client";
|
|
9
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./Button.js"),i=require("./ButtonGroup.js"),t=require("./ListButton/SplitButton.js"),a=require("./ListButton/SplitButtonItem.js"),o=require("./ListButton/DropDownButton.js"),p=require("./ListButton/DropDownButtonItem.js"),
|
|
9
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./Button.js"),i=require("./ButtonGroup.js"),t=require("./ListButton/SplitButton.js"),a=require("./ListButton/SplitButtonItem.js"),o=require("./ListButton/DropDownButton.js"),p=require("./ListButton/DropDownButtonItem.js"),l=require("./toolbar/Toolbar.js"),B=require("./toolbar/tools/ToolbarItem.js"),c=require("./toolbar/tools/ToolbarSeparator.js"),s=require("./toolbar/tools/ToolbarSpacer.js"),S=require("./util.js"),m=require("./Chip/Chip.js"),D=require("./Chip/ChipList.js"),q=require("./FloatingActionButton/FloatingActionButton.js"),T=require("./FloatingActionButton/FloatingActionButtonItem.js"),b=require("./SpeechToTextButton/SpeechToTextButton.js"),n=require("@progress/kendo-react-common"),C=require("./SegmentedControl/SegmentedControl.js"),I=require("./SmartPasteButton/SmartPasteButton.js"),e=n.withIdHOC(o.DropDownButton);e.displayName="KendoReactDropDownButton";const r=n.withIdHOC(t.SplitButton);r.displayName="KendoReactSplitButton";exports.Button=u.Button;exports.ButtonGroup=i.ButtonGroup;exports.SplitButtonClassComponent=t.SplitButton;exports.SplitButtonItem=a.SplitButtonItem;exports.DropDownButtonClassComponent=o.DropDownButton;exports.DropDownButtonItem=p.DropDownButtonItem;exports.Toolbar=l.Toolbar;exports.ToolbarItem=B.ToolbarItem;exports.ToolbarSeparator=c.ToolbarSeparator;exports.ToolbarSpacer=s.ToolbarSpacer;exports.toolbarButtons=S.toolbarButtons;exports.Chip=m.Chip;exports.ChipList=D.ChipList;exports.FloatingActionButton=q.FloatingActionButton;exports.FloatingActionButtonItem=T.FloatingActionButtonItem;exports.SpeechToTextButton=b.SpeechToTextButton;exports.SegmentedControl=C.SegmentedControl;exports.SmartPasteButton=I.SmartPasteButton;exports.DropDownButton=e;exports.SplitButton=r;
|
package/index.mjs
CHANGED
|
@@ -6,15 +6,15 @@
|
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
8
|
"use client";
|
|
9
|
-
import { Button as
|
|
9
|
+
import { Button as i } from "./Button.mjs";
|
|
10
10
|
import { ButtonGroup as l } from "./ButtonGroup.mjs";
|
|
11
11
|
import { SplitButton as t } from "./ListButton/SplitButton.mjs";
|
|
12
12
|
import { SplitButtonItem as s } from "./ListButton/SplitButtonItem.mjs";
|
|
13
13
|
import { DropDownButton as r } from "./ListButton/DropDownButton.mjs";
|
|
14
14
|
import { DropDownButtonItem as S } from "./ListButton/DropDownButtonItem.mjs";
|
|
15
|
-
import { Toolbar as
|
|
16
|
-
import { ToolbarItem as
|
|
17
|
-
import { ToolbarSeparator as
|
|
15
|
+
import { Toolbar as C } from "./toolbar/Toolbar.mjs";
|
|
16
|
+
import { ToolbarItem as d } from "./toolbar/tools/ToolbarItem.mjs";
|
|
17
|
+
import { ToolbarSeparator as b } from "./toolbar/tools/ToolbarSeparator.mjs";
|
|
18
18
|
import { ToolbarSpacer as h } from "./toolbar/tools/ToolbarSpacer.mjs";
|
|
19
19
|
import { toolbarButtons as y } from "./util.mjs";
|
|
20
20
|
import { Chip as F } from "./Chip/Chip.mjs";
|
|
@@ -23,7 +23,8 @@ import { FloatingActionButton as $ } from "./FloatingActionButton/FloatingAction
|
|
|
23
23
|
import { FloatingActionButtonItem as H } from "./FloatingActionButton/FloatingActionButtonItem.mjs";
|
|
24
24
|
import { SpeechToTextButton as O } from "./SpeechToTextButton/SpeechToTextButton.mjs";
|
|
25
25
|
import { withIdHOC as o } from "@progress/kendo-react-common";
|
|
26
|
-
import {
|
|
26
|
+
import { SegmentedControl as j } from "./SegmentedControl/SegmentedControl.mjs";
|
|
27
|
+
import { SmartPasteButton as q } from "./SmartPasteButton/SmartPasteButton.mjs";
|
|
27
28
|
const p = o(
|
|
28
29
|
r
|
|
29
30
|
);
|
|
@@ -33,7 +34,7 @@ const n = o(
|
|
|
33
34
|
);
|
|
34
35
|
n.displayName = "KendoReactSplitButton";
|
|
35
36
|
export {
|
|
36
|
-
|
|
37
|
+
i as Button,
|
|
37
38
|
l as ButtonGroup,
|
|
38
39
|
F as Chip,
|
|
39
40
|
N as ChipList,
|
|
@@ -42,14 +43,15 @@ export {
|
|
|
42
43
|
S as DropDownButtonItem,
|
|
43
44
|
$ as FloatingActionButton,
|
|
44
45
|
H as FloatingActionButtonItem,
|
|
45
|
-
j as
|
|
46
|
+
j as SegmentedControl,
|
|
47
|
+
q as SmartPasteButton,
|
|
46
48
|
O as SpeechToTextButton,
|
|
47
49
|
n as SplitButton,
|
|
48
50
|
t as SplitButtonClassComponent,
|
|
49
51
|
s as SplitButtonItem,
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
52
|
+
C as Toolbar,
|
|
53
|
+
d as ToolbarItem,
|
|
54
|
+
b as ToolbarSeparator,
|
|
53
55
|
h as ToolbarSpacer,
|
|
54
56
|
y as toolbarButtons
|
|
55
57
|
};
|
package/package-metadata.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 e=Object.freeze({name:"@progress/kendo-react-buttons",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate:
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=Object.freeze({name:"@progress/kendo-react-buttons",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate: 1773414088,version:"14.3.0-develop.2",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"});exports.packageMetadata=e;
|
package/package-metadata.mjs
CHANGED
|
@@ -8,6 +8,6 @@ export const packageMetadata = Object.freeze({
|
|
|
8
8
|
productCode: 'KENDOUIREACT',
|
|
9
9
|
productCodes: ['KENDOUIREACT'],
|
|
10
10
|
publishDate: 0,
|
|
11
|
-
version: '14.
|
|
11
|
+
version: '14.3.0-develop.2',
|
|
12
12
|
licensingDocsUrl: 'https://www.telerik.com/kendo-react-ui/components/my-license/'
|
|
13
13
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-react-buttons",
|
|
3
|
-
"version": "14.
|
|
3
|
+
"version": "14.3.0-develop.2",
|
|
4
4
|
"description": "All you need in React Button in one package: disabled/enabled states, built-in styles and more. KendoReact Buttons package",
|
|
5
5
|
"author": "Progress",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
@@ -28,9 +28,9 @@
|
|
|
28
28
|
"@progress/kendo-smartpaste-common": "1.0.0",
|
|
29
29
|
"@progress/kendo-licensing": "^1.7.2",
|
|
30
30
|
"@progress/kendo-webspeech-common": "^1.0.1",
|
|
31
|
-
"@progress/kendo-react-common": "14.
|
|
32
|
-
"@progress/kendo-react-intl": "14.
|
|
33
|
-
"@progress/kendo-react-popup": "14.
|
|
31
|
+
"@progress/kendo-react-common": "14.3.0-develop.2",
|
|
32
|
+
"@progress/kendo-react-intl": "14.3.0-develop.2",
|
|
33
|
+
"@progress/kendo-react-popup": "14.3.0-develop.2",
|
|
34
34
|
"@progress/kendo-svg-icons": "^4.8.0",
|
|
35
35
|
"react": "^18.0.0 || ^19.0.0",
|
|
36
36
|
"react-dom": "^18.0.0 || ^19.0.0"
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
"package": {
|
|
66
66
|
"productName": "KendoReact",
|
|
67
67
|
"productCode": "KENDOUIREACT",
|
|
68
|
-
"publishDate":
|
|
68
|
+
"publishDate": 1773414088,
|
|
69
69
|
"licensingDocsUrl": "https://www.telerik.com/kendo-react-ui/components/my-license/"
|
|
70
70
|
}
|
|
71
71
|
},
|