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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/Button.d.ts CHANGED
@@ -19,13 +19,14 @@ export interface ButtonProps extends ButtonInterface {
19
19
  * Configures the `size` of the Button.
20
20
  *
21
21
  * The available options are:
22
+ * - xs
22
23
  * - small
23
24
  * - medium
24
25
  * - large
25
26
  *
26
27
  * @default `undefined`
27
28
  */
28
- size?: 'small' | 'medium' | 'large';
29
+ size?: 'xs' | 'small' | 'medium' | 'large';
29
30
  /**
30
31
  * Configures the `roundness` of the Button.
31
32
  *
@@ -63,13 +64,12 @@ export interface ButtonProps extends ButtonInterface {
63
64
  * - info
64
65
  * - success
65
66
  * - warning
66
- * - dark
67
- * - light
67
+ * - error
68
68
  * - inverse
69
69
  *
70
70
  * @default `undefined`
71
71
  */
72
- themeColor?: 'base' | 'primary' | 'secondary' | 'tertiary' | 'info' | 'success' | 'warning' | 'dark' | 'light' | 'inverse';
72
+ themeColor?: 'base' | 'primary' | 'secondary' | 'tertiary' | 'info' | 'success' | 'warning' | 'error' | 'inverse';
73
73
  /**
74
74
  * Sets the `tabIndex` property of the Button.
75
75
  */
@@ -164,10 +164,10 @@ declare const Button: import('vue').DefineComponent<import('vue').ExtractPropTyp
164
164
  type: PropType<boolean>;
165
165
  default: any;
166
166
  };
167
- size: PropType<"small" | "medium" | "large">;
167
+ size: PropType<"small" | "medium" | "xs" | "large">;
168
168
  rounded: PropType<"small" | "medium" | "large" | "full" | "none">;
169
169
  fillMode: PropType<"flat" | "link" | "solid" | "outline">;
170
- themeColor: PropType<"base" | "primary" | "secondary" | "tertiary" | "info" | "success" | "warning" | "dark" | "light" | "inverse">;
170
+ themeColor: PropType<"base" | "primary" | "secondary" | "tertiary" | "info" | "success" | "warning" | "error" | "inverse">;
171
171
  tabIndex: PropType<number>;
172
172
  accessKey: PropType<string>;
173
173
  id: PropType<string>;
@@ -242,10 +242,10 @@ declare const Button: import('vue').DefineComponent<import('vue').ExtractPropTyp
242
242
  type: PropType<boolean>;
243
243
  default: any;
244
244
  };
245
- size: PropType<"small" | "medium" | "large">;
245
+ size: PropType<"small" | "medium" | "xs" | "large">;
246
246
  rounded: PropType<"small" | "medium" | "large" | "full" | "none">;
247
247
  fillMode: PropType<"flat" | "link" | "solid" | "outline">;
248
- themeColor: PropType<"base" | "primary" | "secondary" | "tertiary" | "info" | "success" | "warning" | "dark" | "light" | "inverse">;
248
+ themeColor: PropType<"base" | "primary" | "secondary" | "tertiary" | "info" | "success" | "warning" | "error" | "inverse">;
249
249
  tabIndex: PropType<number>;
250
250
  accessKey: PropType<string>;
251
251
  id: PropType<string>;
