@progress/kendo-react-buttons 15.0.0-develop.2 → 15.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/codemods/v15/fab-theme-color.js +2 -0
- package/codemods/v15/index.js +2 -0
- package/codemods/v15/theme-color.js +2 -0
- package/codemods/v15/utils.js +2 -0
- package/dist/cdn/js/kendo-react-buttons.js +1 -1
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -2
- package/package.json +25 -5
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";const m=require("./utils.js"),d="@progress/kendo-react-buttons",g=["info","success","warning","error","dark","light","inverse"];function y(a,p){const n=p.jscodeshift,o=n(a.source);let l=!1;const f=m.findImportedName(n,o,"FloatingActionButton",d)||"FloatingActionButton";return o.find(n.JSXOpeningElement,{name:{type:"JSXIdentifier",name:f}}).forEach(c=>{const r=c.node.attributes||[],s=m.findAttribute(r,"themeColor");if(!s)return;const e=s.value;if(!e)return;let t=null;if(e.type==="StringLiteral"||e.type==="Literal"?t=e.value:e.type==="JSXExpressionContainer"&&(e.expression.type==="StringLiteral"||e.expression.type==="Literal")&&(t=e.expression.value),t&&g.includes(t)){const u=r.indexOf(s);u!==-1&&r.splice(u,1);const i=c.parent.node;i.comments=i.comments||[],i.comments.push(n.commentBlock(` TODO: themeColor='${t}' is no longer supported for FloatingActionButton in v15. Valid values: 'base' | 'primary' | 'secondary' | 'tertiary'. `)),l=!0}}),l?o.toSource():a.source}module.exports=y;
|
|
2
|
+
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZmFiLXRoZW1lLWNvbG9yLmpzIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wYWNrYWdlcy9idXR0b25zL2NvZGVtb2RzL3YxNS9mYWItdGhlbWUtY29sb3IudHMiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgQVBJLCBGaWxlSW5mb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NBQVNjLENBQVksRUFBRyxDQUN2RCxNQUFNQyxFQUFNTCxFQUFNLFFBQVFDLENBQWMsRUFDcENJLElBQVEsSUFDUkwsRUFBTSxPQUFPSyxFQUFLLENBQUMsRUFHdkIsTUFBTUMsRUFBYVAsRUFBSyxPQUFPLEtBQy9CTyxFQUFXLFNBQVdBLEVBQVcsVUFBWSxDQUFBLEVBQzdDQSxFQUFXLFNBQVMsS0FDaEJaLEVBQUUsYUFDRSxzQkFBc0JVLENBQVkseUhBQUEsQ0FDdEMsRUFFSlIsRUFBYSxFQUNqQixDQUNKLENBQUMsRUFFTUEsRUFBYUQsRUFBSyxTQUFBLEVBQWFILEVBQUssTUFDL0MifQ==
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./theme-color.js"),o=require("./fab-theme-color.js");exports.ThemeColor=e;exports.FabThemeColor=o;
|
|
2
|
+
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VzIjpbXSwic291cmNlc0NvbnRlbnQiOltdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIn0=
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";const m=require("./utils.js"),E="@progress/kendo-react-buttons",S=["Button","DropDownButton","SplitButton"],h=["dark","light"];function y(a,f){const n=f.jscodeshift,r=n(a.source);let l=!1;return S.forEach(c=>{const d=m.findImportedName(n,r,c,E)||c;r.find(n.JSXOpeningElement,{name:{type:"JSXIdentifier",name:d}}).forEach(u=>{const o=u.node.attributes||[],s=m.findAttribute(o,"themeColor");if(!s)return;const e=s.value;if(!e)return;let t=null;if(e.type==="StringLiteral"||e.type==="Literal"?t=e.value:e.type==="JSXExpressionContainer"&&(e.expression.type==="StringLiteral"||e.expression.type==="Literal")&&(t=e.expression.value),t&&h.includes(t)){const p=o.indexOf(s);p!==-1&&o.splice(p,1);const i=u.parent.node;i.comments=i.comments||[],i.comments.push(n.commentBlock(` TODO: themeColor='${t}' is no longer supported in v15. Valid values: 'base' | 'primary' | 'secondary' | 'tertiary' | 'info' | 'success' | 'warning' | 'error' | 'inverse'. `)),l=!0}})}),l?r.toSource():a.source}module.exports=y;
|
|
2
|
+
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGhlbWUtY29sb3IuanMiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3BhY2thZ2VzL2J1dHRvbnMvY29kZW1vZHMvdjE1L3RoZW1lLWNvbG9yLnRzIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IEFQSSwgRmlsZUluZm8sIEpTQ29kZXNoaWZ0IH0gZnJvbSAnanNjb2Rlc2hpZnQnO1xuaW1wb3J0IHsgZmluZEltcG9ydGVkTmFtZSwgZmluZEF0dHJpYnV0ZSB9IGZyb20gJy4vdXRpbHMnO1xuXG5jb25zdCBQQUNLQUdFX1NPVVJDRSA9ICdAcHJvZ3Jlc3Mva2VuZG8tcmVhY3QtYnV0dG9ucyc7XG5cbmNvbnN0IENPTVBPTkVOVFMgPSBbJ0J1dHRvbicsICdEcm9wRG93bkJ1dHRvbicsICdTcGxpdEJ1dHRvbiddO1xuY29uc3QgUkVNT1ZFRF9WQUxVRVMgPSBbJ2RhcmsnLCAnbGlnaHQnXTtcblxuLyoqXG4gKiBUaGlzIGNvZGVtb2QgZGV0ZWN0cyB1c2FnZSBvZiByZW1vdmVkIHRoZW1lQ29sb3IgdmFsdWVzICgnZGFyaycsICdsaWdodCcpIG9uXG4gKiBCdXR0b24sIERyb3BEb3duQnV0dG9uLCBhbmQgU3BsaXRCdXR0b24gY29tcG9uZW50cyBhbmQgcmVtb3ZlcyB0aGUgcHJvcCB3aXRoIGFcbiAqIFRPRE8gY29tbWVudCBpbmRpY2F0aW5nIHRoZSB2YWx1ZSBpcyBubyBsb25nZXIgc3VwcG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AgICAgICAgY29uc3QgdmFsdWUgPSB0aGVtZUNvbG9yQXR0ci52YWx1ZTtcbiAgICAgICAgICAgIGlmICghdmFsdWUpIHtcbiAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGxldCBsaXRlcmFsVmFsdWU6IHN0cmluZyB8IG51bGwgPSBudWxsO1xuXG4gICAgICAgICAgICBpZiAodmFsdWUudHlwZSA9PT0gJ1N0cmluZ0xpdGVyYWwnIHx8IHZhbHVlLnR5cGUgPT09ICdMaXRlcmFsJykge1xuICAgICAgICAgICAgICAgIGxpdGVyYWxWYWx1ZSA9IHZhbHVlLnZhbHVlO1xuICAgICAgICAgICAgfSBlbHNlIGlmIChcbiAgICAgICAgICAgICAgICB2YWx1ZS50eXBlID09PSAnSlNYRXhwcmVzc2lvbkNvbnRhaW5lcicgJiZcbiAgICAgICAgICAgICAgICAodmFsdWUuZXhwcmVzc2lvbi50eXBlID09PSAnU3RyaW5nTGl0ZXJhbCcgfHwgdmFsdWUuZXhwcmVzc2lvbi50eXBlID09PSAnTGl0ZXJhbCcpXG4gICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICBsaXRlcmFsVmFsdWUgPSB2YWx1ZS5leHByZXNzaW9uLnZhbHVlO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpZiAobGl0ZXJhbFZhbHVlICYmIFJFTU9WRURfVkFMVUVTLmluY2x1ZGVzKGxpdGVyYWxWYWx1ZSkpIHtcbiAgICAgICAgICAgICAgICAvLyBSZW1vdmUgdGhlIGF0dHJpYnV0ZVxuICAgICAgICAgICAgICAgIGNvbnN0IGlkeCA9IGF0dHJzLmluZGV4T2YodGhlbWVDb2xvckF0dHIpO1xuICAgICAgICAgICAgICAgIGlmIChpZHggIT09IC0xKSB7XG4gICAgICAgICAgICAgICAgICAgIGF0dHJzLnNwbGljZShpZHgsIDEpO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIC8vIEFkZCBhIGNvbW1lbnQgdG8gdGhlIEpTWCBlbGVtZW50XG4gICAgICAgICAgICAgICAgY29uc3QganN4RWxlbWVudCA9IHBhdGgucGFyZW50Lm5vZGU7XG4gICAgICAgICAgICAgICAganN4RWxlbWVudC5jb21tZW50cyA9IGpzeEVsZW1lbnQuY29tbWVudHMgfHwgW107XG4gICAgICAgICAgICAgICAganN4RWxlbWVudC5jb21tZW50cy5wdXNoKFxuICAgICAgICAgICAgICAgICAgICBqLmNvbW1lbnRCbG9jayhcbiAgICAgICAgICAgICAgICAgICAgICAgIGAgVE9ETzogdGhlbWVDb2xvcj0nJHtsaXRlcmFsVmFsdWV9JyBpcyBubyBsb25nZXIgc3VwcG9ydGVkIGluIHYxNS4gVmFsaWQgdmFsdWVzOiAnYmFzZScgfCAncHJpbWFyeScgfCAnc2Vjb25kYXJ5JyB8ICd0ZXJ0aWFyeScgfCAnaW5mbycgfCAnc3VjY2VzcycgfCAnd2FybmluZycgfCAnZXJyb3InIHwgJ2ludmVyc2UnLiBgXG4gICAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgIGhhc0NoYW5nZXMgPSB0cnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICB9KTtcbiAgICB9KTtcblxuICAgIHJldHVybiBoYXNDaGFuZ2VzID8gcm9vdC50b1NvdXJjZSgpIDogZmlsZS5zb3VyY2U7XG59XG4iXSwibmFtZXMiOlsiUEFDS0FHRV9TT1VSQ0UiLCJDT01QT05FTlRTIiwiUkVNT1ZFRF9WQUxVRVMiLCJ0cmFuc2Zvcm1lciIsImZpbGUiLCJhcGkiLCJqIiwicm9vdCIsImhhc0NoYW5nZXMiLCJjb21wb25lbnROYW1lIiwibG9jYWxOYW1lIiwiZmluZEltcG9ydGVkTmFtZSIsInBhdGgiLCJhdHRycyIsInRoZW1lQ29sb3JBdHRyIiwiZmluZEF0dHJpYnV0ZSIsInZhbHVlIiwibGl0ZXJhbFZhb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JMLEVBQU0sT0FBT0ssRUFBSyxDQUFDLEVBSXZCLE1BQU1DLEVBQWFQLEVBQUssT0FBTyxLQUMvQk8sRUFBVyxTQUFXQSxFQUFXLFVBQVksQ0FBQSxFQUM3Q0EsRUFBVyxTQUFTLEtBQ2hCYixFQUFFLGFBQ0Usc0JBQXNCVyxDQUFZLHVKQUFBLENBQ3RDLEVBRUpULEVBQWEsRUFDakIsQ0FDSixDQUFDLENBQ0wsQ0FBQyxFQUVNQSxFQUFhRCxFQUFLLFNBQUEsRUFBYUgsRUFBSyxNQUMvQyJ9
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=(e,n)=>e.find(t=>t.type==="JSXAttribute"&&t.name.name===n),m=(e,n)=>{const t=e?.findIndex(r=>r.type==="JSXAttribute"&&r.name.name===n);return t!==-1?(e.splice(t,1),!0):!1},c=(e,n,t,r)=>{const i=n.find(e.ImportDeclaration,{source:{value:r}});if(i.size()>0){const o=i.find(e.ImportSpecifier,{imported:{name:t}});if(o.size()>0)return o.get(0).node.local.name}return null};exports.findAttribute=a;exports.findImportedName=c;exports.removeAttribute=m;
|
|
2
|
+
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXRpbHMuanMiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3BhY2thZ2VzL2J1dHRvbnMvY29kZW1vZHMvdjE1L3V0aWxzLnRzIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IENvbGxlY3Rpb24sIEpTQ29kZXNoaWZ0IH0gZnJvbSAnanNjb2Rlc2hpZnQnO1xuXG5leHBvcnQgY29uc3QgZmluZEF0dHJpYnV0ZSA9IChhdHRyaWJ1dGVzOiBhbnlbXSwgYXR0cmlidXRlTmFtZTogc3RyaW5nKSA9PiB7XG4gICAgcmV0dXJuIGF0dHJpYnV0ZXMuZmluZCgoYXR0cjogYW55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BT0csQ0FBQSxDQUFPLENBQzNCLEVBRUQsR0FBSUMsRUFBa0IsS0FBQSxFQUFTLEVBQUcsQ0FDOUIsTUFBTUMsRUFBWUQsRUFBa0IsS0FBS0osRUFBRSxnQkFBaUIsQ0FDeEQsU0FBVSxDQUFFLEtBQU1FLENBQUEsQ0FBYSxDQUNsQyxFQUVELEdBQUlHLEVBQVUsS0FBQSxFQUFTLEVBRW5CLE9BRGtCQSxFQUFVLElBQUksQ0FBQyxFQUFFLEtBQUssTUFBTSxJQUd0RCxDQUVBLE9BQU8sSUFDWCJ9
|
|
@@ -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-react-intl"),require("@progress/kendo-svg-icons"),require("@progress/kendo-webspeech-common"),require("@progress/kendo-smartpaste-common")):"function"==typeof define&&define.amd?define(["exports","react","prop-types","@progress/kendo-react-common","@progress/kendo-react-popup","@progress/kendo-react-intl","@progress/kendo-svg-icons","@progress/kendo-webspeech-common","@progress/kendo-smartpaste-common"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).KendoReactButtons={},e.React,e.PropTypes,e.KendoReactCommon,e.KendoReactPopup,e.KendoReactIntl,e.KendoSvgIcons,e.KendoWebspeechCommon,e.KendoSmartpasteCommon)}(this,function(e,t,n,s,o,r,a,l,i){"use strict";function c(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(n){if("default"!==n){var s=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,s.get?s:{enumerable:!0,get:function(){return e[n]}})}}),t.default=e,Object.freeze(t)}var d=c(t);const u=d.forwardRef((e,t)=>{const{children:n,togglable:o,dir:r,disabled:a,selected:l,icon:i,iconClass:c,svgIcon:u,imageUrl:m,imageAlt:h,className:f,startIcon:v,endIcon:g,onClick:b,size:y=p.size,rounded:k=p.rounded,fillMode:C=p.fillMode,themeColor:I=p.themeColor,ariaPressed:x,iconSize:w,...E}=e,N=d.useRef(void 0),D=d.useRef(null),S=d.useRef(null),[B,K]=d.useState(!0===o&&!0===l),R=void 0!==u||void 0!==i||void 0!==c||void 0!==m,M=void 0!==n,O=s.useUnstyled(),z=e.unstyled||O,F=z&&z.uButton;let P=B;P=void 0===N.current?B:N.current,d.useImperativeHandle(t,()=>{const e={element:D.current,selected:P};return S.current=e,e}),s.useWebMcpRegister("button",S,e,e.webMcp),d.useMemo(()=>{o&&void 0!==l&&l!==B&&K(l)},[o,l]),d.useEffect(()=>{N.current=void 0},[B]);const T=function({imageUrl:e,name:t,iconClass:n,svgIcon:o,imageAlt:r,buttonClasses:a,iconSize:l}){return e?d.createElement("img",{role:"presentation",className:s.classNames(s.uButton.icon({c:a})),alt:r,src:e}):t||o?d.createElement(s.IconWrap,{className:s.classNames(s.uButton.icon({c:a})),name:t,icon:o,size:l}):n?d.createElement("span",{role:"presentation",className:s.classNames(s.uButton.icon({c:a}),n)}):null}({name:i,svgIcon:u,iconClass:c,imageUrl:m,imageAlt:h,buttonClasses:F,iconSize:w}),A=e=>d.cloneElement(e,{className:s.classNames(s.uButton.icon({c:F}),e.props.className)}),L=d.useMemo(()=>o?B:x||void 0,[o,B,x]);return d.createElement("button",{ref:D,"aria-pressed":L,...E,dir:r,disabled:a,onClick:e=>{o&&void 0===l&&(N.current=!B,K(!B)),b&&b.call(void 0,e)},className:s.classNames(s.uButton.wrapper({c:F,isRtl:"rtl"===r,selected:B,disabled:a,size:y,fillMode:C,rounded:k,themeColor:I,iconButton:!M&&R}),f)},v&&A(v),T,n&&d.createElement("span",{className:s.classNames(s.uButton.text({c:F}))},n),g&&A(g))}),p={size:void 0,rounded:void 0,fillMode:void 0,themeColor:void 0};u.displayName="KendoReactButton",u.propTypes={children:n.node,selected:n.bool,togglable:n.bool,icon:n.string,svgIcon:s.svgIconPropType,iconClass:n.string,imageUrl:n.string,imageAlt:n.string,size:n.oneOf(["xsmall","xs","small","medium","large"]),rounded:n.oneOf(["small","medium","large","full","none"]),fillMode:n.oneOf(["flat","link","outline","solid","clear"]),themeColor:n.oneOf(["base","primary","secondary","tertiary","info","success","warning","error","inverse"])};const m=e=>{const{children:t,className:n,dir:o,disabled:r,width:a}=e,l=s.useUnstyled(),i=e.unstyled||l,c=i&&i.uButtonGroup,u=(e,t)=>{const n={...a?{width:a}:{},...e.props.style||{}},s=r||e.props.disabled,o={...e.props,...t?{className:t}:{},...Object.keys(n).length?{style:n}:{},...void 0!==s?{disabled:s}:{}};return d.Children.count(e.props.children)>0?d.cloneElement(e,o,e.props.children):d.cloneElement(e,o)},p=d.useRef(null),m=(e=>{const t=d.Children.count(e),n=void 0!==o?"rtl"===o:p.current&&"rtl"===getComputedStyle(p.current).direction||!1;return d.Children.map(e,(e,o)=>{if(d.isValidElement(e)){const r=o===t-1,a=n,l=s.classNames(e.props.className,s.uButtonGroup.position({c:c,start:a?r:0===o,end:a?0===o:r}));return u(e,l)}return e})})(t),h=s.classNames(s.uButtonGroup.wrapper({c:c,stretched:!!a,disabled:r}),n),f={className:h,style:{width:`${a}`},dir:o,role:"group","aria-disabled":r};return d.createElement("div",{ref:p,...f,className:h},m)};m.propTypes={children:n.oneOfType([n.arrayOf(n.element),n.element]),className:n.string,disabled:n.bool,width:n.string,dir:n.string};const h=e=>{const t=s.useUnstyled(),n=e.unstyled||t,o=n&&n.uDropDownButton,r=d.useCallback(t=>{e.onClick(t,e.index)},[e]),a=e.dataItem.render||e.item||(void 0===e.item?e.render:null),l=void 0!==e.dataItem.text?e.dataItem.text:e.textField?e.dataItem[e.textField]:e.dataItem,i=d.createElement("li",{id:e.id,className:s.classNames(s.uDropDownButton.li({c:o,focused:e.focused}),e.className),tabIndex:-1,onClick:r,onMouseDown:e.onDown,onPointerDown:e.onDown,role:"menuitem","aria-disabled":e.dataItem.disabled||void 0},d.createElement("span",{tabIndex:-1,className:s.classNames(s.uDropDownButton.link({c:o,selected:e.dataItem.selected,disabled:e.dataItem.disabled})),key:"icon"},a?d.createElement(a,{item:e.dataItem,itemIndex:e.index}):d.createElement(d.Fragment,null,(e.dataItem.icon||e.dataItem.iconClass||e.dataItem.svgIcon)&&d.createElement(s.IconWrap,{className:e.dataItem.iconClass,name:e.dataItem.icon,icon:e.dataItem.svgIcon}),e.dataItem.imageUrl&&d.createElement("img",{role:"presentation",alt:"",src:e.dataItem.imageUrl,className:"k-icon"}),l&&d.createElement("span",{className:"k-menu-link-text"},l))));return void 0!==e.item&&void 0!==e.render?e.render.call(void 0,i,e):i};h.displayName="KendoReactButtonItem";const f=class extends d.Component{render(){return null}};f.propTypes={text:n.string,icon:n.string,iconClass:n.string,imageUrl:n.string,disabled:n.bool,render:n.any};let v=f;const g=(e,t,n,o)=>{if(n)return e;const r=Math.min(o-1,Math.max(0,e));switch(t){case s.Keys.enter:case s.Keys.space:case s.Keys.esc:return-1;case s.Keys.up:case s.Keys.left:return r-1<0?o-1:r-1;case s.Keys.down:case s.Keys.right:return r+1>=o?0:r+1;case s.Keys.home:return 0;case s.Keys.end:return o-1;default:return e}};function b(e){const t={horizontal:"left",vertical:"bottom"};return e&&(t.horizontal="right"),t}function y(e){const t={horizontal:"left",vertical:"top"};return e&&(t.horizontal="right"),t}const k=Object.freeze({name:"@progress/kendo-react-buttons",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate:0,version:"15.0.0-develop.2",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"}),C="speechToTextButton.ariaLabel",I="speechToTextButton.title",x="splitButton.toggleDropdown",w={[C]:"Start speech recognition",[I]:"Speech to Text Button",[x]:"Toggle dropdown"},E=class extends d.Component{constructor(e){super(e),this.state={focused:!1,focusedIndex:-1,opened:!1},this.wrapper=null,this.mainButton=null,this.list=null,this.skipFocus=!1,this.buttonsData=[],this.showLicenseWatermark=!1,this.onKeyDown=e=>{const{focusedIndex:t}=this.state;if(e.altKey)return void(this.opened||e.keyCode!==s.Keys.down?this.opened&&e.keyCode===s.Keys.up&&(e.preventDefault(),this.setState({focusedIndex:-1}),this.setOpen(!1,e)):(e.preventDefault(),this.setState({focusedIndex:0}),this.setOpen(!0,e)));let n;if(e.keyCode===s.Keys.enter||e.keyCode===s.Keys.space){if(e.preventDefault(),this.dispatchClickEvent(e,t),t>=0){n={focusedIndex:this.opened?-1:0};const t=!this.opened;this.setOpen(t,e)}}else if(this.opened&&e.keyCode===s.Keys.esc)return this.setState({focusedIndex:-1}),void this.setOpen(!1,e);if(this.opened){const o=g(t,e.keyCode,e.altKey,this.buttonsData.length);o!==t&&(n=n||{},n.focusedIndex=o);const r=e.keyCode===s.Keys.up||e.keyCode===s.Keys.down||e.keyCode===s.Keys.left||e.keyCode===s.Keys.right;!e.altKey&&(r||e.keyCode===s.Keys.home||e.keyCode===s.Keys.end)&&e.preventDefault()}n&&this.setState(n)},this.switchFocus=e=>{this.skipFocus=!0,e(),window.setTimeout(()=>this.skipFocus=!1,0)},this.onFocus=e=>{this.skipFocus||(s.dispatchEvent(this.props.onFocus,e,this,void 0),this.setState({focused:!0}))},this.setOpen=(e,t)=>{this.opened!==e&&(this.openedDuringOnChange=e,this.setState({opened:e}),t?this.dispatchPopupEvent(t,e):this.openedDuringOnChange=void 0)},this.onItemClick=(e,t)=>{this.opened&&this.setState({focusedIndex:0}),this.dispatchClickEvent(e,t),this.setOpen(!1,e)},this.onBlur=e=>{this.skipFocus||(this.setState({focused:!1,focusedIndex:-1}),s.dispatchEvent(this.props.onBlur,e,this,void 0),setTimeout(()=>{this.setOpen(!1,e)},0))},this.onPopupClose=e=>{var t;const n=s.getActiveElement(document);this.element&&this.element.removeAttribute("tabindex"),(n===this.list||null!=(t=this.list)&&t.contains(n))&&this.switchFocus(()=>{this.element&&this.element.focus({preventScroll:!0})}),this.props.popupSettings&&this.props.popupSettings.onClose&&this.props.popupSettings.onClose.call(void 0,e)},this.listRef=e=>{this.list=e,e&&this.state.focused&&this.switchFocus(()=>{e.focus({preventScroll:!0}),this.element&&(this.element.tabIndex=-1)})},this.onSplitPartClick=e=>{if(this.buttonsData.length){const t=!this.opened;this.setState({focusedIndex:t?0:-1,focused:!0}),this.setOpen(t,e)}},this.onDownSplitPart=e=>{e.preventDefault();const t=s.getActiveElement(document);this.element&&t!==this.element&&t!==this.list&&this.element.focus()},this.onItemDown=e=>{s.getActiveElement(document)===this.list&&e.preventDefault()},this.dispatchPopupEvent=(e,t)=>{s.dispatchEvent(t?this.props.onOpen:this.props.onClose,e,this,void 0),this.openedDuringOnChange=void 0},this.showLicenseWatermark=!s.validatePackage(k,{component:"SplitButton"}),this.licenseMessage=s.getLicenseMessage(k)}get guid(){return this.props.id?this.props.id+"-accessibility-id":this.props.id}get opened(){return void 0!==this.openedDuringOnChange?this.openedDuringOnChange:void 0===this.props.opened?this.state.opened:this.props.opened}render(){this.buttonsData=this.props.items||d.Children.toArray(this.props.children).filter(e=>e&&e.type===v).map(e=>e.props);const e=this.isRtl(),t=e?"rtl":void 0,n=r.provideLocalizationService(this).toLanguageString(x,w[x]),{id:o,style:l,tabIndex:i,disabled:c}=this.props;return d.createElement(d.Fragment,null,d.createElement("div",{id:o,style:l,className:s.classNames("k-split-button","k-button-group",{"k-focus":this.state.focused},this.props.rounded&&`k-rounded-${s.kendoThemeMaps.roundedMap[this.props.rounded]}`,this.props.className),onKeyDown:this.onKeyDown,onFocus:this.onFocus,onBlur:this.onBlur,dir:t,ref:e=>{this.wrapper=e}},d.createElement(u,{ref:e=>{this.mainButton=e&&e.element},type:"button",size:this.props.size,rounded:this.props.rounded,fillMode:this.props.fillMode,themeColor:this.props.themeColor,onClick:e=>this.onItemClick(e,-1),disabled:c||void 0,tabIndex:i,accessKey:this.props.accessKey,className:this.props.buttonClass,icon:this.props.icon,svgIcon:this.props.svgIcon,iconClass:this.props.iconClass,startIcon:this.props.startIcon,endIcon:this.props.endIcon,imageUrl:this.props.imageUrl,dir:t,"aria-disabled":c,"aria-label":this.props.ariaLabel,id:"button-"+this.guid,title:this.props.title},this.props.text),d.createElement(u,{type:"button",size:this.props.size,rounded:this.props.rounded,fillMode:this.props.fillMode,themeColor:this.props.themeColor,icon:"chevron-down",svgIcon:a.chevronDownIcon,className:"k-split-button-arrow",disabled:c||void 0,tabIndex:-1,onClick:this.onSplitPartClick,onMouseDown:this.onDownSplitPart,onPointerDown:this.onDownSplitPart,dir:t,"aria-label":n,"aria-expanded":this.opened?"true":"false","aria-controls":this.opened?this.guid:void 0}),this.renderPopup(e)),this.showLicenseWatermark&&d.createElement(s.WatermarkOverlay,{message:this.licenseMessage}))}componentDidMount(){(void 0===this.props.dir&&this.isRtl()||this.opened)&&this.forceUpdate()}get element(){return this.mainButton}dispatchClickEvent(e,t){this.isItemDisabled(t)||(-1===t?s.dispatchEvent(this.props.onButtonClick,e,this,void 0):s.dispatchEvent(this.props.onItemClick,e,this,{item:this.buttonsData[t],itemIndex:t}))}renderPopup(e){const{popupSettings:t={}}=this.props,{focusedIndex:n}=this.state;return d.createElement(o.Popup,{anchor:this.wrapper,show:this.opened,animate:t.animate,popupClass:s.classNames("k-menu-popup",t.popupClass),anchorAlign:t.anchorAlign||b(e),popupAlign:t.popupAlign||y(e),style:e?{direction:"rtl"}:void 0,onClose:this.onPopupClose},d.createElement("ul",{role:"menu",id:this.guid,tabIndex:-1,ref:this.listRef,"aria-activedescendant":n>=0?`${this.guid}-${n}`:void 0,className:s.classNames("k-menu-group",{[`k-menu-group-${s.kendoThemeMaps.sizeMap[this.props.size]||this.props.size}`]:this.props.size})},this.renderChildItems()))}renderChildItems(){const{item:e,itemRender:t,textField:n}=this.props;return this.buttonsData.length>0?this.buttonsData.map((o,r)=>d.createElement(h,{className:s.classNames("k-menu-item",{"k-first":0===r},{"k-last":r===this.buttonsData.length-1}),dataItem:o,textField:n,focused:this.state.focusedIndex===r,onClick:this.onItemClick,onDown:this.onItemDown,render:t,item:e,key:r,index:r,id:`${this.guid}-${r}`})):null}isItemDisabled(e){return this.buttonsData[e]?this.buttonsData[e].disabled:this.props.disabled}isRtl(){return void 0!==this.props.dir?"rtl"===this.props.dir:!!this.wrapper&&"rtl"===getComputedStyle(this.wrapper).direction}};E.propTypes={accessKey:n.string,ariaLabel:n.string,title:n.string,onButtonClick:n.func,onFocus:n.func,onBlur:n.func,onItemClick:n.func,onOpen:n.func,onClose:n.func,text:n.string,items:n.arrayOf(n.any),textField:n.string,tabIndex:n.number,disabled:n.bool,icon:n.string,svgIcon:s.svgIconPropType,imageUrl:n.string,popupSettings:n.object,itemRender:n.any,item:n.func,className:n.string,buttonClass:n.string,dir:n.string,size:n.oneOf(["small","medium","large"]),rounded:n.oneOf(["small","medium","large","full","none"]),fillMode:n.oneOf(["flat","link","outline","solid","clear"]),themeColor:n.oneOf(["base","primary","secondary","tertiary","info","success","warning","error","inverse"])},E.defaultProps={size:void 0,rounded:void 0,fillMode:void 0,themeColor:void 0};let N=E;r.registerForLocalization(N);const D=class extends d.Component{render(){return null}};D.propTypes={text:n.string,icon:n.string,iconClass:n.string,imageUrl:n.string,selected:n.bool,disabled:n.bool,render:n.any};let S=D;const B=class extends d.Component{constructor(e){super(e),this.state={opened:!1,focused:!1,focusedIndex:-1},this.mainButton=null,this.list=null,this.skipFocus=!1,this.showLicenseWatermark=!1,this.buttonsData=[],this.onKeyDown=e=>{const{focusedIndex:t}=this.state;if(e.altKey)return void(this.opened||e.keyCode!==s.Keys.down?this.opened&&e.keyCode===s.Keys.up&&(e.preventDefault(),this.setState({focusedIndex:-1}),this.setOpen(!1,e)):(e.preventDefault(),this.setOpen(!0,e),this.setState({focusedIndex:0})));const n={...this.state};if(e.keyCode===s.Keys.enter||e.keyCode===s.Keys.space){e.preventDefault(),t>=0&&this.dispatchClickEvent(e,t);const n=!this.opened;return this.setState({focused:!0,focusedIndex:n?0:-1}),void this.setOpen(n,e)}if(this.opened&&e.keyCode===s.Keys.esc)return this.setState({focusedIndex:-1}),void this.setOpen(!1,e);if(this.opened){const o=g(t,e.keyCode,e.altKey,this.buttonsData.length);n.focusedIndex=o;const r=e.keyCode===s.Keys.up||e.keyCode===s.Keys.down||e.keyCode===s.Keys.left||e.keyCode===s.Keys.right;!e.altKey&&(r||e.keyCode===s.Keys.home||e.keyCode===s.Keys.end)&&e.preventDefault()}this.setState(n)},this.switchFocus=e=>{this.skipFocus=!0,e(),window.setTimeout(()=>this.skipFocus=!1,0)},this.handleFocus=e=>{this.skipFocus||(this.setState({focused:!0,focusedIndex:this.opened?0:-1}),s.dispatchEvent(this.props.onFocus,e,this,void 0))},this.handleButtonBlur=e=>{this.opened||(this.setState({focused:!1}),s.dispatchEvent(this.props.onBlur,e,this,void 0))},this.handleMenuBlur=e=>{this.skipFocus||(this.setState({focused:!1,focusedIndex:-1}),s.dispatchEvent(this.props.onBlur,e,this,void 0),setTimeout(()=>{this.setOpen(!1,e)},0))},this.setOpen=(e,t)=>{this.opened!==e&&(this.openedDuringOnChange=e,this.setState({opened:e}),t?this.dispatchPopupEvent(t,e):this.openedDuringOnChange=void 0)},this.onItemClick=(e,t)=>{this.setState({focusedIndex:-1}),this.dispatchClickEvent(e,t),this.setOpen(!1,e)},this.onItemDown=e=>{s.getActiveElement(document)===this.list&&e.preventDefault()},this.mouseDown=e=>{e.preventDefault();const t=s.getActiveElement(document);this.element&&t!==this.element&&t!==this.list&&this.element.focus()},this.onPopupClose=e=>{var t;const n=s.getActiveElement(document);this.element&&this.element.removeAttribute("tabindex"),(n===this.list||null!=(t=this.list)&&t.contains(n))&&this.switchFocus(()=>{this.element&&this.element.focus({preventScroll:!0})}),this.props.popupSettings&&this.props.popupSettings.onClose&&this.props.popupSettings.onClose.call(void 0,e)},this.listRef=e=>{this.list=e,e&&this.state.focused&&this.switchFocus(()=>{e.focus({preventScroll:!0}),this.element&&(this.element.tabIndex=-1)})},this.onClickMainButton=e=>{if(s.dispatchEvent(this.props.onClick,e,this,void 0),!this.buttonsData.length)return;const t=!this.opened;this.setState({focused:!0,focusedIndex:t?0:-1}),this.setOpen(t,e)},this.dispatchPopupEvent=(e,t)=>{s.dispatchEvent(t?this.props.onOpen:this.props.onClose,e,this,void 0),this.openedDuringOnChange=void 0},this.showLicenseWatermark=!s.validatePackage(k,{component:"DropDownButton"}),this.licenseMessage=s.getLicenseMessage(k)}get guid(){return this.props.id+"-accessibility-id"}get opened(){return void 0!==this.openedDuringOnChange?this.openedDuringOnChange:void 0===this.props.opened?this.state.opened:this.props.opened}render(){const e=this.isRtl(),t=this.props.unstyled&&this.props.unstyled.uDropDownButton,n=e?"rtl":void 0,{id:o,style:r,tabIndex:a,disabled:l,size:i,rounded:c,fillMode:p,themeColor:m,ariaLabel:h,title:f,accessKey:v,icon:g,svgIcon:b,iconClass:y,buttonClass:k,className:C,imageUrl:I,startIcon:x,endIcon:w}=this.props;return this.buttonsData=this.props.items||d.Children.toArray(this.props.children).filter(e=>e&&e.type===S).map(e=>e.props),d.createElement(d.Fragment,null,d.createElement(u,{id:o,size:i,style:r,rounded:c,fillMode:p,themeColor:m,onClick:this.onClickMainButton,onMouseDown:this.mouseDown,onKeyDown:this.onKeyDown,onFocus:this.handleFocus,onBlur:this.handleButtonBlur,"aria-disabled":l?"true":void 0,tabIndex:a,accessKey:v,icon:g,svgIcon:b,iconClass:y,className:s.classNames(k,C,s.uDropDownButton.wrapper({c:t,focused:this.state.focused,disabled:l})),imageUrl:I,dir:n,ref:e=>{this.mainButton=(null==e?void 0:e.element)||null},type:"button","aria-expanded":this.opened?"true":"false","aria-label":h||(b||g||y?"Menu":void 0),"aria-controls":this.opened?this.guid:void 0,title:f,startIcon:x,endIcon:w},this.props.text),this.showLicenseWatermark&&d.createElement(s.WatermarkOverlay,{message:this.licenseMessage}),this.renderPopup(e))}componentDidMount(){(void 0===this.props.dir&&this.isRtl()||this.opened)&&this.forceUpdate()}get element(){return this.mainButton}dispatchClickEvent(e,t){this.isItemDisabled(t)||s.dispatchEvent(this.props.onItemClick,e,this,{item:this.buttonsData[t],itemIndex:t})}renderPopup(e){const{popupSettings:t={},_zIndex:n,unstyled:r}=this.props,a=n?n+2e3:12e3,l=r&&r.uDropDownButton,{focusedIndex:i}=this.state;return d.createElement(s.ZIndexContext.Provider,{value:a},d.createElement(o.Popup,{anchor:this.mainButton,show:this.opened,animate:t.animate,popupClass:s.classNames(s.uDropDownButton.popup({c:l}),t.popupClass),anchorAlign:t.anchorAlign||b(e),popupAlign:t.popupAlign||y(e),style:e?{direction:"rtl"}:void 0,onClose:this.onPopupClose},d.createElement("ul",{role:"menu",id:this.guid,tabIndex:-1,"aria-activedescendant":i>=0?`${this.guid}-${i}`:void 0,ref:this.listRef,onKeyDown:this.onKeyDown,onBlur:this.handleMenuBlur,className:s.classNames(s.uDropDownButton.ul({c:l,size:this.props.size}))},this.renderChildItems())))}renderChildItems(){const{item:e,itemRender:t,textField:n,unstyled:o}=this.props,r=o&&o.uDropDownButton;return this.buttonsData.length>0?this.buttonsData.map((o,a)=>d.createElement(h,{className:s.classNames(s.uDropDownButton.item({c:r}),o.className,{"k-first":0===a},{"k-last":a===this.buttonsData.length-1}),dataItem:o,textField:n,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}};B.propTypes={accessKey:n.string,ariaLabel:n.string,title:n.string,onFocus:n.func,onBlur:n.func,onClick:n.func,onItemClick:n.func,onOpen:n.func,onClose:n.func,items:n.arrayOf(n.any),textField:n.string,tabIndex:n.number,disabled:n.bool,icon:n.string,svgIcon:s.svgIconPropType,iconClass:n.string,imageUrl:n.string,popupSettings:n.object,itemRender:n.func,item:n.func,className:n.string,buttonClass:n.string,dir:n.string,size:n.oneOf(["small","medium","large"]),rounded:n.oneOf(["small","medium","large","full","none"]),fillMode:n.oneOf(["flat","link","outline","solid","clear"]),themeColor:n.oneOf(["base","primary","secondary","tertiary","info","success","warning","error","inverse"])},B.defaultProps={size:void 0,rounded:void 0,fillMode:void 0,themeColor:void 0};let K=B;const R=s.createPropsContext(),M=s.withIdHOC(s.withPropsContext(R,s.withUnstyledHOC(s.withZIndexContext(K))));M.displayName="KendoReactDropDownButton";const O=":not(.k-dropdownlist button):not(.k-colorpicker button):not(.k-split-button .k-split-button-arrow)",z=":not(.k-popup *)",F=["button"+O+z,".k-button-group > button"+O+z,".k-colorpicker"+z,".k-dropdownlist"+z],P=e=>d.createElement("div",{ref:e._ref,className:s.classNames("k-toolbar-separator k-separator",e.className)}),T="prevArrow.title",A="nextArrow.title",L="moreButtonTitle.title",W={[T]:"Previous scroll button",[A]:"Next scroll button",[L]:"More button"},$=e=>{const t=r.useLocalization(),{disabled:n,type:o,scrollContentRef:l,buttonScrollSpeed:i,prevButton:c,nextButton:u}=e,p="prev"===o?c||"span":u||"span";return d.createElement(p,{className:s.classNames("k-button","k-icon-button",`k-toolbar-${o}`),title:`${"prev"===o?t.toLanguageString(T,W[T]):t.toLanguageString(A,W[A])}`,"aria-hidden":!0,tabIndex:n?-1:void 0,onClick:e=>{l&&l.current&&i&&l.current.scrollBy({left:"next"===o?i:-i,behavior:"smooth"})}},d.createElement(s.SvgIcon,{icon:"prev"===o?a.chevronLeftIcon:a.chevronRightIcon,className:"k-button-icon"}))},H=e=>{const{scrollButtons:t,scrollButtonsPosition:n,isOverflowing:s,scrollContentRef:o,buttonScrollSpeed:r,dir:a,isScrollStartPosition:l,isScrollEndPosition:i,prevButton:c,nextButton:u,children:p}=e,m=(e,t)=>d.createElement($,{type:e,disabled:t,scrollContentRef:o,buttonScrollSpeed:r,prevButton:c,nextButton:u}),h="visible"===t||"auto"===t&&s;return d.createElement(d.Fragment,null,h&&"split"===n&&d.createElement(d.Fragment,null,m("rtl"!==a?"prev":"next",l),d.createElement(P,{className:"k-toolbar-button-separator"})),h&&"start"===n&&d.createElement(d.Fragment,null,m("rtl"!==a?"prev":"next",l),m("rtl"!==a?"next":"prev",i),d.createElement(P,{className:"k-toolbar-button-separator"})),d.createElement("span",{className:"k-toolbar-items k-toolbar-items-scroll",ref:o},p),h&&"split"===n&&d.createElement(d.Fragment,null,d.createElement(P,{className:"k-toolbar-button-separator"}),m("rtl"!==a?"next":"prev",i)),h&&"end"===n&&d.createElement(d.Fragment,null,d.createElement(P,{className:"k-toolbar-button-separator"}),m("rtl"!==a?"prev":"next",l),m("rtl"!==a?"next":"prev",i)))},U=e=>{var t;const{toolbarRef:n,children:l,fillMode:i,size:c}=e,[p,m]=d.useState(!1),h=d.useRef(d.Children.toArray(l).filter(e=>d.isValidElement(e)).map((e,t)=>d.cloneElement(e,{key:e.key||t}))),f=d.useRef([]),v=d.useRef(0),g=d.useRef(null),b=d.useRef(null),y=r.useLocalization(),[,k]=d.useReducer(e=>e+1,0),C=()=>{const e=n.current;if(!e)return null;const t=e.clientWidth,s=parseInt(window.getComputedStyle(e).gap||"0",10),o=Array.from(e.children).filter(e=>void 0===e.dataset.kendoWatermark),r=o.map(e=>Math.ceil(e.clientWidth)),a=r.reduce((e,t)=>e+t,0)+o.length*s+2*s;return{toolbarWidth:t,gap:s,childWidths:r,totalInnerWidth:a}},I=()=>{var e,t,n,s,o;const r=C();if(!r)return;const{toolbarWidth:a,gap:l,childWidths:i,totalInnerWidth:c}=r;let d=c,u=!1;const p=f.current.length>0,m=[...h.current],y=[...f.current];for(;d>a&&m.length>0;){const r=m.pop(),a=m.length;if(r&&y.unshift(r),a<i.length&&(d-=i[a]+l),!u&&!p){d+=Math.ceil(null!=(t=null==(e=b.current)?void 0:e.offsetWidth)?t:0)+Math.ceil(null!=(o=null==(s=null==(n=g.current)?void 0:n.element)?void 0:s.offsetWidth)?o:0)+2*l}u=!0}if(u)return h.current=m,f.current=y,v.current=a,void k();if(f.current.length>0&&a>v.current+l*i.length){const e=[...f.current],t=e.shift();f.current=e,t&&(h.current=[...h.current,t]),v.current=a,k()}};d.useEffect(()=>{const e=new ResizeObserver(I),t=n.current;return t&&e.observe(t),()=>{t&&e.unobserve(t)}},[]),d.useLayoutEffect(()=>{if(!n.current||0===f.current.length||0===h.current.length)return;const e=C();if(!e||e.totalInnerWidth<=e.toolbarWidth)return;const t=[...h.current],s=t.pop();v.current=e.toolbarWidth,h.current=t,s&&(f.current=[s,...f.current]),k()});return d.createElement(d.Fragment,null,h.current.length>0&&h.current,f.current.length>0&&d.createElement(d.Fragment,null,d.createElement(P,{_ref:b,className:"k-toolbar-button-separator"}),d.createElement(u,{ref:g,className:"k-toolbar-overflow-button",fillMode:"flat",svgIcon:a.moreHorizontalIcon,title:y.toLanguageString(L,W[L]),onClick:()=>{m(!p)}}),d.createElement(o.Popup,{anchor:n.current,show:p,popupClass:"k-toolbar-popup",style:{width:null==(t=n.current)?void 0:t.offsetWidth}},d.createElement("span",{className:`k-toolbar-items-list k-toolbar-items-list-${s.kendoThemeMaps.sizeMap[c]} k-toolbar-items-list-${i}`},f.current.length>0&&f.current))))},V=d.forwardRef((e,t)=>{const{children:n,className:o,id:r,ariaLabel:a,keyboardNavigation:l,role:i,onResize:c,style:u,tabIndex:p=j.tabIndex,size:m=j.size,fillMode:h=j.fillMode,overflow:f,scrollButtons:v=j.scrollButtons,scrollButtonsPosition:g=j.scrollButtonsPosition,buttonScrollSpeed:b=j.buttonScrollSpeed,prevButton:y,nextButton:C,_ariaControls:I}=e,x=d.useRef(!1),w=d.useRef(null),E=d.useRef(null),N=d.useRef(0),D=d.useRef(0),S=d.useRef([]),B=d.useRef({element:null,props:e}),[K,R]=d.useState(!1),[M,O]=d.useState(!0),[z,P]=d.useState(!1),T=s.useDir(w,e.dir),{showWatermark:A,licenseMessage:L}=s.usePaidChildrenWatermark(w,k,"Toolbar"),W=d.useMemo(()=>e.buttons||F,[e.buttons]),$=d.useMemo(()=>W.map(e=>e+":focus").join(","),[W]),V=()=>{const e=w.current&&w.current.querySelector($);return Math.max(0,S.current.findIndex(t=>t===e))};d.useImperativeHandle(B,()=>({element:w.current,props:e})),d.useImperativeHandle(t,()=>B.current),d.useEffect(()=>(window.addEventListener("resize",Z),w.current&&(D.current=w.current.offsetWidth,N.current=w.current.offsetHeight,!1!==l&&(S.current=Array.from(w.current.querySelectorAll(W.join(","))),q(0))),()=>{window.removeEventListener("resize",Z),S.current.length=0}),[]),d.useEffect(()=>{if(x.current){if(!w.current||!1===l)return;S.current=Array.from(w.current.querySelectorAll(W.join(","))),q(V()),_()}else x.current=!0});const q=e=>{S.current.forEach((t,n)=>{t.tabIndex=n===e?p:-1})},G=(e,t)=>{const n=S.current[t];if(n){n.tabIndex=p,n.focus();const t=S.current[e];t&&(t.tabIndex=-1)}},Z=e=>{if(!w.current)return;const t=w.current.offsetWidth,n=w.current.offsetHeight;if(D.current!==t||N.current!==n){D.current=t,N.current=n;const s={offsetWidth:D.current,offsetHeight:N.current};c&&c.call(void 0,{target:B.current,...s,nativeEvent:e})}_()},_=d.useCallback(()=>{const e=E.current;e&&R(e.scrollWidth>e.clientWidth||e.scrollHeight>e.clientHeight)},[]),J=d.useCallback(()=>{const e=E.current;if(e){const t=0===e.scrollLeft,n="rtl"!==T?e.scrollLeft+e.clientWidth===e.scrollWidth:e.clientWidth-e.scrollLeft===e.scrollWidth;t&&O(!0),n&&P(!0),!t&&!n&&(O(!1),P(!1))}},[T]);return d.useEffect(()=>{const e=E.current;if(e)return e.addEventListener("scroll",J),()=>{e.removeEventListener("scroll",J)}},[J]),d.createElement("div",{id:r,"aria-label":a,"aria-controls":I,className:s.classNames("k-toolbar",{[`k-toolbar-${s.kendoThemeMaps.sizeMap[m]||m}`]:m,[`k-toolbar-${h}`]:h,"k-toolbar-scrollable":"scroll"===f,"k-toolbar-scrollable-overlay":"scroll"===f&&("hidden"===v||void 0===v),"k-toolbar-scrollable-start":"scroll"===f&&"hidden"===v&&M,"k-toolbar-scrollable-end":"scroll"===f&&"hidden"===v&&z,"k-toolbar-section":e.overflow&&"section"===f},o),style:u,role:void 0!==i?i||void 0:"toolbar",dir:T,ref:w,onKeyDown:!1!==l?e=>{const t=e.keyCode===s.Keys.left||e.keyCode===s.Keys.right||e.keyCode===s.Keys.home||e.keyCode===s.Keys.end,n=V();!t||e.defaultPrevented||-1===S.current.findIndex(t=>t===e.target)||(e.keyCode===s.Keys.left?G(n,0===n?S.current.length-1:n-1):G(n,n===S.current.length-1?0:n+1),e.keyCode===s.Keys.home&&G(n,0),e.keyCode===s.Keys.end&&G(n,S.current.length-1))}:void 0},"scroll"===f&&d.createElement(H,{scrollButtons:v,scrollButtonsPosition:g,prevButton:y,nextButton:C,isOverflowing:K,scrollContentRef:E,buttonScrollSpeed:b,dir:T,isScrollStartPosition:M,isScrollEndPosition:z,children:n}),"section"===f&&d.createElement(U,{toolbarRef:w,fillMode:h,size:m},n),("none"===f||void 0===f)&&n,A&&d.createElement(s.WatermarkOverlay,{message:L}))}),j={tabIndex:0,size:void 0,fillMode:void 0,scrollButtons:"auto",scrollButtonsPosition:"split",buttonScrollSpeed:100};V.displayName="KendoReactToolbar",V.propTypes={tabIndex:n.number,dir:n.string,keyboardNavigation:n.bool,style:n.object,className:n.string,role:n.string,onResize:n.func,buttons:n.arrayOf(n.string.isRequired),size:n.oneOf(["small","medium","large"]),fillMode:n.oneOf(["solid","flat","outline"]),overflow:n.oneOf(["none","section","scroll"]),scrollButtons:n.oneOf(["hidden","visible","auto"]),scrollButtonsPosition:n.oneOf(["start","end","split"]),buttonScrollSpeed:n.number};const q=d.forwardRef((e,t)=>{const{id:n,className:o,style:r,children:a}=e,l=d.useRef(null);return d.useImperativeHandle(t,()=>({element:l.current})),d.createElement("div",{id:n,className:s.classNames("k-toolbar-item",o),style:r,ref:l},a)});q.displayName="KendoReactToolbarItem",q.propTypes={className:n.string};const G=d.forwardRef((e,t)=>{const n=d.useRef(null),o=d.useRef(null);d.useImperativeHandle(o,()=>({element:n.current})),d.useImperativeHandle(t,()=>({element:n.current}));const r=d.useMemo(()=>s.classNames("k-spacer",e.className),[e.className]);return d.createElement("span",{ref:n,className:r})});G.displayName="KendoReactToolbarSpacer",G.propTypes={className:n.string};const Z=d.createContext([null,e=>{}]),_=d.createContext([null,e=>{}]),J=d.createContext([null,e=>{}]);var Q=(e=>(e.next="next",e.prev="prev",e.current="current",e.reset="reset",e))(Q||{});var X=(e=>(e.remove="remove",e.add="add",e.reorder="reorder",e))(X||{});var Y=(e=>(e.toggle="toggle",e.remove="remove",e))(Y||{});const ee=d.forwardRef((e,t)=>{var n;const o=d.useRef(null),r=d.useRef(null),{disabled:l=ne.disabled,fillMode:i=ne.fillMode,themeColor:c=ne.themeColor,size:u=ne.size,rounded:p=ne.rounded,dir:m=ne.dir,removeIcon:h=ne.removeIcon,removeSvgIcon:f=ne.removeSvgIcon,removable:v=ne.removable}=e,g=s.useDir(r,m);d.useImperativeHandle(o,()=>({element:r.current,props:e})),d.useImperativeHandle(t,()=>o.current);const[b,y]=d.useContext(Z),[k,C]=d.useContext(_),[,I]=d.useContext(J),x=d.useMemo(()=>e.selected||(Array.isArray(b)?b.some(t=>t===e.value):b===e.value),[e.selected,e.value,b]),w="option"===e.role?null!=(n=e.ariaSelected)?n:x:void 0,E=d.useMemo(()=>k===e.value,[e.value,k]);d.useEffect(()=>{E&&r.current&&r.current.focus()},[E]);const N=d.useCallback(t=>{y({type:Y.toggle,payload:e.value,event:t})},[y,e.value]),D=d.useCallback(t=>{v&&(I({type:X.remove,payload:e.value,event:t}),C({type:Q.reset,payload:e.value,event:t}),y({type:Y.remove,payload:e.value,event:t}),e.onRemove&&e.onRemove.call(void 0,{target:o.current,syntheticEvent:t}))},[e.onRemove,e.value,v,I,C,y]),S=d.useCallback(t=>{switch(t.keyCode){case s.Keys.left:C({type:Q.prev,payload:e.value,event:t});break;case s.Keys.right:C({type:Q.next,payload:e.value,event:t});break;case s.Keys.enter:y({type:Y.toggle,payload:e.value,event:t});break;case s.Keys.delete:D(t)}e.onKeyDown&&e.onKeyDown.call(void 0,{target:o.current,syntheticEvent:t})},[e.onKeyDown,e.value,C,y,D]),B=d.useCallback(t=>{C({payload:e.value,type:Q.current,event:t}),e.onFocus&&e.onFocus.call(void 0,{target:o.current,syntheticEvent:t})},[e.onFocus,e.value,C]),K=d.useCallback(t=>{C({type:Q.reset,payload:e.value,event:t}),e.onBlur&&e.onBlur.call(void 0,{target:o.current,syntheticEvent:t})},[e.onBlur,e.value,C]),R=s.useMouse(e,o,{onClick:N});return d.createElement("div",{...R,role:e.role||"button",id:e.value,style:e.style,ref:r,dir:g,tabIndex:s.getTabIndex(e.tabIndex,l,void 0),className:s.classNames("k-chip",{"k-rtl":"rtl"===g,"k-disabled":l,"k-selected":x,"k-focus":E,[`k-chip-${s.kendoThemeMaps.sizeMap[u]||u}`]:u,[`k-rounded-${s.kendoThemeMaps.roundedMap[p]||p}`]:p,[`k-chip-${i}`]:i,[`k-chip-${c}`]:!!c},e.className),"aria-pressed":e.role?void 0:x,"aria-selected":w,"aria-disabled":l||void 0,"aria-label":e.ariaLabel,"aria-describedby":e.ariaDescribedBy,"aria-keyshortcuts":v&&"option"===e.role?"Enter Delete":void 0,onFocus:B,onBlur:K,onKeyDown:S},x&&(e.selectedIcon||e.selectedSvgIcon)&&d.createElement(s.IconWrap,{className:"k-chip-icon",name:e.selectedIcon?s.toIconName(e.selectedIcon):void 0,icon:e.selectedSvgIcon,size:"small"}),(e.icon||e.svgIcon)&&d.createElement(s.IconWrap,{className:"k-chip-icon",name:e.icon?s.toIconName(e.icon):void 0,icon:e.svgIcon,size:"small"}),e.avatar&&d.createElement("div",{className:s.classNames("k-chip-avatar","k-avatar",e.avatar.rounded&&`k-rounded-${e.avatar.rounded}`),style:e.avatar.style},d.createElement("span",{className:"k-avatar-image"},d.createElement("img",{src:e.avatar.image,alt:e.avatar.imageAlt}))),d.createElement("span",{className:"k-chip-content"},void 0!==e.children?e.children:e.text&&d.createElement("span",{"aria-label":e.ariaLabel||void 0,className:"k-chip-label"},e.text)),v&&d.createElement("span",{className:"k-chip-actions"},d.createElement("span",{className:s.classNames("k-chip-action","k-chip-remove-action"),onClick:D},d.createElement(s.IconWrap,{name:h?s.toIconName(h):void 0,icon:f||a.xCircleIcon,size:"small"}))))}),te={id:n.string,text:n.string,value:n.any,dir:n.oneOf(["ltr","rtl"]),removable:n.bool,removeIcon:n.string,removeIconSvg:s.svgIconPropType,disabled:n.bool,icon:n.string,svgIcon:s.svgIconPropType,selectedIcon:n.string,selectedIconSvg:s.svgIconPropType,onRemove:n.func,dataItem:n.any,selected:n.bool,ariaSelected:n.bool,ariaDescribedBy:n.string,size:n.oneOf(["small","medium","large"]),rounded:n.oneOf(["small","medium","large","full","none"]),fillMode:n.oneOf(["outline","solid"]),themeColor:n.oneOf(["base","info","success","warning","error"])},ne={disabled:!1,removable:!1,removeIcon:"k-i-x-circle",removeSvgIcon:a.xCircleIcon,dir:"ltr",size:void 0,rounded:void 0,fillMode:void 0,themeColor:void 0};ee.displayName="KendoReactChip",ee.propTypes=te;const se=(e,t,n)=>{"multiple"===t.selection?Array.isArray(e)||(e=e?[e]:null):"single"===t.selection&&Array.isArray(e)&&(e=e?e.join(""):null);const[s,o]=d.useState(e);return[s,e=>{const r=((e,t)=>{switch(t.selection){case"single":switch(t.type){case"toggle":if(!Array.isArray(e)||null===e)return t.payload===e?null:t.payload;throw new Error("State cannot be an array in single selection");case"remove":return t.payload===e?null:e;default:return e}case"multiple":switch(t.type){case"toggle":if(Array.isArray(e))return e.some(e=>e===t.payload)?e.filter(e=>e!==t.payload):[...e,t.payload];if(null===e)return[t.payload];throw new Error("State cannot be non-array in multiple selection");case"remove":return Array.isArray(e)?e.some(e=>e===t.payload)?e.filter(e=>e!==t.payload):[...e,t.payload]:e;default:return e}case"none":return null;default:return e}})(t.state||s,{...e,...t});n&&n(r,e.event),"none"!==t.selection&&o(r)}]},oe=d.forwardRef((e,t)=>{const n=d.useRef(null),o=d.useRef(null),{id:r,style:a,tabIndex:l,className:i,ariaDescribedBy:c,ariaLabelledBy:u,ariaLabel:p,value:m,defaultData:h=ae.defaultData,chip:f=ae.chip,disabled:v=ae.disabled,size:g=ae.size,defaultValue:b=ae.defaultValue,selection:y=ae.selection,valueField:k=ae.valueField,textField:C=ae.textField,dir:I=ae.dir,onChange:x,onDataChange:w}=e,E=s.useDir(o,I),N=d.useMemo(()=>f||ee,[f,ee]);d.useImperativeHandle(n,()=>({element:o.current,props:e})),d.useImperativeHandle(t,()=>n.current);const D=d.useCallback((e,t)=>{x&&n.current&&x.call(void 0,{value:e,target:n.current,syntheticEvent:t})},[x]),[S,B]=se(m||b,{selection:y,state:m},D),K=d.useCallback((e,t)=>{w&&n.current&&w.call(void 0,{value:e,target:n.current,syntheticEvent:t})},[w]),[R,M]=((e,t,n)=>{const[s,o]=d.useState(e);return[s,e=>{const r=((e,t)=>{switch(t.type){case"add":case"reorder":break;case"remove":return e.filter(e=>e[t.valueField]!==t.payload);default:return e}})(t.state||s,{...e,...t});n&&n(r,e.event),o(r)}]})(e.data||h,{state:e.data,valueField:k},K),O=d.useCallback((e,t)=>(e.push(t[k]),e),[k]),z=d.useMemo(()=>e.data||R,[e.data,R]),F=d.useMemo(()=>m||S,[m,S]),P=d.useMemo(()=>z.reduce(O,[]),[z,O]),T=d.useCallback(e=>s.getter(k)(e),[k]),A=d.useCallback(e=>s.getter(C)(e),[C]),[L,W]=(e=>{const[t,n]=d.useState(null);return[t,t=>{const s=((e,t)=>{const n=t.items.findIndex(t=>t===e);switch(t.type){case"next":return n===t.items.length-1?e:t.items[n+1];case"prev":return 0===n?e:t.items[n-1];case"current":return t.payload;case"reset":return null;default:return e}})(t.payload,{...t,...e});n(s)}]})({items:P}),$=s.useMouse(e,n);return d.createElement(Z.Provider,{value:[F,B]},d.createElement(_.Provider,{value:[L,W]},d.createElement(J.Provider,{value:[z,M]},d.createElement("div",{ref:o,...$,role:v?void 0:"listbox",id:r,dir:E,style:a,tabIndex:s.getTabIndex(l,v,void 0),className:s.classNames("k-chip-list",{"k-rtl":"rtl"===E,"k-disabled":v,[`k-chip-list-${s.kendoThemeMaps.sizeMap[g]||g}`]:g},i),"aria-label":p,"aria-labelledby":u,"aria-describedby":c,"aria-orientation":"horizontal","aria-multiselectable":"multiple"===y||void 0},z.map((e,t)=>d.createElement(N,{role:"option",dataItem:e,size:g,key:[T(e),t].join("-"),text:A(e),value:T(e),ariaLabel:e.ariaLabel,svgIcon:e.svgIcon||void 0}))))))}),re={id:n.string,className:n.string,tabIndex:n.number,data:n.any,defaultData:n.arrayOf(n.any),onDataChange:n.func,value:n.oneOfType([n.any,n.arrayOf(n.any)]),defaultValue:n.oneOfType([n.any,n.arrayOf(n.any)]),onChange:n.func,selection:n.oneOf(["single","none","multiple"]),textField:n.string,valueField:n.string,disabled:n.bool,dir:n.oneOf(["ltr","rtl"]),ariaLabelledBy:n.string,ariaDescribedBy:n.string,size:n.oneOf(["small","medium","large"])},ae={chip:ee,size:void 0,disabled:!1,defaultValue:null,defaultData:[],dir:"ltr",selection:"none",textField:"text",valueField:"value"};oe.displayName="KendoReactChipList",oe.propTypes=re;const le=d.forwardRef((e,t)=>{const{className:n,disabled:o,text:r,icon:a,style:l,id:i,focused:c,tabIndex:u,index:p,dataItem:m,item:h,svgIcon:f,onDown:v,onClick:g,...b}=e,y=d.useRef(null),k=d.useCallback(()=>{y.current&&y.current.focus()},[]),C=d.useCallback(()=>({element:y.current,focus:k}),[k]);d.useImperativeHandle(t,C);const I=d.useCallback(e=>{g&&void 0!==p&&!o&&g(e,p)},[g,p]),x=d.useMemo(()=>s.classNames("k-fab-item",{"k-focus":c,"k-disabled":o},n),[n,o,c]),w=h;return d.createElement("li",{ref:y,id:i,className:x,style:l,role:"menuitem",tabIndex:s.getTabIndex(u,o),"aria-disabled":o,"aria-label":`${r||""} floatingactionbutton item`,onClick:I,onMouseDown:v,onPointerDown:v,...b},w?d.createElement(w,{itemIndex:p,item:m}):d.createElement(d.Fragment,null,r&&d.createElement("span",{className:"k-fab-item-text"},r),a||f?d.createElement(s.IconWrap,{className:"k-fab-item-icon",name:a,icon:f}):null))});le.propTypes={className:n.string,style:n.object,children:n.any,disabled:n.bool,focused:n.bool,index:n.number,icon:n.string,svgIcon:s.svgIconPropType,text:n.string,tabIndex:n.number,customProp:n.any},le.displayName="KendoFloatingActionButtonItem";const ie="16px",ce=e=>"number"==typeof e?e+"px":e,de=(e,t)=>{const n={horizontal:t?"right":"left",vertical:"bottom"};return"end"===e.horizontal&&(n.horizontal=t?"left":"right"),n},ue=(e,t)=>{const n={horizontal:t?"right":"left",vertical:"top"};return"end"===e.horizontal&&(n.horizontal=t?"left":"right"),n},pe=(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"]),me=(e,t,n,s)=>{const o=t.horizontal,r=t.vertical;if(e.current){const a=n&&void 0!==n.x?ce(n.x):ie,l=n&&void 0!==n.x?`calc(50% + ${ce(n.x)})`:"50%",i=n&&void 0!==n.y?ce(n.y):ie,c=n&&void 0!==n.y?`calc(50% + ${ce(n.y)})`:"50%";e.current.style.setProperty(he(t,s),"center"===o?l:a),e.current.style.setProperty(fe(t),"middle"===r?c:i),s&&(("top"===r||"bottom"===r)&&"start"===o&&e.current.style.setProperty("left","unset"),"middle"===r&&"end"===o&&e.current.style.setProperty("right","unset"),"middle"===r&&"start"===o&&e.current.style.setProperty("left","unset"))}},he=(e,t)=>{const{horizontal:n}=e;return{end:t?"left":"right",center:"left",start:t?"right":"left"}[n||"end"]},fe=e=>({top:"top",middle:"top",bottom:"bottom"}[e.vertical||"bottom"]),ve=d.forwardRef((e,t)=>{const{align:n=ge.align,alignOffset:r,className:a,disabled:l,icon:i,svgIcon:c,iconClass:u,id:p,items:m,item:h,text:f,positionMode:v=ge.positionMode,size:g=ge.size,style:b,rounded:y=ge.rounded,themeColor:k=ge.themeColor,overlayStyle:C,tabIndex:I,accessKey:x,popupSettings:w={},modal:E,onClick:N,onItemClick:D,onFocus:S,onBlur:B,onKeyDown:K,onOpen:R,onClose:M,...O}=e,z=s.useZIndexContext(),F=z?z+2:100,P=d.useRef(null),T=d.useRef(null),A=d.useRef(null),L=d.useRef(null),W=d.useCallback(()=>{T.current&&T.current.focus()},[]),$=d.useCallback(()=>({element:T.current,focus:W}),[W]);d.useImperativeHandle(P,$),d.useImperativeHandle(t,()=>P.current);const[H,U]=d.useState(!1),[V,j]=d.useState(!1),[q,G]=d.useState(-1),Z=s.useId()+"-button-id",_=s.useDir(T,e.dir),J="rtl"===_,Q=s.useId()+"-list-id";d.useEffect(()=>{me(T,n,r,J)},[T,n,r,J]),d.useEffect(()=>{V&&T&&T.current&&T.current.focus()},[V,T]);const X=d.useCallback((e,t)=>{m&&s.dispatchEvent(t?R:M,e,$(),void 0)},[R,M,m]),Y=d.useCallback(e=>{!e.target||l||(!m&&N?s.dispatchEvent(N,e,$(),void 0):(U(!H),j(!0),G(H?-1:0),X(e,!H)))},[U,j,G,N,X,H,m,l]),ee=d.useCallback(e=>{j(!0),G(H?0:-1),S&&s.dispatchEvent(S,e,$(),void 0)},[S,j,G]),te=d.useCallback(e=>{j(!1),U(!1),G(-1),s.dispatchEvent(B,e,$(),void 0),H&&X(e,!1)},[B,j,U,G,X]),ne=d.useCallback(e=>{e.preventDefault()},[]),se=d.useCallback((e,t)=>{m&&(m[t].disabled||s.dispatchEvent(D,e,$(),{itemProps:m[t],itemIndex:t}))},[D]),oe=d.useCallback((e,t)=>{!e.target||!m||(G(t),U(!1),se(e,t),X(e,!1))},[G,U,se,X]),re=d.useCallback(e=>{s.getActiveElement(document)===T.current&&e.preventDefault()},[T]),ae=d.useCallback(e=>{const t=q,n=m?m.length:-1;if(e.altKey)return!H&&e.keyCode===s.Keys.down&&(e.preventDefault(),U(!0),G(0)),void(H&&e.keyCode===s.Keys.up&&(e.preventDefault(),U(!1),G(-1)));switch(e.keyCode){case s.Keys.enter:case s.Keys.space:t>=0&&se(e,t),m||Y(e),e.preventDefault(),U(!H),G(H?-1:0);break;case s.Keys.esc:e.preventDefault(),U(!1),G(-1);break;case s.Keys.home:e.preventDefault(),G(0);break;case s.Keys.end:e.preventDefault(),G(n-1);break;case s.Keys.down:case s.Keys.right:e.preventDefault(),G(t+1>=n?0:t+1);break;case s.Keys.up:case s.Keys.left:e.preventDefault(),G(t-1<0?n-1:t-1)}s.dispatchEvent(K,e,$(),void 0)},[K,q,G,J,U]),ie=d.useMemo(()=>s.classNames("k-fab",{"k-fab-xs":"xsmall"===g,"k-fab-sm":"small"===g,"k-fab-md":"medium"===g,"k-fab-lg":"large"===g,"k-disabled":l,"k-pos-absolute":"absolute"===v,"k-pos-fixed":"fixed"===v,"k-focus":V,[`k-rounded-${s.kendoThemeMaps.roundedMap[y]||y}`]:y,[`k-fab-${k}`]:k},v&&`k-${n.vertical}-${n.horizontal}`,a),[k,g,y,l,v,n,V,a]),ce=m&&m.map((e,t)=>d.createElement(le,{...e,key:t,index:t,id:`${Q}-${t}`,disabled:l||e.disabled,focused:q===t,dataItem:e,item:h,className:s.classNames(e.className,pe(_||"ltr",n.horizontal)),onClick:oe,onDown:re})),he=!(!i&&!c||f),fe=(T.current?T.current.offsetWidth:0)/2-16;let ve;return ve=i||c?d.createElement(s.IconWrap,{className:"k-fab-icon",name:i,icon:c}):u?d.createElement("span",{role:"presentation",className:u}):null,d.createElement(s.ZIndexContext.Provider,{value:F},d.createElement(d.Fragment,null,d.createElement("button",{ref:T,id:p||Z,type:"button","aria-disabled":l,"aria-expanded":m?H:void 0,"aria-haspopup":!!m||void 0,"aria-label":!f&&(i||c||u)?"Action":void 0,"aria-owns":m?Q:void 0,"aria-activedescendant":q>=0&&m?`${Q}-${q}`:void 0,tabIndex:s.getTabIndex(I,l),accessKey:x,dir:_,disabled:l,className:ie,style:b,onClick:Y,onMouseDown:ne,onFocus:ee,onBlur:te,onKeyDown:ae,...O},ve,f&&d.createElement("span",{className:"k-fab-text"},f)),E&&H&&d.createElement("div",{className:"k-overlay",style:{zIndex:F,...C}}),d.createElement(o.Popup,{ref:L,anchor:T.current,show:H,animate:w.animate,popupClass:s.classNames("k-popup-transparent k-fab-popup",w.popupClass),anchorAlign:w.anchorAlign||de(n,J),popupAlign:w.popupAlign||ue(n,J),style:{boxShadow:"none"}},d.createElement("ul",{ref:A,role:"menu","aria-labelledby":p,id:Q,className:s.classNames("k-fab-items",{"k-fab-items-bottom":"bottom"!==n.vertical,"k-fab-items-top":"bottom"===n.vertical}),style:{paddingLeft:he?fe:void 0,paddingRight:he?fe:void 0}},ce))))});ve.propTypes={className:n.string,style:n.object,id:n.string,dir:n.string,tabIndex:n.number,accessKey:n.string,disabled:n.bool,icon:n.string,svgIcon:s.svgIconPropType,iconClass:n.string,text:n.string,alignOffset:n.shape({x:n.oneOfType([n.number,n.string]).isRequired,y:n.oneOfType([n.number,n.string]).isRequired}),align:n.shape({vertical:n.oneOf(["top","middle","bottom"]).isRequired,horizontal:n.oneOf(["start","center","end"]).isRequired}),positionMode:n.oneOf(["absolute","fixed"]),size:n.oneOf(["xsmall","small","medium","large"]),rounded:n.oneOf(["small","medium","large","full","none"]),themeColor:n.oneOf(["base","primary","secondary","tertiary"]),modal:n.bool,overlayStyle:n.object};const ge={align:{vertical:"bottom",horizontal:"end"},size:void 0,rounded:void 0,themeColor:void 0,positionMode:"fixed"};ve.displayName="KendoFloatingActionButton";const be=d.forwardRef((e,t)=>{const n=!s.validatePackage(k,{component:"SpeechToTextButton"}),o=s.getLicenseMessage(k),i=r.useLocalization(),{fillMode:c,rounded:p,size:m,themeColor:h,ariaLabel:f,svgIcon:v,disabled:g,iconSize:b,title:y,className:x,id:E,style:N,lang:D="en-US",continuous:S=!1,interimResults:B=!1,maxAlternatives:K=1,integrationMode:R="webSpeech",onStart:M,onResult:O,onEnd:z,onError:F,...P}=e,T=d.useRef(null),A=d.useRef(!1),[L,W]=d.useState(!1),$=d.useCallback(async()=>{A.current=!0,W(!0),M&&await M()},[M]),H=d.useCallback(async()=>{A.current=!1,W(!1),z&&await z()},[z]),U=d.useCallback(e=>{const t=e.results,n=t[t.length-1],s=Array.from(n).map(e=>({transcript:e.transcript,confidence:e.confidence}));null==O||O({isFinal:n.isFinal,alternatives:s})},[O]),V=d.useCallback(e=>{W(!1),A.current=!1,null==F||F({errorMessage:e.error})},[F]),j=d.useCallback(()=>{var e;A.current||null==(e=T.current)||e.start()},[]),q=d.useCallback(()=>{var e;A.current&&(null==(e=T.current)||e.stop())},[]),G=d.useCallback(()=>{var e;A.current&&(null==(e=T.current)||e.abort(),A.current=!1,W(!1))},[]),Z=()=>A.current;d.useImperativeHandle(t,()=>({start:j,stop:q,abort:G,isActive:Z})),d.useEffect(()=>((()=>{var e;"undefined"==typeof window||"webkitSpeechRecognition"in window||"SpeechRecognition"in window?(null!=(e=T.current)&&e.isActive()&&T.current.stop(),T.current=new l.KendoSpeechRecognition({lang:D,continuous:S,interimResults:B,maxAlternatives:K,events:{start:$,end:H,result:U,error:V}})):F&&F({errorMessage:"Speech Recognition API is not supported in this browser."})})(),()=>{A.current&&q()}),[D,S,B,K,R]);const _=void 0!==e.icon||void 0!==e.iconClass,J=d.useMemo(()=>L?a.stopIcon:v||a.microphoneIcon,[L,v]);return d.createElement(d.Fragment,null,d.createElement(u,{id:E,className:s.classNames({"k-speech-to-text-button":!0,"k-listening":L},x),style:N,svgIcon:_?void 0:J,iconSize:b,fillMode:c,rounded:p,size:m,themeColor:h,"aria-label":null!=f?f:i.toLanguageString(C,w[C]),"aria-pressed":L||void 0,disabled:g,title:null!=y?y:i.toLanguageString(I,w[I]),onClick:()=>{L?q():j()},...P},e.children),n&&d.createElement(s.WatermarkOverlay,{message:o}))});be.displayName="KendoSpeechToTextButton";const ye=d.forwardRef((e,t)=>{const{items:n=[],size:o,layoutMode:r="compact",value:a,onChange:l,itemTemplate:i,defaultValue:c,className:u,...p}=e,m=o?s.kendoThemeMaps.sizeMap[o]:void 0,h=d.useRef(null),f=d.useRef(null),[v,g]=d.useState({selectedValue:c,focusedValue:void 0}),b=null!=a?a:v.selectedValue,y=v.focusedValue,k=d.useCallback(()=>{const e=h.current,t=f.current;if(!e||!t)return;const n=e.querySelector(".k-segmented-control-button.k-selected");if(!n)return;const s=e.offsetWidth,{offsetWidth:o,offsetLeft:r}=n,a=`${r}px`,l=s-r-o+"px";t.style.left!==a&&(t.style.left=a),t.style.right!==l&&(t.style.right=l)},[]),C=e=>{g(t=>({...t,...e}))},I=d.useCallback(e=>t=>{var n,s;b!==e.value?(void 0===a&&e&&C({selectedValue:e.value}),null==l||l(e.value),null==(s=e.onClick)||s.call(e,t),k()):null==(n=e.onClick)||n.call(e,t)},[a,l,k,b]),x=d.useCallback((e,t)=>n=>{C({hoveredValue:e}),null==t||t(n)},[]),w=d.useCallback(e=>t=>{C({hoveredValue:void 0}),null==e||e(t)},[]),E=d.useCallback((e,t)=>n=>{C({focusedValue:e}),null==t||t(n)},[]),N=d.useCallback(e=>t=>{C({focusedValue:void 0}),null==e||e(t)},[]);return d.useLayoutEffect(()=>{k()},[b,k]),d.useEffect(()=>{const e=h.current;if(!e||"undefined"==typeof ResizeObserver)return;const t=new ResizeObserver(()=>{k()});return t.observe(e),()=>{t.disconnect()}},[k]),d.useImperativeHandle(t,()=>({element:h.current}),[]),d.createElement("div",{ref:h,className:s.classNames("k-segmented-control",m&&`k-segmented-control-${m}`,{"k-segmented-control-stretched":"stretch"===r},u),...p},d.createElement("div",{className:"k-segmented-control-thumb",ref:f,"aria-hidden":"true"}),n.map(e=>{const{value:t,disabled:n,text:o,svgIcon:r,iconClassName:a,type:l="button",onClick:c,onMouseEnter:u,onMouseLeave:p,onFocus:m,onBlur:h,...f}=e,g=b===t;return d.createElement("button",{key:t,type:l,className:s.classNames("k-segmented-control-button",{"k-selected":g,"k-hover":v.hoveredValue===t&&!n,"k-focus":y===t&&!n,"k-disabled":n}),"aria-pressed":g,disabled:n,onClick:I(e),onMouseEnter:x(t,u),onMouseLeave:w(p),onFocus:E(t,m),onBlur:N(h),...f},i?i(e):d.createElement(d.Fragment,null,r&&d.createElement(s.IconWrap,{className:s.classNames("k-segmented-control-button-icon",{...a&&{[a]:g}}),icon:r}),d.createElement("span",{className:"k-segmented-control-button-text"},o)))}))});ye.displayName="KendoReactSegmentedControl";const ke=[".k-input",".k-picker",".k-checkbox",".k-radio",".k-switch",".k-rating",".k-slider"],Ce=d.forwardRef((e,t)=>{const{disabled:n,fillMode:o="solid",rounded:r="medium",size:l="medium",svgIcon:c=a.pasteSparkleIcon,formFields:p,onClick:m,children:h,...f}=e,v=d.useRef(null);d.useImperativeHandle(t,()=>{var e,t,n,s;return{element:null!=(t=null==(e=v.current)?void 0:e.element)?t:null,selected:null!=(s=null==(n=v.current)?void 0:n.selected)&&s,click:()=>{var e,t;return null==(t=null==(e=v.current)?void 0:e.element)?void 0:t.click()}}});const g=d.useRef(null),b=d.useCallback(()=>{var e;return(null==(e=v.current)?void 0:e.element)?(null!=g.current||(g.current=new i.KendoSmartPaste({getElement:()=>{var e,t;return null!=(t=null==(e=v.current)?void 0:e.element)?t:null},customInputs:ke.map(e=>({identifier:e})),getSmartPasteField:e=>{const t=(e=>{const t=e.querySelector("input, select, textarea");return(null==t?void 0:t.getAttribute("name"))||(null==t?void 0:t.getAttribute("id"))||e.getAttribute("id")||null})(e.element);return t?{...e,field:t}:e}})),g.current):null},[]);return d.createElement(u,{ref:v,disabled:n,fillMode:o,rounded:r,size:l,svgIcon:c,onClick:async e=>{if(n)return;const t=await(async()=>{try{return await navigator.clipboard.readText()}catch{return""}})(),o=(()=>{const e=b();if(!e)return p;const t=e.extractFormConfig().reduce((e,t)=>e.some(e=>e.field===t.field)?e:[...e,t],[]);return p?p.map(e=>{const n=t.find(t=>t.field===e.field);return n?{...n,...e,element:n.element}:e}):t})(),r=null==o?void 0:o.map(e=>{var t;const{element:n,...s}=e;return{...s,field:s.field||"",allowedValues:null!=(t=s.allowedValues)?t:[]}}),a=Object.assign(e,{requestData:{content:t,formFields:r},setResponse:e=>{null!=e&&e.fieldValues&&((e,t)=>{var n;if(!e||!t)return;const o=Object.entries(e).reduce((e,[t,n])=>(null!=n&&(e[t]=n),e),{}),r=null==(n=v.current)?void 0:n.element;if(r){const e=s.getKendoPasteEventTarget(r);s.dispatchKendoPasteEvent(e,o)}const a=b();a&&a.populateFormFields({fieldValues:o},t)})(e.fieldValues,o)}});null==m||m(a)},type:"button",...f},h)});Ce.displayName="KendoReactSmartPasteButton";const Ie=s.withIdHOC(M);Ie.displayName="KendoReactDropDownButton";const xe=s.withIdHOC(N);xe.displayName="KendoReactSplitButton",e.Button=u,e.ButtonGroup=m,e.Chip=ee,e.ChipList=oe,e.DropDownButton=Ie,e.DropDownButtonClassComponent=M,e.DropDownButtonItem=S,e.FloatingActionButton=ve,e.FloatingActionButtonItem=le,e.SegmentedControl=ye,e.SmartPasteButton=Ce,e.SpeechToTextButton=be,e.SplitButton=xe,e.SplitButtonClassComponent=N,e.SplitButtonItem=v,e.Toolbar=V,e.ToolbarItem=q,e.ToolbarSeparator=P,e.ToolbarSpacer=G,e.toolbarButtons=F});
|
|
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-react-intl"),require("@progress/kendo-svg-icons"),require("@progress/kendo-webspeech-common"),require("@progress/kendo-smartpaste-common")):"function"==typeof define&&define.amd?define(["exports","react","prop-types","@progress/kendo-react-common","@progress/kendo-react-popup","@progress/kendo-react-intl","@progress/kendo-svg-icons","@progress/kendo-webspeech-common","@progress/kendo-smartpaste-common"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).KendoReactButtons={},e.React,e.PropTypes,e.KendoReactCommon,e.KendoReactPopup,e.KendoReactIntl,e.KendoSvgIcons,e.KendoWebspeechCommon,e.KendoSmartpasteCommon)}(this,function(e,t,n,s,o,r,a,l,i){"use strict";function c(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(n){if("default"!==n){var s=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,s.get?s:{enumerable:!0,get:function(){return e[n]}})}}),t.default=e,Object.freeze(t)}var d=c(t);const u=d.forwardRef((e,t)=>{const{children:n,togglable:o,dir:r,disabled:a,selected:l,icon:i,iconClass:c,svgIcon:u,imageUrl:m,imageAlt:h,className:f,startIcon:v,endIcon:g,onClick:b,size:y=p.size,rounded:k=p.rounded,fillMode:C=p.fillMode,themeColor:I=p.themeColor,ariaPressed:x,iconSize:w,...E}=e,N=d.useRef(void 0),D=d.useRef(null),S=d.useRef(null),[B,K]=d.useState(!0===o&&!0===l),R=void 0!==u||void 0!==i||void 0!==c||void 0!==m,M=void 0!==n,O=s.useUnstyled(),z=e.unstyled||O,F=z&&z.uButton;let P=B;P=void 0===N.current?B:N.current,d.useImperativeHandle(t,()=>{const e={element:D.current,selected:P};return S.current=e,e}),s.useWebMcpRegister("button",S,e,e.webMcp),d.useMemo(()=>{o&&void 0!==l&&l!==B&&K(l)},[o,l]),d.useEffect(()=>{N.current=void 0},[B]);const T=function({imageUrl:e,name:t,iconClass:n,svgIcon:o,imageAlt:r,buttonClasses:a,iconSize:l}){return e?d.createElement("img",{role:"presentation",className:s.classNames(s.uButton.icon({c:a})),alt:r,src:e}):t||o?d.createElement(s.IconWrap,{className:s.classNames(s.uButton.icon({c:a})),name:t,icon:o,size:l}):n?d.createElement("span",{role:"presentation",className:s.classNames(s.uButton.icon({c:a}),n)}):null}({name:i,svgIcon:u,iconClass:c,imageUrl:m,imageAlt:h,buttonClasses:F,iconSize:w}),A=e=>d.cloneElement(e,{className:s.classNames(s.uButton.icon({c:F}),e.props.className)}),L=d.useMemo(()=>o?B:x||void 0,[o,B,x]);return d.createElement("button",{ref:D,"aria-pressed":L,...E,dir:r,disabled:a,onClick:e=>{o&&void 0===l&&(N.current=!B,K(!B)),b&&b.call(void 0,e)},className:s.classNames(s.uButton.wrapper({c:F,isRtl:"rtl"===r,selected:B,disabled:a,size:y,fillMode:C,rounded:k,themeColor:I,iconButton:!M&&R}),f)},v&&A(v),T,n&&d.createElement("span",{className:s.classNames(s.uButton.text({c:F}))},n),g&&A(g))}),p={size:void 0,rounded:void 0,fillMode:void 0,themeColor:void 0};u.displayName="KendoReactButton",u.propTypes={children:n.node,selected:n.bool,togglable:n.bool,icon:n.string,svgIcon:s.svgIconPropType,iconClass:n.string,imageUrl:n.string,imageAlt:n.string,size:n.oneOf(["xsmall","xs","small","medium","large"]),rounded:n.oneOf(["small","medium","large","full","none"]),fillMode:n.oneOf(["flat","link","outline","solid","clear"]),themeColor:n.oneOf(["base","primary","secondary","tertiary","info","success","warning","error","inverse"])};const m=e=>{const{children:t,className:n,dir:o,disabled:r,width:a}=e,l=s.useUnstyled(),i=e.unstyled||l,c=i&&i.uButtonGroup,u=(e,t)=>{const n={...a?{width:a}:{},...e.props.style||{}},s=r||e.props.disabled,o={...e.props,...t?{className:t}:{},...Object.keys(n).length?{style:n}:{},...void 0!==s?{disabled:s}:{}};return d.Children.count(e.props.children)>0?d.cloneElement(e,o,e.props.children):d.cloneElement(e,o)},p=d.useRef(null),m=(e=>{const t=d.Children.count(e),n=void 0!==o?"rtl"===o:p.current&&"rtl"===getComputedStyle(p.current).direction||!1;return d.Children.map(e,(e,o)=>{if(d.isValidElement(e)){const r=o===t-1,a=n,l=s.classNames(e.props.className,s.uButtonGroup.position({c:c,start:a?r:0===o,end:a?0===o:r}));return u(e,l)}return e})})(t),h=s.classNames(s.uButtonGroup.wrapper({c:c,stretched:!!a,disabled:r}),n),f={className:h,style:{width:`${a}`},dir:o,role:"group","aria-disabled":r};return d.createElement("div",{ref:p,...f,className:h},m)};m.propTypes={children:n.oneOfType([n.arrayOf(n.element),n.element]),className:n.string,disabled:n.bool,width:n.string,dir:n.string};const h=e=>{const t=s.useUnstyled(),n=e.unstyled||t,o=n&&n.uDropDownButton,r=d.useCallback(t=>{e.onClick(t,e.index)},[e]),a=e.dataItem.render||e.item||(void 0===e.item?e.render:null),l=void 0!==e.dataItem.text?e.dataItem.text:e.textField?e.dataItem[e.textField]:e.dataItem,i=d.createElement("li",{id:e.id,className:s.classNames(s.uDropDownButton.li({c:o,focused:e.focused}),e.className),tabIndex:-1,onClick:r,onMouseDown:e.onDown,onPointerDown:e.onDown,role:"menuitem","aria-disabled":e.dataItem.disabled||void 0},d.createElement("span",{tabIndex:-1,className:s.classNames(s.uDropDownButton.link({c:o,selected:e.dataItem.selected,disabled:e.dataItem.disabled})),key:"icon"},a?d.createElement(a,{item:e.dataItem,itemIndex:e.index}):d.createElement(d.Fragment,null,(e.dataItem.icon||e.dataItem.iconClass||e.dataItem.svgIcon)&&d.createElement(s.IconWrap,{className:e.dataItem.iconClass,name:e.dataItem.icon,icon:e.dataItem.svgIcon}),e.dataItem.imageUrl&&d.createElement("img",{role:"presentation",alt:"",src:e.dataItem.imageUrl,className:"k-icon"}),l&&d.createElement("span",{className:"k-menu-link-text"},l))));return void 0!==e.item&&void 0!==e.render?e.render.call(void 0,i,e):i};h.displayName="KendoReactButtonItem";const f=class extends d.Component{render(){return null}};f.propTypes={text:n.string,icon:n.string,iconClass:n.string,imageUrl:n.string,disabled:n.bool,render:n.any};let v=f;const g=(e,t,n,o)=>{if(n)return e;const r=Math.min(o-1,Math.max(0,e));switch(t){case s.Keys.enter:case s.Keys.space:case s.Keys.esc:return-1;case s.Keys.up:case s.Keys.left:return r-1<0?o-1:r-1;case s.Keys.down:case s.Keys.right:return r+1>=o?0:r+1;case s.Keys.home:return 0;case s.Keys.end:return o-1;default:return e}};function b(e){const t={horizontal:"left",vertical:"bottom"};return e&&(t.horizontal="right"),t}function y(e){const t={horizontal:"left",vertical:"top"};return e&&(t.horizontal="right"),t}const k=Object.freeze({name:"@progress/kendo-react-buttons",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate:0,version:"15.0.0",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"}),C="speechToTextButton.ariaLabel",I="speechToTextButton.title",x="splitButton.toggleDropdown",w={[C]:"Start speech recognition",[I]:"Speech to Text Button",[x]:"Toggle dropdown"},E=class extends d.Component{constructor(e){super(e),this.state={focused:!1,focusedIndex:-1,opened:!1},this.wrapper=null,this.mainButton=null,this.list=null,this.skipFocus=!1,this.buttonsData=[],this.showLicenseWatermark=!1,this.onKeyDown=e=>{const{focusedIndex:t}=this.state;if(e.altKey)return void(this.opened||e.keyCode!==s.Keys.down?this.opened&&e.keyCode===s.Keys.up&&(e.preventDefault(),this.setState({focusedIndex:-1}),this.setOpen(!1,e)):(e.preventDefault(),this.setState({focusedIndex:0}),this.setOpen(!0,e)));let n;if(e.keyCode===s.Keys.enter||e.keyCode===s.Keys.space){if(e.preventDefault(),this.dispatchClickEvent(e,t),t>=0){n={focusedIndex:this.opened?-1:0};const t=!this.opened;this.setOpen(t,e)}}else if(this.opened&&e.keyCode===s.Keys.esc)return this.setState({focusedIndex:-1}),void this.setOpen(!1,e);if(this.opened){const o=g(t,e.keyCode,e.altKey,this.buttonsData.length);o!==t&&(n=n||{},n.focusedIndex=o);const r=e.keyCode===s.Keys.up||e.keyCode===s.Keys.down||e.keyCode===s.Keys.left||e.keyCode===s.Keys.right;!e.altKey&&(r||e.keyCode===s.Keys.home||e.keyCode===s.Keys.end)&&e.preventDefault()}n&&this.setState(n)},this.switchFocus=e=>{this.skipFocus=!0,e(),window.setTimeout(()=>this.skipFocus=!1,0)},this.onFocus=e=>{this.skipFocus||(s.dispatchEvent(this.props.onFocus,e,this,void 0),this.setState({focused:!0}))},this.setOpen=(e,t)=>{this.opened!==e&&(this.openedDuringOnChange=e,this.setState({opened:e}),t?this.dispatchPopupEvent(t,e):this.openedDuringOnChange=void 0)},this.onItemClick=(e,t)=>{this.opened&&this.setState({focusedIndex:0}),this.dispatchClickEvent(e,t),this.setOpen(!1,e)},this.onBlur=e=>{this.skipFocus||(this.setState({focused:!1,focusedIndex:-1}),s.dispatchEvent(this.props.onBlur,e,this,void 0),setTimeout(()=>{this.setOpen(!1,e)},0))},this.onPopupClose=e=>{var t;const n=s.getActiveElement(document);this.element&&this.element.removeAttribute("tabindex"),(n===this.list||null!=(t=this.list)&&t.contains(n))&&this.switchFocus(()=>{this.element&&this.element.focus({preventScroll:!0})}),this.props.popupSettings&&this.props.popupSettings.onClose&&this.props.popupSettings.onClose.call(void 0,e)},this.listRef=e=>{this.list=e,e&&this.state.focused&&this.switchFocus(()=>{e.focus({preventScroll:!0}),this.element&&(this.element.tabIndex=-1)})},this.onSplitPartClick=e=>{if(this.buttonsData.length){const t=!this.opened;this.setState({focusedIndex:t?0:-1,focused:!0}),this.setOpen(t,e)}},this.onDownSplitPart=e=>{e.preventDefault();const t=s.getActiveElement(document);this.element&&t!==this.element&&t!==this.list&&this.element.focus()},this.onItemDown=e=>{s.getActiveElement(document)===this.list&&e.preventDefault()},this.dispatchPopupEvent=(e,t)=>{s.dispatchEvent(t?this.props.onOpen:this.props.onClose,e,this,void 0),this.openedDuringOnChange=void 0},this.showLicenseWatermark=!s.validatePackage(k,{component:"SplitButton"}),this.licenseMessage=s.getLicenseMessage(k)}get guid(){return this.props.id?this.props.id+"-accessibility-id":this.props.id}get opened(){return void 0!==this.openedDuringOnChange?this.openedDuringOnChange:void 0===this.props.opened?this.state.opened:this.props.opened}render(){this.buttonsData=this.props.items||d.Children.toArray(this.props.children).filter(e=>e&&e.type===v).map(e=>e.props);const e=this.isRtl(),t=e?"rtl":void 0,n=r.provideLocalizationService(this).toLanguageString(x,w[x]),{id:o,style:l,tabIndex:i,disabled:c}=this.props;return d.createElement(d.Fragment,null,d.createElement("div",{id:o,style:l,className:s.classNames("k-split-button","k-button-group",{"k-focus":this.state.focused},this.props.rounded&&`k-rounded-${s.kendoThemeMaps.roundedMap[this.props.rounded]}`,this.props.className),onKeyDown:this.onKeyDown,onFocus:this.onFocus,onBlur:this.onBlur,dir:t,ref:e=>{this.wrapper=e}},d.createElement(u,{ref:e=>{this.mainButton=e&&e.element},type:"button",size:this.props.size,rounded:this.props.rounded,fillMode:this.props.fillMode,themeColor:this.props.themeColor,onClick:e=>this.onItemClick(e,-1),disabled:c||void 0,tabIndex:i,accessKey:this.props.accessKey,className:this.props.buttonClass,icon:this.props.icon,svgIcon:this.props.svgIcon,iconClass:this.props.iconClass,startIcon:this.props.startIcon,endIcon:this.props.endIcon,imageUrl:this.props.imageUrl,dir:t,"aria-disabled":c,"aria-label":this.props.ariaLabel,id:"button-"+this.guid,title:this.props.title},this.props.text),d.createElement(u,{type:"button",size:this.props.size,rounded:this.props.rounded,fillMode:this.props.fillMode,themeColor:this.props.themeColor,icon:"chevron-down",svgIcon:a.chevronDownIcon,className:"k-split-button-arrow",disabled:c||void 0,tabIndex:-1,onClick:this.onSplitPartClick,onMouseDown:this.onDownSplitPart,onPointerDown:this.onDownSplitPart,dir:t,"aria-label":n,"aria-expanded":this.opened?"true":"false","aria-controls":this.opened?this.guid:void 0}),this.renderPopup(e)),this.showLicenseWatermark&&d.createElement(s.WatermarkOverlay,{message:this.licenseMessage}))}componentDidMount(){(void 0===this.props.dir&&this.isRtl()||this.opened)&&this.forceUpdate()}get element(){return this.mainButton}dispatchClickEvent(e,t){this.isItemDisabled(t)||(-1===t?s.dispatchEvent(this.props.onButtonClick,e,this,void 0):s.dispatchEvent(this.props.onItemClick,e,this,{item:this.buttonsData[t],itemIndex:t}))}renderPopup(e){const{popupSettings:t={}}=this.props,{focusedIndex:n}=this.state;return d.createElement(o.Popup,{anchor:this.wrapper,show:this.opened,animate:t.animate,popupClass:s.classNames("k-menu-popup",t.popupClass),anchorAlign:t.anchorAlign||b(e),popupAlign:t.popupAlign||y(e),style:e?{direction:"rtl"}:void 0,onClose:this.onPopupClose},d.createElement("ul",{role:"menu",id:this.guid,tabIndex:-1,ref:this.listRef,"aria-activedescendant":n>=0?`${this.guid}-${n}`:void 0,className:s.classNames("k-menu-group",{[`k-menu-group-${s.kendoThemeMaps.sizeMap[this.props.size]||this.props.size}`]:this.props.size})},this.renderChildItems()))}renderChildItems(){const{item:e,itemRender:t,textField:n}=this.props;return this.buttonsData.length>0?this.buttonsData.map((o,r)=>d.createElement(h,{className:s.classNames("k-menu-item",{"k-first":0===r},{"k-last":r===this.buttonsData.length-1}),dataItem:o,textField:n,focused:this.state.focusedIndex===r,onClick:this.onItemClick,onDown:this.onItemDown,render:t,item:e,key:r,index:r,id:`${this.guid}-${r}`})):null}isItemDisabled(e){return this.buttonsData[e]?this.buttonsData[e].disabled:this.props.disabled}isRtl(){return void 0!==this.props.dir?"rtl"===this.props.dir:!!this.wrapper&&"rtl"===getComputedStyle(this.wrapper).direction}};E.propTypes={accessKey:n.string,ariaLabel:n.string,title:n.string,onButtonClick:n.func,onFocus:n.func,onBlur:n.func,onItemClick:n.func,onOpen:n.func,onClose:n.func,text:n.string,items:n.arrayOf(n.any),textField:n.string,tabIndex:n.number,disabled:n.bool,icon:n.string,svgIcon:s.svgIconPropType,imageUrl:n.string,popupSettings:n.object,itemRender:n.any,item:n.func,className:n.string,buttonClass:n.string,dir:n.string,size:n.oneOf(["small","medium","large"]),rounded:n.oneOf(["small","medium","large","full","none"]),fillMode:n.oneOf(["flat","link","outline","solid","clear"]),themeColor:n.oneOf(["base","primary","secondary","tertiary","info","success","warning","error","inverse"])},E.defaultProps={size:void 0,rounded:void 0,fillMode:void 0,themeColor:void 0};let N=E;r.registerForLocalization(N);const D=class extends d.Component{render(){return null}};D.propTypes={text:n.string,icon:n.string,iconClass:n.string,imageUrl:n.string,selected:n.bool,disabled:n.bool,render:n.any};let S=D;const B=class extends d.Component{constructor(e){super(e),this.state={opened:!1,focused:!1,focusedIndex:-1},this.mainButton=null,this.list=null,this.skipFocus=!1,this.showLicenseWatermark=!1,this.buttonsData=[],this.onKeyDown=e=>{const{focusedIndex:t}=this.state;if(e.altKey)return void(this.opened||e.keyCode!==s.Keys.down?this.opened&&e.keyCode===s.Keys.up&&(e.preventDefault(),this.setState({focusedIndex:-1}),this.setOpen(!1,e)):(e.preventDefault(),this.setOpen(!0,e),this.setState({focusedIndex:0})));const n={...this.state};if(e.keyCode===s.Keys.enter||e.keyCode===s.Keys.space){e.preventDefault(),t>=0&&this.dispatchClickEvent(e,t);const n=!this.opened;return this.setState({focused:!0,focusedIndex:n?0:-1}),void this.setOpen(n,e)}if(this.opened&&e.keyCode===s.Keys.esc)return this.setState({focusedIndex:-1}),void this.setOpen(!1,e);if(this.opened){const o=g(t,e.keyCode,e.altKey,this.buttonsData.length);n.focusedIndex=o;const r=e.keyCode===s.Keys.up||e.keyCode===s.Keys.down||e.keyCode===s.Keys.left||e.keyCode===s.Keys.right;!e.altKey&&(r||e.keyCode===s.Keys.home||e.keyCode===s.Keys.end)&&e.preventDefault()}this.setState(n)},this.switchFocus=e=>{this.skipFocus=!0,e(),window.setTimeout(()=>this.skipFocus=!1,0)},this.handleFocus=e=>{this.skipFocus||(this.setState({focused:!0,focusedIndex:this.opened?0:-1}),s.dispatchEvent(this.props.onFocus,e,this,void 0))},this.handleButtonBlur=e=>{this.opened||(this.setState({focused:!1}),s.dispatchEvent(this.props.onBlur,e,this,void 0))},this.handleMenuBlur=e=>{this.skipFocus||(this.setState({focused:!1,focusedIndex:-1}),s.dispatchEvent(this.props.onBlur,e,this,void 0),setTimeout(()=>{this.setOpen(!1,e)},0))},this.setOpen=(e,t)=>{this.opened!==e&&(this.openedDuringOnChange=e,this.setState({opened:e}),t?this.dispatchPopupEvent(t,e):this.openedDuringOnChange=void 0)},this.onItemClick=(e,t)=>{this.setState({focusedIndex:-1}),this.dispatchClickEvent(e,t),this.setOpen(!1,e)},this.onItemDown=e=>{s.getActiveElement(document)===this.list&&e.preventDefault()},this.mouseDown=e=>{e.preventDefault();const t=s.getActiveElement(document);this.element&&t!==this.element&&t!==this.list&&this.element.focus()},this.onPopupClose=e=>{var t;const n=s.getActiveElement(document);this.element&&this.element.removeAttribute("tabindex"),(n===this.list||null!=(t=this.list)&&t.contains(n))&&this.switchFocus(()=>{this.element&&this.element.focus({preventScroll:!0})}),this.props.popupSettings&&this.props.popupSettings.onClose&&this.props.popupSettings.onClose.call(void 0,e)},this.listRef=e=>{this.list=e,e&&this.state.focused&&this.switchFocus(()=>{e.focus({preventScroll:!0}),this.element&&(this.element.tabIndex=-1)})},this.onClickMainButton=e=>{if(s.dispatchEvent(this.props.onClick,e,this,void 0),!this.buttonsData.length)return;const t=!this.opened;this.setState({focused:!0,focusedIndex:t?0:-1}),this.setOpen(t,e)},this.dispatchPopupEvent=(e,t)=>{s.dispatchEvent(t?this.props.onOpen:this.props.onClose,e,this,void 0),this.openedDuringOnChange=void 0},this.showLicenseWatermark=!s.validatePackage(k,{component:"DropDownButton"}),this.licenseMessage=s.getLicenseMessage(k)}get guid(){return this.props.id+"-accessibility-id"}get opened(){return void 0!==this.openedDuringOnChange?this.openedDuringOnChange:void 0===this.props.opened?this.state.opened:this.props.opened}render(){const e=this.isRtl(),t=this.props.unstyled&&this.props.unstyled.uDropDownButton,n=e?"rtl":void 0,{id:o,style:r,tabIndex:a,disabled:l,size:i,rounded:c,fillMode:p,themeColor:m,ariaLabel:h,title:f,accessKey:v,icon:g,svgIcon:b,iconClass:y,buttonClass:k,className:C,imageUrl:I,startIcon:x,endIcon:w}=this.props;return this.buttonsData=this.props.items||d.Children.toArray(this.props.children).filter(e=>e&&e.type===S).map(e=>e.props),d.createElement(d.Fragment,null,d.createElement(u,{id:o,size:i,style:r,rounded:c,fillMode:p,themeColor:m,onClick:this.onClickMainButton,onMouseDown:this.mouseDown,onKeyDown:this.onKeyDown,onFocus:this.handleFocus,onBlur:this.handleButtonBlur,"aria-disabled":l?"true":void 0,tabIndex:a,accessKey:v,icon:g,svgIcon:b,iconClass:y,className:s.classNames(k,C,s.uDropDownButton.wrapper({c:t,focused:this.state.focused,disabled:l})),imageUrl:I,dir:n,ref:e=>{this.mainButton=(null==e?void 0:e.element)||null},type:"button","aria-expanded":this.opened?"true":"false","aria-label":h||(b||g||y?"Menu":void 0),"aria-controls":this.opened?this.guid:void 0,title:f,startIcon:x,endIcon:w},this.props.text),this.showLicenseWatermark&&d.createElement(s.WatermarkOverlay,{message:this.licenseMessage}),this.renderPopup(e))}componentDidMount(){(void 0===this.props.dir&&this.isRtl()||this.opened)&&this.forceUpdate()}get element(){return this.mainButton}dispatchClickEvent(e,t){this.isItemDisabled(t)||s.dispatchEvent(this.props.onItemClick,e,this,{item:this.buttonsData[t],itemIndex:t})}renderPopup(e){const{popupSettings:t={},_zIndex:n,unstyled:r}=this.props,a=n?n+2e3:12e3,l=r&&r.uDropDownButton,{focusedIndex:i}=this.state;return d.createElement(s.ZIndexContext.Provider,{value:a},d.createElement(o.Popup,{anchor:this.mainButton,show:this.opened,animate:t.animate,popupClass:s.classNames(s.uDropDownButton.popup({c:l}),t.popupClass),anchorAlign:t.anchorAlign||b(e),popupAlign:t.popupAlign||y(e),style:e?{direction:"rtl"}:void 0,onClose:this.onPopupClose},d.createElement("ul",{role:"menu",id:this.guid,tabIndex:-1,"aria-activedescendant":i>=0?`${this.guid}-${i}`:void 0,ref:this.listRef,onKeyDown:this.onKeyDown,onBlur:this.handleMenuBlur,className:s.classNames(s.uDropDownButton.ul({c:l,size:this.props.size}))},this.renderChildItems())))}renderChildItems(){const{item:e,itemRender:t,textField:n,unstyled:o}=this.props,r=o&&o.uDropDownButton;return this.buttonsData.length>0?this.buttonsData.map((o,a)=>d.createElement(h,{className:s.classNames(s.uDropDownButton.item({c:r}),o.className,{"k-first":0===a},{"k-last":a===this.buttonsData.length-1}),dataItem:o,textField:n,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}};B.propTypes={accessKey:n.string,ariaLabel:n.string,title:n.string,onFocus:n.func,onBlur:n.func,onClick:n.func,onItemClick:n.func,onOpen:n.func,onClose:n.func,items:n.arrayOf(n.any),textField:n.string,tabIndex:n.number,disabled:n.bool,icon:n.string,svgIcon:s.svgIconPropType,iconClass:n.string,imageUrl:n.string,popupSettings:n.object,itemRender:n.func,item:n.func,className:n.string,buttonClass:n.string,dir:n.string,size:n.oneOf(["small","medium","large"]),rounded:n.oneOf(["small","medium","large","full","none"]),fillMode:n.oneOf(["flat","link","outline","solid","clear"]),themeColor:n.oneOf(["base","primary","secondary","tertiary","info","success","warning","error","inverse"])},B.defaultProps={size:void 0,rounded:void 0,fillMode:void 0,themeColor:void 0};let K=B;const R=s.createPropsContext(),M=s.withIdHOC(s.withPropsContext(R,s.withUnstyledHOC(s.withZIndexContext(K))));M.displayName="KendoReactDropDownButton";const O=":not(.k-dropdownlist button):not(.k-colorpicker button):not(.k-split-button .k-split-button-arrow)",z=":not(.k-popup *)",F=["button"+O+z,".k-button-group > button"+O+z,".k-colorpicker"+z,".k-dropdownlist"+z],P=e=>d.createElement("div",{ref:e._ref,className:s.classNames("k-toolbar-separator k-separator",e.className)}),T="prevArrow.title",A="nextArrow.title",L="moreButtonTitle.title",W={[T]:"Previous scroll button",[A]:"Next scroll button",[L]:"More button"},$=e=>{const t=r.useLocalization(),{disabled:n,type:o,scrollContentRef:l,buttonScrollSpeed:i,prevButton:c,nextButton:u}=e,p="prev"===o?c||"span":u||"span";return d.createElement(p,{className:s.classNames("k-button","k-icon-button",`k-toolbar-${o}`),title:`${"prev"===o?t.toLanguageString(T,W[T]):t.toLanguageString(A,W[A])}`,"aria-hidden":!0,tabIndex:n?-1:void 0,onClick:e=>{l&&l.current&&i&&l.current.scrollBy({left:"next"===o?i:-i,behavior:"smooth"})}},d.createElement(s.SvgIcon,{icon:"prev"===o?a.chevronLeftIcon:a.chevronRightIcon,className:"k-button-icon"}))},H=e=>{const{scrollButtons:t,scrollButtonsPosition:n,isOverflowing:s,scrollContentRef:o,buttonScrollSpeed:r,dir:a,isScrollStartPosition:l,isScrollEndPosition:i,prevButton:c,nextButton:u,children:p}=e,m=(e,t)=>d.createElement($,{type:e,disabled:t,scrollContentRef:o,buttonScrollSpeed:r,prevButton:c,nextButton:u}),h="visible"===t||"auto"===t&&s;return d.createElement(d.Fragment,null,h&&"split"===n&&d.createElement(d.Fragment,null,m("rtl"!==a?"prev":"next",l),d.createElement(P,{className:"k-toolbar-button-separator"})),h&&"start"===n&&d.createElement(d.Fragment,null,m("rtl"!==a?"prev":"next",l),m("rtl"!==a?"next":"prev",i),d.createElement(P,{className:"k-toolbar-button-separator"})),d.createElement("span",{className:"k-toolbar-items k-toolbar-items-scroll",ref:o},p),h&&"split"===n&&d.createElement(d.Fragment,null,d.createElement(P,{className:"k-toolbar-button-separator"}),m("rtl"!==a?"next":"prev",i)),h&&"end"===n&&d.createElement(d.Fragment,null,d.createElement(P,{className:"k-toolbar-button-separator"}),m("rtl"!==a?"prev":"next",l),m("rtl"!==a?"next":"prev",i)))},U=e=>{var t;const{toolbarRef:n,children:l,fillMode:i,size:c}=e,[p,m]=d.useState(!1),h=d.useRef(d.Children.toArray(l).filter(e=>d.isValidElement(e)).map((e,t)=>d.cloneElement(e,{key:e.key||t}))),f=d.useRef([]),v=d.useRef(0),g=d.useRef(null),b=d.useRef(null),y=r.useLocalization(),[,k]=d.useReducer(e=>e+1,0),C=()=>{const e=n.current;if(!e)return null;const t=e.clientWidth,s=parseInt(window.getComputedStyle(e).gap||"0",10),o=Array.from(e.children).filter(e=>void 0===e.dataset.kendoWatermark),r=o.map(e=>Math.ceil(e.clientWidth)),a=r.reduce((e,t)=>e+t,0)+o.length*s+2*s;return{toolbarWidth:t,gap:s,childWidths:r,totalInnerWidth:a}},I=()=>{var e,t,n,s,o;const r=C();if(!r)return;const{toolbarWidth:a,gap:l,childWidths:i,totalInnerWidth:c}=r;let d=c,u=!1;const p=f.current.length>0,m=[...h.current],y=[...f.current];for(;d>a&&m.length>0;){const r=m.pop(),a=m.length;if(r&&y.unshift(r),a<i.length&&(d-=i[a]+l),!u&&!p){d+=Math.ceil(null!=(t=null==(e=b.current)?void 0:e.offsetWidth)?t:0)+Math.ceil(null!=(o=null==(s=null==(n=g.current)?void 0:n.element)?void 0:s.offsetWidth)?o:0)+2*l}u=!0}if(u)return h.current=m,f.current=y,v.current=a,void k();if(f.current.length>0&&a>v.current+l*i.length){const e=[...f.current],t=e.shift();f.current=e,t&&(h.current=[...h.current,t]),v.current=a,k()}};d.useEffect(()=>{const e=new ResizeObserver(I),t=n.current;return t&&e.observe(t),()=>{t&&e.unobserve(t)}},[]),d.useLayoutEffect(()=>{if(!n.current||0===f.current.length||0===h.current.length)return;const e=C();if(!e||e.totalInnerWidth<=e.toolbarWidth)return;const t=[...h.current],s=t.pop();v.current=e.toolbarWidth,h.current=t,s&&(f.current=[s,...f.current]),k()});return d.createElement(d.Fragment,null,h.current.length>0&&h.current,f.current.length>0&&d.createElement(d.Fragment,null,d.createElement(P,{_ref:b,className:"k-toolbar-button-separator"}),d.createElement(u,{ref:g,className:"k-toolbar-overflow-button",fillMode:"flat",svgIcon:a.moreHorizontalIcon,title:y.toLanguageString(L,W[L]),onClick:()=>{m(!p)}}),d.createElement(o.Popup,{anchor:n.current,show:p,popupClass:"k-toolbar-popup",style:{width:null==(t=n.current)?void 0:t.offsetWidth}},d.createElement("span",{className:`k-toolbar-items-list k-toolbar-items-list-${s.kendoThemeMaps.sizeMap[c]} k-toolbar-items-list-${i}`},f.current.length>0&&f.current))))},V=d.forwardRef((e,t)=>{const{children:n,className:o,id:r,ariaLabel:a,keyboardNavigation:l,role:i,onResize:c,style:u,tabIndex:p=j.tabIndex,size:m=j.size,fillMode:h=j.fillMode,overflow:f,scrollButtons:v=j.scrollButtons,scrollButtonsPosition:g=j.scrollButtonsPosition,buttonScrollSpeed:b=j.buttonScrollSpeed,prevButton:y,nextButton:C,_ariaControls:I}=e,x=d.useRef(!1),w=d.useRef(null),E=d.useRef(null),N=d.useRef(0),D=d.useRef(0),S=d.useRef([]),B=d.useRef({element:null,props:e}),[K,R]=d.useState(!1),[M,O]=d.useState(!0),[z,P]=d.useState(!1),T=s.useDir(w,e.dir),{showWatermark:A,licenseMessage:L}=s.usePaidChildrenWatermark(w,k,"Toolbar"),W=d.useMemo(()=>e.buttons||F,[e.buttons]),$=d.useMemo(()=>W.map(e=>e+":focus").join(","),[W]),V=()=>{const e=w.current&&w.current.querySelector($);return Math.max(0,S.current.findIndex(t=>t===e))};d.useImperativeHandle(B,()=>({element:w.current,props:e})),d.useImperativeHandle(t,()=>B.current),d.useEffect(()=>(window.addEventListener("resize",Z),w.current&&(D.current=w.current.offsetWidth,N.current=w.current.offsetHeight,!1!==l&&(S.current=Array.from(w.current.querySelectorAll(W.join(","))),q(0))),()=>{window.removeEventListener("resize",Z),S.current.length=0}),[]),d.useEffect(()=>{if(x.current){if(!w.current||!1===l)return;S.current=Array.from(w.current.querySelectorAll(W.join(","))),q(V()),_()}else x.current=!0});const q=e=>{S.current.forEach((t,n)=>{t.tabIndex=n===e?p:-1})},G=(e,t)=>{const n=S.current[t];if(n){n.tabIndex=p,n.focus();const t=S.current[e];t&&(t.tabIndex=-1)}},Z=e=>{if(!w.current)return;const t=w.current.offsetWidth,n=w.current.offsetHeight;if(D.current!==t||N.current!==n){D.current=t,N.current=n;const s={offsetWidth:D.current,offsetHeight:N.current};c&&c.call(void 0,{target:B.current,...s,nativeEvent:e})}_()},_=d.useCallback(()=>{const e=E.current;e&&R(e.scrollWidth>e.clientWidth||e.scrollHeight>e.clientHeight)},[]),J=d.useCallback(()=>{const e=E.current;if(e){const t=0===e.scrollLeft,n="rtl"!==T?e.scrollLeft+e.clientWidth===e.scrollWidth:e.clientWidth-e.scrollLeft===e.scrollWidth;t&&O(!0),n&&P(!0),!t&&!n&&(O(!1),P(!1))}},[T]);return d.useEffect(()=>{const e=E.current;if(e)return e.addEventListener("scroll",J),()=>{e.removeEventListener("scroll",J)}},[J]),d.createElement("div",{id:r,"aria-label":a,"aria-controls":I,className:s.classNames("k-toolbar",{[`k-toolbar-${s.kendoThemeMaps.sizeMap[m]||m}`]:m,[`k-toolbar-${h}`]:h,"k-toolbar-scrollable":"scroll"===f,"k-toolbar-scrollable-overlay":"scroll"===f&&("hidden"===v||void 0===v),"k-toolbar-scrollable-start":"scroll"===f&&"hidden"===v&&M,"k-toolbar-scrollable-end":"scroll"===f&&"hidden"===v&&z,"k-toolbar-section":e.overflow&&"section"===f},o),style:u,role:void 0!==i?i||void 0:"toolbar",dir:T,ref:w,onKeyDown:!1!==l?e=>{const t=e.keyCode===s.Keys.left||e.keyCode===s.Keys.right||e.keyCode===s.Keys.home||e.keyCode===s.Keys.end,n=V();!t||e.defaultPrevented||-1===S.current.findIndex(t=>t===e.target)||(e.keyCode===s.Keys.left?G(n,0===n?S.current.length-1:n-1):G(n,n===S.current.length-1?0:n+1),e.keyCode===s.Keys.home&&G(n,0),e.keyCode===s.Keys.end&&G(n,S.current.length-1))}:void 0},"scroll"===f&&d.createElement(H,{scrollButtons:v,scrollButtonsPosition:g,prevButton:y,nextButton:C,isOverflowing:K,scrollContentRef:E,buttonScrollSpeed:b,dir:T,isScrollStartPosition:M,isScrollEndPosition:z,children:n}),"section"===f&&d.createElement(U,{toolbarRef:w,fillMode:h,size:m},n),("none"===f||void 0===f)&&n,A&&d.createElement(s.WatermarkOverlay,{message:L}))}),j={tabIndex:0,size:void 0,fillMode:void 0,scrollButtons:"auto",scrollButtonsPosition:"split",buttonScrollSpeed:100};V.displayName="KendoReactToolbar",V.propTypes={tabIndex:n.number,dir:n.string,keyboardNavigation:n.bool,style:n.object,className:n.string,role:n.string,onResize:n.func,buttons:n.arrayOf(n.string.isRequired),size:n.oneOf(["small","medium","large"]),fillMode:n.oneOf(["solid","flat","outline"]),overflow:n.oneOf(["none","section","scroll"]),scrollButtons:n.oneOf(["hidden","visible","auto"]),scrollButtonsPosition:n.oneOf(["start","end","split"]),buttonScrollSpeed:n.number};const q=d.forwardRef((e,t)=>{const{id:n,className:o,style:r,children:a}=e,l=d.useRef(null);return d.useImperativeHandle(t,()=>({element:l.current})),d.createElement("div",{id:n,className:s.classNames("k-toolbar-item",o),style:r,ref:l},a)});q.displayName="KendoReactToolbarItem",q.propTypes={className:n.string};const G=d.forwardRef((e,t)=>{const n=d.useRef(null),o=d.useRef(null);d.useImperativeHandle(o,()=>({element:n.current})),d.useImperativeHandle(t,()=>({element:n.current}));const r=d.useMemo(()=>s.classNames("k-spacer",e.className),[e.className]);return d.createElement("span",{ref:n,className:r})});G.displayName="KendoReactToolbarSpacer",G.propTypes={className:n.string};const Z=d.createContext([null,e=>{}]),_=d.createContext([null,e=>{}]),J=d.createContext([null,e=>{}]);var Q=(e=>(e.next="next",e.prev="prev",e.current="current",e.reset="reset",e))(Q||{});var X=(e=>(e.remove="remove",e.add="add",e.reorder="reorder",e))(X||{});var Y=(e=>(e.toggle="toggle",e.remove="remove",e))(Y||{});const ee=d.forwardRef((e,t)=>{var n;const o=d.useRef(null),r=d.useRef(null),{disabled:l=ne.disabled,fillMode:i=ne.fillMode,themeColor:c=ne.themeColor,size:u=ne.size,rounded:p=ne.rounded,dir:m=ne.dir,removeIcon:h=ne.removeIcon,removeSvgIcon:f=ne.removeSvgIcon,removable:v=ne.removable}=e,g=s.useDir(r,m);d.useImperativeHandle(o,()=>({element:r.current,props:e})),d.useImperativeHandle(t,()=>o.current);const[b,y]=d.useContext(Z),[k,C]=d.useContext(_),[,I]=d.useContext(J),x=d.useMemo(()=>e.selected||(Array.isArray(b)?b.some(t=>t===e.value):b===e.value),[e.selected,e.value,b]),w="option"===e.role?null!=(n=e.ariaSelected)?n:x:void 0,E=d.useMemo(()=>k===e.value,[e.value,k]);d.useEffect(()=>{E&&r.current&&r.current.focus()},[E]);const N=d.useCallback(t=>{y({type:Y.toggle,payload:e.value,event:t})},[y,e.value]),D=d.useCallback(t=>{v&&(I({type:X.remove,payload:e.value,event:t}),C({type:Q.reset,payload:e.value,event:t}),y({type:Y.remove,payload:e.value,event:t}),e.onRemove&&e.onRemove.call(void 0,{target:o.current,syntheticEvent:t}))},[e.onRemove,e.value,v,I,C,y]),S=d.useCallback(t=>{switch(t.keyCode){case s.Keys.left:C({type:Q.prev,payload:e.value,event:t});break;case s.Keys.right:C({type:Q.next,payload:e.value,event:t});break;case s.Keys.enter:y({type:Y.toggle,payload:e.value,event:t});break;case s.Keys.delete:D(t)}e.onKeyDown&&e.onKeyDown.call(void 0,{target:o.current,syntheticEvent:t})},[e.onKeyDown,e.value,C,y,D]),B=d.useCallback(t=>{C({payload:e.value,type:Q.current,event:t}),e.onFocus&&e.onFocus.call(void 0,{target:o.current,syntheticEvent:t})},[e.onFocus,e.value,C]),K=d.useCallback(t=>{C({type:Q.reset,payload:e.value,event:t}),e.onBlur&&e.onBlur.call(void 0,{target:o.current,syntheticEvent:t})},[e.onBlur,e.value,C]),R=s.useMouse(e,o,{onClick:N});return d.createElement("div",{...R,role:e.role||"button",id:e.value,style:e.style,ref:r,dir:g,tabIndex:s.getTabIndex(e.tabIndex,l,void 0),className:s.classNames("k-chip",{"k-rtl":"rtl"===g,"k-disabled":l,"k-selected":x,"k-focus":E,[`k-chip-${s.kendoThemeMaps.sizeMap[u]||u}`]:u,[`k-rounded-${s.kendoThemeMaps.roundedMap[p]||p}`]:p,[`k-chip-${i}`]:i,[`k-chip-${c}`]:!!c},e.className),"aria-pressed":e.role?void 0:x,"aria-selected":w,"aria-disabled":l||void 0,"aria-label":e.ariaLabel,"aria-describedby":e.ariaDescribedBy,"aria-keyshortcuts":v&&"option"===e.role?"Enter Delete":void 0,onFocus:B,onBlur:K,onKeyDown:S},x&&(e.selectedIcon||e.selectedSvgIcon)&&d.createElement(s.IconWrap,{className:"k-chip-icon",name:e.selectedIcon?s.toIconName(e.selectedIcon):void 0,icon:e.selectedSvgIcon,size:"small"}),(e.icon||e.svgIcon)&&d.createElement(s.IconWrap,{className:"k-chip-icon",name:e.icon?s.toIconName(e.icon):void 0,icon:e.svgIcon,size:"small"}),e.avatar&&d.createElement("div",{className:s.classNames("k-chip-avatar","k-avatar",e.avatar.rounded&&`k-rounded-${e.avatar.rounded}`),style:e.avatar.style},d.createElement("span",{className:"k-avatar-image"},d.createElement("img",{src:e.avatar.image,alt:e.avatar.imageAlt}))),d.createElement("span",{className:"k-chip-content"},void 0!==e.children?e.children:e.text&&d.createElement("span",{"aria-label":e.ariaLabel||void 0,className:"k-chip-label"},e.text)),v&&d.createElement("span",{className:"k-chip-actions"},d.createElement("span",{className:s.classNames("k-chip-action","k-chip-remove-action"),onClick:D},d.createElement(s.IconWrap,{name:h?s.toIconName(h):void 0,icon:f||a.xCircleIcon,size:"small"}))))}),te={id:n.string,text:n.string,value:n.any,dir:n.oneOf(["ltr","rtl"]),removable:n.bool,removeIcon:n.string,removeIconSvg:s.svgIconPropType,disabled:n.bool,icon:n.string,svgIcon:s.svgIconPropType,selectedIcon:n.string,selectedIconSvg:s.svgIconPropType,onRemove:n.func,dataItem:n.any,selected:n.bool,ariaSelected:n.bool,ariaDescribedBy:n.string,size:n.oneOf(["small","medium","large"]),rounded:n.oneOf(["small","medium","large","full","none"]),fillMode:n.oneOf(["outline","solid"]),themeColor:n.oneOf(["base","info","success","warning","error"])},ne={disabled:!1,removable:!1,removeIcon:"k-i-x-circle",removeSvgIcon:a.xCircleIcon,dir:"ltr",size:void 0,rounded:void 0,fillMode:void 0,themeColor:void 0};ee.displayName="KendoReactChip",ee.propTypes=te;const se=(e,t,n)=>{"multiple"===t.selection?Array.isArray(e)||(e=e?[e]:null):"single"===t.selection&&Array.isArray(e)&&(e=e?e.join(""):null);const[s,o]=d.useState(e);return[s,e=>{const r=((e,t)=>{switch(t.selection){case"single":switch(t.type){case"toggle":if(!Array.isArray(e)||null===e)return t.payload===e?null:t.payload;throw new Error("State cannot be an array in single selection");case"remove":return t.payload===e?null:e;default:return e}case"multiple":switch(t.type){case"toggle":if(Array.isArray(e))return e.some(e=>e===t.payload)?e.filter(e=>e!==t.payload):[...e,t.payload];if(null===e)return[t.payload];throw new Error("State cannot be non-array in multiple selection");case"remove":return Array.isArray(e)?e.some(e=>e===t.payload)?e.filter(e=>e!==t.payload):[...e,t.payload]:e;default:return e}case"none":return null;default:return e}})(t.state||s,{...e,...t});n&&n(r,e.event),"none"!==t.selection&&o(r)}]},oe=d.forwardRef((e,t)=>{const n=d.useRef(null),o=d.useRef(null),{id:r,style:a,tabIndex:l,className:i,ariaDescribedBy:c,ariaLabelledBy:u,ariaLabel:p,value:m,defaultData:h=ae.defaultData,chip:f=ae.chip,disabled:v=ae.disabled,size:g=ae.size,defaultValue:b=ae.defaultValue,selection:y=ae.selection,valueField:k=ae.valueField,textField:C=ae.textField,dir:I=ae.dir,onChange:x,onDataChange:w}=e,E=s.useDir(o,I),N=d.useMemo(()=>f||ee,[f,ee]);d.useImperativeHandle(n,()=>({element:o.current,props:e})),d.useImperativeHandle(t,()=>n.current);const D=d.useCallback((e,t)=>{x&&n.current&&x.call(void 0,{value:e,target:n.current,syntheticEvent:t})},[x]),[S,B]=se(m||b,{selection:y,state:m},D),K=d.useCallback((e,t)=>{w&&n.current&&w.call(void 0,{value:e,target:n.current,syntheticEvent:t})},[w]),[R,M]=((e,t,n)=>{const[s,o]=d.useState(e);return[s,e=>{const r=((e,t)=>{switch(t.type){case"add":case"reorder":break;case"remove":return e.filter(e=>e[t.valueField]!==t.payload);default:return e}})(t.state||s,{...e,...t});n&&n(r,e.event),o(r)}]})(e.data||h,{state:e.data,valueField:k},K),O=d.useCallback((e,t)=>(e.push(t[k]),e),[k]),z=d.useMemo(()=>e.data||R,[e.data,R]),F=d.useMemo(()=>m||S,[m,S]),P=d.useMemo(()=>z.reduce(O,[]),[z,O]),T=d.useCallback(e=>s.getter(k)(e),[k]),A=d.useCallback(e=>s.getter(C)(e),[C]),[L,W]=(e=>{const[t,n]=d.useState(null);return[t,t=>{const s=((e,t)=>{const n=t.items.findIndex(t=>t===e);switch(t.type){case"next":return n===t.items.length-1?e:t.items[n+1];case"prev":return 0===n?e:t.items[n-1];case"current":return t.payload;case"reset":return null;default:return e}})(t.payload,{...t,...e});n(s)}]})({items:P}),$=s.useMouse(e,n);return d.createElement(Z.Provider,{value:[F,B]},d.createElement(_.Provider,{value:[L,W]},d.createElement(J.Provider,{value:[z,M]},d.createElement("div",{ref:o,...$,role:v?void 0:"listbox",id:r,dir:E,style:a,tabIndex:s.getTabIndex(l,v,void 0),className:s.classNames("k-chip-list",{"k-rtl":"rtl"===E,"k-disabled":v,[`k-chip-list-${s.kendoThemeMaps.sizeMap[g]||g}`]:g},i),"aria-label":p,"aria-labelledby":u,"aria-describedby":c,"aria-orientation":"horizontal","aria-multiselectable":"multiple"===y||void 0},z.map((e,t)=>d.createElement(N,{role:"option",dataItem:e,size:g,key:[T(e),t].join("-"),text:A(e),value:T(e),ariaLabel:e.ariaLabel,svgIcon:e.svgIcon||void 0}))))))}),re={id:n.string,className:n.string,tabIndex:n.number,data:n.any,defaultData:n.arrayOf(n.any),onDataChange:n.func,value:n.oneOfType([n.any,n.arrayOf(n.any)]),defaultValue:n.oneOfType([n.any,n.arrayOf(n.any)]),onChange:n.func,selection:n.oneOf(["single","none","multiple"]),textField:n.string,valueField:n.string,disabled:n.bool,dir:n.oneOf(["ltr","rtl"]),ariaLabelledBy:n.string,ariaDescribedBy:n.string,size:n.oneOf(["small","medium","large"])},ae={chip:ee,size:void 0,disabled:!1,defaultValue:null,defaultData:[],dir:"ltr",selection:"none",textField:"text",valueField:"value"};oe.displayName="KendoReactChipList",oe.propTypes=re;const le=d.forwardRef((e,t)=>{const{className:n,disabled:o,text:r,icon:a,style:l,id:i,focused:c,tabIndex:u,index:p,dataItem:m,item:h,svgIcon:f,onDown:v,onClick:g,...b}=e,y=d.useRef(null),k=d.useCallback(()=>{y.current&&y.current.focus()},[]),C=d.useCallback(()=>({element:y.current,focus:k}),[k]);d.useImperativeHandle(t,C);const I=d.useCallback(e=>{g&&void 0!==p&&!o&&g(e,p)},[g,p]),x=d.useMemo(()=>s.classNames("k-fab-item",{"k-focus":c,"k-disabled":o},n),[n,o,c]),w=h;return d.createElement("li",{ref:y,id:i,className:x,style:l,role:"menuitem",tabIndex:s.getTabIndex(u,o),"aria-disabled":o,"aria-label":`${r||""} floatingactionbutton item`,onClick:I,onMouseDown:v,onPointerDown:v,...b},w?d.createElement(w,{itemIndex:p,item:m}):d.createElement(d.Fragment,null,r&&d.createElement("span",{className:"k-fab-item-text"},r),a||f?d.createElement(s.IconWrap,{className:"k-fab-item-icon",name:a,icon:f}):null))});le.propTypes={className:n.string,style:n.object,children:n.any,disabled:n.bool,focused:n.bool,index:n.number,icon:n.string,svgIcon:s.svgIconPropType,text:n.string,tabIndex:n.number,customProp:n.any},le.displayName="KendoFloatingActionButtonItem";const ie="16px",ce=e=>"number"==typeof e?e+"px":e,de=(e,t)=>{const n={horizontal:t?"right":"left",vertical:"bottom"};return"end"===e.horizontal&&(n.horizontal=t?"left":"right"),n},ue=(e,t)=>{const n={horizontal:t?"right":"left",vertical:"top"};return"end"===e.horizontal&&(n.horizontal=t?"left":"right"),n},pe=(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"]),me=(e,t,n,s)=>{const o=t.horizontal,r=t.vertical;if(e.current){const a=n&&void 0!==n.x?ce(n.x):ie,l=n&&void 0!==n.x?`calc(50% + ${ce(n.x)})`:"50%",i=n&&void 0!==n.y?ce(n.y):ie,c=n&&void 0!==n.y?`calc(50% + ${ce(n.y)})`:"50%";e.current.style.setProperty(he(t,s),"center"===o?l:a),e.current.style.setProperty(fe(t),"middle"===r?c:i),s&&(("top"===r||"bottom"===r)&&"start"===o&&e.current.style.setProperty("left","unset"),"middle"===r&&"end"===o&&e.current.style.setProperty("right","unset"),"middle"===r&&"start"===o&&e.current.style.setProperty("left","unset"))}},he=(e,t)=>{const{horizontal:n}=e;return{end:t?"left":"right",center:"left",start:t?"right":"left"}[n||"end"]},fe=e=>({top:"top",middle:"top",bottom:"bottom"}[e.vertical||"bottom"]),ve=d.forwardRef((e,t)=>{const{align:n=ge.align,alignOffset:r,className:a,disabled:l,icon:i,svgIcon:c,iconClass:u,id:p,items:m,item:h,text:f,positionMode:v=ge.positionMode,size:g=ge.size,style:b,rounded:y=ge.rounded,themeColor:k=ge.themeColor,overlayStyle:C,tabIndex:I,accessKey:x,popupSettings:w={},modal:E,onClick:N,onItemClick:D,onFocus:S,onBlur:B,onKeyDown:K,onOpen:R,onClose:M,...O}=e,z=s.useZIndexContext(),F=z?z+2:100,P=d.useRef(null),T=d.useRef(null),A=d.useRef(null),L=d.useRef(null),W=d.useCallback(()=>{T.current&&T.current.focus()},[]),$=d.useCallback(()=>({element:T.current,focus:W}),[W]);d.useImperativeHandle(P,$),d.useImperativeHandle(t,()=>P.current);const[H,U]=d.useState(!1),[V,j]=d.useState(!1),[q,G]=d.useState(-1),Z=s.useId()+"-button-id",_=s.useDir(T,e.dir),J="rtl"===_,Q=s.useId()+"-list-id";d.useEffect(()=>{me(T,n,r,J)},[T,n,r,J]),d.useEffect(()=>{V&&T&&T.current&&T.current.focus()},[V,T]);const X=d.useCallback((e,t)=>{m&&s.dispatchEvent(t?R:M,e,$(),void 0)},[R,M,m]),Y=d.useCallback(e=>{!e.target||l||(!m&&N?s.dispatchEvent(N,e,$(),void 0):(U(!H),j(!0),G(H?-1:0),X(e,!H)))},[U,j,G,N,X,H,m,l]),ee=d.useCallback(e=>{j(!0),G(H?0:-1),S&&s.dispatchEvent(S,e,$(),void 0)},[S,j,G]),te=d.useCallback(e=>{j(!1),U(!1),G(-1),s.dispatchEvent(B,e,$(),void 0),H&&X(e,!1)},[B,j,U,G,X]),ne=d.useCallback(e=>{e.preventDefault()},[]),se=d.useCallback((e,t)=>{m&&(m[t].disabled||s.dispatchEvent(D,e,$(),{itemProps:m[t],itemIndex:t}))},[D]),oe=d.useCallback((e,t)=>{!e.target||!m||(G(t),U(!1),se(e,t),X(e,!1))},[G,U,se,X]),re=d.useCallback(e=>{s.getActiveElement(document)===T.current&&e.preventDefault()},[T]),ae=d.useCallback(e=>{const t=q,n=m?m.length:-1;if(e.altKey)return!H&&e.keyCode===s.Keys.down&&(e.preventDefault(),U(!0),G(0)),void(H&&e.keyCode===s.Keys.up&&(e.preventDefault(),U(!1),G(-1)));switch(e.keyCode){case s.Keys.enter:case s.Keys.space:t>=0&&se(e,t),m||Y(e),e.preventDefault(),U(!H),G(H?-1:0);break;case s.Keys.esc:e.preventDefault(),U(!1),G(-1);break;case s.Keys.home:e.preventDefault(),G(0);break;case s.Keys.end:e.preventDefault(),G(n-1);break;case s.Keys.down:case s.Keys.right:e.preventDefault(),G(t+1>=n?0:t+1);break;case s.Keys.up:case s.Keys.left:e.preventDefault(),G(t-1<0?n-1:t-1)}s.dispatchEvent(K,e,$(),void 0)},[K,q,G,J,U]),ie=d.useMemo(()=>s.classNames("k-fab",{"k-fab-xs":"xsmall"===g,"k-fab-sm":"small"===g,"k-fab-md":"medium"===g,"k-fab-lg":"large"===g,"k-disabled":l,"k-pos-absolute":"absolute"===v,"k-pos-fixed":"fixed"===v,"k-focus":V,[`k-rounded-${s.kendoThemeMaps.roundedMap[y]||y}`]:y,[`k-fab-${k}`]:k},v&&`k-${n.vertical}-${n.horizontal}`,a),[k,g,y,l,v,n,V,a]),ce=m&&m.map((e,t)=>d.createElement(le,{...e,key:t,index:t,id:`${Q}-${t}`,disabled:l||e.disabled,focused:q===t,dataItem:e,item:h,className:s.classNames(e.className,pe(_||"ltr",n.horizontal)),onClick:oe,onDown:re})),he=!(!i&&!c||f),fe=(T.current?T.current.offsetWidth:0)/2-16;let ve;return ve=i||c?d.createElement(s.IconWrap,{className:"k-fab-icon",name:i,icon:c}):u?d.createElement("span",{role:"presentation",className:u}):null,d.createElement(s.ZIndexContext.Provider,{value:F},d.createElement(d.Fragment,null,d.createElement("button",{ref:T,id:p||Z,type:"button","aria-disabled":l,"aria-expanded":m?H:void 0,"aria-haspopup":!!m||void 0,"aria-label":!f&&(i||c||u)?"Action":void 0,"aria-owns":m?Q:void 0,"aria-activedescendant":q>=0&&m?`${Q}-${q}`:void 0,tabIndex:s.getTabIndex(I,l),accessKey:x,dir:_,disabled:l,className:ie,style:b,onClick:Y,onMouseDown:ne,onFocus:ee,onBlur:te,onKeyDown:ae,...O},ve,f&&d.createElement("span",{className:"k-fab-text"},f)),E&&H&&d.createElement("div",{className:"k-overlay",style:{zIndex:F,...C}}),d.createElement(o.Popup,{ref:L,anchor:T.current,show:H,animate:w.animate,popupClass:s.classNames("k-popup-transparent k-fab-popup",w.popupClass),anchorAlign:w.anchorAlign||de(n,J),popupAlign:w.popupAlign||ue(n,J),style:{boxShadow:"none"}},d.createElement("ul",{ref:A,role:"menu","aria-labelledby":p,id:Q,className:s.classNames("k-fab-items",{"k-fab-items-bottom":"bottom"!==n.vertical,"k-fab-items-top":"bottom"===n.vertical}),style:{paddingLeft:he?fe:void 0,paddingRight:he?fe:void 0}},ce))))});ve.propTypes={className:n.string,style:n.object,id:n.string,dir:n.string,tabIndex:n.number,accessKey:n.string,disabled:n.bool,icon:n.string,svgIcon:s.svgIconPropType,iconClass:n.string,text:n.string,alignOffset:n.shape({x:n.oneOfType([n.number,n.string]).isRequired,y:n.oneOfType([n.number,n.string]).isRequired}),align:n.shape({vertical:n.oneOf(["top","middle","bottom"]).isRequired,horizontal:n.oneOf(["start","center","end"]).isRequired}),positionMode:n.oneOf(["absolute","fixed"]),size:n.oneOf(["xsmall","small","medium","large"]),rounded:n.oneOf(["small","medium","large","full","none"]),themeColor:n.oneOf(["base","primary","secondary","tertiary"]),modal:n.bool,overlayStyle:n.object};const ge={align:{vertical:"bottom",horizontal:"end"},size:void 0,rounded:void 0,themeColor:void 0,positionMode:"fixed"};ve.displayName="KendoFloatingActionButton";const be=d.forwardRef((e,t)=>{const n=!s.validatePackage(k,{component:"SpeechToTextButton"}),o=s.getLicenseMessage(k),i=r.useLocalization(),{fillMode:c,rounded:p,size:m,themeColor:h,ariaLabel:f,svgIcon:v,disabled:g,iconSize:b,title:y,className:x,id:E,style:N,lang:D="en-US",continuous:S=!1,interimResults:B=!1,maxAlternatives:K=1,integrationMode:R="webSpeech",onStart:M,onResult:O,onEnd:z,onError:F,...P}=e,T=d.useRef(null),A=d.useRef(!1),[L,W]=d.useState(!1),$=d.useCallback(async()=>{A.current=!0,W(!0),M&&await M()},[M]),H=d.useCallback(async()=>{A.current=!1,W(!1),z&&await z()},[z]),U=d.useCallback(e=>{const t=e.results,n=t[t.length-1],s=Array.from(n).map(e=>({transcript:e.transcript,confidence:e.confidence}));null==O||O({isFinal:n.isFinal,alternatives:s})},[O]),V=d.useCallback(e=>{W(!1),A.current=!1,null==F||F({errorMessage:e.error})},[F]),j=d.useCallback(()=>{var e;A.current||null==(e=T.current)||e.start()},[]),q=d.useCallback(()=>{var e;A.current&&(null==(e=T.current)||e.stop())},[]),G=d.useCallback(()=>{var e;A.current&&(null==(e=T.current)||e.abort(),A.current=!1,W(!1))},[]),Z=()=>A.current;d.useImperativeHandle(t,()=>({start:j,stop:q,abort:G,isActive:Z})),d.useEffect(()=>((()=>{var e;"undefined"==typeof window||"webkitSpeechRecognition"in window||"SpeechRecognition"in window?(null!=(e=T.current)&&e.isActive()&&T.current.stop(),T.current=new l.KendoSpeechRecognition({lang:D,continuous:S,interimResults:B,maxAlternatives:K,events:{start:$,end:H,result:U,error:V}})):F&&F({errorMessage:"Speech Recognition API is not supported in this browser."})})(),()=>{A.current&&q()}),[D,S,B,K,R]);const _=void 0!==e.icon||void 0!==e.iconClass,J=d.useMemo(()=>L?a.stopIcon:v||a.microphoneIcon,[L,v]);return d.createElement(d.Fragment,null,d.createElement(u,{id:E,className:s.classNames({"k-speech-to-text-button":!0,"k-listening":L},x),style:N,svgIcon:_?void 0:J,iconSize:b,fillMode:c,rounded:p,size:m,themeColor:h,"aria-label":null!=f?f:i.toLanguageString(C,w[C]),"aria-pressed":L||void 0,disabled:g,title:null!=y?y:i.toLanguageString(I,w[I]),onClick:()=>{L?q():j()},...P},e.children),n&&d.createElement(s.WatermarkOverlay,{message:o}))});be.displayName="KendoSpeechToTextButton";const ye=d.forwardRef((e,t)=>{const{items:n=[],size:o,layoutMode:r="compact",value:a,onChange:l,itemTemplate:i,defaultValue:c,className:u,...p}=e,m=o?s.kendoThemeMaps.sizeMap[o]:void 0,h=d.useRef(null),f=d.useRef(null),[v,g]=d.useState({selectedValue:c,focusedValue:void 0}),b=null!=a?a:v.selectedValue,y=v.focusedValue,k=d.useCallback(()=>{const e=h.current,t=f.current;if(!e||!t)return;const n=e.querySelector(".k-segmented-control-button.k-selected");if(!n)return;const s=e.offsetWidth,{offsetWidth:o,offsetLeft:r}=n,a=`${r}px`,l=s-r-o+"px";t.style.left!==a&&(t.style.left=a),t.style.right!==l&&(t.style.right=l)},[]),C=e=>{g(t=>({...t,...e}))},I=d.useCallback(e=>t=>{var n,s;b!==e.value?(void 0===a&&e&&C({selectedValue:e.value}),null==l||l(e.value),null==(s=e.onClick)||s.call(e,t),k()):null==(n=e.onClick)||n.call(e,t)},[a,l,k,b]),x=d.useCallback((e,t)=>n=>{C({hoveredValue:e}),null==t||t(n)},[]),w=d.useCallback(e=>t=>{C({hoveredValue:void 0}),null==e||e(t)},[]),E=d.useCallback((e,t)=>n=>{C({focusedValue:e}),null==t||t(n)},[]),N=d.useCallback(e=>t=>{C({focusedValue:void 0}),null==e||e(t)},[]);return d.useLayoutEffect(()=>{k()},[b,k]),d.useEffect(()=>{const e=h.current;if(!e||"undefined"==typeof ResizeObserver)return;const t=new ResizeObserver(()=>{k()});return t.observe(e),()=>{t.disconnect()}},[k]),d.useImperativeHandle(t,()=>({element:h.current}),[]),d.createElement("div",{ref:h,className:s.classNames("k-segmented-control",m&&`k-segmented-control-${m}`,{"k-segmented-control-stretched":"stretch"===r},u),...p},d.createElement("div",{className:"k-segmented-control-thumb",ref:f,"aria-hidden":"true"}),n.map(e=>{const{value:t,disabled:n,text:o,svgIcon:r,iconClassName:a,type:l="button",onClick:c,onMouseEnter:u,onMouseLeave:p,onFocus:m,onBlur:h,...f}=e,g=b===t;return d.createElement("button",{key:t,type:l,className:s.classNames("k-segmented-control-button",{"k-selected":g,"k-hover":v.hoveredValue===t&&!n,"k-focus":y===t&&!n,"k-disabled":n}),"aria-pressed":g,disabled:n,onClick:I(e),onMouseEnter:x(t,u),onMouseLeave:w(p),onFocus:E(t,m),onBlur:N(h),...f},i?i(e):d.createElement(d.Fragment,null,r&&d.createElement(s.IconWrap,{className:s.classNames("k-segmented-control-button-icon",{...a&&{[a]:g}}),icon:r}),d.createElement("span",{className:"k-segmented-control-button-text"},o)))}))});ye.displayName="KendoReactSegmentedControl";const ke=[".k-input",".k-picker",".k-checkbox",".k-radio",".k-switch",".k-rating",".k-slider"],Ce=d.forwardRef((e,t)=>{const{disabled:n,fillMode:o="solid",rounded:r="medium",size:l="medium",svgIcon:c=a.pasteSparkleIcon,formFields:p,onClick:m,children:h,...f}=e,v=d.useRef(null);d.useImperativeHandle(t,()=>{var e,t,n,s;return{element:null!=(t=null==(e=v.current)?void 0:e.element)?t:null,selected:null!=(s=null==(n=v.current)?void 0:n.selected)&&s,click:()=>{var e,t;return null==(t=null==(e=v.current)?void 0:e.element)?void 0:t.click()}}});const g=d.useRef(null),b=d.useCallback(()=>{var e;return(null==(e=v.current)?void 0:e.element)?(null!=g.current||(g.current=new i.KendoSmartPaste({getElement:()=>{var e,t;return null!=(t=null==(e=v.current)?void 0:e.element)?t:null},customInputs:ke.map(e=>({identifier:e})),getSmartPasteField:e=>{const t=(e=>{const t=e.querySelector("input, select, textarea");return(null==t?void 0:t.getAttribute("name"))||(null==t?void 0:t.getAttribute("id"))||e.getAttribute("id")||null})(e.element);return t?{...e,field:t}:e}})),g.current):null},[]);return d.createElement(u,{ref:v,disabled:n,fillMode:o,rounded:r,size:l,svgIcon:c,onClick:async e=>{if(n)return;const t=await(async()=>{try{return await navigator.clipboard.readText()}catch{return""}})(),o=(()=>{const e=b();if(!e)return p;const t=e.extractFormConfig().reduce((e,t)=>e.some(e=>e.field===t.field)?e:[...e,t],[]);return p?p.map(e=>{const n=t.find(t=>t.field===e.field);return n?{...n,...e,element:n.element}:e}):t})(),r=null==o?void 0:o.map(e=>{var t;const{element:n,...s}=e;return{...s,field:s.field||"",allowedValues:null!=(t=s.allowedValues)?t:[]}}),a=Object.assign(e,{requestData:{content:t,formFields:r},setResponse:e=>{null!=e&&e.fieldValues&&((e,t)=>{var n;if(!e||!t)return;const o=Object.entries(e).reduce((e,[t,n])=>(null!=n&&(e[t]=n),e),{}),r=null==(n=v.current)?void 0:n.element;if(r){const e=s.getKendoPasteEventTarget(r);s.dispatchKendoPasteEvent(e,o)}const a=b();a&&a.populateFormFields({fieldValues:o},t)})(e.fieldValues,o)}});null==m||m(a)},type:"button",...f},h)});Ce.displayName="KendoReactSmartPasteButton";const Ie=s.withIdHOC(M);Ie.displayName="KendoReactDropDownButton";const xe=s.withIdHOC(N);xe.displayName="KendoReactSplitButton",e.Button=u,e.ButtonGroup=m,e.Chip=ee,e.ChipList=oe,e.DropDownButton=Ie,e.DropDownButtonClassComponent=M,e.DropDownButtonItem=S,e.FloatingActionButton=ve,e.FloatingActionButtonItem=le,e.SegmentedControl=ye,e.SmartPasteButton=Ce,e.SpeechToTextButton=be,e.SplitButton=xe,e.SplitButtonClassComponent=N,e.SplitButtonItem=v,e.Toolbar=V,e.ToolbarItem=q,e.ToolbarSeparator=P,e.ToolbarSpacer=G,e.toolbarButtons=F});
|
package/package-metadata.js
CHANGED
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=Object.freeze({name:"@progress/kendo-react-buttons",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate:
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=Object.freeze({name:"@progress/kendo-react-buttons",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate: 1779275304,version:"15.0.0",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"});exports.packageMetadata=e;
|
package/package-metadata.mjs
CHANGED
|
@@ -7,7 +7,7 @@ export const packageMetadata = Object.freeze({
|
|
|
7
7
|
productName: 'KendoReact',
|
|
8
8
|
productCode: 'KENDOUIREACT',
|
|
9
9
|
productCodes: ['KENDOUIREACT'],
|
|
10
|
-
publishDate:
|
|
11
|
-
version: '15.0.0
|
|
10
|
+
publishDate: 1779275304,
|
|
11
|
+
version: '15.0.0',
|
|
12
12
|
licensingDocsUrl: 'https://www.telerik.com/kendo-react-ui/components/my-license/'
|
|
13
13
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-react-buttons",
|
|
3
|
-
"version": "15.0.0
|
|
3
|
+
"version": "15.0.0",
|
|
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",
|
|
@@ -28,9 +28,9 @@
|
|
|
28
28
|
"@progress/kendo-smartpaste-common": "1.0.0",
|
|
29
29
|
"@progress/kendo-licensing": "^1.7.2",
|
|
30
30
|
"@progress/kendo-webspeech-common": "^1.0.1",
|
|
31
|
-
"@progress/kendo-react-common": "15.0.0
|
|
32
|
-
"@progress/kendo-react-intl": "15.0.0
|
|
33
|
-
"@progress/kendo-react-popup": "15.0.0
|
|
31
|
+
"@progress/kendo-react-common": "15.0.0",
|
|
32
|
+
"@progress/kendo-react-intl": "15.0.0",
|
|
33
|
+
"@progress/kendo-react-popup": "15.0.0",
|
|
34
34
|
"@progress/kendo-svg-icons": "^4.9.0 || ^5.0.0",
|
|
35
35
|
"react": "^18.0.0 || ^19.0.0",
|
|
36
36
|
"react-dom": "^18.0.0 || ^19.0.0"
|
|
@@ -62,10 +62,30 @@
|
|
|
62
62
|
"@progress": {
|
|
63
63
|
"friendlyName": "Buttons",
|
|
64
64
|
"framework": "KendoReact",
|
|
65
|
+
"migrations": {
|
|
66
|
+
"options": {
|
|
67
|
+
"parser": "tsx",
|
|
68
|
+
"pattern": "*.{js,jsx,ts,tsx}"
|
|
69
|
+
},
|
|
70
|
+
"codemods": {
|
|
71
|
+
"15": [
|
|
72
|
+
{
|
|
73
|
+
"description": "Remove deprecated themeColor values ('dark', 'light') from Button, DropDownButton, and SplitButton. Valid values: 'base' | 'primary' | 'secondary' | 'tertiary' | 'info' | 'success' | 'warning' | 'error' | 'inverse'.",
|
|
74
|
+
"file": "codemods/v15/theme-color",
|
|
75
|
+
"prompt": true
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"description": "Remove deprecated themeColor values from FloatingActionButton. Valid values: 'base' | 'primary' | 'secondary' | 'tertiary'.",
|
|
79
|
+
"file": "codemods/v15/fab-theme-color",
|
|
80
|
+
"prompt": true
|
|
81
|
+
}
|
|
82
|
+
]
|
|
83
|
+
}
|
|
84
|
+
},
|
|
65
85
|
"package": {
|
|
66
86
|
"productName": "KendoReact",
|
|
67
87
|
"productCode": "KENDOUIREACT",
|
|
68
|
-
"publishDate":
|
|
88
|
+
"publishDate": 1779275304,
|
|
69
89
|
"licensingDocsUrl": "https://www.telerik.com/kendo-react-ui/components/my-license/"
|
|
70
90
|
}
|
|
71
91
|
},
|