@progress/kendo-react-inputs 15.1.1-develop.3 → 15.2.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 +72 -70
- package/colors/ColorContrastLabels.js +1 -1
- package/colors/ColorContrastLabels.mjs +2 -2
- package/colors/ColorGradient.js +1 -1
- package/colors/ColorGradient.mjs +51 -52
- package/colors/ColorPalette.js +1 -1
- package/colors/ColorPalette.mjs +71 -72
- package/colors/ColorPicker.js +1 -1
- package/colors/ColorPicker.mjs +203 -195
- package/colors/FlatColorPicker.d.ts +4 -4
- package/colors/FlatColorPicker.js +1 -1
- package/colors/FlatColorPicker.mjs +30 -26
- package/colors/interfaces/ColorPaletteProps.d.ts +7 -0
- package/colors/interfaces/ColorPickerPaletteSettings.d.ts +5 -0
- package/dist/cdn/js/kendo-react-inputs.js +1 -1
- package/maskedtextbox/MaskedTextBox.d.ts +1 -0
- package/maskedtextbox/MaskedTextBox.js +1 -1
- package/maskedtextbox/MaskedTextBox.mjs +26 -23
- package/maskedtextbox/MaskedTextBoxProps.d.ts +7 -0
- package/numerictextbox/NumericTextBox.js +1 -1
- package/numerictextbox/NumericTextBox.mjs +2 -2
- package/otpinput/OTPInput.js +1 -1
- package/otpinput/OTPInput.mjs +141 -143
- 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 +32 -30
- package/range-slider/RangeSlider.js +11 -11
- package/range-slider/RangeSlider.mjs +54 -54
- package/rating/Rating.d.ts +12 -0
- package/rating/Rating.js +2 -2
- package/rating/Rating.mjs +91 -92
- package/slider/Slider.d.ts +12 -0
- package/slider/Slider.js +1 -1
- package/slider/Slider.mjs +69 -64
- package/switch/Switch.d.ts +15 -0
- package/switch/Switch.js +1 -1
- package/switch/Switch.mjs +87 -82
- package/textarea/TextArea.js +1 -1
- package/textarea/TextArea.mjs +11 -12
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"),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-
|
|
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-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
|
@@ -14,7 +14,7 @@ const Fe = Pe(), L = t.forwardRef((j, W) => {
|
|
|
14
14
|
rounded: b = i.rounded,
|
|
15
15
|
fillMode: w = i.fillMode,
|
|
16
16
|
autoFocus: G = i.autoFocus,
|
|
17
|
-
flow:
|
|
17
|
+
flow: g = i.flow,
|
|
18
18
|
prefix: J = null,
|
|
19
19
|
suffix: Q = null,
|
|
20
20
|
ariaDescribedBy: U,
|
|
@@ -31,7 +31,7 @@ const Fe = Pe(), L = t.forwardRef((j, W) => {
|
|
|
31
31
|
placeholder: te,
|
|
32
32
|
style: ae,
|
|
33
33
|
tabIndex: re,
|
|
34
|
-
value:
|
|
34
|
+
value: v,
|
|
35
35
|
valid: I,
|
|
36
36
|
validationMessage: M,
|
|
37
37
|
validityStyles: S,
|
|
@@ -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, ue] = q(J), [ie, ce] = q(Q), f =
|
|
53
|
+
}, []), [O, B] = t.useState(Z), [se, A] = t.useState(!1), [le, ue] = q(J), [ie, ce] = q(Q), f = v !== void 0, m = f ? v : O, N = F || P, n = t.useCallback(() => ({
|
|
54
54
|
element: a,
|
|
55
55
|
focus: V,
|
|
56
56
|
blur: E,
|
|
@@ -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 ge = t.useMemo(() => {
|
|
114
114
|
let r = {};
|
|
115
115
|
return c ? r = {
|
|
116
116
|
resize: "none",
|
|
@@ -120,13 +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]), ve = {
|
|
124
124
|
id: P || de,
|
|
125
125
|
name: F,
|
|
126
126
|
className: D("k-input-inner", "!k-overflow-auto", {
|
|
127
127
|
"k-resize": !c && l !== "none",
|
|
128
128
|
"k-resize-none": c || l === "none",
|
|
129
|
-
"!k-flex-none":
|
|
129
|
+
"!k-flex-none": g === "vertical"
|
|
130
130
|
}),
|
|
131
131
|
ref: a,
|
|
132
132
|
disabled: o,
|
|
@@ -136,12 +136,11 @@ const Fe = Pe(), L = t.forwardRef((j, W) => {
|
|
|
136
136
|
required: d,
|
|
137
137
|
tabIndex: we(re, o),
|
|
138
138
|
autoFocus: G,
|
|
139
|
-
style:
|
|
139
|
+
style: ge,
|
|
140
140
|
"aria-labelledby": X,
|
|
141
141
|
"aria-describedby": U,
|
|
142
|
-
"aria-disabled": o || void 0,
|
|
143
142
|
"aria-required": d,
|
|
144
|
-
value: f ?
|
|
143
|
+
value: f ? v : O,
|
|
145
144
|
...Object.assign({}, ne, oe),
|
|
146
145
|
onChange: C,
|
|
147
146
|
onFocus: me,
|
|
@@ -161,8 +160,8 @@ const Fe = Pe(), L = t.forwardRef((j, W) => {
|
|
|
161
160
|
"k-required": d,
|
|
162
161
|
"k-disabled": o,
|
|
163
162
|
"k-focus": se,
|
|
164
|
-
"!k-flex-col":
|
|
165
|
-
"!k-flex-row":
|
|
163
|
+
"!k-flex-col": g === "vertical",
|
|
164
|
+
"!k-flex-row": g === "horizontal"
|
|
166
165
|
},
|
|
167
166
|
Y
|
|
168
167
|
),
|
|
@@ -170,7 +169,7 @@ const Fe = Pe(), L = t.forwardRef((j, W) => {
|
|
|
170
169
|
dir: fe
|
|
171
170
|
},
|
|
172
171
|
s.prefix && /* @__PURE__ */ t.createElement(le, { ...ue }),
|
|
173
|
-
/* @__PURE__ */ t.createElement("textarea", { ...
|
|
172
|
+
/* @__PURE__ */ t.createElement("textarea", { ...ve }),
|
|
174
173
|
s.suffix && /* @__PURE__ */ t.createElement(ie, { ...ce })
|
|
175
174
|
);
|
|
176
175
|
});
|