@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 +8 -8
- package/Button.js +1 -1
- package/Button.mjs +45 -45
- package/FloatingActionButton/FloatingActionButton.js +1 -1
- package/FloatingActionButton/FloatingActionButton.mjs +32 -31
- package/FloatingActionButton/interfaces/FloatingActionButtonProps.d.ts +2 -8
- package/FloatingActionButton/models/theme-color.d.ts +3 -9
- package/ListButton/DropDownButton.d.ts +4 -4
- package/ListButton/DropDownButton.js +1 -1
- package/ListButton/DropDownButton.mjs +10 -10
- package/ListButton/SplitButton.d.ts +4 -4
- package/ListButton/SplitButton.js +1 -1
- package/ListButton/SplitButton.mjs +98 -101
- package/ListButton/models/ListButtonProps.d.ts +8 -8
- package/SegmentedControl/SegmentedControl.d.ts +2 -2
- package/SegmentedControl/interfaces/SegmentedControlTypes.d.ts +1 -0
- package/SmartPasteButton/SmartPasteButton.d.ts +6 -6
- package/SpeechToText/SpeechToTextButton.d.ts +4 -4
- package/SpeechToText/SpeechToTextButton.js +1 -1
- package/SpeechToText/SpeechToTextButton.mjs +16 -16
- package/dist/cdn/js/kendo-vue-buttons.js +1 -1
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -2
- package/package.json +11 -6
- package/toolbar/tools/ToolbarScrollButton.js +1 -1
- package/toolbar/tools/ToolbarScrollButton.mjs +22 -24
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
|
-
* -
|
|
67
|
-
* - light
|
|
67
|
+
* - error
|
|
68
68
|
* - inverse
|
|
69
69
|
*
|
|
70
70
|
* @default `undefined`
|
|
71
71
|
*/
|
|
72
|
-
themeColor?: 'base' | 'primary' | 'secondary' | 'tertiary' | 'info' | 'success' | 'warning' | '
|
|
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" | "
|
|
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" | "
|
|
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
|
|
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
|
|
9
|
-
import { getDefaultSlots as m, kendoThemeMaps as b, validatePackage as
|
|
10
|
-
import
|
|
11
|
-
import { packageMetadata as
|
|
12
|
-
const
|
|
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
|
-
|
|
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:
|
|
89
|
-
iconClass:
|
|
90
|
-
imageUrl:
|
|
91
|
-
dir:
|
|
88
|
+
icon: i,
|
|
89
|
+
iconClass: t,
|
|
90
|
+
imageUrl: n,
|
|
91
|
+
dir: s,
|
|
92
92
|
svgIcon: u,
|
|
93
|
-
size:
|
|
94
|
-
rounded:
|
|
93
|
+
size: o,
|
|
94
|
+
rounded: d,
|
|
95
95
|
fillMode: r,
|
|
96
96
|
themeColor: a
|
|
97
|
-
} = this.$props, c = u !== void 0 ||
|
|
97
|
+
} = this.$props, c = u !== void 0 || i !== void 0 || t !== void 0 || n !== void 0, h = m(this);
|
|
98
98
|
return {
|
|
99
|
-
[
|
|
100
|
-
[`k-button-${b.sizeMap[
|
|
101
|
-
[`k-rounded-${b.roundedMap[
|
|
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":
|
|
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:
|
|
163
|
-
svgIcon:
|
|
164
|
-
iconClass:
|
|
165
|
-
imageUrl:
|
|
162
|
+
icon: i,
|
|
163
|
+
svgIcon: t,
|
|
164
|
+
iconClass: n,
|
|
165
|
+
imageUrl: s,
|
|
166
166
|
imageAlt: u,
|
|
167
|
-
accessKey:
|
|
168
|
-
tabIndex:
|
|
167
|
+
accessKey: o,
|
|
168
|
+
tabIndex: d,
|
|
169
169
|
id: r,
|
|
170
170
|
type: a,
|
|
171
171
|
disabled: c,
|
|
172
|
-
role:
|
|
172
|
+
role: f,
|
|
173
173
|
iconSize: h
|
|
174
|
-
} = this.$props,
|
|
175
|
-
if (
|
|
176
|
-
return
|
|
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:
|
|
180
|
+
src: s
|
|
181
181
|
}, null);
|
|
182
|
-
if (
|
|
183
|
-
const
|
|
184
|
-
return
|
|
185
|
-
name:
|
|
186
|
-
icon:
|
|
187
|
-
class:
|
|
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 (
|
|
191
|
-
return
|
|
190
|
+
} else if (n)
|
|
191
|
+
return l("span", {
|
|
192
192
|
role: "presentation",
|
|
193
|
-
class:
|
|
193
|
+
class: n
|
|
194
194
|
}, null);
|
|
195
195
|
return null;
|
|
196
196
|
};
|
|
197
|
-
return
|
|
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:
|
|
214
|
-
tabindex:
|
|
213
|
+
accesskey: o,
|
|
214
|
+
tabindex: d,
|
|
215
215
|
id: r,
|
|
216
216
|
type: a,
|
|
217
|
-
role:
|
|
218
|
-
}, [
|
|
217
|
+
role: f
|
|
218
|
+
}, [y.call(this), p && l("span", {
|
|
219
219
|
class: "k-button-text"
|
|
220
|
-
}, [
|
|
220
|
+
}, [p])]);
|
|
221
221
|
}
|
|
222
222
|
});
|
|
223
223
|
export {
|
|
224
|
-
|
|
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"),
|
|
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
|
|
9
|
-
import { templateRendering as
|
|
10
|
-
import { FloatingActionButtonItem as
|
|
11
|
-
import { packageMetadata as
|
|
12
|
-
import { getPopupAlign as
|
|
13
|
-
import { Popup as
|
|
14
|
-
const
|
|
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
|
-
|
|
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 =
|
|
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
|
-
|
|
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-${
|
|
107
|
-
[`k-rounded-${
|
|
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
|
-
|
|
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 =
|
|
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:
|
|
215
|
-
accessKey:
|
|
215
|
+
tabIndex: C,
|
|
216
|
+
accessKey: y,
|
|
216
217
|
popupSettings: l
|
|
217
|
-
} = this.$props,
|
|
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(
|
|
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:
|
|
227
|
-
class: p(d.className,
|
|
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:
|
|
249
|
-
accesskey:
|
|
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(
|
|
268
|
-
ref:
|
|
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 ||
|
|
274
|
-
popupAlign: l.popupAlign ||
|
|
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:
|
|
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
|
-
}, [
|
|
293
|
+
}, [w.call(this)])]
|
|
293
294
|
})]);
|
|
294
295
|
}
|
|
295
296
|
});
|
|
296
297
|
export {
|
|
297
|
-
|
|
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
|
-
|
|
157
|
+
* * `base` (Default)—Applies base coloring.
|
|
158
|
+
* * `primary`—Applies coloring based on the primary theme color.
|
|
158
159
|
* * `secondary`—Applies coloring based on the secondary theme color.
|
|
159
160
|
* * `tertiary`— Applies coloring based on the tertiary theme color.
|
|
160
|
-
* * `info`—Applies coloring based on the info theme color.
|
|
161
|
-
* * `success`— Applies coloring based on the success theme color.
|
|
162
|
-
* * `warning`— Applies coloring based on the warning theme color.
|
|
163
|
-
* * `error`— Applies coloring based on the error theme color.
|
|
164
|
-
* * `dark`— Applies coloring based on the dark theme color.
|
|
165
|
-
* * `light`— Applies coloring based on the light theme color.
|
|
166
|
-
* * `inverse`— 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
|
-
* * `
|
|
12
|
+
* * `base` (Default)—Applies base coloring.
|
|
13
|
+
* * `primary`—Applies coloring based on the primary theme color.
|
|
13
14
|
* * `secondary`—Applies coloring based on the secondary theme color.
|
|
14
15
|
* * `tertiary`— Applies coloring based on the tertiary theme color.
|
|
15
|
-
* * `info`—Applies coloring based on the info theme color.
|
|
16
|
-
* * `success`— Applies coloring based on the success theme color.
|
|
17
|
-
* * `warning`— Applies coloring based on the warning theme color.
|
|
18
|
-
* * `error`— Applies coloring based on the error theme color.
|
|
19
|
-
* * `dark`— Applies coloring based on the dark theme color.
|
|
20
|
-
* * `light`— Applies coloring based on the light theme color.
|
|
21
|
-
* * `inverse`— Applies coloring based on the inverse theme color.
|
|
22
16
|
*
|
|
23
17
|
*/
|
|
24
|
-
export type FloatingActionButtonThemeColor = '
|
|
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" | "
|
|
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" | "
|
|
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"),
|
|
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", "
|
|
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(
|
|
111
|
-
const b = typeof
|
|
112
|
-
...
|
|
113
|
-
render: c.call(this,
|
|
114
|
-
} :
|
|
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 ===
|
|
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:
|
|
125
|
-
key:
|
|
126
|
-
id: `${this.guid}-${
|
|
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" | "
|
|
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" | "
|
|
148
|
+
type: PropType<"base" | "primary" | "secondary" | "tertiary" | "info" | "success" | "warning" | "error" | "inverse">;
|
|
149
149
|
validator: (value: string) => boolean;
|
|
150
150
|
};
|
|
151
151
|
opened: {
|