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

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
+ * - xsmall
22
23
  * - small
23
24
  * - medium
24
25
  * - large
25
26
  *
26
27
  * @default `undefined`
27
28
  */
28
- size?: 'small' | 'medium' | 'large';
29
+ size?: 'xsmall' | 'small' | 'medium' | 'large';
29
30
  /**
30
31
  * Configures the `roundness` of the Button.
31
32
  *
@@ -164,7 +165,7 @@ declare const Button: import('vue').DefineComponent<import('vue').ExtractPropTyp
164
165
  type: PropType<boolean>;
165
166
  default: any;
166
167
  };
167
- size: PropType<"small" | "medium" | "large">;
168
+ size: PropType<"small" | "medium" | "xsmall" | "large">;
168
169
  rounded: PropType<"small" | "medium" | "large" | "full" | "none">;
169
170
  fillMode: PropType<"flat" | "link" | "solid" | "outline">;
170
171
  themeColor: PropType<"base" | "primary" | "secondary" | "tertiary" | "info" | "success" | "warning" | "dark" | "light" | "inverse">;
@@ -242,7 +243,7 @@ declare const Button: import('vue').DefineComponent<import('vue').ExtractPropTyp
242
243
  type: PropType<boolean>;
243
244
  default: any;
244
245
  };
245
- size: PropType<"small" | "medium" | "large">;
246
+ size: PropType<"small" | "medium" | "xsmall" | "large">;
246
247
  rounded: PropType<"small" | "medium" | "large" | "full" | "none">;
247
248
  fillMode: PropType<"flat" | "link" | "solid" | "outline">;
248
249
  themeColor: PropType<"base" | "primary" | "secondary" | "tertiary" | "info" | "success" | "warning" | "dark" | "light" | "inverse">;
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
  };
package/Chip/Chip.d.ts CHANGED
@@ -171,6 +171,10 @@ export interface ChipProps {
171
171
  * For example these elements could contain error or hint message.
172
172
  */
173
173
  ariaDescribedBy?: string;
174
+ /**
175
+ * Identifies the accessible name for the Chip component.
176
+ */
177
+ ariaLabel?: string;
174
178
  /**
175
179
  * @hidden
176
180
  */
@@ -252,6 +256,7 @@ declare const Chip: import('vue').DefineComponent<import('vue').ExtractPropTypes
252
256
  default: string;
253
257
  };
254
258
  tabIndex: PropType<number>;
259
+ ariaLabel: PropType<string>;
255
260
  onMousedown: PropType<(event: any) => void>;
256
261
  }>, {
257
262
  chipRef: import('vue').Ref<any, any>;
@@ -330,6 +335,7 @@ declare const Chip: import('vue').DefineComponent<import('vue').ExtractPropTypes
330
335
  default: string;
331
336
  };
332
337
  tabIndex: PropType<number>;
338
+ ariaLabel: PropType<string>;
333
339
  onMousedown: PropType<(event: any) => void>;
