@progress/kendo-vue-inputs 3.4.4 → 3.4.5
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 +2 -2
- package/dist/es/colors/ColorGradient.d.ts +2 -0
- package/dist/es/colors/ColorGradient.js +161 -77
- package/dist/es/colors/ColorInput.d.ts +3 -0
- package/dist/es/colors/ColorInput.js +80 -56
- package/dist/es/colors/ColorPalette.js +30 -16
- package/dist/es/colors/ColorPicker.d.ts +1 -0
- package/dist/es/colors/ColorPicker.js +91 -69
- package/dist/es/colors/FlatColorPicker.d.ts +41 -5
- package/dist/es/colors/FlatColorPicker.js +306 -109
- package/dist/es/colors/HexInput.d.ts +1 -0
- package/dist/es/colors/HexInput.js +16 -2
- package/dist/es/colors/Picker.js +19 -11
- package/dist/es/colors/interfaces/ColorGradientChangeEvent.d.ts +4 -0
- package/dist/es/colors/interfaces/ColorGradientProps.d.ts +12 -0
- package/dist/es/colors/interfaces/ColorPaletteChangeEvent.d.ts +0 -3
- package/dist/es/colors/interfaces/ColorPaletteProps.d.ts +8 -3
- package/dist/es/colors/interfaces/ColorPickerActiveColorClick.d.ts +0 -3
- package/dist/es/colors/interfaces/ColorPickerBlurEvent.d.ts +0 -3
- package/dist/es/colors/interfaces/ColorPickerChangeEvent.d.ts +4 -3
- package/dist/es/colors/interfaces/ColorPickerFocusEvent.d.ts +0 -3
- package/dist/es/colors/interfaces/ColorPickerPaletteSettings.d.ts +0 -3
- package/dist/es/colors/interfaces/ColorPickerPopupSettings.d.ts +0 -3
- package/dist/es/colors/interfaces/ColorPickerProps.d.ts +30 -4
- package/dist/es/colors/interfaces/ColorPickerView.d.ts +0 -3
- package/dist/es/colors/interfaces/FlatColorPickerViewChangeEvent.d.ts +13 -0
- package/dist/es/colors/interfaces/FlatColorPickerViewChangeEvent.js +0 -0
- package/dist/es/colors/interfaces/PickerProps.d.ts +4 -0
- package/dist/es/colors/utils/color-cache.d.ts +13 -0
- package/dist/es/colors/utils/color-cache.js +14 -0
- package/dist/es/colors/utils/color-parser.d.ts +7 -1
- package/dist/es/colors/utils/color-parser.js +11 -2
- package/dist/es/input/Input.d.ts +4 -0
- package/dist/es/input/Input.js +8 -3
- package/dist/es/messages/index.d.ts +45 -0
- package/dist/es/messages/index.js +46 -0
- package/dist/es/numerictextbox/NumericTextBox.js +3 -0
- package/dist/es/numerictextbox/interfaces/NumericTextBoxProps.d.ts +4 -0
- package/dist/es/package-metadata.js +1 -1
- package/dist/es/radiobutton/RadioButton.js +1 -1
- package/dist/es/radiobutton/RadioGroup.js +1 -1
- package/dist/es/range-slider/RangeSlider.js +1 -1
- package/dist/es/slider/Slider.js +2 -2
- package/dist/npm/checkbox/Checkbox.js +2 -2
- package/dist/npm/colors/ColorGradient.d.ts +2 -0
- package/dist/npm/colors/ColorGradient.js +161 -75
- package/dist/npm/colors/ColorInput.d.ts +3 -0
- package/dist/npm/colors/ColorInput.js +80 -55
- package/dist/npm/colors/ColorPalette.js +30 -16
- package/dist/npm/colors/ColorPicker.d.ts +1 -0
- package/dist/npm/colors/ColorPicker.js +92 -70
- package/dist/npm/colors/FlatColorPicker.d.ts +41 -5
- package/dist/npm/colors/FlatColorPicker.js +306 -106
- package/dist/npm/colors/HexInput.d.ts +1 -0
- package/dist/npm/colors/HexInput.js +16 -2
- package/dist/npm/colors/Picker.js +18 -10
- package/dist/npm/colors/interfaces/ColorGradientChangeEvent.d.ts +4 -0
- package/dist/npm/colors/interfaces/ColorGradientProps.d.ts +12 -0
- package/dist/npm/colors/interfaces/ColorPaletteChangeEvent.d.ts +0 -3
- package/dist/npm/colors/interfaces/ColorPaletteProps.d.ts +8 -3
- package/dist/npm/colors/interfaces/ColorPickerActiveColorClick.d.ts +0 -3
- package/dist/npm/colors/interfaces/ColorPickerBlurEvent.d.ts +0 -3
- package/dist/npm/colors/interfaces/ColorPickerChangeEvent.d.ts +4 -3
- package/dist/npm/colors/interfaces/ColorPickerFocusEvent.d.ts +0 -3
- package/dist/npm/colors/interfaces/ColorPickerPaletteSettings.d.ts +0 -3
- package/dist/npm/colors/interfaces/ColorPickerPopupSettings.d.ts +0 -3
- package/dist/npm/colors/interfaces/ColorPickerProps.d.ts +30 -4
- package/dist/npm/colors/interfaces/ColorPickerView.d.ts +0 -3
- package/dist/npm/colors/interfaces/FlatColorPickerViewChangeEvent.d.ts +13 -0
- package/dist/npm/colors/interfaces/FlatColorPickerViewChangeEvent.js +2 -0
- package/dist/npm/colors/interfaces/PickerProps.d.ts +4 -0
- package/dist/npm/colors/utils/color-cache.d.ts +13 -0
- package/dist/npm/colors/utils/color-cache.js +15 -1
- package/dist/npm/colors/utils/color-parser.d.ts +7 -1
- package/dist/npm/colors/utils/color-parser.js +12 -3
- package/dist/npm/input/Input.d.ts +4 -0
- package/dist/npm/input/Input.js +8 -3
- package/dist/npm/messages/index.d.ts +45 -0
- package/dist/npm/messages/index.js +47 -1
- package/dist/npm/numerictextbox/NumericTextBox.js +3 -0
- package/dist/npm/numerictextbox/interfaces/NumericTextBoxProps.d.ts +4 -0
- package/dist/npm/package-metadata.js +1 -1
- package/dist/npm/radiobutton/RadioButton.js +1 -1
- package/dist/npm/radiobutton/RadioGroup.js +1 -1
- package/dist/npm/range-slider/RangeSlider.js +1 -1
- package/dist/npm/slider/Slider.js +2 -2
- package/package.json +11 -11
|
@@ -38,6 +38,8 @@ var kendo_vue_labels_1 = require("@progress/kendo-vue-labels");
|
|
|
38
38
|
var kendo_vue_intl_1 = require("@progress/kendo-vue-intl");
|
|
39
39
|
|
|
40
40
|
var messages_1 = require("../messages");
|
|
41
|
+
|
|
42
|
+
var kendo_vue_common_1 = require("@progress/kendo-vue-common");
|
|
41
43
|
/**
|
|
42
44
|
* @hidden
|
|
43
45
|
*/
|
|
@@ -52,12 +54,11 @@ var ColorInputVue2 = {
|
|
|
52
54
|
name: 'KendoColorInput',
|
|
53
55
|
// @ts-ignore
|
|
54
56
|
emits: {
|
|
55
|
-
'focus': null,
|
|
56
|
-
'blur': null,
|
|
57
57
|
'hexchange': null,
|
|
58
58
|
'rgbachange': null
|
|
59
59
|
},
|
|
60
60
|
props: {
|
|
61
|
+
tabIndex: Number,
|
|
61
62
|
rgba: Object,
|
|
62
63
|
hex: String,
|
|
63
64
|
opacity: Boolean,
|
|
@@ -68,11 +69,20 @@ var ColorInputVue2 = {
|
|
|
68
69
|
default: null
|
|
69
70
|
}
|
|
70
71
|
},
|
|
72
|
+
created: function created() {
|
|
73
|
+
this.hexInputId = kendo_vue_common_1.guid();
|
|
74
|
+
},
|
|
71
75
|
data: function data() {
|
|
72
76
|
return {
|
|
73
77
|
inputMode: modes[1]
|
|
74
78
|
};
|
|
75
79
|
},
|
|
80
|
+
mounted: function mounted() {
|
|
81
|
+
this.lastFocusable = this.$refs.hexinput || this.$refs.numerica || this.$refs.numericb;
|
|
82
|
+
},
|
|
83
|
+
updated: function updated() {
|
|
84
|
+
this.lastFocusable = this.$refs.hexinput || this.$refs.numerica || this.$refs.numericb;
|
|
85
|
+
},
|
|
76
86
|
// @ts-ignore
|
|
77
87
|
setup: !isV3 ? undefined : function () {
|
|
78
88
|
var v3 = !!isV3;
|
|
@@ -84,79 +94,93 @@ var ColorInputVue2 = {
|
|
|
84
94
|
render: function render(createElement) {
|
|
85
95
|
var h = gh || createElement;
|
|
86
96
|
var localizationService = kendo_vue_intl_1.provideLocalizationService(this);
|
|
87
|
-
var hexMessage = localizationService.toLanguageString(messages_1.
|
|
97
|
+
var hexMessage = localizationService.toLanguageString(messages_1.colorGradientHex, messages_1.messages[messages_1.colorGradientHex]);
|
|
98
|
+
var buttonMessage = localizationService.toLanguageString(messages_1.colorGradientInputColorButton, messages_1.messages[messages_1.colorGradientInputColorButton]);
|
|
88
99
|
var rMessage = localizationService.toLanguageString(messages_1.colorGradientR, messages_1.messages[messages_1.colorGradientR]);
|
|
89
|
-
var gMessage = localizationService.toLanguageString(messages_1.
|
|
90
|
-
var bMessage = localizationService.toLanguageString(messages_1.
|
|
91
|
-
var aMessage = localizationService.toLanguageString(messages_1.
|
|
100
|
+
var gMessage = localizationService.toLanguageString(messages_1.colorGradientG, messages_1.messages[messages_1.colorGradientG]);
|
|
101
|
+
var bMessage = localizationService.toLanguageString(messages_1.colorGradientB, messages_1.messages[messages_1.colorGradientB]);
|
|
102
|
+
var aMessage = localizationService.toLanguageString(messages_1.colorGradientA, messages_1.messages[messages_1.colorGradientA]);
|
|
103
|
+
var rLabelMessage = localizationService.toLanguageString(messages_1.colorGradientRLabel, messages_1.messages[messages_1.colorGradientRLabel]);
|
|
104
|
+
var gLabelMessage = localizationService.toLanguageString(messages_1.colorGradientGLabel, messages_1.messages[messages_1.colorGradientGLabel]);
|
|
105
|
+
var bLabelMessage = localizationService.toLanguageString(messages_1.colorGradientBLabel, messages_1.messages[messages_1.colorGradientBLabel]);
|
|
106
|
+
var aLabelMessage = localizationService.toLanguageString(messages_1.colorGradientALabel, messages_1.messages[messages_1.colorGradientALabel]);
|
|
92
107
|
return h("div", {
|
|
93
108
|
"class": "k-colorgradient-inputs k-hstack"
|
|
94
109
|
}, [h("div", {
|
|
95
110
|
"class": "k-vstack"
|
|
96
111
|
}, [h(kendo_vue_buttons_1.Button, {
|
|
97
|
-
|
|
112
|
+
ariaLabel: buttonMessage,
|
|
98
113
|
attrs: this.v3 ? undefined : {
|
|
114
|
+
ariaLabel: buttonMessage,
|
|
115
|
+
tabIndex: this.tabIndex,
|
|
116
|
+
type: "button",
|
|
99
117
|
fillMode: 'flat',
|
|
100
118
|
icon: 'arrows-kpi'
|
|
101
119
|
},
|
|
120
|
+
tabIndex: this.tabIndex,
|
|
121
|
+
type: "button",
|
|
122
|
+
fillMode: 'flat',
|
|
102
123
|
icon: 'arrows-kpi',
|
|
103
|
-
|
|
124
|
+
"class": "k-colorgradient-toggle-mode k-icon-button",
|
|
125
|
+
onClick: this.onToggleModeChange,
|
|
104
126
|
on: this.v3 ? undefined : {
|
|
105
|
-
"
|
|
106
|
-
"
|
|
107
|
-
"click": this.onToggleModeChange
|
|
127
|
+
"click": this.onToggleModeChange,
|
|
128
|
+
"keydown": this.onKeyDown
|
|
108
129
|
},
|
|
109
|
-
|
|
110
|
-
"class": "k-colorgradient-toggle-mode k-icon-button",
|
|
111
|
-
onClick: this.onToggleModeChange
|
|
130
|
+
onKeydown: this.onKeyDown
|
|
112
131
|
})]), this.inputMode === 'hex' && h("div", {
|
|
113
132
|
"class": "k-vstack k-flex-1"
|
|
114
133
|
}, [h("span", {
|
|
115
|
-
"class": "k-hex-value
|
|
134
|
+
"class": "k-hex-value"
|
|
116
135
|
}, [h(HexInput_1.HexInput, {
|
|
117
|
-
|
|
136
|
+
id: this.hexInputId,
|
|
118
137
|
attrs: this.v3 ? undefined : {
|
|
138
|
+
id: this.hexInputId,
|
|
139
|
+
tabIndex: this.tabIndex,
|
|
119
140
|
hex: this.$props.hex,
|
|
120
141
|
disabled: this.$props.disabled
|
|
121
142
|
},
|
|
122
|
-
|
|
143
|
+
tabIndex: this.tabIndex,
|
|
144
|
+
hex: this.$props.hex,
|
|
145
|
+
onHexchange: this.onHexChange,
|
|
123
146
|
on: this.v3 ? undefined : {
|
|
124
|
-
"focus": this.onFocus,
|
|
125
|
-
"blur": this.onBlur,
|
|
126
147
|
"hexchange": this.onHexChange
|
|
127
148
|
},
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
disabled: this.$props.disabled
|
|
149
|
+
disabled: this.$props.disabled,
|
|
150
|
+
ref: 'hexinput'
|
|
131
151
|
})]), // @ts-ignore function children
|
|
132
152
|
h(kendo_vue_labels_1.Label, {
|
|
133
|
-
"class": "k-colorgradient-input-label"
|
|
153
|
+
"class": "k-colorgradient-input-label",
|
|
154
|
+
"for": this.hexInputId,
|
|
155
|
+
attrs: this.v3 ? undefined : {
|
|
156
|
+
"for": this.hexInputId
|
|
157
|
+
}
|
|
134
158
|
}, this.v3 ? function () {
|
|
135
159
|
return [hexMessage];
|
|
136
160
|
} : [hexMessage])]), (this.inputMode === 'rgb' || this.inputMode === 'rgba') && [h("div", {
|
|
137
161
|
"class": "k-vstack"
|
|
138
162
|
}, [h(main_1.NumericTextBox, {
|
|
139
|
-
|
|
163
|
+
tabIndex: this.tabIndex,
|
|
140
164
|
attrs: this.v3 ? undefined : {
|
|
165
|
+
tabIndex: this.tabIndex,
|
|
141
166
|
value: this.$props.rgba.r,
|
|
142
167
|
min: 0,
|
|
143
168
|
max: 255,
|
|
144
169
|
spinners: false,
|
|
145
170
|
format: "n",
|
|
171
|
+
ariaLabel: rLabelMessage,
|
|
146
172
|
disabled: this.$props.disabled
|
|
147
173
|
},
|
|
174
|
+
value: this.$props.rgba.r,
|
|
148
175
|
min: 0,
|
|
149
176
|
max: 255,
|
|
150
177
|
spinners: false,
|
|
151
178
|
format: "n",
|
|
152
|
-
|
|
179
|
+
ariaLabel: rLabelMessage,
|
|
180
|
+
onChange: this.onRgbaRChange,
|
|
153
181
|
on: this.v3 ? undefined : {
|
|
154
|
-
"focus": this.onFocus,
|
|
155
|
-
"blur": this.onBlur,
|
|
156
182
|
"change": this.onRgbaRChange
|
|
157
183
|
},
|
|
158
|
-
onBlur: this.onBlur,
|
|
159
|
-
onChange: this.onRgbaRChange,
|
|
160
184
|
disabled: this.$props.disabled
|
|
161
185
|
}), // @ts-ignore function children
|
|
162
186
|
h(kendo_vue_labels_1.Label, {
|
|
@@ -166,27 +190,27 @@ var ColorInputVue2 = {
|
|
|
166
190
|
} : [rMessage])]), h("div", {
|
|
167
191
|
"class": "k-vstack"
|
|
168
192
|
}, [h(main_1.NumericTextBox, {
|
|
169
|
-
|
|
193
|
+
tabIndex: this.tabIndex,
|
|
170
194
|
attrs: this.v3 ? undefined : {
|
|
195
|
+
tabIndex: this.tabIndex,
|
|
171
196
|
value: this.$props.rgba.g,
|
|
172
197
|
min: 0,
|
|
173
198
|
max: 255,
|
|
174
199
|
spinners: false,
|
|
175
200
|
format: "n",
|
|
201
|
+
ariaLabel: gLabelMessage,
|
|
176
202
|
disabled: this.$props.disabled
|
|
177
203
|
},
|
|
204
|
+
value: this.$props.rgba.g,
|
|
178
205
|
min: 0,
|
|
179
206
|
max: 255,
|
|
180
207
|
spinners: false,
|
|
181
208
|
format: "n",
|
|
182
|
-
|
|
209
|
+
ariaLabel: gLabelMessage,
|
|
210
|
+
onChange: this.onRgbaGChange,
|
|
183
211
|
on: this.v3 ? undefined : {
|
|
184
|
-
"focus": this.onFocus,
|
|
185
|
-
"blur": this.onBlur,
|
|
186
212
|
"change": this.onRgbaGChange
|
|
187
213
|
},
|
|
188
|
-
onBlur: this.onBlur,
|
|
189
|
-
onChange: this.onRgbaGChange,
|
|
190
214
|
disabled: this.$props.disabled
|
|
191
215
|
}), // @ts-ignore function children
|
|
192
216
|
h(kendo_vue_labels_1.Label, {
|
|
@@ -196,28 +220,29 @@ var ColorInputVue2 = {
|
|
|
196
220
|
} : [gMessage])]), h("div", {
|
|
197
221
|
"class": "k-vstack"
|
|
198
222
|
}, [h(main_1.NumericTextBox, {
|
|
199
|
-
|
|
223
|
+
tabIndex: this.tabIndex,
|
|
200
224
|
attrs: this.v3 ? undefined : {
|
|
225
|
+
tabIndex: this.tabIndex,
|
|
201
226
|
value: this.$props.rgba.b,
|
|
202
227
|
min: 0,
|
|
203
228
|
max: 255,
|
|
204
229
|
spinners: false,
|
|
205
230
|
format: "n",
|
|
231
|
+
ariaLabel: bLabelMessage,
|
|
206
232
|
disabled: this.$props.disabled
|
|
207
233
|
},
|
|
234
|
+
value: this.$props.rgba.b,
|
|
208
235
|
min: 0,
|
|
209
236
|
max: 255,
|
|
210
237
|
spinners: false,
|
|
211
238
|
format: "n",
|
|
212
|
-
|
|
239
|
+
ariaLabel: bLabelMessage,
|
|
240
|
+
onChange: this.onRgbaBChange,
|
|
213
241
|
on: this.v3 ? undefined : {
|
|
214
|
-
"focus": this.onFocus,
|
|
215
|
-
"blur": this.onBlur,
|
|
216
242
|
"change": this.onRgbaBChange
|
|
217
243
|
},
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
disabled: this.$props.disabled
|
|
244
|
+
disabled: this.$props.disabled,
|
|
245
|
+
ref: 'numericb'
|
|
221
246
|
}), // @ts-ignore function children
|
|
222
247
|
h(kendo_vue_labels_1.Label, {
|
|
223
248
|
"class": "k-colorgradient-input-label"
|
|
@@ -226,30 +251,31 @@ var ColorInputVue2 = {
|
|
|
226
251
|
} : [bMessage])])], this.inputMode === 'rgba' && h("div", {
|
|
227
252
|
"class": "k-vstack"
|
|
228
253
|
}, [this.$props.opacity && h(main_1.NumericTextBox, {
|
|
229
|
-
|
|
254
|
+
tabIndex: this.tabIndex,
|
|
230
255
|
attrs: this.v3 ? undefined : {
|
|
256
|
+
tabIndex: this.tabIndex,
|
|
231
257
|
value: this.$props.rgba.a,
|
|
232
258
|
min: 0,
|
|
233
259
|
max: 1,
|
|
234
260
|
step: 0.01,
|
|
235
261
|
spinners: false,
|
|
236
262
|
format: "n2",
|
|
263
|
+
ariaLabel: aLabelMessage,
|
|
237
264
|
disabled: this.$props.disabled
|
|
238
265
|
},
|
|
266
|
+
value: this.$props.rgba.a,
|
|
239
267
|
min: 0,
|
|
240
268
|
max: 1,
|
|
241
269
|
step: 0.01,
|
|
242
270
|
spinners: false,
|
|
243
271
|
format: "n2",
|
|
244
|
-
|
|
272
|
+
ariaLabel: aLabelMessage,
|
|
273
|
+
onChange: this.onRgbaAChange,
|
|
245
274
|
on: this.v3 ? undefined : {
|
|
246
|
-
"focus": this.onFocus,
|
|
247
|
-
"blur": this.onBlur,
|
|
248
275
|
"change": this.onRgbaAChange
|
|
249
276
|
},
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
disabled: this.$props.disabled
|
|
277
|
+
disabled: this.$props.disabled,
|
|
278
|
+
ref: 'numerica'
|
|
253
279
|
}), this.$props.opacity && // @ts-ignore function children
|
|
254
280
|
h(kendo_vue_labels_1.Label, {
|
|
255
281
|
"class": "k-colorgradient-input-label"
|
|
@@ -258,12 +284,6 @@ var ColorInputVue2 = {
|
|
|
258
284
|
} : [aMessage])])]);
|
|
259
285
|
},
|
|
260
286
|
methods: {
|
|
261
|
-
onFocus: function onFocus(event) {
|
|
262
|
-
this.$emit('focus', event);
|
|
263
|
-
},
|
|
264
|
-
onBlur: function onBlur(event) {
|
|
265
|
-
this.$emit('blur', event);
|
|
266
|
-
},
|
|
267
287
|
onHexChange: function onHexChange(event) {
|
|
268
288
|
this.$emit('hexchange', event.hex, event.value, event);
|
|
269
289
|
},
|
|
@@ -317,6 +337,11 @@ var ColorInputVue2 = {
|
|
|
317
337
|
} else {
|
|
318
338
|
this.inputMode = modes[index];
|
|
319
339
|
}
|
|
340
|
+
},
|
|
341
|
+
onKeyDown: function onKeyDown(e) {
|
|
342
|
+
if (e.keyCode === kendo_vue_common_1.Keys.enter) {
|
|
343
|
+
e.stopPropagation();
|
|
344
|
+
}
|
|
320
345
|
}
|
|
321
346
|
}
|
|
322
347
|
};
|
|
@@ -44,11 +44,17 @@ exports.DEFAULT_PRESET = 'office';
|
|
|
44
44
|
|
|
45
45
|
var ColorPaletteVue2 = {
|
|
46
46
|
name: 'KendoColorPalette',
|
|
47
|
+
model: {
|
|
48
|
+
event: 'changemodel'
|
|
49
|
+
},
|
|
47
50
|
// @ts-ignore
|
|
48
51
|
emits: {
|
|
49
52
|
'keydown': null,
|
|
50
53
|
'focus': null,
|
|
51
54
|
'blur': null,
|
|
55
|
+
'changemodel': null,
|
|
56
|
+
'update:modelValue': null,
|
|
57
|
+
'update:modelRgbaValue': null,
|
|
52
58
|
'change': null
|
|
53
59
|
},
|
|
54
60
|
props: {
|
|
@@ -61,6 +67,8 @@ var ColorPaletteVue2 = {
|
|
|
61
67
|
type: [Number, Object],
|
|
62
68
|
default: exports.DEFAULT_TILE_SIZE
|
|
63
69
|
},
|
|
70
|
+
modelValue: String,
|
|
71
|
+
modelRgbaValue: String,
|
|
64
72
|
defaultValue: String,
|
|
65
73
|
value: String,
|
|
66
74
|
disabled: Boolean,
|
|
@@ -87,7 +95,7 @@ var ColorPaletteVue2 = {
|
|
|
87
95
|
return this.$props.value === undefined;
|
|
88
96
|
},
|
|
89
97
|
selectedColor: function selectedColor() {
|
|
90
|
-
return this.$props.value !== undefined ? this.$props.value : this.currentValue !== undefined ? this.currentValue : this.$props.defaultValue;
|
|
98
|
+
return this.$props.value !== undefined ? this.$props.value : this.modelValue !== undefined ? this.modelValue : this.modelRgbaValue !== undefined ? this.modelRgbaValue : this.currentValue !== undefined ? this.currentValue : this.$props.defaultValue;
|
|
91
99
|
}
|
|
92
100
|
},
|
|
93
101
|
data: function data() {
|
|
@@ -143,7 +151,8 @@ var ColorPaletteVue2 = {
|
|
|
143
151
|
id: this.createCellId({
|
|
144
152
|
row: rowIndex,
|
|
145
153
|
col: i
|
|
146
|
-
})
|
|
154
|
+
}),
|
|
155
|
+
role: 'gridcell'
|
|
147
156
|
},
|
|
148
157
|
"aria-selected": isSelected ? true : this.$props.disabled ? undefined : false,
|
|
149
158
|
style: {
|
|
@@ -164,7 +173,8 @@ var ColorPaletteVue2 = {
|
|
|
164
173
|
row: rowIndex,
|
|
165
174
|
col: i
|
|
166
175
|
}),
|
|
167
|
-
key: i
|
|
176
|
+
key: i,
|
|
177
|
+
role: 'gridcell'
|
|
168
178
|
});
|
|
169
179
|
}, this);
|
|
170
180
|
};
|
|
@@ -187,9 +197,10 @@ var ColorPaletteVue2 = {
|
|
|
187
197
|
attrs: this.v3 ? undefined : {
|
|
188
198
|
id: this.$props.id,
|
|
189
199
|
"aria-disabled": this.$props.disabled ? 'true' : undefined,
|
|
190
|
-
"aria-activedescendant":
|
|
200
|
+
"aria-activedescendant": focusedCellCoords && this.createCellId(focusedCellCoords),
|
|
191
201
|
"aria-labelledby": this.$props.ariaLabelledBy,
|
|
192
202
|
"aria-describedby": this.$props.ariaDescribedBy,
|
|
203
|
+
role: "grid",
|
|
193
204
|
tabindex: kendo_vue_common_1.getTabIndex(this.$props.tabIndex, this.$props.disabled)
|
|
194
205
|
},
|
|
195
206
|
"class": className,
|
|
@@ -202,17 +213,14 @@ var ColorPaletteVue2 = {
|
|
|
202
213
|
onFocusout: this.onBlur,
|
|
203
214
|
onKeydown: this.onKeyDown,
|
|
204
215
|
"aria-disabled": this.$props.disabled ? 'true' : undefined,
|
|
205
|
-
"aria-activedescendant":
|
|
216
|
+
"aria-activedescendant": focusedCellCoords && this.createCellId(focusedCellCoords),
|
|
206
217
|
"aria-labelledby": this.$props.ariaLabelledBy,
|
|
207
218
|
"aria-describedby": this.$props.ariaDescribedBy,
|
|
219
|
+
role: "grid",
|
|
208
220
|
tabindex: kendo_vue_common_1.getTabIndex(this.$props.tabIndex, this.$props.disabled),
|
|
209
221
|
ref: kendo_vue_common_1.setRef(this, 'wrapper')
|
|
210
222
|
}, [h("div", {
|
|
211
|
-
"class": "k-colorpalette-table-wrap"
|
|
212
|
-
role: "grid",
|
|
213
|
-
attrs: this.v3 ? undefined : {
|
|
214
|
-
role: "grid"
|
|
215
|
-
}
|
|
223
|
+
"class": "k-colorpalette-table-wrap"
|
|
216
224
|
}, [h("table", {
|
|
217
225
|
"class": "k-colorpalette-table k-palette",
|
|
218
226
|
role: "presentation",
|
|
@@ -235,19 +243,19 @@ var ColorPaletteVue2 = {
|
|
|
235
243
|
onKeyDown: function onKeyDown(event) {
|
|
236
244
|
switch (event.keyCode) {
|
|
237
245
|
case kendo_vue_common_1.Keys.down:
|
|
238
|
-
this.handleCellNavigation(0, 1);
|
|
246
|
+
this.handleCellNavigation(event, 0, 1);
|
|
239
247
|
break;
|
|
240
248
|
|
|
241
249
|
case kendo_vue_common_1.Keys.up:
|
|
242
|
-
this.handleCellNavigation(0, -1);
|
|
250
|
+
this.handleCellNavigation(event, 0, -1);
|
|
243
251
|
break;
|
|
244
252
|
|
|
245
253
|
case kendo_vue_common_1.Keys.right:
|
|
246
|
-
this.handleCellNavigation(1, 0);
|
|
254
|
+
this.handleCellNavigation(event, 1, 0);
|
|
247
255
|
break;
|
|
248
256
|
|
|
249
257
|
case kendo_vue_common_1.Keys.left:
|
|
250
|
-
this.handleCellNavigation(-1, 0);
|
|
258
|
+
this.handleCellNavigation(event, -1, 0);
|
|
251
259
|
break;
|
|
252
260
|
|
|
253
261
|
case kendo_vue_common_1.Keys.enter:
|
|
@@ -285,7 +293,9 @@ var ColorPaletteVue2 = {
|
|
|
285
293
|
target: this
|
|
286
294
|
});
|
|
287
295
|
},
|
|
288
|
-
handleCellNavigation: function handleCellNavigation(horizontalStep, verticalStep) {
|
|
296
|
+
handleCellNavigation: function handleCellNavigation(event, horizontalStep, verticalStep) {
|
|
297
|
+
event.preventDefault();
|
|
298
|
+
|
|
289
299
|
if (this.focusedColorCooridanates) {
|
|
290
300
|
var newCoords = this.paletteService.getNextCell(this.focusedColorCooridanates, horizontalStep, verticalStep);
|
|
291
301
|
this.focusedColor = this.paletteService.getColorAt(newCoords);
|
|
@@ -301,11 +311,15 @@ var ColorPaletteVue2 = {
|
|
|
301
311
|
this.dispatchChangeEvent(this.focusedColor, event);
|
|
302
312
|
},
|
|
303
313
|
dispatchChangeEvent: function dispatchChangeEvent(value, event) {
|
|
314
|
+
var rgbaValue = color_parser_1.parseColor(value, 'rgba');
|
|
315
|
+
this.$emit('changemodel', value);
|
|
316
|
+
this.$emit('update:modelValue', value);
|
|
317
|
+
this.$emit('update:modelRgbaValue', rgbaValue);
|
|
304
318
|
this.$emit('change', {
|
|
305
319
|
event: event,
|
|
306
320
|
component: this,
|
|
307
321
|
value: value,
|
|
308
|
-
rgbaValue:
|
|
322
|
+
rgbaValue: rgbaValue
|
|
309
323
|
});
|
|
310
324
|
},
|
|
311
325
|
getPaletteInfo: function getPaletteInfo() {
|