New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@progress/kendo-react-buttons

Package Overview
Dependencies
Maintainers
1
Versions
1296
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@progress/kendo-react-buttons - npm Package Compare versions

Comparing version 9.4.0-develop.28 to 9.4.0-develop.29

2

dist/cdn/js/kendo-react-buttons.js

@@ -15,2 +15,2 @@ /**

*/
!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")):"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"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).KendoReactButtons={},e.React,e.PropTypes,e.KendoReactCommon,e.KendoReactPopup,e.KendoSvgIcons,e.KendoReactIntl)}(this,(function(e,t,s,n,o,r,a){"use strict";function i(e){var t=Object.create(null);return e&&Object.keys(e).forEach((function(s){if("default"!==s){var n=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(t,s,n.get?n:{enumerable:!0,get:function(){return e[s]}})}})),t.default=e,Object.freeze(t)}var l=i(t);const c={name:"@progress/kendo-react-buttons",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate:0,version:"$VERSION",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"};const d=l.forwardRef(((e,t)=>{n.validatePackage(c);const{children:s,togglable:o,dir:r,disabled:a,selected:i,icon:d,iconClass:p,svgIcon:m,imageUrl:h,imageAlt:f,className:v,startIcon:b,endIcon:g,onClick:y,size:k=u.size,rounded:C=u.rounded,fillMode:I=u.fillMode,themeColor:x=u.themeColor,...E}=e,D=l.useRef(),w=l.useRef(null),[N,S]=l.useState(!0===o&&!0===i),B=void 0!==m||void 0!==d||void 0!==p||void 0!==h,K=void 0!==s,R=n.useUnstyled(),O=e.unstyled||R,M=O&&O.uButton;l.useImperativeHandle(t,(()=>({element:w.current,selected:void 0!==D.current?D.current:N}))),l.useMemo((()=>{o&&void 0!==i&&i!==N&&S(i)}),[o,i]),l.useEffect((()=>{D.current=void 0}),[N]);const z=function({imageUrl:e,name:t,iconClass:s,svgIcon:o,imageAlt:r,buttonClasses:a}){return e?l.createElement("img",{role:"presentation",className:n.classNames(n.uButton.icon({c:a})),alt:r,src:e}):t||o?l.createElement(n.IconWrap,{className:n.classNames(n.uButton.icon({c:a})),name:t,icon:o}):s?l.createElement("span",{role:"presentation",className:n.classNames(n.uButton.icon({c:a}),s)}):null}({name:d,svgIcon:m,iconClass:p,imageUrl:h,imageAlt:f,buttonClasses:M}),P=e=>l.cloneElement(e,{className:n.classNames(n.uButton.icon({c:M}))});return l.createElement("button",{ref:w,"aria-pressed":o?N:void 0,...E,dir:r,disabled:a,onClick:e=>{o&&void 0===i&&(D.current=!N,S(!N)),y&&y.call(void 0,e)},className:n.classNames(n.uButton.wrapper({c:M,isRtl:"rtl"===r,selected:N,disabled:a,size:k,fillMode:I,rounded:C,themeColor:x,iconButton:!K&&B}),v)},b&&P(b),z,s&&l.createElement("span",{className:n.classNames(n.uButton.text({c:M}))},s),g&&P(g))})),u={togglable:!1,size:"medium",rounded:"medium",fillMode:"solid",themeColor:"base"};d.displayName="KendoReactButton",d.propTypes={children:s.node,selected:s.bool,togglable:s.bool,icon:s.string,svgIcon:n.svgIconPropType,iconClass:s.string,imageUrl:s.string,imageAlt:s.string,size:s.oneOf([null,"small","medium","large"]),rounded:s.oneOf([null,"small","medium","large","full"]),fillMode:s.oneOf([null,"flat","link","outline","solid","clear"]),themeColor:s.oneOf([null,"base","primary","secondary","tertiary","info","success","warning","error","dark","light","inverse"])};const p=e=>{n.validatePackage(c);const{children:t,className:s,dir:o,disabled:r,width:a}=e,i=n.useUnstyled(),d=e.unstyled||i,u=d&&d.uButtonGroup,p=(e,t)=>{const s={...a?{width:a}:{},...e.props.style||{}},n=r||e.props.disabled,o={...e.props,...t?{className:t}:{},...Object.keys(s).length?{style:s}:{},...void 0!==n?{disabled:n}:{}};return l.Children.count(e.props.children)>0?l.cloneElement(e,o,e.props.children):l.cloneElement(e,o)},m=l.useRef(null),h=(e=>{const t=l.Children.count(e),s=void 0!==o?"rtl"===o:m.current&&"rtl"===getComputedStyle(m.current).direction||!1;return l.Children.map(e,((e,o)=>{if(l.isValidElement(e)){const r=o===t-1,a=s,i=n.classNames(e.props.className,n.uButtonGroup.position({c:u,start:a?r:0===o,end:a?0===o:r}));return p(e,i)}return e}))})(t),f=n.classNames(n.uButtonGroup.wrapper({c:u,stretched:!!a,disabled:r}),s),v={className:f,style:{width:`${a}`},dir:o,role:"group","aria-disabled":r};return l.createElement("div",{ref:m,...v,className:f},h)};p.propTypes={children:s.oneOfType([s.arrayOf(s.element),s.element]),className:s.string,disabled:s.bool,width:s.string,dir:s.string};const m=e=>{const t=n.useUnstyled(),s=e.unstyled||t,o=s&&s.uDropDownButton,r=l.useCallback((t=>{e.onClick(t,e.index)}),[e]),a=e.dataItem.render||e.item||(void 0===e.item?e.render:null),i=void 0!==e.dataItem.text?e.dataItem.text:e.textField?e.dataItem[e.textField]:e.dataItem,c=l.createElement("li",{id:e.id,className:n.classNames(n.uDropDownButton.li({c:o,focused:e.focused}),e.className),tabIndex:-1,onClick:r,onMouseDown:e.onDown,onPointerDown:e.onDown,role:"menuitem","aria-disabled":e.dataItem.disabled||void 0},l.createElement("span",{tabIndex:-1,className:n.classNames(n.uDropDownButton.link({c:o,selected:e.dataItem.selected,disabled:e.dataItem.disabled})),key:"icon"},a?l.createElement(a,{item:e.dataItem,itemIndex:e.index}):l.createElement(l.Fragment,null,(e.dataItem.icon||e.dataItem.iconClass||e.dataItem.svgIcon)&&l.createElement(n.IconWrap,{className:e.dataItem.iconClass,name:e.dataItem.icon,icon:e.dataItem.svgIcon}),e.dataItem.imageUrl&&l.createElement("img",{role:"presentation",alt:"",src:e.dataItem.imageUrl,className:"k-icon"}),i&&l.createElement("span",{className:"k-menu-link-text"},i))));return void 0!==e.item&&void 0!==e.render?e.render.call(void 0,c,e):c};m.displayName="KendoReactButtonItem";const h=class extends l.Component{render(){return null}};h.propTypes={text:s.string,icon:s.string,iconClass:s.string,imageUrl:s.string,disabled:s.bool,render:s.any};let f=h;const v=(e,t,s,o)=>{if(s)return e;const r=Math.min(o-1,Math.max(0,e));switch(t){case n.Keys.enter:case n.Keys.space:case n.Keys.esc:return-1;case n.Keys.up:case n.Keys.left:return r-1<0?o-1:r-1;case n.Keys.down:case n.Keys.right:return r+1>=o?0:r+1;case n.Keys.home:return 0;case n.Keys.end:return o-1;default:return e}};function b(e){const t={horizontal:"left",vertical:"bottom"};return e&&(t.horizontal="right"),t}function g(e){const t={horizontal:"left",vertical:"top"};return e&&(t.horizontal="right"),t}const y=class extends l.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.onKeyDown=e=>{const{focusedIndex:t}=this.state;if(e.altKey)return void(this.opened||e.keyCode!==n.Keys.down?this.opened&&e.keyCode===n.Keys.up&&(e.preventDefault(),this.setState({focusedIndex:-1}),this.setOpen(!1,e)):(e.preventDefault(),this.setState({focusedIndex:0}),this.setOpen(!0,e)));let s;if(e.keyCode===n.Keys.enter||e.keyCode===n.Keys.space){if(e.preventDefault(),this.dispatchClickEvent(e,t),t>=0){s={focusedIndex:this.opened?-1:0};const t=!this.opened;this.setOpen(t,e)}}else if(this.opened&&e.keyCode===n.Keys.esc)return this.setState({focusedIndex:-1}),void this.setOpen(!1,e);if(this.opened){const o=v(t,e.keyCode,e.altKey,this.buttonsData.length);o!==t&&(s=s||{},s.focusedIndex=o);const r=e.keyCode===n.Keys.up||e.keyCode===n.Keys.down||e.keyCode===n.Keys.left||e.keyCode===n.Keys.right;!e.altKey&&(r||e.keyCode===n.Keys.home||e.keyCode===n.Keys.end)&&e.preventDefault()}s&&this.setState(s)},this.switchFocus=e=>{this.skipFocus=!0,e(),window.setTimeout((()=>this.skipFocus=!1),0)},this.onFocus=e=>{this.skipFocus||(n.dispatchEvent(this.props.onFocus,e,this,void 0),this.setState({focused:!0}))},this.setOpen=(e,t)=>{this.opened!==e&&(this.openedDuringOnChange=e,this.setState({opened:e}),t?this.dispatchPopupEvent(t,e):this.openedDuringOnChange=void 0)},this.onItemClick=(e,t)=>{this.opened&&this.setState({focusedIndex:0}),this.dispatchClickEvent(e,t),this.setOpen(!1,e)},this.onBlur=e=>{this.skipFocus||(this.setState({focused:!1,focusedIndex:-1}),n.dispatchEvent(this.props.onBlur,e,this,void 0),setTimeout((()=>{this.setOpen(!1,e)}),0))},this.onPopupClose=e=>{var t;const s=n.getActiveElement(document);this.element&&this.element.removeAttribute("tabindex"),(s===this.list||null!=(t=this.list)&&t.contains(s))&&this.switchFocus((()=>{this.element&&this.element.focus({preventScroll:!0})})),this.props.popupSettings&&this.props.popupSettings.onClose&&this.props.popupSettings.onClose.call(void 0,e)},this.listRef=e=>{this.list=e,e&&this.state.focused&&this.switchFocus((()=>{e.focus({preventScroll:!0}),this.element&&(this.element.tabIndex=-1)}))},this.onSplitPartClick=e=>{if(this.buttonsData.length){const t=!this.opened;this.setState({focusedIndex:t?0:-1,focused:!0}),this.setOpen(t,e)}},this.onDownSplitPart=e=>{e.preventDefault();const t=n.getActiveElement(document);this.element&&t!==this.element&&t!==this.list&&this.element.focus()},this.onItemDown=e=>{n.getActiveElement(document)===this.list&&e.preventDefault()},this.dispatchPopupEvent=(e,t)=>{n.dispatchEvent(t?this.props.onOpen:this.props.onClose,e,this,void 0),this.openedDuringOnChange=void 0},n.validatePackage(c)}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||l.Children.toArray(this.props.children).filter((e=>e&&e.type===f)).map((e=>e.props));const e=this.isRtl(),t=e?"rtl":void 0,{id:s,style:o,tabIndex:a,disabled:i}=this.props;return l.createElement("div",{id:s,style:o,className:n.classNames("k-split-button","k-button-group",{"k-focus":this.state.focused},`k-rounded-${n.kendoThemeMaps.roundedMap[this.props.rounded||"medium"]}`,this.props.className),onKeyDown:this.onKeyDown,onFocus:this.onFocus,onBlur:this.onBlur,dir:t,ref:e=>this.wrapper=e},l.createElement(d,{ref:e=>this.mainButton=e&&e.element,type:"button",size:this.props.size,rounded:this.props.rounded,fillMode:this.props.fillMode,themeColor:this.props.themeColor,onClick:e=>this.onItemClick(e,-1),disabled:i||void 0,tabIndex:a,accessKey:this.props.accessKey,className:this.props.buttonClass,icon:this.props.icon,svgIcon:this.props.svgIcon,iconClass:this.props.iconClass,imageUrl:this.props.imageUrl,dir:t,"aria-disabled":i,"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),l.createElement(d,{type:"button",size:this.props.size,rounded:this.props.rounded,fillMode:this.props.fillMode,themeColor:this.props.themeColor,icon:"caret-alt-down",svgIcon:r.caretAltDownIcon,className:"k-split-button-arrow",disabled:i||void 0,tabIndex:-1,onClick:this.onSplitPartClick,onMouseDown:this.onDownSplitPart,onPointerDown:this.onDownSplitPart,dir:t,"aria-label":"menu toggling button"}),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)||(-1===t?n.dispatchEvent(this.props.onButtonClick,e,this,void 0):n.dispatchEvent(this.props.onItemClick,e,this,{item:this.buttonsData[t],itemIndex:t}))}renderPopup(e){const{popupSettings:t={}}=this.props,{focusedIndex:s}=this.state;return l.createElement(o.Popup,{anchor:this.wrapper,show:this.opened,animate:t.animate,popupClass:n.classNames("k-menu-popup",t.popupClass),anchorAlign:t.anchorAlign||b(e),popupAlign:t.popupAlign||g(e),style:e?{direction:"rtl"}:void 0,onClose:this.onPopupClose},l.createElement("ul",{role:"menu",id:this.guid,"aria-labelledby":"button-"+this.guid,tabIndex:-1,ref:this.listRef,"aria-activedescendant":s>=0?`${this.guid}-${s}`:void 0,className:n.classNames("k-menu-group",{[`k-menu-group-${n.kendoThemeMaps.sizeMap[this.props.size]||this.props.size}`]:this.props.size})},this.renderChildItems()))}renderChildItems(){const{item:e,itemRender:t,textField:s}=this.props;return this.buttonsData.length>0?this.buttonsData.map(((o,r)=>l.createElement(m,{className:n.classNames("k-menu-item",{"k-first":0===r},{"k-last":r===this.buttonsData.length-1}),dataItem:o,textField:s,focused:this.state.focusedIndex===r,onClick:this.onItemClick,onDown:this.onItemDown,render:t,item:e,key:r,index:r,id:`${this.guid}-${r}`}))):null}isItemDisabled(e){return this.buttonsData[e]?this.buttonsData[e].disabled:this.props.disabled}isRtl(){return void 0!==this.props.dir?"rtl"===this.props.dir:!!this.wrapper&&"rtl"===getComputedStyle(this.wrapper).direction}};y.propTypes={accessKey:s.string,ariaLabel:s.string,title:s.string,onButtonClick:s.func,onFocus:s.func,onBlur:s.func,onItemClick:s.func,onOpen:s.func,onClose:s.func,text:s.string,items:s.arrayOf(s.any),textField:s.string,tabIndex:s.number,disabled:s.bool,icon:s.string,svgIcon:n.svgIconPropType,iconClass:s.string,imageUrl:s.string,popupSettings:s.object,itemRender:s.any,item:s.func,className:s.string,buttonClass:s.string,dir:s.string},y.defaultProps={size:"medium",rounded:"medium",fillMode:"solid",themeColor:"base"};let k=y;const C=class extends l.Component{render(){return null}};C.propTypes={text:s.string,icon:s.string,iconClass:s.string,imageUrl:s.string,selected:s.bool,disabled:s.bool,render:s.any};let I=C;const x=class extends l.Component{constructor(e){super(e),this.state={opened:!1,focused:!1,focusedIndex:-1},this.mainButton=null,this.list=null,this.skipFocus=!1,this.buttonsData=[],this.onKeyDown=e=>{const{focusedIndex:t}=this.state;if(e.altKey)return void(this.opened||e.keyCode!==n.Keys.down?this.opened&&e.keyCode===n.Keys.up&&(e.preventDefault(),this.setState({focusedIndex:-1}),this.setOpen(!1,e)):(e.preventDefault(),this.setOpen(!0,e),this.setState({focusedIndex:0})));const s={...this.state};if(e.keyCode===n.Keys.enter||e.keyCode===n.Keys.space){e.preventDefault(),t>=0&&this.dispatchClickEvent(e,t);const s=!this.opened;return this.setState({focused:!0,focusedIndex:s?0:-1}),void this.setOpen(s,e)}if(this.opened&&e.keyCode===n.Keys.esc)return this.setState({focusedIndex:-1}),void this.setOpen(!1,e);if(this.opened){const o=v(t,e.keyCode,e.altKey,this.buttonsData.length);s.focusedIndex=o;const r=e.keyCode===n.Keys.up||e.keyCode===n.Keys.down||e.keyCode===n.Keys.left||e.keyCode===n.Keys.right;!e.altKey&&(r||e.keyCode===n.Keys.home||e.keyCode===n.Keys.end)&&e.preventDefault()}this.setState(s)},this.switchFocus=e=>{this.skipFocus=!0,e(),window.setTimeout((()=>this.skipFocus=!1),0)},this.handleFocus=e=>{this.skipFocus||(this.setState({focused:!0,focusedIndex:this.opened?0:-1}),n.dispatchEvent(this.props.onFocus,e,this,void 0))},this.handleButtonBlur=e=>{this.opened||(this.setState({focused:!1}),n.dispatchEvent(this.props.onBlur,e,this,void 0))},this.handleMenuBlur=e=>{this.skipFocus||(this.setState({focused:!1,focusedIndex:-1}),n.dispatchEvent(this.props.onBlur,e,this,void 0),setTimeout((()=>{this.setOpen(!1,e)}),0))},this.setOpen=(e,t)=>{this.opened!==e&&(this.openedDuringOnChange=e,this.setState({opened:e}),t?this.dispatchPopupEvent(t,e):this.openedDuringOnChange=void 0)},this.onItemClick=(e,t)=>{this.setState({focusedIndex:-1}),this.dispatchClickEvent(e,t),this.setOpen(!1,e)},this.onItemDown=e=>{n.getActiveElement(document)===this.list&&e.preventDefault()},this.mouseDown=e=>{e.preventDefault();const t=n.getActiveElement(document);this.element&&t!==this.element&&t!==this.list&&this.element.focus()},this.onPopupClose=e=>{var t;const s=n.getActiveElement(document);this.element&&this.element.removeAttribute("tabindex"),(s===this.list||null!=(t=this.list)&&t.contains(s))&&this.switchFocus((()=>{this.element&&this.element.focus({preventScroll:!0})})),this.props.popupSettings&&this.props.popupSettings.onClose&&this.props.popupSettings.onClose.call(void 0,e)},this.listRef=e=>{this.list=e,e&&this.state.focused&&this.switchFocus((()=>{e.focus({preventScroll:!0}),this.element&&(this.element.tabIndex=-1)}))},this.onClickMainButton=e=>{if(!this.buttonsData.length)return;const t=!this.opened;this.setState({focused:!0,focusedIndex:t?0:-1}),this.setOpen(t,e)},this.dispatchPopupEvent=(e,t)=>{n.dispatchEvent(t?this.props.onOpen:this.props.onClose,e,this,void 0),this.openedDuringOnChange=void 0},n.validatePackage(c)}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.context&&this.context.uDropDownButton,s=e?"rtl":void 0,{id:o,style:r,tabIndex:a,disabled:i,size:c,rounded:u,fillMode:p,themeColor:m,ariaLabel:h,title:f,accessKey:v,icon:b,svgIcon:g,iconClass:y,buttonClass:k,className:C,imageUrl:x,startIcon:E,endIcon:D}=this.props;return this.buttonsData=this.props.items||l.Children.toArray(this.props.children).filter((e=>e&&e.type===I)).map((e=>e.props)),l.createElement(l.Fragment,null,l.createElement(d,{id:o,size:c,style:r,rounded:u,fillMode:p,themeColor:m,onClick:this.onClickMainButton,onMouseDown:this.mouseDown,onKeyDown:this.onKeyDown,onFocus:this.handleFocus,onBlur:this.handleButtonBlur,"aria-disabled":i?"true":void 0,tabIndex:a,accessKey:v,icon:b,svgIcon:g,iconClass:y,className:n.classNames(k,C,n.uDropDownButton.wrapper({c:t,focused:this.state.focused,disabled:i})),imageUrl:x,dir:s,ref:e=>this.mainButton=e&&e.element,type:"button","aria-expanded":this.opened?"true":"false","aria-label":h,"aria-controls":this.opened?this.guid:void 0,title:f,startIcon:E,endIcon:D},this.props.text),this.renderPopup(e))}componentDidMount(){(void 0===this.props.dir&&this.isRtl()||this.opened)&&this.forceUpdate()}get element(){return this.mainButton}dispatchClickEvent(e,t){this.isItemDisabled(t)||n.dispatchEvent(this.props.onItemClick,e,this,{item:this.buttonsData[t],itemIndex:t})}renderPopup(e){const{popupSettings:t={},id:s}=this.props,r=this.context&&this.context.uDropDownButton,{focusedIndex:a}=this.state;return l.createElement(o.Popup,{anchor:this.mainButton,show:this.opened,animate:t.animate,popupClass:n.classNames(n.uDropDownButton.popup({c:r}),t.popupClass),anchorAlign:t.anchorAlign||b(e),popupAlign:t.popupAlign||g(e),style:e?{direction:"rtl"}:void 0,onClose:this.onPopupClose},l.createElement("ul",{role:"list",id:this.guid,tabIndex:-1,"aria-activedescendant":a>=0?`${this.guid}-${a}`:void 0,ref:this.listRef,onKeyDown:this.onKeyDown,onBlur:this.handleMenuBlur,className:n.classNames(n.uDropDownButton.ul({c:r,size:this.props.size}))},this.renderChildItems()))}renderChildItems(){const{item:e,itemRender:t,textField:s}=this.props,o=this.context&&this.context.uDropDownButton;return this.buttonsData.length>0?this.buttonsData.map(((r,a)=>l.createElement(m,{className:n.classNames(n.uDropDownButton.item({c:o}),r.className,{"k-first":0===a},{"k-last":a===this.buttonsData.length-1}),dataItem:r,textField:s,focused:this.state.focusedIndex===a,onClick:this.onItemClick,onDown:this.onItemDown,render:t,item:e,index:a,key:a,id:`${this.guid}-${a}`}))):null}isItemDisabled(e){return this.buttonsData[e]?this.buttonsData[e].disabled:this.props.disabled}isRtl(){return void 0!==this.props.dir?"rtl"===this.props.dir:!!this.mainButton&&"rtl"===getComputedStyle(this.mainButton).direction}};x.propTypes={accessKey:s.string,ariaLabel:s.string,title:s.string,onFocus:s.func,onBlur:s.func,onItemClick:s.func,onOpen:s.func,onClose:s.func,items:s.arrayOf(s.any),textField:s.string,tabIndex:s.number,disabled:s.bool,icon:s.string,svgIcon:n.svgIconPropType,iconClass:s.string,imageUrl:s.string,popupSettings:s.object,itemRender:s.func,item:s.func,className:s.string,buttonClass:s.string,dir:s.string},x.defaultProps={size:"medium",rounded:"medium",fillMode:"solid",themeColor:"base"};let E=x;E.contextType=n.UnstyledContext;const D=":not(.k-dropdownlist button):not(.k-colorpicker button):not(.k-split-button .k-split-button-arrow)",w=["button"+D,".k-button-group > button"+D,".k-colorpicker",".k-dropdownlist"],N=e=>l.createElement("div",{ref:e._ref,className:n.classNames("k-toolbar-separator k-separator",e.className)}),S="prevArrow.title",B="nextArrow.title",K="moreButtonTitle.title",R={[S]:"Previous scroll button",[B]:"Next scroll button",[K]:"More button"},O=e=>{const t=a.useLocalization(),{disabled:s,type:o,scrollContentRef:i,buttonScrollSpeed:c,prevButton:d,nextButton:u}=e,p="prev"===o?d||"span":u||"span";return l.createElement(p,{className:n.classNames("k-button","k-button-md","k-button-solid","k-button-solid-base","k-rounded-md","k-icon-button",`k-toolbar-${o}`,{"k-disabled":s}),title:`${"prev"===o?t.toLanguageString(S,R[S]):t.toLanguageString(B,R[B])}`,"aria-hidden":!0,tabIndex:s?-1:void 0,onClick:e=>{i&&i.current&&c&&i.current.scrollBy({left:"next"===o?c:-c,behavior:"smooth"})}},l.createElement(n.SvgIcon,{icon:"prev"===o?r.caretAltLeftIcon:r.caretAltRightIcon,className:"k-button-icon"}))},M=e=>{const{scrollButtons:t,scrollButtonsPosition:s,isOverflowing:n,scrollContentRef:o,buttonScrollSpeed:r,dir:a,isScrollStartPosition:i,isScrollEndPosition:c,prevButton:d,nextButton:u,children:p}=e,m=(e,t)=>l.createElement(O,{type:e,disabled:t,scrollContentRef:o,buttonScrollSpeed:r,prevButton:d,nextButton:u}),h="visible"===t||"auto"===t&&n;return l.createElement(l.Fragment,null,h&&"split"===s&&l.createElement(l.Fragment,null,m("rtl"!==a?"prev":"next",i),l.createElement(N,{className:"k-toolbar-button-separator"})),h&&"start"===s&&l.createElement(l.Fragment,null,m("rtl"!==a?"prev":"next",i),m("rtl"!==a?"next":"prev",c),l.createElement(N,{className:"k-toolbar-button-separator"})),l.createElement("span",{className:"k-toolbar-items k-toolbar-items-scroll",ref:o},p),h&&"split"===s&&l.createElement(l.Fragment,null,l.createElement(N,{className:"k-toolbar-button-separator"}),m("rtl"!==a?"next":"prev",c)),h&&"end"===s&&l.createElement(l.Fragment,null,l.createElement(N,{className:"k-toolbar-button-separator"}),m("rtl"!==a?"prev":"next",i),m("rtl"!==a?"next":"prev",c)))},z=e=>{var t;const{toolbarRef:s,children:i,fillMode:c,size:u}=e,[p,m]=l.useState(!1),h=l.useRef(l.Children.toArray(i).filter((e=>l.isValidElement(e))).map(((e,t)=>l.cloneElement(e,{key:e.key||t})))),f=l.useRef([]),v=l.useRef(0),b=l.useRef(null),g=l.useRef(null),y=a.useLocalization(),[k,C]=l.useReducer((e=>e+1),0),I=()=>{if(!s.current)return;let e=0;const t=s.current.clientWidth,n=parseInt(window.getComputedStyle(s.current).gap||"0",10),o=Array.from(s.current.children).reduce(((e,t,s)=>e+=Math.ceil(t.clientWidth)),0),r=Array.from(s.current.children).length;if(e=o+r*n+2*n,e>t){const e=[...h.current],s=e.pop();v.current=t,h.current=e,s&&(f.current=[s,...f.current])}else if(t>v.current+n*r){const e=[...f.current],s=e.shift();f.current=e,s&&(h.current=[...h.current,s]),v.current=t}C()};l.useEffect((()=>(I(),window.addEventListener("resize",I),()=>window.removeEventListener("resize",I))),[]);return l.createElement(l.Fragment,null,h.current.length>0&&h.current,f.current.length>0&&l.createElement(l.Fragment,null,l.createElement(N,{_ref:g,className:"k-toolbar-button-separator"}),l.createElement(d,{ref:b,className:"k-toolbar-overflow-button",fillMode:"flat",svgIcon:r.moreHorizontalIcon,title:y.toLanguageString(K,R[K]),onClick:()=>{m(!p)}}),l.createElement(o.Popup,{anchor:s.current,show:p,popupClass:"k-toolbar-popup",style:{width:null==(t=s.current)?void 0:t.offsetWidth}},l.createElement("span",{className:`k-toolbar-items-list k-toolbar-items-list-${n.kendoThemeMaps.sizeMap[u]} k-toolbar-items-list-${c}`},f.current.length>0&&f.current))))},P=l.forwardRef(((e,t)=>{n.validatePackage(c);const{children:s,className:o,id:r,ariaLabel:a,keyboardNavigation:i,role:d,onResize:u,style:p,tabIndex:m=F.tabIndex,size:h=F.size,fillMode:f=F.fillMode,overflow:v,scrollButtons:b=F.scrollButtons,scrollButtonsPosition:g=F.scrollButtonsPosition,buttonScrollSpeed:y=F.buttonScrollSpeed,prevButton:k,nextButton:C}=e,I=l.useRef(!1),x=l.useRef(null),E=l.useRef(null),D=l.useRef(0),N=l.useRef(0),S=l.useRef([]),B=l.useRef({element:null,props:e}),[K,R]=l.useState(!1),[O,P]=l.useState(!0),[A,T]=l.useState(!1),$=n.useDir(x,e.dir),L=l.useMemo((()=>e.buttons||w),[e.buttons]),U=l.useMemo((()=>L.map((e=>e+":focus")).join(",")),[L]),H=()=>{const e=x.current&&x.current.querySelector(U);return Math.max(0,S.current.findIndex((t=>t===e)))};l.useImperativeHandle(B,(()=>({element:x.current,props:e}))),l.useImperativeHandle(t,(()=>B.current)),l.useEffect((()=>(window.addEventListener("resize",q),x.current&&(N.current=x.current.offsetWidth,D.current=x.current.offsetHeight,!1!==i&&(S.current=Array.from(x.current.querySelectorAll(L.join(","))),W(0))),()=>{window.removeEventListener("resize",q),S.current.length=0})),[]),l.useEffect((()=>{if(I.current){if(!x.current||!1===i)return;S.current=Array.from(x.current.querySelectorAll(L.join(","))),W(H()),V()}else I.current=!0}));const W=e=>{S.current.forEach(((t,s)=>{t.tabIndex=s===e?m:-1}))},j=(e,t)=>{const s=S.current[t];if(s){s.tabIndex=m,s.focus();const t=S.current[e];t&&(t.tabIndex=-1)}},q=e=>{if(!x.current)return;const t=x.current.offsetWidth,s=x.current.offsetHeight;if(N.current!==t||D.current!==s){N.current=t,D.current=s;const n={offsetWidth:N.current,offsetHeight:D.current};u&&u.call(void 0,{target:B.current,...n,nativeEvent:e})}V()},V=l.useCallback((()=>{const e=E.current;e&&R(e.scrollWidth>e.clientWidth||e.scrollHeight>e.clientHeight)}),[]),G=l.useCallback((()=>{const e=E.current;if(e){const t=0===e.scrollLeft,s="rtl"!==$?e.scrollLeft+e.clientWidth===e.scrollWidth:e.clientWidth-e.scrollLeft===e.scrollWidth;t&&P(!0),s&&T(!0),!t&&!s&&(P(!1),T(!1))}}),[$]);return l.useEffect((()=>{const e=E.current;if(e)return e.addEventListener("scroll",G),()=>{e.removeEventListener("scroll",G)}}),[G]),l.createElement("div",{id:r,"aria-label":a,className:n.classNames("k-toolbar",{[`k-toolbar-${n.kendoThemeMaps.sizeMap[h]||h}`]:h,[`k-toolbar-${f}`]:f,"k-toolbar-scrollable":"scroll"===v,"k-toolbar-scrollable-overlay":"scroll"===v&&("hidden"===b||void 0===b),"k-toolbar-scrollable-start":"scroll"===v&&"hidden"===b&&O,"k-toolbar-scrollable-end":"scroll"===v&&"hidden"===b&&A,"k-toolbar-section":e.overflow&&"section"===v},o),style:p,role:void 0!==d?d||void 0:"toolbar",dir:$,ref:x,onKeyDown:!1!==i?e=>{const t=e.keyCode===n.Keys.left||e.keyCode===n.Keys.right||e.keyCode===n.Keys.home||e.keyCode===n.Keys.end,s=H();!t||e.defaultPrevented||-1===S.current.findIndex((t=>t===e.target))||(e.keyCode===n.Keys.left?j(s,0===s?S.current.length-1:s-1):j(s,s===S.current.length-1?0:s+1),e.keyCode===n.Keys.home&&j(s,0),e.keyCode===n.Keys.end&&j(s,S.current.length-1))}:void 0},"scroll"===v&&l.createElement(M,{scrollButtons:b,scrollButtonsPosition:g,prevButton:k,nextButton:C,isOverflowing:K,scrollContentRef:E,buttonScrollSpeed:y,dir:$,isScrollStartPosition:O,isScrollEndPosition:A,children:s}),"section"===v&&l.createElement(z,{toolbarRef:x,fillMode:f,size:h},s),("none"===v||void 0===v)&&s)})),F={tabIndex:0,size:"medium",fillMode:"solid",scrollButtons:"auto",scrollButtonsPosition:"split",buttonScrollSpeed:100};P.displayName="KendoReactToolbar",P.propTypes={tabIndex:s.number,dir:s.string,keyboardNavigation:s.bool,style:s.object,className:s.string,role:s.string,onResize:s.func,buttons:s.arrayOf(s.string.isRequired),size:s.oneOf([null,"small","medium","large"]),fillMode:s.oneOf([null,"solid","flat","outline"]),overflow:s.oneOf(["none","section","scroll"]),scrollButtons:s.oneOf(["hidden","visible","auto"]),scrollButtonsPosition:s.oneOf(["start","end","split"]),buttonScrollSpeed:s.number};const A=l.forwardRef(((e,t)=>{const{id:s,className:o,style:r,children:a}=e,i=l.useRef(null);return l.useImperativeHandle(t,(()=>({element:i.current}))),l.createElement("div",{id:s,className:n.classNames("k-toolbar-item",o),style:r,ref:i},a)}));A.displayName="KendoReactToolbarItem",A.propTypes={className:s.string};const T=l.forwardRef(((e,t)=>{const s=l.useRef(null),o=l.useRef(null);l.useImperativeHandle(o,(()=>({element:s.current}))),l.useImperativeHandle(t,(()=>({element:s.current})));const r=l.useMemo((()=>n.classNames("k-spacer",e.className)),[e.className]);return l.createElement("span",{ref:s,className:r})}));T.displayName="KendoReactToolbarSpacer",T.propTypes={className:s.string};const $=t.createContext([null,e=>{}]),L=t.createContext([null,e=>{}]),U=t.createContext([null,e=>{}]);var H=(e=>(e.next="next",e.prev="prev",e.current="current",e.reset="reset",e))(H||{});var W=(e=>(e.remove="remove",e.add="add",e.reorder="reorder",e))(W||{});var j=(e=>(e.toggle="toggle",e.remove="remove",e))(j||{});const q=l.forwardRef(((e,t)=>{n.validatePackage(c);const s=l.useRef(null),o=l.useRef(null),{disabled:a=G.disabled,fillMode:i=G.fillMode,themeColor:d=G.themeColor,size:u=G.size,rounded:p=G.rounded,dir:m=G.dir,removeIcon:h=G.removeIcon,removeSvgIcon:f=G.removeSvgIcon,removable:v=G.removable}=e,b=n.useDir(o,m);l.useImperativeHandle(s,(()=>({element:o.current,props:e}))),l.useImperativeHandle(t,(()=>s.current));const[g,y]=l.useContext($),[k,C]=l.useContext(L),[,I]=l.useContext(U),x=l.useMemo((()=>e.selected||(Array.isArray(g)?g.some((t=>t===e.value)):g===e.value)),[e.selected,e.value,g]),E=l.useMemo((()=>k===e.value),[e.value,k]);l.useEffect((()=>{E&&o.current&&o.current.focus()}),[E]);const D=l.useCallback((t=>{y({type:j.toggle,payload:e.value,event:t})}),[y,e.value]),w=l.useCallback((t=>{v&&(I({type:W.remove,payload:e.value,event:t}),C({type:H.reset,payload:e.value,event:t}),y({type:j.remove,payload:e.value,event:t}),e.onRemove&&e.onRemove.call(void 0,{target:s.current,syntheticEvent:t}))}),[e.onRemove,e.value,v,I,C,y]),N=l.useCallback((t=>{switch(t.keyCode){case n.Keys.left:C({type:H.prev,payload:e.value,event:t});break;case n.Keys.right:C({type:H.next,payload:e.value,event:t});break;case n.Keys.enter:y({type:j.toggle,payload:e.value,event:t});break;case n.Keys.delete:w(t)}e.onKeyDown&&e.onKeyDown.call(void 0,{target:s.current,syntheticEvent:t})}),[e.onKeyDown,e.value,C,y,w]),S=l.useCallback((t=>{C({payload:e.value,type:H.current,event:t}),e.onFocus&&e.onFocus.call(void 0,{target:s.current,syntheticEvent:t})}),[e.onFocus,e.value,C]),B=l.useCallback((t=>{e.onBlur&&e.onBlur.call(void 0,{target:s.current,syntheticEvent:t})}),[e.onBlur]),K=n.useMouse(e,s,{onClick:D});return l.createElement("div",{...K,role:e.role||"button",id:e.value,style:e.style,ref:o,dir:b,tabIndex:n.getTabIndex(e.tabIndex,a,void 0),className:n.classNames("k-chip",{"k-rtl":"rtl"===b,"k-disabled":a,"k-selected":x,"k-focus":E,[`k-chip-${n.kendoThemeMaps.sizeMap[u]||u}`]:u,[`k-rounded-${n.kendoThemeMaps.roundedMap[p]||p}`]:p,[`k-chip-${i}`]:i,[`k-chip-${i}-${d}`]:!(!i||!d)},e.className),"aria-pressed":e.role?void 0:x,"aria-disabled":a,"aria-describedby":e.ariaDescribedBy,"aria-keyshortcuts":v?"Enter Delete":void 0,onFocus:S,onBlur:B,onKeyDown:N},x&&(e.selectedIcon||e.selectedSvgIcon)&&l.createElement(n.IconWrap,{className:"k-chip-icon",name:e.selectedIcon?n.toIconName(e.selectedIcon):void 0,icon:e.selectedSvgIcon,size:"small"}),(e.icon||e.svgIcon)&&l.createElement(n.IconWrap,{className:"k-chip-icon",name:e.icon?n.toIconName(e.icon):void 0,icon:e.svgIcon,size:"small"}),e.avatar&&l.createElement("div",{className:`k-chip-avatar k-avatar k-rounded-${e.avatar.rounded} k-avatar-md k-avatar-solid k-avatar-solid-primary`,style:e.avatar.style},l.createElement("span",{className:"k-avatar-image"},l.createElement("img",{src:e.avatar.image,alt:e.avatar.imageAlt}))),l.createElement("span",{className:"k-chip-content"},void 0!==e.children?e.children:e.text&&l.createElement("span",{"aria-label":e.ariaLabel||e.text,className:"k-chip-label"},e.text)),v&&l.createElement("span",{className:"k-chip-actions"},l.createElement("span",{className:n.classNames("k-chip-action","k-chip-remove-action"),onClick:w},l.createElement(n.IconWrap,{name:h?n.toIconName(h):void 0,icon:f||r.xCircleIcon,size:"small"}))))})),V={id:s.string,text:s.string,value:s.any,dir:s.oneOf(["ltr","rtl"]),removable:s.bool,removeIcon:s.string,removeIconSvg:n.svgIconPropType,disabled:s.bool,icon:s.string,svgIcon:n.svgIconPropType,selectedIcon:s.string,selectedIconSvg:n.svgIconPropType,onRemove:s.func,dataItem:s.any,selected:s.bool,ariaDescribedBy:s.string,size:s.oneOf([null,"small","medium","large"]),rounded:s.oneOf([null,"small","medium","large","full"]),fillMode:s.oneOf([null,"outline","solid"]),themeColor:s.oneOf([null,"base","info","success","warning","error"])},G={disabled:!1,removable:!1,removeIcon:"k-i-x-circle",removeSvgIcon:r.xCircleIcon,dir:"ltr",size:"medium",rounded:"medium",fillMode:"solid",themeColor:"base"};q.displayName="KendoReactChip",q.propTypes=V;const Z=(e,t,s)=>{"multiple"===t.selection?Array.isArray(e)||(e=e?[e]:null):"single"===t.selection&&Array.isArray(e)&&(e=e?e.join(""):null);const[n,o]=l.useState(e);return[n,e=>{const r=((e,t)=>{switch(t.selection){case"single":switch(t.type){case"toggle":if(!Array.isArray(e)||null===e)return t.payload===e?null:t.payload;throw new Error("State cannot be an array in single selection");case"remove":return t.payload===e?null:e;default:return e}case"multiple":switch(t.type){case"toggle":if(Array.isArray(e))return e.some((e=>e===t.payload))?e.filter((e=>e!==t.payload)):[...e,t.payload];if(null===e)return[t.payload];throw new Error("State cannot be non-array in multiple selection");case"remove":return Array.isArray(e)?e.some((e=>e===t.payload))?e.filter((e=>e!==t.payload)):[...e,t.payload]:e;default:return e}case"none":return null;default:return e}})(t.state||n,{...e,...t});s&&s(r,e.event),"none"!==t.selection&&o(r)}]},_=l.forwardRef(((e,t)=>{n.validatePackage(c);const s=l.useRef(null),o=l.useRef(null),{id:r,style:a,tabIndex:i,className:d,ariaDescribedBy:u,ariaLabelledBy:p,ariaLabel:m,value:h,defaultData:f=Q.defaultData,chip:v=Q.chip,disabled:b=Q.disabled,size:g=Q.size,defaultValue:y=Q.defaultValue,selection:k=Q.selection,valueField:C=Q.valueField,textField:I=Q.textField,dir:x=Q.dir,onChange:E,onDataChange:D}=e,w=n.useDir(o,x),N=l.useMemo((()=>v||q),[v,q]);l.useImperativeHandle(s,(()=>({element:o.current,props:e}))),l.useImperativeHandle(t,(()=>s.current));const S=l.useCallback(((e,t)=>{E&&s.current&&E.call(void 0,{value:e,target:s.current,syntheticEvent:t})}),[E]),[B,K]=Z(h||y,{selection:k,state:h},S),R=l.useCallback(((e,t)=>{D&&s.current&&D.call(void 0,{value:e,target:s.current,syntheticEvent:t})}),[D]),[O,M]=((e,t,s)=>{const[n,o]=l.useState(e);return[n,e=>{const r=((e,t)=>{switch(t.type){case"add":case"reorder":break;case"remove":return e.filter((e=>e[t.valueField]!==t.payload));default:return e}})(t.state||n,{...e,...t});s&&s(r,e.event),o(r)}]})(e.data||f,{state:e.data,valueField:C},R),z=l.useCallback(((e,t)=>(e.push(t[C]),e)),[C]),P=l.useMemo((()=>e.data||O),[e.data,O]),F=l.useMemo((()=>h||B),[h,B]),A=l.useMemo((()=>P.reduce(z,[])),[P,z]),T=l.useCallback((e=>n.getter(C)(e)),[C]),H=l.useCallback((e=>n.getter(I)(e)),[I]),[W,j]=(e=>{const[t,s]=l.useState(null);return[t,t=>{const n=((e,t)=>{const s=t.items.findIndex((t=>t===e));switch(t.type){case"next":return s===t.items.length-1?e:t.items[s+1];case"prev":return 0===s?e:t.items[s-1];case"current":return t.payload;case"reset":return null;default:return e}})(t.payload,{...t,...e});s(n)}]})({items:A}),V=n.useMouse(e,s);return l.createElement($.Provider,{value:[F,K]},l.createElement(L.Provider,{value:[W,j]},l.createElement(U.Provider,{value:[P,M]},l.createElement("div",{ref:o,...V,role:b?void 0:"listbox",id:r,dir:w,style:a,tabIndex:n.getTabIndex(i,b,void 0),className:n.classNames("k-chip-list",{"k-rtl":"rtl"===w,"k-disabled":b,[`k-chip-list-${n.kendoThemeMaps.sizeMap[g]||g}`]:g},d),"aria-label":m,"aria-labelledby":p,"aria-describedby":u,"aria-orientation":"horizontal","aria-multiselectable":"multiple"===k},P.map(((e,t)=>l.createElement(N,{role:"option",dataItem:e,size:g,key:[T(e),t].join("-"),text:H(e),value:T(e),ariaLabel:e.ariaLabel,svgIcon:e.svgIcon||void 0})))))))})),J={id:s.string,className:s.string,tabIndex:s.number,data:s.any,defaultData:s.arrayOf(s.any),onDataChange:s.func,value:s.oneOfType([s.any,s.arrayOf(s.any)]),defaultValue:s.oneOfType([s.any,s.arrayOf(s.any)]),onChange:s.func,selection:s.oneOf(["single","none","multiple"]),textField:s.string,valueField:s.string,disabled:s.bool,dir:s.oneOf(["ltr","rtl"]),ariaLabelledBy:s.string,ariaDescribedBy:s.string,size:s.oneOf([null,"small","medium","large"])},Q={chip:q,size:"medium",disabled:!1,defaultValue:null,defaultData:[],dir:"ltr",selection:"none",textField:"text",valueField:"value",removable:"removable"};_.displayName="KendoReactChipList",_.propTypes=J;const X=l.forwardRef(((e,t)=>{const{className:s,disabled:o,text:r,icon:a,style:i,id:c,focused:d,tabIndex:u,index:p,dataItem:m,item:h,svgIcon:f,onDown:v,onClick:b,...g}=e,y=l.useRef(null),k=l.useCallback((()=>{y.current&&y.current.focus()}),[]),C=l.useCallback((()=>({element:y.current,focus:k})),[k]);l.useImperativeHandle(t,C);const I=l.useCallback((e=>{b&&void 0!==p&&!o&&b(e,p)}),[b,p]),x=l.useMemo((()=>n.classNames("k-fab-item",{"k-focus":d,"k-disabled":o},s)),[s,o,d]),E=h;return l.createElement("li",{ref:y,id:c,className:x,style:i,role:"menuitem",tabIndex:n.getTabIndex(u,o),"aria-disabled":o,"aria-label":`${r||""} floatingactionbutton item`,onClick:I,onMouseDown:v,onPointerDown:v,...g},E?l.createElement(E,{itemIndex:p,item:m}):l.createElement(l.Fragment,null,r&&l.createElement("span",{className:"k-fab-item-text"},r),a||f?l.createElement(n.IconWrap,{className:"k-fab-item-icon",name:a,icon:f}):null))}));X.propTypes={className:s.string,style:s.object,children:s.any,disabled:s.bool,focused:s.bool,index:s.number,icon:s.string,svgIcon:n.svgIconPropType,text:s.string,tabIndex:s.number,customProp:s.any},X.displayName="KendoFloatingActionButtonItem";const Y="16px",ee=e=>"number"==typeof e?e+"px":e,te=(e,t)=>{const s={horizontal:t?"right":"left",vertical:"bottom"};return"end"===e.horizontal&&(s.horizontal=t?"left":"right"),s},se=(e,t)=>{const s={horizontal:t?"right":"left",vertical:"top"};return"end"===e.horizontal&&(s.horizontal=t?"left":"right"),s},ne=(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"]),oe=(e,t,s,n)=>{const o=t.horizontal,r=t.vertical;if(e.current){const a=s&&void 0!==s.x?ee(s.x):Y,i=s&&void 0!==s.x?`calc(50% + ${ee(s.x)})`:"50%",l=s&&void 0!==s.y?ee(s.y):Y,c=s&&void 0!==s.y?`calc(50% + ${ee(s.y)})`:"50%";e.current.style.setProperty(re(t,n),"center"===o?i:a),e.current.style.setProperty(ae(t),"middle"===r?c:l),n&&(("top"===r||"bottom"===r)&&"start"===o&&e.current.style.setProperty("left","unset"),"middle"===r&&"end"===o&&e.current.style.setProperty("right","unset"),"middle"===r&&"start"===o&&e.current.style.setProperty("left","unset"))}},re=(e,t)=>{const{horizontal:s}=e;return{end:t?"left":"right",center:"left",start:t?"right":"left"}[s||"end"]},ae=e=>({top:"top",middle:"top",bottom:"bottom"}[e.vertical||"bottom"]),ie=l.forwardRef(((e,t)=>{n.validatePackage(c);const{align:s=le.align,alignOffset:r,className:a,disabled:i,icon:d,svgIcon:u,iconClass:p,id:m,items:h,item:f,text:v,positionMode:b=le.positionMode,size:g=le.size,style:y,rounded:k=le.rounded,themeColor:C=le.themeColor,overlayStyle:I,tabIndex:x,accessKey:E,popupSettings:D={},modal:w,onClick:N,onItemClick:S,onFocus:B,onBlur:K,onKeyDown:R,onOpen:O,onClose:M,...z}=e,P=n.useZIndexContext(),F=P?P+2:100,A=l.useRef(null),T=l.useRef(null),$=l.useRef(null),L=l.useRef(null),U=l.useCallback((()=>{T.current&&T.current.focus()}),[]),H=l.useCallback((()=>({element:T.current,focus:U})),[U]);l.useImperativeHandle(A,H),l.useImperativeHandle(t,(()=>A.current));const[W,j]=l.useState(!1),[q,V]=l.useState(!1),[G,Z]=l.useState(-1),_=n.useId()+"-button-id",J=n.useDir(T,e.dir),Q="rtl"===J,Y=n.useId()+"-list-id";l.useEffect((()=>{oe(T,s,r,Q)}),[T,s,r,Q]),l.useEffect((()=>{q&&T&&T.current&&T.current.focus()}),[q,T]);const ee=l.useCallback(((e,t)=>{h&&n.dispatchEvent(t?O:M,e,H(),void 0)}),[O,M,h]),re=l.useCallback((e=>{!e.target||i||(!h&&N?n.dispatchEvent(N,e,H(),void 0):(j(!W),V(!0),Z(W?-1:0),ee(e,!W)))}),[j,V,Z,N,ee,W,h,i]),ae=l.useCallback((e=>{V(!0),Z(W?0:-1),B&&n.dispatchEvent(B,e,H(),void 0)}),[B,V,Z]),ie=l.useCallback((e=>{V(!1),j(!1),Z(-1),n.dispatchEvent(K,e,H(),void 0),W&&ee(e,!1)}),[K,V,j,Z,ee]),ce=l.useCallback((e=>{e.preventDefault()}),[]),de=l.useCallback(((e,t)=>{h&&(h[t].disabled||n.dispatchEvent(S,e,H(),{itemProps:h[t],itemIndex:t}))}),[S]),ue=l.useCallback(((e,t)=>{!e.target||!h||(Z(t),j(!1),de(e,t),ee(e,!1))}),[Z,j,de,ee]),pe=l.useCallback((e=>{n.getActiveElement(document)===T.current&&e.preventDefault()}),[T]),me=l.useCallback((e=>{const t=G,s=h?h.length:-1;if(e.altKey)return!W&&e.keyCode===n.Keys.down&&(e.preventDefault(),j(!0),Z(0)),void(W&&e.keyCode===n.Keys.up&&(e.preventDefault(),j(!1),Z(-1)));switch(e.keyCode){case n.Keys.enter:case n.Keys.space:t>=0&&de(e,t),h||re(e),e.preventDefault(),j(!W),Z(W?-1:0);break;case n.Keys.esc:e.preventDefault(),j(!1),Z(-1);break;case n.Keys.home:e.preventDefault(),Z(0);break;case n.Keys.end:e.preventDefault(),Z(s-1);break;case n.Keys.down:case n.Keys.right:e.preventDefault(),Z(t+1>=s?0:t+1);break;case n.Keys.up:case n.Keys.left:e.preventDefault(),Z(t-1<0?s-1:t-1)}n.dispatchEvent(R,e,H(),void 0)}),[R,G,Z,Q,j]),he=l.useMemo((()=>n.classNames("k-fab k-fab-solid",{"k-fab-sm":"small"===g,"k-fab-md":"medium"===g,"k-fab-lg":"large"===g,"k-disabled":i,"k-pos-absolute":"absolute"===b,"k-pos-fixed":"fixed"===b,"k-focus":q,[`k-rounded-${n.kendoThemeMaps.roundedMap[k]||k}`]:k,[`k-fab-solid-${C}`]:C},`k-${s.vertical}-${s.horizontal}`,a)),[C,g,k,i,b,s,q,a]),fe=h&&h.map(((e,t)=>l.createElement(X,{...e,key:t,index:t,id:`${Y}-${t}`,disabled:i||e.disabled,focused:G===t,dataItem:e,item:f,className:n.classNames(e.className,ne(J||"ltr",s.horizontal)),onClick:ue,onDown:pe}))),ve=!(!d&&!u||v),be=(T.current?T.current.offsetWidth:0)/2-16;return l.createElement(n.ZIndexContext.Provider,{value:F},l.createElement(l.Fragment,null,l.createElement("button",{ref:T,id:m||_,role:"button",type:"button","aria-disabled":i,"aria-expanded":h?W:void 0,"aria-haspopup":!!h,"aria-label":`${v||""} floatingactionbutton`,"aria-owns":h?Y:void 0,"aria-activedescendant":G>=0&&h?`${Y}-${G}`:void 0,tabIndex:n.getTabIndex(x,i),accessKey:E,dir:J,disabled:i,className:he,style:y,onClick:re,onMouseDown:ce,onFocus:ae,onBlur:ie,onKeyDown:me,...z},d||u?l.createElement(n.IconWrap,{className:"k-fab-icon",name:d,icon:u}):p?l.createElement("span",{role:"presentation",className:p}):null,v&&l.createElement("span",{className:"k-fab-text"},v)),w&&W&&l.createElement("div",{className:"k-overlay",style:{zIndex:F,...I}}),l.createElement(o.Popup,{ref:L,anchor:T.current,show:W,animate:D.animate,popupClass:n.classNames("k-popup-transparent k-fab-popup",D.popupClass),anchorAlign:D.anchorAlign||te(s,Q),popupAlign:D.popupAlign||se(s,Q),style:{boxShadow:"none"}},l.createElement("ul",{ref:$,role:"menu","aria-labelledby":m,id:Y,className:n.classNames("k-fab-items",{"k-fab-items-bottom":"bottom"!==s.vertical,"k-fab-items-top":"bottom"===s.vertical}),style:{paddingLeft:ve?be:void 0,paddingRight:ve?be:void 0}},fe))))}));ie.propTypes={className:s.string,style:s.object,id:s.string,dir:s.string,tabIndex:s.number,accessKey:s.string,disabled:s.bool,icon:s.string,svgIcon:n.svgIconPropType,iconClass:s.string,text:s.string,alignOffset:s.shape({x:s.oneOfType([s.number,s.string]).isRequired,y:s.oneOfType([s.number,s.string]).isRequired}),align:s.shape({vertical:s.oneOf(["top","middle","bottom"]).isRequired,horizontal:s.oneOf(["start","center","end"]).isRequired}),positionMode:s.oneOf(["absolute","fixed"]),size:s.oneOf([null,"small","medium","large"]),rounded:s.oneOf([null,"small","medium","large","full"]),themeColor:s.oneOf([null,"primary","secondary","tertiary","info","success","warning","error","dark","light","inverse"]),modal:s.bool,overlayStyle:s.object};const le={align:{vertical:"bottom",horizontal:"end"},size:"medium",rounded:"full",themeColor:"primary",positionMode:"fixed"};ie.displayName="KendoFloatingActionButton";const ce=n.withIdHOC(E);ce.displayName="KendoReactDropDownButton";const de=n.withIdHOC(k);de.displayName="KendoReactSplitButton",e.Button=d,e.ButtonGroup=p,e.Chip=q,e.ChipList=_,e.DropDownButton=ce,e.DropDownButtonClassComponent=E,e.DropDownButtonItem=I,e.FloatingActionButton=ie,e.FloatingActionButtonItem=X,e.SplitButton=de,e.SplitButtonClassComponent=k,e.SplitButtonItem=f,e.Toolbar=P,e.ToolbarItem=A,e.ToolbarSeparator=N,e.ToolbarSpacer=T,e.toolbarButtons=w}));
!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")):"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"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).KendoReactButtons={},e.React,e.PropTypes,e.KendoReactCommon,e.KendoReactPopup,e.KendoSvgIcons,e.KendoReactIntl)}(this,(function(e,t,s,n,o,r,a){"use strict";function i(e){var t=Object.create(null);return e&&Object.keys(e).forEach((function(s){if("default"!==s){var n=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(t,s,n.get?n:{enumerable:!0,get:function(){return e[s]}})}})),t.default=e,Object.freeze(t)}var l=i(t);const c={name:"@progress/kendo-react-buttons",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate:0,version:"$VERSION",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"};const d=l.forwardRef(((e,t)=>{n.validatePackage(c);const{children:s,togglable:o,dir:r,disabled:a,selected:i,icon:d,iconClass:p,svgIcon:m,imageUrl:h,imageAlt:f,className:v,startIcon:b,endIcon:g,onClick:y,size:k=u.size,rounded:C=u.rounded,fillMode:I=u.fillMode,themeColor:x=u.themeColor,...E}=e,D=l.useRef(),w=l.useRef(null),[N,S]=l.useState(!0===o&&!0===i),B=void 0!==m||void 0!==d||void 0!==p||void 0!==h,K=void 0!==s,R=n.useUnstyled(),O=e.unstyled||R,M=O&&O.uButton;l.useImperativeHandle(t,(()=>({element:w.current,selected:void 0!==D.current?D.current:N}))),l.useMemo((()=>{o&&void 0!==i&&i!==N&&S(i)}),[o,i]),l.useEffect((()=>{D.current=void 0}),[N]);const z=function({imageUrl:e,name:t,iconClass:s,svgIcon:o,imageAlt:r,buttonClasses:a}){return e?l.createElement("img",{role:"presentation",className:n.classNames(n.uButton.icon({c:a})),alt:r,src:e}):t||o?l.createElement(n.IconWrap,{className:n.classNames(n.uButton.icon({c:a})),name:t,icon:o}):s?l.createElement("span",{role:"presentation",className:n.classNames(n.uButton.icon({c:a}),s)}):null}({name:d,svgIcon:m,iconClass:p,imageUrl:h,imageAlt:f,buttonClasses:M}),P=e=>l.cloneElement(e,{className:n.classNames(n.uButton.icon({c:M}))});return l.createElement("button",{ref:w,"aria-pressed":o?N:void 0,...E,dir:r,disabled:a,onClick:e=>{o&&void 0===i&&(D.current=!N,S(!N)),y&&y.call(void 0,e)},className:n.classNames(n.uButton.wrapper({c:M,isRtl:"rtl"===r,selected:N,disabled:a,size:k,fillMode:I,rounded:C,themeColor:x,iconButton:!K&&B}),v)},b&&P(b),z,s&&l.createElement("span",{className:n.classNames(n.uButton.text({c:M}))},s),g&&P(g))})),u={togglable:!1,size:"medium",rounded:"medium",fillMode:"solid",themeColor:"base"};d.displayName="KendoReactButton",d.propTypes={children:s.node,selected:s.bool,togglable:s.bool,icon:s.string,svgIcon:n.svgIconPropType,iconClass:s.string,imageUrl:s.string,imageAlt:s.string,size:s.oneOf([null,"small","medium","large"]),rounded:s.oneOf([null,"small","medium","large","full"]),fillMode:s.oneOf([null,"flat","link","outline","solid","clear"]),themeColor:s.oneOf([null,"base","primary","secondary","tertiary","info","success","warning","error","dark","light","inverse"])};const p=e=>{n.validatePackage(c);const{children:t,className:s,dir:o,disabled:r,width:a}=e,i=n.useUnstyled(),d=e.unstyled||i,u=d&&d.uButtonGroup,p=(e,t)=>{const s={...a?{width:a}:{},...e.props.style||{}},n=r||e.props.disabled,o={...e.props,...t?{className:t}:{},...Object.keys(s).length?{style:s}:{},...void 0!==n?{disabled:n}:{}};return l.Children.count(e.props.children)>0?l.cloneElement(e,o,e.props.children):l.cloneElement(e,o)},m=l.useRef(null),h=(e=>{const t=l.Children.count(e),s=void 0!==o?"rtl"===o:m.current&&"rtl"===getComputedStyle(m.current).direction||!1;return l.Children.map(e,((e,o)=>{if(l.isValidElement(e)){const r=o===t-1,a=s,i=n.classNames(e.props.className,n.uButtonGroup.position({c:u,start:a?r:0===o,end:a?0===o:r}));return p(e,i)}return e}))})(t),f=n.classNames(n.uButtonGroup.wrapper({c:u,stretched:!!a,disabled:r}),s),v={className:f,style:{width:`${a}`},dir:o,role:"group","aria-disabled":r};return l.createElement("div",{ref:m,...v,className:f},h)};p.propTypes={children:s.oneOfType([s.arrayOf(s.element),s.element]),className:s.string,disabled:s.bool,width:s.string,dir:s.string};const m=e=>{const t=n.useUnstyled(),s=e.unstyled||t,o=s&&s.uDropDownButton,r=l.useCallback((t=>{e.onClick(t,e.index)}),[e]),a=e.dataItem.render||e.item||(void 0===e.item?e.render:null),i=void 0!==e.dataItem.text?e.dataItem.text:e.textField?e.dataItem[e.textField]:e.dataItem,c=l.createElement("li",{id:e.id,className:n.classNames(n.uDropDownButton.li({c:o,focused:e.focused}),e.className),tabIndex:-1,onClick:r,onMouseDown:e.onDown,onPointerDown:e.onDown,role:"menuitem","aria-disabled":e.dataItem.disabled||void 0},l.createElement("span",{tabIndex:-1,className:n.classNames(n.uDropDownButton.link({c:o,selected:e.dataItem.selected,disabled:e.dataItem.disabled})),key:"icon"},a?l.createElement(a,{item:e.dataItem,itemIndex:e.index}):l.createElement(l.Fragment,null,(e.dataItem.icon||e.dataItem.iconClass||e.dataItem.svgIcon)&&l.createElement(n.IconWrap,{className:e.dataItem.iconClass,name:e.dataItem.icon,icon:e.dataItem.svgIcon}),e.dataItem.imageUrl&&l.createElement("img",{role:"presentation",alt:"",src:e.dataItem.imageUrl,className:"k-icon"}),i&&l.createElement("span",{className:"k-menu-link-text"},i))));return void 0!==e.item&&void 0!==e.render?e.render.call(void 0,c,e):c};m.displayName="KendoReactButtonItem";const h=class extends l.Component{render(){return null}};h.propTypes={text:s.string,icon:s.string,iconClass:s.string,imageUrl:s.string,disabled:s.bool,render:s.any};let f=h;const v=(e,t,s,o)=>{if(s)return e;const r=Math.min(o-1,Math.max(0,e));switch(t){case n.Keys.enter:case n.Keys.space:case n.Keys.esc:return-1;case n.Keys.up:case n.Keys.left:return r-1<0?o-1:r-1;case n.Keys.down:case n.Keys.right:return r+1>=o?0:r+1;case n.Keys.home:return 0;case n.Keys.end:return o-1;default:return e}};function b(e){const t={horizontal:"left",vertical:"bottom"};return e&&(t.horizontal="right"),t}function g(e){const t={horizontal:"left",vertical:"top"};return e&&(t.horizontal="right"),t}const y=class extends l.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.onKeyDown=e=>{const{focusedIndex:t}=this.state;if(e.altKey)return void(this.opened||e.keyCode!==n.Keys.down?this.opened&&e.keyCode===n.Keys.up&&(e.preventDefault(),this.setState({focusedIndex:-1}),this.setOpen(!1,e)):(e.preventDefault(),this.setState({focusedIndex:0}),this.setOpen(!0,e)));let s;if(e.keyCode===n.Keys.enter||e.keyCode===n.Keys.space){if(e.preventDefault(),this.dispatchClickEvent(e,t),t>=0){s={focusedIndex:this.opened?-1:0};const t=!this.opened;this.setOpen(t,e)}}else if(this.opened&&e.keyCode===n.Keys.esc)return this.setState({focusedIndex:-1}),void this.setOpen(!1,e);if(this.opened){const o=v(t,e.keyCode,e.altKey,this.buttonsData.length);o!==t&&(s=s||{},s.focusedIndex=o);const r=e.keyCode===n.Keys.up||e.keyCode===n.Keys.down||e.keyCode===n.Keys.left||e.keyCode===n.Keys.right;!e.altKey&&(r||e.keyCode===n.Keys.home||e.keyCode===n.Keys.end)&&e.preventDefault()}s&&this.setState(s)},this.switchFocus=e=>{this.skipFocus=!0,e(),window.setTimeout((()=>this.skipFocus=!1),0)},this.onFocus=e=>{this.skipFocus||(n.dispatchEvent(this.props.onFocus,e,this,void 0),this.setState({focused:!0}))},this.setOpen=(e,t)=>{this.opened!==e&&(this.openedDuringOnChange=e,this.setState({opened:e}),t?this.dispatchPopupEvent(t,e):this.openedDuringOnChange=void 0)},this.onItemClick=(e,t)=>{this.opened&&this.setState({focusedIndex:0}),this.dispatchClickEvent(e,t),this.setOpen(!1,e)},this.onBlur=e=>{this.skipFocus||(this.setState({focused:!1,focusedIndex:-1}),n.dispatchEvent(this.props.onBlur,e,this,void 0),setTimeout((()=>{this.setOpen(!1,e)}),0))},this.onPopupClose=e=>{var t;const s=n.getActiveElement(document);this.element&&this.element.removeAttribute("tabindex"),(s===this.list||null!=(t=this.list)&&t.contains(s))&&this.switchFocus((()=>{this.element&&this.element.focus({preventScroll:!0})})),this.props.popupSettings&&this.props.popupSettings.onClose&&this.props.popupSettings.onClose.call(void 0,e)},this.listRef=e=>{this.list=e,e&&this.state.focused&&this.switchFocus((()=>{e.focus({preventScroll:!0}),this.element&&(this.element.tabIndex=-1)}))},this.onSplitPartClick=e=>{if(this.buttonsData.length){const t=!this.opened;this.setState({focusedIndex:t?0:-1,focused:!0}),this.setOpen(t,e)}},this.onDownSplitPart=e=>{e.preventDefault();const t=n.getActiveElement(document);this.element&&t!==this.element&&t!==this.list&&this.element.focus()},this.onItemDown=e=>{n.getActiveElement(document)===this.list&&e.preventDefault()},this.dispatchPopupEvent=(e,t)=>{n.dispatchEvent(t?this.props.onOpen:this.props.onClose,e,this,void 0),this.openedDuringOnChange=void 0},n.validatePackage(c)}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||l.Children.toArray(this.props.children).filter((e=>e&&e.type===f)).map((e=>e.props));const e=this.isRtl(),t=e?"rtl":void 0,{id:s,style:o,tabIndex:a,disabled:i}=this.props;return l.createElement("div",{id:s,style:o,className:n.classNames("k-split-button","k-button-group",{"k-focus":this.state.focused},`k-rounded-${n.kendoThemeMaps.roundedMap[this.props.rounded||"medium"]}`,this.props.className),onKeyDown:this.onKeyDown,onFocus:this.onFocus,onBlur:this.onBlur,dir:t,ref:e=>this.wrapper=e},l.createElement(d,{ref:e=>this.mainButton=e&&e.element,type:"button",size:this.props.size,rounded:this.props.rounded,fillMode:this.props.fillMode,themeColor:this.props.themeColor,onClick:e=>this.onItemClick(e,-1),disabled:i||void 0,tabIndex:a,accessKey:this.props.accessKey,className:this.props.buttonClass,icon:this.props.icon,svgIcon:this.props.svgIcon,iconClass:this.props.iconClass,imageUrl:this.props.imageUrl,dir:t,"aria-disabled":i,"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),l.createElement(d,{type:"button",size:this.props.size,rounded:this.props.rounded,fillMode:this.props.fillMode,themeColor:this.props.themeColor,icon:"caret-alt-down",svgIcon:r.caretAltDownIcon,className:"k-split-button-arrow",disabled:i||void 0,tabIndex:-1,onClick:this.onSplitPartClick,onMouseDown:this.onDownSplitPart,onPointerDown:this.onDownSplitPart,dir:t,"aria-label":"menu toggling button"}),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)||(-1===t?n.dispatchEvent(this.props.onButtonClick,e,this,void 0):n.dispatchEvent(this.props.onItemClick,e,this,{item:this.buttonsData[t],itemIndex:t}))}renderPopup(e){const{popupSettings:t={}}=this.props,{focusedIndex:s}=this.state;return l.createElement(o.Popup,{anchor:this.wrapper,show:this.opened,animate:t.animate,popupClass:n.classNames("k-menu-popup",t.popupClass),anchorAlign:t.anchorAlign||b(e),popupAlign:t.popupAlign||g(e),style:e?{direction:"rtl"}:void 0,onClose:this.onPopupClose},l.createElement("ul",{role:"menu",id:this.guid,"aria-labelledby":"button-"+this.guid,tabIndex:-1,ref:this.listRef,"aria-activedescendant":s>=0?`${this.guid}-${s}`:void 0,className:n.classNames("k-menu-group",{[`k-menu-group-${n.kendoThemeMaps.sizeMap[this.props.size]||this.props.size}`]:this.props.size})},this.renderChildItems()))}renderChildItems(){const{item:e,itemRender:t,textField:s}=this.props;return this.buttonsData.length>0?this.buttonsData.map(((o,r)=>l.createElement(m,{className:n.classNames("k-menu-item",{"k-first":0===r},{"k-last":r===this.buttonsData.length-1}),dataItem:o,textField:s,focused:this.state.focusedIndex===r,onClick:this.onItemClick,onDown:this.onItemDown,render:t,item:e,key:r,index:r,id:`${this.guid}-${r}`}))):null}isItemDisabled(e){return this.buttonsData[e]?this.buttonsData[e].disabled:this.props.disabled}isRtl(){return void 0!==this.props.dir?"rtl"===this.props.dir:!!this.wrapper&&"rtl"===getComputedStyle(this.wrapper).direction}};y.propTypes={accessKey:s.string,ariaLabel:s.string,title:s.string,onButtonClick:s.func,onFocus:s.func,onBlur:s.func,onItemClick:s.func,onOpen:s.func,onClose:s.func,text:s.string,items:s.arrayOf(s.any),textField:s.string,tabIndex:s.number,disabled:s.bool,icon:s.string,svgIcon:n.svgIconPropType,iconClass:s.string,imageUrl:s.string,popupSettings:s.object,itemRender:s.any,item:s.func,className:s.string,buttonClass:s.string,dir:s.string},y.defaultProps={size:"medium",rounded:"medium",fillMode:"solid",themeColor:"base"};let k=y;const C=class extends l.Component{render(){return null}};C.propTypes={text:s.string,icon:s.string,iconClass:s.string,imageUrl:s.string,selected:s.bool,disabled:s.bool,render:s.any};let I=C;const x=class extends l.Component{constructor(e){super(e),this.state={opened:!1,focused:!1,focusedIndex:-1},this.mainButton=null,this.list=null,this.skipFocus=!1,this.buttonsData=[],this.onKeyDown=e=>{const{focusedIndex:t}=this.state;if(e.altKey)return void(this.opened||e.keyCode!==n.Keys.down?this.opened&&e.keyCode===n.Keys.up&&(e.preventDefault(),this.setState({focusedIndex:-1}),this.setOpen(!1,e)):(e.preventDefault(),this.setOpen(!0,e),this.setState({focusedIndex:0})));const s={...this.state};if(e.keyCode===n.Keys.enter||e.keyCode===n.Keys.space){e.preventDefault(),t>=0&&this.dispatchClickEvent(e,t);const s=!this.opened;return this.setState({focused:!0,focusedIndex:s?0:-1}),void this.setOpen(s,e)}if(this.opened&&e.keyCode===n.Keys.esc)return this.setState({focusedIndex:-1}),void this.setOpen(!1,e);if(this.opened){const o=v(t,e.keyCode,e.altKey,this.buttonsData.length);s.focusedIndex=o;const r=e.keyCode===n.Keys.up||e.keyCode===n.Keys.down||e.keyCode===n.Keys.left||e.keyCode===n.Keys.right;!e.altKey&&(r||e.keyCode===n.Keys.home||e.keyCode===n.Keys.end)&&e.preventDefault()}this.setState(s)},this.switchFocus=e=>{this.skipFocus=!0,e(),window.setTimeout((()=>this.skipFocus=!1),0)},this.handleFocus=e=>{this.skipFocus||(this.setState({focused:!0,focusedIndex:this.opened?0:-1}),n.dispatchEvent(this.props.onFocus,e,this,void 0))},this.handleButtonBlur=e=>{this.opened||(this.setState({focused:!1}),n.dispatchEvent(this.props.onBlur,e,this,void 0))},this.handleMenuBlur=e=>{this.skipFocus||(this.setState({focused:!1,focusedIndex:-1}),n.dispatchEvent(this.props.onBlur,e,this,void 0),setTimeout((()=>{this.setOpen(!1,e)}),0))},this.setOpen=(e,t)=>{this.opened!==e&&(this.openedDuringOnChange=e,this.setState({opened:e}),t?this.dispatchPopupEvent(t,e):this.openedDuringOnChange=void 0)},this.onItemClick=(e,t)=>{this.setState({focusedIndex:-1}),this.dispatchClickEvent(e,t),this.setOpen(!1,e)},this.onItemDown=e=>{n.getActiveElement(document)===this.list&&e.preventDefault()},this.mouseDown=e=>{e.preventDefault();const t=n.getActiveElement(document);this.element&&t!==this.element&&t!==this.list&&this.element.focus()},this.onPopupClose=e=>{var t;const s=n.getActiveElement(document);this.element&&this.element.removeAttribute("tabindex"),(s===this.list||null!=(t=this.list)&&t.contains(s))&&this.switchFocus((()=>{this.element&&this.element.focus({preventScroll:!0})})),this.props.popupSettings&&this.props.popupSettings.onClose&&this.props.popupSettings.onClose.call(void 0,e)},this.listRef=e=>{this.list=e,e&&this.state.focused&&this.switchFocus((()=>{e.focus({preventScroll:!0}),this.element&&(this.element.tabIndex=-1)}))},this.onClickMainButton=e=>{if(!this.buttonsData.length)return;const t=!this.opened;this.setState({focused:!0,focusedIndex:t?0:-1}),this.setOpen(t,e)},this.dispatchPopupEvent=(e,t)=>{n.dispatchEvent(t?this.props.onOpen:this.props.onClose,e,this,void 0),this.openedDuringOnChange=void 0},n.validatePackage(c)}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.context&&this.context.uDropDownButton,s=e?"rtl":void 0,{id:o,style:r,tabIndex:a,disabled:i,size:c,rounded:u,fillMode:p,themeColor:m,ariaLabel:h,title:f,accessKey:v,icon:b,svgIcon:g,iconClass:y,buttonClass:k,className:C,imageUrl:x,startIcon:E,endIcon:D}=this.props;return this.buttonsData=this.props.items||l.Children.toArray(this.props.children).filter((e=>e&&e.type===I)).map((e=>e.props)),l.createElement(l.Fragment,null,l.createElement(d,{id:o,size:c,style:r,rounded:u,fillMode:p,themeColor:m,onClick:this.onClickMainButton,onMouseDown:this.mouseDown,onKeyDown:this.onKeyDown,onFocus:this.handleFocus,onBlur:this.handleButtonBlur,"aria-disabled":i?"true":void 0,tabIndex:a,accessKey:v,icon:b,svgIcon:g,iconClass:y,className:n.classNames(k,C,n.uDropDownButton.wrapper({c:t,focused:this.state.focused,disabled:i})),imageUrl:x,dir:s,ref:e=>this.mainButton=e&&e.element,type:"button","aria-expanded":this.opened?"true":"false","aria-label":h,"aria-controls":this.opened?this.guid:void 0,title:f,startIcon:E,endIcon:D},this.props.text),this.renderPopup(e))}componentDidMount(){(void 0===this.props.dir&&this.isRtl()||this.opened)&&this.forceUpdate()}get element(){return this.mainButton}dispatchClickEvent(e,t){this.isItemDisabled(t)||n.dispatchEvent(this.props.onItemClick,e,this,{item:this.buttonsData[t],itemIndex:t})}renderPopup(e){const{popupSettings:t={},id:s}=this.props,r=this.context&&this.context.uDropDownButton,{focusedIndex:a}=this.state;return l.createElement(o.Popup,{anchor:this.mainButton,show:this.opened,animate:t.animate,popupClass:n.classNames(n.uDropDownButton.popup({c:r}),t.popupClass),anchorAlign:t.anchorAlign||b(e),popupAlign:t.popupAlign||g(e),style:e?{direction:"rtl"}:void 0,onClose:this.onPopupClose},l.createElement("ul",{role:"list",id:this.guid,tabIndex:-1,"aria-activedescendant":a>=0?`${this.guid}-${a}`:void 0,ref:this.listRef,onKeyDown:this.onKeyDown,onBlur:this.handleMenuBlur,className:n.classNames(n.uDropDownButton.ul({c:r,size:this.props.size}))},this.renderChildItems()))}renderChildItems(){const{item:e,itemRender:t,textField:s}=this.props,o=this.context&&this.context.uDropDownButton;return this.buttonsData.length>0?this.buttonsData.map(((r,a)=>l.createElement(m,{className:n.classNames(n.uDropDownButton.item({c:o}),r.className,{"k-first":0===a},{"k-last":a===this.buttonsData.length-1}),dataItem:r,textField:s,focused:this.state.focusedIndex===a,onClick:this.onItemClick,onDown:this.onItemDown,render:t,item:e,index:a,key:a,id:`${this.guid}-${a}`}))):null}isItemDisabled(e){return this.buttonsData[e]?this.buttonsData[e].disabled:this.props.disabled}isRtl(){return void 0!==this.props.dir?"rtl"===this.props.dir:!!this.mainButton&&"rtl"===getComputedStyle(this.mainButton).direction}};x.propTypes={accessKey:s.string,ariaLabel:s.string,title:s.string,onFocus:s.func,onBlur:s.func,onItemClick:s.func,onOpen:s.func,onClose:s.func,items:s.arrayOf(s.any),textField:s.string,tabIndex:s.number,disabled:s.bool,icon:s.string,svgIcon:n.svgIconPropType,iconClass:s.string,imageUrl:s.string,popupSettings:s.object,itemRender:s.func,item:s.func,className:s.string,buttonClass:s.string,dir:s.string},x.defaultProps={size:"medium",rounded:"medium",fillMode:"solid",themeColor:"base"};let E=x;E.contextType=n.UnstyledContext;const D=":not(.k-dropdownlist button):not(.k-colorpicker button):not(.k-split-button .k-split-button-arrow)",w=["button"+D,".k-button-group > button"+D,".k-colorpicker",".k-dropdownlist"],N=e=>l.createElement("div",{ref:e._ref,className:n.classNames("k-toolbar-separator k-separator",e.className)}),S="prevArrow.title",B="nextArrow.title",K="moreButtonTitle.title",R={[S]:"Previous scroll button",[B]:"Next scroll button",[K]:"More button"},O=e=>{const t=a.useLocalization(),{disabled:s,type:o,scrollContentRef:i,buttonScrollSpeed:c,prevButton:d,nextButton:u}=e,p="prev"===o?d||"span":u||"span";return l.createElement(p,{className:n.classNames("k-button","k-button-md","k-button-solid","k-button-solid-base","k-rounded-md","k-icon-button",`k-toolbar-${o}`,{"k-disabled":s}),title:`${"prev"===o?t.toLanguageString(S,R[S]):t.toLanguageString(B,R[B])}`,"aria-hidden":!0,tabIndex:s?-1:void 0,onClick:e=>{i&&i.current&&c&&i.current.scrollBy({left:"next"===o?c:-c,behavior:"smooth"})}},l.createElement(n.SvgIcon,{icon:"prev"===o?r.caretAltLeftIcon:r.caretAltRightIcon,className:"k-button-icon"}))},M=e=>{const{scrollButtons:t,scrollButtonsPosition:s,isOverflowing:n,scrollContentRef:o,buttonScrollSpeed:r,dir:a,isScrollStartPosition:i,isScrollEndPosition:c,prevButton:d,nextButton:u,children:p}=e,m=(e,t)=>l.createElement(O,{type:e,disabled:t,scrollContentRef:o,buttonScrollSpeed:r,prevButton:d,nextButton:u}),h="visible"===t||"auto"===t&&n;return l.createElement(l.Fragment,null,h&&"split"===s&&l.createElement(l.Fragment,null,m("rtl"!==a?"prev":"next",i),l.createElement(N,{className:"k-toolbar-button-separator"})),h&&"start"===s&&l.createElement(l.Fragment,null,m("rtl"!==a?"prev":"next",i),m("rtl"!==a?"next":"prev",c),l.createElement(N,{className:"k-toolbar-button-separator"})),l.createElement("span",{className:"k-toolbar-items k-toolbar-items-scroll",ref:o},p),h&&"split"===s&&l.createElement(l.Fragment,null,l.createElement(N,{className:"k-toolbar-button-separator"}),m("rtl"!==a?"next":"prev",c)),h&&"end"===s&&l.createElement(l.Fragment,null,l.createElement(N,{className:"k-toolbar-button-separator"}),m("rtl"!==a?"prev":"next",i),m("rtl"!==a?"next":"prev",c)))},z=e=>{var t;const{toolbarRef:s,children:i,fillMode:c,size:u}=e,[p,m]=l.useState(!1),h=l.useRef(l.Children.toArray(i).filter((e=>l.isValidElement(e))).map(((e,t)=>l.cloneElement(e,{key:e.key||t})))),f=l.useRef([]),v=l.useRef(0),b=l.useRef(null),g=l.useRef(null),y=a.useLocalization(),[k,C]=l.useReducer((e=>e+1),0),I=()=>{if(!s.current)return;let e=0;const t=s.current.clientWidth,n=parseInt(window.getComputedStyle(s.current).gap||"0",10),o=Array.from(s.current.children).reduce(((e,t,s)=>e+=Math.ceil(t.clientWidth)),0),r=Array.from(s.current.children).length;if(e=o+r*n+2*n,e>t){const e=[...h.current],s=e.pop();v.current=t,h.current=e,s&&(f.current=[s,...f.current])}else if(t>v.current+n*r){const e=[...f.current],s=e.shift();f.current=e,s&&(h.current=[...h.current,s]),v.current=t}C()};l.useEffect((()=>{I();const e=new ResizeObserver(I),t=s.current;return t&&e.observe(t),()=>{t&&e.unobserve(t)}}),[]);return l.createElement(l.Fragment,null,h.current.length>0&&h.current,f.current.length>0&&l.createElement(l.Fragment,null,l.createElement(N,{_ref:g,className:"k-toolbar-button-separator"}),l.createElement(d,{ref:b,className:"k-toolbar-overflow-button",fillMode:"flat",svgIcon:r.moreHorizontalIcon,title:y.toLanguageString(K,R[K]),onClick:()=>{m(!p)}}),l.createElement(o.Popup,{anchor:s.current,show:p,popupClass:"k-toolbar-popup",style:{width:null==(t=s.current)?void 0:t.offsetWidth}},l.createElement("span",{className:`k-toolbar-items-list k-toolbar-items-list-${n.kendoThemeMaps.sizeMap[u]} k-toolbar-items-list-${c}`},f.current.length>0&&f.current))))},P=l.forwardRef(((e,t)=>{n.validatePackage(c);const{children:s,className:o,id:r,ariaLabel:a,keyboardNavigation:i,role:d,onResize:u,style:p,tabIndex:m=F.tabIndex,size:h=F.size,fillMode:f=F.fillMode,overflow:v,scrollButtons:b=F.scrollButtons,scrollButtonsPosition:g=F.scrollButtonsPosition,buttonScrollSpeed:y=F.buttonScrollSpeed,prevButton:k,nextButton:C}=e,I=l.useRef(!1),x=l.useRef(null),E=l.useRef(null),D=l.useRef(0),N=l.useRef(0),S=l.useRef([]),B=l.useRef({element:null,props:e}),[K,R]=l.useState(!1),[O,P]=l.useState(!0),[A,T]=l.useState(!1),$=n.useDir(x,e.dir),L=l.useMemo((()=>e.buttons||w),[e.buttons]),U=l.useMemo((()=>L.map((e=>e+":focus")).join(",")),[L]),H=()=>{const e=x.current&&x.current.querySelector(U);return Math.max(0,S.current.findIndex((t=>t===e)))};l.useImperativeHandle(B,(()=>({element:x.current,props:e}))),l.useImperativeHandle(t,(()=>B.current)),l.useEffect((()=>(window.addEventListener("resize",q),x.current&&(N.current=x.current.offsetWidth,D.current=x.current.offsetHeight,!1!==i&&(S.current=Array.from(x.current.querySelectorAll(L.join(","))),W(0))),()=>{window.removeEventListener("resize",q),S.current.length=0})),[]),l.useEffect((()=>{if(I.current){if(!x.current||!1===i)return;S.current=Array.from(x.current.querySelectorAll(L.join(","))),W(H()),V()}else I.current=!0}));const W=e=>{S.current.forEach(((t,s)=>{t.tabIndex=s===e?m:-1}))},j=(e,t)=>{const s=S.current[t];if(s){s.tabIndex=m,s.focus();const t=S.current[e];t&&(t.tabIndex=-1)}},q=e=>{if(!x.current)return;const t=x.current.offsetWidth,s=x.current.offsetHeight;if(N.current!==t||D.current!==s){N.current=t,D.current=s;const n={offsetWidth:N.current,offsetHeight:D.current};u&&u.call(void 0,{target:B.current,...n,nativeEvent:e})}V()},V=l.useCallback((()=>{const e=E.current;e&&R(e.scrollWidth>e.clientWidth||e.scrollHeight>e.clientHeight)}),[]),G=l.useCallback((()=>{const e=E.current;if(e){const t=0===e.scrollLeft,s="rtl"!==$?e.scrollLeft+e.clientWidth===e.scrollWidth:e.clientWidth-e.scrollLeft===e.scrollWidth;t&&P(!0),s&&T(!0),!t&&!s&&(P(!1),T(!1))}}),[$]);return l.useEffect((()=>{const e=E.current;if(e)return e.addEventListener("scroll",G),()=>{e.removeEventListener("scroll",G)}}),[G]),l.createElement("div",{id:r,"aria-label":a,className:n.classNames("k-toolbar",{[`k-toolbar-${n.kendoThemeMaps.sizeMap[h]||h}`]:h,[`k-toolbar-${f}`]:f,"k-toolbar-scrollable":"scroll"===v,"k-toolbar-scrollable-overlay":"scroll"===v&&("hidden"===b||void 0===b),"k-toolbar-scrollable-start":"scroll"===v&&"hidden"===b&&O,"k-toolbar-scrollable-end":"scroll"===v&&"hidden"===b&&A,"k-toolbar-section":e.overflow&&"section"===v},o),style:p,role:void 0!==d?d||void 0:"toolbar",dir:$,ref:x,onKeyDown:!1!==i?e=>{const t=e.keyCode===n.Keys.left||e.keyCode===n.Keys.right||e.keyCode===n.Keys.home||e.keyCode===n.Keys.end,s=H();!t||e.defaultPrevented||-1===S.current.findIndex((t=>t===e.target))||(e.keyCode===n.Keys.left?j(s,0===s?S.current.length-1:s-1):j(s,s===S.current.length-1?0:s+1),e.keyCode===n.Keys.home&&j(s,0),e.keyCode===n.Keys.end&&j(s,S.current.length-1))}:void 0},"scroll"===v&&l.createElement(M,{scrollButtons:b,scrollButtonsPosition:g,prevButton:k,nextButton:C,isOverflowing:K,scrollContentRef:E,buttonScrollSpeed:y,dir:$,isScrollStartPosition:O,isScrollEndPosition:A,children:s}),"section"===v&&l.createElement(z,{toolbarRef:x,fillMode:f,size:h},s),("none"===v||void 0===v)&&s)})),F={tabIndex:0,size:"medium",fillMode:"solid",scrollButtons:"auto",scrollButtonsPosition:"split",buttonScrollSpeed:100};P.displayName="KendoReactToolbar",P.propTypes={tabIndex:s.number,dir:s.string,keyboardNavigation:s.bool,style:s.object,className:s.string,role:s.string,onResize:s.func,buttons:s.arrayOf(s.string.isRequired),size:s.oneOf([null,"small","medium","large"]),fillMode:s.oneOf([null,"solid","flat","outline"]),overflow:s.oneOf(["none","section","scroll"]),scrollButtons:s.oneOf(["hidden","visible","auto"]),scrollButtonsPosition:s.oneOf(["start","end","split"]),buttonScrollSpeed:s.number};const A=l.forwardRef(((e,t)=>{const{id:s,className:o,style:r,children:a}=e,i=l.useRef(null);return l.useImperativeHandle(t,(()=>({element:i.current}))),l.createElement("div",{id:s,className:n.classNames("k-toolbar-item",o),style:r,ref:i},a)}));A.displayName="KendoReactToolbarItem",A.propTypes={className:s.string};const T=l.forwardRef(((e,t)=>{const s=l.useRef(null),o=l.useRef(null);l.useImperativeHandle(o,(()=>({element:s.current}))),l.useImperativeHandle(t,(()=>({element:s.current})));const r=l.useMemo((()=>n.classNames("k-spacer",e.className)),[e.className]);return l.createElement("span",{ref:s,className:r})}));T.displayName="KendoReactToolbarSpacer",T.propTypes={className:s.string};const $=t.createContext([null,e=>{}]),L=t.createContext([null,e=>{}]),U=t.createContext([null,e=>{}]);var H=(e=>(e.next="next",e.prev="prev",e.current="current",e.reset="reset",e))(H||{});var W=(e=>(e.remove="remove",e.add="add",e.reorder="reorder",e))(W||{});var j=(e=>(e.toggle="toggle",e.remove="remove",e))(j||{});const q=l.forwardRef(((e,t)=>{n.validatePackage(c);const s=l.useRef(null),o=l.useRef(null),{disabled:a=G.disabled,fillMode:i=G.fillMode,themeColor:d=G.themeColor,size:u=G.size,rounded:p=G.rounded,dir:m=G.dir,removeIcon:h=G.removeIcon,removeSvgIcon:f=G.removeSvgIcon,removable:v=G.removable}=e,b=n.useDir(o,m);l.useImperativeHandle(s,(()=>({element:o.current,props:e}))),l.useImperativeHandle(t,(()=>s.current));const[g,y]=l.useContext($),[k,C]=l.useContext(L),[,I]=l.useContext(U),x=l.useMemo((()=>e.selected||(Array.isArray(g)?g.some((t=>t===e.value)):g===e.value)),[e.selected,e.value,g]),E=l.useMemo((()=>k===e.value),[e.value,k]);l.useEffect((()=>{E&&o.current&&o.current.focus()}),[E]);const D=l.useCallback((t=>{y({type:j.toggle,payload:e.value,event:t})}),[y,e.value]),w=l.useCallback((t=>{v&&(I({type:W.remove,payload:e.value,event:t}),C({type:H.reset,payload:e.value,event:t}),y({type:j.remove,payload:e.value,event:t}),e.onRemove&&e.onRemove.call(void 0,{target:s.current,syntheticEvent:t}))}),[e.onRemove,e.value,v,I,C,y]),N=l.useCallback((t=>{switch(t.keyCode){case n.Keys.left:C({type:H.prev,payload:e.value,event:t});break;case n.Keys.right:C({type:H.next,payload:e.value,event:t});break;case n.Keys.enter:y({type:j.toggle,payload:e.value,event:t});break;case n.Keys.delete:w(t)}e.onKeyDown&&e.onKeyDown.call(void 0,{target:s.current,syntheticEvent:t})}),[e.onKeyDown,e.value,C,y,w]),S=l.useCallback((t=>{C({payload:e.value,type:H.current,event:t}),e.onFocus&&e.onFocus.call(void 0,{target:s.current,syntheticEvent:t})}),[e.onFocus,e.value,C]),B=l.useCallback((t=>{e.onBlur&&e.onBlur.call(void 0,{target:s.current,syntheticEvent:t})}),[e.onBlur]),K=n.useMouse(e,s,{onClick:D});return l.createElement("div",{...K,role:e.role||"button",id:e.value,style:e.style,ref:o,dir:b,tabIndex:n.getTabIndex(e.tabIndex,a,void 0),className:n.classNames("k-chip",{"k-rtl":"rtl"===b,"k-disabled":a,"k-selected":x,"k-focus":E,[`k-chip-${n.kendoThemeMaps.sizeMap[u]||u}`]:u,[`k-rounded-${n.kendoThemeMaps.roundedMap[p]||p}`]:p,[`k-chip-${i}`]:i,[`k-chip-${i}-${d}`]:!(!i||!d)},e.className),"aria-pressed":e.role?void 0:x,"aria-disabled":a,"aria-describedby":e.ariaDescribedBy,"aria-keyshortcuts":v?"Enter Delete":void 0,onFocus:S,onBlur:B,onKeyDown:N},x&&(e.selectedIcon||e.selectedSvgIcon)&&l.createElement(n.IconWrap,{className:"k-chip-icon",name:e.selectedIcon?n.toIconName(e.selectedIcon):void 0,icon:e.selectedSvgIcon,size:"small"}),(e.icon||e.svgIcon)&&l.createElement(n.IconWrap,{className:"k-chip-icon",name:e.icon?n.toIconName(e.icon):void 0,icon:e.svgIcon,size:"small"}),e.avatar&&l.createElement("div",{className:`k-chip-avatar k-avatar k-rounded-${e.avatar.rounded} k-avatar-md k-avatar-solid k-avatar-solid-primary`,style:e.avatar.style},l.createElement("span",{className:"k-avatar-image"},l.createElement("img",{src:e.avatar.image,alt:e.avatar.imageAlt}))),l.createElement("span",{className:"k-chip-content"},void 0!==e.children?e.children:e.text&&l.createElement("span",{"aria-label":e.ariaLabel||e.text,className:"k-chip-label"},e.text)),v&&l.createElement("span",{className:"k-chip-actions"},l.createElement("span",{className:n.classNames("k-chip-action","k-chip-remove-action"),onClick:w},l.createElement(n.IconWrap,{name:h?n.toIconName(h):void 0,icon:f||r.xCircleIcon,size:"small"}))))})),V={id:s.string,text:s.string,value:s.any,dir:s.oneOf(["ltr","rtl"]),removable:s.bool,removeIcon:s.string,removeIconSvg:n.svgIconPropType,disabled:s.bool,icon:s.string,svgIcon:n.svgIconPropType,selectedIcon:s.string,selectedIconSvg:n.svgIconPropType,onRemove:s.func,dataItem:s.any,selected:s.bool,ariaDescribedBy:s.string,size:s.oneOf([null,"small","medium","large"]),rounded:s.oneOf([null,"small","medium","large","full"]),fillMode:s.oneOf([null,"outline","solid"]),themeColor:s.oneOf([null,"base","info","success","warning","error"])},G={disabled:!1,removable:!1,removeIcon:"k-i-x-circle",removeSvgIcon:r.xCircleIcon,dir:"ltr",size:"medium",rounded:"medium",fillMode:"solid",themeColor:"base"};q.displayName="KendoReactChip",q.propTypes=V;const Z=(e,t,s)=>{"multiple"===t.selection?Array.isArray(e)||(e=e?[e]:null):"single"===t.selection&&Array.isArray(e)&&(e=e?e.join(""):null);const[n,o]=l.useState(e);return[n,e=>{const r=((e,t)=>{switch(t.selection){case"single":switch(t.type){case"toggle":if(!Array.isArray(e)||null===e)return t.payload===e?null:t.payload;throw new Error("State cannot be an array in single selection");case"remove":return t.payload===e?null:e;default:return e}case"multiple":switch(t.type){case"toggle":if(Array.isArray(e))return e.some((e=>e===t.payload))?e.filter((e=>e!==t.payload)):[...e,t.payload];if(null===e)return[t.payload];throw new Error("State cannot be non-array in multiple selection");case"remove":return Array.isArray(e)?e.some((e=>e===t.payload))?e.filter((e=>e!==t.payload)):[...e,t.payload]:e;default:return e}case"none":return null;default:return e}})(t.state||n,{...e,...t});s&&s(r,e.event),"none"!==t.selection&&o(r)}]},_=l.forwardRef(((e,t)=>{n.validatePackage(c);const s=l.useRef(null),o=l.useRef(null),{id:r,style:a,tabIndex:i,className:d,ariaDescribedBy:u,ariaLabelledBy:p,ariaLabel:m,value:h,defaultData:f=Q.defaultData,chip:v=Q.chip,disabled:b=Q.disabled,size:g=Q.size,defaultValue:y=Q.defaultValue,selection:k=Q.selection,valueField:C=Q.valueField,textField:I=Q.textField,dir:x=Q.dir,onChange:E,onDataChange:D}=e,w=n.useDir(o,x),N=l.useMemo((()=>v||q),[v,q]);l.useImperativeHandle(s,(()=>({element:o.current,props:e}))),l.useImperativeHandle(t,(()=>s.current));const S=l.useCallback(((e,t)=>{E&&s.current&&E.call(void 0,{value:e,target:s.current,syntheticEvent:t})}),[E]),[B,K]=Z(h||y,{selection:k,state:h},S),R=l.useCallback(((e,t)=>{D&&s.current&&D.call(void 0,{value:e,target:s.current,syntheticEvent:t})}),[D]),[O,M]=((e,t,s)=>{const[n,o]=l.useState(e);return[n,e=>{const r=((e,t)=>{switch(t.type){case"add":case"reorder":break;case"remove":return e.filter((e=>e[t.valueField]!==t.payload));default:return e}})(t.state||n,{...e,...t});s&&s(r,e.event),o(r)}]})(e.data||f,{state:e.data,valueField:C},R),z=l.useCallback(((e,t)=>(e.push(t[C]),e)),[C]),P=l.useMemo((()=>e.data||O),[e.data,O]),F=l.useMemo((()=>h||B),[h,B]),A=l.useMemo((()=>P.reduce(z,[])),[P,z]),T=l.useCallback((e=>n.getter(C)(e)),[C]),H=l.useCallback((e=>n.getter(I)(e)),[I]),[W,j]=(e=>{const[t,s]=l.useState(null);return[t,t=>{const n=((e,t)=>{const s=t.items.findIndex((t=>t===e));switch(t.type){case"next":return s===t.items.length-1?e:t.items[s+1];case"prev":return 0===s?e:t.items[s-1];case"current":return t.payload;case"reset":return null;default:return e}})(t.payload,{...t,...e});s(n)}]})({items:A}),V=n.useMouse(e,s);return l.createElement($.Provider,{value:[F,K]},l.createElement(L.Provider,{value:[W,j]},l.createElement(U.Provider,{value:[P,M]},l.createElement("div",{ref:o,...V,role:b?void 0:"listbox",id:r,dir:w,style:a,tabIndex:n.getTabIndex(i,b,void 0),className:n.classNames("k-chip-list",{"k-rtl":"rtl"===w,"k-disabled":b,[`k-chip-list-${n.kendoThemeMaps.sizeMap[g]||g}`]:g},d),"aria-label":m,"aria-labelledby":p,"aria-describedby":u,"aria-orientation":"horizontal","aria-multiselectable":"multiple"===k},P.map(((e,t)=>l.createElement(N,{role:"option",dataItem:e,size:g,key:[T(e),t].join("-"),text:H(e),value:T(e),ariaLabel:e.ariaLabel,svgIcon:e.svgIcon||void 0})))))))})),J={id:s.string,className:s.string,tabIndex:s.number,data:s.any,defaultData:s.arrayOf(s.any),onDataChange:s.func,value:s.oneOfType([s.any,s.arrayOf(s.any)]),defaultValue:s.oneOfType([s.any,s.arrayOf(s.any)]),onChange:s.func,selection:s.oneOf(["single","none","multiple"]),textField:s.string,valueField:s.string,disabled:s.bool,dir:s.oneOf(["ltr","rtl"]),ariaLabelledBy:s.string,ariaDescribedBy:s.string,size:s.oneOf([null,"small","medium","large"])},Q={chip:q,size:"medium",disabled:!1,defaultValue:null,defaultData:[],dir:"ltr",selection:"none",textField:"text",valueField:"value",removable:"removable"};_.displayName="KendoReactChipList",_.propTypes=J;const X=l.forwardRef(((e,t)=>{const{className:s,disabled:o,text:r,icon:a,style:i,id:c,focused:d,tabIndex:u,index:p,dataItem:m,item:h,svgIcon:f,onDown:v,onClick:b,...g}=e,y=l.useRef(null),k=l.useCallback((()=>{y.current&&y.current.focus()}),[]),C=l.useCallback((()=>({element:y.current,focus:k})),[k]);l.useImperativeHandle(t,C);const I=l.useCallback((e=>{b&&void 0!==p&&!o&&b(e,p)}),[b,p]),x=l.useMemo((()=>n.classNames("k-fab-item",{"k-focus":d,"k-disabled":o},s)),[s,o,d]),E=h;return l.createElement("li",{ref:y,id:c,className:x,style:i,role:"menuitem",tabIndex:n.getTabIndex(u,o),"aria-disabled":o,"aria-label":`${r||""} floatingactionbutton item`,onClick:I,onMouseDown:v,onPointerDown:v,...g},E?l.createElement(E,{itemIndex:p,item:m}):l.createElement(l.Fragment,null,r&&l.createElement("span",{className:"k-fab-item-text"},r),a||f?l.createElement(n.IconWrap,{className:"k-fab-item-icon",name:a,icon:f}):null))}));X.propTypes={className:s.string,style:s.object,children:s.any,disabled:s.bool,focused:s.bool,index:s.number,icon:s.string,svgIcon:n.svgIconPropType,text:s.string,tabIndex:s.number,customProp:s.any},X.displayName="KendoFloatingActionButtonItem";const Y="16px",ee=e=>"number"==typeof e?e+"px":e,te=(e,t)=>{const s={horizontal:t?"right":"left",vertical:"bottom"};return"end"===e.horizontal&&(s.horizontal=t?"left":"right"),s},se=(e,t)=>{const s={horizontal:t?"right":"left",vertical:"top"};return"end"===e.horizontal&&(s.horizontal=t?"left":"right"),s},ne=(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"]),oe=(e,t,s,n)=>{const o=t.horizontal,r=t.vertical;if(e.current){const a=s&&void 0!==s.x?ee(s.x):Y,i=s&&void 0!==s.x?`calc(50% + ${ee(s.x)})`:"50%",l=s&&void 0!==s.y?ee(s.y):Y,c=s&&void 0!==s.y?`calc(50% + ${ee(s.y)})`:"50%";e.current.style.setProperty(re(t,n),"center"===o?i:a),e.current.style.setProperty(ae(t),"middle"===r?c:l),n&&(("top"===r||"bottom"===r)&&"start"===o&&e.current.style.setProperty("left","unset"),"middle"===r&&"end"===o&&e.current.style.setProperty("right","unset"),"middle"===r&&"start"===o&&e.current.style.setProperty("left","unset"))}},re=(e,t)=>{const{horizontal:s}=e;return{end:t?"left":"right",center:"left",start:t?"right":"left"}[s||"end"]},ae=e=>({top:"top",middle:"top",bottom:"bottom"}[e.vertical||"bottom"]),ie=l.forwardRef(((e,t)=>{n.validatePackage(c);const{align:s=le.align,alignOffset:r,className:a,disabled:i,icon:d,svgIcon:u,iconClass:p,id:m,items:h,item:f,text:v,positionMode:b=le.positionMode,size:g=le.size,style:y,rounded:k=le.rounded,themeColor:C=le.themeColor,overlayStyle:I,tabIndex:x,accessKey:E,popupSettings:D={},modal:w,onClick:N,onItemClick:S,onFocus:B,onBlur:K,onKeyDown:R,onOpen:O,onClose:M,...z}=e,P=n.useZIndexContext(),F=P?P+2:100,A=l.useRef(null),T=l.useRef(null),$=l.useRef(null),L=l.useRef(null),U=l.useCallback((()=>{T.current&&T.current.focus()}),[]),H=l.useCallback((()=>({element:T.current,focus:U})),[U]);l.useImperativeHandle(A,H),l.useImperativeHandle(t,(()=>A.current));const[W,j]=l.useState(!1),[q,V]=l.useState(!1),[G,Z]=l.useState(-1),_=n.useId()+"-button-id",J=n.useDir(T,e.dir),Q="rtl"===J,Y=n.useId()+"-list-id";l.useEffect((()=>{oe(T,s,r,Q)}),[T,s,r,Q]),l.useEffect((()=>{q&&T&&T.current&&T.current.focus()}),[q,T]);const ee=l.useCallback(((e,t)=>{h&&n.dispatchEvent(t?O:M,e,H(),void 0)}),[O,M,h]),re=l.useCallback((e=>{!e.target||i||(!h&&N?n.dispatchEvent(N,e,H(),void 0):(j(!W),V(!0),Z(W?-1:0),ee(e,!W)))}),[j,V,Z,N,ee,W,h,i]),ae=l.useCallback((e=>{V(!0),Z(W?0:-1),B&&n.dispatchEvent(B,e,H(),void 0)}),[B,V,Z]),ie=l.useCallback((e=>{V(!1),j(!1),Z(-1),n.dispatchEvent(K,e,H(),void 0),W&&ee(e,!1)}),[K,V,j,Z,ee]),ce=l.useCallback((e=>{e.preventDefault()}),[]),de=l.useCallback(((e,t)=>{h&&(h[t].disabled||n.dispatchEvent(S,e,H(),{itemProps:h[t],itemIndex:t}))}),[S]),ue=l.useCallback(((e,t)=>{!e.target||!h||(Z(t),j(!1),de(e,t),ee(e,!1))}),[Z,j,de,ee]),pe=l.useCallback((e=>{n.getActiveElement(document)===T.current&&e.preventDefault()}),[T]),me=l.useCallback((e=>{const t=G,s=h?h.length:-1;if(e.altKey)return!W&&e.keyCode===n.Keys.down&&(e.preventDefault(),j(!0),Z(0)),void(W&&e.keyCode===n.Keys.up&&(e.preventDefault(),j(!1),Z(-1)));switch(e.keyCode){case n.Keys.enter:case n.Keys.space:t>=0&&de(e,t),h||re(e),e.preventDefault(),j(!W),Z(W?-1:0);break;case n.Keys.esc:e.preventDefault(),j(!1),Z(-1);break;case n.Keys.home:e.preventDefault(),Z(0);break;case n.Keys.end:e.preventDefault(),Z(s-1);break;case n.Keys.down:case n.Keys.right:e.preventDefault(),Z(t+1>=s?0:t+1);break;case n.Keys.up:case n.Keys.left:e.preventDefault(),Z(t-1<0?s-1:t-1)}n.dispatchEvent(R,e,H(),void 0)}),[R,G,Z,Q,j]),he=l.useMemo((()=>n.classNames("k-fab k-fab-solid",{"k-fab-sm":"small"===g,"k-fab-md":"medium"===g,"k-fab-lg":"large"===g,"k-disabled":i,"k-pos-absolute":"absolute"===b,"k-pos-fixed":"fixed"===b,"k-focus":q,[`k-rounded-${n.kendoThemeMaps.roundedMap[k]||k}`]:k,[`k-fab-solid-${C}`]:C},`k-${s.vertical}-${s.horizontal}`,a)),[C,g,k,i,b,s,q,a]),fe=h&&h.map(((e,t)=>l.createElement(X,{...e,key:t,index:t,id:`${Y}-${t}`,disabled:i||e.disabled,focused:G===t,dataItem:e,item:f,className:n.classNames(e.className,ne(J||"ltr",s.horizontal)),onClick:ue,onDown:pe}))),ve=!(!d&&!u||v),be=(T.current?T.current.offsetWidth:0)/2-16;return l.createElement(n.ZIndexContext.Provider,{value:F},l.createElement(l.Fragment,null,l.createElement("button",{ref:T,id:m||_,role:"button",type:"button","aria-disabled":i,"aria-expanded":h?W:void 0,"aria-haspopup":!!h,"aria-label":`${v||""} floatingactionbutton`,"aria-owns":h?Y:void 0,"aria-activedescendant":G>=0&&h?`${Y}-${G}`:void 0,tabIndex:n.getTabIndex(x,i),accessKey:E,dir:J,disabled:i,className:he,style:y,onClick:re,onMouseDown:ce,onFocus:ae,onBlur:ie,onKeyDown:me,...z},d||u?l.createElement(n.IconWrap,{className:"k-fab-icon",name:d,icon:u}):p?l.createElement("span",{role:"presentation",className:p}):null,v&&l.createElement("span",{className:"k-fab-text"},v)),w&&W&&l.createElement("div",{className:"k-overlay",style:{zIndex:F,...I}}),l.createElement(o.Popup,{ref:L,anchor:T.current,show:W,animate:D.animate,popupClass:n.classNames("k-popup-transparent k-fab-popup",D.popupClass),anchorAlign:D.anchorAlign||te(s,Q),popupAlign:D.popupAlign||se(s,Q),style:{boxShadow:"none"}},l.createElement("ul",{ref:$,role:"menu","aria-labelledby":m,id:Y,className:n.classNames("k-fab-items",{"k-fab-items-bottom":"bottom"!==s.vertical,"k-fab-items-top":"bottom"===s.vertical}),style:{paddingLeft:ve?be:void 0,paddingRight:ve?be:void 0}},fe))))}));ie.propTypes={className:s.string,style:s.object,id:s.string,dir:s.string,tabIndex:s.number,accessKey:s.string,disabled:s.bool,icon:s.string,svgIcon:n.svgIconPropType,iconClass:s.string,text:s.string,alignOffset:s.shape({x:s.oneOfType([s.number,s.string]).isRequired,y:s.oneOfType([s.number,s.string]).isRequired}),align:s.shape({vertical:s.oneOf(["top","middle","bottom"]).isRequired,horizontal:s.oneOf(["start","center","end"]).isRequired}),positionMode:s.oneOf(["absolute","fixed"]),size:s.oneOf([null,"small","medium","large"]),rounded:s.oneOf([null,"small","medium","large","full"]),themeColor:s.oneOf([null,"primary","secondary","tertiary","info","success","warning","error","dark","light","inverse"]),modal:s.bool,overlayStyle:s.object};const le={align:{vertical:"bottom",horizontal:"end"},size:"medium",rounded:"full",themeColor:"primary",positionMode:"fixed"};ie.displayName="KendoFloatingActionButton";const ce=n.withIdHOC(E);ce.displayName="KendoReactDropDownButton";const de=n.withIdHOC(k);de.displayName="KendoReactSplitButton",e.Button=d,e.ButtonGroup=p,e.Chip=q,e.ChipList=_,e.DropDownButton=ce,e.DropDownButtonClassComponent=E,e.DropDownButtonItem=I,e.FloatingActionButton=ie,e.FloatingActionButtonItem=X,e.SplitButton=de,e.SplitButtonClassComponent=k,e.SplitButtonItem=f,e.Toolbar=P,e.ToolbarItem=A,e.ToolbarSeparator=N,e.ToolbarSpacer=T,e.toolbarButtons=w}));