334
340
  }>> & Readonly<{
335
341
  onClick?: (event: ChipMouseEvent) => any;
package/Chip/Chip.js CHANGED
@@ -5,4 +5,4 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("vue"),t=require("@progress/kendo-vue-common"),m=require("@progress/kendo-svg-icons"),o=require("./focus-reducer.js"),$=require("./data-reducer.js"),l=require("./selection-reducer.js"),S=require("../package-metadata.js"),b=a.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 m.xCircleIcon}},disabled:{type:Boolean,default:!1},icon:String,svgIcon:Object,selectedIcon:{type:String,default:function(){return"check"}},selectedSvgIcon:{type:Object,default:function(){return m.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,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:t.noop},handleDispatchSelection:{default:t.noop},handleDispatchFocus:{default:t.noop}},created(){this.currentDir=void 0,t.validatePackage(S.packageMetadata)},mounted(){this.chip=t.getRef(this,"chip"),this.currentDir=this.$props.dir!==void 0?this.$props.dir==="rtl":this.$el&&getComputedStyle(this.$el).direction==="rtl"||!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(){return{"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:l.SELECTION_ACTION.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:$.DATA_ACTION.remove,payload:this.$props.value,event:e}),this.handleDispatchFocus({type:o.FOCUS_ACTION.reset,payload:this.$props.value,event:e}),this.handleDispatchSelection({type:l.SELECTION_ACTION.remove,payload:this.$props.value,event:e})),this.$emit("remove",{target:this.target,event:e}))},handleKeyDown(e){switch(e.keyCode){case t.Keys.left:this.handleDispatchFocus&&this.handleDispatchFocus({type:o.FOCUS_ACTION.prev,payload:this.$props.value,event:e});break;case t.Keys.right:this.handleDispatchFocus&&this.handleDispatchFocus({type:o.FOCUS_ACTION.next,payload:this.$props.value,event:e});break;case t.Keys.enter:this.handleDispatchFocus&&this.handleDispatchSelection({type:l.SELECTION_ACTION.toggle,payload:this.$props.value,event:e});break;case t.Keys.delete:this.handleRemove(e);break}this.$emit("keydown",{target:this.target,event:e})},handleFocus(e){this.handleDispatchFocus&&this.handleDispatchFocus({payload:this.$props.value,type:o.FOCUS_ACTION.current,event:e}),this.$emit("focus",{target:this.target,event:e})},handleBlur(e){this.$emit("blur",{target:this.target,event:e})}},setup(){return{chipRef:a.ref(null)}},render(){const{size:e,rounded:n,themeColor:c,fillMode:r,look:s,avatar:i,icon:d,svgIcon:h,selectedIcon:u,selectedSvgIcon:p,removeIcon:v,removeSvgIcon:f}=this.$props,g=t.templateRendering.call(this,i,t.getListeners.call(this)),k=i?a.createVNode("div",{class:`k-chip-avatar k-avatar k-rounded-${i.rounded||"medium"} k-avatar-${t.kendoThemeMaps.sizeMap[e]||e} k-avatar-solid k-avatar-solid-primary`,style:i.style},[a.createVNode("span",{class:"k-avatar-image"},[a.createVNode("img",{src:i.imageUrl,alt:i.imageAlt},null)])]):null,y=t.getTemplate.call(this,{h:a.h,template:g});return a.createVNode("div",{role:this.$props.role,id:this.$props.value,ref:t.setRef(this,"chip"),dir:this.currentDir,tabindex:t.getTabIndex(this.$props.tabIndex,this.$props.disabled,void 0),class:t.classNames("k-chip",{"k-rtl":this.currentDir==="rtl","k-disabled":this.$props.disabled,"k-selected":this.currentSelected,"k-focus":this.computedFocused(),[`k-chip-${t.kendoThemeMaps.sizeMap[e]||e}`]:e,[`k-rounded-${t.kendoThemeMaps.roundedMap[n]||n}`]:n,[`k-chip-${r}`]:r,[`k-chip-${c}`]:c,"k-chip-outline":s==="outline"||s==="outlined","k-chip-solid":s==="solid"||s==="filled"||r==="solid"}),"aria-pressed":this.$props.role==="button"?this.currentSelected:void 0,"aria-selected":this.$props.role==="option"?this.currentSelected:void 0,"aria-disabled":this.$props.disabled,"aria-describedby":this.$props.ariaDescribedBy,onFocus:this.handleFocus,onBlur:this.handleBlur,onClick:this.handleClick,onKeydown:this.handleKeyDown,onMousedown:this.handleMouseDown},[this.currentSelected&&(u||p)&&a.createVNode(t.Icon,{name:t.getIconName(u),icon:p,size:"small"},null),(d||h)&&a.createVNode(t.Icon,{name:t.getIconName(d),icon:h,size:"small"},null),i?i.imageUrl?k:y:null,a.createVNode("span",{class:"k-chip-content"},[this.$props.text&&a.createVNode("span",{"aria-label":this.$props.text,class:this.chipLabelClass},[this.$props.text])]),this.$props.removable&&a.createVNode("span",{class:"k-chip-actions"},[a.createVNode("span",{class:"k-chip-action k-chip-remove-action"},[a.createVNode(t.Icon,{name:t.getIconName(v),icon:f,size:"small",onClick:this.handleRemove},null)])])])}});exports.Chip=b;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("vue"),t=require("@progress/kendo-vue-common"),m=require("@progress/kendo-svg-icons"),o=require("./focus-reducer.js"),$=require("./data-reducer.js"),l=require("./selection-reducer.js"),S=require("../package-metadata.js"),b=a.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 m.xCircleIcon}},disabled:{type:Boolean,default:!1},icon:String,svgIcon:Object,selectedIcon:{type:String,default:function(){return"check"}},selectedSvgIcon:{type:Object,default:function(){return m.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:t.noop},handleDispatchSelection:{default:t.noop},handleDispatchFocus:{default:t.noop}},created(){this.currentDir=void 0,t.validatePackage(S.packageMetadata)},mounted(){this.chip=t.getRef(this,"chip"),this.currentDir=this.$props.dir!==void 0?this.$props.dir==="rtl":this.$el&&getComputedStyle(this.$el).direction==="rtl"||!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(){return{"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:l.SELECTION_ACTION.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:$.DATA_ACTION.remove,payload:this.$props.value,event:e}),this.handleDispatchFocus({type:o.FOCUS_ACTION.reset,payload:this.$props.value,event:e}),this.handleDispatchSelection({type:l.SELECTION_ACTION.remove,payload:this.$props.value,event:e})),this.$emit("remove",{target:this.target,event:e}))},handleKeyDown(e){switch(e.keyCode){case t.Keys.left:this.handleDispatchFocus&&this.handleDispatchFocus({type:o.FOCUS_ACTION.prev,payload:this.$props.value,event:e});break;case t.Keys.right:this.handleDispatchFocus&&this.handleDispatchFocus({type:o.FOCUS_ACTION.next,payload:this.$props.value,event:e});break;case t.Keys.enter:this.handleDispatchFocus&&this.handleDispatchSelection({type:l.SELECTION_ACTION.toggle,payload:this.$props.value,event:e});break;case t.Keys.delete:this.handleRemove(e);break}this.$emit("keydown",{target:this.target,event:e})},handleFocus(e){this.handleDispatchFocus&&this.handleDispatchFocus({payload:this.$props.value,type:o.FOCUS_ACTION.current,event:e}),this.$emit("focus",{target:this.target,event:e})},handleBlur(e){this.$emit("blur",{target:this.target,event:e})}},setup(){return{chipRef:a.ref(null)}},render(){const{size:e,rounded:n,themeColor:c,fillMode:r,look:s,avatar:i,icon:d,svgIcon:h,selectedIcon:u,selectedSvgIcon:p,removeIcon:f,removeSvgIcon:v}=this.$props,g=t.templateRendering.call(this,i,t.getListeners.call(this)),k=i?a.createVNode("div",{class:`k-chip-avatar k-avatar k-rounded-${i.rounded||"medium"} k-avatar-${t.kendoThemeMaps.sizeMap[e]||e} k-avatar-solid k-avatar-solid-primary`,style:i.style},[a.createVNode("span",{class:"k-avatar-image"},[a.createVNode("img",{src:i.imageUrl,alt:i.imageAlt},null)])]):null,y=t.getTemplate.call(this,{h:a.h,template:g});return a.createVNode("div",{role:this.$props.role,id:this.$props.value,ref:t.setRef(this,"chip"),dir:this.currentDir,tabindex:t.getTabIndex(this.$props.tabIndex,this.$props.disabled,void 0),class:t.classNames("k-chip",{"k-rtl":this.currentDir==="rtl","k-disabled":this.$props.disabled,"k-selected":this.currentSelected,"k-focus":this.computedFocused(),[`k-chip-${t.kendoThemeMaps.sizeMap[e]||e}`]:e,[`k-rounded-${t.kendoThemeMaps.roundedMap[n]||n}`]:n,[`k-chip-${r}`]:r,[`k-chip-${c}`]:c,"k-chip-outline":s==="outline"||s==="outlined","k-chip-solid":s==="solid"||s==="filled"||r==="solid"}),"aria-pressed":this.$props.role==="button"?this.currentSelected:void 0,"aria-selected":this.$props.role==="option"?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&&(u||p)&&a.createVNode(t.Icon,{name:t.getIconName(u),icon:p,size:"small"},null),(d||h)&&a.createVNode(t.Icon,{name:t.getIconName(d),icon:h,size:"small",class:"k-chip-icon"},null),i?i.imageUrl?k:y:null,a.createVNode("span",{class:"k-chip-content"},[this.$props.text&&a.createVNode("span",{class:this.chipLabelClass},[this.$props.text])]),this.$props.removable&&a.createVNode("span",{class:"k-chip-actions"},[a.createVNode("span",{class:"k-chip-action k-chip-remove-action"},[a.createVNode(t.Icon,{name:t.getIconName(f),icon:v,size:"small",onClick:this.handleRemove},null)])])])}});exports.Chip=b;
package/Chip/Chip.mjs CHANGED
@@ -6,7 +6,7 @@
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
8
  import { defineComponent as D, createVNode as t, h as I, ref as F } from "vue";
