@progress/kendo-react-inputs 16.4.0-develop.6 → 16.4.0-develop.7
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.
|
@@ -6,100 +6,100 @@
|
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
8
|
import * as n from "react";
|
|
9
|
-
import
|
|
10
|
-
import { useInternationalization as
|
|
11
|
-
import { usePropsContext as
|
|
12
|
-
import { chevronUpIcon as
|
|
13
|
-
import { FloatingLabel as
|
|
14
|
-
import { numericIncreaseValue as
|
|
15
|
-
import { getInitialState as
|
|
16
|
-
import { Button as
|
|
17
|
-
const
|
|
18
|
-
(k,
|
|
19
|
-
const x =
|
|
20
|
-
|
|
9
|
+
import r from "prop-types";
|
|
10
|
+
import { useInternationalization as st, useLocalization as ot } from "@progress/kendo-react-intl";
|
|
11
|
+
import { usePropsContext as ut, useId as lt, useCustomComponent as Ce, useWebMcpRegister as it, dispatchEvent as ee, useKendoPaste as ct, getActiveElement as ke, useIsomorphicLayoutEffect as Ee, classNames as dt, kendoThemeMaps as he, getTabIndex as mt, createPropsContext as ft } from "@progress/kendo-react-common";
|
|
12
|
+
import { chevronUpIcon as pt, chevronDownIcon as bt } from "@progress/kendo-svg-icons";
|
|
13
|
+
import { FloatingLabel as gt } from "@progress/kendo-react-labels";
|
|
14
|
+
import { numericIncreaseValue as K, messages as H, numericDecreaseValue as _ } from "../messages/index.mjs";
|
|
15
|
+
import { getInitialState as Se, formatValue as P, getStateOrPropsValue as te, rangeValue as R, sanitizeNumber as xe, decreaseValue as Ie, increaseValue as Le } from "./utils/index.mjs";
|
|
16
|
+
import { Button as Oe } from "@progress/kendo-react-buttons";
|
|
17
|
+
const vt = "Please enter a valid value!", yt = ft(), Ne = n.forwardRef(
|
|
18
|
+
(k, De) => {
|
|
19
|
+
const x = ut(
|
|
20
|
+
yt,
|
|
21
21
|
k
|
|
22
22
|
), {
|
|
23
23
|
className: Pe,
|
|
24
24
|
value: V,
|
|
25
|
-
defaultValue:
|
|
26
|
-
format:
|
|
27
|
-
width:
|
|
28
|
-
tabIndex:
|
|
29
|
-
accessKey:
|
|
30
|
-
title:
|
|
31
|
-
placeholder:
|
|
25
|
+
defaultValue: Re,
|
|
26
|
+
format: s,
|
|
27
|
+
width: ne,
|
|
28
|
+
tabIndex: Fe,
|
|
29
|
+
accessKey: Be,
|
|
30
|
+
title: Me,
|
|
31
|
+
placeholder: re,
|
|
32
32
|
min: d,
|
|
33
33
|
max: m,
|
|
34
34
|
dir: E,
|
|
35
|
-
name:
|
|
36
|
-
label:
|
|
37
|
-
id:
|
|
38
|
-
ariaDescribedBy:
|
|
39
|
-
ariaLabelledBy:
|
|
40
|
-
ariaLabel:
|
|
41
|
-
inputType:
|
|
35
|
+
name: F,
|
|
36
|
+
label: I,
|
|
37
|
+
id: ae,
|
|
38
|
+
ariaDescribedBy: Te,
|
|
39
|
+
ariaLabelledBy: ze,
|
|
40
|
+
ariaLabel: qe,
|
|
41
|
+
inputType: we,
|
|
42
42
|
readOnly: g,
|
|
43
|
-
validationMessage:
|
|
43
|
+
validationMessage: W,
|
|
44
44
|
children: Ge,
|
|
45
45
|
// Removed to support direct use in Form Field component
|
|
46
|
-
touched:
|
|
47
|
-
visited:
|
|
48
|
-
modified:
|
|
49
|
-
style:
|
|
46
|
+
touched: Vt,
|
|
47
|
+
visited: Ct,
|
|
48
|
+
modified: kt,
|
|
49
|
+
style: se,
|
|
50
50
|
inputStyle: je,
|
|
51
51
|
valid: U,
|
|
52
52
|
step: C = c.step,
|
|
53
|
-
spinners:
|
|
53
|
+
spinners: Y = c.spinners,
|
|
54
54
|
disabled: u = c.disabled,
|
|
55
55
|
required: B = c.required,
|
|
56
56
|
validityStyles: oe = c.validityStyles,
|
|
57
57
|
prefix: Ae = c.prefix,
|
|
58
|
-
suffix:
|
|
58
|
+
suffix: Ke = c.suffix,
|
|
59
59
|
onChange: h = c.onChange,
|
|
60
|
-
onFocus:
|
|
61
|
-
onBlur:
|
|
62
|
-
rangeOnEnter:
|
|
63
|
-
size:
|
|
60
|
+
onFocus: ue = c.onFocus,
|
|
61
|
+
onBlur: le = c.onBlur,
|
|
62
|
+
rangeOnEnter: ie = c.rangeOnEnter,
|
|
63
|
+
size: L = c.size,
|
|
64
64
|
rounded: $ = c.rounded,
|
|
65
65
|
fillMode: M = c.fillMode,
|
|
66
|
-
autoFocus:
|
|
66
|
+
autoFocus: He = c.autoFocus,
|
|
67
67
|
inputAttributes: _e,
|
|
68
|
-
...
|
|
69
|
-
} = x,
|
|
70
|
-
i.current.focused && !u ? i.current.currentLooseValue :
|
|
71
|
-
|
|
72
|
-
|
|
68
|
+
...ce
|
|
69
|
+
} = x, We = lt(), de = ae || We, o = st(), T = ot(), a = n.useRef(null), z = n.useRef(void 0), [Ue, S] = n.useState(!1), i = n.useRef(Se()), q = n.useRef(!1), J = n.useRef(void 0), O = n.useRef(Re), me = F || ae, N = P(
|
|
70
|
+
i.current.focused && !u ? i.current.currentLooseValue : te(V, O.current),
|
|
71
|
+
s,
|
|
72
|
+
o
|
|
73
73
|
);
|
|
74
|
-
|
|
75
|
-
const [
|
|
74
|
+
J.current = N;
|
|
75
|
+
const [Ye] = Ce(Ae), [$e] = Ce(Ke);
|
|
76
76
|
n.useEffect(() => {
|
|
77
77
|
a.current && a.current.setCustomValidity && a.current.setCustomValidity(
|
|
78
|
-
|
|
78
|
+
j().valid ? "" : W || vt
|
|
79
79
|
);
|
|
80
80
|
});
|
|
81
|
-
const
|
|
81
|
+
const fe = n.useCallback(() => {
|
|
82
82
|
a.current && a.current.focus();
|
|
83
|
-
}, []),
|
|
84
|
-
const
|
|
83
|
+
}, []), w = n.useCallback(() => z.current !== void 0 ? z.current : te(V, O.current), [V]), pe = n.useCallback(() => F, [F]), G = n.useCallback(() => B, [B]), j = n.useCallback(() => {
|
|
84
|
+
const t = W !== void 0, e = w(), f = U !== void 0 ? U : !i.current.valueIsOutOfRange && (!G() || e != null);
|
|
85
85
|
return {
|
|
86
|
-
customError:
|
|
87
|
-
valid:
|
|
86
|
+
customError: t,
|
|
87
|
+
valid: f,
|
|
88
88
|
valueMissing: e == null
|
|
89
89
|
};
|
|
90
|
-
}, [
|
|
91
|
-
const
|
|
90
|
+
}, [W, U, w, G]), Q = n.useCallback(() => oe, [oe]), be = n.useCallback(() => x, [x]), v = n.useCallback(() => {
|
|
91
|
+
const t = {
|
|
92
92
|
element: a.current,
|
|
93
|
-
focus:
|
|
93
|
+
focus: fe
|
|
94
94
|
};
|
|
95
|
-
return Object.defineProperty(
|
|
96
|
-
}, [
|
|
97
|
-
n.useImperativeHandle(
|
|
98
|
-
const
|
|
99
|
-
n.useImperativeHandle(
|
|
95
|
+
return Object.defineProperty(t, "name", { get: pe }), Object.defineProperty(t, "value", { get: w }), Object.defineProperty(t, "validity", { get: j }), Object.defineProperty(t, "validityStyles", { get: Q }), Object.defineProperty(t, "required", { get: G }), Object.defineProperty(t, "props", { get: be }), t;
|
|
96
|
+
}, [pe, w, j, Q, G, fe, be]);
|
|
97
|
+
n.useImperativeHandle(De, v);
|
|
98
|
+
const ge = n.useRef(null);
|
|
99
|
+
n.useImperativeHandle(ge, v), it("numerictextbox", ge, x, x.webMcp);
|
|
100
100
|
const y = n.useCallback(() => ({
|
|
101
|
-
eventValue:
|
|
102
|
-
prevLooseValue:
|
|
101
|
+
eventValue: te(V, O.current),
|
|
102
|
+
prevLooseValue: J.current,
|
|
103
103
|
currentLooseValue: a.current.value,
|
|
104
104
|
selectionStart: a.current.selectionStart,
|
|
105
105
|
selectionEnd: a.current.selectionEnd,
|
|
@@ -108,315 +108,330 @@ const gt = "Please enter a valid value!", vt = mt(), Oe = n.forwardRef(
|
|
|
108
108
|
valueIsOutOfRange: !1,
|
|
109
109
|
isPaste: q.current,
|
|
110
110
|
focused: i.current.focused
|
|
111
|
-
}), [V]),
|
|
112
|
-
(
|
|
111
|
+
}), [V]), p = n.useCallback(
|
|
112
|
+
(t, e) => {
|
|
113
113
|
if (u)
|
|
114
114
|
return;
|
|
115
|
-
z.current = e.eventValue,
|
|
116
|
-
const
|
|
117
|
-
l !== e.eventValue && (e.valueIsOutOfRange = !0, e.eventValue = l,
|
|
115
|
+
z.current = e.eventValue, O.current = e.eventValue;
|
|
116
|
+
const f = P(R(e.eventValue, d, m), s, o), l = R(o.parseNumber(f, s), d, m);
|
|
117
|
+
l !== e.eventValue && (e.valueIsOutOfRange = !0, e.eventValue = l, O.current = l), V !== e.eventValue && ee(h, t, v(), {
|
|
118
118
|
value: e.eventValue
|
|
119
|
-
}), z.current = void 0, i.current = e, S((
|
|
119
|
+
}), z.current = void 0, i.current = e, S((D) => !D);
|
|
120
120
|
},
|
|
121
121
|
[V, h, u, S, v]
|
|
122
|
-
),
|
|
123
|
-
(
|
|
124
|
-
const e = Number(
|
|
122
|
+
), Je = n.useCallback(
|
|
123
|
+
(t) => {
|
|
124
|
+
const e = Number(t);
|
|
125
125
|
if (isNaN(e))
|
|
126
126
|
return;
|
|
127
|
-
const
|
|
127
|
+
const f = R(e, d, m), l = P(f, s, o), b = {
|
|
128
128
|
...i.current,
|
|
129
|
-
eventValue:
|
|
129
|
+
eventValue: f,
|
|
130
130
|
currentLooseValue: l,
|
|
131
131
|
selectionStart: l.length,
|
|
132
132
|
selectionEnd: l.length
|
|
133
|
-
},
|
|
133
|
+
}, D = {
|
|
134
134
|
target: a.current,
|
|
135
135
|
currentTarget: a.current
|
|
136
136
|
};
|
|
137
|
-
|
|
137
|
+
p(D, b);
|
|
138
138
|
},
|
|
139
|
-
[d, m,
|
|
139
|
+
[d, m, s, o, p]
|
|
140
140
|
);
|
|
141
|
-
|
|
142
|
-
fieldName:
|
|
143
|
-
onValueChange:
|
|
144
|
-
enabled: !!
|
|
141
|
+
ct(a, {
|
|
142
|
+
fieldName: me,
|
|
143
|
+
onValueChange: Je,
|
|
144
|
+
enabled: !!me
|
|
145
145
|
});
|
|
146
|
-
const
|
|
147
|
-
(
|
|
146
|
+
const Qe = n.useCallback(
|
|
147
|
+
(t) => {
|
|
148
148
|
const e = y();
|
|
149
|
-
q.current = !1,
|
|
149
|
+
q.current = !1, p(t, xe(e, s, o));
|
|
150
150
|
},
|
|
151
|
-
[
|
|
152
|
-
),
|
|
153
|
-
(
|
|
151
|
+
[s, h, o, p, y]
|
|
152
|
+
), Xe = n.useCallback(
|
|
153
|
+
(t) => {
|
|
154
154
|
if (g || u)
|
|
155
155
|
return;
|
|
156
156
|
let e = y();
|
|
157
|
-
const
|
|
157
|
+
const f = o.parseNumber(String(e.currentLooseValue), s);
|
|
158
158
|
if (e.selectionEnd > e.selectionStart && e.selectionEnd - e.selectionStart === String(e.currentLooseValue).length) {
|
|
159
|
-
const l =
|
|
160
|
-
q.current = !b && !
|
|
159
|
+
const l = o.numberSymbols(), b = l && t.key === l.minusSign, D = l && t.key === l.decimal;
|
|
160
|
+
q.current = !b && !D;
|
|
161
161
|
return;
|
|
162
162
|
}
|
|
163
|
-
switch (
|
|
163
|
+
switch (t.keyCode) {
|
|
164
164
|
case 38:
|
|
165
|
-
|
|
165
|
+
Le(f, e, C, d, m, s, o);
|
|
166
166
|
break;
|
|
167
167
|
case 40:
|
|
168
|
-
|
|
168
|
+
Ie(f, e, C, d, m, s, o);
|
|
169
169
|
break;
|
|
170
170
|
case 13: {
|
|
171
|
-
if (
|
|
171
|
+
if (ie === !1)
|
|
172
172
|
return;
|
|
173
|
-
const l = P(
|
|
174
|
-
e.eventValue = b, e.currentLooseValue = P(b,
|
|
173
|
+
const l = P(R(f, d, m), s, o), b = R(o.parseNumber(l, s), d, m);
|
|
174
|
+
e.eventValue = b, e.currentLooseValue = P(b, s, o), e.selectionStart = e.selectionEnd = e.currentLooseValue.length;
|
|
175
175
|
break;
|
|
176
176
|
}
|
|
177
177
|
case 110: {
|
|
178
|
-
const l = a.current, b =
|
|
179
|
-
l && (e.currentLooseValue = e.currentLooseValue.slice(0, e.selectionStart) + b.decimal + e.currentLooseValue.slice(e.selectionEnd), e.selectionStart = e.selectionEnd = e.selectionStart + 1, e =
|
|
178
|
+
const l = a.current, b = o.numberSymbols();
|
|
179
|
+
l && (e.currentLooseValue = e.currentLooseValue.slice(0, e.selectionStart) + b.decimal + e.currentLooseValue.slice(e.selectionEnd), e.selectionStart = e.selectionEnd = e.selectionStart + 1, e = xe(e, s, o));
|
|
180
180
|
break;
|
|
181
181
|
}
|
|
182
182
|
default:
|
|
183
183
|
return;
|
|
184
184
|
}
|
|
185
|
-
|
|
185
|
+
t.preventDefault(), p(t, e);
|
|
186
186
|
},
|
|
187
|
-
[
|
|
188
|
-
),
|
|
187
|
+
[s, d, m, C, h, ie, p, y]
|
|
188
|
+
), Ze = n.useCallback(() => {
|
|
189
189
|
q.current = !0;
|
|
190
|
-
}, []),
|
|
191
|
-
(
|
|
190
|
+
}, []), X = n.useCallback(
|
|
191
|
+
(t) => {
|
|
192
192
|
if (g || u)
|
|
193
193
|
return;
|
|
194
194
|
const e = y();
|
|
195
|
-
|
|
196
|
-
|
|
195
|
+
Le(
|
|
196
|
+
o.parseNumber(String(e.currentLooseValue), s),
|
|
197
197
|
e,
|
|
198
198
|
C,
|
|
199
199
|
d,
|
|
200
200
|
m,
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
),
|
|
201
|
+
s,
|
|
202
|
+
o
|
|
203
|
+
), p(t, e);
|
|
204
204
|
},
|
|
205
|
-
[
|
|
206
|
-
),
|
|
207
|
-
(
|
|
205
|
+
[s, d, m, C, h, g, u, p, y]
|
|
206
|
+
), Z = n.useCallback(
|
|
207
|
+
(t) => {
|
|
208
208
|
if (g || u)
|
|
209
209
|
return;
|
|
210
210
|
const e = y();
|
|
211
|
-
|
|
212
|
-
|
|
211
|
+
Ie(
|
|
212
|
+
o.parseNumber(String(e.currentLooseValue), s),
|
|
213
213
|
e,
|
|
214
214
|
C,
|
|
215
215
|
d,
|
|
216
216
|
m,
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
),
|
|
217
|
+
s,
|
|
218
|
+
o
|
|
219
|
+
), p(t, e);
|
|
220
220
|
},
|
|
221
|
-
[
|
|
222
|
-
),
|
|
223
|
-
(
|
|
224
|
-
const e =
|
|
225
|
-
|
|
221
|
+
[s, d, m, C, h, g, u, p, y]
|
|
222
|
+
), A = n.useCallback(
|
|
223
|
+
(t) => {
|
|
224
|
+
const e = a.current;
|
|
225
|
+
return !!e && !g && !u && !t.ctrlKey && t.deltaY !== 0 && ke(e.ownerDocument) === e;
|
|
226
226
|
},
|
|
227
|
-
[
|
|
227
|
+
[g, u]
|
|
228
228
|
), et = n.useCallback(
|
|
229
|
-
(
|
|
230
|
-
|
|
229
|
+
(t) => {
|
|
230
|
+
A(t.nativeEvent) && (t.nativeEvent.deltaY < 0 && X(t), t.nativeEvent.deltaY > 0 && Z(t));
|
|
231
231
|
},
|
|
232
|
-
[
|
|
233
|
-
)
|
|
234
|
-
|
|
235
|
-
|
|
232
|
+
[X, Z, A]
|
|
233
|
+
);
|
|
234
|
+
n.useEffect(() => {
|
|
235
|
+
const t = a.current;
|
|
236
|
+
if (!t)
|
|
237
|
+
return;
|
|
238
|
+
const e = (f) => {
|
|
239
|
+
A(f) && f.preventDefault();
|
|
240
|
+
};
|
|
241
|
+
return t.addEventListener("wheel", e, { passive: !1 }), () => t.removeEventListener("wheel", e);
|
|
242
|
+
}, [A, I]);
|
|
243
|
+
const tt = n.useCallback(
|
|
244
|
+
(t) => {
|
|
245
|
+
i.current.currentLooseValue = J.current, i.current.focused = !0, ee(ue, t, v(), {}), S((e) => !e);
|
|
236
246
|
},
|
|
237
247
|
[ue, S, v]
|
|
238
|
-
), nt = n.useCallback(
|
|
248
|
+
), nt = n.useCallback(
|
|
249
|
+
(t) => {
|
|
250
|
+
i.current = Se(), ee(le, t, v(), {}), S((e) => !e);
|
|
251
|
+
},
|
|
252
|
+
[le, S, v]
|
|
253
|
+
), rt = n.useCallback((t) => {
|
|
239
254
|
if (document && a.current) {
|
|
240
|
-
const e =
|
|
241
|
-
|
|
255
|
+
const e = ke(document);
|
|
256
|
+
t.preventDefault(), e !== a.current && a.current.focus();
|
|
242
257
|
}
|
|
243
258
|
}, []);
|
|
244
|
-
|
|
259
|
+
Ee(() => {
|
|
245
260
|
a.current && a.current.type !== "number" && i.current.selectionStart !== void 0 && i.current.selectionEnd !== void 0 && (a.current.selectionStart = i.current.selectionStart, a.current.selectionEnd = i.current.selectionEnd, i.current.selectionStart = void 0, i.current.selectionEnd = void 0);
|
|
246
261
|
}, [Ue]);
|
|
247
|
-
const [
|
|
248
|
-
|
|
262
|
+
const [at, ve] = n.useState(E);
|
|
263
|
+
Ee(() => {
|
|
249
264
|
if (E !== void 0)
|
|
250
|
-
|
|
265
|
+
ve(E);
|
|
251
266
|
else if (a.current && a.current.parentElement) {
|
|
252
|
-
const
|
|
253
|
-
|
|
267
|
+
const t = getComputedStyle(a.current.parentElement).direction;
|
|
268
|
+
ve(t === "rtl" ? "rtl" : void 0);
|
|
254
269
|
}
|
|
255
270
|
}, [E]);
|
|
256
|
-
const
|
|
271
|
+
const ye = !Q() || j().valid, Ve = /* @__PURE__ */ n.createElement(
|
|
257
272
|
"span",
|
|
258
273
|
{
|
|
259
274
|
dir: E,
|
|
260
|
-
style:
|
|
261
|
-
className:
|
|
275
|
+
style: I ? se : { width: ne, ...se },
|
|
276
|
+
className: dt(
|
|
262
277
|
"k-input",
|
|
263
278
|
"k-numerictextbox",
|
|
264
279
|
{
|
|
265
|
-
[`k-input-${
|
|
280
|
+
[`k-input-${he.sizeMap[L] || L}`]: L,
|
|
266
281
|
[`k-input-${M}`]: M,
|
|
267
|
-
[`k-rounded-${
|
|
268
|
-
"k-invalid": !
|
|
282
|
+
[`k-rounded-${he.roundedMap[$] || $}`]: $,
|
|
283
|
+
"k-invalid": !ye,
|
|
269
284
|
"k-required": B,
|
|
270
285
|
"k-disabled": u
|
|
271
286
|
},
|
|
272
287
|
Pe
|
|
273
288
|
),
|
|
274
|
-
...
|
|
289
|
+
...I ? {} : ce
|
|
275
290
|
},
|
|
276
|
-
/* @__PURE__ */ n.createElement(
|
|
291
|
+
/* @__PURE__ */ n.createElement(Ye, null),
|
|
277
292
|
/* @__PURE__ */ n.createElement(
|
|
278
293
|
"input",
|
|
279
294
|
{
|
|
280
295
|
role: "spinbutton",
|
|
281
|
-
value:
|
|
282
|
-
tabIndex:
|
|
283
|
-
accessKey:
|
|
296
|
+
value: N === null ? "" : N,
|
|
297
|
+
tabIndex: mt(Fe, u),
|
|
298
|
+
accessKey: Be,
|
|
284
299
|
disabled: u,
|
|
285
|
-
title:
|
|
286
|
-
"aria-valuemin":
|
|
287
|
-
"aria-valuemax":
|
|
288
|
-
"aria-label":
|
|
289
|
-
"aria-labelledby":
|
|
290
|
-
"aria-describedby":
|
|
300
|
+
title: Me,
|
|
301
|
+
"aria-valuemin": Y ? d : void 0,
|
|
302
|
+
"aria-valuemax": Y ? m : void 0,
|
|
303
|
+
"aria-label": qe,
|
|
304
|
+
"aria-labelledby": ze,
|
|
305
|
+
"aria-describedby": Te,
|
|
291
306
|
"aria-required": B || void 0,
|
|
292
|
-
placeholder:
|
|
307
|
+
placeholder: re,
|
|
293
308
|
spellCheck: !1,
|
|
294
309
|
autoComplete: "off",
|
|
295
310
|
autoCorrect: "off",
|
|
296
|
-
autoFocus:
|
|
297
|
-
type:
|
|
311
|
+
autoFocus: He,
|
|
312
|
+
type: we || "tel",
|
|
298
313
|
className: "k-input-inner",
|
|
299
|
-
id:
|
|
300
|
-
name:
|
|
314
|
+
id: de,
|
|
315
|
+
name: F,
|
|
301
316
|
readOnly: g,
|
|
302
317
|
style: je,
|
|
303
|
-
dir:
|
|
304
|
-
onChange:
|
|
305
|
-
onFocus:
|
|
306
|
-
onBlur:
|
|
307
|
-
onKeyDown:
|
|
308
|
-
onPaste:
|
|
309
|
-
onWheel:
|
|
318
|
+
dir: at,
|
|
319
|
+
onChange: Qe,
|
|
320
|
+
onFocus: tt,
|
|
321
|
+
onBlur: nt,
|
|
322
|
+
onKeyDown: Xe,
|
|
323
|
+
onPaste: Ze,
|
|
324
|
+
onWheel: et,
|
|
310
325
|
ref: a,
|
|
311
326
|
..._e
|
|
312
327
|
}
|
|
313
328
|
),
|
|
314
329
|
/* @__PURE__ */ n.createElement($e, null),
|
|
315
330
|
Ge,
|
|
316
|
-
|
|
317
|
-
|
|
331
|
+
Y && /* @__PURE__ */ n.createElement("span", { className: "k-input-spinner k-spin-button", onMouseDown: rt }, /* @__PURE__ */ n.createElement(
|
|
332
|
+
Oe,
|
|
318
333
|
{
|
|
319
334
|
tabIndex: -1,
|
|
320
335
|
type: "button",
|
|
321
336
|
icon: "chevron-up",
|
|
322
|
-
svgIcon:
|
|
337
|
+
svgIcon: pt,
|
|
323
338
|
fillMode: M,
|
|
324
|
-
size:
|
|
339
|
+
size: L,
|
|
325
340
|
disabled: u,
|
|
326
341
|
className: "k-spinner-increase",
|
|
327
342
|
"aria-label": T.toLanguageString(
|
|
328
|
-
|
|
329
|
-
K
|
|
343
|
+
K,
|
|
344
|
+
H[K]
|
|
330
345
|
),
|
|
331
346
|
title: T.toLanguageString(
|
|
332
|
-
|
|
333
|
-
K
|
|
347
|
+
K,
|
|
348
|
+
H[K]
|
|
334
349
|
),
|
|
335
|
-
onClick:
|
|
350
|
+
onClick: X
|
|
336
351
|
}
|
|
337
352
|
), /* @__PURE__ */ n.createElement(
|
|
338
|
-
|
|
353
|
+
Oe,
|
|
339
354
|
{
|
|
340
355
|
tabIndex: -1,
|
|
341
356
|
type: "button",
|
|
342
357
|
icon: "chevron-down",
|
|
343
|
-
svgIcon:
|
|
358
|
+
svgIcon: bt,
|
|
344
359
|
fillMode: M,
|
|
345
|
-
size:
|
|
360
|
+
size: L,
|
|
346
361
|
disabled: u,
|
|
347
362
|
className: "k-spinner-decrease",
|
|
348
363
|
"aria-label": T.toLanguageString(
|
|
349
364
|
_,
|
|
350
|
-
|
|
365
|
+
H[_]
|
|
351
366
|
),
|
|
352
367
|
title: T.toLanguageString(
|
|
353
368
|
_,
|
|
354
|
-
|
|
369
|
+
H[_]
|
|
355
370
|
),
|
|
356
|
-
onClick:
|
|
371
|
+
onClick: Z
|
|
357
372
|
}
|
|
358
373
|
))
|
|
359
374
|
);
|
|
360
|
-
return
|
|
361
|
-
|
|
375
|
+
return I ? /* @__PURE__ */ n.createElement(
|
|
376
|
+
gt,
|
|
362
377
|
{
|
|
363
|
-
label:
|
|
364
|
-
editorId:
|
|
365
|
-
editorValue:
|
|
366
|
-
editorValid:
|
|
378
|
+
label: I,
|
|
379
|
+
editorId: de,
|
|
380
|
+
editorValue: N === null ? "" : N,
|
|
381
|
+
editorValid: ye,
|
|
367
382
|
editorDisabled: u,
|
|
368
|
-
editorPlaceholder:
|
|
369
|
-
children:
|
|
370
|
-
style: { width:
|
|
383
|
+
editorPlaceholder: re,
|
|
384
|
+
children: Ve,
|
|
385
|
+
style: { width: ne },
|
|
371
386
|
dir: E,
|
|
372
|
-
...
|
|
387
|
+
...ce
|
|
373
388
|
}
|
|
374
|
-
) :
|
|
389
|
+
) : Ve;
|
|
375
390
|
}
|
|
376
391
|
);
|
|
377
|
-
|
|
378
|
-
value:
|
|
379
|
-
defaultValue:
|
|
380
|
-
step:
|
|
381
|
-
format:
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
style:
|
|
385
|
-
currency:
|
|
386
|
-
currencyDisplay:
|
|
387
|
-
useGrouping:
|
|
388
|
-
minimumIntegerDigits:
|
|
389
|
-
minimumFractionDigits:
|
|
390
|
-
maximumFractionDigits:
|
|
392
|
+
Ne.propTypes = {
|
|
393
|
+
value: r.number,
|
|
394
|
+
defaultValue: r.number,
|
|
395
|
+
step: r.number,
|
|
396
|
+
format: r.oneOfType([
|
|
397
|
+
r.string,
|
|
398
|
+
r.shape({
|
|
399
|
+
style: r.oneOf(["decimal", "currency", "percent", "scientific", "accounting"]),
|
|
400
|
+
currency: r.string,
|
|
401
|
+
currencyDisplay: r.oneOf(["symbol", "code", "name"]),
|
|
402
|
+
useGrouping: r.bool,
|
|
403
|
+
minimumIntegerDigits: r.number,
|
|
404
|
+
minimumFractionDigits: r.number,
|
|
405
|
+
maximumFractionDigits: r.number
|
|
391
406
|
})
|
|
392
407
|
]),
|
|
393
|
-
width:
|
|
394
|
-
tabIndex:
|
|
395
|
-
accessKey:
|
|
396
|
-
title:
|
|
397
|
-
placeholder:
|
|
398
|
-
min:
|
|
399
|
-
max:
|
|
400
|
-
spinners:
|
|
401
|
-
disabled:
|
|
402
|
-
readOnly:
|
|
403
|
-
dir:
|
|
404
|
-
name:
|
|
405
|
-
label:
|
|
406
|
-
validationMessage:
|
|
407
|
-
required:
|
|
408
|
-
id:
|
|
409
|
-
rangeOnEnter:
|
|
410
|
-
ariaLabelledBy:
|
|
411
|
-
ariaDescribedBy:
|
|
412
|
-
ariaLabel:
|
|
413
|
-
onChange:
|
|
414
|
-
onFocus:
|
|
415
|
-
onBlur:
|
|
416
|
-
size:
|
|
417
|
-
rounded:
|
|
418
|
-
fillMode:
|
|
419
|
-
inputAttributes:
|
|
408
|
+
width: r.oneOfType([r.string, r.number]),
|
|
409
|
+
tabIndex: r.number,
|
|
410
|
+
accessKey: r.string,
|
|
411
|
+
title: r.string,
|
|
412
|
+
placeholder: r.string,
|
|
413
|
+
min: r.number,
|
|
414
|
+
max: r.number,
|
|
415
|
+
spinners: r.bool,
|
|
416
|
+
disabled: r.bool,
|
|
417
|
+
readOnly: r.bool,
|
|
418
|
+
dir: r.string,
|
|
419
|
+
name: r.string,
|
|
420
|
+
label: r.string,
|
|
421
|
+
validationMessage: r.string,
|
|
422
|
+
required: r.bool,
|
|
423
|
+
id: r.string,
|
|
424
|
+
rangeOnEnter: r.bool,
|
|
425
|
+
ariaLabelledBy: r.string,
|
|
426
|
+
ariaDescribedBy: r.string,
|
|
427
|
+
ariaLabel: r.string,
|
|
428
|
+
onChange: r.func,
|
|
429
|
+
onFocus: r.func,
|
|
430
|
+
onBlur: r.func,
|
|
431
|
+
size: r.oneOf(["small", "medium", "large"]),
|
|
432
|
+
rounded: r.oneOf(["small", "medium", "large", "full", "none"]),
|
|
433
|
+
fillMode: r.oneOf(["solid", "flat", "outline"]),
|
|
434
|
+
inputAttributes: r.object
|
|
420
435
|
};
|
|
421
436
|
const c = {
|
|
422
437
|
prefix: (k) => null,
|
|
@@ -438,8 +453,8 @@ const c = {
|
|
|
438
453
|
rounded: void 0,
|
|
439
454
|
fillMode: void 0
|
|
440
455
|
};
|
|
441
|
-
|
|
456
|
+
Ne.displayName = "KendoNumericTextBox";
|
|
442
457
|
export {
|
|
443
|
-
|
|
444
|
-
|
|
458
|
+
Ne as NumericTextBox,
|
|
459
|
+
yt as NumericTextBoxPropsContext
|
|
445
460
|
};
|