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