@progress/kendo-react-inputs 15.2.0-develop.1 → 15.2.0-develop.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/checkbox/Checkbox.js +1 -1
  2. package/checkbox/Checkbox.mjs +79 -77
  3. package/colors/ColorContrastLabels.js +1 -1
  4. package/colors/ColorContrastLabels.mjs +2 -2
  5. package/colors/ColorGradient.js +1 -1
  6. package/colors/ColorGradient.mjs +51 -52
  7. package/colors/ColorPalette.js +1 -1
  8. package/colors/ColorPalette.mjs +71 -72
  9. package/colors/ColorPicker.js +1 -1
  10. package/colors/ColorPicker.mjs +247 -239
  11. package/colors/FlatColorPicker.d.ts +4 -4
  12. package/colors/FlatColorPicker.js +1 -1
  13. package/colors/FlatColorPicker.mjs +104 -100
  14. package/colors/interfaces/ColorPaletteProps.d.ts +7 -0
  15. package/colors/interfaces/ColorPickerPaletteSettings.d.ts +5 -0
  16. package/dist/cdn/js/kendo-react-inputs.js +1 -1
  17. package/maskedtextbox/MaskedTextBox.d.ts +1 -0
  18. package/maskedtextbox/MaskedTextBox.js +1 -1
  19. package/maskedtextbox/MaskedTextBox.mjs +26 -23
  20. package/maskedtextbox/MaskedTextBoxProps.d.ts +7 -0
  21. package/messages/index.d.ts +5 -0
  22. package/messages/index.js +1 -1
  23. package/messages/index.mjs +46 -44
  24. package/numerictextbox/NumericTextBox.js +1 -1
  25. package/numerictextbox/NumericTextBox.mjs +2 -2
  26. package/otpinput/OTPInput.js +1 -1
  27. package/otpinput/OTPInput.mjs +141 -143
  28. package/package-metadata.js +1 -1
  29. package/package-metadata.mjs +2 -2
  30. package/package.json +10 -10
  31. package/radiobutton/RadioButton.js +1 -1
  32. package/radiobutton/RadioButton.mjs +32 -30
  33. package/range-slider/RangeSlider.js +11 -11
  34. package/range-slider/RangeSlider.mjs +54 -54
  35. package/rating/Rating.d.ts +12 -0
  36. package/rating/Rating.js +2 -2
  37. package/rating/Rating.mjs +91 -92
  38. package/signature/Signature.js +1 -1
  39. package/signature/Signature.mjs +113 -110
  40. package/slider/Slider.d.ts +12 -0
  41. package/slider/Slider.js +1 -1
  42. package/slider/Slider.mjs +61 -56
  43. package/switch/Switch.d.ts +15 -0
  44. package/switch/Switch.js +1 -1
  45. package/switch/Switch.mjs +82 -79
  46. package/textarea/TextArea.js +1 -1
  47. package/textarea/TextArea.mjs +11 -12
@@ -33,6 +33,7 @@ export declare class MaskedTextBoxWithoutContext extends React.Component<MaskedT
33
33
  className: PropTypes.Requireable<string>;
34
34
  prefix: PropTypes.Requireable<any>;
35
35
  suffix: PropTypes.Requireable<any>;
36
+ ariaLabel: PropTypes.Requireable<string>;
36
37
  ariaLabelledBy: PropTypes.Requireable<string>;
37
38
  ariaDescribedBy: PropTypes.Requireable<string>;
38
39
  width: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
