@progress/kendo-vue-buttons 10.1.0-develop.1 → 10.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -19,8 +19,6 @@ export interface ButtonItemProps {
19
19
  id?: string;
20
20
  textField?: string;
21
21
  role?: string;
22
- first?: boolean;
23
- last?: boolean;
24
22
  }
25
23
  /**
26
24
  * @hidden
@@ -34,8 +32,6 @@ declare const ButtonItem: import('vue').DefineComponent<import('vue').ExtractPro
34
32
  id: PropType<string>;
35
33
  textField: PropType<string>;
36
34
  role: PropType<string>;
37
- first: PropType<boolean>;
38
- last: PropType<boolean>;
39
35
  }>, {}, {}, {
40
36
  wrapperClass(): object;
41
37
  innerClass(): object;
@@ -54,8 +50,6 @@ declare const ButtonItem: import('vue').DefineComponent<import('vue').ExtractPro
54
50
  id: PropType<string>;
55
51
  textField: PropType<string>;
56
52
  role: PropType<string>;
57
- first: PropType<boolean>;
58
- last: PropType<boolean>;
59
53
  }>> & Readonly<{
60
54
  onClick?: (event: any, index: number) => any;
61
55
  onDown?: (event: any, index: number) => any;
@@ -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("vue"),o=require("@progress/kendo-vue-common"),c=t.defineComponent({name:"KendoButtonItem",emits:{click:(e,n)=>!0,down:(e,n)=>!0},props:{focused:Boolean,index:Number,item:Object,render:[String,Object,Function],dataItem:[String,Object],id:String,textField:String,role:String,first:Boolean,last:Boolean},computed:{wrapperClass(){return{"k-item":!0,"k-menu-item":!0,"k-first":this.$props.first,"k-last":this.$props.last,"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:n,render:r}=this.$props,a=function(){const{textField:s,index:l}=this.$props,i=e.text!==void 0?e.text:s?e[s]:e,d=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),i&&t.createVNode("span",{class:"k-menu-link-text"},[i])]);return o.getTemplate.call(this,{h:t.h,template:this.$props.dataItem.render||r,defaultRendering:d,additionalProps:{item:e,itemIndex:l,innerClass:this.innerClass,focused:this.focused}})};return t.createVNode("li",{id:n,class:this.wrapperClass,onClick:this.onClick,onMousedown:this.onDown,onPointerdown:this.onDown,role:"menuitem","aria-disabled":e.disabled||void 0},[a.call(this)])}});exports.ButtonItem=c;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),o=require("@progress/kendo-vue-common"),l=t.defineComponent({name:"KendoButtonItem",emits:{click:(e,n)=>!0,down:(e,n)=>!0},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-menu-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:n,render:r}=this.$props,d=function(){const{textField:i,index:a}=this.$props,s=e.text!==void 0?e.text:i?e[i]:e,c=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),s&&t.createVNode("span",{class:"k-menu-link-text"},[s])]);return o.getTemplate.call(this,{h:t.h,template:this.$props.dataItem.render||r,defaultRendering:c,additionalProps:{item:e,itemIndex:a,innerClass:this.innerClass,focused:this.focused}})};return t.createVNode("li",{id:n,class:this.wrapperClass,onClick:this.onClick,onMousedown:this.onDown,onPointerdown:this.onDown,role:"menuitem","aria-disabled":e.disabled||void 0},[d.call(this)])}});exports.ButtonItem=l;
@@ -5,9 +5,9 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- import { defineComponent as d, createVNode as t, h as c } from "vue";
8
+ import { defineComponent as a, createVNode as t, h as c } from "vue";
9
9
  import { Icon as m, getTemplate as p } from "@progress/kendo-vue-common";
10
- const f = /* @__PURE__ */ d({
10
+ const x = /* @__PURE__ */ a({
11
11
  name: "KendoButtonItem",
12
12
  emits: {
13
13
  click: (e, n) => !0,
@@ -21,17 +21,13 @@ const f = /* @__PURE__ */ d({
21
21
  dataItem: [String, Object],
22
22
  id: String,
23
23
  textField: String,
24
- role: String,
25
- first: Boolean,
26
- last: Boolean
24
+ role: String
27
25
  },
28
26
  computed: {
29
27
  wrapperClass() {
30
28
  return {
31
29
  "k-item": !0,
32
30
  "k-menu-item": !0,
33
- "k-first": this.$props.first,
34
- "k-last": this.$props.last,
35
31
  "k-focus": this.$props.focused
36
32
  };
37
33
  },
@@ -61,9 +57,9 @@ const f = /* @__PURE__ */ d({
61
57
  render: o
62
58
  } = this.$props, r = function() {
63
59
  const {
64
- textField: s,
60
+ textField: i,
65
61
  index: l
66
- } = this.$props, i = e.text !== void 0 ? e.text : s ? e[s] : e, a = t("span", {
62
+ } = this.$props, s = e.text !== void 0 ? e.text : i ? e[i] : e, d = t("span", {
67
63
  tabindex: -1,
68
64
  class: this.innerClass,
69
65
  key: "icon"
@@ -80,13 +76,13 @@ const f = /* @__PURE__ */ d({
80
76
  src: e.imageUrl,
81
77
  role: "presentation",
82
78
  key: "image"
83
- }, null), i && t("span", {
79
+ }, null), s && t("span", {
84
80
  class: "k-menu-link-text"
85
- }, [i])]);
81
+ }, [s])]);
86
82
  return p.call(this, {
87
83
  h: c,
88
84
  template: this.$props.dataItem.render || o,
89
- defaultRendering: a,
85
+ defaultRendering: d,
90
86
  additionalProps: {
91
87
  item: e,
92
88
  itemIndex: l,
@@ -107,5 +103,5 @@ const f = /* @__PURE__ */ d({
107
103
  }
108
104
  });
109
105
  export {
110
- f as ButtonItem
106
+ x as ButtonItem
111
107
  };
@@ -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 i=require("vue"),b=require("../Button.js"),s=require("@progress/kendo-vue-common"),$=require("./utils/navigation.js"),C=require("./ButtonItem.js"),I=require("@progress/kendo-vue-popup"),l=require("./utils/popup.js"),k=require("../package-metadata.js"),D=i.defineComponent({name:"KendoDropDownButton",emits:{focus:e=>!0,blur:e=>!0,itemclick:e=>!0,open:e=>!0,close:e=>!0},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:String,rounded:String,fillMode:{type:String,validator:function(e){return["flat","link","outline","solid"].includes(e)}},themeColor:{type:String,validator:function(e){return["base","error","info","inverse","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(k.packageMetadata)},mounted(){this.mainButton=this.$refs[this._anchor],(this.$props.dir===void 0&&this.isRtl()||this.computedOpened)&&this.$forceUpdate()},updated(){this.focused&&this.element()&&(this.mainButton=this.$refs[this._anchor],this.mainButton.focus())},data(){return{currentOpened:!1,focused:!1,focusedIndex:-1}},computed:{computedOpened(){return this.$props.opened===void 0?this.currentOpened:this.$props.opened},wrapperClass(){}},setup(){return{kendoAnchorRef:i.ref(null)}},render(){const e=this.isRtl(),t=e?"rtl":void 0,{tabIndex:n,disabled:d}=this.$props,c=s.getDefaultSlots(this);this.buttonsData=this.$props.items;const h=function(){const{item:o,itemRender:p,textField:g}=this.$props,a=this.buttonsData.length;return a>0?this.buttonsData.map(function(u,r){const y=typeof u!="string"?{...u,render:s.templateRendering.call(this,u.render,s.getListeners.call(this))}:u;return i.createVNode(C.ButtonItem,{dataItem:y,textField:g,focused:this.focusedIndex===r,onClick:this.onItemClick,onDown:this.onItemDown,render:s.templateRendering.call(this,p,s.getListeners.call(this)),item:o,index:r,key:r,id:`${this.guid}-${r}`,first:r===0,last:r===a-1},null)},this):null},f=function(){const{popupSettings:o={},size:p}=this.$props;return i.createVNode(I.Popup,{anchor:this._anchor,show:this.computedOpened,animate:o.animate,popupClass:s.classNames("k-menu-popup",o.popupClass),anchorAlign:o.anchorAlign||l.getAnchorAlign(e),popupAlign:o.popupAlign||l.getPopupAlign(e),style:e?{direction:"rtl"}:void 0},{default:()=>[i.createVNode("ul",{class:"k-menu-group",role:"menu",id:this.guid},[h.call(this)])]})},m=this.$props.text||c?{default:()=>[this.$props.text,c]}:{};return i.createVNode("div",{class:this.wrapperClass,onKeydown:this.onKeyDown,onFocusin:this.onFocus,onFocusout:this.onBlur,dir:t},[i.createVNode(b.Button,{size:this.$props.size,rounded:this.$props.rounded,fillMode:this.$props.fillMode,themeColor:this.$props.themeColor,onClick:this.onClickMainButton,onMousedown:this.mouseDown,disabled:d||void 0,tabIndex:n,accessKey:this.$props.accessKey,icon:this.$props.icon,svgIcon:this.$props.svgIcon,iconClass:this.$props.iconClass,class:s.classNames("k-menu-button",this.$props.buttonClass),imageUrl:this.$props.imageUrl,dir:t,ref:this._anchor,type:"button","aria-disabled":d||void 0,"aria-expanded":this.computedOpened,"aria-label":this.$props.ariaLabel||(this.$props.svgIcon||this.$props.icon||this.$props.iconClass?"Menu":void 0),"aria-controls":this.computedOpened?this.guid:void 0,"aria-activedescendant":this.computedOpened&&this.focusedIndex!==void 0&&this.focusedIndex>=0?`${this.guid}-${this.focusedIndex}`:void 0},m),f.call(this)])},methods:{element(){return this.mainButton},onKeyDown(e){if(e.altKey){!this.computedOpened&&e.keyCode===s.Keys.down?(this.dispatchPopupEvent(e,!0),this.focusedIndex=0,this.currentOpened=!0):this.computedOpened&&e.keyCode===s.Keys.up&&(this.dispatchPopupEvent(e,!1),this.focusedIndex=-1,this.currentOpened=!1);return}if(e.keyCode===s.Keys.enter||e.keyCode===s.Keys.space?(this.focusedIndex!==void 0&&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=$(this.focusedIndex,e.keyCode,e.altKey,this.buttonsData.length);this.focusedIndex=t;const n=e.keyCode===s.Keys.up||e.keyCode===s.Keys.down||e.keyCode===s.Keys.left||e.keyCode===s.Keys.right;!e.altKey&&n&&e.preventDefault()}},onFocus(e){this.focused||(this.focused=!0,this.$emit("focus",{event:e})),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",{event:e}),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){const n={event:e};this.$emit(t?"open":"close",n)},isItemDisabled(e){return this.buttonsData[e]?this.buttonsData[e].disabled:this.$props.disabled},isRtl(){return this.$props.dir!==void 0?this.$props.dir==="rtl":!!this.$el&&getComputedStyle(this.$el).direction==="rtl"}}});exports.DropDownButton=D;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("vue"),y=require("../Button.js"),s=require("@progress/kendo-vue-common"),b=require("./utils/navigation.js"),C=require("./ButtonItem.js"),$=require("@progress/kendo-vue-popup"),a=require("./utils/popup.js"),I=require("../package-metadata.js"),k=i.defineComponent({name:"KendoDropDownButton",emits:{focus:e=>!0,blur:e=>!0,itemclick:e=>!0,open:e=>!0,close:e=>!0},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:String,rounded:String,fillMode:{type:String,validator:function(e){return["flat","link","outline","solid"].includes(e)}},themeColor:{type:String,validator:function(e){return["base","error","info","inverse","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(I.packageMetadata)},mounted(){this.mainButton=this.$refs[this._anchor],(this.$props.dir===void 0&&this.isRtl()||this.computedOpened)&&this.$forceUpdate()},updated(){this.focused&&this.element()&&(this.mainButton=this.$refs[this._anchor],this.mainButton.focus())},data(){return{currentOpened:!1,focused:!1,focusedIndex:-1}},computed:{computedOpened(){return this.$props.opened===void 0?this.currentOpened:this.$props.opened},wrapperClass(){}},setup(){return{kendoAnchorRef:i.ref(null)}},render(){const e=this.isRtl(),t=e?"rtl":void 0,{tabIndex:n,disabled:d}=this.$props,c=s.getDefaultSlots(this);this.buttonsData=this.$props.items;const h=function(){const{item:o,itemRender:p,textField:m}=this.$props;return this.buttonsData.length>0?this.buttonsData.map(function(r,u){const g=typeof r!="string"?{...r,render:s.templateRendering.call(this,r.render,s.getListeners.call(this))}:r;return i.createVNode(C.ButtonItem,{dataItem:g,textField:m,focused:this.focusedIndex===u,onClick:this.onItemClick,onDown:this.onItemDown,render:s.templateRendering.call(this,p,s.getListeners.call(this)),item:o,index:u,key:u,id:`${this.guid}-${u}`},null)},this):null},l=function(){const{popupSettings:o={},size:p}=this.$props;return i.createVNode($.Popup,{anchor:this._anchor,show:this.computedOpened,animate:o.animate,popupClass:s.classNames("k-menu-popup",o.popupClass),anchorAlign:o.anchorAlign||a.getAnchorAlign(e),popupAlign:o.popupAlign||a.getPopupAlign(e),style:e?{direction:"rtl"}:void 0},{default:()=>[i.createVNode("ul",{class:"k-menu-group",role:"menu",id:this.guid},[h.call(this)])]})},f=this.$props.text||c?{default:()=>[this.$props.text,c]}:{};return i.createVNode("div",{class:this.wrapperClass,onKeydown:this.onKeyDown,onFocusin:this.onFocus,onFocusout:this.onBlur,dir:t},[i.createVNode(y.Button,{size:this.$props.size,rounded:this.$props.rounded,fillMode:this.$props.fillMode,themeColor:this.$props.themeColor,onClick:this.onClickMainButton,onMousedown:this.mouseDown,disabled:d||void 0,tabIndex:n,accessKey:this.$props.accessKey,icon:this.$props.icon,svgIcon:this.$props.svgIcon,iconClass:this.$props.iconClass,class:s.classNames("k-menu-button",this.$props.buttonClass),imageUrl:this.$props.imageUrl,dir:t,ref:this._anchor,type:"button","aria-disabled":d||void 0,"aria-expanded":this.computedOpened,"aria-label":this.$props.ariaLabel||(this.$props.svgIcon||this.$props.icon||this.$props.iconClass?"Menu":void 0),"aria-controls":this.computedOpened?this.guid:void 0,"aria-activedescendant":this.computedOpened&&this.focusedIndex!==void 0&&this.focusedIndex>=0?`${this.guid}-${this.focusedIndex}`:void 0},f),l.call(this)])},methods:{element(){return this.mainButton},onKeyDown(e){if(e.altKey){!this.computedOpened&&e.keyCode===s.Keys.down?(this.dispatchPopupEvent(e,!0),this.focusedIndex=0,this.currentOpened=!0):this.computedOpened&&e.keyCode===s.Keys.up&&(this.dispatchPopupEvent(e,!1),this.focusedIndex=-1,this.currentOpened=!1);return}if(e.keyCode===s.Keys.enter||e.keyCode===s.Keys.space?(this.focusedIndex!==void 0&&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=b(this.focusedIndex,e.keyCode,e.altKey,this.buttonsData.length);this.focusedIndex=t;const n=e.keyCode===s.Keys.up||e.keyCode===s.Keys.down||e.keyCode===s.Keys.left||e.keyCode===s.Keys.right;!e.altKey&&n&&e.preventDefault()}},onFocus(e){this.focused||(this.focused=!0,this.$emit("focus",{event:e})),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",{event:e}),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){const n={event:e};this.$emit(t?"open":"close",n)},isItemDisabled(e){return this.buttonsData[e]?this.buttonsData[e].disabled:this.$props.disabled},isRtl(){return this.$props.dir!==void 0?this.$props.dir==="rtl":!!this.$el&&getComputedStyle(this.$el).direction==="rtl"}}});exports.DropDownButton=k;
@@ -5,15 +5,15 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- import { defineComponent as I, createVNode as r, ref as O } from "vue";
9
- import { Button as k } from "../Button.mjs";
10
- import { canUseDOM as D, Keys as s, getDefaultSlots as x, classNames as h, guid as l, validatePackage as w, templateRendering as f, getListeners as m } from "@progress/kendo-vue-common";
11
- import S from "./utils/navigation.mjs";
12
- import { ButtonItem as v } from "./ButtonItem.mjs";
13
- import { Popup as B } from "@progress/kendo-vue-popup";
14
- import { getPopupAlign as E, getAnchorAlign as K } from "./utils/popup.mjs";
15
- import { packageMetadata as P } from "../package-metadata.mjs";
16
- const j = /* @__PURE__ */ I({
8
+ import { defineComponent as y, createVNode as o, ref as I } from "vue";
9
+ import { Button as O } from "../Button.mjs";
10
+ import { canUseDOM as k, Keys as i, getDefaultSlots as D, classNames as a, guid as h, validatePackage as x, templateRendering as l, getListeners as f } from "@progress/kendo-vue-common";
11
+ import w from "./utils/navigation.mjs";
12
+ import { ButtonItem as S } from "./ButtonItem.mjs";
13
+ import { Popup as v } from "@progress/kendo-vue-popup";
14
+ import { getPopupAlign as B, getAnchorAlign as E } from "./utils/popup.mjs";
15
+ import { packageMetadata as K } from "../package-metadata.mjs";
16
+ const j = /* @__PURE__ */ y({
17
17
  name: "KendoDropDownButton",
18
18
  emits: {
19
19
  focus: (t) => !0,
@@ -64,7 +64,7 @@ const j = /* @__PURE__ */ I({
64
64
  dir: String
65
65
  },
66
66
  created() {
67
- this._blurTimeout = null, this._anchor = l(), this.wrapper = null, this.mainButton = null, this.guid = l(), this.buttonsData = [], w(P);
67
+ this._blurTimeout = null, this._anchor = h(), this.wrapper = null, this.mainButton = null, this.guid = h(), this.buttonsData = [], x(K);
68
68
  },
69
69
  mounted() {
70
70
  this.mainButton = this.$refs[this._anchor], (this.$props.dir === void 0 && this.isRtl() || this.computedOpened) && this.$forceUpdate();
@@ -88,73 +88,71 @@ const j = /* @__PURE__ */ I({
88
88
  },
89
89
  setup() {
90
90
  return {
91
- kendoAnchorRef: O(null)
91
+ kendoAnchorRef: I(null)
92
92
  };
93
93
  },
94
94
  render() {
95
95
  const t = this.isRtl(), e = t ? "rtl" : void 0, {
96
- tabIndex: i,
96
+ tabIndex: s,
97
97
  disabled: u
98
- } = this.$props, p = x(this);
98
+ } = this.$props, p = D(this);
99
99
  this.buttonsData = this.$props.items;
100
- const g = function() {
100
+ const m = function() {
101
101
  const {
102
102
  item: n,
103
103
  itemRender: c,
104
104
  textField: C
105
- } = this.$props, a = this.buttonsData.length;
106
- return a > 0 ? this.buttonsData.map(function(d, o) {
107
- const y = typeof d != "string" ? {
108
- ...d,
109
- render: f.call(this, d.render, m.call(this))
110
- } : d;
111
- return r(v, {
112
- dataItem: y,
105
+ } = this.$props;
106
+ return this.buttonsData.length > 0 ? this.buttonsData.map(function(r, d) {
107
+ const b = typeof r != "string" ? {
108
+ ...r,
109
+ render: l.call(this, r.render, f.call(this))
110
+ } : r;
111
+ return o(S, {
112
+ dataItem: b,
113
113
  textField: C,
114
- focused: this.focusedIndex === o,
114
+ focused: this.focusedIndex === d,
115
115
  onClick: this.onItemClick,
116
116
  onDown: this.onItemDown,
117
- render: f.call(this, c, m.call(this)),
117
+ render: l.call(this, c, f.call(this)),
118
118
  item: n,
119
- index: o,
120
- key: o,
121
- id: `${this.guid}-${o}`,
122
- first: o === 0,
123
- last: o === a - 1
119
+ index: d,
120
+ key: d,
121
+ id: `${this.guid}-${d}`
124
122
  }, null);
125
123
  }, this) : null;
126
- }, $ = function() {
124
+ }, g = function() {
127
125
  const {
128
126
  popupSettings: n = {},
129
127
  size: c
130
128
  } = this.$props;
131
- return r(B, {
129
+ return o(v, {
132
130
  anchor: this._anchor,
133
131
  show: this.computedOpened,
134
132
  animate: n.animate,
135
- popupClass: h("k-menu-popup", n.popupClass),
136
- anchorAlign: n.anchorAlign || K(t),
137
- popupAlign: n.popupAlign || E(t),
133
+ popupClass: a("k-menu-popup", n.popupClass),
134
+ anchorAlign: n.anchorAlign || E(t),
135
+ popupAlign: n.popupAlign || B(t),
138
136
  style: t ? {
139
137
  direction: "rtl"
140
138
  } : void 0
141
139
  }, {
142
- default: () => [r("ul", {
140
+ default: () => [o("ul", {
143
141
  class: "k-menu-group",
144
142
  role: "menu",
145
143
  id: this.guid
146
- }, [g.call(this)])]
144
+ }, [m.call(this)])]
147
145
  });
148
- }, b = this.$props.text || p ? {
146
+ }, $ = this.$props.text || p ? {
149
147
  default: () => [this.$props.text, p]
150
148
  } : {};
151
- return r("div", {
149
+ return o("div", {
152
150
  class: this.wrapperClass,
153
151
  onKeydown: this.onKeyDown,
154
152
  onFocusin: this.onFocus,
155
153
  onFocusout: this.onBlur,
156
154
  dir: e
157
- }, [r(k, {
155
+ }, [o(O, {
158
156
  size: this.$props.size,
159
157
  rounded: this.$props.rounded,
160
158
  fillMode: this.$props.fillMode,
@@ -162,12 +160,12 @@ const j = /* @__PURE__ */ I({
162
160
  onClick: this.onClickMainButton,
163
161
  onMousedown: this.mouseDown,
164
162
  disabled: u || void 0,
165
- tabIndex: i,
163
+ tabIndex: s,
166
164
  accessKey: this.$props.accessKey,
167
165
  icon: this.$props.icon,
168
166
  svgIcon: this.$props.svgIcon,
169
167
  iconClass: this.$props.iconClass,
170
- class: h("k-menu-button", this.$props.buttonClass),
168
+ class: a("k-menu-button", this.$props.buttonClass),
171
169
  imageUrl: this.$props.imageUrl,
172
170
  dir: e,
173
171
  ref: this._anchor,
@@ -177,7 +175,7 @@ const j = /* @__PURE__ */ I({
177
175
  "aria-label": this.$props.ariaLabel || (this.$props.svgIcon || this.$props.icon || this.$props.iconClass ? "Menu" : void 0),
178
176
  "aria-controls": this.computedOpened ? this.guid : void 0,
179
177
  "aria-activedescendant": this.computedOpened && this.focusedIndex !== void 0 && this.focusedIndex >= 0 ? `${this.guid}-${this.focusedIndex}` : void 0
180
- }, b), $.call(this)]);
178
+ }, $), g.call(this)]);
181
179
  },
182
180
  methods: {
183
181
  element() {
@@ -185,14 +183,14 @@ const j = /* @__PURE__ */ I({
185
183
  },
186
184
  onKeyDown(t) {
187
185
  if (t.altKey) {
188
- !this.computedOpened && t.keyCode === s.down ? (this.dispatchPopupEvent(t, !0), this.focusedIndex = 0, this.currentOpened = !0) : this.computedOpened && t.keyCode === s.up && (this.dispatchPopupEvent(t, !1), this.focusedIndex = -1, this.currentOpened = !1);
186
+ !this.computedOpened && t.keyCode === i.down ? (this.dispatchPopupEvent(t, !0), this.focusedIndex = 0, this.currentOpened = !0) : this.computedOpened && t.keyCode === i.up && (this.dispatchPopupEvent(t, !1), this.focusedIndex = -1, this.currentOpened = !1);
189
187
  return;
190
188
  }
191
- if (t.keyCode === s.enter || t.keyCode === s.space ? (this.focusedIndex !== void 0 && this.focusedIndex >= 0 && this.dispatchClickEvent(t, this.focusedIndex), t.preventDefault(), this.focusedIndex = this.computedOpened ? -1 : 0, this.currentOpened = !this.computedOpened, this.dispatchPopupEvent(t, this.currentOpened)) : this.computedOpened && t.keyCode === s.esc && (this.focusedIndex = -1, this.currentOpened = !1, this.dispatchPopupEvent(t, this.currentOpened)), this.computedOpened) {
192
- const e = S(this.focusedIndex, t.keyCode, t.altKey, this.buttonsData.length);
189
+ if (t.keyCode === i.enter || t.keyCode === i.space ? (this.focusedIndex !== void 0 && this.focusedIndex >= 0 && this.dispatchClickEvent(t, this.focusedIndex), t.preventDefault(), this.focusedIndex = this.computedOpened ? -1 : 0, this.currentOpened = !this.computedOpened, this.dispatchPopupEvent(t, this.currentOpened)) : this.computedOpened && t.keyCode === i.esc && (this.focusedIndex = -1, this.currentOpened = !1, this.dispatchPopupEvent(t, this.currentOpened)), this.computedOpened) {
190
+ const e = w(this.focusedIndex, t.keyCode, t.altKey, this.buttonsData.length);
193
191
  this.focusedIndex = e;
194
- const i = t.keyCode === s.up || t.keyCode === s.down || t.keyCode === s.left || t.keyCode === s.right;
195
- !t.altKey && i && t.preventDefault();
192
+ const s = t.keyCode === i.up || t.keyCode === i.down || t.keyCode === i.left || t.keyCode === i.right;
193
+ !t.altKey && s && t.preventDefault();
196
194
  }
197
195
  },
198
196
  onFocus(t) {
@@ -206,7 +204,7 @@ const j = /* @__PURE__ */ I({
206
204
  createBlurTimeout(t) {
207
205
  const e = this;
208
206
  this._blurTimeout = setTimeout(() => {
209
- D && document.activeElement !== e.$el && (e.focused = !1, e.focusedIndex = -1, e.$emit("blur", {
207
+ k && document.activeElement !== e.$el && (e.focused = !1, e.focusedIndex = -1, e.$emit("blur", {
210
208
  event: t
211
209
  }), e.computedOpened && (e.currentOpened = !1, e.dispatchPopupEvent(t, !1)));
212
210
  }, 200);
@@ -234,10 +232,10 @@ const j = /* @__PURE__ */ I({
234
232
  this.currentOpened = e, this.focused = !0, this.focusedIndex = e ? 0 : -1, this.dispatchPopupEvent(t, e);
235
233
  },
236
234
  dispatchPopupEvent(t, e) {
237
- const i = {
235
+ const s = {
238
236
  event: t
239
237
  };
240
- this.$emit(e ? "open" : "close", i);
238
+ this.$emit(e ? "open" : "close", s);
241
239
  },
242
240
  isItemDisabled(t) {
243
241
  return this.buttonsData[t] ? this.buttonsData[t].disabled : this.$props.disabled;
@@ -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 o=require("vue"),l=require("../Button.js"),s=require("@progress/kendo-vue-common"),C=require("./ButtonItem.js"),$=require("./utils/navigation.js"),k=require("@progress/kendo-vue-popup"),h=require("./utils/popup.js"),O=require("@progress/kendo-svg-icons"),S=require("../package-metadata.js"),I=o.defineComponent({name:"KendoSplitButton",emits:{focus:e=>!0,blur:e=>!0,buttonclick:e=>!0,itemclick:e=>!0,open:e=>!0,close:e=>!0},props:{accessKey:String,ariaLabel:String,text:String,items:{type:Array,default:function(){return[]}},textField:String,tabIndex:Number,disabled:Boolean,icon:String,svgIcon:Object,size:String,rounded:String,fillMode:{type:String,validator:function(e){return["flat","link","outline","solid"].includes(e)}},themeColor:{type:String,validator:function(e){return["base","dark","error","info","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(){return{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(S.packageMetadata)},mounted(){this.mainButton=this.$refs[this._anchor],(this.$props.dir===void 0&&this.isRtl()||this.computedOpened)&&this.$forceUpdate()},updated(){this.focused&&this.element()&&(this.mainButton=this.$refs[this._anchor],this.mainButton.focus())},computed:{computedOpened(){return this.$props.opened===void 0?this.currentOpened:this.$props.opened},wrapperClass(){return{"k-split-button":!0,"k-button-group":!0,"k-focus":this.focused}}},setup(){return{kendoAnchorRef:o.ref(null)}},render(){this.buttonsData=this.$props.items;const e=this.isRtl(),t=e?"rtl":void 0,{tabIndex:i,disabled:u}=this.$props,c=s.getDefaultSlots(this),f=function(){const{item:n,itemRender:p,textField:b}=this.$props,a=this.buttonsData.length;return a>0?this.buttonsData.map(function(d,r){const y=typeof d!="string"?{...d,render:s.templateRendering.call(this,d.render,s.getListeners.call(this))}:d;return o.createVNode(C.ButtonItem,{role:"menuitem",dataItem:y,textField:b,focused:this.focusedIndex===r,onClick:this.onItemClick,onDown:this.onItemDown,render:s.templateRendering.call(this,p,s.getListeners.call(this)),item:n,key:r,index:r,id:`${this.guid}-${r}`,first:r===0,last:r===a-1},null)},this):null},m=function(){const{popupSettings:n={},size:p}=this.$props;return o.createVNode(k.Popup,{anchor:this._anchor,show:this.computedOpened,animate:n.animate,popupClass:s.classNames("k-menu-popup",n.popupClass),anchorAlign:n.anchorAlign||h.getAnchorAlign(e),popupAlign:n.popupAlign||h.getPopupAlign(e),style:e?{direction:"rtl"}:void 0},{default:()=>[o.createVNode("ul",{class:"k-menu-group",role:"menu",id:this.guid},[f.call(this)])]})},g=this.$props.text||c?{default:()=>[this.$props.text,c]}:{};return o.createVNode("div",{class:this.wrapperClass,onKeydown:this.onKeyDown,onFocusin:this.onFocus,onFocusout:this.onBlur,dir:t},[o.createVNode(l.Button,{size:this.$props.size,rounded:this.$props.rounded,fillMode:this.$props.fillMode,themeColor:this.$props.themeColor,onClick:n=>this.onItemClick(n,-1),disabled:u||void 0,tabIndex:i,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:t,id:this._anchor,ref:this._anchor,type:"button","aria-disabled":u||void 0,"aria-label":this.$props.ariaLabel||(!this.$props.text&&!c&&(this.$props.svgIcon||this.$props.icon||this.$props.iconClass)?"Action":void 0)},g),o.createVNode(l.Button,{svgIcon:O.chevronDownIcon,size:this.$props.size,rounded:this.$props.rounded,fillMode:this.$props.fillMode,themeColor:this.$props.themeColor,icon:"chevron-down",class:"k-split-button-arrow",disabled:u||void 0,tabIndex:-1,onClick:this.onSplitPartClick,onMousedown:this.onDownSplitPart,onPointerdown:this.onDownSplitPart,dir:t,"aria-label":"Toggle dropdown","aria-expanded":this.computedOpened,"aria-controls":this.computedOpened?this.guid:void 0},null),m.call(this)])},methods:{element(){return this.mainButton},onKeyDown(e){if(e.altKey){!this.computedOpened&&e.keyCode===s.Keys.down?(this.dispatchPopupEvent(e,!0),this.focusedIndex=0,this.currentOpened=!0):this.computedOpened&&e.keyCode===s.Keys.up&&(this.dispatchPopupEvent(e,!1),this.focusedIndex=-1,this.currentOpened=!1);return}let t;if(e.keyCode===s.Keys.enter||e.keyCode===s.Keys.space?(e.preventDefault(),this.dispatchClickEvent(e,this.focusedIndex),this.focusedIndex!==void 0&&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=$(this.focusedIndex,e.keyCode,e.altKey,this.buttonsData.length);i!==this.focusedIndex&&(t=t||{},t.focusedIndex=i);const u=e.keyCode===s.Keys.up||e.keyCode===s.Keys.down||e.keyCode===s.Keys.left||e.keyCode===s.Keys.right;!e.altKey&&u&&e.preventDefault()}t&&(this.focusedIndex=t.focusedIndex,this.focused=t.focused,t.currentOpened!==void 0&&(this.currentOpened=t.currentOpened))},onFocus(e){this.focused||(this.$emit("focus",{event:e}),this.focused=!0),this.focusedIndex=-1,clearTimeout(this._blurTimeout)},onItemClick(e,t){const i=this.computedOpened;i&&(this.focusedIndex=0,this.currentOpened=!1),this.dispatchClickEvent(e,t),i&&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",{event:e}),t.computedOpened&&(t.currentOpened=!1,t.dispatchPopupEvent(e,!1)))},200)},dispatchClickEvent(e,t){this.isItemDisabled(t)||(t===-1?this.$emit("buttonclick",{event:e}):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){const i={event:e};this.$emit(t?"open":"close",i)},isItemDisabled(e){return this.buttonsData[e]?this.buttonsData[e].disabled:this.$props.disabled},isRtl(){return this.$props.dir!==void 0?this.$props.dir==="rtl":!!this.$el&&getComputedStyle(this.$el).direction==="rtl"}}});exports.SplitButton=I;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),a=require("../Button.js"),i=require("@progress/kendo-vue-common"),y=require("./ButtonItem.js"),C=require("./utils/navigation.js"),$=require("@progress/kendo-vue-popup"),l=require("./utils/popup.js"),k=require("@progress/kendo-svg-icons"),O=require("../package-metadata.js"),S=o.defineComponent({name:"KendoSplitButton",emits:{focus:e=>!0,blur:e=>!0,buttonclick:e=>!0,itemclick:e=>!0,open:e=>!0,close:e=>!0},props:{accessKey:String,ariaLabel:String,text:String,items:{type:Array,default:function(){return[]}},textField:String,tabIndex:Number,disabled:Boolean,icon:String,svgIcon:Object,size:String,rounded:String,fillMode:{type:String,validator:function(e){return["flat","link","outline","solid"].includes(e)}},themeColor:{type:String,validator:function(e){return["base","dark","error","info","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(){return{focused:!1,focusedIndex:-1,currentOpened:!1}},created(){this._blurTimeout=null,this._anchor=i.guid(),this.mainButton=null,this.guid=i.guid(),this.buttonsData=[],i.validatePackage(O.packageMetadata)},mounted(){this.mainButton=this.$refs[this._anchor],(this.$props.dir===void 0&&this.isRtl()||this.computedOpened)&&this.$forceUpdate()},updated(){this.focused&&this.element()&&(this.mainButton=this.$refs[this._anchor],this.mainButton.focus())},computed:{computedOpened(){return this.$props.opened===void 0?this.currentOpened:this.$props.opened},wrapperClass(){return{"k-split-button":!0,"k-button-group":!0,"k-focus":this.focused}}},setup(){return{kendoAnchorRef:o.ref(null)}},render(){this.buttonsData=this.$props.items;const e=this.isRtl(),t=e?"rtl":void 0,{tabIndex:s,disabled:r}=this.$props,c=i.getDefaultSlots(this),h=function(){const{item:n,itemRender:p,textField:g}=this.$props;return this.buttonsData.length>0?this.buttonsData.map(function(u,d){const b=typeof u!="string"?{...u,render:i.templateRendering.call(this,u.render,i.getListeners.call(this))}:u;return o.createVNode(y.ButtonItem,{role:"menuitem",dataItem:b,textField:g,focused:this.focusedIndex===d,onClick:this.onItemClick,onDown:this.onItemDown,render:i.templateRendering.call(this,p,i.getListeners.call(this)),item:n,key:d,index:d,id:`${this.guid}-${d}`},null)},this):null},f=function(){const{popupSettings:n={},size:p}=this.$props;return o.createVNode($.Popup,{anchor:this._anchor,show:this.computedOpened,animate:n.animate,popupClass:i.classNames("k-menu-popup",n.popupClass),anchorAlign:n.anchorAlign||l.getAnchorAlign(e),popupAlign:n.popupAlign||l.getPopupAlign(e),style:e?{direction:"rtl"}:void 0},{default:()=>[o.createVNode("ul",{class:"k-menu-group",role:"menu",id:this.guid},[h.call(this)])]})},m=this.$props.text||c?{default:()=>[this.$props.text,c]}:{};return o.createVNode("div",{class:this.wrapperClass,onKeydown:this.onKeyDown,onFocusin:this.onFocus,onFocusout:this.onBlur,dir:t},[o.createVNode(a.Button,{size:this.$props.size,rounded:this.$props.rounded,fillMode:this.$props.fillMode,themeColor:this.$props.themeColor,onClick:n=>this.onItemClick(n,-1),disabled:r||void 0,tabIndex:s,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:t,id:this._anchor,ref:this._anchor,type:"button","aria-disabled":r||void 0,"aria-label":this.$props.ariaLabel||(!this.$props.text&&!c&&(this.$props.svgIcon||this.$props.icon||this.$props.iconClass)?"Action":void 0)},m),o.createVNode(a.Button,{svgIcon:k.chevronDownIcon,size:this.$props.size,rounded:this.$props.rounded,fillMode:this.$props.fillMode,themeColor:this.$props.themeColor,icon:"chevron-down",class:"k-split-button-arrow",disabled:r||void 0,tabIndex:-1,onClick:this.onSplitPartClick,onMousedown:this.onDownSplitPart,onPointerdown:this.onDownSplitPart,dir:t,"aria-label":"Toggle dropdown","aria-expanded":this.computedOpened,"aria-controls":this.computedOpened?this.guid:void 0},null),f.call(this)])},methods:{element(){return this.mainButton},onKeyDown(e){if(e.altKey){!this.computedOpened&&e.keyCode===i.Keys.down?(this.dispatchPopupEvent(e,!0),this.focusedIndex=0,this.currentOpened=!0):this.computedOpened&&e.keyCode===i.Keys.up&&(this.dispatchPopupEvent(e,!1),this.focusedIndex=-1,this.currentOpened=!1);return}let t;if(e.keyCode===i.Keys.enter||e.keyCode===i.Keys.space?(e.preventDefault(),this.dispatchClickEvent(e,this.focusedIndex),this.focusedIndex!==void 0&&this.focusedIndex>=0&&(t={focusedIndex:this.computedOpened?-1:0,currentOpened:!this.computedOpened},this.dispatchPopupEvent(e,t.currentOpened))):this.computedOpened&&e.keyCode===i.Keys.esc&&(t={focusedIndex:-1,currentOpened:!1},this.dispatchPopupEvent(e,t.currentOpened)),this.computedOpened){const s=C(this.focusedIndex,e.keyCode,e.altKey,this.buttonsData.length);s!==this.focusedIndex&&(t=t||{},t.focusedIndex=s);const r=e.keyCode===i.Keys.up||e.keyCode===i.Keys.down||e.keyCode===i.Keys.left||e.keyCode===i.Keys.right;!e.altKey&&r&&e.preventDefault()}t&&(this.focusedIndex=t.focusedIndex,this.focused=t.focused,t.currentOpened!==void 0&&(this.currentOpened=t.currentOpened))},onFocus(e){this.focused||(this.$emit("focus",{event:e}),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(()=>{i.canUseDOM&&document.activeElement!==t.mainButton&&(t.focused=!1,t.focusedIndex=-1,t.$emit("blur",{event:e}),t.computedOpened&&(t.currentOpened=!1,t.dispatchPopupEvent(e,!1)))},200)},dispatchClickEvent(e,t){this.isItemDisabled(t)||(t===-1?this.$emit("buttonclick",{event:e}):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){const s={event:e};this.$emit(t?"open":"close",s)},isItemDisabled(e){return this.buttonsData[e]?this.buttonsData[e].disabled:this.$props.disabled},isRtl(){return this.$props.dir!==void 0?this.$props.dir==="rtl":!!this.$el&&getComputedStyle(this.$el).direction==="rtl"}}});exports.SplitButton=S;
@@ -5,16 +5,16 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- import { defineComponent as y, createVNode as r, ref as O } from "vue";
9
- import { Button as a } from "../Button.mjs";
10
- import { canUseDOM as I, Keys as s, getDefaultSlots as S, guid as h, validatePackage as D, classNames as w, templateRendering as f, getListeners as m } from "@progress/kendo-vue-common";
8
+ import { defineComponent as k, createVNode as o, ref as y } from "vue";
9
+ import { Button as l } from "../Button.mjs";
10
+ import { canUseDOM as O, Keys as s, getDefaultSlots as I, guid as a, validatePackage as S, classNames as D, templateRendering as h, getListeners as f } from "@progress/kendo-vue-common";
11
11
  import { ButtonItem as x } from "./ButtonItem.mjs";
12
- import v from "./utils/navigation.mjs";
13
- import { Popup as P } from "@progress/kendo-vue-popup";
14
- import { getPopupAlign as B, getAnchorAlign as E } from "./utils/popup.mjs";
15
- import { chevronDownIcon as K } from "@progress/kendo-svg-icons";
16
- import { packageMetadata as A } from "../package-metadata.mjs";
17
- const L = /* @__PURE__ */ y({
12
+ import w from "./utils/navigation.mjs";
13
+ import { Popup as v } from "@progress/kendo-vue-popup";
14
+ import { getPopupAlign as P, getAnchorAlign as B } from "./utils/popup.mjs";
15
+ import { chevronDownIcon as E } from "@progress/kendo-svg-icons";
16
+ import { packageMetadata as K } from "../package-metadata.mjs";
17
+ const L = /* @__PURE__ */ k({
18
18
  name: "KendoSplitButton",
19
19
  emits: {
20
20
  focus: (t) => !0,
@@ -74,7 +74,7 @@ const L = /* @__PURE__ */ y({
74
74
  };
75
75
  },
76
76
  created() {
77
- this._blurTimeout = null, this._anchor = h(), this.mainButton = null, this.guid = h(), this.buttonsData = [], D(A);
77
+ this._blurTimeout = null, this._anchor = a(), this.mainButton = null, this.guid = a(), this.buttonsData = [], S(K);
78
78
  },
79
79
  mounted() {
80
80
  this.mainButton = this.$refs[this._anchor], (this.$props.dir === void 0 && this.isRtl() || this.computedOpened) && this.$forceUpdate();
@@ -96,79 +96,77 @@ const L = /* @__PURE__ */ y({
96
96
  },
97
97
  setup() {
98
98
  return {
99
- kendoAnchorRef: O(null)
99
+ kendoAnchorRef: y(null)
100
100
  };
101
101
  },
102
102
  render() {
103
103
  this.buttonsData = this.$props.items;
104
104
  const t = this.isRtl(), e = t ? "rtl" : void 0, {
105
105
  tabIndex: i,
106
- disabled: d
107
- } = this.$props, p = S(this), g = function() {
106
+ disabled: r
107
+ } = this.$props, p = I(this), m = function() {
108
108
  const {
109
109
  item: n,
110
110
  itemRender: c,
111
111
  textField: C
112
- } = this.$props, l = this.buttonsData.length;
113
- return l > 0 ? this.buttonsData.map(function(u, o) {
114
- const k = typeof u != "string" ? {
115
- ...u,
116
- render: f.call(this, u.render, m.call(this))
117
- } : u;
118
- return r(x, {
112
+ } = this.$props;
113
+ return this.buttonsData.length > 0 ? this.buttonsData.map(function(d, u) {
114
+ const $ = typeof d != "string" ? {
115
+ ...d,
116
+ render: h.call(this, d.render, f.call(this))
117
+ } : d;
118
+ return o(x, {
119
119
  role: "menuitem",
120
- dataItem: k,
120
+ dataItem: $,
121
121
  textField: C,
122
- focused: this.focusedIndex === o,
122
+ focused: this.focusedIndex === u,
123
123
  onClick: this.onItemClick,
124
124
  onDown: this.onItemDown,
125
- render: f.call(this, c, m.call(this)),
125
+ render: h.call(this, c, f.call(this)),
126
126
  item: n,
127
- key: o,
128
- index: o,
129
- id: `${this.guid}-${o}`,
130
- first: o === 0,
131
- last: o === l - 1
127
+ key: u,
128
+ index: u,
129
+ id: `${this.guid}-${u}`
132
130
  }, null);
133
131
  }, this) : null;
134
- }, b = function() {
132
+ }, g = function() {
135
133
  const {
136
134
  popupSettings: n = {},
137
135
  size: c
138
136
  } = this.$props;
139
- return r(P, {
137
+ return o(v, {
140
138
  anchor: this._anchor,
141
139
  show: this.computedOpened,
142
140
  animate: n.animate,
143
- popupClass: w("k-menu-popup", n.popupClass),
144
- anchorAlign: n.anchorAlign || E(t),
145
- popupAlign: n.popupAlign || B(t),
141
+ popupClass: D("k-menu-popup", n.popupClass),
142
+ anchorAlign: n.anchorAlign || B(t),
143
+ popupAlign: n.popupAlign || P(t),
146
144
  style: t ? {
147
145
  direction: "rtl"
148
146
  } : void 0
149
147
  }, {
150
- default: () => [r("ul", {
148
+ default: () => [o("ul", {
151
149
  class: "k-menu-group",
152
150
  role: "menu",
153
151
  id: this.guid
154
- }, [g.call(this)])]
152
+ }, [m.call(this)])]
155
153
  });
156
- }, $ = this.$props.text || p ? {
154
+ }, b = this.$props.text || p ? {
157
155
  default: () => [this.$props.text, p]
158
156
  } : {};
159
- return r("div", {
157
+ return o("div", {
160
158
  class: this.wrapperClass,
161
159
  onKeydown: this.onKeyDown,
162
160
  onFocusin: this.onFocus,
163
161
  onFocusout: this.onBlur,
164
162
  dir: e
165
- }, [r(a, {
163
+ }, [o(l, {
166
164
  size: this.$props.size,
167
165
  rounded: this.$props.rounded,
168
166
  fillMode: this.$props.fillMode,
169
167
  themeColor: this.$props.themeColor,
170
168
  onClick: (n) => this.onItemClick(n, -1),
171
- disabled: d || void 0,
169
+ disabled: r || void 0,
172
170
  tabIndex: i,
173
171
  accessKey: this.$props.accessKey,
174
172
  class: this.$props.buttonClass,
@@ -180,17 +178,17 @@ const L = /* @__PURE__ */ y({
180
178
  id: this._anchor,
181
179
  ref: this._anchor,
182
180
  type: "button",
183
- "aria-disabled": d || void 0,
181
+ "aria-disabled": r || void 0,
184
182
  "aria-label": this.$props.ariaLabel || (!this.$props.text && !p && (this.$props.svgIcon || this.$props.icon || this.$props.iconClass) ? "Action" : void 0)
185
- }, $), r(a, {
186
- svgIcon: K,
183
+ }, b), o(l, {
184
+ svgIcon: E,
187
185
  size: this.$props.size,
188
186
  rounded: this.$props.rounded,
189
187
  fillMode: this.$props.fillMode,
190
188
  themeColor: this.$props.themeColor,
191
189
  icon: "chevron-down",
192
190
  class: "k-split-button-arrow",
193
- disabled: d || void 0,
191
+ disabled: r || void 0,
194
192
  tabIndex: -1,
195
193
  onClick: this.onSplitPartClick,
196
194
  onMousedown: this.onDownSplitPart,
@@ -199,7 +197,7 @@ const L = /* @__PURE__ */ y({
199
197
  "aria-label": "Toggle dropdown",
200
198
  "aria-expanded": this.computedOpened,
201
199
  "aria-controls": this.computedOpened ? this.guid : void 0
202
- }, null), b.call(this)]);
200
+ }, null), g.call(this)]);
203
201
  },
204
202
  methods: {
205
203
  element() {
@@ -218,10 +216,10 @@ const L = /* @__PURE__ */ y({
218
216
  focusedIndex: -1,
219
217
  currentOpened: !1
220
218
  }, this.dispatchPopupEvent(t, e.currentOpened)), this.computedOpened) {
221
- const i = v(this.focusedIndex, t.keyCode, t.altKey, this.buttonsData.length);
219
+ const i = w(this.focusedIndex, t.keyCode, t.altKey, this.buttonsData.length);
222
220
  i !== this.focusedIndex && (e = e || {}, e.focusedIndex = i);
223
- const d = t.keyCode === s.up || t.keyCode === s.down || t.keyCode === s.left || t.keyCode === s.right;
224
- !t.altKey && d && t.preventDefault();
221
+ const r = t.keyCode === s.up || t.keyCode === s.down || t.keyCode === s.left || t.keyCode === s.right;
222
+ !t.altKey && r && t.preventDefault();
225
223
  }
226
224
  e && (this.focusedIndex = e.focusedIndex, this.focused = e.focused, e.currentOpened !== void 0 && (this.currentOpened = e.currentOpened));
227
225
  },
@@ -240,7 +238,7 @@ const L = /* @__PURE__ */ y({
240
238
  createBlurTimeout(t) {
241
239
  const e = this;
242
240
  this._blurTimeout = setTimeout(() => {
243
- I && document.activeElement !== e.mainButton && (e.focused = !1, e.focusedIndex = -1, e.$emit("blur", {
241
+ O && document.activeElement !== e.mainButton && (e.focused = !1, e.focusedIndex = -1, e.$emit("blur", {
244
242
  event: t
245
243
  }), e.computedOpened && (e.currentOpened = !1, e.dispatchPopupEvent(t, !1)));
246
244
  }, 200);
@@ -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"),require("@progress/kendo-webspeech-common"),require("@progress/kendo-smartpaste-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","@progress/kendo-smartpaste-common"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).KendoVueButtons={},e.Vue,e.KendoVueCommon,e.KendoSVGIcons,e.KendoVuePopup,e.KendoVueIntl,e.KendoWebspeechCommon,e.KendoSmartpasteCommon)}(this,function(e,t,o,s,i,n,r,l){"use strict";const a=["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"],d={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"},c={name:"@progress/kendo-vue-buttons",productName:"Kendo UI for Vue",productCode:"KENDOUIVUE",productCodes:["KENDOUIVUE"],publishDate:1657089513,version:"10.1.0-develop.1",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=d,p=t.defineComponent({name:"KendoButton",emits:{click:e=>!0,mousedown:e=>!0,mouseup:e=>!0,pointerdown:e=>!0,pointerup:e=>!0,focus:e=>!0,blur:e=>!0,keypress:e=>!0,keydown:e=>!0,contextmenu:e=>!0},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},iconClass:{type:String,default:function(){}},imageUrl:{type:String,default:function(){}},imageAlt:String,disabled:{type:Boolean,default:void 0},size:String,rounded:String,fillMode:String,themeColor:String,tabIndex:Number,accessKey:String,id:String,type:String,role:String},created(){o.validatePackage(c),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:s,imageUrl:i,dir:n,svgIcon:r,size:l,rounded:a,fillMode:d,themeColor:c}=this.$props,p=void 0!==r||void 0!==t||void 0!==s||void 0!==i,h=o.getDefaultSlots(this);return{[u.button]:!0,[`k-button-${o.kendoThemeMaps.sizeMap[l]||l}`]:l,[`k-rounded-${o.kendoThemeMaps.roundedMap[a]||a}`]:a,"k-icon-button":!h&&p,"k-disabled":e,"k-selected":this.computedSelected,"k-rtl":"rtl"===n,[`k-button-${d}`]:d,[`k-button-${c}`]:c}}},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",{event:e})},handleBlur(e){this.disabled||this.$emit("blur",{event: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:s,svgIcon:i,iconClass:n,imageUrl:r,imageAlt:l,accessKey:a,tabIndex:d,id:c,type:u,disabled:p,role:h,iconSize:m}=this.$props,f=o.getDefaultSlots(this),g=f||void 0===i&&void 0===s&&void 0===n&&void 0===r||null==i||!i.name?void 0:i.name.charAt(0).toUpperCase()+i.name.slice(1);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||g,"aria-disabled":p||void 0,"aria-pressed":e?!!this.currentActive:void 0,accesskey:a,tabindex:d,id:c,type:u,role:h},[function(){if(r)return t.createVNode("img",{role:"presentation",class:"k-image",alt:l,src:r},null);if(s||i){const e=o.classNames("k-button-icon",n);return t.createVNode(o.Icon,{name:s,icon:i,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])])}}),h=t.defineComponent({name:"KendoButtonWrap",render(){return o.getDefaultSlots(this)[0]}}),m=d,f=t.defineComponent({name:"KendoButtonGroup",props:{disabled:{type:Boolean,default:void 0},width:String,dir:{type:String,default:function(){}}},created(){o.validatePackage(c)},render(){const e=o.getDefaultSlots(this),s=function(e,s,i,n){const r=o.classNames({[m["state-disabled"]]:this.$props.disabled,[m["group-start"]]:n?i:0===s,[m["group-end"]]:n?0===s:i});return t.h(h,{class:r,"aria-disabled":this.$props.disabled},function(){return[e]})},i=o.classNames([m["button-group"]],{"k-disabled":this.$props.disabled,[m["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:i},[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,i)=>this.isValidButton(e)?s.call(this,e,i,i===t-1,o):e)}.call(this,e)])},methods:{isValidButton(e){var t,o;return e.tag&&-1!==e.tag.toLowerCase().indexOf("button")||e.componentOptions&&-1!==(null==(t=e.componentOptions.tag)?void 0:t.toLowerCase().indexOf("button"))||(null==(o=e.type)?void 0:o.name)&&-1!==e.type.name.toLowerCase().indexOf("kendobutton")}}});let g=function(e){return e.next="next",e.prev="prev",e.current="current",e.reset="reset",e}({});let v=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}({}),k=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 s.xCircleIcon}},disabled:{type:Boolean,default:!1},icon:String,svgIcon:Object,selectedIcon:{type:String,default:function(){return"check"}},selectedSvgIcon:{type:Object,default:function(){return s.checkIcon}},size:String,rounded:String,fillMode:{type:String,validator:function(e){return["flat","outline","solid"].includes(e)}},themeColor:{type:String,validator:function(e){return["base","error","info","success","warning"].includes(e)}},dataItem:Object,selected:Boolean,ariaDescribedBy:String,role:{type:String,default:"button"},tabIndex:Number,ariaLabel:String,onMousedown:Function},emits:{click:e=>!0,keydown:e=>!0,blur:e=>!0,focus:e=>!0,remove:e=>!0},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(c)},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:k.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:v.remove,payload:this.$props.value,event:e}),this.handleDispatchFocus({type:g.reset,payload:this.$props.value,event:e}),this.handleDispatchSelection({type:k.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:g.prev,payload:this.$props.value,event:e});break;case o.Keys.right:this.handleDispatchFocus&&this.handleDispatchFocus({type:g.next,payload:this.$props.value,event:e});break;case o.Keys.enter:this.handleDispatchFocus&&this.handleDispatchSelection({type:k.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:g.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:s,themeColor:i,fillMode:n,look:r,avatar:l,icon:a,svgIcon:d,selectedIcon:c,selectedSvgIcon:u,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[s]||s}`]:s,[`k-chip-${n}`]:n,[`k-chip-${i}`]:i,"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||void 0,"aria-label":this.$props.ariaLabel,"aria-describedby":this.$props.ariaDescribedBy,onFocus:this.handleFocus,onBlur:this.handleBlur,onClick:this.handleClick,onKeydown:this.handleKeyDown,onMousedown:this.handleMouseDown},[this.currentSelected&&(c||u)&&t.createVNode(o.Icon,{name:o.getIconName(c),icon:u,size:"small"},null),(a||d)&&t.createVNode(o.Icon,{name:o.getIconName(a),icon:d,size:"small",class:"k-chip-icon"},null),l?l.imageUrl?f:g:null,t.createVNode("span",{class:"k-chip-content"},[this.$props.text&&t.createVNode("span",{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)])])])}}),$=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:String,rounded:String,fillMode:{type:String,validator:function(e){return["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},emits:{change:e=>!0,datachange:e=>!0},provide(){return{kendoSelection:this.currentValue,kendoFocused:this.currentFocused,kendoDataItems:this.computedDataItems,handleDispatchDataItems:this.handleDispatchDataItems,handleDispatchSelection:this.handleDispatchSelection,handleDispatchFocus:this.handleDispatchFocus}},created(){o.validatePackage(c),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 k.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 k.remove:return t.payload===e?null:e;default:return e}case b.multiple:switch(t.type){case k.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 k.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 g.next:return o===t.items.length-1?e:t.items[o+1];case g.prev:return 0===o?e:t.items[o-1];case g.current:return t.payload;case g.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 v.add:break;case v.remove:return e.filter(e=>e[t.valueField]!==t.payload);case v.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]),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 s=o.templateRendering.call(this,this.$props.chip,o.getListeners.call(this)),i=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:s,defaultRendering:i,additionalProps:{dataItem:e,key:e[this.$props.valueField],text:e[this.$props.textField],value:e[this.$props.valueField],size:this.$props.size}})},this)])}}),S=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:(e,t)=>!0,down:e=>!0},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:s,tabIndex:i,dataItem:n}=this.$props,{text:r,icon:l,svgIcon:a}=n;let d;const c=t.createVNode("li",{ref:o.setRef(this,"element"),id:s,class:this.itemClassNames,role:"menuitem",tabindex:o.getTabIndex(i,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:c,additionalProps:this.$props,additionalListeners:{click:this.handleClick}}),d}}),I="16px",C=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},w=(e,t)=>{const o={horizontal:t?"right":"left",vertical:"top"};return"end"===e.horizontal&&(o.horizontal=t?"left":"right"),o},D=(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"]),O=(e,t,o,s)=>{const i=t.horizontal,n=t.vertical;if(e){const r=o&&void 0!==o.x?C(o.x):I,l=o&&void 0!==o.x?`calc(50% + ${C(o.x)})`:"50%",a=o&&void 0!==o.y?C(o.y):I,d=o&&void 0!==o.y?`calc(50% + ${C(o.y)})`:"50%";e.style.setProperty(B(t,s),"center"===i?l:r),e.style.setProperty(N(t),"middle"===n?d:a),s&&(("top"===n||"bottom"===n)&&"start"===i&&e.style.setProperty("left","unset"),"middle"===n&&"end"===i&&e.style.setProperty("right","unset"),"middle"===n&&"start"===i&&e.style.setProperty("left","unset"))}},B=(e,t)=>{const{horizontal:o}=e;return{end:t?"left":"right",center:"left",start:t?"right":"left"}[o||"end"]},N=e=>({top:"top",middle:"top",bottom:"bottom"}[e.vertical||"bottom"]),F=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:void 0},popupSettings:{type:Object,default:function(){return{}}},rounded:String,fillMode:{type:String,validator:function(e){return["flat","link","outline","solid"].includes(e)}},size:String,themeColor:String},emits:{click:e=>!0,mousedown:e=>!0,mouseup:e=>!0,open:e=>!0,close:e=>!0,itemclick:e=>!0,focus:e=>!0,blur:e=>!0,keydown:e=>!0},data:()=>({currentOpened:!1,currentFocused:!1,focusedIndex:-1,currentDir:"ltr",isRtl:!1}),created(){o.validatePackage(c),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&&O(this.$el,this.$props.align,this.$props.alignOffset,this.isRtl)},updated(){O(this.$el,this.$props.align,this.$props.alignOffset,this.isRtl),this.currentFocused&&this.element&&this.element.focus()},computed:{buttonClassNames(){const{size:e,themeColor:t,fillMode:s,rounded:i,positionMode:n}=this.$props;return{"k-fab":!0,[`k-fab-${o.kendoThemeMaps.sizeMap[e]||e}`]:e,[`k-rounded-${o.kendoThemeMaps.roundedMap[i]||i}`]:i,[`k-fab-${s}`]:s,[`k-fab-${t}`]:t,"k-disabled":this.$props.disabled,"k-focus":this.currentFocused,"k-pos-absolute":"absolute"===n,"k-pos-fixed":"fixed"===n,[`k-${this.$props.align.vertical}-${this.$props.align.horizontal}`]:!!n}},computedOpened(){return void 0===this.$props.opened?this.currentOpened:this.$props.opened},rootClassNames(){}},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",{event:e})},handleBlur(e){this.currentFocused=!1,this.currentOpened=!1,this.focusedIndex=-1,this.$emit("blur",{event:e}),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,s=this.$props.items?this.$props.items.length-1:-1,i="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=s;break;case o.Keys.down:case o.Keys.right:e.preventDefault(),t<s&&!i&&(this.focusedIndex=t+1),t>0&&i&&(this.focusedIndex=t-1);break;case o.Keys.up:case o.Keys.left:e.preventDefault(),t>0&&!i&&(this.focusedIndex=t-1),t<s&&i&&(this.focusedIndex=t+1)}this.$emit("keydown",e,void 0)}},setup:()=>({chipRef:t.ref(null),kendoAnchorRef:t.ref(null)}),render(){const{align:e,disabled:s,icon:n,svgIcon:r,iconClass:l,id:a,items:d,text:c,tabIndex:u,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(i,n){return t.createVNode(S,{key:n,index:n,id:`${this.listId}-${n}`,disabled:s||i.disabled,focused:this.focusedIndex===n,dataItem:i,item:m,class:o.classNames(i.className,D(this.currentDir||"ltr",e.horizontal)),onClick:this.handleItemClick,onDown:this.handleItemDown},null)},this)},g=n&&!c,v=(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":void 0,type:"button","aria-disabled":s||void 0,"aria-expanded":d?this.computedOpened:void 0,"aria-haspopup":!!d||void 0,"aria-label":!c&&(n||r||l)?"Action":void 0,"aria-owns":d?this.listId:void 0,"aria-activedescendant":this.focusedIndex>=0&&d?`${this.listId}-${this.focusedIndex}`:void 0,tabindex:o.getTabIndex(u,s),accesskey:p,dir:this.currentDir,disabled:s,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,c&&t.createVNode("span",{class:"k-fab-text"},[c])]),t.createVNode(i.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||w(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?v+"px":void 0,paddingRight:g?v+"px":void 0}},[f.call(this)])]})])}}),V=t.defineComponent({name:"KendoButtonItem",emits:{click:(e,t)=>!0,down:(e,t)=>!0},props:{focused:Boolean,index:Number,item:Object,render:[String,Object,Function],dataItem:[String,Object],id:String,textField:String,role:String,first:Boolean,last:Boolean},computed:{wrapperClass(){return{"k-item":!0,"k-menu-item":!0,"k-first":this.$props.first,"k-last":this.$props.last,"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:s,render:i}=this.$props;return t.createVNode("li",{id:s,class:this.wrapperClass,onClick:this.onClick,onMousedown:this.onDown,onPointerdown:this.onDown,role:"menuitem","aria-disabled":e.disabled||void 0},[function(){const{textField:s,index:n}=this.$props,r=void 0!==e.text?e.text:s?e[s]: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||i,defaultRendering:l,additionalProps:{item:e,itemIndex:n,innerClass:this.innerClass,focused:this.focused}})}.call(this)])}}),T=(e,t,s,i)=>{if(s)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(i-1,e+1);default:return e}};function R(e){let t={horizontal:"left",vertical:"bottom"};return e&&(t.horizontal="right"),t}function M(e){let t={horizontal:"left",vertical:"top"};return e&&(t.horizontal="right"),t}const K=t.defineComponent({name:"KendoSplitButton",emits:{focus:e=>!0,blur:e=>!0,buttonclick:e=>!0,itemclick:e=>!0,open:e=>!0,close:e=>!0},props:{accessKey:String,ariaLabel:String,text:String,items:{type:Array,default:function(){return[]}},textField:String,tabIndex:Number,disabled:Boolean,icon:String,svgIcon:Object,size:String,rounded:String,fillMode:{type:String,validator:function(e){return["flat","link","outline","solid"].includes(e)}},themeColor:{type:String,validator:function(e){return["base","dark","error","info","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(c)},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:s,textField:i}=this.$props,n=this.buttonsData.length;return n>0?this.buttonsData.map(function(r,l){const a="string"!=typeof r?{...r,render:o.templateRendering.call(this,r.render,o.getListeners.call(this))}:r;return t.createVNode(V,{role:"menuitem",dataItem:a,textField:i,focused:this.focusedIndex===l,onClick:this.onItemClick,onDown:this.onItemDown,render:o.templateRendering.call(this,s,o.getListeners.call(this)),item:e,key:l,index:l,id:`${this.guid}-${l}`,first:0===l,last:l===n-1},null)},this):null},c=this.$props.text||a?{default:()=>[this.$props.text,a]}:{};return t.createVNode("div",{class:this.wrapperClass,onKeydown:this.onKeyDown,onFocusin:this.onFocus,onFocusout:this.onBlur,dir:n},[t.createVNode(p,{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||void 0,"aria-label":this.$props.ariaLabel||(this.$props.text||a||!(this.$props.svgIcon||this.$props.icon||this.$props.iconClass)?void 0:"Action")},c),t.createVNode(p,{svgIcon:s.chevronDownIcon,size:this.$props.size,rounded:this.$props.rounded,fillMode:this.$props.fillMode,themeColor:this.$props.themeColor,icon:"chevron-down",class:"k-split-button-arrow",disabled:l||void 0,tabIndex:-1,onClick:this.onSplitPartClick,onMousedown:this.onDownSplitPart,onPointerdown:this.onDownSplitPart,dir:n,"aria-label":"Toggle dropdown","aria-expanded":this.computedOpened,"aria-controls":this.computedOpened?this.guid:void 0},null),function(){const{popupSettings:s={},size:n}=this.$props;return t.createVNode(i.Popup,{anchor:this._anchor,show:this.computedOpened,animate:s.animate,popupClass:o.classNames("k-menu-popup",s.popupClass),anchorAlign:s.anchorAlign||R(e),popupAlign:s.popupAlign||M(e),style:e?{direction:"rtl"}:void 0},{default:()=>[t.createVNode("ul",{class:"k-menu-group",role:"menu",id:this.guid},[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 s=T(this.focusedIndex,e.keyCode,e.altKey,this.buttonsData.length);s!==this.focusedIndex&&(t=t||{},t.focusedIndex=s);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()}t&&(this.focusedIndex=t.focusedIndex,this.focused=t.focused,void 0!==t.currentOpened&&(this.currentOpened=t.currentOpened))},onFocus(e){this.focused||(this.$emit("focus",{event:e}),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",{event:e}),t.computedOpened&&(t.currentOpened=!1,t.dispatchPopupEvent(e,!1)))},200)},dispatchClickEvent(e,t){this.isItemDisabled(t)||(-1===t?this.$emit("buttonclick",{event:e}):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){const o={event:e};this.$emit(t?"open":"close",o)},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:"KendoDropDownButton",emits:{focus:e=>!0,blur:e=>!0,itemclick:e=>!0,open:e=>!0,close:e=>!0},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:String,rounded:String,fillMode:{type:String,validator:function(e){return["flat","link","outline","solid"].includes(e)}},themeColor:{type:String,validator:function(e){return["base","error","info","inverse","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(c)},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(){}},setup:()=>({kendoAnchorRef:t.ref(null)}),render(){const e=this.isRtl(),s=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:s,textField:i}=this.$props,n=this.buttonsData.length;return n>0?this.buttonsData.map(function(r,l){const a="string"!=typeof r?{...r,render:o.templateRendering.call(this,r.render,o.getListeners.call(this))}:r;return t.createVNode(V,{dataItem:a,textField:i,focused:this.focusedIndex===l,onClick:this.onItemClick,onDown:this.onItemDown,render:o.templateRendering.call(this,s,o.getListeners.call(this)),item:e,index:l,key:l,id:`${this.guid}-${l}`,first:0===l,last:l===n-1},null)},this):null},d=this.$props.text||l?{default:()=>[this.$props.text,l]}:{};return t.createVNode("div",{class:this.wrapperClass,onKeydown:this.onKeyDown,onFocusin:this.onFocus,onFocusout:this.onBlur,dir:s},[t.createVNode(p,{size:this.$props.size,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:o.classNames("k-menu-button",this.$props.buttonClass),imageUrl:this.$props.imageUrl,dir:s,ref:this._anchor,type:"button","aria-disabled":r||void 0,"aria-expanded":this.computedOpened,"aria-label":this.$props.ariaLabel||(this.$props.svgIcon||this.$props.icon||this.$props.iconClass?"Menu":void 0),"aria-controls":this.computedOpened?this.guid:void 0,"aria-activedescendant":this.computedOpened&&void 0!==this.focusedIndex&&this.focusedIndex>=0?`${this.guid}-${this.focusedIndex}`:void 0},d),function(){const{popupSettings:s={},size:n}=this.$props;return t.createVNode(i.Popup,{anchor:this._anchor,show:this.computedOpened,animate:s.animate,popupClass:o.classNames("k-menu-popup",s.popupClass),anchorAlign:s.anchorAlign||R(e),popupAlign:s.popupAlign||M(e),style:e?{direction:"rtl"}:void 0},{default:()=>[t.createVNode("ul",{class:"k-menu-group",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=T(this.focusedIndex,e.keyCode,e.altKey,this.buttonsData.length);this.focusedIndex=t;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()}},onFocus(e){this.focused||(this.focused=!0,this.$emit("focus",{event:e})),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",{event:e}),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){const o={event:e};this.$emit(t?"open":"close",o)},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}}}),z=t.defineComponent({name:"KendoToolbarItem",render:()=>t.createVNode("div",{class:"k-toolbar-separator k-separator"},null)}),A="prevArrow.title",E="nextArrow.title",L="moreButtonTitle.title",j={[A]:"Previous scroll button",[E]:"Next scroll button",[L]:"More button"},U=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:e=>!0},methods:{getScrollButtonTitle(){const{dir:e,type:t}=this.$props;return"rtl"!==e?"prev"===t?n.provideLocalizationService(this).toLanguageString(A,j[A]):n.provideLocalizationService(this).toLanguageString(E,j[E]):"prev"===t?n.provideLocalizationService(this).toLanguageString(E,j[E]):n.provideLocalizationService(this).toLanguageString(A,j[A])}},render(){const{disabled:e,type:i,scrollContentRef:n,buttonScrollSpeed:r,prevButton:l,nextButton:a}=this.$props;return t.createVNode("span",{class:o.classNames("k-button","k-icon-button",`k-toolbar-${i}`),title:this.getScrollButtonTitle(),"aria-hidden":!0,tabindex:e?-1:void 0,onClick:()=>{n&&r&&(n.scrollBy({left:"next"===i?r:-r,behavior:"smooth"}),this.$emit("contentscroll",i))}},[t.createVNode(o.SvgIcon,{icon:"prev"===i?s.chevronLeftIcon:s.chevronRightIcon,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:e=>!0},data:()=>({scrollContentRef:null}),mounted(){this.scrollContentRef=this.$refs.scrollContentRef},methods:{onContentScroll(e){this.$emit("contentscroll",e)}},render(){const{scrollButtons:e,buttonScrollSpeed:o,prevButton:s,nextButton:i,scrollButtonsPosition:n,dir:r,isScrollStartPosition:l,isScrollEndPosition:a,toolbarItems:d}=this.$props,c=(e,n)=>t.createVNode(U,{type:e,dir:r,disabled:n,scrollContentRef:this.scrollContentRef,buttonScrollSpeed:o,prevButton:s,nextButton:i,onContentscroll:this.onContentScroll},null),u="visible"===e||"auto"===e&&this.$props.isOverflowing;return t.createVNode(t.Fragment,null,[u&&"split"===n&&t.createVNode(t.Fragment,null,[c("rtl"!==r?"prev":"next",l),t.createVNode(z,{class:"k-toolbar-button-separator"},null)]),u&&"start"===n&&t.createVNode(t.Fragment,null,[c("rtl"!==r?"prev":"next",l),c("rtl"!==r?"next":"prev",a),t.createVNode(z,{class:"k-toolbar-button-separator"},null)]),t.createVNode("span",{class:"k-toolbar-items k-toolbar-items-scroll",ref:"scrollContentRef"},[d]),u&&"split"===n&&t.createVNode(t.Fragment,null,[t.createVNode(z,{class:"k-toolbar-button-separator"},null),c("rtl"!==r?"next":"prev",a)]),u&&"end"===n&&t.createVNode(t.Fragment,null,[t.createVNode(z,{class:"k-toolbar-button-separator"},null),c("rtl"!==r?"prev":"next",l),c("rtl"!==r?"next":"prev",a)])])}}),_=t.defineComponent({name:"ToolbarOverflowSection",props:{toolbarRef:Object,toolbarWidth:Number,fillMode:String,size:String,visibleTools:Array,overFlowTools:Array,opened:Boolean,allTools:Array},emits:{toggleoverflow:e=>!0},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:u}=this.$props;return t.createVNode(t.Fragment,null,[e&&[...l].splice(0,e.length),r.length>0&&t.createVNode(t.Fragment,null,[t.createVNode(z,{class:"k-toolbar-button-separator"},null),t.createVNode(p,{ref:"buttonRef",class:"k-toolbar-overflow-button",fillMode:"flat",svgIcon:s.moreHorizontalIcon,title:n.provideLocalizationService(this).toLanguageString(L,j[L]),onClick:this.handleClick},null),t.createVNode(i.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[u]} k-toolbar-items-list-${c}`},[e&&[...l].splice(e.length,l.length)])]})])])}}),q=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,validator:function(e){return["small","medium","large"].includes(e)}},fillMode:{type:String,validator:function(e){return["solid","flat","outline"].includes(e)}},ariaLabel:String,overflow:{type:String,default:void 0,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}},emits:{resize:e=>!0},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(c)},computed:{selectors(){return this.$props.buttons||a},wrapperClass(){const{size:e,fillMode:t,overflow:s,scrollButtons:i}=this.$props;return{"k-toolbar":!0,[`k-toolbar-${t}`]:t,[`k-toolbar-${o.kendoThemeMaps.sizeMap[e]||e}`]:e,"k-toolbar-scrollable":"scroll"===s,"k-toolbar-scrollable-overlay":"scroll"===s&&("hidden"===i||void 0===i),"k-toolbar-scrollable-start":"scroll"===s&&"hidden"===i&&this.isScrollStartPosition,"k-toolbar-scrollable-end":"scroll"===s&&"hidden"===i&&this.isScrollEndPosition,"k-toolbar-section":s&&"section"===s}}},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:s,scrollButtonsPosition:i,prevButton:n,nextButton:r,buttonScrollSpeed:l,dir:a,fillMode:d,size:c}=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:s,scrollButtonsPosition:i,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(_,{opened:this.overFlowOpened,toolbarRef:this.$refs.toolbar,toolbarWidth:this.offsetWidth,fillMode:d,size:c,visibleTools:this.visibleToolsRef,overFlowTools:this.overFlowToolsRef,onToggleoverflow:this.onToggleoverflow,allTools:this.defaultSlot},null),(!e||"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,s)=>{o.tabIndex=s===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 s=this.focusedIndex();e.keyCode===o.Keys.left?this.focusButton(s,s-1):this.focusButton(s,s+1)},focusButton(e,t){const{tabIndex:o}=this.$props,s=this.currentButtons[t];if(s){s.tabIndex=o,s.focus();const t=this.currentButtons[e];t&&(t.tabIndex=-1)}},initOverflow(e,t){if(!e)return;let o=200;const s=[],i=[];Array.from(e.children).forEach((e,t)=>{o+=Math.ceil(e.clientWidth),o<=this.$refs.toolbar.offsetWidth-50?s.push(this.visibleToolsRef[t]):i.push(this.visibleToolsRef[t])}),this.visibleToolsRef=s,this.overFlowToolsRef=i},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,s=parseInt(window.getComputedStyle(e).gap||"0",10),i=Array.from(e.children).reduce((e,t)=>e+=Math.ceil(t.clientWidth),0),n=Array.from(e.children).length,r=2*s;if(t=36+Number(i)+n*s+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+s*n/2.75){const e=[...this.overFlowToolsRef],t=e.shift();t&&this.lastToolbarWidthRef+s*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,s=t.offsetHeight;if(this.offsetWidth!==o||this.offsetHeight!==s){this.offsetWidth=o,this.offsetHeight=s;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,s;o="next"!==e&&(t.scrollLeft<=this.$props.buttonScrollSpeed||0===t.scrollLeft),s="prev"!==e&&(t.scrollLeft+t.clientWidth+this.$props.buttonScrollSpeed>=t.scrollWidth||t.scrollLeft+t.clientWidth===t.scrollWidth),this.isScrollStartPosition=!!o,this.isScrollEndPosition=!!s}else this.isScrollStartPosition=!0,this.isScrollEndPosition=!1},onToggleoverflow(e){this.overFlowOpened=e}}}),H=t.defineComponent({name:"KendoToolbarItem",methods:{element(){return this.$el}},render(){const e=o.getDefaultSlots(this);return t.createVNode("div",{class:"k-toolbar-item"},[e])}}),G=t.defineComponent({name:"KendoToolbarItem",render:()=>t.createVNode("span",{class:"k-spacer"},null)});let J=function(e){return e.WebSpeech="WebSpeech",e.None="None",e}({});const Q=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:J.WebSpeech},onStart:{type:Function},onResult:{type:Function},onEnd:{type:Function},onError:{type:Function},svgIcon:{type:Object,default:s.microphoneIcon},iconSize:{type:String},disabled:{type:Boolean,default:void 0},size:String,rounded:String,fillMode:String,themeColor:String,title:{type:String,default:"Speech to Text Button"},ariaLabel:{type:String,default:"Start speech recognition"}},setup(e,{emit:o,expose:s}){const i=t.ref(null),n=t.ref(!1),l=()=>e.integrationMode!==J.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=i.value)||e.start()),n.value=!0)},c=()=>{var e;n.value&&(l()&&(null==(e=i.value)||e.stop()),n.value=!1)},u=async()=>{n.value||(e.onStart&&await e.onStart(),d())},p=t=>{const s=t.results,i=s[s.length-1],n=Array.from(i).map(e=>({transcript:e.transcript,confidence:e.confidence})),r={isFinal:i.isFinal,alternatives:n};e.onResult&&e.onResult(r),o("result",r)},h=async()=>{n.value&&(e.onEnd&&await e.onEnd(),c())},m=t=>{n.value=!1;const s={errorMessage:t.error||t.errorMessage||"Unknown error"};e.onError&&e.onError(s),o("error",s)},f=()=>{var t;a&&e.integrationMode===J.WebSpeech&&(null!=(t=i.value)&&t.isActive()&&c(),i.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:u,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=i.value)&&e.isInActiveState&&c()}),s({start:d,stop:c,abort:()=>{var e;n.value&&l()&&(null==(e=i.value)||e.abort(),n.value=!1)},isActive:()=>{var e;return null==(e=i.value)?void 0:e.isActive()}}),{clickHandler:()=>{a&&(n.value?h():u())},isInActiveState:n}},render(){const{ariaLabel:e,svgIcon:o,fillMode:i,rounded:n,size:r,disabled:l,themeColor:a,iconSize:d,title:c}=this.$props,{className:u,style:h,id:m}=this.$attrs,f=t.computed(()=>["k-speech-to-text-button",u,{"k-listening":this.isInActiveState}]),g=t.computed(()=>this.isInActiveState?s.stopIcon:o||s.microphoneIcon);return t.createVNode(p,{id:m,style:h,class:f.value,onClick:this.clickHandler,svgIcon:g.value,iconSize:d,fillMode:i,rounded:n,size:r,themeColor:a,"aria-label":e,disabled:l,title:c},null)}}),X=t.defineComponent({name:"KendoSegmentedControl",emits:{change:e=>!0},props:{items:{type:Array,default:()=>[]},size:String,layoutMode:{type:String,default:"compact"},value:String,defaultValue:String,itemTemplate:[String,Function]},data(){return{interactionState:{selectedValue:this.$props.defaultValue,hoveredValue:void 0,focusedValue:void 0}}},computed:{selectedItemValue(){var e;return null!=(e=this.$props.value)?e:this.interactionState.selectedValue},sizeClass(){const e=this.$props.size;return e?o.kendoThemeMaps.sizeMap[e]:void 0},buttonClass(){return(e,t,s)=>o.classNames("k-segmented-control-button",{"k-selected":s,"k-hover":this.interactionState.hoveredValue===e&&!t,"k-focus":this.interactionState.focusedValue===e&&!t,"k-disabled":t})},iconClass:()=>(e,t)=>o.classNames("k-segmented-control-button-icon",{...e&&{[e]:t}})},watch:{selectedItemValue(){t.nextTick(()=>{this.updateThumbPosition()})}},created(){o.validatePackage(c),this._resizeObserver=null},mounted(){t.nextTick(()=>{this.updateThumbPosition()}),this._resizeObserver=new ResizeObserver(()=>{this.updateThumbPosition()});const e=this.$refs.element;e&&this._resizeObserver.observe(e)},beforeUnmount(){this._resizeObserver&&(this._resizeObserver.disconnect(),this._resizeObserver=null)},methods:{updateThumbPosition(){const e=this.$refs.element,t=this.$refs.thumb;if(!e||!t)return;const o=e.querySelector(".k-segmented-control-button.k-selected");if(!o)return;const s=e.offsetWidth,{offsetWidth:i,offsetLeft:n}=o,r=`${n}px`,l=s-n-i+"px";t.style.left!==r&&(t.style.left=r),t.style.right!==l&&(t.style.right=l)},updateState(e){this.interactionState={...this.interactionState,...e}},handleButtonClick(e,t){var o,s;if(!e.disabled){if(this.selectedItemValue===e.value)return void(null==(o=e.onClick)||o.call(e,t));void 0===this.$props.value&&e&&this.updateState({selectedValue:e.value}),this.$emit("change",e.value),null==(s=e.onClick)||s.call(e,t)}},handleMouseEnter(e,t,o,s){t||this.updateState({hoveredValue:e}),null==o||o(s)},handleMouseLeave(e,t){this.updateState({hoveredValue:void 0}),null==e||e(t)},handleFocus(e,t,o){this.updateState({focusedValue:e}),null==t||t(o)},handleBlur(e,t){this.updateState({focusedValue:void 0}),null==e||e(t)}},render(){const{items:e,layoutMode:s,itemTemplate:i}=this.$props,n=this.sizeClass,r=this.selectedItemValue,l=i?o.templateRendering.call(this,i,{}):void 0;return t.createVNode("div",{ref:"element",role:"group",class:o.classNames("k-segmented-control",n&&`k-segmented-control-${n}`,{"k-segmented-control-stretched":"stretch"===s})},[t.createVNode("div",{class:"k-segmented-control-thumb",ref:"thumb","aria-hidden":"true"},null),(e||[]).map(e=>{const{value:s,disabled:i,text:n,svgIcon:a,iconClassName:d,type:c="button",onMouseEnter:u,onMouseLeave:p,onFocus:h,onBlur:m,title:f,dir:g,"aria-label":v}=e,b=r===s;return t.createVNode("button",{key:s,type:c,class:this.buttonClass(s,i,b),disabled:i,"aria-disabled":i||void 0,"aria-pressed":b,title:f,dir:g,"aria-label":v,onClick:t=>this.handleButtonClick(e,t),onMouseenter:e=>this.handleMouseEnter(s,i,u,e),onMouseleave:e=>this.handleMouseLeave(p,e),onFocus:e=>this.handleFocus(s,h,e),onBlur:e=>this.handleBlur(m,e)},[o.getTemplate.call(this,{h:t.h,template:l,defaultRendering:t.createVNode(t.Fragment,null,[a&&t.createVNode(o.Icon,{class:this.iconClass(d,b),icon:a},null),t.createVNode("span",{class:"k-segmented-control-button-text"},[n])]),additionalProps:{item:e}})])})])}});const Y=[".k-input",".k-picker",".k-checkbox",".k-radio",".k-switch",".k-rating",".k-slider"],Z=(e,t)=>{const o=e.element,s=o instanceof HTMLInputElement||o instanceof HTMLSelectElement||o instanceof HTMLTextAreaElement?o:o.querySelector("input, select, textarea");if(s){if(s instanceof HTMLSelectElement){const e=Array.from(s.querySelectorAll("option")),o=e.find(e=>e.textContent===t)||e.find(e=>{var o;return null==(o=e.textContent)?void 0:o.includes(t)});o&&(s.selectedIndex=e.indexOf(o))}else if(s instanceof HTMLInputElement&&"date"===s.type){const e=new Date(t);s.value=isNaN(e.getTime())?t:e.toISOString().split("T")[0]}else s.value=t;s.dispatchEvent(new CustomEvent("input",{bubbles:!0,detail:{fromSmartComponents:!0}})),s.dispatchEvent(new CustomEvent("change",{bubbles:!0,detail:{fromSmartComponents:!0}}))}},ee=t.defineComponent({name:"KendoSmartPasteButton",emits:{click:e=>!0},props:{disabled:{type:Boolean,default:void 0},fillMode:{type:String,default:"solid"},rounded:{type:String,default:"medium"},size:{type:String,default:"medium"},svgIcon:{type:Object,default:()=>s.pasteSparkleIcon},themeColor:String,formFields:Array,togglable:{type:Boolean,default:!1},selected:{type:Boolean,default:void 0},icon:String,iconClass:String,imageUrl:String,imageAlt:String,tabIndex:Number,id:String,type:{type:String,default:"button"},role:String,ariaLabel:String,ariaPressed:Boolean,title:String,dir:String,iconSize:String},created(){o.validatePackage(c),this.smartPasteInstance=null},methods:{getSmartPasteInstance(){return this.getButtonElement()?(this.smartPasteInstance||(this.smartPasteInstance=new l.KendoSmartPaste({getElement:()=>this.getButtonElement(),customInputs:Y.map(e=>({identifier:e})),getSmartPasteField:e=>{const t=(e=>{const t=e.querySelector("input, select, textarea");return(null==t?void 0:t.getAttribute("name"))||(null==t?void 0:t.getAttribute("id"))||e.getAttribute("id")||null})(e.element);return t?{...e,field:t}:e},setKendoInputValue:Z})),this.smartPasteInstance):null},getButtonElement(){var e;const t=this.$refs.buttonRef;return null!=(e=null==t?void 0:t.$el)?e:null},extractFormConfig(){const e=this.getSmartPasteInstance();if(!e)return this.$props.formFields;const t=e.extractFormConfig().reduce((e,t)=>e.some(e=>e.field===t.field)?e:[...e,t],[]);return this.$props.formFields?this.$props.formFields.map(e=>{const o=t.find(t=>t.field===e.field);if(o){const t={...o,...e,element:o.element};return"kendo-input"===o.type&&(t.type="kendo-input"),t}return e}):t},async extractClipboard(){try{return await navigator.clipboard.readText()}catch{return""}},populateFormFieldsInternal(e,t){if(!e||!t)return;const s=Object.entries(e).reduce((e,[t,o])=>(null!=o&&(e[t]=o),e),{}),i=this.getButtonElement();if(i){const e=o.getKendoPasteEventTarget(i);o.dispatchKendoPasteEvent(e,s)}const n=this.getSmartPasteInstance();n&&n.populateFormFields({fieldValues:s},t)},async handleClick(e){if(this.$props.disabled)return;const t=await this.extractClipboard(),o=this.extractFormConfig(),s=null==o?void 0:o.map(e=>{var t,o,s;const{element:i,...n}=e,r=null==(t=this.$props.formFields)?void 0:t.find(e=>e.field===n.field);return{...n,type:null!=(o=null==r?void 0:r.type)?o:n.type,field:n.field||"",allowedValues:null!=(s=n.allowedValues)?s:[]}}),i={event:e,requestData:{content:t,formFields:s},setResponse:e=>{null!=e&&e.fieldValues&&this.populateFormFieldsInternal(e.fieldValues,o)}};this.$emit("click",i)}},render(){const e=o.getDefaultSlots(this),{disabled:s,fillMode:i,rounded:n,size:r,svgIcon:l,themeColor:a,togglable:d,selected:c,icon:u,iconClass:h,imageUrl:m,imageAlt:f,tabIndex:g,id:v,type:b,role:k,ariaLabel:y,ariaPressed:$,title:S,dir:I,iconSize:C}=this.$props,x={ref:"buttonRef",disabled:s,fillMode:i,rounded:n,size:r,svgIcon:l,themeColor:a,togglable:d,selected:c,icon:u,iconClass:h,imageUrl:m,imageAlt:f,tabIndex:g,id:v,type:b,role:k,ariaLabel:y,ariaPressed:$,title:S,dir:I,iconSize:C,onClick:this.handleClick};return e?t.createVNode(p,x,function(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!t.isVNode(e)}(e)?e:{default:()=>[e]}):t.createVNode(p,x,null)}});e.Button=p,e.ButtonGroup=f,e.ButtonItem=V,e.Chip=y,e.ChipList=$,e.DropDownButton=P,e.FloatingActionButton=F,e.FloatingActionButtonItem=S,e.SegmentedControl=X,e.SmartPasteButton=ee,e.SpeechToTextButton=Q,e.SpeechToTextButtonMode=J,e.SplitButton=K,e.Toolbar=q,e.ToolbarItem=H,e.ToolbarSeparator=z,e.ToolbarSpacer=G});
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"),require("@progress/kendo-smartpaste-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","@progress/kendo-smartpaste-common"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).KendoVueButtons={},e.Vue,e.KendoVueCommon,e.KendoSVGIcons,e.KendoVuePopup,e.KendoVueIntl,e.KendoWebspeechCommon,e.KendoSmartpasteCommon)}(this,function(e,t,o,i,s,n,r,l){"use strict";const a=["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"],d={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"},c={name:"@progress/kendo-vue-buttons",productName:"Kendo UI for Vue",productCode:"KENDOUIVUE",productCodes:["KENDOUIVUE"],publishDate:1657089513,version:"10.1.0",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=d,p=t.defineComponent({name:"KendoButton",emits:{click:e=>!0,mousedown:e=>!0,mouseup:e=>!0,pointerdown:e=>!0,pointerup:e=>!0,focus:e=>!0,blur:e=>!0,keypress:e=>!0,keydown:e=>!0,contextmenu:e=>!0},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},iconClass:{type:String,default:function(){}},imageUrl:{type:String,default:function(){}},imageAlt:String,disabled:{type:Boolean,default:void 0},size:String,rounded:String,fillMode:String,themeColor:String,tabIndex:Number,accessKey:String,id:String,type:String,role:String},created(){o.validatePackage(c),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,rounded:a,fillMode:d,themeColor:c}=this.$props,p=void 0!==r||void 0!==t||void 0!==i||void 0!==s,h=o.getDefaultSlots(this);return{[u.button]:!0,[`k-button-${o.kendoThemeMaps.sizeMap[l]||l}`]:l,[`k-rounded-${o.kendoThemeMaps.roundedMap[a]||a}`]:a,"k-icon-button":!h&&p,"k-disabled":e,"k-selected":this.computedSelected,"k-rtl":"rtl"===n,[`k-button-${d}`]:d,[`k-button-${c}`]:c}}},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",{event:e})},handleBlur(e){this.disabled||this.$emit("blur",{event: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:c,type:u,disabled:p,role:h,iconSize:m}=this.$props,f=o.getDefaultSlots(this),g=f||void 0===s&&void 0===i&&void 0===n&&void 0===r||null==s||!s.name?void 0:s.name.charAt(0).toUpperCase()+s.name.slice(1);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||g,"aria-disabled":p||void 0,"aria-pressed":e?!!this.currentActive:void 0,accesskey:a,tabindex:d,id:c,type:u,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])])}}),h=t.defineComponent({name:"KendoButtonWrap",render(){return o.getDefaultSlots(this)[0]}}),m=d,f=t.defineComponent({name:"KendoButtonGroup",props:{disabled:{type:Boolean,default:void 0},width:String,dir:{type:String,default:function(){}}},created(){o.validatePackage(c)},render(){const e=o.getDefaultSlots(this),i=function(e,i,s,n){const r=o.classNames({[m["state-disabled"]]:this.$props.disabled,[m["group-start"]]:n?s:0===i,[m["group-end"]]:n?0===i:s});return t.h(h,{class:r,"aria-disabled":this.$props.disabled},function(){return[e]})},s=o.classNames([m["button-group"]],{"k-disabled":this.$props.disabled,[m["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){var t,o;return e.tag&&-1!==e.tag.toLowerCase().indexOf("button")||e.componentOptions&&-1!==(null==(t=e.componentOptions.tag)?void 0:t.toLowerCase().indexOf("button"))||(null==(o=e.type)?void 0:o.name)&&-1!==e.type.name.toLowerCase().indexOf("kendobutton")}}});let g=function(e){return e.next="next",e.prev="prev",e.current="current",e.reset="reset",e}({});let v=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}({}),y=function(e){return e.toggle="toggle",e.remove="remove",e}({});const k=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:String,rounded:String,fillMode:{type:String,validator:function(e){return["flat","outline","solid"].includes(e)}},themeColor:{type:String,validator:function(e){return["base","error","info","success","warning"].includes(e)}},dataItem:Object,selected:Boolean,ariaDescribedBy:String,role:{type:String,default:"button"},tabIndex:Number,ariaLabel:String,onMousedown:Function},emits:{click:e=>!0,keydown:e=>!0,blur:e=>!0,focus:e=>!0,remove:e=>!0},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(c)},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:y.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:v.remove,payload:this.$props.value,event:e}),this.handleDispatchFocus({type:g.reset,payload:this.$props.value,event:e}),this.handleDispatchSelection({type:y.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:g.prev,payload:this.$props.value,event:e});break;case o.Keys.right:this.handleDispatchFocus&&this.handleDispatchFocus({type:g.next,payload:this.$props.value,event:e});break;case o.Keys.enter:this.handleDispatchFocus&&this.handleDispatchSelection({type:y.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:g.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:c,selectedSvgIcon:u,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-${s}`]: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||void 0,"aria-label":this.$props.ariaLabel,"aria-describedby":this.$props.ariaDescribedBy,onFocus:this.handleFocus,onBlur:this.handleBlur,onClick:this.handleClick,onKeydown:this.handleKeyDown,onMousedown:this.handleMouseDown},[this.currentSelected&&(c||u)&&t.createVNode(o.Icon,{name:o.getIconName(c),icon:u,size:"small"},null),(a||d)&&t.createVNode(o.Icon,{name:o.getIconName(a),icon:d,size:"small",class:"k-chip-icon"},null),l?l.imageUrl?f:g:null,t.createVNode("span",{class:"k-chip-content"},[this.$props.text&&t.createVNode("span",{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)])])])}}),S=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:String,rounded:String,fillMode:{type:String,validator:function(e){return["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},emits:{change:e=>!0,datachange:e=>!0},provide(){return{kendoSelection:this.currentValue,kendoFocused:this.currentFocused,kendoDataItems:this.computedDataItems,handleDispatchDataItems:this.handleDispatchDataItems,handleDispatchSelection:this.handleDispatchSelection,handleDispatchFocus:this.handleDispatchFocus}},created(){o.validatePackage(c),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 y.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 y.remove:return t.payload===e?null:e;default:return e}case b.multiple:switch(t.type){case y.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 y.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 g.next:return o===t.items.length-1?e:t.items[o+1];case g.prev:return 0===o?e:t.items[o-1];case g.current:return t.payload;case g.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 v.add:break;case v.remove:return e.filter(e=>e[t.valueField]!==t.payload);case v.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]),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(k,{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:(e,t)=>!0,down:e=>!0},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 c=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:c,additionalProps:this.$props,additionalListeners:{click:this.handleClick}}),d}}),I="16px",C=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},w=(e,t)=>{const o={horizontal:t?"right":"left",vertical:"top"};return"end"===e.horizontal&&(o.horizontal=t?"left":"right"),o},D=(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"]),O=(e,t,o,i)=>{const s=t.horizontal,n=t.vertical;if(e){const r=o&&void 0!==o.x?C(o.x):I,l=o&&void 0!==o.x?`calc(50% + ${C(o.x)})`:"50%",a=o&&void 0!==o.y?C(o.y):I,d=o&&void 0!==o.y?`calc(50% + ${C(o.y)})`:"50%";e.style.setProperty(B(t,i),"center"===s?l:r),e.style.setProperty(N(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"))}},B=(e,t)=>{const{horizontal:o}=e;return{end:t?"left":"right",center:"left",start:t?"right":"left"}[o||"end"]},N=e=>({top:"top",middle:"top",bottom:"bottom"}[e.vertical||"bottom"]),F=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:void 0},popupSettings:{type:Object,default:function(){return{}}},rounded:String,fillMode:{type:String,validator:function(e){return["flat","link","outline","solid"].includes(e)}},size:String,themeColor:String},emits:{click:e=>!0,mousedown:e=>!0,mouseup:e=>!0,open:e=>!0,close:e=>!0,itemclick:e=>!0,focus:e=>!0,blur:e=>!0,keydown:e=>!0},data:()=>({currentOpened:!1,currentFocused:!1,focusedIndex:-1,currentDir:"ltr",isRtl:!1}),created(){o.validatePackage(c),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&&O(this.$el,this.$props.align,this.$props.alignOffset,this.isRtl)},updated(){O(this.$el,this.$props.align,this.$props.alignOffset,this.isRtl),this.currentFocused&&this.element&&this.element.focus()},computed:{buttonClassNames(){const{size:e,themeColor:t,fillMode:i,rounded:s,positionMode:n}=this.$props;return{"k-fab":!0,[`k-fab-${o.kendoThemeMaps.sizeMap[e]||e}`]:e,[`k-rounded-${o.kendoThemeMaps.roundedMap[s]||s}`]:s,[`k-fab-${i}`]:i,[`k-fab-${t}`]:t,"k-disabled":this.$props.disabled,"k-focus":this.currentFocused,"k-pos-absolute":"absolute"===n,"k-pos-fixed":"fixed"===n,[`k-${this.$props.align.vertical}-${this.$props.align.horizontal}`]:!!n}},computedOpened(){return void 0===this.$props.opened?this.currentOpened:this.$props.opened},rootClassNames(){}},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",{event:e})},handleBlur(e){this.currentFocused=!1,this.currentOpened=!1,this.focusedIndex=-1,this.$emit("blur",{event:e}),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:c,tabIndex:u,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,D(this.currentDir||"ltr",e.horizontal)),onClick:this.handleItemClick,onDown:this.handleItemDown},null)},this)},g=n&&!c,v=(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":void 0,type:"button","aria-disabled":i||void 0,"aria-expanded":d?this.computedOpened:void 0,"aria-haspopup":!!d||void 0,"aria-label":!c&&(n||r||l)?"Action":void 0,"aria-owns":d?this.listId:void 0,"aria-activedescendant":this.focusedIndex>=0&&d?`${this.listId}-${this.focusedIndex}`:void 0,tabindex:o.getTabIndex(u,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,c&&t.createVNode("span",{class:"k-fab-text"},[c])]),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||w(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?v+"px":void 0,paddingRight:g?v+"px":void 0}},[f.call(this)])]})])}}),V=t.defineComponent({name:"KendoButtonItem",emits:{click:(e,t)=>!0,down:(e,t)=>!0},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-menu-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)])}}),T=(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 R(e){let t={horizontal:"left",vertical:"bottom"};return e&&(t.horizontal="right"),t}function M(e){let t={horizontal:"left",vertical:"top"};return e&&(t.horizontal="right"),t}const K=t.defineComponent({name:"KendoSplitButton",emits:{focus:e=>!0,blur:e=>!0,buttonclick:e=>!0,itemclick:e=>!0,open:e=>!0,close:e=>!0},props:{accessKey:String,ariaLabel:String,text:String,items:{type:Array,default:function(){return[]}},textField:String,tabIndex:Number,disabled:Boolean,icon:String,svgIcon:Object,size:String,rounded:String,fillMode:{type:String,validator:function(e){return["flat","link","outline","solid"].includes(e)}},themeColor:{type:String,validator:function(e){return["base","dark","error","info","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(c)},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(V,{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},c=this.$props.text||a?{default:()=>[this.$props.text,a]}:{};return t.createVNode("div",{class:this.wrapperClass,onKeydown:this.onKeyDown,onFocusin:this.onFocus,onFocusout:this.onBlur,dir:n},[t.createVNode(p,{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||void 0,"aria-label":this.$props.ariaLabel||(this.$props.text||a||!(this.$props.svgIcon||this.$props.icon||this.$props.iconClass)?void 0:"Action")},c),t.createVNode(p,{svgIcon:i.chevronDownIcon,size:this.$props.size,rounded:this.$props.rounded,fillMode:this.$props.fillMode,themeColor:this.$props.themeColor,icon:"chevron-down",class:"k-split-button-arrow",disabled:l||void 0,tabIndex:-1,onClick:this.onSplitPartClick,onMousedown:this.onDownSplitPart,onPointerdown:this.onDownSplitPart,dir:n,"aria-label":"Toggle dropdown","aria-expanded":this.computedOpened,"aria-controls":this.computedOpened?this.guid:void 0},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||R(e),popupAlign:i.popupAlign||M(e),style:e?{direction:"rtl"}:void 0},{default:()=>[t.createVNode("ul",{class:"k-menu-group",role:"menu",id:this.guid},[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=T(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",{event:e}),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",{event:e}),t.computedOpened&&(t.currentOpened=!1,t.dispatchPopupEvent(e,!1)))},200)},dispatchClickEvent(e,t){this.isItemDisabled(t)||(-1===t?this.$emit("buttonclick",{event:e}):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){const o={event:e};this.$emit(t?"open":"close",o)},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:"KendoDropDownButton",emits:{focus:e=>!0,blur:e=>!0,itemclick:e=>!0,open:e=>!0,close:e=>!0},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:String,rounded:String,fillMode:{type:String,validator:function(e){return["flat","link","outline","solid"].includes(e)}},themeColor:{type:String,validator:function(e){return["base","error","info","inverse","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(c)},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(){}},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(V,{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},d=this.$props.text||l?{default:()=>[this.$props.text,l]}:{};return t.createVNode("div",{class:this.wrapperClass,onKeydown:this.onKeyDown,onFocusin:this.onFocus,onFocusout:this.onBlur,dir:i},[t.createVNode(p,{size:this.$props.size,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:o.classNames("k-menu-button",this.$props.buttonClass),imageUrl:this.$props.imageUrl,dir:i,ref:this._anchor,type:"button","aria-disabled":r||void 0,"aria-expanded":this.computedOpened,"aria-label":this.$props.ariaLabel||(this.$props.svgIcon||this.$props.icon||this.$props.iconClass?"Menu":void 0),"aria-controls":this.computedOpened?this.guid:void 0,"aria-activedescendant":this.computedOpened&&void 0!==this.focusedIndex&&this.focusedIndex>=0?`${this.guid}-${this.focusedIndex}`:void 0},d),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||R(e),popupAlign:i.popupAlign||M(e),style:e?{direction:"rtl"}:void 0},{default:()=>[t.createVNode("ul",{class:"k-menu-group",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=T(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",{event:e})),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",{event:e}),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){const o={event:e};this.$emit(t?"open":"close",o)},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}}}),z=t.defineComponent({name:"KendoToolbarItem",render:()=>t.createVNode("div",{class:"k-toolbar-separator k-separator"},null)}),A="prevArrow.title",E="nextArrow.title",L="moreButtonTitle.title",j={[A]:"Previous scroll button",[E]:"Next scroll button",[L]:"More button"},U=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:e=>!0},methods:{getScrollButtonTitle(){const{dir:e,type:t}=this.$props;return"rtl"!==e?"prev"===t?n.provideLocalizationService(this).toLanguageString(A,j[A]):n.provideLocalizationService(this).toLanguageString(E,j[E]):"prev"===t?n.provideLocalizationService(this).toLanguageString(E,j[E]):n.provideLocalizationService(this).toLanguageString(A,j[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-icon-button",`k-toolbar-${s}`),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.chevronLeftIcon:i.chevronRightIcon,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:e=>!0},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,c=(e,n)=>t.createVNode(U,{type:e,dir:r,disabled:n,scrollContentRef:this.scrollContentRef,buttonScrollSpeed:o,prevButton:i,nextButton:s,onContentscroll:this.onContentScroll},null),u="visible"===e||"auto"===e&&this.$props.isOverflowing;return t.createVNode(t.Fragment,null,[u&&"split"===n&&t.createVNode(t.Fragment,null,[c("rtl"!==r?"prev":"next",l),t.createVNode(z,{class:"k-toolbar-button-separator"},null)]),u&&"start"===n&&t.createVNode(t.Fragment,null,[c("rtl"!==r?"prev":"next",l),c("rtl"!==r?"next":"prev",a),t.createVNode(z,{class:"k-toolbar-button-separator"},null)]),t.createVNode("span",{class:"k-toolbar-items k-toolbar-items-scroll",ref:"scrollContentRef"},[d]),u&&"split"===n&&t.createVNode(t.Fragment,null,[t.createVNode(z,{class:"k-toolbar-button-separator"},null),c("rtl"!==r?"next":"prev",a)]),u&&"end"===n&&t.createVNode(t.Fragment,null,[t.createVNode(z,{class:"k-toolbar-button-separator"},null),c("rtl"!==r?"prev":"next",l),c("rtl"!==r?"next":"prev",a)])])}}),_=t.defineComponent({name:"ToolbarOverflowSection",props:{toolbarRef:Object,toolbarWidth:Number,fillMode:String,size:String,visibleTools:Array,overFlowTools:Array,opened:Boolean,allTools:Array},emits:{toggleoverflow:e=>!0},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:u}=this.$props;return t.createVNode(t.Fragment,null,[e&&[...l].splice(0,e.length),r.length>0&&t.createVNode(t.Fragment,null,[t.createVNode(z,{class:"k-toolbar-button-separator"},null),t.createVNode(p,{ref:"buttonRef",class:"k-toolbar-overflow-button",fillMode:"flat",svgIcon:i.moreHorizontalIcon,title:n.provideLocalizationService(this).toLanguageString(L,j[L]),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[u]} k-toolbar-items-list-${c}`},[e&&[...l].splice(e.length,l.length)])]})])])}}),q=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,validator:function(e){return["small","medium","large"].includes(e)}},fillMode:{type:String,validator:function(e){return["solid","flat","outline"].includes(e)}},ariaLabel:String,overflow:{type:String,default:void 0,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}},emits:{resize:e=>!0},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(c)},computed:{selectors(){return this.$props.buttons||a},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:c}=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(_,{opened:this.overFlowOpened,toolbarRef:this.$refs.toolbar,toolbarWidth:this.offsetWidth,fillMode:d,size:c,visibleTools:this.visibleToolsRef,overFlowTools:this.overFlowToolsRef,onToggleoverflow:this.onToggleoverflow,allTools:this.defaultSlot},null),(!e||"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){if(!e)return;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}}}),H=t.defineComponent({name:"KendoToolbarItem",methods:{element(){return this.$el}},render(){const e=o.getDefaultSlots(this);return t.createVNode("div",{class:"k-toolbar-item"},[e])}}),G=t.defineComponent({name:"KendoToolbarItem",render:()=>t.createVNode("span",{class:"k-spacer"},null)});let J=function(e){return e.WebSpeech="WebSpeech",e.None="None",e}({});const Q=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:J.WebSpeech},onStart:{type:Function},onResult:{type:Function},onEnd:{type:Function},onError:{type:Function},svgIcon:{type:Object,default:i.microphoneIcon},iconSize:{type:String},disabled:{type:Boolean,default:void 0},size:String,rounded:String,fillMode:String,themeColor:String,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!==J.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)},c=()=>{var e;n.value&&(l()&&(null==(e=s.value)||e.stop()),n.value=!1)},u=async()=>{n.value||(e.onStart&&await e.onStart(),d())},p=t=>{const i=t.results,s=i[i.length-1],n=Array.from(s).map(e=>({transcript:e.transcript,confidence:e.confidence})),r={isFinal:s.isFinal,alternatives:n};e.onResult&&e.onResult(r),o("result",r)},h=async()=>{n.value&&(e.onEnd&&await e.onEnd(),c())},m=t=>{n.value=!1;const i={errorMessage:t.error||t.errorMessage||"Unknown error"};e.onError&&e.onError(i),o("error",i)},f=()=>{var t;a&&e.integrationMode===J.WebSpeech&&(null!=(t=s.value)&&t.isActive()&&c(),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:u,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&&c()}),i({start:d,stop:c,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():u())},isInActiveState:n}},render(){const{ariaLabel:e,svgIcon:o,fillMode:s,rounded:n,size:r,disabled:l,themeColor:a,iconSize:d,title:c}=this.$props,{className:u,style:h,id:m}=this.$attrs,f=t.computed(()=>["k-speech-to-text-button",u,{"k-listening":this.isInActiveState}]),g=t.computed(()=>this.isInActiveState?i.stopIcon:o||i.microphoneIcon);return t.createVNode(p,{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:c},null)}}),X=t.defineComponent({name:"KendoSegmentedControl",emits:{change:e=>!0},props:{items:{type:Array,default:()=>[]},size:String,layoutMode:{type:String,default:"compact"},value:String,defaultValue:String,itemTemplate:[String,Function]},data(){return{interactionState:{selectedValue:this.$props.defaultValue,hoveredValue:void 0,focusedValue:void 0}}},computed:{selectedItemValue(){var e;return null!=(e=this.$props.value)?e:this.interactionState.selectedValue},sizeClass(){const e=this.$props.size;return e?o.kendoThemeMaps.sizeMap[e]:void 0},buttonClass(){return(e,t,i)=>o.classNames("k-segmented-control-button",{"k-selected":i,"k-hover":this.interactionState.hoveredValue===e&&!t,"k-focus":this.interactionState.focusedValue===e&&!t,"k-disabled":t})},iconClass:()=>(e,t)=>o.classNames("k-segmented-control-button-icon",{...e&&{[e]:t}})},watch:{selectedItemValue(){t.nextTick(()=>{this.updateThumbPosition()})}},created(){o.validatePackage(c),this._resizeObserver=null},mounted(){t.nextTick(()=>{this.updateThumbPosition()}),this._resizeObserver=new ResizeObserver(()=>{this.updateThumbPosition()});const e=this.$refs.element;e&&this._resizeObserver.observe(e)},beforeUnmount(){this._resizeObserver&&(this._resizeObserver.disconnect(),this._resizeObserver=null)},methods:{updateThumbPosition(){const e=this.$refs.element,t=this.$refs.thumb;if(!e||!t)return;const o=e.querySelector(".k-segmented-control-button.k-selected");if(!o)return;const i=e.offsetWidth,{offsetWidth:s,offsetLeft:n}=o,r=`${n}px`,l=i-n-s+"px";t.style.left!==r&&(t.style.left=r),t.style.right!==l&&(t.style.right=l)},updateState(e){this.interactionState={...this.interactionState,...e}},handleButtonClick(e,t){var o,i;if(!e.disabled){if(this.selectedItemValue===e.value)return void(null==(o=e.onClick)||o.call(e,t));void 0===this.$props.value&&e&&this.updateState({selectedValue:e.value}),this.$emit("change",e.value),null==(i=e.onClick)||i.call(e,t)}},handleMouseEnter(e,t,o,i){t||this.updateState({hoveredValue:e}),null==o||o(i)},handleMouseLeave(e,t){this.updateState({hoveredValue:void 0}),null==e||e(t)},handleFocus(e,t,o){this.updateState({focusedValue:e}),null==t||t(o)},handleBlur(e,t){this.updateState({focusedValue:void 0}),null==e||e(t)}},render(){const{items:e,layoutMode:i,itemTemplate:s}=this.$props,n=this.sizeClass,r=this.selectedItemValue,l=s?o.templateRendering.call(this,s,{}):void 0;return t.createVNode("div",{ref:"element",role:"group",class:o.classNames("k-segmented-control",n&&`k-segmented-control-${n}`,{"k-segmented-control-stretched":"stretch"===i})},[t.createVNode("div",{class:"k-segmented-control-thumb",ref:"thumb","aria-hidden":"true"},null),(e||[]).map(e=>{const{value:i,disabled:s,text:n,svgIcon:a,iconClassName:d,type:c="button",onMouseEnter:u,onMouseLeave:p,onFocus:h,onBlur:m,title:f,dir:g,"aria-label":v}=e,b=r===i;return t.createVNode("button",{key:i,type:c,class:this.buttonClass(i,s,b),disabled:s,"aria-disabled":s||void 0,"aria-pressed":b,title:f,dir:g,"aria-label":v,onClick:t=>this.handleButtonClick(e,t),onMouseenter:e=>this.handleMouseEnter(i,s,u,e),onMouseleave:e=>this.handleMouseLeave(p,e),onFocus:e=>this.handleFocus(i,h,e),onBlur:e=>this.handleBlur(m,e)},[o.getTemplate.call(this,{h:t.h,template:l,defaultRendering:t.createVNode(t.Fragment,null,[a&&t.createVNode(o.Icon,{class:this.iconClass(d,b),icon:a},null),t.createVNode("span",{class:"k-segmented-control-button-text"},[n])]),additionalProps:{item:e}})])})])}});const Y=[".k-input",".k-picker",".k-checkbox",".k-radio",".k-switch",".k-rating",".k-slider"],Z=(e,t)=>{const o=e.element,i=o instanceof HTMLInputElement||o instanceof HTMLSelectElement||o instanceof HTMLTextAreaElement?o:o.querySelector("input, select, textarea");if(i){if(i instanceof HTMLSelectElement){const e=Array.from(i.querySelectorAll("option")),o=e.find(e=>e.textContent===t)||e.find(e=>{var o;return null==(o=e.textContent)?void 0:o.includes(t)});o&&(i.selectedIndex=e.indexOf(o))}else if(i instanceof HTMLInputElement&&"date"===i.type){const e=new Date(t);i.value=isNaN(e.getTime())?t:e.toISOString().split("T")[0]}else i.value=t;i.dispatchEvent(new CustomEvent("input",{bubbles:!0,detail:{fromSmartComponents:!0}})),i.dispatchEvent(new CustomEvent("change",{bubbles:!0,detail:{fromSmartComponents:!0}}))}},ee=t.defineComponent({name:"KendoSmartPasteButton",emits:{click:e=>!0},props:{disabled:{type:Boolean,default:void 0},fillMode:{type:String,default:"solid"},rounded:{type:String,default:"medium"},size:{type:String,default:"medium"},svgIcon:{type:Object,default:()=>i.pasteSparkleIcon},themeColor:String,formFields:Array,togglable:{type:Boolean,default:!1},selected:{type:Boolean,default:void 0},icon:String,iconClass:String,imageUrl:String,imageAlt:String,tabIndex:Number,id:String,type:{type:String,default:"button"},role:String,ariaLabel:String,ariaPressed:Boolean,title:String,dir:String,iconSize:String},created(){o.validatePackage(c),this.smartPasteInstance=null},methods:{getSmartPasteInstance(){return this.getButtonElement()?(this.smartPasteInstance||(this.smartPasteInstance=new l.KendoSmartPaste({getElement:()=>this.getButtonElement(),customInputs:Y.map(e=>({identifier:e})),getSmartPasteField:e=>{const t=(e=>{const t=e.querySelector("input, select, textarea");return(null==t?void 0:t.getAttribute("name"))||(null==t?void 0:t.getAttribute("id"))||e.getAttribute("id")||null})(e.element);return t?{...e,field:t}:e},setKendoInputValue:Z})),this.smartPasteInstance):null},getButtonElement(){var e;const t=this.$refs.buttonRef;return null!=(e=null==t?void 0:t.$el)?e:null},extractFormConfig(){const e=this.getSmartPasteInstance();if(!e)return this.$props.formFields;const t=e.extractFormConfig().reduce((e,t)=>e.some(e=>e.field===t.field)?e:[...e,t],[]);return this.$props.formFields?this.$props.formFields.map(e=>{const o=t.find(t=>t.field===e.field);if(o){const t={...o,...e,element:o.element};return"kendo-input"===o.type&&(t.type="kendo-input"),t}return e}):t},async extractClipboard(){try{return await navigator.clipboard.readText()}catch{return""}},populateFormFieldsInternal(e,t){if(!e||!t)return;const i=Object.entries(e).reduce((e,[t,o])=>(null!=o&&(e[t]=o),e),{}),s=this.getButtonElement();if(s){const e=o.getKendoPasteEventTarget(s);o.dispatchKendoPasteEvent(e,i)}const n=this.getSmartPasteInstance();n&&n.populateFormFields({fieldValues:i},t)},async handleClick(e){if(this.$props.disabled)return;const t=await this.extractClipboard(),o=this.extractFormConfig(),i=null==o?void 0:o.map(e=>{var t,o,i;const{element:s,...n}=e,r=null==(t=this.$props.formFields)?void 0:t.find(e=>e.field===n.field);return{...n,type:null!=(o=null==r?void 0:r.type)?o:n.type,field:n.field||"",allowedValues:null!=(i=n.allowedValues)?i:[]}}),s={event:e,requestData:{content:t,formFields:i},setResponse:e=>{null!=e&&e.fieldValues&&this.populateFormFieldsInternal(e.fieldValues,o)}};this.$emit("click",s)}},render(){const e=o.getDefaultSlots(this),{disabled:i,fillMode:s,rounded:n,size:r,svgIcon:l,themeColor:a,togglable:d,selected:c,icon:u,iconClass:h,imageUrl:m,imageAlt:f,tabIndex:g,id:v,type:b,role:y,ariaLabel:k,ariaPressed:S,title:$,dir:I,iconSize:C}=this.$props,x={ref:"buttonRef",disabled:i,fillMode:s,rounded:n,size:r,svgIcon:l,themeColor:a,togglable:d,selected:c,icon:u,iconClass:h,imageUrl:m,imageAlt:f,tabIndex:g,id:v,type:b,role:y,ariaLabel:k,ariaPressed:S,title:$,dir:I,iconSize:C,onClick:this.handleClick};return e?t.createVNode(p,x,function(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!t.isVNode(e)}(e)?e:{default:()=>[e]}):t.createVNode(p,x,null)}});e.Button=p,e.ButtonGroup=f,e.ButtonItem=V,e.Chip=k,e.ChipList=S,e.DropDownButton=P,e.FloatingActionButton=F,e.FloatingActionButtonItem=$,e.SegmentedControl=X,e.SmartPasteButton=ee,e.SpeechToTextButton=Q,e.SpeechToTextButtonMode=J,e.SplitButton=K,e.Toolbar=q,e.ToolbarItem=H,e.ToolbarSeparator=z,e.ToolbarSpacer=G});
@@ -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: 1791189853,version:"10.1.0-develop.1",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: 1791377144,version:"10.1.0",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: 1791189853,
14
- version: "10.1.0-develop.1",
13
+ publishDate: 1791377144,
14
+ version: "10.1.0",
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": "10.1.0-develop.1",
3
+ "version": "10.1.0",
4
4
  "description": "TODO",
5
5
  "author": "Progress",
6
6
  "license": "SEE LICENSE IN LICENSE.md",
@@ -26,9 +26,9 @@
26
26
  "peerDependencies": {
27
27
  "@progress/kendo-licensing": "^1.7.2",
28
28
  "@progress/kendo-smartpaste-common": "^1.0.0",
29
- "@progress/kendo-vue-common": "10.1.0-develop.1",
30
- "@progress/kendo-vue-intl": "10.1.0-develop.1",
31
- "@progress/kendo-vue-popup": "10.1.0-develop.1",
29
+ "@progress/kendo-vue-common": "10.1.0",
30
+ "@progress/kendo-vue-intl": "10.1.0",
31
+ "@progress/kendo-vue-popup": "10.1.0",
32
32
  "@progress/kendo-webspeech-common": "^1.0.1",
33
33
  "@progress/kendo-svg-icons": "^4.9.0 || ^5.0.0",
34
34
  "vue": "^3.0.2"
@@ -50,7 +50,7 @@
50
50
  "package": {
51
51
  "productName": "Kendo UI for Vue",
52
52
  "productCode": "KENDOUIVUE",
53
- "publishDate": 1791189853,
53
+ "publishDate": 1791377144,
54
54
  "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"
55
55
  }
56
56
  },