@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/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?: MaskedTextBoxClassStructure;
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?: MaskedTextBoxClassStructure;
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 S=require("react"),a=require("prop-types"),n=require("@progress/kendo-react-common"),k=require("@progress/kendo-react-labels"),O=require("../package-metadata.js");function P(l){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(l){for(const t in l)if(t!=="default"){const i=Object.getOwnPropertyDescriptor(l,t);Object.defineProperty(e,t,i.get?i:{enumerable:!0,get:()=>l[t]})}}return e.default=l,Object.freeze(e)}const u=P(S),s=class s extends u.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")}},n.validatePackage(O.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:I,defaultValue:L,valid:D,visited:N,touched:V,modified:w,autoFocus:f,ariaLabelledBy:m,ariaDescribedBy:b,validityStyles:q,style:p,ariaLabel:_,...o}=this.props,h=r||this._inputId,c=!this.validityStyles||this.validity.valid,C=n.classNames(e,"k-input k-input-md k-rounded-md k-input-solid"),v=u.createElement("input",{"aria-labelledby":m,"aria-describedby":b,"aria-disabled":this.props.disabled||void 0,"aria-invalid":!c||void 0,"aria-label":_||void 0,...o,style:t?void 0:p,value:this.value,id:h,autoFocus:f,className:C,onChange:this.handleChange,onAnimationStart:this.handleAutoFill,ref:M=>{this._input=M}});return t?u.createElement(k.FloatingLabel,{label:t,labelClassName:i,editorId:h,editorValue:String(this.value),editorValid:c,editorDisabled:o.disabled,editorPlaceholder:o.placeholder,children:v,style:p,dir:o.dir}):v}};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=n.createPropsContext(),y=n.withIdHOC(n.withPropsContext(g,d));y.displayName="KendoReactInput";exports.Input=y;exports.InputPropsContext=g;exports.InputWithoutContext=d;
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 r from "react";
10
- import t from "prop-types";
11
- import { validatePackage as b, classNames as _, createPropsContext as C, withIdHOC as M, withPropsContext as S } from "@progress/kendo-react-common";
12
- import { FloatingLabel as L } from "@progress/kendo-react-labels";
13
- import { packageMetadata as V } from "../package-metadata.mjs";
14
- const e = class e extends r.Component {
15
- constructor(s) {
16
- super(s), this._input = null, this.focus = () => {
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 = (i) => {
18
+ }, this.isInvalid = (t) => {
19
19
  let a = !1;
20
- for (let l in i)
21
- i.hasOwnProperty(l) && (a = a || !!i[l]);
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 = (i) => {
27
+ }, this.handleChange = (t) => {
28
28
  this.setState({
29
- value: i.target.value
30
- }), this.valueDuringOnChange = i.target.value, this.props.onChange && this.props.onChange.call(void 0, {
31
- syntheticEvent: i,
32
- nativeEvent: i.nativeEvent,
33
- value: i.target.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 = (i) => {
37
- if (i.animationName === "autoFillStart") {
38
- let a = i.target.parentNode;
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
- }, b(V), this.state = {
42
- value: this.props.defaultValue || e.defaultProps.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 s = {
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
- ...s,
81
+ ...e,
82
82
  customError: this.props.validationMessage !== void 0,
83
- valid: this.props.valid !== void 0 ? this.props.valid : this._input ? !this.isInvalid(s) : !0
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 : e.defaultProps.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: s,
110
- label: i,
109
+ className: e,
110
+ label: t,
111
111
  labelClassName: a,
112
112
  id: l,
113
- validationMessage: P,
114
- defaultValue: D,
115
- valid: I,
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: O,
118
- touched: w,
119
- modified: F,
120
- autoFocus: v,
121
- ariaLabelledBy: c,
122
- ariaDescribedBy: y,
123
- validityStyles: E,
124
- style: o,
125
- ariaLabel: g,
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, p = l || this._inputId, u = !this.validityStyles || this.validity.valid, m = _(s, "k-input k-input-md k-rounded-md k-input-solid"), h = /* @__PURE__ */ r.createElement(
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": c,
131
- "aria-describedby": y,
137
+ "aria-labelledby": y,
138
+ "aria-describedby": g,
132
139
  "aria-disabled": this.props.disabled || void 0,
133
- "aria-invalid": !u || void 0,
134
- "aria-label": g || void 0,
140
+ "aria-invalid": !r || void 0,
141
+ "aria-label": m || void 0,
135
142
  ...n,
136
- style: i ? void 0 : o,
143
+ style: t ? void 0 : u,
137
144
  value: this.value,
138
- id: p,
139
- autoFocus: v,
140
- className: m,
145
+ id: h,
146
+ autoFocus: c,
147
+ className: b,
141
148
  onChange: this.handleChange,
142
149
  onAnimationStart: this.handleAutoFill,
143
- ref: (f) => {
144
- this._input = f;
150
+ ref: (_) => {
151
+ this._input = _;
145
152
  }
146
153
  }
147
154
  );
148
- return i ? /* @__PURE__ */ r.createElement(
149
- L,
155
+ return t ? /* @__PURE__ */ d.createElement(
156
+ P,
150
157
  {
151
- label: i,
158
+ label: t,
152
159
  labelClassName: a,
153
- editorId: p,
160
+ editorId: h,
154
161
  editorValue: String(this.value),
155
- editorValid: u,
162
+ editorValid: r,
156
163
  editorDisabled: n.disabled,
157
164
  editorPlaceholder: n.placeholder,
158
- children: h,
159
- style: o,
165
+ children: v,
166
+ style: u,
160
167
  dir: n.dir
161
168
  }
162
- ) : h;
169
+ ) : v;
163
170
  }
164
171
  };
165
- e.displayName = "Input", e.propTypes = {
166
- label: t.string,
167
- labelClassName: t.string,
168
- validationMessage: t.string,
169
- required: t.bool,
170
- validate: t.bool,
171
- id: t.string,
172
- ariaLabelledBy: t.string,
173
- ariaDescribedBy: t.string,
174
- ariaLabel: t.string,
175
- autoFocus: t.bool
176
- }, e.defaultProps = {
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 d = e;
183
- const k = C(), N = M(S(k, d));
184
- N.displayName = "KendoReactInput";
189
+ let o = s;
190
+ const O = I(), w = L(V(O, N(o)));
191
+ w.displayName = "KendoReactInput";
185
192
  export {
186
- N as Input,
187
- k as InputPropsContext,
188
- d as InputWithoutContext
193
+ w as Input,
194
+ O as InputPropsContext,
195
+ o as InputWithoutContext
189
196
  };
@@ -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 o=require("@progress/kendo-react-common"),l=require("react");function s(e){const t=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(t,n,a.get?a:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const r=s(l),c=r.forwardRef(({orientation:e="horizontal",...t},n)=>{const a=r.useRef(null),u=r.useRef(null);return r.useImperativeHandle(a,()=>({element:u.current})),r.useImperativeHandle(n,()=>a.current),r.createElement("span",{...t,className:o.classNames("k-input-prefix",t.className,`k-input-prefix-${e}`)})});c.displayName="KendoReactInputPrefix";exports.InputPrefix=c;
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;
@@ -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
- const u = e.forwardRef(({ orientation: r = "horizontal", ...t }, a) => {
12
- const n = e.useRef(null), s = e.useRef(null);
13
- return e.useImperativeHandle(
14
- n,
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
- () => n.current
19
- ), /* @__PURE__ */ e.createElement("span", { ...t, className: l("k-input-prefix", t.className, `k-input-prefix-${r}`) });
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
- u.displayName = "KendoReactInputPrefix";
29
+ f.displayName = "KendoReactInputPrefix";
22
30
  export {
23
- u as InputPrefix
31
+ f as InputPrefix
24
32
  };
@@ -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 s=require("react"),o=require("@progress/kendo-react-common");function l(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const u=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,u.get?u:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const r=l(s),a=r.forwardRef(({orientation:e="horizontal",...t},n)=>{const u=r.useRef(null),c=r.useRef(null);return r.useImperativeHandle(u,()=>({element:c.current})),r.useImperativeHandle(n,()=>u.current),r.createElement("span",{...t,className:o.classNames("k-input-suffix",t.className,`k-input-suffix-${e}`)})});a.displayName="KendoReactInputSuffix";exports.InputSuffix=a;
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;
@@ -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 l = e.forwardRef(({ orientation: a = "horizontal", ...t }, s) => {
12
- const n = e.useRef(null), u = e.useRef(null);
13
- return e.useImperativeHandle(
14
- n,
15
- () => ({ element: u.current })
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
- s,
18
- () => n.current
19
- ), /* @__PURE__ */ e.createElement("span", { ...t, className: r("k-input-suffix", t.className, `k-input-suffix-${a}`) });
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
- l.displayName = "KendoReactInputSuffix";
29
+ x.displayName = "KendoReactInputSuffix";
22
30
  export {
23
- l as InputSuffix
31
+ x as InputSuffix
24
32
  };
@@ -10,7 +10,7 @@ const e = {
10
10
  name: "@progress/kendo-react-inputs",
11
11
  productName: "KendoReact",
12
12
  productCodes: ["KENDOUIREACT", "KENDOUICOMPLETE"],
13
- publishDate: 1723701999,
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.5",
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.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",
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"
@@ -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 E=require("react"),c=require("prop-types"),o=require("@progress/kendo-react-common"),P=require("../package-metadata.js");function q(e){const r=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(r,n,a.get?a:{enumerable:!0,get:()=>e[n]})}}return r.default=e,Object.freeze(r)}const t=q(E),f=t.forwardRef((e,r)=>{o.validatePackage(P.packageMetadata);const n=t.useRef(null),a=t.useRef(null),s=t.useRef(),v=t.useCallback(()=>{var u;return s.current!==void 0?s.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 v()}})),t.useImperativeHandle(r,()=>a.current);const{size:i=l.size,fillMode:m=l.fillMode,rounded:d=l.rounded,autoFocus:k=l.autoFocus,className:p,dir:x,style:h,prefix:b=l.prefix,suffix:C=l.suffix,valid:z,modified:N,touched:j,visited:D,...y}=e,[M]=o.useCustomComponent(b),[F]=o.useCustomComponent(C),[_,g]=t.useState(!1),B=u=>{g(!0)},O=u=>{g(!1)},R=t.useCallback(u=>{s.current=u.target.value,e.onChange&&e.onChange.call(void 0,{syntheticEvent:u,nativeEvent:u.nativeEvent,value:u.target.value,target:a.current}),s.current=void 0},[e.onChange]),{onFocus:T,onBlur:S}=o.useAsyncFocusBlur({onFocus:B,onBlur:O,onSyncFocus:e.onFocus,onSyncBlur:e.onBlur});return t.createElement("span",{style:h,dir:x,className:o.classNames("k-textbox k-input",{[`k-input-${o.kendoThemeMaps.sizeMap[i]||i}`]:i,[`k-input-${m}`]:m,[`k-rounded-${o.kendoThemeMaps.roundedMap[d]||d}`]:d},{"k-focus":_,"k-required":e.required,"k-disabled":e.disabled,"k-invalid":e.valid===!1},p),onFocus:T,onBlur:S},t.createElement(M,null),t.createElement("input",{ref:n,className:"k-input-inner",autoFocus:k,...y,onChange:R}),t.createElement(F,null))}),l={prefix:e=>null,suffix:e=>null,size:"medium",rounded:"medium",fillMode:"solid",autoFocus:!1};f.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};f.displayName="KendoReactTextBoxComponent";exports.TextBox=f;
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;