@progress/kendo-react-inputs 9.5.0 → 10.0.0-develop.2
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/checkbox/Checkbox.js +1 -1
- package/checkbox/Checkbox.mjs +21 -23
- package/colors/ColorGradient.js +1 -1
- package/colors/ColorGradient.mjs +61 -60
- package/colors/ColorPalette.js +1 -1
- package/colors/ColorPalette.mjs +25 -26
- package/colors/ColorPicker.js +1 -1
- package/colors/ColorPicker.mjs +78 -79
- package/colors/FlatColorPicker.js +1 -1
- package/colors/FlatColorPicker.mjs +61 -62
- package/dist/cdn/js/kendo-react-inputs.js +1 -1
- package/index.d.mts +1 -1
- package/index.d.ts +1 -1
- package/input/Input.js +1 -1
- package/input/Input.mjs +36 -39
- package/maskedtextbox/MaskedTextBox.js +1 -1
- package/maskedtextbox/MaskedTextBox.mjs +79 -80
- package/numerictextbox/NumericTextBox.js +1 -1
- package/numerictextbox/NumericTextBox.mjs +18 -20
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -2
- package/package.json +9 -9
- package/radiobutton/RadioButton.js +1 -1
- package/radiobutton/RadioButton.mjs +37 -39
- package/radiobutton/RadioGroup.js +1 -1
- package/radiobutton/RadioGroup.mjs +19 -21
- package/range-slider/RangeSlider.js +7 -7
- package/range-slider/RangeSlider.mjs +100 -101
- package/signature/Signature.js +1 -1
- package/signature/Signature.mjs +58 -58
- package/slider/Slider.js +1 -1
- package/slider/Slider.mjs +15 -16
- package/switch/Switch.js +1 -1
- package/switch/Switch.mjs +15 -16
- package/textbox/Textbox.js +1 -1
- package/textbox/Textbox.mjs +43 -45
package/textbox/Textbox.mjs
CHANGED
|
@@ -6,16 +6,14 @@
|
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
8
|
import * as e from "react";
|
|
9
|
-
import
|
|
10
|
-
import {
|
|
11
|
-
import { packageMetadata as G } from "../package-metadata.mjs";
|
|
9
|
+
import o from "prop-types";
|
|
10
|
+
import { useUnstyled as w, useCustomComponent as g, useAsyncFocusBlur as H, classNames as h, uTextBox as C } from "@progress/kendo-react-common";
|
|
12
11
|
const B = e.forwardRef((t, F) => {
|
|
13
|
-
w(
|
|
14
|
-
const l = e.useRef(null), r = e.useRef(null), o = e.useRef(), i = H(), s = i && i.uTextBox, b = e.useCallback(() => {
|
|
12
|
+
const l = e.useRef(null), s = e.useRef(null), r = e.useRef(), i = w(), a = i && i.uTextBox, b = e.useCallback(() => {
|
|
15
13
|
var n;
|
|
16
|
-
return
|
|
14
|
+
return r.current !== void 0 ? r.current : (n = l.current) == null ? void 0 : n.value;
|
|
17
15
|
}, []);
|
|
18
|
-
e.useImperativeHandle(
|
|
16
|
+
e.useImperativeHandle(s, () => ({
|
|
19
17
|
get element() {
|
|
20
18
|
return l.current;
|
|
21
19
|
},
|
|
@@ -25,7 +23,7 @@ const B = e.forwardRef((t, F) => {
|
|
|
25
23
|
get value() {
|
|
26
24
|
return b();
|
|
27
25
|
}
|
|
28
|
-
})), e.useImperativeHandle(F, () =>
|
|
26
|
+
})), e.useImperativeHandle(F, () => s.current);
|
|
29
27
|
const {
|
|
30
28
|
size: c = u.size,
|
|
31
29
|
fillMode: d = u.fillMode,
|
|
@@ -33,41 +31,41 @@ const B = e.forwardRef((t, F) => {
|
|
|
33
31
|
autoFocus: y = u.autoFocus,
|
|
34
32
|
inputAttributes: _,
|
|
35
33
|
className: m,
|
|
36
|
-
dir:
|
|
37
|
-
style:
|
|
38
|
-
prefix:
|
|
39
|
-
suffix:
|
|
40
|
-
valid:
|
|
41
|
-
onFocus:
|
|
42
|
-
onBlur:
|
|
34
|
+
dir: E,
|
|
35
|
+
style: R,
|
|
36
|
+
prefix: N = u.prefix,
|
|
37
|
+
suffix: T = u.suffix,
|
|
38
|
+
valid: D,
|
|
39
|
+
onFocus: p,
|
|
40
|
+
onBlur: q,
|
|
43
41
|
// Destruct to avoid warning when used inside a form field
|
|
44
|
-
modified:
|
|
45
|
-
touched:
|
|
46
|
-
visited:
|
|
47
|
-
...
|
|
48
|
-
} = t, [
|
|
49
|
-
|
|
50
|
-
},
|
|
51
|
-
|
|
52
|
-
},
|
|
42
|
+
modified: G,
|
|
43
|
+
touched: K,
|
|
44
|
+
visited: U,
|
|
45
|
+
...M
|
|
46
|
+
} = t, [z] = g(N), [O] = g(T), [v, x] = e.useState(!1), S = (n) => {
|
|
47
|
+
x(!0);
|
|
48
|
+
}, A = (n) => {
|
|
49
|
+
x(!1);
|
|
50
|
+
}, I = e.useCallback(
|
|
53
51
|
(n) => {
|
|
54
|
-
|
|
52
|
+
r.current = n.target.value, t.onChange && t.onChange.call(void 0, {
|
|
55
53
|
syntheticEvent: n,
|
|
56
54
|
nativeEvent: n.nativeEvent,
|
|
57
55
|
value: n.target.value,
|
|
58
|
-
target:
|
|
59
|
-
}),
|
|
56
|
+
target: s.current
|
|
57
|
+
}), r.current = void 0;
|
|
60
58
|
},
|
|
61
59
|
[t.onChange]
|
|
62
|
-
), { onFocus:
|
|
63
|
-
onFocus:
|
|
64
|
-
onBlur:
|
|
65
|
-
onSyncFocus:
|
|
66
|
-
onSyncBlur:
|
|
67
|
-
}),
|
|
60
|
+
), { onFocus: P, onBlur: j } = H({
|
|
61
|
+
onFocus: S,
|
|
62
|
+
onBlur: A,
|
|
63
|
+
onSyncFocus: p,
|
|
64
|
+
onSyncBlur: q
|
|
65
|
+
}), k = e.useMemo(
|
|
68
66
|
() => h(
|
|
69
67
|
C.wrapper({
|
|
70
|
-
c:
|
|
68
|
+
c: a,
|
|
71
69
|
rounded: f,
|
|
72
70
|
fillMode: d,
|
|
73
71
|
size: c,
|
|
@@ -78,19 +76,19 @@ const B = e.forwardRef((t, F) => {
|
|
|
78
76
|
}),
|
|
79
77
|
m
|
|
80
78
|
),
|
|
81
|
-
[m, d, v, t.disabled, t.required, t.valid, f, c,
|
|
79
|
+
[m, d, v, t.disabled, t.required, t.valid, f, c, a]
|
|
82
80
|
);
|
|
83
|
-
return /* @__PURE__ */ e.createElement("span", { style:
|
|
81
|
+
return /* @__PURE__ */ e.createElement("span", { style: R, dir: E, className: k, onFocus: P, onBlur: j }, /* @__PURE__ */ e.createElement(z, null), /* @__PURE__ */ e.createElement(
|
|
84
82
|
"input",
|
|
85
83
|
{
|
|
86
84
|
ref: l,
|
|
87
|
-
className: h(C.inputInner({ c:
|
|
85
|
+
className: h(C.inputInner({ c: a })),
|
|
88
86
|
autoFocus: y,
|
|
89
|
-
...Object.assign({},
|
|
87
|
+
...Object.assign({}, M, _),
|
|
90
88
|
"aria-required": t.required,
|
|
91
|
-
onChange:
|
|
89
|
+
onChange: I
|
|
92
90
|
}
|
|
93
|
-
), /* @__PURE__ */ e.createElement(
|
|
91
|
+
), /* @__PURE__ */ e.createElement(O, null));
|
|
94
92
|
}), u = {
|
|
95
93
|
prefix: (t) => null,
|
|
96
94
|
suffix: (t) => null,
|
|
@@ -100,11 +98,11 @@ const B = e.forwardRef((t, F) => {
|
|
|
100
98
|
autoFocus: !1
|
|
101
99
|
};
|
|
102
100
|
B.propTypes = {
|
|
103
|
-
size:
|
|
104
|
-
rounded:
|
|
105
|
-
fillMode:
|
|
106
|
-
autoFocus:
|
|
107
|
-
inputAttributes:
|
|
101
|
+
size: o.oneOf([null, "small", "medium", "large"]),
|
|
102
|
+
rounded: o.oneOf([null, "small", "medium", "large", "full"]),
|
|
103
|
+
fillMode: o.oneOf([null, "solid", "flat", "outline"]),
|
|
104
|
+
autoFocus: o.bool,
|
|
105
|
+
inputAttributes: o.object
|
|
108
106
|
};
|
|
109
107
|
B.displayName = "KendoReactTextBoxComponent";
|
|
110
108
|
export {
|