@progress/kendo-vue-buttons 6.5.0-develop.2 → 6.5.0-develop.4

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.
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2025 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 i=require("vue"),x=require("@progress/kendo-webspeech-common"),k=require("../Button.js"),m=require("@progress/kendo-svg-icons");function T(e){return new x.KendoSpeechRecognition(e)}let d=function(e){return e.WebSpeech="WebSpeech",e.None="None",e}({});const E=i.defineComponent({name:"KendoSpeechToTextButton",props:{lang:{type:String,default:"en-US"},continuous:{type:Boolean,default:!1},interimResults:{type:Boolean,default:!1},maxAlternatives:{type:Number,default:1},integrationMode:{type:String,default:d.WebSpeech},onStart:{type:Function},onResult:{type:Function},onEnd:{type:Function},onError:{type:Function},svgIcon:{type:Object,default:m.microphoneOutlineIcon},iconSize:{type:String,default:"medium"},disabled:{type:Boolean,default:void 0},size:{type:String,default:"medium"},rounded:{type:String,default:"medium"},fillMode:{type:String,default:"solid"},themeColor:{type:String,default:"base"},title:{type:String,default:"Speech to Text Button"},ariaLabel:{type:String,default:"Start speech recognition"}},setup(e,{emit:u,expose:f}){const o=i.ref(null),n=i.ref(!1),S=()=>{var t;return(t=o.value)==null?void 0:t.isActive()},a=()=>e.integrationMode!==d.None,s=typeof window!="undefined"&&!("webkitSpeechRecognition"in window||"SpeechRecognition"in window)?(e.onError&&e.onError({errorMessage:"Speech Recognition API is not supported in this browser."}),!1):!0,l=()=>{var t;n.value||(a&&((t=o.value)==null||t.start()),n.value=!0)},r=()=>{var t;n.value&&(a&&((t=o.value)==null||t.stop()),n.value=!1)},g=()=>{var t;n.value&&a&&((t=o.value)==null||t.abort(),n.value=!1)},v=()=>{s&&(n.value?p():c())},c=async()=>{n.value||e.onStart&&(await e.onStart(),l())},R=t=>{const b=t.results,B=b.length-1,w=b[B],M=Array.from(w).map(I=>({transcript:I.transcript,confidence:I.confidence}));u("result",{isFinal:w.isFinal,alternatives:M})},p=async()=>{n.value&&e.onEnd&&(await e.onEnd(),r())},A=t=>{u("error",t)},y=()=>{var t;s&&e.integrationMode===d.WebSpeech&&((t=o.value)!=null&&t.isActive()&&r(),o.value=T({lang:e.lang,continuous:e.continuous,interimResults:e.interimResults,integrationMode:e.integrationMode,maxAlternatives:e.maxAlternatives,events:{start:c,result:R,end:p,error:A}}))};return i.watch(()=>({lang:e.lang,continuous:e.continuous,interimResults:e.interimResults,integrationMode:e.integrationMode,maxAlternatives:e.maxAlternatives}),()=>{y()},{deep:!0}),i.onMounted(()=>{y()}),i.onUnmounted(()=>{var t;(t=o.value)!=null&&t.isInActiveState&&r()}),f({start:l,stop:r,abort:g,isActive:S}),{clickHandler:v,isInActiveState:n}},render(){const{ariaLabel:e,svgIcon:u,fillMode:f,rounded:o,size:n,disabled:S,themeColor:a,iconSize:h,title:s}=this.$props,{className:l,style:r,id:g}=this.$attrs,v=i.computed(()=>["k-speech-to-text-button",l,{"k-listening":this.isInActiveState}]),c=i.computed(()=>this.isInActiveState?m.stopSmIcon:u||m.microphoneOutlineIcon);return i.createVNode(k.Button,{id:g,style:r,class:v.value,onClick:this.clickHandler,svgIcon:c.value,iconSize:h,fillMode:f,rounded:o,size:n,themeColor:a,"aria-label":e,disabled:S,title:s},null)}});exports.SpeechToTextButton=E;exports.SpeechToTextButtonMode=d;
@@ -0,0 +1,204 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2025 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 { defineComponent as k, computed as w, createVNode as E, ref as R, watch as z, onMounted as C, onUnmounted as F } from "vue";
9
+ import { KendoSpeechRecognition as H } from "@progress/kendo-webspeech-common";
10
+ import { Button as N } from "../Button.mjs";
11
+ import { microphoneOutlineIcon as A, stopSmIcon as T } from "@progress/kendo-svg-icons";
12
+ function W(e) {
13
+ return new H(e);
14
+ }
15
+ let m = /* @__PURE__ */ function(e) {
16
+ return e.WebSpeech = "WebSpeech", e.None = "None", e;
17
+ }({});
18
+ const $ = /* @__PURE__ */ k({
19
+ name: "KendoSpeechToTextButton",
20
+ props: {
21
+ lang: {
22
+ type: String,
23
+ default: "en-US"
24
+ },
25
+ continuous: {
26
+ type: Boolean,
27
+ default: !1
28
+ },
29
+ interimResults: {
30
+ type: Boolean,
31
+ default: !1
32
+ },
33
+ maxAlternatives: {
34
+ type: Number,
35
+ default: 1
36
+ },
37
+ integrationMode: {
38
+ type: String,
39
+ default: m.WebSpeech
40
+ },
41
+ onStart: {
42
+ type: Function
43
+ },
44
+ onResult: {
45
+ type: Function
46
+ },
47
+ onEnd: {
48
+ type: Function
49
+ },
50
+ onError: {
51
+ type: Function
52
+ },
53
+ svgIcon: {
54
+ type: Object,
55
+ default: A
56
+ },
57
+ iconSize: {
58
+ type: String,
59
+ default: "medium"
60
+ },
61
+ disabled: {
62
+ type: Boolean,
63
+ default: void 0
64
+ },
65
+ size: {
66
+ type: String,
67
+ default: "medium"
68
+ },
69
+ rounded: {
70
+ type: String,
71
+ default: "medium"
72
+ },
73
+ fillMode: {
74
+ type: String,
75
+ default: "solid"
76
+ },
77
+ themeColor: {
78
+ type: String,
79
+ default: "base"
80
+ },
81
+ title: {
82
+ type: String,
83
+ default: "Speech to Text Button"
84
+ },
85
+ ariaLabel: {
86
+ type: String,
87
+ default: "Start speech recognition"
88
+ }
89
+ },
90
+ setup(e, {
91
+ emit: a,
92
+ expose: c
93
+ }) {
94
+ const i = R(null), n = R(!1), d = () => {
95
+ var t;
96
+ return (t = i.value) == null ? void 0 : t.isActive();
97
+ }, r = () => e.integrationMode !== m.None, l = typeof window != "undefined" && !("webkitSpeechRecognition" in window || "SpeechRecognition" in window) ? (e.onError && e.onError({
98
+ errorMessage: "Speech Recognition API is not supported in this browser."
99
+ }), !1) : !0, s = () => {
100
+ var t;
101
+ n.value || (r && ((t = i.value) == null || t.start()), n.value = !0);
102
+ }, o = () => {
103
+ var t;
104
+ n.value && (r && ((t = i.value) == null || t.stop()), n.value = !1);
105
+ }, f = () => {
106
+ var t;
107
+ n.value && r && ((t = i.value) == null || t.abort(), n.value = !1);
108
+ }, S = () => {
109
+ l && (n.value ? v() : u());
110
+ }, u = async () => {
111
+ n.value || e.onStart && (await e.onStart(), s());
112
+ }, I = (t) => {
113
+ const h = t.results, M = h.length - 1, y = h[M], B = Array.from(y).map((b) => ({
114
+ transcript: b.transcript,
115
+ confidence: b.confidence
116
+ }));
117
+ a("result", {
118
+ isFinal: y.isFinal,
119
+ alternatives: B
120
+ });
121
+ }, v = async () => {
122
+ n.value && e.onEnd && (await e.onEnd(), o());
123
+ }, x = (t) => {
124
+ a("error", t);
125
+ }, p = () => {
126
+ var t;
127
+ l && e.integrationMode === m.WebSpeech && ((t = i.value) != null && t.isActive() && o(), i.value = W({
128
+ lang: e.lang,
129
+ continuous: e.continuous,
130
+ interimResults: e.interimResults,
131
+ integrationMode: e.integrationMode,
132
+ maxAlternatives: e.maxAlternatives,
133
+ events: {
134
+ start: u,
135
+ result: I,
136
+ end: v,
137
+ error: x
138
+ }
139
+ }));
140
+ };
141
+ return z(() => ({
142
+ lang: e.lang,
143
+ continuous: e.continuous,
144
+ interimResults: e.interimResults,
145
+ integrationMode: e.integrationMode,
146
+ maxAlternatives: e.maxAlternatives
147
+ }), () => {
148
+ p();
149
+ }, {
150
+ deep: !0
151
+ }), C(() => {
152
+ p();
153
+ }), F(() => {
154
+ var t;
155
+ (t = i.value) != null && t.isInActiveState && o();
156
+ }), c({
157
+ start: s,
158
+ stop: o,
159
+ abort: f,
160
+ isActive: d
161
+ }), {
162
+ clickHandler: S,
163
+ isInActiveState: n
164
+ };
165
+ },
166
+ render() {
167
+ const {
168
+ ariaLabel: e,
169
+ svgIcon: a,
170
+ fillMode: c,
171
+ rounded: i,
172
+ size: n,
173
+ disabled: d,
174
+ themeColor: r,
175
+ iconSize: g,
176
+ title: l
177
+ } = this.$props, {
178
+ className: s,
179
+ style: o,
180
+ id: f
181
+ } = this.$attrs, S = w(() => ["k-speech-to-text-button", s, {
182
+ "k-listening": this.isInActiveState
183
+ }]), u = w(() => this.isInActiveState ? T : a || A);
184
+ return E(N, {
185
+ id: f,
186
+ style: o,
187
+ class: S.value,
188
+ onClick: this.clickHandler,
189
+ svgIcon: u.value,
190
+ iconSize: g,
191
+ fillMode: c,
192
+ rounded: i,
193
+ size: n,
194
+ themeColor: r,
195
+ "aria-label": e,
196
+ disabled: d,
197
+ title: l
198
+ }, null);
199
+ }
200
+ });
201
+ export {
202
+ $ as SpeechToTextButton,
203
+ m as SpeechToTextButtonMode
204
+ };
@@ -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("vue"),require("@progress/kendo-vue-common"),require("@progress/kendo-svg-icons"),require("@progress/kendo-vue-popup"),require("@progress/kendo-vue-intl")):"function"==typeof define&&define.amd?define(["exports","vue","@progress/kendo-vue-common","@progress/kendo-svg-icons","@progress/kendo-vue-popup","@progress/kendo-vue-intl"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).KendoVueButtons={},e.Vue,e.KendoVueCommon,e.KendoSVGIcons,e.KendoVuePopup,e.KendoVueIntl)}(this,(function(e,t,s,i,o,n){"use strict";const r=["button:not(.k-dropdownlist button):not(.k-colorpicker button):not(.k-split-button .k-split-button-arrow)",".k-button-group > button",".k-dropdownlist",".k-colorpicker"],l={button:"k-button","state-disabled":"k-disabled","group-start":"k-group-start","group-end":"k-group-end","button-group":"k-button-group","button-group-stretched":"k-button-group-stretched"},a={name:"@progress/kendo-vue-buttons",productName:"Kendo UI for Vue",productCode:"KENDOUIVUE",productCodes:["KENDOUIVUE"],publishDate:1657089513,version:"6.5.0-develop.2",licensingDocsUrl:"https://www.telerik.com/kendo-vue-ui/my-license/?utm_medium=product&utm_source=kendovue&utm_campaign=kendo-ui-vue-purchase-license-keys-warning"},d=l,u=t.defineComponent({name:"KendoButton",emits:{click:null,mousedown:null,mouseup:null,pointerdown:null,pointerup:null,focus:null,blur:null,keypress:null,keydown:null,contextmenu:null},props:{ariaLabel:String,ariaPressed:Boolean,title:String,dir:String,selected:{type:Boolean,default:void 0},togglable:{type:Boolean,default:!1},icon:{type:String,default:function(){}},svgIcon:Object,iconSize:{type:String,default:"medium"},iconClass:{type:String,default:function(){}},imageUrl:{type:String,default:function(){}},imageAlt:String,disabled:{type:Boolean,default:void 0},size:{type:String,default:"medium"},shape:{type:String},rounded:{type:String,default:"medium"},fillMode:{type:String,default:"solid"},themeColor:{type:String,default:"base"},tabIndex:Number,accessKey:String,id:String,type:String,role:String},created(){s.validatePackage(a),this.currentActive=!0===this.$props.togglable&&!0===this.$props.selected,this._activeTemp=void 0},data:()=>({currentActive:null}),computed:{computedSelected(){return void 0!==this._activeTemp?this._activeTemp:void 0!==this.$props.selected?this.$props.selected:this.currentActive},buttonClasses(){const{disabled:e,icon:t,iconClass:i,imageUrl:o,dir:n,svgIcon:r,size:l,shape:a,rounded:u,fillMode:c,themeColor:p}=this.$props,h=void 0!==r||void 0!==t||void 0!==i||void 0!==o,m=s.getDefaultSlots(this);return{[d.button]:!0,[`k-button-${s.kendoThemeMaps.sizeMap[l]||l}`]:l,[`k-button-${a}`]:a&&"rectangle"!==a,[`k-rounded-${s.kendoThemeMaps.roundedMap[u]||u}`]:u,"k-icon-button":!m&&h,"k-disabled":e,"k-selected":this.computedSelected,"k-rtl":"rtl"===n,[`k-button-${c}`]:c,[`k-button-${c}-${p}`]:c&&p}}},updated(){this.$props.togglable&&void 0!==this.$props.selected&&this.$props.selected!==this.currentActive&&(this.currentActive=this.$props.selected)},methods:{focus(e){this.$el.focus(e)},toggleIfApplicable(){if(!this.disabled&&this.$props.togglable&&void 0===this.$props.selected){const e=!this.currentActive;this._activeTemp=e,this.currentActive=e,this._activeTemp=void 0}},handleClick(e){this.toggleIfApplicable(),this.disabled||this.$emit("click",e)},handleMouseDown(e){this.disabled||this.$emit("mousedown",e)},handlePointerDown(e){this.disabled||this.$emit("pointerdown",e)},handleMouseUp(e){this.disabled||this.$emit("mouseup",e)},handlePointerUp(e){this.disabled||this.$emit("pointerup",e)},handleFocus(e){this.disabled||this.$emit("focus",e)},handleBlur(e){this.disabled||this.$emit("blur",e)},handleKeypress(e){this.disabled||this.$emit("keypress",e)},handleKeydown(e){this.disabled||this.$emit("keydown",e)},handleContextmenu(e){this.disabled||this.$emit("contextmenu",e)}},render(){const{togglable:e,icon:i,svgIcon:o,iconClass:n,imageUrl:r,imageAlt:l,accessKey:a,tabIndex:d,id:u,type:c,disabled:p,role:h,iconSize:m}=this.$props,f=s.getDefaultSlots(this);return t.createVNode("button",{class:this.buttonClasses,onClick:this.handleClick,onMousedown:this.handleMouseDown,onMouseup:this.handleMouseUp,onPointerdown:this.handlePointerDown,onPointerup:this.handlePointerUp,onFocus:this.handleFocus,onBlur:this.handleBlur,onKeypress:this.handleKeypress,onKeydown:this.handleKeydown,onContextmenu:this.handleContextmenu,title:this.title,"aria-label":this.ariaLabel,"aria-disabled":p||void 0,"aria-pressed":e?!!this.currentActive:void 0,accesskey:a,tabindex:d,id:u,type:c,role:h},[function(){if(r)return t.createVNode("img",{role:"presentation",class:"k-image",alt:l,src:r},null);if(i||o){const e=s.classNames("k-button-icon",n);return t.createVNode(s.Icon,{name:i,icon:o,class:e,size:m},null)}return n?t.createVNode("span",{role:"presentation",class:n},null):null}.call(this),f&&t.createVNode("span",{class:"k-button-text"},[f])])}}),c=t.defineComponent({name:"KendoButtonWrap",render(){return s.getDefaultSlots(this)[0]}}),p=l,h=t.defineComponent({name:"KendoButtonGroup",props:{disabled:{type:Boolean,default:void 0},width:String,dir:{type:String,default:function(){}}},created(){s.validatePackage(a)},render(){const e=s.getDefaultSlots(this),i=function(e,i,o,n){const r=s.classNames({[p["state-disabled"]]:this.$props.disabled,[p["group-start"]]:n?o:0===i,[p["group-end"]]:n?0===i:o});return t.h(c,{class:r,"aria-disabled":this.$props.disabled},(function(){return[e]}))},o=s.classNames([p["button-group"]],{"k-disabled":this.$props.disabled,[p["button-group-stretched"]]:!!this.$props.width});return t.createVNode("div",{style:{width:this.width},dir:this.$props.dir,role:"group","aria-disabled":this.$props.disabled,class:o},[function(e){const t=e.length,s=void 0!==this.$props.dir?"rtl"===this.$props.dir:this.$el&&"rtl"===getComputedStyle(this.$el).direction||!1;return e.map(((e,o)=>this.isValidButton(e)?i.call(this,e,o,o===t-1,s):e))}.call(this,e)])},methods:{isValidButton:e=>e&&e.tag&&-1!==e.tag.toLowerCase().indexOf("button")||e.componentOptions&&e.componentOptions.tag&&-1!==e.componentOptions.tag.toLowerCase().indexOf("button")||e.type&&e.type.name&&-1!==e.type.name.toLowerCase().indexOf("kendobutton")}});let m=function(e){return e.next="next",e.prev="prev",e.current="current",e.reset="reset",e}({});let f=function(e){return e.remove="remove",e.add="add",e.reorder="reorder",e}({});let b=function(e){return e.single="single",e.multiple="multiple",e.none="none",e}({}),g=function(e){return e.toggle="toggle",e.remove="remove",e}({});const v=t.defineComponent({name:"KendoVueChip",props:{id:String,text:String,avatar:{type:[String,Function,Object],default:function(){}},value:[String,Object],dir:{type:String,default:function(){return"ltr"}},removable:{type:Boolean,default:!1},removeIcon:{type:String,default:function(){return"x-circle"}},removeSvgIcon:{type:Object,default:function(){return i.xCircleIcon}},disabled:{type:Boolean,default:!1},icon:String,svgIcon:Object,selectedIcon:{type:String,default:function(){return"check"}},selectedSvgIcon:{type:Object,default:function(){return i.checkIcon}},size:{type:String,default:"medium"},rounded:{type:String,default:"medium"},fillMode:{type:String,default:"solid",validator:function(e){return[null,"flat","outline","solid"].includes(e)}},themeColor:{type:String,default:"base",validator:function(e){return[null,"base","error","info","success","warning"].includes(e)}},dataItem:Object,selected:Boolean,ariaDescribedBy:String,role:{type:String,default:"button"},tabIndex:Number,onMousedown:Function},emits:{click:null,keydown:null,blur:null,focus:null,remove:null},inject:{kendoSelection:{default:{value:null}},kendoFocused:{default:{value:null}},kendoDataItems:{default:null},handleDispatchDataItems:{default:s.noop},handleDispatchSelection:{default:s.noop},handleDispatchFocus:{default:s.noop}},created(){this.currentDir=void 0,s.validatePackage(a)},mounted(){this.chip=s.getRef(this,"chip"),this.currentDir=void 0!==this.$props.dir?"rtl"===this.$props.dir:this.$el&&"rtl"===getComputedStyle(this.$el).direction||!1},updated(){this.kendoFocused.value===this.$props.value&&this.$el&&this.$el.focus()},computed:{currentSelected(){return this.$props.selected||(Array.isArray(this.kendoSelection.value)?this.kendoSelection.value.some((e=>e===this.$props.value)):this.kendoSelection.value===this.$props.value)},chipLabelClass:()=>({"k-chip-label":!0})},methods:{computedFocused(){return this.kendoFocused.value===this.$props.value},handleMouseDown(e){this.$emit("mousedown",e)},handleClick(e){this.handleDispatchSelection&&this.handleDispatchSelection({type:g.toggle,payload:this.$props.value,event:e}),this.$emit("click",{target:this.target,event:e})},handleRemove(e){e.stopPropagation(),this.$props.removable&&(this.handleDispatchFocus&&(this.handleDispatchDataItems({type:f.remove,payload:this.$props.value,event:e}),this.handleDispatchFocus({type:m.reset,payload:this.$props.value,event:e}),this.handleDispatchSelection({type:g.remove,payload:this.$props.value,event:e})),this.$emit("remove",{target:this.target,event:e}))},handleKeyDown(e){switch(e.keyCode){case s.Keys.left:this.handleDispatchFocus&&this.handleDispatchFocus({type:m.prev,payload:this.$props.value,event:e});break;case s.Keys.right:this.handleDispatchFocus&&this.handleDispatchFocus({type:m.next,payload:this.$props.value,event:e});break;case s.Keys.enter:this.handleDispatchFocus&&this.handleDispatchSelection({type:g.toggle,payload:this.$props.value,event:e});break;case s.Keys.delete:this.handleRemove(e)}this.$emit("keydown",{target:this.target,event:e})},handleFocus(e){this.handleDispatchFocus&&this.handleDispatchFocus({payload:this.$props.value,type:m.current,event:e}),this.$emit("focus",{target:this.target,event:e})},handleBlur(e){this.$emit("blur",{target:this.target,event:e})}},setup:()=>({chipRef:t.ref(null)}),render(){const{size:e,rounded:i,themeColor:o,fillMode:n,look:r,avatar:l,icon:a,svgIcon:d,selectedIcon:u,selectedSvgIcon:c,removeIcon:p,removeSvgIcon:h}=this.$props,m=s.templateRendering.call(this,l,s.getListeners.call(this)),f=l?t.createVNode("div",{class:`k-chip-avatar k-avatar k-rounded-${l.rounded||"medium"} k-avatar-${s.kendoThemeMaps.sizeMap[e]||e} k-avatar-solid k-avatar-solid-primary`,style:l.style},[t.createVNode("span",{class:"k-avatar-image"},[t.createVNode("img",{src:l.imageUrl,alt:l.imageAlt},null)])]):null,b=s.getTemplate.call(this,{h:t.h,template:m});return t.createVNode("div",{role:this.$props.role,id:this.$props.value,ref:s.setRef(this,"chip"),dir:this.currentDir,tabindex:s.getTabIndex(this.$props.tabIndex,this.$props.disabled,void 0),class:s.classNames("k-chip",{"k-rtl":"rtl"===this.currentDir,"k-disabled":this.$props.disabled,"k-selected":this.currentSelected,"k-focus":this.computedFocused(),[`k-chip-${s.kendoThemeMaps.sizeMap[e]||e}`]:e,[`k-rounded-${s.kendoThemeMaps.roundedMap[i]||i}`]:i,[`k-chip-${n}`]:n,[`k-chip-${n}-${o}`]:!(!n||!o),"k-chip-outline":"outline"===r||"outlined"===r,"k-chip-solid":"solid"===r||"filled"===r||"solid"===n}),"aria-pressed":"button"===this.$props.role?this.currentSelected:void 0,"aria-selected":"option"===this.$props.role?this.currentSelected:void 0,"aria-disabled":this.$props.disabled,"aria-describedby":this.$props.ariaDescribedBy,onFocus:this.handleFocus,onBlur:this.handleBlur,onClick:this.handleClick,onKeydown:this.handleKeyDown,onMousedown:this.handleMouseDown},[this.currentSelected&&(u||c)&&t.createVNode(s.Icon,{name:s.getIconName(u),icon:c,size:"small"},null),(a||d)&&t.createVNode(s.Icon,{name:s.getIconName(a),icon:d,size:"small"},null),l?l.imageUrl?f:b:null,t.createVNode("span",{class:"k-chip-content"},[this.$props.text&&t.createVNode("span",{"aria-label":this.$props.text,class:this.chipLabelClass},[this.$props.text])]),this.$props.removable&&t.createVNode("span",{class:"k-chip-actions"},[t.createVNode("span",{class:"k-chip-action k-chip-remove-action"},[t.createVNode(s.Icon,{name:s.getIconName(p),icon:h,size:"small",onClick:this.handleRemove},null)])])])}}),$=t.defineComponent({name:"KendoVueChipList",inheritAttrs:!1,props:{id:String,tabIndex:Number,dataItems:Array,defaultDataItems:{type:Array,default:function(){return[]}},value:[Object,Array,String,Number],defaultValue:{type:[Object,Array,String,Number],default:function(){return null}},size:{type:String,default:"medium"},rounded:{type:String,default:"medium"},fillMode:{type:String,default:"solid",validator:function(e){return[null,"flat","outline","solid"].includes(e)}},selection:{type:String,default:function(){return"none"}},textField:{type:String,default:function(){return"text"}},valueField:{type:String,default:function(){return"value"}},avatarField:{type:String,default:function(){return"avatar"}},disabled:{type:Boolean,default:!1},dir:{type:String,default:function(){return"ltr"}},chip:[String,Function,Object],ariaLabelledBy:String,ariaDescribedBy:String},provide(){return{kendoSelection:this.currentValue,kendoFocused:this.currentFocused,kendoDataItems:this.computedDataItems,handleDispatchDataItems:this.handleDispatchDataItems,handleDispatchSelection:this.handleDispatchSelection,handleDispatchFocus:this.handleDispatchFocus}},created(){s.validatePackage(a),this.currentDataItems=this.$props.dataItems||this.$props.defaultDataItems,this.currentValue.value=this.$props.value||this.$props.defaultValue},data:()=>({currentDataItems:[],currentDir:"ltr",isRtl:!1,currentFocused:{value:!1},currentValue:{value:null}}),mounted(){this.chipList=this.chipListRef,this.currentDir=void 0!==this.$props.dir?this.$props.dir:this.$el&&"rtl"===getComputedStyle(this.$el).direction||!1,this.isRtl="rtl"===this.currentDir},computed:{computedDataItems(){return this.$props.dataItems||this.currentDataItems},computedValue(){return this.$props.value||this.currentValue.value},items(){return this.computedDataItems.reduce(this.itemsReducer,[])}},methods:{handleDispatchSelection(e){const t=((e,t)=>{switch(t.selection){case b.single:switch(t.type){case g.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 g.remove:return t.payload===e?null:e;default:return e}case b.multiple:switch(t.type){case g.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 g.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 b.none:return null;default:return e}})(this.computedValue,{...e,selection:this.$props.selection,state:this.computedValue});this.handleChange(t,e.event),this.currentValue.value=t},handleDispatchFocus(e){const t=((e,t)=>{const s=t.items.findIndex((t=>t===e));switch(t.type){case m.next:return s===t.items.length-1?e:t.items[s+1];case m.prev:return 0===s?e:t.items[s-1];case m.current:return t.payload;case m.reset:return null;default:return e}})(e.payload,{...e,items:this.items});this.currentFocused.value=t},handleDispatchDataItems(e){const t=((e,t)=>{switch(t.type){case f.add:break;case f.remove:return e.filter((e=>e[t.valueField]!==t.payload));case f.reorder:break;default:return e}})(this.computedDataItems,{...e,state:this.computedDataItems,valueField:this.$props.valueField});this.handleDataChange(t,e.event),this.currentDataItems=t},handleChange(e,t){this.$el&&this.$emit("change",{value:e,target:this.$el,event:t})},handleDataChange(e,t){this.$el&&this.$emit("datachange",{value:e,target:this.$el,event:t})},itemsReducer(e,t){return e.push(t[this.$props.valueField||this.$props.valueField]),e}},setup:()=>({chipListRef:t.ref(null)}),render(){const{size:e}=this.$props;return t.createVNode("div",{ref:s.setRef(this,"chipList"),role:"listbox",id:this.$props.id,dir:this.currentDir,style:this.$attrs.style,tabindex:s.getTabIndex(this.$props.tabIndex,this.$props.disabled,void 0),class:s.classNames("k-chip-list",{[`k-chip-list-${s.kendoThemeMaps.sizeMap[e]||e}`]:e,"k-rtl":"rtl"===this.currentDir,"k-selection-single":"single"===this.$props.selection,"k-selection-multiple":"multiple"===this.$props.selection,"k-disabled":this.$props.disabled}),"aria-labelledby":this.$props.ariaLabelledBy,"aria-describedby":this.$props.ariaDescribedBy,"aria-orientation":"horizontal","aria-multiselectable":"multiple"===this.$props.selection||void 0},[this.computedDataItems.map((function(e){const i=s.templateRendering.call(this,this.$props.chip,s.getListeners.call(this)),o=t.createVNode(v,{role:"option",dataItem:e,key:e[this.$props.valueField],text:e[this.$props.textField],value:e[this.$props.valueField],avatar:e[this.$props.avatarField],size:this.$props.size,rounded:this.$props.rounded,fillMode:this.$props.fillMode},null);return s.getTemplate.call(this,{h:t.h,template:i,defaultRendering:o,additionalProps:{dataItem:e,key:e[this.$props.valueField],text:e[this.$props.textField],value:e[this.$props.valueField],size:this.$props.size}})}),this)])}}),k=t.defineComponent({name:"KendoVueFloatingActionButtonItem",props:{id:String,disabled:Boolean,focused:Boolean,index:Number,icon:String,item:[String,Function,Object],dataItem:Object,text:String,tabIndex:Number,customProp:[String,Function,Object],class:String},emits:{click:null,down:null},mounted(){this.element=s.getRef(this,"element")},computed:{itemClassNames(){return s.classNames("k-fab-item",{"k-focus":this.focused,"k-disabled":this.disabled})}},methods:{handleClick(e){void 0!==this.$props.index&&!this.$props.disabled&&this.$emit("click",e,this.$props.index)},focusElement(){this.$el&&this.$el.focus()},onMouseDown(e){this.$emit("down",e)}},setup:()=>({elementRef:t.ref(null)}),render(){const{disabled:e,id:i,tabIndex:o,dataItem:n}=this.$props,{text:r,icon:l,svgIcon:a}=n;let d;const u=t.createVNode("li",{ref:s.setRef(this,"element"),id:i,class:this.itemClassNames,role:"menuitem",tabindex:s.getTabIndex(o,e),"aria-disabled":e,"aria-label":`${r||""} floatingactionbutton item`,onClick:this.handleClick,onMousedown:this.onMouseDown,onPointerdown:this.onMouseDown},[r&&t.createVNode("span",{class:"k-fab-item-text"},[r]),(a||l)&&t.createVNode(s.Icon,{name:l,icon:a,class:"k-fab-item-icon"},null)]);return d=s.getTemplate.call(this,{h:t.h,template:this.$props.item,defaultRendering:u,additionalProps:this.$props,additionalListeners:{click:this.handleClick}}),d}}),y="16px",S=e=>"number"==typeof e?e+"px":e,I=(e,t)=>{const s={horizontal:t?"right":"left",vertical:"bottom"};return"end"===e.horizontal&&(s.horizontal=t?"left":"right"),s},x=(e,t)=>{const s={horizontal:t?"right":"left",vertical:"top"};return"end"===e.horizontal&&(s.horizontal=t?"left":"right"),s},C=(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"]),w=(e,t,s,i)=>{const o=t.horizontal,n=t.vertical;if(e){const r=s&&void 0!==s.x?S(s.x):y,l=s&&void 0!==s.x?`calc(50% + ${S(s.x)})`:"50%",a=s&&void 0!==s.y?S(s.y):y,d=s&&void 0!==s.y?`calc(50% + ${S(s.y)})`:"50%";e.style.setProperty(D(t,i),"center"===o?l:r),e.style.setProperty(O(t),"middle"===n?d:a),i&&(("top"===n||"bottom"===n)&&"start"===o&&e.style.setProperty("left","unset"),"middle"===n&&"end"===o&&e.style.setProperty("right","unset"),"middle"===n&&"start"===o&&e.style.setProperty("left","unset"))}},D=(e,t)=>{const{horizontal:s}=e;return{end:t?"left":"right",center:"left",start:t?"right":"left"}[s||"end"]},O=e=>({top:"top",middle:"top",bottom:"bottom"}[e.vertical||"bottom"]),B=t.defineComponent({name:"KendoVueFloatingActionButton",props:{id:String,dir:String,tabIndex:Number,accessKey:String,disabled:{type:Boolean,default:!1},icon:String,svgIcon:Object,iconClass:String,items:[Object,Array],item:[String,Function,Object],text:String,alignOffset:Object,opened:{type:Boolean,default:void 0},align:{type:Object,default:function(){return{vertical:"bottom",horizontal:"end"}}},positionMode:{type:String,default:function(){return"fixed"}},popupSettings:{type:Object,default:function(){return{}}},shape:{type:String,default:function(){return"rectangle"}},rounded:{type:String,default:"full"},fillMode:{type:String,default:"solid",validator:function(e){return[null,"flat","link","outline","solid"].includes(e)}},size:{type:String,default:function(){return"medium"}},themeColor:{type:String,default:function(){return"primary"}}},emits:{click:null,mousedown:null,mouseup:null,open:null,close:null,itemclick:null,focus:null,blur:null,keydown:null},data:()=>({currentOpened:!1,currentFocused:!1,focusedIndex:-1,currentDir:"ltr",isRtl:!1}),created(){s.validatePackage(a),this.element=void 0,this._anchor=s.guid(),this.listId=s.guid(),this.buttonId=s.guid()},mounted(){this.element=this.kendoAnchorRef,this.list=s.getRef(this,"list"),this.popup=s.getRef(this,"popup"),this.currentDir=void 0!==this.$props.dir?this.$props.dir:this.$el&&"rtl"===getComputedStyle(this.$el).direction||!1,this.isRtl="rtl"===this.currentDir,void 0!==this.opened&&w(this.$el,this.$props.align,this.$props.alignOffset,this.isRtl)},updated(){w(this.$el,this.$props.align,this.$props.alignOffset,this.isRtl),this.currentFocused&&this.element&&this.element.focus()},computed:{buttonClassNames(){const{size:e,icon:t,shape:i,themeColor:o,fillMode:n,rounded:r}=this.$props;return{"k-fab":!0,[`k-fab-${i||"rectangle"}`]:null!==i,[`k-fab-${s.kendoThemeMaps.sizeMap[e]||e}`]:e,[`k-rounded-${s.kendoThemeMaps.roundedMap[r]||r}`]:r,[`k-fab-${n}`]:n,[`k-fab-${n}-${o}`]:n&&o,"k-disabled":this.$props.disabled,"k-focus":this.currentFocused,[`k-${this.$props.align.vertical}-${this.$props.align.horizontal}`]:!0}},computedOpened(){return void 0===this.$props.opened?this.currentOpened:this.$props.opened},rootClassNames(){return s.classNames({"k-pos-absolute":"absolute"===this.$props.positionMode,"k-pos-fixed":"fixed"===this.$props.positionMode})}},methods:{dispatchPopupEvent(e,t){this.$props.items&&this.$emit(t?"open":"close",{event:e,isOpened:!t})},handleClick(e){if(e.target&&!this.$props.disabled)if(this.$props.items){const t=!this.computedOpened;this.currentOpened=t,this.currentFocused=!0,this.focusedIndex=t?0:-1,this.dispatchPopupEvent(e,!this.computedOpened)}else this.$emit("click",e,void 0)},handleFocus(e){this.currentFocused=!0,this.focusedIndex=this.computedOpened?0:-1,this.$emit("focus",e,void 0)},handleBlur(e){this.currentFocused=!1,this.currentOpened=!1,this.focusedIndex=-1,this.$emit("blur",e,void 0),this.computedOpened&&this.dispatchPopupEvent(e,!1)},handleMouseDown(e){e.preventDefault(),this.$emit("mousedown",e)},handleMouseUp(e){this.$emit("mouseup",e)},dispatchItemClickEvent(e,t){this.$props.items&&(this.$props.items[t].disabled||this.$emit("itemclick",e,{itemProps:this.$props.items[t],itemIndex:t}))},handleItemClick(e,t){!e.target||!this.$props.items||(this.focusedIndex=t,this.currentOpened=!1,this.dispatchItemClickEvent(e,t),this.dispatchPopupEvent(e,!1))},handleItemDown(e){s.canUseDOM&&document.activeElement===this.element&&e.preventDefault()},handleKeyDown(e){const t=this.focusedIndex,i=this.$props.items?this.$props.items.length-1:-1,o="bottom"===this.$props.align.vertical;switch(e.keyCode){case s.Keys.enter:case s.Keys.space:t>=0&&this.dispatchItemClickEvent(e,t),e.preventDefault(),this.currentOpened=!this.currentOpened,this.focusedIndex=this.currentOpened?-1:0;break;case s.Keys.esc:e.preventDefault(),this.currentOpened=!1,this.focusedIndex=-1;break;case s.Keys.home:e.preventDefault(),this.focusedIndex=0;break;case s.Keys.end:e.preventDefault(),this.focusedIndex=i;break;case s.Keys.down:case s.Keys.right:e.preventDefault(),t<i&&!o&&(this.focusedIndex=t+1),t>0&&o&&(this.focusedIndex=t-1);break;case s.Keys.up:case s.Keys.left:e.preventDefault(),t>0&&!o&&(this.focusedIndex=t-1),t<i&&o&&(this.focusedIndex=t+1)}this.$emit("keydown",e,void 0)}},setup:()=>({chipRef:t.ref(null),kendoAnchorRef:t.ref(null)}),render(){const{align:e,disabled:i,icon:n,svgIcon:r,iconClass:l,id:a,items:d,text:u,tabIndex:c,accessKey:p,popupSettings:h}=this.$props,m=s.templateRendering.call(this,this.$props.item,s.getListeners.call(this)),f=function(){return d&&d.map((function(o,n){return t.createVNode(k,{key:n,index:n,id:`${this.listId}-${n}`,disabled:i||o.disabled,focused:this.focusedIndex===n,dataItem:o,item:m,class:s.classNames(o.className,C(this.currentDir||"ltr",e.horizontal)),onClick:this.handleItemClick,onDown:this.handleItemDown},null)}),this)},b=n&&!u,g=(this.element?this.element.offsetWidth:0)/2-16;return t.createVNode("div",{class:this.rootClassNames},[t.createVNode("button",{ref:e=>{this.kendoAnchorRef=e},id:a||this.buttonId,role:d?"menubutton":"button",type:"button","aria-disabled":i,"aria-expanded":d?this.computedOpened:void 0,"aria-haspopup":!!d,"aria-label":`${u||""} floatingactionbutton`,"aria-owns":d?this.listId:void 0,"aria-activedescendant":this.focusedIndex>=0&&d?`${this.listId}-${this.focusedIndex}`:void 0,tabindex:s.getTabIndex(c,i),accesskey:p,dir:this.currentDir,disabled:i,class:this.buttonClassNames,onClick:this.handleClick,onMousedown:this.handleMouseDown,onMouseup:this.handleMouseUp,onFocusin:this.handleFocus,onBlur:this.handleBlur,onKeydown:this.handleKeyDown},[n||r?t.createVNode(s.Icon,{name:n,icon:r,class:"k-fab-icon"},null):l?t.createVNode(s.Icon,{class:l},null):null,u&&t.createVNode("span",{class:"k-fab-text"},[u])]),t.createVNode(o.Popup,{ref:s.setRef(this,"popup"),show:this.computedOpened,anchor:this._anchor,animate:h.animate,popupClass:s.classNames("k-popup-transparent k-fab-popup",h.popupClass),anchorAlign:h.anchorAlign||I(e,this.isRtl),popupAlign:h.popupAlign||x(e,this.isRtl),style:{boxShadow:"none"}},{default:()=>[t.createVNode("ul",{ref:s.setRef(this,"list"),role:"menu","aria-labelledby":a,id:this.listId,class:s.classNames("k-fab-items",{"k-fab-items-bottom":"bottom"!==e.vertical,"k-fab-items-top":"bottom"===e.vertical}),style:{paddingLeft:b?g+"px":void 0,paddingRight:b?g+"px":void 0}},[f.call(this)])]})])}}),N=t.defineComponent({name:"KendoButtonItem",emits:{click:null,down:null},props:{focused:Boolean,index:Number,item:Object,render:[String,Object,Function],dataItem:[String,Object],id:String,textField:String,role:String},computed:{wrapperClass(){return{"k-item":!0,"k-focus":this.$props.focused}},innerClass(){const{dataItem:e}=this.$props;return{"k-link k-menu-link":!0,"k-selected":e.selected,"k-disabled":e.disabled}}},methods:{onClick(e){this.$emit("click",e,this.$props.index)},onDown(e){this.$emit("down",e,this.$props.index)}},render(){const{dataItem:e,id:i,render:o}=this.$props;return t.createVNode("li",{id:i,class:this.wrapperClass,onClick:this.onClick,onMousedown:this.onDown,onPointerdown:this.onDown,role:"menuitem","aria-disabled":e.disabled||void 0},[function(){const{textField:i,index:n}=this.$props,r=void 0!==e.text?e.text:i?e[i]:e,l=t.createVNode("span",{tabindex:-1,class:this.innerClass,key:"icon"},[e.icon||e.svgIcon?t.createVNode(s.Icon,{name:e.icon,icon:e.svgIcon,class:e.iconClass},null):e.iconClass&&t.createVNode("span",{class:e.iconClass,role:"presentation"},null),e.imageUrl&&t.createVNode("img",{class:"k-icon",alt:"",src:e.imageUrl,role:"presentation",key:"image"},null),r&&t.createVNode("span",{class:"k-menu-link-text"},[r])]);return s.getTemplate.call(this,{h:t.h,template:this.$props.dataItem.render||o,defaultRendering:l,additionalProps:{item:e,itemIndex:n,innerClass:this.innerClass,focused:this.focused}})}.call(this)])}}),F=(e,t,i,o)=>{if(i)return 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 Math.max(0,e-1);case s.Keys.down:case s.Keys.right:return Math.min(o-1,e+1);default:return e}};function R(e){let t={horizontal:"left",vertical:"bottom"};return e&&(t.horizontal="right"),t}function K(e){let t={horizontal:"left",vertical:"top"};return e&&(t.horizontal="right"),t}const V=t.defineComponent({name:"KendoSplitButton",emits:{focus:null,blur:null,buttonclick:null,itemclick:null,open:null,close:null},props:{accessKey:String,ariaLabel:String,text:String,items:{type:Array,default:function(){return[]}},textField:String,tabIndex:Number,disabled:Boolean,icon:String,svgIcon:Object,size:{type:String,default:"medium"},rounded:{type:String,default:"medium"},fillMode:{type:String,default:"solid",validator:function(e){return[null,"flat","link","outline","solid"].includes(e)}},themeColor:{type:String,default:"base",validator:function(e){return[null,"base","dark","error","info","inverse","inverse","light","primary","secondary","success","tertiary","warning"].includes(e)}},opened:{type:Boolean,default:void 0},iconClass:String,imageUrl:String,popupSettings:Object,itemRender:[String,Function,Object],item:[String,Function,Object],className:String,buttonClass:String,dir:String},data:()=>({focused:!1,focusedIndex:-1,currentOpened:!1}),created(){this._blurTimeout=null,this._anchor=s.guid(),this.mainButton=null,this.guid=s.guid(),this.buttonsData=[],s.validatePackage(a)},mounted(){this.mainButton=this.$refs[this._anchor],(void 0===this.$props.dir&&this.isRtl()||this.computedOpened)&&this.$forceUpdate()},updated(){this.focused&&this.element()&&(this.mainButton=this.$refs[this._anchor],this.mainButton.focus())},computed:{computedOpened(){return void 0===this.$props.opened?this.currentOpened:this.$props.opened},wrapperClass(){return{"k-split-button":!0,"k-button-group":!0,"k-focus":this.focused}}},setup:()=>({kendoAnchorRef:t.ref(null)}),render(){this.buttonsData=this.$props.items;const e=this.isRtl(),n=e?"rtl":void 0,{tabIndex:r,disabled:l}=this.$props,a=s.getDefaultSlots(this),d=function(){const{item:e,itemRender:i,textField:o}=this.$props;return this.buttonsData.length>0?this.buttonsData.map((function(n,r){const l="string"!=typeof n?{...n,render:s.templateRendering.call(this,n.render,s.getListeners.call(this))}:n;return t.createVNode(N,{class:"k-menu-item",role:"menuitem",dataItem:l,textField:o,focused:this.focusedIndex===r,onClick:this.onItemClick,onDown:this.onItemDown,render:s.templateRendering.call(this,i,s.getListeners.call(this)),item:e,key:r,index:r,id:`${this.guid}-${r}`},null)}),this):null};return t.createVNode("div",{class:this.wrapperClass,onKeydown:this.onKeyDown,onFocusin:this.onFocus,onFocusout:this.onBlur,dir:n},[t.createVNode(u,{size:this.$props.size,rounded:this.$props.rounded,fillMode:this.$props.fillMode,themeColor:this.$props.themeColor,onClick:e=>this.onItemClick(e,-1),disabled:l||void 0,tabIndex:r,accessKey:this.$props.accessKey,class:this.$props.buttonClass,icon:this.$props.icon,svgIcon:this.$props.svgIcon,iconClass:this.$props.iconClass,imageUrl:this.$props.imageUrl,dir:n,id:this._anchor,ref:this._anchor,type:"button","aria-disabled":l,"aria-haspopup":"menu","aria-expanded":this.computedOpened,"aria-label":this.$props.ariaLabel||`${this.$props.text||""} splitbutton`,"aria-controls":this.guid,"aria-activedescendant":void 0!==this.focusedIndex&&this.focusedIndex>=0?`${this.guid}-${this.focusedIndex}`:void 0},{default:()=>[this.$props.text,a]}),t.createVNode(u,{svgIcon:i.caretAltDownIcon,size:this.$props.size,rounded:this.$props.rounded,fillMode:this.$props.fillMode,themeColor:this.$props.themeColor,icon:"caret-alt-down",disabled:l||void 0,tabIndex:-1,onClick:this.onSplitPartClick,onMousedown:this.onDownSplitPart,onPointerdown:this.onDownSplitPart,dir:n,"aria-label":"menu toggling button"},null),function(){const{popupSettings:i={},size:n}=this.$props;return t.createVNode(o.Popup,{anchor:this._anchor,show:this.computedOpened,animate:i.animate,popupClass:s.classNames("k-menu-popup",i.popupClass),anchorAlign:i.anchorAlign||R(e),popupAlign:i.popupAlign||K(e),style:e?{direction:"rtl"}:void 0},{default:()=>[t.createVNode("ul",{class:`k-group k-menu-group k-reset k-menu-group-${s.kendoThemeMaps.sizeMap[n]||n}`,role:"menu",id:this.guid,"aria-labelledby":this._anchor},[d.call(this)])]})}.call(this)])},methods:{element(){return this.mainButton},onKeyDown(e){if(e.altKey)return void(this.computedOpened||e.keyCode!==s.Keys.down?this.computedOpened&&e.keyCode===s.Keys.up&&(this.dispatchPopupEvent(e,!1),this.focusedIndex=-1,this.currentOpened=!1):(this.dispatchPopupEvent(e,!0),this.focusedIndex=0,this.currentOpened=!0));let t;if(e.keyCode===s.Keys.enter||e.keyCode===s.Keys.space?(e.preventDefault(),this.dispatchClickEvent(e,this.focusedIndex),void 0!==this.focusedIndex&&this.focusedIndex>=0&&(t={focusedIndex:this.computedOpened?-1:0,currentOpened:!this.computedOpened},this.dispatchPopupEvent(e,t.currentOpened))):this.computedOpened&&e.keyCode===s.Keys.esc&&(t={focusedIndex:-1,currentOpened:!1},this.dispatchPopupEvent(e,t.currentOpened)),this.computedOpened){const i=F(this.focusedIndex,e.keyCode,e.altKey,this.buttonsData.length);i!==this.focusedIndex&&(t=t||{},t.focusedIndex=i);const o=e.keyCode===s.Keys.up||e.keyCode===s.Keys.down||e.keyCode===s.Keys.left||e.keyCode===s.Keys.right;!e.altKey&&o&&e.preventDefault()}t&&(this.focusedIndex=t.focusedIndex,this.focused=t.focused,void 0!==t.currentOpened&&(this.currentOpened=t.currentOpened))},onFocus(e){this.focused||(this.$emit("focus",e,this,void 0),this.focused=!0),this.focusedIndex=-1,clearTimeout(this._blurTimeout)},onItemClick(e,t){const s=this.computedOpened;s&&(this.focusedIndex=0,this.currentOpened=!1),this.dispatchClickEvent(e,t),s&&this.dispatchPopupEvent(e,!1)},onBlur(e){clearTimeout(this._blurTimeout),this.createBlurTimeout(e)},createBlurTimeout(e){const t=this;this._blurTimeout=setTimeout((()=>{s.canUseDOM&&document.activeElement!==t.mainButton&&(t.focused=!1,t.focusedIndex=-1,t.$emit("blur",e,this,void 0),t.computedOpened&&(t.currentOpened=!1,t.dispatchPopupEvent(e,!1)))}),200)},dispatchClickEvent(e,t){this.isItemDisabled(t)||(-1===t?this.$emit("buttonclick",e,this,void 0):this.$emit("itemclick",{event:e,component:this,item:this.buttonsData[t],itemIndex:t}))},onSplitPartClick(e){if(this.buttonsData.length){const t=!this.computedOpened;this.dispatchPopupEvent(e,t),this.focusedIndex=t?0:-1,this.currentOpened=t,this.focused=!0}},onDownSplitPart(e){e.preventDefault(),this.element()&&document.activeElement!==this.element()&&this.element().focus()},onItemDown(e){document.activeElement===this.element()&&e.preventDefault()},dispatchPopupEvent(e,t){this.$emit(t?"open":"close",e,this,void 0)},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.$el&&"rtl"===getComputedStyle(this.$el).direction}}}),T=t.defineComponent({name:"KendoDropDownButton",emits:{focus:null,blur:null,itemclick:null,open:null,close:null},props:{accessKey:String,items:{type:Array,default:function(){return[]}},ariaLabel:String,text:String,textField:String,tabIndex:Number,disabled:Boolean,icon:String,svgIcon:Object,iconClass:String,imageUrl:String,popupSettings:Object,itemRender:[String,Object,Function],item:Function,size:{type:String,default:"medium"},shape:{type:String,default:"rectangle",validator:function(e){return[null,"rectangle","square"].includes(e)}},rounded:{type:String,default:"medium"},fillMode:{type:String,default:"solid",validator:function(e){return[null,"flat","link","outline","solid"].includes(e)}},themeColor:{type:String,default:"base",validator:function(e){return[null,"base","dark","error","info","inverse","inverse","light","primary","secondary","success","tertiary","warning"].includes(e)}},opened:{type:Boolean,default:void 0},buttonClass:String,dir:String},created(){this._blurTimeout=null,this._anchor=s.guid(),this.wrapper=null,this.mainButton=null,this.guid=s.guid(),this.buttonsData=[],s.validatePackage(a)},mounted(){this.mainButton=this.$refs[this._anchor],(void 0===this.$props.dir&&this.isRtl()||this.computedOpened)&&this.$forceUpdate()},updated(){this.focused&&this.element()&&(this.mainButton=this.$refs[this._anchor],this.mainButton.focus())},data:()=>({currentOpened:!1,focused:!1,focusedIndex:-1}),computed:{computedOpened(){return void 0===this.$props.opened?this.currentOpened:this.$props.opened},wrapperClass(){return{"k-dropdown-button":!0,"k-focus":this.focused}}},setup:()=>({kendoAnchorRef:t.ref(null)}),render(){const e=this.isRtl(),i=e?"rtl":void 0,{tabIndex:n,disabled:r}=this.$props,l=s.getDefaultSlots(this);this.buttonsData=this.$props.items;const a=function(){const{item:e,itemRender:i,textField:o}=this.$props;return this.buttonsData.length>0?this.buttonsData.map((function(n,r){const l="string"!=typeof n?{...n,render:s.templateRendering.call(this,n.render,s.getListeners.call(this))}:n;return t.createVNode(N,{class:"k-menu-item",dataItem:l,textField:o,focused:this.focusedIndex===r,onClick:this.onItemClick,onDown:this.onItemDown,render:s.templateRendering.call(this,i,s.getListeners.call(this)),item:e,index:r,key:r,id:`${this.guid}-${r}`},null)}),this):null};return t.createVNode("div",{class:this.wrapperClass,onKeydown:this.onKeyDown,onFocusin:this.onFocus,onFocusout:this.onBlur,dir:i},[t.createVNode(u,{size:this.$props.size,shape:this.$props.shape,rounded:this.$props.rounded,fillMode:this.$props.fillMode,themeColor:this.$props.themeColor,onClick:this.onClickMainButton,onMousedown:this.mouseDown,disabled:r||void 0,tabIndex:n,accessKey:this.$props.accessKey,icon:this.$props.icon,svgIcon:this.$props.svgIcon,iconClass:this.$props.iconClass,class:this.$props.buttonClass,imageUrl:this.$props.imageUrl,dir:i,ref:this._anchor,type:"button","aria-disabled":r,"aria-haspopup":"menu","aria-expanded":this.computedOpened,"aria-label":this.$props.ariaLabel||`${this.$props.text||""} dropdownbutton`,"aria-controls":this.guid,"aria-activedescendant":void 0!==this.focusedIndex&&this.focusedIndex>=0?`${this.guid}-${this.focusedIndex}`:void 0},{default:()=>[this.$props.text,l]}),function(){const{popupSettings:i={},size:n}=this.$props;return t.createVNode(o.Popup,{anchor:this._anchor,show:this.computedOpened,animate:i.animate,popupClass:s.classNames("k-menu-popup",i.popupClass),anchorAlign:i.anchorAlign||R(e),popupAlign:i.popupAlign||K(e),style:e?{direction:"rtl"}:void 0},{default:()=>[t.createVNode("ul",{class:`k-group k-menu-group k-reset k-menu-group-${s.kendoThemeMaps.sizeMap[n]||n}`,role:"menu",id:this.guid},[a.call(this)])]})}.call(this)])},methods:{element(){return this.mainButton},onKeyDown(e){if(e.altKey)this.computedOpened||e.keyCode!==s.Keys.down?this.computedOpened&&e.keyCode===s.Keys.up&&(this.dispatchPopupEvent(e,!1),this.focusedIndex=-1,this.currentOpened=!1):(this.dispatchPopupEvent(e,!0),this.focusedIndex=0,this.currentOpened=!0);else if(e.keyCode===s.Keys.enter||e.keyCode===s.Keys.space?(void 0!==this.focusedIndex&&this.focusedIndex>=0&&this.dispatchClickEvent(e,this.focusedIndex),e.preventDefault(),this.focusedIndex=this.computedOpened?-1:0,this.currentOpened=!this.computedOpened,this.dispatchPopupEvent(e,this.currentOpened)):this.computedOpened&&e.keyCode===s.Keys.esc&&(this.focusedIndex=-1,this.currentOpened=!1,this.dispatchPopupEvent(e,this.currentOpened)),this.computedOpened){const t=F(this.focusedIndex,e.keyCode,e.altKey,this.buttonsData.length);this.focusedIndex=t;const i=e.keyCode===s.Keys.up||e.keyCode===s.Keys.down||e.keyCode===s.Keys.left||e.keyCode===s.Keys.right;!e.altKey&&i&&e.preventDefault()}},onFocus(e){this.focused||(this.focused=!0,this.$emit("focus",e,this,void 0)),this.focusedIndex=this.computedOpened?0:-1,clearTimeout(this._blurTimeout)},onBlur(e){clearTimeout(this._blurTimeout),this.createBlurTimeout(e)},createBlurTimeout(e){const t=this;this._blurTimeout=setTimeout((()=>{s.canUseDOM&&document.activeElement!==t.$el&&(t.focused=!1,t.focusedIndex=-1,t.$emit("blur",e,t,void 0),t.computedOpened&&(t.currentOpened=!1,t.dispatchPopupEvent(e,!1)))}),200)},onItemClick(e,t){this.focusedIndex=-1,this.currentOpened=!1,this.dispatchClickEvent(e,t),this.dispatchPopupEvent(e,!1)},onItemDown(e){document.activeElement===this.element()&&e.preventDefault()},mouseDown(e){e.preventDefault()},dispatchClickEvent(e,t){this.isItemDisabled(t)||this.$emit("itemclick",{event:e,item:this.buttonsData[t],itemIndex:t})},onClickMainButton(e){if(!this.buttonsData.length)return;const t=!this.computedOpened;this.currentOpened=t,this.focused=!0,this.focusedIndex=t?0:-1,this.dispatchPopupEvent(e,t)},dispatchPopupEvent(e,t){this.$emit(t?"open":"close",e,this,void 0)},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.$el&&"rtl"===getComputedStyle(this.$el).direction}}}),M=t.defineComponent({name:"KendoToolbarItem",render:()=>t.createVNode("div",{class:"k-toolbar-separator k-separator"},null)}),P="prevArrow.title",z="nextArrow.title",A="moreButtonTitle.title",E={[P]:"Previous scroll button",[z]:"Next scroll button",[A]:"More button"},L=t.defineComponent({name:"KendoToolbarScrollButton",props:{buttonScrollSpeed:Number,disabled:Boolean,scrollContentRef:Object,type:String,prevButton:Object,nextButton:Object,dir:String},inject:{kendoLocalizationService:{default:null}},emits:["contentscroll"],methods:{getScrollButtonTitle(){const{dir:e,type:t}=this.$props;return"rtl"!==e?"prev"===t?n.provideLocalizationService(this).toLanguageString(P,E[P]):n.provideLocalizationService(this).toLanguageString(z,E[z]):"prev"===t?n.provideLocalizationService(this).toLanguageString(z,E[z]):n.provideLocalizationService(this).toLanguageString(P,E[P])}},render(){const{disabled:e,type:o,scrollContentRef:n,buttonScrollSpeed:r,prevButton:l,nextButton:a}=this.$props;return t.createVNode("span",{class:s.classNames("k-button","k-button-md","k-button-solid","k-button-solid-base","k-rounded-md","k-icon-button",`k-toolbar-${o}`,{"k-disabled":e}),title:this.getScrollButtonTitle(),"aria-hidden":!0,tabindex:e?-1:void 0,onClick:()=>{n&&r&&(n.scrollBy({left:"next"===o?r:-r,behavior:"smooth"}),this.$emit("contentscroll",o))}},[t.createVNode(s.SvgIcon,{icon:"prev"===o?i.caretAltLeftIcon:i.caretAltRightIcon,class:"k-button-icon"},null)])}}),j=t.defineComponent({name:"ToolbarScrollable",props:{scrollButtons:String,scrollButtonsPosition:String,isOverflowing:Boolean,buttonScrollSpeed:Number,dir:String,isScrollStartPosition:Boolean,isScrollEndPosition:Boolean,prevButton:Object,nextButton:Object,toolbarItems:Object},emits:["contentscroll"],data:()=>({scrollContentRef:null}),mounted(){this.scrollContentRef=this.$refs.scrollContentRef},methods:{onContentScroll(e){this.$emit("contentscroll",e)}},render(){const{scrollButtons:e,buttonScrollSpeed:s,prevButton:i,nextButton:o,scrollButtonsPosition:n,dir:r,isScrollStartPosition:l,isScrollEndPosition:a,toolbarItems:d}=this.$props,u=(e,n)=>t.createVNode(L,{type:e,dir:r,disabled:n,scrollContentRef:this.scrollContentRef,buttonScrollSpeed:s,prevButton:i,nextButton:o,onContentscroll:this.onContentScroll},null),c="visible"===e||"auto"===e&&this.$props.isOverflowing;return t.createVNode(t.Fragment,null,[c&&"split"===n&&t.createVNode(t.Fragment,null,[u("rtl"!==r?"prev":"next",l),t.createVNode(M,{class:"k-toolbar-button-separator"},null)]),c&&"start"===n&&t.createVNode(t.Fragment,null,[u("rtl"!==r?"prev":"next",l),u("rtl"!==r?"next":"prev",a),t.createVNode(M,{class:"k-toolbar-button-separator"},null)]),t.createVNode("span",{class:"k-toolbar-items k-toolbar-items-scroll",ref:"scrollContentRef"},[d]),c&&"split"===n&&t.createVNode(t.Fragment,null,[t.createVNode(M,{class:"k-toolbar-button-separator"},null),u("rtl"!==r?"next":"prev",a)]),c&&"end"===n&&t.createVNode(t.Fragment,null,[t.createVNode(M,{class:"k-toolbar-button-separator"},null),u("rtl"!==r?"prev":"next",l),u("rtl"!==r?"next":"prev",a)])])}}),U=t.defineComponent({name:"ToolbarOverflowSection",props:{toolbarRef:Object,toolbarWidth:Number,fillMode:String,size:String,visibleTools:Array,overFlowTools:Array,opened:Boolean,allTools:Array},emits:["toggleoverflow"],inject:{kendoLocalizationService:{default:null}},methods:{handleClick(){this.$emit("toggleoverflow",!this.$props.opened)}},render(){const{visibleTools:e,overFlowTools:r,allTools:l}=this.$props,{toolbarRef:a,toolbarWidth:d,fillMode:c,size:p}=this.$props;return t.createVNode(t.Fragment,null,[e&&[...l].splice(0,e.length),r.length>0&&t.createVNode(t.Fragment,null,[t.createVNode(M,{class:"k-toolbar-button-separator"},null),t.createVNode(u,{ref:"buttonRef",class:"k-toolbar-overflow-button",fillMode:"flat",svgIcon:i.moreHorizontalIcon,title:n.provideLocalizationService(this).toLanguageString(A,E[A]),onClick:this.handleClick},null),t.createVNode(o.Popup,{anchor:a,show:this.$props.opened,popupClass:"k-toolbar-popup",key:d,style:{width:d+"px"}},{default:()=>[t.createVNode("span",{class:`k-toolbar-items-list k-toolbar-items-list-${s.kendoThemeMaps.sizeMap[p]} k-toolbar-items-list-${c}`},[e&&[...l].splice(e.length,l.length)])]})])])}}),W=t.defineComponent({name:"KendoToolbar",props:{tabIndex:{type:Number,default:0},dir:{type:String,validator:function(e){return[null,"ltr","rtl"].includes(e)},default:"ltr"},keyboardNavigation:{type:Boolean,default:!0},buttons:{type:Array,default:function(){}},size:{type:String,default:"medium",validator:function(e){return[null,"small","medium","large"].includes(e)}},fillMode:{type:String,default:"solid",validator:function(e){return[null,"solid","flat","outline"].includes(e)}},ariaLabel:String,overflow:{type:String,default:"section",validator:function(e){return[null,"none","section","scroll"].includes(e)}},scrollButtons:{type:String,default:"auto",validator:function(e){return[null,"hidden","visible","auto"].includes(e)}},scrollButtonsPosition:{type:String,default:"split",validator:function(e){return[null,"start","end","split"].includes(e)}},buttonScrollSpeed:{type:Number,default:100}},data:()=>({defaultSlot:null,offsetWidth:0,offsetHeight:0,currentButtons:[],focusedSelector:"",isScrollStartPosition:!0,isScrollEndPosition:!1,focusableButtons:[],isOverflowing:!1,scrollContentRef:null,lastToolbarWidthRef:0,overFlowToolsRef:[],overFlowOpened:!1,visibleToolsRef:void 0}),created(){this.focusedSelector=this.selectors.map((e=>e+":focus")).join(","),s.validatePackage(a)},computed:{selectors(){return this.$props.buttons||r},wrapperClass(){const{size:e,fillMode:t,overflow:i,scrollButtons:o}=this.$props;return{"k-toolbar":!0,[`k-toolbar-${t}`]:t,[`k-toolbar-${s.kendoThemeMaps.sizeMap[e]||e}`]:e,"k-toolbar-scrollable":"scroll"===i,"k-toolbar-scrollable-overlay":"scroll"===i&&("hidden"===o||void 0===o),"k-toolbar-scrollable-start":"scroll"===i&&"hidden"===o&&this.isScrollStartPosition,"k-toolbar-scrollable-end":"scroll"===i&&"hidden"===o&&this.isScrollEndPosition,"k-toolbar-section":i&&"section"===i}}},mounted(){s.canUseDOM&&window.ResizeObserver&&(this.observerResize=new window.ResizeObserver(this.onWindowResize),this.observerResize.observe(this.$el));const e=this.$el;e&&(this.offsetWidth=e.offsetWidth,this.offsetHeight=e.offsetHeight,!1!==this.$props.keyboardNavigation&&(this.currentButtons=this.getCurrentButtons(),this.setTabIndex(0))),this.scrollContentRef=this.$refs.toolbarScrollable&&this.$refs.toolbarScrollable.scrollContentRef,this.defaultSlot&&(this.visibleToolsRef=this.defaultSlot.filter((e=>e&&e.type)).map(((e,s)=>t.cloneVNode(e,{key:e.key||s}))),this.$nextTick((()=>{this.checkOverflow(),this.initOverflow(this.$refs.toolbar)})))},updated(){!this.$el||!1===this.$props.keyboardNavigation||(this.currentButtons=this.getCurrentButtons(),this.setTabIndex(this.focusedIndex()))},unmounted(){s.canUseDOM&&this.observerResize&&this.observerResize.disconnect(),this.currentButtons.length=0},render(){const{overflow:e,scrollButtons:i,scrollButtonsPosition:o,prevButton:n,nextButton:r,buttonScrollSpeed:l,dir:a,fillMode:d,size:u}=this.$props;return this.defaultSlot=s.getDefaultSlots(this),t.createVNode("div",{ref:"toolbar",class:this.wrapperClass,role:"toolbar",dir:a,"aria-label":this.$props.ariaLabel,onKeydown:this.onKeyDown},["scroll"===e&&t.createVNode(t.Fragment,null,[t.createVNode(j,{ref:"toolbarScrollable",scrollButtons:i,scrollButtonsPosition:o,prevButton:n,nextButton:r,isOverflowing:this.isOverflowing,buttonScrollSpeed:l,dir:a,isScrollStartPosition:this.isScrollStartPosition,isScrollEndPosition:this.isScrollEndPosition,toolbarItems:this.defaultSlot,onContentscroll:this.onContentScroll},null)]),"section"===e&&t.createVNode(U,{opened:this.overFlowOpened,toolbarRef:this.$refs.toolbar,toolbarWidth:this.offsetWidth,fillMode:d,size:u,visibleTools:this.visibleToolsRef,overFlowTools:this.overFlowToolsRef,onToggleoverflow:this.onToggleoverflow,allTools:this.defaultSlot},null),"none"===e&&this.defaultSlot])},methods:{getCurrentButtons(){return this.$el&&this.$el.querySelectorAll?Array.from(this.$el.querySelectorAll(this.selectors.join(","))):[]},getInternalButtons(){return this.$el&&this.$el.querySelectorAll?Array.from(this.$el.querySelectorAll(".k-dropdownlist > .k-button,.k-colorpicker > .k-button")):[]},focusedIndex(){const e=this.$el&&this.$el.querySelector&&this.$el.querySelector(this.focusedSelector);return Math.max(0,this.currentButtons.findIndex((t=>t===e)))},setTabIndex(e){const{tabIndex:t}=this.$props;this.currentButtons.forEach(((s,i)=>{s.tabIndex=i===e?t:-1})),this.getInternalButtons().forEach((e=>{e.tabIndex=-1}))},onKeyDown(e){if(!1===this.$props.keyboardNavigation)return;const t=e.target;if(e.keyCode!==s.Keys.left&&e.keyCode!==s.Keys.right||e.defaultPrevented||-1===this.currentButtons.findIndex((e=>e===t)))return;const i=this.focusedIndex();e.keyCode===s.Keys.left?this.focusButton(i,i-1):this.focusButton(i,i+1)},focusButton(e,t){const{tabIndex:s}=this.$props,i=this.currentButtons[t];if(i){i.tabIndex=s,i.focus();const t=this.currentButtons[e];t&&(t.tabIndex=-1)}},initOverflow(e,t){let s=200;const i=[],o=[];Array.from(e.children).forEach(((e,t)=>{s+=Math.ceil(e.clientWidth),s<=this.$refs.toolbar.offsetWidth-50?i.push(this.visibleToolsRef[t]):o.push(this.visibleToolsRef[t])})),this.visibleToolsRef=i,this.overFlowToolsRef=o},checkOverflow(){if("scroll"===this.$props.overflow){const e=this.scrollContentRef;e&&(this.isOverflowing=e.scrollWidth>e.clientWidth||e.scrollHeight>e.clientHeight,this.isOverflowing?this.onContentScroll():(this.isScrollStartPosition=!0,this.isScrollEndPosition=!0))}else if("section"===this.$props.overflow||void 0===this.$props.overflow){const e=this.$refs.toolbar;let t=0;if(e){const s=e.offsetWidth,i=parseInt(window.getComputedStyle(e).gap||"0",10),o=Array.from(e.children).reduce(((e,t)=>e+=Math.ceil(t.clientWidth)),0),n=Array.from(e.children).length,r=2*i;if(t=36+Number(o)+n*i+r,t>s){const e=[...this.visibleToolsRef],t=e.pop();this.visibleToolsRef=e,t&&(this.overFlowToolsRef=[t,...this.overFlowToolsRef]),this.lastToolbarWidthRef=s}else if(s>this.lastToolbarWidthRef+i*n/2.75){const e=[...this.overFlowToolsRef],t=e.shift();t&&this.lastToolbarWidthRef+i*n>30&&(this.overFlowToolsRef=e,this.visibleToolsRef=[...this.visibleToolsRef,t]),this.lastToolbarWidthRef=s}else this.$forceUpdate()}}},onWindowResize(e){window.requestAnimationFrame((()=>{const t=this.$el;if(this.overFlowOpened=!1,!t)return;const s=t.offsetWidth,i=t.offsetHeight;if(this.offsetWidth!==s||this.offsetHeight!==i){this.offsetWidth=s,this.offsetHeight=i;const t={offsetWidth:this.offsetWidth,offsetHeight:this.offsetHeight};this.$emit("resize",{target:this,...t,nativeEvent:e})}this.checkOverflow()}))},onContentScroll(e){const t=this.scrollContentRef;if(e&&t){let s,i;s="next"!==e&&(t.scrollLeft<=this.$props.buttonScrollSpeed||0===t.scrollLeft),i="prev"!==e&&(t.scrollLeft+t.clientWidth+this.$props.buttonScrollSpeed>=t.scrollWidth||t.scrollLeft+t.clientWidth===t.scrollWidth),this.isScrollStartPosition=!!s,this.isScrollEndPosition=!!i}else this.isScrollStartPosition=!0,this.isScrollEndPosition=!1},onToggleoverflow(e){this.overFlowOpened=e}}}),_=t.defineComponent({name:"KendoToolbarItem",methods:{element(){return this.$el}},render(){const e=s.getDefaultSlots(this);return t.createVNode("div",{class:"k-toolbar-item"},[e])}}),q=t.defineComponent({name:"KendoToolbarItem",render:()=>t.createVNode("span",{class:"k-spacer"},null)});e.Button=u,e.ButtonGroup=h,e.ButtonItem=N,e.Chip=v,e.ChipList=$,e.DropDownButton=T,e.FloatingActionButton=B,e.FloatingActionButtonItem=k,e.SplitButton=V,e.Toolbar=W,e.ToolbarItem=_,e.ToolbarSeparator=M,e.ToolbarSpacer=q}));
15
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("vue"),require("@progress/kendo-vue-common"),require("@progress/kendo-svg-icons"),require("@progress/kendo-vue-popup"),require("@progress/kendo-vue-intl"),require("@progress/kendo-webspeech-common")):"function"==typeof define&&define.amd?define(["exports","vue","@progress/kendo-vue-common","@progress/kendo-svg-icons","@progress/kendo-vue-popup","@progress/kendo-vue-intl","@progress/kendo-webspeech-common"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).KendoVueButtons={},e.Vue,e.KendoVueCommon,e.KendoSVGIcons,e.KendoVuePopup,e.KendoVueIntl,e.KendoWebspeechCommon)}(this,(function(e,t,o,i,s,n,r){"use strict";const l=["button:not(.k-dropdownlist button):not(.k-colorpicker button):not(.k-split-button .k-split-button-arrow)",".k-button-group > button",".k-dropdownlist",".k-colorpicker"],a={button:"k-button","state-disabled":"k-disabled","group-start":"k-group-start","group-end":"k-group-end","button-group":"k-button-group","button-group-stretched":"k-button-group-stretched"},d={name:"@progress/kendo-vue-buttons",productName:"Kendo UI for Vue",productCode:"KENDOUIVUE",productCodes:["KENDOUIVUE"],publishDate:1657089513,version:"6.5.0-develop.4",licensingDocsUrl:"https://www.telerik.com/kendo-vue-ui/my-license/?utm_medium=product&utm_source=kendovue&utm_campaign=kendo-ui-vue-purchase-license-keys-warning"},u=a,c=t.defineComponent({name:"KendoButton",emits:{click:null,mousedown:null,mouseup:null,pointerdown:null,pointerup:null,focus:null,blur:null,keypress:null,keydown:null,contextmenu:null},props:{ariaLabel:String,ariaPressed:Boolean,title:String,dir:String,selected:{type:Boolean,default:void 0},togglable:{type:Boolean,default:!1},icon:{type:String,default:function(){}},svgIcon:Object,iconSize:{type:String,default:"medium"},iconClass:{type:String,default:function(){}},imageUrl:{type:String,default:function(){}},imageAlt:String,disabled:{type:Boolean,default:void 0},size:{type:String,default:"medium"},shape:{type:String},rounded:{type:String,default:"medium"},fillMode:{type:String,default:"solid"},themeColor:{type:String,default:"base"},tabIndex:Number,accessKey:String,id:String,type:String,role:String},created(){o.validatePackage(d),this.currentActive=!0===this.$props.togglable&&!0===this.$props.selected,this._activeTemp=void 0},data:()=>({currentActive:null}),computed:{computedSelected(){return void 0!==this._activeTemp?this._activeTemp:void 0!==this.$props.selected?this.$props.selected:this.currentActive},buttonClasses(){const{disabled:e,icon:t,iconClass:i,imageUrl:s,dir:n,svgIcon:r,size:l,shape:a,rounded:d,fillMode:c,themeColor:p}=this.$props,h=void 0!==r||void 0!==t||void 0!==i||void 0!==s,m=o.getDefaultSlots(this);return{[u.button]:!0,[`k-button-${o.kendoThemeMaps.sizeMap[l]||l}`]:l,[`k-button-${a}`]:a&&"rectangle"!==a,[`k-rounded-${o.kendoThemeMaps.roundedMap[d]||d}`]:d,"k-icon-button":!m&&h,"k-disabled":e,"k-selected":this.computedSelected,"k-rtl":"rtl"===n,[`k-button-${c}`]:c,[`k-button-${c}-${p}`]:c&&p}}},updated(){this.$props.togglable&&void 0!==this.$props.selected&&this.$props.selected!==this.currentActive&&(this.currentActive=this.$props.selected)},methods:{focus(e){this.$el.focus(e)},toggleIfApplicable(){if(!this.disabled&&this.$props.togglable&&void 0===this.$props.selected){const e=!this.currentActive;this._activeTemp=e,this.currentActive=e,this._activeTemp=void 0}},handleClick(e){this.toggleIfApplicable(),this.disabled||this.$emit("click",e)},handleMouseDown(e){this.disabled||this.$emit("mousedown",e)},handlePointerDown(e){this.disabled||this.$emit("pointerdown",e)},handleMouseUp(e){this.disabled||this.$emit("mouseup",e)},handlePointerUp(e){this.disabled||this.$emit("pointerup",e)},handleFocus(e){this.disabled||this.$emit("focus",e)},handleBlur(e){this.disabled||this.$emit("blur",e)},handleKeypress(e){this.disabled||this.$emit("keypress",e)},handleKeydown(e){this.disabled||this.$emit("keydown",e)},handleContextmenu(e){this.disabled||this.$emit("contextmenu",e)}},render(){const{togglable:e,icon:i,svgIcon:s,iconClass:n,imageUrl:r,imageAlt:l,accessKey:a,tabIndex:d,id:u,type:c,disabled:p,role:h,iconSize:m}=this.$props,f=o.getDefaultSlots(this);return t.createVNode("button",{class:this.buttonClasses,onClick:this.handleClick,onMousedown:this.handleMouseDown,onMouseup:this.handleMouseUp,onPointerdown:this.handlePointerDown,onPointerup:this.handlePointerUp,onFocus:this.handleFocus,onBlur:this.handleBlur,onKeypress:this.handleKeypress,onKeydown:this.handleKeydown,onContextmenu:this.handleContextmenu,title:this.title,"aria-label":this.ariaLabel,"aria-disabled":p||void 0,"aria-pressed":e?!!this.currentActive:void 0,accesskey:a,tabindex:d,id:u,type:c,role:h},[function(){if(r)return t.createVNode("img",{role:"presentation",class:"k-image",alt:l,src:r},null);if(i||s){const e=o.classNames("k-button-icon",n);return t.createVNode(o.Icon,{name:i,icon:s,class:e,size:m},null)}return n?t.createVNode("span",{role:"presentation",class:n},null):null}.call(this),f&&t.createVNode("span",{class:"k-button-text"},[f])])}}),p=t.defineComponent({name:"KendoButtonWrap",render(){return o.getDefaultSlots(this)[0]}}),h=a,m=t.defineComponent({name:"KendoButtonGroup",props:{disabled:{type:Boolean,default:void 0},width:String,dir:{type:String,default:function(){}}},created(){o.validatePackage(d)},render(){const e=o.getDefaultSlots(this),i=function(e,i,s,n){const r=o.classNames({[h["state-disabled"]]:this.$props.disabled,[h["group-start"]]:n?s:0===i,[h["group-end"]]:n?0===i:s});return t.h(p,{class:r,"aria-disabled":this.$props.disabled},(function(){return[e]}))},s=o.classNames([h["button-group"]],{"k-disabled":this.$props.disabled,[h["button-group-stretched"]]:!!this.$props.width});return t.createVNode("div",{style:{width:this.width},dir:this.$props.dir,role:"group","aria-disabled":this.$props.disabled,class:s},[function(e){const t=e.length,o=void 0!==this.$props.dir?"rtl"===this.$props.dir:this.$el&&"rtl"===getComputedStyle(this.$el).direction||!1;return e.map(((e,s)=>this.isValidButton(e)?i.call(this,e,s,s===t-1,o):e))}.call(this,e)])},methods:{isValidButton:e=>e&&e.tag&&-1!==e.tag.toLowerCase().indexOf("button")||e.componentOptions&&e.componentOptions.tag&&-1!==e.componentOptions.tag.toLowerCase().indexOf("button")||e.type&&e.type.name&&-1!==e.type.name.toLowerCase().indexOf("kendobutton")}});let f=function(e){return e.next="next",e.prev="prev",e.current="current",e.reset="reset",e}({});let g=function(e){return e.remove="remove",e.add="add",e.reorder="reorder",e}({});let b=function(e){return e.single="single",e.multiple="multiple",e.none="none",e}({}),v=function(e){return e.toggle="toggle",e.remove="remove",e}({});const y=t.defineComponent({name:"KendoVueChip",props:{id:String,text:String,avatar:{type:[String,Function,Object],default:function(){}},value:[String,Object],dir:{type:String,default:function(){return"ltr"}},removable:{type:Boolean,default:!1},removeIcon:{type:String,default:function(){return"x-circle"}},removeSvgIcon:{type:Object,default:function(){return i.xCircleIcon}},disabled:{type:Boolean,default:!1},icon:String,svgIcon:Object,selectedIcon:{type:String,default:function(){return"check"}},selectedSvgIcon:{type:Object,default:function(){return i.checkIcon}},size:{type:String,default:"medium"},rounded:{type:String,default:"medium"},fillMode:{type:String,default:"solid",validator:function(e){return[null,"flat","outline","solid"].includes(e)}},themeColor:{type:String,default:"base",validator:function(e){return[null,"base","error","info","success","warning"].includes(e)}},dataItem:Object,selected:Boolean,ariaDescribedBy:String,role:{type:String,default:"button"},tabIndex:Number,onMousedown:Function},emits:{click:null,keydown:null,blur:null,focus:null,remove:null},inject:{kendoSelection:{default:{value:null}},kendoFocused:{default:{value:null}},kendoDataItems:{default:null},handleDispatchDataItems:{default:o.noop},handleDispatchSelection:{default:o.noop},handleDispatchFocus:{default:o.noop}},created(){this.currentDir=void 0,o.validatePackage(d)},mounted(){this.chip=o.getRef(this,"chip"),this.currentDir=void 0!==this.$props.dir?"rtl"===this.$props.dir:this.$el&&"rtl"===getComputedStyle(this.$el).direction||!1},updated(){this.kendoFocused.value===this.$props.value&&this.$el&&this.$el.focus()},computed:{currentSelected(){return this.$props.selected||(Array.isArray(this.kendoSelection.value)?this.kendoSelection.value.some((e=>e===this.$props.value)):this.kendoSelection.value===this.$props.value)},chipLabelClass:()=>({"k-chip-label":!0})},methods:{computedFocused(){return this.kendoFocused.value===this.$props.value},handleMouseDown(e){this.$emit("mousedown",e)},handleClick(e){this.handleDispatchSelection&&this.handleDispatchSelection({type:v.toggle,payload:this.$props.value,event:e}),this.$emit("click",{target:this.target,event:e})},handleRemove(e){e.stopPropagation(),this.$props.removable&&(this.handleDispatchFocus&&(this.handleDispatchDataItems({type:g.remove,payload:this.$props.value,event:e}),this.handleDispatchFocus({type:f.reset,payload:this.$props.value,event:e}),this.handleDispatchSelection({type:v.remove,payload:this.$props.value,event:e})),this.$emit("remove",{target:this.target,event:e}))},handleKeyDown(e){switch(e.keyCode){case o.Keys.left:this.handleDispatchFocus&&this.handleDispatchFocus({type:f.prev,payload:this.$props.value,event:e});break;case o.Keys.right:this.handleDispatchFocus&&this.handleDispatchFocus({type:f.next,payload:this.$props.value,event:e});break;case o.Keys.enter:this.handleDispatchFocus&&this.handleDispatchSelection({type:v.toggle,payload:this.$props.value,event:e});break;case o.Keys.delete:this.handleRemove(e)}this.$emit("keydown",{target:this.target,event:e})},handleFocus(e){this.handleDispatchFocus&&this.handleDispatchFocus({payload:this.$props.value,type:f.current,event:e}),this.$emit("focus",{target:this.target,event:e})},handleBlur(e){this.$emit("blur",{target:this.target,event:e})}},setup:()=>({chipRef:t.ref(null)}),render(){const{size:e,rounded:i,themeColor:s,fillMode:n,look:r,avatar:l,icon:a,svgIcon:d,selectedIcon:u,selectedSvgIcon:c,removeIcon:p,removeSvgIcon:h}=this.$props,m=o.templateRendering.call(this,l,o.getListeners.call(this)),f=l?t.createVNode("div",{class:`k-chip-avatar k-avatar k-rounded-${l.rounded||"medium"} k-avatar-${o.kendoThemeMaps.sizeMap[e]||e} k-avatar-solid k-avatar-solid-primary`,style:l.style},[t.createVNode("span",{class:"k-avatar-image"},[t.createVNode("img",{src:l.imageUrl,alt:l.imageAlt},null)])]):null,g=o.getTemplate.call(this,{h:t.h,template:m});return t.createVNode("div",{role:this.$props.role,id:this.$props.value,ref:o.setRef(this,"chip"),dir:this.currentDir,tabindex:o.getTabIndex(this.$props.tabIndex,this.$props.disabled,void 0),class:o.classNames("k-chip",{"k-rtl":"rtl"===this.currentDir,"k-disabled":this.$props.disabled,"k-selected":this.currentSelected,"k-focus":this.computedFocused(),[`k-chip-${o.kendoThemeMaps.sizeMap[e]||e}`]:e,[`k-rounded-${o.kendoThemeMaps.roundedMap[i]||i}`]:i,[`k-chip-${n}`]:n,[`k-chip-${n}-${s}`]:!(!n||!s),"k-chip-outline":"outline"===r||"outlined"===r,"k-chip-solid":"solid"===r||"filled"===r||"solid"===n}),"aria-pressed":"button"===this.$props.role?this.currentSelected:void 0,"aria-selected":"option"===this.$props.role?this.currentSelected:void 0,"aria-disabled":this.$props.disabled,"aria-describedby":this.$props.ariaDescribedBy,onFocus:this.handleFocus,onBlur:this.handleBlur,onClick:this.handleClick,onKeydown:this.handleKeyDown,onMousedown:this.handleMouseDown},[this.currentSelected&&(u||c)&&t.createVNode(o.Icon,{name:o.getIconName(u),icon:c,size:"small"},null),(a||d)&&t.createVNode(o.Icon,{name:o.getIconName(a),icon:d,size:"small"},null),l?l.imageUrl?f:g:null,t.createVNode("span",{class:"k-chip-content"},[this.$props.text&&t.createVNode("span",{"aria-label":this.$props.text,class:this.chipLabelClass},[this.$props.text])]),this.$props.removable&&t.createVNode("span",{class:"k-chip-actions"},[t.createVNode("span",{class:"k-chip-action k-chip-remove-action"},[t.createVNode(o.Icon,{name:o.getIconName(p),icon:h,size:"small",onClick:this.handleRemove},null)])])])}}),k=t.defineComponent({name:"KendoVueChipList",inheritAttrs:!1,props:{id:String,tabIndex:Number,dataItems:Array,defaultDataItems:{type:Array,default:function(){return[]}},value:[Object,Array,String,Number],defaultValue:{type:[Object,Array,String,Number],default:function(){return null}},size:{type:String,default:"medium"},rounded:{type:String,default:"medium"},fillMode:{type:String,default:"solid",validator:function(e){return[null,"flat","outline","solid"].includes(e)}},selection:{type:String,default:function(){return"none"}},textField:{type:String,default:function(){return"text"}},valueField:{type:String,default:function(){return"value"}},avatarField:{type:String,default:function(){return"avatar"}},disabled:{type:Boolean,default:!1},dir:{type:String,default:function(){return"ltr"}},chip:[String,Function,Object],ariaLabelledBy:String,ariaDescribedBy:String},provide(){return{kendoSelection:this.currentValue,kendoFocused:this.currentFocused,kendoDataItems:this.computedDataItems,handleDispatchDataItems:this.handleDispatchDataItems,handleDispatchSelection:this.handleDispatchSelection,handleDispatchFocus:this.handleDispatchFocus}},created(){o.validatePackage(d),this.currentDataItems=this.$props.dataItems||this.$props.defaultDataItems,this.currentValue.value=this.$props.value||this.$props.defaultValue},data:()=>({currentDataItems:[],currentDir:"ltr",isRtl:!1,currentFocused:{value:!1},currentValue:{value:null}}),mounted(){this.chipList=this.chipListRef,this.currentDir=void 0!==this.$props.dir?this.$props.dir:this.$el&&"rtl"===getComputedStyle(this.$el).direction||!1,this.isRtl="rtl"===this.currentDir},computed:{computedDataItems(){return this.$props.dataItems||this.currentDataItems},computedValue(){return this.$props.value||this.currentValue.value},items(){return this.computedDataItems.reduce(this.itemsReducer,[])}},methods:{handleDispatchSelection(e){const t=((e,t)=>{switch(t.selection){case b.single:switch(t.type){case v.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 v.remove:return t.payload===e?null:e;default:return e}case b.multiple:switch(t.type){case v.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 v.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 b.none:return null;default:return e}})(this.computedValue,{...e,selection:this.$props.selection,state:this.computedValue});this.handleChange(t,e.event),this.currentValue.value=t},handleDispatchFocus(e){const t=((e,t)=>{const o=t.items.findIndex((t=>t===e));switch(t.type){case f.next:return o===t.items.length-1?e:t.items[o+1];case f.prev:return 0===o?e:t.items[o-1];case f.current:return t.payload;case f.reset:return null;default:return e}})(e.payload,{...e,items:this.items});this.currentFocused.value=t},handleDispatchDataItems(e){const t=((e,t)=>{switch(t.type){case g.add:break;case g.remove:return e.filter((e=>e[t.valueField]!==t.payload));case g.reorder:break;default:return e}})(this.computedDataItems,{...e,state:this.computedDataItems,valueField:this.$props.valueField});this.handleDataChange(t,e.event),this.currentDataItems=t},handleChange(e,t){this.$el&&this.$emit("change",{value:e,target:this.$el,event:t})},handleDataChange(e,t){this.$el&&this.$emit("datachange",{value:e,target:this.$el,event:t})},itemsReducer(e,t){return e.push(t[this.$props.valueField||this.$props.valueField]),e}},setup:()=>({chipListRef:t.ref(null)}),render(){const{size:e}=this.$props;return t.createVNode("div",{ref:o.setRef(this,"chipList"),role:"listbox",id:this.$props.id,dir:this.currentDir,style:this.$attrs.style,tabindex:o.getTabIndex(this.$props.tabIndex,this.$props.disabled,void 0),class:o.classNames("k-chip-list",{[`k-chip-list-${o.kendoThemeMaps.sizeMap[e]||e}`]:e,"k-rtl":"rtl"===this.currentDir,"k-selection-single":"single"===this.$props.selection,"k-selection-multiple":"multiple"===this.$props.selection,"k-disabled":this.$props.disabled}),"aria-labelledby":this.$props.ariaLabelledBy,"aria-describedby":this.$props.ariaDescribedBy,"aria-orientation":"horizontal","aria-multiselectable":"multiple"===this.$props.selection||void 0},[this.computedDataItems.map((function(e){const i=o.templateRendering.call(this,this.$props.chip,o.getListeners.call(this)),s=t.createVNode(y,{role:"option",dataItem:e,key:e[this.$props.valueField],text:e[this.$props.textField],value:e[this.$props.valueField],avatar:e[this.$props.avatarField],size:this.$props.size,rounded:this.$props.rounded,fillMode:this.$props.fillMode},null);return o.getTemplate.call(this,{h:t.h,template:i,defaultRendering:s,additionalProps:{dataItem:e,key:e[this.$props.valueField],text:e[this.$props.textField],value:e[this.$props.valueField],size:this.$props.size}})}),this)])}}),$=t.defineComponent({name:"KendoVueFloatingActionButtonItem",props:{id:String,disabled:Boolean,focused:Boolean,index:Number,icon:String,item:[String,Function,Object],dataItem:Object,text:String,tabIndex:Number,customProp:[String,Function,Object],class:String},emits:{click:null,down:null},mounted(){this.element=o.getRef(this,"element")},computed:{itemClassNames(){return o.classNames("k-fab-item",{"k-focus":this.focused,"k-disabled":this.disabled})}},methods:{handleClick(e){void 0!==this.$props.index&&!this.$props.disabled&&this.$emit("click",e,this.$props.index)},focusElement(){this.$el&&this.$el.focus()},onMouseDown(e){this.$emit("down",e)}},setup:()=>({elementRef:t.ref(null)}),render(){const{disabled:e,id:i,tabIndex:s,dataItem:n}=this.$props,{text:r,icon:l,svgIcon:a}=n;let d;const u=t.createVNode("li",{ref:o.setRef(this,"element"),id:i,class:this.itemClassNames,role:"menuitem",tabindex:o.getTabIndex(s,e),"aria-disabled":e,"aria-label":`${r||""} floatingactionbutton item`,onClick:this.handleClick,onMousedown:this.onMouseDown,onPointerdown:this.onMouseDown},[r&&t.createVNode("span",{class:"k-fab-item-text"},[r]),(a||l)&&t.createVNode(o.Icon,{name:l,icon:a,class:"k-fab-item-icon"},null)]);return d=o.getTemplate.call(this,{h:t.h,template:this.$props.item,defaultRendering:u,additionalProps:this.$props,additionalListeners:{click:this.handleClick}}),d}}),S="16px",I=e=>"number"==typeof e?e+"px":e,x=(e,t)=>{const o={horizontal:t?"right":"left",vertical:"bottom"};return"end"===e.horizontal&&(o.horizontal=t?"left":"right"),o},C=(e,t)=>{const o={horizontal:t?"right":"left",vertical:"top"};return"end"===e.horizontal&&(o.horizontal=t?"left":"right"),o},w=(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"]),D=(e,t,o,i)=>{const s=t.horizontal,n=t.vertical;if(e){const r=o&&void 0!==o.x?I(o.x):S,l=o&&void 0!==o.x?`calc(50% + ${I(o.x)})`:"50%",a=o&&void 0!==o.y?I(o.y):S,d=o&&void 0!==o.y?`calc(50% + ${I(o.y)})`:"50%";e.style.setProperty(O(t,i),"center"===s?l:r),e.style.setProperty(B(t),"middle"===n?d:a),i&&(("top"===n||"bottom"===n)&&"start"===s&&e.style.setProperty("left","unset"),"middle"===n&&"end"===s&&e.style.setProperty("right","unset"),"middle"===n&&"start"===s&&e.style.setProperty("left","unset"))}},O=(e,t)=>{const{horizontal:o}=e;return{end:t?"left":"right",center:"left",start:t?"right":"left"}[o||"end"]},B=e=>({top:"top",middle:"top",bottom:"bottom"}[e.vertical||"bottom"]),N=t.defineComponent({name:"KendoVueFloatingActionButton",props:{id:String,dir:String,tabIndex:Number,accessKey:String,disabled:{type:Boolean,default:!1},icon:String,svgIcon:Object,iconClass:String,items:[Object,Array],item:[String,Function,Object],text:String,alignOffset:Object,opened:{type:Boolean,default:void 0},align:{type:Object,default:function(){return{vertical:"bottom",horizontal:"end"}}},positionMode:{type:String,default:function(){return"fixed"}},popupSettings:{type:Object,default:function(){return{}}},shape:{type:String,default:function(){return"rectangle"}},rounded:{type:String,default:"full"},fillMode:{type:String,default:"solid",validator:function(e){return[null,"flat","link","outline","solid"].includes(e)}},size:{type:String,default:function(){return"medium"}},themeColor:{type:String,default:function(){return"primary"}}},emits:{click:null,mousedown:null,mouseup:null,open:null,close:null,itemclick:null,focus:null,blur:null,keydown:null},data:()=>({currentOpened:!1,currentFocused:!1,focusedIndex:-1,currentDir:"ltr",isRtl:!1}),created(){o.validatePackage(d),this.element=void 0,this._anchor=o.guid(),this.listId=o.guid(),this.buttonId=o.guid()},mounted(){this.element=this.kendoAnchorRef,this.list=o.getRef(this,"list"),this.popup=o.getRef(this,"popup"),this.currentDir=void 0!==this.$props.dir?this.$props.dir:this.$el&&"rtl"===getComputedStyle(this.$el).direction||!1,this.isRtl="rtl"===this.currentDir,void 0!==this.opened&&D(this.$el,this.$props.align,this.$props.alignOffset,this.isRtl)},updated(){D(this.$el,this.$props.align,this.$props.alignOffset,this.isRtl),this.currentFocused&&this.element&&this.element.focus()},computed:{buttonClassNames(){const{size:e,icon:t,shape:i,themeColor:s,fillMode:n,rounded:r}=this.$props;return{"k-fab":!0,[`k-fab-${i||"rectangle"}`]:null!==i,[`k-fab-${o.kendoThemeMaps.sizeMap[e]||e}`]:e,[`k-rounded-${o.kendoThemeMaps.roundedMap[r]||r}`]:r,[`k-fab-${n}`]:n,[`k-fab-${n}-${s}`]:n&&s,"k-disabled":this.$props.disabled,"k-focus":this.currentFocused,[`k-${this.$props.align.vertical}-${this.$props.align.horizontal}`]:!0}},computedOpened(){return void 0===this.$props.opened?this.currentOpened:this.$props.opened},rootClassNames(){return o.classNames({"k-pos-absolute":"absolute"===this.$props.positionMode,"k-pos-fixed":"fixed"===this.$props.positionMode})}},methods:{dispatchPopupEvent(e,t){this.$props.items&&this.$emit(t?"open":"close",{event:e,isOpened:!t})},handleClick(e){if(e.target&&!this.$props.disabled)if(this.$props.items){const t=!this.computedOpened;this.currentOpened=t,this.currentFocused=!0,this.focusedIndex=t?0:-1,this.dispatchPopupEvent(e,!this.computedOpened)}else this.$emit("click",e,void 0)},handleFocus(e){this.currentFocused=!0,this.focusedIndex=this.computedOpened?0:-1,this.$emit("focus",e,void 0)},handleBlur(e){this.currentFocused=!1,this.currentOpened=!1,this.focusedIndex=-1,this.$emit("blur",e,void 0),this.computedOpened&&this.dispatchPopupEvent(e,!1)},handleMouseDown(e){e.preventDefault(),this.$emit("mousedown",e)},handleMouseUp(e){this.$emit("mouseup",e)},dispatchItemClickEvent(e,t){this.$props.items&&(this.$props.items[t].disabled||this.$emit("itemclick",e,{itemProps:this.$props.items[t],itemIndex:t}))},handleItemClick(e,t){!e.target||!this.$props.items||(this.focusedIndex=t,this.currentOpened=!1,this.dispatchItemClickEvent(e,t),this.dispatchPopupEvent(e,!1))},handleItemDown(e){o.canUseDOM&&document.activeElement===this.element&&e.preventDefault()},handleKeyDown(e){const t=this.focusedIndex,i=this.$props.items?this.$props.items.length-1:-1,s="bottom"===this.$props.align.vertical;switch(e.keyCode){case o.Keys.enter:case o.Keys.space:t>=0&&this.dispatchItemClickEvent(e,t),e.preventDefault(),this.currentOpened=!this.currentOpened,this.focusedIndex=this.currentOpened?-1:0;break;case o.Keys.esc:e.preventDefault(),this.currentOpened=!1,this.focusedIndex=-1;break;case o.Keys.home:e.preventDefault(),this.focusedIndex=0;break;case o.Keys.end:e.preventDefault(),this.focusedIndex=i;break;case o.Keys.down:case o.Keys.right:e.preventDefault(),t<i&&!s&&(this.focusedIndex=t+1),t>0&&s&&(this.focusedIndex=t-1);break;case o.Keys.up:case o.Keys.left:e.preventDefault(),t>0&&!s&&(this.focusedIndex=t-1),t<i&&s&&(this.focusedIndex=t+1)}this.$emit("keydown",e,void 0)}},setup:()=>({chipRef:t.ref(null),kendoAnchorRef:t.ref(null)}),render(){const{align:e,disabled:i,icon:n,svgIcon:r,iconClass:l,id:a,items:d,text:u,tabIndex:c,accessKey:p,popupSettings:h}=this.$props,m=o.templateRendering.call(this,this.$props.item,o.getListeners.call(this)),f=function(){return d&&d.map((function(s,n){return t.createVNode($,{key:n,index:n,id:`${this.listId}-${n}`,disabled:i||s.disabled,focused:this.focusedIndex===n,dataItem:s,item:m,class:o.classNames(s.className,w(this.currentDir||"ltr",e.horizontal)),onClick:this.handleItemClick,onDown:this.handleItemDown},null)}),this)},g=n&&!u,b=(this.element?this.element.offsetWidth:0)/2-16;return t.createVNode("div",{class:this.rootClassNames},[t.createVNode("button",{ref:e=>{this.kendoAnchorRef=e},id:a||this.buttonId,role:d?"menubutton":"button",type:"button","aria-disabled":i,"aria-expanded":d?this.computedOpened:void 0,"aria-haspopup":!!d,"aria-label":`${u||""} floatingactionbutton`,"aria-owns":d?this.listId:void 0,"aria-activedescendant":this.focusedIndex>=0&&d?`${this.listId}-${this.focusedIndex}`:void 0,tabindex:o.getTabIndex(c,i),accesskey:p,dir:this.currentDir,disabled:i,class:this.buttonClassNames,onClick:this.handleClick,onMousedown:this.handleMouseDown,onMouseup:this.handleMouseUp,onFocusin:this.handleFocus,onBlur:this.handleBlur,onKeydown:this.handleKeyDown},[n||r?t.createVNode(o.Icon,{name:n,icon:r,class:"k-fab-icon"},null):l?t.createVNode(o.Icon,{class:l},null):null,u&&t.createVNode("span",{class:"k-fab-text"},[u])]),t.createVNode(s.Popup,{ref:o.setRef(this,"popup"),show:this.computedOpened,anchor:this._anchor,animate:h.animate,popupClass:o.classNames("k-popup-transparent k-fab-popup",h.popupClass),anchorAlign:h.anchorAlign||x(e,this.isRtl),popupAlign:h.popupAlign||C(e,this.isRtl),style:{boxShadow:"none"}},{default:()=>[t.createVNode("ul",{ref:o.setRef(this,"list"),role:"menu","aria-labelledby":a,id:this.listId,class:o.classNames("k-fab-items",{"k-fab-items-bottom":"bottom"!==e.vertical,"k-fab-items-top":"bottom"===e.vertical}),style:{paddingLeft:g?b+"px":void 0,paddingRight:g?b+"px":void 0}},[f.call(this)])]})])}}),F=t.defineComponent({name:"KendoButtonItem",emits:{click:null,down:null},props:{focused:Boolean,index:Number,item:Object,render:[String,Object,Function],dataItem:[String,Object],id:String,textField:String,role:String},computed:{wrapperClass(){return{"k-item":!0,"k-focus":this.$props.focused}},innerClass(){const{dataItem:e}=this.$props;return{"k-link k-menu-link":!0,"k-selected":e.selected,"k-disabled":e.disabled}}},methods:{onClick(e){this.$emit("click",e,this.$props.index)},onDown(e){this.$emit("down",e,this.$props.index)}},render(){const{dataItem:e,id:i,render:s}=this.$props;return t.createVNode("li",{id:i,class:this.wrapperClass,onClick:this.onClick,onMousedown:this.onDown,onPointerdown:this.onDown,role:"menuitem","aria-disabled":e.disabled||void 0},[function(){const{textField:i,index:n}=this.$props,r=void 0!==e.text?e.text:i?e[i]:e,l=t.createVNode("span",{tabindex:-1,class:this.innerClass,key:"icon"},[e.icon||e.svgIcon?t.createVNode(o.Icon,{name:e.icon,icon:e.svgIcon,class:e.iconClass},null):e.iconClass&&t.createVNode("span",{class:e.iconClass,role:"presentation"},null),e.imageUrl&&t.createVNode("img",{class:"k-icon",alt:"",src:e.imageUrl,role:"presentation",key:"image"},null),r&&t.createVNode("span",{class:"k-menu-link-text"},[r])]);return o.getTemplate.call(this,{h:t.h,template:this.$props.dataItem.render||s,defaultRendering:l,additionalProps:{item:e,itemIndex:n,innerClass:this.innerClass,focused:this.focused}})}.call(this)])}}),R=(e,t,i,s)=>{if(i)return e;switch(t){case o.Keys.enter:case o.Keys.space:case o.Keys.esc:return-1;case o.Keys.up:case o.Keys.left:return Math.max(0,e-1);case o.Keys.down:case o.Keys.right:return Math.min(s-1,e+1);default:return e}};function K(e){let t={horizontal:"left",vertical:"bottom"};return e&&(t.horizontal="right"),t}function T(e){let t={horizontal:"left",vertical:"top"};return e&&(t.horizontal="right"),t}const V=t.defineComponent({name:"KendoSplitButton",emits:{focus:null,blur:null,buttonclick:null,itemclick:null,open:null,close:null},props:{accessKey:String,ariaLabel:String,text:String,items:{type:Array,default:function(){return[]}},textField:String,tabIndex:Number,disabled:Boolean,icon:String,svgIcon:Object,size:{type:String,default:"medium"},rounded:{type:String,default:"medium"},fillMode:{type:String,default:"solid",validator:function(e){return[null,"flat","link","outline","solid"].includes(e)}},themeColor:{type:String,default:"base",validator:function(e){return[null,"base","dark","error","info","inverse","inverse","light","primary","secondary","success","tertiary","warning"].includes(e)}},opened:{type:Boolean,default:void 0},iconClass:String,imageUrl:String,popupSettings:Object,itemRender:[String,Function,Object],item:[String,Function,Object],className:String,buttonClass:String,dir:String},data:()=>({focused:!1,focusedIndex:-1,currentOpened:!1}),created(){this._blurTimeout=null,this._anchor=o.guid(),this.mainButton=null,this.guid=o.guid(),this.buttonsData=[],o.validatePackage(d)},mounted(){this.mainButton=this.$refs[this._anchor],(void 0===this.$props.dir&&this.isRtl()||this.computedOpened)&&this.$forceUpdate()},updated(){this.focused&&this.element()&&(this.mainButton=this.$refs[this._anchor],this.mainButton.focus())},computed:{computedOpened(){return void 0===this.$props.opened?this.currentOpened:this.$props.opened},wrapperClass(){return{"k-split-button":!0,"k-button-group":!0,"k-focus":this.focused}}},setup:()=>({kendoAnchorRef:t.ref(null)}),render(){this.buttonsData=this.$props.items;const e=this.isRtl(),n=e?"rtl":void 0,{tabIndex:r,disabled:l}=this.$props,a=o.getDefaultSlots(this),d=function(){const{item:e,itemRender:i,textField:s}=this.$props;return this.buttonsData.length>0?this.buttonsData.map((function(n,r){const l="string"!=typeof n?{...n,render:o.templateRendering.call(this,n.render,o.getListeners.call(this))}:n;return t.createVNode(F,{class:"k-menu-item",role:"menuitem",dataItem:l,textField:s,focused:this.focusedIndex===r,onClick:this.onItemClick,onDown:this.onItemDown,render:o.templateRendering.call(this,i,o.getListeners.call(this)),item:e,key:r,index:r,id:`${this.guid}-${r}`},null)}),this):null};return t.createVNode("div",{class:this.wrapperClass,onKeydown:this.onKeyDown,onFocusin:this.onFocus,onFocusout:this.onBlur,dir:n},[t.createVNode(c,{size:this.$props.size,rounded:this.$props.rounded,fillMode:this.$props.fillMode,themeColor:this.$props.themeColor,onClick:e=>this.onItemClick(e,-1),disabled:l||void 0,tabIndex:r,accessKey:this.$props.accessKey,class:this.$props.buttonClass,icon:this.$props.icon,svgIcon:this.$props.svgIcon,iconClass:this.$props.iconClass,imageUrl:this.$props.imageUrl,dir:n,id:this._anchor,ref:this._anchor,type:"button","aria-disabled":l,"aria-haspopup":"menu","aria-expanded":this.computedOpened,"aria-label":this.$props.ariaLabel||`${this.$props.text||""} splitbutton`,"aria-controls":this.guid,"aria-activedescendant":void 0!==this.focusedIndex&&this.focusedIndex>=0?`${this.guid}-${this.focusedIndex}`:void 0},{default:()=>[this.$props.text,a]}),t.createVNode(c,{svgIcon:i.caretAltDownIcon,size:this.$props.size,rounded:this.$props.rounded,fillMode:this.$props.fillMode,themeColor:this.$props.themeColor,icon:"caret-alt-down",disabled:l||void 0,tabIndex:-1,onClick:this.onSplitPartClick,onMousedown:this.onDownSplitPart,onPointerdown:this.onDownSplitPart,dir:n,"aria-label":"menu toggling button"},null),function(){const{popupSettings:i={},size:n}=this.$props;return t.createVNode(s.Popup,{anchor:this._anchor,show:this.computedOpened,animate:i.animate,popupClass:o.classNames("k-menu-popup",i.popupClass),anchorAlign:i.anchorAlign||K(e),popupAlign:i.popupAlign||T(e),style:e?{direction:"rtl"}:void 0},{default:()=>[t.createVNode("ul",{class:`k-group k-menu-group k-reset k-menu-group-${o.kendoThemeMaps.sizeMap[n]||n}`,role:"menu",id:this.guid,"aria-labelledby":this._anchor},[d.call(this)])]})}.call(this)])},methods:{element(){return this.mainButton},onKeyDown(e){if(e.altKey)return void(this.computedOpened||e.keyCode!==o.Keys.down?this.computedOpened&&e.keyCode===o.Keys.up&&(this.dispatchPopupEvent(e,!1),this.focusedIndex=-1,this.currentOpened=!1):(this.dispatchPopupEvent(e,!0),this.focusedIndex=0,this.currentOpened=!0));let t;if(e.keyCode===o.Keys.enter||e.keyCode===o.Keys.space?(e.preventDefault(),this.dispatchClickEvent(e,this.focusedIndex),void 0!==this.focusedIndex&&this.focusedIndex>=0&&(t={focusedIndex:this.computedOpened?-1:0,currentOpened:!this.computedOpened},this.dispatchPopupEvent(e,t.currentOpened))):this.computedOpened&&e.keyCode===o.Keys.esc&&(t={focusedIndex:-1,currentOpened:!1},this.dispatchPopupEvent(e,t.currentOpened)),this.computedOpened){const i=R(this.focusedIndex,e.keyCode,e.altKey,this.buttonsData.length);i!==this.focusedIndex&&(t=t||{},t.focusedIndex=i);const s=e.keyCode===o.Keys.up||e.keyCode===o.Keys.down||e.keyCode===o.Keys.left||e.keyCode===o.Keys.right;!e.altKey&&s&&e.preventDefault()}t&&(this.focusedIndex=t.focusedIndex,this.focused=t.focused,void 0!==t.currentOpened&&(this.currentOpened=t.currentOpened))},onFocus(e){this.focused||(this.$emit("focus",e,this,void 0),this.focused=!0),this.focusedIndex=-1,clearTimeout(this._blurTimeout)},onItemClick(e,t){const o=this.computedOpened;o&&(this.focusedIndex=0,this.currentOpened=!1),this.dispatchClickEvent(e,t),o&&this.dispatchPopupEvent(e,!1)},onBlur(e){clearTimeout(this._blurTimeout),this.createBlurTimeout(e)},createBlurTimeout(e){const t=this;this._blurTimeout=setTimeout((()=>{o.canUseDOM&&document.activeElement!==t.mainButton&&(t.focused=!1,t.focusedIndex=-1,t.$emit("blur",e,this,void 0),t.computedOpened&&(t.currentOpened=!1,t.dispatchPopupEvent(e,!1)))}),200)},dispatchClickEvent(e,t){this.isItemDisabled(t)||(-1===t?this.$emit("buttonclick",e,this,void 0):this.$emit("itemclick",{event:e,component:this,item:this.buttonsData[t],itemIndex:t}))},onSplitPartClick(e){if(this.buttonsData.length){const t=!this.computedOpened;this.dispatchPopupEvent(e,t),this.focusedIndex=t?0:-1,this.currentOpened=t,this.focused=!0}},onDownSplitPart(e){e.preventDefault(),this.element()&&document.activeElement!==this.element()&&this.element().focus()},onItemDown(e){document.activeElement===this.element()&&e.preventDefault()},dispatchPopupEvent(e,t){this.$emit(t?"open":"close",e,this,void 0)},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.$el&&"rtl"===getComputedStyle(this.$el).direction}}}),M=t.defineComponent({name:"KendoDropDownButton",emits:{focus:null,blur:null,itemclick:null,open:null,close:null},props:{accessKey:String,items:{type:Array,default:function(){return[]}},ariaLabel:String,text:String,textField:String,tabIndex:Number,disabled:Boolean,icon:String,svgIcon:Object,iconClass:String,imageUrl:String,popupSettings:Object,itemRender:[String,Object,Function],item:Function,size:{type:String,default:"medium"},shape:{type:String,default:"rectangle",validator:function(e){return[null,"rectangle","square"].includes(e)}},rounded:{type:String,default:"medium"},fillMode:{type:String,default:"solid",validator:function(e){return[null,"flat","link","outline","solid"].includes(e)}},themeColor:{type:String,default:"base",validator:function(e){return[null,"base","dark","error","info","inverse","inverse","light","primary","secondary","success","tertiary","warning"].includes(e)}},opened:{type:Boolean,default:void 0},buttonClass:String,dir:String},created(){this._blurTimeout=null,this._anchor=o.guid(),this.wrapper=null,this.mainButton=null,this.guid=o.guid(),this.buttonsData=[],o.validatePackage(d)},mounted(){this.mainButton=this.$refs[this._anchor],(void 0===this.$props.dir&&this.isRtl()||this.computedOpened)&&this.$forceUpdate()},updated(){this.focused&&this.element()&&(this.mainButton=this.$refs[this._anchor],this.mainButton.focus())},data:()=>({currentOpened:!1,focused:!1,focusedIndex:-1}),computed:{computedOpened(){return void 0===this.$props.opened?this.currentOpened:this.$props.opened},wrapperClass(){return{"k-dropdown-button":!0,"k-focus":this.focused}}},setup:()=>({kendoAnchorRef:t.ref(null)}),render(){const e=this.isRtl(),i=e?"rtl":void 0,{tabIndex:n,disabled:r}=this.$props,l=o.getDefaultSlots(this);this.buttonsData=this.$props.items;const a=function(){const{item:e,itemRender:i,textField:s}=this.$props;return this.buttonsData.length>0?this.buttonsData.map((function(n,r){const l="string"!=typeof n?{...n,render:o.templateRendering.call(this,n.render,o.getListeners.call(this))}:n;return t.createVNode(F,{class:"k-menu-item",dataItem:l,textField:s,focused:this.focusedIndex===r,onClick:this.onItemClick,onDown:this.onItemDown,render:o.templateRendering.call(this,i,o.getListeners.call(this)),item:e,index:r,key:r,id:`${this.guid}-${r}`},null)}),this):null};return t.createVNode("div",{class:this.wrapperClass,onKeydown:this.onKeyDown,onFocusin:this.onFocus,onFocusout:this.onBlur,dir:i},[t.createVNode(c,{size:this.$props.size,shape:this.$props.shape,rounded:this.$props.rounded,fillMode:this.$props.fillMode,themeColor:this.$props.themeColor,onClick:this.onClickMainButton,onMousedown:this.mouseDown,disabled:r||void 0,tabIndex:n,accessKey:this.$props.accessKey,icon:this.$props.icon,svgIcon:this.$props.svgIcon,iconClass:this.$props.iconClass,class:this.$props.buttonClass,imageUrl:this.$props.imageUrl,dir:i,ref:this._anchor,type:"button","aria-disabled":r,"aria-haspopup":"menu","aria-expanded":this.computedOpened,"aria-label":this.$props.ariaLabel||`${this.$props.text||""} dropdownbutton`,"aria-controls":this.guid,"aria-activedescendant":void 0!==this.focusedIndex&&this.focusedIndex>=0?`${this.guid}-${this.focusedIndex}`:void 0},{default:()=>[this.$props.text,l]}),function(){const{popupSettings:i={},size:n}=this.$props;return t.createVNode(s.Popup,{anchor:this._anchor,show:this.computedOpened,animate:i.animate,popupClass:o.classNames("k-menu-popup",i.popupClass),anchorAlign:i.anchorAlign||K(e),popupAlign:i.popupAlign||T(e),style:e?{direction:"rtl"}:void 0},{default:()=>[t.createVNode("ul",{class:`k-group k-menu-group k-reset k-menu-group-${o.kendoThemeMaps.sizeMap[n]||n}`,role:"menu",id:this.guid},[a.call(this)])]})}.call(this)])},methods:{element(){return this.mainButton},onKeyDown(e){if(e.altKey)this.computedOpened||e.keyCode!==o.Keys.down?this.computedOpened&&e.keyCode===o.Keys.up&&(this.dispatchPopupEvent(e,!1),this.focusedIndex=-1,this.currentOpened=!1):(this.dispatchPopupEvent(e,!0),this.focusedIndex=0,this.currentOpened=!0);else if(e.keyCode===o.Keys.enter||e.keyCode===o.Keys.space?(void 0!==this.focusedIndex&&this.focusedIndex>=0&&this.dispatchClickEvent(e,this.focusedIndex),e.preventDefault(),this.focusedIndex=this.computedOpened?-1:0,this.currentOpened=!this.computedOpened,this.dispatchPopupEvent(e,this.currentOpened)):this.computedOpened&&e.keyCode===o.Keys.esc&&(this.focusedIndex=-1,this.currentOpened=!1,this.dispatchPopupEvent(e,this.currentOpened)),this.computedOpened){const t=R(this.focusedIndex,e.keyCode,e.altKey,this.buttonsData.length);this.focusedIndex=t;const i=e.keyCode===o.Keys.up||e.keyCode===o.Keys.down||e.keyCode===o.Keys.left||e.keyCode===o.Keys.right;!e.altKey&&i&&e.preventDefault()}},onFocus(e){this.focused||(this.focused=!0,this.$emit("focus",e,this,void 0)),this.focusedIndex=this.computedOpened?0:-1,clearTimeout(this._blurTimeout)},onBlur(e){clearTimeout(this._blurTimeout),this.createBlurTimeout(e)},createBlurTimeout(e){const t=this;this._blurTimeout=setTimeout((()=>{o.canUseDOM&&document.activeElement!==t.$el&&(t.focused=!1,t.focusedIndex=-1,t.$emit("blur",e,t,void 0),t.computedOpened&&(t.currentOpened=!1,t.dispatchPopupEvent(e,!1)))}),200)},onItemClick(e,t){this.focusedIndex=-1,this.currentOpened=!1,this.dispatchClickEvent(e,t),this.dispatchPopupEvent(e,!1)},onItemDown(e){document.activeElement===this.element()&&e.preventDefault()},mouseDown(e){e.preventDefault()},dispatchClickEvent(e,t){this.isItemDisabled(t)||this.$emit("itemclick",{event:e,item:this.buttonsData[t],itemIndex:t})},onClickMainButton(e){if(!this.buttonsData.length)return;const t=!this.computedOpened;this.currentOpened=t,this.focused=!0,this.focusedIndex=t?0:-1,this.dispatchPopupEvent(e,t)},dispatchPopupEvent(e,t){this.$emit(t?"open":"close",e,this,void 0)},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.$el&&"rtl"===getComputedStyle(this.$el).direction}}}),P=t.defineComponent({name:"KendoToolbarItem",render:()=>t.createVNode("div",{class:"k-toolbar-separator k-separator"},null)}),A="prevArrow.title",z="nextArrow.title",E="moreButtonTitle.title",L={[A]:"Previous scroll button",[z]:"Next scroll button",[E]:"More button"},j=t.defineComponent({name:"KendoToolbarScrollButton",props:{buttonScrollSpeed:Number,disabled:Boolean,scrollContentRef:Object,type:String,prevButton:Object,nextButton:Object,dir:String},inject:{kendoLocalizationService:{default:null}},emits:["contentscroll"],methods:{getScrollButtonTitle(){const{dir:e,type:t}=this.$props;return"rtl"!==e?"prev"===t?n.provideLocalizationService(this).toLanguageString(A,L[A]):n.provideLocalizationService(this).toLanguageString(z,L[z]):"prev"===t?n.provideLocalizationService(this).toLanguageString(z,L[z]):n.provideLocalizationService(this).toLanguageString(A,L[A])}},render(){const{disabled:e,type:s,scrollContentRef:n,buttonScrollSpeed:r,prevButton:l,nextButton:a}=this.$props;return t.createVNode("span",{class:o.classNames("k-button","k-button-md","k-button-solid","k-button-solid-base","k-rounded-md","k-icon-button",`k-toolbar-${s}`,{"k-disabled":e}),title:this.getScrollButtonTitle(),"aria-hidden":!0,tabindex:e?-1:void 0,onClick:()=>{n&&r&&(n.scrollBy({left:"next"===s?r:-r,behavior:"smooth"}),this.$emit("contentscroll",s))}},[t.createVNode(o.SvgIcon,{icon:"prev"===s?i.caretAltLeftIcon:i.caretAltRightIcon,class:"k-button-icon"},null)])}}),W=t.defineComponent({name:"ToolbarScrollable",props:{scrollButtons:String,scrollButtonsPosition:String,isOverflowing:Boolean,buttonScrollSpeed:Number,dir:String,isScrollStartPosition:Boolean,isScrollEndPosition:Boolean,prevButton:Object,nextButton:Object,toolbarItems:Object},emits:["contentscroll"],data:()=>({scrollContentRef:null}),mounted(){this.scrollContentRef=this.$refs.scrollContentRef},methods:{onContentScroll(e){this.$emit("contentscroll",e)}},render(){const{scrollButtons:e,buttonScrollSpeed:o,prevButton:i,nextButton:s,scrollButtonsPosition:n,dir:r,isScrollStartPosition:l,isScrollEndPosition:a,toolbarItems:d}=this.$props,u=(e,n)=>t.createVNode(j,{type:e,dir:r,disabled:n,scrollContentRef:this.scrollContentRef,buttonScrollSpeed:o,prevButton:i,nextButton:s,onContentscroll:this.onContentScroll},null),c="visible"===e||"auto"===e&&this.$props.isOverflowing;return t.createVNode(t.Fragment,null,[c&&"split"===n&&t.createVNode(t.Fragment,null,[u("rtl"!==r?"prev":"next",l),t.createVNode(P,{class:"k-toolbar-button-separator"},null)]),c&&"start"===n&&t.createVNode(t.Fragment,null,[u("rtl"!==r?"prev":"next",l),u("rtl"!==r?"next":"prev",a),t.createVNode(P,{class:"k-toolbar-button-separator"},null)]),t.createVNode("span",{class:"k-toolbar-items k-toolbar-items-scroll",ref:"scrollContentRef"},[d]),c&&"split"===n&&t.createVNode(t.Fragment,null,[t.createVNode(P,{class:"k-toolbar-button-separator"},null),u("rtl"!==r?"next":"prev",a)]),c&&"end"===n&&t.createVNode(t.Fragment,null,[t.createVNode(P,{class:"k-toolbar-button-separator"},null),u("rtl"!==r?"prev":"next",l),u("rtl"!==r?"next":"prev",a)])])}}),U=t.defineComponent({name:"ToolbarOverflowSection",props:{toolbarRef:Object,toolbarWidth:Number,fillMode:String,size:String,visibleTools:Array,overFlowTools:Array,opened:Boolean,allTools:Array},emits:["toggleoverflow"],inject:{kendoLocalizationService:{default:null}},methods:{handleClick(){this.$emit("toggleoverflow",!this.$props.opened)}},render(){const{visibleTools:e,overFlowTools:r,allTools:l}=this.$props,{toolbarRef:a,toolbarWidth:d,fillMode:u,size:p}=this.$props;return t.createVNode(t.Fragment,null,[e&&[...l].splice(0,e.length),r.length>0&&t.createVNode(t.Fragment,null,[t.createVNode(P,{class:"k-toolbar-button-separator"},null),t.createVNode(c,{ref:"buttonRef",class:"k-toolbar-overflow-button",fillMode:"flat",svgIcon:i.moreHorizontalIcon,title:n.provideLocalizationService(this).toLanguageString(E,L[E]),onClick:this.handleClick},null),t.createVNode(s.Popup,{anchor:a,show:this.$props.opened,popupClass:"k-toolbar-popup",key:d,style:{width:d+"px"}},{default:()=>[t.createVNode("span",{class:`k-toolbar-items-list k-toolbar-items-list-${o.kendoThemeMaps.sizeMap[p]} k-toolbar-items-list-${u}`},[e&&[...l].splice(e.length,l.length)])]})])])}}),_=t.defineComponent({name:"KendoToolbar",props:{tabIndex:{type:Number,default:0},dir:{type:String,validator:function(e){return[null,"ltr","rtl"].includes(e)},default:"ltr"},keyboardNavigation:{type:Boolean,default:!0},buttons:{type:Array,default:function(){}},size:{type:String,default:"medium",validator:function(e){return[null,"small","medium","large"].includes(e)}},fillMode:{type:String,default:"solid",validator:function(e){return[null,"solid","flat","outline"].includes(e)}},ariaLabel:String,overflow:{type:String,default:"section",validator:function(e){return[null,"none","section","scroll"].includes(e)}},scrollButtons:{type:String,default:"auto",validator:function(e){return[null,"hidden","visible","auto"].includes(e)}},scrollButtonsPosition:{type:String,default:"split",validator:function(e){return[null,"start","end","split"].includes(e)}},buttonScrollSpeed:{type:Number,default:100}},data:()=>({defaultSlot:null,offsetWidth:0,offsetHeight:0,currentButtons:[],focusedSelector:"",isScrollStartPosition:!0,isScrollEndPosition:!1,focusableButtons:[],isOverflowing:!1,scrollContentRef:null,lastToolbarWidthRef:0,overFlowToolsRef:[],overFlowOpened:!1,visibleToolsRef:void 0}),created(){this.focusedSelector=this.selectors.map((e=>e+":focus")).join(","),o.validatePackage(d)},computed:{selectors(){return this.$props.buttons||l},wrapperClass(){const{size:e,fillMode:t,overflow:i,scrollButtons:s}=this.$props;return{"k-toolbar":!0,[`k-toolbar-${t}`]:t,[`k-toolbar-${o.kendoThemeMaps.sizeMap[e]||e}`]:e,"k-toolbar-scrollable":"scroll"===i,"k-toolbar-scrollable-overlay":"scroll"===i&&("hidden"===s||void 0===s),"k-toolbar-scrollable-start":"scroll"===i&&"hidden"===s&&this.isScrollStartPosition,"k-toolbar-scrollable-end":"scroll"===i&&"hidden"===s&&this.isScrollEndPosition,"k-toolbar-section":i&&"section"===i}}},mounted(){o.canUseDOM&&window.ResizeObserver&&(this.observerResize=new window.ResizeObserver(this.onWindowResize),this.observerResize.observe(this.$el));const e=this.$el;e&&(this.offsetWidth=e.offsetWidth,this.offsetHeight=e.offsetHeight,!1!==this.$props.keyboardNavigation&&(this.currentButtons=this.getCurrentButtons(),this.setTabIndex(0))),this.scrollContentRef=this.$refs.toolbarScrollable&&this.$refs.toolbarScrollable.scrollContentRef,this.defaultSlot&&(this.visibleToolsRef=this.defaultSlot.filter((e=>e&&e.type)).map(((e,o)=>t.cloneVNode(e,{key:e.key||o}))),this.$nextTick((()=>{this.checkOverflow(),this.initOverflow(this.$refs.toolbar)})))},updated(){!this.$el||!1===this.$props.keyboardNavigation||(this.currentButtons=this.getCurrentButtons(),this.setTabIndex(this.focusedIndex()))},unmounted(){o.canUseDOM&&this.observerResize&&this.observerResize.disconnect(),this.currentButtons.length=0},render(){const{overflow:e,scrollButtons:i,scrollButtonsPosition:s,prevButton:n,nextButton:r,buttonScrollSpeed:l,dir:a,fillMode:d,size:u}=this.$props;return this.defaultSlot=o.getDefaultSlots(this),t.createVNode("div",{ref:"toolbar",class:this.wrapperClass,role:"toolbar",dir:a,"aria-label":this.$props.ariaLabel,onKeydown:this.onKeyDown},["scroll"===e&&t.createVNode(t.Fragment,null,[t.createVNode(W,{ref:"toolbarScrollable",scrollButtons:i,scrollButtonsPosition:s,prevButton:n,nextButton:r,isOverflowing:this.isOverflowing,buttonScrollSpeed:l,dir:a,isScrollStartPosition:this.isScrollStartPosition,isScrollEndPosition:this.isScrollEndPosition,toolbarItems:this.defaultSlot,onContentscroll:this.onContentScroll},null)]),"section"===e&&t.createVNode(U,{opened:this.overFlowOpened,toolbarRef:this.$refs.toolbar,toolbarWidth:this.offsetWidth,fillMode:d,size:u,visibleTools:this.visibleToolsRef,overFlowTools:this.overFlowToolsRef,onToggleoverflow:this.onToggleoverflow,allTools:this.defaultSlot},null),"none"===e&&this.defaultSlot])},methods:{getCurrentButtons(){return this.$el&&this.$el.querySelectorAll?Array.from(this.$el.querySelectorAll(this.selectors.join(","))):[]},getInternalButtons(){return this.$el&&this.$el.querySelectorAll?Array.from(this.$el.querySelectorAll(".k-dropdownlist > .k-button,.k-colorpicker > .k-button")):[]},focusedIndex(){const e=this.$el&&this.$el.querySelector&&this.$el.querySelector(this.focusedSelector);return Math.max(0,this.currentButtons.findIndex((t=>t===e)))},setTabIndex(e){const{tabIndex:t}=this.$props;this.currentButtons.forEach(((o,i)=>{o.tabIndex=i===e?t:-1})),this.getInternalButtons().forEach((e=>{e.tabIndex=-1}))},onKeyDown(e){if(!1===this.$props.keyboardNavigation)return;const t=e.target;if(e.keyCode!==o.Keys.left&&e.keyCode!==o.Keys.right||e.defaultPrevented||-1===this.currentButtons.findIndex((e=>e===t)))return;const i=this.focusedIndex();e.keyCode===o.Keys.left?this.focusButton(i,i-1):this.focusButton(i,i+1)},focusButton(e,t){const{tabIndex:o}=this.$props,i=this.currentButtons[t];if(i){i.tabIndex=o,i.focus();const t=this.currentButtons[e];t&&(t.tabIndex=-1)}},initOverflow(e,t){let o=200;const i=[],s=[];Array.from(e.children).forEach(((e,t)=>{o+=Math.ceil(e.clientWidth),o<=this.$refs.toolbar.offsetWidth-50?i.push(this.visibleToolsRef[t]):s.push(this.visibleToolsRef[t])})),this.visibleToolsRef=i,this.overFlowToolsRef=s},checkOverflow(){if("scroll"===this.$props.overflow){const e=this.scrollContentRef;e&&(this.isOverflowing=e.scrollWidth>e.clientWidth||e.scrollHeight>e.clientHeight,this.isOverflowing?this.onContentScroll():(this.isScrollStartPosition=!0,this.isScrollEndPosition=!0))}else if("section"===this.$props.overflow||void 0===this.$props.overflow){const e=this.$refs.toolbar;let t=0;if(e){const o=e.offsetWidth,i=parseInt(window.getComputedStyle(e).gap||"0",10),s=Array.from(e.children).reduce(((e,t)=>e+=Math.ceil(t.clientWidth)),0),n=Array.from(e.children).length,r=2*i;if(t=36+Number(s)+n*i+r,t>o){const e=[...this.visibleToolsRef],t=e.pop();this.visibleToolsRef=e,t&&(this.overFlowToolsRef=[t,...this.overFlowToolsRef]),this.lastToolbarWidthRef=o}else if(o>this.lastToolbarWidthRef+i*n/2.75){const e=[...this.overFlowToolsRef],t=e.shift();t&&this.lastToolbarWidthRef+i*n>30&&(this.overFlowToolsRef=e,this.visibleToolsRef=[...this.visibleToolsRef,t]),this.lastToolbarWidthRef=o}else this.$forceUpdate()}}},onWindowResize(e){window.requestAnimationFrame((()=>{const t=this.$el;if(this.overFlowOpened=!1,!t)return;const o=t.offsetWidth,i=t.offsetHeight;if(this.offsetWidth!==o||this.offsetHeight!==i){this.offsetWidth=o,this.offsetHeight=i;const t={offsetWidth:this.offsetWidth,offsetHeight:this.offsetHeight};this.$emit("resize",{target:this,...t,nativeEvent:e})}this.checkOverflow()}))},onContentScroll(e){const t=this.scrollContentRef;if(e&&t){let o,i;o="next"!==e&&(t.scrollLeft<=this.$props.buttonScrollSpeed||0===t.scrollLeft),i="prev"!==e&&(t.scrollLeft+t.clientWidth+this.$props.buttonScrollSpeed>=t.scrollWidth||t.scrollLeft+t.clientWidth===t.scrollWidth),this.isScrollStartPosition=!!o,this.isScrollEndPosition=!!i}else this.isScrollStartPosition=!0,this.isScrollEndPosition=!1},onToggleoverflow(e){this.overFlowOpened=e}}}),q=t.defineComponent({name:"KendoToolbarItem",methods:{element(){return this.$el}},render(){const e=o.getDefaultSlots(this);return t.createVNode("div",{class:"k-toolbar-item"},[e])}}),H=t.defineComponent({name:"KendoToolbarItem",render:()=>t.createVNode("span",{class:"k-spacer"},null)});let G=function(e){return e.WebSpeech="WebSpeech",e.None="None",e}({});const J=t.defineComponent({name:"KendoSpeechToTextButton",props:{lang:{type:String,default:"en-US"},continuous:{type:Boolean,default:!1},interimResults:{type:Boolean,default:!1},maxAlternatives:{type:Number,default:1},integrationMode:{type:String,default:G.WebSpeech},onStart:{type:Function},onResult:{type:Function},onEnd:{type:Function},onError:{type:Function},svgIcon:{type:Object,default:i.microphoneOutlineIcon},iconSize:{type:String,default:"medium"},disabled:{type:Boolean,default:void 0},size:{type:String,default:"medium"},rounded:{type:String,default:"medium"},fillMode:{type:String,default:"solid"},themeColor:{type:String,default:"base"},title:{type:String,default:"Speech to Text Button"},ariaLabel:{type:String,default:"Start speech recognition"}},setup(e,{emit:o,expose:i}){const s=t.ref(null),n=t.ref(!1),l=()=>e.integrationMode!==G.None,a="undefined"==typeof window||"webkitSpeechRecognition"in window||"SpeechRecognition"in window||(e.onError&&e.onError({errorMessage:"Speech Recognition API is not supported in this browser."}),!1),d=()=>{var e;n.value||(l&&(null==(e=s.value)||e.start()),n.value=!0)},u=()=>{var e;n.value&&(l&&(null==(e=s.value)||e.stop()),n.value=!1)},c=async()=>{n.value||e.onStart&&(await e.onStart(),d())},p=e=>{const t=e.results,i=t[t.length-1],s=Array.from(i).map((e=>({transcript:e.transcript,confidence:e.confidence})));o("result",{isFinal:i.isFinal,alternatives:s})},h=async()=>{n.value&&e.onEnd&&(await e.onEnd(),u())},m=e=>{o("error",e)},f=()=>{var t;a&&e.integrationMode===G.WebSpeech&&(null!=(t=s.value)&&t.isActive()&&u(),s.value=function(e){return new r.KendoSpeechRecognition(e)}({lang:e.lang,continuous:e.continuous,interimResults:e.interimResults,integrationMode:e.integrationMode,maxAlternatives:e.maxAlternatives,events:{start:c,result:p,end:h,error:m}}))};return t.watch((()=>({lang:e.lang,continuous:e.continuous,interimResults:e.interimResults,integrationMode:e.integrationMode,maxAlternatives:e.maxAlternatives})),(()=>{f()}),{deep:!0}),t.onMounted((()=>{f()})),t.onUnmounted((()=>{var e;null!=(e=s.value)&&e.isInActiveState&&u()})),i({start:d,stop:u,abort:()=>{var e;n.value&&l&&(null==(e=s.value)||e.abort(),n.value=!1)},isActive:()=>{var e;return null==(e=s.value)?void 0:e.isActive()}}),{clickHandler:()=>{a&&(n.value?h():c())},isInActiveState:n}},render(){const{ariaLabel:e,svgIcon:o,fillMode:s,rounded:n,size:r,disabled:l,themeColor:a,iconSize:d,title:u}=this.$props,{className:p,style:h,id:m}=this.$attrs,f=t.computed((()=>["k-speech-to-text-button",p,{"k-listening":this.isInActiveState}])),g=t.computed((()=>this.isInActiveState?i.stopSmIcon:o||i.microphoneOutlineIcon));return t.createVNode(c,{id:m,style:h,class:f.value,onClick:this.clickHandler,svgIcon:g.value,iconSize:d,fillMode:s,rounded:n,size:r,themeColor:a,"aria-label":e,disabled:l,title:u},null)}});e.Button=c,e.ButtonGroup=m,e.ButtonItem=F,e.Chip=y,e.ChipList=k,e.DropDownButton=M,e.FloatingActionButton=N,e.FloatingActionButtonItem=$,e.SpeechToTextButton=J,e.SpeechToTextButtonMode=G,e.SplitButton=V,e.Toolbar=_,e.ToolbarItem=q,e.ToolbarSeparator=P,e.ToolbarSpacer=H}));
package/index.d.mts CHANGED
@@ -2319,6 +2319,276 @@ export declare type FloatingActionButtonThemeColor = 'primary' | 'secondary' | '
2319
2319
  */
2320
2320
  declare type Omit_2<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;
2321
2321
 
2322
+ /**
2323
+ * Represents a single recognition alternative from the speech engine.
2324
+ */
2325
+ declare interface SpeechRecognitionAlternative_2 {
2326
+ /**
2327
+ * The transcript of the recognized speech.
2328
+ */
2329
+ transcript: string;
2330
+ /**
2331
+ * A confidence score for the transcript, between 0 and 1.
2332
+ */
2333
+ confidence: number;
2334
+ }
2335
+ export { SpeechRecognitionAlternative_2 as SpeechRecognitionAlternative }
2336
+
2337
+ /**
2338
+ * @hidden
2339
+ */
2340
+ export declare const SpeechToTextButton: DefineComponent<ExtractPropTypes< {
2341
+ lang: {
2342
+ type: PropType<string>;
2343
+ default: string;
2344
+ };
2345
+ continuous: {
2346
+ type: PropType<boolean>;
2347
+ default: boolean;
2348
+ };
2349
+ interimResults: {
2350
+ type: PropType<boolean>;
2351
+ default: boolean;
2352
+ };
2353
+ maxAlternatives: {
2354
+ type: PropType<number>;
2355
+ default: number;
2356
+ };
2357
+ integrationMode: {
2358
+ type: PropType<"WebSpeech" | "None">;
2359
+ default: SpeechToTextButtonMode;
2360
+ };
2361
+ onStart: {
2362
+ type: PropType<() => void>;
2363
+ };
2364
+ onResult: {
2365
+ type: PropType<(event: SpeechToTextResultEvent) => void>;
2366
+ };
2367
+ onEnd: {
2368
+ type: PropType<() => void>;
2369
+ };
2370
+ onError: {
2371
+ type: PropType<(event: SpeechToTextErrorEvent) => void>;
2372
+ };
2373
+ svgIcon: {
2374
+ type: PropType<SVGIcon>;
2375
+ default: SVGIcon_2;
2376
+ };
2377
+ iconSize: {
2378
+ type: PropType<string>;
2379
+ default: string;
2380
+ };
2381
+ disabled: {
2382
+ type: PropType<boolean>;
2383
+ default: any;
2384
+ };
2385
+ size: {
2386
+ type: PropType<string>;
2387
+ default: string;
2388
+ };
2389
+ rounded: {
2390
+ type: PropType<string>;
2391
+ default: string;
2392
+ };
2393
+ fillMode: {
2394
+ type: PropType<string>;
2395
+ default: string;
2396
+ };
2397
+ themeColor: {
2398
+ type: PropType<string>;
2399
+ default: string;
2400
+ };
2401
+ title: {
2402
+ type: PropType<string>;
2403
+ default: string;
2404
+ };
2405
+ ariaLabel: {
2406
+ type: PropType<string>;
2407
+ default: string;
2408
+ };
2409
+ }>, {
2410
+ clickHandler: () => void;
2411
+ isInActiveState: Ref<boolean, boolean>;
2412
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes< {
2413
+ lang: {
2414
+ type: PropType<string>;
2415
+ default: string;
2416
+ };
2417
+ continuous: {
2418
+ type: PropType<boolean>;
2419
+ default: boolean;
2420
+ };
2421
+ interimResults: {
2422
+ type: PropType<boolean>;
2423
+ default: boolean;
2424
+ };
2425
+ maxAlternatives: {
2426
+ type: PropType<number>;
2427
+ default: number;
2428
+ };
2429
+ integrationMode: {
2430
+ type: PropType<"WebSpeech" | "None">;
2431
+ default: SpeechToTextButtonMode;
2432
+ };
2433
+ onStart: {
2434
+ type: PropType<() => void>;
2435
+ };
2436
+ onResult: {
2437
+ type: PropType<(event: SpeechToTextResultEvent) => void>;
2438
+ };
2439
+ onEnd: {
2440
+ type: PropType<() => void>;
2441
+ };
2442
+ onError: {
2443
+ type: PropType<(event: SpeechToTextErrorEvent) => void>;
2444
+ };
2445
+ svgIcon: {
2446
+ type: PropType<SVGIcon>;
2447
+ default: SVGIcon_2;
2448
+ };
2449
+ iconSize: {
2450
+ type: PropType<string>;
2451
+ default: string;
2452
+ };
2453
+ disabled: {
2454
+ type: PropType<boolean>;
2455
+ default: any;
2456
+ };
2457
+ size: {
2458
+ type: PropType<string>;
2459
+ default: string;
2460
+ };
2461
+ rounded: {
2462
+ type: PropType<string>;
2463
+ default: string;
2464
+ };
2465
+ fillMode: {
2466
+ type: PropType<string>;
2467
+ default: string;
2468
+ };
2469
+ themeColor: {
2470
+ type: PropType<string>;
2471
+ default: string;
2472
+ };
2473
+ title: {
2474
+ type: PropType<string>;
2475
+ default: string;
2476
+ };
2477
+ ariaLabel: {
2478
+ type: PropType<string>;
2479
+ default: string;
2480
+ };
2481
+ }>> & Readonly<{}>, {
2482
+ title: string;
2483
+ ariaLabel: string;
2484
+ themeColor: string;
2485
+ size: string;
2486
+ rounded: string;
2487
+ fillMode: string;
2488
+ iconSize: string;
2489
+ svgIcon: SVGIcon;
2490
+ disabled: boolean;
2491
+ lang: string;
2492
+ continuous: boolean;
2493
+ interimResults: boolean;
2494
+ maxAlternatives: number;
2495
+ integrationMode: "WebSpeech" | "None";
2496
+ }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
2497
+
2498
+ export declare enum SpeechToTextButtonMode {
2499
+ WebSpeech = "WebSpeech",
2500
+ None = "None"
2501
+ }
2502
+
2503
+ export declare interface SpeechToTextButtonProps extends Omit<ButtonProps, 'shape'> {
2504
+ /**
2505
+ * The language to use for speech recognition. Defaults to 'en-US'.
2506
+ */
2507
+ lang?: string;
2508
+ /**
2509
+ * Specifies whether the speech recognition should continue until explicitly stopped. Defaults to `true`.
2510
+ */
2511
+ continuous?: boolean;
2512
+ /**
2513
+ * Specifies whether to return interim results. Defaults to `true`.
2514
+ */
2515
+ interimResults?: boolean;
2516
+ /**
2517
+ * Specifies the maximum number of alternative transcriptions to return. Defaults to `1`.
2518
+ */
2519
+ maxAlternatives?: number;
2520
+ /**
2521
+ * Specifies which speech recognition engine or integration the component should use.
2522
+ * This allows the component to operate in different environments or use alternative implementations.
2523
+ */
2524
+ integrationMode?: 'WebSpeech' | 'None';
2525
+ /**
2526
+ * Callback function that is called when speech recognition starts.
2527
+ */
2528
+ onStart?: () => void;
2529
+ /**
2530
+ * Callback function that is called when a speech recognition result is available.
2531
+ * The event contains the `isFinal` flag and an array of alternatives.
2532
+ */
2533
+ onResult?: (event: SpeechToTextResultEvent) => void;
2534
+ /**
2535
+ * Callback function that is called when speech recognition ends.
2536
+ */
2537
+ onEnd?: () => void;
2538
+ /**
2539
+ * Callback function that is called when an error occurs during speech recognition.
2540
+ */
2541
+ onError?: (event: SpeechToTextErrorEvent) => void;
2542
+ /**
2543
+ * Method that helps you start the speech recognition process manually.
2544
+ *
2545
+ * @memberof SpeechToTextButtonProps
2546
+ */
2547
+ start(): void;
2548
+ /**
2549
+ * Method that helps you stop the speech recognition process manually.
2550
+ *
2551
+ * @memberof SpeechToTextButtonProps
2552
+ */
2553
+ stop(): void;
2554
+ /**
2555
+ * Method that helps you abort the speech recognition process manually.
2556
+ *
2557
+ * @memberof SpeechToTextButtonProps
2558
+ */
2559
+ abort(): void;
2560
+ /**
2561
+ * Method that checks if the speech recognition is currently active.
2562
+ *
2563
+ * @returns `true` if the speech recognition is active, otherwise `false`.
2564
+ */
2565
+ isActive(): boolean;
2566
+ }
2567
+
2568
+ /**
2569
+ * The event argument for the `error` event of the SpeechToTextButton.
2570
+ */
2571
+ export declare interface SpeechToTextErrorEvent {
2572
+ /**
2573
+ * Message detailing the cause of the speech recognition error. Use this message for debugging or user feedback.
2574
+ */
2575
+ errorMessage: string;
2576
+ }
2577
+
2578
+ /**
2579
+ * The event argument for the `result` event of the SpeechToTextButton.
2580
+ */
2581
+ export declare interface SpeechToTextResultEvent {
2582
+ /**
2583
+ * Indicates whether the speech recognition result is final (true) or interim (false).
2584
+ */
2585
+ isFinal: boolean;
2586
+ /**
2587
+ * An array of possible recognition alternatives returned by the speech engine.
2588
+ */
2589
+ alternatives: SpeechRecognitionAlternative_2[];
2590
+ }
2591
+
2322
2592
  /**
2323
2593
  * @hidden
2324
2594
  */
package/index.d.ts CHANGED
@@ -2319,6 +2319,276 @@ export declare type FloatingActionButtonThemeColor = 'primary' | 'secondary' | '
2319
2319
  */
2320
2320
  declare type Omit_2<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;
2321
2321
 
2322
+ /**
2323
+ * Represents a single recognition alternative from the speech engine.
2324
+ */
2325
+ declare interface SpeechRecognitionAlternative_2 {
2326
+ /**
2327
+ * The transcript of the recognized speech.
2328
+ */
2329
+ transcript: string;
2330
+ /**
2331
+ * A confidence score for the transcript, between 0 and 1.
2332
+ */
2333
+ confidence: number;
2334
+ }
2335
+ export { SpeechRecognitionAlternative_2 as SpeechRecognitionAlternative }
2336
+
2337
+ /**
2338
+ * @hidden
2339
+ */
2340
+ export declare const SpeechToTextButton: DefineComponent<ExtractPropTypes< {
2341
+ lang: {
2342
+ type: PropType<string>;
2343
+ default: string;
2344
+ };
2345
+ continuous: {
2346
+ type: PropType<boolean>;
2347
+ default: boolean;
2348
+ };
2349
+ interimResults: {
2350
+ type: PropType<boolean>;
2351
+ default: boolean;
2352
+ };
2353
+ maxAlternatives: {
2354
+ type: PropType<number>;
2355
+ default: number;
2356
+ };
2357
+ integrationMode: {
2358
+ type: PropType<"WebSpeech" | "None">;
2359
+ default: SpeechToTextButtonMode;
2360
+ };
2361
+ onStart: {
2362
+ type: PropType<() => void>;
2363
+ };
2364
+ onResult: {
2365
+ type: PropType<(event: SpeechToTextResultEvent) => void>;
2366
+ };
2367
+ onEnd: {
2368
+ type: PropType<() => void>;
2369
+ };
2370
+ onError: {
2371
+ type: PropType<(event: SpeechToTextErrorEvent) => void>;
2372
+ };
2373
+ svgIcon: {
2374
+ type: PropType<SVGIcon>;
2375
+ default: SVGIcon_2;
2376
+ };
2377
+ iconSize: {
2378
+ type: PropType<string>;
2379
+ default: string;
2380
+ };
2381
+ disabled: {
2382
+ type: PropType<boolean>;
2383
+ default: any;
2384
+ };
2385
+ size: {
2386
+ type: PropType<string>;
2387
+ default: string;
2388
+ };
2389
+ rounded: {
2390
+ type: PropType<string>;
2391
+ default: string;
2392
+ };
2393
+ fillMode: {
2394
+ type: PropType<string>;
2395
+ default: string;
2396
+ };
2397
+ themeColor: {
2398
+ type: PropType<string>;
2399
+ default: string;
2400
+ };
2401
+ title: {
2402
+ type: PropType<string>;
2403
+ default: string;
2404
+ };
2405
+ ariaLabel: {
2406
+ type: PropType<string>;
2407
+ default: string;
2408
+ };
2409
+ }>, {
2410
+ clickHandler: () => void;
2411
+ isInActiveState: Ref<boolean, boolean>;
2412
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes< {
2413
+ lang: {
2414
+ type: PropType<string>;
2415
+ default: string;
2416
+ };
2417
+ continuous: {
2418
+ type: PropType<boolean>;
2419
+ default: boolean;
2420
+ };
2421
+ interimResults: {
2422
+ type: PropType<boolean>;
2423
+ default: boolean;
2424
+ };
2425
+ maxAlternatives: {
2426
+ type: PropType<number>;
2427
+ default: number;
2428
+ };
2429
+ integrationMode: {
2430
+ type: PropType<"WebSpeech" | "None">;
2431
+ default: SpeechToTextButtonMode;
2432
+ };
2433
+ onStart: {
2434
+ type: PropType<() => void>;
2435
+ };
2436
+ onResult: {
2437
+ type: PropType<(event: SpeechToTextResultEvent) => void>;
2438
+ };
2439
+ onEnd: {
2440
+ type: PropType<() => void>;
2441
+ };
2442
+ onError: {
2443
+ type: PropType<(event: SpeechToTextErrorEvent) => void>;
2444
+ };
2445
+ svgIcon: {
2446
+ type: PropType<SVGIcon>;
2447
+ default: SVGIcon_2;
2448
+ };
2449
+ iconSize: {
2450
+ type: PropType<string>;
2451
+ default: string;
2452
+ };
2453
+ disabled: {
2454
+ type: PropType<boolean>;
2455
+ default: any;
2456
+ };
2457
+ size: {
2458
+ type: PropType<string>;
2459
+ default: string;
2460
+ };
2461
+ rounded: {
2462
+ type: PropType<string>;
2463
+ default: string;
2464
+ };
2465
+ fillMode: {
2466
+ type: PropType<string>;
2467
+ default: string;
2468
+ };
2469
+ themeColor: {
2470
+ type: PropType<string>;
2471
+ default: string;
2472
+ };
2473
+ title: {
2474
+ type: PropType<string>;
2475
+ default: string;
2476
+ };
2477
+ ariaLabel: {
2478
+ type: PropType<string>;
2479
+ default: string;
2480
+ };
2481
+ }>> & Readonly<{}>, {
2482
+ title: string;
2483
+ ariaLabel: string;
2484
+ themeColor: string;
2485
+ size: string;
2486
+ rounded: string;
2487
+ fillMode: string;
2488
+ iconSize: string;
2489
+ svgIcon: SVGIcon;
2490
+ disabled: boolean;
2491
+ lang: string;
2492
+ continuous: boolean;
2493
+ interimResults: boolean;
2494
+ maxAlternatives: number;
2495
+ integrationMode: "WebSpeech" | "None";
2496
+ }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
2497
+
2498
+ export declare enum SpeechToTextButtonMode {
2499
+ WebSpeech = "WebSpeech",
2500
+ None = "None"
2501
+ }
2502
+
2503
+ export declare interface SpeechToTextButtonProps extends Omit<ButtonProps, 'shape'> {
2504
+ /**
2505
+ * The language to use for speech recognition. Defaults to 'en-US'.
2506
+ */
2507
+ lang?: string;
2508
+ /**
2509
+ * Specifies whether the speech recognition should continue until explicitly stopped. Defaults to `true`.
2510
+ */
2511
+ continuous?: boolean;
2512
+ /**
2513
+ * Specifies whether to return interim results. Defaults to `true`.
2514
+ */
2515
+ interimResults?: boolean;
2516
+ /**
2517
+ * Specifies the maximum number of alternative transcriptions to return. Defaults to `1`.
2518
+ */
2519
+ maxAlternatives?: number;
2520
+ /**
2521
+ * Specifies which speech recognition engine or integration the component should use.
2522
+ * This allows the component to operate in different environments or use alternative implementations.
2523
+ */
2524
+ integrationMode?: 'WebSpeech' | 'None';
2525
+ /**
2526
+ * Callback function that is called when speech recognition starts.
2527
+ */
2528
+ onStart?: () => void;
2529
+ /**
2530
+ * Callback function that is called when a speech recognition result is available.
2531
+ * The event contains the `isFinal` flag and an array of alternatives.
2532
+ */
2533
+ onResult?: (event: SpeechToTextResultEvent) => void;
2534
+ /**
2535
+ * Callback function that is called when speech recognition ends.
2536
+ */
2537
+ onEnd?: () => void;
2538
+ /**
2539
+ * Callback function that is called when an error occurs during speech recognition.
2540
+ */
2541
+ onError?: (event: SpeechToTextErrorEvent) => void;
2542
+ /**
2543
+ * Method that helps you start the speech recognition process manually.
2544
+ *
2545
+ * @memberof SpeechToTextButtonProps
2546
+ */
2547
+ start(): void;
2548
+ /**
2549
+ * Method that helps you stop the speech recognition process manually.
2550
+ *
2551
+ * @memberof SpeechToTextButtonProps
2552
+ */
2553
+ stop(): void;
2554
+ /**
2555
+ * Method that helps you abort the speech recognition process manually.
2556
+ *
2557
+ * @memberof SpeechToTextButtonProps
2558
+ */
2559
+ abort(): void;
2560
+ /**
2561
+ * Method that checks if the speech recognition is currently active.
2562
+ *
2563
+ * @returns `true` if the speech recognition is active, otherwise `false`.
2564
+ */
2565
+ isActive(): boolean;
2566
+ }
2567
+
2568
+ /**
2569
+ * The event argument for the `error` event of the SpeechToTextButton.
2570
+ */
2571
+ export declare interface SpeechToTextErrorEvent {
2572
+ /**
2573
+ * Message detailing the cause of the speech recognition error. Use this message for debugging or user feedback.
2574
+ */
2575
+ errorMessage: string;
2576
+ }
2577
+
2578
+ /**
2579
+ * The event argument for the `result` event of the SpeechToTextButton.
2580
+ */
2581
+ export declare interface SpeechToTextResultEvent {
2582
+ /**
2583
+ * Indicates whether the speech recognition result is final (true) or interim (false).
2584
+ */
2585
+ isFinal: boolean;
2586
+ /**
2587
+ * An array of possible recognition alternatives returned by the speech engine.
2588
+ */
2589
+ alternatives: SpeechRecognitionAlternative_2[];
2590
+ }
2591
+
2322
2592
  /**
2323
2593
  * @hidden
2324
2594
  */
package/index.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 t=require("./Button.js"),o=require("./ButtonGroup.js"),r=require("./Chip/Chip.js"),n=require("./Chip/ChipList.js"),e=require("./FloatingActionButton/FloatingActionButton.js"),i=require("./FloatingActionButton/FloatingActionButtonItem.js"),u=require("./ListButton/SplitButton.js"),a=require("./ListButton/DropDownButton.js"),c=require("./ListButton/ButtonItem.js"),l=require("./toolbar/Toolbar.js"),p=require("./toolbar/tools/ToolbarItem.js"),B=require("./toolbar/tools/ToolbarSeparator.js"),s=require("./toolbar/tools/ToolbarSpacer.js");exports.Button=t.Button;exports.ButtonGroup=o.ButtonGroup;exports.Chip=r.Chip;exports.ChipList=n.ChipList;exports.FloatingActionButton=e.FloatingActionButton;exports.FloatingActionButtonItem=i.FloatingActionButtonItem;exports.SplitButton=u.SplitButton;exports.DropDownButton=a.DropDownButton;exports.ButtonItem=c.ButtonItem;exports.Toolbar=l.Toolbar;exports.ToolbarItem=p.ToolbarItem;exports.ToolbarSeparator=B.ToolbarSeparator;exports.ToolbarSpacer=s.ToolbarSpacer;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./Button.js"),e=require("./ButtonGroup.js"),r=require("./Chip/Chip.js"),n=require("./Chip/ChipList.js"),u=require("./FloatingActionButton/FloatingActionButton.js"),i=require("./FloatingActionButton/FloatingActionButtonItem.js"),c=require("./ListButton/SplitButton.js"),a=require("./ListButton/DropDownButton.js"),p=require("./ListButton/ButtonItem.js"),B=require("./toolbar/Toolbar.js"),l=require("./toolbar/tools/ToolbarItem.js"),T=require("./toolbar/tools/ToolbarSeparator.js"),s=require("./toolbar/tools/ToolbarSpacer.js"),t=require("./SpeechToText/SpeechToTextButton.js");exports.Button=o.Button;exports.ButtonGroup=e.ButtonGroup;exports.Chip=r.Chip;exports.ChipList=n.ChipList;exports.FloatingActionButton=u.FloatingActionButton;exports.FloatingActionButtonItem=i.FloatingActionButtonItem;exports.SplitButton=c.SplitButton;exports.DropDownButton=a.DropDownButton;exports.ButtonItem=p.ButtonItem;exports.Toolbar=B.Toolbar;exports.ToolbarItem=l.ToolbarItem;exports.ToolbarSeparator=T.ToolbarSeparator;exports.ToolbarSpacer=s.ToolbarSpacer;exports.SpeechToTextButton=t.SpeechToTextButton;exports.SpeechToTextButtonMode=t.SpeechToTextButtonMode;
package/index.mjs CHANGED
@@ -6,30 +6,33 @@
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
8
  import { Button as r } from "./Button.mjs";
9
- import { ButtonGroup as e } from "./ButtonGroup.mjs";
10
- import { Chip as f } from "./Chip/Chip.mjs";
9
+ import { ButtonGroup as p } from "./ButtonGroup.mjs";
10
+ import { Chip as x } from "./Chip/Chip.mjs";
11
11
  import { ChipList as n } from "./Chip/ChipList.mjs";
12
- import { FloatingActionButton as i } from "./FloatingActionButton/FloatingActionButton.mjs";
13
- import { FloatingActionButtonItem as l } from "./FloatingActionButton/FloatingActionButtonItem.mjs";
14
- import { SplitButton as b } from "./ListButton/SplitButton.mjs";
15
- import { DropDownButton as c } from "./ListButton/DropDownButton.mjs";
16
- import { ButtonItem as S } from "./ListButton/ButtonItem.mjs";
17
- import { Toolbar as h } from "./toolbar/Toolbar.mjs";
12
+ import { FloatingActionButton as a } from "./FloatingActionButton/FloatingActionButton.mjs";
13
+ import { FloatingActionButtonItem as i } from "./FloatingActionButton/FloatingActionButtonItem.mjs";
14
+ import { SplitButton as l } from "./ListButton/SplitButton.mjs";
15
+ import { DropDownButton as S } from "./ListButton/DropDownButton.mjs";
16
+ import { ButtonItem as h } from "./ListButton/ButtonItem.mjs";
17
+ import { Toolbar as g } from "./toolbar/Toolbar.mjs";
18
18
  import { ToolbarItem as C } from "./toolbar/tools/ToolbarItem.mjs";
19
19
  import { ToolbarSeparator as F } from "./toolbar/tools/ToolbarSeparator.mjs";
20
- import { ToolbarSpacer as w } from "./toolbar/tools/ToolbarSpacer.mjs";
20
+ import { ToolbarSpacer as s } from "./toolbar/tools/ToolbarSpacer.mjs";
21
+ import { SpeechToTextButton as G, SpeechToTextButtonMode as L } from "./SpeechToText/SpeechToTextButton.mjs";
21
22
  export {
22
23
  r as Button,
23
- e as ButtonGroup,
24
- S as ButtonItem,
25
- f as Chip,
24
+ p as ButtonGroup,
25
+ h as ButtonItem,
26
+ x as Chip,
26
27
  n as ChipList,
27
- c as DropDownButton,
28
- i as FloatingActionButton,
29
- l as FloatingActionButtonItem,
30
- b as SplitButton,
31
- h as Toolbar,
28
+ S as DropDownButton,
29
+ a as FloatingActionButton,
30
+ i as FloatingActionButtonItem,
31
+ G as SpeechToTextButton,
32
+ L as SpeechToTextButtonMode,
33
+ l as SplitButton,
34
+ g as Toolbar,
32
35
  C as ToolbarItem,
33
36
  F as ToolbarSeparator,
34
- w as ToolbarSpacer
37
+ s as ToolbarSpacer
35
38
  };
@@ -5,4 +5,4 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={name:"@progress/kendo-vue-buttons",productName:"Kendo UI for Vue",productCode:"KENDOUIVUE",productCodes:["KENDOUIVUE"],publishDate: 1752066825,version:"6.5.0-develop.2",licensingDocsUrl:"https://www.telerik.com/kendo-vue-ui/my-license/?utm_medium=product&utm_source=kendovue&utm_campaign=kendo-ui-vue-purchase-license-keys-warning"};exports.packageMetadata=e;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={name:"@progress/kendo-vue-buttons",productName:"Kendo UI for Vue",productCode:"KENDOUIVUE",productCodes:["KENDOUIVUE"],publishDate: 1753785222,version:"6.5.0-develop.4",licensingDocsUrl:"https://www.telerik.com/kendo-vue-ui/my-license/?utm_medium=product&utm_source=kendovue&utm_campaign=kendo-ui-vue-purchase-license-keys-warning"};exports.packageMetadata=e;
@@ -10,8 +10,8 @@ const e = {
10
10
  productName: "Kendo UI for Vue",
11
11
  productCode: "KENDOUIVUE",
12
12
  productCodes: ["KENDOUIVUE"],
13
- publishDate: 1752066825,
14
- version: "6.5.0-develop.2",
13
+ publishDate: 1753785222,
14
+ version: "6.5.0-develop.4",
15
15
  licensingDocsUrl: "https://www.telerik.com/kendo-vue-ui/my-license/?utm_medium=product&utm_source=kendovue&utm_campaign=kendo-ui-vue-purchase-license-keys-warning"
16
16
  };
17
17
  export {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@progress/kendo-vue-buttons",
3
- "version": "6.5.0-develop.2",
3
+ "version": "6.5.0-develop.4",
4
4
  "description": "TODO",
5
5
  "author": "Progress",
6
6
  "license": "SEE LICENSE IN LICENSE.md",
@@ -19,9 +19,9 @@
19
19
  "sideEffects": false,
20
20
  "peerDependencies": {
21
21
  "@progress/kendo-licensing": "^1.4.0",
22
- "@progress/kendo-vue-common": "6.5.0-develop.2",
23
- "@progress/kendo-vue-intl": "6.5.0-develop.2",
24
- "@progress/kendo-vue-popup": "6.5.0-develop.2",
22
+ "@progress/kendo-vue-common": "6.5.0-develop.4",
23
+ "@progress/kendo-vue-intl": "6.5.0-develop.4",
24
+ "@progress/kendo-vue-popup": "6.5.0-develop.4",
25
25
  "@progress/kendo-svg-icons": "^4.0.0",
26
26
  "vue": "^3.0.2"
27
27
  },
@@ -42,7 +42,7 @@
42
42
  "package": {
43
43
  "productName": "Kendo UI for Vue",
44
44
  "productCode": "KENDOUIVUE",
45
- "publishDate": 1752066825,
45
+ "publishDate": 1753785222,
46
46
  "licensingDocsUrl": "https://www.telerik.com/kendo-vue-ui/my-license/?utm_medium=product&utm_source=kendovue&utm_campaign=kendo-ui-vue-purchase-license-keys-warning"
47
47
  }
48
48
  },