@@ -8,2 +8,2 @@ /**

*/
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={name:"@progress/kendo-react-buttons",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate: 1739274458,version:"9.4.0-develop.28",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"};exports.packageMetadata=e;
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={name:"@progress/kendo-react-buttons",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate: 1739278220,version:"9.4.0-develop.29",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"};exports.packageMetadata=e;
{
"name": "@progress/kendo-react-buttons",
"version": "9.4.0-develop.28",
"version": "9.4.0-develop.29",
"description": "All you need in React Button in one package: disabled/enabled states, built-in styles and more. KendoReact Buttons package",

@@ -29,4 +29,4 @@ "author": "Progress",

"@progress/kendo-licensing": "^1.4.0",
"@progress/kendo-react-common": "9.4.0-develop.28",
"@progress/kendo-react-popup": "9.4.0-develop.28",
"@progress/kendo-react-common": "9.4.0-develop.29",
"@progress/kendo-react-popup": "9.4.0-develop.29",
"@progress/kendo-svg-icons": "^4.0.0",

@@ -57,3 +57,3 @@ "react": "^16.8.2 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc",

"productCode": "KENDOUIREACT",
"publishDate": 1739274458,
"publishDate": 1739278220,
"licensingDocsUrl": "https://www.telerik.com/kendo-react-ui/components/my-license/"

@@ -60,0 +60,0 @@ }

@@ -8,2 +8,2 @@ /**

*/
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const C=require("@progress/kendo-react-popup"),O=require("react"),q=require("./ToolbarSeparator.js"),M=require("../../Button.js"),P=require("@progress/kendo-svg-icons"),W=require("@progress/kendo-react-intl"),m=require("../messages/index.js"),I=require("@progress/kendo-react-common");function j(n){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const s in n)if(s!=="default"){const u=Object.getOwnPropertyDescriptor(n,s);Object.defineProperty(t,s,u.get?u:{enumerable:!0,get:()=>n[s]})}}return t.default=n,Object.freeze(t)}const e=j(O),_=n=>{var h;const{toolbarRef:t,children:s,fillMode:u,size:R}=n,[b,k]=e.useState(!1),a=e.useRef(e.Children.toArray(s).filter(r=>e.isValidElement(r)).map((r,i)=>e.cloneElement(r,{key:r.key||i}))),c=e.useRef([]),f=e.useRef(0),w=e.useRef(null),T=e.useRef(null),S=W.useLocalization(),[B,v]=e.useReducer(r=>r+1,0),d=()=>{if(!t.current)return;let r=0;const i=t.current.clientWidth,p=parseInt(window.getComputedStyle(t.current).gap||"0",10),E=Array.from(t.current.children).reduce((o,l,L)=>(o+=Math.ceil(l.clientWidth),o),0),g=Array.from(t.current.children).length,z=p*2;if(r=E+g*p+z,r>i){const o=[...a.current],l=o.pop();f.current=i,a.current=o,l&&(c.current=[l,...c.current])}else if(i>f.current+p*g){const o=[...c.current],l=o.shift();c.current=o,l&&(a.current=[...a.current,l]),f.current=i}v()};e.useEffect(()=>(d(),window.addEventListener("resize",d),()=>window.removeEventListener("resize",d)),[]);const y=()=>{k(!b)};return e.createElement(e.Fragment,null,a.current.length>0&&a.current,c.current.length>0&&e.createElement(e.Fragment,null,e.createElement(q.ToolbarSeparator,{_ref:T,className:"k-toolbar-button-separator"}),e.createElement(M.Button,{ref:w,className:"k-toolbar-overflow-button",fillMode:"flat",svgIcon:P.moreHorizontalIcon,title:S.toLanguageString(m.moreButtonTitle,m.messages[m.moreButtonTitle]),onClick:y}),e.createElement(C.Popup,{anchor:t.current,show:b,popupClass:"k-toolbar-popup",style:{width:(h=t.current)==null?void 0:h.offsetWidth}},e.createElement("span",{className:`k-toolbar-items-list k-toolbar-items-list-${I.kendoThemeMaps.sizeMap[R]} k-toolbar-items-list-${u}`},c.current.length>0&&c.current))))};exports.ToolbarOverflowSection=_;
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const C=require("@progress/kendo-react-popup"),E=require("react"),q=require("./ToolbarSeparator.js"),M=require("../../Button.js"),P=require("@progress/kendo-svg-icons"),W=require("@progress/kendo-react-intl"),p=require("../messages/index.js"),I=require("@progress/kendo-react-common");function j(c){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(c){for(const a in c)if(a!=="default"){const i=Object.getOwnPropertyDescriptor(c,a);Object.defineProperty(t,a,i.get?i:{enumerable:!0,get:()=>c[a]})}}return t.default=c,Object.freeze(t)}const e=j(E),_=c=>{var h;const{toolbarRef:t,children:a,fillMode:i,size:R}=c,[b,k]=e.useState(!1),u=e.useRef(e.Children.toArray(a).filter(r=>e.isValidElement(r)).map((r,o)=>e.cloneElement(r,{key:r.key||o}))),l=e.useRef([]),f=e.useRef(0),T=e.useRef(null),v=e.useRef(null),S=W.useLocalization(),[B,w]=e.useReducer(r=>r+1,0),m=()=>{if(!t.current)return;let r=0;const o=t.current.clientWidth,d=parseInt(window.getComputedStyle(t.current).gap||"0",10),O=Array.from(t.current.children).reduce((n,s,N)=>(n+=Math.ceil(s.clientWidth),n),0),g=Array.from(t.current.children).length,z=d*2;if(r=O+g*d+z,r>o){const n=[...u.current],s=n.pop();f.current=o,u.current=n,s&&(l.current=[s,...l.current])}else if(o>f.current+d*g){const n=[...l.current],s=n.shift();l.current=n,s&&(u.current=[...u.current,s]),f.current=o}w()};e.useEffect(()=>{m();const r=new ResizeObserver(m),o=t.current;return o&&r.observe(o),()=>{o&&r.unobserve(o)}},[]);const y=()=>{k(!b)};return e.createElement(e.Fragment,null,u.current.length>0&&u.current,l.current.length>0&&e.createElement(e.Fragment,null,e.createElement(q.ToolbarSeparator,{_ref:v,className:"k-toolbar-button-separator"}),e.createElement(M.Button,{ref:T,className:"k-toolbar-overflow-button",fillMode:"flat",svgIcon:P.moreHorizontalIcon,title:S.toLanguageString(p.moreButtonTitle,p.messages[p.moreButtonTitle]),onClick:y}),e.createElement(C.Popup,{anchor:t.current,show:b,popupClass:"k-toolbar-popup",style:{width:(h=t.current)==null?void 0:h.offsetWidth}},e.createElement("span",{className:`k-toolbar-items-list k-toolbar-items-list-${I.kendoThemeMaps.sizeMap[R]} k-toolbar-items-list-${i}`},l.current.length>0&&l.current))))};exports.ToolbarOverflowSection=_;

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc