@progress/kendo-vue-inputs 6.4.1 → 6.5.0-develop.1

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.
@@ -5,11 +5,11 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- import { defineComponent as x, ref as B, inject as D, h as M, createVNode as l } from "vue";
9
- import { validatePackage as O, guid as P, getRef as f, getDefaultSlots as z, classNames as m, kendoThemeMaps as g, templateRendering as L, getListeners as w, getTemplate as I, Keys as H, setRef as T, getTabIndex as N } from "@progress/kendo-vue-common";
8
+ import { defineComponent as x, h as B, createVNode as l, ref as D, inject as M } from "vue";
9
+ import { Keys as O, getDefaultSlots as P, classNames as f, kendoThemeMaps as m, templateRendering as z, getListeners as L, getTemplate as w, getRef as g, validatePackage as I, guid as H, getTabIndex as T, setRef as N } from "@progress/kendo-vue-common";
10
10
  import { packageMetadata as R } from "../package-metadata.mjs";
11
11
  import { provideLocalizationService as q } from "@progress/kendo-vue-intl";
12
- import { checkboxValidation as K, checkboxOptionalText as j, messages as A } from "../messages/main.mjs";
12
+ import { messages as K, checkboxValidation as j, checkboxOptionalText as A } from "../messages/main.mjs";
13
13
  const U = /* @__PURE__ */ x({
14
14
  name: "KendoCheckbox",
15
15
  emits: {
@@ -94,7 +94,7 @@ const U = /* @__PURE__ */ x({
94
94
  };
95
95
  },
96
96
  created() {
97
- O(R), this.calculatedId = P(), this.$props.defaultChecked !== void 0 && (this.currentChecked = this.$props.defaultChecked), this.$props.defaultValue !== void 0 && (this.currentValue = this.$props.defaultValue), this.currentDir = this.$props.dir;
97
+ I(R), this.calculatedId = H(), this.$props.defaultChecked !== void 0 && (this.currentChecked = this.$props.defaultChecked), this.$props.defaultValue !== void 0 && (this.currentValue = this.$props.defaultValue), this.currentDir = this.$props.dir;
98
98
  },
99
99
  computed: {
100
100
  valueIsBooleanOrNull() {
@@ -138,17 +138,17 @@ const U = /* @__PURE__ */ x({
138
138
  }
139
139
  },
140
140
  mounted() {
141
- if (this.input = f(this, "input"), !this.currentDir && window && this.$el) {
141
+ if (this.input = g(this, "input"), !this.currentDir && window && this.$el) {
142
142
  const e = window.getComputedStyle(this.$el).direction;
143
143
  e && (this.currentDir = e);
144
144
  }
145
145
  this.setValidity();
146
146
  },
147
147
  updated() {
148
- this.input || (this.input = f(this, "input")), this.setValidity();
148
+ this.input || (this.input = g(this, "input")), this.setValidity();
149
149
  },
150
150
  setup() {
151
- const e = B(null), t = D("kendoLocalizationService", {});
151
+ const e = D(null), t = M("kendoLocalizationService", {});
152
152
  return {
153
153
  inputRef: e,
154
154
  kendoLocalizationService: t
@@ -170,16 +170,16 @@ const U = /* @__PURE__ */ x({
170
170
  validityStyles: v,
171
171
  size: r,
172
172
  rounded: u
173
- } = this.$props, o = z(this);
173
+ } = this.$props, o = P(this);
174
174
  let a = b;
175
- this.localizationService = q(this), this.defaultValidationMessage = this.localizeMessage(K), this.optionalMessage = this.localizeMessage(j);
176
- const h = m({
175
+ this.localizationService = q(this), this.defaultValidationMessage = this.localizeMessage(j), this.optionalMessage = this.localizeMessage(A);
176
+ const h = f({
177
177
  "k-checkbox-wrap": !0,
178
178
  "k-disabled": i
179
- }), y = m({
179
+ }), y = f({
180
180
  "k-checkbox": !0,
181
- [`k-checkbox-${g.sizeMap[r]}`]: r,
182
- [`k-rounded-${g.roundedMap[u]}`]: u,
181
+ [`k-checkbox-${m.sizeMap[r]}`]: r,
182
+ [`k-rounded-${m.roundedMap[u]}`]: u,
183
183
  "k-indeterminate": this.indeterminateProp,
184
184
  "k-disabled": i,
185
185
  "k-invalid": !this.isValid && v !== !1
@@ -189,12 +189,12 @@ const U = /* @__PURE__ */ x({
189
189
  class: y,
190
190
  name: $,
191
191
  id: s || this.calculatedId,
192
- ref: T(this, "input"),
192
+ ref: N(this, "input"),
193
193
  "aria-labelledby": t,
194
194
  "aria-describedby": e,
195
195
  checked: !!this.checkedProp,
196
196
  disabled: i,
197
- tabindex: N(V, i),
197
+ tabindex: T(V, i),
198
198
  role: "checkbox",
199
199
  required: d !== void 0 ? d : !1,
200
200
  "aria-checked": this.computedChecked || this.checkedProp ? !0 : this.indeterminateProp ? "mixed" : !1,
@@ -206,9 +206,9 @@ const U = /* @__PURE__ */ x({
206
206
  }, null);
207
207
  };
208
208
  if (n) {
209
- const S = n ? L.call(this, n, w.call(this)) : null;
210
- a = I.call(this, {
211
- h: M,
209
+ const S = n ? z.call(this, n, L.call(this)) : null;
210
+ a = w.call(this, {
211
+ h: B,
212
212
  template: S
213
213
  });
214
214
  }
@@ -237,7 +237,7 @@ const U = /* @__PURE__ */ x({
237
237
  this.input && this.input.setCustomValidity && this.input.setCustomValidity(e ? "" : this.$props.validationMessage || this.defaultValidationMessage);
238
238
  },
239
239
  localizeMessage(e) {
240
- return this.localizationService.toLanguageString(e, A[e]);
240
+ return this.localizationService.toLanguageString(e, K[e]);
241
241
  },
242
242
  focusElement() {
243
243
  this.input && this.input.focus();
@@ -270,7 +270,7 @@ const U = /* @__PURE__ */ x({
270
270
  keyCode: t
271
271
  } = e;
272
272
  let i = e.currentTarget.checked;
273
- t === H.space && (e.preventDefault(), e.stopPropagation(), this.setValue(e, !i));
273
+ t === O.space && (e.preventDefault(), e.stopPropagation(), this.setValue(e, !i));
274
274
  },
275
275
  onBlurHandler(e) {
276
276
  this.$props.disabled || this.$emit("blur", e);
@@ -6,10 +6,10 @@
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
8
  import { defineComponent as w, createVNode as s } from "vue";
9
- import { validatePackage as D, guid as G, classNames as M, kendoThemeMaps as A, getTabIndex as K, Draggable as E, focusContainer as z, getRef as W, Keys as n, focusFirstFocusableChild as O, setRef as N } from "@progress/kendo-vue-common";
9
+ import { focusFirstFocusableChild as D, Keys as n, getRef as G, focusContainer as M, classNames as A, kendoThemeMaps as K, getTabIndex as E, Draggable as z, validatePackage as W, guid as O, setRef as N } from "@progress/kendo-vue-common";
10
10
  import { packageMetadata as P } from "../package-metadata.mjs";
11
- import { isPresent as f, fitIntoBounds as C } from "./utils/misc.mjs";
12
- import { parseColor as o, getHSV as c, getRGBA as u, getColorFromHue as g, getColorFromRGBA as j, getColorFromHSV as X } from "./utils/color-parser.mjs";
11
+ import { fitIntoBounds as f, isPresent as C } from "./utils/misc.mjs";
12
+ import { getColorFromHSV as j, parseColor as o, getColorFromHue as c, getRGBA as u, getColorFromRGBA as X, getHSV as g } from "./utils/color-parser.mjs";
13
13
  import { removeCachedColor as Y } from "./utils/color-cache.mjs";
14
14
  import { ColorInput as _ } from "./ColorInput.mjs";
15
15
  import { ColorContrastLabels as U } from "./ColorContrastLabels.mjs";
@@ -60,7 +60,7 @@ const Q = "rgba", y = "rgba(255, 255, 255, 1)", ce = /* @__PURE__ */ w({
60
60
  adaptive: Boolean
61
61
  },
62
62
  created() {
63
- D(P), this.guid = G();
63
+ W(P), this.guid = O();
64
64
  },
65
65
  computed: {
66
66
  valueSet() {
@@ -68,10 +68,10 @@ const Q = "rgba", y = "rgba(255, 255, 255, 1)", ce = /* @__PURE__ */ w({
68
68
  },
69
69
  computedValue() {
70
70
  let e = this.valueSet || this.currentValue || this.defaultValue || o(y, Q);
71
- return f(o(e, "hex", this.opacity)) || (e = y), e;
71
+ return C(o(e, "hex", this.opacity)) || (e = y), e;
72
72
  },
73
73
  hsva() {
74
- return this.valueSet ? c(this.computedValue) : this.currentHsva || c(this.computedValue);
74
+ return this.valueSet ? g(this.computedValue) : this.currentHsva || g(this.computedValue);
75
75
  },
76
76
  rgba() {
77
77
  return this.valueSet ? u(this.computedValue) : this.currentRgba;
@@ -80,7 +80,7 @@ const Q = "rgba", y = "rgba(255, 255, 255, 1)", ce = /* @__PURE__ */ w({
80
80
  return this.valueSet ? o(this.computedValue, "hex", this.opacity) : this.currentHex;
81
81
  },
82
82
  computedBgColor() {
83
- return this.currentBgColor || g(this.hsva.h);
83
+ return this.currentBgColor || c(this.hsva.h);
84
84
  },
85
85
  computedTabIndex() {
86
86
  return this.innerTabIndex !== void 0 ? this.innerTabIndex : this.focused ? 0 : -1;
@@ -117,9 +117,9 @@ const Q = "rgba", y = "rgba(255, 255, 255, 1)", ce = /* @__PURE__ */ w({
117
117
  ariaDescribedBy: p,
118
118
  ariaLabelledBy: H,
119
119
  adaptive: d
120
- } = this.$props, B = M("k-colorgradient", {
120
+ } = this.$props, B = A("k-colorgradient", {
121
121
  "k-disabled": t,
122
- [`k-colorgradient-${A.sizeMap[e] || e}`]: e
122
+ [`k-colorgradient-${K.sizeMap[e] || e}`]: e
123
123
  }, i), b = J(this), $ = b.toLanguageString(k, m[k]), V = b.toLanguageString(S, m[S]), L = b.toLanguageString(x, m[x]), F = function() {
124
124
  let l = {};
125
125
  if (!this.isFirstRender) {
@@ -146,7 +146,7 @@ const Q = "rgba", y = "rgba(255, 255, 255, 1)", ce = /* @__PURE__ */ w({
146
146
  class: B,
147
147
  role: h !== -1 ? "textbox" : void 0,
148
148
  "aria-disabled": t,
149
- tabindex: K(h, t),
149
+ tabindex: E(h, t),
150
150
  "aria-labelledby": H,
151
151
  "aria-describedby": p,
152
152
  onFocus: this.onFocus,
@@ -159,7 +159,7 @@ const Q = "rgba", y = "rgba(255, 255, 255, 1)", ce = /* @__PURE__ */ w({
159
159
  style: {
160
160
  background: this.computedBgColor
161
161
  }
162
- }, [s(E, {
162
+ }, [s(z, {
163
163
  onDrag: this.onDrag,
164
164
  onRelease: this.onRelease,
165
165
  ref: "draggable"
@@ -192,7 +192,7 @@ const Q = "rgba", y = "rgba(255, 255, 255, 1)", ce = /* @__PURE__ */ w({
192
192
  ariaLabel: $
193
193
  }, null), a && s(R, {
194
194
  tabIndex: this.computedTabIndex,
195
- value: f(this.hsva.a) ? this.hsva.a * 100 : 100,
195
+ value: C(this.hsva.a) ? this.hsva.a * 100 : 100,
196
196
  buttons: !1,
197
197
  vertical: !d,
198
198
  min: 0,
@@ -223,15 +223,15 @@ const Q = "rgba", y = "rgba(255, 255, 255, 1)", ce = /* @__PURE__ */ w({
223
223
  methods: {
224
224
  onKeyDownHandler(e) {
225
225
  const t = this.$el;
226
- this.innerTabIndex === void 0 && (this.focused = z(e, t)), this.$emit("keydown", e);
226
+ this.innerTabIndex === void 0 && (this.focused = M(e, t)), this.$emit("keydown", e);
227
227
  },
228
228
  onHexChange(e, t, i) {
229
- const a = u(t), r = c(t);
230
- this.currentHsva = r, this.currentBgColor = g(r.h), this.currentRgba = a, this.currentHex = e, this.dispatchChangeEvent(t, i.event, e, t);
229
+ const a = u(t), r = g(t);
230
+ this.currentHsva = r, this.currentBgColor = c(r.h), this.currentRgba = a, this.currentHex = e, this.dispatchChangeEvent(t, i.event, e, t);
231
231
  },
232
232
  onRgbaChange(e, t) {
233
- const i = j(e), a = o(i, "hex", this.opacity), r = c(i);
234
- this.currentHsva = r, this.currentBgColor = g(r.h), this.currentRgba = e, this.currentHex = a, this.dispatchChangeEvent(i, t.event, a, i);
233
+ const i = X(e), a = o(i, "hex", this.opacity), r = g(i);
234
+ this.currentHsva = r, this.currentBgColor = c(r.h), this.currentRgba = e, this.currentHex = a, this.dispatchChangeEvent(i, t.event, a, i);
235
235
  },
236
236
  onAlphaSliderChange(e) {
237
237
  this.handleHsvaChange(Object.assign({}, this.hsva, {
@@ -250,7 +250,7 @@ const Q = "rgba", y = "rgba(255, 255, 255, 1)", ce = /* @__PURE__ */ w({
250
250
  this.gradientWrapper.classList.remove("k-dragging");
251
251
  },
252
252
  onGradientWrapperClick(e) {
253
- this.firstFocusable = W(this, "draghandle"), this.firstFocusable && this.firstFocusable.focus(), this.changePosition(e);
253
+ this.firstFocusable = G(this, "draghandle"), this.firstFocusable && this.firstFocusable.focus(), this.changePosition(e);
254
254
  },
255
255
  move(e, t, i) {
256
256
  const a = this.hsva;
@@ -277,15 +277,15 @@ const Q = "rgba", y = "rgba(255, 255, 255, 1)", ce = /* @__PURE__ */ w({
277
277
  }
278
278
  },
279
279
  changePosition(e) {
280
- const t = this.getGradientRectMetrics(), i = e.clientX - t.left, a = e.clientY - t.top, r = C(i, 0, t.width), h = C(a, 0, t.height), p = Object.assign({}, this.hsva, {
280
+ const t = this.getGradientRectMetrics(), i = e.clientX - t.left, a = e.clientY - t.top, r = f(i, 0, t.width), h = f(a, 0, t.height), p = Object.assign({}, this.hsva, {
281
281
  s: r / t.width,
282
282
  v: 1 - h / t.height
283
283
  });
284
284
  this.handleHsvaChange(p, e, e.event);
285
285
  },
286
286
  handleHsvaChange(e, t) {
287
- const i = X(e), a = o(i, "hex", this.opacity), r = o(i, "rgba");
288
- this.currentHsva = e, this.currentBgColor = g(e.h), this.currentRgba = u(i), this.currentHex = a, this.dispatchChangeEvent(i, t, a, r);
287
+ const i = j(e), a = o(i, "hex", this.opacity), r = o(i, "rgba");
288
+ this.currentHsva = e, this.currentBgColor = c(e.h), this.currentRgba = u(i), this.currentHex = a, this.dispatchChangeEvent(i, t, a, r);
289
289
  },
290
290
  dispatchChangeEvent(e, t, i, a) {
291
291
  this.currentValue = e, this.$emit("changemodel", i), this.$emit("update:modelRgbaValue", a), this.$emit("update:modelValue", i), this.$emit("change", {
@@ -325,7 +325,7 @@ const Q = "rgba", y = "rgba(255, 255, 255, 1)", ce = /* @__PURE__ */ w({
325
325
  },
326
326
  focus() {
327
327
  this.focused = !0, setTimeout(() => {
328
- O(this.$el);
328
+ D(this.$el);
329
329
  }, 1);
330
330
  }
331
331
  }
@@ -11,7 +11,7 @@ import { Button as G } from "@progress/kendo-vue-buttons";
11
11
  import { Label as o } from "@progress/kendo-vue-labels";
12
12
  import { provideLocalizationService as B } from "@progress/kendo-vue-intl";
13
13
  import { colorGradientHex as c, messages as a, colorGradientInputColorButton as b, colorGradientR as u, colorGradientG as f, colorGradientB as m, colorGradientA as x, colorGradientRLabel as $, colorGradientGLabel as k, colorGradientBLabel as C, colorGradientALabel as I } from "../messages/main.mjs";
14
- import { guid as T, Keys as j } from "@progress/kendo-vue-common";
14
+ import { Keys as T, guid as j } from "@progress/kendo-vue-common";
15
15
  import { caretAltExpandIcon as A } from "@progress/kendo-svg-icons";
16
16
  import { NumericTextBox as l } from "../numerictextbox/NumericTextBox.mjs";
17
17
  function r(e) {
@@ -42,7 +42,7 @@ const s = ["rgba", "rgb", "hex"], q = /* @__PURE__ */ R({
42
42
  }
43
43
  },
44
44
  created() {
45
- this.hexInputId = T();
45
+ this.hexInputId = j();
46
46
  },
47
47
  data() {
48
48
  return {
@@ -206,7 +206,7 @@ const s = ["rgba", "rgb", "hex"], q = /* @__PURE__ */ R({
206
206
  }
207
207
  },
208
208
  onKeyDown(e) {
209
- e.keyCode === j.enter && e.stopPropagation();
209
+ e.keyCode === T.enter && e.stopPropagation();
210
210
  }
211
211
  }
212
212
  });
@@ -7,7 +7,7 @@
7
7
  */
8
8
  import { defineComponent as x, createVNode as a } from "vue";
9
9
  import { ColorPaletteService as B } from "./utils/color-palette.service.mjs";
10
- import { validatePackage as D, guid as F, getRef as $, classNames as w, kendoThemeMaps as U, getTabIndex as z, setRef as L, Keys as n } from "@progress/kendo-vue-common";
10
+ import { Keys as n, classNames as $, kendoThemeMaps as D, setRef as F, getTabIndex as U, getRef as w, validatePackage as z, guid as L } from "@progress/kendo-vue-common";
11
11
  import { packageMetadata as A } from "../package-metadata.mjs";
12
12
  import { PALETTEPRESETS as K } from "./models/palette-presets.mjs";
13
13
  import { isPresent as M } from "./utils/misc.mjs";
@@ -51,13 +51,13 @@ const k = 10, O = "office", X = /* @__PURE__ */ x({
51
51
  }
52
52
  },
53
53
  created() {
54
- D(A), this.guid = F();
54
+ z(A), this.guid = L();
55
55
  },
56
56
  mounted() {
57
- this.wrapper = $(this, "wrapper");
57
+ this.wrapper = w(this, "wrapper");
58
58
  },
59
59
  updated() {
60
- this.wrapper = $(this, "wrapper");
60
+ this.wrapper = w(this, "wrapper");
61
61
  },
62
62
  computed: {
63
63
  focusedColorCooridanates() {
@@ -84,8 +84,8 @@ const k = 10, O = "office", X = /* @__PURE__ */ x({
84
84
  tileSize: s
85
85
  } = this.$props, p = this.getPaletteInfo(), d = this.paletteService = new B();
86
86
  d.setColorMatrix(p.colors, p.columns);
87
- const y = d.getCellCoordsFor(this.selectedColor), f = d.getCellCoordsFor(this.focusedColor), S = w("k-colorpalette", {
88
- [`k-colorpalette-${U.sizeMap[e] || e}`]: e,
87
+ const y = d.getCellCoordsFor(this.selectedColor), f = d.getCellCoordsFor(this.focusedColor), S = $("k-colorpalette", {
88
+ [`k-colorpalette-${D.sizeMap[e] || e}`]: e,
89
89
  "k-disabled": t
90
90
  }, o), V = function(m, r, i, l) {
91
91
  const u = i !== void 0 && i.row === r, N = i && i.col, E = l !== void 0 && l.row === r, R = l && l.col, c = typeof s != "number" ? s : {
@@ -93,7 +93,7 @@ const k = 10, O = "office", X = /* @__PURE__ */ x({
93
93
  height: s
94
94
  }, C = c ? c.width + "px" : void 0, P = c ? c.height + "px" : void 0;
95
95
  return m.map(function(g, h) {
96
- const b = u && N === h, I = w("k-colorpalette-tile", {
96
+ const b = u && N === h, I = $("k-colorpalette-tile", {
97
97
  "k-selected": b,
98
98
  "k-focus": E && R === h
99
99
  });
@@ -135,8 +135,8 @@ const k = 10, O = "office", X = /* @__PURE__ */ x({
135
135
  "aria-labelledby": this.$props.ariaLabelledBy,
136
136
  "aria-describedby": this.$props.ariaDescribedBy,
137
137
  role: "grid",
138
- tabindex: z(this.$props.tabIndex, this.$props.disabled),
139
- ref: L(this, "wrapper")
138
+ tabindex: U(this.$props.tabIndex, this.$props.disabled),
139
+ ref: F(this, "wrapper")
140
140
  }, [a("table", {
141
141
  class: "k-colorpalette-table k-palette",
142
142
  role: "presentation"
@@ -7,7 +7,7 @@
7
7
  */
8
8
  import { defineComponent as A, createVNode as o, isVNode as R, h as I } from "vue";
9
9
  import { Button as D } from "@progress/kendo-vue-buttons";
10
- import { ADAPTIVE_SMALL_BREAKPOINT as M, ADAPTIVE_MEDIUM_BREAKPOINT as E, kendoThemeMaps as c, validatePackage as N, guid as p, canUseDOM as H, getRef as a, getTabIndex as F, classNames as h, Icon as L, getIconName as K, Keys as n, setRef as _ } from "@progress/kendo-vue-common";
10
+ import { ADAPTIVE_MEDIUM_BREAKPOINT as M, ADAPTIVE_SMALL_BREAKPOINT as E, getRef as a, Keys as n, getTabIndex as N, classNames as c, Icon as H, getIconName as F, canUseDOM as L, validatePackage as K, guid as p, kendoThemeMaps as h, setRef as _ } from "@progress/kendo-vue-common";
11
11
  import { packageMetadata as z } from "../package-metadata.mjs";
12
12
  import { Picker as j } from "./Picker.mjs";
13
13
  import { FlatColorPicker as x } from "./FlatColorPicker.mjs";
@@ -150,8 +150,8 @@ const ue = /* @__PURE__ */ A({
150
150
  },
151
151
  adaptiveModeBreakpoints: {
152
152
  default: {
153
- small: M,
154
- medium: E
153
+ small: E,
154
+ medium: M
155
155
  }
156
156
  }
157
157
  },
@@ -188,9 +188,9 @@ const ue = /* @__PURE__ */ A({
188
188
  "k-picker": !0,
189
189
  "k-colorpicker": !0,
190
190
  "k-icon-picker": !0,
191
- [`k-picker-${c.sizeMap[e] || e}`]: e,
191
+ [`k-picker-${h.sizeMap[e] || e}`]: e,
192
192
  [`k-picker-${i}`]: i,
193
- [`k-rounded-${c.roundedMap[t] || t}`]: t,
193
+ [`k-rounded-${h.roundedMap[t] || t}`]: t,
194
194
  "k-invalid": !this.valid,
195
195
  "k-disabled": this.disabled,
196
196
  "k-focus": this.focused
@@ -211,10 +211,10 @@ const ue = /* @__PURE__ */ A({
211
211
  }
212
212
  },
213
213
  created() {
214
- N(z), this._popupId = "popup" + p(), this.focusableElementGuid = p();
214
+ K(z), this._popupId = "popup" + p(), this.focusableElementGuid = p();
215
215
  },
216
216
  mounted() {
217
- this.observer = H && window.ResizeObserver && new ResizeObserver(this.calculateMedia), document != null && document.body && this.observer && this.observer.observe(document.body), this.flatcolorpickerRef = a(this, "flatcolorpicker"), this.button = a(this, "button");
217
+ this.observer = L && window.ResizeObserver && new ResizeObserver(this.calculateMedia), document != null && document.body && this.observer && this.observer.observe(document.body), this.flatcolorpickerRef = a(this, "flatcolorpicker"), this.button = a(this, "button");
218
218
  },
219
219
  unmounted() {
220
220
  var e;
@@ -265,7 +265,7 @@ const ue = /* @__PURE__ */ A({
265
265
  "aria-haspopup": "dialog",
266
266
  "aria-expanded": this.computedOpen,
267
267
  ref: this.focusableElementGuid,
268
- tabindex: F(t, i),
268
+ tabindex: N(t, i),
269
269
  title: this.$props.title,
270
270
  onKeydown: this.onButtonKeyDown,
271
271
  onFocusin: this.onFocusHandler,
@@ -274,13 +274,13 @@ const ue = /* @__PURE__ */ A({
274
274
  onClick: this.onActiveColorClickHandler,
275
275
  class: "k-input-inner"
276
276
  }, [o("span", {
277
- class: h("k-value-icon", "k-color-preview", {
277
+ class: c("k-value-icon", "k-color-preview", {
278
278
  "k-no-color": !this.computedValue,
279
279
  "k-icon-color-preview": this.icon || this.iconClassName
280
280
  })
281
- }, [(this.iconClassName || this.icon || this.svgIcon) && o(L, {
282
- class: h("k-color-preview-icon", this.iconClassName),
283
- name: K(this.icon),
281
+ }, [(this.iconClassName || this.icon || this.svgIcon) && o(H, {
282
+ class: c("k-color-preview-icon", this.iconClassName),
283
+ name: F(this.icon),
284
284
  icon: this.svgIcon
285
285
  }, null), o("span", {
286
286
  class: "k-color-preview-mask",
@@ -7,7 +7,7 @@
7
7
  */
8
8
  import { defineComponent as T, h as n, createVNode as t, isVNode as z } from "vue";
9
9
  import { dropletSliderIcon as F, paletteIcon as L, dropletSlashIcon as R } from "@progress/kendo-svg-icons";
10
- import { validatePackage as M, templateRendering as h, getListeners as p, getTemplate as g, getTabIndex as G, classNames as D, kendoThemeMaps as j, Icon as c, focusFirstFocusableChild as N, focusContainer as E, Keys as u, setRef as m } from "@progress/kendo-vue-common";
10
+ import { Keys as c, focusContainer as M, focusFirstFocusableChild as G, templateRendering as h, getListeners as p, getTemplate as g, classNames as D, getTabIndex as j, kendoThemeMaps as N, Icon as u, validatePackage as E, setRef as m } from "@progress/kendo-vue-common";
11
11
  import { ButtonGroup as O, Button as l } from "@progress/kendo-vue-buttons";
12
12
  import { DEFAULT_PRESET as A, ColorPalette as _ } from "./ColorPalette.mjs";
13
13
  import { ColorGradient as H } from "./ColorGradient.mjs";
@@ -90,7 +90,7 @@ const re = /* @__PURE__ */ T({
90
90
  }
91
91
  },
92
92
  created() {
93
- M(U);
93
+ E(U);
94
94
  },
95
95
  computed: {
96
96
  isColorGradient() {
@@ -163,13 +163,13 @@ const re = /* @__PURE__ */ T({
163
163
  });
164
164
  };
165
165
  return t("div", {
166
- tabindex: G(this.$props.tabIndex, this.$props.disabled),
166
+ tabindex: j(this.$props.tabIndex, this.$props.disabled),
167
167
  onFocus: this.onFocus,
168
168
  onBlur: this.onBlur,
169
169
  onFocusout: this.onFocusout,
170
170
  onKeydown: this.onKeyDownHandler,
171
171
  class: D("k-flatcolorpicker k-coloreditor", {
172
- [`k-coloreditor-${j.sizeMap[e] || e}`]: e,
172
+ [`k-coloreditor-${N.sizeMap[e] || e}`]: e,
173
173
  "k-disabled": this.$props.disabled
174
174
  }),
175
175
  "aria-disabled": this.$props.disabled
@@ -191,7 +191,7 @@ const re = /* @__PURE__ */ T({
191
191
  size: e,
192
192
  onClick: (d) => this.handleViewChange(d, "gradient")
193
193
  }, {
194
- default: () => [t(c, {
194
+ default: () => [t(u, {
195
195
  size: e,
196
196
  name: "droplet-slider",
197
197
  icon: F
@@ -207,7 +207,7 @@ const re = /* @__PURE__ */ T({
207
207
  size: e,
208
208
  onClick: (d) => this.handleViewChange(d, "palette")
209
209
  }, {
210
- default: () => [t(c, {
210
+ default: () => [t(u, {
211
211
  size: e,
212
212
  name: "palette",
213
213
  icon: L
@@ -226,7 +226,7 @@ const re = /* @__PURE__ */ T({
226
226
  onKeydown: this.handleButtonKeydown,
227
227
  onClick: this.handleResetColor
228
228
  }, {
229
- default: () => [t(c, {
229
+ default: () => [t(u, {
230
230
  size: e,
231
231
  name: "droplet-slash",
232
232
  icon: R
@@ -275,12 +275,12 @@ const re = /* @__PURE__ */ T({
275
275
  methods: {
276
276
  focus() {
277
277
  this.focused = !0, setTimeout(() => {
278
- N(this.$el);
278
+ G(this.$el);
279
279
  }, 1);
280
280
  },
281
281
  onKeyDownHandler(e) {
282
282
  const o = this.$el;
283
- this.focused = E(e, o), this.$emit("keydown", e);
283
+ this.focused = M(e, o), this.$emit("keydown", e);
284
284
  },
285
285
  handleViewChange(e, o) {
286
286
  this.currentView = o, this.$emit("viewchange", {
@@ -306,13 +306,13 @@ const re = /* @__PURE__ */ T({
306
306
  });
307
307
  },
308
308
  innerKeyDown(e) {
309
- e.keyCode === u.enter && this.triggerChange(e);
309
+ e.keyCode === c.enter && this.triggerChange(e);
310
310
  },
311
311
  gradientKeyDown(e) {
312
- e.stopPropagation(), !this.showButtons && e.keyCode === u.enter && this.triggerChange(e);
312
+ e.stopPropagation(), !this.showButtons && e.keyCode === c.enter && this.triggerChange(e);
313
313
  },
314
314
  handleButtonKeydown(e) {
315
- e.keyCode === u.enter && e.stopPropagation();
315
+ e.keyCode === c.enter && e.stopPropagation();
316
316
  },
317
317
  handleCancelBtnClick() {
318
318
  this.colorValue = this.computedPrevColor;
@@ -5,4 +5,4 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("@progress/kendo-drawing"),r=require("./misc.js"),p=(t,o,n=!1,s=!0)=>{if(["hex","rgba"].indexOf(o)===-1)throw new Error(`Unsupported color output format '${o}'. The available options are 'hex' or 'rgba'.`);if(!r.isPresent(t))return;const e=a.parseColor(t.trim(),s);if(r.isPresent(e))return o==="hex"?g(e,n):e.toCssRgba()},g=(t,o)=>o&&t.a<1?t.toCss({alpha:!0}):t.toCss(),C=(t,o=!0)=>{const n=a.parseColor(t,o);return r.isPresent(n)?n.toHSV():{}},h=(t,o=!0)=>{const n=a.parseColor(t,o);return r.isPresent(n)?n.toBytes():{}},B=t=>{const o=r.fitIntoBounds(t.h,0,359.9),n=r.fitIntoBounds(t.s,0,1),s=r.fitIntoBounds(t.v,0,1),u=r.fitIntoBounds(t.a,0,1);return a.Color.fromHSV(o,n,s,u).toCssRgba()},I=t=>B({h:t,s:1,v:1,a:1}),R=t=>{const o=r.fitIntoBounds(t.r,0,255),n=r.fitIntoBounds(t.g,0,255),s=r.fitIntoBounds(t.b,0,255),u=r.fitIntoBounds(t.a,0,1);return a.Color.fromBytes(o,n,s,u).toCssRgba()},i=(t,o)=>{const n=r.fitIntoBounds(t.r,0,255),s=r.fitIntoBounds(t.g,0,255),u=r.fitIntoBounds(t.b,0,255),e=r.fitIntoBounds(t.a,0,1),l=r.fitIntoBounds(o.r,0,255),f=r.fitIntoBounds(o.g,0,255),m=r.fitIntoBounds(o.b,0,255);return{r:Math.round((1-e)*l+e*n),g:Math.round((1-e)*f+e*s),b:Math.round((1-e)*m+e*u)}},c=t=>{let o=[t.r,t.g,t.b].map(function(n){return n/=255,n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4)});return o[0]*.2126+o[1]*.7152+o[2]*.0722},d=(t,o)=>{const n=Math.max(t,o),s=Math.min(t,o);return(n+.05)/(s+.05)},F=(t,o)=>d(c(i(t,o)),c(i(o,{r:0,g:0,b:0,a:1})));exports.getColorFromHSV=B;exports.getColorFromHue=I;exports.getColorFromRGBA=R;exports.getContrast=d;exports.getContrastFromTwoRGBAs=F;exports.getHSV=C;exports.getHexValue=g;exports.getLuminance=c;exports.getRGBA=h;exports.getRGBFromRGBA=i;exports.parseColor=p;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("@progress/kendo-drawing"),r=require("./misc.js"),p=(t,o,n=!1,s=!0)=>{if(["hex","rgba"].indexOf(o)===-1)throw new Error(`Unsupported color output format '${o}'. The available options are 'hex' or 'rgba'.`);if(!r.isPresent(t))return;const e=a.parseColor(t.trim(),s);if(r.isPresent(e))return o==="hex"?g(e,n):e.toCssRgba()},g=(t,o)=>o&&t.a<1?t.toCss({alpha:!0}):t.toCss(),C=(t,o=!0)=>{const n=a.parseColor(t,o);return r.isPresent(n)?n.toHSV():{}},h=(t,o=!0)=>{const n=a.parseColor(t,o);return r.isPresent(n)?n.toBytes():{}},B=t=>{const o=r.fitIntoBounds(t.h,0,359.9),n=r.fitIntoBounds(t.s,0,1),s=r.fitIntoBounds(t.v,0,1),u=r.fitIntoBounds(t.a,0,1);return a.Color.fromHSV(o,n,s,u).toCssRgba()},I=t=>B({h:t,s:1,v:1,a:1}),R=t=>{const o=r.fitIntoBounds(t.r,0,255),n=r.fitIntoBounds(t.g,0,255),s=r.fitIntoBounds(t.b,0,255),u=r.fitIntoBounds(t.a,0,1);return a.Color.fromBytes(o,n,s,u).toCssRgba()},i=(t,o)=>{const n=r.fitIntoBounds(t.r,0,255),s=r.fitIntoBounds(t.g,0,255),u=r.fitIntoBounds(t.b,0,255),e=r.fitIntoBounds(t.a,0,1),l=r.fitIntoBounds(o.r,0,255),f=r.fitIntoBounds(o.g,0,255),m=r.fitIntoBounds(o.b,0,255);return{r:Math.round((1-e)*l+e*n),g:Math.round((1-e)*f+e*s),b:Math.round((1-e)*m+e*u)}},c=t=>{let o=[t.r,t.g,t.b].map(function(n){return n/=255,n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4)});return o[0]*.2126+o[1]*.7152+o[2]*.0722},d=(t,o)=>{const n=Math.max(t,o),s=Math.min(t,o);return(n+.05)/(s+.05)},F=(t,o)=>d(c(i(t,o)),c(i(o,{r:0,g:0,b:0})));exports.getColorFromHSV=B;exports.getColorFromHue=I;exports.getColorFromRGBA=R;exports.getContrast=d;exports.getContrastFromTwoRGBAs=F;exports.getHSV=C;exports.getHexValue=g;exports.getLuminance=c;exports.getRGBA=h;exports.getRGBFromRGBA=i;exports.parseColor=p;
@@ -44,7 +44,7 @@ const R = (t, r, o = !1, n = !0) => {
44
44
  return (o + 0.05) / (n + 0.05);
45
45
  }, M = (t, r) => b(
46
46
  i(p(t, r)),
47
- i(p(r, { r: 0, g: 0, b: 0, a: 1 }))
47
+ i(p(r, { r: 0, g: 0, b: 0 }))
48
48
  );
49
49
  export {
50
50
  f as getColorFromHSV,