9
- import { noop as n, templateRendering as C, getListeners as w, kendoThemeMaps as c, getTemplate as x, classNames as M, getTabIndex as O, setRef as R, Icon as d, getIconName as h, Keys as a, getRef as T, validatePackage as A } from "@progress/kendo-vue-common";
9
+ import { noop as r, templateRendering as C, getListeners as w, kendoThemeMaps as c, getTemplate as x, classNames as M, getTabIndex as O, setRef as R, Icon as d, getIconName as h, Keys as s, getRef as T, validatePackage as A } from "@progress/kendo-vue-common";
10
10
  import { checkIcon as B, xCircleIcon as N } from "@progress/kendo-svg-icons";
11
11
  import { FOCUS_ACTION as o } from "./focus-reducer.mjs";
12
12
  import { DATA_ACTION as j } from "./data-reducer.mjs";
@@ -85,6 +85,7 @@ const q = /* @__PURE__ */ D({
85
85
  default: "button"
86
86
  },
87
87
  tabIndex: Number,
88
+ ariaLabel: String,
88
89
  onMousedown: Function
89
90
  },
90
91
  emits: {
@@ -109,13 +110,13 @@ const q = /* @__PURE__ */ D({
109
110
  default: null
110
111
  },
111
112
  handleDispatchDataItems: {
112
- default: n
113
+ default: r
113
114
  },
114
115
  handleDispatchSelection: {
115
- default: n
116
+ default: r
116
117
  },
117
118
  handleDispatchFocus: {
118
- default: n
119
+ default: r
119
120
  }
120
121
  },
121
122
  created() {
@@ -174,28 +175,28 @@ const q = /* @__PURE__ */ D({
174
175
  },
175
176
  handleKeyDown(e) {
176
177
  switch (e.keyCode) {
177
- case a.left:
178
+ case s.left:
178
179
  this.handleDispatchFocus && this.handleDispatchFocus({
179
180
  type: o.prev,
180
181
  payload: this.$props.value,
181
182
  event: e
182
183
  });
183
184
  break;
184
- case a.right:
185
+ case s.right:
185
186
  this.handleDispatchFocus && this.handleDispatchFocus({
186
187
  type: o.next,
187
188
  payload: this.$props.value,
188
189
  event: e
189
190
  });
190
191
  break;
191
- case a.enter:
192
+ case s.enter:
192
193
  this.handleDispatchFocus && this.handleDispatchSelection({
193
194
  type: p.toggle,
194
195
  payload: this.$props.value,
195
196
  event: e
196
197
  });
197
198
  break;
198
- case a.delete:
199
+ case s.delete:
199
200
  this.handleRemove(e);
200
201
  break;
201
202
  }
@@ -231,8 +232,8 @@ const q = /* @__PURE__ */ D({
231
232
  size: e,
232
233
  rounded: l,
233
234
  themeColor: u,
234
- fillMode: r,
235
- look: s,
235
+ fillMode: n,
236
+ look: a,
236
237
  avatar: i,
237
238
  icon: m,
238
239
  svgIcon: f,
@@ -265,14 +266,15 @@ const q = /* @__PURE__ */ D({
265
266
  "k-focus": this.computedFocused(),
266
267
  [`k-chip-${c.sizeMap[e] || e}`]: e,
267
268
  [`k-rounded-${c.roundedMap[l] || l}`]: l,
268
- [`k-chip-${r}`]: r,
269
+ [`k-chip-${n}`]: n,
269
270
  [`k-chip-${u}`]: u,
270
- "k-chip-outline": s === "outline" || s === "outlined",
271
- "k-chip-solid": s === "solid" || s === "filled" || r === "solid"
271
+ "k-chip-outline": a === "outline" || a === "outlined",
272
+ "k-chip-solid": a === "solid" || a === "filled" || n === "solid"
272
273
  }),
273
274
  "aria-pressed": this.$props.role === "button" ? this.currentSelected : void 0,
274
275
  "aria-selected": this.$props.role === "option" ? this.currentSelected : void 0,
275
- "aria-disabled": this.$props.disabled,
276
+ "aria-disabled": this.$props.disabled || void 0,
277
+ "aria-label": this.$props.ariaLabel,
276
278
  "aria-describedby": this.$props.ariaDescribedBy,
277
279
  onFocus: this.handleFocus,
278
280
  onBlur: this.handleBlur,
@@ -286,11 +288,11 @@ const q = /* @__PURE__ */ D({
286
288
  }, null), (m || f) && t(d, {
287
289
  name: h(m),
288
290
  icon: f,
289
- size: "small"
291
+ size: "small",
292
+ class: "k-chip-icon"
290
293
  }, null), i ? i.imageUrl ? b : S : null, t("span", {
291
294
  class: "k-chip-content"
292
295
  }, [this.$props.text && t("span", {
293
- "aria-label": this.$props.text,
294
296
  class: this.chipLabelClass
295
297
  }, [this.$props.text])]), this.$props.removable && t("span", {
296
298
  class: "k-chip-actions"
@@ -40,7 +40,7 @@ declare const FloatingActionButton: import('vue').DefineComponent<import('vue').
40
40
  };
41
41
  positionMode: {
42
42
  type: PropType<FloatingActionButtonPositionMode>;
43
- default: () => FloatingActionButtonPositionMode;
43
+ default: any;
44
44
  };
45
45
  popupSettings: {
46
46
  type: PropType<import('..').FloatingActionButtonPopupSettings>;
@@ -68,9 +68,11 @@ declare const FloatingActionButton: import('vue').DefineComponent<import('vue').
68
68
  'k-fab': boolean;
69
69
  'k-disabled': any;
70
70
  'k-focus': any;
71
+ 'k-pos-absolute': boolean;
72
+ 'k-pos-fixed': boolean;
71
73
  };
72
74
  computedOpened(): any;
73
- rootClassNames(): string;
75
+ rootClassNames(): any;
74
76
  }, {
75
77
  dispatchPopupEvent(dispatchedEvent: any, isOpen?: boolean): void;
76
78
  handleClick(event: any): void;
@@ -118,7 +120,7 @@ declare const FloatingActionButton: import('vue').DefineComponent<import('vue').
118
120
  };
119
121
  positionMode: {
120
122
  type: PropType<FloatingActionButtonPositionMode>;
121
- default: () => FloatingActionButtonPositionMode;
123
+ default: any;
122
124
  };
123
125
  popupSettings: {
124
126
  type: PropType<import('..').FloatingActionButtonPopupSettings>;
@@ -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 o=require("vue"),s=require("@progress/kendo-vue-common"),I=require("./FloatingActionButtonItem.js"),y=require("../package-metadata.js"),u=require("./utils.js"),x=require("@progress/kendo-vue-popup"),v=o.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(){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&&u.position(this.$el,this.$props.align,this.$props.alignOffset,this.isRtl)},updated(){u.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:n,rounded:i,positionMode:d}=this.$props;return{"k-fab":!0,[`k-fab-${s.kendoThemeMaps.sizeMap[e]||e}`]:e,[`k-rounded-${s.kendoThemeMaps.roundedMap[i]||i}`]:i,[`k-fab-${n}`]:n,[`k-fab-${t}`]:t,"k-disabled":this.$props.disabled,"k-focus":this.currentFocused,"k-pos-absolute":d==="absolute","k-pos-fixed":d==="fixed",[`k-${this.$props.align.vertical}-${this.$props.align.horizontal}`]:!!d}},computedOpened(){return this.$props.opened===void 0?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)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,n=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=n;break;case s.Keys.down:case s.Keys.right:e.preventDefault(),t<n&&!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<n&&i&&(this.focusedIndex=t+1);break}this.$emit("keydown",e,void 0)}},setup(){const e=o.ref(null),t=o.ref(null);return{chipRef:e,kendoAnchorRef:t}},render(){const{align:e,disabled:t,icon:n,svgIcon:i,iconClass:d,id:h,items:r,text:c,tabIndex:g,accessKey:b,popupSettings:l}=this.$props,k=s.templateRendering.call(this,this.$props.item,s.getListeners.call(this)),$=function(){return r&&r.map(function(a,p){return o.createVNode(I.FloatingActionButtonItem,{key:p,index:p,id:`${this.listId}-${p}`,disabled:t||a.disabled,focused:this.focusedIndex===p,dataItem:a,item:k,class:s.classNames(a.className,u.getTextDirectionClass(this.currentDir||"ltr",e.horizontal)),onClick:this.handleItemClick,onDown:this.handleItemDown},null)},this)},f=n&&!c,m=(this.element?this.element.offsetWidth:0)/2-32/2;return o.createVNode("div",{class:this.rootClassNames},[o.createVNode("button",{ref:a=>{this.kendoAnchorRef=a},id:h||this.buttonId,role:r?"menubutton":void 0,type:"button","aria-disabled":t||void 0,"aria-expanded":r?this.computedOpened:void 0,"aria-haspopup":r?!0:void 0,"aria-label":!c&&(n||i||d)?"Action":void 0,"aria-owns":r?this.listId:void 0,"aria-activedescendant":this.focusedIndex>=0&&r?`${this.listId}-${this.focusedIndex}`:void 0,tabindex:s.getTabIndex(g,t),accesskey:b,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},[n||i?o.createVNode(s.Icon,{name:n,icon:i,class:"k-fab-icon"},null):d?o.createVNode(s.Icon,{class:d},null):null,c&&o.createVNode("span",{class:"k-fab-text"},[c])]),o.createVNode(x.Popup,{ref:s.setRef(this,"popup"),show:this.computedOpened,anchor:this._anchor,animate:l.animate,popupClass:s.classNames("k-popup-transparent k-fab-popup",l.popupClass),anchorAlign:l.anchorAlign||u.getAnchorAlign(e,this.isRtl),popupAlign:l.popupAlign||u.getPopupAlign(e,this.isRtl),style:{boxShadow:"none"}},{default:()=>[o.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;
@@ -6,7 +6,7 @@
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
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";
9
+ import { templateRendering as A, getListeners as S, getTabIndex as M, Icon as k, classNames as c, setRef as $, Keys as n, canUseDOM as F, kendoThemeMaps as I, getRef as x, validatePackage as R, guid as h } from "@progress/kendo-vue-common";
10
10
  import { FloatingActionButtonItem as E } from "./FloatingActionButtonItem.mjs";
11
11
  import { packageMetadata as B } from "../package-metadata.mjs";
12
12
  import { getPopupAlign as N, getAnchorAlign as P, position as O, getTextDirectionClass as K } from "./utils.mjs";
@@ -44,9 +44,7 @@ const G = /* @__PURE__ */ w({
44
44
  },
45
45
  positionMode: {
46
46
  type: String,
47
- default: function() {
48
- return "fixed";
49
- }
47
+ default: void 0
50
48
  },
51
49
  popupSettings: {
52
50
  type: Object,
@@ -85,7 +83,7 @@ const G = /* @__PURE__ */ w({
85
83
  };
86
84
  },
87
85
  created() {
88
- R(B), this.element = void 0, this._anchor = c(), this.listId = c(), this.buttonId = c();
86
+ R(B), this.element = void 0, this._anchor = h(), this.listId = h(), this.buttonId = h();
89
87
  },
90
88
  mounted() {
91
89
  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);
@@ -99,7 +97,8 @@ const G = /* @__PURE__ */ w({
99
97
  size: e,
100
98
  themeColor: t,
101
99
  fillMode: i,
102
- rounded: s
100
+ rounded: s,
101
+ positionMode: d
103
102
  } = this.$props;
104
103
  return {
105
104
  "k-fab": !0,
@@ -109,17 +108,15 @@ const G = /* @__PURE__ */ w({
109
108
  [`k-fab-${t}`]: t,
110
109
  "k-disabled": this.$props.disabled,
111
110
  "k-focus": this.currentFocused,
112
- [`k-${this.$props.align.vertical}-${this.$props.align.horizontal}`]: !0
111
+ "k-pos-absolute": d === "absolute",
112
+ "k-pos-fixed": d === "fixed",
113
+ [`k-${this.$props.align.vertical}-${this.$props.align.horizontal}`]: !!d
113
114
  };
114
115
  },
115
116
  computedOpened() {
116
117
  return this.$props.opened === void 0 ? this.currentOpened : this.$props.opened;
117
118
  },
118
119
  rootClassNames() {
119
- return p({
120
- "k-pos-absolute": this.$props.positionMode === "absolute",
121
- "k-pos-fixed": this.$props.positionMode === "fixed"
122
- });
123
120
  }
124
121
  },
125
122
  methods: {
@@ -207,45 +204,45 @@ const G = /* @__PURE__ */ w({
207
204
  disabled: t,
208
205
  icon: i,
209
206
  svgIcon: s,
210
- iconClass: h,
207
+ iconClass: d,
211
208
  id: f,
212
209
  items: r,
213
- text: a,
210
+ text: u,
214
211
  tabIndex: v,
215
212
  accessKey: C,
216
213
  popupSettings: l
217
- } = this.$props, y = M.call(this, this.$props.item, S.call(this)), D = function() {
218
- return r && r.map(function(d, u) {
214
+ } = this.$props, y = A.call(this, this.$props.item, S.call(this)), D = function() {
215
+ return r && r.map(function(a, p) {
219
216
  return o(E, {
220
- key: u,
221
- index: u,
222
- id: `${this.listId}-${u}`,
223
- disabled: t || d.disabled,
224
- focused: this.focusedIndex === u,
225
- dataItem: d,
217
+ key: p,
218
+ index: p,
219
+ id: `${this.listId}-${p}`,
220
+ disabled: t || a.disabled,
221
+ focused: this.focusedIndex === p,
222
+ dataItem: a,
226
223
  item: y,
227
- class: p(d.className, K(this.currentDir || "ltr", e.horizontal)),
224
+ class: c(a.className, K(this.currentDir || "ltr", e.horizontal)),
228
225
  onClick: this.handleItemClick,
229
226
  onDown: this.handleItemDown
230
227
  }, null);
231
228
  }, this);
232
- }, m = i && !a, b = (this.element ? this.element.offsetWidth : 0) / 2 - 32 / 2;
229
+ }, m = i && !u, b = (this.element ? this.element.offsetWidth : 0) / 2 - 32 / 2;
233
230
  return o("div", {
234
231
  class: this.rootClassNames
235
232
  }, [o("button", {
236
- ref: (d) => {
237
- this.kendoAnchorRef = d;
233
+ ref: (a) => {
234
+ this.kendoAnchorRef = a;
238
235
  },
239
236
  id: f || this.buttonId,
240
- role: r ? "menubutton" : "button",
237
+ role: r ? "menubutton" : void 0,
241
238
  type: "button",
242
- "aria-disabled": t,
239
+ "aria-disabled": t || void 0,
243
240
  "aria-expanded": r ? this.computedOpened : void 0,
244
- "aria-haspopup": !!r,
245
- "aria-label": `${a || ""} floatingactionbutton`,
241
+ "aria-haspopup": r ? !0 : void 0,
242
+ "aria-label": !u && (i || s || d) ? "Action" : void 0,
246
243
  "aria-owns": r ? this.listId : void 0,
247
244
  "aria-activedescendant": this.focusedIndex >= 0 && r ? `${this.listId}-${this.focusedIndex}` : void 0,
248
- tabindex: A(v, t),
245
+ tabindex: M(v, t),
249
246
  accesskey: C,
250
247
  dir: this.currentDir,
251
248
  disabled: t,
@@ -256,20 +253,20 @@ const G = /* @__PURE__ */ w({
256
253
  onFocusin: this.handleFocus,
257
254
  onBlur: this.handleBlur,
258
255
  onKeydown: this.handleKeyDown
259
- }, [i || s ? o($, {
256
+ }, [i || s ? o(k, {
260
257
  name: i,
261
258
  icon: s,
262
259
  class: "k-fab-icon"
263
- }, null) : h ? o($, {
264
- class: h
265
- }, null) : null, a && o("span", {
260
+ }, null) : d ? o(k, {
261
+ class: d
262
+ }, null) : null, u && o("span", {
266
263
  class: "k-fab-text"
267
- }, [a])]), o(j, {
268
- ref: k(this, "popup"),
264
+ }, [u])]), o(j, {
265
+ ref: $(this, "popup"),
269
266
  show: this.computedOpened,
270
267
  anchor: this._anchor,
271
268
  animate: l.animate,
272
- popupClass: p("k-popup-transparent k-fab-popup", l.popupClass),
269
+ popupClass: c("k-popup-transparent k-fab-popup", l.popupClass),
273
270
  anchorAlign: l.anchorAlign || P(e, this.isRtl),
274
271
  popupAlign: l.popupAlign || N(e, this.isRtl),
275
272
  style: {
@@ -277,11 +274,11 @@ const G = /* @__PURE__ */ w({
277
274
  }
278
275
  }, {
279
276
  default: () => [o("ul", {
280
- ref: k(this, "list"),
277
+ ref: $(this, "list"),
281
278
  role: "menu",
282
279
  "aria-labelledby": f,
283
280
  id: this.listId,
284
- class: p("k-fab-items", {
281
+ class: c("k-fab-items", {
285
282
  "k-fab-items-bottom": e.vertical !== "bottom",
286
283
  "k-fab-items-top": e.vertical === "bottom"
287
284
  }),