@progress/kendo-vue-inputs 3.4.0 → 3.4.2-dev.202207070519
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-inputs.js +1 -1
- package/dist/es/checkbox/Checkbox.js +9 -12
- package/dist/es/colors/ColorContrastLabels.d.ts +49 -0
- package/dist/es/colors/ColorContrastLabels.js +80 -0
- package/dist/es/colors/ColorContrastSvg.d.ts +50 -0
- package/dist/es/colors/ColorContrastSvg.js +109 -0
- package/dist/es/colors/ColorGradient.d.ts +51 -0
- package/dist/es/colors/ColorGradient.js +408 -0
- package/dist/es/colors/ColorInput.d.ts +54 -0
- package/dist/es/colors/ColorInput.js +269 -0
- package/dist/es/colors/ColorPalette.js +9 -12
- package/dist/es/colors/ColorPicker.js +5 -4
- package/dist/es/colors/FlatColorPicker.d.ts +103 -0
- package/dist/es/colors/FlatColorPicker.js +295 -0
- package/dist/es/colors/HexInput.d.ts +51 -0
- package/dist/es/colors/HexInput.js +72 -0
- package/dist/es/colors/Picker.js +3 -2
- package/dist/es/colors/interfaces/ColorGradientChangeEvent.d.ts +9 -0
- package/dist/es/colors/interfaces/ColorGradientChangeEvent.js +0 -0
- package/dist/es/colors/interfaces/ColorGradientProps.d.ts +56 -0
- package/dist/es/colors/interfaces/ColorGradientProps.js +0 -0
- package/dist/es/input/Input.js +3 -2
- package/dist/es/input-separator/InputSeparator.js +3 -2
- package/dist/es/main.d.ts +1 -0
- package/dist/es/main.js +1 -0
- package/dist/es/maskedtextbox/MaskedTextBox.js +21 -24
- package/dist/es/messages/index.d.ts +15 -0
- package/dist/es/messages/index.js +15 -0
- package/dist/es/numerictextbox/NumericTextBox.d.ts +4 -0
- package/dist/es/numerictextbox/NumericTextBox.js +16 -19
- package/dist/es/package-metadata.js +1 -1
- package/dist/es/radiobutton/RadioButton.js +8 -11
- package/dist/es/radiobutton/RadioGroup.js +3 -2
- package/dist/es/range-slider/RangeSlider.js +13 -12
- package/dist/es/slider/Slider.d.ts +4 -0
- package/dist/es/slider/Slider.js +5 -4
- package/dist/es/slider/SliderLabel.js +3 -2
- package/dist/es/switch/Switch.js +14 -19
- package/dist/es/textarea/TextArea.js +3 -2
- package/dist/npm/checkbox/Checkbox.js +8 -11
- package/dist/npm/colors/ColorContrastLabels.d.ts +49 -0
- package/dist/npm/colors/ColorContrastLabels.js +92 -0
- package/dist/npm/colors/ColorContrastSvg.d.ts +50 -0
- package/dist/npm/colors/ColorContrastSvg.js +120 -0
- package/dist/npm/colors/ColorGradient.d.ts +51 -0
- package/dist/npm/colors/ColorGradient.js +427 -0
- package/dist/npm/colors/ColorInput.d.ts +54 -0
- package/dist/npm/colors/ColorInput.js +284 -0
- package/dist/npm/colors/ColorPalette.js +8 -11
- package/dist/npm/colors/ColorPicker.js +5 -4
- package/dist/npm/colors/FlatColorPicker.d.ts +103 -0
- package/dist/npm/colors/FlatColorPicker.js +310 -0
- package/dist/npm/colors/HexInput.d.ts +51 -0
- package/dist/npm/colors/HexInput.js +84 -0
- package/dist/npm/colors/Picker.js +3 -2
- package/dist/npm/colors/interfaces/ColorGradientChangeEvent.d.ts +9 -0
- package/dist/npm/colors/interfaces/ColorGradientChangeEvent.js +2 -0
- package/dist/npm/colors/interfaces/ColorGradientProps.d.ts +56 -0
- package/dist/npm/colors/interfaces/ColorGradientProps.js +2 -0
- package/dist/npm/input/Input.js +3 -2
- package/dist/npm/input-separator/InputSeparator.js +3 -2
- package/dist/npm/main.d.ts +1 -0
- package/dist/npm/main.js +1 -0
- package/dist/npm/maskedtextbox/MaskedTextBox.js +20 -23
- package/dist/npm/messages/index.d.ts +15 -0
- package/dist/npm/messages/index.js +16 -1
- package/dist/npm/numerictextbox/NumericTextBox.d.ts +4 -0
- package/dist/npm/numerictextbox/NumericTextBox.js +15 -18
- package/dist/npm/package-metadata.js +1 -1
- package/dist/npm/radiobutton/RadioButton.js +7 -10
- package/dist/npm/radiobutton/RadioGroup.js +3 -2
- package/dist/npm/range-slider/RangeSlider.js +13 -12
- package/dist/npm/slider/Slider.d.ts +4 -0
- package/dist/npm/slider/Slider.js +5 -4
- package/dist/npm/slider/SliderLabel.js +3 -2
- package/dist/npm/switch/Switch.js +13 -18
- package/dist/npm/textarea/TextArea.js +3 -2
- package/package.json +11 -11
|
@@ -0,0 +1,310 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.FlatColorPickerVue2 = exports.FlatColorPicker = void 0; // @ts-ignore
|
|
7
|
+
|
|
8
|
+
var Vue = require("vue");
|
|
9
|
+
|
|
10
|
+
var allVue = Vue;
|
|
11
|
+
var gh = allVue.h;
|
|
12
|
+
var isV3 = allVue.version[0] === '3';
|
|
13
|
+
|
|
14
|
+
var kendo_vue_common_1 = require("@progress/kendo-vue-common");
|
|
15
|
+
|
|
16
|
+
var kendo_vue_buttons_1 = require("@progress/kendo-vue-buttons");
|
|
17
|
+
|
|
18
|
+
var ColorPalette_1 = require("./ColorPalette");
|
|
19
|
+
|
|
20
|
+
var ColorGradient_1 = require("./ColorGradient");
|
|
21
|
+
|
|
22
|
+
var package_metadata_1 = require("../package-metadata");
|
|
23
|
+
|
|
24
|
+
var messages_1 = require("../messages");
|
|
25
|
+
/**
|
|
26
|
+
* @hidden
|
|
27
|
+
*/
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
var FlatColorPickerVue2 = {
|
|
31
|
+
name: 'KendoFlatColorPicker',
|
|
32
|
+
created: function created() {
|
|
33
|
+
kendo_vue_common_1.validatePackage(package_metadata_1.packageMetadata);
|
|
34
|
+
},
|
|
35
|
+
props: {
|
|
36
|
+
value: String,
|
|
37
|
+
tabIndex: Number,
|
|
38
|
+
disabled: Boolean,
|
|
39
|
+
view: {
|
|
40
|
+
type: String,
|
|
41
|
+
validator: function validator(value) {
|
|
42
|
+
return ['ColorGradient', 'ColorPalette'].includes(value);
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
header: [String, Object, Function, Boolean],
|
|
46
|
+
showClearButton: {
|
|
47
|
+
type: Boolean,
|
|
48
|
+
default: true
|
|
49
|
+
},
|
|
50
|
+
showPreview: {
|
|
51
|
+
type: Boolean,
|
|
52
|
+
default: true
|
|
53
|
+
},
|
|
54
|
+
showButtons: {
|
|
55
|
+
type: Boolean,
|
|
56
|
+
default: true
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
computed: {
|
|
60
|
+
isColorGradient: function isColorGradient() {
|
|
61
|
+
return this.view ? this.view === 'ColorGradient' : this.currentView === 'ColorGradient';
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
data: function data() {
|
|
65
|
+
return {
|
|
66
|
+
currentView: 'ColorGradient',
|
|
67
|
+
colorValue: 'rgba(255, 255, 255, 1)',
|
|
68
|
+
prevColor: 'rgba(255, 255, 255, 1)'
|
|
69
|
+
};
|
|
70
|
+
},
|
|
71
|
+
// @ts-ignore
|
|
72
|
+
setup: !isV3 ? undefined : function () {
|
|
73
|
+
var v3 = !!isV3;
|
|
74
|
+
return {
|
|
75
|
+
v3: v3
|
|
76
|
+
};
|
|
77
|
+
},
|
|
78
|
+
// @ts-ignore
|
|
79
|
+
render: function render(createElement) {
|
|
80
|
+
var _this = this;
|
|
81
|
+
|
|
82
|
+
var h = gh || createElement;
|
|
83
|
+
return h("div", {
|
|
84
|
+
tabindex: kendo_vue_common_1.getTabIndex(this.$props.tabIndex, this.$props.disabled),
|
|
85
|
+
attrs: this.v3 ? undefined : {
|
|
86
|
+
tabindex: kendo_vue_common_1.getTabIndex(this.$props.tabIndex, this.$props.disabled)
|
|
87
|
+
},
|
|
88
|
+
"class": kendo_vue_common_1.classNames('k-flatcolorpicker k-coloreditor', {
|
|
89
|
+
'k-disabled': this.$props.disabled
|
|
90
|
+
}),
|
|
91
|
+
onBlur: this.handleFlatColorPickerBlur,
|
|
92
|
+
on: this.v3 ? undefined : {
|
|
93
|
+
"blur": this.handleFlatColorPickerBlur
|
|
94
|
+
}
|
|
95
|
+
}, [this.$props.header || h("div", {
|
|
96
|
+
"class": "k-coloreditor-header k-hstack"
|
|
97
|
+
}, [h("div", {
|
|
98
|
+
"class": "k-coloreditor-header-actions k-hstack"
|
|
99
|
+
}, [// @ts-ignore function children
|
|
100
|
+
h(kendo_vue_buttons_1.ButtonGroup, this.v3 ? function () {
|
|
101
|
+
return [// @ts-ignore function children
|
|
102
|
+
h(kendo_vue_buttons_1.Button, {
|
|
103
|
+
type: "button",
|
|
104
|
+
attrs: _this.v3 ? undefined : {
|
|
105
|
+
type: "button",
|
|
106
|
+
togglable: true,
|
|
107
|
+
fillMode: 'flat',
|
|
108
|
+
selected: _this.colorGradientView
|
|
109
|
+
},
|
|
110
|
+
togglable: true,
|
|
111
|
+
fillMode: 'flat',
|
|
112
|
+
selected: _this.colorGradientView
|
|
113
|
+
}, _this.v3 ? function () {
|
|
114
|
+
return [h("span", {
|
|
115
|
+
"class": "k-icon k-i-color-canvas"
|
|
116
|
+
})];
|
|
117
|
+
} : [h("span", {
|
|
118
|
+
"class": "k-icon k-i-color-canvas"
|
|
119
|
+
})]), // @ts-ignore function children
|
|
120
|
+
h(kendo_vue_buttons_1.Button, {
|
|
121
|
+
type: "button",
|
|
122
|
+
attrs: _this.v3 ? undefined : {
|
|
123
|
+
type: "button",
|
|
124
|
+
togglable: true,
|
|
125
|
+
fillMode: 'flat',
|
|
126
|
+
selected: !_this.colorGradientView
|
|
127
|
+
},
|
|
128
|
+
togglable: true,
|
|
129
|
+
fillMode: 'flat',
|
|
130
|
+
selected: !_this.colorGradientView
|
|
131
|
+
}, _this.v3 ? function () {
|
|
132
|
+
return [h("span", {
|
|
133
|
+
"class": "k-icon k-i-palette"
|
|
134
|
+
})];
|
|
135
|
+
} : [h("span", {
|
|
136
|
+
"class": "k-icon k-i-palette"
|
|
137
|
+
})])];
|
|
138
|
+
} : [h(kendo_vue_buttons_1.Button, {
|
|
139
|
+
type: "button",
|
|
140
|
+
attrs: _this.v3 ? undefined : {
|
|
141
|
+
type: "button",
|
|
142
|
+
togglable: true,
|
|
143
|
+
fillMode: 'flat',
|
|
144
|
+
selected: _this.colorGradientView
|
|
145
|
+
},
|
|
146
|
+
togglable: true,
|
|
147
|
+
fillMode: 'flat',
|
|
148
|
+
selected: _this.colorGradientView
|
|
149
|
+
}, _this.v3 ? function () {
|
|
150
|
+
return [h("span", {
|
|
151
|
+
"class": "k-icon k-i-color-canvas"
|
|
152
|
+
})];
|
|
153
|
+
} : [h("span", {
|
|
154
|
+
"class": "k-icon k-i-color-canvas"
|
|
155
|
+
})]), h(kendo_vue_buttons_1.Button, {
|
|
156
|
+
type: "button",
|
|
157
|
+
attrs: _this.v3 ? undefined : {
|
|
158
|
+
type: "button",
|
|
159
|
+
togglable: true,
|
|
160
|
+
fillMode: 'flat',
|
|
161
|
+
selected: !_this.colorGradientView
|
|
162
|
+
},
|
|
163
|
+
togglable: true,
|
|
164
|
+
fillMode: 'flat',
|
|
165
|
+
selected: !_this.colorGradientView
|
|
166
|
+
}, _this.v3 ? function () {
|
|
167
|
+
return [h("span", {
|
|
168
|
+
"class": "k-icon k-i-palette"
|
|
169
|
+
})];
|
|
170
|
+
} : [h("span", {
|
|
171
|
+
"class": "k-icon k-i-palette"
|
|
172
|
+
})])])]), h("div", {
|
|
173
|
+
"class": "k-spacer"
|
|
174
|
+
}), h("div", {
|
|
175
|
+
"class": "k-coloreditor-header-actions k-hstack"
|
|
176
|
+
}, [this.$props.showClearButton && // @ts-ignore function children
|
|
177
|
+
h(kendo_vue_buttons_1.Button, {
|
|
178
|
+
type: "button",
|
|
179
|
+
attrs: this.v3 ? undefined : {
|
|
180
|
+
type: "button",
|
|
181
|
+
fillMode: 'flat'
|
|
182
|
+
},
|
|
183
|
+
fillMode: 'flat',
|
|
184
|
+
onClick: this.handleResetColor,
|
|
185
|
+
on: this.v3 ? undefined : {
|
|
186
|
+
"click": this.handleResetColor
|
|
187
|
+
}
|
|
188
|
+
}, this.v3 ? function () {
|
|
189
|
+
return [h("span", {
|
|
190
|
+
"class": "k-icon k-i-reset-color"
|
|
191
|
+
})];
|
|
192
|
+
} : [h("span", {
|
|
193
|
+
"class": "k-icon k-i-reset-color"
|
|
194
|
+
})]), this.$props.showPreview && defaultProps.showPreview && h("div", {
|
|
195
|
+
"class": "k-coloreditor-preview k-vstack"
|
|
196
|
+
}, [h("span", {
|
|
197
|
+
"class": "k-coloreditor-preview-color k-color-preview",
|
|
198
|
+
style: {
|
|
199
|
+
background: this.colorValue
|
|
200
|
+
}
|
|
201
|
+
}), h("span", {
|
|
202
|
+
"class": "k-coloreditor-current-color k-color-preview",
|
|
203
|
+
style: {
|
|
204
|
+
background: this.prevColor
|
|
205
|
+
},
|
|
206
|
+
onClick: this.handlePrevColorClick,
|
|
207
|
+
on: this.v3 ? undefined : {
|
|
208
|
+
"click": this.handlePrevColorClick
|
|
209
|
+
}
|
|
210
|
+
})])])]), h("div", {
|
|
211
|
+
"class": "k-coloreditor-views k-vstack"
|
|
212
|
+
}, [this.isColorGradient ? h(ColorGradient_1.ColorGradient, {
|
|
213
|
+
// ref={colorGradientRef}
|
|
214
|
+
value: this.colorValue,
|
|
215
|
+
attrs: this.v3 ? undefined : {
|
|
216
|
+
value: this.colorValue
|
|
217
|
+
},
|
|
218
|
+
onChange: this.handleColorChange,
|
|
219
|
+
on: this.v3 ? undefined : {
|
|
220
|
+
"change": this.handleColorChange,
|
|
221
|
+
"focus": this.handleFocus
|
|
222
|
+
},
|
|
223
|
+
onFocus: this.handleFocus
|
|
224
|
+
}) : h(ColorPalette_1.ColorPalette, {
|
|
225
|
+
value: this.colorValue,
|
|
226
|
+
attrs: this.v3 ? undefined : {
|
|
227
|
+
value: this.colorValue
|
|
228
|
+
},
|
|
229
|
+
onChange: this.handleColorChange,
|
|
230
|
+
on: this.v3 ? undefined : {
|
|
231
|
+
"change": this.handleColorChange,
|
|
232
|
+
"focus": this.handleFocus
|
|
233
|
+
},
|
|
234
|
+
onFocus: this.handleFocus
|
|
235
|
+
})]), this.$props.showButtons && defaultProps.showButtons && h("div", {
|
|
236
|
+
"class": "k-coloreditor-footer k-actions k-actions-end"
|
|
237
|
+
}, [// @ts-ignore function children
|
|
238
|
+
h(kendo_vue_buttons_1.Button, {
|
|
239
|
+
type: "button",
|
|
240
|
+
attrs: this.v3 ? undefined : {
|
|
241
|
+
type: "button"
|
|
242
|
+
},
|
|
243
|
+
"class": "k-coloreditor-cancel",
|
|
244
|
+
onClick: this.handleCancelBtnClick,
|
|
245
|
+
on: this.v3 ? undefined : {
|
|
246
|
+
"click": this.handleCancelBtnClick
|
|
247
|
+
}
|
|
248
|
+
}, this.v3 ? function () {
|
|
249
|
+
return [messages_1.messages[messages_1.flatColorPickerCancelBtn]];
|
|
250
|
+
} : [messages_1.messages[messages_1.flatColorPickerCancelBtn]]), // @ts-ignore function children
|
|
251
|
+
h(kendo_vue_buttons_1.Button, {
|
|
252
|
+
type: "button",
|
|
253
|
+
attrs: this.v3 ? undefined : {
|
|
254
|
+
type: "button"
|
|
255
|
+
},
|
|
256
|
+
"class": "k-coloreditor-apply k-primary",
|
|
257
|
+
onClick: this.handleApplyBtnClick,
|
|
258
|
+
on: this.v3 ? undefined : {
|
|
259
|
+
"click": this.handleApplyBtnClick
|
|
260
|
+
}
|
|
261
|
+
}, this.v3 ? function () {
|
|
262
|
+
return [messages_1.messages[messages_1.flatColorPickerApplyBtn]];
|
|
263
|
+
} : [messages_1.messages[messages_1.flatColorPickerApplyBtn]])])]);
|
|
264
|
+
},
|
|
265
|
+
methods: {
|
|
266
|
+
focus: function focus() {
|
|
267
|
+
if (this.$el) {
|
|
268
|
+
this.$el.focus();
|
|
269
|
+
}
|
|
270
|
+
},
|
|
271
|
+
handleViewChange: function handleViewChange(viewType) {
|
|
272
|
+
this.currentView = viewType;
|
|
273
|
+
},
|
|
274
|
+
handleResetColor: function handleResetColor() {
|
|
275
|
+
this.colorValue = 'rgba(255, 255, 255, 1)';
|
|
276
|
+
},
|
|
277
|
+
handleColorChange: function handleColorChange(event) {
|
|
278
|
+
this.colorValue = event.value;
|
|
279
|
+
},
|
|
280
|
+
handleApplyBtnClick: function handleApplyBtnClick() {
|
|
281
|
+
this.prevColor = this.colorValue;
|
|
282
|
+
},
|
|
283
|
+
handleCancelBtnClick: function handleCancelBtnClick() {
|
|
284
|
+
this.prevColor = 'rgba(255, 255, 255, 1)';
|
|
285
|
+
},
|
|
286
|
+
handlePrevColorClick: function handlePrevColorClick() {
|
|
287
|
+
this.colorValue = this.prevColor;
|
|
288
|
+
},
|
|
289
|
+
handleFocus: function handleFocus() {
|
|
290
|
+
if (this.$el) {
|
|
291
|
+
this.$el.focus();
|
|
292
|
+
}
|
|
293
|
+
},
|
|
294
|
+
handleFlatColorPickerBlur: function handleFlatColorPickerBlur() {
|
|
295
|
+
this.prevColor(this.colorValue);
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
};
|
|
299
|
+
exports.FlatColorPickerVue2 = FlatColorPickerVue2;
|
|
300
|
+
var defaultProps = {
|
|
301
|
+
showClearButton: true,
|
|
302
|
+
showPreview: true,
|
|
303
|
+
showButtons: true
|
|
304
|
+
};
|
|
305
|
+
/**
|
|
306
|
+
* @hidden
|
|
307
|
+
*/
|
|
308
|
+
|
|
309
|
+
var FlatColorPicker = FlatColorPickerVue2;
|
|
310
|
+
exports.FlatColorPicker = FlatColorPicker;
|
|
@@ -0,0 +1,51 @@
|
|
|
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 HexInputProps {
|
|
10
|
+
hex: string;
|
|
11
|
+
onHexChange?: any;
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* @hidden
|
|
16
|
+
*/
|
|
17
|
+
export interface HexInputState {
|
|
18
|
+
originalHex: string;
|
|
19
|
+
hex: string;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* @hidden
|
|
23
|
+
*/
|
|
24
|
+
export interface HexInputComputed {
|
|
25
|
+
[key: string]: any;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* @hidden
|
|
29
|
+
*/
|
|
30
|
+
export interface HexInputMethods {
|
|
31
|
+
[key: string]: any;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* @hidden
|
|
35
|
+
*/
|
|
36
|
+
export interface HexInputData {
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* @hidden
|
|
40
|
+
*/
|
|
41
|
+
export interface HexInputAll extends Vue2type, HexInputMethods, HexInputData, HexInputComputed, HexInputState {
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* @hidden
|
|
45
|
+
*/
|
|
46
|
+
declare let HexInputVue2: ComponentOptions<HexInputAll, DefaultData<HexInputData>, DefaultMethods<HexInputAll>, HexInputComputed, RecordPropsDefinition<HexInputProps>>;
|
|
47
|
+
/**
|
|
48
|
+
* @hidden
|
|
49
|
+
*/
|
|
50
|
+
declare const HexInput: DefineComponent<HexInputProps, any, HexInputData, HexInputComputed, HexInputMethods, {}, {}, {}, string, HexInputProps, HexInputProps, {}>;
|
|
51
|
+
export { HexInput, HexInputVue2 };
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.HexInputVue2 = exports.HexInput = void 0; // @ts-ignore
|
|
7
|
+
|
|
8
|
+
var Vue = require("vue");
|
|
9
|
+
|
|
10
|
+
var allVue = Vue;
|
|
11
|
+
var gh = allVue.h;
|
|
12
|
+
var isV3 = allVue.version[0] === '3';
|
|
13
|
+
|
|
14
|
+
var color_parser_1 = require("./utils/color-parser");
|
|
15
|
+
|
|
16
|
+
var misc_1 = require("./utils/misc");
|
|
17
|
+
|
|
18
|
+
var Input_1 = require("../input/Input");
|
|
19
|
+
/**
|
|
20
|
+
* @hidden
|
|
21
|
+
*/
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
var HexInputVue2 = {
|
|
25
|
+
name: 'KendoHexInput',
|
|
26
|
+
props: {
|
|
27
|
+
hex: String,
|
|
28
|
+
disabled: Boolean
|
|
29
|
+
},
|
|
30
|
+
data: function data() {
|
|
31
|
+
return {
|
|
32
|
+
hex: this.$props.hex,
|
|
33
|
+
originalHex: this.$props.hex
|
|
34
|
+
};
|
|
35
|
+
},
|
|
36
|
+
// @ts-ignore
|
|
37
|
+
setup: !isV3 ? undefined : function () {
|
|
38
|
+
var v3 = !!isV3;
|
|
39
|
+
return {
|
|
40
|
+
v3: v3
|
|
41
|
+
};
|
|
42
|
+
},
|
|
43
|
+
// @ts-ignore
|
|
44
|
+
render: function render(createElement) {
|
|
45
|
+
var h = gh || createElement;
|
|
46
|
+
return h(Input_1.Input, {
|
|
47
|
+
value: this.hex,
|
|
48
|
+
attrs: this.v3 ? undefined : {
|
|
49
|
+
value: this.hex,
|
|
50
|
+
disabled: this.$props.disabled
|
|
51
|
+
},
|
|
52
|
+
onChange: this.onChange,
|
|
53
|
+
on: this.v3 ? undefined : {
|
|
54
|
+
"change": this.onChange,
|
|
55
|
+
"blur": this.onBlur
|
|
56
|
+
},
|
|
57
|
+
onBlur: this.onBlur,
|
|
58
|
+
disabled: this.$props.disabled
|
|
59
|
+
});
|
|
60
|
+
},
|
|
61
|
+
methods: {
|
|
62
|
+
onChange: function onChange(event) {
|
|
63
|
+
var hex = event.target.value;
|
|
64
|
+
var value = color_parser_1.parseColor(hex, 'rgba');
|
|
65
|
+
this.hex = hex;
|
|
66
|
+
|
|
67
|
+
if (misc_1.isPresent(value)) {
|
|
68
|
+
this.$props.onHexChange(hex, value, event);
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
onBlur: function onBlur() {
|
|
72
|
+
if (!misc_1.isPresent(color_parser_1.parseColor(this.hex, 'rgba'))) {
|
|
73
|
+
this.hex = this.originalHex;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
exports.HexInputVue2 = HexInputVue2;
|
|
79
|
+
/**
|
|
80
|
+
* @hidden
|
|
81
|
+
*/
|
|
82
|
+
|
|
83
|
+
var HexInput = HexInputVue2;
|
|
84
|
+
exports.HexInput = HexInput;
|
|
@@ -9,6 +9,7 @@ var Vue = require("vue");
|
|
|
9
9
|
|
|
10
10
|
var allVue = Vue;
|
|
11
11
|
var gh = allVue.h;
|
|
12
|
+
var isV3 = allVue.version[0] === '3';
|
|
12
13
|
|
|
13
14
|
var kendo_vue_popup_1 = require("@progress/kendo-vue-popup");
|
|
14
15
|
|
|
@@ -54,8 +55,8 @@ var PickerVue2 = {
|
|
|
54
55
|
}
|
|
55
56
|
},
|
|
56
57
|
// @ts-ignore
|
|
57
|
-
setup: !
|
|
58
|
-
var v3 = !!
|
|
58
|
+
setup: !isV3 ? undefined : function () {
|
|
59
|
+
var v3 = !!isV3;
|
|
59
60
|
return {
|
|
60
61
|
v3: v3
|
|
61
62
|
};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { ColorGradientChangeEvent } from './ColorGradientChangeEvent';
|
|
2
|
+
/**
|
|
3
|
+
* Represents the props of the [KendoReact ColorGradient component]({% slug overview_colorgradient %}).
|
|
4
|
+
*/
|
|
5
|
+
export interface ColorGradientProps {
|
|
6
|
+
/**
|
|
7
|
+
* The default value of the ColorGradient.
|
|
8
|
+
*/
|
|
9
|
+
defaultValue?: string;
|
|
10
|
+
/**
|
|
11
|
+
* The value of the ColorGradient.
|
|
12
|
+
*/
|
|
13
|
+
value?: string;
|
|
14
|
+
/**
|
|
15
|
+
* Determines the event handler that will be fired when the user edits the value.
|
|
16
|
+
*/
|
|
17
|
+
onChange?: (event: ColorGradientChangeEvent) => void;
|
|
18
|
+
/**
|
|
19
|
+
* Represents the focus event.
|
|
20
|
+
*/
|
|
21
|
+
onFocus?: (event: any) => void;
|
|
22
|
+
/**
|
|
23
|
+
* Determines whether the alpha slider and the alpha input will be displayed. Defaults to `true`.
|
|
24
|
+
*/
|
|
25
|
+
opacity?: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* Enables the color contrast tool.
|
|
28
|
+
* Sets the background color that will be compared to the selected value.
|
|
29
|
+
* The tool will calculate the contrast ratio between two colors.
|
|
30
|
+
* Currently, only the RGBA format is supported.
|
|
31
|
+
*/
|
|
32
|
+
backgroundColor?: string;
|
|
33
|
+
/**
|
|
34
|
+
* Determines whether the ColorGradient is disabled
|
|
35
|
+
* ([more information and example]({% slug disabled_colorgradient %})).
|
|
36
|
+
*
|
|
37
|
+
*/
|
|
38
|
+
disabled?: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* Sets the `tabIndex` property of the ColorGradient.
|
|
41
|
+
*/
|
|
42
|
+
tabIndex?: number;
|
|
43
|
+
/**
|
|
44
|
+
* Specifies the id of the component.
|
|
45
|
+
*/
|
|
46
|
+
id?: string;
|
|
47
|
+
/**
|
|
48
|
+
* Identifies the element(s) which will describe the component, similar to [HTML aria-describedby attribute](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-describedby_attribute).
|
|
49
|
+
* For example these elements could contain error or hint message.
|
|
50
|
+
*/
|
|
51
|
+
ariaDescribedBy?: string;
|
|
52
|
+
/**
|
|
53
|
+
* Identifies the element(s) which will label the component.
|
|
54
|
+
*/
|
|
55
|
+
ariaLabelledBy?: string;
|
|
56
|
+
}
|
package/dist/npm/input/Input.js
CHANGED
|
@@ -25,6 +25,7 @@ var Vue = require("vue");
|
|
|
25
25
|
|
|
26
26
|
var allVue = Vue;
|
|
27
27
|
var gh = allVue.h;
|
|
28
|
+
var isV3 = allVue.version[0] === '3';
|
|
28
29
|
var ref = allVue.ref;
|
|
29
30
|
|
|
30
31
|
var kendo_vue_common_1 = require("@progress/kendo-vue-common");
|
|
@@ -149,8 +150,8 @@ var InputVue2 = {
|
|
|
149
150
|
this.setValidity();
|
|
150
151
|
},
|
|
151
152
|
// @ts-ignore
|
|
152
|
-
setup: !
|
|
153
|
-
var v3 = !!
|
|
153
|
+
setup: !isV3 ? undefined : function () {
|
|
154
|
+
var v3 = !!isV3;
|
|
154
155
|
var inputRef = ref(null);
|
|
155
156
|
return {
|
|
156
157
|
v3: v3,
|
|
@@ -11,6 +11,7 @@ var Vue = require("vue");
|
|
|
11
11
|
|
|
12
12
|
var allVue = Vue;
|
|
13
13
|
var gh = allVue.h;
|
|
14
|
+
var isV3 = allVue.version[0] === '3';
|
|
14
15
|
var ref = allVue.ref;
|
|
15
16
|
|
|
16
17
|
var package_metadata_1 = require("../package-metadata");
|
|
@@ -24,8 +25,8 @@ var InputSeparatorVue2 = {
|
|
|
24
25
|
kendo_licensing_1.validatePackage(package_metadata_1.packageMetadata);
|
|
25
26
|
},
|
|
26
27
|
// @ts-ignore
|
|
27
|
-
setup: !
|
|
28
|
-
var v3 = !!
|
|
28
|
+
setup: !isV3 ? undefined : function () {
|
|
29
|
+
var v3 = !!isV3;
|
|
29
30
|
return {
|
|
30
31
|
v3: v3
|
|
31
32
|
};
|
package/dist/npm/main.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ export * from './colors/interfaces/ColorPickerFocusEvent';
|
|
|
10
10
|
export * from './colors/interfaces/ColorPickerPaletteSettings';
|
|
11
11
|
export * from './colors/interfaces/ColorPickerPopupSettings';
|
|
12
12
|
export * from './colors/interfaces/ColorPickerProps';
|
|
13
|
+
export * from './colors/FlatColorPicker';
|
|
13
14
|
export { Switch, SwitchVue2, SwitchProps, SwitchState, SwitchChangeEvent } from './switch/Switch';
|
|
14
15
|
export * from './input-separator/InputSeparator';
|
|
15
16
|
export * from './input/Input';
|
package/dist/npm/main.js
CHANGED
|
@@ -21,6 +21,7 @@ __exportStar(require("./colors/interfaces/ColorPickerFocusEvent"), exports);
|
|
|
21
21
|
__exportStar(require("./colors/interfaces/ColorPickerPaletteSettings"), exports);
|
|
22
22
|
__exportStar(require("./colors/interfaces/ColorPickerPopupSettings"), exports);
|
|
23
23
|
__exportStar(require("./colors/interfaces/ColorPickerProps"), exports);
|
|
24
|
+
__exportStar(require("./colors/FlatColorPicker"), exports);
|
|
24
25
|
var Switch_1 = require("./switch/Switch");
|
|
25
26
|
Object.defineProperty(exports, "Switch", { enumerable: true, get: function () { return Switch_1.Switch; } });
|
|
26
27
|
Object.defineProperty(exports, "SwitchVue2", { enumerable: true, get: function () { return Switch_1.SwitchVue2; } });
|