@progress/kendo-react-inputs 7.1.0-develop.7 → 7.1.0-develop.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cdn/js/kendo-react-inputs.js +3 -3
- package/index.js +3 -3
- package/index.mjs +1203 -1199
- package/package.json +9 -9
- package/textarea/interfaces/TextAreaProps.d.ts +10 -2
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 $e, provideLocalizationService as Je, registerForIntl as Pn, registerForLocalization as fa } from "@progress/kendo-react-intl";
|
|
9
|
+
import { createPropsContext as pe, validatePackage as me, usePropsContext as Re, useId as Qe, useCustomComponent as Be, dispatchEvent as J, getActiveElement as wa, classNames as G, kendoThemeMaps as se, getTabIndex as oe, withIdHOC as et, withPropsContext as Ue, useDir as He, Keys as _, Draggable as en, IconWrap as he, focusFirstFocusableChild as tn, svgIconPropType as zt, useDraggable as Dn, noop as Ne, 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 be, 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 ge = {
|
|
18
18
|
name: "@progress/kendo-react-inputs",
|
|
19
19
|
productName: "KendoReact",
|
|
20
20
|
productCodes: ["KENDOUIREACT", "KENDOUICOMPLETE"],
|
|
21
|
-
publishDate:
|
|
21
|
+
publishDate: 1706026961,
|
|
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", _e = "slider.dragTitle", ze = "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
|
+
[_e]: "Drag",
|
|
30
|
+
[ze]: "r",
|
|
31
31
|
[nn]: "g",
|
|
32
32
|
[sn]: "b",
|
|
33
33
|
[rn]: "a",
|
|
@@ -54,7 +54,7 @@ const me = {
|
|
|
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, ve = /\d/, pn = 15, Na = () => ({
|
|
58
58
|
eventValue: null,
|
|
59
59
|
prevLooseValue: "",
|
|
60
60
|
currentLooseValue: "",
|
|
@@ -64,16 +64,16 @@ const me = {
|
|
|
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, fe = (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),
|
|
72
|
-
t.eventValue =
|
|
71
|
+
const o = mn(a || 0, e || 0), h = Ke(gn((a || 0) + (e || 0), o), s, i);
|
|
72
|
+
t.eventValue = h, t.currentLooseValue = fe(h, l, c), t.selectionStart = t.selectionEnd = Ze(t.currentLooseValue, ve);
|
|
73
73
|
}, Ba = (a, t, e, s, i, l, c) => {
|
|
74
|
-
const o = mn(a || 0, e || 0),
|
|
75
|
-
t.eventValue =
|
|
76
|
-
},
|
|
74
|
+
const o = mn(a || 0, e || 0), h = Ke(gn((a || 0) - (e || 0), o), s, i);
|
|
75
|
+
t.eventValue = h, t.currentLooseValue = fe(h, l, c), t.selectionStart = t.selectionEnd = Ze(t.currentLooseValue, ve);
|
|
76
|
+
}, Ke = (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;
|
|
@@ -102,22 +102,22 @@ const me = {
|
|
|
102
102
|
const e = String(a.currentLooseValue), s = String(a.prevLooseValue);
|
|
103
103
|
return e.indexOf(t.minusSign) === -1 && s.indexOf(t.minusSign) !== -1;
|
|
104
104
|
}, Qn = (a, t) => String(a.currentLooseValue).split(t.decimal).length > 2, es = (a, t) => {
|
|
105
|
-
const e = t.formatNumber(pt, a), s = t.formatNumber(-pt, a), i = t.formatNumber(hn, a), l = t.formatNumber(fn, a), c = nt(e), o = nt(s),
|
|
105
|
+
const e = t.formatNumber(pt, a), s = t.formatNumber(-pt, a), i = t.formatNumber(hn, a), l = t.formatNumber(fn, a), c = nt(e), o = nt(s), h = nt(i), d = nt(l), p = st(e), m = st(s), f = st(i), v = st(l);
|
|
106
106
|
return {
|
|
107
|
-
positiveInfo: [c,
|
|
108
|
-
negativeInfo: [o,
|
|
109
|
-
zeroInfo: [
|
|
110
|
-
oneInfo: [d,
|
|
107
|
+
positiveInfo: [c, p],
|
|
108
|
+
negativeInfo: [o, m],
|
|
109
|
+
zeroInfo: [h, f],
|
|
110
|
+
oneInfo: [d, v]
|
|
111
111
|
};
|
|
112
112
|
}, ts = (a, t) => {
|
|
113
113
|
const e = t.formatNumber(pt, a), s = t.formatNumber(-pt, a), i = t.formatNumber(hn, a), l = t.formatNumber(fn, a), c = t.numberSymbols(), o = new RegExp(`[\\d\\${c.decimal}${c.group}]`, "g");
|
|
114
|
-
return [e, s, i, l].map((d) => d.replace(o, "")).join("").split("").filter((d,
|
|
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, ve);
|
|
118
|
+
}, ia = (a) => a.split("").reverse().join(""), Ze = (a, t) => a.length - ia(a).search(t), nt = (a) => a.split(a[a.search(ve)])[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(ve)])[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,52 +129,52 @@ const me = {
|
|
|
129
129
|
return e + 1;
|
|
130
130
|
let o = 0;
|
|
131
131
|
for (let d = 0; d < e; d++)
|
|
132
|
-
|
|
133
|
-
let
|
|
134
|
-
for (; o > 0 && t.length >
|
|
135
|
-
|
|
136
|
-
return
|
|
132
|
+
ve.test(a.charAt(d)) && o++;
|
|
133
|
+
let h = 0;
|
|
134
|
+
for (; o > 0 && t.length > h; )
|
|
135
|
+
ve.test(t.charAt(h)) && o--, h++;
|
|
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),
|
|
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, ve), N = v === -1 ? -1 : Ze(o, ve), P = o.indexOf(l.decimal), M = (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(""), V = e.formatNumber(qn, t).replace(d, ""), S = V.indexOf(l.decimal), I = S > -1 ? V.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
|
-
negativeInfo:
|
|
140
|
+
negativeInfo: A,
|
|
141
141
|
zeroInfo: T,
|
|
142
|
-
oneInfo:
|
|
143
|
-
} = es(t, e),
|
|
142
|
+
oneInfo: x
|
|
143
|
+
} = es(t, e), L = [F, A, T, x], $ = L.findIndex((g) => g.findIndex((k) => !!k) !== -1) !== 1, U = o.length > 0 && o.length < h.length, Q = typeof t == "string" && t[0] === "p" && o && o.indexOf(l.percentSign) === -1;
|
|
144
144
|
if (!s.isPaste) {
|
|
145
145
|
if (o === "")
|
|
146
146
|
return s.eventValue = null, s.currentLooseValue = "", s;
|
|
147
|
-
if (s.currentLooseValue === l.minusSign && e.formatNumber(-0, t) !==
|
|
148
|
-
return s.eventValue = -0, s.currentLooseValue =
|
|
147
|
+
if (s.currentLooseValue === l.minusSign && e.formatNumber(-0, t) !== h)
|
|
148
|
+
return s.eventValue = -0, s.currentLooseValue = fe(s.eventValue, t, e), Le(
|
|
149
149
|
s,
|
|
150
150
|
Dt(s.currentLooseValue, l),
|
|
151
151
|
s.currentLooseValue,
|
|
152
|
-
|
|
152
|
+
L
|
|
153
153
|
), s;
|
|
154
154
|
if (s.currentLooseValue === l.decimal) {
|
|
155
155
|
s.eventValue = 0;
|
|
156
|
-
const
|
|
157
|
-
if (
|
|
158
|
-
const
|
|
159
|
-
s.currentLooseValue =
|
|
156
|
+
const y = fe(s.eventValue, t, e);
|
|
157
|
+
if (w === 0 && I > 0) {
|
|
158
|
+
const E = Ze(y, ve);
|
|
159
|
+
s.currentLooseValue = y.substring(0, E) + l.decimal + y.substring(E);
|
|
160
160
|
} else
|
|
161
|
-
s.currentLooseValue =
|
|
161
|
+
s.currentLooseValue = y;
|
|
162
162
|
return Le(
|
|
163
163
|
s,
|
|
164
164
|
Dt(s.currentLooseValue, l) + 1,
|
|
165
165
|
s.currentLooseValue,
|
|
166
|
-
|
|
166
|
+
L
|
|
167
167
|
), s;
|
|
168
168
|
}
|
|
169
169
|
if (Zn(s, l)) {
|
|
170
|
-
const
|
|
171
|
-
s.eventValue = -(
|
|
172
|
-
const
|
|
170
|
+
const y = e.parseNumber(i, t);
|
|
171
|
+
s.eventValue = -(y !== null ? y : 0), s.currentLooseValue = fe(s.eventValue, t, e);
|
|
172
|
+
const E = Bt(s.currentLooseValue, ve), D = Bt(h, ve);
|
|
173
173
|
return Le(
|
|
174
174
|
s,
|
|
175
|
-
s.selectionEnd - 1 + (
|
|
175
|
+
s.selectionEnd - 1 + (E - D),
|
|
176
176
|
s.currentLooseValue,
|
|
177
|
-
|
|
177
|
+
L
|
|
178
178
|
), s;
|
|
179
179
|
}
|
|
180
180
|
if (Jn(s, l))
|
|
@@ -182,70 +182,70 @@ const me = {
|
|
|
182
182
|
s,
|
|
183
183
|
s.selectionStart,
|
|
184
184
|
s.currentLooseValue,
|
|
185
|
-
|
|
185
|
+
L
|
|
186
186
|
), s;
|
|
187
187
|
if (Qn(s, l))
|
|
188
|
-
return Pt(s, t,
|
|
189
|
-
if (
|
|
190
|
-
return s.eventValue = e.parseNumber(o, t) / 100, s.currentLooseValue =
|
|
191
|
-
if (String(s.currentLooseValue).replace(/[^\d]/g, "").length > pn || f !== o && o &&
|
|
192
|
-
const
|
|
193
|
-
return
|
|
188
|
+
return Pt(s, t, L, e), s;
|
|
189
|
+
if (Q)
|
|
190
|
+
return s.eventValue = e.parseNumber(o, t) / 100, s.currentLooseValue = fe(s.eventValue, t, e), s;
|
|
191
|
+
if (String(s.currentLooseValue).replace(/[^\d]/g, "").length > pn || f !== o && o && $ && L.findIndex(([E, D]) => {
|
|
192
|
+
const ee = o.indexOf(E), Y = o.indexOf(D), R = ee === 0, b = Y === o.length - D.length, K = ee + E.length !== v && v !== -1 && o[ee + E.length] !== l.decimal, q = Y !== N && N !== -1 && o[Y - 1] !== l.decimal;
|
|
193
|
+
return E && D ? K || q ? !1 : R && b : E ? K ? !1 : R : D ? q ? !1 : b : !1;
|
|
194
194
|
}) === -1)
|
|
195
|
-
return Pt(s, t,
|
|
196
|
-
if (f[f.length - 1] === l.decimal &&
|
|
197
|
-
return s.eventValue = e.parseNumber(o, t), s.currentLooseValue =
|
|
198
|
-
if (s.currentLooseValue && i && (c + l.decimal + l.group).split("").findIndex((
|
|
195
|
+
return Pt(s, t, L, e), s;
|
|
196
|
+
if (f[f.length - 1] === l.decimal && I > 0)
|
|
197
|
+
return s.eventValue = e.parseNumber(o, t), s.currentLooseValue = M, s;
|
|
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
|
-
const
|
|
201
|
-
if (
|
|
202
|
-
return s.eventValue = e.parseNumber(s.currentLooseValue, t), s.currentLooseValue =
|
|
203
|
-
if (
|
|
204
|
-
const
|
|
205
|
-
if (
|
|
200
|
+
const k = Oa(f, l.decimal), u = f[f.length - 1] === "0";
|
|
201
|
+
if (U && u && k < w)
|
|
202
|
+
return s.eventValue = e.parseNumber(s.currentLooseValue, t), s.currentLooseValue = fe(s.eventValue, t, e), s;
|
|
203
|
+
if (k > 0) {
|
|
204
|
+
const y = o.substring(0, P);
|
|
205
|
+
if (u && (!y || h.indexOf(y) !== 0)) {
|
|
206
206
|
s.eventValue = e.parseNumber(s.currentLooseValue, t);
|
|
207
|
-
const
|
|
207
|
+
const E = fe(s.eventValue, t, e);
|
|
208
208
|
return Le(
|
|
209
209
|
s,
|
|
210
|
-
Fa(o,
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
), s.currentLooseValue =
|
|
210
|
+
Fa(o, E, s.selectionEnd, U, d),
|
|
211
|
+
E,
|
|
212
|
+
L
|
|
213
|
+
), s.currentLooseValue = E, s;
|
|
214
214
|
}
|
|
215
|
-
if (
|
|
216
|
-
const
|
|
217
|
-
return s.eventValue = e.parseNumber(
|
|
215
|
+
if (k > I) {
|
|
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, Le(s, s.selectionStart, D, L), s;
|
|
218
218
|
}
|
|
219
|
-
if (
|
|
220
|
-
return s.eventValue = e.parseNumber(s.currentLooseValue, t), s.currentLooseValue =
|
|
221
|
-
if (
|
|
222
|
-
return s.eventValue = e.parseNumber(s.currentLooseValue, t), s.currentLooseValue =
|
|
219
|
+
if (w !== I && k <= I && u)
|
|
220
|
+
return s.eventValue = e.parseNumber(s.currentLooseValue, t), s.currentLooseValue = M, s;
|
|
221
|
+
if (k < w)
|
|
222
|
+
return s.eventValue = e.parseNumber(s.currentLooseValue, t), s.currentLooseValue = fe(s.eventValue, t, e), s;
|
|
223
223
|
}
|
|
224
224
|
}
|
|
225
|
-
if (s.eventValue = e.parseNumber(s.currentLooseValue, t),
|
|
226
|
-
const
|
|
227
|
-
o.length === 1 ? Le(s, Dt(
|
|
225
|
+
if (s.eventValue = e.parseNumber(s.currentLooseValue, t), Q && (s.eventValue = s.eventValue / 100), typeof s.eventValue == "number") {
|
|
226
|
+
const g = fe(s.eventValue, t, e);
|
|
227
|
+
o.length === 1 ? Le(s, Dt(g, l), g, L) : Le(
|
|
228
228
|
s,
|
|
229
|
-
Fa(o,
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
), s.currentLooseValue =
|
|
229
|
+
Fa(o, g, s.selectionEnd, U, d),
|
|
230
|
+
g,
|
|
231
|
+
L
|
|
232
|
+
), s.currentLooseValue = g;
|
|
233
233
|
} else
|
|
234
|
-
s.currentLooseValue =
|
|
234
|
+
s.currentLooseValue = fe(e.parseNumber(f), t, e);
|
|
235
235
|
return s;
|
|
236
|
-
}, as = "Please enter a valid value!", ns =
|
|
237
|
-
|
|
238
|
-
const e = Re(ns, a), s = Qe(), i = e.id || s, l = Nn(), c =
|
|
239
|
-
|
|
236
|
+
}, as = "Please enter a valid value!", ns = pe(), Ae = n.forwardRef((a, t) => {
|
|
237
|
+
me(ge);
|
|
238
|
+
const e = Re(ns, a), s = Qe(), i = e.id || s, l = Nn(), c = $e(), 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 = fe(
|
|
239
|
+
m.current.focused && !e.disabled ? m.current.currentLooseValue : Nt(e.value, N.current),
|
|
240
240
|
e.format,
|
|
241
241
|
l
|
|
242
242
|
);
|
|
243
|
-
|
|
244
|
-
const [
|
|
243
|
+
v.current = P;
|
|
244
|
+
const [M] = Be(e.prefix), [V] = Be(e.suffix);
|
|
245
245
|
n.useEffect(
|
|
246
246
|
() => {
|
|
247
247
|
o.current && o.current.setCustomValidity && o.current.setCustomValidity(
|
|
248
|
-
|
|
248
|
+
w().valid ? "" : e.validationMessage || as
|
|
249
249
|
);
|
|
250
250
|
}
|
|
251
251
|
);
|
|
@@ -254,29 +254,29 @@ const me = {
|
|
|
254
254
|
o.current && o.current.focus();
|
|
255
255
|
},
|
|
256
256
|
[]
|
|
257
|
-
),
|
|
258
|
-
() =>
|
|
257
|
+
), I = n.useCallback(
|
|
258
|
+
() => h.current !== void 0 ? h.current : Nt(e.value, N.current),
|
|
259
259
|
[e.value]
|
|
260
|
-
),
|
|
260
|
+
), O = n.useCallback(
|
|
261
261
|
() => e.name,
|
|
262
262
|
[e.name]
|
|
263
|
-
),
|
|
263
|
+
), B = n.useCallback(
|
|
264
264
|
() => e.required,
|
|
265
265
|
[e.required]
|
|
266
|
-
),
|
|
266
|
+
), w = n.useCallback(
|
|
267
267
|
() => {
|
|
268
|
-
const R = e.validationMessage !== void 0, b =
|
|
268
|
+
const R = e.validationMessage !== void 0, b = I(), K = e.valid !== void 0 ? e.valid : !m.current.valueIsOutOfRange && (!B() || b != null);
|
|
269
269
|
return {
|
|
270
270
|
customError: R,
|
|
271
|
-
valid:
|
|
271
|
+
valid: K,
|
|
272
272
|
valueMissing: b == null
|
|
273
273
|
};
|
|
274
274
|
},
|
|
275
|
-
[e.validationMessage, e.valid,
|
|
275
|
+
[e.validationMessage, e.valid, I, B]
|
|
276
276
|
), F = n.useCallback(
|
|
277
277
|
() => e.validityStyles,
|
|
278
278
|
[e.validityStyles]
|
|
279
|
-
),
|
|
279
|
+
), A = n.useCallback(
|
|
280
280
|
() => e,
|
|
281
281
|
[e]
|
|
282
282
|
), T = n.useCallback(
|
|
@@ -285,15 +285,15 @@ const me = {
|
|
|
285
285
|
element: o.current,
|
|
286
286
|
focus: S
|
|
287
287
|
};
|
|
288
|
-
return Object.defineProperty(R, "name", { get:
|
|
288
|
+
return Object.defineProperty(R, "name", { get: O }), Object.defineProperty(R, "value", { get: I }), Object.defineProperty(R, "validity", { get: w }), Object.defineProperty(R, "validityStyles", { get: F }), Object.defineProperty(R, "required", { get: B }), Object.defineProperty(R, "props", { get: A }), R;
|
|
289
289
|
},
|
|
290
|
-
[
|
|
290
|
+
[O, I, w, F, B, S, A]
|
|
291
291
|
);
|
|
292
292
|
n.useImperativeHandle(t, T);
|
|
293
|
-
const
|
|
293
|
+
const x = n.useCallback(
|
|
294
294
|
() => ({
|
|
295
295
|
eventValue: Nt(e.value, N.current),
|
|
296
|
-
prevLooseValue:
|
|
296
|
+
prevLooseValue: v.current,
|
|
297
297
|
currentLooseValue: o.current.value,
|
|
298
298
|
selectionStart: o.current.selectionStart,
|
|
299
299
|
selectionEnd: o.current.selectionEnd,
|
|
@@ -301,42 +301,42 @@ const me = {
|
|
|
301
301
|
valueIsCorrected: !1,
|
|
302
302
|
valueIsOutOfRange: !1,
|
|
303
303
|
isPaste: f.current,
|
|
304
|
-
focused:
|
|
304
|
+
focused: m.current.focused
|
|
305
305
|
}),
|
|
306
306
|
[e.value]
|
|
307
|
-
),
|
|
307
|
+
), L = n.useCallback(
|
|
308
308
|
(R, b) => {
|
|
309
309
|
if (e.disabled)
|
|
310
310
|
return;
|
|
311
|
-
|
|
312
|
-
const
|
|
313
|
-
|
|
311
|
+
h.current = b.eventValue, N.current = b.eventValue;
|
|
312
|
+
const K = fe(Ke(b.eventValue, e.min, e.max), e.format, l), q = Ke(l.parseNumber(K, e.format), e.min, e.max);
|
|
313
|
+
q !== b.eventValue && (b.valueIsOutOfRange = !0, b.eventValue = q, N.current = q), e.value !== b.eventValue && J(
|
|
314
314
|
e.onChange,
|
|
315
315
|
R,
|
|
316
316
|
T(),
|
|
317
317
|
{ value: b.eventValue }
|
|
318
|
-
),
|
|
318
|
+
), h.current = void 0, m.current = b, p((ce) => !ce);
|
|
319
319
|
},
|
|
320
|
-
[e.value, e.onChange, e.disabled,
|
|
321
|
-
),
|
|
320
|
+
[e.value, e.onChange, e.disabled, p, T]
|
|
321
|
+
), $ = n.useCallback(
|
|
322
322
|
(R) => {
|
|
323
|
-
const b =
|
|
324
|
-
f.current = !1,
|
|
323
|
+
const b = x();
|
|
324
|
+
f.current = !1, L(R, Ta(b, e.format, l));
|
|
325
325
|
},
|
|
326
|
-
[e.format, e.onChange, l,
|
|
327
|
-
),
|
|
326
|
+
[e.format, e.onChange, l, L, x]
|
|
327
|
+
), U = n.useCallback(
|
|
328
328
|
(R) => {
|
|
329
|
-
let b =
|
|
330
|
-
const
|
|
329
|
+
let b = x();
|
|
330
|
+
const K = 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 q = l.numberSymbols(), Z = q && R.key === q.minusSign, ce = q && R.key === q.decimal;
|
|
333
|
+
f.current = !Z && !ce;
|
|
334
334
|
return;
|
|
335
335
|
}
|
|
336
336
|
switch (R.keyCode) {
|
|
337
337
|
case 38:
|
|
338
338
|
Da(
|
|
339
|
-
|
|
339
|
+
K,
|
|
340
340
|
b,
|
|
341
341
|
e.step,
|
|
342
342
|
e.min,
|
|
@@ -347,7 +347,7 @@ const me = {
|
|
|
347
347
|
break;
|
|
348
348
|
case 40:
|
|
349
349
|
Ba(
|
|
350
|
-
|
|
350
|
+
K,
|
|
351
351
|
b,
|
|
352
352
|
e.step,
|
|
353
353
|
e.min,
|
|
@@ -359,31 +359,31 @@ const me = {
|
|
|
359
359
|
case 13: {
|
|
360
360
|
if (e.rangeOnEnter === !1)
|
|
361
361
|
return;
|
|
362
|
-
const
|
|
363
|
-
b.eventValue =
|
|
362
|
+
const q = fe(Ke(K, e.min, e.max), e.format, l), Z = Ke(l.parseNumber(q, e.format), e.min, e.max);
|
|
363
|
+
b.eventValue = Z, b.currentLooseValue = fe(Z, e.format, l), b.selectionStart = b.selectionEnd = b.currentLooseValue.length;
|
|
364
364
|
break;
|
|
365
365
|
}
|
|
366
366
|
case 110: {
|
|
367
|
-
const
|
|
368
|
-
|
|
367
|
+
const q = o.current, Z = l.numberSymbols();
|
|
368
|
+
q && (b.currentLooseValue = b.currentLooseValue.slice(0, b.selectionStart) + Z.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
|
-
R.preventDefault(),
|
|
374
|
+
R.preventDefault(), L(R, b);
|
|
375
375
|
},
|
|
376
|
-
[e.format, e.min, e.max, e.step, e.onChange, e.rangeOnEnter,
|
|
377
|
-
),
|
|
376
|
+
[e.format, e.min, e.max, e.step, e.onChange, e.rangeOnEnter, L, x]
|
|
377
|
+
), Q = n.useCallback(
|
|
378
378
|
() => {
|
|
379
379
|
f.current = !0;
|
|
380
380
|
},
|
|
381
381
|
[]
|
|
382
|
-
),
|
|
382
|
+
), g = n.useCallback(
|
|
383
383
|
(R) => {
|
|
384
384
|
if (e.readOnly || e.disabled)
|
|
385
385
|
return;
|
|
386
|
-
const b =
|
|
386
|
+
const b = x();
|
|
387
387
|
Da(
|
|
388
388
|
l.parseNumber(String(b.currentLooseValue), e.format),
|
|
389
389
|
b,
|
|
@@ -392,14 +392,14 @@ const me = {
|
|
|
392
392
|
e.max,
|
|
393
393
|
e.format,
|
|
394
394
|
l
|
|
395
|
-
),
|
|
395
|
+
), L(R, b);
|
|
396
396
|
},
|
|
397
|
-
[e.format, e.min, e.max, e.step, e.onChange, e.readOnly, e.disabled,
|
|
398
|
-
),
|
|
397
|
+
[e.format, e.min, e.max, e.step, e.onChange, e.readOnly, e.disabled, L, x]
|
|
398
|
+
), k = n.useCallback(
|
|
399
399
|
(R) => {
|
|
400
400
|
if (e.readOnly || e.disabled)
|
|
401
401
|
return;
|
|
402
|
-
const b =
|
|
402
|
+
const b = x();
|
|
403
403
|
Ba(
|
|
404
404
|
l.parseNumber(String(b.currentLooseValue), e.format),
|
|
405
405
|
b,
|
|
@@ -408,36 +408,36 @@ const me = {
|
|
|
408
408
|
e.max,
|
|
409
409
|
e.format,
|
|
410
410
|
l
|
|
411
|
-
),
|
|
411
|
+
), L(R, b);
|
|
412
412
|
},
|
|
413
|
-
[e.format, e.min, e.max, e.step, e.onChange, e.readOnly, e.disabled,
|
|
414
|
-
),
|
|
413
|
+
[e.format, e.min, e.max, e.step, e.onChange, e.readOnly, e.disabled, L, x]
|
|
414
|
+
), u = n.useCallback(
|
|
415
415
|
(R) => {
|
|
416
416
|
const b = wa(document);
|
|
417
|
-
!document || b !== o.current || !o.current || e.readOnly || e.disabled || (R.nativeEvent.deltaY < 0 &&
|
|
417
|
+
!document || b !== o.current || !o.current || e.readOnly || e.disabled || (R.nativeEvent.deltaY < 0 && g(R), R.nativeEvent.deltaY > 0 && k(R));
|
|
418
418
|
},
|
|
419
|
-
[
|
|
420
|
-
),
|
|
419
|
+
[g, k, e.disabled, e.readOnly]
|
|
420
|
+
), y = n.useCallback(
|
|
421
421
|
(R) => {
|
|
422
|
-
|
|
422
|
+
m.current.currentLooseValue = v.current, m.current.focused = !0, J(
|
|
423
423
|
e.onFocus,
|
|
424
424
|
R,
|
|
425
425
|
T(),
|
|
426
426
|
{}
|
|
427
|
-
),
|
|
427
|
+
), p((b) => !b);
|
|
428
428
|
},
|
|
429
|
-
[e.onFocus,
|
|
430
|
-
),
|
|
429
|
+
[e.onFocus, p, T]
|
|
430
|
+
), E = n.useCallback(
|
|
431
431
|
(R) => {
|
|
432
|
-
|
|
432
|
+
m.current = Na(), J(
|
|
433
433
|
e.onBlur,
|
|
434
434
|
R,
|
|
435
435
|
T(),
|
|
436
436
|
{}
|
|
437
|
-
),
|
|
437
|
+
), p((b) => !b);
|
|
438
438
|
},
|
|
439
|
-
[e.onBlur,
|
|
440
|
-
),
|
|
439
|
+
[e.onBlur, p, T]
|
|
440
|
+
), D = n.useCallback(
|
|
441
441
|
(R) => {
|
|
442
442
|
if (document && o.current) {
|
|
443
443
|
const b = wa(document);
|
|
@@ -448,11 +448,11 @@ const me = {
|
|
|
448
448
|
);
|
|
449
449
|
n.useLayoutEffect(
|
|
450
450
|
() => {
|
|
451
|
-
o.current && o.current.type !== "number" &&
|
|
451
|
+
o.current && o.current.type !== "number" && m.current.selectionStart !== void 0 && m.current.selectionEnd !== void 0 && (o.current.selectionStart = m.current.selectionStart, o.current.selectionEnd = m.current.selectionEnd, m.current.selectionStart = void 0, m.current.selectionEnd = void 0);
|
|
452
452
|
},
|
|
453
453
|
[d]
|
|
454
454
|
);
|
|
455
|
-
const
|
|
455
|
+
const ee = !F() || w().valid, Y = /* @__PURE__ */ n.createElement(
|
|
456
456
|
"span",
|
|
457
457
|
{
|
|
458
458
|
dir: e.dir,
|
|
@@ -461,10 +461,10 @@ const me = {
|
|
|
461
461
|
"k-input",
|
|
462
462
|
"k-numerictextbox",
|
|
463
463
|
{
|
|
464
|
-
[`k-input-${
|
|
464
|
+
[`k-input-${se.sizeMap[e.size] || e.size}`]: e.size,
|
|
465
465
|
[`k-input-${e.fillMode}`]: e.fillMode,
|
|
466
|
-
[`k-rounded-${
|
|
467
|
-
"k-invalid": !
|
|
466
|
+
[`k-rounded-${se.roundedMap[e.rounded] || e.rounded}`]: e.rounded,
|
|
467
|
+
"k-invalid": !ee,
|
|
468
468
|
"k-required": e.required,
|
|
469
469
|
"k-disabled": e.disabled
|
|
470
470
|
},
|
|
@@ -472,13 +472,13 @@ const me = {
|
|
|
472
472
|
),
|
|
473
473
|
"aria-disabled": e.disabled ? "true" : void 0
|
|
474
474
|
},
|
|
475
|
-
/* @__PURE__ */ n.createElement(
|
|
475
|
+
/* @__PURE__ */ n.createElement(M, null),
|
|
476
476
|
/* @__PURE__ */ n.createElement(
|
|
477
477
|
"input",
|
|
478
478
|
{
|
|
479
479
|
role: "spinbutton",
|
|
480
|
-
value:
|
|
481
|
-
tabIndex:
|
|
480
|
+
value: P === null ? "" : P,
|
|
481
|
+
tabIndex: oe(e.tabIndex, e.disabled),
|
|
482
482
|
accessKey: e.accessKey,
|
|
483
483
|
disabled: e.disabled,
|
|
484
484
|
title: e.title,
|
|
@@ -498,25 +498,25 @@ const me = {
|
|
|
498
498
|
name: e.name,
|
|
499
499
|
readOnly: e.readOnly,
|
|
500
500
|
style: e.inputStyle,
|
|
501
|
-
onChange:
|
|
502
|
-
onFocus:
|
|
503
|
-
onBlur:
|
|
504
|
-
onKeyDown:
|
|
505
|
-
onPaste:
|
|
506
|
-
onWheel:
|
|
501
|
+
onChange: $,
|
|
502
|
+
onFocus: y,
|
|
503
|
+
onBlur: E,
|
|
504
|
+
onKeyDown: U,
|
|
505
|
+
onPaste: Q,
|
|
506
|
+
onWheel: u,
|
|
507
507
|
ref: o
|
|
508
508
|
}
|
|
509
509
|
),
|
|
510
|
-
/* @__PURE__ */ n.createElement(
|
|
510
|
+
/* @__PURE__ */ n.createElement(V, null),
|
|
511
511
|
e.children,
|
|
512
512
|
e.spinners && /* @__PURE__ */ n.createElement(
|
|
513
513
|
"span",
|
|
514
514
|
{
|
|
515
515
|
className: "k-input-spinner k-spin-button",
|
|
516
|
-
onMouseDown:
|
|
516
|
+
onMouseDown: D
|
|
517
517
|
},
|
|
518
518
|
/* @__PURE__ */ n.createElement(
|
|
519
|
-
|
|
519
|
+
be,
|
|
520
520
|
{
|
|
521
521
|
tabIndex: -1,
|
|
522
522
|
type: "button",
|
|
@@ -524,13 +524,13 @@ const me = {
|
|
|
524
524
|
svgIcon: _t,
|
|
525
525
|
rounded: null,
|
|
526
526
|
className: "k-spinner-increase",
|
|
527
|
-
"aria-label": c.toLanguageString(Xe,
|
|
528
|
-
title: c.toLanguageString(Xe,
|
|
529
|
-
onClick:
|
|
527
|
+
"aria-label": c.toLanguageString(Xe, H[Xe]),
|
|
528
|
+
title: c.toLanguageString(Xe, H[Xe]),
|
|
529
|
+
onClick: g
|
|
530
530
|
}
|
|
531
531
|
),
|
|
532
532
|
/* @__PURE__ */ n.createElement(
|
|
533
|
-
|
|
533
|
+
be,
|
|
534
534
|
{
|
|
535
535
|
tabIndex: -1,
|
|
536
536
|
type: "button",
|
|
@@ -538,9 +538,9 @@ const me = {
|
|
|
538
538
|
svgIcon: ht,
|
|
539
539
|
rounded: null,
|
|
540
540
|
className: "k-spinner-decrease",
|
|
541
|
-
"aria-label": c.toLanguageString(Ye,
|
|
542
|
-
title: c.toLanguageString(Ye,
|
|
543
|
-
onClick:
|
|
541
|
+
"aria-label": c.toLanguageString(Ye, H[Ye]),
|
|
542
|
+
title: c.toLanguageString(Ye, H[Ye]),
|
|
543
|
+
onClick: k
|
|
544
544
|
}
|
|
545
545
|
)
|
|
546
546
|
)
|
|
@@ -550,17 +550,17 @@ const me = {
|
|
|
550
550
|
{
|
|
551
551
|
label: e.label,
|
|
552
552
|
editorId: i,
|
|
553
|
-
editorValue:
|
|
554
|
-
editorValid:
|
|
553
|
+
editorValue: P === null ? "" : P,
|
|
554
|
+
editorValid: ee,
|
|
555
555
|
editorDisabled: e.disabled,
|
|
556
556
|
editorPlaceholder: e.placeholder,
|
|
557
|
-
children:
|
|
557
|
+
children: Y,
|
|
558
558
|
style: { width: e.width },
|
|
559
559
|
dir: e.dir
|
|
560
560
|
}
|
|
561
|
-
) :
|
|
561
|
+
) : Y;
|
|
562
562
|
});
|
|
563
|
-
|
|
563
|
+
Ae.propTypes = {
|
|
564
564
|
value: r.number,
|
|
565
565
|
defaultValue: r.number,
|
|
566
566
|
step: r.number,
|
|
@@ -606,8 +606,8 @@ ze.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
|
+
Ae.displayName = "KendoNumericTextBox";
|
|
610
|
+
Ae.defaultProps = {
|
|
611
611
|
prefix: (a) => null,
|
|
612
612
|
suffix: (a) => null,
|
|
613
613
|
step: 1,
|
|
@@ -626,32 +626,32 @@ ze.defaultProps = {
|
|
|
626
626
|
rounded: "medium",
|
|
627
627
|
fillMode: "solid"
|
|
628
628
|
};
|
|
629
|
-
const
|
|
629
|
+
const ne = (a) => a != null, le = (a, t, e) => !ne(a) || isNaN(a) || a <= t ? t : a >= e ? e : a, Pe = (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 (!ne(a))
|
|
633
633
|
return;
|
|
634
634
|
const i = mt(a.trim(), e);
|
|
635
|
-
if (
|
|
635
|
+
if (ne(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 ne(e) ? e.toHSV() : {};
|
|
640
|
+
}, qe = (a, t = !0) => {
|
|
641
641
|
const e = mt(a, t);
|
|
642
|
-
return
|
|
642
|
+
return ne(e) ? e.toBytes() : {};
|
|
643
643
|
}, pa = (a) => {
|
|
644
|
-
const t =
|
|
644
|
+
const t = le(a.h, 0, 359.9), e = le(a.s, 0, 1), s = le(a.v, 0, 1), i = le(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 = le(a.r, 0, 255), e = le(a.g, 0, 255), s = le(a.b, 0, 255), i = le(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 = le(a.r, 0, 255), s = le(a.g, 0, 255), i = le(a.b, 0, 255), l = le(a.a, 0, 1), c = le(t.r, 0, 255), o = le(t.g, 0, 255), h = le(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),
|
|
654
|
-
b: Math.round((1 - l) *
|
|
654
|
+
b: Math.round((1 - l) * h + l * i)
|
|
655
655
|
};
|
|
656
656
|
}, _a = (a) => {
|
|
657
657
|
let t = [a.r || 0, a.g || 0, a.b || 0].map(function(e) {
|
|
@@ -691,7 +691,7 @@ const ae = (a) => a != null, se = (a, t, e) => !ae(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
|
-
},
|
|
694
|
+
}, me(ge), this.state = {
|
|
695
695
|
value: this.props.defaultValue || la.defaultProps.defaultValue
|
|
696
696
|
};
|
|
697
697
|
}
|
|
@@ -768,31 +768,31 @@ const ae = (a) => a != null, se = (a, t, e) => !ae(a) || isNaN(a) || a <= t ? t
|
|
|
768
768
|
valid: c,
|
|
769
769
|
// Removed to support direct use in Form Field component
|
|
770
770
|
visited: o,
|
|
771
|
-
touched:
|
|
771
|
+
touched: h,
|
|
772
772
|
modified: d,
|
|
773
|
-
ariaLabelledBy:
|
|
774
|
-
ariaDescribedBy:
|
|
773
|
+
ariaLabelledBy: p,
|
|
774
|
+
ariaDescribedBy: m,
|
|
775
775
|
validityStyles: f,
|
|
776
|
-
style:
|
|
776
|
+
style: v,
|
|
777
777
|
ariaLabel: N,
|
|
778
|
-
...
|
|
779
|
-
} = this.props,
|
|
778
|
+
...P
|
|
779
|
+
} = this.props, M = s || this._inputId, V = !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
|
-
"aria-labelledby":
|
|
783
|
-
"aria-describedby":
|
|
782
|
+
"aria-labelledby": p,
|
|
783
|
+
"aria-describedby": m,
|
|
784
784
|
"aria-disabled": this.props.disabled || void 0,
|
|
785
|
-
"aria-invalid": !
|
|
785
|
+
"aria-invalid": !V || void 0,
|
|
786
786
|
"aria-label": N || void 0,
|
|
787
|
-
...
|
|
788
|
-
style: t ? void 0 :
|
|
787
|
+
...P,
|
|
788
|
+
style: t ? void 0 : v,
|
|
789
789
|
value: this.value,
|
|
790
|
-
id:
|
|
790
|
+
id: M,
|
|
791
791
|
className: S,
|
|
792
792
|
onChange: this.handleChange,
|
|
793
793
|
onAnimationStart: this.handleAutoFill,
|
|
794
|
-
ref: (
|
|
795
|
-
this._input =
|
|
794
|
+
ref: (O) => {
|
|
795
|
+
this._input = O;
|
|
796
796
|
}
|
|
797
797
|
}
|
|
798
798
|
);
|
|
@@ -801,16 +801,16 @@ const ae = (a) => a != null, se = (a, t, e) => !ae(a) || isNaN(a) || a <= t ? t
|
|
|
801
801
|
{
|
|
802
802
|
label: t,
|
|
803
803
|
labelClassName: e,
|
|
804
|
-
editorId:
|
|
804
|
+
editorId: M,
|
|
805
805
|
editorValue: String(this.value),
|
|
806
|
-
editorValid:
|
|
807
|
-
editorDisabled:
|
|
808
|
-
editorPlaceholder:
|
|
809
|
-
children:
|
|
810
|
-
style:
|
|
811
|
-
dir:
|
|
806
|
+
editorValid: V,
|
|
807
|
+
editorDisabled: P.disabled,
|
|
808
|
+
editorPlaceholder: P.placeholder,
|
|
809
|
+
children: I,
|
|
810
|
+
style: v,
|
|
811
|
+
dir: P.dir
|
|
812
812
|
}
|
|
813
|
-
) :
|
|
813
|
+
) : I;
|
|
814
814
|
}
|
|
815
815
|
};
|
|
816
816
|
let gt = la;
|
|
@@ -831,15 +831,15 @@ gt.defaultProps = {
|
|
|
831
831
|
required: !1,
|
|
832
832
|
validityStyles: !0
|
|
833
833
|
};
|
|
834
|
-
const is =
|
|
834
|
+
const is = pe(), vn = et(Ue(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 = Pe(s, "rgba");
|
|
840
|
+
this.setState({ hex: s }), ne(i) && this.props.onHexChange(s, i, e);
|
|
841
841
|
}, this.onBlur = () => {
|
|
842
|
-
|
|
842
|
+
ne(Pe(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 Fe = ["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 || Fe[1] };
|
|
872
872
|
}
|
|
873
873
|
render() {
|
|
874
|
-
const t = Je(this), e = t.toLanguageString(
|
|
874
|
+
const t = Je(this), e = t.toLanguageString(ze, H[ln]), s = t.toLanguageString(ze, H[ze]), i = t.toLanguageString(ze, H[nn]), l = t.toLanguageString(ze, H[sn]), c = t.toLanguageString(ze, 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
|
+
be,
|
|
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
|
+
Ae,
|
|
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
|
+
Ae,
|
|
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
|
+
Ae,
|
|
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
|
+
Ae,
|
|
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 = Fe.length - 1 === Fe.indexOf(this.state.inputMode) ? 0 : Fe.indexOf(this.state.inputMode) + 1;
|
|
953
953
|
if (this.props.opacity)
|
|
954
|
-
this.setState({ inputMode:
|
|
954
|
+
this.setState({ inputMode: Fe[t] });
|
|
955
955
|
else {
|
|
956
|
-
const e =
|
|
957
|
-
this.setState({ inputMode:
|
|
956
|
+
const e = Fe[t] === "rgba" ? t + 1 : t;
|
|
957
|
+
this.setState({ inputMode: Fe[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 = He(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
|
+
be,
|
|
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
|
+
be,
|
|
1010
1010
|
{
|
|
1011
1011
|
className: "k-button-increase",
|
|
1012
1012
|
rounded: "full",
|
|
@@ -1032,7 +1032,7 @@ class bt extends n.Component {
|
|
|
1032
1032
|
this.setState({ focused: !1 });
|
|
1033
1033
|
}, this.onKeyDown = (e) => {
|
|
1034
1034
|
let s;
|
|
1035
|
-
e.keyCode ===
|
|
1035
|
+
e.keyCode === _.left || e.keyCode === _.down ? s = this.state.value - (this.props.step || 0) : e.keyCode === _.right || e.keyCode === _.up ? s = this.state.value + (this.props.step || 0) : e.keyCode === _.home ? s = this.props.min : e.keyCode === _.end && (s = this.props.max), s !== void 0 && (e.preventDefault(), this.change(e, s));
|
|
1036
1036
|
}, this.decrement = (e) => {
|
|
1037
1037
|
e.preventDefault(), this.change(e, this.state.value - (this.props.step || 0));
|
|
1038
1038
|
}, this.increment = (e) => {
|
|
@@ -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
|
-
},
|
|
1047
|
+
}, me(ge);
|
|
1048
1048
|
}
|
|
1049
1049
|
/**
|
|
1050
1050
|
* @hidden
|
|
@@ -1094,8 +1094,8 @@ class bt extends n.Component {
|
|
|
1094
1094
|
enabled: this.props.buttons,
|
|
1095
1095
|
decrement: this.decrement,
|
|
1096
1096
|
increment: this.increment,
|
|
1097
|
-
incrementTitle: t.toLanguageString($t,
|
|
1098
|
-
decrementTitle: t.toLanguageString(Ht,
|
|
1097
|
+
incrementTitle: t.toLanguageString($t, H[$t]),
|
|
1098
|
+
decrementTitle: t.toLanguageString(Ht, H[Ht])
|
|
1099
1099
|
},
|
|
1100
1100
|
/* @__PURE__ */ n.createElement(en, { onDrag: this.dragOver, onPress: this.dragStart }, /* @__PURE__ */ n.createElement(
|
|
1101
1101
|
"div",
|
|
@@ -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: oe(this.props.tabIndex, this.props.disabled, void 0),
|
|
1154
1154
|
className: "k-draghandle",
|
|
1155
|
-
title: t.toLanguageString(
|
|
1155
|
+
title: t.toLanguageString(_e, H[_e]),
|
|
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
|
)
|
|
@@ -1168,7 +1168,7 @@ class bt extends n.Component {
|
|
|
1168
1168
|
return this._sliderTrack;
|
|
1169
1169
|
}
|
|
1170
1170
|
change(t, e) {
|
|
1171
|
-
e = Math.min(Math.max(e, this.props.min), this.props.max), this.setState({ value: e }),
|
|
1171
|
+
e = Math.min(Math.max(e, this.props.min), this.props.max), this.setState({ value: e }), J(this.props.onChange, t, this, { value: e });
|
|
1172
1172
|
}
|
|
1173
1173
|
}
|
|
1174
1174
|
bt.displayName = "Slider";
|
|
@@ -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 = pe(), oa = Ue(os, bt);
|
|
1187
1187
|
oa.displayName = "KendoReactSlider";
|
|
1188
1188
|
fa(bt);
|
|
1189
|
-
const
|
|
1189
|
+
const Ge = {};
|
|
1190
1190
|
function cs(a, t, e) {
|
|
1191
|
-
|
|
1191
|
+
Ge[a] = { value: t, hsva: e };
|
|
1192
1192
|
}
|
|
1193
1193
|
function ds(a, t, e) {
|
|
1194
|
-
|
|
1194
|
+
Ge[a] = { value: t, rgba: e };
|
|
1195
1195
|
}
|
|
1196
1196
|
function us(a, t, e) {
|
|
1197
|
-
|
|
1197
|
+
Ge[a] = { value: t, hex: e };
|
|
1198
1198
|
}
|
|
1199
1199
|
function fs(a) {
|
|
1200
|
-
delete
|
|
1200
|
+
delete Ge[a];
|
|
1201
1201
|
}
|
|
1202
1202
|
function hs(a, t) {
|
|
1203
1203
|
if (a) {
|
|
1204
|
-
const e =
|
|
1204
|
+
const e = Ge[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 = Ge[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 = Ge[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,
|
|
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" },
|
|
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(he, { name: "check", icon: Mt })), N = /* @__PURE__ */ n.createElement("span", { className: "k-contrast-validation k-text-error" }, c, " ", /* @__PURE__ */ n.createElement(he, { 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(he, { name: "check", icon: Mt }), o >= 7 && /* @__PURE__ */ n.createElement(he, { name: "check", icon: Mt })) : /* @__PURE__ */ n.createElement("span", { className: "k-contrast-validation k-text-error" }, /* @__PURE__ */ n.createElement(he, { 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);
|
|
@@ -1243,24 +1243,24 @@ const it = (a, t) => a.length === 0 ? "" : `<path d="${a.reduce(
|
|
|
1243
1243
|
angle: Math.atan2(s, e)
|
|
1244
1244
|
};
|
|
1245
1245
|
}, bs = (a) => (t, e, s, i) => {
|
|
1246
|
-
const l = e || t, c = s || t, o = 0.1,
|
|
1247
|
-
return [
|
|
1246
|
+
const l = e || t, c = s || t, o = 0.1, h = a(l, c), d = h.angle + (i ? Math.PI : 0), p = h.length * o, m = t[0] + Math.cos(d) * p, f = t[1] + Math.sin(d) * p;
|
|
1247
|
+
return [m, f];
|
|
1248
1248
|
}, vs = (a) => (t, e, s) => {
|
|
1249
1249
|
const [i, l] = a(s[e - 1], s[e - 2], t), [c, o] = a(t, s[e - 1], s[e + 1], !0);
|
|
1250
1250
|
return `C ${i},${l} ${c},${o} ${t[0]},${t[1]}`;
|
|
1251
1251
|
}, Aa = 4.5, $a = 7, lt = 16;
|
|
1252
1252
|
class ks extends n.Component {
|
|
1253
1253
|
renderSvgCurveLine() {
|
|
1254
|
-
const t = this.props.metrics, e = (l, c, o,
|
|
1255
|
-
const
|
|
1256
|
-
return o + 0.5 >
|
|
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(qe(pa(m)), qe(this.props.backgroundColor || ""));
|
|
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
|
-
const
|
|
1258
|
+
const h = [];
|
|
1259
1259
|
for (let d = 0; d <= t.width; d += t.width / c) {
|
|
1260
|
-
const
|
|
1261
|
-
|
|
1260
|
+
const p = e(l, d, 0, t.height, o ? (m, f) => m < f : (m, f) => m > f);
|
|
1261
|
+
p !== null && h.push([d, p]);
|
|
1262
1262
|
}
|
|
1263
|
-
return
|
|
1263
|
+
return h;
|
|
1264
1264
|
}, i = vs(bs(gs));
|
|
1265
1265
|
return it(s(Aa, lt), i) + it(s(Aa, lt, !0), i) + it(s($a, lt), i) + it(s($a, lt, !0), i);
|
|
1266
1266
|
}
|
|
@@ -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: qe(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 = Pe(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,12 +1322,12 @@ 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 = le(i, 0, s.width), o = le(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 }
|
|
1329
1329
|
);
|
|
1330
|
-
this.handleHsvaChange(
|
|
1330
|
+
this.handleHsvaChange(h, e, e.nativeEvent);
|
|
1331
1331
|
}, this.onFocus = (e) => {
|
|
1332
1332
|
this.props.onFocus && this.props.onFocus.call(
|
|
1333
1333
|
void 0,
|
|
@@ -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
|
-
},
|
|
1339
|
-
const t = a.value || a.defaultValue ||
|
|
1338
|
+
}, me(ge);
|
|
1339
|
+
const t = a.value || a.defaultValue || Pe(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: oe(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 = Pe(s, "hex");
|
|
1397
|
+
this.setState({ hsva: a, backgroundColor: rt(a.h), rgba: qe(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
|
+
ne(Pe(a, "hex")) || (a = Ha);
|
|
1416
|
+
const e = ps(t, a) || Ot(a), s = ms(t, a) || qe(a), i = hs(t, a) || Pe(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: oe(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,
|
|
@@ -1489,18 +1489,18 @@ const ys = "rgba", Ha = "rgba(255, 255, 255, 1)", ca = class extends n.Component
|
|
|
1489
1489
|
onChange: this.onHueSliderChange,
|
|
1490
1490
|
className: "k-hue-slider k-colorgradient-slider",
|
|
1491
1491
|
disabled: this.props.disabled,
|
|
1492
|
-
ariaLabel: a.toLanguageString(Wt,
|
|
1492
|
+
ariaLabel: a.toLanguageString(Wt, H[Wt])
|
|
1493
1493
|
}
|
|
1494
1494
|
), this.props.opacity && /* @__PURE__ */ n.createElement(
|
|
1495
1495
|
oa,
|
|
1496
1496
|
{
|
|
1497
|
-
value:
|
|
1497
|
+
value: ne(this.state.hsva.a) ? this.state.hsva.a * 100 : 100,
|
|
1498
1498
|
buttons: !1,
|
|
1499
1499
|
vertical: !0,
|
|
1500
1500
|
min: 0,
|
|
1501
1501
|
max: 100,
|
|
1502
1502
|
step: 1,
|
|
1503
|
-
ariaLabel: a.toLanguageString(Xt,
|
|
1503
|
+
ariaLabel: a.toLanguageString(Xt, H[Xt]),
|
|
1504
1504
|
onChange: this.onAlphaSliderChange,
|
|
1505
1505
|
className: "k-alpha-slider k-colorgradient-slider",
|
|
1506
1506
|
disabled: this.props.disabled,
|
|
@@ -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: qe(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 = pe(), ga = et(Ue(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 = [], !!(ne(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 (!ne(t))
|
|
1573
1573
|
return;
|
|
1574
1574
|
const e = t && mt(t, !0), s = [t];
|
|
1575
|
-
|
|
1575
|
+
ne(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 (ne(t) && ne(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 (!(ne(t) && ne(t.row) && ne(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 };
|
|
@@ -1648,19 +1648,19 @@ class kt extends n.Component {
|
|
|
1648
1648
|
this.wrapper && this.wrapper.focus();
|
|
1649
1649
|
}, this.onKeyDown = (e) => {
|
|
1650
1650
|
switch (e.keyCode) {
|
|
1651
|
-
case
|
|
1651
|
+
case _.down:
|
|
1652
1652
|
this.handleCellNavigation(0, 1);
|
|
1653
1653
|
break;
|
|
1654
|
-
case
|
|
1654
|
+
case _.up:
|
|
1655
1655
|
this.handleCellNavigation(0, -1);
|
|
1656
1656
|
break;
|
|
1657
|
-
case
|
|
1657
|
+
case _.right:
|
|
1658
1658
|
this.handleCellNavigation(1, 0);
|
|
1659
1659
|
break;
|
|
1660
|
-
case
|
|
1660
|
+
case _.left:
|
|
1661
1661
|
this.handleCellNavigation(-1, 0);
|
|
1662
1662
|
break;
|
|
1663
|
-
case
|
|
1663
|
+
case _.enter:
|
|
1664
1664
|
this.handleEnter(e);
|
|
1665
1665
|
break;
|
|
1666
1666
|
default:
|
|
@@ -1676,7 +1676,7 @@ class kt extends n.Component {
|
|
|
1676
1676
|
));
|
|
1677
1677
|
}, this.onBlur = () => {
|
|
1678
1678
|
this.setState({ focusedColor: void 0 });
|
|
1679
|
-
},
|
|
1679
|
+
}, me(ge), 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: oe(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
|
-
|
|
1741
|
+
J(this.props.onChange, e, this, { value: t, rgbaValue: Pe(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 ne(t) ? {
|
|
1753
1753
|
colors: t.colors,
|
|
1754
1754
|
columns: this.props.columns || t.columns || Ga
|
|
1755
1755
|
} : { colors: [], columns: 0 };
|
|
@@ -1760,26 +1760,26 @@ class kt extends n.Component {
|
|
|
1760
1760
|
return t.map((i, l) => /* @__PURE__ */ n.createElement("tr", { role: "row", key: l }, this.renderColumns(i, l, e, s)));
|
|
1761
1761
|
}
|
|
1762
1762
|
renderColumns(t, e, s, i) {
|
|
1763
|
-
const l = s !== void 0 && s.row === e, c = s && s.col, o = i !== void 0 && i.row === e,
|
|
1764
|
-
return t.map((f,
|
|
1765
|
-
const N = l && c ===
|
|
1763
|
+
const l = s !== void 0 && s.row === e, c = s && s.col, o = i !== void 0 && i.row === e, h = i && i.col, d = typeof this.props.tileSize != "number" ? this.props.tileSize : { width: this.props.tileSize, height: this.props.tileSize }, p = d.width + "px", m = d.height + "px";
|
|
1764
|
+
return t.map((f, v) => {
|
|
1765
|
+
const N = l && c === v, P = G(
|
|
1766
1766
|
"k-colorpalette-tile",
|
|
1767
1767
|
{
|
|
1768
1768
|
"k-selected": N,
|
|
1769
|
-
"k-focus": o &&
|
|
1769
|
+
"k-focus": o && h === v
|
|
1770
1770
|
}
|
|
1771
1771
|
);
|
|
1772
1772
|
return /* @__PURE__ */ n.createElement(
|
|
1773
1773
|
"td",
|
|
1774
1774
|
{
|
|
1775
1775
|
role: "gridcell",
|
|
1776
|
-
className:
|
|
1776
|
+
className: P,
|
|
1777
1777
|
"aria-label": f,
|
|
1778
1778
|
"aria-selected": N ? !0 : this.props.disabled ? void 0 : !1,
|
|
1779
|
-
style: { backgroundColor: f, width:
|
|
1780
|
-
onClick: (
|
|
1781
|
-
id: this.createCellId({ row: e, col:
|
|
1782
|
-
key:
|
|
1779
|
+
style: { backgroundColor: f, width: p, height: m, minWidth: p },
|
|
1780
|
+
onClick: (M) => this.onColorClick(f, M),
|
|
1781
|
+
id: this.createCellId({ row: e, col: v }),
|
|
1782
|
+
key: v
|
|
1783
1783
|
}
|
|
1784
1784
|
);
|
|
1785
1785
|
});
|
|
@@ -1808,7 +1808,7 @@ kt.defaultProps = {
|
|
|
1808
1808
|
palette: xn,
|
|
1809
1809
|
tileSize: Cn
|
|
1810
1810
|
};
|
|
1811
|
-
const Ss =
|
|
1811
|
+
const Ss = pe(), ba = et(Ue(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,113 +1843,113 @@ const Ls = {
|
|
|
1843
1843
|
}, Rs = {
|
|
1844
1844
|
palette: xn,
|
|
1845
1845
|
tileSize: Cn
|
|
1846
|
-
}, Ft = (a) => a !== void 0, Vs =
|
|
1847
|
-
|
|
1848
|
-
const e = Re(Vs, a), s =
|
|
1846
|
+
}, Ft = (a) => a !== void 0, Vs = pe(), va = n.forwardRef((a, t) => {
|
|
1847
|
+
me(ge);
|
|
1848
|
+
const e = Re(Vs, a), s = $e(), {
|
|
1849
1849
|
size: i = dt.size,
|
|
1850
1850
|
rounded: l = dt.rounded,
|
|
1851
1851
|
fillMode: c = dt.fillMode,
|
|
1852
1852
|
popupSettings: o,
|
|
1853
|
-
gradientSettings:
|
|
1853
|
+
gradientSettings: h,
|
|
1854
1854
|
paletteSettings: d,
|
|
1855
|
-
valid:
|
|
1856
|
-
disabled:
|
|
1855
|
+
valid: p,
|
|
1856
|
+
disabled: m,
|
|
1857
1857
|
tabIndex: f,
|
|
1858
|
-
view:
|
|
1858
|
+
view: v,
|
|
1859
1859
|
icon: N,
|
|
1860
|
-
svgIcon:
|
|
1861
|
-
iconClassName:
|
|
1862
|
-
onChange:
|
|
1860
|
+
svgIcon: P,
|
|
1861
|
+
iconClassName: M,
|
|
1862
|
+
onChange: V,
|
|
1863
1863
|
onFocus: S,
|
|
1864
|
-
onBlur:
|
|
1865
|
-
onActiveColorClick:
|
|
1866
|
-
className:
|
|
1867
|
-
} = e,
|
|
1864
|
+
onBlur: I,
|
|
1865
|
+
onActiveColorClick: O,
|
|
1866
|
+
className: B
|
|
1867
|
+
} = e, w = n.useRef(null), F = n.useRef(null), A = n.useRef(null), T = n.useRef(), x = n.useRef(null), [L, $] = n.useState(!1), [U, Q] = n.useState(e.defaultValue), [g, k] = n.useState(!1), u = Ft(e.value), y = Ft(e.open), E = u ? e.value : U, D = y ? e.open : g, ee = n.useCallback(
|
|
1868
1868
|
() => {
|
|
1869
|
-
|
|
1869
|
+
w.current && w.current.focus();
|
|
1870
1870
|
},
|
|
1871
1871
|
[]
|
|
1872
1872
|
);
|
|
1873
1873
|
n.useImperativeHandle(t, () => ({
|
|
1874
1874
|
// we agreed that each element will have focus method exposed
|
|
1875
|
-
element:
|
|
1876
|
-
actionElement:
|
|
1877
|
-
value:
|
|
1878
|
-
focus:
|
|
1879
|
-
}), [
|
|
1880
|
-
const
|
|
1881
|
-
(
|
|
1882
|
-
|
|
1875
|
+
element: w.current,
|
|
1876
|
+
actionElement: x.current,
|
|
1877
|
+
value: E,
|
|
1878
|
+
focus: ee
|
|
1879
|
+
}), [E, ee]);
|
|
1880
|
+
const Y = n.useCallback(
|
|
1881
|
+
(z, ae) => {
|
|
1882
|
+
y || (!z && !ae && w && w.current && w.current.focus(), k(z));
|
|
1883
1883
|
},
|
|
1884
|
-
[
|
|
1884
|
+
[y]
|
|
1885
1885
|
), R = n.useCallback(
|
|
1886
|
-
(
|
|
1887
|
-
const { altKey:
|
|
1888
|
-
if (
|
|
1889
|
-
|
|
1886
|
+
(z) => {
|
|
1887
|
+
const { altKey: ae, keyCode: ie } = z;
|
|
1888
|
+
if (ie === _.esc) {
|
|
1889
|
+
Y(!1);
|
|
1890
1890
|
return;
|
|
1891
1891
|
}
|
|
1892
|
-
if (
|
|
1893
|
-
|
|
1892
|
+
if (ie === _.enter && !y) {
|
|
1893
|
+
z.preventDefault(), z.stopPropagation(), Y(!D);
|
|
1894
1894
|
return;
|
|
1895
1895
|
}
|
|
1896
|
-
|
|
1896
|
+
ae && (ie === _.up || ie === _.down) && (z.preventDefault(), z.stopPropagation(), ie === _.up && w && w.current && (w.current.focus(), Y(!1)), ie === _.down && Y(!0));
|
|
1897
1897
|
},
|
|
1898
|
-
[
|
|
1898
|
+
[D, y]
|
|
1899
1899
|
), b = n.useCallback(
|
|
1900
1900
|
() => {
|
|
1901
|
-
|
|
1901
|
+
y || (F.current ? F.current.focus() : A.current && A.current.focus());
|
|
1902
1902
|
},
|
|
1903
|
-
[
|
|
1904
|
-
),
|
|
1903
|
+
[y]
|
|
1904
|
+
), K = n.useCallback(
|
|
1905
1905
|
() => {
|
|
1906
|
-
|
|
1906
|
+
Y(!D, !0);
|
|
1907
1907
|
},
|
|
1908
|
-
[
|
|
1909
|
-
),
|
|
1910
|
-
(
|
|
1911
|
-
|
|
1912
|
-
syntheticEvent:
|
|
1913
|
-
nativeEvent:
|
|
1914
|
-
value:
|
|
1908
|
+
[D]
|
|
1909
|
+
), q = n.useCallback(
|
|
1910
|
+
(z) => {
|
|
1911
|
+
O && O.call(void 0, {
|
|
1912
|
+
syntheticEvent: z,
|
|
1913
|
+
nativeEvent: z.nativeEvent,
|
|
1914
|
+
value: E
|
|
1915
1915
|
});
|
|
1916
1916
|
},
|
|
1917
|
-
[
|
|
1918
|
-
),
|
|
1919
|
-
(
|
|
1920
|
-
T.current ? (clearTimeout(T.current), T.current = void 0) :
|
|
1921
|
-
nativeEvent:
|
|
1922
|
-
syntheticEvent:
|
|
1917
|
+
[O, E]
|
|
1918
|
+
), Z = n.useCallback(
|
|
1919
|
+
(z) => {
|
|
1920
|
+
T.current ? (clearTimeout(T.current), T.current = void 0) : $(!0), S && S.call(void 0, {
|
|
1921
|
+
nativeEvent: z.nativeEvent,
|
|
1922
|
+
syntheticEvent: z
|
|
1923
1923
|
});
|
|
1924
1924
|
},
|
|
1925
1925
|
[S]
|
|
1926
|
-
),
|
|
1926
|
+
), ce = n.useCallback(
|
|
1927
1927
|
() => {
|
|
1928
|
-
|
|
1928
|
+
Y(!1, !0), $(!1), T.current = void 0;
|
|
1929
1929
|
},
|
|
1930
1930
|
[]
|
|
1931
|
-
),
|
|
1932
|
-
(
|
|
1933
|
-
clearTimeout(T.current), T.current = window.setTimeout(
|
|
1934
|
-
nativeEvent:
|
|
1935
|
-
syntheticEvent:
|
|
1931
|
+
), xe = n.useCallback(
|
|
1932
|
+
(z) => {
|
|
1933
|
+
clearTimeout(T.current), T.current = window.setTimeout(ce), I && I.call(void 0, {
|
|
1934
|
+
nativeEvent: z.nativeEvent,
|
|
1935
|
+
syntheticEvent: z
|
|
1936
1936
|
});
|
|
1937
1937
|
},
|
|
1938
|
-
[
|
|
1939
|
-
),
|
|
1940
|
-
(
|
|
1941
|
-
const
|
|
1942
|
-
|
|
1943
|
-
value:
|
|
1944
|
-
nativeEvent:
|
|
1945
|
-
syntheticEvent:
|
|
1938
|
+
[I]
|
|
1939
|
+
), re = n.useCallback(
|
|
1940
|
+
(z, ae) => {
|
|
1941
|
+
const ie = ae ? z.rgbaValue : z.value;
|
|
1942
|
+
u || Q(ie), ae && Y(!1), V && V.call(void 0, {
|
|
1943
|
+
value: ie,
|
|
1944
|
+
nativeEvent: z.nativeEvent,
|
|
1945
|
+
syntheticEvent: z.syntheticEvent
|
|
1946
1946
|
});
|
|
1947
1947
|
},
|
|
1948
|
-
[
|
|
1949
|
-
),
|
|
1950
|
-
(
|
|
1951
|
-
[Ft,
|
|
1952
|
-
),
|
|
1948
|
+
[u, V]
|
|
1949
|
+
), Ee = n.useCallback(
|
|
1950
|
+
(z) => re(z, !0),
|
|
1951
|
+
[Ft, re]
|
|
1952
|
+
), Ce = He(w, e.dir), Ve = p !== !1;
|
|
1953
1953
|
return /* @__PURE__ */ n.createElement(
|
|
1954
1954
|
"span",
|
|
1955
1955
|
{
|
|
@@ -1959,83 +1959,83 @@ const Ls = {
|
|
|
1959
1959
|
"aria-labelledby": e.ariaLabelledBy,
|
|
1960
1960
|
"aria-describedby": e.ariaDescribedBy,
|
|
1961
1961
|
"aria-haspopup": "dialog",
|
|
1962
|
-
"aria-expanded":
|
|
1963
|
-
"aria-disabled":
|
|
1962
|
+
"aria-expanded": D,
|
|
1963
|
+
"aria-disabled": m ? "true" : void 0,
|
|
1964
1964
|
className: G(
|
|
1965
1965
|
"k-colorpicker",
|
|
1966
1966
|
"k-picker",
|
|
1967
1967
|
"k-icon-picker",
|
|
1968
1968
|
{
|
|
1969
|
-
[`k-picker-${
|
|
1969
|
+
[`k-picker-${se.sizeMap[i] || i}`]: i,
|
|
1970
1970
|
[`k-picker-${c}`]: c,
|
|
1971
|
-
[`k-rounded-${
|
|
1972
|
-
"k-invalid": !
|
|
1973
|
-
"k-disabled":
|
|
1974
|
-
"k-focus":
|
|
1975
|
-
className:
|
|
1971
|
+
[`k-rounded-${se.roundedMap[l] || l}`]: l,
|
|
1972
|
+
"k-invalid": !Ve,
|
|
1973
|
+
"k-disabled": m,
|
|
1974
|
+
"k-focus": L,
|
|
1975
|
+
className: B
|
|
1976
1976
|
}
|
|
1977
1977
|
),
|
|
1978
|
-
ref:
|
|
1979
|
-
tabIndex:
|
|
1978
|
+
ref: w,
|
|
1979
|
+
tabIndex: oe(f, m),
|
|
1980
1980
|
title: e.title,
|
|
1981
1981
|
onKeyDown: R,
|
|
1982
|
-
onFocus:
|
|
1983
|
-
onBlur:
|
|
1984
|
-
dir:
|
|
1982
|
+
onFocus: Z,
|
|
1983
|
+
onBlur: xe,
|
|
1984
|
+
dir: Ce
|
|
1985
1985
|
},
|
|
1986
1986
|
/* @__PURE__ */ n.createElement(
|
|
1987
1987
|
En,
|
|
1988
1988
|
{
|
|
1989
|
-
dir:
|
|
1990
|
-
open:
|
|
1989
|
+
dir: Ce,
|
|
1990
|
+
open: D,
|
|
1991
1991
|
onOpen: b,
|
|
1992
|
-
popupAnchor:
|
|
1992
|
+
popupAnchor: w.current || void 0,
|
|
1993
1993
|
popupSettings: { ...o },
|
|
1994
|
-
input: /* @__PURE__ */ n.createElement("span", { onClick:
|
|
1994
|
+
input: /* @__PURE__ */ n.createElement("span", { onClick: q, className: "k-input-inner" }, /* @__PURE__ */ n.createElement(
|
|
1995
1995
|
"span",
|
|
1996
1996
|
{
|
|
1997
1997
|
className: G(
|
|
1998
1998
|
"k-value-icon",
|
|
1999
1999
|
"k-color-preview",
|
|
2000
2000
|
{
|
|
2001
|
-
"k-no-color": !
|
|
2002
|
-
"k-icon-color-preview": N ||
|
|
2001
|
+
"k-no-color": !E,
|
|
2002
|
+
"k-icon-color-preview": N || P || M
|
|
2003
2003
|
}
|
|
2004
2004
|
)
|
|
2005
2005
|
},
|
|
2006
|
-
|
|
2007
|
-
!
|
|
2008
|
-
/* @__PURE__ */ n.createElement("span", { className: "k-color-preview-mask", style: { backgroundColor:
|
|
2006
|
+
M && /* @__PURE__ */ n.createElement("span", { className: G("k-color-preview-icon", M) }),
|
|
2007
|
+
!M && (N || P) && /* @__PURE__ */ n.createElement(he, { name: N, icon: P }),
|
|
2008
|
+
/* @__PURE__ */ n.createElement("span", { className: "k-color-preview-mask", style: { backgroundColor: E } })
|
|
2009
2009
|
)),
|
|
2010
2010
|
button: /* @__PURE__ */ n.createElement(
|
|
2011
|
-
|
|
2011
|
+
be,
|
|
2012
2012
|
{
|
|
2013
2013
|
tabIndex: -1,
|
|
2014
2014
|
type: "button",
|
|
2015
|
-
onClick:
|
|
2015
|
+
onClick: K,
|
|
2016
2016
|
className: "k-input-button",
|
|
2017
2017
|
rounded: null,
|
|
2018
2018
|
icon: "caret-alt-down",
|
|
2019
2019
|
svgIcon: ht,
|
|
2020
|
-
"aria-label": s.toLanguageString(ta,
|
|
2020
|
+
"aria-label": s.toLanguageString(ta, H[ta])
|
|
2021
2021
|
}
|
|
2022
2022
|
),
|
|
2023
|
-
content: /* @__PURE__ */ n.createElement(n.Fragment, null, (
|
|
2023
|
+
content: /* @__PURE__ */ n.createElement(n.Fragment, null, (v === "combo" || v === "gradient") && /* @__PURE__ */ n.createElement(
|
|
2024
2024
|
ga,
|
|
2025
2025
|
{
|
|
2026
|
-
...
|
|
2026
|
+
...h,
|
|
2027
2027
|
tabIndex: 0,
|
|
2028
2028
|
ref: F,
|
|
2029
|
-
value:
|
|
2030
|
-
onChange:
|
|
2029
|
+
value: E,
|
|
2030
|
+
onChange: re
|
|
2031
2031
|
}
|
|
2032
|
-
), (
|
|
2032
|
+
), (v === "combo" || v === "palette") && /* @__PURE__ */ n.createElement(
|
|
2033
2033
|
ba,
|
|
2034
2034
|
{
|
|
2035
2035
|
...d,
|
|
2036
|
-
ref:
|
|
2037
|
-
value:
|
|
2038
|
-
onChange:
|
|
2036
|
+
ref: A,
|
|
2037
|
+
value: E,
|
|
2038
|
+
onChange: Ee
|
|
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
|
-
|
|
2073
|
-
const e = n.useRef(null), s = n.useRef(null), i = n.useRef(null), { defaultValue: l = Ka, showButtons: c = !0, showPreview: o = !0, showClearButton:
|
|
2072
|
+
me(ge);
|
|
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 M = $e(), V = n.useCallback(
|
|
2078
2078
|
() => {
|
|
2079
2079
|
e.current && e.current.focus();
|
|
2080
2080
|
},
|
|
@@ -2082,86 +2082,86 @@ 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: V,
|
|
2086
2086
|
props: a,
|
|
2087
|
-
value:
|
|
2088
|
-
}), [
|
|
2087
|
+
value: P
|
|
2088
|
+
}), [P, V, a]), n.useImperativeHandle(t, () => e.current);
|
|
2089
2089
|
const S = n.useCallback(
|
|
2090
|
-
(
|
|
2091
|
-
(
|
|
2090
|
+
(x) => {
|
|
2091
|
+
(x === "ColorGradient" && !d || x === "ColorPalette" && d) && p(!d);
|
|
2092
2092
|
},
|
|
2093
2093
|
[d]
|
|
2094
|
-
),
|
|
2095
|
-
(
|
|
2094
|
+
), I = n.useCallback(
|
|
2095
|
+
(x) => {
|
|
2096
2096
|
if (f(l), a.onPreviewChange) {
|
|
2097
|
-
const
|
|
2097
|
+
const L = {
|
|
2098
2098
|
value: l,
|
|
2099
|
-
nativeEvent:
|
|
2100
|
-
syntheticEvent:
|
|
2099
|
+
nativeEvent: x.nativeEvent,
|
|
2100
|
+
syntheticEvent: x
|
|
2101
2101
|
};
|
|
2102
|
-
a.onPreviewChange.call(void 0,
|
|
2102
|
+
a.onPreviewChange.call(void 0, L);
|
|
2103
2103
|
}
|
|
2104
2104
|
},
|
|
2105
2105
|
[l, a.onPreviewChange]
|
|
2106
|
-
),
|
|
2107
|
-
(
|
|
2108
|
-
if (f(
|
|
2109
|
-
const
|
|
2110
|
-
value:
|
|
2111
|
-
nativeEvent:
|
|
2112
|
-
syntheticEvent:
|
|
2106
|
+
), O = n.useCallback(
|
|
2107
|
+
(x) => {
|
|
2108
|
+
if (f(x.value), a.onPreviewChange) {
|
|
2109
|
+
const L = {
|
|
2110
|
+
value: x.value,
|
|
2111
|
+
nativeEvent: x.nativeEvent,
|
|
2112
|
+
syntheticEvent: x.syntheticEvent
|
|
2113
2113
|
};
|
|
2114
|
-
a.onPreviewChange.call(void 0,
|
|
2114
|
+
a.onPreviewChange.call(void 0, L);
|
|
2115
2115
|
}
|
|
2116
2116
|
},
|
|
2117
2117
|
[a.onPreviewChange]
|
|
2118
|
-
),
|
|
2119
|
-
(
|
|
2120
|
-
if (N(
|
|
2121
|
-
const
|
|
2122
|
-
value:
|
|
2123
|
-
nativeEvent:
|
|
2124
|
-
syntheticEvent:
|
|
2118
|
+
), B = n.useCallback(
|
|
2119
|
+
(x) => {
|
|
2120
|
+
if (N(m), a.onChange) {
|
|
2121
|
+
const L = {
|
|
2122
|
+
value: m,
|
|
2123
|
+
nativeEvent: x.nativeEvent,
|
|
2124
|
+
syntheticEvent: x
|
|
2125
2125
|
};
|
|
2126
|
-
a.onChange.call(void 0,
|
|
2126
|
+
a.onChange.call(void 0, L);
|
|
2127
2127
|
}
|
|
2128
2128
|
},
|
|
2129
|
-
[
|
|
2130
|
-
),
|
|
2129
|
+
[m, a.onChange]
|
|
2130
|
+
), w = n.useCallback(
|
|
2131
2131
|
() => {
|
|
2132
2132
|
N(Ka);
|
|
2133
2133
|
},
|
|
2134
2134
|
[]
|
|
2135
2135
|
), F = n.useCallback(
|
|
2136
|
-
(
|
|
2137
|
-
if (f(
|
|
2138
|
-
const
|
|
2139
|
-
value:
|
|
2140
|
-
nativeEvent:
|
|
2141
|
-
syntheticEvent:
|
|
2136
|
+
(x) => {
|
|
2137
|
+
if (f(v), a.onPreviewChange) {
|
|
2138
|
+
const L = {
|
|
2139
|
+
value: v,
|
|
2140
|
+
nativeEvent: x.nativeEvent,
|
|
2141
|
+
syntheticEvent: x
|
|
2142
2142
|
};
|
|
2143
|
-
a.onPreviewChange.call(void 0,
|
|
2143
|
+
a.onPreviewChange.call(void 0, L);
|
|
2144
2144
|
}
|
|
2145
2145
|
},
|
|
2146
|
-
[
|
|
2147
|
-
),
|
|
2148
|
-
(
|
|
2149
|
-
s.current && !(
|
|
2146
|
+
[v, a.onPreviewChange]
|
|
2147
|
+
), A = n.useCallback(
|
|
2148
|
+
(x) => {
|
|
2149
|
+
s.current && !(x.nativeEvent.target instanceof HTMLInputElement) && s.current.focus();
|
|
2150
2150
|
},
|
|
2151
2151
|
[s]
|
|
2152
2152
|
), T = n.useCallback(
|
|
2153
|
-
(
|
|
2154
|
-
var
|
|
2155
|
-
if ((!
|
|
2156
|
-
const
|
|
2157
|
-
value:
|
|
2158
|
-
nativeEvent:
|
|
2159
|
-
syntheticEvent:
|
|
2153
|
+
(x) => {
|
|
2154
|
+
var $;
|
|
2155
|
+
if ((!x.relatedTarget || !(($ = s.current) != null && $.contains(x.relatedTarget))) && (c || N(m), !c && a.onChange)) {
|
|
2156
|
+
const U = {
|
|
2157
|
+
value: m,
|
|
2158
|
+
nativeEvent: x.nativeEvent,
|
|
2159
|
+
syntheticEvent: x
|
|
2160
2160
|
};
|
|
2161
|
-
a.onChange.call(void 0,
|
|
2161
|
+
a.onChange.call(void 0, U);
|
|
2162
2162
|
}
|
|
2163
2163
|
},
|
|
2164
|
-
[
|
|
2164
|
+
[m, c, a.onChange]
|
|
2165
2165
|
);
|
|
2166
2166
|
return /* @__PURE__ */ n.createElement(
|
|
2167
2167
|
"div",
|
|
@@ -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: oe(a.tabIndex, a.disabled),
|
|
2177
2177
|
className: G(
|
|
2178
2178
|
"k-flatcolorpicker k-coloreditor",
|
|
2179
2179
|
{
|
|
@@ -2184,12 +2184,12 @@ 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
|
+
be,
|
|
2188
2188
|
{
|
|
2189
2189
|
type: "button",
|
|
2190
|
-
"aria-label":
|
|
2190
|
+
"aria-label": M.toLanguageString(
|
|
2191
2191
|
Zt,
|
|
2192
|
-
|
|
2192
|
+
H[Zt]
|
|
2193
2193
|
),
|
|
2194
2194
|
togglable: !0,
|
|
2195
2195
|
fillMode: "flat",
|
|
@@ -2199,12 +2199,12 @@ 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
|
+
be,
|
|
2203
2203
|
{
|
|
2204
2204
|
type: "button",
|
|
2205
|
-
"aria-label":
|
|
2205
|
+
"aria-label": M.toLanguageString(
|
|
2206
2206
|
Jt,
|
|
2207
|
-
|
|
2207
|
+
H[Jt]
|
|
2208
2208
|
),
|
|
2209
2209
|
togglable: !0,
|
|
2210
2210
|
fillMode: "flat",
|
|
@@ -2213,33 +2213,33 @@ const Ka = "rgba(255, 255, 255, 1)", Sn = n.forwardRef((a, t) => {
|
|
|
2213
2213
|
icon: "palette",
|
|
2214
2214
|
svgIcon: zn
|
|
2215
2215
|
}
|
|
2216
|
-
))), /* @__PURE__ */ n.createElement("div", { className: "k-spacer" }), /* @__PURE__ */ n.createElement("div", { className: "k-coloreditor-header-actions k-hstack" },
|
|
2217
|
-
|
|
2216
|
+
))), /* @__PURE__ */ n.createElement("div", { className: "k-spacer" }), /* @__PURE__ */ n.createElement("div", { className: "k-coloreditor-header-actions k-hstack" }, h && /* @__PURE__ */ n.createElement(
|
|
2217
|
+
be,
|
|
2218
2218
|
{
|
|
2219
2219
|
type: "button",
|
|
2220
2220
|
fillMode: "flat",
|
|
2221
|
-
onClick:
|
|
2222
|
-
"aria-label":
|
|
2221
|
+
onClick: I,
|
|
2222
|
+
"aria-label": M.toLanguageString(
|
|
2223
2223
|
Qt,
|
|
2224
|
-
|
|
2224
|
+
H[Qt]
|
|
2225
2225
|
),
|
|
2226
2226
|
icon: "droplet-slash",
|
|
2227
2227
|
svgIcon: _n
|
|
2228
2228
|
}
|
|
2229
|
-
), o && /* @__PURE__ */ n.createElement("div", { className: "k-coloreditor-preview k-vstack" }, /* @__PURE__ */ n.createElement("span", { className: "k-coloreditor-preview-color k-color-preview", style: { background:
|
|
2229
|
+
), o && /* @__PURE__ */ n.createElement("div", { className: "k-coloreditor-preview k-vstack" }, /* @__PURE__ */ n.createElement("span", { className: "k-coloreditor-preview-color k-color-preview", style: { background: m } }), /* @__PURE__ */ n.createElement("span", { className: "k-coloreditor-current-color k-color-preview", style: { background: v }, onClick: F })))), /* @__PURE__ */ n.createElement("div", { className: "k-coloreditor-views k-vstack" }, d ? /* @__PURE__ */ n.createElement(
|
|
2230
2230
|
ga,
|
|
2231
2231
|
{
|
|
2232
2232
|
ref: i,
|
|
2233
2233
|
role: "none",
|
|
2234
2234
|
tabIndex: -1,
|
|
2235
2235
|
ariaLabel: void 0,
|
|
2236
|
-
value:
|
|
2237
|
-
onChange:
|
|
2238
|
-
onFocus:
|
|
2236
|
+
value: m,
|
|
2237
|
+
onChange: O,
|
|
2238
|
+
onFocus: A,
|
|
2239
2239
|
opacity: a.opacity,
|
|
2240
2240
|
format: a.format
|
|
2241
2241
|
}
|
|
2242
|
-
) : /* @__PURE__ */ n.createElement(ba, { ariaDisabled: !0, ariaLabelledBy: "required_label", value:
|
|
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(be, { type: "button", className: "k-coloreditor-cancel", onClick: w }, H[on]), /* @__PURE__ */ n.createElement(be, { 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 De = /* @__PURE__ */ ((a) => (a[a.Literal = 0] = "Literal", a[a.Mask = 1] = "Mask", a[a.Undefined = 2] = "Undefined", a))(De || {});
|
|
2267
|
+
class X {
|
|
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 X(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 ye {
|
|
2321
2321
|
constructor(t) {
|
|
2322
2322
|
this.parse = t;
|
|
2323
2323
|
}
|
|
@@ -2326,57 +2326,57 @@ class Ce {
|
|
|
2326
2326
|
}
|
|
2327
2327
|
// map :: Functor f => f a ~> (a -> b) -> f b
|
|
2328
2328
|
map(t) {
|
|
2329
|
-
return new
|
|
2329
|
+
return new ye((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 ye((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 === De.Literal;
|
|
2337
2337
|
}
|
|
2338
2338
|
}
|
|
2339
|
-
const Ps = (a) => (t) => new
|
|
2339
|
+
const Ps = (a) => (t) => new ye((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 X(s, e, De.Mask);
|
|
2345
2345
|
if (t.test(l))
|
|
2346
|
-
return e.eat(), new
|
|
2346
|
+
return e.eat(), new X(l, e, De.Mask);
|
|
2347
2347
|
if (l === i)
|
|
2348
|
-
return e.eat(), new
|
|
2348
|
+
return e.eat(), new X(s, e, De.Mask);
|
|
2349
2349
|
e.eat_input();
|
|
2350
2350
|
}
|
|
2351
|
-
return e.eat(), new
|
|
2352
|
-
}), Ds = (a) => new
|
|
2351
|
+
return e.eat(), new X(s, e, De.Mask);
|
|
2352
|
+
}), Ds = (a) => new ye((t) => t.peek().char === a ? (t.eat(), new X(a, t, De.Literal)) : new X(a, t, De.Literal)), Bs = (a) => (t) => new ye((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 X(s, e);
|
|
2357
2357
|
if (t.test(s))
|
|
2358
|
-
return e.eat(), new
|
|
2358
|
+
return e.eat(), new X(s, e);
|
|
2359
2359
|
e.eat_input();
|
|
2360
2360
|
}
|
|
2361
|
-
return e.eat(), new
|
|
2362
|
-
}), Os = (a) => new
|
|
2361
|
+
return e.eat(), new X("", e);
|
|
2362
|
+
}), Os = (a) => new ye((t) => {
|
|
2363
2363
|
if (t.eof())
|
|
2364
|
-
return new
|
|
2364
|
+
return new X("", 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 X(a, t);
|
|
2367
|
+
}), ot = (a, t) => new ye((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 X(t.literal(s), e)) : i ? new X(t.mask(i), e) : new X(t.literal(s), e);
|
|
2371
|
+
}), ja = (a) => new ye((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 X(s, t) : new X(i, t);
|
|
2375
|
+
}), Wa = (a) => new ye((t) => {
|
|
2376
2376
|
let { char: e } = t.next();
|
|
2377
|
-
return a ? new
|
|
2378
|
-
}), Fs = (a) => new
|
|
2379
|
-
let e = new
|
|
2377
|
+
return a ? new X(e, t) : new X("", t);
|
|
2378
|
+
}), Fs = (a) => new ye((t) => new X(a, t)), Ts = (a, t) => a.chain((e) => t.map((s) => e.concat([s]))), Te = (a) => a.reduce((t, e) => Ts(t, e), Fs([])), ct = (a) => new ye((t) => {
|
|
2379
|
+
let e = new X([], 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 Te(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 && Te(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 && Te(this.maskTokens).run(t).fold((s) => {
|
|
2409
2409
|
e = s.join("");
|
|
2410
2410
|
}), e;
|
|
2411
2411
|
}
|
|
@@ -2414,9 +2414,9 @@ class zs {
|
|
|
2414
2414
|
}
|
|
2415
2415
|
maskInRange(t, e, s, i) {
|
|
2416
2416
|
let l = "", c = i;
|
|
2417
|
-
const o = e.split("").slice(0, s),
|
|
2418
|
-
return
|
|
2419
|
-
l = o.concat(d).concat(
|
|
2417
|
+
const o = e.split("").slice(0, s), h = e.split("").slice(i);
|
|
2418
|
+
return Te(this.maskTokens.slice(s, i)).run(t).fold((d) => {
|
|
2419
|
+
l = o.concat(d).concat(h).join("");
|
|
2420
2420
|
}), {
|
|
2421
2421
|
selection: c,
|
|
2422
2422
|
value: l
|
|
@@ -2424,8 +2424,8 @@ class zs {
|
|
|
2424
2424
|
}
|
|
2425
2425
|
maskRemoved(t, e, s) {
|
|
2426
2426
|
let i = "", l = s;
|
|
2427
|
-
const c = t.split("").slice(s), o = t.split("").slice(0, s).join(""),
|
|
2428
|
-
return
|
|
2427
|
+
const c = t.split("").slice(s), o = t.split("").slice(0, s).join(""), h = this.maskTokens.length - (t.length - s);
|
|
2428
|
+
return Te(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 Te(this.unmaskTokens).run(c, e).chain((o) => {
|
|
2443
2443
|
l = o.join("").length;
|
|
2444
|
-
const
|
|
2445
|
-
return
|
|
2444
|
+
const h = e.slice(l);
|
|
2445
|
+
return Te(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
|
+
}, Me = 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();
|
|
@@ -2535,7 +2535,7 @@ const wn = {
|
|
|
2535
2535
|
let o;
|
|
2536
2536
|
if (this._isPasted) {
|
|
2537
2537
|
this._isPasted = !1;
|
|
2538
|
-
const
|
|
2538
|
+
const h = c.length - l, d = s.length - h;
|
|
2539
2539
|
o = this._service.maskInRange(s.slice(i, d), c, i, l);
|
|
2540
2540
|
} else
|
|
2541
2541
|
o = this._service.maskInput(s, c, e.selectionStart || 0);
|
|
@@ -2556,7 +2556,7 @@ const wn = {
|
|
|
2556
2556
|
this.element && this.element.setCustomValidity(
|
|
2557
2557
|
this.validity.valid ? "" : this.props.validationMessage || ""
|
|
2558
2558
|
);
|
|
2559
|
-
},
|
|
2559
|
+
}, me(ge);
|
|
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 : Me.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 : Me.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 = Me.defaultProps.size,
|
|
2659
|
+
fillMode: t = Me.defaultProps.fillMode,
|
|
2660
|
+
rounded: e = Me.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, [
|
|
2662
|
+
prefix: c = Me.defaultProps.prefix,
|
|
2663
|
+
suffix: o = Me.defaultProps.suffix
|
|
2664
|
+
} = this.props, [h] = Be(c), [d] = Be(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-${se.sizeMap[a] || a}`]: a,
|
|
2672
2672
|
[`k-input-${t}`]: t,
|
|
2673
|
-
[`k-rounded-${
|
|
2673
|
+
[`k-rounded-${se.roundedMap[e] || e}`]: e,
|
|
2674
2674
|
"k-invalid": !i,
|
|
2675
2675
|
"k-required": this.required,
|
|
2676
2676
|
"k-disabled": this.props.disabled
|
|
@@ -2679,7 +2679,7 @@ const wn = {
|
|
|
2679
2679
|
),
|
|
2680
2680
|
style: this.props.label ? l : { width: this.props.width, ...l }
|
|
2681
2681
|
},
|
|
2682
|
-
/* @__PURE__ */ n.createElement(
|
|
2682
|
+
/* @__PURE__ */ n.createElement(h, null),
|
|
2683
2683
|
/* @__PURE__ */ n.createElement(
|
|
2684
2684
|
"input",
|
|
2685
2685
|
{
|
|
@@ -2695,13 +2695,13 @@ 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: oe(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,
|
|
2702
2702
|
readOnly: this.props.readonly || void 0,
|
|
2703
2703
|
placeholder: this.props.placeholder,
|
|
2704
|
-
ref: (
|
|
2704
|
+
ref: (m) => this._input = m,
|
|
2705
2705
|
onChange: this.onChangeHandler,
|
|
2706
2706
|
onPaste: this.pasteHandler,
|
|
2707
2707
|
onFocus: this.focusHandler,
|
|
@@ -2721,11 +2721,11 @@ const wn = {
|
|
|
2721
2721
|
editorValid: i,
|
|
2722
2722
|
editorDisabled: this.props.disabled,
|
|
2723
2723
|
editorPlaceholder: this.props.placeholder,
|
|
2724
|
-
children:
|
|
2724
|
+
children: p,
|
|
2725
2725
|
style: { width: this.props.width },
|
|
2726
2726
|
dir: this.props.dir
|
|
2727
2727
|
}
|
|
2728
|
-
) :
|
|
2728
|
+
) : p;
|
|
2729
2729
|
}
|
|
2730
2730
|
triggerOnChange(a, t) {
|
|
2731
2731
|
if (this.setState({
|
|
@@ -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 = Me;
|
|
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 = pe(), Hs = et(Ue($s, yt));
|
|
2824
2824
|
Hs.displayName = "KendoReactMaskedTextBox";
|
|
2825
|
-
var
|
|
2825
|
+
var W = /* @__PURE__ */ ((a) => (a.start = "start", a.end = "end", a.min = "min", a.max = "max", a.increase = "increase", a.decrease = "decrease", a))(W || {});
|
|
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
|
-
|
|
2913
|
-
const e = Re(qs, a), s = n.useRef(null), i = n.useRef(null), l = n.useRef(null), c = n.useRef(null), o = n.useRef(null),
|
|
2911
|
+
}, qs = pe(), ka = n.forwardRef((a, t) => {
|
|
2912
|
+
me(ge);
|
|
2913
|
+
const e = Re(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
|
},
|
|
@@ -2918,137 +2918,137 @@ const Gs = (a, t) => {
|
|
|
2918
2918
|
);
|
|
2919
2919
|
n.useImperativeHandle(s, () => ({
|
|
2920
2920
|
element: i.current,
|
|
2921
|
-
focus:
|
|
2921
|
+
focus: h,
|
|
2922
2922
|
props: e
|
|
2923
2923
|
})), n.useImperativeHandle(t, () => s.current);
|
|
2924
2924
|
const d = n.useMemo(
|
|
2925
2925
|
() => e.min,
|
|
2926
2926
|
[e.min]
|
|
2927
|
-
),
|
|
2927
|
+
), p = n.useMemo(
|
|
2928
2928
|
() => e.max,
|
|
2929
2929
|
[e.max]
|
|
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 = He(i, e.dir), v = (u, y) => {
|
|
2934
2934
|
e.onChange && s.current && e.onChange.call(void 0, {
|
|
2935
|
-
value:
|
|
2935
|
+
value: u,
|
|
2936
2936
|
target: s.current,
|
|
2937
|
-
syntheticEvent:
|
|
2937
|
+
syntheticEvent: y
|
|
2938
2938
|
});
|
|
2939
|
-
}, [N,
|
|
2939
|
+
}, [N, P] = n.useState(""), [M, V] = Ks(
|
|
2940
2940
|
e.defaultValue || ut.defaultValue,
|
|
2941
2941
|
{
|
|
2942
2942
|
min: d,
|
|
2943
|
-
max:
|
|
2944
|
-
step:
|
|
2943
|
+
max: p,
|
|
2944
|
+
step: m,
|
|
2945
2945
|
state: e.value
|
|
2946
2946
|
},
|
|
2947
|
-
|
|
2947
|
+
v
|
|
2948
2948
|
), S = n.useMemo(
|
|
2949
|
-
() => e.value ||
|
|
2950
|
-
[e.value,
|
|
2951
|
-
),
|
|
2952
|
-
() => (S.start - d) / (
|
|
2953
|
-
[S.start, d,
|
|
2954
|
-
),
|
|
2955
|
-
() => (S.end - d) / (
|
|
2956
|
-
[S.end, d,
|
|
2949
|
+
() => e.value || M,
|
|
2950
|
+
[e.value, M]
|
|
2951
|
+
), I = n.useRef(null), O = n.useRef(null), B = n.useMemo(
|
|
2952
|
+
() => (S.start - d) / (p - d) * 100,
|
|
2953
|
+
[S.start, d, p]
|
|
2954
|
+
), w = n.useMemo(
|
|
2955
|
+
() => (S.end - d) / (p - d) * 100,
|
|
2956
|
+
[S.end, d, p]
|
|
2957
2957
|
), F = n.useMemo(
|
|
2958
2958
|
() => e.vertical ? { paddingTop: 0, height: "100%" } : {},
|
|
2959
2959
|
[e.vertical]
|
|
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 =
|
|
2964
|
-
(
|
|
2965
|
-
if (!
|
|
2963
|
+
), T = $e(), x = n.useCallback(
|
|
2964
|
+
(u) => {
|
|
2965
|
+
if (!O.current)
|
|
2966
2966
|
return;
|
|
2967
|
-
const
|
|
2968
|
-
return d +
|
|
2967
|
+
const y = O.current.getBoundingClientRect(), E = e.vertical ? y.bottom - u.clientY : f === "rtl" ? y.right - u.clientX : u.clientX - y.left, D = e.vertical ? y.height : y.width, ee = E / D;
|
|
2968
|
+
return d + ee * (p - d);
|
|
2969
2969
|
},
|
|
2970
2970
|
[
|
|
2971
|
-
|
|
2971
|
+
O,
|
|
2972
2972
|
e.vertical,
|
|
2973
2973
|
f,
|
|
2974
2974
|
d,
|
|
2975
|
-
|
|
2976
|
-
|
|
2977
|
-
|
|
2975
|
+
p,
|
|
2976
|
+
M.start,
|
|
2977
|
+
M.end,
|
|
2978
2978
|
e.value && e.value.start,
|
|
2979
2979
|
e.value && e.value.end
|
|
2980
2980
|
]
|
|
2981
|
-
),
|
|
2982
|
-
(
|
|
2981
|
+
), L = n.useCallback(
|
|
2982
|
+
(u) => u <= S.start ? "start" : u >= S.end ? "end" : 2 * u < S.end + S.start ? "start" : "end",
|
|
2983
2983
|
[
|
|
2984
|
-
|
|
2985
|
-
|
|
2984
|
+
M.start,
|
|
2985
|
+
M.end,
|
|
2986
2986
|
e.value && e.value.start,
|
|
2987
2987
|
e.value && e.value.end
|
|
2988
2988
|
]
|
|
2989
|
-
),
|
|
2990
|
-
(
|
|
2991
|
-
switch (
|
|
2992
|
-
case
|
|
2993
|
-
|
|
2989
|
+
), $ = n.useCallback(
|
|
2990
|
+
(u) => {
|
|
2991
|
+
switch (u.keyCode) {
|
|
2992
|
+
case _.right:
|
|
2993
|
+
u.preventDefault(), V({ type: f === "rtl" ? W.decrease : W.increase, key: "start", event: u });
|
|
2994
2994
|
break;
|
|
2995
|
-
case
|
|
2996
|
-
|
|
2995
|
+
case _.up:
|
|
2996
|
+
u.preventDefault(), V({ type: W.increase, key: "start", event: u });
|
|
2997
2997
|
break;
|
|
2998
|
-
case
|
|
2999
|
-
|
|
2998
|
+
case _.left:
|
|
2999
|
+
u.preventDefault(), V({ type: f === "rtl" ? W.increase : W.decrease, key: "start", event: u });
|
|
3000
3000
|
break;
|
|
3001
|
-
case
|
|
3002
|
-
|
|
3001
|
+
case _.down:
|
|
3002
|
+
u.preventDefault(), V({ type: W.decrease, key: "start", event: u });
|
|
3003
3003
|
break;
|
|
3004
|
-
case
|
|
3005
|
-
|
|
3004
|
+
case _.home:
|
|
3005
|
+
u.preventDefault(), V({ type: W.min, key: "start", event: u });
|
|
3006
3006
|
break;
|
|
3007
|
-
case
|
|
3008
|
-
|
|
3007
|
+
case _.end:
|
|
3008
|
+
u.preventDefault(), V({ type: W.max, key: "start", event: u });
|
|
3009
3009
|
break;
|
|
3010
3010
|
}
|
|
3011
3011
|
},
|
|
3012
|
-
[
|
|
3013
|
-
),
|
|
3014
|
-
(
|
|
3015
|
-
switch (
|
|
3016
|
-
case
|
|
3017
|
-
|
|
3012
|
+
[V]
|
|
3013
|
+
), U = n.useCallback(
|
|
3014
|
+
(u) => {
|
|
3015
|
+
switch (u.keyCode) {
|
|
3016
|
+
case _.right:
|
|
3017
|
+
u.preventDefault(), V({ type: f === "rtl" ? W.decrease : W.increase, key: "end", event: u });
|
|
3018
3018
|
break;
|
|
3019
|
-
case
|
|
3020
|
-
|
|
3019
|
+
case _.up:
|
|
3020
|
+
u.preventDefault(), V({ type: W.increase, key: "end", event: u });
|
|
3021
3021
|
break;
|
|
3022
|
-
case
|
|
3023
|
-
|
|
3022
|
+
case _.left:
|
|
3023
|
+
u.preventDefault(), V({ type: f === "rtl" ? W.increase : W.decrease, key: "end", event: u });
|
|
3024
3024
|
break;
|
|
3025
|
-
case
|
|
3026
|
-
|
|
3025
|
+
case _.down:
|
|
3026
|
+
u.preventDefault(), V({ type: W.decrease, key: "end", event: u });
|
|
3027
3027
|
break;
|
|
3028
|
-
case
|
|
3029
|
-
|
|
3028
|
+
case _.home:
|
|
3029
|
+
u.preventDefault(), V({ type: W.min, key: "end", event: u });
|
|
3030
3030
|
break;
|
|
3031
|
-
case
|
|
3032
|
-
|
|
3031
|
+
case _.end:
|
|
3032
|
+
u.preventDefault(), V({ type: W.max, key: "end", event: u });
|
|
3033
3033
|
break;
|
|
3034
3034
|
}
|
|
3035
3035
|
},
|
|
3036
|
-
[
|
|
3037
|
-
),
|
|
3038
|
-
(
|
|
3039
|
-
const
|
|
3040
|
-
|
|
3041
|
-
const
|
|
3042
|
-
|
|
3036
|
+
[V, f]
|
|
3037
|
+
), Q = n.useCallback(
|
|
3038
|
+
(u) => {
|
|
3039
|
+
const y = x(u), E = L(y);
|
|
3040
|
+
P(E), E === "end" ? o.current.focus() : c.current.focus();
|
|
3041
|
+
const D = E === "end" ? W.end : W.start;
|
|
3042
|
+
V({ type: D, payload: y, event: u });
|
|
3043
3043
|
},
|
|
3044
|
-
[e.vertical, d,
|
|
3044
|
+
[e.vertical, d, p, V]
|
|
3045
3045
|
);
|
|
3046
|
-
return Dn(
|
|
3047
|
-
const
|
|
3048
|
-
|
|
3049
|
-
}, onRelease: (
|
|
3050
|
-
const
|
|
3051
|
-
|
|
3046
|
+
return Dn(O, { onPress: Q, onDrag: (u) => {
|
|
3047
|
+
const y = x(u), E = N === "end" ? W.end : W.start;
|
|
3048
|
+
V({ type: E, payload: y, event: u });
|
|
3049
|
+
}, onRelease: (u) => {
|
|
3050
|
+
const y = x(u), E = N === "end" ? W.end : W.start;
|
|
3051
|
+
V({ type: E, payload: y, event: u }), P("");
|
|
3052
3052
|
} }), /* @__PURE__ */ n.createElement(
|
|
3053
3053
|
"div",
|
|
3054
3054
|
{
|
|
@@ -3070,13 +3070,13 @@ const Gs = (a, t) => {
|
|
|
3070
3070
|
/* @__PURE__ */ n.createElement(
|
|
3071
3071
|
"div",
|
|
3072
3072
|
{
|
|
3073
|
-
ref:
|
|
3073
|
+
ref: O,
|
|
3074
3074
|
className: "k-slider-track-wrap",
|
|
3075
3075
|
style: {
|
|
3076
3076
|
flexGrow: 1,
|
|
3077
3077
|
position: "relative",
|
|
3078
3078
|
touchAction: "none",
|
|
3079
|
-
...
|
|
3079
|
+
...A
|
|
3080
3080
|
}
|
|
3081
3081
|
},
|
|
3082
3082
|
e.children && /* @__PURE__ */ n.createElement(
|
|
@@ -3085,32 +3085,32 @@ const Gs = (a, t) => {
|
|
|
3085
3085
|
className: "k-reset k-slider-items",
|
|
3086
3086
|
style: { ...F }
|
|
3087
3087
|
},
|
|
3088
|
-
n.Children.map(e.children, (
|
|
3089
|
-
|
|
3088
|
+
n.Children.map(e.children, (u) => u && n.cloneElement(
|
|
3089
|
+
u,
|
|
3090
3090
|
{
|
|
3091
|
-
position: 100 * (
|
|
3091
|
+
position: 100 * (u.props.position - e.min) / (e.max - e.min),
|
|
3092
3092
|
vertical: e.vertical
|
|
3093
3093
|
},
|
|
3094
|
-
|
|
3094
|
+
u.props.children
|
|
3095
3095
|
))
|
|
3096
3096
|
),
|
|
3097
3097
|
/* @__PURE__ */ n.createElement(
|
|
3098
3098
|
"div",
|
|
3099
3099
|
{
|
|
3100
|
-
ref:
|
|
3100
|
+
ref: I,
|
|
3101
3101
|
className: "k-slider-track",
|
|
3102
3102
|
style: e.vertical ? { bottom: 0, height: "100%" } : { [f === "rtl" ? "right" : "left"]: 0, width: "100%" }
|
|
3103
3103
|
},
|
|
3104
|
-
|
|
3104
|
+
B !== null && w !== null && /* @__PURE__ */ n.createElement(
|
|
3105
3105
|
"div",
|
|
3106
3106
|
{
|
|
3107
3107
|
"data-selection": !0,
|
|
3108
3108
|
ref: l,
|
|
3109
3109
|
title: `${S.start} - ${S.end}`,
|
|
3110
3110
|
className: "k-slider-selection",
|
|
3111
|
-
style: e.vertical ? { height:
|
|
3112
|
-
[f === "rtl" ? "right" : "left"]:
|
|
3113
|
-
width:
|
|
3111
|
+
style: e.vertical ? { height: w - B + "%", bottom: B + "%" } : {
|
|
3112
|
+
[f === "rtl" ? "right" : "left"]: B + "%",
|
|
3113
|
+
width: w - B + "%"
|
|
3114
3114
|
}
|
|
3115
3115
|
}
|
|
3116
3116
|
),
|
|
@@ -3119,16 +3119,16 @@ const Gs = (a, t) => {
|
|
|
3119
3119
|
{
|
|
3120
3120
|
ref: c,
|
|
3121
3121
|
role: "slider",
|
|
3122
|
-
tabIndex:
|
|
3122
|
+
tabIndex: oe(e.startTabIndex, e.disabled, void 0),
|
|
3123
3123
|
"aria-valuemin": d,
|
|
3124
|
-
"aria-valuemax": Math.max(
|
|
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(
|
|
3130
|
-
style: e.vertical ? { bottom: "calc(" +
|
|
3131
|
-
onKeyDown:
|
|
3129
|
+
title: T.toLanguageString(_e, H[_e]),
|
|
3130
|
+
style: e.vertical ? { bottom: "calc(" + B + "%)", zIndex: 1 } : f === "rtl" ? { right: "calc(" + B + "% - 13px)", zIndex: 1 } : { left: "calc(" + B + "%)", zIndex: 1 },
|
|
3131
|
+
onKeyDown: $
|
|
3132
3132
|
}
|
|
3133
3133
|
),
|
|
3134
3134
|
/* @__PURE__ */ n.createElement(
|
|
@@ -3136,16 +3136,16 @@ const Gs = (a, t) => {
|
|
|
3136
3136
|
{
|
|
3137
3137
|
ref: o,
|
|
3138
3138
|
role: "slider",
|
|
3139
|
-
tabIndex:
|
|
3139
|
+
tabIndex: oe(e.endTabIndex, e.disabled, void 0),
|
|
3140
3140
|
"aria-valuemin": Math.min(d, S.start),
|
|
3141
|
-
"aria-valuemax":
|
|
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(
|
|
3147
|
-
style: e.vertical ? { bottom: "calc(" +
|
|
3148
|
-
onKeyDown:
|
|
3146
|
+
title: T.toLanguageString(_e, H[_e]),
|
|
3147
|
+
style: e.vertical ? { bottom: "calc(" + w + "%)", zIndex: 1 } : f === "rtl" ? { right: "calc(" + w + "% - 13px)", zIndex: 1 } : { left: "calc(" + w + "%)", zIndex: 1 },
|
|
3148
|
+
onKeyDown: U
|
|
3149
3149
|
}
|
|
3150
3150
|
)
|
|
3151
3151
|
)
|
|
@@ -3224,13 +3224,13 @@ const ft = class extends n.Component {
|
|
|
3224
3224
|
constructor(a) {
|
|
3225
3225
|
super(a), this.setValidity = () => {
|
|
3226
3226
|
this._input && this._input.setCustomValidity && this._input.setCustomValidity(
|
|
3227
|
-
this.validity.valid ? "" : this.props.validationMessage || this.defaultValidationMessage.toLanguageString(ea,
|
|
3227
|
+
this.validity.valid ? "" : this.props.validationMessage || this.defaultValidationMessage.toLanguageString(ea, H[ea])
|
|
3228
3228
|
);
|
|
3229
3229
|
}, this.limit = (t, e, s) => {
|
|
3230
3230
|
const i = s.offsetWidth, l = e.offsetWidth;
|
|
3231
3231
|
return t < 0 ? 0 : t > i - l ? i - l : t;
|
|
3232
3232
|
}, this.toggle = (t, e) => {
|
|
3233
|
-
this.setState({ checked: t }), this.valueDuringOnChange = t,
|
|
3233
|
+
this.setState({ checked: t }), this.valueDuringOnChange = t, J(this.props.onChange, e, this, { value: t }), this.valueDuringOnChange = void 0;
|
|
3234
3234
|
}, this._element = null, this._wrapper = null, this._input = null, this._id = this.props.id, this.defaultValidationMessage = Je(this), this.focus = () => {
|
|
3235
3235
|
this.actionElement && this.actionElement.focus();
|
|
3236
3236
|
}, this.dummyInput = (t) => /* @__PURE__ */ n.createElement(
|
|
@@ -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: Ne,
|
|
3249
3249
|
name: this.name || void 0
|
|
3250
3250
|
}
|
|
3251
3251
|
), this.handleClick = (t) => {
|
|
@@ -3254,7 +3254,7 @@ const ft = class extends n.Component {
|
|
|
3254
3254
|
if (this.props.disabled)
|
|
3255
3255
|
return;
|
|
3256
3256
|
const { keyCode: e } = t;
|
|
3257
|
-
(e ===
|
|
3257
|
+
(e === _.space || e === _.enter) && (this.toggle(!this.value, t), t.preventDefault());
|
|
3258
3258
|
}, this.handleWrapperFocus = (t) => {
|
|
3259
3259
|
if (this.props.disabled)
|
|
3260
3260
|
return;
|
|
@@ -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
|
-
},
|
|
3270
|
+
}, me(ge), this.state = {
|
|
3271
3271
|
checked: a.defaultChecked || ft.defaultProps.defaultChecked,
|
|
3272
3272
|
focused: !1
|
|
3273
3273
|
};
|
|
@@ -3329,13 +3329,13 @@ const ft = class extends n.Component {
|
|
|
3329
3329
|
* @hidden
|
|
3330
3330
|
*/
|
|
3331
3331
|
render() {
|
|
3332
|
-
const { focused: a } = this.state, { dir: t, disabled: e, trackRounded: s, thumbRounded: i, size: l, offLabel: c, onLabel: o, tabIndex:
|
|
3332
|
+
const { focused: a } = this.state, { dir: t, disabled: e, trackRounded: s, thumbRounded: i, size: l, offLabel: c, onLabel: o, tabIndex: h } = this.props;
|
|
3333
3333
|
this.dir = t || this.element && getComputedStyle(this.element).direction || void 0;
|
|
3334
|
-
const d = !this.validityStyles || this.validity.valid,
|
|
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-${se.sizeMap[l] || l}`]: l,
|
|
3338
|
+
[`k-rounded-${se.roundedMap[s] || s}`]: s,
|
|
3339
3339
|
"k-switch-on": this.value,
|
|
3340
3340
|
"k-switch-off": !this.value,
|
|
3341
3341
|
"k-focus": a,
|
|
@@ -3343,7 +3343,7 @@ const ft = class extends n.Component {
|
|
|
3343
3343
|
"k-invalid": !d
|
|
3344
3344
|
},
|
|
3345
3345
|
this.props.className
|
|
3346
|
-
),
|
|
3346
|
+
), m = {
|
|
3347
3347
|
"aria-checked": this.value,
|
|
3348
3348
|
"aria-disabled": e || void 0,
|
|
3349
3349
|
"aria-labelledby": this.props.ariaLabelledBy,
|
|
@@ -3357,14 +3357,14 @@ const ft = class extends n.Component {
|
|
|
3357
3357
|
this._wrapper = f;
|
|
3358
3358
|
},
|
|
3359
3359
|
role: "switch",
|
|
3360
|
-
...
|
|
3361
|
-
className:
|
|
3360
|
+
...m,
|
|
3361
|
+
className: p,
|
|
3362
3362
|
dir: this.dir,
|
|
3363
3363
|
onKeyDown: this.handleKeyDown,
|
|
3364
3364
|
onClick: this.handleClick,
|
|
3365
3365
|
onBlur: this.handleWrapperBlur,
|
|
3366
3366
|
onFocus: this.handleWrapperFocus,
|
|
3367
|
-
tabIndex:
|
|
3367
|
+
tabIndex: oe(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-${se.roundedMap[s] || s}`]: s }
|
|
3377
3377
|
),
|
|
3378
3378
|
ref: (f) => {
|
|
3379
3379
|
this._element = f;
|
|
@@ -3420,128 +3420,128 @@ Ct.defaultProps = {
|
|
|
3420
3420
|
trackRounded: "full",
|
|
3421
3421
|
thumbRounded: "full",
|
|
3422
3422
|
offLabel: "OFF",
|
|
3423
|
-
onBlur:
|
|
3424
|
-
onFocus:
|
|
3423
|
+
onBlur: Ne,
|
|
3424
|
+
onFocus: Ne,
|
|
3425
3425
|
onLabel: "ON",
|
|
3426
3426
|
required: !1,
|
|
3427
3427
|
validityStyles: !0
|
|
3428
3428
|
};
|
|
3429
|
-
const js =
|
|
3429
|
+
const js = pe(), Ws = et(Ue(js, Ct));
|
|
3430
3430
|
Ws.displayName = "KendoReactSwitch";
|
|
3431
|
-
const Xs =
|
|
3432
|
-
|
|
3431
|
+
const Xs = pe(), ya = n.forwardRef((a, t) => {
|
|
3432
|
+
me(ge);
|
|
3433
3433
|
const e = Re(Xs, a), {
|
|
3434
3434
|
ariaDescribedBy: s,
|
|
3435
3435
|
ariaLabelledBy: i,
|
|
3436
3436
|
checked: l,
|
|
3437
3437
|
className: c,
|
|
3438
3438
|
labelClassName: o,
|
|
3439
|
-
children:
|
|
3439
|
+
children: h,
|
|
3440
3440
|
defaultChecked: d,
|
|
3441
|
-
disabled:
|
|
3442
|
-
defaultValue:
|
|
3441
|
+
disabled: p,
|
|
3442
|
+
defaultValue: m,
|
|
3443
3443
|
id: f,
|
|
3444
|
-
size:
|
|
3444
|
+
size: v,
|
|
3445
3445
|
rounded: N,
|
|
3446
|
-
label:
|
|
3447
|
-
labelPlacement:
|
|
3448
|
-
name:
|
|
3446
|
+
label: P,
|
|
3447
|
+
labelPlacement: M,
|
|
3448
|
+
name: V,
|
|
3449
3449
|
labelOptional: S,
|
|
3450
|
-
onChange:
|
|
3451
|
-
onFocus:
|
|
3452
|
-
onBlur:
|
|
3453
|
-
tabIndex:
|
|
3450
|
+
onChange: I,
|
|
3451
|
+
onFocus: O,
|
|
3452
|
+
onBlur: B,
|
|
3453
|
+
tabIndex: w,
|
|
3454
3454
|
value: F,
|
|
3455
|
-
required:
|
|
3455
|
+
required: A,
|
|
3456
3456
|
valid: T,
|
|
3457
|
-
validationMessage:
|
|
3458
|
-
validityStyles:
|
|
3457
|
+
validationMessage: x,
|
|
3458
|
+
validityStyles: L,
|
|
3459
3459
|
// Removed to support direct use in Form Field component
|
|
3460
|
-
visited:
|
|
3461
|
-
touched:
|
|
3462
|
-
modified:
|
|
3463
|
-
...
|
|
3464
|
-
} = e,
|
|
3460
|
+
visited: $,
|
|
3461
|
+
touched: U,
|
|
3462
|
+
modified: Q,
|
|
3463
|
+
...g
|
|
3464
|
+
} = e, k = n.useRef(null), u = n.useCallback(
|
|
3465
3465
|
() => {
|
|
3466
|
-
|
|
3466
|
+
k.current && k.current.focus();
|
|
3467
3467
|
},
|
|
3468
3468
|
[]
|
|
3469
|
-
),
|
|
3469
|
+
), y = n.useCallback(
|
|
3470
3470
|
() => ({
|
|
3471
|
-
element:
|
|
3472
|
-
focus:
|
|
3471
|
+
element: k.current,
|
|
3472
|
+
focus: u,
|
|
3473
3473
|
get name() {
|
|
3474
|
-
return
|
|
3474
|
+
return k.current && k.current.name;
|
|
3475
3475
|
}
|
|
3476
3476
|
}),
|
|
3477
|
-
[
|
|
3477
|
+
[u]
|
|
3478
3478
|
);
|
|
3479
|
-
n.useImperativeHandle(t,
|
|
3480
|
-
const [
|
|
3479
|
+
n.useImperativeHandle(t, y);
|
|
3480
|
+
const [E, D] = n.useState(d), [ee, Y] = n.useState(m), R = typeof F == "boolean" || F === null, b = l !== void 0, K = R, q = K ? F : ee, Z = b ? l : K ? void 0 : E, ce = Z === void 0 && q, xe = ce ? q : Z, re = ce || K ? F === null ? F : void 0 : F || q, Ee = xe === null || re === null, Ce = Qe(), Ve = $e(), z = (te) => Ve.toLanguageString(te, H[te]), ae = z(dn), ie = z(un), je = T !== void 0 ? T : A ? !!Z : !0;
|
|
3481
3481
|
n.useEffect(
|
|
3482
3482
|
() => {
|
|
3483
|
-
|
|
3484
|
-
je ? "" :
|
|
3483
|
+
k.current && k.current.setCustomValidity && k.current.setCustomValidity(
|
|
3484
|
+
je ? "" : x || ae
|
|
3485
3485
|
);
|
|
3486
3486
|
},
|
|
3487
|
-
[je,
|
|
3487
|
+
[je, x, ae]
|
|
3488
3488
|
);
|
|
3489
|
-
const
|
|
3489
|
+
const Oe = n.useCallback(
|
|
3490
3490
|
(te, we) => {
|
|
3491
|
-
!
|
|
3492
|
-
|
|
3491
|
+
!K && !p && (Y(we), !b && !p && D(we)), I && !p && J(
|
|
3492
|
+
I,
|
|
3493
3493
|
te,
|
|
3494
3494
|
{
|
|
3495
|
-
...
|
|
3495
|
+
...y(),
|
|
3496
3496
|
value: we
|
|
3497
3497
|
},
|
|
3498
3498
|
{ value: we }
|
|
3499
3499
|
);
|
|
3500
3500
|
},
|
|
3501
|
-
[b,
|
|
3501
|
+
[b, p, I, K, y]
|
|
3502
3502
|
), wt = n.useCallback(
|
|
3503
3503
|
(te) => {
|
|
3504
3504
|
const we = te.target.checked;
|
|
3505
|
-
|
|
3505
|
+
Oe(te, we);
|
|
3506
3506
|
},
|
|
3507
|
-
[
|
|
3507
|
+
[Oe, F]
|
|
3508
3508
|
), tt = n.useCallback(
|
|
3509
3509
|
(te) => {
|
|
3510
|
-
if (
|
|
3510
|
+
if (p)
|
|
3511
3511
|
return;
|
|
3512
3512
|
const { keyCode: we } = te, Mn = te.currentTarget.checked;
|
|
3513
|
-
we ===
|
|
3513
|
+
we === _.space && (te.preventDefault(), te.stopPropagation(), Oe(te, !Mn));
|
|
3514
3514
|
},
|
|
3515
|
-
[
|
|
3515
|
+
[p, Oe]
|
|
3516
3516
|
), at = n.useCallback(
|
|
3517
3517
|
(te) => {
|
|
3518
|
-
if (
|
|
3518
|
+
if (p)
|
|
3519
3519
|
return;
|
|
3520
3520
|
const { keyCode: we } = te;
|
|
3521
|
-
we ===
|
|
3521
|
+
we === _.space && te.preventDefault();
|
|
3522
3522
|
},
|
|
3523
|
-
[
|
|
3523
|
+
[p]
|
|
3524
3524
|
), It = n.useCallback(
|
|
3525
3525
|
(te) => {
|
|
3526
|
-
|
|
3527
|
-
|
|
3526
|
+
O && !p && J(
|
|
3527
|
+
O,
|
|
3528
3528
|
te,
|
|
3529
|
-
|
|
3529
|
+
y(),
|
|
3530
3530
|
void 0
|
|
3531
3531
|
);
|
|
3532
3532
|
},
|
|
3533
|
-
[
|
|
3534
|
-
),
|
|
3533
|
+
[O, p, y]
|
|
3534
|
+
), C = n.useCallback(
|
|
3535
3535
|
(te) => {
|
|
3536
|
-
|
|
3537
|
-
|
|
3536
|
+
B && !p && J(
|
|
3537
|
+
B,
|
|
3538
3538
|
te,
|
|
3539
|
-
|
|
3539
|
+
y(),
|
|
3540
3540
|
void 0
|
|
3541
3541
|
);
|
|
3542
3542
|
},
|
|
3543
|
-
[
|
|
3544
|
-
),
|
|
3543
|
+
[B, p, y]
|
|
3544
|
+
), j = He(k, e.dir), de = G(
|
|
3545
3545
|
"k-checkbox-wrap",
|
|
3546
3546
|
c
|
|
3547
3547
|
), Se = {
|
|
@@ -3549,48 +3549,48 @@ const Xs = he(), ya = n.forwardRef((a, t) => {
|
|
|
3549
3549
|
className: G(
|
|
3550
3550
|
"k-checkbox",
|
|
3551
3551
|
{
|
|
3552
|
-
[`k-checkbox-${
|
|
3553
|
-
[`k-rounded-${
|
|
3554
|
-
"k-indeterminate":
|
|
3555
|
-
"k-disabled":
|
|
3556
|
-
"k-invalid k-invalid": !(je ||
|
|
3552
|
+
[`k-checkbox-${se.sizeMap[v] || v}`]: v,
|
|
3553
|
+
[`k-rounded-${se.roundedMap[N] || N}`]: N,
|
|
3554
|
+
"k-indeterminate": Ee,
|
|
3555
|
+
"k-disabled": p,
|
|
3556
|
+
"k-invalid k-invalid": !(je || L !== void 0 || L === !0)
|
|
3557
3557
|
}
|
|
3558
3558
|
),
|
|
3559
|
-
ref:
|
|
3560
|
-
name:
|
|
3561
|
-
id: f ||
|
|
3559
|
+
ref: k,
|
|
3560
|
+
name: V,
|
|
3561
|
+
id: f || Ce,
|
|
3562
3562
|
"aria-labelledby": i,
|
|
3563
3563
|
"aria-describedby": s,
|
|
3564
|
-
checked: !!
|
|
3565
|
-
disabled:
|
|
3566
|
-
tabIndex:
|
|
3564
|
+
checked: !!xe,
|
|
3565
|
+
disabled: p,
|
|
3566
|
+
tabIndex: oe(w, p),
|
|
3567
3567
|
role: "checkbox",
|
|
3568
|
-
required:
|
|
3569
|
-
"aria-checked":
|
|
3570
|
-
"aria-disabled":
|
|
3571
|
-
...
|
|
3568
|
+
required: A !== void 0 ? A : !1,
|
|
3569
|
+
"aria-checked": Z || xe ? !0 : Ee ? "mixed" : !1,
|
|
3570
|
+
"aria-disabled": p || void 0,
|
|
3571
|
+
...g,
|
|
3572
3572
|
onChange: wt,
|
|
3573
3573
|
onKeyDown: tt,
|
|
3574
3574
|
onKeyUp: at,
|
|
3575
3575
|
onFocus: It,
|
|
3576
|
-
onBlur:
|
|
3576
|
+
onBlur: C
|
|
3577
3577
|
}, Vn = /* @__PURE__ */ n.createElement(
|
|
3578
3578
|
n.Fragment,
|
|
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
|
-
|
|
3583
|
-
), Lt = /* @__PURE__ */ n.createElement(n.Fragment, null,
|
|
3582
|
+
re === void 0 ? /* @__PURE__ */ n.createElement("input", { ...Se }) : /* @__PURE__ */ n.createElement("input", { ...Se, value: R ? void 0 : re === null ? "" : re })
|
|
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 || Ce,
|
|
3588
3588
|
style: { userSelect: "none" }
|
|
3589
3589
|
},
|
|
3590
|
-
|
|
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,
|
|
3590
|
+
P,
|
|
3591
|
+
S && /* @__PURE__ */ n.createElement("span", { className: "k-label-optional" }, ie)
|
|
3592
|
+
) : null), Rt = /* @__PURE__ */ n.createElement("span", { className: de }, Vn, h);
|
|
3593
|
+
return /* @__PURE__ */ n.createElement(n.Fragment, null, M === "before" ? /* @__PURE__ */ n.createElement("div", { dir: "rtl" }, Rt, Lt) : M === "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,104 +3624,104 @@ const Ys = {
|
|
|
3624
3624
|
};
|
|
3625
3625
|
ya.defaultProps = Ys;
|
|
3626
3626
|
ya.displayName = "KendoCheckbox";
|
|
3627
|
-
const Zs =
|
|
3628
|
-
|
|
3627
|
+
const Zs = pe(), xt = n.forwardRef((a, t) => {
|
|
3628
|
+
me(ge);
|
|
3629
3629
|
const e = Re(Zs, a), {
|
|
3630
3630
|
ariaDescribedBy: s,
|
|
3631
3631
|
checked: i,
|
|
3632
3632
|
children: l,
|
|
3633
3633
|
className: c,
|
|
3634
3634
|
disabled: o,
|
|
3635
|
-
id:
|
|
3635
|
+
id: h,
|
|
3636
3636
|
size: d,
|
|
3637
|
-
label:
|
|
3638
|
-
labelPlacement:
|
|
3637
|
+
label: p,
|
|
3638
|
+
labelPlacement: m,
|
|
3639
3639
|
name: f,
|
|
3640
|
-
style:
|
|
3640
|
+
style: v,
|
|
3641
3641
|
tabIndex: N,
|
|
3642
|
-
value:
|
|
3643
|
-
valid:
|
|
3644
|
-
onChange:
|
|
3642
|
+
value: P,
|
|
3643
|
+
valid: M,
|
|
3644
|
+
onChange: V,
|
|
3645
3645
|
onFocus: S,
|
|
3646
|
-
onBlur:
|
|
3647
|
-
...
|
|
3648
|
-
} = e,
|
|
3646
|
+
onBlur: I,
|
|
3647
|
+
...O
|
|
3648
|
+
} = e, B = n.useRef(null), w = n.useCallback(
|
|
3649
3649
|
() => {
|
|
3650
|
-
|
|
3650
|
+
B.current && B.current.focus();
|
|
3651
3651
|
},
|
|
3652
3652
|
[]
|
|
3653
3653
|
), F = n.useCallback(
|
|
3654
3654
|
() => ({
|
|
3655
|
-
element:
|
|
3656
|
-
focus:
|
|
3655
|
+
element: B.current,
|
|
3656
|
+
focus: w
|
|
3657
3657
|
}),
|
|
3658
|
-
[
|
|
3658
|
+
[w]
|
|
3659
3659
|
);
|
|
3660
3660
|
n.useImperativeHandle(t, F);
|
|
3661
|
-
const
|
|
3662
|
-
(
|
|
3663
|
-
|
|
3664
|
-
|
|
3665
|
-
|
|
3661
|
+
const A = Qe(), T = n.useCallback(
|
|
3662
|
+
(g) => {
|
|
3663
|
+
J(
|
|
3664
|
+
V,
|
|
3665
|
+
g,
|
|
3666
3666
|
F(),
|
|
3667
|
-
{ value:
|
|
3667
|
+
{ value: P }
|
|
3668
3668
|
);
|
|
3669
3669
|
},
|
|
3670
|
-
[
|
|
3671
|
-
),
|
|
3672
|
-
(
|
|
3673
|
-
S && !o &&
|
|
3670
|
+
[V, P, o]
|
|
3671
|
+
), x = n.useCallback(
|
|
3672
|
+
(g) => {
|
|
3673
|
+
S && !o && J(
|
|
3674
3674
|
S,
|
|
3675
|
-
|
|
3675
|
+
g,
|
|
3676
3676
|
F(),
|
|
3677
3677
|
void 0
|
|
3678
3678
|
);
|
|
3679
3679
|
},
|
|
3680
3680
|
[S, o]
|
|
3681
|
-
),
|
|
3682
|
-
(
|
|
3683
|
-
|
|
3684
|
-
|
|
3685
|
-
|
|
3681
|
+
), L = n.useCallback(
|
|
3682
|
+
(g) => {
|
|
3683
|
+
I && !o && J(
|
|
3684
|
+
I,
|
|
3685
|
+
g,
|
|
3686
3686
|
F(),
|
|
3687
3687
|
void 0
|
|
3688
3688
|
);
|
|
3689
3689
|
},
|
|
3690
|
-
[
|
|
3691
|
-
),
|
|
3690
|
+
[I, o]
|
|
3691
|
+
), $ = {
|
|
3692
3692
|
type: "radio",
|
|
3693
|
-
id:
|
|
3693
|
+
id: h || A,
|
|
3694
3694
|
name: f,
|
|
3695
3695
|
className: G(
|
|
3696
3696
|
"k-radio",
|
|
3697
3697
|
{
|
|
3698
|
-
[`k-radio-${
|
|
3699
|
-
"k-invalid":
|
|
3698
|
+
[`k-radio-${se.sizeMap[d] || d}`]: d,
|
|
3699
|
+
"k-invalid": M === !1
|
|
3700
3700
|
},
|
|
3701
3701
|
c
|
|
3702
3702
|
),
|
|
3703
|
-
ref:
|
|
3703
|
+
ref: B,
|
|
3704
3704
|
disabled: o,
|
|
3705
|
-
tabIndex:
|
|
3705
|
+
tabIndex: oe(N, o),
|
|
3706
3706
|
checked: i,
|
|
3707
|
-
style:
|
|
3707
|
+
style: v,
|
|
3708
3708
|
"aria-describedby": s,
|
|
3709
|
-
value:
|
|
3709
|
+
value: P,
|
|
3710
3710
|
onChange: T,
|
|
3711
|
-
onFocus:
|
|
3712
|
-
onBlur:
|
|
3713
|
-
...
|
|
3714
|
-
},
|
|
3711
|
+
onFocus: x,
|
|
3712
|
+
onBlur: L,
|
|
3713
|
+
...O
|
|
3714
|
+
}, U = /* @__PURE__ */ n.createElement(n.Fragment, null, p !== void 0 ? /* @__PURE__ */ n.createElement(
|
|
3715
3715
|
"label",
|
|
3716
3716
|
{
|
|
3717
3717
|
className: "k-radio-label",
|
|
3718
|
-
htmlFor:
|
|
3718
|
+
htmlFor: h || A,
|
|
3719
3719
|
style: { userSelect: "none" },
|
|
3720
|
-
"aria-label":
|
|
3720
|
+
"aria-label": p
|
|
3721
3721
|
},
|
|
3722
|
-
|
|
3723
|
-
) : null),
|
|
3724
|
-
return
|
|
3722
|
+
p
|
|
3723
|
+
) : null), Q = /* @__PURE__ */ n.createElement("input", { ...$ });
|
|
3724
|
+
return m === "before" ? /* @__PURE__ */ n.createElement(n.Fragment, null, U, Q, l) : /* @__PURE__ */ n.createElement(n.Fragment, null, Q, U, l);
|
|
3725
3725
|
});
|
|
3726
3726
|
xt.propTypes = {
|
|
3727
3727
|
ariaDescribedBy: r.string,
|
|
@@ -3746,87 +3746,87 @@ const Js = {
|
|
|
3746
3746
|
};
|
|
3747
3747
|
xt.displayName = "KendoRadioButton";
|
|
3748
3748
|
xt.defaultProps = Js;
|
|
3749
|
-
const Qs =
|
|
3750
|
-
|
|
3749
|
+
const Qs = pe(), Ca = n.forwardRef((a, t) => {
|
|
3750
|
+
me(ge);
|
|
3751
3751
|
const e = Re(Qs, a), {
|
|
3752
3752
|
id: s,
|
|
3753
3753
|
ariaLabelledBy: i,
|
|
3754
3754
|
ariaDescribedBy: l,
|
|
3755
3755
|
className: c,
|
|
3756
3756
|
data: o,
|
|
3757
|
-
defaultValue:
|
|
3757
|
+
defaultValue: h,
|
|
3758
3758
|
disabled: d,
|
|
3759
|
-
name:
|
|
3760
|
-
labelPlacement:
|
|
3759
|
+
name: p,
|
|
3760
|
+
labelPlacement: m,
|
|
3761
3761
|
layout: f,
|
|
3762
|
-
style:
|
|
3762
|
+
style: v,
|
|
3763
3763
|
value: N,
|
|
3764
|
-
valid:
|
|
3765
|
-
item:
|
|
3766
|
-
onChange:
|
|
3764
|
+
valid: P,
|
|
3765
|
+
item: M = In.item,
|
|
3766
|
+
onChange: V,
|
|
3767
3767
|
onFocus: S
|
|
3768
|
-
} = e,
|
|
3768
|
+
} = e, I = n.useRef(null), O = n.useCallback(
|
|
3769
3769
|
() => {
|
|
3770
|
-
|
|
3770
|
+
I.current && tn(I.current);
|
|
3771
3771
|
},
|
|
3772
3772
|
[]
|
|
3773
|
-
),
|
|
3773
|
+
), B = n.useCallback(
|
|
3774
3774
|
() => ({
|
|
3775
|
-
element:
|
|
3776
|
-
focus:
|
|
3775
|
+
element: I.current,
|
|
3776
|
+
focus: O
|
|
3777
3777
|
}),
|
|
3778
|
-
[
|
|
3778
|
+
[O]
|
|
3779
3779
|
);
|
|
3780
|
-
n.useImperativeHandle(t,
|
|
3781
|
-
const [
|
|
3782
|
-
(
|
|
3783
|
-
let
|
|
3784
|
-
!
|
|
3785
|
-
|
|
3786
|
-
|
|
3787
|
-
|
|
3788
|
-
{ value:
|
|
3780
|
+
n.useImperativeHandle(t, B);
|
|
3781
|
+
const [w, F] = n.useState(h), A = N !== void 0, T = A ? N : w, x = n.useCallback(
|
|
3782
|
+
(k) => {
|
|
3783
|
+
let u = k.value;
|
|
3784
|
+
!A && !d && F(u), V && !d && J(
|
|
3785
|
+
V,
|
|
3786
|
+
k.syntheticEvent,
|
|
3787
|
+
B(),
|
|
3788
|
+
{ value: u }
|
|
3789
3789
|
);
|
|
3790
3790
|
},
|
|
3791
|
-
[F,
|
|
3792
|
-
),
|
|
3793
|
-
(
|
|
3794
|
-
S && !d &&
|
|
3791
|
+
[F, V, d]
|
|
3792
|
+
), L = n.useCallback(
|
|
3793
|
+
(k) => {
|
|
3794
|
+
S && !d && J(
|
|
3795
3795
|
S,
|
|
3796
|
-
|
|
3797
|
-
|
|
3796
|
+
k.syntheticEvent,
|
|
3797
|
+
B(),
|
|
3798
3798
|
void 0
|
|
3799
3799
|
);
|
|
3800
3800
|
},
|
|
3801
3801
|
[S, d]
|
|
3802
|
-
),
|
|
3802
|
+
), $ = Qe(), U = G(
|
|
3803
3803
|
"k-radio-list",
|
|
3804
3804
|
{
|
|
3805
3805
|
"k-list-horizontal": f === "horizontal",
|
|
3806
3806
|
"k-list-vertical": f === "vertical" || f === void 0
|
|
3807
3807
|
},
|
|
3808
3808
|
c
|
|
3809
|
-
),
|
|
3810
|
-
const
|
|
3811
|
-
...
|
|
3812
|
-
valid:
|
|
3813
|
-
checked:
|
|
3814
|
-
disabled: !!(
|
|
3815
|
-
labelPlacement:
|
|
3816
|
-
tabIndex:
|
|
3817
|
-
index:
|
|
3818
|
-
name:
|
|
3819
|
-
onChange:
|
|
3820
|
-
onFocus:
|
|
3809
|
+
), Q = Bn(I, e.dir), g = o && o.map((k, u) => {
|
|
3810
|
+
const y = T === k.value, E = T == null, D = {
|
|
3811
|
+
...k,
|
|
3812
|
+
valid: P,
|
|
3813
|
+
checked: y,
|
|
3814
|
+
disabled: !!(k.disabled || d),
|
|
3815
|
+
labelPlacement: k.labelPlacement ? k.labelPlacement : m,
|
|
3816
|
+
tabIndex: k.tabIndex ? k.tabIndex : E && u === 0 || y ? 0 : -1,
|
|
3817
|
+
index: u,
|
|
3818
|
+
name: p || $,
|
|
3819
|
+
onChange: x,
|
|
3820
|
+
onFocus: L
|
|
3821
3821
|
};
|
|
3822
3822
|
return /* @__PURE__ */ n.createElement(
|
|
3823
|
-
|
|
3823
|
+
M,
|
|
3824
3824
|
{
|
|
3825
|
-
className: G("k-radio-item", { "k-disabled":
|
|
3826
|
-
key:
|
|
3825
|
+
className: G("k-radio-item", { "k-disabled": D.disabled || d }),
|
|
3826
|
+
key: u,
|
|
3827
3827
|
role: "none"
|
|
3828
3828
|
},
|
|
3829
|
-
/* @__PURE__ */ n.createElement(xt, { ...
|
|
3829
|
+
/* @__PURE__ */ n.createElement(xt, { ...D })
|
|
3830
3830
|
);
|
|
3831
3831
|
});
|
|
3832
3832
|
return /* @__PURE__ */ n.createElement(
|
|
@@ -3834,14 +3834,14 @@ const Qs = he(), Ca = n.forwardRef((a, t) => {
|
|
|
3834
3834
|
{
|
|
3835
3835
|
id: s,
|
|
3836
3836
|
role: "radiogroup",
|
|
3837
|
-
className:
|
|
3838
|
-
ref:
|
|
3839
|
-
dir:
|
|
3840
|
-
style:
|
|
3837
|
+
className: U,
|
|
3838
|
+
ref: I,
|
|
3839
|
+
dir: Q,
|
|
3840
|
+
style: v,
|
|
3841
3841
|
"aria-labelledby": i,
|
|
3842
3842
|
"aria-describedby": l
|
|
3843
3843
|
},
|
|
3844
|
-
|
|
3844
|
+
g
|
|
3845
3845
|
);
|
|
3846
3846
|
}), In = {
|
|
3847
3847
|
item: (a) => /* @__PURE__ */ n.createElement("li", { ...a })
|
|
@@ -3864,126 +3864,128 @@ Ca.propTypes = {
|
|
|
3864
3864
|
};
|
|
3865
3865
|
Ca.defaultProps = In;
|
|
3866
3866
|
Ca.displayName = "KendoRadioGroup";
|
|
3867
|
-
const er =
|
|
3867
|
+
const er = pe(), xa = n.forwardRef((a, t) => {
|
|
3868
3868
|
const e = Re(er, a), {
|
|
3869
3869
|
size: s,
|
|
3870
3870
|
rounded: i,
|
|
3871
3871
|
fillMode: l,
|
|
3872
|
-
|
|
3873
|
-
|
|
3872
|
+
prefix: c = n.Fragment,
|
|
3873
|
+
suffix: o = n.Fragment,
|
|
3874
|
+
ariaDescribedBy: h,
|
|
3875
|
+
ariaLabelledBy: d,
|
|
3874
3876
|
autoSize: p,
|
|
3875
|
-
className:
|
|
3876
|
-
defaultValue:
|
|
3877
|
-
disabled:
|
|
3878
|
-
readOnly:
|
|
3879
|
-
required:
|
|
3880
|
-
rows:
|
|
3881
|
-
id:
|
|
3882
|
-
name:
|
|
3883
|
-
placeholder:
|
|
3884
|
-
style:
|
|
3885
|
-
tabIndex:
|
|
3886
|
-
value:
|
|
3887
|
-
valid:
|
|
3888
|
-
validationMessage:
|
|
3889
|
-
validityStyles:
|
|
3890
|
-
onChange:
|
|
3891
|
-
onFocus:
|
|
3892
|
-
onBlur:
|
|
3877
|
+
className: m,
|
|
3878
|
+
defaultValue: f,
|
|
3879
|
+
disabled: v,
|
|
3880
|
+
readOnly: N,
|
|
3881
|
+
required: P,
|
|
3882
|
+
rows: M,
|
|
3883
|
+
id: V,
|
|
3884
|
+
name: S,
|
|
3885
|
+
placeholder: I,
|
|
3886
|
+
style: O,
|
|
3887
|
+
tabIndex: B,
|
|
3888
|
+
value: w,
|
|
3889
|
+
valid: F,
|
|
3890
|
+
validationMessage: A,
|
|
3891
|
+
validityStyles: T,
|
|
3892
|
+
onChange: x,
|
|
3893
|
+
onFocus: L,
|
|
3894
|
+
onBlur: $,
|
|
3893
3895
|
// Removed to support direct use in Form Field component
|
|
3894
|
-
visited:
|
|
3895
|
-
touched:
|
|
3896
|
-
modified:
|
|
3897
|
-
...
|
|
3898
|
-
} = e,
|
|
3896
|
+
visited: U,
|
|
3897
|
+
touched: Q,
|
|
3898
|
+
modified: g,
|
|
3899
|
+
...k
|
|
3900
|
+
} = e, u = n.useRef(null), y = n.useCallback(
|
|
3899
3901
|
() => {
|
|
3900
|
-
|
|
3902
|
+
u.current && u.current.focus();
|
|
3901
3903
|
},
|
|
3902
3904
|
[]
|
|
3903
|
-
), [
|
|
3905
|
+
), [E, D] = n.useState(f), [ee] = Be(c), [Y] = Be(o), R = w !== void 0, b = R ? w : E, K = n.useCallback(
|
|
3904
3906
|
() => ({
|
|
3905
|
-
element:
|
|
3906
|
-
focus:
|
|
3907
|
+
element: u,
|
|
3908
|
+
focus: y,
|
|
3907
3909
|
get value() {
|
|
3908
|
-
return
|
|
3910
|
+
return b;
|
|
3909
3911
|
},
|
|
3910
3912
|
get name() {
|
|
3911
|
-
return
|
|
3913
|
+
return u.current && u.current.name;
|
|
3912
3914
|
}
|
|
3913
3915
|
}),
|
|
3914
|
-
[
|
|
3916
|
+
[y, b]
|
|
3915
3917
|
);
|
|
3916
|
-
n.useImperativeHandle(t,
|
|
3917
|
-
const [
|
|
3918
|
+
n.useImperativeHandle(t, K);
|
|
3919
|
+
const [q, Z] = n.useState("auto"), ce = Qe(), xe = He(u, e.dir), re = F !== void 0 ? F : P ? !!b : !0;
|
|
3918
3920
|
n.useEffect(
|
|
3919
3921
|
() => {
|
|
3920
|
-
|
|
3921
|
-
|
|
3922
|
+
u.current && u.current.setCustomValidity && u.current.setCustomValidity(
|
|
3923
|
+
re ? "" : A || ""
|
|
3922
3924
|
);
|
|
3923
3925
|
},
|
|
3924
|
-
[
|
|
3926
|
+
[re, A]
|
|
3925
3927
|
), n.useLayoutEffect(
|
|
3926
3928
|
() => {
|
|
3927
|
-
|
|
3929
|
+
u.current && Z(`${u.current.scrollHeight}px`);
|
|
3928
3930
|
},
|
|
3929
|
-
[
|
|
3931
|
+
[b]
|
|
3930
3932
|
);
|
|
3931
|
-
const
|
|
3932
|
-
(
|
|
3933
|
-
const
|
|
3934
|
-
|
|
3935
|
-
|
|
3936
|
-
|
|
3933
|
+
const Ee = n.useCallback(
|
|
3934
|
+
(ae) => {
|
|
3935
|
+
const ie = ae.target.value;
|
|
3936
|
+
Z("auto"), !R && !v && D(ie), x && !v && J(
|
|
3937
|
+
x,
|
|
3938
|
+
ae,
|
|
3937
3939
|
{
|
|
3938
|
-
...
|
|
3939
|
-
value:
|
|
3940
|
+
...K(),
|
|
3941
|
+
value: ie
|
|
3940
3942
|
},
|
|
3941
|
-
{ value:
|
|
3943
|
+
{ value: ie }
|
|
3942
3944
|
);
|
|
3943
3945
|
},
|
|
3944
|
-
[
|
|
3945
|
-
),
|
|
3946
|
-
(
|
|
3947
|
-
|
|
3948
|
-
|
|
3949
|
-
|
|
3950
|
-
|
|
3946
|
+
[D, x, v, R]
|
|
3947
|
+
), Ce = n.useCallback(
|
|
3948
|
+
(ae) => {
|
|
3949
|
+
L && !v && J(
|
|
3950
|
+
L,
|
|
3951
|
+
ae,
|
|
3952
|
+
K(),
|
|
3951
3953
|
void 0
|
|
3952
3954
|
);
|
|
3953
3955
|
},
|
|
3954
|
-
[
|
|
3955
|
-
),
|
|
3956
|
-
(
|
|
3957
|
-
|
|
3958
|
-
|
|
3959
|
-
|
|
3960
|
-
|
|
3956
|
+
[L, v]
|
|
3957
|
+
), Ve = n.useCallback(
|
|
3958
|
+
(ae) => {
|
|
3959
|
+
$ && !v && J(
|
|
3960
|
+
$,
|
|
3961
|
+
ae,
|
|
3962
|
+
K(),
|
|
3961
3963
|
void 0
|
|
3962
3964
|
);
|
|
3963
3965
|
},
|
|
3964
|
-
[
|
|
3965
|
-
),
|
|
3966
|
-
id:
|
|
3966
|
+
[$, v]
|
|
3967
|
+
), z = {
|
|
3968
|
+
id: V || ce,
|
|
3967
3969
|
role: "textbox",
|
|
3968
|
-
name:
|
|
3970
|
+
name: S,
|
|
3969
3971
|
className: "k-input-inner !k-overflow-auto",
|
|
3970
|
-
ref:
|
|
3971
|
-
disabled:
|
|
3972
|
-
rows:
|
|
3973
|
-
placeholder:
|
|
3974
|
-
readOnly:
|
|
3975
|
-
required:
|
|
3976
|
-
tabIndex:
|
|
3977
|
-
style: p ? { resize: "none", overflow: "hidden", height:
|
|
3978
|
-
"aria-labelledby":
|
|
3979
|
-
"aria-describedby":
|
|
3972
|
+
ref: u,
|
|
3973
|
+
disabled: v,
|
|
3974
|
+
rows: M,
|
|
3975
|
+
placeholder: I,
|
|
3976
|
+
readOnly: N,
|
|
3977
|
+
required: P,
|
|
3978
|
+
tabIndex: oe(B, v),
|
|
3979
|
+
style: p ? { resize: "none", overflow: "hidden", height: q } : {},
|
|
3980
|
+
"aria-labelledby": d,
|
|
3981
|
+
"aria-describedby": h,
|
|
3980
3982
|
"aria-multiline": !0,
|
|
3981
|
-
"aria-disabled":
|
|
3982
|
-
value:
|
|
3983
|
-
...
|
|
3984
|
-
onChange:
|
|
3985
|
-
onFocus:
|
|
3986
|
-
onBlur:
|
|
3983
|
+
"aria-disabled": v || void 0,
|
|
3984
|
+
value: R ? w : E,
|
|
3985
|
+
...k,
|
|
3986
|
+
onChange: Ee,
|
|
3987
|
+
onFocus: Ce,
|
|
3988
|
+
onBlur: Ve
|
|
3987
3989
|
};
|
|
3988
3990
|
return /* @__PURE__ */ n.createElement(
|
|
3989
3991
|
"span",
|
|
@@ -3992,19 +3994,21 @@ const er = he(), xa = n.forwardRef((a, t) => {
|
|
|
3992
3994
|
"k-input",
|
|
3993
3995
|
"k-textarea",
|
|
3994
3996
|
{
|
|
3995
|
-
[`k-input-${
|
|
3997
|
+
[`k-input-${se.sizeMap[s] || s}`]: s,
|
|
3996
3998
|
[`k-input-${l}`]: l,
|
|
3997
|
-
[`k-rounded-${
|
|
3998
|
-
"k-invalid": !(
|
|
3999
|
-
"k-required":
|
|
4000
|
-
"k-disabled":
|
|
3999
|
+
[`k-rounded-${se.roundedMap[i] || i}`]: i,
|
|
4000
|
+
"k-invalid": !(re || T !== void 0 || T === !0),
|
|
4001
|
+
"k-required": P,
|
|
4002
|
+
"k-disabled": v
|
|
4001
4003
|
},
|
|
4002
|
-
|
|
4004
|
+
m
|
|
4003
4005
|
),
|
|
4004
|
-
style:
|
|
4005
|
-
dir:
|
|
4006
|
+
style: O,
|
|
4007
|
+
dir: xe
|
|
4006
4008
|
},
|
|
4007
|
-
/* @__PURE__ */ n.createElement(
|
|
4009
|
+
/* @__PURE__ */ n.createElement(ee, null),
|
|
4010
|
+
/* @__PURE__ */ n.createElement("textarea", { ...z }),
|
|
4011
|
+
/* @__PURE__ */ n.createElement(Y, null)
|
|
4008
4012
|
);
|
|
4009
4013
|
});
|
|
4010
4014
|
xa.propTypes = {
|
|
@@ -4042,7 +4046,7 @@ const tr = {
|
|
|
4042
4046
|
xa.displayName = "KendoTextArea";
|
|
4043
4047
|
xa.defaultProps = tr;
|
|
4044
4048
|
const Et = n.forwardRef((a, t) => {
|
|
4045
|
-
const e = n.useRef(null), s = n.useRef(null), i =
|
|
4049
|
+
const e = n.useRef(null), s = n.useRef(null), i = He(s, a.dir);
|
|
4046
4050
|
n.useImperativeHandle(e, () => ({
|
|
4047
4051
|
element: s.current,
|
|
4048
4052
|
props: a,
|
|
@@ -4082,7 +4086,7 @@ const Et = n.forwardRef((a, t) => {
|
|
|
4082
4086
|
);
|
|
4083
4087
|
},
|
|
4084
4088
|
[a.onFocus]
|
|
4085
|
-
),
|
|
4089
|
+
), h = n.useCallback(
|
|
4086
4090
|
(f) => {
|
|
4087
4091
|
a.onBlur && a.onBlur.call(
|
|
4088
4092
|
void 0,
|
|
@@ -4104,7 +4108,7 @@ const Et = n.forwardRef((a, t) => {
|
|
|
4104
4108
|
);
|
|
4105
4109
|
},
|
|
4106
4110
|
[a.onMouseMove]
|
|
4107
|
-
),
|
|
4111
|
+
), p = n.useCallback(
|
|
4108
4112
|
(f) => {
|
|
4109
4113
|
a.onMouseEnter && a.onMouseEnter.call(
|
|
4110
4114
|
void 0,
|
|
@@ -4115,7 +4119,7 @@ const Et = n.forwardRef((a, t) => {
|
|
|
4115
4119
|
);
|
|
4116
4120
|
},
|
|
4117
4121
|
[a.onMouseEnter]
|
|
4118
|
-
),
|
|
4122
|
+
), m = n.useCallback(
|
|
4119
4123
|
(f) => {
|
|
4120
4124
|
a.onMouseLeave && a.onMouseLeave.call(
|
|
4121
4125
|
void 0,
|
|
@@ -4149,9 +4153,9 @@ const Et = n.forwardRef((a, t) => {
|
|
|
4149
4153
|
onClick: l,
|
|
4150
4154
|
onKeyDown: c,
|
|
4151
4155
|
onFocus: o,
|
|
4152
|
-
onBlur:
|
|
4153
|
-
onMouseEnter:
|
|
4154
|
-
onMouseLeave:
|
|
4156
|
+
onBlur: h,
|
|
4157
|
+
onMouseEnter: p,
|
|
4158
|
+
onMouseLeave: m,
|
|
4155
4159
|
onMouseMove: d
|
|
4156
4160
|
},
|
|
4157
4161
|
a.children
|
|
@@ -4171,29 +4175,29 @@ const Et = n.forwardRef((a, t) => {
|
|
|
4171
4175
|
Et.displayName = "KendoReactRatingItem";
|
|
4172
4176
|
Et.propTypes = ar;
|
|
4173
4177
|
Et.defaultProps = nr;
|
|
4174
|
-
const
|
|
4178
|
+
const ke = (a, t) => {
|
|
4175
4179
|
if (a % 1) {
|
|
4176
4180
|
const e = Math.pow(10, (t.toString().split(".")[1] || t.toString().split(".")[0]).length);
|
|
4177
4181
|
return Math.round(a * e) / e;
|
|
4178
4182
|
}
|
|
4179
4183
|
return a;
|
|
4180
|
-
}, 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) => ke(a - e, e) < t && t < a, Tt = (a, t, e, s) => t === null ? !1 : s === "continues" ? da(a, t, e) ? ke(a - e / 2, e / 2) <= t : a <= t : s === "single" ? da(a, t, e) ? ke(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) => {
|
|
4181
4185
|
for (let i = a; i <= t; i += e)
|
|
4182
4186
|
if (s === i)
|
|
4183
4187
|
return !0;
|
|
4184
4188
|
return !1;
|
|
4185
4189
|
};
|
|
4186
|
-
var
|
|
4190
|
+
var ue = /* @__PURE__ */ ((a) => (a.select = "select", a.deselect = "deselect", a.increase = "increase", a.decrease = "decrease", a.min = "min", a.max = "max", a.reset = "reset", a))(ue || {});
|
|
4187
4191
|
const rr = (a, t) => {
|
|
4188
4192
|
switch (t.type) {
|
|
4189
4193
|
case "select":
|
|
4190
|
-
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 ? ke(t.payload, t.step) : t.max : t.min;
|
|
4191
4195
|
case "deselect":
|
|
4192
4196
|
return null;
|
|
4193
4197
|
case "increase":
|
|
4194
|
-
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 ? ke(a + t.step, t.step) : t.max;
|
|
4195
4199
|
case "decrease":
|
|
4196
|
-
return t.step === void 0 ? a :
|
|
4200
|
+
return t.step === void 0 ? a : ke(a - t.step, t.step) >= t.min ? ke(a - t.step, t.step) : t.min;
|
|
4197
4201
|
case "min":
|
|
4198
4202
|
return t.step === void 0 ? a : t.min;
|
|
4199
4203
|
case "max":
|
|
@@ -4209,204 +4213,204 @@ const rr = (a, t) => {
|
|
|
4209
4213
|
const o = rr(t.state || s, { ...c, ...t });
|
|
4210
4214
|
e && e(o, c.event), i(o);
|
|
4211
4215
|
}];
|
|
4212
|
-
}, ir =
|
|
4213
|
-
const e = Re(ir, a), s =
|
|
4216
|
+
}, ir = pe(), Ea = n.forwardRef((a, t) => {
|
|
4217
|
+
const e = Re(ir, a), s = $e(), i = n.useRef(null), l = n.useRef(null), c = He(l, e.dir);
|
|
4214
4218
|
n.useImperativeHandle(i, () => ({
|
|
4215
4219
|
element: l.current,
|
|
4216
4220
|
props: e
|
|
4217
4221
|
})), n.useImperativeHandle(t, () => i.current);
|
|
4218
4222
|
const o = n.useCallback(
|
|
4219
|
-
(
|
|
4223
|
+
(g, k) => {
|
|
4220
4224
|
e.onChange && i.current && e.onChange.call(void 0, {
|
|
4221
|
-
value:
|
|
4225
|
+
value: g,
|
|
4222
4226
|
target: i.current,
|
|
4223
|
-
syntheticEvent:
|
|
4227
|
+
syntheticEvent: k
|
|
4224
4228
|
});
|
|
4225
4229
|
},
|
|
4226
4230
|
[e.onChange]
|
|
4227
|
-
),
|
|
4231
|
+
), h = n.useMemo(
|
|
4228
4232
|
() => e.min !== void 0 ? e.min : Ie.min,
|
|
4229
4233
|
[e.min]
|
|
4230
4234
|
), d = n.useMemo(
|
|
4231
4235
|
() => e.max !== void 0 ? e.max : Ie.max,
|
|
4232
4236
|
[e.max]
|
|
4233
|
-
),
|
|
4237
|
+
), p = n.useMemo(
|
|
4234
4238
|
() => e.precision || Ie.precision,
|
|
4235
4239
|
[e.precision]
|
|
4236
|
-
),
|
|
4240
|
+
), m = n.useMemo(
|
|
4237
4241
|
() => e.step !== void 0 ? e.step : Ie.step,
|
|
4238
4242
|
[e.step]
|
|
4239
4243
|
), f = n.useMemo(
|
|
4240
4244
|
() => e.readonly || Ie.readonly,
|
|
4241
4245
|
[e.readonly]
|
|
4242
|
-
),
|
|
4246
|
+
), v = n.useMemo(
|
|
4243
4247
|
() => e.disabled || Ie.disabled,
|
|
4244
4248
|
[e.disabled]
|
|
4245
4249
|
), N = n.useMemo(
|
|
4246
4250
|
() => e.item || Ie.item,
|
|
4247
4251
|
[e.item]
|
|
4248
|
-
), [
|
|
4252
|
+
), [P, M] = Ja(
|
|
4249
4253
|
e.defaultValue !== void 0 ? e.defaultValue : Ie.defaultValue,
|
|
4250
4254
|
{
|
|
4251
4255
|
state: e.value,
|
|
4252
|
-
min:
|
|
4256
|
+
min: h,
|
|
4253
4257
|
max: d,
|
|
4254
|
-
step:
|
|
4258
|
+
step: p === "half" ? m / 2 : m
|
|
4255
4259
|
},
|
|
4256
4260
|
o
|
|
4257
|
-
), [
|
|
4261
|
+
), [V, S] = Ja(
|
|
4258
4262
|
null,
|
|
4259
4263
|
{
|
|
4260
4264
|
state: e.value,
|
|
4261
|
-
min:
|
|
4265
|
+
min: h,
|
|
4262
4266
|
max: d,
|
|
4263
|
-
step:
|
|
4264
|
-
precision:
|
|
4267
|
+
step: p === "half" ? m / 2 : m,
|
|
4268
|
+
precision: p
|
|
4265
4269
|
}
|
|
4266
|
-
),
|
|
4267
|
-
() => e.value !== void 0 ? e.value :
|
|
4268
|
-
[e.value,
|
|
4269
|
-
), B = n.useMemo(
|
|
4270
|
-
() => L,
|
|
4271
|
-
[L]
|
|
4270
|
+
), I = n.useMemo(
|
|
4271
|
+
() => e.value !== void 0 ? e.value : P,
|
|
4272
|
+
[e.value, P]
|
|
4272
4273
|
), O = n.useMemo(
|
|
4274
|
+
() => V,
|
|
4275
|
+
[V]
|
|
4276
|
+
), B = n.useMemo(
|
|
4273
4277
|
() => e.selection || Ie.selection,
|
|
4274
4278
|
[e.selection]
|
|
4275
|
-
),
|
|
4276
|
-
() =>
|
|
4277
|
-
[
|
|
4279
|
+
), w = n.useMemo(
|
|
4280
|
+
() => m / (p === "half" ? 2 : 1),
|
|
4281
|
+
[m, p]
|
|
4278
4282
|
), F = n.useCallback(
|
|
4279
|
-
(
|
|
4280
|
-
if (!(!
|
|
4281
|
-
if (
|
|
4282
|
-
const
|
|
4283
|
-
|
|
4283
|
+
(g) => {
|
|
4284
|
+
if (!(!g.target || !g.target.element || f || v)) {
|
|
4285
|
+
if (p === "half") {
|
|
4286
|
+
const k = g.target.element.getBoundingClientRect(), y = Ya(c || "ltr", k, g.syntheticEvent.clientX) ? ke(g.target.value - m / 2, w) : g.target.value;
|
|
4287
|
+
M({ type: ue.select, payload: y, event: g.syntheticEvent });
|
|
4284
4288
|
} else
|
|
4285
|
-
|
|
4289
|
+
M({ type: ue.select, payload: g.target.value, event: g.syntheticEvent });
|
|
4286
4290
|
if (e.onClick) {
|
|
4287
|
-
const
|
|
4288
|
-
value:
|
|
4291
|
+
const k = {
|
|
4292
|
+
value: I,
|
|
4289
4293
|
target: i.current,
|
|
4290
|
-
syntheticEvent:
|
|
4294
|
+
syntheticEvent: g.syntheticEvent
|
|
4291
4295
|
};
|
|
4292
|
-
e.onClick.call(void 0,
|
|
4296
|
+
e.onClick.call(void 0, k);
|
|
4293
4297
|
}
|
|
4294
4298
|
}
|
|
4295
4299
|
},
|
|
4296
|
-
[e.onClick,
|
|
4297
|
-
),
|
|
4298
|
-
(
|
|
4299
|
-
if (!(f ||
|
|
4300
|
-
switch (
|
|
4301
|
-
case
|
|
4302
|
-
|
|
4303
|
-
type: c === "rtl" ?
|
|
4304
|
-
event:
|
|
4300
|
+
[e.onClick, M, I]
|
|
4301
|
+
), A = n.useCallback(
|
|
4302
|
+
(g) => {
|
|
4303
|
+
if (!(f || v)) {
|
|
4304
|
+
switch (g.keyCode) {
|
|
4305
|
+
case _.right:
|
|
4306
|
+
g.preventDefault(), M({
|
|
4307
|
+
type: c === "rtl" ? ue.decrease : ue.increase,
|
|
4308
|
+
event: g
|
|
4305
4309
|
});
|
|
4306
4310
|
break;
|
|
4307
|
-
case
|
|
4308
|
-
|
|
4309
|
-
type: c === "rtl" ?
|
|
4310
|
-
event:
|
|
4311
|
+
case _.left:
|
|
4312
|
+
g.preventDefault(), M({
|
|
4313
|
+
type: c === "rtl" ? ue.increase : ue.decrease,
|
|
4314
|
+
event: g
|
|
4311
4315
|
});
|
|
4312
4316
|
break;
|
|
4313
|
-
case
|
|
4314
|
-
|
|
4315
|
-
type: c === "rtl" ?
|
|
4316
|
-
event:
|
|
4317
|
+
case _.home:
|
|
4318
|
+
g.preventDefault(), M({
|
|
4319
|
+
type: c === "rtl" ? ue.min : ue.max,
|
|
4320
|
+
event: g
|
|
4317
4321
|
});
|
|
4318
4322
|
break;
|
|
4319
|
-
case
|
|
4320
|
-
|
|
4321
|
-
type: c === "rtl" ?
|
|
4322
|
-
event:
|
|
4323
|
+
case _.end:
|
|
4324
|
+
g.preventDefault(), M({
|
|
4325
|
+
type: c === "rtl" ? ue.max : ue.min,
|
|
4326
|
+
event: g
|
|
4323
4327
|
});
|
|
4324
4328
|
break;
|
|
4325
|
-
case
|
|
4326
|
-
|
|
4327
|
-
type:
|
|
4328
|
-
event:
|
|
4329
|
+
case _.esc:
|
|
4330
|
+
g.preventDefault(), M({
|
|
4331
|
+
type: ue.deselect,
|
|
4332
|
+
event: g
|
|
4329
4333
|
});
|
|
4330
4334
|
break;
|
|
4331
4335
|
}
|
|
4332
4336
|
e.onKeyDown && e.onKeyDown.call(
|
|
4333
4337
|
void 0,
|
|
4334
4338
|
{
|
|
4335
|
-
value:
|
|
4339
|
+
value: I,
|
|
4336
4340
|
target: i.current,
|
|
4337
|
-
syntheticEvent:
|
|
4341
|
+
syntheticEvent: g
|
|
4338
4342
|
}
|
|
4339
4343
|
);
|
|
4340
4344
|
}
|
|
4341
4345
|
},
|
|
4342
|
-
[e.onKeyDown,
|
|
4346
|
+
[e.onKeyDown, M, I]
|
|
4343
4347
|
), T = n.useCallback(
|
|
4344
|
-
(
|
|
4348
|
+
(g) => {
|
|
4345
4349
|
if (e.onFocus) {
|
|
4346
|
-
const
|
|
4350
|
+
const k = {
|
|
4347
4351
|
target: i.current,
|
|
4348
|
-
syntheticEvent:
|
|
4352
|
+
syntheticEvent: g
|
|
4349
4353
|
};
|
|
4350
4354
|
e.onFocus.call(
|
|
4351
4355
|
void 0,
|
|
4352
|
-
|
|
4356
|
+
k
|
|
4353
4357
|
);
|
|
4354
4358
|
}
|
|
4355
4359
|
},
|
|
4356
4360
|
[e.onFocus]
|
|
4357
|
-
),
|
|
4358
|
-
(
|
|
4361
|
+
), x = n.useCallback(
|
|
4362
|
+
(g) => {
|
|
4359
4363
|
if (e.onBlur) {
|
|
4360
|
-
const
|
|
4364
|
+
const k = {
|
|
4361
4365
|
target: i.current,
|
|
4362
|
-
syntheticEvent:
|
|
4366
|
+
syntheticEvent: g
|
|
4363
4367
|
};
|
|
4364
4368
|
e.onBlur.call(
|
|
4365
4369
|
void 0,
|
|
4366
|
-
|
|
4370
|
+
k
|
|
4367
4371
|
);
|
|
4368
4372
|
}
|
|
4369
4373
|
},
|
|
4370
4374
|
[e.onBlur]
|
|
4371
|
-
),
|
|
4372
|
-
(
|
|
4373
|
-
if (!(!
|
|
4374
|
-
if (
|
|
4375
|
-
const
|
|
4376
|
-
S({ type:
|
|
4375
|
+
), L = n.useCallback(
|
|
4376
|
+
(g) => {
|
|
4377
|
+
if (!(!g.target || !g.target.element))
|
|
4378
|
+
if (p === "half") {
|
|
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: ue.select, payload: y, event: g.syntheticEvent });
|
|
4377
4381
|
} else
|
|
4378
|
-
S({ type:
|
|
4382
|
+
S({ type: ue.select, payload: g.target.value, event: g.syntheticEvent });
|
|
4379
4383
|
},
|
|
4380
|
-
[
|
|
4381
|
-
),
|
|
4382
|
-
(
|
|
4383
|
-
S({ type:
|
|
4384
|
+
[p, m, c]
|
|
4385
|
+
), $ = n.useCallback(
|
|
4386
|
+
(g) => {
|
|
4387
|
+
S({ type: ue.reset, event: g.syntheticEvent });
|
|
4384
4388
|
},
|
|
4385
4389
|
[]
|
|
4386
|
-
),
|
|
4387
|
-
for (let
|
|
4388
|
-
const
|
|
4389
|
-
|
|
4390
|
+
), U = [], Q = sr(ke(d - h, w), m);
|
|
4391
|
+
for (let g = h; g <= d; g = ke(g + m, w)) {
|
|
4392
|
+
const k = ke(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
|
+
U.push(
|
|
4390
4394
|
/* @__PURE__ */ n.createElement(
|
|
4391
4395
|
N,
|
|
4392
4396
|
{
|
|
4393
|
-
key:
|
|
4394
|
-
value:
|
|
4397
|
+
key: k,
|
|
4398
|
+
value: k,
|
|
4395
4399
|
dir: c,
|
|
4396
|
-
title: String(
|
|
4400
|
+
title: String(u ? ke(k - m / 2, w) : k),
|
|
4397
4401
|
icon: e.icon,
|
|
4398
4402
|
svgIcon: e.svgIcon,
|
|
4399
|
-
half:
|
|
4400
|
-
selected:
|
|
4401
|
-
hovered:
|
|
4403
|
+
half: u,
|
|
4404
|
+
selected: y || E,
|
|
4405
|
+
hovered: D,
|
|
4402
4406
|
onClick: F,
|
|
4403
|
-
onMouseMove:
|
|
4404
|
-
onMouseLeave:
|
|
4407
|
+
onMouseMove: L,
|
|
4408
|
+
onMouseLeave: $
|
|
4405
4409
|
},
|
|
4406
|
-
|
|
4407
|
-
|
|
4408
|
-
|
|
4409
|
-
!
|
|
4410
|
+
u && /* @__PURE__ */ n.createElement("span", { className: "k-rating-precision-complement" }, !(e.icon || e.svgIconOutline) && /* @__PURE__ */ n.createElement(he, { 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(he, { 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(he, { 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(he, { name: e.icon ? Vt(e.icon) : void 0, icon: e.svgIcon, size: "xlarge" })),
|
|
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(he, { name: "star", icon: Va, size: "xlarge" }) || !(e.icon || e.svgIcon) && !D && !E && /* @__PURE__ */ n.createElement(he, { name: "star-outline", icon: Ra, size: "xlarge" }) || (e.icon || e.svgIcon) && (D || E && !D) && /* @__PURE__ */ n.createElement(he, { name: e.icon, icon: e.svgIcon, size: "xlarge" }) || (e.icon || e.svgIcon) && !D && /* @__PURE__ */ n.createElement(he, { name: Vt(`${e.icon}-outline`), icon: e.svgIconOutline, size: "xlarge" })
|
|
4410
4414
|
)
|
|
4411
4415
|
);
|
|
4412
4416
|
}
|
|
@@ -4418,24 +4422,24 @@ const rr = (a, t) => {
|
|
|
4418
4422
|
ref: l,
|
|
4419
4423
|
role: "slider",
|
|
4420
4424
|
dir: c,
|
|
4421
|
-
tabIndex:
|
|
4425
|
+
tabIndex: oe(e.tabIndex, e.disabled, void 0),
|
|
4422
4426
|
className: G(
|
|
4423
4427
|
"k-rating",
|
|
4424
4428
|
{
|
|
4425
4429
|
"k-rtl": c === "rtl",
|
|
4426
4430
|
"k-readonly": f,
|
|
4427
|
-
"k-disabled":
|
|
4431
|
+
"k-disabled": v
|
|
4428
4432
|
},
|
|
4429
4433
|
e.className
|
|
4430
4434
|
),
|
|
4431
|
-
onKeyDown:
|
|
4435
|
+
onKeyDown: A,
|
|
4432
4436
|
onFocus: T,
|
|
4433
|
-
onBlur:
|
|
4434
|
-
"aria-valuemin":
|
|
4437
|
+
onBlur: x,
|
|
4438
|
+
"aria-valuemin": h,
|
|
4435
4439
|
"aria-valuemax": d,
|
|
4436
|
-
"aria-valuenow":
|
|
4437
|
-
"aria-disabled":
|
|
4438
|
-
"aria-label": s.toLanguageString(aa,
|
|
4440
|
+
"aria-valuenow": I !== null ? I : void 0,
|
|
4441
|
+
"aria-disabled": v ? "true" : void 0,
|
|
4442
|
+
"aria-label": s.toLanguageString(aa, H[aa]),
|
|
4439
4443
|
"aria-labelledby": e.ariaLabelledBy,
|
|
4440
4444
|
"aria-describedby": e.ariaDescribedBy
|
|
4441
4445
|
},
|
|
@@ -4445,7 +4449,7 @@ const rr = (a, t) => {
|
|
|
4445
4449
|
id: "rating",
|
|
4446
4450
|
className: "k-hidden",
|
|
4447
4451
|
readOnly: f,
|
|
4448
|
-
disabled:
|
|
4452
|
+
disabled: v
|
|
4449
4453
|
}
|
|
4450
4454
|
),
|
|
4451
4455
|
/* @__PURE__ */ n.createElement(
|
|
@@ -4453,7 +4457,7 @@ const rr = (a, t) => {
|
|
|
4453
4457
|
{
|
|
4454
4458
|
className: "k-rating-container"
|
|
4455
4459
|
},
|
|
4456
|
-
|
|
4460
|
+
U
|
|
4457
4461
|
),
|
|
4458
4462
|
e.label && /* @__PURE__ */ n.createElement(
|
|
4459
4463
|
"span",
|
|
@@ -4511,174 +4515,174 @@ function or(a, t) {
|
|
|
4511
4515
|
e = e.parentNode;
|
|
4512
4516
|
return !!e;
|
|
4513
4517
|
}
|
|
4514
|
-
const cr = 250, dr = 84, Ln = 3, Rn = 2, ur = "#000000", fr = "#ffffff", Qa = (a) => a !== void 0, hr =
|
|
4515
|
-
|
|
4516
|
-
const e = Re(hr, a), s =
|
|
4517
|
-
|
|
4518
|
-
},
|
|
4519
|
-
d == null || d.loadImage(
|
|
4518
|
+
const cr = 250, dr = 84, Ln = 3, Rn = 2, ur = "#000000", fr = "#ffffff", Qa = (a) => a !== void 0, hr = pe(), St = n.forwardRef((a, t) => {
|
|
4519
|
+
me(ge);
|
|
4520
|
+
const e = Re(hr, a), s = $e(), 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, M] = n.useState(), [V, 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
|
+
M(C), e.onChange && e.onChange({ value: C });
|
|
4522
|
+
}, E = (C) => {
|
|
4523
|
+
d == null || d.loadImage(C.value), y(C.value);
|
|
4520
4524
|
};
|
|
4521
4525
|
n.useEffect(() => {
|
|
4522
|
-
e.value !==
|
|
4526
|
+
e.value !== P && (M(e.value), d == null || d.loadImage(e.value));
|
|
4523
4527
|
}, [e.value]);
|
|
4524
|
-
const
|
|
4525
|
-
d == null || d.clear(),
|
|
4526
|
-
},
|
|
4527
|
-
(
|
|
4528
|
-
F ||
|
|
4528
|
+
const D = () => {
|
|
4529
|
+
d == null || d.clear(), y();
|
|
4530
|
+
}, ee = n.useCallback(
|
|
4531
|
+
(C) => {
|
|
4532
|
+
F || w(C);
|
|
4529
4533
|
},
|
|
4530
4534
|
[F]
|
|
4531
|
-
),
|
|
4532
|
-
var
|
|
4533
|
-
|
|
4535
|
+
), Y = (C) => {
|
|
4536
|
+
var j, de;
|
|
4537
|
+
Oe(C), (de = ((j = h.current) == null ? void 0 : j.element) || l.current) == null || de.focus();
|
|
4534
4538
|
}, R = n.useCallback(() => {
|
|
4535
|
-
let
|
|
4536
|
-
return !e.color && typeof document != "undefined" && i.current && (
|
|
4539
|
+
let C = ur;
|
|
4540
|
+
return !e.color && typeof document != "undefined" && i.current && (C = getComputedStyle(i.current).color), e.color || C;
|
|
4537
4541
|
}, [e.color]), b = n.useCallback(() => {
|
|
4538
|
-
let
|
|
4539
|
-
return !e.backgroundColor && typeof document != "undefined" && i.current && (
|
|
4540
|
-
}, [e.backgroundColor]),
|
|
4542
|
+
let C = fr;
|
|
4543
|
+
return !e.backgroundColor && typeof document != "undefined" && i.current && (C = getComputedStyle(i.current).backgroundColor), e.backgroundColor || C;
|
|
4544
|
+
}, [e.backgroundColor]), K = () => ({
|
|
4541
4545
|
scale: e.maximized ? e.popupScale : 1,
|
|
4542
4546
|
color: R(),
|
|
4543
4547
|
backgroundColor: b(),
|
|
4544
4548
|
strokeWidth: e.strokeWidth,
|
|
4545
4549
|
smooth: e.smooth,
|
|
4546
4550
|
readonly: e.readOnly
|
|
4547
|
-
}),
|
|
4548
|
-
const { width:
|
|
4551
|
+
}), q = async (C) => {
|
|
4552
|
+
const { width: j, height: de } = C;
|
|
4549
4553
|
return await (d == null ? void 0 : d.exportImage({
|
|
4550
|
-
width:
|
|
4551
|
-
height:
|
|
4554
|
+
width: j * u,
|
|
4555
|
+
height: de * u
|
|
4552
4556
|
}));
|
|
4553
4557
|
};
|
|
4554
4558
|
n.useEffect(() => {
|
|
4555
|
-
const
|
|
4556
|
-
return
|
|
4559
|
+
const C = l.current, j = new Hn(C, K());
|
|
4560
|
+
return O && j.loadImage(O), p(j), () => j.destroy();
|
|
4557
4561
|
}, []), n.useEffect(() => {
|
|
4558
4562
|
d == null || d.setOptions({
|
|
4559
|
-
onChange: async () =>
|
|
4563
|
+
onChange: async () => y(await q(tt())),
|
|
4560
4564
|
onDraw: () => N(!0),
|
|
4561
4565
|
onDrawEnd: () => N(!1)
|
|
4562
4566
|
});
|
|
4563
4567
|
}, [d]), n.useLayoutEffect(
|
|
4564
|
-
() => d == null ? void 0 : d.setOptions(
|
|
4568
|
+
() => d == null ? void 0 : d.setOptions(K()),
|
|
4565
4569
|
[e.readOnly, e.color, e.backgroundColor, e.strokeWidth, e.smooth]
|
|
4566
4570
|
), n.useEffect(() => {
|
|
4567
|
-
var
|
|
4568
|
-
const
|
|
4569
|
-
if (!
|
|
4571
|
+
var de, Se;
|
|
4572
|
+
const C = (Se = (de = c.current) == null ? void 0 : de.element) == null ? void 0 : Se.querySelector(".k-overlay");
|
|
4573
|
+
if (!C)
|
|
4570
4574
|
return;
|
|
4571
|
-
const
|
|
4572
|
-
return
|
|
4573
|
-
}, [
|
|
4574
|
-
if (!
|
|
4575
|
+
const j = () => ee(!1);
|
|
4576
|
+
return C.addEventListener("click", j), () => C.removeEventListener("click", j);
|
|
4577
|
+
}, [A]), n.useEffect(() => {
|
|
4578
|
+
if (!A || typeof document == "undefined")
|
|
4575
4579
|
return;
|
|
4576
|
-
const
|
|
4577
|
-
|
|
4580
|
+
const C = (j) => {
|
|
4581
|
+
j.keyCode === _.esc && ee(!1);
|
|
4578
4582
|
};
|
|
4579
|
-
return document.addEventListener("keydown",
|
|
4580
|
-
}, [
|
|
4581
|
-
var
|
|
4582
|
-
e.maximized && ((
|
|
4583
|
+
return document.addEventListener("keydown", C), () => document.removeEventListener("keydown", C);
|
|
4584
|
+
}, [A]), n.useEffect(() => {
|
|
4585
|
+
var C, j;
|
|
4586
|
+
e.maximized && ((j = (C = o.current) == null ? void 0 : C.element) == null || j.focus());
|
|
4583
4587
|
}, []);
|
|
4584
|
-
const
|
|
4588
|
+
const Z = n.useCallback(
|
|
4585
4589
|
() => {
|
|
4586
|
-
var
|
|
4587
|
-
return (
|
|
4590
|
+
var C;
|
|
4591
|
+
return (C = l.current) == null ? void 0 : C.focus();
|
|
4588
4592
|
},
|
|
4589
4593
|
[]
|
|
4590
|
-
),
|
|
4594
|
+
), ce = n.useCallback(
|
|
4591
4595
|
() => e.value,
|
|
4592
4596
|
[e.value]
|
|
4593
|
-
),
|
|
4597
|
+
), xe = n.useCallback(
|
|
4594
4598
|
() => e.name,
|
|
4595
4599
|
[e.name]
|
|
4596
|
-
),
|
|
4600
|
+
), re = n.useCallback(
|
|
4597
4601
|
() => e.required,
|
|
4598
4602
|
[e.required]
|
|
4599
|
-
),
|
|
4603
|
+
), Ee = n.useCallback(
|
|
4600
4604
|
() => {
|
|
4601
|
-
const
|
|
4605
|
+
const C = e.validationMessage !== void 0, de = !ce(), Se = e.valid !== void 0 ? e.valid : !re() || !de;
|
|
4602
4606
|
return {
|
|
4603
|
-
customError:
|
|
4607
|
+
customError: C,
|
|
4604
4608
|
valid: Se,
|
|
4605
|
-
valueMissing:
|
|
4609
|
+
valueMissing: de
|
|
4606
4610
|
};
|
|
4607
4611
|
},
|
|
4608
|
-
[e.validationMessage, e.valid,
|
|
4609
|
-
),
|
|
4612
|
+
[e.validationMessage, e.valid, ce, re]
|
|
4613
|
+
), Ce = n.useCallback(
|
|
4610
4614
|
() => e.validityStyles,
|
|
4611
4615
|
[e.validityStyles]
|
|
4612
|
-
),
|
|
4616
|
+
), Ve = n.useCallback(
|
|
4613
4617
|
() => e,
|
|
4614
4618
|
[e]
|
|
4615
|
-
),
|
|
4619
|
+
), z = n.useCallback(
|
|
4616
4620
|
() => {
|
|
4617
|
-
const
|
|
4621
|
+
const C = {
|
|
4618
4622
|
element: i.current,
|
|
4619
|
-
focus:
|
|
4623
|
+
focus: Z
|
|
4620
4624
|
};
|
|
4621
|
-
return Object.defineProperty(
|
|
4625
|
+
return Object.defineProperty(C, "name", { get: xe }), Object.defineProperty(C, "value", { get: ce }), Object.defineProperty(C, "validity", { get: Ee }), Object.defineProperty(C, "validityStyles", { get: Ce }), Object.defineProperty(C, "required", { get: re }), Object.defineProperty(C, "props", { get: Ve }), Object.defineProperty(C, "color", { get: R }), Object.defineProperty(C, "backgroundColor", { get: b }), C;
|
|
4622
4626
|
},
|
|
4623
|
-
[
|
|
4627
|
+
[xe, ce, Ee, Ce, re, Z, Ve, R, b]
|
|
4624
4628
|
);
|
|
4625
|
-
n.useImperativeHandle(t,
|
|
4626
|
-
const
|
|
4627
|
-
(
|
|
4628
|
-
|
|
4629
|
+
n.useImperativeHandle(t, z);
|
|
4630
|
+
const ae = n.useCallback(
|
|
4631
|
+
(C) => {
|
|
4632
|
+
m || e.maximized || (f(!0), J(
|
|
4629
4633
|
e.onFocus,
|
|
4630
|
-
|
|
4631
|
-
|
|
4634
|
+
C,
|
|
4635
|
+
z(),
|
|
4632
4636
|
{}
|
|
4633
4637
|
));
|
|
4634
4638
|
},
|
|
4635
|
-
[
|
|
4636
|
-
),
|
|
4637
|
-
(
|
|
4638
|
-
or(
|
|
4639
|
+
[m, e.onFocus, z]
|
|
4640
|
+
), ie = n.useCallback(
|
|
4641
|
+
(C) => {
|
|
4642
|
+
or(C.relatedTarget, i.current) || (f(!1), J(
|
|
4639
4643
|
e.onBlur,
|
|
4640
|
-
|
|
4641
|
-
|
|
4644
|
+
C,
|
|
4645
|
+
z(),
|
|
4642
4646
|
{}
|
|
4643
4647
|
));
|
|
4644
4648
|
},
|
|
4645
|
-
[
|
|
4649
|
+
[m, e.onBlur, z]
|
|
4646
4650
|
), je = n.useCallback(
|
|
4647
|
-
async (
|
|
4648
|
-
S(await
|
|
4651
|
+
async (C) => {
|
|
4652
|
+
S(await q(at())), ee(!0), J(
|
|
4649
4653
|
e.onOpen,
|
|
4650
|
-
|
|
4651
|
-
|
|
4654
|
+
C,
|
|
4655
|
+
z(),
|
|
4652
4656
|
{}
|
|
4653
4657
|
);
|
|
4654
4658
|
},
|
|
4655
|
-
[
|
|
4656
|
-
),
|
|
4657
|
-
(
|
|
4658
|
-
|
|
4659
|
+
[A, F, e.onOpen, e.value, P, z]
|
|
4660
|
+
), Oe = n.useCallback(
|
|
4661
|
+
(C) => {
|
|
4662
|
+
ee(!1), J(
|
|
4659
4663
|
e.onClose,
|
|
4660
|
-
|
|
4661
|
-
|
|
4664
|
+
C,
|
|
4665
|
+
z(),
|
|
4662
4666
|
{}
|
|
4663
4667
|
);
|
|
4664
4668
|
},
|
|
4665
|
-
[
|
|
4669
|
+
[A, F, e.onClose, z]
|
|
4666
4670
|
), wt = () => {
|
|
4667
|
-
|
|
4671
|
+
D(), Z();
|
|
4668
4672
|
}, tt = () => {
|
|
4669
|
-
var
|
|
4670
|
-
const
|
|
4673
|
+
var de, Se;
|
|
4674
|
+
const C = e.width || ((de = i.current) == null ? void 0 : de.offsetWidth) || cr, j = e.height || ((Se = i.current) == null ? void 0 : Se.offsetHeight) || dr;
|
|
4671
4675
|
return {
|
|
4672
|
-
width:
|
|
4673
|
-
height:
|
|
4676
|
+
width: C,
|
|
4677
|
+
height: j
|
|
4674
4678
|
};
|
|
4675
4679
|
}, at = () => {
|
|
4676
|
-
const { width:
|
|
4680
|
+
const { width: C, height: j } = tt();
|
|
4677
4681
|
return {
|
|
4678
|
-
width:
|
|
4679
|
-
height:
|
|
4682
|
+
width: C * k,
|
|
4683
|
+
height: j * k
|
|
4680
4684
|
};
|
|
4681
|
-
}, It = !
|
|
4685
|
+
}, It = !Ce() || Ee().valid;
|
|
4682
4686
|
return /* @__PURE__ */ n.createElement(
|
|
4683
4687
|
"div",
|
|
4684
4688
|
{
|
|
@@ -4690,25 +4694,25 @@ const cr = 250, dr = 84, Ln = 3, Rn = 2, ur = "#000000", fr = "#ffffff", Qa = (a
|
|
|
4690
4694
|
"k-signature",
|
|
4691
4695
|
{
|
|
4692
4696
|
"k-signature-maximized": e.maximized,
|
|
4693
|
-
[`k-signature-${
|
|
4697
|
+
[`k-signature-${se.sizeMap[e.size] || e.size}`]: e.size,
|
|
4694
4698
|
[`k-input-${e.fillMode}`]: e.fillMode,
|
|
4695
|
-
[`k-rounded-${
|
|
4699
|
+
[`k-rounded-${se.roundedMap[e.rounded] || e.rounded}`]: e.rounded,
|
|
4696
4700
|
"k-invalid": !It,
|
|
4697
4701
|
"k-required": e.required,
|
|
4698
4702
|
"k-disabled": e.disabled,
|
|
4699
|
-
"k-focus":
|
|
4703
|
+
"k-focus": m
|
|
4700
4704
|
},
|
|
4701
4705
|
e.className
|
|
4702
4706
|
),
|
|
4703
|
-
onFocus:
|
|
4704
|
-
onBlur:
|
|
4707
|
+
onFocus: ae,
|
|
4708
|
+
onBlur: ie
|
|
4705
4709
|
},
|
|
4706
4710
|
/* @__PURE__ */ n.createElement(
|
|
4707
4711
|
"div",
|
|
4708
4712
|
{
|
|
4709
4713
|
className: "k-signature-canvas",
|
|
4710
4714
|
ref: l,
|
|
4711
|
-
tabIndex:
|
|
4715
|
+
tabIndex: oe(e.tabIndex, e.disabled),
|
|
4712
4716
|
role: "img",
|
|
4713
4717
|
id: e.id,
|
|
4714
4718
|
"aria-label": e.ariaLabel,
|
|
@@ -4718,21 +4722,21 @@ const cr = 250, dr = 84, Ln = 3, Rn = 2, ur = "#000000", fr = "#ffffff", Qa = (a
|
|
|
4718
4722
|
}
|
|
4719
4723
|
),
|
|
4720
4724
|
/* @__PURE__ */ n.createElement("div", { className: "k-signature-actions k-signature-actions-top" }, T && /* @__PURE__ */ n.createElement(
|
|
4721
|
-
|
|
4725
|
+
be,
|
|
4722
4726
|
{
|
|
4723
4727
|
type: "button",
|
|
4724
4728
|
className: "k-signature-action k-signature-maximize",
|
|
4725
|
-
ref:
|
|
4729
|
+
ref: h,
|
|
4726
4730
|
icon: "hyperlink-open",
|
|
4727
4731
|
svgIcon: Ma,
|
|
4728
4732
|
fillMode: "flat",
|
|
4729
4733
|
size: e.size,
|
|
4730
4734
|
onClick: je,
|
|
4731
|
-
"aria-label":
|
|
4732
|
-
title:
|
|
4735
|
+
"aria-label": U,
|
|
4736
|
+
title: U
|
|
4733
4737
|
}
|
|
4734
|
-
),
|
|
4735
|
-
|
|
4738
|
+
), x && /* @__PURE__ */ n.createElement(
|
|
4739
|
+
be,
|
|
4736
4740
|
{
|
|
4737
4741
|
type: "button",
|
|
4738
4742
|
className: "k-signature-action k-signature-minimize k-rotate-180",
|
|
@@ -4741,9 +4745,9 @@ const cr = 250, dr = 84, Ln = 3, Rn = 2, ur = "#000000", fr = "#ffffff", Qa = (a
|
|
|
4741
4745
|
svgIcon: Ma,
|
|
4742
4746
|
fillMode: "flat",
|
|
4743
4747
|
size: e.size,
|
|
4744
|
-
onClick:
|
|
4745
|
-
"aria-label":
|
|
4746
|
-
title:
|
|
4748
|
+
onClick: Oe,
|
|
4749
|
+
"aria-label": Q,
|
|
4750
|
+
title: Q
|
|
4747
4751
|
}
|
|
4748
4752
|
)),
|
|
4749
4753
|
!e.hideLine && /* @__PURE__ */ n.createElement(
|
|
@@ -4753,8 +4757,8 @@ const cr = 250, dr = 84, Ln = 3, Rn = 2, ur = "#000000", fr = "#ffffff", Qa = (a
|
|
|
4753
4757
|
style: { zIndex: 2, pointerEvents: "none" }
|
|
4754
4758
|
}
|
|
4755
4759
|
),
|
|
4756
|
-
/* @__PURE__ */ n.createElement("div", { className: "k-signature-actions k-signature-actions-bottom" },
|
|
4757
|
-
|
|
4760
|
+
/* @__PURE__ */ n.createElement("div", { className: "k-signature-actions k-signature-actions-bottom" }, $ && /* @__PURE__ */ n.createElement(
|
|
4761
|
+
be,
|
|
4758
4762
|
{
|
|
4759
4763
|
type: "button",
|
|
4760
4764
|
className: "k-signature-action k-signature-clear",
|
|
@@ -4763,21 +4767,21 @@ const cr = 250, dr = 84, Ln = 3, Rn = 2, ur = "#000000", fr = "#ffffff", Qa = (a
|
|
|
4763
4767
|
fillMode: "flat",
|
|
4764
4768
|
size: e.size,
|
|
4765
4769
|
onClick: wt,
|
|
4766
|
-
"aria-label":
|
|
4767
|
-
title:
|
|
4770
|
+
"aria-label": g,
|
|
4771
|
+
title: g
|
|
4768
4772
|
}
|
|
4769
4773
|
)),
|
|
4770
|
-
|
|
4774
|
+
A && /* @__PURE__ */ n.createElement(Gn, { ref: c }, /* @__PURE__ */ n.createElement(
|
|
4771
4775
|
St,
|
|
4772
4776
|
{
|
|
4773
4777
|
...e,
|
|
4774
4778
|
...at(),
|
|
4775
|
-
value:
|
|
4779
|
+
value: V,
|
|
4776
4780
|
maximized: !0,
|
|
4777
|
-
exportScale: 1 /
|
|
4781
|
+
exportScale: 1 / k * u,
|
|
4778
4782
|
open: !1,
|
|
4779
|
-
onChange:
|
|
4780
|
-
onClose:
|
|
4783
|
+
onChange: E,
|
|
4784
|
+
onClose: Y
|
|
4781
4785
|
}
|
|
4782
4786
|
))
|
|
4783
4787
|
);
|
|
@@ -4814,21 +4818,21 @@ St.defaultProps = {
|
|
|
4814
4818
|
disabled: !1,
|
|
4815
4819
|
required: !1,
|
|
4816
4820
|
validityStyles: !0,
|
|
4817
|
-
onChange: (a) =>
|
|
4818
|
-
onFocus: (a) =>
|
|
4819
|
-
onBlur: (a) =>
|
|
4820
|
-
onOpen: (a) =>
|
|
4821
|
-
onClose: (a) =>
|
|
4821
|
+
onChange: (a) => Ne,
|
|
4822
|
+
onFocus: (a) => Ne,
|
|
4823
|
+
onBlur: (a) => Ne,
|
|
4824
|
+
onOpen: (a) => Ne,
|
|
4825
|
+
onClose: (a) => Ne,
|
|
4822
4826
|
size: "medium",
|
|
4823
4827
|
rounded: "medium",
|
|
4824
4828
|
fillMode: "solid"
|
|
4825
4829
|
};
|
|
4826
4830
|
const Sa = n.forwardRef((a, t) => {
|
|
4827
|
-
|
|
4831
|
+
me(ge);
|
|
4828
4832
|
const e = n.useRef(null), s = n.useRef(null), i = n.useRef(), l = n.useCallback(
|
|
4829
4833
|
() => {
|
|
4830
|
-
var
|
|
4831
|
-
return i.current !== void 0 ? i.current : (
|
|
4834
|
+
var $;
|
|
4835
|
+
return i.current !== void 0 ? i.current : ($ = e.current) == null ? void 0 : $.value;
|
|
4832
4836
|
},
|
|
4833
4837
|
[]
|
|
4834
4838
|
);
|
|
@@ -4852,62 +4856,62 @@ const Sa = n.forwardRef((a, t) => {
|
|
|
4852
4856
|
const {
|
|
4853
4857
|
size: c,
|
|
4854
4858
|
fillMode: o,
|
|
4855
|
-
rounded:
|
|
4859
|
+
rounded: h,
|
|
4856
4860
|
className: d,
|
|
4857
|
-
dir:
|
|
4858
|
-
style:
|
|
4861
|
+
dir: p,
|
|
4862
|
+
style: m,
|
|
4859
4863
|
prefix: f = ua.prefix,
|
|
4860
|
-
suffix:
|
|
4864
|
+
suffix: v = ua.suffix,
|
|
4861
4865
|
valid: N,
|
|
4862
4866
|
// Destruct to avoid warning when used inside a form field
|
|
4863
|
-
modified:
|
|
4864
|
-
touched:
|
|
4865
|
-
visited:
|
|
4867
|
+
modified: P,
|
|
4868
|
+
touched: M,
|
|
4869
|
+
visited: V,
|
|
4866
4870
|
...S
|
|
4867
|
-
} = a, [
|
|
4868
|
-
|
|
4869
|
-
},
|
|
4870
|
-
|
|
4871
|
+
} = a, [I] = Be(f), [O] = Be(v), [B, w] = n.useState(!1), F = ($) => {
|
|
4872
|
+
w(!0);
|
|
4873
|
+
}, A = ($) => {
|
|
4874
|
+
w(!1);
|
|
4871
4875
|
}, T = n.useCallback(
|
|
4872
|
-
(
|
|
4873
|
-
i.current =
|
|
4874
|
-
syntheticEvent:
|
|
4875
|
-
nativeEvent:
|
|
4876
|
-
value:
|
|
4876
|
+
($) => {
|
|
4877
|
+
i.current = $.target.value, a.onChange && a.onChange.call(void 0, {
|
|
4878
|
+
syntheticEvent: $,
|
|
4879
|
+
nativeEvent: $.nativeEvent,
|
|
4880
|
+
value: $.target.value,
|
|
4877
4881
|
target: s.current
|
|
4878
4882
|
}), i.current = void 0;
|
|
4879
4883
|
},
|
|
4880
4884
|
[a.onChange]
|
|
4881
|
-
), { onFocus:
|
|
4885
|
+
), { onFocus: x, onBlur: L } = On({
|
|
4882
4886
|
onFocus: F,
|
|
4883
|
-
onBlur:
|
|
4887
|
+
onBlur: A,
|
|
4884
4888
|
onSyncFocus: a.onFocus,
|
|
4885
4889
|
onSyncBlur: a.onBlur
|
|
4886
4890
|
});
|
|
4887
4891
|
return /* @__PURE__ */ n.createElement(
|
|
4888
4892
|
"span",
|
|
4889
4893
|
{
|
|
4890
|
-
style:
|
|
4891
|
-
dir:
|
|
4894
|
+
style: m,
|
|
4895
|
+
dir: p,
|
|
4892
4896
|
className: G(
|
|
4893
4897
|
"k-textbox k-input",
|
|
4894
4898
|
{
|
|
4895
|
-
[`k-input-${
|
|
4899
|
+
[`k-input-${se.sizeMap[c] || c}`]: c,
|
|
4896
4900
|
[`k-input-${o}`]: o,
|
|
4897
|
-
[`k-rounded-${
|
|
4901
|
+
[`k-rounded-${se.roundedMap[h] || h}`]: h
|
|
4898
4902
|
},
|
|
4899
4903
|
{
|
|
4900
|
-
"k-focus":
|
|
4904
|
+
"k-focus": B,
|
|
4901
4905
|
"k-required": a.required,
|
|
4902
4906
|
"k-disabled": a.disabled,
|
|
4903
4907
|
"k-invalid": a.valid === !1
|
|
4904
4908
|
},
|
|
4905
4909
|
d
|
|
4906
4910
|
),
|
|
4907
|
-
onFocus:
|
|
4908
|
-
onBlur:
|
|
4911
|
+
onFocus: x,
|
|
4912
|
+
onBlur: L
|
|
4909
4913
|
},
|
|
4910
|
-
/* @__PURE__ */ n.createElement(
|
|
4914
|
+
/* @__PURE__ */ n.createElement(I, null),
|
|
4911
4915
|
/* @__PURE__ */ n.createElement(
|
|
4912
4916
|
"input",
|
|
4913
4917
|
{
|
|
@@ -4917,7 +4921,7 @@ const Sa = n.forwardRef((a, t) => {
|
|
|
4917
4921
|
onChange: T
|
|
4918
4922
|
}
|
|
4919
4923
|
),
|
|
4920
|
-
/* @__PURE__ */ n.createElement(
|
|
4924
|
+
/* @__PURE__ */ n.createElement(O, null)
|
|
4921
4925
|
);
|
|
4922
4926
|
}), ua = {
|
|
4923
4927
|
prefix: (a) => null,
|
|
@@ -4977,7 +4981,7 @@ const br = n.forwardRef(({ orientation: a = "horizontal", ...t }, e) => {
|
|
|
4977
4981
|
), /* @__PURE__ */ n.createElement("span", { ...t, className: G("k-input-suffix", t.className, `k-input-suffix-${a}`) });
|
|
4978
4982
|
});
|
|
4979
4983
|
br.displayName = "KendoReactInputSuffix";
|
|
4980
|
-
const vr = n.forwardRef((a, t) => /* @__PURE__ */ n.createElement(
|
|
4984
|
+
const vr = n.forwardRef((a, t) => /* @__PURE__ */ n.createElement(he, { ref: t, ...a, className: G("k-input-validation-icon", a.className) }));
|
|
4981
4985
|
vr.displayName = "KendoReactInputValidationIcon";
|
|
4982
4986
|
export {
|
|
4983
4987
|
ya as Checkbox,
|
|
@@ -5002,11 +5006,11 @@ export {
|
|
|
5002
5006
|
gt as InputWithoutContext,
|
|
5003
5007
|
Hs as MaskedTextBox,
|
|
5004
5008
|
yt as MaskedTextBoxWithoutContext,
|
|
5005
|
-
|
|
5009
|
+
Ae as NumericTextBox,
|
|
5006
5010
|
ns as NumericTextBoxPropsContext,
|
|
5007
5011
|
Es as PALETTEPRESETS,
|
|
5008
|
-
|
|
5009
|
-
|
|
5012
|
+
W as RANGE_ACTION,
|
|
5013
|
+
ue as RATING_ACTION,
|
|
5010
5014
|
xt as RadioButton,
|
|
5011
5015
|
Zs as RadioButtonPropsContext,
|
|
5012
5016
|
Ca as RadioGroup,
|
|
@@ -5027,7 +5031,7 @@ export {
|
|
|
5027
5031
|
xa as TextArea,
|
|
5028
5032
|
er as TextAreaPropsContext,
|
|
5029
5033
|
Sa as TextBox,
|
|
5030
|
-
|
|
5034
|
+
H as inputsMessages,
|
|
5031
5035
|
Za as isCorrectValue,
|
|
5032
5036
|
da as isHalf,
|
|
5033
5037
|
Tt as isSelected,
|
|
@@ -5037,5 +5041,5 @@ export {
|
|
|
5037
5041
|
Gs as rangeReducer,
|
|
5038
5042
|
rr as ratingReducer,
|
|
5039
5043
|
Ta as sanitizeNumber,
|
|
5040
|
-
|
|
5044
|
+
ke as toRound
|
|
5041
5045
|
};
|