@progress/kendo-react-buttons 13.4.0-develop.3 → 13.4.0-develop.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Button.d.ts +8 -1
- package/Button.js +1 -1
- package/Button.mjs +1 -2
- package/Chip/Chip.d.ts +3 -2
- package/Chip/Chip.js +1 -1
- package/Chip/Chip.mjs +1 -2
- package/FloatingActionButton/FloatingActionButton.js +1 -1
- package/FloatingActionButton/FloatingActionButton.mjs +1 -1
- package/FloatingActionButton/interfaces/FloatingActionButtonProps.d.ts +1 -0
- package/FloatingActionButton/models/rounded.d.ts +2 -2
- package/FloatingActionButton/models/size.d.ts +0 -1
- package/FloatingActionButton/models/theme-color.d.ts +1 -2
- package/ListButton/DropDownButton.js +1 -1
- package/ListButton/DropDownButton.mjs +1 -1
- package/ListButton/SplitButton.js +1 -1
- package/ListButton/SplitButton.mjs +1 -1
- package/ListButton/models/ListButtonProps.d.ts +4 -2
- package/SmartPasteButton/SmartPasteButton.d.ts +10 -0
- package/SmartPasteButton/SmartPasteButton.js +8 -0
- package/SmartPasteButton/SmartPasteButton.mjs +130 -0
- package/SmartPasteButton/index.d.ts +9 -0
- package/SmartPasteButton/interfaces/SmartPasteButtonHandle.d.ts +17 -0
- package/SmartPasteButton/interfaces/SmartPasteButtonProps.d.ts +80 -0
- package/SmartPasteButton/interfaces/SmartPasteFormField.d.ts +35 -0
- package/SmartPasteButton/interfaces/index.d.ts +10 -0
- package/dist/cdn/js/kendo-react-buttons.js +1 -1
- package/index.d.mts +1 -0
- package/index.d.ts +1 -0
- package/index.js +1 -1
- package/index.mjs +2 -0
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +1 -1
- package/package.json +5 -5
package/Button.d.ts
CHANGED
|
@@ -31,6 +31,13 @@ export interface ButtonProps extends ButtonInterface, React.ButtonHTMLAttributes
|
|
|
31
31
|
/**
|
|
32
32
|
* Configures the `roundness` of the Button. See [Button Appearance](https://www.telerik.com/kendo-react-ui/components/buttons/button/appearance).
|
|
33
33
|
*
|
|
34
|
+
* The available options are:
|
|
35
|
+
* - `small`
|
|
36
|
+
* - `medium`
|
|
37
|
+
* - `large`
|
|
38
|
+
* - `full`
|
|
39
|
+
* - `none`
|
|
40
|
+
*
|
|
34
41
|
* @default undefined (theme-controlled)
|
|
35
42
|
*
|
|
36
43
|
* @example
|
|
@@ -38,7 +45,7 @@ export interface ButtonProps extends ButtonInterface, React.ButtonHTMLAttributes
|
|
|
38
45
|
* <Button rounded="full">Rounded Button</Button>
|
|
39
46
|
* ```
|
|
40
47
|
*/
|
|
41
|
-
rounded?: 'small' | 'medium' | 'large' | 'full';
|
|
48
|
+
rounded?: 'small' | 'medium' | 'large' | 'full' | 'none';
|
|
42
49
|
/**
|
|
43
50
|
* Sets the `title` HTML attribute of the Button.
|
|
44
51
|
*/
|
package/Button.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 W=require("react"),r=require("prop-types"),e=require("@progress/kendo-react-common");function F(n){const l=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const o in n)if(o!=="default"){const s=Object.getOwnPropertyDescriptor(n,o);Object.defineProperty(l,o,s.get?s:{enumerable:!0,get:()=>n[o]})}}return l.default=n,Object.freeze(l)}const t=F(W);function G({imageUrl:n,name:l,iconClass:o,svgIcon:s,imageAlt:u,buttonClasses:a,iconSize:c}){return n?t.createElement("img",{role:"presentation",className:e.classNames(e.uButton.icon({c:a})),alt:u,src:n}):l||s?t.createElement(e.IconWrap,{className:e.classNames(e.uButton.icon({c:a})),name:l,icon:s,size:c}):o?t.createElement("span",{role:"presentation",className:e.classNames(e.uButton.icon({c:a}),o)}):null}const g=t.forwardRef((n,l)=>{const{children:o,togglable:s,dir:u,disabled:a,selected:c,icon:v,iconClass:b,svgIcon:y,imageUrl:N,imageAlt:M,className:P,startIcon:h,endIcon:B,onClick:C,size:S=p.size,rounded:k=p.rounded,fillMode:z=p.fillMode,themeColor:T=p.themeColor,ariaPressed:j,iconSize:A,...w}=n,q=()=>{s&&c===void 0&&(d.current=!i,O(!i))},U=f=>{q(),C&&C.call(void 0,f)},d=t.useRef(void 0),E=t.useRef(null),[i,O]=t.useState(s===!0&&c===!0),_=y!==void 0||v!==void 0||b!==void 0||N!==void 0,x=o!==void 0,D=e.useUnstyled(),R=n.unstyled||D,m=R&&R.uButton;t.useImperativeHandle(l,()=>({element:E.current,selected:d.current!==void 0?d.current:i})),t.useMemo(()=>{s&&c!==void 0&&c!==i&&O(c)},[s,c]),t.useEffect(()=>{d.current=void 0},[i]);const H=G({name:v,svgIcon:y,iconClass:b,imageUrl:N,imageAlt:M,buttonClasses:m,iconSize:A}),I=f=>t.cloneElement(f,{className:e.classNames(e.uButton.icon({c:m}),f.props.className)}),K=t.useMemo(()=>s?i:j||void 0,[]);return t.createElement("button",{ref:E,"aria-pressed":K,...w,dir:u,disabled:a,onClick:U,className:e.classNames(e.uButton.wrapper({c:m,isRtl:u==="rtl",selected:i,disabled:a,size:S,fillMode:z,rounded:k,themeColor:T,iconButton:!x&&_}),P)},h&&I(h),H,o&&t.createElement("span",{className:e.classNames(e.uButton.text({c:m}))},o),B&&I(B))}),p={size:void 0,rounded:void 0,fillMode:void 0,themeColor:void 0};g.displayName="KendoReactButton";g.propTypes={children:r.node,selected:r.bool,togglable:r.bool,icon:r.string,svgIcon:e.svgIconPropType,iconClass:r.string,imageUrl:r.string,imageAlt:r.string,size:r.oneOf(["small","medium","large"]),rounded:r.oneOf(["small","medium","large","full"]),fillMode:r.oneOf(["flat","link","outline","solid","clear"]),themeColor:r.oneOf(["base","primary","secondary","tertiary","info","success","warning","error","dark","light","inverse"])};exports.Button=g;
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const W=require("react"),r=require("prop-types"),e=require("@progress/kendo-react-common");function F(n){const l=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const o in n)if(o!=="default"){const s=Object.getOwnPropertyDescriptor(n,o);Object.defineProperty(l,o,s.get?s:{enumerable:!0,get:()=>n[o]})}}return l.default=n,Object.freeze(l)}const t=F(W);function G({imageUrl:n,name:l,iconClass:o,svgIcon:s,imageAlt:u,buttonClasses:a,iconSize:c}){return n?t.createElement("img",{role:"presentation",className:e.classNames(e.uButton.icon({c:a})),alt:u,src:n}):l||s?t.createElement(e.IconWrap,{className:e.classNames(e.uButton.icon({c:a})),name:l,icon:s,size:c}):o?t.createElement("span",{role:"presentation",className:e.classNames(e.uButton.icon({c:a}),o)}):null}const g=t.forwardRef((n,l)=>{const{children:o,togglable:s,dir:u,disabled:a,selected:c,icon:v,iconClass:b,svgIcon:y,imageUrl:N,imageAlt:M,className:P,startIcon:h,endIcon:B,onClick:C,size:S=p.size,rounded:k=p.rounded,fillMode:z=p.fillMode,themeColor:T=p.themeColor,ariaPressed:j,iconSize:A,...w}=n,q=()=>{s&&c===void 0&&(d.current=!i,O(!i))},U=f=>{q(),C&&C.call(void 0,f)},d=t.useRef(void 0),E=t.useRef(null),[i,O]=t.useState(s===!0&&c===!0),_=y!==void 0||v!==void 0||b!==void 0||N!==void 0,x=o!==void 0,D=e.useUnstyled(),R=n.unstyled||D,m=R&&R.uButton;t.useImperativeHandle(l,()=>({element:E.current,selected:d.current!==void 0?d.current:i})),t.useMemo(()=>{s&&c!==void 0&&c!==i&&O(c)},[s,c]),t.useEffect(()=>{d.current=void 0},[i]);const H=G({name:v,svgIcon:y,iconClass:b,imageUrl:N,imageAlt:M,buttonClasses:m,iconSize:A}),I=f=>t.cloneElement(f,{className:e.classNames(e.uButton.icon({c:m}),f.props.className)}),K=t.useMemo(()=>s?i:j||void 0,[]);return t.createElement("button",{ref:E,"aria-pressed":K,...w,dir:u,disabled:a,onClick:U,className:e.classNames(e.uButton.wrapper({c:m,isRtl:u==="rtl",selected:i,disabled:a,size:S,fillMode:z,rounded:k,themeColor:T,iconButton:!x&&_}),P)},h&&I(h),H,o&&t.createElement("span",{className:e.classNames(e.uButton.text({c:m}))},o),B&&I(B))}),p={size:void 0,rounded:void 0,fillMode:void 0,themeColor:void 0};g.displayName="KendoReactButton";g.propTypes={children:r.node,selected:r.bool,togglable:r.bool,icon:r.string,svgIcon:e.svgIconPropType,iconClass:r.string,imageUrl:r.string,imageAlt:r.string,size:r.oneOf(["small","medium","large"]),rounded:r.oneOf(["small","medium","large","full","none"]),fillMode:r.oneOf(["flat","link","outline","solid","clear"]),themeColor:r.oneOf(["base","primary","secondary","tertiary","info","success","warning","error","dark","light","inverse"])};exports.Button=g;
|
package/Button.mjs
CHANGED
|
@@ -120,9 +120,8 @@ k.propTypes = {
|
|
|
120
120
|
imageUrl: t.string,
|
|
121
121
|
imageAlt: t.string,
|
|
122
122
|
size: t.oneOf(["small", "medium", "large"]),
|
|
123
|
-
rounded: t.oneOf(["small", "medium", "large", "full"]),
|
|
123
|
+
rounded: t.oneOf(["small", "medium", "large", "full", "none"]),
|
|
124
124
|
fillMode: t.oneOf(["flat", "link", "outline", "solid", "clear"]),
|
|
125
|
-
// eslint-disable-next-line max-len
|
|
126
125
|
themeColor: t.oneOf([
|
|
127
126
|
"base",
|
|
128
127
|
"primary",
|
package/Chip/Chip.d.ts
CHANGED
|
@@ -341,6 +341,7 @@ export interface ChipProps {
|
|
|
341
341
|
* - `medium`
|
|
342
342
|
* - `large`
|
|
343
343
|
* - `full`
|
|
344
|
+
* - `none`
|
|
344
345
|
*
|
|
345
346
|
* @default undefined (theme-controlled)
|
|
346
347
|
* @example
|
|
@@ -348,7 +349,7 @@ export interface ChipProps {
|
|
|
348
349
|
* <Chip rounded="full" />
|
|
349
350
|
* ```
|
|
350
351
|
*/
|
|
351
|
-
rounded?: 'small' | 'medium' | 'large' | 'full';
|
|
352
|
+
rounded?: 'small' | 'medium' | 'large' | 'full' | 'none';
|
|
352
353
|
/**
|
|
353
354
|
* Configures the `fillMode` of the Chip.
|
|
354
355
|
* The available options are:
|
|
@@ -413,7 +414,7 @@ export interface ChipAvatarProps {
|
|
|
413
414
|
/**
|
|
414
415
|
* Configures the `roundness` of the avatar
|
|
415
416
|
*/
|
|
416
|
-
rounded?: 'small' | 'medium' | 'large' | 'full';
|
|
417
|
+
rounded?: 'small' | 'medium' | 'large' | 'full' | 'none';
|
|
417
418
|
/**
|
|
418
419
|
* Sets additional CSS styles to the avatar
|
|
419
420
|
*/
|
package/Chip/Chip.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 z=require("react"),c=require("prop-types"),k=require("./chip-list-contexts.js"),t=require("@progress/kendo-react-common"),D=require("@progress/kendo-svg-icons"),y=require("./focus-reducer.js"),q=require("./data-reducer.js"),N=require("./selection-reducer.js");function B(e){const d=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const l in e)if(l!=="default"){const i=Object.getOwnPropertyDescriptor(e,l);Object.defineProperty(d,l,i.get?i:{enumerable:!0,get:()=>e[l]})}}return d.default=e,Object.freeze(d)}const a=B(z),O=a.forwardRef((e,d)=>{const l=a.useRef(null),i=a.useRef(null),{disabled:I=o.disabled,fillMode:u=o.fillMode,themeColor:E=o.themeColor,size:f=o.size,rounded:g=o.rounded,dir:A=o.dir,removeIcon:T=o.removeIcon,removeSvgIcon:M=o.removeSvgIcon,removable:m=o.removable}=e,S=t.useDir(i,A);a.useImperativeHandle(l,()=>({element:i.current,props:e})),a.useImperativeHandle(d,()=>l.current);const[v,r]=a.useContext(k.ChipListSelectionContext),[x,s]=a.useContext(k.ChipListFocusContext),[,R]=a.useContext(k.ChipListDataContext),C=a.useMemo(()=>e.selected||(Array.isArray(v)?v.some(n=>n===e.value):v===e.value),[e.selected,e.value,v]),h=a.useMemo(()=>x===e.value,[e.value,x]);a.useEffect(()=>{h&&i.current&&i.current.focus()},[h]);const _=a.useCallback(n=>{r({type:N.SELECTION_ACTION.toggle,payload:e.value,event:n})},[r,e.value]),b=a.useCallback(n=>{m&&(R({type:q.CHIP_DATA_ACTION.remove,payload:e.value,event:n}),s({type:y.FOCUS_ACTION.reset,payload:e.value,event:n}),r({type:N.SELECTION_ACTION.remove,payload:e.value,event:n}),e.onRemove&&e.onRemove.call(void 0,{target:l.current,syntheticEvent:n}))},[e.onRemove,e.value,m,R,s,r]),F=a.useCallback(n=>{switch(n.keyCode){case t.Keys.left:s({type:y.FOCUS_ACTION.prev,payload:e.value,event:n});break;case t.Keys.right:s({type:y.FOCUS_ACTION.next,payload:e.value,event:n});break;case t.Keys.enter:r({type:N.SELECTION_ACTION.toggle,payload:e.value,event:n});break;case t.Keys.delete:b(n);break}e.onKeyDown&&e.onKeyDown.call(void 0,{target:l.current,syntheticEvent:n})},[e.onKeyDown,e.value,s,r,b]),K=a.useCallback(n=>{s({payload:e.value,type:y.FOCUS_ACTION.current,event:n}),e.onFocus&&e.onFocus.call(void 0,{target:l.current,syntheticEvent:n})},[e.onFocus,e.value,s]),P=a.useCallback(n=>{e.onBlur&&e.onBlur.call(void 0,{target:l.current,syntheticEvent:n})},[e.onBlur]),w=t.useMouse(e,l,{onClick:_});return a.createElement("div",{...w,role:e.role||"button",id:e.value,style:e.style,ref:i,dir:S,tabIndex:t.getTabIndex(e.tabIndex,I,void 0),className:t.classNames("k-chip",{"k-rtl":S==="rtl","k-disabled":I,"k-selected":C,"k-focus":h,[`k-chip-${t.kendoThemeMaps.sizeMap[f]||f}`]:f,[`k-rounded-${t.kendoThemeMaps.roundedMap[g]||g}`]:g,[`k-chip-${u}`]:u,[`k-chip-${u}-${E}`]:!!(u&&E)},e.className),"aria-pressed":e.role?void 0:C,"aria-disabled":I,"aria-describedby":e.ariaDescribedBy,"aria-keyshortcuts":m?"Enter Delete":void 0,onFocus:K,onBlur:P,onKeyDown:F},C&&(e.selectedIcon||e.selectedSvgIcon)&&a.createElement(t.IconWrap,{className:"k-chip-icon",name:e.selectedIcon?t.toIconName(e.selectedIcon):void 0,icon:e.selectedSvgIcon,size:"small"}),(e.icon||e.svgIcon)&&a.createElement(t.IconWrap,{className:"k-chip-icon",name:e.icon?t.toIconName(e.icon):void 0,icon:e.svgIcon,size:"small"}),e.avatar&&a.createElement("div",{className:t.classNames("k-chip-avatar","k-avatar",e.avatar.rounded&&`k-rounded-${e.avatar.rounded}`),style:e.avatar.style},a.createElement("span",{className:"k-avatar-image"},a.createElement("img",{src:e.avatar.image,alt:e.avatar.imageAlt}))),a.createElement("span",{className:"k-chip-content"},e.children!==void 0?e.children:e.text&&a.createElement("span",{"aria-label":e.ariaLabel||e.text,className:"k-chip-label"},e.text)),m&&a.createElement("span",{className:"k-chip-actions"},a.createElement("span",{className:t.classNames("k-chip-action","k-chip-remove-action"),onClick:b},a.createElement(t.IconWrap,{name:T?t.toIconName(T):void 0,icon:M||D.xCircleIcon,size:"small"}))))}),L={id:c.string,text:c.string,value:c.any,dir:c.oneOf(["ltr","rtl"]),removable:c.bool,removeIcon:c.string,removeIconSvg:t.svgIconPropType,disabled:c.bool,icon:c.string,svgIcon:t.svgIconPropType,selectedIcon:c.string,selectedIconSvg:t.svgIconPropType,onRemove:c.func,dataItem:c.any,selected:c.bool,ariaDescribedBy:c.string,size:c.oneOf(["small","medium","large"]),rounded:c.oneOf(["small","medium","large","full"]),fillMode:c.oneOf(["outline","solid"]),themeColor:c.oneOf(["base","info","success","warning","error"])},o={disabled:!1,removable:!1,removeIcon:"k-i-x-circle",removeSvgIcon:D.xCircleIcon,dir:"ltr",size:void 0,rounded:void 0,fillMode:void 0,themeColor:void 0};O.displayName="KendoReactChip";O.propTypes=L;exports.Chip=O;
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const z=require("react"),c=require("prop-types"),k=require("./chip-list-contexts.js"),t=require("@progress/kendo-react-common"),D=require("@progress/kendo-svg-icons"),y=require("./focus-reducer.js"),q=require("./data-reducer.js"),N=require("./selection-reducer.js");function B(e){const d=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const l in e)if(l!=="default"){const i=Object.getOwnPropertyDescriptor(e,l);Object.defineProperty(d,l,i.get?i:{enumerable:!0,get:()=>e[l]})}}return d.default=e,Object.freeze(d)}const a=B(z),O=a.forwardRef((e,d)=>{const l=a.useRef(null),i=a.useRef(null),{disabled:I=o.disabled,fillMode:u=o.fillMode,themeColor:E=o.themeColor,size:f=o.size,rounded:g=o.rounded,dir:A=o.dir,removeIcon:T=o.removeIcon,removeSvgIcon:M=o.removeSvgIcon,removable:m=o.removable}=e,S=t.useDir(i,A);a.useImperativeHandle(l,()=>({element:i.current,props:e})),a.useImperativeHandle(d,()=>l.current);const[v,r]=a.useContext(k.ChipListSelectionContext),[x,s]=a.useContext(k.ChipListFocusContext),[,R]=a.useContext(k.ChipListDataContext),C=a.useMemo(()=>e.selected||(Array.isArray(v)?v.some(n=>n===e.value):v===e.value),[e.selected,e.value,v]),h=a.useMemo(()=>x===e.value,[e.value,x]);a.useEffect(()=>{h&&i.current&&i.current.focus()},[h]);const _=a.useCallback(n=>{r({type:N.SELECTION_ACTION.toggle,payload:e.value,event:n})},[r,e.value]),b=a.useCallback(n=>{m&&(R({type:q.CHIP_DATA_ACTION.remove,payload:e.value,event:n}),s({type:y.FOCUS_ACTION.reset,payload:e.value,event:n}),r({type:N.SELECTION_ACTION.remove,payload:e.value,event:n}),e.onRemove&&e.onRemove.call(void 0,{target:l.current,syntheticEvent:n}))},[e.onRemove,e.value,m,R,s,r]),F=a.useCallback(n=>{switch(n.keyCode){case t.Keys.left:s({type:y.FOCUS_ACTION.prev,payload:e.value,event:n});break;case t.Keys.right:s({type:y.FOCUS_ACTION.next,payload:e.value,event:n});break;case t.Keys.enter:r({type:N.SELECTION_ACTION.toggle,payload:e.value,event:n});break;case t.Keys.delete:b(n);break}e.onKeyDown&&e.onKeyDown.call(void 0,{target:l.current,syntheticEvent:n})},[e.onKeyDown,e.value,s,r,b]),K=a.useCallback(n=>{s({payload:e.value,type:y.FOCUS_ACTION.current,event:n}),e.onFocus&&e.onFocus.call(void 0,{target:l.current,syntheticEvent:n})},[e.onFocus,e.value,s]),P=a.useCallback(n=>{e.onBlur&&e.onBlur.call(void 0,{target:l.current,syntheticEvent:n})},[e.onBlur]),w=t.useMouse(e,l,{onClick:_});return a.createElement("div",{...w,role:e.role||"button",id:e.value,style:e.style,ref:i,dir:S,tabIndex:t.getTabIndex(e.tabIndex,I,void 0),className:t.classNames("k-chip",{"k-rtl":S==="rtl","k-disabled":I,"k-selected":C,"k-focus":h,[`k-chip-${t.kendoThemeMaps.sizeMap[f]||f}`]:f,[`k-rounded-${t.kendoThemeMaps.roundedMap[g]||g}`]:g,[`k-chip-${u}`]:u,[`k-chip-${u}-${E}`]:!!(u&&E)},e.className),"aria-pressed":e.role?void 0:C,"aria-disabled":I,"aria-describedby":e.ariaDescribedBy,"aria-keyshortcuts":m?"Enter Delete":void 0,onFocus:K,onBlur:P,onKeyDown:F},C&&(e.selectedIcon||e.selectedSvgIcon)&&a.createElement(t.IconWrap,{className:"k-chip-icon",name:e.selectedIcon?t.toIconName(e.selectedIcon):void 0,icon:e.selectedSvgIcon,size:"small"}),(e.icon||e.svgIcon)&&a.createElement(t.IconWrap,{className:"k-chip-icon",name:e.icon?t.toIconName(e.icon):void 0,icon:e.svgIcon,size:"small"}),e.avatar&&a.createElement("div",{className:t.classNames("k-chip-avatar","k-avatar",e.avatar.rounded&&`k-rounded-${e.avatar.rounded}`),style:e.avatar.style},a.createElement("span",{className:"k-avatar-image"},a.createElement("img",{src:e.avatar.image,alt:e.avatar.imageAlt}))),a.createElement("span",{className:"k-chip-content"},e.children!==void 0?e.children:e.text&&a.createElement("span",{"aria-label":e.ariaLabel||e.text,className:"k-chip-label"},e.text)),m&&a.createElement("span",{className:"k-chip-actions"},a.createElement("span",{className:t.classNames("k-chip-action","k-chip-remove-action"),onClick:b},a.createElement(t.IconWrap,{name:T?t.toIconName(T):void 0,icon:M||D.xCircleIcon,size:"small"}))))}),L={id:c.string,text:c.string,value:c.any,dir:c.oneOf(["ltr","rtl"]),removable:c.bool,removeIcon:c.string,removeIconSvg:t.svgIconPropType,disabled:c.bool,icon:c.string,svgIcon:t.svgIconPropType,selectedIcon:c.string,selectedIconSvg:t.svgIconPropType,onRemove:c.func,dataItem:c.any,selected:c.bool,ariaDescribedBy:c.string,size:c.oneOf(["small","medium","large"]),rounded:c.oneOf(["small","medium","large","full","none"]),fillMode:c.oneOf(["outline","solid"]),themeColor:c.oneOf(["base","info","success","warning","error"])},o={disabled:!1,removable:!1,removeIcon:"k-i-x-circle",removeSvgIcon:D.xCircleIcon,dir:"ltr",size:void 0,rounded:void 0,fillMode:void 0,themeColor:void 0};O.displayName="KendoReactChip";O.propTypes=L;exports.Chip=O;
|
package/Chip/Chip.mjs
CHANGED
|
@@ -175,9 +175,8 @@ const z = a.forwardRef((e, A) => {
|
|
|
175
175
|
selected: l.bool,
|
|
176
176
|
ariaDescribedBy: l.string,
|
|
177
177
|
size: l.oneOf(["small", "medium", "large"]),
|
|
178
|
-
rounded: l.oneOf(["small", "medium", "large", "full"]),
|
|
178
|
+
rounded: l.oneOf(["small", "medium", "large", "full", "none"]),
|
|
179
179
|
fillMode: l.oneOf(["outline", "solid"]),
|
|
180
|
-
// eslint-disable-next-line max-len
|
|
181
180
|
themeColor: l.oneOf(["base", "info", "success", "warning", "error"])
|
|
182
181
|
}, n = {
|
|
183
182
|
disabled: !1,
|
|
@@ -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 ye=require("react"),
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const ye=require("react"),n=require("prop-types"),o=require("@progress/kendo-react-common"),he=require("./FloatingActionButtonItem.js"),O=require("./utils.js"),ve=require("@progress/kendo-react-popup");function Ce(d){const g=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(d){for(const r in d)if(r!=="default"){const k=Object.getOwnPropertyDescriptor(d,r);Object.defineProperty(g,r,k.get?k:{enumerable:!0,get:()=>d[r]})}}return g.default=d,Object.freeze(g)}const t=Ce(ye),Ie=2,Ee=100,M=t.forwardRef((d,g)=>{const{align:r=v.align,alignOffset:k,className:q,disabled:f,icon:R,svgIcon:w,iconClass:$,id:j,items:a,item:ee,text:C,positionMode:A=v.positionMode,size:I=v.size,style:te,rounded:E=v.rounded,themeColor:F=v.themeColor,overlayStyle:oe,tabIndex:ne,accessKey:se,popupSettings:D={},modal:ae,onClick:P,onItemClick:_,onFocus:S,onBlur:W,onKeyDown:Z,onOpen:H,onClose:L,...le}=d,X=o.useZIndexContext(),U=X?X+Ie:Ee,G=t.useRef(null),i=t.useRef(null),ie=t.useRef(null),re=t.useRef(null),J=t.useCallback(()=>{i.current&&i.current.focus()},[]),p=t.useCallback(()=>({element:i.current,focus:J}),[J]);t.useImperativeHandle(G,p),t.useImperativeHandle(g,()=>G.current);const[c,u]=t.useState(!1),[x,m]=t.useState(!1),[y,l]=t.useState(-1),ce=o.useId()+"-button-id",T=o.useDir(i,d.dir),h=T==="rtl",N=o.useId()+"-list-id";t.useEffect(()=>{O.position(i,r,k,h)},[i,r,k,h]),t.useEffect(()=>{x&&i&&i.current&&i.current.focus()},[x,i]);const b=t.useCallback((e,s)=>{a&&o.dispatchEvent(s?H:L,e,p(),void 0)},[H,L,a]),Q=t.useCallback(e=>{!e.target||f||(!a&&P?o.dispatchEvent(P,e,p(),void 0):(u(!c),m(!0),l(c?-1:0),b(e,!c)))},[u,m,l,P,b,c,a,f]),ue=t.useCallback(e=>{m(!0),l(c?0:-1),S&&o.dispatchEvent(S,e,p(),void 0)},[S,m,l]),de=t.useCallback(e=>{m(!1),u(!1),l(-1),o.dispatchEvent(W,e,p(),void 0),c&&b(e,!1)},[W,m,u,l,b]),fe=t.useCallback(e=>{e.preventDefault()},[]),z=t.useCallback((e,s)=>{a&&(a[s].disabled||o.dispatchEvent(_,e,p(),{itemProps:a[s],itemIndex:s}))},[_]),pe=t.useCallback((e,s)=>{!e.target||!a||(l(s),u(!1),z(e,s),b(e,!1))},[l,u,z,b]),me=t.useCallback(e=>{o.getActiveElement(document)===i.current&&e.preventDefault()},[i]),be=t.useCallback(e=>{const s=y,B=a?a.length:-1;if(e.altKey){!c&&e.keyCode===o.Keys.down&&(e.preventDefault(),u(!0),l(0)),c&&e.keyCode===o.Keys.up&&(e.preventDefault(),u(!1),l(-1));return}switch(e.keyCode){case o.Keys.enter:case o.Keys.space:s>=0&&z(e,s),a||Q(e),e.preventDefault(),u(!c),l(c?-1:0);break;case o.Keys.esc:e.preventDefault(),u(!1),l(-1);break;case o.Keys.home:e.preventDefault(),l(0);break;case o.Keys.end:e.preventDefault(),l(B-1);break;case o.Keys.down:case o.Keys.right:e.preventDefault(),l(s+1>=B?0:s+1);break;case o.Keys.up:case o.Keys.left:e.preventDefault(),l(s-1<0?B-1:s-1);break}o.dispatchEvent(Z,e,p(),void 0)},[Z,y,l,h,u]),ge=t.useMemo(()=>o.classNames("k-fab",{"k-fab-sm":I==="small","k-fab-md":I==="medium","k-fab-lg":I==="large","k-disabled":f,"k-pos-absolute":A==="absolute","k-pos-fixed":A==="fixed","k-focus":x,[`k-rounded-${o.kendoThemeMaps.roundedMap[E]||E}`]:E,[`k-fab-${F}`]:F},`k-${r.vertical}-${r.horizontal}`,q),[F,I,E,f,A,r,x,q]),ke=a&&a.map((e,s)=>t.createElement(he.FloatingActionButtonItem,{...e,key:s,index:s,id:`${N}-${s}`,disabled:f||e.disabled,focused:y===s,dataItem:e,item:ee,className:o.classNames(e.className,O.getTextDirectionClass(T||"ltr",r.horizontal)),onClick:pe,onDown:me})),V=!!((R||w)&&!C),Y=(i.current?i.current.offsetWidth:0)/2-32/2;let K;return R||w?K=t.createElement(o.IconWrap,{className:"k-fab-icon",name:R,icon:w}):$?K=t.createElement("span",{role:"presentation",className:$}):K=null,t.createElement(o.ZIndexContext.Provider,{value:U},t.createElement(t.Fragment,null,t.createElement("button",{ref:i,id:j||ce,role:"button",type:"button","aria-disabled":f,"aria-expanded":a?c:void 0,"aria-haspopup":!!a,"aria-label":`${C||""} floatingactionbutton`,"aria-owns":a?N:void 0,"aria-activedescendant":y>=0&&a?`${N}-${y}`:void 0,tabIndex:o.getTabIndex(ne,f),accessKey:se,dir:T,disabled:f,className:ge,style:te,onClick:Q,onMouseDown:fe,onFocus:ue,onBlur:de,onKeyDown:be,...le},K,C&&t.createElement("span",{className:"k-fab-text"},C)),ae&&c&&t.createElement("div",{className:"k-overlay",style:{zIndex:U,...oe}}),t.createElement(ve.Popup,{ref:re,anchor:i.current,show:c,animate:D.animate,popupClass:o.classNames("k-popup-transparent k-fab-popup",D.popupClass),anchorAlign:D.anchorAlign||O.getAnchorAlign(r,h),popupAlign:D.popupAlign||O.getPopupAlign(r,h),style:{boxShadow:"none"}},t.createElement("ul",{ref:ie,role:"menu","aria-labelledby":j,id:N,className:o.classNames("k-fab-items",{"k-fab-items-bottom":r.vertical!=="bottom","k-fab-items-top":r.vertical==="bottom"}),style:{paddingLeft:V?Y:void 0,paddingRight:V?Y:void 0}},ke))))});M.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:o.svgIconPropType,iconClass:n.string,text:n.string,alignOffset:n.shape({x:n.oneOfType([n.number,n.string]).isRequired,y:n.oneOfType([n.number,n.string]).isRequired}),align:n.shape({vertical:n.oneOf(["top","middle","bottom"]).isRequired,horizontal:n.oneOf(["start","center","end"]).isRequired}),positionMode:n.oneOf(["absolute","fixed"]),size:n.oneOf(["small","medium","large"]),rounded:n.oneOf(["small","medium","large","full","none"]),themeColor:n.oneOf(["primary","secondary","tertiary","info","success","warning","error","dark","light","inverse"]),modal:n.bool,overlayStyle:n.object};const v={align:{vertical:"bottom",horizontal:"end"},size:void 0,rounded:void 0,themeColor:void 0,positionMode:"fixed"};M.displayName="KendoFloatingActionButton";exports.FloatingActionButton=M;
|
|
@@ -282,7 +282,7 @@ ee.propTypes = {
|
|
|
282
282
|
}),
|
|
283
283
|
positionMode: o.oneOf(["absolute", "fixed"]),
|
|
284
284
|
size: o.oneOf(["small", "medium", "large"]),
|
|
285
|
-
rounded: o.oneOf(["small", "medium", "large", "full"]),
|
|
285
|
+
rounded: o.oneOf(["small", "medium", "large", "full", "none"]),
|
|
286
286
|
themeColor: o.oneOf([
|
|
287
287
|
"primary",
|
|
288
288
|
"secondary",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* * `medium`
|
|
14
14
|
* * `large`
|
|
15
15
|
* * `full`
|
|
16
|
-
* * `
|
|
16
|
+
* * `none`
|
|
17
17
|
*
|
|
18
18
|
*/
|
|
19
|
-
export type FloatingActionButtonRounded = 'small' | 'medium' | 'large' | 'full';
|
|
19
|
+
export type FloatingActionButtonRounded = 'small' | 'medium' | 'large' | 'full' | 'none';
|
|
@@ -12,7 +12,6 @@
|
|
|
12
12
|
* * `small`—Applies half of the default padding, e.g. `8px`.
|
|
13
13
|
* * `medium` (Default)—Applies the default padding, e.g. `16px`.
|
|
14
14
|
* * `large`—Applies one and one half of the default padding, e.g. `24px`.
|
|
15
|
-
* * `null`—Does not set a size `className`.
|
|
16
15
|
*
|
|
17
16
|
*/
|
|
18
17
|
export type FloatingActionButtonSize = 'small' | 'medium' | 'large';
|
|
@@ -19,7 +19,6 @@
|
|
|
19
19
|
* * `dark`— Applies coloring based on the dark theme color.
|
|
20
20
|
* * `light`— Applies coloring based on the light theme color.
|
|
21
21
|
* * `inverse`— Applies coloring based on the inverse theme color.
|
|
22
|
-
* * `null`—Does not set a theme color `className`.
|
|
23
22
|
*
|
|
24
23
|
*/
|
|
25
|
-
export type FloatingActionButtonThemeColor =
|
|
24
|
+
export type FloatingActionButtonThemeColor = 'primary' | 'secondary' | 'tertiary' | 'info' | 'success' | 'warning' | 'error' | 'dark' | 'light' | 'inverse';
|
|
@@ -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 N=require("react"),
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const N=require("react"),o=require("prop-types"),M=require("../Button.js"),e=require("@progress/kendo-react-common"),R=require("./utils/navigation.js"),A=require("./DropDownButtonItem.js"),T=require("./ButtonItem.js"),q=require("@progress/kendo-react-popup"),m=require("./utils/popup.js"),f=require("../package-metadata.js");function z(c){const i=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(c){for(const t in c)if(t!=="default"){const s=Object.getOwnPropertyDescriptor(c,t);Object.defineProperty(i,t,s.get?s:{enumerable:!0,get:()=>c[t]})}}return i.default=c,Object.freeze(i)}const u=z(N),L=12e3,j=2e3,h=class h extends u.Component{constructor(i){super(i),this.state={opened:!1,focused:!1,focusedIndex:-1},this.mainButton=null,this.list=null,this.skipFocus=!1,this.showLicenseWatermark=!1,this.buttonsData=[],this.onKeyDown=t=>{const{focusedIndex:s}=this.state;if(t.altKey){!this.opened&&t.keyCode===e.Keys.down?(t.preventDefault(),this.setOpen(!0,t),this.setState({focusedIndex:0})):this.opened&&t.keyCode===e.Keys.up&&(t.preventDefault(),this.setState({focusedIndex:-1}),this.setOpen(!1,t));return}const n={...this.state};if(t.keyCode===e.Keys.enter||t.keyCode===e.Keys.space){t.preventDefault(),s>=0&&this.dispatchClickEvent(t,s);const a=!this.opened;this.setState({focused:!0,focusedIndex:a?0:-1}),this.setOpen(a,t);return}if(this.opened&&t.keyCode===e.Keys.esc){this.setState({focusedIndex:-1}),this.setOpen(!1,t);return}if(this.opened){const a=R.navigate(s,t.keyCode,t.altKey,this.buttonsData.length);n.focusedIndex=a;const l=t.keyCode===e.Keys.up||t.keyCode===e.Keys.down||t.keyCode===e.Keys.left||t.keyCode===e.Keys.right;!t.altKey&&(l||t.keyCode===e.Keys.home||t.keyCode===e.Keys.end)&&t.preventDefault()}this.setState(n)},this.switchFocus=t=>{this.skipFocus=!0,t(),window.setTimeout(()=>this.skipFocus=!1,0)},this.handleFocus=t=>{this.skipFocus||(this.setState({focused:!0,focusedIndex:this.opened?0:-1}),e.dispatchEvent(this.props.onFocus,t,this,void 0))},this.handleButtonBlur=t=>{this.opened||(this.setState({focused:!1}),e.dispatchEvent(this.props.onBlur,t,this,void 0))},this.handleMenuBlur=t=>{this.skipFocus||(this.setState({focused:!1,focusedIndex:-1}),e.dispatchEvent(this.props.onBlur,t,this,void 0),setTimeout(()=>{this.setOpen(!1,t)},0))},this.setOpen=(t,s)=>{this.opened!==t&&(this.openedDuringOnChange=t,this.setState({opened:t}),s?this.dispatchPopupEvent(s,t):this.openedDuringOnChange=void 0)},this.onItemClick=(t,s)=>{this.setState({focusedIndex:-1}),this.dispatchClickEvent(t,s),this.setOpen(!1,t)},this.onItemDown=t=>{e.getActiveElement(document)===this.list&&t.preventDefault()},this.mouseDown=t=>{t.preventDefault();const s=e.getActiveElement(document);this.element&&s!==this.element&&s!==this.list&&this.element.focus()},this.onPopupClose=t=>{var n;const s=e.getActiveElement(document);this.element&&this.element.removeAttribute("tabindex"),(s===this.list||(n=this.list)!=null&&n.contains(s))&&this.switchFocus(()=>{this.element&&this.element.focus({preventScroll:!0})}),this.props.popupSettings&&this.props.popupSettings.onClose&&this.props.popupSettings.onClose.call(void 0,t)},this.listRef=t=>{this.list=t,t&&this.state.focused&&this.switchFocus(()=>{t.focus({preventScroll:!0}),this.element&&(this.element.tabIndex=-1)})},this.onClickMainButton=t=>{if(e.dispatchEvent(this.props.onClick,t,this,void 0),!this.buttonsData.length)return;const s=!this.opened;this.setState({focused:!0,focusedIndex:s?0:-1}),this.setOpen(s,t)},this.dispatchPopupEvent=(t,s)=>{e.dispatchEvent(s?this.props.onOpen:this.props.onClose,t,this,void 0),this.openedDuringOnChange=void 0},this.showLicenseWatermark=!e.validatePackage(f.packageMetadata,{component:"DropDownButton"}),this.licenseMessage=e.getLicenseMessage(f.packageMetadata)}get guid(){return this.props.id+"-accessibility-id"}get opened(){return this.openedDuringOnChange!==void 0?this.openedDuringOnChange:this.props.opened===void 0?this.state.opened:this.props.opened}render(){const i=this.isRtl(),t=this.props.unstyled&&this.props.unstyled.uDropDownButton,s=i?"rtl":void 0,{id:n,style:a,tabIndex:l,disabled:r,size:y,rounded:C,fillMode:k,themeColor:w,ariaLabel:I,title:b,accessKey:B,icon:O,svgIcon:v,iconClass:E,buttonClass:S,className:x,imageUrl:P,startIcon:K,endIcon:F}=this.props;return this.buttonsData=this.props.items||u.Children.toArray(this.props.children).filter(p=>p&&p.type===A.DropDownButtonItem).map(p=>p.props),u.createElement(u.Fragment,null,u.createElement(M.Button,{id:n,size:y,style:a,rounded:C,fillMode:k,themeColor:w,onClick:this.onClickMainButton,onMouseDown:this.mouseDown,onKeyDown:this.onKeyDown,onFocus:this.handleFocus,onBlur:this.handleButtonBlur,"aria-disabled":r?"true":void 0,tabIndex:l,accessKey:B,icon:O,svgIcon:v,iconClass:E,className:e.classNames(S,x,e.uDropDownButton.wrapper({c:t,focused:this.state.focused,disabled:r})),imageUrl:P,dir:s,ref:p=>{this.mainButton=(p==null?void 0:p.element)||null},type:"button","aria-expanded":this.opened?"true":"false","aria-label":I,"aria-controls":this.opened?this.guid:void 0,title:b,startIcon:K,endIcon:F},this.props.text),this.showLicenseWatermark&&u.createElement(e.WatermarkOverlay,{message:this.licenseMessage}),this.renderPopup(i))}componentDidMount(){(this.props.dir===void 0&&this.isRtl()||this.opened)&&this.forceUpdate()}get element(){return this.mainButton}dispatchClickEvent(i,t){this.isItemDisabled(t)||e.dispatchEvent(this.props.onItemClick,i,this,{item:this.buttonsData[t],itemIndex:t})}renderPopup(i){const{popupSettings:t={},_zIndex:s,unstyled:n}=this.props,a=s?s+j:L,l=n&&n.uDropDownButton,{focusedIndex:r}=this.state;return u.createElement(e.ZIndexContext.Provider,{value:a},u.createElement(q.Popup,{anchor:this.mainButton,show:this.opened,animate:t.animate,popupClass:e.classNames(e.uDropDownButton.popup({c:l}),t.popupClass),anchorAlign:t.anchorAlign||m.getAnchorAlign(i),popupAlign:t.popupAlign||m.getPopupAlign(i),style:i?{direction:"rtl"}:void 0,onClose:this.onPopupClose},u.createElement("ul",{role:"list",id:this.guid,tabIndex:-1,"aria-activedescendant":r>=0?`${this.guid}-${r}`:void 0,ref:this.listRef,onKeyDown:this.onKeyDown,onBlur:this.handleMenuBlur,className:e.classNames(e.uDropDownButton.ul({c:l,size:this.props.size}))},this.renderChildItems())))}renderChildItems(){const{item:i,itemRender:t,textField:s,unstyled:n}=this.props,a=n&&n.uDropDownButton;return this.buttonsData.length>0?this.buttonsData.map((l,r)=>u.createElement(T.ButtonItem,{className:e.classNames(e.uDropDownButton.item({c:a}),l.className,{"k-first":r===0},{"k-last":r===this.buttonsData.length-1}),dataItem:l,textField:s,focused:this.state.focusedIndex===r,onClick:this.onItemClick,onDown:this.onItemDown,render:t,item:i,index:r,key:r,id:`${this.guid}-${r}`})):null}isItemDisabled(i){return this.buttonsData[i]?this.buttonsData[i].disabled:this.props.disabled}isRtl(){return this.props.dir!==void 0?this.props.dir==="rtl":!!this.mainButton&&getComputedStyle(this.mainButton).direction==="rtl"}};h.propTypes={accessKey:o.string,ariaLabel:o.string,title:o.string,onFocus:o.func,onBlur:o.func,onClick:o.func,onItemClick:o.func,onOpen:o.func,onClose:o.func,items:o.arrayOf(o.any),textField:o.string,tabIndex:o.number,disabled:o.bool,icon:o.string,svgIcon:e.svgIconPropType,iconClass:o.string,imageUrl:o.string,popupSettings:o.object,itemRender:o.func,item:o.func,className:o.string,buttonClass:o.string,dir:o.string,size:o.oneOf(["small","medium","large"]),rounded:o.oneOf(["small","medium","large","full","none"]),fillMode:o.oneOf(["flat","link","outline","solid","clear"]),themeColor:o.oneOf(["base","primary","secondary","tertiary","info","success","warning","error","dark","light","inverse"])},h.defaultProps={size:void 0,rounded:void 0,fillMode:void 0,themeColor:void 0};let d=h;const g=e.createPropsContext(),D=e.withIdHOC(e.withPropsContext(g,e.withUnstyledHOC(e.withZIndexContext(d))));D.displayName="KendoReactDropDownButton";exports.DropDownButton=D;exports.DropDownButtonPropsContext=g;exports.DropDownButtonWithoutContext=d;
|
|
@@ -277,7 +277,7 @@ m.propTypes = {
|
|
|
277
277
|
buttonClass: s.string,
|
|
278
278
|
dir: s.string,
|
|
279
279
|
size: s.oneOf(["small", "medium", "large"]),
|
|
280
|
-
rounded: s.oneOf(["small", "medium", "large", "full"]),
|
|
280
|
+
rounded: s.oneOf(["small", "medium", "large", "full", "none"]),
|
|
281
281
|
fillMode: s.oneOf(["flat", "link", "outline", "solid", "clear"]),
|
|
282
282
|
themeColor: s.oneOf([
|
|
283
283
|
"base",
|
|
@@ -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 g=require("react"),i=require("prop-types"),c=require("../Button.js"),s=require("@progress/kendo-react-common"),y=require("./ButtonItem.js"),k=require("./SplitButtonItem.js"),C=require("./utils/navigation.js"),b=require("@progress/kendo-react-popup"),m=require("./utils/popup.js"),f=require("../package-metadata.js"),D=require("@progress/kendo-svg-icons");function I(l){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(l){for(const t in l)if(t!=="default"){const e=Object.getOwnPropertyDescriptor(l,t);Object.defineProperty(o,t,e.get?e:{enumerable:!0,get:()=>l[t]})}}return o.default=l,Object.freeze(o)}const p=I(g),d=class d extends p.Component{constructor(o){super(o),this.state={focused:!1,focusedIndex:-1,opened:!1},this.wrapper=null,this.mainButton=null,this.list=null,this.skipFocus=!1,this.buttonsData=[],this.showLicenseWatermark=!1,this.onKeyDown=t=>{const{focusedIndex:e}=this.state;if(t.altKey){!this.opened&&t.keyCode===s.Keys.down?(t.preventDefault(),this.setState({focusedIndex:0}),this.setOpen(!0,t)):this.opened&&t.keyCode===s.Keys.up&&(t.preventDefault(),this.setState({focusedIndex:-1}),this.setOpen(!1,t));return}let n;if(t.keyCode===s.Keys.enter||t.keyCode===s.Keys.space){if(t.preventDefault(),this.dispatchClickEvent(t,e),e>=0){n={focusedIndex:this.opened?-1:0};const r=!this.opened;this.setOpen(r,t)}}else if(this.opened&&t.keyCode===s.Keys.esc){this.setState({focusedIndex:-1}),this.setOpen(!1,t);return}if(this.opened){const r=C.navigate(e,t.keyCode,t.altKey,this.buttonsData.length);r!==e&&(n=n||{},n.focusedIndex=r);const h=t.keyCode===s.Keys.up||t.keyCode===s.Keys.down||t.keyCode===s.Keys.left||t.keyCode===s.Keys.right;!t.altKey&&(h||t.keyCode===s.Keys.home||t.keyCode===s.Keys.end)&&t.preventDefault()}n&&this.setState(n)},this.switchFocus=t=>{this.skipFocus=!0,t(),window.setTimeout(()=>this.skipFocus=!1,0)},this.onFocus=t=>{this.skipFocus||(s.dispatchEvent(this.props.onFocus,t,this,void 0),this.setState({focused:!0}))},this.setOpen=(t,e)=>{this.opened!==t&&(this.openedDuringOnChange=t,this.setState({opened:t}),e?this.dispatchPopupEvent(e,t):this.openedDuringOnChange=void 0)},this.onItemClick=(t,e)=>{this.opened&&this.setState({focusedIndex:0}),this.dispatchClickEvent(t,e),this.setOpen(!1,t)},this.onBlur=t=>{this.skipFocus||(this.setState({focused:!1,focusedIndex:-1}),s.dispatchEvent(this.props.onBlur,t,this,void 0),setTimeout(()=>{this.setOpen(!1,t)},0))},this.onPopupClose=t=>{var n;const e=s.getActiveElement(document);this.element&&this.element.removeAttribute("tabindex"),(e===this.list||(n=this.list)!=null&&n.contains(e))&&this.switchFocus(()=>{this.element&&this.element.focus({preventScroll:!0})}),this.props.popupSettings&&this.props.popupSettings.onClose&&this.props.popupSettings.onClose.call(void 0,t)},this.listRef=t=>{this.list=t,t&&this.state.focused&&this.switchFocus(()=>{t.focus({preventScroll:!0}),this.element&&(this.element.tabIndex=-1)})},this.onSplitPartClick=t=>{if(this.buttonsData.length){const e=!this.opened;this.setState({focusedIndex:e?0:-1,focused:!0}),this.setOpen(e,t)}},this.onDownSplitPart=t=>{t.preventDefault();const e=s.getActiveElement(document);this.element&&e!==this.element&&e!==this.list&&this.element.focus()},this.onItemDown=t=>{s.getActiveElement(document)===this.list&&t.preventDefault()},this.dispatchPopupEvent=(t,e)=>{s.dispatchEvent(e?this.props.onOpen:this.props.onClose,t,this,void 0),this.openedDuringOnChange=void 0},this.showLicenseWatermark=!s.validatePackage(f.packageMetadata,{component:"SplitButton"}),this.licenseMessage=s.getLicenseMessage(f.packageMetadata)}get guid(){return this.props.id?this.props.id+"-accessibility-id":this.props.id}get opened(){return this.openedDuringOnChange!==void 0?this.openedDuringOnChange:this.props.opened===void 0?this.state.opened:this.props.opened}render(){this.buttonsData=this.props.items||p.Children.toArray(this.props.children).filter(a=>a&&a.type===k.SplitButtonItem).map(a=>a.props);const o=this.isRtl(),t=o?"rtl":void 0,{id:e,style:n,tabIndex:r,disabled:h}=this.props;return p.createElement(p.Fragment,null,p.createElement("div",{id:e,style:n,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:a=>{this.wrapper=a}},p.createElement(c.Button,{ref:a=>{this.mainButton=a&&a.element},type:"button",size:this.props.size,rounded:this.props.rounded,fillMode:this.props.fillMode,themeColor:this.props.themeColor,onClick:a=>this.onItemClick(a,-1),disabled:h||void 0,tabIndex:r,accessKey:this.props.accessKey,className:this.props.buttonClass,icon:this.props.icon,svgIcon:this.props.svgIcon,iconClass:this.props.iconClass,startIcon:this.props.startIcon,endIcon:this.props.endIcon,imageUrl:this.props.imageUrl,dir:t,"aria-disabled":h,"aria-haspopup":!0,"aria-expanded":this.opened||void 0,"aria-label":this.props.ariaLabel,"aria-controls":this.opened?this.guid:void 0,id:"button-"+this.guid,title:this.props.title},this.props.text),p.createElement(c.Button,{type:"button",size:this.props.size,rounded:this.props.rounded,fillMode:this.props.fillMode,themeColor:this.props.themeColor,icon:"caret-alt-down",svgIcon:D.caretAltDownIcon,className:"k-split-button-arrow",disabled:h||void 0,tabIndex:-1,onClick:this.onSplitPartClick,onMouseDown:this.onDownSplitPart,onPointerDown:this.onDownSplitPart,dir:t,"aria-label":"menu toggling button"}),this.renderPopup(o)),this.showLicenseWatermark&&p.createElement(s.WatermarkOverlay,{message:this.licenseMessage}))}componentDidMount(){(this.props.dir===void 0&&this.isRtl()||this.opened)&&this.forceUpdate()}get element(){return this.mainButton}dispatchClickEvent(o,t){this.isItemDisabled(t)||(t===-1?s.dispatchEvent(this.props.onButtonClick,o,this,void 0):s.dispatchEvent(this.props.onItemClick,o,this,{item:this.buttonsData[t],itemIndex:t}))}renderPopup(o){const{popupSettings:t={}}=this.props,{focusedIndex:e}=this.state;return p.createElement(b.Popup,{anchor:this.wrapper,show:this.opened,animate:t.animate,popupClass:s.classNames("k-menu-popup",t.popupClass),anchorAlign:t.anchorAlign||m.getAnchorAlign(o),popupAlign:t.popupAlign||m.getPopupAlign(o),style:o?{direction:"rtl"}:void 0,onClose:this.onPopupClose},p.createElement("ul",{role:"menu",id:this.guid,"aria-labelledby":"button-"+this.guid,tabIndex:-1,ref:this.listRef,"aria-activedescendant":e>=0?`${this.guid}-${e}`:void 0,className:s.classNames("k-menu-group",{[`k-menu-group-${s.kendoThemeMaps.sizeMap[this.props.size]||this.props.size}`]:this.props.size})},this.renderChildItems()))}renderChildItems(){const{item:o,itemRender:t,textField:e}=this.props;return this.buttonsData.length>0?this.buttonsData.map((n,r)=>p.createElement(y.ButtonItem,{className:s.classNames("k-menu-item",{"k-first":r===0},{"k-last":r===this.buttonsData.length-1}),dataItem:n,textField:e,focused:this.state.focusedIndex===r,onClick:this.onItemClick,onDown:this.onItemDown,render:t,item:o,key:r,index:r,id:`${this.guid}-${r}`})):null}isItemDisabled(o){return this.buttonsData[o]?this.buttonsData[o].disabled:this.props.disabled}isRtl(){return this.props.dir!==void 0?this.props.dir==="rtl":!!this.wrapper&&getComputedStyle(this.wrapper).direction==="rtl"}};d.propTypes={accessKey:i.string,ariaLabel:i.string,title:i.string,onButtonClick:i.func,onFocus:i.func,onBlur:i.func,onItemClick:i.func,onOpen:i.func,onClose:i.func,text:i.string,items:i.arrayOf(i.any),textField:i.string,tabIndex:i.number,disabled:i.bool,icon:i.string,svgIcon:s.svgIconPropType,imageUrl:i.string,popupSettings:i.object,itemRender:i.any,item:i.func,className:i.string,buttonClass:i.string,dir:i.string,size:i.oneOf(["small","medium","large"]),rounded:i.oneOf(["small","medium","large","full"]),fillMode:i.oneOf(["flat","link","outline","solid","clear"]),themeColor:i.oneOf(["base","primary","secondary","tertiary","info","success","warning","error","dark","light","inverse"])},d.defaultProps={size:void 0,rounded:void 0,fillMode:void 0,themeColor:void 0};let u=d;exports.SplitButton=u;
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("react"),i=require("prop-types"),c=require("../Button.js"),s=require("@progress/kendo-react-common"),y=require("./ButtonItem.js"),k=require("./SplitButtonItem.js"),C=require("./utils/navigation.js"),b=require("@progress/kendo-react-popup"),m=require("./utils/popup.js"),f=require("../package-metadata.js"),D=require("@progress/kendo-svg-icons");function I(l){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(l){for(const t in l)if(t!=="default"){const e=Object.getOwnPropertyDescriptor(l,t);Object.defineProperty(o,t,e.get?e:{enumerable:!0,get:()=>l[t]})}}return o.default=l,Object.freeze(o)}const p=I(g),d=class d extends p.Component{constructor(o){super(o),this.state={focused:!1,focusedIndex:-1,opened:!1},this.wrapper=null,this.mainButton=null,this.list=null,this.skipFocus=!1,this.buttonsData=[],this.showLicenseWatermark=!1,this.onKeyDown=t=>{const{focusedIndex:e}=this.state;if(t.altKey){!this.opened&&t.keyCode===s.Keys.down?(t.preventDefault(),this.setState({focusedIndex:0}),this.setOpen(!0,t)):this.opened&&t.keyCode===s.Keys.up&&(t.preventDefault(),this.setState({focusedIndex:-1}),this.setOpen(!1,t));return}let n;if(t.keyCode===s.Keys.enter||t.keyCode===s.Keys.space){if(t.preventDefault(),this.dispatchClickEvent(t,e),e>=0){n={focusedIndex:this.opened?-1:0};const r=!this.opened;this.setOpen(r,t)}}else if(this.opened&&t.keyCode===s.Keys.esc){this.setState({focusedIndex:-1}),this.setOpen(!1,t);return}if(this.opened){const r=C.navigate(e,t.keyCode,t.altKey,this.buttonsData.length);r!==e&&(n=n||{},n.focusedIndex=r);const h=t.keyCode===s.Keys.up||t.keyCode===s.Keys.down||t.keyCode===s.Keys.left||t.keyCode===s.Keys.right;!t.altKey&&(h||t.keyCode===s.Keys.home||t.keyCode===s.Keys.end)&&t.preventDefault()}n&&this.setState(n)},this.switchFocus=t=>{this.skipFocus=!0,t(),window.setTimeout(()=>this.skipFocus=!1,0)},this.onFocus=t=>{this.skipFocus||(s.dispatchEvent(this.props.onFocus,t,this,void 0),this.setState({focused:!0}))},this.setOpen=(t,e)=>{this.opened!==t&&(this.openedDuringOnChange=t,this.setState({opened:t}),e?this.dispatchPopupEvent(e,t):this.openedDuringOnChange=void 0)},this.onItemClick=(t,e)=>{this.opened&&this.setState({focusedIndex:0}),this.dispatchClickEvent(t,e),this.setOpen(!1,t)},this.onBlur=t=>{this.skipFocus||(this.setState({focused:!1,focusedIndex:-1}),s.dispatchEvent(this.props.onBlur,t,this,void 0),setTimeout(()=>{this.setOpen(!1,t)},0))},this.onPopupClose=t=>{var n;const e=s.getActiveElement(document);this.element&&this.element.removeAttribute("tabindex"),(e===this.list||(n=this.list)!=null&&n.contains(e))&&this.switchFocus(()=>{this.element&&this.element.focus({preventScroll:!0})}),this.props.popupSettings&&this.props.popupSettings.onClose&&this.props.popupSettings.onClose.call(void 0,t)},this.listRef=t=>{this.list=t,t&&this.state.focused&&this.switchFocus(()=>{t.focus({preventScroll:!0}),this.element&&(this.element.tabIndex=-1)})},this.onSplitPartClick=t=>{if(this.buttonsData.length){const e=!this.opened;this.setState({focusedIndex:e?0:-1,focused:!0}),this.setOpen(e,t)}},this.onDownSplitPart=t=>{t.preventDefault();const e=s.getActiveElement(document);this.element&&e!==this.element&&e!==this.list&&this.element.focus()},this.onItemDown=t=>{s.getActiveElement(document)===this.list&&t.preventDefault()},this.dispatchPopupEvent=(t,e)=>{s.dispatchEvent(e?this.props.onOpen:this.props.onClose,t,this,void 0),this.openedDuringOnChange=void 0},this.showLicenseWatermark=!s.validatePackage(f.packageMetadata,{component:"SplitButton"}),this.licenseMessage=s.getLicenseMessage(f.packageMetadata)}get guid(){return this.props.id?this.props.id+"-accessibility-id":this.props.id}get opened(){return this.openedDuringOnChange!==void 0?this.openedDuringOnChange:this.props.opened===void 0?this.state.opened:this.props.opened}render(){this.buttonsData=this.props.items||p.Children.toArray(this.props.children).filter(a=>a&&a.type===k.SplitButtonItem).map(a=>a.props);const o=this.isRtl(),t=o?"rtl":void 0,{id:e,style:n,tabIndex:r,disabled:h}=this.props;return p.createElement(p.Fragment,null,p.createElement("div",{id:e,style:n,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:a=>{this.wrapper=a}},p.createElement(c.Button,{ref:a=>{this.mainButton=a&&a.element},type:"button",size:this.props.size,rounded:this.props.rounded,fillMode:this.props.fillMode,themeColor:this.props.themeColor,onClick:a=>this.onItemClick(a,-1),disabled:h||void 0,tabIndex:r,accessKey:this.props.accessKey,className:this.props.buttonClass,icon:this.props.icon,svgIcon:this.props.svgIcon,iconClass:this.props.iconClass,startIcon:this.props.startIcon,endIcon:this.props.endIcon,imageUrl:this.props.imageUrl,dir:t,"aria-disabled":h,"aria-haspopup":!0,"aria-expanded":this.opened||void 0,"aria-label":this.props.ariaLabel,"aria-controls":this.opened?this.guid:void 0,id:"button-"+this.guid,title:this.props.title},this.props.text),p.createElement(c.Button,{type:"button",size:this.props.size,rounded:this.props.rounded,fillMode:this.props.fillMode,themeColor:this.props.themeColor,icon:"caret-alt-down",svgIcon:D.caretAltDownIcon,className:"k-split-button-arrow",disabled:h||void 0,tabIndex:-1,onClick:this.onSplitPartClick,onMouseDown:this.onDownSplitPart,onPointerDown:this.onDownSplitPart,dir:t,"aria-label":"menu toggling button"}),this.renderPopup(o)),this.showLicenseWatermark&&p.createElement(s.WatermarkOverlay,{message:this.licenseMessage}))}componentDidMount(){(this.props.dir===void 0&&this.isRtl()||this.opened)&&this.forceUpdate()}get element(){return this.mainButton}dispatchClickEvent(o,t){this.isItemDisabled(t)||(t===-1?s.dispatchEvent(this.props.onButtonClick,o,this,void 0):s.dispatchEvent(this.props.onItemClick,o,this,{item:this.buttonsData[t],itemIndex:t}))}renderPopup(o){const{popupSettings:t={}}=this.props,{focusedIndex:e}=this.state;return p.createElement(b.Popup,{anchor:this.wrapper,show:this.opened,animate:t.animate,popupClass:s.classNames("k-menu-popup",t.popupClass),anchorAlign:t.anchorAlign||m.getAnchorAlign(o),popupAlign:t.popupAlign||m.getPopupAlign(o),style:o?{direction:"rtl"}:void 0,onClose:this.onPopupClose},p.createElement("ul",{role:"menu",id:this.guid,"aria-labelledby":"button-"+this.guid,tabIndex:-1,ref:this.listRef,"aria-activedescendant":e>=0?`${this.guid}-${e}`:void 0,className:s.classNames("k-menu-group",{[`k-menu-group-${s.kendoThemeMaps.sizeMap[this.props.size]||this.props.size}`]:this.props.size})},this.renderChildItems()))}renderChildItems(){const{item:o,itemRender:t,textField:e}=this.props;return this.buttonsData.length>0?this.buttonsData.map((n,r)=>p.createElement(y.ButtonItem,{className:s.classNames("k-menu-item",{"k-first":r===0},{"k-last":r===this.buttonsData.length-1}),dataItem:n,textField:e,focused:this.state.focusedIndex===r,onClick:this.onItemClick,onDown:this.onItemDown,render:t,item:o,key:r,index:r,id:`${this.guid}-${r}`})):null}isItemDisabled(o){return this.buttonsData[o]?this.buttonsData[o].disabled:this.props.disabled}isRtl(){return this.props.dir!==void 0?this.props.dir==="rtl":!!this.wrapper&&getComputedStyle(this.wrapper).direction==="rtl"}};d.propTypes={accessKey:i.string,ariaLabel:i.string,title:i.string,onButtonClick:i.func,onFocus:i.func,onBlur:i.func,onItemClick:i.func,onOpen:i.func,onClose:i.func,text:i.string,items:i.arrayOf(i.any),textField:i.string,tabIndex:i.number,disabled:i.bool,icon:i.string,svgIcon:s.svgIconPropType,imageUrl:i.string,popupSettings:i.object,itemRender:i.any,item:i.func,className:i.string,buttonClass:i.string,dir:i.string,size:i.oneOf(["small","medium","large"]),rounded:i.oneOf(["small","medium","large","full","none"]),fillMode:i.oneOf(["flat","link","outline","solid","clear"]),themeColor:i.oneOf(["base","primary","secondary","tertiary","info","success","warning","error","dark","light","inverse"])},d.defaultProps={size:void 0,rounded:void 0,fillMode:void 0,themeColor:void 0};let u=d;exports.SplitButton=u;
|
|
@@ -285,7 +285,7 @@ u.propTypes = {
|
|
|
285
285
|
buttonClass: s.string,
|
|
286
286
|
dir: s.string,
|
|
287
287
|
size: s.oneOf(["small", "medium", "large"]),
|
|
288
|
-
rounded: s.oneOf(["small", "medium", "large", "full"]),
|
|
288
|
+
rounded: s.oneOf(["small", "medium", "large", "full", "none"]),
|
|
289
289
|
fillMode: s.oneOf(["flat", "link", "outline", "solid", "clear"]),
|
|
290
290
|
themeColor: s.oneOf([
|
|
291
291
|
"base",
|
|
@@ -152,6 +152,7 @@ export interface DropDownButtonProps extends KendoReactComponentBaseProps {
|
|
|
152
152
|
* - `medium`
|
|
153
153
|
* - `large`
|
|
154
154
|
* - `full`
|
|
155
|
+
* - `none`
|
|
155
156
|
*
|
|
156
157
|
* @default undefined (theme-controlled)
|
|
157
158
|
*
|
|
@@ -160,7 +161,7 @@ export interface DropDownButtonProps extends KendoReactComponentBaseProps {
|
|
|
160
161
|
* <DropDownButton rounded="full" text="Actions" />
|
|
161
162
|
* ```
|
|
162
163
|
*/
|
|
163
|
-
rounded?: 'small' | 'medium' | 'large' | 'full';
|
|
164
|
+
rounded?: 'small' | 'medium' | 'large' | 'full' | 'none';
|
|
164
165
|
/**
|
|
165
166
|
* Configures the `fillMode` of the DropDownButton.
|
|
166
167
|
*
|
|
@@ -358,6 +359,7 @@ export interface SplitButtonProps extends KendoReactComponentBaseProps {
|
|
|
358
359
|
* - `medium`
|
|
359
360
|
* - `large`
|
|
360
361
|
* - `full`
|
|
362
|
+
* - `none`
|
|
361
363
|
*
|
|
362
364
|
* @default undefined (theme-controlled)
|
|
363
365
|
*
|
|
@@ -366,7 +368,7 @@ export interface SplitButtonProps extends KendoReactComponentBaseProps {
|
|
|
366
368
|
* <SplitButton rounded="full" text="Actions" />
|
|
367
369
|
* ```
|
|
368
370
|
*/
|
|
369
|
-
rounded?: 'small' | 'medium' | 'large' | 'full';
|
|
371
|
+
rounded?: 'small' | 'medium' | 'large' | 'full' | 'none';
|
|
370
372
|
/**
|
|
371
373
|
* Configures the `fillMode` of the SplitButton.
|
|
372
374
|
*
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import { SmartPasteButtonProps, SmartPasteButtonHandle } from './interfaces/index.js';
|
|
9
|
+
import * as React from 'react';
|
|
10
|
+
export declare const SmartPasteButton: React.ForwardRefExoticComponent<SmartPasteButtonProps & React.RefAttributes<SmartPasteButtonHandle | null>>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("react"),F=require("@progress/kendo-react-common"),j=require("@progress/kendo-smartpaste-common"),T=require("../Button.js"),K=require("@progress/kendo-svg-icons");function B(s){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(s){for(const i in s)if(i!=="default"){const f=Object.getOwnPropertyDescriptor(s,i);Object.defineProperty(r,i,f.get?f:{enumerable:!0,get:()=>s[i]})}}return r.default=s,Object.freeze(r)}const m=B(h),V=[".k-input",".k-picker",".k-checkbox",".k-radio",".k-switch",".k-rating",".k-slider"],_=s=>{const r=s.querySelector("input, select, textarea");return(r==null?void 0:r.getAttribute("name"))||(r==null?void 0:r.getAttribute("id"))||s.getAttribute("id")||null},y=m.forwardRef((s,r)=>{const{disabled:i,fillMode:f="solid",rounded:E="medium",size:v="medium",svgIcon:O=K.pasteSparkleIcon,formFields:b,onClick:p,children:R,...I}=s,u=m.useRef(null);m.useImperativeHandle(r,()=>{var o,c,n,e;return{element:(c=(o=u.current)==null?void 0:o.element)!=null?c:null,selected:(e=(n=u.current)==null?void 0:n.selected)!=null?e:!1,click:()=>{var t,a;return(a=(t=u.current)==null?void 0:t.element)==null?void 0:a.click()}}});const g=m.useRef(null),k=m.useCallback(()=>{var c,n;return((c=u.current)==null?void 0:c.element)?((n=g.current)!=null||(g.current=new j.KendoSmartPaste({getElement:()=>{var e,t;return(t=(e=u.current)==null?void 0:e.element)!=null?t:null},customInputs:V.map(e=>({identifier:e})),getSmartPasteField:e=>{const t=_(e.element);return t?{...e,field:t}:e}})),g.current):null},[]),q=()=>{const o=k();if(!o)return b;const n=o.extractFormConfig().reduce((e,t)=>e.some(a=>a.field===t.field)?e:[...e,t],[]);return b?b.map(e=>{const t=n.find(a=>a.field===e.field);return t?{...t,...e,element:t.element}:e}):n},w=async()=>{try{return await navigator.clipboard.readText()}catch{return""}},x=(o,c)=>{var a;if(!o||!c)return;const n=Object.entries(o).reduce((l,[S,d])=>(d!=null&&(l[S]=d),l),{}),e=(a=u.current)==null?void 0:a.element;if(e){const l=F.getKendoPasteEventTarget(e);F.dispatchKendoPasteEvent(l,n)}const t=k();t&&t.populateFormFields({fieldValues:n},c)},C=async o=>{if(i)return;const c=await w(),n=q(),e=n==null?void 0:n.map(l=>{var P;const{element:S,...d}=l;return{...d,field:d.field||"",allowedValues:(P=d.allowedValues)!=null?P:[]}}),a=Object.assign(o,{requestData:{content:c,formFields:e},setResponse:l=>{l!=null&&l.fieldValues&&x(l.fieldValues,n)}});p==null||p(a)};return m.createElement(T.Button,{ref:u,disabled:i,fillMode:f,rounded:E,size:v,svgIcon:O,onClick:C,type:"button",...I},R)});y.displayName="KendoReactSmartPasteButton";exports.SmartPasteButton=y;
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import * as u from "react";
|
|
9
|
+
import { getKendoPasteEventTarget as C, dispatchKendoPasteEvent as K } from "@progress/kendo-react-common";
|
|
10
|
+
import { KendoSmartPaste as T } from "@progress/kendo-smartpaste-common";
|
|
11
|
+
import { Button as V } from "../Button.mjs";
|
|
12
|
+
import { pasteSparkleIcon as O } from "@progress/kendo-svg-icons";
|
|
13
|
+
const q = [
|
|
14
|
+
".k-input",
|
|
15
|
+
".k-picker",
|
|
16
|
+
".k-checkbox",
|
|
17
|
+
".k-radio",
|
|
18
|
+
".k-switch",
|
|
19
|
+
".k-rating",
|
|
20
|
+
".k-slider"
|
|
21
|
+
], A = (d) => {
|
|
22
|
+
const s = d.querySelector("input, select, textarea");
|
|
23
|
+
return (s == null ? void 0 : s.getAttribute("name")) || (s == null ? void 0 : s.getAttribute("id")) || d.getAttribute("id") || null;
|
|
24
|
+
}, B = u.forwardRef((d, s) => {
|
|
25
|
+
const {
|
|
26
|
+
disabled: g,
|
|
27
|
+
fillMode: E = "solid",
|
|
28
|
+
rounded: P = "medium",
|
|
29
|
+
size: x = "medium",
|
|
30
|
+
svgIcon: S = O,
|
|
31
|
+
formFields: f,
|
|
32
|
+
onClick: p,
|
|
33
|
+
children: I,
|
|
34
|
+
...R
|
|
35
|
+
} = d, a = u.useRef(null);
|
|
36
|
+
u.useImperativeHandle(s, () => {
|
|
37
|
+
var r, l, n, e;
|
|
38
|
+
return {
|
|
39
|
+
element: (l = (r = a.current) == null ? void 0 : r.element) != null ? l : null,
|
|
40
|
+
selected: (e = (n = a.current) == null ? void 0 : n.selected) != null ? e : !1,
|
|
41
|
+
click: () => {
|
|
42
|
+
var t, i;
|
|
43
|
+
return (i = (t = a.current) == null ? void 0 : t.element) == null ? void 0 : i.click();
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
});
|
|
47
|
+
const m = u.useRef(null), b = u.useCallback(() => {
|
|
48
|
+
var l, n;
|
|
49
|
+
return ((l = a.current) == null ? void 0 : l.element) ? ((n = m.current) != null || (m.current = new T({
|
|
50
|
+
getElement: () => {
|
|
51
|
+
var e, t;
|
|
52
|
+
return (t = (e = a.current) == null ? void 0 : e.element) != null ? t : null;
|
|
53
|
+
},
|
|
54
|
+
customInputs: q.map((e) => ({ identifier: e })),
|
|
55
|
+
getSmartPasteField: (e) => {
|
|
56
|
+
const t = A(e.element);
|
|
57
|
+
return t ? { ...e, field: t } : e;
|
|
58
|
+
}
|
|
59
|
+
})), m.current) : null;
|
|
60
|
+
}, []), h = () => {
|
|
61
|
+
const r = b();
|
|
62
|
+
if (!r)
|
|
63
|
+
return f;
|
|
64
|
+
const n = r.extractFormConfig().reduce(
|
|
65
|
+
(e, t) => e.some((i) => i.field === t.field) ? e : [...e, t],
|
|
66
|
+
[]
|
|
67
|
+
);
|
|
68
|
+
return f ? f.map((e) => {
|
|
69
|
+
const t = n.find((i) => i.field === e.field);
|
|
70
|
+
return t ? { ...t, ...e, element: t.element } : e;
|
|
71
|
+
}) : n;
|
|
72
|
+
}, v = async () => {
|
|
73
|
+
try {
|
|
74
|
+
return await navigator.clipboard.readText();
|
|
75
|
+
} catch {
|
|
76
|
+
return "";
|
|
77
|
+
}
|
|
78
|
+
}, w = (r, l) => {
|
|
79
|
+
var i;
|
|
80
|
+
if (!r || !l)
|
|
81
|
+
return;
|
|
82
|
+
const n = Object.entries(r).reduce((o, [k, c]) => (c != null && (o[k] = c), o), {}), e = (i = a.current) == null ? void 0 : i.element;
|
|
83
|
+
if (e) {
|
|
84
|
+
const o = C(e);
|
|
85
|
+
K(o, n);
|
|
86
|
+
}
|
|
87
|
+
const t = b();
|
|
88
|
+
t && t.populateFormFields({ fieldValues: n }, l);
|
|
89
|
+
}, y = async (r) => {
|
|
90
|
+
if (g)
|
|
91
|
+
return;
|
|
92
|
+
const l = await v(), n = h(), e = n == null ? void 0 : n.map((o) => {
|
|
93
|
+
var F;
|
|
94
|
+
const { element: k, ...c } = o;
|
|
95
|
+
return {
|
|
96
|
+
...c,
|
|
97
|
+
field: c.field || "",
|
|
98
|
+
allowedValues: (F = c.allowedValues) != null ? F : []
|
|
99
|
+
};
|
|
100
|
+
}), i = Object.assign(r, {
|
|
101
|
+
requestData: {
|
|
102
|
+
content: l,
|
|
103
|
+
formFields: e
|
|
104
|
+
},
|
|
105
|
+
setResponse: (o) => {
|
|
106
|
+
o != null && o.fieldValues && w(o.fieldValues, n);
|
|
107
|
+
}
|
|
108
|
+
});
|
|
109
|
+
p == null || p(i);
|
|
110
|
+
};
|
|
111
|
+
return /* @__PURE__ */ u.createElement(
|
|
112
|
+
V,
|
|
113
|
+
{
|
|
114
|
+
ref: a,
|
|
115
|
+
disabled: g,
|
|
116
|
+
fillMode: E,
|
|
117
|
+
rounded: P,
|
|
118
|
+
size: x,
|
|
119
|
+
svgIcon: S,
|
|
120
|
+
onClick: y,
|
|
121
|
+
type: "button",
|
|
122
|
+
...R
|
|
123
|
+
},
|
|
124
|
+
I
|
|
125
|
+
);
|
|
126
|
+
});
|
|
127
|
+
B.displayName = "KendoReactSmartPasteButton";
|
|
128
|
+
export {
|
|
129
|
+
B as SmartPasteButton
|
|
130
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
export * from './interfaces/index.js';
|
|
9
|
+
export * from './SmartPasteButton.js';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import { ButtonHandle } from '../../Button.js';
|
|
9
|
+
/**
|
|
10
|
+
* Represents the ref handle of the SmartPasteButton component.
|
|
11
|
+
*/
|
|
12
|
+
export interface SmartPasteButtonHandle extends ButtonHandle {
|
|
13
|
+
/**
|
|
14
|
+
* Programmatically triggers a click on the SmartPasteButton.
|
|
15
|
+
*/
|
|
16
|
+
click: () => void;
|
|
17
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import { ButtonProps } from '../../Button.js';
|
|
9
|
+
import { SmartPasteFormField } from './SmartPasteFormField.js';
|
|
10
|
+
/**
|
|
11
|
+
* Represents the request data sent to the AI service for smart paste processing.
|
|
12
|
+
*/
|
|
13
|
+
export interface SmartPasteRequestData {
|
|
14
|
+
/**
|
|
15
|
+
* The clipboard content to be processed by the AI service.
|
|
16
|
+
*/
|
|
17
|
+
content: string;
|
|
18
|
+
/**
|
|
19
|
+
* An array of form fields that describe the target form structure.
|
|
20
|
+
*/
|
|
21
|
+
formFields: SmartPasteFormField[];
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Represents the response from the AI service containing the extracted field values.
|
|
25
|
+
*/
|
|
26
|
+
export interface SmartPasteResponse {
|
|
27
|
+
/**
|
|
28
|
+
* A record of field names to their extracted values from the clipboard content.
|
|
29
|
+
*/
|
|
30
|
+
fieldValues: Record<string, any>;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Represents the click event for the SmartPasteButton component.
|
|
34
|
+
* Extends the standard React mouse event with additional properties for smart paste functionality.
|
|
35
|
+
*/
|
|
36
|
+
export interface SmartPasteClickEvent extends React.MouseEvent<HTMLButtonElement> {
|
|
37
|
+
/**
|
|
38
|
+
* The request data containing clipboard content and form fields.
|
|
39
|
+
*/
|
|
40
|
+
requestData: SmartPasteRequestData;
|
|
41
|
+
/**
|
|
42
|
+
* A function to set the field values to populate in the form.
|
|
43
|
+
* Call this with the response from your API to populate the form fields.
|
|
44
|
+
*
|
|
45
|
+
* @param response - The response containing field values to populate
|
|
46
|
+
*/
|
|
47
|
+
setResponse: (response: SmartPasteResponse) => void;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Represents the props for the SmartPasteButton component.
|
|
51
|
+
* Extends ButtonProps with smart paste specific functionality for AI-powered form filling.
|
|
52
|
+
*/
|
|
53
|
+
export interface SmartPasteButtonProps extends Omit<ButtonProps, 'onClick'> {
|
|
54
|
+
/**
|
|
55
|
+
* An array of SmartPasteFormField holding the fields info used by the form that the button resides in.
|
|
56
|
+
*/
|
|
57
|
+
formFields?: SmartPasteFormField[];
|
|
58
|
+
/**
|
|
59
|
+
* Fires when the SmartPaste button is clicked.
|
|
60
|
+
* The event includes the clipboard content, form fields, and a setResponse function
|
|
61
|
+
* to populate the form with the AI service response.
|
|
62
|
+
*
|
|
63
|
+
* @param event - The click event with request data and response setter
|
|
64
|
+
*
|
|
65
|
+
* @example
|
|
66
|
+
* ```tsx
|
|
67
|
+
* <SmartPasteButton
|
|
68
|
+
* onClick={async (e) => {
|
|
69
|
+
* const response = await fetch('/api/smartpaste', {
|
|
70
|
+
* method: 'POST',
|
|
71
|
+
* body: JSON.stringify(e.requestData)
|
|
72
|
+
* });
|
|
73
|
+
* const data = await response.json();
|
|
74
|
+
* e.setResponse(data);
|
|
75
|
+
* }}
|
|
76
|
+
* />
|
|
77
|
+
* ```
|
|
78
|
+
*/
|
|
79
|
+
onClick?: (event: SmartPasteClickEvent) => void;
|
|
80
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Represents a form field configuration used by the SmartPaste component to identify and populate form inputs.
|
|
10
|
+
*/
|
|
11
|
+
export interface SmartPasteFormField {
|
|
12
|
+
/**
|
|
13
|
+
* The unique identifier for the form field (e.g., field name or id).
|
|
14
|
+
*/
|
|
15
|
+
field: string;
|
|
16
|
+
/**
|
|
17
|
+
* A description of the field that helps the AI understand what data to extract.
|
|
18
|
+
*/
|
|
19
|
+
description: string | null;
|
|
20
|
+
/**
|
|
21
|
+
* The type of the field which determines how the value should be processed.
|
|
22
|
+
*
|
|
23
|
+
* The available options are:
|
|
24
|
+
* - `string` - Text-based input fields
|
|
25
|
+
* - `boolean` - Checkbox or toggle fields
|
|
26
|
+
* - `number` - Numeric input fields
|
|
27
|
+
* - `fixed-choices` - Fields with predefined options (e.g., dropdowns, radio buttons)
|
|
28
|
+
* - `kendo-input` - KendoReact input components
|
|
29
|
+
*/
|
|
30
|
+
type: 'string' | 'boolean' | 'number' | 'fixed-choices' | 'kendo-input';
|
|
31
|
+
/**
|
|
32
|
+
* An optional array of allowed values for fields with predefined options (e.g., dropdowns, radio buttons).
|
|
33
|
+
*/
|
|
34
|
+
allowedValues?: string[];
|
|
35
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
export * from './SmartPasteFormField.js';
|
|
9
|
+
export * from './SmartPasteButtonProps.js';
|
|
10
|
+
export * from './SmartPasteButtonHandle.js';
|
|
@@ -12,4 +12,4 @@
|
|
|
12
12
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
13
13
|
*-------------------------------------------------------------------------------------------
|
|
14
14
|
*/
|
|
15
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("prop-types"),require("@progress/kendo-react-common"),require("@progress/kendo-react-popup"),require("@progress/kendo-svg-icons"),require("@progress/kendo-react-intl"),require("@progress/kendo-webspeech-common")):"function"==typeof define&&define.amd?define(["exports","react","prop-types","@progress/kendo-react-common","@progress/kendo-react-popup","@progress/kendo-svg-icons","@progress/kendo-react-intl","@progress/kendo-webspeech-common"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).KendoReactButtons={},e.React,e.PropTypes,e.KendoReactCommon,e.KendoReactPopup,e.KendoSvgIcons,e.KendoReactIntl,e.KendoWebspeechCommon)}(this,function(e,t,s,n,o,r,i,a){"use strict";function l(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(s){if("default"!==s){var n=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(t,s,n.get?n:{enumerable:!0,get:function(){return e[s]}})}}),t.default=e,Object.freeze(t)}var c=l(t);const d=c.forwardRef((e,t)=>{const{children:s,togglable:o,dir:r,disabled:i,selected:a,icon:l,iconClass:d,svgIcon:p,imageUrl:m,imageAlt:h,className:f,startIcon:v,endIcon:g,onClick:b,size:y=u.size,rounded:k=u.rounded,fillMode:C=u.fillMode,themeColor:I=u.themeColor,ariaPressed:x,iconSize:w,...E}=e,D=c.useRef(void 0),N=c.useRef(null),[S,B]=c.useState(!0===o&&!0===a),K=void 0!==p||void 0!==l||void 0!==d||void 0!==m,R=void 0!==s,O=n.useUnstyled(),M=e.unstyled||O,z=M&&M.uButton;c.useImperativeHandle(t,()=>({element:N.current,selected:void 0!==D.current?D.current:S})),c.useMemo(()=>{o&&void 0!==a&&a!==S&&B(a)},[o,a]),c.useEffect(()=>{D.current=void 0},[S]);const F=function({imageUrl:e,name:t,iconClass:s,svgIcon:o,imageAlt:r,buttonClasses:i,iconSize:a}){return e?c.createElement("img",{role:"presentation",className:n.classNames(n.uButton.icon({c:i})),alt:r,src:e}):t||o?c.createElement(n.IconWrap,{className:n.classNames(n.uButton.icon({c:i})),name:t,icon:o,size:a}):s?c.createElement("span",{role:"presentation",className:n.classNames(n.uButton.icon({c:i}),s)}):null}({name:l,svgIcon:p,iconClass:d,imageUrl:m,imageAlt:h,buttonClasses:z,iconSize:w}),P=e=>c.cloneElement(e,{className:n.classNames(n.uButton.icon({c:z}),e.props.className)}),T=c.useMemo(()=>o?S:x||void 0,[]);return c.createElement("button",{ref:N,"aria-pressed":T,...E,dir:r,disabled:i,onClick:e=>{o&&void 0===a&&(D.current=!S,B(!S)),b&&b.call(void 0,e)},className:n.classNames(n.uButton.wrapper({c:z,isRtl:"rtl"===r,selected:S,disabled:i,size:y,fillMode:C,rounded:k,themeColor:I,iconButton:!R&&K}),f)},v&&P(v),F,s&&c.createElement("span",{className:n.classNames(n.uButton.text({c:z}))},s),g&&P(g))}),u={size:void 0,rounded:void 0,fillMode:void 0,themeColor:void 0};d.displayName="KendoReactButton",d.propTypes={children:s.node,selected:s.bool,togglable:s.bool,icon:s.string,svgIcon:n.svgIconPropType,iconClass:s.string,imageUrl:s.string,imageAlt:s.string,size:s.oneOf(["small","medium","large"]),rounded:s.oneOf(["small","medium","large","full"]),fillMode:s.oneOf(["flat","link","outline","solid","clear"]),themeColor:s.oneOf(["base","primary","secondary","tertiary","info","success","warning","error","dark","light","inverse"])};const p=e=>{const{children:t,className:s,dir:o,disabled:r,width:i}=e,a=n.useUnstyled(),l=e.unstyled||a,d=l&&l.uButtonGroup,u=(e,t)=>{const s={...i?{width:i}:{},...e.props.style||{}},n=r||e.props.disabled,o={...e.props,...t?{className:t}:{},...Object.keys(s).length?{style:s}:{},...void 0!==n?{disabled:n}:{}};return c.Children.count(e.props.children)>0?c.cloneElement(e,o,e.props.children):c.cloneElement(e,o)},p=c.useRef(null),m=(e=>{const t=c.Children.count(e),s=void 0!==o?"rtl"===o:p.current&&"rtl"===getComputedStyle(p.current).direction||!1;return c.Children.map(e,(e,o)=>{if(c.isValidElement(e)){const r=o===t-1,i=s,a=n.classNames(e.props.className,n.uButtonGroup.position({c:d,start:i?r:0===o,end:i?0===o:r}));return u(e,a)}return e})})(t),h=n.classNames(n.uButtonGroup.wrapper({c:d,stretched:!!i,disabled:r}),s),f={className:h,style:{width:`${i}`},dir:o,role:"group","aria-disabled":r};return c.createElement("div",{ref:p,...f,className:h},m)};p.propTypes={children:s.oneOfType([s.arrayOf(s.element),s.element]),className:s.string,disabled:s.bool,width:s.string,dir:s.string};const m=e=>{const t=n.useUnstyled(),s=e.unstyled||t,o=s&&s.uDropDownButton,r=c.useCallback(t=>{e.onClick(t,e.index)},[e]),i=e.dataItem.render||e.item||(void 0===e.item?e.render:null),a=void 0!==e.dataItem.text?e.dataItem.text:e.textField?e.dataItem[e.textField]:e.dataItem,l=c.createElement("li",{id:e.id,className:n.classNames(n.uDropDownButton.li({c:o,focused:e.focused}),e.className),tabIndex:-1,onClick:r,onMouseDown:e.onDown,onPointerDown:e.onDown,role:"menuitem","aria-disabled":e.dataItem.disabled||void 0},c.createElement("span",{tabIndex:-1,className:n.classNames(n.uDropDownButton.link({c:o,selected:e.dataItem.selected,disabled:e.dataItem.disabled})),key:"icon"},i?c.createElement(i,{item:e.dataItem,itemIndex:e.index}):c.createElement(c.Fragment,null,(e.dataItem.icon||e.dataItem.iconClass||e.dataItem.svgIcon)&&c.createElement(n.IconWrap,{className:e.dataItem.iconClass,name:e.dataItem.icon,icon:e.dataItem.svgIcon}),e.dataItem.imageUrl&&c.createElement("img",{role:"presentation",alt:"",src:e.dataItem.imageUrl,className:"k-icon"}),a&&c.createElement("span",{className:"k-menu-link-text"},a))));return void 0!==e.item&&void 0!==e.render?e.render.call(void 0,l,e):l};m.displayName="KendoReactButtonItem";const h=class extends c.Component{render(){return null}};h.propTypes={text:s.string,icon:s.string,iconClass:s.string,imageUrl:s.string,disabled:s.bool,render:s.any};let f=h;const v=(e,t,s,o)=>{if(s)return e;const r=Math.min(o-1,Math.max(0,e));switch(t){case n.Keys.enter:case n.Keys.space:case n.Keys.esc:return-1;case n.Keys.up:case n.Keys.left:return r-1<0?o-1:r-1;case n.Keys.down:case n.Keys.right:return r+1>=o?0:r+1;case n.Keys.home:return 0;case n.Keys.end:return o-1;default:return e}};function g(e){const t={horizontal:"left",vertical:"bottom"};return e&&(t.horizontal="right"),t}function b(e){const t={horizontal:"left",vertical:"top"};return e&&(t.horizontal="right"),t}const y=Object.freeze({name:"@progress/kendo-react-buttons",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate:0,version:"13.4.0-develop.3",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"}),k=class extends c.Component{constructor(e){super(e),this.state={focused:!1,focusedIndex:-1,opened:!1},this.wrapper=null,this.mainButton=null,this.list=null,this.skipFocus=!1,this.buttonsData=[],this.showLicenseWatermark=!1,this.onKeyDown=e=>{const{focusedIndex:t}=this.state;if(e.altKey)return void(this.opened||e.keyCode!==n.Keys.down?this.opened&&e.keyCode===n.Keys.up&&(e.preventDefault(),this.setState({focusedIndex:-1}),this.setOpen(!1,e)):(e.preventDefault(),this.setState({focusedIndex:0}),this.setOpen(!0,e)));let s;if(e.keyCode===n.Keys.enter||e.keyCode===n.Keys.space){if(e.preventDefault(),this.dispatchClickEvent(e,t),t>=0){s={focusedIndex:this.opened?-1:0};const t=!this.opened;this.setOpen(t,e)}}else if(this.opened&&e.keyCode===n.Keys.esc)return this.setState({focusedIndex:-1}),void this.setOpen(!1,e);if(this.opened){const o=v(t,e.keyCode,e.altKey,this.buttonsData.length);o!==t&&(s=s||{},s.focusedIndex=o);const r=e.keyCode===n.Keys.up||e.keyCode===n.Keys.down||e.keyCode===n.Keys.left||e.keyCode===n.Keys.right;!e.altKey&&(r||e.keyCode===n.Keys.home||e.keyCode===n.Keys.end)&&e.preventDefault()}s&&this.setState(s)},this.switchFocus=e=>{this.skipFocus=!0,e(),window.setTimeout(()=>this.skipFocus=!1,0)},this.onFocus=e=>{this.skipFocus||(n.dispatchEvent(this.props.onFocus,e,this,void 0),this.setState({focused:!0}))},this.setOpen=(e,t)=>{this.opened!==e&&(this.openedDuringOnChange=e,this.setState({opened:e}),t?this.dispatchPopupEvent(t,e):this.openedDuringOnChange=void 0)},this.onItemClick=(e,t)=>{this.opened&&this.setState({focusedIndex:0}),this.dispatchClickEvent(e,t),this.setOpen(!1,e)},this.onBlur=e=>{this.skipFocus||(this.setState({focused:!1,focusedIndex:-1}),n.dispatchEvent(this.props.onBlur,e,this,void 0),setTimeout(()=>{this.setOpen(!1,e)},0))},this.onPopupClose=e=>{var t;const s=n.getActiveElement(document);this.element&&this.element.removeAttribute("tabindex"),(s===this.list||null!=(t=this.list)&&t.contains(s))&&this.switchFocus(()=>{this.element&&this.element.focus({preventScroll:!0})}),this.props.popupSettings&&this.props.popupSettings.onClose&&this.props.popupSettings.onClose.call(void 0,e)},this.listRef=e=>{this.list=e,e&&this.state.focused&&this.switchFocus(()=>{e.focus({preventScroll:!0}),this.element&&(this.element.tabIndex=-1)})},this.onSplitPartClick=e=>{if(this.buttonsData.length){const t=!this.opened;this.setState({focusedIndex:t?0:-1,focused:!0}),this.setOpen(t,e)}},this.onDownSplitPart=e=>{e.preventDefault();const t=n.getActiveElement(document);this.element&&t!==this.element&&t!==this.list&&this.element.focus()},this.onItemDown=e=>{n.getActiveElement(document)===this.list&&e.preventDefault()},this.dispatchPopupEvent=(e,t)=>{n.dispatchEvent(t?this.props.onOpen:this.props.onClose,e,this,void 0),this.openedDuringOnChange=void 0},this.showLicenseWatermark=!n.validatePackage(y,{component:"SplitButton"}),this.licenseMessage=n.getLicenseMessage(y)}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||c.Children.toArray(this.props.children).filter(e=>e&&e.type===f).map(e=>e.props);const e=this.isRtl(),t=e?"rtl":void 0,{id:s,style:o,tabIndex:i,disabled:a}=this.props;return c.createElement(c.Fragment,null,c.createElement("div",{id:s,style:o,className:n.classNames("k-split-button","k-button-group",{"k-focus":this.state.focused},this.props.rounded&&`k-rounded-${n.kendoThemeMaps.roundedMap[this.props.rounded]}`,this.props.className),onKeyDown:this.onKeyDown,onFocus:this.onFocus,onBlur:this.onBlur,dir:t,ref:e=>{this.wrapper=e}},c.createElement(d,{ref:e=>{this.mainButton=e&&e.element},type:"button",size:this.props.size,rounded:this.props.rounded,fillMode:this.props.fillMode,themeColor:this.props.themeColor,onClick:e=>this.onItemClick(e,-1),disabled:a||void 0,tabIndex:i,accessKey:this.props.accessKey,className:this.props.buttonClass,icon:this.props.icon,svgIcon:this.props.svgIcon,iconClass:this.props.iconClass,startIcon:this.props.startIcon,endIcon:this.props.endIcon,imageUrl:this.props.imageUrl,dir:t,"aria-disabled":a,"aria-haspopup":!0,"aria-expanded":this.opened||void 0,"aria-label":this.props.ariaLabel,"aria-controls":this.opened?this.guid:void 0,id:"button-"+this.guid,title:this.props.title},this.props.text),c.createElement(d,{type:"button",size:this.props.size,rounded:this.props.rounded,fillMode:this.props.fillMode,themeColor:this.props.themeColor,icon:"caret-alt-down",svgIcon:r.caretAltDownIcon,className:"k-split-button-arrow",disabled:a||void 0,tabIndex:-1,onClick:this.onSplitPartClick,onMouseDown:this.onDownSplitPart,onPointerDown:this.onDownSplitPart,dir:t,"aria-label":"menu toggling button"}),this.renderPopup(e)),this.showLicenseWatermark&&c.createElement(n.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?n.dispatchEvent(this.props.onButtonClick,e,this,void 0):n.dispatchEvent(this.props.onItemClick,e,this,{item:this.buttonsData[t],itemIndex:t}))}renderPopup(e){const{popupSettings:t={}}=this.props,{focusedIndex:s}=this.state;return c.createElement(o.Popup,{anchor:this.wrapper,show:this.opened,animate:t.animate,popupClass:n.classNames("k-menu-popup",t.popupClass),anchorAlign:t.anchorAlign||g(e),popupAlign:t.popupAlign||b(e),style:e?{direction:"rtl"}:void 0,onClose:this.onPopupClose},c.createElement("ul",{role:"menu",id:this.guid,"aria-labelledby":"button-"+this.guid,tabIndex:-1,ref:this.listRef,"aria-activedescendant":s>=0?`${this.guid}-${s}`:void 0,className:n.classNames("k-menu-group",{[`k-menu-group-${n.kendoThemeMaps.sizeMap[this.props.size]||this.props.size}`]:this.props.size})},this.renderChildItems()))}renderChildItems(){const{item:e,itemRender:t,textField:s}=this.props;return this.buttonsData.length>0?this.buttonsData.map((o,r)=>c.createElement(m,{className:n.classNames("k-menu-item",{"k-first":0===r},{"k-last":r===this.buttonsData.length-1}),dataItem:o,textField:s,focused:this.state.focusedIndex===r,onClick:this.onItemClick,onDown:this.onItemDown,render:t,item:e,key:r,index:r,id:`${this.guid}-${r}`})):null}isItemDisabled(e){return this.buttonsData[e]?this.buttonsData[e].disabled:this.props.disabled}isRtl(){return void 0!==this.props.dir?"rtl"===this.props.dir:!!this.wrapper&&"rtl"===getComputedStyle(this.wrapper).direction}};k.propTypes={accessKey:s.string,ariaLabel:s.string,title:s.string,onButtonClick:s.func,onFocus:s.func,onBlur:s.func,onItemClick:s.func,onOpen:s.func,onClose:s.func,text:s.string,items:s.arrayOf(s.any),textField:s.string,tabIndex:s.number,disabled:s.bool,icon:s.string,svgIcon:n.svgIconPropType,imageUrl:s.string,popupSettings:s.object,itemRender:s.any,item:s.func,className:s.string,buttonClass:s.string,dir:s.string,size:s.oneOf(["small","medium","large"]),rounded:s.oneOf(["small","medium","large","full"]),fillMode:s.oneOf(["flat","link","outline","solid","clear"]),themeColor:s.oneOf(["base","primary","secondary","tertiary","info","success","warning","error","dark","light","inverse"])},k.defaultProps={size:void 0,rounded:void 0,fillMode:void 0,themeColor:void 0};let C=k;const I=class extends c.Component{render(){return null}};I.propTypes={text:s.string,icon:s.string,iconClass:s.string,imageUrl:s.string,selected:s.bool,disabled:s.bool,render:s.any};let x=I;const w=class extends c.Component{constructor(e){super(e),this.state={opened:!1,focused:!1,focusedIndex:-1},this.mainButton=null,this.list=null,this.skipFocus=!1,this.showLicenseWatermark=!1,this.buttonsData=[],this.onKeyDown=e=>{const{focusedIndex:t}=this.state;if(e.altKey)return void(this.opened||e.keyCode!==n.Keys.down?this.opened&&e.keyCode===n.Keys.up&&(e.preventDefault(),this.setState({focusedIndex:-1}),this.setOpen(!1,e)):(e.preventDefault(),this.setOpen(!0,e),this.setState({focusedIndex:0})));const s={...this.state};if(e.keyCode===n.Keys.enter||e.keyCode===n.Keys.space){e.preventDefault(),t>=0&&this.dispatchClickEvent(e,t);const s=!this.opened;return this.setState({focused:!0,focusedIndex:s?0:-1}),void this.setOpen(s,e)}if(this.opened&&e.keyCode===n.Keys.esc)return this.setState({focusedIndex:-1}),void this.setOpen(!1,e);if(this.opened){const o=v(t,e.keyCode,e.altKey,this.buttonsData.length);s.focusedIndex=o;const r=e.keyCode===n.Keys.up||e.keyCode===n.Keys.down||e.keyCode===n.Keys.left||e.keyCode===n.Keys.right;!e.altKey&&(r||e.keyCode===n.Keys.home||e.keyCode===n.Keys.end)&&e.preventDefault()}this.setState(s)},this.switchFocus=e=>{this.skipFocus=!0,e(),window.setTimeout(()=>this.skipFocus=!1,0)},this.handleFocus=e=>{this.skipFocus||(this.setState({focused:!0,focusedIndex:this.opened?0:-1}),n.dispatchEvent(this.props.onFocus,e,this,void 0))},this.handleButtonBlur=e=>{this.opened||(this.setState({focused:!1}),n.dispatchEvent(this.props.onBlur,e,this,void 0))},this.handleMenuBlur=e=>{this.skipFocus||(this.setState({focused:!1,focusedIndex:-1}),n.dispatchEvent(this.props.onBlur,e,this,void 0),setTimeout(()=>{this.setOpen(!1,e)},0))},this.setOpen=(e,t)=>{this.opened!==e&&(this.openedDuringOnChange=e,this.setState({opened:e}),t?this.dispatchPopupEvent(t,e):this.openedDuringOnChange=void 0)},this.onItemClick=(e,t)=>{this.setState({focusedIndex:-1}),this.dispatchClickEvent(e,t),this.setOpen(!1,e)},this.onItemDown=e=>{n.getActiveElement(document)===this.list&&e.preventDefault()},this.mouseDown=e=>{e.preventDefault();const t=n.getActiveElement(document);this.element&&t!==this.element&&t!==this.list&&this.element.focus()},this.onPopupClose=e=>{var t;const s=n.getActiveElement(document);this.element&&this.element.removeAttribute("tabindex"),(s===this.list||null!=(t=this.list)&&t.contains(s))&&this.switchFocus(()=>{this.element&&this.element.focus({preventScroll:!0})}),this.props.popupSettings&&this.props.popupSettings.onClose&&this.props.popupSettings.onClose.call(void 0,e)},this.listRef=e=>{this.list=e,e&&this.state.focused&&this.switchFocus(()=>{e.focus({preventScroll:!0}),this.element&&(this.element.tabIndex=-1)})},this.onClickMainButton=e=>{if(n.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)=>{n.dispatchEvent(t?this.props.onOpen:this.props.onClose,e,this,void 0),this.openedDuringOnChange=void 0},this.showLicenseWatermark=!n.validatePackage(y,{component:"DropDownButton"}),this.licenseMessage=n.getLicenseMessage(y)}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,s=e?"rtl":void 0,{id:o,style:r,tabIndex:i,disabled:a,size:l,rounded:u,fillMode:p,themeColor:m,ariaLabel:h,title:f,accessKey:v,icon:g,svgIcon:b,iconClass:y,buttonClass:k,className:C,imageUrl:I,startIcon:w,endIcon:E}=this.props;return this.buttonsData=this.props.items||c.Children.toArray(this.props.children).filter(e=>e&&e.type===x).map(e=>e.props),c.createElement(c.Fragment,null,c.createElement(d,{id:o,size:l,style:r,rounded:u,fillMode:p,themeColor:m,onClick:this.onClickMainButton,onMouseDown:this.mouseDown,onKeyDown:this.onKeyDown,onFocus:this.handleFocus,onBlur:this.handleButtonBlur,"aria-disabled":a?"true":void 0,tabIndex:i,accessKey:v,icon:g,svgIcon:b,iconClass:y,className:n.classNames(k,C,n.uDropDownButton.wrapper({c:t,focused:this.state.focused,disabled:a})),imageUrl:I,dir:s,ref:e=>{this.mainButton=(null==e?void 0:e.element)||null},type:"button","aria-expanded":this.opened?"true":"false","aria-label":h,"aria-controls":this.opened?this.guid:void 0,title:f,startIcon:w,endIcon:E},this.props.text),this.showLicenseWatermark&&c.createElement(n.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)||n.dispatchEvent(this.props.onItemClick,e,this,{item:this.buttonsData[t],itemIndex:t})}renderPopup(e){const{popupSettings:t={},_zIndex:s,unstyled:r}=this.props,i=s?s+2e3:12e3,a=r&&r.uDropDownButton,{focusedIndex:l}=this.state;return c.createElement(n.ZIndexContext.Provider,{value:i},c.createElement(o.Popup,{anchor:this.mainButton,show:this.opened,animate:t.animate,popupClass:n.classNames(n.uDropDownButton.popup({c:a}),t.popupClass),anchorAlign:t.anchorAlign||g(e),popupAlign:t.popupAlign||b(e),style:e?{direction:"rtl"}:void 0,onClose:this.onPopupClose},c.createElement("ul",{role:"list",id:this.guid,tabIndex:-1,"aria-activedescendant":l>=0?`${this.guid}-${l}`:void 0,ref:this.listRef,onKeyDown:this.onKeyDown,onBlur:this.handleMenuBlur,className:n.classNames(n.uDropDownButton.ul({c:a,size:this.props.size}))},this.renderChildItems())))}renderChildItems(){const{item:e,itemRender:t,textField:s,unstyled:o}=this.props,r=o&&o.uDropDownButton;return this.buttonsData.length>0?this.buttonsData.map((o,i)=>c.createElement(m,{className:n.classNames(n.uDropDownButton.item({c:r}),o.className,{"k-first":0===i},{"k-last":i===this.buttonsData.length-1}),dataItem:o,textField:s,focused:this.state.focusedIndex===i,onClick:this.onItemClick,onDown:this.onItemDown,render:t,item:e,index:i,key:i,id:`${this.guid}-${i}`})):null}isItemDisabled(e){return this.buttonsData[e]?this.buttonsData[e].disabled:this.props.disabled}isRtl(){return void 0!==this.props.dir?"rtl"===this.props.dir:!!this.mainButton&&"rtl"===getComputedStyle(this.mainButton).direction}};w.propTypes={accessKey:s.string,ariaLabel:s.string,title:s.string,onFocus:s.func,onBlur:s.func,onClick:s.func,onItemClick:s.func,onOpen:s.func,onClose:s.func,items:s.arrayOf(s.any),textField:s.string,tabIndex:s.number,disabled:s.bool,icon:s.string,svgIcon:n.svgIconPropType,iconClass:s.string,imageUrl:s.string,popupSettings:s.object,itemRender:s.func,item:s.func,className:s.string,buttonClass:s.string,dir:s.string,size:s.oneOf(["small","medium","large"]),rounded:s.oneOf(["small","medium","large","full"]),fillMode:s.oneOf(["flat","link","outline","solid","clear"]),themeColor:s.oneOf(["base","primary","secondary","tertiary","info","success","warning","error","dark","light","inverse"])},w.defaultProps={size:void 0,rounded:void 0,fillMode:void 0,themeColor:void 0};let E=w;const D=n.createPropsContext(),N=n.withIdHOC(n.withPropsContext(D,n.withUnstyledHOC(n.withZIndexContext(E))));N.displayName="KendoReactDropDownButton";const S=":not(.k-dropdownlist button):not(.k-colorpicker button):not(.k-split-button .k-split-button-arrow)",B=["button"+S,".k-button-group > button"+S,".k-colorpicker",".k-dropdownlist"],K=e=>c.createElement("div",{ref:e._ref,className:n.classNames("k-toolbar-separator k-separator",e.className)}),R="prevArrow.title",O="nextArrow.title",M="moreButtonTitle.title",z={[R]:"Previous scroll button",[O]:"Next scroll button",[M]:"More button"},F=e=>{const t=i.useLocalization(),{disabled:s,type:o,scrollContentRef:a,buttonScrollSpeed:l,prevButton:d,nextButton:u}=e,p="prev"===o?d||"span":u||"span";return c.createElement(p,{className:n.classNames("k-button","k-icon-button",`k-toolbar-${o}`,{"k-disabled":s}),title:`${"prev"===o?t.toLanguageString(R,z[R]):t.toLanguageString(O,z[O])}`,"aria-hidden":!0,tabIndex:s?-1:void 0,onClick:e=>{a&&a.current&&l&&a.current.scrollBy({left:"next"===o?l:-l,behavior:"smooth"})}},c.createElement(n.SvgIcon,{icon:"prev"===o?r.caretAltLeftIcon:r.caretAltRightIcon,className:"k-button-icon"}))},P=e=>{const{scrollButtons:t,scrollButtonsPosition:s,isOverflowing:n,scrollContentRef:o,buttonScrollSpeed:r,dir:i,isScrollStartPosition:a,isScrollEndPosition:l,prevButton:d,nextButton:u,children:p}=e,m=(e,t)=>c.createElement(F,{type:e,disabled:t,scrollContentRef:o,buttonScrollSpeed:r,prevButton:d,nextButton:u}),h="visible"===t||"auto"===t&&n;return c.createElement(c.Fragment,null,h&&"split"===s&&c.createElement(c.Fragment,null,m("rtl"!==i?"prev":"next",a),c.createElement(K,{className:"k-toolbar-button-separator"})),h&&"start"===s&&c.createElement(c.Fragment,null,m("rtl"!==i?"prev":"next",a),m("rtl"!==i?"next":"prev",l),c.createElement(K,{className:"k-toolbar-button-separator"})),c.createElement("span",{className:"k-toolbar-items k-toolbar-items-scroll",ref:o},p),h&&"split"===s&&c.createElement(c.Fragment,null,c.createElement(K,{className:"k-toolbar-button-separator"}),m("rtl"!==i?"next":"prev",l)),h&&"end"===s&&c.createElement(c.Fragment,null,c.createElement(K,{className:"k-toolbar-button-separator"}),m("rtl"!==i?"prev":"next",a),m("rtl"!==i?"next":"prev",l)))},T=e=>{var t;const{toolbarRef:s,children:a,fillMode:l,size:u}=e,[p,m]=c.useState(!1),h=c.useRef(c.Children.toArray(a).filter(e=>c.isValidElement(e)).map((e,t)=>c.cloneElement(e,{key:e.key||t}))),f=c.useRef([]),v=c.useRef(0),g=c.useRef(null),b=c.useRef(null),y=i.useLocalization(),[k,C]=c.useReducer(e=>e+1,0),I=()=>{if(!s.current)return;let e=0;const t=s.current.clientWidth,n=parseInt(window.getComputedStyle(s.current).gap||"0",10),o=Array.from(s.current.children).reduce((e,t,s)=>e+=Math.ceil(t.clientWidth),0),r=Array.from(s.current.children).length;if(e=o+r*n+2*n,e>t){const e=[...h.current],s=e.pop();v.current=t,h.current=e,s&&(f.current=[s,...f.current])}else if(t>v.current+n*r){const e=[...f.current],s=e.shift();f.current=e,s&&(h.current=[...h.current,s]),v.current=t}C()};c.useEffect(()=>{I();const e=new ResizeObserver(I),t=s.current;return t&&e.observe(t),()=>{t&&e.unobserve(t)}},[]);return c.createElement(c.Fragment,null,h.current.length>0&&h.current,f.current.length>0&&c.createElement(c.Fragment,null,c.createElement(K,{_ref:b,className:"k-toolbar-button-separator"}),c.createElement(d,{ref:g,className:"k-toolbar-overflow-button",fillMode:"flat",svgIcon:r.moreHorizontalIcon,title:y.toLanguageString(M,z[M]),onClick:()=>{m(!p)}}),c.createElement(o.Popup,{anchor:s.current,show:p,popupClass:"k-toolbar-popup",style:{width:null==(t=s.current)?void 0:t.offsetWidth}},c.createElement("span",{className:`k-toolbar-items-list k-toolbar-items-list-${n.kendoThemeMaps.sizeMap[u]} k-toolbar-items-list-${l}`},f.current.length>0&&f.current))))},A=c.forwardRef((e,t)=>{const{children:s,className:o,id:r,ariaLabel:i,keyboardNavigation:a,role:l,onResize:d,style:u,tabIndex:p=L.tabIndex,size:m=L.size,fillMode:h=L.fillMode,overflow:f,scrollButtons:v=L.scrollButtons,scrollButtonsPosition:g=L.scrollButtonsPosition,buttonScrollSpeed:b=L.buttonScrollSpeed,prevButton:y,nextButton:k,_ariaControls:C}=e,I=c.useRef(!1),x=c.useRef(null),w=c.useRef(null),E=c.useRef(0),D=c.useRef(0),N=c.useRef([]),S=c.useRef({element:null,props:e}),[K,R]=c.useState(!1),[O,M]=c.useState(!0),[z,F]=c.useState(!1),A=n.useDir(x,e.dir),$=c.useMemo(()=>e.buttons||B,[e.buttons]),W=c.useMemo(()=>$.map(e=>e+":focus").join(","),[$]),H=()=>{const e=x.current&&x.current.querySelector(W);return Math.max(0,N.current.findIndex(t=>t===e))};c.useImperativeHandle(S,()=>({element:x.current,props:e})),c.useImperativeHandle(t,()=>S.current),c.useEffect(()=>(window.addEventListener("resize",q),x.current&&(D.current=x.current.offsetWidth,E.current=x.current.offsetHeight,!1!==a&&(N.current=Array.from(x.current.querySelectorAll($.join(","))),U(0))),()=>{window.removeEventListener("resize",q),N.current.length=0}),[]),c.useEffect(()=>{if(I.current){if(!x.current||!1===a)return;N.current=Array.from(x.current.querySelectorAll($.join(","))),U(H()),V()}else I.current=!0});const U=e=>{N.current.forEach((t,s)=>{t.tabIndex=s===e?p:-1})},j=(e,t)=>{const s=N.current[t];if(s){s.tabIndex=p,s.focus();const t=N.current[e];t&&(t.tabIndex=-1)}},q=e=>{if(!x.current)return;const t=x.current.offsetWidth,s=x.current.offsetHeight;if(D.current!==t||E.current!==s){D.current=t,E.current=s;const n={offsetWidth:D.current,offsetHeight:E.current};d&&d.call(void 0,{target:S.current,...n,nativeEvent:e})}V()},V=c.useCallback(()=>{const e=w.current;e&&R(e.scrollWidth>e.clientWidth||e.scrollHeight>e.clientHeight)},[]),G=c.useCallback(()=>{const e=w.current;if(e){const t=0===e.scrollLeft,s="rtl"!==A?e.scrollLeft+e.clientWidth===e.scrollWidth:e.clientWidth-e.scrollLeft===e.scrollWidth;t&&M(!0),s&&F(!0),!t&&!s&&(M(!1),F(!1))}},[A]);return c.useEffect(()=>{const e=w.current;if(e)return e.addEventListener("scroll",G),()=>{e.removeEventListener("scroll",G)}},[G]),c.createElement("div",{id:r,"aria-label":i,"aria-controls":C,className:n.classNames("k-toolbar",{[`k-toolbar-${n.kendoThemeMaps.sizeMap[m]||m}`]:m,[`k-toolbar-${h}`]:h,"k-toolbar-scrollable":"scroll"===f,"k-toolbar-scrollable-overlay":"scroll"===f&&("hidden"===v||void 0===v),"k-toolbar-scrollable-start":"scroll"===f&&"hidden"===v&&O,"k-toolbar-scrollable-end":"scroll"===f&&"hidden"===v&&z,"k-toolbar-section":e.overflow&&"section"===f},o),style:u,role:void 0!==l?l||void 0:"toolbar",dir:A,ref:x,onKeyDown:!1!==a?e=>{const t=e.keyCode===n.Keys.left||e.keyCode===n.Keys.right||e.keyCode===n.Keys.home||e.keyCode===n.Keys.end,s=H();!t||e.defaultPrevented||-1===N.current.findIndex(t=>t===e.target)||(e.keyCode===n.Keys.left?j(s,0===s?N.current.length-1:s-1):j(s,s===N.current.length-1?0:s+1),e.keyCode===n.Keys.home&&j(s,0),e.keyCode===n.Keys.end&&j(s,N.current.length-1))}:void 0},"scroll"===f&&c.createElement(P,{scrollButtons:v,scrollButtonsPosition:g,prevButton:y,nextButton:k,isOverflowing:K,scrollContentRef:w,buttonScrollSpeed:b,dir:A,isScrollStartPosition:O,isScrollEndPosition:z,children:s}),"section"===f&&c.createElement(T,{toolbarRef:x,fillMode:h,size:m},s),("none"===f||void 0===f)&&s)}),L={tabIndex:0,size:void 0,fillMode:void 0,scrollButtons:"auto",scrollButtonsPosition:"split",buttonScrollSpeed:100};A.displayName="KendoReactToolbar",A.propTypes={tabIndex:s.number,dir:s.string,keyboardNavigation:s.bool,style:s.object,className:s.string,role:s.string,onResize:s.func,buttons:s.arrayOf(s.string.isRequired),size:s.oneOf(["small","medium","large"]),fillMode:s.oneOf(["solid","flat","outline"]),overflow:s.oneOf(["none","section","scroll"]),scrollButtons:s.oneOf(["hidden","visible","auto"]),scrollButtonsPosition:s.oneOf(["start","end","split"]),buttonScrollSpeed:s.number};const $=c.forwardRef((e,t)=>{const{id:s,className:o,style:r,children:i}=e,a=c.useRef(null);return c.useImperativeHandle(t,()=>({element:a.current})),c.createElement("div",{id:s,className:n.classNames("k-toolbar-item",o),style:r,ref:a},i)});$.displayName="KendoReactToolbarItem",$.propTypes={className:s.string};const W=c.forwardRef((e,t)=>{const s=c.useRef(null),o=c.useRef(null);c.useImperativeHandle(o,()=>({element:s.current})),c.useImperativeHandle(t,()=>({element:s.current}));const r=c.useMemo(()=>n.classNames("k-spacer",e.className),[e.className]);return c.createElement("span",{ref:s,className:r})});W.displayName="KendoReactToolbarSpacer",W.propTypes={className:s.string};const H=t.createContext([null,e=>{}]),U=t.createContext([null,e=>{}]),j=t.createContext([null,e=>{}]);var q=(e=>(e.next="next",e.prev="prev",e.current="current",e.reset="reset",e))(q||{});var V=(e=>(e.remove="remove",e.add="add",e.reorder="reorder",e))(V||{});var G=(e=>(e.toggle="toggle",e.remove="remove",e))(G||{});const Z=c.forwardRef((e,t)=>{const s=c.useRef(null),o=c.useRef(null),{disabled:i=J.disabled,fillMode:a=J.fillMode,themeColor:l=J.themeColor,size:d=J.size,rounded:u=J.rounded,dir:p=J.dir,removeIcon:m=J.removeIcon,removeSvgIcon:h=J.removeSvgIcon,removable:f=J.removable}=e,v=n.useDir(o,p);c.useImperativeHandle(s,()=>({element:o.current,props:e})),c.useImperativeHandle(t,()=>s.current);const[g,b]=c.useContext(H),[y,k]=c.useContext(U),[,C]=c.useContext(j),I=c.useMemo(()=>e.selected||(Array.isArray(g)?g.some(t=>t===e.value):g===e.value),[e.selected,e.value,g]),x=c.useMemo(()=>y===e.value,[e.value,y]);c.useEffect(()=>{x&&o.current&&o.current.focus()},[x]);const w=c.useCallback(t=>{b({type:G.toggle,payload:e.value,event:t})},[b,e.value]),E=c.useCallback(t=>{f&&(C({type:V.remove,payload:e.value,event:t}),k({type:q.reset,payload:e.value,event:t}),b({type:G.remove,payload:e.value,event:t}),e.onRemove&&e.onRemove.call(void 0,{target:s.current,syntheticEvent:t}))},[e.onRemove,e.value,f,C,k,b]),D=c.useCallback(t=>{switch(t.keyCode){case n.Keys.left:k({type:q.prev,payload:e.value,event:t});break;case n.Keys.right:k({type:q.next,payload:e.value,event:t});break;case n.Keys.enter:b({type:G.toggle,payload:e.value,event:t});break;case n.Keys.delete:E(t)}e.onKeyDown&&e.onKeyDown.call(void 0,{target:s.current,syntheticEvent:t})},[e.onKeyDown,e.value,k,b,E]),N=c.useCallback(t=>{k({payload:e.value,type:q.current,event:t}),e.onFocus&&e.onFocus.call(void 0,{target:s.current,syntheticEvent:t})},[e.onFocus,e.value,k]),S=c.useCallback(t=>{e.onBlur&&e.onBlur.call(void 0,{target:s.current,syntheticEvent:t})},[e.onBlur]),B=n.useMouse(e,s,{onClick:w});return c.createElement("div",{...B,role:e.role||"button",id:e.value,style:e.style,ref:o,dir:v,tabIndex:n.getTabIndex(e.tabIndex,i,void 0),className:n.classNames("k-chip",{"k-rtl":"rtl"===v,"k-disabled":i,"k-selected":I,"k-focus":x,[`k-chip-${n.kendoThemeMaps.sizeMap[d]||d}`]:d,[`k-rounded-${n.kendoThemeMaps.roundedMap[u]||u}`]:u,[`k-chip-${a}`]:a,[`k-chip-${a}-${l}`]:!(!a||!l)},e.className),"aria-pressed":e.role?void 0:I,"aria-disabled":i,"aria-describedby":e.ariaDescribedBy,"aria-keyshortcuts":f?"Enter Delete":void 0,onFocus:N,onBlur:S,onKeyDown:D},I&&(e.selectedIcon||e.selectedSvgIcon)&&c.createElement(n.IconWrap,{className:"k-chip-icon",name:e.selectedIcon?n.toIconName(e.selectedIcon):void 0,icon:e.selectedSvgIcon,size:"small"}),(e.icon||e.svgIcon)&&c.createElement(n.IconWrap,{className:"k-chip-icon",name:e.icon?n.toIconName(e.icon):void 0,icon:e.svgIcon,size:"small"}),e.avatar&&c.createElement("div",{className:n.classNames("k-chip-avatar","k-avatar",e.avatar.rounded&&`k-rounded-${e.avatar.rounded}`),style:e.avatar.style},c.createElement("span",{className:"k-avatar-image"},c.createElement("img",{src:e.avatar.image,alt:e.avatar.imageAlt}))),c.createElement("span",{className:"k-chip-content"},void 0!==e.children?e.children:e.text&&c.createElement("span",{"aria-label":e.ariaLabel||e.text,className:"k-chip-label"},e.text)),f&&c.createElement("span",{className:"k-chip-actions"},c.createElement("span",{className:n.classNames("k-chip-action","k-chip-remove-action"),onClick:E},c.createElement(n.IconWrap,{name:m?n.toIconName(m):void 0,icon:h||r.xCircleIcon,size:"small"}))))}),_={id:s.string,text:s.string,value:s.any,dir:s.oneOf(["ltr","rtl"]),removable:s.bool,removeIcon:s.string,removeIconSvg:n.svgIconPropType,disabled:s.bool,icon:s.string,svgIcon:n.svgIconPropType,selectedIcon:s.string,selectedIconSvg:n.svgIconPropType,onRemove:s.func,dataItem:s.any,selected:s.bool,ariaDescribedBy:s.string,size:s.oneOf(["small","medium","large"]),rounded:s.oneOf(["small","medium","large","full"]),fillMode:s.oneOf(["outline","solid"]),themeColor:s.oneOf(["base","info","success","warning","error"])},J={disabled:!1,removable:!1,removeIcon:"k-i-x-circle",removeSvgIcon:r.xCircleIcon,dir:"ltr",size:void 0,rounded:void 0,fillMode:void 0,themeColor:void 0};Z.displayName="KendoReactChip",Z.propTypes=_;const Q=(e,t,s)=>{"multiple"===t.selection?Array.isArray(e)||(e=e?[e]:null):"single"===t.selection&&Array.isArray(e)&&(e=e?e.join(""):null);const[n,o]=c.useState(e);return[n,e=>{const r=((e,t)=>{switch(t.selection){case"single":switch(t.type){case"toggle":if(!Array.isArray(e)||null===e)return t.payload===e?null:t.payload;throw new Error("State cannot be an array in single selection");case"remove":return t.payload===e?null:e;default:return e}case"multiple":switch(t.type){case"toggle":if(Array.isArray(e))return e.some(e=>e===t.payload)?e.filter(e=>e!==t.payload):[...e,t.payload];if(null===e)return[t.payload];throw new Error("State cannot be non-array in multiple selection");case"remove":return Array.isArray(e)?e.some(e=>e===t.payload)?e.filter(e=>e!==t.payload):[...e,t.payload]:e;default:return e}case"none":return null;default:return e}})(t.state||n,{...e,...t});s&&s(r,e.event),"none"!==t.selection&&o(r)}]},X=c.forwardRef((e,t)=>{const s=c.useRef(null),o=c.useRef(null),{id:r,style:i,tabIndex:a,className:l,ariaDescribedBy:d,ariaLabelledBy:u,ariaLabel:p,value:m,defaultData:h=ee.defaultData,chip:f=ee.chip,disabled:v=ee.disabled,size:g=ee.size,defaultValue:b=ee.defaultValue,selection:y=ee.selection,valueField:k=ee.valueField,textField:C=ee.textField,dir:I=ee.dir,onChange:x,onDataChange:w}=e,E=n.useDir(o,I),D=c.useMemo(()=>f||Z,[f,Z]);c.useImperativeHandle(s,()=>({element:o.current,props:e})),c.useImperativeHandle(t,()=>s.current);const N=c.useCallback((e,t)=>{x&&s.current&&x.call(void 0,{value:e,target:s.current,syntheticEvent:t})},[x]),[S,B]=Q(m||b,{selection:y,state:m},N),K=c.useCallback((e,t)=>{w&&s.current&&w.call(void 0,{value:e,target:s.current,syntheticEvent:t})},[w]),[R,O]=((e,t,s)=>{const[n,o]=c.useState(e);return[n,e=>{const r=((e,t)=>{switch(t.type){case"add":case"reorder":break;case"remove":return e.filter(e=>e[t.valueField]!==t.payload);default:return e}})(t.state||n,{...e,...t});s&&s(r,e.event),o(r)}]})(e.data||h,{state:e.data,valueField:k},K),M=c.useCallback((e,t)=>(e.push(t[k]),e),[k]),z=c.useMemo(()=>e.data||R,[e.data,R]),F=c.useMemo(()=>m||S,[m,S]),P=c.useMemo(()=>z.reduce(M,[]),[z,M]),T=c.useCallback(e=>n.getter(k)(e),[k]),A=c.useCallback(e=>n.getter(C)(e),[C]),[L,$]=(e=>{const[t,s]=c.useState(null);return[t,t=>{const n=((e,t)=>{const s=t.items.findIndex(t=>t===e);switch(t.type){case"next":return s===t.items.length-1?e:t.items[s+1];case"prev":return 0===s?e:t.items[s-1];case"current":return t.payload;case"reset":return null;default:return e}})(t.payload,{...t,...e});s(n)}]})({items:P}),W=n.useMouse(e,s);return c.createElement(H.Provider,{value:[F,B]},c.createElement(U.Provider,{value:[L,$]},c.createElement(j.Provider,{value:[z,O]},c.createElement("div",{ref:o,...W,role:v?void 0:"listbox",id:r,dir:E,style:i,tabIndex:n.getTabIndex(a,v,void 0),className:n.classNames("k-chip-list",{"k-rtl":"rtl"===E,"k-disabled":v,[`k-chip-list-${n.kendoThemeMaps.sizeMap[g]||g}`]:g},l),"aria-label":p,"aria-labelledby":u,"aria-describedby":d,"aria-orientation":"horizontal","aria-multiselectable":"multiple"===y},z.map((e,t)=>c.createElement(D,{role:"option",dataItem:e,size:g,key:[T(e),t].join("-"),text:A(e),value:T(e),ariaLabel:e.ariaLabel,svgIcon:e.svgIcon||void 0}))))))}),Y={id:s.string,className:s.string,tabIndex:s.number,data:s.any,defaultData:s.arrayOf(s.any),onDataChange:s.func,value:s.oneOfType([s.any,s.arrayOf(s.any)]),defaultValue:s.oneOfType([s.any,s.arrayOf(s.any)]),onChange:s.func,selection:s.oneOf(["single","none","multiple"]),textField:s.string,valueField:s.string,disabled:s.bool,dir:s.oneOf(["ltr","rtl"]),ariaLabelledBy:s.string,ariaDescribedBy:s.string,size:s.oneOf(["small","medium","large"])},ee={chip:Z,size:void 0,disabled:!1,defaultValue:null,defaultData:[],dir:"ltr",selection:"none",textField:"text",valueField:"value"};X.displayName="KendoReactChipList",X.propTypes=Y;const te=c.forwardRef((e,t)=>{const{className:s,disabled:o,text:r,icon:i,style:a,id:l,focused:d,tabIndex:u,index:p,dataItem:m,item:h,svgIcon:f,onDown:v,onClick:g,...b}=e,y=c.useRef(null),k=c.useCallback(()=>{y.current&&y.current.focus()},[]),C=c.useCallback(()=>({element:y.current,focus:k}),[k]);c.useImperativeHandle(t,C);const I=c.useCallback(e=>{g&&void 0!==p&&!o&&g(e,p)},[g,p]),x=c.useMemo(()=>n.classNames("k-fab-item",{"k-focus":d,"k-disabled":o},s),[s,o,d]),w=h;return c.createElement("li",{ref:y,id:l,className:x,style:a,role:"menuitem",tabIndex:n.getTabIndex(u,o),"aria-disabled":o,"aria-label":`${r||""} floatingactionbutton item`,onClick:I,onMouseDown:v,onPointerDown:v,...b},w?c.createElement(w,{itemIndex:p,item:m}):c.createElement(c.Fragment,null,r&&c.createElement("span",{className:"k-fab-item-text"},r),i||f?c.createElement(n.IconWrap,{className:"k-fab-item-icon",name:i,icon:f}):null))});te.propTypes={className:s.string,style:s.object,children:s.any,disabled:s.bool,focused:s.bool,index:s.number,icon:s.string,svgIcon:n.svgIconPropType,text:s.string,tabIndex:s.number,customProp:s.any},te.displayName="KendoFloatingActionButtonItem";const se="16px",ne=e=>"number"==typeof e?e+"px":e,oe=(e,t)=>{const s={horizontal:t?"right":"left",vertical:"bottom"};return"end"===e.horizontal&&(s.horizontal=t?"left":"right"),s},re=(e,t)=>{const s={horizontal:t?"right":"left",vertical:"top"};return"end"===e.horizontal&&(s.horizontal=t?"left":"right"),s},ie=(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"]),ae=(e,t,s,n)=>{const o=t.horizontal,r=t.vertical;if(e.current){const i=s&&void 0!==s.x?ne(s.x):se,a=s&&void 0!==s.x?`calc(50% + ${ne(s.x)})`:"50%",l=s&&void 0!==s.y?ne(s.y):se,c=s&&void 0!==s.y?`calc(50% + ${ne(s.y)})`:"50%";e.current.style.setProperty(le(t,n),"center"===o?a:i),e.current.style.setProperty(ce(t),"middle"===r?c:l),n&&(("top"===r||"bottom"===r)&&"start"===o&&e.current.style.setProperty("left","unset"),"middle"===r&&"end"===o&&e.current.style.setProperty("right","unset"),"middle"===r&&"start"===o&&e.current.style.setProperty("left","unset"))}},le=(e,t)=>{const{horizontal:s}=e;return{end:t?"left":"right",center:"left",start:t?"right":"left"}[s||"end"]},ce=e=>({top:"top",middle:"top",bottom:"bottom"}[e.vertical||"bottom"]),de=c.forwardRef((e,t)=>{const{align:s=ue.align,alignOffset:r,className:i,disabled:a,icon:l,svgIcon:d,iconClass:u,id:p,items:m,item:h,text:f,positionMode:v=ue.positionMode,size:g=ue.size,style:b,rounded:y=ue.rounded,themeColor:k=ue.themeColor,overlayStyle:C,tabIndex:I,accessKey:x,popupSettings:w={},modal:E,onClick:D,onItemClick:N,onFocus:S,onBlur:B,onKeyDown:K,onOpen:R,onClose:O,...M}=e,z=n.useZIndexContext(),F=z?z+2:100,P=c.useRef(null),T=c.useRef(null),A=c.useRef(null),L=c.useRef(null),$=c.useCallback(()=>{T.current&&T.current.focus()},[]),W=c.useCallback(()=>({element:T.current,focus:$}),[$]);c.useImperativeHandle(P,W),c.useImperativeHandle(t,()=>P.current);const[H,U]=c.useState(!1),[j,q]=c.useState(!1),[V,G]=c.useState(-1),Z=n.useId()+"-button-id",_=n.useDir(T,e.dir),J="rtl"===_,Q=n.useId()+"-list-id";c.useEffect(()=>{ae(T,s,r,J)},[T,s,r,J]),c.useEffect(()=>{j&&T&&T.current&&T.current.focus()},[j,T]);const X=c.useCallback((e,t)=>{m&&n.dispatchEvent(t?R:O,e,W(),void 0)},[R,O,m]),Y=c.useCallback(e=>{!e.target||a||(!m&&D?n.dispatchEvent(D,e,W(),void 0):(U(!H),q(!0),G(H?-1:0),X(e,!H)))},[U,q,G,D,X,H,m,a]),ee=c.useCallback(e=>{q(!0),G(H?0:-1),S&&n.dispatchEvent(S,e,W(),void 0)},[S,q,G]),se=c.useCallback(e=>{q(!1),U(!1),G(-1),n.dispatchEvent(B,e,W(),void 0),H&&X(e,!1)},[B,q,U,G,X]),ne=c.useCallback(e=>{e.preventDefault()},[]),le=c.useCallback((e,t)=>{m&&(m[t].disabled||n.dispatchEvent(N,e,W(),{itemProps:m[t],itemIndex:t}))},[N]),ce=c.useCallback((e,t)=>{!e.target||!m||(G(t),U(!1),le(e,t),X(e,!1))},[G,U,le,X]),de=c.useCallback(e=>{n.getActiveElement(document)===T.current&&e.preventDefault()},[T]),pe=c.useCallback(e=>{const t=V,s=m?m.length:-1;if(e.altKey)return!H&&e.keyCode===n.Keys.down&&(e.preventDefault(),U(!0),G(0)),void(H&&e.keyCode===n.Keys.up&&(e.preventDefault(),U(!1),G(-1)));switch(e.keyCode){case n.Keys.enter:case n.Keys.space:t>=0&&le(e,t),m||Y(e),e.preventDefault(),U(!H),G(H?-1:0);break;case n.Keys.esc:e.preventDefault(),U(!1),G(-1);break;case n.Keys.home:e.preventDefault(),G(0);break;case n.Keys.end:e.preventDefault(),G(s-1);break;case n.Keys.down:case n.Keys.right:e.preventDefault(),G(t+1>=s?0:t+1);break;case n.Keys.up:case n.Keys.left:e.preventDefault(),G(t-1<0?s-1:t-1)}n.dispatchEvent(K,e,W(),void 0)},[K,V,G,J,U]),me=c.useMemo(()=>n.classNames("k-fab",{"k-fab-sm":"small"===g,"k-fab-md":"medium"===g,"k-fab-lg":"large"===g,"k-disabled":a,"k-pos-absolute":"absolute"===v,"k-pos-fixed":"fixed"===v,"k-focus":j,[`k-rounded-${n.kendoThemeMaps.roundedMap[y]||y}`]:y,[`k-fab-${k}`]:k},`k-${s.vertical}-${s.horizontal}`,i),[k,g,y,a,v,s,j,i]),he=m&&m.map((e,t)=>c.createElement(te,{...e,key:t,index:t,id:`${Q}-${t}`,disabled:a||e.disabled,focused:V===t,dataItem:e,item:h,className:n.classNames(e.className,ie(_||"ltr",s.horizontal)),onClick:ce,onDown:de})),fe=!(!l&&!d||f),ve=(T.current?T.current.offsetWidth:0)/2-16;let ge;return ge=l||d?c.createElement(n.IconWrap,{className:"k-fab-icon",name:l,icon:d}):u?c.createElement("span",{role:"presentation",className:u}):null,c.createElement(n.ZIndexContext.Provider,{value:F},c.createElement(c.Fragment,null,c.createElement("button",{ref:T,id:p||Z,role:"button",type:"button","aria-disabled":a,"aria-expanded":m?H:void 0,"aria-haspopup":!!m,"aria-label":`${f||""} floatingactionbutton`,"aria-owns":m?Q:void 0,"aria-activedescendant":V>=0&&m?`${Q}-${V}`:void 0,tabIndex:n.getTabIndex(I,a),accessKey:x,dir:_,disabled:a,className:me,style:b,onClick:Y,onMouseDown:ne,onFocus:ee,onBlur:se,onKeyDown:pe,...M},ge,f&&c.createElement("span",{className:"k-fab-text"},f)),E&&H&&c.createElement("div",{className:"k-overlay",style:{zIndex:F,...C}}),c.createElement(o.Popup,{ref:L,anchor:T.current,show:H,animate:w.animate,popupClass:n.classNames("k-popup-transparent k-fab-popup",w.popupClass),anchorAlign:w.anchorAlign||oe(s,J),popupAlign:w.popupAlign||re(s,J),style:{boxShadow:"none"}},c.createElement("ul",{ref:A,role:"menu","aria-labelledby":p,id:Q,className:n.classNames("k-fab-items",{"k-fab-items-bottom":"bottom"!==s.vertical,"k-fab-items-top":"bottom"===s.vertical}),style:{paddingLeft:fe?ve:void 0,paddingRight:fe?ve:void 0}},he))))});de.propTypes={className:s.string,style:s.object,id:s.string,dir:s.string,tabIndex:s.number,accessKey:s.string,disabled:s.bool,icon:s.string,svgIcon:n.svgIconPropType,iconClass:s.string,text:s.string,alignOffset:s.shape({x:s.oneOfType([s.number,s.string]).isRequired,y:s.oneOfType([s.number,s.string]).isRequired}),align:s.shape({vertical:s.oneOf(["top","middle","bottom"]).isRequired,horizontal:s.oneOf(["start","center","end"]).isRequired}),positionMode:s.oneOf(["absolute","fixed"]),size:s.oneOf(["small","medium","large"]),rounded:s.oneOf(["small","medium","large","full"]),themeColor:s.oneOf(["primary","secondary","tertiary","info","success","warning","error","dark","light","inverse"]),modal:s.bool,overlayStyle:s.object};const ue={align:{vertical:"bottom",horizontal:"end"},size:void 0,rounded:void 0,themeColor:void 0,positionMode:"fixed"};de.displayName="KendoFloatingActionButton";const pe="speechToTextButton.ariaLabel",me="speechToTextButton.title",he={[pe]:"Start speech recognition",[me]:"Speech to Text Button"},fe=t.forwardRef((e,s)=>{const o=!n.validatePackage(y,{component:"SpeechToTextButton"}),l=n.getLicenseMessage(y),c=i.useLocalization(),{fillMode:u,rounded:p,size:m,themeColor:h,ariaLabel:f,svgIcon:v,disabled:g,iconSize:b,title:k,className:C,id:I,style:x,lang:w="en-US",continuous:E=!1,interimResults:D=!1,maxAlternatives:N=1,integrationMode:S="webSpeech",onStart:B,onResult:K,onEnd:R,onError:O,...M}=e,z=t.useRef(null),F=t.useRef(!1),[P,T]=t.useState(!1),A=t.useCallback(async()=>{F.current=!0,T(!0),B&&await B()},[B]),L=t.useCallback(async()=>{F.current=!1,T(!1),R&&await R()},[R]),$=t.useCallback(e=>{const t=e.results,s=t[t.length-1],n=Array.from(s).map(e=>({transcript:e.transcript,confidence:e.confidence}));null==K||K({isFinal:s.isFinal,alternatives:n})},[K]),W=t.useCallback(e=>{T(!1),F.current=!1,null==O||O({errorMessage:e.error})},[O]),H=t.useCallback(()=>{var e;F.current||null==(e=z.current)||e.start()},[]),U=t.useCallback(()=>{var e;F.current&&(null==(e=z.current)||e.stop())},[]),j=t.useCallback(()=>{var e;F.current&&(null==(e=z.current)||e.abort(),F.current=!1,T(!1))},[]),q=()=>F.current;t.useImperativeHandle(s,()=>({start:H,stop:U,abort:j,isActive:q})),t.useEffect(()=>((()=>{var e;"undefined"==typeof window||"webkitSpeechRecognition"in window||"SpeechRecognition"in window?(null!=(e=z.current)&&e.isActive()&&z.current.stop(),z.current=new a.KendoSpeechRecognition({lang:w,continuous:E,interimResults:D,maxAlternatives:N,events:{start:A,end:L,result:$,error:W}})):O&&O({errorMessage:"Speech Recognition API is not supported in this browser."})})(),()=>{F.current&&U()}),[w,E,D,N,S]);const V=void 0!==e.icon||void 0!==e.iconClass,G=t.useMemo(()=>P?r.stopSmIcon:v||r.microphoneOutlineIcon,[P,v]);return t.createElement(t.Fragment,null,t.createElement(d,{id:I,className:n.classNames({"k-speech-to-text-button":!0,"k-listening":P},C),style:x,svgIcon:V?void 0:G,iconSize:b,fillMode:u,rounded:p,size:m,themeColor:h,"aria-label":null!=f?f:c.toLanguageString(pe,he[pe]),"aria-pressed":P,disabled:g,title:null!=k?k:c.toLanguageString(me,he[me]),onClick:()=>{P?U():H()},...M},e.children),o&&t.createElement(n.WatermarkOverlay,{message:l}))});fe.displayName="KendoSpeechToTextButton";const ve=n.withIdHOC(N);ve.displayName="KendoReactDropDownButton";const ge=n.withIdHOC(C);ge.displayName="KendoReactSplitButton",e.Button=d,e.ButtonGroup=p,e.Chip=Z,e.ChipList=X,e.DropDownButton=ve,e.DropDownButtonClassComponent=N,e.DropDownButtonItem=x,e.FloatingActionButton=de,e.FloatingActionButtonItem=te,e.SpeechToTextButton=fe,e.SplitButton=ge,e.SplitButtonClassComponent=C,e.SplitButtonItem=f,e.Toolbar=A,e.ToolbarItem=$,e.ToolbarSeparator=K,e.ToolbarSpacer=W,e.toolbarButtons=B});
|
|
15
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("prop-types"),require("@progress/kendo-react-common"),require("@progress/kendo-react-popup"),require("@progress/kendo-svg-icons"),require("@progress/kendo-react-intl"),require("@progress/kendo-webspeech-common"),require("@progress/kendo-smartpaste-common")):"function"==typeof define&&define.amd?define(["exports","react","prop-types","@progress/kendo-react-common","@progress/kendo-react-popup","@progress/kendo-svg-icons","@progress/kendo-react-intl","@progress/kendo-webspeech-common","@progress/kendo-smartpaste-common"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).KendoReactButtons={},e.React,e.PropTypes,e.KendoReactCommon,e.KendoReactPopup,e.KendoSvgIcons,e.KendoReactIntl,e.KendoWebspeechCommon,e.KendoSmartpasteCommon)}(this,function(e,t,n,s,o,r,i,a,l){"use strict";function c(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(n){if("default"!==n){var s=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,s.get?s:{enumerable:!0,get:function(){return e[n]}})}}),t.default=e,Object.freeze(t)}var d=c(t);const u=d.forwardRef((e,t)=>{const{children:n,togglable:o,dir:r,disabled:i,selected:a,icon:l,iconClass:c,svgIcon:u,imageUrl:m,imageAlt:h,className:f,startIcon:v,endIcon:g,onClick:b,size:y=p.size,rounded:k=p.rounded,fillMode:C=p.fillMode,themeColor:I=p.themeColor,ariaPressed:x,iconSize:w,...E}=e,D=d.useRef(void 0),N=d.useRef(null),[S,B]=d.useState(!0===o&&!0===a),K=void 0!==u||void 0!==l||void 0!==c||void 0!==m,R=void 0!==n,O=s.useUnstyled(),M=e.unstyled||O,z=M&&M.uButton;d.useImperativeHandle(t,()=>({element:N.current,selected:void 0!==D.current?D.current:S})),d.useMemo(()=>{o&&void 0!==a&&a!==S&&B(a)},[o,a]),d.useEffect(()=>{D.current=void 0},[S]);const F=function({imageUrl:e,name:t,iconClass:n,svgIcon:o,imageAlt:r,buttonClasses:i,iconSize:a}){return e?d.createElement("img",{role:"presentation",className:s.classNames(s.uButton.icon({c:i})),alt:r,src:e}):t||o?d.createElement(s.IconWrap,{className:s.classNames(s.uButton.icon({c:i})),name:t,icon:o,size:a}):n?d.createElement("span",{role:"presentation",className:s.classNames(s.uButton.icon({c:i}),n)}):null}({name:l,svgIcon:u,iconClass:c,imageUrl:m,imageAlt:h,buttonClasses:z,iconSize:w}),P=e=>d.cloneElement(e,{className:s.classNames(s.uButton.icon({c:z}),e.props.className)}),T=d.useMemo(()=>o?S:x||void 0,[]);return d.createElement("button",{ref:N,"aria-pressed":T,...E,dir:r,disabled:i,onClick:e=>{o&&void 0===a&&(D.current=!S,B(!S)),b&&b.call(void 0,e)},className:s.classNames(s.uButton.wrapper({c:z,isRtl:"rtl"===r,selected:S,disabled:i,size:y,fillMode:C,rounded:k,themeColor:I,iconButton:!R&&K}),f)},v&&P(v),F,n&&d.createElement("span",{className:s.classNames(s.uButton.text({c:z}))},n),g&&P(g))}),p={size:void 0,rounded:void 0,fillMode:void 0,themeColor:void 0};u.displayName="KendoReactButton",u.propTypes={children:n.node,selected:n.bool,togglable:n.bool,icon:n.string,svgIcon:s.svgIconPropType,iconClass:n.string,imageUrl:n.string,imageAlt:n.string,size:n.oneOf(["small","medium","large"]),rounded:n.oneOf(["small","medium","large","full","none"]),fillMode:n.oneOf(["flat","link","outline","solid","clear"]),themeColor:n.oneOf(["base","primary","secondary","tertiary","info","success","warning","error","dark","light","inverse"])};const m=e=>{const{children:t,className:n,dir:o,disabled:r,width:i}=e,a=s.useUnstyled(),l=e.unstyled||a,c=l&&l.uButtonGroup,u=(e,t)=>{const n={...i?{width:i}:{},...e.props.style||{}},s=r||e.props.disabled,o={...e.props,...t?{className:t}:{},...Object.keys(n).length?{style:n}:{},...void 0!==s?{disabled:s}:{}};return d.Children.count(e.props.children)>0?d.cloneElement(e,o,e.props.children):d.cloneElement(e,o)},p=d.useRef(null),m=(e=>{const t=d.Children.count(e),n=void 0!==o?"rtl"===o:p.current&&"rtl"===getComputedStyle(p.current).direction||!1;return d.Children.map(e,(e,o)=>{if(d.isValidElement(e)){const r=o===t-1,i=n,a=s.classNames(e.props.className,s.uButtonGroup.position({c:c,start:i?r:0===o,end:i?0===o:r}));return u(e,a)}return e})})(t),h=s.classNames(s.uButtonGroup.wrapper({c:c,stretched:!!i,disabled:r}),n),f={className:h,style:{width:`${i}`},dir:o,role:"group","aria-disabled":r};return d.createElement("div",{ref:p,...f,className:h},m)};m.propTypes={children:n.oneOfType([n.arrayOf(n.element),n.element]),className:n.string,disabled:n.bool,width:n.string,dir:n.string};const h=e=>{const t=s.useUnstyled(),n=e.unstyled||t,o=n&&n.uDropDownButton,r=d.useCallback(t=>{e.onClick(t,e.index)},[e]),i=e.dataItem.render||e.item||(void 0===e.item?e.render:null),a=void 0!==e.dataItem.text?e.dataItem.text:e.textField?e.dataItem[e.textField]:e.dataItem,l=d.createElement("li",{id:e.id,className:s.classNames(s.uDropDownButton.li({c:o,focused:e.focused}),e.className),tabIndex:-1,onClick:r,onMouseDown:e.onDown,onPointerDown:e.onDown,role:"menuitem","aria-disabled":e.dataItem.disabled||void 0},d.createElement("span",{tabIndex:-1,className:s.classNames(s.uDropDownButton.link({c:o,selected:e.dataItem.selected,disabled:e.dataItem.disabled})),key:"icon"},i?d.createElement(i,{item:e.dataItem,itemIndex:e.index}):d.createElement(d.Fragment,null,(e.dataItem.icon||e.dataItem.iconClass||e.dataItem.svgIcon)&&d.createElement(s.IconWrap,{className:e.dataItem.iconClass,name:e.dataItem.icon,icon:e.dataItem.svgIcon}),e.dataItem.imageUrl&&d.createElement("img",{role:"presentation",alt:"",src:e.dataItem.imageUrl,className:"k-icon"}),a&&d.createElement("span",{className:"k-menu-link-text"},a))));return void 0!==e.item&&void 0!==e.render?e.render.call(void 0,l,e):l};h.displayName="KendoReactButtonItem";const f=class extends d.Component{render(){return null}};f.propTypes={text:n.string,icon:n.string,iconClass:n.string,imageUrl:n.string,disabled:n.bool,render:n.any};let v=f;const g=(e,t,n,o)=>{if(n)return e;const r=Math.min(o-1,Math.max(0,e));switch(t){case s.Keys.enter:case s.Keys.space:case s.Keys.esc:return-1;case s.Keys.up:case s.Keys.left:return r-1<0?o-1:r-1;case s.Keys.down:case s.Keys.right:return r+1>=o?0:r+1;case s.Keys.home:return 0;case s.Keys.end:return o-1;default:return e}};function b(e){const t={horizontal:"left",vertical:"bottom"};return e&&(t.horizontal="right"),t}function y(e){const t={horizontal:"left",vertical:"top"};return e&&(t.horizontal="right"),t}const k=Object.freeze({name:"@progress/kendo-react-buttons",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate:0,version:"13.4.0-develop.5",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"}),C=class extends d.Component{constructor(e){super(e),this.state={focused:!1,focusedIndex:-1,opened:!1},this.wrapper=null,this.mainButton=null,this.list=null,this.skipFocus=!1,this.buttonsData=[],this.showLicenseWatermark=!1,this.onKeyDown=e=>{const{focusedIndex:t}=this.state;if(e.altKey)return void(this.opened||e.keyCode!==s.Keys.down?this.opened&&e.keyCode===s.Keys.up&&(e.preventDefault(),this.setState({focusedIndex:-1}),this.setOpen(!1,e)):(e.preventDefault(),this.setState({focusedIndex:0}),this.setOpen(!0,e)));let n;if(e.keyCode===s.Keys.enter||e.keyCode===s.Keys.space){if(e.preventDefault(),this.dispatchClickEvent(e,t),t>=0){n={focusedIndex:this.opened?-1:0};const t=!this.opened;this.setOpen(t,e)}}else if(this.opened&&e.keyCode===s.Keys.esc)return this.setState({focusedIndex:-1}),void this.setOpen(!1,e);if(this.opened){const o=g(t,e.keyCode,e.altKey,this.buttonsData.length);o!==t&&(n=n||{},n.focusedIndex=o);const r=e.keyCode===s.Keys.up||e.keyCode===s.Keys.down||e.keyCode===s.Keys.left||e.keyCode===s.Keys.right;!e.altKey&&(r||e.keyCode===s.Keys.home||e.keyCode===s.Keys.end)&&e.preventDefault()}n&&this.setState(n)},this.switchFocus=e=>{this.skipFocus=!0,e(),window.setTimeout(()=>this.skipFocus=!1,0)},this.onFocus=e=>{this.skipFocus||(s.dispatchEvent(this.props.onFocus,e,this,void 0),this.setState({focused:!0}))},this.setOpen=(e,t)=>{this.opened!==e&&(this.openedDuringOnChange=e,this.setState({opened:e}),t?this.dispatchPopupEvent(t,e):this.openedDuringOnChange=void 0)},this.onItemClick=(e,t)=>{this.opened&&this.setState({focusedIndex:0}),this.dispatchClickEvent(e,t),this.setOpen(!1,e)},this.onBlur=e=>{this.skipFocus||(this.setState({focused:!1,focusedIndex:-1}),s.dispatchEvent(this.props.onBlur,e,this,void 0),setTimeout(()=>{this.setOpen(!1,e)},0))},this.onPopupClose=e=>{var t;const n=s.getActiveElement(document);this.element&&this.element.removeAttribute("tabindex"),(n===this.list||null!=(t=this.list)&&t.contains(n))&&this.switchFocus(()=>{this.element&&this.element.focus({preventScroll:!0})}),this.props.popupSettings&&this.props.popupSettings.onClose&&this.props.popupSettings.onClose.call(void 0,e)},this.listRef=e=>{this.list=e,e&&this.state.focused&&this.switchFocus(()=>{e.focus({preventScroll:!0}),this.element&&(this.element.tabIndex=-1)})},this.onSplitPartClick=e=>{if(this.buttonsData.length){const t=!this.opened;this.setState({focusedIndex:t?0:-1,focused:!0}),this.setOpen(t,e)}},this.onDownSplitPart=e=>{e.preventDefault();const t=s.getActiveElement(document);this.element&&t!==this.element&&t!==this.list&&this.element.focus()},this.onItemDown=e=>{s.getActiveElement(document)===this.list&&e.preventDefault()},this.dispatchPopupEvent=(e,t)=>{s.dispatchEvent(t?this.props.onOpen:this.props.onClose,e,this,void 0),this.openedDuringOnChange=void 0},this.showLicenseWatermark=!s.validatePackage(k,{component:"SplitButton"}),this.licenseMessage=s.getLicenseMessage(k)}get guid(){return this.props.id?this.props.id+"-accessibility-id":this.props.id}get opened(){return void 0!==this.openedDuringOnChange?this.openedDuringOnChange:void 0===this.props.opened?this.state.opened:this.props.opened}render(){this.buttonsData=this.props.items||d.Children.toArray(this.props.children).filter(e=>e&&e.type===v).map(e=>e.props);const e=this.isRtl(),t=e?"rtl":void 0,{id:n,style:o,tabIndex:i,disabled:a}=this.props;return d.createElement(d.Fragment,null,d.createElement("div",{id:n,style:o,className:s.classNames("k-split-button","k-button-group",{"k-focus":this.state.focused},this.props.rounded&&`k-rounded-${s.kendoThemeMaps.roundedMap[this.props.rounded]}`,this.props.className),onKeyDown:this.onKeyDown,onFocus:this.onFocus,onBlur:this.onBlur,dir:t,ref:e=>{this.wrapper=e}},d.createElement(u,{ref:e=>{this.mainButton=e&&e.element},type:"button",size:this.props.size,rounded:this.props.rounded,fillMode:this.props.fillMode,themeColor:this.props.themeColor,onClick:e=>this.onItemClick(e,-1),disabled:a||void 0,tabIndex:i,accessKey:this.props.accessKey,className:this.props.buttonClass,icon:this.props.icon,svgIcon:this.props.svgIcon,iconClass:this.props.iconClass,startIcon:this.props.startIcon,endIcon:this.props.endIcon,imageUrl:this.props.imageUrl,dir:t,"aria-disabled":a,"aria-haspopup":!0,"aria-expanded":this.opened||void 0,"aria-label":this.props.ariaLabel,"aria-controls":this.opened?this.guid:void 0,id:"button-"+this.guid,title:this.props.title},this.props.text),d.createElement(u,{type:"button",size:this.props.size,rounded:this.props.rounded,fillMode:this.props.fillMode,themeColor:this.props.themeColor,icon:"caret-alt-down",svgIcon:r.caretAltDownIcon,className:"k-split-button-arrow",disabled:a||void 0,tabIndex:-1,onClick:this.onSplitPartClick,onMouseDown:this.onDownSplitPart,onPointerDown:this.onDownSplitPart,dir:t,"aria-label":"menu toggling button"}),this.renderPopup(e)),this.showLicenseWatermark&&d.createElement(s.WatermarkOverlay,{message:this.licenseMessage}))}componentDidMount(){(void 0===this.props.dir&&this.isRtl()||this.opened)&&this.forceUpdate()}get element(){return this.mainButton}dispatchClickEvent(e,t){this.isItemDisabled(t)||(-1===t?s.dispatchEvent(this.props.onButtonClick,e,this,void 0):s.dispatchEvent(this.props.onItemClick,e,this,{item:this.buttonsData[t],itemIndex:t}))}renderPopup(e){const{popupSettings:t={}}=this.props,{focusedIndex:n}=this.state;return d.createElement(o.Popup,{anchor:this.wrapper,show:this.opened,animate:t.animate,popupClass:s.classNames("k-menu-popup",t.popupClass),anchorAlign:t.anchorAlign||b(e),popupAlign:t.popupAlign||y(e),style:e?{direction:"rtl"}:void 0,onClose:this.onPopupClose},d.createElement("ul",{role:"menu",id:this.guid,"aria-labelledby":"button-"+this.guid,tabIndex:-1,ref:this.listRef,"aria-activedescendant":n>=0?`${this.guid}-${n}`:void 0,className:s.classNames("k-menu-group",{[`k-menu-group-${s.kendoThemeMaps.sizeMap[this.props.size]||this.props.size}`]:this.props.size})},this.renderChildItems()))}renderChildItems(){const{item:e,itemRender:t,textField:n}=this.props;return this.buttonsData.length>0?this.buttonsData.map((o,r)=>d.createElement(h,{className:s.classNames("k-menu-item",{"k-first":0===r},{"k-last":r===this.buttonsData.length-1}),dataItem:o,textField:n,focused:this.state.focusedIndex===r,onClick:this.onItemClick,onDown:this.onItemDown,render:t,item:e,key:r,index:r,id:`${this.guid}-${r}`})):null}isItemDisabled(e){return this.buttonsData[e]?this.buttonsData[e].disabled:this.props.disabled}isRtl(){return void 0!==this.props.dir?"rtl"===this.props.dir:!!this.wrapper&&"rtl"===getComputedStyle(this.wrapper).direction}};C.propTypes={accessKey:n.string,ariaLabel:n.string,title:n.string,onButtonClick:n.func,onFocus:n.func,onBlur:n.func,onItemClick:n.func,onOpen:n.func,onClose:n.func,text:n.string,items:n.arrayOf(n.any),textField:n.string,tabIndex:n.number,disabled:n.bool,icon:n.string,svgIcon:s.svgIconPropType,imageUrl:n.string,popupSettings:n.object,itemRender:n.any,item:n.func,className:n.string,buttonClass:n.string,dir:n.string,size:n.oneOf(["small","medium","large"]),rounded:n.oneOf(["small","medium","large","full","none"]),fillMode:n.oneOf(["flat","link","outline","solid","clear"]),themeColor:n.oneOf(["base","primary","secondary","tertiary","info","success","warning","error","dark","light","inverse"])},C.defaultProps={size:void 0,rounded:void 0,fillMode:void 0,themeColor:void 0};let I=C;const x=class extends d.Component{render(){return null}};x.propTypes={text:n.string,icon:n.string,iconClass:n.string,imageUrl:n.string,selected:n.bool,disabled:n.bool,render:n.any};let w=x;const E=class extends d.Component{constructor(e){super(e),this.state={opened:!1,focused:!1,focusedIndex:-1},this.mainButton=null,this.list=null,this.skipFocus=!1,this.showLicenseWatermark=!1,this.buttonsData=[],this.onKeyDown=e=>{const{focusedIndex:t}=this.state;if(e.altKey)return void(this.opened||e.keyCode!==s.Keys.down?this.opened&&e.keyCode===s.Keys.up&&(e.preventDefault(),this.setState({focusedIndex:-1}),this.setOpen(!1,e)):(e.preventDefault(),this.setOpen(!0,e),this.setState({focusedIndex:0})));const n={...this.state};if(e.keyCode===s.Keys.enter||e.keyCode===s.Keys.space){e.preventDefault(),t>=0&&this.dispatchClickEvent(e,t);const n=!this.opened;return this.setState({focused:!0,focusedIndex:n?0:-1}),void this.setOpen(n,e)}if(this.opened&&e.keyCode===s.Keys.esc)return this.setState({focusedIndex:-1}),void this.setOpen(!1,e);if(this.opened){const o=g(t,e.keyCode,e.altKey,this.buttonsData.length);n.focusedIndex=o;const r=e.keyCode===s.Keys.up||e.keyCode===s.Keys.down||e.keyCode===s.Keys.left||e.keyCode===s.Keys.right;!e.altKey&&(r||e.keyCode===s.Keys.home||e.keyCode===s.Keys.end)&&e.preventDefault()}this.setState(n)},this.switchFocus=e=>{this.skipFocus=!0,e(),window.setTimeout(()=>this.skipFocus=!1,0)},this.handleFocus=e=>{this.skipFocus||(this.setState({focused:!0,focusedIndex:this.opened?0:-1}),s.dispatchEvent(this.props.onFocus,e,this,void 0))},this.handleButtonBlur=e=>{this.opened||(this.setState({focused:!1}),s.dispatchEvent(this.props.onBlur,e,this,void 0))},this.handleMenuBlur=e=>{this.skipFocus||(this.setState({focused:!1,focusedIndex:-1}),s.dispatchEvent(this.props.onBlur,e,this,void 0),setTimeout(()=>{this.setOpen(!1,e)},0))},this.setOpen=(e,t)=>{this.opened!==e&&(this.openedDuringOnChange=e,this.setState({opened:e}),t?this.dispatchPopupEvent(t,e):this.openedDuringOnChange=void 0)},this.onItemClick=(e,t)=>{this.setState({focusedIndex:-1}),this.dispatchClickEvent(e,t),this.setOpen(!1,e)},this.onItemDown=e=>{s.getActiveElement(document)===this.list&&e.preventDefault()},this.mouseDown=e=>{e.preventDefault();const t=s.getActiveElement(document);this.element&&t!==this.element&&t!==this.list&&this.element.focus()},this.onPopupClose=e=>{var t;const n=s.getActiveElement(document);this.element&&this.element.removeAttribute("tabindex"),(n===this.list||null!=(t=this.list)&&t.contains(n))&&this.switchFocus(()=>{this.element&&this.element.focus({preventScroll:!0})}),this.props.popupSettings&&this.props.popupSettings.onClose&&this.props.popupSettings.onClose.call(void 0,e)},this.listRef=e=>{this.list=e,e&&this.state.focused&&this.switchFocus(()=>{e.focus({preventScroll:!0}),this.element&&(this.element.tabIndex=-1)})},this.onClickMainButton=e=>{if(s.dispatchEvent(this.props.onClick,e,this,void 0),!this.buttonsData.length)return;const t=!this.opened;this.setState({focused:!0,focusedIndex:t?0:-1}),this.setOpen(t,e)},this.dispatchPopupEvent=(e,t)=>{s.dispatchEvent(t?this.props.onOpen:this.props.onClose,e,this,void 0),this.openedDuringOnChange=void 0},this.showLicenseWatermark=!s.validatePackage(k,{component:"DropDownButton"}),this.licenseMessage=s.getLicenseMessage(k)}get guid(){return this.props.id+"-accessibility-id"}get opened(){return void 0!==this.openedDuringOnChange?this.openedDuringOnChange:void 0===this.props.opened?this.state.opened:this.props.opened}render(){const e=this.isRtl(),t=this.props.unstyled&&this.props.unstyled.uDropDownButton,n=e?"rtl":void 0,{id:o,style:r,tabIndex:i,disabled:a,size:l,rounded:c,fillMode:p,themeColor:m,ariaLabel:h,title:f,accessKey:v,icon:g,svgIcon:b,iconClass:y,buttonClass:k,className:C,imageUrl:I,startIcon:x,endIcon:E}=this.props;return this.buttonsData=this.props.items||d.Children.toArray(this.props.children).filter(e=>e&&e.type===w).map(e=>e.props),d.createElement(d.Fragment,null,d.createElement(u,{id:o,size:l,style:r,rounded:c,fillMode:p,themeColor:m,onClick:this.onClickMainButton,onMouseDown:this.mouseDown,onKeyDown:this.onKeyDown,onFocus:this.handleFocus,onBlur:this.handleButtonBlur,"aria-disabled":a?"true":void 0,tabIndex:i,accessKey:v,icon:g,svgIcon:b,iconClass:y,className:s.classNames(k,C,s.uDropDownButton.wrapper({c:t,focused:this.state.focused,disabled:a})),imageUrl:I,dir:n,ref:e=>{this.mainButton=(null==e?void 0:e.element)||null},type:"button","aria-expanded":this.opened?"true":"false","aria-label":h,"aria-controls":this.opened?this.guid:void 0,title:f,startIcon:x,endIcon:E},this.props.text),this.showLicenseWatermark&&d.createElement(s.WatermarkOverlay,{message:this.licenseMessage}),this.renderPopup(e))}componentDidMount(){(void 0===this.props.dir&&this.isRtl()||this.opened)&&this.forceUpdate()}get element(){return this.mainButton}dispatchClickEvent(e,t){this.isItemDisabled(t)||s.dispatchEvent(this.props.onItemClick,e,this,{item:this.buttonsData[t],itemIndex:t})}renderPopup(e){const{popupSettings:t={},_zIndex:n,unstyled:r}=this.props,i=n?n+2e3:12e3,a=r&&r.uDropDownButton,{focusedIndex:l}=this.state;return d.createElement(s.ZIndexContext.Provider,{value:i},d.createElement(o.Popup,{anchor:this.mainButton,show:this.opened,animate:t.animate,popupClass:s.classNames(s.uDropDownButton.popup({c:a}),t.popupClass),anchorAlign:t.anchorAlign||b(e),popupAlign:t.popupAlign||y(e),style:e?{direction:"rtl"}:void 0,onClose:this.onPopupClose},d.createElement("ul",{role:"list",id:this.guid,tabIndex:-1,"aria-activedescendant":l>=0?`${this.guid}-${l}`:void 0,ref:this.listRef,onKeyDown:this.onKeyDown,onBlur:this.handleMenuBlur,className:s.classNames(s.uDropDownButton.ul({c:a,size:this.props.size}))},this.renderChildItems())))}renderChildItems(){const{item:e,itemRender:t,textField:n,unstyled:o}=this.props,r=o&&o.uDropDownButton;return this.buttonsData.length>0?this.buttonsData.map((o,i)=>d.createElement(h,{className:s.classNames(s.uDropDownButton.item({c:r}),o.className,{"k-first":0===i},{"k-last":i===this.buttonsData.length-1}),dataItem:o,textField:n,focused:this.state.focusedIndex===i,onClick:this.onItemClick,onDown:this.onItemDown,render:t,item:e,index:i,key:i,id:`${this.guid}-${i}`})):null}isItemDisabled(e){return this.buttonsData[e]?this.buttonsData[e].disabled:this.props.disabled}isRtl(){return void 0!==this.props.dir?"rtl"===this.props.dir:!!this.mainButton&&"rtl"===getComputedStyle(this.mainButton).direction}};E.propTypes={accessKey:n.string,ariaLabel:n.string,title:n.string,onFocus:n.func,onBlur:n.func,onClick:n.func,onItemClick:n.func,onOpen:n.func,onClose:n.func,items:n.arrayOf(n.any),textField:n.string,tabIndex:n.number,disabled:n.bool,icon:n.string,svgIcon:s.svgIconPropType,iconClass:n.string,imageUrl:n.string,popupSettings:n.object,itemRender:n.func,item:n.func,className:n.string,buttonClass:n.string,dir:n.string,size:n.oneOf(["small","medium","large"]),rounded:n.oneOf(["small","medium","large","full","none"]),fillMode:n.oneOf(["flat","link","outline","solid","clear"]),themeColor:n.oneOf(["base","primary","secondary","tertiary","info","success","warning","error","dark","light","inverse"])},E.defaultProps={size:void 0,rounded:void 0,fillMode:void 0,themeColor:void 0};let D=E;const N=s.createPropsContext(),S=s.withIdHOC(s.withPropsContext(N,s.withUnstyledHOC(s.withZIndexContext(D))));S.displayName="KendoReactDropDownButton";const B=":not(.k-dropdownlist button):not(.k-colorpicker button):not(.k-split-button .k-split-button-arrow)",K=["button"+B,".k-button-group > button"+B,".k-colorpicker",".k-dropdownlist"],R=e=>d.createElement("div",{ref:e._ref,className:s.classNames("k-toolbar-separator k-separator",e.className)}),O="prevArrow.title",M="nextArrow.title",z="moreButtonTitle.title",F={[O]:"Previous scroll button",[M]:"Next scroll button",[z]:"More button"},P=e=>{const t=i.useLocalization(),{disabled:n,type:o,scrollContentRef:a,buttonScrollSpeed:l,prevButton:c,nextButton:u}=e,p="prev"===o?c||"span":u||"span";return d.createElement(p,{className:s.classNames("k-button","k-icon-button",`k-toolbar-${o}`,{"k-disabled":n}),title:`${"prev"===o?t.toLanguageString(O,F[O]):t.toLanguageString(M,F[M])}`,"aria-hidden":!0,tabIndex:n?-1:void 0,onClick:e=>{a&&a.current&&l&&a.current.scrollBy({left:"next"===o?l:-l,behavior:"smooth"})}},d.createElement(s.SvgIcon,{icon:"prev"===o?r.caretAltLeftIcon:r.caretAltRightIcon,className:"k-button-icon"}))},T=e=>{const{scrollButtons:t,scrollButtonsPosition:n,isOverflowing:s,scrollContentRef:o,buttonScrollSpeed:r,dir:i,isScrollStartPosition:a,isScrollEndPosition:l,prevButton:c,nextButton:u,children:p}=e,m=(e,t)=>d.createElement(P,{type:e,disabled:t,scrollContentRef:o,buttonScrollSpeed:r,prevButton:c,nextButton:u}),h="visible"===t||"auto"===t&&s;return d.createElement(d.Fragment,null,h&&"split"===n&&d.createElement(d.Fragment,null,m("rtl"!==i?"prev":"next",a),d.createElement(R,{className:"k-toolbar-button-separator"})),h&&"start"===n&&d.createElement(d.Fragment,null,m("rtl"!==i?"prev":"next",a),m("rtl"!==i?"next":"prev",l),d.createElement(R,{className:"k-toolbar-button-separator"})),d.createElement("span",{className:"k-toolbar-items k-toolbar-items-scroll",ref:o},p),h&&"split"===n&&d.createElement(d.Fragment,null,d.createElement(R,{className:"k-toolbar-button-separator"}),m("rtl"!==i?"next":"prev",l)),h&&"end"===n&&d.createElement(d.Fragment,null,d.createElement(R,{className:"k-toolbar-button-separator"}),m("rtl"!==i?"prev":"next",a),m("rtl"!==i?"next":"prev",l)))},A=e=>{var t;const{toolbarRef:n,children:a,fillMode:l,size:c}=e,[p,m]=d.useState(!1),h=d.useRef(d.Children.toArray(a).filter(e=>d.isValidElement(e)).map((e,t)=>d.cloneElement(e,{key:e.key||t}))),f=d.useRef([]),v=d.useRef(0),g=d.useRef(null),b=d.useRef(null),y=i.useLocalization(),[k,C]=d.useReducer(e=>e+1,0),I=()=>{if(!n.current)return;let e=0;const t=n.current.clientWidth,s=parseInt(window.getComputedStyle(n.current).gap||"0",10),o=Array.from(n.current.children).reduce((e,t,n)=>e+=Math.ceil(t.clientWidth),0),r=Array.from(n.current.children).length;if(e=o+r*s+2*s,e>t){const e=[...h.current],n=e.pop();v.current=t,h.current=e,n&&(f.current=[n,...f.current])}else if(t>v.current+s*r){const e=[...f.current],n=e.shift();f.current=e,n&&(h.current=[...h.current,n]),v.current=t}C()};d.useEffect(()=>{I();const e=new ResizeObserver(I),t=n.current;return t&&e.observe(t),()=>{t&&e.unobserve(t)}},[]);return d.createElement(d.Fragment,null,h.current.length>0&&h.current,f.current.length>0&&d.createElement(d.Fragment,null,d.createElement(R,{_ref:b,className:"k-toolbar-button-separator"}),d.createElement(u,{ref:g,className:"k-toolbar-overflow-button",fillMode:"flat",svgIcon:r.moreHorizontalIcon,title:y.toLanguageString(z,F[z]),onClick:()=>{m(!p)}}),d.createElement(o.Popup,{anchor:n.current,show:p,popupClass:"k-toolbar-popup",style:{width:null==(t=n.current)?void 0:t.offsetWidth}},d.createElement("span",{className:`k-toolbar-items-list k-toolbar-items-list-${s.kendoThemeMaps.sizeMap[c]} k-toolbar-items-list-${l}`},f.current.length>0&&f.current))))},L=d.forwardRef((e,t)=>{const{children:n,className:o,id:r,ariaLabel:i,keyboardNavigation:a,role:l,onResize:c,style:u,tabIndex:p=$.tabIndex,size:m=$.size,fillMode:h=$.fillMode,overflow:f,scrollButtons:v=$.scrollButtons,scrollButtonsPosition:g=$.scrollButtonsPosition,buttonScrollSpeed:b=$.buttonScrollSpeed,prevButton:y,nextButton:k,_ariaControls:C}=e,I=d.useRef(!1),x=d.useRef(null),w=d.useRef(null),E=d.useRef(0),D=d.useRef(0),N=d.useRef([]),S=d.useRef({element:null,props:e}),[B,R]=d.useState(!1),[O,M]=d.useState(!0),[z,F]=d.useState(!1),P=s.useDir(x,e.dir),L=d.useMemo(()=>e.buttons||K,[e.buttons]),W=d.useMemo(()=>L.map(e=>e+":focus").join(","),[L]),H=()=>{const e=x.current&&x.current.querySelector(W);return Math.max(0,N.current.findIndex(t=>t===e))};d.useImperativeHandle(S,()=>({element:x.current,props:e})),d.useImperativeHandle(t,()=>S.current),d.useEffect(()=>(window.addEventListener("resize",q),x.current&&(D.current=x.current.offsetWidth,E.current=x.current.offsetHeight,!1!==a&&(N.current=Array.from(x.current.querySelectorAll(L.join(","))),U(0))),()=>{window.removeEventListener("resize",q),N.current.length=0}),[]),d.useEffect(()=>{if(I.current){if(!x.current||!1===a)return;N.current=Array.from(x.current.querySelectorAll(L.join(","))),U(H()),V()}else I.current=!0});const U=e=>{N.current.forEach((t,n)=>{t.tabIndex=n===e?p:-1})},j=(e,t)=>{const n=N.current[t];if(n){n.tabIndex=p,n.focus();const t=N.current[e];t&&(t.tabIndex=-1)}},q=e=>{if(!x.current)return;const t=x.current.offsetWidth,n=x.current.offsetHeight;if(D.current!==t||E.current!==n){D.current=t,E.current=n;const s={offsetWidth:D.current,offsetHeight:E.current};c&&c.call(void 0,{target:S.current,...s,nativeEvent:e})}V()},V=d.useCallback(()=>{const e=w.current;e&&R(e.scrollWidth>e.clientWidth||e.scrollHeight>e.clientHeight)},[]),G=d.useCallback(()=>{const e=w.current;if(e){const t=0===e.scrollLeft,n="rtl"!==P?e.scrollLeft+e.clientWidth===e.scrollWidth:e.clientWidth-e.scrollLeft===e.scrollWidth;t&&M(!0),n&&F(!0),!t&&!n&&(M(!1),F(!1))}},[P]);return d.useEffect(()=>{const e=w.current;if(e)return e.addEventListener("scroll",G),()=>{e.removeEventListener("scroll",G)}},[G]),d.createElement("div",{id:r,"aria-label":i,"aria-controls":C,className:s.classNames("k-toolbar",{[`k-toolbar-${s.kendoThemeMaps.sizeMap[m]||m}`]:m,[`k-toolbar-${h}`]:h,"k-toolbar-scrollable":"scroll"===f,"k-toolbar-scrollable-overlay":"scroll"===f&&("hidden"===v||void 0===v),"k-toolbar-scrollable-start":"scroll"===f&&"hidden"===v&&O,"k-toolbar-scrollable-end":"scroll"===f&&"hidden"===v&&z,"k-toolbar-section":e.overflow&&"section"===f},o),style:u,role:void 0!==l?l||void 0:"toolbar",dir:P,ref:x,onKeyDown:!1!==a?e=>{const t=e.keyCode===s.Keys.left||e.keyCode===s.Keys.right||e.keyCode===s.Keys.home||e.keyCode===s.Keys.end,n=H();!t||e.defaultPrevented||-1===N.current.findIndex(t=>t===e.target)||(e.keyCode===s.Keys.left?j(n,0===n?N.current.length-1:n-1):j(n,n===N.current.length-1?0:n+1),e.keyCode===s.Keys.home&&j(n,0),e.keyCode===s.Keys.end&&j(n,N.current.length-1))}:void 0},"scroll"===f&&d.createElement(T,{scrollButtons:v,scrollButtonsPosition:g,prevButton:y,nextButton:k,isOverflowing:B,scrollContentRef:w,buttonScrollSpeed:b,dir:P,isScrollStartPosition:O,isScrollEndPosition:z,children:n}),"section"===f&&d.createElement(A,{toolbarRef:x,fillMode:h,size:m},n),("none"===f||void 0===f)&&n)}),$={tabIndex:0,size:void 0,fillMode:void 0,scrollButtons:"auto",scrollButtonsPosition:"split",buttonScrollSpeed:100};L.displayName="KendoReactToolbar",L.propTypes={tabIndex:n.number,dir:n.string,keyboardNavigation:n.bool,style:n.object,className:n.string,role:n.string,onResize:n.func,buttons:n.arrayOf(n.string.isRequired),size:n.oneOf(["small","medium","large"]),fillMode:n.oneOf(["solid","flat","outline"]),overflow:n.oneOf(["none","section","scroll"]),scrollButtons:n.oneOf(["hidden","visible","auto"]),scrollButtonsPosition:n.oneOf(["start","end","split"]),buttonScrollSpeed:n.number};const W=d.forwardRef((e,t)=>{const{id:n,className:o,style:r,children:i}=e,a=d.useRef(null);return d.useImperativeHandle(t,()=>({element:a.current})),d.createElement("div",{id:n,className:s.classNames("k-toolbar-item",o),style:r,ref:a},i)});W.displayName="KendoReactToolbarItem",W.propTypes={className:n.string};const H=d.forwardRef((e,t)=>{const n=d.useRef(null),o=d.useRef(null);d.useImperativeHandle(o,()=>({element:n.current})),d.useImperativeHandle(t,()=>({element:n.current}));const r=d.useMemo(()=>s.classNames("k-spacer",e.className),[e.className]);return d.createElement("span",{ref:n,className:r})});H.displayName="KendoReactToolbarSpacer",H.propTypes={className:n.string};const U=t.createContext([null,e=>{}]),j=t.createContext([null,e=>{}]),q=t.createContext([null,e=>{}]);var V=(e=>(e.next="next",e.prev="prev",e.current="current",e.reset="reset",e))(V||{});var G=(e=>(e.remove="remove",e.add="add",e.reorder="reorder",e))(G||{});var Z=(e=>(e.toggle="toggle",e.remove="remove",e))(Z||{});const _=d.forwardRef((e,t)=>{const n=d.useRef(null),o=d.useRef(null),{disabled:i=Q.disabled,fillMode:a=Q.fillMode,themeColor:l=Q.themeColor,size:c=Q.size,rounded:u=Q.rounded,dir:p=Q.dir,removeIcon:m=Q.removeIcon,removeSvgIcon:h=Q.removeSvgIcon,removable:f=Q.removable}=e,v=s.useDir(o,p);d.useImperativeHandle(n,()=>({element:o.current,props:e})),d.useImperativeHandle(t,()=>n.current);const[g,b]=d.useContext(U),[y,k]=d.useContext(j),[,C]=d.useContext(q),I=d.useMemo(()=>e.selected||(Array.isArray(g)?g.some(t=>t===e.value):g===e.value),[e.selected,e.value,g]),x=d.useMemo(()=>y===e.value,[e.value,y]);d.useEffect(()=>{x&&o.current&&o.current.focus()},[x]);const w=d.useCallback(t=>{b({type:Z.toggle,payload:e.value,event:t})},[b,e.value]),E=d.useCallback(t=>{f&&(C({type:G.remove,payload:e.value,event:t}),k({type:V.reset,payload:e.value,event:t}),b({type:Z.remove,payload:e.value,event:t}),e.onRemove&&e.onRemove.call(void 0,{target:n.current,syntheticEvent:t}))},[e.onRemove,e.value,f,C,k,b]),D=d.useCallback(t=>{switch(t.keyCode){case s.Keys.left:k({type:V.prev,payload:e.value,event:t});break;case s.Keys.right:k({type:V.next,payload:e.value,event:t});break;case s.Keys.enter:b({type:Z.toggle,payload:e.value,event:t});break;case s.Keys.delete:E(t)}e.onKeyDown&&e.onKeyDown.call(void 0,{target:n.current,syntheticEvent:t})},[e.onKeyDown,e.value,k,b,E]),N=d.useCallback(t=>{k({payload:e.value,type:V.current,event:t}),e.onFocus&&e.onFocus.call(void 0,{target:n.current,syntheticEvent:t})},[e.onFocus,e.value,k]),S=d.useCallback(t=>{e.onBlur&&e.onBlur.call(void 0,{target:n.current,syntheticEvent:t})},[e.onBlur]),B=s.useMouse(e,n,{onClick:w});return d.createElement("div",{...B,role:e.role||"button",id:e.value,style:e.style,ref:o,dir:v,tabIndex:s.getTabIndex(e.tabIndex,i,void 0),className:s.classNames("k-chip",{"k-rtl":"rtl"===v,"k-disabled":i,"k-selected":I,"k-focus":x,[`k-chip-${s.kendoThemeMaps.sizeMap[c]||c}`]:c,[`k-rounded-${s.kendoThemeMaps.roundedMap[u]||u}`]:u,[`k-chip-${a}`]:a,[`k-chip-${a}-${l}`]:!(!a||!l)},e.className),"aria-pressed":e.role?void 0:I,"aria-disabled":i,"aria-describedby":e.ariaDescribedBy,"aria-keyshortcuts":f?"Enter Delete":void 0,onFocus:N,onBlur:S,onKeyDown:D},I&&(e.selectedIcon||e.selectedSvgIcon)&&d.createElement(s.IconWrap,{className:"k-chip-icon",name:e.selectedIcon?s.toIconName(e.selectedIcon):void 0,icon:e.selectedSvgIcon,size:"small"}),(e.icon||e.svgIcon)&&d.createElement(s.IconWrap,{className:"k-chip-icon",name:e.icon?s.toIconName(e.icon):void 0,icon:e.svgIcon,size:"small"}),e.avatar&&d.createElement("div",{className:s.classNames("k-chip-avatar","k-avatar",e.avatar.rounded&&`k-rounded-${e.avatar.rounded}`),style:e.avatar.style},d.createElement("span",{className:"k-avatar-image"},d.createElement("img",{src:e.avatar.image,alt:e.avatar.imageAlt}))),d.createElement("span",{className:"k-chip-content"},void 0!==e.children?e.children:e.text&&d.createElement("span",{"aria-label":e.ariaLabel||e.text,className:"k-chip-label"},e.text)),f&&d.createElement("span",{className:"k-chip-actions"},d.createElement("span",{className:s.classNames("k-chip-action","k-chip-remove-action"),onClick:E},d.createElement(s.IconWrap,{name:m?s.toIconName(m):void 0,icon:h||r.xCircleIcon,size:"small"}))))}),J={id:n.string,text:n.string,value:n.any,dir:n.oneOf(["ltr","rtl"]),removable:n.bool,removeIcon:n.string,removeIconSvg:s.svgIconPropType,disabled:n.bool,icon:n.string,svgIcon:s.svgIconPropType,selectedIcon:n.string,selectedIconSvg:s.svgIconPropType,onRemove:n.func,dataItem:n.any,selected:n.bool,ariaDescribedBy:n.string,size:n.oneOf(["small","medium","large"]),rounded:n.oneOf(["small","medium","large","full","none"]),fillMode:n.oneOf(["outline","solid"]),themeColor:n.oneOf(["base","info","success","warning","error"])},Q={disabled:!1,removable:!1,removeIcon:"k-i-x-circle",removeSvgIcon:r.xCircleIcon,dir:"ltr",size:void 0,rounded:void 0,fillMode:void 0,themeColor:void 0};_.displayName="KendoReactChip",_.propTypes=J;const X=(e,t,n)=>{"multiple"===t.selection?Array.isArray(e)||(e=e?[e]:null):"single"===t.selection&&Array.isArray(e)&&(e=e?e.join(""):null);const[s,o]=d.useState(e);return[s,e=>{const r=((e,t)=>{switch(t.selection){case"single":switch(t.type){case"toggle":if(!Array.isArray(e)||null===e)return t.payload===e?null:t.payload;throw new Error("State cannot be an array in single selection");case"remove":return t.payload===e?null:e;default:return e}case"multiple":switch(t.type){case"toggle":if(Array.isArray(e))return e.some(e=>e===t.payload)?e.filter(e=>e!==t.payload):[...e,t.payload];if(null===e)return[t.payload];throw new Error("State cannot be non-array in multiple selection");case"remove":return Array.isArray(e)?e.some(e=>e===t.payload)?e.filter(e=>e!==t.payload):[...e,t.payload]:e;default:return e}case"none":return null;default:return e}})(t.state||s,{...e,...t});n&&n(r,e.event),"none"!==t.selection&&o(r)}]},Y=d.forwardRef((e,t)=>{const n=d.useRef(null),o=d.useRef(null),{id:r,style:i,tabIndex:a,className:l,ariaDescribedBy:c,ariaLabelledBy:u,ariaLabel:p,value:m,defaultData:h=te.defaultData,chip:f=te.chip,disabled:v=te.disabled,size:g=te.size,defaultValue:b=te.defaultValue,selection:y=te.selection,valueField:k=te.valueField,textField:C=te.textField,dir:I=te.dir,onChange:x,onDataChange:w}=e,E=s.useDir(o,I),D=d.useMemo(()=>f||_,[f,_]);d.useImperativeHandle(n,()=>({element:o.current,props:e})),d.useImperativeHandle(t,()=>n.current);const N=d.useCallback((e,t)=>{x&&n.current&&x.call(void 0,{value:e,target:n.current,syntheticEvent:t})},[x]),[S,B]=X(m||b,{selection:y,state:m},N),K=d.useCallback((e,t)=>{w&&n.current&&w.call(void 0,{value:e,target:n.current,syntheticEvent:t})},[w]),[R,O]=((e,t,n)=>{const[s,o]=d.useState(e);return[s,e=>{const r=((e,t)=>{switch(t.type){case"add":case"reorder":break;case"remove":return e.filter(e=>e[t.valueField]!==t.payload);default:return e}})(t.state||s,{...e,...t});n&&n(r,e.event),o(r)}]})(e.data||h,{state:e.data,valueField:k},K),M=d.useCallback((e,t)=>(e.push(t[k]),e),[k]),z=d.useMemo(()=>e.data||R,[e.data,R]),F=d.useMemo(()=>m||S,[m,S]),P=d.useMemo(()=>z.reduce(M,[]),[z,M]),T=d.useCallback(e=>s.getter(k)(e),[k]),A=d.useCallback(e=>s.getter(C)(e),[C]),[L,$]=(e=>{const[t,n]=d.useState(null);return[t,t=>{const s=((e,t)=>{const n=t.items.findIndex(t=>t===e);switch(t.type){case"next":return n===t.items.length-1?e:t.items[n+1];case"prev":return 0===n?e:t.items[n-1];case"current":return t.payload;case"reset":return null;default:return e}})(t.payload,{...t,...e});n(s)}]})({items:P}),W=s.useMouse(e,n);return d.createElement(U.Provider,{value:[F,B]},d.createElement(j.Provider,{value:[L,$]},d.createElement(q.Provider,{value:[z,O]},d.createElement("div",{ref:o,...W,role:v?void 0:"listbox",id:r,dir:E,style:i,tabIndex:s.getTabIndex(a,v,void 0),className:s.classNames("k-chip-list",{"k-rtl":"rtl"===E,"k-disabled":v,[`k-chip-list-${s.kendoThemeMaps.sizeMap[g]||g}`]:g},l),"aria-label":p,"aria-labelledby":u,"aria-describedby":c,"aria-orientation":"horizontal","aria-multiselectable":"multiple"===y},z.map((e,t)=>d.createElement(D,{role:"option",dataItem:e,size:g,key:[T(e),t].join("-"),text:A(e),value:T(e),ariaLabel:e.ariaLabel,svgIcon:e.svgIcon||void 0}))))))}),ee={id:n.string,className:n.string,tabIndex:n.number,data:n.any,defaultData:n.arrayOf(n.any),onDataChange:n.func,value:n.oneOfType([n.any,n.arrayOf(n.any)]),defaultValue:n.oneOfType([n.any,n.arrayOf(n.any)]),onChange:n.func,selection:n.oneOf(["single","none","multiple"]),textField:n.string,valueField:n.string,disabled:n.bool,dir:n.oneOf(["ltr","rtl"]),ariaLabelledBy:n.string,ariaDescribedBy:n.string,size:n.oneOf(["small","medium","large"])},te={chip:_,size:void 0,disabled:!1,defaultValue:null,defaultData:[],dir:"ltr",selection:"none",textField:"text",valueField:"value"};Y.displayName="KendoReactChipList",Y.propTypes=ee;const ne=d.forwardRef((e,t)=>{const{className:n,disabled:o,text:r,icon:i,style:a,id:l,focused:c,tabIndex:u,index:p,dataItem:m,item:h,svgIcon:f,onDown:v,onClick:g,...b}=e,y=d.useRef(null),k=d.useCallback(()=>{y.current&&y.current.focus()},[]),C=d.useCallback(()=>({element:y.current,focus:k}),[k]);d.useImperativeHandle(t,C);const I=d.useCallback(e=>{g&&void 0!==p&&!o&&g(e,p)},[g,p]),x=d.useMemo(()=>s.classNames("k-fab-item",{"k-focus":c,"k-disabled":o},n),[n,o,c]),w=h;return d.createElement("li",{ref:y,id:l,className:x,style:a,role:"menuitem",tabIndex:s.getTabIndex(u,o),"aria-disabled":o,"aria-label":`${r||""} floatingactionbutton item`,onClick:I,onMouseDown:v,onPointerDown:v,...b},w?d.createElement(w,{itemIndex:p,item:m}):d.createElement(d.Fragment,null,r&&d.createElement("span",{className:"k-fab-item-text"},r),i||f?d.createElement(s.IconWrap,{className:"k-fab-item-icon",name:i,icon:f}):null))});ne.propTypes={className:n.string,style:n.object,children:n.any,disabled:n.bool,focused:n.bool,index:n.number,icon:n.string,svgIcon:s.svgIconPropType,text:n.string,tabIndex:n.number,customProp:n.any},ne.displayName="KendoFloatingActionButtonItem";const se="16px",oe=e=>"number"==typeof e?e+"px":e,re=(e,t)=>{const n={horizontal:t?"right":"left",vertical:"bottom"};return"end"===e.horizontal&&(n.horizontal=t?"left":"right"),n},ie=(e,t)=>{const n={horizontal:t?"right":"left",vertical:"top"};return"end"===e.horizontal&&(n.horizontal=t?"left":"right"),n},ae=(e,t)=>({rtl:{end:"k-text-left",start:"k-text-right"},ltr:{start:"k-text-left",end:"k-text-right"}}[e]["end"===t?"end":"start"]),le=(e,t,n,s)=>{const o=t.horizontal,r=t.vertical;if(e.current){const i=n&&void 0!==n.x?oe(n.x):se,a=n&&void 0!==n.x?`calc(50% + ${oe(n.x)})`:"50%",l=n&&void 0!==n.y?oe(n.y):se,c=n&&void 0!==n.y?`calc(50% + ${oe(n.y)})`:"50%";e.current.style.setProperty(ce(t,s),"center"===o?a:i),e.current.style.setProperty(de(t),"middle"===r?c:l),s&&(("top"===r||"bottom"===r)&&"start"===o&&e.current.style.setProperty("left","unset"),"middle"===r&&"end"===o&&e.current.style.setProperty("right","unset"),"middle"===r&&"start"===o&&e.current.style.setProperty("left","unset"))}},ce=(e,t)=>{const{horizontal:n}=e;return{end:t?"left":"right",center:"left",start:t?"right":"left"}[n||"end"]},de=e=>({top:"top",middle:"top",bottom:"bottom"}[e.vertical||"bottom"]),ue=d.forwardRef((e,t)=>{const{align:n=pe.align,alignOffset:r,className:i,disabled:a,icon:l,svgIcon:c,iconClass:u,id:p,items:m,item:h,text:f,positionMode:v=pe.positionMode,size:g=pe.size,style:b,rounded:y=pe.rounded,themeColor:k=pe.themeColor,overlayStyle:C,tabIndex:I,accessKey:x,popupSettings:w={},modal:E,onClick:D,onItemClick:N,onFocus:S,onBlur:B,onKeyDown:K,onOpen:R,onClose:O,...M}=e,z=s.useZIndexContext(),F=z?z+2:100,P=d.useRef(null),T=d.useRef(null),A=d.useRef(null),L=d.useRef(null),$=d.useCallback(()=>{T.current&&T.current.focus()},[]),W=d.useCallback(()=>({element:T.current,focus:$}),[$]);d.useImperativeHandle(P,W),d.useImperativeHandle(t,()=>P.current);const[H,U]=d.useState(!1),[j,q]=d.useState(!1),[V,G]=d.useState(-1),Z=s.useId()+"-button-id",_=s.useDir(T,e.dir),J="rtl"===_,Q=s.useId()+"-list-id";d.useEffect(()=>{le(T,n,r,J)},[T,n,r,J]),d.useEffect(()=>{j&&T&&T.current&&T.current.focus()},[j,T]);const X=d.useCallback((e,t)=>{m&&s.dispatchEvent(t?R:O,e,W(),void 0)},[R,O,m]),Y=d.useCallback(e=>{!e.target||a||(!m&&D?s.dispatchEvent(D,e,W(),void 0):(U(!H),q(!0),G(H?-1:0),X(e,!H)))},[U,q,G,D,X,H,m,a]),ee=d.useCallback(e=>{q(!0),G(H?0:-1),S&&s.dispatchEvent(S,e,W(),void 0)},[S,q,G]),te=d.useCallback(e=>{q(!1),U(!1),G(-1),s.dispatchEvent(B,e,W(),void 0),H&&X(e,!1)},[B,q,U,G,X]),se=d.useCallback(e=>{e.preventDefault()},[]),oe=d.useCallback((e,t)=>{m&&(m[t].disabled||s.dispatchEvent(N,e,W(),{itemProps:m[t],itemIndex:t}))},[N]),ce=d.useCallback((e,t)=>{!e.target||!m||(G(t),U(!1),oe(e,t),X(e,!1))},[G,U,oe,X]),de=d.useCallback(e=>{s.getActiveElement(document)===T.current&&e.preventDefault()},[T]),ue=d.useCallback(e=>{const t=V,n=m?m.length:-1;if(e.altKey)return!H&&e.keyCode===s.Keys.down&&(e.preventDefault(),U(!0),G(0)),void(H&&e.keyCode===s.Keys.up&&(e.preventDefault(),U(!1),G(-1)));switch(e.keyCode){case s.Keys.enter:case s.Keys.space:t>=0&&oe(e,t),m||Y(e),e.preventDefault(),U(!H),G(H?-1:0);break;case s.Keys.esc:e.preventDefault(),U(!1),G(-1);break;case s.Keys.home:e.preventDefault(),G(0);break;case s.Keys.end:e.preventDefault(),G(n-1);break;case s.Keys.down:case s.Keys.right:e.preventDefault(),G(t+1>=n?0:t+1);break;case s.Keys.up:case s.Keys.left:e.preventDefault(),G(t-1<0?n-1:t-1)}s.dispatchEvent(K,e,W(),void 0)},[K,V,G,J,U]),me=d.useMemo(()=>s.classNames("k-fab",{"k-fab-sm":"small"===g,"k-fab-md":"medium"===g,"k-fab-lg":"large"===g,"k-disabled":a,"k-pos-absolute":"absolute"===v,"k-pos-fixed":"fixed"===v,"k-focus":j,[`k-rounded-${s.kendoThemeMaps.roundedMap[y]||y}`]:y,[`k-fab-${k}`]:k},`k-${n.vertical}-${n.horizontal}`,i),[k,g,y,a,v,n,j,i]),he=m&&m.map((e,t)=>d.createElement(ne,{...e,key:t,index:t,id:`${Q}-${t}`,disabled:a||e.disabled,focused:V===t,dataItem:e,item:h,className:s.classNames(e.className,ae(_||"ltr",n.horizontal)),onClick:ce,onDown:de})),fe=!(!l&&!c||f),ve=(T.current?T.current.offsetWidth:0)/2-16;let ge;return ge=l||c?d.createElement(s.IconWrap,{className:"k-fab-icon",name:l,icon:c}):u?d.createElement("span",{role:"presentation",className:u}):null,d.createElement(s.ZIndexContext.Provider,{value:F},d.createElement(d.Fragment,null,d.createElement("button",{ref:T,id:p||Z,role:"button",type:"button","aria-disabled":a,"aria-expanded":m?H:void 0,"aria-haspopup":!!m,"aria-label":`${f||""} floatingactionbutton`,"aria-owns":m?Q:void 0,"aria-activedescendant":V>=0&&m?`${Q}-${V}`:void 0,tabIndex:s.getTabIndex(I,a),accessKey:x,dir:_,disabled:a,className:me,style:b,onClick:Y,onMouseDown:se,onFocus:ee,onBlur:te,onKeyDown:ue,...M},ge,f&&d.createElement("span",{className:"k-fab-text"},f)),E&&H&&d.createElement("div",{className:"k-overlay",style:{zIndex:F,...C}}),d.createElement(o.Popup,{ref:L,anchor:T.current,show:H,animate:w.animate,popupClass:s.classNames("k-popup-transparent k-fab-popup",w.popupClass),anchorAlign:w.anchorAlign||re(n,J),popupAlign:w.popupAlign||ie(n,J),style:{boxShadow:"none"}},d.createElement("ul",{ref:A,role:"menu","aria-labelledby":p,id:Q,className:s.classNames("k-fab-items",{"k-fab-items-bottom":"bottom"!==n.vertical,"k-fab-items-top":"bottom"===n.vertical}),style:{paddingLeft:fe?ve:void 0,paddingRight:fe?ve:void 0}},he))))});ue.propTypes={className:n.string,style:n.object,id:n.string,dir:n.string,tabIndex:n.number,accessKey:n.string,disabled:n.bool,icon:n.string,svgIcon:s.svgIconPropType,iconClass:n.string,text:n.string,alignOffset:n.shape({x:n.oneOfType([n.number,n.string]).isRequired,y:n.oneOfType([n.number,n.string]).isRequired}),align:n.shape({vertical:n.oneOf(["top","middle","bottom"]).isRequired,horizontal:n.oneOf(["start","center","end"]).isRequired}),positionMode:n.oneOf(["absolute","fixed"]),size:n.oneOf(["small","medium","large"]),rounded:n.oneOf(["small","medium","large","full","none"]),themeColor:n.oneOf(["primary","secondary","tertiary","info","success","warning","error","dark","light","inverse"]),modal:n.bool,overlayStyle:n.object};const pe={align:{vertical:"bottom",horizontal:"end"},size:void 0,rounded:void 0,themeColor:void 0,positionMode:"fixed"};ue.displayName="KendoFloatingActionButton";const me="speechToTextButton.ariaLabel",he="speechToTextButton.title",fe={[me]:"Start speech recognition",[he]:"Speech to Text Button"},ve=t.forwardRef((e,n)=>{const o=!s.validatePackage(k,{component:"SpeechToTextButton"}),l=s.getLicenseMessage(k),c=i.useLocalization(),{fillMode:d,rounded:p,size:m,themeColor:h,ariaLabel:f,svgIcon:v,disabled:g,iconSize:b,title:y,className:C,id:I,style:x,lang:w="en-US",continuous:E=!1,interimResults:D=!1,maxAlternatives:N=1,integrationMode:S="webSpeech",onStart:B,onResult:K,onEnd:R,onError:O,...M}=e,z=t.useRef(null),F=t.useRef(!1),[P,T]=t.useState(!1),A=t.useCallback(async()=>{F.current=!0,T(!0),B&&await B()},[B]),L=t.useCallback(async()=>{F.current=!1,T(!1),R&&await R()},[R]),$=t.useCallback(e=>{const t=e.results,n=t[t.length-1],s=Array.from(n).map(e=>({transcript:e.transcript,confidence:e.confidence}));null==K||K({isFinal:n.isFinal,alternatives:s})},[K]),W=t.useCallback(e=>{T(!1),F.current=!1,null==O||O({errorMessage:e.error})},[O]),H=t.useCallback(()=>{var e;F.current||null==(e=z.current)||e.start()},[]),U=t.useCallback(()=>{var e;F.current&&(null==(e=z.current)||e.stop())},[]),j=t.useCallback(()=>{var e;F.current&&(null==(e=z.current)||e.abort(),F.current=!1,T(!1))},[]),q=()=>F.current;t.useImperativeHandle(n,()=>({start:H,stop:U,abort:j,isActive:q})),t.useEffect(()=>((()=>{var e;"undefined"==typeof window||"webkitSpeechRecognition"in window||"SpeechRecognition"in window?(null!=(e=z.current)&&e.isActive()&&z.current.stop(),z.current=new a.KendoSpeechRecognition({lang:w,continuous:E,interimResults:D,maxAlternatives:N,events:{start:A,end:L,result:$,error:W}})):O&&O({errorMessage:"Speech Recognition API is not supported in this browser."})})(),()=>{F.current&&U()}),[w,E,D,N,S]);const V=void 0!==e.icon||void 0!==e.iconClass,G=t.useMemo(()=>P?r.stopSmIcon:v||r.microphoneOutlineIcon,[P,v]);return t.createElement(t.Fragment,null,t.createElement(u,{id:I,className:s.classNames({"k-speech-to-text-button":!0,"k-listening":P},C),style:x,svgIcon:V?void 0:G,iconSize:b,fillMode:d,rounded:p,size:m,themeColor:h,"aria-label":null!=f?f:c.toLanguageString(me,fe[me]),"aria-pressed":P,disabled:g,title:null!=y?y:c.toLanguageString(he,fe[he]),onClick:()=>{P?U():H()},...M},e.children),o&&t.createElement(s.WatermarkOverlay,{message:l}))});ve.displayName="KendoSpeechToTextButton";const ge=[".k-input",".k-picker",".k-checkbox",".k-radio",".k-switch",".k-rating",".k-slider"],be=d.forwardRef((e,t)=>{const{disabled:n,fillMode:o="solid",rounded:i="medium",size:a="medium",svgIcon:c=r.pasteSparkleIcon,formFields:p,onClick:m,children:h,...f}=e,v=d.useRef(null);d.useImperativeHandle(t,()=>{var e,t,n,s;return{element:null!=(t=null==(e=v.current)?void 0:e.element)?t:null,selected:null!=(s=null==(n=v.current)?void 0:n.selected)&&s,click:()=>{var e,t;return null==(t=null==(e=v.current)?void 0:e.element)?void 0:t.click()}}});const g=d.useRef(null),b=d.useCallback(()=>{var e;return(null==(e=v.current)?void 0:e.element)?(null!=g.current||(g.current=new l.KendoSmartPaste({getElement:()=>{var e,t;return null!=(t=null==(e=v.current)?void 0:e.element)?t:null},customInputs:ge.map(e=>({identifier:e})),getSmartPasteField:e=>{const t=(e=>{const t=e.querySelector("input, select, textarea");return(null==t?void 0:t.getAttribute("name"))||(null==t?void 0:t.getAttribute("id"))||e.getAttribute("id")||null})(e.element);return t?{...e,field:t}:e}})),g.current):null},[]);return d.createElement(u,{ref:v,disabled:n,fillMode:o,rounded:i,size:a,svgIcon:c,onClick:async e=>{if(n)return;const t=await(async()=>{try{return await navigator.clipboard.readText()}catch{return""}})(),o=(()=>{const e=b();if(!e)return p;const t=e.extractFormConfig().reduce((e,t)=>e.some(e=>e.field===t.field)?e:[...e,t],[]);return p?p.map(e=>{const n=t.find(t=>t.field===e.field);return n?{...n,...e,element:n.element}:e}):t})(),r=null==o?void 0:o.map(e=>{var t;const{element:n,...s}=e;return{...s,field:s.field||"",allowedValues:null!=(t=s.allowedValues)?t:[]}}),i=Object.assign(e,{requestData:{content:t,formFields:r},setResponse:e=>{null!=e&&e.fieldValues&&((e,t)=>{var n;if(!e||!t)return;const o=Object.entries(e).reduce((e,[t,n])=>(null!=n&&(e[t]=n),e),{}),r=null==(n=v.current)?void 0:n.element;if(r){const e=s.getKendoPasteEventTarget(r);s.dispatchKendoPasteEvent(e,o)}const i=b();i&&i.populateFormFields({fieldValues:o},t)})(e.fieldValues,o)}});null==m||m(i)},type:"button",...f},h)});be.displayName="KendoReactSmartPasteButton";const ye=s.withIdHOC(S);ye.displayName="KendoReactDropDownButton";const ke=s.withIdHOC(I);ke.displayName="KendoReactSplitButton",e.Button=u,e.ButtonGroup=m,e.Chip=_,e.ChipList=Y,e.DropDownButton=ye,e.DropDownButtonClassComponent=S,e.DropDownButtonItem=w,e.FloatingActionButton=ue,e.FloatingActionButtonItem=ne,e.SmartPasteButton=be,e.SpeechToTextButton=ve,e.SplitButton=ke,e.SplitButtonClassComponent=I,e.SplitButtonItem=v,e.Toolbar=L,e.ToolbarItem=W,e.ToolbarSeparator=R,e.ToolbarSpacer=H,e.toolbarButtons=K});
|
package/index.d.mts
CHANGED
|
@@ -43,6 +43,7 @@ import { SpeechToTextButton } from './SpeechToTextButton/SpeechToTextButton.js';
|
|
|
43
43
|
import { SpeechToTextButtonHandle } from './SpeechToTextButton/interfaces/SpeechToTextButtonHandle.js';
|
|
44
44
|
import { SpeechToTextButtonProps, SpeechToTextResultEvent, SpeechToTextErrorEvent } from './SpeechToTextButton/interfaces/SpeechToTextButtonProps.js';
|
|
45
45
|
export * from './FloatingActionButton/models/events.js';
|
|
46
|
+
export * from './SmartPasteButton/index.js';
|
|
46
47
|
/** @hidden */
|
|
47
48
|
declare const DropDownButton: import('react').ForwardRefExoticComponent<DropDownButtonProps & import('react').RefAttributes<any>>;
|
|
48
49
|
/** @hidden */
|
package/index.d.ts
CHANGED
|
@@ -43,6 +43,7 @@ import { SpeechToTextButton } from './SpeechToTextButton/SpeechToTextButton.js';
|
|
|
43
43
|
import { SpeechToTextButtonHandle } from './SpeechToTextButton/interfaces/SpeechToTextButtonHandle.js';
|
|
44
44
|
import { SpeechToTextButtonProps, SpeechToTextResultEvent, SpeechToTextErrorEvent } from './SpeechToTextButton/interfaces/SpeechToTextButtonProps.js';
|
|
45
45
|
export * from './FloatingActionButton/models/events.js';
|
|
46
|
+
export * from './SmartPasteButton/index.js';
|
|
46
47
|
/** @hidden */
|
|
47
48
|
declare const DropDownButton: import('react').ForwardRefExoticComponent<DropDownButtonProps & import('react').RefAttributes<any>>;
|
|
48
49
|
/** @hidden */
|
package/index.js
CHANGED
|
@@ -6,4 +6,4 @@
|
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
8
|
"use client";
|
|
9
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./Button.js"),i=require("./ButtonGroup.js"),t=require("./ListButton/SplitButton.js"),
|
|
9
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./Button.js"),i=require("./ButtonGroup.js"),t=require("./ListButton/SplitButton.js"),a=require("./ListButton/SplitButtonItem.js"),o=require("./ListButton/DropDownButton.js"),p=require("./ListButton/DropDownButtonItem.js"),B=require("./toolbar/Toolbar.js"),l=require("./toolbar/tools/ToolbarItem.js"),c=require("./toolbar/tools/ToolbarSeparator.js"),s=require("./toolbar/tools/ToolbarSpacer.js"),S=require("./util.js"),m=require("./Chip/Chip.js"),D=require("./Chip/ChipList.js"),T=require("./FloatingActionButton/FloatingActionButton.js"),q=require("./FloatingActionButton/FloatingActionButtonItem.js"),b=require("./SpeechToTextButton/SpeechToTextButton.js"),n=require("@progress/kendo-react-common"),I=require("./SmartPasteButton/SmartPasteButton.js"),e=n.withIdHOC(o.DropDownButton);e.displayName="KendoReactDropDownButton";const r=n.withIdHOC(t.SplitButton);r.displayName="KendoReactSplitButton";exports.Button=u.Button;exports.ButtonGroup=i.ButtonGroup;exports.SplitButtonClassComponent=t.SplitButton;exports.SplitButtonItem=a.SplitButtonItem;exports.DropDownButtonClassComponent=o.DropDownButton;exports.DropDownButtonItem=p.DropDownButtonItem;exports.Toolbar=B.Toolbar;exports.ToolbarItem=l.ToolbarItem;exports.ToolbarSeparator=c.ToolbarSeparator;exports.ToolbarSpacer=s.ToolbarSpacer;exports.toolbarButtons=S.toolbarButtons;exports.Chip=m.Chip;exports.ChipList=D.ChipList;exports.FloatingActionButton=T.FloatingActionButton;exports.FloatingActionButtonItem=q.FloatingActionButtonItem;exports.SpeechToTextButton=b.SpeechToTextButton;exports.SmartPasteButton=I.SmartPasteButton;exports.DropDownButton=e;exports.SplitButton=r;
|
package/index.mjs
CHANGED
|
@@ -23,6 +23,7 @@ import { FloatingActionButton as $ } from "./FloatingActionButton/FloatingAction
|
|
|
23
23
|
import { FloatingActionButtonItem as H } from "./FloatingActionButton/FloatingActionButtonItem.mjs";
|
|
24
24
|
import { SpeechToTextButton as O } from "./SpeechToTextButton/SpeechToTextButton.mjs";
|
|
25
25
|
import { withIdHOC as o } from "@progress/kendo-react-common";
|
|
26
|
+
import { SmartPasteButton as j } from "./SmartPasteButton/SmartPasteButton.mjs";
|
|
26
27
|
const p = o(
|
|
27
28
|
r
|
|
28
29
|
);
|
|
@@ -41,6 +42,7 @@ export {
|
|
|
41
42
|
S as DropDownButtonItem,
|
|
42
43
|
$ as FloatingActionButton,
|
|
43
44
|
H as FloatingActionButtonItem,
|
|
45
|
+
j as SmartPasteButton,
|
|
44
46
|
O as SpeechToTextButton,
|
|
45
47
|
n as SplitButton,
|
|
46
48
|
t as SplitButtonClassComponent,
|
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: 1770377773,version:"13.4.0-develop.5",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"});exports.packageMetadata=e;
|
package/package-metadata.mjs
CHANGED
|
@@ -8,6 +8,6 @@ export const packageMetadata = Object.freeze({
|
|
|
8
8
|
productCode: 'KENDOUIREACT',
|
|
9
9
|
productCodes: ['KENDOUIREACT'],
|
|
10
10
|
publishDate: 0,
|
|
11
|
-
version: '13.4.0-develop.
|
|
11
|
+
version: '13.4.0-develop.5',
|
|
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": "13.4.0-develop.
|
|
3
|
+
"version": "13.4.0-develop.5",
|
|
4
4
|
"description": "All you need in React Button in one package: disabled/enabled states, built-in styles and more. KendoReact Buttons package",
|
|
5
5
|
"author": "Progress",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
@@ -27,9 +27,9 @@
|
|
|
27
27
|
"peerDependencies": {
|
|
28
28
|
"@progress/kendo-licensing": "^1.7.2",
|
|
29
29
|
"@progress/kendo-webspeech-common": "^1.0.1",
|
|
30
|
-
"@progress/kendo-react-common": "13.4.0-develop.
|
|
31
|
-
"@progress/kendo-react-intl": "13.4.0-develop.
|
|
32
|
-
"@progress/kendo-react-popup": "13.4.0-develop.
|
|
30
|
+
"@progress/kendo-react-common": "13.4.0-develop.5",
|
|
31
|
+
"@progress/kendo-react-intl": "13.4.0-develop.5",
|
|
32
|
+
"@progress/kendo-react-popup": "13.4.0-develop.5",
|
|
33
33
|
"@progress/kendo-svg-icons": "^4.0.0",
|
|
34
34
|
"react": "^16.8.2 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc",
|
|
35
35
|
"react-dom": "^16.8.2 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc"
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
"package": {
|
|
65
65
|
"productName": "KendoReact",
|
|
66
66
|
"productCode": "KENDOUIREACT",
|
|
67
|
-
"publishDate":
|
|
67
|
+
"publishDate": 1770377773,
|
|
68
68
|
"licensingDocsUrl": "https://www.telerik.com/kendo-react-ui/components/my-license/"
|
|
69
69
|
}
|
|
70
70
|
},
|