@progress/kendo-react-buttons 14.5.0-develop.12 → 14.5.0-develop.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/Button.d.ts CHANGED
@@ -5,7 +5,7 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- import { ButtonsClassStructure } from '@progress/kendo-react-common';
8
+ import { ButtonsClassStructure, WebMcpProps } from '@progress/kendo-react-common';
9
9
  import { ButtonInterface } from './ButtonInterface';
10
10
  import * as React from 'react';
11
11
  /**
@@ -106,6 +106,10 @@ export interface ButtonProps extends ButtonInterface, React.ButtonHTMLAttributes
106
106
  * ```
107
107
  */
108
108
  iconSize?: 'small' | 'medium' | 'large';
109
+ /**
110
+ * Enables Web MCP tool registration for this Button.
111
+ */
112
+ webMcp?: boolean | WebMcpProps;
109
113
  }
110
114
  /**
111
115
  * @hidden
package/Button.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 W=require("react"),r=require("prop-types"),e=require("@progress/kendo-react-common");function F(o){const l=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(o){for(const s in o)if(s!=="default"){const n=Object.getOwnPropertyDescriptor(o,s);Object.defineProperty(l,s,n.get?n:{enumerable:!0,get:()=>o[s]})}}return l.default=o,Object.freeze(l)}const t=F(W);function G({imageUrl:o,name:l,iconClass:s,svgIcon:n,imageAlt:u,buttonClasses:a,iconSize:c}){return o?t.createElement("img",{role:"presentation",className:e.classNames(e.uButton.icon({c:a})),alt:u,src:o}):l||n?t.createElement(e.IconWrap,{className:e.classNames(e.uButton.icon({c:a})),name:l,icon:n,size:c}):s?t.createElement("span",{role:"presentation",className:e.classNames(e.uButton.icon({c:a}),s)}):null}const g=t.forwardRef((o,l)=>{const{children:s,togglable:n,dir:u,disabled:a,selected:c,icon:v,iconClass:b,svgIcon:y,imageUrl:N,imageAlt:P,className:S,startIcon:h,endIcon:B,onClick:C,size:z=p.size,rounded:k=p.rounded,fillMode:T=p.fillMode,themeColor:j=p.themeColor,ariaPressed:E,iconSize:A,...w}=o,x=()=>{n&&c===void 0&&(d.current=!i,R(!i))},q=f=>{x(),C&&C.call(void 0,f)},d=t.useRef(void 0),O=t.useRef(null),[i,R]=t.useState(n===!0&&c===!0),U=y!==void 0||v!==void 0||b!==void 0||N!==void 0,_=s!==void 0,D=e.useUnstyled(),I=o.unstyled||D,m=I&&I.uButton;t.useImperativeHandle(l,()=>({element:O.current,selected:d.current!==void 0?d.current:i})),t.useMemo(()=>{n&&c!==void 0&&c!==i&&R(c)},[n,c]),t.useEffect(()=>{d.current=void 0},[i]);const H=G({name:v,svgIcon:y,iconClass:b,imageUrl:N,imageAlt:P,buttonClasses:m,iconSize:A}),M=f=>t.cloneElement(f,{className:e.classNames(e.uButton.icon({c:m}),f.props.className)}),K=t.useMemo(()=>n?i:E||void 0,[n,i,E]);return t.createElement("button",{ref:O,"aria-pressed":K,...w,dir:u,disabled:a,onClick:q,className:e.classNames(e.uButton.wrapper({c:m,isRtl:u==="rtl",selected:i,disabled:a,size:z,fillMode:T,rounded:k,themeColor:j,iconButton:!_&&U}),S)},h&&M(h),H,s&&t.createElement("span",{className:e.classNames(e.uButton.text({c:m}))},s),B&&M(B))}),p={size:void 0,rounded:void 0,fillMode:void 0,themeColor:void 0};g.displayName="KendoReactButton";g.propTypes={children:r.node,selected:r.bool,togglable:r.bool,icon:r.string,svgIcon:e.svgIconPropType,iconClass:r.string,imageUrl:r.string,imageAlt:r.string,size:r.oneOf(["xsmall","xs","small","medium","large"]),rounded:r.oneOf(["small","medium","large","full","none"]),fillMode:r.oneOf(["flat","link","outline","solid","clear"]),themeColor:r.oneOf(["base","primary","secondary","tertiary","info","success","warning","error","inverse"])};exports.Button=g;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const F=require("react"),l=require("prop-types"),e=require("@progress/kendo-react-common");function G(n){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const s in n)if(s!=="default"){const o=Object.getOwnPropertyDescriptor(n,s);Object.defineProperty(r,s,o.get?o:{enumerable:!0,get:()=>n[s]})}}return r.default=n,Object.freeze(r)}const t=G(F);function J({imageUrl:n,name:r,iconClass:s,svgIcon:o,imageAlt:d,buttonClasses:u,iconSize:i}){return n?t.createElement("img",{role:"presentation",className:e.classNames(e.uButton.icon({c:u})),alt:d,src:n}):r||o?t.createElement(e.IconWrap,{className:e.classNames(e.uButton.icon({c:u})),name:r,icon:o,size:i}):s?t.createElement("span",{role:"presentation",className:e.classNames(e.uButton.icon({c:u}),s)}):null}const v=t.forwardRef((n,r)=>{const{children:s,togglable:o,dir:d,disabled:u,selected:i,icon:b,iconClass:y,svgIcon:N,imageUrl:R,imageAlt:z,className:k,startIcon:h,endIcon:B,onClick:C,size:T=g.size,rounded:j=g.rounded,fillMode:w=g.fillMode,themeColor:A=g.themeColor,ariaPressed:M,iconSize:x,...q}=n,U=()=>{o&&i===void 0&&(m.current=!c,I(!c))},_=a=>{U(),C&&C.call(void 0,a)},m=t.useRef(void 0),E=t.useRef(null),O=t.useRef(null),[c,I]=t.useState(o===!0&&i===!0),D=N!==void 0||b!==void 0||y!==void 0||R!==void 0,H=s!==void 0,W=e.useUnstyled(),P=n.unstyled||W,f=P&&P.uButton;let p=c;m.current===void 0?p=c:p=m.current,t.useImperativeHandle(r,()=>{const a={element:E.current,selected:p};return O.current=a,a}),e.useWebMcpRegister("button",O,n,n.webMcp),t.useMemo(()=>{o&&i!==void 0&&i!==c&&I(i)},[o,i]),t.useEffect(()=>{m.current=void 0},[c]);const K=J({name:b,svgIcon:N,iconClass:y,imageUrl:R,imageAlt:z,buttonClasses:f,iconSize:x}),S=a=>t.cloneElement(a,{className:e.classNames(e.uButton.icon({c:f}),a.props.className)}),V=t.useMemo(()=>o?c:M||void 0,[o,c,M]);return t.createElement("button",{ref:E,"aria-pressed":V,...q,dir:d,disabled:u,onClick:_,className:e.classNames(e.uButton.wrapper({c:f,isRtl:d==="rtl",selected:c,disabled:u,size:T,fillMode:w,rounded:j,themeColor:A,iconButton:!H&&D}),k)},h&&S(h),K,s&&t.createElement("span",{className:e.classNames(e.uButton.text({c:f}))},s),B&&S(B))}),g={size:void 0,rounded:void 0,fillMode:void 0,themeColor:void 0};v.displayName="KendoReactButton";v.propTypes={children:l.node,selected:l.bool,togglable:l.bool,icon:l.string,svgIcon:e.svgIconPropType,iconClass:l.string,imageUrl:l.string,imageAlt:l.string,size:l.oneOf(["xsmall","xs","small","medium","large"]),rounded:l.oneOf(["small","medium","large","full","none"]),fillMode:l.oneOf(["flat","link","outline","solid","clear"]),themeColor:l.oneOf(["base","primary","secondary","tertiary","info","success","warning","error","inverse"])};exports.Button=v;
package/Button.mjs CHANGED
@@ -7,101 +7,105 @@
7
7
  */
