@progress/kendo-react-inputs 8.1.0-develop.9 → 8.1.1-develop.1
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 +87 -90
- package/colors/ColorPicker.js +1 -1
- package/colors/ColorPicker.mjs +53 -54
- package/dist/cdn/js/kendo-react-inputs.js +1 -1
- package/index.d.mts +2 -2
- package/index.d.ts +2 -2
- package/numerictextbox/NumericTextBox.js +1 -1
- package/numerictextbox/NumericTextBox.mjs +208 -206
- package/package-metadata.mjs +1 -1
- package/package.json +8 -8
- package/radiobutton/RadioButton.js +1 -1
- package/radiobutton/RadioButton.mjs +21 -22
- package/radiobutton/RadioGroup.js +1 -1
- package/radiobutton/RadioGroup.mjs +54 -55
- package/range-slider/RangeSlider.js +7 -7
- package/range-slider/RangeSlider.mjs +161 -156
- package/rating/Rating.js +3 -3
- package/rating/Rating.mjs +145 -134
- package/rating/RatingItem.js +1 -1
- package/rating/RatingItem.mjs +40 -41
- package/signature/Signature.js +1 -1
- package/signature/Signature.mjs +151 -133
- package/textarea/TextArea.js +1 -1
- package/textarea/TextArea.mjs +64 -65
- package/textbox/Textbox.js +1 -1
- package/textbox/Textbox.mjs +33 -34
package/textarea/TextArea.mjs
CHANGED
|
@@ -8,32 +8,32 @@
|
|
|
8
8
|
"use client";
|
|
9
9
|
import * as t from "react";
|
|
10
10
|
import e from "prop-types";
|
|
11
|
-
import { createPropsContext as se, usePropsContext as
|
|
12
|
-
const
|
|
13
|
-
const
|
|
14
|
-
size: u,
|
|
15
|
-
rounded: d,
|
|
16
|
-
fillMode: k,
|
|
17
|
-
prefix:
|
|
18
|
-
suffix:
|
|
19
|
-
ariaDescribedBy:
|
|
20
|
-
ariaLabelledBy:
|
|
11
|
+
import { createPropsContext as se, usePropsContext as ie, useCustomComponent as M, useId as ue, useDir as de, useIsomorphicLayoutEffect as ce, dispatchEvent as h, classNames as O, getTabIndex as fe, kendoThemeMaps as S } from "@progress/kendo-react-common";
|
|
12
|
+
const me = se(), w = t.forwardRef((A, N) => {
|
|
13
|
+
const l = ie(me, A), {
|
|
14
|
+
size: u = y.size,
|
|
15
|
+
rounded: d = y.rounded,
|
|
16
|
+
fillMode: k = y.fillMode,
|
|
17
|
+
prefix: H = null,
|
|
18
|
+
suffix: F = null,
|
|
19
|
+
ariaDescribedBy: R,
|
|
20
|
+
ariaLabelledBy: $,
|
|
21
21
|
autoSize: C,
|
|
22
|
-
className:
|
|
23
|
-
defaultValue:
|
|
22
|
+
className: D,
|
|
23
|
+
defaultValue: L,
|
|
24
24
|
disabled: r,
|
|
25
|
-
readOnly:
|
|
25
|
+
readOnly: q,
|
|
26
26
|
required: c,
|
|
27
|
-
rows:
|
|
28
|
-
id:
|
|
29
|
-
name:
|
|
30
|
-
placeholder:
|
|
31
|
-
style:
|
|
32
|
-
tabIndex:
|
|
27
|
+
rows: j,
|
|
28
|
+
id: K,
|
|
29
|
+
name: G,
|
|
30
|
+
placeholder: J,
|
|
31
|
+
style: Q,
|
|
32
|
+
tabIndex: U,
|
|
33
33
|
value: f,
|
|
34
34
|
valid: z,
|
|
35
|
-
validationMessage:
|
|
36
|
-
validityStyles:
|
|
35
|
+
validationMessage: I,
|
|
36
|
+
validityStyles: P,
|
|
37
37
|
onChange: m,
|
|
38
38
|
onFocus: p,
|
|
39
39
|
onBlur: b,
|
|
@@ -42,44 +42,44 @@ const fe = se(), y = t.forwardRef((w, A) => {
|
|
|
42
42
|
touched: be,
|
|
43
43
|
modified: xe,
|
|
44
44
|
resizable: x,
|
|
45
|
-
...
|
|
46
|
-
} =
|
|
45
|
+
...W
|
|
46
|
+
} = l, a = t.useRef(null), T = t.useCallback(
|
|
47
47
|
() => {
|
|
48
48
|
a.current && a.current.focus();
|
|
49
49
|
},
|
|
50
50
|
[]
|
|
51
|
-
), [V, B] = t.useState(
|
|
51
|
+
), [V, B] = t.useState(L), [X, Y] = M(H), [Z, _] = M(F), o = f !== void 0, s = o ? f : V, i = t.useCallback(
|
|
52
52
|
() => ({
|
|
53
53
|
element: a,
|
|
54
54
|
focus: T,
|
|
55
55
|
get value() {
|
|
56
|
-
return
|
|
56
|
+
return s;
|
|
57
57
|
},
|
|
58
58
|
get name() {
|
|
59
59
|
return a.current && a.current.name;
|
|
60
60
|
}
|
|
61
61
|
}),
|
|
62
|
-
[T,
|
|
62
|
+
[T, s]
|
|
63
63
|
);
|
|
64
|
-
t.useImperativeHandle(
|
|
65
|
-
const [
|
|
64
|
+
t.useImperativeHandle(N, i);
|
|
65
|
+
const [ee, E] = t.useState("auto"), te = ue(), ae = de(a, l.dir), g = z !== void 0 ? z : c ? !!s : !0;
|
|
66
66
|
t.useEffect(
|
|
67
67
|
() => {
|
|
68
68
|
a.current && a.current.setCustomValidity && a.current.setCustomValidity(
|
|
69
|
-
g ? "" :
|
|
69
|
+
g ? "" : I || ""
|
|
70
70
|
);
|
|
71
71
|
},
|
|
72
|
-
[g,
|
|
73
|
-
),
|
|
72
|
+
[g, I]
|
|
73
|
+
), ce(
|
|
74
74
|
() => {
|
|
75
75
|
a.current && E(`${a.current.scrollHeight}px`);
|
|
76
76
|
},
|
|
77
|
-
[
|
|
77
|
+
[s]
|
|
78
78
|
);
|
|
79
|
-
const
|
|
79
|
+
const re = t.useCallback(
|
|
80
80
|
(n) => {
|
|
81
81
|
const v = n.target.value;
|
|
82
|
-
E("auto"), !
|
|
82
|
+
E("auto"), !o && !r && B(v), m && !r && h(
|
|
83
83
|
m,
|
|
84
84
|
n,
|
|
85
85
|
{
|
|
@@ -89,8 +89,8 @@ const fe = se(), y = t.forwardRef((w, A) => {
|
|
|
89
89
|
{ value: v }
|
|
90
90
|
);
|
|
91
91
|
},
|
|
92
|
-
[B, m, r,
|
|
93
|
-
),
|
|
92
|
+
[B, m, r, o]
|
|
93
|
+
), ne = t.useCallback(
|
|
94
94
|
(n) => {
|
|
95
95
|
p && !r && h(
|
|
96
96
|
p,
|
|
@@ -100,7 +100,7 @@ const fe = se(), y = t.forwardRef((w, A) => {
|
|
|
100
100
|
);
|
|
101
101
|
},
|
|
102
102
|
[p, r]
|
|
103
|
-
),
|
|
103
|
+
), le = t.useCallback(
|
|
104
104
|
(n) => {
|
|
105
105
|
b && !r && h(
|
|
106
106
|
b,
|
|
@@ -111,53 +111,53 @@ const fe = se(), y = t.forwardRef((w, A) => {
|
|
|
111
111
|
},
|
|
112
112
|
[b, r]
|
|
113
113
|
), oe = {
|
|
114
|
-
id:
|
|
114
|
+
id: K || te,
|
|
115
115
|
role: "textbox",
|
|
116
|
-
name:
|
|
117
|
-
className:
|
|
116
|
+
name: G,
|
|
117
|
+
className: O("k-input-inner", "!k-overflow-auto", { "k-resize": !C && x !== "none" }),
|
|
118
118
|
ref: a,
|
|
119
119
|
disabled: r,
|
|
120
|
-
rows:
|
|
121
|
-
placeholder:
|
|
122
|
-
readOnly:
|
|
120
|
+
rows: j,
|
|
121
|
+
placeholder: J,
|
|
122
|
+
readOnly: q,
|
|
123
123
|
required: c,
|
|
124
|
-
tabIndex:
|
|
125
|
-
style: C ? { resize: "none", overflow: "hidden", height:
|
|
126
|
-
"aria-labelledby":
|
|
127
|
-
"aria-describedby":
|
|
124
|
+
tabIndex: fe(U, r),
|
|
125
|
+
style: C ? { resize: "none", overflow: "hidden", height: ee } : x ? { resize: x } : {},
|
|
126
|
+
"aria-labelledby": $,
|
|
127
|
+
"aria-describedby": R,
|
|
128
128
|
"aria-multiline": !0,
|
|
129
129
|
"aria-disabled": r || void 0,
|
|
130
|
-
value:
|
|
131
|
-
...
|
|
132
|
-
onChange:
|
|
133
|
-
onFocus:
|
|
134
|
-
onBlur:
|
|
130
|
+
value: o ? f : V,
|
|
131
|
+
...W,
|
|
132
|
+
onChange: re,
|
|
133
|
+
onFocus: ne,
|
|
134
|
+
onBlur: le
|
|
135
135
|
};
|
|
136
136
|
return /* @__PURE__ */ t.createElement(
|
|
137
137
|
"span",
|
|
138
138
|
{
|
|
139
|
-
className:
|
|
139
|
+
className: O(
|
|
140
140
|
"k-input",
|
|
141
141
|
"k-textarea",
|
|
142
142
|
{
|
|
143
143
|
[`k-input-${S.sizeMap[u] || u}`]: u,
|
|
144
144
|
[`k-input-${k}`]: k,
|
|
145
145
|
[`k-rounded-${S.roundedMap[d] || d}`]: d,
|
|
146
|
-
"k-invalid": !(g ||
|
|
146
|
+
"k-invalid": !(g || P !== void 0 || P === !0),
|
|
147
147
|
"k-required": c,
|
|
148
148
|
"k-disabled": r
|
|
149
149
|
},
|
|
150
|
-
|
|
150
|
+
D
|
|
151
151
|
),
|
|
152
|
-
style:
|
|
153
|
-
dir:
|
|
152
|
+
style: Q,
|
|
153
|
+
dir: ae
|
|
154
154
|
},
|
|
155
|
-
|
|
155
|
+
l.prefix && /* @__PURE__ */ t.createElement(X, { ...Y }),
|
|
156
156
|
/* @__PURE__ */ t.createElement("textarea", { ...oe }),
|
|
157
|
-
|
|
157
|
+
l.suffix && /* @__PURE__ */ t.createElement(Z, { ..._ })
|
|
158
158
|
);
|
|
159
159
|
});
|
|
160
|
-
|
|
160
|
+
w.propTypes = {
|
|
161
161
|
ariaDescribedBy: e.string,
|
|
162
162
|
ariaLabelledBy: e.string,
|
|
163
163
|
autoSize: e.bool,
|
|
@@ -185,14 +185,13 @@ y.propTypes = {
|
|
|
185
185
|
fillMode: e.oneOf([null, "solid", "flat", "outline"]),
|
|
186
186
|
resizable: e.oneOf(["none", "both", "horizontal", "vertical"])
|
|
187
187
|
};
|
|
188
|
-
const
|
|
188
|
+
const y = {
|
|
189
189
|
size: "medium",
|
|
190
190
|
rounded: "medium",
|
|
191
191
|
fillMode: "solid"
|
|
192
192
|
};
|
|
193
|
-
|
|
194
|
-
y.defaultProps = me;
|
|
193
|
+
w.displayName = "KendoTextArea";
|
|
195
194
|
export {
|
|
196
|
-
|
|
197
|
-
|
|
195
|
+
w as TextArea,
|
|
196
|
+
me as TextAreaPropsContext
|
|
198
197
|
};
|
package/textbox/Textbox.js
CHANGED
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
8
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const E=require("react"),d=require("prop-types"),l=require("@progress/kendo-react-common"),F=require("../package-metadata.js");function P(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const a=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,a.get?a:{enumerable:!0,get:()=>e[n]})}}return r.default=e,Object.freeze(r)}const t=P(E),f=t.forwardRef((e,r)=>{l.validatePackage(F.packageMetadata);const n=t.useRef(null),a=t.useRef(null),s=t.useRef(),v=t.useCallback(()=>{var u;return s.current!==void 0?s.current:(u=n.current)==null?void 0:u.value},[]);t.useImperativeHandle(a,()=>({get element(){return n.current},get name(){return n.current&&n.current.name},get value(){return v()}})),t.useImperativeHandle(r,()=>a.current);const{size:c=o.size,fillMode:m=o.fillMode,rounded:i=o.rounded,className:k,dir:p,style:x,prefix:h=o.prefix,suffix:C=o.suffix,valid:q,modified:z,touched:N,visited:j,...b}=e,[y]=l.useCustomComponent(h),[M]=l.useCustomComponent(C),[_,g]=t.useState(!1),B=u=>{g(!0)},O=u=>{g(!1)},R=t.useCallback(u=>{s.current=u.target.value,e.onChange&&e.onChange.call(void 0,{syntheticEvent:u,nativeEvent:u.nativeEvent,value:u.target.value,target:a.current}),s.current=void 0},[e.onChange]),{onFocus:T,onBlur:S}=l.useAsyncFocusBlur({onFocus:B,onBlur:O,onSyncFocus:e.onFocus,onSyncBlur:e.onBlur});return t.createElement("span",{style:x,dir:p,className:l.classNames("k-textbox k-input",{[`k-input-${l.kendoThemeMaps.sizeMap[c]||c}`]:c,[`k-input-${m}`]:m,[`k-rounded-${l.kendoThemeMaps.roundedMap[i]||i}`]:i},{"k-focus":_,"k-required":e.required,"k-disabled":e.disabled,"k-invalid":e.valid===!1},k),onFocus:T,onBlur:S},t.createElement(y,null),t.createElement("input",{ref:n,className:"k-input-inner",...b,onChange:R}),t.createElement(M,null))}),o={prefix:e=>null,suffix:e=>null,size:"medium",rounded:"medium",fillMode:"solid"};f.propTypes={size:d.oneOf([null,"small","medium","large"]),rounded:d.oneOf([null,"small","medium","large","full"]),fillMode:d.oneOf([null,"solid","flat","outline"])};f.displayName="KendoReactTextBoxComponent";exports.TextBox=f;
|
package/textbox/Textbox.mjs
CHANGED
|
@@ -7,20 +7,20 @@
|
|
|
7
7
|
*/
|
|
8
8
|
"use client";
|
|
9
9
|
import * as e from "react";
|
|
10
|
-
import
|
|
11
|
-
import { validatePackage as T, useCustomComponent as
|
|
10
|
+
import i from "prop-types";
|
|
11
|
+
import { validatePackage as T, useCustomComponent as f, useAsyncFocusBlur as P, classNames as S, kendoThemeMaps as m } from "@progress/kendo-react-common";
|
|
12
12
|
import { packageMetadata as O } from "../package-metadata.mjs";
|
|
13
|
-
const
|
|
13
|
+
const v = e.forwardRef((n, g) => {
|
|
14
14
|
T(O);
|
|
15
|
-
const u = e.useRef(null),
|
|
15
|
+
const u = e.useRef(null), a = e.useRef(null), r = e.useRef(), k = e.useCallback(
|
|
16
16
|
() => {
|
|
17
17
|
var t;
|
|
18
|
-
return
|
|
18
|
+
return r.current !== void 0 ? r.current : (t = u.current) == null ? void 0 : t.value;
|
|
19
19
|
},
|
|
20
20
|
[]
|
|
21
21
|
);
|
|
22
22
|
e.useImperativeHandle(
|
|
23
|
-
|
|
23
|
+
a,
|
|
24
24
|
() => ({
|
|
25
25
|
get element() {
|
|
26
26
|
return u.current;
|
|
@@ -34,38 +34,38 @@ const c = e.forwardRef((n, g) => {
|
|
|
34
34
|
})
|
|
35
35
|
), e.useImperativeHandle(
|
|
36
36
|
g,
|
|
37
|
-
() =>
|
|
37
|
+
() => a.current
|
|
38
38
|
);
|
|
39
39
|
const {
|
|
40
|
-
size:
|
|
41
|
-
fillMode: d,
|
|
42
|
-
rounded:
|
|
40
|
+
size: o = l.size,
|
|
41
|
+
fillMode: d = l.fillMode,
|
|
42
|
+
rounded: s = l.rounded,
|
|
43
43
|
className: x,
|
|
44
44
|
dir: h,
|
|
45
45
|
style: p,
|
|
46
|
-
prefix: C =
|
|
47
|
-
suffix: y =
|
|
46
|
+
prefix: C = l.prefix,
|
|
47
|
+
suffix: y = l.suffix,
|
|
48
48
|
valid: $,
|
|
49
49
|
// Destruct to avoid warning when used inside a form field
|
|
50
50
|
modified: q,
|
|
51
51
|
touched: H,
|
|
52
52
|
visited: I,
|
|
53
53
|
...B
|
|
54
|
-
} = n, [
|
|
55
|
-
|
|
54
|
+
} = n, [M] = f(C), [E] = f(y), [F, c] = e.useState(!1), R = (t) => {
|
|
55
|
+
c(!0);
|
|
56
56
|
}, _ = (t) => {
|
|
57
|
-
|
|
57
|
+
c(!1);
|
|
58
58
|
}, b = e.useCallback(
|
|
59
59
|
(t) => {
|
|
60
|
-
|
|
60
|
+
r.current = t.target.value, n.onChange && n.onChange.call(void 0, {
|
|
61
61
|
syntheticEvent: t,
|
|
62
62
|
nativeEvent: t.nativeEvent,
|
|
63
63
|
value: t.target.value,
|
|
64
|
-
target:
|
|
65
|
-
}),
|
|
64
|
+
target: a.current
|
|
65
|
+
}), r.current = void 0;
|
|
66
66
|
},
|
|
67
67
|
[n.onChange]
|
|
68
|
-
), { onFocus:
|
|
68
|
+
), { onFocus: z, onBlur: N } = P({
|
|
69
69
|
onFocus: R,
|
|
70
70
|
onBlur: _,
|
|
71
71
|
onSyncFocus: n.onFocus,
|
|
@@ -79,22 +79,22 @@ const c = e.forwardRef((n, g) => {
|
|
|
79
79
|
className: S(
|
|
80
80
|
"k-textbox k-input",
|
|
81
81
|
{
|
|
82
|
-
[`k-input-${
|
|
82
|
+
[`k-input-${m.sizeMap[o] || o}`]: o,
|
|
83
83
|
[`k-input-${d}`]: d,
|
|
84
|
-
[`k-rounded-${
|
|
84
|
+
[`k-rounded-${m.roundedMap[s] || s}`]: s
|
|
85
85
|
},
|
|
86
86
|
{
|
|
87
|
-
"k-focus":
|
|
87
|
+
"k-focus": F,
|
|
88
88
|
"k-required": n.required,
|
|
89
89
|
"k-disabled": n.disabled,
|
|
90
90
|
"k-invalid": n.valid === !1
|
|
91
91
|
},
|
|
92
92
|
x
|
|
93
93
|
),
|
|
94
|
-
onFocus:
|
|
95
|
-
onBlur:
|
|
94
|
+
onFocus: z,
|
|
95
|
+
onBlur: N
|
|
96
96
|
},
|
|
97
|
-
/* @__PURE__ */ e.createElement(
|
|
97
|
+
/* @__PURE__ */ e.createElement(M, null),
|
|
98
98
|
/* @__PURE__ */ e.createElement(
|
|
99
99
|
"input",
|
|
100
100
|
{
|
|
@@ -104,22 +104,21 @@ const c = e.forwardRef((n, g) => {
|
|
|
104
104
|
onChange: b
|
|
105
105
|
}
|
|
106
106
|
),
|
|
107
|
-
/* @__PURE__ */ e.createElement(
|
|
107
|
+
/* @__PURE__ */ e.createElement(E, null)
|
|
108
108
|
);
|
|
109
|
-
}),
|
|
109
|
+
}), l = {
|
|
110
110
|
prefix: (n) => null,
|
|
111
111
|
suffix: (n) => null,
|
|
112
112
|
size: "medium",
|
|
113
113
|
rounded: "medium",
|
|
114
114
|
fillMode: "solid"
|
|
115
115
|
};
|
|
116
|
-
|
|
117
|
-
size:
|
|
118
|
-
rounded:
|
|
119
|
-
fillMode:
|
|
116
|
+
v.propTypes = {
|
|
117
|
+
size: i.oneOf([null, "small", "medium", "large"]),
|
|
118
|
+
rounded: i.oneOf([null, "small", "medium", "large", "full"]),
|
|
119
|
+
fillMode: i.oneOf([null, "solid", "flat", "outline"])
|
|
120
120
|
};
|
|
121
|
-
|
|
122
|
-
c.defaultProps = i;
|
|
121
|
+
v.displayName = "KendoReactTextBoxComponent";
|
|
123
122
|
export {
|
|
124
|
-
|
|
123
|
+
v as TextBox
|
|
125
124
|
};
|