@progress/kendo-react-buttons 14.0.0-develop.1 → 14.0.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.
package/Chip/Chip.mjs CHANGED
@@ -8,7 +8,7 @@
8
8
  import * as a from "react";
9
9
  import l from "prop-types";
10
10
  import { ChipListSelectionContext as H, ChipListFocusContext as U, ChipListDataContext as W } from "./chip-list-contexts.mjs";
11
- import { useDir as j, Keys as u, useMouse as q, classNames as I, getTabIndex as G, kendoThemeMaps as O, IconWrap as C, toIconName as E, svgIconPropType as x } from "@progress/kendo-react-common";
11
+ import { useDir as j, Keys as u, useMouse as q, classNames as I, kendoThemeMaps as O, getTabIndex as G, IconWrap as C, toIconName as E, svgIconPropType as x } from "@progress/kendo-react-common";
12
12
  import { xCircleIcon as w } from "@progress/kendo-svg-icons";
13
13
  import { FOCUS_ACTION as v } from "./focus-reducer.mjs";
14
14
  import { CHIP_DATA_ACTION as J } from "./data-reducer.mjs";
package/Chip/ChipList.mjs CHANGED
@@ -7,7 +7,7 @@
7
7
  */
8
8
  import * as t from "react";
9
9
  import e from "prop-types";
10
- import { useDir as W, getter as O, useMouse as X, classNames as Y, getTabIndex as Z, kendoThemeMaps as _ } from "@progress/kendo-react-common";
10
+ import { useDir as W, getter as O, useMouse as X, classNames as Y, kendoThemeMaps as Z, getTabIndex as _ } from "@progress/kendo-react-common";
11
11
  import { selectionReducer as V } from "./selection-reducer.mjs";
12
12
  import { focusReducer as ee } from "./focus-reducer.mjs";
13
13
  import { dataReducer as te } from "./data-reducer.mjs";
