@progress/kendo-react-buttons 13.4.0-develop.1 → 13.4.0-develop.3

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.
@@ -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 ye=require("react"),s=require("prop-types"),o=require("@progress/kendo-react-common"),he=require("./FloatingActionButtonItem.js"),R=require("./utils.js"),ve=require("@progress/kendo-react-popup");function Ce(d){const g=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(d){for(const r in d)if(r!=="default"){const k=Object.getOwnPropertyDescriptor(d,r);Object.defineProperty(g,r,k.get?k:{enumerable:!0,get:()=>d[r]})}}return g.default=d,Object.freeze(g)}const t=Ce(ye),Ie=2,Ee=100,M=t.forwardRef((d,g)=>{const{align:r=v.align,alignOffset:k,className:q,disabled:f,icon:w,svgIcon:A,iconClass:$,id:j,items:a,item:ee,text:C,positionMode:F=v.positionMode,size:I=v.size,style:te,rounded:E=v.rounded,themeColor:D=v.themeColor,overlayStyle:oe,tabIndex:se,accessKey:ne,popupSettings:x={},modal:ae,onClick:P,onItemClick:_,onFocus:S,onBlur:W,onKeyDown:Z,onOpen:H,onClose:L,...le}=d,X=o.useZIndexContext(),U=X?X+Ie:Ee,G=t.useRef(null),i=t.useRef(null),ie=t.useRef(null),re=t.useRef(null),J=t.useCallback(()=>{i.current&&i.current.focus()},[]),p=t.useCallback(()=>({element:i.current,focus:J}),[J]);t.useImperativeHandle(G,p),t.useImperativeHandle(g,()=>G.current);const[c,u]=t.useState(!1),[N,m]=t.useState(!1),[y,l]=t.useState(-1),ce=o.useId()+"-button-id",T=o.useDir(i,d.dir),h=T==="rtl",K=o.useId()+"-list-id";t.useEffect(()=>{R.position(i,r,k,h)},[i,r,k,h]),t.useEffect(()=>{N&&i&&i.current&&i.current.focus()},[N,i]);const b=t.useCallback((e,n)=>{a&&o.dispatchEvent(n?H:L,e,p(),void 0)},[H,L,a]),Q=t.useCallback(e=>{!e.target||f||(!a&&P?o.dispatchEvent(P,e,p(),void 0):(u(!c),m(!0),l(c?-1:0),b(e,!c)))},[u,m,l,P,b,c,a,f]),ue=t.useCallback(e=>{m(!0),l(c?0:-1),S&&o.dispatchEvent(S,e,p(),void 0)},[S,m,l]),de=t.useCallback(e=>{m(!1),u(!1),l(-1),o.dispatchEvent(W,e,p(),void 0),c&&b(e,!1)},[W,m,u,l,b]),fe=t.useCallback(e=>{e.preventDefault()},[]),z=t.useCallback((e,n)=>{a&&(a[n].disabled||o.dispatchEvent(_,e,p(),{itemProps:a[n],itemIndex:n}))},[_]),pe=t.useCallback((e,n)=>{!e.target||!a||(l(n),u(!1),z(e,n),b(e,!1))},[l,u,z,b]),me=t.useCallback(e=>{o.getActiveElement(document)===i.current&&e.preventDefault()},[i]),be=t.useCallback(e=>{const n=y,B=a?a.length:-1;if(e.altKey){!c&&e.keyCode===o.Keys.down&&(e.preventDefault(),u(!0),l(0)),c&&e.keyCode===o.Keys.up&&(e.preventDefault(),u(!1),l(-1));return}switch(e.keyCode){case o.Keys.enter:case o.Keys.space:n>=0&&z(e,n),a||Q(e),e.preventDefault(),u(!c),l(c?-1:0);break;case o.Keys.esc:e.preventDefault(),u(!1),l(-1);break;case o.Keys.home:e.preventDefault(),l(0);break;case o.Keys.end:e.preventDefault(),l(B-1);break;case o.Keys.down:case o.Keys.right:e.preventDefault(),l(n+1>=B?0:n+1);break;case o.Keys.up:case o.Keys.left:e.preventDefault(),l(n-1<0?B-1:n-1);break}o.dispatchEvent(Z,e,p(),void 0)},[Z,y,l,h,u]),ge=t.useMemo(()=>o.classNames("k-fab",{"k-fab-sm":I==="small","k-fab-md":I==="medium","k-fab-lg":I==="large","k-disabled":f,"k-pos-absolute":F==="absolute","k-pos-fixed":F==="fixed","k-focus":N,[`k-rounded-${o.kendoThemeMaps.roundedMap[E]||E}`]:E,"k-fab-solid":D,[`k-fab-solid-${D}`]:D},`k-${r.vertical}-${r.horizontal}`,q),[D,I,E,f,F,r,N,q]),ke=a&&a.map((e,n)=>t.createElement(he.FloatingActionButtonItem,{...e,key:n,index:n,id:`${K}-${n}`,disabled:f||e.disabled,focused:y===n,dataItem:e,item:ee,className:o.classNames(e.className,R.getTextDirectionClass(T||"ltr",r.horizontal)),onClick:pe,onDown:me})),V=!!((w||A)&&!C),Y=(i.current?i.current.offsetWidth:0)/2-32/2;let O;return w||A?O=t.createElement(o.IconWrap,{className:"k-fab-icon",name:w,icon:A}):$?O=t.createElement("span",{role:"presentation",className:$}):O=null,t.createElement(o.ZIndexContext.Provider,{value:U},t.createElement(t.Fragment,null,t.createElement("button",{ref:i,id:j||ce,role:"button",type:"button","aria-disabled":f,"aria-expanded":a?c:void 0,"aria-haspopup":!!a,"aria-label":`${C||""} floatingactionbutton`,"aria-owns":a?K:void 0,"aria-activedescendant":y>=0&&a?`${K}-${y}`:void 0,tabIndex:o.getTabIndex(se,f),accessKey:ne,dir:T,disabled:f,className:ge,style:te,onClick:Q,onMouseDown:fe,onFocus:ue,onBlur:de,onKeyDown:be,...le},O,C&&t.createElement("span",{className:"k-fab-text"},C)),ae&&c&&t.createElement("div",{className:"k-overlay",style:{zIndex:U,...oe}}),t.createElement(ve.Popup,{ref:re,anchor:i.current,show:c,animate:x.animate,popupClass:o.classNames("k-popup-transparent k-fab-popup",x.popupClass),anchorAlign:x.anchorAlign||R.getAnchorAlign(r,h),popupAlign:x.popupAlign||R.getPopupAlign(r,h),style:{boxShadow:"none"}},t.createElement("ul",{ref:ie,role:"menu","aria-labelledby":j,id:K,className:o.classNames("k-fab-items",{"k-fab-items-bottom":r.vertical!=="bottom","k-fab-items-top":r.vertical==="bottom"}),style:{paddingLeft:V?Y:void 0,paddingRight:V?Y:void 0}},ke))))});M.propTypes={className:s.string,style:s.object,id:s.string,dir:s.string,tabIndex:s.number,accessKey:s.string,disabled:s.bool,icon:s.string,svgIcon:o.svgIconPropType,iconClass:s.string,text:s.string,alignOffset:s.shape({x:s.oneOfType([s.number,s.string]).isRequired,y:s.oneOfType([s.number,s.string]).isRequired}),align:s.shape({vertical:s.oneOf(["top","middle","bottom"]).isRequired,horizontal:s.oneOf(["start","center","end"]).isRequired}),positionMode:s.oneOf(["absolute","fixed"]),size:s.oneOf(["small","medium","large"]),rounded:s.oneOf(["small","medium","large","full"]),themeColor:s.oneOf(["primary","secondary","tertiary","info","success","warning","error","dark","light","inverse"]),modal:s.bool,overlayStyle:s.object};const v={align:{vertical:"bottom",horizontal:"end"},size:void 0,rounded:void 0,themeColor:void 0,positionMode:"fixed"};M.displayName="KendoFloatingActionButton";exports.FloatingActionButton=M;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const ye=require("react"),s=require("prop-types"),o=require("@progress/kendo-react-common"),he=require("./FloatingActionButtonItem.js"),O=require("./utils.js"),ve=require("@progress/kendo-react-popup");function Ce(d){const g=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(d){for(const r in d)if(r!=="default"){const k=Object.getOwnPropertyDescriptor(d,r);Object.defineProperty(g,r,k.get?k:{enumerable:!0,get:()=>d[r]})}}return g.default=d,Object.freeze(g)}const t=Ce(ye),Ie=2,Ee=100,M=t.forwardRef((d,g)=>{const{align:r=v.align,alignOffset:k,className:q,disabled:f,icon:R,svgIcon:w,iconClass:$,id:j,items:a,item:ee,text:C,positionMode:A=v.positionMode,size:I=v.size,style:te,rounded:E=v.rounded,themeColor:F=v.themeColor,overlayStyle:oe,tabIndex:se,accessKey:ne,popupSettings:D={},modal:ae,onClick:P,onItemClick:_,onFocus:S,onBlur:W,onKeyDown:Z,onOpen:H,onClose:L,...le}=d,X=o.useZIndexContext(),U=X?X+Ie:Ee,G=t.useRef(null),i=t.useRef(null),ie=t.useRef(null),re=t.useRef(null),J=t.useCallback(()=>{i.current&&i.current.focus()},[]),p=t.useCallback(()=>({element:i.current,focus:J}),[J]);t.useImperativeHandle(G,p),t.useImperativeHandle(g,()=>G.current);const[c,u]=t.useState(!1),[x,m]=t.useState(!1),[y,l]=t.useState(-1),ce=o.useId()+"-button-id",T=o.useDir(i,d.dir),h=T==="rtl",N=o.useId()+"-list-id";t.useEffect(()=>{O.position(i,r,k,h)},[i,r,k,h]),t.useEffect(()=>{x&&i&&i.current&&i.current.focus()},[x,i]);const b=t.useCallback((e,n)=>{a&&o.dispatchEvent(n?H:L,e,p(),void 0)},[H,L,a]),Q=t.useCallback(e=>{!e.target||f||(!a&&P?o.dispatchEvent(P,e,p(),void 0):(u(!c),m(!0),l(c?-1:0),b(e,!c)))},[u,m,l,P,b,c,a,f]),ue=t.useCallback(e=>{m(!0),l(c?0:-1),S&&o.dispatchEvent(S,e,p(),void 0)},[S,m,l]),de=t.useCallback(e=>{m(!1),u(!1),l(-1),o.dispatchEvent(W,e,p(),void 0),c&&b(e,!1)},[W,m,u,l,b]),fe=t.useCallback(e=>{e.preventDefault()},[]),z=t.useCallback((e,n)=>{a&&(a[n].disabled||o.dispatchEvent(_,e,p(),{itemProps:a[n],itemIndex:n}))},[_]),pe=t.useCallback((e,n)=>{!e.target||!a||(l(n),u(!1),z(e,n),b(e,!1))},[l,u,z,b]),me=t.useCallback(e=>{o.getActiveElement(document)===i.current&&e.preventDefault()},[i]),be=t.useCallback(e=>{const n=y,B=a?a.length:-1;if(e.altKey){!c&&e.keyCode===o.Keys.down&&(e.preventDefault(),u(!0),l(0)),c&&e.keyCode===o.Keys.up&&(e.preventDefault(),u(!1),l(-1));return}switch(e.keyCode){case o.Keys.enter:case o.Keys.space:n>=0&&z(e,n),a||Q(e),e.preventDefault(),u(!c),l(c?-1:0);break;case o.Keys.esc:e.preventDefault(),u(!1),l(-1);break;case o.Keys.home:e.preventDefault(),l(0);break;case o.Keys.end:e.preventDefault(),l(B-1);break;case o.Keys.down:case o.Keys.right:e.preventDefault(),l(n+1>=B?0:n+1);break;case o.Keys.up:case o.Keys.left:e.preventDefault(),l(n-1<0?B-1:n-1);break}o.dispatchEvent(Z,e,p(),void 0)},[Z,y,l,h,u]),ge=t.useMemo(()=>o.classNames("k-fab",{"k-fab-sm":I==="small","k-fab-md":I==="medium","k-fab-lg":I==="large","k-disabled":f,"k-pos-absolute":A==="absolute","k-pos-fixed":A==="fixed","k-focus":x,[`k-rounded-${o.kendoThemeMaps.roundedMap[E]||E}`]:E,[`k-fab-${F}`]:F},`k-${r.vertical}-${r.horizontal}`,q),[F,I,E,f,A,r,x,q]),ke=a&&a.map((e,n)=>t.createElement(he.FloatingActionButtonItem,{...e,key:n,index:n,id:`${N}-${n}`,disabled:f||e.disabled,focused:y===n,dataItem:e,item:ee,className:o.classNames(e.className,O.getTextDirectionClass(T||"ltr",r.horizontal)),onClick:pe,onDown:me})),V=!!((R||w)&&!C),Y=(i.current?i.current.offsetWidth:0)/2-32/2;let K;return R||w?K=t.createElement(o.IconWrap,{className:"k-fab-icon",name:R,icon:w}):$?K=t.createElement("span",{role:"presentation",className:$}):K=null,t.createElement(o.ZIndexContext.Provider,{value:U},t.createElement(t.Fragment,null,t.createElement("button",{ref:i,id:j||ce,role:"button",type:"button","aria-disabled":f,"aria-expanded":a?c:void 0,"aria-haspopup":!!a,"aria-label":`${C||""} floatingactionbutton`,"aria-owns":a?N:void 0,"aria-activedescendant":y>=0&&a?`${N}-${y}`:void 0,tabIndex:o.getTabIndex(se,f),accessKey:ne,dir:T,disabled:f,className:ge,style:te,onClick:Q,onMouseDown:fe,onFocus:ue,onBlur:de,onKeyDown:be,...le},K,C&&t.createElement("span",{className:"k-fab-text"},C)),ae&&c&&t.createElement("div",{className:"k-overlay",style:{zIndex:U,...oe}}),t.createElement(ve.Popup,{ref:re,anchor:i.current,show:c,animate:D.animate,popupClass:o.classNames("k-popup-transparent k-fab-popup",D.popupClass),anchorAlign:D.anchorAlign||O.getAnchorAlign(r,h),popupAlign:D.popupAlign||O.getPopupAlign(r,h),style:{boxShadow:"none"}},t.createElement("ul",{ref:ie,role:"menu","aria-labelledby":j,id:N,className:o.classNames("k-fab-items",{"k-fab-items-bottom":r.vertical!=="bottom","k-fab-items-top":r.vertical==="bottom"}),style:{paddingLeft:V?Y:void 0,paddingRight:V?Y:void 0}},ke))))});M.propTypes={className:s.string,style:s.object,id:s.string,dir:s.string,tabIndex:s.number,accessKey:s.string,disabled:s.bool,icon:s.string,svgIcon:o.svgIconPropType,iconClass:s.string,text:s.string,alignOffset:s.shape({x:s.oneOfType([s.number,s.string]).isRequired,y:s.oneOfType([s.number,s.string]).isRequired}),align:s.shape({vertical:s.oneOf(["top","middle","bottom"]).isRequired,horizontal:s.oneOf(["start","center","end"]).isRequired}),positionMode:s.oneOf(["absolute","fixed"]),size:s.oneOf(["small","medium","large"]),rounded:s.oneOf(["small","medium","large","full"]),themeColor:s.oneOf(["primary","secondary","tertiary","info","success","warning","error","dark","light","inverse"]),modal:s.bool,overlayStyle:s.object};const v={align:{vertical:"bottom",horizontal:"end"},size:void 0,rounded:void 0,themeColor:void 0,positionMode:"fixed"};M.displayName="KendoFloatingActionButton";exports.FloatingActionButton=M;
@@ -7,33 +7,33 @@
7
7
  */
8
8
  import * as t from "react";
9
9
  import o from "prop-types";
10
- import { useZIndexContext as ye, useId as Y, useDir as ve, dispatchEvent as b, getActiveElement as Ie, Keys as c, classNames as w, kendoThemeMaps as Ee, ZIndexContext as xe, getTabIndex as De, IconWrap as Ne, svgIconPropType as we } from "@progress/kendo-react-common";
10
+ import { useZIndexContext as ye, useId as Y, useDir as ve, dispatchEvent as b, getActiveElement as Ie, Keys as c, classNames as N, kendoThemeMaps as Ee, ZIndexContext as xe, getTabIndex as De, IconWrap as Ne, svgIconPropType as we } from "@progress/kendo-react-common";
11
11
  import { FloatingActionButtonItem as Re } from "./FloatingActionButtonItem.mjs";
12
12
  import { position as Ae, getTextDirectionClass as Fe, getPopupAlign as Oe, getAnchorAlign as ze } from "./utils.mjs";
13
13
  import { Popup as Te } from "@progress/kendo-react-popup";
