@progress/kendo-react-inputs 14.0.0-develop.1 → 14.0.0-develop.3
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.mjs +7 -7
- package/colors/ColorGradient.mjs +3 -3
- package/colors/ColorPicker.js +1 -1
- package/colors/ColorPicker.mjs +11 -10
- package/colors/FlatColorPicker.mjs +3 -3
- package/dist/cdn/js/kendo-react-inputs.js +1 -1
- package/input/Input.js +1 -1
- package/input/Input.mjs +57 -59
- package/maskedtextbox/MaskedTextBox.mjs +6 -6
- package/numerictextbox/NumericTextBox.mjs +8 -8
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +1 -1
- package/package.json +12 -12
- package/radiobutton/RadioButton.mjs +6 -6
- package/radiobutton/RadioGroup.mjs +7 -7
- package/range-slider/RangeSlider.mjs +7 -7
- package/rating/Rating.mjs +6 -6
- package/signature/Signature.mjs +6 -6
- package/slider/Slider.mjs +6 -6
- package/switch/Switch.d.ts +4 -0
- package/switch/Switch.js +1 -1
- package/switch/Switch.mjs +93 -89
- package/textarea/TextArea.mjs +7 -7
package/slider/Slider.mjs
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
import * as l from "react";
|
|
9
9
|
import { useState as L, useRef as R, useMemo as N, useEffect as q, useCallback as o, useImperativeHandle as me } from "react";
|
|
10
10
|
import * as i from "prop-types";
|
|
11
|
-
import { withPropsContext as ue,
|
|
11
|
+
import { withPropsContext as ue, dispatchEvent as fe, Keys as s, classNames as ge, Draggable as ve, getTabIndex as he, createPropsContext as be } from "@progress/kendo-react-common";
|
|
12
12
|
import { LocalizationService as ye, registerForLocalization as ke } from "@progress/kendo-react-intl";
|
|
13
13
|
import { sliderDragTitle as H, messages as A, sliderDecreaseValue as O, sliderIncreaseValue as X } from "../messages/index.mjs";
|
|
14
14
|
import { SLIDER_LABEL_ATTRIBUTE as xe } from "./SliderLabel.mjs";
|
|
@@ -53,7 +53,7 @@ const f = {
|
|
|
53
53
|
}, []), d = o(
|
|
54
54
|
(e, n) => {
|
|
55
55
|
const c = Math.min(Math.max(n, t.min), t.max);
|
|
56
|
-
D || $(c),
|
|
56
|
+
D || $(c), fe(t.onChange, e, V.current, { value: c });
|
|
57
57
|
},
|
|
58
58
|
[t.min, t.max, t.onChange, D]
|
|
59
59
|
), te = o(() => {
|
|
@@ -153,7 +153,7 @@ const f = {
|
|
|
153
153
|
onFocus: te,
|
|
154
154
|
onBlur: ne,
|
|
155
155
|
onKeyDown: ae,
|
|
156
|
-
className:
|
|
156
|
+
className: ge(
|
|
157
157
|
"k-slider",
|
|
158
158
|
{
|
|
159
159
|
"k-focus": p,
|
|
@@ -176,7 +176,7 @@ const f = {
|
|
|
176
176
|
O,
|
|
177
177
|
A[O]
|
|
178
178
|
),
|
|
179
|
-
children: /* @__PURE__ */ l.createElement(
|
|
179
|
+
children: /* @__PURE__ */ l.createElement(ve, { onDrag: ce, onPress: re, autoScroll: !1 }, /* @__PURE__ */ l.createElement(
|
|
180
180
|
"div",
|
|
181
181
|
{
|
|
182
182
|
className: "k-slider-track-wrap",
|
|
@@ -224,7 +224,7 @@ const f = {
|
|
|
224
224
|
"aria-labelledby": t.ariaLabelledBy,
|
|
225
225
|
"aria-describedby": t.ariaDescribedBy,
|
|
226
226
|
"aria-label": t.ariaLabel,
|
|
227
|
-
tabIndex:
|
|
227
|
+
tabIndex: he(Q, C, void 0),
|
|
228
228
|
className: "k-draghandle k-draghandle-end",
|
|
229
229
|
title: T.toLanguageString(
|
|
230
230
|
H,
|
|
@@ -239,7 +239,7 @@ const f = {
|
|
|
239
239
|
);
|
|
240
240
|
});
|
|
241
241
|
z.displayName = "Slider";
|
|
242
|
-
const Se =
|
|
242
|
+
const Se = be(), J = ue(Se, z);
|
|
243
243
|
J.displayName = "KendoReactSlider";
|
|
244
244
|
J.propTypes = {
|
|
245
245
|
value: i.number,
|
package/switch/Switch.d.ts
CHANGED
|
@@ -260,6 +260,10 @@ export interface SwitchHandle {
|
|
|
260
260
|
* Returns the HTML element of the Switch component.
|
|
261
261
|
*/
|
|
262
262
|
element: HTMLSpanElement | null;
|
|
263
|
+
/**
|
|
264
|
+
* Sets the focus on the Switch.
|
|
265
|
+
*/
|
|
266
|
+
focus: () => void;
|
|
263
267
|
/**
|
|
264
268
|
* Gets the `name` property of the Switch.
|
|
265
269
|
*/
|
package/switch/Switch.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 n=require("react"),Y=require("prop-types"),i=require("@progress/kendo-react-common"),Z=require("@progress/kendo-react-intl"),N=require("../messages/index.js");function z(e){const
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react"),Y=require("prop-types"),i=require("@progress/kendo-react-common"),Z=require("@progress/kendo-react-intl"),N=require("../messages/index.js");function z(e){const m=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const s in e)if(s!=="default"){const h=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(m,s,h.get?h:{enumerable:!0,get:()=>e[s]})}}return m.default=e,Object.freeze(m)}const d=z(n),a=z(Y),l={disabled:!1,defaultChecked:!1,size:void 0,trackRounded:void 0,thumbRounded:void 0,offLabel:"OFF",onBlur:i.noop,onFocus:i.noop,onLabel:"ON",validityStyles:!0},x=d.forwardRef((e,m)=>{var F;const{disabled:s=l.disabled,defaultChecked:h=l.defaultChecked,size:C=l.size,trackRounded:w=l.trackRounded,thumbRounded:R=l.thumbRounded,offLabel:O=l.offLabel,onBlur:S=l.onBlur,onFocus:M=l.onFocus,onLabel:T=l.onLabel}=e,[I,V]=n.useState(h||!1),[_,P]=n.useState(!1),o=n.useRef(null),u=n.useRef(null),E=n.useRef(null),v=n.useRef(void 0),q=n.useRef(void 0),B=n.useRef(void 0),D=n.useMemo(()=>new Z.LocalizationService,[]),c=n.useMemo(()=>v.current!==void 0?v.current:e.checked!==void 0?e.checked:I,[e.checked,I]),b=n.useMemo(()=>{var g,K;const t=e.validationMessage!==void 0,r=(g=e.valid)!=null?g:e.required?!!c:!0,y=(K=e.valid)!=null?K:r;return{customError:t,valid:y,valueMissing:c===null}},[e.valid,e.validationMessage,e.required,c]),W=(F=e.validityStyles)!=null?F:l.validityStyles;n.useEffect(()=>{var t;(t=E.current)!=null&&t.setCustomValidity&&E.current.setCustomValidity(b.valid?"":e.validationMessage||D.toLanguageString(N.switchValidation,N.messages[N.switchValidation]))},[b,e.validationMessage,D]),n.useEffect(()=>{o.current&&(B.current=e.dir||getComputedStyle(o.current).direction||void 0)},[e.dir]);const k=n.useCallback(()=>({props:e,get element(){return o.current},get actionElement(){return u.current},focus:()=>{var t;(t=u.current)==null||t.focus()},get value(){return c},get name(){return e.name},get validity(){return b}}),[e,c,b]),f=n.useCallback((t,r)=>{V(t),v.current=t,i.dispatchEvent(e.onChange,r,{...k(),value:t},{value:t}),v.current=void 0},[e.onChange,k]);n.useEffect(()=>{const t=e.name||e.id,r=i.subscribeToKendoPaste(u.current,{fieldName:t,onValueChange:y=>{if(y!==c){const g={target:u.current,currentTarget:u.current,nativeEvent:new Event("change",{bubbles:!0})};f(y,g)}}});return()=>{r==null||r.unsubscribe()}},[e.name,e.id,c,f]);const H=n.useCallback(t=>{q.current!==t.timeStamp&&(q.current=t.timeStamp,f(!c,t))},[c,f]),$=n.useCallback(t=>{if(s)return;const{keyCode:r}=t;(r===i.Keys.space||r===i.Keys.enter)&&(f(!c,t),t.preventDefault())},[s,c,f]),A=n.useCallback(t=>{s||(P(!0),M&&M(t))},[s,M]),G=n.useCallback(t=>{s||(P(!1),S&&S(t))},[s,S]);n.useImperativeHandle(m,k,[k]);const J=B.current||e.dir||o.current&&getComputedStyle(o.current).direction||void 0,Q=!W||b.valid,U=i.classNames("k-switch",{[`k-switch-${i.kendoThemeMaps.sizeMap[C]||C}`]:C,"k-switch-on":c,"k-switch-off":!c,"k-focus":_,"k-disabled":s,"k-invalid":!Q},e.className),X=d.createElement("input",{type:"checkbox",checked:e.checked,ref:E,tabIndex:-1,"aria-hidden":!0,value:c,style:{opacity:0,width:1,border:0,zIndex:-1,position:"absolute",left:"50%"},onChange:i.noop,name:e.name||void 0});return d.createElement("span",{ref:u,role:"switch","aria-checked":c,"aria-disabled":s||void 0,"aria-labelledby":e.ariaLabelledBy,"aria-describedby":e.ariaDescribedBy,"aria-label":e.ariaLabel,"aria-required":e.required,className:U,dir:J,onKeyDown:$,onClick:H,onBlur:G,onFocus:A,tabIndex:i.getTabIndex(e.tabIndex,s,void 0),accessKey:e.accessKey,id:e.id},d.createElement("span",{className:i.classNames("k-switch-track",{[`k-rounded-${i.kendoThemeMaps.roundedMap[w]||w}`]:w}),ref:o},X,T?d.createElement("span",{className:"k-switch-label-on"},T):"",O?d.createElement("span",{className:"k-switch-label-off"},O):""),d.createElement("span",{className:"k-switch-thumb-wrap"},d.createElement("span",{className:i.classNames("k-switch-thumb",{[`k-rounded-${i.kendoThemeMaps.roundedMap[R]||R}`]:R})})))});x.displayName="Switch";const j=i.createPropsContext(),L=i.withIdHOC(i.withPropsContext(j,x));L.displayName="KendoReactSwitch";L.propTypes={accessKey:a.string,checked:a.bool,className:a.string,defaultChecked:a.bool,defaultValue:a.any,disabled:a.bool,dir:a.string,id:a.string,size:a.oneOf(["small","medium","large"]),trackRounded:a.oneOf(["small","medium","large","full"]),thumbRounded:a.oneOf(["small","medium","large","full"]),ariaDescribedBy:a.string,ariaLabelledBy:a.string,ariaLabel:a.string,offLabel:a.node,onBlur:a.func,onChange:a.func,onFocus:a.func,onLabel:a.node,tabIndex:a.number,value:a.any,name:a.string,required:a.bool,valid:a.bool,validationMessage:a.string,validityStyles:a.bool};exports.Switch=L;exports.SwitchPropsContext=j;exports.SwitchWithoutContext=x;
|
package/switch/Switch.mjs
CHANGED
|
@@ -5,13 +5,13 @@
|
|
|
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 q, useRef as
|
|
10
|
-
import * as
|
|
11
|
-
import { withIdHOC as ne, withPropsContext as ie,
|
|
8
|
+
import * as d from "react";
|
|
9
|
+
import { useState as q, useRef as u, useMemo as E, useEffect as L, useCallback as m, useImperativeHandle as ae } from "react";
|
|
10
|
+
import * as a from "prop-types";
|
|
11
|
+
import { withIdHOC as ne, withPropsContext as ie, noop as M, dispatchEvent as re, subscribeToKendoPaste as ce, Keys as V, classNames as N, kendoThemeMaps as x, getTabIndex as de, createPropsContext as le } from "@progress/kendo-react-common";
|
|
12
12
|
import { LocalizationService as oe } from "@progress/kendo-react-intl";
|
|
13
13
|
import { switchValidation as H, messages as se } from "../messages/index.mjs";
|
|
14
|
-
const
|
|
14
|
+
const r = {
|
|
15
15
|
disabled: !1,
|
|
16
16
|
defaultChecked: !1,
|
|
17
17
|
size: void 0,
|
|
@@ -22,42 +22,46 @@ const d = {
|
|
|
22
22
|
onFocus: M,
|
|
23
23
|
onLabel: "ON",
|
|
24
24
|
validityStyles: !0
|
|
25
|
-
}, W =
|
|
25
|
+
}, W = d.forwardRef((e, j) => {
|
|
26
26
|
var T;
|
|
27
27
|
const {
|
|
28
|
-
disabled:
|
|
29
|
-
defaultChecked: A =
|
|
30
|
-
size: g =
|
|
31
|
-
trackRounded: k =
|
|
32
|
-
thumbRounded: w =
|
|
33
|
-
offLabel: B =
|
|
34
|
-
onBlur: C =
|
|
35
|
-
onFocus: R =
|
|
36
|
-
onLabel: I =
|
|
37
|
-
} = e, [F, G] = q(A || !1), [J, D] = q(!1), l =
|
|
28
|
+
disabled: c = r.disabled,
|
|
29
|
+
defaultChecked: A = r.defaultChecked,
|
|
30
|
+
size: g = r.size,
|
|
31
|
+
trackRounded: k = r.trackRounded,
|
|
32
|
+
thumbRounded: w = r.thumbRounded,
|
|
33
|
+
offLabel: B = r.offLabel,
|
|
34
|
+
onBlur: C = r.onBlur,
|
|
35
|
+
onFocus: R = r.onFocus,
|
|
36
|
+
onLabel: I = r.onLabel
|
|
37
|
+
} = e, [F, G] = q(A || !1), [J, D] = q(!1), l = u(null), o = u(null), S = u(null), b = u(void 0), K = u(void 0), z = u(void 0), O = E(() => new oe(), []), n = E(() => b.current !== void 0 ? b.current : e.checked !== void 0 ? e.checked : F, [e.checked, F]), f = E(() => {
|
|
38
38
|
var y, P;
|
|
39
|
-
const
|
|
39
|
+
const t = e.validationMessage !== void 0, i = (y = e.valid) != null ? y : e.required ? !!n : !0, v = (P = e.valid) != null ? P : i;
|
|
40
40
|
return {
|
|
41
|
-
customError:
|
|
41
|
+
customError: t,
|
|
42
42
|
valid: v,
|
|
43
43
|
valueMissing: n === null
|
|
44
44
|
};
|
|
45
|
-
}, [e.valid, e.validationMessage, e.required, n]), Q = (T = e.validityStyles) != null ? T :
|
|
45
|
+
}, [e.valid, e.validationMessage, e.required, n]), Q = (T = e.validityStyles) != null ? T : r.validityStyles;
|
|
46
46
|
L(() => {
|
|
47
|
-
var
|
|
48
|
-
(
|
|
47
|
+
var t;
|
|
48
|
+
(t = S.current) != null && t.setCustomValidity && S.current.setCustomValidity(
|
|
49
49
|
f.valid ? "" : e.validationMessage || O.toLanguageString(H, se[H])
|
|
50
50
|
);
|
|
51
51
|
}, [f, e.validationMessage, O]), L(() => {
|
|
52
52
|
l.current && (z.current = e.dir || getComputedStyle(l.current).direction || void 0);
|
|
53
53
|
}, [e.dir]);
|
|
54
|
-
const h =
|
|
54
|
+
const h = m(() => ({
|
|
55
55
|
props: e,
|
|
56
56
|
get element() {
|
|
57
57
|
return l.current;
|
|
58
58
|
},
|
|
59
59
|
get actionElement() {
|
|
60
|
-
return
|
|
60
|
+
return o.current;
|
|
61
|
+
},
|
|
62
|
+
focus: () => {
|
|
63
|
+
var t;
|
|
64
|
+
(t = o.current) == null || t.focus();
|
|
61
65
|
},
|
|
62
66
|
get value() {
|
|
63
67
|
return n;
|
|
@@ -68,58 +72,58 @@ const d = {
|
|
|
68
72
|
get validity() {
|
|
69
73
|
return f;
|
|
70
74
|
}
|
|
71
|
-
}), [e, n, f]),
|
|
72
|
-
(
|
|
73
|
-
G(
|
|
75
|
+
}), [e, n, f]), s = m(
|
|
76
|
+
(t, i) => {
|
|
77
|
+
G(t), b.current = t, re(
|
|
74
78
|
e.onChange,
|
|
75
79
|
i,
|
|
76
|
-
{ ...h(), value:
|
|
77
|
-
{ value:
|
|
80
|
+
{ ...h(), value: t },
|
|
81
|
+
{ value: t }
|
|
78
82
|
), b.current = void 0;
|
|
79
83
|
},
|
|
80
84
|
[e.onChange, h]
|
|
81
85
|
);
|
|
82
86
|
L(() => {
|
|
83
|
-
const
|
|
84
|
-
fieldName:
|
|
87
|
+
const t = e.name || e.id, i = ce(o.current, {
|
|
88
|
+
fieldName: t,
|
|
85
89
|
onValueChange: (v) => {
|
|
86
90
|
if (v !== n) {
|
|
87
91
|
const y = {
|
|
88
|
-
target:
|
|
89
|
-
currentTarget:
|
|
92
|
+
target: o.current,
|
|
93
|
+
currentTarget: o.current,
|
|
90
94
|
nativeEvent: new Event("change", { bubbles: !0 })
|
|
91
95
|
};
|
|
92
|
-
|
|
96
|
+
s(v, y);
|
|
93
97
|
}
|
|
94
98
|
}
|
|
95
99
|
});
|
|
96
100
|
return () => {
|
|
97
101
|
i == null || i.unsubscribe();
|
|
98
102
|
};
|
|
99
|
-
}, [e.name, e.id, n,
|
|
100
|
-
const U =
|
|
101
|
-
(
|
|
102
|
-
K.current !==
|
|
103
|
+
}, [e.name, e.id, n, s]);
|
|
104
|
+
const U = m(
|
|
105
|
+
(t) => {
|
|
106
|
+
K.current !== t.timeStamp && (K.current = t.timeStamp, s(!n, t));
|
|
103
107
|
},
|
|
104
|
-
[n,
|
|
105
|
-
), X =
|
|
106
|
-
(
|
|
107
|
-
if (
|
|
108
|
+
[n, s]
|
|
109
|
+
), X = m(
|
|
110
|
+
(t) => {
|
|
111
|
+
if (c)
|
|
108
112
|
return;
|
|
109
|
-
const { keyCode: i } =
|
|
110
|
-
(i === V.space || i === V.enter) && (
|
|
113
|
+
const { keyCode: i } = t;
|
|
114
|
+
(i === V.space || i === V.enter) && (s(!n, t), t.preventDefault());
|
|
111
115
|
},
|
|
112
|
-
[
|
|
113
|
-
), Y =
|
|
114
|
-
(
|
|
115
|
-
|
|
116
|
+
[c, n, s]
|
|
117
|
+
), Y = m(
|
|
118
|
+
(t) => {
|
|
119
|
+
c || (D(!0), R && R(t));
|
|
116
120
|
},
|
|
117
|
-
[
|
|
118
|
-
), Z =
|
|
119
|
-
(
|
|
120
|
-
|
|
121
|
+
[c, R]
|
|
122
|
+
), Z = m(
|
|
123
|
+
(t) => {
|
|
124
|
+
c || (D(!1), C && C(t));
|
|
121
125
|
},
|
|
122
|
-
[
|
|
126
|
+
[c, C]
|
|
123
127
|
);
|
|
124
128
|
ae(j, h, [h]);
|
|
125
129
|
const _ = z.current || e.dir || l.current && getComputedStyle(l.current).direction || void 0, p = !Q || f.valid, ee = N(
|
|
@@ -129,11 +133,11 @@ const d = {
|
|
|
129
133
|
"k-switch-on": n,
|
|
130
134
|
"k-switch-off": !n,
|
|
131
135
|
"k-focus": J,
|
|
132
|
-
"k-disabled":
|
|
136
|
+
"k-disabled": c,
|
|
133
137
|
"k-invalid": !p
|
|
134
138
|
},
|
|
135
139
|
e.className
|
|
136
|
-
), te = /* @__PURE__ */
|
|
140
|
+
), te = /* @__PURE__ */ d.createElement(
|
|
137
141
|
"input",
|
|
138
142
|
{
|
|
139
143
|
type: "checkbox",
|
|
@@ -147,13 +151,13 @@ const d = {
|
|
|
147
151
|
name: e.name || void 0
|
|
148
152
|
}
|
|
149
153
|
);
|
|
150
|
-
return /* @__PURE__ */
|
|
154
|
+
return /* @__PURE__ */ d.createElement(
|
|
151
155
|
"span",
|
|
152
156
|
{
|
|
153
|
-
ref:
|
|
157
|
+
ref: o,
|
|
154
158
|
role: "switch",
|
|
155
159
|
"aria-checked": n,
|
|
156
|
-
"aria-disabled":
|
|
160
|
+
"aria-disabled": c || void 0,
|
|
157
161
|
"aria-labelledby": e.ariaLabelledBy,
|
|
158
162
|
"aria-describedby": e.ariaDescribedBy,
|
|
159
163
|
"aria-label": e.ariaLabel,
|
|
@@ -164,11 +168,11 @@ const d = {
|
|
|
164
168
|
onClick: U,
|
|
165
169
|
onBlur: Z,
|
|
166
170
|
onFocus: Y,
|
|
167
|
-
tabIndex:
|
|
171
|
+
tabIndex: de(e.tabIndex, c, void 0),
|
|
168
172
|
accessKey: e.accessKey,
|
|
169
173
|
id: e.id
|
|
170
174
|
},
|
|
171
|
-
/* @__PURE__ */
|
|
175
|
+
/* @__PURE__ */ d.createElement(
|
|
172
176
|
"span",
|
|
173
177
|
{
|
|
174
178
|
className: N("k-switch-track", {
|
|
@@ -177,10 +181,10 @@ const d = {
|
|
|
177
181
|
ref: l
|
|
178
182
|
},
|
|
179
183
|
te,
|
|
180
|
-
I ? /* @__PURE__ */
|
|
181
|
-
B ? /* @__PURE__ */
|
|
184
|
+
I ? /* @__PURE__ */ d.createElement("span", { className: "k-switch-label-on" }, I) : "",
|
|
185
|
+
B ? /* @__PURE__ */ d.createElement("span", { className: "k-switch-label-off" }, B) : ""
|
|
182
186
|
),
|
|
183
|
-
/* @__PURE__ */
|
|
187
|
+
/* @__PURE__ */ d.createElement("span", { className: "k-switch-thumb-wrap" }, /* @__PURE__ */ d.createElement(
|
|
184
188
|
"span",
|
|
185
189
|
{
|
|
186
190
|
className: N("k-switch-thumb", {
|
|
@@ -191,7 +195,7 @@ const d = {
|
|
|
191
195
|
);
|
|
192
196
|
});
|
|
193
197
|
W.displayName = "Switch";
|
|
194
|
-
const ue =
|
|
198
|
+
const ue = le(), $ = ne(
|
|
195
199
|
ie(
|
|
196
200
|
ue,
|
|
197
201
|
W
|
|
@@ -199,32 +203,32 @@ const ue = de(), $ = ne(
|
|
|
199
203
|
);
|
|
200
204
|
$.displayName = "KendoReactSwitch";
|
|
201
205
|
$.propTypes = {
|
|
202
|
-
accessKey:
|
|
203
|
-
checked:
|
|
204
|
-
className:
|
|
205
|
-
defaultChecked:
|
|
206
|
-
defaultValue:
|
|
207
|
-
disabled:
|
|
208
|
-
dir:
|
|
209
|
-
id:
|
|
210
|
-
size:
|
|
211
|
-
trackRounded:
|
|
212
|
-
thumbRounded:
|
|
213
|
-
ariaDescribedBy:
|
|
214
|
-
ariaLabelledBy:
|
|
215
|
-
ariaLabel:
|
|
216
|
-
offLabel:
|
|
217
|
-
onBlur:
|
|
218
|
-
onChange:
|
|
219
|
-
onFocus:
|
|
220
|
-
onLabel:
|
|
221
|
-
tabIndex:
|
|
222
|
-
value:
|
|
223
|
-
name:
|
|
224
|
-
required:
|
|
225
|
-
valid:
|
|
226
|
-
validationMessage:
|
|
227
|
-
validityStyles:
|
|
206
|
+
accessKey: a.string,
|
|
207
|
+
checked: a.bool,
|
|
208
|
+
className: a.string,
|
|
209
|
+
defaultChecked: a.bool,
|
|
210
|
+
defaultValue: a.any,
|
|
211
|
+
disabled: a.bool,
|
|
212
|
+
dir: a.string,
|
|
213
|
+
id: a.string,
|
|
214
|
+
size: a.oneOf(["small", "medium", "large"]),
|
|
215
|
+
trackRounded: a.oneOf(["small", "medium", "large", "full"]),
|
|
216
|
+
thumbRounded: a.oneOf(["small", "medium", "large", "full"]),
|
|
217
|
+
ariaDescribedBy: a.string,
|
|
218
|
+
ariaLabelledBy: a.string,
|
|
219
|
+
ariaLabel: a.string,
|
|
220
|
+
offLabel: a.node,
|
|
221
|
+
onBlur: a.func,
|
|
222
|
+
onChange: a.func,
|
|
223
|
+
onFocus: a.func,
|
|
224
|
+
onLabel: a.node,
|
|
225
|
+
tabIndex: a.number,
|
|
226
|
+
value: a.any,
|
|
227
|
+
name: a.string,
|
|
228
|
+
required: a.bool,
|
|
229
|
+
valid: a.bool,
|
|
230
|
+
validationMessage: a.string,
|
|
231
|
+
validityStyles: a.bool
|
|
228
232
|
};
|
|
229
233
|
export {
|
|
230
234
|
$ as Switch,
|
package/textarea/TextArea.mjs
CHANGED
|
@@ -7,9 +7,9 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import * as a from "react";
|
|
9
9
|
import e from "prop-types";
|
|
10
|
-
import {
|
|
11
|
-
const Pe =
|
|
12
|
-
const u =
|
|
10
|
+
import { usePropsContext as ve, useCustomComponent as $, useId as ge, useDir as he, useIsomorphicLayoutEffect as ye, dispatchEvent as z, useKendoPaste as ke, getTabIndex as Ce, classNames as q, kendoThemeMaps as D, createPropsContext as ze } from "@progress/kendo-react-common";
|
|
11
|
+
const Pe = ze(), K = a.forwardRef((L, j) => {
|
|
12
|
+
const u = ve(Pe, L), {
|
|
13
13
|
size: b = i.size,
|
|
14
14
|
rounded: p = i.rounded,
|
|
15
15
|
fillMode: P = i.fillMode,
|
|
@@ -62,10 +62,10 @@ const Pe = ve(), K = a.forwardRef((L, j) => {
|
|
|
62
62
|
}
|
|
63
63
|
}), [O, I, m]);
|
|
64
64
|
a.useImperativeHandle(j, n);
|
|
65
|
-
const [H, R] = a.useState("auto"), ce =
|
|
65
|
+
const [H, R] = a.useState("auto"), ce = ge(), de = he(t, u.dir), k = S !== void 0 ? S : d ? !!m : !0;
|
|
66
66
|
a.useEffect(() => {
|
|
67
67
|
t.current && t.current.setCustomValidity && t.current.setCustomValidity(k ? "" : T || "");
|
|
68
|
-
}, [k, T]),
|
|
68
|
+
}, [k, T]), ye(() => {
|
|
69
69
|
t.current && R(`${t.current.scrollHeight}px`);
|
|
70
70
|
}, [m]);
|
|
71
71
|
const C = a.useCallback(
|
|
@@ -103,7 +103,7 @@ const Pe = ve(), K = a.forwardRef((L, j) => {
|
|
|
103
103
|
},
|
|
104
104
|
[C]
|
|
105
105
|
);
|
|
106
|
-
|
|
106
|
+
ke(t, {
|
|
107
107
|
fieldName: N,
|
|
108
108
|
onValueChange: be,
|
|
109
109
|
enabled: !!N
|
|
@@ -133,7 +133,7 @@ const Pe = ve(), K = a.forwardRef((L, j) => {
|
|
|
133
133
|
placeholder: ee,
|
|
134
134
|
readOnly: Y,
|
|
135
135
|
required: d,
|
|
136
|
-
tabIndex:
|
|
136
|
+
tabIndex: Ce(ae, o),
|
|
137
137
|
autoFocus: _,
|
|
138
138
|
style: pe,
|
|
139
139
|
"aria-labelledby": U,
|