@progress/kendo-react-inputs 8.3.0-develop.3 → 8.3.0-develop.5
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 +8 -3
- package/index.d.ts +8 -3
- package/maskedtextbox/MaskedTextBox.js +1 -1
- package/maskedtextbox/MaskedTextBox.mjs +69 -69
- package/package-metadata.mjs +1 -1
- package/package.json +8 -8
- package/radiobutton/RadioButton.js +1 -1
- package/radiobutton/RadioButton.mjs +80 -80
- package/radiobutton/RadioGroup.js +1 -1
- package/radiobutton/RadioGroup.mjs +76 -71
package/index.d.mts
CHANGED
|
@@ -15,6 +15,7 @@ import { HTMLAttributes } from 'react';
|
|
|
15
15
|
import { IconHandle } from '@progress/kendo-react-common';
|
|
16
16
|
import { IconProps } from '@progress/kendo-react-common';
|
|
17
17
|
import { JSX as JSX_2 } from 'react/jsx-runtime';
|
|
18
|
+
import { MaskedTextBoxClassStructure } from '@progress/kendo-react-common';
|
|
18
19
|
import { NumberFormatOptions } from '@progress/kendo-react-intl';
|
|
19
20
|
import { PopupAnimation } from '@progress/kendo-react-popup';
|
|
20
21
|
import PropTypes from 'prop-types';
|
|
@@ -1306,7 +1307,7 @@ export declare const InputPrefix: React_2.ForwardRefExoticComponent<React_2.HTML
|
|
|
1306
1307
|
/**
|
|
1307
1308
|
* Sets the `orientation` property of the `InputPrefix` component.
|
|
1308
1309
|
*/
|
|
1309
|
-
orientation?: "
|
|
1310
|
+
orientation?: "vertical" | "horizontal" | undefined;
|
|
1310
1311
|
} & React_2.RefAttributes<InputPrefixHandle>>;
|
|
1311
1312
|
|
|
1312
1313
|
/**
|
|
@@ -1385,7 +1386,7 @@ export declare const InputSeparator: React_2.ForwardRefExoticComponent<React_2.H
|
|
|
1385
1386
|
/**
|
|
1386
1387
|
* Sets the `orientation` property of the `InputSeparator` component.
|
|
1387
1388
|
*/
|
|
1388
|
-
orientation?: "
|
|
1389
|
+
orientation?: "vertical" | "horizontal" | undefined;
|
|
1389
1390
|
} & React_2.RefAttributes<InputSeparatorHandle>>;
|
|
1390
1391
|
|
|
1391
1392
|
/**
|
|
@@ -1457,7 +1458,7 @@ export declare const InputSuffix: React_2.ForwardRefExoticComponent<React_2.HTML
|
|
|
1457
1458
|
/**
|
|
1458
1459
|
* Sets the `orientation` property of the `InputSuffix` component.
|
|
1459
1460
|
*/
|
|
1460
|
-
orientation?: "
|
|
1461
|
+
orientation?: "vertical" | "horizontal" | undefined;
|
|
1461
1462
|
} & React_2.RefAttributes<InputSuffixHandle>>;
|
|
1462
1463
|
|
|
1463
1464
|
/**
|
|
@@ -1847,6 +1848,10 @@ export declare interface MaskedTextBoxProps extends FormComponentProps {
|
|
|
1847
1848
|
* Represents the `autoFocus` HTML attribute that will be applied to the input element of the MaskedTextBox. (Defaults to `false`)
|
|
1848
1849
|
*/
|
|
1849
1850
|
autoFocus?: boolean;
|
|
1851
|
+
/**
|
|
1852
|
+
* @hidden
|
|
1853
|
+
*/
|
|
1854
|
+
unstyled?: MaskedTextBoxClassStructure;
|
|
1850
1855
|
}
|
|
1851
1856
|
|
|
1852
1857
|
/**
|
package/index.d.ts
CHANGED
|
@@ -15,6 +15,7 @@ import { HTMLAttributes } from 'react';
|
|
|
15
15
|
import { IconHandle } from '@progress/kendo-react-common';
|
|
16
16
|
import { IconProps } from '@progress/kendo-react-common';
|
|
17
17
|
import { JSX as JSX_2 } from 'react/jsx-runtime';
|
|
18
|
+
import { MaskedTextBoxClassStructure } from '@progress/kendo-react-common';
|
|
18
19
|
import { NumberFormatOptions } from '@progress/kendo-react-intl';
|
|
19
20
|
import { PopupAnimation } from '@progress/kendo-react-popup';
|
|
20
21
|
import PropTypes from 'prop-types';
|
|
@@ -1306,7 +1307,7 @@ export declare const InputPrefix: React_2.ForwardRefExoticComponent<React_2.HTML
|
|
|
1306
1307
|
/**
|
|
1307
1308
|
* Sets the `orientation` property of the `InputPrefix` component.
|
|
1308
1309
|
*/
|
|
1309
|
-
orientation?: "
|
|
1310
|
+
orientation?: "vertical" | "horizontal" | undefined;
|
|
1310
1311
|
} & React_2.RefAttributes<InputPrefixHandle>>;
|
|
1311
1312
|
|
|
1312
1313
|
/**
|
|
@@ -1385,7 +1386,7 @@ export declare const InputSeparator: React_2.ForwardRefExoticComponent<React_2.H
|
|
|
1385
1386
|
/**
|
|
1386
1387
|
* Sets the `orientation` property of the `InputSeparator` component.
|
|
1387
1388
|
*/
|
|
1388
|
-
orientation?: "
|
|
1389
|
+
orientation?: "vertical" | "horizontal" | undefined;
|
|
1389
1390
|
} & React_2.RefAttributes<InputSeparatorHandle>>;
|
|
1390
1391
|
|
|
1391
1392
|
/**
|
|
@@ -1457,7 +1458,7 @@ export declare const InputSuffix: React_2.ForwardRefExoticComponent<React_2.HTML
|
|
|
1457
1458
|
/**
|
|
1458
1459
|
* Sets the `orientation` property of the `InputSuffix` component.
|
|
1459
1460
|
*/
|
|
1460
|
-
orientation?: "
|
|
1461
|
+
orientation?: "vertical" | "horizontal" | undefined;
|
|
1461
1462
|
} & React_2.RefAttributes<InputSuffixHandle>>;
|
|
1462
1463
|
|
|
1463
1464
|
/**
|
|
@@ -1847,6 +1848,10 @@ export declare interface MaskedTextBoxProps extends FormComponentProps {
|
|
|
1847
1848
|
* Represents the `autoFocus` HTML attribute that will be applied to the input element of the MaskedTextBox. (Defaults to `false`)
|
|
1848
1849
|
*/
|
|
1849
1850
|
autoFocus?: boolean;
|
|
1851
|
+
/**
|
|
1852
|
+
* @hidden
|
|
1853
|
+
*/
|
|
1854
|
+
unstyled?: MaskedTextBoxClassStructure;
|
|
1850
1855
|
}
|
|
1851
1856
|
|
|
1852
1857
|
/**
|
|
@@ -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 S=require("react"),e=require("prop-types"),O=require("./masking.service.js"),h=require("./utils.js"),o=require("@progress/kendo-react-common"),M=require("@progress/kendo-react-labels"),E=require("../package-metadata.js");function V(c){const s=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(c){for(const t in c)if(t!=="default"){const i=Object.getOwnPropertyDescriptor(c,t);Object.defineProperty(s,t,i.get?i:{enumerable:!0,get:()=>c[t]})}}return s.default=c,Object.freeze(s)}const p=V(S),l=class l extends p.Component{constructor(s){super(s),this.state={},this._inputId=`k_${this.props.id}`,this._service=new O.MaskingService,this._isPasted=!1,this._selection=[null,null],this._input=null,this.focus=()=>{this._input&&this._input.focus()},this.pasteHandler=t=>{const{selectionStart:i,selectionEnd:a}=t.target;a!==i&&(this._isPasted=!0,this._selection=[i||0,a||0])},this.onChangeHandler=t=>{const i=t.currentTarget,a=i.value,n=this._selection[0]||0,r=this._selection[1]||0;if(!this.props.mask){this._isPasted=!1,this._selection=[null,null],this.triggerOnChange(a,t);return}const u=this.value;let d;if(this._isPasted){this._isPasted=!1;const f=u.length-r,v=a.length-f;d=this._service.maskInRange(a.slice(n,v),u,n,r)}else d=this._service.maskInput(a,u,i.selectionStart||0);this._selection=[d.selection,d.selection],this.triggerOnChange(d.value,t)},this.focusHandler=t=>{this.state.focused||(this.setState({focused:!0}),this.props.onFocus&&this.props.onFocus.call(void 0,{target:this,syntheticEvent:t,nativeEvent:t.nativeEvent}))},this.blurHandler=t=>{this.state.focused&&(this.setState({focused:!1}),this.props.onBlur&&this.props.onBlur.call(void 0,{target:this,syntheticEvent:t,nativeEvent:t.nativeEvent}))},this.setValidity=()=>{this.element&&this.element.setCustomValidity(this.validity.valid?"":this.props.validationMessage||"")},o.validatePackage(E.packageMetadata)}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!==void 0?this.state.value:this.props.defaultValue!==void 0?this.props.defaultValue:""}get rawValue(){return this._service.rawValue(this.value)}get validity(){const s=this.value,t=this._service.validationValue(s),i=this.props.validationMessage!==void 0,a=this.props.valid!==void 0?this.props.valid:(!this.required||!!t)&&(!this.props.maskValidation||!this.props.prompt||s.indexOf(this.props.prompt)===-1);return{customError:i,valid:a,valueMissing:!t}}get validityStyles(){return this.props.validityStyles!==void 0?this.props.validityStyles:l.defaultProps.validityStyles}get required(){return this.props.required!==void 0?this.props.required:l.defaultProps.required}get name(){return this.props.name}componentDidUpdate(s,t){if(this.element&&this.state.focused&&t.focused){let[i,a]=this._selection;const n=s.selection,r=this.props.selection;(!n&&r||n&&r&&(n.start!==r.start||n.end!==r.end))&&(i=r.start,a=r.end),i!==null&&a!==null&&this.element.setSelectionRange(i,a)}h.maskingChanged(s,this.props)&&this.updateService(),this.setValidity()}componentDidMount(){this.updateService(),this.setValidity()}render(){const{size:s=l.defaultProps.size,fillMode:t=l.defaultProps.fillMode,rounded:i=l.defaultProps.rounded,autoFocus:a=l.defaultProps.autoFocus,unstyled:n,className:r}=this.props,u=this.props.id||this._inputId,d=!this.validityStyles||this.validity.valid,f=this.props.style||{},v=n&&n.uMaskedTextBox,{prefix:x=l.defaultProps.prefix,suffix:P=l.defaultProps.suffix}=this.props,[C]=o.useCustomComponent(x),[k]=o.useCustomComponent(P),m=p.createElement("span",{dir:this.props.dir,className:o.classNames(o.uMaskedTextBox.wrapper({c:v,invalid:!d,disabled:this.props.disabled,size:s,fillMode:t,rounded:i}),r),style:this.props.label?f:{width:this.props.width,...f}},p.createElement(C,null),p.createElement("input",{type:"text",autoComplete:"off",autoCorrect:"off",autoCapitalize:"off",autoFocus:a,spellCheck:!1,className:o.classNames(o.uMaskedTextBox.input({c:v})),value:this.value,id:u,"aria-labelledby":this.props.ariaLabelledBy,"aria-describedby":this.props.ariaDescribedBy,"aria-placeholder":this.props.mask,name:this.props.name,tabIndex:o.getTabIndex(this.props.tabIndex,this.props.disabled,!0),accessKey:this.props.accessKey,title:this.props.title,disabled:this.props.disabled||void 0,readOnly:this.props.readonly||void 0,placeholder:this.props.placeholder,ref:_=>this._input=_,onChange:this.onChangeHandler,onPaste:this.pasteHandler,onFocus:this.focusHandler,onBlur:this.blurHandler,onDragStart:h.returnFalse,onDrop:h.returnFalse}),p.createElement(k,null));return this.props.label?p.createElement(M.FloatingLabel,{label:this.props.label,editorId:u,editorValue:this.value,editorValid:d,editorDisabled:this.props.disabled,editorPlaceholder:this.props.placeholder,children:m,style:{width:this.props.width},dir:this.props.dir}):m}triggerOnChange(s,t){if(this.setState({value:s}),this.props.onChange){this._valueDuringOnChange=s;const i={syntheticEvent:t,nativeEvent:t.nativeEvent,selectionStart:this._selection[0],selectionEnd:this._selection[1],target:this,value:this.value};this.props.onChange.call(void 0,i),this._valueDuringOnChange=void 0}}updateService(s){const t=Object.assign({includeLiterals:this.props.includeLiterals,mask:this.props.mask,prompt:this.props.prompt,promptPlaceholder:this.props.promptPlaceholder,rules:this.rules},s);this._service.update(t)}get rules(){return Object.assign({},h.defaultRules,this.props.rules)}};l.displayName="MaskedTextBox",l.propTypes={value:e.string,defaultValue:e.string,placeholder:e.string,title:e.string,dir:e.string,id:e.string,style:e.object,className:e.string,prefix:e.any,suffix:e.any,ariaLabelledBy:e.string,ariaDescribedBy:e.string,width:e.oneOfType([e.string,e.number]),tabIndex:e.number,accessKey:e.string,disabled:e.bool,readonly:e.bool,prompt:e.string,promptPlaceholder:e.string,includeLiterals:e.bool,maskValidation:e.bool,mask:e.string,rules:function(s,t,i){const a=s.rules;return a!==void 0&&!Object.entries(a).some(r=>typeof r!="string"||!(a[r]instanceof RegExp))?new Error("Invalid prop `"+t+"` supplied to `"+i+"`. Validation failed."):null},selection:e.shape({start:e.number.isRequired,end:e.number.isRequired}),name:e.string,label:e.string,validationMessage:e.string,required:e.bool,valid:e.bool,validityStyles:e.bool,onChange:e.func,size:e.oneOf([null,"small","medium","large"]),rounded:e.oneOf([null,"small","medium","large","full"]),fillMode:e.oneOf([null,"solid","flat","outline"]),autoFocus:e.bool},l.defaultProps={prompt:"_",promptPlaceholder:" ",includeLiterals:!1,maskValidation:!0,rules:h.defaultRules,required:!1,validityStyles:!0,prefix:s=>null,suffix:s=>null,size:"medium",rounded:"medium",fillMode:"solid",autoFocus:!1};let g=l;const y=o.createPropsContext(),b=o.withIdHOC(o.withPropsContext(y,o.withUnstyledHOC(g)));b.displayName="KendoReactMaskedTextBox";exports.MaskedTextBox=b;exports.MaskedTextBoxPropsContext=y;exports.MaskedTextBoxWithoutContext=g;
|
|
@@ -8,32 +8,32 @@
|
|
|
8
8
|
"use client";
|
|
9
9
|
import * as d from "react";
|
|
10
10
|
import e from "prop-types";
|
|
11
|
-
import { MaskingService as
|
|
12
|
-
import { defaultRules as v, maskingChanged as
|
|
13
|
-
import { validatePackage as
|
|
14
|
-
import { FloatingLabel as
|
|
15
|
-
import { packageMetadata as
|
|
11
|
+
import { MaskingService as k } from "./masking.service.mjs";
|
|
12
|
+
import { defaultRules as v, maskingChanged as E, returnFalse as m } from "./utils.mjs";
|
|
13
|
+
import { validatePackage as O, useCustomComponent as g, classNames as y, uMaskedTextBox as b, getTabIndex as V, createPropsContext as w, withIdHOC as M, withPropsContext as I, withUnstyledHOC as D } from "@progress/kendo-react-common";
|
|
14
|
+
import { FloatingLabel as H } from "@progress/kendo-react-labels";
|
|
15
|
+
import { packageMetadata as q } from "../package-metadata.mjs";
|
|
16
16
|
const l = class l extends d.Component {
|
|
17
|
-
constructor(
|
|
18
|
-
super(
|
|
17
|
+
constructor(i) {
|
|
18
|
+
super(i), this.state = {}, this._inputId = `k_${this.props.id}`, this._service = new k(), this._isPasted = !1, this._selection = [null, null], this._input = null, this.focus = () => {
|
|
19
19
|
this._input && this._input.focus();
|
|
20
20
|
}, this.pasteHandler = (t) => {
|
|
21
|
-
const { selectionStart:
|
|
22
|
-
|
|
21
|
+
const { selectionStart: r, selectionEnd: s } = t.target;
|
|
22
|
+
s !== r && (this._isPasted = !0, this._selection = [r || 0, s || 0]);
|
|
23
23
|
}, this.onChangeHandler = (t) => {
|
|
24
|
-
const
|
|
24
|
+
const r = t.currentTarget, s = r.value, o = this._selection[0] || 0, a = this._selection[1] || 0;
|
|
25
25
|
if (!this.props.mask) {
|
|
26
|
-
this._isPasted = !1, this._selection = [null, null], this.triggerOnChange(
|
|
26
|
+
this._isPasted = !1, this._selection = [null, null], this.triggerOnChange(s, t);
|
|
27
27
|
return;
|
|
28
28
|
}
|
|
29
29
|
const p = this.value;
|
|
30
30
|
let n;
|
|
31
31
|
if (this._isPasted) {
|
|
32
32
|
this._isPasted = !1;
|
|
33
|
-
const u = p.length - a, h =
|
|
34
|
-
n = this._service.maskInRange(
|
|
33
|
+
const u = p.length - a, h = s.length - u;
|
|
34
|
+
n = this._service.maskInRange(s.slice(o, h), p, o, a);
|
|
35
35
|
} else
|
|
36
|
-
n = this._service.maskInput(
|
|
36
|
+
n = this._service.maskInput(s, p, r.selectionStart || 0);
|
|
37
37
|
this._selection = [n.selection, n.selection], this.triggerOnChange(n.value, t);
|
|
38
38
|
}, this.focusHandler = (t) => {
|
|
39
39
|
this.state.focused || (this.setState({ focused: !0 }), this.props.onFocus && this.props.onFocus.call(void 0, {
|
|
@@ -51,7 +51,7 @@ const l = class l extends d.Component {
|
|
|
51
51
|
this.element && this.element.setCustomValidity(
|
|
52
52
|
this.validity.valid ? "" : this.props.validationMessage || ""
|
|
53
53
|
);
|
|
54
|
-
},
|
|
54
|
+
}, O(q);
|
|
55
55
|
}
|
|
56
56
|
/**
|
|
57
57
|
* Gets the element of the MaskedTextBox.
|
|
@@ -103,10 +103,10 @@ const l = class l extends d.Component {
|
|
|
103
103
|
* Represents the validity state into which the MaskedTextBox is set.
|
|
104
104
|
*/
|
|
105
105
|
get validity() {
|
|
106
|
-
const
|
|
106
|
+
const i = this.value, t = this._service.validationValue(i), r = this.props.validationMessage !== void 0, s = this.props.valid !== void 0 ? this.props.valid : (!this.required || !!t) && (!this.props.maskValidation || !this.props.prompt || i.indexOf(this.props.prompt) === -1);
|
|
107
107
|
return {
|
|
108
|
-
customError:
|
|
109
|
-
valid:
|
|
108
|
+
customError: r,
|
|
109
|
+
valid: s,
|
|
110
110
|
valueMissing: !t
|
|
111
111
|
};
|
|
112
112
|
}
|
|
@@ -131,13 +131,13 @@ const l = class l extends d.Component {
|
|
|
131
131
|
/**
|
|
132
132
|
* @hidden
|
|
133
133
|
*/
|
|
134
|
-
componentDidUpdate(
|
|
134
|
+
componentDidUpdate(i, t) {
|
|
135
135
|
if (this.element && this.state.focused && t.focused) {
|
|
136
|
-
let [
|
|
137
|
-
const o =
|
|
138
|
-
(!o && a || o && a && (o.start !== a.start || o.end !== a.end)) && (
|
|
136
|
+
let [r, s] = this._selection;
|
|
137
|
+
const o = i.selection, a = this.props.selection;
|
|
138
|
+
(!o && a || o && a && (o.start !== a.start || o.end !== a.end)) && (r = a.start, s = a.end), r !== null && s !== null && this.element.setSelectionRange(r, s);
|
|
139
139
|
}
|
|
140
|
-
|
|
140
|
+
E(i, this.props) && this.updateService(), this.setValidity();
|
|
141
141
|
}
|
|
142
142
|
/**
|
|
143
143
|
* @hidden
|
|
@@ -150,32 +150,32 @@ const l = class l extends d.Component {
|
|
|
150
150
|
*/
|
|
151
151
|
render() {
|
|
152
152
|
const {
|
|
153
|
-
size:
|
|
153
|
+
size: i = l.defaultProps.size,
|
|
154
154
|
fillMode: t = l.defaultProps.fillMode,
|
|
155
|
-
rounded:
|
|
156
|
-
autoFocus:
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
155
|
+
rounded: r = l.defaultProps.rounded,
|
|
156
|
+
autoFocus: s = l.defaultProps.autoFocus,
|
|
157
|
+
unstyled: o,
|
|
158
|
+
className: a
|
|
159
|
+
} = this.props, p = this.props.id || this._inputId, n = !this.validityStyles || this.validity.valid, u = this.props.style || {}, h = o && o.uMaskedTextBox, {
|
|
160
|
+
prefix: P = l.defaultProps.prefix,
|
|
161
|
+
suffix: C = l.defaultProps.suffix
|
|
162
|
+
} = this.props, [_] = g(P), [x] = g(C), f = /* @__PURE__ */ d.createElement(
|
|
161
163
|
"span",
|
|
162
164
|
{
|
|
163
165
|
dir: this.props.dir,
|
|
164
|
-
className:
|
|
165
|
-
"k-maskedtextbox k-input",
|
|
166
|
+
className: y(b.wrapper(
|
|
166
167
|
{
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
style: this.props.label ? p : { width: this.props.width, ...p }
|
|
168
|
+
c: h,
|
|
169
|
+
invalid: !n,
|
|
170
|
+
disabled: this.props.disabled,
|
|
171
|
+
size: i,
|
|
172
|
+
fillMode: t,
|
|
173
|
+
rounded: r
|
|
174
|
+
}
|
|
175
|
+
), a),
|
|
176
|
+
style: this.props.label ? u : { width: this.props.width, ...u }
|
|
177
177
|
},
|
|
178
|
-
/* @__PURE__ */ d.createElement(
|
|
178
|
+
/* @__PURE__ */ d.createElement(_, null),
|
|
179
179
|
/* @__PURE__ */ d.createElement(
|
|
180
180
|
"input",
|
|
181
181
|
{
|
|
@@ -183,22 +183,22 @@ const l = class l extends d.Component {
|
|
|
183
183
|
autoComplete: "off",
|
|
184
184
|
autoCorrect: "off",
|
|
185
185
|
autoCapitalize: "off",
|
|
186
|
-
autoFocus:
|
|
186
|
+
autoFocus: s,
|
|
187
187
|
spellCheck: !1,
|
|
188
|
-
className:
|
|
188
|
+
className: y(b.input({ c: h })),
|
|
189
189
|
value: this.value,
|
|
190
|
-
id:
|
|
190
|
+
id: p,
|
|
191
191
|
"aria-labelledby": this.props.ariaLabelledBy,
|
|
192
192
|
"aria-describedby": this.props.ariaDescribedBy,
|
|
193
193
|
"aria-placeholder": this.props.mask,
|
|
194
194
|
name: this.props.name,
|
|
195
|
-
tabIndex:
|
|
195
|
+
tabIndex: V(this.props.tabIndex, this.props.disabled, !0),
|
|
196
196
|
accessKey: this.props.accessKey,
|
|
197
197
|
title: this.props.title,
|
|
198
198
|
disabled: this.props.disabled || void 0,
|
|
199
199
|
readOnly: this.props.readonly || void 0,
|
|
200
200
|
placeholder: this.props.placeholder,
|
|
201
|
-
ref: (
|
|
201
|
+
ref: (S) => this._input = S,
|
|
202
202
|
onChange: this.onChangeHandler,
|
|
203
203
|
onPaste: this.pasteHandler,
|
|
204
204
|
onFocus: this.focusHandler,
|
|
@@ -207,15 +207,15 @@ const l = class l extends d.Component {
|
|
|
207
207
|
onDrop: m
|
|
208
208
|
}
|
|
209
209
|
),
|
|
210
|
-
/* @__PURE__ */ d.createElement(
|
|
210
|
+
/* @__PURE__ */ d.createElement(x, null)
|
|
211
211
|
);
|
|
212
212
|
return this.props.label ? /* @__PURE__ */ d.createElement(
|
|
213
|
-
|
|
213
|
+
H,
|
|
214
214
|
{
|
|
215
215
|
label: this.props.label,
|
|
216
|
-
editorId:
|
|
216
|
+
editorId: p,
|
|
217
217
|
editorValue: this.value,
|
|
218
|
-
editorValid:
|
|
218
|
+
editorValid: n,
|
|
219
219
|
editorDisabled: this.props.disabled,
|
|
220
220
|
editorPlaceholder: this.props.placeholder,
|
|
221
221
|
children: f,
|
|
@@ -224,12 +224,12 @@ const l = class l extends d.Component {
|
|
|
224
224
|
}
|
|
225
225
|
) : f;
|
|
226
226
|
}
|
|
227
|
-
triggerOnChange(
|
|
227
|
+
triggerOnChange(i, t) {
|
|
228
228
|
if (this.setState({
|
|
229
|
-
value:
|
|
229
|
+
value: i
|
|
230
230
|
}), this.props.onChange) {
|
|
231
|
-
this._valueDuringOnChange =
|
|
232
|
-
const
|
|
231
|
+
this._valueDuringOnChange = i;
|
|
232
|
+
const r = {
|
|
233
233
|
syntheticEvent: t,
|
|
234
234
|
nativeEvent: t.nativeEvent,
|
|
235
235
|
selectionStart: this._selection[0],
|
|
@@ -237,17 +237,17 @@ const l = class l extends d.Component {
|
|
|
237
237
|
target: this,
|
|
238
238
|
value: this.value
|
|
239
239
|
};
|
|
240
|
-
this.props.onChange.call(void 0,
|
|
240
|
+
this.props.onChange.call(void 0, r), this._valueDuringOnChange = void 0;
|
|
241
241
|
}
|
|
242
242
|
}
|
|
243
|
-
updateService(
|
|
243
|
+
updateService(i) {
|
|
244
244
|
const t = Object.assign({
|
|
245
245
|
includeLiterals: this.props.includeLiterals,
|
|
246
246
|
mask: this.props.mask,
|
|
247
247
|
prompt: this.props.prompt,
|
|
248
248
|
promptPlaceholder: this.props.promptPlaceholder,
|
|
249
249
|
rules: this.rules
|
|
250
|
-
},
|
|
250
|
+
}, i);
|
|
251
251
|
this._service.update(t);
|
|
252
252
|
}
|
|
253
253
|
get rules() {
|
|
@@ -280,10 +280,10 @@ l.displayName = "MaskedTextBox", l.propTypes = {
|
|
|
280
280
|
includeLiterals: e.bool,
|
|
281
281
|
maskValidation: e.bool,
|
|
282
282
|
mask: e.string,
|
|
283
|
-
rules: function(
|
|
284
|
-
const
|
|
285
|
-
return
|
|
286
|
-
"Invalid prop `" + t + "` supplied to `" +
|
|
283
|
+
rules: function(i, t, r) {
|
|
284
|
+
const s = i.rules;
|
|
285
|
+
return s !== void 0 && !Object.entries(s).some((a) => typeof a != "string" || !(s[a] instanceof RegExp)) ? new Error(
|
|
286
|
+
"Invalid prop `" + t + "` supplied to `" + r + "`. Validation failed."
|
|
287
287
|
) : null;
|
|
288
288
|
},
|
|
289
289
|
selection: e.shape({
|
|
@@ -309,18 +309,18 @@ l.displayName = "MaskedTextBox", l.propTypes = {
|
|
|
309
309
|
rules: v,
|
|
310
310
|
required: !1,
|
|
311
311
|
validityStyles: !0,
|
|
312
|
-
prefix: (
|
|
313
|
-
suffix: (
|
|
312
|
+
prefix: (i) => null,
|
|
313
|
+
suffix: (i) => null,
|
|
314
314
|
size: "medium",
|
|
315
315
|
rounded: "medium",
|
|
316
316
|
fillMode: "solid",
|
|
317
317
|
autoFocus: !1
|
|
318
318
|
};
|
|
319
319
|
let c = l;
|
|
320
|
-
const
|
|
321
|
-
|
|
320
|
+
const B = w(), F = M(I(B, D(c)));
|
|
321
|
+
F.displayName = "KendoReactMaskedTextBox";
|
|
322
322
|
export {
|
|
323
|
-
|
|
324
|
-
|
|
323
|
+
F as MaskedTextBox,
|
|
324
|
+
B as MaskedTextBoxPropsContext,
|
|
325
325
|
c as MaskedTextBoxWithoutContext
|
|
326
326
|
};
|
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: 1723701999,
|
|
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.5",
|
|
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.5",
|
|
29
|
+
"@progress/kendo-react-buttons": "8.3.0-develop.5",
|
|
30
|
+
"@progress/kendo-react-common": "8.3.0-develop.5",
|
|
31
|
+
"@progress/kendo-react-dialogs": "8.3.0-develop.5",
|
|
32
|
+
"@progress/kendo-react-intl": "8.3.0-develop.5",
|
|
33
|
+
"@progress/kendo-react-labels": "8.3.0-develop.5",
|
|
34
|
+
"@progress/kendo-react-popup": "8.3.0-develop.5",
|
|
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"
|
|
@@ -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 _=require("react"),t=require("prop-types"),a=require("@progress/kendo-react-common"),H=require("../package-metadata.js");function K(n){const l=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const s in n)if(s!=="default"){const r=Object.getOwnPropertyDescriptor(n,s);Object.defineProperty(l,s,r.get?r:{enumerable:!0,get:()=>n[s]})}}return l.default=n,Object.freeze(l)}const e=K(_),N=a.createPropsContext(),g=e.forwardRef((n,l)=>{a.validatePackage(H.packageMetadata);const s=a.usePropsContext(N,n),{ariaDescribedBy:r,checked:y,children:v,className:x,disabled:o,id:B,size:F=L.size,label:d,labelPlacement:I,name:O,style:j,tabIndex:z,value:m,valid:S,onChange:h,onFocus:b,onBlur:p,...T}=s,C=a.useUnstyled(),f=C&&C.uRadioButton,u=e.useRef(null),R=e.useCallback(()=>{u.current&&u.current.focus()},[]),i=e.useCallback(()=>({element:u.current,focus:R}),[R]);e.useImperativeHandle(l,i);const P=a.useId(),q=e.useCallback(c=>{a.dispatchEvent(h,c,i(),{value:m})},[h,m,o]),D=e.useCallback(c=>{b&&!o&&a.dispatchEvent(b,c,i(),void 0)},[b,o]),M=e.useCallback(c=>{p&&!o&&a.dispatchEvent(p,c,i(),void 0)},[p,o]),w={type:"radio",id:B||P,name:O,className:a.classNames(a.uRadioButton.input({c:f,size:F,invalid:S===!1,checked:y}),x),ref:u,disabled:o,tabIndex:a.getTabIndex(z,o),checked:y,style:j,"aria-describedby":r,value:m,onChange:q,onFocus:D,onBlur:M,...T},k=e.createElement(e.Fragment,null,d!==void 0?e.createElement("label",{className:a.classNames(a.uRadioButton.label({c:f})),htmlFor:B||P,style:{userSelect:"none"},"aria-label":d},d):null),E=e.createElement("span",{className:a.classNames(a.uRadioButton.wrap({c:f}))},e.createElement("input",{...w}));return I==="before"?e.createElement(e.Fragment,null,k,E,v):e.createElement(e.Fragment,null,E,k,v)});g.propTypes={ariaDescribedBy:t.string,checked:t.bool,className:t.string,disabled:t.bool,id:t.string,size:t.oneOf([null,"small","medium","large"]),label:t.string,labelPlacement:t.string,name:t.string,style:t.object,tabIndex:t.number,value:t.any,valid:t.bool,onChange:t.func,onFocus:t.func,onBlur:t.func};const L={size:"medium"};g.displayName="KendoRadioButton";exports.RadioButton=g;exports.RadioButtonPropsContext=N;
|