@progress/kendo-react-inputs 7.0.0-develop.8 → 7.0.0
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/colors/ColorPalette.d.ts +1 -1
- package/dist/cdn/js/kendo-react-inputs.js +3 -3
- package/index.js +3 -3
- package/index.mjs +1286 -1277
- package/input/Input.d.ts +1 -1
- package/package.json +10 -9
- package/radiobutton/interfaces/RadioGroupProps.d.ts +4 -0
package/index.mjs
CHANGED
|
@@ -2,58 +2,59 @@
|
|
|
2
2
|
* Copyright © 2023 Progress Software Corporation. All rights reserved.
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
|
+
"use client";
|
|
5
6
|
import * as n from "react";
|
|
6
7
|
import * as r from "prop-types";
|
|
7
|
-
import { useInternationalization as
|
|
8
|
-
import { createPropsContext as he, validatePackage as pe, usePropsContext as
|
|
9
|
-
import { caretAltUpIcon as
|
|
10
|
-
import { FloatingLabel as
|
|
11
|
-
import { Button as ge, ButtonGroup as
|
|
12
|
-
import { parseColor as
|
|
13
|
-
import { Popup as
|
|
14
|
-
import { SignaturePad as
|
|
15
|
-
import { Dialog as
|
|
8
|
+
import { useInternationalization as Mn, useLocalization as _e, provideLocalizationService as Je, registerForIntl as Nn, registerForLocalization as da } from "@progress/kendo-react-intl";
|
|
9
|
+
import { createPropsContext as he, validatePackage as pe, usePropsContext as Re, useId as Qe, useCustomComponent as qe, dispatchEvent as Q, getActiveElement as wa, classNames as G, kendoThemeMaps as ne, getTabIndex as ie, withIdHOC as et, withPropsContext as Ue, useDir as Ae, Keys as z, Draggable as en, IconWrap as fe, focusFirstFocusableChild as tn, svgIconPropType as Ft, useDraggable as Pn, noop as Me, useRtl as Dn, toIconName as Lt, useAsyncFocusBlur as Bn } from "@progress/kendo-react-common";
|
|
10
|
+
import { caretAltUpIcon as Tt, caretAltDownIcon as ht, caretAltExpandIcon as On, caretAltLeftIcon as Ia, caretAltRightIcon as La, checkIcon as Rt, xIcon as zt, dropletSliderIcon as Fn, paletteIcon as Tn, dropletSlashIcon as zn, starOutlineIcon as Ra, starIcon as Va, hyperlinkOpenIcon as Ma } from "@progress/kendo-svg-icons";
|
|
11
|
+
import { FloatingLabel as ua, Label as We } from "@progress/kendo-react-labels";
|
|
12
|
+
import { Button as ge, ButtonGroup as _n } from "@progress/kendo-react-buttons";
|
|
13
|
+
import { parseColor as mt, Color as an } from "@progress/kendo-drawing";
|
|
14
|
+
import { Popup as An } from "@progress/kendo-react-popup";
|
|
15
|
+
import { SignaturePad as $n } from "@progress/kendo-inputs-common";
|
|
16
|
+
import { Dialog as Hn } from "@progress/kendo-react-dialogs";
|
|
16
17
|
const me = {
|
|
17
18
|
name: "@progress/kendo-react-inputs",
|
|
18
19
|
productName: "KendoReact",
|
|
19
20
|
productCodes: ["KENDOUIREACT", "KENDOUICOMPLETE"],
|
|
20
|
-
publishDate:
|
|
21
|
+
publishDate: 1702304779,
|
|
21
22
|
version: "",
|
|
22
23
|
licensingDocsUrl: "https://www.telerik.com/kendo-react-ui/components/my-license/"
|
|
23
|
-
},
|
|
24
|
-
[
|
|
25
|
-
[
|
|
26
|
-
[
|
|
27
|
-
[
|
|
28
|
-
[
|
|
29
|
-
[
|
|
30
|
-
[
|
|
31
|
-
[
|
|
32
|
-
[
|
|
33
|
-
[
|
|
34
|
-
[
|
|
35
|
-
[
|
|
36
|
-
[
|
|
37
|
-
[
|
|
38
|
-
[
|
|
39
|
-
[
|
|
40
|
-
[
|
|
41
|
-
[
|
|
42
|
-
[
|
|
43
|
-
[
|
|
44
|
-
[
|
|
45
|
-
[
|
|
46
|
-
[
|
|
47
|
-
[
|
|
48
|
-
[
|
|
49
|
-
[
|
|
50
|
-
[
|
|
51
|
-
[
|
|
52
|
-
[
|
|
53
|
-
[
|
|
54
|
-
[
|
|
55
|
-
[
|
|
56
|
-
},
|
|
24
|
+
}, Xe = "numerictextbox.increment", Ye = "numerictextbox.decrement", _t = "slider.increment", At = "slider.decrement", Te = "slider.dragTitle", Fe = "colorGradient.r", nn = "colorGradient.g", sn = "colorGradient.b", rn = "colorGradient.a", ln = "colorGradient.hex", $t = "colorGradient.contrastRatio", Ht = "colorGradient.colorGradientAALevel", Gt = "colorGradient.colorGradientAAALevel", Kt = "colorGradient.colorGradientPass", qt = "colorGradient.colorGradientFail", Ut = "colorGradient.hueSliderLabel", jt = "colorGradient.alphaSliderLabel", Wt = "colorGradient.toggleInputsButton", on = "flatColorPicker.cancelBtn", cn = "flatColorPicker.applyBtn", Xt = "flatColorPicker.colorGradientBtn", Yt = "flatColorPicker.colorPaletteBtn", Zt = "flatColorPicker.clearBtn", dn = "checkbox.validation", un = "checkbox.optionalText", Gn = "radioButton.validation", Jt = "switch.validation", Qt = "colorPicker.dropdownButtonAriaLabel", ea = "rating.ariaLabel", ta = "signature.clear", aa = "signature.maximize", na = "signature.minimize", $ = {
|
|
25
|
+
[Xe]: "Increase value",
|
|
26
|
+
[Ye]: "Decrease value",
|
|
27
|
+
[_t]: "Increase",
|
|
28
|
+
[At]: "Decrease",
|
|
29
|
+
[Te]: "Drag",
|
|
30
|
+
[Fe]: "r",
|
|
31
|
+
[nn]: "g",
|
|
32
|
+
[sn]: "b",
|
|
33
|
+
[rn]: "a",
|
|
34
|
+
[ln]: "hex",
|
|
35
|
+
[$t]: "Contrast ratio",
|
|
36
|
+
[Ht]: "AA",
|
|
37
|
+
[Gt]: "AAA",
|
|
38
|
+
[Kt]: "Pass",
|
|
39
|
+
[qt]: "Fail",
|
|
40
|
+
[Ut]: "Hue slider",
|
|
41
|
+
[jt]: "Alpha slider",
|
|
42
|
+
[Wt]: "Toggle colorgradient inputs",
|
|
43
|
+
[on]: "Cancel",
|
|
44
|
+
[cn]: "Apply",
|
|
45
|
+
[Xt]: "Color Gradient view",
|
|
46
|
+
[Yt]: "Color Palette view",
|
|
47
|
+
[Zt]: "Clear color value",
|
|
48
|
+
[dn]: "Please check this box if you want to proceed!",
|
|
49
|
+
[un]: "(Optional)",
|
|
50
|
+
[Gn]: "Please select option if you want to proceed!",
|
|
51
|
+
[Jt]: "Please turn on if you want to proceed!",
|
|
52
|
+
[Qt]: "Select",
|
|
53
|
+
[ea]: "Rating",
|
|
54
|
+
[ta]: "Clear",
|
|
55
|
+
[aa]: "Maximize",
|
|
56
|
+
[na]: "Minimize"
|
|
57
|
+
}, pt = 11111111111111e-7, Kn = 0.31111111111111117, qn = 1, fn = 1, hn = 0, ke = /\d/, pn = 15, Na = () => ({
|
|
57
58
|
eventValue: null,
|
|
58
59
|
prevLooseValue: "",
|
|
59
60
|
currentLooseValue: "",
|
|
@@ -63,64 +64,64 @@ const me = {
|
|
|
63
64
|
decimalSelect: !1,
|
|
64
65
|
valueIsCorrected: !1,
|
|
65
66
|
valueIsOutOfRange: !1
|
|
66
|
-
}),
|
|
67
|
-
const e =
|
|
67
|
+
}), Vt = (a, t) => a !== void 0 ? a : t, ue = (a, t, e) => a === null && a === void 0 ? "" : typeof a == "string" ? a : e.formatNumber(a, t), Pa = (a) => (String(a).split(".")[1] || "").length, mn = (a, t) => Math.max(Pa(a), Pa(t)), Un = (a) => Math.min(a, pn), gn = (a, t) => {
|
|
68
|
+
const e = Un(t);
|
|
68
69
|
return parseFloat(a.toFixed(e));
|
|
69
|
-
}, Pa = (a, t, e, s, l, i, c) => {
|
|
70
|
-
const o = pn(a || 0, e || 0), h = Ke(mn((a || 0) + (e || 0), o), s, l);
|
|
71
|
-
t.eventValue = h, t.currentLooseValue = ue(h, i, c), t.selectionStart = t.selectionEnd = Je(t.currentLooseValue, ke);
|
|
72
70
|
}, Da = (a, t, e, s, l, i, c) => {
|
|
73
|
-
const o =
|
|
74
|
-
t.eventValue =
|
|
75
|
-
},
|
|
71
|
+
const o = mn(a || 0, e || 0), f = Ge(gn((a || 0) + (e || 0), o), s, l);
|
|
72
|
+
t.eventValue = f, t.currentLooseValue = ue(f, i, c), t.selectionStart = t.selectionEnd = Ze(t.currentLooseValue, ke);
|
|
73
|
+
}, Ba = (a, t, e, s, l, i, c) => {
|
|
74
|
+
const o = mn(a || 0, e || 0), f = Ge(gn((a || 0) - (e || 0), o), s, l);
|
|
75
|
+
t.eventValue = f, t.currentLooseValue = ue(f, i, c), t.selectionStart = t.selectionEnd = Ze(t.currentLooseValue, ke);
|
|
76
|
+
}, Ge = (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), jn = (a, t) => {
|
|
76
77
|
const e = t.findIndex(([l, i]) => !!i && a.indexOf(i) === a.length - i.length);
|
|
77
78
|
if (e === -1)
|
|
78
79
|
return -1;
|
|
79
80
|
const s = t[e][1];
|
|
80
81
|
return a.length - s.length;
|
|
81
|
-
},
|
|
82
|
+
}, Wn = (a, t) => {
|
|
82
83
|
const e = t.findIndex(([l, i]) => !!l && a.indexOf(l) === 0);
|
|
83
84
|
return e === -1 ? -1 : t[e][0].length;
|
|
84
|
-
},
|
|
85
|
-
const s =
|
|
85
|
+
}, Xn = (a, t, e) => {
|
|
86
|
+
const s = jn(a, t);
|
|
86
87
|
if (s !== -1 && e.selectionStart > s) {
|
|
87
88
|
e.selectionStart = e.selectionEnd = s;
|
|
88
89
|
return;
|
|
89
90
|
}
|
|
90
91
|
e.selectionStart > a.length && (e.selectionStart = e.selectionEnd = a.length);
|
|
91
|
-
const l =
|
|
92
|
+
const l = Wn(a, t);
|
|
92
93
|
l !== -1 && e.selectionStart < l && (e.selectionStart = e.selectionEnd = l), e.selectionStart === -1 && (e.selectionStart = e.selectionEnd = 0);
|
|
93
|
-
},
|
|
94
|
-
a.selectionStart = a.selectionEnd = t,
|
|
95
|
-
},
|
|
96
|
-
a.eventValue = s.parseNumber(a.prevLooseValue, t), a.currentLooseValue = a.prevLooseValue, a.valueIsCorrected = !0,
|
|
97
|
-
},
|
|
94
|
+
}, Le = (a, t, e, s) => {
|
|
95
|
+
a.selectionStart = a.selectionEnd = t, Xn(e, s, a);
|
|
96
|
+
}, Mt = (a, t, e, s) => {
|
|
97
|
+
a.eventValue = s.parseNumber(a.prevLooseValue, t), a.currentLooseValue = a.prevLooseValue, a.valueIsCorrected = !0, Le(a, a.selectionStart, a.currentLooseValue, e);
|
|
98
|
+
}, Yn = (a, t) => {
|
|
98
99
|
const e = String(a.currentLooseValue), s = String(a.prevLooseValue);
|
|
99
100
|
return e.split(t.minusSign).length !== s.split(t.minusSign).length && e.length === s.length + t.minusSign.length;
|
|
100
|
-
},
|
|
101
|
+
}, Zn = (a, t) => {
|
|
101
102
|
const e = String(a.currentLooseValue), s = String(a.prevLooseValue);
|
|
102
103
|
return e.indexOf(t.minusSign) === -1 && s.indexOf(t.minusSign) !== -1;
|
|
103
|
-
},
|
|
104
|
-
const e = t.formatNumber(
|
|
104
|
+
}, Jn = (a, t) => String(a.currentLooseValue).split(t.decimal).length > 2, Qn = (a, t) => {
|
|
105
|
+
const e = t.formatNumber(pt, a), s = t.formatNumber(-pt, a), l = t.formatNumber(hn, a), i = t.formatNumber(fn, a), c = nt(e), o = nt(s), f = nt(l), d = nt(i), m = st(e), u = st(s), h = st(l), y = st(i);
|
|
105
106
|
return {
|
|
106
|
-
positiveInfo: [c,
|
|
107
|
-
negativeInfo: [o,
|
|
108
|
-
zeroInfo: [
|
|
109
|
-
oneInfo: [d,
|
|
107
|
+
positiveInfo: [c, m],
|
|
108
|
+
negativeInfo: [o, u],
|
|
109
|
+
zeroInfo: [f, h],
|
|
110
|
+
oneInfo: [d, y]
|
|
110
111
|
};
|
|
111
|
-
},
|
|
112
|
-
const e = t.formatNumber(
|
|
113
|
-
return [e, s, l, i].map((d) => d.replace(o, "")).join("").split("").filter((d,
|
|
114
|
-
},
|
|
112
|
+
}, es = (a, t) => {
|
|
113
|
+
const e = t.formatNumber(pt, a), s = t.formatNumber(-pt, a), l = t.formatNumber(hn, a), i = t.formatNumber(fn, a), c = t.numberSymbols(), o = new RegExp(`[\\d\\${c.decimal}${c.group}]`, "g");
|
|
114
|
+
return [e, s, l, i].map((d) => d.replace(o, "")).join("").split("").filter((d, m, u) => u.indexOf(d) === m).join("");
|
|
115
|
+
}, Nt = (a, t) => {
|
|
115
116
|
const e = a.indexOf(t.decimal);
|
|
116
|
-
return e > -1 ? e :
|
|
117
|
-
},
|
|
118
|
-
const t =
|
|
119
|
-
return
|
|
120
|
-
},
|
|
117
|
+
return e > -1 ? e : Ze(a, ke);
|
|
118
|
+
}, sa = (a) => a.split("").reverse().join(""), Ze = (a, t) => a.length - sa(a).search(t), nt = (a) => a.split(a[a.search(ke)])[0], st = (a) => {
|
|
119
|
+
const t = sa(a);
|
|
120
|
+
return sa(t.split(t[t.search(ke)])[0]);
|
|
121
|
+
}, Pt = (a, t) => a.search(t), Oa = (a, t) => {
|
|
121
122
|
const e = a.indexOf(t);
|
|
122
123
|
return e > -1 ? a.length - e - 1 : 0;
|
|
123
|
-
},
|
|
124
|
+
}, Fa = (a, t, e, s, l) => {
|
|
124
125
|
const i = a.replace(l, "")[0] === "0", c = t.replace(l, "")[0] === "0";
|
|
125
126
|
if (i && !c)
|
|
126
127
|
return e - 1;
|
|
@@ -129,122 +130,122 @@ const me = {
|
|
|
129
130
|
let o = 0;
|
|
130
131
|
for (let d = 0; d < e; d++)
|
|
131
132
|
ke.test(a.charAt(d)) && o++;
|
|
132
|
-
let
|
|
133
|
-
for (; o > 0 && t.length >
|
|
134
|
-
ke.test(t.charAt(
|
|
135
|
-
return
|
|
136
|
-
},
|
|
137
|
-
const s = { ...a }, { prevLooseValue: l } = s, i = e.numberSymbols(), c =
|
|
133
|
+
let f = 0;
|
|
134
|
+
for (; o > 0 && t.length > f; )
|
|
135
|
+
ke.test(t.charAt(f)) && o--, f++;
|
|
136
|
+
return f;
|
|
137
|
+
}, Ta = (a, t, e) => {
|
|
138
|
+
const s = { ...a }, { prevLooseValue: l } = s, i = e.numberSymbols(), c = es(t, e), o = String(s.currentLooseValue), f = String(l), d = new RegExp(`[^\\d\\${i.decimal}]`, "g"), m = new RegExp(`[^\\d\\${i.decimal}\\${i.group}]`, "g"), u = new RegExp(`[\\d\\${i.decimal}\\${i.group}]`), h = o.replace(d, ""), y = Pt(o, ke), M = y === -1 ? -1 : Ze(o, ke), D = o.indexOf(i.decimal), N = (o.substring(0, y) + o.substring(y, M).replace(m, "") + o.substring(M, o.length)).split("").filter((p) => c.indexOf(p) !== -1 || p.search(u) !== -1).join(""), L = e.formatNumber(Kn, t).replace(d, ""), S = L.indexOf(i.decimal), w = S > -1 ? L.length - S - 1 : 0, B = e.formatNumber(qn, t).replace(d, ""), O = B.indexOf(i.decimal), I = O > -1 ? B.length - O - 1 : 0, {
|
|
138
139
|
positiveInfo: F,
|
|
139
|
-
negativeInfo:
|
|
140
|
-
zeroInfo:
|
|
140
|
+
negativeInfo: _,
|
|
141
|
+
zeroInfo: T,
|
|
141
142
|
oneInfo: E
|
|
142
|
-
} =
|
|
143
|
+
} = Qn(t, e), V = [F, _, T, E], H = V.findIndex((p) => p.findIndex((v) => !!v) !== -1) !== 1, q = o.length > 0 && o.length < f.length, Z = typeof t == "string" && t[0] === "p" && o && o.indexOf(i.percentSign) === -1;
|
|
143
144
|
if (!s.isPaste) {
|
|
144
145
|
if (o === "")
|
|
145
146
|
return s.eventValue = null, s.currentLooseValue = "", s;
|
|
146
|
-
if (s.currentLooseValue === i.minusSign && e.formatNumber(-0, t) !==
|
|
147
|
-
return s.eventValue = -0, s.currentLooseValue = ue(s.eventValue, t, e),
|
|
147
|
+
if (s.currentLooseValue === i.minusSign && e.formatNumber(-0, t) !== f)
|
|
148
|
+
return s.eventValue = -0, s.currentLooseValue = ue(s.eventValue, t, e), Le(
|
|
148
149
|
s,
|
|
149
|
-
|
|
150
|
+
Nt(s.currentLooseValue, i),
|
|
150
151
|
s.currentLooseValue,
|
|
151
|
-
|
|
152
|
+
V
|
|
152
153
|
), s;
|
|
153
154
|
if (s.currentLooseValue === i.decimal) {
|
|
154
155
|
s.eventValue = 0;
|
|
155
|
-
const
|
|
156
|
-
if (
|
|
157
|
-
const C =
|
|
158
|
-
s.currentLooseValue =
|
|
156
|
+
const k = ue(s.eventValue, t, e);
|
|
157
|
+
if (I === 0 && w > 0) {
|
|
158
|
+
const C = Ze(k, ke);
|
|
159
|
+
s.currentLooseValue = k.substring(0, C) + i.decimal + k.substring(C);
|
|
159
160
|
} else
|
|
160
|
-
s.currentLooseValue =
|
|
161
|
-
return
|
|
161
|
+
s.currentLooseValue = k;
|
|
162
|
+
return Le(
|
|
162
163
|
s,
|
|
163
|
-
|
|
164
|
+
Nt(s.currentLooseValue, i) + 1,
|
|
164
165
|
s.currentLooseValue,
|
|
165
|
-
|
|
166
|
+
V
|
|
166
167
|
), s;
|
|
167
168
|
}
|
|
168
|
-
if (
|
|
169
|
-
const
|
|
170
|
-
s.eventValue = -(
|
|
171
|
-
const C =
|
|
172
|
-
return
|
|
169
|
+
if (Yn(s, i)) {
|
|
170
|
+
const k = e.parseNumber(l, t);
|
|
171
|
+
s.eventValue = -(k !== null ? k : 0), s.currentLooseValue = ue(s.eventValue, t, e);
|
|
172
|
+
const C = Pt(s.currentLooseValue, ke), P = Pt(f, ke);
|
|
173
|
+
return Le(
|
|
173
174
|
s,
|
|
174
|
-
s.selectionEnd - 1 + (C -
|
|
175
|
+
s.selectionEnd - 1 + (C - P),
|
|
175
176
|
s.currentLooseValue,
|
|
176
|
-
|
|
177
|
+
V
|
|
177
178
|
), s;
|
|
178
179
|
}
|
|
179
|
-
if (
|
|
180
|
-
return s.eventValue = e.parseNumber(s.currentLooseValue, t),
|
|
180
|
+
if (Zn(s, i))
|
|
181
|
+
return s.eventValue = e.parseNumber(s.currentLooseValue, t), Le(
|
|
181
182
|
s,
|
|
182
183
|
s.selectionStart,
|
|
183
184
|
s.currentLooseValue,
|
|
184
|
-
|
|
185
|
+
V
|
|
185
186
|
), s;
|
|
186
|
-
if (
|
|
187
|
-
return
|
|
187
|
+
if (Jn(s, i))
|
|
188
|
+
return Mt(s, t, V, e), s;
|
|
188
189
|
if (Z)
|
|
189
190
|
return s.eventValue = e.parseNumber(o, t) / 100, s.currentLooseValue = ue(s.eventValue, t, e), s;
|
|
190
|
-
if (String(s.currentLooseValue).replace(/[^\d]/g, "").length >
|
|
191
|
-
const j = o.indexOf(C), J = o.indexOf(
|
|
192
|
-
return C &&
|
|
191
|
+
if (String(s.currentLooseValue).replace(/[^\d]/g, "").length > pn || h !== o && o && H && V.findIndex(([C, P]) => {
|
|
192
|
+
const j = o.indexOf(C), J = o.indexOf(P), R = j === 0, b = J === o.length - P.length, W = j + C.length !== y && y !== -1 && o[j + C.length] !== i.decimal, K = J !== M && M !== -1 && o[J - 1] !== i.decimal;
|
|
193
|
+
return C && P ? W || K ? !1 : R && b : C ? W ? !1 : R : P ? K ? !1 : b : !1;
|
|
193
194
|
}) === -1)
|
|
194
|
-
return
|
|
195
|
-
if (
|
|
196
|
-
return s.eventValue = e.parseNumber(o, t), s.currentLooseValue =
|
|
197
|
-
if (s.currentLooseValue && l && (c + i.decimal + i.group).split("").findIndex((C) => o.split("").filter((
|
|
195
|
+
return Mt(s, t, V, e), s;
|
|
196
|
+
if (h[h.length - 1] === i.decimal && w > 0)
|
|
197
|
+
return s.eventValue = e.parseNumber(o, t), s.currentLooseValue = N, s;
|
|
198
|
+
if (s.currentLooseValue && l && (c + i.decimal + i.group).split("").findIndex((C) => o.split("").filter((P) => P === C).length < f.split("").filter((P) => P === C).length && o.length + 1 === f.length ? !(C === i.decimal && Oa(f.replace(d, ""), i.decimal) === 0) : !1) > -1)
|
|
198
199
|
return s.eventValue = e.parseNumber(a.prevLooseValue, t), s.currentLooseValue = a.prevLooseValue, s;
|
|
199
|
-
const
|
|
200
|
-
if (q && g &&
|
|
200
|
+
const v = Oa(h, i.decimal), g = h[h.length - 1] === "0";
|
|
201
|
+
if (q && g && v < I)
|
|
201
202
|
return s.eventValue = e.parseNumber(s.currentLooseValue, t), s.currentLooseValue = ue(s.eventValue, t, e), s;
|
|
202
|
-
if (
|
|
203
|
-
const
|
|
204
|
-
if (g && (!
|
|
203
|
+
if (v > 0) {
|
|
204
|
+
const k = o.substring(0, D);
|
|
205
|
+
if (g && (!k || f.indexOf(k) !== 0)) {
|
|
205
206
|
s.eventValue = e.parseNumber(s.currentLooseValue, t);
|
|
206
207
|
const C = ue(s.eventValue, t, e);
|
|
207
|
-
return
|
|
208
|
+
return Le(
|
|
208
209
|
s,
|
|
209
|
-
|
|
210
|
+
Fa(o, C, s.selectionEnd, q, d),
|
|
210
211
|
C,
|
|
211
|
-
|
|
212
|
+
V
|
|
212
213
|
), s.currentLooseValue = C, s;
|
|
213
214
|
}
|
|
214
|
-
if (
|
|
215
|
-
const C = o.indexOf(i.decimal),
|
|
216
|
-
return s.eventValue = e.parseNumber(
|
|
215
|
+
if (v > w) {
|
|
216
|
+
const C = o.indexOf(i.decimal), P = o.substring(0, C) + o.substring(C, C + 1 + w) + o.substring(M, String(s.currentLooseValue).length);
|
|
217
|
+
return s.eventValue = e.parseNumber(P, t), s.currentLooseValue = P, Le(s, s.selectionStart, P, V), s;
|
|
217
218
|
}
|
|
218
|
-
if (
|
|
219
|
-
return s.eventValue = e.parseNumber(s.currentLooseValue, t), s.currentLooseValue =
|
|
220
|
-
if (
|
|
219
|
+
if (I !== w && v <= w && g)
|
|
220
|
+
return s.eventValue = e.parseNumber(s.currentLooseValue, t), s.currentLooseValue = N, s;
|
|
221
|
+
if (v < I)
|
|
221
222
|
return s.eventValue = e.parseNumber(s.currentLooseValue, t), s.currentLooseValue = ue(s.eventValue, t, e), s;
|
|
222
223
|
}
|
|
223
224
|
}
|
|
224
225
|
if (s.eventValue = e.parseNumber(s.currentLooseValue, t), Z && (s.eventValue = s.eventValue / 100), typeof s.eventValue == "number") {
|
|
225
|
-
const
|
|
226
|
-
o.length === 1 ?
|
|
226
|
+
const p = ue(s.eventValue, t, e);
|
|
227
|
+
o.length === 1 ? Le(s, Nt(p, i), p, V) : Le(
|
|
227
228
|
s,
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
), s.currentLooseValue =
|
|
229
|
+
Fa(o, p, s.selectionEnd, q, d),
|
|
230
|
+
p,
|
|
231
|
+
V
|
|
232
|
+
), s.currentLooseValue = p;
|
|
232
233
|
} else
|
|
233
|
-
s.currentLooseValue = ue(e.parseNumber(
|
|
234
|
+
s.currentLooseValue = ue(e.parseNumber(h), t, e);
|
|
234
235
|
return s;
|
|
235
|
-
},
|
|
236
|
+
}, ts = "Please enter a valid value!", as = he(), ze = n.forwardRef((a, t) => {
|
|
236
237
|
pe(me);
|
|
237
|
-
const e =
|
|
238
|
-
|
|
238
|
+
const e = Re(as, a), s = Qe(), l = e.id || s, i = Mn(), c = _e(), o = n.useRef(null), f = n.useRef(), [d, m] = n.useState(!1), u = n.useRef(Na()), h = n.useRef(!1), y = n.useRef(), M = n.useRef(e.defaultValue), D = ue(
|
|
239
|
+
u.current.focused && !e.disabled ? u.current.currentLooseValue : Vt(e.value, M.current),
|
|
239
240
|
e.format,
|
|
240
241
|
i
|
|
241
242
|
);
|
|
242
|
-
|
|
243
|
-
const [
|
|
243
|
+
y.current = D;
|
|
244
|
+
const [N] = qe(e.prefix), [L] = qe(e.suffix);
|
|
244
245
|
n.useEffect(
|
|
245
246
|
() => {
|
|
246
247
|
o.current && o.current.setCustomValidity && o.current.setCustomValidity(
|
|
247
|
-
|
|
248
|
+
I().valid ? "" : e.validationMessage || ts
|
|
248
249
|
);
|
|
249
250
|
}
|
|
250
251
|
);
|
|
@@ -253,88 +254,88 @@ const me = {
|
|
|
253
254
|
o.current && o.current.focus();
|
|
254
255
|
},
|
|
255
256
|
[]
|
|
256
|
-
),
|
|
257
|
-
() =>
|
|
257
|
+
), w = n.useCallback(
|
|
258
|
+
() => f.current !== void 0 ? f.current : Vt(e.value, M.current),
|
|
258
259
|
[e.value]
|
|
259
|
-
),
|
|
260
|
+
), B = n.useCallback(
|
|
260
261
|
() => e.name,
|
|
261
262
|
[e.name]
|
|
262
263
|
), O = n.useCallback(
|
|
263
264
|
() => e.required,
|
|
264
265
|
[e.required]
|
|
265
|
-
),
|
|
266
|
+
), I = n.useCallback(
|
|
266
267
|
() => {
|
|
267
|
-
const
|
|
268
|
+
const R = e.validationMessage !== void 0, b = w(), W = e.valid !== void 0 ? e.valid : !u.current.valueIsOutOfRange && (!O() || b != null);
|
|
268
269
|
return {
|
|
269
|
-
customError:
|
|
270
|
+
customError: R,
|
|
270
271
|
valid: W,
|
|
271
272
|
valueMissing: b == null
|
|
272
273
|
};
|
|
273
274
|
},
|
|
274
|
-
[e.validationMessage, e.valid,
|
|
275
|
+
[e.validationMessage, e.valid, w, O]
|
|
275
276
|
), F = n.useCallback(
|
|
276
277
|
() => e.validityStyles,
|
|
277
278
|
[e.validityStyles]
|
|
278
|
-
),
|
|
279
|
+
), _ = n.useCallback(
|
|
279
280
|
() => e,
|
|
280
281
|
[e]
|
|
281
|
-
),
|
|
282
|
+
), T = n.useCallback(
|
|
282
283
|
() => {
|
|
283
|
-
const
|
|
284
|
+
const R = {
|
|
284
285
|
element: o.current,
|
|
285
286
|
focus: S
|
|
286
287
|
};
|
|
287
|
-
return Object.defineProperty(
|
|
288
|
+
return Object.defineProperty(R, "name", { get: B }), Object.defineProperty(R, "value", { get: w }), Object.defineProperty(R, "validity", { get: I }), Object.defineProperty(R, "validityStyles", { get: F }), Object.defineProperty(R, "required", { get: O }), Object.defineProperty(R, "props", { get: _ }), R;
|
|
288
289
|
},
|
|
289
|
-
[
|
|
290
|
+
[B, w, I, F, O, S, _]
|
|
290
291
|
);
|
|
291
|
-
n.useImperativeHandle(t,
|
|
292
|
+
n.useImperativeHandle(t, T);
|
|
292
293
|
const E = n.useCallback(
|
|
293
294
|
() => ({
|
|
294
|
-
eventValue:
|
|
295
|
-
prevLooseValue:
|
|
295
|
+
eventValue: Vt(e.value, M.current),
|
|
296
|
+
prevLooseValue: y.current,
|
|
296
297
|
currentLooseValue: o.current.value,
|
|
297
298
|
selectionStart: o.current.selectionStart,
|
|
298
299
|
selectionEnd: o.current.selectionEnd,
|
|
299
300
|
decimalSelect: !1,
|
|
300
301
|
valueIsCorrected: !1,
|
|
301
302
|
valueIsOutOfRange: !1,
|
|
302
|
-
isPaste:
|
|
303
|
-
focused:
|
|
303
|
+
isPaste: h.current,
|
|
304
|
+
focused: u.current.focused
|
|
304
305
|
}),
|
|
305
306
|
[e.value]
|
|
306
|
-
),
|
|
307
|
-
(
|
|
307
|
+
), V = n.useCallback(
|
|
308
|
+
(R, b) => {
|
|
308
309
|
if (e.disabled)
|
|
309
310
|
return;
|
|
310
|
-
|
|
311
|
-
const W = ue(
|
|
312
|
-
K !== b.eventValue && (b.valueIsOutOfRange = !0, b.eventValue = K,
|
|
311
|
+
f.current = b.eventValue, M.current = b.eventValue;
|
|
312
|
+
const W = ue(Ge(b.eventValue, e.min, e.max), e.format, i), K = Ge(i.parseNumber(W, e.format), e.min, e.max);
|
|
313
|
+
K !== b.eventValue && (b.valueIsOutOfRange = !0, b.eventValue = K, M.current = K), e.value !== b.eventValue && Q(
|
|
313
314
|
e.onChange,
|
|
314
|
-
|
|
315
|
-
|
|
315
|
+
R,
|
|
316
|
+
T(),
|
|
316
317
|
{ value: b.eventValue }
|
|
317
|
-
),
|
|
318
|
+
), f.current = void 0, u.current = b, m((le) => !le);
|
|
318
319
|
},
|
|
319
|
-
[e.value, e.onChange, e.disabled,
|
|
320
|
+
[e.value, e.onChange, e.disabled, m, T]
|
|
320
321
|
), H = n.useCallback(
|
|
321
|
-
(
|
|
322
|
+
(R) => {
|
|
322
323
|
const b = E();
|
|
323
|
-
|
|
324
|
+
h.current = !1, V(R, Ta(b, e.format, i));
|
|
324
325
|
},
|
|
325
|
-
[e.format, e.onChange, i,
|
|
326
|
+
[e.format, e.onChange, i, V, E]
|
|
326
327
|
), q = n.useCallback(
|
|
327
|
-
(
|
|
328
|
+
(R) => {
|
|
328
329
|
let b = E();
|
|
329
330
|
const W = i.parseNumber(String(b.currentLooseValue), e.format);
|
|
330
331
|
if (b.selectionEnd > b.selectionStart && b.selectionEnd - b.selectionStart === String(b.currentLooseValue).length) {
|
|
331
|
-
const K = i.numberSymbols(), ee = K &&
|
|
332
|
-
|
|
332
|
+
const K = i.numberSymbols(), ee = K && R.key === K.minusSign, le = K && R.key === K.decimal;
|
|
333
|
+
h.current = !ee && !le;
|
|
333
334
|
return;
|
|
334
335
|
}
|
|
335
|
-
switch (
|
|
336
|
+
switch (R.keyCode) {
|
|
336
337
|
case 38:
|
|
337
|
-
|
|
338
|
+
Da(
|
|
338
339
|
W,
|
|
339
340
|
b,
|
|
340
341
|
e.step,
|
|
@@ -345,7 +346,7 @@ const me = {
|
|
|
345
346
|
);
|
|
346
347
|
break;
|
|
347
348
|
case 40:
|
|
348
|
-
|
|
349
|
+
Ba(
|
|
349
350
|
W,
|
|
350
351
|
b,
|
|
351
352
|
e.step,
|
|
@@ -358,32 +359,32 @@ const me = {
|
|
|
358
359
|
case 13: {
|
|
359
360
|
if (e.rangeOnEnter === !1)
|
|
360
361
|
return;
|
|
361
|
-
const K = ue(
|
|
362
|
+
const K = ue(Ge(W, e.min, e.max), e.format, i), ee = Ge(i.parseNumber(K, e.format), e.min, e.max);
|
|
362
363
|
b.eventValue = ee, b.currentLooseValue = ue(ee, e.format, i), b.selectionStart = b.selectionEnd = b.currentLooseValue.length;
|
|
363
364
|
break;
|
|
364
365
|
}
|
|
365
366
|
case 110: {
|
|
366
367
|
const K = o.current, ee = i.numberSymbols();
|
|
367
|
-
K && (b.currentLooseValue = b.currentLooseValue.slice(0, b.selectionStart) + ee.decimal + b.currentLooseValue.slice(b.selectionEnd), b.selectionStart = b.selectionEnd = b.selectionStart + 1, b =
|
|
368
|
+
K && (b.currentLooseValue = b.currentLooseValue.slice(0, b.selectionStart) + ee.decimal + b.currentLooseValue.slice(b.selectionEnd), b.selectionStart = b.selectionEnd = b.selectionStart + 1, b = Ta(b, e.format, i));
|
|
368
369
|
break;
|
|
369
370
|
}
|
|
370
371
|
default:
|
|
371
372
|
return;
|
|
372
373
|
}
|
|
373
|
-
|
|
374
|
+
R.preventDefault(), V(R, b);
|
|
374
375
|
},
|
|
375
|
-
[e.format, e.min, e.max, e.step, e.onChange, e.rangeOnEnter,
|
|
376
|
+
[e.format, e.min, e.max, e.step, e.onChange, e.rangeOnEnter, V, E]
|
|
376
377
|
), Z = n.useCallback(
|
|
377
378
|
() => {
|
|
378
|
-
|
|
379
|
+
h.current = !0;
|
|
379
380
|
},
|
|
380
381
|
[]
|
|
381
|
-
),
|
|
382
|
-
(
|
|
382
|
+
), p = n.useCallback(
|
|
383
|
+
(R) => {
|
|
383
384
|
if (e.readOnly || e.disabled)
|
|
384
385
|
return;
|
|
385
386
|
const b = E();
|
|
386
|
-
|
|
387
|
+
Da(
|
|
387
388
|
i.parseNumber(String(b.currentLooseValue), e.format),
|
|
388
389
|
b,
|
|
389
390
|
e.step,
|
|
@@ -391,15 +392,15 @@ const me = {
|
|
|
391
392
|
e.max,
|
|
392
393
|
e.format,
|
|
393
394
|
i
|
|
394
|
-
),
|
|
395
|
+
), V(R, b);
|
|
395
396
|
},
|
|
396
|
-
[e.format, e.min, e.max, e.step, e.onChange, e.readOnly, e.disabled,
|
|
397
|
-
),
|
|
398
|
-
(
|
|
397
|
+
[e.format, e.min, e.max, e.step, e.onChange, e.readOnly, e.disabled, V, E]
|
|
398
|
+
), v = n.useCallback(
|
|
399
|
+
(R) => {
|
|
399
400
|
if (e.readOnly || e.disabled)
|
|
400
401
|
return;
|
|
401
402
|
const b = E();
|
|
402
|
-
|
|
403
|
+
Ba(
|
|
403
404
|
i.parseNumber(String(b.currentLooseValue), e.format),
|
|
404
405
|
b,
|
|
405
406
|
e.step,
|
|
@@ -407,51 +408,51 @@ const me = {
|
|
|
407
408
|
e.max,
|
|
408
409
|
e.format,
|
|
409
410
|
i
|
|
410
|
-
),
|
|
411
|
+
), V(R, b);
|
|
411
412
|
},
|
|
412
|
-
[e.format, e.min, e.max, e.step, e.onChange, e.readOnly, e.disabled,
|
|
413
|
+
[e.format, e.min, e.max, e.step, e.onChange, e.readOnly, e.disabled, V, E]
|
|
413
414
|
), g = n.useCallback(
|
|
414
|
-
(
|
|
415
|
-
const b =
|
|
416
|
-
!document || b !== o.current || !o.current || e.readOnly || e.disabled || (
|
|
415
|
+
(R) => {
|
|
416
|
+
const b = wa(document);
|
|
417
|
+
!document || b !== o.current || !o.current || e.readOnly || e.disabled || (R.nativeEvent.deltaY < 0 && p(R), R.nativeEvent.deltaY > 0 && v(R));
|
|
417
418
|
},
|
|
418
|
-
[
|
|
419
|
-
),
|
|
420
|
-
(
|
|
421
|
-
|
|
419
|
+
[p, v, e.disabled, e.readOnly]
|
|
420
|
+
), k = n.useCallback(
|
|
421
|
+
(R) => {
|
|
422
|
+
u.current.currentLooseValue = y.current, u.current.focused = !0, Q(
|
|
422
423
|
e.onFocus,
|
|
423
|
-
|
|
424
|
-
|
|
424
|
+
R,
|
|
425
|
+
T(),
|
|
425
426
|
{}
|
|
426
|
-
),
|
|
427
|
+
), m((b) => !b);
|
|
427
428
|
},
|
|
428
|
-
[e.onFocus,
|
|
429
|
+
[e.onFocus, m, T]
|
|
429
430
|
), C = n.useCallback(
|
|
430
|
-
(
|
|
431
|
-
|
|
431
|
+
(R) => {
|
|
432
|
+
u.current = Na(), Q(
|
|
432
433
|
e.onBlur,
|
|
433
|
-
|
|
434
|
-
|
|
434
|
+
R,
|
|
435
|
+
T(),
|
|
435
436
|
{}
|
|
436
|
-
),
|
|
437
|
+
), m((b) => !b);
|
|
437
438
|
},
|
|
438
|
-
[e.onBlur,
|
|
439
|
-
),
|
|
440
|
-
(
|
|
439
|
+
[e.onBlur, m, T]
|
|
440
|
+
), P = n.useCallback(
|
|
441
|
+
(R) => {
|
|
441
442
|
if (document && o.current) {
|
|
442
|
-
const b =
|
|
443
|
-
|
|
443
|
+
const b = wa(document);
|
|
444
|
+
R.preventDefault(), b !== o.current && o.current.focus();
|
|
444
445
|
}
|
|
445
446
|
},
|
|
446
447
|
[]
|
|
447
448
|
);
|
|
448
449
|
n.useLayoutEffect(
|
|
449
450
|
() => {
|
|
450
|
-
o.current && o.current.type !== "number" &&
|
|
451
|
+
o.current && o.current.type !== "number" && u.current.selectionStart !== void 0 && u.current.selectionEnd !== void 0 && (o.current.selectionStart = u.current.selectionStart, o.current.selectionEnd = u.current.selectionEnd, u.current.selectionStart = void 0, u.current.selectionEnd = void 0);
|
|
451
452
|
},
|
|
452
453
|
[d]
|
|
453
454
|
);
|
|
454
|
-
const j = !F() ||
|
|
455
|
+
const j = !F() || I().valid, J = /* @__PURE__ */ n.createElement(
|
|
455
456
|
"span",
|
|
456
457
|
{
|
|
457
458
|
dir: e.dir,
|
|
@@ -471,7 +472,7 @@ const me = {
|
|
|
471
472
|
),
|
|
472
473
|
"aria-disabled": e.disabled ? "true" : void 0
|
|
473
474
|
},
|
|
474
|
-
/* @__PURE__ */ n.createElement(
|
|
475
|
+
/* @__PURE__ */ n.createElement(N, null),
|
|
475
476
|
/* @__PURE__ */ n.createElement(
|
|
476
477
|
"input",
|
|
477
478
|
{
|
|
@@ -498,7 +499,7 @@ const me = {
|
|
|
498
499
|
readOnly: e.readOnly,
|
|
499
500
|
style: e.inputStyle,
|
|
500
501
|
onChange: H,
|
|
501
|
-
onFocus:
|
|
502
|
+
onFocus: k,
|
|
502
503
|
onBlur: C,
|
|
503
504
|
onKeyDown: q,
|
|
504
505
|
onPaste: Z,
|
|
@@ -506,13 +507,13 @@ const me = {
|
|
|
506
507
|
ref: o
|
|
507
508
|
}
|
|
508
509
|
),
|
|
509
|
-
/* @__PURE__ */ n.createElement(
|
|
510
|
+
/* @__PURE__ */ n.createElement(L, null),
|
|
510
511
|
e.children,
|
|
511
512
|
e.spinners && /* @__PURE__ */ n.createElement(
|
|
512
513
|
"span",
|
|
513
514
|
{
|
|
514
515
|
className: "k-input-spinner k-spin-button",
|
|
515
|
-
onMouseDown:
|
|
516
|
+
onMouseDown: P
|
|
516
517
|
},
|
|
517
518
|
/* @__PURE__ */ n.createElement(
|
|
518
519
|
ge,
|
|
@@ -520,12 +521,12 @@ const me = {
|
|
|
520
521
|
tabIndex: -1,
|
|
521
522
|
type: "button",
|
|
522
523
|
icon: "caret-alt-up",
|
|
523
|
-
svgIcon:
|
|
524
|
+
svgIcon: Tt,
|
|
524
525
|
rounded: null,
|
|
525
526
|
className: "k-spinner-increase",
|
|
526
|
-
"aria-label": c.toLanguageString(
|
|
527
|
-
title: c.toLanguageString(
|
|
528
|
-
onClick:
|
|
527
|
+
"aria-label": c.toLanguageString(Xe, $[Xe]),
|
|
528
|
+
title: c.toLanguageString(Xe, $[Xe]),
|
|
529
|
+
onClick: p
|
|
529
530
|
}
|
|
530
531
|
),
|
|
531
532
|
/* @__PURE__ */ n.createElement(
|
|
@@ -534,18 +535,18 @@ const me = {
|
|
|
534
535
|
tabIndex: -1,
|
|
535
536
|
type: "button",
|
|
536
537
|
icon: "caret-alt-down",
|
|
537
|
-
svgIcon:
|
|
538
|
+
svgIcon: ht,
|
|
538
539
|
rounded: null,
|
|
539
540
|
className: "k-spinner-decrease",
|
|
540
|
-
"aria-label": c.toLanguageString(
|
|
541
|
-
title: c.toLanguageString(
|
|
542
|
-
onClick:
|
|
541
|
+
"aria-label": c.toLanguageString(Ye, $[Ye]),
|
|
542
|
+
title: c.toLanguageString(Ye, $[Ye]),
|
|
543
|
+
onClick: v
|
|
543
544
|
}
|
|
544
545
|
)
|
|
545
546
|
)
|
|
546
547
|
);
|
|
547
548
|
return e.label ? /* @__PURE__ */ n.createElement(
|
|
548
|
-
|
|
549
|
+
ua,
|
|
549
550
|
{
|
|
550
551
|
label: e.label,
|
|
551
552
|
editorId: l,
|
|
@@ -559,7 +560,7 @@ const me = {
|
|
|
559
560
|
}
|
|
560
561
|
) : J;
|
|
561
562
|
});
|
|
562
|
-
|
|
563
|
+
ze.propTypes = {
|
|
563
564
|
value: r.number,
|
|
564
565
|
defaultValue: r.number,
|
|
565
566
|
step: r.number,
|
|
@@ -605,8 +606,8 @@ _e.propTypes = {
|
|
|
605
606
|
rounded: r.oneOf([null, "small", "medium", "large", "full"]),
|
|
606
607
|
fillMode: r.oneOf([null, "solid", "flat", "outline"])
|
|
607
608
|
};
|
|
608
|
-
|
|
609
|
-
|
|
609
|
+
ze.displayName = "KendoNumericTextBox";
|
|
610
|
+
ze.defaultProps = {
|
|
610
611
|
prefix: (a) => null,
|
|
611
612
|
suffix: (a) => null,
|
|
612
613
|
step: 1,
|
|
@@ -625,47 +626,47 @@ _e.defaultProps = {
|
|
|
625
626
|
rounded: "medium",
|
|
626
627
|
fillMode: "solid"
|
|
627
628
|
};
|
|
628
|
-
const ae = (a) => a != null, se = (a, t, e) => !ae(a) || isNaN(a) || a <= t ? t : a >= e ? e : a,
|
|
629
|
+
const ae = (a) => a != null, se = (a, t, e) => !ae(a) || isNaN(a) || a <= t ? t : a >= e ? e : a, Ne = (a, t, e = !0) => {
|
|
629
630
|
if (["hex", "rgba"].indexOf(t) === -1)
|
|
630
631
|
throw new Error(`Unsupported color output format '${t}'. The available options are 'hex' or 'rgba'.`);
|
|
631
632
|
if (!ae(a))
|
|
632
633
|
return;
|
|
633
|
-
const l =
|
|
634
|
+
const l = mt(a.trim(), e);
|
|
634
635
|
if (ae(l))
|
|
635
636
|
return t === "hex" ? l.toCss() : l.toCssRgba();
|
|
636
|
-
},
|
|
637
|
-
const e =
|
|
637
|
+
}, Dt = (a, t = !0) => {
|
|
638
|
+
const e = mt(a, t);
|
|
638
639
|
return ae(e) ? e.toHSV() : {};
|
|
639
|
-
},
|
|
640
|
-
const e =
|
|
640
|
+
}, Ke = (a, t = !0) => {
|
|
641
|
+
const e = mt(a, t);
|
|
641
642
|
return ae(e) ? e.toBytes() : {};
|
|
642
|
-
},
|
|
643
|
+
}, fa = (a) => {
|
|
643
644
|
const t = se(a.h, 0, 359.9), e = se(a.s, 0, 1), s = se(a.v, 0, 1), l = se(a.a, 0, 1);
|
|
644
|
-
return
|
|
645
|
-
},
|
|
645
|
+
return an.fromHSV(t, e, s, l).toCssRgba();
|
|
646
|
+
}, rt = (a) => fa({ h: a, s: 1, v: 1, a: 1 }), ns = (a) => {
|
|
646
647
|
const t = se(a.r, 0, 255), e = se(a.g, 0, 255), s = se(a.b, 0, 255), l = se(a.a, 0, 1);
|
|
647
|
-
return
|
|
648
|
-
},
|
|
649
|
-
const e = se(a.r, 0, 255), s = se(a.g, 0, 255), l = se(a.b, 0, 255), i = se(a.a, 0, 1), c = se(t.r, 0, 255), o = se(t.g, 0, 255),
|
|
648
|
+
return an.fromBytes(t, e, s, l).toCssRgba();
|
|
649
|
+
}, za = (a, t) => {
|
|
650
|
+
const e = se(a.r, 0, 255), s = se(a.g, 0, 255), l = se(a.b, 0, 255), i = se(a.a, 0, 1), c = se(t.r, 0, 255), o = se(t.g, 0, 255), f = se(t.b, 0, 255);
|
|
650
651
|
return {
|
|
651
652
|
r: Math.round((1 - i) * c + i * e),
|
|
652
653
|
g: Math.round((1 - i) * o + i * s),
|
|
653
|
-
b: Math.round((1 - i) *
|
|
654
|
+
b: Math.round((1 - i) * f + i * l)
|
|
654
655
|
};
|
|
655
|
-
},
|
|
656
|
+
}, _a = (a) => {
|
|
656
657
|
let t = [a.r || 0, a.g || 0, a.b || 0].map(function(e) {
|
|
657
658
|
return e /= 255, e <= 0.03928 ? e / 12.92 : Math.pow((e + 0.055) / 1.055, 2.4);
|
|
658
659
|
});
|
|
659
660
|
return t[0] * 0.2126 + t[1] * 0.7152 + t[2] * 0.0722;
|
|
660
|
-
},
|
|
661
|
+
}, ss = (a, t) => {
|
|
661
662
|
const e = Math.max(a, t), s = Math.min(a, t);
|
|
662
663
|
return (e + 0.05) / (s + 0.05);
|
|
663
|
-
},
|
|
664
|
-
za(
|
|
665
|
-
za(
|
|
666
|
-
),
|
|
664
|
+
}, bn = (a, t) => ss(
|
|
665
|
+
_a(za(a, t)),
|
|
666
|
+
_a(za(t, { r: 0, g: 0, b: 0, a: 1 }))
|
|
667
|
+
), ra = class extends n.Component {
|
|
667
668
|
constructor(a) {
|
|
668
|
-
super(a), this._input = null, this.
|
|
669
|
+
super(a), this._input = null, this.focus = () => {
|
|
669
670
|
this._input && this._input.focus();
|
|
670
671
|
}, this.isInvalid = (t) => {
|
|
671
672
|
let e = !1;
|
|
@@ -691,9 +692,12 @@ const ae = (a) => a != null, se = (a, t, e) => !ae(a) || isNaN(a) || a <= t ? t
|
|
|
691
692
|
e && e.classList.contains("k-empty") && e.classList.remove("k-empty");
|
|
692
693
|
}
|
|
693
694
|
}, pe(me), this.state = {
|
|
694
|
-
value: this.props.defaultValue ||
|
|
695
|
+
value: this.props.defaultValue || ra.defaultProps.defaultValue
|
|
695
696
|
};
|
|
696
697
|
}
|
|
698
|
+
get _inputId() {
|
|
699
|
+
return this.props.id;
|
|
700
|
+
}
|
|
697
701
|
/**
|
|
698
702
|
* Gets the native input element of the Input component.
|
|
699
703
|
*/
|
|
@@ -736,7 +740,7 @@ const ae = (a) => a != null, se = (a, t, e) => !ae(a) || isNaN(a) || a <= t ? t
|
|
|
736
740
|
* @hidden
|
|
737
741
|
*/
|
|
738
742
|
get validityStyles() {
|
|
739
|
-
return this.props.validityStyles !== void 0 ? this.props.validityStyles :
|
|
743
|
+
return this.props.validityStyles !== void 0 ? this.props.validityStyles : ra.defaultProps.validityStyles;
|
|
740
744
|
}
|
|
741
745
|
/**
|
|
742
746
|
* @hidden
|
|
@@ -764,54 +768,54 @@ const ae = (a) => a != null, se = (a, t, e) => !ae(a) || isNaN(a) || a <= t ? t
|
|
|
764
768
|
valid: c,
|
|
765
769
|
// Removed to support direct use in Form Field component
|
|
766
770
|
visited: o,
|
|
767
|
-
touched:
|
|
771
|
+
touched: f,
|
|
768
772
|
modified: d,
|
|
769
|
-
ariaLabelledBy:
|
|
770
|
-
ariaDescribedBy:
|
|
771
|
-
validityStyles:
|
|
772
|
-
style:
|
|
773
|
-
ariaLabel:
|
|
773
|
+
ariaLabelledBy: m,
|
|
774
|
+
ariaDescribedBy: u,
|
|
775
|
+
validityStyles: h,
|
|
776
|
+
style: y,
|
|
777
|
+
ariaLabel: M,
|
|
774
778
|
...D
|
|
775
|
-
} = this.props,
|
|
779
|
+
} = this.props, N = s || this._inputId, L = !this.validityStyles || this.validity.valid, S = G(a, "k-input k-input-md k-rounded-md k-input-solid"), w = /* @__PURE__ */ n.createElement(
|
|
776
780
|
"input",
|
|
777
781
|
{
|
|
778
|
-
"aria-labelledby":
|
|
779
|
-
"aria-describedby":
|
|
782
|
+
"aria-labelledby": m,
|
|
783
|
+
"aria-describedby": u,
|
|
780
784
|
"aria-disabled": this.props.disabled || void 0,
|
|
781
|
-
"aria-invalid": !
|
|
782
|
-
"aria-label":
|
|
785
|
+
"aria-invalid": !L || void 0,
|
|
786
|
+
"aria-label": M || void 0,
|
|
783
787
|
...D,
|
|
784
|
-
style: t ? void 0 :
|
|
788
|
+
style: t ? void 0 : y,
|
|
785
789
|
value: this.value,
|
|
786
|
-
id:
|
|
790
|
+
id: N,
|
|
787
791
|
className: S,
|
|
788
792
|
onChange: this.handleChange,
|
|
789
793
|
onAnimationStart: this.handleAutoFill,
|
|
790
|
-
ref: (
|
|
791
|
-
this._input =
|
|
794
|
+
ref: (B) => {
|
|
795
|
+
this._input = B;
|
|
792
796
|
}
|
|
793
797
|
}
|
|
794
798
|
);
|
|
795
799
|
return t ? /* @__PURE__ */ n.createElement(
|
|
796
|
-
|
|
800
|
+
ua,
|
|
797
801
|
{
|
|
798
802
|
label: t,
|
|
799
803
|
labelClassName: e,
|
|
800
|
-
editorId:
|
|
804
|
+
editorId: N,
|
|
801
805
|
editorValue: String(this.value),
|
|
802
|
-
editorValid:
|
|
806
|
+
editorValid: L,
|
|
803
807
|
editorDisabled: D.disabled,
|
|
804
808
|
editorPlaceholder: D.placeholder,
|
|
805
|
-
children:
|
|
806
|
-
style:
|
|
809
|
+
children: w,
|
|
810
|
+
style: y,
|
|
807
811
|
dir: D.dir
|
|
808
812
|
}
|
|
809
|
-
) :
|
|
813
|
+
) : w;
|
|
810
814
|
}
|
|
811
815
|
};
|
|
812
|
-
let
|
|
813
|
-
|
|
814
|
-
|
|
816
|
+
let gt = ra;
|
|
817
|
+
gt.displayName = "Input";
|
|
818
|
+
gt.propTypes = {
|
|
815
819
|
label: r.string,
|
|
816
820
|
labelClassName: r.string,
|
|
817
821
|
validationMessage: r.string,
|
|
@@ -822,25 +826,25 @@ mt.propTypes = {
|
|
|
822
826
|
ariaDescribedBy: r.string,
|
|
823
827
|
ariaLabel: r.string
|
|
824
828
|
};
|
|
825
|
-
|
|
829
|
+
gt.defaultProps = {
|
|
826
830
|
defaultValue: "",
|
|
827
831
|
required: !1,
|
|
828
832
|
validityStyles: !0
|
|
829
833
|
};
|
|
830
|
-
const
|
|
831
|
-
|
|
832
|
-
class
|
|
834
|
+
const rs = he(), vn = et(Ue(rs, gt));
|
|
835
|
+
vn.displayName = "KendoReactInput";
|
|
836
|
+
class is extends n.Component {
|
|
833
837
|
constructor(t) {
|
|
834
838
|
super(t), this.onChange = (e) => {
|
|
835
|
-
const s = e.target.value, l =
|
|
839
|
+
const s = e.target.value, l = Ne(s, "rgba");
|
|
836
840
|
this.setState({ hex: s }), ae(l) && this.props.onHexChange(s, l, e);
|
|
837
841
|
}, this.onBlur = () => {
|
|
838
|
-
ae(
|
|
842
|
+
ae(Ne(this.state.hex, "rgba")) || this.setState({ hex: this.state.originalHex });
|
|
839
843
|
}, this.state = { hex: this.props.hex, originalHex: this.props.hex };
|
|
840
844
|
}
|
|
841
845
|
render() {
|
|
842
846
|
return /* @__PURE__ */ n.createElement(
|
|
843
|
-
|
|
847
|
+
vn,
|
|
844
848
|
{
|
|
845
849
|
value: this.state.hex,
|
|
846
850
|
onChange: this.onChange,
|
|
@@ -853,8 +857,8 @@ class rs extends n.Component {
|
|
|
853
857
|
return t.hex !== e.originalHex ? { hex: t.hex, originalHex: t.hex } : null;
|
|
854
858
|
}
|
|
855
859
|
}
|
|
856
|
-
const
|
|
857
|
-
class
|
|
860
|
+
const Be = ["rgba", "rgb", "hex"];
|
|
861
|
+
class ha extends n.Component {
|
|
858
862
|
constructor(t) {
|
|
859
863
|
super(t), this.onRgbaRChange = (e) => {
|
|
860
864
|
this.dispatchRgbaChange({ r: e.value }, e);
|
|
@@ -864,29 +868,29 @@ class fa extends n.Component {
|
|
|
864
868
|
this.dispatchRgbaChange({ b: e.value }, e);
|
|
865
869
|
}, this.onRgbaAChange = (e) => {
|
|
866
870
|
this.dispatchRgbaChange({ a: e.value }, e);
|
|
867
|
-
}, this.state = { inputMode: t.defaultInputMode ||
|
|
871
|
+
}, this.state = { inputMode: t.defaultInputMode || Be[1] };
|
|
868
872
|
}
|
|
869
873
|
render() {
|
|
870
|
-
const t =
|
|
874
|
+
const t = Je(this), e = t.toLanguageString(Fe, $[ln]), s = t.toLanguageString(Fe, $[Fe]), l = t.toLanguageString(Fe, $[nn]), i = t.toLanguageString(Fe, $[sn]), c = t.toLanguageString(Fe, $[rn]), o = t.toLanguageString(Wt, $[Wt]);
|
|
871
875
|
return /* @__PURE__ */ n.createElement("div", { className: "k-colorgradient-inputs k-hstack" }, /* @__PURE__ */ n.createElement("div", { className: "k-vstack" }, /* @__PURE__ */ n.createElement(
|
|
872
876
|
ge,
|
|
873
877
|
{
|
|
874
878
|
"aria-label": o,
|
|
875
879
|
fillMode: "flat",
|
|
876
880
|
icon: "caret-alt-expand",
|
|
877
|
-
svgIcon:
|
|
881
|
+
svgIcon: On,
|
|
878
882
|
className: "k-colorgradient-toggle-mode k-icon-button",
|
|
879
883
|
onClick: this.onToggleModeChange.bind(this)
|
|
880
884
|
}
|
|
881
885
|
)), this.state.inputMode === "hex" && /* @__PURE__ */ n.createElement("div", { className: "k-vstack k-flex-1" }, /* @__PURE__ */ n.createElement("span", { className: "k-hex-value k-textbox k-input" }, /* @__PURE__ */ n.createElement(
|
|
882
|
-
|
|
886
|
+
is,
|
|
883
887
|
{
|
|
884
888
|
hex: this.props.hex,
|
|
885
889
|
onHexChange: this.props.onHexChange,
|
|
886
890
|
disabled: this.props.disabled
|
|
887
891
|
}
|
|
888
|
-
)), /* @__PURE__ */ n.createElement(
|
|
889
|
-
|
|
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
|
+
ze,
|
|
890
894
|
{
|
|
891
895
|
inputType: "number",
|
|
892
896
|
value: this.props.rgba.r,
|
|
@@ -898,8 +902,8 @@ class fa extends n.Component {
|
|
|
898
902
|
onChange: this.onRgbaRChange,
|
|
899
903
|
disabled: this.props.disabled
|
|
900
904
|
}
|
|
901
|
-
), /* @__PURE__ */ n.createElement(
|
|
902
|
-
|
|
905
|
+
), /* @__PURE__ */ n.createElement(We, { className: "k-colorgradient-input-label" }, s)), /* @__PURE__ */ n.createElement("div", { className: "k-vstack" }, /* @__PURE__ */ n.createElement(
|
|
906
|
+
ze,
|
|
903
907
|
{
|
|
904
908
|
inputType: "number",
|
|
905
909
|
value: this.props.rgba.g,
|
|
@@ -911,8 +915,8 @@ class fa extends n.Component {
|
|
|
911
915
|
onChange: this.onRgbaGChange,
|
|
912
916
|
disabled: this.props.disabled
|
|
913
917
|
}
|
|
914
|
-
), /* @__PURE__ */ n.createElement(
|
|
915
|
-
|
|
918
|
+
), /* @__PURE__ */ n.createElement(We, { className: "k-colorgradient-input-label" }, l)), /* @__PURE__ */ n.createElement("div", { className: "k-vstack" }, /* @__PURE__ */ n.createElement(
|
|
919
|
+
ze,
|
|
916
920
|
{
|
|
917
921
|
inputType: "number",
|
|
918
922
|
value: this.props.rgba.b,
|
|
@@ -924,8 +928,8 @@ class fa extends n.Component {
|
|
|
924
928
|
onChange: this.onRgbaBChange,
|
|
925
929
|
disabled: this.props.disabled
|
|
926
930
|
}
|
|
927
|
-
), /* @__PURE__ */ n.createElement(
|
|
928
|
-
|
|
931
|
+
), /* @__PURE__ */ n.createElement(We, { className: "k-colorgradient-input-label" }, i))), this.state.inputMode === "rgba" && /* @__PURE__ */ n.createElement("div", { className: "k-vstack" }, this.props.opacity && /* @__PURE__ */ n.createElement(
|
|
932
|
+
ze,
|
|
929
933
|
{
|
|
930
934
|
inputType: "number",
|
|
931
935
|
value: this.props.rgba.a,
|
|
@@ -938,26 +942,26 @@ class fa extends n.Component {
|
|
|
938
942
|
onChange: this.onRgbaAChange,
|
|
939
943
|
disabled: this.props.disabled
|
|
940
944
|
}
|
|
941
|
-
), this.props.opacity && /* @__PURE__ */ n.createElement(
|
|
945
|
+
), this.props.opacity && /* @__PURE__ */ n.createElement(We, { className: "k-colorgradient-input-label" }, c)));
|
|
942
946
|
}
|
|
943
947
|
dispatchRgbaChange(t, e) {
|
|
944
948
|
let s = { ...this.props.rgba };
|
|
945
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);
|
|
946
950
|
}
|
|
947
951
|
onToggleModeChange() {
|
|
948
|
-
const t =
|
|
952
|
+
const t = Be.length - 1 === Be.indexOf(this.state.inputMode) ? 0 : Be.indexOf(this.state.inputMode) + 1;
|
|
949
953
|
if (this.props.opacity)
|
|
950
|
-
this.setState({ inputMode:
|
|
954
|
+
this.setState({ inputMode: Be[t] });
|
|
951
955
|
else {
|
|
952
|
-
const e =
|
|
953
|
-
this.setState({ inputMode:
|
|
956
|
+
const e = Be[t] === "rgba" ? t + 1 : t;
|
|
957
|
+
this.setState({ inputMode: Be[e] });
|
|
954
958
|
}
|
|
955
959
|
}
|
|
956
960
|
}
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
const
|
|
960
|
-
const t = n.useRef(null), e =
|
|
961
|
+
Nn(ha);
|
|
962
|
+
da(ha);
|
|
963
|
+
const kn = "data-slider-label", Lr = (a) => {
|
|
964
|
+
const t = n.useRef(null), e = Ae(t), s = a.vertical ? { bottom: `${a.position}%` } : { [e === "rtl" ? "right" : "left"]: `${a.position}%` }, l = a.vertical ? "k-tick-vertical" : "k-tick-horizontal";
|
|
961
965
|
return /* @__PURE__ */ n.createElement(
|
|
962
966
|
"li",
|
|
963
967
|
{
|
|
@@ -973,7 +977,7 @@ const vn = "data-slider-label", Ir = (a) => {
|
|
|
973
977
|
a.children && /* @__PURE__ */ n.createElement(
|
|
974
978
|
"span",
|
|
975
979
|
{
|
|
976
|
-
[
|
|
980
|
+
[kn]: !0,
|
|
977
981
|
className: "k-label",
|
|
978
982
|
onClick: a.onClick
|
|
979
983
|
},
|
|
@@ -981,7 +985,7 @@ const vn = "data-slider-label", Ir = (a) => {
|
|
|
981
985
|
)
|
|
982
986
|
);
|
|
983
987
|
};
|
|
984
|
-
class
|
|
988
|
+
class bt extends n.Component {
|
|
985
989
|
constructor(t) {
|
|
986
990
|
super(t), this.state = {
|
|
987
991
|
value: this.props.defaultValue === void 0 ? this.props.min : this.props.defaultValue,
|
|
@@ -990,7 +994,7 @@ class gt extends n.Component {
|
|
|
990
994
|
}, this._sliderTrack = null, this._element = null, this.buttons = (e) => {
|
|
991
995
|
if (!e.enabled)
|
|
992
996
|
return e.children;
|
|
993
|
-
const s = this.state.dir === "rtl" ? this.props.vertical ?
|
|
997
|
+
const s = this.state.dir === "rtl" ? this.props.vertical ? Tt : Ia : this.props.vertical ? Tt : La, l = this.state.dir === "rtl" ? this.props.vertical ? ht : La : this.props.vertical ? ht : Ia, i = 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";
|
|
994
998
|
return /* @__PURE__ */ n.createElement(n.Fragment, null, /* @__PURE__ */ n.createElement(
|
|
995
999
|
ge,
|
|
996
1000
|
{
|
|
@@ -1017,7 +1021,7 @@ class gt extends n.Component {
|
|
|
1017
1021
|
}, this.isLabel = (e) => {
|
|
1018
1022
|
let s = e;
|
|
1019
1023
|
for (; s; ) {
|
|
1020
|
-
if (s.getAttribute(
|
|
1024
|
+
if (s.getAttribute(kn))
|
|
1021
1025
|
return !0;
|
|
1022
1026
|
s = s.parentElement;
|
|
1023
1027
|
}
|
|
@@ -1062,7 +1066,7 @@ class gt extends n.Component {
|
|
|
1062
1066
|
* @hidden
|
|
1063
1067
|
*/
|
|
1064
1068
|
render() {
|
|
1065
|
-
const t =
|
|
1069
|
+
const t = Je(this), e = (this.state.value - this.props.min) / (this.props.max - this.props.min) * 100, s = this.props.vertical ? { marginTop: "0.5rem", marginBottom: "0.5rem" } : { marginLeft: "0.5rem", marginRight: "0.5rem" }, l = this.props.vertical ? { paddingTop: 0, height: "100%" } : {};
|
|
1066
1070
|
return /* @__PURE__ */ n.createElement(
|
|
1067
1071
|
"div",
|
|
1068
1072
|
{
|
|
@@ -1090,10 +1094,10 @@ class gt extends n.Component {
|
|
|
1090
1094
|
enabled: this.props.buttons,
|
|
1091
1095
|
decrement: this.decrement,
|
|
1092
1096
|
increment: this.increment,
|
|
1093
|
-
incrementTitle: t.toLanguageString(
|
|
1094
|
-
decrementTitle: t.toLanguageString(
|
|
1097
|
+
incrementTitle: t.toLanguageString(_t, $[_t]),
|
|
1098
|
+
decrementTitle: t.toLanguageString(At, $[At])
|
|
1095
1099
|
},
|
|
1096
|
-
/* @__PURE__ */ n.createElement(
|
|
1100
|
+
/* @__PURE__ */ n.createElement(en, { onDrag: this.dragOver, onPress: this.dragStart }, /* @__PURE__ */ n.createElement(
|
|
1097
1101
|
"div",
|
|
1098
1102
|
{
|
|
1099
1103
|
className: "k-slider-track-wrap",
|
|
@@ -1148,7 +1152,7 @@ class gt extends n.Component {
|
|
|
1148
1152
|
"aria-label": this.props.ariaLabel,
|
|
1149
1153
|
tabIndex: ie(this.props.tabIndex, this.props.disabled, void 0),
|
|
1150
1154
|
className: "k-draghandle",
|
|
1151
|
-
title: t.toLanguageString(
|
|
1155
|
+
title: t.toLanguageString(Te, $[Te]),
|
|
1152
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 }
|
|
1153
1157
|
}
|
|
1154
1158
|
)
|
|
@@ -1167,8 +1171,8 @@ class gt extends n.Component {
|
|
|
1167
1171
|
e = Math.min(Math.max(e, this.props.min), this.props.max), this.setState({ value: e }), Q(this.props.onChange, t, this, { value: e });
|
|
1168
1172
|
}
|
|
1169
1173
|
}
|
|
1170
|
-
|
|
1171
|
-
|
|
1174
|
+
bt.displayName = "Slider";
|
|
1175
|
+
bt.propTypes = {
|
|
1172
1176
|
min: r.number.isRequired,
|
|
1173
1177
|
max: r.number.isRequired,
|
|
1174
1178
|
value: r.number,
|
|
@@ -1179,51 +1183,51 @@ gt.propTypes = {
|
|
|
1179
1183
|
ariaLabel: r.string
|
|
1180
1184
|
// TODO: validation when buttons is set to true, but no step is provided
|
|
1181
1185
|
};
|
|
1182
|
-
const
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
const
|
|
1186
|
-
function ls(a, t, e) {
|
|
1187
|
-
He[a] = { value: t, hsva: e };
|
|
1188
|
-
}
|
|
1186
|
+
const ls = he(), ia = Ue(ls, bt);
|
|
1187
|
+
ia.displayName = "KendoReactSlider";
|
|
1188
|
+
da(bt);
|
|
1189
|
+
const $e = {};
|
|
1189
1190
|
function os(a, t, e) {
|
|
1190
|
-
|
|
1191
|
+
$e[a] = { value: t, hsva: e };
|
|
1191
1192
|
}
|
|
1192
1193
|
function cs(a, t, e) {
|
|
1193
|
-
|
|
1194
|
+
$e[a] = { value: t, rgba: e };
|
|
1195
|
+
}
|
|
1196
|
+
function ds(a, t, e) {
|
|
1197
|
+
$e[a] = { value: t, hex: e };
|
|
1194
1198
|
}
|
|
1195
|
-
function
|
|
1196
|
-
delete
|
|
1199
|
+
function us(a) {
|
|
1200
|
+
delete $e[a];
|
|
1197
1201
|
}
|
|
1198
|
-
function
|
|
1202
|
+
function fs(a, t) {
|
|
1199
1203
|
if (a) {
|
|
1200
|
-
const e =
|
|
1204
|
+
const e = $e[a];
|
|
1201
1205
|
return e && e.value === t ? e.hex : void 0;
|
|
1202
1206
|
} else
|
|
1203
1207
|
return;
|
|
1204
1208
|
}
|
|
1205
|
-
function
|
|
1209
|
+
function hs(a, t) {
|
|
1206
1210
|
if (a) {
|
|
1207
|
-
const e =
|
|
1211
|
+
const e = $e[a];
|
|
1208
1212
|
return e && e.value === t ? e.hsva : void 0;
|
|
1209
1213
|
} else
|
|
1210
1214
|
return;
|
|
1211
1215
|
}
|
|
1212
|
-
function
|
|
1216
|
+
function ps(a, t) {
|
|
1213
1217
|
if (a) {
|
|
1214
|
-
const e =
|
|
1218
|
+
const e = $e[a];
|
|
1215
1219
|
return e && e.value === t ? e.rgba : void 0;
|
|
1216
1220
|
} else
|
|
1217
1221
|
return;
|
|
1218
1222
|
}
|
|
1219
|
-
class
|
|
1223
|
+
class yn extends n.Component {
|
|
1220
1224
|
render() {
|
|
1221
|
-
const t =
|
|
1222
|
-
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($t, $[$t]), s = t.toLanguageString(Ht, $[Ht]), l = t.toLanguageString(Gt, $[Gt]), i = t.toLanguageString(Kt, $[Kt]), c = t.toLanguageString(qt, $[qt]), o = bn(this.props.rgba, this.props.bgColor), f = 4.5.toFixed(1), d = 7 .toFixed(1), m = `${e}: ${o.toFixed(2)}`, u = `${s}: ${f}`, h = `${l}: ${d}`, y = /* @__PURE__ */ n.createElement("span", { className: "k-contrast-validation k-text-success" }, i, " ", /* @__PURE__ */ n.createElement(fe, { name: "check", icon: Rt })), M = /* @__PURE__ */ n.createElement("span", { className: "k-contrast-validation k-text-error" }, c, " ", /* @__PURE__ */ n.createElement(fe, { name: "x", icon: zt }));
|
|
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" }, m), o >= 4.5 ? /* @__PURE__ */ n.createElement("span", { className: "k-contrast-validation k-text-success" }, /* @__PURE__ */ n.createElement(fe, { name: "check", icon: Rt }), o >= 7 && /* @__PURE__ */ n.createElement(fe, { name: "check", icon: Rt })) : /* @__PURE__ */ n.createElement("span", { className: "k-contrast-validation k-text-error" }, /* @__PURE__ */ n.createElement(fe, { name: "x", icon: zt }))), /* @__PURE__ */ n.createElement("div", null, /* @__PURE__ */ n.createElement("span", null, u), o >= 4.5 ? y : M), /* @__PURE__ */ n.createElement("div", null, /* @__PURE__ */ n.createElement("span", null, h), o >= 7 ? y : M));
|
|
1223
1227
|
}
|
|
1224
1228
|
}
|
|
1225
|
-
|
|
1226
|
-
const
|
|
1229
|
+
da(yn);
|
|
1230
|
+
const it = (a, t) => a.length === 0 ? "" : `<path d="${a.reduce(
|
|
1227
1231
|
(s, l, i, c) => i === 0 ? (
|
|
1228
1232
|
// if first point
|
|
1229
1233
|
`M ${l[0]},${l[1]}`
|
|
@@ -1232,33 +1236,33 @@ const rt = (a, t) => a.length === 0 ? "" : `<path d="${a.reduce(
|
|
|
1232
1236
|
`${s} ${t(l, i, c)}`
|
|
1233
1237
|
),
|
|
1234
1238
|
""
|
|
1235
|
-
)}" fill="none" stroke="white" stroke-width="1"/>`,
|
|
1239
|
+
)}" fill="none" stroke="white" stroke-width="1"/>`, ms = (a, t) => {
|
|
1236
1240
|
const e = t[0] - a[0], s = t[1] - a[1];
|
|
1237
1241
|
return {
|
|
1238
1242
|
length: Math.sqrt(Math.pow(e, 2) + Math.pow(s, 2)),
|
|
1239
1243
|
angle: Math.atan2(s, e)
|
|
1240
1244
|
};
|
|
1241
|
-
},
|
|
1242
|
-
const i = e || t, c = s || t, o = 0.1,
|
|
1243
|
-
return [
|
|
1244
|
-
},
|
|
1245
|
+
}, gs = (a) => (t, e, s, l) => {
|
|
1246
|
+
const i = e || t, c = s || t, o = 0.1, f = a(i, c), d = f.angle + (l ? Math.PI : 0), m = f.length * o, u = t[0] + Math.cos(d) * m, h = t[1] + Math.sin(d) * m;
|
|
1247
|
+
return [u, h];
|
|
1248
|
+
}, bs = (a) => (t, e, s) => {
|
|
1245
1249
|
const [l, i] = a(s[e - 1], s[e - 2], t), [c, o] = a(t, s[e - 1], s[e + 1], !0);
|
|
1246
1250
|
return `C ${l},${i} ${c},${o} ${t[0]},${t[1]}`;
|
|
1247
|
-
},
|
|
1248
|
-
class
|
|
1251
|
+
}, Aa = 4.5, $a = 7, lt = 16;
|
|
1252
|
+
class vs extends n.Component {
|
|
1249
1253
|
renderSvgCurveLine() {
|
|
1250
|
-
const t = this.props.metrics, e = (i, c, o,
|
|
1251
|
-
const
|
|
1252
|
-
return o + 0.5 >
|
|
1254
|
+
const t = this.props.metrics, e = (i, c, o, f, d) => {
|
|
1255
|
+
const m = (o + f) / 2, u = Object.assign({}, this.props.hsva, { s: c / t.width, v: 1 - m / t.height }), h = bn(Ke(fa(u)), Ke(this.props.backgroundColor || ""));
|
|
1256
|
+
return o + 0.5 > f ? h < i + 1 && h > i - 1 ? m : null : d(h, i) ? e(i, c, o, f - (f - o) / 2, d) : e(i, c, o + (f - o) / 2, f, d);
|
|
1253
1257
|
}, s = (i, c, o = !1) => {
|
|
1254
|
-
const
|
|
1258
|
+
const f = [];
|
|
1255
1259
|
for (let d = 0; d <= t.width; d += t.width / c) {
|
|
1256
|
-
const
|
|
1257
|
-
|
|
1260
|
+
const m = e(i, d, 0, t.height, o ? (u, h) => u < h : (u, h) => u > h);
|
|
1261
|
+
m !== null && f.push([d, m]);
|
|
1258
1262
|
}
|
|
1259
|
-
return
|
|
1260
|
-
}, l = gs(ms
|
|
1261
|
-
return
|
|
1263
|
+
return f;
|
|
1264
|
+
}, l = bs(gs(ms));
|
|
1265
|
+
return it(s(Aa, lt), l) + it(s(Aa, lt, !0), l) + it(s($a, lt), l) + it(s($a, lt, !0), l);
|
|
1262
1266
|
}
|
|
1263
1267
|
shouldComponentUpdate(t) {
|
|
1264
1268
|
return !(t.hsva.h === this.props.hsva.h && t.hsva.a === this.props.hsva.a && this.props.backgroundColor === t.backgroundColor);
|
|
@@ -1282,22 +1286,22 @@ class bs extends n.Component {
|
|
|
1282
1286
|
);
|
|
1283
1287
|
}
|
|
1284
1288
|
}
|
|
1285
|
-
const
|
|
1289
|
+
const ks = "rgba", Ha = "rgba(255, 255, 255, 1)", la = class extends n.Component {
|
|
1286
1290
|
constructor(a) {
|
|
1287
1291
|
super(a), this.wrapper = null, this.onHexChange = (e, s, l) => {
|
|
1288
1292
|
if (this.isUncontrolled) {
|
|
1289
|
-
const i =
|
|
1290
|
-
this.setState({ hsva: i, backgroundColor:
|
|
1293
|
+
const i = Dt(s);
|
|
1294
|
+
this.setState({ hsva: i, backgroundColor: rt(i.h), rgba: Ke(s), hex: e });
|
|
1291
1295
|
} else
|
|
1292
|
-
|
|
1296
|
+
ds(this.state.guid, s, e);
|
|
1293
1297
|
this.dispatchChangeEvent(s, l, l.nativeEvent);
|
|
1294
1298
|
}, this.onRgbaChange = (e, s) => {
|
|
1295
|
-
const l =
|
|
1299
|
+
const l = ns(e);
|
|
1296
1300
|
if (this.isUncontrolled) {
|
|
1297
|
-
const i =
|
|
1298
|
-
this.setState({ hsva: i, backgroundColor:
|
|
1301
|
+
const i = Dt(l), c = Ne(l, "hex");
|
|
1302
|
+
this.setState({ hsva: i, backgroundColor: rt(i.h), rgba: e, hex: c });
|
|
1299
1303
|
} else
|
|
1300
|
-
|
|
1304
|
+
cs(this.state.guid, l, e);
|
|
1301
1305
|
this.dispatchChangeEvent(l, s.syntheticEvent, s.nativeEvent);
|
|
1302
1306
|
}, this.onAlphaSliderChange = (e) => {
|
|
1303
1307
|
this.handleHsvaChange(
|
|
@@ -1318,28 +1322,28 @@ const vs = "rgba", $a = "rgba(255, 255, 255, 1)", ia = class extends n.Component
|
|
|
1318
1322
|
}, this.onGradientWrapperClick = (e) => {
|
|
1319
1323
|
this.changePosition(e);
|
|
1320
1324
|
}, this.changePosition = (e) => {
|
|
1321
|
-
const s = this.getGradientRectMetrics(), l = e.clientX - s.left, i = e.clientY - s.top, c = se(l, 0, s.width), o = se(i, 0, s.height),
|
|
1325
|
+
const s = this.getGradientRectMetrics(), l = e.clientX - s.left, i = e.clientY - s.top, c = se(l, 0, s.width), o = se(i, 0, s.height), f = Object.assign(
|
|
1322
1326
|
{},
|
|
1323
1327
|
this.state.hsva,
|
|
1324
1328
|
{ s: c / s.width, v: 1 - o / s.height }
|
|
1325
1329
|
);
|
|
1326
|
-
this.handleHsvaChange(
|
|
1330
|
+
this.handleHsvaChange(f, e, e.nativeEvent);
|
|
1327
1331
|
}, this.onFocus = (e) => {
|
|
1328
1332
|
this.props.onFocus && this.props.onFocus.call(
|
|
1329
1333
|
void 0,
|
|
1330
1334
|
{ nativeEvent: e, target: this }
|
|
1331
1335
|
);
|
|
1332
1336
|
}, this.focus = () => {
|
|
1333
|
-
|
|
1337
|
+
tn(this.wrapper);
|
|
1334
1338
|
}, pe(me);
|
|
1335
|
-
const t = a.value || a.defaultValue ||
|
|
1336
|
-
this.state = Object.assign({},
|
|
1339
|
+
const t = a.value || a.defaultValue || Ne(Ha, ks);
|
|
1340
|
+
this.state = Object.assign({}, la.getStateFromValue(t), { isFirstRender: !0, guid: this.props.id });
|
|
1337
1341
|
}
|
|
1338
1342
|
/**
|
|
1339
1343
|
* @hidden
|
|
1340
1344
|
*/
|
|
1341
1345
|
static getDerivedStateFromProps(a, t) {
|
|
1342
|
-
return a.value && !t.isFirstRender ?
|
|
1346
|
+
return a.value && !t.isFirstRender ? la.getStateFromValue(a.value, t.guid) : null;
|
|
1343
1347
|
}
|
|
1344
1348
|
/**
|
|
1345
1349
|
* @hidden
|
|
@@ -1351,7 +1355,7 @@ const vs = "rgba", $a = "rgba(255, 255, 255, 1)", ia = class extends n.Component
|
|
|
1351
1355
|
* @hidden
|
|
1352
1356
|
*/
|
|
1353
1357
|
componentWillUnmount() {
|
|
1354
|
-
|
|
1358
|
+
us(this.state.guid);
|
|
1355
1359
|
}
|
|
1356
1360
|
/**
|
|
1357
1361
|
* @hidden
|
|
@@ -1387,12 +1391,12 @@ const vs = "rgba", $a = "rgba(255, 255, 255, 1)", ia = class extends n.Component
|
|
|
1387
1391
|
* @hidden
|
|
1388
1392
|
*/
|
|
1389
1393
|
handleHsvaChange(a, t, e) {
|
|
1390
|
-
const s =
|
|
1394
|
+
const s = fa(a);
|
|
1391
1395
|
if (this.isUncontrolled) {
|
|
1392
|
-
const l =
|
|
1393
|
-
this.setState({ hsva: a, backgroundColor:
|
|
1396
|
+
const l = Ne(s, "hex");
|
|
1397
|
+
this.setState({ hsva: a, backgroundColor: rt(a.h), rgba: Ke(s), hex: l });
|
|
1394
1398
|
} else
|
|
1395
|
-
|
|
1399
|
+
os(this.state.guid, s, a);
|
|
1396
1400
|
this.dispatchChangeEvent(s, t, e);
|
|
1397
1401
|
}
|
|
1398
1402
|
/**
|
|
@@ -1408,8 +1412,8 @@ const vs = "rgba", $a = "rgba(255, 255, 255, 1)", ia = class extends n.Component
|
|
|
1408
1412
|
* @hidden
|
|
1409
1413
|
*/
|
|
1410
1414
|
static getStateFromValue(a, t) {
|
|
1411
|
-
ae(
|
|
1412
|
-
const e =
|
|
1415
|
+
ae(Ne(a, "hex")) || (a = Ha);
|
|
1416
|
+
const e = hs(t, a) || Dt(a), s = ps(t, a) || Ke(a), l = fs(t, a) || Ne(a, "hex"), i = rt(e.h);
|
|
1413
1417
|
return { hsva: e, backgroundColor: i, rgba: s, hex: l };
|
|
1414
1418
|
}
|
|
1415
1419
|
/**
|
|
@@ -1434,7 +1438,7 @@ const vs = "rgba", $a = "rgba(255, 255, 255, 1)", ia = class extends n.Component
|
|
|
1434
1438
|
* @hidden
|
|
1435
1439
|
*/
|
|
1436
1440
|
render() {
|
|
1437
|
-
const a =
|
|
1441
|
+
const a = Je(this), t = G("k-colorgradient", { "k-disabled": this.props.disabled }, this.props.className);
|
|
1438
1442
|
return /* @__PURE__ */ n.createElement(
|
|
1439
1443
|
"div",
|
|
1440
1444
|
{
|
|
@@ -1451,7 +1455,7 @@ const vs = "rgba", $a = "rgba(255, 255, 255, 1)", ia = class extends n.Component
|
|
|
1451
1455
|
onFocus: this.onFocus
|
|
1452
1456
|
},
|
|
1453
1457
|
/* @__PURE__ */ n.createElement("div", { className: "k-colorgradient-canvas k-hstack" }, /* @__PURE__ */ n.createElement("div", { className: "k-hsv-rectangle", style: { background: this.state.backgroundColor } }, /* @__PURE__ */ n.createElement(
|
|
1454
|
-
|
|
1458
|
+
en,
|
|
1455
1459
|
{
|
|
1456
1460
|
onDrag: this.onDrag,
|
|
1457
1461
|
onRelease: this.onRelease,
|
|
@@ -1467,14 +1471,14 @@ const vs = "rgba", $a = "rgba(255, 255, 255, 1)", ia = class extends n.Component
|
|
|
1467
1471
|
this.renderRectangleDragHandle()
|
|
1468
1472
|
)
|
|
1469
1473
|
), this.props.backgroundColor && !this.state.isFirstRender && /* @__PURE__ */ n.createElement(
|
|
1470
|
-
|
|
1474
|
+
vs,
|
|
1471
1475
|
{
|
|
1472
1476
|
metrics: this.gradientWrapper ? this.getGradientRectMetrics() : void 0,
|
|
1473
1477
|
hsva: this.state.hsva,
|
|
1474
1478
|
backgroundColor: this.props.backgroundColor
|
|
1475
1479
|
}
|
|
1476
1480
|
)), /* @__PURE__ */ n.createElement("div", { className: "k-hsv-controls k-hstack" }, /* @__PURE__ */ n.createElement(
|
|
1477
|
-
|
|
1481
|
+
ia,
|
|
1478
1482
|
{
|
|
1479
1483
|
value: this.state.hsva.h,
|
|
1480
1484
|
buttons: !1,
|
|
@@ -1485,10 +1489,10 @@ const vs = "rgba", $a = "rgba(255, 255, 255, 1)", ia = class extends n.Component
|
|
|
1485
1489
|
onChange: this.onHueSliderChange,
|
|
1486
1490
|
className: "k-hue-slider k-colorgradient-slider",
|
|
1487
1491
|
disabled: this.props.disabled,
|
|
1488
|
-
ariaLabel: a.toLanguageString(
|
|
1492
|
+
ariaLabel: a.toLanguageString(Ut, $[Ut])
|
|
1489
1493
|
}
|
|
1490
1494
|
), this.props.opacity && /* @__PURE__ */ n.createElement(
|
|
1491
|
-
|
|
1495
|
+
ia,
|
|
1492
1496
|
{
|
|
1493
1497
|
value: ae(this.state.hsva.a) ? this.state.hsva.a * 100 : 100,
|
|
1494
1498
|
buttons: !1,
|
|
@@ -1496,7 +1500,7 @@ const vs = "rgba", $a = "rgba(255, 255, 255, 1)", ia = class extends n.Component
|
|
|
1496
1500
|
min: 0,
|
|
1497
1501
|
max: 100,
|
|
1498
1502
|
step: 1,
|
|
1499
|
-
ariaLabel: a.toLanguageString(
|
|
1503
|
+
ariaLabel: a.toLanguageString(jt, $[jt]),
|
|
1500
1504
|
onChange: this.onAlphaSliderChange,
|
|
1501
1505
|
className: "k-alpha-slider k-colorgradient-slider",
|
|
1502
1506
|
disabled: this.props.disabled,
|
|
@@ -1504,7 +1508,7 @@ const vs = "rgba", $a = "rgba(255, 255, 255, 1)", ia = class extends n.Component
|
|
|
1504
1508
|
}
|
|
1505
1509
|
))),
|
|
1506
1510
|
/* @__PURE__ */ n.createElement(
|
|
1507
|
-
|
|
1511
|
+
ha,
|
|
1508
1512
|
{
|
|
1509
1513
|
rgba: this.state.rgba,
|
|
1510
1514
|
onRgbaChange: this.onRgbaChange,
|
|
@@ -1516,18 +1520,18 @@ const vs = "rgba", $a = "rgba(255, 255, 255, 1)", ia = class extends n.Component
|
|
|
1516
1520
|
}
|
|
1517
1521
|
),
|
|
1518
1522
|
this.props.backgroundColor && /* @__PURE__ */ n.createElement(
|
|
1519
|
-
|
|
1523
|
+
yn,
|
|
1520
1524
|
{
|
|
1521
|
-
bgColor:
|
|
1525
|
+
bgColor: Ke(this.props.backgroundColor),
|
|
1522
1526
|
rgba: this.state.rgba
|
|
1523
1527
|
}
|
|
1524
1528
|
)
|
|
1525
1529
|
);
|
|
1526
1530
|
}
|
|
1527
1531
|
};
|
|
1528
|
-
let
|
|
1529
|
-
|
|
1530
|
-
|
|
1532
|
+
let vt = la;
|
|
1533
|
+
vt.displayName = "ColorGradient";
|
|
1534
|
+
vt.propTypes = {
|
|
1531
1535
|
defaultValue: r.string,
|
|
1532
1536
|
value: r.string,
|
|
1533
1537
|
onChange: r.func,
|
|
@@ -1544,14 +1548,14 @@ bt.propTypes = {
|
|
|
1544
1548
|
ariaDescribedBy: r.string,
|
|
1545
1549
|
className: r.string
|
|
1546
1550
|
};
|
|
1547
|
-
|
|
1551
|
+
vt.defaultProps = {
|
|
1548
1552
|
opacity: !0,
|
|
1549
1553
|
role: "textbox",
|
|
1550
1554
|
format: "rgb"
|
|
1551
1555
|
};
|
|
1552
|
-
const
|
|
1553
|
-
|
|
1554
|
-
class
|
|
1556
|
+
const ys = he(), pa = et(Ue(ys, vt));
|
|
1557
|
+
pa.displayName = "KendoReactColorGradient";
|
|
1558
|
+
class Cs {
|
|
1555
1559
|
constructor() {
|
|
1556
1560
|
this.colorRows = [];
|
|
1557
1561
|
}
|
|
@@ -1567,7 +1571,7 @@ class ys {
|
|
|
1567
1571
|
getCellCoordsFor(t) {
|
|
1568
1572
|
if (!ae(t))
|
|
1569
1573
|
return;
|
|
1570
|
-
const e = t &&
|
|
1574
|
+
const e = t && mt(t, !0), s = [t];
|
|
1571
1575
|
ae(e) && s.push(e.toCss(), e.toCssRgba());
|
|
1572
1576
|
for (let l = 0; l < this.colorRows.length; l++)
|
|
1573
1577
|
for (let i = 0; i < this.colorRows[l].length; i++)
|
|
@@ -1588,7 +1592,7 @@ class ys {
|
|
|
1588
1592
|
return t < 0 ? 0 : t > e ? e : t;
|
|
1589
1593
|
}
|
|
1590
1594
|
}
|
|
1591
|
-
const
|
|
1595
|
+
const xs = {
|
|
1592
1596
|
basic: {
|
|
1593
1597
|
colors: ["#000000", "#7f7f7f", "#880015", "#ed1c24", "#ff7f27", "#fff200", "#22b14c", "#00a2e8", "#3f48cc", "#a349a4", " ffffff", "#c3c3c3", "#b97a57", "#ffaec9", "#ffc90e", "#efe4b0", "#b5e61d", "#99d9ea", "#7092be", "#c8bfe7"],
|
|
1594
1598
|
columns: 10
|
|
@@ -1637,10 +1641,10 @@ const Cs = {
|
|
|
1637
1641
|
colors: ["#000000", "#1a1a1a", "#333333", "#4d4d4d", "#666666", "#808080", "#999999", "#b3b3b3", "#cccccc", "#e6e6e6", "#f2f2f2", "#ffffff"],
|
|
1638
1642
|
columns: 12
|
|
1639
1643
|
}
|
|
1640
|
-
},
|
|
1641
|
-
class
|
|
1644
|
+
}, Cn = 24, Ga = 10, xn = "office";
|
|
1645
|
+
class kt extends n.Component {
|
|
1642
1646
|
constructor(t) {
|
|
1643
|
-
super(t), this.wrapper = null, this.paletteService = null, this.
|
|
1647
|
+
super(t), this.wrapper = null, this.paletteService = null, this.focus = () => {
|
|
1644
1648
|
this.wrapper && this.wrapper.focus();
|
|
1645
1649
|
}, this.onKeyDown = (e) => {
|
|
1646
1650
|
switch (e.keyCode) {
|
|
@@ -1677,11 +1681,14 @@ class vt extends n.Component {
|
|
|
1677
1681
|
isFirstRender: !0
|
|
1678
1682
|
};
|
|
1679
1683
|
}
|
|
1684
|
+
get guid() {
|
|
1685
|
+
return this.props.id;
|
|
1686
|
+
}
|
|
1680
1687
|
/**
|
|
1681
1688
|
* @hidden
|
|
1682
1689
|
*/
|
|
1683
1690
|
render() {
|
|
1684
|
-
const t = this.getPaletteInfo(), e = this.paletteService = new
|
|
1691
|
+
const t = this.getPaletteInfo(), e = this.paletteService = new Cs();
|
|
1685
1692
|
e.setColorMatrix(t.colors, t.columns);
|
|
1686
1693
|
const s = e.getCellCoordsFor(this.state.selectedColor), l = e.getCellCoordsFor(this.state.focusedColor), i = G("k-colorpalette", { "k-disabled": this.props.disabled }, this.props.className);
|
|
1687
1694
|
return t.colors.length ? /* @__PURE__ */ n.createElement(
|
|
@@ -1731,7 +1738,7 @@ class vt extends n.Component {
|
|
|
1731
1738
|
this.isUncontrolled && this.setState({ selectedColor: this.state.focusedColor }), this.dispatchChangeEvent(this.state.focusedColor, t);
|
|
1732
1739
|
}
|
|
1733
1740
|
dispatchChangeEvent(t, e) {
|
|
1734
|
-
Q(this.props.onChange, e, this, { value: t, rgbaValue:
|
|
1741
|
+
Q(this.props.onChange, e, this, { value: t, rgbaValue: Ne(t, "rgba") });
|
|
1735
1742
|
}
|
|
1736
1743
|
get focusedColorCooridanates() {
|
|
1737
1744
|
return this.state.focusedColor && this.paletteService ? this.paletteService.getCellCoordsFor(this.state.focusedColor) : void 0;
|
|
@@ -1741,25 +1748,25 @@ class vt extends n.Component {
|
|
|
1741
1748
|
}
|
|
1742
1749
|
getPaletteInfo() {
|
|
1743
1750
|
if (typeof this.props.palette == "string") {
|
|
1744
|
-
const t =
|
|
1751
|
+
const t = xs[this.props.palette];
|
|
1745
1752
|
return ae(t) ? {
|
|
1746
1753
|
colors: t.colors,
|
|
1747
|
-
columns: this.props.columns || t.columns ||
|
|
1754
|
+
columns: this.props.columns || t.columns || Ga
|
|
1748
1755
|
} : { colors: [], columns: 0 };
|
|
1749
1756
|
} else
|
|
1750
|
-
return { colors: this.props.palette || [], columns: this.props.columns ||
|
|
1757
|
+
return { colors: this.props.palette || [], columns: this.props.columns || Ga };
|
|
1751
1758
|
}
|
|
1752
1759
|
renderRows(t, e, s) {
|
|
1753
1760
|
return t.map((l, i) => /* @__PURE__ */ n.createElement("tr", { role: "row", key: i }, this.renderColumns(l, i, e, s)));
|
|
1754
1761
|
}
|
|
1755
1762
|
renderColumns(t, e, s, l) {
|
|
1756
|
-
const i = s !== void 0 && s.row === e, c = s && s.col, o = l !== void 0 && l.row === e,
|
|
1757
|
-
return t.map((
|
|
1758
|
-
const
|
|
1763
|
+
const i = s !== void 0 && s.row === e, c = s && s.col, o = l !== void 0 && l.row === e, f = l && l.col, d = typeof this.props.tileSize != "number" ? this.props.tileSize : { width: this.props.tileSize, height: this.props.tileSize }, m = d.width + "px", u = d.height + "px";
|
|
1764
|
+
return t.map((h, y) => {
|
|
1765
|
+
const M = i && c === y, D = G(
|
|
1759
1766
|
"k-colorpalette-tile",
|
|
1760
1767
|
{
|
|
1761
|
-
"k-selected":
|
|
1762
|
-
"k-focus": o &&
|
|
1768
|
+
"k-selected": M,
|
|
1769
|
+
"k-focus": o && f === y
|
|
1763
1770
|
}
|
|
1764
1771
|
);
|
|
1765
1772
|
return /* @__PURE__ */ n.createElement(
|
|
@@ -1767,12 +1774,12 @@ class vt extends n.Component {
|
|
|
1767
1774
|
{
|
|
1768
1775
|
role: "gridcell",
|
|
1769
1776
|
className: D,
|
|
1770
|
-
"aria-label":
|
|
1771
|
-
"aria-selected":
|
|
1772
|
-
style: { backgroundColor:
|
|
1773
|
-
onClick: (
|
|
1774
|
-
id: this.createCellId({ row: e, col:
|
|
1775
|
-
key:
|
|
1777
|
+
"aria-label": h,
|
|
1778
|
+
"aria-selected": M ? !0 : this.props.disabled ? void 0 : !1,
|
|
1779
|
+
style: { backgroundColor: h, width: m, height: u, minWidth: m },
|
|
1780
|
+
onClick: (N) => this.onColorClick(h, N),
|
|
1781
|
+
id: this.createCellId({ row: e, col: y }),
|
|
1782
|
+
key: y
|
|
1776
1783
|
}
|
|
1777
1784
|
);
|
|
1778
1785
|
});
|
|
@@ -1781,8 +1788,8 @@ class vt extends n.Component {
|
|
|
1781
1788
|
return `${this.guid}_${t.row}_${t.col}`;
|
|
1782
1789
|
}
|
|
1783
1790
|
}
|
|
1784
|
-
|
|
1785
|
-
|
|
1791
|
+
kt.displayName = "ColorPalette";
|
|
1792
|
+
kt.propTypes = {
|
|
1786
1793
|
palette: r.oneOfType([r.arrayOf(r.string.isRequired), r.string]),
|
|
1787
1794
|
columns: r.number,
|
|
1788
1795
|
tileSize: r.any,
|
|
@@ -1797,22 +1804,22 @@ vt.propTypes = {
|
|
|
1797
1804
|
ariaDescribedBy: r.string,
|
|
1798
1805
|
className: r.string
|
|
1799
1806
|
};
|
|
1800
|
-
|
|
1801
|
-
palette:
|
|
1802
|
-
tileSize:
|
|
1807
|
+
kt.defaultProps = {
|
|
1808
|
+
palette: xn,
|
|
1809
|
+
tileSize: Cn
|
|
1803
1810
|
};
|
|
1804
|
-
const
|
|
1805
|
-
|
|
1806
|
-
const
|
|
1811
|
+
const Es = he(), ma = et(Ue(Es, kt));
|
|
1812
|
+
ma.displayName = "KendoReactColorPalette";
|
|
1813
|
+
const Ss = "bottom", ws = "top", En = (a) => {
|
|
1807
1814
|
const t = a.popupSettings || {}, e = a.dir === "rtl" ? "right" : "left", s = n.useMemo(
|
|
1808
|
-
() => ({ horizontal: e, vertical:
|
|
1815
|
+
() => ({ horizontal: e, vertical: Ss }),
|
|
1809
1816
|
[e]
|
|
1810
1817
|
), l = n.useMemo(
|
|
1811
|
-
() => ({ horizontal: e, vertical:
|
|
1818
|
+
() => ({ horizontal: e, vertical: ws }),
|
|
1812
1819
|
[e]
|
|
1813
1820
|
);
|
|
1814
1821
|
return /* @__PURE__ */ n.createElement(n.Fragment, null, a.input, a.button, /* @__PURE__ */ n.createElement(
|
|
1815
|
-
|
|
1822
|
+
An,
|
|
1816
1823
|
{
|
|
1817
1824
|
style: {
|
|
1818
1825
|
...(t || {}).style,
|
|
@@ -1830,87 +1837,87 @@ const Es = "bottom", Ss = "top", xn = (a) => {
|
|
|
1830
1837
|
a.content
|
|
1831
1838
|
));
|
|
1832
1839
|
};
|
|
1833
|
-
|
|
1834
|
-
const
|
|
1840
|
+
En.displayName = "KendoPickerComponent";
|
|
1841
|
+
const Is = {
|
|
1835
1842
|
opacity: !0
|
|
1836
|
-
},
|
|
1837
|
-
palette:
|
|
1838
|
-
tileSize:
|
|
1839
|
-
},
|
|
1843
|
+
}, Ls = {
|
|
1844
|
+
palette: xn,
|
|
1845
|
+
tileSize: Cn
|
|
1846
|
+
}, Bt = (a) => a !== void 0, Rs = he(), ga = n.forwardRef((a, t) => {
|
|
1840
1847
|
pe(me);
|
|
1841
|
-
const e =
|
|
1842
|
-
size: l =
|
|
1843
|
-
rounded: i =
|
|
1844
|
-
fillMode: c =
|
|
1848
|
+
const e = Re(Rs, a), s = _e(), {
|
|
1849
|
+
size: l = dt.size,
|
|
1850
|
+
rounded: i = dt.rounded,
|
|
1851
|
+
fillMode: c = dt.fillMode,
|
|
1845
1852
|
popupSettings: o,
|
|
1846
|
-
gradientSettings:
|
|
1853
|
+
gradientSettings: f,
|
|
1847
1854
|
paletteSettings: d,
|
|
1848
|
-
valid:
|
|
1849
|
-
disabled:
|
|
1850
|
-
tabIndex:
|
|
1851
|
-
view:
|
|
1852
|
-
icon:
|
|
1855
|
+
valid: m,
|
|
1856
|
+
disabled: u,
|
|
1857
|
+
tabIndex: h,
|
|
1858
|
+
view: y,
|
|
1859
|
+
icon: M,
|
|
1853
1860
|
svgIcon: D,
|
|
1854
|
-
iconClassName:
|
|
1855
|
-
onChange:
|
|
1861
|
+
iconClassName: N,
|
|
1862
|
+
onChange: L,
|
|
1856
1863
|
onFocus: S,
|
|
1857
|
-
onBlur:
|
|
1858
|
-
onActiveColorClick:
|
|
1864
|
+
onBlur: w,
|
|
1865
|
+
onActiveColorClick: B,
|
|
1859
1866
|
className: O
|
|
1860
|
-
} = e,
|
|
1867
|
+
} = e, I = n.useRef(null), F = n.useRef(null), _ = n.useRef(null), T = n.useRef(), E = n.useRef(null), [V, H] = n.useState(!1), [q, Z] = n.useState(e.defaultValue), [p, v] = n.useState(!1), g = Bt(e.value), k = Bt(e.open), C = g ? e.value : q, P = k ? e.open : p, j = n.useCallback(
|
|
1861
1868
|
() => {
|
|
1862
|
-
|
|
1869
|
+
I.current && I.current.focus();
|
|
1863
1870
|
},
|
|
1864
1871
|
[]
|
|
1865
1872
|
);
|
|
1866
1873
|
n.useImperativeHandle(t, () => ({
|
|
1867
1874
|
// we agreed that each element will have focus method exposed
|
|
1868
|
-
element:
|
|
1875
|
+
element: I.current,
|
|
1869
1876
|
actionElement: E.current,
|
|
1870
1877
|
value: C,
|
|
1871
1878
|
focus: j
|
|
1872
1879
|
}), [C, j]);
|
|
1873
1880
|
const J = n.useCallback(
|
|
1874
1881
|
(A, xe) => {
|
|
1875
|
-
|
|
1882
|
+
k || (!A && !xe && I && I.current && I.current.focus(), v(A));
|
|
1876
1883
|
},
|
|
1877
|
-
[
|
|
1878
|
-
),
|
|
1884
|
+
[k]
|
|
1885
|
+
), R = n.useCallback(
|
|
1879
1886
|
(A) => {
|
|
1880
1887
|
const { altKey: xe, keyCode: ve } = A;
|
|
1881
1888
|
if (ve === z.esc) {
|
|
1882
1889
|
J(!1);
|
|
1883
1890
|
return;
|
|
1884
1891
|
}
|
|
1885
|
-
if (ve === z.enter && !
|
|
1886
|
-
A.preventDefault(), A.stopPropagation(), J(!
|
|
1892
|
+
if (ve === z.enter && !k) {
|
|
1893
|
+
A.preventDefault(), A.stopPropagation(), J(!P);
|
|
1887
1894
|
return;
|
|
1888
1895
|
}
|
|
1889
|
-
xe && (ve === z.up || ve === z.down) && (A.preventDefault(), A.stopPropagation(), ve === z.up &&
|
|
1896
|
+
xe && (ve === z.up || ve === z.down) && (A.preventDefault(), A.stopPropagation(), ve === z.up && I && I.current && (I.current.focus(), J(!1)), ve === z.down && J(!0));
|
|
1890
1897
|
},
|
|
1891
|
-
[
|
|
1898
|
+
[P, k]
|
|
1892
1899
|
), b = n.useCallback(
|
|
1893
1900
|
() => {
|
|
1894
|
-
|
|
1901
|
+
k || (F.current ? F.current.focus() : _.current && _.current.focus());
|
|
1895
1902
|
},
|
|
1896
|
-
[
|
|
1903
|
+
[k]
|
|
1897
1904
|
), W = n.useCallback(
|
|
1898
1905
|
() => {
|
|
1899
|
-
J(!
|
|
1906
|
+
J(!P, !0);
|
|
1900
1907
|
},
|
|
1901
|
-
[
|
|
1908
|
+
[P]
|
|
1902
1909
|
), K = n.useCallback(
|
|
1903
1910
|
(A) => {
|
|
1904
|
-
|
|
1911
|
+
B && B.call(void 0, {
|
|
1905
1912
|
syntheticEvent: A,
|
|
1906
1913
|
nativeEvent: A.nativeEvent,
|
|
1907
1914
|
value: C
|
|
1908
1915
|
});
|
|
1909
1916
|
},
|
|
1910
|
-
[
|
|
1917
|
+
[B, C]
|
|
1911
1918
|
), ee = n.useCallback(
|
|
1912
1919
|
(A) => {
|
|
1913
|
-
|
|
1920
|
+
T.current ? (clearTimeout(T.current), T.current = void 0) : H(!0), S && S.call(void 0, {
|
|
1914
1921
|
nativeEvent: A.nativeEvent,
|
|
1915
1922
|
syntheticEvent: A
|
|
1916
1923
|
});
|
|
@@ -1918,31 +1925,31 @@ const ws = {
|
|
|
1918
1925
|
[S]
|
|
1919
1926
|
), le = n.useCallback(
|
|
1920
1927
|
() => {
|
|
1921
|
-
J(!1, !0), H(!1),
|
|
1928
|
+
J(!1, !0), H(!1), T.current = void 0;
|
|
1922
1929
|
},
|
|
1923
1930
|
[]
|
|
1924
1931
|
), Ee = n.useCallback(
|
|
1925
1932
|
(A) => {
|
|
1926
|
-
clearTimeout(
|
|
1933
|
+
clearTimeout(T.current), T.current = window.setTimeout(le), w && w.call(void 0, {
|
|
1927
1934
|
nativeEvent: A.nativeEvent,
|
|
1928
1935
|
syntheticEvent: A
|
|
1929
1936
|
});
|
|
1930
1937
|
},
|
|
1931
|
-
[
|
|
1938
|
+
[w]
|
|
1932
1939
|
), oe = n.useCallback(
|
|
1933
1940
|
(A, xe) => {
|
|
1934
1941
|
const ve = xe ? A.rgbaValue : A.value;
|
|
1935
|
-
g || Z(ve), xe && J(!1),
|
|
1942
|
+
g || Z(ve), xe && J(!1), L && L.call(void 0, {
|
|
1936
1943
|
value: ve,
|
|
1937
1944
|
nativeEvent: A.nativeEvent,
|
|
1938
1945
|
syntheticEvent: A.syntheticEvent
|
|
1939
1946
|
});
|
|
1940
1947
|
},
|
|
1941
|
-
[g,
|
|
1948
|
+
[g, L]
|
|
1942
1949
|
), ce = n.useCallback(
|
|
1943
1950
|
(A) => oe(A, !0),
|
|
1944
|
-
[
|
|
1945
|
-
), be =
|
|
1951
|
+
[Bt, oe]
|
|
1952
|
+
), be = Ae(I, e.dir), He = m !== !1;
|
|
1946
1953
|
return /* @__PURE__ */ n.createElement(
|
|
1947
1954
|
"span",
|
|
1948
1955
|
{
|
|
@@ -1952,8 +1959,8 @@ const ws = {
|
|
|
1952
1959
|
"aria-labelledby": e.ariaLabelledBy,
|
|
1953
1960
|
"aria-describedby": e.ariaDescribedBy,
|
|
1954
1961
|
"aria-haspopup": "dialog",
|
|
1955
|
-
"aria-expanded":
|
|
1956
|
-
"aria-disabled":
|
|
1962
|
+
"aria-expanded": P,
|
|
1963
|
+
"aria-disabled": u ? "true" : void 0,
|
|
1957
1964
|
className: G(
|
|
1958
1965
|
"k-colorpicker",
|
|
1959
1966
|
"k-picker",
|
|
@@ -1962,27 +1969,27 @@ const ws = {
|
|
|
1962
1969
|
[`k-picker-${ne.sizeMap[l] || l}`]: l,
|
|
1963
1970
|
[`k-picker-${c}`]: c,
|
|
1964
1971
|
[`k-rounded-${ne.roundedMap[i] || i}`]: i,
|
|
1965
|
-
"k-invalid": !
|
|
1966
|
-
"k-disabled":
|
|
1967
|
-
"k-focus":
|
|
1972
|
+
"k-invalid": !He,
|
|
1973
|
+
"k-disabled": u,
|
|
1974
|
+
"k-focus": V,
|
|
1968
1975
|
className: O
|
|
1969
1976
|
}
|
|
1970
1977
|
),
|
|
1971
|
-
ref:
|
|
1972
|
-
tabIndex: ie(
|
|
1978
|
+
ref: I,
|
|
1979
|
+
tabIndex: ie(h, u),
|
|
1973
1980
|
title: e.title,
|
|
1974
|
-
onKeyDown:
|
|
1981
|
+
onKeyDown: R,
|
|
1975
1982
|
onFocus: ee,
|
|
1976
1983
|
onBlur: Ee,
|
|
1977
1984
|
dir: be
|
|
1978
1985
|
},
|
|
1979
1986
|
/* @__PURE__ */ n.createElement(
|
|
1980
|
-
|
|
1987
|
+
En,
|
|
1981
1988
|
{
|
|
1982
1989
|
dir: be,
|
|
1983
|
-
open:
|
|
1990
|
+
open: P,
|
|
1984
1991
|
onOpen: b,
|
|
1985
|
-
popupAnchor:
|
|
1992
|
+
popupAnchor: I.current || void 0,
|
|
1986
1993
|
popupSettings: { ...o },
|
|
1987
1994
|
input: /* @__PURE__ */ n.createElement("span", { onClick: K, className: "k-input-inner" }, /* @__PURE__ */ n.createElement(
|
|
1988
1995
|
"span",
|
|
@@ -1992,12 +1999,12 @@ const ws = {
|
|
|
1992
1999
|
"k-color-preview",
|
|
1993
2000
|
{
|
|
1994
2001
|
"k-no-color": !C,
|
|
1995
|
-
"k-icon-color-preview":
|
|
2002
|
+
"k-icon-color-preview": M || D || N
|
|
1996
2003
|
}
|
|
1997
2004
|
)
|
|
1998
2005
|
},
|
|
1999
|
-
|
|
2000
|
-
!
|
|
2006
|
+
N && /* @__PURE__ */ n.createElement("span", { className: G("k-color-preview-icon", N) }),
|
|
2007
|
+
!N && (M || D) && /* @__PURE__ */ n.createElement(fe, { name: M, icon: D }),
|
|
2001
2008
|
/* @__PURE__ */ n.createElement("span", { className: "k-color-preview-mask", style: { backgroundColor: C } })
|
|
2002
2009
|
)),
|
|
2003
2010
|
button: /* @__PURE__ */ n.createElement(
|
|
@@ -2009,24 +2016,24 @@ const ws = {
|
|
|
2009
2016
|
className: "k-input-button",
|
|
2010
2017
|
rounded: null,
|
|
2011
2018
|
icon: "caret-alt-down",
|
|
2012
|
-
svgIcon:
|
|
2013
|
-
"aria-label": s.toLanguageString(
|
|
2019
|
+
svgIcon: ht,
|
|
2020
|
+
"aria-label": s.toLanguageString(Qt, $[Qt])
|
|
2014
2021
|
}
|
|
2015
2022
|
),
|
|
2016
|
-
content: /* @__PURE__ */ n.createElement(n.Fragment, null, (
|
|
2017
|
-
|
|
2023
|
+
content: /* @__PURE__ */ n.createElement(n.Fragment, null, (y === "combo" || y === "gradient") && /* @__PURE__ */ n.createElement(
|
|
2024
|
+
pa,
|
|
2018
2025
|
{
|
|
2019
|
-
...
|
|
2026
|
+
...f,
|
|
2020
2027
|
tabIndex: 0,
|
|
2021
2028
|
ref: F,
|
|
2022
2029
|
value: C,
|
|
2023
2030
|
onChange: oe
|
|
2024
2031
|
}
|
|
2025
|
-
), (
|
|
2026
|
-
|
|
2032
|
+
), (y === "combo" || y === "palette") && /* @__PURE__ */ n.createElement(
|
|
2033
|
+
ma,
|
|
2027
2034
|
{
|
|
2028
2035
|
...d,
|
|
2029
|
-
ref:
|
|
2036
|
+
ref: _,
|
|
2030
2037
|
value: C,
|
|
2031
2038
|
onChange: ce
|
|
2032
2039
|
}
|
|
@@ -2035,7 +2042,7 @@ const ws = {
|
|
|
2035
2042
|
)
|
|
2036
2043
|
);
|
|
2037
2044
|
});
|
|
2038
|
-
|
|
2045
|
+
ga.propTypes = {
|
|
2039
2046
|
value: r.string,
|
|
2040
2047
|
defaultValue: r.string,
|
|
2041
2048
|
disabled: r.bool,
|
|
@@ -2043,7 +2050,7 @@ ma.propTypes = {
|
|
|
2043
2050
|
dir: r.string,
|
|
2044
2051
|
id: r.string,
|
|
2045
2052
|
icon: r.string,
|
|
2046
|
-
svgIcon:
|
|
2053
|
+
svgIcon: Ft,
|
|
2047
2054
|
ariaLabelledBy: r.string,
|
|
2048
2055
|
ariaDescribedBy: r.string,
|
|
2049
2056
|
size: r.oneOf([null, "small", "medium", "large"]),
|
|
@@ -2051,23 +2058,23 @@ ma.propTypes = {
|
|
|
2051
2058
|
fillMode: r.oneOf([null, "solid", "flat", "outline"]),
|
|
2052
2059
|
className: r.string
|
|
2053
2060
|
};
|
|
2054
|
-
const
|
|
2061
|
+
const dt = {
|
|
2055
2062
|
size: "medium",
|
|
2056
2063
|
rounded: "medium",
|
|
2057
2064
|
fillMode: "solid",
|
|
2058
2065
|
view: "palette",
|
|
2059
|
-
gradientSettings:
|
|
2060
|
-
paletteSettings:
|
|
2066
|
+
gradientSettings: Is,
|
|
2067
|
+
paletteSettings: Ls
|
|
2061
2068
|
};
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
const
|
|
2069
|
+
ga.defaultProps = dt;
|
|
2070
|
+
ga.displayName = "KendoColorPicker";
|
|
2071
|
+
const Ka = "rgba(255, 255, 255, 1)", Sn = n.forwardRef((a, t) => {
|
|
2065
2072
|
pe(me);
|
|
2066
|
-
const e = n.useRef(null), s = n.useRef(null), l = n.useRef(null), { defaultValue: i =
|
|
2073
|
+
const e = n.useRef(null), s = n.useRef(null), l = n.useRef(null), { defaultValue: i = Ka, showButtons: c = !0, showPreview: o = !0, showClearButton: f = !0 } = a, [d, m] = n.useState((a.view || "ColorGradient") === "ColorGradient"), [u, h] = n.useState(a.value || i), [y, M] = n.useState(a.value || i), D = a.value !== void 0 ? a.value : y;
|
|
2067
2074
|
n.useEffect(() => {
|
|
2068
|
-
|
|
2075
|
+
h(a.value || i);
|
|
2069
2076
|
}, [a.value, i]);
|
|
2070
|
-
const
|
|
2077
|
+
const N = _e(), L = n.useCallback(
|
|
2071
2078
|
() => {
|
|
2072
2079
|
e.current && e.current.focus();
|
|
2073
2080
|
},
|
|
@@ -2075,86 +2082,86 @@ const Ga = "rgba(255, 255, 255, 1)", En = n.forwardRef((a, t) => {
|
|
|
2075
2082
|
);
|
|
2076
2083
|
n.useImperativeHandle(e, () => ({
|
|
2077
2084
|
element: s.current,
|
|
2078
|
-
focus:
|
|
2085
|
+
focus: L,
|
|
2079
2086
|
props: a,
|
|
2080
2087
|
value: D
|
|
2081
|
-
}), [D,
|
|
2088
|
+
}), [D, L, a]), n.useImperativeHandle(t, () => e.current);
|
|
2082
2089
|
const S = n.useCallback(
|
|
2083
2090
|
(E) => {
|
|
2084
|
-
(E === "ColorGradient" && !d || E === "ColorPalette" && d) &&
|
|
2091
|
+
(E === "ColorGradient" && !d || E === "ColorPalette" && d) && m(!d);
|
|
2085
2092
|
},
|
|
2086
2093
|
[d]
|
|
2087
|
-
),
|
|
2094
|
+
), w = n.useCallback(
|
|
2088
2095
|
(E) => {
|
|
2089
|
-
if (
|
|
2090
|
-
const
|
|
2096
|
+
if (h(i), a.onPreviewChange) {
|
|
2097
|
+
const V = {
|
|
2091
2098
|
value: i,
|
|
2092
2099
|
nativeEvent: E.nativeEvent,
|
|
2093
2100
|
syntheticEvent: E
|
|
2094
2101
|
};
|
|
2095
|
-
a.onPreviewChange.call(void 0,
|
|
2102
|
+
a.onPreviewChange.call(void 0, V);
|
|
2096
2103
|
}
|
|
2097
2104
|
},
|
|
2098
2105
|
[i, a.onPreviewChange]
|
|
2099
|
-
),
|
|
2106
|
+
), B = n.useCallback(
|
|
2100
2107
|
(E) => {
|
|
2101
|
-
if (
|
|
2102
|
-
const
|
|
2108
|
+
if (h(E.value), a.onPreviewChange) {
|
|
2109
|
+
const V = {
|
|
2103
2110
|
value: E.value,
|
|
2104
2111
|
nativeEvent: E.nativeEvent,
|
|
2105
2112
|
syntheticEvent: E.syntheticEvent
|
|
2106
2113
|
};
|
|
2107
|
-
a.onPreviewChange.call(void 0,
|
|
2114
|
+
a.onPreviewChange.call(void 0, V);
|
|
2108
2115
|
}
|
|
2109
2116
|
},
|
|
2110
2117
|
[a.onPreviewChange]
|
|
2111
2118
|
), O = n.useCallback(
|
|
2112
2119
|
(E) => {
|
|
2113
|
-
if (
|
|
2114
|
-
const
|
|
2115
|
-
value:
|
|
2120
|
+
if (M(u), a.onChange) {
|
|
2121
|
+
const V = {
|
|
2122
|
+
value: u,
|
|
2116
2123
|
nativeEvent: E.nativeEvent,
|
|
2117
2124
|
syntheticEvent: E
|
|
2118
2125
|
};
|
|
2119
|
-
a.onChange.call(void 0,
|
|
2126
|
+
a.onChange.call(void 0, V);
|
|
2120
2127
|
}
|
|
2121
2128
|
},
|
|
2122
|
-
[
|
|
2123
|
-
),
|
|
2129
|
+
[u, a.onChange]
|
|
2130
|
+
), I = n.useCallback(
|
|
2124
2131
|
() => {
|
|
2125
|
-
|
|
2132
|
+
M(Ka);
|
|
2126
2133
|
},
|
|
2127
2134
|
[]
|
|
2128
2135
|
), F = n.useCallback(
|
|
2129
2136
|
(E) => {
|
|
2130
|
-
if (
|
|
2131
|
-
const
|
|
2132
|
-
value:
|
|
2137
|
+
if (h(y), a.onPreviewChange) {
|
|
2138
|
+
const V = {
|
|
2139
|
+
value: y,
|
|
2133
2140
|
nativeEvent: E.nativeEvent,
|
|
2134
2141
|
syntheticEvent: E
|
|
2135
2142
|
};
|
|
2136
|
-
a.onPreviewChange.call(void 0,
|
|
2143
|
+
a.onPreviewChange.call(void 0, V);
|
|
2137
2144
|
}
|
|
2138
2145
|
},
|
|
2139
|
-
[
|
|
2140
|
-
),
|
|
2146
|
+
[y, a.onPreviewChange]
|
|
2147
|
+
), _ = n.useCallback(
|
|
2141
2148
|
(E) => {
|
|
2142
2149
|
s.current && !(E.nativeEvent.target instanceof HTMLInputElement) && s.current.focus();
|
|
2143
2150
|
},
|
|
2144
2151
|
[s]
|
|
2145
|
-
),
|
|
2152
|
+
), T = n.useCallback(
|
|
2146
2153
|
(E) => {
|
|
2147
2154
|
var H;
|
|
2148
|
-
if ((!E.relatedTarget || !((H = s.current) != null && H.contains(E.relatedTarget))) && (c ||
|
|
2155
|
+
if ((!E.relatedTarget || !((H = s.current) != null && H.contains(E.relatedTarget))) && (c || M(u), !c && a.onChange)) {
|
|
2149
2156
|
const q = {
|
|
2150
|
-
value:
|
|
2157
|
+
value: u,
|
|
2151
2158
|
nativeEvent: E.nativeEvent,
|
|
2152
2159
|
syntheticEvent: E
|
|
2153
2160
|
};
|
|
2154
2161
|
a.onChange.call(void 0, q);
|
|
2155
2162
|
}
|
|
2156
2163
|
},
|
|
2157
|
-
[
|
|
2164
|
+
[u, c, a.onChange]
|
|
2158
2165
|
);
|
|
2159
2166
|
return /* @__PURE__ */ n.createElement(
|
|
2160
2167
|
"div",
|
|
@@ -2174,67 +2181,67 @@ const Ga = "rgba(255, 255, 255, 1)", En = n.forwardRef((a, t) => {
|
|
|
2174
2181
|
},
|
|
2175
2182
|
a.className
|
|
2176
2183
|
),
|
|
2177
|
-
onBlur:
|
|
2184
|
+
onBlur: T
|
|
2178
2185
|
},
|
|
2179
|
-
/* @__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(
|
|
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(_n, { className: "k-button-group-flat" }, /* @__PURE__ */ n.createElement(
|
|
2180
2187
|
ge,
|
|
2181
2188
|
{
|
|
2182
2189
|
type: "button",
|
|
2183
|
-
"aria-label":
|
|
2184
|
-
|
|
2185
|
-
$[
|
|
2190
|
+
"aria-label": N.toLanguageString(
|
|
2191
|
+
Xt,
|
|
2192
|
+
$[Xt]
|
|
2186
2193
|
),
|
|
2187
2194
|
togglable: !0,
|
|
2188
2195
|
fillMode: "flat",
|
|
2189
2196
|
selected: d,
|
|
2190
2197
|
onClick: () => S("ColorGradient"),
|
|
2191
2198
|
icon: "droplet-slider",
|
|
2192
|
-
svgIcon:
|
|
2199
|
+
svgIcon: Fn
|
|
2193
2200
|
}
|
|
2194
2201
|
), /* @__PURE__ */ n.createElement(
|
|
2195
2202
|
ge,
|
|
2196
2203
|
{
|
|
2197
2204
|
type: "button",
|
|
2198
|
-
"aria-label":
|
|
2199
|
-
|
|
2200
|
-
$[
|
|
2205
|
+
"aria-label": N.toLanguageString(
|
|
2206
|
+
Yt,
|
|
2207
|
+
$[Yt]
|
|
2201
2208
|
),
|
|
2202
2209
|
togglable: !0,
|
|
2203
2210
|
fillMode: "flat",
|
|
2204
2211
|
selected: !d,
|
|
2205
2212
|
onClick: () => S("ColorPalette"),
|
|
2206
2213
|
icon: "palette",
|
|
2207
|
-
svgIcon:
|
|
2214
|
+
svgIcon: Tn
|
|
2208
2215
|
}
|
|
2209
|
-
))), /* @__PURE__ */ n.createElement("div", { className: "k-spacer" }), /* @__PURE__ */ n.createElement("div", { className: "k-coloreditor-header-actions k-hstack" },
|
|
2216
|
+
))), /* @__PURE__ */ n.createElement("div", { className: "k-spacer" }), /* @__PURE__ */ n.createElement("div", { className: "k-coloreditor-header-actions k-hstack" }, f && /* @__PURE__ */ n.createElement(
|
|
2210
2217
|
ge,
|
|
2211
2218
|
{
|
|
2212
2219
|
type: "button",
|
|
2213
2220
|
fillMode: "flat",
|
|
2214
|
-
onClick:
|
|
2215
|
-
"aria-label":
|
|
2216
|
-
|
|
2217
|
-
$[
|
|
2221
|
+
onClick: w,
|
|
2222
|
+
"aria-label": N.toLanguageString(
|
|
2223
|
+
Zt,
|
|
2224
|
+
$[Zt]
|
|
2218
2225
|
),
|
|
2219
2226
|
icon: "droplet-slash",
|
|
2220
|
-
svgIcon:
|
|
2227
|
+
svgIcon: zn
|
|
2221
2228
|
}
|
|
2222
|
-
), 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:
|
|
2223
|
-
|
|
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: u } }), /* @__PURE__ */ n.createElement("span", { className: "k-coloreditor-current-color k-color-preview", style: { background: y }, onClick: F })))), /* @__PURE__ */ n.createElement("div", { className: "k-coloreditor-views k-vstack" }, d ? /* @__PURE__ */ n.createElement(
|
|
2230
|
+
pa,
|
|
2224
2231
|
{
|
|
2225
2232
|
ref: l,
|
|
2226
2233
|
role: "none",
|
|
2227
2234
|
tabIndex: -1,
|
|
2228
2235
|
ariaLabel: void 0,
|
|
2229
|
-
value:
|
|
2230
|
-
onChange:
|
|
2231
|
-
onFocus:
|
|
2236
|
+
value: u,
|
|
2237
|
+
onChange: B,
|
|
2238
|
+
onFocus: _,
|
|
2232
2239
|
opacity: a.opacity,
|
|
2233
2240
|
format: a.format
|
|
2234
2241
|
}
|
|
2235
|
-
) : /* @__PURE__ */ n.createElement(
|
|
2242
|
+
) : /* @__PURE__ */ n.createElement(ma, { ariaDisabled: !0, ariaLabelledBy: "required_label", value: u, onChange: B, onFocus: _ })), c && /* @__PURE__ */ n.createElement("div", { className: "k-coloreditor-footer k-actions k-actions-end" }, /* @__PURE__ */ n.createElement(ge, { type: "button", className: "k-coloreditor-cancel", onClick: I }, $[on]), /* @__PURE__ */ n.createElement(ge, { type: "button", className: "k-coloreditor-apply k-primary", onClick: O }, $[cn])))
|
|
2236
2243
|
);
|
|
2237
|
-
}),
|
|
2244
|
+
}), Vs = {
|
|
2238
2245
|
id: r.string,
|
|
2239
2246
|
style: r.any,
|
|
2240
2247
|
className: r.string,
|
|
@@ -2254,9 +2261,9 @@ const Ga = "rgba(255, 255, 255, 1)", En = n.forwardRef((a, t) => {
|
|
|
2254
2261
|
showPreview: r.bool,
|
|
2255
2262
|
showButtons: r.bool
|
|
2256
2263
|
};
|
|
2257
|
-
|
|
2258
|
-
|
|
2259
|
-
var
|
|
2264
|
+
Sn.displayName = "KendoFlatColorPicker";
|
|
2265
|
+
Sn.propTypes = Vs;
|
|
2266
|
+
var Pe = /* @__PURE__ */ ((a) => (a[a.Literal = 0] = "Literal", a[a.Mask = 1] = "Mask", a[a.Undefined = 2] = "Undefined", a))(Pe || {});
|
|
2260
2267
|
class Y {
|
|
2261
2268
|
constructor(t, e, s = 2) {
|
|
2262
2269
|
this.value = t, this.rest = e, this.type = s;
|
|
@@ -2279,7 +2286,7 @@ class Y {
|
|
|
2279
2286
|
return `Result({ value: '${this.value}', rest: ${this.rest} })`;
|
|
2280
2287
|
}
|
|
2281
2288
|
}
|
|
2282
|
-
class
|
|
2289
|
+
class qa {
|
|
2283
2290
|
constructor(t = [], e = []) {
|
|
2284
2291
|
this.input = t, this.control = e, this.inputCursor = 0, this.controlCursor = 0;
|
|
2285
2292
|
}
|
|
@@ -2309,13 +2316,13 @@ class Ka {
|
|
|
2309
2316
|
this.inputCursor++, this.controlCursor++;
|
|
2310
2317
|
}
|
|
2311
2318
|
}
|
|
2312
|
-
const
|
|
2319
|
+
const Ua = (a) => (a || "").split(""), Ms = "\\";
|
|
2313
2320
|
class Ce {
|
|
2314
2321
|
constructor(t) {
|
|
2315
2322
|
this.parse = t;
|
|
2316
2323
|
}
|
|
2317
2324
|
run(t, e = "") {
|
|
2318
|
-
return t instanceof
|
|
2325
|
+
return t instanceof qa ? this.parse(t) : this.parse(new qa(Ua(t), Ua(e)));
|
|
2319
2326
|
}
|
|
2320
2327
|
// map :: Functor f => f a ~> (a -> b) -> f b
|
|
2321
2328
|
map(t) {
|
|
@@ -2326,23 +2333,23 @@ class Ce {
|
|
|
2326
2333
|
return new Ce((e) => this.parse(e).chain((s, l) => t(s).run(l)));
|
|
2327
2334
|
}
|
|
2328
2335
|
isLiteral(t) {
|
|
2329
|
-
return this.run(t).type ===
|
|
2336
|
+
return this.run(t).type === Pe.Literal;
|
|
2330
2337
|
}
|
|
2331
2338
|
}
|
|
2332
|
-
const
|
|
2339
|
+
const Ns = (a) => (t) => new Ce((e) => {
|
|
2333
2340
|
const { prompt: s, promptPlaceholder: l } = a;
|
|
2334
2341
|
for (; !e.eof(); ) {
|
|
2335
2342
|
const { char: i, control: c } = e.peek();
|
|
2336
2343
|
if (i === c && c === s)
|
|
2337
|
-
return e.eat(), new Y(s, e,
|
|
2344
|
+
return e.eat(), new Y(s, e, Pe.Mask);
|
|
2338
2345
|
if (t.test(i))
|
|
2339
|
-
return e.eat(), new Y(i, e,
|
|
2346
|
+
return e.eat(), new Y(i, e, Pe.Mask);
|
|
2340
2347
|
if (i === l)
|
|
2341
|
-
return e.eat(), new Y(s, e,
|
|
2348
|
+
return e.eat(), new Y(s, e, Pe.Mask);
|
|
2342
2349
|
e.eat_input();
|
|
2343
2350
|
}
|
|
2344
|
-
return e.eat(), new Y(s, e,
|
|
2345
|
-
}),
|
|
2351
|
+
return e.eat(), new Y(s, e, Pe.Mask);
|
|
2352
|
+
}), Ps = (a) => new Ce((t) => t.peek().char === a ? (t.eat(), new Y(a, t, Pe.Literal)) : new Y(a, t, Pe.Literal)), Ds = (a) => (t) => new Ce((e) => {
|
|
2346
2353
|
for (; !e.eof(); ) {
|
|
2347
2354
|
const { char: s, control: l } = e.peek();
|
|
2348
2355
|
if (s === a && l === a)
|
|
@@ -2352,29 +2359,29 @@ const Ms = (a) => (t) => new Ce((e) => {
|
|
|
2352
2359
|
e.eat_input();
|
|
2353
2360
|
}
|
|
2354
2361
|
return e.eat(), new Y("", e);
|
|
2355
|
-
}),
|
|
2362
|
+
}), Bs = (a) => new Ce((t) => {
|
|
2356
2363
|
if (t.eof())
|
|
2357
2364
|
return new Y("", t);
|
|
2358
2365
|
const { char: e } = t.peek();
|
|
2359
2366
|
return e === a && t.eat(), new Y(a, t);
|
|
2360
|
-
}),
|
|
2367
|
+
}), ot = (a, t) => new Ce((e) => {
|
|
2361
2368
|
let { char: s } = e.next();
|
|
2362
2369
|
const l = a[s];
|
|
2363
|
-
return s ===
|
|
2364
|
-
}),
|
|
2370
|
+
return s === Ms ? (s = e.next().char, new Y(t.literal(s), e)) : l ? new Y(t.mask(l), e) : new Y(t.literal(s), e);
|
|
2371
|
+
}), ja = (a) => new Ce((t) => {
|
|
2365
2372
|
const { prompt: e, promptPlaceholder: s } = a;
|
|
2366
2373
|
let { char: l } = t.next();
|
|
2367
2374
|
return l === e ? new Y(s, t) : new Y(l, t);
|
|
2368
|
-
}),
|
|
2375
|
+
}), Wa = (a) => new Ce((t) => {
|
|
2369
2376
|
let { char: e } = t.next();
|
|
2370
2377
|
return a ? new Y(e, t) : new Y("", t);
|
|
2371
|
-
}),
|
|
2378
|
+
}), Os = (a) => new Ce((t) => new Y(a, t)), Fs = (a, t) => a.chain((e) => t.map((s) => e.concat([s]))), Oe = (a) => a.reduce((t, e) => Fs(t, e), Os([])), ct = (a) => new Ce((t) => {
|
|
2372
2379
|
let e = new Y([], t);
|
|
2373
2380
|
for (; !t.eof(); )
|
|
2374
2381
|
e = e.concat(a.run(t));
|
|
2375
2382
|
return e;
|
|
2376
2383
|
});
|
|
2377
|
-
class
|
|
2384
|
+
class Ts {
|
|
2378
2385
|
constructor() {
|
|
2379
2386
|
this.rules = {}, this.prompt = "_", this.mask = "", this.promptPlaceholder = " ", this.includeLiterals = !1, this.maskTokens = [], this.unmaskTokens = [], this.rawTokens = [], this.validationTokens = [];
|
|
2380
2387
|
}
|
|
@@ -2383,13 +2390,13 @@ class Fs {
|
|
|
2383
2390
|
}
|
|
2384
2391
|
validationValue(t = "") {
|
|
2385
2392
|
let e = t;
|
|
2386
|
-
return
|
|
2393
|
+
return Oe(this.validationTokens).run(t).fold((s) => {
|
|
2387
2394
|
e = s.join("");
|
|
2388
2395
|
}), e;
|
|
2389
2396
|
}
|
|
2390
2397
|
rawValue(t = "") {
|
|
2391
2398
|
let e = t;
|
|
2392
|
-
return this.rawTokens.length &&
|
|
2399
|
+
return this.rawTokens.length && Oe(this.rawTokens).run(t).fold((s) => {
|
|
2393
2400
|
e = s.join("");
|
|
2394
2401
|
}), e;
|
|
2395
2402
|
}
|
|
@@ -2398,7 +2405,7 @@ class Fs {
|
|
|
2398
2405
|
*/
|
|
2399
2406
|
maskRaw(t = "") {
|
|
2400
2407
|
let e = t;
|
|
2401
|
-
return this.maskTokens.length &&
|
|
2408
|
+
return this.maskTokens.length && Oe(this.maskTokens).run(t).fold((s) => {
|
|
2402
2409
|
e = s.join("");
|
|
2403
2410
|
}), e;
|
|
2404
2411
|
}
|
|
@@ -2407,9 +2414,9 @@ class Fs {
|
|
|
2407
2414
|
}
|
|
2408
2415
|
maskInRange(t, e, s, l) {
|
|
2409
2416
|
let i = "", c = l;
|
|
2410
|
-
const o = e.split("").slice(0, s),
|
|
2411
|
-
return
|
|
2412
|
-
i = o.concat(d).concat(
|
|
2417
|
+
const o = e.split("").slice(0, s), f = e.split("").slice(l);
|
|
2418
|
+
return Oe(this.maskTokens.slice(s, l)).run(t).fold((d) => {
|
|
2419
|
+
i = o.concat(d).concat(f).join("");
|
|
2413
2420
|
}), {
|
|
2414
2421
|
selection: c,
|
|
2415
2422
|
value: i
|
|
@@ -2417,8 +2424,8 @@ class Fs {
|
|
|
2417
2424
|
}
|
|
2418
2425
|
maskRemoved(t, e, s) {
|
|
2419
2426
|
let l = "", i = s;
|
|
2420
|
-
const c = t.split("").slice(s), o = t.split("").slice(0, s).join(""),
|
|
2421
|
-
return
|
|
2427
|
+
const c = t.split("").slice(s), o = t.split("").slice(0, s).join(""), f = this.maskTokens.length - (t.length - s);
|
|
2428
|
+
return Oe(this.maskTokens.slice(0, f)).run(o, e).fold((d) => {
|
|
2422
2429
|
i = this.adjustPosition(d, i), l = d.concat(c).join("");
|
|
2423
2430
|
}), {
|
|
2424
2431
|
selection: i,
|
|
@@ -2432,10 +2439,10 @@ class Fs {
|
|
|
2432
2439
|
maskInserted(t, e, s) {
|
|
2433
2440
|
let l = "", i = s;
|
|
2434
2441
|
const c = t.slice(0, s);
|
|
2435
|
-
return
|
|
2442
|
+
return Oe(this.unmaskTokens).run(c, e).chain((o) => {
|
|
2436
2443
|
i = o.join("").length;
|
|
2437
|
-
const
|
|
2438
|
-
return
|
|
2444
|
+
const f = e.slice(i);
|
|
2445
|
+
return Oe(this.maskTokens).run(o.join("") + f, e);
|
|
2439
2446
|
}).fold((o) => {
|
|
2440
2447
|
l = o.join("");
|
|
2441
2448
|
}), {
|
|
@@ -2446,43 +2453,43 @@ class Fs {
|
|
|
2446
2453
|
get maskTokenCreator() {
|
|
2447
2454
|
const { prompt: t, promptPlaceholder: e } = this;
|
|
2448
2455
|
return {
|
|
2449
|
-
literal: (s) =>
|
|
2450
|
-
mask: (s) =>
|
|
2456
|
+
literal: (s) => Ps(s),
|
|
2457
|
+
mask: (s) => Ns({ prompt: t, promptPlaceholder: e })(s)
|
|
2451
2458
|
};
|
|
2452
2459
|
}
|
|
2453
2460
|
get unmaskTokenCreator() {
|
|
2454
2461
|
return {
|
|
2455
|
-
literal: (t) =>
|
|
2456
|
-
mask: (t) =>
|
|
2462
|
+
literal: (t) => Bs(t),
|
|
2463
|
+
mask: (t) => Ds(this.prompt)(t)
|
|
2457
2464
|
};
|
|
2458
2465
|
}
|
|
2459
2466
|
get rawTokenCreator() {
|
|
2460
2467
|
const { prompt: t, promptPlaceholder: e, includeLiterals: s } = this;
|
|
2461
2468
|
return {
|
|
2462
|
-
literal: (l) =>
|
|
2463
|
-
mask: (l) =>
|
|
2469
|
+
literal: (l) => Wa(s),
|
|
2470
|
+
mask: (l) => ja({ prompt: t, promptPlaceholder: e })
|
|
2464
2471
|
};
|
|
2465
2472
|
}
|
|
2466
2473
|
get validationTokenCreator() {
|
|
2467
2474
|
const { prompt: t } = this;
|
|
2468
2475
|
return {
|
|
2469
|
-
literal: (e) =>
|
|
2470
|
-
mask: (e) =>
|
|
2476
|
+
literal: (e) => Wa(!1),
|
|
2477
|
+
mask: (e) => ja({ prompt: t, promptPlaceholder: "" })
|
|
2471
2478
|
};
|
|
2472
2479
|
}
|
|
2473
2480
|
tokenize() {
|
|
2474
|
-
ot(
|
|
2481
|
+
ct(ot(this.rules, this.maskTokenCreator)).run(this.mask).fold((t, e) => {
|
|
2475
2482
|
this.maskTokens = t;
|
|
2476
|
-
}), ot(
|
|
2483
|
+
}), ct(ot(this.rules, this.unmaskTokenCreator)).run(this.mask).fold((t, e) => {
|
|
2477
2484
|
this.unmaskTokens = t;
|
|
2478
|
-
}), ot(
|
|
2485
|
+
}), ct(ot(this.rules, this.rawTokenCreator)).run(this.mask).fold((t, e) => {
|
|
2479
2486
|
this.rawTokens = t;
|
|
2480
|
-
}), ot(
|
|
2487
|
+
}), ct(ot(this.rules, this.validationTokenCreator)).run(this.mask).fold((t, e) => {
|
|
2481
2488
|
this.validationTokens = t;
|
|
2482
2489
|
});
|
|
2483
2490
|
}
|
|
2484
2491
|
}
|
|
2485
|
-
const
|
|
2492
|
+
const wn = {
|
|
2486
2493
|
"#": /[\d\s\+\-]/,
|
|
2487
2494
|
"&": /[\S]/,
|
|
2488
2495
|
0: /[\d]/,
|
|
@@ -2492,7 +2499,7 @@ const Sn = {
|
|
|
2492
2499
|
C: /./,
|
|
2493
2500
|
L: /[a-zA-Z]/,
|
|
2494
2501
|
a: /[a-zA-Z0-9\s]/
|
|
2495
|
-
},
|
|
2502
|
+
}, Xa = () => !1, zs = (a, t) => a.includeLiterals !== t.includeLiterals || a.mask !== t.mask || a.prompt !== t.prompt || a.promptPlaceholder !== t.promptPlaceholder || !_s(a.rules, t.rules), _s = (a, t) => {
|
|
2496
2503
|
if (!!a != !!t)
|
|
2497
2504
|
return !1;
|
|
2498
2505
|
if (a === t || !a || !t)
|
|
@@ -2511,9 +2518,9 @@ const Sn = {
|
|
|
2511
2518
|
}
|
|
2512
2519
|
}
|
|
2513
2520
|
return e;
|
|
2514
|
-
},
|
|
2521
|
+
}, Ve = class extends n.Component {
|
|
2515
2522
|
constructor(a) {
|
|
2516
|
-
super(a), this.state = {}, this._inputId = `k-${
|
|
2523
|
+
super(a), this.state = {}, this._inputId = `k-${this.props.id}`, this._service = new Ts(), this._isPasted = !1, this._selection = [null, null], this._input = null, this.focus = () => {
|
|
2517
2524
|
this._input && this._input.focus();
|
|
2518
2525
|
}, this.pasteHandler = (t) => {
|
|
2519
2526
|
const { selectionStart: e, selectionEnd: s } = t.target;
|
|
@@ -2528,7 +2535,7 @@ const Sn = {
|
|
|
2528
2535
|
let o;
|
|
2529
2536
|
if (this._isPasted) {
|
|
2530
2537
|
this._isPasted = !1;
|
|
2531
|
-
const
|
|
2538
|
+
const f = c.length - i, d = s.length - f;
|
|
2532
2539
|
o = this._service.maskInRange(s.slice(l, d), c, l, i);
|
|
2533
2540
|
} else
|
|
2534
2541
|
o = this._service.maskInput(s, c, e.selectionStart || 0);
|
|
@@ -2612,13 +2619,13 @@ const Sn = {
|
|
|
2612
2619
|
* @hidden
|
|
2613
2620
|
*/
|
|
2614
2621
|
get validityStyles() {
|
|
2615
|
-
return this.props.validityStyles !== void 0 ? this.props.validityStyles :
|
|
2622
|
+
return this.props.validityStyles !== void 0 ? this.props.validityStyles : Ve.defaultProps.validityStyles;
|
|
2616
2623
|
}
|
|
2617
2624
|
/**
|
|
2618
2625
|
* @hidden
|
|
2619
2626
|
*/
|
|
2620
2627
|
get required() {
|
|
2621
|
-
return this.props.required !== void 0 ? this.props.required :
|
|
2628
|
+
return this.props.required !== void 0 ? this.props.required : Ve.defaultProps.required;
|
|
2622
2629
|
}
|
|
2623
2630
|
/**
|
|
2624
2631
|
* Gets the `name` property of the MaskedTextBox.
|
|
@@ -2635,7 +2642,7 @@ const Sn = {
|
|
|
2635
2642
|
const l = a.selection, i = this.props.selection;
|
|
2636
2643
|
(!l && i || l && i && (l.start !== i.start || l.end !== i.end)) && (e = i.start, s = i.end), e !== null && s !== null && this.element.setSelectionRange(e, s);
|
|
2637
2644
|
}
|
|
2638
|
-
|
|
2645
|
+
zs(a, this.props) && this.updateService(), this.setValidity();
|
|
2639
2646
|
}
|
|
2640
2647
|
/**
|
|
2641
2648
|
* @hidden
|
|
@@ -2648,13 +2655,13 @@ const Sn = {
|
|
|
2648
2655
|
*/
|
|
2649
2656
|
render() {
|
|
2650
2657
|
const {
|
|
2651
|
-
size: a =
|
|
2652
|
-
fillMode: t =
|
|
2653
|
-
rounded: e =
|
|
2658
|
+
size: a = Ve.defaultProps.size,
|
|
2659
|
+
fillMode: t = Ve.defaultProps.fillMode,
|
|
2660
|
+
rounded: e = Ve.defaultProps.rounded
|
|
2654
2661
|
} = this.props, s = this.props.id || this._inputId, l = !this.validityStyles || this.validity.valid, i = this.props.style || {}, {
|
|
2655
|
-
prefix: c =
|
|
2656
|
-
suffix: o =
|
|
2657
|
-
} = this.props, [
|
|
2662
|
+
prefix: c = Ve.defaultProps.prefix,
|
|
2663
|
+
suffix: o = Ve.defaultProps.suffix
|
|
2664
|
+
} = this.props, [f] = qe(c), [d] = qe(o), m = /* @__PURE__ */ n.createElement(
|
|
2658
2665
|
"span",
|
|
2659
2666
|
{
|
|
2660
2667
|
dir: this.props.dir,
|
|
@@ -2672,7 +2679,7 @@ const Sn = {
|
|
|
2672
2679
|
),
|
|
2673
2680
|
style: this.props.label ? i : { width: this.props.width, ...i }
|
|
2674
2681
|
},
|
|
2675
|
-
/* @__PURE__ */ n.createElement(
|
|
2682
|
+
/* @__PURE__ */ n.createElement(f, null),
|
|
2676
2683
|
/* @__PURE__ */ n.createElement(
|
|
2677
2684
|
"input",
|
|
2678
2685
|
{
|
|
@@ -2694,19 +2701,19 @@ const Sn = {
|
|
|
2694
2701
|
disabled: this.props.disabled || void 0,
|
|
2695
2702
|
readOnly: this.props.readonly || void 0,
|
|
2696
2703
|
placeholder: this.props.placeholder,
|
|
2697
|
-
ref: (
|
|
2704
|
+
ref: (u) => this._input = u,
|
|
2698
2705
|
onChange: this.onChangeHandler,
|
|
2699
2706
|
onPaste: this.pasteHandler,
|
|
2700
2707
|
onFocus: this.focusHandler,
|
|
2701
2708
|
onBlur: this.blurHandler,
|
|
2702
|
-
onDragStart:
|
|
2703
|
-
onDrop:
|
|
2709
|
+
onDragStart: Xa,
|
|
2710
|
+
onDrop: Xa
|
|
2704
2711
|
}
|
|
2705
2712
|
),
|
|
2706
2713
|
/* @__PURE__ */ n.createElement(d, null)
|
|
2707
2714
|
);
|
|
2708
2715
|
return this.props.label ? /* @__PURE__ */ n.createElement(
|
|
2709
|
-
|
|
2716
|
+
ua,
|
|
2710
2717
|
{
|
|
2711
2718
|
label: this.props.label,
|
|
2712
2719
|
editorId: s,
|
|
@@ -2714,11 +2721,11 @@ const Sn = {
|
|
|
2714
2721
|
editorValid: l,
|
|
2715
2722
|
editorDisabled: this.props.disabled,
|
|
2716
2723
|
editorPlaceholder: this.props.placeholder,
|
|
2717
|
-
children:
|
|
2724
|
+
children: m,
|
|
2718
2725
|
style: { width: this.props.width },
|
|
2719
2726
|
dir: this.props.dir
|
|
2720
2727
|
}
|
|
2721
|
-
) :
|
|
2728
|
+
) : m;
|
|
2722
2729
|
}
|
|
2723
2730
|
triggerOnChange(a, t) {
|
|
2724
2731
|
if (this.setState({
|
|
@@ -2747,12 +2754,12 @@ const Sn = {
|
|
|
2747
2754
|
this._service.update(t);
|
|
2748
2755
|
}
|
|
2749
2756
|
get rules() {
|
|
2750
|
-
return Object.assign({},
|
|
2757
|
+
return Object.assign({}, wn, this.props.rules);
|
|
2751
2758
|
}
|
|
2752
2759
|
};
|
|
2753
|
-
let
|
|
2754
|
-
|
|
2755
|
-
|
|
2760
|
+
let yt = Ve;
|
|
2761
|
+
yt.displayName = "MaskedTextBox";
|
|
2762
|
+
yt.propTypes = {
|
|
2756
2763
|
value: r.string,
|
|
2757
2764
|
defaultValue: r.string,
|
|
2758
2765
|
placeholder: r.string,
|
|
@@ -2799,12 +2806,12 @@ kt.propTypes = {
|
|
|
2799
2806
|
rounded: r.oneOf([null, "small", "medium", "large", "full"]),
|
|
2800
2807
|
fillMode: r.oneOf([null, "solid", "flat", "outline"])
|
|
2801
2808
|
};
|
|
2802
|
-
|
|
2809
|
+
yt.defaultProps = {
|
|
2803
2810
|
prompt: "_",
|
|
2804
2811
|
promptPlaceholder: " ",
|
|
2805
2812
|
includeLiterals: !1,
|
|
2806
2813
|
maskValidation: !0,
|
|
2807
|
-
rules:
|
|
2814
|
+
rules: wn,
|
|
2808
2815
|
required: !1,
|
|
2809
2816
|
validityStyles: !0,
|
|
2810
2817
|
prefix: (a) => null,
|
|
@@ -2813,10 +2820,10 @@ kt.defaultProps = {
|
|
|
2813
2820
|
rounded: "medium",
|
|
2814
2821
|
fillMode: "solid"
|
|
2815
2822
|
};
|
|
2816
|
-
const
|
|
2817
|
-
|
|
2823
|
+
const As = he(), $s = et(Ue(As, yt));
|
|
2824
|
+
$s.displayName = "KendoReactMaskedTextBox";
|
|
2818
2825
|
var X = /* @__PURE__ */ ((a) => (a.start = "start", a.end = "end", a.min = "min", a.max = "max", a.increase = "increase", a.decrease = "decrease", a))(X || {});
|
|
2819
|
-
const
|
|
2826
|
+
const Hs = (a, t) => {
|
|
2820
2827
|
let e, s;
|
|
2821
2828
|
switch (t.type) {
|
|
2822
2829
|
case "start":
|
|
@@ -2892,18 +2899,18 @@ const $s = (a, t) => {
|
|
|
2892
2899
|
break;
|
|
2893
2900
|
}
|
|
2894
2901
|
return e;
|
|
2895
|
-
},
|
|
2902
|
+
}, Gs = (a, t, e) => {
|
|
2896
2903
|
const [s, l] = n.useState(a), i = n.useCallback(
|
|
2897
2904
|
(c) => {
|
|
2898
|
-
const o =
|
|
2905
|
+
const o = Hs(t.state || s, { ...c, ...t });
|
|
2899
2906
|
e && e(o, c.event), l(o);
|
|
2900
2907
|
},
|
|
2901
2908
|
[t, e]
|
|
2902
2909
|
);
|
|
2903
2910
|
return [s, i];
|
|
2904
|
-
},
|
|
2911
|
+
}, Ks = he(), ba = n.forwardRef((a, t) => {
|
|
2905
2912
|
pe(me);
|
|
2906
|
-
const e =
|
|
2913
|
+
const e = Re(Ks, a), s = n.useRef(null), l = n.useRef(null), i = n.useRef(null), c = n.useRef(null), o = n.useRef(null), f = n.useCallback(
|
|
2907
2914
|
() => {
|
|
2908
2915
|
c.current && c.current.focus();
|
|
2909
2916
|
},
|
|
@@ -2911,71 +2918,71 @@ const $s = (a, t) => {
|
|
|
2911
2918
|
);
|
|
2912
2919
|
n.useImperativeHandle(s, () => ({
|
|
2913
2920
|
element: l.current,
|
|
2914
|
-
focus:
|
|
2921
|
+
focus: f,
|
|
2915
2922
|
props: e
|
|
2916
2923
|
})), n.useImperativeHandle(t, () => s.current);
|
|
2917
2924
|
const d = n.useMemo(
|
|
2918
2925
|
() => e.min,
|
|
2919
2926
|
[e.min]
|
|
2920
|
-
),
|
|
2927
|
+
), m = n.useMemo(
|
|
2921
2928
|
() => e.max,
|
|
2922
2929
|
[e.max]
|
|
2923
|
-
),
|
|
2924
|
-
() => e.step !== void 0 ? e.step :
|
|
2925
|
-
[e.step,
|
|
2926
|
-
),
|
|
2930
|
+
), u = n.useMemo(
|
|
2931
|
+
() => e.step !== void 0 ? e.step : ut.step,
|
|
2932
|
+
[e.step, ut.step]
|
|
2933
|
+
), h = Ae(l, e.dir), y = (g, k) => {
|
|
2927
2934
|
e.onChange && s.current && e.onChange.call(void 0, {
|
|
2928
2935
|
value: g,
|
|
2929
2936
|
target: s.current,
|
|
2930
|
-
syntheticEvent:
|
|
2937
|
+
syntheticEvent: k
|
|
2931
2938
|
});
|
|
2932
|
-
}, [
|
|
2933
|
-
e.defaultValue ||
|
|
2939
|
+
}, [M, D] = n.useState(""), [N, L] = Gs(
|
|
2940
|
+
e.defaultValue || ut.defaultValue,
|
|
2934
2941
|
{
|
|
2935
2942
|
min: d,
|
|
2936
|
-
max:
|
|
2937
|
-
step:
|
|
2943
|
+
max: m,
|
|
2944
|
+
step: u,
|
|
2938
2945
|
state: e.value
|
|
2939
2946
|
},
|
|
2940
|
-
|
|
2947
|
+
y
|
|
2941
2948
|
), S = n.useMemo(
|
|
2942
|
-
() => e.value ||
|
|
2943
|
-
[e.value,
|
|
2944
|
-
),
|
|
2945
|
-
() => (S.start - d) / (
|
|
2946
|
-
[S.start, d,
|
|
2947
|
-
),
|
|
2948
|
-
() => (S.end - d) / (
|
|
2949
|
-
[S.end, d,
|
|
2949
|
+
() => e.value || N,
|
|
2950
|
+
[e.value, N]
|
|
2951
|
+
), w = n.useRef(null), B = n.useRef(null), O = n.useMemo(
|
|
2952
|
+
() => (S.start - d) / (m - d) * 100,
|
|
2953
|
+
[S.start, d, m]
|
|
2954
|
+
), I = n.useMemo(
|
|
2955
|
+
() => (S.end - d) / (m - d) * 100,
|
|
2956
|
+
[S.end, d, m]
|
|
2950
2957
|
), F = n.useMemo(
|
|
2951
2958
|
() => e.vertical ? { paddingTop: 0, height: "100%" } : {},
|
|
2952
2959
|
[e.vertical]
|
|
2953
|
-
),
|
|
2960
|
+
), _ = n.useMemo(
|
|
2954
2961
|
() => e.vertical ? { marginTop: "0.5rem", marginBottom: "0.5rem" } : { marginLeft: "0.5rem", marginRight: "0.5rem" },
|
|
2955
2962
|
[e.vertical]
|
|
2956
|
-
),
|
|
2963
|
+
), T = _e(), E = n.useCallback(
|
|
2957
2964
|
(g) => {
|
|
2958
|
-
if (!
|
|
2965
|
+
if (!B.current)
|
|
2959
2966
|
return;
|
|
2960
|
-
const
|
|
2961
|
-
return d + j * (
|
|
2967
|
+
const k = B.current.getBoundingClientRect(), C = e.vertical ? k.bottom - g.clientY : h === "rtl" ? k.right - g.clientX : g.clientX - k.left, P = e.vertical ? k.height : k.width, j = C / P;
|
|
2968
|
+
return d + j * (m - d);
|
|
2962
2969
|
},
|
|
2963
2970
|
[
|
|
2964
|
-
|
|
2971
|
+
B,
|
|
2965
2972
|
e.vertical,
|
|
2966
|
-
|
|
2973
|
+
h,
|
|
2967
2974
|
d,
|
|
2968
|
-
|
|
2969
|
-
|
|
2970
|
-
|
|
2975
|
+
m,
|
|
2976
|
+
N.start,
|
|
2977
|
+
N.end,
|
|
2971
2978
|
e.value && e.value.start,
|
|
2972
2979
|
e.value && e.value.end
|
|
2973
2980
|
]
|
|
2974
|
-
),
|
|
2981
|
+
), V = n.useCallback(
|
|
2975
2982
|
(g) => g <= S.start ? "start" : g >= S.end ? "end" : 2 * g < S.end + S.start ? "start" : "end",
|
|
2976
2983
|
[
|
|
2977
|
-
|
|
2978
|
-
|
|
2984
|
+
N.start,
|
|
2985
|
+
N.end,
|
|
2979
2986
|
e.value && e.value.start,
|
|
2980
2987
|
e.value && e.value.end
|
|
2981
2988
|
]
|
|
@@ -2983,76 +2990,76 @@ const $s = (a, t) => {
|
|
|
2983
2990
|
(g) => {
|
|
2984
2991
|
switch (g.keyCode) {
|
|
2985
2992
|
case z.right:
|
|
2986
|
-
g.preventDefault(),
|
|
2993
|
+
g.preventDefault(), L({ type: h === "rtl" ? X.decrease : X.increase, key: "start", event: g });
|
|
2987
2994
|
break;
|
|
2988
2995
|
case z.up:
|
|
2989
|
-
g.preventDefault(),
|
|
2996
|
+
g.preventDefault(), L({ type: X.increase, key: "start", event: g });
|
|
2990
2997
|
break;
|
|
2991
2998
|
case z.left:
|
|
2992
|
-
g.preventDefault(),
|
|
2999
|
+
g.preventDefault(), L({ type: h === "rtl" ? X.increase : X.decrease, key: "start", event: g });
|
|
2993
3000
|
break;
|
|
2994
3001
|
case z.down:
|
|
2995
|
-
g.preventDefault(),
|
|
3002
|
+
g.preventDefault(), L({ type: X.decrease, key: "start", event: g });
|
|
2996
3003
|
break;
|
|
2997
3004
|
case z.home:
|
|
2998
|
-
g.preventDefault(),
|
|
3005
|
+
g.preventDefault(), L({ type: X.min, key: "start", event: g });
|
|
2999
3006
|
break;
|
|
3000
3007
|
case z.end:
|
|
3001
|
-
g.preventDefault(),
|
|
3008
|
+
g.preventDefault(), L({ type: X.max, key: "start", event: g });
|
|
3002
3009
|
break;
|
|
3003
3010
|
}
|
|
3004
3011
|
},
|
|
3005
|
-
[
|
|
3012
|
+
[L]
|
|
3006
3013
|
), q = n.useCallback(
|
|
3007
3014
|
(g) => {
|
|
3008
3015
|
switch (g.keyCode) {
|
|
3009
3016
|
case z.right:
|
|
3010
|
-
g.preventDefault(),
|
|
3017
|
+
g.preventDefault(), L({ type: h === "rtl" ? X.decrease : X.increase, key: "end", event: g });
|
|
3011
3018
|
break;
|
|
3012
3019
|
case z.up:
|
|
3013
|
-
g.preventDefault(),
|
|
3020
|
+
g.preventDefault(), L({ type: X.increase, key: "end", event: g });
|
|
3014
3021
|
break;
|
|
3015
3022
|
case z.left:
|
|
3016
|
-
g.preventDefault(),
|
|
3023
|
+
g.preventDefault(), L({ type: h === "rtl" ? X.increase : X.decrease, key: "end", event: g });
|
|
3017
3024
|
break;
|
|
3018
3025
|
case z.down:
|
|
3019
|
-
g.preventDefault(),
|
|
3026
|
+
g.preventDefault(), L({ type: X.decrease, key: "end", event: g });
|
|
3020
3027
|
break;
|
|
3021
3028
|
case z.home:
|
|
3022
|
-
g.preventDefault(),
|
|
3029
|
+
g.preventDefault(), L({ type: X.min, key: "end", event: g });
|
|
3023
3030
|
break;
|
|
3024
3031
|
case z.end:
|
|
3025
|
-
g.preventDefault(),
|
|
3032
|
+
g.preventDefault(), L({ type: X.max, key: "end", event: g });
|
|
3026
3033
|
break;
|
|
3027
3034
|
}
|
|
3028
3035
|
},
|
|
3029
|
-
[
|
|
3036
|
+
[L, h]
|
|
3030
3037
|
), Z = n.useCallback(
|
|
3031
3038
|
(g) => {
|
|
3032
|
-
const
|
|
3039
|
+
const k = E(g), C = V(k);
|
|
3033
3040
|
D(C), C === "end" ? o.current.focus() : c.current.focus();
|
|
3034
|
-
const
|
|
3035
|
-
|
|
3041
|
+
const P = C === "end" ? X.end : X.start;
|
|
3042
|
+
L({ type: P, payload: k, event: g });
|
|
3036
3043
|
},
|
|
3037
|
-
[e.vertical, d,
|
|
3044
|
+
[e.vertical, d, m, L]
|
|
3038
3045
|
);
|
|
3039
|
-
return
|
|
3040
|
-
const
|
|
3041
|
-
|
|
3046
|
+
return Pn(B, { onPress: Z, onDrag: (g) => {
|
|
3047
|
+
const k = E(g), C = M === "end" ? X.end : X.start;
|
|
3048
|
+
L({ type: C, payload: k, event: g });
|
|
3042
3049
|
}, onRelease: (g) => {
|
|
3043
|
-
const
|
|
3044
|
-
|
|
3050
|
+
const k = E(g), C = M === "end" ? X.end : X.start;
|
|
3051
|
+
L({ type: C, payload: k, event: g }), D("");
|
|
3045
3052
|
} }), /* @__PURE__ */ n.createElement(
|
|
3046
3053
|
"div",
|
|
3047
3054
|
{
|
|
3048
3055
|
id: e.id,
|
|
3049
3056
|
style: e.style,
|
|
3050
3057
|
ref: l,
|
|
3051
|
-
dir:
|
|
3058
|
+
dir: h,
|
|
3052
3059
|
className: G(
|
|
3053
3060
|
"k-slider",
|
|
3054
3061
|
{
|
|
3055
|
-
"k-rtl":
|
|
3062
|
+
"k-rtl": h === "rtl",
|
|
3056
3063
|
"k-disabled": e.disabled,
|
|
3057
3064
|
"k-slider-vertical": e.vertical,
|
|
3058
3065
|
"k-slider-horizontal": !e.vertical
|
|
@@ -3063,13 +3070,13 @@ const $s = (a, t) => {
|
|
|
3063
3070
|
/* @__PURE__ */ n.createElement(
|
|
3064
3071
|
"div",
|
|
3065
3072
|
{
|
|
3066
|
-
ref:
|
|
3073
|
+
ref: B,
|
|
3067
3074
|
className: "k-slider-track-wrap",
|
|
3068
3075
|
style: {
|
|
3069
3076
|
flexGrow: 1,
|
|
3070
3077
|
position: "relative",
|
|
3071
3078
|
touchAction: "none",
|
|
3072
|
-
...
|
|
3079
|
+
..._
|
|
3073
3080
|
}
|
|
3074
3081
|
},
|
|
3075
3082
|
e.children && /* @__PURE__ */ n.createElement(
|
|
@@ -3090,20 +3097,20 @@ const $s = (a, t) => {
|
|
|
3090
3097
|
/* @__PURE__ */ n.createElement(
|
|
3091
3098
|
"div",
|
|
3092
3099
|
{
|
|
3093
|
-
ref:
|
|
3100
|
+
ref: w,
|
|
3094
3101
|
className: "k-slider-track",
|
|
3095
|
-
style: e.vertical ? { bottom: 0, height: "100%" } : { [
|
|
3102
|
+
style: e.vertical ? { bottom: 0, height: "100%" } : { [h === "rtl" ? "right" : "left"]: 0, width: "100%" }
|
|
3096
3103
|
},
|
|
3097
|
-
O !== null &&
|
|
3104
|
+
O !== null && I !== null && /* @__PURE__ */ n.createElement(
|
|
3098
3105
|
"div",
|
|
3099
3106
|
{
|
|
3100
3107
|
"data-selection": !0,
|
|
3101
3108
|
ref: i,
|
|
3102
3109
|
title: `${S.start} - ${S.end}`,
|
|
3103
3110
|
className: "k-slider-selection",
|
|
3104
|
-
style: e.vertical ? { height:
|
|
3105
|
-
[
|
|
3106
|
-
width:
|
|
3111
|
+
style: e.vertical ? { height: I - O + "%", bottom: O + "%" } : {
|
|
3112
|
+
[h === "rtl" ? "right" : "left"]: O + "%",
|
|
3113
|
+
width: I - O + "%"
|
|
3107
3114
|
}
|
|
3108
3115
|
}
|
|
3109
3116
|
),
|
|
@@ -3114,13 +3121,13 @@ const $s = (a, t) => {
|
|
|
3114
3121
|
role: "slider",
|
|
3115
3122
|
tabIndex: ie(e.startTabIndex, e.disabled, void 0),
|
|
3116
3123
|
"aria-valuemin": d,
|
|
3117
|
-
"aria-valuemax": Math.max(
|
|
3124
|
+
"aria-valuemax": Math.max(m, S.end),
|
|
3118
3125
|
"aria-valuenow": S.start,
|
|
3119
3126
|
"aria-disabled": e.disabled ? "true" : void 0,
|
|
3120
3127
|
"aria-valuetext": `${S.start} - ${S.end}`,
|
|
3121
3128
|
className: "k-draghandle",
|
|
3122
|
-
title:
|
|
3123
|
-
style: e.vertical ? { bottom: "calc(" + O + "%)", zIndex: 1 } :
|
|
3129
|
+
title: T.toLanguageString(Te, $[Te]),
|
|
3130
|
+
style: e.vertical ? { bottom: "calc(" + O + "%)", zIndex: 1 } : h === "rtl" ? { right: "calc(" + O + "% - 13px)", zIndex: 1 } : { left: "calc(" + O + "%)", zIndex: 1 },
|
|
3124
3131
|
onKeyDown: H
|
|
3125
3132
|
}
|
|
3126
3133
|
),
|
|
@@ -3131,20 +3138,20 @@ const $s = (a, t) => {
|
|
|
3131
3138
|
role: "slider",
|
|
3132
3139
|
tabIndex: ie(e.endTabIndex, e.disabled, void 0),
|
|
3133
3140
|
"aria-valuemin": Math.min(d, S.start),
|
|
3134
|
-
"aria-valuemax":
|
|
3141
|
+
"aria-valuemax": m,
|
|
3135
3142
|
"aria-valuenow": S.end,
|
|
3136
3143
|
"aria-disabled": e.disabled ? "true" : void 0,
|
|
3137
3144
|
"aria-valuetext": `${S.start} - ${S.end}`,
|
|
3138
3145
|
className: "k-draghandle",
|
|
3139
|
-
title:
|
|
3140
|
-
style: e.vertical ? { bottom: "calc(" +
|
|
3146
|
+
title: T.toLanguageString(Te, $[Te]),
|
|
3147
|
+
style: e.vertical ? { bottom: "calc(" + I + "%)", zIndex: 1 } : h === "rtl" ? { right: "calc(" + I + "% - 13px)", zIndex: 1 } : { left: "calc(" + I + "%)", zIndex: 1 },
|
|
3141
3148
|
onKeyDown: q
|
|
3142
3149
|
}
|
|
3143
3150
|
)
|
|
3144
3151
|
)
|
|
3145
3152
|
)
|
|
3146
3153
|
);
|
|
3147
|
-
}),
|
|
3154
|
+
}), qs = {
|
|
3148
3155
|
value: (a, t, e) => {
|
|
3149
3156
|
if (a.value) {
|
|
3150
3157
|
const s = a.value.start, l = a.value.end, i = a.min, c = a.max;
|
|
@@ -3198,7 +3205,7 @@ const $s = (a, t) => {
|
|
|
3198
3205
|
vertical: r.bool,
|
|
3199
3206
|
disabled: r.bool,
|
|
3200
3207
|
dir: r.oneOf(["ltr", "rtl"])
|
|
3201
|
-
},
|
|
3208
|
+
}, ut = {
|
|
3202
3209
|
step: 1,
|
|
3203
3210
|
defaultValue: {
|
|
3204
3211
|
start: 0,
|
|
@@ -3207,24 +3214,24 @@ const $s = (a, t) => {
|
|
|
3207
3214
|
vertical: !1,
|
|
3208
3215
|
disabled: !1
|
|
3209
3216
|
};
|
|
3210
|
-
|
|
3211
|
-
|
|
3212
|
-
|
|
3213
|
-
const
|
|
3217
|
+
ba.displayName = "KendoReactRangeSlider";
|
|
3218
|
+
ba.propTypes = qs;
|
|
3219
|
+
ba.defaultProps = ut;
|
|
3220
|
+
const ft = class extends n.Component {
|
|
3214
3221
|
/**
|
|
3215
3222
|
* @hidden
|
|
3216
3223
|
*/
|
|
3217
3224
|
constructor(a) {
|
|
3218
3225
|
super(a), this.setValidity = () => {
|
|
3219
3226
|
this._input && this._input.setCustomValidity && this._input.setCustomValidity(
|
|
3220
|
-
this.validity.valid ? "" : this.props.validationMessage || this.defaultValidationMessage.toLanguageString(
|
|
3227
|
+
this.validity.valid ? "" : this.props.validationMessage || this.defaultValidationMessage.toLanguageString(Jt, $[Jt])
|
|
3221
3228
|
);
|
|
3222
3229
|
}, this.limit = (t, e, s) => {
|
|
3223
3230
|
const l = s.offsetWidth, i = e.offsetWidth;
|
|
3224
3231
|
return t < 0 ? 0 : t > l - i ? l - i : t;
|
|
3225
3232
|
}, this.toggle = (t, e) => {
|
|
3226
3233
|
this.setState({ checked: t }), this.valueDuringOnChange = t, Q(this.props.onChange, e, this, { value: t }), this.valueDuringOnChange = void 0;
|
|
3227
|
-
}, this._element = null, this._wrapper = null, this._input = null, this._id =
|
|
3234
|
+
}, this._element = null, this._wrapper = null, this._input = null, this._id = this.props.id, this.defaultValidationMessage = Je(this), this.focus = () => {
|
|
3228
3235
|
this.actionElement && this.actionElement.focus();
|
|
3229
3236
|
}, this.dummyInput = (t) => /* @__PURE__ */ n.createElement(
|
|
3230
3237
|
"input",
|
|
@@ -3238,7 +3245,7 @@ const ut = class extends n.Component {
|
|
|
3238
3245
|
"aria-hidden": !0,
|
|
3239
3246
|
value: t,
|
|
3240
3247
|
style: { opacity: 0, width: 1, border: 0, zIndex: -1, position: "absolute", left: "50%" },
|
|
3241
|
-
onChange:
|
|
3248
|
+
onChange: Me,
|
|
3242
3249
|
name: this.name || void 0
|
|
3243
3250
|
}
|
|
3244
3251
|
), this.handleClick = (t) => {
|
|
@@ -3261,7 +3268,7 @@ const ut = class extends n.Component {
|
|
|
3261
3268
|
const { onBlur: e } = this.props;
|
|
3262
3269
|
e && e.call(void 0, t);
|
|
3263
3270
|
}, pe(me), this.state = {
|
|
3264
|
-
checked: a.defaultChecked ||
|
|
3271
|
+
checked: a.defaultChecked || ft.defaultProps.defaultChecked,
|
|
3265
3272
|
focused: !1
|
|
3266
3273
|
};
|
|
3267
3274
|
}
|
|
@@ -3298,13 +3305,13 @@ const ut = class extends n.Component {
|
|
|
3298
3305
|
* @hidden
|
|
3299
3306
|
*/
|
|
3300
3307
|
get validityStyles() {
|
|
3301
|
-
return this.props.validityStyles !== void 0 ? this.props.validityStyles :
|
|
3308
|
+
return this.props.validityStyles !== void 0 ? this.props.validityStyles : ft.defaultProps.validityStyles;
|
|
3302
3309
|
}
|
|
3303
3310
|
/**
|
|
3304
3311
|
* @hidden
|
|
3305
3312
|
*/
|
|
3306
3313
|
get required() {
|
|
3307
|
-
return this.props.required !== void 0 ? this.props.required :
|
|
3314
|
+
return this.props.required !== void 0 ? this.props.required : ft.defaultProps.required;
|
|
3308
3315
|
}
|
|
3309
3316
|
/**
|
|
3310
3317
|
* @hidden
|
|
@@ -3322,9 +3329,9 @@ const ut = class extends n.Component {
|
|
|
3322
3329
|
* @hidden
|
|
3323
3330
|
*/
|
|
3324
3331
|
render() {
|
|
3325
|
-
const { focused: a } = this.state, { dir: t, disabled: e, trackRounded: s, thumbRounded: l, size: i, offLabel: c, onLabel: o, tabIndex:
|
|
3332
|
+
const { focused: a } = this.state, { dir: t, disabled: e, trackRounded: s, thumbRounded: l, size: i, offLabel: c, onLabel: o, tabIndex: f } = this.props;
|
|
3326
3333
|
this.dir = t || this.element && getComputedStyle(this.element).direction || void 0;
|
|
3327
|
-
const d = !this.validityStyles || this.validity.valid,
|
|
3334
|
+
const d = !this.validityStyles || this.validity.valid, m = G(
|
|
3328
3335
|
"k-switch",
|
|
3329
3336
|
{
|
|
3330
3337
|
[`k-switch-${ne.sizeMap[i] || i}`]: i,
|
|
@@ -3336,7 +3343,7 @@ const ut = class extends n.Component {
|
|
|
3336
3343
|
"k-invalid": !d
|
|
3337
3344
|
},
|
|
3338
3345
|
this.props.className
|
|
3339
|
-
),
|
|
3346
|
+
), u = {
|
|
3340
3347
|
"aria-checked": this.value,
|
|
3341
3348
|
"aria-disabled": e || void 0,
|
|
3342
3349
|
"aria-labelledby": this.props.ariaLabelledBy,
|
|
@@ -3346,18 +3353,18 @@ const ut = class extends n.Component {
|
|
|
3346
3353
|
return /* @__PURE__ */ n.createElement(
|
|
3347
3354
|
"span",
|
|
3348
3355
|
{
|
|
3349
|
-
ref: (
|
|
3350
|
-
this._wrapper =
|
|
3356
|
+
ref: (h) => {
|
|
3357
|
+
this._wrapper = h;
|
|
3351
3358
|
},
|
|
3352
3359
|
role: "switch",
|
|
3353
|
-
...
|
|
3354
|
-
className:
|
|
3360
|
+
...u,
|
|
3361
|
+
className: m,
|
|
3355
3362
|
dir: this.dir,
|
|
3356
3363
|
onKeyDown: this.handleKeyDown,
|
|
3357
3364
|
onClick: this.handleClick,
|
|
3358
3365
|
onBlur: this.handleWrapperBlur,
|
|
3359
3366
|
onFocus: this.handleWrapperFocus,
|
|
3360
|
-
tabIndex: ie(
|
|
3367
|
+
tabIndex: ie(f, e, void 0),
|
|
3361
3368
|
accessKey: this.props.accessKey,
|
|
3362
3369
|
id: this.props.id || this._id
|
|
3363
3370
|
},
|
|
@@ -3368,8 +3375,8 @@ const ut = class extends n.Component {
|
|
|
3368
3375
|
"k-switch-track",
|
|
3369
3376
|
{ [`k-rounded-${ne.roundedMap[s] || s}`]: s }
|
|
3370
3377
|
),
|
|
3371
|
-
ref: (
|
|
3372
|
-
this._element =
|
|
3378
|
+
ref: (h) => {
|
|
3379
|
+
this._element = h;
|
|
3373
3380
|
}
|
|
3374
3381
|
},
|
|
3375
3382
|
this.dummyInput(this.value),
|
|
@@ -3380,9 +3387,9 @@ const ut = class extends n.Component {
|
|
|
3380
3387
|
);
|
|
3381
3388
|
}
|
|
3382
3389
|
};
|
|
3383
|
-
let
|
|
3384
|
-
|
|
3385
|
-
|
|
3390
|
+
let Ct = ft;
|
|
3391
|
+
Ct.displayName = "Switch";
|
|
3392
|
+
Ct.propTypes = {
|
|
3386
3393
|
accessKey: r.string,
|
|
3387
3394
|
checked: r.bool,
|
|
3388
3395
|
className: r.string,
|
|
@@ -3406,136 +3413,136 @@ yt.propTypes = {
|
|
|
3406
3413
|
onFocus: r.any,
|
|
3407
3414
|
onLabel: r.string
|
|
3408
3415
|
};
|
|
3409
|
-
|
|
3416
|
+
Ct.defaultProps = {
|
|
3410
3417
|
disabled: !1,
|
|
3411
3418
|
defaultChecked: !1,
|
|
3412
3419
|
size: "medium",
|
|
3413
3420
|
trackRounded: "full",
|
|
3414
3421
|
thumbRounded: "full",
|
|
3415
3422
|
offLabel: "OFF",
|
|
3416
|
-
onBlur:
|
|
3417
|
-
onFocus:
|
|
3423
|
+
onBlur: Me,
|
|
3424
|
+
onFocus: Me,
|
|
3418
3425
|
onLabel: "ON",
|
|
3419
3426
|
required: !1,
|
|
3420
3427
|
validityStyles: !0
|
|
3421
3428
|
};
|
|
3422
|
-
const
|
|
3423
|
-
|
|
3424
|
-
const
|
|
3429
|
+
const Us = he(), js = et(Ue(Us, Ct));
|
|
3430
|
+
js.displayName = "KendoReactSwitch";
|
|
3431
|
+
const Ws = he(), va = n.forwardRef((a, t) => {
|
|
3425
3432
|
pe(me);
|
|
3426
|
-
const e =
|
|
3433
|
+
const e = Re(Ws, a), {
|
|
3427
3434
|
ariaDescribedBy: s,
|
|
3428
3435
|
ariaLabelledBy: l,
|
|
3429
3436
|
checked: i,
|
|
3430
3437
|
className: c,
|
|
3431
3438
|
labelClassName: o,
|
|
3432
|
-
children:
|
|
3439
|
+
children: f,
|
|
3433
3440
|
defaultChecked: d,
|
|
3434
|
-
disabled:
|
|
3435
|
-
defaultValue:
|
|
3436
|
-
id:
|
|
3437
|
-
size:
|
|
3438
|
-
rounded:
|
|
3441
|
+
disabled: m,
|
|
3442
|
+
defaultValue: u,
|
|
3443
|
+
id: h,
|
|
3444
|
+
size: y,
|
|
3445
|
+
rounded: M,
|
|
3439
3446
|
label: D,
|
|
3440
|
-
labelPlacement:
|
|
3441
|
-
name:
|
|
3447
|
+
labelPlacement: N,
|
|
3448
|
+
name: L,
|
|
3442
3449
|
labelOptional: S,
|
|
3443
|
-
onChange:
|
|
3444
|
-
onFocus:
|
|
3450
|
+
onChange: w,
|
|
3451
|
+
onFocus: B,
|
|
3445
3452
|
onBlur: O,
|
|
3446
|
-
tabIndex:
|
|
3453
|
+
tabIndex: I,
|
|
3447
3454
|
value: F,
|
|
3448
|
-
required:
|
|
3449
|
-
valid:
|
|
3455
|
+
required: _,
|
|
3456
|
+
valid: T,
|
|
3450
3457
|
validationMessage: E,
|
|
3451
|
-
validityStyles:
|
|
3458
|
+
validityStyles: V,
|
|
3452
3459
|
// Removed to support direct use in Form Field component
|
|
3453
3460
|
visited: H,
|
|
3454
3461
|
touched: q,
|
|
3455
3462
|
modified: Z,
|
|
3456
|
-
...
|
|
3457
|
-
} = e,
|
|
3463
|
+
...p
|
|
3464
|
+
} = e, v = n.useRef(null), g = n.useCallback(
|
|
3458
3465
|
() => {
|
|
3459
|
-
|
|
3466
|
+
v.current && v.current.focus();
|
|
3460
3467
|
},
|
|
3461
3468
|
[]
|
|
3462
|
-
),
|
|
3469
|
+
), k = n.useCallback(
|
|
3463
3470
|
() => ({
|
|
3464
|
-
element:
|
|
3471
|
+
element: v.current,
|
|
3465
3472
|
focus: g,
|
|
3466
3473
|
get name() {
|
|
3467
|
-
return
|
|
3474
|
+
return v.current && v.current.name;
|
|
3468
3475
|
}
|
|
3469
3476
|
}),
|
|
3470
3477
|
[g]
|
|
3471
3478
|
);
|
|
3472
|
-
n.useImperativeHandle(t,
|
|
3473
|
-
const [C,
|
|
3479
|
+
n.useImperativeHandle(t, k);
|
|
3480
|
+
const [C, P] = n.useState(d), [j, J] = n.useState(u), R = typeof F == "boolean" || F === null, b = i !== void 0, W = R, K = W ? F : j, ee = b ? i : W ? void 0 : C, le = ee === void 0 && K, Ee = le ? K : ee, oe = le || W ? F === null ? F : void 0 : F || K, ce = Ee === null || oe === null, be = Qe(), He = _e(), A = (te) => He.toLanguageString(te, $[te]), xe = A(dn), ve = A(un), je = T !== void 0 ? T : _ ? !!ee : !0;
|
|
3474
3481
|
n.useEffect(
|
|
3475
3482
|
() => {
|
|
3476
|
-
|
|
3477
|
-
|
|
3483
|
+
v.current && v.current.setCustomValidity && v.current.setCustomValidity(
|
|
3484
|
+
je ? "" : E || xe
|
|
3478
3485
|
);
|
|
3479
3486
|
},
|
|
3480
|
-
[
|
|
3487
|
+
[je, E, xe]
|
|
3481
3488
|
);
|
|
3482
|
-
const
|
|
3489
|
+
const De = n.useCallback(
|
|
3483
3490
|
(te, we) => {
|
|
3484
|
-
!W && !
|
|
3485
|
-
|
|
3491
|
+
!W && !m && (J(we), !b && !m && P(we)), w && !m && Q(
|
|
3492
|
+
w,
|
|
3486
3493
|
te,
|
|
3487
3494
|
{
|
|
3488
|
-
...
|
|
3495
|
+
...k(),
|
|
3489
3496
|
value: we
|
|
3490
3497
|
},
|
|
3491
3498
|
{ value: we }
|
|
3492
3499
|
);
|
|
3493
3500
|
},
|
|
3494
|
-
[b,
|
|
3495
|
-
),
|
|
3501
|
+
[b, m, w, W, k]
|
|
3502
|
+
), wt = n.useCallback(
|
|
3496
3503
|
(te) => {
|
|
3497
3504
|
let we = te.target.checked;
|
|
3498
|
-
|
|
3505
|
+
De(te, we);
|
|
3499
3506
|
},
|
|
3500
|
-
[
|
|
3501
|
-
),
|
|
3507
|
+
[De, F]
|
|
3508
|
+
), tt = n.useCallback(
|
|
3502
3509
|
(te) => {
|
|
3503
|
-
if (
|
|
3510
|
+
if (m)
|
|
3504
3511
|
return;
|
|
3505
3512
|
const { keyCode: we } = te;
|
|
3506
|
-
let
|
|
3507
|
-
we === z.space && (te.preventDefault(), te.stopPropagation(),
|
|
3513
|
+
let Vn = te.currentTarget.checked;
|
|
3514
|
+
we === z.space && (te.preventDefault(), te.stopPropagation(), De(te, !Vn));
|
|
3508
3515
|
},
|
|
3509
|
-
[
|
|
3510
|
-
),
|
|
3516
|
+
[m, De]
|
|
3517
|
+
), at = n.useCallback(
|
|
3511
3518
|
(te) => {
|
|
3512
|
-
if (
|
|
3519
|
+
if (m)
|
|
3513
3520
|
return;
|
|
3514
3521
|
const { keyCode: we } = te;
|
|
3515
3522
|
we === z.space && te.preventDefault();
|
|
3516
3523
|
},
|
|
3517
|
-
[
|
|
3518
|
-
),
|
|
3524
|
+
[m]
|
|
3525
|
+
), It = n.useCallback(
|
|
3519
3526
|
(te) => {
|
|
3520
|
-
|
|
3521
|
-
|
|
3527
|
+
B && !m && Q(
|
|
3528
|
+
B,
|
|
3522
3529
|
te,
|
|
3523
|
-
|
|
3530
|
+
k(),
|
|
3524
3531
|
void 0
|
|
3525
3532
|
);
|
|
3526
3533
|
},
|
|
3527
|
-
[
|
|
3534
|
+
[B, m, k]
|
|
3528
3535
|
), x = n.useCallback(
|
|
3529
3536
|
(te) => {
|
|
3530
|
-
O && !
|
|
3537
|
+
O && !m && Q(
|
|
3531
3538
|
O,
|
|
3532
3539
|
te,
|
|
3533
|
-
|
|
3540
|
+
k(),
|
|
3534
3541
|
void 0
|
|
3535
3542
|
);
|
|
3536
3543
|
},
|
|
3537
|
-
[O,
|
|
3538
|
-
), U =
|
|
3544
|
+
[O, m, k]
|
|
3545
|
+
), U = Ae(v, e.dir), re = G(
|
|
3539
3546
|
"k-checkbox-wrap",
|
|
3540
3547
|
c
|
|
3541
3548
|
), Se = {
|
|
@@ -3543,50 +3550,50 @@ const js = he(), ba = n.forwardRef((a, t) => {
|
|
|
3543
3550
|
className: G(
|
|
3544
3551
|
"k-checkbox",
|
|
3545
3552
|
{
|
|
3546
|
-
[`k-checkbox-${ne.sizeMap[
|
|
3547
|
-
[`k-rounded-${ne.roundedMap[
|
|
3553
|
+
[`k-checkbox-${ne.sizeMap[y] || y}`]: y,
|
|
3554
|
+
[`k-rounded-${ne.roundedMap[M] || M}`]: M,
|
|
3548
3555
|
"k-indeterminate": ce,
|
|
3549
|
-
"k-disabled":
|
|
3550
|
-
"k-invalid k-invalid": !(
|
|
3556
|
+
"k-disabled": m,
|
|
3557
|
+
"k-invalid k-invalid": !(je || V !== void 0 || V === !0)
|
|
3551
3558
|
}
|
|
3552
3559
|
),
|
|
3553
|
-
ref:
|
|
3554
|
-
name:
|
|
3555
|
-
id:
|
|
3560
|
+
ref: v,
|
|
3561
|
+
name: L,
|
|
3562
|
+
id: h || be,
|
|
3556
3563
|
"aria-labelledby": l,
|
|
3557
3564
|
"aria-describedby": s,
|
|
3558
3565
|
checked: !!Ee,
|
|
3559
|
-
disabled:
|
|
3560
|
-
tabIndex: ie(
|
|
3566
|
+
disabled: m,
|
|
3567
|
+
tabIndex: ie(I, m),
|
|
3561
3568
|
role: "checkbox",
|
|
3562
|
-
required:
|
|
3569
|
+
required: _ !== void 0 ? _ : !1,
|
|
3563
3570
|
"aria-checked": ee || Ee ? !0 : ce ? "mixed" : !1,
|
|
3564
|
-
"aria-disabled":
|
|
3565
|
-
...
|
|
3566
|
-
onChange:
|
|
3567
|
-
onKeyDown:
|
|
3568
|
-
onKeyUp:
|
|
3569
|
-
onFocus:
|
|
3571
|
+
"aria-disabled": m || void 0,
|
|
3572
|
+
...p,
|
|
3573
|
+
onChange: wt,
|
|
3574
|
+
onKeyDown: tt,
|
|
3575
|
+
onKeyUp: at,
|
|
3576
|
+
onFocus: It,
|
|
3570
3577
|
onBlur: x
|
|
3571
|
-
},
|
|
3578
|
+
}, Ea = /* @__PURE__ */ n.createElement(
|
|
3572
3579
|
n.Fragment,
|
|
3573
3580
|
null,
|
|
3574
3581
|
// removing value prop is required due to bug in react where
|
|
3575
3582
|
// value set to undefined override default submit value
|
|
3576
|
-
oe === void 0 ? /* @__PURE__ */ n.createElement("input", { ...Se }) : /* @__PURE__ */ n.createElement("input", { ...Se, value:
|
|
3577
|
-
),
|
|
3583
|
+
oe === void 0 ? /* @__PURE__ */ n.createElement("input", { ...Se }) : /* @__PURE__ */ n.createElement("input", { ...Se, value: R ? void 0 : oe === null ? "" : oe })
|
|
3584
|
+
), Sa = /* @__PURE__ */ n.createElement(n.Fragment, null, D !== void 0 ? /* @__PURE__ */ n.createElement(
|
|
3578
3585
|
"label",
|
|
3579
3586
|
{
|
|
3580
3587
|
className: G("k-checkbox-label", o),
|
|
3581
|
-
htmlFor:
|
|
3588
|
+
htmlFor: h || be,
|
|
3582
3589
|
style: { userSelect: "none" }
|
|
3583
3590
|
},
|
|
3584
3591
|
D,
|
|
3585
3592
|
S && /* @__PURE__ */ n.createElement("span", { className: "k-label-optional" }, ve)
|
|
3586
3593
|
) : null);
|
|
3587
|
-
return /* @__PURE__ */ n.createElement(n.Fragment, null,
|
|
3594
|
+
return /* @__PURE__ */ n.createElement(n.Fragment, null, N === "before" ? /* @__PURE__ */ n.createElement("span", { className: re, dir: "rtl" }, Ea, Sa, f) : /* @__PURE__ */ n.createElement("span", { className: re, dir: U }, Ea, Sa, f));
|
|
3588
3595
|
});
|
|
3589
|
-
|
|
3596
|
+
va.propTypes = {
|
|
3590
3597
|
checked: r.bool,
|
|
3591
3598
|
className: r.string,
|
|
3592
3599
|
defaultChecked: r.bool,
|
|
@@ -3612,34 +3619,34 @@ ba.propTypes = {
|
|
|
3612
3619
|
onFocus: r.func,
|
|
3613
3620
|
onBlur: r.func
|
|
3614
3621
|
};
|
|
3615
|
-
const
|
|
3622
|
+
const Xs = {
|
|
3616
3623
|
size: "medium",
|
|
3617
3624
|
rounded: "medium"
|
|
3618
3625
|
};
|
|
3619
|
-
|
|
3620
|
-
|
|
3621
|
-
const
|
|
3626
|
+
va.defaultProps = Xs;
|
|
3627
|
+
va.displayName = "KendoCheckbox";
|
|
3628
|
+
const Ys = he(), xt = n.forwardRef((a, t) => {
|
|
3622
3629
|
pe(me);
|
|
3623
|
-
const e =
|
|
3630
|
+
const e = Re(Ys, a), {
|
|
3624
3631
|
ariaDescribedBy: s,
|
|
3625
3632
|
checked: l,
|
|
3626
3633
|
children: i,
|
|
3627
3634
|
className: c,
|
|
3628
3635
|
disabled: o,
|
|
3629
|
-
id:
|
|
3636
|
+
id: f,
|
|
3630
3637
|
size: d,
|
|
3631
|
-
label:
|
|
3632
|
-
labelPlacement:
|
|
3633
|
-
name:
|
|
3634
|
-
style:
|
|
3635
|
-
tabIndex:
|
|
3638
|
+
label: m,
|
|
3639
|
+
labelPlacement: u,
|
|
3640
|
+
name: h,
|
|
3641
|
+
style: y,
|
|
3642
|
+
tabIndex: M,
|
|
3636
3643
|
value: D,
|
|
3637
|
-
valid:
|
|
3638
|
-
onChange:
|
|
3644
|
+
valid: N,
|
|
3645
|
+
onChange: L,
|
|
3639
3646
|
onFocus: S,
|
|
3640
|
-
onBlur:
|
|
3641
|
-
...
|
|
3642
|
-
} = e, O = n.useRef(null),
|
|
3647
|
+
onBlur: w,
|
|
3648
|
+
...B
|
|
3649
|
+
} = e, O = n.useRef(null), I = n.useCallback(
|
|
3643
3650
|
() => {
|
|
3644
3651
|
O.current && O.current.focus();
|
|
3645
3652
|
},
|
|
@@ -3647,77 +3654,77 @@ const Xs = he(), Ct = n.forwardRef((a, t) => {
|
|
|
3647
3654
|
), F = n.useCallback(
|
|
3648
3655
|
() => ({
|
|
3649
3656
|
element: O.current,
|
|
3650
|
-
focus:
|
|
3657
|
+
focus: I
|
|
3651
3658
|
}),
|
|
3652
|
-
[
|
|
3659
|
+
[I]
|
|
3653
3660
|
);
|
|
3654
3661
|
n.useImperativeHandle(t, F);
|
|
3655
|
-
const
|
|
3656
|
-
(
|
|
3662
|
+
const _ = Qe(), T = n.useCallback(
|
|
3663
|
+
(p) => {
|
|
3657
3664
|
Q(
|
|
3658
|
-
|
|
3659
|
-
|
|
3665
|
+
L,
|
|
3666
|
+
p,
|
|
3660
3667
|
F(),
|
|
3661
3668
|
{ value: D }
|
|
3662
3669
|
);
|
|
3663
3670
|
},
|
|
3664
|
-
[
|
|
3671
|
+
[L, D, o]
|
|
3665
3672
|
), E = n.useCallback(
|
|
3666
|
-
(
|
|
3673
|
+
(p) => {
|
|
3667
3674
|
S && !o && Q(
|
|
3668
3675
|
S,
|
|
3669
|
-
|
|
3676
|
+
p,
|
|
3670
3677
|
F(),
|
|
3671
3678
|
void 0
|
|
3672
3679
|
);
|
|
3673
3680
|
},
|
|
3674
3681
|
[S, o]
|
|
3675
|
-
),
|
|
3676
|
-
(
|
|
3677
|
-
|
|
3678
|
-
|
|
3679
|
-
|
|
3682
|
+
), V = n.useCallback(
|
|
3683
|
+
(p) => {
|
|
3684
|
+
w && !o && Q(
|
|
3685
|
+
w,
|
|
3686
|
+
p,
|
|
3680
3687
|
F(),
|
|
3681
3688
|
void 0
|
|
3682
3689
|
);
|
|
3683
3690
|
},
|
|
3684
|
-
[
|
|
3691
|
+
[w, o]
|
|
3685
3692
|
), H = {
|
|
3686
3693
|
type: "radio",
|
|
3687
|
-
id:
|
|
3688
|
-
name:
|
|
3694
|
+
id: f || _,
|
|
3695
|
+
name: h,
|
|
3689
3696
|
className: G(
|
|
3690
3697
|
"k-radio",
|
|
3691
3698
|
{
|
|
3692
3699
|
[`k-radio-${ne.sizeMap[d] || d}`]: d,
|
|
3693
|
-
"k-invalid":
|
|
3700
|
+
"k-invalid": N === !1
|
|
3694
3701
|
},
|
|
3695
3702
|
c
|
|
3696
3703
|
),
|
|
3697
3704
|
ref: O,
|
|
3698
3705
|
disabled: o,
|
|
3699
|
-
tabIndex: ie(
|
|
3706
|
+
tabIndex: ie(M, o),
|
|
3700
3707
|
checked: l,
|
|
3701
|
-
style:
|
|
3708
|
+
style: y,
|
|
3702
3709
|
"aria-describedby": s,
|
|
3703
3710
|
value: D,
|
|
3704
|
-
onChange:
|
|
3711
|
+
onChange: T,
|
|
3705
3712
|
onFocus: E,
|
|
3706
|
-
onBlur:
|
|
3707
|
-
...
|
|
3708
|
-
}, q = /* @__PURE__ */ n.createElement(n.Fragment, null,
|
|
3713
|
+
onBlur: V,
|
|
3714
|
+
...B
|
|
3715
|
+
}, q = /* @__PURE__ */ n.createElement(n.Fragment, null, m !== void 0 ? /* @__PURE__ */ n.createElement(
|
|
3709
3716
|
"label",
|
|
3710
3717
|
{
|
|
3711
3718
|
className: "k-radio-label",
|
|
3712
|
-
htmlFor:
|
|
3719
|
+
htmlFor: f || _,
|
|
3713
3720
|
style: { userSelect: "none" },
|
|
3714
|
-
"aria-label":
|
|
3721
|
+
"aria-label": m
|
|
3715
3722
|
},
|
|
3716
|
-
|
|
3723
|
+
m
|
|
3717
3724
|
) : null), Z = /* @__PURE__ */ n.createElement("input", { ...H });
|
|
3718
|
-
return
|
|
3725
|
+
return u === "before" ? /* @__PURE__ */ n.createElement(n.Fragment, null, q, Z, i) : /* @__PURE__ */ n.createElement(n.Fragment, null, Z, q, i);
|
|
3719
3726
|
});
|
|
3720
|
-
|
|
3727
|
+
xt.propTypes = {
|
|
3721
3728
|
ariaDescribedBy: r.string,
|
|
3722
3729
|
checked: r.bool,
|
|
3723
3730
|
className: r.string,
|
|
@@ -3735,110 +3742,112 @@ Ct.propTypes = {
|
|
|
3735
3742
|
onFocus: r.func,
|
|
3736
3743
|
onBlur: r.func
|
|
3737
3744
|
};
|
|
3738
|
-
const
|
|
3745
|
+
const Zs = {
|
|
3739
3746
|
size: "medium"
|
|
3740
3747
|
};
|
|
3741
|
-
|
|
3742
|
-
|
|
3743
|
-
const
|
|
3748
|
+
xt.displayName = "KendoRadioButton";
|
|
3749
|
+
xt.defaultProps = Zs;
|
|
3750
|
+
const Js = he(), ka = n.forwardRef((a, t) => {
|
|
3744
3751
|
pe(me);
|
|
3745
|
-
const e =
|
|
3746
|
-
|
|
3747
|
-
|
|
3748
|
-
|
|
3749
|
-
|
|
3750
|
-
|
|
3751
|
-
|
|
3752
|
-
|
|
3753
|
-
|
|
3754
|
-
|
|
3755
|
-
|
|
3756
|
-
|
|
3757
|
-
|
|
3758
|
-
|
|
3752
|
+
const e = Re(Js, a), {
|
|
3753
|
+
id: s,
|
|
3754
|
+
ariaLabelledBy: l,
|
|
3755
|
+
ariaDescribedBy: i,
|
|
3756
|
+
className: c,
|
|
3757
|
+
data: o,
|
|
3758
|
+
defaultValue: f,
|
|
3759
|
+
disabled: d,
|
|
3760
|
+
name: m,
|
|
3761
|
+
labelPlacement: u,
|
|
3762
|
+
layout: h,
|
|
3763
|
+
style: y,
|
|
3764
|
+
value: M,
|
|
3765
|
+
valid: D,
|
|
3766
|
+
item: N = In.item,
|
|
3759
3767
|
onChange: L,
|
|
3760
|
-
onFocus:
|
|
3761
|
-
} = e,
|
|
3768
|
+
onFocus: S
|
|
3769
|
+
} = e, w = n.useRef(null), B = n.useCallback(
|
|
3762
3770
|
() => {
|
|
3763
|
-
|
|
3771
|
+
w.current && tn(w.current);
|
|
3764
3772
|
},
|
|
3765
3773
|
[]
|
|
3766
|
-
),
|
|
3774
|
+
), O = n.useCallback(
|
|
3767
3775
|
() => ({
|
|
3768
|
-
element:
|
|
3769
|
-
focus:
|
|
3776
|
+
element: w.current,
|
|
3777
|
+
focus: B
|
|
3770
3778
|
}),
|
|
3771
|
-
[
|
|
3779
|
+
[B]
|
|
3772
3780
|
);
|
|
3773
|
-
n.useImperativeHandle(t,
|
|
3774
|
-
const [
|
|
3775
|
-
(
|
|
3776
|
-
let
|
|
3777
|
-
!
|
|
3781
|
+
n.useImperativeHandle(t, O);
|
|
3782
|
+
const [I, F] = n.useState(f), _ = M !== void 0, T = _ ? M : I, E = n.useCallback(
|
|
3783
|
+
(v) => {
|
|
3784
|
+
let g = v.value;
|
|
3785
|
+
!_ && !d && F(g), L && !d && Q(
|
|
3778
3786
|
L,
|
|
3779
|
-
|
|
3780
|
-
|
|
3781
|
-
{ value:
|
|
3787
|
+
v.syntheticEvent,
|
|
3788
|
+
O(),
|
|
3789
|
+
{ value: g }
|
|
3782
3790
|
);
|
|
3783
3791
|
},
|
|
3784
|
-
[
|
|
3785
|
-
),
|
|
3786
|
-
(
|
|
3787
|
-
|
|
3788
|
-
|
|
3789
|
-
|
|
3790
|
-
|
|
3792
|
+
[F, L, d]
|
|
3793
|
+
), V = n.useCallback(
|
|
3794
|
+
(v) => {
|
|
3795
|
+
S && !d && Q(
|
|
3796
|
+
S,
|
|
3797
|
+
v.syntheticEvent,
|
|
3798
|
+
O(),
|
|
3791
3799
|
void 0
|
|
3792
3800
|
);
|
|
3793
3801
|
},
|
|
3794
|
-
[
|
|
3795
|
-
),
|
|
3802
|
+
[S, d]
|
|
3803
|
+
), H = Qe(), q = G(
|
|
3796
3804
|
"k-radio-list",
|
|
3797
3805
|
{
|
|
3798
|
-
"k-list-horizontal":
|
|
3799
|
-
"k-list-vertical":
|
|
3806
|
+
"k-list-horizontal": h === "horizontal",
|
|
3807
|
+
"k-list-vertical": h === "vertical" || h === void 0
|
|
3800
3808
|
},
|
|
3801
|
-
|
|
3802
|
-
),
|
|
3803
|
-
const
|
|
3804
|
-
...
|
|
3805
|
-
valid:
|
|
3806
|
-
checked:
|
|
3807
|
-
disabled: !!(
|
|
3808
|
-
labelPlacement:
|
|
3809
|
-
tabIndex:
|
|
3810
|
-
index:
|
|
3811
|
-
name:
|
|
3812
|
-
onChange:
|
|
3813
|
-
onFocus:
|
|
3809
|
+
c
|
|
3810
|
+
), Z = Dn(w, e.dir), p = o && o.map((v, g) => {
|
|
3811
|
+
const k = T === v.value, C = T == null, P = {
|
|
3812
|
+
...v,
|
|
3813
|
+
valid: D,
|
|
3814
|
+
checked: k,
|
|
3815
|
+
disabled: !!(v.disabled || d),
|
|
3816
|
+
labelPlacement: v.labelPlacement ? v.labelPlacement : u,
|
|
3817
|
+
tabIndex: v.tabIndex ? v.tabIndex : C && g === 0 || k ? 0 : -1,
|
|
3818
|
+
index: g,
|
|
3819
|
+
name: m || H,
|
|
3820
|
+
onChange: E,
|
|
3821
|
+
onFocus: V
|
|
3814
3822
|
};
|
|
3815
3823
|
return /* @__PURE__ */ n.createElement(
|
|
3816
|
-
|
|
3824
|
+
N,
|
|
3817
3825
|
{
|
|
3818
|
-
className: G("k-radio-item", { "k-disabled":
|
|
3819
|
-
key:
|
|
3826
|
+
className: G("k-radio-item", { "k-disabled": P.disabled || d }),
|
|
3827
|
+
key: g,
|
|
3820
3828
|
role: "none"
|
|
3821
3829
|
},
|
|
3822
|
-
/* @__PURE__ */ n.createElement(
|
|
3830
|
+
/* @__PURE__ */ n.createElement(xt, { ...P })
|
|
3823
3831
|
);
|
|
3824
3832
|
});
|
|
3825
3833
|
return /* @__PURE__ */ n.createElement(
|
|
3826
3834
|
"ul",
|
|
3827
3835
|
{
|
|
3836
|
+
id: s,
|
|
3828
3837
|
role: "radiogroup",
|
|
3829
|
-
className:
|
|
3830
|
-
ref:
|
|
3831
|
-
dir:
|
|
3832
|
-
style:
|
|
3833
|
-
"aria-labelledby":
|
|
3834
|
-
"aria-describedby":
|
|
3838
|
+
className: q,
|
|
3839
|
+
ref: w,
|
|
3840
|
+
dir: Z,
|
|
3841
|
+
style: y,
|
|
3842
|
+
"aria-labelledby": l,
|
|
3843
|
+
"aria-describedby": i
|
|
3835
3844
|
},
|
|
3836
|
-
|
|
3845
|
+
p
|
|
3837
3846
|
);
|
|
3838
|
-
}),
|
|
3847
|
+
}), In = {
|
|
3839
3848
|
item: (a) => /* @__PURE__ */ n.createElement("li", { ...a })
|
|
3840
3849
|
};
|
|
3841
|
-
|
|
3850
|
+
ka.propTypes = {
|
|
3842
3851
|
ariaLabelledBy: r.string,
|
|
3843
3852
|
ariaDescribedBy: r.string,
|
|
3844
3853
|
className: r.string,
|
|
@@ -3854,77 +3863,77 @@ va.propTypes = {
|
|
|
3854
3863
|
onChange: r.func,
|
|
3855
3864
|
onFocus: r.func
|
|
3856
3865
|
};
|
|
3857
|
-
|
|
3858
|
-
|
|
3859
|
-
const
|
|
3860
|
-
const e =
|
|
3866
|
+
ka.defaultProps = In;
|
|
3867
|
+
ka.displayName = "KendoRadioGroup";
|
|
3868
|
+
const Qs = he(), ya = n.forwardRef((a, t) => {
|
|
3869
|
+
const e = Re(Qs, a), {
|
|
3861
3870
|
size: s,
|
|
3862
3871
|
rounded: l,
|
|
3863
3872
|
fillMode: i,
|
|
3864
3873
|
ariaDescribedBy: c,
|
|
3865
3874
|
ariaLabelledBy: o,
|
|
3866
|
-
autoSize:
|
|
3875
|
+
autoSize: f,
|
|
3867
3876
|
className: d,
|
|
3868
|
-
defaultValue:
|
|
3869
|
-
disabled:
|
|
3870
|
-
readOnly:
|
|
3871
|
-
required:
|
|
3872
|
-
rows:
|
|
3877
|
+
defaultValue: m,
|
|
3878
|
+
disabled: u,
|
|
3879
|
+
readOnly: h,
|
|
3880
|
+
required: y,
|
|
3881
|
+
rows: M,
|
|
3873
3882
|
id: D,
|
|
3874
|
-
name:
|
|
3875
|
-
placeholder:
|
|
3883
|
+
name: N,
|
|
3884
|
+
placeholder: L,
|
|
3876
3885
|
style: S,
|
|
3877
|
-
tabIndex:
|
|
3878
|
-
value:
|
|
3886
|
+
tabIndex: w,
|
|
3887
|
+
value: B,
|
|
3879
3888
|
valid: O,
|
|
3880
|
-
validationMessage:
|
|
3889
|
+
validationMessage: I,
|
|
3881
3890
|
validityStyles: F,
|
|
3882
|
-
onChange:
|
|
3883
|
-
onFocus:
|
|
3891
|
+
onChange: _,
|
|
3892
|
+
onFocus: T,
|
|
3884
3893
|
onBlur: E,
|
|
3885
3894
|
// Removed to support direct use in Form Field component
|
|
3886
|
-
visited:
|
|
3895
|
+
visited: V,
|
|
3887
3896
|
touched: H,
|
|
3888
3897
|
modified: q,
|
|
3889
3898
|
...Z
|
|
3890
|
-
} = e,
|
|
3899
|
+
} = e, p = n.useRef(null), v = n.useCallback(
|
|
3891
3900
|
() => {
|
|
3892
|
-
|
|
3901
|
+
p.current && p.current.focus();
|
|
3893
3902
|
},
|
|
3894
3903
|
[]
|
|
3895
|
-
), [g,
|
|
3904
|
+
), [g, k] = n.useState(m), C = B !== void 0, P = C ? B : g, j = n.useCallback(
|
|
3896
3905
|
() => ({
|
|
3897
|
-
element:
|
|
3898
|
-
focus:
|
|
3906
|
+
element: p,
|
|
3907
|
+
focus: v,
|
|
3899
3908
|
get value() {
|
|
3900
|
-
return
|
|
3909
|
+
return P;
|
|
3901
3910
|
},
|
|
3902
3911
|
get name() {
|
|
3903
|
-
return
|
|
3912
|
+
return p.current && p.current.name;
|
|
3904
3913
|
}
|
|
3905
3914
|
}),
|
|
3906
|
-
[
|
|
3915
|
+
[v, P]
|
|
3907
3916
|
);
|
|
3908
3917
|
n.useImperativeHandle(t, j);
|
|
3909
|
-
const [J,
|
|
3918
|
+
const [J, R] = n.useState("auto"), b = Qe(), W = Ae(p, e.dir), K = O !== void 0 ? O : y ? !!P : !0;
|
|
3910
3919
|
n.useEffect(
|
|
3911
3920
|
() => {
|
|
3912
|
-
|
|
3913
|
-
K ? "" :
|
|
3921
|
+
p.current && p.current.setCustomValidity && p.current.setCustomValidity(
|
|
3922
|
+
K ? "" : I || ""
|
|
3914
3923
|
);
|
|
3915
3924
|
},
|
|
3916
|
-
[K,
|
|
3925
|
+
[K, I]
|
|
3917
3926
|
), n.useLayoutEffect(
|
|
3918
3927
|
() => {
|
|
3919
|
-
|
|
3928
|
+
p.current && R(`${p.current.scrollHeight}px`);
|
|
3920
3929
|
},
|
|
3921
|
-
[
|
|
3930
|
+
[P]
|
|
3922
3931
|
);
|
|
3923
3932
|
const ee = n.useCallback(
|
|
3924
3933
|
(ce) => {
|
|
3925
3934
|
const be = ce.target.value;
|
|
3926
|
-
|
|
3927
|
-
|
|
3935
|
+
R("auto"), !C && !u && k(be), _ && !u && Q(
|
|
3936
|
+
_,
|
|
3928
3937
|
ce,
|
|
3929
3938
|
{
|
|
3930
3939
|
...j(),
|
|
@@ -3933,45 +3942,45 @@ const Js = he(), ka = n.forwardRef((a, t) => {
|
|
|
3933
3942
|
{ value: be }
|
|
3934
3943
|
);
|
|
3935
3944
|
},
|
|
3936
|
-
[
|
|
3945
|
+
[k, _, u, C]
|
|
3937
3946
|
), le = n.useCallback(
|
|
3938
3947
|
(ce) => {
|
|
3939
|
-
|
|
3940
|
-
|
|
3948
|
+
T && !u && Q(
|
|
3949
|
+
T,
|
|
3941
3950
|
ce,
|
|
3942
3951
|
j(),
|
|
3943
3952
|
void 0
|
|
3944
3953
|
);
|
|
3945
3954
|
},
|
|
3946
|
-
[
|
|
3955
|
+
[T, u]
|
|
3947
3956
|
), Ee = n.useCallback(
|
|
3948
3957
|
(ce) => {
|
|
3949
|
-
E && !
|
|
3958
|
+
E && !u && Q(
|
|
3950
3959
|
E,
|
|
3951
3960
|
ce,
|
|
3952
3961
|
j(),
|
|
3953
3962
|
void 0
|
|
3954
3963
|
);
|
|
3955
3964
|
},
|
|
3956
|
-
[E,
|
|
3965
|
+
[E, u]
|
|
3957
3966
|
), oe = {
|
|
3958
3967
|
id: D || b,
|
|
3959
3968
|
role: "textbox",
|
|
3960
|
-
name:
|
|
3969
|
+
name: N,
|
|
3961
3970
|
className: "k-input-inner !k-overflow-auto",
|
|
3962
|
-
ref:
|
|
3963
|
-
disabled:
|
|
3964
|
-
rows:
|
|
3965
|
-
placeholder:
|
|
3966
|
-
readOnly:
|
|
3967
|
-
required:
|
|
3968
|
-
tabIndex: ie(
|
|
3969
|
-
style:
|
|
3971
|
+
ref: p,
|
|
3972
|
+
disabled: u,
|
|
3973
|
+
rows: M,
|
|
3974
|
+
placeholder: L,
|
|
3975
|
+
readOnly: h,
|
|
3976
|
+
required: y,
|
|
3977
|
+
tabIndex: ie(w, u),
|
|
3978
|
+
style: f ? { resize: "none", overflow: "hidden", height: J } : {},
|
|
3970
3979
|
"aria-labelledby": o,
|
|
3971
3980
|
"aria-describedby": c,
|
|
3972
3981
|
"aria-multiline": !0,
|
|
3973
|
-
"aria-disabled":
|
|
3974
|
-
value: C ?
|
|
3982
|
+
"aria-disabled": u || void 0,
|
|
3983
|
+
value: C ? B : g,
|
|
3975
3984
|
...Z,
|
|
3976
3985
|
onChange: ee,
|
|
3977
3986
|
onFocus: le,
|
|
@@ -3988,8 +3997,8 @@ const Js = he(), ka = n.forwardRef((a, t) => {
|
|
|
3988
3997
|
[`k-input-${i}`]: i,
|
|
3989
3998
|
[`k-rounded-${ne.roundedMap[l] || l}`]: l,
|
|
3990
3999
|
"k-invalid": !(K || F !== void 0 || F === !0),
|
|
3991
|
-
"k-required":
|
|
3992
|
-
"k-disabled":
|
|
4000
|
+
"k-required": y,
|
|
4001
|
+
"k-disabled": u
|
|
3993
4002
|
},
|
|
3994
4003
|
d
|
|
3995
4004
|
),
|
|
@@ -3999,7 +4008,7 @@ const Js = he(), ka = n.forwardRef((a, t) => {
|
|
|
3999
4008
|
/* @__PURE__ */ n.createElement("textarea", { ...oe })
|
|
4000
4009
|
);
|
|
4001
4010
|
});
|
|
4002
|
-
|
|
4011
|
+
ya.propTypes = {
|
|
4003
4012
|
ariaDescribedBy: r.string,
|
|
4004
4013
|
ariaLabelledBy: r.string,
|
|
4005
4014
|
autoSize: r.bool,
|
|
@@ -4026,94 +4035,94 @@ ka.propTypes = {
|
|
|
4026
4035
|
rounded: r.oneOf([null, "small", "medium", "large", "full"]),
|
|
4027
4036
|
fillMode: r.oneOf([null, "solid", "flat", "outline"])
|
|
4028
4037
|
};
|
|
4029
|
-
const
|
|
4038
|
+
const er = {
|
|
4030
4039
|
size: "medium",
|
|
4031
4040
|
rounded: "medium",
|
|
4032
4041
|
fillMode: "solid"
|
|
4033
4042
|
};
|
|
4034
|
-
|
|
4035
|
-
|
|
4036
|
-
const
|
|
4037
|
-
const e = n.useRef(null), s = n.useRef(null), l =
|
|
4043
|
+
ya.displayName = "KendoTextArea";
|
|
4044
|
+
ya.defaultProps = er;
|
|
4045
|
+
const Et = n.forwardRef((a, t) => {
|
|
4046
|
+
const e = n.useRef(null), s = n.useRef(null), l = Ae(s, a.dir);
|
|
4038
4047
|
n.useImperativeHandle(e, () => ({
|
|
4039
4048
|
element: s.current,
|
|
4040
4049
|
props: a,
|
|
4041
4050
|
value: a.value
|
|
4042
4051
|
})), n.useImperativeHandle(t, () => e.current);
|
|
4043
4052
|
const i = n.useCallback(
|
|
4044
|
-
(
|
|
4053
|
+
(h) => {
|
|
4045
4054
|
a.onClick && a.onClick.call(
|
|
4046
4055
|
void 0,
|
|
4047
4056
|
{
|
|
4048
4057
|
value: a.value,
|
|
4049
4058
|
target: e.current,
|
|
4050
|
-
syntheticEvent:
|
|
4059
|
+
syntheticEvent: h
|
|
4051
4060
|
}
|
|
4052
4061
|
);
|
|
4053
4062
|
},
|
|
4054
4063
|
[a.onClick, a.value]
|
|
4055
4064
|
), c = n.useCallback(
|
|
4056
|
-
(
|
|
4065
|
+
(h) => {
|
|
4057
4066
|
a.onKeyDown && a.onKeyDown.call(
|
|
4058
4067
|
void 0,
|
|
4059
4068
|
{
|
|
4060
4069
|
target: e.current,
|
|
4061
|
-
syntheticEvent:
|
|
4070
|
+
syntheticEvent: h
|
|
4062
4071
|
}
|
|
4063
4072
|
);
|
|
4064
4073
|
},
|
|
4065
4074
|
[a.onKeyDown]
|
|
4066
4075
|
), o = n.useCallback(
|
|
4067
|
-
(
|
|
4076
|
+
(h) => {
|
|
4068
4077
|
a.onFocus && a.onFocus.call(
|
|
4069
4078
|
void 0,
|
|
4070
4079
|
{
|
|
4071
4080
|
target: e.current,
|
|
4072
|
-
syntheticEvent:
|
|
4081
|
+
syntheticEvent: h
|
|
4073
4082
|
}
|
|
4074
4083
|
);
|
|
4075
4084
|
},
|
|
4076
4085
|
[a.onFocus]
|
|
4077
|
-
),
|
|
4078
|
-
(
|
|
4086
|
+
), f = n.useCallback(
|
|
4087
|
+
(h) => {
|
|
4079
4088
|
a.onBlur && a.onBlur.call(
|
|
4080
4089
|
void 0,
|
|
4081
4090
|
{
|
|
4082
4091
|
target: e.current,
|
|
4083
|
-
syntheticEvent:
|
|
4092
|
+
syntheticEvent: h
|
|
4084
4093
|
}
|
|
4085
4094
|
);
|
|
4086
4095
|
},
|
|
4087
4096
|
[a.onBlur]
|
|
4088
4097
|
), d = n.useCallback(
|
|
4089
|
-
(
|
|
4098
|
+
(h) => {
|
|
4090
4099
|
a.onMouseMove && a.onMouseMove.call(
|
|
4091
4100
|
void 0,
|
|
4092
4101
|
{
|
|
4093
4102
|
target: e.current,
|
|
4094
|
-
syntheticEvent:
|
|
4103
|
+
syntheticEvent: h
|
|
4095
4104
|
}
|
|
4096
4105
|
);
|
|
4097
4106
|
},
|
|
4098
4107
|
[a.onMouseMove]
|
|
4099
|
-
),
|
|
4100
|
-
(
|
|
4108
|
+
), m = n.useCallback(
|
|
4109
|
+
(h) => {
|
|
4101
4110
|
a.onMouseEnter && a.onMouseEnter.call(
|
|
4102
4111
|
void 0,
|
|
4103
4112
|
{
|
|
4104
4113
|
target: e.current,
|
|
4105
|
-
syntheticEvent:
|
|
4114
|
+
syntheticEvent: h
|
|
4106
4115
|
}
|
|
4107
4116
|
);
|
|
4108
4117
|
},
|
|
4109
4118
|
[a.onMouseEnter]
|
|
4110
|
-
),
|
|
4111
|
-
(
|
|
4119
|
+
), u = n.useCallback(
|
|
4120
|
+
(h) => {
|
|
4112
4121
|
a.onMouseLeave && a.onMouseLeave.call(
|
|
4113
4122
|
void 0,
|
|
4114
4123
|
{
|
|
4115
4124
|
target: e.current,
|
|
4116
|
-
syntheticEvent:
|
|
4125
|
+
syntheticEvent: h
|
|
4117
4126
|
}
|
|
4118
4127
|
);
|
|
4119
4128
|
},
|
|
@@ -4141,14 +4150,14 @@ const xt = n.forwardRef((a, t) => {
|
|
|
4141
4150
|
onClick: i,
|
|
4142
4151
|
onKeyDown: c,
|
|
4143
4152
|
onFocus: o,
|
|
4144
|
-
onBlur:
|
|
4145
|
-
onMouseEnter:
|
|
4146
|
-
onMouseLeave:
|
|
4153
|
+
onBlur: f,
|
|
4154
|
+
onMouseEnter: m,
|
|
4155
|
+
onMouseLeave: u,
|
|
4147
4156
|
onMouseMove: d
|
|
4148
4157
|
},
|
|
4149
4158
|
a.children
|
|
4150
4159
|
);
|
|
4151
|
-
}),
|
|
4160
|
+
}), tr = {
|
|
4152
4161
|
id: r.string,
|
|
4153
4162
|
icon: r.any,
|
|
4154
4163
|
dir: r.oneOf(["ltr", "rtl"]),
|
|
@@ -4157,26 +4166,26 @@ const xt = n.forwardRef((a, t) => {
|
|
|
4157
4166
|
half: r.bool,
|
|
4158
4167
|
selected: r.bool,
|
|
4159
4168
|
hovered: r.bool
|
|
4160
|
-
},
|
|
4169
|
+
}, ar = {
|
|
4161
4170
|
dir: "ltr"
|
|
4162
4171
|
};
|
|
4163
|
-
|
|
4164
|
-
|
|
4165
|
-
|
|
4172
|
+
Et.displayName = "KendoReactRatingItem";
|
|
4173
|
+
Et.propTypes = tr;
|
|
4174
|
+
Et.defaultProps = ar;
|
|
4166
4175
|
const ye = (a, t) => {
|
|
4167
4176
|
if (a % 1) {
|
|
4168
4177
|
const e = Math.pow(10, (t.toString().split(".")[1] || t.toString().split(".")[0]).length);
|
|
4169
4178
|
return Math.round(a * e) / e;
|
|
4170
4179
|
}
|
|
4171
4180
|
return a;
|
|
4172
|
-
},
|
|
4181
|
+
}, nr = (a, t) => a - t * Math.floor(a / t), oa = (a, t, e) => ye(a - e, e) < t && t < a, Ot = (a, t, e, s) => t === null ? !1 : s === "continues" ? oa(a, t, e) ? ye(a - e / 2, e / 2) <= t : a <= t : s === "single" ? oa(a, t, e) ? ye(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) => {
|
|
4173
4182
|
for (let l = a; l <= t; l += e)
|
|
4174
4183
|
if (s === l)
|
|
4175
4184
|
return !0;
|
|
4176
4185
|
return !1;
|
|
4177
4186
|
};
|
|
4178
4187
|
var de = /* @__PURE__ */ ((a) => (a.select = "select", a.deselect = "deselect", a.increase = "increase", a.decrease = "decrease", a.min = "min", a.max = "max", a.reset = "reset", a))(de || {});
|
|
4179
|
-
const
|
|
4188
|
+
const sr = (a, t) => {
|
|
4180
4189
|
switch (t.type) {
|
|
4181
4190
|
case "select":
|
|
4182
4191
|
return t.payload === void 0 || t.step === void 0 ? a : t.payload === a ? null : t.payload >= t.min ? t.payload < t.max ? ye(t.payload, t.step) : t.max : t.min;
|
|
@@ -4195,210 +4204,210 @@ const nr = (a, t) => {
|
|
|
4195
4204
|
default:
|
|
4196
4205
|
return a;
|
|
4197
4206
|
}
|
|
4198
|
-
},
|
|
4207
|
+
}, Ja = (a, t, e) => {
|
|
4199
4208
|
const [s, l] = n.useState(a);
|
|
4200
4209
|
return [s, (c) => {
|
|
4201
|
-
const o =
|
|
4210
|
+
const o = sr(t.state || s, { ...c, ...t });
|
|
4202
4211
|
e && e(o, c.event), l(o);
|
|
4203
4212
|
}];
|
|
4204
|
-
},
|
|
4205
|
-
const e =
|
|
4213
|
+
}, rr = he(), Ca = n.forwardRef((a, t) => {
|
|
4214
|
+
const e = Re(rr, a), s = _e(), l = n.useRef(null), i = n.useRef(null), c = Ae(i, e.dir);
|
|
4206
4215
|
n.useImperativeHandle(l, () => ({
|
|
4207
4216
|
element: i.current,
|
|
4208
4217
|
props: e
|
|
4209
4218
|
})), n.useImperativeHandle(t, () => l.current);
|
|
4210
4219
|
const o = n.useCallback(
|
|
4211
|
-
(
|
|
4220
|
+
(p, v) => {
|
|
4212
4221
|
e.onChange && l.current && e.onChange.call(void 0, {
|
|
4213
|
-
value:
|
|
4222
|
+
value: p,
|
|
4214
4223
|
target: l.current,
|
|
4215
|
-
syntheticEvent:
|
|
4224
|
+
syntheticEvent: v
|
|
4216
4225
|
});
|
|
4217
4226
|
},
|
|
4218
4227
|
[e.onChange]
|
|
4219
|
-
),
|
|
4228
|
+
), f = n.useMemo(
|
|
4220
4229
|
() => e.min !== void 0 ? e.min : Ie.min,
|
|
4221
4230
|
[e.min]
|
|
4222
4231
|
), d = n.useMemo(
|
|
4223
4232
|
() => e.max !== void 0 ? e.max : Ie.max,
|
|
4224
4233
|
[e.max]
|
|
4225
|
-
),
|
|
4234
|
+
), m = n.useMemo(
|
|
4226
4235
|
() => e.precision || Ie.precision,
|
|
4227
4236
|
[e.precision]
|
|
4228
|
-
),
|
|
4237
|
+
), u = n.useMemo(
|
|
4229
4238
|
() => e.step !== void 0 ? e.step : Ie.step,
|
|
4230
4239
|
[e.step]
|
|
4231
|
-
),
|
|
4240
|
+
), h = n.useMemo(
|
|
4232
4241
|
() => e.readonly || Ie.readonly,
|
|
4233
4242
|
[e.readonly]
|
|
4234
|
-
),
|
|
4243
|
+
), y = n.useMemo(
|
|
4235
4244
|
() => e.disabled || Ie.disabled,
|
|
4236
4245
|
[e.disabled]
|
|
4237
|
-
),
|
|
4246
|
+
), M = n.useMemo(
|
|
4238
4247
|
() => e.item || Ie.item,
|
|
4239
4248
|
[e.item]
|
|
4240
|
-
), [D,
|
|
4249
|
+
), [D, N] = Ja(
|
|
4241
4250
|
e.defaultValue !== void 0 ? e.defaultValue : Ie.defaultValue,
|
|
4242
4251
|
{
|
|
4243
4252
|
state: e.value,
|
|
4244
|
-
min:
|
|
4253
|
+
min: f,
|
|
4245
4254
|
max: d,
|
|
4246
|
-
step:
|
|
4255
|
+
step: m === "half" ? u / 2 : u
|
|
4247
4256
|
},
|
|
4248
4257
|
o
|
|
4249
|
-
), [
|
|
4258
|
+
), [L, S] = Ja(
|
|
4250
4259
|
null,
|
|
4251
4260
|
{
|
|
4252
4261
|
state: e.value,
|
|
4253
|
-
min:
|
|
4262
|
+
min: f,
|
|
4254
4263
|
max: d,
|
|
4255
|
-
step:
|
|
4256
|
-
precision:
|
|
4264
|
+
step: m === "half" ? u / 2 : u,
|
|
4265
|
+
precision: m
|
|
4257
4266
|
}
|
|
4258
|
-
),
|
|
4267
|
+
), w = n.useMemo(
|
|
4259
4268
|
() => e.value !== void 0 ? e.value : D,
|
|
4260
4269
|
[e.value, D]
|
|
4261
|
-
),
|
|
4262
|
-
() =>
|
|
4263
|
-
[
|
|
4270
|
+
), B = n.useMemo(
|
|
4271
|
+
() => L,
|
|
4272
|
+
[L]
|
|
4264
4273
|
), O = n.useMemo(
|
|
4265
4274
|
() => e.selection || Ie.selection,
|
|
4266
4275
|
[e.selection]
|
|
4267
|
-
),
|
|
4268
|
-
() =>
|
|
4269
|
-
[
|
|
4276
|
+
), I = n.useMemo(
|
|
4277
|
+
() => u / (m === "half" ? 2 : 1),
|
|
4278
|
+
[u, m]
|
|
4270
4279
|
), F = n.useCallback(
|
|
4271
|
-
(
|
|
4272
|
-
if (!(!
|
|
4273
|
-
if (
|
|
4274
|
-
const
|
|
4275
|
-
|
|
4280
|
+
(p) => {
|
|
4281
|
+
if (!(!p.target || !p.target.element || h || y)) {
|
|
4282
|
+
if (m === "half") {
|
|
4283
|
+
const v = p.target.element.getBoundingClientRect(), k = Ya(c || "ltr", v, p.syntheticEvent.clientX) ? ye(p.target.value - u / 2, I) : p.target.value;
|
|
4284
|
+
N({ type: de.select, payload: k, event: p.syntheticEvent });
|
|
4276
4285
|
} else
|
|
4277
|
-
|
|
4286
|
+
N({ type: de.select, payload: p.target.value, event: p.syntheticEvent });
|
|
4278
4287
|
if (e.onClick) {
|
|
4279
|
-
const
|
|
4280
|
-
value:
|
|
4288
|
+
const v = {
|
|
4289
|
+
value: w,
|
|
4281
4290
|
target: l.current,
|
|
4282
|
-
syntheticEvent:
|
|
4291
|
+
syntheticEvent: p.syntheticEvent
|
|
4283
4292
|
};
|
|
4284
|
-
e.onClick.call(void 0,
|
|
4293
|
+
e.onClick.call(void 0, v);
|
|
4285
4294
|
}
|
|
4286
4295
|
}
|
|
4287
4296
|
},
|
|
4288
|
-
[e.onClick,
|
|
4289
|
-
),
|
|
4290
|
-
(
|
|
4291
|
-
if (!(
|
|
4292
|
-
switch (
|
|
4297
|
+
[e.onClick, N, w]
|
|
4298
|
+
), _ = n.useCallback(
|
|
4299
|
+
(p) => {
|
|
4300
|
+
if (!(h || y)) {
|
|
4301
|
+
switch (p.keyCode) {
|
|
4293
4302
|
case z.right:
|
|
4294
|
-
|
|
4303
|
+
p.preventDefault(), N({
|
|
4295
4304
|
type: c === "rtl" ? de.decrease : de.increase,
|
|
4296
|
-
event:
|
|
4305
|
+
event: p
|
|
4297
4306
|
});
|
|
4298
4307
|
break;
|
|
4299
4308
|
case z.left:
|
|
4300
|
-
|
|
4309
|
+
p.preventDefault(), N({
|
|
4301
4310
|
type: c === "rtl" ? de.increase : de.decrease,
|
|
4302
|
-
event:
|
|
4311
|
+
event: p
|
|
4303
4312
|
});
|
|
4304
4313
|
break;
|
|
4305
4314
|
case z.home:
|
|
4306
|
-
|
|
4315
|
+
p.preventDefault(), N({
|
|
4307
4316
|
type: c === "rtl" ? de.min : de.max,
|
|
4308
|
-
event:
|
|
4317
|
+
event: p
|
|
4309
4318
|
});
|
|
4310
4319
|
break;
|
|
4311
4320
|
case z.end:
|
|
4312
|
-
|
|
4321
|
+
p.preventDefault(), N({
|
|
4313
4322
|
type: c === "rtl" ? de.max : de.min,
|
|
4314
|
-
event:
|
|
4323
|
+
event: p
|
|
4315
4324
|
});
|
|
4316
4325
|
break;
|
|
4317
4326
|
case z.esc:
|
|
4318
|
-
|
|
4327
|
+
p.preventDefault(), N({
|
|
4319
4328
|
type: de.deselect,
|
|
4320
|
-
event:
|
|
4329
|
+
event: p
|
|
4321
4330
|
});
|
|
4322
4331
|
break;
|
|
4323
4332
|
}
|
|
4324
4333
|
e.onKeyDown && e.onKeyDown.call(
|
|
4325
4334
|
void 0,
|
|
4326
4335
|
{
|
|
4327
|
-
value:
|
|
4336
|
+
value: w,
|
|
4328
4337
|
target: l.current,
|
|
4329
|
-
syntheticEvent:
|
|
4338
|
+
syntheticEvent: p
|
|
4330
4339
|
}
|
|
4331
4340
|
);
|
|
4332
4341
|
}
|
|
4333
4342
|
},
|
|
4334
|
-
[e.onKeyDown,
|
|
4335
|
-
),
|
|
4336
|
-
(
|
|
4343
|
+
[e.onKeyDown, N, w]
|
|
4344
|
+
), T = n.useCallback(
|
|
4345
|
+
(p) => {
|
|
4337
4346
|
if (e.onFocus) {
|
|
4338
|
-
const
|
|
4347
|
+
const v = {
|
|
4339
4348
|
target: l.current,
|
|
4340
|
-
syntheticEvent:
|
|
4349
|
+
syntheticEvent: p
|
|
4341
4350
|
};
|
|
4342
4351
|
e.onFocus.call(
|
|
4343
4352
|
void 0,
|
|
4344
|
-
|
|
4353
|
+
v
|
|
4345
4354
|
);
|
|
4346
4355
|
}
|
|
4347
4356
|
},
|
|
4348
4357
|
[e.onFocus]
|
|
4349
4358
|
), E = n.useCallback(
|
|
4350
|
-
(
|
|
4359
|
+
(p) => {
|
|
4351
4360
|
if (e.onBlur) {
|
|
4352
|
-
const
|
|
4361
|
+
const v = {
|
|
4353
4362
|
target: l.current,
|
|
4354
|
-
syntheticEvent:
|
|
4363
|
+
syntheticEvent: p
|
|
4355
4364
|
};
|
|
4356
4365
|
e.onBlur.call(
|
|
4357
4366
|
void 0,
|
|
4358
|
-
|
|
4367
|
+
v
|
|
4359
4368
|
);
|
|
4360
4369
|
}
|
|
4361
4370
|
},
|
|
4362
4371
|
[e.onBlur]
|
|
4363
|
-
),
|
|
4364
|
-
(
|
|
4365
|
-
if (!(!
|
|
4366
|
-
if (
|
|
4367
|
-
const
|
|
4368
|
-
S({ type: de.select, payload:
|
|
4372
|
+
), V = n.useCallback(
|
|
4373
|
+
(p) => {
|
|
4374
|
+
if (!(!p.target || !p.target.element))
|
|
4375
|
+
if (m === "half") {
|
|
4376
|
+
const v = p.target.element.getBoundingClientRect(), k = Ya(c || "ltr", v, p.syntheticEvent.clientX) ? p.target.value - u / 2 : p.target.value;
|
|
4377
|
+
S({ type: de.select, payload: k, event: p.syntheticEvent });
|
|
4369
4378
|
} else
|
|
4370
|
-
S({ type: de.select, payload:
|
|
4379
|
+
S({ type: de.select, payload: p.target.value, event: p.syntheticEvent });
|
|
4371
4380
|
},
|
|
4372
|
-
[
|
|
4381
|
+
[m, u, c]
|
|
4373
4382
|
), H = n.useCallback(
|
|
4374
|
-
(
|
|
4375
|
-
S({ type: de.reset, event:
|
|
4383
|
+
(p) => {
|
|
4384
|
+
S({ type: de.reset, event: p.syntheticEvent });
|
|
4376
4385
|
},
|
|
4377
4386
|
[]
|
|
4378
|
-
), q = [], Z =
|
|
4379
|
-
for (let
|
|
4380
|
-
const
|
|
4387
|
+
), q = [], Z = nr(ye(d - f, I), u);
|
|
4388
|
+
for (let p = f; p <= d; p = ye(p + u, I)) {
|
|
4389
|
+
const v = ye(p + Z, I), g = m === "half" ? oa(v, B !== null ? B : w !== null ? w : 0, u) : !1, k = Ot(v, w, u, O), C = Ot(v, B !== null ? B : w, u, O), P = Ot(v, B, u, O);
|
|
4381
4390
|
q.push(
|
|
4382
4391
|
/* @__PURE__ */ n.createElement(
|
|
4383
|
-
|
|
4392
|
+
M,
|
|
4384
4393
|
{
|
|
4385
|
-
key:
|
|
4386
|
-
value:
|
|
4394
|
+
key: v,
|
|
4395
|
+
value: v,
|
|
4387
4396
|
dir: c,
|
|
4388
|
-
title: String(g ? ye(
|
|
4397
|
+
title: String(g ? ye(v - u / 2, I) : v),
|
|
4389
4398
|
icon: e.icon,
|
|
4390
4399
|
svgIcon: e.svgIcon,
|
|
4391
4400
|
half: g,
|
|
4392
|
-
selected:
|
|
4393
|
-
hovered:
|
|
4401
|
+
selected: k || C,
|
|
4402
|
+
hovered: P,
|
|
4394
4403
|
onClick: F,
|
|
4395
|
-
onMouseMove:
|
|
4404
|
+
onMouseMove: V,
|
|
4396
4405
|
onMouseLeave: H
|
|
4397
4406
|
},
|
|
4398
|
-
g && /* @__PURE__ */ n.createElement("span", { className: "k-rating-precision-complement" }, !(e.icon || e.svgIconOutline) && /* @__PURE__ */ n.createElement(fe, { name: "star-outline", icon:
|
|
4399
|
-
g && /* @__PURE__ */ n.createElement("span", { className: "k-rating-precision-part" }, !(e.icon || e.svgIcon) && /* @__PURE__ */ n.createElement(fe, { name: "star", icon:
|
|
4407
|
+
g && /* @__PURE__ */ n.createElement("span", { className: "k-rating-precision-complement" }, !(e.icon || e.svgIconOutline) && /* @__PURE__ */ n.createElement(fe, { name: "star-outline", icon: Ra, style: { clipPath: `${c === "rtl" ? "inset(0 50% 0 0)" : "inset(0 0 0 50%)"}` }, size: "xlarge" }), (e.icon || e.svgIconOutline) && /* @__PURE__ */ n.createElement(fe, { name: Lt(`${e.icon}-outline`), icon: e.svgIconOutline, size: "xlarge" })),
|
|
4408
|
+
g && /* @__PURE__ */ n.createElement("span", { className: "k-rating-precision-part" }, !(e.icon || e.svgIcon) && /* @__PURE__ */ n.createElement(fe, { name: "star", icon: Va, style: { clipPath: `${c === "rtl" ? "inset(0 0 0 50%)" : "inset(0 50% 0 0)"}` }, size: "xlarge" }), (e.icon || e.svgIcon) && /* @__PURE__ */ n.createElement(fe, { name: e.icon ? Lt(e.icon) : void 0, icon: e.svgIcon, size: "xlarge" })),
|
|
4400
4409
|
g && /* @__PURE__ */ n.createElement("span", { style: { width: "24px", height: "24px", display: "block" } }),
|
|
4401
|
-
!g && !(e.icon || e.svgIcon) && (
|
|
4410
|
+
!g && !(e.icon || e.svgIcon) && (P || C && !P) && /* @__PURE__ */ n.createElement(fe, { name: "star", icon: Va, size: "xlarge" }) || !(e.icon || e.svgIcon) && !P && !C && /* @__PURE__ */ n.createElement(fe, { name: "star-outline", icon: Ra, size: "xlarge" }) || (e.icon || e.svgIcon) && (P || C && !P) && /* @__PURE__ */ n.createElement(fe, { name: e.icon, icon: e.svgIcon, size: "xlarge" }) || (e.icon || e.svgIcon) && !P && /* @__PURE__ */ n.createElement(fe, { name: Lt(`${e.icon}-outline`), icon: e.svgIconOutline, size: "xlarge" })
|
|
4402
4411
|
)
|
|
4403
4412
|
);
|
|
4404
4413
|
}
|
|
@@ -4415,19 +4424,19 @@ const nr = (a, t) => {
|
|
|
4415
4424
|
"k-rating",
|
|
4416
4425
|
{
|
|
4417
4426
|
"k-rtl": c === "rtl",
|
|
4418
|
-
"k-readonly":
|
|
4419
|
-
"k-disabled":
|
|
4427
|
+
"k-readonly": h,
|
|
4428
|
+
"k-disabled": y
|
|
4420
4429
|
},
|
|
4421
4430
|
e.className
|
|
4422
4431
|
),
|
|
4423
|
-
onKeyDown:
|
|
4424
|
-
onFocus:
|
|
4432
|
+
onKeyDown: _,
|
|
4433
|
+
onFocus: T,
|
|
4425
4434
|
onBlur: E,
|
|
4426
|
-
"aria-valuemin":
|
|
4435
|
+
"aria-valuemin": f,
|
|
4427
4436
|
"aria-valuemax": d,
|
|
4428
|
-
"aria-valuenow":
|
|
4429
|
-
"aria-disabled":
|
|
4430
|
-
"aria-label": s.toLanguageString(
|
|
4437
|
+
"aria-valuenow": w !== null ? w : void 0,
|
|
4438
|
+
"aria-disabled": y ? "true" : void 0,
|
|
4439
|
+
"aria-label": s.toLanguageString(ea, $[ea]),
|
|
4431
4440
|
"aria-labelledby": e.ariaLabelledBy,
|
|
4432
4441
|
"aria-describedby": e.ariaDescribedBy
|
|
4433
4442
|
},
|
|
@@ -4436,8 +4445,8 @@ const nr = (a, t) => {
|
|
|
4436
4445
|
{
|
|
4437
4446
|
id: "rating",
|
|
4438
4447
|
className: "k-hidden",
|
|
4439
|
-
readOnly:
|
|
4440
|
-
disabled:
|
|
4448
|
+
readOnly: h,
|
|
4449
|
+
disabled: y
|
|
4441
4450
|
}
|
|
4442
4451
|
),
|
|
4443
4452
|
/* @__PURE__ */ n.createElement(
|
|
@@ -4455,12 +4464,12 @@ const nr = (a, t) => {
|
|
|
4455
4464
|
e.label
|
|
4456
4465
|
)
|
|
4457
4466
|
);
|
|
4458
|
-
}),
|
|
4467
|
+
}), ir = {
|
|
4459
4468
|
id: r.string,
|
|
4460
4469
|
dir: r.oneOf(["ltr", "rtl"]),
|
|
4461
4470
|
selection: r.oneOf(["continues", "single"]),
|
|
4462
4471
|
precision: r.oneOf(["item", "half"]),
|
|
4463
|
-
value: (a, t, e) => a.value && a.min && a.max && a.step && !(a.precision === "half" ?
|
|
4472
|
+
value: (a, t, e) => a.value && a.min && a.max && a.step && !(a.precision === "half" ? Za(a.min, a.max, a.step / 2, a.value) : Za(a.min, a.max, a.step, a.value)) && a.precision === "half" ? new Error(
|
|
4464
4473
|
`Invalid prop + ${t} supplied to ${e}.
|
|
4465
4474
|
The value of the { value } property is not correct, please check your values.
|
|
4466
4475
|
`
|
|
@@ -4479,59 +4488,59 @@ const nr = (a, t) => {
|
|
|
4479
4488
|
disabled: r.bool,
|
|
4480
4489
|
half: r.bool,
|
|
4481
4490
|
icon: r.string,
|
|
4482
|
-
svgIcon:
|
|
4483
|
-
svgIconOutline:
|
|
4491
|
+
svgIcon: Ft,
|
|
4492
|
+
svgIconOutline: Ft,
|
|
4484
4493
|
ariaDescribedBy: r.string
|
|
4485
4494
|
}, Ie = {
|
|
4486
4495
|
dir: "ltr",
|
|
4487
4496
|
min: 1,
|
|
4488
4497
|
max: 5,
|
|
4489
4498
|
step: 1,
|
|
4490
|
-
item:
|
|
4499
|
+
item: Et,
|
|
4491
4500
|
defaultValue: null,
|
|
4492
4501
|
readonly: !1,
|
|
4493
4502
|
disabled: !1,
|
|
4494
4503
|
selection: "continues",
|
|
4495
4504
|
precision: "item"
|
|
4496
4505
|
};
|
|
4497
|
-
|
|
4498
|
-
|
|
4499
|
-
|
|
4500
|
-
function
|
|
4506
|
+
Ca.displayName = "KendoReactRating";
|
|
4507
|
+
Ca.propTypes = ir;
|
|
4508
|
+
Ca.defaultProps = Ie;
|
|
4509
|
+
function lr(a, t) {
|
|
4501
4510
|
let e = a;
|
|
4502
4511
|
for (; e && e !== t; )
|
|
4503
4512
|
e = e.parentNode;
|
|
4504
4513
|
return !!e;
|
|
4505
4514
|
}
|
|
4506
|
-
const
|
|
4515
|
+
const or = 250, cr = 84, Ln = 3, Rn = 2, dr = "#000000", ur = "#ffffff", Qa = (a) => a !== void 0, fr = he(), St = n.forwardRef((a, t) => {
|
|
4507
4516
|
pe(me);
|
|
4508
|
-
const e =
|
|
4509
|
-
|
|
4517
|
+
const e = Re(fr, a), s = _e(), l = n.useRef(null), i = n.useRef(null), c = n.useRef(null), o = n.useRef(null), f = n.useRef(null), [d, m] = n.useState(), [u, h] = n.useState(!1), [y, M] = n.useState(!1), [D, N] = n.useState(), [L, S] = n.useState(), B = Qa(e.value) ? e.value : D, [O, I] = n.useState(!1), F = Qa(e.open), _ = F ? e.open : O, T = !(e.maximized || y || !e.maximizable || e.disabled), E = e.maximized && !y, H = !(!(e.value || D) || y || e.readOnly || e.disabled), q = s.toLanguageString(aa, $[aa]), Z = s.toLanguageString(na, $[na]), p = s.toLanguageString(ta, $[ta]), v = e.popupScale || Ln, g = e.exportScale || Rn, k = (x) => {
|
|
4518
|
+
N(x), e.onChange && e.onChange({ value: x });
|
|
4510
4519
|
}, C = (x) => {
|
|
4511
|
-
d == null || d.loadImage(x.value),
|
|
4520
|
+
d == null || d.loadImage(x.value), k(x.value);
|
|
4512
4521
|
};
|
|
4513
4522
|
n.useEffect(() => {
|
|
4514
|
-
e.value !== D && (
|
|
4523
|
+
e.value !== D && (N(e.value), d == null || d.loadImage(e.value));
|
|
4515
4524
|
}, [e.value]);
|
|
4516
|
-
const
|
|
4517
|
-
d == null || d.clear(),
|
|
4525
|
+
const P = () => {
|
|
4526
|
+
d == null || d.clear(), k();
|
|
4518
4527
|
}, j = n.useCallback(
|
|
4519
4528
|
(x) => {
|
|
4520
|
-
F ||
|
|
4529
|
+
F || I(x);
|
|
4521
4530
|
},
|
|
4522
4531
|
[F]
|
|
4523
4532
|
), J = (x) => {
|
|
4524
4533
|
var U, re;
|
|
4525
|
-
|
|
4526
|
-
},
|
|
4527
|
-
let x =
|
|
4534
|
+
De(x), (re = ((U = f.current) == null ? void 0 : U.element) || i.current) == null || re.focus();
|
|
4535
|
+
}, R = n.useCallback(() => {
|
|
4536
|
+
let x = dr;
|
|
4528
4537
|
return !e.color && typeof document < "u" && l.current && (x = getComputedStyle(l.current).color), e.color || x;
|
|
4529
4538
|
}, [e.color]), b = n.useCallback(() => {
|
|
4530
|
-
let x =
|
|
4539
|
+
let x = ur;
|
|
4531
4540
|
return !e.backgroundColor && typeof document < "u" && l.current && (x = getComputedStyle(l.current).backgroundColor), e.backgroundColor || x;
|
|
4532
4541
|
}, [e.backgroundColor]), W = () => ({
|
|
4533
4542
|
scale: e.maximized ? e.popupScale : 1,
|
|
4534
|
-
color:
|
|
4543
|
+
color: R(),
|
|
4535
4544
|
backgroundColor: b(),
|
|
4536
4545
|
strokeWidth: e.strokeWidth,
|
|
4537
4546
|
smooth: e.smooth,
|
|
@@ -4544,13 +4553,13 @@ const lr = 250, or = 84, In = 3, Ln = 2, cr = "#000000", dr = "#ffffff", Ja = (a
|
|
|
4544
4553
|
}));
|
|
4545
4554
|
};
|
|
4546
4555
|
n.useEffect(() => {
|
|
4547
|
-
const x = i.current, U = new
|
|
4548
|
-
return
|
|
4556
|
+
const x = i.current, U = new $n(x, W());
|
|
4557
|
+
return B && U.loadImage(B), m(U), () => U.destroy();
|
|
4549
4558
|
}, []), n.useEffect(() => {
|
|
4550
4559
|
d == null || d.setOptions({
|
|
4551
|
-
onChange: async () =>
|
|
4552
|
-
onDraw: () =>
|
|
4553
|
-
onDrawEnd: () =>
|
|
4560
|
+
onChange: async () => k(await K(tt())),
|
|
4561
|
+
onDraw: () => M(!0),
|
|
4562
|
+
onDrawEnd: () => M(!1)
|
|
4554
4563
|
});
|
|
4555
4564
|
}, [d]), n.useLayoutEffect(
|
|
4556
4565
|
() => d == null ? void 0 : d.setOptions(W()),
|
|
@@ -4562,14 +4571,14 @@ const lr = 250, or = 84, In = 3, Ln = 2, cr = "#000000", dr = "#ffffff", Ja = (a
|
|
|
4562
4571
|
return;
|
|
4563
4572
|
const U = () => j(!1);
|
|
4564
4573
|
return x.addEventListener("click", U), () => x.removeEventListener("click", U);
|
|
4565
|
-
}, [
|
|
4566
|
-
if (!
|
|
4574
|
+
}, [_]), n.useEffect(() => {
|
|
4575
|
+
if (!_ || typeof document > "u")
|
|
4567
4576
|
return;
|
|
4568
4577
|
const x = (U) => {
|
|
4569
4578
|
U.keyCode === z.esc && j(!1);
|
|
4570
4579
|
};
|
|
4571
4580
|
return document.addEventListener("keydown", x), () => document.removeEventListener("keydown", x);
|
|
4572
|
-
}, [
|
|
4581
|
+
}, [_]), n.useEffect(() => {
|
|
4573
4582
|
var x, U;
|
|
4574
4583
|
e.maximized && ((U = (x = o.current) == null ? void 0 : x.element) == null || U.focus());
|
|
4575
4584
|
}, []);
|
|
@@ -4601,7 +4610,7 @@ const lr = 250, or = 84, In = 3, Ln = 2, cr = "#000000", dr = "#ffffff", Ja = (a
|
|
|
4601
4610
|
), be = n.useCallback(
|
|
4602
4611
|
() => e.validityStyles,
|
|
4603
4612
|
[e.validityStyles]
|
|
4604
|
-
),
|
|
4613
|
+
), He = n.useCallback(
|
|
4605
4614
|
() => e,
|
|
4606
4615
|
[e]
|
|
4607
4616
|
), A = n.useCallback(
|
|
@@ -4610,42 +4619,42 @@ const lr = 250, or = 84, In = 3, Ln = 2, cr = "#000000", dr = "#ffffff", Ja = (a
|
|
|
4610
4619
|
element: l.current,
|
|
4611
4620
|
focus: ee
|
|
4612
4621
|
};
|
|
4613
|
-
return Object.defineProperty(x, "name", { get: Ee }), Object.defineProperty(x, "value", { get: le }), Object.defineProperty(x, "validity", { get: ce }), Object.defineProperty(x, "validityStyles", { get: be }), Object.defineProperty(x, "required", { get: oe }), Object.defineProperty(x, "props", { get:
|
|
4622
|
+
return Object.defineProperty(x, "name", { get: Ee }), Object.defineProperty(x, "value", { get: le }), Object.defineProperty(x, "validity", { get: ce }), Object.defineProperty(x, "validityStyles", { get: be }), Object.defineProperty(x, "required", { get: oe }), Object.defineProperty(x, "props", { get: He }), Object.defineProperty(x, "color", { get: R }), Object.defineProperty(x, "backgroundColor", { get: b }), x;
|
|
4614
4623
|
},
|
|
4615
|
-
[Ee, le, ce, be, oe, ee,
|
|
4624
|
+
[Ee, le, ce, be, oe, ee, He, R, b]
|
|
4616
4625
|
);
|
|
4617
4626
|
n.useImperativeHandle(t, A);
|
|
4618
4627
|
const xe = n.useCallback(
|
|
4619
4628
|
(x) => {
|
|
4620
|
-
|
|
4629
|
+
u || e.maximized || (h(!0), Q(
|
|
4621
4630
|
e.onFocus,
|
|
4622
4631
|
x,
|
|
4623
4632
|
A(),
|
|
4624
4633
|
{}
|
|
4625
4634
|
));
|
|
4626
4635
|
},
|
|
4627
|
-
[
|
|
4636
|
+
[u, e.onFocus, A]
|
|
4628
4637
|
), ve = n.useCallback(
|
|
4629
4638
|
(x) => {
|
|
4630
|
-
|
|
4639
|
+
lr(x.relatedTarget, l.current) || (h(!1), Q(
|
|
4631
4640
|
e.onBlur,
|
|
4632
4641
|
x,
|
|
4633
4642
|
A(),
|
|
4634
4643
|
{}
|
|
4635
4644
|
));
|
|
4636
4645
|
},
|
|
4637
|
-
[
|
|
4638
|
-
),
|
|
4646
|
+
[u, e.onBlur, A]
|
|
4647
|
+
), je = n.useCallback(
|
|
4639
4648
|
async (x) => {
|
|
4640
|
-
S(await K(
|
|
4649
|
+
S(await K(at())), j(!0), Q(
|
|
4641
4650
|
e.onOpen,
|
|
4642
4651
|
x,
|
|
4643
4652
|
A(),
|
|
4644
4653
|
{}
|
|
4645
4654
|
);
|
|
4646
4655
|
},
|
|
4647
|
-
[
|
|
4648
|
-
),
|
|
4656
|
+
[_, F, e.onOpen, e.value, D, A]
|
|
4657
|
+
), De = n.useCallback(
|
|
4649
4658
|
(x) => {
|
|
4650
4659
|
j(!1), Q(
|
|
4651
4660
|
e.onClose,
|
|
@@ -4654,23 +4663,23 @@ const lr = 250, or = 84, In = 3, Ln = 2, cr = "#000000", dr = "#ffffff", Ja = (a
|
|
|
4654
4663
|
{}
|
|
4655
4664
|
);
|
|
4656
4665
|
},
|
|
4657
|
-
[
|
|
4658
|
-
),
|
|
4659
|
-
|
|
4660
|
-
},
|
|
4666
|
+
[_, F, e.onClose, A]
|
|
4667
|
+
), wt = () => {
|
|
4668
|
+
P(), ee();
|
|
4669
|
+
}, tt = () => {
|
|
4661
4670
|
var re, Se;
|
|
4662
|
-
const x = e.width || ((re = l.current) == null ? void 0 : re.offsetWidth) ||
|
|
4671
|
+
const x = e.width || ((re = l.current) == null ? void 0 : re.offsetWidth) || or, U = e.height || ((Se = l.current) == null ? void 0 : Se.offsetHeight) || cr;
|
|
4663
4672
|
return {
|
|
4664
4673
|
width: x,
|
|
4665
4674
|
height: U
|
|
4666
4675
|
};
|
|
4667
|
-
},
|
|
4668
|
-
const { width: x, height: U } =
|
|
4676
|
+
}, at = () => {
|
|
4677
|
+
const { width: x, height: U } = tt();
|
|
4669
4678
|
return {
|
|
4670
|
-
width: x *
|
|
4671
|
-
height: U *
|
|
4679
|
+
width: x * v,
|
|
4680
|
+
height: U * v
|
|
4672
4681
|
};
|
|
4673
|
-
},
|
|
4682
|
+
}, It = !be() || ce().valid;
|
|
4674
4683
|
return /* @__PURE__ */ n.createElement(
|
|
4675
4684
|
"div",
|
|
4676
4685
|
{
|
|
@@ -4685,10 +4694,10 @@ const lr = 250, or = 84, In = 3, Ln = 2, cr = "#000000", dr = "#ffffff", Ja = (a
|
|
|
4685
4694
|
[`k-signature-${ne.sizeMap[e.size] || e.size}`]: e.size,
|
|
4686
4695
|
[`k-input-${e.fillMode}`]: e.fillMode,
|
|
4687
4696
|
[`k-rounded-${ne.roundedMap[e.rounded] || e.rounded}`]: e.rounded,
|
|
4688
|
-
"k-invalid": !
|
|
4697
|
+
"k-invalid": !It,
|
|
4689
4698
|
"k-required": e.required,
|
|
4690
4699
|
"k-disabled": e.disabled,
|
|
4691
|
-
"k-focus":
|
|
4700
|
+
"k-focus": u
|
|
4692
4701
|
},
|
|
4693
4702
|
e.className
|
|
4694
4703
|
),
|
|
@@ -4709,16 +4718,16 @@ const lr = 250, or = 84, In = 3, Ln = 2, cr = "#000000", dr = "#ffffff", Ja = (a
|
|
|
4709
4718
|
"aria-disabled": e.disabled ? "true" : void 0
|
|
4710
4719
|
}
|
|
4711
4720
|
),
|
|
4712
|
-
/* @__PURE__ */ n.createElement("div", { className: "k-signature-actions k-signature-actions-top" },
|
|
4721
|
+
/* @__PURE__ */ n.createElement("div", { className: "k-signature-actions k-signature-actions-top" }, T && /* @__PURE__ */ n.createElement(
|
|
4713
4722
|
ge,
|
|
4714
4723
|
{
|
|
4715
4724
|
className: "k-signature-action k-signature-maximize",
|
|
4716
|
-
ref:
|
|
4725
|
+
ref: f,
|
|
4717
4726
|
icon: "hyperlink-open",
|
|
4718
|
-
svgIcon:
|
|
4727
|
+
svgIcon: Ma,
|
|
4719
4728
|
fillMode: "flat",
|
|
4720
4729
|
size: e.size,
|
|
4721
|
-
onClick:
|
|
4730
|
+
onClick: je,
|
|
4722
4731
|
"aria-label": q,
|
|
4723
4732
|
title: q
|
|
4724
4733
|
}
|
|
@@ -4728,10 +4737,10 @@ const lr = 250, or = 84, In = 3, Ln = 2, cr = "#000000", dr = "#ffffff", Ja = (a
|
|
|
4728
4737
|
className: "k-signature-action k-signature-minimize k-rotate-180",
|
|
4729
4738
|
ref: o,
|
|
4730
4739
|
icon: "hyperlink-open",
|
|
4731
|
-
svgIcon:
|
|
4740
|
+
svgIcon: Ma,
|
|
4732
4741
|
fillMode: "flat",
|
|
4733
4742
|
size: e.size,
|
|
4734
|
-
onClick:
|
|
4743
|
+
onClick: De,
|
|
4735
4744
|
"aria-label": Z,
|
|
4736
4745
|
title: Z
|
|
4737
4746
|
}
|
|
@@ -4748,22 +4757,22 @@ const lr = 250, or = 84, In = 3, Ln = 2, cr = "#000000", dr = "#ffffff", Ja = (a
|
|
|
4748
4757
|
{
|
|
4749
4758
|
className: "k-signature-action k-signature-clear",
|
|
4750
4759
|
icon: "x",
|
|
4751
|
-
svgIcon:
|
|
4760
|
+
svgIcon: zt,
|
|
4752
4761
|
fillMode: "flat",
|
|
4753
4762
|
size: e.size,
|
|
4754
|
-
onClick:
|
|
4755
|
-
"aria-label":
|
|
4756
|
-
title:
|
|
4763
|
+
onClick: wt,
|
|
4764
|
+
"aria-label": p,
|
|
4765
|
+
title: p
|
|
4757
4766
|
}
|
|
4758
4767
|
)),
|
|
4759
|
-
|
|
4760
|
-
|
|
4768
|
+
_ && /* @__PURE__ */ n.createElement(Hn, { ref: c }, /* @__PURE__ */ n.createElement(
|
|
4769
|
+
St,
|
|
4761
4770
|
{
|
|
4762
4771
|
...e,
|
|
4763
|
-
...
|
|
4764
|
-
value:
|
|
4772
|
+
...at(),
|
|
4773
|
+
value: L,
|
|
4765
4774
|
maximized: !0,
|
|
4766
|
-
exportScale: 1 /
|
|
4775
|
+
exportScale: 1 / v * g,
|
|
4767
4776
|
open: !1,
|
|
4768
4777
|
onChange: C,
|
|
4769
4778
|
onClose: J
|
|
@@ -4771,7 +4780,7 @@ const lr = 250, or = 84, In = 3, Ln = 2, cr = "#000000", dr = "#ffffff", Ja = (a
|
|
|
4771
4780
|
))
|
|
4772
4781
|
);
|
|
4773
4782
|
});
|
|
4774
|
-
|
|
4783
|
+
St.propTypes = {
|
|
4775
4784
|
value: r.string,
|
|
4776
4785
|
width: r.number,
|
|
4777
4786
|
height: r.number,
|
|
@@ -4793,26 +4802,26 @@ Et.propTypes = {
|
|
|
4793
4802
|
rounded: r.oneOf([null, "small", "medium", "large"]),
|
|
4794
4803
|
fillMode: r.oneOf([null, "solid", "flat", "outline"])
|
|
4795
4804
|
};
|
|
4796
|
-
|
|
4797
|
-
|
|
4805
|
+
St.displayName = "KendoSignature";
|
|
4806
|
+
St.defaultProps = {
|
|
4798
4807
|
strokeWidth: 1,
|
|
4799
4808
|
smooth: !1,
|
|
4800
|
-
popupScale:
|
|
4801
|
-
exportScale:
|
|
4809
|
+
popupScale: Ln,
|
|
4810
|
+
exportScale: Rn,
|
|
4802
4811
|
maximizable: !0,
|
|
4803
4812
|
disabled: !1,
|
|
4804
4813
|
required: !1,
|
|
4805
4814
|
validityStyles: !0,
|
|
4806
|
-
onChange: (a) =>
|
|
4807
|
-
onFocus: (a) =>
|
|
4808
|
-
onBlur: (a) =>
|
|
4809
|
-
onOpen: (a) =>
|
|
4810
|
-
onClose: (a) =>
|
|
4815
|
+
onChange: (a) => Me,
|
|
4816
|
+
onFocus: (a) => Me,
|
|
4817
|
+
onBlur: (a) => Me,
|
|
4818
|
+
onOpen: (a) => Me,
|
|
4819
|
+
onClose: (a) => Me,
|
|
4811
4820
|
size: "medium",
|
|
4812
4821
|
rounded: "medium",
|
|
4813
4822
|
fillMode: "solid"
|
|
4814
4823
|
};
|
|
4815
|
-
const
|
|
4824
|
+
const xa = n.forwardRef((a, t) => {
|
|
4816
4825
|
pe(me);
|
|
4817
4826
|
const e = n.useRef(null), s = n.useRef(null), l = n.useRef(), i = n.useCallback(
|
|
4818
4827
|
() => {
|
|
@@ -4841,23 +4850,23 @@ const Ca = n.forwardRef((a, t) => {
|
|
|
4841
4850
|
const {
|
|
4842
4851
|
size: c,
|
|
4843
4852
|
fillMode: o,
|
|
4844
|
-
rounded:
|
|
4853
|
+
rounded: f,
|
|
4845
4854
|
className: d,
|
|
4846
|
-
dir:
|
|
4847
|
-
style:
|
|
4848
|
-
prefix:
|
|
4849
|
-
suffix:
|
|
4850
|
-
valid:
|
|
4855
|
+
dir: m,
|
|
4856
|
+
style: u,
|
|
4857
|
+
prefix: h = ca.prefix,
|
|
4858
|
+
suffix: y = ca.suffix,
|
|
4859
|
+
valid: M,
|
|
4851
4860
|
// Destruct to avoid warning when used inside a form field
|
|
4852
4861
|
modified: D,
|
|
4853
|
-
touched:
|
|
4854
|
-
visited:
|
|
4862
|
+
touched: N,
|
|
4863
|
+
visited: L,
|
|
4855
4864
|
...S
|
|
4856
|
-
} = a, [
|
|
4857
|
-
|
|
4858
|
-
},
|
|
4859
|
-
|
|
4860
|
-
},
|
|
4865
|
+
} = a, [w] = qe(h), [B] = qe(y), [O, I] = n.useState(!1), F = (H) => {
|
|
4866
|
+
I(!0);
|
|
4867
|
+
}, _ = (H) => {
|
|
4868
|
+
I(!1);
|
|
4869
|
+
}, T = n.useCallback(
|
|
4861
4870
|
(H) => {
|
|
4862
4871
|
l.current = H.target.value, a.onChange && a.onChange.call(void 0, {
|
|
4863
4872
|
syntheticEvent: H,
|
|
@@ -4867,23 +4876,23 @@ const Ca = n.forwardRef((a, t) => {
|
|
|
4867
4876
|
}), l.current = void 0;
|
|
4868
4877
|
},
|
|
4869
4878
|
[a.onChange]
|
|
4870
|
-
), { onFocus: E, onBlur:
|
|
4879
|
+
), { onFocus: E, onBlur: V } = Bn({
|
|
4871
4880
|
onFocus: F,
|
|
4872
|
-
onBlur:
|
|
4881
|
+
onBlur: _,
|
|
4873
4882
|
onSyncFocus: a.onFocus,
|
|
4874
4883
|
onSyncBlur: a.onBlur
|
|
4875
4884
|
});
|
|
4876
4885
|
return /* @__PURE__ */ n.createElement(
|
|
4877
4886
|
"span",
|
|
4878
4887
|
{
|
|
4879
|
-
style:
|
|
4880
|
-
dir:
|
|
4888
|
+
style: u,
|
|
4889
|
+
dir: m,
|
|
4881
4890
|
className: G(
|
|
4882
4891
|
"k-textbox k-input",
|
|
4883
4892
|
{
|
|
4884
4893
|
[`k-input-${ne.sizeMap[c] || c}`]: c,
|
|
4885
4894
|
[`k-input-${o}`]: o,
|
|
4886
|
-
[`k-rounded-${ne.roundedMap[
|
|
4895
|
+
[`k-rounded-${ne.roundedMap[f] || f}`]: f
|
|
4887
4896
|
},
|
|
4888
4897
|
{
|
|
4889
4898
|
"k-focus": O,
|
|
@@ -4894,35 +4903,35 @@ const Ca = n.forwardRef((a, t) => {
|
|
|
4894
4903
|
d
|
|
4895
4904
|
),
|
|
4896
4905
|
onFocus: E,
|
|
4897
|
-
onBlur:
|
|
4906
|
+
onBlur: V
|
|
4898
4907
|
},
|
|
4899
|
-
/* @__PURE__ */ n.createElement(
|
|
4908
|
+
/* @__PURE__ */ n.createElement(w, null),
|
|
4900
4909
|
/* @__PURE__ */ n.createElement(
|
|
4901
4910
|
"input",
|
|
4902
4911
|
{
|
|
4903
4912
|
ref: e,
|
|
4904
4913
|
className: "k-input-inner",
|
|
4905
4914
|
...S,
|
|
4906
|
-
onChange:
|
|
4915
|
+
onChange: T
|
|
4907
4916
|
}
|
|
4908
4917
|
),
|
|
4909
|
-
/* @__PURE__ */ n.createElement(
|
|
4918
|
+
/* @__PURE__ */ n.createElement(B, null)
|
|
4910
4919
|
);
|
|
4911
|
-
}),
|
|
4920
|
+
}), ca = {
|
|
4912
4921
|
prefix: (a) => null,
|
|
4913
4922
|
suffix: (a) => null,
|
|
4914
4923
|
size: "medium",
|
|
4915
4924
|
rounded: "medium",
|
|
4916
4925
|
fillMode: "solid"
|
|
4917
4926
|
};
|
|
4918
|
-
|
|
4927
|
+
xa.propTypes = {
|
|
4919
4928
|
size: r.oneOf([null, "small", "medium", "large"]),
|
|
4920
4929
|
rounded: r.oneOf([null, "small", "medium", "large", "full"]),
|
|
4921
4930
|
fillMode: r.oneOf([null, "solid", "flat", "outline"])
|
|
4922
4931
|
};
|
|
4923
|
-
|
|
4924
|
-
|
|
4925
|
-
const
|
|
4932
|
+
xa.displayName = "KendoReactTextBoxComponent";
|
|
4933
|
+
xa.defaultProps = ca;
|
|
4934
|
+
const hr = n.forwardRef((a, t) => {
|
|
4926
4935
|
const e = n.useRef(null), s = n.useRef(null);
|
|
4927
4936
|
return n.useImperativeHandle(
|
|
4928
4937
|
e,
|
|
@@ -4932,8 +4941,8 @@ const fr = n.forwardRef((a, t) => {
|
|
|
4932
4941
|
() => e.current
|
|
4933
4942
|
), /* @__PURE__ */ n.createElement("span", { ...a, className: G("k-clear-value", a.className) });
|
|
4934
4943
|
});
|
|
4935
|
-
|
|
4936
|
-
const
|
|
4944
|
+
hr.displayName = "KendoReactInputClearValue";
|
|
4945
|
+
const pr = n.forwardRef((a, t) => {
|
|
4937
4946
|
const e = n.useRef(null), s = n.useRef(null);
|
|
4938
4947
|
return n.useImperativeHandle(
|
|
4939
4948
|
e,
|
|
@@ -4943,8 +4952,8 @@ const hr = n.forwardRef((a, t) => {
|
|
|
4943
4952
|
() => e.current
|
|
4944
4953
|
), /* @__PURE__ */ n.createElement("span", { ...a, className: G("k-input-prefix", a.className) });
|
|
4945
4954
|
});
|
|
4946
|
-
|
|
4947
|
-
const
|
|
4955
|
+
pr.displayName = "KendoReactInputPrefix";
|
|
4956
|
+
const mr = n.forwardRef((a, t) => {
|
|
4948
4957
|
const e = n.useRef(null), s = n.useRef(null);
|
|
4949
4958
|
return n.useImperativeHandle(
|
|
4950
4959
|
e,
|
|
@@ -4954,8 +4963,8 @@ const pr = n.forwardRef((a, t) => {
|
|
|
4954
4963
|
() => e.current
|
|
4955
4964
|
), /* @__PURE__ */ n.createElement("span", { ...a, className: G("k-input-separator", a.className) });
|
|
4956
4965
|
});
|
|
4957
|
-
|
|
4958
|
-
const
|
|
4966
|
+
mr.displayName = "KendoReactInputSeparator";
|
|
4967
|
+
const gr = n.forwardRef((a, t) => {
|
|
4959
4968
|
const e = n.useRef(null), s = n.useRef(null);
|
|
4960
4969
|
return n.useImperativeHandle(
|
|
4961
4970
|
e,
|
|
@@ -4965,66 +4974,66 @@ const mr = n.forwardRef((a, t) => {
|
|
|
4965
4974
|
() => e.current
|
|
4966
4975
|
), /* @__PURE__ */ n.createElement("span", { ...a, className: G("k-input-suffix", a.className) });
|
|
4967
4976
|
});
|
|
4968
|
-
|
|
4969
|
-
const
|
|
4970
|
-
|
|
4977
|
+
gr.displayName = "KendoReactInputSuffix";
|
|
4978
|
+
const br = n.forwardRef((a, t) => /* @__PURE__ */ n.createElement(fe, { ref: t, ...a, className: G("k-input-validation-icon", a.className) }));
|
|
4979
|
+
br.displayName = "KendoReactInputValidationIcon";
|
|
4971
4980
|
export {
|
|
4972
|
-
|
|
4973
|
-
|
|
4974
|
-
|
|
4975
|
-
|
|
4976
|
-
|
|
4977
|
-
|
|
4978
|
-
|
|
4979
|
-
|
|
4980
|
-
|
|
4981
|
-
|
|
4982
|
-
|
|
4983
|
-
|
|
4984
|
-
|
|
4985
|
-
|
|
4986
|
-
|
|
4987
|
-
|
|
4988
|
-
|
|
4989
|
-
|
|
4990
|
-
|
|
4991
|
-
|
|
4992
|
-
|
|
4993
|
-
|
|
4994
|
-
|
|
4995
|
-
|
|
4996
|
-
|
|
4981
|
+
va as Checkbox,
|
|
4982
|
+
Ws as CheckboxPropsContext,
|
|
4983
|
+
pa as ColorGradient,
|
|
4984
|
+
ys as ColorGradientPropsContext,
|
|
4985
|
+
vt as ColorGradientWithoutContext,
|
|
4986
|
+
ha as ColorInput,
|
|
4987
|
+
ma as ColorPalette,
|
|
4988
|
+
Es as ColorPalettePropsContext,
|
|
4989
|
+
kt as ColorPaletteWithoutContext,
|
|
4990
|
+
ga as ColorPicker,
|
|
4991
|
+
Rs as ColorPickerPropsContext,
|
|
4992
|
+
Sn as FlatColorPicker,
|
|
4993
|
+
vn as Input,
|
|
4994
|
+
hr as InputClearValue,
|
|
4995
|
+
pr as InputPrefix,
|
|
4996
|
+
rs as InputPropsContext,
|
|
4997
|
+
mr as InputSeparator,
|
|
4998
|
+
gr as InputSuffix,
|
|
4999
|
+
br as InputValidationIcon,
|
|
5000
|
+
gt as InputWithoutContext,
|
|
5001
|
+
$s as MaskedTextBox,
|
|
5002
|
+
yt as MaskedTextBoxWithoutContext,
|
|
5003
|
+
ze as NumericTextBox,
|
|
5004
|
+
as as NumericTextBoxPropsContext,
|
|
5005
|
+
xs as PALETTEPRESETS,
|
|
4997
5006
|
X as RANGE_ACTION,
|
|
4998
5007
|
de as RATING_ACTION,
|
|
4999
|
-
|
|
5000
|
-
|
|
5001
|
-
|
|
5002
|
-
|
|
5003
|
-
|
|
5004
|
-
|
|
5005
|
-
|
|
5006
|
-
|
|
5007
|
-
|
|
5008
|
-
|
|
5009
|
-
|
|
5010
|
-
|
|
5011
|
-
|
|
5012
|
-
|
|
5013
|
-
|
|
5014
|
-
|
|
5015
|
-
|
|
5016
|
-
|
|
5017
|
-
|
|
5018
|
-
|
|
5008
|
+
xt as RadioButton,
|
|
5009
|
+
Ys as RadioButtonPropsContext,
|
|
5010
|
+
ka as RadioGroup,
|
|
5011
|
+
Js as RadioGroupPropsContext,
|
|
5012
|
+
ba as RangeSlider,
|
|
5013
|
+
Ks as RangeSliderPropsContext,
|
|
5014
|
+
Ca as Rating,
|
|
5015
|
+
Et as RatingItem,
|
|
5016
|
+
rr as RatingPropsContext,
|
|
5017
|
+
kn as SLIDER_LABEL_ATTRIBUTE,
|
|
5018
|
+
St as Signature,
|
|
5019
|
+
fr as SignaturePropsContext,
|
|
5020
|
+
ia as Slider,
|
|
5021
|
+
Lr as SliderLabel,
|
|
5022
|
+
bt as SliderWithoutContext,
|
|
5023
|
+
js as Switch,
|
|
5024
|
+
Ct as SwitchWithoutContext,
|
|
5025
|
+
ya as TextArea,
|
|
5026
|
+
Qs as TextAreaPropsContext,
|
|
5027
|
+
xa as TextBox,
|
|
5019
5028
|
$ as inputsMessages,
|
|
5020
|
-
|
|
5021
|
-
|
|
5022
|
-
|
|
5023
|
-
|
|
5024
|
-
|
|
5025
|
-
|
|
5026
|
-
|
|
5027
|
-
|
|
5028
|
-
|
|
5029
|
+
Za as isCorrectValue,
|
|
5030
|
+
oa as isHalf,
|
|
5031
|
+
Ot as isSelected,
|
|
5032
|
+
zs as maskingChanged,
|
|
5033
|
+
Ye as numericDecreaseValue,
|
|
5034
|
+
Xe as numericIncreaseValue,
|
|
5035
|
+
Hs as rangeReducer,
|
|
5036
|
+
sr as ratingReducer,
|
|
5037
|
+
Ta as sanitizeNumber,
|
|
5029
5038
|
ye as toRound
|
|
5030
5039
|
};
|