@progress/kendo-vue-inputs 7.0.1-develop.2 → 7.0.1-develop.4

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 (42) hide show
  1. package/checkbox/Checkbox.js +1 -1
  2. package/checkbox/Checkbox.mjs +23 -19
  3. package/colors/ColorGradient.js +2 -2
  4. package/colors/ColorGradient.mjs +10 -10
  5. package/colors/ColorPalette.js +1 -1
  6. package/colors/ColorPalette.mjs +16 -16
  7. package/colors/ColorPicker.js +1 -1
  8. package/colors/ColorPicker.mjs +16 -16
  9. package/colors/FlatColorPicker.js +1 -1
  10. package/colors/FlatColorPicker.mjs +35 -35
  11. package/colors/HexInput.js +1 -1
  12. package/colors/HexInput.mjs +15 -11
  13. package/dist/cdn/js/kendo-vue-inputs.js +1 -1
  14. package/index.d.mts +559 -226
  15. package/index.d.ts +559 -226
  16. package/input/Input.js +1 -1
  17. package/input/Input.mjs +39 -35
  18. package/maskedtextbox/MaskedTextBox.js +1 -1
  19. package/maskedtextbox/MaskedTextBox.mjs +12 -5
  20. package/numerictextbox/NumericTextBox.js +1 -1
  21. package/numerictextbox/NumericTextBox.mjs +11 -7
  22. package/package-metadata.js +1 -1
  23. package/package-metadata.mjs +2 -2
  24. package/package.json +9 -9
  25. package/radiobutton/RadioButton.js +1 -1
  26. package/radiobutton/RadioButton.mjs +30 -24
  27. package/radiobutton/RadioGroup.js +1 -1
  28. package/radiobutton/RadioGroup.mjs +30 -30
  29. package/rating/Rating.js +1 -1
  30. package/rating/Rating.mjs +34 -30
  31. package/rating/RatingItem.js +1 -1
  32. package/rating/RatingItem.mjs +4 -4
  33. package/signature/Signature.js +1 -1
  34. package/signature/Signature.mjs +11 -11
  35. package/slider/Slider.js +1 -1
  36. package/slider/Slider.mjs +18 -14
  37. package/switch/Switch.js +1 -1
  38. package/switch/Switch.mjs +15 -11
  39. package/textarea/TextArea.js +1 -1
  40. package/textarea/TextArea.mjs +18 -18
  41. package/textbox/TextBox.js +1 -1
  42. package/textbox/TextBox.mjs +25 -21
package/switch/Switch.mjs CHANGED
@@ -6,7 +6,7 @@
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
8
  import { defineComponent as p, createVNode as i } from "vue";
9
- import { Keys as r, getTabIndex as c, setRef as u, noop as m, getRef as o, isRtl as f, kendoThemeMaps as n, validatePackage as g, guid as y } from "@progress/kendo-vue-common";
9
+ import { Keys as l, getTabIndex as c, setRef as u, noop as m, getRef as o, isRtl as f, kendoThemeMaps as n, validatePackage as g, guid as y } from "@progress/kendo-vue-common";
10
10
  import { provideLocalizationService as $ } from "@progress/kendo-vue-intl";
11
11
  import { switchValidation as h, messages as k } from "../messages/main.mjs";
12
12
  import { packageMetadata as b } from "../package-metadata.mjs";