@@ -103,13 +103,13 @@ const ie = (a, i, s) => {
103
103
  id: r,
104
104
  dir: F,
105
105
  style: p,
106
- tabIndex: Z(c, y, void 0),
106
+ tabIndex: _(c, y, void 0),
107
107
  className: Y(
108
108
  "k-chip-list",
109
109
  {
110
110
  "k-rtl": F === "rtl",
111
111
  "k-disabled": y,
112
- [`k-chip-list-${_.sizeMap[f] || f}`]: f
112
+ [`k-chip-list-${Z.sizeMap[f] || f}`]: f
113
113
  },
114
114
  d
115
115
  ),
@@ -8,7 +8,7 @@
8
8
  import * as p from "react";
9
9
  import s from "prop-types";
10
10
  import { Button as K } from "../Button.mjs";
11
- import { withIdHOC as M, withPropsContext as A, createPropsContext as R, withUnstyledHOC as T, withZIndexContext as L, Keys as r, dispatchEvent as d, getActiveElement as f, validatePackage as z, getLicenseMessage as U, svgIconPropType as Z, classNames as u, uDropDownButton as c, WatermarkOverlay as $, ZIndexContext as W } from "@progress/kendo-react-common";
11
+ import { withIdHOC as M, withPropsContext as A, withUnstyledHOC as R, withZIndexContext as T, createPropsContext as L, Keys as r, dispatchEvent as d, getActiveElement as f, validatePackage as z, getLicenseMessage as U, svgIconPropType as Z, classNames as u, uDropDownButton as c, WatermarkOverlay as $, ZIndexContext as W } from "@progress/kendo-react-common";
12
12
  import { navigate as _ } from "./utils/navigation.mjs";
13
13
  import { DropDownButtonItem as H } from "./DropDownButtonItem.mjs";
14
14
  import { ButtonItem as X } from "./ButtonItem.mjs";
@@ -299,10 +299,10 @@ m.propTypes = {
299
299
  themeColor: void 0
300
300
  };
301
301
  let g = m;
302
- const V = R(), Y = M(
302
+ const V = L(), Y = M(
303
303
  A(
304
304
  V,
305
- T(L(g))
305
+ R(T(g))
306
306
  )
307
307
  );
308
308
  Y.displayName = "KendoReactDropDownButton";
@@ -12,4 +12,4 @@
12
12
  * Licensed under commercial license. See LICENSE.md in the package root for more information
13
13
  *-------------------------------------------------------------------------------------------
14
14
  */
15
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("prop-types"),require("@progress/kendo-react-common"),require("@progress/kendo-react-popup"),require("@progress/kendo-svg-icons"),require("@progress/kendo-react-intl"),require("@progress/kendo-webspeech-common"),require("@progress/kendo-smartpaste-common")):"function"==typeof define&&define.amd?define(["exports","react","prop-types","@progress/kendo-react-common","@progress/kendo-react-popup","@progress/kendo-svg-icons","@progress/kendo-react-intl","@progress/kendo-webspeech-common","@progress/kendo-smartpaste-common"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).KendoReactButtons={},e.React,e.PropTypes,e.KendoReactCommon,e.KendoReactPopup,e.KendoSvgIcons,e.KendoReactIntl,e.KendoWebspeechCommon,e.KendoSmartpasteCommon)}(this,function(e,t,n,s,o,r,i,a,l){"use strict";function c(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(n){if("default"!==n){var s=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,s.get?s:{enumerable:!0,get:function(){return e[n]}})}}),t.default=e,Object.freeze(t)}var d=c(t);const u=d.forwardRef((e,t)=>{const{children:n,togglable:o,dir:r,disabled:i,selected:a,icon:l,iconClass:c,svgIcon:u,imageUrl:m,imageAlt:h,className:f,startIcon:v,endIcon:g,onClick:b,size:y=p.size,rounded:k=p.rounded,fillMode:C=p.fillMode,themeColor:I=p.themeColor,ariaPressed:x,iconSize:w,...E}=e,D=d.useRef(void 0),N=d.useRef(null),[S,B]=d.useState(!0===o&&!0===a),K=void 0!==u||void 0!==l||void 0!==c||void 0!==m,R=void 0!==n,O=s.useUnstyled(),M=e.unstyled||O,z=M&&M.uButton;d.useImperativeHandle(t,()=>({element:N.current,selected:void 0!==D.current?D.current:S})),d.useMemo(()=>{o&&void 0!==a&&a!==S&&B(a)},[o,a]),d.useEffect(()=>{D.current=void 0},[S]);const F=function({imageUrl:e,name:t,iconClass:n,svgIcon:o,imageAlt:r,buttonClasses:i,iconSize:a}){return e?d.createElement("img",{role:"presentation",className:s.classNames(s.uButton.icon({c:i})),alt:r,src:e}):t||o?d.createElement(s.IconWrap,{className:s.classNames(s.uButton.icon({c:i})),name:t,icon:o,size:a}):n?d.createElement("span",{role:"presentation",className:s.classNames(s.uButton.icon({c:i}),n)}):null}({name:l,svgIcon:u,iconClass:c,imageUrl:m,imageAlt:h,buttonClasses:z,iconSize:w}),P=e=>d.cloneElement(e,{className:s.classNames(s.uButton.icon({c:z}),e.props.className)}),T=d.useMemo(()=>o?S:x||void 0,[]);return d.createElement("button",{ref:N,"aria-pressed":T,...E,dir:r,disabled:i,onClick:e=>{o&&void 0===a&&(D.current=!S,B(!S)),b&&b.call(void 0,e)},className:s.classNames(s.uButton.wrapper({c:z,isRtl:"rtl"===r,selected:S,disabled:i,size:y,fillMode:C,rounded:k,themeColor:I,iconButton:!R&&K}),f)},v&&P(v),F,n&&d.createElement("span",{className:s.classNames(s.uButton.text({c:z}))},n),g&&P(g))}),p={size:void 0,rounded:void 0,fillMode:void 0,themeColor:void 0};u.displayName="KendoReactButton",u.propTypes={children:n.node,selected:n.bool,togglable:n.bool,icon:n.string,svgIcon:s.svgIconPropType,iconClass:n.string,imageUrl:n.string,imageAlt:n.string,size:n.oneOf(["small","medium","large"]),rounded:n.oneOf(["small","medium","large","full","none"]),fillMode:n.oneOf(["flat","link","outline","solid","clear"]),themeColor:n.oneOf(["base","primary","secondary","tertiary","info","success","warning","error","dark","light","inverse"])};const m=e=>{const{children:t,className:n,dir:o,disabled:r,width:i}=e,a=s.useUnstyled(),l=e.unstyled||a,c=l&&l.uButtonGroup,u=(e,t)=>{const n={...i?{width:i}:{},...e.props.style||{}},s=r||e.props.disabled,o={...e.props,...t?{className:t}:{},...Object.keys(n).length?{style:n}:{},...void 0!==s?{disabled:s}:{}};return d.Children.count(e.props.children)>0?d.cloneElement(e,o,e.props.children):d.cloneElement(e,o)},p=d.useRef(null),m=(e=>{const t=d.Children.count(e),n=void 0!==o?"rtl"===o:p.current&&"rtl"===getComputedStyle(p.current).direction||!1;return d.Children.map(e,(e,o)=>{if(d.isValidElement(e)){const r=o===t-1,i=n,a=s.classNames(e.props.className,s.uButtonGroup.position({c:c,start:i?r:0===o,end:i?0===o:r}));return u(e,a)}return e})})(t),h=s.classNames(s.uButtonGroup.wrapper({c:c,stretched:!!i,disabled:r}),n),f={className:h,style:{width:`${i}`},dir:o,role:"group","aria-disabled":r};return d.createElement("div",{ref:p,...f,className:h},m)};m.propTypes={children:n.oneOfType([n.arrayOf(n.element),n.element]),className:n.string,disabled:n.bool,width:n.string,dir:n.string};const h=e=>{const t=s.useUnstyled(),n=e.unstyled||t,o=n&&n.uDropDownButton,r=d.useCallback(t=>{e.onClick(t,e.index)},[e]),i=e.dataItem.render||e.item||(void 0===e.item?e.render:null),a=void 0!==e.dataItem.text?e.dataItem.text:e.textField?e.dataItem[e.textField]:e.dataItem,l=d.createElement("li",{id:e.id,className:s.classNames(s.uDropDownButton.li({c:o,focused:e.focused}),e.className),tabIndex:-1,onClick:r,onMouseDown:e.onDown,onPointerDown:e.onDown,role:"menuitem","aria-disabled":e.dataItem.disabled||void 0},d.createElement("span",{tabIndex:-1,className:s.classNames(s.uDropDownButton.link({c:o,selected:e.dataItem.selected,disabled:e.dataItem.disabled})),key:"icon"},i?d.createElement(i,{item:e.dataItem,itemIndex:e.index}):d.createElement(d.Fragment,null,(e.dataItem.icon||e.dataItem.iconClass||e.dataItem.svgIcon)&&d.createElement(s.IconWrap,{className:e.dataItem.iconClass,name:e.dataItem.icon,icon:e.dataItem.svgIcon}),e.dataItem.imageUrl&&d.createElement("img",{role:"presentation",alt:"",src:e.dataItem.imageUrl,className:"k-icon"}),a&&d.createElement("span",{className:"k-menu-link-text"},a))));return void 0!==e.item&&void 0!==e.render?e.render.call(void 0,l,e):l};h.displayName="KendoReactButtonItem";const f=class extends d.Component{render(){return null}};f.propTypes={text:n.string,icon:n.string,iconClass:n.string,imageUrl:n.string,disabled:n.bool,render:n.any};let v=f;const g=(e,t,n,o)=>{if(n)return e;const r=Math.min(o-1,Math.max(0,e));switch(t){case s.Keys.enter:case s.Keys.space:case s.Keys.esc:return-1;case s.Keys.up:case s.Keys.left:return r-1<0?o-1:r-1;case s.Keys.down:case s.Keys.right:return r+1>=o?0:r+1;case s.Keys.home:return 0;case s.Keys.end:return o-1;default:return e}};function b(e){const t={horizontal:"left",vertical:"bottom"};return e&&(t.horizontal="right"),t}function y(e){const t={horizontal:"left",vertical:"top"};return e&&(t.horizontal="right"),t}const k=Object.freeze({name:"@progress/kendo-react-buttons",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate:0,version:"14.0.0-develop.1",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"}),C=class extends d.Component{constructor(e){super(e),this.state={focused:!1,focusedIndex:-1,opened:!1},this.wrapper=null,this.mainButton=null,this.list=null,this.skipFocus=!1,this.buttonsData=[],this.showLicenseWatermark=!1,this.onKeyDown=e=>{const{focusedIndex:t}=this.state;if(e.altKey)return void(this.opened||e.keyCode!==s.Keys.down?this.opened&&e.keyCode===s.Keys.up&&(e.preventDefault(),this.setState({focusedIndex:-1}),this.setOpen(!1,e)):(e.preventDefault(),this.setState({focusedIndex:0}),this.setOpen(!0,e)));let n;if(e.keyCode===s.Keys.enter||e.keyCode===s.Keys.space){if(e.preventDefault(),this.dispatchClickEvent(e,t),t>=0){n={focusedIndex:this.opened?-1:0};const t=!this.opened;this.setOpen(t,e)}}else if(this.opened&&e.keyCode===s.Keys.esc)return this.setState({focusedIndex:-1}),void this.setOpen(!1,e);if(this.opened){const o=g(t,e.keyCode,e.altKey,this.buttonsData.length);o!==t&&(n=n||{},n.focusedIndex=o);const r=e.keyCode===s.Keys.up||e.keyCode===s.Keys.down||e.keyCode===s.Keys.left||e.keyCode===s.Keys.right;!e.altKey&&(r||e.keyCode===s.Keys.home||e.keyCode===s.Keys.end)&&e.preventDefault()}n&&this.setState(n)},this.switchFocus=e=>{this.skipFocus=!0,e(),window.setTimeout(()=>this.skipFocus=!1,0)},this.onFocus=e=>{this.skipFocus||(s.dispatchEvent(this.props.onFocus,e,this,void 0),this.setState({focused:!0}))},this.setOpen=(e,t)=>{this.opened!==e&&(this.openedDuringOnChange=e,this.setState({opened:e}),t?this.dispatchPopupEvent(t,e):this.openedDuringOnChange=void 0)},this.onItemClick=(e,t)=>{this.opened&&this.setState({focusedIndex:0}),this.dispatchClickEvent(e,t),this.setOpen(!1,e)},this.onBlur=e=>{this.skipFocus||(this.setState({focused:!1,focusedIndex:-1}),s.dispatchEvent(this.props.onBlur,e,this,void 0),setTimeout(()=>{this.setOpen(!1,e)},0))},this.onPopupClose=e=>{var t;const n=s.getActiveElement(document);this.element&&this.element.removeAttribute("tabindex"),(n===this.list||null!=(t=this.list)&&t.contains(n))&&this.switchFocus(()=>{this.element&&this.element.focus({preventScroll:!0})}),this.props.popupSettings&&this.props.popupSettings.onClose&&this.props.popupSettings.onClose.call(void 0,e)},this.listRef=e=>{this.list=e,e&&this.state.focused&&this.switchFocus(()=>{e.focus({preventScroll:!0}),this.element&&(this.element.tabIndex=-1)})},this.onSplitPartClick=e=>{if(this.buttonsData.length){const t=!this.opened;this.setState({focusedIndex:t?0:-1,focused:!0}),this.setOpen(t,e)}},this.onDownSplitPart=e=>{e.preventDefault();const t=s.getActiveElement(document);this.element&&t!==this.element&&t!==this.list&&this.element.focus()},this.onItemDown=e=>{s.getActiveElement(document)===this.list&&e.preventDefault()},this.dispatchPopupEvent=(e,t)=>{s.dispatchEvent(t?this.props.onOpen:this.props.onClose,e,this,void 0),this.openedDuringOnChange=void 0},this.showLicenseWatermark=!s.validatePackage(k,{component:"SplitButton"}),this.licenseMessage=s.getLicenseMessage(k)}get guid(){return this.props.id?this.props.id+"-accessibility-id":this.props.id}get opened(){return void 0!==this.openedDuringOnChange?this.openedDuringOnChange:void 0===this.props.opened?this.state.opened:this.props.opened}render(){this.buttonsData=this.props.items||d.Children.toArray(this.props.children).filter(e=>e&&e.type===v).map(e=>e.props);const e=this.isRtl(),t=e?"rtl":void 0,{id:n,style:o,tabIndex:i,disabled:a}=this.props;return d.createElement(d.Fragment,null,d.createElement("div",{id:n,style:o,className:s.classNames("k-split-button","k-button-group",{"k-focus":this.state.focused},this.props.rounded&&`k-rounded-${s.kendoThemeMaps.roundedMap[this.props.rounded]}`,this.props.className),onKeyDown:this.onKeyDown,onFocus:this.onFocus,onBlur:this.onBlur,dir:t,ref:e=>{this.wrapper=e}},d.createElement(u,{ref:e=>{this.mainButton=e&&e.element},type:"button",size:this.props.size,rounded:this.props.rounded,fillMode:this.props.fillMode,themeColor:this.props.themeColor,onClick:e=>this.onItemClick(e,-1),disabled:a||void 0,tabIndex:i,accessKey:this.props.accessKey,className:this.props.buttonClass,icon:this.props.icon,svgIcon:this.props.svgIcon,iconClass:this.props.iconClass,startIcon:this.props.startIcon,endIcon:this.props.endIcon,imageUrl:this.props.imageUrl,dir:t,"aria-disabled":a,"aria-haspopup":!0,"aria-expanded":this.opened||void 0,"aria-label":this.props.ariaLabel,"aria-controls":this.opened?this.guid:void 0,id:"button-"+this.guid,title:this.props.title},this.props.text),d.createElement(u,{type:"button",size:this.props.size,rounded:this.props.rounded,fillMode:this.props.fillMode,themeColor:this.props.themeColor,icon:"caret-alt-down",svgIcon:r.caretAltDownIcon,className:"k-split-button-arrow",disabled:a||void 0,tabIndex:-1,onClick:this.onSplitPartClick,onMouseDown:this.onDownSplitPart,onPointerDown:this.onDownSplitPart,dir:t,"aria-label":"menu toggling button"}),this.renderPopup(e)),this.showLicenseWatermark&&d.createElement(s.WatermarkOverlay,{message:this.licenseMessage}))}componentDidMount(){(void 0===this.props.dir&&this.isRtl()||this.opened)&&this.forceUpdate()}get element(){return this.mainButton}dispatchClickEvent(e,t){this.isItemDisabled(t)||(-1===t?s.dispatchEvent(this.props.onButtonClick,e,this,void 0):s.dispatchEvent(this.props.onItemClick,e,this,{item:this.buttonsData[t],itemIndex:t}))}renderPopup(e){const{popupSettings:t={}}=this.props,{focusedIndex:n}=this.state;return d.createElement(o.Popup,{anchor:this.wrapper,show:this.opened,animate:t.animate,popupClass:s.classNames("k-menu-popup",t.popupClass),anchorAlign:t.anchorAlign||b(e),popupAlign:t.popupAlign||y(e),style:e?{direction:"rtl"}:void 0,onClose:this.onPopupClose},d.createElement("ul",{role:"menu",id:this.guid,"aria-labelledby":"button-"+this.guid,tabIndex:-1,ref:this.listRef,"aria-activedescendant":n>=0?`${this.guid}-${n}`:void 0,className:s.classNames("k-menu-group",{[`k-menu-group-${s.kendoThemeMaps.sizeMap[this.props.size]||this.props.size}`]:this.props.size})},this.renderChildItems()))}renderChildItems(){const{item:e,itemRender:t,textField:n}=this.props;return this.buttonsData.length>0?this.buttonsData.map((o,r)=>d.createElement(h,{className:s.classNames("k-menu-item",{"k-first":0===r},{"k-last":r===this.buttonsData.length-1}),dataItem:o,textField:n,focused:this.state.focusedIndex===r,onClick:this.onItemClick,onDown:this.onItemDown,render:t,item:e,key:r,index:r,id:`${this.guid}-${r}`})):null}isItemDisabled(e){return this.buttonsData[e]?this.buttonsData[e].disabled:this.props.disabled}isRtl(){return void 0!==this.props.dir?"rtl"===this.props.dir:!!this.wrapper&&"rtl"===getComputedStyle(this.wrapper).direction}};C.propTypes={accessKey:n.string,ariaLabel:n.string,title:n.string,onButtonClick:n.func,onFocus:n.func,onBlur:n.func,onItemClick:n.func,onOpen:n.func,onClose:n.func,text:n.string,items:n.arrayOf(n.any),textField:n.string,tabIndex:n.number,disabled:n.bool,icon:n.string,svgIcon:s.svgIconPropType,imageUrl:n.string,popupSettings:n.object,itemRender:n.any,item:n.func,className:n.string,buttonClass:n.string,dir:n.string,size:n.oneOf(["small","medium","large"]),rounded:n.oneOf(["small","medium","large","full","none"]),fillMode:n.oneOf(["flat","link","outline","solid","clear"]),themeColor:n.oneOf(["base","primary","secondary","tertiary","info","success","warning","error","dark","light","inverse"])},C.defaultProps={size:void 0,rounded:void 0,fillMode:void 0,themeColor:void 0};let I=C;const x=class extends d.Component{render(){return null}};x.propTypes={text:n.string,icon:n.string,iconClass:n.string,imageUrl:n.string,selected:n.bool,disabled:n.bool,render:n.any};let w=x;const E=class extends d.Component{constructor(e){super(e),this.state={opened:!1,focused:!1,focusedIndex:-1},this.mainButton=null,this.list=null,this.skipFocus=!1,this.showLicenseWatermark=!1,this.buttonsData=[],this.onKeyDown=e=>{const{focusedIndex:t}=this.state;if(e.altKey)return void(this.opened||e.keyCode!==s.Keys.down?this.opened&&e.keyCode===s.Keys.up&&(e.preventDefault(),this.setState({focusedIndex:-1}),this.setOpen(!1,e)):(e.preventDefault(),this.setOpen(!0,e),this.setState({focusedIndex:0})));const n={...this.state};if(e.keyCode===s.Keys.enter||e.keyCode===s.Keys.space){e.preventDefault(),t>=0&&this.dispatchClickEvent(e,t);const n=!this.opened;return this.setState({focused:!0,focusedIndex:n?0:-1}),void this.setOpen(n,e)}if(this.opened&&e.keyCode===s.Keys.esc)return this.setState({focusedIndex:-1}),void this.setOpen(!1,e);if(this.opened){const o=g(t,e.keyCode,e.altKey,this.buttonsData.length);n.focusedIndex=o;const r=e.keyCode===s.Keys.up||e.keyCode===s.Keys.down||e.keyCode===s.Keys.left||e.keyCode===s.Keys.right;!e.altKey&&(r||e.keyCode===s.Keys.home||e.keyCode===s.Keys.end)&&e.preventDefault()}this.setState(n)},this.switchFocus=e=>{this.skipFocus=!0,e(),window.setTimeout(()=>this.skipFocus=!1,0)},this.handleFocus=e=>{this.skipFocus||(this.setState({focused:!0,focusedIndex:this.opened?0:-1}),s.dispatchEvent(this.props.onFocus,e,this,void 0))},this.handleButtonBlur=e=>{this.opened||(this.setState({focused:!1}),s.dispatchEvent(this.props.onBlur,e,this,void 0))},this.handleMenuBlur=e=>{this.skipFocus||(this.setState({focused:!1,focusedIndex:-1}),s.dispatchEvent(this.props.onBlur,e,this,void 0),setTimeout(()=>{this.setOpen(!1,e)},0))},this.setOpen=(e,t)=>{this.opened!==e&&(this.openedDuringOnChange=e,this.setState({opened:e}),t?this.dispatchPopupEvent(t,e):this.openedDuringOnChange=void 0)},this.onItemClick=(e,t)=>{this.setState({focusedIndex:-1}),this.dispatchClickEvent(e,t),this.setOpen(!1,e)},this.onItemDown=e=>{s.getActiveElement(document)===this.list&&e.preventDefault()},this.mouseDown=e=>{e.preventDefault();const t=s.getActiveElement(document);this.element&&t!==this.element&&t!==this.list&&this.element.focus()},this.onPopupClose=e=>{var t;const n=s.getActiveElement(document);this.element&&this.element.removeAttribute("tabindex"),(n===this.list||null!=(t=this.list)&&t.contains(n))&&this.switchFocus(()=>{this.element&&this.element.focus({preventScroll:!0})}),this.props.popupSettings&&this.props.popupSettings.onClose&&this.props.popupSettings.onClose.call(void 0,e)},this.listRef=e=>{this.list=e,e&&this.state.focused&&this.switchFocus(()=>{e.focus({preventScroll:!0}),this.element&&(this.element.tabIndex=-1)})},this.onClickMainButton=e=>{if(s.dispatchEvent(this.props.onClick,e,this,void 0),!this.buttonsData.length)return;const t=!this.opened;this.setState({focused:!0,focusedIndex:t?0:-1}),this.setOpen(t,e)},this.dispatchPopupEvent=(e,t)=>{s.dispatchEvent(t?this.props.onOpen:this.props.onClose,e,this,void 0),this.openedDuringOnChange=void 0},this.showLicenseWatermark=!s.validatePackage(k,{component:"DropDownButton"}),this.licenseMessage=s.getLicenseMessage(k)}get guid(){return this.props.id+"-accessibility-id"}get opened(){return void 0!==this.openedDuringOnChange?this.openedDuringOnChange:void 0===this.props.opened?this.state.opened:this.props.opened}render(){const e=this.isRtl(),t=this.props.unstyled&&this.props.unstyled.uDropDownButton,n=e?"rtl":void 0,{id:o,style:r,tabIndex:i,disabled:a,size:l,rounded:c,fillMode:p,themeColor:m,ariaLabel:h,title:f,accessKey:v,icon:g,svgIcon:b,iconClass:y,buttonClass:k,className:C,imageUrl:I,startIcon:x,endIcon:E}=this.props;return this.buttonsData=this.props.items||d.Children.toArray(this.props.children).filter(e=>e&&e.type===w).map(e=>e.props),d.createElement(d.Fragment,null,d.createElement(u,{id:o,size:l,style:r,rounded:c,fillMode:p,themeColor:m,onClick:this.onClickMainButton,onMouseDown:this.mouseDown,onKeyDown:this.onKeyDown,onFocus:this.handleFocus,onBlur:this.handleButtonBlur,"aria-disabled":a?"true":void 0,tabIndex:i,accessKey:v,icon:g,svgIcon:b,iconClass:y,className:s.classNames(k,C,s.uDropDownButton.wrapper({c:t,focused:this.state.focused,disabled:a})),imageUrl:I,dir:n,ref:e=>{this.mainButton=(null==e?void 0:e.element)||null},type:"button","aria-expanded":this.opened?"true":"false","aria-label":h,"aria-controls":this.opened?this.guid:void 0,title:f,startIcon:x,endIcon:E},this.props.text),this.showLicenseWatermark&&d.createElement(s.WatermarkOverlay,{message:this.licenseMessage}),this.renderPopup(e))}componentDidMount(){(void 0===this.props.dir&&this.isRtl()||this.opened)&&this.forceUpdate()}get element(){return this.mainButton}dispatchClickEvent(e,t){this.isItemDisabled(t)||s.dispatchEvent(this.props.onItemClick,e,this,{item:this.buttonsData[t],itemIndex:t})}renderPopup(e){const{popupSettings:t={},_zIndex:n,unstyled:r}=this.props,i=n?n+2e3:12e3,a=r&&r.uDropDownButton,{focusedIndex:l}=this.state;return d.createElement(s.ZIndexContext.Provider,{value:i},d.createElement(o.Popup,{anchor:this.mainButton,show:this.opened,animate:t.animate,popupClass:s.classNames(s.uDropDownButton.popup({c:a}),t.popupClass),anchorAlign:t.anchorAlign||b(e),popupAlign:t.popupAlign||y(e),style:e?{direction:"rtl"}:void 0,onClose:this.onPopupClose},d.createElement("ul",{role:"list",id:this.guid,tabIndex:-1,"aria-activedescendant":l>=0?`${this.guid}-${l}`:void 0,ref:this.listRef,onKeyDown:this.onKeyDown,onBlur:this.handleMenuBlur,className:s.classNames(s.uDropDownButton.ul({c:a,size:this.props.size}))},this.renderChildItems())))}renderChildItems(){const{item:e,itemRender:t,textField:n,unstyled:o}=this.props,r=o&&o.uDropDownButton;return this.buttonsData.length>0?this.buttonsData.map((o,i)=>d.createElement(h,{className:s.classNames(s.uDropDownButton.item({c:r}),o.className,{"k-first":0===i},{"k-last":i===this.buttonsData.length-1}),dataItem:o,textField:n,focused:this.state.focusedIndex===i,onClick:this.onItemClick,onDown:this.onItemDown,render:t,item:e,index:i,key:i,id:`${this.guid}-${i}`})):null}isItemDisabled(e){return this.buttonsData[e]?this.buttonsData[e].disabled:this.props.disabled}isRtl(){return void 0!==this.props.dir?"rtl"===this.props.dir:!!this.mainButton&&"rtl"===getComputedStyle(this.mainButton).direction}};E.propTypes={accessKey:n.string,ariaLabel:n.string,title:n.string,onFocus:n.func,onBlur:n.func,onClick:n.func,onItemClick:n.func,onOpen:n.func,onClose:n.func,items:n.arrayOf(n.any),textField:n.string,tabIndex:n.number,disabled:n.bool,icon:n.string,svgIcon:s.svgIconPropType,iconClass:n.string,imageUrl:n.string,popupSettings:n.object,itemRender:n.func,item:n.func,className:n.string,buttonClass:n.string,dir:n.string,size:n.oneOf(["small","medium","large"]),rounded:n.oneOf(["small","medium","large","full","none"]),fillMode:n.oneOf(["flat","link","outline","solid","clear"]),themeColor:n.oneOf(["base","primary","secondary","tertiary","info","success","warning","error","dark","light","inverse"])},E.defaultProps={size:void 0,rounded:void 0,fillMode:void 0,themeColor:void 0};let D=E;const N=s.createPropsContext(),S=s.withIdHOC(s.withPropsContext(N,s.withUnstyledHOC(s.withZIndexContext(D))));S.displayName="KendoReactDropDownButton";const B=":not(.k-dropdownlist button):not(.k-colorpicker button):not(.k-split-button .k-split-button-arrow)",K=["button"+B,".k-button-group > button"+B,".k-colorpicker",".k-dropdownlist"],R=e=>d.createElement("div",{ref:e._ref,className:s.classNames("k-toolbar-separator k-separator",e.className)}),O="prevArrow.title",M="nextArrow.title",z="moreButtonTitle.title",F={[O]:"Previous scroll button",[M]:"Next scroll button",[z]:"More button"},P=e=>{const t=i.useLocalization(),{disabled:n,type:o,scrollContentRef:a,buttonScrollSpeed:l,prevButton:c,nextButton:u}=e,p="prev"===o?c||"span":u||"span";return d.createElement(p,{className:s.classNames("k-button","k-icon-button",`k-toolbar-${o}`,{"k-disabled":n}),title:`${"prev"===o?t.toLanguageString(O,F[O]):t.toLanguageString(M,F[M])}`,"aria-hidden":!0,tabIndex:n?-1:void 0,onClick:e=>{a&&a.current&&l&&a.current.scrollBy({left:"next"===o?l:-l,behavior:"smooth"})}},d.createElement(s.SvgIcon,{icon:"prev"===o?r.caretAltLeftIcon:r.caretAltRightIcon,className:"k-button-icon"}))},T=e=>{const{scrollButtons:t,scrollButtonsPosition:n,isOverflowing:s,scrollContentRef:o,buttonScrollSpeed:r,dir:i,isScrollStartPosition:a,isScrollEndPosition:l,prevButton:c,nextButton:u,children:p}=e,m=(e,t)=>d.createElement(P,{type:e,disabled:t,scrollContentRef:o,buttonScrollSpeed:r,prevButton:c,nextButton:u}),h="visible"===t||"auto"===t&&s;return d.createElement(d.Fragment,null,h&&"split"===n&&d.createElement(d.Fragment,null,m("rtl"!==i?"prev":"next",a),d.createElement(R,{className:"k-toolbar-button-separator"})),h&&"start"===n&&d.createElement(d.Fragment,null,m("rtl"!==i?"prev":"next",a),m("rtl"!==i?"next":"prev",l),d.createElement(R,{className:"k-toolbar-button-separator"})),d.createElement("span",{className:"k-toolbar-items k-toolbar-items-scroll",ref:o},p),h&&"split"===n&&d.createElement(d.Fragment,null,d.createElement(R,{className:"k-toolbar-button-separator"}),m("rtl"!==i?"next":"prev",l)),h&&"end"===n&&d.createElement(d.Fragment,null,d.createElement(R,{className:"k-toolbar-button-separator"}),m("rtl"!==i?"prev":"next",a),m("rtl"!==i?"next":"prev",l)))},A=e=>{var t;const{toolbarRef:n,children:a,fillMode:l,size:c}=e,[p,m]=d.useState(!1),h=d.useRef(d.Children.toArray(a).filter(e=>d.isValidElement(e)).map((e,t)=>d.cloneElement(e,{key:e.key||t}))),f=d.useRef([]),v=d.useRef(0),g=d.useRef(null),b=d.useRef(null),y=i.useLocalization(),[k,C]=d.useReducer(e=>e+1,0),I=()=>{if(!n.current)return;let e=0;const t=n.current.clientWidth,s=parseInt(window.getComputedStyle(n.current).gap||"0",10),o=Array.from(n.current.children).reduce((e,t,n)=>e+=Math.ceil(t.clientWidth),0),r=Array.from(n.current.children).length;if(e=o+r*s+2*s,e>t){const e=[...h.current],n=e.pop();v.current=t,h.current=e,n&&(f.current=[n,...f.current])}else if(t>v.current+s*r){const e=[...f.current],n=e.shift();f.current=e,n&&(h.current=[...h.current,n]),v.current=t}C()};d.useEffect(()=>{I();const e=new ResizeObserver(I),t=n.current;return t&&e.observe(t),()=>{t&&e.unobserve(t)}},[]);return d.createElement(d.Fragment,null,h.current.length>0&&h.current,f.current.length>0&&d.createElement(d.Fragment,null,d.createElement(R,{_ref:b,className:"k-toolbar-button-separator"}),d.createElement(u,{ref:g,className:"k-toolbar-overflow-button",fillMode:"flat",svgIcon:r.moreHorizontalIcon,title:y.toLanguageString(z,F[z]),onClick:()=>{m(!p)}}),d.createElement(o.Popup,{anchor:n.current,show:p,popupClass:"k-toolbar-popup",style:{width:null==(t=n.current)?void 0:t.offsetWidth}},d.createElement("span",{className:`k-toolbar-items-list k-toolbar-items-list-${s.kendoThemeMaps.sizeMap[c]} k-toolbar-items-list-${l}`},f.current.length>0&&f.current))))},L=d.forwardRef((e,t)=>{const{children:n,className:o,id:r,ariaLabel:i,keyboardNavigation:a,role:l,onResize:c,style:u,tabIndex:p=$.tabIndex,size:m=$.size,fillMode:h=$.fillMode,overflow:f,scrollButtons:v=$.scrollButtons,scrollButtonsPosition:g=$.scrollButtonsPosition,buttonScrollSpeed:b=$.buttonScrollSpeed,prevButton:y,nextButton:k,_ariaControls:C}=e,I=d.useRef(!1),x=d.useRef(null),w=d.useRef(null),E=d.useRef(0),D=d.useRef(0),N=d.useRef([]),S=d.useRef({element:null,props:e}),[B,R]=d.useState(!1),[O,M]=d.useState(!0),[z,F]=d.useState(!1),P=s.useDir(x,e.dir),L=d.useMemo(()=>e.buttons||K,[e.buttons]),W=d.useMemo(()=>L.map(e=>e+":focus").join(","),[L]),H=()=>{const e=x.current&&x.current.querySelector(W);return Math.max(0,N.current.findIndex(t=>t===e))};d.useImperativeHandle(S,()=>({element:x.current,props:e})),d.useImperativeHandle(t,()=>S.current),d.useEffect(()=>(window.addEventListener("resize",q),x.current&&(D.current=x.current.offsetWidth,E.current=x.current.offsetHeight,!1!==a&&(N.current=Array.from(x.current.querySelectorAll(L.join(","))),U(0))),()=>{window.removeEventListener("resize",q),N.current.length=0}),[]),d.useEffect(()=>{if(I.current){if(!x.current||!1===a)return;N.current=Array.from(x.current.querySelectorAll(L.join(","))),U(H()),V()}else I.current=!0});const U=e=>{N.current.forEach((t,n)=>{t.tabIndex=n===e?p:-1})},j=(e,t)=>{const n=N.current[t];if(n){n.tabIndex=p,n.focus();const t=N.current[e];t&&(t.tabIndex=-1)}},q=e=>{if(!x.current)return;const t=x.current.offsetWidth,n=x.current.offsetHeight;if(D.current!==t||E.current!==n){D.current=t,E.current=n;const s={offsetWidth:D.current,offsetHeight:E.current};c&&c.call(void 0,{target:S.current,...s,nativeEvent:e})}V()},V=d.useCallback(()=>{const e=w.current;e&&R(e.scrollWidth>e.clientWidth||e.scrollHeight>e.clientHeight)},[]),G=d.useCallback(()=>{const e=w.current;if(e){const t=0===e.scrollLeft,n="rtl"!==P?e.scrollLeft+e.clientWidth===e.scrollWidth:e.clientWidth-e.scrollLeft===e.scrollWidth;t&&M(!0),n&&F(!0),!t&&!n&&(M(!1),F(!1))}},[P]);return d.useEffect(()=>{const e=w.current;if(e)return e.addEventListener("scroll",G),()=>{e.removeEventListener("scroll",G)}},[G]),d.createElement("div",{id:r,"aria-label":i,"aria-controls":C,className:s.classNames("k-toolbar",{[`k-toolbar-${s.kendoThemeMaps.sizeMap[m]||m}`]:m,[`k-toolbar-${h}`]:h,"k-toolbar-scrollable":"scroll"===f,"k-toolbar-scrollable-overlay":"scroll"===f&&("hidden"===v||void 0===v),"k-toolbar-scrollable-start":"scroll"===f&&"hidden"===v&&O,"k-toolbar-scrollable-end":"scroll"===f&&"hidden"===v&&z,"k-toolbar-section":e.overflow&&"section"===f},o),style:u,role:void 0!==l?l||void 0:"toolbar",dir:P,ref:x,onKeyDown:!1!==a?e=>{const t=e.keyCode===s.Keys.left||e.keyCode===s.Keys.right||e.keyCode===s.Keys.home||e.keyCode===s.Keys.end,n=H();!t||e.defaultPrevented||-1===N.current.findIndex(t=>t===e.target)||(e.keyCode===s.Keys.left?j(n,0===n?N.current.length-1:n-1):j(n,n===N.current.length-1?0:n+1),e.keyCode===s.Keys.home&&j(n,0),e.keyCode===s.Keys.end&&j(n,N.current.length-1))}:void 0},"scroll"===f&&d.createElement(T,{scrollButtons:v,scrollButtonsPosition:g,prevButton:y,nextButton:k,isOverflowing:B,scrollContentRef:w,buttonScrollSpeed:b,dir:P,isScrollStartPosition:O,isScrollEndPosition:z,children:n}),"section"===f&&d.createElement(A,{toolbarRef:x,fillMode:h,size:m},n),("none"===f||void 0===f)&&n)}),$={tabIndex:0,size:void 0,fillMode:void 0,scrollButtons:"auto",scrollButtonsPosition:"split",buttonScrollSpeed:100};L.displayName="KendoReactToolbar",L.propTypes={tabIndex:n.number,dir:n.string,keyboardNavigation:n.bool,style:n.object,className:n.string,role:n.string,onResize:n.func,buttons:n.arrayOf(n.string.isRequired),size:n.oneOf(["small","medium","large"]),fillMode:n.oneOf(["solid","flat","outline"]),overflow:n.oneOf(["none","section","scroll"]),scrollButtons:n.oneOf(["hidden","visible","auto"]),scrollButtonsPosition:n.oneOf(["start","end","split"]),buttonScrollSpeed:n.number};const W=d.forwardRef((e,t)=>{const{id:n,className:o,style:r,children:i}=e,a=d.useRef(null);return d.useImperativeHandle(t,()=>({element:a.current})),d.createElement("div",{id:n,className:s.classNames("k-toolbar-item",o),style:r,ref:a},i)});W.displayName="KendoReactToolbarItem",W.propTypes={className:n.string};const H=d.forwardRef((e,t)=>{const n=d.useRef(null),o=d.useRef(null);d.useImperativeHandle(o,()=>({element:n.current})),d.useImperativeHandle(t,()=>({element:n.current}));const r=d.useMemo(()=>s.classNames("k-spacer",e.className),[e.className]);return d.createElement("span",{ref:n,className:r})});H.displayName="KendoReactToolbarSpacer",H.propTypes={className:n.string};const U=t.createContext([null,e=>{}]),j=t.createContext([null,e=>{}]),q=t.createContext([null,e=>{}]);var V=(e=>(e.next="next",e.prev="prev",e.current="current",e.reset="reset",e))(V||{});var G=(e=>(e.remove="remove",e.add="add",e.reorder="reorder",e))(G||{});var Z=(e=>(e.toggle="toggle",e.remove="remove",e))(Z||{});const _=d.forwardRef((e,t)=>{const n=d.useRef(null),o=d.useRef(null),{disabled:i=Q.disabled,fillMode:a=Q.fillMode,themeColor:l=Q.themeColor,size:c=Q.size,rounded:u=Q.rounded,dir:p=Q.dir,removeIcon:m=Q.removeIcon,removeSvgIcon:h=Q.removeSvgIcon,removable:f=Q.removable}=e,v=s.useDir(o,p);d.useImperativeHandle(n,()=>({element:o.current,props:e})),d.useImperativeHandle(t,()=>n.current);const[g,b]=d.useContext(U),[y,k]=d.useContext(j),[,C]=d.useContext(q),I=d.useMemo(()=>e.selected||(Array.isArray(g)?g.some(t=>t===e.value):g===e.value),[e.selected,e.value,g]),x=d.useMemo(()=>y===e.value,[e.value,y]);d.useEffect(()=>{x&&o.current&&o.current.focus()},[x]);const w=d.useCallback(t=>{b({type:Z.toggle,payload:e.value,event:t})},[b,e.value]),E=d.useCallback(t=>{f&&(C({type:G.remove,payload:e.value,event:t}),k({type:V.reset,payload:e.value,event:t}),b({type:Z.remove,payload:e.value,event:t}),e.onRemove&&e.onRemove.call(void 0,{target:n.current,syntheticEvent:t}))},[e.onRemove,e.value,f,C,k,b]),D=d.useCallback(t=>{switch(t.keyCode){case s.Keys.left:k({type:V.prev,payload:e.value,event:t});break;case s.Keys.right:k({type:V.next,payload:e.value,event:t});break;case s.Keys.enter:b({type:Z.toggle,payload:e.value,event:t});break;case s.Keys.delete:E(t)}e.onKeyDown&&e.onKeyDown.call(void 0,{target:n.current,syntheticEvent:t})},[e.onKeyDown,e.value,k,b,E]),N=d.useCallback(t=>{k({payload:e.value,type:V.current,event:t}),e.onFocus&&e.onFocus.call(void 0,{target:n.current,syntheticEvent:t})},[e.onFocus,e.value,k]),S=d.useCallback(t=>{e.onBlur&&e.onBlur.call(void 0,{target:n.current,syntheticEvent:t})},[e.onBlur]),B=s.useMouse(e,n,{onClick:w});return d.createElement("div",{...B,role:e.role||"button",id:e.value,style:e.style,ref:o,dir:v,tabIndex:s.getTabIndex(e.tabIndex,i,void 0),className:s.classNames("k-chip",{"k-rtl":"rtl"===v,"k-disabled":i,"k-selected":I,"k-focus":x,[`k-chip-${s.kendoThemeMaps.sizeMap[c]||c}`]:c,[`k-rounded-${s.kendoThemeMaps.roundedMap[u]||u}`]:u,[`k-chip-${a}`]:a,[`k-chip-${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)&&d.createElement(s.IconWrap,{className:"k-chip-icon",name:e.selectedIcon?s.toIconName(e.selectedIcon):void 0,icon:e.selectedSvgIcon,size:"small"}),(e.icon||e.svgIcon)&&d.createElement(s.IconWrap,{className:"k-chip-icon",name:e.icon?s.toIconName(e.icon):void 0,icon:e.svgIcon,size:"small"}),e.avatar&&d.createElement("div",{className:s.classNames("k-chip-avatar","k-avatar",e.avatar.rounded&&`k-rounded-${e.avatar.rounded}`),style:e.avatar.style},d.createElement("span",{className:"k-avatar-image"},d.createElement("img",{src:e.avatar.image,alt:e.avatar.imageAlt}))),d.createElement("span",{className:"k-chip-content"},void 0!==e.children?e.children:e.text&&d.createElement("span",{"aria-label":e.ariaLabel||e.text,className:"k-chip-label"},e.text)),f&&d.createElement("span",{className:"k-chip-actions"},d.createElement("span",{className:s.classNames("k-chip-action","k-chip-remove-action"),onClick:E},d.createElement(s.IconWrap,{name:m?s.toIconName(m):void 0,icon:h||r.xCircleIcon,size:"small"}))))}),J={id:n.string,text:n.string,value:n.any,dir:n.oneOf(["ltr","rtl"]),removable:n.bool,removeIcon:n.string,removeIconSvg:s.svgIconPropType,disabled:n.bool,icon:n.string,svgIcon:s.svgIconPropType,selectedIcon:n.string,selectedIconSvg:s.svgIconPropType,onRemove:n.func,dataItem:n.any,selected:n.bool,ariaDescribedBy:n.string,size:n.oneOf(["small","medium","large"]),rounded:n.oneOf(["small","medium","large","full","none"]),fillMode:n.oneOf(["outline","solid"]),themeColor:n.oneOf(["base","info","success","warning","error"])},Q={disabled:!1,removable:!1,removeIcon:"k-i-x-circle",removeSvgIcon:r.xCircleIcon,dir:"ltr",size:void 0,rounded:void 0,fillMode:void 0,themeColor:void 0};_.displayName="KendoReactChip",_.propTypes=J;const X=(e,t,n)=>{"multiple"===t.selection?Array.isArray(e)||(e=e?[e]:null):"single"===t.selection&&Array.isArray(e)&&(e=e?e.join(""):null);const[s,o]=d.useState(e);return[s,e=>{const r=((e,t)=>{switch(t.selection){case"single":switch(t.type){case"toggle":if(!Array.isArray(e)||null===e)return t.payload===e?null:t.payload;throw new Error("State cannot be an array in single selection");case"remove":return t.payload===e?null:e;default:return e}case"multiple":switch(t.type){case"toggle":if(Array.isArray(e))return e.some(e=>e===t.payload)?e.filter(e=>e!==t.payload):[...e,t.payload];if(null===e)return[t.payload];throw new Error("State cannot be non-array in multiple selection");case"remove":return Array.isArray(e)?e.some(e=>e===t.payload)?e.filter(e=>e!==t.payload):[...e,t.payload]:e;default:return e}case"none":return null;default:return e}})(t.state||s,{...e,...t});n&&n(r,e.event),"none"!==t.selection&&o(r)}]},Y=d.forwardRef((e,t)=>{const n=d.useRef(null),o=d.useRef(null),{id:r,style:i,tabIndex:a,className:l,ariaDescribedBy:c,ariaLabelledBy:u,ariaLabel:p,value:m,defaultData:h=te.defaultData,chip:f=te.chip,disabled:v=te.disabled,size:g=te.size,defaultValue:b=te.defaultValue,selection:y=te.selection,valueField:k=te.valueField,textField:C=te.textField,dir:I=te.dir,onChange:x,onDataChange:w}=e,E=s.useDir(o,I),D=d.useMemo(()=>f||_,[f,_]);d.useImperativeHandle(n,()=>({element:o.current,props:e})),d.useImperativeHandle(t,()=>n.current);const N=d.useCallback((e,t)=>{x&&n.current&&x.call(void 0,{value:e,target:n.current,syntheticEvent:t})},[x]),[S,B]=X(m||b,{selection:y,state:m},N),K=d.useCallback((e,t)=>{w&&n.current&&w.call(void 0,{value:e,target:n.current,syntheticEvent:t})},[w]),[R,O]=((e,t,n)=>{const[s,o]=d.useState(e);return[s,e=>{const r=((e,t)=>{switch(t.type){case"add":case"reorder":break;case"remove":return e.filter(e=>e[t.valueField]!==t.payload);default:return e}})(t.state||s,{...e,...t});n&&n(r,e.event),o(r)}]})(e.data||h,{state:e.data,valueField:k},K),M=d.useCallback((e,t)=>(e.push(t[k]),e),[k]),z=d.useMemo(()=>e.data||R,[e.data,R]),F=d.useMemo(()=>m||S,[m,S]),P=d.useMemo(()=>z.reduce(M,[]),[z,M]),T=d.useCallback(e=>s.getter(k)(e),[k]),A=d.useCallback(e=>s.getter(C)(e),[C]),[L,$]=(e=>{const[t,n]=d.useState(null);return[t,t=>{const s=((e,t)=>{const n=t.items.findIndex(t=>t===e);switch(t.type){case"next":return n===t.items.length-1?e:t.items[n+1];case"prev":return 0===n?e:t.items[n-1];case"current":return t.payload;case"reset":return null;default:return e}})(t.payload,{...t,...e});n(s)}]})({items:P}),W=s.useMouse(e,n);return d.createElement(U.Provider,{value:[F,B]},d.createElement(j.Provider,{value:[L,$]},d.createElement(q.Provider,{value:[z,O]},d.createElement("div",{ref:o,...W,role:v?void 0:"listbox",id:r,dir:E,style:i,tabIndex:s.getTabIndex(a,v,void 0),className:s.classNames("k-chip-list",{"k-rtl":"rtl"===E,"k-disabled":v,[`k-chip-list-${s.kendoThemeMaps.sizeMap[g]||g}`]:g},l),"aria-label":p,"aria-labelledby":u,"aria-describedby":c,"aria-orientation":"horizontal","aria-multiselectable":"multiple"===y},z.map((e,t)=>d.createElement(D,{role:"option",dataItem:e,size:g,key:[T(e),t].join("-"),text:A(e),value:T(e),ariaLabel:e.ariaLabel,svgIcon:e.svgIcon||void 0}))))))}),ee={id:n.string,className:n.string,tabIndex:n.number,data:n.any,defaultData:n.arrayOf(n.any),onDataChange:n.func,value:n.oneOfType([n.any,n.arrayOf(n.any)]),defaultValue:n.oneOfType([n.any,n.arrayOf(n.any)]),onChange:n.func,selection:n.oneOf(["single","none","multiple"]),textField:n.string,valueField:n.string,disabled:n.bool,dir:n.oneOf(["ltr","rtl"]),ariaLabelledBy:n.string,ariaDescribedBy:n.string,size:n.oneOf(["small","medium","large"])},te={chip:_,size:void 0,disabled:!1,defaultValue:null,defaultData:[],dir:"ltr",selection:"none",textField:"text",valueField:"value"};Y.displayName="KendoReactChipList",Y.propTypes=ee;const ne=d.forwardRef((e,t)=>{const{className:n,disabled:o,text:r,icon:i,style:a,id:l,focused:c,tabIndex:u,index:p,dataItem:m,item:h,svgIcon:f,onDown:v,onClick:g,...b}=e,y=d.useRef(null),k=d.useCallback(()=>{y.current&&y.current.focus()},[]),C=d.useCallback(()=>({element:y.current,focus:k}),[k]);d.useImperativeHandle(t,C);const I=d.useCallback(e=>{g&&void 0!==p&&!o&&g(e,p)},[g,p]),x=d.useMemo(()=>s.classNames("k-fab-item",{"k-focus":c,"k-disabled":o},n),[n,o,c]),w=h;return d.createElement("li",{ref:y,id:l,className:x,style:a,role:"menuitem",tabIndex:s.getTabIndex(u,o),"aria-disabled":o,"aria-label":`${r||""} floatingactionbutton item`,onClick:I,onMouseDown:v,onPointerDown:v,...b},w?d.createElement(w,{itemIndex:p,item:m}):d.createElement(d.Fragment,null,r&&d.createElement("span",{className:"k-fab-item-text"},r),i||f?d.createElement(s.IconWrap,{className:"k-fab-item-icon",name:i,icon:f}):null))});ne.propTypes={className:n.string,style:n.object,children:n.any,disabled:n.bool,focused:n.bool,index:n.number,icon:n.string,svgIcon:s.svgIconPropType,text:n.string,tabIndex:n.number,customProp:n.any},ne.displayName="KendoFloatingActionButtonItem";const se="16px",oe=e=>"number"==typeof e?e+"px":e,re=(e,t)=>{const n={horizontal:t?"right":"left",vertical:"bottom"};return"end"===e.horizontal&&(n.horizontal=t?"left":"right"),n},ie=(e,t)=>{const n={horizontal:t?"right":"left",vertical:"top"};return"end"===e.horizontal&&(n.horizontal=t?"left":"right"),n},ae=(e,t)=>({rtl:{end:"k-text-left",start:"k-text-right"},ltr:{start:"k-text-left",end:"k-text-right"}}[e]["end"===t?"end":"start"]),le=(e,t,n,s)=>{const o=t.horizontal,r=t.vertical;if(e.current){const i=n&&void 0!==n.x?oe(n.x):se,a=n&&void 0!==n.x?`calc(50% + ${oe(n.x)})`:"50%",l=n&&void 0!==n.y?oe(n.y):se,c=n&&void 0!==n.y?`calc(50% + ${oe(n.y)})`:"50%";e.current.style.setProperty(ce(t,s),"center"===o?a:i),e.current.style.setProperty(de(t),"middle"===r?c:l),s&&(("top"===r||"bottom"===r)&&"start"===o&&e.current.style.setProperty("left","unset"),"middle"===r&&"end"===o&&e.current.style.setProperty("right","unset"),"middle"===r&&"start"===o&&e.current.style.setProperty("left","unset"))}},ce=(e,t)=>{const{horizontal:n}=e;return{end:t?"left":"right",center:"left",start:t?"right":"left"}[n||"end"]},de=e=>({top:"top",middle:"top",bottom:"bottom"}[e.vertical||"bottom"]),ue=d.forwardRef((e,t)=>{const{align:n=pe.align,alignOffset:r,className:i,disabled:a,icon:l,svgIcon:c,iconClass:u,id:p,items:m,item:h,text:f,positionMode:v=pe.positionMode,size:g=pe.size,style:b,rounded:y=pe.rounded,themeColor:k=pe.themeColor,overlayStyle:C,tabIndex:I,accessKey:x,popupSettings:w={},modal:E,onClick:D,onItemClick:N,onFocus:S,onBlur:B,onKeyDown:K,onOpen:R,onClose:O,...M}=e,z=s.useZIndexContext(),F=z?z+2:100,P=d.useRef(null),T=d.useRef(null),A=d.useRef(null),L=d.useRef(null),$=d.useCallback(()=>{T.current&&T.current.focus()},[]),W=d.useCallback(()=>({element:T.current,focus:$}),[$]);d.useImperativeHandle(P,W),d.useImperativeHandle(t,()=>P.current);const[H,U]=d.useState(!1),[j,q]=d.useState(!1),[V,G]=d.useState(-1),Z=s.useId()+"-button-id",_=s.useDir(T,e.dir),J="rtl"===_,Q=s.useId()+"-list-id";d.useEffect(()=>{le(T,n,r,J)},[T,n,r,J]),d.useEffect(()=>{j&&T&&T.current&&T.current.focus()},[j,T]);const X=d.useCallback((e,t)=>{m&&s.dispatchEvent(t?R:O,e,W(),void 0)},[R,O,m]),Y=d.useCallback(e=>{!e.target||a||(!m&&D?s.dispatchEvent(D,e,W(),void 0):(U(!H),q(!0),G(H?-1:0),X(e,!H)))},[U,q,G,D,X,H,m,a]),ee=d.useCallback(e=>{q(!0),G(H?0:-1),S&&s.dispatchEvent(S,e,W(),void 0)},[S,q,G]),te=d.useCallback(e=>{q(!1),U(!1),G(-1),s.dispatchEvent(B,e,W(),void 0),H&&X(e,!1)},[B,q,U,G,X]),se=d.useCallback(e=>{e.preventDefault()},[]),oe=d.useCallback((e,t)=>{m&&(m[t].disabled||s.dispatchEvent(N,e,W(),{itemProps:m[t],itemIndex:t}))},[N]),ce=d.useCallback((e,t)=>{!e.target||!m||(G(t),U(!1),oe(e,t),X(e,!1))},[G,U,oe,X]),de=d.useCallback(e=>{s.getActiveElement(document)===T.current&&e.preventDefault()},[T]),ue=d.useCallback(e=>{const t=V,n=m?m.length:-1;if(e.altKey)return!H&&e.keyCode===s.Keys.down&&(e.preventDefault(),U(!0),G(0)),void(H&&e.keyCode===s.Keys.up&&(e.preventDefault(),U(!1),G(-1)));switch(e.keyCode){case s.Keys.enter:case s.Keys.space:t>=0&&oe(e,t),m||Y(e),e.preventDefault(),U(!H),G(H?-1:0);break;case s.Keys.esc:e.preventDefault(),U(!1),G(-1);break;case s.Keys.home:e.preventDefault(),G(0);break;case s.Keys.end:e.preventDefault(),G(n-1);break;case s.Keys.down:case s.Keys.right:e.preventDefault(),G(t+1>=n?0:t+1);break;case s.Keys.up:case s.Keys.left:e.preventDefault(),G(t-1<0?n-1:t-1)}s.dispatchEvent(K,e,W(),void 0)},[K,V,G,J,U]),me=d.useMemo(()=>s.classNames("k-fab",{"k-fab-sm":"small"===g,"k-fab-md":"medium"===g,"k-fab-lg":"large"===g,"k-disabled":a,"k-pos-absolute":"absolute"===v,"k-pos-fixed":"fixed"===v,"k-focus":j,[`k-rounded-${s.kendoThemeMaps.roundedMap[y]||y}`]:y,[`k-fab-${k}`]:k},`k-${n.vertical}-${n.horizontal}`,i),[k,g,y,a,v,n,j,i]),he=m&&m.map((e,t)=>d.createElement(ne,{...e,key:t,index:t,id:`${Q}-${t}`,disabled:a||e.disabled,focused:V===t,dataItem:e,item:h,className:s.classNames(e.className,ae(_||"ltr",n.horizontal)),onClick:ce,onDown:de})),fe=!(!l&&!c||f),ve=(T.current?T.current.offsetWidth:0)/2-16;let ge;return ge=l||c?d.createElement(s.IconWrap,{className:"k-fab-icon",name:l,icon:c}):u?d.createElement("span",{role:"presentation",className:u}):null,d.createElement(s.ZIndexContext.Provider,{value:F},d.createElement(d.Fragment,null,d.createElement("button",{ref:T,id:p||Z,role:"button",type:"button","aria-disabled":a,"aria-expanded":m?H:void 0,"aria-haspopup":!!m,"aria-label":`${f||""} floatingactionbutton`,"aria-owns":m?Q:void 0,"aria-activedescendant":V>=0&&m?`${Q}-${V}`:void 0,tabIndex:s.getTabIndex(I,a),accessKey:x,dir:_,disabled:a,className:me,style:b,onClick:Y,onMouseDown:se,onFocus:ee,onBlur:te,onKeyDown:ue,...M},ge,f&&d.createElement("span",{className:"k-fab-text"},f)),E&&H&&d.createElement("div",{className:"k-overlay",style:{zIndex:F,...C}}),d.createElement(o.Popup,{ref:L,anchor:T.current,show:H,animate:w.animate,popupClass:s.classNames("k-popup-transparent k-fab-popup",w.popupClass),anchorAlign:w.anchorAlign||re(n,J),popupAlign:w.popupAlign||ie(n,J),style:{boxShadow:"none"}},d.createElement("ul",{ref:A,role:"menu","aria-labelledby":p,id:Q,className:s.classNames("k-fab-items",{"k-fab-items-bottom":"bottom"!==n.vertical,"k-fab-items-top":"bottom"===n.vertical}),style:{paddingLeft:fe?ve:void 0,paddingRight:fe?ve:void 0}},he))))});ue.propTypes={className:n.string,style:n.object,id:n.string,dir:n.string,tabIndex:n.number,accessKey:n.string,disabled:n.bool,icon:n.string,svgIcon:s.svgIconPropType,iconClass:n.string,text:n.string,alignOffset:n.shape({x:n.oneOfType([n.number,n.string]).isRequired,y:n.oneOfType([n.number,n.string]).isRequired}),align:n.shape({vertical:n.oneOf(["top","middle","bottom"]).isRequired,horizontal:n.oneOf(["start","center","end"]).isRequired}),positionMode:n.oneOf(["absolute","fixed"]),size:n.oneOf(["small","medium","large"]),rounded:n.oneOf(["small","medium","large","full","none"]),themeColor:n.oneOf(["primary","secondary","tertiary","info","success","warning","error","dark","light","inverse"]),modal:n.bool,overlayStyle:n.object};const pe={align:{vertical:"bottom",horizontal:"end"},size:void 0,rounded:void 0,themeColor:void 0,positionMode:"fixed"};ue.displayName="KendoFloatingActionButton";const me="speechToTextButton.ariaLabel",he="speechToTextButton.title",fe={[me]:"Start speech recognition",[he]:"Speech to Text Button"},ve=t.forwardRef((e,n)=>{const o=!s.validatePackage(k,{component:"SpeechToTextButton"}),l=s.getLicenseMessage(k),c=i.useLocalization(),{fillMode:d,rounded:p,size:m,themeColor:h,ariaLabel:f,svgIcon:v,disabled:g,iconSize:b,title:y,className:C,id:I,style:x,lang:w="en-US",continuous:E=!1,interimResults:D=!1,maxAlternatives:N=1,integrationMode:S="webSpeech",onStart:B,onResult:K,onEnd:R,onError:O,...M}=e,z=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,n=t[t.length-1],s=Array.from(n).map(e=>({transcript:e.transcript,confidence:e.confidence}));null==K||K({isFinal:n.isFinal,alternatives:s})},[K]),W=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(n,()=>({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(u,{id:I,className:s.classNames({"k-speech-to-text-button":!0,"k-listening":P},C),style:x,svgIcon:V?void 0:G,iconSize:b,fillMode:d,rounded:p,size:m,themeColor:h,"aria-label":null!=f?f:c.toLanguageString(me,fe[me]),"aria-pressed":P,disabled:g,title:null!=y?y:c.toLanguageString(he,fe[he]),onClick:()=>{P?U():H()},...M},e.children),o&&t.createElement(s.WatermarkOverlay,{message:l}))});ve.displayName="KendoSpeechToTextButton";const ge=[".k-input",".k-picker",".k-checkbox",".k-radio",".k-switch",".k-rating",".k-slider"],be=d.forwardRef((e,t)=>{const{disabled:n,fillMode:o="solid",rounded:i="medium",size:a="medium",svgIcon:c=r.pasteSparkleIcon,formFields:p,onClick:m,children:h,...f}=e,v=d.useRef(null);d.useImperativeHandle(t,()=>{var e,t,n,s;return{element:null!=(t=null==(e=v.current)?void 0:e.element)?t:null,selected:null!=(s=null==(n=v.current)?void 0:n.selected)&&s,click:()=>{var e,t;return null==(t=null==(e=v.current)?void 0:e.element)?void 0:t.click()}}});const g=d.useRef(null),b=d.useCallback(()=>{var e;return(null==(e=v.current)?void 0:e.element)?(null!=g.current||(g.current=new l.KendoSmartPaste({getElement:()=>{var e,t;return null!=(t=null==(e=v.current)?void 0:e.element)?t:null},customInputs:ge.map(e=>({identifier:e})),getSmartPasteField:e=>{const t=(e=>{const t=e.querySelector("input, select, textarea");return(null==t?void 0:t.getAttribute("name"))||(null==t?void 0:t.getAttribute("id"))||e.getAttribute("id")||null})(e.element);return t?{...e,field:t}:e}})),g.current):null},[]);return d.createElement(u,{ref:v,disabled:n,fillMode:o,rounded:i,size:a,svgIcon:c,onClick:async e=>{if(n)return;const t=await(async()=>{try{return await navigator.clipboard.readText()}catch{return""}})(),o=(()=>{const e=b();if(!e)return p;const t=e.extractFormConfig().reduce((e,t)=>e.some(e=>e.field===t.field)?e:[...e,t],[]);return p?p.map(e=>{const n=t.find(t=>t.field===e.field);return n?{...n,...e,element:n.element}:e}):t})(),r=null==o?void 0:o.map(e=>{var t;const{element:n,...s}=e;return{...s,field:s.field||"",allowedValues:null!=(t=s.allowedValues)?t:[]}}),i=Object.assign(e,{requestData:{content:t,formFields:r},setResponse:e=>{null!=e&&e.fieldValues&&((e,t)=>{var n;if(!e||!t)return;const o=Object.entries(e).reduce((e,[t,n])=>(null!=n&&(e[t]=n),e),{}),r=null==(n=v.current)?void 0:n.element;if(r){const e=s.getKendoPasteEventTarget(r);s.dispatchKendoPasteEvent(e,o)}const i=b();i&&i.populateFormFields({fieldValues:o},t)})(e.fieldValues,o)}});null==m||m(i)},type:"button",...f},h)});be.displayName="KendoReactSmartPasteButton";const ye=s.withIdHOC(S);ye.displayName="KendoReactDropDownButton";const ke=s.withIdHOC(I);ke.displayName="KendoReactSplitButton",e.Button=u,e.ButtonGroup=m,e.Chip=_,e.ChipList=Y,e.DropDownButton=ye,e.DropDownButtonClassComponent=S,e.DropDownButtonItem=w,e.FloatingActionButton=ue,e.FloatingActionButtonItem=ne,e.SmartPasteButton=be,e.SpeechToTextButton=ve,e.SplitButton=ke,e.SplitButtonClassComponent=I,e.SplitButtonItem=v,e.Toolbar=L,e.ToolbarItem=W,e.ToolbarSeparator=R,e.ToolbarSpacer=H,e.toolbarButtons=K});
15
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("prop-types"),require("@progress/kendo-react-common"),require("@progress/kendo-react-popup"),require("@progress/kendo-svg-icons"),require("@progress/kendo-react-intl"),require("@progress/kendo-webspeech-common"),require("@progress/kendo-smartpaste-common")):"function"==typeof define&&define.amd?define(["exports","react","prop-types","@progress/kendo-react-common","@progress/kendo-react-popup","@progress/kendo-svg-icons","@progress/kendo-react-intl","@progress/kendo-webspeech-common","@progress/kendo-smartpaste-common"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).KendoReactButtons={},e.React,e.PropTypes,e.KendoReactCommon,e.KendoReactPopup,e.KendoSvgIcons,e.KendoReactIntl,e.KendoWebspeechCommon,e.KendoSmartpasteCommon)}(this,function(e,t,n,s,o,r,i,a,l){"use strict";function c(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(n){if("default"!==n){var s=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,s.get?s:{enumerable:!0,get:function(){return e[n]}})}}),t.default=e,Object.freeze(t)}var d=c(t);const u=d.forwardRef((e,t)=>{const{children:n,togglable:o,dir:r,disabled:i,selected:a,icon:l,iconClass:c,svgIcon:u,imageUrl:m,imageAlt:h,className:f,startIcon:v,endIcon:g,onClick:b,size:y=p.size,rounded:k=p.rounded,fillMode:C=p.fillMode,themeColor:I=p.themeColor,ariaPressed:x,iconSize:w,...E}=e,D=d.useRef(void 0),N=d.useRef(null),[S,B]=d.useState(!0===o&&!0===a),K=void 0!==u||void 0!==l||void 0!==c||void 0!==m,R=void 0!==n,O=s.useUnstyled(),M=e.unstyled||O,z=M&&M.uButton;d.useImperativeHandle(t,()=>({element:N.current,selected:void 0!==D.current?D.current:S})),d.useMemo(()=>{o&&void 0!==a&&a!==S&&B(a)},[o,a]),d.useEffect(()=>{D.current=void 0},[S]);const F=function({imageUrl:e,name:t,iconClass:n,svgIcon:o,imageAlt:r,buttonClasses:i,iconSize:a}){return e?d.createElement("img",{role:"presentation",className:s.classNames(s.uButton.icon({c:i})),alt:r,src:e}):t||o?d.createElement(s.IconWrap,{className:s.classNames(s.uButton.icon({c:i})),name:t,icon:o,size:a}):n?d.createElement("span",{role:"presentation",className:s.classNames(s.uButton.icon({c:i}),n)}):null}({name:l,svgIcon:u,iconClass:c,imageUrl:m,imageAlt:h,buttonClasses:z,iconSize:w}),P=e=>d.cloneElement(e,{className:s.classNames(s.uButton.icon({c:z}),e.props.className)}),T=d.useMemo(()=>o?S:x||void 0,[]);return d.createElement("button",{ref:N,"aria-pressed":T,...E,dir:r,disabled:i,onClick:e=>{o&&void 0===a&&(D.current=!S,B(!S)),b&&b.call(void 0,e)},className:s.classNames(s.uButton.wrapper({c:z,isRtl:"rtl"===r,selected:S,disabled:i,size:y,fillMode:C,rounded:k,themeColor:I,iconButton:!R&&K}),f)},v&&P(v),F,n&&d.createElement("span",{className:s.classNames(s.uButton.text({c:z}))},n),g&&P(g))}),p={size:void 0,rounded:void 0,fillMode:void 0,themeColor:void 0};u.displayName="KendoReactButton",u.propTypes={children:n.node,selected:n.bool,togglable:n.bool,icon:n.string,svgIcon:s.svgIconPropType,iconClass:n.string,imageUrl:n.string,imageAlt:n.string,size:n.oneOf(["small","medium","large"]),rounded:n.oneOf(["small","medium","large","full","none"]),fillMode:n.oneOf(["flat","link","outline","solid","clear"]),themeColor:n.oneOf(["base","primary","secondary","tertiary","info","success","warning","error","dark","light","inverse"])};const m=e=>{const{children:t,className:n,dir:o,disabled:r,width:i}=e,a=s.useUnstyled(),l=e.unstyled||a,c=l&&l.uButtonGroup,u=(e,t)=>{const n={...i?{width:i}:{},...e.props.style||{}},s=r||e.props.disabled,o={...e.props,...t?{className:t}:{},...Object.keys(n).length?{style:n}:{},...void 0!==s?{disabled:s}:{}};return d.Children.count(e.props.children)>0?d.cloneElement(e,o,e.props.children):d.cloneElement(e,o)},p=d.useRef(null),m=(e=>{const t=d.Children.count(e),n=void 0!==o?"rtl"===o:p.current&&"rtl"===getComputedStyle(p.current).direction||!1;return d.Children.map(e,(e,o)=>{if(d.isValidElement(e)){const r=o===t-1,i=n,a=s.classNames(e.props.className,s.uButtonGroup.position({c:c,start:i?r:0===o,end:i?0===o:r}));return u(e,a)}return e})})(t),h=s.classNames(s.uButtonGroup.wrapper({c:c,stretched:!!i,disabled:r}),n),f={className:h,style:{width:`${i}`},dir:o,role:"group","aria-disabled":r};return d.createElement("div",{ref:p,...f,className:h},m)};m.propTypes={children:n.oneOfType([n.arrayOf(n.element),n.element]),className:n.string,disabled:n.bool,width:n.string,dir:n.string};const h=e=>{const t=s.useUnstyled(),n=e.unstyled||t,o=n&&n.uDropDownButton,r=d.useCallback(t=>{e.onClick(t,e.index)},[e]),i=e.dataItem.render||e.item||(void 0===e.item?e.render:null),a=void 0!==e.dataItem.text?e.dataItem.text:e.textField?e.dataItem[e.textField]:e.dataItem,l=d.createElement("li",{id:e.id,className:s.classNames(s.uDropDownButton.li({c:o,focused:e.focused}),e.className),tabIndex:-1,onClick:r,onMouseDown:e.onDown,onPointerDown:e.onDown,role:"menuitem","aria-disabled":e.dataItem.disabled||void 0},d.createElement("span",{tabIndex:-1,className:s.classNames(s.uDropDownButton.link({c:o,selected:e.dataItem.selected,disabled:e.dataItem.disabled})),key:"icon"},i?d.createElement(i,{item:e.dataItem,itemIndex:e.index}):d.createElement(d.Fragment,null,(e.dataItem.icon||e.dataItem.iconClass||e.dataItem.svgIcon)&&d.createElement(s.IconWrap,{className:e.dataItem.iconClass,name:e.dataItem.icon,icon:e.dataItem.svgIcon}),e.dataItem.imageUrl&&d.createElement("img",{role:"presentation",alt:"",src:e.dataItem.imageUrl,className:"k-icon"}),a&&d.createElement("span",{className:"k-menu-link-text"},a))));return void 0!==e.item&&void 0!==e.render?e.render.call(void 0,l,e):l};h.displayName="KendoReactButtonItem";const f=class extends d.Component{render(){return null}};f.propTypes={text:n.string,icon:n.string,iconClass:n.string,imageUrl:n.string,disabled:n.bool,render:n.any};let v=f;const g=(e,t,n,o)=>{if(n)return e;const r=Math.min(o-1,Math.max(0,e));switch(t){case s.Keys.enter:case s.Keys.space:case s.Keys.esc:return-1;case s.Keys.up:case s.Keys.left:return r-1<0?o-1:r-1;case s.Keys.down:case s.Keys.right:return r+1>=o?0:r+1;case s.Keys.home:return 0;case s.Keys.end:return o-1;default:return e}};function b(e){const t={horizontal:"left",vertical:"bottom"};return e&&(t.horizontal="right"),t}function y(e){const t={horizontal:"left",vertical:"top"};return e&&(t.horizontal="right"),t}const k=Object.freeze({name:"@progress/kendo-react-buttons",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate:0,version:"14.0.0-develop.3",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"}),C=class extends d.Component{constructor(e){super(e),this.state={focused:!1,focusedIndex:-1,opened:!1},this.wrapper=null,this.mainButton=null,this.list=null,this.skipFocus=!1,this.buttonsData=[],this.showLicenseWatermark=!1,this.onKeyDown=e=>{const{focusedIndex:t}=this.state;if(e.altKey)return void(this.opened||e.keyCode!==s.Keys.down?this.opened&&e.keyCode===s.Keys.up&&(e.preventDefault(),this.setState({focusedIndex:-1}),this.setOpen(!1,e)):(e.preventDefault(),this.setState({focusedIndex:0}),this.setOpen(!0,e)));let n;if(e.keyCode===s.Keys.enter||e.keyCode===s.Keys.space){if(e.preventDefault(),this.dispatchClickEvent(e,t),t>=0){n={focusedIndex:this.opened?-1:0};const t=!this.opened;this.setOpen(t,e)}}else if(this.opened&&e.keyCode===s.Keys.esc)return this.setState({focusedIndex:-1}),void this.setOpen(!1,e);if(this.opened){const o=g(t,e.keyCode,e.altKey,this.buttonsData.length);o!==t&&(n=n||{},n.focusedIndex=o);const r=e.keyCode===s.Keys.up||e.keyCode===s.Keys.down||e.keyCode===s.Keys.left||e.keyCode===s.Keys.right;!e.altKey&&(r||e.keyCode===s.Keys.home||e.keyCode===s.Keys.end)&&e.preventDefault()}n&&this.setState(n)},this.switchFocus=e=>{this.skipFocus=!0,e(),window.setTimeout(()=>this.skipFocus=!1,0)},this.onFocus=e=>{this.skipFocus||(s.dispatchEvent(this.props.onFocus,e,this,void 0),this.setState({focused:!0}))},this.setOpen=(e,t)=>{this.opened!==e&&(this.openedDuringOnChange=e,this.setState({opened:e}),t?this.dispatchPopupEvent(t,e):this.openedDuringOnChange=void 0)},this.onItemClick=(e,t)=>{this.opened&&this.setState({focusedIndex:0}),this.dispatchClickEvent(e,t),this.setOpen(!1,e)},this.onBlur=e=>{this.skipFocus||(this.setState({focused:!1,focusedIndex:-1}),s.dispatchEvent(this.props.onBlur,e,this,void 0),setTimeout(()=>{this.setOpen(!1,e)},0))},this.onPopupClose=e=>{var t;const n=s.getActiveElement(document);this.element&&this.element.removeAttribute("tabindex"),(n===this.list||null!=(t=this.list)&&t.contains(n))&&this.switchFocus(()=>{this.element&&this.element.focus({preventScroll:!0})}),this.props.popupSettings&&this.props.popupSettings.onClose&&this.props.popupSettings.onClose.call(void 0,e)},this.listRef=e=>{this.list=e,e&&this.state.focused&&this.switchFocus(()=>{e.focus({preventScroll:!0}),this.element&&(this.element.tabIndex=-1)})},this.onSplitPartClick=e=>{if(this.buttonsData.length){const t=!this.opened;this.setState({focusedIndex:t?0:-1,focused:!0}),this.setOpen(t,e)}},this.onDownSplitPart=e=>{e.preventDefault();const t=s.getActiveElement(document);this.element&&t!==this.element&&t!==this.list&&this.element.focus()},this.onItemDown=e=>{s.getActiveElement(document)===this.list&&e.preventDefault()},this.dispatchPopupEvent=(e,t)=>{s.dispatchEvent(t?this.props.onOpen:this.props.onClose,e,this,void 0),this.openedDuringOnChange=void 0},this.showLicenseWatermark=!s.validatePackage(k,{component:"SplitButton"}),this.licenseMessage=s.getLicenseMessage(k)}get guid(){return this.props.id?this.props.id+"-accessibility-id":this.props.id}get opened(){return void 0!==this.openedDuringOnChange?this.openedDuringOnChange:void 0===this.props.opened?this.state.opened:this.props.opened}render(){this.buttonsData=this.props.items||d.Children.toArray(this.props.children).filter(e=>e&&e.type===v).map(e=>e.props);const e=this.isRtl(),t=e?"rtl":void 0,{id:n,style:o,tabIndex:i,disabled:a}=this.props;return d.createElement(d.Fragment,null,d.createElement("div",{id:n,style:o,className:s.classNames("k-split-button","k-button-group",{"k-focus":this.state.focused},this.props.rounded&&`k-rounded-${s.kendoThemeMaps.roundedMap[this.props.rounded]}`,this.props.className),onKeyDown:this.onKeyDown,onFocus:this.onFocus,onBlur:this.onBlur,dir:t,ref:e=>{this.wrapper=e}},d.createElement(u,{ref:e=>{this.mainButton=e&&e.element},type:"button",size:this.props.size,rounded:this.props.rounded,fillMode:this.props.fillMode,themeColor:this.props.themeColor,onClick:e=>this.onItemClick(e,-1),disabled:a||void 0,tabIndex:i,accessKey:this.props.accessKey,className:this.props.buttonClass,icon:this.props.icon,svgIcon:this.props.svgIcon,iconClass:this.props.iconClass,startIcon:this.props.startIcon,endIcon:this.props.endIcon,imageUrl:this.props.imageUrl,dir:t,"aria-disabled":a,"aria-haspopup":!0,"aria-expanded":this.opened||void 0,"aria-label":this.props.ariaLabel,"aria-controls":this.opened?this.guid:void 0,id:"button-"+this.guid,title:this.props.title},this.props.text),d.createElement(u,{type:"button",size:this.props.size,rounded:this.props.rounded,fillMode:this.props.fillMode,themeColor:this.props.themeColor,icon:"caret-alt-down",svgIcon:r.caretAltDownIcon,className:"k-split-button-arrow",disabled:a||void 0,tabIndex:-1,onClick:this.onSplitPartClick,onMouseDown:this.onDownSplitPart,onPointerDown:this.onDownSplitPart,dir:t,"aria-label":"menu toggling button"}),this.renderPopup(e)),this.showLicenseWatermark&&d.createElement(s.WatermarkOverlay,{message:this.licenseMessage}))}componentDidMount(){(void 0===this.props.dir&&this.isRtl()||this.opened)&&this.forceUpdate()}get element(){return this.mainButton}dispatchClickEvent(e,t){this.isItemDisabled(t)||(-1===t?s.dispatchEvent(this.props.onButtonClick,e,this,void 0):s.dispatchEvent(this.props.onItemClick,e,this,{item:this.buttonsData[t],itemIndex:t}))}renderPopup(e){const{popupSettings:t={}}=this.props,{focusedIndex:n}=this.state;return d.createElement(o.Popup,{anchor:this.wrapper,show:this.opened,animate:t.animate,popupClass:s.classNames("k-menu-popup",t.popupClass),anchorAlign:t.anchorAlign||b(e),popupAlign:t.popupAlign||y(e),style:e?{direction:"rtl"}:void 0,onClose:this.onPopupClose},d.createElement("ul",{role:"menu",id:this.guid,"aria-labelledby":"button-"+this.guid,tabIndex:-1,ref:this.listRef,"aria-activedescendant":n>=0?`${this.guid}-${n}`:void 0,className:s.classNames("k-menu-group",{[`k-menu-group-${s.kendoThemeMaps.sizeMap[this.props.size]||this.props.size}`]:this.props.size})},this.renderChildItems()))}renderChildItems(){const{item:e,itemRender:t,textField:n}=this.props;return this.buttonsData.length>0?this.buttonsData.map((o,r)=>d.createElement(h,{className:s.classNames("k-menu-item",{"k-first":0===r},{"k-last":r===this.buttonsData.length-1}),dataItem:o,textField:n,focused:this.state.focusedIndex===r,onClick:this.onItemClick,onDown:this.onItemDown,render:t,item:e,key:r,index:r,id:`${this.guid}-${r}`})):null}isItemDisabled(e){return this.buttonsData[e]?this.buttonsData[e].disabled:this.props.disabled}isRtl(){return void 0!==this.props.dir?"rtl"===this.props.dir:!!this.wrapper&&"rtl"===getComputedStyle(this.wrapper).direction}};C.propTypes={accessKey:n.string,ariaLabel:n.string,title:n.string,onButtonClick:n.func,onFocus:n.func,onBlur:n.func,onItemClick:n.func,onOpen:n.func,onClose:n.func,text:n.string,items:n.arrayOf(n.any),textField:n.string,tabIndex:n.number,disabled:n.bool,icon:n.string,svgIcon:s.svgIconPropType,imageUrl:n.string,popupSettings:n.object,itemRender:n.any,item:n.func,className:n.string,buttonClass:n.string,dir:n.string,size:n.oneOf(["small","medium","large"]),rounded:n.oneOf(["small","medium","large","full","none"]),fillMode:n.oneOf(["flat","link","outline","solid","clear"]),themeColor:n.oneOf(["base","primary","secondary","tertiary","info","success","warning","error","dark","light","inverse"])},C.defaultProps={size:void 0,rounded:void 0,fillMode:void 0,themeColor:void 0};let I=C;const x=class extends d.Component{render(){return null}};x.propTypes={text:n.string,icon:n.string,iconClass:n.string,imageUrl:n.string,selected:n.bool,disabled:n.bool,render:n.any};let w=x;const E=class extends d.Component{constructor(e){super(e),this.state={opened:!1,focused:!1,focusedIndex:-1},this.mainButton=null,this.list=null,this.skipFocus=!1,this.showLicenseWatermark=!1,this.buttonsData=[],this.onKeyDown=e=>{const{focusedIndex:t}=this.state;if(e.altKey)return void(this.opened||e.keyCode!==s.Keys.down?this.opened&&e.keyCode===s.Keys.up&&(e.preventDefault(),this.setState({focusedIndex:-1}),this.setOpen(!1,e)):(e.preventDefault(),this.setOpen(!0,e),this.setState({focusedIndex:0})));const n={...this.state};if(e.keyCode===s.Keys.enter||e.keyCode===s.Keys.space){e.preventDefault(),t>=0&&this.dispatchClickEvent(e,t);const n=!this.opened;return this.setState({focused:!0,focusedIndex:n?0:-1}),void this.setOpen(n,e)}if(this.opened&&e.keyCode===s.Keys.esc)return this.setState({focusedIndex:-1}),void this.setOpen(!1,e);if(this.opened){const o=g(t,e.keyCode,e.altKey,this.buttonsData.length);n.focusedIndex=o;const r=e.keyCode===s.Keys.up||e.keyCode===s.Keys.down||e.keyCode===s.Keys.left||e.keyCode===s.Keys.right;!e.altKey&&(r||e.keyCode===s.Keys.home||e.keyCode===s.Keys.end)&&e.preventDefault()}this.setState(n)},this.switchFocus=e=>{this.skipFocus=!0,e(),window.setTimeout(()=>this.skipFocus=!1,0)},this.handleFocus=e=>{this.skipFocus||(this.setState({focused:!0,focusedIndex:this.opened?0:-1}),s.dispatchEvent(this.props.onFocus,e,this,void 0))},this.handleButtonBlur=e=>{this.opened||(this.setState({focused:!1}),s.dispatchEvent(this.props.onBlur,e,this,void 0))},this.handleMenuBlur=e=>{this.skipFocus||(this.setState({focused:!1,focusedIndex:-1}),s.dispatchEvent(this.props.onBlur,e,this,void 0),setTimeout(()=>{this.setOpen(!1,e)},0))},this.setOpen=(e,t)=>{this.opened!==e&&(this.openedDuringOnChange=e,this.setState({opened:e}),t?this.dispatchPopupEvent(t,e):this.openedDuringOnChange=void 0)},this.onItemClick=(e,t)=>{this.setState({focusedIndex:-1}),this.dispatchClickEvent(e,t),this.setOpen(!1,e)},this.onItemDown=e=>{s.getActiveElement(document)===this.list&&e.preventDefault()},this.mouseDown=e=>{e.preventDefault();const t=s.getActiveElement(document);this.element&&t!==this.element&&t!==this.list&&this.element.focus()},this.onPopupClose=e=>{var t;const n=s.getActiveElement(document);this.element&&this.element.removeAttribute("tabindex"),(n===this.list||null!=(t=this.list)&&t.contains(n))&&this.switchFocus(()=>{this.element&&this.element.focus({preventScroll:!0})}),this.props.popupSettings&&this.props.popupSettings.onClose&&this.props.popupSettings.onClose.call(void 0,e)},this.listRef=e=>{this.list=e,e&&this.state.focused&&this.switchFocus(()=>{e.focus({preventScroll:!0}),this.element&&(this.element.tabIndex=-1)})},this.onClickMainButton=e=>{if(s.dispatchEvent(this.props.onClick,e,this,void 0),!this.buttonsData.length)return;const t=!this.opened;this.setState({focused:!0,focusedIndex:t?0:-1}),this.setOpen(t,e)},this.dispatchPopupEvent=(e,t)=>{s.dispatchEvent(t?this.props.onOpen:this.props.onClose,e,this,void 0),this.openedDuringOnChange=void 0},this.showLicenseWatermark=!s.validatePackage(k,{component:"DropDownButton"}),this.licenseMessage=s.getLicenseMessage(k)}get guid(){return this.props.id+"-accessibility-id"}get opened(){return void 0!==this.openedDuringOnChange?this.openedDuringOnChange:void 0===this.props.opened?this.state.opened:this.props.opened}render(){const e=this.isRtl(),t=this.props.unstyled&&this.props.unstyled.uDropDownButton,n=e?"rtl":void 0,{id:o,style:r,tabIndex:i,disabled:a,size:l,rounded:c,fillMode:p,themeColor:m,ariaLabel:h,title:f,accessKey:v,icon:g,svgIcon:b,iconClass:y,buttonClass:k,className:C,imageUrl:I,startIcon:x,endIcon:E}=this.props;return this.buttonsData=this.props.items||d.Children.toArray(this.props.children).filter(e=>e&&e.type===w).map(e=>e.props),d.createElement(d.Fragment,null,d.createElement(u,{id:o,size:l,style:r,rounded:c,fillMode:p,themeColor:m,onClick:this.onClickMainButton,onMouseDown:this.mouseDown,onKeyDown:this.onKeyDown,onFocus:this.handleFocus,onBlur:this.handleButtonBlur,"aria-disabled":a?"true":void 0,tabIndex:i,accessKey:v,icon:g,svgIcon:b,iconClass:y,className:s.classNames(k,C,s.uDropDownButton.wrapper({c:t,focused:this.state.focused,disabled:a})),imageUrl:I,dir:n,ref:e=>{this.mainButton=(null==e?void 0:e.element)||null},type:"button","aria-expanded":this.opened?"true":"false","aria-label":h,"aria-controls":this.opened?this.guid:void 0,title:f,startIcon:x,endIcon:E},this.props.text),this.showLicenseWatermark&&d.createElement(s.WatermarkOverlay,{message:this.licenseMessage}),this.renderPopup(e))}componentDidMount(){(void 0===this.props.dir&&this.isRtl()||this.opened)&&this.forceUpdate()}get element(){return this.mainButton}dispatchClickEvent(e,t){this.isItemDisabled(t)||s.dispatchEvent(this.props.onItemClick,e,this,{item:this.buttonsData[t],itemIndex:t})}renderPopup(e){const{popupSettings:t={},_zIndex:n,unstyled:r}=this.props,i=n?n+2e3:12e3,a=r&&r.uDropDownButton,{focusedIndex:l}=this.state;return d.createElement(s.ZIndexContext.Provider,{value:i},d.createElement(o.Popup,{anchor:this.mainButton,show:this.opened,animate:t.animate,popupClass:s.classNames(s.uDropDownButton.popup({c:a}),t.popupClass),anchorAlign:t.anchorAlign||b(e),popupAlign:t.popupAlign||y(e),style:e?{direction:"rtl"}:void 0,onClose:this.onPopupClose},d.createElement("ul",{role:"list",id:this.guid,tabIndex:-1,"aria-activedescendant":l>=0?`${this.guid}-${l}`:void 0,ref:this.listRef,onKeyDown:this.onKeyDown,onBlur:this.handleMenuBlur,className:s.classNames(s.uDropDownButton.ul({c:a,size:this.props.size}))},this.renderChildItems())))}renderChildItems(){const{item:e,itemRender:t,textField:n,unstyled:o}=this.props,r=o&&o.uDropDownButton;return this.buttonsData.length>0?this.buttonsData.map((o,i)=>d.createElement(h,{className:s.classNames(s.uDropDownButton.item({c:r}),o.className,{"k-first":0===i},{"k-last":i===this.buttonsData.length-1}),dataItem:o,textField:n,focused:this.state.focusedIndex===i,onClick:this.onItemClick,onDown:this.onItemDown,render:t,item:e,index:i,key:i,id:`${this.guid}-${i}`})):null}isItemDisabled(e){return this.buttonsData[e]?this.buttonsData[e].disabled:this.props.disabled}isRtl(){return void 0!==this.props.dir?"rtl"===this.props.dir:!!this.mainButton&&"rtl"===getComputedStyle(this.mainButton).direction}};E.propTypes={accessKey:n.string,ariaLabel:n.string,title:n.string,onFocus:n.func,onBlur:n.func,onClick:n.func,onItemClick:n.func,onOpen:n.func,onClose:n.func,items:n.arrayOf(n.any),textField:n.string,tabIndex:n.number,disabled:n.bool,icon:n.string,svgIcon:s.svgIconPropType,iconClass:n.string,imageUrl:n.string,popupSettings:n.object,itemRender:n.func,item:n.func,className:n.string,buttonClass:n.string,dir:n.string,size:n.oneOf(["small","medium","large"]),rounded:n.oneOf(["small","medium","large","full","none"]),fillMode:n.oneOf(["flat","link","outline","solid","clear"]),themeColor:n.oneOf(["base","primary","secondary","tertiary","info","success","warning","error","dark","light","inverse"])},E.defaultProps={size:void 0,rounded:void 0,fillMode:void 0,themeColor:void 0};let D=E;const N=s.createPropsContext(),S=s.withIdHOC(s.withPropsContext(N,s.withUnstyledHOC(s.withZIndexContext(D))));S.displayName="KendoReactDropDownButton";const B=":not(.k-dropdownlist button):not(.k-colorpicker button):not(.k-split-button .k-split-button-arrow)",K=["button"+B,".k-button-group > button"+B,".k-colorpicker",".k-dropdownlist"],R=e=>d.createElement("div",{ref:e._ref,className:s.classNames("k-toolbar-separator k-separator",e.className)}),O="prevArrow.title",M="nextArrow.title",z="moreButtonTitle.title",F={[O]:"Previous scroll button",[M]:"Next scroll button",[z]:"More button"},P=e=>{const t=i.useLocalization(),{disabled:n,type:o,scrollContentRef:a,buttonScrollSpeed:l,prevButton:c,nextButton:u}=e,p="prev"===o?c||"span":u||"span";return d.createElement(p,{className:s.classNames("k-button","k-icon-button",`k-toolbar-${o}`,{"k-disabled":n}),title:`${"prev"===o?t.toLanguageString(O,F[O]):t.toLanguageString(M,F[M])}`,"aria-hidden":!0,tabIndex:n?-1:void 0,onClick:e=>{a&&a.current&&l&&a.current.scrollBy({left:"next"===o?l:-l,behavior:"smooth"})}},d.createElement(s.SvgIcon,{icon:"prev"===o?r.caretAltLeftIcon:r.caretAltRightIcon,className:"k-button-icon"}))},T=e=>{const{scrollButtons:t,scrollButtonsPosition:n,isOverflowing:s,scrollContentRef:o,buttonScrollSpeed:r,dir:i,isScrollStartPosition:a,isScrollEndPosition:l,prevButton:c,nextButton:u,children:p}=e,m=(e,t)=>d.createElement(P,{type:e,disabled:t,scrollContentRef:o,buttonScrollSpeed:r,prevButton:c,nextButton:u}),h="visible"===t||"auto"===t&&s;return d.createElement(d.Fragment,null,h&&"split"===n&&d.createElement(d.Fragment,null,m("rtl"!==i?"prev":"next",a),d.createElement(R,{className:"k-toolbar-button-separator"})),h&&"start"===n&&d.createElement(d.Fragment,null,m("rtl"!==i?"prev":"next",a),m("rtl"!==i?"next":"prev",l),d.createElement(R,{className:"k-toolbar-button-separator"})),d.createElement("span",{className:"k-toolbar-items k-toolbar-items-scroll",ref:o},p),h&&"split"===n&&d.createElement(d.Fragment,null,d.createElement(R,{className:"k-toolbar-button-separator"}),m("rtl"!==i?"next":"prev",l)),h&&"end"===n&&d.createElement(d.Fragment,null,d.createElement(R,{className:"k-toolbar-button-separator"}),m("rtl"!==i?"prev":"next",a),m("rtl"!==i?"next":"prev",l)))},A=e=>{var t;const{toolbarRef:n,children:a,fillMode:l,size:c}=e,[p,m]=d.useState(!1),h=d.useRef(d.Children.toArray(a).filter(e=>d.isValidElement(e)).map((e,t)=>d.cloneElement(e,{key:e.key||t}))),f=d.useRef([]),v=d.useRef(0),g=d.useRef(null),b=d.useRef(null),y=i.useLocalization(),[k,C]=d.useReducer(e=>e+1,0),I=()=>{if(!n.current)return;let e=0;const t=n.current.clientWidth,s=parseInt(window.getComputedStyle(n.current).gap||"0",10),o=Array.from(n.current.children).reduce((e,t,n)=>e+=Math.ceil(t.clientWidth),0),r=Array.from(n.current.children).length;if(e=o+r*s+2*s,e>t){const e=[...h.current],n=e.pop();v.current=t,h.current=e,n&&(f.current=[n,...f.current])}else if(t>v.current+s*r){const e=[...f.current],n=e.shift();f.current=e,n&&(h.current=[...h.current,n]),v.current=t}C()};d.useEffect(()=>{I();const e=new ResizeObserver(I),t=n.current;return t&&e.observe(t),()=>{t&&e.unobserve(t)}},[]);return d.createElement(d.Fragment,null,h.current.length>0&&h.current,f.current.length>0&&d.createElement(d.Fragment,null,d.createElement(R,{_ref:b,className:"k-toolbar-button-separator"}),d.createElement(u,{ref:g,className:"k-toolbar-overflow-button",fillMode:"flat",svgIcon:r.moreHorizontalIcon,title:y.toLanguageString(z,F[z]),onClick:()=>{m(!p)}}),d.createElement(o.Popup,{anchor:n.current,show:p,popupClass:"k-toolbar-popup",style:{width:null==(t=n.current)?void 0:t.offsetWidth}},d.createElement("span",{className:`k-toolbar-items-list k-toolbar-items-list-${s.kendoThemeMaps.sizeMap[c]} k-toolbar-items-list-${l}`},f.current.length>0&&f.current))))},L=d.forwardRef((e,t)=>{const{children:n,className:o,id:r,ariaLabel:i,keyboardNavigation:a,role:l,onResize:c,style:u,tabIndex:p=$.tabIndex,size:m=$.size,fillMode:h=$.fillMode,overflow:f,scrollButtons:v=$.scrollButtons,scrollButtonsPosition:g=$.scrollButtonsPosition,buttonScrollSpeed:b=$.buttonScrollSpeed,prevButton:y,nextButton:k,_ariaControls:C}=e,I=d.useRef(!1),x=d.useRef(null),w=d.useRef(null),E=d.useRef(0),D=d.useRef(0),N=d.useRef([]),S=d.useRef({element:null,props:e}),[B,R]=d.useState(!1),[O,M]=d.useState(!0),[z,F]=d.useState(!1),P=s.useDir(x,e.dir),L=d.useMemo(()=>e.buttons||K,[e.buttons]),W=d.useMemo(()=>L.map(e=>e+":focus").join(","),[L]),H=()=>{const e=x.current&&x.current.querySelector(W);return Math.max(0,N.current.findIndex(t=>t===e))};d.useImperativeHandle(S,()=>({element:x.current,props:e})),d.useImperativeHandle(t,()=>S.current),d.useEffect(()=>(window.addEventListener("resize",q),x.current&&(D.current=x.current.offsetWidth,E.current=x.current.offsetHeight,!1!==a&&(N.current=Array.from(x.current.querySelectorAll(L.join(","))),U(0))),()=>{window.removeEventListener("resize",q),N.current.length=0}),[]),d.useEffect(()=>{if(I.current){if(!x.current||!1===a)return;N.current=Array.from(x.current.querySelectorAll(L.join(","))),U(H()),V()}else I.current=!0});const U=e=>{N.current.forEach((t,n)=>{t.tabIndex=n===e?p:-1})},j=(e,t)=>{const n=N.current[t];if(n){n.tabIndex=p,n.focus();const t=N.current[e];t&&(t.tabIndex=-1)}},q=e=>{if(!x.current)return;const t=x.current.offsetWidth,n=x.current.offsetHeight;if(D.current!==t||E.current!==n){D.current=t,E.current=n;const s={offsetWidth:D.current,offsetHeight:E.current};c&&c.call(void 0,{target:S.current,...s,nativeEvent:e})}V()},V=d.useCallback(()=>{const e=w.current;e&&R(e.scrollWidth>e.clientWidth||e.scrollHeight>e.clientHeight)},[]),G=d.useCallback(()=>{const e=w.current;if(e){const t=0===e.scrollLeft,n="rtl"!==P?e.scrollLeft+e.clientWidth===e.scrollWidth:e.clientWidth-e.scrollLeft===e.scrollWidth;t&&M(!0),n&&F(!0),!t&&!n&&(M(!1),F(!1))}},[P]);return d.useEffect(()=>{const e=w.current;if(e)return e.addEventListener("scroll",G),()=>{e.removeEventListener("scroll",G)}},[G]),d.createElement("div",{id:r,"aria-label":i,"aria-controls":C,className:s.classNames("k-toolbar",{[`k-toolbar-${s.kendoThemeMaps.sizeMap[m]||m}`]:m,[`k-toolbar-${h}`]:h,"k-toolbar-scrollable":"scroll"===f,"k-toolbar-scrollable-overlay":"scroll"===f&&("hidden"===v||void 0===v),"k-toolbar-scrollable-start":"scroll"===f&&"hidden"===v&&O,"k-toolbar-scrollable-end":"scroll"===f&&"hidden"===v&&z,"k-toolbar-section":e.overflow&&"section"===f},o),style:u,role:void 0!==l?l||void 0:"toolbar",dir:P,ref:x,onKeyDown:!1!==a?e=>{const t=e.keyCode===s.Keys.left||e.keyCode===s.Keys.right||e.keyCode===s.Keys.home||e.keyCode===s.Keys.end,n=H();!t||e.defaultPrevented||-1===N.current.findIndex(t=>t===e.target)||(e.keyCode===s.Keys.left?j(n,0===n?N.current.length-1:n-1):j(n,n===N.current.length-1?0:n+1),e.keyCode===s.Keys.home&&j(n,0),e.keyCode===s.Keys.end&&j(n,N.current.length-1))}:void 0},"scroll"===f&&d.createElement(T,{scrollButtons:v,scrollButtonsPosition:g,prevButton:y,nextButton:k,isOverflowing:B,scrollContentRef:w,buttonScrollSpeed:b,dir:P,isScrollStartPosition:O,isScrollEndPosition:z,children:n}),"section"===f&&d.createElement(A,{toolbarRef:x,fillMode:h,size:m},n),("none"===f||void 0===f)&&n)}),$={tabIndex:0,size:void 0,fillMode:void 0,scrollButtons:"auto",scrollButtonsPosition:"split",buttonScrollSpeed:100};L.displayName="KendoReactToolbar",L.propTypes={tabIndex:n.number,dir:n.string,keyboardNavigation:n.bool,style:n.object,className:n.string,role:n.string,onResize:n.func,buttons:n.arrayOf(n.string.isRequired),size:n.oneOf(["small","medium","large"]),fillMode:n.oneOf(["solid","flat","outline"]),overflow:n.oneOf(["none","section","scroll"]),scrollButtons:n.oneOf(["hidden","visible","auto"]),scrollButtonsPosition:n.oneOf(["start","end","split"]),buttonScrollSpeed:n.number};const W=d.forwardRef((e,t)=>{const{id:n,className:o,style:r,children:i}=e,a=d.useRef(null);return d.useImperativeHandle(t,()=>({element:a.current})),d.createElement("div",{id:n,className:s.classNames("k-toolbar-item",o),style:r,ref:a},i)});W.displayName="KendoReactToolbarItem",W.propTypes={className:n.string};const H=d.forwardRef((e,t)=>{const n=d.useRef(null),o=d.useRef(null);d.useImperativeHandle(o,()=>({element:n.current})),d.useImperativeHandle(t,()=>({element:n.current}));const r=d.useMemo(()=>s.classNames("k-spacer",e.className),[e.className]);return d.createElement("span",{ref:n,className:r})});H.displayName="KendoReactToolbarSpacer",H.propTypes={className:n.string};const U=t.createContext([null,e=>{}]),j=t.createContext([null,e=>{}]),q=t.createContext([null,e=>{}]);var V=(e=>(e.next="next",e.prev="prev",e.current="current",e.reset="reset",e))(V||{});var G=(e=>(e.remove="remove",e.add="add",e.reorder="reorder",e))(G||{});var Z=(e=>(e.toggle="toggle",e.remove="remove",e))(Z||{});const _=d.forwardRef((e,t)=>{const n=d.useRef(null),o=d.useRef(null),{disabled:i=Q.disabled,fillMode:a=Q.fillMode,themeColor:l=Q.themeColor,size:c=Q.size,rounded:u=Q.rounded,dir:p=Q.dir,removeIcon:m=Q.removeIcon,removeSvgIcon:h=Q.removeSvgIcon,removable:f=Q.removable}=e,v=s.useDir(o,p);d.useImperativeHandle(n,()=>({element:o.current,props:e})),d.useImperativeHandle(t,()=>n.current);const[g,b]=d.useContext(U),[y,k]=d.useContext(j),[,C]=d.useContext(q),I=d.useMemo(()=>e.selected||(Array.isArray(g)?g.some(t=>t===e.value):g===e.value),[e.selected,e.value,g]),x=d.useMemo(()=>y===e.value,[e.value,y]);d.useEffect(()=>{x&&o.current&&o.current.focus()},[x]);const w=d.useCallback(t=>{b({type:Z.toggle,payload:e.value,event:t})},[b,e.value]),E=d.useCallback(t=>{f&&(C({type:G.remove,payload:e.value,event:t}),k({type:V.reset,payload:e.value,event:t}),b({type:Z.remove,payload:e.value,event:t}),e.onRemove&&e.onRemove.call(void 0,{target:n.current,syntheticEvent:t}))},[e.onRemove,e.value,f,C,k,b]),D=d.useCallback(t=>{switch(t.keyCode){case s.Keys.left:k({type:V.prev,payload:e.value,event:t});break;case s.Keys.right:k({type:V.next,payload:e.value,event:t});break;case s.Keys.enter:b({type:Z.toggle,payload:e.value,event:t});break;case s.Keys.delete:E(t)}e.onKeyDown&&e.onKeyDown.call(void 0,{target:n.current,syntheticEvent:t})},[e.onKeyDown,e.value,k,b,E]),N=d.useCallback(t=>{k({payload:e.value,type:V.current,event:t}),e.onFocus&&e.onFocus.call(void 0,{target:n.current,syntheticEvent:t})},[e.onFocus,e.value,k]),S=d.useCallback(t=>{e.onBlur&&e.onBlur.call(void 0,{target:n.current,syntheticEvent:t})},[e.onBlur]),B=s.useMouse(e,n,{onClick:w});return d.createElement("div",{...B,role:e.role||"button",id:e.value,style:e.style,ref:o,dir:v,tabIndex:s.getTabIndex(e.tabIndex,i,void 0),className:s.classNames("k-chip",{"k-rtl":"rtl"===v,"k-disabled":i,"k-selected":I,"k-focus":x,[`k-chip-${s.kendoThemeMaps.sizeMap[c]||c}`]:c,[`k-rounded-${s.kendoThemeMaps.roundedMap[u]||u}`]:u,[`k-chip-${a}`]:a,[`k-chip-${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)&&d.createElement(s.IconWrap,{className:"k-chip-icon",name:e.selectedIcon?s.toIconName(e.selectedIcon):void 0,icon:e.selectedSvgIcon,size:"small"}),(e.icon||e.svgIcon)&&d.createElement(s.IconWrap,{className:"k-chip-icon",name:e.icon?s.toIconName(e.icon):void 0,icon:e.svgIcon,size:"small"}),e.avatar&&d.createElement("div",{className:s.classNames("k-chip-avatar","k-avatar",e.avatar.rounded&&`k-rounded-${e.avatar.rounded}`),style:e.avatar.style},d.createElement("span",{className:"k-avatar-image"},d.createElement("img",{src:e.avatar.image,alt:e.avatar.imageAlt}))),d.createElement("span",{className:"k-chip-content"},void 0!==e.children?e.children:e.text&&d.createElement("span",{"aria-label":e.ariaLabel||e.text,className:"k-chip-label"},e.text)),f&&d.createElement("span",{className:"k-chip-actions"},d.createElement("span",{className:s.classNames("k-chip-action","k-chip-remove-action"),onClick:E},d.createElement(s.IconWrap,{name:m?s.toIconName(m):void 0,icon:h||r.xCircleIcon,size:"small"}))))}),J={id:n.string,text:n.string,value:n.any,dir:n.oneOf(["ltr","rtl"]),removable:n.bool,removeIcon:n.string,removeIconSvg:s.svgIconPropType,disabled:n.bool,icon:n.string,svgIcon:s.svgIconPropType,selectedIcon:n.string,selectedIconSvg:s.svgIconPropType,onRemove:n.func,dataItem:n.any,selected:n.bool,ariaDescribedBy:n.string,size:n.oneOf(["small","medium","large"]),rounded:n.oneOf(["small","medium","large","full","none"]),fillMode:n.oneOf(["outline","solid"]),themeColor:n.oneOf(["base","info","success","warning","error"])},Q={disabled:!1,removable:!1,removeIcon:"k-i-x-circle",removeSvgIcon:r.xCircleIcon,dir:"ltr",size:void 0,rounded:void 0,fillMode:void 0,themeColor:void 0};_.displayName="KendoReactChip",_.propTypes=J;const X=(e,t,n)=>{"multiple"===t.selection?Array.isArray(e)||(e=e?[e]:null):"single"===t.selection&&Array.isArray(e)&&(e=e?e.join(""):null);const[s,o]=d.useState(e);return[s,e=>{const r=((e,t)=>{switch(t.selection){case"single":switch(t.type){case"toggle":if(!Array.isArray(e)||null===e)return t.payload===e?null:t.payload;throw new Error("State cannot be an array in single selection");case"remove":return t.payload===e?null:e;default:return e}case"multiple":switch(t.type){case"toggle":if(Array.isArray(e))return e.some(e=>e===t.payload)?e.filter(e=>e!==t.payload):[...e,t.payload];if(null===e)return[t.payload];throw new Error("State cannot be non-array in multiple selection");case"remove":return Array.isArray(e)?e.some(e=>e===t.payload)?e.filter(e=>e!==t.payload):[...e,t.payload]:e;default:return e}case"none":return null;default:return e}})(t.state||s,{...e,...t});n&&n(r,e.event),"none"!==t.selection&&o(r)}]},Y=d.forwardRef((e,t)=>{const n=d.useRef(null),o=d.useRef(null),{id:r,style:i,tabIndex:a,className:l,ariaDescribedBy:c,ariaLabelledBy:u,ariaLabel:p,value:m,defaultData:h=te.defaultData,chip:f=te.chip,disabled:v=te.disabled,size:g=te.size,defaultValue:b=te.defaultValue,selection:y=te.selection,valueField:k=te.valueField,textField:C=te.textField,dir:I=te.dir,onChange:x,onDataChange:w}=e,E=s.useDir(o,I),D=d.useMemo(()=>f||_,[f,_]);d.useImperativeHandle(n,()=>({element:o.current,props:e})),d.useImperativeHandle(t,()=>n.current);const N=d.useCallback((e,t)=>{x&&n.current&&x.call(void 0,{value:e,target:n.current,syntheticEvent:t})},[x]),[S,B]=X(m||b,{selection:y,state:m},N),K=d.useCallback((e,t)=>{w&&n.current&&w.call(void 0,{value:e,target:n.current,syntheticEvent:t})},[w]),[R,O]=((e,t,n)=>{const[s,o]=d.useState(e);return[s,e=>{const r=((e,t)=>{switch(t.type){case"add":case"reorder":break;case"remove":return e.filter(e=>e[t.valueField]!==t.payload);default:return e}})(t.state||s,{...e,...t});n&&n(r,e.event),o(r)}]})(e.data||h,{state:e.data,valueField:k},K),M=d.useCallback((e,t)=>(e.push(t[k]),e),[k]),z=d.useMemo(()=>e.data||R,[e.data,R]),F=d.useMemo(()=>m||S,[m,S]),P=d.useMemo(()=>z.reduce(M,[]),[z,M]),T=d.useCallback(e=>s.getter(k)(e),[k]),A=d.useCallback(e=>s.getter(C)(e),[C]),[L,$]=(e=>{const[t,n]=d.useState(null);return[t,t=>{const s=((e,t)=>{const n=t.items.findIndex(t=>t===e);switch(t.type){case"next":return n===t.items.length-1?e:t.items[n+1];case"prev":return 0===n?e:t.items[n-1];case"current":return t.payload;case"reset":return null;default:return e}})(t.payload,{...t,...e});n(s)}]})({items:P}),W=s.useMouse(e,n);return d.createElement(U.Provider,{value:[F,B]},d.createElement(j.Provider,{value:[L,$]},d.createElement(q.Provider,{value:[z,O]},d.createElement("div",{ref:o,...W,role:v?void 0:"listbox",id:r,dir:E,style:i,tabIndex:s.getTabIndex(a,v,void 0),className:s.classNames("k-chip-list",{"k-rtl":"rtl"===E,"k-disabled":v,[`k-chip-list-${s.kendoThemeMaps.sizeMap[g]||g}`]:g},l),"aria-label":p,"aria-labelledby":u,"aria-describedby":c,"aria-orientation":"horizontal","aria-multiselectable":"multiple"===y},z.map((e,t)=>d.createElement(D,{role:"option",dataItem:e,size:g,key:[T(e),t].join("-"),text:A(e),value:T(e),ariaLabel:e.ariaLabel,svgIcon:e.svgIcon||void 0}))))))}),ee={id:n.string,className:n.string,tabIndex:n.number,data:n.any,defaultData:n.arrayOf(n.any),onDataChange:n.func,value:n.oneOfType([n.any,n.arrayOf(n.any)]),defaultValue:n.oneOfType([n.any,n.arrayOf(n.any)]),onChange:n.func,selection:n.oneOf(["single","none","multiple"]),textField:n.string,valueField:n.string,disabled:n.bool,dir:n.oneOf(["ltr","rtl"]),ariaLabelledBy:n.string,ariaDescribedBy:n.string,size:n.oneOf(["small","medium","large"])},te={chip:_,size:void 0,disabled:!1,defaultValue:null,defaultData:[],dir:"ltr",selection:"none",textField:"text",valueField:"value"};Y.displayName="KendoReactChipList",Y.propTypes=ee;const ne=d.forwardRef((e,t)=>{const{className:n,disabled:o,text:r,icon:i,style:a,id:l,focused:c,tabIndex:u,index:p,dataItem:m,item:h,svgIcon:f,onDown:v,onClick:g,...b}=e,y=d.useRef(null),k=d.useCallback(()=>{y.current&&y.current.focus()},[]),C=d.useCallback(()=>({element:y.current,focus:k}),[k]);d.useImperativeHandle(t,C);const I=d.useCallback(e=>{g&&void 0!==p&&!o&&g(e,p)},[g,p]),x=d.useMemo(()=>s.classNames("k-fab-item",{"k-focus":c,"k-disabled":o},n),[n,o,c]),w=h;return d.createElement("li",{ref:y,id:l,className:x,style:a,role:"menuitem",tabIndex:s.getTabIndex(u,o),"aria-disabled":o,"aria-label":`${r||""} floatingactionbutton item`,onClick:I,onMouseDown:v,onPointerDown:v,...b},w?d.createElement(w,{itemIndex:p,item:m}):d.createElement(d.Fragment,null,r&&d.createElement("span",{className:"k-fab-item-text"},r),i||f?d.createElement(s.IconWrap,{className:"k-fab-item-icon",name:i,icon:f}):null))});ne.propTypes={className:n.string,style:n.object,children:n.any,disabled:n.bool,focused:n.bool,index:n.number,icon:n.string,svgIcon:s.svgIconPropType,text:n.string,tabIndex:n.number,customProp:n.any},ne.displayName="KendoFloatingActionButtonItem";const se="16px",oe=e=>"number"==typeof e?e+"px":e,re=(e,t)=>{const n={horizontal:t?"right":"left",vertical:"bottom"};return"end"===e.horizontal&&(n.horizontal=t?"left":"right"),n},ie=(e,t)=>{const n={horizontal:t?"right":"left",vertical:"top"};return"end"===e.horizontal&&(n.horizontal=t?"left":"right"),n},ae=(e,t)=>({rtl:{end:"k-text-left",start:"k-text-right"},ltr:{start:"k-text-left",end:"k-text-right"}}[e]["end"===t?"end":"start"]),le=(e,t,n,s)=>{const o=t.horizontal,r=t.vertical;if(e.current){const i=n&&void 0!==n.x?oe(n.x):se,a=n&&void 0!==n.x?`calc(50% + ${oe(n.x)})`:"50%",l=n&&void 0!==n.y?oe(n.y):se,c=n&&void 0!==n.y?`calc(50% + ${oe(n.y)})`:"50%";e.current.style.setProperty(ce(t,s),"center"===o?a:i),e.current.style.setProperty(de(t),"middle"===r?c:l),s&&(("top"===r||"bottom"===r)&&"start"===o&&e.current.style.setProperty("left","unset"),"middle"===r&&"end"===o&&e.current.style.setProperty("right","unset"),"middle"===r&&"start"===o&&e.current.style.setProperty("left","unset"))}},ce=(e,t)=>{const{horizontal:n}=e;return{end:t?"left":"right",center:"left",start:t?"right":"left"}[n||"end"]},de=e=>({top:"top",middle:"top",bottom:"bottom"}[e.vertical||"bottom"]),ue=d.forwardRef((e,t)=>{const{align:n=pe.align,alignOffset:r,className:i,disabled:a,icon:l,svgIcon:c,iconClass:u,id:p,items:m,item:h,text:f,positionMode:v=pe.positionMode,size:g=pe.size,style:b,rounded:y=pe.rounded,themeColor:k=pe.themeColor,overlayStyle:C,tabIndex:I,accessKey:x,popupSettings:w={},modal:E,onClick:D,onItemClick:N,onFocus:S,onBlur:B,onKeyDown:K,onOpen:R,onClose:O,...M}=e,z=s.useZIndexContext(),F=z?z+2:100,P=d.useRef(null),T=d.useRef(null),A=d.useRef(null),L=d.useRef(null),$=d.useCallback(()=>{T.current&&T.current.focus()},[]),W=d.useCallback(()=>({element:T.current,focus:$}),[$]);d.useImperativeHandle(P,W),d.useImperativeHandle(t,()=>P.current);const[H,U]=d.useState(!1),[j,q]=d.useState(!1),[V,G]=d.useState(-1),Z=s.useId()+"-button-id",_=s.useDir(T,e.dir),J="rtl"===_,Q=s.useId()+"-list-id";d.useEffect(()=>{le(T,n,r,J)},[T,n,r,J]),d.useEffect(()=>{j&&T&&T.current&&T.current.focus()},[j,T]);const X=d.useCallback((e,t)=>{m&&s.dispatchEvent(t?R:O,e,W(),void 0)},[R,O,m]),Y=d.useCallback(e=>{!e.target||a||(!m&&D?s.dispatchEvent(D,e,W(),void 0):(U(!H),q(!0),G(H?-1:0),X(e,!H)))},[U,q,G,D,X,H,m,a]),ee=d.useCallback(e=>{q(!0),G(H?0:-1),S&&s.dispatchEvent(S,e,W(),void 0)},[S,q,G]),te=d.useCallback(e=>{q(!1),U(!1),G(-1),s.dispatchEvent(B,e,W(),void 0),H&&X(e,!1)},[B,q,U,G,X]),se=d.useCallback(e=>{e.preventDefault()},[]),oe=d.useCallback((e,t)=>{m&&(m[t].disabled||s.dispatchEvent(N,e,W(),{itemProps:m[t],itemIndex:t}))},[N]),ce=d.useCallback((e,t)=>{!e.target||!m||(G(t),U(!1),oe(e,t),X(e,!1))},[G,U,oe,X]),de=d.useCallback(e=>{s.getActiveElement(document)===T.current&&e.preventDefault()},[T]),ue=d.useCallback(e=>{const t=V,n=m?m.length:-1;if(e.altKey)return!H&&e.keyCode===s.Keys.down&&(e.preventDefault(),U(!0),G(0)),void(H&&e.keyCode===s.Keys.up&&(e.preventDefault(),U(!1),G(-1)));switch(e.keyCode){case s.Keys.enter:case s.Keys.space:t>=0&&oe(e,t),m||Y(e),e.preventDefault(),U(!H),G(H?-1:0);break;case s.Keys.esc:e.preventDefault(),U(!1),G(-1);break;case s.Keys.home:e.preventDefault(),G(0);break;case s.Keys.end:e.preventDefault(),G(n-1);break;case s.Keys.down:case s.Keys.right:e.preventDefault(),G(t+1>=n?0:t+1);break;case s.Keys.up:case s.Keys.left:e.preventDefault(),G(t-1<0?n-1:t-1)}s.dispatchEvent(K,e,W(),void 0)},[K,V,G,J,U]),me=d.useMemo(()=>s.classNames("k-fab",{"k-fab-sm":"small"===g,"k-fab-md":"medium"===g,"k-fab-lg":"large"===g,"k-disabled":a,"k-pos-absolute":"absolute"===v,"k-pos-fixed":"fixed"===v,"k-focus":j,[`k-rounded-${s.kendoThemeMaps.roundedMap[y]||y}`]:y,[`k-fab-${k}`]:k},`k-${n.vertical}-${n.horizontal}`,i),[k,g,y,a,v,n,j,i]),he=m&&m.map((e,t)=>d.createElement(ne,{...e,key:t,index:t,id:`${Q}-${t}`,disabled:a||e.disabled,focused:V===t,dataItem:e,item:h,className:s.classNames(e.className,ae(_||"ltr",n.horizontal)),onClick:ce,onDown:de})),fe=!(!l&&!c||f),ve=(T.current?T.current.offsetWidth:0)/2-16;let ge;return ge=l||c?d.createElement(s.IconWrap,{className:"k-fab-icon",name:l,icon:c}):u?d.createElement("span",{role:"presentation",className:u}):null,d.createElement(s.ZIndexContext.Provider,{value:F},d.createElement(d.Fragment,null,d.createElement("button",{ref:T,id:p||Z,role:"button",type:"button","aria-disabled":a,"aria-expanded":m?H:void 0,"aria-haspopup":!!m,"aria-label":`${f||""} floatingactionbutton`,"aria-owns":m?Q:void 0,"aria-activedescendant":V>=0&&m?`${Q}-${V}`:void 0,tabIndex:s.getTabIndex(I,a),accessKey:x,dir:_,disabled:a,className:me,style:b,onClick:Y,onMouseDown:se,onFocus:ee,onBlur:te,onKeyDown:ue,...M},ge,f&&d.createElement("span",{className:"k-fab-text"},f)),E&&H&&d.createElement("div",{className:"k-overlay",style:{zIndex:F,...C}}),d.createElement(o.Popup,{ref:L,anchor:T.current,show:H,animate:w.animate,popupClass:s.classNames("k-popup-transparent k-fab-popup",w.popupClass),anchorAlign:w.anchorAlign||re(n,J),popupAlign:w.popupAlign||ie(n,J),style:{boxShadow:"none"}},d.createElement("ul",{ref:A,role:"menu","aria-labelledby":p,id:Q,className:s.classNames("k-fab-items",{"k-fab-items-bottom":"bottom"!==n.vertical,"k-fab-items-top":"bottom"===n.vertical}),style:{paddingLeft:fe?ve:void 0,paddingRight:fe?ve:void 0}},he))))});ue.propTypes={className:n.string,style:n.object,id:n.string,dir:n.string,tabIndex:n.number,accessKey:n.string,disabled:n.bool,icon:n.string,svgIcon:s.svgIconPropType,iconClass:n.string,text:n.string,alignOffset:n.shape({x:n.oneOfType([n.number,n.string]).isRequired,y:n.oneOfType([n.number,n.string]).isRequired}),align:n.shape({vertical:n.oneOf(["top","middle","bottom"]).isRequired,horizontal:n.oneOf(["start","center","end"]).isRequired}),positionMode:n.oneOf(["absolute","fixed"]),size:n.oneOf(["small","medium","large"]),rounded:n.oneOf(["small","medium","large","full","none"]),themeColor:n.oneOf(["primary","secondary","tertiary","info","success","warning","error","dark","light","inverse"]),modal:n.bool,overlayStyle:n.object};const pe={align:{vertical:"bottom",horizontal:"end"},size:void 0,rounded:void 0,themeColor:void 0,positionMode:"fixed"};ue.displayName="KendoFloatingActionButton";const me="speechToTextButton.ariaLabel",he="speechToTextButton.title",fe={[me]:"Start speech recognition",[he]:"Speech to Text Button"},ve=t.forwardRef((e,n)=>{const o=!s.validatePackage(k,{component:"SpeechToTextButton"}),l=s.getLicenseMessage(k),c=i.useLocalization(),{fillMode:d,rounded:p,size:m,themeColor:h,ariaLabel:f,svgIcon:v,disabled:g,iconSize:b,title:y,className:C,id:I,style:x,lang:w="en-US",continuous:E=!1,interimResults:D=!1,maxAlternatives:N=1,integrationMode:S="webSpeech",onStart:B,onResult:K,onEnd:R,onError:O,...M}=e,z=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,n=t[t.length-1],s=Array.from(n).map(e=>({transcript:e.transcript,confidence:e.confidence}));null==K||K({isFinal:n.isFinal,alternatives:s})},[K]),W=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(n,()=>({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(u,{id:I,className:s.classNames({"k-speech-to-text-button":!0,"k-listening":P},C),style:x,svgIcon:V?void 0:G,iconSize:b,fillMode:d,rounded:p,size:m,themeColor:h,"aria-label":null!=f?f:c.toLanguageString(me,fe[me]),"aria-pressed":P,disabled:g,title:null!=y?y:c.toLanguageString(he,fe[he]),onClick:()=>{P?U():H()},...M},e.children),o&&t.createElement(s.WatermarkOverlay,{message:l}))});ve.displayName="KendoSpeechToTextButton";const ge=[".k-input",".k-picker",".k-checkbox",".k-radio",".k-switch",".k-rating",".k-slider"],be=d.forwardRef((e,t)=>{const{disabled:n,fillMode:o="solid",rounded:i="medium",size:a="medium",svgIcon:c=r.pasteSparkleIcon,formFields:p,onClick:m,children:h,...f}=e,v=d.useRef(null);d.useImperativeHandle(t,()=>{var e,t,n,s;return{element:null!=(t=null==(e=v.current)?void 0:e.element)?t:null,selected:null!=(s=null==(n=v.current)?void 0:n.selected)&&s,click:()=>{var e,t;return null==(t=null==(e=v.current)?void 0:e.element)?void 0:t.click()}}});const g=d.useRef(null),b=d.useCallback(()=>{var e;return(null==(e=v.current)?void 0:e.element)?(null!=g.current||(g.current=new l.KendoSmartPaste({getElement:()=>{var e,t;return null!=(t=null==(e=v.current)?void 0:e.element)?t:null},customInputs:ge.map(e=>({identifier:e})),getSmartPasteField:e=>{const t=(e=>{const t=e.querySelector("input, select, textarea");return(null==t?void 0:t.getAttribute("name"))||(null==t?void 0:t.getAttribute("id"))||e.getAttribute("id")||null})(e.element);return t?{...e,field:t}:e}})),g.current):null},[]);return d.createElement(u,{ref:v,disabled:n,fillMode:o,rounded:i,size:a,svgIcon:c,onClick:async e=>{if(n)return;const t=await(async()=>{try{return await navigator.clipboard.readText()}catch{return""}})(),o=(()=>{const e=b();if(!e)return p;const t=e.extractFormConfig().reduce((e,t)=>e.some(e=>e.field===t.field)?e:[...e,t],[]);return p?p.map(e=>{const n=t.find(t=>t.field===e.field);return n?{...n,...e,element:n.element}:e}):t})(),r=null==o?void 0:o.map(e=>{var t;const{element:n,...s}=e;return{...s,field:s.field||"",allowedValues:null!=(t=s.allowedValues)?t:[]}}),i=Object.assign(e,{requestData:{content:t,formFields:r},setResponse:e=>{null!=e&&e.fieldValues&&((e,t)=>{var n;if(!e||!t)return;const o=Object.entries(e).reduce((e,[t,n])=>(null!=n&&(e[t]=n),e),{}),r=null==(n=v.current)?void 0:n.element;if(r){const e=s.getKendoPasteEventTarget(r);s.dispatchKendoPasteEvent(e,o)}const i=b();i&&i.populateFormFields({fieldValues:o},t)})(e.fieldValues,o)}});null==m||m(i)},type:"button",...f},h)});be.displayName="KendoReactSmartPasteButton";const ye=s.withIdHOC(S);ye.displayName="KendoReactDropDownButton";const ke=s.withIdHOC(I);ke.displayName="KendoReactSplitButton",e.Button=u,e.ButtonGroup=m,e.Chip=_,e.ChipList=Y,e.DropDownButton=ye,e.DropDownButtonClassComponent=S,e.DropDownButtonItem=w,e.FloatingActionButton=ue,e.FloatingActionButtonItem=ne,e.SmartPasteButton=be,e.SpeechToTextButton=ve,e.SplitButton=ke,e.SplitButtonClassComponent=I,e.SplitButtonItem=v,e.Toolbar=L,e.ToolbarItem=W,e.ToolbarSeparator=R,e.ToolbarSpacer=H,e.toolbarButtons=K});
@@ -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: 1770382767,version:"14.0.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: 1770726958,version:"14.0.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: '14.0.0-develop.1',
11
+ version: '14.0.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": "14.0.0-develop.1",
3
+ "version": "14.0.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,12 +27,12 @@
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": "14.0.0-develop.1",
31
- "@progress/kendo-react-intl": "14.0.0-develop.1",
32
- "@progress/kendo-react-popup": "14.0.0-develop.1",
33
- "@progress/kendo-svg-icons": "^4.0.0",
34
- "react": "^16.8.2 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc",
35
- "react-dom": "^16.8.2 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc"
30
+ "@progress/kendo-react-common": "14.0.0-develop.3",
31
+ "@progress/kendo-react-intl": "14.0.0-develop.3",
32
+ "@progress/kendo-react-popup": "14.0.0-develop.3",
33
+ "@progress/kendo-svg-icons": "^4.8.0",
34
+ "react": "^18.0.0 || ^19.0.0",
35
+ "react-dom": "^18.0.0 || ^19.0.0"
36
36
  },
37
37
  "dependencies": {
38
38
  "prop-types": "^15.6.0"
@@ -64,7 +64,7 @@
64
64
  "package": {
65
65
  "productName": "KendoReact",
66
66
  "productCode": "KENDOUIREACT",
67
- "publishDate": 1770382767,
67
+ "publishDate": 1770726958,
68
68
  "licensingDocsUrl": "https://www.telerik.com/kendo-react-ui/components/my-license/"
69
69
  }
70
70
  },