package/Button.js CHANGED
@@ -5,4 +5,4 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("vue"),t=require("@progress/kendo-vue-common"),v=require("./util.js"),k=require("./package-metadata.js"),y=v.default.styles,S=n.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(){t.validatePackage(k.packageMetadata),this.currentActive=this.$props.togglable===!0&&this.$props.selected===!0,this._activeTemp=void 0},data(){return{currentActive:null}},computed:{computedSelected(){return this._activeTemp!==void 0?this._activeTemp:this.$props.selected!==void 0?this.$props.selected:this.currentActive},buttonClasses(){const{disabled:e,icon:d,iconClass:l,imageUrl:i,dir:r,svgIcon:c,size:s,rounded:o,fillMode:a,themeColor:u}=this.$props,h=c!==void 0||d!==void 0||l!==void 0||i!==void 0,p=t.getDefaultSlots(this);return{[y.button]:!0,[`k-button-${t.kendoThemeMaps.sizeMap[s]||s}`]:s,[`k-rounded-${t.kendoThemeMaps.roundedMap[o]||o}`]:o,"k-icon-button":!p&&h,"k-disabled":e,"k-selected":this.computedSelected,"k-rtl":r==="rtl",[`k-button-${a}`]:a,[`k-button-${u}`]:u}}},updated(){this.$props.togglable&&this.$props.selected!==void 0&&this.$props.selected!==this.currentActive&&(this.currentActive=this.$props.selected)},methods:{focus(e){this.$el.focus(e)},toggleIfApplicable(){if(!this.disabled&&this.$props.togglable&&this.$props.selected===void 0){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:d,svgIcon:l,iconClass:i,imageUrl:r,imageAlt:c,accessKey:s,tabIndex:o,id:a,type:u,disabled:h,role:f,iconSize:p}=this.$props,m=t.getDefaultSlots(this),g=function(){if(r)return n.createVNode("img",{role:"presentation",class:"k-image",alt:c,src:r},null);if(d||l){const b=t.classNames("k-button-icon",i);return n.createVNode(t.Icon,{name:d,icon:l,class:b,size:p},null)}else if(i)return n.createVNode("span",{role:"presentation",class:i},null);return null};return n.createVNode("button",{class:this.buttonClasses,onClick:this.handleClick,onMousedown:this.handleMouseDown,onMouseup:this.handleMouseUp,onPointerdown:this.handlePointerDown,onPointerup:this.handlePointerUp,onFocus:this.handleFocus,onBlur:this.handleBlur,onKeypress:this.handleKeypress,onKeydown:this.handleKeydown,onContextmenu:this.handleContextmenu,title:this.title,"aria-label":this.ariaLabel,"aria-disabled":h||void 0,"aria-pressed":e?!!this.currentActive:void 0,accesskey:s,tabindex:o,id:a,type:u,role:f},[g.call(this),m&&n.createVNode("span",{class:"k-button-text"},[m])])}});exports.Button=S;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("vue"),n=require("@progress/kendo-vue-common"),v=require("./util.js"),k=require("./package-metadata.js"),S=v.default.styles,$=s.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(){n.validatePackage(k.packageMetadata),this.currentActive=this.$props.togglable===!0&&this.$props.selected===!0,this._activeTemp=void 0},data(){return{currentActive:null}},computed:{computedSelected(){return this._activeTemp!==void 0?this._activeTemp:this.$props.selected!==void 0?this.$props.selected:this.currentActive},buttonClasses(){const{disabled:e,icon:o,iconClass:t,imageUrl:i,dir:d,svgIcon:c,size:l,rounded:a,fillMode:r,themeColor:u}=this.$props,h=c!==void 0||o!==void 0||t!==void 0||i!==void 0,p=n.getDefaultSlots(this);return{[S.button]:!0,[`k-button-${n.kendoThemeMaps.sizeMap[l]||l}`]:l,[`k-rounded-${n.kendoThemeMaps.roundedMap[a]||a}`]:a,"k-icon-button":!p&&h,"k-disabled":e,"k-selected":this.computedSelected,"k-rtl":d==="rtl",[`k-button-${r}`]:r,[`k-button-${u}`]:u}}},updated(){this.$props.togglable&&this.$props.selected!==void 0&&this.$props.selected!==this.currentActive&&(this.currentActive=this.$props.selected)},methods:{focus(e){this.$el.focus(e)},toggleIfApplicable(){if(!this.disabled&&this.$props.togglable&&this.$props.selected===void 0){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:o,svgIcon:t,iconClass:i,imageUrl:d,imageAlt:c,accessKey:l,tabIndex:a,id:r,type:u,disabled:h,role:m,iconSize:p}=this.$props,f=n.getDefaultSlots(this),b=!f&&(t!==void 0||o!==void 0||i!==void 0||d!==void 0)&&(t!=null&&t.name)?t.name.charAt(0).toUpperCase()+t.name.slice(1):void 0,g=function(){if(d)return s.createVNode("img",{role:"presentation",class:"k-image",alt:c,src:d},null);if(o||t){const y=n.classNames("k-button-icon",i);return s.createVNode(n.Icon,{name:o,icon:t,class:y,size:p},null)}else if(i)return s.createVNode("span",{role:"presentation",class:i},null);return null};return s.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||b,"aria-disabled":h||void 0,"aria-pressed":e?!!this.currentActive:void 0,accesskey:l,tabindex:a,id:r,type:u,role:m},[g.call(this),f&&s.createVNode("span",{class:"k-button-text"},[f])])}});exports.Button=$;
package/Button.mjs CHANGED
@@ -5,11 +5,11 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- import { defineComponent as $, createVNode as s } from "vue";
9
- import { getDefaultSlots as m, kendoThemeMaps as b, validatePackage as y, classNames as k, Icon as S } from "@progress/kendo-vue-common";
10
- import C from "./util.mjs";
11
- import { packageMetadata as w } from "./package-metadata.mjs";
12
- const A = C.styles, K = /* @__PURE__ */ $({
8
+ import { defineComponent as v, createVNode as l } from "vue";
9
+ import { getDefaultSlots as m, kendoThemeMaps as b, validatePackage as k, classNames as S, Icon as C } from "@progress/kendo-vue-common";
10
+ import w from "./util.mjs";
11
+ import { packageMetadata as A } from "./package-metadata.mjs";
12
+ const M = w.styles, z = /* @__PURE__ */ v({
13
13
  name: "KendoButton",
14
14
  emits: {
15
15
  click: (e) => !0,
@@ -71,7 +71,7 @@ const A = C.styles, K = /* @__PURE__ */ $({
71
71
  role: String
72
72
  },
73
73
  created() {
74
- y(w), this.currentActive = this.$props.togglable === !0 && this.$props.selected === !0, this._activeTemp = void 0;
74
+ k(A), this.currentActive = this.$props.togglable === !0 && this.$props.selected === !0, this._activeTemp = void 0;
75
75
  },
76
76
  data() {
77
77
  return {
@@ -85,24 +85,24 @@ const A = C.styles, K = /* @__PURE__ */ $({
85
85
  buttonClasses() {
86
86
  const {
87
87
  disabled: e,
88
- icon: o,
89
- iconClass: d,
90
- imageUrl: t,
91
- dir: l,
88
+ icon: i,
89
+ iconClass: t,
90
+ imageUrl: n,
91
+ dir: s,
92
92
  svgIcon: u,
93
- size: i,
94
- rounded: n,
93
+ size: o,
94
+ rounded: d,
95
95
  fillMode: r,
96
96
  themeColor: a
97
- } = this.$props, c = u !== void 0 || o !== void 0 || d !== void 0 || t !== void 0, h = m(this);
97
+ } = this.$props, c = u !== void 0 || i !== void 0 || t !== void 0 || n !== void 0, h = m(this);
98
98
  return {
99
- [A.button]: !0,
100
- [`k-button-${b.sizeMap[i] || i}`]: i,
101
- [`k-rounded-${b.roundedMap[n] || n}`]: n,
99
+ [M.button]: !0,
100
+ [`k-button-${b.sizeMap[o] || o}`]: o,
101
+ [`k-rounded-${b.roundedMap[d] || d}`]: d,
102
102
  "k-icon-button": !h && c,
103
103
  "k-disabled": e,
104
104
  "k-selected": this.computedSelected,
105
- "k-rtl": l === "rtl",
105
+ "k-rtl": s === "rtl",
106
106
  [`k-button-${r}`]: r,
107
107
  [`k-button-${a}`]: a
108
108
  };
@@ -159,42 +159,42 @@ const A = C.styles, K = /* @__PURE__ */ $({
159
159
  render() {
160
160
  const {
161
161
  togglable: e,
162
- icon: o,
163
- svgIcon: d,
164
- iconClass: t,
165
- imageUrl: l,
162
+ icon: i,
163
+ svgIcon: t,
164
+ iconClass: n,
165
+ imageUrl: s,
166
166
  imageAlt: u,
167
- accessKey: i,
168
- tabIndex: n,
167
+ accessKey: o,
168
+ tabIndex: d,
169
169
  id: r,
170
170
  type: a,
171
171
  disabled: c,
172
- role: p,
172
+ role: f,
173
173
  iconSize: h
174
- } = this.$props, f = m(this), g = function() {
175
- if (l)
176
- return s("img", {
174
+ } = this.$props, p = m(this), g = !p && (t !== void 0 || i !== void 0 || n !== void 0 || s !== void 0) && (t != null && t.name) ? t.name.charAt(0).toUpperCase() + t.name.slice(1) : void 0, y = function() {
175
+ if (s)
176
+ return l("img", {
177
177
  role: "presentation",
178
178
  class: "k-image",
179
179
  alt: u,
180
- src: l
180
+ src: s
181
181
  }, null);
182
- if (o || d) {
183
- const v = k("k-button-icon", t);
184
- return s(S, {
185
- name: o,
186
- icon: d,
187
- class: v,
182
+ if (i || t) {
183
+ const $ = S("k-button-icon", n);
184
+ return l(C, {
185
+ name: i,
186
+ icon: t,
187
+ class: $,
188
188
  size: h
189
189
  }, null);
190
- } else if (t)
191
- return s("span", {
190
+ } else if (n)
191
+ return l("span", {
192
192
  role: "presentation",
193
- class: t
193
+ class: n
194
194
  }, null);
195
195
  return null;
196
196
  };
197
- return s("button", {
197
+ return l("button", {
198
198
  class: this.buttonClasses,
199
199
  onClick: this.handleClick,
200
200
  onMousedown: this.handleMouseDown,
@@ -207,19 +207,19 @@ const A = C.styles, K = /* @__PURE__ */ $({
207
207
  onKeydown: this.handleKeydown,
208
208
  onContextmenu: this.handleContextmenu,
209
209
  title: this.title,
210
- "aria-label": this.ariaLabel,
210
+ "aria-label": this.ariaLabel || g,
211
211
  "aria-disabled": c || void 0,
212
212
  "aria-pressed": e ? !!this.currentActive : void 0,
213
- accesskey: i,
214
- tabindex: n,
213
+ accesskey: o,
214
+ tabindex: d,
215
215
  id: r,
216
216
  type: a,
217
- role: p
218
- }, [g.call(this), f && s("span", {
217
+ role: f
218
+ }, [y.call(this), p && l("span", {
219
219
  class: "k-button-text"
220
- }, [f])]);
220
+ }, [p])]);
221
221
  }
222
222
  });
223
223
  export {
224
- K as Button
224
+ z as Button
225
225
  };
@@ -5,4 +5,4 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("vue"),s=require("@progress/kendo-vue-common"),I=require("./FloatingActionButtonItem.js"),y=require("../package-metadata.js"),a=require("./utils.js"),x=require("@progress/kendo-vue-popup"),v=n.defineComponent({name:"KendoVueFloatingActionButton",props:{id:String,dir:String,tabIndex:Number,accessKey:String,disabled:{type:Boolean,default:!1},icon:String,svgIcon:Object,iconClass:String,items:[Object,Array],item:[String,Function,Object],text:String,alignOffset:Object,opened:{type:Boolean,default:void 0},align:{type:Object,default:function(){return{vertical:"bottom",horizontal:"end"}}},positionMode:{type:String,default:function(){return"fixed"}},popupSettings:{type:Object,default:function(){return{}}},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(){return{currentOpened:!1,currentFocused:!1,focusedIndex:-1,currentDir:"ltr",isRtl:!1}},created(){s.validatePackage(y.packageMetadata),this.element=void 0,this._anchor=s.guid(),this.listId=s.guid(),this.buttonId=s.guid()},mounted(){this.element=this.kendoAnchorRef,this.list=s.getRef(this,"list"),this.popup=s.getRef(this,"popup"),this.currentDir=this.$props.dir!==void 0?this.$props.dir:this.$el&&getComputedStyle(this.$el).direction==="rtl"||!1,this.isRtl=this.currentDir==="rtl",this.opened!==void 0&&a.position(this.$el,this.$props.align,this.$props.alignOffset,this.isRtl)},updated(){a.position(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:o,rounded:i}=this.$props;return{"k-fab":!0,[`k-fab-${s.kendoThemeMaps.sizeMap[e]||e}`]:e,[`k-rounded-${s.kendoThemeMaps.roundedMap[i]||i}`]:i,[`k-fab-${o}`]:o,[`k-fab-${t}`]:t,"k-disabled":this.$props.disabled,"k-focus":this.currentFocused,[`k-${this.$props.align.vertical}-${this.$props.align.horizontal}`]:!0}},computedOpened(){return this.$props.opened===void 0?this.currentOpened:this.$props.opened},rootClassNames(){return s.classNames({"k-pos-absolute":this.$props.positionMode==="absolute","k-pos-fixed":this.$props.positionMode==="fixed"})}},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)this.$emit("click",e,void 0);else{const t=!this.computedOpened;this.currentOpened=t,this.currentFocused=!0,this.focusedIndex=t?0:-1,this.dispatchPopupEvent(e,!this.computedOpened)}},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){s.canUseDOM&&document.activeElement===this.element&&e.preventDefault()},handleKeyDown(e){const t=this.focusedIndex,o=this.$props.items?this.$props.items.length-1:-1,i=this.$props.align.vertical==="bottom";switch(e.keyCode){case s.Keys.enter:case s.Keys.space:t>=0&&this.dispatchItemClickEvent(e,t),e.preventDefault(),this.currentOpened=!this.currentOpened,this.focusedIndex=this.currentOpened?-1:0;break;case s.Keys.esc:e.preventDefault(),this.currentOpened=!1,this.focusedIndex=-1;break;case s.Keys.home:e.preventDefault(),this.focusedIndex=0;break;case s.Keys.end:e.preventDefault(),this.focusedIndex=o;break;case s.Keys.down:case s.Keys.right:e.preventDefault(),t<o&&!i&&(this.focusedIndex=t+1),t>0&&i&&(this.focusedIndex=t-1);break;case s.Keys.up:case s.Keys.left:e.preventDefault(),t>0&&!i&&(this.focusedIndex=t-1),t<o&&i&&(this.focusedIndex=t+1);break}this.$emit("keydown",e,void 0)}},setup(){const e=n.ref(null),t=n.ref(null);return{chipRef:e,kendoAnchorRef:t}},render(){const{align:e,disabled:t,icon:o,svgIcon:i,iconClass:p,id:h,items:r,text:u,tabIndex:b,accessKey:g,popupSettings:c}=this.$props,k=s.templateRendering.call(this,this.$props.item,s.getListeners.call(this)),$=function(){return r&&r.map(function(d,l){return n.createVNode(I.FloatingActionButtonItem,{key:l,index:l,id:`${this.listId}-${l}`,disabled:t||d.disabled,focused:this.focusedIndex===l,dataItem:d,item:k,class:s.classNames(d.className,a.getTextDirectionClass(this.currentDir||"ltr",e.horizontal)),onClick:this.handleItemClick,onDown:this.handleItemDown},null)},this)},f=o&&!u,m=(this.element?this.element.offsetWidth:0)/2-32/2;return n.createVNode("div",{class:this.rootClassNames},[n.createVNode("button",{ref:d=>{this.kendoAnchorRef=d},id:h||this.buttonId,role:r?"menubutton":"button",type:"button","aria-disabled":t,"aria-expanded":r?this.computedOpened:void 0,"aria-haspopup":!!r,"aria-label":`${u||""} floatingactionbutton`,"aria-owns":r?this.listId:void 0,"aria-activedescendant":this.focusedIndex>=0&&r?`${this.listId}-${this.focusedIndex}`:void 0,tabindex:s.getTabIndex(b,t),accesskey:g,dir:this.currentDir,disabled:t,class:this.buttonClassNames,onClick:this.handleClick,onMousedown:this.handleMouseDown,onMouseup:this.handleMouseUp,onFocusin:this.handleFocus,onBlur:this.handleBlur,onKeydown:this.handleKeyDown},[o||i?n.createVNode(s.Icon,{name:o,icon:i,class:"k-fab-icon"},null):p?n.createVNode(s.Icon,{class:p},null):null,u&&n.createVNode("span",{class:"k-fab-text"},[u])]),n.createVNode(x.Popup,{ref:s.setRef(this,"popup"),show:this.computedOpened,anchor:this._anchor,animate:c.animate,popupClass:s.classNames("k-popup-transparent k-fab-popup",c.popupClass),anchorAlign:c.anchorAlign||a.getAnchorAlign(e,this.isRtl),popupAlign:c.popupAlign||a.getPopupAlign(e,this.isRtl),style:{boxShadow:"none"}},{default:()=>[n.createVNode("ul",{ref:s.setRef(this,"list"),role:"menu","aria-labelledby":h,id:this.listId,class:s.classNames("k-fab-items",{"k-fab-items-bottom":e.vertical!=="bottom","k-fab-items-top":e.vertical==="bottom"}),style:{paddingLeft:f?m+"px":void 0,paddingRight:f?m+"px":void 0}},[$.call(this)])]})])}});exports.FloatingActionButton=v;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("vue"),s=require("@progress/kendo-vue-common"),y=require("./FloatingActionButtonItem.js"),x=require("../package-metadata.js"),a=require("./utils.js"),v=require("@progress/kendo-vue-popup"),O=n.defineComponent({name:"KendoVueFloatingActionButton",props:{id:String,dir:String,tabIndex:Number,accessKey:String,disabled:{type:Boolean,default:!1},icon:String,svgIcon:Object,iconClass:String,items:[Object,Array],item:[String,Function,Object],text:String,alignOffset:Object,opened:{type:Boolean,default:void 0},align:{type:Object,default:function(){return{vertical:"bottom",horizontal:"end"}}},positionMode:{type:String,default:function(){return"fixed"}},popupSettings:{type:Object,default:function(){return{}}},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(){return{currentOpened:!1,currentFocused:!1,focusedIndex:-1,currentDir:"ltr",isRtl:!1}},created(){s.validatePackage(x.packageMetadata),this.element=void 0,this._anchor=s.guid(),this.listId=s.guid(),this.buttonId=s.guid()},mounted(){this.element=this.kendoAnchorRef,this.list=s.getRef(this,"list"),this.popup=s.getRef(this,"popup"),this.currentDir=this.$props.dir!==void 0?this.$props.dir:this.$el&&getComputedStyle(this.$el).direction==="rtl"||!1,this.isRtl=this.currentDir==="rtl",this.opened!==void 0&&a.position(this.$el,this.$props.align,this.$props.alignOffset,this.isRtl)},updated(){a.position(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:o,rounded:i}=this.$props;return{"k-fab":!0,[`k-fab-${s.kendoThemeMaps.sizeMap[e]||e}`]:e,[`k-rounded-${s.kendoThemeMaps.roundedMap[i]||i}`]:i,[`k-fab-${o}`]:o,[`k-fab-${t}`]:t,"k-disabled":this.$props.disabled,"k-focus":this.currentFocused,[`k-${this.$props.align.vertical}-${this.$props.align.horizontal}`]:!0}},computedOpened(){return this.$props.opened===void 0?this.currentOpened:this.$props.opened},rootClassNames(){return s.classNames({"k-pos-absolute":this.$props.positionMode==="absolute","k-pos-fixed":this.$props.positionMode==="fixed"})}},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)this.$emit("click",e,void 0);else{const t=!this.computedOpened;this.currentOpened=t,this.currentFocused=!0,this.focusedIndex=t?0:-1,this.dispatchPopupEvent(e,!this.computedOpened)}},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){s.canUseDOM&&document.activeElement===this.element&&e.preventDefault()},handleKeyDown(e){const t=this.focusedIndex,o=this.$props.items?this.$props.items.length-1:-1,i=this.$props.align.vertical==="bottom";switch(e.keyCode){case s.Keys.enter:case s.Keys.space:t>=0&&this.dispatchItemClickEvent(e,t),e.preventDefault(),this.currentOpened=!this.currentOpened,this.focusedIndex=this.currentOpened?-1:0;break;case s.Keys.esc:e.preventDefault(),this.currentOpened=!1,this.focusedIndex=-1;break;case s.Keys.home:e.preventDefault(),this.focusedIndex=0;break;case s.Keys.end:e.preventDefault(),this.focusedIndex=o;break;case s.Keys.down:case s.Keys.right:e.preventDefault(),t<o&&!i&&(this.focusedIndex=t+1),t>0&&i&&(this.focusedIndex=t-1);break;case s.Keys.up:case s.Keys.left:e.preventDefault(),t>0&&!i&&(this.focusedIndex=t-1),t<o&&i&&(this.focusedIndex=t+1);break}this.$emit("keydown",e,void 0)}},setup(){const e=n.ref(null),t=n.ref(null);return{chipRef:e,kendoAnchorRef:t}},render(){var b;const{align:e,disabled:t,icon:o,svgIcon:i,iconClass:p,id:h,items:d,text:u,tabIndex:g,accessKey:k,popupSettings:c}=this.$props,$=s.templateRendering.call(this,this.$props.item,s.getListeners.call(this)),I=function(){return d&&d.map(function(r,l){return n.createVNode(y.FloatingActionButtonItem,{key:l,index:l,id:`${this.listId}-${l}`,disabled:t||r.disabled,focused:this.focusedIndex===l,dataItem:r,item:$,class:s.classNames(r.className,a.getTextDirectionClass(this.currentDir||"ltr",e.horizontal)),onClick:this.handleItemClick,onDown:this.handleItemDown},null)},this)},f=o&&!u,m=(this.element?this.element.offsetWidth:0)/2-32/2;return n.createVNode("div",{class:this.rootClassNames},[n.createVNode("button",{ref:r=>{this.kendoAnchorRef=r},id:h||this.buttonId,role:d?"menubutton":"button",type:"button","aria-disabled":t,"aria-expanded":d?this.computedOpened:void 0,"aria-haspopup":!!d,"aria-label":`${u||""} floatingactionbutton`,"aria-owns":d?this.listId:void 0,"aria-activedescendant":this.focusedIndex>=0&&d?`${this.listId}-${this.focusedIndex}`:void 0,tabindex:(b=s.getTabIndex(g,t))!=null?b:0,accesskey:k,dir:this.currentDir,disabled:t,class:this.buttonClassNames,onClick:this.handleClick,onMousedown:this.handleMouseDown,onMouseup:this.handleMouseUp,onFocusin:this.handleFocus,onBlur:this.handleBlur,onKeydown:this.handleKeyDown},[o||i?n.createVNode(s.Icon,{name:o,icon:i,class:"k-fab-icon"},null):p?n.createVNode(s.Icon,{class:p},null):null,u&&n.createVNode("span",{class:"k-fab-text"},[u])]),n.createVNode(v.Popup,{ref:s.setRef(this,"popup"),show:this.computedOpened,anchor:this._anchor,animate:c.animate,popupClass:s.classNames("k-popup-transparent k-fab-popup",c.popupClass),anchorAlign:c.anchorAlign||a.getAnchorAlign(e,this.isRtl),popupAlign:c.popupAlign||a.getPopupAlign(e,this.isRtl),style:{boxShadow:"none"}},{default:()=>[n.createVNode("ul",{ref:s.setRef(this,"list"),role:"menu","aria-labelledby":h,id:this.listId,class:s.classNames("k-fab-items",{"k-fab-items-bottom":e.vertical!=="bottom","k-fab-items-top":e.vertical==="bottom"}),style:{paddingLeft:f?m+"px":void 0,paddingRight:f?m+"px":void 0}},[I.call(this)])]})])}});exports.FloatingActionButton=O;
@@ -5,13 +5,13 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- import { defineComponent as w, createVNode as o, ref as g } from "vue";
9
- import { templateRendering as M, getListeners as S, getTabIndex as A, Icon as $, classNames as p, setRef as k, Keys as n, canUseDOM as F, kendoThemeMaps as I, getRef as x, validatePackage as R, guid as c } from "@progress/kendo-vue-common";
10
- import { FloatingActionButtonItem as E } from "./FloatingActionButtonItem.mjs";
11
- import { packageMetadata as B } from "../package-metadata.mjs";
12
- import { getPopupAlign as N, getAnchorAlign as P, position as O, getTextDirectionClass as K } from "./utils.mjs";
13
- import { Popup as j } from "@progress/kendo-vue-popup";
14
- const G = /* @__PURE__ */ w({
8
+ import { defineComponent as M, createVNode as o, ref as $ } from "vue";
9
+ import { templateRendering as S, getListeners as A, getTabIndex as F, Icon as k, classNames as p, setRef as I, Keys as n, canUseDOM as R, kendoThemeMaps as x, getRef as O, validatePackage as E, guid as c } from "@progress/kendo-vue-common";
10
+ import { FloatingActionButtonItem as B } from "./FloatingActionButtonItem.mjs";
11
+ import { packageMetadata as N } from "../package-metadata.mjs";
12
+ import { getPopupAlign as P, getAnchorAlign as K, position as v, getTextDirectionClass as j } from "./utils.mjs";
13
+ import { Popup as z } from "@progress/kendo-vue-popup";
14
+ const H = /* @__PURE__ */ M({
15
15
  name: "KendoVueFloatingActionButton",
16
16
  props: {
17
17
  id: String,
@@ -85,13 +85,13 @@ const G = /* @__PURE__ */ w({
85
85
  };
86
86
  },
87
87
  created() {
88
- R(B), this.element = void 0, this._anchor = c(), this.listId = c(), this.buttonId = c();
88
+ E(N), this.element = void 0, this._anchor = c(), this.listId = c(), this.buttonId = c();
89
89
  },
90
90
  mounted() {
91
- this.element = this.kendoAnchorRef, this.list = x(this, "list"), this.popup = x(this, "popup"), this.currentDir = this.$props.dir !== void 0 ? this.$props.dir : this.$el && getComputedStyle(this.$el).direction === "rtl" || !1, this.isRtl = this.currentDir === "rtl", this.opened !== void 0 && O(this.$el, this.$props.align, this.$props.alignOffset, this.isRtl);
91
+ this.element = this.kendoAnchorRef, this.list = O(this, "list"), this.popup = O(this, "popup"), this.currentDir = this.$props.dir !== void 0 ? this.$props.dir : this.$el && getComputedStyle(this.$el).direction === "rtl" || !1, this.isRtl = this.currentDir === "rtl", this.opened !== void 0 && v(this.$el, this.$props.align, this.$props.alignOffset, this.isRtl);
92
92
  },
93
93
  updated() {
94
- O(this.$el, this.$props.align, this.$props.alignOffset, this.isRtl), this.currentFocused && this.element && this.element.focus();
94
+ v(this.$el, this.$props.align, this.$props.alignOffset, this.isRtl), this.currentFocused && this.element && this.element.focus();
95
95
  },
96
96
  computed: {
97
97
  buttonClassNames() {
@@ -103,8 +103,8 @@ const G = /* @__PURE__ */ w({
103
103
  } = this.$props;
104
104
  return {
105
105
  "k-fab": !0,
106
- [`k-fab-${I.sizeMap[e] || e}`]: e,
107
- [`k-rounded-${I.roundedMap[s] || s}`]: s,
106
+ [`k-fab-${x.sizeMap[e] || e}`]: e,
107
+ [`k-rounded-${x.roundedMap[s] || s}`]: s,
108
108
  [`k-fab-${i}`]: i,
109
109
  [`k-fab-${t}`]: t,
110
110
  "k-disabled": this.$props.disabled,
@@ -164,7 +164,7 @@ const G = /* @__PURE__ */ w({
164
164
  !e.target || !this.$props.items || (this.focusedIndex = t, this.currentOpened = !1, this.dispatchItemClickEvent(e, t), this.dispatchPopupEvent(e, !1));
165
165
  },
166
166
  handleItemDown(e) {
167
- F && document.activeElement === this.element && e.preventDefault();
167
+ R && document.activeElement === this.element && e.preventDefault();
168
168
  },
169
169
  handleKeyDown(e) {
170
170
  const t = this.focusedIndex, i = this.$props.items ? this.$props.items.length - 1 : -1, s = this.$props.align.vertical === "bottom";
@@ -195,13 +195,14 @@ const G = /* @__PURE__ */ w({
195
195
  }
196
196
  },
197
197
  setup() {
198
- const e = g(null), t = g(null);
198
+ const e = $(null), t = $(null);
199
199
  return {
200
200
  chipRef: e,
201
201
  kendoAnchorRef: t
202
202
  };
203
203
  },
204
204
  render() {
205
+ var g;
205
206
  const {
206
207
  align: e,
207
208
  disabled: t,
@@ -211,20 +212,20 @@ const G = /* @__PURE__ */ w({
211
212
  id: f,
212
213
  items: r,
213
214
  text: a,
214
- tabIndex: v,
215
- accessKey: C,
215
+ tabIndex: C,
216
+ accessKey: y,
216
217
  popupSettings: l
217
- } = this.$props, y = M.call(this, this.$props.item, S.call(this)), D = function() {
218
+ } = this.$props, D = S.call(this, this.$props.item, A.call(this)), w = function() {
218
219
  return r && r.map(function(d, u) {
219
- return o(E, {
220
+ return o(B, {
220
221
  key: u,
221
222
  index: u,
222
223
  id: `${this.listId}-${u}`,
223
224
  disabled: t || d.disabled,
224
225
  focused: this.focusedIndex === u,
225
226
  dataItem: d,
226
- item: y,
227
- class: p(d.className, K(this.currentDir || "ltr", e.horizontal)),
227
+ item: D,
228
+ class: p(d.className, j(this.currentDir || "ltr", e.horizontal)),
228
229
  onClick: this.handleItemClick,
229
230
  onDown: this.handleItemDown
230
231
  }, null);
@@ -245,8 +246,8 @@ const G = /* @__PURE__ */ w({
245
246
  "aria-label": `${a || ""} floatingactionbutton`,
246
247
  "aria-owns": r ? this.listId : void 0,
247
248
  "aria-activedescendant": this.focusedIndex >= 0 && r ? `${this.listId}-${this.focusedIndex}` : void 0,
248
- tabindex: A(v, t),
249
- accesskey: C,
249
+ tabindex: (g = F(C, t)) != null ? g : 0,
250
+ accesskey: y,
250
251
  dir: this.currentDir,
251
252
  disabled: t,
252
253
  class: this.buttonClassNames,
@@ -256,28 +257,28 @@ const G = /* @__PURE__ */ w({
256
257
  onFocusin: this.handleFocus,
257
258
  onBlur: this.handleBlur,
258
259
  onKeydown: this.handleKeyDown
259
- }, [i || s ? o($, {
260
+ }, [i || s ? o(k, {
260
261
  name: i,
261
262
  icon: s,
262
263
  class: "k-fab-icon"
263
- }, null) : h ? o($, {
264
+ }, null) : h ? o(k, {
264
265
  class: h
265
266
  }, null) : null, a && o("span", {
266
267
  class: "k-fab-text"
267
- }, [a])]), o(j, {
268
- ref: k(this, "popup"),
268
+ }, [a])]), o(z, {
269
+ ref: I(this, "popup"),
269
270
  show: this.computedOpened,
270
271
  anchor: this._anchor,
271
272
  animate: l.animate,
272
273
  popupClass: p("k-popup-transparent k-fab-popup", l.popupClass),
273
- anchorAlign: l.anchorAlign || P(e, this.isRtl),
274
- popupAlign: l.popupAlign || N(e, this.isRtl),
274
+ anchorAlign: l.anchorAlign || K(e, this.isRtl),
275
+ popupAlign: l.popupAlign || P(e, this.isRtl),
275
276
  style: {
276
277
  boxShadow: "none"
277
278
  }
278
279
  }, {
279
280
  default: () => [o("ul", {
280
- ref: k(this, "list"),
281
+ ref: I(this, "list"),
281
282
  role: "menu",
282
283
  "aria-labelledby": f,
283
284
  id: this.listId,
@@ -289,10 +290,10 @@ const G = /* @__PURE__ */ w({
289
290
  paddingLeft: m ? b + "px" : void 0,
290
291
  paddingRight: m ? b + "px" : void 0
291
292
  }
292
- }, [D.call(this)])]
293
+ }, [w.call(this)])]
293
294
  })]);
294
295
  }
295
296
  });
296
297
  export {
297
- G as FloatingActionButton
298
+ H as FloatingActionButton
298
299
  };
@@ -154,16 +154,10 @@ export interface FloatingActionButtonProps extends Omit<any, 'onBlur' | 'onFocus
154
154
  * [see example]({% slug appearance_floatingactionbutton %}).
155
155
  *
156
156
  * The possible values are:
157
- * * `primary` (Default)&mdash;Applies coloring based on the primary theme color.
157
+ * * `base` (Default)&mdash;Applies base coloring.
158
+ * * `primary`&mdash;Applies coloring based on the primary theme color.
158
159
  * * `secondary`&mdash;Applies coloring based on the secondary theme color.
159
160
  * * `tertiary`&mdash; Applies coloring based on the tertiary theme color.
160
- * * `info`&mdash;Applies coloring based on the info theme color.
161
- * * `success`&mdash; Applies coloring based on the success theme color.
162
- * * `warning`&mdash; Applies coloring based on the warning theme color.
163
- * * `error`&mdash; Applies coloring based on the error theme color.
164
- * * `dark`&mdash; Applies coloring based on the dark theme color.
165
- * * `light`&mdash; Applies coloring based on the light theme color.
166
- * * `inverse`&mdash; Applies coloring based on the inverse theme color.
167
161
  *
168
162
  */
169
163
  themeColor?: FloatingActionButtonThemeColor;
@@ -9,16 +9,10 @@
9
9
  * Specifies the theme color of the Floating Action Button..
10
10
  *
11
11
  * The possible values are:
12
- * * `primary` (Default)&mdash;Applies coloring based on the primary theme color.
12
+ * * `base` (Default)&mdash;Applies base coloring.
13
+ * * `primary`&mdash;Applies coloring based on the primary theme color.
13
14
  * * `secondary`&mdash;Applies coloring based on the secondary theme color.
14
15
  * * `tertiary`&mdash; Applies coloring based on the tertiary theme color.
15
- * * `info`&mdash;Applies coloring based on the info theme color.
16
- * * `success`&mdash; Applies coloring based on the success theme color.
17
- * * `warning`&mdash; Applies coloring based on the warning theme color.
18
- * * `error`&mdash; Applies coloring based on the error theme color.
19
- * * `dark`&mdash; Applies coloring based on the dark theme color.
20
- * * `light`&mdash; Applies coloring based on the light theme color.
21
- * * `inverse`&mdash; Applies coloring based on the inverse theme color.
22
16
  *
23
17
  */
24
- export type FloatingActionButtonThemeColor = 'primary' | 'secondary' | 'tertiary' | 'info' | 'success' | 'warning' | 'error' | 'dark' | 'light' | 'inverse';
18
+ export type FloatingActionButtonThemeColor = 'base' | 'primary' | 'secondary' | 'tertiary';
@@ -73,14 +73,14 @@ declare const DropDownButton: import('vue').DefineComponent<import('vue').Extrac
73
73
  popupSettings: PropType<import('..').ButtonsPopupSettings>;
74
74
  itemRender: PropType<any>;
75
75
  item: PropType<any>;
76
- size: PropType<"small" | "medium" | "large">;
76
+ size: PropType<"small" | "medium" | "xs" | "large">;
77
77
  rounded: PropType<"small" | "medium" | "large" | "full" | "none">;
78
78
  fillMode: {
79
79
  type: PropType<"flat" | "link" | "solid" | "outline">;
80
80
  validator: (value: string) => boolean;
81
81
  };
82
82
  themeColor: {
83
- type: PropType<"base" | "primary" | "secondary" | "tertiary" | "info" | "success" | "warning" | "dark" | "light" | "inverse">;
83
+ type: PropType<"base" | "primary" | "secondary" | "tertiary" | "info" | "success" | "warning" | "error" | "inverse">;
84
84
  validator: (value: string) => boolean;
85
85
  };
86
86
  opened: {
@@ -139,14 +139,14 @@ declare const DropDownButton: import('vue').DefineComponent<import('vue').Extrac
139
139
  popupSettings: PropType<import('..').ButtonsPopupSettings>;
140
140
  itemRender: PropType<any>;
141
141
  item: PropType<any>;
142
- size: PropType<"small" | "medium" | "large">;
142
+ size: PropType<"small" | "medium" | "xs" | "large">;
143
143
  rounded: PropType<"small" | "medium" | "large" | "full" | "none">;
144
144
  fillMode: {
145
145
  type: PropType<"flat" | "link" | "solid" | "outline">;
146
146
  validator: (value: string) => boolean;
147
147
  };
148
148
  themeColor: {
149
- type: PropType<"base" | "primary" | "secondary" | "tertiary" | "info" | "success" | "warning" | "dark" | "light" | "inverse">;
149
+ type: PropType<"base" | "primary" | "secondary" | "tertiary" | "info" | "success" | "warning" | "error" | "inverse">;
150
150
  validator: (value: string) => boolean;
151
151
  };
152
152
  opened: {
@@ -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"),g=require("../Button.js"),s=require("@progress/kendo-vue-common"),y=require("./utils/navigation.js"),b=require("./ButtonItem.js"),k=require("@progress/kendo-vue-popup"),a=require("./utils/popup.js"),$=require("../package-metadata.js"),C=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","dark","error","info","inverse","light","primary","secondary","success","tertiary","warning"].includes(e)}},opened:{type:Boolean,default:void 0},buttonClass:String,dir:String},created(){this._blurTimeout=null,this._anchor=s.guid(),this.wrapper=null,this.mainButton=null,this.guid=s.guid(),this.buttonsData=[],s.validatePackage($.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(){return{"k-dropdown-button":!0,"k-focus":this.focused}}},setup(){return{kendoAnchorRef:i.ref(null)}},render(){const e=this.isRtl(),t=e?"rtl":void 0,{tabIndex:n,disabled:p}=this.$props,c=s.getDefaultSlots(this);this.buttonsData=this.$props.items;const h=function(){const{item:o,itemRender:r,textField:f}=this.$props;return this.buttonsData.length>0?this.buttonsData.map(function(u,d){const m=typeof u!="string"?{...u,render:s.templateRendering.call(this,u.render,s.getListeners.call(this))}:u;return i.createVNode(b.ButtonItem,{class:"k-menu-item",dataItem:m,textField:f,focused:this.focusedIndex===d,onClick:this.onItemClick,onDown:this.onItemDown,render:s.templateRendering.call(this,r,s.getListeners.call(this)),item:o,index:d,key:d,id:`${this.guid}-${d}`},null)},this):null},l=function(){const{popupSettings:o={},size:r}=this.$props;return i.createVNode(k.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-group k-menu-group k-reset k-menu-group-${s.kendoThemeMaps.sizeMap[r]||r}`,role:"menu",id:this.guid},[h.call(this)])]})};return i.createVNode("div",{class:this.wrapperClass,onKeydown:this.onKeyDown,onFocusin:this.onFocus,onFocusout:this.onBlur,dir:t},[i.createVNode(g.Button,{size:this.$props.size,rounded:this.$props.rounded,fillMode:this.$props.fillMode,themeColor:this.$props.themeColor,onClick:this.onClickMainButton,onMousedown:this.mouseDown,disabled:p||void 0,tabIndex:n,accessKey:this.$props.accessKey,icon:this.$props.icon,svgIcon:this.$props.svgIcon,iconClass:this.$props.iconClass,class:this.$props.buttonClass,imageUrl:this.$props.imageUrl,dir:t,ref:this._anchor,type:"button","aria-disabled":p,"aria-haspopup":"menu","aria-expanded":this.computedOpened,"aria-label":this.$props.ariaLabel||`${this.$props.text||""} dropdownbutton`,"aria-controls":this.guid,"aria-activedescendant":this.focusedIndex!==void 0&&this.focusedIndex>=0?`${this.guid}-${this.focusedIndex}`:void 0},{default:()=>[this.$props.text,c]}),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=y(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=C;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("vue"),g=require("../Button.js"),s=require("@progress/kendo-vue-common"),y=require("./utils/navigation.js"),b=require("./ButtonItem.js"),k=require("@progress/kendo-vue-popup"),c=require("./utils/popup.js"),$=require("../package-metadata.js"),C=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($.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(){return{"k-dropdown-button":!0,"k-focus":this.focused}}},setup(){return{kendoAnchorRef:i.ref(null)}},render(){const e=this.isRtl(),t=e?"rtl":void 0,{tabIndex:n,disabled:p}=this.$props,a=s.getDefaultSlots(this);this.buttonsData=this.$props.items;const h=function(){const{item:o,itemRender:r,textField:f}=this.$props;return this.buttonsData.length>0?this.buttonsData.map(function(u,d){const m=typeof u!="string"?{...u,render:s.templateRendering.call(this,u.render,s.getListeners.call(this))}:u;return i.createVNode(b.ButtonItem,{class:"k-menu-item",dataItem:m,textField:f,focused:this.focusedIndex===d,onClick:this.onItemClick,onDown:this.onItemDown,render:s.templateRendering.call(this,r,s.getListeners.call(this)),item:o,index:d,key:d,id:`${this.guid}-${d}`},null)},this):null},l=function(){const{popupSettings:o={},size:r}=this.$props;return i.createVNode(k.Popup,{anchor:this._anchor,show:this.computedOpened,animate:o.animate,popupClass:s.classNames("k-menu-popup",o.popupClass),anchorAlign:o.anchorAlign||c.getAnchorAlign(e),popupAlign:o.popupAlign||c.getPopupAlign(e),style:e?{direction:"rtl"}:void 0},{default:()=>[i.createVNode("ul",{class:`k-group k-menu-group k-reset k-menu-group-${s.kendoThemeMaps.sizeMap[r]||r}`,role:"menu",id:this.guid},[h.call(this)])]})};return i.createVNode("div",{class:this.wrapperClass,onKeydown:this.onKeyDown,onFocusin:this.onFocus,onFocusout:this.onBlur,dir:t},[i.createVNode(g.Button,{size:this.$props.size,rounded:this.$props.rounded,fillMode:this.$props.fillMode,themeColor:this.$props.themeColor,onClick:this.onClickMainButton,onMousedown:this.mouseDown,disabled:p||void 0,tabIndex:n,accessKey:this.$props.accessKey,icon:this.$props.icon,svgIcon:this.$props.svgIcon,iconClass:this.$props.iconClass,class:this.$props.buttonClass,imageUrl:this.$props.imageUrl,dir:t,ref:this._anchor,type:"button","aria-disabled":p,"aria-haspopup":"menu","aria-expanded":this.computedOpened,"aria-label":this.$props.ariaLabel||`${this.$props.text||""} dropdownbutton`,"aria-controls":this.guid,"aria-activedescendant":this.focusedIndex!==void 0&&this.focusedIndex>=0?`${this.guid}-${this.focusedIndex}`:void 0},{default:()=>[this.$props.text,a]}),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=y(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=C;
@@ -53,7 +53,7 @@ const U = /* @__PURE__ */ $({
53
53
  themeColor: {
54
54
  type: String,
55
55
  validator: function(e) {
56
- return ["base", "dark", "error", "info", "inverse", "light", "primary", "secondary", "success", "tertiary", "warning"].includes(e);
56
+ return ["base", "error", "info", "inverse", "primary", "secondary", "success", "tertiary", "warning"].includes(e);
57
57
  }
58
58
  },
59
59
  opened: {
@@ -107,23 +107,23 @@ const U = /* @__PURE__ */ $({
107
107
  itemRender: r,
108
108
  textField: g
109
109
  } = this.$props;
110
- return this.buttonsData.length > 0 ? this.buttonsData.map(function(d, u) {
111
- const b = typeof d != "string" ? {
112
- ...d,
113
- render: c.call(this, d.render, h.call(this))
114
- } : d;
110
+ return this.buttonsData.length > 0 ? this.buttonsData.map(function(u, d) {
111
+ const b = typeof u != "string" ? {
112
+ ...u,
113
+ render: c.call(this, u.render, h.call(this))
114
+ } : u;
115
115
  return o(S, {
116
116
  class: "k-menu-item",
117
117
  dataItem: b,
118
118
  textField: g,
119
- focused: this.focusedIndex === u,
119
+ focused: this.focusedIndex === d,
120
120
  onClick: this.onItemClick,
121
121
  onDown: this.onItemDown,
122
122
  render: c.call(this, r, h.call(this)),
123
123
  item: n,
124
- index: u,
125
- key: u,
126
- id: `${this.guid}-${u}`
124
+ index: d,
125
+ key: d,
126
+ id: `${this.guid}-${d}`
127
127
  }, null);
128
128
  }, this) : null;
129
129
  }, m = function() {
@@ -69,14 +69,14 @@ declare const SplitButton: import('vue').DefineComponent<import('vue').ExtractPr
69
69
  disabled: PropType<boolean>;
70
70
  icon: PropType<string>;
71
71
  svgIcon: PropType<import('@progress/kendo-vue-common').SVGIcon>;
72
- size: PropType<"small" | "medium" | "large">;
72
+ size: PropType<"small" | "medium" | "xs" | "large">;
73
73
  rounded: PropType<"small" | "medium" | "large" | "full" | "none">;
74
74
  fillMode: {
75
75
  type: PropType<"flat" | "link" | "solid" | "outline">;
76
76
  validator: (value: string) => boolean;
77
77
  };
78
78
  themeColor: {
79
- type: PropType<"base" | "primary" | "secondary" | "tertiary" | "info" | "success" | "warning" | "dark" | "light" | "inverse">;
79
+ type: PropType<"base" | "primary" | "secondary" | "tertiary" | "info" | "success" | "warning" | "error" | "inverse">;
80
80
  validator: (value: string) => boolean;
81
81
  };
82
82
  opened: {
@@ -138,14 +138,14 @@ declare const SplitButton: import('vue').DefineComponent<import('vue').ExtractPr
138
138
  disabled: PropType<boolean>;
139
139
  icon: PropType<string>;
140
140
  svgIcon: PropType<import('@progress/kendo-vue-common').SVGIcon>;
141
- size: PropType<"small" | "medium" | "large">;
141
+ size: PropType<"small" | "medium" | "xs" | "large">;
142
142
  rounded: PropType<"small" | "medium" | "large" | "full" | "none">;
143
143
  fillMode: {
144
144
  type: PropType<"flat" | "link" | "solid" | "outline">;
145
145
  validator: (value: string) => boolean;
146
146
  };
147
147
  themeColor: {
148
- type: PropType<"base" | "primary" | "secondary" | "tertiary" | "info" | "success" | "warning" | "dark" | "light" | "inverse">;
148
+ type: PropType<"base" | "primary" | "secondary" | "tertiary" | "info" | "success" | "warning" | "error" | "inverse">;
149
149
  validator: (value: string) => boolean;
150
150
  };
151
151
  opened: {