14
14
  const Be = 2, Me = 100, ee = t.forwardRef(
15
15
  (P, te) => {
16
16
  const {
17
- align: d = h.align,
17
+ align: u = h.align,
18
18
  alignOffset: $,
19
19
  className: K,
20
- disabled: u,
21
- icon: R,
22
- svgIcon: A,
20
+ disabled: d,
21
+ icon: w,
22
+ svgIcon: R,
23
23
  iconClass: S,
24
24
  id: W,
25
- items: s,
25
+ items: n,
26
26
  item: oe,
27
27
  text: C,
28
- positionMode: F = h.positionMode,
28
+ positionMode: A = h.positionMode,
29
29
  size: y = h.size,
30
30
  style: ae,
31
31
  rounded: v = h.rounded,
32
- themeColor: I = h.themeColor,
33
- overlayStyle: se,
34
- tabIndex: ne,
32
+ themeColor: F = h.themeColor,
33
+ overlayStyle: ne,
34
+ tabIndex: se,
35
35
  accessKey: le,
36
- popupSettings: E = {},
36
+ popupSettings: I = {},
37
37
  modal: ie,
38
38
  onClick: O,
39
39
  onItemClick: Z,
@@ -43,7 +43,7 @@ const Be = 2, Me = 100, ee = t.forwardRef(
43
43
  onOpen: H,
44
44
  onClose: j,
45
45
  ...re
46
- } = P, L = ye(), X = L ? L + Be : Me, U = t.useRef(null), l = t.useRef(null), ce = t.useRef(null), de = t.useRef(null), G = t.useCallback(() => {
46
+ } = P, L = ye(), X = L ? L + Be : Me, U = t.useRef(null), l = t.useRef(null), ce = t.useRef(null), ue = t.useRef(null), G = t.useCallback(() => {
47
47
  l.current && l.current.focus();
48
48
  }, []), f = t.useCallback(
49
49
  () => ({
@@ -56,62 +56,62 @@ const Be = 2, Me = 100, ee = t.forwardRef(
56
56
  te,
57
57
  () => U.current
58
58
  );
59
- const [i, r] = t.useState(!1), [x, p] = t.useState(!1), [g, n] = t.useState(-1), ue = Y() + "-button-id", T = ve(l, P.dir), k = T === "rtl", D = Y() + "-list-id";
59
+ const [i, r] = t.useState(!1), [E, p] = t.useState(!1), [g, s] = t.useState(-1), de = Y() + "-button-id", T = ve(l, P.dir), k = T === "rtl", x = Y() + "-list-id";
60
60
  t.useEffect(() => {
61
- Ae(l, d, $, k);
62
- }, [l, d, $, k]), t.useEffect(() => {
63
- x && l && l.current && l.current.focus();
64
- }, [x, l]);
61
+ Ae(l, u, $, k);
62
+ }, [l, u, $, k]), t.useEffect(() => {
63
+ E && l && l.current && l.current.focus();
64
+ }, [E, l]);
65
65
  const m = t.useCallback(
66
66
  (e, a) => {
67
- s && b(a ? H : j, e, f(), void 0);
67
+ n && b(a ? H : j, e, f(), void 0);
68
68
  },
69
- [H, j, s]
69
+ [H, j, n]
70
70
  ), J = t.useCallback(
71
71
  (e) => {
72
- !e.target || u || (!s && O ? b(
72
+ !e.target || d || (!n && O ? b(
73
73
  O,
74
74
  e,
75
75
  f(),
76
76
  void 0
77
- ) : (r(!i), p(!0), n(i ? -1 : 0), m(e, !i)));
77
+ ) : (r(!i), p(!0), s(i ? -1 : 0), m(e, !i)));
78
78
  },
79
- [r, p, n, O, m, i, s, u]
79
+ [r, p, s, O, m, i, n, d]
80
80
  ), fe = t.useCallback(
81
81
  (e) => {
82
- p(!0), n(i ? 0 : -1), z && b(
82
+ p(!0), s(i ? 0 : -1), z && b(
83
83
  z,
84
84
  e,
85
85
  f(),
86
86
  void 0
87
87
  );
88
88
  },
89
- [z, p, n]
89
+ [z, p, s]
90
90
  ), pe = t.useCallback(
91
91
  (e) => {
92
- p(!1), r(!1), n(-1), b(
92
+ p(!1), r(!1), s(-1), b(
93
93
  q,
94
94
  e,
95
95
  f(),
96
96
  void 0
97
97
  ), i && m(e, !1);
98
98
  },
99
- [q, p, r, n, m]
99
+ [q, p, r, s, m]
100
100
  ), me = t.useCallback((e) => {
101
101
  e.preventDefault();
102
102
  }, []), B = t.useCallback(
103
103
  (e, a) => {
104
- s && (s[a].disabled || b(Z, e, f(), {
105
- itemProps: s[a],
104
+ n && (n[a].disabled || b(Z, e, f(), {
105
+ itemProps: n[a],
106
106
  itemIndex: a
107
107
  }));
108
108
  },
109
109
  [Z]
110
110
  ), be = t.useCallback(
111
111
  (e, a) => {
112
- !e.target || !s || (n(a), r(!1), B(e, a), m(e, !1));
112
+ !e.target || !n || (s(a), r(!1), B(e, a), m(e, !1));
113
113
  },
114
- [n, r, B, m]
114
+ [s, r, B, m]
115
115
  ), ge = t.useCallback(
116
116
  (e) => {
117
117
  Ie(document) === l.current && e.preventDefault();
@@ -119,32 +119,32 @@ const Be = 2, Me = 100, ee = t.forwardRef(
119
119
  [l]
120
120
  ), ke = t.useCallback(
121
121
  (e) => {
122
- const a = g, M = s ? s.length : -1;
122
+ const a = g, M = n ? n.length : -1;
123
123
  if (e.altKey) {
124
- !i && e.keyCode === c.down && (e.preventDefault(), r(!0), n(0)), i && e.keyCode === c.up && (e.preventDefault(), r(!1), n(-1));
124
+ !i && e.keyCode === c.down && (e.preventDefault(), r(!0), s(0)), i && e.keyCode === c.up && (e.preventDefault(), r(!1), s(-1));
125
125
  return;
126
126
  }
127
127
  switch (e.keyCode) {
128
128
  case c.enter:
129
129
  case c.space:
130
- a >= 0 && B(e, a), s || J(e), e.preventDefault(), r(!i), n(i ? -1 : 0);
130
+ a >= 0 && B(e, a), n || J(e), e.preventDefault(), r(!i), s(i ? -1 : 0);
131
131
  break;
132
132
  case c.esc:
133
- e.preventDefault(), r(!1), n(-1);
133
+ e.preventDefault(), r(!1), s(-1);
134
134
  break;
135
135
  case c.home:
136
- e.preventDefault(), n(0);
136
+ e.preventDefault(), s(0);
137
137
  break;
138
138
  case c.end:
139
- e.preventDefault(), n(M - 1);
139
+ e.preventDefault(), s(M - 1);
140
140
  break;
141
141
  case c.down:
142
142
  case c.right:
143
- e.preventDefault(), n(a + 1 >= M ? 0 : a + 1);
143
+ e.preventDefault(), s(a + 1 >= M ? 0 : a + 1);
144
144
  break;
145
145
  case c.up:
146
146
  case c.left:
147
- e.preventDefault(), n(a - 1 < 0 ? M - 1 : a - 1);
147
+ e.preventDefault(), s(a - 1 < 0 ? M - 1 : a - 1);
148
148
  break;
149
149
  }
150
150
  b(
@@ -154,60 +154,59 @@ const Be = 2, Me = 100, ee = t.forwardRef(
154
154
  void 0
155
155
  );
156
156
  },
157
- [_, g, n, k, r]
157
+ [_, g, s, k, r]
158
158
  ), he = t.useMemo(
159
- () => w(
159
+ () => N(
160
160
  "k-fab",
161
161
  {
162
162
  "k-fab-sm": y === "small",
163
163
  "k-fab-md": y === "medium",
164
164
  "k-fab-lg": y === "large",
165
- "k-disabled": u,
166
- "k-pos-absolute": F === "absolute",
167
- "k-pos-fixed": F === "fixed",
168
- "k-focus": x,
165
+ "k-disabled": d,
166
+ "k-pos-absolute": A === "absolute",
167
+ "k-pos-fixed": A === "fixed",
168
+ "k-focus": E,
169
169
  [`k-rounded-${Ee.roundedMap[v] || v}`]: v,
170
- "k-fab-solid": I,
171
- [`k-fab-solid-${I}`]: I
170
+ [`k-fab-${F}`]: F
172
171
  },
173
- `k-${d.vertical}-${d.horizontal}`,
172
+ `k-${u.vertical}-${u.horizontal}`,
174
173
  K
175
174
  ),
176
- [I, y, v, u, F, d, x, K]
177
- ), Ce = s && s.map((e, a) => /* @__PURE__ */ t.createElement(
175
+ [F, y, v, d, A, u, E, K]
176
+ ), Ce = n && n.map((e, a) => /* @__PURE__ */ t.createElement(
178
177
  Re,
179
178
  {
180
179
  ...e,
181
180
  key: a,
182
181
  index: a,
183
- id: `${D}-${a}`,
184
- disabled: u || e.disabled,
182
+ id: `${x}-${a}`,
183
+ disabled: d || e.disabled,
185
184
  focused: g === a,
186
185
  dataItem: e,
187
186
  item: oe,
188
- className: w(e.className, Fe(T || "ltr", d.horizontal)),
187
+ className: N(e.className, Fe(T || "ltr", u.horizontal)),
189
188
  onClick: be,
190
189
  onDown: ge
191
190
  }
192
- )), Q = !!((R || A) && !C), V = (l.current ? l.current.offsetWidth : 0) / 2 - 32 / 2;
193
- let N;
194
- return R || A ? N = /* @__PURE__ */ t.createElement(Ne, { className: "k-fab-icon", name: R, icon: A }) : S ? N = /* @__PURE__ */ t.createElement("span", { role: "presentation", className: S }) : N = null, /* @__PURE__ */ t.createElement(xe.Provider, { value: X }, /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement(
191
+ )), Q = !!((w || R) && !C), V = (l.current ? l.current.offsetWidth : 0) / 2 - 32 / 2;
192
+ let D;
193
+ return w || R ? D = /* @__PURE__ */ t.createElement(Ne, { className: "k-fab-icon", name: w, icon: R }) : S ? D = /* @__PURE__ */ t.createElement("span", { role: "presentation", className: S }) : D = null, /* @__PURE__ */ t.createElement(xe.Provider, { value: X }, /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement(
195
194
  "button",
196
195
  {
197
196
  ref: l,
198
- id: W || ue,
197
+ id: W || de,
199
198
  role: "button",
200
199
  type: "button",
201
- "aria-disabled": u,
202
- "aria-expanded": s ? i : void 0,
203
- "aria-haspopup": !!s,
200
+ "aria-disabled": d,
201
+ "aria-expanded": n ? i : void 0,
202
+ "aria-haspopup": !!n,
204
203
  "aria-label": `${C || ""} floatingactionbutton`,
205
- "aria-owns": s ? D : void 0,
206
- "aria-activedescendant": g >= 0 && s ? `${D}-${g}` : void 0,
207
- tabIndex: De(ne, u),
204
+ "aria-owns": n ? x : void 0,
205
+ "aria-activedescendant": g >= 0 && n ? `${x}-${g}` : void 0,
206
+ tabIndex: De(se, d),
208
207
  accessKey: le,
209
208
  dir: T,
210
- disabled: u,
209
+ disabled: d,
211
210
  className: he,
212
211
  style: ae,
213
212
  onClick: J,
@@ -217,7 +216,7 @@ const Be = 2, Me = 100, ee = t.forwardRef(
217
216
  onKeyDown: ke,
218
217
  ...re
219
218
  },
220
- N,
219
+ D,
221
220
  C && /* @__PURE__ */ t.createElement("span", { className: "k-fab-text" }, C)
222
221
  ), ie && i && /* @__PURE__ */ t.createElement(
223
222
  "div",
@@ -225,19 +224,19 @@ const Be = 2, Me = 100, ee = t.forwardRef(
225
224
  className: "k-overlay",
226
225
  style: {
227
226
  zIndex: X,
228
- ...se
227
+ ...ne
229
228
  }
230
229
  }
231
230
  ), /* @__PURE__ */ t.createElement(
232
231
  Te,
233
232
  {
234
- ref: de,
233
+ ref: ue,
235
234
  anchor: l.current,
236
235
  show: i,
237
- animate: E.animate,
238
- popupClass: w("k-popup-transparent k-fab-popup", E.popupClass),
239
- anchorAlign: E.anchorAlign || ze(d, k),
240
- popupAlign: E.popupAlign || Oe(d, k),
236
+ animate: I.animate,
237
+ popupClass: N("k-popup-transparent k-fab-popup", I.popupClass),
238
+ anchorAlign: I.anchorAlign || ze(u, k),
239
+ popupAlign: I.popupAlign || Oe(u, k),
241
240
  style: { boxShadow: "none" }
242
241
  },
243
242
  /* @__PURE__ */ t.createElement(
@@ -246,10 +245,10 @@ const Be = 2, Me = 100, ee = t.forwardRef(
246
245
  ref: ce,
247
246
  role: "menu",
248
247
  "aria-labelledby": W,
249
- id: D,
250
- className: w("k-fab-items", {
251
- "k-fab-items-bottom": d.vertical !== "bottom",
252
- "k-fab-items-top": d.vertical === "bottom"
248
+ id: x,
249
+ className: N("k-fab-items", {
250
+ "k-fab-items-bottom": u.vertical !== "bottom",
251
+ "k-fab-items-top": u.vertical === "bottom"
253
252
  }),
254
253
  style: {
255
254
  paddingLeft: Q ? V : void 0,
@@ -5,4 +5,4 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),ee=require("@progress/kendo-webspeech-common"),te=require("../Button.js"),u=require("@progress/kendo-react-common"),M=require("@progress/kendo-svg-icons"),a=require("../messages/index.js"),ne=require("@progress/kendo-react-intl"),I=require("../package-metadata.js"),y=e.forwardRef((r,A)=>{const q=!u.validatePackage(I.packageMetadata,{component:"SpeechToTextButton"}),B=u.getLicenseMessage(I.packageMetadata),h=ne.useLocalization(),{fillMode:E,rounded:L,size:z,themeColor:H,ariaLabel:d,svgIcon:S,disabled:N,iconSize:O="medium",title:f,className:F,id:P,style:W,lang:k="en-US",continuous:v=!1,interimResults:b=!1,maxAlternatives:T=1,integrationMode:K="webSpeech",onStart:g,onResult:i,onEnd:m,onError:s,...j}=r,o=e.useRef(null),n=e.useRef(!1),[c,l]=e.useState(!1),U=e.useCallback(async()=>{n.current=!0,l(!0),g&&await g()},[g]),D=e.useCallback(async()=>{n.current=!1,l(!1),m&&await m()},[m]),G=e.useCallback(t=>{const w=t.results,C=w[w.length-1],$=Array.from(C).map(x=>({transcript:x.transcript,confidence:x.confidence}));i==null||i({isFinal:C.isFinal,alternatives:$})},[i]),J=e.useCallback(t=>{l(!1),n.current=!1,s==null||s({errorMessage:t.error})},[s]),Q=()=>{var t;if(typeof window!="undefined"&&!("webkitSpeechRecognition"in window||"SpeechRecognition"in window)){s&&s({errorMessage:"Speech Recognition API is not supported in this browser."});return}(t=o.current)!=null&&t.isActive()&&o.current.stop(),o.current=new ee.KendoSpeechRecognition({lang:k,continuous:v,interimResults:b,maxAlternatives:T,events:{start:U,end:D,result:G,error:J}})},R=e.useCallback(()=>{var t;n.current||(t=o.current)==null||t.start()},[]),p=e.useCallback(()=>{var t;n.current&&((t=o.current)==null||t.stop())},[]),V=e.useCallback(()=>{var t;n.current&&((t=o.current)==null||t.abort(),n.current=!1,l(!1))},[]),X=()=>n.current;e.useImperativeHandle(A,()=>({start:R,stop:p,abort:V,isActive:X})),e.useEffect(()=>(Q(),()=>{n.current&&p()}),[k,v,b,T,K]);const Y=()=>{c?p():R()},Z=r.icon!==void 0||r.iconClass!==void 0,_=e.useMemo(()=>c?M.stopSmIcon:S||M.microphoneOutlineIcon,[c,S]);return e.createElement(e.Fragment,null,e.createElement(te.Button,{id:P,className:u.classNames({"k-speech-to-text-button":!0,"k-listening":c},F),style:W,svgIcon:Z?void 0:_,iconSize:O,fillMode:E,rounded:L,size:z,themeColor:H,"aria-label":d!=null?d:h.toLanguageString(a.speechToTextAriaLabel,a.messages[a.speechToTextAriaLabel]),"aria-pressed":c,disabled:N,title:f!=null?f:h.toLanguageString(a.speechToTextTitle,a.messages[a.speechToTextTitle]),onClick:Y,...j},r.children),q&&e.createElement(u.WatermarkOverlay,{message:B}))});y.displayName="KendoSpeechToTextButton";exports.SpeechToTextButton=y;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),ee=require("@progress/kendo-webspeech-common"),te=require("../Button.js"),u=require("@progress/kendo-react-common"),M=require("@progress/kendo-svg-icons"),a=require("../messages/index.js"),ne=require("@progress/kendo-react-intl"),I=require("../package-metadata.js"),y=e.forwardRef((r,A)=>{const q=!u.validatePackage(I.packageMetadata,{component:"SpeechToTextButton"}),B=u.getLicenseMessage(I.packageMetadata),h=ne.useLocalization(),{fillMode:E,rounded:L,size:z,themeColor:H,ariaLabel:d,svgIcon:S,disabled:N,iconSize:O,title:f,className:F,id:P,style:W,lang:k="en-US",continuous:v=!1,interimResults:b=!1,maxAlternatives:T=1,integrationMode:K="webSpeech",onStart:g,onResult:i,onEnd:p,onError:s,...j}=r,o=e.useRef(null),n=e.useRef(!1),[c,l]=e.useState(!1),U=e.useCallback(async()=>{n.current=!0,l(!0),g&&await g()},[g]),D=e.useCallback(async()=>{n.current=!1,l(!1),p&&await p()},[p]),G=e.useCallback(t=>{const w=t.results,C=w[w.length-1],$=Array.from(C).map(x=>({transcript:x.transcript,confidence:x.confidence}));i==null||i({isFinal:C.isFinal,alternatives:$})},[i]),J=e.useCallback(t=>{l(!1),n.current=!1,s==null||s({errorMessage:t.error})},[s]),Q=()=>{var t;if(typeof window!="undefined"&&!("webkitSpeechRecognition"in window||"SpeechRecognition"in window)){s&&s({errorMessage:"Speech Recognition API is not supported in this browser."});return}(t=o.current)!=null&&t.isActive()&&o.current.stop(),o.current=new ee.KendoSpeechRecognition({lang:k,continuous:v,interimResults:b,maxAlternatives:T,events:{start:U,end:D,result:G,error:J}})},R=e.useCallback(()=>{var t;n.current||(t=o.current)==null||t.start()},[]),m=e.useCallback(()=>{var t;n.current&&((t=o.current)==null||t.stop())},[]),V=e.useCallback(()=>{var t;n.current&&((t=o.current)==null||t.abort(),n.current=!1,l(!1))},[]),X=()=>n.current;e.useImperativeHandle(A,()=>({start:R,stop:m,abort:V,isActive:X})),e.useEffect(()=>(Q(),()=>{n.current&&m()}),[k,v,b,T,K]);const Y=()=>{c?m():R()},Z=r.icon!==void 0||r.iconClass!==void 0,_=e.useMemo(()=>c?M.stopSmIcon:S||M.microphoneOutlineIcon,[c,S]);return e.createElement(e.Fragment,null,e.createElement(te.Button,{id:P,className:u.classNames({"k-speech-to-text-button":!0,"k-listening":c},F),style:W,svgIcon:Z?void 0:_,iconSize:O,fillMode:E,rounded:L,size:z,themeColor:H,"aria-label":d!=null?d:h.toLanguageString(a.speechToTextAriaLabel,a.messages[a.speechToTextAriaLabel]),"aria-pressed":c,disabled:N,title:f!=null?f:h.toLanguageString(a.speechToTextTitle,a.messages[a.speechToTextTitle]),onClick:Y,...j},r.children),q&&e.createElement(u.WatermarkOverlay,{message:B}))});y.displayName="KendoSpeechToTextButton";exports.SpeechToTextButton=y;
@@ -22,7 +22,7 @@ const ie = e.forwardRef((a, M) => {
22
22
  ariaLabel: l,
23
23
  svgIcon: g,
24
24
  disabled: N,
25
- iconSize: F = "medium",
25
+ iconSize: F,
26
26
  title: u,
27
27
  className: O,
28
28
  id: K,
@@ -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")):"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"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).KendoReactButtons={},e.React,e.PropTypes,e.KendoReactCommon,e.KendoReactPopup,e.KendoSvgIcons,e.KendoReactIntl,e.KendoWebspeechCommon)}(this,function(e,t,s,n,o,r,i,a){"use strict";function l(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(s){if("default"!==s){var n=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(t,s,n.get?n:{enumerable:!0,get:function(){return e[s]}})}}),t.default=e,Object.freeze(t)}var c=l(t);const d=c.forwardRef((e,t)=>{const{children:s,togglable:o,dir:r,disabled:i,selected:a,icon:l,iconClass:d,svgIcon:p,imageUrl:m,imageAlt:h,className:f,startIcon:v,endIcon:g,onClick:b,size:y=u.size,rounded:k=u.rounded,fillMode:C=u.fillMode,themeColor:I=u.themeColor,ariaPressed:x,iconSize:w,...E}=e,D=c.useRef(void 0),N=c.useRef(null),[S,B]=c.useState(!0===o&&!0===a),K=void 0!==p||void 0!==l||void 0!==d||void 0!==m,R=void 0!==s,O=n.useUnstyled(),M=e.unstyled||O,z=M&&M.uButton;c.useImperativeHandle(t,()=>({element:N.current,selected:void 0!==D.current?D.current:S})),c.useMemo(()=>{o&&void 0!==a&&a!==S&&B(a)},[o,a]),c.useEffect(()=>{D.current=void 0},[S]);const F=function({imageUrl:e,name:t,iconClass:s,svgIcon:o,imageAlt:r,buttonClasses:i,iconSize:a}){return e?c.createElement("img",{role:"presentation",className:n.classNames(n.uButton.icon({c:i})),alt:r,src:e}):t||o?c.createElement(n.IconWrap,{className:n.classNames(n.uButton.icon({c:i})),name:t,icon:o,size:a}):s?c.createElement("span",{role:"presentation",className:n.classNames(n.uButton.icon({c:i}),s)}):null}({name:l,svgIcon:p,iconClass:d,imageUrl:m,imageAlt:h,buttonClasses:z,iconSize:w}),P=e=>c.cloneElement(e,{className:n.classNames(n.uButton.icon({c:z}),e.props.className)}),T=c.useMemo(()=>o?S:x||void 0,[]);return c.createElement("button",{ref:N,"aria-pressed":T,...E,dir:r,disabled:i,onClick:e=>{o&&void 0===a&&(D.current=!S,B(!S)),b&&b.call(void 0,e)},className:n.classNames(n.uButton.wrapper({c:z,isRtl:"rtl"===r,selected:S,disabled:i,size:y,fillMode:C,rounded:k,themeColor:I,iconButton:!R&&K}),f)},v&&P(v),F,s&&c.createElement("span",{className:n.classNames(n.uButton.text({c:z}))},s),g&&P(g))}),u={size:void 0,rounded:void 0,fillMode:void 0,themeColor:void 0};d.displayName="KendoReactButton",d.propTypes={children:s.node,selected:s.bool,togglable:s.bool,icon:s.string,svgIcon:n.svgIconPropType,iconClass:s.string,imageUrl:s.string,imageAlt:s.string,size:s.oneOf(["small","medium","large"]),rounded:s.oneOf(["small","medium","large","full"]),fillMode:s.oneOf(["flat","link","outline","solid","clear"]),themeColor:s.oneOf(["base","primary","secondary","tertiary","info","success","warning","error","dark","light","inverse"])};const p=e=>{const{children:t,className:s,dir:o,disabled:r,width:i}=e,a=n.useUnstyled(),l=e.unstyled||a,d=l&&l.uButtonGroup,u=(e,t)=>{const s={...i?{width:i}:{},...e.props.style||{}},n=r||e.props.disabled,o={...e.props,...t?{className:t}:{},...Object.keys(s).length?{style:s}:{},...void 0!==n?{disabled:n}:{}};return c.Children.count(e.props.children)>0?c.cloneElement(e,o,e.props.children):c.cloneElement(e,o)},p=c.useRef(null),m=(e=>{const t=c.Children.count(e),s=void 0!==o?"rtl"===o:p.current&&"rtl"===getComputedStyle(p.current).direction||!1;return c.Children.map(e,(e,o)=>{if(c.isValidElement(e)){const r=o===t-1,i=s,a=n.classNames(e.props.className,n.uButtonGroup.position({c:d,start:i?r:0===o,end:i?0===o:r}));return u(e,a)}return e})})(t),h=n.classNames(n.uButtonGroup.wrapper({c:d,stretched:!!i,disabled:r}),s),f={className:h,style:{width:`${i}`},dir:o,role:"group","aria-disabled":r};return c.createElement("div",{ref:p,...f,className:h},m)};p.propTypes={children:s.oneOfType([s.arrayOf(s.element),s.element]),className:s.string,disabled:s.bool,width:s.string,dir:s.string};const m=e=>{const t=n.useUnstyled(),s=e.unstyled||t,o=s&&s.uDropDownButton,r=c.useCallback(t=>{e.onClick(t,e.index)},[e]),i=e.dataItem.render||e.item||(void 0===e.item?e.render:null),a=void 0!==e.dataItem.text?e.dataItem.text:e.textField?e.dataItem[e.textField]:e.dataItem,l=c.createElement("li",{id:e.id,className:n.classNames(n.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},c.createElement("span",{tabIndex:-1,className:n.classNames(n.uDropDownButton.link({c:o,selected:e.dataItem.selected,disabled:e.dataItem.disabled})),key:"icon"},i?c.createElement(i,{item:e.dataItem,itemIndex:e.index}):c.createElement(c.Fragment,null,(e.dataItem.icon||e.dataItem.iconClass||e.dataItem.svgIcon)&&c.createElement(n.IconWrap,{className:e.dataItem.iconClass,name:e.dataItem.icon,icon:e.dataItem.svgIcon}),e.dataItem.imageUrl&&c.createElement("img",{role:"presentation",alt:"",src:e.dataItem.imageUrl,className:"k-icon"}),a&&c.createElement("span",{className:"k-menu-link-text"},a))));return void 0!==e.item&&void 0!==e.render?e.render.call(void 0,l,e):l};m.displayName="KendoReactButtonItem";const h=class extends c.Component{render(){return null}};h.propTypes={text:s.string,icon:s.string,iconClass:s.string,imageUrl:s.string,disabled:s.bool,render:s.any};let f=h;const v=(e,t,s,o)=>{if(s)return e;const r=Math.min(o-1,Math.max(0,e));switch(t){case n.Keys.enter:case n.Keys.space:case n.Keys.esc:return-1;case n.Keys.up:case n.Keys.left:return r-1<0?o-1:r-1;case n.Keys.down:case n.Keys.right:return r+1>=o?0:r+1;case n.Keys.home:return 0;case n.Keys.end:return o-1;default:return e}};function g(e){const t={horizontal:"left",vertical:"bottom"};return e&&(t.horizontal="right"),t}function b(e){const t={horizontal:"left",vertical:"top"};return e&&(t.horizontal="right"),t}const y=Object.freeze({name:"@progress/kendo-react-buttons",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate:0,version:"13.4.0-develop.1",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"}),k=class extends c.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!==n.Keys.down?this.opened&&e.keyCode===n.Keys.up&&(e.preventDefault(),this.setState({focusedIndex:-1}),this.setOpen(!1,e)):(e.preventDefault(),this.setState({focusedIndex:0}),this.setOpen(!0,e)));let s;if(e.keyCode===n.Keys.enter||e.keyCode===n.Keys.space){if(e.preventDefault(),this.dispatchClickEvent(e,t),t>=0){s={focusedIndex:this.opened?-1:0};const t=!this.opened;this.setOpen(t,e)}}else if(this.opened&&e.keyCode===n.Keys.esc)return this.setState({focusedIndex:-1}),void this.setOpen(!1,e);if(this.opened){const o=v(t,e.keyCode,e.altKey,this.buttonsData.length);o!==t&&(s=s||{},s.focusedIndex=o);const r=e.keyCode===n.Keys.up||e.keyCode===n.Keys.down||e.keyCode===n.Keys.left||e.keyCode===n.Keys.right;!e.altKey&&(r||e.keyCode===n.Keys.home||e.keyCode===n.Keys.end)&&e.preventDefault()}s&&this.setState(s)},this.switchFocus=e=>{this.skipFocus=!0,e(),window.setTimeout(()=>this.skipFocus=!1,0)},this.onFocus=e=>{this.skipFocus||(n.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}),n.dispatchEvent(this.props.onBlur,e,this,void 0),setTimeout(()=>{this.setOpen(!1,e)},0))},this.onPopupClose=e=>{var t;const s=n.getActiveElement(document);this.element&&this.element.removeAttribute("tabindex"),(s===this.list||null!=(t=this.list)&&t.contains(s))&&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=n.getActiveElement(document);this.element&&t!==this.element&&t!==this.list&&this.element.focus()},this.onItemDown=e=>{n.getActiveElement(document)===this.list&&e.preventDefault()},this.dispatchPopupEvent=(e,t)=>{n.dispatchEvent(t?this.props.onOpen:this.props.onClose,e,this,void 0),this.openedDuringOnChange=void 0},this.showLicenseWatermark=!n.validatePackage(y,{component:"SplitButton"}),this.licenseMessage=n.getLicenseMessage(y)}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||c.Children.toArray(this.props.children).filter(e=>e&&e.type===f).map(e=>e.props);const e=this.isRtl(),t=e?"rtl":void 0,{id:s,style:o,tabIndex:i,disabled:a}=this.props;return c.createElement(c.Fragment,null,c.createElement("div",{id:s,style:o,className:n.classNames("k-split-button","k-button-group",{"k-focus":this.state.focused},this.props.rounded&&`k-rounded-${n.kendoThemeMaps.roundedMap[this.props.rounded]}`,this.props.className),onKeyDown:this.onKeyDown,onFocus:this.onFocus,onBlur:this.onBlur,dir:t,ref:e=>{this.wrapper=e}},c.createElement(d,{ref:e=>{this.mainButton=e&&e.element},type:"button",size:this.props.size,rounded:this.props.rounded,fillMode:this.props.fillMode,themeColor:this.props.themeColor,onClick:e=>this.onItemClick(e,-1),disabled:a||void 0,tabIndex:i,accessKey:this.props.accessKey,className:this.props.buttonClass,icon:this.props.icon,svgIcon:this.props.svgIcon,iconClass:this.props.iconClass,startIcon:this.props.startIcon,endIcon:this.props.endIcon,imageUrl:this.props.imageUrl,dir:t,"aria-disabled":a,"aria-haspopup":!0,"aria-expanded":this.opened||void 0,"aria-label":this.props.ariaLabel,"aria-controls":this.opened?this.guid:void 0,id:"button-"+this.guid,title:this.props.title},this.props.text),c.createElement(d,{type:"button",size:this.props.size,rounded:this.props.rounded,fillMode:this.props.fillMode,themeColor:this.props.themeColor,icon:"caret-alt-down",svgIcon:r.caretAltDownIcon,className:"k-split-button-arrow",disabled:a||void 0,tabIndex:-1,onClick:this.onSplitPartClick,onMouseDown:this.onDownSplitPart,onPointerDown:this.onDownSplitPart,dir:t,"aria-label":"menu toggling button"}),this.renderPopup(e)),this.showLicenseWatermark&&c.createElement(n.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?n.dispatchEvent(this.props.onButtonClick,e,this,void 0):n.dispatchEvent(this.props.onItemClick,e,this,{item:this.buttonsData[t],itemIndex:t}))}renderPopup(e){const{popupSettings:t={}}=this.props,{focusedIndex:s}=this.state;return c.createElement(o.Popup,{anchor:this.wrapper,show:this.opened,animate:t.animate,popupClass:n.classNames("k-menu-popup",t.popupClass),anchorAlign:t.anchorAlign||g(e),popupAlign:t.popupAlign||b(e),style:e?{direction:"rtl"}:void 0,onClose:this.onPopupClose},c.createElement("ul",{role:"menu",id:this.guid,"aria-labelledby":"button-"+this.guid,tabIndex:-1,ref:this.listRef,"aria-activedescendant":s>=0?`${this.guid}-${s}`:void 0,className:n.classNames("k-menu-group",{[`k-menu-group-${n.kendoThemeMaps.sizeMap[this.props.size]||this.props.size}`]:this.props.size})},this.renderChildItems()))}renderChildItems(){const{item:e,itemRender:t,textField:s}=this.props;return this.buttonsData.length>0?this.buttonsData.map((o,r)=>c.createElement(m,{className:n.classNames("k-menu-item",{"k-first":0===r},{"k-last":r===this.buttonsData.length-1}),dataItem:o,textField:s,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}};k.propTypes={accessKey:s.string,ariaLabel:s.string,title:s.string,onButtonClick:s.func,onFocus:s.func,onBlur:s.func,onItemClick:s.func,onOpen:s.func,onClose:s.func,text:s.string,items:s.arrayOf(s.any),textField:s.string,tabIndex:s.number,disabled:s.bool,icon:s.string,svgIcon:n.svgIconPropType,imageUrl:s.string,popupSettings:s.object,itemRender:s.any,item:s.func,className:s.string,buttonClass:s.string,dir:s.string,size:s.oneOf(["small","medium","large"]),rounded:s.oneOf(["small","medium","large","full"]),fillMode:s.oneOf(["flat","link","outline","solid","clear"]),themeColor:s.oneOf(["base","primary","secondary","tertiary","info","success","warning","error","dark","light","inverse"])},k.defaultProps={size:void 0,rounded:void 0,fillMode:void 0,themeColor:void 0};let C=k;const I=class extends c.Component{render(){return null}};I.propTypes={text:s.string,icon:s.string,iconClass:s.string,imageUrl:s.string,selected:s.bool,disabled:s.bool,render:s.any};let x=I;const w=class extends c.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!==n.Keys.down?this.opened&&e.keyCode===n.Keys.up&&(e.preventDefault(),this.setState({focusedIndex:-1}),this.setOpen(!1,e)):(e.preventDefault(),this.setOpen(!0,e),this.setState({focusedIndex:0})));const s={...this.state};if(e.keyCode===n.Keys.enter||e.keyCode===n.Keys.space){e.preventDefault(),t>=0&&this.dispatchClickEvent(e,t);const s=!this.opened;return this.setState({focused:!0,focusedIndex:s?0:-1}),void this.setOpen(s,e)}if(this.opened&&e.keyCode===n.Keys.esc)return this.setState({focusedIndex:-1}),void this.setOpen(!1,e);if(this.opened){const o=v(t,e.keyCode,e.altKey,this.buttonsData.length);s.focusedIndex=o;const r=e.keyCode===n.Keys.up||e.keyCode===n.Keys.down||e.keyCode===n.Keys.left||e.keyCode===n.Keys.right;!e.altKey&&(r||e.keyCode===n.Keys.home||e.keyCode===n.Keys.end)&&e.preventDefault()}this.setState(s)},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}),n.dispatchEvent(this.props.onFocus,e,this,void 0))},this.handleButtonBlur=e=>{this.opened||(this.setState({focused:!1}),n.dispatchEvent(this.props.onBlur,e,this,void 0))},this.handleMenuBlur=e=>{this.skipFocus||(this.setState({focused:!1,focusedIndex:-1}),n.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=>{n.getActiveElement(document)===this.list&&e.preventDefault()},this.mouseDown=e=>{e.preventDefault();const t=n.getActiveElement(document);this.element&&t!==this.element&&t!==this.list&&this.element.focus()},this.onPopupClose=e=>{var t;const s=n.getActiveElement(document);this.element&&this.element.removeAttribute("tabindex"),(s===this.list||null!=(t=this.list)&&t.contains(s))&&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(n.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)=>{n.dispatchEvent(t?this.props.onOpen:this.props.onClose,e,this,void 0),this.openedDuringOnChange=void 0},this.showLicenseWatermark=!n.validatePackage(y,{component:"DropDownButton"}),this.licenseMessage=n.getLicenseMessage(y)}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,s=e?"rtl":void 0,{id:o,style:r,tabIndex:i,disabled:a,size:l,rounded:u,fillMode:p,themeColor:m,ariaLabel:h,title:f,accessKey:v,icon:g,svgIcon:b,iconClass:y,buttonClass:k,className:C,imageUrl:I,startIcon:w,endIcon:E}=this.props;return this.buttonsData=this.props.items||c.Children.toArray(this.props.children).filter(e=>e&&e.type===x).map(e=>e.props),c.createElement(c.Fragment,null,c.createElement(d,{id:o,size:l,style:r,rounded:u,fillMode:p,themeColor:m,onClick:this.onClickMainButton,onMouseDown:this.mouseDown,onKeyDown:this.onKeyDown,onFocus:this.handleFocus,onBlur:this.handleButtonBlur,"aria-disabled":a?"true":void 0,tabIndex:i,accessKey:v,icon:g,svgIcon:b,iconClass:y,className:n.classNames(k,C,n.uDropDownButton.wrapper({c:t,focused:this.state.focused,disabled:a})),imageUrl:I,dir:s,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:w,endIcon:E},this.props.text),this.showLicenseWatermark&&c.createElement(n.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)||n.dispatchEvent(this.props.onItemClick,e,this,{item:this.buttonsData[t],itemIndex:t})}renderPopup(e){const{popupSettings:t={},_zIndex:s,unstyled:r}=this.props,i=s?s+2e3:12e3,a=r&&r.uDropDownButton,{focusedIndex:l}=this.state;return c.createElement(n.ZIndexContext.Provider,{value:i},c.createElement(o.Popup,{anchor:this.mainButton,show:this.opened,animate:t.animate,popupClass:n.classNames(n.uDropDownButton.popup({c:a}),t.popupClass),anchorAlign:t.anchorAlign||g(e),popupAlign:t.popupAlign||b(e),style:e?{direction:"rtl"}:void 0,onClose:this.onPopupClose},c.createElement("ul",{role:"list",id:this.guid,tabIndex:-1,"aria-activedescendant":l>=0?`${this.guid}-${l}`:void 0,ref:this.listRef,onKeyDown:this.onKeyDown,onBlur:this.handleMenuBlur,className:n.classNames(n.uDropDownButton.ul({c:a,size:this.props.size}))},this.renderChildItems())))}renderChildItems(){const{item:e,itemRender:t,textField:s,unstyled:o}=this.props,r=o&&o.uDropDownButton;return this.buttonsData.length>0?this.buttonsData.map((o,i)=>c.createElement(m,{className:n.classNames(n.uDropDownButton.item({c:r}),o.className,{"k-first":0===i},{"k-last":i===this.buttonsData.length-1}),dataItem:o,textField:s,focused:this.state.focusedIndex===i,onClick:this.onItemClick,onDown:this.onItemDown,render:t,item:e,index:i,key:i,id:`${this.guid}-${i}`})):null}isItemDisabled(e){return this.buttonsData[e]?this.buttonsData[e].disabled:this.props.disabled}isRtl(){return void 0!==this.props.dir?"rtl"===this.props.dir:!!this.mainButton&&"rtl"===getComputedStyle(this.mainButton).direction}};w.propTypes={accessKey:s.string,ariaLabel:s.string,title:s.string,onFocus:s.func,onBlur:s.func,onClick:s.func,onItemClick:s.func,onOpen:s.func,onClose:s.func,items:s.arrayOf(s.any),textField:s.string,tabIndex:s.number,disabled:s.bool,icon:s.string,svgIcon:n.svgIconPropType,iconClass:s.string,imageUrl:s.string,popupSettings:s.object,itemRender:s.func,item:s.func,className:s.string,buttonClass:s.string,dir:s.string,size:s.oneOf(["small","medium","large"]),rounded:s.oneOf(["small","medium","large","full"]),fillMode:s.oneOf(["flat","link","outline","solid","clear"]),themeColor:s.oneOf(["base","primary","secondary","tertiary","info","success","warning","error","dark","light","inverse"])},w.defaultProps={size:void 0,rounded:void 0,fillMode:void 0,themeColor:void 0};let E=w;const D=n.createPropsContext(),N=n.withIdHOC(n.withPropsContext(D,n.withUnstyledHOC(n.withZIndexContext(E))));N.displayName="KendoReactDropDownButton";const S=":not(.k-dropdownlist button):not(.k-colorpicker button):not(.k-split-button .k-split-button-arrow)",B=["button"+S,".k-button-group > button"+S,".k-colorpicker",".k-dropdownlist"],K=e=>c.createElement("div",{ref:e._ref,className:n.classNames("k-toolbar-separator k-separator",e.className)}),R="prevArrow.title",O="nextArrow.title",M="moreButtonTitle.title",z={[R]:"Previous scroll button",[O]:"Next scroll button",[M]:"More button"},F=e=>{const t=i.useLocalization(),{disabled:s,type:o,scrollContentRef:a,buttonScrollSpeed:l,prevButton:d,nextButton:u}=e,p="prev"===o?d||"span":u||"span";return c.createElement(p,{className:n.classNames("k-button","k-button-base","k-rounded-md","k-icon-button",`k-toolbar-${o}`,{"k-disabled":s}),title:`${"prev"===o?t.toLanguageString(R,z[R]):t.toLanguageString(O,z[O])}`,"aria-hidden":!0,tabIndex:s?-1:void 0,onClick:e=>{a&&a.current&&l&&a.current.scrollBy({left:"next"===o?l:-l,behavior:"smooth"})}},c.createElement(n.SvgIcon,{icon:"prev"===o?r.caretAltLeftIcon:r.caretAltRightIcon,className:"k-button-icon"}))},P=e=>{const{scrollButtons:t,scrollButtonsPosition:s,isOverflowing:n,scrollContentRef:o,buttonScrollSpeed:r,dir:i,isScrollStartPosition:a,isScrollEndPosition:l,prevButton:d,nextButton:u,children:p}=e,m=(e,t)=>c.createElement(F,{type:e,disabled:t,scrollContentRef:o,buttonScrollSpeed:r,prevButton:d,nextButton:u}),h="visible"===t||"auto"===t&&n;return c.createElement(c.Fragment,null,h&&"split"===s&&c.createElement(c.Fragment,null,m("rtl"!==i?"prev":"next",a),c.createElement(K,{className:"k-toolbar-button-separator"})),h&&"start"===s&&c.createElement(c.Fragment,null,m("rtl"!==i?"prev":"next",a),m("rtl"!==i?"next":"prev",l),c.createElement(K,{className:"k-toolbar-button-separator"})),c.createElement("span",{className:"k-toolbar-items k-toolbar-items-scroll",ref:o},p),h&&"split"===s&&c.createElement(c.Fragment,null,c.createElement(K,{className:"k-toolbar-button-separator"}),m("rtl"!==i?"next":"prev",l)),h&&"end"===s&&c.createElement(c.Fragment,null,c.createElement(K,{className:"k-toolbar-button-separator"}),m("rtl"!==i?"prev":"next",a),m("rtl"!==i?"next":"prev",l)))},T=e=>{var t;const{toolbarRef:s,children:a,fillMode:l,size:u}=e,[p,m]=c.useState(!1),h=c.useRef(c.Children.toArray(a).filter(e=>c.isValidElement(e)).map((e,t)=>c.cloneElement(e,{key:e.key||t}))),f=c.useRef([]),v=c.useRef(0),g=c.useRef(null),b=c.useRef(null),y=i.useLocalization(),[k,C]=c.useReducer(e=>e+1,0),I=()=>{if(!s.current)return;let e=0;const t=s.current.clientWidth,n=parseInt(window.getComputedStyle(s.current).gap||"0",10),o=Array.from(s.current.children).reduce((e,t,s)=>e+=Math.ceil(t.clientWidth),0),r=Array.from(s.current.children).length;if(e=o+r*n+2*n,e>t){const e=[...h.current],s=e.pop();v.current=t,h.current=e,s&&(f.current=[s,...f.current])}else if(t>v.current+n*r){const e=[...f.current],s=e.shift();f.current=e,s&&(h.current=[...h.current,s]),v.current=t}C()};c.useEffect(()=>{I();const e=new ResizeObserver(I),t=s.current;return t&&e.observe(t),()=>{t&&e.unobserve(t)}},[]);return c.createElement(c.Fragment,null,h.current.length>0&&h.current,f.current.length>0&&c.createElement(c.Fragment,null,c.createElement(K,{_ref:b,className:"k-toolbar-button-separator"}),c.createElement(d,{ref:g,className:"k-toolbar-overflow-button",fillMode:"flat",svgIcon:r.moreHorizontalIcon,title:y.toLanguageString(M,z[M]),onClick:()=>{m(!p)}}),c.createElement(o.Popup,{anchor:s.current,show:p,popupClass:"k-toolbar-popup",style:{width:null==(t=s.current)?void 0:t.offsetWidth}},c.createElement("span",{className:`k-toolbar-items-list k-toolbar-items-list-${n.kendoThemeMaps.sizeMap[u]} k-toolbar-items-list-${l}`},f.current.length>0&&f.current))))},A=c.forwardRef((e,t)=>{const{children:s,className:o,id:r,ariaLabel:i,keyboardNavigation:a,role:l,onResize:d,style:u,tabIndex:p=L.tabIndex,size:m=L.size,fillMode:h=L.fillMode,overflow:f,scrollButtons:v=L.scrollButtons,scrollButtonsPosition:g=L.scrollButtonsPosition,buttonScrollSpeed:b=L.buttonScrollSpeed,prevButton:y,nextButton:k,_ariaControls:C}=e,I=c.useRef(!1),x=c.useRef(null),w=c.useRef(null),E=c.useRef(0),D=c.useRef(0),N=c.useRef([]),S=c.useRef({element:null,props:e}),[K,R]=c.useState(!1),[O,M]=c.useState(!0),[z,F]=c.useState(!1),A=n.useDir(x,e.dir),$=c.useMemo(()=>e.buttons||B,[e.buttons]),W=c.useMemo(()=>$.map(e=>e+":focus").join(","),[$]),H=()=>{const e=x.current&&x.current.querySelector(W);return Math.max(0,N.current.findIndex(t=>t===e))};c.useImperativeHandle(S,()=>({element:x.current,props:e})),c.useImperativeHandle(t,()=>S.current),c.useEffect(()=>(window.addEventListener("resize",q),x.current&&(D.current=x.current.offsetWidth,E.current=x.current.offsetHeight,!1!==a&&(N.current=Array.from(x.current.querySelectorAll($.join(","))),U(0))),()=>{window.removeEventListener("resize",q),N.current.length=0}),[]),c.useEffect(()=>{if(I.current){if(!x.current||!1===a)return;N.current=Array.from(x.current.querySelectorAll($.join(","))),U(H()),V()}else I.current=!0});const U=e=>{N.current.forEach((t,s)=>{t.tabIndex=s===e?p:-1})},j=(e,t)=>{const s=N.current[t];if(s){s.tabIndex=p,s.focus();const t=N.current[e];t&&(t.tabIndex=-1)}},q=e=>{if(!x.current)return;const t=x.current.offsetWidth,s=x.current.offsetHeight;if(D.current!==t||E.current!==s){D.current=t,E.current=s;const n={offsetWidth:D.current,offsetHeight:E.current};d&&d.call(void 0,{target:S.current,...n,nativeEvent:e})}V()},V=c.useCallback(()=>{const e=w.current;e&&R(e.scrollWidth>e.clientWidth||e.scrollHeight>e.clientHeight)},[]),G=c.useCallback(()=>{const e=w.current;if(e){const t=0===e.scrollLeft,s="rtl"!==A?e.scrollLeft+e.clientWidth===e.scrollWidth:e.clientWidth-e.scrollLeft===e.scrollWidth;t&&M(!0),s&&F(!0),!t&&!s&&(M(!1),F(!1))}},[A]);return c.useEffect(()=>{const e=w.current;if(e)return e.addEventListener("scroll",G),()=>{e.removeEventListener("scroll",G)}},[G]),c.createElement("div",{id:r,"aria-label":i,"aria-controls":C,className:n.classNames("k-toolbar",{[`k-toolbar-${n.kendoThemeMaps.sizeMap[m]||m}`]:m,[`k-toolbar-${h}`]:h,"k-toolbar-scrollable":"scroll"===f,"k-toolbar-scrollable-overlay":"scroll"===f&&("hidden"===v||void 0===v),"k-toolbar-scrollable-start":"scroll"===f&&"hidden"===v&&O,"k-toolbar-scrollable-end":"scroll"===f&&"hidden"===v&&z,"k-toolbar-section":e.overflow&&"section"===f},o),style:u,role:void 0!==l?l||void 0:"toolbar",dir:A,ref:x,onKeyDown:!1!==a?e=>{const t=e.keyCode===n.Keys.left||e.keyCode===n.Keys.right||e.keyCode===n.Keys.home||e.keyCode===n.Keys.end,s=H();!t||e.defaultPrevented||-1===N.current.findIndex(t=>t===e.target)||(e.keyCode===n.Keys.left?j(s,0===s?N.current.length-1:s-1):j(s,s===N.current.length-1?0:s+1),e.keyCode===n.Keys.home&&j(s,0),e.keyCode===n.Keys.end&&j(s,N.current.length-1))}:void 0},"scroll"===f&&c.createElement(P,{scrollButtons:v,scrollButtonsPosition:g,prevButton:y,nextButton:k,isOverflowing:K,scrollContentRef:w,buttonScrollSpeed:b,dir:A,isScrollStartPosition:O,isScrollEndPosition:z,children:s}),"section"===f&&c.createElement(T,{toolbarRef:x,fillMode:h,size:m},s),("none"===f||void 0===f)&&s)}),L={tabIndex:0,size:void 0,fillMode:void 0,scrollButtons:"auto",scrollButtonsPosition:"split",buttonScrollSpeed:100};A.displayName="KendoReactToolbar",A.propTypes={tabIndex:s.number,dir:s.string,keyboardNavigation:s.bool,style:s.object,className:s.string,role:s.string,onResize:s.func,buttons:s.arrayOf(s.string.isRequired),size:s.oneOf(["small","medium","large"]),fillMode:s.oneOf(["solid","flat","outline"]),overflow:s.oneOf(["none","section","scroll"]),scrollButtons:s.oneOf(["hidden","visible","auto"]),scrollButtonsPosition:s.oneOf(["start","end","split"]),buttonScrollSpeed:s.number};const $=c.forwardRef((e,t)=>{const{id:s,className:o,style:r,children:i}=e,a=c.useRef(null);return c.useImperativeHandle(t,()=>({element:a.current})),c.createElement("div",{id:s,className:n.classNames("k-toolbar-item",o),style:r,ref:a},i)});$.displayName="KendoReactToolbarItem",$.propTypes={className:s.string};const W=c.forwardRef((e,t)=>{const s=c.useRef(null),o=c.useRef(null);c.useImperativeHandle(o,()=>({element:s.current})),c.useImperativeHandle(t,()=>({element:s.current}));const r=c.useMemo(()=>n.classNames("k-spacer",e.className),[e.className]);return c.createElement("span",{ref:s,className:r})});W.displayName="KendoReactToolbarSpacer",W.propTypes={className:s.string};const H=t.createContext([null,e=>{}]),U=t.createContext([null,e=>{}]),j=t.createContext([null,e=>{}]);var q=(e=>(e.next="next",e.prev="prev",e.current="current",e.reset="reset",e))(q||{});var V=(e=>(e.remove="remove",e.add="add",e.reorder="reorder",e))(V||{});var G=(e=>(e.toggle="toggle",e.remove="remove",e))(G||{});const Z=c.forwardRef((e,t)=>{const s=c.useRef(null),o=c.useRef(null),{disabled:i=J.disabled,fillMode:a=J.fillMode,themeColor:l=J.themeColor,size:d=J.size,rounded:u=J.rounded,dir:p=J.dir,removeIcon:m=J.removeIcon,removeSvgIcon:h=J.removeSvgIcon,removable:f=J.removable}=e,v=n.useDir(o,p);c.useImperativeHandle(s,()=>({element:o.current,props:e})),c.useImperativeHandle(t,()=>s.current);const[g,b]=c.useContext(H),[y,k]=c.useContext(U),[,C]=c.useContext(j),I=c.useMemo(()=>e.selected||(Array.isArray(g)?g.some(t=>t===e.value):g===e.value),[e.selected,e.value,g]),x=c.useMemo(()=>y===e.value,[e.value,y]);c.useEffect(()=>{x&&o.current&&o.current.focus()},[x]);const w=c.useCallback(t=>{b({type:G.toggle,payload:e.value,event:t})},[b,e.value]),E=c.useCallback(t=>{f&&(C({type:V.remove,payload:e.value,event:t}),k({type:q.reset,payload:e.value,event:t}),b({type:G.remove,payload:e.value,event:t}),e.onRemove&&e.onRemove.call(void 0,{target:s.current,syntheticEvent:t}))},[e.onRemove,e.value,f,C,k,b]),D=c.useCallback(t=>{switch(t.keyCode){case n.Keys.left:k({type:q.prev,payload:e.value,event:t});break;case n.Keys.right:k({type:q.next,payload:e.value,event:t});break;case n.Keys.enter:b({type:G.toggle,payload:e.value,event:t});break;case n.Keys.delete:E(t)}e.onKeyDown&&e.onKeyDown.call(void 0,{target:s.current,syntheticEvent:t})},[e.onKeyDown,e.value,k,b,E]),N=c.useCallback(t=>{k({payload:e.value,type:q.current,event:t}),e.onFocus&&e.onFocus.call(void 0,{target:s.current,syntheticEvent:t})},[e.onFocus,e.value,k]),S=c.useCallback(t=>{e.onBlur&&e.onBlur.call(void 0,{target:s.current,syntheticEvent:t})},[e.onBlur]),B=n.useMouse(e,s,{onClick:w});return c.createElement("div",{...B,role:e.role||"button",id:e.value,style:e.style,ref:o,dir:v,tabIndex:n.getTabIndex(e.tabIndex,i,void 0),className:n.classNames("k-chip",{"k-rtl":"rtl"===v,"k-disabled":i,"k-selected":I,"k-focus":x,[`k-chip-${n.kendoThemeMaps.sizeMap[d]||d}`]:d,[`k-rounded-${n.kendoThemeMaps.roundedMap[u]||u}`]:u,[`k-chip-${a}`]:a,[`k-chip-${a}-${l}`]:!(!a||!l)},e.className),"aria-pressed":e.role?void 0:I,"aria-disabled":i,"aria-describedby":e.ariaDescribedBy,"aria-keyshortcuts":f?"Enter Delete":void 0,onFocus:N,onBlur:S,onKeyDown:D},I&&(e.selectedIcon||e.selectedSvgIcon)&&c.createElement(n.IconWrap,{className:"k-chip-icon",name:e.selectedIcon?n.toIconName(e.selectedIcon):void 0,icon:e.selectedSvgIcon,size:"small"}),(e.icon||e.svgIcon)&&c.createElement(n.IconWrap,{className:"k-chip-icon",name:e.icon?n.toIconName(e.icon):void 0,icon:e.svgIcon,size:"small"}),e.avatar&&c.createElement("div",{className:n.classNames("k-chip-avatar","k-avatar",e.avatar.rounded&&`k-rounded-${e.avatar.rounded}`),style:e.avatar.style},c.createElement("span",{className:"k-avatar-image"},c.createElement("img",{src:e.avatar.image,alt:e.avatar.imageAlt}))),c.createElement("span",{className:"k-chip-content"},void 0!==e.children?e.children:e.text&&c.createElement("span",{"aria-label":e.ariaLabel||e.text,className:"k-chip-label"},e.text)),f&&c.createElement("span",{className:"k-chip-actions"},c.createElement("span",{className:n.classNames("k-chip-action","k-chip-remove-action"),onClick:E},c.createElement(n.IconWrap,{name:m?n.toIconName(m):void 0,icon:h||r.xCircleIcon,size:"small"}))))}),_={id:s.string,text:s.string,value:s.any,dir:s.oneOf(["ltr","rtl"]),removable:s.bool,removeIcon:s.string,removeIconSvg:n.svgIconPropType,disabled:s.bool,icon:s.string,svgIcon:n.svgIconPropType,selectedIcon:s.string,selectedIconSvg:n.svgIconPropType,onRemove:s.func,dataItem:s.any,selected:s.bool,ariaDescribedBy:s.string,size:s.oneOf(["small","medium","large"]),rounded:s.oneOf(["small","medium","large","full"]),fillMode:s.oneOf(["outline","solid"]),themeColor:s.oneOf(["base","info","success","warning","error"])},J={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};Z.displayName="KendoReactChip",Z.propTypes=_;const Q=(e,t,s)=>{"multiple"===t.selection?Array.isArray(e)||(e=e?[e]:null):"single"===t.selection&&Array.isArray(e)&&(e=e?e.join(""):null);const[n,o]=c.useState(e);return[n,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||n,{...e,...t});s&&s(r,e.event),"none"!==t.selection&&o(r)}]},X=c.forwardRef((e,t)=>{const s=c.useRef(null),o=c.useRef(null),{id:r,style:i,tabIndex:a,className:l,ariaDescribedBy:d,ariaLabelledBy:u,ariaLabel:p,value:m,defaultData:h=ee.defaultData,chip:f=ee.chip,disabled:v=ee.disabled,size:g=ee.size,defaultValue:b=ee.defaultValue,selection:y=ee.selection,valueField:k=ee.valueField,textField:C=ee.textField,dir:I=ee.dir,onChange:x,onDataChange:w}=e,E=n.useDir(o,I),D=c.useMemo(()=>f||Z,[f,Z]);c.useImperativeHandle(s,()=>({element:o.current,props:e})),c.useImperativeHandle(t,()=>s.current);const N=c.useCallback((e,t)=>{x&&s.current&&x.call(void 0,{value:e,target:s.current,syntheticEvent:t})},[x]),[S,B]=Q(m||b,{selection:y,state:m},N),K=c.useCallback((e,t)=>{w&&s.current&&w.call(void 0,{value:e,target:s.current,syntheticEvent:t})},[w]),[R,O]=((e,t,s)=>{const[n,o]=c.useState(e);return[n,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||n,{...e,...t});s&&s(r,e.event),o(r)}]})(e.data||h,{state:e.data,valueField:k},K),M=c.useCallback((e,t)=>(e.push(t[k]),e),[k]),z=c.useMemo(()=>e.data||R,[e.data,R]),F=c.useMemo(()=>m||S,[m,S]),P=c.useMemo(()=>z.reduce(M,[]),[z,M]),T=c.useCallback(e=>n.getter(k)(e),[k]),A=c.useCallback(e=>n.getter(C)(e),[C]),[L,$]=(e=>{const[t,s]=c.useState(null);return[t,t=>{const n=((e,t)=>{const s=t.items.findIndex(t=>t===e);switch(t.type){case"next":return s===t.items.length-1?e:t.items[s+1];case"prev":return 0===s?e:t.items[s-1];case"current":return t.payload;case"reset":return null;default:return e}})(t.payload,{...t,...e});s(n)}]})({items:P}),W=n.useMouse(e,s);return c.createElement(H.Provider,{value:[F,B]},c.createElement(U.Provider,{value:[L,$]},c.createElement(j.Provider,{value:[z,O]},c.createElement("div",{ref:o,...W,role:v?void 0:"listbox",id:r,dir:E,style:i,tabIndex:n.getTabIndex(a,v,void 0),className:n.classNames("k-chip-list",{"k-rtl":"rtl"===E,"k-disabled":v,[`k-chip-list-${n.kendoThemeMaps.sizeMap[g]||g}`]:g},l),"aria-label":p,"aria-labelledby":u,"aria-describedby":d,"aria-orientation":"horizontal","aria-multiselectable":"multiple"===y},z.map((e,t)=>c.createElement(D,{role:"option",dataItem:e,size:g,key:[T(e),t].join("-"),text:A(e),value:T(e),ariaLabel:e.ariaLabel,svgIcon:e.svgIcon||void 0}))))))}),Y={id:s.string,className:s.string,tabIndex:s.number,data:s.any,defaultData:s.arrayOf(s.any),onDataChange:s.func,value:s.oneOfType([s.any,s.arrayOf(s.any)]),defaultValue:s.oneOfType([s.any,s.arrayOf(s.any)]),onChange:s.func,selection:s.oneOf(["single","none","multiple"]),textField:s.string,valueField:s.string,disabled:s.bool,dir:s.oneOf(["ltr","rtl"]),ariaLabelledBy:s.string,ariaDescribedBy:s.string,size:s.oneOf(["small","medium","large"])},ee={chip:Z,size:void 0,disabled:!1,defaultValue:null,defaultData:[],dir:"ltr",selection:"none",textField:"text",valueField:"value"};X.displayName="KendoReactChipList",X.propTypes=Y;const te=c.forwardRef((e,t)=>{const{className:s,disabled:o,text:r,icon:i,style:a,id:l,focused:d,tabIndex:u,index:p,dataItem:m,item:h,svgIcon:f,onDown:v,onClick:g,...b}=e,y=c.useRef(null),k=c.useCallback(()=>{y.current&&y.current.focus()},[]),C=c.useCallback(()=>({element:y.current,focus:k}),[k]);c.useImperativeHandle(t,C);const I=c.useCallback(e=>{g&&void 0!==p&&!o&&g(e,p)},[g,p]),x=c.useMemo(()=>n.classNames("k-fab-item",{"k-focus":d,"k-disabled":o},s),[s,o,d]),w=h;return c.createElement("li",{ref:y,id:l,className:x,style:a,role:"menuitem",tabIndex:n.getTabIndex(u,o),"aria-disabled":o,"aria-label":`${r||""} floatingactionbutton item`,onClick:I,onMouseDown:v,onPointerDown:v,...b},w?c.createElement(w,{itemIndex:p,item:m}):c.createElement(c.Fragment,null,r&&c.createElement("span",{className:"k-fab-item-text"},r),i||f?c.createElement(n.IconWrap,{className:"k-fab-item-icon",name:i,icon:f}):null))});te.propTypes={className:s.string,style:s.object,children:s.any,disabled:s.bool,focused:s.bool,index:s.number,icon:s.string,svgIcon:n.svgIconPropType,text:s.string,tabIndex:s.number,customProp:s.any},te.displayName="KendoFloatingActionButtonItem";const se="16px",ne=e=>"number"==typeof e?e+"px":e,oe=(e,t)=>{const s={horizontal:t?"right":"left",vertical:"bottom"};return"end"===e.horizontal&&(s.horizontal=t?"left":"right"),s},re=(e,t)=>{const s={horizontal:t?"right":"left",vertical:"top"};return"end"===e.horizontal&&(s.horizontal=t?"left":"right"),s},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"]),ae=(e,t,s,n)=>{const o=t.horizontal,r=t.vertical;if(e.current){const i=s&&void 0!==s.x?ne(s.x):se,a=s&&void 0!==s.x?`calc(50% + ${ne(s.x)})`:"50%",l=s&&void 0!==s.y?ne(s.y):se,c=s&&void 0!==s.y?`calc(50% + ${ne(s.y)})`:"50%";e.current.style.setProperty(le(t,n),"center"===o?a:i),e.current.style.setProperty(ce(t),"middle"===r?c:l),n&&(("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"))}},le=(e,t)=>{const{horizontal:s}=e;return{end:t?"left":"right",center:"left",start:t?"right":"left"}[s||"end"]},ce=e=>({top:"top",middle:"top",bottom:"bottom"}[e.vertical||"bottom"]),de=c.forwardRef((e,t)=>{const{align:s=ue.align,alignOffset:r,className:i,disabled:a,icon:l,svgIcon:d,iconClass:u,id:p,items:m,item:h,text:f,positionMode:v=ue.positionMode,size:g=ue.size,style:b,rounded:y=ue.rounded,themeColor:k=ue.themeColor,overlayStyle:C,tabIndex:I,accessKey:x,popupSettings:w={},modal:E,onClick:D,onItemClick:N,onFocus:S,onBlur:B,onKeyDown:K,onOpen:R,onClose:O,...M}=e,z=n.useZIndexContext(),F=z?z+2:100,P=c.useRef(null),T=c.useRef(null),A=c.useRef(null),L=c.useRef(null),$=c.useCallback(()=>{T.current&&T.current.focus()},[]),W=c.useCallback(()=>({element:T.current,focus:$}),[$]);c.useImperativeHandle(P,W),c.useImperativeHandle(t,()=>P.current);const[H,U]=c.useState(!1),[j,q]=c.useState(!1),[V,G]=c.useState(-1),Z=n.useId()+"-button-id",_=n.useDir(T,e.dir),J="rtl"===_,Q=n.useId()+"-list-id";c.useEffect(()=>{ae(T,s,r,J)},[T,s,r,J]),c.useEffect(()=>{j&&T&&T.current&&T.current.focus()},[j,T]);const X=c.useCallback((e,t)=>{m&&n.dispatchEvent(t?R:O,e,W(),void 0)},[R,O,m]),Y=c.useCallback(e=>{!e.target||a||(!m&&D?n.dispatchEvent(D,e,W(),void 0):(U(!H),q(!0),G(H?-1:0),X(e,!H)))},[U,q,G,D,X,H,m,a]),ee=c.useCallback(e=>{q(!0),G(H?0:-1),S&&n.dispatchEvent(S,e,W(),void 0)},[S,q,G]),se=c.useCallback(e=>{q(!1),U(!1),G(-1),n.dispatchEvent(B,e,W(),void 0),H&&X(e,!1)},[B,q,U,G,X]),ne=c.useCallback(e=>{e.preventDefault()},[]),le=c.useCallback((e,t)=>{m&&(m[t].disabled||n.dispatchEvent(N,e,W(),{itemProps:m[t],itemIndex:t}))},[N]),ce=c.useCallback((e,t)=>{!e.target||!m||(G(t),U(!1),le(e,t),X(e,!1))},[G,U,le,X]),de=c.useCallback(e=>{n.getActiveElement(document)===T.current&&e.preventDefault()},[T]),pe=c.useCallback(e=>{const t=V,s=m?m.length:-1;if(e.altKey)return!H&&e.keyCode===n.Keys.down&&(e.preventDefault(),U(!0),G(0)),void(H&&e.keyCode===n.Keys.up&&(e.preventDefault(),U(!1),G(-1)));switch(e.keyCode){case n.Keys.enter:case n.Keys.space:t>=0&&le(e,t),m||Y(e),e.preventDefault(),U(!H),G(H?-1:0);break;case n.Keys.esc:e.preventDefault(),U(!1),G(-1);break;case n.Keys.home:e.preventDefault(),G(0);break;case n.Keys.end:e.preventDefault(),G(s-1);break;case n.Keys.down:case n.Keys.right:e.preventDefault(),G(t+1>=s?0:t+1);break;case n.Keys.up:case n.Keys.left:e.preventDefault(),G(t-1<0?s-1:t-1)}n.dispatchEvent(K,e,W(),void 0)},[K,V,G,J,U]),me=c.useMemo(()=>n.classNames("k-fab",{"k-fab-sm":"small"===g,"k-fab-md":"medium"===g,"k-fab-lg":"large"===g,"k-disabled":a,"k-pos-absolute":"absolute"===v,"k-pos-fixed":"fixed"===v,"k-focus":j,[`k-rounded-${n.kendoThemeMaps.roundedMap[y]||y}`]:y,"k-fab-solid":k,[`k-fab-solid-${k}`]:k},`k-${s.vertical}-${s.horizontal}`,i),[k,g,y,a,v,s,j,i]),he=m&&m.map((e,t)=>c.createElement(te,{...e,key:t,index:t,id:`${Q}-${t}`,disabled:a||e.disabled,focused:V===t,dataItem:e,item:h,className:n.classNames(e.className,ie(_||"ltr",s.horizontal)),onClick:ce,onDown:de})),fe=!(!l&&!d||f),ve=(T.current?T.current.offsetWidth:0)/2-16;let ge;return ge=l||d?c.createElement(n.IconWrap,{className:"k-fab-icon",name:l,icon:d}):u?c.createElement("span",{role:"presentation",className:u}):null,c.createElement(n.ZIndexContext.Provider,{value:F},c.createElement(c.Fragment,null,c.createElement("button",{ref:T,id:p||Z,role:"button",type:"button","aria-disabled":a,"aria-expanded":m?H:void 0,"aria-haspopup":!!m,"aria-label":`${f||""} floatingactionbutton`,"aria-owns":m?Q:void 0,"aria-activedescendant":V>=0&&m?`${Q}-${V}`:void 0,tabIndex:n.getTabIndex(I,a),accessKey:x,dir:_,disabled:a,className:me,style:b,onClick:Y,onMouseDown:ne,onFocus:ee,onBlur:se,onKeyDown:pe,...M},ge,f&&c.createElement("span",{className:"k-fab-text"},f)),E&&H&&c.createElement("div",{className:"k-overlay",style:{zIndex:F,...C}}),c.createElement(o.Popup,{ref:L,anchor:T.current,show:H,animate:w.animate,popupClass:n.classNames("k-popup-transparent k-fab-popup",w.popupClass),anchorAlign:w.anchorAlign||oe(s,J),popupAlign:w.popupAlign||re(s,J),style:{boxShadow:"none"}},c.createElement("ul",{ref:A,role:"menu","aria-labelledby":p,id:Q,className:n.classNames("k-fab-items",{"k-fab-items-bottom":"bottom"!==s.vertical,"k-fab-items-top":"bottom"===s.vertical}),style:{paddingLeft:fe?ve:void 0,paddingRight:fe?ve:void 0}},he))))});de.propTypes={className:s.string,style:s.object,id:s.string,dir:s.string,tabIndex:s.number,accessKey:s.string,disabled:s.bool,icon:s.string,svgIcon:n.svgIconPropType,iconClass:s.string,text:s.string,alignOffset:s.shape({x:s.oneOfType([s.number,s.string]).isRequired,y:s.oneOfType([s.number,s.string]).isRequired}),align:s.shape({vertical:s.oneOf(["top","middle","bottom"]).isRequired,horizontal:s.oneOf(["start","center","end"]).isRequired}),positionMode:s.oneOf(["absolute","fixed"]),size:s.oneOf(["small","medium","large"]),rounded:s.oneOf(["small","medium","large","full"]),themeColor:s.oneOf(["primary","secondary","tertiary","info","success","warning","error","dark","light","inverse"]),modal:s.bool,overlayStyle:s.object};const ue={align:{vertical:"bottom",horizontal:"end"},size:void 0,rounded:void 0,themeColor:void 0,positionMode:"fixed"};de.displayName="KendoFloatingActionButton";const pe="speechToTextButton.ariaLabel",me="speechToTextButton.title",he={[pe]:"Start speech recognition",[me]:"Speech to Text Button"},fe=t.forwardRef((e,s)=>{const o=!n.validatePackage(y,{component:"SpeechToTextButton"}),l=n.getLicenseMessage(y),c=i.useLocalization(),{fillMode:u,rounded:p,size:m,themeColor:h,ariaLabel:f,svgIcon:v,disabled:g,iconSize:b="medium",title:k,className:C,id:I,style:x,lang:w="en-US",continuous:E=!1,interimResults:D=!1,maxAlternatives:N=1,integrationMode:S="webSpeech",onStart:B,onResult:K,onEnd:R,onError:O,...M}=e,z=t.useRef(null),F=t.useRef(!1),[P,T]=t.useState(!1),A=t.useCallback(async()=>{F.current=!0,T(!0),B&&await B()},[B]),L=t.useCallback(async()=>{F.current=!1,T(!1),R&&await R()},[R]),$=t.useCallback(e=>{const t=e.results,s=t[t.length-1],n=Array.from(s).map(e=>({transcript:e.transcript,confidence:e.confidence}));null==K||K({isFinal:s.isFinal,alternatives:n})},[K]),W=t.useCallback(e=>{T(!1),F.current=!1,null==O||O({errorMessage:e.error})},[O]),H=t.useCallback(()=>{var e;F.current||null==(e=z.current)||e.start()},[]),U=t.useCallback(()=>{var e;F.current&&(null==(e=z.current)||e.stop())},[]),j=t.useCallback(()=>{var e;F.current&&(null==(e=z.current)||e.abort(),F.current=!1,T(!1))},[]),q=()=>F.current;t.useImperativeHandle(s,()=>({start:H,stop:U,abort:j,isActive:q})),t.useEffect(()=>((()=>{var e;"undefined"==typeof window||"webkitSpeechRecognition"in window||"SpeechRecognition"in window?(null!=(e=z.current)&&e.isActive()&&z.current.stop(),z.current=new a.KendoSpeechRecognition({lang:w,continuous:E,interimResults:D,maxAlternatives:N,events:{start:A,end:L,result:$,error:W}})):O&&O({errorMessage:"Speech Recognition API is not supported in this browser."})})(),()=>{F.current&&U()}),[w,E,D,N,S]);const V=void 0!==e.icon||void 0!==e.iconClass,G=t.useMemo(()=>P?r.stopSmIcon:v||r.microphoneOutlineIcon,[P,v]);return t.createElement(t.Fragment,null,t.createElement(d,{id:I,className:n.classNames({"k-speech-to-text-button":!0,"k-listening":P},C),style:x,svgIcon:V?void 0:G,iconSize:b,fillMode:u,rounded:p,size:m,themeColor:h,"aria-label":null!=f?f:c.toLanguageString(pe,he[pe]),"aria-pressed":P,disabled:g,title:null!=k?k:c.toLanguageString(me,he[me]),onClick:()=>{P?U():H()},...M},e.children),o&&t.createElement(n.WatermarkOverlay,{message:l}))});fe.displayName="KendoSpeechToTextButton";const ve=n.withIdHOC(N);ve.displayName="KendoReactDropDownButton";const ge=n.withIdHOC(C);ge.displayName="KendoReactSplitButton",e.Button=d,e.ButtonGroup=p,e.Chip=Z,e.ChipList=X,e.DropDownButton=ve,e.DropDownButtonClassComponent=N,e.DropDownButtonItem=x,e.FloatingActionButton=de,e.FloatingActionButtonItem=te,e.SpeechToTextButton=fe,e.SplitButton=ge,e.SplitButtonClassComponent=C,e.SplitButtonItem=f,e.Toolbar=A,e.ToolbarItem=$,e.ToolbarSeparator=K,e.ToolbarSpacer=W,e.toolbarButtons=B});
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")):"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"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).KendoReactButtons={},e.React,e.PropTypes,e.KendoReactCommon,e.KendoReactPopup,e.KendoSvgIcons,e.KendoReactIntl,e.KendoWebspeechCommon)}(this,function(e,t,s,n,o,r,i,a){"use strict";function l(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(s){if("default"!==s){var n=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(t,s,n.get?n:{enumerable:!0,get:function(){return e[s]}})}}),t.default=e,Object.freeze(t)}var c=l(t);const d=c.forwardRef((e,t)=>{const{children:s,togglable:o,dir:r,disabled:i,selected:a,icon:l,iconClass:d,svgIcon:p,imageUrl:m,imageAlt:h,className:f,startIcon:v,endIcon:g,onClick:b,size:y=u.size,rounded:k=u.rounded,fillMode:C=u.fillMode,themeColor:I=u.themeColor,ariaPressed:x,iconSize:w,...E}=e,D=c.useRef(void 0),N=c.useRef(null),[S,B]=c.useState(!0===o&&!0===a),K=void 0!==p||void 0!==l||void 0!==d||void 0!==m,R=void 0!==s,O=n.useUnstyled(),M=e.unstyled||O,z=M&&M.uButton;c.useImperativeHandle(t,()=>({element:N.current,selected:void 0!==D.current?D.current:S})),c.useMemo(()=>{o&&void 0!==a&&a!==S&&B(a)},[o,a]),c.useEffect(()=>{D.current=void 0},[S]);const F=function({imageUrl:e,name:t,iconClass:s,svgIcon:o,imageAlt:r,buttonClasses:i,iconSize:a}){return e?c.createElement("img",{role:"presentation",className:n.classNames(n.uButton.icon({c:i})),alt:r,src:e}):t||o?c.createElement(n.IconWrap,{className:n.classNames(n.uButton.icon({c:i})),name:t,icon:o,size:a}):s?c.createElement("span",{role:"presentation",className:n.classNames(n.uButton.icon({c:i}),s)}):null}({name:l,svgIcon:p,iconClass:d,imageUrl:m,imageAlt:h,buttonClasses:z,iconSize:w}),P=e=>c.cloneElement(e,{className:n.classNames(n.uButton.icon({c:z}),e.props.className)}),T=c.useMemo(()=>o?S:x||void 0,[]);return c.createElement("button",{ref:N,"aria-pressed":T,...E,dir:r,disabled:i,onClick:e=>{o&&void 0===a&&(D.current=!S,B(!S)),b&&b.call(void 0,e)},className:n.classNames(n.uButton.wrapper({c:z,isRtl:"rtl"===r,selected:S,disabled:i,size:y,fillMode:C,rounded:k,themeColor:I,iconButton:!R&&K}),f)},v&&P(v),F,s&&c.createElement("span",{className:n.classNames(n.uButton.text({c:z}))},s),g&&P(g))}),u={size:void 0,rounded:void 0,fillMode:void 0,themeColor:void 0};d.displayName="KendoReactButton",d.propTypes={children:s.node,selected:s.bool,togglable:s.bool,icon:s.string,svgIcon:n.svgIconPropType,iconClass:s.string,imageUrl:s.string,imageAlt:s.string,size:s.oneOf(["small","medium","large"]),rounded:s.oneOf(["small","medium","large","full"]),fillMode:s.oneOf(["flat","link","outline","solid","clear"]),themeColor:s.oneOf(["base","primary","secondary","tertiary","info","success","warning","error","dark","light","inverse"])};const p=e=>{const{children:t,className:s,dir:o,disabled:r,width:i}=e,a=n.useUnstyled(),l=e.unstyled||a,d=l&&l.uButtonGroup,u=(e,t)=>{const s={...i?{width:i}:{},...e.props.style||{}},n=r||e.props.disabled,o={...e.props,...t?{className:t}:{},...Object.keys(s).length?{style:s}:{},...void 0!==n?{disabled:n}:{}};return c.Children.count(e.props.children)>0?c.cloneElement(e,o,e.props.children):c.cloneElement(e,o)},p=c.useRef(null),m=(e=>{const t=c.Children.count(e),s=void 0!==o?"rtl"===o:p.current&&"rtl"===getComputedStyle(p.current).direction||!1;return c.Children.map(e,(e,o)=>{if(c.isValidElement(e)){const r=o===t-1,i=s,a=n.classNames(e.props.className,n.uButtonGroup.position({c:d,start:i?r:0===o,end:i?0===o:r}));return u(e,a)}return e})})(t),h=n.classNames(n.uButtonGroup.wrapper({c:d,stretched:!!i,disabled:r}),s),f={className:h,style:{width:`${i}`},dir:o,role:"group","aria-disabled":r};return c.createElement("div",{ref:p,...f,className:h},m)};p.propTypes={children:s.oneOfType([s.arrayOf(s.element),s.element]),className:s.string,disabled:s.bool,width:s.string,dir:s.string};const m=e=>{const t=n.useUnstyled(),s=e.unstyled||t,o=s&&s.uDropDownButton,r=c.useCallback(t=>{e.onClick(t,e.index)},[e]),i=e.dataItem.render||e.item||(void 0===e.item?e.render:null),a=void 0!==e.dataItem.text?e.dataItem.text:e.textField?e.dataItem[e.textField]:e.dataItem,l=c.createElement("li",{id:e.id,className:n.classNames(n.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},c.createElement("span",{tabIndex:-1,className:n.classNames(n.uDropDownButton.link({c:o,selected:e.dataItem.selected,disabled:e.dataItem.disabled})),key:"icon"},i?c.createElement(i,{item:e.dataItem,itemIndex:e.index}):c.createElement(c.Fragment,null,(e.dataItem.icon||e.dataItem.iconClass||e.dataItem.svgIcon)&&c.createElement(n.IconWrap,{className:e.dataItem.iconClass,name:e.dataItem.icon,icon:e.dataItem.svgIcon}),e.dataItem.imageUrl&&c.createElement("img",{role:"presentation",alt:"",src:e.dataItem.imageUrl,className:"k-icon"}),a&&c.createElement("span",{className:"k-menu-link-text"},a))));return void 0!==e.item&&void 0!==e.render?e.render.call(void 0,l,e):l};m.displayName="KendoReactButtonItem";const h=class extends c.Component{render(){return null}};h.propTypes={text:s.string,icon:s.string,iconClass:s.string,imageUrl:s.string,disabled:s.bool,render:s.any};let f=h;const v=(e,t,s,o)=>{if(s)return e;const r=Math.min(o-1,Math.max(0,e));switch(t){case n.Keys.enter:case n.Keys.space:case n.Keys.esc:return-1;case n.Keys.up:case n.Keys.left:return r-1<0?o-1:r-1;case n.Keys.down:case n.Keys.right:return r+1>=o?0:r+1;case n.Keys.home:return 0;case n.Keys.end:return o-1;default:return e}};function g(e){const t={horizontal:"left",vertical:"bottom"};return e&&(t.horizontal="right"),t}function b(e){const t={horizontal:"left",vertical:"top"};return e&&(t.horizontal="right"),t}const y=Object.freeze({name:"@progress/kendo-react-buttons",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate:0,version:"13.4.0-develop.3",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"}),k=class extends c.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!==n.Keys.down?this.opened&&e.keyCode===n.Keys.up&&(e.preventDefault(),this.setState({focusedIndex:-1}),this.setOpen(!1,e)):(e.preventDefault(),this.setState({focusedIndex:0}),this.setOpen(!0,e)));let s;if(e.keyCode===n.Keys.enter||e.keyCode===n.Keys.space){if(e.preventDefault(),this.dispatchClickEvent(e,t),t>=0){s={focusedIndex:this.opened?-1:0};const t=!this.opened;this.setOpen(t,e)}}else if(this.opened&&e.keyCode===n.Keys.esc)return this.setState({focusedIndex:-1}),void this.setOpen(!1,e);if(this.opened){const o=v(t,e.keyCode,e.altKey,this.buttonsData.length);o!==t&&(s=s||{},s.focusedIndex=o);const r=e.keyCode===n.Keys.up||e.keyCode===n.Keys.down||e.keyCode===n.Keys.left||e.keyCode===n.Keys.right;!e.altKey&&(r||e.keyCode===n.Keys.home||e.keyCode===n.Keys.end)&&e.preventDefault()}s&&this.setState(s)},this.switchFocus=e=>{this.skipFocus=!0,e(),window.setTimeout(()=>this.skipFocus=!1,0)},this.onFocus=e=>{this.skipFocus||(n.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}),n.dispatchEvent(this.props.onBlur,e,this,void 0),setTimeout(()=>{this.setOpen(!1,e)},0))},this.onPopupClose=e=>{var t;const s=n.getActiveElement(document);this.element&&this.element.removeAttribute("tabindex"),(s===this.list||null!=(t=this.list)&&t.contains(s))&&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=n.getActiveElement(document);this.element&&t!==this.element&&t!==this.list&&this.element.focus()},this.onItemDown=e=>{n.getActiveElement(document)===this.list&&e.preventDefault()},this.dispatchPopupEvent=(e,t)=>{n.dispatchEvent(t?this.props.onOpen:this.props.onClose,e,this,void 0),this.openedDuringOnChange=void 0},this.showLicenseWatermark=!n.validatePackage(y,{component:"SplitButton"}),this.licenseMessage=n.getLicenseMessage(y)}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||c.Children.toArray(this.props.children).filter(e=>e&&e.type===f).map(e=>e.props);const e=this.isRtl(),t=e?"rtl":void 0,{id:s,style:o,tabIndex:i,disabled:a}=this.props;return c.createElement(c.Fragment,null,c.createElement("div",{id:s,style:o,className:n.classNames("k-split-button","k-button-group",{"k-focus":this.state.focused},this.props.rounded&&`k-rounded-${n.kendoThemeMaps.roundedMap[this.props.rounded]}`,this.props.className),onKeyDown:this.onKeyDown,onFocus:this.onFocus,onBlur:this.onBlur,dir:t,ref:e=>{this.wrapper=e}},c.createElement(d,{ref:e=>{this.mainButton=e&&e.element},type:"button",size:this.props.size,rounded:this.props.rounded,fillMode:this.props.fillMode,themeColor:this.props.themeColor,onClick:e=>this.onItemClick(e,-1),disabled:a||void 0,tabIndex:i,accessKey:this.props.accessKey,className:this.props.buttonClass,icon:this.props.icon,svgIcon:this.props.svgIcon,iconClass:this.props.iconClass,startIcon:this.props.startIcon,endIcon:this.props.endIcon,imageUrl:this.props.imageUrl,dir:t,"aria-disabled":a,"aria-haspopup":!0,"aria-expanded":this.opened||void 0,"aria-label":this.props.ariaLabel,"aria-controls":this.opened?this.guid:void 0,id:"button-"+this.guid,title:this.props.title},this.props.text),c.createElement(d,{type:"button",size:this.props.size,rounded:this.props.rounded,fillMode:this.props.fillMode,themeColor:this.props.themeColor,icon:"caret-alt-down",svgIcon:r.caretAltDownIcon,className:"k-split-button-arrow",disabled:a||void 0,tabIndex:-1,onClick:this.onSplitPartClick,onMouseDown:this.onDownSplitPart,onPointerDown:this.onDownSplitPart,dir:t,"aria-label":"menu toggling button"}),this.renderPopup(e)),this.showLicenseWatermark&&c.createElement(n.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?n.dispatchEvent(this.props.onButtonClick,e,this,void 0):n.dispatchEvent(this.props.onItemClick,e,this,{item:this.buttonsData[t],itemIndex:t}))}renderPopup(e){const{popupSettings:t={}}=this.props,{focusedIndex:s}=this.state;return c.createElement(o.Popup,{anchor:this.wrapper,show:this.opened,animate:t.animate,popupClass:n.classNames("k-menu-popup",t.popupClass),anchorAlign:t.anchorAlign||g(e),popupAlign:t.popupAlign||b(e),style:e?{direction:"rtl"}:void 0,onClose:this.onPopupClose},c.createElement("ul",{role:"menu",id:this.guid,"aria-labelledby":"button-"+this.guid,tabIndex:-1,ref:this.listRef,"aria-activedescendant":s>=0?`${this.guid}-${s}`:void 0,className:n.classNames("k-menu-group",{[`k-menu-group-${n.kendoThemeMaps.sizeMap[this.props.size]||this.props.size}`]:this.props.size})},this.renderChildItems()))}renderChildItems(){const{item:e,itemRender:t,textField:s}=this.props;return this.buttonsData.length>0?this.buttonsData.map((o,r)=>c.createElement(m,{className:n.classNames("k-menu-item",{"k-first":0===r},{"k-last":r===this.buttonsData.length-1}),dataItem:o,textField:s,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}};k.propTypes={accessKey:s.string,ariaLabel:s.string,title:s.string,onButtonClick:s.func,onFocus:s.func,onBlur:s.func,onItemClick:s.func,onOpen:s.func,onClose:s.func,text:s.string,items:s.arrayOf(s.any),textField:s.string,tabIndex:s.number,disabled:s.bool,icon:s.string,svgIcon:n.svgIconPropType,imageUrl:s.string,popupSettings:s.object,itemRender:s.any,item:s.func,className:s.string,buttonClass:s.string,dir:s.string,size:s.oneOf(["small","medium","large"]),rounded:s.oneOf(["small","medium","large","full"]),fillMode:s.oneOf(["flat","link","outline","solid","clear"]),themeColor:s.oneOf(["base","primary","secondary","tertiary","info","success","warning","error","dark","light","inverse"])},k.defaultProps={size:void 0,rounded:void 0,fillMode:void 0,themeColor:void 0};let C=k;const I=class extends c.Component{render(){return null}};I.propTypes={text:s.string,icon:s.string,iconClass:s.string,imageUrl:s.string,selected:s.bool,disabled:s.bool,render:s.any};let x=I;const w=class extends c.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!==n.Keys.down?this.opened&&e.keyCode===n.Keys.up&&(e.preventDefault(),this.setState({focusedIndex:-1}),this.setOpen(!1,e)):(e.preventDefault(),this.setOpen(!0,e),this.setState({focusedIndex:0})));const s={...this.state};if(e.keyCode===n.Keys.enter||e.keyCode===n.Keys.space){e.preventDefault(),t>=0&&this.dispatchClickEvent(e,t);const s=!this.opened;return this.setState({focused:!0,focusedIndex:s?0:-1}),void this.setOpen(s,e)}if(this.opened&&e.keyCode===n.Keys.esc)return this.setState({focusedIndex:-1}),void this.setOpen(!1,e);if(this.opened){const o=v(t,e.keyCode,e.altKey,this.buttonsData.length);s.focusedIndex=o;const r=e.keyCode===n.Keys.up||e.keyCode===n.Keys.down||e.keyCode===n.Keys.left||e.keyCode===n.Keys.right;!e.altKey&&(r||e.keyCode===n.Keys.home||e.keyCode===n.Keys.end)&&e.preventDefault()}this.setState(s)},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}),n.dispatchEvent(this.props.onFocus,e,this,void 0))},this.handleButtonBlur=e=>{this.opened||(this.setState({focused:!1}),n.dispatchEvent(this.props.onBlur,e,this,void 0))},this.handleMenuBlur=e=>{this.skipFocus||(this.setState({focused:!1,focusedIndex:-1}),n.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=>{n.getActiveElement(document)===this.list&&e.preventDefault()},this.mouseDown=e=>{e.preventDefault();const t=n.getActiveElement(document);this.element&&t!==this.element&&t!==this.list&&this.element.focus()},this.onPopupClose=e=>{var t;const s=n.getActiveElement(document);this.element&&this.element.removeAttribute("tabindex"),(s===this.list||null!=(t=this.list)&&t.contains(s))&&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(n.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)=>{n.dispatchEvent(t?this.props.onOpen:this.props.onClose,e,this,void 0),this.openedDuringOnChange=void 0},this.showLicenseWatermark=!n.validatePackage(y,{component:"DropDownButton"}),this.licenseMessage=n.getLicenseMessage(y)}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,s=e?"rtl":void 0,{id:o,style:r,tabIndex:i,disabled:a,size:l,rounded:u,fillMode:p,themeColor:m,ariaLabel:h,title:f,accessKey:v,icon:g,svgIcon:b,iconClass:y,buttonClass:k,className:C,imageUrl:I,startIcon:w,endIcon:E}=this.props;return this.buttonsData=this.props.items||c.Children.toArray(this.props.children).filter(e=>e&&e.type===x).map(e=>e.props),c.createElement(c.Fragment,null,c.createElement(d,{id:o,size:l,style:r,rounded:u,fillMode:p,themeColor:m,onClick:this.onClickMainButton,onMouseDown:this.mouseDown,onKeyDown:this.onKeyDown,onFocus:this.handleFocus,onBlur:this.handleButtonBlur,"aria-disabled":a?"true":void 0,tabIndex:i,accessKey:v,icon:g,svgIcon:b,iconClass:y,className:n.classNames(k,C,n.uDropDownButton.wrapper({c:t,focused:this.state.focused,disabled:a})),imageUrl:I,dir:s,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:w,endIcon:E},this.props.text),this.showLicenseWatermark&&c.createElement(n.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)||n.dispatchEvent(this.props.onItemClick,e,this,{item:this.buttonsData[t],itemIndex:t})}renderPopup(e){const{popupSettings:t={},_zIndex:s,unstyled:r}=this.props,i=s?s+2e3:12e3,a=r&&r.uDropDownButton,{focusedIndex:l}=this.state;return c.createElement(n.ZIndexContext.Provider,{value:i},c.createElement(o.Popup,{anchor:this.mainButton,show:this.opened,animate:t.animate,popupClass:n.classNames(n.uDropDownButton.popup({c:a}),t.popupClass),anchorAlign:t.anchorAlign||g(e),popupAlign:t.popupAlign||b(e),style:e?{direction:"rtl"}:void 0,onClose:this.onPopupClose},c.createElement("ul",{role:"list",id:this.guid,tabIndex:-1,"aria-activedescendant":l>=0?`${this.guid}-${l}`:void 0,ref:this.listRef,onKeyDown:this.onKeyDown,onBlur:this.handleMenuBlur,className:n.classNames(n.uDropDownButton.ul({c:a,size:this.props.size}))},this.renderChildItems())))}renderChildItems(){const{item:e,itemRender:t,textField:s,unstyled:o}=this.props,r=o&&o.uDropDownButton;return this.buttonsData.length>0?this.buttonsData.map((o,i)=>c.createElement(m,{className:n.classNames(n.uDropDownButton.item({c:r}),o.className,{"k-first":0===i},{"k-last":i===this.buttonsData.length-1}),dataItem:o,textField:s,focused:this.state.focusedIndex===i,onClick:this.onItemClick,onDown:this.onItemDown,render:t,item:e,index:i,key:i,id:`${this.guid}-${i}`})):null}isItemDisabled(e){return this.buttonsData[e]?this.buttonsData[e].disabled:this.props.disabled}isRtl(){return void 0!==this.props.dir?"rtl"===this.props.dir:!!this.mainButton&&"rtl"===getComputedStyle(this.mainButton).direction}};w.propTypes={accessKey:s.string,ariaLabel:s.string,title:s.string,onFocus:s.func,onBlur:s.func,onClick:s.func,onItemClick:s.func,onOpen:s.func,onClose:s.func,items:s.arrayOf(s.any),textField:s.string,tabIndex:s.number,disabled:s.bool,icon:s.string,svgIcon:n.svgIconPropType,iconClass:s.string,imageUrl:s.string,popupSettings:s.object,itemRender:s.func,item:s.func,className:s.string,buttonClass:s.string,dir:s.string,size:s.oneOf(["small","medium","large"]),rounded:s.oneOf(["small","medium","large","full"]),fillMode:s.oneOf(["flat","link","outline","solid","clear"]),themeColor:s.oneOf(["base","primary","secondary","tertiary","info","success","warning","error","dark","light","inverse"])},w.defaultProps={size:void 0,rounded:void 0,fillMode:void 0,themeColor:void 0};let E=w;const D=n.createPropsContext(),N=n.withIdHOC(n.withPropsContext(D,n.withUnstyledHOC(n.withZIndexContext(E))));N.displayName="KendoReactDropDownButton";const S=":not(.k-dropdownlist button):not(.k-colorpicker button):not(.k-split-button .k-split-button-arrow)",B=["button"+S,".k-button-group > button"+S,".k-colorpicker",".k-dropdownlist"],K=e=>c.createElement("div",{ref:e._ref,className:n.classNames("k-toolbar-separator k-separator",e.className)}),R="prevArrow.title",O="nextArrow.title",M="moreButtonTitle.title",z={[R]:"Previous scroll button",[O]:"Next scroll button",[M]:"More button"},F=e=>{const t=i.useLocalization(),{disabled:s,type:o,scrollContentRef:a,buttonScrollSpeed:l,prevButton:d,nextButton:u}=e,p="prev"===o?d||"span":u||"span";return c.createElement(p,{className:n.classNames("k-button","k-icon-button",`k-toolbar-${o}`,{"k-disabled":s}),title:`${"prev"===o?t.toLanguageString(R,z[R]):t.toLanguageString(O,z[O])}`,"aria-hidden":!0,tabIndex:s?-1:void 0,onClick:e=>{a&&a.current&&l&&a.current.scrollBy({left:"next"===o?l:-l,behavior:"smooth"})}},c.createElement(n.SvgIcon,{icon:"prev"===o?r.caretAltLeftIcon:r.caretAltRightIcon,className:"k-button-icon"}))},P=e=>{const{scrollButtons:t,scrollButtonsPosition:s,isOverflowing:n,scrollContentRef:o,buttonScrollSpeed:r,dir:i,isScrollStartPosition:a,isScrollEndPosition:l,prevButton:d,nextButton:u,children:p}=e,m=(e,t)=>c.createElement(F,{type:e,disabled:t,scrollContentRef:o,buttonScrollSpeed:r,prevButton:d,nextButton:u}),h="visible"===t||"auto"===t&&n;return c.createElement(c.Fragment,null,h&&"split"===s&&c.createElement(c.Fragment,null,m("rtl"!==i?"prev":"next",a),c.createElement(K,{className:"k-toolbar-button-separator"})),h&&"start"===s&&c.createElement(c.Fragment,null,m("rtl"!==i?"prev":"next",a),m("rtl"!==i?"next":"prev",l),c.createElement(K,{className:"k-toolbar-button-separator"})),c.createElement("span",{className:"k-toolbar-items k-toolbar-items-scroll",ref:o},p),h&&"split"===s&&c.createElement(c.Fragment,null,c.createElement(K,{className:"k-toolbar-button-separator"}),m("rtl"!==i?"next":"prev",l)),h&&"end"===s&&c.createElement(c.Fragment,null,c.createElement(K,{className:"k-toolbar-button-separator"}),m("rtl"!==i?"prev":"next",a),m("rtl"!==i?"next":"prev",l)))},T=e=>{var t;const{toolbarRef:s,children:a,fillMode:l,size:u}=e,[p,m]=c.useState(!1),h=c.useRef(c.Children.toArray(a).filter(e=>c.isValidElement(e)).map((e,t)=>c.cloneElement(e,{key:e.key||t}))),f=c.useRef([]),v=c.useRef(0),g=c.useRef(null),b=c.useRef(null),y=i.useLocalization(),[k,C]=c.useReducer(e=>e+1,0),I=()=>{if(!s.current)return;let e=0;const t=s.current.clientWidth,n=parseInt(window.getComputedStyle(s.current).gap||"0",10),o=Array.from(s.current.children).reduce((e,t,s)=>e+=Math.ceil(t.clientWidth),0),r=Array.from(s.current.children).length;if(e=o+r*n+2*n,e>t){const e=[...h.current],s=e.pop();v.current=t,h.current=e,s&&(f.current=[s,...f.current])}else if(t>v.current+n*r){const e=[...f.current],s=e.shift();f.current=e,s&&(h.current=[...h.current,s]),v.current=t}C()};c.useEffect(()=>{I();const e=new ResizeObserver(I),t=s.current;return t&&e.observe(t),()=>{t&&e.unobserve(t)}},[]);return c.createElement(c.Fragment,null,h.current.length>0&&h.current,f.current.length>0&&c.createElement(c.Fragment,null,c.createElement(K,{_ref:b,className:"k-toolbar-button-separator"}),c.createElement(d,{ref:g,className:"k-toolbar-overflow-button",fillMode:"flat",svgIcon:r.moreHorizontalIcon,title:y.toLanguageString(M,z[M]),onClick:()=>{m(!p)}}),c.createElement(o.Popup,{anchor:s.current,show:p,popupClass:"k-toolbar-popup",style:{width:null==(t=s.current)?void 0:t.offsetWidth}},c.createElement("span",{className:`k-toolbar-items-list k-toolbar-items-list-${n.kendoThemeMaps.sizeMap[u]} k-toolbar-items-list-${l}`},f.current.length>0&&f.current))))},A=c.forwardRef((e,t)=>{const{children:s,className:o,id:r,ariaLabel:i,keyboardNavigation:a,role:l,onResize:d,style:u,tabIndex:p=L.tabIndex,size:m=L.size,fillMode:h=L.fillMode,overflow:f,scrollButtons:v=L.scrollButtons,scrollButtonsPosition:g=L.scrollButtonsPosition,buttonScrollSpeed:b=L.buttonScrollSpeed,prevButton:y,nextButton:k,_ariaControls:C}=e,I=c.useRef(!1),x=c.useRef(null),w=c.useRef(null),E=c.useRef(0),D=c.useRef(0),N=c.useRef([]),S=c.useRef({element:null,props:e}),[K,R]=c.useState(!1),[O,M]=c.useState(!0),[z,F]=c.useState(!1),A=n.useDir(x,e.dir),$=c.useMemo(()=>e.buttons||B,[e.buttons]),W=c.useMemo(()=>$.map(e=>e+":focus").join(","),[$]),H=()=>{const e=x.current&&x.current.querySelector(W);return Math.max(0,N.current.findIndex(t=>t===e))};c.useImperativeHandle(S,()=>({element:x.current,props:e})),c.useImperativeHandle(t,()=>S.current),c.useEffect(()=>(window.addEventListener("resize",q),x.current&&(D.current=x.current.offsetWidth,E.current=x.current.offsetHeight,!1!==a&&(N.current=Array.from(x.current.querySelectorAll($.join(","))),U(0))),()=>{window.removeEventListener("resize",q),N.current.length=0}),[]),c.useEffect(()=>{if(I.current){if(!x.current||!1===a)return;N.current=Array.from(x.current.querySelectorAll($.join(","))),U(H()),V()}else I.current=!0});const U=e=>{N.current.forEach((t,s)=>{t.tabIndex=s===e?p:-1})},j=(e,t)=>{const s=N.current[t];if(s){s.tabIndex=p,s.focus();const t=N.current[e];t&&(t.tabIndex=-1)}},q=e=>{if(!x.current)return;const t=x.current.offsetWidth,s=x.current.offsetHeight;if(D.current!==t||E.current!==s){D.current=t,E.current=s;const n={offsetWidth:D.current,offsetHeight:E.current};d&&d.call(void 0,{target:S.current,...n,nativeEvent:e})}V()},V=c.useCallback(()=>{const e=w.current;e&&R(e.scrollWidth>e.clientWidth||e.scrollHeight>e.clientHeight)},[]),G=c.useCallback(()=>{const e=w.current;if(e){const t=0===e.scrollLeft,s="rtl"!==A?e.scrollLeft+e.clientWidth===e.scrollWidth:e.clientWidth-e.scrollLeft===e.scrollWidth;t&&M(!0),s&&F(!0),!t&&!s&&(M(!1),F(!1))}},[A]);return c.useEffect(()=>{const e=w.current;if(e)return e.addEventListener("scroll",G),()=>{e.removeEventListener("scroll",G)}},[G]),c.createElement("div",{id:r,"aria-label":i,"aria-controls":C,className:n.classNames("k-toolbar",{[`k-toolbar-${n.kendoThemeMaps.sizeMap[m]||m}`]:m,[`k-toolbar-${h}`]:h,"k-toolbar-scrollable":"scroll"===f,"k-toolbar-scrollable-overlay":"scroll"===f&&("hidden"===v||void 0===v),"k-toolbar-scrollable-start":"scroll"===f&&"hidden"===v&&O,"k-toolbar-scrollable-end":"scroll"===f&&"hidden"===v&&z,"k-toolbar-section":e.overflow&&"section"===f},o),style:u,role:void 0!==l?l||void 0:"toolbar",dir:A,ref:x,onKeyDown:!1!==a?e=>{const t=e.keyCode===n.Keys.left||e.keyCode===n.Keys.right||e.keyCode===n.Keys.home||e.keyCode===n.Keys.end,s=H();!t||e.defaultPrevented||-1===N.current.findIndex(t=>t===e.target)||(e.keyCode===n.Keys.left?j(s,0===s?N.current.length-1:s-1):j(s,s===N.current.length-1?0:s+1),e.keyCode===n.Keys.home&&j(s,0),e.keyCode===n.Keys.end&&j(s,N.current.length-1))}:void 0},"scroll"===f&&c.createElement(P,{scrollButtons:v,scrollButtonsPosition:g,prevButton:y,nextButton:k,isOverflowing:K,scrollContentRef:w,buttonScrollSpeed:b,dir:A,isScrollStartPosition:O,isScrollEndPosition:z,children:s}),"section"===f&&c.createElement(T,{toolbarRef:x,fillMode:h,size:m},s),("none"===f||void 0===f)&&s)}),L={tabIndex:0,size:void 0,fillMode:void 0,scrollButtons:"auto",scrollButtonsPosition:"split",buttonScrollSpeed:100};A.displayName="KendoReactToolbar",A.propTypes={tabIndex:s.number,dir:s.string,keyboardNavigation:s.bool,style:s.object,className:s.string,role:s.string,onResize:s.func,buttons:s.arrayOf(s.string.isRequired),size:s.oneOf(["small","medium","large"]),fillMode:s.oneOf(["solid","flat","outline"]),overflow:s.oneOf(["none","section","scroll"]),scrollButtons:s.oneOf(["hidden","visible","auto"]),scrollButtonsPosition:s.oneOf(["start","end","split"]),buttonScrollSpeed:s.number};const $=c.forwardRef((e,t)=>{const{id:s,className:o,style:r,children:i}=e,a=c.useRef(null);return c.useImperativeHandle(t,()=>({element:a.current})),c.createElement("div",{id:s,className:n.classNames("k-toolbar-item",o),style:r,ref:a},i)});$.displayName="KendoReactToolbarItem",$.propTypes={className:s.string};const W=c.forwardRef((e,t)=>{const s=c.useRef(null),o=c.useRef(null);c.useImperativeHandle(o,()=>({element:s.current})),c.useImperativeHandle(t,()=>({element:s.current}));const r=c.useMemo(()=>n.classNames("k-spacer",e.className),[e.className]);return c.createElement("span",{ref:s,className:r})});W.displayName="KendoReactToolbarSpacer",W.propTypes={className:s.string};const H=t.createContext([null,e=>{}]),U=t.createContext([null,e=>{}]),j=t.createContext([null,e=>{}]);var q=(e=>(e.next="next",e.prev="prev",e.current="current",e.reset="reset",e))(q||{});var V=(e=>(e.remove="remove",e.add="add",e.reorder="reorder",e))(V||{});var G=(e=>(e.toggle="toggle",e.remove="remove",e))(G||{});const Z=c.forwardRef((e,t)=>{const s=c.useRef(null),o=c.useRef(null),{disabled:i=J.disabled,fillMode:a=J.fillMode,themeColor:l=J.themeColor,size:d=J.size,rounded:u=J.rounded,dir:p=J.dir,removeIcon:m=J.removeIcon,removeSvgIcon:h=J.removeSvgIcon,removable:f=J.removable}=e,v=n.useDir(o,p);c.useImperativeHandle(s,()=>({element:o.current,props:e})),c.useImperativeHandle(t,()=>s.current);const[g,b]=c.useContext(H),[y,k]=c.useContext(U),[,C]=c.useContext(j),I=c.useMemo(()=>e.selected||(Array.isArray(g)?g.some(t=>t===e.value):g===e.value),[e.selected,e.value,g]),x=c.useMemo(()=>y===e.value,[e.value,y]);c.useEffect(()=>{x&&o.current&&o.current.focus()},[x]);const w=c.useCallback(t=>{b({type:G.toggle,payload:e.value,event:t})},[b,e.value]),E=c.useCallback(t=>{f&&(C({type:V.remove,payload:e.value,event:t}),k({type:q.reset,payload:e.value,event:t}),b({type:G.remove,payload:e.value,event:t}),e.onRemove&&e.onRemove.call(void 0,{target:s.current,syntheticEvent:t}))},[e.onRemove,e.value,f,C,k,b]),D=c.useCallback(t=>{switch(t.keyCode){case n.Keys.left:k({type:q.prev,payload:e.value,event:t});break;case n.Keys.right:k({type:q.next,payload:e.value,event:t});break;case n.Keys.enter:b({type:G.toggle,payload:e.value,event:t});break;case n.Keys.delete:E(t)}e.onKeyDown&&e.onKeyDown.call(void 0,{target:s.current,syntheticEvent:t})},[e.onKeyDown,e.value,k,b,E]),N=c.useCallback(t=>{k({payload:e.value,type:q.current,event:t}),e.onFocus&&e.onFocus.call(void 0,{target:s.current,syntheticEvent:t})},[e.onFocus,e.value,k]),S=c.useCallback(t=>{e.onBlur&&e.onBlur.call(void 0,{target:s.current,syntheticEvent:t})},[e.onBlur]),B=n.useMouse(e,s,{onClick:w});return c.createElement("div",{...B,role:e.role||"button",id:e.value,style:e.style,ref:o,dir:v,tabIndex:n.getTabIndex(e.tabIndex,i,void 0),className:n.classNames("k-chip",{"k-rtl":"rtl"===v,"k-disabled":i,"k-selected":I,"k-focus":x,[`k-chip-${n.kendoThemeMaps.sizeMap[d]||d}`]:d,[`k-rounded-${n.kendoThemeMaps.roundedMap[u]||u}`]:u,[`k-chip-${a}`]:a,[`k-chip-${a}-${l}`]:!(!a||!l)},e.className),"aria-pressed":e.role?void 0:I,"aria-disabled":i,"aria-describedby":e.ariaDescribedBy,"aria-keyshortcuts":f?"Enter Delete":void 0,onFocus:N,onBlur:S,onKeyDown:D},I&&(e.selectedIcon||e.selectedSvgIcon)&&c.createElement(n.IconWrap,{className:"k-chip-icon",name:e.selectedIcon?n.toIconName(e.selectedIcon):void 0,icon:e.selectedSvgIcon,size:"small"}),(e.icon||e.svgIcon)&&c.createElement(n.IconWrap,{className:"k-chip-icon",name:e.icon?n.toIconName(e.icon):void 0,icon:e.svgIcon,size:"small"}),e.avatar&&c.createElement("div",{className:n.classNames("k-chip-avatar","k-avatar",e.avatar.rounded&&`k-rounded-${e.avatar.rounded}`),style:e.avatar.style},c.createElement("span",{className:"k-avatar-image"},c.createElement("img",{src:e.avatar.image,alt:e.avatar.imageAlt}))),c.createElement("span",{className:"k-chip-content"},void 0!==e.children?e.children:e.text&&c.createElement("span",{"aria-label":e.ariaLabel||e.text,className:"k-chip-label"},e.text)),f&&c.createElement("span",{className:"k-chip-actions"},c.createElement("span",{className:n.classNames("k-chip-action","k-chip-remove-action"),onClick:E},c.createElement(n.IconWrap,{name:m?n.toIconName(m):void 0,icon:h||r.xCircleIcon,size:"small"}))))}),_={id:s.string,text:s.string,value:s.any,dir:s.oneOf(["ltr","rtl"]),removable:s.bool,removeIcon:s.string,removeIconSvg:n.svgIconPropType,disabled:s.bool,icon:s.string,svgIcon:n.svgIconPropType,selectedIcon:s.string,selectedIconSvg:n.svgIconPropType,onRemove:s.func,dataItem:s.any,selected:s.bool,ariaDescribedBy:s.string,size:s.oneOf(["small","medium","large"]),rounded:s.oneOf(["small","medium","large","full"]),fillMode:s.oneOf(["outline","solid"]),themeColor:s.oneOf(["base","info","success","warning","error"])},J={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};Z.displayName="KendoReactChip",Z.propTypes=_;const Q=(e,t,s)=>{"multiple"===t.selection?Array.isArray(e)||(e=e?[e]:null):"single"===t.selection&&Array.isArray(e)&&(e=e?e.join(""):null);const[n,o]=c.useState(e);return[n,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||n,{...e,...t});s&&s(r,e.event),"none"!==t.selection&&o(r)}]},X=c.forwardRef((e,t)=>{const s=c.useRef(null),o=c.useRef(null),{id:r,style:i,tabIndex:a,className:l,ariaDescribedBy:d,ariaLabelledBy:u,ariaLabel:p,value:m,defaultData:h=ee.defaultData,chip:f=ee.chip,disabled:v=ee.disabled,size:g=ee.size,defaultValue:b=ee.defaultValue,selection:y=ee.selection,valueField:k=ee.valueField,textField:C=ee.textField,dir:I=ee.dir,onChange:x,onDataChange:w}=e,E=n.useDir(o,I),D=c.useMemo(()=>f||Z,[f,Z]);c.useImperativeHandle(s,()=>({element:o.current,props:e})),c.useImperativeHandle(t,()=>s.current);const N=c.useCallback((e,t)=>{x&&s.current&&x.call(void 0,{value:e,target:s.current,syntheticEvent:t})},[x]),[S,B]=Q(m||b,{selection:y,state:m},N),K=c.useCallback((e,t)=>{w&&s.current&&w.call(void 0,{value:e,target:s.current,syntheticEvent:t})},[w]),[R,O]=((e,t,s)=>{const[n,o]=c.useState(e);return[n,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||n,{...e,...t});s&&s(r,e.event),o(r)}]})(e.data||h,{state:e.data,valueField:k},K),M=c.useCallback((e,t)=>(e.push(t[k]),e),[k]),z=c.useMemo(()=>e.data||R,[e.data,R]),F=c.useMemo(()=>m||S,[m,S]),P=c.useMemo(()=>z.reduce(M,[]),[z,M]),T=c.useCallback(e=>n.getter(k)(e),[k]),A=c.useCallback(e=>n.getter(C)(e),[C]),[L,$]=(e=>{const[t,s]=c.useState(null);return[t,t=>{const n=((e,t)=>{const s=t.items.findIndex(t=>t===e);switch(t.type){case"next":return s===t.items.length-1?e:t.items[s+1];case"prev":return 0===s?e:t.items[s-1];case"current":return t.payload;case"reset":return null;default:return e}})(t.payload,{...t,...e});s(n)}]})({items:P}),W=n.useMouse(e,s);return c.createElement(H.Provider,{value:[F,B]},c.createElement(U.Provider,{value:[L,$]},c.createElement(j.Provider,{value:[z,O]},c.createElement("div",{ref:o,...W,role:v?void 0:"listbox",id:r,dir:E,style:i,tabIndex:n.getTabIndex(a,v,void 0),className:n.classNames("k-chip-list",{"k-rtl":"rtl"===E,"k-disabled":v,[`k-chip-list-${n.kendoThemeMaps.sizeMap[g]||g}`]:g},l),"aria-label":p,"aria-labelledby":u,"aria-describedby":d,"aria-orientation":"horizontal","aria-multiselectable":"multiple"===y},z.map((e,t)=>c.createElement(D,{role:"option",dataItem:e,size:g,key:[T(e),t].join("-"),text:A(e),value:T(e),ariaLabel:e.ariaLabel,svgIcon:e.svgIcon||void 0}))))))}),Y={id:s.string,className:s.string,tabIndex:s.number,data:s.any,defaultData:s.arrayOf(s.any),onDataChange:s.func,value:s.oneOfType([s.any,s.arrayOf(s.any)]),defaultValue:s.oneOfType([s.any,s.arrayOf(s.any)]),onChange:s.func,selection:s.oneOf(["single","none","multiple"]),textField:s.string,valueField:s.string,disabled:s.bool,dir:s.oneOf(["ltr","rtl"]),ariaLabelledBy:s.string,ariaDescribedBy:s.string,size:s.oneOf(["small","medium","large"])},ee={chip:Z,size:void 0,disabled:!1,defaultValue:null,defaultData:[],dir:"ltr",selection:"none",textField:"text",valueField:"value"};X.displayName="KendoReactChipList",X.propTypes=Y;const te=c.forwardRef((e,t)=>{const{className:s,disabled:o,text:r,icon:i,style:a,id:l,focused:d,tabIndex:u,index:p,dataItem:m,item:h,svgIcon:f,onDown:v,onClick:g,...b}=e,y=c.useRef(null),k=c.useCallback(()=>{y.current&&y.current.focus()},[]),C=c.useCallback(()=>({element:y.current,focus:k}),[k]);c.useImperativeHandle(t,C);const I=c.useCallback(e=>{g&&void 0!==p&&!o&&g(e,p)},[g,p]),x=c.useMemo(()=>n.classNames("k-fab-item",{"k-focus":d,"k-disabled":o},s),[s,o,d]),w=h;return c.createElement("li",{ref:y,id:l,className:x,style:a,role:"menuitem",tabIndex:n.getTabIndex(u,o),"aria-disabled":o,"aria-label":`${r||""} floatingactionbutton item`,onClick:I,onMouseDown:v,onPointerDown:v,...b},w?c.createElement(w,{itemIndex:p,item:m}):c.createElement(c.Fragment,null,r&&c.createElement("span",{className:"k-fab-item-text"},r),i||f?c.createElement(n.IconWrap,{className:"k-fab-item-icon",name:i,icon:f}):null))});te.propTypes={className:s.string,style:s.object,children:s.any,disabled:s.bool,focused:s.bool,index:s.number,icon:s.string,svgIcon:n.svgIconPropType,text:s.string,tabIndex:s.number,customProp:s.any},te.displayName="KendoFloatingActionButtonItem";const se="16px",ne=e=>"number"==typeof e?e+"px":e,oe=(e,t)=>{const s={horizontal:t?"right":"left",vertical:"bottom"};return"end"===e.horizontal&&(s.horizontal=t?"left":"right"),s},re=(e,t)=>{const s={horizontal:t?"right":"left",vertical:"top"};return"end"===e.horizontal&&(s.horizontal=t?"left":"right"),s},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"]),ae=(e,t,s,n)=>{const o=t.horizontal,r=t.vertical;if(e.current){const i=s&&void 0!==s.x?ne(s.x):se,a=s&&void 0!==s.x?`calc(50% + ${ne(s.x)})`:"50%",l=s&&void 0!==s.y?ne(s.y):se,c=s&&void 0!==s.y?`calc(50% + ${ne(s.y)})`:"50%";e.current.style.setProperty(le(t,n),"center"===o?a:i),e.current.style.setProperty(ce(t),"middle"===r?c:l),n&&(("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"))}},le=(e,t)=>{const{horizontal:s}=e;return{end:t?"left":"right",center:"left",start:t?"right":"left"}[s||"end"]},ce=e=>({top:"top",middle:"top",bottom:"bottom"}[e.vertical||"bottom"]),de=c.forwardRef((e,t)=>{const{align:s=ue.align,alignOffset:r,className:i,disabled:a,icon:l,svgIcon:d,iconClass:u,id:p,items:m,item:h,text:f,positionMode:v=ue.positionMode,size:g=ue.size,style:b,rounded:y=ue.rounded,themeColor:k=ue.themeColor,overlayStyle:C,tabIndex:I,accessKey:x,popupSettings:w={},modal:E,onClick:D,onItemClick:N,onFocus:S,onBlur:B,onKeyDown:K,onOpen:R,onClose:O,...M}=e,z=n.useZIndexContext(),F=z?z+2:100,P=c.useRef(null),T=c.useRef(null),A=c.useRef(null),L=c.useRef(null),$=c.useCallback(()=>{T.current&&T.current.focus()},[]),W=c.useCallback(()=>({element:T.current,focus:$}),[$]);c.useImperativeHandle(P,W),c.useImperativeHandle(t,()=>P.current);const[H,U]=c.useState(!1),[j,q]=c.useState(!1),[V,G]=c.useState(-1),Z=n.useId()+"-button-id",_=n.useDir(T,e.dir),J="rtl"===_,Q=n.useId()+"-list-id";c.useEffect(()=>{ae(T,s,r,J)},[T,s,r,J]),c.useEffect(()=>{j&&T&&T.current&&T.current.focus()},[j,T]);const X=c.useCallback((e,t)=>{m&&n.dispatchEvent(t?R:O,e,W(),void 0)},[R,O,m]),Y=c.useCallback(e=>{!e.target||a||(!m&&D?n.dispatchEvent(D,e,W(),void 0):(U(!H),q(!0),G(H?-1:0),X(e,!H)))},[U,q,G,D,X,H,m,a]),ee=c.useCallback(e=>{q(!0),G(H?0:-1),S&&n.dispatchEvent(S,e,W(),void 0)},[S,q,G]),se=c.useCallback(e=>{q(!1),U(!1),G(-1),n.dispatchEvent(B,e,W(),void 0),H&&X(e,!1)},[B,q,U,G,X]),ne=c.useCallback(e=>{e.preventDefault()},[]),le=c.useCallback((e,t)=>{m&&(m[t].disabled||n.dispatchEvent(N,e,W(),{itemProps:m[t],itemIndex:t}))},[N]),ce=c.useCallback((e,t)=>{!e.target||!m||(G(t),U(!1),le(e,t),X(e,!1))},[G,U,le,X]),de=c.useCallback(e=>{n.getActiveElement(document)===T.current&&e.preventDefault()},[T]),pe=c.useCallback(e=>{const t=V,s=m?m.length:-1;if(e.altKey)return!H&&e.keyCode===n.Keys.down&&(e.preventDefault(),U(!0),G(0)),void(H&&e.keyCode===n.Keys.up&&(e.preventDefault(),U(!1),G(-1)));switch(e.keyCode){case n.Keys.enter:case n.Keys.space:t>=0&&le(e,t),m||Y(e),e.preventDefault(),U(!H),G(H?-1:0);break;case n.Keys.esc:e.preventDefault(),U(!1),G(-1);break;case n.Keys.home:e.preventDefault(),G(0);break;case n.Keys.end:e.preventDefault(),G(s-1);break;case n.Keys.down:case n.Keys.right:e.preventDefault(),G(t+1>=s?0:t+1);break;case n.Keys.up:case n.Keys.left:e.preventDefault(),G(t-1<0?s-1:t-1)}n.dispatchEvent(K,e,W(),void 0)},[K,V,G,J,U]),me=c.useMemo(()=>n.classNames("k-fab",{"k-fab-sm":"small"===g,"k-fab-md":"medium"===g,"k-fab-lg":"large"===g,"k-disabled":a,"k-pos-absolute":"absolute"===v,"k-pos-fixed":"fixed"===v,"k-focus":j,[`k-rounded-${n.kendoThemeMaps.roundedMap[y]||y}`]:y,[`k-fab-${k}`]:k},`k-${s.vertical}-${s.horizontal}`,i),[k,g,y,a,v,s,j,i]),he=m&&m.map((e,t)=>c.createElement(te,{...e,key:t,index:t,id:`${Q}-${t}`,disabled:a||e.disabled,focused:V===t,dataItem:e,item:h,className:n.classNames(e.className,ie(_||"ltr",s.horizontal)),onClick:ce,onDown:de})),fe=!(!l&&!d||f),ve=(T.current?T.current.offsetWidth:0)/2-16;let ge;return ge=l||d?c.createElement(n.IconWrap,{className:"k-fab-icon",name:l,icon:d}):u?c.createElement("span",{role:"presentation",className:u}):null,c.createElement(n.ZIndexContext.Provider,{value:F},c.createElement(c.Fragment,null,c.createElement("button",{ref:T,id:p||Z,role:"button",type:"button","aria-disabled":a,"aria-expanded":m?H:void 0,"aria-haspopup":!!m,"aria-label":`${f||""} floatingactionbutton`,"aria-owns":m?Q:void 0,"aria-activedescendant":V>=0&&m?`${Q}-${V}`:void 0,tabIndex:n.getTabIndex(I,a),accessKey:x,dir:_,disabled:a,className:me,style:b,onClick:Y,onMouseDown:ne,onFocus:ee,onBlur:se,onKeyDown:pe,...M},ge,f&&c.createElement("span",{className:"k-fab-text"},f)),E&&H&&c.createElement("div",{className:"k-overlay",style:{zIndex:F,...C}}),c.createElement(o.Popup,{ref:L,anchor:T.current,show:H,animate:w.animate,popupClass:n.classNames("k-popup-transparent k-fab-popup",w.popupClass),anchorAlign:w.anchorAlign||oe(s,J),popupAlign:w.popupAlign||re(s,J),style:{boxShadow:"none"}},c.createElement("ul",{ref:A,role:"menu","aria-labelledby":p,id:Q,className:n.classNames("k-fab-items",{"k-fab-items-bottom":"bottom"!==s.vertical,"k-fab-items-top":"bottom"===s.vertical}),style:{paddingLeft:fe?ve:void 0,paddingRight:fe?ve:void 0}},he))))});de.propTypes={className:s.string,style:s.object,id:s.string,dir:s.string,tabIndex:s.number,accessKey:s.string,disabled:s.bool,icon:s.string,svgIcon:n.svgIconPropType,iconClass:s.string,text:s.string,alignOffset:s.shape({x:s.oneOfType([s.number,s.string]).isRequired,y:s.oneOfType([s.number,s.string]).isRequired}),align:s.shape({vertical:s.oneOf(["top","middle","bottom"]).isRequired,horizontal:s.oneOf(["start","center","end"]).isRequired}),positionMode:s.oneOf(["absolute","fixed"]),size:s.oneOf(["small","medium","large"]),rounded:s.oneOf(["small","medium","large","full"]),themeColor:s.oneOf(["primary","secondary","tertiary","info","success","warning","error","dark","light","inverse"]),modal:s.bool,overlayStyle:s.object};const ue={align:{vertical:"bottom",horizontal:"end"},size:void 0,rounded:void 0,themeColor:void 0,positionMode:"fixed"};de.displayName="KendoFloatingActionButton";const pe="speechToTextButton.ariaLabel",me="speechToTextButton.title",he={[pe]:"Start speech recognition",[me]:"Speech to Text Button"},fe=t.forwardRef((e,s)=>{const o=!n.validatePackage(y,{component:"SpeechToTextButton"}),l=n.getLicenseMessage(y),c=i.useLocalization(),{fillMode:u,rounded:p,size:m,themeColor:h,ariaLabel:f,svgIcon:v,disabled:g,iconSize:b,title:k,className:C,id:I,style:x,lang:w="en-US",continuous:E=!1,interimResults:D=!1,maxAlternatives:N=1,integrationMode:S="webSpeech",onStart:B,onResult:K,onEnd:R,onError:O,...M}=e,z=t.useRef(null),F=t.useRef(!1),[P,T]=t.useState(!1),A=t.useCallback(async()=>{F.current=!0,T(!0),B&&await B()},[B]),L=t.useCallback(async()=>{F.current=!1,T(!1),R&&await R()},[R]),$=t.useCallback(e=>{const t=e.results,s=t[t.length-1],n=Array.from(s).map(e=>({transcript:e.transcript,confidence:e.confidence}));null==K||K({isFinal:s.isFinal,alternatives:n})},[K]),W=t.useCallback(e=>{T(!1),F.current=!1,null==O||O({errorMessage:e.error})},[O]),H=t.useCallback(()=>{var e;F.current||null==(e=z.current)||e.start()},[]),U=t.useCallback(()=>{var e;F.current&&(null==(e=z.current)||e.stop())},[]),j=t.useCallback(()=>{var e;F.current&&(null==(e=z.current)||e.abort(),F.current=!1,T(!1))},[]),q=()=>F.current;t.useImperativeHandle(s,()=>({start:H,stop:U,abort:j,isActive:q})),t.useEffect(()=>((()=>{var e;"undefined"==typeof window||"webkitSpeechRecognition"in window||"SpeechRecognition"in window?(null!=(e=z.current)&&e.isActive()&&z.current.stop(),z.current=new a.KendoSpeechRecognition({lang:w,continuous:E,interimResults:D,maxAlternatives:N,events:{start:A,end:L,result:$,error:W}})):O&&O({errorMessage:"Speech Recognition API is not supported in this browser."})})(),()=>{F.current&&U()}),[w,E,D,N,S]);const V=void 0!==e.icon||void 0!==e.iconClass,G=t.useMemo(()=>P?r.stopSmIcon:v||r.microphoneOutlineIcon,[P,v]);return t.createElement(t.Fragment,null,t.createElement(d,{id:I,className:n.classNames({"k-speech-to-text-button":!0,"k-listening":P},C),style:x,svgIcon:V?void 0:G,iconSize:b,fillMode:u,rounded:p,size:m,themeColor:h,"aria-label":null!=f?f:c.toLanguageString(pe,he[pe]),"aria-pressed":P,disabled:g,title:null!=k?k:c.toLanguageString(me,he[me]),onClick:()=>{P?U():H()},...M},e.children),o&&t.createElement(n.WatermarkOverlay,{message:l}))});fe.displayName="KendoSpeechToTextButton";const ve=n.withIdHOC(N);ve.displayName="KendoReactDropDownButton";const ge=n.withIdHOC(C);ge.displayName="KendoReactSplitButton",e.Button=d,e.ButtonGroup=p,e.Chip=Z,e.ChipList=X,e.DropDownButton=ve,e.DropDownButtonClassComponent=N,e.DropDownButtonItem=x,e.FloatingActionButton=de,e.FloatingActionButtonItem=te,e.SpeechToTextButton=fe,e.SplitButton=ge,e.SplitButtonClassComponent=C,e.SplitButtonItem=f,e.Toolbar=A,e.ToolbarItem=$,e.ToolbarSeparator=K,e.ToolbarSpacer=W,e.toolbarButtons=B});
@@ -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: 1770218713,version:"13.4.0-develop.1",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: 1770311984,version:"13.4.0-develop.3",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"});exports.packageMetadata=e;
@@ -8,6 +8,6 @@ export const packageMetadata = Object.freeze({
8
8
  productCode: 'KENDOUIREACT',
9
9
  productCodes: ['KENDOUIREACT'],
10
10
  publishDate: 0,
11
- version: '13.4.0-develop.1',
11
+ version: '13.4.0-develop.3',
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": "13.4.0-develop.1",
3
+ "version": "13.4.0-develop.3",
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",
@@ -27,9 +27,9 @@
27
27
  "peerDependencies": {
28
28
  "@progress/kendo-licensing": "^1.7.2",
29
29
  "@progress/kendo-webspeech-common": "^1.0.1",
30
- "@progress/kendo-react-common": "13.4.0-develop.1",
31
- "@progress/kendo-react-intl": "13.4.0-develop.1",
32
- "@progress/kendo-react-popup": "13.4.0-develop.1",
30
+ "@progress/kendo-react-common": "13.4.0-develop.3",
31
+ "@progress/kendo-react-intl": "13.4.0-develop.3",
32
+ "@progress/kendo-react-popup": "13.4.0-develop.3",
33
33
  "@progress/kendo-svg-icons": "^4.0.0",
34
34
  "react": "^16.8.2 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc",
35
35
  "react-dom": "^16.8.2 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc"
@@ -64,7 +64,7 @@
64
64
  "package": {
65
65
  "productName": "KendoReact",
66
66
  "productCode": "KENDOUIREACT",
67
- "publishDate": 1770218713,
67
+ "publishDate": 1770311984,
68
68
  "licensingDocsUrl": "https://www.telerik.com/kendo-react-ui/components/my-license/"
69
69
  }
70
70
  },
@@ -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 p=require("react"),l=require("@progress/kendo-react-common"),m=require("@progress/kendo-react-intl"),r=require("../messages/index.js"),s=require("@progress/kendo-svg-icons");function f(t){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const o in t)if(o!=="default"){const e=Object.getOwnPropertyDescriptor(t,o);Object.defineProperty(n,o,e.get?e:{enumerable:!0,get:()=>t[o]})}}return n.default=t,Object.freeze(n)}const i=f(p),S=t=>{const n=m.useLocalization(),{disabled:o,type:e,scrollContentRef:c,buttonScrollSpeed:a,prevButton:u,nextButton:d}=t,b=k=>{c&&c.current&&a&&c.current.scrollBy({left:e==="next"?a:-a,behavior:"smooth"})},g=e==="prev"?u||"span":d||"span";return i.createElement(g,{className:l.classNames("k-button","k-button-base","k-rounded-md","k-icon-button",`k-toolbar-${e}`,{"k-disabled":o}),title:`${e==="prev"?n.toLanguageString(r.prevArrowTitle,r.messages[r.prevArrowTitle]):n.toLanguageString(r.nextArrowTitle,r.messages[r.nextArrowTitle])}`,"aria-hidden":!0,tabIndex:o?-1:void 0,onClick:b},i.createElement(l.SvgIcon,{icon:e==="prev"?s.caretAltLeftIcon:s.caretAltRightIcon,className:"k-button-icon"}))};exports.ToolbarScrollButton=S;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("react"),l=require("@progress/kendo-react-common"),m=require("@progress/kendo-react-intl"),r=require("../messages/index.js"),s=require("@progress/kendo-svg-icons");function f(t){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const o in t)if(o!=="default"){const e=Object.getOwnPropertyDescriptor(t,o);Object.defineProperty(n,o,e.get?e:{enumerable:!0,get:()=>t[o]})}}return n.default=t,Object.freeze(n)}const i=f(p),S=t=>{const n=m.useLocalization(),{disabled:o,type:e,scrollContentRef:c,buttonScrollSpeed:a,prevButton:u,nextButton:d}=t,b=v=>{c&&c.current&&a&&c.current.scrollBy({left:e==="next"?a:-a,behavior:"smooth"})},g=e==="prev"?u||"span":d||"span";return i.createElement(g,{className:l.classNames("k-button","k-icon-button",`k-toolbar-${e}`,{"k-disabled":o}),title:`${e==="prev"?n.toLanguageString(r.prevArrowTitle,r.messages[r.prevArrowTitle]):n.toLanguageString(r.nextArrowTitle,r.messages[r.nextArrowTitle])}`,"aria-hidden":!0,tabIndex:o?-1:void 0,onClick:b},i.createElement(l.SvgIcon,{icon:e==="prev"?s.caretAltLeftIcon:s.caretAltRightIcon,className:"k-button-icon"}))};exports.ToolbarScrollButton=S;
@@ -6,32 +6,32 @@
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
8
  import * as a from "react";
