@progress/kendo-react-inputs 8.3.0-develop.5 → 8.3.0-develop.7
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/dist/cdn/js/kendo-react-inputs.js +1 -1
- package/index.d.mts +10 -2
- package/index.d.ts +10 -2
- package/input/Input.js +1 -1
- package/input/Input.mjs +84 -77
- package/input/InputPrefix.js +1 -1
- package/input/InputPrefix.mjs +19 -11
- package/input/InputSuffix.js +1 -1
- package/input/InputSuffix.mjs +19 -11
- package/package-metadata.mjs +1 -1
- package/package.json +8 -8
- package/textbox/Textbox.js +1 -1
- package/textbox/Textbox.mjs +82 -84
package/index.d.mts
CHANGED
|
@@ -14,8 +14,8 @@ import { FormComponentValidity } from '@progress/kendo-react-common';
|
|
|
14
14
|
import { HTMLAttributes } from 'react';
|
|
15
15
|
import { IconHandle } from '@progress/kendo-react-common';
|
|
16
16
|
import { IconProps } from '@progress/kendo-react-common';
|
|
17
|
+
import { InputsClassStructure } from '@progress/kendo-react-common';
|
|
17
18
|
import { JSX as JSX_2 } from 'react/jsx-runtime';
|
|
18
|
-
import { MaskedTextBoxClassStructure } from '@progress/kendo-react-common';
|
|
19
19
|
import { NumberFormatOptions } from '@progress/kendo-react-intl';
|
|
20
20
|
import { PopupAnimation } from '@progress/kendo-react-popup';
|
|
21
21
|
import PropTypes from 'prop-types';
|
|
@@ -1369,6 +1369,10 @@ export declare interface InputProps extends Omit_2<React_2.InputHTMLAttributes<H
|
|
|
1369
1369
|
* Triggered after value change.
|
|
1370
1370
|
*/
|
|
1371
1371
|
onChange?: (event: InputChangeEvent) => void;
|
|
1372
|
+
/**
|
|
1373
|
+
* @hidden
|
|
1374
|
+
*/
|
|
1375
|
+
unstyled?: InputsClassStructure;
|
|
1372
1376
|
}
|
|
1373
1377
|
|
|
1374
1378
|
/**
|
|
@@ -1851,7 +1855,7 @@ export declare interface MaskedTextBoxProps extends FormComponentProps {
|
|
|
1851
1855
|
/**
|
|
1852
1856
|
* @hidden
|
|
1853
1857
|
*/
|
|
1854
|
-
unstyled?:
|
|
1858
|
+
unstyled?: InputsClassStructure;
|
|
1855
1859
|
}
|
|
1856
1860
|
|
|
1857
1861
|
/**
|
|
@@ -4353,6 +4357,10 @@ export declare interface TextBoxProps extends Omit<React_2.InputHTMLAttributes<H
|
|
|
4353
4357
|
* Represents the `autoFocus` HTML attribute that will be applied to the input element of the TextBox. (Defaults to `false`)
|
|
4354
4358
|
*/
|
|
4355
4359
|
autoFocus?: boolean;
|
|
4360
|
+
/**
|
|
4361
|
+
* @hidden
|
|
4362
|
+
*/
|
|
4363
|
+
unstyled?: InputsClassStructure;
|
|
4356
4364
|
}
|
|
4357
4365
|
|
|
4358
4366
|
/**
|
package/index.d.ts
CHANGED
|
@@ -14,8 +14,8 @@ import { FormComponentValidity } from '@progress/kendo-react-common';
|
|
|
14
14
|
import { HTMLAttributes } from 'react';
|
|
15
15
|
import { IconHandle } from '@progress/kendo-react-common';
|
|
16
16
|
import { IconProps } from '@progress/kendo-react-common';
|
|
17
|
+
import { InputsClassStructure } from '@progress/kendo-react-common';
|
|
17
18
|
import { JSX as JSX_2 } from 'react/jsx-runtime';
|
|
18
|
-
import { MaskedTextBoxClassStructure } from '@progress/kendo-react-common';
|
|
19
19
|
import { NumberFormatOptions } from '@progress/kendo-react-intl';
|
|
20
20
|
import { PopupAnimation } from '@progress/kendo-react-popup';
|
|
21
21
|
import PropTypes from 'prop-types';
|
|
@@ -1369,6 +1369,10 @@ export declare interface InputProps extends Omit_2<React_2.InputHTMLAttributes<H
|
|
|
1369
1369
|
* Triggered after value change.
|
|
1370
1370
|
*/
|
|
1371
1371
|
onChange?: (event: InputChangeEvent) => void;
|
|
1372
|
+
/**
|
|
1373
|
+
* @hidden
|
|
1374
|
+
*/
|
|
1375
|
+
unstyled?: InputsClassStructure;
|
|
1372
1376
|
}
|
|
1373
1377
|
|
|
1374
1378
|
/**
|
|
@@ -1851,7 +1855,7 @@ export declare interface MaskedTextBoxProps extends FormComponentProps {
|
|
|
1851
1855
|
/**
|
|
1852
1856
|
* @hidden
|
|
1853
1857
|
*/
|
|
1854
|
-
unstyled?:
|
|
1858
|
+
unstyled?: InputsClassStructure;
|
|
1855
1859
|
}
|
|
1856
1860
|
|
|
1857
1861
|
/**
|
|
@@ -4353,6 +4357,10 @@ export declare interface TextBoxProps extends Omit<React_2.InputHTMLAttributes<H
|
|
|
4353
4357
|
* Represents the `autoFocus` HTML attribute that will be applied to the input element of the TextBox. (Defaults to `false`)
|
|
4354
4358
|
*/
|
|
4355
4359
|
autoFocus?: boolean;
|
|
4360
|
+
/**
|
|
4361
|
+
* @hidden
|
|
4362
|
+
*/
|
|
4363
|
+
unstyled?: InputsClassStructure;
|
|
4356
4364
|
}
|
|
4357
4365
|
|
|
4358
4366
|
/**
|
package/input/Input.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 I=require("react"),a=require("prop-types"),l=require("@progress/kendo-react-common"),P=require("@progress/kendo-react-labels"),L=require("../package-metadata.js");function D(n){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const t in n)if(t!=="default"){const i=Object.getOwnPropertyDescriptor(n,t);Object.defineProperty(e,t,i.get?i:{enumerable:!0,get:()=>n[t]})}}return e.default=n,Object.freeze(e)}const p=D(I),s=class s extends p.Component{constructor(e){super(e),this._input=null,this.focus=()=>{this._input&&this._input.focus()},this.isInvalid=t=>{let i=!1;for(let r in t)t.hasOwnProperty(r)&&(i=i||!!t[r]);return i},this.setValidity=()=>{this._input&&this._input.setCustomValidity&&(this.validity.valid||!this.validityStyles?this._input.classList.remove("k-invalid"):this._input.classList.add("k-invalid"),this._input.setCustomValidity(this.validity.valid?"":this.props.validationMessage||""))},this.handleChange=t=>{this.setState({value:t.target.value}),this.valueDuringOnChange=t.target.value,this.props.onChange&&this.props.onChange.call(void 0,{syntheticEvent:t,nativeEvent:t.nativeEvent,value:t.target.value,target:this}),this.valueDuringOnChange=void 0},this.handleAutoFill=t=>{if(t.animationName==="autoFillStart"){let i=t.target.parentNode;i&&i.classList.contains("k-empty")&&i.classList.remove("k-empty")}},l.validatePackage(L.packageMetadata),this.state={value:this.props.defaultValue||s.defaultProps.defaultValue}}get _inputId(){return this.props.id}get element(){return this._input}get value(){return this.valueDuringOnChange!==void 0?this.valueDuringOnChange:this.props.value!==void 0?this.props.value:this.state.value}get name(){return this.props.name}get validity(){const e={badInput:this._input?this._input.validity.badInput:!1,patternMismatch:this._input?this._input.validity.patternMismatch:!1,rangeOverflow:this._input?this._input.validity.rangeOverflow:!1,rangeUnderflow:this._input?this._input.validity.rangeUnderflow:!1,stepMismatch:this._input?this._input.validity.stepMismatch:!1,tooLong:this._input?this._input.validity.tooLong:!1,typeMismatch:this._input?this._input.validity.typeMismatch:!1,valueMissing:this._input?this._input.validity.valueMissing:!1};return{...e,customError:this.props.validationMessage!==void 0,valid:this.props.valid!==void 0?this.props.valid:this._input?!this.isInvalid(e):!0}}get validityStyles(){return this.props.validityStyles!==void 0?this.props.validityStyles:s.defaultProps.validityStyles}componentDidMount(){this.forceUpdate()}componentDidUpdate(){this.setValidity()}render(){const{className:e,label:t,labelClassName:i,id:r,validationMessage:N,defaultValue:V,valid:k,unstyled:h,visited:w,touched:q,modified:F,autoFocus:m,ariaLabelledBy:b,ariaDescribedBy:_,validityStyles:E,style:c,ariaLabel:C,...o}=this.props,v=r||this._inputId,u=!this.validityStyles||this.validity.valid,M=h&&h.uInput,S=l.classNames(e,l.uInput.input({c:M,invalid:!u,disabled:this.props.disabled})),y=p.createElement("input",{"aria-labelledby":b,"aria-describedby":_,"aria-disabled":this.props.disabled||void 0,"aria-invalid":!u||void 0,"aria-label":C||void 0,...o,style:t?void 0:c,value:this.value,id:v,autoFocus:m,className:S,onChange:this.handleChange,onAnimationStart:this.handleAutoFill,ref:O=>{this._input=O}});return t?p.createElement(P.FloatingLabel,{label:t,labelClassName:i,editorId:v,editorValue:String(this.value),editorValid:u,editorDisabled:o.disabled,editorPlaceholder:o.placeholder,children:y,style:c,dir:o.dir}):y}};s.displayName="Input",s.propTypes={label:a.string,labelClassName:a.string,validationMessage:a.string,required:a.bool,validate:a.bool,id:a.string,ariaLabelledBy:a.string,ariaDescribedBy:a.string,ariaLabel:a.string,autoFocus:a.bool},s.defaultProps={defaultValue:"",required:!1,validityStyles:!0,autoFocus:!1};let d=s;const g=l.createPropsContext(),f=l.withIdHOC(l.withPropsContext(g,l.withUnstyledHOC(d)));f.displayName="KendoReactInput";exports.Input=f;exports.InputPropsContext=g;exports.InputWithoutContext=d;
|
package/input/Input.mjs
CHANGED
|
@@ -6,40 +6,40 @@
|
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
8
|
"use client";
|
|
9
|
-
import * as
|
|
10
|
-
import
|
|
11
|
-
import { validatePackage as
|
|
12
|
-
import { FloatingLabel as
|
|
13
|
-
import { packageMetadata as
|
|
14
|
-
const
|
|
15
|
-
constructor(
|
|
16
|
-
super(
|
|
9
|
+
import * as d from "react";
|
|
10
|
+
import i from "prop-types";
|
|
11
|
+
import { validatePackage as C, classNames as M, uInput as S, createPropsContext as I, withIdHOC as L, withPropsContext as V, withUnstyledHOC as N } from "@progress/kendo-react-common";
|
|
12
|
+
import { FloatingLabel as P } from "@progress/kendo-react-labels";
|
|
13
|
+
import { packageMetadata as D } from "../package-metadata.mjs";
|
|
14
|
+
const s = class s extends d.Component {
|
|
15
|
+
constructor(e) {
|
|
16
|
+
super(e), this._input = null, this.focus = () => {
|
|
17
17
|
this._input && this._input.focus();
|
|
18
|
-
}, this.isInvalid = (
|
|
18
|
+
}, this.isInvalid = (t) => {
|
|
19
19
|
let a = !1;
|
|
20
|
-
for (let l in
|
|
21
|
-
|
|
20
|
+
for (let l in t)
|
|
21
|
+
t.hasOwnProperty(l) && (a = a || !!t[l]);
|
|
22
22
|
return a;
|
|
23
23
|
}, this.setValidity = () => {
|
|
24
24
|
this._input && this._input.setCustomValidity && (this.validity.valid || !this.validityStyles ? this._input.classList.remove("k-invalid") : this._input.classList.add("k-invalid"), this._input.setCustomValidity(
|
|
25
25
|
this.validity.valid ? "" : this.props.validationMessage || ""
|
|
26
26
|
));
|
|
27
|
-
}, this.handleChange = (
|
|
27
|
+
}, this.handleChange = (t) => {
|
|
28
28
|
this.setState({
|
|
29
|
-
value:
|
|
30
|
-
}), this.valueDuringOnChange =
|
|
31
|
-
syntheticEvent:
|
|
32
|
-
nativeEvent:
|
|
33
|
-
value:
|
|
29
|
+
value: t.target.value
|
|
30
|
+
}), this.valueDuringOnChange = t.target.value, this.props.onChange && this.props.onChange.call(void 0, {
|
|
31
|
+
syntheticEvent: t,
|
|
32
|
+
nativeEvent: t.nativeEvent,
|
|
33
|
+
value: t.target.value,
|
|
34
34
|
target: this
|
|
35
35
|
}), this.valueDuringOnChange = void 0;
|
|
36
|
-
}, this.handleAutoFill = (
|
|
37
|
-
if (
|
|
38
|
-
let a =
|
|
36
|
+
}, this.handleAutoFill = (t) => {
|
|
37
|
+
if (t.animationName === "autoFillStart") {
|
|
38
|
+
let a = t.target.parentNode;
|
|
39
39
|
a && a.classList.contains("k-empty") && a.classList.remove("k-empty");
|
|
40
40
|
}
|
|
41
|
-
},
|
|
42
|
-
value: this.props.defaultValue ||
|
|
41
|
+
}, C(D), this.state = {
|
|
42
|
+
value: this.props.defaultValue || s.defaultProps.defaultValue
|
|
43
43
|
};
|
|
44
44
|
}
|
|
45
45
|
get _inputId() {
|
|
@@ -67,7 +67,7 @@ const e = class e extends r.Component {
|
|
|
67
67
|
* Represents the validity state into which the Input is set.
|
|
68
68
|
*/
|
|
69
69
|
get validity() {
|
|
70
|
-
const
|
|
70
|
+
const e = {
|
|
71
71
|
badInput: this._input ? this._input.validity.badInput : !1,
|
|
72
72
|
patternMismatch: this._input ? this._input.validity.patternMismatch : !1,
|
|
73
73
|
rangeOverflow: this._input ? this._input.validity.rangeOverflow : !1,
|
|
@@ -78,16 +78,16 @@ const e = class e extends r.Component {
|
|
|
78
78
|
valueMissing: this._input ? this._input.validity.valueMissing : !1
|
|
79
79
|
};
|
|
80
80
|
return {
|
|
81
|
-
...
|
|
81
|
+
...e,
|
|
82
82
|
customError: this.props.validationMessage !== void 0,
|
|
83
|
-
valid: this.props.valid !== void 0 ? this.props.valid : this._input ? !this.isInvalid(
|
|
83
|
+
valid: this.props.valid !== void 0 ? this.props.valid : this._input ? !this.isInvalid(e) : !0
|
|
84
84
|
};
|
|
85
85
|
}
|
|
86
86
|
/**
|
|
87
87
|
* @hidden
|
|
88
88
|
*/
|
|
89
89
|
get validityStyles() {
|
|
90
|
-
return this.props.validityStyles !== void 0 ? this.props.validityStyles :
|
|
90
|
+
return this.props.validityStyles !== void 0 ? this.props.validityStyles : s.defaultProps.validityStyles;
|
|
91
91
|
}
|
|
92
92
|
/**
|
|
93
93
|
* @hidden
|
|
@@ -106,84 +106,91 @@ const e = class e extends r.Component {
|
|
|
106
106
|
*/
|
|
107
107
|
render() {
|
|
108
108
|
const {
|
|
109
|
-
className:
|
|
110
|
-
label:
|
|
109
|
+
className: e,
|
|
110
|
+
label: t,
|
|
111
111
|
labelClassName: a,
|
|
112
112
|
id: l,
|
|
113
|
-
validationMessage:
|
|
114
|
-
defaultValue:
|
|
115
|
-
valid:
|
|
113
|
+
validationMessage: F,
|
|
114
|
+
defaultValue: k,
|
|
115
|
+
valid: E,
|
|
116
|
+
unstyled: p,
|
|
116
117
|
// Removed to support direct use in Form Field component
|
|
117
|
-
visited:
|
|
118
|
-
touched:
|
|
119
|
-
modified:
|
|
120
|
-
autoFocus:
|
|
121
|
-
ariaLabelledBy:
|
|
122
|
-
ariaDescribedBy:
|
|
123
|
-
validityStyles:
|
|
124
|
-
style:
|
|
125
|
-
ariaLabel:
|
|
118
|
+
visited: B,
|
|
119
|
+
touched: U,
|
|
120
|
+
modified: x,
|
|
121
|
+
autoFocus: c,
|
|
122
|
+
ariaLabelledBy: y,
|
|
123
|
+
ariaDescribedBy: g,
|
|
124
|
+
validityStyles: A,
|
|
125
|
+
style: u,
|
|
126
|
+
ariaLabel: m,
|
|
126
127
|
...n
|
|
127
|
-
} = this.props,
|
|
128
|
+
} = this.props, h = l || this._inputId, r = !this.validityStyles || this.validity.valid, f = p && p.uInput, b = M(e, S.input(
|
|
129
|
+
{
|
|
130
|
+
c: f,
|
|
131
|
+
invalid: !r,
|
|
132
|
+
disabled: this.props.disabled
|
|
133
|
+
}
|
|
134
|
+
)), v = /* @__PURE__ */ d.createElement(
|
|
128
135
|
"input",
|
|
129
136
|
{
|
|
130
|
-
"aria-labelledby":
|
|
131
|
-
"aria-describedby":
|
|
137
|
+
"aria-labelledby": y,
|
|
138
|
+
"aria-describedby": g,
|
|
132
139
|
"aria-disabled": this.props.disabled || void 0,
|
|
133
|
-
"aria-invalid": !
|
|
134
|
-
"aria-label":
|
|
140
|
+
"aria-invalid": !r || void 0,
|
|
141
|
+
"aria-label": m || void 0,
|
|
135
142
|
...n,
|
|
136
|
-
style:
|
|
143
|
+
style: t ? void 0 : u,
|
|
137
144
|
value: this.value,
|
|
138
|
-
id:
|
|
139
|
-
autoFocus:
|
|
140
|
-
className:
|
|
145
|
+
id: h,
|
|
146
|
+
autoFocus: c,
|
|
147
|
+
className: b,
|
|
141
148
|
onChange: this.handleChange,
|
|
142
149
|
onAnimationStart: this.handleAutoFill,
|
|
143
|
-
ref: (
|
|
144
|
-
this._input =
|
|
150
|
+
ref: (_) => {
|
|
151
|
+
this._input = _;
|
|
145
152
|
}
|
|
146
153
|
}
|
|
147
154
|
);
|
|
148
|
-
return
|
|
149
|
-
|
|
155
|
+
return t ? /* @__PURE__ */ d.createElement(
|
|
156
|
+
P,
|
|
150
157
|
{
|
|
151
|
-
label:
|
|
158
|
+
label: t,
|
|
152
159
|
labelClassName: a,
|
|
153
|
-
editorId:
|
|
160
|
+
editorId: h,
|
|
154
161
|
editorValue: String(this.value),
|
|
155
|
-
editorValid:
|
|
162
|
+
editorValid: r,
|
|
156
163
|
editorDisabled: n.disabled,
|
|
157
164
|
editorPlaceholder: n.placeholder,
|
|
158
|
-
children:
|
|
159
|
-
style:
|
|
165
|
+
children: v,
|
|
166
|
+
style: u,
|
|
160
167
|
dir: n.dir
|
|
161
168
|
}
|
|
162
|
-
) :
|
|
169
|
+
) : v;
|
|
163
170
|
}
|
|
164
171
|
};
|
|
165
|
-
|
|
166
|
-
label:
|
|
167
|
-
labelClassName:
|
|
168
|
-
validationMessage:
|
|
169
|
-
required:
|
|
170
|
-
validate:
|
|
171
|
-
id:
|
|
172
|
-
ariaLabelledBy:
|
|
173
|
-
ariaDescribedBy:
|
|
174
|
-
ariaLabel:
|
|
175
|
-
autoFocus:
|
|
176
|
-
},
|
|
172
|
+
s.displayName = "Input", s.propTypes = {
|
|
173
|
+
label: i.string,
|
|
174
|
+
labelClassName: i.string,
|
|
175
|
+
validationMessage: i.string,
|
|
176
|
+
required: i.bool,
|
|
177
|
+
validate: i.bool,
|
|
178
|
+
id: i.string,
|
|
179
|
+
ariaLabelledBy: i.string,
|
|
180
|
+
ariaDescribedBy: i.string,
|
|
181
|
+
ariaLabel: i.string,
|
|
182
|
+
autoFocus: i.bool
|
|
183
|
+
}, s.defaultProps = {
|
|
177
184
|
defaultValue: "",
|
|
178
185
|
required: !1,
|
|
179
186
|
validityStyles: !0,
|
|
180
187
|
autoFocus: !1
|
|
181
188
|
};
|
|
182
|
-
let
|
|
183
|
-
const
|
|
184
|
-
|
|
189
|
+
let o = s;
|
|
190
|
+
const O = I(), w = L(V(O, N(o)));
|
|
191
|
+
w.displayName = "KendoReactInput";
|
|
185
192
|
export {
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
193
|
+
w as Input,
|
|
194
|
+
O as InputPropsContext,
|
|
195
|
+
o as InputWithoutContext
|
|
189
196
|
};
|
package/input/InputPrefix.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 m=require("react"),r=require("@progress/kendo-react-common");function f(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const s in e)if(s!=="default"){const a=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(t,s,a.get?a:{enumerable:!0,get:()=>e[s]})}}return t.default=e,Object.freeze(t)}const n=f(m),u=n.forwardRef(({orientation:e="horizontal",...t},s)=>{const a=n.useRef(null),o=n.useRef(null),c=r.useUnstyled(),l=c&&c.uTextBox;n.useImperativeHandle(a,()=>({element:o.current})),n.useImperativeHandle(s,()=>a.current);const i=n.useMemo(()=>r.classNames(r.uTextBox.prefix({c:l,orientation:e}),t.className),[t.className,l,e]);return n.createElement("span",{...t,className:i})});u.displayName="KendoReactInputPrefix";exports.InputPrefix=u;
|
package/input/InputPrefix.mjs
CHANGED
|
@@ -6,19 +6,27 @@
|
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
8
|
"use client";
|
|
9
|
-
import { classNames as l } from "@progress/kendo-react-common";
|
|
10
9
|
import * as e from "react";
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
() => ({ element: s.current })
|
|
16
|
-
), e.useImperativeHandle(
|
|
10
|
+
import { useUnstyled as u, classNames as o, uTextBox as x } from "@progress/kendo-react-common";
|
|
11
|
+
const f = e.forwardRef(({ orientation: t = "horizontal", ...s }, r) => {
|
|
12
|
+
const a = e.useRef(null), c = e.useRef(null), n = u(), l = n && n.uTextBox;
|
|
13
|
+
e.useImperativeHandle(
|
|
17
14
|
a,
|
|
18
|
-
() =>
|
|
19
|
-
),
|
|
15
|
+
() => ({ element: c.current })
|
|
16
|
+
), e.useImperativeHandle(
|
|
17
|
+
r,
|
|
18
|
+
() => a.current
|
|
19
|
+
);
|
|
20
|
+
const m = e.useMemo(
|
|
21
|
+
() => o(x.prefix({
|
|
22
|
+
c: l,
|
|
23
|
+
orientation: t
|
|
24
|
+
}), s.className),
|
|
25
|
+
[s.className, l, t]
|
|
26
|
+
);
|
|
27
|
+
return /* @__PURE__ */ e.createElement("span", { ...s, className: m });
|
|
20
28
|
});
|
|
21
|
-
|
|
29
|
+
f.displayName = "KendoReactInputPrefix";
|
|
22
30
|
export {
|
|
23
|
-
|
|
31
|
+
f as InputPrefix
|
|
24
32
|
};
|
package/input/InputSuffix.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 i=require("react"),u=require("@progress/kendo-react-common");function m(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const s in e)if(s!=="default"){const a=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(t,s,a.get?a:{enumerable:!0,get:()=>e[s]})}}return t.default=e,Object.freeze(t)}const n=m(i),r=n.forwardRef(({orientation:e="horizontal",...t},s)=>{const a=n.useRef(null),o=n.useRef(null),c=u.useUnstyled(),l=c&&c.uTextBox;n.useImperativeHandle(a,()=>({element:o.current})),n.useImperativeHandle(s,()=>a.current);const f=n.useMemo(()=>u.classNames(u.uTextBox.suffix({c:l,orientation:e}),t.className),[t.className,l,e]);return n.createElement("span",{...t,className:f})});r.displayName="KendoReactInputSuffix";exports.InputSuffix=r;
|
package/input/InputSuffix.mjs
CHANGED
|
@@ -7,18 +7,26 @@
|
|
|
7
7
|
*/
|
|
8
8
|
"use client";
|
|
9
9
|
import * as e from "react";
|
|
10
|
-
import { classNames as r } from "@progress/kendo-react-common";
|
|
11
|
-
const
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
() => ({ element:
|
|
10
|
+
import { useUnstyled as o, classNames as r, uTextBox as f } from "@progress/kendo-react-common";
|
|
11
|
+
const x = e.forwardRef(({ orientation: t = "horizontal", ...s }, u) => {
|
|
12
|
+
const a = e.useRef(null), c = e.useRef(null), n = o(), l = n && n.uTextBox;
|
|
13
|
+
e.useImperativeHandle(
|
|
14
|
+
a,
|
|
15
|
+
() => ({ element: c.current })
|
|
16
16
|
), e.useImperativeHandle(
|
|
17
|
-
|
|
18
|
-
() =>
|
|
19
|
-
)
|
|
17
|
+
u,
|
|
18
|
+
() => a.current
|
|
19
|
+
);
|
|
20
|
+
const m = e.useMemo(
|
|
21
|
+
() => r(f.suffix({
|
|
22
|
+
c: l,
|
|
23
|
+
orientation: t
|
|
24
|
+
}), s.className),
|
|
25
|
+
[s.className, l, t]
|
|
26
|
+
);
|
|
27
|
+
return /* @__PURE__ */ e.createElement("span", { ...s, className: m });
|
|
20
28
|
});
|
|
21
|
-
|
|
29
|
+
x.displayName = "KendoReactInputSuffix";
|
|
22
30
|
export {
|
|
23
|
-
|
|
31
|
+
x as InputSuffix
|
|
24
32
|
};
|
package/package-metadata.mjs
CHANGED
|
@@ -10,7 +10,7 @@ const e = {
|
|
|
10
10
|
name: "@progress/kendo-react-inputs",
|
|
11
11
|
productName: "KendoReact",
|
|
12
12
|
productCodes: ["KENDOUIREACT", "KENDOUICOMPLETE"],
|
|
13
|
-
publishDate:
|
|
13
|
+
publishDate: 1724392762,
|
|
14
14
|
version: "",
|
|
15
15
|
licensingDocsUrl: "https://www.telerik.com/kendo-react-ui/components/my-license/"
|
|
16
16
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-react-inputs",
|
|
3
|
-
"version": "8.3.0-develop.
|
|
3
|
+
"version": "8.3.0-develop.7",
|
|
4
4
|
"description": "React Inputs offer a customizable interface for users to enter and pick different information. KendoReact Input package",
|
|
5
5
|
"author": "Progress",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
@@ -25,13 +25,13 @@
|
|
|
25
25
|
"@progress/kendo-drawing": "^1.20.1",
|
|
26
26
|
"@progress/kendo-inputs-common": "^3.1.0",
|
|
27
27
|
"@progress/kendo-licensing": "^1.3.4",
|
|
28
|
-
"@progress/kendo-react-animation": "8.3.0-develop.
|
|
29
|
-
"@progress/kendo-react-buttons": "8.3.0-develop.
|
|
30
|
-
"@progress/kendo-react-common": "8.3.0-develop.
|
|
31
|
-
"@progress/kendo-react-dialogs": "8.3.0-develop.
|
|
32
|
-
"@progress/kendo-react-intl": "8.3.0-develop.
|
|
33
|
-
"@progress/kendo-react-labels": "8.3.0-develop.
|
|
34
|
-
"@progress/kendo-react-popup": "8.3.0-develop.
|
|
28
|
+
"@progress/kendo-react-animation": "8.3.0-develop.7",
|
|
29
|
+
"@progress/kendo-react-buttons": "8.3.0-develop.7",
|
|
30
|
+
"@progress/kendo-react-common": "8.3.0-develop.7",
|
|
31
|
+
"@progress/kendo-react-dialogs": "8.3.0-develop.7",
|
|
32
|
+
"@progress/kendo-react-intl": "8.3.0-develop.7",
|
|
33
|
+
"@progress/kendo-react-labels": "8.3.0-develop.7",
|
|
34
|
+
"@progress/kendo-react-popup": "8.3.0-develop.7",
|
|
35
35
|
"@progress/kendo-svg-icons": "^3.0.0",
|
|
36
36
|
"react": "^16.8.2 || ^17.0.0 || ^18.0.0",
|
|
37
37
|
"react-dom": "^16.8.2 || ^17.0.0 || ^18.0.0"
|
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 P=require("react"),c=require("prop-types"),l=require("@progress/kendo-react-common"),j=require("../package-metadata.js");function z(e){const s=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(s,n,a.get?a:{enumerable:!0,get:()=>e[n]})}}return s.default=e,Object.freeze(s)}const t=z(P),d=t.forwardRef((e,s)=>{l.validatePackage(j.packageMetadata);const n=t.useRef(null),a=t.useRef(null),r=t.useRef(),f=l.useUnstyled(),i=f&&f.uTextBox,b=t.useCallback(()=>{var u;return r.current!==void 0?r.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 b()}})),t.useImperativeHandle(s,()=>a.current);const{size:m=o.size,fillMode:g=o.fillMode,rounded:v=o.rounded,autoFocus:h=o.autoFocus,className:x,dir:B,style:F,prefix:T=o.prefix,suffix:_=o.suffix,valid:w,modified:D,touched:H,visited:I,...M}=e,[O]=l.useCustomComponent(T),[R]=l.useCustomComponent(_),[C,y]=t.useState(!1),N=u=>{y(!0)},S=u=>{y(!1)},k=t.useCallback(u=>{r.current=u.target.value,e.onChange&&e.onChange.call(void 0,{syntheticEvent:u,nativeEvent:u.nativeEvent,value:u.target.value,target:a.current}),r.current=void 0},[e.onChange]),{onFocus:p,onBlur:q}=l.useAsyncFocusBlur({onFocus:N,onBlur:S,onSyncFocus:e.onFocus,onSyncBlur:e.onBlur}),E=t.useMemo(()=>l.classNames(l.uTextBox.wrapper({c:i,rounded:v,fillMode:g,size:m,focused:C,required:e.required,disabled:e.disabled,invalid:e.valid===!1}),x),[x,g,C,e.disabled,e.required,e.valid,v,m,i]);return t.createElement("span",{style:F,dir:B,className:E,onFocus:p,onBlur:q},t.createElement(O,null),t.createElement("input",{ref:n,className:l.classNames(l.uTextBox.input({c:i})),autoFocus:h,...M,onChange:k}),t.createElement(R,null))}),o={prefix:e=>null,suffix:e=>null,size:"medium",rounded:"medium",fillMode:"solid",autoFocus:!1};d.propTypes={size:c.oneOf([null,"small","medium","large"]),rounded:c.oneOf([null,"small","medium","large","full"]),fillMode:c.oneOf([null,"solid","flat","outline"]),autoFocus:c.bool};d.displayName="KendoReactTextBoxComponent";exports.TextBox=d;
|