@progress/kendo-react-buttons 7.0.0-develop.13 → 7.0.0-develop.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ListButton/DropDownButton.d.ts +3 -3
- package/dist/cdn/js/kendo-react-buttons.js +1 -1
- package/index.js +1 -1
- package/index.mjs +149 -149
- package/package.json +3 -3
|
@@ -81,15 +81,14 @@ export declare class DropDownButton extends React.Component<DropDownButtonProps,
|
|
|
81
81
|
focused: boolean;
|
|
82
82
|
focusedIndex: number;
|
|
83
83
|
};
|
|
84
|
-
private wrapper;
|
|
85
84
|
private mainButton;
|
|
86
85
|
private list;
|
|
87
86
|
private skipFocus;
|
|
88
87
|
private get guid();
|
|
89
88
|
private buttonsData;
|
|
90
89
|
private openedDuringOnChange?;
|
|
91
|
-
constructor(props: DropDownButtonProps);
|
|
92
90
|
private get opened();
|
|
91
|
+
constructor(props: DropDownButtonProps);
|
|
93
92
|
/**
|
|
94
93
|
* @hidden
|
|
95
94
|
*/
|
|
@@ -105,7 +104,8 @@ export declare class DropDownButton extends React.Component<DropDownButtonProps,
|
|
|
105
104
|
private onKeyDown;
|
|
106
105
|
private switchFocus;
|
|
107
106
|
private handleFocus;
|
|
108
|
-
private
|
|
107
|
+
private handleButtonBlur;
|
|
108
|
+
private handleMenuBlur;
|
|
109
109
|
private setOpen;
|
|
110
110
|
private onItemClick;
|
|
111
111
|
private onItemDown;
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
* Copyright © 2023 Progress Software Corporation. All rights reserved.
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
(function(f,C){typeof exports=="object"&&typeof module<"u"?C(exports,require("react"),require("prop-types"),require("@progress/kendo-react-common"),require("@progress/kendo-react-popup"),require("@progress/kendo-svg-icons")):typeof define=="function"&&define.amd?define(["exports","react","prop-types","@progress/kendo-react-common","@progress/kendo-react-popup","@progress/kendo-svg-icons"],C):(f=typeof globalThis<"u"?globalThis:f||self,C(f.KendoReactButtons={},f.React,f.PropTypes,f.KendoReactCommon,f.KendoReactPopup,f.KendoSvgIcons))})(this,function(f,C,qe,a,pe,Ne){"use strict";"use client";function Ke(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const l=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,l.get?l:{enumerable:!0,get:()=>e[t]})}}return n.default=e,Object.freeze(n)}const i=Ke(C),s=Ke(qe),F={name:"@progress/kendo-react-buttons",productName:"KendoReact",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:0,version:"",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"};function Ve({imageUrl:e,name:n,iconClass:t,svgIcon:l,imageAlt:r}){return e?i.createElement("img",{role:"presentation",className:"k-button-icon",alt:r,src:e}):n||l?i.createElement(a.IconWrap,{className:"k-button-icon",name:n,icon:l}):t?i.createElement("span",{role:"presentation",className:a.classNames("k-button-icon",t)}):null}const j=class extends i.Component{constructor(e){super(e),this._element=null,this.handleClick=n=>{this.toggleIfApplicable(),this.props.onClick&&this.props.onClick.call(void 0,n)},a.validatePackage(F),this.state={selected:this.props.togglable===!0&&this.props.selected===!0}}get element(){return this._element}get selected(){return this._selectedTemp!==void 0?this._selectedTemp:this.state.selected}static getDerivedStateFromProps(e,n){return e.togglable&&e.selected!==void 0&&e.selected!==n.selected?{selected:e.selected}:null}render(){const{children:e,togglable:n,icon:t,iconClass:l,svgIcon:r,imageUrl:o,imageAlt:d,className:c,onClick:m,size:I=j.defaultProps.size,rounded:h=j.defaultProps.rounded,fillMode:x=j.defaultProps.fillMode,themeColor:N=j.defaultProps.themeColor,...w}=this.props,K=r!==void 0||t!==void 0||l!==void 0||o!==void 0,S=e!==void 0,k=Ve({name:t,svgIcon:r,iconClass:l,imageUrl:o,imageAlt:d});return i.createElement("button",{ref:E=>this._element=E,"aria-pressed":n?this.state.selected:void 0,...w,onClick:this.handleClick,className:a.classNames("k-button",{[`k-button-${a.kendoThemeMaps.sizeMap[I]||I}`]:I,[`k-button-${x}`]:x,[`k-button-${x}-${N}`]:!!(x&&N),[`k-rounded-${a.kendoThemeMaps.roundedMap[h]||h}`]:h,"k-icon-button":!S&&K,"k-disabled":this.props.disabled,"k-selected":this.state.selected,"k-rtl":this.props.dir==="rtl"},this.props.className)},k,e&&i.createElement("span",{className:"k-button-text"},e))}toggleIfApplicable(){if(this.props.togglable&&this.props.selected===void 0){const e=!this.state.selected;this._selectedTemp=e,this.setState({selected:e},()=>this._selectedTemp=void 0)}}};let O=j;O.propTypes={children:s.node,selected:s.bool,togglable:s.bool,icon:s.string,svgIcon:a.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"]),themeColor:s.oneOf([null,"base","primary","secondary","tertiary","info","success","warning","error","dark","light","inverse"])},O.defaultProps={togglable:!1,size:"medium",rounded:"medium",fillMode:"solid",themeColor:"base"};const Ze={button:"k-button",flat:"k-flat",outline:"k-outline",clear:"k-button-clear",primary:"k-primary","state-selected":"k-selected","button-icon":"k-button-icon","button-icontext":"k-button-icontext","state-disabled":"k-disabled","group-start":"k-group-start","group-end":"k-group-end","button-group":"k-button-group","button-group-stretched":"k-button-group-stretched",ltr:"k-ltr",rtl:"k-rtl"},Se=":not(.k-dropdownlist button):not(.k-colorpicker button):not(.k-split-button .k-split-button-arrow)",Pe=["button"+Se,".k-button-group > button"+Se,".k-colorpicker",".k-dropdownlist"],R={styles:Ze}.styles;class Be extends i.Component{constructor(n){super(n),this._element=null,a.validatePackage(F)}render(){const n=this.mapButtons(this.props.children),t=a.classNames([R["button-group"]],{["k-disabled"]:this.props.disabled,[R["button-group-stretched"]]:!!this.props.width},this.props.className),l={className:t,style:{width:`${this.props.width}`},dir:this.props.dir,role:"group","aria-disabled":this.props.disabled};return i.createElement("div",{ref:r=>{this._element=r},...l,className:t},n)}mapButtons(n){const t=i.Children.count(n),l=this.props.dir!==void 0?this.props.dir==="rtl":this._element&&getComputedStyle(this._element).direction==="rtl"||!1;return i.Children.map(n,(r,o)=>i.isValidElement(r)?this.renderButton(r,o,o===t-1,l):r)}renderButton(n,t,l,r){const o=a.classNames(n.props.className,{[R["group-start"]]:r?l:t===0,[R["group-end"]]:r?t===0:l}),d={...this.props.width?{width:this.props.width}:{},...n.props.style||{}},c=this.props.disabled||n.props.disabled,m={...n.props,...o?{className:o}:{},...Object.keys(d).length?{style:d}:{},...c!==void 0?{disabled:c}:{}};return i.Children.count(n.props.children)>0?i.cloneElement(n,m,n.props.children):i.cloneElement(n,m)}}Be.propTypes={children:s.oneOfType([s.arrayOf(s.element),s.element]),className:s.string,disabled:s.bool,width:s.string,dir:s.string};const fe=e=>{const n=i.useCallback(o=>{e.onClick(o,e.index)},[e]),t=e.dataItem.render||e.item||(e.item===void 0?e.render:null),l=e.dataItem.text!==void 0?e.dataItem.text:e.textField?e.dataItem[e.textField]:e.dataItem,r=i.createElement("li",{id:e.id,className:a.classNames("k-item",e.className,{"k-focus":e.focused}),tabIndex:-1,onClick:n,onMouseDown:e.onDown,onPointerDown:e.onDown,role:"menuitem","aria-disabled":e.dataItem.disabled||void 0},i.createElement("span",{tabIndex:-1,className:a.classNames("k-link k-menu-link",{"k-selected":e.dataItem.selected,"k-disabled":e.dataItem.disabled}),key:"icon"},t?i.createElement(t,{item:e.dataItem,itemIndex:e.index}):i.createElement(i.Fragment,null,(e.dataItem.icon||e.dataItem.iconClass)&&i.createElement(a.IconWrap,{className:e.dataItem.iconClass,name:e.dataItem.icon,icon:e.dataItem.svgIcon}),e.dataItem.imageUrl&&i.createElement("img",{role:"presentation",alt:"",src:e.dataItem.imageUrl,className:"k-icon"}),l&&i.createElement("span",{className:"k-menu-link-text"},l))));return e.item!==void 0&&e.render!==void 0?e.render.call(void 0,r,e):r};fe.displayName="KendoReactButtonItem";class be extends i.Component{render(){return null}}be.propTypes={text:s.string,icon:s.string,iconClass:s.string,imageUrl:s.string,disabled:s.bool,render:s.any};const Ce=(e,n,t,l)=>{if(t)return e;const r=Math.min(l-1,Math.max(0,e));switch(n){case a.Keys.enter:case a.Keys.space:case a.Keys.esc:return-1;case a.Keys.up:case a.Keys.left:return r-1<0?l-1:r-1;case a.Keys.down:case a.Keys.right:return r+1>=l?0:r+1;case a.Keys.home:return 0;case a.Keys.end:return l-1;default:return e}};function Fe(e){let n={horizontal:"left",vertical:"bottom"};return e&&(n.horizontal="right"),n}function ze(e){let n={horizontal:"left",vertical:"top"};return e&&(n.horizontal="right"),n}let ee=class extends i.Component{constructor(n){super(n),this.state={focused:!1,focusedIndex:-1,opened:!1},this.wrapper=null,this.mainButton=null,this.list=null,this.skipFocus=!1,this.buttonsData=[],this.onKeyDown=t=>{const{focusedIndex:l}=this.state;if(t.altKey){!this.opened&&t.keyCode===a.Keys.down?(this.dispatchPopupEvent(t,!0),this.setState({focusedIndex:0}),this.setOpen(!0)):this.opened&&t.keyCode===a.Keys.up&&(this.setState({focusedIndex:-1}),this.setOpen(!1));return}let r;if(t.keyCode===a.Keys.enter||t.keyCode===a.Keys.space){if(t.preventDefault(),this.dispatchClickEvent(t,l),l>=0){r={focusedIndex:this.opened?-1:0};const o=!this.opened;this.setOpen(o),o&&this.dispatchPopupEvent(t,o)}}else if(this.opened&&t.keyCode===a.Keys.esc){this.setState({focusedIndex:-1}),this.setOpen(!1);return}if(this.opened){const o=Ce(l,t.keyCode,t.altKey,this.buttonsData.length);o!==l&&(r=r||{},r.focusedIndex=o);const d=t.keyCode===a.Keys.up||t.keyCode===a.Keys.down||t.keyCode===a.Keys.left||t.keyCode===a.Keys.right;!t.altKey&&(d||t.keyCode===a.Keys.home||t.keyCode===a.Keys.end)&&t.preventDefault()}r&&this.setState(r)},this.switchFocus=t=>{this.skipFocus=!0,t(),window.setTimeout(()=>this.skipFocus=!1,0)},this.onFocus=t=>{this.skipFocus||(a.dispatchEvent(this.props.onFocus,t,this,void 0),this.setState({focused:!0}))},this.setOpen=t=>{this.openedDuringOnChange=t,this.setState({opened:t})},this.onItemClick=(t,l)=>{this.opened&&(this.setState({focusedIndex:0}),this.setOpen(!1)),this.dispatchClickEvent(t,l)},this.onBlur=t=>{this.skipFocus||(this.setState({focused:!1,focusedIndex:-1}),this.setOpen(!1),a.dispatchEvent(this.props.onBlur,t,this,void 0))},this.onPopupClose=()=>{this.state.focused&&this.switchFocus(()=>{this.element&&(this.element.removeAttribute("tabindex"),this.element.focus({preventScroll:!0}))}),this.dispatchPopupEvent({},!1)},this.listRef=t=>{this.list=t,t&&this.state.focused&&this.switchFocus(()=>{t.focus({preventScroll:!0}),this.element&&(this.element.tabIndex=-1)})},this.onSplitPartClick=t=>{if(this.buttonsData.length){const l=!this.opened;l&&this.dispatchPopupEvent(t,l),this.setState({focusedIndex:l?0:-1,focused:!0}),this.setOpen(l)}},this.onDownSplitPart=t=>{t.preventDefault();const l=a.getActiveElement(document);this.element&&l!==this.element&&l!==this.list&&this.element.focus()},this.onItemDown=t=>{a.getActiveElement(document)===this.list&&t.preventDefault()},this.dispatchPopupEvent=(t,l)=>{a.dispatchEvent(l?this.props.onOpen:this.props.onClose,t,this,void 0),this.openedDuringOnChange=void 0},a.validatePackage(F)}get guid(){return this.props.id?this.props.id+"-accessibility-id":this.props.id}get opened(){return this.openedDuringOnChange!==void 0?this.openedDuringOnChange:this.props.opened===void 0?this.state.opened:this.props.opened}render(){this.buttonsData=this.props.items||i.Children.toArray(this.props.children).filter(c=>c&&c.type===be).map(c=>c.props);const n=this.isRtl(),t=n?"rtl":void 0,{id:l,style:r,tabIndex:o,disabled:d}=this.props;return i.createElement("div",{id:l,style:r,className:a.classNames("k-split-button","k-button-group",{"k-focus":this.state.focused},`k-rounded-${a.kendoThemeMaps.roundedMap[this.props.rounded||"medium"]}`,this.props.className),onKeyDown:this.onKeyDown,onFocus:this.onFocus,onBlur:this.onBlur,dir:t,ref:c=>this.wrapper=c},i.createElement(O,{ref:c=>this.mainButton=c&&c.element,type:"button",size:this.props.size,rounded:this.props.rounded,fillMode:this.props.fillMode,themeColor:this.props.themeColor,onClick:c=>this.onItemClick(c,-1),disabled:d||void 0,tabIndex:o,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":d,"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),i.createElement(O,{type:"button",size:this.props.size,rounded:this.props.rounded,fillMode:this.props.fillMode,themeColor:this.props.themeColor,icon:"caret-alt-down",svgIcon:Ne.caretAltDownIcon,className:"k-split-button-arrow",disabled:d||void 0,tabIndex:-1,onClick:this.onSplitPartClick,onMouseDown:this.onDownSplitPart,onPointerDown:this.onDownSplitPart,dir:t,"aria-label":"menu toggling button"}),this.renderPopup(n))}componentDidMount(){(this.props.dir===void 0&&this.isRtl()||this.opened)&&this.forceUpdate()}get element(){return this.mainButton}dispatchClickEvent(n,t){this.isItemDisabled(t)||(t===-1?a.dispatchEvent(this.props.onButtonClick,n,this,void 0):a.dispatchEvent(this.props.onItemClick,n,this,{item:this.buttonsData[t],itemIndex:t}))}renderPopup(n){const{popupSettings:t={}}=this.props,{focusedIndex:l}=this.state;return i.createElement(pe.Popup,{anchor:this.wrapper,show:this.opened,animate:t.animate,popupClass:a.classNames("k-menu-popup",t.popupClass),anchorAlign:t.anchorAlign||Fe(n),popupAlign:t.popupAlign||ze(n),style:n?{direction:"rtl"}:void 0,onClose:this.onPopupClose},i.createElement("ul",{role:"menu",id:this.guid,"aria-labelledby":"button-"+this.guid,tabIndex:-1,ref:this.listRef,"aria-activedescendant":l>=0?`${this.guid}-${l}`:void 0,className:a.classNames("k-group k-menu-group k-reset",{[`k-menu-group-${a.kendoThemeMaps.sizeMap[this.props.size]||this.props.size}`]:this.props.size})},this.renderChildItems()))}renderChildItems(){const{item:n,itemRender:t,textField:l}=this.props;return this.buttonsData.length>0?this.buttonsData.map((r,o)=>i.createElement(fe,{className:"k-menu-item",dataItem:r,textField:l,focused:this.state.focusedIndex===o,onClick:this.onItemClick,onDown:this.onItemDown,render:t,item:n,key:o,index:o,id:`${this.guid}-${o}`})):null}isItemDisabled(n){return this.buttonsData[n]?this.buttonsData[n].disabled:this.props.disabled}isRtl(){return this.props.dir!==void 0?this.props.dir==="rtl":!!this.wrapper&&getComputedStyle(this.wrapper).direction==="rtl"}};ee.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:a.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},ee.defaultProps={size:"medium",rounded:"medium",fillMode:"solid",themeColor:"base"};class ge extends i.Component{render(){return null}}ge.propTypes={text:s.string,icon:s.string,iconClass:s.string,imageUrl:s.string,selected:s.bool,disabled:s.bool,render:s.any};let te=class extends i.Component{constructor(n){super(n),this.state={opened:!1,focused:!1,focusedIndex:-1},this.wrapper=null,this.mainButton=null,this.list=null,this.skipFocus=!1,this.buttonsData=[],this.onKeyDown=t=>{const{focusedIndex:l}=this.state;if(t.altKey){!this.opened&&t.keyCode===a.Keys.down?(this.setOpen(!0),this.dispatchPopupEvent(t,!0),this.setState({focusedIndex:0})):this.opened&&t.keyCode===a.Keys.up&&(this.setState({focusedIndex:-1}),this.setOpen(!1));return}const r={...this.state};if(t.keyCode===a.Keys.enter||t.keyCode===a.Keys.space){l>=0&&this.dispatchClickEvent(t,l),t.preventDefault();const o=!this.opened;this.setOpen(o),o&&(this.dispatchPopupEvent(t,!0),this.setState({focusedIndex:this.opened?-1:0}));return}else if(this.opened&&t.keyCode===a.Keys.esc){this.setState({focusedIndex:-1}),this.setOpen(!1);return}if(this.opened){const o=Ce(l,t.keyCode,t.altKey,this.buttonsData.length);r.focusedIndex=o;const d=t.keyCode===a.Keys.up||t.keyCode===a.Keys.down||t.keyCode===a.Keys.left||t.keyCode===a.Keys.right;!t.altKey&&(d||t.keyCode===a.Keys.home||t.keyCode===a.Keys.end)&&t.preventDefault()}this.setState(r)},this.switchFocus=t=>{this.skipFocus=!0,t(),window.setTimeout(()=>this.skipFocus=!1,0)},this.handleFocus=t=>{this.skipFocus||(this.setState({focused:!0,focusedIndex:this.opened?0:-1}),a.dispatchEvent(this.props.onFocus,t,this,void 0))},this.handleBlur=t=>{this.skipFocus||(this.setState({focused:!1,focusedIndex:-1}),this.setOpen(!1),a.dispatchEvent(this.props.onBlur,t,this,void 0))},this.setOpen=t=>{this.openedDuringOnChange=t,this.setState({opened:t})},this.onItemClick=(t,l)=>{this.setState({focusedIndex:-1}),this.setOpen(!1),this.dispatchClickEvent(t,l)},this.onItemDown=t=>{a.getActiveElement(document)===this.list&&t.preventDefault()},this.mouseDown=t=>{t.preventDefault();const l=a.getActiveElement(document);this.element&&l!==this.element&&l!==this.list&&this.element.focus()},this.onPopupClose=()=>{this.state.focused&&this.switchFocus(()=>{this.element&&(this.element.removeAttribute("tabindex"),this.element.focus({preventScroll:!0}))}),this.dispatchPopupEvent({},!1)},this.listRef=t=>{this.list=t,t&&this.state.focused&&this.switchFocus(()=>{t.focus({preventScroll:!0}),this.element&&(this.element.tabIndex=-1)})},this.onClickMainButton=t=>{if(!this.buttonsData.length)return;const l=!this.opened;this.setState({focused:!0,focusedIndex:l?0:-1}),this.setOpen(l),l&&this.dispatchPopupEvent(t,l)},this.dispatchPopupEvent=(t,l)=>{a.dispatchEvent(l?this.props.onOpen:this.props.onClose,t,this,void 0),this.openedDuringOnChange=void 0},a.validatePackage(F)}get guid(){return this.props.id+"-accessibility-id"}get opened(){return this.openedDuringOnChange!==void 0?this.openedDuringOnChange:this.props.opened===void 0?this.state.opened:this.props.opened}render(){const n=this.isRtl(),t=n?"rtl":void 0,{id:l,style:r,tabIndex:o,disabled:d}=this.props;return this.buttonsData=this.props.items||i.Children.toArray(this.props.children).filter(c=>c&&c.type===ge).map(c=>c.props),i.createElement("div",{id:l,style:r,className:a.classNames("k-dropdown-button",{"k-focus":this.state.focused},this.props.className),onKeyDown:this.onKeyDown,onFocus:this.handleFocus,onBlur:this.handleBlur,dir:t,ref:c=>this.wrapper=c},i.createElement(O,{size:this.props.size,rounded:this.props.rounded,fillMode:this.props.fillMode,themeColor:this.props.themeColor,onClick:this.onClickMainButton,onMouseDown:this.mouseDown,disabled:d||void 0,tabIndex:o,accessKey:this.props.accessKey,icon:this.props.icon,svgIcon:this.props.svgIcon,iconClass:this.props.iconClass,className:this.props.buttonClass,imageUrl:this.props.imageUrl,dir:t,ref:c=>this.mainButton=c&&c.element,type:"button","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),this.renderPopup(n))}componentDidMount(){(this.props.dir===void 0&&this.isRtl()||this.opened)&&this.forceUpdate()}get element(){return this.mainButton}dispatchClickEvent(n,t){this.isItemDisabled(t)||a.dispatchEvent(this.props.onItemClick,n,this,{item:this.buttonsData[t],itemIndex:t})}renderPopup(n){const{popupSettings:t={}}=this.props,{focusedIndex:l}=this.state;return i.createElement(pe.Popup,{anchor:this.wrapper,show:this.opened,animate:t.animate,popupClass:a.classNames("k-menu-popup",t.popupClass),anchorAlign:t.anchorAlign||Fe(n),popupAlign:t.popupAlign||ze(n),style:n?{direction:"rtl"}:void 0,onClose:this.onPopupClose},i.createElement("ul",{role:"menu",id:this.guid,"aria-labelledby":"button-"+this.guid,tabIndex:-1,"aria-activedescendant":l>=0?`${this.guid}-${l}`:void 0,ref:this.listRef,className:a.classNames("k-group k-menu-group k-reset",{[`k-menu-group-${a.kendoThemeMaps.sizeMap[this.props.size]||this.props.size}`]:this.props.size})},this.renderChildItems()))}renderChildItems(){const{item:n,itemRender:t,textField:l}=this.props;return this.buttonsData.length>0?this.buttonsData.map((r,o)=>i.createElement(fe,{className:"k-menu-item",dataItem:r,textField:l,focused:this.state.focusedIndex===o,onClick:this.onItemClick,onDown:this.onItemDown,render:t,item:n,index:o,key:o,id:`${this.guid}-${o}`})):null}isItemDisabled(n){return this.buttonsData[n]?this.buttonsData[n].disabled:this.props.disabled}isRtl(){return this.props.dir!==void 0?this.props.dir==="rtl":!!this.wrapper&&getComputedStyle(this.wrapper).direction==="rtl"}};te.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:a.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},te.defaultProps={size:"medium",rounded:"medium",fillMode:"solid",themeColor:"base"};const me=class extends i.Component{constructor(e){super(e),this._element=null,this.offsetHeight=0,this.offsetWidth=0,this.buttons=[],this.focusedSelector=this.selectors.map(n=>n+":focus").join(","),this.setTabIndex=n=>{const{tabIndex:t=me.defaultProps.tabIndex}=this.props;this.buttons.forEach((l,r)=>{l.tabIndex=r===n?t:-1})},this.onKeyDown=n=>{const t=n.target;if(!(n.keyCode===a.Keys.left||n.keyCode===a.Keys.right)||n.defaultPrevented||this.buttons.findIndex(o=>o===t)===-1)return;const r=this.focusedIndex;n.keyCode===a.Keys.left?this.focusButton(r,r-1):this.focusButton(r,r+1)},this.onWindowResize=n=>{const t=this.element;if(!t)return;const l=t.offsetWidth,r=t.offsetHeight;if(this.offsetWidth!==l||this.offsetHeight!==r){this.offsetWidth=l,this.offsetHeight=r;const o={offsetWidth:this.offsetWidth,offsetHeight:this.offsetHeight};this.props.onResize&&this.props.onResize.call(void 0,{target:this,...o,nativeEvent:n})}},a.validatePackage(F)}get selectors(){return this.props.buttons||Pe}get focusedIndex(){const e=this.element&&this.element.querySelector(this.focusedSelector);return Math.max(0,this.buttons.findIndex(n=>n===e))}get element(){return this._element}componentDidMount(){window.addEventListener("resize",this.onWindowResize);const e=this.element;e&&(this.offsetWidth=e.offsetWidth,this.offsetHeight=e.offsetHeight,this.props.keyboardNavigation!==!1&&(this.buttons=Array.from(e.querySelectorAll(this.selectors.join(","))),this.setTabIndex(0)))}componentDidUpdate(){const e=this.element;!e||this.props.keyboardNavigation===!1||(this.buttons=Array.from(e.querySelectorAll(this.selectors.join(","))),this.setTabIndex(this.focusedIndex))}componentWillUnmount(){window.removeEventListener("resize",this.onWindowResize),this.buttons.length=0}render(){return i.createElement("div",{id:this.props.id,"aria-label":this.props.ariaLabel,className:a.classNames("k-toolbar",{[`k-toolbar-${a.kendoThemeMaps.sizeMap[this.props.size]||this.props.size}`]:this.props.size},this.props.className),style:this.props.style,role:this.props.role!==void 0?this.props.role||void 0:"toolbar",dir:this.props.dir,ref:e=>this._element=e,onKeyDown:this.props.keyboardNavigation!==!1?this.onKeyDown:void 0},this.props.children)}focusButton(e,n){const{tabIndex:t=me.defaultProps.tabIndex}=this.props,l=this.buttons[n];if(l){l.tabIndex=t,l.focus();const r=this.buttons[e];r&&(r.tabIndex=-1)}}};let ye=me;ye.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),size:s.oneOf([null,"small","medium","large"])},ye.defaultProps={tabIndex:0,size:"medium"};class Me extends i.PureComponent{constructor(){super(...arguments),this._element=null}get element(){return this._element}render(){return i.createElement("div",{id:this.props.id,className:a.classNames("k-toolbar-item",this.props.className),style:this.props.style,ref:n=>this._element=n},this.props.children)}}Me.propTypes={className:s.string};class Ge extends i.PureComponent{render(){return i.createElement("div",{className:a.classNames("k-separator",this.props.className)})}}const ve=i.forwardRef((e,n)=>{const t=i.useRef(null),l=i.useRef(null);i.useImperativeHandle(l,()=>({element:t.current})),i.useImperativeHandle(n,()=>({element:t.current}));const r=i.useMemo(()=>a.classNames("k-spacer",e.className),[e.className]);return i.createElement("span",{ref:t,className:r})});ve.displayName="KendoReactToolbarSpacer",ve.propTypes={className:s.string};const Te=C.createContext([null,e=>{}]),Oe=C.createContext([null,e=>{}]),Ae=C.createContext([null,e=>{}]);var U=(e=>(e.next="next",e.prev="prev",e.current="current",e.reset="reset",e))(U||{});const Xe=(e,n)=>{const t=n.items.findIndex(l=>l===e);switch(n.type){case"next":return t===n.items.length-1?e:n.items[t+1];case"prev":return t===0?e:n.items[t-1];case"current":return n.payload;case"reset":return null;default:return e}};var $e=(e=>(e.remove="remove",e.add="add",e.reorder="reorder",e))($e||{});const Je=(e,n)=>{switch(n.type){case"add":break;case"remove":return e.filter(t=>t[n.valueField]!==n.payload);case"reorder":break;default:return e}};var se=(e=>(e.toggle="toggle",e.remove="remove",e))(se||{});const Qe=(e,n)=>{switch(n.selection){case"single":switch(n.type){case"toggle":{if(!Array.isArray(e)||e===null)return n.payload===e?null:n.payload;throw new Error("State cannot be an array in single selection")}case"remove":return n.payload===e?null:e;default:return e}case"multiple":switch(n.type){case"toggle":{if(Array.isArray(e))return e.some(t=>t===n.payload)?e.filter(t=>t!==n.payload):[...e,n.payload];if(e===null)return[n.payload];throw new Error("State cannot be non-array in multiple selection")}case"remove":return Array.isArray(e)?e.some(t=>t===n.payload)?e.filter(t=>t!==n.payload):[...e,n.payload]:e;default:return e}case"none":return null;default:return e}},z=i.forwardRef((e,n)=>{a.validatePackage(F);const t=i.useRef(null),l=i.useRef(null),r=a.useDir(l,e.dir);i.useImperativeHandle(t,()=>({element:l.current,props:e})),i.useImperativeHandle(n,()=>t.current);const[o,d]=i.useContext(Te),[c,m]=i.useContext(Oe),[,I]=i.useContext(Ae),h=i.useMemo(()=>e.selected||(Array.isArray(o)?o.some(p=>p===e.value):o===e.value),[e.selected,e.value,o]),x=i.useMemo(()=>c===e.value,[e.value,c]);i.useEffect(()=>{x&&l.current&&l.current.focus()},[x]);const N=i.useCallback(p=>{d({type:se.toggle,payload:e.value,event:p})},[d,e.value]),w=i.useCallback(p=>{e.removable&&(I({type:$e.remove,payload:e.value,event:p}),m({type:U.reset,payload:e.value,event:p}),d({type:se.remove,payload:e.value,event:p}),e.onRemove&&e.onRemove.call(void 0,{target:t.current,syntheticEvent:p}))},[e.onRemove,e.value,e.removable,I,m,d]),K=i.useCallback(p=>{switch(p.keyCode){case a.Keys.left:m({type:U.prev,payload:e.value,event:p});break;case a.Keys.right:m({type:U.next,payload:e.value,event:p});break;case a.Keys.enter:d({type:se.toggle,payload:e.value,event:p});break;case a.Keys.delete:w(p);break}e.onKeyDown&&e.onKeyDown.call(void 0,{target:t.current,syntheticEvent:p})},[e.onKeyDown,e.value,m,d,w]),S=i.useCallback(p=>{m({payload:e.value,type:U.current,event:p}),e.onFocus&&e.onFocus.call(void 0,{target:t.current,syntheticEvent:p})},[e.onFocus,e.value,m]),k=i.useCallback(p=>{e.onBlur&&e.onBlur.call(void 0,{target:t.current,syntheticEvent:p})},[e.onBlur]),E=a.useMouse(e,t,{onClick:N});return i.createElement("div",{...E,role:e.role||"button",id:e.value,style:e.style,ref:l,dir:r,tabIndex:a.getTabIndex(e.tabIndex,e.disabled,void 0),className:a.classNames("k-chip",{"k-rtl":r==="rtl","k-disabled":e.disabled,"k-selected":h,"k-focus":x,[`k-chip-${a.kendoThemeMaps.sizeMap[e.size]||e.size}`]:e.size,[`k-rounded-${a.kendoThemeMaps.roundedMap[e.rounded]||e.rounded}`]:e.rounded,[`k-chip-${e.fillMode}`]:e.fillMode,[`k-chip-${e.fillMode}-${e.themeColor}`]:!!(e.fillMode&&e.themeColor)},e.className),"aria-pressed":e.role?void 0:h,"aria-disabled":e.disabled,"aria-describedby":e.ariaDescribedBy,"aria-keyshortcuts":e.removable?"Enter Delete":void 0,onFocus:S,onBlur:k,onKeyDown:K},h&&(e.selectedIcon||e.selectedSvgIcon)&&i.createElement(a.IconWrap,{className:"k-chip-icon",name:e.selectedIcon?a.toIconName(e.selectedIcon):void 0,icon:e.selectedSvgIcon,size:"small"}),(e.icon||e.svgIcon)&&i.createElement(a.IconWrap,{className:"k-chip-icon",name:e.icon?a.toIconName(e.icon):void 0,icon:e.svgIcon,size:"small"}),e.avatar&&i.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},i.createElement("span",{className:"k-avatar-image"},i.createElement("img",{src:e.avatar.image,alt:e.avatar.imageAlt}))),i.createElement("span",{className:"k-chip-content"},e.children!==void 0?e.children:e.text&&i.createElement("span",{"aria-label":e.ariaLabel||e.text,className:"k-chip-label"},e.text)),e.removable&&i.createElement("span",{className:"k-chip-actions"},i.createElement("span",{className:a.classNames("k-chip-action","k-chip-remove-action"),onClick:w},i.createElement(a.IconWrap,{name:e.removeIcon?a.toIconName(e.removeIcon):void 0,icon:e.removeSvgIcon||Ne.xCircleIcon,size:"small"}))))}),Ye={id:s.string,text:s.string,value:s.any,dir:s.oneOf(["ltr","rtl"]),removable:s.bool,removeIcon:s.string,removeIconSvg:a.svgIconPropType,disabled:s.bool,icon:s.string,svgIcon:a.svgIconPropType,selectedIcon:s.string,selectedIconSvg:a.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"])},Re={disabled:!1,removable:!1,removeIcon:"k-i-x-circle",dir:"ltr",size:"medium",rounded:"medium",fillMode:"solid",themeColor:"base"};z.displayName="KendoReactChip",z.propTypes=Ye,z.defaultProps=Re;const et=(e,n,t)=>{const[l,r]=i.useState(e);return[l,d=>{const c=Qe(n.state||l,{...d,...n});t&&t(c,d.event),r(c)}]},tt=e=>{const[n,t]=i.useState(null);return[n,r=>{const o=Xe(r.payload,{...r,...e});t(o)}]},st=(e,n,t)=>{const[l,r]=i.useState(e);return[l,d=>{const c=Je(n.state||l,{...d,...n});t&&t(c,d.event),r(c)}]},ie=i.forwardRef((e,n)=>{a.validatePackage(F);const t=i.useRef(null),l=i.useRef(null),r=a.useDir(l,e.dir),{chip:o,id:d,style:c,tabIndex:m,disabled:I,size:h,className:x,ariaDescribedBy:N,ariaLabelledBy:w,ariaLabel:K,selection:S=A.selection,value:k=A.defaultValue,defaultData:E=A.defaultData,valueField:p=A.valueField,textField:$=A.textField,onChange:M,onDataChange:B}=e,_=i.useMemo(()=>o||z,[o,z]);i.useImperativeHandle(t,()=>({element:l.current,props:e})),i.useImperativeHandle(n,()=>t.current);const T=i.useCallback((b,y)=>{M&&t.current&&M.call(void 0,{value:b,target:t.current,syntheticEvent:y})},[M]),[V,Z]=et(k,{selection:S,state:k},T),le=i.useCallback((b,y)=>{B&&t.current&&B.call(void 0,{value:b,target:t.current,syntheticEvent:y})},[B]),[G,re]=st(e.data||E,{state:e.data,valueField:p},le),X=i.useCallback((b,y)=>(b.push(y[p]),b),[p]),W=i.useMemo(()=>e.data||G,[e.data,G]),oe=i.useMemo(()=>k||V,[k,V]),ce=i.useMemo(()=>W.reduce(X,[]),[W,X]),J=i.useCallback(b=>a.getter(p)(b),[p]),v=i.useCallback(b=>a.getter($)(b),[$]),[De,ke]=tt({items:ce}),ue=a.useMouse(e,t);return i.createElement(Te.Provider,{value:[oe,Z]},i.createElement(Oe.Provider,{value:[De,ke]},i.createElement(Ae.Provider,{value:[W,re]},i.createElement("div",{ref:l,...ue,role:I?void 0:"listbox",id:d,dir:r,style:c,tabIndex:a.getTabIndex(m,I,void 0),className:a.classNames("k-chip-list",{"k-rtl":r==="rtl","k-disabled":I,[`k-chip-list-${a.kendoThemeMaps.sizeMap[h]||h}`]:h},x),"aria-label":K,"aria-labelledby":w,"aria-describedby":N,"aria-orientation":"horizontal","aria-multiselectable":S==="multiple"},W.map((b,y)=>i.createElement(_,{role:"option",dataItem:b,size:h,key:[J(b),y].join("-"),text:v(b),value:J(b),ariaLabel:b.ariaLabel,svgIcon:b.svgIcon||void 0}))))))}),it={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"])},A={chip:z,size:"medium",disabled:!1,defaultValue:null,defaultData:[],dir:"ltr",selection:"none",textField:"text",valueField:"value",removable:"removable"};ie.displayName="KendoReactChipList",ie.propTypes=it,ie.defaultProps=A;const ne=i.forwardRef((e,n)=>{const{className:t,disabled:l,text:r,icon:o,style:d,id:c,focused:m,tabIndex:I,index:h,dataItem:x,item:N,svgIcon:w,onDown:K,onClick:S,...k}=e,E=i.useRef(null),p=i.useCallback(()=>{E.current&&E.current.focus()},[]),$=i.useCallback(()=>({element:E.current,focus:p}),[p]);i.useImperativeHandle(n,$);const M=i.useCallback(T=>{S&&h!==void 0&&!l&&S(T,h)},[S,h]),B=i.useMemo(()=>a.classNames("k-fab-item",{"k-focus":m,"k-disabled":l},t),[t,l,m]),_=N;return i.createElement("li",{ref:E,id:c,className:B,style:d,role:"menuitem",tabIndex:a.getTabIndex(I,l),"aria-disabled":l,"aria-label":`${r||""} floatingactionbutton item`,onClick:M,onMouseDown:K,onPointerDown:K,...k},_?i.createElement(_,{itemIndex:h,item:x}):i.createElement(i.Fragment,null,r&&i.createElement("span",{className:"k-fab-item-text"},r),o||w?i.createElement(a.IconWrap,{className:"k-fab-item-icon",name:o,icon:w}):null))});ne.propTypes={className:s.string,style:s.object,children:s.any,disabled:s.bool,focused:s.bool,index:s.number,icon:s.string,svgIcon:a.svgIconPropType,text:s.string,tabIndex:s.number,customProp:s.any},ne.displayName="KendoFloatingActionButtonItem";const _e="16px",ae=e=>typeof e=="number"?e+"px":e,nt=(e,n)=>{const t={horizontal:n?"right":"left",vertical:"bottom"};return e.horizontal==="end"&&(t.horizontal=n?"left":"right"),t},at=(e,n)=>{const t={horizontal:n?"right":"left",vertical:"top"};return e.horizontal==="end"&&(t.horizontal=n?"left":"right"),t},lt=(e,n)=>{const t=n==="end"?"end":"start";return{rtl:{end:"k-text-left",start:"k-text-right"},ltr:{start:"k-text-left",end:"k-text-right"}}[e][t]},rt=(e,n,t,l)=>{const r=n.horizontal,o=n.vertical;if(e.current){const d=t&&t.x!==void 0?ae(t.x):_e,c=t&&t.x!==void 0?`calc(50% + ${ae(t.x)})`:"50%",m=t&&t.y!==void 0?ae(t.y):_e,I=t&&t.y!==void 0?`calc(50% + ${ae(t.y)})`:"50%";e.current.style.setProperty(ot(n,l),r==="center"?c:d),e.current.style.setProperty(ct(n),o==="middle"?I:m),l&&((o==="top"||o==="bottom")&&r==="start"&&e.current.style.setProperty("left","unset"),o==="middle"&&r==="end"&&e.current.style.setProperty("right","unset"),o==="middle"&&r==="start"&&e.current.style.setProperty("left","unset"))}},ot=(e,n)=>{const{horizontal:t}=e;return{end:n?"left":"right",center:"left",start:n?"right":"left"}[t||"end"]},ct=e=>({top:"top",middle:"top",bottom:"bottom"})[e.vertical||"bottom"],ut=2,dt=100,Ie=i.forwardRef((e,n)=>{a.validatePackage(F);const{align:t=q.align,alignOffset:l,className:r,disabled:o,icon:d,svgIcon:c,iconClass:m,id:I,items:h,item:x,text:N,positionMode:w=q.positionMode,size:K=q.size,style:S,rounded:k=q.rounded,themeColor:E=q.themeColor,overlayStyle:p,tabIndex:$,accessKey:M,popupSettings:B={},modal:_,onClick:T,onItemClick:V,onFocus:Z,onBlur:le,onKeyDown:G,onOpen:re,onClose:X,...W}=e,oe=a.useZIndexContext(),ce=oe?oe+ut:dt,J=i.useRef(null),v=i.useRef(null),De=i.useRef(null),ke=i.useRef(null),ue=i.useCallback(()=>{v.current&&v.current.focus()},[]),b=i.useCallback(()=>({element:v.current,focus:ue}),[ue]);i.useImperativeHandle(J,b),i.useImperativeHandle(n,()=>J.current);const[y,P]=i.useState(!1),[de,L]=i.useState(!1),[Q,D]=i.useState(-1),ht=a.useId()+"-button-id",xe=a.useDir(v,e.dir),Y=xe==="rtl",he=a.useId()+"-list-id";i.useEffect(()=>{rt(v,t,l,Y)},[v,t,l,Y]),i.useEffect(()=>{de&&v&&v.current&&v.current.focus()},[de,v]);const H=i.useCallback((u,g)=>{h&&a.dispatchEvent(g?re:X,u,b(),void 0)},[re,X,h]),He=i.useCallback(u=>{!u.target||o||(!h&&T?a.dispatchEvent(T,u,b(),void 0):(P(!y),L(!0),D(y?-1:0),H(u,!y)))},[P,L,D,T,H,y,h,o]),pt=i.useCallback(u=>{L(!0),D(y?0:-1),Z&&a.dispatchEvent(Z,u,b(),void 0)},[Z,L,D]),ft=i.useCallback(u=>{L(!1),P(!1),D(-1),a.dispatchEvent(le,u,b(),void 0),y&&H(u,!1)},[le,L,P,D,H]),bt=i.useCallback(u=>{u.preventDefault()},[]),we=i.useCallback((u,g)=>{h&&(h[g].disabled||a.dispatchEvent(V,u,b(),{itemProps:h[g],itemIndex:g}))},[V]),gt=i.useCallback((u,g)=>{!u.target||!h||(D(g),P(!1),we(u,g),H(u,!1))},[D,P,we,H]),mt=i.useCallback(u=>{a.getActiveElement(document)===v.current&&u.preventDefault()},[v]),yt=i.useCallback(u=>{const g=Q,Ee=h?h.length:-1;if(u.altKey){!y&&u.keyCode===a.Keys.down&&(u.preventDefault(),P(!0),D(0)),y&&u.keyCode===a.Keys.up&&(u.preventDefault(),P(!1),D(-1));return}switch(u.keyCode){case a.Keys.enter:case a.Keys.space:g>=0&&we(u,g),h||He(u),u.preventDefault(),P(!y),D(y?-1:0);break;case a.Keys.esc:u.preventDefault(),P(!1),D(-1);break;case a.Keys.home:u.preventDefault(),D(0);break;case a.Keys.end:u.preventDefault(),D(Ee-1);break;case a.Keys.down:case a.Keys.right:u.preventDefault(),D(g+1>=Ee?0:g+1);break;case a.Keys.up:case a.Keys.left:u.preventDefault(),D(g-1<0?Ee-1:g-1);break}a.dispatchEvent(G,u,b(),void 0)},[G,Q,D,Y,P]),vt=i.useMemo(()=>a.classNames("k-fab k-fab-solid",{"k-fab-sm":K==="small","k-fab-md":K==="medium","k-fab-lg":K==="large","k-disabled":o,"k-pos-absolute":w==="absolute","k-pos-fixed":w==="fixed","k-focus":de,[`k-rounded-${a.kendoThemeMaps.roundedMap[k]||k}`]:k,[`k-fab-solid-${E}`]:E},`k-${t.vertical}-${t.horizontal}`,r),[E,K,k,o,w,t,de,r]),It=h&&h.map((u,g)=>i.createElement(ne,{...u,key:g,index:g,id:`${he}-${g}`,disabled:o||u.disabled,focused:Q===g,dataItem:u,item:x,className:a.classNames(u.className,lt(xe||"ltr",t.horizontal)),onClick:gt,onDown:mt})),je=!!((d||c)&&!N),Dt=v.current?v.current.offsetWidth:0,kt=32,Ue=Dt/2-kt/2;return i.createElement(a.ZIndexContext.Provider,{value:ce},i.createElement(i.Fragment,null,i.createElement("button",{ref:v,id:I||ht,role:"button",type:"button","aria-disabled":o,"aria-expanded":h?y:void 0,"aria-haspopup":!!h,"aria-label":`${N||""} floatingactionbutton`,"aria-owns":h?he:void 0,"aria-activedescendant":Q>=0&&h?`${he}-${Q}`:void 0,tabIndex:a.getTabIndex($,o),accessKey:M,dir:xe,disabled:o,className:vt,style:S,onClick:He,onMouseDown:bt,onFocus:pt,onBlur:ft,onKeyDown:yt,...W},d||c?i.createElement(a.IconWrap,{className:"k-fab-icon",name:d,icon:c}):m?i.createElement("span",{role:"presentation",className:m}):null,N&&i.createElement("span",{className:"k-fab-text"},N)),_&&y&&i.createElement("div",{className:"k-overlay",style:{zIndex:ce,...p}}),i.createElement(pe.Popup,{ref:ke,anchor:v.current,show:y,animate:B.animate,popupClass:a.classNames("k-popup-transparent k-fab-popup",B.popupClass),anchorAlign:B.anchorAlign||nt(t,Y),popupAlign:B.popupAlign||at(t,Y),style:{boxShadow:"none"}},i.createElement("ul",{ref:De,role:"menu","aria-labelledby":I,id:he,className:a.classNames("k-fab-items",{"k-fab-items-bottom":t.vertical!=="bottom","k-fab-items-top":t.vertical==="bottom"}),style:{paddingLeft:je?Ue:void 0,paddingRight:je?Ue:void 0}},It))))});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:a.svgIconPropType,iconClass:s.string,text:s.string,alignOffset:s.shape({x:s.oneOfType([s.number,s.string]),y:s.oneOfType([s.number,s.string])}),align:s.shape({vertical:s.oneOf(["top","middle","bottom"]),horizontal:s.oneOf(["start","center","end"])}),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 q={align:{vertical:"bottom",horizontal:"end"},size:"medium",rounded:"full",themeColor:"primary",positionMode:"fixed"};Ie.displayName="KendoFloatingActionButton";const We=a.withIdHOC(te);We.displayName="KendoReactDropDownButton";const Le=a.withIdHOC(ee);Le.displayName="KendoReactSplitButton",f.Button=O,f.ButtonGroup=Be,f.Chip=z,f.ChipList=ie,f.DropDownButton=We,f.DropDownButtonClassComponent=te,f.DropDownButtonItem=ge,f.FloatingActionButton=Ie,f.FloatingActionButtonItem=ne,f.SplitButton=Le,f.SplitButtonClassComponent=ee,f.SplitButtonItem=be,f.Toolbar=ye,f.ToolbarItem=Me,f.ToolbarSeparator=Ge,f.ToolbarSpacer=ve,f.toolbarButtons=Pe,Object.defineProperty(f,Symbol.toStringTag,{value:"Module"})});
|
|
5
|
+
(function(f,C){typeof exports=="object"&&typeof module<"u"?C(exports,require("react"),require("prop-types"),require("@progress/kendo-react-common"),require("@progress/kendo-react-popup"),require("@progress/kendo-svg-icons")):typeof define=="function"&&define.amd?define(["exports","react","prop-types","@progress/kendo-react-common","@progress/kendo-react-popup","@progress/kendo-svg-icons"],C):(f=typeof globalThis<"u"?globalThis:f||self,C(f.KendoReactButtons={},f.React,f.PropTypes,f.KendoReactCommon,f.KendoReactPopup,f.KendoSvgIcons))})(this,function(f,C,qe,a,pe,Ne){"use strict";"use client";function Ke(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const l=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,l.get?l:{enumerable:!0,get:()=>e[t]})}}return n.default=e,Object.freeze(n)}const i=Ke(C),s=Ke(qe),F={name:"@progress/kendo-react-buttons",productName:"KendoReact",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:0,version:"",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"};function Ve({imageUrl:e,name:n,iconClass:t,svgIcon:l,imageAlt:r}){return e?i.createElement("img",{role:"presentation",className:"k-button-icon",alt:r,src:e}):n||l?i.createElement(a.IconWrap,{className:"k-button-icon",name:n,icon:l}):t?i.createElement("span",{role:"presentation",className:a.classNames("k-button-icon",t)}):null}const j=class extends i.Component{constructor(e){super(e),this._element=null,this.handleClick=n=>{this.toggleIfApplicable(),this.props.onClick&&this.props.onClick.call(void 0,n)},a.validatePackage(F),this.state={selected:this.props.togglable===!0&&this.props.selected===!0}}get element(){return this._element}get selected(){return this._selectedTemp!==void 0?this._selectedTemp:this.state.selected}static getDerivedStateFromProps(e,n){return e.togglable&&e.selected!==void 0&&e.selected!==n.selected?{selected:e.selected}:null}render(){const{children:e,togglable:n,icon:t,iconClass:l,svgIcon:r,imageUrl:o,imageAlt:d,className:u,onClick:m,size:I=j.defaultProps.size,rounded:h=j.defaultProps.rounded,fillMode:x=j.defaultProps.fillMode,themeColor:N=j.defaultProps.themeColor,...E}=this.props,K=r!==void 0||t!==void 0||l!==void 0||o!==void 0,S=e!==void 0,k=Ve({name:t,svgIcon:r,iconClass:l,imageUrl:o,imageAlt:d});return i.createElement("button",{ref:w=>this._element=w,"aria-pressed":n?this.state.selected:void 0,...E,onClick:this.handleClick,className:a.classNames("k-button",{[`k-button-${a.kendoThemeMaps.sizeMap[I]||I}`]:I,[`k-button-${x}`]:x,[`k-button-${x}-${N}`]:!!(x&&N),[`k-rounded-${a.kendoThemeMaps.roundedMap[h]||h}`]:h,"k-icon-button":!S&&K,"k-disabled":this.props.disabled,"k-selected":this.state.selected,"k-rtl":this.props.dir==="rtl"},this.props.className)},k,e&&i.createElement("span",{className:"k-button-text"},e))}toggleIfApplicable(){if(this.props.togglable&&this.props.selected===void 0){const e=!this.state.selected;this._selectedTemp=e,this.setState({selected:e},()=>this._selectedTemp=void 0)}}};let O=j;O.propTypes={children:s.node,selected:s.bool,togglable:s.bool,icon:s.string,svgIcon:a.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"]),themeColor:s.oneOf([null,"base","primary","secondary","tertiary","info","success","warning","error","dark","light","inverse"])},O.defaultProps={togglable:!1,size:"medium",rounded:"medium",fillMode:"solid",themeColor:"base"};const Ze={button:"k-button",flat:"k-flat",outline:"k-outline",clear:"k-button-clear",primary:"k-primary","state-selected":"k-selected","button-icon":"k-button-icon","button-icontext":"k-button-icontext","state-disabled":"k-disabled","group-start":"k-group-start","group-end":"k-group-end","button-group":"k-button-group","button-group-stretched":"k-button-group-stretched",ltr:"k-ltr",rtl:"k-rtl"},Se=":not(.k-dropdownlist button):not(.k-colorpicker button):not(.k-split-button .k-split-button-arrow)",Be=["button"+Se,".k-button-group > button"+Se,".k-colorpicker",".k-dropdownlist"],R={styles:Ze}.styles;class Pe extends i.Component{constructor(n){super(n),this._element=null,a.validatePackage(F)}render(){const n=this.mapButtons(this.props.children),t=a.classNames([R["button-group"]],{["k-disabled"]:this.props.disabled,[R["button-group-stretched"]]:!!this.props.width},this.props.className),l={className:t,style:{width:`${this.props.width}`},dir:this.props.dir,role:"group","aria-disabled":this.props.disabled};return i.createElement("div",{ref:r=>{this._element=r},...l,className:t},n)}mapButtons(n){const t=i.Children.count(n),l=this.props.dir!==void 0?this.props.dir==="rtl":this._element&&getComputedStyle(this._element).direction==="rtl"||!1;return i.Children.map(n,(r,o)=>i.isValidElement(r)?this.renderButton(r,o,o===t-1,l):r)}renderButton(n,t,l,r){const o=a.classNames(n.props.className,{[R["group-start"]]:r?l:t===0,[R["group-end"]]:r?t===0:l}),d={...this.props.width?{width:this.props.width}:{},...n.props.style||{}},u=this.props.disabled||n.props.disabled,m={...n.props,...o?{className:o}:{},...Object.keys(d).length?{style:d}:{},...u!==void 0?{disabled:u}:{}};return i.Children.count(n.props.children)>0?i.cloneElement(n,m,n.props.children):i.cloneElement(n,m)}}Pe.propTypes={children:s.oneOfType([s.arrayOf(s.element),s.element]),className:s.string,disabled:s.bool,width:s.string,dir:s.string};const fe=e=>{const n=i.useCallback(o=>{e.onClick(o,e.index)},[e]),t=e.dataItem.render||e.item||(e.item===void 0?e.render:null),l=e.dataItem.text!==void 0?e.dataItem.text:e.textField?e.dataItem[e.textField]:e.dataItem,r=i.createElement("li",{id:e.id,className:a.classNames("k-item",e.className,{"k-focus":e.focused}),tabIndex:-1,onClick:n,onMouseDown:e.onDown,onPointerDown:e.onDown,role:"menuitem","aria-disabled":e.dataItem.disabled||void 0},i.createElement("span",{tabIndex:-1,className:a.classNames("k-link k-menu-link",{"k-selected":e.dataItem.selected,"k-disabled":e.dataItem.disabled}),key:"icon"},t?i.createElement(t,{item:e.dataItem,itemIndex:e.index}):i.createElement(i.Fragment,null,(e.dataItem.icon||e.dataItem.iconClass)&&i.createElement(a.IconWrap,{className:e.dataItem.iconClass,name:e.dataItem.icon,icon:e.dataItem.svgIcon}),e.dataItem.imageUrl&&i.createElement("img",{role:"presentation",alt:"",src:e.dataItem.imageUrl,className:"k-icon"}),l&&i.createElement("span",{className:"k-menu-link-text"},l))));return e.item!==void 0&&e.render!==void 0?e.render.call(void 0,r,e):r};fe.displayName="KendoReactButtonItem";class be extends i.Component{render(){return null}}be.propTypes={text:s.string,icon:s.string,iconClass:s.string,imageUrl:s.string,disabled:s.bool,render:s.any};const Ce=(e,n,t,l)=>{if(t)return e;const r=Math.min(l-1,Math.max(0,e));switch(n){case a.Keys.enter:case a.Keys.space:case a.Keys.esc:return-1;case a.Keys.up:case a.Keys.left:return r-1<0?l-1:r-1;case a.Keys.down:case a.Keys.right:return r+1>=l?0:r+1;case a.Keys.home:return 0;case a.Keys.end:return l-1;default:return e}};function Fe(e){let n={horizontal:"left",vertical:"bottom"};return e&&(n.horizontal="right"),n}function ze(e){let n={horizontal:"left",vertical:"top"};return e&&(n.horizontal="right"),n}let ee=class extends i.Component{constructor(n){super(n),this.state={focused:!1,focusedIndex:-1,opened:!1},this.wrapper=null,this.mainButton=null,this.list=null,this.skipFocus=!1,this.buttonsData=[],this.onKeyDown=t=>{const{focusedIndex:l}=this.state;if(t.altKey){!this.opened&&t.keyCode===a.Keys.down?(this.dispatchPopupEvent(t,!0),this.setState({focusedIndex:0}),this.setOpen(!0)):this.opened&&t.keyCode===a.Keys.up&&(this.setState({focusedIndex:-1}),this.setOpen(!1));return}let r;if(t.keyCode===a.Keys.enter||t.keyCode===a.Keys.space){if(t.preventDefault(),this.dispatchClickEvent(t,l),l>=0){r={focusedIndex:this.opened?-1:0};const o=!this.opened;this.setOpen(o),o&&this.dispatchPopupEvent(t,o)}}else if(this.opened&&t.keyCode===a.Keys.esc){this.setState({focusedIndex:-1}),this.setOpen(!1);return}if(this.opened){const o=Ce(l,t.keyCode,t.altKey,this.buttonsData.length);o!==l&&(r=r||{},r.focusedIndex=o);const d=t.keyCode===a.Keys.up||t.keyCode===a.Keys.down||t.keyCode===a.Keys.left||t.keyCode===a.Keys.right;!t.altKey&&(d||t.keyCode===a.Keys.home||t.keyCode===a.Keys.end)&&t.preventDefault()}r&&this.setState(r)},this.switchFocus=t=>{this.skipFocus=!0,t(),window.setTimeout(()=>this.skipFocus=!1,0)},this.onFocus=t=>{this.skipFocus||(a.dispatchEvent(this.props.onFocus,t,this,void 0),this.setState({focused:!0}))},this.setOpen=t=>{this.openedDuringOnChange=t,this.setState({opened:t})},this.onItemClick=(t,l)=>{this.opened&&(this.setState({focusedIndex:0}),this.setOpen(!1)),this.dispatchClickEvent(t,l)},this.onBlur=t=>{this.skipFocus||(this.setState({focused:!1,focusedIndex:-1}),this.setOpen(!1),a.dispatchEvent(this.props.onBlur,t,this,void 0))},this.onPopupClose=()=>{this.state.focused&&this.switchFocus(()=>{this.element&&(this.element.removeAttribute("tabindex"),this.element.focus({preventScroll:!0}))}),this.dispatchPopupEvent({},!1)},this.listRef=t=>{this.list=t,t&&this.state.focused&&this.switchFocus(()=>{t.focus({preventScroll:!0}),this.element&&(this.element.tabIndex=-1)})},this.onSplitPartClick=t=>{if(this.buttonsData.length){const l=!this.opened;l&&this.dispatchPopupEvent(t,l),this.setState({focusedIndex:l?0:-1,focused:!0}),this.setOpen(l)}},this.onDownSplitPart=t=>{t.preventDefault();const l=a.getActiveElement(document);this.element&&l!==this.element&&l!==this.list&&this.element.focus()},this.onItemDown=t=>{a.getActiveElement(document)===this.list&&t.preventDefault()},this.dispatchPopupEvent=(t,l)=>{a.dispatchEvent(l?this.props.onOpen:this.props.onClose,t,this,void 0),this.openedDuringOnChange=void 0},a.validatePackage(F)}get guid(){return this.props.id?this.props.id+"-accessibility-id":this.props.id}get opened(){return this.openedDuringOnChange!==void 0?this.openedDuringOnChange:this.props.opened===void 0?this.state.opened:this.props.opened}render(){this.buttonsData=this.props.items||i.Children.toArray(this.props.children).filter(u=>u&&u.type===be).map(u=>u.props);const n=this.isRtl(),t=n?"rtl":void 0,{id:l,style:r,tabIndex:o,disabled:d}=this.props;return i.createElement("div",{id:l,style:r,className:a.classNames("k-split-button","k-button-group",{"k-focus":this.state.focused},`k-rounded-${a.kendoThemeMaps.roundedMap[this.props.rounded||"medium"]}`,this.props.className),onKeyDown:this.onKeyDown,onFocus:this.onFocus,onBlur:this.onBlur,dir:t,ref:u=>this.wrapper=u},i.createElement(O,{ref:u=>this.mainButton=u&&u.element,type:"button",size:this.props.size,rounded:this.props.rounded,fillMode:this.props.fillMode,themeColor:this.props.themeColor,onClick:u=>this.onItemClick(u,-1),disabled:d||void 0,tabIndex:o,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":d,"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),i.createElement(O,{type:"button",size:this.props.size,rounded:this.props.rounded,fillMode:this.props.fillMode,themeColor:this.props.themeColor,icon:"caret-alt-down",svgIcon:Ne.caretAltDownIcon,className:"k-split-button-arrow",disabled:d||void 0,tabIndex:-1,onClick:this.onSplitPartClick,onMouseDown:this.onDownSplitPart,onPointerDown:this.onDownSplitPart,dir:t,"aria-label":"menu toggling button"}),this.renderPopup(n))}componentDidMount(){(this.props.dir===void 0&&this.isRtl()||this.opened)&&this.forceUpdate()}get element(){return this.mainButton}dispatchClickEvent(n,t){this.isItemDisabled(t)||(t===-1?a.dispatchEvent(this.props.onButtonClick,n,this,void 0):a.dispatchEvent(this.props.onItemClick,n,this,{item:this.buttonsData[t],itemIndex:t}))}renderPopup(n){const{popupSettings:t={}}=this.props,{focusedIndex:l}=this.state;return i.createElement(pe.Popup,{anchor:this.wrapper,show:this.opened,animate:t.animate,popupClass:a.classNames("k-menu-popup",t.popupClass),anchorAlign:t.anchorAlign||Fe(n),popupAlign:t.popupAlign||ze(n),style:n?{direction:"rtl"}:void 0,onClose:this.onPopupClose},i.createElement("ul",{role:"menu",id:this.guid,"aria-labelledby":"button-"+this.guid,tabIndex:-1,ref:this.listRef,"aria-activedescendant":l>=0?`${this.guid}-${l}`:void 0,className:a.classNames("k-group k-menu-group k-reset",{[`k-menu-group-${a.kendoThemeMaps.sizeMap[this.props.size]||this.props.size}`]:this.props.size})},this.renderChildItems()))}renderChildItems(){const{item:n,itemRender:t,textField:l}=this.props;return this.buttonsData.length>0?this.buttonsData.map((r,o)=>i.createElement(fe,{className:"k-menu-item",dataItem:r,textField:l,focused:this.state.focusedIndex===o,onClick:this.onItemClick,onDown:this.onItemDown,render:t,item:n,key:o,index:o,id:`${this.guid}-${o}`})):null}isItemDisabled(n){return this.buttonsData[n]?this.buttonsData[n].disabled:this.props.disabled}isRtl(){return this.props.dir!==void 0?this.props.dir==="rtl":!!this.wrapper&&getComputedStyle(this.wrapper).direction==="rtl"}};ee.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:a.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},ee.defaultProps={size:"medium",rounded:"medium",fillMode:"solid",themeColor:"base"};class ge extends i.Component{render(){return null}}ge.propTypes={text:s.string,icon:s.string,iconClass:s.string,imageUrl:s.string,selected:s.bool,disabled:s.bool,render:s.any};let te=class extends i.Component{constructor(n){super(n),this.state={opened:!1,focused:!1,focusedIndex:-1},this.mainButton=null,this.list=null,this.skipFocus=!1,this.buttonsData=[],this.onKeyDown=t=>{const{focusedIndex:l}=this.state;if(t.altKey){!this.opened&&t.keyCode===a.Keys.down?(this.setOpen(!0),this.dispatchPopupEvent(t,!0),this.setState({focusedIndex:0})):this.opened&&t.keyCode===a.Keys.up&&(this.setState({focusedIndex:-1}),this.setOpen(!1));return}const r={...this.state};if(t.keyCode===a.Keys.enter||t.keyCode===a.Keys.space){l>=0&&this.dispatchClickEvent(t,l);const o=!this.opened;this.setState({focused:!0,focusedIndex:o?0:-1}),this.setOpen(o),o&&this.dispatchPopupEvent(t,o);return}if(this.opened&&t.keyCode===a.Keys.esc){this.setState({focusedIndex:-1}),this.setOpen(!1);return}if(this.opened){const o=Ce(l,t.keyCode,t.altKey,this.buttonsData.length);r.focusedIndex=o;const d=t.keyCode===a.Keys.up||t.keyCode===a.Keys.down||t.keyCode===a.Keys.left||t.keyCode===a.Keys.right;!t.altKey&&(d||t.keyCode===a.Keys.home||t.keyCode===a.Keys.end)&&t.preventDefault()}this.setState(r)},this.switchFocus=t=>{this.skipFocus=!0,t(),window.setTimeout(()=>this.skipFocus=!1,0)},this.handleFocus=t=>{this.skipFocus||(this.setState({focused:!0,focusedIndex:this.opened?0:-1}),a.dispatchEvent(this.props.onFocus,t,this,void 0))},this.handleButtonBlur=t=>{this.opened||(this.setState({focused:!1}),a.dispatchEvent(this.props.onBlur,t,this,void 0))},this.handleMenuBlur=t=>{this.skipFocus||(this.setState({focused:!1,focusedIndex:-1}),this.setOpen(!1),a.dispatchEvent(this.props.onBlur,t,this,void 0))},this.setOpen=t=>{this.openedDuringOnChange=t,this.setState({opened:t})},this.onItemClick=(t,l)=>{this.setState({focusedIndex:-1}),this.setOpen(!1),this.dispatchClickEvent(t,l)},this.onItemDown=t=>{a.getActiveElement(document)===this.list&&t.preventDefault()},this.mouseDown=t=>{t.preventDefault();const l=a.getActiveElement(document);this.element&&l!==this.element&&l!==this.list&&this.element.focus()},this.onPopupClose=()=>{this.switchFocus(()=>{this.element&&(this.element.removeAttribute("tabindex"),this.element.focus({preventScroll:!0}))}),this.dispatchPopupEvent({},!1)},this.listRef=t=>{this.list=t,t&&this.state.focused&&this.switchFocus(()=>{t.focus({preventScroll:!0}),this.element&&(this.element.tabIndex=-1)})},this.onClickMainButton=t=>{if(!this.buttonsData.length)return;const l=!this.opened;this.setState({focused:!0,focusedIndex:l?0:-1}),this.setOpen(l),l&&this.dispatchPopupEvent(t,l)},this.dispatchPopupEvent=(t,l)=>{a.dispatchEvent(l?this.props.onOpen:this.props.onClose,t,this,void 0),this.openedDuringOnChange=void 0},a.validatePackage(F)}get guid(){return this.props.id+"-accessibility-id"}get opened(){return this.openedDuringOnChange!==void 0?this.openedDuringOnChange:this.props.opened===void 0?this.state.opened:this.props.opened}render(){const n=this.isRtl(),t=n?"rtl":void 0,{id:l,style:r,tabIndex:o,disabled:d}=this.props;return this.buttonsData=this.props.items||i.Children.toArray(this.props.children).filter(u=>u&&u.type===ge).map(u=>u.props),i.createElement(i.Fragment,null,i.createElement(O,{id:l,size:this.props.size,style:r,rounded:this.props.rounded,fillMode:this.props.fillMode,themeColor:this.props.themeColor,onClick:this.onClickMainButton,onMouseDown:this.mouseDown,onKeyDown:this.onKeyDown,onFocus:this.handleFocus,onBlur:this.handleButtonBlur,"aria-disabled":d?"true":void 0,tabIndex:o,accessKey:this.props.accessKey,icon:this.props.icon,svgIcon:this.props.svgIcon,iconClass:this.props.iconClass,className:a.classNames(this.props.buttonClass,"k-menu-button","k-dropdown-button",{"k-focus":this.state.focused},{"k-disabled":d}),imageUrl:this.props.imageUrl,dir:t,ref:u=>this.mainButton=u&&u.element,type:"button","aria-haspopup":"menu","aria-expanded":this.opened?"true":"false","aria-label":this.props.ariaLabel,"aria-controls":this.opened?this.guid:void 0,title:this.props.title},this.props.text),this.renderPopup(n))}componentDidMount(){(this.props.dir===void 0&&this.isRtl()||this.opened)&&this.forceUpdate()}get element(){return this.mainButton}dispatchClickEvent(n,t){this.isItemDisabled(t)||a.dispatchEvent(this.props.onItemClick,n,this,{item:this.buttonsData[t],itemIndex:t})}renderPopup(n){const{popupSettings:t={},id:l}=this.props,{focusedIndex:r}=this.state;return i.createElement(pe.Popup,{anchor:this.mainButton,show:this.opened,animate:t.animate,popupClass:a.classNames("k-menu-popup",t.popupClass),anchorAlign:t.anchorAlign||Fe(n),popupAlign:t.popupAlign||ze(n),style:n?{direction:"rtl"}:void 0,onClose:this.onPopupClose},i.createElement("ul",{role:"menu",id:this.guid,"aria-labelledby":l,tabIndex:-1,"aria-activedescendant":r>=0?`${this.guid}-${r}`:void 0,ref:this.listRef,onKeyDown:this.onKeyDown,onBlur:this.handleMenuBlur,className:a.classNames("k-group k-menu-group k-reset",{[`k-menu-group-${a.kendoThemeMaps.sizeMap[this.props.size]||this.props.size}`]:this.props.size})},this.renderChildItems()))}renderChildItems(){const{item:n,itemRender:t,textField:l}=this.props;return this.buttonsData.length>0?this.buttonsData.map((r,o)=>i.createElement(fe,{className:"k-menu-item",dataItem:r,textField:l,focused:this.state.focusedIndex===o,onClick:this.onItemClick,onDown:this.onItemDown,render:t,item:n,index:o,key:o,id:`${this.guid}-${o}`})):null}isItemDisabled(n){return this.buttonsData[n]?this.buttonsData[n].disabled:this.props.disabled}isRtl(){return this.props.dir!==void 0?this.props.dir==="rtl":!!this.mainButton&&getComputedStyle(this.mainButton).direction==="rtl"}};te.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:a.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},te.defaultProps={size:"medium",rounded:"medium",fillMode:"solid",themeColor:"base"};const me=class extends i.Component{constructor(e){super(e),this._element=null,this.offsetHeight=0,this.offsetWidth=0,this.buttons=[],this.focusedSelector=this.selectors.map(n=>n+":focus").join(","),this.setTabIndex=n=>{const{tabIndex:t=me.defaultProps.tabIndex}=this.props;this.buttons.forEach((l,r)=>{l.tabIndex=r===n?t:-1})},this.onKeyDown=n=>{const t=n.target;if(!(n.keyCode===a.Keys.left||n.keyCode===a.Keys.right)||n.defaultPrevented||this.buttons.findIndex(o=>o===t)===-1)return;const r=this.focusedIndex;n.keyCode===a.Keys.left?this.focusButton(r,r-1):this.focusButton(r,r+1)},this.onWindowResize=n=>{const t=this.element;if(!t)return;const l=t.offsetWidth,r=t.offsetHeight;if(this.offsetWidth!==l||this.offsetHeight!==r){this.offsetWidth=l,this.offsetHeight=r;const o={offsetWidth:this.offsetWidth,offsetHeight:this.offsetHeight};this.props.onResize&&this.props.onResize.call(void 0,{target:this,...o,nativeEvent:n})}},a.validatePackage(F)}get selectors(){return this.props.buttons||Be}get focusedIndex(){const e=this.element&&this.element.querySelector(this.focusedSelector);return Math.max(0,this.buttons.findIndex(n=>n===e))}get element(){return this._element}componentDidMount(){window.addEventListener("resize",this.onWindowResize);const e=this.element;e&&(this.offsetWidth=e.offsetWidth,this.offsetHeight=e.offsetHeight,this.props.keyboardNavigation!==!1&&(this.buttons=Array.from(e.querySelectorAll(this.selectors.join(","))),this.setTabIndex(0)))}componentDidUpdate(){const e=this.element;!e||this.props.keyboardNavigation===!1||(this.buttons=Array.from(e.querySelectorAll(this.selectors.join(","))),this.setTabIndex(this.focusedIndex))}componentWillUnmount(){window.removeEventListener("resize",this.onWindowResize),this.buttons.length=0}render(){return i.createElement("div",{id:this.props.id,"aria-label":this.props.ariaLabel,className:a.classNames("k-toolbar",{[`k-toolbar-${a.kendoThemeMaps.sizeMap[this.props.size]||this.props.size}`]:this.props.size},this.props.className),style:this.props.style,role:this.props.role!==void 0?this.props.role||void 0:"toolbar",dir:this.props.dir,ref:e=>this._element=e,onKeyDown:this.props.keyboardNavigation!==!1?this.onKeyDown:void 0},this.props.children)}focusButton(e,n){const{tabIndex:t=me.defaultProps.tabIndex}=this.props,l=this.buttons[n];if(l){l.tabIndex=t,l.focus();const r=this.buttons[e];r&&(r.tabIndex=-1)}}};let ye=me;ye.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),size:s.oneOf([null,"small","medium","large"])},ye.defaultProps={tabIndex:0,size:"medium"};class Me extends i.PureComponent{constructor(){super(...arguments),this._element=null}get element(){return this._element}render(){return i.createElement("div",{id:this.props.id,className:a.classNames("k-toolbar-item",this.props.className),style:this.props.style,ref:n=>this._element=n},this.props.children)}}Me.propTypes={className:s.string};class Ge extends i.PureComponent{render(){return i.createElement("div",{className:a.classNames("k-separator",this.props.className)})}}const ve=i.forwardRef((e,n)=>{const t=i.useRef(null),l=i.useRef(null);i.useImperativeHandle(l,()=>({element:t.current})),i.useImperativeHandle(n,()=>({element:t.current}));const r=i.useMemo(()=>a.classNames("k-spacer",e.className),[e.className]);return i.createElement("span",{ref:t,className:r})});ve.displayName="KendoReactToolbarSpacer",ve.propTypes={className:s.string};const Te=C.createContext([null,e=>{}]),Oe=C.createContext([null,e=>{}]),Ae=C.createContext([null,e=>{}]);var U=(e=>(e.next="next",e.prev="prev",e.current="current",e.reset="reset",e))(U||{});const Xe=(e,n)=>{const t=n.items.findIndex(l=>l===e);switch(n.type){case"next":return t===n.items.length-1?e:n.items[t+1];case"prev":return t===0?e:n.items[t-1];case"current":return n.payload;case"reset":return null;default:return e}};var $e=(e=>(e.remove="remove",e.add="add",e.reorder="reorder",e))($e||{});const Je=(e,n)=>{switch(n.type){case"add":break;case"remove":return e.filter(t=>t[n.valueField]!==n.payload);case"reorder":break;default:return e}};var se=(e=>(e.toggle="toggle",e.remove="remove",e))(se||{});const Qe=(e,n)=>{switch(n.selection){case"single":switch(n.type){case"toggle":{if(!Array.isArray(e)||e===null)return n.payload===e?null:n.payload;throw new Error("State cannot be an array in single selection")}case"remove":return n.payload===e?null:e;default:return e}case"multiple":switch(n.type){case"toggle":{if(Array.isArray(e))return e.some(t=>t===n.payload)?e.filter(t=>t!==n.payload):[...e,n.payload];if(e===null)return[n.payload];throw new Error("State cannot be non-array in multiple selection")}case"remove":return Array.isArray(e)?e.some(t=>t===n.payload)?e.filter(t=>t!==n.payload):[...e,n.payload]:e;default:return e}case"none":return null;default:return e}},z=i.forwardRef((e,n)=>{a.validatePackage(F);const t=i.useRef(null),l=i.useRef(null),r=a.useDir(l,e.dir);i.useImperativeHandle(t,()=>({element:l.current,props:e})),i.useImperativeHandle(n,()=>t.current);const[o,d]=i.useContext(Te),[u,m]=i.useContext(Oe),[,I]=i.useContext(Ae),h=i.useMemo(()=>e.selected||(Array.isArray(o)?o.some(p=>p===e.value):o===e.value),[e.selected,e.value,o]),x=i.useMemo(()=>u===e.value,[e.value,u]);i.useEffect(()=>{x&&l.current&&l.current.focus()},[x]);const N=i.useCallback(p=>{d({type:se.toggle,payload:e.value,event:p})},[d,e.value]),E=i.useCallback(p=>{e.removable&&(I({type:$e.remove,payload:e.value,event:p}),m({type:U.reset,payload:e.value,event:p}),d({type:se.remove,payload:e.value,event:p}),e.onRemove&&e.onRemove.call(void 0,{target:t.current,syntheticEvent:p}))},[e.onRemove,e.value,e.removable,I,m,d]),K=i.useCallback(p=>{switch(p.keyCode){case a.Keys.left:m({type:U.prev,payload:e.value,event:p});break;case a.Keys.right:m({type:U.next,payload:e.value,event:p});break;case a.Keys.enter:d({type:se.toggle,payload:e.value,event:p});break;case a.Keys.delete:E(p);break}e.onKeyDown&&e.onKeyDown.call(void 0,{target:t.current,syntheticEvent:p})},[e.onKeyDown,e.value,m,d,E]),S=i.useCallback(p=>{m({payload:e.value,type:U.current,event:p}),e.onFocus&&e.onFocus.call(void 0,{target:t.current,syntheticEvent:p})},[e.onFocus,e.value,m]),k=i.useCallback(p=>{e.onBlur&&e.onBlur.call(void 0,{target:t.current,syntheticEvent:p})},[e.onBlur]),w=a.useMouse(e,t,{onClick:N});return i.createElement("div",{...w,role:e.role||"button",id:e.value,style:e.style,ref:l,dir:r,tabIndex:a.getTabIndex(e.tabIndex,e.disabled,void 0),className:a.classNames("k-chip",{"k-rtl":r==="rtl","k-disabled":e.disabled,"k-selected":h,"k-focus":x,[`k-chip-${a.kendoThemeMaps.sizeMap[e.size]||e.size}`]:e.size,[`k-rounded-${a.kendoThemeMaps.roundedMap[e.rounded]||e.rounded}`]:e.rounded,[`k-chip-${e.fillMode}`]:e.fillMode,[`k-chip-${e.fillMode}-${e.themeColor}`]:!!(e.fillMode&&e.themeColor)},e.className),"aria-pressed":e.role?void 0:h,"aria-disabled":e.disabled,"aria-describedby":e.ariaDescribedBy,"aria-keyshortcuts":e.removable?"Enter Delete":void 0,onFocus:S,onBlur:k,onKeyDown:K},h&&(e.selectedIcon||e.selectedSvgIcon)&&i.createElement(a.IconWrap,{className:"k-chip-icon",name:e.selectedIcon?a.toIconName(e.selectedIcon):void 0,icon:e.selectedSvgIcon,size:"small"}),(e.icon||e.svgIcon)&&i.createElement(a.IconWrap,{className:"k-chip-icon",name:e.icon?a.toIconName(e.icon):void 0,icon:e.svgIcon,size:"small"}),e.avatar&&i.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},i.createElement("span",{className:"k-avatar-image"},i.createElement("img",{src:e.avatar.image,alt:e.avatar.imageAlt}))),i.createElement("span",{className:"k-chip-content"},e.children!==void 0?e.children:e.text&&i.createElement("span",{"aria-label":e.ariaLabel||e.text,className:"k-chip-label"},e.text)),e.removable&&i.createElement("span",{className:"k-chip-actions"},i.createElement("span",{className:a.classNames("k-chip-action","k-chip-remove-action"),onClick:E},i.createElement(a.IconWrap,{name:e.removeIcon?a.toIconName(e.removeIcon):void 0,icon:e.removeSvgIcon||Ne.xCircleIcon,size:"small"}))))}),Ye={id:s.string,text:s.string,value:s.any,dir:s.oneOf(["ltr","rtl"]),removable:s.bool,removeIcon:s.string,removeIconSvg:a.svgIconPropType,disabled:s.bool,icon:s.string,svgIcon:a.svgIconPropType,selectedIcon:s.string,selectedIconSvg:a.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"])},Re={disabled:!1,removable:!1,removeIcon:"k-i-x-circle",dir:"ltr",size:"medium",rounded:"medium",fillMode:"solid",themeColor:"base"};z.displayName="KendoReactChip",z.propTypes=Ye,z.defaultProps=Re;const et=(e,n,t)=>{const[l,r]=i.useState(e);return[l,d=>{const u=Qe(n.state||l,{...d,...n});t&&t(u,d.event),r(u)}]},tt=e=>{const[n,t]=i.useState(null);return[n,r=>{const o=Xe(r.payload,{...r,...e});t(o)}]},st=(e,n,t)=>{const[l,r]=i.useState(e);return[l,d=>{const u=Je(n.state||l,{...d,...n});t&&t(u,d.event),r(u)}]},ie=i.forwardRef((e,n)=>{a.validatePackage(F);const t=i.useRef(null),l=i.useRef(null),r=a.useDir(l,e.dir),{chip:o,id:d,style:u,tabIndex:m,disabled:I,size:h,className:x,ariaDescribedBy:N,ariaLabelledBy:E,ariaLabel:K,selection:S=A.selection,value:k=A.defaultValue,defaultData:w=A.defaultData,valueField:p=A.valueField,textField:$=A.textField,onChange:M,onDataChange:P}=e,_=i.useMemo(()=>o||z,[o,z]);i.useImperativeHandle(t,()=>({element:l.current,props:e})),i.useImperativeHandle(n,()=>t.current);const T=i.useCallback((b,y)=>{M&&t.current&&M.call(void 0,{value:b,target:t.current,syntheticEvent:y})},[M]),[V,Z]=et(k,{selection:S,state:k},T),le=i.useCallback((b,y)=>{P&&t.current&&P.call(void 0,{value:b,target:t.current,syntheticEvent:y})},[P]),[G,re]=st(e.data||w,{state:e.data,valueField:p},le),X=i.useCallback((b,y)=>(b.push(y[p]),b),[p]),W=i.useMemo(()=>e.data||G,[e.data,G]),oe=i.useMemo(()=>k||V,[k,V]),ue=i.useMemo(()=>W.reduce(X,[]),[W,X]),J=i.useCallback(b=>a.getter(p)(b),[p]),v=i.useCallback(b=>a.getter($)(b),[$]),[De,ke]=tt({items:ue}),ce=a.useMouse(e,t);return i.createElement(Te.Provider,{value:[oe,Z]},i.createElement(Oe.Provider,{value:[De,ke]},i.createElement(Ae.Provider,{value:[W,re]},i.createElement("div",{ref:l,...ce,role:I?void 0:"listbox",id:d,dir:r,style:u,tabIndex:a.getTabIndex(m,I,void 0),className:a.classNames("k-chip-list",{"k-rtl":r==="rtl","k-disabled":I,[`k-chip-list-${a.kendoThemeMaps.sizeMap[h]||h}`]:h},x),"aria-label":K,"aria-labelledby":E,"aria-describedby":N,"aria-orientation":"horizontal","aria-multiselectable":S==="multiple"},W.map((b,y)=>i.createElement(_,{role:"option",dataItem:b,size:h,key:[J(b),y].join("-"),text:v(b),value:J(b),ariaLabel:b.ariaLabel,svgIcon:b.svgIcon||void 0}))))))}),it={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"])},A={chip:z,size:"medium",disabled:!1,defaultValue:null,defaultData:[],dir:"ltr",selection:"none",textField:"text",valueField:"value",removable:"removable"};ie.displayName="KendoReactChipList",ie.propTypes=it,ie.defaultProps=A;const ne=i.forwardRef((e,n)=>{const{className:t,disabled:l,text:r,icon:o,style:d,id:u,focused:m,tabIndex:I,index:h,dataItem:x,item:N,svgIcon:E,onDown:K,onClick:S,...k}=e,w=i.useRef(null),p=i.useCallback(()=>{w.current&&w.current.focus()},[]),$=i.useCallback(()=>({element:w.current,focus:p}),[p]);i.useImperativeHandle(n,$);const M=i.useCallback(T=>{S&&h!==void 0&&!l&&S(T,h)},[S,h]),P=i.useMemo(()=>a.classNames("k-fab-item",{"k-focus":m,"k-disabled":l},t),[t,l,m]),_=N;return i.createElement("li",{ref:w,id:u,className:P,style:d,role:"menuitem",tabIndex:a.getTabIndex(I,l),"aria-disabled":l,"aria-label":`${r||""} floatingactionbutton item`,onClick:M,onMouseDown:K,onPointerDown:K,...k},_?i.createElement(_,{itemIndex:h,item:x}):i.createElement(i.Fragment,null,r&&i.createElement("span",{className:"k-fab-item-text"},r),o||E?i.createElement(a.IconWrap,{className:"k-fab-item-icon",name:o,icon:E}):null))});ne.propTypes={className:s.string,style:s.object,children:s.any,disabled:s.bool,focused:s.bool,index:s.number,icon:s.string,svgIcon:a.svgIconPropType,text:s.string,tabIndex:s.number,customProp:s.any},ne.displayName="KendoFloatingActionButtonItem";const _e="16px",ae=e=>typeof e=="number"?e+"px":e,nt=(e,n)=>{const t={horizontal:n?"right":"left",vertical:"bottom"};return e.horizontal==="end"&&(t.horizontal=n?"left":"right"),t},at=(e,n)=>{const t={horizontal:n?"right":"left",vertical:"top"};return e.horizontal==="end"&&(t.horizontal=n?"left":"right"),t},lt=(e,n)=>{const t=n==="end"?"end":"start";return{rtl:{end:"k-text-left",start:"k-text-right"},ltr:{start:"k-text-left",end:"k-text-right"}}[e][t]},rt=(e,n,t,l)=>{const r=n.horizontal,o=n.vertical;if(e.current){const d=t&&t.x!==void 0?ae(t.x):_e,u=t&&t.x!==void 0?`calc(50% + ${ae(t.x)})`:"50%",m=t&&t.y!==void 0?ae(t.y):_e,I=t&&t.y!==void 0?`calc(50% + ${ae(t.y)})`:"50%";e.current.style.setProperty(ot(n,l),r==="center"?u:d),e.current.style.setProperty(ut(n),o==="middle"?I:m),l&&((o==="top"||o==="bottom")&&r==="start"&&e.current.style.setProperty("left","unset"),o==="middle"&&r==="end"&&e.current.style.setProperty("right","unset"),o==="middle"&&r==="start"&&e.current.style.setProperty("left","unset"))}},ot=(e,n)=>{const{horizontal:t}=e;return{end:n?"left":"right",center:"left",start:n?"right":"left"}[t||"end"]},ut=e=>({top:"top",middle:"top",bottom:"bottom"})[e.vertical||"bottom"],ct=2,dt=100,Ie=i.forwardRef((e,n)=>{a.validatePackage(F);const{align:t=q.align,alignOffset:l,className:r,disabled:o,icon:d,svgIcon:u,iconClass:m,id:I,items:h,item:x,text:N,positionMode:E=q.positionMode,size:K=q.size,style:S,rounded:k=q.rounded,themeColor:w=q.themeColor,overlayStyle:p,tabIndex:$,accessKey:M,popupSettings:P={},modal:_,onClick:T,onItemClick:V,onFocus:Z,onBlur:le,onKeyDown:G,onOpen:re,onClose:X,...W}=e,oe=a.useZIndexContext(),ue=oe?oe+ct:dt,J=i.useRef(null),v=i.useRef(null),De=i.useRef(null),ke=i.useRef(null),ce=i.useCallback(()=>{v.current&&v.current.focus()},[]),b=i.useCallback(()=>({element:v.current,focus:ce}),[ce]);i.useImperativeHandle(J,b),i.useImperativeHandle(n,()=>J.current);const[y,B]=i.useState(!1),[de,L]=i.useState(!1),[Q,D]=i.useState(-1),ht=a.useId()+"-button-id",xe=a.useDir(v,e.dir),Y=xe==="rtl",he=a.useId()+"-list-id";i.useEffect(()=>{rt(v,t,l,Y)},[v,t,l,Y]),i.useEffect(()=>{de&&v&&v.current&&v.current.focus()},[de,v]);const H=i.useCallback((c,g)=>{h&&a.dispatchEvent(g?re:X,c,b(),void 0)},[re,X,h]),He=i.useCallback(c=>{!c.target||o||(!h&&T?a.dispatchEvent(T,c,b(),void 0):(B(!y),L(!0),D(y?-1:0),H(c,!y)))},[B,L,D,T,H,y,h,o]),pt=i.useCallback(c=>{L(!0),D(y?0:-1),Z&&a.dispatchEvent(Z,c,b(),void 0)},[Z,L,D]),ft=i.useCallback(c=>{L(!1),B(!1),D(-1),a.dispatchEvent(le,c,b(),void 0),y&&H(c,!1)},[le,L,B,D,H]),bt=i.useCallback(c=>{c.preventDefault()},[]),Ee=i.useCallback((c,g)=>{h&&(h[g].disabled||a.dispatchEvent(V,c,b(),{itemProps:h[g],itemIndex:g}))},[V]),gt=i.useCallback((c,g)=>{!c.target||!h||(D(g),B(!1),Ee(c,g),H(c,!1))},[D,B,Ee,H]),mt=i.useCallback(c=>{a.getActiveElement(document)===v.current&&c.preventDefault()},[v]),yt=i.useCallback(c=>{const g=Q,we=h?h.length:-1;if(c.altKey){!y&&c.keyCode===a.Keys.down&&(c.preventDefault(),B(!0),D(0)),y&&c.keyCode===a.Keys.up&&(c.preventDefault(),B(!1),D(-1));return}switch(c.keyCode){case a.Keys.enter:case a.Keys.space:g>=0&&Ee(c,g),h||He(c),c.preventDefault(),B(!y),D(y?-1:0);break;case a.Keys.esc:c.preventDefault(),B(!1),D(-1);break;case a.Keys.home:c.preventDefault(),D(0);break;case a.Keys.end:c.preventDefault(),D(we-1);break;case a.Keys.down:case a.Keys.right:c.preventDefault(),D(g+1>=we?0:g+1);break;case a.Keys.up:case a.Keys.left:c.preventDefault(),D(g-1<0?we-1:g-1);break}a.dispatchEvent(G,c,b(),void 0)},[G,Q,D,Y,B]),vt=i.useMemo(()=>a.classNames("k-fab k-fab-solid",{"k-fab-sm":K==="small","k-fab-md":K==="medium","k-fab-lg":K==="large","k-disabled":o,"k-pos-absolute":E==="absolute","k-pos-fixed":E==="fixed","k-focus":de,[`k-rounded-${a.kendoThemeMaps.roundedMap[k]||k}`]:k,[`k-fab-solid-${w}`]:w},`k-${t.vertical}-${t.horizontal}`,r),[w,K,k,o,E,t,de,r]),It=h&&h.map((c,g)=>i.createElement(ne,{...c,key:g,index:g,id:`${he}-${g}`,disabled:o||c.disabled,focused:Q===g,dataItem:c,item:x,className:a.classNames(c.className,lt(xe||"ltr",t.horizontal)),onClick:gt,onDown:mt})),je=!!((d||u)&&!N),Dt=v.current?v.current.offsetWidth:0,kt=32,Ue=Dt/2-kt/2;return i.createElement(a.ZIndexContext.Provider,{value:ue},i.createElement(i.Fragment,null,i.createElement("button",{ref:v,id:I||ht,role:"button",type:"button","aria-disabled":o,"aria-expanded":h?y:void 0,"aria-haspopup":!!h,"aria-label":`${N||""} floatingactionbutton`,"aria-owns":h?he:void 0,"aria-activedescendant":Q>=0&&h?`${he}-${Q}`:void 0,tabIndex:a.getTabIndex($,o),accessKey:M,dir:xe,disabled:o,className:vt,style:S,onClick:He,onMouseDown:bt,onFocus:pt,onBlur:ft,onKeyDown:yt,...W},d||u?i.createElement(a.IconWrap,{className:"k-fab-icon",name:d,icon:u}):m?i.createElement("span",{role:"presentation",className:m}):null,N&&i.createElement("span",{className:"k-fab-text"},N)),_&&y&&i.createElement("div",{className:"k-overlay",style:{zIndex:ue,...p}}),i.createElement(pe.Popup,{ref:ke,anchor:v.current,show:y,animate:P.animate,popupClass:a.classNames("k-popup-transparent k-fab-popup",P.popupClass),anchorAlign:P.anchorAlign||nt(t,Y),popupAlign:P.popupAlign||at(t,Y),style:{boxShadow:"none"}},i.createElement("ul",{ref:De,role:"menu","aria-labelledby":I,id:he,className:a.classNames("k-fab-items",{"k-fab-items-bottom":t.vertical!=="bottom","k-fab-items-top":t.vertical==="bottom"}),style:{paddingLeft:je?Ue:void 0,paddingRight:je?Ue:void 0}},It))))});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:a.svgIconPropType,iconClass:s.string,text:s.string,alignOffset:s.shape({x:s.oneOfType([s.number,s.string]),y:s.oneOfType([s.number,s.string])}),align:s.shape({vertical:s.oneOf(["top","middle","bottom"]),horizontal:s.oneOf(["start","center","end"])}),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 q={align:{vertical:"bottom",horizontal:"end"},size:"medium",rounded:"full",themeColor:"primary",positionMode:"fixed"};Ie.displayName="KendoFloatingActionButton";const We=a.withIdHOC(te);We.displayName="KendoReactDropDownButton";const Le=a.withIdHOC(ee);Le.displayName="KendoReactSplitButton",f.Button=O,f.ButtonGroup=Pe,f.Chip=z,f.ChipList=ie,f.DropDownButton=We,f.DropDownButtonClassComponent=te,f.DropDownButtonItem=ge,f.FloatingActionButton=Ie,f.FloatingActionButtonItem=ne,f.SplitButton=Le,f.SplitButtonClassComponent=ee,f.SplitButtonItem=be,f.Toolbar=ye,f.ToolbarItem=Me,f.ToolbarSeparator=Ge,f.ToolbarSpacer=ve,f.toolbarButtons=Be,Object.defineProperty(f,Symbol.toStringTag,{value:"Module"})});
|
package/index.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
* Copyright © 2023 Progress Software Corporation. All rights reserved.
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const le=require("react"),tt=require("prop-types"),i=require("@progress/kendo-react-common"),ye=require("@progress/kendo-react-popup"),Pe=require("@progress/kendo-svg-icons");function Be(e){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const a=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(o,t,a.get?a:{enumerable:!0,get:()=>e[t]})}}return o.default=e,Object.freeze(o)}const n=Be(le),s=Be(tt),P={name:"@progress/kendo-react-buttons",productName:"KendoReact",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:0,version:"",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"};function st({imageUrl:e,name:o,iconClass:t,svgIcon:a,imageAlt:l}){return e?n.createElement("img",{role:"presentation",className:"k-button-icon",alt:l,src:e}):o||a?n.createElement(i.IconWrap,{className:"k-button-icon",name:o,icon:a}):t?n.createElement("span",{role:"presentation",className:i.classNames("k-button-icon",t)}):null}const G=class extends n.Component{constructor(e){super(e),this._element=null,this.handleClick=o=>{this.toggleIfApplicable(),this.props.onClick&&this.props.onClick.call(void 0,o)},i.validatePackage(P),this.state={selected:this.props.togglable===!0&&this.props.selected===!0}}get element(){return this._element}get selected(){return this._selectedTemp!==void 0?this._selectedTemp:this.state.selected}static getDerivedStateFromProps(e,o){return e.togglable&&e.selected!==void 0&&e.selected!==o.selected?{selected:e.selected}:null}render(){const{children:e,togglable:o,icon:t,iconClass:a,svgIcon:l,imageUrl:r,imageAlt:u,className:c,onClick:b,size:k=G.defaultProps.size,rounded:h=G.defaultProps.rounded,fillMode:I=G.defaultProps.fillMode,themeColor:w=G.defaultProps.themeColor,...x}=this.props,E=l!==void 0||t!==void 0||a!==void 0||r!==void 0,N=e!==void 0,C=st({name:t,svgIcon:l,iconClass:a,imageUrl:r,imageAlt:u});return n.createElement("button",{ref:D=>this._element=D,"aria-pressed":o?this.state.selected:void 0,...x,onClick:this.handleClick,className:i.classNames("k-button",{[`k-button-${i.kendoThemeMaps.sizeMap[k]||k}`]:k,[`k-button-${I}`]:I,[`k-button-${I}-${w}`]:!!(I&&w),[`k-rounded-${i.kendoThemeMaps.roundedMap[h]||h}`]:h,"k-icon-button":!N&&E,"k-disabled":this.props.disabled,"k-selected":this.state.selected,"k-rtl":this.props.dir==="rtl"},this.props.className)},C,e&&n.createElement("span",{className:"k-button-text"},e))}toggleIfApplicable(){if(this.props.togglable&&this.props.selected===void 0){const e=!this.state.selected;this._selectedTemp=e,this.setState({selected:e},()=>this._selectedTemp=void 0)}}};let _=G;_.propTypes={children:s.node,selected:s.bool,togglable:s.bool,icon:s.string,svgIcon:i.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"]),themeColor:s.oneOf([null,"base","primary","secondary","tertiary","info","success","warning","error","dark","light","inverse"])};_.defaultProps={togglable:!1,size:"medium",rounded:"medium",fillMode:"solid",themeColor:"base"};const nt={button:"k-button",flat:"k-flat",outline:"k-outline",clear:"k-button-clear",primary:"k-primary","state-selected":"k-selected","button-icon":"k-button-icon","button-icontext":"k-button-icontext","state-disabled":"k-disabled","group-start":"k-group-start","group-end":"k-group-end","button-group":"k-button-group","button-group-stretched":"k-button-group-stretched",ltr:"k-ltr",rtl:"k-rtl"},Ke=":not(.k-dropdownlist button):not(.k-colorpicker button):not(.k-split-button .k-split-button-arrow)",Fe=["button"+Ke,".k-button-group > button"+Ke,".k-colorpicker",".k-dropdownlist"],ot={styles:nt},oe=ot.styles;class ze extends n.Component{constructor(o){super(o),this._element=null,i.validatePackage(P)}render(){const o=this.mapButtons(this.props.children),t=i.classNames([oe["button-group"]],{["k-disabled"]:this.props.disabled,[oe["button-group-stretched"]]:!!this.props.width},this.props.className),a={className:t,style:{width:`${this.props.width}`},dir:this.props.dir,role:"group","aria-disabled":this.props.disabled};return n.createElement("div",{ref:l=>{this._element=l},...a,className:t},o)}mapButtons(o){const t=n.Children.count(o),a=this.props.dir!==void 0?this.props.dir==="rtl":this._element&&getComputedStyle(this._element).direction==="rtl"||!1;return n.Children.map(o,(l,r)=>n.isValidElement(l)?this.renderButton(l,r,r===t-1,a):l)}renderButton(o,t,a,l){const r=i.classNames(o.props.className,{[oe["group-start"]]:l?a:t===0,[oe["group-end"]]:l?t===0:a}),u={...this.props.width?{width:this.props.width}:{},...o.props.style||{}},c=this.props.disabled||o.props.disabled,b={...o.props,...r?{className:r}:{},...Object.keys(u).length?{style:u}:{},...c!==void 0?{disabled:c}:{}};return n.Children.count(o.props.children)>0?n.cloneElement(o,b,o.props.children):n.cloneElement(o,b)}}ze.propTypes={children:s.oneOfType([s.arrayOf(s.element),s.element]),className:s.string,disabled:s.bool,width:s.string,dir:s.string};const ke=e=>{const o=n.useCallback(r=>{e.onClick(r,e.index)},[e]),t=e.dataItem.render||e.item||(e.item===void 0?e.render:null),a=e.dataItem.text!==void 0?e.dataItem.text:e.textField?e.dataItem[e.textField]:e.dataItem,l=n.createElement("li",{id:e.id,className:i.classNames("k-item",e.className,{"k-focus":e.focused}),tabIndex:-1,onClick:o,onMouseDown:e.onDown,onPointerDown:e.onDown,role:"menuitem","aria-disabled":e.dataItem.disabled||void 0},n.createElement("span",{tabIndex:-1,className:i.classNames("k-link k-menu-link",{"k-selected":e.dataItem.selected,"k-disabled":e.dataItem.disabled}),key:"icon"},t?n.createElement(t,{item:e.dataItem,itemIndex:e.index}):n.createElement(n.Fragment,null,(e.dataItem.icon||e.dataItem.iconClass)&&n.createElement(i.IconWrap,{className:e.dataItem.iconClass,name:e.dataItem.icon,icon:e.dataItem.svgIcon}),e.dataItem.imageUrl&&n.createElement("img",{role:"presentation",alt:"",src:e.dataItem.imageUrl,className:"k-icon"}),a&&n.createElement("span",{className:"k-menu-link-text"},a))));return e.item!==void 0&&e.render!==void 0?e.render.call(void 0,l,e):l};ke.displayName="KendoReactButtonItem";class ve extends n.Component{render(){return null}}ve.propTypes={text:s.string,icon:s.string,iconClass:s.string,imageUrl:s.string,disabled:s.bool,render:s.any};const Me=(e,o,t,a)=>{if(t)return e;const l=Math.min(a-1,Math.max(0,e));switch(o){case i.Keys.enter:case i.Keys.space:case i.Keys.esc:return-1;case i.Keys.up:case i.Keys.left:return l-1<0?a-1:l-1;case i.Keys.down:case i.Keys.right:return l+1>=a?0:l+1;case i.Keys.home:return 0;case i.Keys.end:return a-1;default:return e}};function Te(e){let o={horizontal:"left",vertical:"bottom"};return e&&(o.horizontal="right"),o}function Re(e){let o={horizontal:"left",vertical:"top"};return e&&(o.horizontal="right"),o}let re=class extends n.Component{constructor(o){super(o),this.state={focused:!1,focusedIndex:-1,opened:!1},this.wrapper=null,this.mainButton=null,this.list=null,this.skipFocus=!1,this.buttonsData=[],this.onKeyDown=t=>{const{focusedIndex:a}=this.state;if(t.altKey){!this.opened&&t.keyCode===i.Keys.down?(this.dispatchPopupEvent(t,!0),this.setState({focusedIndex:0}),this.setOpen(!0)):this.opened&&t.keyCode===i.Keys.up&&(this.setState({focusedIndex:-1}),this.setOpen(!1));return}let l;if(t.keyCode===i.Keys.enter||t.keyCode===i.Keys.space){if(t.preventDefault(),this.dispatchClickEvent(t,a),a>=0){l={focusedIndex:this.opened?-1:0};const r=!this.opened;this.setOpen(r),r&&this.dispatchPopupEvent(t,r)}}else if(this.opened&&t.keyCode===i.Keys.esc){this.setState({focusedIndex:-1}),this.setOpen(!1);return}if(this.opened){const r=Me(a,t.keyCode,t.altKey,this.buttonsData.length);r!==a&&(l=l||{},l.focusedIndex=r);const u=t.keyCode===i.Keys.up||t.keyCode===i.Keys.down||t.keyCode===i.Keys.left||t.keyCode===i.Keys.right;!t.altKey&&(u||t.keyCode===i.Keys.home||t.keyCode===i.Keys.end)&&t.preventDefault()}l&&this.setState(l)},this.switchFocus=t=>{this.skipFocus=!0,t(),window.setTimeout(()=>this.skipFocus=!1,0)},this.onFocus=t=>{this.skipFocus||(i.dispatchEvent(this.props.onFocus,t,this,void 0),this.setState({focused:!0}))},this.setOpen=t=>{this.openedDuringOnChange=t,this.setState({opened:t})},this.onItemClick=(t,a)=>{this.opened&&(this.setState({focusedIndex:0}),this.setOpen(!1)),this.dispatchClickEvent(t,a)},this.onBlur=t=>{this.skipFocus||(this.setState({focused:!1,focusedIndex:-1}),this.setOpen(!1),i.dispatchEvent(this.props.onBlur,t,this,void 0))},this.onPopupClose=()=>{this.state.focused&&this.switchFocus(()=>{this.element&&(this.element.removeAttribute("tabindex"),this.element.focus({preventScroll:!0}))}),this.dispatchPopupEvent({},!1)},this.listRef=t=>{this.list=t,t&&this.state.focused&&this.switchFocus(()=>{t.focus({preventScroll:!0}),this.element&&(this.element.tabIndex=-1)})},this.onSplitPartClick=t=>{if(this.buttonsData.length){const a=!this.opened;a&&this.dispatchPopupEvent(t,a),this.setState({focusedIndex:a?0:-1,focused:!0}),this.setOpen(a)}},this.onDownSplitPart=t=>{t.preventDefault();const a=i.getActiveElement(document);this.element&&a!==this.element&&a!==this.list&&this.element.focus()},this.onItemDown=t=>{i.getActiveElement(document)===this.list&&t.preventDefault()},this.dispatchPopupEvent=(t,a)=>{i.dispatchEvent(a?this.props.onOpen:this.props.onClose,t,this,void 0),this.openedDuringOnChange=void 0},i.validatePackage(P)}get guid(){return this.props.id?this.props.id+"-accessibility-id":this.props.id}get opened(){return this.openedDuringOnChange!==void 0?this.openedDuringOnChange:this.props.opened===void 0?this.state.opened:this.props.opened}render(){this.buttonsData=this.props.items||n.Children.toArray(this.props.children).filter(c=>c&&c.type===ve).map(c=>c.props);const o=this.isRtl(),t=o?"rtl":void 0,{id:a,style:l,tabIndex:r,disabled:u}=this.props;return n.createElement("div",{id:a,style:l,className:i.classNames("k-split-button","k-button-group",{"k-focus":this.state.focused},`k-rounded-${i.kendoThemeMaps.roundedMap[this.props.rounded||"medium"]}`,this.props.className),onKeyDown:this.onKeyDown,onFocus:this.onFocus,onBlur:this.onBlur,dir:t,ref:c=>this.wrapper=c},n.createElement(_,{ref:c=>this.mainButton=c&&c.element,type:"button",size:this.props.size,rounded:this.props.rounded,fillMode:this.props.fillMode,themeColor:this.props.themeColor,onClick:c=>this.onItemClick(c,-1),disabled:u||void 0,tabIndex:r,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":u,"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),n.createElement(_,{type:"button",size:this.props.size,rounded:this.props.rounded,fillMode:this.props.fillMode,themeColor:this.props.themeColor,icon:"caret-alt-down",svgIcon:Pe.caretAltDownIcon,className:"k-split-button-arrow",disabled:u||void 0,tabIndex:-1,onClick:this.onSplitPartClick,onMouseDown:this.onDownSplitPart,onPointerDown:this.onDownSplitPart,dir:t,"aria-label":"menu toggling button"}),this.renderPopup(o))}componentDidMount(){(this.props.dir===void 0&&this.isRtl()||this.opened)&&this.forceUpdate()}get element(){return this.mainButton}dispatchClickEvent(o,t){this.isItemDisabled(t)||(t===-1?i.dispatchEvent(this.props.onButtonClick,o,this,void 0):i.dispatchEvent(this.props.onItemClick,o,this,{item:this.buttonsData[t],itemIndex:t}))}renderPopup(o){const{popupSettings:t={}}=this.props,{focusedIndex:a}=this.state;return n.createElement(ye.Popup,{anchor:this.wrapper,show:this.opened,animate:t.animate,popupClass:i.classNames("k-menu-popup",t.popupClass),anchorAlign:t.anchorAlign||Te(o),popupAlign:t.popupAlign||Re(o),style:o?{direction:"rtl"}:void 0,onClose:this.onPopupClose},n.createElement("ul",{role:"menu",id:this.guid,"aria-labelledby":"button-"+this.guid,tabIndex:-1,ref:this.listRef,"aria-activedescendant":a>=0?`${this.guid}-${a}`:void 0,className:i.classNames("k-group k-menu-group k-reset",{[`k-menu-group-${i.kendoThemeMaps.sizeMap[this.props.size]||this.props.size}`]:this.props.size})},this.renderChildItems()))}renderChildItems(){const{item:o,itemRender:t,textField:a}=this.props;return this.buttonsData.length>0?this.buttonsData.map((l,r)=>n.createElement(ke,{className:"k-menu-item",dataItem:l,textField:a,focused:this.state.focusedIndex===r,onClick:this.onItemClick,onDown:this.onItemDown,render:t,item:o,key:r,index:r,id:`${this.guid}-${r}`})):null}isItemDisabled(o){return this.buttonsData[o]?this.buttonsData[o].disabled:this.props.disabled}isRtl(){return this.props.dir!==void 0?this.props.dir==="rtl":!!this.wrapper&&getComputedStyle(this.wrapper).direction==="rtl"}};re.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:i.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};re.defaultProps={size:"medium",rounded:"medium",fillMode:"solid",themeColor:"base"};class Ce extends n.Component{render(){return null}}Ce.propTypes={text:s.string,icon:s.string,iconClass:s.string,imageUrl:s.string,selected:s.bool,disabled:s.bool,render:s.any};let ce=class extends n.Component{constructor(o){super(o),this.state={opened:!1,focused:!1,focusedIndex:-1},this.wrapper=null,this.mainButton=null,this.list=null,this.skipFocus=!1,this.buttonsData=[],this.onKeyDown=t=>{const{focusedIndex:a}=this.state;if(t.altKey){!this.opened&&t.keyCode===i.Keys.down?(this.setOpen(!0),this.dispatchPopupEvent(t,!0),this.setState({focusedIndex:0})):this.opened&&t.keyCode===i.Keys.up&&(this.setState({focusedIndex:-1}),this.setOpen(!1));return}const l={...this.state};if(t.keyCode===i.Keys.enter||t.keyCode===i.Keys.space){a>=0&&this.dispatchClickEvent(t,a),t.preventDefault();const r=!this.opened;this.setOpen(r),r&&(this.dispatchPopupEvent(t,!0),this.setState({focusedIndex:this.opened?-1:0}));return}else if(this.opened&&t.keyCode===i.Keys.esc){this.setState({focusedIndex:-1}),this.setOpen(!1);return}if(this.opened){const r=Me(a,t.keyCode,t.altKey,this.buttonsData.length);l.focusedIndex=r;const u=t.keyCode===i.Keys.up||t.keyCode===i.Keys.down||t.keyCode===i.Keys.left||t.keyCode===i.Keys.right;!t.altKey&&(u||t.keyCode===i.Keys.home||t.keyCode===i.Keys.end)&&t.preventDefault()}this.setState(l)},this.switchFocus=t=>{this.skipFocus=!0,t(),window.setTimeout(()=>this.skipFocus=!1,0)},this.handleFocus=t=>{this.skipFocus||(this.setState({focused:!0,focusedIndex:this.opened?0:-1}),i.dispatchEvent(this.props.onFocus,t,this,void 0))},this.handleBlur=t=>{this.skipFocus||(this.setState({focused:!1,focusedIndex:-1}),this.setOpen(!1),i.dispatchEvent(this.props.onBlur,t,this,void 0))},this.setOpen=t=>{this.openedDuringOnChange=t,this.setState({opened:t})},this.onItemClick=(t,a)=>{this.setState({focusedIndex:-1}),this.setOpen(!1),this.dispatchClickEvent(t,a)},this.onItemDown=t=>{i.getActiveElement(document)===this.list&&t.preventDefault()},this.mouseDown=t=>{t.preventDefault();const a=i.getActiveElement(document);this.element&&a!==this.element&&a!==this.list&&this.element.focus()},this.onPopupClose=()=>{this.state.focused&&this.switchFocus(()=>{this.element&&(this.element.removeAttribute("tabindex"),this.element.focus({preventScroll:!0}))}),this.dispatchPopupEvent({},!1)},this.listRef=t=>{this.list=t,t&&this.state.focused&&this.switchFocus(()=>{t.focus({preventScroll:!0}),this.element&&(this.element.tabIndex=-1)})},this.onClickMainButton=t=>{if(!this.buttonsData.length)return;const a=!this.opened;this.setState({focused:!0,focusedIndex:a?0:-1}),this.setOpen(a),a&&this.dispatchPopupEvent(t,a)},this.dispatchPopupEvent=(t,a)=>{i.dispatchEvent(a?this.props.onOpen:this.props.onClose,t,this,void 0),this.openedDuringOnChange=void 0},i.validatePackage(P)}get guid(){return this.props.id+"-accessibility-id"}get opened(){return this.openedDuringOnChange!==void 0?this.openedDuringOnChange:this.props.opened===void 0?this.state.opened:this.props.opened}render(){const o=this.isRtl(),t=o?"rtl":void 0,{id:a,style:l,tabIndex:r,disabled:u}=this.props;return this.buttonsData=this.props.items||n.Children.toArray(this.props.children).filter(c=>c&&c.type===Ce).map(c=>c.props),n.createElement("div",{id:a,style:l,className:i.classNames("k-dropdown-button",{"k-focus":this.state.focused},this.props.className),onKeyDown:this.onKeyDown,onFocus:this.handleFocus,onBlur:this.handleBlur,dir:t,ref:c=>this.wrapper=c},n.createElement(_,{size:this.props.size,rounded:this.props.rounded,fillMode:this.props.fillMode,themeColor:this.props.themeColor,onClick:this.onClickMainButton,onMouseDown:this.mouseDown,disabled:u||void 0,tabIndex:r,accessKey:this.props.accessKey,icon:this.props.icon,svgIcon:this.props.svgIcon,iconClass:this.props.iconClass,className:this.props.buttonClass,imageUrl:this.props.imageUrl,dir:t,ref:c=>this.mainButton=c&&c.element,type:"button","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),this.renderPopup(o))}componentDidMount(){(this.props.dir===void 0&&this.isRtl()||this.opened)&&this.forceUpdate()}get element(){return this.mainButton}dispatchClickEvent(o,t){this.isItemDisabled(t)||i.dispatchEvent(this.props.onItemClick,o,this,{item:this.buttonsData[t],itemIndex:t})}renderPopup(o){const{popupSettings:t={}}=this.props,{focusedIndex:a}=this.state;return n.createElement(ye.Popup,{anchor:this.wrapper,show:this.opened,animate:t.animate,popupClass:i.classNames("k-menu-popup",t.popupClass),anchorAlign:t.anchorAlign||Te(o),popupAlign:t.popupAlign||Re(o),style:o?{direction:"rtl"}:void 0,onClose:this.onPopupClose},n.createElement("ul",{role:"menu",id:this.guid,"aria-labelledby":"button-"+this.guid,tabIndex:-1,"aria-activedescendant":a>=0?`${this.guid}-${a}`:void 0,ref:this.listRef,className:i.classNames("k-group k-menu-group k-reset",{[`k-menu-group-${i.kendoThemeMaps.sizeMap[this.props.size]||this.props.size}`]:this.props.size})},this.renderChildItems()))}renderChildItems(){const{item:o,itemRender:t,textField:a}=this.props;return this.buttonsData.length>0?this.buttonsData.map((l,r)=>n.createElement(ke,{className:"k-menu-item",dataItem:l,textField:a,focused:this.state.focusedIndex===r,onClick:this.onItemClick,onDown:this.onItemDown,render:t,item:o,index:r,key:r,id:`${this.guid}-${r}`})):null}isItemDisabled(o){return this.buttonsData[o]?this.buttonsData[o].disabled:this.props.disabled}isRtl(){return this.props.dir!==void 0?this.props.dir==="rtl":!!this.wrapper&&getComputedStyle(this.wrapper).direction==="rtl"}};ce.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:i.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};ce.defaultProps={size:"medium",rounded:"medium",fillMode:"solid",themeColor:"base"};const ge=class extends n.Component{constructor(e){super(e),this._element=null,this.offsetHeight=0,this.offsetWidth=0,this.buttons=[],this.focusedSelector=this.selectors.map(o=>o+":focus").join(","),this.setTabIndex=o=>{const{tabIndex:t=ge.defaultProps.tabIndex}=this.props;this.buttons.forEach((a,l)=>{a.tabIndex=l===o?t:-1})},this.onKeyDown=o=>{const t=o.target;if(!(o.keyCode===i.Keys.left||o.keyCode===i.Keys.right)||o.defaultPrevented||this.buttons.findIndex(r=>r===t)===-1)return;const l=this.focusedIndex;o.keyCode===i.Keys.left?this.focusButton(l,l-1):this.focusButton(l,l+1)},this.onWindowResize=o=>{const t=this.element;if(!t)return;const a=t.offsetWidth,l=t.offsetHeight;if(this.offsetWidth!==a||this.offsetHeight!==l){this.offsetWidth=a,this.offsetHeight=l;const r={offsetWidth:this.offsetWidth,offsetHeight:this.offsetHeight};this.props.onResize&&this.props.onResize.call(void 0,{target:this,...r,nativeEvent:o})}},i.validatePackage(P)}get selectors(){return this.props.buttons||Fe}get focusedIndex(){const e=this.element&&this.element.querySelector(this.focusedSelector);return Math.max(0,this.buttons.findIndex(o=>o===e))}get element(){return this._element}componentDidMount(){window.addEventListener("resize",this.onWindowResize);const e=this.element;e&&(this.offsetWidth=e.offsetWidth,this.offsetHeight=e.offsetHeight,this.props.keyboardNavigation!==!1&&(this.buttons=Array.from(e.querySelectorAll(this.selectors.join(","))),this.setTabIndex(0)))}componentDidUpdate(){const e=this.element;!e||this.props.keyboardNavigation===!1||(this.buttons=Array.from(e.querySelectorAll(this.selectors.join(","))),this.setTabIndex(this.focusedIndex))}componentWillUnmount(){window.removeEventListener("resize",this.onWindowResize),this.buttons.length=0}render(){return n.createElement("div",{id:this.props.id,"aria-label":this.props.ariaLabel,className:i.classNames("k-toolbar",{[`k-toolbar-${i.kendoThemeMaps.sizeMap[this.props.size]||this.props.size}`]:this.props.size},this.props.className),style:this.props.style,role:this.props.role!==void 0?this.props.role||void 0:"toolbar",dir:this.props.dir,ref:e=>this._element=e,onKeyDown:this.props.keyboardNavigation!==!1?this.onKeyDown:void 0},this.props.children)}focusButton(e,o){const{tabIndex:t=ge.defaultProps.tabIndex}=this.props,a=this.buttons[o];if(a){a.tabIndex=t,a.focus();const l=this.buttons[e];l&&(l.tabIndex=-1)}}};let Ie=ge;Ie.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),size:s.oneOf([null,"small","medium","large"])};Ie.defaultProps={tabIndex:0,size:"medium"};class Oe extends n.PureComponent{constructor(){super(...arguments),this._element=null}get element(){return this._element}render(){return n.createElement("div",{id:this.props.id,className:i.classNames("k-toolbar-item",this.props.className),style:this.props.style,ref:o=>this._element=o},this.props.children)}}Oe.propTypes={className:s.string};class it extends n.PureComponent{render(){return n.createElement("div",{className:i.classNames("k-separator",this.props.className)})}}const xe=n.forwardRef((e,o)=>{const t=n.useRef(null),a=n.useRef(null);n.useImperativeHandle(a,()=>({element:t.current})),n.useImperativeHandle(o,()=>({element:t.current}));const l=n.useMemo(()=>i.classNames("k-spacer",e.className),[e.className]);return n.createElement("span",{ref:t,className:l})});xe.displayName="KendoReactToolbarSpacer";xe.propTypes={className:s.string};const Ae=le.createContext([null,e=>{}]),$e=le.createContext([null,e=>{}]),_e=le.createContext([null,e=>{}]);var X=(e=>(e.next="next",e.prev="prev",e.current="current",e.reset="reset",e))(X||{});const at=(e,o)=>{const t=o.items.findIndex(a=>a===e);switch(o.type){case"next":return t===o.items.length-1?e:o.items[t+1];case"prev":return t===0?e:o.items[t-1];case"current":return o.payload;case"reset":return null;default:return e}};var We=(e=>(e.remove="remove",e.add="add",e.reorder="reorder",e))(We||{});const lt=(e,o)=>{switch(o.type){case"add":break;case"remove":return e.filter(t=>t[o.valueField]!==o.payload);case"reorder":break;default:return e}};var ae=(e=>(e.toggle="toggle",e.remove="remove",e))(ae||{});const rt=(e,o)=>{switch(o.selection){case"single":switch(o.type){case"toggle":{if(!Array.isArray(e)||e===null)return o.payload===e?null:o.payload;throw new Error("State cannot be an array in single selection")}case"remove":return o.payload===e?null:e;default:return e}case"multiple":switch(o.type){case"toggle":{if(Array.isArray(e))return e.some(t=>t===o.payload)?e.filter(t=>t!==o.payload):[...e,o.payload];if(e===null)return[o.payload];throw new Error("State cannot be non-array in multiple selection")}case"remove":return Array.isArray(e)?e.some(t=>t===o.payload)?e.filter(t=>t!==o.payload):[...e,o.payload]:e;default:return e}case"none":return null;default:return e}},z=n.forwardRef((e,o)=>{i.validatePackage(P);const t=n.useRef(null),a=n.useRef(null),l=i.useDir(a,e.dir);n.useImperativeHandle(t,()=>({element:a.current,props:e})),n.useImperativeHandle(o,()=>t.current);const[r,u]=n.useContext(Ae),[c,b]=n.useContext($e),[,k]=n.useContext(_e),h=n.useMemo(()=>e.selected||(Array.isArray(r)?r.some(p=>p===e.value):r===e.value),[e.selected,e.value,r]),I=n.useMemo(()=>c===e.value,[e.value,c]);n.useEffect(()=>{I&&a.current&&a.current.focus()},[I]);const w=n.useCallback(p=>{u({type:ae.toggle,payload:e.value,event:p})},[u,e.value]),x=n.useCallback(p=>{e.removable&&(k({type:We.remove,payload:e.value,event:p}),b({type:X.reset,payload:e.value,event:p}),u({type:ae.remove,payload:e.value,event:p}),e.onRemove&&e.onRemove.call(void 0,{target:t.current,syntheticEvent:p}))},[e.onRemove,e.value,e.removable,k,b,u]),E=n.useCallback(p=>{switch(p.keyCode){case i.Keys.left:b({type:X.prev,payload:e.value,event:p});break;case i.Keys.right:b({type:X.next,payload:e.value,event:p});break;case i.Keys.enter:u({type:ae.toggle,payload:e.value,event:p});break;case i.Keys.delete:x(p);break}e.onKeyDown&&e.onKeyDown.call(void 0,{target:t.current,syntheticEvent:p})},[e.onKeyDown,e.value,b,u,x]),N=n.useCallback(p=>{b({payload:e.value,type:X.current,event:p}),e.onFocus&&e.onFocus.call(void 0,{target:t.current,syntheticEvent:p})},[e.onFocus,e.value,b]),C=n.useCallback(p=>{e.onBlur&&e.onBlur.call(void 0,{target:t.current,syntheticEvent:p})},[e.onBlur]),D=i.useMouse(e,t,{onClick:w});return n.createElement("div",{...D,role:e.role||"button",id:e.value,style:e.style,ref:a,dir:l,tabIndex:i.getTabIndex(e.tabIndex,e.disabled,void 0),className:i.classNames("k-chip",{"k-rtl":l==="rtl","k-disabled":e.disabled,"k-selected":h,"k-focus":I,[`k-chip-${i.kendoThemeMaps.sizeMap[e.size]||e.size}`]:e.size,[`k-rounded-${i.kendoThemeMaps.roundedMap[e.rounded]||e.rounded}`]:e.rounded,[`k-chip-${e.fillMode}`]:e.fillMode,[`k-chip-${e.fillMode}-${e.themeColor}`]:!!(e.fillMode&&e.themeColor)},e.className),"aria-pressed":e.role?void 0:h,"aria-disabled":e.disabled,"aria-describedby":e.ariaDescribedBy,"aria-keyshortcuts":e.removable?"Enter Delete":void 0,onFocus:N,onBlur:C,onKeyDown:E},h&&(e.selectedIcon||e.selectedSvgIcon)&&n.createElement(i.IconWrap,{className:"k-chip-icon",name:e.selectedIcon?i.toIconName(e.selectedIcon):void 0,icon:e.selectedSvgIcon,size:"small"}),(e.icon||e.svgIcon)&&n.createElement(i.IconWrap,{className:"k-chip-icon",name:e.icon?i.toIconName(e.icon):void 0,icon:e.svgIcon,size:"small"}),e.avatar&&n.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},n.createElement("span",{className:"k-avatar-image"},n.createElement("img",{src:e.avatar.image,alt:e.avatar.imageAlt}))),n.createElement("span",{className:"k-chip-content"},e.children!==void 0?e.children:e.text&&n.createElement("span",{"aria-label":e.ariaLabel||e.text,className:"k-chip-label"},e.text)),e.removable&&n.createElement("span",{className:"k-chip-actions"},n.createElement("span",{className:i.classNames("k-chip-action","k-chip-remove-action"),onClick:x},n.createElement(i.IconWrap,{name:e.removeIcon?i.toIconName(e.removeIcon):void 0,icon:e.removeSvgIcon||Pe.xCircleIcon,size:"small"}))))}),ct={id:s.string,text:s.string,value:s.any,dir:s.oneOf(["ltr","rtl"]),removable:s.bool,removeIcon:s.string,removeIconSvg:i.svgIconPropType,disabled:s.bool,icon:s.string,svgIcon:i.svgIconPropType,selectedIcon:s.string,selectedIconSvg:i.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"])},dt={disabled:!1,removable:!1,removeIcon:"k-i-x-circle",dir:"ltr",size:"medium",rounded:"medium",fillMode:"solid",themeColor:"base"};z.displayName="KendoReactChip";z.propTypes=ct;z.defaultProps=dt;const ut=(e,o,t)=>{const[a,l]=n.useState(e);return[a,u=>{const c=rt(o.state||a,{...u,...o});t&&t(c,u.event),l(c)}]},ht=e=>{const[o,t]=n.useState(null);return[o,l=>{const r=at(l.payload,{...l,...e});t(r)}]},pt=(e,o,t)=>{const[a,l]=n.useState(e);return[a,u=>{const c=lt(o.state||a,{...u,...o});t&&t(c,u.event),l(c)}]},de=n.forwardRef((e,o)=>{i.validatePackage(P);const t=n.useRef(null),a=n.useRef(null),l=i.useDir(a,e.dir),{chip:r,id:u,style:c,tabIndex:b,disabled:k,size:h,className:I,ariaDescribedBy:w,ariaLabelledBy:x,ariaLabel:E,selection:N=$.selection,value:C=$.defaultValue,defaultData:D=$.defaultData,valueField:p=$.valueField,textField:M=$.textField,onChange:B,onDataChange:S}=e,T=n.useMemo(()=>r||z,[r,z]);n.useImperativeHandle(t,()=>({element:a.current,props:e})),n.useImperativeHandle(o,()=>t.current);const F=n.useCallback((m,g)=>{B&&t.current&&B.call(void 0,{value:m,target:t.current,syntheticEvent:g})},[B]),[W,L]=ut(C,{selection:N,state:C},F),J=n.useCallback((m,g)=>{S&&t.current&&S.call(void 0,{value:m,target:t.current,syntheticEvent:g})},[S]),[H,Q]=pt(e.data||D,{state:e.data,valueField:p},J),U=n.useCallback((m,g)=>(m.push(g[p]),m),[p]),R=n.useMemo(()=>e.data||H,[e.data,H]),Y=n.useMemo(()=>C||W,[C,W]),ee=n.useMemo(()=>R.reduce(U,[]),[R,U]),j=n.useCallback(m=>i.getter(p)(m),[p]),y=n.useCallback(m=>i.getter(M)(m),[M]),[he,pe]=ht({items:ee}),te=i.useMouse(e,t);return n.createElement(Ae.Provider,{value:[Y,L]},n.createElement($e.Provider,{value:[he,pe]},n.createElement(_e.Provider,{value:[R,Q]},n.createElement("div",{ref:a,...te,role:k?void 0:"listbox",id:u,dir:l,style:c,tabIndex:i.getTabIndex(b,k,void 0),className:i.classNames("k-chip-list",{"k-rtl":l==="rtl","k-disabled":k,[`k-chip-list-${i.kendoThemeMaps.sizeMap[h]||h}`]:h},I),"aria-label":E,"aria-labelledby":x,"aria-describedby":w,"aria-orientation":"horizontal","aria-multiselectable":N==="multiple"},R.map((m,g)=>n.createElement(T,{role:"option",dataItem:m,size:h,key:[j(m),g].join("-"),text:y(m),value:j(m),ariaLabel:m.ariaLabel,svgIcon:m.svgIcon||void 0}))))))}),mt={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"])},$={chip:z,size:"medium",disabled:!1,defaultValue:null,defaultData:[],dir:"ltr",selection:"none",textField:"text",valueField:"value",removable:"removable"};de.displayName="KendoReactChipList";de.propTypes=mt;de.defaultProps=$;const ue=n.forwardRef((e,o)=>{const{className:t,disabled:a,text:l,icon:r,style:u,id:c,focused:b,tabIndex:k,index:h,dataItem:I,item:w,svgIcon:x,onDown:E,onClick:N,...C}=e,D=n.useRef(null),p=n.useCallback(()=>{D.current&&D.current.focus()},[]),M=n.useCallback(()=>({element:D.current,focus:p}),[p]);n.useImperativeHandle(o,M);const B=n.useCallback(F=>{N&&h!==void 0&&!a&&N(F,h)},[N,h]),S=n.useMemo(()=>i.classNames("k-fab-item",{"k-focus":b,"k-disabled":a},t),[t,a,b]),T=w;return n.createElement("li",{ref:D,id:c,className:S,style:u,role:"menuitem",tabIndex:i.getTabIndex(k,a),"aria-disabled":a,"aria-label":`${l||""} floatingactionbutton item`,onClick:B,onMouseDown:E,onPointerDown:E,...C},T?n.createElement(T,{itemIndex:h,item:I}):n.createElement(n.Fragment,null,l&&n.createElement("span",{className:"k-fab-item-text"},l),r||x?n.createElement(i.IconWrap,{className:"k-fab-item-icon",name:r,icon:x}):null))});ue.propTypes={className:s.string,style:s.object,children:s.any,disabled:s.bool,focused:s.bool,index:s.number,icon:s.string,svgIcon:i.svgIconPropType,text:s.string,tabIndex:s.number,customProp:s.any};ue.displayName="KendoFloatingActionButtonItem";const Se="16px",ie=e=>typeof e=="number"?e+"px":e,ft=(e,o)=>{const t={horizontal:o?"right":"left",vertical:"bottom"};return e.horizontal==="end"&&(t.horizontal=o?"left":"right"),t},bt=(e,o)=>{const t={horizontal:o?"right":"left",vertical:"top"};return e.horizontal==="end"&&(t.horizontal=o?"left":"right"),t},gt=(e,o)=>{const t=o==="end"?"end":"start";return{rtl:{end:"k-text-left",start:"k-text-right"},ltr:{start:"k-text-left",end:"k-text-right"}}[e][t]},yt=(e,o,t,a)=>{const l=o.horizontal,r=o.vertical;if(e.current){const u=t&&t.x!==void 0?ie(t.x):Se,c=t&&t.x!==void 0?`calc(50% + ${ie(t.x)})`:"50%",b=t&&t.y!==void 0?ie(t.y):Se,k=t&&t.y!==void 0?`calc(50% + ${ie(t.y)})`:"50%";e.current.style.setProperty(kt(o,a),l==="center"?c:u),e.current.style.setProperty(vt(o),r==="middle"?k:b),a&&((r==="top"||r==="bottom")&&l==="start"&&e.current.style.setProperty("left","unset"),r==="middle"&&l==="end"&&e.current.style.setProperty("right","unset"),r==="middle"&&l==="start"&&e.current.style.setProperty("left","unset"))}},kt=(e,o)=>{const{horizontal:t}=e;return{end:o?"left":"right",center:"left",start:o?"right":"left"}[t||"end"]},vt=e=>({top:"top",middle:"top",bottom:"bottom"})[e.vertical||"bottom"],Ct=2,It=100,De=n.forwardRef((e,o)=>{i.validatePackage(P);const{align:t=Z.align,alignOffset:a,className:l,disabled:r,icon:u,svgIcon:c,iconClass:b,id:k,items:h,item:I,text:w,positionMode:x=Z.positionMode,size:E=Z.size,style:N,rounded:C=Z.rounded,themeColor:D=Z.themeColor,overlayStyle:p,tabIndex:M,accessKey:B,popupSettings:S={},modal:T,onClick:F,onItemClick:W,onFocus:L,onBlur:J,onKeyDown:H,onOpen:Q,onClose:U,...R}=e,Y=i.useZIndexContext(),ee=Y?Y+Ct:It,j=n.useRef(null),y=n.useRef(null),he=n.useRef(null),pe=n.useRef(null),te=n.useCallback(()=>{y.current&&y.current.focus()},[]),m=n.useCallback(()=>({element:y.current,focus:te}),[te]);n.useImperativeHandle(j,m),n.useImperativeHandle(o,()=>j.current);const[g,K]=n.useState(!1),[se,O]=n.useState(!1),[q,v]=n.useState(-1),Ue=i.useId()+"-button-id",me=i.useDir(y,e.dir),V=me==="rtl",ne=i.useId()+"-list-id";n.useEffect(()=>{yt(y,t,a,V)},[y,t,a,V]),n.useEffect(()=>{se&&y&&y.current&&y.current.focus()},[se,y]);const A=n.useCallback((d,f)=>{h&&i.dispatchEvent(f?Q:U,d,m(),void 0)},[Q,U,h]),we=n.useCallback(d=>{!d.target||r||(!h&&F?i.dispatchEvent(F,d,m(),void 0):(K(!g),O(!0),v(g?-1:0),A(d,!g)))},[K,O,v,F,A,g,h,r]),je=n.useCallback(d=>{O(!0),v(g?0:-1),L&&i.dispatchEvent(L,d,m(),void 0)},[L,O,v]),qe=n.useCallback(d=>{O(!1),K(!1),v(-1),i.dispatchEvent(J,d,m(),void 0),g&&A(d,!1)},[J,O,K,v,A]),Ve=n.useCallback(d=>{d.preventDefault()},[]),fe=n.useCallback((d,f)=>{h&&(h[f].disabled||i.dispatchEvent(W,d,m(),{itemProps:h[f],itemIndex:f}))},[W]),Ze=n.useCallback((d,f)=>{!d.target||!h||(v(f),K(!1),fe(d,f),A(d,!1))},[v,K,fe,A]),Ge=n.useCallback(d=>{i.getActiveElement(document)===y.current&&d.preventDefault()},[y]),Xe=n.useCallback(d=>{const f=q,be=h?h.length:-1;if(d.altKey){!g&&d.keyCode===i.Keys.down&&(d.preventDefault(),K(!0),v(0)),g&&d.keyCode===i.Keys.up&&(d.preventDefault(),K(!1),v(-1));return}switch(d.keyCode){case i.Keys.enter:case i.Keys.space:f>=0&&fe(d,f),h||we(d),d.preventDefault(),K(!g),v(g?-1:0);break;case i.Keys.esc:d.preventDefault(),K(!1),v(-1);break;case i.Keys.home:d.preventDefault(),v(0);break;case i.Keys.end:d.preventDefault(),v(be-1);break;case i.Keys.down:case i.Keys.right:d.preventDefault(),v(f+1>=be?0:f+1);break;case i.Keys.up:case i.Keys.left:d.preventDefault(),v(f-1<0?be-1:f-1);break}i.dispatchEvent(H,d,m(),void 0)},[H,q,v,V,K]),Je=n.useMemo(()=>i.classNames("k-fab k-fab-solid",{"k-fab-sm":E==="small","k-fab-md":E==="medium","k-fab-lg":E==="large","k-disabled":r,"k-pos-absolute":x==="absolute","k-pos-fixed":x==="fixed","k-focus":se,[`k-rounded-${i.kendoThemeMaps.roundedMap[C]||C}`]:C,[`k-fab-solid-${D}`]:D},`k-${t.vertical}-${t.horizontal}`,l),[D,E,C,r,x,t,se,l]),Qe=h&&h.map((d,f)=>n.createElement(ue,{...d,key:f,index:f,id:`${ne}-${f}`,disabled:r||d.disabled,focused:q===f,dataItem:d,item:I,className:i.classNames(d.className,gt(me||"ltr",t.horizontal)),onClick:Ze,onDown:Ge})),Ee=!!((u||c)&&!w),Ye=y.current?y.current.offsetWidth:0,et=32,Ne=Ye/2-et/2;return n.createElement(i.ZIndexContext.Provider,{value:ee},n.createElement(n.Fragment,null,n.createElement("button",{ref:y,id:k||Ue,role:"button",type:"button","aria-disabled":r,"aria-expanded":h?g:void 0,"aria-haspopup":!!h,"aria-label":`${w||""} floatingactionbutton`,"aria-owns":h?ne:void 0,"aria-activedescendant":q>=0&&h?`${ne}-${q}`:void 0,tabIndex:i.getTabIndex(M,r),accessKey:B,dir:me,disabled:r,className:Je,style:N,onClick:we,onMouseDown:Ve,onFocus:je,onBlur:qe,onKeyDown:Xe,...R},u||c?n.createElement(i.IconWrap,{className:"k-fab-icon",name:u,icon:c}):b?n.createElement("span",{role:"presentation",className:b}):null,w&&n.createElement("span",{className:"k-fab-text"},w)),T&&g&&n.createElement("div",{className:"k-overlay",style:{zIndex:ee,...p}}),n.createElement(ye.Popup,{ref:pe,anchor:y.current,show:g,animate:S.animate,popupClass:i.classNames("k-popup-transparent k-fab-popup",S.popupClass),anchorAlign:S.anchorAlign||ft(t,V),popupAlign:S.popupAlign||bt(t,V),style:{boxShadow:"none"}},n.createElement("ul",{ref:he,role:"menu","aria-labelledby":k,id:ne,className:i.classNames("k-fab-items",{"k-fab-items-bottom":t.vertical!=="bottom","k-fab-items-top":t.vertical==="bottom"}),style:{paddingLeft:Ee?Ne:void 0,paddingRight:Ee?Ne:void 0}},Qe))))});De.propTypes={className:s.string,style:s.object,id:s.string,dir:s.string,tabIndex:s.number,accessKey:s.string,disabled:s.bool,icon:s.string,svgIcon:i.svgIconPropType,iconClass:s.string,text:s.string,alignOffset:s.shape({x:s.oneOfType([s.number,s.string]),y:s.oneOfType([s.number,s.string])}),align:s.shape({vertical:s.oneOf(["top","middle","bottom"]),horizontal:s.oneOf(["start","center","end"])}),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 Z={align:{vertical:"bottom",horizontal:"end"},size:"medium",rounded:"full",themeColor:"primary",positionMode:"fixed"};De.displayName="KendoFloatingActionButton";const Le=i.withIdHOC(ce);Le.displayName="KendoReactDropDownButton";const He=i.withIdHOC(re);He.displayName="KendoReactSplitButton";exports.Button=_;exports.ButtonGroup=ze;exports.Chip=z;exports.ChipList=de;exports.DropDownButton=Le;exports.DropDownButtonClassComponent=ce;exports.DropDownButtonItem=Ce;exports.FloatingActionButton=De;exports.FloatingActionButtonItem=ue;exports.SplitButton=He;exports.SplitButtonClassComponent=re;exports.SplitButtonItem=ve;exports.Toolbar=Ie;exports.ToolbarItem=Oe;exports.ToolbarSeparator=it;exports.ToolbarSpacer=xe;exports.toolbarButtons=Fe;
|
|
5
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const le=require("react"),tt=require("prop-types"),i=require("@progress/kendo-react-common"),ye=require("@progress/kendo-react-popup"),Pe=require("@progress/kendo-svg-icons");function Be(e){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const a=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(o,t,a.get?a:{enumerable:!0,get:()=>e[t]})}}return o.default=e,Object.freeze(o)}const n=Be(le),s=Be(tt),P={name:"@progress/kendo-react-buttons",productName:"KendoReact",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:0,version:"",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"};function st({imageUrl:e,name:o,iconClass:t,svgIcon:a,imageAlt:l}){return e?n.createElement("img",{role:"presentation",className:"k-button-icon",alt:l,src:e}):o||a?n.createElement(i.IconWrap,{className:"k-button-icon",name:o,icon:a}):t?n.createElement("span",{role:"presentation",className:i.classNames("k-button-icon",t)}):null}const G=class extends n.Component{constructor(e){super(e),this._element=null,this.handleClick=o=>{this.toggleIfApplicable(),this.props.onClick&&this.props.onClick.call(void 0,o)},i.validatePackage(P),this.state={selected:this.props.togglable===!0&&this.props.selected===!0}}get element(){return this._element}get selected(){return this._selectedTemp!==void 0?this._selectedTemp:this.state.selected}static getDerivedStateFromProps(e,o){return e.togglable&&e.selected!==void 0&&e.selected!==o.selected?{selected:e.selected}:null}render(){const{children:e,togglable:o,icon:t,iconClass:a,svgIcon:l,imageUrl:r,imageAlt:u,className:c,onClick:b,size:k=G.defaultProps.size,rounded:h=G.defaultProps.rounded,fillMode:I=G.defaultProps.fillMode,themeColor:E=G.defaultProps.themeColor,...x}=this.props,w=l!==void 0||t!==void 0||a!==void 0||r!==void 0,N=e!==void 0,C=st({name:t,svgIcon:l,iconClass:a,imageUrl:r,imageAlt:u});return n.createElement("button",{ref:D=>this._element=D,"aria-pressed":o?this.state.selected:void 0,...x,onClick:this.handleClick,className:i.classNames("k-button",{[`k-button-${i.kendoThemeMaps.sizeMap[k]||k}`]:k,[`k-button-${I}`]:I,[`k-button-${I}-${E}`]:!!(I&&E),[`k-rounded-${i.kendoThemeMaps.roundedMap[h]||h}`]:h,"k-icon-button":!N&&w,"k-disabled":this.props.disabled,"k-selected":this.state.selected,"k-rtl":this.props.dir==="rtl"},this.props.className)},C,e&&n.createElement("span",{className:"k-button-text"},e))}toggleIfApplicable(){if(this.props.togglable&&this.props.selected===void 0){const e=!this.state.selected;this._selectedTemp=e,this.setState({selected:e},()=>this._selectedTemp=void 0)}}};let _=G;_.propTypes={children:s.node,selected:s.bool,togglable:s.bool,icon:s.string,svgIcon:i.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"]),themeColor:s.oneOf([null,"base","primary","secondary","tertiary","info","success","warning","error","dark","light","inverse"])};_.defaultProps={togglable:!1,size:"medium",rounded:"medium",fillMode:"solid",themeColor:"base"};const nt={button:"k-button",flat:"k-flat",outline:"k-outline",clear:"k-button-clear",primary:"k-primary","state-selected":"k-selected","button-icon":"k-button-icon","button-icontext":"k-button-icontext","state-disabled":"k-disabled","group-start":"k-group-start","group-end":"k-group-end","button-group":"k-button-group","button-group-stretched":"k-button-group-stretched",ltr:"k-ltr",rtl:"k-rtl"},Ke=":not(.k-dropdownlist button):not(.k-colorpicker button):not(.k-split-button .k-split-button-arrow)",Fe=["button"+Ke,".k-button-group > button"+Ke,".k-colorpicker",".k-dropdownlist"],ot={styles:nt},oe=ot.styles;class ze extends n.Component{constructor(o){super(o),this._element=null,i.validatePackage(P)}render(){const o=this.mapButtons(this.props.children),t=i.classNames([oe["button-group"]],{["k-disabled"]:this.props.disabled,[oe["button-group-stretched"]]:!!this.props.width},this.props.className),a={className:t,style:{width:`${this.props.width}`},dir:this.props.dir,role:"group","aria-disabled":this.props.disabled};return n.createElement("div",{ref:l=>{this._element=l},...a,className:t},o)}mapButtons(o){const t=n.Children.count(o),a=this.props.dir!==void 0?this.props.dir==="rtl":this._element&&getComputedStyle(this._element).direction==="rtl"||!1;return n.Children.map(o,(l,r)=>n.isValidElement(l)?this.renderButton(l,r,r===t-1,a):l)}renderButton(o,t,a,l){const r=i.classNames(o.props.className,{[oe["group-start"]]:l?a:t===0,[oe["group-end"]]:l?t===0:a}),u={...this.props.width?{width:this.props.width}:{},...o.props.style||{}},c=this.props.disabled||o.props.disabled,b={...o.props,...r?{className:r}:{},...Object.keys(u).length?{style:u}:{},...c!==void 0?{disabled:c}:{}};return n.Children.count(o.props.children)>0?n.cloneElement(o,b,o.props.children):n.cloneElement(o,b)}}ze.propTypes={children:s.oneOfType([s.arrayOf(s.element),s.element]),className:s.string,disabled:s.bool,width:s.string,dir:s.string};const ke=e=>{const o=n.useCallback(r=>{e.onClick(r,e.index)},[e]),t=e.dataItem.render||e.item||(e.item===void 0?e.render:null),a=e.dataItem.text!==void 0?e.dataItem.text:e.textField?e.dataItem[e.textField]:e.dataItem,l=n.createElement("li",{id:e.id,className:i.classNames("k-item",e.className,{"k-focus":e.focused}),tabIndex:-1,onClick:o,onMouseDown:e.onDown,onPointerDown:e.onDown,role:"menuitem","aria-disabled":e.dataItem.disabled||void 0},n.createElement("span",{tabIndex:-1,className:i.classNames("k-link k-menu-link",{"k-selected":e.dataItem.selected,"k-disabled":e.dataItem.disabled}),key:"icon"},t?n.createElement(t,{item:e.dataItem,itemIndex:e.index}):n.createElement(n.Fragment,null,(e.dataItem.icon||e.dataItem.iconClass)&&n.createElement(i.IconWrap,{className:e.dataItem.iconClass,name:e.dataItem.icon,icon:e.dataItem.svgIcon}),e.dataItem.imageUrl&&n.createElement("img",{role:"presentation",alt:"",src:e.dataItem.imageUrl,className:"k-icon"}),a&&n.createElement("span",{className:"k-menu-link-text"},a))));return e.item!==void 0&&e.render!==void 0?e.render.call(void 0,l,e):l};ke.displayName="KendoReactButtonItem";class ve extends n.Component{render(){return null}}ve.propTypes={text:s.string,icon:s.string,iconClass:s.string,imageUrl:s.string,disabled:s.bool,render:s.any};const Me=(e,o,t,a)=>{if(t)return e;const l=Math.min(a-1,Math.max(0,e));switch(o){case i.Keys.enter:case i.Keys.space:case i.Keys.esc:return-1;case i.Keys.up:case i.Keys.left:return l-1<0?a-1:l-1;case i.Keys.down:case i.Keys.right:return l+1>=a?0:l+1;case i.Keys.home:return 0;case i.Keys.end:return a-1;default:return e}};function Te(e){let o={horizontal:"left",vertical:"bottom"};return e&&(o.horizontal="right"),o}function Re(e){let o={horizontal:"left",vertical:"top"};return e&&(o.horizontal="right"),o}let re=class extends n.Component{constructor(o){super(o),this.state={focused:!1,focusedIndex:-1,opened:!1},this.wrapper=null,this.mainButton=null,this.list=null,this.skipFocus=!1,this.buttonsData=[],this.onKeyDown=t=>{const{focusedIndex:a}=this.state;if(t.altKey){!this.opened&&t.keyCode===i.Keys.down?(this.dispatchPopupEvent(t,!0),this.setState({focusedIndex:0}),this.setOpen(!0)):this.opened&&t.keyCode===i.Keys.up&&(this.setState({focusedIndex:-1}),this.setOpen(!1));return}let l;if(t.keyCode===i.Keys.enter||t.keyCode===i.Keys.space){if(t.preventDefault(),this.dispatchClickEvent(t,a),a>=0){l={focusedIndex:this.opened?-1:0};const r=!this.opened;this.setOpen(r),r&&this.dispatchPopupEvent(t,r)}}else if(this.opened&&t.keyCode===i.Keys.esc){this.setState({focusedIndex:-1}),this.setOpen(!1);return}if(this.opened){const r=Me(a,t.keyCode,t.altKey,this.buttonsData.length);r!==a&&(l=l||{},l.focusedIndex=r);const u=t.keyCode===i.Keys.up||t.keyCode===i.Keys.down||t.keyCode===i.Keys.left||t.keyCode===i.Keys.right;!t.altKey&&(u||t.keyCode===i.Keys.home||t.keyCode===i.Keys.end)&&t.preventDefault()}l&&this.setState(l)},this.switchFocus=t=>{this.skipFocus=!0,t(),window.setTimeout(()=>this.skipFocus=!1,0)},this.onFocus=t=>{this.skipFocus||(i.dispatchEvent(this.props.onFocus,t,this,void 0),this.setState({focused:!0}))},this.setOpen=t=>{this.openedDuringOnChange=t,this.setState({opened:t})},this.onItemClick=(t,a)=>{this.opened&&(this.setState({focusedIndex:0}),this.setOpen(!1)),this.dispatchClickEvent(t,a)},this.onBlur=t=>{this.skipFocus||(this.setState({focused:!1,focusedIndex:-1}),this.setOpen(!1),i.dispatchEvent(this.props.onBlur,t,this,void 0))},this.onPopupClose=()=>{this.state.focused&&this.switchFocus(()=>{this.element&&(this.element.removeAttribute("tabindex"),this.element.focus({preventScroll:!0}))}),this.dispatchPopupEvent({},!1)},this.listRef=t=>{this.list=t,t&&this.state.focused&&this.switchFocus(()=>{t.focus({preventScroll:!0}),this.element&&(this.element.tabIndex=-1)})},this.onSplitPartClick=t=>{if(this.buttonsData.length){const a=!this.opened;a&&this.dispatchPopupEvent(t,a),this.setState({focusedIndex:a?0:-1,focused:!0}),this.setOpen(a)}},this.onDownSplitPart=t=>{t.preventDefault();const a=i.getActiveElement(document);this.element&&a!==this.element&&a!==this.list&&this.element.focus()},this.onItemDown=t=>{i.getActiveElement(document)===this.list&&t.preventDefault()},this.dispatchPopupEvent=(t,a)=>{i.dispatchEvent(a?this.props.onOpen:this.props.onClose,t,this,void 0),this.openedDuringOnChange=void 0},i.validatePackage(P)}get guid(){return this.props.id?this.props.id+"-accessibility-id":this.props.id}get opened(){return this.openedDuringOnChange!==void 0?this.openedDuringOnChange:this.props.opened===void 0?this.state.opened:this.props.opened}render(){this.buttonsData=this.props.items||n.Children.toArray(this.props.children).filter(c=>c&&c.type===ve).map(c=>c.props);const o=this.isRtl(),t=o?"rtl":void 0,{id:a,style:l,tabIndex:r,disabled:u}=this.props;return n.createElement("div",{id:a,style:l,className:i.classNames("k-split-button","k-button-group",{"k-focus":this.state.focused},`k-rounded-${i.kendoThemeMaps.roundedMap[this.props.rounded||"medium"]}`,this.props.className),onKeyDown:this.onKeyDown,onFocus:this.onFocus,onBlur:this.onBlur,dir:t,ref:c=>this.wrapper=c},n.createElement(_,{ref:c=>this.mainButton=c&&c.element,type:"button",size:this.props.size,rounded:this.props.rounded,fillMode:this.props.fillMode,themeColor:this.props.themeColor,onClick:c=>this.onItemClick(c,-1),disabled:u||void 0,tabIndex:r,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":u,"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),n.createElement(_,{type:"button",size:this.props.size,rounded:this.props.rounded,fillMode:this.props.fillMode,themeColor:this.props.themeColor,icon:"caret-alt-down",svgIcon:Pe.caretAltDownIcon,className:"k-split-button-arrow",disabled:u||void 0,tabIndex:-1,onClick:this.onSplitPartClick,onMouseDown:this.onDownSplitPart,onPointerDown:this.onDownSplitPart,dir:t,"aria-label":"menu toggling button"}),this.renderPopup(o))}componentDidMount(){(this.props.dir===void 0&&this.isRtl()||this.opened)&&this.forceUpdate()}get element(){return this.mainButton}dispatchClickEvent(o,t){this.isItemDisabled(t)||(t===-1?i.dispatchEvent(this.props.onButtonClick,o,this,void 0):i.dispatchEvent(this.props.onItemClick,o,this,{item:this.buttonsData[t],itemIndex:t}))}renderPopup(o){const{popupSettings:t={}}=this.props,{focusedIndex:a}=this.state;return n.createElement(ye.Popup,{anchor:this.wrapper,show:this.opened,animate:t.animate,popupClass:i.classNames("k-menu-popup",t.popupClass),anchorAlign:t.anchorAlign||Te(o),popupAlign:t.popupAlign||Re(o),style:o?{direction:"rtl"}:void 0,onClose:this.onPopupClose},n.createElement("ul",{role:"menu",id:this.guid,"aria-labelledby":"button-"+this.guid,tabIndex:-1,ref:this.listRef,"aria-activedescendant":a>=0?`${this.guid}-${a}`:void 0,className:i.classNames("k-group k-menu-group k-reset",{[`k-menu-group-${i.kendoThemeMaps.sizeMap[this.props.size]||this.props.size}`]:this.props.size})},this.renderChildItems()))}renderChildItems(){const{item:o,itemRender:t,textField:a}=this.props;return this.buttonsData.length>0?this.buttonsData.map((l,r)=>n.createElement(ke,{className:"k-menu-item",dataItem:l,textField:a,focused:this.state.focusedIndex===r,onClick:this.onItemClick,onDown:this.onItemDown,render:t,item:o,key:r,index:r,id:`${this.guid}-${r}`})):null}isItemDisabled(o){return this.buttonsData[o]?this.buttonsData[o].disabled:this.props.disabled}isRtl(){return this.props.dir!==void 0?this.props.dir==="rtl":!!this.wrapper&&getComputedStyle(this.wrapper).direction==="rtl"}};re.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:i.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};re.defaultProps={size:"medium",rounded:"medium",fillMode:"solid",themeColor:"base"};class Ce extends n.Component{render(){return null}}Ce.propTypes={text:s.string,icon:s.string,iconClass:s.string,imageUrl:s.string,selected:s.bool,disabled:s.bool,render:s.any};let ce=class extends n.Component{constructor(o){super(o),this.state={opened:!1,focused:!1,focusedIndex:-1},this.mainButton=null,this.list=null,this.skipFocus=!1,this.buttonsData=[],this.onKeyDown=t=>{const{focusedIndex:a}=this.state;if(t.altKey){!this.opened&&t.keyCode===i.Keys.down?(this.setOpen(!0),this.dispatchPopupEvent(t,!0),this.setState({focusedIndex:0})):this.opened&&t.keyCode===i.Keys.up&&(this.setState({focusedIndex:-1}),this.setOpen(!1));return}const l={...this.state};if(t.keyCode===i.Keys.enter||t.keyCode===i.Keys.space){a>=0&&this.dispatchClickEvent(t,a);const r=!this.opened;this.setState({focused:!0,focusedIndex:r?0:-1}),this.setOpen(r),r&&this.dispatchPopupEvent(t,r);return}if(this.opened&&t.keyCode===i.Keys.esc){this.setState({focusedIndex:-1}),this.setOpen(!1);return}if(this.opened){const r=Me(a,t.keyCode,t.altKey,this.buttonsData.length);l.focusedIndex=r;const u=t.keyCode===i.Keys.up||t.keyCode===i.Keys.down||t.keyCode===i.Keys.left||t.keyCode===i.Keys.right;!t.altKey&&(u||t.keyCode===i.Keys.home||t.keyCode===i.Keys.end)&&t.preventDefault()}this.setState(l)},this.switchFocus=t=>{this.skipFocus=!0,t(),window.setTimeout(()=>this.skipFocus=!1,0)},this.handleFocus=t=>{this.skipFocus||(this.setState({focused:!0,focusedIndex:this.opened?0:-1}),i.dispatchEvent(this.props.onFocus,t,this,void 0))},this.handleButtonBlur=t=>{this.opened||(this.setState({focused:!1}),i.dispatchEvent(this.props.onBlur,t,this,void 0))},this.handleMenuBlur=t=>{this.skipFocus||(this.setState({focused:!1,focusedIndex:-1}),this.setOpen(!1),i.dispatchEvent(this.props.onBlur,t,this,void 0))},this.setOpen=t=>{this.openedDuringOnChange=t,this.setState({opened:t})},this.onItemClick=(t,a)=>{this.setState({focusedIndex:-1}),this.setOpen(!1),this.dispatchClickEvent(t,a)},this.onItemDown=t=>{i.getActiveElement(document)===this.list&&t.preventDefault()},this.mouseDown=t=>{t.preventDefault();const a=i.getActiveElement(document);this.element&&a!==this.element&&a!==this.list&&this.element.focus()},this.onPopupClose=()=>{this.switchFocus(()=>{this.element&&(this.element.removeAttribute("tabindex"),this.element.focus({preventScroll:!0}))}),this.dispatchPopupEvent({},!1)},this.listRef=t=>{this.list=t,t&&this.state.focused&&this.switchFocus(()=>{t.focus({preventScroll:!0}),this.element&&(this.element.tabIndex=-1)})},this.onClickMainButton=t=>{if(!this.buttonsData.length)return;const a=!this.opened;this.setState({focused:!0,focusedIndex:a?0:-1}),this.setOpen(a),a&&this.dispatchPopupEvent(t,a)},this.dispatchPopupEvent=(t,a)=>{i.dispatchEvent(a?this.props.onOpen:this.props.onClose,t,this,void 0),this.openedDuringOnChange=void 0},i.validatePackage(P)}get guid(){return this.props.id+"-accessibility-id"}get opened(){return this.openedDuringOnChange!==void 0?this.openedDuringOnChange:this.props.opened===void 0?this.state.opened:this.props.opened}render(){const o=this.isRtl(),t=o?"rtl":void 0,{id:a,style:l,tabIndex:r,disabled:u}=this.props;return this.buttonsData=this.props.items||n.Children.toArray(this.props.children).filter(c=>c&&c.type===Ce).map(c=>c.props),n.createElement(n.Fragment,null,n.createElement(_,{id:a,size:this.props.size,style:l,rounded:this.props.rounded,fillMode:this.props.fillMode,themeColor:this.props.themeColor,onClick:this.onClickMainButton,onMouseDown:this.mouseDown,onKeyDown:this.onKeyDown,onFocus:this.handleFocus,onBlur:this.handleButtonBlur,"aria-disabled":u?"true":void 0,tabIndex:r,accessKey:this.props.accessKey,icon:this.props.icon,svgIcon:this.props.svgIcon,iconClass:this.props.iconClass,className:i.classNames(this.props.buttonClass,"k-menu-button","k-dropdown-button",{"k-focus":this.state.focused},{"k-disabled":u}),imageUrl:this.props.imageUrl,dir:t,ref:c=>this.mainButton=c&&c.element,type:"button","aria-haspopup":"menu","aria-expanded":this.opened?"true":"false","aria-label":this.props.ariaLabel,"aria-controls":this.opened?this.guid:void 0,title:this.props.title},this.props.text),this.renderPopup(o))}componentDidMount(){(this.props.dir===void 0&&this.isRtl()||this.opened)&&this.forceUpdate()}get element(){return this.mainButton}dispatchClickEvent(o,t){this.isItemDisabled(t)||i.dispatchEvent(this.props.onItemClick,o,this,{item:this.buttonsData[t],itemIndex:t})}renderPopup(o){const{popupSettings:t={},id:a}=this.props,{focusedIndex:l}=this.state;return n.createElement(ye.Popup,{anchor:this.mainButton,show:this.opened,animate:t.animate,popupClass:i.classNames("k-menu-popup",t.popupClass),anchorAlign:t.anchorAlign||Te(o),popupAlign:t.popupAlign||Re(o),style:o?{direction:"rtl"}:void 0,onClose:this.onPopupClose},n.createElement("ul",{role:"menu",id:this.guid,"aria-labelledby":a,tabIndex:-1,"aria-activedescendant":l>=0?`${this.guid}-${l}`:void 0,ref:this.listRef,onKeyDown:this.onKeyDown,onBlur:this.handleMenuBlur,className:i.classNames("k-group k-menu-group k-reset",{[`k-menu-group-${i.kendoThemeMaps.sizeMap[this.props.size]||this.props.size}`]:this.props.size})},this.renderChildItems()))}renderChildItems(){const{item:o,itemRender:t,textField:a}=this.props;return this.buttonsData.length>0?this.buttonsData.map((l,r)=>n.createElement(ke,{className:"k-menu-item",dataItem:l,textField:a,focused:this.state.focusedIndex===r,onClick:this.onItemClick,onDown:this.onItemDown,render:t,item:o,index:r,key:r,id:`${this.guid}-${r}`})):null}isItemDisabled(o){return this.buttonsData[o]?this.buttonsData[o].disabled:this.props.disabled}isRtl(){return this.props.dir!==void 0?this.props.dir==="rtl":!!this.mainButton&&getComputedStyle(this.mainButton).direction==="rtl"}};ce.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:i.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};ce.defaultProps={size:"medium",rounded:"medium",fillMode:"solid",themeColor:"base"};const ge=class extends n.Component{constructor(e){super(e),this._element=null,this.offsetHeight=0,this.offsetWidth=0,this.buttons=[],this.focusedSelector=this.selectors.map(o=>o+":focus").join(","),this.setTabIndex=o=>{const{tabIndex:t=ge.defaultProps.tabIndex}=this.props;this.buttons.forEach((a,l)=>{a.tabIndex=l===o?t:-1})},this.onKeyDown=o=>{const t=o.target;if(!(o.keyCode===i.Keys.left||o.keyCode===i.Keys.right)||o.defaultPrevented||this.buttons.findIndex(r=>r===t)===-1)return;const l=this.focusedIndex;o.keyCode===i.Keys.left?this.focusButton(l,l-1):this.focusButton(l,l+1)},this.onWindowResize=o=>{const t=this.element;if(!t)return;const a=t.offsetWidth,l=t.offsetHeight;if(this.offsetWidth!==a||this.offsetHeight!==l){this.offsetWidth=a,this.offsetHeight=l;const r={offsetWidth:this.offsetWidth,offsetHeight:this.offsetHeight};this.props.onResize&&this.props.onResize.call(void 0,{target:this,...r,nativeEvent:o})}},i.validatePackage(P)}get selectors(){return this.props.buttons||Fe}get focusedIndex(){const e=this.element&&this.element.querySelector(this.focusedSelector);return Math.max(0,this.buttons.findIndex(o=>o===e))}get element(){return this._element}componentDidMount(){window.addEventListener("resize",this.onWindowResize);const e=this.element;e&&(this.offsetWidth=e.offsetWidth,this.offsetHeight=e.offsetHeight,this.props.keyboardNavigation!==!1&&(this.buttons=Array.from(e.querySelectorAll(this.selectors.join(","))),this.setTabIndex(0)))}componentDidUpdate(){const e=this.element;!e||this.props.keyboardNavigation===!1||(this.buttons=Array.from(e.querySelectorAll(this.selectors.join(","))),this.setTabIndex(this.focusedIndex))}componentWillUnmount(){window.removeEventListener("resize",this.onWindowResize),this.buttons.length=0}render(){return n.createElement("div",{id:this.props.id,"aria-label":this.props.ariaLabel,className:i.classNames("k-toolbar",{[`k-toolbar-${i.kendoThemeMaps.sizeMap[this.props.size]||this.props.size}`]:this.props.size},this.props.className),style:this.props.style,role:this.props.role!==void 0?this.props.role||void 0:"toolbar",dir:this.props.dir,ref:e=>this._element=e,onKeyDown:this.props.keyboardNavigation!==!1?this.onKeyDown:void 0},this.props.children)}focusButton(e,o){const{tabIndex:t=ge.defaultProps.tabIndex}=this.props,a=this.buttons[o];if(a){a.tabIndex=t,a.focus();const l=this.buttons[e];l&&(l.tabIndex=-1)}}};let Ie=ge;Ie.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),size:s.oneOf([null,"small","medium","large"])};Ie.defaultProps={tabIndex:0,size:"medium"};class Oe extends n.PureComponent{constructor(){super(...arguments),this._element=null}get element(){return this._element}render(){return n.createElement("div",{id:this.props.id,className:i.classNames("k-toolbar-item",this.props.className),style:this.props.style,ref:o=>this._element=o},this.props.children)}}Oe.propTypes={className:s.string};class it extends n.PureComponent{render(){return n.createElement("div",{className:i.classNames("k-separator",this.props.className)})}}const xe=n.forwardRef((e,o)=>{const t=n.useRef(null),a=n.useRef(null);n.useImperativeHandle(a,()=>({element:t.current})),n.useImperativeHandle(o,()=>({element:t.current}));const l=n.useMemo(()=>i.classNames("k-spacer",e.className),[e.className]);return n.createElement("span",{ref:t,className:l})});xe.displayName="KendoReactToolbarSpacer";xe.propTypes={className:s.string};const Ae=le.createContext([null,e=>{}]),$e=le.createContext([null,e=>{}]),_e=le.createContext([null,e=>{}]);var X=(e=>(e.next="next",e.prev="prev",e.current="current",e.reset="reset",e))(X||{});const at=(e,o)=>{const t=o.items.findIndex(a=>a===e);switch(o.type){case"next":return t===o.items.length-1?e:o.items[t+1];case"prev":return t===0?e:o.items[t-1];case"current":return o.payload;case"reset":return null;default:return e}};var We=(e=>(e.remove="remove",e.add="add",e.reorder="reorder",e))(We||{});const lt=(e,o)=>{switch(o.type){case"add":break;case"remove":return e.filter(t=>t[o.valueField]!==o.payload);case"reorder":break;default:return e}};var ae=(e=>(e.toggle="toggle",e.remove="remove",e))(ae||{});const rt=(e,o)=>{switch(o.selection){case"single":switch(o.type){case"toggle":{if(!Array.isArray(e)||e===null)return o.payload===e?null:o.payload;throw new Error("State cannot be an array in single selection")}case"remove":return o.payload===e?null:e;default:return e}case"multiple":switch(o.type){case"toggle":{if(Array.isArray(e))return e.some(t=>t===o.payload)?e.filter(t=>t!==o.payload):[...e,o.payload];if(e===null)return[o.payload];throw new Error("State cannot be non-array in multiple selection")}case"remove":return Array.isArray(e)?e.some(t=>t===o.payload)?e.filter(t=>t!==o.payload):[...e,o.payload]:e;default:return e}case"none":return null;default:return e}},z=n.forwardRef((e,o)=>{i.validatePackage(P);const t=n.useRef(null),a=n.useRef(null),l=i.useDir(a,e.dir);n.useImperativeHandle(t,()=>({element:a.current,props:e})),n.useImperativeHandle(o,()=>t.current);const[r,u]=n.useContext(Ae),[c,b]=n.useContext($e),[,k]=n.useContext(_e),h=n.useMemo(()=>e.selected||(Array.isArray(r)?r.some(p=>p===e.value):r===e.value),[e.selected,e.value,r]),I=n.useMemo(()=>c===e.value,[e.value,c]);n.useEffect(()=>{I&&a.current&&a.current.focus()},[I]);const E=n.useCallback(p=>{u({type:ae.toggle,payload:e.value,event:p})},[u,e.value]),x=n.useCallback(p=>{e.removable&&(k({type:We.remove,payload:e.value,event:p}),b({type:X.reset,payload:e.value,event:p}),u({type:ae.remove,payload:e.value,event:p}),e.onRemove&&e.onRemove.call(void 0,{target:t.current,syntheticEvent:p}))},[e.onRemove,e.value,e.removable,k,b,u]),w=n.useCallback(p=>{switch(p.keyCode){case i.Keys.left:b({type:X.prev,payload:e.value,event:p});break;case i.Keys.right:b({type:X.next,payload:e.value,event:p});break;case i.Keys.enter:u({type:ae.toggle,payload:e.value,event:p});break;case i.Keys.delete:x(p);break}e.onKeyDown&&e.onKeyDown.call(void 0,{target:t.current,syntheticEvent:p})},[e.onKeyDown,e.value,b,u,x]),N=n.useCallback(p=>{b({payload:e.value,type:X.current,event:p}),e.onFocus&&e.onFocus.call(void 0,{target:t.current,syntheticEvent:p})},[e.onFocus,e.value,b]),C=n.useCallback(p=>{e.onBlur&&e.onBlur.call(void 0,{target:t.current,syntheticEvent:p})},[e.onBlur]),D=i.useMouse(e,t,{onClick:E});return n.createElement("div",{...D,role:e.role||"button",id:e.value,style:e.style,ref:a,dir:l,tabIndex:i.getTabIndex(e.tabIndex,e.disabled,void 0),className:i.classNames("k-chip",{"k-rtl":l==="rtl","k-disabled":e.disabled,"k-selected":h,"k-focus":I,[`k-chip-${i.kendoThemeMaps.sizeMap[e.size]||e.size}`]:e.size,[`k-rounded-${i.kendoThemeMaps.roundedMap[e.rounded]||e.rounded}`]:e.rounded,[`k-chip-${e.fillMode}`]:e.fillMode,[`k-chip-${e.fillMode}-${e.themeColor}`]:!!(e.fillMode&&e.themeColor)},e.className),"aria-pressed":e.role?void 0:h,"aria-disabled":e.disabled,"aria-describedby":e.ariaDescribedBy,"aria-keyshortcuts":e.removable?"Enter Delete":void 0,onFocus:N,onBlur:C,onKeyDown:w},h&&(e.selectedIcon||e.selectedSvgIcon)&&n.createElement(i.IconWrap,{className:"k-chip-icon",name:e.selectedIcon?i.toIconName(e.selectedIcon):void 0,icon:e.selectedSvgIcon,size:"small"}),(e.icon||e.svgIcon)&&n.createElement(i.IconWrap,{className:"k-chip-icon",name:e.icon?i.toIconName(e.icon):void 0,icon:e.svgIcon,size:"small"}),e.avatar&&n.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},n.createElement("span",{className:"k-avatar-image"},n.createElement("img",{src:e.avatar.image,alt:e.avatar.imageAlt}))),n.createElement("span",{className:"k-chip-content"},e.children!==void 0?e.children:e.text&&n.createElement("span",{"aria-label":e.ariaLabel||e.text,className:"k-chip-label"},e.text)),e.removable&&n.createElement("span",{className:"k-chip-actions"},n.createElement("span",{className:i.classNames("k-chip-action","k-chip-remove-action"),onClick:x},n.createElement(i.IconWrap,{name:e.removeIcon?i.toIconName(e.removeIcon):void 0,icon:e.removeSvgIcon||Pe.xCircleIcon,size:"small"}))))}),ct={id:s.string,text:s.string,value:s.any,dir:s.oneOf(["ltr","rtl"]),removable:s.bool,removeIcon:s.string,removeIconSvg:i.svgIconPropType,disabled:s.bool,icon:s.string,svgIcon:i.svgIconPropType,selectedIcon:s.string,selectedIconSvg:i.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"])},dt={disabled:!1,removable:!1,removeIcon:"k-i-x-circle",dir:"ltr",size:"medium",rounded:"medium",fillMode:"solid",themeColor:"base"};z.displayName="KendoReactChip";z.propTypes=ct;z.defaultProps=dt;const ut=(e,o,t)=>{const[a,l]=n.useState(e);return[a,u=>{const c=rt(o.state||a,{...u,...o});t&&t(c,u.event),l(c)}]},ht=e=>{const[o,t]=n.useState(null);return[o,l=>{const r=at(l.payload,{...l,...e});t(r)}]},pt=(e,o,t)=>{const[a,l]=n.useState(e);return[a,u=>{const c=lt(o.state||a,{...u,...o});t&&t(c,u.event),l(c)}]},de=n.forwardRef((e,o)=>{i.validatePackage(P);const t=n.useRef(null),a=n.useRef(null),l=i.useDir(a,e.dir),{chip:r,id:u,style:c,tabIndex:b,disabled:k,size:h,className:I,ariaDescribedBy:E,ariaLabelledBy:x,ariaLabel:w,selection:N=$.selection,value:C=$.defaultValue,defaultData:D=$.defaultData,valueField:p=$.valueField,textField:M=$.textField,onChange:B,onDataChange:S}=e,T=n.useMemo(()=>r||z,[r,z]);n.useImperativeHandle(t,()=>({element:a.current,props:e})),n.useImperativeHandle(o,()=>t.current);const F=n.useCallback((m,g)=>{B&&t.current&&B.call(void 0,{value:m,target:t.current,syntheticEvent:g})},[B]),[W,L]=ut(C,{selection:N,state:C},F),J=n.useCallback((m,g)=>{S&&t.current&&S.call(void 0,{value:m,target:t.current,syntheticEvent:g})},[S]),[H,Q]=pt(e.data||D,{state:e.data,valueField:p},J),U=n.useCallback((m,g)=>(m.push(g[p]),m),[p]),R=n.useMemo(()=>e.data||H,[e.data,H]),Y=n.useMemo(()=>C||W,[C,W]),ee=n.useMemo(()=>R.reduce(U,[]),[R,U]),j=n.useCallback(m=>i.getter(p)(m),[p]),y=n.useCallback(m=>i.getter(M)(m),[M]),[he,pe]=ht({items:ee}),te=i.useMouse(e,t);return n.createElement(Ae.Provider,{value:[Y,L]},n.createElement($e.Provider,{value:[he,pe]},n.createElement(_e.Provider,{value:[R,Q]},n.createElement("div",{ref:a,...te,role:k?void 0:"listbox",id:u,dir:l,style:c,tabIndex:i.getTabIndex(b,k,void 0),className:i.classNames("k-chip-list",{"k-rtl":l==="rtl","k-disabled":k,[`k-chip-list-${i.kendoThemeMaps.sizeMap[h]||h}`]:h},I),"aria-label":w,"aria-labelledby":x,"aria-describedby":E,"aria-orientation":"horizontal","aria-multiselectable":N==="multiple"},R.map((m,g)=>n.createElement(T,{role:"option",dataItem:m,size:h,key:[j(m),g].join("-"),text:y(m),value:j(m),ariaLabel:m.ariaLabel,svgIcon:m.svgIcon||void 0}))))))}),mt={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"])},$={chip:z,size:"medium",disabled:!1,defaultValue:null,defaultData:[],dir:"ltr",selection:"none",textField:"text",valueField:"value",removable:"removable"};de.displayName="KendoReactChipList";de.propTypes=mt;de.defaultProps=$;const ue=n.forwardRef((e,o)=>{const{className:t,disabled:a,text:l,icon:r,style:u,id:c,focused:b,tabIndex:k,index:h,dataItem:I,item:E,svgIcon:x,onDown:w,onClick:N,...C}=e,D=n.useRef(null),p=n.useCallback(()=>{D.current&&D.current.focus()},[]),M=n.useCallback(()=>({element:D.current,focus:p}),[p]);n.useImperativeHandle(o,M);const B=n.useCallback(F=>{N&&h!==void 0&&!a&&N(F,h)},[N,h]),S=n.useMemo(()=>i.classNames("k-fab-item",{"k-focus":b,"k-disabled":a},t),[t,a,b]),T=E;return n.createElement("li",{ref:D,id:c,className:S,style:u,role:"menuitem",tabIndex:i.getTabIndex(k,a),"aria-disabled":a,"aria-label":`${l||""} floatingactionbutton item`,onClick:B,onMouseDown:w,onPointerDown:w,...C},T?n.createElement(T,{itemIndex:h,item:I}):n.createElement(n.Fragment,null,l&&n.createElement("span",{className:"k-fab-item-text"},l),r||x?n.createElement(i.IconWrap,{className:"k-fab-item-icon",name:r,icon:x}):null))});ue.propTypes={className:s.string,style:s.object,children:s.any,disabled:s.bool,focused:s.bool,index:s.number,icon:s.string,svgIcon:i.svgIconPropType,text:s.string,tabIndex:s.number,customProp:s.any};ue.displayName="KendoFloatingActionButtonItem";const Se="16px",ie=e=>typeof e=="number"?e+"px":e,ft=(e,o)=>{const t={horizontal:o?"right":"left",vertical:"bottom"};return e.horizontal==="end"&&(t.horizontal=o?"left":"right"),t},bt=(e,o)=>{const t={horizontal:o?"right":"left",vertical:"top"};return e.horizontal==="end"&&(t.horizontal=o?"left":"right"),t},gt=(e,o)=>{const t=o==="end"?"end":"start";return{rtl:{end:"k-text-left",start:"k-text-right"},ltr:{start:"k-text-left",end:"k-text-right"}}[e][t]},yt=(e,o,t,a)=>{const l=o.horizontal,r=o.vertical;if(e.current){const u=t&&t.x!==void 0?ie(t.x):Se,c=t&&t.x!==void 0?`calc(50% + ${ie(t.x)})`:"50%",b=t&&t.y!==void 0?ie(t.y):Se,k=t&&t.y!==void 0?`calc(50% + ${ie(t.y)})`:"50%";e.current.style.setProperty(kt(o,a),l==="center"?c:u),e.current.style.setProperty(vt(o),r==="middle"?k:b),a&&((r==="top"||r==="bottom")&&l==="start"&&e.current.style.setProperty("left","unset"),r==="middle"&&l==="end"&&e.current.style.setProperty("right","unset"),r==="middle"&&l==="start"&&e.current.style.setProperty("left","unset"))}},kt=(e,o)=>{const{horizontal:t}=e;return{end:o?"left":"right",center:"left",start:o?"right":"left"}[t||"end"]},vt=e=>({top:"top",middle:"top",bottom:"bottom"})[e.vertical||"bottom"],Ct=2,It=100,De=n.forwardRef((e,o)=>{i.validatePackage(P);const{align:t=Z.align,alignOffset:a,className:l,disabled:r,icon:u,svgIcon:c,iconClass:b,id:k,items:h,item:I,text:E,positionMode:x=Z.positionMode,size:w=Z.size,style:N,rounded:C=Z.rounded,themeColor:D=Z.themeColor,overlayStyle:p,tabIndex:M,accessKey:B,popupSettings:S={},modal:T,onClick:F,onItemClick:W,onFocus:L,onBlur:J,onKeyDown:H,onOpen:Q,onClose:U,...R}=e,Y=i.useZIndexContext(),ee=Y?Y+Ct:It,j=n.useRef(null),y=n.useRef(null),he=n.useRef(null),pe=n.useRef(null),te=n.useCallback(()=>{y.current&&y.current.focus()},[]),m=n.useCallback(()=>({element:y.current,focus:te}),[te]);n.useImperativeHandle(j,m),n.useImperativeHandle(o,()=>j.current);const[g,K]=n.useState(!1),[se,O]=n.useState(!1),[q,v]=n.useState(-1),Ue=i.useId()+"-button-id",me=i.useDir(y,e.dir),V=me==="rtl",ne=i.useId()+"-list-id";n.useEffect(()=>{yt(y,t,a,V)},[y,t,a,V]),n.useEffect(()=>{se&&y&&y.current&&y.current.focus()},[se,y]);const A=n.useCallback((d,f)=>{h&&i.dispatchEvent(f?Q:U,d,m(),void 0)},[Q,U,h]),Ee=n.useCallback(d=>{!d.target||r||(!h&&F?i.dispatchEvent(F,d,m(),void 0):(K(!g),O(!0),v(g?-1:0),A(d,!g)))},[K,O,v,F,A,g,h,r]),je=n.useCallback(d=>{O(!0),v(g?0:-1),L&&i.dispatchEvent(L,d,m(),void 0)},[L,O,v]),qe=n.useCallback(d=>{O(!1),K(!1),v(-1),i.dispatchEvent(J,d,m(),void 0),g&&A(d,!1)},[J,O,K,v,A]),Ve=n.useCallback(d=>{d.preventDefault()},[]),fe=n.useCallback((d,f)=>{h&&(h[f].disabled||i.dispatchEvent(W,d,m(),{itemProps:h[f],itemIndex:f}))},[W]),Ze=n.useCallback((d,f)=>{!d.target||!h||(v(f),K(!1),fe(d,f),A(d,!1))},[v,K,fe,A]),Ge=n.useCallback(d=>{i.getActiveElement(document)===y.current&&d.preventDefault()},[y]),Xe=n.useCallback(d=>{const f=q,be=h?h.length:-1;if(d.altKey){!g&&d.keyCode===i.Keys.down&&(d.preventDefault(),K(!0),v(0)),g&&d.keyCode===i.Keys.up&&(d.preventDefault(),K(!1),v(-1));return}switch(d.keyCode){case i.Keys.enter:case i.Keys.space:f>=0&&fe(d,f),h||Ee(d),d.preventDefault(),K(!g),v(g?-1:0);break;case i.Keys.esc:d.preventDefault(),K(!1),v(-1);break;case i.Keys.home:d.preventDefault(),v(0);break;case i.Keys.end:d.preventDefault(),v(be-1);break;case i.Keys.down:case i.Keys.right:d.preventDefault(),v(f+1>=be?0:f+1);break;case i.Keys.up:case i.Keys.left:d.preventDefault(),v(f-1<0?be-1:f-1);break}i.dispatchEvent(H,d,m(),void 0)},[H,q,v,V,K]),Je=n.useMemo(()=>i.classNames("k-fab k-fab-solid",{"k-fab-sm":w==="small","k-fab-md":w==="medium","k-fab-lg":w==="large","k-disabled":r,"k-pos-absolute":x==="absolute","k-pos-fixed":x==="fixed","k-focus":se,[`k-rounded-${i.kendoThemeMaps.roundedMap[C]||C}`]:C,[`k-fab-solid-${D}`]:D},`k-${t.vertical}-${t.horizontal}`,l),[D,w,C,r,x,t,se,l]),Qe=h&&h.map((d,f)=>n.createElement(ue,{...d,key:f,index:f,id:`${ne}-${f}`,disabled:r||d.disabled,focused:q===f,dataItem:d,item:I,className:i.classNames(d.className,gt(me||"ltr",t.horizontal)),onClick:Ze,onDown:Ge})),we=!!((u||c)&&!E),Ye=y.current?y.current.offsetWidth:0,et=32,Ne=Ye/2-et/2;return n.createElement(i.ZIndexContext.Provider,{value:ee},n.createElement(n.Fragment,null,n.createElement("button",{ref:y,id:k||Ue,role:"button",type:"button","aria-disabled":r,"aria-expanded":h?g:void 0,"aria-haspopup":!!h,"aria-label":`${E||""} floatingactionbutton`,"aria-owns":h?ne:void 0,"aria-activedescendant":q>=0&&h?`${ne}-${q}`:void 0,tabIndex:i.getTabIndex(M,r),accessKey:B,dir:me,disabled:r,className:Je,style:N,onClick:Ee,onMouseDown:Ve,onFocus:je,onBlur:qe,onKeyDown:Xe,...R},u||c?n.createElement(i.IconWrap,{className:"k-fab-icon",name:u,icon:c}):b?n.createElement("span",{role:"presentation",className:b}):null,E&&n.createElement("span",{className:"k-fab-text"},E)),T&&g&&n.createElement("div",{className:"k-overlay",style:{zIndex:ee,...p}}),n.createElement(ye.Popup,{ref:pe,anchor:y.current,show:g,animate:S.animate,popupClass:i.classNames("k-popup-transparent k-fab-popup",S.popupClass),anchorAlign:S.anchorAlign||ft(t,V),popupAlign:S.popupAlign||bt(t,V),style:{boxShadow:"none"}},n.createElement("ul",{ref:he,role:"menu","aria-labelledby":k,id:ne,className:i.classNames("k-fab-items",{"k-fab-items-bottom":t.vertical!=="bottom","k-fab-items-top":t.vertical==="bottom"}),style:{paddingLeft:we?Ne:void 0,paddingRight:we?Ne:void 0}},Qe))))});De.propTypes={className:s.string,style:s.object,id:s.string,dir:s.string,tabIndex:s.number,accessKey:s.string,disabled:s.bool,icon:s.string,svgIcon:i.svgIconPropType,iconClass:s.string,text:s.string,alignOffset:s.shape({x:s.oneOfType([s.number,s.string]),y:s.oneOfType([s.number,s.string])}),align:s.shape({vertical:s.oneOf(["top","middle","bottom"]),horizontal:s.oneOf(["start","center","end"])}),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 Z={align:{vertical:"bottom",horizontal:"end"},size:"medium",rounded:"full",themeColor:"primary",positionMode:"fixed"};De.displayName="KendoFloatingActionButton";const Le=i.withIdHOC(ce);Le.displayName="KendoReactDropDownButton";const He=i.withIdHOC(re);He.displayName="KendoReactSplitButton";exports.Button=_;exports.ButtonGroup=ze;exports.Chip=z;exports.ChipList=de;exports.DropDownButton=Le;exports.DropDownButtonClassComponent=ce;exports.DropDownButtonItem=Ce;exports.FloatingActionButton=De;exports.FloatingActionButtonItem=ue;exports.SplitButton=He;exports.SplitButtonClassComponent=re;exports.SplitButtonItem=ve;exports.Toolbar=Ie;exports.ToolbarItem=Oe;exports.ToolbarSeparator=it;exports.ToolbarSpacer=xe;exports.toolbarButtons=Fe;
|
package/index.mjs
CHANGED
|
@@ -6,14 +6,14 @@
|
|
|
6
6
|
import * as n from "react";
|
|
7
7
|
import Ie from "react";
|
|
8
8
|
import * as s from "prop-types";
|
|
9
|
-
import { svgIconPropType as
|
|
9
|
+
import { svgIconPropType as M, validatePackage as R, classNames as f, kendoThemeMaps as P, IconWrap as A, Keys as r, dispatchEvent as I, getActiveElement as se, useDir as xe, useMouse as $e, getTabIndex as me, toIconName as ve, getter as Me, useZIndexContext as rt, useId as Re, ZIndexContext as ct, withIdHOC as Ae } from "@progress/kendo-react-common";
|
|
10
10
|
import { Popup as De } from "@progress/kendo-react-popup";
|
|
11
11
|
import { caretAltDownIcon as dt, xCircleIcon as ut } from "@progress/kendo-svg-icons";
|
|
12
12
|
const O = {
|
|
13
13
|
name: "@progress/kendo-react-buttons",
|
|
14
14
|
productName: "KendoReact",
|
|
15
15
|
productCodes: ["KENDOUIREACT", "KENDOUICOMPLETE"],
|
|
16
|
-
publishDate:
|
|
16
|
+
publishDate: 1702285037,
|
|
17
17
|
version: "",
|
|
18
18
|
licensingDocsUrl: "https://www.telerik.com/kendo-react-ui/components/my-license/"
|
|
19
19
|
};
|
|
@@ -24,7 +24,7 @@ const ee = class extends n.Component {
|
|
|
24
24
|
constructor(e) {
|
|
25
25
|
super(e), this._element = null, this.handleClick = (o) => {
|
|
26
26
|
this.toggleIfApplicable(), this.props.onClick && this.props.onClick.call(void 0, o);
|
|
27
|
-
},
|
|
27
|
+
}, R(O), this.state = { selected: this.props.togglable === !0 && this.props.selected === !0 };
|
|
28
28
|
}
|
|
29
29
|
/**
|
|
30
30
|
* Gets the DOM element of the Button component.
|
|
@@ -64,7 +64,7 @@ const ee = class extends n.Component {
|
|
|
64
64
|
fillMode: D = ee.defaultProps.fillMode,
|
|
65
65
|
themeColor: N = ee.defaultProps.themeColor,
|
|
66
66
|
...w
|
|
67
|
-
} = this.props, S = a !== void 0 || t !== void 0 || i !== void 0 || l !== void 0,
|
|
67
|
+
} = this.props, S = a !== void 0 || t !== void 0 || i !== void 0 || l !== void 0, B = e !== void 0, x = ht({
|
|
68
68
|
name: t,
|
|
69
69
|
svgIcon: a,
|
|
70
70
|
iconClass: i,
|
|
@@ -85,7 +85,7 @@ const ee = class extends n.Component {
|
|
|
85
85
|
[`k-button-${D}`]: D,
|
|
86
86
|
[`k-button-${D}-${N}`]: !!(D && N),
|
|
87
87
|
[`k-rounded-${P.roundedMap[h] || h}`]: h,
|
|
88
|
-
"k-icon-button": !
|
|
88
|
+
"k-icon-button": !B && S,
|
|
89
89
|
"k-disabled": this.props.disabled,
|
|
90
90
|
"k-selected": this.state.selected,
|
|
91
91
|
"k-rtl": this.props.dir === "rtl"
|
|
@@ -93,7 +93,7 @@ const ee = class extends n.Component {
|
|
|
93
93
|
this.props.className
|
|
94
94
|
)
|
|
95
95
|
},
|
|
96
|
-
|
|
96
|
+
x,
|
|
97
97
|
e && /* @__PURE__ */ n.createElement("span", { className: "k-button-text" }, e)
|
|
98
98
|
);
|
|
99
99
|
}
|
|
@@ -110,7 +110,7 @@ ne.propTypes = {
|
|
|
110
110
|
selected: s.bool,
|
|
111
111
|
togglable: s.bool,
|
|
112
112
|
icon: s.string,
|
|
113
|
-
svgIcon:
|
|
113
|
+
svgIcon: M,
|
|
114
114
|
iconClass: s.string,
|
|
115
115
|
imageUrl: s.string,
|
|
116
116
|
imageAlt: s.string,
|
|
@@ -153,7 +153,7 @@ const pt = {
|
|
|
153
153
|
}, ue = ft.styles;
|
|
154
154
|
class bt extends n.Component {
|
|
155
155
|
constructor(o) {
|
|
156
|
-
super(o), this._element = null,
|
|
156
|
+
super(o), this._element = null, R(O);
|
|
157
157
|
}
|
|
158
158
|
/**
|
|
159
159
|
* @hidden
|
|
@@ -347,7 +347,7 @@ let Ee = class extends n.Component {
|
|
|
347
347
|
}, this.switchFocus = (t) => {
|
|
348
348
|
this.skipFocus = !0, t(), window.setTimeout(() => this.skipFocus = !1, 0);
|
|
349
349
|
}, this.onFocus = (t) => {
|
|
350
|
-
this.skipFocus || (
|
|
350
|
+
this.skipFocus || (I(this.props.onFocus, t, this, void 0), this.setState({ focused: !0 }));
|
|
351
351
|
}, this.setOpen = (t) => {
|
|
352
352
|
this.openedDuringOnChange = t, this.setState({ opened: t });
|
|
353
353
|
}, this.onItemClick = (t, i) => {
|
|
@@ -356,7 +356,7 @@ let Ee = class extends n.Component {
|
|
|
356
356
|
this.skipFocus || (this.setState({
|
|
357
357
|
focused: !1,
|
|
358
358
|
focusedIndex: -1
|
|
359
|
-
}), this.setOpen(!1),
|
|
359
|
+
}), this.setOpen(!1), I(this.props.onBlur, t, this, void 0));
|
|
360
360
|
}, this.onPopupClose = () => {
|
|
361
361
|
this.state.focused && this.switchFocus(() => {
|
|
362
362
|
this.element && (this.element.removeAttribute("tabindex"), this.element.focus({ preventScroll: !0 }));
|
|
@@ -380,8 +380,8 @@ let Ee = class extends n.Component {
|
|
|
380
380
|
}, this.onItemDown = (t) => {
|
|
381
381
|
se(document) === this.list && t.preventDefault();
|
|
382
382
|
}, this.dispatchPopupEvent = (t, i) => {
|
|
383
|
-
|
|
384
|
-
},
|
|
383
|
+
I(i ? this.props.onOpen : this.props.onClose, t, this, void 0), this.openedDuringOnChange = void 0;
|
|
384
|
+
}, R(O);
|
|
385
385
|
}
|
|
386
386
|
get guid() {
|
|
387
387
|
return this.props.id ? this.props.id + "-accessibility-id" : this.props.id;
|
|
@@ -480,7 +480,7 @@ let Ee = class extends n.Component {
|
|
|
480
480
|
return this.mainButton;
|
|
481
481
|
}
|
|
482
482
|
dispatchClickEvent(o, t) {
|
|
483
|
-
this.isItemDisabled(t) || (t === -1 ?
|
|
483
|
+
this.isItemDisabled(t) || (t === -1 ? I(this.props.onButtonClick, o, this, void 0) : I(
|
|
484
484
|
this.props.onItemClick,
|
|
485
485
|
o,
|
|
486
486
|
this,
|
|
@@ -563,7 +563,7 @@ Ee.propTypes = {
|
|
|
563
563
|
tabIndex: s.number,
|
|
564
564
|
disabled: s.bool,
|
|
565
565
|
icon: s.string,
|
|
566
|
-
svgIcon:
|
|
566
|
+
svgIcon: M,
|
|
567
567
|
iconClass: s.string,
|
|
568
568
|
imageUrl: s.string,
|
|
569
569
|
popupSettings: s.object,
|
|
@@ -602,7 +602,7 @@ let Ne = class extends n.Component {
|
|
|
602
602
|
opened: !1,
|
|
603
603
|
focused: !1,
|
|
604
604
|
focusedIndex: -1
|
|
605
|
-
}, this.
|
|
605
|
+
}, this.mainButton = null, this.list = null, this.skipFocus = !1, this.buttonsData = [], this.onKeyDown = (t) => {
|
|
606
606
|
const { focusedIndex: i } = this.state;
|
|
607
607
|
if (t.altKey) {
|
|
608
608
|
!this.opened && t.keyCode === r.down ? (this.setOpen(!0), this.dispatchPopupEvent(t, !0), this.setState({ focusedIndex: 0 })) : this.opened && t.keyCode === r.up && (this.setState({ focusedIndex: -1 }), this.setOpen(!1));
|
|
@@ -610,11 +610,15 @@ let Ne = class extends n.Component {
|
|
|
610
610
|
}
|
|
611
611
|
const a = { ...this.state };
|
|
612
612
|
if (t.keyCode === r.enter || t.keyCode === r.space) {
|
|
613
|
-
i >= 0 && this.dispatchClickEvent(t, i)
|
|
613
|
+
i >= 0 && this.dispatchClickEvent(t, i);
|
|
614
614
|
const l = !this.opened;
|
|
615
|
-
this.
|
|
615
|
+
this.setState({
|
|
616
|
+
focused: !0,
|
|
617
|
+
focusedIndex: l ? 0 : -1
|
|
618
|
+
}), this.setOpen(l), l && this.dispatchPopupEvent(t, l);
|
|
616
619
|
return;
|
|
617
|
-
}
|
|
620
|
+
}
|
|
621
|
+
if (this.opened && t.keyCode === r.esc) {
|
|
618
622
|
this.setState({ focusedIndex: -1 }), this.setOpen(!1);
|
|
619
623
|
return;
|
|
620
624
|
}
|
|
@@ -633,9 +637,11 @@ let Ne = class extends n.Component {
|
|
|
633
637
|
}, this.switchFocus = (t) => {
|
|
634
638
|
this.skipFocus = !0, t(), window.setTimeout(() => this.skipFocus = !1, 0);
|
|
635
639
|
}, this.handleFocus = (t) => {
|
|
636
|
-
this.skipFocus || (this.setState({ focused: !0, focusedIndex: this.opened ? 0 : -1 }),
|
|
637
|
-
}, this.
|
|
638
|
-
this.
|
|
640
|
+
this.skipFocus || (this.setState({ focused: !0, focusedIndex: this.opened ? 0 : -1 }), I(this.props.onFocus, t, this, void 0));
|
|
641
|
+
}, this.handleButtonBlur = (t) => {
|
|
642
|
+
this.opened || (this.setState({ focused: !1 }), I(this.props.onBlur, t, this, void 0));
|
|
643
|
+
}, this.handleMenuBlur = (t) => {
|
|
644
|
+
this.skipFocus || (this.setState({ focused: !1, focusedIndex: -1 }), this.setOpen(!1), I(this.props.onBlur, t, this, void 0));
|
|
639
645
|
}, this.setOpen = (t) => {
|
|
640
646
|
this.openedDuringOnChange = t, this.setState({ opened: t });
|
|
641
647
|
}, this.onItemClick = (t, i) => {
|
|
@@ -647,7 +653,7 @@ let Ne = class extends n.Component {
|
|
|
647
653
|
const i = se(document);
|
|
648
654
|
this.element && i !== this.element && i !== this.list && this.element.focus();
|
|
649
655
|
}, this.onPopupClose = () => {
|
|
650
|
-
this.
|
|
656
|
+
this.switchFocus(() => {
|
|
651
657
|
this.element && (this.element.removeAttribute("tabindex"), this.element.focus({ preventScroll: !0 }));
|
|
652
658
|
}), this.dispatchPopupEvent({}, !1);
|
|
653
659
|
}, this.listRef = (t) => {
|
|
@@ -663,8 +669,8 @@ let Ne = class extends n.Component {
|
|
|
663
669
|
focusedIndex: i ? 0 : -1
|
|
664
670
|
}), this.setOpen(i), i && this.dispatchPopupEvent(t, i);
|
|
665
671
|
}, this.dispatchPopupEvent = (t, i) => {
|
|
666
|
-
|
|
667
|
-
},
|
|
672
|
+
I(i ? this.props.onOpen : this.props.onClose, t, this, void 0), this.openedDuringOnChange = void 0;
|
|
673
|
+
}, R(O);
|
|
668
674
|
}
|
|
669
675
|
get guid() {
|
|
670
676
|
return this.props.id + "-accessibility-id";
|
|
@@ -677,55 +683,47 @@ let Ne = class extends n.Component {
|
|
|
677
683
|
*/
|
|
678
684
|
render() {
|
|
679
685
|
const o = this.isRtl(), t = o ? "rtl" : void 0, { id: i, style: a, tabIndex: l, disabled: u } = this.props;
|
|
680
|
-
return this.buttonsData = this.props.items || n.Children.toArray(this.props.children).filter((c) => c && c.type === Ue).map((c) => c.props), /* @__PURE__ */ n.createElement(
|
|
681
|
-
|
|
686
|
+
return this.buttonsData = this.props.items || n.Children.toArray(this.props.children).filter((c) => c && c.type === Ue).map((c) => c.props), /* @__PURE__ */ n.createElement(n.Fragment, null, /* @__PURE__ */ n.createElement(
|
|
687
|
+
ne,
|
|
682
688
|
{
|
|
683
689
|
id: i,
|
|
690
|
+
size: this.props.size,
|
|
684
691
|
style: a,
|
|
692
|
+
rounded: this.props.rounded,
|
|
693
|
+
fillMode: this.props.fillMode,
|
|
694
|
+
themeColor: this.props.themeColor,
|
|
695
|
+
onClick: this.onClickMainButton,
|
|
696
|
+
onMouseDown: this.mouseDown,
|
|
697
|
+
onKeyDown: this.onKeyDown,
|
|
698
|
+
onFocus: this.handleFocus,
|
|
699
|
+
onBlur: this.handleButtonBlur,
|
|
700
|
+
"aria-disabled": u ? "true" : void 0,
|
|
701
|
+
tabIndex: l,
|
|
702
|
+
accessKey: this.props.accessKey,
|
|
703
|
+
icon: this.props.icon,
|
|
704
|
+
svgIcon: this.props.svgIcon,
|
|
705
|
+
iconClass: this.props.iconClass,
|
|
685
706
|
className: f(
|
|
707
|
+
this.props.buttonClass,
|
|
708
|
+
"k-menu-button",
|
|
709
|
+
// Used for a11y testing.
|
|
686
710
|
"k-dropdown-button",
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
}
|
|
690
|
-
this.props.className
|
|
711
|
+
// Used because of the old name of the component. Have the same styles as 'k-menu-button'.
|
|
712
|
+
{ "k-focus": this.state.focused },
|
|
713
|
+
{ "k-disabled": u }
|
|
691
714
|
),
|
|
692
|
-
|
|
693
|
-
onFocus: this.handleFocus,
|
|
694
|
-
onBlur: this.handleBlur,
|
|
715
|
+
imageUrl: this.props.imageUrl,
|
|
695
716
|
dir: t,
|
|
696
|
-
ref: (c) => this.
|
|
717
|
+
ref: (c) => this.mainButton = c && c.element,
|
|
718
|
+
type: "button",
|
|
719
|
+
"aria-haspopup": "menu",
|
|
720
|
+
"aria-expanded": this.opened ? "true" : "false",
|
|
721
|
+
"aria-label": this.props.ariaLabel,
|
|
722
|
+
"aria-controls": this.opened ? this.guid : void 0,
|
|
723
|
+
title: this.props.title
|
|
697
724
|
},
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
{
|
|
701
|
-
size: this.props.size,
|
|
702
|
-
rounded: this.props.rounded,
|
|
703
|
-
fillMode: this.props.fillMode,
|
|
704
|
-
themeColor: this.props.themeColor,
|
|
705
|
-
onClick: this.onClickMainButton,
|
|
706
|
-
onMouseDown: this.mouseDown,
|
|
707
|
-
disabled: u || void 0,
|
|
708
|
-
tabIndex: l,
|
|
709
|
-
accessKey: this.props.accessKey,
|
|
710
|
-
icon: this.props.icon,
|
|
711
|
-
svgIcon: this.props.svgIcon,
|
|
712
|
-
iconClass: this.props.iconClass,
|
|
713
|
-
className: this.props.buttonClass,
|
|
714
|
-
imageUrl: this.props.imageUrl,
|
|
715
|
-
dir: t,
|
|
716
|
-
ref: (c) => this.mainButton = c && c.element,
|
|
717
|
-
type: "button",
|
|
718
|
-
"aria-haspopup": !0,
|
|
719
|
-
"aria-expanded": this.opened || void 0,
|
|
720
|
-
"aria-label": this.props.ariaLabel,
|
|
721
|
-
"aria-controls": this.opened ? this.guid : void 0,
|
|
722
|
-
id: "button-" + this.guid,
|
|
723
|
-
title: this.props.title
|
|
724
|
-
},
|
|
725
|
-
this.props.text
|
|
726
|
-
),
|
|
727
|
-
this.renderPopup(o)
|
|
728
|
-
);
|
|
725
|
+
this.props.text
|
|
726
|
+
), this.renderPopup(o));
|
|
729
727
|
}
|
|
730
728
|
/**
|
|
731
729
|
* @hidden
|
|
@@ -740,7 +738,7 @@ let Ne = class extends n.Component {
|
|
|
740
738
|
return this.mainButton;
|
|
741
739
|
}
|
|
742
740
|
dispatchClickEvent(o, t) {
|
|
743
|
-
this.isItemDisabled(t) ||
|
|
741
|
+
this.isItemDisabled(t) || I(
|
|
744
742
|
this.props.onItemClick,
|
|
745
743
|
o,
|
|
746
744
|
this,
|
|
@@ -751,11 +749,11 @@ let Ne = class extends n.Component {
|
|
|
751
749
|
);
|
|
752
750
|
}
|
|
753
751
|
renderPopup(o) {
|
|
754
|
-
const { popupSettings: t = {} } = this.props, { focusedIndex:
|
|
752
|
+
const { popupSettings: t = {}, id: i } = this.props, { focusedIndex: a } = this.state;
|
|
755
753
|
return /* @__PURE__ */ n.createElement(
|
|
756
754
|
De,
|
|
757
755
|
{
|
|
758
|
-
anchor: this.
|
|
756
|
+
anchor: this.mainButton,
|
|
759
757
|
show: this.opened,
|
|
760
758
|
animate: t.animate,
|
|
761
759
|
popupClass: f("k-menu-popup", t.popupClass),
|
|
@@ -769,10 +767,12 @@ let Ne = class extends n.Component {
|
|
|
769
767
|
{
|
|
770
768
|
role: "menu",
|
|
771
769
|
id: this.guid,
|
|
772
|
-
"aria-labelledby":
|
|
770
|
+
"aria-labelledby": i,
|
|
773
771
|
tabIndex: -1,
|
|
774
|
-
"aria-activedescendant":
|
|
772
|
+
"aria-activedescendant": a >= 0 ? `${this.guid}-${a}` : void 0,
|
|
775
773
|
ref: this.listRef,
|
|
774
|
+
onKeyDown: this.onKeyDown,
|
|
775
|
+
onBlur: this.handleMenuBlur,
|
|
776
776
|
className: f("k-group k-menu-group k-reset", {
|
|
777
777
|
[`k-menu-group-${P.sizeMap[this.props.size] || this.props.size}`]: this.props.size
|
|
778
778
|
})
|
|
@@ -804,7 +804,7 @@ let Ne = class extends n.Component {
|
|
|
804
804
|
return this.buttonsData[o] ? this.buttonsData[o].disabled : this.props.disabled;
|
|
805
805
|
}
|
|
806
806
|
isRtl() {
|
|
807
|
-
return this.props.dir !== void 0 ? this.props.dir === "rtl" : !!this.
|
|
807
|
+
return this.props.dir !== void 0 ? this.props.dir === "rtl" : !!this.mainButton && getComputedStyle(this.mainButton).direction === "rtl";
|
|
808
808
|
}
|
|
809
809
|
};
|
|
810
810
|
Ne.propTypes = {
|
|
@@ -821,7 +821,7 @@ Ne.propTypes = {
|
|
|
821
821
|
tabIndex: s.number,
|
|
822
822
|
disabled: s.bool,
|
|
823
823
|
icon: s.string,
|
|
824
|
-
svgIcon:
|
|
824
|
+
svgIcon: M,
|
|
825
825
|
iconClass: s.string,
|
|
826
826
|
imageUrl: s.string,
|
|
827
827
|
popupSettings: s.object,
|
|
@@ -860,7 +860,7 @@ const Ce = class extends n.Component {
|
|
|
860
860
|
const l = { offsetWidth: this.offsetWidth, offsetHeight: this.offsetHeight };
|
|
861
861
|
this.props.onResize && this.props.onResize.call(void 0, { target: this, ...l, nativeEvent: o });
|
|
862
862
|
}
|
|
863
|
-
},
|
|
863
|
+
}, R(O);
|
|
864
864
|
}
|
|
865
865
|
get selectors() {
|
|
866
866
|
return this.props.buttons || mt;
|
|
@@ -1073,7 +1073,7 @@ const vt = (e, o) => {
|
|
|
1073
1073
|
return e;
|
|
1074
1074
|
}
|
|
1075
1075
|
}, j = n.forwardRef((e, o) => {
|
|
1076
|
-
|
|
1076
|
+
R(O);
|
|
1077
1077
|
const t = n.useRef(null), i = n.useRef(null), a = xe(i, e.dir);
|
|
1078
1078
|
n.useImperativeHandle(t, () => ({
|
|
1079
1079
|
element: i.current,
|
|
@@ -1133,7 +1133,7 @@ const vt = (e, o) => {
|
|
|
1133
1133
|
);
|
|
1134
1134
|
},
|
|
1135
1135
|
[e.onKeyDown, e.value, g, u, w]
|
|
1136
|
-
),
|
|
1136
|
+
), B = n.useCallback(
|
|
1137
1137
|
(p) => {
|
|
1138
1138
|
g({ payload: e.value, type: te.current, event: p }), e.onFocus && e.onFocus.call(
|
|
1139
1139
|
void 0,
|
|
@@ -1144,7 +1144,7 @@ const vt = (e, o) => {
|
|
|
1144
1144
|
);
|
|
1145
1145
|
},
|
|
1146
1146
|
[e.onFocus, e.value, g]
|
|
1147
|
-
),
|
|
1147
|
+
), x = n.useCallback(
|
|
1148
1148
|
(p) => {
|
|
1149
1149
|
e.onBlur && e.onBlur.call(
|
|
1150
1150
|
void 0,
|
|
@@ -1184,8 +1184,8 @@ const vt = (e, o) => {
|
|
|
1184
1184
|
"aria-disabled": e.disabled,
|
|
1185
1185
|
"aria-describedby": e.ariaDescribedBy,
|
|
1186
1186
|
"aria-keyshortcuts": e.removable ? "Enter Delete" : void 0,
|
|
1187
|
-
onFocus:
|
|
1188
|
-
onBlur:
|
|
1187
|
+
onFocus: B,
|
|
1188
|
+
onBlur: x,
|
|
1189
1189
|
onKeyDown: S
|
|
1190
1190
|
},
|
|
1191
1191
|
h && (e.selectedIcon || e.selectedSvgIcon) && /* @__PURE__ */ n.createElement(
|
|
@@ -1244,12 +1244,12 @@ const vt = (e, o) => {
|
|
|
1244
1244
|
dir: s.oneOf(["ltr", "rtl"]),
|
|
1245
1245
|
removable: s.bool,
|
|
1246
1246
|
removeIcon: s.string,
|
|
1247
|
-
removeIconSvg:
|
|
1247
|
+
removeIconSvg: M,
|
|
1248
1248
|
disabled: s.bool,
|
|
1249
1249
|
icon: s.string,
|
|
1250
|
-
svgIcon:
|
|
1250
|
+
svgIcon: M,
|
|
1251
1251
|
selectedIcon: s.string,
|
|
1252
|
-
selectedIconSvg:
|
|
1252
|
+
selectedIconSvg: M,
|
|
1253
1253
|
onRemove: s.func,
|
|
1254
1254
|
dataItem: s.any,
|
|
1255
1255
|
selected: s.bool,
|
|
@@ -1291,7 +1291,7 @@ const xt = (e, o, t) => {
|
|
|
1291
1291
|
t && t(c, u.event), a(c);
|
|
1292
1292
|
}];
|
|
1293
1293
|
}, Se = n.forwardRef((e, o) => {
|
|
1294
|
-
|
|
1294
|
+
R(O);
|
|
1295
1295
|
const t = n.useRef(null), i = n.useRef(null), a = xe(i, e.dir), {
|
|
1296
1296
|
chip: l,
|
|
1297
1297
|
id: u,
|
|
@@ -1303,13 +1303,13 @@ const xt = (e, o, t) => {
|
|
|
1303
1303
|
ariaDescribedBy: N,
|
|
1304
1304
|
ariaLabelledBy: w,
|
|
1305
1305
|
ariaLabel: S,
|
|
1306
|
-
selection:
|
|
1307
|
-
value:
|
|
1306
|
+
selection: B = W.selection,
|
|
1307
|
+
value: x = W.defaultValue,
|
|
1308
1308
|
defaultData: E = W.defaultData,
|
|
1309
1309
|
valueField: p = W.valueField,
|
|
1310
1310
|
textField: T = W.textField,
|
|
1311
1311
|
onChange: K,
|
|
1312
|
-
onDataChange:
|
|
1312
|
+
onDataChange: z
|
|
1313
1313
|
} = e, L = n.useMemo(
|
|
1314
1314
|
() => l || j,
|
|
1315
1315
|
[l, j]
|
|
@@ -1328,21 +1328,21 @@ const xt = (e, o, t) => {
|
|
|
1328
1328
|
},
|
|
1329
1329
|
[K]
|
|
1330
1330
|
), [V, Z] = xt(
|
|
1331
|
-
|
|
1331
|
+
x,
|
|
1332
1332
|
{
|
|
1333
|
-
selection:
|
|
1334
|
-
state:
|
|
1333
|
+
selection: B,
|
|
1334
|
+
state: x
|
|
1335
1335
|
},
|
|
1336
1336
|
$
|
|
1337
1337
|
), oe = n.useCallback(
|
|
1338
1338
|
(m, y) => {
|
|
1339
|
-
|
|
1339
|
+
z && t.current && z.call(void 0, {
|
|
1340
1340
|
value: m,
|
|
1341
1341
|
target: t.current,
|
|
1342
1342
|
syntheticEvent: y
|
|
1343
1343
|
});
|
|
1344
1344
|
},
|
|
1345
|
-
[
|
|
1345
|
+
[z]
|
|
1346
1346
|
), [q, ie] = wt(
|
|
1347
1347
|
e.data || E,
|
|
1348
1348
|
{
|
|
@@ -1357,16 +1357,16 @@ const xt = (e, o, t) => {
|
|
|
1357
1357
|
() => e.data || q,
|
|
1358
1358
|
[e.data, q]
|
|
1359
1359
|
), ae = n.useMemo(
|
|
1360
|
-
() =>
|
|
1361
|
-
[
|
|
1360
|
+
() => x || V,
|
|
1361
|
+
[x, V]
|
|
1362
1362
|
), le = n.useMemo(
|
|
1363
1363
|
() => _.reduce(G, []),
|
|
1364
1364
|
[_, G]
|
|
1365
1365
|
), X = n.useCallback(
|
|
1366
|
-
(m) =>
|
|
1366
|
+
(m) => Me(p)(m),
|
|
1367
1367
|
[p]
|
|
1368
1368
|
), k = n.useCallback(
|
|
1369
|
-
(m) =>
|
|
1369
|
+
(m) => Me(T)(m),
|
|
1370
1370
|
[T]
|
|
1371
1371
|
), [fe, be] = Dt({ items: le }), re = $e(e, t);
|
|
1372
1372
|
return /* @__PURE__ */ n.createElement(Ve.Provider, { value: [ae, Z] }, /* @__PURE__ */ n.createElement(Ze.Provider, { value: [fe, be] }, /* @__PURE__ */ n.createElement(qe.Provider, { value: [_, ie] }, /* @__PURE__ */ n.createElement(
|
|
@@ -1392,7 +1392,7 @@ const xt = (e, o, t) => {
|
|
|
1392
1392
|
"aria-labelledby": w,
|
|
1393
1393
|
"aria-describedby": N,
|
|
1394
1394
|
"aria-orientation": "horizontal",
|
|
1395
|
-
"aria-multiselectable":
|
|
1395
|
+
"aria-multiselectable": B === "multiple"
|
|
1396
1396
|
},
|
|
1397
1397
|
_.map((m, y) => /* @__PURE__ */ n.createElement(
|
|
1398
1398
|
L,
|
|
@@ -1441,7 +1441,7 @@ const xt = (e, o, t) => {
|
|
|
1441
1441
|
Se.displayName = "KendoReactChipList";
|
|
1442
1442
|
Se.propTypes = Et;
|
|
1443
1443
|
Se.defaultProps = W;
|
|
1444
|
-
const
|
|
1444
|
+
const Be = n.forwardRef((e, o) => {
|
|
1445
1445
|
const {
|
|
1446
1446
|
className: t,
|
|
1447
1447
|
disabled: i,
|
|
@@ -1456,8 +1456,8 @@ const Fe = n.forwardRef((e, o) => {
|
|
|
1456
1456
|
item: N,
|
|
1457
1457
|
svgIcon: w,
|
|
1458
1458
|
onDown: S,
|
|
1459
|
-
onClick:
|
|
1460
|
-
...
|
|
1459
|
+
onClick: B,
|
|
1460
|
+
...x
|
|
1461
1461
|
} = e, E = n.useRef(null), p = n.useCallback(
|
|
1462
1462
|
() => {
|
|
1463
1463
|
E.current && E.current.focus();
|
|
@@ -1473,10 +1473,10 @@ const Fe = n.forwardRef((e, o) => {
|
|
|
1473
1473
|
n.useImperativeHandle(o, T);
|
|
1474
1474
|
const K = n.useCallback(
|
|
1475
1475
|
($) => {
|
|
1476
|
-
|
|
1476
|
+
B && h !== void 0 && !i && B($, h);
|
|
1477
1477
|
},
|
|
1478
|
-
[
|
|
1479
|
-
),
|
|
1478
|
+
[B, h]
|
|
1479
|
+
), z = n.useMemo(
|
|
1480
1480
|
() => f(
|
|
1481
1481
|
"k-fab-item",
|
|
1482
1482
|
{
|
|
@@ -1492,7 +1492,7 @@ const Fe = n.forwardRef((e, o) => {
|
|
|
1492
1492
|
{
|
|
1493
1493
|
ref: E,
|
|
1494
1494
|
id: c,
|
|
1495
|
-
className:
|
|
1495
|
+
className: z,
|
|
1496
1496
|
style: u,
|
|
1497
1497
|
role: "menuitem",
|
|
1498
1498
|
tabIndex: me(v, i),
|
|
@@ -1501,12 +1501,12 @@ const Fe = n.forwardRef((e, o) => {
|
|
|
1501
1501
|
onClick: K,
|
|
1502
1502
|
onMouseDown: S,
|
|
1503
1503
|
onPointerDown: S,
|
|
1504
|
-
...
|
|
1504
|
+
...x
|
|
1505
1505
|
},
|
|
1506
1506
|
L ? /* @__PURE__ */ n.createElement(L, { itemIndex: h, item: D }) : /* @__PURE__ */ n.createElement(n.Fragment, null, a && /* @__PURE__ */ n.createElement("span", { className: "k-fab-item-text" }, a), l || w ? /* @__PURE__ */ n.createElement(A, { className: "k-fab-item-icon", name: l, icon: w }) : null)
|
|
1507
1507
|
);
|
|
1508
1508
|
});
|
|
1509
|
-
|
|
1509
|
+
Be.propTypes = {
|
|
1510
1510
|
className: s.string,
|
|
1511
1511
|
style: s.object,
|
|
1512
1512
|
children: s.any,
|
|
@@ -1514,31 +1514,31 @@ Fe.propTypes = {
|
|
|
1514
1514
|
focused: s.bool,
|
|
1515
1515
|
index: s.number,
|
|
1516
1516
|
icon: s.string,
|
|
1517
|
-
svgIcon:
|
|
1517
|
+
svgIcon: M,
|
|
1518
1518
|
text: s.string,
|
|
1519
1519
|
tabIndex: s.number,
|
|
1520
1520
|
customProp: s.any
|
|
1521
1521
|
};
|
|
1522
|
-
|
|
1522
|
+
Be.displayName = "KendoFloatingActionButtonItem";
|
|
1523
1523
|
const Ke = "16px", he = (e) => typeof e == "number" ? e + "px" : e, Nt = (e, o) => {
|
|
1524
1524
|
const t = { horizontal: o ? "right" : "left", vertical: "bottom" };
|
|
1525
1525
|
return e.horizontal === "end" && (t.horizontal = o ? "left" : "right"), t;
|
|
1526
1526
|
}, St = (e, o) => {
|
|
1527
1527
|
const t = { horizontal: o ? "right" : "left", vertical: "top" };
|
|
1528
1528
|
return e.horizontal === "end" && (t.horizontal = o ? "left" : "right"), t;
|
|
1529
|
-
},
|
|
1529
|
+
}, Bt = (e, o) => {
|
|
1530
1530
|
const t = o === "end" ? "end" : "start";
|
|
1531
1531
|
return {
|
|
1532
1532
|
rtl: { end: "k-text-left", start: "k-text-right" },
|
|
1533
1533
|
ltr: { start: "k-text-left", end: "k-text-right" }
|
|
1534
1534
|
}[e][t];
|
|
1535
|
-
},
|
|
1535
|
+
}, Ft = (e, o, t, i) => {
|
|
1536
1536
|
const a = o.horizontal, l = o.vertical;
|
|
1537
1537
|
if (e.current) {
|
|
1538
1538
|
const u = t && t.x !== void 0 ? he(t.x) : Ke, c = t && t.x !== void 0 ? `calc(50% + ${he(t.x)})` : "50%", g = t && t.y !== void 0 ? he(t.y) : Ke, v = t && t.y !== void 0 ? `calc(50% + ${he(t.y)})` : "50%";
|
|
1539
|
-
e.current.style.setProperty(
|
|
1539
|
+
e.current.style.setProperty(zt(o, i), a === "center" ? c : u), e.current.style.setProperty(Pt(o), l === "middle" ? v : g), i && ((l === "top" || l === "bottom") && a === "start" && e.current.style.setProperty("left", "unset"), l === "middle" && a === "end" && e.current.style.setProperty("right", "unset"), l === "middle" && a === "start" && e.current.style.setProperty("left", "unset"));
|
|
1540
1540
|
}
|
|
1541
|
-
},
|
|
1541
|
+
}, zt = (e, o) => {
|
|
1542
1542
|
const { horizontal: t } = e;
|
|
1543
1543
|
return {
|
|
1544
1544
|
end: o ? "left" : "right",
|
|
@@ -1549,8 +1549,8 @@ const Ke = "16px", he = (e) => typeof e == "number" ? e + "px" : e, Nt = (e, o)
|
|
|
1549
1549
|
top: "top",
|
|
1550
1550
|
middle: "top",
|
|
1551
1551
|
bottom: "bottom"
|
|
1552
|
-
})[e.vertical || "bottom"],
|
|
1553
|
-
|
|
1552
|
+
})[e.vertical || "bottom"], Mt = 2, Rt = 100, Xe = n.forwardRef((e, o) => {
|
|
1553
|
+
R(O);
|
|
1554
1554
|
const {
|
|
1555
1555
|
align: t = Y.align,
|
|
1556
1556
|
alignOffset: i,
|
|
@@ -1565,13 +1565,13 @@ const Ke = "16px", he = (e) => typeof e == "number" ? e + "px" : e, Nt = (e, o)
|
|
|
1565
1565
|
text: N,
|
|
1566
1566
|
positionMode: w = Y.positionMode,
|
|
1567
1567
|
size: S = Y.size,
|
|
1568
|
-
style:
|
|
1569
|
-
rounded:
|
|
1568
|
+
style: B,
|
|
1569
|
+
rounded: x = Y.rounded,
|
|
1570
1570
|
themeColor: E = Y.themeColor,
|
|
1571
1571
|
overlayStyle: p,
|
|
1572
1572
|
tabIndex: T,
|
|
1573
1573
|
accessKey: K,
|
|
1574
|
-
popupSettings:
|
|
1574
|
+
popupSettings: z = {},
|
|
1575
1575
|
modal: L,
|
|
1576
1576
|
onClick: $,
|
|
1577
1577
|
onItemClick: V,
|
|
@@ -1581,7 +1581,7 @@ const Ke = "16px", he = (e) => typeof e == "number" ? e + "px" : e, Nt = (e, o)
|
|
|
1581
1581
|
onOpen: ie,
|
|
1582
1582
|
onClose: G,
|
|
1583
1583
|
..._
|
|
1584
|
-
} = e, ae = rt(), le = ae ? ae +
|
|
1584
|
+
} = e, ae = rt(), le = ae ? ae + Mt : Rt, X = n.useRef(null), k = n.useRef(null), fe = n.useRef(null), be = n.useRef(null), re = n.useCallback(
|
|
1585
1585
|
() => {
|
|
1586
1586
|
k.current && k.current.focus();
|
|
1587
1587
|
},
|
|
@@ -1594,10 +1594,10 @@ const Ke = "16px", he = (e) => typeof e == "number" ? e + "px" : e, Nt = (e, o)
|
|
|
1594
1594
|
[re]
|
|
1595
1595
|
);
|
|
1596
1596
|
n.useImperativeHandle(X, m), n.useImperativeHandle(o, () => X.current);
|
|
1597
|
-
const [y,
|
|
1597
|
+
const [y, F] = n.useState(!1), [ce, H] = n.useState(!1), [J, C] = n.useState(-1), Je = Re() + "-button-id", ge = xe(k, e.dir), Q = ge === "rtl", de = Re() + "-list-id";
|
|
1598
1598
|
n.useEffect(
|
|
1599
1599
|
() => {
|
|
1600
|
-
|
|
1600
|
+
Ft(k, t, i, Q);
|
|
1601
1601
|
},
|
|
1602
1602
|
[k, t, i, Q]
|
|
1603
1603
|
), n.useEffect(
|
|
@@ -1608,7 +1608,7 @@ const Ke = "16px", he = (e) => typeof e == "number" ? e + "px" : e, Nt = (e, o)
|
|
|
1608
1608
|
);
|
|
1609
1609
|
const U = n.useCallback(
|
|
1610
1610
|
(d, b) => {
|
|
1611
|
-
h &&
|
|
1611
|
+
h && I(
|
|
1612
1612
|
b ? ie : G,
|
|
1613
1613
|
d,
|
|
1614
1614
|
m(),
|
|
@@ -1616,17 +1616,17 @@ const Ke = "16px", he = (e) => typeof e == "number" ? e + "px" : e, Nt = (e, o)
|
|
|
1616
1616
|
);
|
|
1617
1617
|
},
|
|
1618
1618
|
[ie, G, h]
|
|
1619
|
-
),
|
|
1619
|
+
), Fe = n.useCallback(
|
|
1620
1620
|
(d) => {
|
|
1621
|
-
!d.target || l || (!h && $ ?
|
|
1621
|
+
!d.target || l || (!h && $ ? I(
|
|
1622
1622
|
$,
|
|
1623
1623
|
d,
|
|
1624
1624
|
m(),
|
|
1625
1625
|
void 0
|
|
1626
|
-
) : (
|
|
1626
|
+
) : (F(!y), H(!0), C(y ? -1 : 0), U(d, !y)));
|
|
1627
1627
|
},
|
|
1628
1628
|
[
|
|
1629
|
-
|
|
1629
|
+
F,
|
|
1630
1630
|
H,
|
|
1631
1631
|
C,
|
|
1632
1632
|
$,
|
|
@@ -1637,7 +1637,7 @@ const Ke = "16px", he = (e) => typeof e == "number" ? e + "px" : e, Nt = (e, o)
|
|
|
1637
1637
|
]
|
|
1638
1638
|
), Qe = n.useCallback(
|
|
1639
1639
|
(d) => {
|
|
1640
|
-
H(!0), C(y ? 0 : -1), Z &&
|
|
1640
|
+
H(!0), C(y ? 0 : -1), Z && I(
|
|
1641
1641
|
Z,
|
|
1642
1642
|
d,
|
|
1643
1643
|
m(),
|
|
@@ -1647,14 +1647,14 @@ const Ke = "16px", he = (e) => typeof e == "number" ? e + "px" : e, Nt = (e, o)
|
|
|
1647
1647
|
[Z, H, C]
|
|
1648
1648
|
), Ye = n.useCallback(
|
|
1649
1649
|
(d) => {
|
|
1650
|
-
H(!1),
|
|
1650
|
+
H(!1), F(!1), C(-1), I(
|
|
1651
1651
|
oe,
|
|
1652
1652
|
d,
|
|
1653
1653
|
m(),
|
|
1654
1654
|
void 0
|
|
1655
1655
|
), y && U(d, !1);
|
|
1656
1656
|
},
|
|
1657
|
-
[oe, H,
|
|
1657
|
+
[oe, H, F, C, U]
|
|
1658
1658
|
), et = n.useCallback(
|
|
1659
1659
|
(d) => {
|
|
1660
1660
|
d.preventDefault();
|
|
@@ -1662,7 +1662,7 @@ const Ke = "16px", he = (e) => typeof e == "number" ? e + "px" : e, Nt = (e, o)
|
|
|
1662
1662
|
[]
|
|
1663
1663
|
), ye = n.useCallback(
|
|
1664
1664
|
(d, b) => {
|
|
1665
|
-
h && (h[b].disabled ||
|
|
1665
|
+
h && (h[b].disabled || I(
|
|
1666
1666
|
V,
|
|
1667
1667
|
d,
|
|
1668
1668
|
m(),
|
|
@@ -1675,9 +1675,9 @@ const Ke = "16px", he = (e) => typeof e == "number" ? e + "px" : e, Nt = (e, o)
|
|
|
1675
1675
|
[V]
|
|
1676
1676
|
), tt = n.useCallback(
|
|
1677
1677
|
(d, b) => {
|
|
1678
|
-
!d.target || !h || (C(b),
|
|
1678
|
+
!d.target || !h || (C(b), F(!1), ye(d, b), U(d, !1));
|
|
1679
1679
|
},
|
|
1680
|
-
[C,
|
|
1680
|
+
[C, F, ye, U]
|
|
1681
1681
|
), st = n.useCallback(
|
|
1682
1682
|
(d) => {
|
|
1683
1683
|
se(document) === k.current && d.preventDefault();
|
|
@@ -1687,16 +1687,16 @@ const Ke = "16px", he = (e) => typeof e == "number" ? e + "px" : e, Nt = (e, o)
|
|
|
1687
1687
|
(d) => {
|
|
1688
1688
|
const b = J, ke = h ? h.length : -1;
|
|
1689
1689
|
if (d.altKey) {
|
|
1690
|
-
!y && d.keyCode === r.down && (d.preventDefault(),
|
|
1690
|
+
!y && d.keyCode === r.down && (d.preventDefault(), F(!0), C(0)), y && d.keyCode === r.up && (d.preventDefault(), F(!1), C(-1));
|
|
1691
1691
|
return;
|
|
1692
1692
|
}
|
|
1693
1693
|
switch (d.keyCode) {
|
|
1694
1694
|
case r.enter:
|
|
1695
1695
|
case r.space:
|
|
1696
|
-
b >= 0 && ye(d, b), h ||
|
|
1696
|
+
b >= 0 && ye(d, b), h || Fe(d), d.preventDefault(), F(!y), C(y ? -1 : 0);
|
|
1697
1697
|
break;
|
|
1698
1698
|
case r.esc:
|
|
1699
|
-
d.preventDefault(),
|
|
1699
|
+
d.preventDefault(), F(!1), C(-1);
|
|
1700
1700
|
break;
|
|
1701
1701
|
case r.home:
|
|
1702
1702
|
d.preventDefault(), C(0);
|
|
@@ -1713,14 +1713,14 @@ const Ke = "16px", he = (e) => typeof e == "number" ? e + "px" : e, Nt = (e, o)
|
|
|
1713
1713
|
d.preventDefault(), C(b - 1 < 0 ? ke - 1 : b - 1);
|
|
1714
1714
|
break;
|
|
1715
1715
|
}
|
|
1716
|
-
|
|
1716
|
+
I(
|
|
1717
1717
|
q,
|
|
1718
1718
|
d,
|
|
1719
1719
|
m(),
|
|
1720
1720
|
void 0
|
|
1721
1721
|
);
|
|
1722
1722
|
},
|
|
1723
|
-
[q, J, C, Q,
|
|
1723
|
+
[q, J, C, Q, F]
|
|
1724
1724
|
), ot = n.useMemo(
|
|
1725
1725
|
() => f(
|
|
1726
1726
|
"k-fab k-fab-solid",
|
|
@@ -1732,15 +1732,15 @@ const Ke = "16px", he = (e) => typeof e == "number" ? e + "px" : e, Nt = (e, o)
|
|
|
1732
1732
|
"k-pos-absolute": w === "absolute",
|
|
1733
1733
|
"k-pos-fixed": w === "fixed",
|
|
1734
1734
|
"k-focus": ce,
|
|
1735
|
-
[`k-rounded-${P.roundedMap[
|
|
1735
|
+
[`k-rounded-${P.roundedMap[x] || x}`]: x,
|
|
1736
1736
|
[`k-fab-solid-${E}`]: E
|
|
1737
1737
|
},
|
|
1738
1738
|
`k-${t.vertical}-${t.horizontal}`,
|
|
1739
1739
|
a
|
|
1740
1740
|
),
|
|
1741
|
-
[E, S,
|
|
1741
|
+
[E, S, x, l, w, t, ce, a]
|
|
1742
1742
|
), it = h && h.map((d, b) => /* @__PURE__ */ n.createElement(
|
|
1743
|
-
|
|
1743
|
+
Be,
|
|
1744
1744
|
{
|
|
1745
1745
|
...d,
|
|
1746
1746
|
key: b,
|
|
@@ -1752,12 +1752,12 @@ const Ke = "16px", he = (e) => typeof e == "number" ? e + "px" : e, Nt = (e, o)
|
|
|
1752
1752
|
item: D,
|
|
1753
1753
|
className: f(
|
|
1754
1754
|
d.className,
|
|
1755
|
-
|
|
1755
|
+
Bt(ge || "ltr", t.horizontal)
|
|
1756
1756
|
),
|
|
1757
1757
|
onClick: tt,
|
|
1758
1758
|
onDown: st
|
|
1759
1759
|
}
|
|
1760
|
-
)),
|
|
1760
|
+
)), ze = !!((u || c) && !N), at = k.current ? k.current.offsetWidth : 0, lt = 32, Pe = at / 2 - lt / 2;
|
|
1761
1761
|
return /* @__PURE__ */ n.createElement(ct.Provider, { value: le }, /* @__PURE__ */ n.createElement(n.Fragment, null, /* @__PURE__ */ n.createElement(
|
|
1762
1762
|
"button",
|
|
1763
1763
|
{
|
|
@@ -1776,8 +1776,8 @@ const Ke = "16px", he = (e) => typeof e == "number" ? e + "px" : e, Nt = (e, o)
|
|
|
1776
1776
|
dir: ge,
|
|
1777
1777
|
disabled: l,
|
|
1778
1778
|
className: ot,
|
|
1779
|
-
style:
|
|
1780
|
-
onClick:
|
|
1779
|
+
style: B,
|
|
1780
|
+
onClick: Fe,
|
|
1781
1781
|
onMouseDown: et,
|
|
1782
1782
|
onFocus: Qe,
|
|
1783
1783
|
onBlur: Ye,
|
|
@@ -1801,10 +1801,10 @@ const Ke = "16px", he = (e) => typeof e == "number" ? e + "px" : e, Nt = (e, o)
|
|
|
1801
1801
|
ref: be,
|
|
1802
1802
|
anchor: k.current,
|
|
1803
1803
|
show: y,
|
|
1804
|
-
animate:
|
|
1805
|
-
popupClass: f("k-popup-transparent k-fab-popup",
|
|
1806
|
-
anchorAlign:
|
|
1807
|
-
popupAlign:
|
|
1804
|
+
animate: z.animate,
|
|
1805
|
+
popupClass: f("k-popup-transparent k-fab-popup", z.popupClass),
|
|
1806
|
+
anchorAlign: z.anchorAlign || Nt(t, Q),
|
|
1807
|
+
popupAlign: z.popupAlign || St(t, Q),
|
|
1808
1808
|
style: { boxShadow: "none" }
|
|
1809
1809
|
},
|
|
1810
1810
|
/* @__PURE__ */ n.createElement(
|
|
@@ -1819,8 +1819,8 @@ const Ke = "16px", he = (e) => typeof e == "number" ? e + "px" : e, Nt = (e, o)
|
|
|
1819
1819
|
"k-fab-items-top": t.vertical === "bottom"
|
|
1820
1820
|
}),
|
|
1821
1821
|
style: {
|
|
1822
|
-
paddingLeft:
|
|
1823
|
-
paddingRight:
|
|
1822
|
+
paddingLeft: ze ? Pe : void 0,
|
|
1823
|
+
paddingRight: ze ? Pe : void 0
|
|
1824
1824
|
}
|
|
1825
1825
|
},
|
|
1826
1826
|
it
|
|
@@ -1836,7 +1836,7 @@ Xe.propTypes = {
|
|
|
1836
1836
|
accessKey: s.string,
|
|
1837
1837
|
disabled: s.bool,
|
|
1838
1838
|
icon: s.string,
|
|
1839
|
-
svgIcon:
|
|
1839
|
+
svgIcon: M,
|
|
1840
1840
|
iconClass: s.string,
|
|
1841
1841
|
text: s.string,
|
|
1842
1842
|
alignOffset: s.shape({
|
|
@@ -1887,7 +1887,7 @@ export {
|
|
|
1887
1887
|
Ne as DropDownButtonClassComponent,
|
|
1888
1888
|
Ue as DropDownButtonItem,
|
|
1889
1889
|
Xe as FloatingActionButton,
|
|
1890
|
-
|
|
1890
|
+
Be as FloatingActionButtonItem,
|
|
1891
1891
|
Kt as SplitButton,
|
|
1892
1892
|
Ee as SplitButtonClassComponent,
|
|
1893
1893
|
Te as SplitButtonItem,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-react-buttons",
|
|
3
|
-
"version": "7.0.0-develop.
|
|
3
|
+
"version": "7.0.0-develop.14",
|
|
4
4
|
"description": "All you need in React Button in one package: disabled/enabled states, built-in styles and more. KendoReact Buttons package",
|
|
5
5
|
"author": "Progress",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
@@ -17,8 +17,8 @@
|
|
|
17
17
|
"sideEffects": false,
|
|
18
18
|
"peerDependencies": {
|
|
19
19
|
"@progress/kendo-licensing": "^1.3.0",
|
|
20
|
-
"@progress/kendo-react-common": "7.0.0-develop.
|
|
21
|
-
"@progress/kendo-react-popup": "7.0.0-develop.
|
|
20
|
+
"@progress/kendo-react-common": "7.0.0-develop.14",
|
|
21
|
+
"@progress/kendo-react-popup": "7.0.0-develop.14",
|
|
22
22
|
"@progress/kendo-svg-icons": "^2.0.0",
|
|
23
23
|
"react": "^16.8.2 || ^17.0.0 || ^18.0.0",
|
|
24
24
|
"react-dom": "^16.8.2 || ^17.0.0 || ^18.0.0"
|