@@ -16,11 +16,11 @@ const B = /* @__PURE__ */ p({
16
16
  event: "changemodel"
17
17
  },
18
18
  emits: {
19
- change: null,
20
- changemodel: null,
21
- "update:modelValue": null,
22
- focus: null,
23
- blur: null
19
+ change: (e) => !0,
20
+ changemodel: (e) => !0,
21
+ "update:modelValue": (e) => !0,
22
+ focus: (e) => !0,
23
+ blur: (e) => !0
24
24
  },
25
25
  props: {
26
26
  name: String,
@@ -147,7 +147,7 @@ const B = /* @__PURE__ */ p({
147
147
  offLabel: s,
148
148
  onLabel: a,
149
149
  tabIndex: d,
150
- required: l
150
+ required: r
151
151
  } = this.$props;
152
152
  return i("span", {
153
153
  class: this.switchClassName,
@@ -173,7 +173,7 @@ const B = /* @__PURE__ */ p({
173
173
  ref: u(this, "input"),
174
174
  tabindex: -1,
175
175
  name: this.$props.name,
176
- required: l !== void 0 ? l : !1,
176
+ required: r !== void 0 ? r : !1,
177
177
  "aria-hidden": !0,
178
178
  value: this.computedValue,
179
179
  style: {
@@ -238,13 +238,17 @@ const B = /* @__PURE__ */ p({
238
238
  const {
239
239
  keyCode: t
240
240
  } = e;
241
- (t === r.space || t === r.enter) && this.toggle(!this.computedValue, e);
241
+ (t === l.space || t === l.enter) && this.toggle(!this.computedValue, e);
242
242
  },
243
243
  handleWrapperFocus(e) {
244
- this.$props.disabled || (this.focused = !0, this.$emit("focus", e));
244
+ this.$props.disabled || (this.focused = !0, this.$emit("focus", {
245
+ event: e
246
+ }));
245
247
  },
246
248
  handleWrapperBlur(e) {
247
- this.$props.disabled || (this.focused = !1, this.$emit("blur", e));
249
+ this.$props.disabled || (this.focused = !1, this.$emit("blur", {
250
+ event: e
251
+ }));
248
252
  }
249
253
  }
250
254
  });
@@ -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 t=require("vue"),i=require("@progress/kendo-vue-common"),N=require("../package-metadata.js"),d=require("@progress/kendo-svg-icons"),c=require("./interfaces/TextAreaResize.js"),B=t.defineComponent({name:"KendoTextArea",model:{event:"changemodel"},emits:{input:null,change:null,changemodel:null,"update:modelValue":null,focus:null,blur:null},props:{title:String,ariaDescribedBy:String,ariaLabelledBy:String,autoSize:Boolean,modelValue:{type:[String,Array,Number],default:void 0},defaultValue:[String,Number],dir:String,disabled:Boolean,readOnly:Boolean,rows:Number,id:String,name:String,validationMessage:String,size:{type:String,default:"medium",validator:function(e){return[null,"small","medium","large"].includes(e)}},rounded:{type:String,default:"medium",validator:function(e){return[null,"small","medium","large","full"].includes(e)}},fillMode:{type:String,default:"solid",validator:function(e){return[null,"solid","flat","outline"].includes(e)}},required:Boolean,placeholder:String,tabIndex:Number,valid:{type:Boolean,default:void 0},value:[String,Array,Number],validityStyles:{type:Boolean,default:!0},iconName:String,inputPrefix:[String,Function],inputSuffix:[String,Function],showValidationIcon:Boolean,showLoadingIcon:Boolean,showClearButton:Boolean,inputClass:String,wrapperClass:String,flow:{type:String,default:"horizontal",validator:function(e){return["horizontal","vertical"].includes(e)}},resizable:{type:String,default:"vertical",validator:function(e){return["both","horizontal","vertical","none"].includes(e)}},inputAttributes:Object},created(){i.validatePackage(N.packageMetadata),this.calculatedId=i.guid()},computed:{resizableClass(){const{resizable:e,autoSize:a}=this.$props;return a||e===c.TextAreaResizeEnum.none?"k-resize-none":e===c.TextAreaResizeEnum.vertical?"k-resize-y":e===c.TextAreaResizeEnum.horizontal?"k-resize-x":"k-resize"},rootClassName(){const{size:e,fillMode:a,rounded:l,required:s,showLoadingIcon:n}=this.$props,r=this.validityStyles===!0?!this.isValid:!1;return{"k-input":!0,"k-textarea":!0,[`k-input-${i.kendoThemeMaps.sizeMap[e]||e}`]:e,[`k-input-${a}`]:a,[`k-rounded-${i.kendoThemeMaps.roundedMap[l]||l}`]:l,"k-disabled":this.$props.disabled,"k-invalid":r,"k-required":s,"k-loading":n,[this.resizableClass]:!0,"!k-flex-col":this.flow==="vertical","!k-flex-row":this.flow==="horizontal",[this.wrapperClass]:this.wrapperClass}},inputInnerClass(){return{"k-input-inner":!0,"!k-resize-none":!0,"!k-overflow-auto":!0,"k-flex":!0,[this.inputClass]:this.inputClass}},prefixRenderClass(){return{"k-input-prefix":!0,"!k-align-items-start":this.flow==="horizontal","k-input-prefix-horizontal":this.flow==="vertical","k-input-prefix-vertical":this.flow==="horizontal"}},suffixRenderClass(){return{"k-input-suffix":!0,"!k-align-items-start":this.flow==="horizontal","k-input-suffix-horizontal":this.flow==="vertical","k-input-suffix-vertical":this.flow==="horizontal"}},suffixIconWrapClass(){return{"k-flex-wrap":!0,"!k-align-items-start":!0}},computedValue(){let e;return this.$props.value!==void 0?e=this.$props.value:this.$props.modelValue!==void 0?e=this.$props.modelValue:e=this.currentValue,e},isValid(){return this.valid!==void 0?this.valid:this.required?!!this.computedValue:!0}},data(){return{currentValue:this.$props.defaultValue,textAreaHeight:"auto",currentDir:"ltr"}},watch:{size(){this.textAreaHeight="auto"},computedValue(){this.textAreaHeight="auto"}},mounted(){this.element=this.elementRef;let e;this.$props.dir!==void 0?e=this.$props.dir:e=i.isRtl(this.$el)?"rtl":"ltr",this.currentDir=e,this.setValidity()},updated(){this.element=this.elementRef,this.setValidity()},render(){const{ariaDescribedBy:e,ariaLabelledBy:a,autoSize:l,disabled:s,readOnly:n,required:r,rows:m,id:g,name:x,placeholder:k,tabIndex:V,iconName:o,showValidationIcon:u,showLoadingIcon:h,showClearButton:p,title:v,inputAttributes:b}=this.$props,C={...b,id:g||this.calculatedId,name:x,disabled:s,rows:m,title:v,placeholder:k,readOnly:n,required:r,tabIndex:i.getTabIndex(V,s),"aria-labelledby":a,"aria-describedby":e,"aria-multiline":!0,"aria-disabled":s||void 0,...this.$attrs},S=i.templateRendering.call(this,this.$props.inputPrefix,i.getListeners.call(this)),y=i.templateRendering.call(this,this.$props.inputSuffix,i.getListeners.call(this)),z=i.getTemplate.call(this,{h:t.h,template:S,additionalProps:{value:this.computedValue,valid:this.isValid,className:this.prefixRenderClass}}),I=i.getTemplate.call(this,{h:t.h,template:y,additionalProps:{value:this.computedValue,valid:this.isValid,className:this.suffixRenderClass}}),$=t.h("textarea",{...C,class:this.inputInnerClass,ref:w=>{this.elementRef=w},style:l?{overflow:"hidden",height:this.textAreaHeight}:{},value:this.computedValue,onChange:this.handleChange,onInput:this.handleInput,onFocus:this.handleFocus,onBlur:this.handleBlur}),f=[o&&t.createVNode("span",{class:"k-flex-wrap"},[t.createVNode(i.Icon,{name:o,class:"k-input-icon"},null)]),$,u&&this.isValid&&t.createVNode("span",{class:this.suffixIconWrapClass},[t.createVNode(i.Icon,{name:"check",icon:d.checkCircleIcon,class:"k-input-validation-icon"},null)]),u&&!this.isValid&&t.createVNode("span",{class:this.suffixIconWrapClass},[t.createVNode(i.Icon,{name:"exclamation-circle",icon:d.exclamationCircleIcon,class:"k-input-validation-icon"},null)]),h&&t.createVNode("span",{class:this.suffixIconWrapClass},[t.createVNode(i.Icon,{name:"loading",class:"k-input-loading-icon"},null)]),p&&this.computedValue&&t.createVNode("span",{class:this.suffixIconWrapClass},[t.createVNode("span",{onClick:this.clearClick,class:"k-clear-value"},[t.createVNode(i.Icon,{name:"x",icon:d.xIcon},null)])])];return t.createVNode("span",{class:this.rootClassName,dir:this.currentDir==="rtl"?this.currentDir:"",style:this.$attrs.style},[this.$props.inputPrefix&&z,o||u||h||p?t.createVNode("span",{class:"k-hstack k-flex"},[f]):f,this.$props.inputSuffix&&I])},methods:{setValidity(){var e,a;(a=(e=this.element)==null?void 0:e.setCustomValidity)==null||a.call(e,this.isValid?"":this.validationMessage||""),this.element&&(this.textAreaHeight=`${this.element.scrollHeight}px`)},clearClick(e){this.emitUpdate(e,"change","")},focus(){this.element&&this.element.focus()},emitUpdate(e,a,l){const s=l;this.$props.disabled||(this.currentValue=s),this.$props.disabled||(this.$emit("changemodel",s),this.$emit("update:modelValue",s),this.$emit(a,{event:e,component:this,name:this.element.name,value:s}))},handleChange(e){this.emitUpdate(e,"change",e.target.value)},handleInput(e){this.emitUpdate(e,"input",e.target.value)},handleFocus(e){this.$props.disabled||this.$emit("focus",{event:e,component:this,name:this.element.name})},handleBlur(e){this.$props.disabled||this.$emit("blur",{event:e,component:this,name:this.element.name})}}});exports.TextArea=B;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),i=require("@progress/kendo-vue-common"),N=require("../package-metadata.js"),d=require("@progress/kendo-svg-icons"),c=require("./interfaces/TextAreaResize.js"),B=t.defineComponent({name:"KendoTextArea",model:{event:"changemodel"},emits:{input:e=>!0,change:e=>!0,changemodel:e=>!0,"update:modelValue":e=>!0,focus:e=>!0,blur:e=>!0},props:{title:String,ariaDescribedBy:String,ariaLabelledBy:String,autoSize:Boolean,modelValue:{type:[String,Array,Number],default:void 0},defaultValue:[String,Number],dir:String,disabled:Boolean,readOnly:Boolean,rows:Number,id:String,name:String,validationMessage:String,size:{type:String,default:"medium",validator:function(e){return[null,"small","medium","large"].includes(e)}},rounded:{type:String,default:"medium",validator:function(e){return[null,"small","medium","large","full"].includes(e)}},fillMode:{type:String,default:"solid",validator:function(e){return[null,"solid","flat","outline"].includes(e)}},required:Boolean,placeholder:String,tabIndex:Number,valid:{type:Boolean,default:void 0},value:[String,Array,Number],validityStyles:{type:Boolean,default:!0},iconName:String,inputPrefix:[String,Function],inputSuffix:[String,Function],showValidationIcon:Boolean,showLoadingIcon:Boolean,showClearButton:Boolean,inputClass:String,wrapperClass:String,flow:{type:String,default:"horizontal",validator:function(e){return["horizontal","vertical"].includes(e)}},resizable:{type:String,default:"vertical",validator:function(e){return["both","horizontal","vertical","none"].includes(e)}},inputAttributes:Object},created(){i.validatePackage(N.packageMetadata),this.calculatedId=i.guid()},computed:{resizableClass(){const{resizable:e,autoSize:a}=this.$props;return a||e===c.TextAreaResizeEnum.none?"k-resize-none":e===c.TextAreaResizeEnum.vertical?"k-resize-y":e===c.TextAreaResizeEnum.horizontal?"k-resize-x":"k-resize"},rootClassName(){const{size:e,fillMode:a,rounded:n,required:s,showLoadingIcon:l}=this.$props,r=this.validityStyles===!0?!this.isValid:!1;return{"k-input":!0,"k-textarea":!0,[`k-input-${i.kendoThemeMaps.sizeMap[e]||e}`]:e,[`k-input-${a}`]:a,[`k-rounded-${i.kendoThemeMaps.roundedMap[n]||n}`]:n,"k-disabled":this.$props.disabled,"k-invalid":r,"k-required":s,"k-loading":l,[this.resizableClass]:!0,"!k-flex-col":this.flow==="vertical","!k-flex-row":this.flow==="horizontal",[this.wrapperClass]:this.wrapperClass}},inputInnerClass(){return{"k-input-inner":!0,"!k-resize-none":!0,"!k-overflow-auto":!0,"k-flex":!0,[this.inputClass]:this.inputClass}},prefixRenderClass(){return{"k-input-prefix":!0,"!k-align-items-start":this.flow==="horizontal","k-input-prefix-horizontal":this.flow==="vertical","k-input-prefix-vertical":this.flow==="horizontal"}},suffixRenderClass(){return{"k-input-suffix":!0,"!k-align-items-start":this.flow==="horizontal","k-input-suffix-horizontal":this.flow==="vertical","k-input-suffix-vertical":this.flow==="horizontal"}},suffixIconWrapClass(){return{"k-flex-wrap":!0,"!k-align-items-start":!0}},computedValue(){let e;return this.$props.value!==void 0?e=this.$props.value:this.$props.modelValue!==void 0?e=this.$props.modelValue:e=this.currentValue,e},isValid(){return this.valid!==void 0?this.valid:this.required?!!this.computedValue:!0}},data(){return{currentValue:this.$props.defaultValue,textAreaHeight:"auto",currentDir:"ltr"}},watch:{size(){this.textAreaHeight="auto"},computedValue(){this.textAreaHeight="auto"}},mounted(){this.element=this.elementRef;let e;this.$props.dir!==void 0?e=this.$props.dir:e=i.isRtl(this.$el)?"rtl":"ltr",this.currentDir=e,this.setValidity()},updated(){this.element=this.elementRef,this.setValidity()},render(){const{ariaDescribedBy:e,ariaLabelledBy:a,autoSize:n,disabled:s,readOnly:l,required:r,rows:m,id:g,name:x,placeholder:k,tabIndex:v,iconName:o,showValidationIcon:u,showLoadingIcon:h,showClearButton:p,title:V,inputAttributes:b}=this.$props,C={...b,id:g||this.calculatedId,name:x,disabled:s,rows:m,title:V,placeholder:k,readOnly:l,required:r,tabIndex:i.getTabIndex(v,s),"aria-labelledby":a,"aria-describedby":e,"aria-multiline":!0,"aria-disabled":s||void 0,...this.$attrs},S=i.templateRendering.call(this,this.$props.inputPrefix,i.getListeners.call(this)),y=i.templateRendering.call(this,this.$props.inputSuffix,i.getListeners.call(this)),z=i.getTemplate.call(this,{h:t.h,template:S,additionalProps:{value:this.computedValue,valid:this.isValid,className:this.prefixRenderClass}}),I=i.getTemplate.call(this,{h:t.h,template:y,additionalProps:{value:this.computedValue,valid:this.isValid,className:this.suffixRenderClass}}),$=t.h("textarea",{...C,class:this.inputInnerClass,ref:w=>{this.elementRef=w},style:n?{overflow:"hidden",height:this.textAreaHeight}:{},value:this.computedValue,onChange:this.handleChange,onInput:this.handleInput,onFocus:this.handleFocus,onBlur:this.handleBlur}),f=[o&&t.createVNode("span",{class:"k-flex-wrap"},[t.createVNode(i.Icon,{name:o,class:"k-input-icon"},null)]),$,u&&this.isValid&&t.createVNode("span",{class:this.suffixIconWrapClass},[t.createVNode(i.Icon,{name:"check",icon:d.checkCircleIcon,class:"k-input-validation-icon"},null)]),u&&!this.isValid&&t.createVNode("span",{class:this.suffixIconWrapClass},[t.createVNode(i.Icon,{name:"exclamation-circle",icon:d.exclamationCircleIcon,class:"k-input-validation-icon"},null)]),h&&t.createVNode("span",{class:this.suffixIconWrapClass},[t.createVNode(i.Icon,{name:"loading",class:"k-input-loading-icon"},null)]),p&&this.computedValue&&t.createVNode("span",{class:this.suffixIconWrapClass},[t.createVNode("span",{onClick:this.clearClick,class:"k-clear-value"},[t.createVNode(i.Icon,{name:"x",icon:d.xIcon},null)])])];return t.createVNode("span",{class:this.rootClassName,dir:this.currentDir==="rtl"?this.currentDir:"",style:this.$attrs.style},[this.$props.inputPrefix&&z,o||u||h||p?t.createVNode("span",{class:"k-hstack k-flex"},[f]):f,this.$props.inputSuffix&&I])},methods:{setValidity(){var e,a;(a=(e=this.element)==null?void 0:e.setCustomValidity)==null||a.call(e,this.isValid?"":this.validationMessage||""),this.element&&(this.textAreaHeight=`${this.element.scrollHeight}px`)},clearClick(e){this.emitUpdate(e,"change","")},focus(){this.element&&this.element.focus()},emitUpdate(e,a,n){const s=n;this.$props.disabled||(this.currentValue=s),this.$props.disabled||(this.$emit("changemodel",s),this.$emit("update:modelValue",s),this.$emit(a,{event:e,component:this,name:this.element.name,value:s}))},handleChange(e){this.emitUpdate(e,"change",e.target.value)},handleInput(e){this.emitUpdate(e,"input",e.target.value)},handleFocus(e){this.$props.disabled||this.$emit("focus",{event:e,component:this,name:this.element.name})},handleBlur(e){this.$props.disabled||this.$emit("blur",{event:e,component:this,name:this.element.name})}}});exports.TextArea=B;
@@ -6,7 +6,7 @@
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
8
  import { defineComponent as M, h as d, createVNode as t } from "vue";
9
- import { getTabIndex as P, templateRendering as m, getListeners as g, getTemplate as x, Icon as s, isRtl as T, kendoThemeMaps as k, validatePackage as q, guid as D } from "@progress/kendo-vue-common";
9
+ import { getTabIndex as P, templateRendering as m, getListeners as g, getTemplate as x, Icon as l, isRtl as T, kendoThemeMaps as k, validatePackage as q, guid as D } from "@progress/kendo-vue-common";
10
10
  import { packageMetadata as H } from "../package-metadata.mjs";
11
11
  import { checkCircleIcon as L, exclamationCircleIcon as W, xIcon as F } from "@progress/kendo-svg-icons";
12
12
  import { TextAreaResizeEnum as h } from "./interfaces/TextAreaResize.mjs";
@@ -16,12 +16,12 @@ const G = /* @__PURE__ */ M({
16
16
  event: "changemodel"
17
17
  },
18
18
  emits: {
19
- input: null,
20
- change: null,
21
- changemodel: null,
22
- "update:modelValue": null,
23
- focus: null,
24
- blur: null
19
+ input: (e) => !0,
20
+ change: (e) => !0,
21
+ changemodel: (e) => !0,
22
+ "update:modelValue": (e) => !0,
23
+ focus: (e) => !0,
24
+ blur: (e) => !0
25
25
  },
26
26
  props: {
27
27
  title: String,
@@ -112,7 +112,7 @@ const G = /* @__PURE__ */ M({
112
112
  const {
113
113
  size: e,
114
114
  fillMode: i,
115
- rounded: l,
115
+ rounded: s,
116
116
  required: a,
117
117
  showLoadingIcon: n
118
118
  } = this.$props, r = this.validityStyles === !0 ? !this.isValid : !1;
@@ -121,7 +121,7 @@ const G = /* @__PURE__ */ M({
121
121
  "k-textarea": !0,
122
122
  [`k-input-${k.sizeMap[e] || e}`]: e,
123
123
  [`k-input-${i}`]: i,
124
- [`k-rounded-${k.roundedMap[l] || l}`]: l,
124
+ [`k-rounded-${k.roundedMap[s] || s}`]: s,
125
125
  "k-disabled": this.$props.disabled,
126
126
  "k-invalid": r,
127
127
  "k-required": a,
@@ -198,7 +198,7 @@ const G = /* @__PURE__ */ M({
198
198
  const {
199
199
  ariaDescribedBy: e,
200
200
  ariaLabelledBy: i,
201
- autoSize: l,
201
+ autoSize: s,
202
202
  disabled: a,
203
203
  readOnly: n,
204
204
  required: r,
@@ -251,7 +251,7 @@ const G = /* @__PURE__ */ M({
251
251
  ref: (R) => {
252
252
  this.elementRef = R;
253
253
  },
254
- style: l ? {
254
+ style: s ? {
255
255
  overflow: "hidden",
256
256
  height: this.textAreaHeight
257
257
  } : {},
@@ -262,24 +262,24 @@ const G = /* @__PURE__ */ M({
262
262
  onBlur: this.handleBlur
263
263
  }), f = [o && t("span", {
264
264
  class: "k-flex-wrap"
265
- }, [t(s, {
265
+ }, [t(l, {
266
266
  name: o,
267
267
  class: "k-input-icon"
268
268
  }, null)]), N, u && this.isValid && t("span", {
269
269
  class: this.suffixIconWrapClass
270
- }, [t(s, {
270
+ }, [t(l, {
271
271
  name: "check",
272
272
  icon: L,
273
273
  class: "k-input-validation-icon"
274
274
  }, null)]), u && !this.isValid && t("span", {
275
275
  class: this.suffixIconWrapClass
276
- }, [t(s, {
276
+ }, [t(l, {
277
277
  name: "exclamation-circle",
278
278
  icon: W,
279
279
  class: "k-input-validation-icon"
280
280
  }, null)]), p && t("span", {
281
281
  class: this.suffixIconWrapClass
282
- }, [t(s, {
282
+ }, [t(l, {
283
283
  name: "loading",
284
284
  class: "k-input-loading-icon"
285
285
  }, null)]), c && this.computedValue && t("span", {
@@ -287,7 +287,7 @@ const G = /* @__PURE__ */ M({
287
287
  }, [t("span", {
288
288
  onClick: this.clearClick,
289
289
  class: "k-clear-value"
290
- }, [t(s, {
290
+ }, [t(l, {
291
291
  name: "x",
292
292
  icon: F
293
293
  }, null)])])];
@@ -310,8 +310,8 @@ const G = /* @__PURE__ */ M({
310
310
  focus() {
311
311
  this.element && this.element.focus();
312
312
  },
313
- emitUpdate(e, i, l) {
314
- const a = l;
313
+ emitUpdate(e, i, s) {
314
+ const a = s;
315
315
  this.$props.disabled || (this.currentValue = a), this.$props.disabled || (this.$emit("changemodel", a), this.$emit("update:modelValue", a), this.$emit(i, {
316
316
  event: e,
317
317
  component: this,
@@ -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 i=require("vue"),a=require("@progress/kendo-vue-common"),V=require("../package-metadata.js"),k=require("@progress/kendo-vue-labels"),o=require("@progress/kendo-svg-icons");function b(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!i.isVNode(t)}const S=i.defineComponent({model:{event:"changemodel"},inheritAttrs:!1,emits:{input:null,change:null,changemodel:null,"update:modelValue":null,focus:null,blur:null,keyup:null,keydown:null,keypress:null},props:{modelValue:{type:[String,Number],default:void 0},disabled:{type:Boolean,default:void 0},defaultValue:{type:[String,Number],default:""},value:{type:[String,Number]},label:{type:String},placeholder:{type:String},required:{type:Boolean,default:!1},size:{type:String,default:"medium",validator:function(t){return[null,"small","medium","large"].includes(t)}},rounded:{type:String,default:"medium",validator:function(t){return[null,"small","medium","large","full"].includes(t)}},fillMode:{type:String,default:"solid",validator:function(t){return[null,"solid","flat","outline"].includes(t)}},dir:{type:String},id:String,valid:{type:Boolean,default:void 0},validate:{type:Boolean},validationMessage:{type:String},validityStyles:{type:Boolean,default:!0},iconName:String,inputPrefix:[String,Function],inputSuffix:[String,Function],showValidationIcon:Boolean,showLoadingIcon:Boolean,showClearButton:Boolean,inputClass:String,wrapperClass:String,tabIndex:Number,role:String,title:String,ariaLabel:String,inputAttributes:Object},data:function(){return{hasMounted:!1,autofill:!1,currentValue:"",valueDuringOnChange:"",focused:!1}},created(){a.validatePackage(V.packageMetadata),this._input=void 0,this._inputId=a.guid(),this.$data.valueDuringOnChange=void 0,this.$data.currentValue=this.$props.defaultValue},mounted(){this._input=this.inputRef,this.wrapper=this.wrapperRef,this.$data.hasMounted=!0,this.setValidity()},updated(){this.setValidity(),this.updateValidClass()},setup(){return{inputRef:i.ref(null)}},render(){const t=!this.$props.validityStyles||this.validity().valid,{label:e,id:n,required:l,iconName:d,showValidationIcon:r,showLoadingIcon:h,showClearButton:c,inputAttributes:f}=this.$props,p=n||this._inputId,m=i.h("input",{...this.$attrs,...f,"aria-label":this.$props.ariaLabel,role:this.$props.role,title:this.$props.title,tabindex:this.$props.tabIndex,placeholder:this.$props.placeholder,id:p,required:l,disabled:this.$props.disabled,value:this.computedValue,class:this.inputInnerClass,ref:u=>{this.inputRef=u},onKeydown:this.handleKeydown,onKeyup:this.handleKeyup,onKeypress:this.handleKeypress,onChange:this.handleChange,onFocus:this.emitFocus,onBlur:this.emitBlur,onInput:this.handleInput,onAnimationstart:this.handleAutoFill,onAnimationend:this.handleAutoFillEnd}),g=a.templateRendering.call(this,this.$props.inputPrefix,a.getListeners.call(this)),y=a.templateRendering.call(this,this.$props.inputSuffix,a.getListeners.call(this)),v=a.getTemplate.call(this,{h:i.h,template:g,additionalProps:{value:this.computedValue,valid:t}}),$=a.getTemplate.call(this,{h:i.h,template:y,additionalProps:{value:this.computedValue,valid:t}}),s=i.createVNode("span",{class:this.inputWrapperClass(),ref:u=>{this.wrapperRef=u}},[d&&i.createVNode(a.Icon,{name:d,class:"k-input-icon"},null),this.$props.inputPrefix&&i.createVNode("span",{class:"k-input-prefix"},[v]),m,this.$props.inputSuffix&&i.createVNode("span",{class:"k-input-suffix"},[$]),r&&t&&i.createVNode(a.Icon,{name:"check",icon:o.checkIcon,class:"k-input-validation-icon"},null),r&&!t&&i.createVNode(a.Icon,{name:"exclamation-circle",icon:o.exclamationCircleIcon,class:"k-input-validation-icon"},null),h&&i.createVNode(a.Icon,{name:"loading",class:"k-input-loading-icon"},null),c&&this.computedValue&&i.createVNode("span",{onClick:this.clearClick,class:"k-clear-value"},[i.createVNode(a.Icon,{name:"x",icon:o.xIcon},null)])]);return e?i.createVNode(k.FloatingLabel,{label:e,editorId:p,editorValue:this.computedValue,editorValid:t,editorDisabled:this.$props.disabled,editorPlaceholder:this.$data.focused?this.$props.placeholder:"",dir:this.$props.dir},b(s)?s:{default:()=>[s]}):s},methods:{updateValidClass(){this.wrapper.classList.toggle("k-invalid",!this.validity().valid)},emitFocus(t){this.$emit("focus",t),this.$data.focused=!0},emitBlur(t){this.$emit("blur",t),this.$data.focused=!1},handleKeydown(t){this.$emit("keydown",t)},handleKeyup(t){this.$emit("keyup",t)},handleKeypress(t){this.$emit("keypress",t)},clearClick(t){this.emitUpdate(t,"change","")},focus(){this._input&&this._input.focus()},validity(){const t={badTextBox:this._input?this._input.validity.badTextBox:!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,tooShort:this._input?this._input.validity.tooShort:!1,typeMismatch:this._input?this._input.validity.typeMismatch:!1,valueMissing:this._input?this._input.validity.valueMissing:!1};return{...t,customError:this.$props.validationMessage!==void 0,valid:this.$props.valid!==void 0?this.$props.valid:this._input?!this.isInvalid(t):!0}},isInvalid(t){let e=!1;for(const n in t)t.hasOwnProperty(n)&&(e=e||t[n]);return e},setValidity(){this._input&&this._input.setCustomValidity&&this._input.setCustomValidity(this.validity().valid?"":this.$props.validationMessage||"")},handleInput(t){this.emitUpdate(t,"input",t.target.value)},handleChange(t){this.emitUpdate(t,"change",t.target.value)},emitUpdate(t,e,n){this.disabled||(this.$data.currentValue=n,this.$data.valueDuringOnChange=n,this.$nextTick(()=>{this.$emit("changemodel",n),this.$emit("update:modelValue",n),this.$emit(e,{event:t,value:n,component:this,target:t.target,validity:this.validity()}),this.$data.valueDuringOnChange=void 0}))},handleAutoFill(t){if(t.animationName==="autoFillStart"){const e=t.target.parentNode;e&&e.classList.contains("k-empty")&&(this.$data.autofill=!0,e.classList.remove("k-empty"))}},handleAutoFillEnd(t){t.animationName==="autoFillEnd"&&t.target.parentNode&&(this.$data.autofill=!1)},name:function(){return this.$props.name},inputWrapperClass(){const{size:t,fillMode:e,rounded:n}=this.$props,l=!this.$data.hasMounted||!this.$props.validityStyles||this.validity().valid;return{"k-textbox":!0,"k-input":!0,[`k-input-${a.kendoThemeMaps.sizeMap[t]||t}`]:t,[`k-input-${e}`]:e,[`k-rounded-${a.kendoThemeMaps.roundedMap[n]||n}`]:n,"k-invalid":!l,"k-required":this.required,"k-disabled":this.$props.disabled,[this.wrapperClass]:this.wrapperClass}}},computed:{spanClassNames(){const t=!this.$data.hasMounted||!this.$props.validityStyles||this.validity().valid;return{"k-floating-label-container":!0,"k-focus":this.$data.focused,"k-empty":!(this.computedValue===0||this.computedValue||this.$props.placeholder||this.$data.autofill),"k-autofill":this.$data.autofill,"k-invalid":!t&&t!==void 0,"k-rtl":this.$props.dir==="rtl"}},inputInnerClass(){return{"k-input-inner":!0,[this.inputClass]:this.inputClass}},computedValue(){return this.$data.valueDuringOnChange!==void 0?this.$data.valueDuringOnChange:this.$props.value!==void 0?this.$props.value:this.$props.modelValue!==void 0?this.$props.modelValue:this.$data.currentValue}}});exports.TextBox=S;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("vue"),a=require("@progress/kendo-vue-common"),V=require("../package-metadata.js"),k=require("@progress/kendo-vue-labels"),o=require("@progress/kendo-svg-icons");function b(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!i.isVNode(t)}const S=i.defineComponent({model:{event:"changemodel"},inheritAttrs:!1,emits:{input:t=>!0,change:t=>!0,changemodel:t=>!0,"update:modelValue":t=>!0,focus:t=>!0,blur:t=>!0,keyup:t=>!0,keydown:t=>!0,keypress:t=>!0},props:{modelValue:{type:[String,Number],default:void 0},disabled:{type:Boolean,default:void 0},defaultValue:{type:[String,Number],default:""},value:{type:[String,Number]},label:{type:String},placeholder:{type:String},required:{type:Boolean,default:!1},size:{type:String,default:"medium",validator:function(t){return[null,"small","medium","large"].includes(t)}},rounded:{type:String,default:"medium",validator:function(t){return[null,"small","medium","large","full"].includes(t)}},fillMode:{type:String,default:"solid",validator:function(t){return[null,"solid","flat","outline"].includes(t)}},dir:{type:String},id:String,valid:{type:Boolean,default:void 0},validate:{type:Boolean},validationMessage:{type:String},validityStyles:{type:Boolean,default:!0},iconName:String,inputPrefix:[String,Function],inputSuffix:[String,Function],showValidationIcon:Boolean,showLoadingIcon:Boolean,showClearButton:Boolean,inputClass:String,wrapperClass:String,tabIndex:Number,role:String,title:String,ariaLabel:String,inputAttributes:Object},data:function(){return{hasMounted:!1,autofill:!1,currentValue:"",valueDuringOnChange:"",focused:!1}},created(){a.validatePackage(V.packageMetadata),this._input=void 0,this._inputId=a.guid(),this.$data.valueDuringOnChange=void 0,this.$data.currentValue=this.$props.defaultValue},mounted(){this._input=this.inputRef,this.wrapper=this.wrapperRef,this.$data.hasMounted=!0,this.setValidity()},updated(){this.setValidity(),this.updateValidClass()},setup(){return{inputRef:i.ref(null)}},render(){const t=!this.$props.validityStyles||this.validity().valid,{label:e,id:n,required:l,iconName:r,showValidationIcon:d,showLoadingIcon:h,showClearButton:c,inputAttributes:f}=this.$props,p=n||this._inputId,m=i.h("input",{...this.$attrs,...f,"aria-label":this.$props.ariaLabel,role:this.$props.role,title:this.$props.title,tabindex:this.$props.tabIndex,placeholder:this.$props.placeholder,id:p,required:l,disabled:this.$props.disabled,value:this.computedValue,class:this.inputInnerClass,ref:u=>{this.inputRef=u},onKeydown:this.handleKeydown,onKeyup:this.handleKeyup,onKeypress:this.handleKeypress,onChange:this.handleChange,onFocus:this.emitFocus,onBlur:this.emitBlur,onInput:this.handleInput,onAnimationstart:this.handleAutoFill,onAnimationend:this.handleAutoFillEnd}),g=a.templateRendering.call(this,this.$props.inputPrefix,a.getListeners.call(this)),v=a.templateRendering.call(this,this.$props.inputSuffix,a.getListeners.call(this)),y=a.getTemplate.call(this,{h:i.h,template:g,additionalProps:{value:this.computedValue,valid:t}}),$=a.getTemplate.call(this,{h:i.h,template:v,additionalProps:{value:this.computedValue,valid:t}}),s=i.createVNode("span",{class:this.inputWrapperClass(),ref:u=>{this.wrapperRef=u}},[r&&i.createVNode(a.Icon,{name:r,class:"k-input-icon"},null),this.$props.inputPrefix&&i.createVNode("span",{class:"k-input-prefix"},[y]),m,this.$props.inputSuffix&&i.createVNode("span",{class:"k-input-suffix"},[$]),d&&t&&i.createVNode(a.Icon,{name:"check",icon:o.checkIcon,class:"k-input-validation-icon"},null),d&&!t&&i.createVNode(a.Icon,{name:"exclamation-circle",icon:o.exclamationCircleIcon,class:"k-input-validation-icon"},null),h&&i.createVNode(a.Icon,{name:"loading",class:"k-input-loading-icon"},null),c&&this.computedValue&&i.createVNode("span",{onClick:this.clearClick,class:"k-clear-value"},[i.createVNode(a.Icon,{name:"x",icon:o.xIcon},null)])]);return e?i.createVNode(k.FloatingLabel,{label:e,editorId:p,editorValue:this.computedValue,editorValid:t,editorDisabled:this.$props.disabled,editorPlaceholder:this.$data.focused?this.$props.placeholder:"",dir:this.$props.dir},b(s)?s:{default:()=>[s]}):s},methods:{updateValidClass(){this.wrapper.classList.toggle("k-invalid",!this.validity().valid)},emitFocus(t){this.$emit("focus",{event:t}),this.$data.focused=!0},emitBlur(t){this.$emit("blur",{event:t}),this.$data.focused=!1},handleKeydown(t){this.$emit("keydown",t)},handleKeyup(t){this.$emit("keyup",t)},handleKeypress(t){this.$emit("keypress",t)},clearClick(t){this.emitUpdate(t,"change","")},focus(){this._input&&this._input.focus()},validity(){const t={badTextBox:this._input?this._input.validity.badTextBox:!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,tooShort:this._input?this._input.validity.tooShort:!1,typeMismatch:this._input?this._input.validity.typeMismatch:!1,valueMissing:this._input?this._input.validity.valueMissing:!1};return{...t,customError:this.$props.validationMessage!==void 0,valid:this.$props.valid!==void 0?this.$props.valid:this._input?!this.isInvalid(t):!0}},isInvalid(t){let e=!1;for(const n in t)t.hasOwnProperty(n)&&(e=e||t[n]);return e},setValidity(){this._input&&this._input.setCustomValidity&&this._input.setCustomValidity(this.validity().valid?"":this.$props.validationMessage||"")},handleInput(t){this.emitUpdate(t,"input",t.target.value)},handleChange(t){this.emitUpdate(t,"change",t.target.value)},emitUpdate(t,e,n){this.disabled||(this.$data.currentValue=n,this.$data.valueDuringOnChange=n,this.$nextTick(()=>{this.$emit("changemodel",n),this.$emit("update:modelValue",n),this.$emit(e,{event:t,value:n,component:this,target:t.target,validity:this.validity()}),this.$data.valueDuringOnChange=void 0}))},handleAutoFill(t){if(t.animationName==="autoFillStart"){const e=t.target.parentNode;e&&e.classList.contains("k-empty")&&(this.$data.autofill=!0,e.classList.remove("k-empty"))}},handleAutoFillEnd(t){t.animationName==="autoFillEnd"&&t.target.parentNode&&(this.$data.autofill=!1)},name:function(){return this.$props.name},inputWrapperClass(){const{size:t,fillMode:e,rounded:n}=this.$props,l=!this.$data.hasMounted||!this.$props.validityStyles||this.validity().valid;return{"k-textbox":!0,"k-input":!0,[`k-input-${a.kendoThemeMaps.sizeMap[t]||t}`]:t,[`k-input-${e}`]:e,[`k-rounded-${a.kendoThemeMaps.roundedMap[n]||n}`]:n,"k-invalid":!l,"k-required":this.required,"k-disabled":this.$props.disabled,[this.wrapperClass]:this.wrapperClass}}},computed:{spanClassNames(){const t=!this.$data.hasMounted||!this.$props.validityStyles||this.validity().valid;return{"k-floating-label-container":!0,"k-focus":this.$data.focused,"k-empty":!(this.computedValue===0||this.computedValue||this.$props.placeholder||this.$data.autofill),"k-autofill":this.$data.autofill,"k-invalid":!t&&t!==void 0,"k-rtl":this.$props.dir==="rtl"}},inputInnerClass(){return{"k-input-inner":!0,[this.inputClass]:this.inputClass}},computedValue(){return this.$data.valueDuringOnChange!==void 0?this.$data.valueDuringOnChange:this.$props.value!==void 0?this.$props.value:this.$props.modelValue!==void 0?this.$props.modelValue:this.$data.currentValue}}});exports.TextBox=S;
@@ -19,15 +19,15 @@ const R = /* @__PURE__ */ x({
19
19
  },
20
20
  inheritAttrs: !1,
21
21
  emits: {
22
- input: null,
23
- change: null,
24
- changemodel: null,
25
- "update:modelValue": null,
26
- focus: null,
27
- blur: null,
28
- keyup: null,
29
- keydown: null,
30
- keypress: null
22
+ input: (t) => !0,
23
+ change: (t) => !0,
24
+ changemodel: (t) => !0,
25
+ "update:modelValue": (t) => !0,
26
+ focus: (t) => !0,
27
+ blur: (t) => !0,
28
+ keyup: (t) => !0,
29
+ keydown: (t) => !0,
30
+ keypress: (t) => !0
31
31
  },
32
32
  props: {
33
33
  modelValue: {
@@ -136,14 +136,14 @@ const R = /* @__PURE__ */ x({
136
136
  label: i,
137
137
  id: e,
138
138
  required: l,
139
- iconName: d,
140
- showValidationIcon: r,
139
+ iconName: r,
140
+ showValidationIcon: d,
141
141
  showLoadingIcon: g,
142
- showClearButton: y,
143
- inputAttributes: v
142
+ showClearButton: v,
143
+ inputAttributes: y
144
144
  } = this.$props, p = e || this._inputId, $ = o("input", {
145
145
  ...this.$attrs,
146
- ...v,
146
+ ...y,
147
147
  "aria-label": this.$props.ariaLabel,
148
148
  role: this.$props.role,
149
149
  title: this.$props.title,
@@ -185,25 +185,25 @@ const R = /* @__PURE__ */ x({
185
185
  ref: (u) => {
186
186
  this.wrapperRef = u;
187
187
  }
188
- }, [d && a(n, {
189
- name: d,
188
+ }, [r && a(n, {
189
+ name: r,
190
190
  class: "k-input-icon"
191
191
  }, null), this.$props.inputPrefix && a("span", {
192
192
  class: "k-input-prefix"
193
193
  }, [V]), $, this.$props.inputSuffix && a("span", {
194
194
  class: "k-input-suffix"
195
- }, [S]), r && t && a(n, {
195
+ }, [S]), d && t && a(n, {
196
196
  name: "check",
197
197
  icon: N,
198
198
  class: "k-input-validation-icon"
199
- }, null), r && !t && a(n, {
199
+ }, null), d && !t && a(n, {
200
200
  name: "exclamation-circle",
201
201
  icon: F,
202
202
  class: "k-input-validation-icon"
203
203
  }, null), g && a(n, {
204
204
  name: "loading",
205
205
  class: "k-input-loading-icon"
206
- }, null), y && this.computedValue && a("span", {
206
+ }, null), v && this.computedValue && a("span", {
207
207
  onClick: this.clearClick,
208
208
  class: "k-clear-value"
209
209
  }, [a(n, {
@@ -227,10 +227,14 @@ const R = /* @__PURE__ */ x({
227
227
  this.wrapper.classList.toggle("k-invalid", !this.validity().valid);
228
228
  },
229
229
  emitFocus(t) {
230
- this.$emit("focus", t), this.$data.focused = !0;
230
+ this.$emit("focus", {
231
+ event: t
232
+ }), this.$data.focused = !0;
231
233
  },
232
234
  emitBlur(t) {
233
- this.$emit("blur", t), this.$data.focused = !1;
235
+ this.$emit("blur", {
236
+ event: t
237
+ }), this.$data.focused = !1;
234
238
  },
235
239
  handleKeydown(t) {
236
240
  this.$emit("keydown", t);