@progress/kendo-vue-buttons 3.5.0 → 3.5.1-dev.202208150613

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.
Files changed (135) hide show
  1. package/dist/cdn/js/kendo-vue-buttons.js +1 -1
  2. package/dist/es/Button.js +1 -1
  3. package/dist/es/ButtonGroupInterface.js +1 -0
  4. package/dist/es/ButtonInterface.js +1 -0
  5. package/dist/es/Chip/Chip.js +1 -1
  6. package/dist/es/Chip/ChipList.js +1 -1
  7. package/dist/es/Chip/selection-reducer.js +8 -12
  8. package/dist/es/FloatingActionButton/FloatingActionButton.js +8 -8
  9. package/dist/es/FloatingActionButton/FloatingActionButtonItem.js +3 -3
  10. package/dist/es/FloatingActionButton/interfaces/FloatingActionButtonHandle.js +1 -0
  11. package/dist/es/FloatingActionButton/interfaces/FloatingActionButtonPopupSettings.js +1 -0
  12. package/dist/es/FloatingActionButton/interfaces/FloatingActionButtonProps.js +1 -0
  13. package/dist/es/FloatingActionButton/models/align-offset.js +1 -0
  14. package/dist/es/FloatingActionButton/models/align.js +1 -0
  15. package/dist/es/FloatingActionButton/models/events.js +1 -0
  16. package/dist/es/FloatingActionButton/models/position-mode.js +1 -0
  17. package/dist/es/FloatingActionButton/models/shape.js +1 -0
  18. package/dist/es/FloatingActionButton/models/size.js +1 -0
  19. package/dist/es/FloatingActionButton/models/theme-color.js +1 -0
  20. package/dist/es/FloatingActionButton/utils.js +2 -2
  21. package/dist/es/ListButton/ButtonItem.js +1 -1
  22. package/dist/es/ListButton/DropDownButton.js +8 -8
  23. package/dist/es/ListButton/SplitButton.js +8 -8
  24. package/dist/es/ListButton/models/ButtonItemInterface.js +1 -0
  25. package/dist/es/ListButton/models/ListButtonProps.js +1 -0
  26. package/dist/es/ListButton/models/PopupSettings.js +1 -0
  27. package/dist/es/ListButton/models/events.js +1 -0
  28. package/dist/es/buttonLook.js +1 -0
  29. package/dist/es/models/index.js +1 -0
  30. package/dist/es/package-metadata.js +1 -1
  31. package/dist/es/util.d.ts +3 -3
  32. package/dist/esm/Button.d.ts +123 -0
  33. package/dist/esm/Button.js +280 -0
  34. package/dist/esm/ButtonGroup.d.ts +49 -0
  35. package/dist/esm/ButtonGroup.js +106 -0
  36. package/dist/esm/ButtonGroupInterface.d.ts +30 -0
  37. package/dist/esm/ButtonGroupInterface.js +2 -0
  38. package/dist/esm/ButtonInterface.d.ts +56 -0
  39. package/dist/esm/ButtonInterface.js +2 -0
  40. package/dist/esm/ButtonWrap.d.ts +19 -0
  41. package/dist/esm/ButtonWrap.js +33 -0
  42. package/dist/esm/Chip/Chip.d.ts +199 -0
  43. package/dist/esm/Chip/Chip.js +339 -0
  44. package/dist/esm/Chip/ChipList.d.ts +174 -0
  45. package/dist/esm/Chip/ChipList.js +263 -0
  46. package/dist/esm/Chip/data-reducer.d.ts +21 -0
  47. package/dist/esm/Chip/data-reducer.js +34 -0
  48. package/dist/esm/Chip/focus-reducer.d.ts +24 -0
  49. package/dist/esm/Chip/focus-reducer.js +38 -0
  50. package/dist/esm/Chip/selection-reducer.d.ts +29 -0
  51. package/dist/esm/Chip/selection-reducer.js +102 -0
  52. package/dist/esm/FloatingActionButton/FloatingActionButton.d.ts +49 -0
  53. package/dist/esm/FloatingActionButton/FloatingActionButton.js +494 -0
  54. package/dist/esm/FloatingActionButton/FloatingActionButtonItem.d.ts +118 -0
  55. package/dist/esm/FloatingActionButton/FloatingActionButtonItem.js +121 -0
  56. package/dist/esm/FloatingActionButton/interfaces/FloatingActionButtonHandle.d.ts +13 -0
  57. package/dist/esm/FloatingActionButton/interfaces/FloatingActionButtonHandle.js +1 -0
  58. package/dist/esm/FloatingActionButton/interfaces/FloatingActionButtonPopupSettings.d.ts +24 -0
  59. package/dist/esm/FloatingActionButton/interfaces/FloatingActionButtonPopupSettings.js +1 -0
  60. package/dist/esm/FloatingActionButton/interfaces/FloatingActionButtonProps.d.ts +243 -0
  61. package/dist/esm/FloatingActionButton/interfaces/FloatingActionButtonProps.js +1 -0
  62. package/dist/esm/FloatingActionButton/models/align-offset.d.ts +20 -0
  63. package/dist/esm/FloatingActionButton/models/align-offset.js +1 -0
  64. package/dist/esm/FloatingActionButton/models/align.d.ts +27 -0
  65. package/dist/esm/FloatingActionButton/models/align.js +1 -0
  66. package/dist/esm/FloatingActionButton/models/events.d.ts +18 -0
  67. package/dist/esm/FloatingActionButton/models/events.js +2 -0
  68. package/dist/esm/FloatingActionButton/models/position-mode.d.ts +9 -0
  69. package/dist/esm/FloatingActionButton/models/position-mode.js +1 -0
  70. package/dist/esm/FloatingActionButton/models/shape.d.ts +13 -0
  71. package/dist/esm/FloatingActionButton/models/shape.js +1 -0
  72. package/dist/esm/FloatingActionButton/models/size.d.ts +10 -0
  73. package/dist/esm/FloatingActionButton/models/size.js +1 -0
  74. package/dist/esm/FloatingActionButton/models/theme-color.d.ts +17 -0
  75. package/dist/esm/FloatingActionButton/models/theme-color.js +1 -0
  76. package/dist/esm/FloatingActionButton/utils.d.ts +27 -0
  77. package/dist/esm/FloatingActionButton/utils.js +93 -0
  78. package/dist/esm/ListButton/ButtonItem.d.ts +58 -0
  79. package/dist/esm/ListButton/ButtonItem.js +138 -0
  80. package/dist/esm/ListButton/DropDownButton.d.ts +66 -0
  81. package/dist/esm/ListButton/DropDownButton.js +453 -0
  82. package/dist/esm/ListButton/SplitButton.d.ts +67 -0
  83. package/dist/esm/ListButton/SplitButton.js +515 -0
  84. package/dist/esm/ListButton/models/ButtonItemInterface.d.ts +29 -0
  85. package/dist/esm/ListButton/models/ButtonItemInterface.js +2 -0
  86. package/dist/esm/ListButton/models/ListButtonProps.d.ts +328 -0
  87. package/dist/esm/ListButton/models/ListButtonProps.js +2 -0
  88. package/dist/esm/ListButton/models/PopupSettings.d.ts +24 -0
  89. package/dist/esm/ListButton/models/PopupSettings.js +1 -0
  90. package/dist/esm/ListButton/models/events.d.ts +48 -0
  91. package/dist/esm/ListButton/models/events.js +1 -0
  92. package/dist/esm/ListButton/utils/navigation.d.ts +5 -0
  93. package/dist/esm/ListButton/utils/navigation.js +24 -0
  94. package/dist/esm/ListButton/utils/popup.d.ts +9 -0
  95. package/dist/esm/ListButton/utils/popup.js +20 -0
  96. package/dist/esm/additionalTypes.ts +21 -0
  97. package/dist/esm/buttonLook.d.ts +13 -0
  98. package/dist/esm/buttonLook.js +1 -0
  99. package/dist/esm/main.d.ts +30 -0
  100. package/dist/esm/main.js +15 -0
  101. package/dist/esm/models/index.d.ts +87 -0
  102. package/dist/esm/models/index.js +1 -0
  103. package/dist/esm/package-metadata.d.ts +5 -0
  104. package/dist/esm/package-metadata.js +11 -0
  105. package/dist/esm/package.json +3 -0
  106. package/dist/esm/toolbar/Toolbar.d.ts +112 -0
  107. package/dist/esm/toolbar/Toolbar.js +208 -0
  108. package/dist/esm/toolbar/tools/ToolbarItem.d.ts +64 -0
  109. package/dist/esm/toolbar/tools/ToolbarItem.js +58 -0
  110. package/dist/esm/toolbar/tools/ToolbarSeparator.d.ts +36 -0
  111. package/dist/esm/toolbar/tools/ToolbarSeparator.js +56 -0
  112. package/dist/esm/toolbar/tools/ToolbarSpacer.d.ts +36 -0
  113. package/dist/esm/toolbar/tools/ToolbarSpacer.js +53 -0
  114. package/dist/esm/util.d.ts +31 -0
  115. package/dist/esm/util.js +40 -0
  116. package/dist/npm/Button.js +5 -5
  117. package/dist/npm/ButtonGroup.js +4 -4
  118. package/dist/npm/ButtonWrap.js +1 -1
  119. package/dist/npm/Chip/Chip.js +10 -10
  120. package/dist/npm/Chip/ChipList.js +8 -8
  121. package/dist/npm/Chip/data-reducer.js +4 -2
  122. package/dist/npm/Chip/focus-reducer.js +4 -2
  123. package/dist/npm/Chip/selection-reducer.js +12 -14
  124. package/dist/npm/FloatingActionButton/FloatingActionButton.js +31 -31
  125. package/dist/npm/FloatingActionButton/FloatingActionButtonItem.js +8 -8
  126. package/dist/npm/FloatingActionButton/utils.js +14 -9
  127. package/dist/npm/ListButton/ButtonItem.js +1 -1
  128. package/dist/npm/ListButton/DropDownButton.js +19 -19
  129. package/dist/npm/ListButton/SplitButton.js +19 -19
  130. package/dist/npm/main.js +6 -2
  131. package/dist/npm/package-metadata.js +1 -1
  132. package/dist/npm/toolbar/Toolbar.js +2 -2
  133. package/dist/npm/toolbar/tools/ToolbarItem.js +1 -1
  134. package/dist/npm/util.d.ts +3 -3
  135. package/package.json +11 -5