@@ -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 O=require("react"),t=require("prop-types"),E=require("./masking.service.js"),h=require("./utils.js"),a=require("@progress/kendo-react-common"),M=require("@progress/kendo-react-labels");function V(p){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(p){for(const s in p)if(s!=="default"){const i=Object.getOwnPropertyDescriptor(p,s);Object.defineProperty(e,s,i.get?i:{enumerable:!0,get:()=>p[s]})}}return e.default=p,Object.freeze(e)}const u=V(O),o=class o extends u.Component{constructor(){super(...arguments),this.state={},this._inputId=`k_${this.props.id}`,this._service=new E.MaskingService,this._isPasted=!1,this._selection=[null,null],this._input=null,this.focus=()=>{this._input&&this._input.focus()},this.handleKendoPasteValue=e=>{const s=e!=null?String(e):"",i={target:this._input,currentTarget:this._input,nativeEvent:new Event("change",{bubbles:!0})};this.triggerOnChange(s,i)},this.pasteHandler=e=>{const{selectionStart:s,selectionEnd:i}=e.target;i!==s&&(this._isPasted=!0,this._selection=[s||0,i||0])},this.onChangeHandler=e=>{const s=e.currentTarget,i=s.value,r=this._selection[0]||0,l=this._selection[1]||0;if(!this.props.mask){this._isPasted=!1,this._selection=[null,null],this.triggerOnChange(i,e);return}const n=this.value;let d;if(this._isPasted){this._isPasted=!1;const c=n.length-l,v=i.length-c;d=this._service.maskInRange(i.slice(r,v),n,r,l)}else d=this._service.maskInput(i,n,s.selectionStart||0);this._selection=[d.selection,d.selection],this.triggerOnChange(d.value,e)},this.focusHandler=e=>{this.state.focused||(this.setState({focused:!0}),this.props.onFocus&&this.props.onFocus.call(void 0,{target:this,syntheticEvent:e,nativeEvent:e.nativeEvent}))},this.blurHandler=e=>{this.state.focused&&(this.setState({focused:!1}),this.props.onBlur&&this.props.onBlur.call(void 0,{target:this,syntheticEvent:e,nativeEvent:e.nativeEvent}))},this.setValidity=()=>{this.element&&this.element.setCustomValidity(this.validity.valid?"":this.props.validationMessage||"")}}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 e=this.value,s=this._service.validationValue(e),i=this.props.validationMessage!==void 0,r=this.props.valid!==void 0?this.props.valid:(!this.required||!!s)&&(!this.props.maskValidation||!this.props.prompt||e.indexOf(this.props.prompt)===-1);return{customError:i,valid:r,valueMissing:!s}}get validityStyles(){return this.props.validityStyles!==void 0?this.props.validityStyles:o.defaultProps.validityStyles}get required(){return this.props.required!==void 0?this.props.required:!1}get name(){return this.props.name}componentDidUpdate(e,s){if(this.element&&this.state.focused&&s.focused){let[i,r]=this._selection;const l=e.selection,n=this.props.selection;(!l&&n||l&&n&&(l.start!==n.start||l.end!==n.end))&&(i=n.start,r=n.end),i!==null&&r!==null&&this.element.setSelectionRange(i,r)}h.maskingChanged(e,this.props)&&this.updateService(),this.setValidity()}componentDidMount(){this.updateService(),this.setValidity();const e=this.props.name||this.props.id;this.KendoPasteSubscription=a.subscribeToKendoPaste(this._input,{fieldName:e,onValueChange:s=>{this.handleKendoPasteValue(s)}})}componentWillUnmount(){var e;(e=this.KendoPasteSubscription)==null||e.unsubscribe()}render(){const{size:e=o.defaultProps.size,fillMode:s=o.defaultProps.fillMode,rounded:i=o.defaultProps.rounded,autoFocus:r=o.defaultProps.autoFocus,prefix:l=o.defaultProps.prefix,suffix:n=o.defaultProps.suffix,inputAttributes:d,unstyled:c,className:v}=this.props,g=this.props.id||this._inputId,m=!this.validityStyles||this.validity.valid,b=this.props.style||{},x=c&&c.uMaskedTextBox,[_]=a.useCustomComponent(l),[C]=a.useCustomComponent(n),y=u.createElement("span",{dir:this.props.dir,className:a.classNames("k-input","k-maskedtextbox",{[`k-input-${a.kendoThemeMaps.sizeMap[e]||e}`]:e,[`k-input-${s}`]:s,[`k-rounded-${a.kendoThemeMaps.roundedMap[i]||i}`]:i,"k-invalid":!m,"k-disabled":this.props.disabled},v),style:this.props.label?b:{width:this.props.width,...b}},u.createElement(_,null),u.createElement("input",{type:"text",autoComplete:"off",autoCorrect:"off",autoCapitalize:"off",autoFocus:r,spellCheck:!1,className:a.classNames(a.uMaskedTextBox.inputInner({c:x})),value:this.value,id:g,"aria-labelledby":this.props.ariaLabelledBy,"aria-describedby":this.props.ariaDescribedBy,"aria-placeholder":this.props.mask,"aria-required":this.props.required,name:this.props.name,tabIndex:a.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:S=>{this._input=S},onChange:this.onChangeHandler,onPaste:this.pasteHandler,onFocus:this.focusHandler,onBlur:this.blurHandler,onDragStart:h.returnFalse,onDrop:h.returnFalse,...d}),u.createElement(C,null));return this.props.label?u.createElement(M.FloatingLabel,{label:this.props.label,editorId:g,editorValue:this.value,editorValid:m,editorDisabled:this.props.disabled,editorPlaceholder:this.props.placeholder,children:y,style:{width:this.props.width},dir:this.props.dir}):y}triggerOnChange(e,s){if(this.setState({value:e}),this.props.onChange){this._valueDuringOnChange=e;const i={syntheticEvent:s,nativeEvent:s.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(e){const s=Object.assign({includeLiterals:this.props.includeLiterals,mask:this.props.mask,prompt:this.props.prompt,promptPlaceholder:this.props.promptPlaceholder,rules:this.rules},e);this._service.update(s)}get rules(){return Object.assign({},h.defaultRules,this.props.rules)}};o.displayName="MaskedTextBox",o.propTypes={value:t.string,defaultValue:t.string,placeholder:t.string,title:t.string,dir:t.string,id:t.string,style:t.object,className:t.string,prefix:t.any,suffix:t.any,ariaLabelledBy:t.string,ariaDescribedBy:t.string,width:t.oneOfType([t.string,t.number]),tabIndex:t.number,accessKey:t.string,disabled:t.bool,readonly:t.bool,prompt:t.string,promptPlaceholder:t.string,includeLiterals:t.bool,maskValidation:t.bool,mask:t.string,rules:function(e,s,i){const r=e.rules;return r!==void 0&&!Object.entries(r).some(n=>typeof n!="string"||!(r[n]instanceof RegExp))?new Error("Invalid prop `"+s+"` supplied to `"+i+"`. Validation failed."):null},selection:t.shape({start:t.number.isRequired,end:t.number.isRequired}),name:t.string,label:t.node,validationMessage:t.string,required:t.bool,valid:t.bool,validityStyles:t.bool,onChange:t.func,size:t.oneOf(["small","medium","large"]),rounded:t.oneOf(["small","medium","large","full","none"]),fillMode:t.oneOf(["solid","flat","outline"]),autoFocus:t.bool,inputAttributes:t.object},o.defaultProps={prompt:"_",promptPlaceholder:" ",includeLiterals:!1,maskValidation:!0,rules:h.defaultRules,validityStyles:!0,prefix:e=>null,suffix:e=>null,size:void 0,rounded:void 0,fillMode:void 0,autoFocus:!1};let f=o;const k=a.createPropsContext(),P=a.withIdHOC(a.withPropsContext(k,a.withUnstyledHOC(f)));P.displayName="KendoReactMaskedTextBox";exports.MaskedTextBox=P;exports.MaskedTextBoxPropsContext=k;exports.MaskedTextBoxWithoutContext=f;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const O=require("react"),t=require("prop-types"),E=require("./masking.service.js"),h=require("./utils.js"),n=require("@progress/kendo-react-common"),M=require("@progress/kendo-react-labels");function V(p){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(p){for(const s in p)if(s!=="default"){const i=Object.getOwnPropertyDescriptor(p,s);Object.defineProperty(e,s,i.get?i:{enumerable:!0,get:()=>p[s]})}}return e.default=p,Object.freeze(e)}const u=V(O),o=class o extends u.Component{constructor(){super(...arguments),this.state={},this._inputId=`k_${this.props.id}`,this._service=new E.MaskingService,this._isPasted=!1,this._selection=[null,null],this._input=null,this.focus=()=>{this._input&&this._input.focus()},this.handleKendoPasteValue=e=>{const s=e!=null?String(e):"",i={target:this._input,currentTarget:this._input,nativeEvent:new Event("change",{bubbles:!0})};this.triggerOnChange(s,i)},this.pasteHandler=e=>{const{selectionStart:s,selectionEnd:i}=e.target;i!==s&&(this._isPasted=!0,this._selection=[s||0,i||0])},this.onChangeHandler=e=>{const s=e.currentTarget,i=s.value,r=this._selection[0]||0,l=this._selection[1]||0;if(!this.props.mask){this._isPasted=!1,this._selection=[null,null],this.triggerOnChange(i,e);return}const a=this.value;let d;if(this._isPasted){this._isPasted=!1;const c=a.length-l,v=i.length-c;d=this._service.maskInRange(i.slice(r,v),a,r,l)}else d=this._service.maskInput(i,a,s.selectionStart||0);this._selection=[d.selection,d.selection],this.triggerOnChange(d.value,e)},this.focusHandler=e=>{this.state.focused||(this.setState({focused:!0}),this.props.onFocus&&this.props.onFocus.call(void 0,{target:this,syntheticEvent:e,nativeEvent:e.nativeEvent}))},this.blurHandler=e=>{this.state.focused&&(this.setState({focused:!1}),this.props.onBlur&&this.props.onBlur.call(void 0,{target:this,syntheticEvent:e,nativeEvent:e.nativeEvent}))},this.setValidity=()=>{this.element&&this.element.setCustomValidity(this.validity.valid?"":this.props.validationMessage||"")}}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 e=this.value,s=this._service.validationValue(e),i=this.props.validationMessage!==void 0,r=this.props.valid!==void 0?this.props.valid:(!this.required||!!s)&&(!this.props.maskValidation||!this.props.prompt||e.indexOf(this.props.prompt)===-1);return{customError:i,valid:r,valueMissing:!s}}get validityStyles(){return this.props.validityStyles!==void 0?this.props.validityStyles:o.defaultProps.validityStyles}get required(){return this.props.required!==void 0?this.props.required:!1}get name(){return this.props.name}componentDidUpdate(e,s){if(this.element&&this.state.focused&&s.focused){let[i,r]=this._selection;const l=e.selection,a=this.props.selection;(!l&&a||l&&a&&(l.start!==a.start||l.end!==a.end))&&(i=a.start,r=a.end),i!==null&&r!==null&&this.element.setSelectionRange(i,r)}h.maskingChanged(e,this.props)&&this.updateService(),this.setValidity()}componentDidMount(){this.updateService(),this.setValidity();const e=this.props.name||this.props.id;this.KendoPasteSubscription=n.subscribeToKendoPaste(this._input,{fieldName:e,onValueChange:s=>{this.handleKendoPasteValue(s)}})}componentWillUnmount(){var e;(e=this.KendoPasteSubscription)==null||e.unsubscribe()}render(){const{size:e=o.defaultProps.size,fillMode:s=o.defaultProps.fillMode,rounded:i=o.defaultProps.rounded,autoFocus:r=o.defaultProps.autoFocus,prefix:l=o.defaultProps.prefix,suffix:a=o.defaultProps.suffix,inputAttributes:d,unstyled:c,className:v}=this.props,m=this.props.id||this._inputId,g=!this.validityStyles||this.validity.valid,b=this.props.style||{},x=c&&c.uMaskedTextBox,[_]=n.useCustomComponent(l),[C]=n.useCustomComponent(a),y=u.createElement("span",{dir:this.props.dir,className:n.classNames("k-input","k-maskedtextbox",{[`k-input-${n.kendoThemeMaps.sizeMap[e]||e}`]:e,[`k-input-${s}`]:s,[`k-rounded-${n.kendoThemeMaps.roundedMap[i]||i}`]:i,"k-invalid":!g,"k-disabled":this.props.disabled},v),style:this.props.label?b:{width:this.props.width,...b}},u.createElement(_,null),u.createElement("input",{type:"text",autoComplete:"off",autoCorrect:"off",autoCapitalize:"off",autoFocus:r,spellCheck:!1,className:n.classNames(n.uMaskedTextBox.inputInner({c:x})),value:this.value,id:m,"aria-label":this.props.ariaLabel,"aria-labelledby":this.props.ariaLabelledBy,"aria-describedby":this.props.ariaDescribedBy,"aria-placeholder":this.props.mask,"aria-required":this.props.required,"aria-invalid":g?void 0:"true",name:this.props.name,tabIndex:n.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:S=>{this._input=S},onChange:this.onChangeHandler,onPaste:this.pasteHandler,onFocus:this.focusHandler,onBlur:this.blurHandler,onDragStart:h.returnFalse,onDrop:h.returnFalse,...d}),u.createElement(C,null));return this.props.label?u.createElement(M.FloatingLabel,{label:this.props.label,editorId:m,editorValue:this.value,editorValid:g,editorDisabled:this.props.disabled,editorPlaceholder:this.props.placeholder,children:y,style:{width:this.props.width},dir:this.props.dir}):y}triggerOnChange(e,s){if(this.setState({value:e}),this.props.onChange){this._valueDuringOnChange=e;const i={syntheticEvent:s,nativeEvent:s.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(e){const s=Object.assign({includeLiterals:this.props.includeLiterals,mask:this.props.mask,prompt:this.props.prompt,promptPlaceholder:this.props.promptPlaceholder,rules:this.rules},e);this._service.update(s)}get rules(){return Object.assign({},h.defaultRules,this.props.rules)}};o.displayName="MaskedTextBox",o.propTypes={value:t.string,defaultValue:t.string,placeholder:t.string,title:t.string,dir:t.string,id:t.string,style:t.object,className:t.string,prefix:t.any,suffix:t.any,ariaLabel:t.string,ariaLabelledBy:t.string,ariaDescribedBy:t.string,width:t.oneOfType([t.string,t.number]),tabIndex:t.number,accessKey:t.string,disabled:t.bool,readonly:t.bool,prompt:t.string,promptPlaceholder:t.string,includeLiterals:t.bool,maskValidation:t.bool,mask:t.string,rules:function(e,s,i){const r=e.rules;return r!==void 0&&!Object.entries(r).some(a=>typeof a!="string"||!(r[a]instanceof RegExp))?new Error("Invalid prop `"+s+"` supplied to `"+i+"`. Validation failed."):null},selection:t.shape({start:t.number.isRequired,end:t.number.isRequired}),name:t.string,label:t.node,validationMessage:t.string,required:t.bool,valid:t.bool,validityStyles:t.bool,onChange:t.func,size:t.oneOf(["small","medium","large"]),rounded:t.oneOf(["small","medium","large","full","none"]),fillMode:t.oneOf(["solid","flat","outline"]),autoFocus:t.bool,inputAttributes:t.object},o.defaultProps={prompt:"_",promptPlaceholder:" ",includeLiterals:!1,maskValidation:!0,rules:h.defaultRules,validityStyles:!0,prefix:e=>null,suffix:e=>null,size:void 0,rounded:void 0,fillMode:void 0,autoFocus:!1};let f=o;const k=n.createPropsContext(),P=n.withIdHOC(n.withPropsContext(k,n.withUnstyledHOC(f)));P.displayName="KendoReactMaskedTextBox";exports.MaskedTextBox=P;exports.MaskedTextBoxPropsContext=k;exports.MaskedTextBoxWithoutContext=f;
@@ -26,19 +26,19 @@ const n = class n extends p.Component {
26
26
  const { selectionStart: s, selectionEnd: i } = t.target;
27
27
  i !== s && (this._isPasted = !0, this._selection = [s || 0, i || 0]);
28
28
  }, this.onChangeHandler = (t) => {
29
- const s = t.currentTarget, i = s.value, a = this._selection[0] || 0, l = this._selection[1] || 0;
29
+ const s = t.currentTarget, i = s.value, r = this._selection[0] || 0, l = this._selection[1] || 0;
30
30
  if (!this.props.mask) {
31
31
  this._isPasted = !1, this._selection = [null, null], this.triggerOnChange(i, t);
32
32
  return;
33
33
  }
34
- const r = this.value;
34
+ const a = this.value;
35
35
  let o;
36
36
  if (this._isPasted) {
37
37
  this._isPasted = !1;
38
- const d = r.length - l, u = i.length - d;
39
- o = this._service.maskInRange(i.slice(a, u), r, a, l);
38
+ const d = a.length - l, u = i.length - d;
39
+ o = this._service.maskInRange(i.slice(r, u), a, r, l);
40
40
  } else
41
- o = this._service.maskInput(i, r, s.selectionStart || 0);
41
+ o = this._service.maskInput(i, a, s.selectionStart || 0);
42
42
  this._selection = [o.selection, o.selection], this.triggerOnChange(o.value, t);
43
43
  }, this.focusHandler = (t) => {
44
44
  this.state.focused || (this.setState({ focused: !0 }), this.props.onFocus && this.props.onFocus.call(void 0, {
@@ -97,10 +97,10 @@ const n = class n extends p.Component {
97
97
  * Represents the validity state into which the MaskedTextBox is set.
98
98
  */
99
99
  get validity() {
100
- const t = this.value, s = this._service.validationValue(t), i = this.props.validationMessage !== void 0, a = this.props.valid !== void 0 ? this.props.valid : (!this.required || !!s) && (!this.props.maskValidation || !this.props.prompt || t.indexOf(this.props.prompt) === -1);
100
+ const t = this.value, s = this._service.validationValue(t), i = this.props.validationMessage !== void 0, r = this.props.valid !== void 0 ? this.props.valid : (!this.required || !!s) && (!this.props.maskValidation || !this.props.prompt || t.indexOf(this.props.prompt) === -1);
101
101
  return {
102
102
  customError: i,
103
- valid: a,
103
+ valid: r,
104
104
  valueMissing: !s
105
105
  };
106
106
  }
@@ -127,9 +127,9 @@ const n = class n extends p.Component {
127
127
  */
128
128
  componentDidUpdate(t, s) {
129
129
  if (this.element && this.state.focused && s.focused) {
130
- let [i, a] = this._selection;
131
- const l = t.selection, r = this.props.selection;
132
- (!l && r || l && r && (l.start !== r.start || l.end !== r.end)) && (i = r.start, a = r.end), i !== null && a !== null && this.element.setSelectionRange(i, a);
130
+ let [i, r] = this._selection;
131
+ const l = t.selection, a = this.props.selection;
132
+ (!l && a || l && a && (l.start !== a.start || l.end !== a.end)) && (i = a.start, r = a.end), i !== null && r !== null && this.element.setSelectionRange(i, r);
133
133
  }
134
134
  V(t, this.props) && this.updateService(), this.setValidity();
135
135
  }
@@ -161,13 +161,13 @@ const n = class n extends p.Component {
161
161
  size: t = n.defaultProps.size,
162
162
  fillMode: s = n.defaultProps.fillMode,
163
163
  rounded: i = n.defaultProps.rounded,
164
- autoFocus: a = n.defaultProps.autoFocus,
164
+ autoFocus: r = n.defaultProps.autoFocus,
165
165
  prefix: l = n.defaultProps.prefix,
166
- suffix: r = n.defaultProps.suffix,
166
+ suffix: a = n.defaultProps.suffix,
167
167
  inputAttributes: o,
168
168
  unstyled: d,
169
169
  className: u
170
- } = this.props, c = this.props.id || this._inputId, f = !this.validityStyles || this.validity.valid, v = this.props.style || {}, k = d && d.uMaskedTextBox, [C] = y(l), [x] = y(r), g = /* @__PURE__ */ p.createElement(
170
+ } = this.props, f = this.props.id || this._inputId, h = !this.validityStyles || this.validity.valid, v = this.props.style || {}, k = d && d.uMaskedTextBox, [C] = y(l), [x] = y(a), g = /* @__PURE__ */ p.createElement(
171
171
  "span",
172
172
  {
173
173
  dir: this.props.dir,
@@ -178,7 +178,7 @@ const n = class n extends p.Component {
178
178
  [`k-input-${_.sizeMap[t] || t}`]: t,
179
179
  [`k-input-${s}`]: s,
180
180
  [`k-rounded-${_.roundedMap[i] || i}`]: i,
181
- "k-invalid": !f,
181
+ "k-invalid": !h,
182
182
  "k-disabled": this.props.disabled
183
183
  },
184
184
  u
@@ -193,15 +193,17 @@ const n = class n extends p.Component {
193
193
  autoComplete: "off",
194
194
  autoCorrect: "off",
195
195
  autoCapitalize: "off",
196
- autoFocus: a,
196
+ autoFocus: r,
197
197
  spellCheck: !1,
198
198
  className: P(H.inputInner({ c: k })),
199
199
  value: this.value,
200
- id: c,
200
+ id: f,
201
+ "aria-label": this.props.ariaLabel,
201
202
  "aria-labelledby": this.props.ariaLabelledBy,
202
203
  "aria-describedby": this.props.ariaDescribedBy,
203
204
  "aria-placeholder": this.props.mask,
204
205
  "aria-required": this.props.required,
206
+ "aria-invalid": h ? void 0 : "true",
205
207
  name: this.props.name,
206
208
  tabIndex: D(this.props.tabIndex, this.props.disabled, !0),
207
209
  accessKey: this.props.accessKey,
@@ -227,9 +229,9 @@ const n = class n extends p.Component {
227
229
  q,
228
230
  {
229
231
  label: this.props.label,
230
- editorId: c,
232
+ editorId: f,
231
233
  editorValue: this.value,
232
- editorValid: f,
234
+ editorValid: h,
233
235
  editorDisabled: this.props.disabled,
234
236
  editorPlaceholder: this.props.placeholder,
235
237
  children: g,
@@ -282,6 +284,7 @@ n.displayName = "MaskedTextBox", n.propTypes = {
282
284
  className: e.string,
283
285
  prefix: e.any,
284
286
  suffix: e.any,
287
+ ariaLabel: e.string,
285
288
  ariaLabelledBy: e.string,
286
289
  ariaDescribedBy: e.string,
287
290
  width: e.oneOfType([e.string, e.number]),
@@ -295,8 +298,8 @@ n.displayName = "MaskedTextBox", n.propTypes = {
295
298
  maskValidation: e.bool,
296
299
  mask: e.string,
297
300
  rules: function(t, s, i) {
298
- const a = t.rules;
299
- return a !== void 0 && !Object.entries(a).some((r) => typeof r != "string" || !(a[r] instanceof RegExp)) ? new Error(
301
+ const r = t.rules;
302
+ return r !== void 0 && !Object.entries(r).some((a) => typeof a != "string" || !(r[a] instanceof RegExp)) ? new Error(
300
303
  "Invalid prop `" + s + "` supplied to `" + i + "`. Validation failed."
301
304
  ) : null;
302
305
  },
@@ -330,16 +333,16 @@ n.displayName = "MaskedTextBox", n.propTypes = {
330
333
  fillMode: void 0,
331
334
  autoFocus: !1
332
335
  };
333
- let h = n;
336
+ let c = n;
334
337
  const B = T(), F = O(
335
338
  M(
336
339
  B,
337
- I(h)
340
+ I(c)
338
341
  )
339
342
  );
340
343
  F.displayName = "KendoReactMaskedTextBox";
341
344
  export {
342
345
  F as MaskedTextBox,
343
346
  B as MaskedTextBoxPropsContext,
344
- h as MaskedTextBoxWithoutContext
347
+ c as MaskedTextBoxWithoutContext
345
348
  };
@@ -154,6 +154,13 @@ export interface MaskedTextBoxProps extends FormComponentProps {
154
154
  * This property is related to accessibility.
155
155
  */
156
156
  ariaDescribedBy?: string;
157
+ /**
158
+ * Sets the accessible label text of the component.
159
+ *
160
+ * @remarks
161
+ * This property is related to accessibility.
162
+ */
163
+ ariaLabel?: string;
157
164
  /**
158
165
  * Identifies the element(s) which will label the component.
159
166
  *
@@ -125,6 +125,10 @@ export declare const colorPickerDropdownButtonAriaLabel = "colorPicker.dropdownB
125
125
  * @hidden
126
126
  */
127
127
  export declare const ratingAriaLabel = "rating.ariaLabel";
128
+ /**
129
+ * @hidden
130
+ */
131
+ export declare const signatureCanvas = "signature.canvas";
128
132
  /**
129
133
  * @hidden
130
134
  */
@@ -227,6 +231,7 @@ export declare const messages: {
227
231
  "switch.validation": string;
228
232
  "colorPicker.dropdownButtonAriaLabel": string;
229
233
  "rating.ariaLabel": string;
234
+ "signature.canvas": string;
230
235
  "signature.clear": string;
231
236
  "signature.maximize": string;
232
237
  "signature.minimize": string;
package/messages/index.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 e="numerictextbox.increment",o="numerictextbox.decrement",a="slider.increment",r="slider.decrement",l="slider.dragTitle",t="colorGradient.r",i="colorGradient.g",n="colorGradient.b",c="colorGradient.a",s="colorGradient.hex",d="colorGradient.contrastRatio",G="colorGradient.colorGradientAALevel",b="colorGradient.colorGradientAAALevel",A="colorGradient.colorGradientPass",u="colorGradient.colorGradientFail",L="colorGradient.hueSliderLabel",C="colorGradient.alphaSliderLabel",p="colorGradient.toggleInputsButton",h="flatColorPicker.cancelBtn",g="flatColorPicker.applyBtn",P="flatColorPicker.colorGradientBtn",k="flatColorPicker.colorPaletteBtn",B="flatColorPicker.clearBtn",m="colorPicker.adaptiveTitle",f="checkbox.validation",x="checkbox.optionalText",v="radioButton.validation",w="switch.validation",V="colorPicker.dropdownButtonAriaLabel",I="rating.ariaLabel",S="signature.clear",T="signature.maximize",D="signature.minimize",R="switch.ariaLabel",y="slider.ariaLabel",z="otpInput.ariaLabel",H="otpInput.cellAriaLabel",M="rangeSlider.ariaLabel",O="colorGradient.ariaLabel",F="colorGradient.hsvAreaAriaLabel",j="colorPicker.ariaLabel",q="flatColorPicker.ariaLabel",E="colorPalette.ariaLabel",J="colorGradient.redChannelLabel",K="colorGradient.greenChannelLabel",N="colorGradient.blueChannelLabel",Q="colorGradient.alphaChannelLabel",U={[e]:"Increase value",[o]:"Decrease value",[a]:"Increase",[r]:"Decrease",[l]:"Drag",[t]:"r",[i]:"g",[n]:"b",[c]:"a",[s]:"hex",[d]:"Contrast ratio",[G]:"AA",[b]:"AAA",[A]:"Pass",[u]:"Fail",[L]:"Hue slider",[C]:"Alpha slider",[p]:"Toggle colorgradient inputs",[h]:"Cancel",[g]:"Apply",[P]:"Color Gradient view",[k]:"Color Palette view",[B]:"Clear color value",[m]:"Choose color",[f]:"Please check this box if you want to proceed!",[x]:"(Optional)",[v]:"Please select option if you want to proceed!",[w]:"Please turn on if you want to proceed!",[V]:"Select",[I]:"Rating",[S]:"Clear",[T]:"Maximize",[D]:"Minimize",[R]:"Toggle switch value",[y]:"Slider",[M]:"Range slider",[O]:"Color gradient",[F]:"Color well with two-dimensional slider for selecting saturation and lightness",[j]:"Color picker",[q]:"Color editor",[E]:"Color palette",[J]:"Red channel",[K]:"Green channel",[N]:"Blue channel",[Q]:"Alpha channel",[z]:"One-time password",[H]:"Digit {index} of {total}"};exports.checkboxOptionalText=x;exports.checkboxValidation=f;exports.colorGradientA=c;exports.colorGradientAAALevel=b;exports.colorGradientAALevel=G;exports.colorGradientAlphaChannelLabel=Q;exports.colorGradientAlphaSliderLabel=C;exports.colorGradientAriaLabel=O;exports.colorGradientB=n;exports.colorGradientBlueChannelLabel=N;exports.colorGradientContrastRatio=d;exports.colorGradientFail=u;exports.colorGradientG=i;exports.colorGradientGreenChannelLabel=K;exports.colorGradientHSVAreaAriaLabel=F;exports.colorGradientHex=s;exports.colorGradientHueSliderLabel=L;exports.colorGradientPass=A;exports.colorGradientR=t;exports.colorGradientRedChannelLabel=J;exports.colorGradientToggleInputsButton=p;exports.colorPaletteAriaLabel=E;exports.colorPickerAdaptiveTitle=m;exports.colorPickerAriaLabel=j;exports.colorPickerDropdownButtonAriaLabel=V;exports.flatColorPickerApplyBtn=g;exports.flatColorPickerAriaLabel=q;exports.flatColorPickerCancelBtn=h;exports.flatColorPickerClearBtn=B;exports.flatColorPickerColorGradientBtn=P;exports.flatColorPickerColorPaletteBtn=k;exports.messages=U;exports.numericDecreaseValue=o;exports.numericIncreaseValue=e;exports.otpInputAriaLabel=z;exports.otpInputCellAriaLabel=H;exports.radioButtonValidation=v;exports.rangeSliderAriaLabel=M;exports.ratingAriaLabel=I;exports.signatureClear=S;exports.signatureMaximize=T;exports.signatureMinimize=D;exports.sliderAriaLabel=y;exports.sliderDecreaseValue=r;exports.sliderDragTitle=l;exports.sliderIncreaseValue=a;exports.switchAriaLabel=R;exports.switchValidation=w;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e="numerictextbox.increment",a="numerictextbox.decrement",r="slider.increment",o="slider.decrement",l="slider.dragTitle",t="colorGradient.r",i="colorGradient.g",n="colorGradient.b",c="colorGradient.a",s="colorGradient.hex",d="colorGradient.contrastRatio",G="colorGradient.colorGradientAALevel",b="colorGradient.colorGradientAAALevel",u="colorGradient.colorGradientPass",A="colorGradient.colorGradientFail",L="colorGradient.hueSliderLabel",C="colorGradient.alphaSliderLabel",p="colorGradient.toggleInputsButton",g="flatColorPicker.cancelBtn",h="flatColorPicker.applyBtn",P="flatColorPicker.colorGradientBtn",k="flatColorPicker.colorPaletteBtn",B="flatColorPicker.clearBtn",m="colorPicker.adaptiveTitle",f="checkbox.validation",v="checkbox.optionalText",x="radioButton.validation",w="switch.validation",S="colorPicker.dropdownButtonAriaLabel",V="rating.ariaLabel",I="signature.canvas",T="signature.clear",D="signature.maximize",R="signature.minimize",y="switch.ariaLabel",z="slider.ariaLabel",H="otpInput.ariaLabel",M="otpInput.cellAriaLabel",O="rangeSlider.ariaLabel",F="colorGradient.ariaLabel",j="colorGradient.hsvAreaAriaLabel",q="colorPicker.ariaLabel",E="flatColorPicker.ariaLabel",J="colorPalette.ariaLabel",K="colorGradient.redChannelLabel",N="colorGradient.greenChannelLabel",Q="colorGradient.blueChannelLabel",U="colorGradient.alphaChannelLabel",W={[e]:"Increase value",[a]:"Decrease value",[r]:"Increase",[o]:"Decrease",[l]:"Drag",[t]:"r",[i]:"g",[n]:"b",[c]:"a",[s]:"hex",[d]:"Contrast ratio",[G]:"AA",[b]:"AAA",[u]:"Pass",[A]:"Fail",[L]:"Hue slider",[C]:"Alpha slider",[p]:"Toggle colorgradient inputs",[g]:"Cancel",[h]:"Apply",[P]:"Color Gradient view",[k]:"Color Palette view",[B]:"Clear color value",[m]:"Choose color",[f]:"Please check this box if you want to proceed!",[v]:"(Optional)",[x]:"Please select option if you want to proceed!",[w]:"Please turn on if you want to proceed!",[S]:"Select",[V]:"Rating",[I]:"Signature",[T]:"Clear",[D]:"Maximize",[R]:"Minimize",[y]:"Toggle switch value",[z]:"Slider",[O]:"Range slider",[F]:"Color gradient",[j]:"Color well with two-dimensional slider for selecting saturation and lightness",[q]:"Color picker",[E]:"Color editor",[J]:"Color palette",[K]:"Red channel",[N]:"Green channel",[Q]:"Blue channel",[U]:"Alpha channel",[H]:"One-time password",[M]:"Digit {index} of {total}"};exports.checkboxOptionalText=v;exports.checkboxValidation=f;exports.colorGradientA=c;exports.colorGradientAAALevel=b;exports.colorGradientAALevel=G;exports.colorGradientAlphaChannelLabel=U;exports.colorGradientAlphaSliderLabel=C;exports.colorGradientAriaLabel=F;exports.colorGradientB=n;exports.colorGradientBlueChannelLabel=Q;exports.colorGradientContrastRatio=d;exports.colorGradientFail=A;exports.colorGradientG=i;exports.colorGradientGreenChannelLabel=N;exports.colorGradientHSVAreaAriaLabel=j;exports.colorGradientHex=s;exports.colorGradientHueSliderLabel=L;exports.colorGradientPass=u;exports.colorGradientR=t;exports.colorGradientRedChannelLabel=K;exports.colorGradientToggleInputsButton=p;exports.colorPaletteAriaLabel=J;exports.colorPickerAdaptiveTitle=m;exports.colorPickerAriaLabel=q;exports.colorPickerDropdownButtonAriaLabel=S;exports.flatColorPickerApplyBtn=h;exports.flatColorPickerAriaLabel=E;exports.flatColorPickerCancelBtn=g;exports.flatColorPickerClearBtn=B;exports.flatColorPickerColorGradientBtn=P;exports.flatColorPickerColorPaletteBtn=k;exports.messages=W;exports.numericDecreaseValue=a;exports.numericIncreaseValue=e;exports.otpInputAriaLabel=H;exports.otpInputCellAriaLabel=M;exports.radioButtonValidation=x;exports.rangeSliderAriaLabel=O;exports.ratingAriaLabel=V;exports.signatureCanvas=I;exports.signatureClear=T;exports.signatureMaximize=D;exports.signatureMinimize=R;exports.sliderAriaLabel=z;exports.sliderDecreaseValue=o;exports.sliderDragTitle=l;exports.sliderIncreaseValue=r;exports.switchAriaLabel=y;exports.switchValidation=w;
@@ -5,7 +5,7 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- const e = "numerictextbox.increment", o = "numerictextbox.decrement", a = "slider.increment", r = "slider.decrement", l = "slider.dragTitle", t = "colorGradient.r", n = "colorGradient.g", i = "colorGradient.b", c = "colorGradient.a", s = "colorGradient.hex", d = "colorGradient.contrastRatio", G = "colorGradient.colorGradientAALevel", b = "colorGradient.colorGradientAAALevel", u = "colorGradient.colorGradientPass", A = "colorGradient.colorGradientFail", L = "colorGradient.hueSliderLabel", C = "colorGradient.alphaSliderLabel", p = "colorGradient.toggleInputsButton", h = "flatColorPicker.cancelBtn", g = "flatColorPicker.applyBtn", P = "flatColorPicker.colorGradientBtn", k = "flatColorPicker.colorPaletteBtn", m = "flatColorPicker.clearBtn", x = "colorPicker.adaptiveTitle", B = "checkbox.validation", f = "checkbox.optionalText", v = "radioButton.validation", w = "switch.validation", I = "colorPicker.dropdownButtonAriaLabel", S = "rating.ariaLabel", T = "signature.clear", D = "signature.maximize", V = "signature.minimize", R = "switch.ariaLabel", y = "slider.ariaLabel", z = "otpInput.ariaLabel", H = "otpInput.cellAriaLabel", M = "rangeSlider.ariaLabel", F = "colorGradient.ariaLabel", O = "colorGradient.hsvAreaAriaLabel", j = "colorPicker.ariaLabel", q = "flatColorPicker.ariaLabel", E = "colorPalette.ariaLabel", J = "colorGradient.redChannelLabel", K = "colorGradient.greenChannelLabel", N = "colorGradient.blueChannelLabel", Q = "colorGradient.alphaChannelLabel", U = {
8
+ const e = "numerictextbox.increment", o = "numerictextbox.decrement", a = "slider.increment", r = "slider.decrement", l = "slider.dragTitle", t = "colorGradient.r", n = "colorGradient.g", i = "colorGradient.b", c = "colorGradient.a", s = "colorGradient.hex", d = "colorGradient.contrastRatio", G = "colorGradient.colorGradientAALevel", b = "colorGradient.colorGradientAAALevel", u = "colorGradient.colorGradientPass", A = "colorGradient.colorGradientFail", C = "colorGradient.hueSliderLabel", L = "colorGradient.alphaSliderLabel", p = "colorGradient.toggleInputsButton", h = "flatColorPicker.cancelBtn", g = "flatColorPicker.applyBtn", P = "flatColorPicker.colorGradientBtn", k = "flatColorPicker.colorPaletteBtn", m = "flatColorPicker.clearBtn", x = "colorPicker.adaptiveTitle", B = "checkbox.validation", v = "checkbox.optionalText", f = "radioButton.validation", w = "switch.validation", I = "colorPicker.dropdownButtonAriaLabel", S = "rating.ariaLabel", T = "signature.canvas", D = "signature.clear", V = "signature.maximize", R = "signature.minimize", y = "switch.ariaLabel", z = "slider.ariaLabel", H = "otpInput.ariaLabel", M = "otpInput.cellAriaLabel", F = "rangeSlider.ariaLabel", O = "colorGradient.ariaLabel", j = "colorGradient.hsvAreaAriaLabel", q = "colorPicker.ariaLabel", E = "flatColorPicker.ariaLabel", J = "colorPalette.ariaLabel", K = "colorGradient.redChannelLabel", N = "colorGradient.greenChannelLabel", Q = "colorGradient.blueChannelLabel", U = "colorGradient.alphaChannelLabel", W = {
9
9
  [e]: "Increase value",
10
10
  [o]: "Decrease value",
11
11
  [a]: "Increase",
@@ -21,8 +21,8 @@ const e = "numerictextbox.increment", o = "numerictextbox.decrement", a = "slide
21
21
  [b]: "AAA",
22
22
  [u]: "Pass",
23
23
  [A]: "Fail",
24
- [L]: "Hue slider",
25
- [C]: "Alpha slider",
24
+ [C]: "Hue slider",
25
+ [L]: "Alpha slider",
26
26
  [p]: "Toggle colorgradient inputs",
27
27
  [h]: "Cancel",
28
28
  [g]: "Apply",
@@ -31,76 +31,78 @@ const e = "numerictextbox.increment", o = "numerictextbox.decrement", a = "slide
31
31
  [m]: "Clear color value",
32
32
  [x]: "Choose color",
33
33
  [B]: "Please check this box if you want to proceed!",
34
- [f]: "(Optional)",
35
- [v]: "Please select option if you want to proceed!",
34
+ [v]: "(Optional)",
35
+ [f]: "Please select option if you want to proceed!",
36
36
  [w]: "Please turn on if you want to proceed!",
37
37
  [I]: "Select",
38
38
  [S]: "Rating",
39
- [T]: "Clear",
40
- [D]: "Maximize",
41
- [V]: "Minimize",
42
- [R]: "Toggle switch value",
43
- [y]: "Slider",
44
- [M]: "Range slider",
45
- [F]: "Color gradient",
46
- [O]: "Color well with two-dimensional slider for selecting saturation and lightness",
47
- [j]: "Color picker",
48
- [q]: "Color editor",
49
- [E]: "Color palette",
50
- [J]: "Red channel",
51
- [K]: "Green channel",
52
- [N]: "Blue channel",
53
- [Q]: "Alpha channel",
54
- [z]: "One-time password",
55
- [H]: "Digit {index} of {total}"
39
+ [T]: "Signature",
40
+ [D]: "Clear",
41
+ [V]: "Maximize",
42
+ [R]: "Minimize",
43
+ [y]: "Toggle switch value",
44
+ [z]: "Slider",
45
+ [F]: "Range slider",
46
+ [O]: "Color gradient",
47
+ [j]: "Color well with two-dimensional slider for selecting saturation and lightness",
48
+ [q]: "Color picker",
49
+ [E]: "Color editor",
50
+ [J]: "Color palette",
51
+ [K]: "Red channel",
52
+ [N]: "Green channel",
53
+ [Q]: "Blue channel",
54
+ [U]: "Alpha channel",
55
+ [H]: "One-time password",
56
+ [M]: "Digit {index} of {total}"
56
57
  };
57
58
  export {
58
- f as checkboxOptionalText,
59
+ v as checkboxOptionalText,
59
60
  B as checkboxValidation,
60
61
  c as colorGradientA,
61
62
  b as colorGradientAAALevel,
62
63
  G as colorGradientAALevel,
63
- Q as colorGradientAlphaChannelLabel,
64
- C as colorGradientAlphaSliderLabel,
65
- F as colorGradientAriaLabel,
64
+ U as colorGradientAlphaChannelLabel,
65
+ L as colorGradientAlphaSliderLabel,
66
+ O as colorGradientAriaLabel,
66
67
  i as colorGradientB,
67
- N as colorGradientBlueChannelLabel,
68
+ Q as colorGradientBlueChannelLabel,
68
69
  d as colorGradientContrastRatio,
69
70
  A as colorGradientFail,
70
71
  n as colorGradientG,
71
- K as colorGradientGreenChannelLabel,
72
- O as colorGradientHSVAreaAriaLabel,
72
+ N as colorGradientGreenChannelLabel,
73
+ j as colorGradientHSVAreaAriaLabel,
73
74
  s as colorGradientHex,
74
- L as colorGradientHueSliderLabel,
75
+ C as colorGradientHueSliderLabel,
75
76
  u as colorGradientPass,
76
77
  t as colorGradientR,
77
- J as colorGradientRedChannelLabel,
78
+ K as colorGradientRedChannelLabel,
78
79
  p as colorGradientToggleInputsButton,
79
- E as colorPaletteAriaLabel,
80
+ J as colorPaletteAriaLabel,
80
81
  x as colorPickerAdaptiveTitle,
81
- j as colorPickerAriaLabel,
82
+ q as colorPickerAriaLabel,
82
83
  I as colorPickerDropdownButtonAriaLabel,
83
84
  g as flatColorPickerApplyBtn,
84
- q as flatColorPickerAriaLabel,
85
+ E as flatColorPickerAriaLabel,
85
86
  h as flatColorPickerCancelBtn,
86
87
  m as flatColorPickerClearBtn,
87
88
  P as flatColorPickerColorGradientBtn,
88
89
  k as flatColorPickerColorPaletteBtn,
89
- U as messages,
90
+ W as messages,
90
91
  o as numericDecreaseValue,
91
92
  e as numericIncreaseValue,
92
- z as otpInputAriaLabel,
93
- H as otpInputCellAriaLabel,
94
- v as radioButtonValidation,
95
- M as rangeSliderAriaLabel,
93
+ H as otpInputAriaLabel,
94
+ M as otpInputCellAriaLabel,
95
+ f as radioButtonValidation,
96
+ F as rangeSliderAriaLabel,
96
97
  S as ratingAriaLabel,
97
- T as signatureClear,
98
- D as signatureMaximize,
99
- V as signatureMinimize,
100
- y as sliderAriaLabel,
98
+ T as signatureCanvas,
99
+ D as signatureClear,
100
+ V as signatureMaximize,
101
+ R as signatureMinimize,
102
+ z as sliderAriaLabel,
101
103
  r as sliderDecreaseValue,
102
104
  l as sliderDragTitle,
103
105
  a as sliderIncreaseValue,
104
- R as switchAriaLabel,
106
+ y as switchAriaLabel,
105
107
  w as switchValidation
106
108
  };
@@ -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 Ye=require("react"),t=require("prop-types"),Ve=require("@progress/kendo-react-intl"),l=require("@progress/kendo-react-common"),ye=require("@progress/kendo-svg-icons"),Je=require("@progress/kendo-react-labels"),g=require("../messages/index.js"),s=require("./utils/index.js"),ke=require("@progress/kendo-react-buttons");function Qe(p){const P=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(p){for(const v in p)if(v!=="default"){const M=Object.getOwnPropertyDescriptor(p,v);Object.defineProperty(P,v,M.get?M:{enumerable:!0,get:()=>p[v]})}}return P.default=p,Object.freeze(P)}const n=Qe(Ye),Xe="Please enter a valid value!",Ce=l.createPropsContext(),Z=n.forwardRef((p,P)=>{const v=l.usePropsContext(Ce,p),{className:M,value:h,defaultValue:Se,format:u,width:ee,tabIndex:Ee,accessKey:he,title:xe,placeholder:te,min:f,max:b,dir:I,name:q,label:T,id:ne,ariaDescribedBy:Ie,ariaLabelledBy:Oe,ariaLabel:Le,inputType:Pe,readOnly:C,validationMessage:K,children:Ne,touched:Ze,visited:et,modified:tt,style:re,inputStyle:De,valid:$,step:x=m.step,spinners:U=m.spinners,disabled:c=m.disabled,required:F=m.required,validityStyles:ae=m.validityStyles,prefix:Re=m.prefix,suffix:Be=m.suffix,onChange:O=m.onChange,onFocus:ue=m.onFocus,onBlur:se=m.onBlur,rangeOnEnter:oe=m.rangeOnEnter,size:N=m.size,rounded:W=m.rounded,fillMode:j=m.fillMode,autoFocus:Me=m.autoFocus,inputAttributes:qe,...le}=v,Te=l.useId(),ce=ne||Te,o=Ve.useInternationalization(),z=Ve.useLocalization(),a=n.useRef(null),_=n.useRef(void 0),[Fe,L]=n.useState(!1),d=n.useRef(s.getInitialState()),G=n.useRef(!1),Y=n.useRef(void 0),D=n.useRef(Se),ie=q||ne,R=s.formatValue(d.current.focused&&!c?d.current.currentLooseValue:s.getStateOrPropsValue(h,D.current),u,o);Y.current=R;const[je]=l.useCustomComponent(Re),[ze]=l.useCustomComponent(Be);n.useEffect(()=>{a.current&&a.current.setCustomValidity&&a.current.setCustomValidity(H().valid?"":K||Xe)});const de=n.useCallback(()=>{a.current&&a.current.focus()},[]),A=n.useCallback(()=>_.current!==void 0?_.current:s.getStateOrPropsValue(h,D.current),[h]),me=n.useCallback(()=>q,[q]),w=n.useCallback(()=>F,[F]),H=n.useCallback(()=>{const r=K!==void 0,e=A(),y=$!==void 0?$:!d.current.valueIsOutOfRange&&(!w()||e!=null);return{customError:r,valid:y,valueMissing:e==null}},[K,$,A,w]),J=n.useCallback(()=>ae,[ae]),fe=n.useCallback(()=>v,[v]),S=n.useCallback(()=>{const r={element:a.current,focus:de};return Object.defineProperty(r,"name",{get:me}),Object.defineProperty(r,"value",{get:A}),Object.defineProperty(r,"validity",{get:H}),Object.defineProperty(r,"validityStyles",{get:J}),Object.defineProperty(r,"required",{get:w}),Object.defineProperty(r,"props",{get:fe}),r},[me,A,H,J,w,de,fe]);n.useImperativeHandle(P,S);const be=n.useRef(null);n.useImperativeHandle(be,S),l.useWebMcpRegister("numerictextbox",be,v,v.webMcp);const E=n.useCallback(()=>({eventValue:s.getStateOrPropsValue(h,D.current),prevLooseValue:Y.current,currentLooseValue:a.current.value,selectionStart:a.current.selectionStart,selectionEnd:a.current.selectionEnd,decimalSelect:!1,valueIsCorrected:!1,valueIsOutOfRange:!1,isPaste:G.current,focused:d.current.focused}),[h]),V=n.useCallback((r,e)=>{if(c)return;_.current=e.eventValue,D.current=e.eventValue;const y=s.formatValue(s.rangeValue(e.eventValue,f,b),u,o),i=s.rangeValue(o.parseNumber(y,u),f,b);i!==e.eventValue&&(e.valueIsOutOfRange=!0,e.eventValue=i,D.current=i),h!==e.eventValue&&l.dispatchEvent(O,r,S(),{value:e.eventValue}),_.current=void 0,d.current=e,L(B=>!B)},[h,O,c,L,S]),_e=n.useCallback(r=>{const e=Number(r);if(isNaN(e))return;const y=s.rangeValue(e,f,b),i=s.formatValue(y,u,o),k={...d.current,eventValue:y,currentLooseValue:i,selectionStart:i.length,selectionEnd:i.length},B={target:a.current,currentTarget:a.current};V(B,k)},[f,b,u,o,V]);l.useKendoPaste(a,{fieldName:ie,onValueChange:_e,enabled:!!ie});const Ge=n.useCallback(r=>{const e=E();G.current=!1,V(r,s.sanitizeNumber(e,u,o))},[u,O,o,V,E]),Ae=n.useCallback(r=>{if(C||c)return;let e=E();const y=o.parseNumber(String(e.currentLooseValue),u);if(e.selectionEnd>e.selectionStart&&e.selectionEnd-e.selectionStart===String(e.currentLooseValue).length){const i=o.numberSymbols(),k=i&&r.key===i.minusSign,B=i&&r.key===i.decimal;G.current=!k&&!B;return}switch(r.keyCode){case 38:s.increaseValue(y,e,x,f,b,u,o);break;case 40:s.decreaseValue(y,e,x,f,b,u,o);break;case 13:{if(oe===!1)return;const i=s.formatValue(s.rangeValue(y,f,b),u,o),k=s.rangeValue(o.parseNumber(i,u),f,b);e.eventValue=k,e.currentLooseValue=s.formatValue(k,u,o),e.selectionStart=e.selectionEnd=e.currentLooseValue.length;break}case 110:{const i=a.current,k=o.numberSymbols();i&&(e.currentLooseValue=e.currentLooseValue.slice(0,e.selectionStart)+k.decimal+e.currentLooseValue.slice(e.selectionEnd),e.selectionStart=e.selectionEnd=e.selectionStart+1,e=s.sanitizeNumber(e,u,o));break}default:return}r.preventDefault(),V(r,e)},[u,f,b,x,O,oe,V,E]),we=n.useCallback(()=>{G.current=!0},[]),Q=n.useCallback(r=>{if(C||c)return;const e=E();s.increaseValue(o.parseNumber(String(e.currentLooseValue),u),e,x,f,b,u,o),V(r,e)},[u,f,b,x,O,C,c,V,E]),X=n.useCallback(r=>{if(C||c)return;const e=E();s.decreaseValue(o.parseNumber(String(e.currentLooseValue),u),e,x,f,b,u,o),V(r,e)},[u,f,b,x,O,C,c,V,E]),He=n.useCallback(r=>{const e=l.getActiveElement(document);!document||e!==a.current||!a.current||C||c||(r.nativeEvent.deltaY<0&&Q(r),r.nativeEvent.deltaY>0&&X(r))},[Q,X,c,C]),Ke=n.useCallback(r=>{d.current.currentLooseValue=Y.current,d.current.focused=!0,l.dispatchEvent(ue,r,S(),{}),L(e=>!e)},[ue,L,S]),$e=n.useCallback(r=>{d.current=s.getInitialState(),l.dispatchEvent(se,r,S(),{}),L(e=>!e)},[se,L,S]),Ue=n.useCallback(r=>{if(document&&a.current){const e=l.getActiveElement(document);r.preventDefault(),e!==a.current&&a.current.focus()}},[]);l.useIsomorphicLayoutEffect(()=>{a.current&&a.current.type!=="number"&&d.current.selectionStart!==void 0&&d.current.selectionEnd!==void 0&&(a.current.selectionStart=d.current.selectionStart,a.current.selectionEnd=d.current.selectionEnd,d.current.selectionStart=void 0,d.current.selectionEnd=void 0)},[Fe]);const[We,pe]=n.useState(I);l.useIsomorphicLayoutEffect(()=>{if(I!==void 0)pe(I);else if(a.current&&a.current.parentElement){const r=getComputedStyle(a.current.parentElement).direction;pe(r==="rtl"?"rtl":void 0)}},[I]);const ge=!J()||H().valid,ve=n.createElement("span",{dir:I,style:T?re:{width:ee,...re},className:l.classNames("k-input","k-numerictextbox",{[`k-input-${l.kendoThemeMaps.sizeMap[N]||N}`]:N,[`k-input-${j}`]:j,[`k-rounded-${l.kendoThemeMaps.roundedMap[W]||W}`]:W,"k-invalid":!ge,"k-required":F,"k-disabled":c},M),"aria-disabled":c?"true":void 0,...T?{}:le},n.createElement(je,null),n.createElement("input",{role:"spinbutton",value:R===null?"":R,tabIndex:l.getTabIndex(Ee,c),accessKey:he,disabled:c,title:xe,"aria-disabled":c?"true":void 0,"aria-valuemin":U?f:void 0,"aria-valuemax":U?b:void 0,"aria-label":Le,"aria-labelledby":Oe,"aria-describedby":Ie,"aria-required":F||void 0,placeholder:te,spellCheck:!1,autoComplete:"off",autoCorrect:"off",autoFocus:Me,type:Pe||"tel",className:"k-input-inner",id:ce,name:q,readOnly:C,style:De,dir:We,onChange:Ge,onFocus:Ke,onBlur:$e,onKeyDown:Ae,onPaste:we,onWheel:He,ref:a,...qe}),n.createElement(ze,null),Ne,U&&n.createElement("span",{className:"k-input-spinner k-spin-button",onMouseDown:Ue},n.createElement(ke.Button,{tabIndex:-1,type:"button",icon:"chevron-up",svgIcon:ye.chevronUpIcon,fillMode:j,size:N,className:"k-spinner-increase","aria-label":z.toLanguageString(g.numericIncreaseValue,g.messages[g.numericIncreaseValue]),title:z.toLanguageString(g.numericIncreaseValue,g.messages[g.numericIncreaseValue]),onClick:Q}),n.createElement(ke.Button,{tabIndex:-1,type:"button",icon:"chevron-down",svgIcon:ye.chevronDownIcon,fillMode:j,size:N,className:"k-spinner-decrease","aria-label":z.toLanguageString(g.numericDecreaseValue,g.messages[g.numericDecreaseValue]),title:z.toLanguageString(g.numericDecreaseValue,g.messages[g.numericDecreaseValue]),onClick:X})));return T?n.createElement(Je.FloatingLabel,{label:T,editorId:ce,editorValue:R===null?"":R,editorValid:ge,editorDisabled:c,editorPlaceholder:te,children:ve,style:{width:ee},dir:I,...le}):ve});Z.propTypes={value:t.number,defaultValue:t.number,step:t.number,format:t.oneOfType([t.string,t.shape({style:t.oneOf(["decimal","currency","percent","scientific","accounting"]),currency:t.string,currencyDisplay:t.oneOf(["symbol","code","name"]),useGrouping:t.bool,minimumIntegerDigits:t.number,minimumFractionDigits:t.number,maximumFractionDigits:t.number})]),width:t.oneOfType([t.string,t.number]),tabIndex:t.number,accessKey:t.string,title:t.string,placeholder:t.string,min:t.number,max:t.number,spinners:t.bool,disabled:t.bool,readOnly:t.bool,dir:t.string,name:t.string,label:t.string,validationMessage:t.string,required:t.bool,id:t.string,rangeOnEnter:t.bool,ariaLabelledBy:t.string,ariaDescribedBy:t.string,ariaLabel:t.string,onChange:t.func,onFocus:t.func,onBlur:t.func,size:t.oneOf(["small","medium","large"]),rounded:t.oneOf(["small","medium","large","full","none"]),fillMode:t.oneOf(["solid","flat","outline"]),inputAttributes:t.object};const m={prefix:p=>null,suffix:p=>null,step:1,spinners:!0,disabled:!1,required:!1,validityStyles:!0,rangeOnEnter:!0,autoFocus:!1,onChange:p=>{},onFocus:p=>{},onBlur:p=>{},size:void 0,rounded:void 0,fillMode:void 0};Z.displayName="KendoNumericTextBox";exports.NumericTextBox=Z;exports.NumericTextBoxPropsContext=Ce;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Ye=require("react"),t=require("prop-types"),Ve=require("@progress/kendo-react-intl"),l=require("@progress/kendo-react-common"),ye=require("@progress/kendo-svg-icons"),Je=require("@progress/kendo-react-labels"),g=require("../messages/index.js"),s=require("./utils/index.js"),ke=require("@progress/kendo-react-buttons");function Qe(b){const P=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(b){for(const v in b)if(v!=="default"){const M=Object.getOwnPropertyDescriptor(b,v);Object.defineProperty(P,v,M.get?M:{enumerable:!0,get:()=>b[v]})}}return P.default=b,Object.freeze(P)}const n=Qe(Ye),Xe="Please enter a valid value!",Ce=l.createPropsContext(),Z=n.forwardRef((b,P)=>{const v=l.usePropsContext(Ce,b),{className:M,value:h,defaultValue:Se,format:u,width:ee,tabIndex:Ee,accessKey:he,title:xe,placeholder:te,min:f,max:p,dir:I,name:q,label:T,id:ne,ariaDescribedBy:Ie,ariaLabelledBy:Oe,ariaLabel:Le,inputType:Pe,readOnly:C,validationMessage:K,children:Ne,touched:Ze,visited:et,modified:tt,style:re,inputStyle:De,valid:$,step:x=m.step,spinners:U=m.spinners,disabled:c=m.disabled,required:F=m.required,validityStyles:ae=m.validityStyles,prefix:Re=m.prefix,suffix:Be=m.suffix,onChange:O=m.onChange,onFocus:ue=m.onFocus,onBlur:se=m.onBlur,rangeOnEnter:oe=m.rangeOnEnter,size:N=m.size,rounded:W=m.rounded,fillMode:j=m.fillMode,autoFocus:Me=m.autoFocus,inputAttributes:qe,...le}=v,Te=l.useId(),ce=ne||Te,o=Ve.useInternationalization(),z=Ve.useLocalization(),a=n.useRef(null),_=n.useRef(void 0),[Fe,L]=n.useState(!1),d=n.useRef(s.getInitialState()),G=n.useRef(!1),Y=n.useRef(void 0),D=n.useRef(Se),ie=q||ne,R=s.formatValue(d.current.focused&&!c?d.current.currentLooseValue:s.getStateOrPropsValue(h,D.current),u,o);Y.current=R;const[je]=l.useCustomComponent(Re),[ze]=l.useCustomComponent(Be);n.useEffect(()=>{a.current&&a.current.setCustomValidity&&a.current.setCustomValidity(H().valid?"":K||Xe)});const de=n.useCallback(()=>{a.current&&a.current.focus()},[]),A=n.useCallback(()=>_.current!==void 0?_.current:s.getStateOrPropsValue(h,D.current),[h]),me=n.useCallback(()=>q,[q]),w=n.useCallback(()=>F,[F]),H=n.useCallback(()=>{const r=K!==void 0,e=A(),y=$!==void 0?$:!d.current.valueIsOutOfRange&&(!w()||e!=null);return{customError:r,valid:y,valueMissing:e==null}},[K,$,A,w]),J=n.useCallback(()=>ae,[ae]),fe=n.useCallback(()=>v,[v]),S=n.useCallback(()=>{const r={element:a.current,focus:de};return Object.defineProperty(r,"name",{get:me}),Object.defineProperty(r,"value",{get:A}),Object.defineProperty(r,"validity",{get:H}),Object.defineProperty(r,"validityStyles",{get:J}),Object.defineProperty(r,"required",{get:w}),Object.defineProperty(r,"props",{get:fe}),r},[me,A,H,J,w,de,fe]);n.useImperativeHandle(P,S);const pe=n.useRef(null);n.useImperativeHandle(pe,S),l.useWebMcpRegister("numerictextbox",pe,v,v.webMcp);const E=n.useCallback(()=>({eventValue:s.getStateOrPropsValue(h,D.current),prevLooseValue:Y.current,currentLooseValue:a.current.value,selectionStart:a.current.selectionStart,selectionEnd:a.current.selectionEnd,decimalSelect:!1,valueIsCorrected:!1,valueIsOutOfRange:!1,isPaste:G.current,focused:d.current.focused}),[h]),V=n.useCallback((r,e)=>{if(c)return;_.current=e.eventValue,D.current=e.eventValue;const y=s.formatValue(s.rangeValue(e.eventValue,f,p),u,o),i=s.rangeValue(o.parseNumber(y,u),f,p);i!==e.eventValue&&(e.valueIsOutOfRange=!0,e.eventValue=i,D.current=i),h!==e.eventValue&&l.dispatchEvent(O,r,S(),{value:e.eventValue}),_.current=void 0,d.current=e,L(B=>!B)},[h,O,c,L,S]),_e=n.useCallback(r=>{const e=Number(r);if(isNaN(e))return;const y=s.rangeValue(e,f,p),i=s.formatValue(y,u,o),k={...d.current,eventValue:y,currentLooseValue:i,selectionStart:i.length,selectionEnd:i.length},B={target:a.current,currentTarget:a.current};V(B,k)},[f,p,u,o,V]);l.useKendoPaste(a,{fieldName:ie,onValueChange:_e,enabled:!!ie});const Ge=n.useCallback(r=>{const e=E();G.current=!1,V(r,s.sanitizeNumber(e,u,o))},[u,O,o,V,E]),Ae=n.useCallback(r=>{if(C||c)return;let e=E();const y=o.parseNumber(String(e.currentLooseValue),u);if(e.selectionEnd>e.selectionStart&&e.selectionEnd-e.selectionStart===String(e.currentLooseValue).length){const i=o.numberSymbols(),k=i&&r.key===i.minusSign,B=i&&r.key===i.decimal;G.current=!k&&!B;return}switch(r.keyCode){case 38:s.increaseValue(y,e,x,f,p,u,o);break;case 40:s.decreaseValue(y,e,x,f,p,u,o);break;case 13:{if(oe===!1)return;const i=s.formatValue(s.rangeValue(y,f,p),u,o),k=s.rangeValue(o.parseNumber(i,u),f,p);e.eventValue=k,e.currentLooseValue=s.formatValue(k,u,o),e.selectionStart=e.selectionEnd=e.currentLooseValue.length;break}case 110:{const i=a.current,k=o.numberSymbols();i&&(e.currentLooseValue=e.currentLooseValue.slice(0,e.selectionStart)+k.decimal+e.currentLooseValue.slice(e.selectionEnd),e.selectionStart=e.selectionEnd=e.selectionStart+1,e=s.sanitizeNumber(e,u,o));break}default:return}r.preventDefault(),V(r,e)},[u,f,p,x,O,oe,V,E]),we=n.useCallback(()=>{G.current=!0},[]),Q=n.useCallback(r=>{if(C||c)return;const e=E();s.increaseValue(o.parseNumber(String(e.currentLooseValue),u),e,x,f,p,u,o),V(r,e)},[u,f,p,x,O,C,c,V,E]),X=n.useCallback(r=>{if(C||c)return;const e=E();s.decreaseValue(o.parseNumber(String(e.currentLooseValue),u),e,x,f,p,u,o),V(r,e)},[u,f,p,x,O,C,c,V,E]),He=n.useCallback(r=>{const e=l.getActiveElement(document);!document||e!==a.current||!a.current||C||c||(r.nativeEvent.deltaY<0&&Q(r),r.nativeEvent.deltaY>0&&X(r))},[Q,X,c,C]),Ke=n.useCallback(r=>{d.current.currentLooseValue=Y.current,d.current.focused=!0,l.dispatchEvent(ue,r,S(),{}),L(e=>!e)},[ue,L,S]),$e=n.useCallback(r=>{d.current=s.getInitialState(),l.dispatchEvent(se,r,S(),{}),L(e=>!e)},[se,L,S]),Ue=n.useCallback(r=>{if(document&&a.current){const e=l.getActiveElement(document);r.preventDefault(),e!==a.current&&a.current.focus()}},[]);l.useIsomorphicLayoutEffect(()=>{a.current&&a.current.type!=="number"&&d.current.selectionStart!==void 0&&d.current.selectionEnd!==void 0&&(a.current.selectionStart=d.current.selectionStart,a.current.selectionEnd=d.current.selectionEnd,d.current.selectionStart=void 0,d.current.selectionEnd=void 0)},[Fe]);const[We,be]=n.useState(I);l.useIsomorphicLayoutEffect(()=>{if(I!==void 0)be(I);else if(a.current&&a.current.parentElement){const r=getComputedStyle(a.current.parentElement).direction;be(r==="rtl"?"rtl":void 0)}},[I]);const ge=!J()||H().valid,ve=n.createElement("span",{dir:I,style:T?re:{width:ee,...re},className:l.classNames("k-input","k-numerictextbox",{[`k-input-${l.kendoThemeMaps.sizeMap[N]||N}`]:N,[`k-input-${j}`]:j,[`k-rounded-${l.kendoThemeMaps.roundedMap[W]||W}`]:W,"k-invalid":!ge,"k-required":F,"k-disabled":c},M),...T?{}:le},n.createElement(je,null),n.createElement("input",{role:"spinbutton",value:R===null?"":R,tabIndex:l.getTabIndex(Ee,c),accessKey:he,disabled:c,title:xe,"aria-valuemin":U?f:void 0,"aria-valuemax":U?p:void 0,"aria-label":Le,"aria-labelledby":Oe,"aria-describedby":Ie,"aria-required":F||void 0,placeholder:te,spellCheck:!1,autoComplete:"off",autoCorrect:"off",autoFocus:Me,type:Pe||"tel",className:"k-input-inner",id:ce,name:q,readOnly:C,style:De,dir:We,onChange:Ge,onFocus:Ke,onBlur:$e,onKeyDown:Ae,onPaste:we,onWheel:He,ref:a,...qe}),n.createElement(ze,null),Ne,U&&n.createElement("span",{className:"k-input-spinner k-spin-button",onMouseDown:Ue},n.createElement(ke.Button,{tabIndex:-1,type:"button",icon:"chevron-up",svgIcon:ye.chevronUpIcon,fillMode:j,size:N,disabled:c,className:"k-spinner-increase","aria-label":z.toLanguageString(g.numericIncreaseValue,g.messages[g.numericIncreaseValue]),title:z.toLanguageString(g.numericIncreaseValue,g.messages[g.numericIncreaseValue]),onClick:Q}),n.createElement(ke.Button,{tabIndex:-1,type:"button",icon:"chevron-down",svgIcon:ye.chevronDownIcon,fillMode:j,size:N,disabled:c,className:"k-spinner-decrease","aria-label":z.toLanguageString(g.numericDecreaseValue,g.messages[g.numericDecreaseValue]),title:z.toLanguageString(g.numericDecreaseValue,g.messages[g.numericDecreaseValue]),onClick:X})));return T?n.createElement(Je.FloatingLabel,{label:T,editorId:ce,editorValue:R===null?"":R,editorValid:ge,editorDisabled:c,editorPlaceholder:te,children:ve,style:{width:ee},dir:I,...le}):ve});Z.propTypes={value:t.number,defaultValue:t.number,step:t.number,format:t.oneOfType([t.string,t.shape({style:t.oneOf(["decimal","currency","percent","scientific","accounting"]),currency:t.string,currencyDisplay:t.oneOf(["symbol","code","name"]),useGrouping:t.bool,minimumIntegerDigits:t.number,minimumFractionDigits:t.number,maximumFractionDigits:t.number})]),width:t.oneOfType([t.string,t.number]),tabIndex:t.number,accessKey:t.string,title:t.string,placeholder:t.string,min:t.number,max:t.number,spinners:t.bool,disabled:t.bool,readOnly:t.bool,dir:t.string,name:t.string,label:t.string,validationMessage:t.string,required:t.bool,id:t.string,rangeOnEnter:t.bool,ariaLabelledBy:t.string,ariaDescribedBy:t.string,ariaLabel:t.string,onChange:t.func,onFocus:t.func,onBlur:t.func,size:t.oneOf(["small","medium","large"]),rounded:t.oneOf(["small","medium","large","full","none"]),fillMode:t.oneOf(["solid","flat","outline"]),inputAttributes:t.object};const m={prefix:b=>null,suffix:b=>null,step:1,spinners:!0,disabled:!1,required:!1,validityStyles:!0,rangeOnEnter:!0,autoFocus:!1,onChange:b=>{},onFocus:b=>{},onBlur:b=>{},size:void 0,rounded:void 0,fillMode:void 0};Z.displayName="KendoNumericTextBox";exports.NumericTextBox=Z;exports.NumericTextBoxPropsContext=Ce;
@@ -271,7 +271,6 @@ const gt = "Please enter a valid value!", vt = mt(), Oe = n.forwardRef(
271
271
  },
272
272
  Pe
273
273
  ),
274
- "aria-disabled": u ? "true" : void 0,
275
274
  ...F ? {} : ie
276
275
  },
277
276
  /* @__PURE__ */ n.createElement(We, null),
@@ -284,7 +283,6 @@ const gt = "Please enter a valid value!", vt = mt(), Oe = n.forwardRef(
284
283
  accessKey: Fe,
285
284
  disabled: u,
286
285
  title: Be,
287
- "aria-disabled": u ? "true" : void 0,
288
286
  "aria-valuemin": W ? d : void 0,
289
287
  "aria-valuemax": W ? m : void 0,
290
288
  "aria-label": ze,
@@ -324,6 +322,7 @@ const gt = "Please enter a valid value!", vt = mt(), Oe = n.forwardRef(
324
322
  svgIcon: ft,
325
323
  fillMode: M,
326
324
  size: I,
325
+ disabled: u,
327
326
  className: "k-spinner-increase",
328
327
  "aria-label": T.toLanguageString(
329
328
  H,
@@ -344,6 +343,7 @@ const gt = "Please enter a valid value!", vt = mt(), Oe = n.forwardRef(
344
343
  svgIcon: pt,
345
344
  fillMode: M,
346
345
  size: I,
346
+ disabled: u,
347
347
  className: "k-spinner-decrease",
348
348
  "aria-label": T.toLanguageString(
349
349
  _,
@@ -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 be=require("react"),I=require("@progress/kendo-react-common"),he=require("./OTPInputCell.js"),ge=require("./OTPInputSeparator.js"),Ce=require("@progress/kendo-react-intl"),j=require("../messages/index.js");function ve(o){const d=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(o){for(const f in o)if(f!=="default"){const m=Object.getOwnPropertyDescriptor(o,f);Object.defineProperty(d,f,m.get?m:{enumerable:!0,get:()=>o[f]})}}return d.default=o,Object.freeze(d)}const r=ve(be),ke=4;function ye(o,d){if(Array.isArray(d)){const C=d.reduce((E,w)=>E+w,0);return C!==o&&console.warn(`[OTPInput] The sum of groupLength values (${C}) must equal length (${o}).`),d}const f=[];let m=o;for(;m>0;)f.push(Math.min(d,m)),m-=d;return f}const H=r.forwardRef((o,d)=>{const{value:f,defaultValue:m,length:C,groupLength:E,separator:w,type:h,placeholder:G,spacing:F,disabled:L,readOnly:_,inputAttributes:U,name:T,required:W,valid:A,size:O,fillMode:J,rounded:Q,onChange:M,onFocus:P,onBlur:z,ariaLabel:X,ariaLabelledBy:Y,ariaDescribedBy:Z,id:$,style:x,dir:S,className:ee,touched:_e,visited:Ee,modified:we,validationMessage:Te,...te}=o,u=C!=null?C:ke,B=f!==void 0,[ae,re]=r.useState(()=>(m!=null?m:"").padEnd(u," ").slice(0,u)),l=(B?f:ae).padEnd(u," ").slice(0,u),V=r.useRef(l);V.current=l;const[ne,N]=r.useState(null),v=r.useRef(null),k=r.useCallback(e=>{v.current!==null&&clearTimeout(v.current),N(e),v.current=setTimeout(()=>{N(null),v.current=null},300)},[]);r.useEffect(()=>()=>{v.current!==null&&clearTimeout(v.current)},[]);const q=r.useRef(null),R=r.useRef([]),y=r.useRef(null),i=r.useCallback(e=>{var n;const t=Math.max(0,Math.min(e,u-1));(n=R.current[t])==null||n.focus()},[u]),b=r.useCallback((e,t)=>{const n=e.padEnd(u," ").slice(0,u);n!==l&&(V.current=n,B||re(n),M&&M({syntheticEvent:t,nativeEvent:t.nativeEvent,target:y.current,value:n}))},[B,u,M,l]),le=r.useCallback((e,t,n)=>{const a=n.target.value.slice(-1);if(!a)return;if(h==="number"&&!/^\d$/.test(a)){k(e);const g=l[e]===" "?"":l[e];n.target.value=g,n.target.select();return}const p=V.current.split("");p[e]=a;const s=p.join("");b(s,n),i(e+1)},[l,b,i,h,k]),K=r.useCallback((e,t,n)=>{if(n.preventDefault(),h==="number"&&!/^\d$/.test(t)){k(e),n.target.select();return}const c=l.split("");c[e]=t,b(c.join(""),n),i(e+1)},[h,k,l,b,i]),se=r.useCallback((e,t)=>{var c;if(_)return;const n=S==="rtl";switch(t.key){case"ArrowLeft":{t.preventDefault(),i(n?e+1:e-1);break}case"ArrowRight":{t.preventDefault(),i(n?e-1:e+1);break}case"ArrowUp":case"ArrowDown":{t.preventDefault();break}case"Backspace":{t.preventDefault();const a=l.split("");a[e]=" ",b(a.join(""),t),i(e-1);break}case"Delete":{t.preventDefault();const a=l.split("");a[e]=" ",b(a.join(""),t);break}default:{const{key:a,ctrlKey:p,altKey:s,metaKey:g}=t,D=(c=l[e])!=null?c:" ";a.length===1&&!p&&!s&&!g&&D!==" "&&K(e,a,t);break}}},[l,b,i,S,_,K]),ue=r.useCallback((e,t)=>{P&&P({syntheticEvent:t,nativeEvent:t.nativeEvent,target:y.current,cellIndex:e})},[P]),ce=r.useCallback((e,t)=>{},[]),{onFocus:oe,onBlur:ie}=I.useAsyncFocusBlur({onFocus:e=>{},onBlur:e=>{z&&z({syntheticEvent:e,nativeEvent:e.nativeEvent,target:y.current})}}),pe=r.useCallback(e=>{if(e.preventDefault(),_)return;const t=e.clipboardData.getData("text");if(!t)return;const n=R.current.findIndex(s=>s===document.activeElement),c=n>=0?n:0;if(h==="number"&&!/^\d+$/.test(t.trim())){k(c);return}const a=l.split("");for(let s=0;s<t.length&&c+s<u;s++)a[c+s]=t[s];b(a.join(""),e);const p=Math.min(c+t.length,u-1);i(p)},[l,b,i,u,h,k,_]);r.useImperativeHandle(y,()=>({get element(){return q.current},get value(){return l},focus(e){if(e!==void 0)i(e);else{const t=l.indexOf(" ");i(t>=0?t:u-1)}},blur(){R.current.forEach(e=>e==null?void 0:e.blur())}})),r.useImperativeHandle(d,()=>y.current),I.useWebMcpRegister("otpinput",y,o,o.webMcp);const de=()=>{const e=a=>{var p;return r.createElement(he.OTPInputCell,{key:a,ref:s=>{R.current[a]=s},index:a,totalLength:u,char:(p=l[a])!=null?p:" ",type:h,placeholder:G,disabled:L,readOnly:_,required:W,size:O,fillMode:J,rounded:Q,inputAttributes:U,valid:A===!1||ne===a?!1:A,onCellChange:le,onCellKeyDown:se,onCellFocus:ue,onCellBlur:ce,name:T?`${T}-cell-${a}`:`otp-cell-${a}`,id:$?`${$}-cell-${a}`:`otp-cell-${a}`})};if(!E){const a=Array.from({length:u},(p,s)=>e(s));return F===!1?[r.createElement("div",{key:"group",className:"k-input-group"},a)]:a}const t=ye(u,E);let n=0;const c=[];return t.forEach((a,p)=>{const s=n;p>0&&w!==void 0&&c.push(r.createElement(ge.OTPInputSeparator,{key:`sep-${s}`,separator:w}));const g=[];for(let D=0;D<a;D++)g.push(e(n++));F===!1?c.push(r.createElement("div",{key:`group-${s}`,className:"k-input-group"},g)):c.push(...g)}),c},fe=I.classNames("k-otp",{"k-disabled":L,"k-invalid":A===!1,[`k-otp-${I.kendoThemeMaps.sizeMap[O]||O}`]:O},ee),me=Ce.useLocalization().toLanguageString(j.otpInputAriaLabel,j.messages[j.otpInputAriaLabel]);return r.createElement("div",{ref:q,className:fe,role:"group","aria-label":X||me,"aria-labelledby":Y,"aria-describedby":Z,id:$,style:x,dir:S,onFocus:oe,onBlur:ie,onPaste:pe,...te},T&&r.createElement("input",{"aria-hidden":!0,type:"hidden",name:T,value:l.replace(/ /g,"")}),de())});H.displayName="KendoReactOTPInput";exports.OTPInput=H;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const fe=require("react"),M=require("@progress/kendo-react-common"),me=require("./OTPInputCell.js"),he=require("./OTPInputSeparator.js");function be(o){const d=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(o){for(const f in o)if(f!=="default"){const m=Object.getOwnPropertyDescriptor(o,f);Object.defineProperty(d,f,m.get?m:{enumerable:!0,get:()=>o[f]})}}return d.default=o,Object.freeze(d)}const a=be(fe),ge=4;function Ce(o,d){if(Array.isArray(d)){const C=d.reduce((E,w)=>E+w,0);return C!==o&&console.warn(`[OTPInput] The sum of groupLength values (${C}) must equal length (${o}).`),d}const f=[];let m=o;for(;m>0;)f.push(Math.min(d,m)),m-=d;return f}const L=a.forwardRef((o,d)=>{const{value:f,defaultValue:m,length:C,groupLength:E,separator:w,type:b,placeholder:H,spacing:F,disabled:N,readOnly:_,inputAttributes:G,name:O,required:U,valid:P,size:T,fillMode:W,rounded:J,onChange:$,onFocus:I,onBlur:S,ariaLabel:Q,ariaLabelledBy:X,ariaDescribedBy:Y,id:A,style:Z,dir:B,className:x,touched:ve,visited:ye,modified:ke,validationMessage:_e,...ee}=o,u=C!=null?C:ge,V=f!==void 0,[te,re]=a.useState(()=>(m!=null?m:"").padEnd(u," ").slice(0,u)),l=(V?f:te).padEnd(u," ").slice(0,u),j=a.useRef(l);j.current=l;const[ae,q]=a.useState(null),v=a.useRef(null),y=a.useCallback(e=>{v.current!==null&&clearTimeout(v.current),q(e),v.current=setTimeout(()=>{q(null),v.current=null},300)},[]);a.useEffect(()=>()=>{v.current!==null&&clearTimeout(v.current)},[]);const z=a.useRef(null),R=a.useRef([]),k=a.useRef(null),i=a.useCallback(e=>{var n;const t=Math.max(0,Math.min(e,u-1));(n=R.current[t])==null||n.focus()},[u]),h=a.useCallback((e,t)=>{const n=e.padEnd(u," ").slice(0,u);n!==l&&(j.current=n,V||re(n),$&&$({syntheticEvent:t,nativeEvent:t.nativeEvent,target:k.current,value:n}))},[V,u,$,l]),ne=a.useCallback((e,t,n)=>{const r=n.target.value.slice(-1);if(!r)return;if(b==="number"&&!/^\d$/.test(r)){y(e);const g=l[e]===" "?"":l[e];n.target.value=g,n.target.select();return}const p=j.current.split("");p[e]=r;const s=p.join("");h(s,n),i(e+1)},[l,h,i,b,y]),K=a.useCallback((e,t,n)=>{if(n.preventDefault(),b==="number"&&!/^\d$/.test(t)){y(e),n.target.select();return}const c=l.split("");c[e]=t,h(c.join(""),n),i(e+1)},[b,y,l,h,i]),le=a.useCallback((e,t)=>{var c;if(_)return;const n=B==="rtl";switch(t.key){case"ArrowLeft":{t.preventDefault(),i(n?e+1:e-1);break}case"ArrowRight":{t.preventDefault(),i(n?e-1:e+1);break}case"ArrowUp":case"ArrowDown":{t.preventDefault();break}case"Backspace":{t.preventDefault();const r=l.split("");r[e]=" ",h(r.join(""),t),i(e-1);break}case"Delete":{t.preventDefault();const r=l.split("");r[e]=" ",h(r.join(""),t);break}default:{const{key:r,ctrlKey:p,altKey:s,metaKey:g}=t,D=(c=l[e])!=null?c:" ";r.length===1&&!p&&!s&&!g&&D!==" "&&K(e,r,t);break}}},[l,h,i,B,_,K]),se=a.useCallback((e,t)=>{I&&I({syntheticEvent:t,nativeEvent:t.nativeEvent,target:k.current,cellIndex:e})},[I]),ue=a.useCallback((e,t)=>{},[]),{onFocus:ce,onBlur:oe}=M.useAsyncFocusBlur({onFocus:e=>{},onBlur:e=>{S&&S({syntheticEvent:e,nativeEvent:e.nativeEvent,target:k.current})}}),ie=a.useCallback(e=>{if(e.preventDefault(),_)return;const t=e.clipboardData.getData("text");if(!t)return;const n=R.current.findIndex(s=>s===document.activeElement),c=n>=0?n:0;if(b==="number"&&!/^\d+$/.test(t.trim())){y(c);return}const r=l.split("");for(let s=0;s<t.length&&c+s<u;s++)r[c+s]=t[s];h(r.join(""),e);const p=Math.min(c+t.length,u-1);i(p)},[l,h,i,u,b,y,_]);a.useImperativeHandle(k,()=>({get element(){return z.current},get value(){return l},focus(e){if(e!==void 0)i(e);else{const t=l.indexOf(" ");i(t>=0?t:u-1)}},blur(){R.current.forEach(e=>e==null?void 0:e.blur())}})),a.useImperativeHandle(d,()=>k.current),M.useWebMcpRegister("otpinput",k,o,o.webMcp);const pe=()=>{const e=r=>{var p;return a.createElement(me.OTPInputCell,{key:r,ref:s=>{R.current[r]=s},index:r,totalLength:u,char:(p=l[r])!=null?p:" ",type:b,placeholder:H,disabled:N,readOnly:_,required:U,size:T,fillMode:W,rounded:J,inputAttributes:G,valid:P===!1||ae===r?!1:P,onCellChange:ne,onCellKeyDown:le,onCellFocus:se,onCellBlur:ue,name:O?`${O}-cell-${r}`:`otp-cell-${r}`,id:A?`${A}-cell-${r}`:`otp-cell-${r}`})};if(!E){const r=Array.from({length:u},(p,s)=>e(s));return F===!1?[a.createElement("div",{key:"group",className:"k-input-group"},r)]:r}const t=Ce(u,E);let n=0;const c=[];return t.forEach((r,p)=>{const s=n;p>0&&w!==void 0&&c.push(a.createElement(he.OTPInputSeparator,{key:`sep-${s}`,separator:w}));const g=[];for(let D=0;D<r;D++)g.push(e(n++));F===!1?c.push(a.createElement("div",{key:`group-${s}`,className:"k-input-group"},g)):c.push(...g)}),c},de=M.classNames("k-otp",{"k-disabled":N,"k-invalid":P===!1,[`k-otp-${M.kendoThemeMaps.sizeMap[T]||T}`]:T},x);return a.createElement("div",{ref:z,className:de,role:"group","aria-label":Q,"aria-labelledby":X,"aria-describedby":Y,id:A,style:Z,dir:B,onFocus:ce,onBlur:oe,onPaste:ie,...ee},O&&a.createElement("input",{"aria-hidden":!0,type:"hidden",name:O,value:l.replace(/ /g,"")}),pe())});L.displayName="KendoReactOTPInput";exports.OTPInput=L;