@progress/kendo-react-inputs 7.1.0-develop.15 → 7.1.0-develop.17
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/NOTICE.txt +11 -18
- package/dist/cdn/js/kendo-react-inputs.js +3 -3
- package/index.js +3 -3
- package/index.mjs +554 -554
- package/package.json +9 -9
package/index.mjs
CHANGED
|
@@ -5,29 +5,29 @@
|
|
|
5
5
|
"use client";
|
|
6
6
|
import * as n from "react";
|
|
7
7
|
import r from "prop-types";
|
|
8
|
-
import { useInternationalization as Nn, useLocalization as
|
|
9
|
-
import { createPropsContext as
|
|
8
|
+
import { useInternationalization as Nn, useLocalization as He, provideLocalizationService as Je, registerForIntl as Pn, registerForLocalization as fa } from "@progress/kendo-react-intl";
|
|
9
|
+
import { createPropsContext as he, validatePackage as pe, usePropsContext as Me, useId as Qe, useCustomComponent as Fe, dispatchEvent as J, getActiveElement as wa, classNames as G, kendoThemeMaps as ne, getTabIndex as re, withIdHOC as et, withPropsContext as je, useDir as Ge, Keys as _, Draggable as en, IconWrap as fe, focusFirstFocusableChild as tn, svgIconPropType as zt, useDraggable as Dn, noop as De, useRtl as Bn, toIconName as Vt, useAsyncFocusBlur as On } from "@progress/kendo-react-common";
|
|
10
10
|
import { caretAltUpIcon as _t, caretAltDownIcon as ht, caretAltExpandIcon as Fn, caretAltLeftIcon as Ia, caretAltRightIcon as La, checkIcon as Mt, xIcon as At, dropletSliderIcon as Tn, paletteIcon as zn, dropletSlashIcon as _n, starOutlineIcon as Ra, starIcon as Va, hyperlinkOpenIcon as Ma } from "@progress/kendo-svg-icons";
|
|
11
11
|
import { FloatingLabel as ha, Label as We } from "@progress/kendo-react-labels";
|
|
12
|
-
import { Button as
|
|
12
|
+
import { Button as ge, ButtonGroup as An } from "@progress/kendo-react-buttons";
|
|
13
13
|
import { parseColor as mt, Color as an } from "@progress/kendo-drawing";
|
|
14
14
|
import { Popup as $n } from "@progress/kendo-react-popup";
|
|
15
15
|
import { SignaturePad as Hn } from "@progress/kendo-inputs-common";
|
|
16
16
|
import { Dialog as Gn } from "@progress/kendo-react-dialogs";
|
|
17
|
-
const
|
|
17
|
+
const me = {
|
|
18
18
|
name: "@progress/kendo-react-inputs",
|
|
19
19
|
productName: "KendoReact",
|
|
20
20
|
productCodes: ["KENDOUIREACT", "KENDOUICOMPLETE"],
|
|
21
|
-
publishDate:
|
|
21
|
+
publishDate: 1706524078,
|
|
22
22
|
version: "",
|
|
23
23
|
licensingDocsUrl: "https://www.telerik.com/kendo-react-ui/components/my-license/"
|
|
24
|
-
}, Xe = "numerictextbox.increment", Ye = "numerictextbox.decrement", $t = "slider.increment", Ht = "slider.decrement",
|
|
24
|
+
}, Xe = "numerictextbox.increment", Ye = "numerictextbox.decrement", $t = "slider.increment", Ht = "slider.decrement", Ae = "slider.dragTitle", _e = "colorGradient.r", nn = "colorGradient.g", sn = "colorGradient.b", rn = "colorGradient.a", ln = "colorGradient.hex", Gt = "colorGradient.contrastRatio", Kt = "colorGradient.colorGradientAALevel", qt = "colorGradient.colorGradientAAALevel", Ut = "colorGradient.colorGradientPass", jt = "colorGradient.colorGradientFail", Wt = "colorGradient.hueSliderLabel", Xt = "colorGradient.alphaSliderLabel", Yt = "colorGradient.toggleInputsButton", on = "flatColorPicker.cancelBtn", cn = "flatColorPicker.applyBtn", Zt = "flatColorPicker.colorGradientBtn", Jt = "flatColorPicker.colorPaletteBtn", Qt = "flatColorPicker.clearBtn", dn = "checkbox.validation", un = "checkbox.optionalText", Kn = "radioButton.validation", ea = "switch.validation", ta = "colorPicker.dropdownButtonAriaLabel", aa = "rating.ariaLabel", na = "signature.clear", sa = "signature.maximize", ra = "signature.minimize", H = {
|
|
25
25
|
[Xe]: "Increase value",
|
|
26
26
|
[Ye]: "Decrease value",
|
|
27
27
|
[$t]: "Increase",
|
|
28
28
|
[Ht]: "Decrease",
|
|
29
|
-
[
|
|
30
|
-
[
|
|
29
|
+
[Ae]: "Drag",
|
|
30
|
+
[_e]: "r",
|
|
31
31
|
[nn]: "g",
|
|
32
32
|
[sn]: "b",
|
|
33
33
|
[rn]: "a",
|
|
@@ -54,7 +54,7 @@ const ge = {
|
|
|
54
54
|
[na]: "Clear",
|
|
55
55
|
[sa]: "Maximize",
|
|
56
56
|
[ra]: "Minimize"
|
|
57
|
-
}, pt = 11111111111111e-7, qn = 0.31111111111111117, Un = 1, fn = 1, hn = 0,
|
|
57
|
+
}, pt = 11111111111111e-7, qn = 0.31111111111111117, Un = 1, fn = 1, hn = 0, ye = /\d/, pn = 15, Na = () => ({
|
|
58
58
|
eventValue: null,
|
|
59
59
|
prevLooseValue: "",
|
|
60
60
|
currentLooseValue: "",
|
|
@@ -64,16 +64,16 @@ const ge = {
|
|
|
64
64
|
decimalSelect: !1,
|
|
65
65
|
valueIsCorrected: !1,
|
|
66
66
|
valueIsOutOfRange: !1
|
|
67
|
-
}), Nt = (a, t) => a !== void 0 ? a : t,
|
|
67
|
+
}), Nt = (a, t) => a !== void 0 ? a : t, ue = (a, t, e) => a === null && a === void 0 ? "" : typeof a == "string" ? a : e.formatNumber(a, t), Pa = (a) => (String(a).split(".")[1] || "").length, mn = (a, t) => Math.max(Pa(a), Pa(t)), jn = (a) => Math.min(a, pn), gn = (a, t) => {
|
|
68
68
|
const e = jn(t);
|
|
69
69
|
return parseFloat(a.toFixed(e));
|
|
70
70
|
}, Da = (a, t, e, s, i, l, c) => {
|
|
71
|
-
const o = mn(a || 0, e || 0), h =
|
|
72
|
-
t.eventValue = h, t.currentLooseValue =
|
|
71
|
+
const o = mn(a || 0, e || 0), h = qe(gn((a || 0) + (e || 0), o), s, i);
|
|
72
|
+
t.eventValue = h, t.currentLooseValue = ue(h, l, c), t.selectionStart = t.selectionEnd = Ze(t.currentLooseValue, ye);
|
|
73
73
|
}, Ba = (a, t, e, s, i, l, c) => {
|
|
74
|
-
const o = mn(a || 0, e || 0), h =
|
|
75
|
-
t.eventValue = h, t.currentLooseValue =
|
|
76
|
-
},
|
|
74
|
+
const o = mn(a || 0, e || 0), h = qe(gn((a || 0) - (e || 0), o), s, i);
|
|
75
|
+
t.eventValue = h, t.currentLooseValue = ue(h, l, c), t.selectionStart = t.selectionEnd = Ze(t.currentLooseValue, ye);
|
|
76
|
+
}, qe = (a, t, e) => a == null ? a : !(a > 1 || a < 1 || a === 1) || e !== void 0 && t !== void 0 && e < t ? null : (e !== void 0 && a > e && (a = e), t !== void 0 && a < t && (a = t), a), Wn = (a, t) => {
|
|
77
77
|
const e = t.findIndex(([i, l]) => !!l && a.indexOf(l) === a.length - l.length);
|
|
78
78
|
if (e === -1)
|
|
79
79
|
return -1;
|
|
@@ -91,10 +91,10 @@ const ge = {
|
|
|
91
91
|
e.selectionStart > a.length && (e.selectionStart = e.selectionEnd = a.length);
|
|
92
92
|
const i = Xn(a, t);
|
|
93
93
|
i !== -1 && e.selectionStart < i && (e.selectionStart = e.selectionEnd = i), e.selectionStart === -1 && (e.selectionStart = e.selectionEnd = 0);
|
|
94
|
-
},
|
|
94
|
+
}, Ve = (a, t, e, s) => {
|
|
95
95
|
a.selectionStart = a.selectionEnd = t, Yn(e, s, a);
|
|
96
96
|
}, Pt = (a, t, e, s) => {
|
|
97
|
-
a.eventValue = s.parseNumber(a.prevLooseValue, t), a.currentLooseValue = a.prevLooseValue, a.valueIsCorrected = !0,
|
|
97
|
+
a.eventValue = s.parseNumber(a.prevLooseValue, t), a.currentLooseValue = a.prevLooseValue, a.valueIsCorrected = !0, Ve(a, a.selectionStart, a.currentLooseValue, e);
|
|
98
98
|
}, Zn = (a, t) => {
|
|
99
99
|
const e = String(a.currentLooseValue), s = String(a.prevLooseValue);
|
|
100
100
|
return e.split(t.minusSign).length !== s.split(t.minusSign).length && e.length === s.length + t.minusSign.length;
|
|
@@ -114,10 +114,10 @@ const ge = {
|
|
|
114
114
|
return [e, s, i, l].map((d) => d.replace(o, "")).join("").split("").filter((d, p, m) => m.indexOf(d) === p).join("");
|
|
115
115
|
}, Dt = (a, t) => {
|
|
116
116
|
const e = a.indexOf(t.decimal);
|
|
117
|
-
return e > -1 ? e : Ze(a,
|
|
118
|
-
}, ia = (a) => a.split("").reverse().join(""), Ze = (a, t) => a.length - ia(a).search(t), nt = (a) => a.split(a[a.search(
|
|
117
|
+
return e > -1 ? e : Ze(a, ye);
|
|
118
|
+
}, ia = (a) => a.split("").reverse().join(""), Ze = (a, t) => a.length - ia(a).search(t), nt = (a) => a.split(a[a.search(ye)])[0], st = (a) => {
|
|
119
119
|
const t = ia(a);
|
|
120
|
-
return ia(t.split(t[t.search(
|
|
120
|
+
return ia(t.split(t[t.search(ye)])[0]);
|
|
121
121
|
}, Bt = (a, t) => a.search(t), Oa = (a, t) => {
|
|
122
122
|
const e = a.indexOf(t);
|
|
123
123
|
return e > -1 ? a.length - e - 1 : 0;
|
|
@@ -129,13 +129,13 @@ const ge = {
|
|
|
129
129
|
return e + 1;
|
|
130
130
|
let o = 0;
|
|
131
131
|
for (let d = 0; d < e; d++)
|
|
132
|
-
|
|
132
|
+
ye.test(a.charAt(d)) && o++;
|
|
133
133
|
let h = 0;
|
|
134
134
|
for (; o > 0 && t.length > h; )
|
|
135
|
-
|
|
135
|
+
ye.test(t.charAt(h)) && o--, h++;
|
|
136
136
|
return h;
|
|
137
137
|
}, Ta = (a, t, e) => {
|
|
138
|
-
const s = { ...a }, { prevLooseValue: i } = s, l = e.numberSymbols(), c = ts(t, e), o = String(s.currentLooseValue), h = String(i), d = new RegExp(`[^\\d\\${l.decimal}]`, "g"), p = new RegExp(`[^\\d\\${l.decimal}\\${l.group}]`, "g"), m = new RegExp(`[\\d\\${l.decimal}\\${l.group}]`), f = o.replace(d, ""), v = Bt(o,
|
|
138
|
+
const s = { ...a }, { prevLooseValue: i } = s, l = e.numberSymbols(), c = ts(t, e), o = String(s.currentLooseValue), h = String(i), d = new RegExp(`[^\\d\\${l.decimal}]`, "g"), p = new RegExp(`[^\\d\\${l.decimal}\\${l.group}]`, "g"), m = new RegExp(`[\\d\\${l.decimal}\\${l.group}]`), f = o.replace(d, ""), v = Bt(o, ye), N = v === -1 ? -1 : Ze(o, ye), P = o.indexOf(l.decimal), V = (o.substring(0, v) + o.substring(v, N).replace(p, "") + o.substring(N, o.length)).split("").filter((g) => c.indexOf(g) !== -1 || g.search(m) !== -1).join(""), R = e.formatNumber(qn, t).replace(d, ""), S = R.indexOf(l.decimal), I = S > -1 ? R.length - S - 1 : 0, O = e.formatNumber(Un, t).replace(d, ""), B = O.indexOf(l.decimal), w = B > -1 ? O.length - B - 1 : 0, {
|
|
139
139
|
positiveInfo: F,
|
|
140
140
|
negativeInfo: A,
|
|
141
141
|
zeroInfo: T,
|
|
@@ -145,7 +145,7 @@ const ge = {
|
|
|
145
145
|
if (o === "")
|
|
146
146
|
return s.eventValue = null, s.currentLooseValue = "", s;
|
|
147
147
|
if (s.currentLooseValue === l.minusSign && e.formatNumber(-0, t) !== h)
|
|
148
|
-
return s.eventValue = -0, s.currentLooseValue =
|
|
148
|
+
return s.eventValue = -0, s.currentLooseValue = ue(s.eventValue, t, e), Ve(
|
|
149
149
|
s,
|
|
150
150
|
Dt(s.currentLooseValue, l),
|
|
151
151
|
s.currentLooseValue,
|
|
@@ -153,13 +153,13 @@ const ge = {
|
|
|
153
153
|
), s;
|
|
154
154
|
if (s.currentLooseValue === l.decimal) {
|
|
155
155
|
s.eventValue = 0;
|
|
156
|
-
const y =
|
|
156
|
+
const y = ue(s.eventValue, t, e);
|
|
157
157
|
if (w === 0 && I > 0) {
|
|
158
|
-
const E = Ze(y,
|
|
158
|
+
const E = Ze(y, ye);
|
|
159
159
|
s.currentLooseValue = y.substring(0, E) + l.decimal + y.substring(E);
|
|
160
160
|
} else
|
|
161
161
|
s.currentLooseValue = y;
|
|
162
|
-
return
|
|
162
|
+
return Ve(
|
|
163
163
|
s,
|
|
164
164
|
Dt(s.currentLooseValue, l) + 1,
|
|
165
165
|
s.currentLooseValue,
|
|
@@ -168,9 +168,9 @@ const ge = {
|
|
|
168
168
|
}
|
|
169
169
|
if (Zn(s, l)) {
|
|
170
170
|
const y = e.parseNumber(i, t);
|
|
171
|
-
s.eventValue = -(y !== null ? y : 0), s.currentLooseValue =
|
|
172
|
-
const E = Bt(s.currentLooseValue,
|
|
173
|
-
return
|
|
171
|
+
s.eventValue = -(y !== null ? y : 0), s.currentLooseValue = ue(s.eventValue, t, e);
|
|
172
|
+
const E = Bt(s.currentLooseValue, ye), D = Bt(h, ye);
|
|
173
|
+
return Ve(
|
|
174
174
|
s,
|
|
175
175
|
s.selectionEnd - 1 + (E - D),
|
|
176
176
|
s.currentLooseValue,
|
|
@@ -178,7 +178,7 @@ const ge = {
|
|
|
178
178
|
), s;
|
|
179
179
|
}
|
|
180
180
|
if (Jn(s, l))
|
|
181
|
-
return s.eventValue = e.parseNumber(s.currentLooseValue, t),
|
|
181
|
+
return s.eventValue = e.parseNumber(s.currentLooseValue, t), Ve(
|
|
182
182
|
s,
|
|
183
183
|
s.selectionStart,
|
|
184
184
|
s.currentLooseValue,
|
|
@@ -187,25 +187,25 @@ const ge = {
|
|
|
187
187
|
if (Qn(s, l))
|
|
188
188
|
return Pt(s, t, L, e), s;
|
|
189
189
|
if (Q)
|
|
190
|
-
return s.eventValue = e.parseNumber(o, t) / 100, s.currentLooseValue =
|
|
190
|
+
return s.eventValue = e.parseNumber(o, t) / 100, s.currentLooseValue = ue(s.eventValue, t, e), s;
|
|
191
191
|
if (String(s.currentLooseValue).replace(/[^\d]/g, "").length > pn || f !== o && o && $ && L.findIndex(([E, D]) => {
|
|
192
|
-
const ee = o.indexOf(E),
|
|
193
|
-
return E && D ?
|
|
192
|
+
const ee = o.indexOf(E), Z = o.indexOf(D), M = ee === 0, b = Z === o.length - D.length, q = ee + E.length !== v && v !== -1 && o[ee + E.length] !== l.decimal, K = Z !== N && N !== -1 && o[Z - 1] !== l.decimal;
|
|
193
|
+
return E && D ? q || K ? !1 : M && b : E ? q ? !1 : M : D ? K ? !1 : b : !1;
|
|
194
194
|
}) === -1)
|
|
195
195
|
return Pt(s, t, L, e), s;
|
|
196
196
|
if (f[f.length - 1] === l.decimal && I > 0)
|
|
197
|
-
return s.eventValue = e.parseNumber(o, t), s.currentLooseValue =
|
|
197
|
+
return s.eventValue = e.parseNumber(o, t), s.currentLooseValue = V, s;
|
|
198
198
|
if (s.currentLooseValue && i && (c + l.decimal + l.group).split("").findIndex((E) => o.split("").filter((D) => D === E).length < h.split("").filter((D) => D === E).length && o.length + 1 === h.length ? !(E === l.decimal && Oa(h.replace(d, ""), l.decimal) === 0) : !1) > -1)
|
|
199
199
|
return s.eventValue = e.parseNumber(a.prevLooseValue, t), s.currentLooseValue = a.prevLooseValue, s;
|
|
200
200
|
const k = Oa(f, l.decimal), u = f[f.length - 1] === "0";
|
|
201
201
|
if (U && u && k < w)
|
|
202
|
-
return s.eventValue = e.parseNumber(s.currentLooseValue, t), s.currentLooseValue =
|
|
202
|
+
return s.eventValue = e.parseNumber(s.currentLooseValue, t), s.currentLooseValue = ue(s.eventValue, t, e), s;
|
|
203
203
|
if (k > 0) {
|
|
204
204
|
const y = o.substring(0, P);
|
|
205
205
|
if (u && (!y || h.indexOf(y) !== 0)) {
|
|
206
206
|
s.eventValue = e.parseNumber(s.currentLooseValue, t);
|
|
207
|
-
const E =
|
|
208
|
-
return
|
|
207
|
+
const E = ue(s.eventValue, t, e);
|
|
208
|
+
return Ve(
|
|
209
209
|
s,
|
|
210
210
|
Fa(o, E, s.selectionEnd, U, d),
|
|
211
211
|
E,
|
|
@@ -214,34 +214,34 @@ const ge = {
|
|
|
214
214
|
}
|
|
215
215
|
if (k > I) {
|
|
216
216
|
const E = o.indexOf(l.decimal), D = o.substring(0, E) + o.substring(E, E + 1 + I) + o.substring(N, String(s.currentLooseValue).length);
|
|
217
|
-
return s.eventValue = e.parseNumber(D, t), s.currentLooseValue = D,
|
|
217
|
+
return s.eventValue = e.parseNumber(D, t), s.currentLooseValue = D, Ve(s, s.selectionStart, D, L), s;
|
|
218
218
|
}
|
|
219
219
|
if (w !== I && k <= I && u)
|
|
220
|
-
return s.eventValue = e.parseNumber(s.currentLooseValue, t), s.currentLooseValue =
|
|
220
|
+
return s.eventValue = e.parseNumber(s.currentLooseValue, t), s.currentLooseValue = V, s;
|
|
221
221
|
if (k < w)
|
|
222
|
-
return s.eventValue = e.parseNumber(s.currentLooseValue, t), s.currentLooseValue =
|
|
222
|
+
return s.eventValue = e.parseNumber(s.currentLooseValue, t), s.currentLooseValue = ue(s.eventValue, t, e), s;
|
|
223
223
|
}
|
|
224
224
|
}
|
|
225
225
|
if (s.eventValue = e.parseNumber(s.currentLooseValue, t), Q && (s.eventValue = s.eventValue / 100), typeof s.eventValue == "number") {
|
|
226
|
-
const g =
|
|
227
|
-
o.length === 1 ?
|
|
226
|
+
const g = ue(s.eventValue, t, e);
|
|
227
|
+
o.length === 1 ? Ve(s, Dt(g, l), g, L) : Ve(
|
|
228
228
|
s,
|
|
229
229
|
Fa(o, g, s.selectionEnd, U, d),
|
|
230
230
|
g,
|
|
231
231
|
L
|
|
232
232
|
), s.currentLooseValue = g;
|
|
233
233
|
} else
|
|
234
|
-
s.currentLooseValue =
|
|
234
|
+
s.currentLooseValue = ue(e.parseNumber(f), t, e);
|
|
235
235
|
return s;
|
|
236
|
-
}, as = "Please enter a valid value!", ns =
|
|
237
|
-
me
|
|
238
|
-
const e =
|
|
236
|
+
}, as = "Please enter a valid value!", ns = he(), $e = n.forwardRef((a, t) => {
|
|
237
|
+
pe(me);
|
|
238
|
+
const e = Me(ns, a), s = Qe(), i = e.id || s, l = Nn(), c = He(), o = n.useRef(null), h = n.useRef(), [d, p] = n.useState(!1), m = n.useRef(Na()), f = n.useRef(!1), v = n.useRef(), N = n.useRef(e.defaultValue), P = ue(
|
|
239
239
|
m.current.focused && !e.disabled ? m.current.currentLooseValue : Nt(e.value, N.current),
|
|
240
240
|
e.format,
|
|
241
241
|
l
|
|
242
242
|
);
|
|
243
243
|
v.current = P;
|
|
244
|
-
const [
|
|
244
|
+
const [V] = Fe(e.prefix), [R] = Fe(e.suffix);
|
|
245
245
|
n.useEffect(
|
|
246
246
|
() => {
|
|
247
247
|
o.current && o.current.setCustomValidity && o.current.setCustomValidity(
|
|
@@ -265,10 +265,10 @@ const ge = {
|
|
|
265
265
|
[e.required]
|
|
266
266
|
), w = n.useCallback(
|
|
267
267
|
() => {
|
|
268
|
-
const
|
|
268
|
+
const M = e.validationMessage !== void 0, b = I(), q = e.valid !== void 0 ? e.valid : !m.current.valueIsOutOfRange && (!B() || b != null);
|
|
269
269
|
return {
|
|
270
|
-
customError:
|
|
271
|
-
valid:
|
|
270
|
+
customError: M,
|
|
271
|
+
valid: q,
|
|
272
272
|
valueMissing: b == null
|
|
273
273
|
};
|
|
274
274
|
},
|
|
@@ -281,11 +281,11 @@ const ge = {
|
|
|
281
281
|
[e]
|
|
282
282
|
), T = n.useCallback(
|
|
283
283
|
() => {
|
|
284
|
-
const
|
|
284
|
+
const M = {
|
|
285
285
|
element: o.current,
|
|
286
286
|
focus: S
|
|
287
287
|
};
|
|
288
|
-
return Object.defineProperty(
|
|
288
|
+
return Object.defineProperty(M, "name", { get: O }), Object.defineProperty(M, "value", { get: I }), Object.defineProperty(M, "validity", { get: w }), Object.defineProperty(M, "validityStyles", { get: F }), Object.defineProperty(M, "required", { get: B }), Object.defineProperty(M, "props", { get: A }), M;
|
|
289
289
|
},
|
|
290
290
|
[O, I, w, F, B, S, A]
|
|
291
291
|
);
|
|
@@ -305,38 +305,38 @@ const ge = {
|
|
|
305
305
|
}),
|
|
306
306
|
[e.value]
|
|
307
307
|
), L = n.useCallback(
|
|
308
|
-
(
|
|
308
|
+
(M, b) => {
|
|
309
309
|
if (e.disabled)
|
|
310
310
|
return;
|
|
311
311
|
h.current = b.eventValue, N.current = b.eventValue;
|
|
312
|
-
const
|
|
313
|
-
|
|
312
|
+
const q = ue(qe(b.eventValue, e.min, e.max), e.format, l), K = qe(l.parseNumber(q, e.format), e.min, e.max);
|
|
313
|
+
K !== b.eventValue && (b.valueIsOutOfRange = !0, b.eventValue = K, N.current = K), e.value !== b.eventValue && J(
|
|
314
314
|
e.onChange,
|
|
315
|
-
|
|
315
|
+
M,
|
|
316
316
|
T(),
|
|
317
317
|
{ value: b.eventValue }
|
|
318
|
-
), h.current = void 0, m.current = b, p((
|
|
318
|
+
), h.current = void 0, m.current = b, p((ie) => !ie);
|
|
319
319
|
},
|
|
320
320
|
[e.value, e.onChange, e.disabled, p, T]
|
|
321
321
|
), $ = n.useCallback(
|
|
322
|
-
(
|
|
322
|
+
(M) => {
|
|
323
323
|
const b = x();
|
|
324
|
-
f.current = !1, L(
|
|
324
|
+
f.current = !1, L(M, Ta(b, e.format, l));
|
|
325
325
|
},
|
|
326
326
|
[e.format, e.onChange, l, L, x]
|
|
327
327
|
), U = n.useCallback(
|
|
328
|
-
(
|
|
328
|
+
(M) => {
|
|
329
329
|
let b = x();
|
|
330
|
-
const
|
|
330
|
+
const q = l.parseNumber(String(b.currentLooseValue), e.format);
|
|
331
331
|
if (b.selectionEnd > b.selectionStart && b.selectionEnd - b.selectionStart === String(b.currentLooseValue).length) {
|
|
332
|
-
const
|
|
333
|
-
f.current = !
|
|
332
|
+
const K = l.numberSymbols(), W = K && M.key === K.minusSign, ie = K && M.key === K.decimal;
|
|
333
|
+
f.current = !W && !ie;
|
|
334
334
|
return;
|
|
335
335
|
}
|
|
336
|
-
switch (
|
|
336
|
+
switch (M.keyCode) {
|
|
337
337
|
case 38:
|
|
338
338
|
Da(
|
|
339
|
-
|
|
339
|
+
q,
|
|
340
340
|
b,
|
|
341
341
|
e.step,
|
|
342
342
|
e.min,
|
|
@@ -347,7 +347,7 @@ const ge = {
|
|
|
347
347
|
break;
|
|
348
348
|
case 40:
|
|
349
349
|
Ba(
|
|
350
|
-
|
|
350
|
+
q,
|
|
351
351
|
b,
|
|
352
352
|
e.step,
|
|
353
353
|
e.min,
|
|
@@ -359,19 +359,19 @@ const ge = {
|
|
|
359
359
|
case 13: {
|
|
360
360
|
if (e.rangeOnEnter === !1)
|
|
361
361
|
return;
|
|
362
|
-
const
|
|
363
|
-
b.eventValue =
|
|
362
|
+
const K = ue(qe(q, e.min, e.max), e.format, l), W = qe(l.parseNumber(K, e.format), e.min, e.max);
|
|
363
|
+
b.eventValue = W, b.currentLooseValue = ue(W, e.format, l), b.selectionStart = b.selectionEnd = b.currentLooseValue.length;
|
|
364
364
|
break;
|
|
365
365
|
}
|
|
366
366
|
case 110: {
|
|
367
|
-
const
|
|
368
|
-
|
|
367
|
+
const K = o.current, W = l.numberSymbols();
|
|
368
|
+
K && (b.currentLooseValue = b.currentLooseValue.slice(0, b.selectionStart) + W.decimal + b.currentLooseValue.slice(b.selectionEnd), b.selectionStart = b.selectionEnd = b.selectionStart + 1, b = Ta(b, e.format, l));
|
|
369
369
|
break;
|
|
370
370
|
}
|
|
371
371
|
default:
|
|
372
372
|
return;
|
|
373
373
|
}
|
|
374
|
-
|
|
374
|
+
M.preventDefault(), L(M, b);
|
|
375
375
|
},
|
|
376
376
|
[e.format, e.min, e.max, e.step, e.onChange, e.rangeOnEnter, L, x]
|
|
377
377
|
), Q = n.useCallback(
|
|
@@ -380,7 +380,7 @@ const ge = {
|
|
|
380
380
|
},
|
|
381
381
|
[]
|
|
382
382
|
), g = n.useCallback(
|
|
383
|
-
(
|
|
383
|
+
(M) => {
|
|
384
384
|
if (e.readOnly || e.disabled)
|
|
385
385
|
return;
|
|
386
386
|
const b = x();
|
|
@@ -392,11 +392,11 @@ const ge = {
|
|
|
392
392
|
e.max,
|
|
393
393
|
e.format,
|
|
394
394
|
l
|
|
395
|
-
), L(
|
|
395
|
+
), L(M, b);
|
|
396
396
|
},
|
|
397
397
|
[e.format, e.min, e.max, e.step, e.onChange, e.readOnly, e.disabled, L, x]
|
|
398
398
|
), k = n.useCallback(
|
|
399
|
-
(
|
|
399
|
+
(M) => {
|
|
400
400
|
if (e.readOnly || e.disabled)
|
|
401
401
|
return;
|
|
402
402
|
const b = x();
|
|
@@ -408,40 +408,40 @@ const ge = {
|
|
|
408
408
|
e.max,
|
|
409
409
|
e.format,
|
|
410
410
|
l
|
|
411
|
-
), L(
|
|
411
|
+
), L(M, b);
|
|
412
412
|
},
|
|
413
413
|
[e.format, e.min, e.max, e.step, e.onChange, e.readOnly, e.disabled, L, x]
|
|
414
414
|
), u = n.useCallback(
|
|
415
|
-
(
|
|
415
|
+
(M) => {
|
|
416
416
|
const b = wa(document);
|
|
417
|
-
!document || b !== o.current || !o.current || e.readOnly || e.disabled || (
|
|
417
|
+
!document || b !== o.current || !o.current || e.readOnly || e.disabled || (M.nativeEvent.deltaY < 0 && g(M), M.nativeEvent.deltaY > 0 && k(M));
|
|
418
418
|
},
|
|
419
419
|
[g, k, e.disabled, e.readOnly]
|
|
420
420
|
), y = n.useCallback(
|
|
421
|
-
(
|
|
421
|
+
(M) => {
|
|
422
422
|
m.current.currentLooseValue = v.current, m.current.focused = !0, J(
|
|
423
423
|
e.onFocus,
|
|
424
|
-
|
|
424
|
+
M,
|
|
425
425
|
T(),
|
|
426
426
|
{}
|
|
427
427
|
), p((b) => !b);
|
|
428
428
|
},
|
|
429
429
|
[e.onFocus, p, T]
|
|
430
430
|
), E = n.useCallback(
|
|
431
|
-
(
|
|
431
|
+
(M) => {
|
|
432
432
|
m.current = Na(), J(
|
|
433
433
|
e.onBlur,
|
|
434
|
-
|
|
434
|
+
M,
|
|
435
435
|
T(),
|
|
436
436
|
{}
|
|
437
437
|
), p((b) => !b);
|
|
438
438
|
},
|
|
439
439
|
[e.onBlur, p, T]
|
|
440
440
|
), D = n.useCallback(
|
|
441
|
-
(
|
|
441
|
+
(M) => {
|
|
442
442
|
if (document && o.current) {
|
|
443
443
|
const b = wa(document);
|
|
444
|
-
|
|
444
|
+
M.preventDefault(), b !== o.current && o.current.focus();
|
|
445
445
|
}
|
|
446
446
|
},
|
|
447
447
|
[]
|
|
@@ -452,7 +452,7 @@ const ge = {
|
|
|
452
452
|
},
|
|
453
453
|
[d]
|
|
454
454
|
);
|
|
455
|
-
const ee = !F() || w().valid,
|
|
455
|
+
const ee = !F() || w().valid, Z = /* @__PURE__ */ n.createElement(
|
|
456
456
|
"span",
|
|
457
457
|
{
|
|
458
458
|
dir: e.dir,
|
|
@@ -461,9 +461,9 @@ const ge = {
|
|
|
461
461
|
"k-input",
|
|
462
462
|
"k-numerictextbox",
|
|
463
463
|
{
|
|
464
|
-
[`k-input-${
|
|
464
|
+
[`k-input-${ne.sizeMap[e.size] || e.size}`]: e.size,
|
|
465
465
|
[`k-input-${e.fillMode}`]: e.fillMode,
|
|
466
|
-
[`k-rounded-${
|
|
466
|
+
[`k-rounded-${ne.roundedMap[e.rounded] || e.rounded}`]: e.rounded,
|
|
467
467
|
"k-invalid": !ee,
|
|
468
468
|
"k-required": e.required,
|
|
469
469
|
"k-disabled": e.disabled
|
|
@@ -472,13 +472,13 @@ const ge = {
|
|
|
472
472
|
),
|
|
473
473
|
"aria-disabled": e.disabled ? "true" : void 0
|
|
474
474
|
},
|
|
475
|
-
/* @__PURE__ */ n.createElement(
|
|
475
|
+
/* @__PURE__ */ n.createElement(V, null),
|
|
476
476
|
/* @__PURE__ */ n.createElement(
|
|
477
477
|
"input",
|
|
478
478
|
{
|
|
479
479
|
role: "spinbutton",
|
|
480
480
|
value: P === null ? "" : P,
|
|
481
|
-
tabIndex:
|
|
481
|
+
tabIndex: re(e.tabIndex, e.disabled),
|
|
482
482
|
accessKey: e.accessKey,
|
|
483
483
|
disabled: e.disabled,
|
|
484
484
|
title: e.title,
|
|
@@ -507,7 +507,7 @@ const ge = {
|
|
|
507
507
|
ref: o
|
|
508
508
|
}
|
|
509
509
|
),
|
|
510
|
-
/* @__PURE__ */ n.createElement(
|
|
510
|
+
/* @__PURE__ */ n.createElement(R, null),
|
|
511
511
|
e.children,
|
|
512
512
|
e.spinners && /* @__PURE__ */ n.createElement(
|
|
513
513
|
"span",
|
|
@@ -516,7 +516,7 @@ const ge = {
|
|
|
516
516
|
onMouseDown: D
|
|
517
517
|
},
|
|
518
518
|
/* @__PURE__ */ n.createElement(
|
|
519
|
-
|
|
519
|
+
ge,
|
|
520
520
|
{
|
|
521
521
|
tabIndex: -1,
|
|
522
522
|
type: "button",
|
|
@@ -530,7 +530,7 @@ const ge = {
|
|
|
530
530
|
}
|
|
531
531
|
),
|
|
532
532
|
/* @__PURE__ */ n.createElement(
|
|
533
|
-
|
|
533
|
+
ge,
|
|
534
534
|
{
|
|
535
535
|
tabIndex: -1,
|
|
536
536
|
type: "button",
|
|
@@ -554,13 +554,13 @@ const ge = {
|
|
|
554
554
|
editorValid: ee,
|
|
555
555
|
editorDisabled: e.disabled,
|
|
556
556
|
editorPlaceholder: e.placeholder,
|
|
557
|
-
children:
|
|
557
|
+
children: Z,
|
|
558
558
|
style: { width: e.width },
|
|
559
559
|
dir: e.dir
|
|
560
560
|
}
|
|
561
|
-
) :
|
|
561
|
+
) : Z;
|
|
562
562
|
});
|
|
563
|
-
|
|
563
|
+
$e.propTypes = {
|
|
564
564
|
value: r.number,
|
|
565
565
|
defaultValue: r.number,
|
|
566
566
|
step: r.number,
|
|
@@ -606,8 +606,8 @@ Ae.propTypes = {
|
|
|
606
606
|
rounded: r.oneOf([null, "small", "medium", "large", "full"]),
|
|
607
607
|
fillMode: r.oneOf([null, "solid", "flat", "outline"])
|
|
608
608
|
};
|
|
609
|
-
|
|
610
|
-
|
|
609
|
+
$e.displayName = "KendoNumericTextBox";
|
|
610
|
+
$e.defaultProps = {
|
|
611
611
|
prefix: (a) => null,
|
|
612
612
|
suffix: (a) => null,
|
|
613
613
|
step: 1,
|
|
@@ -626,28 +626,28 @@ Ae.defaultProps = {
|
|
|
626
626
|
rounded: "medium",
|
|
627
627
|
fillMode: "solid"
|
|
628
628
|
};
|
|
629
|
-
const
|
|
629
|
+
const ae = (a) => a != null, se = (a, t, e) => !ae(a) || isNaN(a) || a <= t ? t : a >= e ? e : a, Be = (a, t, e = !0) => {
|
|
630
630
|
if (["hex", "rgba"].indexOf(t) === -1)
|
|
631
631
|
throw new Error(`Unsupported color output format '${t}'. The available options are 'hex' or 'rgba'.`);
|
|
632
|
-
if (!
|
|
632
|
+
if (!ae(a))
|
|
633
633
|
return;
|
|
634
634
|
const i = mt(a.trim(), e);
|
|
635
|
-
if (
|
|
635
|
+
if (ae(i))
|
|
636
636
|
return t === "hex" ? i.toCss() : i.toCssRgba();
|
|
637
637
|
}, Ot = (a, t = !0) => {
|
|
638
638
|
const e = mt(a, t);
|
|
639
|
-
return
|
|
640
|
-
},
|
|
639
|
+
return ae(e) ? e.toHSV() : {};
|
|
640
|
+
}, Ue = (a, t = !0) => {
|
|
641
641
|
const e = mt(a, t);
|
|
642
|
-
return
|
|
642
|
+
return ae(e) ? e.toBytes() : {};
|
|
643
643
|
}, pa = (a) => {
|
|
644
|
-
const t =
|
|
644
|
+
const t = se(a.h, 0, 359.9), e = se(a.s, 0, 1), s = se(a.v, 0, 1), i = se(a.a, 0, 1);
|
|
645
645
|
return an.fromHSV(t, e, s, i).toCssRgba();
|
|
646
646
|
}, rt = (a) => pa({ h: a, s: 1, v: 1, a: 1 }), ss = (a) => {
|
|
647
|
-
const t =
|
|
647
|
+
const t = se(a.r, 0, 255), e = se(a.g, 0, 255), s = se(a.b, 0, 255), i = se(a.a, 0, 1);
|
|
648
648
|
return an.fromBytes(t, e, s, i).toCssRgba();
|
|
649
649
|
}, za = (a, t) => {
|
|
650
|
-
const e =
|
|
650
|
+
const e = se(a.r, 0, 255), s = se(a.g, 0, 255), i = se(a.b, 0, 255), l = se(a.a, 0, 1), c = se(t.r, 0, 255), o = se(t.g, 0, 255), h = se(t.b, 0, 255);
|
|
651
651
|
return {
|
|
652
652
|
r: Math.round((1 - l) * c + l * e),
|
|
653
653
|
g: Math.round((1 - l) * o + l * s),
|
|
@@ -691,7 +691,7 @@ const ne = (a) => a != null, le = (a, t, e) => !ne(a) || isNaN(a) || a <= t ? t
|
|
|
691
691
|
let e = t.target.parentNode;
|
|
692
692
|
e && e.classList.contains("k-empty") && e.classList.remove("k-empty");
|
|
693
693
|
}
|
|
694
|
-
}, me
|
|
694
|
+
}, pe(me), this.state = {
|
|
695
695
|
value: this.props.defaultValue || la.defaultProps.defaultValue
|
|
696
696
|
};
|
|
697
697
|
}
|
|
@@ -776,18 +776,18 @@ const ne = (a) => a != null, le = (a, t, e) => !ne(a) || isNaN(a) || a <= t ? t
|
|
|
776
776
|
style: v,
|
|
777
777
|
ariaLabel: N,
|
|
778
778
|
...P
|
|
779
|
-
} = this.props,
|
|
779
|
+
} = this.props, V = s || this._inputId, R = !this.validityStyles || this.validity.valid, S = G(a, "k-input k-input-md k-rounded-md k-input-solid"), I = /* @__PURE__ */ n.createElement(
|
|
780
780
|
"input",
|
|
781
781
|
{
|
|
782
782
|
"aria-labelledby": p,
|
|
783
783
|
"aria-describedby": m,
|
|
784
784
|
"aria-disabled": this.props.disabled || void 0,
|
|
785
|
-
"aria-invalid": !
|
|
785
|
+
"aria-invalid": !R || void 0,
|
|
786
786
|
"aria-label": N || void 0,
|
|
787
787
|
...P,
|
|
788
788
|
style: t ? void 0 : v,
|
|
789
789
|
value: this.value,
|
|
790
|
-
id:
|
|
790
|
+
id: V,
|
|
791
791
|
className: S,
|
|
792
792
|
onChange: this.handleChange,
|
|
793
793
|
onAnimationStart: this.handleAutoFill,
|
|
@@ -801,9 +801,9 @@ const ne = (a) => a != null, le = (a, t, e) => !ne(a) || isNaN(a) || a <= t ? t
|
|
|
801
801
|
{
|
|
802
802
|
label: t,
|
|
803
803
|
labelClassName: e,
|
|
804
|
-
editorId:
|
|
804
|
+
editorId: V,
|
|
805
805
|
editorValue: String(this.value),
|
|
806
|
-
editorValid:
|
|
806
|
+
editorValid: R,
|
|
807
807
|
editorDisabled: P.disabled,
|
|
808
808
|
editorPlaceholder: P.placeholder,
|
|
809
809
|
children: I,
|
|
@@ -831,15 +831,15 @@ gt.defaultProps = {
|
|
|
831
831
|
required: !1,
|
|
832
832
|
validityStyles: !0
|
|
833
833
|
};
|
|
834
|
-
const is =
|
|
834
|
+
const is = he(), vn = et(je(is, gt));
|
|
835
835
|
vn.displayName = "KendoReactInput";
|
|
836
836
|
class ls extends n.Component {
|
|
837
837
|
constructor(t) {
|
|
838
838
|
super(t), this.onChange = (e) => {
|
|
839
|
-
const s = e.target.value, i =
|
|
840
|
-
this.setState({ hex: s }),
|
|
839
|
+
const s = e.target.value, i = Be(s, "rgba");
|
|
840
|
+
this.setState({ hex: s }), ae(i) && this.props.onHexChange(s, i, e);
|
|
841
841
|
}, this.onBlur = () => {
|
|
842
|
-
|
|
842
|
+
ae(Be(this.state.hex, "rgba")) || this.setState({ hex: this.state.originalHex });
|
|
843
843
|
}, this.state = { hex: this.props.hex, originalHex: this.props.hex };
|
|
844
844
|
}
|
|
845
845
|
render() {
|
|
@@ -857,7 +857,7 @@ class ls extends n.Component {
|
|
|
857
857
|
return t.hex !== e.originalHex ? { hex: t.hex, originalHex: t.hex } : null;
|
|
858
858
|
}
|
|
859
859
|
}
|
|
860
|
-
const
|
|
860
|
+
const Te = ["rgba", "rgb", "hex"];
|
|
861
861
|
class ma extends n.Component {
|
|
862
862
|
constructor(t) {
|
|
863
863
|
super(t), this.onRgbaRChange = (e) => {
|
|
@@ -868,12 +868,12 @@ class ma extends n.Component {
|
|
|
868
868
|
this.dispatchRgbaChange({ b: e.value }, e);
|
|
869
869
|
}, this.onRgbaAChange = (e) => {
|
|
870
870
|
this.dispatchRgbaChange({ a: e.value }, e);
|
|
871
|
-
}, this.state = { inputMode: t.defaultInputMode ||
|
|
871
|
+
}, this.state = { inputMode: t.defaultInputMode || Te[1] };
|
|
872
872
|
}
|
|
873
873
|
render() {
|
|
874
|
-
const t = Je(this), e = t.toLanguageString(
|
|
874
|
+
const t = Je(this), e = t.toLanguageString(_e, H[ln]), s = t.toLanguageString(_e, H[_e]), i = t.toLanguageString(_e, H[nn]), l = t.toLanguageString(_e, H[sn]), c = t.toLanguageString(_e, H[rn]), o = t.toLanguageString(Yt, H[Yt]);
|
|
875
875
|
return /* @__PURE__ */ n.createElement("div", { className: "k-colorgradient-inputs k-hstack" }, /* @__PURE__ */ n.createElement("div", { className: "k-vstack" }, /* @__PURE__ */ n.createElement(
|
|
876
|
-
|
|
876
|
+
ge,
|
|
877
877
|
{
|
|
878
878
|
"aria-label": o,
|
|
879
879
|
fillMode: "flat",
|
|
@@ -890,7 +890,7 @@ class ma extends n.Component {
|
|
|
890
890
|
disabled: this.props.disabled
|
|
891
891
|
}
|
|
892
892
|
)), /* @__PURE__ */ n.createElement(We, { className: "k-colorgradient-input-label" }, e)), (this.state.inputMode === "rgb" || this.state.inputMode === "rgba") && /* @__PURE__ */ n.createElement(n.Fragment, null, /* @__PURE__ */ n.createElement("div", { className: "k-vstack" }, /* @__PURE__ */ n.createElement(
|
|
893
|
-
|
|
893
|
+
$e,
|
|
894
894
|
{
|
|
895
895
|
inputType: "number",
|
|
896
896
|
value: this.props.rgba.r,
|
|
@@ -903,7 +903,7 @@ class ma extends n.Component {
|
|
|
903
903
|
disabled: this.props.disabled
|
|
904
904
|
}
|
|
905
905
|
), /* @__PURE__ */ n.createElement(We, { className: "k-colorgradient-input-label" }, s)), /* @__PURE__ */ n.createElement("div", { className: "k-vstack" }, /* @__PURE__ */ n.createElement(
|
|
906
|
-
|
|
906
|
+
$e,
|
|
907
907
|
{
|
|
908
908
|
inputType: "number",
|
|
909
909
|
value: this.props.rgba.g,
|
|
@@ -916,7 +916,7 @@ class ma extends n.Component {
|
|
|
916
916
|
disabled: this.props.disabled
|
|
917
917
|
}
|
|
918
918
|
), /* @__PURE__ */ n.createElement(We, { className: "k-colorgradient-input-label" }, i)), /* @__PURE__ */ n.createElement("div", { className: "k-vstack" }, /* @__PURE__ */ n.createElement(
|
|
919
|
-
|
|
919
|
+
$e,
|
|
920
920
|
{
|
|
921
921
|
inputType: "number",
|
|
922
922
|
value: this.props.rgba.b,
|
|
@@ -929,7 +929,7 @@ class ma extends n.Component {
|
|
|
929
929
|
disabled: this.props.disabled
|
|
930
930
|
}
|
|
931
931
|
), /* @__PURE__ */ n.createElement(We, { className: "k-colorgradient-input-label" }, l))), this.state.inputMode === "rgba" && /* @__PURE__ */ n.createElement("div", { className: "k-vstack" }, this.props.opacity && /* @__PURE__ */ n.createElement(
|
|
932
|
-
|
|
932
|
+
$e,
|
|
933
933
|
{
|
|
934
934
|
inputType: "number",
|
|
935
935
|
value: this.props.rgba.a,
|
|
@@ -949,19 +949,19 @@ class ma extends n.Component {
|
|
|
949
949
|
t.r !== void 0 && (s.r = t.r), t.g !== void 0 && (s.g = t.g), t.b !== void 0 && (s.b = t.b), t.a !== void 0 && (s.a = t.a), this.props.onRgbaChange(s, e);
|
|
950
950
|
}
|
|
951
951
|
onToggleModeChange() {
|
|
952
|
-
const t =
|
|
952
|
+
const t = Te.length - 1 === Te.indexOf(this.state.inputMode) ? 0 : Te.indexOf(this.state.inputMode) + 1;
|
|
953
953
|
if (this.props.opacity)
|
|
954
|
-
this.setState({ inputMode:
|
|
954
|
+
this.setState({ inputMode: Te[t] });
|
|
955
955
|
else {
|
|
956
|
-
const e =
|
|
957
|
-
this.setState({ inputMode:
|
|
956
|
+
const e = Te[t] === "rgba" ? t + 1 : t;
|
|
957
|
+
this.setState({ inputMode: Te[e] });
|
|
958
958
|
}
|
|
959
959
|
}
|
|
960
960
|
}
|
|
961
961
|
Pn(ma);
|
|
962
962
|
fa(ma);
|
|
963
963
|
const kn = "data-slider-label", Vr = (a) => {
|
|
964
|
-
const t = n.useRef(null), e =
|
|
964
|
+
const t = n.useRef(null), e = Ge(t), s = a.vertical ? { bottom: `${a.position}%` } : { [e === "rtl" ? "right" : "left"]: `${a.position}%` }, i = a.vertical ? "k-tick-vertical" : "k-tick-horizontal";
|
|
965
965
|
return /* @__PURE__ */ n.createElement(
|
|
966
966
|
"li",
|
|
967
967
|
{
|
|
@@ -996,7 +996,7 @@ class bt extends n.Component {
|
|
|
996
996
|
return e.children;
|
|
997
997
|
const s = this.state.dir === "rtl" ? this.props.vertical ? _t : Ia : this.props.vertical ? _t : La, i = this.state.dir === "rtl" ? this.props.vertical ? ht : La : this.props.vertical ? ht : Ia, l = this.state.dir === "rtl" ? this.props.vertical ? "caret-alt-up" : "caret-alt-left" : this.props.vertical ? "caret-alt-up" : "caret-alt-right", c = this.state.dir === "rtl" ? this.props.vertical ? "caret-alt-down" : "caret-alt-right" : this.props.vertical ? "caret-alt-down" : "caret-alt-left";
|
|
998
998
|
return /* @__PURE__ */ n.createElement(n.Fragment, null, /* @__PURE__ */ n.createElement(
|
|
999
|
-
|
|
999
|
+
ge,
|
|
1000
1000
|
{
|
|
1001
1001
|
className: "k-button-decrease",
|
|
1002
1002
|
rounded: "full",
|
|
@@ -1006,7 +1006,7 @@ class bt extends n.Component {
|
|
|
1006
1006
|
onClick: e.decrement
|
|
1007
1007
|
}
|
|
1008
1008
|
), e.children, /* @__PURE__ */ n.createElement(
|
|
1009
|
-
|
|
1009
|
+
ge,
|
|
1010
1010
|
{
|
|
1011
1011
|
className: "k-button-increase",
|
|
1012
1012
|
rounded: "full",
|
|
@@ -1044,7 +1044,7 @@ class bt extends n.Component {
|
|
|
1044
1044
|
}, this.drag = (e) => {
|
|
1045
1045
|
const s = e.element.getBoundingClientRect(), i = this.props.vertical ? s.bottom - e.event.clientY : this.state.dir === "rtl" ? s.right - e.event.clientX : e.event.clientX - s.left, l = this.props.vertical ? s.height : s.width, c = i / l;
|
|
1046
1046
|
this.change(e, this.props.min + c * (this.props.max - this.props.min));
|
|
1047
|
-
}, me
|
|
1047
|
+
}, pe(me);
|
|
1048
1048
|
}
|
|
1049
1049
|
/**
|
|
1050
1050
|
* @hidden
|
|
@@ -1150,9 +1150,9 @@ class bt extends n.Component {
|
|
|
1150
1150
|
"aria-labelledby": this.props.ariaLabelledBy,
|
|
1151
1151
|
"aria-describedby": this.props.ariaDescribedBy,
|
|
1152
1152
|
"aria-label": this.props.ariaLabel,
|
|
1153
|
-
tabIndex:
|
|
1153
|
+
tabIndex: re(this.props.tabIndex, this.props.disabled, void 0),
|
|
1154
1154
|
className: "k-draghandle",
|
|
1155
|
-
title: t.toLanguageString(
|
|
1155
|
+
title: t.toLanguageString(Ae, H[Ae]),
|
|
1156
1156
|
style: this.props.vertical ? { bottom: "calc(" + e + "%)", zIndex: 1 } : this.state.dir === "rtl" ? { right: "calc(" + e + "% - 13px)", zIndex: 1 } : { left: "calc(" + e + "%)", zIndex: 1 }
|
|
1157
1157
|
}
|
|
1158
1158
|
)
|
|
@@ -1183,47 +1183,47 @@ bt.propTypes = {
|
|
|
1183
1183
|
ariaLabel: r.string
|
|
1184
1184
|
// TODO: validation when buttons is set to true, but no step is provided
|
|
1185
1185
|
};
|
|
1186
|
-
const os =
|
|
1186
|
+
const os = he(), oa = je(os, bt);
|
|
1187
1187
|
oa.displayName = "KendoReactSlider";
|
|
1188
1188
|
fa(bt);
|
|
1189
|
-
const
|
|
1189
|
+
const Ke = {};
|
|
1190
1190
|
function cs(a, t, e) {
|
|
1191
|
-
|
|
1191
|
+
Ke[a] = { value: t, hsva: e };
|
|
1192
1192
|
}
|
|
1193
1193
|
function ds(a, t, e) {
|
|
1194
|
-
|
|
1194
|
+
Ke[a] = { value: t, rgba: e };
|
|
1195
1195
|
}
|
|
1196
1196
|
function us(a, t, e) {
|
|
1197
|
-
|
|
1197
|
+
Ke[a] = { value: t, hex: e };
|
|
1198
1198
|
}
|
|
1199
1199
|
function fs(a) {
|
|
1200
|
-
delete
|
|
1200
|
+
delete Ke[a];
|
|
1201
1201
|
}
|
|
1202
1202
|
function hs(a, t) {
|
|
1203
1203
|
if (a) {
|
|
1204
|
-
const e =
|
|
1204
|
+
const e = Ke[a];
|
|
1205
1205
|
return e && e.value === t ? e.hex : void 0;
|
|
1206
1206
|
} else
|
|
1207
1207
|
return;
|
|
1208
1208
|
}
|
|
1209
1209
|
function ps(a, t) {
|
|
1210
1210
|
if (a) {
|
|
1211
|
-
const e =
|
|
1211
|
+
const e = Ke[a];
|
|
1212
1212
|
return e && e.value === t ? e.hsva : void 0;
|
|
1213
1213
|
} else
|
|
1214
1214
|
return;
|
|
1215
1215
|
}
|
|
1216
1216
|
function ms(a, t) {
|
|
1217
1217
|
if (a) {
|
|
1218
|
-
const e =
|
|
1218
|
+
const e = Ke[a];
|
|
1219
1219
|
return e && e.value === t ? e.rgba : void 0;
|
|
1220
1220
|
} else
|
|
1221
1221
|
return;
|
|
1222
1222
|
}
|
|
1223
1223
|
class yn extends n.Component {
|
|
1224
1224
|
render() {
|
|
1225
|
-
const t = Je(this), e = t.toLanguageString(Gt, H[Gt]), s = t.toLanguageString(Kt, H[Kt]), i = t.toLanguageString(qt, H[qt]), l = t.toLanguageString(Ut, H[Ut]), c = t.toLanguageString(jt, H[jt]), o = bn(this.props.rgba, this.props.bgColor), h = 4.5.toFixed(1), d = 7 .toFixed(1), p = `${e}: ${o.toFixed(2)}`, m = `${s}: ${h}`, f = `${i}: ${d}`, v = /* @__PURE__ */ n.createElement("span", { className: "k-contrast-validation k-text-success" }, l, " ", /* @__PURE__ */ n.createElement(
|
|
1226
|
-
return /* @__PURE__ */ n.createElement("div", { className: "k-vbox k-colorgradient-color-contrast" }, /* @__PURE__ */ n.createElement("div", { className: "k-contrast-ratio" }, /* @__PURE__ */ n.createElement("span", { className: "k-contrast-ratio-text" }, p), o >= 4.5 ? /* @__PURE__ */ n.createElement("span", { className: "k-contrast-validation k-text-success" }, /* @__PURE__ */ n.createElement(
|
|
1225
|
+
const t = Je(this), e = t.toLanguageString(Gt, H[Gt]), s = t.toLanguageString(Kt, H[Kt]), i = t.toLanguageString(qt, H[qt]), l = t.toLanguageString(Ut, H[Ut]), c = t.toLanguageString(jt, H[jt]), o = bn(this.props.rgba, this.props.bgColor), h = 4.5.toFixed(1), d = 7 .toFixed(1), p = `${e}: ${o.toFixed(2)}`, m = `${s}: ${h}`, f = `${i}: ${d}`, v = /* @__PURE__ */ n.createElement("span", { className: "k-contrast-validation k-text-success" }, l, " ", /* @__PURE__ */ n.createElement(fe, { name: "check", icon: Mt })), N = /* @__PURE__ */ n.createElement("span", { className: "k-contrast-validation k-text-error" }, c, " ", /* @__PURE__ */ n.createElement(fe, { name: "x", icon: At }));
|
|
1226
|
+
return /* @__PURE__ */ n.createElement("div", { className: "k-vbox k-colorgradient-color-contrast" }, /* @__PURE__ */ n.createElement("div", { className: "k-contrast-ratio" }, /* @__PURE__ */ n.createElement("span", { className: "k-contrast-ratio-text" }, p), o >= 4.5 ? /* @__PURE__ */ n.createElement("span", { className: "k-contrast-validation k-text-success" }, /* @__PURE__ */ n.createElement(fe, { name: "check", icon: Mt }), o >= 7 && /* @__PURE__ */ n.createElement(fe, { name: "check", icon: Mt })) : /* @__PURE__ */ n.createElement("span", { className: "k-contrast-validation k-text-error" }, /* @__PURE__ */ n.createElement(fe, { name: "x", icon: At }))), /* @__PURE__ */ n.createElement("div", null, /* @__PURE__ */ n.createElement("span", null, m), o >= 4.5 ? v : N), /* @__PURE__ */ n.createElement("div", null, /* @__PURE__ */ n.createElement("span", null, f), o >= 7 ? v : N));
|
|
1227
1227
|
}
|
|
1228
1228
|
}
|
|
1229
1229
|
fa(yn);
|
|
@@ -1252,7 +1252,7 @@ const it = (a, t) => a.length === 0 ? "" : `<path d="${a.reduce(
|
|
|
1252
1252
|
class ks extends n.Component {
|
|
1253
1253
|
renderSvgCurveLine() {
|
|
1254
1254
|
const t = this.props.metrics, e = (l, c, o, h, d) => {
|
|
1255
|
-
const p = (o + h) / 2, m = Object.assign({}, this.props.hsva, { s: c / t.width, v: 1 - p / t.height }), f = bn(
|
|
1255
|
+
const p = (o + h) / 2, m = Object.assign({}, this.props.hsva, { s: c / t.width, v: 1 - p / t.height }), f = bn(Ue(pa(m)), Ue(this.props.backgroundColor || ""));
|
|
1256
1256
|
return o + 0.5 > h ? f < l + 1 && f > l - 1 ? p : null : d(f, l) ? e(l, c, o, h - (h - o) / 2, d) : e(l, c, o + (h - o) / 2, h, d);
|
|
1257
1257
|
}, s = (l, c, o = !1) => {
|
|
1258
1258
|
const h = [];
|
|
@@ -1291,14 +1291,14 @@ const ys = "rgba", Ha = "rgba(255, 255, 255, 1)", ca = class extends n.Component
|
|
|
1291
1291
|
super(a), this.wrapper = null, this.onHexChange = (e, s, i) => {
|
|
1292
1292
|
if (this.isUncontrolled) {
|
|
1293
1293
|
const l = Ot(s);
|
|
1294
|
-
this.setState({ hsva: l, backgroundColor: rt(l.h), rgba:
|
|
1294
|
+
this.setState({ hsva: l, backgroundColor: rt(l.h), rgba: Ue(s), hex: e });
|
|
1295
1295
|
} else
|
|
1296
1296
|
us(this.state.guid, s, e);
|
|
1297
1297
|
this.dispatchChangeEvent(s, i, i.nativeEvent);
|
|
1298
1298
|
}, this.onRgbaChange = (e, s) => {
|
|
1299
1299
|
const i = ss(e);
|
|
1300
1300
|
if (this.isUncontrolled) {
|
|
1301
|
-
const l = Ot(i), c =
|
|
1301
|
+
const l = Ot(i), c = Be(i, "hex");
|
|
1302
1302
|
this.setState({ hsva: l, backgroundColor: rt(l.h), rgba: e, hex: c });
|
|
1303
1303
|
} else
|
|
1304
1304
|
ds(this.state.guid, i, e);
|
|
@@ -1322,7 +1322,7 @@ const ys = "rgba", Ha = "rgba(255, 255, 255, 1)", ca = class extends n.Component
|
|
|
1322
1322
|
}, this.onGradientWrapperClick = (e) => {
|
|
1323
1323
|
this.changePosition(e);
|
|
1324
1324
|
}, this.changePosition = (e) => {
|
|
1325
|
-
const s = this.getGradientRectMetrics(), i = e.clientX - s.left, l = e.clientY - s.top, c =
|
|
1325
|
+
const s = this.getGradientRectMetrics(), i = e.clientX - s.left, l = e.clientY - s.top, c = se(i, 0, s.width), o = se(l, 0, s.height), h = Object.assign(
|
|
1326
1326
|
{},
|
|
1327
1327
|
this.state.hsva,
|
|
1328
1328
|
{ s: c / s.width, v: 1 - o / s.height }
|
|
@@ -1335,8 +1335,8 @@ const ys = "rgba", Ha = "rgba(255, 255, 255, 1)", ca = class extends n.Component
|
|
|
1335
1335
|
);
|
|
1336
1336
|
}, this.focus = () => {
|
|
1337
1337
|
tn(this.wrapper);
|
|
1338
|
-
}, me
|
|
1339
|
-
const t = a.value || a.defaultValue ||
|
|
1338
|
+
}, pe(me);
|
|
1339
|
+
const t = a.value || a.defaultValue || Be(Ha, ys);
|
|
1340
1340
|
this.state = Object.assign({}, ca.getStateFromValue(t), { isFirstRender: !0, guid: this.props.id });
|
|
1341
1341
|
}
|
|
1342
1342
|
/**
|
|
@@ -1376,7 +1376,7 @@ const ys = "rgba", Ha = "rgba(255, 255, 255, 1)", ca = class extends n.Component
|
|
|
1376
1376
|
"div",
|
|
1377
1377
|
{
|
|
1378
1378
|
role: "slider",
|
|
1379
|
-
tabIndex:
|
|
1379
|
+
tabIndex: re(this.props.tabIndex, this.props.disabled),
|
|
1380
1380
|
"aria-valuetext": this.props.ariaValueText,
|
|
1381
1381
|
"aria-valuenow": parseInt(this.state.hex.substring(1), 16),
|
|
1382
1382
|
"aria-label": this.props.ariaLabelHSV,
|
|
@@ -1393,8 +1393,8 @@ const ys = "rgba", Ha = "rgba(255, 255, 255, 1)", ca = class extends n.Component
|
|
|
1393
1393
|
handleHsvaChange(a, t, e) {
|
|
1394
1394
|
const s = pa(a);
|
|
1395
1395
|
if (this.isUncontrolled) {
|
|
1396
|
-
const i =
|
|
1397
|
-
this.setState({ hsva: a, backgroundColor: rt(a.h), rgba:
|
|
1396
|
+
const i = Be(s, "hex");
|
|
1397
|
+
this.setState({ hsva: a, backgroundColor: rt(a.h), rgba: Ue(s), hex: i });
|
|
1398
1398
|
} else
|
|
1399
1399
|
cs(this.state.guid, s, a);
|
|
1400
1400
|
this.dispatchChangeEvent(s, t, e);
|
|
@@ -1412,8 +1412,8 @@ const ys = "rgba", Ha = "rgba(255, 255, 255, 1)", ca = class extends n.Component
|
|
|
1412
1412
|
* @hidden
|
|
1413
1413
|
*/
|
|
1414
1414
|
static getStateFromValue(a, t) {
|
|
1415
|
-
|
|
1416
|
-
const e = ps(t, a) || Ot(a), s = ms(t, a) ||
|
|
1415
|
+
ae(Be(a, "hex")) || (a = Ha);
|
|
1416
|
+
const e = ps(t, a) || Ot(a), s = ms(t, a) || Ue(a), i = hs(t, a) || Be(a, "hex"), l = rt(e.h);
|
|
1417
1417
|
return { hsva: e, backgroundColor: l, rgba: s, hex: i };
|
|
1418
1418
|
}
|
|
1419
1419
|
/**
|
|
@@ -1448,7 +1448,7 @@ const ys = "rgba", Ha = "rgba(255, 255, 255, 1)", ca = class extends n.Component
|
|
|
1448
1448
|
"aria-disabled": this.props.disabled ? "true" : void 0,
|
|
1449
1449
|
style: this.props.style,
|
|
1450
1450
|
ref: (e) => this.wrapper = e,
|
|
1451
|
-
tabIndex:
|
|
1451
|
+
tabIndex: re(this.props.tabIndex, this.props.disabled),
|
|
1452
1452
|
"aria-label": this.props.ariaLabel,
|
|
1453
1453
|
"aria-labelledby": this.props.ariaLabelledBy,
|
|
1454
1454
|
"aria-describedby": this.props.ariaDescribedBy,
|
|
@@ -1494,7 +1494,7 @@ const ys = "rgba", Ha = "rgba(255, 255, 255, 1)", ca = class extends n.Component
|
|
|
1494
1494
|
), this.props.opacity && /* @__PURE__ */ n.createElement(
|
|
1495
1495
|
oa,
|
|
1496
1496
|
{
|
|
1497
|
-
value:
|
|
1497
|
+
value: ae(this.state.hsva.a) ? this.state.hsva.a * 100 : 100,
|
|
1498
1498
|
buttons: !1,
|
|
1499
1499
|
vertical: !0,
|
|
1500
1500
|
min: 0,
|
|
@@ -1522,7 +1522,7 @@ const ys = "rgba", Ha = "rgba(255, 255, 255, 1)", ca = class extends n.Component
|
|
|
1522
1522
|
this.props.backgroundColor && /* @__PURE__ */ n.createElement(
|
|
1523
1523
|
yn,
|
|
1524
1524
|
{
|
|
1525
|
-
bgColor:
|
|
1525
|
+
bgColor: Ue(this.props.backgroundColor),
|
|
1526
1526
|
rgba: this.state.rgba
|
|
1527
1527
|
}
|
|
1528
1528
|
)
|
|
@@ -1553,14 +1553,14 @@ vt.defaultProps = {
|
|
|
1553
1553
|
role: "textbox",
|
|
1554
1554
|
format: "rgb"
|
|
1555
1555
|
};
|
|
1556
|
-
const Cs =
|
|
1556
|
+
const Cs = he(), ga = et(je(Cs, vt));
|
|
1557
1557
|
ga.displayName = "KendoReactColorGradient";
|
|
1558
1558
|
class xs {
|
|
1559
1559
|
constructor() {
|
|
1560
1560
|
this.colorRows = [];
|
|
1561
1561
|
}
|
|
1562
1562
|
setColorMatrix(t, e) {
|
|
1563
|
-
if (this.colorRows = [], !!(
|
|
1563
|
+
if (this.colorRows = [], !!(ae(t) && t.length)) {
|
|
1564
1564
|
e = e || t.length;
|
|
1565
1565
|
for (let s = 0; s < t.length; s += e) {
|
|
1566
1566
|
const i = t.slice(s, e + s);
|
|
@@ -1569,21 +1569,21 @@ class xs {
|
|
|
1569
1569
|
}
|
|
1570
1570
|
}
|
|
1571
1571
|
getCellCoordsFor(t) {
|
|
1572
|
-
if (!
|
|
1572
|
+
if (!ae(t))
|
|
1573
1573
|
return;
|
|
1574
1574
|
const e = t && mt(t, !0), s = [t];
|
|
1575
|
-
|
|
1575
|
+
ae(e) && s.push(e.toCss(), e.toCssRgba());
|
|
1576
1576
|
for (let i = 0; i < this.colorRows.length; i++)
|
|
1577
1577
|
for (let l = 0; l < this.colorRows[i].length; l++)
|
|
1578
1578
|
if (s.some((c) => c === this.colorRows[i][l]))
|
|
1579
1579
|
return { row: i, col: l };
|
|
1580
1580
|
}
|
|
1581
1581
|
getColorAt(t) {
|
|
1582
|
-
if (
|
|
1582
|
+
if (ae(t) && ae(this.colorRows[t.row]))
|
|
1583
1583
|
return this.colorRows[t.row][t.col];
|
|
1584
1584
|
}
|
|
1585
1585
|
getNextCell(t, e, s) {
|
|
1586
|
-
if (!(
|
|
1586
|
+
if (!(ae(t) && ae(t.row) && ae(t.col)))
|
|
1587
1587
|
return { row: 0, col: 0 };
|
|
1588
1588
|
const i = this.clampIndex(t.row + s, this.colorRows.length - 1), l = this.clampIndex(t.col + e, this.colorRows[i].length - 1);
|
|
1589
1589
|
return { row: i, col: l };
|
|
@@ -1676,7 +1676,7 @@ class kt extends n.Component {
|
|
|
1676
1676
|
));
|
|
1677
1677
|
}, this.onBlur = () => {
|
|
1678
1678
|
this.setState({ focusedColor: void 0 });
|
|
1679
|
-
}, me
|
|
1679
|
+
}, pe(me), this.state = {
|
|
1680
1680
|
selectedColor: this.props.value !== void 0 ? this.props.value : this.props.defaultValue,
|
|
1681
1681
|
isFirstRender: !0
|
|
1682
1682
|
};
|
|
@@ -1703,7 +1703,7 @@ class kt extends n.Component {
|
|
|
1703
1703
|
"aria-disabled": this.props.ariaDisabled || (this.props.disabled ? "true" : void 0),
|
|
1704
1704
|
"aria-labelledby": this.props.ariaLabelledBy,
|
|
1705
1705
|
"aria-describedby": this.props.ariaDescribedBy,
|
|
1706
|
-
tabIndex:
|
|
1706
|
+
tabIndex: re(this.props.tabIndex, this.props.disabled),
|
|
1707
1707
|
ref: (c) => this.wrapper = c
|
|
1708
1708
|
},
|
|
1709
1709
|
/* @__PURE__ */ n.createElement("table", { className: "k-colorpalette-table", role: "presentation" }, /* @__PURE__ */ n.createElement("tbody", { role: "rowgroup" }, this.renderRows(e.colorRows, s, i)))
|
|
@@ -1738,7 +1738,7 @@ class kt extends n.Component {
|
|
|
1738
1738
|
this.isUncontrolled && this.setState({ selectedColor: this.state.focusedColor }), this.dispatchChangeEvent(this.state.focusedColor, t);
|
|
1739
1739
|
}
|
|
1740
1740
|
dispatchChangeEvent(t, e) {
|
|
1741
|
-
J(this.props.onChange, e, this, { value: t, rgbaValue:
|
|
1741
|
+
J(this.props.onChange, e, this, { value: t, rgbaValue: Be(t, "rgba") });
|
|
1742
1742
|
}
|
|
1743
1743
|
get focusedColorCooridanates() {
|
|
1744
1744
|
return this.state.focusedColor && this.paletteService ? this.paletteService.getCellCoordsFor(this.state.focusedColor) : void 0;
|
|
@@ -1749,7 +1749,7 @@ class kt extends n.Component {
|
|
|
1749
1749
|
getPaletteInfo() {
|
|
1750
1750
|
if (typeof this.props.palette == "string") {
|
|
1751
1751
|
const t = Es[this.props.palette];
|
|
1752
|
-
return
|
|
1752
|
+
return ae(t) ? {
|
|
1753
1753
|
colors: t.colors,
|
|
1754
1754
|
columns: this.props.columns || t.columns || Ga
|
|
1755
1755
|
} : { colors: [], columns: 0 };
|
|
@@ -1777,7 +1777,7 @@ class kt extends n.Component {
|
|
|
1777
1777
|
"aria-label": f,
|
|
1778
1778
|
"aria-selected": N ? !0 : this.props.disabled ? void 0 : !1,
|
|
1779
1779
|
style: { backgroundColor: f, width: p, height: m, minWidth: p },
|
|
1780
|
-
onClick: (
|
|
1780
|
+
onClick: (V) => this.onColorClick(f, V),
|
|
1781
1781
|
id: this.createCellId({ row: e, col: v }),
|
|
1782
1782
|
key: v
|
|
1783
1783
|
}
|
|
@@ -1808,7 +1808,7 @@ kt.defaultProps = {
|
|
|
1808
1808
|
palette: xn,
|
|
1809
1809
|
tileSize: Cn
|
|
1810
1810
|
};
|
|
1811
|
-
const Ss =
|
|
1811
|
+
const Ss = he(), ba = et(je(Ss, kt));
|
|
1812
1812
|
ba.displayName = "KendoReactColorPalette";
|
|
1813
1813
|
const ws = "bottom", Is = "top", En = (a) => {
|
|
1814
1814
|
const t = a.popupSettings || {}, e = a.dir === "rtl" ? "right" : "left", s = n.useMemo(
|
|
@@ -1843,9 +1843,9 @@ const Ls = {
|
|
|
1843
1843
|
}, Rs = {
|
|
1844
1844
|
palette: xn,
|
|
1845
1845
|
tileSize: Cn
|
|
1846
|
-
}, Ft = (a) => a !== void 0, Vs =
|
|
1847
|
-
me
|
|
1848
|
-
const e =
|
|
1846
|
+
}, Ft = (a) => a !== void 0, Vs = he(), va = n.forwardRef((a, t) => {
|
|
1847
|
+
pe(me);
|
|
1848
|
+
const e = Me(Vs, a), s = He(), {
|
|
1849
1849
|
size: i = dt.size,
|
|
1850
1850
|
rounded: l = dt.rounded,
|
|
1851
1851
|
fillMode: c = dt.fillMode,
|
|
@@ -1858,8 +1858,8 @@ const Ls = {
|
|
|
1858
1858
|
view: v,
|
|
1859
1859
|
icon: N,
|
|
1860
1860
|
svgIcon: P,
|
|
1861
|
-
iconClassName:
|
|
1862
|
-
onChange:
|
|
1861
|
+
iconClassName: V,
|
|
1862
|
+
onChange: R,
|
|
1863
1863
|
onFocus: S,
|
|
1864
1864
|
onBlur: I,
|
|
1865
1865
|
onActiveColorClick: O,
|
|
@@ -1877,23 +1877,23 @@ const Ls = {
|
|
|
1877
1877
|
value: E,
|
|
1878
1878
|
focus: ee
|
|
1879
1879
|
}), [E, ee]);
|
|
1880
|
-
const
|
|
1881
|
-
(z,
|
|
1882
|
-
y || (!z && !
|
|
1880
|
+
const Z = n.useCallback(
|
|
1881
|
+
(z, ve) => {
|
|
1882
|
+
y || (!z && !ve && w && w.current && w.current.focus(), k(z));
|
|
1883
1883
|
},
|
|
1884
1884
|
[y]
|
|
1885
|
-
),
|
|
1885
|
+
), M = n.useCallback(
|
|
1886
1886
|
(z) => {
|
|
1887
|
-
const { altKey:
|
|
1888
|
-
if (
|
|
1889
|
-
|
|
1887
|
+
const { altKey: ve, keyCode: oe } = z;
|
|
1888
|
+
if (oe === _.esc) {
|
|
1889
|
+
Z(!1);
|
|
1890
1890
|
return;
|
|
1891
1891
|
}
|
|
1892
|
-
if (
|
|
1893
|
-
z.preventDefault(), z.stopPropagation(),
|
|
1892
|
+
if (oe === _.enter && !y) {
|
|
1893
|
+
z.preventDefault(), z.stopPropagation(), Z(!D);
|
|
1894
1894
|
return;
|
|
1895
1895
|
}
|
|
1896
|
-
|
|
1896
|
+
ve && (oe === _.up || oe === _.down) && (z.preventDefault(), z.stopPropagation(), oe === _.up && w && w.current && (w.current.focus(), Z(!1)), oe === _.down && Z(!0));
|
|
1897
1897
|
},
|
|
1898
1898
|
[D, y]
|
|
1899
1899
|
), b = n.useCallback(
|
|
@@ -1901,12 +1901,12 @@ const Ls = {
|
|
|
1901
1901
|
y || (F.current ? F.current.focus() : A.current && A.current.focus());
|
|
1902
1902
|
},
|
|
1903
1903
|
[y]
|
|
1904
|
-
),
|
|
1904
|
+
), q = n.useCallback(
|
|
1905
1905
|
() => {
|
|
1906
|
-
|
|
1906
|
+
Z(!D, !0);
|
|
1907
1907
|
},
|
|
1908
1908
|
[D]
|
|
1909
|
-
),
|
|
1909
|
+
), K = n.useCallback(
|
|
1910
1910
|
(z) => {
|
|
1911
1911
|
O && O.call(void 0, {
|
|
1912
1912
|
syntheticEvent: z,
|
|
@@ -1915,7 +1915,7 @@ const Ls = {
|
|
|
1915
1915
|
});
|
|
1916
1916
|
},
|
|
1917
1917
|
[O, E]
|
|
1918
|
-
),
|
|
1918
|
+
), W = n.useCallback(
|
|
1919
1919
|
(z) => {
|
|
1920
1920
|
T.current ? (clearTimeout(T.current), T.current = void 0) : $(!0), S && S.call(void 0, {
|
|
1921
1921
|
nativeEvent: z.nativeEvent,
|
|
@@ -1923,33 +1923,33 @@ const Ls = {
|
|
|
1923
1923
|
});
|
|
1924
1924
|
},
|
|
1925
1925
|
[S]
|
|
1926
|
-
),
|
|
1926
|
+
), ie = n.useCallback(
|
|
1927
1927
|
() => {
|
|
1928
|
-
|
|
1928
|
+
Z(!1, !0), $(!1), T.current = void 0;
|
|
1929
1929
|
},
|
|
1930
1930
|
[]
|
|
1931
|
-
),
|
|
1931
|
+
), Ee = n.useCallback(
|
|
1932
1932
|
(z) => {
|
|
1933
|
-
clearTimeout(T.current), T.current = window.setTimeout(
|
|
1933
|
+
clearTimeout(T.current), T.current = window.setTimeout(ie), I && I.call(void 0, {
|
|
1934
1934
|
nativeEvent: z.nativeEvent,
|
|
1935
1935
|
syntheticEvent: z
|
|
1936
1936
|
});
|
|
1937
1937
|
},
|
|
1938
1938
|
[I]
|
|
1939
|
-
),
|
|
1940
|
-
(z,
|
|
1941
|
-
const
|
|
1942
|
-
u || Q(
|
|
1943
|
-
value:
|
|
1939
|
+
), le = n.useCallback(
|
|
1940
|
+
(z, ve) => {
|
|
1941
|
+
const oe = ve ? z.rgbaValue : z.value;
|
|
1942
|
+
u || Q(oe), ve && Z(!1), R && R.call(void 0, {
|
|
1943
|
+
value: oe,
|
|
1944
1944
|
nativeEvent: z.nativeEvent,
|
|
1945
1945
|
syntheticEvent: z.syntheticEvent
|
|
1946
1946
|
});
|
|
1947
1947
|
},
|
|
1948
|
-
[u,
|
|
1949
|
-
),
|
|
1950
|
-
(z) =>
|
|
1951
|
-
[Ft,
|
|
1952
|
-
),
|
|
1948
|
+
[u, R]
|
|
1949
|
+
), we = n.useCallback(
|
|
1950
|
+
(z) => le(z, !0),
|
|
1951
|
+
[Ft, le]
|
|
1952
|
+
), be = Ge(w, e.dir), Ne = p !== !1;
|
|
1953
1953
|
return /* @__PURE__ */ n.createElement(
|
|
1954
1954
|
"span",
|
|
1955
1955
|
{
|
|
@@ -1966,32 +1966,32 @@ const Ls = {
|
|
|
1966
1966
|
"k-picker",
|
|
1967
1967
|
"k-icon-picker",
|
|
1968
1968
|
{
|
|
1969
|
-
[`k-picker-${
|
|
1969
|
+
[`k-picker-${ne.sizeMap[i] || i}`]: i,
|
|
1970
1970
|
[`k-picker-${c}`]: c,
|
|
1971
|
-
[`k-rounded-${
|
|
1972
|
-
"k-invalid": !
|
|
1971
|
+
[`k-rounded-${ne.roundedMap[l] || l}`]: l,
|
|
1972
|
+
"k-invalid": !Ne,
|
|
1973
1973
|
"k-disabled": m,
|
|
1974
1974
|
"k-focus": L,
|
|
1975
1975
|
className: B
|
|
1976
1976
|
}
|
|
1977
1977
|
),
|
|
1978
1978
|
ref: w,
|
|
1979
|
-
tabIndex:
|
|
1979
|
+
tabIndex: re(f, m),
|
|
1980
1980
|
title: e.title,
|
|
1981
|
-
onKeyDown:
|
|
1982
|
-
onFocus:
|
|
1983
|
-
onBlur:
|
|
1984
|
-
dir:
|
|
1981
|
+
onKeyDown: M,
|
|
1982
|
+
onFocus: W,
|
|
1983
|
+
onBlur: Ee,
|
|
1984
|
+
dir: be
|
|
1985
1985
|
},
|
|
1986
1986
|
/* @__PURE__ */ n.createElement(
|
|
1987
1987
|
En,
|
|
1988
1988
|
{
|
|
1989
|
-
dir:
|
|
1989
|
+
dir: be,
|
|
1990
1990
|
open: D,
|
|
1991
1991
|
onOpen: b,
|
|
1992
1992
|
popupAnchor: w.current || void 0,
|
|
1993
1993
|
popupSettings: { ...o },
|
|
1994
|
-
input: /* @__PURE__ */ n.createElement("span", { onClick:
|
|
1994
|
+
input: /* @__PURE__ */ n.createElement("span", { onClick: K, className: "k-input-inner" }, /* @__PURE__ */ n.createElement(
|
|
1995
1995
|
"span",
|
|
1996
1996
|
{
|
|
1997
1997
|
className: G(
|
|
@@ -1999,20 +1999,20 @@ const Ls = {
|
|
|
1999
1999
|
"k-color-preview",
|
|
2000
2000
|
{
|
|
2001
2001
|
"k-no-color": !E,
|
|
2002
|
-
"k-icon-color-preview": N || P ||
|
|
2002
|
+
"k-icon-color-preview": N || P || V
|
|
2003
2003
|
}
|
|
2004
2004
|
)
|
|
2005
2005
|
},
|
|
2006
|
-
|
|
2007
|
-
!
|
|
2006
|
+
V && /* @__PURE__ */ n.createElement("span", { className: G("k-color-preview-icon", V) }),
|
|
2007
|
+
!V && (N || P) && /* @__PURE__ */ n.createElement(fe, { name: N, icon: P }),
|
|
2008
2008
|
/* @__PURE__ */ n.createElement("span", { className: "k-color-preview-mask", style: { backgroundColor: E } })
|
|
2009
2009
|
)),
|
|
2010
2010
|
button: /* @__PURE__ */ n.createElement(
|
|
2011
|
-
|
|
2011
|
+
ge,
|
|
2012
2012
|
{
|
|
2013
2013
|
tabIndex: -1,
|
|
2014
2014
|
type: "button",
|
|
2015
|
-
onClick:
|
|
2015
|
+
onClick: q,
|
|
2016
2016
|
className: "k-input-button",
|
|
2017
2017
|
rounded: null,
|
|
2018
2018
|
icon: "caret-alt-down",
|
|
@@ -2027,7 +2027,7 @@ const Ls = {
|
|
|
2027
2027
|
tabIndex: 0,
|
|
2028
2028
|
ref: F,
|
|
2029
2029
|
value: E,
|
|
2030
|
-
onChange:
|
|
2030
|
+
onChange: le
|
|
2031
2031
|
}
|
|
2032
2032
|
), (v === "combo" || v === "palette") && /* @__PURE__ */ n.createElement(
|
|
2033
2033
|
ba,
|
|
@@ -2035,7 +2035,7 @@ const Ls = {
|
|
|
2035
2035
|
...d,
|
|
2036
2036
|
ref: A,
|
|
2037
2037
|
value: E,
|
|
2038
|
-
onChange:
|
|
2038
|
+
onChange: we
|
|
2039
2039
|
}
|
|
2040
2040
|
))
|
|
2041
2041
|
}
|
|
@@ -2069,12 +2069,12 @@ const dt = {
|
|
|
2069
2069
|
va.defaultProps = dt;
|
|
2070
2070
|
va.displayName = "KendoColorPicker";
|
|
2071
2071
|
const Ka = "rgba(255, 255, 255, 1)", Sn = n.forwardRef((a, t) => {
|
|
2072
|
-
me
|
|
2072
|
+
pe(me);
|
|
2073
2073
|
const e = n.useRef(null), s = n.useRef(null), i = n.useRef(null), { defaultValue: l = Ka, showButtons: c = !0, showPreview: o = !0, showClearButton: h = !0 } = a, [d, p] = n.useState((a.view || "ColorGradient") === "ColorGradient"), [m, f] = n.useState(a.value || l), [v, N] = n.useState(a.value || l), P = a.value !== void 0 ? a.value : v;
|
|
2074
2074
|
n.useEffect(() => {
|
|
2075
2075
|
f(a.value || l);
|
|
2076
2076
|
}, [a.value, l]);
|
|
2077
|
-
const
|
|
2077
|
+
const V = He(), R = n.useCallback(
|
|
2078
2078
|
() => {
|
|
2079
2079
|
e.current && e.current.focus();
|
|
2080
2080
|
},
|
|
@@ -2082,10 +2082,10 @@ const Ka = "rgba(255, 255, 255, 1)", Sn = n.forwardRef((a, t) => {
|
|
|
2082
2082
|
);
|
|
2083
2083
|
n.useImperativeHandle(e, () => ({
|
|
2084
2084
|
element: s.current,
|
|
2085
|
-
focus:
|
|
2085
|
+
focus: R,
|
|
2086
2086
|
props: a,
|
|
2087
2087
|
value: P
|
|
2088
|
-
}), [P,
|
|
2088
|
+
}), [P, R, a]), n.useImperativeHandle(t, () => e.current);
|
|
2089
2089
|
const S = n.useCallback(
|
|
2090
2090
|
(x) => {
|
|
2091
2091
|
(x === "ColorGradient" && !d || x === "ColorPalette" && d) && p(!d);
|
|
@@ -2173,7 +2173,7 @@ const Ka = "rgba(255, 255, 255, 1)", Sn = n.forwardRef((a, t) => {
|
|
|
2173
2173
|
"aria-disabled": a.disabled ? "true" : void 0,
|
|
2174
2174
|
style: a.style,
|
|
2175
2175
|
ref: s,
|
|
2176
|
-
tabIndex:
|
|
2176
|
+
tabIndex: re(a.tabIndex, a.disabled),
|
|
2177
2177
|
className: G(
|
|
2178
2178
|
"k-flatcolorpicker k-coloreditor",
|
|
2179
2179
|
{
|
|
@@ -2184,10 +2184,10 @@ const Ka = "rgba(255, 255, 255, 1)", Sn = n.forwardRef((a, t) => {
|
|
|
2184
2184
|
onBlur: T
|
|
2185
2185
|
},
|
|
2186
2186
|
/* @__PURE__ */ n.createElement(n.Fragment, null, a.header || /* @__PURE__ */ n.createElement("div", { className: "k-coloreditor-header k-hstack" }, /* @__PURE__ */ n.createElement("div", { className: "k-coloreditor-header-actions k-hstack" }, /* @__PURE__ */ n.createElement(An, { className: "k-button-group-flat" }, /* @__PURE__ */ n.createElement(
|
|
2187
|
-
|
|
2187
|
+
ge,
|
|
2188
2188
|
{
|
|
2189
2189
|
type: "button",
|
|
2190
|
-
"aria-label":
|
|
2190
|
+
"aria-label": V.toLanguageString(
|
|
2191
2191
|
Zt,
|
|
2192
2192
|
H[Zt]
|
|
2193
2193
|
),
|
|
@@ -2199,10 +2199,10 @@ const Ka = "rgba(255, 255, 255, 1)", Sn = n.forwardRef((a, t) => {
|
|
|
2199
2199
|
svgIcon: Tn
|
|
2200
2200
|
}
|
|
2201
2201
|
), /* @__PURE__ */ n.createElement(
|
|
2202
|
-
|
|
2202
|
+
ge,
|
|
2203
2203
|
{
|
|
2204
2204
|
type: "button",
|
|
2205
|
-
"aria-label":
|
|
2205
|
+
"aria-label": V.toLanguageString(
|
|
2206
2206
|
Jt,
|
|
2207
2207
|
H[Jt]
|
|
2208
2208
|
),
|
|
@@ -2214,12 +2214,12 @@ const Ka = "rgba(255, 255, 255, 1)", Sn = n.forwardRef((a, t) => {
|
|
|
2214
2214
|
svgIcon: zn
|
|
2215
2215
|
}
|
|
2216
2216
|
))), /* @__PURE__ */ n.createElement("div", { className: "k-spacer" }), /* @__PURE__ */ n.createElement("div", { className: "k-coloreditor-header-actions k-hstack" }, h && /* @__PURE__ */ n.createElement(
|
|
2217
|
-
|
|
2217
|
+
ge,
|
|
2218
2218
|
{
|
|
2219
2219
|
type: "button",
|
|
2220
2220
|
fillMode: "flat",
|
|
2221
2221
|
onClick: I,
|
|
2222
|
-
"aria-label":
|
|
2222
|
+
"aria-label": V.toLanguageString(
|
|
2223
2223
|
Qt,
|
|
2224
2224
|
H[Qt]
|
|
2225
2225
|
),
|
|
@@ -2239,7 +2239,7 @@ const Ka = "rgba(255, 255, 255, 1)", Sn = n.forwardRef((a, t) => {
|
|
|
2239
2239
|
opacity: a.opacity,
|
|
2240
2240
|
format: a.format
|
|
2241
2241
|
}
|
|
2242
|
-
) : /* @__PURE__ */ n.createElement(ba, { ariaDisabled: !0, ariaLabelledBy: "required_label", value: m, onChange: O, onFocus: A })), c && /* @__PURE__ */ n.createElement("div", { className: "k-coloreditor-footer k-actions k-actions-end" }, /* @__PURE__ */ n.createElement(
|
|
2242
|
+
) : /* @__PURE__ */ n.createElement(ba, { ariaDisabled: !0, ariaLabelledBy: "required_label", value: m, onChange: O, onFocus: A })), c && /* @__PURE__ */ n.createElement("div", { className: "k-coloreditor-footer k-actions k-actions-end" }, /* @__PURE__ */ n.createElement(ge, { type: "button", className: "k-coloreditor-cancel", onClick: w }, H[on]), /* @__PURE__ */ n.createElement(ge, { type: "button", className: "k-coloreditor-apply k-primary", onClick: B }, H[cn])))
|
|
2243
2243
|
);
|
|
2244
2244
|
}), Ms = {
|
|
2245
2245
|
id: r.string,
|
|
@@ -2263,14 +2263,14 @@ const Ka = "rgba(255, 255, 255, 1)", Sn = n.forwardRef((a, t) => {
|
|
|
2263
2263
|
};
|
|
2264
2264
|
Sn.displayName = "KendoFlatColorPicker";
|
|
2265
2265
|
Sn.propTypes = Ms;
|
|
2266
|
-
var
|
|
2267
|
-
class
|
|
2266
|
+
var Oe = /* @__PURE__ */ ((a) => (a[a.Literal = 0] = "Literal", a[a.Mask = 1] = "Mask", a[a.Undefined = 2] = "Undefined", a))(Oe || {});
|
|
2267
|
+
class Y {
|
|
2268
2268
|
constructor(t, e, s = 2) {
|
|
2269
2269
|
this.value = t, this.rest = e, this.type = s;
|
|
2270
2270
|
}
|
|
2271
2271
|
// map :: Functor f => f a ~> (a -> b) -> f b
|
|
2272
2272
|
map(t) {
|
|
2273
|
-
return new
|
|
2273
|
+
return new Y(t(this.value), this.rest);
|
|
2274
2274
|
}
|
|
2275
2275
|
// chain :: Chain m => m a ~> (a -> m b) -> m b
|
|
2276
2276
|
chain(t) {
|
|
@@ -2317,7 +2317,7 @@ class qa {
|
|
|
2317
2317
|
}
|
|
2318
2318
|
}
|
|
2319
2319
|
const Ua = (a) => (a || "").split(""), Ns = "\\";
|
|
2320
|
-
class
|
|
2320
|
+
class xe {
|
|
2321
2321
|
constructor(t) {
|
|
2322
2322
|
this.parse = t;
|
|
2323
2323
|
}
|
|
@@ -2326,57 +2326,57 @@ class ye {
|
|
|
2326
2326
|
}
|
|
2327
2327
|
// map :: Functor f => f a ~> (a -> b) -> f b
|
|
2328
2328
|
map(t) {
|
|
2329
|
-
return new
|
|
2329
|
+
return new xe((e) => this.parse(e).map(t));
|
|
2330
2330
|
}
|
|
2331
2331
|
// chain :: Chain m => m a ~> (a -> m b) -> m b
|
|
2332
2332
|
chain(t) {
|
|
2333
|
-
return new
|
|
2333
|
+
return new xe((e) => this.parse(e).chain((s, i) => t(s).run(i)));
|
|
2334
2334
|
}
|
|
2335
2335
|
isLiteral(t) {
|
|
2336
|
-
return this.run(t).type ===
|
|
2336
|
+
return this.run(t).type === Oe.Literal;
|
|
2337
2337
|
}
|
|
2338
2338
|
}
|
|
2339
|
-
const Ps = (a) => (t) => new
|
|
2339
|
+
const Ps = (a) => (t) => new xe((e) => {
|
|
2340
2340
|
const { prompt: s, promptPlaceholder: i } = a;
|
|
2341
2341
|
for (; !e.eof(); ) {
|
|
2342
2342
|
const { char: l, control: c } = e.peek();
|
|
2343
2343
|
if (l === c && c === s)
|
|
2344
|
-
return e.eat(), new
|
|
2344
|
+
return e.eat(), new Y(s, e, Oe.Mask);
|
|
2345
2345
|
if (t.test(l))
|
|
2346
|
-
return e.eat(), new
|
|
2346
|
+
return e.eat(), new Y(l, e, Oe.Mask);
|
|
2347
2347
|
if (l === i)
|
|
2348
|
-
return e.eat(), new
|
|
2348
|
+
return e.eat(), new Y(s, e, Oe.Mask);
|
|
2349
2349
|
e.eat_input();
|
|
2350
2350
|
}
|
|
2351
|
-
return e.eat(), new
|
|
2352
|
-
}), Ds = (a) => new
|
|
2351
|
+
return e.eat(), new Y(s, e, Oe.Mask);
|
|
2352
|
+
}), Ds = (a) => new xe((t) => t.peek().char === a ? (t.eat(), new Y(a, t, Oe.Literal)) : new Y(a, t, Oe.Literal)), Bs = (a) => (t) => new xe((e) => {
|
|
2353
2353
|
for (; !e.eof(); ) {
|
|
2354
2354
|
const { char: s, control: i } = e.peek();
|
|
2355
2355
|
if (s === a && i === a)
|
|
2356
|
-
return e.eat(), new
|
|
2356
|
+
return e.eat(), new Y(s, e);
|
|
2357
2357
|
if (t.test(s))
|
|
2358
|
-
return e.eat(), new
|
|
2358
|
+
return e.eat(), new Y(s, e);
|
|
2359
2359
|
e.eat_input();
|
|
2360
2360
|
}
|
|
2361
|
-
return e.eat(), new
|
|
2362
|
-
}), Os = (a) => new
|
|
2361
|
+
return e.eat(), new Y("", e);
|
|
2362
|
+
}), Os = (a) => new xe((t) => {
|
|
2363
2363
|
if (t.eof())
|
|
2364
|
-
return new
|
|
2364
|
+
return new Y("", t);
|
|
2365
2365
|
const { char: e } = t.peek();
|
|
2366
|
-
return e === a && t.eat(), new
|
|
2367
|
-
}), ot = (a, t) => new
|
|
2366
|
+
return e === a && t.eat(), new Y(a, t);
|
|
2367
|
+
}), ot = (a, t) => new xe((e) => {
|
|
2368
2368
|
let { char: s } = e.next();
|
|
2369
2369
|
const i = a[s];
|
|
2370
|
-
return s === Ns ? (s = e.next().char, new
|
|
2371
|
-
}), ja = (a) => new
|
|
2370
|
+
return s === Ns ? (s = e.next().char, new Y(t.literal(s), e)) : i ? new Y(t.mask(i), e) : new Y(t.literal(s), e);
|
|
2371
|
+
}), ja = (a) => new xe((t) => {
|
|
2372
2372
|
const { prompt: e, promptPlaceholder: s } = a;
|
|
2373
2373
|
let { char: i } = t.next();
|
|
2374
|
-
return i === e ? new
|
|
2375
|
-
}), Wa = (a) => new
|
|
2374
|
+
return i === e ? new Y(s, t) : new Y(i, t);
|
|
2375
|
+
}), Wa = (a) => new xe((t) => {
|
|
2376
2376
|
let { char: e } = t.next();
|
|
2377
|
-
return a ? new
|
|
2378
|
-
}), Fs = (a) => new
|
|
2379
|
-
let e = new
|
|
2377
|
+
return a ? new Y(e, t) : new Y("", t);
|
|
2378
|
+
}), Fs = (a) => new xe((t) => new Y(a, t)), Ts = (a, t) => a.chain((e) => t.map((s) => e.concat([s]))), ze = (a) => a.reduce((t, e) => Ts(t, e), Fs([])), ct = (a) => new xe((t) => {
|
|
2379
|
+
let e = new Y([], t);
|
|
2380
2380
|
for (; !t.eof(); )
|
|
2381
2381
|
e = e.concat(a.run(t));
|
|
2382
2382
|
return e;
|
|
@@ -2390,13 +2390,13 @@ class zs {
|
|
|
2390
2390
|
}
|
|
2391
2391
|
validationValue(t = "") {
|
|
2392
2392
|
let e = t;
|
|
2393
|
-
return
|
|
2393
|
+
return ze(this.validationTokens).run(t).fold((s) => {
|
|
2394
2394
|
e = s.join("");
|
|
2395
2395
|
}), e;
|
|
2396
2396
|
}
|
|
2397
2397
|
rawValue(t = "") {
|
|
2398
2398
|
let e = t;
|
|
2399
|
-
return this.rawTokens.length &&
|
|
2399
|
+
return this.rawTokens.length && ze(this.rawTokens).run(t).fold((s) => {
|
|
2400
2400
|
e = s.join("");
|
|
2401
2401
|
}), e;
|
|
2402
2402
|
}
|
|
@@ -2405,7 +2405,7 @@ class zs {
|
|
|
2405
2405
|
*/
|
|
2406
2406
|
maskRaw(t = "") {
|
|
2407
2407
|
let e = t;
|
|
2408
|
-
return this.maskTokens.length &&
|
|
2408
|
+
return this.maskTokens.length && ze(this.maskTokens).run(t).fold((s) => {
|
|
2409
2409
|
e = s.join("");
|
|
2410
2410
|
}), e;
|
|
2411
2411
|
}
|
|
@@ -2415,7 +2415,7 @@ class zs {
|
|
|
2415
2415
|
maskInRange(t, e, s, i) {
|
|
2416
2416
|
let l = "", c = i;
|
|
2417
2417
|
const o = e.split("").slice(0, s), h = e.split("").slice(i);
|
|
2418
|
-
return
|
|
2418
|
+
return ze(this.maskTokens.slice(s, i)).run(t).fold((d) => {
|
|
2419
2419
|
l = o.concat(d).concat(h).join("");
|
|
2420
2420
|
}), {
|
|
2421
2421
|
selection: c,
|
|
@@ -2425,7 +2425,7 @@ class zs {
|
|
|
2425
2425
|
maskRemoved(t, e, s) {
|
|
2426
2426
|
let i = "", l = s;
|
|
2427
2427
|
const c = t.split("").slice(s), o = t.split("").slice(0, s).join(""), h = this.maskTokens.length - (t.length - s);
|
|
2428
|
-
return
|
|
2428
|
+
return ze(this.maskTokens.slice(0, h)).run(o, e).fold((d) => {
|
|
2429
2429
|
l = this.adjustPosition(d, l), i = d.concat(c).join("");
|
|
2430
2430
|
}), {
|
|
2431
2431
|
selection: l,
|
|
@@ -2439,10 +2439,10 @@ class zs {
|
|
|
2439
2439
|
maskInserted(t, e, s) {
|
|
2440
2440
|
let i = "", l = s;
|
|
2441
2441
|
const c = t.slice(0, s);
|
|
2442
|
-
return
|
|
2442
|
+
return ze(this.unmaskTokens).run(c, e).chain((o) => {
|
|
2443
2443
|
l = o.join("").length;
|
|
2444
2444
|
const h = e.slice(l);
|
|
2445
|
-
return
|
|
2445
|
+
return ze(this.maskTokens).run(o.join("") + h, e);
|
|
2446
2446
|
}).fold((o) => {
|
|
2447
2447
|
i = o.join("");
|
|
2448
2448
|
}), {
|
|
@@ -2518,7 +2518,7 @@ const wn = {
|
|
|
2518
2518
|
}
|
|
2519
2519
|
}
|
|
2520
2520
|
return e;
|
|
2521
|
-
},
|
|
2521
|
+
}, Pe = class extends n.Component {
|
|
2522
2522
|
constructor(a) {
|
|
2523
2523
|
super(a), this.state = {}, this._inputId = `k-${this.props.id}`, this._service = new zs(), this._isPasted = !1, this._selection = [null, null], this._input = null, this.focus = () => {
|
|
2524
2524
|
this._input && this._input.focus();
|
|
@@ -2556,7 +2556,7 @@ const wn = {
|
|
|
2556
2556
|
this.element && this.element.setCustomValidity(
|
|
2557
2557
|
this.validity.valid ? "" : this.props.validationMessage || ""
|
|
2558
2558
|
);
|
|
2559
|
-
}, me
|
|
2559
|
+
}, pe(me);
|
|
2560
2560
|
}
|
|
2561
2561
|
/**
|
|
2562
2562
|
* Gets the element of the MaskedTextBox.
|
|
@@ -2619,13 +2619,13 @@ const wn = {
|
|
|
2619
2619
|
* @hidden
|
|
2620
2620
|
*/
|
|
2621
2621
|
get validityStyles() {
|
|
2622
|
-
return this.props.validityStyles !== void 0 ? this.props.validityStyles :
|
|
2622
|
+
return this.props.validityStyles !== void 0 ? this.props.validityStyles : Pe.defaultProps.validityStyles;
|
|
2623
2623
|
}
|
|
2624
2624
|
/**
|
|
2625
2625
|
* @hidden
|
|
2626
2626
|
*/
|
|
2627
2627
|
get required() {
|
|
2628
|
-
return this.props.required !== void 0 ? this.props.required :
|
|
2628
|
+
return this.props.required !== void 0 ? this.props.required : Pe.defaultProps.required;
|
|
2629
2629
|
}
|
|
2630
2630
|
/**
|
|
2631
2631
|
* Gets the `name` property of the MaskedTextBox.
|
|
@@ -2655,22 +2655,22 @@ const wn = {
|
|
|
2655
2655
|
*/
|
|
2656
2656
|
render() {
|
|
2657
2657
|
const {
|
|
2658
|
-
size: a =
|
|
2659
|
-
fillMode: t =
|
|
2660
|
-
rounded: e =
|
|
2658
|
+
size: a = Pe.defaultProps.size,
|
|
2659
|
+
fillMode: t = Pe.defaultProps.fillMode,
|
|
2660
|
+
rounded: e = Pe.defaultProps.rounded
|
|
2661
2661
|
} = this.props, s = this.props.id || this._inputId, i = !this.validityStyles || this.validity.valid, l = this.props.style || {}, {
|
|
2662
|
-
prefix: c =
|
|
2663
|
-
suffix: o =
|
|
2664
|
-
} = this.props, [h] =
|
|
2662
|
+
prefix: c = Pe.defaultProps.prefix,
|
|
2663
|
+
suffix: o = Pe.defaultProps.suffix
|
|
2664
|
+
} = this.props, [h] = Fe(c), [d] = Fe(o), p = /* @__PURE__ */ n.createElement(
|
|
2665
2665
|
"span",
|
|
2666
2666
|
{
|
|
2667
2667
|
dir: this.props.dir,
|
|
2668
2668
|
className: G(
|
|
2669
2669
|
"k-maskedtextbox k-input",
|
|
2670
2670
|
{
|
|
2671
|
-
[`k-input-${
|
|
2671
|
+
[`k-input-${ne.sizeMap[a] || a}`]: a,
|
|
2672
2672
|
[`k-input-${t}`]: t,
|
|
2673
|
-
[`k-rounded-${
|
|
2673
|
+
[`k-rounded-${ne.roundedMap[e] || e}`]: e,
|
|
2674
2674
|
"k-invalid": !i,
|
|
2675
2675
|
"k-required": this.required,
|
|
2676
2676
|
"k-disabled": this.props.disabled
|
|
@@ -2695,7 +2695,7 @@ const wn = {
|
|
|
2695
2695
|
"aria-describedby": this.props.ariaDescribedBy,
|
|
2696
2696
|
"aria-placeholder": this.props.mask,
|
|
2697
2697
|
name: this.props.name,
|
|
2698
|
-
tabIndex:
|
|
2698
|
+
tabIndex: re(this.props.tabIndex, this.props.disabled, !0),
|
|
2699
2699
|
accessKey: this.props.accessKey,
|
|
2700
2700
|
title: this.props.title,
|
|
2701
2701
|
disabled: this.props.disabled || void 0,
|
|
@@ -2757,7 +2757,7 @@ const wn = {
|
|
|
2757
2757
|
return Object.assign({}, wn, this.props.rules);
|
|
2758
2758
|
}
|
|
2759
2759
|
};
|
|
2760
|
-
let yt =
|
|
2760
|
+
let yt = Pe;
|
|
2761
2761
|
yt.displayName = "MaskedTextBox";
|
|
2762
2762
|
yt.propTypes = {
|
|
2763
2763
|
value: r.string,
|
|
@@ -2820,9 +2820,9 @@ yt.defaultProps = {
|
|
|
2820
2820
|
rounded: "medium",
|
|
2821
2821
|
fillMode: "solid"
|
|
2822
2822
|
};
|
|
2823
|
-
const $s =
|
|
2823
|
+
const $s = he(), Hs = et(je($s, yt));
|
|
2824
2824
|
Hs.displayName = "KendoReactMaskedTextBox";
|
|
2825
|
-
var
|
|
2825
|
+
var X = /* @__PURE__ */ ((a) => (a.start = "start", a.end = "end", a.min = "min", a.max = "max", a.increase = "increase", a.decrease = "decrease", a))(X || {});
|
|
2826
2826
|
const Gs = (a, t) => {
|
|
2827
2827
|
let e, s;
|
|
2828
2828
|
switch (t.type) {
|
|
@@ -2908,9 +2908,9 @@ const Gs = (a, t) => {
|
|
|
2908
2908
|
[t, e]
|
|
2909
2909
|
);
|
|
2910
2910
|
return [s, l];
|
|
2911
|
-
}, qs =
|
|
2912
|
-
me
|
|
2913
|
-
const e =
|
|
2911
|
+
}, qs = he(), ka = n.forwardRef((a, t) => {
|
|
2912
|
+
pe(me);
|
|
2913
|
+
const e = Me(qs, a), s = n.useRef(null), i = n.useRef(null), l = n.useRef(null), c = n.useRef(null), o = n.useRef(null), h = n.useCallback(
|
|
2914
2914
|
() => {
|
|
2915
2915
|
c.current && c.current.focus();
|
|
2916
2916
|
},
|
|
@@ -2930,13 +2930,13 @@ const Gs = (a, t) => {
|
|
|
2930
2930
|
), m = n.useMemo(
|
|
2931
2931
|
() => e.step !== void 0 ? e.step : ut.step,
|
|
2932
2932
|
[e.step, ut.step]
|
|
2933
|
-
), f =
|
|
2933
|
+
), f = Ge(i, e.dir), v = (u, y) => {
|
|
2934
2934
|
e.onChange && s.current && e.onChange.call(void 0, {
|
|
2935
2935
|
value: u,
|
|
2936
2936
|
target: s.current,
|
|
2937
2937
|
syntheticEvent: y
|
|
2938
2938
|
});
|
|
2939
|
-
}, [N, P] = n.useState(""), [
|
|
2939
|
+
}, [N, P] = n.useState(""), [V, R] = Ks(
|
|
2940
2940
|
e.defaultValue || ut.defaultValue,
|
|
2941
2941
|
{
|
|
2942
2942
|
min: d,
|
|
@@ -2946,8 +2946,8 @@ const Gs = (a, t) => {
|
|
|
2946
2946
|
},
|
|
2947
2947
|
v
|
|
2948
2948
|
), S = n.useMemo(
|
|
2949
|
-
() => e.value ||
|
|
2950
|
-
[e.value,
|
|
2949
|
+
() => e.value || V,
|
|
2950
|
+
[e.value, V]
|
|
2951
2951
|
), I = n.useRef(null), O = n.useRef(null), B = n.useMemo(
|
|
2952
2952
|
() => (S.start - d) / (p - d) * 100,
|
|
2953
2953
|
[S.start, d, p]
|
|
@@ -2960,7 +2960,7 @@ const Gs = (a, t) => {
|
|
|
2960
2960
|
), A = n.useMemo(
|
|
2961
2961
|
() => e.vertical ? { marginTop: "0.5rem", marginBottom: "0.5rem" } : { marginLeft: "0.5rem", marginRight: "0.5rem" },
|
|
2962
2962
|
[e.vertical]
|
|
2963
|
-
), T =
|
|
2963
|
+
), T = He(), x = n.useCallback(
|
|
2964
2964
|
(u) => {
|
|
2965
2965
|
if (!O.current)
|
|
2966
2966
|
return;
|
|
@@ -2973,16 +2973,16 @@ const Gs = (a, t) => {
|
|
|
2973
2973
|
f,
|
|
2974
2974
|
d,
|
|
2975
2975
|
p,
|
|
2976
|
-
|
|
2977
|
-
|
|
2976
|
+
V.start,
|
|
2977
|
+
V.end,
|
|
2978
2978
|
e.value && e.value.start,
|
|
2979
2979
|
e.value && e.value.end
|
|
2980
2980
|
]
|
|
2981
2981
|
), L = n.useCallback(
|
|
2982
2982
|
(u) => u <= S.start ? "start" : u >= S.end ? "end" : 2 * u < S.end + S.start ? "start" : "end",
|
|
2983
2983
|
[
|
|
2984
|
-
|
|
2985
|
-
|
|
2984
|
+
V.start,
|
|
2985
|
+
V.end,
|
|
2986
2986
|
e.value && e.value.start,
|
|
2987
2987
|
e.value && e.value.end
|
|
2988
2988
|
]
|
|
@@ -2990,65 +2990,65 @@ const Gs = (a, t) => {
|
|
|
2990
2990
|
(u) => {
|
|
2991
2991
|
switch (u.keyCode) {
|
|
2992
2992
|
case _.right:
|
|
2993
|
-
u.preventDefault(),
|
|
2993
|
+
u.preventDefault(), R({ type: f === "rtl" ? X.decrease : X.increase, key: "start", event: u });
|
|
2994
2994
|
break;
|
|
2995
2995
|
case _.up:
|
|
2996
|
-
u.preventDefault(),
|
|
2996
|
+
u.preventDefault(), R({ type: X.increase, key: "start", event: u });
|
|
2997
2997
|
break;
|
|
2998
2998
|
case _.left:
|
|
2999
|
-
u.preventDefault(),
|
|
2999
|
+
u.preventDefault(), R({ type: f === "rtl" ? X.increase : X.decrease, key: "start", event: u });
|
|
3000
3000
|
break;
|
|
3001
3001
|
case _.down:
|
|
3002
|
-
u.preventDefault(),
|
|
3002
|
+
u.preventDefault(), R({ type: X.decrease, key: "start", event: u });
|
|
3003
3003
|
break;
|
|
3004
3004
|
case _.home:
|
|
3005
|
-
u.preventDefault(),
|
|
3005
|
+
u.preventDefault(), R({ type: X.min, key: "start", event: u });
|
|
3006
3006
|
break;
|
|
3007
3007
|
case _.end:
|
|
3008
|
-
u.preventDefault(),
|
|
3008
|
+
u.preventDefault(), R({ type: X.max, key: "start", event: u });
|
|
3009
3009
|
break;
|
|
3010
3010
|
}
|
|
3011
3011
|
},
|
|
3012
|
-
[
|
|
3012
|
+
[R]
|
|
3013
3013
|
), U = n.useCallback(
|
|
3014
3014
|
(u) => {
|
|
3015
3015
|
switch (u.keyCode) {
|
|
3016
3016
|
case _.right:
|
|
3017
|
-
u.preventDefault(),
|
|
3017
|
+
u.preventDefault(), R({ type: f === "rtl" ? X.decrease : X.increase, key: "end", event: u });
|
|
3018
3018
|
break;
|
|
3019
3019
|
case _.up:
|
|
3020
|
-
u.preventDefault(),
|
|
3020
|
+
u.preventDefault(), R({ type: X.increase, key: "end", event: u });
|
|
3021
3021
|
break;
|
|
3022
3022
|
case _.left:
|
|
3023
|
-
u.preventDefault(),
|
|
3023
|
+
u.preventDefault(), R({ type: f === "rtl" ? X.increase : X.decrease, key: "end", event: u });
|
|
3024
3024
|
break;
|
|
3025
3025
|
case _.down:
|
|
3026
|
-
u.preventDefault(),
|
|
3026
|
+
u.preventDefault(), R({ type: X.decrease, key: "end", event: u });
|
|
3027
3027
|
break;
|
|
3028
3028
|
case _.home:
|
|
3029
|
-
u.preventDefault(),
|
|
3029
|
+
u.preventDefault(), R({ type: X.min, key: "end", event: u });
|
|
3030
3030
|
break;
|
|
3031
3031
|
case _.end:
|
|
3032
|
-
u.preventDefault(),
|
|
3032
|
+
u.preventDefault(), R({ type: X.max, key: "end", event: u });
|
|
3033
3033
|
break;
|
|
3034
3034
|
}
|
|
3035
3035
|
},
|
|
3036
|
-
[
|
|
3036
|
+
[R, f]
|
|
3037
3037
|
), Q = n.useCallback(
|
|
3038
3038
|
(u) => {
|
|
3039
3039
|
const y = x(u), E = L(y);
|
|
3040
3040
|
P(E), E === "end" ? o.current.focus() : c.current.focus();
|
|
3041
|
-
const D = E === "end" ?
|
|
3042
|
-
|
|
3041
|
+
const D = E === "end" ? X.end : X.start;
|
|
3042
|
+
R({ type: D, payload: y, event: u });
|
|
3043
3043
|
},
|
|
3044
|
-
[e.vertical, d, p,
|
|
3044
|
+
[e.vertical, d, p, R]
|
|
3045
3045
|
);
|
|
3046
3046
|
return Dn(O, { onPress: Q, onDrag: (u) => {
|
|
3047
|
-
const y = x(u), E = N === "end" ?
|
|
3048
|
-
|
|
3047
|
+
const y = x(u), E = N === "end" ? X.end : X.start;
|
|
3048
|
+
R({ type: E, payload: y, event: u });
|
|
3049
3049
|
}, onRelease: (u) => {
|
|
3050
|
-
const y = x(u), E = N === "end" ?
|
|
3051
|
-
|
|
3050
|
+
const y = x(u), E = N === "end" ? X.end : X.start;
|
|
3051
|
+
R({ type: E, payload: y, event: u }), P("");
|
|
3052
3052
|
} }), /* @__PURE__ */ n.createElement(
|
|
3053
3053
|
"div",
|
|
3054
3054
|
{
|
|
@@ -3119,14 +3119,14 @@ const Gs = (a, t) => {
|
|
|
3119
3119
|
{
|
|
3120
3120
|
ref: c,
|
|
3121
3121
|
role: "slider",
|
|
3122
|
-
tabIndex:
|
|
3122
|
+
tabIndex: re(e.startTabIndex, e.disabled, void 0),
|
|
3123
3123
|
"aria-valuemin": d,
|
|
3124
3124
|
"aria-valuemax": Math.max(p, S.end),
|
|
3125
3125
|
"aria-valuenow": S.start,
|
|
3126
3126
|
"aria-disabled": e.disabled ? "true" : void 0,
|
|
3127
3127
|
"aria-valuetext": `${S.start} - ${S.end}`,
|
|
3128
3128
|
className: "k-draghandle",
|
|
3129
|
-
title: T.toLanguageString(
|
|
3129
|
+
title: T.toLanguageString(Ae, H[Ae]),
|
|
3130
3130
|
style: e.vertical ? { bottom: "calc(" + B + "%)", zIndex: 1 } : f === "rtl" ? { right: "calc(" + B + "% - 13px)", zIndex: 1 } : { left: "calc(" + B + "%)", zIndex: 1 },
|
|
3131
3131
|
onKeyDown: $
|
|
3132
3132
|
}
|
|
@@ -3136,14 +3136,14 @@ const Gs = (a, t) => {
|
|
|
3136
3136
|
{
|
|
3137
3137
|
ref: o,
|
|
3138
3138
|
role: "slider",
|
|
3139
|
-
tabIndex:
|
|
3139
|
+
tabIndex: re(e.endTabIndex, e.disabled, void 0),
|
|
3140
3140
|
"aria-valuemin": Math.min(d, S.start),
|
|
3141
3141
|
"aria-valuemax": p,
|
|
3142
3142
|
"aria-valuenow": S.end,
|
|
3143
3143
|
"aria-disabled": e.disabled ? "true" : void 0,
|
|
3144
3144
|
"aria-valuetext": `${S.start} - ${S.end}`,
|
|
3145
3145
|
className: "k-draghandle",
|
|
3146
|
-
title: T.toLanguageString(
|
|
3146
|
+
title: T.toLanguageString(Ae, H[Ae]),
|
|
3147
3147
|
style: e.vertical ? { bottom: "calc(" + w + "%)", zIndex: 1 } : f === "rtl" ? { right: "calc(" + w + "% - 13px)", zIndex: 1 } : { left: "calc(" + w + "%)", zIndex: 1 },
|
|
3148
3148
|
onKeyDown: U
|
|
3149
3149
|
}
|
|
@@ -3245,7 +3245,7 @@ const ft = class extends n.Component {
|
|
|
3245
3245
|
"aria-hidden": !0,
|
|
3246
3246
|
value: t,
|
|
3247
3247
|
style: { opacity: 0, width: 1, border: 0, zIndex: -1, position: "absolute", left: "50%" },
|
|
3248
|
-
onChange:
|
|
3248
|
+
onChange: De,
|
|
3249
3249
|
name: this.name || void 0
|
|
3250
3250
|
}
|
|
3251
3251
|
), this.handleClick = (t) => {
|
|
@@ -3267,7 +3267,7 @@ const ft = class extends n.Component {
|
|
|
3267
3267
|
this.setState({ focused: !1 });
|
|
3268
3268
|
const { onBlur: e } = this.props;
|
|
3269
3269
|
e && e.call(void 0, t);
|
|
3270
|
-
}, me
|
|
3270
|
+
}, pe(me), this.state = {
|
|
3271
3271
|
checked: a.defaultChecked || ft.defaultProps.defaultChecked,
|
|
3272
3272
|
focused: !1
|
|
3273
3273
|
};
|
|
@@ -3334,8 +3334,8 @@ const ft = class extends n.Component {
|
|
|
3334
3334
|
const d = !this.validityStyles || this.validity.valid, p = G(
|
|
3335
3335
|
"k-switch",
|
|
3336
3336
|
{
|
|
3337
|
-
[`k-switch-${
|
|
3338
|
-
[`k-rounded-${
|
|
3337
|
+
[`k-switch-${ne.sizeMap[l] || l}`]: l,
|
|
3338
|
+
[`k-rounded-${ne.roundedMap[s] || s}`]: s,
|
|
3339
3339
|
"k-switch-on": this.value,
|
|
3340
3340
|
"k-switch-off": !this.value,
|
|
3341
3341
|
"k-focus": a,
|
|
@@ -3364,7 +3364,7 @@ const ft = class extends n.Component {
|
|
|
3364
3364
|
onClick: this.handleClick,
|
|
3365
3365
|
onBlur: this.handleWrapperBlur,
|
|
3366
3366
|
onFocus: this.handleWrapperFocus,
|
|
3367
|
-
tabIndex:
|
|
3367
|
+
tabIndex: re(h, e, void 0),
|
|
3368
3368
|
accessKey: this.props.accessKey,
|
|
3369
3369
|
id: this.props.id || this._id
|
|
3370
3370
|
},
|
|
@@ -3373,7 +3373,7 @@ const ft = class extends n.Component {
|
|
|
3373
3373
|
{
|
|
3374
3374
|
className: G(
|
|
3375
3375
|
"k-switch-track",
|
|
3376
|
-
{ [`k-rounded-${
|
|
3376
|
+
{ [`k-rounded-${ne.roundedMap[s] || s}`]: s }
|
|
3377
3377
|
),
|
|
3378
3378
|
ref: (f) => {
|
|
3379
3379
|
this._element = f;
|
|
@@ -3420,17 +3420,17 @@ Ct.defaultProps = {
|
|
|
3420
3420
|
trackRounded: "full",
|
|
3421
3421
|
thumbRounded: "full",
|
|
3422
3422
|
offLabel: "OFF",
|
|
3423
|
-
onBlur:
|
|
3424
|
-
onFocus:
|
|
3423
|
+
onBlur: De,
|
|
3424
|
+
onFocus: De,
|
|
3425
3425
|
onLabel: "ON",
|
|
3426
3426
|
required: !1,
|
|
3427
3427
|
validityStyles: !0
|
|
3428
3428
|
};
|
|
3429
|
-
const js =
|
|
3429
|
+
const js = he(), Ws = et(je(js, Ct));
|
|
3430
3430
|
Ws.displayName = "KendoReactSwitch";
|
|
3431
|
-
const Xs =
|
|
3432
|
-
me
|
|
3433
|
-
const e =
|
|
3431
|
+
const Xs = he(), ya = n.forwardRef((a, t) => {
|
|
3432
|
+
pe(me);
|
|
3433
|
+
const e = Me(Xs, a), {
|
|
3434
3434
|
ariaDescribedBy: s,
|
|
3435
3435
|
ariaLabelledBy: i,
|
|
3436
3436
|
checked: l,
|
|
@@ -3444,8 +3444,8 @@ const Xs = pe(), ya = n.forwardRef((a, t) => {
|
|
|
3444
3444
|
size: v,
|
|
3445
3445
|
rounded: N,
|
|
3446
3446
|
label: P,
|
|
3447
|
-
labelPlacement:
|
|
3448
|
-
name:
|
|
3447
|
+
labelPlacement: V,
|
|
3448
|
+
name: R,
|
|
3449
3449
|
labelOptional: S,
|
|
3450
3450
|
onChange: I,
|
|
3451
3451
|
onFocus: O,
|
|
@@ -3477,48 +3477,48 @@ const Xs = pe(), ya = n.forwardRef((a, t) => {
|
|
|
3477
3477
|
[u]
|
|
3478
3478
|
);
|
|
3479
3479
|
n.useImperativeHandle(t, y);
|
|
3480
|
-
const [E, D] = n.useState(d), [ee,
|
|
3480
|
+
const [E, D] = n.useState(d), [ee, Z] = n.useState(m), M = typeof F == "boolean" || F === null, b = l !== void 0, q = M, K = q ? F : ee, W = b ? l : q ? void 0 : E, ie = W === void 0 && K, Ee = ie ? K : W, le = ie || q ? F === null ? F : void 0 : F || K, we = Ee === null || le === null, be = Qe(), Ne = He(), z = (te) => Ne.toLanguageString(te, H[te]), ve = z(dn), oe = z(un), ke = T !== void 0 ? T : A ? !!W : !0;
|
|
3481
3481
|
n.useEffect(
|
|
3482
3482
|
() => {
|
|
3483
3483
|
k.current && k.current.setCustomValidity && k.current.setCustomValidity(
|
|
3484
|
-
|
|
3484
|
+
ke ? "" : x || ve
|
|
3485
3485
|
);
|
|
3486
3486
|
},
|
|
3487
|
-
[
|
|
3487
|
+
[ke, x, ve]
|
|
3488
3488
|
);
|
|
3489
|
-
const
|
|
3490
|
-
(te,
|
|
3491
|
-
!
|
|
3489
|
+
const Se = n.useCallback(
|
|
3490
|
+
(te, Le) => {
|
|
3491
|
+
!q && !p && (Z(Le), !b && !p && D(Le)), I && !p && J(
|
|
3492
3492
|
I,
|
|
3493
3493
|
te,
|
|
3494
3494
|
{
|
|
3495
3495
|
...y(),
|
|
3496
|
-
value:
|
|
3496
|
+
value: Le
|
|
3497
3497
|
},
|
|
3498
|
-
{ value:
|
|
3498
|
+
{ value: Le }
|
|
3499
3499
|
);
|
|
3500
3500
|
},
|
|
3501
|
-
[b, p, I,
|
|
3501
|
+
[b, p, I, q, y]
|
|
3502
3502
|
), wt = n.useCallback(
|
|
3503
3503
|
(te) => {
|
|
3504
|
-
const
|
|
3505
|
-
|
|
3504
|
+
const Le = te.target.checked;
|
|
3505
|
+
Se(te, Le);
|
|
3506
3506
|
},
|
|
3507
|
-
[
|
|
3507
|
+
[Se, F]
|
|
3508
3508
|
), tt = n.useCallback(
|
|
3509
3509
|
(te) => {
|
|
3510
3510
|
if (p)
|
|
3511
3511
|
return;
|
|
3512
|
-
const { keyCode:
|
|
3513
|
-
|
|
3512
|
+
const { keyCode: Le } = te, Mn = te.currentTarget.checked;
|
|
3513
|
+
Le === _.space && (te.preventDefault(), te.stopPropagation(), Se(te, !Mn));
|
|
3514
3514
|
},
|
|
3515
|
-
[p,
|
|
3515
|
+
[p, Se]
|
|
3516
3516
|
), at = n.useCallback(
|
|
3517
3517
|
(te) => {
|
|
3518
3518
|
if (p)
|
|
3519
3519
|
return;
|
|
3520
|
-
const { keyCode:
|
|
3521
|
-
|
|
3520
|
+
const { keyCode: Le } = te;
|
|
3521
|
+
Le === _.space && te.preventDefault();
|
|
3522
3522
|
},
|
|
3523
3523
|
[p]
|
|
3524
3524
|
), It = n.useCallback(
|
|
@@ -3541,32 +3541,32 @@ const Xs = pe(), ya = n.forwardRef((a, t) => {
|
|
|
3541
3541
|
);
|
|
3542
3542
|
},
|
|
3543
3543
|
[B, p, y]
|
|
3544
|
-
), j =
|
|
3544
|
+
), j = Ge(k, e.dir), ce = G(
|
|
3545
3545
|
"k-checkbox-wrap",
|
|
3546
3546
|
c
|
|
3547
|
-
),
|
|
3547
|
+
), Ie = {
|
|
3548
3548
|
type: "checkbox",
|
|
3549
3549
|
className: G(
|
|
3550
3550
|
"k-checkbox",
|
|
3551
3551
|
{
|
|
3552
|
-
[`k-checkbox-${
|
|
3553
|
-
[`k-rounded-${
|
|
3554
|
-
"k-indeterminate":
|
|
3552
|
+
[`k-checkbox-${ne.sizeMap[v] || v}`]: v,
|
|
3553
|
+
[`k-rounded-${ne.roundedMap[N] || N}`]: N,
|
|
3554
|
+
"k-indeterminate": we,
|
|
3555
3555
|
"k-disabled": p,
|
|
3556
|
-
"k-invalid k-invalid": !(
|
|
3556
|
+
"k-invalid k-invalid": !(ke || L !== void 0 || L === !0)
|
|
3557
3557
|
}
|
|
3558
3558
|
),
|
|
3559
3559
|
ref: k,
|
|
3560
|
-
name:
|
|
3561
|
-
id: f ||
|
|
3560
|
+
name: R,
|
|
3561
|
+
id: f || be,
|
|
3562
3562
|
"aria-labelledby": i,
|
|
3563
3563
|
"aria-describedby": s,
|
|
3564
|
-
checked: !!
|
|
3564
|
+
checked: !!Ee,
|
|
3565
3565
|
disabled: p,
|
|
3566
|
-
tabIndex:
|
|
3566
|
+
tabIndex: re(w, p),
|
|
3567
3567
|
role: "checkbox",
|
|
3568
3568
|
required: A !== void 0 ? A : !1,
|
|
3569
|
-
"aria-checked":
|
|
3569
|
+
"aria-checked": W || Ee ? !0 : we ? "mixed" : !1,
|
|
3570
3570
|
"aria-disabled": p || void 0,
|
|
3571
3571
|
...g,
|
|
3572
3572
|
onChange: wt,
|
|
@@ -3579,18 +3579,18 @@ const Xs = pe(), ya = n.forwardRef((a, t) => {
|
|
|
3579
3579
|
null,
|
|
3580
3580
|
// removing value prop is required due to bug in react where
|
|
3581
3581
|
// value set to undefined override default submit value
|
|
3582
|
-
|
|
3582
|
+
le === void 0 ? /* @__PURE__ */ n.createElement("input", { ...Ie }) : /* @__PURE__ */ n.createElement("input", { ...Ie, value: M ? void 0 : le === null ? "" : le })
|
|
3583
3583
|
), Lt = /* @__PURE__ */ n.createElement(n.Fragment, null, P !== void 0 ? /* @__PURE__ */ n.createElement(
|
|
3584
3584
|
"label",
|
|
3585
3585
|
{
|
|
3586
3586
|
className: G("k-checkbox-label", o),
|
|
3587
|
-
htmlFor: f ||
|
|
3587
|
+
htmlFor: f || be,
|
|
3588
3588
|
style: { userSelect: "none" }
|
|
3589
3589
|
},
|
|
3590
3590
|
P,
|
|
3591
|
-
S && /* @__PURE__ */ n.createElement("span", { className: "k-label-optional" },
|
|
3592
|
-
) : null), Rt = /* @__PURE__ */ n.createElement("span", { className:
|
|
3593
|
-
return /* @__PURE__ */ n.createElement(n.Fragment, null,
|
|
3591
|
+
S && /* @__PURE__ */ n.createElement("span", { className: "k-label-optional" }, oe)
|
|
3592
|
+
) : null), Rt = /* @__PURE__ */ n.createElement("span", { className: ce }, Vn, h);
|
|
3593
|
+
return /* @__PURE__ */ n.createElement(n.Fragment, null, V === "before" ? /* @__PURE__ */ n.createElement("div", { dir: "rtl" }, Rt, Lt) : V === "after" ? /* @__PURE__ */ n.createElement("div", { dir: "ltr" }, Rt, Lt) : /* @__PURE__ */ n.createElement("div", { dir: j }, Rt, Lt));
|
|
3594
3594
|
});
|
|
3595
3595
|
ya.propTypes = {
|
|
3596
3596
|
checked: r.bool,
|
|
@@ -3624,9 +3624,9 @@ const Ys = {
|
|
|
3624
3624
|
};
|
|
3625
3625
|
ya.defaultProps = Ys;
|
|
3626
3626
|
ya.displayName = "KendoCheckbox";
|
|
3627
|
-
const Zs =
|
|
3628
|
-
me
|
|
3629
|
-
const e =
|
|
3627
|
+
const Zs = he(), xt = n.forwardRef((a, t) => {
|
|
3628
|
+
pe(me);
|
|
3629
|
+
const e = Me(Zs, a), {
|
|
3630
3630
|
ariaDescribedBy: s,
|
|
3631
3631
|
checked: i,
|
|
3632
3632
|
children: l,
|
|
@@ -3640,8 +3640,8 @@ const Zs = pe(), xt = n.forwardRef((a, t) => {
|
|
|
3640
3640
|
style: v,
|
|
3641
3641
|
tabIndex: N,
|
|
3642
3642
|
value: P,
|
|
3643
|
-
valid:
|
|
3644
|
-
onChange:
|
|
3643
|
+
valid: V,
|
|
3644
|
+
onChange: R,
|
|
3645
3645
|
onFocus: S,
|
|
3646
3646
|
onBlur: I,
|
|
3647
3647
|
...O
|
|
@@ -3661,13 +3661,13 @@ const Zs = pe(), xt = n.forwardRef((a, t) => {
|
|
|
3661
3661
|
const A = Qe(), T = n.useCallback(
|
|
3662
3662
|
(g) => {
|
|
3663
3663
|
J(
|
|
3664
|
-
|
|
3664
|
+
R,
|
|
3665
3665
|
g,
|
|
3666
3666
|
F(),
|
|
3667
3667
|
{ value: P }
|
|
3668
3668
|
);
|
|
3669
3669
|
},
|
|
3670
|
-
[
|
|
3670
|
+
[R, P, o]
|
|
3671
3671
|
), x = n.useCallback(
|
|
3672
3672
|
(g) => {
|
|
3673
3673
|
S && !o && J(
|
|
@@ -3695,14 +3695,14 @@ const Zs = pe(), xt = n.forwardRef((a, t) => {
|
|
|
3695
3695
|
className: G(
|
|
3696
3696
|
"k-radio",
|
|
3697
3697
|
{
|
|
3698
|
-
[`k-radio-${
|
|
3699
|
-
"k-invalid":
|
|
3698
|
+
[`k-radio-${ne.sizeMap[d] || d}`]: d,
|
|
3699
|
+
"k-invalid": V === !1
|
|
3700
3700
|
},
|
|
3701
3701
|
c
|
|
3702
3702
|
),
|
|
3703
3703
|
ref: B,
|
|
3704
3704
|
disabled: o,
|
|
3705
|
-
tabIndex:
|
|
3705
|
+
tabIndex: re(N, o),
|
|
3706
3706
|
checked: i,
|
|
3707
3707
|
style: v,
|
|
3708
3708
|
"aria-describedby": s,
|
|
@@ -3746,9 +3746,9 @@ const Js = {
|
|
|
3746
3746
|
};
|
|
3747
3747
|
xt.displayName = "KendoRadioButton";
|
|
3748
3748
|
xt.defaultProps = Js;
|
|
3749
|
-
const Qs =
|
|
3750
|
-
me
|
|
3751
|
-
const e =
|
|
3749
|
+
const Qs = he(), Ca = n.forwardRef((a, t) => {
|
|
3750
|
+
pe(me);
|
|
3751
|
+
const e = Me(Qs, a), {
|
|
3752
3752
|
id: s,
|
|
3753
3753
|
ariaLabelledBy: i,
|
|
3754
3754
|
ariaDescribedBy: l,
|
|
@@ -3762,8 +3762,8 @@ const Qs = pe(), Ca = n.forwardRef((a, t) => {
|
|
|
3762
3762
|
style: v,
|
|
3763
3763
|
value: N,
|
|
3764
3764
|
valid: P,
|
|
3765
|
-
item:
|
|
3766
|
-
onChange:
|
|
3765
|
+
item: V = In.item,
|
|
3766
|
+
onChange: R,
|
|
3767
3767
|
onFocus: S
|
|
3768
3768
|
} = e, I = n.useRef(null), O = n.useCallback(
|
|
3769
3769
|
() => {
|
|
@@ -3781,14 +3781,14 @@ const Qs = pe(), Ca = n.forwardRef((a, t) => {
|
|
|
3781
3781
|
const [w, F] = n.useState(h), A = N !== void 0, T = A ? N : w, x = n.useCallback(
|
|
3782
3782
|
(k) => {
|
|
3783
3783
|
let u = k.value;
|
|
3784
|
-
!A && !d && F(u),
|
|
3785
|
-
|
|
3784
|
+
!A && !d && F(u), R && !d && J(
|
|
3785
|
+
R,
|
|
3786
3786
|
k.syntheticEvent,
|
|
3787
3787
|
B(),
|
|
3788
3788
|
{ value: u }
|
|
3789
3789
|
);
|
|
3790
3790
|
},
|
|
3791
|
-
[F,
|
|
3791
|
+
[F, R, d]
|
|
3792
3792
|
), L = n.useCallback(
|
|
3793
3793
|
(k) => {
|
|
3794
3794
|
S && !d && J(
|
|
@@ -3820,7 +3820,7 @@ const Qs = pe(), Ca = n.forwardRef((a, t) => {
|
|
|
3820
3820
|
onFocus: L
|
|
3821
3821
|
};
|
|
3822
3822
|
return /* @__PURE__ */ n.createElement(
|
|
3823
|
-
|
|
3823
|
+
V,
|
|
3824
3824
|
{
|
|
3825
3825
|
className: G("k-radio-item", { "k-disabled": D.disabled || d }),
|
|
3826
3826
|
key: u,
|
|
@@ -3864,13 +3864,13 @@ Ca.propTypes = {
|
|
|
3864
3864
|
};
|
|
3865
3865
|
Ca.defaultProps = In;
|
|
3866
3866
|
Ca.displayName = "KendoRadioGroup";
|
|
3867
|
-
const er =
|
|
3868
|
-
const e =
|
|
3867
|
+
const er = he(), xa = n.forwardRef((a, t) => {
|
|
3868
|
+
const e = Me(er, a), {
|
|
3869
3869
|
size: s,
|
|
3870
3870
|
rounded: i,
|
|
3871
3871
|
fillMode: l,
|
|
3872
|
-
prefix: c =
|
|
3873
|
-
suffix: o =
|
|
3872
|
+
prefix: c = void 0,
|
|
3873
|
+
suffix: o = void 0,
|
|
3874
3874
|
ariaDescribedBy: h,
|
|
3875
3875
|
ariaLabelledBy: d,
|
|
3876
3876
|
autoSize: p,
|
|
@@ -3879,8 +3879,8 @@ const er = pe(), xa = n.forwardRef((a, t) => {
|
|
|
3879
3879
|
disabled: v,
|
|
3880
3880
|
readOnly: N,
|
|
3881
3881
|
required: P,
|
|
3882
|
-
rows:
|
|
3883
|
-
id:
|
|
3882
|
+
rows: V,
|
|
3883
|
+
id: R,
|
|
3884
3884
|
name: S,
|
|
3885
3885
|
placeholder: I,
|
|
3886
3886
|
style: O,
|
|
@@ -3902,90 +3902,90 @@ const er = pe(), xa = n.forwardRef((a, t) => {
|
|
|
3902
3902
|
u.current && u.current.focus();
|
|
3903
3903
|
},
|
|
3904
3904
|
[]
|
|
3905
|
-
), [E, D] = n.useState(f), [ee] =
|
|
3905
|
+
), [E, D] = n.useState(f), [ee, Z] = Fe(c), [M, b] = Fe(o), q = w !== void 0, K = q ? w : E, W = n.useCallback(
|
|
3906
3906
|
() => ({
|
|
3907
3907
|
element: u,
|
|
3908
3908
|
focus: y,
|
|
3909
3909
|
get value() {
|
|
3910
|
-
return
|
|
3910
|
+
return K;
|
|
3911
3911
|
},
|
|
3912
3912
|
get name() {
|
|
3913
3913
|
return u.current && u.current.name;
|
|
3914
3914
|
}
|
|
3915
3915
|
}),
|
|
3916
|
-
[y,
|
|
3916
|
+
[y, K]
|
|
3917
3917
|
);
|
|
3918
|
-
n.useImperativeHandle(t,
|
|
3919
|
-
const [
|
|
3918
|
+
n.useImperativeHandle(t, W);
|
|
3919
|
+
const [ie, Ee] = n.useState("auto"), le = Qe(), we = Ge(u, e.dir), be = F !== void 0 ? F : P ? !!K : !0;
|
|
3920
3920
|
n.useEffect(
|
|
3921
3921
|
() => {
|
|
3922
3922
|
u.current && u.current.setCustomValidity && u.current.setCustomValidity(
|
|
3923
|
-
|
|
3923
|
+
be ? "" : A || ""
|
|
3924
3924
|
);
|
|
3925
3925
|
},
|
|
3926
|
-
[
|
|
3926
|
+
[be, A]
|
|
3927
3927
|
), n.useLayoutEffect(
|
|
3928
3928
|
() => {
|
|
3929
|
-
u.current &&
|
|
3929
|
+
u.current && Ee(`${u.current.scrollHeight}px`);
|
|
3930
3930
|
},
|
|
3931
|
-
[
|
|
3931
|
+
[K]
|
|
3932
3932
|
);
|
|
3933
|
-
const
|
|
3934
|
-
(
|
|
3935
|
-
const
|
|
3936
|
-
|
|
3933
|
+
const Ne = n.useCallback(
|
|
3934
|
+
(ke) => {
|
|
3935
|
+
const Se = ke.target.value;
|
|
3936
|
+
Ee("auto"), !q && !v && D(Se), x && !v && J(
|
|
3937
3937
|
x,
|
|
3938
|
-
|
|
3938
|
+
ke,
|
|
3939
3939
|
{
|
|
3940
|
-
...
|
|
3941
|
-
value:
|
|
3940
|
+
...W(),
|
|
3941
|
+
value: Se
|
|
3942
3942
|
},
|
|
3943
|
-
{ value:
|
|
3943
|
+
{ value: Se }
|
|
3944
3944
|
);
|
|
3945
3945
|
},
|
|
3946
|
-
[D, x, v,
|
|
3947
|
-
),
|
|
3948
|
-
(
|
|
3946
|
+
[D, x, v, q]
|
|
3947
|
+
), z = n.useCallback(
|
|
3948
|
+
(ke) => {
|
|
3949
3949
|
L && !v && J(
|
|
3950
3950
|
L,
|
|
3951
|
-
|
|
3952
|
-
|
|
3951
|
+
ke,
|
|
3952
|
+
W(),
|
|
3953
3953
|
void 0
|
|
3954
3954
|
);
|
|
3955
3955
|
},
|
|
3956
3956
|
[L, v]
|
|
3957
|
-
),
|
|
3958
|
-
(
|
|
3957
|
+
), ve = n.useCallback(
|
|
3958
|
+
(ke) => {
|
|
3959
3959
|
$ && !v && J(
|
|
3960
3960
|
$,
|
|
3961
|
-
|
|
3962
|
-
|
|
3961
|
+
ke,
|
|
3962
|
+
W(),
|
|
3963
3963
|
void 0
|
|
3964
3964
|
);
|
|
3965
3965
|
},
|
|
3966
3966
|
[$, v]
|
|
3967
|
-
),
|
|
3968
|
-
id:
|
|
3967
|
+
), oe = {
|
|
3968
|
+
id: R || le,
|
|
3969
3969
|
role: "textbox",
|
|
3970
3970
|
name: S,
|
|
3971
3971
|
className: "k-input-inner !k-overflow-auto",
|
|
3972
3972
|
ref: u,
|
|
3973
3973
|
disabled: v,
|
|
3974
|
-
rows:
|
|
3974
|
+
rows: V,
|
|
3975
3975
|
placeholder: I,
|
|
3976
3976
|
readOnly: N,
|
|
3977
3977
|
required: P,
|
|
3978
|
-
tabIndex:
|
|
3979
|
-
style: p ? { resize: "none", overflow: "hidden", height:
|
|
3978
|
+
tabIndex: re(B, v),
|
|
3979
|
+
style: p ? { resize: "none", overflow: "hidden", height: ie } : {},
|
|
3980
3980
|
"aria-labelledby": d,
|
|
3981
3981
|
"aria-describedby": h,
|
|
3982
3982
|
"aria-multiline": !0,
|
|
3983
3983
|
"aria-disabled": v || void 0,
|
|
3984
|
-
value:
|
|
3984
|
+
value: q ? w : E,
|
|
3985
3985
|
...k,
|
|
3986
|
-
onChange:
|
|
3987
|
-
onFocus:
|
|
3988
|
-
onBlur:
|
|
3986
|
+
onChange: Ne,
|
|
3987
|
+
onFocus: z,
|
|
3988
|
+
onBlur: ve
|
|
3989
3989
|
};
|
|
3990
3990
|
return /* @__PURE__ */ n.createElement(
|
|
3991
3991
|
"span",
|
|
@@ -3994,21 +3994,21 @@ const er = pe(), xa = n.forwardRef((a, t) => {
|
|
|
3994
3994
|
"k-input",
|
|
3995
3995
|
"k-textarea",
|
|
3996
3996
|
{
|
|
3997
|
-
[`k-input-${
|
|
3997
|
+
[`k-input-${ne.sizeMap[s] || s}`]: s,
|
|
3998
3998
|
[`k-input-${l}`]: l,
|
|
3999
|
-
[`k-rounded-${
|
|
4000
|
-
"k-invalid": !(
|
|
3999
|
+
[`k-rounded-${ne.roundedMap[i] || i}`]: i,
|
|
4000
|
+
"k-invalid": !(be || T !== void 0 || T === !0),
|
|
4001
4001
|
"k-required": P,
|
|
4002
4002
|
"k-disabled": v
|
|
4003
4003
|
},
|
|
4004
4004
|
m
|
|
4005
4005
|
),
|
|
4006
4006
|
style: O,
|
|
4007
|
-
dir:
|
|
4007
|
+
dir: we
|
|
4008
4008
|
},
|
|
4009
|
-
/* @__PURE__ */ n.createElement(ee,
|
|
4010
|
-
/* @__PURE__ */ n.createElement("textarea", { ...
|
|
4011
|
-
/* @__PURE__ */ n.createElement(
|
|
4009
|
+
e.prefix && /* @__PURE__ */ n.createElement(ee, { ...Z }),
|
|
4010
|
+
/* @__PURE__ */ n.createElement("textarea", { ...oe }),
|
|
4011
|
+
e.suffix && /* @__PURE__ */ n.createElement(M, { ...b })
|
|
4012
4012
|
);
|
|
4013
4013
|
});
|
|
4014
4014
|
xa.propTypes = {
|
|
@@ -4046,7 +4046,7 @@ const tr = {
|
|
|
4046
4046
|
xa.displayName = "KendoTextArea";
|
|
4047
4047
|
xa.defaultProps = tr;
|
|
4048
4048
|
const Et = n.forwardRef((a, t) => {
|
|
4049
|
-
const e = n.useRef(null), s = n.useRef(null), i =
|
|
4049
|
+
const e = n.useRef(null), s = n.useRef(null), i = Ge(s, a.dir);
|
|
4050
4050
|
n.useImperativeHandle(e, () => ({
|
|
4051
4051
|
element: s.current,
|
|
4052
4052
|
props: a,
|
|
@@ -4175,29 +4175,29 @@ const Et = n.forwardRef((a, t) => {
|
|
|
4175
4175
|
Et.displayName = "KendoReactRatingItem";
|
|
4176
4176
|
Et.propTypes = ar;
|
|
4177
4177
|
Et.defaultProps = nr;
|
|
4178
|
-
const
|
|
4178
|
+
const Ce = (a, t) => {
|
|
4179
4179
|
if (a % 1) {
|
|
4180
4180
|
const e = Math.pow(10, (t.toString().split(".")[1] || t.toString().split(".")[0]).length);
|
|
4181
4181
|
return Math.round(a * e) / e;
|
|
4182
4182
|
}
|
|
4183
4183
|
return a;
|
|
4184
|
-
}, sr = (a, t) => a - t * Math.floor(a / t), da = (a, t, e) =>
|
|
4184
|
+
}, sr = (a, t) => a - t * Math.floor(a / t), da = (a, t, e) => Ce(a - e, e) < t && t < a, Tt = (a, t, e, s) => t === null ? !1 : s === "continues" ? da(a, t, e) ? Ce(a - e / 2, e / 2) <= t : a <= t : s === "single" ? da(a, t, e) ? Ce(a - e / 2, e / 2) === t : a === t : !1, Ya = (a, t, e) => a === "ltr" ? e < t.x + t.width / 2 : e > t.x + t.width / 2, Za = (a, t, e, s) => {
|
|
4185
4185
|
for (let i = a; i <= t; i += e)
|
|
4186
4186
|
if (s === i)
|
|
4187
4187
|
return !0;
|
|
4188
4188
|
return !1;
|
|
4189
4189
|
};
|
|
4190
|
-
var
|
|
4190
|
+
var de = /* @__PURE__ */ ((a) => (a.select = "select", a.deselect = "deselect", a.increase = "increase", a.decrease = "decrease", a.min = "min", a.max = "max", a.reset = "reset", a))(de || {});
|
|
4191
4191
|
const rr = (a, t) => {
|
|
4192
4192
|
switch (t.type) {
|
|
4193
4193
|
case "select":
|
|
4194
|
-
return t.payload === void 0 || t.step === void 0 ? a : t.payload === a ? null : t.payload >= t.min ? t.payload < t.max ?
|
|
4194
|
+
return t.payload === void 0 || t.step === void 0 ? a : t.payload === a ? null : t.payload >= t.min ? t.payload < t.max ? Ce(t.payload, t.step) : t.max : t.min;
|
|
4195
4195
|
case "deselect":
|
|
4196
4196
|
return null;
|
|
4197
4197
|
case "increase":
|
|
4198
|
-
return t.step === void 0 ? a : a < t.min ? t.min : a + t.step < t.max ?
|
|
4198
|
+
return t.step === void 0 ? a : a < t.min ? t.min : a + t.step < t.max ? Ce(a + t.step, t.step) : t.max;
|
|
4199
4199
|
case "decrease":
|
|
4200
|
-
return t.step === void 0 ? a :
|
|
4200
|
+
return t.step === void 0 ? a : Ce(a - t.step, t.step) >= t.min ? Ce(a - t.step, t.step) : t.min;
|
|
4201
4201
|
case "min":
|
|
4202
4202
|
return t.step === void 0 ? a : t.min;
|
|
4203
4203
|
case "max":
|
|
@@ -4213,8 +4213,8 @@ const rr = (a, t) => {
|
|
|
4213
4213
|
const o = rr(t.state || s, { ...c, ...t });
|
|
4214
4214
|
e && e(o, c.event), i(o);
|
|
4215
4215
|
}];
|
|
4216
|
-
}, ir =
|
|
4217
|
-
const e =
|
|
4216
|
+
}, ir = he(), Ea = n.forwardRef((a, t) => {
|
|
4217
|
+
const e = Me(ir, a), s = He(), i = n.useRef(null), l = n.useRef(null), c = Ge(l, e.dir);
|
|
4218
4218
|
n.useImperativeHandle(i, () => ({
|
|
4219
4219
|
element: l.current,
|
|
4220
4220
|
props: e
|
|
@@ -4229,28 +4229,28 @@ const rr = (a, t) => {
|
|
|
4229
4229
|
},
|
|
4230
4230
|
[e.onChange]
|
|
4231
4231
|
), h = n.useMemo(
|
|
4232
|
-
() => e.min !== void 0 ? e.min :
|
|
4232
|
+
() => e.min !== void 0 ? e.min : Re.min,
|
|
4233
4233
|
[e.min]
|
|
4234
4234
|
), d = n.useMemo(
|
|
4235
|
-
() => e.max !== void 0 ? e.max :
|
|
4235
|
+
() => e.max !== void 0 ? e.max : Re.max,
|
|
4236
4236
|
[e.max]
|
|
4237
4237
|
), p = n.useMemo(
|
|
4238
|
-
() => e.precision ||
|
|
4238
|
+
() => e.precision || Re.precision,
|
|
4239
4239
|
[e.precision]
|
|
4240
4240
|
), m = n.useMemo(
|
|
4241
|
-
() => e.step !== void 0 ? e.step :
|
|
4241
|
+
() => e.step !== void 0 ? e.step : Re.step,
|
|
4242
4242
|
[e.step]
|
|
4243
4243
|
), f = n.useMemo(
|
|
4244
|
-
() => e.readonly ||
|
|
4244
|
+
() => e.readonly || Re.readonly,
|
|
4245
4245
|
[e.readonly]
|
|
4246
4246
|
), v = n.useMemo(
|
|
4247
|
-
() => e.disabled ||
|
|
4247
|
+
() => e.disabled || Re.disabled,
|
|
4248
4248
|
[e.disabled]
|
|
4249
4249
|
), N = n.useMemo(
|
|
4250
|
-
() => e.item ||
|
|
4250
|
+
() => e.item || Re.item,
|
|
4251
4251
|
[e.item]
|
|
4252
|
-
), [P,
|
|
4253
|
-
e.defaultValue !== void 0 ? e.defaultValue :
|
|
4252
|
+
), [P, V] = Ja(
|
|
4253
|
+
e.defaultValue !== void 0 ? e.defaultValue : Re.defaultValue,
|
|
4254
4254
|
{
|
|
4255
4255
|
state: e.value,
|
|
4256
4256
|
min: h,
|
|
@@ -4258,7 +4258,7 @@ const rr = (a, t) => {
|
|
|
4258
4258
|
step: p === "half" ? m / 2 : m
|
|
4259
4259
|
},
|
|
4260
4260
|
o
|
|
4261
|
-
), [
|
|
4261
|
+
), [R, S] = Ja(
|
|
4262
4262
|
null,
|
|
4263
4263
|
{
|
|
4264
4264
|
state: e.value,
|
|
@@ -4271,10 +4271,10 @@ const rr = (a, t) => {
|
|
|
4271
4271
|
() => e.value !== void 0 ? e.value : P,
|
|
4272
4272
|
[e.value, P]
|
|
4273
4273
|
), O = n.useMemo(
|
|
4274
|
-
() =>
|
|
4275
|
-
[
|
|
4274
|
+
() => R,
|
|
4275
|
+
[R]
|
|
4276
4276
|
), B = n.useMemo(
|
|
4277
|
-
() => e.selection ||
|
|
4277
|
+
() => e.selection || Re.selection,
|
|
4278
4278
|
[e.selection]
|
|
4279
4279
|
), w = n.useMemo(
|
|
4280
4280
|
() => m / (p === "half" ? 2 : 1),
|
|
@@ -4283,10 +4283,10 @@ const rr = (a, t) => {
|
|
|
4283
4283
|
(g) => {
|
|
4284
4284
|
if (!(!g.target || !g.target.element || f || v)) {
|
|
4285
4285
|
if (p === "half") {
|
|
4286
|
-
const k = g.target.element.getBoundingClientRect(), y = Ya(c || "ltr", k, g.syntheticEvent.clientX) ?
|
|
4287
|
-
|
|
4286
|
+
const k = g.target.element.getBoundingClientRect(), y = Ya(c || "ltr", k, g.syntheticEvent.clientX) ? Ce(g.target.value - m / 2, w) : g.target.value;
|
|
4287
|
+
V({ type: de.select, payload: y, event: g.syntheticEvent });
|
|
4288
4288
|
} else
|
|
4289
|
-
|
|
4289
|
+
V({ type: de.select, payload: g.target.value, event: g.syntheticEvent });
|
|
4290
4290
|
if (e.onClick) {
|
|
4291
4291
|
const k = {
|
|
4292
4292
|
value: I,
|
|
@@ -4297,38 +4297,38 @@ const rr = (a, t) => {
|
|
|
4297
4297
|
}
|
|
4298
4298
|
}
|
|
4299
4299
|
},
|
|
4300
|
-
[e.onClick,
|
|
4300
|
+
[e.onClick, V, I]
|
|
4301
4301
|
), A = n.useCallback(
|
|
4302
4302
|
(g) => {
|
|
4303
4303
|
if (!(f || v)) {
|
|
4304
4304
|
switch (g.keyCode) {
|
|
4305
4305
|
case _.right:
|
|
4306
|
-
g.preventDefault(),
|
|
4307
|
-
type: c === "rtl" ?
|
|
4306
|
+
g.preventDefault(), V({
|
|
4307
|
+
type: c === "rtl" ? de.decrease : de.increase,
|
|
4308
4308
|
event: g
|
|
4309
4309
|
});
|
|
4310
4310
|
break;
|
|
4311
4311
|
case _.left:
|
|
4312
|
-
g.preventDefault(),
|
|
4313
|
-
type: c === "rtl" ?
|
|
4312
|
+
g.preventDefault(), V({
|
|
4313
|
+
type: c === "rtl" ? de.increase : de.decrease,
|
|
4314
4314
|
event: g
|
|
4315
4315
|
});
|
|
4316
4316
|
break;
|
|
4317
4317
|
case _.home:
|
|
4318
|
-
g.preventDefault(),
|
|
4319
|
-
type: c === "rtl" ?
|
|
4318
|
+
g.preventDefault(), V({
|
|
4319
|
+
type: c === "rtl" ? de.min : de.max,
|
|
4320
4320
|
event: g
|
|
4321
4321
|
});
|
|
4322
4322
|
break;
|
|
4323
4323
|
case _.end:
|
|
4324
|
-
g.preventDefault(),
|
|
4325
|
-
type: c === "rtl" ?
|
|
4324
|
+
g.preventDefault(), V({
|
|
4325
|
+
type: c === "rtl" ? de.max : de.min,
|
|
4326
4326
|
event: g
|
|
4327
4327
|
});
|
|
4328
4328
|
break;
|
|
4329
4329
|
case _.esc:
|
|
4330
|
-
g.preventDefault(),
|
|
4331
|
-
type:
|
|
4330
|
+
g.preventDefault(), V({
|
|
4331
|
+
type: de.deselect,
|
|
4332
4332
|
event: g
|
|
4333
4333
|
});
|
|
4334
4334
|
break;
|
|
@@ -4343,7 +4343,7 @@ const rr = (a, t) => {
|
|
|
4343
4343
|
);
|
|
4344
4344
|
}
|
|
4345
4345
|
},
|
|
4346
|
-
[e.onKeyDown,
|
|
4346
|
+
[e.onKeyDown, V, I]
|
|
4347
4347
|
), T = n.useCallback(
|
|
4348
4348
|
(g) => {
|
|
4349
4349
|
if (e.onFocus) {
|
|
@@ -4377,19 +4377,19 @@ const rr = (a, t) => {
|
|
|
4377
4377
|
if (!(!g.target || !g.target.element))
|
|
4378
4378
|
if (p === "half") {
|
|
4379
4379
|
const k = g.target.element.getBoundingClientRect(), y = Ya(c || "ltr", k, g.syntheticEvent.clientX) ? g.target.value - m / 2 : g.target.value;
|
|
4380
|
-
S({ type:
|
|
4380
|
+
S({ type: de.select, payload: y, event: g.syntheticEvent });
|
|
4381
4381
|
} else
|
|
4382
|
-
S({ type:
|
|
4382
|
+
S({ type: de.select, payload: g.target.value, event: g.syntheticEvent });
|
|
4383
4383
|
},
|
|
4384
4384
|
[p, m, c]
|
|
4385
4385
|
), $ = n.useCallback(
|
|
4386
4386
|
(g) => {
|
|
4387
|
-
S({ type:
|
|
4387
|
+
S({ type: de.reset, event: g.syntheticEvent });
|
|
4388
4388
|
},
|
|
4389
4389
|
[]
|
|
4390
|
-
), U = [], Q = sr(
|
|
4391
|
-
for (let g = h; g <= d; g =
|
|
4392
|
-
const k =
|
|
4390
|
+
), U = [], Q = sr(Ce(d - h, w), m);
|
|
4391
|
+
for (let g = h; g <= d; g = Ce(g + m, w)) {
|
|
4392
|
+
const k = Ce(g + Q, w), u = p === "half" ? da(k, O !== null ? O : I !== null ? I : 0, m) : !1, y = Tt(k, I, m, B), E = Tt(k, O !== null ? O : I, m, B), D = Tt(k, O, m, B);
|
|
4393
4393
|
U.push(
|
|
4394
4394
|
/* @__PURE__ */ n.createElement(
|
|
4395
4395
|
N,
|
|
@@ -4397,7 +4397,7 @@ const rr = (a, t) => {
|
|
|
4397
4397
|
key: k,
|
|
4398
4398
|
value: k,
|
|
4399
4399
|
dir: c,
|
|
4400
|
-
title: String(u ?
|
|
4400
|
+
title: String(u ? Ce(k - m / 2, w) : k),
|
|
4401
4401
|
icon: e.icon,
|
|
4402
4402
|
svgIcon: e.svgIcon,
|
|
4403
4403
|
half: u,
|
|
@@ -4407,10 +4407,10 @@ const rr = (a, t) => {
|
|
|
4407
4407
|
onMouseMove: L,
|
|
4408
4408
|
onMouseLeave: $
|
|
4409
4409
|
},
|
|
4410
|
-
u && /* @__PURE__ */ n.createElement("span", { className: "k-rating-precision-complement" }, !(e.icon || e.svgIconOutline) && /* @__PURE__ */ n.createElement(
|
|
4411
|
-
u && /* @__PURE__ */ n.createElement("span", { className: "k-rating-precision-part" }, !(e.icon || e.svgIcon) && /* @__PURE__ */ n.createElement(
|
|
4410
|
+
u && /* @__PURE__ */ n.createElement("span", { className: "k-rating-precision-complement" }, !(e.icon || e.svgIconOutline) && /* @__PURE__ */ n.createElement(fe, { name: "star-outline", icon: Ra, style: { clipPath: `${c === "rtl" ? "inset(0 50% 0 0)" : "inset(0 0 0 50%)"}` }, size: "xlarge" }), (e.icon || e.svgIconOutline) && /* @__PURE__ */ n.createElement(fe, { name: Vt(`${e.icon}-outline`), icon: e.svgIconOutline, size: "xlarge" })),
|
|
4411
|
+
u && /* @__PURE__ */ n.createElement("span", { className: "k-rating-precision-part" }, !(e.icon || e.svgIcon) && /* @__PURE__ */ n.createElement(fe, { name: "star", icon: Va, style: { clipPath: `${c === "rtl" ? "inset(0 0 0 50%)" : "inset(0 50% 0 0)"}` }, size: "xlarge" }), (e.icon || e.svgIcon) && /* @__PURE__ */ n.createElement(fe, { name: e.icon ? Vt(e.icon) : void 0, icon: e.svgIcon, size: "xlarge" })),
|
|
4412
4412
|
u && /* @__PURE__ */ n.createElement("span", { style: { width: "24px", height: "24px", display: "block" } }),
|
|
4413
|
-
!u && !(e.icon || e.svgIcon) && (D || E && !D) && /* @__PURE__ */ n.createElement(
|
|
4413
|
+
!u && !(e.icon || e.svgIcon) && (D || E && !D) && /* @__PURE__ */ n.createElement(fe, { name: "star", icon: Va, size: "xlarge" }) || !(e.icon || e.svgIcon) && !D && !E && /* @__PURE__ */ n.createElement(fe, { name: "star-outline", icon: Ra, size: "xlarge" }) || (e.icon || e.svgIcon) && (D || E && !D) && /* @__PURE__ */ n.createElement(fe, { name: e.icon, icon: e.svgIcon, size: "xlarge" }) || (e.icon || e.svgIcon) && !D && /* @__PURE__ */ n.createElement(fe, { name: Vt(`${e.icon}-outline`), icon: e.svgIconOutline, size: "xlarge" })
|
|
4414
4414
|
)
|
|
4415
4415
|
);
|
|
4416
4416
|
}
|
|
@@ -4422,7 +4422,7 @@ const rr = (a, t) => {
|
|
|
4422
4422
|
ref: l,
|
|
4423
4423
|
role: "slider",
|
|
4424
4424
|
dir: c,
|
|
4425
|
-
tabIndex:
|
|
4425
|
+
tabIndex: re(e.tabIndex, e.disabled, void 0),
|
|
4426
4426
|
className: G(
|
|
4427
4427
|
"k-rating",
|
|
4428
4428
|
{
|
|
@@ -4494,7 +4494,7 @@ const rr = (a, t) => {
|
|
|
4494
4494
|
svgIcon: zt,
|
|
4495
4495
|
svgIconOutline: zt,
|
|
4496
4496
|
ariaDescribedBy: r.string
|
|
4497
|
-
},
|
|
4497
|
+
}, Re = {
|
|
4498
4498
|
dir: "ltr",
|
|
4499
4499
|
min: 1,
|
|
4500
4500
|
max: 5,
|
|
@@ -4508,22 +4508,22 @@ const rr = (a, t) => {
|
|
|
4508
4508
|
};
|
|
4509
4509
|
Ea.displayName = "KendoReactRating";
|
|
4510
4510
|
Ea.propTypes = lr;
|
|
4511
|
-
Ea.defaultProps =
|
|
4511
|
+
Ea.defaultProps = Re;
|
|
4512
4512
|
function or(a, t) {
|
|
4513
4513
|
let e = a;
|
|
4514
4514
|
for (; e && e !== t; )
|
|
4515
4515
|
e = e.parentNode;
|
|
4516
4516
|
return !!e;
|
|
4517
4517
|
}
|
|
4518
|
-
const cr = 250, dr = 84, Ln = 3, Rn = 2, ur = "#000000", fr = "#ffffff", Qa = (a) => a !== void 0, hr =
|
|
4519
|
-
me
|
|
4520
|
-
const e =
|
|
4521
|
-
|
|
4518
|
+
const cr = 250, dr = 84, Ln = 3, Rn = 2, ur = "#000000", fr = "#ffffff", Qa = (a) => a !== void 0, hr = he(), St = n.forwardRef((a, t) => {
|
|
4519
|
+
pe(me);
|
|
4520
|
+
const e = Me(hr, a), s = He(), i = n.useRef(null), l = n.useRef(null), c = n.useRef(null), o = n.useRef(null), h = n.useRef(null), [d, p] = n.useState(), [m, f] = n.useState(!1), [v, N] = n.useState(!1), [P, V] = n.useState(), [R, S] = n.useState(), O = Qa(e.value) ? e.value : P, [B, w] = n.useState(!1), F = Qa(e.open), A = F ? e.open : B, T = !(e.maximized || v || !e.maximizable || e.disabled), x = e.maximized && !v, $ = !(!(e.value || P) || v || e.readOnly || e.disabled), U = s.toLanguageString(sa, H[sa]), Q = s.toLanguageString(ra, H[ra]), g = s.toLanguageString(na, H[na]), k = e.popupScale || Ln, u = e.exportScale || Rn, y = (C) => {
|
|
4521
|
+
V(C), e.onChange && e.onChange({ value: C });
|
|
4522
4522
|
}, E = (C) => {
|
|
4523
4523
|
d == null || d.loadImage(C.value), y(C.value);
|
|
4524
4524
|
};
|
|
4525
4525
|
n.useEffect(() => {
|
|
4526
|
-
e.value !== P && (
|
|
4526
|
+
e.value !== P && (V(e.value), d == null || d.loadImage(e.value));
|
|
4527
4527
|
}, [e.value]);
|
|
4528
4528
|
const D = () => {
|
|
4529
4529
|
d == null || d.clear(), y();
|
|
@@ -4532,44 +4532,44 @@ const cr = 250, dr = 84, Ln = 3, Rn = 2, ur = "#000000", fr = "#ffffff", Qa = (a
|
|
|
4532
4532
|
F || w(C);
|
|
4533
4533
|
},
|
|
4534
4534
|
[F]
|
|
4535
|
-
),
|
|
4536
|
-
var j,
|
|
4537
|
-
|
|
4538
|
-
},
|
|
4535
|
+
), Z = (C) => {
|
|
4536
|
+
var j, ce;
|
|
4537
|
+
Se(C), (ce = ((j = h.current) == null ? void 0 : j.element) || l.current) == null || ce.focus();
|
|
4538
|
+
}, M = n.useCallback(() => {
|
|
4539
4539
|
let C = ur;
|
|
4540
4540
|
return !e.color && typeof document != "undefined" && i.current && (C = getComputedStyle(i.current).color), e.color || C;
|
|
4541
4541
|
}, [e.color]), b = n.useCallback(() => {
|
|
4542
4542
|
let C = fr;
|
|
4543
4543
|
return !e.backgroundColor && typeof document != "undefined" && i.current && (C = getComputedStyle(i.current).backgroundColor), e.backgroundColor || C;
|
|
4544
|
-
}, [e.backgroundColor]),
|
|
4544
|
+
}, [e.backgroundColor]), q = () => ({
|
|
4545
4545
|
scale: e.maximized ? e.popupScale : 1,
|
|
4546
|
-
color:
|
|
4546
|
+
color: M(),
|
|
4547
4547
|
backgroundColor: b(),
|
|
4548
4548
|
strokeWidth: e.strokeWidth,
|
|
4549
4549
|
smooth: e.smooth,
|
|
4550
4550
|
readonly: e.readOnly
|
|
4551
|
-
}),
|
|
4552
|
-
const { width: j, height:
|
|
4551
|
+
}), K = async (C) => {
|
|
4552
|
+
const { width: j, height: ce } = C;
|
|
4553
4553
|
return await (d == null ? void 0 : d.exportImage({
|
|
4554
4554
|
width: j * u,
|
|
4555
|
-
height:
|
|
4555
|
+
height: ce * u
|
|
4556
4556
|
}));
|
|
4557
4557
|
};
|
|
4558
4558
|
n.useEffect(() => {
|
|
4559
|
-
const C = l.current, j = new Hn(C,
|
|
4559
|
+
const C = l.current, j = new Hn(C, q());
|
|
4560
4560
|
return O && j.loadImage(O), p(j), () => j.destroy();
|
|
4561
4561
|
}, []), n.useEffect(() => {
|
|
4562
4562
|
d == null || d.setOptions({
|
|
4563
|
-
onChange: async () => y(await
|
|
4563
|
+
onChange: async () => y(await K(tt())),
|
|
4564
4564
|
onDraw: () => N(!0),
|
|
4565
4565
|
onDrawEnd: () => N(!1)
|
|
4566
4566
|
});
|
|
4567
4567
|
}, [d]), n.useLayoutEffect(
|
|
4568
|
-
() => d == null ? void 0 : d.setOptions(
|
|
4568
|
+
() => d == null ? void 0 : d.setOptions(q()),
|
|
4569
4569
|
[e.readOnly, e.color, e.backgroundColor, e.strokeWidth, e.smooth]
|
|
4570
4570
|
), n.useEffect(() => {
|
|
4571
|
-
var
|
|
4572
|
-
const C = (
|
|
4571
|
+
var ce, Ie;
|
|
4572
|
+
const C = (Ie = (ce = c.current) == null ? void 0 : ce.element) == null ? void 0 : Ie.querySelector(".k-overlay");
|
|
4573
4573
|
if (!C)
|
|
4574
4574
|
return;
|
|
4575
4575
|
const j = () => ee(!1);
|
|
@@ -4585,49 +4585,49 @@ const cr = 250, dr = 84, Ln = 3, Rn = 2, ur = "#000000", fr = "#ffffff", Qa = (a
|
|
|
4585
4585
|
var C, j;
|
|
4586
4586
|
e.maximized && ((j = (C = o.current) == null ? void 0 : C.element) == null || j.focus());
|
|
4587
4587
|
}, []);
|
|
4588
|
-
const
|
|
4588
|
+
const W = n.useCallback(
|
|
4589
4589
|
() => {
|
|
4590
4590
|
var C;
|
|
4591
4591
|
return (C = l.current) == null ? void 0 : C.focus();
|
|
4592
4592
|
},
|
|
4593
4593
|
[]
|
|
4594
|
-
),
|
|
4594
|
+
), ie = n.useCallback(
|
|
4595
4595
|
() => e.value,
|
|
4596
4596
|
[e.value]
|
|
4597
|
-
),
|
|
4597
|
+
), Ee = n.useCallback(
|
|
4598
4598
|
() => e.name,
|
|
4599
4599
|
[e.name]
|
|
4600
|
-
),
|
|
4600
|
+
), le = n.useCallback(
|
|
4601
4601
|
() => e.required,
|
|
4602
4602
|
[e.required]
|
|
4603
|
-
),
|
|
4603
|
+
), we = n.useCallback(
|
|
4604
4604
|
() => {
|
|
4605
|
-
const C = e.validationMessage !== void 0,
|
|
4605
|
+
const C = e.validationMessage !== void 0, ce = !ie(), Ie = e.valid !== void 0 ? e.valid : !le() || !ce;
|
|
4606
4606
|
return {
|
|
4607
4607
|
customError: C,
|
|
4608
|
-
valid:
|
|
4609
|
-
valueMissing:
|
|
4608
|
+
valid: Ie,
|
|
4609
|
+
valueMissing: ce
|
|
4610
4610
|
};
|
|
4611
4611
|
},
|
|
4612
|
-
[e.validationMessage, e.valid,
|
|
4613
|
-
),
|
|
4612
|
+
[e.validationMessage, e.valid, ie, le]
|
|
4613
|
+
), be = n.useCallback(
|
|
4614
4614
|
() => e.validityStyles,
|
|
4615
4615
|
[e.validityStyles]
|
|
4616
|
-
),
|
|
4616
|
+
), Ne = n.useCallback(
|
|
4617
4617
|
() => e,
|
|
4618
4618
|
[e]
|
|
4619
4619
|
), z = n.useCallback(
|
|
4620
4620
|
() => {
|
|
4621
4621
|
const C = {
|
|
4622
4622
|
element: i.current,
|
|
4623
|
-
focus:
|
|
4623
|
+
focus: W
|
|
4624
4624
|
};
|
|
4625
|
-
return Object.defineProperty(C, "name", { get:
|
|
4625
|
+
return Object.defineProperty(C, "name", { get: Ee }), Object.defineProperty(C, "value", { get: ie }), Object.defineProperty(C, "validity", { get: we }), Object.defineProperty(C, "validityStyles", { get: be }), Object.defineProperty(C, "required", { get: le }), Object.defineProperty(C, "props", { get: Ne }), Object.defineProperty(C, "color", { get: M }), Object.defineProperty(C, "backgroundColor", { get: b }), C;
|
|
4626
4626
|
},
|
|
4627
|
-
[
|
|
4627
|
+
[Ee, ie, we, be, le, W, Ne, M, b]
|
|
4628
4628
|
);
|
|
4629
4629
|
n.useImperativeHandle(t, z);
|
|
4630
|
-
const
|
|
4630
|
+
const ve = n.useCallback(
|
|
4631
4631
|
(C) => {
|
|
4632
4632
|
m || e.maximized || (f(!0), J(
|
|
4633
4633
|
e.onFocus,
|
|
@@ -4637,7 +4637,7 @@ const cr = 250, dr = 84, Ln = 3, Rn = 2, ur = "#000000", fr = "#ffffff", Qa = (a
|
|
|
4637
4637
|
));
|
|
4638
4638
|
},
|
|
4639
4639
|
[m, e.onFocus, z]
|
|
4640
|
-
),
|
|
4640
|
+
), oe = n.useCallback(
|
|
4641
4641
|
(C) => {
|
|
4642
4642
|
or(C.relatedTarget, i.current) || (f(!1), J(
|
|
4643
4643
|
e.onBlur,
|
|
@@ -4647,9 +4647,9 @@ const cr = 250, dr = 84, Ln = 3, Rn = 2, ur = "#000000", fr = "#ffffff", Qa = (a
|
|
|
4647
4647
|
));
|
|
4648
4648
|
},
|
|
4649
4649
|
[m, e.onBlur, z]
|
|
4650
|
-
),
|
|
4650
|
+
), ke = n.useCallback(
|
|
4651
4651
|
async (C) => {
|
|
4652
|
-
S(await
|
|
4652
|
+
S(await K(at())), ee(!0), J(
|
|
4653
4653
|
e.onOpen,
|
|
4654
4654
|
C,
|
|
4655
4655
|
z(),
|
|
@@ -4657,7 +4657,7 @@ const cr = 250, dr = 84, Ln = 3, Rn = 2, ur = "#000000", fr = "#ffffff", Qa = (a
|
|
|
4657
4657
|
);
|
|
4658
4658
|
},
|
|
4659
4659
|
[A, F, e.onOpen, e.value, P, z]
|
|
4660
|
-
),
|
|
4660
|
+
), Se = n.useCallback(
|
|
4661
4661
|
(C) => {
|
|
4662
4662
|
ee(!1), J(
|
|
4663
4663
|
e.onClose,
|
|
@@ -4668,10 +4668,10 @@ const cr = 250, dr = 84, Ln = 3, Rn = 2, ur = "#000000", fr = "#ffffff", Qa = (a
|
|
|
4668
4668
|
},
|
|
4669
4669
|
[A, F, e.onClose, z]
|
|
4670
4670
|
), wt = () => {
|
|
4671
|
-
D(),
|
|
4671
|
+
D(), W();
|
|
4672
4672
|
}, tt = () => {
|
|
4673
|
-
var
|
|
4674
|
-
const C = e.width || ((
|
|
4673
|
+
var ce, Ie;
|
|
4674
|
+
const C = e.width || ((ce = i.current) == null ? void 0 : ce.offsetWidth) || cr, j = e.height || ((Ie = i.current) == null ? void 0 : Ie.offsetHeight) || dr;
|
|
4675
4675
|
return {
|
|
4676
4676
|
width: C,
|
|
4677
4677
|
height: j
|
|
@@ -4682,7 +4682,7 @@ const cr = 250, dr = 84, Ln = 3, Rn = 2, ur = "#000000", fr = "#ffffff", Qa = (a
|
|
|
4682
4682
|
width: C * k,
|
|
4683
4683
|
height: j * k
|
|
4684
4684
|
};
|
|
4685
|
-
}, It = !
|
|
4685
|
+
}, It = !be() || we().valid;
|
|
4686
4686
|
return /* @__PURE__ */ n.createElement(
|
|
4687
4687
|
"div",
|
|
4688
4688
|
{
|
|
@@ -4694,9 +4694,9 @@ const cr = 250, dr = 84, Ln = 3, Rn = 2, ur = "#000000", fr = "#ffffff", Qa = (a
|
|
|
4694
4694
|
"k-signature",
|
|
4695
4695
|
{
|
|
4696
4696
|
"k-signature-maximized": e.maximized,
|
|
4697
|
-
[`k-signature-${
|
|
4697
|
+
[`k-signature-${ne.sizeMap[e.size] || e.size}`]: e.size,
|
|
4698
4698
|
[`k-input-${e.fillMode}`]: e.fillMode,
|
|
4699
|
-
[`k-rounded-${
|
|
4699
|
+
[`k-rounded-${ne.roundedMap[e.rounded] || e.rounded}`]: e.rounded,
|
|
4700
4700
|
"k-invalid": !It,
|
|
4701
4701
|
"k-required": e.required,
|
|
4702
4702
|
"k-disabled": e.disabled,
|
|
@@ -4704,15 +4704,15 @@ const cr = 250, dr = 84, Ln = 3, Rn = 2, ur = "#000000", fr = "#ffffff", Qa = (a
|
|
|
4704
4704
|
},
|
|
4705
4705
|
e.className
|
|
4706
4706
|
),
|
|
4707
|
-
onFocus:
|
|
4708
|
-
onBlur:
|
|
4707
|
+
onFocus: ve,
|
|
4708
|
+
onBlur: oe
|
|
4709
4709
|
},
|
|
4710
4710
|
/* @__PURE__ */ n.createElement(
|
|
4711
4711
|
"div",
|
|
4712
4712
|
{
|
|
4713
4713
|
className: "k-signature-canvas",
|
|
4714
4714
|
ref: l,
|
|
4715
|
-
tabIndex:
|
|
4715
|
+
tabIndex: re(e.tabIndex, e.disabled),
|
|
4716
4716
|
role: "img",
|
|
4717
4717
|
id: e.id,
|
|
4718
4718
|
"aria-label": e.ariaLabel,
|
|
@@ -4722,7 +4722,7 @@ const cr = 250, dr = 84, Ln = 3, Rn = 2, ur = "#000000", fr = "#ffffff", Qa = (a
|
|
|
4722
4722
|
}
|
|
4723
4723
|
),
|
|
4724
4724
|
/* @__PURE__ */ n.createElement("div", { className: "k-signature-actions k-signature-actions-top" }, T && /* @__PURE__ */ n.createElement(
|
|
4725
|
-
|
|
4725
|
+
ge,
|
|
4726
4726
|
{
|
|
4727
4727
|
type: "button",
|
|
4728
4728
|
className: "k-signature-action k-signature-maximize",
|
|
@@ -4731,12 +4731,12 @@ const cr = 250, dr = 84, Ln = 3, Rn = 2, ur = "#000000", fr = "#ffffff", Qa = (a
|
|
|
4731
4731
|
svgIcon: Ma,
|
|
4732
4732
|
fillMode: "flat",
|
|
4733
4733
|
size: e.size,
|
|
4734
|
-
onClick:
|
|
4734
|
+
onClick: ke,
|
|
4735
4735
|
"aria-label": U,
|
|
4736
4736
|
title: U
|
|
4737
4737
|
}
|
|
4738
4738
|
), x && /* @__PURE__ */ n.createElement(
|
|
4739
|
-
|
|
4739
|
+
ge,
|
|
4740
4740
|
{
|
|
4741
4741
|
type: "button",
|
|
4742
4742
|
className: "k-signature-action k-signature-minimize k-rotate-180",
|
|
@@ -4745,7 +4745,7 @@ const cr = 250, dr = 84, Ln = 3, Rn = 2, ur = "#000000", fr = "#ffffff", Qa = (a
|
|
|
4745
4745
|
svgIcon: Ma,
|
|
4746
4746
|
fillMode: "flat",
|
|
4747
4747
|
size: e.size,
|
|
4748
|
-
onClick:
|
|
4748
|
+
onClick: Se,
|
|
4749
4749
|
"aria-label": Q,
|
|
4750
4750
|
title: Q
|
|
4751
4751
|
}
|
|
@@ -4758,7 +4758,7 @@ const cr = 250, dr = 84, Ln = 3, Rn = 2, ur = "#000000", fr = "#ffffff", Qa = (a
|
|
|
4758
4758
|
}
|
|
4759
4759
|
),
|
|
4760
4760
|
/* @__PURE__ */ n.createElement("div", { className: "k-signature-actions k-signature-actions-bottom" }, $ && /* @__PURE__ */ n.createElement(
|
|
4761
|
-
|
|
4761
|
+
ge,
|
|
4762
4762
|
{
|
|
4763
4763
|
type: "button",
|
|
4764
4764
|
className: "k-signature-action k-signature-clear",
|
|
@@ -4776,12 +4776,12 @@ const cr = 250, dr = 84, Ln = 3, Rn = 2, ur = "#000000", fr = "#ffffff", Qa = (a
|
|
|
4776
4776
|
{
|
|
4777
4777
|
...e,
|
|
4778
4778
|
...at(),
|
|
4779
|
-
value:
|
|
4779
|
+
value: R,
|
|
4780
4780
|
maximized: !0,
|
|
4781
4781
|
exportScale: 1 / k * u,
|
|
4782
4782
|
open: !1,
|
|
4783
4783
|
onChange: E,
|
|
4784
|
-
onClose:
|
|
4784
|
+
onClose: Z
|
|
4785
4785
|
}
|
|
4786
4786
|
))
|
|
4787
4787
|
);
|
|
@@ -4818,17 +4818,17 @@ St.defaultProps = {
|
|
|
4818
4818
|
disabled: !1,
|
|
4819
4819
|
required: !1,
|
|
4820
4820
|
validityStyles: !0,
|
|
4821
|
-
onChange: (a) =>
|
|
4822
|
-
onFocus: (a) =>
|
|
4823
|
-
onBlur: (a) =>
|
|
4824
|
-
onOpen: (a) =>
|
|
4825
|
-
onClose: (a) =>
|
|
4821
|
+
onChange: (a) => De,
|
|
4822
|
+
onFocus: (a) => De,
|
|
4823
|
+
onBlur: (a) => De,
|
|
4824
|
+
onOpen: (a) => De,
|
|
4825
|
+
onClose: (a) => De,
|
|
4826
4826
|
size: "medium",
|
|
4827
4827
|
rounded: "medium",
|
|
4828
4828
|
fillMode: "solid"
|
|
4829
4829
|
};
|
|
4830
4830
|
const Sa = n.forwardRef((a, t) => {
|
|
4831
|
-
me
|
|
4831
|
+
pe(me);
|
|
4832
4832
|
const e = n.useRef(null), s = n.useRef(null), i = n.useRef(), l = n.useCallback(
|
|
4833
4833
|
() => {
|
|
4834
4834
|
var $;
|
|
@@ -4865,10 +4865,10 @@ const Sa = n.forwardRef((a, t) => {
|
|
|
4865
4865
|
valid: N,
|
|
4866
4866
|
// Destruct to avoid warning when used inside a form field
|
|
4867
4867
|
modified: P,
|
|
4868
|
-
touched:
|
|
4869
|
-
visited:
|
|
4868
|
+
touched: V,
|
|
4869
|
+
visited: R,
|
|
4870
4870
|
...S
|
|
4871
|
-
} = a, [I] =
|
|
4871
|
+
} = a, [I] = Fe(f), [O] = Fe(v), [B, w] = n.useState(!1), F = ($) => {
|
|
4872
4872
|
w(!0);
|
|
4873
4873
|
}, A = ($) => {
|
|
4874
4874
|
w(!1);
|
|
@@ -4896,9 +4896,9 @@ const Sa = n.forwardRef((a, t) => {
|
|
|
4896
4896
|
className: G(
|
|
4897
4897
|
"k-textbox k-input",
|
|
4898
4898
|
{
|
|
4899
|
-
[`k-input-${
|
|
4899
|
+
[`k-input-${ne.sizeMap[c] || c}`]: c,
|
|
4900
4900
|
[`k-input-${o}`]: o,
|
|
4901
|
-
[`k-rounded-${
|
|
4901
|
+
[`k-rounded-${ne.roundedMap[h] || h}`]: h
|
|
4902
4902
|
},
|
|
4903
4903
|
{
|
|
4904
4904
|
"k-focus": B,
|
|
@@ -4981,7 +4981,7 @@ const br = n.forwardRef(({ orientation: a = "horizontal", ...t }, e) => {
|
|
|
4981
4981
|
), /* @__PURE__ */ n.createElement("span", { ...t, className: G("k-input-suffix", t.className, `k-input-suffix-${a}`) });
|
|
4982
4982
|
});
|
|
4983
4983
|
br.displayName = "KendoReactInputSuffix";
|
|
4984
|
-
const vr = n.forwardRef((a, t) => /* @__PURE__ */ n.createElement(
|
|
4984
|
+
const vr = n.forwardRef((a, t) => /* @__PURE__ */ n.createElement(fe, { ref: t, ...a, className: G("k-input-validation-icon", a.className) }));
|
|
4985
4985
|
vr.displayName = "KendoReactInputValidationIcon";
|
|
4986
4986
|
export {
|
|
4987
4987
|
ya as Checkbox,
|
|
@@ -5006,11 +5006,11 @@ export {
|
|
|
5006
5006
|
gt as InputWithoutContext,
|
|
5007
5007
|
Hs as MaskedTextBox,
|
|
5008
5008
|
yt as MaskedTextBoxWithoutContext,
|
|
5009
|
-
|
|
5009
|
+
$e as NumericTextBox,
|
|
5010
5010
|
ns as NumericTextBoxPropsContext,
|
|
5011
5011
|
Es as PALETTEPRESETS,
|
|
5012
|
-
|
|
5013
|
-
|
|
5012
|
+
X as RANGE_ACTION,
|
|
5013
|
+
de as RATING_ACTION,
|
|
5014
5014
|
xt as RadioButton,
|
|
5015
5015
|
Zs as RadioButtonPropsContext,
|
|
5016
5016
|
Ca as RadioGroup,
|
|
@@ -5041,5 +5041,5 @@ export {
|
|
|
5041
5041
|
Gs as rangeReducer,
|
|
5042
5042
|
rr as ratingReducer,
|
|
5043
5043
|
Ta as sanitizeNumber,
|
|
5044
|
-
|
|
5044
|
+
Ce as toRound
|
|
5045
5045
|
};
|