@@ -0,0 +1,494 @@
1
+ // @ts-ignore
2
+ import * as Vue from 'vue';
3
+ var allVue = Vue;
4
+ var gh = allVue.h;
5
+ var isV3 = allVue.version && allVue.version[0] === '3';
6
+ var ref = allVue.ref;
7
+ import { classNames, guid, Keys, getTabIndex, templateRendering, getListeners, validatePackage, canUseDOM, kendoThemeMaps, setRef, getRef } from '@progress/kendo-vue-common';
8
+ import { FloatingActionButtonItem } from './FloatingActionButtonItem.js';
9
+ import { packageMetadata } from '../package-metadata.js';
10
+ import { position, getAnchorAlign, getPopupAlign, getTextDirectionClass } from './utils.js';
11
+ import { Popup } from '@progress/kendo-vue-popup';
12
+ /**
13
+ * @hidden
14
+ */
15
+
16
+ var FloatingActionButtonVue2 = {
17
+ name: 'KendoVueFloatingActionButton',
18
+ props: {
19
+ id: String,
20
+ dir: String,
21
+ tabIndex: Number,
22
+ accessKey: String,
23
+ disabled: Boolean,
24
+ icon: String,
25
+ iconClass: String,
26
+ items: [Object, Array],
27
+ item: [String, Function, Object],
28
+ text: String,
29
+ alignOffset: Object,
30
+ opened: {
31
+ type: Boolean,
32
+ default: undefined
33
+ },
34
+ align: {
35
+ type: Object,
36
+ default: function _default() {
37
+ return {
38
+ vertical: 'bottom',
39
+ horizontal: 'end'
40
+ };
41
+ }
42
+ },
43
+ positionMode: {
44
+ type: String,
45
+ default: function _default() {
46
+ return 'fixed';
47
+ }
48
+ },
49
+ popupSettings: {
50
+ type: Object,
51
+ default: function _default() {
52
+ return {};
53
+ }
54
+ },
55
+ shape: {
56
+ type: String,
57
+ default: function _default() {
58
+ return 'rectangle';
59
+ }
60
+ },
61
+ rounded: {
62
+ type: String,
63
+ default: 'full'
64
+ },
65
+ fillMode: {
66
+ type: String,
67
+ default: 'solid',
68
+ validator: function validator(value) {
69
+ return [null, 'flat', 'link', 'outline', 'solid'].includes(value);
70
+ }
71
+ },
72
+ size: {
73
+ type: String,
74
+ default: function _default() {
75
+ return 'medium';
76
+ }
77
+ },
78
+ themeColor: {
79
+ type: String,
80
+ default: function _default() {
81
+ return 'primary';
82
+ }
83
+ }
84
+ },
85
+ // @ts-ignore
86
+ emits: {
87
+ 'click': null,
88
+ 'mousedown': null,
89
+ 'mouseup': null,
90
+ 'open': null,
91
+ 'close': null,
92
+ 'itemclick': null,
93
+ 'focus': null,
94
+ 'blur': null,
95
+ 'keydown': null
96
+ },
97
+ data: function data() {
98
+ return {
99
+ currentOpened: false,
100
+ currentFocused: false,
101
+ focusedIndex: -1,
102
+ currentDir: 'ltr',
103
+ isRtl: false
104
+ };
105
+ },
106
+ created: function created() {
107
+ validatePackage(packageMetadata);
108
+ this.element = undefined;
109
+ this._anchor = guid();
110
+ this.listId = guid();
111
+ this.buttonId = guid();
112
+ },
113
+ mounted: function mounted() {
114
+ this.element = this.v3 ? this.kendoAnchorRef : this.$refs[this._anchor];
115
+ this.list = getRef(this, 'list');
116
+ this.popup = getRef(this, 'popup');
117
+ this.currentDir = this.$props.dir !== undefined ? this.$props.dir : this.$el && getComputedStyle(this.$el).direction === 'rtl' || false;
118
+ this.isRtl = this.currentDir === 'rtl';
119
+
120
+ if (this.opened !== undefined) {
121
+ position(this.$el, this.$props.align, this.$props.alignOffset, this.isRtl);
122
+ }
123
+ },
124
+ updated: function updated() {
125
+ position(this.$el, this.$props.align, this.$props.alignOffset, this.isRtl);
126
+
127
+ if (this.currentFocused && this.element) {
128
+ this.element.focus();
129
+ }
130
+ },
131
+ computed: {
132
+ buttonClassNames: function buttonClassNames() {
133
+ var _a;
134
+
135
+ var _b = this.$props,
136
+ size = _b.size,
137
+ icon = _b.icon,
138
+ shape = _b.shape,
139
+ themeColor = _b.themeColor,
140
+ fillMode = _b.fillMode,
141
+ rounded = _b.rounded;
142
+ return _a = {
143
+ 'k-fab': true
144
+ }, _a["k-fab-".concat(shape || 'rectangle')] = shape !== null, _a["k-fab-".concat(kendoThemeMaps.sizeMap[size] || size)] = size, _a["k-rounded-".concat(kendoThemeMaps.roundedMap[rounded] || rounded)] = rounded, _a["k-fab-".concat(fillMode)] = fillMode, _a["k-fab-".concat(fillMode, "-").concat(themeColor)] = fillMode && themeColor, _a['k-disabled'] = this.$props.disabled, _a['k-focus'] = this.currentFocused, _a["k-".concat(this.$props.align.vertical, "-").concat(this.$props.align.horizontal)] = true, _a;
145
+ },
146
+ computedOpened: function computedOpened() {
147
+ return this.$props.opened === undefined ? this.currentOpened : this.$props.opened;
148
+ },
149
+ rootClassNames: function rootClassNames() {
150
+ return classNames({
151
+ 'k-pos-absolute': this.$props.positionMode === 'absolute',
152
+ 'k-pos-fixed': this.$props.positionMode === 'fixed'
153
+ });
154
+ }
155
+ },
156
+ methods: {
157
+ dispatchPopupEvent: function dispatchPopupEvent(dispatchedEvent, isOpen) {
158
+ if (!this.$props.items) {
159
+ return;
160
+ }
161
+
162
+ this.$emit(isOpen ? 'open' : 'close', {
163
+ event: dispatchedEvent,
164
+ isOpened: !isOpen
165
+ });
166
+ },
167
+ handleClick: function handleClick(event) {
168
+ if (!event.target || this.$props.disabled) {
169
+ return;
170
+ }
171
+
172
+ if (!this.$props.items) {
173
+ this.$emit('click', event, undefined);
174
+ } else {
175
+ var currentOpenToggled = !this.computedOpened;
176
+ this.currentOpened = currentOpenToggled;
177
+ this.currentFocused = true;
178
+ this.focusedIndex = currentOpenToggled ? 0 : -1;
179
+ this.dispatchPopupEvent(event, !this.computedOpened);
180
+ }
181
+ },
182
+ handleFocus: function handleFocus(event) {
183
+ this.currentFocused = true;
184
+ this.focusedIndex = this.computedOpened ? 0 : -1;
185
+ this.$emit('focus', event, undefined);
186
+ },
187
+ handleBlur: function handleBlur(event) {
188
+ this.currentFocused = false;
189
+ this.currentOpened = false;
190
+ this.focusedIndex = -1;
191
+ this.$emit('blur', event, undefined);
192
+ var fireCloseEvent = this.computedOpened;
193
+
194
+ if (fireCloseEvent) {
195
+ this.dispatchPopupEvent(event, false);
196
+ }
197
+ },
198
+ handleMouseDown: function handleMouseDown(event) {
199
+ event.preventDefault();
200
+ this.$emit('mousedown', event);
201
+ },
202
+ handleMouseUp: function handleMouseUp(event) {
203
+ this.$emit('mouseup', event);
204
+ },
205
+ dispatchItemClickEvent: function dispatchItemClickEvent(dispatchedEvent, index) {
206
+ if (!this.$props.items) {
207
+ return;
208
+ }
209
+
210
+ if (!this.$props.items[index].disabled) {
211
+ this.$emit('itemclick', dispatchedEvent, {
212
+ itemProps: this.$props.items[index],
213
+ itemIndex: index
214
+ });
215
+ }
216
+ },
217
+ handleItemClick: function handleItemClick(event, clickedItemIndex) {
218
+ if (!event.target || !this.$props.items) {
219
+ return;
220
+ }
221
+
222
+ this.focusedIndex = clickedItemIndex;
223
+ this.currentOpened = false;
224
+ this.dispatchItemClickEvent(event, clickedItemIndex);
225
+ this.dispatchPopupEvent(event, false);
226
+ },
227
+ handleItemDown: function handleItemDown(event) {
228
+ if (canUseDOM && document.activeElement === this.element) {
229
+ event.preventDefault();
230
+ }
231
+ },
232
+ handleKeyDown: function handleKeyDown(event) {
233
+ var currIndex = this.focusedIndex;
234
+ var maxNavIndex = this.$props.items ? this.$props.items.length - 1 : -1;
235
+ var isAtBottom = this.$props.align.vertical === 'bottom';
236
+
237
+ switch (event.keyCode) {
238
+ case Keys.enter:
239
+ case Keys.space:
240
+ if (currIndex >= 0) {
241
+ this.dispatchItemClickEvent(event, currIndex);
242
+ }
243
+
244
+ event.preventDefault();
245
+ this.currentOpened = !this.currentOpened;
246
+ this.focusedIndex = !this.currentOpened ? 0 : -1;
247
+ break;
248
+
249
+ case Keys.esc:
250
+ event.preventDefault();
251
+ this.currentOpened = false;
252
+ this.focusedIndex = -1;
253
+ break;
254
+
255
+ case Keys.home:
256
+ event.preventDefault();
257
+ this.focusedIndex = 0;
258
+ break;
259
+
260
+ case Keys.end:
261
+ event.preventDefault();
262
+ this.focusedIndex = maxNavIndex;
263
+ break;
264
+
265
+ case Keys.down:
266
+ case Keys.right:
267
+ event.preventDefault();
268
+
269
+ if (currIndex < maxNavIndex && !isAtBottom) {
270
+ this.focusedIndex = currIndex + 1;
271
+ }
272
+
273
+ if (currIndex > 0 && isAtBottom) {
274
+ this.focusedIndex = currIndex - 1;
275
+ }
276
+
277
+ break;
278
+
279
+ case Keys.up:
280
+ case Keys.left:
281
+ event.preventDefault();
282
+
283
+ if (currIndex > 0 && !isAtBottom) {
284
+ this.focusedIndex = currIndex - 1;
285
+ }
286
+
287
+ if (currIndex < maxNavIndex && isAtBottom) {
288
+ this.focusedIndex = currIndex + 1;
289
+ }
290
+
291
+ break;
292
+
293
+ default:
294
+ break;
295
+ }
296
+
297
+ this.$emit('keydown', event, undefined);
298
+ }
299
+ },
300
+ // @ts-ignore
301
+ setup: !isV3 ? undefined : function () {
302
+ var v3 = !!isV3;
303
+ var chipRef = ref(null);
304
+ var kendoAnchorRef = ref(null);
305
+ return {
306
+ v3: v3,
307
+ chipRef: chipRef,
308
+ kendoAnchorRef: kendoAnchorRef
309
+ };
310
+ },
311
+ render: function render(createElement) {
312
+ var _this2 = this;
313
+
314
+ var _this = this;
315
+
316
+ var h = gh || createElement;
317
+ var _a = this.$props,
318
+ align = _a.align,
319
+ disabled = _a.disabled,
320
+ icon = _a.icon,
321
+ iconClass = _a.iconClass,
322
+ id = _a.id,
323
+ items = _a.items,
324
+ text = _a.text,
325
+ tabIndex = _a.tabIndex,
326
+ accessKey = _a.accessKey,
327
+ popupSettings = _a.popupSettings;
328
+ var item = templateRendering.call(this, this.$props.item, getListeners.call(this));
329
+
330
+ var fabItems = function fabItems() {
331
+ return items && items.map(function (element, index) {
332
+ return (// @ts-ignore function children
333
+ h(FloatingActionButtonItem, {
334
+ key: index,
335
+ index: index,
336
+ attrs: this.v3 ? undefined : {
337
+ index: index,
338
+ id: "".concat(this.listId, "-").concat(index),
339
+ disabled: disabled || element.disabled,
340
+ focused: this.focusedIndex === index,
341
+ dataItem: element,
342
+ item: item
343
+ },
344
+ id: "".concat(this.listId, "-").concat(index),
345
+ disabled: disabled || element.disabled,
346
+ focused: this.focusedIndex === index,
347
+ dataItem: element,
348
+ item: item,
349
+ "class": classNames(element.className, getTextDirectionClass(this.currentDir || 'ltr', align.horizontal)),
350
+ onClick: this.handleItemClick,
351
+ on: this.v3 ? undefined : {
352
+ "click": this.handleItemClick,
353
+ "down": this.handleItemDown
354
+ },
355
+ onDown: this.handleItemDown
356
+ })
357
+ );
358
+ }, this);
359
+ };
360
+
361
+ var isIconFab = icon && !text;
362
+ var fabWidth = this.element ? this.element.offsetWidth : 0;
363
+ var iconWidth = 32;
364
+ var spacing = fabWidth / 2 - iconWidth / 2;
365
+ return h("div", {
366
+ "class": this.rootClassNames
367
+ }, [h("button", {
368
+ ref: this.v3 ? function (el) {
369
+ _this.kendoAnchorRef = el;
370
+ } : this._anchor,
371
+ id: id || this.buttonId,
372
+ attrs: this.v3 ? undefined : {
373
+ id: id || this.buttonId,
374
+ role: items ? 'menubutton' : 'button',
375
+ type: 'button',
376
+ "aria-disabled": disabled,
377
+ "aria-expanded": items ? this.computedOpened : undefined,
378
+ "aria-haspopup": items ? true : false,
379
+ "aria-label": "".concat(text || '', " floatingactionbutton"),
380
+ "aria-owns": items ? this.listId : undefined,
381
+ "aria-activedescendant": this.focusedIndex >= 0 && items ? "".concat(this.listId, "-").concat(this.focusedIndex) : undefined,
382
+ tabindex: getTabIndex(tabIndex, disabled),
383
+ accesskey: accessKey,
384
+ dir: this.currentDir,
385
+ disabled: disabled
386
+ },
387
+ role: items ? 'menubutton' : 'button',
388
+ type: 'button',
389
+ "aria-disabled": disabled,
390
+ "aria-expanded": items ? this.computedOpened : undefined,
391
+ "aria-haspopup": items ? true : false,
392
+ "aria-label": "".concat(text || '', " floatingactionbutton"),
393
+ "aria-owns": items ? this.listId : undefined,
394
+ "aria-activedescendant": this.focusedIndex >= 0 && items ? "".concat(this.listId, "-").concat(this.focusedIndex) : undefined,
395
+ tabindex: getTabIndex(tabIndex, disabled),
396
+ accesskey: accessKey,
397
+ dir: this.currentDir,
398
+ disabled: disabled,
399
+ "class": this.buttonClassNames,
400
+ onClick: this.handleClick,
401
+ on: this.v3 ? undefined : {
402
+ "click": this.handleClick,
403
+ "mousedown": this.handleMouseDown,
404
+ "mouseup": this.handleMouseUp,
405
+ "focusin": this.handleFocus,
406
+ "blur": this.handleBlur,
407
+ "keydown": this.handleKeyDown
408
+ },
409
+ onMousedown: this.handleMouseDown,
410
+ onMouseup: this.handleMouseUp,
411
+ onFocusin: this.handleFocus,
412
+ onBlur: this.handleBlur,
413
+ onKeydown: this.handleKeyDown
414
+ }, [icon ? h("span", {
415
+ role: "presentation",
416
+ attrs: this.v3 ? undefined : {
417
+ role: "presentation"
418
+ },
419
+ "class": classNames("k-fab-icon k-icon k-i-".concat(icon))
420
+ }) : iconClass ? h("span", {
421
+ role: "presentation",
422
+ attrs: this.v3 ? undefined : {
423
+ role: "presentation"
424
+ },
425
+ "class": iconClass
426
+ }) : null, text && h("span", {
427
+ "class": "k-fab-text"
428
+ }, [text])]), // @ts-ignore function children
429
+ h(Popup, {
430
+ ref: setRef(this, 'popup'),
431
+ show: this.computedOpened,
432
+ attrs: this.v3 ? undefined : {
433
+ show: this.computedOpened,
434
+ anchor: this._anchor,
435
+ animate: popupSettings.animate,
436
+ popupClass: classNames('k-popup-transparent k-fab-popup', popupSettings.popupClass),
437
+ anchorAlign: popupSettings.anchorAlign || getAnchorAlign(align, this.isRtl),
438
+ popupAlign: popupSettings.popupAlign || getPopupAlign(align, this.isRtl)
439
+ },
440
+ anchor: this._anchor,
441
+ animate: popupSettings.animate,
442
+ popupClass: classNames('k-popup-transparent k-fab-popup', popupSettings.popupClass),
443
+ anchorAlign: popupSettings.anchorAlign || getAnchorAlign(align, this.isRtl),
444
+ popupAlign: popupSettings.popupAlign || getPopupAlign(align, this.isRtl),
445
+ style: {
446
+ boxShadow: 'none'
447
+ }
448
+ }, this.v3 ? function () {
449
+ return [h("ul", {
450
+ ref: setRef(_this2, 'list'),
451
+ role: 'menu',
452
+ attrs: _this2.v3 ? undefined : {
453
+ role: 'menu',
454
+ "aria-labelledby": id,
455
+ id: _this2.listId
456
+ },
457
+ "aria-labelledby": id,
458
+ id: _this2.listId,
459
+ "class": classNames('k-fab-items', {
460
+ 'k-fab-items-bottom': align.vertical !== 'bottom',
461
+ 'k-fab-items-top': align.vertical === 'bottom'
462
+ }),
463
+ style: {
464
+ paddingLeft: isIconFab ? spacing + 'px' : undefined,
465
+ paddingRight: isIconFab ? spacing + 'px' : undefined
466
+ }
467
+ }, [fabItems.call(_this2)])];
468
+ } : [h("ul", {
469
+ ref: setRef(_this2, 'list'),
470
+ role: 'menu',
471
+ attrs: _this2.v3 ? undefined : {
472
+ role: 'menu',
473
+ "aria-labelledby": id,
474
+ id: _this2.listId
475
+ },
476
+ "aria-labelledby": id,
477
+ id: _this2.listId,
478
+ "class": classNames('k-fab-items', {
479
+ 'k-fab-items-bottom': align.vertical !== 'bottom',
480
+ 'k-fab-items-top': align.vertical === 'bottom'
481
+ }),
482
+ style: {
483
+ paddingLeft: isIconFab ? spacing + 'px' : undefined,
484
+ paddingRight: isIconFab ? spacing + 'px' : undefined
485
+ }
486
+ }, [fabItems.call(_this2)])])]);
487
+ }
488
+ };
489
+ /**
490
+ * @hidden
491
+ */
492
+
493
+ var FloatingActionButton = FloatingActionButtonVue2;
494
+ export { FloatingActionButton, FloatingActionButtonVue2 };
@@ -0,0 +1,118 @@
1
+ import { DefineComponent, RecordPropsDefinition, ComponentOptions, Vue2type } from '../additionalTypes';
2
+ declare type DefaultData<V> = object | ((this: V) => {});
3
+ declare type DefaultMethods<V> = {
4
+ [key: string]: (this: V, ...args: any[]) => any;
5
+ };
6
+ /**
7
+ * The FloatingActionButtonItemHandle ref.
8
+ */
9
+ export interface FloatingActionButtonItemHandle {
10
+ /**
11
+ * The FloatingActionButtonItemHandle element.
12
+ */
13
+ element: HTMLLIElement | null;
14
+ /**
15
+ * Focus the FloatingActionButtonItem.
16
+ */
17
+ focus: () => void;
18
+ }
19
+ /**
20
+ * Represents the props of the
21
+ * [Kendo UI for Vue FloatingActionButtonItem component]({% slug overview_floatingactionbutton %}).
22
+ */
23
+ export interface FloatingActionButtonItemProps {
24
+ /**
25
+ * Specifies if the Floating Action Button Item
26
+ * is disabled [see example]({% slug disabled_floatingactionbuttonitem %}).
27
+ * Defaults to `false`.
28
+ */
29
+ disabled?: boolean;
30
+ /**
31
+ * Sets the index of the Floating Action Button Item that is used to identify it.
32
+ */
33
+ index?: number;
34
+ /**
35
+ * Defines the icon rendered in the FloatingActionButtonItem
36
+ * [see example]({% slug databinding_floatingactionbutton %}).
37
+ */
38
+ icon?: string;
39
+ /**
40
+ * Specifies the text of the FloatingActionButtonItem
41
+ * [see example]({% slug databinding_floatingactionbutton %}).
42
+ */
43
+ text?: string;
44
+ /**
45
+ * Sets the `tabIndex` property of the FloatingActionButtonItem..
46
+ * Defaults to `0`.
47
+ */
48
+ tabIndex?: number;
49
+ /**
50
+ * Sets a custom property. Contained in the FloatingActionButtonItem props that are
51
+ * returned from the `onItemClick` FloatingActionButton event
52
+ * [see example]({% slug customization_floatingactionbutton %}#toc-items-rendering).
53
+ */
54
+ [customProp: string]: any;
55
+ /**
56
+ * @hidden
57
+ */
58
+ id?: string;
59
+ /**
60
+ * @hidden
61
+ */
62
+ dataItem?: any;
63
+ /**
64
+ * @hidden
65
+ */
66
+ item?: any;
67
+ /**
68
+ * @hidden
69
+ */
70
+ focused?: boolean;
71
+ /**
72
+ * @hidden
73
+ */
74
+ onDown?: (event: any) => void;
75
+ /**
76
+ * @hidden
77
+ */
78
+ onClick?: (event: any, index: number) => void;
79
+ }
80
+ /**
81
+ * @hidden
82
+ */
83
+ export interface FloatingActionButtonItemMethods {
84
+ [key: string]: any;
85
+ }
86
+ /**
87
+ * @hidden
88
+ */
89
+ export interface FloatingActionButtonItemState {
90
+ v3: boolean;
91
+ target: any;
92
+ currentRtl: boolean;
93
+ }
94
+ /**
95
+ * @hidden
96
+ */
97
+ export interface FloatingActionButtonItemData {
98
+ }
99
+ /**
100
+ * @hidden
101
+ */
102
+ export interface FloatingActionButtonItemComputed {
103
+ [key: string]: any;
104
+ }
105
+ /**
106
+ * @hidden
107
+ */
108
+ export interface FloatingActionButtonItemAll extends FloatingActionButtonItemMethods, FloatingActionButtonItemState, FloatingActionButtonItemData, FloatingActionButtonItemComputed, Vue2type {
109
+ }
110
+ /**
111
+ * @hidden
112
+ */
113
+ declare let FloatingActionButtonItemVue2: ComponentOptions<Vue2type, DefaultData<FloatingActionButtonItemData>, DefaultMethods<FloatingActionButtonItemAll>, FloatingActionButtonItemComputed, RecordPropsDefinition<FloatingActionButtonItemProps>>;
114
+ /**
115
+ * @hidden
116
+ */
117
+ declare const FloatingActionButtonItem: DefineComponent<FloatingActionButtonItemProps, any, FloatingActionButtonItemData, FloatingActionButtonItemComputed, FloatingActionButtonItemMethods, {}, {}, {}, string, FloatingActionButtonItemProps, FloatingActionButtonItemProps, {}>;
118
+ export { FloatingActionButtonItem, FloatingActionButtonItemVue2 };