@progress/kendo-vue-buttons 6.4.1-develop.2 → 6.4.2-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.mjs +1 -1
- package/ButtonGroup.mjs +3 -3
- package/Chip/Chip.mjs +13 -13
- package/Chip/ChipList.mjs +11 -11
- package/FloatingActionButton/FloatingActionButton.mjs +16 -16
- package/FloatingActionButton/FloatingActionButtonItem.mjs +10 -10
- package/ListButton/DropDownButton.mjs +7 -7
- package/ListButton/SplitButton.mjs +7 -7
- 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 +5 -5
- package/toolbar/Toolbar.mjs +9 -9
- package/util.js +1 -1
- package/util.mjs +5 -14
package/Button.mjs
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
8
|
import { defineComponent as y, createVNode as o } from "vue";
|
|
9
|
-
import {
|
|
9
|
+
import { getDefaultSlots as m, kendoThemeMaps as b, validatePackage as $, classNames as k, Icon as S } from "@progress/kendo-vue-common";
|
|
10
10
|
import v from "./util.mjs";
|
|
11
11
|
import { packageMetadata as C } from "./package-metadata.mjs";
|
|
12
12
|
const w = v.styles, I = /* @__PURE__ */ y({
|
package/ButtonGroup.mjs
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
8
|
import { defineComponent as l, createVNode as m, h as f } from "vue";
|
|
9
|
-
import {
|
|
9
|
+
import { getDefaultSlots as c, classNames as i, validatePackage as g } from "@progress/kendo-vue-common";
|
|
10
10
|
import { ButtonWrap as b } from "./ButtonWrap.mjs";
|
|
11
11
|
import h from "./util.mjs";
|
|
12
12
|
import { packageMetadata as $ } from "./package-metadata.mjs";
|
|
@@ -25,10 +25,10 @@ const o = h.styles, S = /* @__PURE__ */ l({
|
|
|
25
25
|
}
|
|
26
26
|
},
|
|
27
27
|
created() {
|
|
28
|
-
|
|
28
|
+
g($);
|
|
29
29
|
},
|
|
30
30
|
render() {
|
|
31
|
-
const t =
|
|
31
|
+
const t = c(this), p = function(s, n, r, e) {
|
|
32
32
|
const a = i({
|
|
33
33
|
[o["state-disabled"]]: this.$props.disabled,
|
|
34
34
|
[o["group-start"]]: e ? r : n === 0,
|
package/Chip/Chip.mjs
CHANGED
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
import { defineComponent as D,
|
|
9
|
-
import { noop as r,
|
|
10
|
-
import {
|
|
8
|
+
import { defineComponent as D, createVNode as t, h as I, ref as F } from "vue";
|
|
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 l, getRef as B, validatePackage as T } from "@progress/kendo-vue-common";
|
|
10
|
+
import { checkIcon as A, 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";
|
|
13
13
|
import { SELECTION_ACTION as p } from "./selection-reducer.mjs";
|
|
@@ -42,7 +42,7 @@ const q = /* @__PURE__ */ D({
|
|
|
42
42
|
removeSvgIcon: {
|
|
43
43
|
type: Object,
|
|
44
44
|
default: function() {
|
|
45
|
-
return
|
|
45
|
+
return N;
|
|
46
46
|
}
|
|
47
47
|
},
|
|
48
48
|
disabled: {
|
|
@@ -60,7 +60,7 @@ const q = /* @__PURE__ */ D({
|
|
|
60
60
|
selectedSvgIcon: {
|
|
61
61
|
type: Object,
|
|
62
62
|
default: function() {
|
|
63
|
-
return
|
|
63
|
+
return A;
|
|
64
64
|
}
|
|
65
65
|
},
|
|
66
66
|
size: {
|
|
@@ -127,10 +127,10 @@ const q = /* @__PURE__ */ D({
|
|
|
127
127
|
}
|
|
128
128
|
},
|
|
129
129
|
created() {
|
|
130
|
-
this.currentDir = void 0,
|
|
130
|
+
this.currentDir = void 0, T(z);
|
|
131
131
|
},
|
|
132
132
|
mounted() {
|
|
133
|
-
this.chip =
|
|
133
|
+
this.chip = B(this, "chip"), this.currentDir = this.$props.dir !== void 0 ? this.$props.dir === "rtl" : this.$el && getComputedStyle(this.$el).direction === "rtl" || !1;
|
|
134
134
|
},
|
|
135
135
|
updated() {
|
|
136
136
|
this.kendoFocused.value === this.$props.value && this.$el && this.$el.focus();
|
|
@@ -231,7 +231,7 @@ const q = /* @__PURE__ */ D({
|
|
|
231
231
|
},
|
|
232
232
|
setup() {
|
|
233
233
|
return {
|
|
234
|
-
chipRef:
|
|
234
|
+
chipRef: F(null)
|
|
235
235
|
};
|
|
236
236
|
},
|
|
237
237
|
render() {
|
|
@@ -248,7 +248,7 @@ const q = /* @__PURE__ */ D({
|
|
|
248
248
|
selectedSvgIcon: g,
|
|
249
249
|
removeIcon: k,
|
|
250
250
|
removeSvgIcon: $
|
|
251
|
-
} = this.$props, y =
|
|
251
|
+
} = this.$props, y = C.call(this, i, w.call(this)), b = i ? t("div", {
|
|
252
252
|
class: `k-chip-avatar k-avatar k-rounded-${i.rounded || "medium"} k-avatar-${c.sizeMap[e] || e} k-avatar-solid k-avatar-solid-primary`,
|
|
253
253
|
style: i.style
|
|
254
254
|
}, [t("span", {
|
|
@@ -256,8 +256,8 @@ const q = /* @__PURE__ */ D({
|
|
|
256
256
|
}, [t("img", {
|
|
257
257
|
src: i.imageUrl,
|
|
258
258
|
alt: i.imageAlt
|
|
259
|
-
}, null)])]) : null, S =
|
|
260
|
-
h:
|
|
259
|
+
}, null)])]) : null, S = x.call(this, {
|
|
260
|
+
h: I,
|
|
261
261
|
template: y
|
|
262
262
|
});
|
|
263
263
|
return t("div", {
|
|
@@ -265,8 +265,8 @@ const q = /* @__PURE__ */ D({
|
|
|
265
265
|
id: this.$props.value,
|
|
266
266
|
ref: R(this, "chip"),
|
|
267
267
|
dir: this.currentDir,
|
|
268
|
-
tabindex:
|
|
269
|
-
class:
|
|
268
|
+
tabindex: O(this.$props.tabIndex, this.$props.disabled, void 0),
|
|
269
|
+
class: M("k-chip", {
|
|
270
270
|
"k-rtl": this.currentDir === "rtl",
|
|
271
271
|
"k-disabled": this.$props.disabled,
|
|
272
272
|
"k-selected": this.currentSelected,
|
package/Chip/ChipList.mjs
CHANGED
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
import { defineComponent as r,
|
|
9
|
-
import {
|
|
8
|
+
import { defineComponent as r, createVNode as i, h as l, ref as n } from "vue";
|
|
9
|
+
import { classNames as u, getTabIndex as d, setRef as p, kendoThemeMaps as o, templateRendering as h, getListeners as c, getTemplate as m, validatePackage as f } from "@progress/kendo-vue-common";
|
|
10
10
|
import { selectionReducer as $ } from "./selection-reducer.mjs";
|
|
11
11
|
import { focusReducer as v } from "./focus-reducer.mjs";
|
|
12
12
|
import { dataReducer as D } from "./data-reducer.mjs";
|
|
@@ -96,7 +96,7 @@ const V = /* @__PURE__ */ r({
|
|
|
96
96
|
};
|
|
97
97
|
},
|
|
98
98
|
created() {
|
|
99
|
-
|
|
99
|
+
f(y), this.currentDataItems = this.$props.dataItems || this.$props.defaultDataItems, this.currentValue.value = this.$props.value || this.$props.defaultValue;
|
|
100
100
|
},
|
|
101
101
|
data() {
|
|
102
102
|
return {
|
|
@@ -169,7 +169,7 @@ const V = /* @__PURE__ */ r({
|
|
|
169
169
|
},
|
|
170
170
|
setup() {
|
|
171
171
|
return {
|
|
172
|
-
chipListRef:
|
|
172
|
+
chipListRef: n(null)
|
|
173
173
|
};
|
|
174
174
|
},
|
|
175
175
|
render() {
|
|
@@ -177,14 +177,14 @@ const V = /* @__PURE__ */ r({
|
|
|
177
177
|
size: t
|
|
178
178
|
} = this.$props;
|
|
179
179
|
return i("div", {
|
|
180
|
-
ref:
|
|
180
|
+
ref: p(this, "chipList"),
|
|
181
181
|
role: "listbox",
|
|
182
182
|
id: this.$props.id,
|
|
183
183
|
dir: this.currentDir,
|
|
184
184
|
style: this.$attrs.style,
|
|
185
|
-
tabindex:
|
|
186
|
-
class:
|
|
187
|
-
[`k-chip-list-${
|
|
185
|
+
tabindex: d(this.$props.tabIndex, this.$props.disabled, void 0),
|
|
186
|
+
class: u("k-chip-list", {
|
|
187
|
+
[`k-chip-list-${o.sizeMap[t] || t}`]: t,
|
|
188
188
|
"k-rtl": this.currentDir === "rtl",
|
|
189
189
|
"k-selection-single": this.$props.selection === "single",
|
|
190
190
|
"k-selection-multiple": this.$props.selection === "multiple",
|
|
@@ -195,7 +195,7 @@ const V = /* @__PURE__ */ r({
|
|
|
195
195
|
"aria-orientation": "horizontal",
|
|
196
196
|
"aria-multiselectable": this.$props.selection === "multiple" ? !0 : void 0
|
|
197
197
|
}, [this.computedDataItems.map(function(e) {
|
|
198
|
-
const s =
|
|
198
|
+
const s = h.call(this, this.$props.chip, c.call(this)), a = i(g, {
|
|
199
199
|
role: "option",
|
|
200
200
|
dataItem: e,
|
|
201
201
|
key: e[this.$props.valueField],
|
|
@@ -206,8 +206,8 @@ const V = /* @__PURE__ */ r({
|
|
|
206
206
|
rounded: this.$props.rounded,
|
|
207
207
|
fillMode: this.$props.fillMode
|
|
208
208
|
}, null);
|
|
209
|
-
return
|
|
210
|
-
h:
|
|
209
|
+
return m.call(this, {
|
|
210
|
+
h: l,
|
|
211
211
|
template: s,
|
|
212
212
|
defaultRendering: a,
|
|
213
213
|
additionalProps: {
|
|
@@ -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 v,
|
|
9
|
-
import {
|
|
8
|
+
import { defineComponent as v, createVNode as o, ref as g } from "vue";
|
|
9
|
+
import { templateRendering as S, getListeners as M, getTabIndex as A, Icon as $, classNames as h, setRef as k, Keys as n, canUseDOM as F, kendoThemeMaps as I, getRef as x, validatePackage as R, guid as f } 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
|
-
import {
|
|
12
|
+
import { getPopupAlign as N, getAnchorAlign as P, position as y, getTextDirectionClass as K } from "./utils.mjs";
|
|
13
13
|
import { Popup as j } from "@progress/kendo-vue-popup";
|
|
14
14
|
const G = /* @__PURE__ */ v({
|
|
15
15
|
name: "KendoVueFloatingActionButton",
|
|
@@ -105,10 +105,10 @@ const G = /* @__PURE__ */ v({
|
|
|
105
105
|
};
|
|
106
106
|
},
|
|
107
107
|
created() {
|
|
108
|
-
|
|
108
|
+
R(B), this.element = void 0, this._anchor = f(), this.listId = f(), this.buttonId = f();
|
|
109
109
|
},
|
|
110
110
|
mounted() {
|
|
111
|
-
this.element = this.kendoAnchorRef, this.list =
|
|
111
|
+
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 && y(this.$el, this.$props.align, this.$props.alignOffset, this.isRtl);
|
|
112
112
|
},
|
|
113
113
|
updated() {
|
|
114
114
|
y(this.$el, this.$props.align, this.$props.alignOffset, this.isRtl), this.currentFocused && this.element && this.element.focus();
|
|
@@ -126,8 +126,8 @@ const G = /* @__PURE__ */ v({
|
|
|
126
126
|
return {
|
|
127
127
|
"k-fab": !0,
|
|
128
128
|
[`k-fab-${s || "rectangle"}`]: s !== null,
|
|
129
|
-
[`k-fab-${
|
|
130
|
-
[`k-rounded-${
|
|
129
|
+
[`k-fab-${I.sizeMap[e] || e}`]: e,
|
|
130
|
+
[`k-rounded-${I.roundedMap[a] || a}`]: a,
|
|
131
131
|
[`k-fab-${d}`]: d,
|
|
132
132
|
[`k-fab-${d}-${i}`]: d && i,
|
|
133
133
|
"k-disabled": this.$props.disabled,
|
|
@@ -183,7 +183,7 @@ const G = /* @__PURE__ */ v({
|
|
|
183
183
|
!e.target || !this.$props.items || (this.focusedIndex = t, this.currentOpened = !1, this.dispatchItemClickEvent(e, t), this.dispatchPopupEvent(e, !1));
|
|
184
184
|
},
|
|
185
185
|
handleItemDown(e) {
|
|
186
|
-
|
|
186
|
+
F && document.activeElement === this.element && e.preventDefault();
|
|
187
187
|
},
|
|
188
188
|
handleKeyDown(e) {
|
|
189
189
|
const t = this.focusedIndex, s = this.$props.items ? this.$props.items.length - 1 : -1, i = this.$props.align.vertical === "bottom";
|
|
@@ -233,7 +233,7 @@ const G = /* @__PURE__ */ v({
|
|
|
233
233
|
tabIndex: O,
|
|
234
234
|
accessKey: C,
|
|
235
235
|
popupSettings: p
|
|
236
|
-
} = this.$props, D =
|
|
236
|
+
} = this.$props, D = S.call(this, this.$props.item, M.call(this)), w = function() {
|
|
237
237
|
return r && r.map(function(l, c) {
|
|
238
238
|
return o(E, {
|
|
239
239
|
key: c,
|
|
@@ -264,7 +264,7 @@ const G = /* @__PURE__ */ v({
|
|
|
264
264
|
"aria-label": `${u || ""} floatingactionbutton`,
|
|
265
265
|
"aria-owns": r ? this.listId : void 0,
|
|
266
266
|
"aria-activedescendant": this.focusedIndex >= 0 && r ? `${this.listId}-${this.focusedIndex}` : void 0,
|
|
267
|
-
tabindex:
|
|
267
|
+
tabindex: A(O, t),
|
|
268
268
|
accesskey: C,
|
|
269
269
|
dir: this.currentDir,
|
|
270
270
|
disabled: t,
|
|
@@ -275,28 +275,28 @@ const G = /* @__PURE__ */ v({
|
|
|
275
275
|
onFocusin: this.handleFocus,
|
|
276
276
|
onBlur: this.handleBlur,
|
|
277
277
|
onKeydown: this.handleKeyDown
|
|
278
|
-
}, [s || i ? o(
|
|
278
|
+
}, [s || i ? o($, {
|
|
279
279
|
name: s,
|
|
280
280
|
icon: i,
|
|
281
281
|
class: "k-fab-icon"
|
|
282
|
-
}, null) : d ? o(
|
|
282
|
+
}, null) : d ? o($, {
|
|
283
283
|
class: d
|
|
284
284
|
}, null) : null, u && o("span", {
|
|
285
285
|
class: "k-fab-text"
|
|
286
286
|
}, [u])]), o(j, {
|
|
287
|
-
ref:
|
|
287
|
+
ref: k(this, "popup"),
|
|
288
288
|
show: this.computedOpened,
|
|
289
289
|
anchor: this._anchor,
|
|
290
290
|
animate: p.animate,
|
|
291
291
|
popupClass: h("k-popup-transparent k-fab-popup", p.popupClass),
|
|
292
|
-
anchorAlign: p.anchorAlign ||
|
|
293
|
-
popupAlign: p.popupAlign ||
|
|
292
|
+
anchorAlign: p.anchorAlign || P(e, this.isRtl),
|
|
293
|
+
popupAlign: p.popupAlign || N(e, this.isRtl),
|
|
294
294
|
style: {
|
|
295
295
|
boxShadow: "none"
|
|
296
296
|
}
|
|
297
297
|
}, {
|
|
298
298
|
default: () => [o("ul", {
|
|
299
|
-
ref:
|
|
299
|
+
ref: k(this, "list"),
|
|
300
300
|
role: "menu",
|
|
301
301
|
"aria-labelledby": a,
|
|
302
302
|
id: this.listId,
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
import { defineComponent as m,
|
|
9
|
-
import {
|
|
8
|
+
import { defineComponent as m, createVNode as i, h as r, ref as u } from "vue";
|
|
9
|
+
import { getTabIndex as h, setRef as p, Icon as f, getTemplate as b, classNames as g, getRef as k } from "@progress/kendo-vue-common";
|
|
10
10
|
const I = /* @__PURE__ */ m({
|
|
11
11
|
name: "KendoVueFloatingActionButtonItem",
|
|
12
12
|
props: {
|
|
@@ -27,11 +27,11 @@ const I = /* @__PURE__ */ m({
|
|
|
27
27
|
down: null
|
|
28
28
|
},
|
|
29
29
|
mounted() {
|
|
30
|
-
this.element =
|
|
30
|
+
this.element = k(this, "element");
|
|
31
31
|
},
|
|
32
32
|
computed: {
|
|
33
33
|
itemClassNames() {
|
|
34
|
-
return
|
|
34
|
+
return g("k-fab-item", {
|
|
35
35
|
"k-focus": this.focused,
|
|
36
36
|
"k-disabled": this.disabled
|
|
37
37
|
});
|
|
@@ -50,7 +50,7 @@ const I = /* @__PURE__ */ m({
|
|
|
50
50
|
},
|
|
51
51
|
setup() {
|
|
52
52
|
return {
|
|
53
|
-
elementRef:
|
|
53
|
+
elementRef: u(null)
|
|
54
54
|
};
|
|
55
55
|
},
|
|
56
56
|
render() {
|
|
@@ -66,11 +66,11 @@ const I = /* @__PURE__ */ m({
|
|
|
66
66
|
} = d;
|
|
67
67
|
let o;
|
|
68
68
|
const c = i("li", {
|
|
69
|
-
ref:
|
|
69
|
+
ref: p(this, "element"),
|
|
70
70
|
id: l,
|
|
71
71
|
class: this.itemClassNames,
|
|
72
72
|
role: "menuitem",
|
|
73
|
-
tabindex:
|
|
73
|
+
tabindex: h(a, e),
|
|
74
74
|
"aria-disabled": e,
|
|
75
75
|
"aria-label": `${t || ""} floatingactionbutton item`,
|
|
76
76
|
onClick: this.handleClick,
|
|
@@ -78,13 +78,13 @@ const I = /* @__PURE__ */ m({
|
|
|
78
78
|
onPointerdown: this.onMouseDown
|
|
79
79
|
}, [t && i("span", {
|
|
80
80
|
class: "k-fab-item-text"
|
|
81
|
-
}, [t]), (s || n) && i(
|
|
81
|
+
}, [t]), (s || n) && i(f, {
|
|
82
82
|
name: n,
|
|
83
83
|
icon: s,
|
|
84
84
|
class: "k-fab-item-icon"
|
|
85
85
|
}, null)]);
|
|
86
|
-
return o =
|
|
87
|
-
h:
|
|
86
|
+
return o = b.call(this, {
|
|
87
|
+
h: r,
|
|
88
88
|
template: this.$props.item,
|
|
89
89
|
defaultRendering: c,
|
|
90
90
|
additionalProps: this.$props,
|
|
@@ -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 $,
|
|
8
|
+
import { defineComponent as $, createVNode as n, ref as k } from "vue";
|
|
9
9
|
import { Button as y } from "../Button.mjs";
|
|
10
|
-
import {
|
|
10
|
+
import { canUseDOM as C, Keys as i, getDefaultSlots as I, guid as a, validatePackage as D, classNames as O, kendoThemeMaps as x, templateRendering as l, getListeners as c } from "@progress/kendo-vue-common";
|
|
11
11
|
import w from "./utils/navigation.mjs";
|
|
12
12
|
import { ButtonItem as S } from "./ButtonItem.mjs";
|
|
13
13
|
import { Popup as B } from "@progress/kendo-vue-popup";
|
|
14
|
-
import {
|
|
14
|
+
import { getPopupAlign as E, getAnchorAlign as K } from "./utils/popup.mjs";
|
|
15
15
|
import { packageMetadata as P } from "../package-metadata.mjs";
|
|
16
16
|
const U = /* @__PURE__ */ $({
|
|
17
17
|
name: "KendoDropDownButton",
|
|
@@ -79,7 +79,7 @@ const U = /* @__PURE__ */ $({
|
|
|
79
79
|
dir: String
|
|
80
80
|
},
|
|
81
81
|
created() {
|
|
82
|
-
this._blurTimeout = null, this._anchor = a(), this.wrapper = null, this.mainButton = null, this.guid = a(), this.buttonsData = [],
|
|
82
|
+
this._blurTimeout = null, this._anchor = a(), this.wrapper = null, this.mainButton = null, this.guid = a(), this.buttonsData = [], D(P);
|
|
83
83
|
},
|
|
84
84
|
mounted() {
|
|
85
85
|
this.mainButton = this.$refs[this._anchor], (this.$props.dir === void 0 && this.isRtl() || this.computedOpened) && this.$forceUpdate();
|
|
@@ -151,8 +151,8 @@ const U = /* @__PURE__ */ $({
|
|
|
151
151
|
show: this.computedOpened,
|
|
152
152
|
animate: s.animate,
|
|
153
153
|
popupClass: O("k-menu-popup", s.popupClass),
|
|
154
|
-
anchorAlign: s.anchorAlign ||
|
|
155
|
-
popupAlign: s.popupAlign ||
|
|
154
|
+
anchorAlign: s.anchorAlign || K(e),
|
|
155
|
+
popupAlign: s.popupAlign || E(e),
|
|
156
156
|
style: e ? {
|
|
157
157
|
direction: "rtl"
|
|
158
158
|
} : void 0
|
|
@@ -224,7 +224,7 @@ const U = /* @__PURE__ */ $({
|
|
|
224
224
|
createBlurTimeout(e) {
|
|
225
225
|
const t = this;
|
|
226
226
|
this._blurTimeout = setTimeout(() => {
|
|
227
|
-
|
|
227
|
+
C && document.activeElement !== t.$el && (t.focused = !1, t.focusedIndex = -1, t.$emit("blur", e, t, void 0), t.computedOpened && (t.currentOpened = !1, t.dispatchPopupEvent(e, !1)));
|
|
228
228
|
}, 200);
|
|
229
229
|
},
|
|
230
230
|
onItemClick(e, t) {
|
|
@@ -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 C,
|
|
8
|
+
import { defineComponent as C, createVNode as o, ref as k } from "vue";
|
|
9
9
|
import { Button as p } from "../Button.mjs";
|
|
10
|
-
import {
|
|
10
|
+
import { canUseDOM as y, Keys as i, getDefaultSlots as I, guid as a, validatePackage as O, classNames as S, kendoThemeMaps as x, templateRendering as c, getListeners as h } from "@progress/kendo-vue-common";
|
|
11
11
|
import { ButtonItem as D } from "./ButtonItem.mjs";
|
|
12
12
|
import w from "./utils/navigation.mjs";
|
|
13
13
|
import { Popup as P } from "@progress/kendo-vue-popup";
|
|
14
|
-
import {
|
|
14
|
+
import { getPopupAlign as B, getAnchorAlign as E } from "./utils/popup.mjs";
|
|
15
15
|
import { caretAltDownIcon as K } from "@progress/kendo-svg-icons";
|
|
16
16
|
import { packageMetadata as v } from "../package-metadata.mjs";
|
|
17
17
|
const N = /* @__PURE__ */ C({
|
|
@@ -82,7 +82,7 @@ const N = /* @__PURE__ */ C({
|
|
|
82
82
|
};
|
|
83
83
|
},
|
|
84
84
|
created() {
|
|
85
|
-
this._blurTimeout = null, this._anchor = a(), this.mainButton = null, this.guid = a(), this.buttonsData = [],
|
|
85
|
+
this._blurTimeout = null, this._anchor = a(), this.mainButton = null, this.guid = a(), this.buttonsData = [], O(v);
|
|
86
86
|
},
|
|
87
87
|
mounted() {
|
|
88
88
|
this.mainButton = this.$refs[this._anchor], (this.$props.dir === void 0 && this.isRtl() || this.computedOpened) && this.$forceUpdate();
|
|
@@ -148,8 +148,8 @@ const N = /* @__PURE__ */ C({
|
|
|
148
148
|
show: this.computedOpened,
|
|
149
149
|
animate: n.animate,
|
|
150
150
|
popupClass: S("k-menu-popup", n.popupClass),
|
|
151
|
-
anchorAlign: n.anchorAlign ||
|
|
152
|
-
popupAlign: n.popupAlign ||
|
|
151
|
+
anchorAlign: n.anchorAlign || E(e),
|
|
152
|
+
popupAlign: n.popupAlign || B(e),
|
|
153
153
|
style: e ? {
|
|
154
154
|
direction: "rtl"
|
|
155
155
|
} : void 0
|
|
@@ -247,7 +247,7 @@ const N = /* @__PURE__ */ C({
|
|
|
247
247
|
createBlurTimeout(e) {
|
|
248
248
|
const t = this;
|
|
249
249
|
this._blurTimeout = setTimeout(() => {
|
|
250
|
-
|
|
250
|
+
y && document.activeElement !== t.mainButton && (t.focused = !1, t.focusedIndex = -1, t.$emit("blur", e, this, void 0), t.computedOpened && (t.currentOpened = !1, t.dispatchPopupEvent(e, !1)));
|
|
251
251
|
}, 200);
|
|
252
252
|
},
|
|
253
253
|
dispatchClickEvent(e, t) {
|
|
@@ -12,4 +12,4 @@
|
|
|
12
12
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
13
13
|
*-------------------------------------------------------------------------------------------
|
|
14
14
|
*/
|
|
15
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("vue"),require("@progress/kendo-vue-common"),require("@progress/kendo-svg-icons"),require("@progress/kendo-vue-popup"),require("@progress/kendo-vue-intl")):"function"==typeof define&&define.amd?define(["exports","vue","@progress/kendo-vue-common","@progress/kendo-svg-icons","@progress/kendo-vue-popup","@progress/kendo-vue-intl"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).KendoVueButtons={},e.Vue,e.KendoVueCommon,e.KendoSVGIcons,e.KendoVuePopup,e.KendoVueIntl)}(this,(function(e,t,s,o,i,n){"use strict";const r=["button:not(.k-dropdownlist button):not(.k-colorpicker button):not(.k-split-button .k-split-button-arrow)",".k-button-group > button",".k-dropdownlist",".k-colorpicker"],l={button:"k-button",flat:"k-flat",outline:"k-outline",clear:"k-button-clear",primary:"k-primary","state-selected":"k-selected","button-icon":"k-button-icon","button-icontext":"k-button-icontext","state-disabled":"k-disabled","group-start":"k-group-start","group-end":"k-group-end","button-group":"k-button-group","button-group-stretched":"k-button-group-stretched",ltr:"k-ltr",rtl:"k-rtl"},a={name:"@progress/kendo-vue-buttons",productName:"Kendo UI for Vue",productCode:"KENDOUIVUE",productCodes:["KENDOUIVUE"],publishDate:1657089513,version:"6.4.1-develop.2",licensingDocsUrl:"https://www.telerik.com/kendo-vue-ui/my-license/?utm_medium=product&utm_source=kendovue&utm_campaign=kendo-ui-vue-purchase-license-keys-warning"},d=l,u=t.defineComponent({name:"KendoButton",emits:{click:null,mousedown:null,mouseup:null,pointerdown:null,pointerup:null,focus:null,blur:null,keypress:null,keydown:null,contextmenu:null},props:{ariaLabel:String,ariaPressed:Boolean,title:String,dir:String,selected:{type:Boolean,default:void 0},togglable:{type:Boolean,default:!1},icon:{type:String,default:function(){}},svgIcon:Object,iconClass:{type:String,default:function(){}},imageUrl:{type:String,default:function(){}},imageAlt:String,disabled:{type:Boolean,default:void 0},size:{type:String,default:"medium"},shape:{type:String},rounded:{type:String,default:"medium"},fillMode:{type:String,default:"solid"},themeColor:{type:String,default:"base"},tabIndex:Number,accessKey:String,id:String,type:String,role:String},created(){s.validatePackage(a),this.currentActive=!0===this.$props.togglable&&!0===this.$props.selected,this._activeTemp=void 0},data:()=>({currentActive:null}),computed:{computedSelected(){return void 0!==this._activeTemp?this._activeTemp:void 0!==this.$props.selected?this.$props.selected:this.currentActive},buttonClasses(){const{disabled:e,icon:t,iconClass:o,imageUrl:i,dir:n,svgIcon:r,size:l,shape:a,rounded:u,fillMode:c,themeColor:p}=this.$props,h=void 0!==r||void 0!==t||void 0!==o||void 0!==i,m=s.getDefaultSlots(this);return{[d.button]:!0,[`k-button-${s.kendoThemeMaps.sizeMap[l]||l}`]:l,[`k-button-${a}`]:a&&"rectangle"!==a,[`k-rounded-${s.kendoThemeMaps.roundedMap[u]||u}`]:u,"k-icon-button":!m&&h,"k-disabled":e,"k-selected":this.computedSelected,"k-rtl":"rtl"===n,[`k-button-${c}`]:c,[`k-button-${c}-${p}`]:c&&p}}},updated(){this.$props.togglable&&void 0!==this.$props.selected&&this.$props.selected!==this.currentActive&&(this.currentActive=this.$props.selected)},methods:{focus(e){this.$el.focus(e)},toggleIfApplicable(){if(!this.disabled&&this.$props.togglable&&void 0===this.$props.selected){const e=!this.currentActive;this._activeTemp=e,this.currentActive=e,this._activeTemp=void 0}},handleClick(e){this.toggleIfApplicable(),this.disabled||this.$emit("click",e)},handleMouseDown(e){this.disabled||this.$emit("mousedown",e)},handlePointerDown(e){this.disabled||this.$emit("pointerdown",e)},handleMouseUp(e){this.disabled||this.$emit("mouseup",e)},handlePointerUp(e){this.disabled||this.$emit("pointerup",e)},handleFocus(e){this.disabled||this.$emit("focus",e)},handleBlur(e){this.disabled||this.$emit("blur",e)},handleKeypress(e){this.disabled||this.$emit("keypress",e)},handleKeydown(e){this.disabled||this.$emit("keydown",e)},handleContextmenu(e){this.disabled||this.$emit("contextmenu",e)}},render(){const{togglable:e,icon:o,svgIcon:i,iconClass:n,imageUrl:r,imageAlt:l,accessKey:a,tabIndex:d,id:u,type:c,disabled:p,role:h}=this.$props,m=s.getDefaultSlots(this);return t.createVNode("button",{class:this.buttonClasses,onClick:this.handleClick,onMousedown:this.handleMouseDown,onMouseup:this.handleMouseUp,onPointerdown:this.handlePointerDown,onPointerup:this.handlePointerUp,onFocus:this.handleFocus,onBlur:this.handleBlur,onKeypress:this.handleKeypress,onKeydown:this.handleKeydown,onContextmenu:this.handleContextmenu,title:this.title,"aria-label":this.ariaLabel,"aria-disabled":p||void 0,"aria-pressed":e?!!this.currentActive:void 0,accesskey:a,tabindex:d,id:u,type:c,role:h},[function(){if(r)return t.createVNode("img",{role:"presentation",class:"k-image",alt:l,src:r},null);if(o||i){const e=s.classNames("k-button-icon",n);return t.createVNode(s.Icon,{name:o,icon:i,class:e},null)}return n?t.createVNode("span",{role:"presentation",class:n},null):null}.call(this),m&&t.createVNode("span",{class:"k-button-text"},[m])])}}),c=t.defineComponent({name:"KendoButtonWrap",render(){return s.getDefaultSlots(this)[0]}}),p=l,h=t.defineComponent({name:"KendoButtonGroup",props:{disabled:{type:Boolean,default:void 0},width:String,dir:{type:String,default:function(){}}},created(){s.validatePackage(a)},render(){const e=s.getDefaultSlots(this),o=function(e,o,i,n){const r=s.classNames({[p["state-disabled"]]:this.$props.disabled,[p["group-start"]]:n?i:0===o,[p["group-end"]]:n?0===o:i});return t.h(c,{class:r,"aria-disabled":this.$props.disabled},(function(){return[e]}))},i=s.classNames([p["button-group"]],{"k-disabled":this.$props.disabled,[p["button-group-stretched"]]:!!this.$props.width});return t.createVNode("div",{style:{width:this.width},dir:this.$props.dir,role:"group","aria-disabled":this.$props.disabled,class:i},[function(e){const t=e.length,s=void 0!==this.$props.dir?"rtl"===this.$props.dir:this.$el&&"rtl"===getComputedStyle(this.$el).direction||!1;return e.map(((e,i)=>this.isValidButton(e)?o.call(this,e,i,i===t-1,s):e))}.call(this,e)])},methods:{isValidButton:e=>e&&e.tag&&-1!==e.tag.toLowerCase().indexOf("button")||e.componentOptions&&e.componentOptions.tag&&-1!==e.componentOptions.tag.toLowerCase().indexOf("button")||e.type&&e.type.name&&-1!==e.type.name.toLowerCase().indexOf("kendobutton")}});let m=function(e){return e.next="next",e.prev="prev",e.current="current",e.reset="reset",e}({});let f=function(e){return e.remove="remove",e.add="add",e.reorder="reorder",e}({});let b=function(e){return e.single="single",e.multiple="multiple",e.none="none",e}({}),g=function(e){return e.toggle="toggle",e.remove="remove",e}({});const v=t.defineComponent({name:"KendoVueChip",props:{id:String,text:String,avatar:{type:[String,Function,Object],default:function(){}},value:[String,Object],dir:{type:String,default:function(){return"ltr"}},removable:{type:Boolean,default:!1},removeIcon:{type:String,default:function(){return"x-circle"}},removeSvgIcon:{type:Object,default:function(){return o.xCircleIcon}},disabled:{type:Boolean,default:!1},icon:String,svgIcon:Object,selectedIcon:{type:String,default:function(){return"check"}},selectedSvgIcon:{type:Object,default:function(){return o.checkIcon}},size:{type:String,default:"medium"},rounded:{type:String,default:"medium"},fillMode:{type:String,default:"solid",validator:function(e){return[null,"flat","outline","solid"].includes(e)}},themeColor:{type:String,default:"base",validator:function(e){return[null,"base","error","info","success","warning"].includes(e)}},dataItem:Object,selected:Boolean,ariaDescribedBy:String,role:{type:String,default:"button"},tabIndex:Number,onMousedown:Function},emits:{click:null,keydown:null,blur:null,focus:null,remove:null},inject:{kendoSelection:{default:{value:null}},kendoFocused:{default:{value:null}},kendoDataItems:{default:null},handleDispatchDataItems:{default:s.noop},handleDispatchSelection:{default:s.noop},handleDispatchFocus:{default:s.noop}},created(){this.currentDir=void 0,s.validatePackage(a)},mounted(){this.chip=s.getRef(this,"chip"),this.currentDir=void 0!==this.$props.dir?"rtl"===this.$props.dir:this.$el&&"rtl"===getComputedStyle(this.$el).direction||!1},updated(){this.kendoFocused.value===this.$props.value&&this.$el&&this.$el.focus()},computed:{currentSelected(){return this.$props.selected||(Array.isArray(this.kendoSelection.value)?this.kendoSelection.value.some((e=>e===this.$props.value)):this.kendoSelection.value===this.$props.value)},chipLabelClass:()=>({"k-chip-label":!0})},methods:{computedFocused(){return this.kendoFocused.value===this.$props.value},handleMouseDown(e){this.$emit("mousedown",e)},handleClick(e){this.handleDispatchSelection&&this.handleDispatchSelection({type:g.toggle,payload:this.$props.value,event:e}),this.$emit("click",{target:this.target,event:e})},handleRemove(e){e.stopPropagation(),this.$props.removable&&(this.handleDispatchFocus&&(this.handleDispatchDataItems({type:f.remove,payload:this.$props.value,event:e}),this.handleDispatchFocus({type:m.reset,payload:this.$props.value,event:e}),this.handleDispatchSelection({type:g.remove,payload:this.$props.value,event:e})),this.$emit("remove",{target:this.target,event:e}))},handleKeyDown(e){switch(e.keyCode){case s.Keys.left:this.handleDispatchFocus&&this.handleDispatchFocus({type:m.prev,payload:this.$props.value,event:e});break;case s.Keys.right:this.handleDispatchFocus&&this.handleDispatchFocus({type:m.next,payload:this.$props.value,event:e});break;case s.Keys.enter:this.handleDispatchFocus&&this.handleDispatchSelection({type:g.toggle,payload:this.$props.value,event:e});break;case s.Keys.delete:this.handleRemove(e)}this.$emit("keydown",{target:this.target,event:e})},handleFocus(e){this.handleDispatchFocus&&this.handleDispatchFocus({payload:this.$props.value,type:m.current,event:e}),this.$emit("focus",{target:this.target,event:e})},handleBlur(e){this.$emit("blur",{target:this.target,event:e})}},setup:()=>({chipRef:t.ref(null)}),render(){const{size:e,rounded:o,themeColor:i,fillMode:n,look:r,avatar:l,icon:a,svgIcon:d,selectedIcon:u,selectedSvgIcon:c,removeIcon:p,removeSvgIcon:h}=this.$props,m=s.templateRendering.call(this,l,s.getListeners.call(this)),f=l?t.createVNode("div",{class:`k-chip-avatar k-avatar k-rounded-${l.rounded||"medium"} k-avatar-${s.kendoThemeMaps.sizeMap[e]||e} k-avatar-solid k-avatar-solid-primary`,style:l.style},[t.createVNode("span",{class:"k-avatar-image"},[t.createVNode("img",{src:l.imageUrl,alt:l.imageAlt},null)])]):null,b=s.getTemplate.call(this,{h:t.h,template:m});return t.createVNode("div",{role:this.$props.role,id:this.$props.value,ref:s.setRef(this,"chip"),dir:this.currentDir,tabindex:s.getTabIndex(this.$props.tabIndex,this.$props.disabled,void 0),class:s.classNames("k-chip",{"k-rtl":"rtl"===this.currentDir,"k-disabled":this.$props.disabled,"k-selected":this.currentSelected,"k-focus":this.computedFocused(),[`k-chip-${s.kendoThemeMaps.sizeMap[e]||e}`]:e,[`k-rounded-${s.kendoThemeMaps.roundedMap[o]||o}`]:o,[`k-chip-${n}`]:n,[`k-chip-${n}-${i}`]:!(!n||!i),"k-chip-outline":"outline"===r||"outlined"===r,"k-chip-solid":"solid"===r||"filled"===r||"solid"===n}),"aria-pressed":"button"===this.$props.role?this.currentSelected:void 0,"aria-selected":"option"===this.$props.role?this.currentSelected:void 0,"aria-disabled":this.$props.disabled,"aria-describedby":this.$props.ariaDescribedBy,onFocus:this.handleFocus,onBlur:this.handleBlur,onClick:this.handleClick,onKeydown:this.handleKeyDown,onMousedown:this.handleMouseDown},[this.currentSelected&&(u||c)&&t.createVNode(s.Icon,{name:s.getIconName(u),icon:c,size:"small"},null),(a||d)&&t.createVNode(s.Icon,{name:s.getIconName(a),icon:d,size:"small"},null),l?l.imageUrl?f:b:null,t.createVNode("span",{class:"k-chip-content"},[this.$props.text&&t.createVNode("span",{"aria-label":this.$props.text,class:this.chipLabelClass},[this.$props.text])]),this.$props.removable&&t.createVNode("span",{class:"k-chip-actions"},[t.createVNode("span",{class:"k-chip-action k-chip-remove-action"},[t.createVNode(s.Icon,{name:s.getIconName(p),icon:h,size:"small",onClick:this.handleRemove},null)])])])}}),k=t.defineComponent({name:"KendoVueChipList",inheritAttrs:!1,props:{id:String,tabIndex:Number,dataItems:Array,defaultDataItems:{type:Array,default:function(){return[]}},value:[Object,Array,String,Number],defaultValue:{type:[Object,Array,String,Number],default:function(){return null}},size:{type:String,default:"medium"},rounded:{type:String,default:"medium"},fillMode:{type:String,default:"solid",validator:function(e){return[null,"flat","outline","solid"].includes(e)}},selection:{type:String,default:function(){return"none"}},textField:{type:String,default:function(){return"text"}},valueField:{type:String,default:function(){return"value"}},avatarField:{type:String,default:function(){return"avatar"}},disabled:{type:Boolean,default:!1},dir:{type:String,default:function(){return"ltr"}},chip:[String,Function,Object],ariaLabelledBy:String,ariaDescribedBy:String},provide(){return{kendoSelection:this.currentValue,kendoFocused:this.currentFocused,kendoDataItems:this.computedDataItems,handleDispatchDataItems:this.handleDispatchDataItems,handleDispatchSelection:this.handleDispatchSelection,handleDispatchFocus:this.handleDispatchFocus}},created(){s.validatePackage(a),this.currentDataItems=this.$props.dataItems||this.$props.defaultDataItems,this.currentValue.value=this.$props.value||this.$props.defaultValue},data:()=>({currentDataItems:[],currentDir:"ltr",isRtl:!1,currentFocused:{value:!1},currentValue:{value:null}}),mounted(){this.chipList=this.chipListRef,this.currentDir=void 0!==this.$props.dir?this.$props.dir:this.$el&&"rtl"===getComputedStyle(this.$el).direction||!1,this.isRtl="rtl"===this.currentDir},computed:{computedDataItems(){return this.$props.dataItems||this.currentDataItems},computedValue(){return this.$props.value||this.currentValue.value},items(){return this.computedDataItems.reduce(this.itemsReducer,[])}},methods:{handleDispatchSelection(e){const t=((e,t)=>{switch(t.selection){case b.single:switch(t.type){case g.toggle:if(!Array.isArray(e)||null===e)return t.payload===e?null:t.payload;throw new Error("State cannot be an array in single selection");case g.remove:return t.payload===e?null:e;default:return e}case b.multiple:switch(t.type){case g.toggle:if(Array.isArray(e))return e.some((e=>e===t.payload))?e.filter((e=>e!==t.payload)):[...e,t.payload];if(null===e)return[t.payload];throw new Error("State cannot be non-array in multiple selection");case g.remove:return Array.isArray(e)?e.some((e=>e===t.payload))?e.filter((e=>e!==t.payload)):[...e,t.payload]:e;default:return e}case b.none:return null;default:return e}})(this.computedValue,{...e,selection:this.$props.selection,state:this.computedValue});this.handleChange(t,e.event),this.currentValue.value=t},handleDispatchFocus(e){const t=((e,t)=>{const s=t.items.findIndex((t=>t===e));switch(t.type){case m.next:return s===t.items.length-1?e:t.items[s+1];case m.prev:return 0===s?e:t.items[s-1];case m.current:return t.payload;case m.reset:return null;default:return e}})(e.payload,{...e,items:this.items});this.currentFocused.value=t},handleDispatchDataItems(e){const t=((e,t)=>{switch(t.type){case f.add:break;case f.remove:return e.filter((e=>e[t.valueField]!==t.payload));case f.reorder:break;default:return e}})(this.computedDataItems,{...e,state:this.computedDataItems,valueField:this.$props.valueField});this.handleDataChange(t,e.event),this.currentDataItems=t},handleChange(e,t){this.$el&&this.$emit("change",{value:e,target:this.$el,event:t})},handleDataChange(e,t){this.$el&&this.$emit("datachange",{value:e,target:this.$el,event:t})},itemsReducer(e,t){return e.push(t[this.$props.valueField||this.$props.valueField]),e}},setup:()=>({chipListRef:t.ref(null)}),render(){const{size:e}=this.$props;return t.createVNode("div",{ref:s.setRef(this,"chipList"),role:"listbox",id:this.$props.id,dir:this.currentDir,style:this.$attrs.style,tabindex:s.getTabIndex(this.$props.tabIndex,this.$props.disabled,void 0),class:s.classNames("k-chip-list",{[`k-chip-list-${s.kendoThemeMaps.sizeMap[e]||e}`]:e,"k-rtl":"rtl"===this.currentDir,"k-selection-single":"single"===this.$props.selection,"k-selection-multiple":"multiple"===this.$props.selection,"k-disabled":this.$props.disabled}),"aria-labelledby":this.$props.ariaLabelledBy,"aria-describedby":this.$props.ariaDescribedBy,"aria-orientation":"horizontal","aria-multiselectable":"multiple"===this.$props.selection||void 0},[this.computedDataItems.map((function(e){const o=s.templateRendering.call(this,this.$props.chip,s.getListeners.call(this)),i=t.createVNode(v,{role:"option",dataItem:e,key:e[this.$props.valueField],text:e[this.$props.textField],value:e[this.$props.valueField],avatar:e[this.$props.avatarField],size:this.$props.size,rounded:this.$props.rounded,fillMode:this.$props.fillMode},null);return s.getTemplate.call(this,{h:t.h,template:o,defaultRendering:i,additionalProps:{dataItem:e,key:e[this.$props.valueField],text:e[this.$props.textField],value:e[this.$props.valueField],size:this.$props.size}})}),this)])}}),$=t.defineComponent({name:"KendoVueFloatingActionButtonItem",props:{id:String,disabled:Boolean,focused:Boolean,index:Number,icon:String,item:[String,Function,Object],dataItem:Object,text:String,tabIndex:Number,customProp:[String,Function,Object],class:String},emits:{click:null,down:null},mounted(){this.element=s.getRef(this,"element")},computed:{itemClassNames(){return s.classNames("k-fab-item",{"k-focus":this.focused,"k-disabled":this.disabled})}},methods:{handleClick(e){void 0!==this.$props.index&&!this.$props.disabled&&this.$emit("click",e,this.$props.index)},focusElement(){this.$el&&this.$el.focus()},onMouseDown(e){this.$emit("down",e)}},setup:()=>({elementRef:t.ref(null)}),render(){const{disabled:e,id:o,tabIndex:i,dataItem:n}=this.$props,{text:r,icon:l,svgIcon:a}=n;let d;const u=t.createVNode("li",{ref:s.setRef(this,"element"),id:o,class:this.itemClassNames,role:"menuitem",tabindex:s.getTabIndex(i,e),"aria-disabled":e,"aria-label":`${r||""} floatingactionbutton item`,onClick:this.handleClick,onMousedown:this.onMouseDown,onPointerdown:this.onMouseDown},[r&&t.createVNode("span",{class:"k-fab-item-text"},[r]),(a||l)&&t.createVNode(s.Icon,{name:l,icon:a,class:"k-fab-item-icon"},null)]);return d=s.getTemplate.call(this,{h:t.h,template:this.$props.item,defaultRendering:u,additionalProps:this.$props,additionalListeners:{click:this.handleClick}}),d}}),y="16px",S=e=>"number"==typeof e?e+"px":e,I=(e,t)=>{const s={horizontal:t?"right":"left",vertical:"bottom"};return"end"===e.horizontal&&(s.horizontal=t?"left":"right"),s},x=(e,t)=>{const s={horizontal:t?"right":"left",vertical:"top"};return"end"===e.horizontal&&(s.horizontal=t?"left":"right"),s},C=(e,t)=>({rtl:{end:"k-text-left",start:"k-text-right"},ltr:{start:"k-text-left",end:"k-text-right"}}[e]["end"===t?"end":"start"]),w=(e,t,s,o)=>{const i=t.horizontal,n=t.vertical;if(e){const r=s&&void 0!==s.x?S(s.x):y,l=s&&void 0!==s.x?`calc(50% + ${S(s.x)})`:"50%",a=s&&void 0!==s.y?S(s.y):y,d=s&&void 0!==s.y?`calc(50% + ${S(s.y)})`:"50%";e.style.setProperty(D(t,o),"center"===i?l:r),e.style.setProperty(O(t),"middle"===n?d:a),o&&(("top"===n||"bottom"===n)&&"start"===i&&e.style.setProperty("left","unset"),"middle"===n&&"end"===i&&e.style.setProperty("right","unset"),"middle"===n&&"start"===i&&e.style.setProperty("left","unset"))}},D=(e,t)=>{const{horizontal:s}=e;return{end:t?"left":"right",center:"left",start:t?"right":"left"}[s||"end"]},O=e=>({top:"top",middle:"top",bottom:"bottom"}[e.vertical||"bottom"]),B=t.defineComponent({name:"KendoVueFloatingActionButton",props:{id:String,dir:String,tabIndex:Number,accessKey:String,disabled:{type:Boolean,default:!1},icon:String,svgIcon:Object,iconClass:String,items:[Object,Array],item:[String,Function,Object],text:String,alignOffset:Object,opened:{type:Boolean,default:void 0},align:{type:Object,default:function(){return{vertical:"bottom",horizontal:"end"}}},positionMode:{type:String,default:function(){return"fixed"}},popupSettings:{type:Object,default:function(){return{}}},shape:{type:String,default:function(){return"rectangle"}},rounded:{type:String,default:"full"},fillMode:{type:String,default:"solid",validator:function(e){return[null,"flat","link","outline","solid"].includes(e)}},size:{type:String,default:function(){return"medium"}},themeColor:{type:String,default:function(){return"primary"}}},emits:{click:null,mousedown:null,mouseup:null,open:null,close:null,itemclick:null,focus:null,blur:null,keydown:null},data:()=>({currentOpened:!1,currentFocused:!1,focusedIndex:-1,currentDir:"ltr",isRtl:!1}),created(){s.validatePackage(a),this.element=void 0,this._anchor=s.guid(),this.listId=s.guid(),this.buttonId=s.guid()},mounted(){this.element=this.kendoAnchorRef,this.list=s.getRef(this,"list"),this.popup=s.getRef(this,"popup"),this.currentDir=void 0!==this.$props.dir?this.$props.dir:this.$el&&"rtl"===getComputedStyle(this.$el).direction||!1,this.isRtl="rtl"===this.currentDir,void 0!==this.opened&&w(this.$el,this.$props.align,this.$props.alignOffset,this.isRtl)},updated(){w(this.$el,this.$props.align,this.$props.alignOffset,this.isRtl),this.currentFocused&&this.element&&this.element.focus()},computed:{buttonClassNames(){const{size:e,icon:t,shape:o,themeColor:i,fillMode:n,rounded:r}=this.$props;return{"k-fab":!0,[`k-fab-${o||"rectangle"}`]:null!==o,[`k-fab-${s.kendoThemeMaps.sizeMap[e]||e}`]:e,[`k-rounded-${s.kendoThemeMaps.roundedMap[r]||r}`]:r,[`k-fab-${n}`]:n,[`k-fab-${n}-${i}`]:n&&i,"k-disabled":this.$props.disabled,"k-focus":this.currentFocused,[`k-${this.$props.align.vertical}-${this.$props.align.horizontal}`]:!0}},computedOpened(){return void 0===this.$props.opened?this.currentOpened:this.$props.opened},rootClassNames(){return s.classNames({"k-pos-absolute":"absolute"===this.$props.positionMode,"k-pos-fixed":"fixed"===this.$props.positionMode})}},methods:{dispatchPopupEvent(e,t){this.$props.items&&this.$emit(t?"open":"close",{event:e,isOpened:!t})},handleClick(e){if(e.target&&!this.$props.disabled)if(this.$props.items){const t=!this.computedOpened;this.currentOpened=t,this.currentFocused=!0,this.focusedIndex=t?0:-1,this.dispatchPopupEvent(e,!this.computedOpened)}else this.$emit("click",e,void 0)},handleFocus(e){this.currentFocused=!0,this.focusedIndex=this.computedOpened?0:-1,this.$emit("focus",e,void 0)},handleBlur(e){this.currentFocused=!1,this.currentOpened=!1,this.focusedIndex=-1,this.$emit("blur",e,void 0),this.computedOpened&&this.dispatchPopupEvent(e,!1)},handleMouseDown(e){e.preventDefault(),this.$emit("mousedown",e)},handleMouseUp(e){this.$emit("mouseup",e)},dispatchItemClickEvent(e,t){this.$props.items&&(this.$props.items[t].disabled||this.$emit("itemclick",e,{itemProps:this.$props.items[t],itemIndex:t}))},handleItemClick(e,t){!e.target||!this.$props.items||(this.focusedIndex=t,this.currentOpened=!1,this.dispatchItemClickEvent(e,t),this.dispatchPopupEvent(e,!1))},handleItemDown(e){s.canUseDOM&&document.activeElement===this.element&&e.preventDefault()},handleKeyDown(e){const t=this.focusedIndex,o=this.$props.items?this.$props.items.length-1:-1,i="bottom"===this.$props.align.vertical;switch(e.keyCode){case s.Keys.enter:case s.Keys.space:t>=0&&this.dispatchItemClickEvent(e,t),e.preventDefault(),this.currentOpened=!this.currentOpened,this.focusedIndex=this.currentOpened?-1:0;break;case s.Keys.esc:e.preventDefault(),this.currentOpened=!1,this.focusedIndex=-1;break;case s.Keys.home:e.preventDefault(),this.focusedIndex=0;break;case s.Keys.end:e.preventDefault(),this.focusedIndex=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)}this.$emit("keydown",e,void 0)}},setup:()=>({chipRef:t.ref(null),kendoAnchorRef:t.ref(null)}),render(){const{align:e,disabled:o,icon:n,svgIcon:r,iconClass:l,id:a,items:d,text:u,tabIndex:c,accessKey:p,popupSettings:h}=this.$props,m=s.templateRendering.call(this,this.$props.item,s.getListeners.call(this)),f=function(){return d&&d.map((function(i,n){return t.createVNode($,{key:n,index:n,id:`${this.listId}-${n}`,disabled:o||i.disabled,focused:this.focusedIndex===n,dataItem:i,item:m,class:s.classNames(i.className,C(this.currentDir||"ltr",e.horizontal)),onClick:this.handleItemClick,onDown:this.handleItemDown},null)}),this)},b=n&&!u,g=(this.element?this.element.offsetWidth:0)/2-16;return t.createVNode("div",{class:this.rootClassNames},[t.createVNode("button",{ref:e=>{this.kendoAnchorRef=e},id:a||this.buttonId,role:d?"menubutton":"button",type:"button","aria-disabled":o,"aria-expanded":d?this.computedOpened:void 0,"aria-haspopup":!!d,"aria-label":`${u||""} floatingactionbutton`,"aria-owns":d?this.listId:void 0,"aria-activedescendant":this.focusedIndex>=0&&d?`${this.listId}-${this.focusedIndex}`:void 0,tabindex:s.getTabIndex(c,o),accesskey:p,dir:this.currentDir,disabled:o,class:this.buttonClassNames,onClick:this.handleClick,onMousedown:this.handleMouseDown,onMouseup:this.handleMouseUp,onFocusin:this.handleFocus,onBlur:this.handleBlur,onKeydown:this.handleKeyDown},[n||r?t.createVNode(s.Icon,{name:n,icon:r,class:"k-fab-icon"},null):l?t.createVNode(s.Icon,{class:l},null):null,u&&t.createVNode("span",{class:"k-fab-text"},[u])]),t.createVNode(i.Popup,{ref:s.setRef(this,"popup"),show:this.computedOpened,anchor:this._anchor,animate:h.animate,popupClass:s.classNames("k-popup-transparent k-fab-popup",h.popupClass),anchorAlign:h.anchorAlign||I(e,this.isRtl),popupAlign:h.popupAlign||x(e,this.isRtl),style:{boxShadow:"none"}},{default:()=>[t.createVNode("ul",{ref:s.setRef(this,"list"),role:"menu","aria-labelledby":a,id:this.listId,class:s.classNames("k-fab-items",{"k-fab-items-bottom":"bottom"!==e.vertical,"k-fab-items-top":"bottom"===e.vertical}),style:{paddingLeft:b?g+"px":void 0,paddingRight:b?g+"px":void 0}},[f.call(this)])]})])}}),N=t.defineComponent({name:"KendoButtonItem",emits:{click:null,down:null},props:{focused:Boolean,index:Number,item:Object,render:[String,Object,Function],dataItem:[String,Object],id:String,textField:String,role:String},computed:{wrapperClass(){return{"k-item":!0,"k-focus":this.$props.focused}},innerClass(){const{dataItem:e}=this.$props;return{"k-link k-menu-link":!0,"k-selected":e.selected,"k-disabled":e.disabled}}},methods:{onClick(e){this.$emit("click",e,this.$props.index)},onDown(e){this.$emit("down",e,this.$props.index)}},render(){const{dataItem:e,id:o,render:i}=this.$props;return t.createVNode("li",{id:o,class:this.wrapperClass,onClick:this.onClick,onMousedown:this.onDown,onPointerdown:this.onDown,role:"menuitem","aria-disabled":e.disabled||void 0},[function(){const{textField:o,index:n}=this.$props,r=void 0!==e.text?e.text:o?e[o]:e,l=t.createVNode("span",{tabindex:-1,class:this.innerClass,key:"icon"},[e.icon||e.svgIcon?t.createVNode(s.Icon,{name:e.icon,icon:e.svgIcon,class:e.iconClass},null):e.iconClass&&t.createVNode("span",{class:e.iconClass,role:"presentation"},null),e.imageUrl&&t.createVNode("img",{class:"k-icon",alt:"",src:e.imageUrl,role:"presentation",key:"image"},null),r&&t.createVNode("span",{class:"k-menu-link-text"},[r])]);return s.getTemplate.call(this,{h:t.h,template:this.$props.dataItem.render||i,defaultRendering:l,additionalProps:{item:e,itemIndex:n,innerClass:this.innerClass,focused:this.focused}})}.call(this)])}}),F=(e,t,o,i)=>{if(o)return e;switch(t){case s.Keys.enter:case s.Keys.space:case s.Keys.esc:return-1;case s.Keys.up:case s.Keys.left:return Math.max(0,e-1);case s.Keys.down:case s.Keys.right:return Math.min(i-1,e+1);default:return e}};function R(e){let t={horizontal:"left",vertical:"bottom"};return e&&(t.horizontal="right"),t}function K(e){let t={horizontal:"left",vertical:"top"};return e&&(t.horizontal="right"),t}const V=t.defineComponent({name:"KendoSplitButton",emits:{focus:null,blur:null,buttonclick:null,itemclick:null,open:null,close:null},props:{accessKey:String,ariaLabel:String,text:String,items:{type:Array,default:function(){return[]}},textField:String,tabIndex:Number,disabled:Boolean,icon:String,svgIcon:Object,size:{type:String,default:"medium"},rounded:{type:String,default:"medium"},fillMode:{type:String,default:"solid",validator:function(e){return[null,"flat","link","outline","solid"].includes(e)}},themeColor:{type:String,default:"base",validator:function(e){return[null,"base","dark","error","info","inverse","inverse","light","primary","secondary","success","tertiary","warning"].includes(e)}},opened:{type:Boolean,default:void 0},iconClass:String,imageUrl:String,popupSettings:Object,itemRender:[String,Function,Object],item:[String,Function,Object],className:String,buttonClass:String,dir:String},data:()=>({focused:!1,focusedIndex:-1,currentOpened:!1}),created(){this._blurTimeout=null,this._anchor=s.guid(),this.mainButton=null,this.guid=s.guid(),this.buttonsData=[],s.validatePackage(a)},mounted(){this.mainButton=this.$refs[this._anchor],(void 0===this.$props.dir&&this.isRtl()||this.computedOpened)&&this.$forceUpdate()},updated(){this.focused&&this.element()&&(this.mainButton=this.$refs[this._anchor],this.mainButton.focus())},computed:{computedOpened(){return void 0===this.$props.opened?this.currentOpened:this.$props.opened},wrapperClass(){return{"k-split-button":!0,"k-button-group":!0,"k-focus":this.focused}}},setup:()=>({kendoAnchorRef:t.ref(null)}),render(){this.buttonsData=this.$props.items;const e=this.isRtl(),n=e?"rtl":void 0,{tabIndex:r,disabled:l}=this.$props,a=s.getDefaultSlots(this),d=function(){const{item:e,itemRender:o,textField:i}=this.$props;return this.buttonsData.length>0?this.buttonsData.map((function(n,r){const l="string"!=typeof n?{...n,render:s.templateRendering.call(this,n.render,s.getListeners.call(this))}:n;return t.createVNode(N,{class:"k-menu-item",role:"menuitem",dataItem:l,textField:i,focused:this.focusedIndex===r,onClick:this.onItemClick,onDown:this.onItemDown,render:s.templateRendering.call(this,o,s.getListeners.call(this)),item:e,key:r,index:r,id:`${this.guid}-${r}`},null)}),this):null};return t.createVNode("div",{class:this.wrapperClass,onKeydown:this.onKeyDown,onFocusin:this.onFocus,onFocusout:this.onBlur,dir:n},[t.createVNode(u,{size:this.$props.size,rounded:this.$props.rounded,fillMode:this.$props.fillMode,themeColor:this.$props.themeColor,onClick:e=>this.onItemClick(e,-1),disabled:l||void 0,tabIndex:r,accessKey:this.$props.accessKey,class:this.$props.buttonClass,icon:this.$props.icon,svgIcon:this.$props.svgIcon,iconClass:this.$props.iconClass,imageUrl:this.$props.imageUrl,dir:n,id:this._anchor,ref:this._anchor,type:"button","aria-disabled":l,"aria-haspopup":"menu","aria-expanded":this.computedOpened,"aria-label":this.$props.ariaLabel||`${this.$props.text||""} splitbutton`,"aria-controls":this.guid,"aria-activedescendant":void 0!==this.focusedIndex&&this.focusedIndex>=0?`${this.guid}-${this.focusedIndex}`:void 0},{default:()=>[this.$props.text,a]}),t.createVNode(u,{svgIcon:o.caretAltDownIcon,size:this.$props.size,rounded:this.$props.rounded,fillMode:this.$props.fillMode,themeColor:this.$props.themeColor,icon:"caret-alt-down",disabled:l||void 0,tabIndex:-1,onClick:this.onSplitPartClick,onMousedown:this.onDownSplitPart,onPointerdown:this.onDownSplitPart,dir:n,"aria-label":"menu toggling button"},null),function(){const{popupSettings:o={},size:n}=this.$props;return t.createVNode(i.Popup,{anchor:this._anchor,show:this.computedOpened,animate:o.animate,popupClass:s.classNames("k-menu-popup",o.popupClass),anchorAlign:o.anchorAlign||R(e),popupAlign:o.popupAlign||K(e),style:e?{direction:"rtl"}:void 0},{default:()=>[t.createVNode("ul",{class:`k-group k-menu-group k-reset k-menu-group-${s.kendoThemeMaps.sizeMap[n]||n}`,role:"menu",id:this.guid,"aria-labelledby":this._anchor},[d.call(this)])]})}.call(this)])},methods:{element(){return this.mainButton},onKeyDown(e){if(e.altKey)return void(this.computedOpened||e.keyCode!==s.Keys.down?this.computedOpened&&e.keyCode===s.Keys.up&&(this.dispatchPopupEvent(e,!1),this.focusedIndex=-1,this.currentOpened=!1):(this.dispatchPopupEvent(e,!0),this.focusedIndex=0,this.currentOpened=!0));let t;if(e.keyCode===s.Keys.enter||e.keyCode===s.Keys.space?(e.preventDefault(),this.dispatchClickEvent(e,this.focusedIndex),void 0!==this.focusedIndex&&this.focusedIndex>=0&&(t={focusedIndex:this.computedOpened?-1:0,currentOpened:!this.computedOpened},this.dispatchPopupEvent(e,t.currentOpened))):this.computedOpened&&e.keyCode===s.Keys.esc&&(t={focusedIndex:-1,currentOpened:!1},this.dispatchPopupEvent(e,t.currentOpened)),this.computedOpened){const o=F(this.focusedIndex,e.keyCode,e.altKey,this.buttonsData.length);o!==this.focusedIndex&&(t=t||{},t.focusedIndex=o);const i=e.keyCode===s.Keys.up||e.keyCode===s.Keys.down||e.keyCode===s.Keys.left||e.keyCode===s.Keys.right;!e.altKey&&i&&e.preventDefault()}t&&(this.focusedIndex=t.focusedIndex,this.focused=t.focused,void 0!==t.currentOpened&&(this.currentOpened=t.currentOpened))},onFocus(e){this.focused||(this.$emit("focus",e,this,void 0),this.focused=!0),this.focusedIndex=-1,clearTimeout(this._blurTimeout)},onItemClick(e,t){const s=this.computedOpened;s&&(this.focusedIndex=0,this.currentOpened=!1),this.dispatchClickEvent(e,t),s&&this.dispatchPopupEvent(e,!1)},onBlur(e){clearTimeout(this._blurTimeout),this.createBlurTimeout(e)},createBlurTimeout(e){const t=this;this._blurTimeout=setTimeout((()=>{s.canUseDOM&&document.activeElement!==t.mainButton&&(t.focused=!1,t.focusedIndex=-1,t.$emit("blur",e,this,void 0),t.computedOpened&&(t.currentOpened=!1,t.dispatchPopupEvent(e,!1)))}),200)},dispatchClickEvent(e,t){this.isItemDisabled(t)||(-1===t?this.$emit("buttonclick",e,this,void 0):this.$emit("itemclick",{event:e,component:this,item:this.buttonsData[t],itemIndex:t}))},onSplitPartClick(e){if(this.buttonsData.length){const t=!this.computedOpened;this.dispatchPopupEvent(e,t),this.focusedIndex=t?0:-1,this.currentOpened=t,this.focused=!0}},onDownSplitPart(e){e.preventDefault(),this.element()&&document.activeElement!==this.element()&&this.element().focus()},onItemDown(e){document.activeElement===this.element()&&e.preventDefault()},dispatchPopupEvent(e,t){this.$emit(t?"open":"close",e,this,void 0)},isItemDisabled(e){return this.buttonsData[e]?this.buttonsData[e].disabled:this.$props.disabled},isRtl(){return void 0!==this.$props.dir?"rtl"===this.$props.dir:!!this.$el&&"rtl"===getComputedStyle(this.$el).direction}}}),T=t.defineComponent({name:"KendoDropDownButton",emits:{focus:null,blur:null,itemclick:null,open:null,close:null},props:{accessKey:String,items:{type:Array,default:function(){return[]}},ariaLabel:String,text:String,textField:String,tabIndex:Number,disabled:Boolean,icon:String,svgIcon:Object,iconClass:String,imageUrl:String,popupSettings:Object,itemRender:[String,Object,Function],item:Function,size:{type:String,default:"medium"},shape:{type:String,default:"rectangle",validator:function(e){return[null,"rectangle","square"].includes(e)}},rounded:{type:String,default:"medium"},fillMode:{type:String,default:"solid",validator:function(e){return[null,"flat","link","outline","solid"].includes(e)}},themeColor:{type:String,default:"base",validator:function(e){return[null,"base","dark","error","info","inverse","inverse","light","primary","secondary","success","tertiary","warning"].includes(e)}},opened:{type:Boolean,default:void 0},buttonClass:String,dir:String},created(){this._blurTimeout=null,this._anchor=s.guid(),this.wrapper=null,this.mainButton=null,this.guid=s.guid(),this.buttonsData=[],s.validatePackage(a)},mounted(){this.mainButton=this.$refs[this._anchor],(void 0===this.$props.dir&&this.isRtl()||this.computedOpened)&&this.$forceUpdate()},updated(){this.focused&&this.element()&&(this.mainButton=this.$refs[this._anchor],this.mainButton.focus())},data:()=>({currentOpened:!1,focused:!1,focusedIndex:-1}),computed:{computedOpened(){return void 0===this.$props.opened?this.currentOpened:this.$props.opened},wrapperClass(){return{"k-dropdown-button":!0,"k-focus":this.focused}}},setup:()=>({kendoAnchorRef:t.ref(null)}),render(){const e=this.isRtl(),o=e?"rtl":void 0,{tabIndex:n,disabled:r}=this.$props,l=s.getDefaultSlots(this);this.buttonsData=this.$props.items;const a=function(){const{item:e,itemRender:o,textField:i}=this.$props;return this.buttonsData.length>0?this.buttonsData.map((function(n,r){const l="string"!=typeof n?{...n,render:s.templateRendering.call(this,n.render,s.getListeners.call(this))}:n;return t.createVNode(N,{class:"k-menu-item",dataItem:l,textField:i,focused:this.focusedIndex===r,onClick:this.onItemClick,onDown:this.onItemDown,render:s.templateRendering.call(this,o,s.getListeners.call(this)),item:e,index:r,key:r,id:`${this.guid}-${r}`},null)}),this):null};return t.createVNode("div",{class:this.wrapperClass,onKeydown:this.onKeyDown,onFocusin:this.onFocus,onFocusout:this.onBlur,dir:o},[t.createVNode(u,{size:this.$props.size,shape:this.$props.shape,rounded:this.$props.rounded,fillMode:this.$props.fillMode,themeColor:this.$props.themeColor,onClick:this.onClickMainButton,onMousedown:this.mouseDown,disabled:r||void 0,tabIndex:n,accessKey:this.$props.accessKey,icon:this.$props.icon,svgIcon:this.$props.svgIcon,iconClass:this.$props.iconClass,class:this.$props.buttonClass,imageUrl:this.$props.imageUrl,dir:o,ref:this._anchor,type:"button","aria-disabled":r,"aria-haspopup":"menu","aria-expanded":this.computedOpened,"aria-label":this.$props.ariaLabel||`${this.$props.text||""} dropdownbutton`,"aria-controls":this.guid,"aria-activedescendant":void 0!==this.focusedIndex&&this.focusedIndex>=0?`${this.guid}-${this.focusedIndex}`:void 0},{default:()=>[this.$props.text,l]}),function(){const{popupSettings:o={},size:n}=this.$props;return t.createVNode(i.Popup,{anchor:this._anchor,show:this.computedOpened,animate:o.animate,popupClass:s.classNames("k-menu-popup",o.popupClass),anchorAlign:o.anchorAlign||R(e),popupAlign:o.popupAlign||K(e),style:e?{direction:"rtl"}:void 0},{default:()=>[t.createVNode("ul",{class:`k-group k-menu-group k-reset k-menu-group-${s.kendoThemeMaps.sizeMap[n]||n}`,role:"menu",id:this.guid},[a.call(this)])]})}.call(this)])},methods:{element(){return this.mainButton},onKeyDown(e){if(e.altKey)this.computedOpened||e.keyCode!==s.Keys.down?this.computedOpened&&e.keyCode===s.Keys.up&&(this.dispatchPopupEvent(e,!1),this.focusedIndex=-1,this.currentOpened=!1):(this.dispatchPopupEvent(e,!0),this.focusedIndex=0,this.currentOpened=!0);else if(e.keyCode===s.Keys.enter||e.keyCode===s.Keys.space?(void 0!==this.focusedIndex&&this.focusedIndex>=0&&this.dispatchClickEvent(e,this.focusedIndex),e.preventDefault(),this.focusedIndex=this.computedOpened?-1:0,this.currentOpened=!this.computedOpened,this.dispatchPopupEvent(e,this.currentOpened)):this.computedOpened&&e.keyCode===s.Keys.esc&&(this.focusedIndex=-1,this.currentOpened=!1,this.dispatchPopupEvent(e,this.currentOpened)),this.computedOpened){const t=F(this.focusedIndex,e.keyCode,e.altKey,this.buttonsData.length);this.focusedIndex=t;const o=e.keyCode===s.Keys.up||e.keyCode===s.Keys.down||e.keyCode===s.Keys.left||e.keyCode===s.Keys.right;!e.altKey&&o&&e.preventDefault()}},onFocus(e){this.focused||(this.focused=!0,this.$emit("focus",e,this,void 0)),this.focusedIndex=this.computedOpened?0:-1,clearTimeout(this._blurTimeout)},onBlur(e){clearTimeout(this._blurTimeout),this.createBlurTimeout(e)},createBlurTimeout(e){const t=this;this._blurTimeout=setTimeout((()=>{s.canUseDOM&&document.activeElement!==t.$el&&(t.focused=!1,t.focusedIndex=-1,t.$emit("blur",e,t,void 0),t.computedOpened&&(t.currentOpened=!1,t.dispatchPopupEvent(e,!1)))}),200)},onItemClick(e,t){this.focusedIndex=-1,this.currentOpened=!1,this.dispatchClickEvent(e,t),this.dispatchPopupEvent(e,!1)},onItemDown(e){document.activeElement===this.element()&&e.preventDefault()},mouseDown(e){e.preventDefault()},dispatchClickEvent(e,t){this.isItemDisabled(t)||this.$emit("itemclick",{event:e,item:this.buttonsData[t],itemIndex:t})},onClickMainButton(e){if(!this.buttonsData.length)return;const t=!this.computedOpened;this.currentOpened=t,this.focused=!0,this.focusedIndex=t?0:-1,this.dispatchPopupEvent(e,t)},dispatchPopupEvent(e,t){this.$emit(t?"open":"close",e,this,void 0)},isItemDisabled(e){return this.buttonsData[e]?this.buttonsData[e].disabled:this.$props.disabled},isRtl(){return void 0!==this.$props.dir?"rtl"===this.$props.dir:!!this.$el&&"rtl"===getComputedStyle(this.$el).direction}}}),M=t.defineComponent({name:"KendoToolbarItem",render:()=>t.createVNode("div",{class:"k-toolbar-separator k-separator"},null)}),P="prevArrow.title",z="nextArrow.title",A="moreButtonTitle.title",E={[P]:"Previous scroll button",[z]:"Next scroll button",[A]:"More button"},L=t.defineComponent({name:"KendoToolbarScrollButton",props:{buttonScrollSpeed:Number,disabled:Boolean,scrollContentRef:Object,type:String,prevButton:Object,nextButton:Object,dir:String},inject:{kendoLocalizationService:{default:null}},emits:["contentscroll"],methods:{getScrollButtonTitle(){const{dir:e,type:t}=this.$props;return"rtl"!==e?"prev"===t?n.provideLocalizationService(this).toLanguageString(P,E[P]):n.provideLocalizationService(this).toLanguageString(z,E[z]):"prev"===t?n.provideLocalizationService(this).toLanguageString(z,E[z]):n.provideLocalizationService(this).toLanguageString(P,E[P])}},render(){const{disabled:e,type:i,scrollContentRef:n,buttonScrollSpeed:r,prevButton:l,nextButton:a}=this.$props;return t.createVNode("span",{class:s.classNames("k-button","k-button-md","k-button-solid","k-button-solid-base","k-rounded-md","k-icon-button",`k-toolbar-${i}`,{"k-disabled":e}),title:this.getScrollButtonTitle(),"aria-hidden":!0,tabindex:e?-1:void 0,onClick:()=>{n&&r&&(n.scrollBy({left:"next"===i?r:-r,behavior:"smooth"}),this.$emit("contentscroll",i))}},[t.createVNode(s.SvgIcon,{icon:"prev"===i?o.caretAltLeftIcon:o.caretAltRightIcon,class:"k-button-icon"},null)])}}),j=t.defineComponent({name:"ToolbarScrollable",props:{scrollButtons:String,scrollButtonsPosition:String,isOverflowing:Boolean,buttonScrollSpeed:Number,dir:String,isScrollStartPosition:Boolean,isScrollEndPosition:Boolean,prevButton:Object,nextButton:Object,toolbarItems:Object},emits:["contentscroll"],data:()=>({scrollContentRef:null}),mounted(){this.scrollContentRef=this.$refs.scrollContentRef},methods:{onContentScroll(e){this.$emit("contentscroll",e)}},render(){const{scrollButtons:e,buttonScrollSpeed:s,prevButton:o,nextButton:i,scrollButtonsPosition:n,dir:r,isScrollStartPosition:l,isScrollEndPosition:a,toolbarItems:d}=this.$props,u=(e,n)=>t.createVNode(L,{type:e,dir:r,disabled:n,scrollContentRef:this.scrollContentRef,buttonScrollSpeed:s,prevButton:o,nextButton:i,onContentscroll:this.onContentScroll},null),c="visible"===e||"auto"===e&&this.$props.isOverflowing;return t.createVNode(t.Fragment,null,[c&&"split"===n&&t.createVNode(t.Fragment,null,[u("rtl"!==r?"prev":"next",l),t.createVNode(M,{class:"k-toolbar-button-separator"},null)]),c&&"start"===n&&t.createVNode(t.Fragment,null,[u("rtl"!==r?"prev":"next",l),u("rtl"!==r?"next":"prev",a),t.createVNode(M,{class:"k-toolbar-button-separator"},null)]),t.createVNode("span",{class:"k-toolbar-items k-toolbar-items-scroll",ref:"scrollContentRef"},[d]),c&&"split"===n&&t.createVNode(t.Fragment,null,[t.createVNode(M,{class:"k-toolbar-button-separator"},null),u("rtl"!==r?"next":"prev",a)]),c&&"end"===n&&t.createVNode(t.Fragment,null,[t.createVNode(M,{class:"k-toolbar-button-separator"},null),u("rtl"!==r?"prev":"next",l),u("rtl"!==r?"next":"prev",a)])])}}),U=t.defineComponent({name:"ToolbarOverflowSection",props:{toolbarRef:Object,toolbarWidth:Number,fillMode:String,size:String,visibleTools:Array,overFlowTools:Array,opened:Boolean,allTools:Array},emits:["toggleoverflow"],inject:{kendoLocalizationService:{default:null}},methods:{handleClick(){this.$emit("toggleoverflow",!this.$props.opened)}},render(){const{visibleTools:e,overFlowTools:r,allTools:l}=this.$props,{toolbarRef:a,toolbarWidth:d,fillMode:c,size:p}=this.$props;return t.createVNode(t.Fragment,null,[e&&[...l].splice(0,e.length),r.length>0&&t.createVNode(t.Fragment,null,[t.createVNode(M,{class:"k-toolbar-button-separator"},null),t.createVNode(u,{ref:"buttonRef",class:"k-toolbar-overflow-button",fillMode:"flat",svgIcon:o.moreHorizontalIcon,title:n.provideLocalizationService(this).toLanguageString(A,E[A]),onClick:this.handleClick},null),t.createVNode(i.Popup,{anchor:a,show:this.$props.opened,popupClass:"k-toolbar-popup",key:d,style:{width:d+"px"}},{default:()=>[t.createVNode("span",{class:`k-toolbar-items-list k-toolbar-items-list-${s.kendoThemeMaps.sizeMap[p]} k-toolbar-items-list-${c}`},[e&&[...l].splice(e.length,l.length)])]})])])}}),W=t.defineComponent({name:"KendoToolbar",props:{tabIndex:{type:Number,default:0},dir:{type:String,validator:function(e){return[null,"ltr","rtl"].includes(e)},default:"ltr"},keyboardNavigation:{type:Boolean,default:!0},buttons:{type:Array,default:function(){}},size:{type:String,default:"medium",validator:function(e){return[null,"small","medium","large"].includes(e)}},fillMode:{type:String,default:"solid",validator:function(e){return[null,"solid","flat","outline"].includes(e)}},ariaLabel:String,overflow:{type:String,default:"section",validator:function(e){return[null,"none","section","scroll"].includes(e)}},scrollButtons:{type:String,default:"auto",validator:function(e){return[null,"hidden","visible","auto"].includes(e)}},scrollButtonsPosition:{type:String,default:"split",validator:function(e){return[null,"start","end","split"].includes(e)}},buttonScrollSpeed:{type:Number,default:100}},data:()=>({defaultSlot:null,offsetWidth:0,offsetHeight:0,currentButtons:[],focusedSelector:"",isScrollStartPosition:!0,isScrollEndPosition:!1,focusableButtons:[],isOverflowing:!1,scrollContentRef:null,lastToolbarWidthRef:0,overFlowToolsRef:[],overFlowOpened:!1,visibleToolsRef:void 0}),created(){this.focusedSelector=this.selectors.map((e=>e+":focus")).join(","),s.validatePackage(a)},computed:{selectors(){return this.$props.buttons||r},wrapperClass(){const{size:e,fillMode:t,overflow:o,scrollButtons:i}=this.$props;return{"k-toolbar":!0,[`k-toolbar-${t}`]:t,[`k-toolbar-${s.kendoThemeMaps.sizeMap[e]||e}`]:e,"k-toolbar-scrollable":"scroll"===o,"k-toolbar-scrollable-overlay":"scroll"===o&&("hidden"===i||void 0===i),"k-toolbar-scrollable-start":"scroll"===o&&"hidden"===i&&this.isScrollStartPosition,"k-toolbar-scrollable-end":"scroll"===o&&"hidden"===i&&this.isScrollEndPosition,"k-toolbar-section":o&&"section"===o}}},mounted(){s.canUseDOM&&window.ResizeObserver&&(this.observerResize=new window.ResizeObserver(this.onWindowResize),this.observerResize.observe(this.$el));const e=this.$el;e&&(this.offsetWidth=e.offsetWidth,this.offsetHeight=e.offsetHeight,!1!==this.$props.keyboardNavigation&&(this.currentButtons=this.getCurrentButtons(),this.setTabIndex(0))),this.scrollContentRef=this.$refs.toolbarScrollable&&this.$refs.toolbarScrollable.scrollContentRef,this.defaultSlot&&(this.visibleToolsRef=this.defaultSlot.filter((e=>e&&e.type)).map(((e,s)=>t.cloneVNode(e,{key:e.key||s}))),this.$nextTick((()=>{this.checkOverflow(),this.initOverflow(this.$refs.toolbar)})))},updated(){!this.$el||!1===this.$props.keyboardNavigation||(this.currentButtons=this.getCurrentButtons(),this.setTabIndex(this.focusedIndex()))},unmounted(){s.canUseDOM&&this.observerResize&&this.observerResize.disconnect(),this.currentButtons.length=0},render(){const{overflow:e,scrollButtons:o,scrollButtonsPosition:i,prevButton:n,nextButton:r,buttonScrollSpeed:l,dir:a,fillMode:d,size:u}=this.$props;return this.defaultSlot=s.getDefaultSlots(this),t.createVNode("div",{ref:"toolbar",class:this.wrapperClass,role:"toolbar",dir:a,"aria-label":this.$props.ariaLabel,onKeydown:this.onKeyDown},["scroll"===e&&t.createVNode(t.Fragment,null,[t.createVNode(j,{ref:"toolbarScrollable",scrollButtons:o,scrollButtonsPosition:i,prevButton:n,nextButton:r,isOverflowing:this.isOverflowing,buttonScrollSpeed:l,dir:a,isScrollStartPosition:this.isScrollStartPosition,isScrollEndPosition:this.isScrollEndPosition,toolbarItems:this.defaultSlot,onContentscroll:this.onContentScroll},null)]),"section"===e&&t.createVNode(U,{opened:this.overFlowOpened,toolbarRef:this.$refs.toolbar,toolbarWidth:this.offsetWidth,fillMode:d,size:u,visibleTools:this.visibleToolsRef,overFlowTools:this.overFlowToolsRef,onToggleoverflow:this.onToggleoverflow,allTools:this.defaultSlot},null),"none"===e&&this.defaultSlot])},methods:{getCurrentButtons(){return this.$el&&this.$el.querySelectorAll?Array.from(this.$el.querySelectorAll(this.selectors.join(","))):[]},getInternalButtons(){return this.$el&&this.$el.querySelectorAll?Array.from(this.$el.querySelectorAll(".k-dropdownlist > .k-button,.k-colorpicker > .k-button")):[]},focusedIndex(){const e=this.$el&&this.$el.querySelector&&this.$el.querySelector(this.focusedSelector);return Math.max(0,this.currentButtons.findIndex((t=>t===e)))},setTabIndex(e){const{tabIndex:t}=this.$props;this.currentButtons.forEach(((s,o)=>{s.tabIndex=o===e?t:-1})),this.getInternalButtons().forEach((e=>{e.tabIndex=-1}))},onKeyDown(e){if(!1===this.$props.keyboardNavigation)return;const t=e.target;if(e.keyCode!==s.Keys.left&&e.keyCode!==s.Keys.right||e.defaultPrevented||-1===this.currentButtons.findIndex((e=>e===t)))return;const o=this.focusedIndex();e.keyCode===s.Keys.left?this.focusButton(o,o-1):this.focusButton(o,o+1)},focusButton(e,t){const{tabIndex:s}=this.$props,o=this.currentButtons[t];if(o){o.tabIndex=s,o.focus();const t=this.currentButtons[e];t&&(t.tabIndex=-1)}},initOverflow(e,t){let s=200;const o=[],i=[];Array.from(e.children).forEach(((e,t)=>{s+=Math.ceil(e.clientWidth),s<=this.$refs.toolbar.offsetWidth-50?o.push(this.visibleToolsRef[t]):i.push(this.visibleToolsRef[t])})),this.visibleToolsRef=o,this.overFlowToolsRef=i},checkOverflow(){if("scroll"===this.$props.overflow){const e=this.scrollContentRef;e&&(this.isOverflowing=e.scrollWidth>e.clientWidth||e.scrollHeight>e.clientHeight,this.isOverflowing?this.onContentScroll():(this.isScrollStartPosition=!0,this.isScrollEndPosition=!0))}else if("section"===this.$props.overflow||void 0===this.$props.overflow){const e=this.$refs.toolbar;let t=0;if(e){const s=e.offsetWidth,o=parseInt(window.getComputedStyle(e).gap||"0",10),i=Array.from(e.children).reduce(((e,t)=>e+=Math.ceil(t.clientWidth)),0),n=Array.from(e.children).length,r=2*o;if(t=36+Number(i)+n*o+r,t>s){const e=[...this.visibleToolsRef],t=e.pop();this.visibleToolsRef=e,t&&(this.overFlowToolsRef=[t,...this.overFlowToolsRef]),this.lastToolbarWidthRef=s}else if(s>this.lastToolbarWidthRef+o*n/2.75){const e=[...this.overFlowToolsRef],t=e.shift();t&&this.lastToolbarWidthRef+o*n>30&&(this.overFlowToolsRef=e,this.visibleToolsRef=[...this.visibleToolsRef,t]),this.lastToolbarWidthRef=s}else this.$forceUpdate()}}},onWindowResize(e){window.requestAnimationFrame((()=>{const t=this.$el;if(this.overFlowOpened=!1,!t)return;const s=t.offsetWidth,o=t.offsetHeight;if(this.offsetWidth!==s||this.offsetHeight!==o){this.offsetWidth=s,this.offsetHeight=o;const t={offsetWidth:this.offsetWidth,offsetHeight:this.offsetHeight};this.$emit("resize",{target:this,...t,nativeEvent:e})}this.checkOverflow()}))},onContentScroll(e){const t=this.scrollContentRef;if(e&&t){let s,o;s="next"!==e&&(t.scrollLeft<=this.$props.buttonScrollSpeed||0===t.scrollLeft),o="prev"!==e&&(t.scrollLeft+t.clientWidth+this.$props.buttonScrollSpeed>=t.scrollWidth||t.scrollLeft+t.clientWidth===t.scrollWidth),this.isScrollStartPosition=!!s,this.isScrollEndPosition=!!o}else this.isScrollStartPosition=!0,this.isScrollEndPosition=!1},onToggleoverflow(e){this.overFlowOpened=e}}}),_=t.defineComponent({name:"KendoToolbarItem",methods:{element(){return this.$el}},render(){const e=s.getDefaultSlots(this);return t.createVNode("div",{class:"k-toolbar-item"},[e])}}),q=t.defineComponent({name:"KendoToolbarItem",render:()=>t.createVNode("span",{class:"k-spacer"},null)});e.Button=u,e.ButtonGroup=h,e.ButtonItem=N,e.Chip=v,e.ChipList=k,e.DropDownButton=T,e.FloatingActionButton=B,e.FloatingActionButtonItem=$,e.SplitButton=V,e.Toolbar=W,e.ToolbarItem=_,e.ToolbarSeparator=M,e.ToolbarSpacer=q}));
|
|
15
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("vue"),require("@progress/kendo-vue-common"),require("@progress/kendo-svg-icons"),require("@progress/kendo-vue-popup"),require("@progress/kendo-vue-intl")):"function"==typeof define&&define.amd?define(["exports","vue","@progress/kendo-vue-common","@progress/kendo-svg-icons","@progress/kendo-vue-popup","@progress/kendo-vue-intl"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).KendoVueButtons={},e.Vue,e.KendoVueCommon,e.KendoSVGIcons,e.KendoVuePopup,e.KendoVueIntl)}(this,(function(e,t,s,o,i,n){"use strict";const r=["button:not(.k-dropdownlist button):not(.k-colorpicker button):not(.k-split-button .k-split-button-arrow)",".k-button-group > button",".k-dropdownlist",".k-colorpicker"],l={button:"k-button","state-disabled":"k-disabled","group-start":"k-group-start","group-end":"k-group-end","button-group":"k-button-group","button-group-stretched":"k-button-group-stretched"},a={name:"@progress/kendo-vue-buttons",productName:"Kendo UI for Vue",productCode:"KENDOUIVUE",productCodes:["KENDOUIVUE"],publishDate:1657089513,version:"6.4.2-develop.3",licensingDocsUrl:"https://www.telerik.com/kendo-vue-ui/my-license/?utm_medium=product&utm_source=kendovue&utm_campaign=kendo-ui-vue-purchase-license-keys-warning"},d=l,u=t.defineComponent({name:"KendoButton",emits:{click:null,mousedown:null,mouseup:null,pointerdown:null,pointerup:null,focus:null,blur:null,keypress:null,keydown:null,contextmenu:null},props:{ariaLabel:String,ariaPressed:Boolean,title:String,dir:String,selected:{type:Boolean,default:void 0},togglable:{type:Boolean,default:!1},icon:{type:String,default:function(){}},svgIcon:Object,iconClass:{type:String,default:function(){}},imageUrl:{type:String,default:function(){}},imageAlt:String,disabled:{type:Boolean,default:void 0},size:{type:String,default:"medium"},shape:{type:String},rounded:{type:String,default:"medium"},fillMode:{type:String,default:"solid"},themeColor:{type:String,default:"base"},tabIndex:Number,accessKey:String,id:String,type:String,role:String},created(){s.validatePackage(a),this.currentActive=!0===this.$props.togglable&&!0===this.$props.selected,this._activeTemp=void 0},data:()=>({currentActive:null}),computed:{computedSelected(){return void 0!==this._activeTemp?this._activeTemp:void 0!==this.$props.selected?this.$props.selected:this.currentActive},buttonClasses(){const{disabled:e,icon:t,iconClass:o,imageUrl:i,dir:n,svgIcon:r,size:l,shape:a,rounded:u,fillMode:c,themeColor:p}=this.$props,h=void 0!==r||void 0!==t||void 0!==o||void 0!==i,m=s.getDefaultSlots(this);return{[d.button]:!0,[`k-button-${s.kendoThemeMaps.sizeMap[l]||l}`]:l,[`k-button-${a}`]:a&&"rectangle"!==a,[`k-rounded-${s.kendoThemeMaps.roundedMap[u]||u}`]:u,"k-icon-button":!m&&h,"k-disabled":e,"k-selected":this.computedSelected,"k-rtl":"rtl"===n,[`k-button-${c}`]:c,[`k-button-${c}-${p}`]:c&&p}}},updated(){this.$props.togglable&&void 0!==this.$props.selected&&this.$props.selected!==this.currentActive&&(this.currentActive=this.$props.selected)},methods:{focus(e){this.$el.focus(e)},toggleIfApplicable(){if(!this.disabled&&this.$props.togglable&&void 0===this.$props.selected){const e=!this.currentActive;this._activeTemp=e,this.currentActive=e,this._activeTemp=void 0}},handleClick(e){this.toggleIfApplicable(),this.disabled||this.$emit("click",e)},handleMouseDown(e){this.disabled||this.$emit("mousedown",e)},handlePointerDown(e){this.disabled||this.$emit("pointerdown",e)},handleMouseUp(e){this.disabled||this.$emit("mouseup",e)},handlePointerUp(e){this.disabled||this.$emit("pointerup",e)},handleFocus(e){this.disabled||this.$emit("focus",e)},handleBlur(e){this.disabled||this.$emit("blur",e)},handleKeypress(e){this.disabled||this.$emit("keypress",e)},handleKeydown(e){this.disabled||this.$emit("keydown",e)},handleContextmenu(e){this.disabled||this.$emit("contextmenu",e)}},render(){const{togglable:e,icon:o,svgIcon:i,iconClass:n,imageUrl:r,imageAlt:l,accessKey:a,tabIndex:d,id:u,type:c,disabled:p,role:h}=this.$props,m=s.getDefaultSlots(this);return t.createVNode("button",{class:this.buttonClasses,onClick:this.handleClick,onMousedown:this.handleMouseDown,onMouseup:this.handleMouseUp,onPointerdown:this.handlePointerDown,onPointerup:this.handlePointerUp,onFocus:this.handleFocus,onBlur:this.handleBlur,onKeypress:this.handleKeypress,onKeydown:this.handleKeydown,onContextmenu:this.handleContextmenu,title:this.title,"aria-label":this.ariaLabel,"aria-disabled":p||void 0,"aria-pressed":e?!!this.currentActive:void 0,accesskey:a,tabindex:d,id:u,type:c,role:h},[function(){if(r)return t.createVNode("img",{role:"presentation",class:"k-image",alt:l,src:r},null);if(o||i){const e=s.classNames("k-button-icon",n);return t.createVNode(s.Icon,{name:o,icon:i,class:e},null)}return n?t.createVNode("span",{role:"presentation",class:n},null):null}.call(this),m&&t.createVNode("span",{class:"k-button-text"},[m])])}}),c=t.defineComponent({name:"KendoButtonWrap",render(){return s.getDefaultSlots(this)[0]}}),p=l,h=t.defineComponent({name:"KendoButtonGroup",props:{disabled:{type:Boolean,default:void 0},width:String,dir:{type:String,default:function(){}}},created(){s.validatePackage(a)},render(){const e=s.getDefaultSlots(this),o=function(e,o,i,n){const r=s.classNames({[p["state-disabled"]]:this.$props.disabled,[p["group-start"]]:n?i:0===o,[p["group-end"]]:n?0===o:i});return t.h(c,{class:r,"aria-disabled":this.$props.disabled},(function(){return[e]}))},i=s.classNames([p["button-group"]],{"k-disabled":this.$props.disabled,[p["button-group-stretched"]]:!!this.$props.width});return t.createVNode("div",{style:{width:this.width},dir:this.$props.dir,role:"group","aria-disabled":this.$props.disabled,class:i},[function(e){const t=e.length,s=void 0!==this.$props.dir?"rtl"===this.$props.dir:this.$el&&"rtl"===getComputedStyle(this.$el).direction||!1;return e.map(((e,i)=>this.isValidButton(e)?o.call(this,e,i,i===t-1,s):e))}.call(this,e)])},methods:{isValidButton:e=>e&&e.tag&&-1!==e.tag.toLowerCase().indexOf("button")||e.componentOptions&&e.componentOptions.tag&&-1!==e.componentOptions.tag.toLowerCase().indexOf("button")||e.type&&e.type.name&&-1!==e.type.name.toLowerCase().indexOf("kendobutton")}});let m=function(e){return e.next="next",e.prev="prev",e.current="current",e.reset="reset",e}({});let f=function(e){return e.remove="remove",e.add="add",e.reorder="reorder",e}({});let b=function(e){return e.single="single",e.multiple="multiple",e.none="none",e}({}),g=function(e){return e.toggle="toggle",e.remove="remove",e}({});const v=t.defineComponent({name:"KendoVueChip",props:{id:String,text:String,avatar:{type:[String,Function,Object],default:function(){}},value:[String,Object],dir:{type:String,default:function(){return"ltr"}},removable:{type:Boolean,default:!1},removeIcon:{type:String,default:function(){return"x-circle"}},removeSvgIcon:{type:Object,default:function(){return o.xCircleIcon}},disabled:{type:Boolean,default:!1},icon:String,svgIcon:Object,selectedIcon:{type:String,default:function(){return"check"}},selectedSvgIcon:{type:Object,default:function(){return o.checkIcon}},size:{type:String,default:"medium"},rounded:{type:String,default:"medium"},fillMode:{type:String,default:"solid",validator:function(e){return[null,"flat","outline","solid"].includes(e)}},themeColor:{type:String,default:"base",validator:function(e){return[null,"base","error","info","success","warning"].includes(e)}},dataItem:Object,selected:Boolean,ariaDescribedBy:String,role:{type:String,default:"button"},tabIndex:Number,onMousedown:Function},emits:{click:null,keydown:null,blur:null,focus:null,remove:null},inject:{kendoSelection:{default:{value:null}},kendoFocused:{default:{value:null}},kendoDataItems:{default:null},handleDispatchDataItems:{default:s.noop},handleDispatchSelection:{default:s.noop},handleDispatchFocus:{default:s.noop}},created(){this.currentDir=void 0,s.validatePackage(a)},mounted(){this.chip=s.getRef(this,"chip"),this.currentDir=void 0!==this.$props.dir?"rtl"===this.$props.dir:this.$el&&"rtl"===getComputedStyle(this.$el).direction||!1},updated(){this.kendoFocused.value===this.$props.value&&this.$el&&this.$el.focus()},computed:{currentSelected(){return this.$props.selected||(Array.isArray(this.kendoSelection.value)?this.kendoSelection.value.some((e=>e===this.$props.value)):this.kendoSelection.value===this.$props.value)},chipLabelClass:()=>({"k-chip-label":!0})},methods:{computedFocused(){return this.kendoFocused.value===this.$props.value},handleMouseDown(e){this.$emit("mousedown",e)},handleClick(e){this.handleDispatchSelection&&this.handleDispatchSelection({type:g.toggle,payload:this.$props.value,event:e}),this.$emit("click",{target:this.target,event:e})},handleRemove(e){e.stopPropagation(),this.$props.removable&&(this.handleDispatchFocus&&(this.handleDispatchDataItems({type:f.remove,payload:this.$props.value,event:e}),this.handleDispatchFocus({type:m.reset,payload:this.$props.value,event:e}),this.handleDispatchSelection({type:g.remove,payload:this.$props.value,event:e})),this.$emit("remove",{target:this.target,event:e}))},handleKeyDown(e){switch(e.keyCode){case s.Keys.left:this.handleDispatchFocus&&this.handleDispatchFocus({type:m.prev,payload:this.$props.value,event:e});break;case s.Keys.right:this.handleDispatchFocus&&this.handleDispatchFocus({type:m.next,payload:this.$props.value,event:e});break;case s.Keys.enter:this.handleDispatchFocus&&this.handleDispatchSelection({type:g.toggle,payload:this.$props.value,event:e});break;case s.Keys.delete:this.handleRemove(e)}this.$emit("keydown",{target:this.target,event:e})},handleFocus(e){this.handleDispatchFocus&&this.handleDispatchFocus({payload:this.$props.value,type:m.current,event:e}),this.$emit("focus",{target:this.target,event:e})},handleBlur(e){this.$emit("blur",{target:this.target,event:e})}},setup:()=>({chipRef:t.ref(null)}),render(){const{size:e,rounded:o,themeColor:i,fillMode:n,look:r,avatar:l,icon:a,svgIcon:d,selectedIcon:u,selectedSvgIcon:c,removeIcon:p,removeSvgIcon:h}=this.$props,m=s.templateRendering.call(this,l,s.getListeners.call(this)),f=l?t.createVNode("div",{class:`k-chip-avatar k-avatar k-rounded-${l.rounded||"medium"} k-avatar-${s.kendoThemeMaps.sizeMap[e]||e} k-avatar-solid k-avatar-solid-primary`,style:l.style},[t.createVNode("span",{class:"k-avatar-image"},[t.createVNode("img",{src:l.imageUrl,alt:l.imageAlt},null)])]):null,b=s.getTemplate.call(this,{h:t.h,template:m});return t.createVNode("div",{role:this.$props.role,id:this.$props.value,ref:s.setRef(this,"chip"),dir:this.currentDir,tabindex:s.getTabIndex(this.$props.tabIndex,this.$props.disabled,void 0),class:s.classNames("k-chip",{"k-rtl":"rtl"===this.currentDir,"k-disabled":this.$props.disabled,"k-selected":this.currentSelected,"k-focus":this.computedFocused(),[`k-chip-${s.kendoThemeMaps.sizeMap[e]||e}`]:e,[`k-rounded-${s.kendoThemeMaps.roundedMap[o]||o}`]:o,[`k-chip-${n}`]:n,[`k-chip-${n}-${i}`]:!(!n||!i),"k-chip-outline":"outline"===r||"outlined"===r,"k-chip-solid":"solid"===r||"filled"===r||"solid"===n}),"aria-pressed":"button"===this.$props.role?this.currentSelected:void 0,"aria-selected":"option"===this.$props.role?this.currentSelected:void 0,"aria-disabled":this.$props.disabled,"aria-describedby":this.$props.ariaDescribedBy,onFocus:this.handleFocus,onBlur:this.handleBlur,onClick:this.handleClick,onKeydown:this.handleKeyDown,onMousedown:this.handleMouseDown},[this.currentSelected&&(u||c)&&t.createVNode(s.Icon,{name:s.getIconName(u),icon:c,size:"small"},null),(a||d)&&t.createVNode(s.Icon,{name:s.getIconName(a),icon:d,size:"small"},null),l?l.imageUrl?f:b:null,t.createVNode("span",{class:"k-chip-content"},[this.$props.text&&t.createVNode("span",{"aria-label":this.$props.text,class:this.chipLabelClass},[this.$props.text])]),this.$props.removable&&t.createVNode("span",{class:"k-chip-actions"},[t.createVNode("span",{class:"k-chip-action k-chip-remove-action"},[t.createVNode(s.Icon,{name:s.getIconName(p),icon:h,size:"small",onClick:this.handleRemove},null)])])])}}),$=t.defineComponent({name:"KendoVueChipList",inheritAttrs:!1,props:{id:String,tabIndex:Number,dataItems:Array,defaultDataItems:{type:Array,default:function(){return[]}},value:[Object,Array,String,Number],defaultValue:{type:[Object,Array,String,Number],default:function(){return null}},size:{type:String,default:"medium"},rounded:{type:String,default:"medium"},fillMode:{type:String,default:"solid",validator:function(e){return[null,"flat","outline","solid"].includes(e)}},selection:{type:String,default:function(){return"none"}},textField:{type:String,default:function(){return"text"}},valueField:{type:String,default:function(){return"value"}},avatarField:{type:String,default:function(){return"avatar"}},disabled:{type:Boolean,default:!1},dir:{type:String,default:function(){return"ltr"}},chip:[String,Function,Object],ariaLabelledBy:String,ariaDescribedBy:String},provide(){return{kendoSelection:this.currentValue,kendoFocused:this.currentFocused,kendoDataItems:this.computedDataItems,handleDispatchDataItems:this.handleDispatchDataItems,handleDispatchSelection:this.handleDispatchSelection,handleDispatchFocus:this.handleDispatchFocus}},created(){s.validatePackage(a),this.currentDataItems=this.$props.dataItems||this.$props.defaultDataItems,this.currentValue.value=this.$props.value||this.$props.defaultValue},data:()=>({currentDataItems:[],currentDir:"ltr",isRtl:!1,currentFocused:{value:!1},currentValue:{value:null}}),mounted(){this.chipList=this.chipListRef,this.currentDir=void 0!==this.$props.dir?this.$props.dir:this.$el&&"rtl"===getComputedStyle(this.$el).direction||!1,this.isRtl="rtl"===this.currentDir},computed:{computedDataItems(){return this.$props.dataItems||this.currentDataItems},computedValue(){return this.$props.value||this.currentValue.value},items(){return this.computedDataItems.reduce(this.itemsReducer,[])}},methods:{handleDispatchSelection(e){const t=((e,t)=>{switch(t.selection){case b.single:switch(t.type){case g.toggle:if(!Array.isArray(e)||null===e)return t.payload===e?null:t.payload;throw new Error("State cannot be an array in single selection");case g.remove:return t.payload===e?null:e;default:return e}case b.multiple:switch(t.type){case g.toggle:if(Array.isArray(e))return e.some((e=>e===t.payload))?e.filter((e=>e!==t.payload)):[...e,t.payload];if(null===e)return[t.payload];throw new Error("State cannot be non-array in multiple selection");case g.remove:return Array.isArray(e)?e.some((e=>e===t.payload))?e.filter((e=>e!==t.payload)):[...e,t.payload]:e;default:return e}case b.none:return null;default:return e}})(this.computedValue,{...e,selection:this.$props.selection,state:this.computedValue});this.handleChange(t,e.event),this.currentValue.value=t},handleDispatchFocus(e){const t=((e,t)=>{const s=t.items.findIndex((t=>t===e));switch(t.type){case m.next:return s===t.items.length-1?e:t.items[s+1];case m.prev:return 0===s?e:t.items[s-1];case m.current:return t.payload;case m.reset:return null;default:return e}})(e.payload,{...e,items:this.items});this.currentFocused.value=t},handleDispatchDataItems(e){const t=((e,t)=>{switch(t.type){case f.add:break;case f.remove:return e.filter((e=>e[t.valueField]!==t.payload));case f.reorder:break;default:return e}})(this.computedDataItems,{...e,state:this.computedDataItems,valueField:this.$props.valueField});this.handleDataChange(t,e.event),this.currentDataItems=t},handleChange(e,t){this.$el&&this.$emit("change",{value:e,target:this.$el,event:t})},handleDataChange(e,t){this.$el&&this.$emit("datachange",{value:e,target:this.$el,event:t})},itemsReducer(e,t){return e.push(t[this.$props.valueField||this.$props.valueField]),e}},setup:()=>({chipListRef:t.ref(null)}),render(){const{size:e}=this.$props;return t.createVNode("div",{ref:s.setRef(this,"chipList"),role:"listbox",id:this.$props.id,dir:this.currentDir,style:this.$attrs.style,tabindex:s.getTabIndex(this.$props.tabIndex,this.$props.disabled,void 0),class:s.classNames("k-chip-list",{[`k-chip-list-${s.kendoThemeMaps.sizeMap[e]||e}`]:e,"k-rtl":"rtl"===this.currentDir,"k-selection-single":"single"===this.$props.selection,"k-selection-multiple":"multiple"===this.$props.selection,"k-disabled":this.$props.disabled}),"aria-labelledby":this.$props.ariaLabelledBy,"aria-describedby":this.$props.ariaDescribedBy,"aria-orientation":"horizontal","aria-multiselectable":"multiple"===this.$props.selection||void 0},[this.computedDataItems.map((function(e){const o=s.templateRendering.call(this,this.$props.chip,s.getListeners.call(this)),i=t.createVNode(v,{role:"option",dataItem:e,key:e[this.$props.valueField],text:e[this.$props.textField],value:e[this.$props.valueField],avatar:e[this.$props.avatarField],size:this.$props.size,rounded:this.$props.rounded,fillMode:this.$props.fillMode},null);return s.getTemplate.call(this,{h:t.h,template:o,defaultRendering:i,additionalProps:{dataItem:e,key:e[this.$props.valueField],text:e[this.$props.textField],value:e[this.$props.valueField],size:this.$props.size}})}),this)])}}),k=t.defineComponent({name:"KendoVueFloatingActionButtonItem",props:{id:String,disabled:Boolean,focused:Boolean,index:Number,icon:String,item:[String,Function,Object],dataItem:Object,text:String,tabIndex:Number,customProp:[String,Function,Object],class:String},emits:{click:null,down:null},mounted(){this.element=s.getRef(this,"element")},computed:{itemClassNames(){return s.classNames("k-fab-item",{"k-focus":this.focused,"k-disabled":this.disabled})}},methods:{handleClick(e){void 0!==this.$props.index&&!this.$props.disabled&&this.$emit("click",e,this.$props.index)},focusElement(){this.$el&&this.$el.focus()},onMouseDown(e){this.$emit("down",e)}},setup:()=>({elementRef:t.ref(null)}),render(){const{disabled:e,id:o,tabIndex:i,dataItem:n}=this.$props,{text:r,icon:l,svgIcon:a}=n;let d;const u=t.createVNode("li",{ref:s.setRef(this,"element"),id:o,class:this.itemClassNames,role:"menuitem",tabindex:s.getTabIndex(i,e),"aria-disabled":e,"aria-label":`${r||""} floatingactionbutton item`,onClick:this.handleClick,onMousedown:this.onMouseDown,onPointerdown:this.onMouseDown},[r&&t.createVNode("span",{class:"k-fab-item-text"},[r]),(a||l)&&t.createVNode(s.Icon,{name:l,icon:a,class:"k-fab-item-icon"},null)]);return d=s.getTemplate.call(this,{h:t.h,template:this.$props.item,defaultRendering:u,additionalProps:this.$props,additionalListeners:{click:this.handleClick}}),d}}),y="16px",S=e=>"number"==typeof e?e+"px":e,I=(e,t)=>{const s={horizontal:t?"right":"left",vertical:"bottom"};return"end"===e.horizontal&&(s.horizontal=t?"left":"right"),s},x=(e,t)=>{const s={horizontal:t?"right":"left",vertical:"top"};return"end"===e.horizontal&&(s.horizontal=t?"left":"right"),s},C=(e,t)=>({rtl:{end:"k-text-left",start:"k-text-right"},ltr:{start:"k-text-left",end:"k-text-right"}}[e]["end"===t?"end":"start"]),w=(e,t,s,o)=>{const i=t.horizontal,n=t.vertical;if(e){const r=s&&void 0!==s.x?S(s.x):y,l=s&&void 0!==s.x?`calc(50% + ${S(s.x)})`:"50%",a=s&&void 0!==s.y?S(s.y):y,d=s&&void 0!==s.y?`calc(50% + ${S(s.y)})`:"50%";e.style.setProperty(D(t,o),"center"===i?l:r),e.style.setProperty(O(t),"middle"===n?d:a),o&&(("top"===n||"bottom"===n)&&"start"===i&&e.style.setProperty("left","unset"),"middle"===n&&"end"===i&&e.style.setProperty("right","unset"),"middle"===n&&"start"===i&&e.style.setProperty("left","unset"))}},D=(e,t)=>{const{horizontal:s}=e;return{end:t?"left":"right",center:"left",start:t?"right":"left"}[s||"end"]},O=e=>({top:"top",middle:"top",bottom:"bottom"}[e.vertical||"bottom"]),B=t.defineComponent({name:"KendoVueFloatingActionButton",props:{id:String,dir:String,tabIndex:Number,accessKey:String,disabled:{type:Boolean,default:!1},icon:String,svgIcon:Object,iconClass:String,items:[Object,Array],item:[String,Function,Object],text:String,alignOffset:Object,opened:{type:Boolean,default:void 0},align:{type:Object,default:function(){return{vertical:"bottom",horizontal:"end"}}},positionMode:{type:String,default:function(){return"fixed"}},popupSettings:{type:Object,default:function(){return{}}},shape:{type:String,default:function(){return"rectangle"}},rounded:{type:String,default:"full"},fillMode:{type:String,default:"solid",validator:function(e){return[null,"flat","link","outline","solid"].includes(e)}},size:{type:String,default:function(){return"medium"}},themeColor:{type:String,default:function(){return"primary"}}},emits:{click:null,mousedown:null,mouseup:null,open:null,close:null,itemclick:null,focus:null,blur:null,keydown:null},data:()=>({currentOpened:!1,currentFocused:!1,focusedIndex:-1,currentDir:"ltr",isRtl:!1}),created(){s.validatePackage(a),this.element=void 0,this._anchor=s.guid(),this.listId=s.guid(),this.buttonId=s.guid()},mounted(){this.element=this.kendoAnchorRef,this.list=s.getRef(this,"list"),this.popup=s.getRef(this,"popup"),this.currentDir=void 0!==this.$props.dir?this.$props.dir:this.$el&&"rtl"===getComputedStyle(this.$el).direction||!1,this.isRtl="rtl"===this.currentDir,void 0!==this.opened&&w(this.$el,this.$props.align,this.$props.alignOffset,this.isRtl)},updated(){w(this.$el,this.$props.align,this.$props.alignOffset,this.isRtl),this.currentFocused&&this.element&&this.element.focus()},computed:{buttonClassNames(){const{size:e,icon:t,shape:o,themeColor:i,fillMode:n,rounded:r}=this.$props;return{"k-fab":!0,[`k-fab-${o||"rectangle"}`]:null!==o,[`k-fab-${s.kendoThemeMaps.sizeMap[e]||e}`]:e,[`k-rounded-${s.kendoThemeMaps.roundedMap[r]||r}`]:r,[`k-fab-${n}`]:n,[`k-fab-${n}-${i}`]:n&&i,"k-disabled":this.$props.disabled,"k-focus":this.currentFocused,[`k-${this.$props.align.vertical}-${this.$props.align.horizontal}`]:!0}},computedOpened(){return void 0===this.$props.opened?this.currentOpened:this.$props.opened},rootClassNames(){return s.classNames({"k-pos-absolute":"absolute"===this.$props.positionMode,"k-pos-fixed":"fixed"===this.$props.positionMode})}},methods:{dispatchPopupEvent(e,t){this.$props.items&&this.$emit(t?"open":"close",{event:e,isOpened:!t})},handleClick(e){if(e.target&&!this.$props.disabled)if(this.$props.items){const t=!this.computedOpened;this.currentOpened=t,this.currentFocused=!0,this.focusedIndex=t?0:-1,this.dispatchPopupEvent(e,!this.computedOpened)}else this.$emit("click",e,void 0)},handleFocus(e){this.currentFocused=!0,this.focusedIndex=this.computedOpened?0:-1,this.$emit("focus",e,void 0)},handleBlur(e){this.currentFocused=!1,this.currentOpened=!1,this.focusedIndex=-1,this.$emit("blur",e,void 0),this.computedOpened&&this.dispatchPopupEvent(e,!1)},handleMouseDown(e){e.preventDefault(),this.$emit("mousedown",e)},handleMouseUp(e){this.$emit("mouseup",e)},dispatchItemClickEvent(e,t){this.$props.items&&(this.$props.items[t].disabled||this.$emit("itemclick",e,{itemProps:this.$props.items[t],itemIndex:t}))},handleItemClick(e,t){!e.target||!this.$props.items||(this.focusedIndex=t,this.currentOpened=!1,this.dispatchItemClickEvent(e,t),this.dispatchPopupEvent(e,!1))},handleItemDown(e){s.canUseDOM&&document.activeElement===this.element&&e.preventDefault()},handleKeyDown(e){const t=this.focusedIndex,o=this.$props.items?this.$props.items.length-1:-1,i="bottom"===this.$props.align.vertical;switch(e.keyCode){case s.Keys.enter:case s.Keys.space:t>=0&&this.dispatchItemClickEvent(e,t),e.preventDefault(),this.currentOpened=!this.currentOpened,this.focusedIndex=this.currentOpened?-1:0;break;case s.Keys.esc:e.preventDefault(),this.currentOpened=!1,this.focusedIndex=-1;break;case s.Keys.home:e.preventDefault(),this.focusedIndex=0;break;case s.Keys.end:e.preventDefault(),this.focusedIndex=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)}this.$emit("keydown",e,void 0)}},setup:()=>({chipRef:t.ref(null),kendoAnchorRef:t.ref(null)}),render(){const{align:e,disabled:o,icon:n,svgIcon:r,iconClass:l,id:a,items:d,text:u,tabIndex:c,accessKey:p,popupSettings:h}=this.$props,m=s.templateRendering.call(this,this.$props.item,s.getListeners.call(this)),f=function(){return d&&d.map((function(i,n){return t.createVNode(k,{key:n,index:n,id:`${this.listId}-${n}`,disabled:o||i.disabled,focused:this.focusedIndex===n,dataItem:i,item:m,class:s.classNames(i.className,C(this.currentDir||"ltr",e.horizontal)),onClick:this.handleItemClick,onDown:this.handleItemDown},null)}),this)},b=n&&!u,g=(this.element?this.element.offsetWidth:0)/2-16;return t.createVNode("div",{class:this.rootClassNames},[t.createVNode("button",{ref:e=>{this.kendoAnchorRef=e},id:a||this.buttonId,role:d?"menubutton":"button",type:"button","aria-disabled":o,"aria-expanded":d?this.computedOpened:void 0,"aria-haspopup":!!d,"aria-label":`${u||""} floatingactionbutton`,"aria-owns":d?this.listId:void 0,"aria-activedescendant":this.focusedIndex>=0&&d?`${this.listId}-${this.focusedIndex}`:void 0,tabindex:s.getTabIndex(c,o),accesskey:p,dir:this.currentDir,disabled:o,class:this.buttonClassNames,onClick:this.handleClick,onMousedown:this.handleMouseDown,onMouseup:this.handleMouseUp,onFocusin:this.handleFocus,onBlur:this.handleBlur,onKeydown:this.handleKeyDown},[n||r?t.createVNode(s.Icon,{name:n,icon:r,class:"k-fab-icon"},null):l?t.createVNode(s.Icon,{class:l},null):null,u&&t.createVNode("span",{class:"k-fab-text"},[u])]),t.createVNode(i.Popup,{ref:s.setRef(this,"popup"),show:this.computedOpened,anchor:this._anchor,animate:h.animate,popupClass:s.classNames("k-popup-transparent k-fab-popup",h.popupClass),anchorAlign:h.anchorAlign||I(e,this.isRtl),popupAlign:h.popupAlign||x(e,this.isRtl),style:{boxShadow:"none"}},{default:()=>[t.createVNode("ul",{ref:s.setRef(this,"list"),role:"menu","aria-labelledby":a,id:this.listId,class:s.classNames("k-fab-items",{"k-fab-items-bottom":"bottom"!==e.vertical,"k-fab-items-top":"bottom"===e.vertical}),style:{paddingLeft:b?g+"px":void 0,paddingRight:b?g+"px":void 0}},[f.call(this)])]})])}}),N=t.defineComponent({name:"KendoButtonItem",emits:{click:null,down:null},props:{focused:Boolean,index:Number,item:Object,render:[String,Object,Function],dataItem:[String,Object],id:String,textField:String,role:String},computed:{wrapperClass(){return{"k-item":!0,"k-focus":this.$props.focused}},innerClass(){const{dataItem:e}=this.$props;return{"k-link k-menu-link":!0,"k-selected":e.selected,"k-disabled":e.disabled}}},methods:{onClick(e){this.$emit("click",e,this.$props.index)},onDown(e){this.$emit("down",e,this.$props.index)}},render(){const{dataItem:e,id:o,render:i}=this.$props;return t.createVNode("li",{id:o,class:this.wrapperClass,onClick:this.onClick,onMousedown:this.onDown,onPointerdown:this.onDown,role:"menuitem","aria-disabled":e.disabled||void 0},[function(){const{textField:o,index:n}=this.$props,r=void 0!==e.text?e.text:o?e[o]:e,l=t.createVNode("span",{tabindex:-1,class:this.innerClass,key:"icon"},[e.icon||e.svgIcon?t.createVNode(s.Icon,{name:e.icon,icon:e.svgIcon,class:e.iconClass},null):e.iconClass&&t.createVNode("span",{class:e.iconClass,role:"presentation"},null),e.imageUrl&&t.createVNode("img",{class:"k-icon",alt:"",src:e.imageUrl,role:"presentation",key:"image"},null),r&&t.createVNode("span",{class:"k-menu-link-text"},[r])]);return s.getTemplate.call(this,{h:t.h,template:this.$props.dataItem.render||i,defaultRendering:l,additionalProps:{item:e,itemIndex:n,innerClass:this.innerClass,focused:this.focused}})}.call(this)])}}),F=(e,t,o,i)=>{if(o)return e;switch(t){case s.Keys.enter:case s.Keys.space:case s.Keys.esc:return-1;case s.Keys.up:case s.Keys.left:return Math.max(0,e-1);case s.Keys.down:case s.Keys.right:return Math.min(i-1,e+1);default:return e}};function R(e){let t={horizontal:"left",vertical:"bottom"};return e&&(t.horizontal="right"),t}function K(e){let t={horizontal:"left",vertical:"top"};return e&&(t.horizontal="right"),t}const V=t.defineComponent({name:"KendoSplitButton",emits:{focus:null,blur:null,buttonclick:null,itemclick:null,open:null,close:null},props:{accessKey:String,ariaLabel:String,text:String,items:{type:Array,default:function(){return[]}},textField:String,tabIndex:Number,disabled:Boolean,icon:String,svgIcon:Object,size:{type:String,default:"medium"},rounded:{type:String,default:"medium"},fillMode:{type:String,default:"solid",validator:function(e){return[null,"flat","link","outline","solid"].includes(e)}},themeColor:{type:String,default:"base",validator:function(e){return[null,"base","dark","error","info","inverse","inverse","light","primary","secondary","success","tertiary","warning"].includes(e)}},opened:{type:Boolean,default:void 0},iconClass:String,imageUrl:String,popupSettings:Object,itemRender:[String,Function,Object],item:[String,Function,Object],className:String,buttonClass:String,dir:String},data:()=>({focused:!1,focusedIndex:-1,currentOpened:!1}),created(){this._blurTimeout=null,this._anchor=s.guid(),this.mainButton=null,this.guid=s.guid(),this.buttonsData=[],s.validatePackage(a)},mounted(){this.mainButton=this.$refs[this._anchor],(void 0===this.$props.dir&&this.isRtl()||this.computedOpened)&&this.$forceUpdate()},updated(){this.focused&&this.element()&&(this.mainButton=this.$refs[this._anchor],this.mainButton.focus())},computed:{computedOpened(){return void 0===this.$props.opened?this.currentOpened:this.$props.opened},wrapperClass(){return{"k-split-button":!0,"k-button-group":!0,"k-focus":this.focused}}},setup:()=>({kendoAnchorRef:t.ref(null)}),render(){this.buttonsData=this.$props.items;const e=this.isRtl(),n=e?"rtl":void 0,{tabIndex:r,disabled:l}=this.$props,a=s.getDefaultSlots(this),d=function(){const{item:e,itemRender:o,textField:i}=this.$props;return this.buttonsData.length>0?this.buttonsData.map((function(n,r){const l="string"!=typeof n?{...n,render:s.templateRendering.call(this,n.render,s.getListeners.call(this))}:n;return t.createVNode(N,{class:"k-menu-item",role:"menuitem",dataItem:l,textField:i,focused:this.focusedIndex===r,onClick:this.onItemClick,onDown:this.onItemDown,render:s.templateRendering.call(this,o,s.getListeners.call(this)),item:e,key:r,index:r,id:`${this.guid}-${r}`},null)}),this):null};return t.createVNode("div",{class:this.wrapperClass,onKeydown:this.onKeyDown,onFocusin:this.onFocus,onFocusout:this.onBlur,dir:n},[t.createVNode(u,{size:this.$props.size,rounded:this.$props.rounded,fillMode:this.$props.fillMode,themeColor:this.$props.themeColor,onClick:e=>this.onItemClick(e,-1),disabled:l||void 0,tabIndex:r,accessKey:this.$props.accessKey,class:this.$props.buttonClass,icon:this.$props.icon,svgIcon:this.$props.svgIcon,iconClass:this.$props.iconClass,imageUrl:this.$props.imageUrl,dir:n,id:this._anchor,ref:this._anchor,type:"button","aria-disabled":l,"aria-haspopup":"menu","aria-expanded":this.computedOpened,"aria-label":this.$props.ariaLabel||`${this.$props.text||""} splitbutton`,"aria-controls":this.guid,"aria-activedescendant":void 0!==this.focusedIndex&&this.focusedIndex>=0?`${this.guid}-${this.focusedIndex}`:void 0},{default:()=>[this.$props.text,a]}),t.createVNode(u,{svgIcon:o.caretAltDownIcon,size:this.$props.size,rounded:this.$props.rounded,fillMode:this.$props.fillMode,themeColor:this.$props.themeColor,icon:"caret-alt-down",disabled:l||void 0,tabIndex:-1,onClick:this.onSplitPartClick,onMousedown:this.onDownSplitPart,onPointerdown:this.onDownSplitPart,dir:n,"aria-label":"menu toggling button"},null),function(){const{popupSettings:o={},size:n}=this.$props;return t.createVNode(i.Popup,{anchor:this._anchor,show:this.computedOpened,animate:o.animate,popupClass:s.classNames("k-menu-popup",o.popupClass),anchorAlign:o.anchorAlign||R(e),popupAlign:o.popupAlign||K(e),style:e?{direction:"rtl"}:void 0},{default:()=>[t.createVNode("ul",{class:`k-group k-menu-group k-reset k-menu-group-${s.kendoThemeMaps.sizeMap[n]||n}`,role:"menu",id:this.guid,"aria-labelledby":this._anchor},[d.call(this)])]})}.call(this)])},methods:{element(){return this.mainButton},onKeyDown(e){if(e.altKey)return void(this.computedOpened||e.keyCode!==s.Keys.down?this.computedOpened&&e.keyCode===s.Keys.up&&(this.dispatchPopupEvent(e,!1),this.focusedIndex=-1,this.currentOpened=!1):(this.dispatchPopupEvent(e,!0),this.focusedIndex=0,this.currentOpened=!0));let t;if(e.keyCode===s.Keys.enter||e.keyCode===s.Keys.space?(e.preventDefault(),this.dispatchClickEvent(e,this.focusedIndex),void 0!==this.focusedIndex&&this.focusedIndex>=0&&(t={focusedIndex:this.computedOpened?-1:0,currentOpened:!this.computedOpened},this.dispatchPopupEvent(e,t.currentOpened))):this.computedOpened&&e.keyCode===s.Keys.esc&&(t={focusedIndex:-1,currentOpened:!1},this.dispatchPopupEvent(e,t.currentOpened)),this.computedOpened){const o=F(this.focusedIndex,e.keyCode,e.altKey,this.buttonsData.length);o!==this.focusedIndex&&(t=t||{},t.focusedIndex=o);const i=e.keyCode===s.Keys.up||e.keyCode===s.Keys.down||e.keyCode===s.Keys.left||e.keyCode===s.Keys.right;!e.altKey&&i&&e.preventDefault()}t&&(this.focusedIndex=t.focusedIndex,this.focused=t.focused,void 0!==t.currentOpened&&(this.currentOpened=t.currentOpened))},onFocus(e){this.focused||(this.$emit("focus",e,this,void 0),this.focused=!0),this.focusedIndex=-1,clearTimeout(this._blurTimeout)},onItemClick(e,t){const s=this.computedOpened;s&&(this.focusedIndex=0,this.currentOpened=!1),this.dispatchClickEvent(e,t),s&&this.dispatchPopupEvent(e,!1)},onBlur(e){clearTimeout(this._blurTimeout),this.createBlurTimeout(e)},createBlurTimeout(e){const t=this;this._blurTimeout=setTimeout((()=>{s.canUseDOM&&document.activeElement!==t.mainButton&&(t.focused=!1,t.focusedIndex=-1,t.$emit("blur",e,this,void 0),t.computedOpened&&(t.currentOpened=!1,t.dispatchPopupEvent(e,!1)))}),200)},dispatchClickEvent(e,t){this.isItemDisabled(t)||(-1===t?this.$emit("buttonclick",e,this,void 0):this.$emit("itemclick",{event:e,component:this,item:this.buttonsData[t],itemIndex:t}))},onSplitPartClick(e){if(this.buttonsData.length){const t=!this.computedOpened;this.dispatchPopupEvent(e,t),this.focusedIndex=t?0:-1,this.currentOpened=t,this.focused=!0}},onDownSplitPart(e){e.preventDefault(),this.element()&&document.activeElement!==this.element()&&this.element().focus()},onItemDown(e){document.activeElement===this.element()&&e.preventDefault()},dispatchPopupEvent(e,t){this.$emit(t?"open":"close",e,this,void 0)},isItemDisabled(e){return this.buttonsData[e]?this.buttonsData[e].disabled:this.$props.disabled},isRtl(){return void 0!==this.$props.dir?"rtl"===this.$props.dir:!!this.$el&&"rtl"===getComputedStyle(this.$el).direction}}}),T=t.defineComponent({name:"KendoDropDownButton",emits:{focus:null,blur:null,itemclick:null,open:null,close:null},props:{accessKey:String,items:{type:Array,default:function(){return[]}},ariaLabel:String,text:String,textField:String,tabIndex:Number,disabled:Boolean,icon:String,svgIcon:Object,iconClass:String,imageUrl:String,popupSettings:Object,itemRender:[String,Object,Function],item:Function,size:{type:String,default:"medium"},shape:{type:String,default:"rectangle",validator:function(e){return[null,"rectangle","square"].includes(e)}},rounded:{type:String,default:"medium"},fillMode:{type:String,default:"solid",validator:function(e){return[null,"flat","link","outline","solid"].includes(e)}},themeColor:{type:String,default:"base",validator:function(e){return[null,"base","dark","error","info","inverse","inverse","light","primary","secondary","success","tertiary","warning"].includes(e)}},opened:{type:Boolean,default:void 0},buttonClass:String,dir:String},created(){this._blurTimeout=null,this._anchor=s.guid(),this.wrapper=null,this.mainButton=null,this.guid=s.guid(),this.buttonsData=[],s.validatePackage(a)},mounted(){this.mainButton=this.$refs[this._anchor],(void 0===this.$props.dir&&this.isRtl()||this.computedOpened)&&this.$forceUpdate()},updated(){this.focused&&this.element()&&(this.mainButton=this.$refs[this._anchor],this.mainButton.focus())},data:()=>({currentOpened:!1,focused:!1,focusedIndex:-1}),computed:{computedOpened(){return void 0===this.$props.opened?this.currentOpened:this.$props.opened},wrapperClass(){return{"k-dropdown-button":!0,"k-focus":this.focused}}},setup:()=>({kendoAnchorRef:t.ref(null)}),render(){const e=this.isRtl(),o=e?"rtl":void 0,{tabIndex:n,disabled:r}=this.$props,l=s.getDefaultSlots(this);this.buttonsData=this.$props.items;const a=function(){const{item:e,itemRender:o,textField:i}=this.$props;return this.buttonsData.length>0?this.buttonsData.map((function(n,r){const l="string"!=typeof n?{...n,render:s.templateRendering.call(this,n.render,s.getListeners.call(this))}:n;return t.createVNode(N,{class:"k-menu-item",dataItem:l,textField:i,focused:this.focusedIndex===r,onClick:this.onItemClick,onDown:this.onItemDown,render:s.templateRendering.call(this,o,s.getListeners.call(this)),item:e,index:r,key:r,id:`${this.guid}-${r}`},null)}),this):null};return t.createVNode("div",{class:this.wrapperClass,onKeydown:this.onKeyDown,onFocusin:this.onFocus,onFocusout:this.onBlur,dir:o},[t.createVNode(u,{size:this.$props.size,shape:this.$props.shape,rounded:this.$props.rounded,fillMode:this.$props.fillMode,themeColor:this.$props.themeColor,onClick:this.onClickMainButton,onMousedown:this.mouseDown,disabled:r||void 0,tabIndex:n,accessKey:this.$props.accessKey,icon:this.$props.icon,svgIcon:this.$props.svgIcon,iconClass:this.$props.iconClass,class:this.$props.buttonClass,imageUrl:this.$props.imageUrl,dir:o,ref:this._anchor,type:"button","aria-disabled":r,"aria-haspopup":"menu","aria-expanded":this.computedOpened,"aria-label":this.$props.ariaLabel||`${this.$props.text||""} dropdownbutton`,"aria-controls":this.guid,"aria-activedescendant":void 0!==this.focusedIndex&&this.focusedIndex>=0?`${this.guid}-${this.focusedIndex}`:void 0},{default:()=>[this.$props.text,l]}),function(){const{popupSettings:o={},size:n}=this.$props;return t.createVNode(i.Popup,{anchor:this._anchor,show:this.computedOpened,animate:o.animate,popupClass:s.classNames("k-menu-popup",o.popupClass),anchorAlign:o.anchorAlign||R(e),popupAlign:o.popupAlign||K(e),style:e?{direction:"rtl"}:void 0},{default:()=>[t.createVNode("ul",{class:`k-group k-menu-group k-reset k-menu-group-${s.kendoThemeMaps.sizeMap[n]||n}`,role:"menu",id:this.guid},[a.call(this)])]})}.call(this)])},methods:{element(){return this.mainButton},onKeyDown(e){if(e.altKey)this.computedOpened||e.keyCode!==s.Keys.down?this.computedOpened&&e.keyCode===s.Keys.up&&(this.dispatchPopupEvent(e,!1),this.focusedIndex=-1,this.currentOpened=!1):(this.dispatchPopupEvent(e,!0),this.focusedIndex=0,this.currentOpened=!0);else if(e.keyCode===s.Keys.enter||e.keyCode===s.Keys.space?(void 0!==this.focusedIndex&&this.focusedIndex>=0&&this.dispatchClickEvent(e,this.focusedIndex),e.preventDefault(),this.focusedIndex=this.computedOpened?-1:0,this.currentOpened=!this.computedOpened,this.dispatchPopupEvent(e,this.currentOpened)):this.computedOpened&&e.keyCode===s.Keys.esc&&(this.focusedIndex=-1,this.currentOpened=!1,this.dispatchPopupEvent(e,this.currentOpened)),this.computedOpened){const t=F(this.focusedIndex,e.keyCode,e.altKey,this.buttonsData.length);this.focusedIndex=t;const o=e.keyCode===s.Keys.up||e.keyCode===s.Keys.down||e.keyCode===s.Keys.left||e.keyCode===s.Keys.right;!e.altKey&&o&&e.preventDefault()}},onFocus(e){this.focused||(this.focused=!0,this.$emit("focus",e,this,void 0)),this.focusedIndex=this.computedOpened?0:-1,clearTimeout(this._blurTimeout)},onBlur(e){clearTimeout(this._blurTimeout),this.createBlurTimeout(e)},createBlurTimeout(e){const t=this;this._blurTimeout=setTimeout((()=>{s.canUseDOM&&document.activeElement!==t.$el&&(t.focused=!1,t.focusedIndex=-1,t.$emit("blur",e,t,void 0),t.computedOpened&&(t.currentOpened=!1,t.dispatchPopupEvent(e,!1)))}),200)},onItemClick(e,t){this.focusedIndex=-1,this.currentOpened=!1,this.dispatchClickEvent(e,t),this.dispatchPopupEvent(e,!1)},onItemDown(e){document.activeElement===this.element()&&e.preventDefault()},mouseDown(e){e.preventDefault()},dispatchClickEvent(e,t){this.isItemDisabled(t)||this.$emit("itemclick",{event:e,item:this.buttonsData[t],itemIndex:t})},onClickMainButton(e){if(!this.buttonsData.length)return;const t=!this.computedOpened;this.currentOpened=t,this.focused=!0,this.focusedIndex=t?0:-1,this.dispatchPopupEvent(e,t)},dispatchPopupEvent(e,t){this.$emit(t?"open":"close",e,this,void 0)},isItemDisabled(e){return this.buttonsData[e]?this.buttonsData[e].disabled:this.$props.disabled},isRtl(){return void 0!==this.$props.dir?"rtl"===this.$props.dir:!!this.$el&&"rtl"===getComputedStyle(this.$el).direction}}}),M=t.defineComponent({name:"KendoToolbarItem",render:()=>t.createVNode("div",{class:"k-toolbar-separator k-separator"},null)}),P="prevArrow.title",z="nextArrow.title",A="moreButtonTitle.title",E={[P]:"Previous scroll button",[z]:"Next scroll button",[A]:"More button"},L=t.defineComponent({name:"KendoToolbarScrollButton",props:{buttonScrollSpeed:Number,disabled:Boolean,scrollContentRef:Object,type:String,prevButton:Object,nextButton:Object,dir:String},inject:{kendoLocalizationService:{default:null}},emits:["contentscroll"],methods:{getScrollButtonTitle(){const{dir:e,type:t}=this.$props;return"rtl"!==e?"prev"===t?n.provideLocalizationService(this).toLanguageString(P,E[P]):n.provideLocalizationService(this).toLanguageString(z,E[z]):"prev"===t?n.provideLocalizationService(this).toLanguageString(z,E[z]):n.provideLocalizationService(this).toLanguageString(P,E[P])}},render(){const{disabled:e,type:i,scrollContentRef:n,buttonScrollSpeed:r,prevButton:l,nextButton:a}=this.$props;return t.createVNode("span",{class:s.classNames("k-button","k-button-md","k-button-solid","k-button-solid-base","k-rounded-md","k-icon-button",`k-toolbar-${i}`,{"k-disabled":e}),title:this.getScrollButtonTitle(),"aria-hidden":!0,tabindex:e?-1:void 0,onClick:()=>{n&&r&&(n.scrollBy({left:"next"===i?r:-r,behavior:"smooth"}),this.$emit("contentscroll",i))}},[t.createVNode(s.SvgIcon,{icon:"prev"===i?o.caretAltLeftIcon:o.caretAltRightIcon,class:"k-button-icon"},null)])}}),j=t.defineComponent({name:"ToolbarScrollable",props:{scrollButtons:String,scrollButtonsPosition:String,isOverflowing:Boolean,buttonScrollSpeed:Number,dir:String,isScrollStartPosition:Boolean,isScrollEndPosition:Boolean,prevButton:Object,nextButton:Object,toolbarItems:Object},emits:["contentscroll"],data:()=>({scrollContentRef:null}),mounted(){this.scrollContentRef=this.$refs.scrollContentRef},methods:{onContentScroll(e){this.$emit("contentscroll",e)}},render(){const{scrollButtons:e,buttonScrollSpeed:s,prevButton:o,nextButton:i,scrollButtonsPosition:n,dir:r,isScrollStartPosition:l,isScrollEndPosition:a,toolbarItems:d}=this.$props,u=(e,n)=>t.createVNode(L,{type:e,dir:r,disabled:n,scrollContentRef:this.scrollContentRef,buttonScrollSpeed:s,prevButton:o,nextButton:i,onContentscroll:this.onContentScroll},null),c="visible"===e||"auto"===e&&this.$props.isOverflowing;return t.createVNode(t.Fragment,null,[c&&"split"===n&&t.createVNode(t.Fragment,null,[u("rtl"!==r?"prev":"next",l),t.createVNode(M,{class:"k-toolbar-button-separator"},null)]),c&&"start"===n&&t.createVNode(t.Fragment,null,[u("rtl"!==r?"prev":"next",l),u("rtl"!==r?"next":"prev",a),t.createVNode(M,{class:"k-toolbar-button-separator"},null)]),t.createVNode("span",{class:"k-toolbar-items k-toolbar-items-scroll",ref:"scrollContentRef"},[d]),c&&"split"===n&&t.createVNode(t.Fragment,null,[t.createVNode(M,{class:"k-toolbar-button-separator"},null),u("rtl"!==r?"next":"prev",a)]),c&&"end"===n&&t.createVNode(t.Fragment,null,[t.createVNode(M,{class:"k-toolbar-button-separator"},null),u("rtl"!==r?"prev":"next",l),u("rtl"!==r?"next":"prev",a)])])}}),U=t.defineComponent({name:"ToolbarOverflowSection",props:{toolbarRef:Object,toolbarWidth:Number,fillMode:String,size:String,visibleTools:Array,overFlowTools:Array,opened:Boolean,allTools:Array},emits:["toggleoverflow"],inject:{kendoLocalizationService:{default:null}},methods:{handleClick(){this.$emit("toggleoverflow",!this.$props.opened)}},render(){const{visibleTools:e,overFlowTools:r,allTools:l}=this.$props,{toolbarRef:a,toolbarWidth:d,fillMode:c,size:p}=this.$props;return t.createVNode(t.Fragment,null,[e&&[...l].splice(0,e.length),r.length>0&&t.createVNode(t.Fragment,null,[t.createVNode(M,{class:"k-toolbar-button-separator"},null),t.createVNode(u,{ref:"buttonRef",class:"k-toolbar-overflow-button",fillMode:"flat",svgIcon:o.moreHorizontalIcon,title:n.provideLocalizationService(this).toLanguageString(A,E[A]),onClick:this.handleClick},null),t.createVNode(i.Popup,{anchor:a,show:this.$props.opened,popupClass:"k-toolbar-popup",key:d,style:{width:d+"px"}},{default:()=>[t.createVNode("span",{class:`k-toolbar-items-list k-toolbar-items-list-${s.kendoThemeMaps.sizeMap[p]} k-toolbar-items-list-${c}`},[e&&[...l].splice(e.length,l.length)])]})])])}}),W=t.defineComponent({name:"KendoToolbar",props:{tabIndex:{type:Number,default:0},dir:{type:String,validator:function(e){return[null,"ltr","rtl"].includes(e)},default:"ltr"},keyboardNavigation:{type:Boolean,default:!0},buttons:{type:Array,default:function(){}},size:{type:String,default:"medium",validator:function(e){return[null,"small","medium","large"].includes(e)}},fillMode:{type:String,default:"solid",validator:function(e){return[null,"solid","flat","outline"].includes(e)}},ariaLabel:String,overflow:{type:String,default:"section",validator:function(e){return[null,"none","section","scroll"].includes(e)}},scrollButtons:{type:String,default:"auto",validator:function(e){return[null,"hidden","visible","auto"].includes(e)}},scrollButtonsPosition:{type:String,default:"split",validator:function(e){return[null,"start","end","split"].includes(e)}},buttonScrollSpeed:{type:Number,default:100}},data:()=>({defaultSlot:null,offsetWidth:0,offsetHeight:0,currentButtons:[],focusedSelector:"",isScrollStartPosition:!0,isScrollEndPosition:!1,focusableButtons:[],isOverflowing:!1,scrollContentRef:null,lastToolbarWidthRef:0,overFlowToolsRef:[],overFlowOpened:!1,visibleToolsRef:void 0}),created(){this.focusedSelector=this.selectors.map((e=>e+":focus")).join(","),s.validatePackage(a)},computed:{selectors(){return this.$props.buttons||r},wrapperClass(){const{size:e,fillMode:t,overflow:o,scrollButtons:i}=this.$props;return{"k-toolbar":!0,[`k-toolbar-${t}`]:t,[`k-toolbar-${s.kendoThemeMaps.sizeMap[e]||e}`]:e,"k-toolbar-scrollable":"scroll"===o,"k-toolbar-scrollable-overlay":"scroll"===o&&("hidden"===i||void 0===i),"k-toolbar-scrollable-start":"scroll"===o&&"hidden"===i&&this.isScrollStartPosition,"k-toolbar-scrollable-end":"scroll"===o&&"hidden"===i&&this.isScrollEndPosition,"k-toolbar-section":o&&"section"===o}}},mounted(){s.canUseDOM&&window.ResizeObserver&&(this.observerResize=new window.ResizeObserver(this.onWindowResize),this.observerResize.observe(this.$el));const e=this.$el;e&&(this.offsetWidth=e.offsetWidth,this.offsetHeight=e.offsetHeight,!1!==this.$props.keyboardNavigation&&(this.currentButtons=this.getCurrentButtons(),this.setTabIndex(0))),this.scrollContentRef=this.$refs.toolbarScrollable&&this.$refs.toolbarScrollable.scrollContentRef,this.defaultSlot&&(this.visibleToolsRef=this.defaultSlot.filter((e=>e&&e.type)).map(((e,s)=>t.cloneVNode(e,{key:e.key||s}))),this.$nextTick((()=>{this.checkOverflow(),this.initOverflow(this.$refs.toolbar)})))},updated(){!this.$el||!1===this.$props.keyboardNavigation||(this.currentButtons=this.getCurrentButtons(),this.setTabIndex(this.focusedIndex()))},unmounted(){s.canUseDOM&&this.observerResize&&this.observerResize.disconnect(),this.currentButtons.length=0},render(){const{overflow:e,scrollButtons:o,scrollButtonsPosition:i,prevButton:n,nextButton:r,buttonScrollSpeed:l,dir:a,fillMode:d,size:u}=this.$props;return this.defaultSlot=s.getDefaultSlots(this),t.createVNode("div",{ref:"toolbar",class:this.wrapperClass,role:"toolbar",dir:a,"aria-label":this.$props.ariaLabel,onKeydown:this.onKeyDown},["scroll"===e&&t.createVNode(t.Fragment,null,[t.createVNode(j,{ref:"toolbarScrollable",scrollButtons:o,scrollButtonsPosition:i,prevButton:n,nextButton:r,isOverflowing:this.isOverflowing,buttonScrollSpeed:l,dir:a,isScrollStartPosition:this.isScrollStartPosition,isScrollEndPosition:this.isScrollEndPosition,toolbarItems:this.defaultSlot,onContentscroll:this.onContentScroll},null)]),"section"===e&&t.createVNode(U,{opened:this.overFlowOpened,toolbarRef:this.$refs.toolbar,toolbarWidth:this.offsetWidth,fillMode:d,size:u,visibleTools:this.visibleToolsRef,overFlowTools:this.overFlowToolsRef,onToggleoverflow:this.onToggleoverflow,allTools:this.defaultSlot},null),"none"===e&&this.defaultSlot])},methods:{getCurrentButtons(){return this.$el&&this.$el.querySelectorAll?Array.from(this.$el.querySelectorAll(this.selectors.join(","))):[]},getInternalButtons(){return this.$el&&this.$el.querySelectorAll?Array.from(this.$el.querySelectorAll(".k-dropdownlist > .k-button,.k-colorpicker > .k-button")):[]},focusedIndex(){const e=this.$el&&this.$el.querySelector&&this.$el.querySelector(this.focusedSelector);return Math.max(0,this.currentButtons.findIndex((t=>t===e)))},setTabIndex(e){const{tabIndex:t}=this.$props;this.currentButtons.forEach(((s,o)=>{s.tabIndex=o===e?t:-1})),this.getInternalButtons().forEach((e=>{e.tabIndex=-1}))},onKeyDown(e){if(!1===this.$props.keyboardNavigation)return;const t=e.target;if(e.keyCode!==s.Keys.left&&e.keyCode!==s.Keys.right||e.defaultPrevented||-1===this.currentButtons.findIndex((e=>e===t)))return;const o=this.focusedIndex();e.keyCode===s.Keys.left?this.focusButton(o,o-1):this.focusButton(o,o+1)},focusButton(e,t){const{tabIndex:s}=this.$props,o=this.currentButtons[t];if(o){o.tabIndex=s,o.focus();const t=this.currentButtons[e];t&&(t.tabIndex=-1)}},initOverflow(e,t){let s=200;const o=[],i=[];Array.from(e.children).forEach(((e,t)=>{s+=Math.ceil(e.clientWidth),s<=this.$refs.toolbar.offsetWidth-50?o.push(this.visibleToolsRef[t]):i.push(this.visibleToolsRef[t])})),this.visibleToolsRef=o,this.overFlowToolsRef=i},checkOverflow(){if("scroll"===this.$props.overflow){const e=this.scrollContentRef;e&&(this.isOverflowing=e.scrollWidth>e.clientWidth||e.scrollHeight>e.clientHeight,this.isOverflowing?this.onContentScroll():(this.isScrollStartPosition=!0,this.isScrollEndPosition=!0))}else if("section"===this.$props.overflow||void 0===this.$props.overflow){const e=this.$refs.toolbar;let t=0;if(e){const s=e.offsetWidth,o=parseInt(window.getComputedStyle(e).gap||"0",10),i=Array.from(e.children).reduce(((e,t)=>e+=Math.ceil(t.clientWidth)),0),n=Array.from(e.children).length,r=2*o;if(t=36+Number(i)+n*o+r,t>s){const e=[...this.visibleToolsRef],t=e.pop();this.visibleToolsRef=e,t&&(this.overFlowToolsRef=[t,...this.overFlowToolsRef]),this.lastToolbarWidthRef=s}else if(s>this.lastToolbarWidthRef+o*n/2.75){const e=[...this.overFlowToolsRef],t=e.shift();t&&this.lastToolbarWidthRef+o*n>30&&(this.overFlowToolsRef=e,this.visibleToolsRef=[...this.visibleToolsRef,t]),this.lastToolbarWidthRef=s}else this.$forceUpdate()}}},onWindowResize(e){window.requestAnimationFrame((()=>{const t=this.$el;if(this.overFlowOpened=!1,!t)return;const s=t.offsetWidth,o=t.offsetHeight;if(this.offsetWidth!==s||this.offsetHeight!==o){this.offsetWidth=s,this.offsetHeight=o;const t={offsetWidth:this.offsetWidth,offsetHeight:this.offsetHeight};this.$emit("resize",{target:this,...t,nativeEvent:e})}this.checkOverflow()}))},onContentScroll(e){const t=this.scrollContentRef;if(e&&t){let s,o;s="next"!==e&&(t.scrollLeft<=this.$props.buttonScrollSpeed||0===t.scrollLeft),o="prev"!==e&&(t.scrollLeft+t.clientWidth+this.$props.buttonScrollSpeed>=t.scrollWidth||t.scrollLeft+t.clientWidth===t.scrollWidth),this.isScrollStartPosition=!!s,this.isScrollEndPosition=!!o}else this.isScrollStartPosition=!0,this.isScrollEndPosition=!1},onToggleoverflow(e){this.overFlowOpened=e}}}),_=t.defineComponent({name:"KendoToolbarItem",methods:{element(){return this.$el}},render(){const e=s.getDefaultSlots(this);return t.createVNode("div",{class:"k-toolbar-item"},[e])}}),q=t.defineComponent({name:"KendoToolbarItem",render:()=>t.createVNode("span",{class:"k-spacer"},null)});e.Button=u,e.ButtonGroup=h,e.ButtonItem=N,e.Chip=v,e.ChipList=$,e.DropDownButton=T,e.FloatingActionButton=B,e.FloatingActionButtonItem=k,e.SplitButton=V,e.Toolbar=W,e.ToolbarItem=_,e.ToolbarSeparator=M,e.ToolbarSpacer=q}));
|
package/package-metadata.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 e={name:"@progress/kendo-vue-buttons",productName:"Kendo UI for Vue",productCode:"KENDOUIVUE",productCodes:["KENDOUIVUE"],publishDate:
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={name:"@progress/kendo-vue-buttons",productName:"Kendo UI for Vue",productCode:"KENDOUIVUE",productCodes:["KENDOUIVUE"],publishDate: 1750421576,version:"6.4.2-develop.3",licensingDocsUrl:"https://www.telerik.com/kendo-vue-ui/my-license/?utm_medium=product&utm_source=kendovue&utm_campaign=kendo-ui-vue-purchase-license-keys-warning"};exports.packageMetadata=e;
|
package/package-metadata.mjs
CHANGED
|
@@ -10,8 +10,8 @@ const e = {
|
|
|
10
10
|
productName: "Kendo UI for Vue",
|
|
11
11
|
productCode: "KENDOUIVUE",
|
|
12
12
|
productCodes: ["KENDOUIVUE"],
|
|
13
|
-
publishDate:
|
|
14
|
-
version: "6.4.
|
|
13
|
+
publishDate: 1750421576,
|
|
14
|
+
version: "6.4.2-develop.3",
|
|
15
15
|
licensingDocsUrl: "https://www.telerik.com/kendo-vue-ui/my-license/?utm_medium=product&utm_source=kendovue&utm_campaign=kendo-ui-vue-purchase-license-keys-warning"
|
|
16
16
|
};
|
|
17
17
|
export {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-vue-buttons",
|
|
3
|
-
"version": "6.4.
|
|
3
|
+
"version": "6.4.2-develop.3",
|
|
4
4
|
"description": "TODO",
|
|
5
5
|
"author": "Progress",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
@@ -19,9 +19,9 @@
|
|
|
19
19
|
"sideEffects": false,
|
|
20
20
|
"peerDependencies": {
|
|
21
21
|
"@progress/kendo-licensing": "^1.4.0",
|
|
22
|
-
"@progress/kendo-vue-common": "6.4.
|
|
23
|
-
"@progress/kendo-vue-intl": "6.4.
|
|
24
|
-
"@progress/kendo-vue-popup": "6.4.
|
|
22
|
+
"@progress/kendo-vue-common": "6.4.2-develop.3",
|
|
23
|
+
"@progress/kendo-vue-intl": "6.4.2-develop.3",
|
|
24
|
+
"@progress/kendo-vue-popup": "6.4.2-develop.3",
|
|
25
25
|
"@progress/kendo-svg-icons": "^4.0.0",
|
|
26
26
|
"vue": "^3.0.2"
|
|
27
27
|
},
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"package": {
|
|
43
43
|
"productName": "Kendo UI for Vue",
|
|
44
44
|
"productCode": "KENDOUIVUE",
|
|
45
|
-
"publishDate":
|
|
45
|
+
"publishDate": 1750421576,
|
|
46
46
|
"licensingDocsUrl": "https://www.telerik.com/kendo-vue-ui/my-license/?utm_medium=product&utm_source=kendovue&utm_campaign=kendo-ui-vue-purchase-license-keys-warning"
|
|
47
47
|
}
|
|
48
48
|
},
|
package/toolbar/Toolbar.mjs
CHANGED
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
import { defineComponent as d,
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
8
|
+
import { defineComponent as d, createVNode as a, Fragment as u, cloneVNode as b } from "vue";
|
|
9
|
+
import { Keys as h, getDefaultSlots as p, canUseDOM as c, kendoThemeMaps as S, validatePackage as v } from "@progress/kendo-vue-common";
|
|
10
|
+
import { internalButtons as w, toolbarButtons as g } from "../util.mjs";
|
|
11
11
|
import { packageMetadata as m } from "../package-metadata.mjs";
|
|
12
12
|
import { ToolbarScrollable as y } from "./tools/ToolbarScrollable.mjs";
|
|
13
13
|
import { ToolbarOverflowSection as T } from "./tools/ToolbarOverflowSection.mjs";
|
|
@@ -94,11 +94,11 @@ const I = /* @__PURE__ */ d({
|
|
|
94
94
|
};
|
|
95
95
|
},
|
|
96
96
|
created() {
|
|
97
|
-
this.focusedSelector = this.selectors.map((t) => t + ":focus").join(","),
|
|
97
|
+
this.focusedSelector = this.selectors.map((t) => t + ":focus").join(","), v(m);
|
|
98
98
|
},
|
|
99
99
|
computed: {
|
|
100
100
|
selectors() {
|
|
101
|
-
return this.$props.buttons ||
|
|
101
|
+
return this.$props.buttons || g;
|
|
102
102
|
},
|
|
103
103
|
wrapperClass() {
|
|
104
104
|
const {
|
|
@@ -122,7 +122,7 @@ const I = /* @__PURE__ */ d({
|
|
|
122
122
|
mounted() {
|
|
123
123
|
c && window.ResizeObserver && (this.observerResize = new window.ResizeObserver(this.onWindowResize), this.observerResize.observe(this.$el));
|
|
124
124
|
const t = this.$el;
|
|
125
|
-
t && (this.offsetWidth = t.offsetWidth, this.offsetHeight = t.offsetHeight, this.$props.keyboardNavigation !== !1 && (this.currentButtons = this.getCurrentButtons(), this.setTabIndex(0))), this.scrollContentRef = this.$refs.toolbarScrollable && this.$refs.toolbarScrollable.scrollContentRef, this.defaultSlot && (this.visibleToolsRef = this.defaultSlot.filter((e) => e && e.type).map((e, o) =>
|
|
125
|
+
t && (this.offsetWidth = t.offsetWidth, this.offsetHeight = t.offsetHeight, this.$props.keyboardNavigation !== !1 && (this.currentButtons = this.getCurrentButtons(), this.setTabIndex(0))), this.scrollContentRef = this.$refs.toolbarScrollable && this.$refs.toolbarScrollable.scrollContentRef, this.defaultSlot && (this.visibleToolsRef = this.defaultSlot.filter((e) => e && e.type).map((e, o) => b(e, {
|
|
126
126
|
key: e.key || o
|
|
127
127
|
})), this.$nextTick(() => {
|
|
128
128
|
this.checkOverflow(), this.initOverflow(this.$refs.toolbar);
|
|
@@ -146,14 +146,14 @@ const I = /* @__PURE__ */ d({
|
|
|
146
146
|
fillMode: i,
|
|
147
147
|
size: r
|
|
148
148
|
} = this.$props;
|
|
149
|
-
return this.defaultSlot =
|
|
149
|
+
return this.defaultSlot = p(this), a("div", {
|
|
150
150
|
ref: "toolbar",
|
|
151
151
|
class: this.wrapperClass,
|
|
152
152
|
role: "toolbar",
|
|
153
153
|
dir: f,
|
|
154
154
|
"aria-label": this.$props.ariaLabel,
|
|
155
155
|
onKeydown: this.onKeyDown
|
|
156
|
-
}, [t === "scroll" && a(
|
|
156
|
+
}, [t === "scroll" && a(u, null, [a(y, {
|
|
157
157
|
ref: "toolbarScrollable",
|
|
158
158
|
scrollButtons: e,
|
|
159
159
|
scrollButtonsPosition: o,
|
|
@@ -183,7 +183,7 @@ const I = /* @__PURE__ */ d({
|
|
|
183
183
|
return this.$el && this.$el.querySelectorAll ? Array.from(this.$el.querySelectorAll(this.selectors.join(","))) : [];
|
|
184
184
|
},
|
|
185
185
|
getInternalButtons() {
|
|
186
|
-
return this.$el && this.$el.querySelectorAll ? Array.from(this.$el.querySelectorAll(
|
|
186
|
+
return this.$el && this.$el.querySelectorAll ? Array.from(this.$el.querySelectorAll(w)) : [];
|
|
187
187
|
},
|
|
188
188
|
focusedIndex() {
|
|
189
189
|
const t = this.$el && this.$el.querySelector && this.$el.querySelector(this.focusedSelector);
|
package/util.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.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t={button:"k-button",
|
|
8
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t={button:"k-button","state-disabled":"k-disabled","group-start":"k-group-start","group-end":"k-group-end","button-group":"k-button-group","button-group-stretched":"k-button-group-stretched"},o=":not(.k-dropdownlist button):not(.k-colorpicker button):not(.k-split-button .k-split-button-arrow)",n=".k-dropdownlist > .k-button,.k-colorpicker > .k-button",u=["button"+o,".k-button-group > button",".k-dropdownlist",".k-colorpicker"],r={styles:t};exports.default=r;exports.internalButtons=n;exports.toolbarButtons=u;
|
package/util.mjs
CHANGED
|
@@ -7,30 +7,21 @@
|
|
|
7
7
|
*/
|
|
8
8
|
const t = {
|
|
9
9
|
button: "k-button",
|
|
10
|
-
flat: "k-flat",
|
|
11
|
-
outline: "k-outline",
|
|
12
|
-
clear: "k-button-clear",
|
|
13
|
-
primary: "k-primary",
|
|
14
|
-
"state-selected": "k-selected",
|
|
15
|
-
"button-icon": "k-button-icon",
|
|
16
|
-
"button-icontext": "k-button-icontext",
|
|
17
10
|
"state-disabled": "k-disabled",
|
|
18
11
|
"group-start": "k-group-start",
|
|
19
12
|
"group-end": "k-group-end",
|
|
20
13
|
"button-group": "k-button-group",
|
|
21
|
-
"button-group-stretched": "k-button-group-stretched"
|
|
22
|
-
|
|
23
|
-
rtl: "k-rtl"
|
|
24
|
-
}, o = ":not(.k-dropdownlist button):not(.k-colorpicker button):not(.k-split-button .k-split-button-arrow)", n = ".k-dropdownlist > .k-button,.k-colorpicker > .k-button", r = [
|
|
14
|
+
"button-group-stretched": "k-button-group-stretched"
|
|
15
|
+
}, o = ":not(.k-dropdownlist button):not(.k-colorpicker button):not(.k-split-button .k-split-button-arrow)", n = ".k-dropdownlist > .k-button,.k-colorpicker > .k-button", u = [
|
|
25
16
|
"button" + o,
|
|
26
17
|
".k-button-group > button",
|
|
27
18
|
".k-dropdownlist",
|
|
28
19
|
".k-colorpicker"
|
|
29
|
-
],
|
|
20
|
+
], r = {
|
|
30
21
|
styles: t
|
|
31
22
|
};
|
|
32
23
|
export {
|
|
33
|
-
|
|
24
|
+
r as default,
|
|
34
25
|
n as internalButtons,
|
|
35
|
-
|
|
26
|
+
u as toolbarButtons
|
|
36
27
|
};
|