9
- import { classNames as b, SvgIcon as f } from "@progress/kendo-react-common";
9
+ import { classNames as d, SvgIcon as f } from "@progress/kendo-react-common";
10
10
  import { useLocalization as g } from "@progress/kendo-react-intl";
11
11
  import { prevArrowTitle as l, messages as c, nextArrowTitle as i } from "../messages/index.mjs";
12
- import { caretAltLeftIcon as k, caretAltRightIcon as v } from "@progress/kendo-svg-icons";
12
+ import { caretAltLeftIcon as v, caretAltRightIcon as S } from "@progress/kendo-svg-icons";
13
13
  const I = (s) => {
14
- const n = g(), { disabled: r, type: t, scrollContentRef: o, buttonScrollSpeed: e, prevButton: m, nextButton: u } = s, p = (S) => {
14
+ const n = g(), { disabled: r, type: t, scrollContentRef: o, buttonScrollSpeed: e, prevButton: m, nextButton: p } = s, u = (k) => {
15
15
  o && o.current && e && o.current.scrollBy({
16
16
  left: t === "next" ? e : -e,
17
17
  behavior: "smooth"
18
18
  });
19
- }, d = t === "prev" ? m || "span" : u || "span";
19
+ }, b = t === "prev" ? m || "span" : p || "span";
20
20
  return (
21
21
  // Using span instead of real Button component is intentional.
22
22
  // Ref: https://progresssoftware.atlassian.net/wiki/spaces/DE/pages/edit-v2/544997922#Hidden-interactive-elements
23
23
  /* @__PURE__ */ a.createElement(
24
- d,
24
+ b,
25
25
  {
26
- className: b("k-button", "k-button-base", "k-rounded-md", "k-icon-button", `k-toolbar-${t}`, {
26
+ className: d("k-button", "k-icon-button", `k-toolbar-${t}`, {
27
27
  "k-disabled": r
28
28
  }),
29
29
  title: `${t === "prev" ? n.toLanguageString(l, c[l]) : n.toLanguageString(i, c[i])}`,
30
30
  "aria-hidden": !0,
31
31
  tabIndex: r ? -1 : void 0,
32
- onClick: p
32
+ onClick: u
33
33
  },
34
- /* @__PURE__ */ a.createElement(f, { icon: t === "prev" ? k : v, className: "k-button-icon" })
34
+ /* @__PURE__ */ a.createElement(f, { icon: t === "prev" ? v : S, className: "k-button-icon" })
35
35
  )
36
36
  );
37
37
  };