8
8
  import * as e from "react";
9
9
  import t from "prop-types";
10
- import { useUnstyled as G, classNames as c, uButton as i, IconWrap as J, svgIconPropType as L } from "@progress/kendo-react-common";
11
- function Q({ imageUrl: a, name: d, iconClass: r, svgIcon: o, imageAlt: u, buttonClasses: l, iconSize: n }) {
12
- return a ? /* @__PURE__ */ e.createElement(
10
+ import { useUnstyled as J, useWebMcpRegister as L, classNames as a, uButton as d, IconWrap as Q, svgIconPropType as X } from "@progress/kendo-react-common";
11
+ function Y({ imageUrl: l, name: u, iconClass: c, svgIcon: n, imageAlt: m, buttonClasses: i, iconSize: s }) {
12
+ return l ? /* @__PURE__ */ e.createElement(
13
13
  "img",
14
14
  {
15
15
  role: "presentation",
16
- className: c(i.icon({ c: l })),
17
- alt: u,
18
- src: a
16
+ className: a(d.icon({ c: i })),
17
+ alt: m,
18
+ src: l
19
19
  }
20
- ) : d || o ? /* @__PURE__ */ e.createElement(
21
- J,
20
+ ) : u || n ? /* @__PURE__ */ e.createElement(
21
+ Q,
22
22
  {
23
- className: c(i.icon({ c: l })),
24
- name: d,
25
- icon: o,
26
- size: n
23
+ className: a(d.icon({ c: i })),
24
+ name: u,
25
+ icon: n,
26
+ size: s
27
27
  }
28
- ) : r ? /* @__PURE__ */ e.createElement("span", { role: "presentation", className: c(i.icon({ c: l }), r) }) : null;
28
+ ) : c ? /* @__PURE__ */ e.createElement("span", { role: "presentation", className: a(d.icon({ c: i }), c) }) : null;
29
29
  }
30
- const A = e.forwardRef((a, d) => {
30
+ const P = e.forwardRef((l, u) => {
31
31
  const {
32
- children: r,
33
- togglable: o,
34
- dir: u,
35
- disabled: l,
36
- selected: n,
37
- icon: v,
32
+ children: c,
33
+ togglable: n,
34
+ dir: m,
35
+ disabled: i,
36
+ selected: s,
37
+ icon: b,
38
38
  iconClass: h,
39
39
  svgIcon: y,
40
- imageUrl: C,
41
- imageAlt: B,
42
- className: P,
43
- startIcon: E,
44
- endIcon: N,
45
- onClick: b,
46
- size: k = g.size,
47
- rounded: O = g.rounded,
48
- fillMode: S = g.fillMode,
49
- themeColor: T = g.themeColor,
50
- ariaPressed: I,
51
- iconSize: w,
52
- ...U
53
- } = a, H = () => {
54
- o && n === void 0 && (m.current = !s, z(!s));
55
- }, K = (p) => {
56
- H(), b && b.call(void 0, p);
57
- }, m = e.useRef(void 0), R = e.useRef(null), [s, z] = e.useState(o === !0 && n === !0), W = y !== void 0 || v !== void 0 || h !== void 0 || C !== void 0, j = r !== void 0, q = G(), M = a.unstyled || q, f = M && M.uButton;
58
- e.useImperativeHandle(d, () => ({
59
- element: R.current,
60
- selected: m.current !== void 0 ? m.current : s
61
- })), e.useMemo(() => {
62
- o && n !== void 0 && n !== s && z(n);
63
- }, [o, n]), e.useEffect(() => {
64
- m.current = void 0;
65
- }, [s]);
66
- const D = Q({
67
- name: v,
40
+ imageUrl: R,
41
+ imageAlt: k,
42
+ className: w,
43
+ startIcon: C,
44
+ endIcon: E,
45
+ onClick: N,
46
+ size: O = g.size,
47
+ rounded: S = g.rounded,
48
+ fillMode: T = g.fillMode,
49
+ themeColor: U = g.themeColor,
50
+ ariaPressed: M,
51
+ iconSize: H,
52
+ ...W
53
+ } = l, K = () => {
54
+ n && s === void 0 && (f.current = !o, x(!o));
55
+ }, V = (r) => {
56
+ K(), N && N.call(void 0, r);
57
+ }, f = e.useRef(void 0), I = e.useRef(null), z = e.useRef(null), [o, x] = e.useState(n === !0 && s === !0), j = y !== void 0 || b !== void 0 || h !== void 0 || R !== void 0, q = c !== void 0, D = J(), A = l.unstyled || D, p = A && A.uButton;
58
+ let v = o;
59
+ f.current === void 0 ? v = o : v = f.current, e.useImperativeHandle(u, () => {
60
+ const r = {
61
+ element: I.current,
62
+ selected: v
63
+ };
64
+ return z.current = r, r;
65
+ }), L("button", z, l, l.webMcp), e.useMemo(() => {
66
+ n && s !== void 0 && s !== o && x(s);
67
+ }, [n, s]), e.useEffect(() => {
68
+ f.current = void 0;
69
+ }, [o]);
70
+ const F = Y({
71
+ name: b,
68
72
  svgIcon: y,
69
73
  iconClass: h,
70
- imageUrl: C,
71
- imageAlt: B,
72
- buttonClasses: f,
73
- iconSize: w
74
- }), x = (p) => e.cloneElement(p, {
75
- className: c(i.icon({ c: f }), p.props.className)
76
- }), F = e.useMemo(() => o ? s : I || void 0, [o, s, I]);
74
+ imageUrl: R,
75
+ imageAlt: k,
76
+ buttonClasses: p,
77
+ iconSize: H
78
+ }), B = (r) => e.cloneElement(r, {
79
+ className: a(d.icon({ c: p }), r.props.className)
80
+ }), G = e.useMemo(() => n ? o : M || void 0, [n, o, M]);
77
81
  return /* @__PURE__ */ e.createElement(
78
82
  "button",
79
83
  {
80
- ref: R,
81
- "aria-pressed": F,
82
- ...U,
83
- dir: u,
84
- disabled: l,
85
- onClick: K,
86
- className: c(
87
- i.wrapper({
88
- c: f,
89
- isRtl: u === "rtl",
90
- selected: s,
91
- disabled: l,
92
- size: k,
93
- fillMode: S,
94
- rounded: O,
95
- themeColor: T,
96
- iconButton: !j && W
84
+ ref: I,
85
+ "aria-pressed": G,
86
+ ...W,
87
+ dir: m,
88
+ disabled: i,
89
+ onClick: V,
90
+ className: a(
91
+ d.wrapper({
92
+ c: p,
93
+ isRtl: m === "rtl",
94
+ selected: o,
95
+ disabled: i,
96
+ size: O,
97
+ fillMode: T,
98
+ rounded: S,
99
+ themeColor: U,
100
+ iconButton: !q && j
97
101
  }),
98
- P
102
+ w
99
103
  )
100
104
  },
101
- E && x(E),
102
- D,
103
- r && /* @__PURE__ */ e.createElement("span", { className: c(i.text({ c: f })) }, r),
104
- N && x(N)
105
+ C && B(C),
106
+ F,
107
+ c && /* @__PURE__ */ e.createElement("span", { className: a(d.text({ c: p })) }, c),
108
+ E && B(E)
105
109
  );
106
110
  }), g = {
107
111
  size: void 0,
@@ -109,13 +113,13 @@ const A = e.forwardRef((a, d) => {
109
113
  fillMode: void 0,
110
114
  themeColor: void 0
111
115
  };
112
- A.displayName = "KendoReactButton";
113
- A.propTypes = {
116
+ P.displayName = "KendoReactButton";
117
+ P.propTypes = {
114
118
  children: t.node,
115
119
  selected: t.bool,
116
120
  togglable: t.bool,
117
121
  icon: t.string,
118
- svgIcon: L,
122
+ svgIcon: X,
119
123
  iconClass: t.string,
120
124
  imageUrl: t.string,
121
125
  imageAlt: t.string,
@@ -135,5 +139,5 @@ A.propTypes = {
135
139
  ])
136
140
  };
137
141
  export {
138
- A as Button
142
+ P as Button
139
143
  };
@@ -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,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:E,...w}=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,M=s.useUnstyled(),O=e.unstyled||M,z=O&&O.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:E}),P=e=>d.cloneElement(e,{className:s.classNames(s.uButton.icon({c:z}),e.props.className)}),T=d.useMemo(()=>o?S:x||void 0,[o,S,x]);return d.createElement("button",{ref:D,"aria-pressed":T,...w,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(["xsmall","xs","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","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.5.0-develop.12",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:"chevron-down",svgIcon:r.chevronDownIcon,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","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 E=x;const w=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:w}=this.props;return this.buttonsData=this.props.items||d.Children.toArray(this.props.children).filter(e=>e&&e.type===E).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:w},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}};w.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","inverse"])},w.defaultProps={size:void 0,rounded:void 0,fillMode:void 0,themeColor:void 0};let N=w;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=":not(.k-popup *)",R=["button"+B+K,".k-button-group > button"+B+K,".k-colorpicker"+K,".k-dropdownlist"+K],M=e=>d.createElement("div",{ref:e._ref,className:s.classNames("k-toolbar-separator k-separator",e.className)}),O="prevArrow.title",z="nextArrow.title",F="moreButtonTitle.title",P={[O]:"Previous scroll button",[z]:"Next scroll button",[F]:"More button"},T=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,P[O]):t.toLanguageString(z,P[z])}`,"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.chevronLeftIcon:r.chevronRightIcon,className:"k-button-icon"}))},A=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(T,{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(M,{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(M,{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(M,{className:"k-toolbar-button-separator"}),m("rtl"!==a?"next":"prev",i)),h&&"end"===n&&d.createElement(d.Fragment,null,d.createElement(M,{className:"k-toolbar-button-separator"}),m("rtl"!==a?"prev":"next",l),m("rtl"!==a?"next":"prev",i)))},L=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=()=>{const e=n.current;if(!e)return null;const t=e.clientWidth,s=parseInt(window.getComputedStyle(e).gap||"0",10),o=Array.from(e.children),r=o.map(e=>Math.ceil(e.clientWidth)),a=r.reduce((e,t)=>e+t,0)+o.length*s+2*s;return{toolbarWidth:t,gap:s,childWidths:r,totalInnerWidth:a}},x=()=>{var e,t,n,s,o;const r=I();if(!r)return;const{toolbarWidth:a,gap:l,childWidths:i,totalInnerWidth:c}=r;let d=c,u=!1;const p=f.current.length>0,m=[...h.current],y=[...f.current];for(;d>a&&m.length>0;){const r=m.pop(),a=m.length;if(r&&y.unshift(r),a<i.length&&(d-=i[a]+l),!u&&!p){d+=Math.ceil(null!=(t=null==(e=b.current)?void 0:e.offsetWidth)?t:0)+Math.ceil(null!=(o=null==(s=null==(n=g.current)?void 0:n.element)?void 0:s.offsetWidth)?o:0)+2*l}u=!0}if(u)return h.current=m,f.current=y,v.current=a,void C();if(f.current.length>0&&a>v.current+l*i.length){const e=[...f.current],t=e.shift();f.current=e,t&&(h.current=[...h.current,t]),v.current=a,C()}};d.useEffect(()=>{const e=new ResizeObserver(x),t=n.current;return t&&e.observe(t),()=>{t&&e.unobserve(t)}},[]),d.useLayoutEffect(()=>{if(!n.current||0===f.current.length||0===h.current.length)return;const e=I();if(!e||e.totalInnerWidth<=e.toolbarWidth)return;const t=[...h.current],s=t.pop();v.current=e.toolbarWidth,h.current=t,s&&(f.current=[s,...f.current]),C()});return d.createElement(d.Fragment,null,h.current.length>0&&h.current,f.current.length>0&&d.createElement(d.Fragment,null,d.createElement(M,{_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(F,P[F]),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))))},W=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),E=d.useRef(null),w=d.useRef(0),N=d.useRef(0),D=d.useRef([]),S=d.useRef({element:null,props:e}),[B,K]=d.useState(!1),[M,O]=d.useState(!0),[z,F]=d.useState(!1),P=s.useDir(x,e.dir),T=d.useMemo(()=>e.buttons||R,[e.buttons]),W=d.useMemo(()=>T.map(e=>e+":focus").join(","),[T]),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,w.current=x.current.offsetHeight,!1!==l&&(D.current=Array.from(x.current.querySelectorAll(T.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(T.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||w.current!==n){N.current=t,w.current=n;const s={offsetWidth:N.current,offsetHeight:w.current};c&&c.call(void 0,{target:S.current,...s,nativeEvent:e})}q()},q=d.useCallback(()=>{const e=E.current;e&&K(e.scrollWidth>e.clientWidth||e.scrollHeight>e.clientHeight)},[]),G=d.useCallback(()=>{const e=E.current;if(e){const t=0===e.scrollLeft,n="rtl"!==P?e.scrollLeft+e.clientWidth===e.scrollWidth:e.clientWidth-e.scrollLeft===e.scrollWidth;t&&O(!0),n&&F(!0),!t&&!n&&(O(!1),F(!1))}},[P]);return d.useEffect(()=>{const e=E.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&&M,"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(A,{scrollButtons:v,scrollButtonsPosition:g,prevButton:y,nextButton:k,isOverflowing:B,scrollContentRef:E,buttonScrollSpeed:b,dir:P,isScrollStartPosition:M,isScrollEndPosition:z,children:n}),"section"===f&&d.createElement(L,{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};W.displayName="KendoReactToolbar",W.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 H=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)});H.displayName="KendoReactToolbarItem",H.propTypes={className:n.string};const U=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})});U.displayName="KendoReactToolbarSpacer",U.propTypes={className:n.string};const V=d.createContext([null,e=>{}]),j=d.createContext([null,e=>{}]),q=d.createContext([null,e=>{}]);var G=(e=>(e.next="next",e.prev="prev",e.current="current",e.reset="reset",e))(G||{});var Z=(e=>(e.remove="remove",e.add="add",e.reorder="reorder",e))(Z||{});var _=(e=>(e.toggle="toggle",e.remove="remove",e))(_||{});const J=d.forwardRef((e,t)=>{const n=d.useRef(null),o=d.useRef(null),{disabled:a=X.disabled,fillMode:l=X.fillMode,themeColor:i=X.themeColor,size:c=X.size,rounded:u=X.rounded,dir:p=X.dir,removeIcon:m=X.removeIcon,removeSvgIcon:h=X.removeSvgIcon,removable:f=X.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(V),[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 E=d.useCallback(t=>{b({type:_.toggle,payload:e.value,event:t})},[b,e.value]),w=d.useCallback(t=>{f&&(C({type:Z.remove,payload:e.value,event:t}),k({type:G.reset,payload:e.value,event:t}),b({type:_.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:G.prev,payload:e.value,event:t});break;case s.Keys.right:k({type:G.next,payload:e.value,event:t});break;case s.Keys.enter:b({type:_.toggle,payload:e.value,event:t});break;case s.Keys.delete:w(t)}e.onKeyDown&&e.onKeyDown.call(void 0,{target:n.current,syntheticEvent:t})},[e.onKeyDown,e.value,k,b,w]),D=d.useCallback(t=>{k({payload:e.value,type:G.current,event:t}),e.onFocus&&e.onFocus.call(void 0,{target:n.current,syntheticEvent:t})},[e.onFocus,e.value,k]),S=d.useCallback(t=>{k({type:G.reset,payload:e.value,event:t}),e.onBlur&&e.onBlur.call(void 0,{target:n.current,syntheticEvent:t})},[e.onBlur,e.value,k]),B=s.useMouse(e,n,{onClick:E});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:w},d.createElement(s.IconWrap,{name:m?s.toIconName(m):void 0,icon:h||r.xCircleIcon,size:"small"}))))}),Q={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"])},X={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};J.displayName="KendoReactChip",J.propTypes=Q;const Y=(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)}]},ee=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=ne.defaultData,chip:f=ne.chip,disabled:v=ne.disabled,size:g=ne.size,defaultValue:b=ne.defaultValue,selection:y=ne.selection,valueField:k=ne.valueField,textField:C=ne.textField,dir:I=ne.dir,onChange:x,onDataChange:E}=e,w=s.useDir(o,I),N=d.useMemo(()=>f||J,[f,J]);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]=Y(m||b,{selection:y,state:m},D),K=d.useCallback((e,t)=>{E&&n.current&&E.call(void 0,{value:e,target:n.current,syntheticEvent:t})},[E]),[R,M]=((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),O=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(O,[]),[z,O]),T=d.useCallback(e=>s.getter(k)(e),[k]),A=d.useCallback(e=>s.getter(C)(e),[C]),[L,W]=(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}),$=s.useMouse(e,n);return d.createElement(V.Provider,{value:[F,B]},d.createElement(j.Provider,{value:[L,W]},d.createElement(q.Provider,{value:[z,M]},d.createElement("div",{ref:o,...$,role:v?void 0:"listbox",id:r,dir:w,style:a,tabIndex:s.getTabIndex(l,v,void 0),className:s.classNames("k-chip-list",{"k-rtl":"rtl"===w,"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}))))))}),te={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"])},ne={chip:J,size:void 0,disabled:!1,defaultValue:null,defaultData:[],dir:"ltr",selection:"none",textField:"text",valueField:"value"};ee.displayName="KendoReactChipList",ee.propTypes=te;const se=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]),E=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},E?d.createElement(E,{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))});se.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},se.displayName="KendoFloatingActionButtonItem";const oe="16px",re=e=>"number"==typeof e?e+"px":e,ae=(e,t)=>{const n={horizontal:t?"right":"left",vertical:"bottom"};return"end"===e.horizontal&&(n.horizontal=t?"left":"right"),n},le=(e,t)=>{const n={horizontal:t?"right":"left",vertical:"top"};return"end"===e.horizontal&&(n.horizontal=t?"left":"right"),n},ie=(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"]),ce=(e,t,n,s)=>{const o=t.horizontal,r=t.vertical;if(e.current){const a=n&&void 0!==n.x?re(n.x):oe,l=n&&void 0!==n.x?`calc(50% + ${re(n.x)})`:"50%",i=n&&void 0!==n.y?re(n.y):oe,c=n&&void 0!==n.y?`calc(50% + ${re(n.y)})`:"50%";e.current.style.setProperty(de(t,s),"center"===o?l:a),e.current.style.setProperty(ue(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"))}},de=(e,t)=>{const{horizontal:n}=e;return{end:t?"left":"right",center:"left",start:t?"right":"left"}[n||"end"]},ue=e=>({top:"top",middle:"top",bottom:"bottom"}[e.vertical||"bottom"]),pe=d.forwardRef((e,t)=>{const{align:n=me.align,alignOffset:r,className:a,disabled:l,icon:i,svgIcon:c,iconClass:u,id:p,items:m,item:h,text:f,positionMode:v=me.positionMode,size:g=me.size,style:b,rounded:y=me.rounded,themeColor:k=me.themeColor,overlayStyle:C,tabIndex:I,accessKey:x,popupSettings:E={},modal:w,onClick:N,onItemClick:D,onFocus:S,onBlur:B,onKeyDown:K,onOpen:R,onClose:M,...O}=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),W=d.useCallback(()=>{T.current&&T.current.focus()},[]),$=d.useCallback(()=>({element:T.current,focus:W}),[W]);d.useImperativeHandle(P,$),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(()=>{ce(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:M,e,$(),void 0)},[R,M,m]),Y=d.useCallback(e=>{!e.target||l||(!m&&N?s.dispatchEvent(N,e,$(),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,$(),void 0)},[S,j,G]),te=d.useCallback(e=>{j(!1),U(!1),G(-1),s.dispatchEvent(B,e,$(),void 0),H&&X(e,!1)},[B,j,U,G,X]),ne=d.useCallback(e=>{e.preventDefault()},[]),oe=d.useCallback((e,t)=>{m&&(m[t].disabled||s.dispatchEvent(D,e,$(),{itemProps:m[t],itemIndex:t}))},[D]),re=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,$(),void 0)},[K,q,G,J,U]),pe=d.useMemo(()=>s.classNames("k-fab",{"k-fab-xs":"xsmall"===g,"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(se,{...e,key:t,index:t,id:`${Q}-${t}`,disabled:l||e.disabled,focused:q===t,dataItem:e,item:h,className:s.classNames(e.className,ie(_||"ltr",n.horizontal)),onClick:re,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:pe,style:b,onClick:Y,onMouseDown:ne,onFocus:ee,onBlur:te,onKeyDown:ue,...O},ge,f&&d.createElement("span",{className:"k-fab-text"},f)),w&&H&&d.createElement("div",{className:"k-overlay",style:{zIndex:F,...C}}),d.createElement(o.Popup,{ref:L,anchor:T.current,show:H,animate:E.animate,popupClass:s.classNames("k-popup-transparent k-fab-popup",E.popupClass),anchorAlign:E.anchorAlign||ae(n,J),popupAlign:E.popupAlign||le(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))))});pe.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(["xsmall","small","medium","large"]),rounded:n.oneOf(["small","medium","large","full","none"]),themeColor:n.oneOf(["base","primary","secondary","tertiary"]),modal:n.bool,overlayStyle:n.object};const me={align:{vertical:"bottom",horizontal:"end"},size:void 0,rounded:void 0,themeColor:void 0,positionMode:"fixed"};pe.displayName="KendoFloatingActionButton";const he="speechToTextButton.ariaLabel",fe="speechToTextButton.title",ve={[he]:"Start speech recognition",[fe]:"Speech to Text Button"},ge=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:E="en-US",continuous:w=!1,interimResults:N=!1,maxAlternatives:D=1,integrationMode:S="webSpeech",onStart:B,onResult:K,onEnd:R,onError:M,...O}=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]),W=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]),$=d.useCallback(e=>{T(!1),F.current=!1,null==M||M({errorMessage:e.error})},[M]),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:E,continuous:w,interimResults:N,maxAlternatives:D,events:{start:A,end:L,result:W,error:$}})):M&&M({errorMessage:"Speech Recognition API is not supported in this browser."})})(),()=>{F.current&&U()}),[E,w,N,D,S]);const q=void 0!==e.icon||void 0!==e.iconClass,G=d.useMemo(()=>P?r.stopIcon:v||r.microphoneIcon,[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(he,ve[he]),"aria-pressed":P,disabled:g,title:null!=y?y:i.toLanguageString(fe,ve[fe]),onClick:()=>{P?U():H()},...O},e.children),n&&d.createElement(s.WatermarkOverlay,{message:o}))});ge.displayName="KendoSpeechToTextButton";const be=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)},[]),E=d.useCallback(e=>t=>{C({hoveredValue:void 0}),null==e||e(t)},[]),w=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||"undefined"==typeof ResizeObserver)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}),"aria-pressed":g,disabled:n,onClick:I(e),onMouseEnter:x(t,u),onMouseLeave:E(p),onFocus:w(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)))}))});be.displayName="KendoReactSegmentedControl";const ye=[".k-input",".k-picker",".k-checkbox",".k-radio",".k-switch",".k-rating",".k-slider"],ke=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:ye.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)});ke.displayName="KendoReactSmartPasteButton";const Ce=s.withIdHOC(S);Ce.displayName="KendoReactDropDownButton";const Ie=s.withIdHOC(I);Ie.displayName="KendoReactSplitButton",e.Button=u,e.ButtonGroup=m,e.Chip=J,e.ChipList=ee,e.DropDownButton=Ce,e.DropDownButtonClassComponent=S,e.DropDownButtonItem=E,e.FloatingActionButton=pe,e.FloatingActionButtonItem=se,e.SegmentedControl=be,e.SmartPasteButton=ke,e.SpeechToTextButton=ge,e.SplitButton=Ie,e.SplitButtonClassComponent=I,e.SplitButtonItem=v,e.Toolbar=W,e.ToolbarItem=H,e.ToolbarSeparator=M,e.ToolbarSpacer=U,e.toolbarButtons=R});
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=d.useRef(null),[B,K]=d.useState(!0===o&&!0===l),R=void 0!==u||void 0!==i||void 0!==c||void 0!==m,M=void 0!==n,O=s.useUnstyled(),z=e.unstyled||O,F=z&&z.uButton;let P=B;P=void 0===N.current?B:N.current,d.useImperativeHandle(t,()=>{const e={element:D.current,selected:P};return S.current=e,e}),s.useWebMcpRegister("button",S,e,e.webMcp),d.useMemo(()=>{o&&void 0!==l&&l!==B&&K(l)},[o,l]),d.useEffect(()=>{N.current=void 0},[B]);const T=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:F,iconSize:w}),A=e=>d.cloneElement(e,{className:s.classNames(s.uButton.icon({c:F}),e.props.className)}),L=d.useMemo(()=>o?B:x||void 0,[o,B,x]);return d.createElement("button",{ref:D,"aria-pressed":L,...E,dir:r,disabled:a,onClick:e=>{o&&void 0===l&&(N.current=!B,K(!B)),b&&b.call(void 0,e)},className:s.classNames(s.uButton.wrapper({c:F,isRtl:"rtl"===r,selected:B,disabled:a,size:y,fillMode:C,rounded:k,themeColor:I,iconButton:!M&&R}),f)},v&&A(v),T,n&&d.createElement("span",{className:s.classNames(s.uButton.text({c:F}))},n),g&&A(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(["xsmall","xs","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","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.5.0-develop.14",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:"chevron-down",svgIcon:r.chevronDownIcon,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","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","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=":not(.k-popup *)",R=["button"+B+K,".k-button-group > button"+B+K,".k-colorpicker"+K,".k-dropdownlist"+K],M=e=>d.createElement("div",{ref:e._ref,className:s.classNames("k-toolbar-separator k-separator",e.className)}),O="prevArrow.title",z="nextArrow.title",F="moreButtonTitle.title",P={[O]:"Previous scroll button",[z]:"Next scroll button",[F]:"More button"},T=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,P[O]):t.toLanguageString(z,P[z])}`,"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.chevronLeftIcon:r.chevronRightIcon,className:"k-button-icon"}))},A=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(T,{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(M,{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(M,{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(M,{className:"k-toolbar-button-separator"}),m("rtl"!==a?"next":"prev",i)),h&&"end"===n&&d.createElement(d.Fragment,null,d.createElement(M,{className:"k-toolbar-button-separator"}),m("rtl"!==a?"prev":"next",l),m("rtl"!==a?"next":"prev",i)))},L=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=()=>{const e=n.current;if(!e)return null;const t=e.clientWidth,s=parseInt(window.getComputedStyle(e).gap||"0",10),o=Array.from(e.children),r=o.map(e=>Math.ceil(e.clientWidth)),a=r.reduce((e,t)=>e+t,0)+o.length*s+2*s;return{toolbarWidth:t,gap:s,childWidths:r,totalInnerWidth:a}},x=()=>{var e,t,n,s,o;const r=I();if(!r)return;const{toolbarWidth:a,gap:l,childWidths:i,totalInnerWidth:c}=r;let d=c,u=!1;const p=f.current.length>0,m=[...h.current],y=[...f.current];for(;d>a&&m.length>0;){const r=m.pop(),a=m.length;if(r&&y.unshift(r),a<i.length&&(d-=i[a]+l),!u&&!p){d+=Math.ceil(null!=(t=null==(e=b.current)?void 0:e.offsetWidth)?t:0)+Math.ceil(null!=(o=null==(s=null==(n=g.current)?void 0:n.element)?void 0:s.offsetWidth)?o:0)+2*l}u=!0}if(u)return h.current=m,f.current=y,v.current=a,void C();if(f.current.length>0&&a>v.current+l*i.length){const e=[...f.current],t=e.shift();f.current=e,t&&(h.current=[...h.current,t]),v.current=a,C()}};d.useEffect(()=>{const e=new ResizeObserver(x),t=n.current;return t&&e.observe(t),()=>{t&&e.unobserve(t)}},[]),d.useLayoutEffect(()=>{if(!n.current||0===f.current.length||0===h.current.length)return;const e=I();if(!e||e.totalInnerWidth<=e.toolbarWidth)return;const t=[...h.current],s=t.pop();v.current=e.toolbarWidth,h.current=t,s&&(f.current=[s,...f.current]),C()});return d.createElement(d.Fragment,null,h.current.length>0&&h.current,f.current.length>0&&d.createElement(d.Fragment,null,d.createElement(M,{_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(F,P[F]),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))))},W=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,K]=d.useState(!1),[M,O]=d.useState(!0),[z,F]=d.useState(!1),P=s.useDir(x,e.dir),T=d.useMemo(()=>e.buttons||R,[e.buttons]),W=d.useMemo(()=>T.map(e=>e+":focus").join(","),[T]),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(T.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(T.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&&K(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&&O(!0),n&&F(!0),!t&&!n&&(O(!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&&M,"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(A,{scrollButtons:v,scrollButtonsPosition:g,prevButton:y,nextButton:k,isOverflowing:B,scrollContentRef:w,buttonScrollSpeed:b,dir:P,isScrollStartPosition:M,isScrollEndPosition:z,children:n}),"section"===f&&d.createElement(L,{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};W.displayName="KendoReactToolbar",W.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 H=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)});H.displayName="KendoReactToolbarItem",H.propTypes={className:n.string};const U=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})});U.displayName="KendoReactToolbarSpacer",U.propTypes={className:n.string};const V=d.createContext([null,e=>{}]),j=d.createContext([null,e=>{}]),q=d.createContext([null,e=>{}]);var G=(e=>(e.next="next",e.prev="prev",e.current="current",e.reset="reset",e))(G||{});var Z=(e=>(e.remove="remove",e.add="add",e.reorder="reorder",e))(Z||{});var _=(e=>(e.toggle="toggle",e.remove="remove",e))(_||{});const J=d.forwardRef((e,t)=>{const n=d.useRef(null),o=d.useRef(null),{disabled:a=X.disabled,fillMode:l=X.fillMode,themeColor:i=X.themeColor,size:c=X.size,rounded:u=X.rounded,dir:p=X.dir,removeIcon:m=X.removeIcon,removeSvgIcon:h=X.removeSvgIcon,removable:f=X.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(V),[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:_.toggle,payload:e.value,event:t})},[b,e.value]),E=d.useCallback(t=>{f&&(C({type:Z.remove,payload:e.value,event:t}),k({type:G.reset,payload:e.value,event:t}),b({type:_.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:G.prev,payload:e.value,event:t});break;case s.Keys.right:k({type:G.next,payload:e.value,event:t});break;case s.Keys.enter:b({type:_.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:G.current,event:t}),e.onFocus&&e.onFocus.call(void 0,{target:n.current,syntheticEvent:t})},[e.onFocus,e.value,k]),S=d.useCallback(t=>{k({type:G.reset,payload:e.value,event:t}),e.onBlur&&e.onBlur.call(void 0,{target:n.current,syntheticEvent:t})},[e.onBlur,e.value,k]),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"}))))}),Q={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"])},X={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};J.displayName="KendoReactChip",J.propTypes=Q;const Y=(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)}]},ee=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=ne.defaultData,chip:f=ne.chip,disabled:v=ne.disabled,size:g=ne.size,defaultValue:b=ne.defaultValue,selection:y=ne.selection,valueField:k=ne.valueField,textField:C=ne.textField,dir:I=ne.dir,onChange:x,onDataChange:w}=e,E=s.useDir(o,I),N=d.useMemo(()=>f||J,[f,J]);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]=Y(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,M]=((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),O=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(O,[]),[z,O]),T=d.useCallback(e=>s.getter(k)(e),[k]),A=d.useCallback(e=>s.getter(C)(e),[C]),[L,W]=(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}),$=s.useMouse(e,n);return d.createElement(V.Provider,{value:[F,B]},d.createElement(j.Provider,{value:[L,W]},d.createElement(q.Provider,{value:[z,M]},d.createElement("div",{ref:o,...$,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}))))))}),te={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"])},ne={chip:J,size:void 0,disabled:!1,defaultValue:null,defaultData:[],dir:"ltr",selection:"none",textField:"text",valueField:"value"};ee.displayName="KendoReactChipList",ee.propTypes=te;const se=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))});se.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},se.displayName="KendoFloatingActionButtonItem";const oe="16px",re=e=>"number"==typeof e?e+"px":e,ae=(e,t)=>{const n={horizontal:t?"right":"left",vertical:"bottom"};return"end"===e.horizontal&&(n.horizontal=t?"left":"right"),n},le=(e,t)=>{const n={horizontal:t?"right":"left",vertical:"top"};return"end"===e.horizontal&&(n.horizontal=t?"left":"right"),n},ie=(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"]),ce=(e,t,n,s)=>{const o=t.horizontal,r=t.vertical;if(e.current){const a=n&&void 0!==n.x?re(n.x):oe,l=n&&void 0!==n.x?`calc(50% + ${re(n.x)})`:"50%",i=n&&void 0!==n.y?re(n.y):oe,c=n&&void 0!==n.y?`calc(50% + ${re(n.y)})`:"50%";e.current.style.setProperty(de(t,s),"center"===o?l:a),e.current.style.setProperty(ue(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"))}},de=(e,t)=>{const{horizontal:n}=e;return{end:t?"left":"right",center:"left",start:t?"right":"left"}[n||"end"]},ue=e=>({top:"top",middle:"top",bottom:"bottom"}[e.vertical||"bottom"]),pe=d.forwardRef((e,t)=>{const{align:n=me.align,alignOffset:r,className:a,disabled:l,icon:i,svgIcon:c,iconClass:u,id:p,items:m,item:h,text:f,positionMode:v=me.positionMode,size:g=me.size,style:b,rounded:y=me.rounded,themeColor:k=me.themeColor,overlayStyle:C,tabIndex:I,accessKey:x,popupSettings:w={},modal:E,onClick:N,onItemClick:D,onFocus:S,onBlur:B,onKeyDown:K,onOpen:R,onClose:M,...O}=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),W=d.useCallback(()=>{T.current&&T.current.focus()},[]),$=d.useCallback(()=>({element:T.current,focus:W}),[W]);d.useImperativeHandle(P,$),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(()=>{ce(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:M,e,$(),void 0)},[R,M,m]),Y=d.useCallback(e=>{!e.target||l||(!m&&N?s.dispatchEvent(N,e,$(),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,$(),void 0)},[S,j,G]),te=d.useCallback(e=>{j(!1),U(!1),G(-1),s.dispatchEvent(B,e,$(),void 0),H&&X(e,!1)},[B,j,U,G,X]),ne=d.useCallback(e=>{e.preventDefault()},[]),oe=d.useCallback((e,t)=>{m&&(m[t].disabled||s.dispatchEvent(D,e,$(),{itemProps:m[t],itemIndex:t}))},[D]),re=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,$(),void 0)},[K,q,G,J,U]),pe=d.useMemo(()=>s.classNames("k-fab",{"k-fab-xs":"xsmall"===g,"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(se,{...e,key:t,index:t,id:`${Q}-${t}`,disabled:l||e.disabled,focused:q===t,dataItem:e,item:h,className:s.classNames(e.className,ie(_||"ltr",n.horizontal)),onClick:re,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:pe,style:b,onClick:Y,onMouseDown:ne,onFocus:ee,onBlur:te,onKeyDown:ue,...O},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||ae(n,J),popupAlign:w.popupAlign||le(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))))});pe.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(["xsmall","small","medium","large"]),rounded:n.oneOf(["small","medium","large","full","none"]),themeColor:n.oneOf(["base","primary","secondary","tertiary"]),modal:n.bool,overlayStyle:n.object};const me={align:{vertical:"bottom",horizontal:"end"},size:void 0,rounded:void 0,themeColor:void 0,positionMode:"fixed"};pe.displayName="KendoFloatingActionButton";const he="speechToTextButton.ariaLabel",fe="speechToTextButton.title",ve={[he]:"Start speech recognition",[fe]:"Speech to Text Button"},ge=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:M,...O}=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]),W=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]),$=d.useCallback(e=>{T(!1),F.current=!1,null==M||M({errorMessage:e.error})},[M]),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:W,error:$}})):M&&M({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.stopIcon:v||r.microphoneIcon,[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(he,ve[he]),"aria-pressed":P,disabled:g,title:null!=y?y:i.toLanguageString(fe,ve[fe]),onClick:()=>{P?U():H()},...O},e.children),n&&d.createElement(s.WatermarkOverlay,{message:o}))});ge.displayName="KendoSpeechToTextButton";const be=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||"undefined"==typeof ResizeObserver)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}),"aria-pressed":g,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)))}))});be.displayName="KendoReactSegmentedControl";const ye=[".k-input",".k-picker",".k-checkbox",".k-radio",".k-switch",".k-rating",".k-slider"],ke=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:ye.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)});ke.displayName="KendoReactSmartPasteButton";const Ce=s.withIdHOC(S);Ce.displayName="KendoReactDropDownButton";const Ie=s.withIdHOC(I);Ie.displayName="KendoReactSplitButton",e.Button=u,e.ButtonGroup=m,e.Chip=J,e.ChipList=ee,e.DropDownButton=Ce,e.DropDownButtonClassComponent=S,e.DropDownButtonItem=w,e.FloatingActionButton=pe,e.FloatingActionButtonItem=se,e.SegmentedControl=be,e.SmartPasteButton=ke,e.SpeechToTextButton=ge,e.SplitButton=Ie,e.SplitButtonClassComponent=I,e.SplitButtonItem=v,e.Toolbar=W,e.ToolbarItem=H,e.ToolbarSeparator=M,e.ToolbarSpacer=U,e.toolbarButtons=R});
@@ -5,4 +5,4 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=Object.freeze({name:"@progress/kendo-react-buttons",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate: 1778676737,version:"14.5.0-develop.12",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"});exports.packageMetadata=e;
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: 1778745523,version:"14.5.0-develop.14",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"});exports.packageMetadata=e;
@@ -7,7 +7,7 @@ export const packageMetadata = Object.freeze({
7
7
  productName: 'KendoReact',
8
8
  productCode: 'KENDOUIREACT',
9
9
  productCodes: ['KENDOUIREACT'],
10
- publishDate: 1778676737,
11
- version: '14.5.0-develop.12',
10
+ publishDate: 1778745523,
11
+ version: '14.5.0-develop.14',
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.5.0-develop.12",
3
+ "version": "14.5.0-develop.14",
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.5.0-develop.12",
32
- "@progress/kendo-react-intl": "14.5.0-develop.12",
33
- "@progress/kendo-react-popup": "14.5.0-develop.12",
31
+ "@progress/kendo-react-common": "14.5.0-develop.14",
32
+ "@progress/kendo-react-intl": "14.5.0-develop.14",
33
+ "@progress/kendo-react-popup": "14.5.0-develop.14",
34
34
  "@progress/kendo-svg-icons": "^4.9.0 || ^5.0.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": 1778676737,
68
+ "publishDate": 1778745523,
69
69
  "licensingDocsUrl": "https://www.telerik.com/kendo-react-ui/components/my-license/"
70
70
  }
71
71
  },