@progress/kendo-react-inputs 14.5.0-develop.14 → 14.5.0-develop.16
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 +64 -64
- package/colors/ColorGradient.js +1 -1
- package/colors/ColorGradient.mjs +74 -72
- package/colors/ColorInput.js +1 -1
- package/colors/ColorInput.mjs +57 -45
- package/colors/ColorPalette.js +1 -1
- package/colors/ColorPalette.mjs +84 -81
- package/colors/ColorPicker.js +1 -1
- package/colors/ColorPicker.mjs +162 -160
- package/colors/FlatColorPicker.js +1 -1
- package/colors/FlatColorPicker.mjs +86 -94
- package/dist/cdn/js/kendo-react-inputs.js +1 -1
- package/messages/index.d.ts +55 -0
- package/messages/index.js +1 -1
- package/messages/index.mjs +82 -60
- package/numerictextbox/NumericTextBox.js +1 -1
- package/numerictextbox/NumericTextBox.mjs +115 -115
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -2
- package/package.json +10 -10
- package/radiobutton/RadioButton.js +1 -1
- package/radiobutton/RadioButton.mjs +23 -20
- package/radiobutton/interfaces/RadioButtonProps.d.ts +7 -0
- package/range-slider/RangeSlider.d.ts +8 -0
- package/range-slider/RangeSlider.js +11 -11
- package/range-slider/RangeSlider.mjs +189 -186
- package/rating/Rating.js +2 -2
- package/rating/Rating.mjs +3 -3
- package/signature/Signature.js +1 -1
- package/signature/Signature.mjs +80 -84
- package/slider/Slider.js +1 -1
- package/slider/Slider.mjs +139 -131
- package/slider/SliderLabel.js +1 -1
- package/slider/SliderLabel.mjs +3 -2
- package/switch/Switch.js +1 -1
- package/switch/Switch.mjs +52 -54
- package/textarea/TextArea.js +1 -1
- package/textarea/TextArea.mjs +29 -31
package/switch/Switch.mjs
CHANGED
|
@@ -5,11 +5,11 @@
|
|
|
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 { useState as H, useRef as
|
|
8
|
+
import * as l from "react";
|
|
9
|
+
import { useState as H, useRef as d, useMemo as E, useEffect as M, useCallback as m, useImperativeHandle as V } from "react";
|
|
10
10
|
import t from "prop-types";
|
|
11
|
-
import { withIdHOC as
|
|
12
|
-
import { LocalizationService as
|
|
11
|
+
import { withIdHOC as le, withPropsContext as de, noop as B, dispatchEvent as se, subscribeToKendoPaste as oe, Keys as W, useWebMcpRegister as ue, classNames as N, kendoThemeMaps as x, getTabIndex as fe, createPropsContext as me } from "@progress/kendo-react-common";
|
|
12
|
+
import { LocalizationService as be, useLocalization as he } from "@progress/kendo-react-intl";
|
|
13
13
|
import { switchValidation as $, messages as A, switchAriaLabel as j } from "../messages/index.mjs";
|
|
14
14
|
const c = {
|
|
15
15
|
disabled: !1,
|
|
@@ -18,11 +18,11 @@ const c = {
|
|
|
18
18
|
trackRounded: void 0,
|
|
19
19
|
thumbRounded: void 0,
|
|
20
20
|
offLabel: "OFF",
|
|
21
|
-
onBlur:
|
|
22
|
-
onFocus:
|
|
21
|
+
onBlur: B,
|
|
22
|
+
onFocus: B,
|
|
23
23
|
onLabel: "ON",
|
|
24
24
|
validityStyles: !0
|
|
25
|
-
}, G =
|
|
25
|
+
}, G = l.forwardRef((e, Q) => {
|
|
26
26
|
var T;
|
|
27
27
|
const {
|
|
28
28
|
disabled: r = c.disabled,
|
|
@@ -30,11 +30,11 @@ const c = {
|
|
|
30
30
|
size: k = c.size,
|
|
31
31
|
trackRounded: w = c.trackRounded,
|
|
32
32
|
thumbRounded: C = c.thumbRounded,
|
|
33
|
-
offLabel:
|
|
33
|
+
offLabel: I = c.offLabel,
|
|
34
34
|
onBlur: R = c.onBlur,
|
|
35
35
|
onFocus: L = c.onFocus,
|
|
36
|
-
onLabel:
|
|
37
|
-
} = e, [
|
|
36
|
+
onLabel: z = c.onLabel
|
|
37
|
+
} = e, [F, X] = H(U || !1), [Y, D] = H(!1), s = d(null), o = d(null), h = d(null), v = d(void 0), S = d(!1), K = d(void 0), O = E(() => new be(), []), Z = he(), n = E(() => v.current !== void 0 ? v.current : e.checked !== void 0 ? e.checked : F, [e.checked, F]), b = E(() => {
|
|
38
38
|
var y, q;
|
|
39
39
|
const a = e.validationMessage !== void 0, i = (y = e.valid) != null ? y : e.required ? !!n : !0, g = (q = e.valid) != null ? q : i;
|
|
40
40
|
return {
|
|
@@ -42,14 +42,14 @@ const c = {
|
|
|
42
42
|
valid: g,
|
|
43
43
|
valueMissing: n === null
|
|
44
44
|
};
|
|
45
|
-
}, [e.valid, e.validationMessage, e.required, n]),
|
|
46
|
-
|
|
45
|
+
}, [e.valid, e.validationMessage, e.required, n]), _ = (T = e.validityStyles) != null ? T : c.validityStyles;
|
|
46
|
+
M(() => {
|
|
47
47
|
var a;
|
|
48
48
|
(a = h.current) != null && a.setCustomValidity && h.current.setCustomValidity(
|
|
49
|
-
b.valid ? "" : e.validationMessage ||
|
|
49
|
+
b.valid ? "" : e.validationMessage || O.toLanguageString($, A[$])
|
|
50
50
|
);
|
|
51
|
-
}, [b, e.validationMessage,
|
|
52
|
-
s.current && (
|
|
51
|
+
}, [b, e.validationMessage, O]), M(() => {
|
|
52
|
+
s.current && (K.current = e.dir || getComputedStyle(s.current).direction || void 0);
|
|
53
53
|
}, [e.dir]);
|
|
54
54
|
const u = m(() => ({
|
|
55
55
|
props: e,
|
|
@@ -74,7 +74,7 @@ const c = {
|
|
|
74
74
|
}
|
|
75
75
|
}), [e, n, b]), f = m(
|
|
76
76
|
(a, i) => {
|
|
77
|
-
X(a), v.current = a,
|
|
77
|
+
X(a), v.current = a, se(
|
|
78
78
|
e.onChange,
|
|
79
79
|
i,
|
|
80
80
|
{ ...u(), value: a },
|
|
@@ -83,8 +83,8 @@ const c = {
|
|
|
83
83
|
},
|
|
84
84
|
[e.onChange, u]
|
|
85
85
|
);
|
|
86
|
-
|
|
87
|
-
const a = e.name || e.id, i =
|
|
86
|
+
M(() => {
|
|
87
|
+
const a = e.name || e.id, i = oe(o.current, {
|
|
88
88
|
fieldName: a,
|
|
89
89
|
onValueChange: (g) => {
|
|
90
90
|
if (g !== n) {
|
|
@@ -101,7 +101,7 @@ const c = {
|
|
|
101
101
|
i == null || i.unsubscribe();
|
|
102
102
|
};
|
|
103
103
|
}, [e.name, e.id, n, f]);
|
|
104
|
-
const
|
|
104
|
+
const p = m(
|
|
105
105
|
(a) => {
|
|
106
106
|
if (a.target === h.current) {
|
|
107
107
|
if (S.current) {
|
|
@@ -113,7 +113,7 @@ const c = {
|
|
|
113
113
|
f(!n, a);
|
|
114
114
|
},
|
|
115
115
|
[n, f]
|
|
116
|
-
),
|
|
116
|
+
), ee = m(
|
|
117
117
|
(a) => {
|
|
118
118
|
if (r)
|
|
119
119
|
return;
|
|
@@ -121,47 +121,45 @@ const c = {
|
|
|
121
121
|
(i === W.space || i === W.enter) && (f(!n, a), a.preventDefault());
|
|
122
122
|
},
|
|
123
123
|
[r, n, f]
|
|
124
|
-
),
|
|
124
|
+
), te = m(
|
|
125
125
|
(a) => {
|
|
126
|
-
r || (
|
|
126
|
+
r || (D(!0), L && L(a));
|
|
127
127
|
},
|
|
128
128
|
[r, L]
|
|
129
|
-
),
|
|
129
|
+
), ae = m(
|
|
130
130
|
(a) => {
|
|
131
|
-
r || (
|
|
131
|
+
r || (D(!1), R && R(a));
|
|
132
132
|
},
|
|
133
133
|
[r, R]
|
|
134
134
|
);
|
|
135
135
|
V(Q, u, [u]);
|
|
136
|
-
const P =
|
|
137
|
-
V(P, u, [u]),
|
|
138
|
-
const
|
|
136
|
+
const P = d(null);
|
|
137
|
+
V(P, u, [u]), ue("switch", P, e, e.webMcp);
|
|
138
|
+
const ne = K.current || e.dir || s.current && getComputedStyle(s.current).direction || void 0, ie = !_ || b.valid, ce = N(
|
|
139
139
|
"k-switch",
|
|
140
140
|
{
|
|
141
|
-
[`k-switch-${
|
|
141
|
+
[`k-switch-${x.sizeMap[k] || k}`]: k,
|
|
142
142
|
"k-switch-on": n,
|
|
143
143
|
"k-switch-off": !n,
|
|
144
144
|
"k-focus": Y,
|
|
145
145
|
"k-disabled": r,
|
|
146
|
-
"k-invalid": !
|
|
146
|
+
"k-invalid": !ie
|
|
147
147
|
},
|
|
148
148
|
e.className
|
|
149
|
-
),
|
|
149
|
+
), re = /* @__PURE__ */ l.createElement(
|
|
150
150
|
"input",
|
|
151
151
|
{
|
|
152
152
|
type: "checkbox",
|
|
153
153
|
checked: e.checked,
|
|
154
154
|
ref: h,
|
|
155
155
|
tabIndex: -1,
|
|
156
|
-
"aria-hidden": !0,
|
|
157
|
-
"aria-label": e.ariaLabel || E.toLanguageString(j, A[j]),
|
|
158
156
|
value: n,
|
|
159
157
|
style: { opacity: 0, width: 1, border: 0, zIndex: -1, position: "absolute", left: "50%" },
|
|
160
|
-
onChange:
|
|
158
|
+
onChange: B,
|
|
161
159
|
name: e.name || void 0
|
|
162
160
|
}
|
|
163
161
|
);
|
|
164
|
-
return /* @__PURE__ */
|
|
162
|
+
return /* @__PURE__ */ l.createElement(
|
|
165
163
|
"span",
|
|
166
164
|
{
|
|
167
165
|
ref: o,
|
|
@@ -170,44 +168,44 @@ const c = {
|
|
|
170
168
|
"aria-disabled": r || void 0,
|
|
171
169
|
"aria-labelledby": e.ariaLabelledBy,
|
|
172
170
|
"aria-describedby": e.ariaDescribedBy,
|
|
173
|
-
"aria-label": e.ariaLabel,
|
|
171
|
+
"aria-label": e.ariaLabel || Z.toLanguageString(j, A[j]),
|
|
174
172
|
"aria-required": e.required,
|
|
175
|
-
className:
|
|
176
|
-
dir:
|
|
177
|
-
onKeyDown:
|
|
178
|
-
onClick:
|
|
179
|
-
onBlur:
|
|
180
|
-
onFocus:
|
|
181
|
-
tabIndex:
|
|
173
|
+
className: ce,
|
|
174
|
+
dir: ne,
|
|
175
|
+
onKeyDown: ee,
|
|
176
|
+
onClick: p,
|
|
177
|
+
onBlur: ae,
|
|
178
|
+
onFocus: te,
|
|
179
|
+
tabIndex: fe(e.tabIndex, r, void 0),
|
|
182
180
|
accessKey: e.accessKey,
|
|
183
181
|
id: e.id
|
|
184
182
|
},
|
|
185
|
-
/* @__PURE__ */
|
|
183
|
+
/* @__PURE__ */ l.createElement(
|
|
186
184
|
"span",
|
|
187
185
|
{
|
|
188
|
-
className:
|
|
189
|
-
[`k-rounded-${
|
|
186
|
+
className: N("k-switch-track", {
|
|
187
|
+
[`k-rounded-${x.roundedMap[w] || w}`]: w
|
|
190
188
|
}),
|
|
191
189
|
ref: s
|
|
192
190
|
},
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
191
|
+
re,
|
|
192
|
+
z ? /* @__PURE__ */ l.createElement("span", { className: "k-switch-label-on" }, z) : "",
|
|
193
|
+
I ? /* @__PURE__ */ l.createElement("span", { className: "k-switch-label-off" }, I) : ""
|
|
196
194
|
),
|
|
197
|
-
/* @__PURE__ */
|
|
195
|
+
/* @__PURE__ */ l.createElement("span", { className: "k-switch-thumb-wrap" }, /* @__PURE__ */ l.createElement(
|
|
198
196
|
"span",
|
|
199
197
|
{
|
|
200
|
-
className:
|
|
201
|
-
[`k-rounded-${
|
|
198
|
+
className: N("k-switch-thumb", {
|
|
199
|
+
[`k-rounded-${x.roundedMap[C] || C}`]: C
|
|
202
200
|
})
|
|
203
201
|
}
|
|
204
202
|
))
|
|
205
203
|
);
|
|
206
204
|
});
|
|
207
205
|
G.displayName = "Switch";
|
|
208
|
-
const
|
|
206
|
+
const ve = me(), J = le(
|
|
209
207
|
de(
|
|
210
|
-
|
|
208
|
+
ve,
|
|
211
209
|
G
|
|
212
210
|
)
|
|
213
211
|
);
|
|
@@ -242,6 +240,6 @@ J.propTypes = {
|
|
|
242
240
|
};
|
|
243
241
|
export {
|
|
244
242
|
J as Switch,
|
|
245
|
-
|
|
243
|
+
ve as SwitchPropsContext,
|
|
246
244
|
G as SwitchWithoutContext
|
|
247
245
|
};
|
package/textarea/TextArea.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 ge=require("react"),e=require("prop-types"),
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const ge=require("react"),e=require("prop-types"),n=require("@progress/kendo-react-common");function ve(l){const c=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(l){for(const o in l)if(o!=="default"){const i=Object.getOwnPropertyDescriptor(l,o);Object.defineProperty(c,o,i.get?i:{enumerable:!0,get:()=>l[o]})}}return c.default=l,Object.freeze(c)}const t=ve(ge),K=n.createPropsContext(),T=t.forwardRef((l,c)=>{const o=n.usePropsContext(K,l),{size:i=m.size,rounded:x=m.rounded,fillMode:S=m.fillMode,autoFocus:L=m.autoFocus,flow:h=m.flow,prefix:_=null,suffix:W=null,ariaDescribedBy:G,ariaLabelledBy:J,autoSize:p,className:Q,defaultValue:U,disabled:s,readOnly:X,required:b,rows:Y,id:M,name:w,placeholder:Z,style:ee,tabIndex:te,value:y,valid:E,validationMessage:F,validityStyles:I,onChange:k,onFocus:C,onBlur:z,visited:xe,touched:he,modified:ye,resizable:d,inputAttributes:ae,textareaStyle:V,...ne}=o,a=t.useRef(null),A=t.useCallback(()=>{a.current&&a.current.focus()},[]),N=t.useCallback(()=>{a.current&&a.current.blur()},[]),[B,R]=t.useState(U),[re,j]=t.useState(!1),[oe,se]=n.useCustomComponent(_),[le,ue]=n.useCustomComponent(W),g=y!==void 0,v=g?y:B,q=w||M,u=t.useCallback(()=>({element:a,focus:A,blur:N,get value(){return v},get name(){return a.current&&a.current.name}}),[N,A,v]);t.useImperativeHandle(c,u);const H=t.useRef(null);t.useImperativeHandle(H,u),n.useWebMcpRegister("textarea",H,o,o.webMcp);const[D,$]=t.useState("auto"),ie=n.useId(),ce=n.useDir(a,o.dir),O=E!==void 0?E:b?!!v:!0;t.useEffect(()=>{a.current&&a.current.setCustomValidity&&a.current.setCustomValidity(O?"":F||"")},[O,F]),n.useIsomorphicLayoutEffect(()=>{a.current&&$(`${a.current.scrollHeight}px`)},[v]);const P=t.useCallback(r=>{const f=r.target.value;$("auto"),!g&&!s&&R(f),k&&!s&&n.dispatchEvent(k,r,{...u(),value:f},{value:f})},[R,k,s,g]),de=t.useCallback(r=>{j(!0),C&&!s&&n.dispatchEvent(C,r,u(),void 0)},[C,s,u]),fe=t.useCallback(r=>{j(!1),z&&!s&&n.dispatchEvent(z,r,u(),void 0)},[z,s,u]),me=t.useCallback(r=>{a.current&&(a.current.value=r);const f={target:a.current,currentTarget:a.current};P(f)},[P]);n.useKendoPaste(a,{fieldName:q,onValueChange:me,enabled:!!q});const pe=t.useMemo(()=>{let r={};return p?r={resize:"none",overflow:"hidden",height:D}:d&&(r={resize:d}),{...r,...V}},[p,d,D,V]),be={id:M||ie,name:w,className:n.classNames("k-input-inner","!k-overflow-auto",{"k-resize":!p&&d!=="none","k-resize-none":p||d==="none","!k-flex-none":h==="vertical"}),ref:a,disabled:s,rows:Y,placeholder:Z,readOnly:X,required:b,tabIndex:n.getTabIndex(te,s),autoFocus:L,style:pe,"aria-labelledby":J,"aria-describedby":G,"aria-disabled":s||void 0,"aria-required":b,value:g?y:B,...Object.assign({},ne,ae),onChange:P,onFocus:de,onBlur:fe};return t.createElement("span",{className:n.classNames("k-input","k-textarea",{[`k-input-${n.kendoThemeMaps.sizeMap[i]||i}`]:i,[`k-input-${S}`]:S,[`k-rounded-${n.kendoThemeMaps.roundedMap[x]||x}`]:x,"k-invalid":!(O||I!==void 0||I===!0),"k-required":b,"k-disabled":s,"k-focus":re,"!k-flex-col":h==="vertical","!k-flex-row":h==="horizontal"},Q),style:ee,dir:ce},o.prefix&&t.createElement(oe,{...se}),t.createElement("textarea",{...be}),o.suffix&&t.createElement(le,{...ue}))});T.propTypes={ariaDescribedBy:e.string,ariaLabelledBy:e.string,autoSize:e.bool,className:e.string,defaultValue:e.string,dir:e.string,disabled:e.bool,readOnly:e.bool,rows:e.number,id:e.string,name:e.string,placeholder:e.string,style:e.object,tabIndex:e.number,value:e.oneOfType([e.string,e.arrayOf(e.string),e.number]),onChange:e.func,onFocus:e.func,onBlur:e.func,size:e.oneOf(["small","medium","large"]),rounded:e.oneOf(["small","medium","large","full","none"]),fillMode:e.oneOf(["solid","flat","outline"]),resizable:e.oneOf(["none","both","horizontal","vertical"]),autoFocus:e.bool,flow:e.oneOf(["vertical","horizontal"])};const m={size:void 0,rounded:void 0,fillMode:void 0,autoFocus:!1,flow:"horizontal"};T.displayName="KendoTextArea";exports.TextArea=T;exports.TextAreaPropsContext=K;
|
package/textarea/TextArea.mjs
CHANGED
|
@@ -7,14 +7,14 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import * as t from "react";
|
|
9
9
|
import e from "prop-types";
|
|
10
|
-
import { usePropsContext as
|
|
10
|
+
import { usePropsContext as xe, useCustomComponent as q, useWebMcpRegister as he, useId as ye, useDir as ke, useIsomorphicLayoutEffect as Ce, dispatchEvent as z, useKendoPaste as ze, getTabIndex as we, classNames as D, kendoThemeMaps as K, createPropsContext as Pe } from "@progress/kendo-react-common";
|
|
11
11
|
const Fe = Pe(), L = t.forwardRef((j, W) => {
|
|
12
|
-
const s =
|
|
13
|
-
size: p =
|
|
14
|
-
rounded: b =
|
|
15
|
-
fillMode: w =
|
|
16
|
-
autoFocus: G =
|
|
17
|
-
flow:
|
|
12
|
+
const s = xe(Fe, j), {
|
|
13
|
+
size: p = i.size,
|
|
14
|
+
rounded: b = i.rounded,
|
|
15
|
+
fillMode: w = i.fillMode,
|
|
16
|
+
autoFocus: G = i.autoFocus,
|
|
17
|
+
flow: v = i.flow,
|
|
18
18
|
prefix: J = null,
|
|
19
19
|
suffix: Q = null,
|
|
20
20
|
ariaDescribedBy: U,
|
|
@@ -31,11 +31,11 @@ const Fe = Pe(), L = t.forwardRef((j, W) => {
|
|
|
31
31
|
placeholder: te,
|
|
32
32
|
style: ae,
|
|
33
33
|
tabIndex: re,
|
|
34
|
-
value:
|
|
34
|
+
value: g,
|
|
35
35
|
valid: I,
|
|
36
36
|
validationMessage: M,
|
|
37
37
|
validityStyles: S,
|
|
38
|
-
onChange:
|
|
38
|
+
onChange: x,
|
|
39
39
|
onFocus: h,
|
|
40
40
|
onBlur: y,
|
|
41
41
|
// Removed to support direct use in Form Field component
|
|
@@ -50,7 +50,7 @@ const Fe = Pe(), L = t.forwardRef((j, W) => {
|
|
|
50
50
|
a.current && a.current.focus();
|
|
51
51
|
}, []), E = t.useCallback(() => {
|
|
52
52
|
a.current && a.current.blur();
|
|
53
|
-
}, []), [O, B] = t.useState(Z), [se, A] = t.useState(!1), [le,
|
|
53
|
+
}, []), [O, B] = t.useState(Z), [se, A] = t.useState(!1), [le, ue] = q(J), [ie, ce] = q(Q), f = g !== void 0, m = f ? g : O, N = F || P, n = t.useCallback(() => ({
|
|
54
54
|
element: a,
|
|
55
55
|
focus: V,
|
|
56
56
|
blur: E,
|
|
@@ -72,18 +72,18 @@ const Fe = Pe(), L = t.forwardRef((j, W) => {
|
|
|
72
72
|
}, [m]);
|
|
73
73
|
const C = t.useCallback(
|
|
74
74
|
(r) => {
|
|
75
|
-
const
|
|
76
|
-
$("auto"), !f && !o && B(
|
|
77
|
-
|
|
75
|
+
const u = r.target.value;
|
|
76
|
+
$("auto"), !f && !o && B(u), x && !o && z(
|
|
77
|
+
x,
|
|
78
78
|
r,
|
|
79
79
|
{
|
|
80
80
|
...n(),
|
|
81
|
-
value:
|
|
81
|
+
value: u
|
|
82
82
|
},
|
|
83
|
-
{ value:
|
|
83
|
+
{ value: u }
|
|
84
84
|
);
|
|
85
85
|
},
|
|
86
|
-
[B,
|
|
86
|
+
[B, x, o, f]
|
|
87
87
|
), me = t.useCallback(
|
|
88
88
|
(r) => {
|
|
89
89
|
A(!0), h && !o && z(h, r, n(), void 0);
|
|
@@ -97,11 +97,11 @@ const Fe = Pe(), L = t.forwardRef((j, W) => {
|
|
|
97
97
|
), be = t.useCallback(
|
|
98
98
|
(r) => {
|
|
99
99
|
a.current && (a.current.value = r);
|
|
100
|
-
const
|
|
100
|
+
const u = {
|
|
101
101
|
target: a.current,
|
|
102
102
|
currentTarget: a.current
|
|
103
103
|
};
|
|
104
|
-
C(
|
|
104
|
+
C(u);
|
|
105
105
|
},
|
|
106
106
|
[C]
|
|
107
107
|
);
|
|
@@ -110,7 +110,7 @@ const Fe = Pe(), L = t.forwardRef((j, W) => {
|
|
|
110
110
|
onValueChange: be,
|
|
111
111
|
enabled: !!N
|
|
112
112
|
});
|
|
113
|
-
const
|
|
113
|
+
const ve = t.useMemo(() => {
|
|
114
114
|
let r = {};
|
|
115
115
|
return c ? r = {
|
|
116
116
|
resize: "none",
|
|
@@ -120,14 +120,13 @@ const Fe = Pe(), L = t.forwardRef((j, W) => {
|
|
|
120
120
|
...r,
|
|
121
121
|
...T
|
|
122
122
|
};
|
|
123
|
-
}, [c, l, H, T]),
|
|
123
|
+
}, [c, l, H, T]), ge = {
|
|
124
124
|
id: P || de,
|
|
125
|
-
role: "textbox",
|
|
126
125
|
name: F,
|
|
127
126
|
className: D("k-input-inner", "!k-overflow-auto", {
|
|
128
127
|
"k-resize": !c && l !== "none",
|
|
129
128
|
"k-resize-none": c || l === "none",
|
|
130
|
-
"!k-flex-none":
|
|
129
|
+
"!k-flex-none": v === "vertical"
|
|
131
130
|
}),
|
|
132
131
|
ref: a,
|
|
133
132
|
disabled: o,
|
|
@@ -137,13 +136,12 @@ const Fe = Pe(), L = t.forwardRef((j, W) => {
|
|
|
137
136
|
required: d,
|
|
138
137
|
tabIndex: we(re, o),
|
|
139
138
|
autoFocus: G,
|
|
140
|
-
style:
|
|
139
|
+
style: ve,
|
|
141
140
|
"aria-labelledby": X,
|
|
142
141
|
"aria-describedby": U,
|
|
143
|
-
"aria-multiline": !0,
|
|
144
142
|
"aria-disabled": o || void 0,
|
|
145
143
|
"aria-required": d,
|
|
146
|
-
value: f ?
|
|
144
|
+
value: f ? g : O,
|
|
147
145
|
...Object.assign({}, ne, oe),
|
|
148
146
|
onChange: C,
|
|
149
147
|
onFocus: me,
|
|
@@ -163,17 +161,17 @@ const Fe = Pe(), L = t.forwardRef((j, W) => {
|
|
|
163
161
|
"k-required": d,
|
|
164
162
|
"k-disabled": o,
|
|
165
163
|
"k-focus": se,
|
|
166
|
-
"!k-flex-col":
|
|
167
|
-
"!k-flex-row":
|
|
164
|
+
"!k-flex-col": v === "vertical",
|
|
165
|
+
"!k-flex-row": v === "horizontal"
|
|
168
166
|
},
|
|
169
167
|
Y
|
|
170
168
|
),
|
|
171
169
|
style: ae,
|
|
172
170
|
dir: fe
|
|
173
171
|
},
|
|
174
|
-
s.prefix && /* @__PURE__ */ t.createElement(le, { ...
|
|
175
|
-
/* @__PURE__ */ t.createElement("textarea", { ...
|
|
176
|
-
s.suffix && /* @__PURE__ */ t.createElement(
|
|
172
|
+
s.prefix && /* @__PURE__ */ t.createElement(le, { ...ue }),
|
|
173
|
+
/* @__PURE__ */ t.createElement("textarea", { ...ge }),
|
|
174
|
+
s.suffix && /* @__PURE__ */ t.createElement(ie, { ...ce })
|
|
177
175
|
);
|
|
178
176
|
});
|
|
179
177
|
L.propTypes = {
|
|
@@ -202,7 +200,7 @@ L.propTypes = {
|
|
|
202
200
|
autoFocus: e.bool,
|
|
203
201
|
flow: e.oneOf(["vertical", "horizontal"])
|
|
204
202
|
};
|
|
205
|
-
const
|
|
203
|
+
const i = {
|
|
206
204
|
size: void 0,
|
|
207
205
|
rounded: void 0,
|
|
208
206
|
fillMode: void 0,
|