@progress/kendo-react-buttons 10.0.0-develop.3 → 10.0.0-develop.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5,4 +5,4 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("react"),i=require("prop-types"),c=require("../Button.js"),s=require("@progress/kendo-react-common"),g=require("./ButtonItem.js"),C=require("./SplitButtonItem.js"),b=require("./utils/navigation.js"),y=require("@progress/kendo-react-popup"),m=require("./utils/popup.js"),k=require("../package-metadata.js"),D=require("@progress/kendo-svg-icons");function w(h){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(h){for(const t in h)if(t!=="default"){const e=Object.getOwnPropertyDescriptor(h,t);Object.defineProperty(o,t,e.get?e:{enumerable:!0,get:()=>h[t]})}}return o.default=h,Object.freeze(o)}const a=w(f),d=class d extends a.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.showLicenseWatermark=!1,this.onKeyDown=t=>{const{focusedIndex:e}=this.state;if(t.altKey){!this.opened&&t.keyCode===s.Keys.down?(t.preventDefault(),this.setState({focusedIndex:0}),this.setOpen(!0,t)):this.opened&&t.keyCode===s.Keys.up&&(t.preventDefault(),this.setState({focusedIndex:-1}),this.setOpen(!1,t));return}let n;if(t.keyCode===s.Keys.enter||t.keyCode===s.Keys.space){if(t.preventDefault(),this.dispatchClickEvent(t,e),e>=0){n={focusedIndex:this.opened?-1:0};const r=!this.opened;this.setOpen(r,t)}}else if(this.opened&&t.keyCode===s.Keys.esc){this.setState({focusedIndex:-1}),this.setOpen(!1,t);return}if(this.opened){const r=b.navigate(e,t.keyCode,t.altKey,this.buttonsData.length);r!==e&&(n=n||{},n.focusedIndex=r);const l=t.keyCode===s.Keys.up||t.keyCode===s.Keys.down||t.keyCode===s.Keys.left||t.keyCode===s.Keys.right;!t.altKey&&(l||t.keyCode===s.Keys.home||t.keyCode===s.Keys.end)&&t.preventDefault()}n&&this.setState(n)},this.switchFocus=t=>{this.skipFocus=!0,t(),window.setTimeout(()=>this.skipFocus=!1,0)},this.onFocus=t=>{this.skipFocus||(s.dispatchEvent(this.props.onFocus,t,this,void 0),this.setState({focused:!0}))},this.setOpen=(t,e)=>{this.opened!==t&&(this.openedDuringOnChange=t,this.setState({opened:t}),e?this.dispatchPopupEvent(e,t):this.openedDuringOnChange=void 0)},this.onItemClick=(t,e)=>{this.opened&&this.setState({focusedIndex:0}),this.dispatchClickEvent(t,e),this.setOpen(!1,t)},this.onBlur=t=>{this.skipFocus||(this.setState({focused:!1,focusedIndex:-1}),s.dispatchEvent(this.props.onBlur,t,this,void 0),setTimeout(()=>{this.setOpen(!1,t)},0))},this.onPopupClose=t=>{var n;const e=s.getActiveElement(document);this.element&&this.element.removeAttribute("tabindex"),(e===this.list||(n=this.list)!=null&&n.contains(e))&&this.switchFocus(()=>{this.element&&this.element.focus({preventScroll:!0})}),this.props.popupSettings&&this.props.popupSettings.onClose&&this.props.popupSettings.onClose.call(void 0,t)},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 e=!this.opened;this.setState({focusedIndex:e?0:-1,focused:!0}),this.setOpen(e,t)}},this.onDownSplitPart=t=>{t.preventDefault();const e=s.getActiveElement(document);this.element&&e!==this.element&&e!==this.list&&this.element.focus()},this.onItemDown=t=>{s.getActiveElement(document)===this.list&&t.preventDefault()},this.dispatchPopupEvent=(t,e)=>{s.dispatchEvent(e?this.props.onOpen:this.props.onClose,t,this,void 0),this.openedDuringOnChange=void 0},this.showLicenseWatermark=!s.validatePackage(k.packageMetadata,{component:"SplitButton"})}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||a.Children.toArray(this.props.children).filter(p=>p&&p.type===C.SplitButtonItem).map(p=>p.props);const o=this.isRtl(),t=o?"rtl":void 0,{id:e,style:n,tabIndex:r,disabled:l}=this.props;return a.createElement(a.Fragment,null,a.createElement("div",{id:e,style:n,className:s.classNames("k-split-button","k-button-group",{"k-focus":this.state.focused},`k-rounded-${s.kendoThemeMaps.roundedMap[this.props.rounded||"medium"]}`,this.props.className),onKeyDown:this.onKeyDown,onFocus:this.onFocus,onBlur:this.onBlur,dir:t,ref:p=>this.wrapper=p},a.createElement(c.Button,{ref:p=>this.mainButton=p&&p.element,type:"button",size:this.props.size,rounded:this.props.rounded,fillMode:this.props.fillMode,themeColor:this.props.themeColor,onClick:p=>this.onItemClick(p,-1),disabled:l||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":l,"aria-haspopup":!0,"aria-expanded":this.opened||void 0,"aria-label":this.props.ariaLabel,"aria-controls":this.opened?this.guid:void 0,id:"button-"+this.guid,title:this.props.title},this.props.text),a.createElement(c.Button,{type:"button",size:this.props.size,rounded:this.props.rounded,fillMode:this.props.fillMode,themeColor:this.props.themeColor,icon:"caret-alt-down",svgIcon:D.caretAltDownIcon,className:"k-split-button-arrow",disabled:l||void 0,tabIndex:-1,onClick:this.onSplitPartClick,onMouseDown:this.onDownSplitPart,onPointerDown:this.onDownSplitPart,dir:t,"aria-label":"menu toggling button"}),this.renderPopup(o)),this.showLicenseWatermark&&a.createElement(s.WatermarkOverlay,null))}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?s.dispatchEvent(this.props.onButtonClick,o,this,void 0):s.dispatchEvent(this.props.onItemClick,o,this,{item:this.buttonsData[t],itemIndex:t}))}renderPopup(o){const{popupSettings:t={}}=this.props,{focusedIndex:e}=this.state;return a.createElement(y.Popup,{anchor:this.wrapper,show:this.opened,animate:t.animate,popupClass:s.classNames("k-menu-popup",t.popupClass),anchorAlign:t.anchorAlign||m.getAnchorAlign(o),popupAlign:t.popupAlign||m.getPopupAlign(o),style:o?{direction:"rtl"}:void 0,onClose:this.onPopupClose},a.createElement("ul",{role:"menu",id:this.guid,"aria-labelledby":"button-"+this.guid,tabIndex:-1,ref:this.listRef,"aria-activedescendant":e>=0?`${this.guid}-${e}`:void 0,className:s.classNames("k-menu-group",{[`k-menu-group-${s.kendoThemeMaps.sizeMap[this.props.size]||this.props.size}`]:this.props.size})},this.renderChildItems()))}renderChildItems(){const{item:o,itemRender:t,textField:e}=this.props;return this.buttonsData.length>0?this.buttonsData.map((n,r)=>a.createElement(g.ButtonItem,{className:s.classNames("k-menu-item",{"k-first":r===0},{"k-last":r===this.buttonsData.length-1}),dataItem:n,textField:e,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"}};d.propTypes={accessKey:i.string,ariaLabel:i.string,title:i.string,onButtonClick:i.func,onFocus:i.func,onBlur:i.func,onItemClick:i.func,onOpen:i.func,onClose:i.func,text:i.string,items:i.arrayOf(i.any),textField:i.string,tabIndex:i.number,disabled:i.bool,icon:i.string,svgIcon:s.svgIconPropType,iconClass:i.string,imageUrl:i.string,popupSettings:i.object,itemRender:i.any,item:i.func,className:i.string,buttonClass:i.string,dir:i.string},d.defaultProps={size:"medium",rounded:"medium",fillMode:"solid",themeColor:"base"};let u=d;exports.SplitButton=u;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("react"),i=require("prop-types"),c=require("../Button.js"),s=require("@progress/kendo-react-common"),g=require("./ButtonItem.js"),C=require("./SplitButtonItem.js"),b=require("./utils/navigation.js"),y=require("@progress/kendo-react-popup"),m=require("./utils/popup.js"),k=require("../package-metadata.js"),D=require("@progress/kendo-svg-icons");function I(h){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(h){for(const t in h)if(t!=="default"){const e=Object.getOwnPropertyDescriptor(h,t);Object.defineProperty(o,t,e.get?e:{enumerable:!0,get:()=>h[t]})}}return o.default=h,Object.freeze(o)}const a=I(f),d=class d extends a.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.showLicenseWatermark=!1,this.onKeyDown=t=>{const{focusedIndex:e}=this.state;if(t.altKey){!this.opened&&t.keyCode===s.Keys.down?(t.preventDefault(),this.setState({focusedIndex:0}),this.setOpen(!0,t)):this.opened&&t.keyCode===s.Keys.up&&(t.preventDefault(),this.setState({focusedIndex:-1}),this.setOpen(!1,t));return}let n;if(t.keyCode===s.Keys.enter||t.keyCode===s.Keys.space){if(t.preventDefault(),this.dispatchClickEvent(t,e),e>=0){n={focusedIndex:this.opened?-1:0};const r=!this.opened;this.setOpen(r,t)}}else if(this.opened&&t.keyCode===s.Keys.esc){this.setState({focusedIndex:-1}),this.setOpen(!1,t);return}if(this.opened){const r=b.navigate(e,t.keyCode,t.altKey,this.buttonsData.length);r!==e&&(n=n||{},n.focusedIndex=r);const l=t.keyCode===s.Keys.up||t.keyCode===s.Keys.down||t.keyCode===s.Keys.left||t.keyCode===s.Keys.right;!t.altKey&&(l||t.keyCode===s.Keys.home||t.keyCode===s.Keys.end)&&t.preventDefault()}n&&this.setState(n)},this.switchFocus=t=>{this.skipFocus=!0,t(),window.setTimeout(()=>this.skipFocus=!1,0)},this.onFocus=t=>{this.skipFocus||(s.dispatchEvent(this.props.onFocus,t,this,void 0),this.setState({focused:!0}))},this.setOpen=(t,e)=>{this.opened!==t&&(this.openedDuringOnChange=t,this.setState({opened:t}),e?this.dispatchPopupEvent(e,t):this.openedDuringOnChange=void 0)},this.onItemClick=(t,e)=>{this.opened&&this.setState({focusedIndex:0}),this.dispatchClickEvent(t,e),this.setOpen(!1,t)},this.onBlur=t=>{this.skipFocus||(this.setState({focused:!1,focusedIndex:-1}),s.dispatchEvent(this.props.onBlur,t,this,void 0),setTimeout(()=>{this.setOpen(!1,t)},0))},this.onPopupClose=t=>{var n;const e=s.getActiveElement(document);this.element&&this.element.removeAttribute("tabindex"),(e===this.list||(n=this.list)!=null&&n.contains(e))&&this.switchFocus(()=>{this.element&&this.element.focus({preventScroll:!0})}),this.props.popupSettings&&this.props.popupSettings.onClose&&this.props.popupSettings.onClose.call(void 0,t)},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 e=!this.opened;this.setState({focusedIndex:e?0:-1,focused:!0}),this.setOpen(e,t)}},this.onDownSplitPart=t=>{t.preventDefault();const e=s.getActiveElement(document);this.element&&e!==this.element&&e!==this.list&&this.element.focus()},this.onItemDown=t=>{s.getActiveElement(document)===this.list&&t.preventDefault()},this.dispatchPopupEvent=(t,e)=>{s.dispatchEvent(e?this.props.onOpen:this.props.onClose,t,this,void 0),this.openedDuringOnChange=void 0},this.showLicenseWatermark=!s.validatePackage(k.packageMetadata,{component:"SplitButton"})}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||a.Children.toArray(this.props.children).filter(p=>p&&p.type===C.SplitButtonItem).map(p=>p.props);const o=this.isRtl(),t=o?"rtl":void 0,{id:e,style:n,tabIndex:r,disabled:l}=this.props;return a.createElement(a.Fragment,null,a.createElement("div",{id:e,style:n,className:s.classNames("k-split-button","k-button-group",{"k-focus":this.state.focused},`k-rounded-${s.kendoThemeMaps.roundedMap[this.props.rounded||"medium"]}`,this.props.className),onKeyDown:this.onKeyDown,onFocus:this.onFocus,onBlur:this.onBlur,dir:t,ref:p=>this.wrapper=p},a.createElement(c.Button,{ref:p=>this.mainButton=p&&p.element,type:"button",size:this.props.size,rounded:this.props.rounded,fillMode:this.props.fillMode,themeColor:this.props.themeColor,onClick:p=>this.onItemClick(p,-1),disabled:l||void 0,tabIndex:r,accessKey:this.props.accessKey,className:this.props.buttonClass,icon:this.props.icon,svgIcon:this.props.svgIcon,iconClass:this.props.iconClass,startIcon:this.props.startIcon,endIcon:this.props.endIcon,imageUrl:this.props.imageUrl,dir:t,"aria-disabled":l,"aria-haspopup":!0,"aria-expanded":this.opened||void 0,"aria-label":this.props.ariaLabel,"aria-controls":this.opened?this.guid:void 0,id:"button-"+this.guid,title:this.props.title},this.props.text),a.createElement(c.Button,{type:"button",size:this.props.size,rounded:this.props.rounded,fillMode:this.props.fillMode,themeColor:this.props.themeColor,icon:"caret-alt-down",svgIcon:D.caretAltDownIcon,className:"k-split-button-arrow",disabled:l||void 0,tabIndex:-1,onClick:this.onSplitPartClick,onMouseDown:this.onDownSplitPart,onPointerDown:this.onDownSplitPart,dir:t,"aria-label":"menu toggling button"}),this.renderPopup(o)),this.showLicenseWatermark&&a.createElement(s.WatermarkOverlay,null))}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?s.dispatchEvent(this.props.onButtonClick,o,this,void 0):s.dispatchEvent(this.props.onItemClick,o,this,{item:this.buttonsData[t],itemIndex:t}))}renderPopup(o){const{popupSettings:t={}}=this.props,{focusedIndex:e}=this.state;return a.createElement(y.Popup,{anchor:this.wrapper,show:this.opened,animate:t.animate,popupClass:s.classNames("k-menu-popup",t.popupClass),anchorAlign:t.anchorAlign||m.getAnchorAlign(o),popupAlign:t.popupAlign||m.getPopupAlign(o),style:o?{direction:"rtl"}:void 0,onClose:this.onPopupClose},a.createElement("ul",{role:"menu",id:this.guid,"aria-labelledby":"button-"+this.guid,tabIndex:-1,ref:this.listRef,"aria-activedescendant":e>=0?`${this.guid}-${e}`:void 0,className:s.classNames("k-menu-group",{[`k-menu-group-${s.kendoThemeMaps.sizeMap[this.props.size]||this.props.size}`]:this.props.size})},this.renderChildItems()))}renderChildItems(){const{item:o,itemRender:t,textField:e}=this.props;return this.buttonsData.length>0?this.buttonsData.map((n,r)=>a.createElement(g.ButtonItem,{className:s.classNames("k-menu-item",{"k-first":r===0},{"k-last":r===this.buttonsData.length-1}),dataItem:n,textField:e,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"}};d.propTypes={accessKey:i.string,ariaLabel:i.string,title:i.string,onButtonClick:i.func,onFocus:i.func,onBlur:i.func,onItemClick:i.func,onOpen:i.func,onClose:i.func,text:i.string,items:i.arrayOf(i.any),textField:i.string,tabIndex:i.number,disabled:i.bool,icon:i.string,svgIcon:s.svgIconPropType,iconClass:i.string,imageUrl:i.string,popupSettings:i.object,itemRender:i.any,item:i.func,className:i.string,buttonClass:i.string,dir:i.string},d.defaultProps={size:"medium",rounded:"medium",fillMode:"solid",themeColor:"base"};let u=d;exports.SplitButton=u;
@@ -11,8 +11,8 @@ import { Button as m } from "../Button.mjs";
11
11
  import { Keys as a, dispatchEvent as l, getActiveElement as c, validatePackage as C, svgIconPropType as k, classNames as d, kendoThemeMaps as f, WatermarkOverlay as b } from "@progress/kendo-react-common";
12
12
  import { ButtonItem as y } from "./ButtonItem.mjs";
13
13
  import { SplitButtonItem as D } from "./SplitButtonItem.mjs";
14
- import { navigate as w } from "./utils/navigation.mjs";
15
- import { Popup as I } from "@progress/kendo-react-popup";
14
+ import { navigate as I } from "./utils/navigation.mjs";
15
+ import { Popup as w } from "@progress/kendo-react-popup";
16
16
  import { getAnchorAlign as S, getPopupAlign as v } from "./utils/popup.mjs";
17
17
  import { packageMetadata as O } from "../package-metadata.mjs";
18
18
  import { caretAltDownIcon as E } from "@progress/kendo-svg-icons";
@@ -42,7 +42,7 @@ const u = class u extends p.Component {
42
42
  return;
43
43
  }
44
44
  if (this.opened) {
45
- const n = w(e, t.keyCode, t.altKey, this.buttonsData.length);
45
+ const n = I(e, t.keyCode, t.altKey, this.buttonsData.length);
46
46
  n !== e && (o = o || {}, o.focusedIndex = n);
47
47
  const h = t.keyCode === a.up || t.keyCode === a.down || t.keyCode === a.left || t.keyCode === a.right;
48
48
  !t.altKey && (h || t.keyCode === a.home || t.keyCode === a.end) && t.preventDefault();
@@ -140,6 +140,8 @@ const u = class u extends p.Component {
140
140
  icon: this.props.icon,
141
141
  svgIcon: this.props.svgIcon,
142
142
  iconClass: this.props.iconClass,
143
+ startIcon: this.props.startIcon,
144
+ endIcon: this.props.endIcon,
143
145
  imageUrl: this.props.imageUrl,
144
146
  dir: t,
145
147
  "aria-disabled": h,
@@ -196,7 +198,7 @@ const u = class u extends p.Component {
196
198
  renderPopup(i) {
197
199
  const { popupSettings: t = {} } = this.props, { focusedIndex: e } = this.state;
198
200
  return /* @__PURE__ */ p.createElement(
199
- I,
201
+ w,
200
202
  {
201
203
  anchor: this.wrapper,
202
204
  show: this.opened,
package/README.md CHANGED
@@ -6,106 +6,253 @@
6
6
 
7
7
  > **Important**
8
8
  >
9
- > - This package is а part of [KendoReact](https://www.telerik.com/kendo-react-ui?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-buttons)—a commercial UI library.
10
- > - You will need to install a license key when adding the package to your project. For more information, please refer to the [KendoReact My License page](https://www.telerik.com/kendo-react-ui/components/my-license/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-buttons).
11
- > - To receive a license key, you need to either [purchase a license](https://www.telerik.com/kendo-react-ui/pricing?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-buttons) or register for a [free trial](https://www.telerik.com/try/kendo-react-ui?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-buttons). Doing so indicates that you [accept the KendoReact License Agreement](https://www.telerik.com/purchase/license-agreement/progress-kendoreact?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-buttons).
9
+ > - This package is а part of [KendoReact](https://www.telerik.com/kendo-react-ui?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-buttons)—an enterprise-grade UI library with 120+ free and premium components.
10
+ > - This package contains both free and premium KendoReact components and tools. To use the premium components, you will need to [purchase a license](https://www.telerik.com/kendo-react-ui/pricing?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-buttons) or register for a [free trial](https://www.telerik.com/try/kendo-react-ui?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-buttons). You can use the free components even in production, no sign-up or license required.
11
+ > - If you're looking for free React components, check out [Get Started with KendoReact Free: 50+ Free React Components](https://www.telerik.com/kendo-react-ui/components/free).
12
+ > - If you have an active license, visit the [KendoReact My License page](https://www.telerik.com/kendo-react-ui/components/my-license/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-buttons) to learn how to configure your KendoReact licensing.
13
+ > - Installing and working with this package indicates that you [accept the KendoReact License Agreement](https://www.telerik.com/purchase/license-agreement/progress-kendoreact?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-buttons).
12
14
  > - The 30-day free trial gives you access to all the KendoReact components and their full functionality. Additionally, for the period of your license, you get access to our legendary technical support provided directly by the KendoReact dev team!
13
15
  >
14
16
  > [Start using KendoReact](https://www.telerik.com/try/kendo-react-ui?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-buttons) and speed up your development process!
15
17
 
16
- What's in this package (ToC):
17
-
18
- - [React Button component](#react-button-component)
19
- - [React ButtonGroup component](#react-buttongroup-component)
20
- - [React Chip component](#react-chip-component)
21
- - [React ChipList component](#react-chiplist-component)
22
- - [React DropDown Button component](#react-dropdown-button-component)
23
- - [React FloatingActionButton component](#react-floating-action-button-component)
24
- - [React SplitButton component](#react-splitbutton-component)
25
- - [React Toolbar component](#react-toolbar-component)
26
- - [React Buttons Components Library Features](#react-buttons-library-shared-features)
18
+ The React Buttons package, part of KendoReact, includes a rich selection of fully configurable button types that help you create stylish and practical applications.
19
+
20
+ How to start:
21
+
22
+ ```sh
23
+ npm install --save @progress/kendo-react-buttons @progress/kendo-react-popup @progress/kendo-popup-common @progress/kendo-svg-icons @progress/kendo-licensing
24
+ ```
25
+
26
+ What's in this package:
27
+
28
+ - [React Buttons Components Libray Features](#react-buttons-components-library-features)
29
+ - [React Button component (free)](#react-button-component)
30
+ - [React ButtonGroup component (free)](#react-buttongroup-component)
31
+ - [React Chip component (free)](#react-chip-component)
32
+ - [React ChipList component (free)](#react-chiplist-component)
33
+ - [React DropDownButton component (premium)](#react-dropdownbutton-component)
34
+ - [React FloatingActionButton component (free)](#react-floatingactionbutton-component)
35
+ - [React SplitButton component (premium)](#react-splitbutton-component)
36
+ - [React Toolbar component (free)](#react-toolbar-component)
37
+
38
+ Additional information:
39
+
27
40
  - [Support Options](#support-options)
28
41
  - [Resources](#resources)
42
+ - [KendoReact Buttons API](https://www.telerik.com/kendo-react-ui/components/buttons/api)
43
+
44
+ ## React Buttons Components Library Features
45
+
46
+ Here are some of the features shared across all components included in the package (this is not an exhaustive list):
47
+
48
+ - **Disabled state**—To disable user interaction, just change a single property.
49
+ - **Custom rendering**—You can replace the content of the buttons with custom icons, text and elements.
50
+ - **Keyboard navigation**—You can interact with the buttons using only the keyboard.
51
+ - **Accessibility support**—The Buttons are compliant with WAI-ARIA and Section 508.
52
+ - [**Theme support**](https://www.telerik.com/kendo-react-ui/components/styling/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-buttons)—The KendoReact Buttons, as well as all 100+ components in the KendoReact suite, are styled in three polished themes (Bootstrap, Material, and Default) and can be further customized to match your specific design guidelines.
29
53
 
30
54
  ## React Button Component
31
55
 
56
+ > This is a **free React component**—no sign-up or license required, even in production.
57
+
32
58
  [The React Button](https://www.telerik.com/kendo-react-ui/components/buttons/button/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-buttons) provides a clickable UI functionality and enables you to display only textual content, or show predefined icons, images and custom icons, and to render a combination of textual and image content.
33
59
 
34
- ### Key Features
60
+ Key features:
61
+
62
+ - [Primary Button](https://www.telerik.com/kendo-react-ui/components/buttons/button/appearance#theme-colors)—As a part of several built-in styles for the KendoReact Button, the Primary Button provides a unique highlighted look and feel to the React Button component.
63
+ - [Toggleable Button](https://www.telerik.com/kendo-react-ui/components/buttons/button/toggleable)—A KendoReact Button that can be toggled showcases a clear representation between the default rendering of the Button and when the Button has been pressed.
64
+ - [Unstyled mode](https://www.telerik.com/kendo-react-ui/components/unstyled)—The KendoReact Button supports an unstyled mode, offering complete control over the Button appearance.
65
+
66
+ How to use the Button component in your apps:
35
67
 
36
- - **Primary Button**—As a part of several built-in styles for the KendoReact Button, the Primary Button provides a unique highlighted look and feel to the React Button component.
37
- - **Toggleable Button**—A KendoReact Button that can be toggled showcases a clear representation between the default rendering of the Button and when the Button has been pressed.
38
- - **Globalization**—The React Button supports being rendered in a right-to-left mode, allowing for it to be used in any globalization or localization scenarios.
68
+ ```tsx
69
+ import { Button } from '@progress/kendo-react-buttons';
70
+ ...
71
+ <Button>
72
+ Button Label
73
+ </Button>
74
+ ```
39
75
 
40
76
  ## React ButtonGroup Component
41
77
 
78
+ > This is a **free React component**&mdash;no sign-up or license required, even in production.
79
+
42
80
  [The KendoReact ButtonGroup](https://www.telerik.com/kendo-react-ui/components/buttons/buttongroup/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-buttons) is a container for two or more React Button components which can be separately configured to display only textual content, or show predefined icons, images and custom icons.
43
81
 
82
+ How to use the ButtonGroup component in your apps:
83
+
84
+ ```tsx
85
+ import { Button, ButtonGroup } from '@progress/kendo-react-buttons';
86
+ ...
87
+ <ButtonGroup>
88
+ /**
89
+ * Insert the <Button> components that you want to display as a group here.
90
+ */
91
+ </ButtonGroup>
92
+ ```
93
+
44
94
  ## React Chip Component
45
95
 
96
+ > This is a **free React component**&mdash;no sign-up or license required, even in production.
97
+
46
98
  [The React Chip component](https://www.telerik.com/kendo-react-ui/components/buttons/chip/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-buttons) is responsible for a single Chip (also called React Pill) and can contain text, an image or avatar (optional) and a built-in icon, such as an "X," to indicate that an action can be taken.
47
99
 
48
- ### Key Features
100
+ Key features:
101
+
102
+ - [Removable Chip](https://www.telerik.com/kendo-react-ui/components/buttons/chip/remove)&mdash;Through the removable property, React developers can configure whether the KendoReact Chip component should provide a built-in “X” icon to allow users to remove the Chip.
103
+ - [Avatars and icons](https://www.telerik.com/kendo-react-ui/components/buttons/chip/appearance#chip-with-avatars)&mdash;The React Chip component lets you add avatars and font or SVG icons to create more compelling and user-friendly interfaces.
104
+ - [Appearance](https://www.telerik.com/kendo-react-ui/components/buttons/chip/appearance)&mdash;The KendoReact Chip component provides the `size`, `fillMode`, `rounded`, and `themeColor` properties to let you control its look and feel.
105
+
106
+ How to use the Chip component in your apps:
49
107
 
50
- - **Removable Chip**&mdash;Through the removable property, React developers can configure whether the KendoReact Chip component should provide a built-in “X” icon to allow users to remove the Chip.
51
- - **Chip Types**&mdash;To provide as much flexibility as possible, the React Chip component has several readily available types, each with its own unique style.
52
- - **Appearance**&mdash;The KendoReact Chip component has two built-in appearance options. The filled option sets a background color of the React Chip and fills in the entire content area.
108
+ ```tsx
109
+ import { Chip } from '@progress/kendo-react-buttons';
110
+ ...
111
+ <Chip
112
+ text={'Chip Label'}
113
+ />
114
+ ```
53
115
 
54
116
  ## React ChipList Component
55
117
 
118
+ > This is a **free React component**&mdash;no sign-up or license required, even in production.
119
+
56
120
  [The React ChipList component](https://www.telerik.com/kendo-react-ui/components/buttons/chiplist/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-buttons) takes the React Chip and provides additional functionality related to managing a collection of KendoReact Chip components.
57
121
 
58
- ### Key Features
122
+ Key features:
123
+
124
+ - [Selection mode](https://www.telerik.com/kendo-react-ui/components/buttons/chiplist/selection-mode)&mdash;To ensure flexibility, the KendoReact ChipList component provides several selection modes.The default mode is “none”, which means no chips can be selected, yet you can enable single and multiple selection to help users manage their items individually or in bulk.
125
+ - [Data Binding](https://www.telerik.com/kendo-react-ui/components/buttons/chiplist/data-binding)&mdash;As the KendoReact ChipList component deals with displaying and manipulating a collection of items, you can bind it to different data sources.
126
+
127
+ How to use the ChipList component in your apps:
59
128
 
60
- - **Selection Mode**&mdash;To ensure flexibility, the KendoReact ChipList component provides several selection modes.The default mode is “none”, which means no chips can be selected, yet you can enable single and multiple selection to help users manage their items individually or in bulk.
61
- - **Data Binding**&mdash;As the KendoReact ChipList component deals with displaying and manipulating a collection of items, you can bind it to different data sources.
129
+ ```tsx
130
+ import { ChipList } from '@progress/kendo-react-buttons';
131
+ ...
132
+ /**
133
+ * Introduce the data that you will use to populate the ChipList with chips.
134
+ */
135
+ <ChipList
136
+ data={data}
137
+ />
138
+ ```
62
139
 
63
140
  ## React DropDown Button Component
64
141
 
142
+ > This is a KendoReact **premium component** and requires a commercial license or an active trial license.
143
+
65
144
  [The React DropDownButton component](https://www.telerik.com/kendo-react-ui/components/buttons/dropdownbutton/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-buttons) displays a popup list with action items and provides options for enabling or disabling its content, displaying icons, and binding it to data.
66
145
 
67
- ### Key Features
146
+ Key features:
147
+
148
+ - [Icon DropDownButton](https://www.telerik.com/kendo-react-ui/components/buttons/dropdownbutton/icons)&mdash;The KendoReact DropDownButton can be displayed as just an icon or with a mix of text and icons as a part of its main content.
149
+ - [Data Binding](https://www.telerik.com/kendo-react-ui/components/buttons/dropdownbutton/data-binding)&mdash;Beyond being declaratively built, the KendoReact DropDownButton component can be data bound to an array of strings or an array of objects.
150
+ - [Unstyled mode](https://www.telerik.com/kendo-react-ui/components/unstyled)&mdash;The KendoReact DropDownButton supports an unstyled mode, offering complete control over its appearance.
151
+
152
+ How to use the DropDownButton with hardcoded data:
68
153
 
69
- - **Icon DropDownButton**&mdash;The KendoReact DropDownButton can be displayed as just an icon, or with a mix of text and icons as a part of its main content.
70
- - **Data Binding**&mdash;Beyond being declaratively built, the KendoReact DropDownButton component can be data bound to an array of strings or an array of objects.
154
+ ```tsx
155
+ import { DropDownButton, DropDownButtonItem } from '@progress/kendo-react-buttons';
156
+ ...
157
+ <DropDownButton text="DropDownButton Label">
158
+ <DropDownButtonItem text="Item 1 Label" />
159
+ <DropDownButtonItem text="Item 2 Label" />
160
+ </DropDownButton>
161
+ ```
71
162
 
72
- ## React Floating Action Button Component
163
+ How to use the DropDownButton with simple data binding:
164
+
165
+ ```tsx
166
+ import { DropDownButton } from '@progress/kendo-react-buttons';
167
+ ...
168
+ /**
169
+ * Provide an array of items for the drop-down here.
170
+ */
171
+ <DropDownButton
172
+ items={items}
173
+ text="DropDownButton Label"
174
+ />
175
+ ```
176
+
177
+ ## React FloatingActionButton Component
178
+
179
+ > This is a **free React component**&mdash;no sign-up or license required, even in production.
73
180
 
74
181
  [The KendoReact Floating Action Button](https://www.telerik.com/kendo-react-ui/components/buttons/floatingactionbutton/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-buttons) is a button that appears to “float” above the content of any React application, usually serving as a shortcut to a single, common action like adding an item or composing a new email.
75
182
 
76
- ### Key Features
183
+ Key features:
77
184
 
78
- - **Content Types**&mdash;The content within the KendoReact Floating Action Button can be completely customized through the available properties. Access the icon, iconClass and text properties to define the React Floating Action Button icon, apply a custom CSS class to control the style of the button and set text displayed within the component.
79
- - **Speed Dial**&mdash;If additional action items should be available to users, the speed dial feature of the KendoReact Floating Action Button is the perfect solution.
80
- - **Positioning**&mdash;The KendoReact Floating Action Button provides several configuration options to assist with defining where the React component should be displayed within the application. The position can be set through easy-to-remember options like “start”, “center”, “end”, “top”, “middle” and “bottom”.
185
+ - [Content Types](https://www.telerik.com/kendo-react-ui/components/buttons/floatingactionbutton/content-types)&mdash;The content within the KendoReact Floating Action Button can be completely customized through the available properties. Access the `icon`, `iconClass` and `text` properties to define the React Floating Action Button icon, apply a custom CSS class to control the style of the button, and set text displayed within the component.
186
+ - [Speed Dial](https://www.telerik.com/kendo-react-ui/components/buttons/floatingactionbutton/speed-dial)&mdash;If additional action items should be available to users, the speed dial feature of the KendoReact Floating Action Button is the perfect solution.
187
+ - [Positioning](https://www.telerik.com/kendo-react-ui/components/buttons/floatingactionbutton/positioning)&mdash;The KendoReact Floating Action Button provides several configuration options to assist with defining where the React component should be displayed within the application. The position can be set through easy-to-remember options like “start”, “center”, “end”, “top”, “middle” and “bottom”.
188
+
189
+ How to use a simple text FloatingActionButton component in your apps:
190
+
191
+ ```tsx
192
+ import { FloatingActionButton } from '@progress/kendo-react-buttons';
193
+ ...
194
+ <FloatingActionButton text={'FloatingActionButtonLabel'} />
195
+ ```
81
196
 
82
197
  ## React SplitButton Component
83
198
 
199
+ > This is a KendoReact **premium component** and requires a commercial license or an active trial license.
200
+
84
201
  [The KendoReact SplitButton component](https://www.telerik.com/kendo-react-ui/components/buttons/splitbutton/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-buttons) allows the user to execute a default action which is bound to a Button or to choose a predefined action from a drop-down list.
85
202
 
86
- ### Key Features
203
+ Key features:
87
204
 
88
- - **Icon SplitButton**&mdash;Each item within the KendoReact SplitButton can be rendered as just text, text along with an icon, or just as an icon.
89
- - **Data Binding**&mdash;The React SplitButton can be defined declaratively and can also be bound to an array of strings, or an array of objects.
205
+ - [Icon SplitButton](https://www.telerik.com/kendo-react-ui/components/buttons/splitbutton/icons)&mdash;Each item within the KendoReact SplitButton can be rendered as just text, text along with an icon, or just as an icon.
206
+ - [Data Binding](https://www.telerik.com/kendo-react-ui/components/buttons/splitbutton/data-binding)&mdash;The React SplitButton can be defined declaratively and can also be bound to an array of strings, or an array of objects.
207
+
208
+ How to use the SplitButtonComponent with hardcoded data:
209
+
210
+ ```tsx
211
+ import { SplitButton, SplitButtonItem } from '@progress/kendo-react-buttons';
212
+ ...
213
+ <SplitButton text="SplitButton Label">
214
+ <SplitButtonItem text="Item 1 Label" />
215
+ <SplitButtonItem text="Item 2 Label" />
216
+ </SplitButton>
217
+ ```
218
+
219
+ How to use the DropDownButton with simple data binding:
220
+
221
+ ```tsx
222
+ import { SplitButton } from '@progress/kendo-react-buttons';
223
+ ...
224
+ /**
225
+ * Provide an array of items for the drop-down here.
226
+ */
227
+ <SplitButton
228
+ items={items}
229
+ text="SplitButton Label"
230
+ />
231
+ ```
90
232
 
91
233
  ## React Toolbar Component
92
234
 
93
- [The React Toolbar component](https://www.telerik.com/kendo-react-ui/components/buttons/toolbar/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-buttons) provides an intuitive component akin to the minimal toolbars found within traditional desktop applications like Word and Excel.
235
+ > This is a **free React component**&mdash;no sign-up or license required, even in production.
94
236
 
95
- ### Key Features
237
+ [The React Toolbar component](https://www.telerik.com/kendo-react-ui/components/buttons/toolbar/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-buttons) provides an intuitive component akin to the minimal toolbars found within traditional desktop applications like Word and Excel.
96
238
 
97
- - **Tools**&mdash;Within the KendoReact Toolbar, the Tools can be rendered as a Button, ButtonGroup, DropDownButton and SplitButtons. Of course, custom buttons can also be added.
98
- - **Globalization**&mdash;The React Toolbar fully supports right-to-left (RTL) scenarios, ensuring that the component can be added in to any application, no matter what requirements for layout your applications have.
239
+ Key features:
99
240
 
100
- ## React Buttons Components Library Features
241
+ - [Tools](https://www.telerik.com/kendo-react-ui/components/buttons/toolbar/tools)&mdash;Within the KendoReact Toolbar, the Tools can be rendered as a Button, ButtonGroup, DropDownButton and SplitButtons. Of course, custom buttons can also be added.
242
+ - [Globalization](https://www.telerik.com/kendo-react-ui/components/buttons/globalization)&mdash;The React Toolbar fully supports right-to-left (RTL) scenarios, ensuring that the component can be added in to any application, no matter what requirements for layout your applications have.
101
243
 
102
- Among the many features which the KendoReact Buttons deliver are:
244
+ How to add a simple Toolbar component in your apps:
103
245
 
104
- - **Disabled state**&mdash;To disable user interaction, just change a single property.
105
- - **Custom rendering**&mdash;You can replace the content of the buttons with custom icons, text and elements.
106
- - **Keyboard navigation**&mdash;You can interact with the buttons using only the keyboard.
107
- - **Accessibility support**&mdash;The Buttons are compliant with WAI-ARIA and Section 508.
108
- - [**Theme support**](https://www.telerik.com/kendo-react-ui/components/styling/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-buttons)&mdash;The KendoReact Buttons, as well as all 100+ components in the KendoReact suite, are styled in three polished themes (Bootstrap, Material, and Default) and can be further customized to match your specific design guidelines.
246
+ ```tsx
247
+ import { Toolbar, Button, ButtonGroup } from '@progress/kendo-react-buttons'; // You need to install and import all KendoReact components that you want to render within your Toolbar.
248
+ ...
249
+ <Toolbar>
250
+ <ButtonGroup>
251
+ <Button>Item 1</Button>
252
+ <Button>Item 2</Button>
253
+ </ButtonGroup>
254
+ </Toolbar>
255
+ ```
109
256
 
110
257
  ## Support Options
111
258
 
@@ -118,6 +265,7 @@ For any issues you might encounter while working with the KendoReact Buttons, us
118
265
  ## Resources
119
266
 
120
267
  - [Getting Started with KendoReact](https://www.telerik.com/kendo-react-ui/components/getting-started/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-buttons)
268
+ - [Get Started with KendoReact Free: 50+ Free React Components](https://www.telerik.com/kendo-react-ui/components/free)
121
269
  - [Getting Started with the KendoReact Buttons](https://www.telerik.com/kendo-react-ui/components/buttons/get-started/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-buttons)
122
270
  - [API Reference of the KendoReact Buttons](https://www.telerik.com/kendo-react-ui/components/buttons/api/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-buttons)
123
271
  - [KendoReact Roadmap](https://www.telerik.com/support/whats-new/kendo-react-ui/roadmap?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-buttons)
@@ -12,4 +12,4 @@
12
12
  * Licensed under commercial license. See LICENSE.md in the package root for more information
13
13
  *-------------------------------------------------------------------------------------------
14
14
  */
15
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("prop-types"),require("@progress/kendo-react-common"),require("@progress/kendo-react-popup"),require("@progress/kendo-svg-icons"),require("@progress/kendo-react-intl")):"function"==typeof define&&define.amd?define(["exports","react","prop-types","@progress/kendo-react-common","@progress/kendo-react-popup","@progress/kendo-svg-icons","@progress/kendo-react-intl"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).KendoReactButtons={},e.React,e.PropTypes,e.KendoReactCommon,e.KendoReactPopup,e.KendoSvgIcons,e.KendoReactIntl)}(this,(function(e,t,s,n,o,r,a){"use strict";function i(e){var t=Object.create(null);return e&&Object.keys(e).forEach((function(s){if("default"!==s){var n=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(t,s,n.get?n:{enumerable:!0,get:function(){return e[s]}})}})),t.default=e,Object.freeze(t)}var l=i(t);const c=l.forwardRef(((e,t)=>{const{children:s,togglable:o,dir:r,disabled:a,selected:i,icon:c,iconClass:u,svgIcon:p,imageUrl:m,imageAlt:h,className:f,startIcon:v,endIcon:b,onClick:g,size:y=d.size,rounded:k=d.rounded,fillMode:C=d.fillMode,themeColor:I=d.themeColor,...x}=e,E=l.useRef(),D=l.useRef(null),[w,N]=l.useState(!0===o&&!0===i),B=void 0!==p||void 0!==c||void 0!==u||void 0!==m,S=void 0!==s,K=n.useUnstyled(),R=e.unstyled||K,O=R&&R.uButton;l.useImperativeHandle(t,(()=>({element:D.current,selected:void 0!==E.current?E.current:w}))),l.useMemo((()=>{o&&void 0!==i&&i!==w&&N(i)}),[o,i]),l.useEffect((()=>{E.current=void 0}),[w]);const M=function({imageUrl:e,name:t,iconClass:s,svgIcon:o,imageAlt:r,buttonClasses:a}){return e?l.createElement("img",{role:"presentation",className:n.classNames(n.uButton.icon({c:a})),alt:r,src:e}):t||o?l.createElement(n.IconWrap,{className:n.classNames(n.uButton.icon({c:a})),name:t,icon:o}):s?l.createElement("span",{role:"presentation",className:n.classNames(n.uButton.icon({c:a}),s)}):null}({name:c,svgIcon:p,iconClass:u,imageUrl:m,imageAlt:h,buttonClasses:O}),z=e=>l.cloneElement(e,{className:n.classNames(n.uButton.icon({c:O}))});return l.createElement("button",{ref:D,"aria-pressed":o?w:void 0,...x,dir:r,disabled:a,onClick:e=>{o&&void 0===i&&(E.current=!w,N(!w)),g&&g.call(void 0,e)},className:n.classNames(n.uButton.wrapper({c:O,isRtl:"rtl"===r,selected:w,disabled:a,size:y,fillMode:C,rounded:k,themeColor:I,iconButton:!S&&B}),f)},v&&z(v),M,s&&l.createElement("span",{className:n.classNames(n.uButton.text({c:O}))},s),b&&z(b))})),d={togglable:!1,size:"medium",rounded:"medium",fillMode:"solid",themeColor:"base"};c.displayName="KendoReactButton",c.propTypes={children:s.node,selected:s.bool,togglable:s.bool,icon:s.string,svgIcon:n.svgIconPropType,iconClass:s.string,imageUrl:s.string,imageAlt:s.string,size:s.oneOf([null,"small","medium","large"]),rounded:s.oneOf([null,"small","medium","large","full"]),fillMode:s.oneOf([null,"flat","link","outline","solid","clear"]),themeColor:s.oneOf([null,"base","primary","secondary","tertiary","info","success","warning","error","dark","light","inverse"])};const u=e=>{const{children:t,className:s,dir:o,disabled:r,width:a}=e,i=n.useUnstyled(),c=e.unstyled||i,d=c&&c.uButtonGroup,u=(e,t)=>{const s={...a?{width:a}:{},...e.props.style||{}},n=r||e.props.disabled,o={...e.props,...t?{className:t}:{},...Object.keys(s).length?{style:s}:{},...void 0!==n?{disabled:n}:{}};return l.Children.count(e.props.children)>0?l.cloneElement(e,o,e.props.children):l.cloneElement(e,o)},p=l.useRef(null),m=(e=>{const t=l.Children.count(e),s=void 0!==o?"rtl"===o:p.current&&"rtl"===getComputedStyle(p.current).direction||!1;return l.Children.map(e,((e,o)=>{if(l.isValidElement(e)){const r=o===t-1,a=s,i=n.classNames(e.props.className,n.uButtonGroup.position({c:d,start:a?r:0===o,end:a?0===o:r}));return u(e,i)}return e}))})(t),h=n.classNames(n.uButtonGroup.wrapper({c:d,stretched:!!a,disabled:r}),s),f={className:h,style:{width:`${a}`},dir:o,role:"group","aria-disabled":r};return l.createElement("div",{ref:p,...f,className:h},m)};u.propTypes={children:s.oneOfType([s.arrayOf(s.element),s.element]),className:s.string,disabled:s.bool,width:s.string,dir:s.string};const p=e=>{const t=n.useUnstyled(),s=e.unstyled||t,o=s&&s.uDropDownButton,r=l.useCallback((t=>{e.onClick(t,e.index)}),[e]),a=e.dataItem.render||e.item||(void 0===e.item?e.render:null),i=void 0!==e.dataItem.text?e.dataItem.text:e.textField?e.dataItem[e.textField]:e.dataItem,c=l.createElement("li",{id:e.id,className:n.classNames(n.uDropDownButton.li({c:o,focused:e.focused}),e.className),tabIndex:-1,onClick:r,onMouseDown:e.onDown,onPointerDown:e.onDown,role:"menuitem","aria-disabled":e.dataItem.disabled||void 0},l.createElement("span",{tabIndex:-1,className:n.classNames(n.uDropDownButton.link({c:o,selected:e.dataItem.selected,disabled:e.dataItem.disabled})),key:"icon"},a?l.createElement(a,{item:e.dataItem,itemIndex:e.index}):l.createElement(l.Fragment,null,(e.dataItem.icon||e.dataItem.iconClass||e.dataItem.svgIcon)&&l.createElement(n.IconWrap,{className:e.dataItem.iconClass,name:e.dataItem.icon,icon:e.dataItem.svgIcon}),e.dataItem.imageUrl&&l.createElement("img",{role:"presentation",alt:"",src:e.dataItem.imageUrl,className:"k-icon"}),i&&l.createElement("span",{className:"k-menu-link-text"},i))));return void 0!==e.item&&void 0!==e.render?e.render.call(void 0,c,e):c};p.displayName="KendoReactButtonItem";const m=class extends l.Component{render(){return null}};m.propTypes={text:s.string,icon:s.string,iconClass:s.string,imageUrl:s.string,disabled:s.bool,render:s.any};let h=m;const f=(e,t,s,o)=>{if(s)return e;const r=Math.min(o-1,Math.max(0,e));switch(t){case n.Keys.enter:case n.Keys.space:case n.Keys.esc:return-1;case n.Keys.up:case n.Keys.left:return r-1<0?o-1:r-1;case n.Keys.down:case n.Keys.right:return r+1>=o?0:r+1;case n.Keys.home:return 0;case n.Keys.end:return o-1;default:return e}};function v(e){const t={horizontal:"left",vertical:"bottom"};return e&&(t.horizontal="right"),t}function b(e){const t={horizontal:"left",vertical:"top"};return e&&(t.horizontal="right"),t}const g={name:"@progress/kendo-react-buttons",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate:0,version:"$VERSION",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"},y=class extends l.Component{constructor(e){super(e),this.state={focused:!1,focusedIndex:-1,opened:!1},this.wrapper=null,this.mainButton=null,this.list=null,this.skipFocus=!1,this.buttonsData=[],this.showLicenseWatermark=!1,this.onKeyDown=e=>{const{focusedIndex:t}=this.state;if(e.altKey)return void(this.opened||e.keyCode!==n.Keys.down?this.opened&&e.keyCode===n.Keys.up&&(e.preventDefault(),this.setState({focusedIndex:-1}),this.setOpen(!1,e)):(e.preventDefault(),this.setState({focusedIndex:0}),this.setOpen(!0,e)));let s;if(e.keyCode===n.Keys.enter||e.keyCode===n.Keys.space){if(e.preventDefault(),this.dispatchClickEvent(e,t),t>=0){s={focusedIndex:this.opened?-1:0};const t=!this.opened;this.setOpen(t,e)}}else if(this.opened&&e.keyCode===n.Keys.esc)return this.setState({focusedIndex:-1}),void this.setOpen(!1,e);if(this.opened){const o=f(t,e.keyCode,e.altKey,this.buttonsData.length);o!==t&&(s=s||{},s.focusedIndex=o);const r=e.keyCode===n.Keys.up||e.keyCode===n.Keys.down||e.keyCode===n.Keys.left||e.keyCode===n.Keys.right;!e.altKey&&(r||e.keyCode===n.Keys.home||e.keyCode===n.Keys.end)&&e.preventDefault()}s&&this.setState(s)},this.switchFocus=e=>{this.skipFocus=!0,e(),window.setTimeout((()=>this.skipFocus=!1),0)},this.onFocus=e=>{this.skipFocus||(n.dispatchEvent(this.props.onFocus,e,this,void 0),this.setState({focused:!0}))},this.setOpen=(e,t)=>{this.opened!==e&&(this.openedDuringOnChange=e,this.setState({opened:e}),t?this.dispatchPopupEvent(t,e):this.openedDuringOnChange=void 0)},this.onItemClick=(e,t)=>{this.opened&&this.setState({focusedIndex:0}),this.dispatchClickEvent(e,t),this.setOpen(!1,e)},this.onBlur=e=>{this.skipFocus||(this.setState({focused:!1,focusedIndex:-1}),n.dispatchEvent(this.props.onBlur,e,this,void 0),setTimeout((()=>{this.setOpen(!1,e)}),0))},this.onPopupClose=e=>{var t;const s=n.getActiveElement(document);this.element&&this.element.removeAttribute("tabindex"),(s===this.list||null!=(t=this.list)&&t.contains(s))&&this.switchFocus((()=>{this.element&&this.element.focus({preventScroll:!0})})),this.props.popupSettings&&this.props.popupSettings.onClose&&this.props.popupSettings.onClose.call(void 0,e)},this.listRef=e=>{this.list=e,e&&this.state.focused&&this.switchFocus((()=>{e.focus({preventScroll:!0}),this.element&&(this.element.tabIndex=-1)}))},this.onSplitPartClick=e=>{if(this.buttonsData.length){const t=!this.opened;this.setState({focusedIndex:t?0:-1,focused:!0}),this.setOpen(t,e)}},this.onDownSplitPart=e=>{e.preventDefault();const t=n.getActiveElement(document);this.element&&t!==this.element&&t!==this.list&&this.element.focus()},this.onItemDown=e=>{n.getActiveElement(document)===this.list&&e.preventDefault()},this.dispatchPopupEvent=(e,t)=>{n.dispatchEvent(t?this.props.onOpen:this.props.onClose,e,this,void 0),this.openedDuringOnChange=void 0},this.showLicenseWatermark=!n.validatePackage(g,{component:"SplitButton"})}get guid(){return this.props.id?this.props.id+"-accessibility-id":this.props.id}get opened(){return void 0!==this.openedDuringOnChange?this.openedDuringOnChange:void 0===this.props.opened?this.state.opened:this.props.opened}render(){this.buttonsData=this.props.items||l.Children.toArray(this.props.children).filter((e=>e&&e.type===h)).map((e=>e.props));const e=this.isRtl(),t=e?"rtl":void 0,{id:s,style:o,tabIndex:a,disabled:i}=this.props;return l.createElement(l.Fragment,null,l.createElement("div",{id:s,style:o,className:n.classNames("k-split-button","k-button-group",{"k-focus":this.state.focused},`k-rounded-${n.kendoThemeMaps.roundedMap[this.props.rounded||"medium"]}`,this.props.className),onKeyDown:this.onKeyDown,onFocus:this.onFocus,onBlur:this.onBlur,dir:t,ref:e=>this.wrapper=e},l.createElement(c,{ref:e=>this.mainButton=e&&e.element,type:"button",size:this.props.size,rounded:this.props.rounded,fillMode:this.props.fillMode,themeColor:this.props.themeColor,onClick:e=>this.onItemClick(e,-1),disabled:i||void 0,tabIndex:a,accessKey:this.props.accessKey,className:this.props.buttonClass,icon:this.props.icon,svgIcon:this.props.svgIcon,iconClass:this.props.iconClass,imageUrl:this.props.imageUrl,dir:t,"aria-disabled":i,"aria-haspopup":!0,"aria-expanded":this.opened||void 0,"aria-label":this.props.ariaLabel,"aria-controls":this.opened?this.guid:void 0,id:"button-"+this.guid,title:this.props.title},this.props.text),l.createElement(c,{type:"button",size:this.props.size,rounded:this.props.rounded,fillMode:this.props.fillMode,themeColor:this.props.themeColor,icon:"caret-alt-down",svgIcon:r.caretAltDownIcon,className:"k-split-button-arrow",disabled:i||void 0,tabIndex:-1,onClick:this.onSplitPartClick,onMouseDown:this.onDownSplitPart,onPointerDown:this.onDownSplitPart,dir:t,"aria-label":"menu toggling button"}),this.renderPopup(e)),this.showLicenseWatermark&&l.createElement(n.WatermarkOverlay,null))}componentDidMount(){(void 0===this.props.dir&&this.isRtl()||this.opened)&&this.forceUpdate()}get element(){return this.mainButton}dispatchClickEvent(e,t){this.isItemDisabled(t)||(-1===t?n.dispatchEvent(this.props.onButtonClick,e,this,void 0):n.dispatchEvent(this.props.onItemClick,e,this,{item:this.buttonsData[t],itemIndex:t}))}renderPopup(e){const{popupSettings:t={}}=this.props,{focusedIndex:s}=this.state;return l.createElement(o.Popup,{anchor:this.wrapper,show:this.opened,animate:t.animate,popupClass:n.classNames("k-menu-popup",t.popupClass),anchorAlign:t.anchorAlign||v(e),popupAlign:t.popupAlign||b(e),style:e?{direction:"rtl"}:void 0,onClose:this.onPopupClose},l.createElement("ul",{role:"menu",id:this.guid,"aria-labelledby":"button-"+this.guid,tabIndex:-1,ref:this.listRef,"aria-activedescendant":s>=0?`${this.guid}-${s}`:void 0,className:n.classNames("k-menu-group",{[`k-menu-group-${n.kendoThemeMaps.sizeMap[this.props.size]||this.props.size}`]:this.props.size})},this.renderChildItems()))}renderChildItems(){const{item:e,itemRender:t,textField:s}=this.props;return this.buttonsData.length>0?this.buttonsData.map(((o,r)=>l.createElement(p,{className:n.classNames("k-menu-item",{"k-first":0===r},{"k-last":r===this.buttonsData.length-1}),dataItem:o,textField:s,focused:this.state.focusedIndex===r,onClick:this.onItemClick,onDown:this.onItemDown,render:t,item:e,key:r,index:r,id:`${this.guid}-${r}`}))):null}isItemDisabled(e){return this.buttonsData[e]?this.buttonsData[e].disabled:this.props.disabled}isRtl(){return void 0!==this.props.dir?"rtl"===this.props.dir:!!this.wrapper&&"rtl"===getComputedStyle(this.wrapper).direction}};y.propTypes={accessKey:s.string,ariaLabel:s.string,title:s.string,onButtonClick:s.func,onFocus:s.func,onBlur:s.func,onItemClick:s.func,onOpen:s.func,onClose:s.func,text:s.string,items:s.arrayOf(s.any),textField:s.string,tabIndex:s.number,disabled:s.bool,icon:s.string,svgIcon:n.svgIconPropType,iconClass:s.string,imageUrl:s.string,popupSettings:s.object,itemRender:s.any,item:s.func,className:s.string,buttonClass:s.string,dir:s.string},y.defaultProps={size:"medium",rounded:"medium",fillMode:"solid",themeColor:"base"};let k=y;const C=class extends l.Component{render(){return null}};C.propTypes={text:s.string,icon:s.string,iconClass:s.string,imageUrl:s.string,selected:s.bool,disabled:s.bool,render:s.any};let I=C;const x=class extends l.Component{constructor(e){super(e),this.state={opened:!1,focused:!1,focusedIndex:-1},this.mainButton=null,this.list=null,this.skipFocus=!1,this.showLicenseWatermark=!1,this.buttonsData=[],this.onKeyDown=e=>{const{focusedIndex:t}=this.state;if(e.altKey)return void(this.opened||e.keyCode!==n.Keys.down?this.opened&&e.keyCode===n.Keys.up&&(e.preventDefault(),this.setState({focusedIndex:-1}),this.setOpen(!1,e)):(e.preventDefault(),this.setOpen(!0,e),this.setState({focusedIndex:0})));const s={...this.state};if(e.keyCode===n.Keys.enter||e.keyCode===n.Keys.space){e.preventDefault(),t>=0&&this.dispatchClickEvent(e,t);const s=!this.opened;return this.setState({focused:!0,focusedIndex:s?0:-1}),void this.setOpen(s,e)}if(this.opened&&e.keyCode===n.Keys.esc)return this.setState({focusedIndex:-1}),void this.setOpen(!1,e);if(this.opened){const o=f(t,e.keyCode,e.altKey,this.buttonsData.length);s.focusedIndex=o;const r=e.keyCode===n.Keys.up||e.keyCode===n.Keys.down||e.keyCode===n.Keys.left||e.keyCode===n.Keys.right;!e.altKey&&(r||e.keyCode===n.Keys.home||e.keyCode===n.Keys.end)&&e.preventDefault()}this.setState(s)},this.switchFocus=e=>{this.skipFocus=!0,e(),window.setTimeout((()=>this.skipFocus=!1),0)},this.handleFocus=e=>{this.skipFocus||(this.setState({focused:!0,focusedIndex:this.opened?0:-1}),n.dispatchEvent(this.props.onFocus,e,this,void 0))},this.handleButtonBlur=e=>{this.opened||(this.setState({focused:!1}),n.dispatchEvent(this.props.onBlur,e,this,void 0))},this.handleMenuBlur=e=>{this.skipFocus||(this.setState({focused:!1,focusedIndex:-1}),n.dispatchEvent(this.props.onBlur,e,this,void 0),setTimeout((()=>{this.setOpen(!1,e)}),0))},this.setOpen=(e,t)=>{this.opened!==e&&(this.openedDuringOnChange=e,this.setState({opened:e}),t?this.dispatchPopupEvent(t,e):this.openedDuringOnChange=void 0)},this.onItemClick=(e,t)=>{this.setState({focusedIndex:-1}),this.dispatchClickEvent(e,t),this.setOpen(!1,e)},this.onItemDown=e=>{n.getActiveElement(document)===this.list&&e.preventDefault()},this.mouseDown=e=>{e.preventDefault();const t=n.getActiveElement(document);this.element&&t!==this.element&&t!==this.list&&this.element.focus()},this.onPopupClose=e=>{var t;const s=n.getActiveElement(document);this.element&&this.element.removeAttribute("tabindex"),(s===this.list||null!=(t=this.list)&&t.contains(s))&&this.switchFocus((()=>{this.element&&this.element.focus({preventScroll:!0})})),this.props.popupSettings&&this.props.popupSettings.onClose&&this.props.popupSettings.onClose.call(void 0,e)},this.listRef=e=>{this.list=e,e&&this.state.focused&&this.switchFocus((()=>{e.focus({preventScroll:!0}),this.element&&(this.element.tabIndex=-1)}))},this.onClickMainButton=e=>{if(!this.buttonsData.length)return;const t=!this.opened;this.setState({focused:!0,focusedIndex:t?0:-1}),this.setOpen(t,e)},this.dispatchPopupEvent=(e,t)=>{n.dispatchEvent(t?this.props.onOpen:this.props.onClose,e,this,void 0),this.openedDuringOnChange=void 0},this.showLicenseWatermark=!n.validatePackage(g,{component:"DropDownButton"})}get guid(){return this.props.id+"-accessibility-id"}get opened(){return void 0!==this.openedDuringOnChange?this.openedDuringOnChange:void 0===this.props.opened?this.state.opened:this.props.opened}render(){const e=this.isRtl(),t=this.context&&this.context.uDropDownButton,s=e?"rtl":void 0,{id:o,style:r,tabIndex:a,disabled:i,size:d,rounded:u,fillMode:p,themeColor:m,ariaLabel:h,title:f,accessKey:v,icon:b,svgIcon:g,iconClass:y,buttonClass:k,className:C,imageUrl:x,startIcon:E,endIcon:D}=this.props;return this.buttonsData=this.props.items||l.Children.toArray(this.props.children).filter((e=>e&&e.type===I)).map((e=>e.props)),l.createElement(l.Fragment,null,l.createElement(c,{id:o,size:d,style:r,rounded:u,fillMode:p,themeColor:m,onClick:this.onClickMainButton,onMouseDown:this.mouseDown,onKeyDown:this.onKeyDown,onFocus:this.handleFocus,onBlur:this.handleButtonBlur,"aria-disabled":i?"true":void 0,tabIndex:a,accessKey:v,icon:b,svgIcon:g,iconClass:y,className:n.classNames(k,C,n.uDropDownButton.wrapper({c:t,focused:this.state.focused,disabled:i})),imageUrl:x,dir:s,ref:e=>this.mainButton=e&&e.element,type:"button","aria-expanded":this.opened?"true":"false","aria-label":h,"aria-controls":this.opened?this.guid:void 0,title:f,startIcon:E,endIcon:D},this.props.text),this.showLicenseWatermark&&l.createElement(n.WatermarkOverlay,null),this.renderPopup(e))}componentDidMount(){(void 0===this.props.dir&&this.isRtl()||this.opened)&&this.forceUpdate()}get element(){return this.mainButton}dispatchClickEvent(e,t){this.isItemDisabled(t)||n.dispatchEvent(this.props.onItemClick,e,this,{item:this.buttonsData[t],itemIndex:t})}renderPopup(e){const{popupSettings:t={},id:s}=this.props,r=this.context&&this.context.uDropDownButton,{focusedIndex:a}=this.state;return l.createElement(o.Popup,{anchor:this.mainButton,show:this.opened,animate:t.animate,popupClass:n.classNames(n.uDropDownButton.popup({c:r}),t.popupClass),anchorAlign:t.anchorAlign||v(e),popupAlign:t.popupAlign||b(e),style:e?{direction:"rtl"}:void 0,onClose:this.onPopupClose},l.createElement("ul",{role:"list",id:this.guid,tabIndex:-1,"aria-activedescendant":a>=0?`${this.guid}-${a}`:void 0,ref:this.listRef,onKeyDown:this.onKeyDown,onBlur:this.handleMenuBlur,className:n.classNames(n.uDropDownButton.ul({c:r,size:this.props.size}))},this.renderChildItems()))}renderChildItems(){const{item:e,itemRender:t,textField:s}=this.props,o=this.context&&this.context.uDropDownButton;return this.buttonsData.length>0?this.buttonsData.map(((r,a)=>l.createElement(p,{className:n.classNames(n.uDropDownButton.item({c:o}),r.className,{"k-first":0===a},{"k-last":a===this.buttonsData.length-1}),dataItem:r,textField:s,focused:this.state.focusedIndex===a,onClick:this.onItemClick,onDown:this.onItemDown,render:t,item:e,index:a,key:a,id:`${this.guid}-${a}`}))):null}isItemDisabled(e){return this.buttonsData[e]?this.buttonsData[e].disabled:this.props.disabled}isRtl(){return void 0!==this.props.dir?"rtl"===this.props.dir:!!this.mainButton&&"rtl"===getComputedStyle(this.mainButton).direction}};x.propTypes={accessKey:s.string,ariaLabel:s.string,title:s.string,onFocus:s.func,onBlur:s.func,onItemClick:s.func,onOpen:s.func,onClose:s.func,items:s.arrayOf(s.any),textField:s.string,tabIndex:s.number,disabled:s.bool,icon:s.string,svgIcon:n.svgIconPropType,iconClass:s.string,imageUrl:s.string,popupSettings:s.object,itemRender:s.func,item:s.func,className:s.string,buttonClass:s.string,dir:s.string},x.defaultProps={size:"medium",rounded:"medium",fillMode:"solid",themeColor:"base"};let E=x;E.contextType=n.UnstyledContext;const D=":not(.k-dropdownlist button):not(.k-colorpicker button):not(.k-split-button .k-split-button-arrow)",w=["button"+D,".k-button-group > button"+D,".k-colorpicker",".k-dropdownlist"],N=e=>l.createElement("div",{ref:e._ref,className:n.classNames("k-toolbar-separator k-separator",e.className)}),B="prevArrow.title",S="nextArrow.title",K="moreButtonTitle.title",R={[B]:"Previous scroll button",[S]:"Next scroll button",[K]:"More button"},O=e=>{const t=a.useLocalization(),{disabled:s,type:o,scrollContentRef:i,buttonScrollSpeed:c,prevButton:d,nextButton:u}=e,p="prev"===o?d||"span":u||"span";return l.createElement(p,{className:n.classNames("k-button","k-button-md","k-button-solid","k-button-solid-base","k-rounded-md","k-icon-button",`k-toolbar-${o}`,{"k-disabled":s}),title:`${"prev"===o?t.toLanguageString(B,R[B]):t.toLanguageString(S,R[S])}`,"aria-hidden":!0,tabIndex:s?-1:void 0,onClick:e=>{i&&i.current&&c&&i.current.scrollBy({left:"next"===o?c:-c,behavior:"smooth"})}},l.createElement(n.SvgIcon,{icon:"prev"===o?r.caretAltLeftIcon:r.caretAltRightIcon,className:"k-button-icon"}))},M=e=>{const{scrollButtons:t,scrollButtonsPosition:s,isOverflowing:n,scrollContentRef:o,buttonScrollSpeed:r,dir:a,isScrollStartPosition:i,isScrollEndPosition:c,prevButton:d,nextButton:u,children:p}=e,m=(e,t)=>l.createElement(O,{type:e,disabled:t,scrollContentRef:o,buttonScrollSpeed:r,prevButton:d,nextButton:u}),h="visible"===t||"auto"===t&&n;return l.createElement(l.Fragment,null,h&&"split"===s&&l.createElement(l.Fragment,null,m("rtl"!==a?"prev":"next",i),l.createElement(N,{className:"k-toolbar-button-separator"})),h&&"start"===s&&l.createElement(l.Fragment,null,m("rtl"!==a?"prev":"next",i),m("rtl"!==a?"next":"prev",c),l.createElement(N,{className:"k-toolbar-button-separator"})),l.createElement("span",{className:"k-toolbar-items k-toolbar-items-scroll",ref:o},p),h&&"split"===s&&l.createElement(l.Fragment,null,l.createElement(N,{className:"k-toolbar-button-separator"}),m("rtl"!==a?"next":"prev",c)),h&&"end"===s&&l.createElement(l.Fragment,null,l.createElement(N,{className:"k-toolbar-button-separator"}),m("rtl"!==a?"prev":"next",i),m("rtl"!==a?"next":"prev",c)))},z=e=>{var t;const{toolbarRef:s,children:i,fillMode:d,size:u}=e,[p,m]=l.useState(!1),h=l.useRef(l.Children.toArray(i).filter((e=>l.isValidElement(e))).map(((e,t)=>l.cloneElement(e,{key:e.key||t})))),f=l.useRef([]),v=l.useRef(0),b=l.useRef(null),g=l.useRef(null),y=a.useLocalization(),[k,C]=l.useReducer((e=>e+1),0),I=()=>{if(!s.current)return;let e=0;const t=s.current.clientWidth,n=parseInt(window.getComputedStyle(s.current).gap||"0",10),o=Array.from(s.current.children).reduce(((e,t,s)=>e+=Math.ceil(t.clientWidth)),0),r=Array.from(s.current.children).length;if(e=o+r*n+2*n,e>t){const e=[...h.current],s=e.pop();v.current=t,h.current=e,s&&(f.current=[s,...f.current])}else if(t>v.current+n*r){const e=[...f.current],s=e.shift();f.current=e,s&&(h.current=[...h.current,s]),v.current=t}C()};l.useEffect((()=>{I();const e=new ResizeObserver(I),t=s.current;return t&&e.observe(t),()=>{t&&e.unobserve(t)}}),[]);return l.createElement(l.Fragment,null,h.current.length>0&&h.current,f.current.length>0&&l.createElement(l.Fragment,null,l.createElement(N,{_ref:g,className:"k-toolbar-button-separator"}),l.createElement(c,{ref:b,className:"k-toolbar-overflow-button",fillMode:"flat",svgIcon:r.moreHorizontalIcon,title:y.toLanguageString(K,R[K]),onClick:()=>{m(!p)}}),l.createElement(o.Popup,{anchor:s.current,show:p,popupClass:"k-toolbar-popup",style:{width:null==(t=s.current)?void 0:t.offsetWidth}},l.createElement("span",{className:`k-toolbar-items-list k-toolbar-items-list-${n.kendoThemeMaps.sizeMap[u]} k-toolbar-items-list-${d}`},f.current.length>0&&f.current))))},F=l.forwardRef(((e,t)=>{const{children:s,className:o,id:r,ariaLabel:a,keyboardNavigation:i,role:c,onResize:d,style:u,tabIndex:p=P.tabIndex,size:m=P.size,fillMode:h=P.fillMode,overflow:f,scrollButtons:v=P.scrollButtons,scrollButtonsPosition:b=P.scrollButtonsPosition,buttonScrollSpeed:g=P.buttonScrollSpeed,prevButton:y,nextButton:k}=e,C=l.useRef(!1),I=l.useRef(null),x=l.useRef(null),E=l.useRef(0),D=l.useRef(0),N=l.useRef([]),B=l.useRef({element:null,props:e}),[S,K]=l.useState(!1),[R,O]=l.useState(!0),[F,A]=l.useState(!1),T=n.useDir(I,e.dir),$=l.useMemo((()=>e.buttons||w),[e.buttons]),L=l.useMemo((()=>$.map((e=>e+":focus")).join(",")),[$]),W=()=>{const e=I.current&&I.current.querySelector(L);return Math.max(0,N.current.findIndex((t=>t===e)))};l.useImperativeHandle(B,(()=>({element:I.current,props:e}))),l.useImperativeHandle(t,(()=>B.current)),l.useEffect((()=>(window.addEventListener("resize",j),I.current&&(D.current=I.current.offsetWidth,E.current=I.current.offsetHeight,!1!==i&&(N.current=Array.from(I.current.querySelectorAll($.join(","))),U(0))),()=>{window.removeEventListener("resize",j),N.current.length=0})),[]),l.useEffect((()=>{if(C.current){if(!I.current||!1===i)return;N.current=Array.from(I.current.querySelectorAll($.join(","))),U(W()),q()}else C.current=!0}));const U=e=>{N.current.forEach(((t,s)=>{t.tabIndex=s===e?p:-1}))},H=(e,t)=>{const s=N.current[t];if(s){s.tabIndex=p,s.focus();const t=N.current[e];t&&(t.tabIndex=-1)}},j=e=>{if(!I.current)return;const t=I.current.offsetWidth,s=I.current.offsetHeight;if(D.current!==t||E.current!==s){D.current=t,E.current=s;const n={offsetWidth:D.current,offsetHeight:E.current};d&&d.call(void 0,{target:B.current,...n,nativeEvent:e})}q()},q=l.useCallback((()=>{const e=x.current;e&&K(e.scrollWidth>e.clientWidth||e.scrollHeight>e.clientHeight)}),[]),V=l.useCallback((()=>{const e=x.current;if(e){const t=0===e.scrollLeft,s="rtl"!==T?e.scrollLeft+e.clientWidth===e.scrollWidth:e.clientWidth-e.scrollLeft===e.scrollWidth;t&&O(!0),s&&A(!0),!t&&!s&&(O(!1),A(!1))}}),[T]);return l.useEffect((()=>{const e=x.current;if(e)return e.addEventListener("scroll",V),()=>{e.removeEventListener("scroll",V)}}),[V]),l.createElement("div",{id:r,"aria-label":a,className:n.classNames("k-toolbar",{[`k-toolbar-${n.kendoThemeMaps.sizeMap[m]||m}`]:m,[`k-toolbar-${h}`]:h,"k-toolbar-scrollable":"scroll"===f,"k-toolbar-scrollable-overlay":"scroll"===f&&("hidden"===v||void 0===v),"k-toolbar-scrollable-start":"scroll"===f&&"hidden"===v&&R,"k-toolbar-scrollable-end":"scroll"===f&&"hidden"===v&&F,"k-toolbar-section":e.overflow&&"section"===f},o),style:u,role:void 0!==c?c||void 0:"toolbar",dir:T,ref:I,onKeyDown:!1!==i?e=>{const t=e.keyCode===n.Keys.left||e.keyCode===n.Keys.right||e.keyCode===n.Keys.home||e.keyCode===n.Keys.end,s=W();!t||e.defaultPrevented||-1===N.current.findIndex((t=>t===e.target))||(e.keyCode===n.Keys.left?H(s,0===s?N.current.length-1:s-1):H(s,s===N.current.length-1?0:s+1),e.keyCode===n.Keys.home&&H(s,0),e.keyCode===n.Keys.end&&H(s,N.current.length-1))}:void 0},"scroll"===f&&l.createElement(M,{scrollButtons:v,scrollButtonsPosition:b,prevButton:y,nextButton:k,isOverflowing:S,scrollContentRef:x,buttonScrollSpeed:g,dir:T,isScrollStartPosition:R,isScrollEndPosition:F,children:s}),"section"===f&&l.createElement(z,{toolbarRef:I,fillMode:h,size:m},s),("none"===f||void 0===f)&&s)})),P={tabIndex:0,size:"medium",fillMode:"solid",scrollButtons:"auto",scrollButtonsPosition:"split",buttonScrollSpeed:100};F.displayName="KendoReactToolbar",F.propTypes={tabIndex:s.number,dir:s.string,keyboardNavigation:s.bool,style:s.object,className:s.string,role:s.string,onResize:s.func,buttons:s.arrayOf(s.string.isRequired),size:s.oneOf([null,"small","medium","large"]),fillMode:s.oneOf([null,"solid","flat","outline"]),overflow:s.oneOf(["none","section","scroll"]),scrollButtons:s.oneOf(["hidden","visible","auto"]),scrollButtonsPosition:s.oneOf(["start","end","split"]),buttonScrollSpeed:s.number};const A=l.forwardRef(((e,t)=>{const{id:s,className:o,style:r,children:a}=e,i=l.useRef(null);return l.useImperativeHandle(t,(()=>({element:i.current}))),l.createElement("div",{id:s,className:n.classNames("k-toolbar-item",o),style:r,ref:i},a)}));A.displayName="KendoReactToolbarItem",A.propTypes={className:s.string};const T=l.forwardRef(((e,t)=>{const s=l.useRef(null),o=l.useRef(null);l.useImperativeHandle(o,(()=>({element:s.current}))),l.useImperativeHandle(t,(()=>({element:s.current})));const r=l.useMemo((()=>n.classNames("k-spacer",e.className)),[e.className]);return l.createElement("span",{ref:s,className:r})}));T.displayName="KendoReactToolbarSpacer",T.propTypes={className:s.string};const $=t.createContext([null,e=>{}]),L=t.createContext([null,e=>{}]),W=t.createContext([null,e=>{}]);var U=(e=>(e.next="next",e.prev="prev",e.current="current",e.reset="reset",e))(U||{});var H=(e=>(e.remove="remove",e.add="add",e.reorder="reorder",e))(H||{});var j=(e=>(e.toggle="toggle",e.remove="remove",e))(j||{});const q=l.forwardRef(((e,t)=>{const s=l.useRef(null),o=l.useRef(null),{disabled:a=G.disabled,fillMode:i=G.fillMode,themeColor:c=G.themeColor,size:d=G.size,rounded:u=G.rounded,dir:p=G.dir,removeIcon:m=G.removeIcon,removeSvgIcon:h=G.removeSvgIcon,removable:f=G.removable}=e,v=n.useDir(o,p);l.useImperativeHandle(s,(()=>({element:o.current,props:e}))),l.useImperativeHandle(t,(()=>s.current));const[b,g]=l.useContext($),[y,k]=l.useContext(L),[,C]=l.useContext(W),I=l.useMemo((()=>e.selected||(Array.isArray(b)?b.some((t=>t===e.value)):b===e.value)),[e.selected,e.value,b]),x=l.useMemo((()=>y===e.value),[e.value,y]);l.useEffect((()=>{x&&o.current&&o.current.focus()}),[x]);const E=l.useCallback((t=>{g({type:j.toggle,payload:e.value,event:t})}),[g,e.value]),D=l.useCallback((t=>{f&&(C({type:H.remove,payload:e.value,event:t}),k({type:U.reset,payload:e.value,event:t}),g({type:j.remove,payload:e.value,event:t}),e.onRemove&&e.onRemove.call(void 0,{target:s.current,syntheticEvent:t}))}),[e.onRemove,e.value,f,C,k,g]),w=l.useCallback((t=>{switch(t.keyCode){case n.Keys.left:k({type:U.prev,payload:e.value,event:t});break;case n.Keys.right:k({type:U.next,payload:e.value,event:t});break;case n.Keys.enter:g({type:j.toggle,payload:e.value,event:t});break;case n.Keys.delete:D(t)}e.onKeyDown&&e.onKeyDown.call(void 0,{target:s.current,syntheticEvent:t})}),[e.onKeyDown,e.value,k,g,D]),N=l.useCallback((t=>{k({payload:e.value,type:U.current,event:t}),e.onFocus&&e.onFocus.call(void 0,{target:s.current,syntheticEvent:t})}),[e.onFocus,e.value,k]),B=l.useCallback((t=>{e.onBlur&&e.onBlur.call(void 0,{target:s.current,syntheticEvent:t})}),[e.onBlur]),S=n.useMouse(e,s,{onClick:E});return l.createElement("div",{...S,role:e.role||"button",id:e.value,style:e.style,ref:o,dir:v,tabIndex:n.getTabIndex(e.tabIndex,a,void 0),className:n.classNames("k-chip",{"k-rtl":"rtl"===v,"k-disabled":a,"k-selected":I,"k-focus":x,[`k-chip-${n.kendoThemeMaps.sizeMap[d]||d}`]:d,[`k-rounded-${n.kendoThemeMaps.roundedMap[u]||u}`]:u,[`k-chip-${i}`]:i,[`k-chip-${i}-${c}`]:!(!i||!c)},e.className),"aria-pressed":e.role?void 0:I,"aria-disabled":a,"aria-describedby":e.ariaDescribedBy,"aria-keyshortcuts":f?"Enter Delete":void 0,onFocus:N,onBlur:B,onKeyDown:w},I&&(e.selectedIcon||e.selectedSvgIcon)&&l.createElement(n.IconWrap,{className:"k-chip-icon",name:e.selectedIcon?n.toIconName(e.selectedIcon):void 0,icon:e.selectedSvgIcon,size:"small"}),(e.icon||e.svgIcon)&&l.createElement(n.IconWrap,{className:"k-chip-icon",name:e.icon?n.toIconName(e.icon):void 0,icon:e.svgIcon,size:"small"}),e.avatar&&l.createElement("div",{className:`k-chip-avatar k-avatar k-rounded-${e.avatar.rounded} k-avatar-md k-avatar-solid k-avatar-solid-primary`,style:e.avatar.style},l.createElement("span",{className:"k-avatar-image"},l.createElement("img",{src:e.avatar.image,alt:e.avatar.imageAlt}))),l.createElement("span",{className:"k-chip-content"},void 0!==e.children?e.children:e.text&&l.createElement("span",{"aria-label":e.ariaLabel||e.text,className:"k-chip-label"},e.text)),f&&l.createElement("span",{className:"k-chip-actions"},l.createElement("span",{className:n.classNames("k-chip-action","k-chip-remove-action"),onClick:D},l.createElement(n.IconWrap,{name:m?n.toIconName(m):void 0,icon:h||r.xCircleIcon,size:"small"}))))})),V={id:s.string,text:s.string,value:s.any,dir:s.oneOf(["ltr","rtl"]),removable:s.bool,removeIcon:s.string,removeIconSvg:n.svgIconPropType,disabled:s.bool,icon:s.string,svgIcon:n.svgIconPropType,selectedIcon:s.string,selectedIconSvg:n.svgIconPropType,onRemove:s.func,dataItem:s.any,selected:s.bool,ariaDescribedBy:s.string,size:s.oneOf([null,"small","medium","large"]),rounded:s.oneOf([null,"small","medium","large","full"]),fillMode:s.oneOf([null,"outline","solid"]),themeColor:s.oneOf([null,"base","info","success","warning","error"])},G={disabled:!1,removable:!1,removeIcon:"k-i-x-circle",removeSvgIcon:r.xCircleIcon,dir:"ltr",size:"medium",rounded:"medium",fillMode:"solid",themeColor:"base"};q.displayName="KendoReactChip",q.propTypes=V;const Z=(e,t,s)=>{"multiple"===t.selection?Array.isArray(e)||(e=e?[e]:null):"single"===t.selection&&Array.isArray(e)&&(e=e?e.join(""):null);const[n,o]=l.useState(e);return[n,e=>{const r=((e,t)=>{switch(t.selection){case"single":switch(t.type){case"toggle":if(!Array.isArray(e)||null===e)return t.payload===e?null:t.payload;throw new Error("State cannot be an array in single selection");case"remove":return t.payload===e?null:e;default:return e}case"multiple":switch(t.type){case"toggle":if(Array.isArray(e))return e.some((e=>e===t.payload))?e.filter((e=>e!==t.payload)):[...e,t.payload];if(null===e)return[t.payload];throw new Error("State cannot be non-array in multiple selection");case"remove":return Array.isArray(e)?e.some((e=>e===t.payload))?e.filter((e=>e!==t.payload)):[...e,t.payload]:e;default:return e}case"none":return null;default:return e}})(t.state||n,{...e,...t});s&&s(r,e.event),"none"!==t.selection&&o(r)}]},_=l.forwardRef(((e,t)=>{const s=l.useRef(null),o=l.useRef(null),{id:r,style:a,tabIndex:i,className:c,ariaDescribedBy:d,ariaLabelledBy:u,ariaLabel:p,value:m,defaultData:h=Q.defaultData,chip:f=Q.chip,disabled:v=Q.disabled,size:b=Q.size,defaultValue:g=Q.defaultValue,selection:y=Q.selection,valueField:k=Q.valueField,textField:C=Q.textField,dir:I=Q.dir,onChange:x,onDataChange:E}=e,D=n.useDir(o,I),w=l.useMemo((()=>f||q),[f,q]);l.useImperativeHandle(s,(()=>({element:o.current,props:e}))),l.useImperativeHandle(t,(()=>s.current));const N=l.useCallback(((e,t)=>{x&&s.current&&x.call(void 0,{value:e,target:s.current,syntheticEvent:t})}),[x]),[B,S]=Z(m||g,{selection:y,state:m},N),K=l.useCallback(((e,t)=>{E&&s.current&&E.call(void 0,{value:e,target:s.current,syntheticEvent:t})}),[E]),[R,O]=((e,t,s)=>{const[n,o]=l.useState(e);return[n,e=>{const r=((e,t)=>{switch(t.type){case"add":case"reorder":break;case"remove":return e.filter((e=>e[t.valueField]!==t.payload));default:return e}})(t.state||n,{...e,...t});s&&s(r,e.event),o(r)}]})(e.data||h,{state:e.data,valueField:k},K),M=l.useCallback(((e,t)=>(e.push(t[k]),e)),[k]),z=l.useMemo((()=>e.data||R),[e.data,R]),F=l.useMemo((()=>m||B),[m,B]),P=l.useMemo((()=>z.reduce(M,[])),[z,M]),A=l.useCallback((e=>n.getter(k)(e)),[k]),T=l.useCallback((e=>n.getter(C)(e)),[C]),[U,H]=(e=>{const[t,s]=l.useState(null);return[t,t=>{const n=((e,t)=>{const s=t.items.findIndex((t=>t===e));switch(t.type){case"next":return s===t.items.length-1?e:t.items[s+1];case"prev":return 0===s?e:t.items[s-1];case"current":return t.payload;case"reset":return null;default:return e}})(t.payload,{...t,...e});s(n)}]})({items:P}),j=n.useMouse(e,s);return l.createElement($.Provider,{value:[F,S]},l.createElement(L.Provider,{value:[U,H]},l.createElement(W.Provider,{value:[z,O]},l.createElement("div",{ref:o,...j,role:v?void 0:"listbox",id:r,dir:D,style:a,tabIndex:n.getTabIndex(i,v,void 0),className:n.classNames("k-chip-list",{"k-rtl":"rtl"===D,"k-disabled":v,[`k-chip-list-${n.kendoThemeMaps.sizeMap[b]||b}`]:b},c),"aria-label":p,"aria-labelledby":u,"aria-describedby":d,"aria-orientation":"horizontal","aria-multiselectable":"multiple"===y},z.map(((e,t)=>l.createElement(w,{role:"option",dataItem:e,size:b,key:[A(e),t].join("-"),text:T(e),value:A(e),ariaLabel:e.ariaLabel,svgIcon:e.svgIcon||void 0})))))))})),J={id:s.string,className:s.string,tabIndex:s.number,data:s.any,defaultData:s.arrayOf(s.any),onDataChange:s.func,value:s.oneOfType([s.any,s.arrayOf(s.any)]),defaultValue:s.oneOfType([s.any,s.arrayOf(s.any)]),onChange:s.func,selection:s.oneOf(["single","none","multiple"]),textField:s.string,valueField:s.string,disabled:s.bool,dir:s.oneOf(["ltr","rtl"]),ariaLabelledBy:s.string,ariaDescribedBy:s.string,size:s.oneOf([null,"small","medium","large"])},Q={chip:q,size:"medium",disabled:!1,defaultValue:null,defaultData:[],dir:"ltr",selection:"none",textField:"text",valueField:"value",removable:"removable"};_.displayName="KendoReactChipList",_.propTypes=J;const X=l.forwardRef(((e,t)=>{const{className:s,disabled:o,text:r,icon:a,style:i,id:c,focused:d,tabIndex:u,index:p,dataItem:m,item:h,svgIcon:f,onDown:v,onClick:b,...g}=e,y=l.useRef(null),k=l.useCallback((()=>{y.current&&y.current.focus()}),[]),C=l.useCallback((()=>({element:y.current,focus:k})),[k]);l.useImperativeHandle(t,C);const I=l.useCallback((e=>{b&&void 0!==p&&!o&&b(e,p)}),[b,p]),x=l.useMemo((()=>n.classNames("k-fab-item",{"k-focus":d,"k-disabled":o},s)),[s,o,d]),E=h;return l.createElement("li",{ref:y,id:c,className:x,style:i,role:"menuitem",tabIndex:n.getTabIndex(u,o),"aria-disabled":o,"aria-label":`${r||""} floatingactionbutton item`,onClick:I,onMouseDown:v,onPointerDown:v,...g},E?l.createElement(E,{itemIndex:p,item:m}):l.createElement(l.Fragment,null,r&&l.createElement("span",{className:"k-fab-item-text"},r),a||f?l.createElement(n.IconWrap,{className:"k-fab-item-icon",name:a,icon:f}):null))}));X.propTypes={className:s.string,style:s.object,children:s.any,disabled:s.bool,focused:s.bool,index:s.number,icon:s.string,svgIcon:n.svgIconPropType,text:s.string,tabIndex:s.number,customProp:s.any},X.displayName="KendoFloatingActionButtonItem";const Y="16px",ee=e=>"number"==typeof e?e+"px":e,te=(e,t)=>{const s={horizontal:t?"right":"left",vertical:"bottom"};return"end"===e.horizontal&&(s.horizontal=t?"left":"right"),s},se=(e,t)=>{const s={horizontal:t?"right":"left",vertical:"top"};return"end"===e.horizontal&&(s.horizontal=t?"left":"right"),s},ne=(e,t)=>({rtl:{end:"k-text-left",start:"k-text-right"},ltr:{start:"k-text-left",end:"k-text-right"}}[e]["end"===t?"end":"start"]),oe=(e,t,s,n)=>{const o=t.horizontal,r=t.vertical;if(e.current){const a=s&&void 0!==s.x?ee(s.x):Y,i=s&&void 0!==s.x?`calc(50% + ${ee(s.x)})`:"50%",l=s&&void 0!==s.y?ee(s.y):Y,c=s&&void 0!==s.y?`calc(50% + ${ee(s.y)})`:"50%";e.current.style.setProperty(re(t,n),"center"===o?i:a),e.current.style.setProperty(ae(t),"middle"===r?c:l),n&&(("top"===r||"bottom"===r)&&"start"===o&&e.current.style.setProperty("left","unset"),"middle"===r&&"end"===o&&e.current.style.setProperty("right","unset"),"middle"===r&&"start"===o&&e.current.style.setProperty("left","unset"))}},re=(e,t)=>{const{horizontal:s}=e;return{end:t?"left":"right",center:"left",start:t?"right":"left"}[s||"end"]},ae=e=>({top:"top",middle:"top",bottom:"bottom"}[e.vertical||"bottom"]),ie=l.forwardRef(((e,t)=>{const{align:s=le.align,alignOffset:r,className:a,disabled:i,icon:c,svgIcon:d,iconClass:u,id:p,items:m,item:h,text:f,positionMode:v=le.positionMode,size:b=le.size,style:g,rounded:y=le.rounded,themeColor:k=le.themeColor,overlayStyle:C,tabIndex:I,accessKey:x,popupSettings:E={},modal:D,onClick:w,onItemClick:N,onFocus:B,onBlur:S,onKeyDown:K,onOpen:R,onClose:O,...M}=e,z=n.useZIndexContext(),F=z?z+2:100,P=l.useRef(null),A=l.useRef(null),T=l.useRef(null),$=l.useRef(null),L=l.useCallback((()=>{A.current&&A.current.focus()}),[]),W=l.useCallback((()=>({element:A.current,focus:L})),[L]);l.useImperativeHandle(P,W),l.useImperativeHandle(t,(()=>P.current));const[U,H]=l.useState(!1),[j,q]=l.useState(!1),[V,G]=l.useState(-1),Z=n.useId()+"-button-id",_=n.useDir(A,e.dir),J="rtl"===_,Q=n.useId()+"-list-id";l.useEffect((()=>{oe(A,s,r,J)}),[A,s,r,J]),l.useEffect((()=>{j&&A&&A.current&&A.current.focus()}),[j,A]);const Y=l.useCallback(((e,t)=>{m&&n.dispatchEvent(t?R:O,e,W(),void 0)}),[R,O,m]),ee=l.useCallback((e=>{!e.target||i||(!m&&w?n.dispatchEvent(w,e,W(),void 0):(H(!U),q(!0),G(U?-1:0),Y(e,!U)))}),[H,q,G,w,Y,U,m,i]),re=l.useCallback((e=>{q(!0),G(U?0:-1),B&&n.dispatchEvent(B,e,W(),void 0)}),[B,q,G]),ae=l.useCallback((e=>{q(!1),H(!1),G(-1),n.dispatchEvent(S,e,W(),void 0),U&&Y(e,!1)}),[S,q,H,G,Y]),ie=l.useCallback((e=>{e.preventDefault()}),[]),ce=l.useCallback(((e,t)=>{m&&(m[t].disabled||n.dispatchEvent(N,e,W(),{itemProps:m[t],itemIndex:t}))}),[N]),de=l.useCallback(((e,t)=>{!e.target||!m||(G(t),H(!1),ce(e,t),Y(e,!1))}),[G,H,ce,Y]),ue=l.useCallback((e=>{n.getActiveElement(document)===A.current&&e.preventDefault()}),[A]),pe=l.useCallback((e=>{const t=V,s=m?m.length:-1;if(e.altKey)return!U&&e.keyCode===n.Keys.down&&(e.preventDefault(),H(!0),G(0)),void(U&&e.keyCode===n.Keys.up&&(e.preventDefault(),H(!1),G(-1)));switch(e.keyCode){case n.Keys.enter:case n.Keys.space:t>=0&&ce(e,t),m||ee(e),e.preventDefault(),H(!U),G(U?-1:0);break;case n.Keys.esc:e.preventDefault(),H(!1),G(-1);break;case n.Keys.home:e.preventDefault(),G(0);break;case n.Keys.end:e.preventDefault(),G(s-1);break;case n.Keys.down:case n.Keys.right:e.preventDefault(),G(t+1>=s?0:t+1);break;case n.Keys.up:case n.Keys.left:e.preventDefault(),G(t-1<0?s-1:t-1)}n.dispatchEvent(K,e,W(),void 0)}),[K,V,G,J,H]),me=l.useMemo((()=>n.classNames("k-fab k-fab-solid",{"k-fab-sm":"small"===b,"k-fab-md":"medium"===b,"k-fab-lg":"large"===b,"k-disabled":i,"k-pos-absolute":"absolute"===v,"k-pos-fixed":"fixed"===v,"k-focus":j,[`k-rounded-${n.kendoThemeMaps.roundedMap[y]||y}`]:y,[`k-fab-solid-${k}`]:k},`k-${s.vertical}-${s.horizontal}`,a)),[k,b,y,i,v,s,j,a]),he=m&&m.map(((e,t)=>l.createElement(X,{...e,key:t,index:t,id:`${Q}-${t}`,disabled:i||e.disabled,focused:V===t,dataItem:e,item:h,className:n.classNames(e.className,ne(_||"ltr",s.horizontal)),onClick:de,onDown:ue}))),fe=!(!c&&!d||f),ve=(A.current?A.current.offsetWidth:0)/2-16;return l.createElement(n.ZIndexContext.Provider,{value:F},l.createElement(l.Fragment,null,l.createElement("button",{ref:A,id:p||Z,role:"button",type:"button","aria-disabled":i,"aria-expanded":m?U:void 0,"aria-haspopup":!!m,"aria-label":`${f||""} floatingactionbutton`,"aria-owns":m?Q:void 0,"aria-activedescendant":V>=0&&m?`${Q}-${V}`:void 0,tabIndex:n.getTabIndex(I,i),accessKey:x,dir:_,disabled:i,className:me,style:g,onClick:ee,onMouseDown:ie,onFocus:re,onBlur:ae,onKeyDown:pe,...M},c||d?l.createElement(n.IconWrap,{className:"k-fab-icon",name:c,icon:d}):u?l.createElement("span",{role:"presentation",className:u}):null,f&&l.createElement("span",{className:"k-fab-text"},f)),D&&U&&l.createElement("div",{className:"k-overlay",style:{zIndex:F,...C}}),l.createElement(o.Popup,{ref:$,anchor:A.current,show:U,animate:E.animate,popupClass:n.classNames("k-popup-transparent k-fab-popup",E.popupClass),anchorAlign:E.anchorAlign||te(s,J),popupAlign:E.popupAlign||se(s,J),style:{boxShadow:"none"}},l.createElement("ul",{ref:T,role:"menu","aria-labelledby":p,id:Q,className:n.classNames("k-fab-items",{"k-fab-items-bottom":"bottom"!==s.vertical,"k-fab-items-top":"bottom"===s.vertical}),style:{paddingLeft:fe?ve:void 0,paddingRight:fe?ve:void 0}},he))))}));ie.propTypes={className:s.string,style:s.object,id:s.string,dir:s.string,tabIndex:s.number,accessKey:s.string,disabled:s.bool,icon:s.string,svgIcon:n.svgIconPropType,iconClass:s.string,text:s.string,alignOffset:s.shape({x:s.oneOfType([s.number,s.string]).isRequired,y:s.oneOfType([s.number,s.string]).isRequired}),align:s.shape({vertical:s.oneOf(["top","middle","bottom"]).isRequired,horizontal:s.oneOf(["start","center","end"]).isRequired}),positionMode:s.oneOf(["absolute","fixed"]),size:s.oneOf([null,"small","medium","large"]),rounded:s.oneOf([null,"small","medium","large","full"]),themeColor:s.oneOf([null,"primary","secondary","tertiary","info","success","warning","error","dark","light","inverse"]),modal:s.bool,overlayStyle:s.object};const le={align:{vertical:"bottom",horizontal:"end"},size:"medium",rounded:"full",themeColor:"primary",positionMode:"fixed"};ie.displayName="KendoFloatingActionButton";const ce=n.withIdHOC(E);ce.displayName="KendoReactDropDownButton";const de=n.withIdHOC(k);de.displayName="KendoReactSplitButton",e.Button=c,e.ButtonGroup=u,e.Chip=q,e.ChipList=_,e.DropDownButton=ce,e.DropDownButtonClassComponent=E,e.DropDownButtonItem=I,e.FloatingActionButton=ie,e.FloatingActionButtonItem=X,e.SplitButton=de,e.SplitButtonClassComponent=k,e.SplitButtonItem=h,e.Toolbar=F,e.ToolbarItem=A,e.ToolbarSeparator=N,e.ToolbarSpacer=T,e.toolbarButtons=w}));
15
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("prop-types"),require("@progress/kendo-react-common"),require("@progress/kendo-react-popup"),require("@progress/kendo-svg-icons"),require("@progress/kendo-react-intl")):"function"==typeof define&&define.amd?define(["exports","react","prop-types","@progress/kendo-react-common","@progress/kendo-react-popup","@progress/kendo-svg-icons","@progress/kendo-react-intl"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).KendoReactButtons={},e.React,e.PropTypes,e.KendoReactCommon,e.KendoReactPopup,e.KendoSvgIcons,e.KendoReactIntl)}(this,(function(e,t,s,n,o,r,a){"use strict";function i(e){var t=Object.create(null);return e&&Object.keys(e).forEach((function(s){if("default"!==s){var n=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(t,s,n.get?n:{enumerable:!0,get:function(){return e[s]}})}})),t.default=e,Object.freeze(t)}var l=i(t);const c=l.forwardRef(((e,t)=>{const{children:s,togglable:o,dir:r,disabled:a,selected:i,icon:c,iconClass:u,svgIcon:p,imageUrl:m,imageAlt:h,className:f,startIcon:v,endIcon:b,onClick:g,size:y=d.size,rounded:k=d.rounded,fillMode:C=d.fillMode,themeColor:I=d.themeColor,...x}=e,E=l.useRef(),D=l.useRef(null),[w,N]=l.useState(!0===o&&!0===i),B=void 0!==p||void 0!==c||void 0!==u||void 0!==m,S=void 0!==s,K=n.useUnstyled(),R=e.unstyled||K,O=R&&R.uButton;l.useImperativeHandle(t,(()=>({element:D.current,selected:void 0!==E.current?E.current:w}))),l.useMemo((()=>{o&&void 0!==i&&i!==w&&N(i)}),[o,i]),l.useEffect((()=>{E.current=void 0}),[w]);const M=function({imageUrl:e,name:t,iconClass:s,svgIcon:o,imageAlt:r,buttonClasses:a}){return e?l.createElement("img",{role:"presentation",className:n.classNames(n.uButton.icon({c:a})),alt:r,src:e}):t||o?l.createElement(n.IconWrap,{className:n.classNames(n.uButton.icon({c:a})),name:t,icon:o}):s?l.createElement("span",{role:"presentation",className:n.classNames(n.uButton.icon({c:a}),s)}):null}({name:c,svgIcon:p,iconClass:u,imageUrl:m,imageAlt:h,buttonClasses:O}),z=e=>l.cloneElement(e,{className:n.classNames(n.uButton.icon({c:O}))});return l.createElement("button",{ref:D,"aria-pressed":o?w:void 0,...x,dir:r,disabled:a,onClick:e=>{o&&void 0===i&&(E.current=!w,N(!w)),g&&g.call(void 0,e)},className:n.classNames(n.uButton.wrapper({c:O,isRtl:"rtl"===r,selected:w,disabled:a,size:y,fillMode:C,rounded:k,themeColor:I,iconButton:!S&&B}),f)},v&&z(v),M,s&&l.createElement("span",{className:n.classNames(n.uButton.text({c:O}))},s),b&&z(b))})),d={togglable:!1,size:"medium",rounded:"medium",fillMode:"solid",themeColor:"base"};c.displayName="KendoReactButton",c.propTypes={children:s.node,selected:s.bool,togglable:s.bool,icon:s.string,svgIcon:n.svgIconPropType,iconClass:s.string,imageUrl:s.string,imageAlt:s.string,size:s.oneOf([null,"small","medium","large"]),rounded:s.oneOf([null,"small","medium","large","full"]),fillMode:s.oneOf([null,"flat","link","outline","solid","clear"]),themeColor:s.oneOf([null,"base","primary","secondary","tertiary","info","success","warning","error","dark","light","inverse"])};const u=e=>{const{children:t,className:s,dir:o,disabled:r,width:a}=e,i=n.useUnstyled(),c=e.unstyled||i,d=c&&c.uButtonGroup,u=(e,t)=>{const s={...a?{width:a}:{},...e.props.style||{}},n=r||e.props.disabled,o={...e.props,...t?{className:t}:{},...Object.keys(s).length?{style:s}:{},...void 0!==n?{disabled:n}:{}};return l.Children.count(e.props.children)>0?l.cloneElement(e,o,e.props.children):l.cloneElement(e,o)},p=l.useRef(null),m=(e=>{const t=l.Children.count(e),s=void 0!==o?"rtl"===o:p.current&&"rtl"===getComputedStyle(p.current).direction||!1;return l.Children.map(e,((e,o)=>{if(l.isValidElement(e)){const r=o===t-1,a=s,i=n.classNames(e.props.className,n.uButtonGroup.position({c:d,start:a?r:0===o,end:a?0===o:r}));return u(e,i)}return e}))})(t),h=n.classNames(n.uButtonGroup.wrapper({c:d,stretched:!!a,disabled:r}),s),f={className:h,style:{width:`${a}`},dir:o,role:"group","aria-disabled":r};return l.createElement("div",{ref:p,...f,className:h},m)};u.propTypes={children:s.oneOfType([s.arrayOf(s.element),s.element]),className:s.string,disabled:s.bool,width:s.string,dir:s.string};const p=e=>{const t=n.useUnstyled(),s=e.unstyled||t,o=s&&s.uDropDownButton,r=l.useCallback((t=>{e.onClick(t,e.index)}),[e]),a=e.dataItem.render||e.item||(void 0===e.item?e.render:null),i=void 0!==e.dataItem.text?e.dataItem.text:e.textField?e.dataItem[e.textField]:e.dataItem,c=l.createElement("li",{id:e.id,className:n.classNames(n.uDropDownButton.li({c:o,focused:e.focused}),e.className),tabIndex:-1,onClick:r,onMouseDown:e.onDown,onPointerDown:e.onDown,role:"menuitem","aria-disabled":e.dataItem.disabled||void 0},l.createElement("span",{tabIndex:-1,className:n.classNames(n.uDropDownButton.link({c:o,selected:e.dataItem.selected,disabled:e.dataItem.disabled})),key:"icon"},a?l.createElement(a,{item:e.dataItem,itemIndex:e.index}):l.createElement(l.Fragment,null,(e.dataItem.icon||e.dataItem.iconClass||e.dataItem.svgIcon)&&l.createElement(n.IconWrap,{className:e.dataItem.iconClass,name:e.dataItem.icon,icon:e.dataItem.svgIcon}),e.dataItem.imageUrl&&l.createElement("img",{role:"presentation",alt:"",src:e.dataItem.imageUrl,className:"k-icon"}),i&&l.createElement("span",{className:"k-menu-link-text"},i))));return void 0!==e.item&&void 0!==e.render?e.render.call(void 0,c,e):c};p.displayName="KendoReactButtonItem";const m=class extends l.Component{render(){return null}};m.propTypes={text:s.string,icon:s.string,iconClass:s.string,imageUrl:s.string,disabled:s.bool,render:s.any};let h=m;const f=(e,t,s,o)=>{if(s)return e;const r=Math.min(o-1,Math.max(0,e));switch(t){case n.Keys.enter:case n.Keys.space:case n.Keys.esc:return-1;case n.Keys.up:case n.Keys.left:return r-1<0?o-1:r-1;case n.Keys.down:case n.Keys.right:return r+1>=o?0:r+1;case n.Keys.home:return 0;case n.Keys.end:return o-1;default:return e}};function v(e){const t={horizontal:"left",vertical:"bottom"};return e&&(t.horizontal="right"),t}function b(e){const t={horizontal:"left",vertical:"top"};return e&&(t.horizontal="right"),t}const g={name:"@progress/kendo-react-buttons",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate:0,version:"$VERSION",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"},y=class extends l.Component{constructor(e){super(e),this.state={focused:!1,focusedIndex:-1,opened:!1},this.wrapper=null,this.mainButton=null,this.list=null,this.skipFocus=!1,this.buttonsData=[],this.showLicenseWatermark=!1,this.onKeyDown=e=>{const{focusedIndex:t}=this.state;if(e.altKey)return void(this.opened||e.keyCode!==n.Keys.down?this.opened&&e.keyCode===n.Keys.up&&(e.preventDefault(),this.setState({focusedIndex:-1}),this.setOpen(!1,e)):(e.preventDefault(),this.setState({focusedIndex:0}),this.setOpen(!0,e)));let s;if(e.keyCode===n.Keys.enter||e.keyCode===n.Keys.space){if(e.preventDefault(),this.dispatchClickEvent(e,t),t>=0){s={focusedIndex:this.opened?-1:0};const t=!this.opened;this.setOpen(t,e)}}else if(this.opened&&e.keyCode===n.Keys.esc)return this.setState({focusedIndex:-1}),void this.setOpen(!1,e);if(this.opened){const o=f(t,e.keyCode,e.altKey,this.buttonsData.length);o!==t&&(s=s||{},s.focusedIndex=o);const r=e.keyCode===n.Keys.up||e.keyCode===n.Keys.down||e.keyCode===n.Keys.left||e.keyCode===n.Keys.right;!e.altKey&&(r||e.keyCode===n.Keys.home||e.keyCode===n.Keys.end)&&e.preventDefault()}s&&this.setState(s)},this.switchFocus=e=>{this.skipFocus=!0,e(),window.setTimeout((()=>this.skipFocus=!1),0)},this.onFocus=e=>{this.skipFocus||(n.dispatchEvent(this.props.onFocus,e,this,void 0),this.setState({focused:!0}))},this.setOpen=(e,t)=>{this.opened!==e&&(this.openedDuringOnChange=e,this.setState({opened:e}),t?this.dispatchPopupEvent(t,e):this.openedDuringOnChange=void 0)},this.onItemClick=(e,t)=>{this.opened&&this.setState({focusedIndex:0}),this.dispatchClickEvent(e,t),this.setOpen(!1,e)},this.onBlur=e=>{this.skipFocus||(this.setState({focused:!1,focusedIndex:-1}),n.dispatchEvent(this.props.onBlur,e,this,void 0),setTimeout((()=>{this.setOpen(!1,e)}),0))},this.onPopupClose=e=>{var t;const s=n.getActiveElement(document);this.element&&this.element.removeAttribute("tabindex"),(s===this.list||null!=(t=this.list)&&t.contains(s))&&this.switchFocus((()=>{this.element&&this.element.focus({preventScroll:!0})})),this.props.popupSettings&&this.props.popupSettings.onClose&&this.props.popupSettings.onClose.call(void 0,e)},this.listRef=e=>{this.list=e,e&&this.state.focused&&this.switchFocus((()=>{e.focus({preventScroll:!0}),this.element&&(this.element.tabIndex=-1)}))},this.onSplitPartClick=e=>{if(this.buttonsData.length){const t=!this.opened;this.setState({focusedIndex:t?0:-1,focused:!0}),this.setOpen(t,e)}},this.onDownSplitPart=e=>{e.preventDefault();const t=n.getActiveElement(document);this.element&&t!==this.element&&t!==this.list&&this.element.focus()},this.onItemDown=e=>{n.getActiveElement(document)===this.list&&e.preventDefault()},this.dispatchPopupEvent=(e,t)=>{n.dispatchEvent(t?this.props.onOpen:this.props.onClose,e,this,void 0),this.openedDuringOnChange=void 0},this.showLicenseWatermark=!n.validatePackage(g,{component:"SplitButton"})}get guid(){return this.props.id?this.props.id+"-accessibility-id":this.props.id}get opened(){return void 0!==this.openedDuringOnChange?this.openedDuringOnChange:void 0===this.props.opened?this.state.opened:this.props.opened}render(){this.buttonsData=this.props.items||l.Children.toArray(this.props.children).filter((e=>e&&e.type===h)).map((e=>e.props));const e=this.isRtl(),t=e?"rtl":void 0,{id:s,style:o,tabIndex:a,disabled:i}=this.props;return l.createElement(l.Fragment,null,l.createElement("div",{id:s,style:o,className:n.classNames("k-split-button","k-button-group",{"k-focus":this.state.focused},`k-rounded-${n.kendoThemeMaps.roundedMap[this.props.rounded||"medium"]}`,this.props.className),onKeyDown:this.onKeyDown,onFocus:this.onFocus,onBlur:this.onBlur,dir:t,ref:e=>this.wrapper=e},l.createElement(c,{ref:e=>this.mainButton=e&&e.element,type:"button",size:this.props.size,rounded:this.props.rounded,fillMode:this.props.fillMode,themeColor:this.props.themeColor,onClick:e=>this.onItemClick(e,-1),disabled:i||void 0,tabIndex:a,accessKey:this.props.accessKey,className:this.props.buttonClass,icon:this.props.icon,svgIcon:this.props.svgIcon,iconClass:this.props.iconClass,startIcon:this.props.startIcon,endIcon:this.props.endIcon,imageUrl:this.props.imageUrl,dir:t,"aria-disabled":i,"aria-haspopup":!0,"aria-expanded":this.opened||void 0,"aria-label":this.props.ariaLabel,"aria-controls":this.opened?this.guid:void 0,id:"button-"+this.guid,title:this.props.title},this.props.text),l.createElement(c,{type:"button",size:this.props.size,rounded:this.props.rounded,fillMode:this.props.fillMode,themeColor:this.props.themeColor,icon:"caret-alt-down",svgIcon:r.caretAltDownIcon,className:"k-split-button-arrow",disabled:i||void 0,tabIndex:-1,onClick:this.onSplitPartClick,onMouseDown:this.onDownSplitPart,onPointerDown:this.onDownSplitPart,dir:t,"aria-label":"menu toggling button"}),this.renderPopup(e)),this.showLicenseWatermark&&l.createElement(n.WatermarkOverlay,null))}componentDidMount(){(void 0===this.props.dir&&this.isRtl()||this.opened)&&this.forceUpdate()}get element(){return this.mainButton}dispatchClickEvent(e,t){this.isItemDisabled(t)||(-1===t?n.dispatchEvent(this.props.onButtonClick,e,this,void 0):n.dispatchEvent(this.props.onItemClick,e,this,{item:this.buttonsData[t],itemIndex:t}))}renderPopup(e){const{popupSettings:t={}}=this.props,{focusedIndex:s}=this.state;return l.createElement(o.Popup,{anchor:this.wrapper,show:this.opened,animate:t.animate,popupClass:n.classNames("k-menu-popup",t.popupClass),anchorAlign:t.anchorAlign||v(e),popupAlign:t.popupAlign||b(e),style:e?{direction:"rtl"}:void 0,onClose:this.onPopupClose},l.createElement("ul",{role:"menu",id:this.guid,"aria-labelledby":"button-"+this.guid,tabIndex:-1,ref:this.listRef,"aria-activedescendant":s>=0?`${this.guid}-${s}`:void 0,className:n.classNames("k-menu-group",{[`k-menu-group-${n.kendoThemeMaps.sizeMap[this.props.size]||this.props.size}`]:this.props.size})},this.renderChildItems()))}renderChildItems(){const{item:e,itemRender:t,textField:s}=this.props;return this.buttonsData.length>0?this.buttonsData.map(((o,r)=>l.createElement(p,{className:n.classNames("k-menu-item",{"k-first":0===r},{"k-last":r===this.buttonsData.length-1}),dataItem:o,textField:s,focused:this.state.focusedIndex===r,onClick:this.onItemClick,onDown:this.onItemDown,render:t,item:e,key:r,index:r,id:`${this.guid}-${r}`}))):null}isItemDisabled(e){return this.buttonsData[e]?this.buttonsData[e].disabled:this.props.disabled}isRtl(){return void 0!==this.props.dir?"rtl"===this.props.dir:!!this.wrapper&&"rtl"===getComputedStyle(this.wrapper).direction}};y.propTypes={accessKey:s.string,ariaLabel:s.string,title:s.string,onButtonClick:s.func,onFocus:s.func,onBlur:s.func,onItemClick:s.func,onOpen:s.func,onClose:s.func,text:s.string,items:s.arrayOf(s.any),textField:s.string,tabIndex:s.number,disabled:s.bool,icon:s.string,svgIcon:n.svgIconPropType,iconClass:s.string,imageUrl:s.string,popupSettings:s.object,itemRender:s.any,item:s.func,className:s.string,buttonClass:s.string,dir:s.string},y.defaultProps={size:"medium",rounded:"medium",fillMode:"solid",themeColor:"base"};let k=y;const C=class extends l.Component{render(){return null}};C.propTypes={text:s.string,icon:s.string,iconClass:s.string,imageUrl:s.string,selected:s.bool,disabled:s.bool,render:s.any};let I=C;const x=class extends l.Component{constructor(e){super(e),this.state={opened:!1,focused:!1,focusedIndex:-1},this.mainButton=null,this.list=null,this.skipFocus=!1,this.showLicenseWatermark=!1,this.buttonsData=[],this.onKeyDown=e=>{const{focusedIndex:t}=this.state;if(e.altKey)return void(this.opened||e.keyCode!==n.Keys.down?this.opened&&e.keyCode===n.Keys.up&&(e.preventDefault(),this.setState({focusedIndex:-1}),this.setOpen(!1,e)):(e.preventDefault(),this.setOpen(!0,e),this.setState({focusedIndex:0})));const s={...this.state};if(e.keyCode===n.Keys.enter||e.keyCode===n.Keys.space){e.preventDefault(),t>=0&&this.dispatchClickEvent(e,t);const s=!this.opened;return this.setState({focused:!0,focusedIndex:s?0:-1}),void this.setOpen(s,e)}if(this.opened&&e.keyCode===n.Keys.esc)return this.setState({focusedIndex:-1}),void this.setOpen(!1,e);if(this.opened){const o=f(t,e.keyCode,e.altKey,this.buttonsData.length);s.focusedIndex=o;const r=e.keyCode===n.Keys.up||e.keyCode===n.Keys.down||e.keyCode===n.Keys.left||e.keyCode===n.Keys.right;!e.altKey&&(r||e.keyCode===n.Keys.home||e.keyCode===n.Keys.end)&&e.preventDefault()}this.setState(s)},this.switchFocus=e=>{this.skipFocus=!0,e(),window.setTimeout((()=>this.skipFocus=!1),0)},this.handleFocus=e=>{this.skipFocus||(this.setState({focused:!0,focusedIndex:this.opened?0:-1}),n.dispatchEvent(this.props.onFocus,e,this,void 0))},this.handleButtonBlur=e=>{this.opened||(this.setState({focused:!1}),n.dispatchEvent(this.props.onBlur,e,this,void 0))},this.handleMenuBlur=e=>{this.skipFocus||(this.setState({focused:!1,focusedIndex:-1}),n.dispatchEvent(this.props.onBlur,e,this,void 0),setTimeout((()=>{this.setOpen(!1,e)}),0))},this.setOpen=(e,t)=>{this.opened!==e&&(this.openedDuringOnChange=e,this.setState({opened:e}),t?this.dispatchPopupEvent(t,e):this.openedDuringOnChange=void 0)},this.onItemClick=(e,t)=>{this.setState({focusedIndex:-1}),this.dispatchClickEvent(e,t),this.setOpen(!1,e)},this.onItemDown=e=>{n.getActiveElement(document)===this.list&&e.preventDefault()},this.mouseDown=e=>{e.preventDefault();const t=n.getActiveElement(document);this.element&&t!==this.element&&t!==this.list&&this.element.focus()},this.onPopupClose=e=>{var t;const s=n.getActiveElement(document);this.element&&this.element.removeAttribute("tabindex"),(s===this.list||null!=(t=this.list)&&t.contains(s))&&this.switchFocus((()=>{this.element&&this.element.focus({preventScroll:!0})})),this.props.popupSettings&&this.props.popupSettings.onClose&&this.props.popupSettings.onClose.call(void 0,e)},this.listRef=e=>{this.list=e,e&&this.state.focused&&this.switchFocus((()=>{e.focus({preventScroll:!0}),this.element&&(this.element.tabIndex=-1)}))},this.onClickMainButton=e=>{if(!this.buttonsData.length)return;const t=!this.opened;this.setState({focused:!0,focusedIndex:t?0:-1}),this.setOpen(t,e)},this.dispatchPopupEvent=(e,t)=>{n.dispatchEvent(t?this.props.onOpen:this.props.onClose,e,this,void 0),this.openedDuringOnChange=void 0},this.showLicenseWatermark=!n.validatePackage(g,{component:"DropDownButton"})}get guid(){return this.props.id+"-accessibility-id"}get opened(){return void 0!==this.openedDuringOnChange?this.openedDuringOnChange:void 0===this.props.opened?this.state.opened:this.props.opened}render(){const e=this.isRtl(),t=this.context&&this.context.uDropDownButton,s=e?"rtl":void 0,{id:o,style:r,tabIndex:a,disabled:i,size:d,rounded:u,fillMode:p,themeColor:m,ariaLabel:h,title:f,accessKey:v,icon:b,svgIcon:g,iconClass:y,buttonClass:k,className:C,imageUrl:x,startIcon:E,endIcon:D}=this.props;return this.buttonsData=this.props.items||l.Children.toArray(this.props.children).filter((e=>e&&e.type===I)).map((e=>e.props)),l.createElement(l.Fragment,null,l.createElement(c,{id:o,size:d,style:r,rounded:u,fillMode:p,themeColor:m,onClick:this.onClickMainButton,onMouseDown:this.mouseDown,onKeyDown:this.onKeyDown,onFocus:this.handleFocus,onBlur:this.handleButtonBlur,"aria-disabled":i?"true":void 0,tabIndex:a,accessKey:v,icon:b,svgIcon:g,iconClass:y,className:n.classNames(k,C,n.uDropDownButton.wrapper({c:t,focused:this.state.focused,disabled:i})),imageUrl:x,dir:s,ref:e=>this.mainButton=e&&e.element,type:"button","aria-expanded":this.opened?"true":"false","aria-label":h,"aria-controls":this.opened?this.guid:void 0,title:f,startIcon:E,endIcon:D},this.props.text),this.showLicenseWatermark&&l.createElement(n.WatermarkOverlay,null),this.renderPopup(e))}componentDidMount(){(void 0===this.props.dir&&this.isRtl()||this.opened)&&this.forceUpdate()}get element(){return this.mainButton}dispatchClickEvent(e,t){this.isItemDisabled(t)||n.dispatchEvent(this.props.onItemClick,e,this,{item:this.buttonsData[t],itemIndex:t})}renderPopup(e){const{popupSettings:t={},id:s}=this.props,r=this.context&&this.context.uDropDownButton,{focusedIndex:a}=this.state;return l.createElement(o.Popup,{anchor:this.mainButton,show:this.opened,animate:t.animate,popupClass:n.classNames(n.uDropDownButton.popup({c:r}),t.popupClass),anchorAlign:t.anchorAlign||v(e),popupAlign:t.popupAlign||b(e),style:e?{direction:"rtl"}:void 0,onClose:this.onPopupClose},l.createElement("ul",{role:"list",id:this.guid,tabIndex:-1,"aria-activedescendant":a>=0?`${this.guid}-${a}`:void 0,ref:this.listRef,onKeyDown:this.onKeyDown,onBlur:this.handleMenuBlur,className:n.classNames(n.uDropDownButton.ul({c:r,size:this.props.size}))},this.renderChildItems()))}renderChildItems(){const{item:e,itemRender:t,textField:s}=this.props,o=this.context&&this.context.uDropDownButton;return this.buttonsData.length>0?this.buttonsData.map(((r,a)=>l.createElement(p,{className:n.classNames(n.uDropDownButton.item({c:o}),r.className,{"k-first":0===a},{"k-last":a===this.buttonsData.length-1}),dataItem:r,textField:s,focused:this.state.focusedIndex===a,onClick:this.onItemClick,onDown:this.onItemDown,render:t,item:e,index:a,key:a,id:`${this.guid}-${a}`}))):null}isItemDisabled(e){return this.buttonsData[e]?this.buttonsData[e].disabled:this.props.disabled}isRtl(){return void 0!==this.props.dir?"rtl"===this.props.dir:!!this.mainButton&&"rtl"===getComputedStyle(this.mainButton).direction}};x.propTypes={accessKey:s.string,ariaLabel:s.string,title:s.string,onFocus:s.func,onBlur:s.func,onItemClick:s.func,onOpen:s.func,onClose:s.func,items:s.arrayOf(s.any),textField:s.string,tabIndex:s.number,disabled:s.bool,icon:s.string,svgIcon:n.svgIconPropType,iconClass:s.string,imageUrl:s.string,popupSettings:s.object,itemRender:s.func,item:s.func,className:s.string,buttonClass:s.string,dir:s.string},x.defaultProps={size:"medium",rounded:"medium",fillMode:"solid",themeColor:"base"};let E=x;E.contextType=n.UnstyledContext;const D=":not(.k-dropdownlist button):not(.k-colorpicker button):not(.k-split-button .k-split-button-arrow)",w=["button"+D,".k-button-group > button"+D,".k-colorpicker",".k-dropdownlist"],N=e=>l.createElement("div",{ref:e._ref,className:n.classNames("k-toolbar-separator k-separator",e.className)}),B="prevArrow.title",S="nextArrow.title",K="moreButtonTitle.title",R={[B]:"Previous scroll button",[S]:"Next scroll button",[K]:"More button"},O=e=>{const t=a.useLocalization(),{disabled:s,type:o,scrollContentRef:i,buttonScrollSpeed:c,prevButton:d,nextButton:u}=e,p="prev"===o?d||"span":u||"span";return l.createElement(p,{className:n.classNames("k-button","k-button-md","k-button-solid","k-button-solid-base","k-rounded-md","k-icon-button",`k-toolbar-${o}`,{"k-disabled":s}),title:`${"prev"===o?t.toLanguageString(B,R[B]):t.toLanguageString(S,R[S])}`,"aria-hidden":!0,tabIndex:s?-1:void 0,onClick:e=>{i&&i.current&&c&&i.current.scrollBy({left:"next"===o?c:-c,behavior:"smooth"})}},l.createElement(n.SvgIcon,{icon:"prev"===o?r.caretAltLeftIcon:r.caretAltRightIcon,className:"k-button-icon"}))},M=e=>{const{scrollButtons:t,scrollButtonsPosition:s,isOverflowing:n,scrollContentRef:o,buttonScrollSpeed:r,dir:a,isScrollStartPosition:i,isScrollEndPosition:c,prevButton:d,nextButton:u,children:p}=e,m=(e,t)=>l.createElement(O,{type:e,disabled:t,scrollContentRef:o,buttonScrollSpeed:r,prevButton:d,nextButton:u}),h="visible"===t||"auto"===t&&n;return l.createElement(l.Fragment,null,h&&"split"===s&&l.createElement(l.Fragment,null,m("rtl"!==a?"prev":"next",i),l.createElement(N,{className:"k-toolbar-button-separator"})),h&&"start"===s&&l.createElement(l.Fragment,null,m("rtl"!==a?"prev":"next",i),m("rtl"!==a?"next":"prev",c),l.createElement(N,{className:"k-toolbar-button-separator"})),l.createElement("span",{className:"k-toolbar-items k-toolbar-items-scroll",ref:o},p),h&&"split"===s&&l.createElement(l.Fragment,null,l.createElement(N,{className:"k-toolbar-button-separator"}),m("rtl"!==a?"next":"prev",c)),h&&"end"===s&&l.createElement(l.Fragment,null,l.createElement(N,{className:"k-toolbar-button-separator"}),m("rtl"!==a?"prev":"next",i),m("rtl"!==a?"next":"prev",c)))},z=e=>{var t;const{toolbarRef:s,children:i,fillMode:d,size:u}=e,[p,m]=l.useState(!1),h=l.useRef(l.Children.toArray(i).filter((e=>l.isValidElement(e))).map(((e,t)=>l.cloneElement(e,{key:e.key||t})))),f=l.useRef([]),v=l.useRef(0),b=l.useRef(null),g=l.useRef(null),y=a.useLocalization(),[k,C]=l.useReducer((e=>e+1),0),I=()=>{if(!s.current)return;let e=0;const t=s.current.clientWidth,n=parseInt(window.getComputedStyle(s.current).gap||"0",10),o=Array.from(s.current.children).reduce(((e,t,s)=>e+=Math.ceil(t.clientWidth)),0),r=Array.from(s.current.children).length;if(e=o+r*n+2*n,e>t){const e=[...h.current],s=e.pop();v.current=t,h.current=e,s&&(f.current=[s,...f.current])}else if(t>v.current+n*r){const e=[...f.current],s=e.shift();f.current=e,s&&(h.current=[...h.current,s]),v.current=t}C()};l.useEffect((()=>{I();const e=new ResizeObserver(I),t=s.current;return t&&e.observe(t),()=>{t&&e.unobserve(t)}}),[]);return l.createElement(l.Fragment,null,h.current.length>0&&h.current,f.current.length>0&&l.createElement(l.Fragment,null,l.createElement(N,{_ref:g,className:"k-toolbar-button-separator"}),l.createElement(c,{ref:b,className:"k-toolbar-overflow-button",fillMode:"flat",svgIcon:r.moreHorizontalIcon,title:y.toLanguageString(K,R[K]),onClick:()=>{m(!p)}}),l.createElement(o.Popup,{anchor:s.current,show:p,popupClass:"k-toolbar-popup",style:{width:null==(t=s.current)?void 0:t.offsetWidth}},l.createElement("span",{className:`k-toolbar-items-list k-toolbar-items-list-${n.kendoThemeMaps.sizeMap[u]} k-toolbar-items-list-${d}`},f.current.length>0&&f.current))))},F=l.forwardRef(((e,t)=>{const{children:s,className:o,id:r,ariaLabel:a,keyboardNavigation:i,role:c,onResize:d,style:u,tabIndex:p=P.tabIndex,size:m=P.size,fillMode:h=P.fillMode,overflow:f,scrollButtons:v=P.scrollButtons,scrollButtonsPosition:b=P.scrollButtonsPosition,buttonScrollSpeed:g=P.buttonScrollSpeed,prevButton:y,nextButton:k}=e,C=l.useRef(!1),I=l.useRef(null),x=l.useRef(null),E=l.useRef(0),D=l.useRef(0),N=l.useRef([]),B=l.useRef({element:null,props:e}),[S,K]=l.useState(!1),[R,O]=l.useState(!0),[F,A]=l.useState(!1),T=n.useDir(I,e.dir),$=l.useMemo((()=>e.buttons||w),[e.buttons]),L=l.useMemo((()=>$.map((e=>e+":focus")).join(",")),[$]),W=()=>{const e=I.current&&I.current.querySelector(L);return Math.max(0,N.current.findIndex((t=>t===e)))};l.useImperativeHandle(B,(()=>({element:I.current,props:e}))),l.useImperativeHandle(t,(()=>B.current)),l.useEffect((()=>(window.addEventListener("resize",j),I.current&&(D.current=I.current.offsetWidth,E.current=I.current.offsetHeight,!1!==i&&(N.current=Array.from(I.current.querySelectorAll($.join(","))),U(0))),()=>{window.removeEventListener("resize",j),N.current.length=0})),[]),l.useEffect((()=>{if(C.current){if(!I.current||!1===i)return;N.current=Array.from(I.current.querySelectorAll($.join(","))),U(W()),q()}else C.current=!0}));const U=e=>{N.current.forEach(((t,s)=>{t.tabIndex=s===e?p:-1}))},H=(e,t)=>{const s=N.current[t];if(s){s.tabIndex=p,s.focus();const t=N.current[e];t&&(t.tabIndex=-1)}},j=e=>{if(!I.current)return;const t=I.current.offsetWidth,s=I.current.offsetHeight;if(D.current!==t||E.current!==s){D.current=t,E.current=s;const n={offsetWidth:D.current,offsetHeight:E.current};d&&d.call(void 0,{target:B.current,...n,nativeEvent:e})}q()},q=l.useCallback((()=>{const e=x.current;e&&K(e.scrollWidth>e.clientWidth||e.scrollHeight>e.clientHeight)}),[]),V=l.useCallback((()=>{const e=x.current;if(e){const t=0===e.scrollLeft,s="rtl"!==T?e.scrollLeft+e.clientWidth===e.scrollWidth:e.clientWidth-e.scrollLeft===e.scrollWidth;t&&O(!0),s&&A(!0),!t&&!s&&(O(!1),A(!1))}}),[T]);return l.useEffect((()=>{const e=x.current;if(e)return e.addEventListener("scroll",V),()=>{e.removeEventListener("scroll",V)}}),[V]),l.createElement("div",{id:r,"aria-label":a,className:n.classNames("k-toolbar",{[`k-toolbar-${n.kendoThemeMaps.sizeMap[m]||m}`]:m,[`k-toolbar-${h}`]:h,"k-toolbar-scrollable":"scroll"===f,"k-toolbar-scrollable-overlay":"scroll"===f&&("hidden"===v||void 0===v),"k-toolbar-scrollable-start":"scroll"===f&&"hidden"===v&&R,"k-toolbar-scrollable-end":"scroll"===f&&"hidden"===v&&F,"k-toolbar-section":e.overflow&&"section"===f},o),style:u,role:void 0!==c?c||void 0:"toolbar",dir:T,ref:I,onKeyDown:!1!==i?e=>{const t=e.keyCode===n.Keys.left||e.keyCode===n.Keys.right||e.keyCode===n.Keys.home||e.keyCode===n.Keys.end,s=W();!t||e.defaultPrevented||-1===N.current.findIndex((t=>t===e.target))||(e.keyCode===n.Keys.left?H(s,0===s?N.current.length-1:s-1):H(s,s===N.current.length-1?0:s+1),e.keyCode===n.Keys.home&&H(s,0),e.keyCode===n.Keys.end&&H(s,N.current.length-1))}:void 0},"scroll"===f&&l.createElement(M,{scrollButtons:v,scrollButtonsPosition:b,prevButton:y,nextButton:k,isOverflowing:S,scrollContentRef:x,buttonScrollSpeed:g,dir:T,isScrollStartPosition:R,isScrollEndPosition:F,children:s}),"section"===f&&l.createElement(z,{toolbarRef:I,fillMode:h,size:m},s),("none"===f||void 0===f)&&s)})),P={tabIndex:0,size:"medium",fillMode:"solid",scrollButtons:"auto",scrollButtonsPosition:"split",buttonScrollSpeed:100};F.displayName="KendoReactToolbar",F.propTypes={tabIndex:s.number,dir:s.string,keyboardNavigation:s.bool,style:s.object,className:s.string,role:s.string,onResize:s.func,buttons:s.arrayOf(s.string.isRequired),size:s.oneOf([null,"small","medium","large"]),fillMode:s.oneOf([null,"solid","flat","outline"]),overflow:s.oneOf(["none","section","scroll"]),scrollButtons:s.oneOf(["hidden","visible","auto"]),scrollButtonsPosition:s.oneOf(["start","end","split"]),buttonScrollSpeed:s.number};const A=l.forwardRef(((e,t)=>{const{id:s,className:o,style:r,children:a}=e,i=l.useRef(null);return l.useImperativeHandle(t,(()=>({element:i.current}))),l.createElement("div",{id:s,className:n.classNames("k-toolbar-item",o),style:r,ref:i},a)}));A.displayName="KendoReactToolbarItem",A.propTypes={className:s.string};const T=l.forwardRef(((e,t)=>{const s=l.useRef(null),o=l.useRef(null);l.useImperativeHandle(o,(()=>({element:s.current}))),l.useImperativeHandle(t,(()=>({element:s.current})));const r=l.useMemo((()=>n.classNames("k-spacer",e.className)),[e.className]);return l.createElement("span",{ref:s,className:r})}));T.displayName="KendoReactToolbarSpacer",T.propTypes={className:s.string};const $=t.createContext([null,e=>{}]),L=t.createContext([null,e=>{}]),W=t.createContext([null,e=>{}]);var U=(e=>(e.next="next",e.prev="prev",e.current="current",e.reset="reset",e))(U||{});var H=(e=>(e.remove="remove",e.add="add",e.reorder="reorder",e))(H||{});var j=(e=>(e.toggle="toggle",e.remove="remove",e))(j||{});const q=l.forwardRef(((e,t)=>{const s=l.useRef(null),o=l.useRef(null),{disabled:a=G.disabled,fillMode:i=G.fillMode,themeColor:c=G.themeColor,size:d=G.size,rounded:u=G.rounded,dir:p=G.dir,removeIcon:m=G.removeIcon,removeSvgIcon:h=G.removeSvgIcon,removable:f=G.removable}=e,v=n.useDir(o,p);l.useImperativeHandle(s,(()=>({element:o.current,props:e}))),l.useImperativeHandle(t,(()=>s.current));const[b,g]=l.useContext($),[y,k]=l.useContext(L),[,C]=l.useContext(W),I=l.useMemo((()=>e.selected||(Array.isArray(b)?b.some((t=>t===e.value)):b===e.value)),[e.selected,e.value,b]),x=l.useMemo((()=>y===e.value),[e.value,y]);l.useEffect((()=>{x&&o.current&&o.current.focus()}),[x]);const E=l.useCallback((t=>{g({type:j.toggle,payload:e.value,event:t})}),[g,e.value]),D=l.useCallback((t=>{f&&(C({type:H.remove,payload:e.value,event:t}),k({type:U.reset,payload:e.value,event:t}),g({type:j.remove,payload:e.value,event:t}),e.onRemove&&e.onRemove.call(void 0,{target:s.current,syntheticEvent:t}))}),[e.onRemove,e.value,f,C,k,g]),w=l.useCallback((t=>{switch(t.keyCode){case n.Keys.left:k({type:U.prev,payload:e.value,event:t});break;case n.Keys.right:k({type:U.next,payload:e.value,event:t});break;case n.Keys.enter:g({type:j.toggle,payload:e.value,event:t});break;case n.Keys.delete:D(t)}e.onKeyDown&&e.onKeyDown.call(void 0,{target:s.current,syntheticEvent:t})}),[e.onKeyDown,e.value,k,g,D]),N=l.useCallback((t=>{k({payload:e.value,type:U.current,event:t}),e.onFocus&&e.onFocus.call(void 0,{target:s.current,syntheticEvent:t})}),[e.onFocus,e.value,k]),B=l.useCallback((t=>{e.onBlur&&e.onBlur.call(void 0,{target:s.current,syntheticEvent:t})}),[e.onBlur]),S=n.useMouse(e,s,{onClick:E});return l.createElement("div",{...S,role:e.role||"button",id:e.value,style:e.style,ref:o,dir:v,tabIndex:n.getTabIndex(e.tabIndex,a,void 0),className:n.classNames("k-chip",{"k-rtl":"rtl"===v,"k-disabled":a,"k-selected":I,"k-focus":x,[`k-chip-${n.kendoThemeMaps.sizeMap[d]||d}`]:d,[`k-rounded-${n.kendoThemeMaps.roundedMap[u]||u}`]:u,[`k-chip-${i}`]:i,[`k-chip-${i}-${c}`]:!(!i||!c)},e.className),"aria-pressed":e.role?void 0:I,"aria-disabled":a,"aria-describedby":e.ariaDescribedBy,"aria-keyshortcuts":f?"Enter Delete":void 0,onFocus:N,onBlur:B,onKeyDown:w},I&&(e.selectedIcon||e.selectedSvgIcon)&&l.createElement(n.IconWrap,{className:"k-chip-icon",name:e.selectedIcon?n.toIconName(e.selectedIcon):void 0,icon:e.selectedSvgIcon,size:"small"}),(e.icon||e.svgIcon)&&l.createElement(n.IconWrap,{className:"k-chip-icon",name:e.icon?n.toIconName(e.icon):void 0,icon:e.svgIcon,size:"small"}),e.avatar&&l.createElement("div",{className:`k-chip-avatar k-avatar k-rounded-${e.avatar.rounded} k-avatar-md k-avatar-solid k-avatar-solid-primary`,style:e.avatar.style},l.createElement("span",{className:"k-avatar-image"},l.createElement("img",{src:e.avatar.image,alt:e.avatar.imageAlt}))),l.createElement("span",{className:"k-chip-content"},void 0!==e.children?e.children:e.text&&l.createElement("span",{"aria-label":e.ariaLabel||e.text,className:"k-chip-label"},e.text)),f&&l.createElement("span",{className:"k-chip-actions"},l.createElement("span",{className:n.classNames("k-chip-action","k-chip-remove-action"),onClick:D},l.createElement(n.IconWrap,{name:m?n.toIconName(m):void 0,icon:h||r.xCircleIcon,size:"small"}))))})),V={id:s.string,text:s.string,value:s.any,dir:s.oneOf(["ltr","rtl"]),removable:s.bool,removeIcon:s.string,removeIconSvg:n.svgIconPropType,disabled:s.bool,icon:s.string,svgIcon:n.svgIconPropType,selectedIcon:s.string,selectedIconSvg:n.svgIconPropType,onRemove:s.func,dataItem:s.any,selected:s.bool,ariaDescribedBy:s.string,size:s.oneOf([null,"small","medium","large"]),rounded:s.oneOf([null,"small","medium","large","full"]),fillMode:s.oneOf([null,"outline","solid"]),themeColor:s.oneOf([null,"base","info","success","warning","error"])},G={disabled:!1,removable:!1,removeIcon:"k-i-x-circle",removeSvgIcon:r.xCircleIcon,dir:"ltr",size:"medium",rounded:"medium",fillMode:"solid",themeColor:"base"};q.displayName="KendoReactChip",q.propTypes=V;const Z=(e,t,s)=>{"multiple"===t.selection?Array.isArray(e)||(e=e?[e]:null):"single"===t.selection&&Array.isArray(e)&&(e=e?e.join(""):null);const[n,o]=l.useState(e);return[n,e=>{const r=((e,t)=>{switch(t.selection){case"single":switch(t.type){case"toggle":if(!Array.isArray(e)||null===e)return t.payload===e?null:t.payload;throw new Error("State cannot be an array in single selection");case"remove":return t.payload===e?null:e;default:return e}case"multiple":switch(t.type){case"toggle":if(Array.isArray(e))return e.some((e=>e===t.payload))?e.filter((e=>e!==t.payload)):[...e,t.payload];if(null===e)return[t.payload];throw new Error("State cannot be non-array in multiple selection");case"remove":return Array.isArray(e)?e.some((e=>e===t.payload))?e.filter((e=>e!==t.payload)):[...e,t.payload]:e;default:return e}case"none":return null;default:return e}})(t.state||n,{...e,...t});s&&s(r,e.event),"none"!==t.selection&&o(r)}]},_=l.forwardRef(((e,t)=>{const s=l.useRef(null),o=l.useRef(null),{id:r,style:a,tabIndex:i,className:c,ariaDescribedBy:d,ariaLabelledBy:u,ariaLabel:p,value:m,defaultData:h=Q.defaultData,chip:f=Q.chip,disabled:v=Q.disabled,size:b=Q.size,defaultValue:g=Q.defaultValue,selection:y=Q.selection,valueField:k=Q.valueField,textField:C=Q.textField,dir:I=Q.dir,onChange:x,onDataChange:E}=e,D=n.useDir(o,I),w=l.useMemo((()=>f||q),[f,q]);l.useImperativeHandle(s,(()=>({element:o.current,props:e}))),l.useImperativeHandle(t,(()=>s.current));const N=l.useCallback(((e,t)=>{x&&s.current&&x.call(void 0,{value:e,target:s.current,syntheticEvent:t})}),[x]),[B,S]=Z(m||g,{selection:y,state:m},N),K=l.useCallback(((e,t)=>{E&&s.current&&E.call(void 0,{value:e,target:s.current,syntheticEvent:t})}),[E]),[R,O]=((e,t,s)=>{const[n,o]=l.useState(e);return[n,e=>{const r=((e,t)=>{switch(t.type){case"add":case"reorder":break;case"remove":return e.filter((e=>e[t.valueField]!==t.payload));default:return e}})(t.state||n,{...e,...t});s&&s(r,e.event),o(r)}]})(e.data||h,{state:e.data,valueField:k},K),M=l.useCallback(((e,t)=>(e.push(t[k]),e)),[k]),z=l.useMemo((()=>e.data||R),[e.data,R]),F=l.useMemo((()=>m||B),[m,B]),P=l.useMemo((()=>z.reduce(M,[])),[z,M]),A=l.useCallback((e=>n.getter(k)(e)),[k]),T=l.useCallback((e=>n.getter(C)(e)),[C]),[U,H]=(e=>{const[t,s]=l.useState(null);return[t,t=>{const n=((e,t)=>{const s=t.items.findIndex((t=>t===e));switch(t.type){case"next":return s===t.items.length-1?e:t.items[s+1];case"prev":return 0===s?e:t.items[s-1];case"current":return t.payload;case"reset":return null;default:return e}})(t.payload,{...t,...e});s(n)}]})({items:P}),j=n.useMouse(e,s);return l.createElement($.Provider,{value:[F,S]},l.createElement(L.Provider,{value:[U,H]},l.createElement(W.Provider,{value:[z,O]},l.createElement("div",{ref:o,...j,role:v?void 0:"listbox",id:r,dir:D,style:a,tabIndex:n.getTabIndex(i,v,void 0),className:n.classNames("k-chip-list",{"k-rtl":"rtl"===D,"k-disabled":v,[`k-chip-list-${n.kendoThemeMaps.sizeMap[b]||b}`]:b},c),"aria-label":p,"aria-labelledby":u,"aria-describedby":d,"aria-orientation":"horizontal","aria-multiselectable":"multiple"===y},z.map(((e,t)=>l.createElement(w,{role:"option",dataItem:e,size:b,key:[A(e),t].join("-"),text:T(e),value:A(e),ariaLabel:e.ariaLabel,svgIcon:e.svgIcon||void 0})))))))})),J={id:s.string,className:s.string,tabIndex:s.number,data:s.any,defaultData:s.arrayOf(s.any),onDataChange:s.func,value:s.oneOfType([s.any,s.arrayOf(s.any)]),defaultValue:s.oneOfType([s.any,s.arrayOf(s.any)]),onChange:s.func,selection:s.oneOf(["single","none","multiple"]),textField:s.string,valueField:s.string,disabled:s.bool,dir:s.oneOf(["ltr","rtl"]),ariaLabelledBy:s.string,ariaDescribedBy:s.string,size:s.oneOf([null,"small","medium","large"])},Q={chip:q,size:"medium",disabled:!1,defaultValue:null,defaultData:[],dir:"ltr",selection:"none",textField:"text",valueField:"value",removable:"removable"};_.displayName="KendoReactChipList",_.propTypes=J;const X=l.forwardRef(((e,t)=>{const{className:s,disabled:o,text:r,icon:a,style:i,id:c,focused:d,tabIndex:u,index:p,dataItem:m,item:h,svgIcon:f,onDown:v,onClick:b,...g}=e,y=l.useRef(null),k=l.useCallback((()=>{y.current&&y.current.focus()}),[]),C=l.useCallback((()=>({element:y.current,focus:k})),[k]);l.useImperativeHandle(t,C);const I=l.useCallback((e=>{b&&void 0!==p&&!o&&b(e,p)}),[b,p]),x=l.useMemo((()=>n.classNames("k-fab-item",{"k-focus":d,"k-disabled":o},s)),[s,o,d]),E=h;return l.createElement("li",{ref:y,id:c,className:x,style:i,role:"menuitem",tabIndex:n.getTabIndex(u,o),"aria-disabled":o,"aria-label":`${r||""} floatingactionbutton item`,onClick:I,onMouseDown:v,onPointerDown:v,...g},E?l.createElement(E,{itemIndex:p,item:m}):l.createElement(l.Fragment,null,r&&l.createElement("span",{className:"k-fab-item-text"},r),a||f?l.createElement(n.IconWrap,{className:"k-fab-item-icon",name:a,icon:f}):null))}));X.propTypes={className:s.string,style:s.object,children:s.any,disabled:s.bool,focused:s.bool,index:s.number,icon:s.string,svgIcon:n.svgIconPropType,text:s.string,tabIndex:s.number,customProp:s.any},X.displayName="KendoFloatingActionButtonItem";const Y="16px",ee=e=>"number"==typeof e?e+"px":e,te=(e,t)=>{const s={horizontal:t?"right":"left",vertical:"bottom"};return"end"===e.horizontal&&(s.horizontal=t?"left":"right"),s},se=(e,t)=>{const s={horizontal:t?"right":"left",vertical:"top"};return"end"===e.horizontal&&(s.horizontal=t?"left":"right"),s},ne=(e,t)=>({rtl:{end:"k-text-left",start:"k-text-right"},ltr:{start:"k-text-left",end:"k-text-right"}}[e]["end"===t?"end":"start"]),oe=(e,t,s,n)=>{const o=t.horizontal,r=t.vertical;if(e.current){const a=s&&void 0!==s.x?ee(s.x):Y,i=s&&void 0!==s.x?`calc(50% + ${ee(s.x)})`:"50%",l=s&&void 0!==s.y?ee(s.y):Y,c=s&&void 0!==s.y?`calc(50% + ${ee(s.y)})`:"50%";e.current.style.setProperty(re(t,n),"center"===o?i:a),e.current.style.setProperty(ae(t),"middle"===r?c:l),n&&(("top"===r||"bottom"===r)&&"start"===o&&e.current.style.setProperty("left","unset"),"middle"===r&&"end"===o&&e.current.style.setProperty("right","unset"),"middle"===r&&"start"===o&&e.current.style.setProperty("left","unset"))}},re=(e,t)=>{const{horizontal:s}=e;return{end:t?"left":"right",center:"left",start:t?"right":"left"}[s||"end"]},ae=e=>({top:"top",middle:"top",bottom:"bottom"}[e.vertical||"bottom"]),ie=l.forwardRef(((e,t)=>{const{align:s=le.align,alignOffset:r,className:a,disabled:i,icon:c,svgIcon:d,iconClass:u,id:p,items:m,item:h,text:f,positionMode:v=le.positionMode,size:b=le.size,style:g,rounded:y=le.rounded,themeColor:k=le.themeColor,overlayStyle:C,tabIndex:I,accessKey:x,popupSettings:E={},modal:D,onClick:w,onItemClick:N,onFocus:B,onBlur:S,onKeyDown:K,onOpen:R,onClose:O,...M}=e,z=n.useZIndexContext(),F=z?z+2:100,P=l.useRef(null),A=l.useRef(null),T=l.useRef(null),$=l.useRef(null),L=l.useCallback((()=>{A.current&&A.current.focus()}),[]),W=l.useCallback((()=>({element:A.current,focus:L})),[L]);l.useImperativeHandle(P,W),l.useImperativeHandle(t,(()=>P.current));const[U,H]=l.useState(!1),[j,q]=l.useState(!1),[V,G]=l.useState(-1),Z=n.useId()+"-button-id",_=n.useDir(A,e.dir),J="rtl"===_,Q=n.useId()+"-list-id";l.useEffect((()=>{oe(A,s,r,J)}),[A,s,r,J]),l.useEffect((()=>{j&&A&&A.current&&A.current.focus()}),[j,A]);const Y=l.useCallback(((e,t)=>{m&&n.dispatchEvent(t?R:O,e,W(),void 0)}),[R,O,m]),ee=l.useCallback((e=>{!e.target||i||(!m&&w?n.dispatchEvent(w,e,W(),void 0):(H(!U),q(!0),G(U?-1:0),Y(e,!U)))}),[H,q,G,w,Y,U,m,i]),re=l.useCallback((e=>{q(!0),G(U?0:-1),B&&n.dispatchEvent(B,e,W(),void 0)}),[B,q,G]),ae=l.useCallback((e=>{q(!1),H(!1),G(-1),n.dispatchEvent(S,e,W(),void 0),U&&Y(e,!1)}),[S,q,H,G,Y]),ie=l.useCallback((e=>{e.preventDefault()}),[]),ce=l.useCallback(((e,t)=>{m&&(m[t].disabled||n.dispatchEvent(N,e,W(),{itemProps:m[t],itemIndex:t}))}),[N]),de=l.useCallback(((e,t)=>{!e.target||!m||(G(t),H(!1),ce(e,t),Y(e,!1))}),[G,H,ce,Y]),ue=l.useCallback((e=>{n.getActiveElement(document)===A.current&&e.preventDefault()}),[A]),pe=l.useCallback((e=>{const t=V,s=m?m.length:-1;if(e.altKey)return!U&&e.keyCode===n.Keys.down&&(e.preventDefault(),H(!0),G(0)),void(U&&e.keyCode===n.Keys.up&&(e.preventDefault(),H(!1),G(-1)));switch(e.keyCode){case n.Keys.enter:case n.Keys.space:t>=0&&ce(e,t),m||ee(e),e.preventDefault(),H(!U),G(U?-1:0);break;case n.Keys.esc:e.preventDefault(),H(!1),G(-1);break;case n.Keys.home:e.preventDefault(),G(0);break;case n.Keys.end:e.preventDefault(),G(s-1);break;case n.Keys.down:case n.Keys.right:e.preventDefault(),G(t+1>=s?0:t+1);break;case n.Keys.up:case n.Keys.left:e.preventDefault(),G(t-1<0?s-1:t-1)}n.dispatchEvent(K,e,W(),void 0)}),[K,V,G,J,H]),me=l.useMemo((()=>n.classNames("k-fab k-fab-solid",{"k-fab-sm":"small"===b,"k-fab-md":"medium"===b,"k-fab-lg":"large"===b,"k-disabled":i,"k-pos-absolute":"absolute"===v,"k-pos-fixed":"fixed"===v,"k-focus":j,[`k-rounded-${n.kendoThemeMaps.roundedMap[y]||y}`]:y,[`k-fab-solid-${k}`]:k},`k-${s.vertical}-${s.horizontal}`,a)),[k,b,y,i,v,s,j,a]),he=m&&m.map(((e,t)=>l.createElement(X,{...e,key:t,index:t,id:`${Q}-${t}`,disabled:i||e.disabled,focused:V===t,dataItem:e,item:h,className:n.classNames(e.className,ne(_||"ltr",s.horizontal)),onClick:de,onDown:ue}))),fe=!(!c&&!d||f),ve=(A.current?A.current.offsetWidth:0)/2-16;return l.createElement(n.ZIndexContext.Provider,{value:F},l.createElement(l.Fragment,null,l.createElement("button",{ref:A,id:p||Z,role:"button",type:"button","aria-disabled":i,"aria-expanded":m?U:void 0,"aria-haspopup":!!m,"aria-label":`${f||""} floatingactionbutton`,"aria-owns":m?Q:void 0,"aria-activedescendant":V>=0&&m?`${Q}-${V}`:void 0,tabIndex:n.getTabIndex(I,i),accessKey:x,dir:_,disabled:i,className:me,style:g,onClick:ee,onMouseDown:ie,onFocus:re,onBlur:ae,onKeyDown:pe,...M},c||d?l.createElement(n.IconWrap,{className:"k-fab-icon",name:c,icon:d}):u?l.createElement("span",{role:"presentation",className:u}):null,f&&l.createElement("span",{className:"k-fab-text"},f)),D&&U&&l.createElement("div",{className:"k-overlay",style:{zIndex:F,...C}}),l.createElement(o.Popup,{ref:$,anchor:A.current,show:U,animate:E.animate,popupClass:n.classNames("k-popup-transparent k-fab-popup",E.popupClass),anchorAlign:E.anchorAlign||te(s,J),popupAlign:E.popupAlign||se(s,J),style:{boxShadow:"none"}},l.createElement("ul",{ref:T,role:"menu","aria-labelledby":p,id:Q,className:n.classNames("k-fab-items",{"k-fab-items-bottom":"bottom"!==s.vertical,"k-fab-items-top":"bottom"===s.vertical}),style:{paddingLeft:fe?ve:void 0,paddingRight:fe?ve:void 0}},he))))}));ie.propTypes={className:s.string,style:s.object,id:s.string,dir:s.string,tabIndex:s.number,accessKey:s.string,disabled:s.bool,icon:s.string,svgIcon:n.svgIconPropType,iconClass:s.string,text:s.string,alignOffset:s.shape({x:s.oneOfType([s.number,s.string]).isRequired,y:s.oneOfType([s.number,s.string]).isRequired}),align:s.shape({vertical:s.oneOf(["top","middle","bottom"]).isRequired,horizontal:s.oneOf(["start","center","end"]).isRequired}),positionMode:s.oneOf(["absolute","fixed"]),size:s.oneOf([null,"small","medium","large"]),rounded:s.oneOf([null,"small","medium","large","full"]),themeColor:s.oneOf([null,"primary","secondary","tertiary","info","success","warning","error","dark","light","inverse"]),modal:s.bool,overlayStyle:s.object};const le={align:{vertical:"bottom",horizontal:"end"},size:"medium",rounded:"full",themeColor:"primary",positionMode:"fixed"};ie.displayName="KendoFloatingActionButton";const ce=n.withIdHOC(E);ce.displayName="KendoReactDropDownButton";const de=n.withIdHOC(k);de.displayName="KendoReactSplitButton",e.Button=c,e.ButtonGroup=u,e.Chip=q,e.ChipList=_,e.DropDownButton=ce,e.DropDownButtonClassComponent=E,e.DropDownButtonItem=I,e.FloatingActionButton=ie,e.FloatingActionButtonItem=X,e.SplitButton=de,e.SplitButtonClassComponent=k,e.SplitButtonItem=h,e.Toolbar=F,e.ToolbarItem=A,e.ToolbarSeparator=N,e.ToolbarSpacer=T,e.toolbarButtons=w}));
package/index.d.mts CHANGED
@@ -1806,6 +1806,18 @@ export declare interface SplitButtonProps extends KendoReactComponentBaseProps {
1806
1806
  * Defines an icon with a custom CSS class that will be rendered next to the main button text ([see example]({% slug icons_splitbutton %})).
1807
1807
  */
1808
1808
  iconClass?: string;
1809
+ /**
1810
+ * Sets an SVG icon or custom element before the content of the SplitButton. For the custom component, we recommend
1811
+ * using [Phrasing content](https://developer.mozilla.org/en-US/docs/Web/HTML/Content_categories#phrasing_content)
1812
+ * but there must be no [Interactive content](https://developer.mozilla.org/en-US/docs/Web/HTML/Content_categories#interactive_content).
1813
+ */
1814
+ startIcon?: React.ReactNode;
1815
+ /**
1816
+ * Sets an SVG icon or custom element after the content of the SplitButton. For the custom component, we recommend
1817
+ * using [Phrasing content](https://developer.mozilla.org/en-US/docs/Web/HTML/Content_categories#phrasing_content)
1818
+ * but there must be no [Interactive content](https://developer.mozilla.org/en-US/docs/Web/HTML/Content_categories#interactive_content).
1819
+ */
1820
+ endIcon?: React.ReactNode;
1809
1821
  /**
1810
1822
  * Defines the location of an image that will be displayed next to the main button text ([see example]({% slug icons_splitbutton %})).
1811
1823
  */
package/index.d.ts CHANGED
@@ -1806,6 +1806,18 @@ export declare interface SplitButtonProps extends KendoReactComponentBaseProps {
1806
1806
  * Defines an icon with a custom CSS class that will be rendered next to the main button text ([see example]({% slug icons_splitbutton %})).
1807
1807
  */
1808
1808
  iconClass?: string;
1809
+ /**
1810
+ * Sets an SVG icon or custom element before the content of the SplitButton. For the custom component, we recommend
1811
+ * using [Phrasing content](https://developer.mozilla.org/en-US/docs/Web/HTML/Content_categories#phrasing_content)
1812
+ * but there must be no [Interactive content](https://developer.mozilla.org/en-US/docs/Web/HTML/Content_categories#interactive_content).
1813
+ */
1814
+ startIcon?: React.ReactNode;
1815
+ /**
1816
+ * Sets an SVG icon or custom element after the content of the SplitButton. For the custom component, we recommend
1817
+ * using [Phrasing content](https://developer.mozilla.org/en-US/docs/Web/HTML/Content_categories#phrasing_content)
1818
+ * but there must be no [Interactive content](https://developer.mozilla.org/en-US/docs/Web/HTML/Content_categories#interactive_content).
1819
+ */
1820
+ endIcon?: React.ReactNode;
1809
1821
  /**
1810
1822
  * Defines the location of an image that will be displayed next to the main button text ([see example]({% slug icons_splitbutton %})).
1811
1823
  */
@@ -5,4 +5,4 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={name:"@progress/kendo-react-buttons",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate: 1741268978,version:"10.0.0-develop.3",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"};exports.packageMetadata=e;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={name:"@progress/kendo-react-buttons",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate: 1741611231,version:"10.0.0-develop.5",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"};exports.packageMetadata=e;
@@ -10,8 +10,8 @@ const e = {
10
10
  productName: "KendoReact",
11
11
  productCode: "KENDOUIREACT",
12
12
  productCodes: ["KENDOUIREACT"],
13
- publishDate: 1741268978,
14
- version: "10.0.0-develop.3",
13
+ publishDate: 1741611231,
14
+ version: "10.0.0-develop.5",
15
15
  licensingDocsUrl: "https://www.telerik.com/kendo-react-ui/components/my-license/"
16
16
  };
17
17
  export {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@progress/kendo-react-buttons",
3
- "version": "10.0.0-develop.3",
3
+ "version": "10.0.0-develop.5",
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",
@@ -26,8 +26,8 @@
26
26
  "sideEffects": false,
27
27
  "peerDependencies": {
28
28
  "@progress/kendo-licensing": "^1.5.0",
29
- "@progress/kendo-react-common": "10.0.0-develop.3",
30
- "@progress/kendo-react-popup": "10.0.0-develop.3",
29
+ "@progress/kendo-react-common": "10.0.0-develop.5",
30
+ "@progress/kendo-react-popup": "10.0.0-develop.5",
31
31
  "@progress/kendo-svg-icons": "^4.0.0",
32
32
  "react": "^16.8.2 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc",
33
33
  "react-dom": "^16.8.2 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc"
@@ -53,7 +53,7 @@
53
53
  "package": {
54
54
  "productName": "KendoReact",
55
55
  "productCode": "KENDOUIREACT",
56
- "publishDate": 1741268978,
56
+ "publishDate": 1741611231,
57
57
  "licensingDocsUrl": "https://www.telerik.com/kendo-react-ui/components/my-license/"
58
58
  }
59
59
  },