@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.
- package/dist/cdn/js/kendo-vue-buttons.js +1 -1
- package/dist/es/Button.js +1 -1
- package/dist/es/ButtonGroupInterface.js +1 -0
- package/dist/es/ButtonInterface.js +1 -0
- package/dist/es/Chip/Chip.js +1 -1
- package/dist/es/Chip/ChipList.js +1 -1
- package/dist/es/Chip/selection-reducer.js +8 -12
- package/dist/es/FloatingActionButton/FloatingActionButton.js +8 -8
- package/dist/es/FloatingActionButton/FloatingActionButtonItem.js +3 -3
- package/dist/es/FloatingActionButton/interfaces/FloatingActionButtonHandle.js +1 -0
- package/dist/es/FloatingActionButton/interfaces/FloatingActionButtonPopupSettings.js +1 -0
- package/dist/es/FloatingActionButton/interfaces/FloatingActionButtonProps.js +1 -0
- package/dist/es/FloatingActionButton/models/align-offset.js +1 -0
- package/dist/es/FloatingActionButton/models/align.js +1 -0
- package/dist/es/FloatingActionButton/models/events.js +1 -0
- package/dist/es/FloatingActionButton/models/position-mode.js +1 -0
- package/dist/es/FloatingActionButton/models/shape.js +1 -0
- package/dist/es/FloatingActionButton/models/size.js +1 -0
- package/dist/es/FloatingActionButton/models/theme-color.js +1 -0
- package/dist/es/FloatingActionButton/utils.js +2 -2
- package/dist/es/ListButton/ButtonItem.js +1 -1
- package/dist/es/ListButton/DropDownButton.js +8 -8
- package/dist/es/ListButton/SplitButton.js +8 -8
- package/dist/es/ListButton/models/ButtonItemInterface.js +1 -0
- package/dist/es/ListButton/models/ListButtonProps.js +1 -0
- package/dist/es/ListButton/models/PopupSettings.js +1 -0
- package/dist/es/ListButton/models/events.js +1 -0
- package/dist/es/buttonLook.js +1 -0
- package/dist/es/models/index.js +1 -0
- package/dist/es/package-metadata.js +1 -1
- package/dist/es/util.d.ts +3 -3
- package/dist/esm/Button.d.ts +123 -0
- package/dist/esm/Button.js +280 -0
- package/dist/esm/ButtonGroup.d.ts +49 -0
- package/dist/esm/ButtonGroup.js +106 -0
- package/dist/esm/ButtonGroupInterface.d.ts +30 -0
- package/dist/esm/ButtonGroupInterface.js +2 -0
- package/dist/esm/ButtonInterface.d.ts +56 -0
- package/dist/esm/ButtonInterface.js +2 -0
- package/dist/esm/ButtonWrap.d.ts +19 -0
- package/dist/esm/ButtonWrap.js +33 -0
- package/dist/esm/Chip/Chip.d.ts +199 -0
- package/dist/esm/Chip/Chip.js +339 -0
- package/dist/esm/Chip/ChipList.d.ts +174 -0
- package/dist/esm/Chip/ChipList.js +263 -0
- package/dist/esm/Chip/data-reducer.d.ts +21 -0
- package/dist/esm/Chip/data-reducer.js +34 -0
- package/dist/esm/Chip/focus-reducer.d.ts +24 -0
- package/dist/esm/Chip/focus-reducer.js +38 -0
- package/dist/esm/Chip/selection-reducer.d.ts +29 -0
- package/dist/esm/Chip/selection-reducer.js +102 -0
- package/dist/esm/FloatingActionButton/FloatingActionButton.d.ts +49 -0
- package/dist/esm/FloatingActionButton/FloatingActionButton.js +494 -0
- package/dist/esm/FloatingActionButton/FloatingActionButtonItem.d.ts +118 -0
- package/dist/esm/FloatingActionButton/FloatingActionButtonItem.js +121 -0
- package/dist/esm/FloatingActionButton/interfaces/FloatingActionButtonHandle.d.ts +13 -0
- package/dist/esm/FloatingActionButton/interfaces/FloatingActionButtonHandle.js +1 -0
- package/dist/esm/FloatingActionButton/interfaces/FloatingActionButtonPopupSettings.d.ts +24 -0
- package/dist/esm/FloatingActionButton/interfaces/FloatingActionButtonPopupSettings.js +1 -0
- package/dist/esm/FloatingActionButton/interfaces/FloatingActionButtonProps.d.ts +243 -0
- package/dist/esm/FloatingActionButton/interfaces/FloatingActionButtonProps.js +1 -0
- package/dist/esm/FloatingActionButton/models/align-offset.d.ts +20 -0
- package/dist/esm/FloatingActionButton/models/align-offset.js +1 -0
- package/dist/esm/FloatingActionButton/models/align.d.ts +27 -0
- package/dist/esm/FloatingActionButton/models/align.js +1 -0
- package/dist/esm/FloatingActionButton/models/events.d.ts +18 -0
- package/dist/esm/FloatingActionButton/models/events.js +2 -0
- package/dist/esm/FloatingActionButton/models/position-mode.d.ts +9 -0
- package/dist/esm/FloatingActionButton/models/position-mode.js +1 -0
- package/dist/esm/FloatingActionButton/models/shape.d.ts +13 -0
- package/dist/esm/FloatingActionButton/models/shape.js +1 -0
- package/dist/esm/FloatingActionButton/models/size.d.ts +10 -0
- package/dist/esm/FloatingActionButton/models/size.js +1 -0
- package/dist/esm/FloatingActionButton/models/theme-color.d.ts +17 -0
- package/dist/esm/FloatingActionButton/models/theme-color.js +1 -0
- package/dist/esm/FloatingActionButton/utils.d.ts +27 -0
- package/dist/esm/FloatingActionButton/utils.js +93 -0
- package/dist/esm/ListButton/ButtonItem.d.ts +58 -0
- package/dist/esm/ListButton/ButtonItem.js +138 -0
- package/dist/esm/ListButton/DropDownButton.d.ts +66 -0
- package/dist/esm/ListButton/DropDownButton.js +453 -0
- package/dist/esm/ListButton/SplitButton.d.ts +67 -0
- package/dist/esm/ListButton/SplitButton.js +515 -0
- package/dist/esm/ListButton/models/ButtonItemInterface.d.ts +29 -0
- package/dist/esm/ListButton/models/ButtonItemInterface.js +2 -0
- package/dist/esm/ListButton/models/ListButtonProps.d.ts +328 -0
- package/dist/esm/ListButton/models/ListButtonProps.js +2 -0
- package/dist/esm/ListButton/models/PopupSettings.d.ts +24 -0
- package/dist/esm/ListButton/models/PopupSettings.js +1 -0
- package/dist/esm/ListButton/models/events.d.ts +48 -0
- package/dist/esm/ListButton/models/events.js +1 -0
- package/dist/esm/ListButton/utils/navigation.d.ts +5 -0
- package/dist/esm/ListButton/utils/navigation.js +24 -0
- package/dist/esm/ListButton/utils/popup.d.ts +9 -0
- package/dist/esm/ListButton/utils/popup.js +20 -0
- package/dist/esm/additionalTypes.ts +21 -0
- package/dist/esm/buttonLook.d.ts +13 -0
- package/dist/esm/buttonLook.js +1 -0
- package/dist/esm/main.d.ts +30 -0
- package/dist/esm/main.js +15 -0
- package/dist/esm/models/index.d.ts +87 -0
- package/dist/esm/models/index.js +1 -0
- package/dist/esm/package-metadata.d.ts +5 -0
- package/dist/esm/package-metadata.js +11 -0
- package/dist/esm/package.json +3 -0
- package/dist/esm/toolbar/Toolbar.d.ts +112 -0
- package/dist/esm/toolbar/Toolbar.js +208 -0
- package/dist/esm/toolbar/tools/ToolbarItem.d.ts +64 -0
- package/dist/esm/toolbar/tools/ToolbarItem.js +58 -0
- package/dist/esm/toolbar/tools/ToolbarSeparator.d.ts +36 -0
- package/dist/esm/toolbar/tools/ToolbarSeparator.js +56 -0
- package/dist/esm/toolbar/tools/ToolbarSpacer.d.ts +36 -0
- package/dist/esm/toolbar/tools/ToolbarSpacer.js +53 -0
- package/dist/esm/util.d.ts +31 -0
- package/dist/esm/util.js +40 -0
- package/dist/npm/Button.js +5 -5
- package/dist/npm/ButtonGroup.js +4 -4
- package/dist/npm/ButtonWrap.js +1 -1
- package/dist/npm/Chip/Chip.js +10 -10
- package/dist/npm/Chip/ChipList.js +8 -8
- package/dist/npm/Chip/data-reducer.js +4 -2
- package/dist/npm/Chip/focus-reducer.js +4 -2
- package/dist/npm/Chip/selection-reducer.js +12 -14
- package/dist/npm/FloatingActionButton/FloatingActionButton.js +31 -31
- package/dist/npm/FloatingActionButton/FloatingActionButtonItem.js +8 -8
- package/dist/npm/FloatingActionButton/utils.js +14 -9
- package/dist/npm/ListButton/ButtonItem.js +1 -1
- package/dist/npm/ListButton/DropDownButton.js +19 -19
- package/dist/npm/ListButton/SplitButton.js +19 -19
- package/dist/npm/main.js +6 -2
- package/dist/npm/package-metadata.js +1 -1
- package/dist/npm/toolbar/Toolbar.js +2 -2
- package/dist/npm/toolbar/tools/ToolbarItem.js +1 -1
- package/dist/npm/util.d.ts +3 -3
- package/package.json +11 -5
|
@@ -0,0 +1,112 @@
|
|
|
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
|
+
* Represents the `resize` event of the Toolbar.
|
|
8
|
+
*/
|
|
9
|
+
export interface ToolbarResizeEvent {
|
|
10
|
+
/**
|
|
11
|
+
* An event target.
|
|
12
|
+
*/
|
|
13
|
+
target: any;
|
|
14
|
+
/**
|
|
15
|
+
* The `offsetWidth` event of the Toolbar.
|
|
16
|
+
*/
|
|
17
|
+
offsetWidth: number;
|
|
18
|
+
/**
|
|
19
|
+
* The `offsetHeight` event of the Toolbar.
|
|
20
|
+
*/
|
|
21
|
+
offsetHeight: number;
|
|
22
|
+
/**
|
|
23
|
+
* A native DOM event.
|
|
24
|
+
*/
|
|
25
|
+
nativeEvent: any;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Represents the props of the [Kendo UI for Vue Toolbar component]({% slug overview_toolbar %}).
|
|
29
|
+
*/
|
|
30
|
+
export interface ToolbarProps {
|
|
31
|
+
/**
|
|
32
|
+
* Sets additional classes to the Toolbar.
|
|
33
|
+
*/
|
|
34
|
+
className?: string;
|
|
35
|
+
/**
|
|
36
|
+
* Represents the `dir` HTML attribute.
|
|
37
|
+
*/
|
|
38
|
+
dir?: string;
|
|
39
|
+
/**
|
|
40
|
+
* Specifies the `tabIndex` of the Toolbar.
|
|
41
|
+
*/
|
|
42
|
+
tabIndex?: number;
|
|
43
|
+
/**
|
|
44
|
+
* The `resize` event of the Toolbar.
|
|
45
|
+
*/
|
|
46
|
+
onResize?: (event: ToolbarResizeEvent) => void;
|
|
47
|
+
/**
|
|
48
|
+
* If set to `false`, it will turn off the built-in keyboard navigation.
|
|
49
|
+
*/
|
|
50
|
+
keyboardNavigation?: boolean;
|
|
51
|
+
/**
|
|
52
|
+
* @hidden
|
|
53
|
+
*
|
|
54
|
+
* The CSS selectors of the toolbar HTML elements used by built-in keyboard navigation.
|
|
55
|
+
* Each selector needs to point to a focusable element.
|
|
56
|
+
* Defaults to [
|
|
57
|
+
* 'button',
|
|
58
|
+
* '.k-button-group > button',
|
|
59
|
+
* '.k-dropdown > .k-dropdown-wrap',
|
|
60
|
+
* '.k-colorpicker > .k-picker-wrap'
|
|
61
|
+
* ].
|
|
62
|
+
*/
|
|
63
|
+
buttons?: string[];
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* @hidden
|
|
67
|
+
*/
|
|
68
|
+
export interface ToolbarState {
|
|
69
|
+
element: HTMLDivElement | null;
|
|
70
|
+
offsetHeight: number;
|
|
71
|
+
offsetWidth: number;
|
|
72
|
+
currentButtons: Array<HTMLElement>;
|
|
73
|
+
focusedSelector: string;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* @hidden
|
|
77
|
+
*/
|
|
78
|
+
export interface ToolbarComputed {
|
|
79
|
+
[key: string]: any;
|
|
80
|
+
selectors: string[];
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* @hidden
|
|
84
|
+
*/
|
|
85
|
+
export interface ToolbarMethods {
|
|
86
|
+
[key: string]: any;
|
|
87
|
+
focusedIndex: () => number;
|
|
88
|
+
getCurrentButtons: () => HTMLElement[];
|
|
89
|
+
onKeyDown: (e: any) => void;
|
|
90
|
+
onWindowResize: (e: any) => void;
|
|
91
|
+
focusButton: (current: number, next: number) => void;
|
|
92
|
+
setTabIndex: (index: number) => void;
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* @hidden
|
|
96
|
+
*/
|
|
97
|
+
export interface ToolbarData {
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* @hidden
|
|
101
|
+
*/
|
|
102
|
+
export interface ToolbarAll extends Vue2type, ToolbarMethods, ToolbarData, ToolbarComputed, ToolbarState {
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* @hidden
|
|
106
|
+
*/
|
|
107
|
+
declare let ToolbarVue2: ComponentOptions<ToolbarAll, DefaultData<ToolbarData>, DefaultMethods<ToolbarAll>, ToolbarComputed, RecordPropsDefinition<ToolbarProps>>;
|
|
108
|
+
/**
|
|
109
|
+
* @hidden
|
|
110
|
+
*/
|
|
111
|
+
declare const Toolbar: DefineComponent<ToolbarProps, any, ToolbarData, ToolbarComputed, ToolbarMethods, {}, {}, {}, string, ToolbarProps, ToolbarProps, {}>;
|
|
112
|
+
export { Toolbar, ToolbarVue2 };
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
var __assign = this && this.__assign || function () {
|
|
2
|
+
__assign = Object.assign || function (t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
|
|
6
|
+
for (var p in s) {
|
|
7
|
+
if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
return t;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
return __assign.apply(this, arguments);
|
|
15
|
+
}; // @ts-ignore
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
import * as Vue from 'vue';
|
|
19
|
+
var allVue = Vue;
|
|
20
|
+
var gh = allVue.h;
|
|
21
|
+
var isV3 = allVue.version && allVue.version[0] === '3';
|
|
22
|
+
import { Keys, validatePackage, getDefaultSlots } from '@progress/kendo-vue-common';
|
|
23
|
+
import { toolbarButtons, internalButtons } from './../util.js';
|
|
24
|
+
import { packageMetadata } from '../package-metadata.js';
|
|
25
|
+
/**
|
|
26
|
+
* @hidden
|
|
27
|
+
*/
|
|
28
|
+
|
|
29
|
+
var ToolbarVue2 = {
|
|
30
|
+
name: 'KendoToolbar',
|
|
31
|
+
props: {
|
|
32
|
+
tabIndex: {
|
|
33
|
+
type: Number,
|
|
34
|
+
default: 0
|
|
35
|
+
},
|
|
36
|
+
dir: String,
|
|
37
|
+
keyboardNavigation: {
|
|
38
|
+
type: Boolean,
|
|
39
|
+
default: true
|
|
40
|
+
},
|
|
41
|
+
buttons: {
|
|
42
|
+
type: Array,
|
|
43
|
+
default: function _default() {
|
|
44
|
+
return undefined;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
created: function created() {
|
|
49
|
+
this.offsetHeight = 0;
|
|
50
|
+
this.offsetWidth = 0;
|
|
51
|
+
this.currentButtons = [];
|
|
52
|
+
this.focusedSelector = this.selectors.map(function (s) {
|
|
53
|
+
return s + ':focus';
|
|
54
|
+
}).join(',');
|
|
55
|
+
validatePackage(packageMetadata);
|
|
56
|
+
},
|
|
57
|
+
computed: {
|
|
58
|
+
selectors: function selectors() {
|
|
59
|
+
return this.$props.buttons || toolbarButtons;
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
mounted: function mounted() {
|
|
63
|
+
window.addEventListener('resize', this.onWindowResize);
|
|
64
|
+
var element = this.$el;
|
|
65
|
+
|
|
66
|
+
if (element) {
|
|
67
|
+
this.offsetWidth = element.offsetWidth;
|
|
68
|
+
this.offsetHeight = element.offsetHeight;
|
|
69
|
+
|
|
70
|
+
if (this.$props.keyboardNavigation !== false) {
|
|
71
|
+
this.currentButtons = this.getCurrentButtons();
|
|
72
|
+
this.setTabIndex(0);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
updated: function updated() {
|
|
77
|
+
var element = this.$el;
|
|
78
|
+
|
|
79
|
+
if (!element || this.$props.keyboardNavigation === false) {
|
|
80
|
+
return;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
this.currentButtons = this.getCurrentButtons();
|
|
84
|
+
this.setTabIndex(this.focusedIndex());
|
|
85
|
+
},
|
|
86
|
+
destroyed: !!isV3 ? undefined : function () {
|
|
87
|
+
window.removeEventListener('resize', this.onWindowResize);
|
|
88
|
+
this.currentButtons.length = 0;
|
|
89
|
+
},
|
|
90
|
+
// @ts-ignore
|
|
91
|
+
unmounted: function unmounted() {
|
|
92
|
+
window.removeEventListener('resize', this.onWindowResize);
|
|
93
|
+
this.currentButtons.length = 0;
|
|
94
|
+
},
|
|
95
|
+
// @ts-ignore
|
|
96
|
+
setup: !isV3 ? undefined : function () {
|
|
97
|
+
var v3 = !!isV3;
|
|
98
|
+
return {
|
|
99
|
+
v3: v3
|
|
100
|
+
};
|
|
101
|
+
},
|
|
102
|
+
render: function render(createElement) {
|
|
103
|
+
var h = gh || createElement;
|
|
104
|
+
var defaultSlot = getDefaultSlots(this);
|
|
105
|
+
return h("div", {
|
|
106
|
+
"class": 'k-widget k-toolbar',
|
|
107
|
+
role: "toolbar",
|
|
108
|
+
attrs: this.v3 ? undefined : {
|
|
109
|
+
role: "toolbar",
|
|
110
|
+
dir: this.$props.dir
|
|
111
|
+
},
|
|
112
|
+
dir: this.$props.dir,
|
|
113
|
+
onKeydown: this.onKeyDown,
|
|
114
|
+
on: this.v3 ? undefined : {
|
|
115
|
+
"keydown": this.onKeyDown
|
|
116
|
+
}
|
|
117
|
+
}, [defaultSlot]);
|
|
118
|
+
},
|
|
119
|
+
methods: {
|
|
120
|
+
getCurrentButtons: function getCurrentButtons() {
|
|
121
|
+
return this.$el ? Array.from(this.$el.querySelectorAll(this.selectors.join(','))) : [];
|
|
122
|
+
},
|
|
123
|
+
getInternalButtons: function getInternalButtons() {
|
|
124
|
+
return this.$el ? Array.from(this.$el.querySelectorAll(internalButtons)) : [];
|
|
125
|
+
},
|
|
126
|
+
focusedIndex: function focusedIndex() {
|
|
127
|
+
var focused = this.$el && this.$el.querySelector(this.focusedSelector);
|
|
128
|
+
return Math.max(0, this.currentButtons.findIndex(function (e) {
|
|
129
|
+
return e === focused;
|
|
130
|
+
}));
|
|
131
|
+
},
|
|
132
|
+
setTabIndex: function setTabIndex(focusedIndex) {
|
|
133
|
+
var tabIndex = this.$props.tabIndex;
|
|
134
|
+
this.currentButtons.forEach(function (button, index) {
|
|
135
|
+
button.tabIndex = index === focusedIndex ? tabIndex : -1;
|
|
136
|
+
});
|
|
137
|
+
this.getInternalButtons().forEach(function (button) {
|
|
138
|
+
button.tabIndex = -1;
|
|
139
|
+
});
|
|
140
|
+
},
|
|
141
|
+
onKeyDown: function onKeyDown(event) {
|
|
142
|
+
if (this.$props.keyboardNavigation === false) {
|
|
143
|
+
return;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
var target = event.target;
|
|
147
|
+
var arrowKey = event.keyCode === Keys.left || event.keyCode === Keys.right;
|
|
148
|
+
|
|
149
|
+
if (!arrowKey || event.defaultPrevented || this.currentButtons.findIndex(function (b) {
|
|
150
|
+
return b === target;
|
|
151
|
+
}) === -1) {
|
|
152
|
+
return;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
var focusedIndex = this.focusedIndex();
|
|
156
|
+
|
|
157
|
+
if (event.keyCode === Keys.left) {
|
|
158
|
+
this.focusButton(focusedIndex, focusedIndex - 1);
|
|
159
|
+
} else {
|
|
160
|
+
this.focusButton(focusedIndex, focusedIndex + 1);
|
|
161
|
+
}
|
|
162
|
+
},
|
|
163
|
+
focusButton: function focusButton(prevIndex, index) {
|
|
164
|
+
var tabIndex = this.$props.tabIndex;
|
|
165
|
+
var button = this.currentButtons[index];
|
|
166
|
+
|
|
167
|
+
if (button) {
|
|
168
|
+
button.tabIndex = tabIndex;
|
|
169
|
+
button.focus();
|
|
170
|
+
var prevButton = this.currentButtons[prevIndex];
|
|
171
|
+
|
|
172
|
+
if (prevButton) {
|
|
173
|
+
prevButton.tabIndex = -1;
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
},
|
|
177
|
+
onWindowResize: function onWindowResize(event) {
|
|
178
|
+
var element = this.$el;
|
|
179
|
+
|
|
180
|
+
if (!element) {
|
|
181
|
+
return;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
var offsetWidth = element.offsetWidth;
|
|
185
|
+
var offsetHeight = element.offsetHeight;
|
|
186
|
+
|
|
187
|
+
if (this.offsetWidth !== offsetWidth || this.offsetHeight !== offsetHeight) {
|
|
188
|
+
this.offsetWidth = offsetWidth;
|
|
189
|
+
this.offsetHeight = offsetHeight;
|
|
190
|
+
var newSizes = {
|
|
191
|
+
offsetWidth: this.offsetWidth,
|
|
192
|
+
offsetHeight: this.offsetHeight
|
|
193
|
+
};
|
|
194
|
+
this.$emit('resize', __assign(__assign({
|
|
195
|
+
target: this
|
|
196
|
+
}, newSizes), {
|
|
197
|
+
nativeEvent: event
|
|
198
|
+
}));
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
};
|
|
203
|
+
/**
|
|
204
|
+
* @hidden
|
|
205
|
+
*/
|
|
206
|
+
|
|
207
|
+
var Toolbar = ToolbarVue2;
|
|
208
|
+
export { Toolbar, ToolbarVue2 };
|
|
@@ -0,0 +1,64 @@
|
|
|
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
|
+
* @hidden
|
|
8
|
+
*/
|
|
9
|
+
export interface ToolbarItemState {
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* @hidden
|
|
13
|
+
*/
|
|
14
|
+
export interface ToolbarItemComputed {
|
|
15
|
+
[key: string]: any;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* @hidden
|
|
19
|
+
*/
|
|
20
|
+
export interface ToolbarItemMethods {
|
|
21
|
+
[key: string]: any;
|
|
22
|
+
element: () => HTMLSpanElement | null;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* @hidden
|
|
26
|
+
*/
|
|
27
|
+
export interface ToolbarItemData {
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* @hidden
|
|
31
|
+
*/
|
|
32
|
+
export interface ToolbarItemAll extends Vue2type, ToolbarItemMethods, ToolbarItemData, ToolbarItemComputed, ToolbarItemState {
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* @hidden
|
|
36
|
+
*/
|
|
37
|
+
declare let ToolbarItemVue2: ComponentOptions<ToolbarItemAll, DefaultData<ToolbarItemData>, DefaultMethods<ToolbarItemAll>, ToolbarItemComputed, RecordPropsDefinition<{}>>;
|
|
38
|
+
/**
|
|
39
|
+
* Represents the [Kendo UI for Vue ToolbarItem component]({% slug overview_toolbar %}). A container component for the sub-elements of the Toolbar.
|
|
40
|
+
*
|
|
41
|
+
* ```jsx
|
|
42
|
+
* <template>
|
|
43
|
+
* <Toolbar>
|
|
44
|
+
* <ToolbarItem>
|
|
45
|
+
* <ButtonGroup>
|
|
46
|
+
* <Button :icon="'bold'" :title="'Bold'" :togglable="true" />
|
|
47
|
+
* <Button :icon="'italic'" :title="'Italic'" :togglable="true" />
|
|
48
|
+
* <Button :icon="'underline'" :title="'Underline'" :togglable="true" />
|
|
49
|
+
* </ButtonGroup>
|
|
50
|
+
* </ToolbarItem>
|
|
51
|
+
* <ToolbarSpacer />
|
|
52
|
+
* <ToolbarItem>
|
|
53
|
+
* <SplitButton :text="'Insert'" :items="splitItems"> </SplitButton>
|
|
54
|
+
* </ToolbarItem>
|
|
55
|
+
* <ToolbarSeparator />
|
|
56
|
+
* <ToolbarItem>
|
|
57
|
+
* <Button :icon="'cut'" :title="'Cut'"> Cut </Button>
|
|
58
|
+
* </ToolbarItem>
|
|
59
|
+
* </Toolbar>
|
|
60
|
+
* </template>
|
|
61
|
+
* ```
|
|
62
|
+
*/
|
|
63
|
+
declare const ToolbarItem: DefineComponent<{}, any, ToolbarItemData, ToolbarItemComputed, ToolbarItemMethods, {}, {}, {}, string, {}, {}, {}>;
|
|
64
|
+
export { ToolbarItem, ToolbarItemVue2 };
|
|
@@ -0,0 +1,58 @@
|
|
|
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
|
+
import { getDefaultSlots } from '@progress/kendo-vue-common';
|
|
7
|
+
/**
|
|
8
|
+
* @hidden
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
var ToolbarItemVue2 = {
|
|
12
|
+
name: 'KendoToolbarItem',
|
|
13
|
+
methods: {
|
|
14
|
+
element: function element() {
|
|
15
|
+
return this.$el;
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
// @ts-ignore
|
|
19
|
+
setup: !isV3 ? undefined : function () {
|
|
20
|
+
var v3 = !!isV3;
|
|
21
|
+
return {
|
|
22
|
+
v3: v3
|
|
23
|
+
};
|
|
24
|
+
},
|
|
25
|
+
render: function render(createElement) {
|
|
26
|
+
var h = gh || createElement;
|
|
27
|
+
var defaultSlot = getDefaultSlots(this);
|
|
28
|
+
return h("span", [defaultSlot]);
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* Represents the [Kendo UI for Vue ToolbarItem component]({% slug overview_toolbar %}). A container component for the sub-elements of the Toolbar.
|
|
33
|
+
*
|
|
34
|
+
* ```jsx
|
|
35
|
+
* <template>
|
|
36
|
+
* <Toolbar>
|
|
37
|
+
* <ToolbarItem>
|
|
38
|
+
* <ButtonGroup>
|
|
39
|
+
* <Button :icon="'bold'" :title="'Bold'" :togglable="true" />
|
|
40
|
+
* <Button :icon="'italic'" :title="'Italic'" :togglable="true" />
|
|
41
|
+
* <Button :icon="'underline'" :title="'Underline'" :togglable="true" />
|
|
42
|
+
* </ButtonGroup>
|
|
43
|
+
* </ToolbarItem>
|
|
44
|
+
* <ToolbarSpacer />
|
|
45
|
+
* <ToolbarItem>
|
|
46
|
+
* <SplitButton :text="'Insert'" :items="splitItems"> </SplitButton>
|
|
47
|
+
* </ToolbarItem>
|
|
48
|
+
* <ToolbarSeparator />
|
|
49
|
+
* <ToolbarItem>
|
|
50
|
+
* <Button :icon="'cut'" :title="'Cut'"> Cut </Button>
|
|
51
|
+
* </ToolbarItem>
|
|
52
|
+
* </Toolbar>
|
|
53
|
+
* </template>
|
|
54
|
+
* ```
|
|
55
|
+
*/
|
|
56
|
+
|
|
57
|
+
var ToolbarItem = ToolbarItemVue2;
|
|
58
|
+
export { ToolbarItem, ToolbarItemVue2 };
|
|
@@ -0,0 +1,36 @@
|
|
|
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
|
+
* @hidden
|
|
8
|
+
*/
|
|
9
|
+
declare let ToolbarSeparatorVue2: ComponentOptions<Vue2type, DefaultData<{}>, DefaultMethods<{}>, {}, RecordPropsDefinition<{}>>;
|
|
10
|
+
/**
|
|
11
|
+
* Represents the [Kendo UI for Vue ToolbarSeparator component]({% slug overview_toolbar %}). A separator element for the sub-elements of the Toolbar.
|
|
12
|
+
*
|
|
13
|
+
* ```jsx
|
|
14
|
+
* <template>
|
|
15
|
+
* <Toolbar>
|
|
16
|
+
* <ToolbarItem>
|
|
17
|
+
* <ButtonGroup>
|
|
18
|
+
* <Button :icon="'bold'" :title="'Bold'" :togglable="true" />
|
|
19
|
+
* <Button :icon="'italic'" :title="'Italic'" :togglable="true" />
|
|
20
|
+
* <Button :icon="'underline'" :title="'Underline'" :togglable="true" />
|
|
21
|
+
* </ButtonGroup>
|
|
22
|
+
* </ToolbarItem>
|
|
23
|
+
* <ToolbarSpacer />
|
|
24
|
+
* <ToolbarItem>
|
|
25
|
+
* <SplitButton :text="'Insert'" :items="splitItems"> </SplitButton>
|
|
26
|
+
* </ToolbarItem>
|
|
27
|
+
* <ToolbarSeparator />
|
|
28
|
+
* <ToolbarItem>
|
|
29
|
+
* <Button :icon="'cut'" :title="'Cut'"> Cut </Button>
|
|
30
|
+
* </ToolbarItem>
|
|
31
|
+
* </Toolbar>
|
|
32
|
+
* </template>
|
|
33
|
+
* ```
|
|
34
|
+
*/
|
|
35
|
+
declare const ToolbarSeparator: DefineComponent<{}, any, {}, {}, {}, {}, {}, {}, string, {}, {}, {}>;
|
|
36
|
+
export { ToolbarSeparator, ToolbarSeparatorVue2 };
|
|
@@ -0,0 +1,56 @@
|
|
|
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
|
+
import { ToolbarItem } from './ToolbarItem.js';
|
|
7
|
+
/**
|
|
8
|
+
* @hidden
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
var ToolbarSeparatorVue2 = {
|
|
12
|
+
name: 'KendoToolbarItem',
|
|
13
|
+
// @ts-ignore
|
|
14
|
+
setup: !isV3 ? undefined : function () {
|
|
15
|
+
var v3 = !!isV3;
|
|
16
|
+
return {
|
|
17
|
+
v3: v3
|
|
18
|
+
};
|
|
19
|
+
},
|
|
20
|
+
render: function render(createElement) {
|
|
21
|
+
var h = gh || createElement;
|
|
22
|
+
return (// @ts-ignore
|
|
23
|
+
h(ToolbarItem, {
|
|
24
|
+
"class": "k-separator"
|
|
25
|
+
})
|
|
26
|
+
);
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* Represents the [Kendo UI for Vue ToolbarSeparator component]({% slug overview_toolbar %}). A separator element for the sub-elements of the Toolbar.
|
|
31
|
+
*
|
|
32
|
+
* ```jsx
|
|
33
|
+
* <template>
|
|
34
|
+
* <Toolbar>
|
|
35
|
+
* <ToolbarItem>
|
|
36
|
+
* <ButtonGroup>
|
|
37
|
+
* <Button :icon="'bold'" :title="'Bold'" :togglable="true" />
|
|
38
|
+
* <Button :icon="'italic'" :title="'Italic'" :togglable="true" />
|
|
39
|
+
* <Button :icon="'underline'" :title="'Underline'" :togglable="true" />
|
|
40
|
+
* </ButtonGroup>
|
|
41
|
+
* </ToolbarItem>
|
|
42
|
+
* <ToolbarSpacer />
|
|
43
|
+
* <ToolbarItem>
|
|
44
|
+
* <SplitButton :text="'Insert'" :items="splitItems"> </SplitButton>
|
|
45
|
+
* </ToolbarItem>
|
|
46
|
+
* <ToolbarSeparator />
|
|
47
|
+
* <ToolbarItem>
|
|
48
|
+
* <Button :icon="'cut'" :title="'Cut'"> Cut </Button>
|
|
49
|
+
* </ToolbarItem>
|
|
50
|
+
* </Toolbar>
|
|
51
|
+
* </template>
|
|
52
|
+
* ```
|
|
53
|
+
*/
|
|
54
|
+
|
|
55
|
+
var ToolbarSeparator = ToolbarSeparatorVue2;
|
|
56
|
+
export { ToolbarSeparator, ToolbarSeparatorVue2 };
|
|
@@ -0,0 +1,36 @@
|
|
|
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
|
+
* @hidden
|
|
8
|
+
*/
|
|
9
|
+
declare let ToolbarSpacerVue2: ComponentOptions<Vue2type, DefaultData<{}>, DefaultMethods<{}>, {}, RecordPropsDefinition<{}>>;
|
|
10
|
+
/**
|
|
11
|
+
* Represents the [Kendo UI for Vue ToolbarSpacer component]({% slug overview_toolbar %}). A spacer element for the sub-elements of the Toolbar.
|
|
12
|
+
*
|
|
13
|
+
* ```jsx
|
|
14
|
+
* <template>
|
|
15
|
+
* <Toolbar>
|
|
16
|
+
* <ToolbarItem>
|
|
17
|
+
* <ButtonGroup>
|
|
18
|
+
* <Button :icon="'bold'" :title="'Bold'" :togglable="true" />
|
|
19
|
+
* <Button :icon="'italic'" :title="'Italic'" :togglable="true" />
|
|
20
|
+
* <Button :icon="'underline'" :title="'Underline'" :togglable="true" />
|
|
21
|
+
* </ButtonGroup>
|
|
22
|
+
* </ToolbarItem>
|
|
23
|
+
* <ToolbarSpacer />
|
|
24
|
+
* <ToolbarItem>
|
|
25
|
+
* <SplitButton :text="'Insert'" :items="splitItems"> </SplitButton>
|
|
26
|
+
* </ToolbarItem>
|
|
27
|
+
* <ToolbarSeparator />
|
|
28
|
+
* <ToolbarItem>
|
|
29
|
+
* <Button :icon="'cut'" :title="'Cut'"> Cut </Button>
|
|
30
|
+
* </ToolbarItem>
|
|
31
|
+
* </Toolbar>
|
|
32
|
+
* </template>
|
|
33
|
+
* ```
|
|
34
|
+
*/
|
|
35
|
+
declare const ToolbarSpacer: DefineComponent<{}, any, {}, {}, {}, {}, {}, {}, string, {}, {}, {}>;
|
|
36
|
+
export { ToolbarSpacer, ToolbarSpacerVue2 };
|
|
@@ -0,0 +1,53 @@
|
|
|
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
|
+
/**
|
|
7
|
+
* @hidden
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
var ToolbarSpacerVue2 = {
|
|
11
|
+
name: 'KendoToolbarItem',
|
|
12
|
+
// @ts-ignore
|
|
13
|
+
setup: !isV3 ? undefined : function () {
|
|
14
|
+
var v3 = !!isV3;
|
|
15
|
+
return {
|
|
16
|
+
v3: v3
|
|
17
|
+
};
|
|
18
|
+
},
|
|
19
|
+
render: function render(createElement) {
|
|
20
|
+
var h = gh || createElement;
|
|
21
|
+
return h("span", {
|
|
22
|
+
"class": "k-spacer"
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* Represents the [Kendo UI for Vue ToolbarSpacer component]({% slug overview_toolbar %}). A spacer element for the sub-elements of the Toolbar.
|
|
28
|
+
*
|
|
29
|
+
* ```jsx
|
|
30
|
+
* <template>
|
|
31
|
+
* <Toolbar>
|
|
32
|
+
* <ToolbarItem>
|
|
33
|
+
* <ButtonGroup>
|
|
34
|
+
* <Button :icon="'bold'" :title="'Bold'" :togglable="true" />
|
|
35
|
+
* <Button :icon="'italic'" :title="'Italic'" :togglable="true" />
|
|
36
|
+
* <Button :icon="'underline'" :title="'Underline'" :togglable="true" />
|
|
37
|
+
* </ButtonGroup>
|
|
38
|
+
* </ToolbarItem>
|
|
39
|
+
* <ToolbarSpacer />
|
|
40
|
+
* <ToolbarItem>
|
|
41
|
+
* <SplitButton :text="'Insert'" :items="splitItems"> </SplitButton>
|
|
42
|
+
* </ToolbarItem>
|
|
43
|
+
* <ToolbarSeparator />
|
|
44
|
+
* <ToolbarItem>
|
|
45
|
+
* <Button :icon="'cut'" :title="'Cut'"> Cut </Button>
|
|
46
|
+
* </ToolbarItem>
|
|
47
|
+
* </Toolbar>
|
|
48
|
+
* </template>
|
|
49
|
+
* ```
|
|
50
|
+
*/
|
|
51
|
+
|
|
52
|
+
var ToolbarSpacer = ToolbarSpacerVue2;
|
|
53
|
+
export { ToolbarSpacer, ToolbarSpacerVue2 };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @hidden
|
|
3
|
+
*/
|
|
4
|
+
export declare const internalButtons = ".k-dropdownlist > .k-button,.k-colorpicker > .k-button";
|
|
5
|
+
/**
|
|
6
|
+
* @hidden
|
|
7
|
+
*/
|
|
8
|
+
export declare const toolbarButtons: string[];
|
|
9
|
+
/**
|
|
10
|
+
* @hidden
|
|
11
|
+
*/
|
|
12
|
+
declare const _default: {
|
|
13
|
+
styles: {
|
|
14
|
+
button: string;
|
|
15
|
+
flat: string;
|
|
16
|
+
outline: string;
|
|
17
|
+
clear: string;
|
|
18
|
+
primary: string;
|
|
19
|
+
'state-selected': string;
|
|
20
|
+
'button-icon': string;
|
|
21
|
+
'button-icontext': string;
|
|
22
|
+
'state-disabled': string;
|
|
23
|
+
'group-start': string;
|
|
24
|
+
'group-end': string;
|
|
25
|
+
'button-group': string;
|
|
26
|
+
'button-group-stretched': string;
|
|
27
|
+
ltr: string;
|
|
28
|
+
rtl: string;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
export default _default;
|
package/dist/esm/util.js
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @hidden
|
|
3
|
+
*/
|
|
4
|
+
var styles = {
|
|
5
|
+
button: 'k-button',
|
|
6
|
+
'flat': 'k-flat',
|
|
7
|
+
'outline': 'k-outline',
|
|
8
|
+
'clear': 'k-button-clear',
|
|
9
|
+
'primary': 'k-primary',
|
|
10
|
+
'state-selected': 'k-selected',
|
|
11
|
+
'button-icon': 'k-button-icon',
|
|
12
|
+
'button-icontext': 'k-button-icontext',
|
|
13
|
+
'state-disabled': 'k-disabled',
|
|
14
|
+
'group-start': 'k-group-start',
|
|
15
|
+
'group-end': 'k-group-end',
|
|
16
|
+
'button-group': 'k-button-group',
|
|
17
|
+
'button-group-stretched': 'k-button-group-stretched',
|
|
18
|
+
'ltr': 'k-ltr',
|
|
19
|
+
'rtl': 'k-rtl'
|
|
20
|
+
};
|
|
21
|
+
var notInternalButton = ':not(.k-dropdownlist > .k-button):not(.k-colorpicker > .k-button)';
|
|
22
|
+
/**
|
|
23
|
+
* @hidden
|
|
24
|
+
*/
|
|
25
|
+
export var internalButtons = '.k-dropdownlist > .k-button,.k-colorpicker > .k-button';
|
|
26
|
+
/**
|
|
27
|
+
* @hidden
|
|
28
|
+
*/
|
|
29
|
+
export var toolbarButtons = [
|
|
30
|
+
'button' + notInternalButton,
|
|
31
|
+
'.k-button-group > button',
|
|
32
|
+
'.k-dropdownlist',
|
|
33
|
+
'.k-colorpicker'
|
|
34
|
+
];
|
|
35
|
+
/**
|
|
36
|
+
* @hidden
|
|
37
|
+
*/
|
|
38
|
+
export default {
|
|
39
|
+
styles: styles
|
|
40
|
+
};
|