@volverjs/ui-vue 0.0.10-beta.20 → 0.0.10-beta.22

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 (80) hide show
  1. package/dist/components/VvAccordion/VvAccordion.vue.d.ts +1 -1
  2. package/dist/components/VvAccordionGroup/VvAccordionGroup.vue.d.ts +1 -1
  3. package/dist/components/VvAction/VvAction.vue.d.ts +1 -1
  4. package/dist/components/VvAlert/VvAlert.vue.d.ts +1 -1
  5. package/dist/components/VvAlertGroup/VvAlertGroup.vue.d.ts +1 -1
  6. package/dist/components/VvAvatar/VvAvatar.vue.d.ts +1 -1
  7. package/dist/components/VvAvatarGroup/VvAvatarGroup.vue.d.ts +1 -1
  8. package/dist/components/VvBadge/VvBadge.vue.d.ts +1 -1
  9. package/dist/components/VvBreadcrumb/VvBreadcrumb.vue.d.ts +1 -1
  10. package/dist/components/VvButton/VvButton.vue.d.ts +1 -1
  11. package/dist/components/VvButtonGroup/VvButtonGroup.vue.d.ts +1 -1
  12. package/dist/components/VvCard/VvCard.vue.d.ts +1 -1
  13. package/dist/components/VvCheckbox/VvCheckbox.vue.d.ts +1 -1
  14. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.vue.d.ts +1 -1
  15. package/dist/components/VvCombobox/VvCombobox.vue.d.ts +67 -67
  16. package/dist/components/VvCombobox/index.d.ts +8 -8
  17. package/dist/components/VvDialog/VvDialog.vue.d.ts +1 -1
  18. package/dist/components/VvDropdown/VvDropdown.vue.d.ts +70 -70
  19. package/dist/components/VvDropdown/VvDropdownAction.vue.d.ts +1 -1
  20. package/dist/components/VvDropdown/VvDropdownItem.vue.d.ts +1 -1
  21. package/dist/components/VvDropdown/VvDropdownOptgroup.vue.d.ts +1 -1
  22. package/dist/components/VvDropdown/VvDropdownOption.vue.d.ts +1 -1
  23. package/dist/components/VvDropdown/index.d.ts +8 -8
  24. package/dist/components/VvIcon/VvIcon.vue.d.ts +1 -1
  25. package/dist/components/VvIcon/index.d.ts +12 -0
  26. package/dist/components/VvInputFile/VvInputFile.es.js +231 -67
  27. package/dist/components/VvInputFile/VvInputFile.umd.js +1 -1
  28. package/dist/components/VvInputFile/VvInputFile.vue.d.ts +152 -29
  29. package/dist/components/VvInputFile/index.d.ts +119 -14
  30. package/dist/components/VvInputText/VvInputClearAction.d.ts +6 -4
  31. package/dist/components/VvInputText/VvInputPasswordAction.d.ts +10 -8
  32. package/dist/components/VvInputText/VvInputStepAction.d.ts +1 -1
  33. package/dist/components/VvInputText/VvInputText.es.js +73 -65
  34. package/dist/components/VvInputText/VvInputText.umd.js +1 -1
  35. package/dist/components/VvInputText/VvInputText.vue.d.ts +10 -10
  36. package/dist/components/VvInputText/index.d.ts +6 -15
  37. package/dist/components/VvNav/VvNav.vue.d.ts +1 -1
  38. package/dist/components/VvNav/VvNavItem.vue.d.ts +1 -1
  39. package/dist/components/VvNav/VvNavSeparator.vue.d.ts +1 -1
  40. package/dist/components/VvProgress/VvProgress.vue.d.ts +1 -1
  41. package/dist/components/VvRadio/VvRadio.vue.d.ts +1 -1
  42. package/dist/components/VvRadioGroup/VvRadioGroup.vue.d.ts +1 -1
  43. package/dist/components/VvSelect/VvSelect.vue.d.ts +1 -1
  44. package/dist/components/VvTab/VvTab.vue.d.ts +1 -1
  45. package/dist/components/VvTextarea/VvTextarea.vue.d.ts +1 -1
  46. package/dist/components/VvTooltip/VvTooltip.vue.d.ts +1 -1
  47. package/dist/components/common/HintSlot.d.ts +1 -1
  48. package/dist/components/index.es.js +247 -96
  49. package/dist/components/index.umd.js +1 -1
  50. package/dist/composables/alert/useAlert.d.ts +1 -1
  51. package/dist/composables/dropdown/useProvideDropdown.d.ts +1 -1
  52. package/dist/icons.es.js +210 -210
  53. package/dist/icons.umd.js +1 -1
  54. package/dist/index.es.js +20 -12
  55. package/dist/index.umd.js +1 -1
  56. package/dist/props/index.d.ts +8 -14
  57. package/dist/resolvers/unplugin.es.js +20 -12
  58. package/dist/resolvers/unplugin.umd.js +1 -1
  59. package/dist/stories/InputFile/InputFile.stories.d.ts +1 -2
  60. package/dist/stories/InputFile/{InputFileModifiers.stories.d.ts → InputFileDropArea.stories.d.ts} +4 -4
  61. package/dist/stories/InputFile/InputFileIconPosition.stories.d.ts +8 -0
  62. package/dist/stories/InputFile/InputFileSlots.stories.d.ts +1 -0
  63. package/dist/types/input-file.d.ts +2 -0
  64. package/package.json +49 -49
  65. package/src/assets/icons/detailed.json +1 -1
  66. package/src/assets/icons/normal.json +1 -1
  67. package/src/assets/icons/simple.json +1 -1
  68. package/src/components/VvIcon/index.ts +13 -0
  69. package/src/components/VvInputFile/VvInputFile.vue +108 -40
  70. package/src/components/VvInputFile/index.ts +88 -10
  71. package/src/components/VvInputText/VvInputClearAction.ts +10 -6
  72. package/src/components/VvInputText/VvInputPasswordAction.ts +13 -9
  73. package/src/components/VvInputText/VvInputText.vue +6 -6
  74. package/src/components/VvInputText/index.ts +7 -15
  75. package/src/stories/InputFile/InputFile.settings.ts +1 -1
  76. package/src/stories/InputFile/InputFile.stories.ts +7 -16
  77. package/src/stories/InputFile/{InputFileModifiers.stories.ts → InputFileDropArea.stories.ts} +18 -13
  78. package/src/stories/InputFile/InputFileIconPosition.stories.ts +43 -0
  79. package/src/stories/InputFile/InputFileSlots.stories.ts +11 -3
  80. package/src/types/input-file.ts +4 -2
@@ -127,6 +127,18 @@ function HintSlotFactory(propsOrRef, slots) {
127
127
  HintSlot
128
128
  };
129
129
  }
130
+ const ACTION_ICONS = {
131
+ showPassword: "eye-on",
132
+ hidePassword: "eye-off",
133
+ showDatePicker: "calendar",
134
+ showTimePicker: "time",
135
+ showColorPicker: "color",
136
+ clear: "close",
137
+ add: "add",
138
+ remove: "trash",
139
+ edit: "edit",
140
+ download: "download"
141
+ };
130
142
  const VvIconPropsDefaults = {
131
143
  prefix: "normal"
132
144
  /* normal */
@@ -729,14 +741,6 @@ const INPUT_TYPES = {
729
741
  MONTH: "month",
730
742
  WEEK: "week"
731
743
  };
732
- const TYPES_ICON = {
733
- PASSWORD_SHOW: "eye-on",
734
- PASSWORD_HIDE: "eye-off",
735
- DATE: "calendar",
736
- TIME: "time",
737
- COLOR: "color",
738
- SEARCH: "close"
739
- };
740
744
  const VvInputTextEvents = [
741
745
  "update:modelValue",
742
746
  "update:masked",
@@ -805,24 +809,24 @@ const VvInputTextProps = {
805
809
  * @see VVIcon
806
810
  */
807
811
  iconShowPassword: {
808
- type: String,
809
- default: TYPES_ICON.PASSWORD_SHOW
812
+ type: [String, Object],
813
+ default: ACTION_ICONS.showPassword
810
814
  },
811
815
  /**
812
816
  * VvIcon name for hide password button
813
817
  * @see VVIcon
814
818
  */
815
819
  iconHidePassword: {
816
- type: String,
817
- default: TYPES_ICON.PASSWORD_HIDE
820
+ type: [String, Object],
821
+ default: ACTION_ICONS.hidePassword
818
822
  },
819
823
  /**
820
824
  * VvIcon name for clear button
821
825
  * @see VVIcon
822
826
  */
823
827
  iconClear: {
824
- type: String,
825
- default: TYPES_ICON.SEARCH
828
+ type: [String, Object],
829
+ default: ACTION_ICONS.clear
826
830
  },
827
831
  /**
828
832
  * Label for step up button
@@ -902,6 +906,41 @@ const VvInputTextProps = {
902
906
  default: false
903
907
  }
904
908
  };
909
+ function useComponentIcon(icon, iconPosition) {
910
+ const hasIcon = computed(() => {
911
+ if (typeof (icon == null ? void 0 : icon.value) === "string") {
912
+ return { name: icon == null ? void 0 : icon.value };
913
+ }
914
+ return icon == null ? void 0 : icon.value;
915
+ });
916
+ const hasIconBefore = computed(
917
+ () => (iconPosition == null ? void 0 : iconPosition.value) === Position.before ? hasIcon.value : void 0
918
+ );
919
+ const hasIconAfter = computed(
920
+ () => (iconPosition == null ? void 0 : iconPosition.value) === Position.after ? hasIcon.value : void 0
921
+ );
922
+ const hasIconLeft = computed(
923
+ () => (iconPosition == null ? void 0 : iconPosition.value) === Side.left ? hasIcon.value : void 0
924
+ );
925
+ const hasIconRight = computed(
926
+ () => (iconPosition == null ? void 0 : iconPosition.value) === Side.right ? hasIcon.value : void 0
927
+ );
928
+ const hasIconTop = computed(
929
+ () => (iconPosition == null ? void 0 : iconPosition.value) === Side.top ? hasIcon.value : void 0
930
+ );
931
+ const hasIconBottom = computed(
932
+ () => (iconPosition == null ? void 0 : iconPosition.value) === Side.bottom ? hasIcon.value : void 0
933
+ );
934
+ return {
935
+ hasIcon,
936
+ hasIconLeft,
937
+ hasIconRight,
938
+ hasIconTop,
939
+ hasIconBottom,
940
+ hasIconBefore,
941
+ hasIconAfter
942
+ };
943
+ }
905
944
  const VvInputPasswordAction = defineComponent({
906
945
  components: {
907
946
  VvIcon: _sfc_main$1
@@ -920,12 +959,12 @@ const VvInputPasswordAction = defineComponent({
920
959
  default: "Hide password"
921
960
  },
922
961
  iconShow: {
923
- type: String,
924
- default: TYPES_ICON.PASSWORD_SHOW
962
+ type: [String, Object],
963
+ default: ACTION_ICONS.showPassword
925
964
  },
926
965
  iconHide: {
927
- type: String,
928
- default: TYPES_ICON.PASSWORD_HIDE
966
+ type: [String, Object],
967
+ default: ACTION_ICONS.hidePassword
929
968
  }
930
969
  },
931
970
  emits: ["toggle-password"],
@@ -934,6 +973,7 @@ const VvInputPasswordAction = defineComponent({
934
973
  const activeIcon = computed(
935
974
  () => active.value ? props.iconHide : props.iconShow
936
975
  );
976
+ const { hasIcon } = useComponentIcon(activeIcon);
937
977
  function onClick(e) {
938
978
  e == null ? void 0 : e.stopPropagation();
939
979
  if (!props.disabled) {
@@ -944,14 +984,15 @@ const VvInputPasswordAction = defineComponent({
944
984
  return {
945
985
  active,
946
986
  activeIcon,
987
+ hasIcon,
947
988
  onClick
948
989
  };
949
990
  },
950
991
  render() {
951
- const icon = h(_sfc_main$1, {
952
- name: this.activeIcon,
992
+ const icon = this.hasIcon ? h(_sfc_main$1, {
993
+ ...this.hasIcon,
953
994
  class: "vv-input-text__icon"
954
- });
995
+ }) : void 0;
955
996
  return h(
956
997
  "button",
957
998
  {
@@ -1024,12 +1065,13 @@ const VvInputClearAction = defineComponent({
1024
1065
  default: "Clear"
1025
1066
  },
1026
1067
  icon: {
1027
- type: String,
1068
+ type: [String, Object],
1028
1069
  default: "close"
1029
1070
  }
1030
1071
  },
1031
1072
  emits: ["clear"],
1032
1073
  setup(props, { emit }) {
1074
+ const { hasIcon } = useComponentIcon(computed(() => props.icon));
1033
1075
  function onClick(e) {
1034
1076
  e == null ? void 0 : e.stopPropagation();
1035
1077
  if (!props.disabled) {
@@ -1037,14 +1079,15 @@ const VvInputClearAction = defineComponent({
1037
1079
  }
1038
1080
  }
1039
1081
  return {
1082
+ hasIcon,
1040
1083
  onClick
1041
1084
  };
1042
1085
  },
1043
1086
  render() {
1044
- const icon = h(_sfc_main$1, {
1045
- name: this.icon,
1087
+ const icon = this.hasIcon ? h(_sfc_main$1, {
1088
+ ...this.hasIcon,
1046
1089
  class: "vv-input-text__icon"
1047
- });
1090
+ }) : void 0;
1048
1091
  return h(
1049
1092
  "button",
1050
1093
  {
@@ -1218,41 +1261,6 @@ function useComponentFocus(inputTemplateRef, emit) {
1218
1261
  focused
1219
1262
  };
1220
1263
  }
1221
- function useComponentIcon(icon, iconPosition) {
1222
- const hasIcon = computed(() => {
1223
- if (typeof (icon == null ? void 0 : icon.value) === "string") {
1224
- return { name: icon == null ? void 0 : icon.value };
1225
- }
1226
- return icon == null ? void 0 : icon.value;
1227
- });
1228
- const hasIconBefore = computed(
1229
- () => (iconPosition == null ? void 0 : iconPosition.value) === Position.before ? hasIcon.value : void 0
1230
- );
1231
- const hasIconAfter = computed(
1232
- () => (iconPosition == null ? void 0 : iconPosition.value) === Position.after ? hasIcon.value : void 0
1233
- );
1234
- const hasIconLeft = computed(
1235
- () => (iconPosition == null ? void 0 : iconPosition.value) === Side.left ? hasIcon.value : void 0
1236
- );
1237
- const hasIconRight = computed(
1238
- () => (iconPosition == null ? void 0 : iconPosition.value) === Side.right ? hasIcon.value : void 0
1239
- );
1240
- const hasIconTop = computed(
1241
- () => (iconPosition == null ? void 0 : iconPosition.value) === Side.top ? hasIcon.value : void 0
1242
- );
1243
- const hasIconBottom = computed(
1244
- () => (iconPosition == null ? void 0 : iconPosition.value) === Side.bottom ? hasIcon.value : void 0
1245
- );
1246
- return {
1247
- hasIcon,
1248
- hasIconLeft,
1249
- hasIconRight,
1250
- hasIconTop,
1251
- hasIconBottom,
1252
- hasIconBefore,
1253
- hasIconAfter
1254
- };
1255
- }
1256
1264
  function useTextCount(text, options) {
1257
1265
  const length = computed(() => {
1258
1266
  return (unref(text) ?? "").length;
@@ -1502,14 +1510,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
1502
1510
  }
1503
1511
  switch (props.type) {
1504
1512
  case INPUT_TYPES.COLOR:
1505
- return { name: TYPES_ICON.COLOR };
1513
+ return { name: ACTION_ICONS.showColorPicker };
1506
1514
  case INPUT_TYPES.DATE:
1507
1515
  case INPUT_TYPES.DATETIME_LOCAL:
1508
1516
  case INPUT_TYPES.WEEK:
1509
1517
  case INPUT_TYPES.MONTH:
1510
- return { name: TYPES_ICON.DATE };
1518
+ return { name: ACTION_ICONS.showDatePicker };
1511
1519
  case INPUT_TYPES.TIME:
1512
- return { name: TYPES_ICON.TIME };
1520
+ return { name: ACTION_ICONS.showTimePicker };
1513
1521
  }
1514
1522
  return void 0;
1515
1523
  });
@@ -1542,8 +1550,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
1542
1550
  loading: loading.value,
1543
1551
  disabled: props.disabled,
1544
1552
  readonly: props.readonly,
1545
- "icon-before": hasIconBefore.value !== void 0,
1546
- "icon-after": iconAfter.value !== void 0,
1553
+ "icon-before": !!hasIconBefore.value,
1554
+ "icon-after": !!iconAfter.value,
1547
1555
  floating: props.floating && !isEmpty(props.label),
1548
1556
  dirty: isDirty.value,
1549
1557
  focus: isFocused.value,
@@ -1 +1 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("vue"),require("vue-imask"),require("@iconify/vue"),require("uid"),require("@vueuse/core")):"function"==typeof define&&define.amd?define(["vue","vue-imask","@iconify/vue","uid","@vueuse/core"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).VvInputText=t(e.vue,e.vueImask,e.vue$1,e.uid,e.core)}(this,(function(e,t,l,o,a){"use strict";function n(t){return null==(l=e.unref(t))||""===l||Array.isArray(l)&&0===l.length||!(l instanceof Date)&&"object"==typeof l&&0===Object.keys(l).length;var l}function i(e){return Array.isArray(e)?e.filter((e=>{return"string"==typeof(t=e)||t instanceof String;var t})).join(" "):e}const u={prefix:"normal"};var r=(e=>(e.left="left",e.right="right",e.top="top",e.bottom="bottom",e))(r||{}),d=(e=>(e.before="before",e.after="after",e))(d||{}),s=(e=>(e.button="button",e.submit="submit",e.reset="reset",e))(s||{}),v=(e=>(e.nuxtLink="nuxt-link",e.routerLink="router-link",e.a="a",e.button="button",e))(v||{});const c=Symbol.for("volver");function p(){return e.inject(c)}function f(t,l,o){return e.computed((()=>{const a={[t]:!0},n="string"==typeof(null==l?void 0:l.value)?l.value.split(" "):null==l?void 0:l.value;return n&&Array.isArray(n)&&n.forEach((e=>{e&&(a[`${t}--${e}`]=!0)})),o&&Object.keys(o.value).forEach((l=>{a[`${t}--${l}`]=e.unref(o.value[l])})),a}))}const m=e.defineComponent({name:"VvIcon",props:e.mergeDefaults({name:{},color:{},width:{},height:{},provider:{},prefix:{},src:{},horizontalFlip:{type:Boolean},verticalFlip:{type:Boolean},flip:{},mode:{},inline:{type:Boolean},rotate:{},onLoad:{type:Function},svg:{},modifiers:{}},u),setup(t){const o=t,a=e.computed((()=>"string"==typeof o.rotate?parseFloat(o.rotate):o.rotate)),n=e.ref(!0),i=p(),{modifiers:u}=e.toRefs(o),r=f("vv-icon",u),d=e.computed((()=>o.provider||(null==i?void 0:i.iconsProvider))),s=e.computed((()=>{const e=o.name??"",t=`@${d.value}:${o.prefix}:${e}`;if(l.iconExists(t))return t;const a=null==i?void 0:i.iconsCollections.find((t=>{const o=`@${d.value}:${t.prefix}:${e}`;return l.iconExists(o)}));return a?`@${d.value}:${a.prefix}:${e}`:e}));function v(e){const t=function(e){let t;if("undefined"==typeof window){const{JSDOM:e}=require("jsdom");t=(new e).window}return(t?new t.DOMParser:new window.DOMParser).parseFromString(e,"text/html").querySelector("svg")}(e),a=(null==t?void 0:t.innerHTML.trim())||"";t&&a&&l.addIcon(`@${d.value}:${o.prefix}:${o.name}`,{body:a,height:t.viewBox.baseVal.height,width:t.viewBox.baseVal.width})}return i&&o.src&&!l.iconExists(`@${d.value}:${o.prefix}:${o.name}`)&&(n.value=!1,i.fetchIcon(o.src).then((e=>{e&&(v(e),n.value=!0)})).catch((e=>{throw new Error(`Error during fetch icon: ${null==e?void 0:e.message}`)}))),o.svg&&v(o.svg),(t,o)=>e.unref(n)?(e.openBlock(),e.createBlock(e.unref(l.Icon),e.mergeProps({key:0,class:e.unref(r)},{inline:t.inline,width:t.width,height:t.height,horizontalFlip:t.horizontalFlip,verticalFlip:t.verticalFlip,flip:t.flip,rotate:e.unref(a),color:t.color,onLoad:t.onLoad,icon:e.unref(s)}),null,16,["class"])):e.createCommentVNode("v-if",!0)}}),h={valid:{type:Boolean,default:!1},validLabel:{type:[String,Array],default:void 0}},b={invalid:{type:Boolean,default:!1},invalidLabel:{type:[String,Array],default:void 0}},y={loading:{type:Boolean,default:!1},loadingLabel:{type:String,default:"Loading..."}},g={disabled:{type:Boolean,default:!1}},S=(Boolean,Boolean,Boolean,{label:{type:[String,Number],default:void 0}}),w={readonly:{type:Boolean,default:!1}},k={modifiers:{type:[String,Array],default:void 0}},L={hintLabel:{type:String,default:""}},E={count:{type:[Boolean,String],default:!1,validator:e=>[!0,!1,"limit","countdown"].includes(e)}},B={debounce:{type:[Number,String],default:void 0}},x={icon:{type:[String,Object],default:void 0},iconPosition:{type:String,default:d.before,validation:e=>Object.values(d).includes(e)}},$={tabindex:{type:[String,Number],default:0}},T={floating:{type:Boolean,default:!1}},A={id:[String,Number]};r.bottom,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean;const P={...{...A,name:{type:String,required:!0}},...{autofocus:{type:Boolean,default:!1}},...{autocomplete:{type:String,default:"off"}},...$,...g,...w,...h,...b,...L,...y,...k,...E,...B,...x,...T,...S,minlength:{type:[String,Number],default:void 0},maxlength:{type:[String,Number],default:void 0},placeholder:{type:String,default:void 0},required:{type:Boolean,default:!1}};s.button,v.button;const C={TEXT:"text",PASSWORD:"password",NUMBER:"number",EMAIL:"email",TEL:"tel",URL:"url",COLOR:"color",SEARCH:"search",DATE:"date",TIME:"time",DATETIME_LOCAL:"datetime-local",MONTH:"month",WEEK:"week"},D="eye-on",I="eye-off",O="calendar",V="time",_="color",N={...P,modelValue:[String,Number],type:{type:String,default:C.TEXT,validator:e=>Object.values(C).includes(e)},min:[Number,Date,String],max:[Number,Date,String],step:{type:[String,Number],default:1},pattern:String,multiple:Boolean,iconShowPassword:{type:String,default:D},iconHidePassword:{type:String,default:I},iconClear:{type:String,default:"close"},labelStepUp:{type:String,default:"Increase value"},labelStepDown:{type:String,default:"Decrease value"},labelShowPassword:{type:String,default:"Show password"},labelHidePassword:{type:String,default:"Hide password"},labelClear:{type:String,default:"Clear"},iMask:{type:Object,default:void 0},masked:{type:String,default:void 0},autoWidth:{type:Boolean,default:!1},hideActions:{type:Boolean,default:!1},unit:{type:String},selectOnFocus:{type:Boolean,default:!1}},M=e.defineComponent({components:{VvIcon:m},props:{disabled:{type:Boolean,default:!1},labelShow:{type:String,default:"Show password"},labelHide:{type:String,default:"Hide password"},iconShow:{type:String,default:D},iconHide:{type:String,default:I}},emits:["toggle-password"],setup(t,{emit:l}){const o=e.ref(!1),a=e.computed((()=>o.value?t.iconHide:t.iconShow));return{active:o,activeIcon:a,onClick:function(e){null==e||e.stopPropagation(),t.disabled||(o.value=!o.value,l("toggle-password",o.value))}}},render(){const t=e.h(m,{name:this.activeIcon,class:"vv-input-text__icon"});return e.h("button",{disabled:this.disabled,class:"vv-input-text__action",ariaLabel:this.active?this.labelHide:this.labelShow,type:"button",onClick:this.onClick},t)}}),R=e.defineComponent({components:{VvIcon:m},props:{disabled:{type:Boolean,default:!1},label:{type:String},mode:{type:String,validator:e=>["up","down"].includes(e),default:"up"}},emits:["step-up","step-down"],setup(t,{emit:l}){const o=e.computed((()=>"up"===t.mode));return{isUp:o,onClick:e=>{null==e||e.stopPropagation(),t.disabled||l(o.value?"step-up":"step-down")}}},render(){return e.h("button",{class:["vv-input-text__action vv-input-text__action-chevron",this.isUp&&"vv-input-text__action-chevron-up"],disabled:this.disabled,ariaLabel:this.label,type:"button",onClick:this.onClick})}}),H=e.defineComponent({components:{VvIcon:m},props:{disabled:{type:Boolean,default:!1},label:{type:String,default:"Clear"},icon:{type:String,default:"close"}},emits:["clear"],setup:(e,{emit:t})=>({onClick:function(l){null==l||l.stopPropagation(),e.disabled||t("clear")}}),render(){const t=e.h(m,{name:this.icon,class:"vv-input-text__icon"});return e.h("button",{disabled:this.disabled,class:"vv-input-text__action",ariaLabel:this.label,type:"button",onClick:this.onClick},t)}});function U(t,l){return{name:"VvInputTextActions",components:{VvIcon:m,VvInputPasswordAction:M,VvInputStepAction:R,VvInputClearAction:H},setup:()=>({isDisabled:e.computed((()=>l.disabled||l.readonly)),labelStepUp:l.labelStepUp,labelStepDown:l.labelStepDown,labelShowPassword:l.labelShowPassword,labelHidePassword:l.labelHidePassword,labelClear:l.labelClear,iconShowPassword:l.iconShowPassword,iconHidePassword:l.iconHidePassword}),render(){let o=null;switch(t){case C.SEARCH:{const{onClear:t}=this.$attrs;o=[e.h(H,{disabled:this.isDisabled,label:this.labelShowPassword,onClear:t})];break}case C.PASSWORD:{const{onTogglePassword:t}=this.$attrs;o=[e.h(M,{disabled:this.isDisabled,onTogglePassword:t,labelShow:this.labelShowPassword,labelHide:this.labelHidePassword,iconShow:this.iconShowPassword,iconHide:this.iconHidePassword})];break}case C.NUMBER:{const{onStepUp:t,onStepDown:a}=this.$attrs;o=[e.h(R,{mode:"up",disabled:this.isDisabled||void 0!==l.max&&l.modelValue===l.max,label:this.labelStepUp,onStepUp:t,onStepDown:a}),e.h(R,{mode:"down",disabled:this.isDisabled||void 0!==l.min&&l.modelValue===l.min,label:this.labelStepDown,onStepUp:t,onStepDown:a})];break}}return Array.isArray(o)?e.h("div",{class:"vv-input-text__actions-group"},o):o}}}const j=["for"],F={class:"vv-input-text__wrapper"},W={key:0,class:"vv-input-text__input-before"},z=["id"],q={key:1,class:"vv-input-text__unit"},K={key:5,class:"vv-input-text__input-after"},X={key:6,class:"vv-input-text__limit"};return e.defineComponent({name:"VvInputText",props:N,emits:["update:modelValue","update:masked","accept","accept:typed","accept:masked","accept:unmasked","complete","complete:typed","complete:masked","complete:unmasked","focus","blur","keyup","keydown","keypress"],setup(l,{expose:u,emit:s}){const v=l,c=s,h=e.useSlots(),b=function(t,l,o){const a=p(),n=e.computed((()=>{var e;if(a&&(null==(e=a.defaults.value)?void 0:e[t]))return a.defaults.value[t]}));return e.computed((()=>{if(void 0===n.value)return o;const e=n.value,t=l,a=o;return Object.keys(t).reduce(((l,o)=>{const n=a[o];if(l[o]=n,o in e){if(Array.isArray(t[o])){const a=t[o];a.length&&a[0]===n&&(l[o]=e[o])}if("function"==typeof t[o]&&(0,t[o])()===n&&(l[o]=e[o]),"object"==typeof t[o]){let a=t[o].default;"function"==typeof a&&(a=a()),"object"==typeof a?JSON.stringify(a)===JSON.stringify(n)&&(l[o]=e[o]):a===n&&(l[o]=e[o])}}return l}),{})}))}("VvInputText",N,v),{id:y,icon:g,iconPosition:S,label:w,modelValue:k,count:L,valid:E,invalid:B,loading:x,debounce:$,maxlength:T,minlength:A,type:P,iMask:D,step:I}=e.toRefs(v),M=(t=>e.computed((()=>String((null==t?void 0:t.value)||o.uid()))))(y),R=e.computed((()=>`${M.value}-hint`)),H=e.computed((()=>v.floating&&n(v.placeholder)?" ":v.placeholder)),J=e.ref(!1),{el:Y,mask:G,typed:Q,masked:Z,unmasked:ee}=t.useIMask(e.computed((()=>(null==D?void 0:D.value)??{mask:/./})),{emit:c,onAccept:()=>{if(J.value){if(c("update:masked",Z.value),P.value===C.NUMBER){if(""===Z.value){if(null===oe.value||void 0===oe.value)return;return void(oe.value=void 0)}return"number"!=typeof Q.value?void(oe.value=Number(Q.value)):void(oe.value=Q.value)}if(P.value===C.DATE){if(Y.value instanceof HTMLInputElement&&"date"===Y.value.type)return void(oe.value=Y.value.value);let e=Q.value;if(null===e||""===e){if(!oe.value)return;return void(oe.value="")}return e instanceof Date||(e=new Date(e)),void(oe.value=`${e.getFullYear()}-${("0"+(e.getMonth()+1)).slice(-2)}-${("0"+e.getDate()).slice(-2)}`)}if(P.value===C.DATETIME_LOCAL){if(Y.value instanceof HTMLInputElement&&"datetime-local"===Y.value.type)return void(oe.value=Y.value.value);let e=Q.value;if(null===e||""===e){if(!oe.value)return;return void(oe.value="")}return Q.value instanceof Date||(e=new Date(e)),void(oe.value=`${e.getFullYear()}-${("0"+(e.getMonth()+1)).slice(-2)}-${("0"+e.getDate()).slice(-2)}T${("0"+e.getHours()).slice(-2)}:${("0"+e.getMinutes()).slice(-2)}`)}(oe.value||ee.value)&&(oe.value=ee.value)}}});e.onMounted((()=>{G.value&&(J.value=!0,Q.value=oe.value??"")})),e.watch((()=>v.modelValue),(e=>{var t;G.value&&(Q.value=e&&(null==(t=null==D?void 0:D.value)?void 0:t.mask)===Date?new Date(e):e??"")})),e.watch((()=>v.masked),(e=>{Z.value=e??""}));const te=Y,le=e.ref();u({$inner:le});const oe=function(t,l,o=0,{getter:a=(e=>e),setter:n=(e=>e)}={}){let i;return"string"==typeof o&&(o=parseInt(o)),e.computed({get:()=>a(null==t?void 0:t.value),set:e=>{i&&clearTimeout(i),i=setTimeout((()=>{l("update:modelValue",n(e))}),o)}})}(k,c,(null==$?void 0:$.value)??0),{focused:ae}=function(t,l){const{focused:o}=a.useFocus(t);return e.watch(o,(o=>{l(o?"focus":"blur",e.unref(t))})),{focused:o}}(te,c),ne=e.computed((()=>ae.value&&!v.disabled&&!v.readonly));e.watch(ne,(e=>{e&&b.value.selectOnFocus&&te.value&&te.value.select()}));const ie=a.useElementVisibility(te);e.watch(ie,(e=>{e&&v.autofocus&&!v.disabled&&!v.readonly&&(ae.value=!0)}));const ue=e.ref(!1),re=e.computed((()=>v.type===C.PASSWORD)),de=()=>{ue.value=!ue.value},se=e.computed((()=>v.type===C.TIME||v.type===C.DATETIME_LOCAL||v.type===C.DATE||v.type===C.WEEK||v.type===C.MONTH)),ve=e.computed((()=>v.type===C.NUMBER)),ce=()=>{if(Se.value){if(null==D?void 0:D.value)return void(Q.value=Q.value+Number((null==I?void 0:I.value)??1));te.value.stepUp(),oe.value=Number(e.unref(te).value)}},pe=()=>{if(Se.value){if(null==D?void 0:D.value)return void(Q.value=Q.value-Number((null==I?void 0:I.value)??1));te.value.stepDown(),oe.value=Number(e.unref(te).value)}},fe=e.computed((()=>v.type===C.SEARCH)),me=()=>{oe.value=""},{hasIconBefore:he,hasIconAfter:be}=function(t,l){const o=e.computed((()=>"string"==typeof(null==t?void 0:t.value)?{name:null==t?void 0:t.value}:null==t?void 0:t.value)),a=e.computed((()=>(null==l?void 0:l.value)===d.before?o.value:void 0)),n=e.computed((()=>(null==l?void 0:l.value)===d.after?o.value:void 0)),i=e.computed((()=>(null==l?void 0:l.value)===r.left?o.value:void 0)),u=e.computed((()=>(null==l?void 0:l.value)===r.right?o.value:void 0)),s=e.computed((()=>(null==l?void 0:l.value)===r.top?o.value:void 0)),v=e.computed((()=>(null==l?void 0:l.value)===r.bottom?o.value:void 0));return{hasIcon:o,hasIconLeft:i,hasIconRight:u,hasIconTop:s,hasIconBottom:v,hasIconBefore:a,hasIconAfter:n}}(g,S),ye=e.computed((()=>{if(void 0!==be.value)return be.value;switch(v.type){case C.COLOR:return{name:_};case C.DATE:case C.DATETIME_LOCAL:case C.WEEK:case C.MONTH:return{name:O};case C.TIME:return{name:V}}})),{formatted:ge}=function(t,l){const o=e.computed((()=>(e.unref(t)??"").length)),a=e.computed((()=>void 0!==(null==l?void 0:l.lowerLimit)&&o.value<(null==l?void 0:l.lowerLimit)?o.value-l.lowerLimit:void 0!==(null==l?void 0:l.upperLimit)&&o.value<(null==l?void 0:l.upperLimit)?l.upperLimit-o.value:0)),n=e.computed((()=>{if(!1===(null==l?void 0:l.mode))return"";if("limit"===(null==l?void 0:l.mode)&&(null==l?void 0:l.upperLimit))return`${o.value} / ${l.lowerLimit?`${l.lowerLimit}-`:""}${l.upperLimit}`;if("countdown"===(null==l?void 0:l.mode)){if(0===a.value)return;return a}return o.value}));return{length:o,gap:a,formatted:n}}(oe,{mode:L.value,upperLimit:Number(null==T?void 0:T.value),lowerLimit:Number(null==A?void 0:A.value)}),Se=e.computed((()=>!v.disabled&&!v.readonly)),we=e.computed((()=>Se.value?v.tabindex:-1)),ke=e.computed((()=>!n(k))),Le=e.computed((()=>!0===B.value||!0!==E.value&&void 0)),{modifiers:Ee}=e.toRefs(v),Be=f("vv-input-text",Ee,e.computed((()=>({valid:E.value,invalid:B.value,loading:x.value,disabled:v.disabled,readonly:v.readonly,"icon-before":void 0!==he.value,"icon-after":void 0!==ye.value,floating:v.floating&&!n(v.label),dirty:ke.value,focus:ne.value,"auto-width":v.autoWidth})))),xe=e.computed((()=>{const e=re.value&&ue.value?C.TEXT:!se.value||ke.value||ae.value?(null==D?void 0:D.value)?C.TEXT:v.type:C.TEXT,t={type:e,name:v.name,tabindex:we.value,disabled:v.disabled,readonly:v.readonly,required:v.required,autocomplete:v.autocomplete,"aria-invalid":Le.value,"aria-describedby":Ae.value?R.value:void 0,"aria-errormessage":Pe.value?R.value:void 0};return e!==C.DATE&&e!==C.MONTH&&e!==C.WEEK&&e!==C.TIME&&e!==C.DATETIME_LOCAL&&e!==C.NUMBER||(t.step=v.step,t.max=void 0!==v.max?String(v.max):void 0,t.min=void 0!==v.min?String(v.min):void 0),e!==C.TEXT&&e!==C.SEARCH&&e!==C.URL&&e!==C.TEL&&e!==C.EMAIL&&e!==C.PASSWORD&&e!==C.NUMBER||(t.placeholder=H.value),e!==C.TEXT&&e!==C.SEARCH&&e!==C.URL&&e!==C.TEL&&e!==C.EMAIL&&e!==C.PASSWORD||(t.minlength=v.minlength,t.maxlength=v.maxlength,t.pattern=v.pattern),e===C.EMAIL&&(t.multiple=v.multiple),t})),$e=e.computed((()=>({valid:v.valid,invalid:v.invalid,modelValue:v.modelValue,togglePassword:de,stepUp:ce,stepDown:pe,clear:me}))),{HintSlot:Te,hasHintLabelOrSlot:Ae,hasInvalidLabelOrSlot:Pe,hintSlotScope:Ce}=function(t,l){const o=e.computed((()=>e.isRef(t)?t.value:t)),a=e.computed((()=>i(o.value.invalidLabel))),n=e.computed((()=>i(o.value.validLabel))),u=e.computed((()=>o.value.loadingLabel)),r=e.computed((()=>o.value.hintLabel)),d=e.computed((()=>Boolean(o.value.loading&&(l.loading||u.value)))),s=e.computed((()=>!d.value&&Boolean(o.value.invalid&&(l.invalid||a.value)))),v=e.computed((()=>!d.value&&!s.value&&Boolean(o.value.valid&&(l.valid||n.value)))),c=e.computed((()=>!d.value&&!s.value&&!v.value&&Boolean(l.hint||r.value))),p=e.computed((()=>s.value||v.value||d.value||c.value)),f=e.computed((()=>({modelValue:o.value.modelValue,valid:o.value.valid,invalid:o.value.invalid,loading:o.value.loading}))),m=e.defineComponent({name:"HintSlot",props:{tag:{type:String,default:"small"}},setup:()=>({isVisible:p,invalidLabel:a,validLabel:n,loadingLabel:u,hintLabel:r,hasInvalidLabelOrSlot:s,hasValidLabelOrSlot:v,hasLoadingLabelOrSlot:d,hasHintLabelOrSlot:c}),render(){var t,l,o,a,n,i,u,r;if(this.isVisible){let d;return this.hasInvalidLabelOrSlot&&(d="alert"),this.hasValidLabelOrSlot&&(d="status"),this.hasLoadingLabelOrSlot?e.h(this.tag,{role:d},(null==(l=(t=this.$slots).loading)?void 0:l.call(t))??this.loadingLabel):this.hasInvalidLabelOrSlot?e.h(this.tag,{role:d},(null==(a=(o=this.$slots).invalid)?void 0:a.call(o))??this.$slots.invalid??this.invalidLabel):this.hasValidLabelOrSlot?e.h(this.tag,{role:d},(null==(i=(n=this.$slots).valid)?void 0:i.call(n))??this.validLabel):e.h(this.tag,{role:d},(null==(r=(u=this.$slots).hint)?void 0:r.call(u))??this.$slots.hint??this.hintLabel)}return null}});return{hasInvalidLabelOrSlot:s,hasHintLabelOrSlot:c,hasValidLabelOrSlot:v,hasLoadingLabelOrSlot:d,hintSlotScope:f,HintSlot:m}}(b,h),De=U(C.PASSWORD,v),Ie=U(C.NUMBER,v),Oe=U(C.SEARCH,v),Ve=()=>{Se.value&&(ae.value=!0)},_e=e.computed((()=>{if(v.autoWidth)return{width:void 0!==oe.value?`${String(oe.value).length+1}ch`:void 0}})),Ne=e=>{switch(e.code){case"ArrowUp":ve.value&&(ce(),e.preventDefault());break;case"ArrowDown":ve.value&&(pe(),e.preventDefault())}c("keydown",e)};return(t,l)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(Be))},[e.unref(w)?(e.openBlock(),e.createElementBlock("label",{key:0,for:e.unref(M),class:"vv-input-text__label"},e.toDisplayString(e.unref(w)),9,j)):e.createCommentVNode("v-if",!0),e.createElementVNode("div",F,[t.$slots.before?(e.openBlock(),e.createElementBlock("div",W,[e.renderSlot(t.$slots,"before",e.normalizeProps(e.guardReactiveProps(e.unref($e))))])):e.createCommentVNode("v-if",!0),e.createElementVNode("div",{ref_key:"innerEl",ref:le,class:"vv-input-text__inner",onClick:e.withModifiers(Ve,["stop"])},[e.unref(he)?(e.openBlock(),e.createBlock(m,e.mergeProps({key:0},e.unref(he),{class:"vv-input-text__icon"}),null,16)):e.createCommentVNode("v-if",!0),e.createElementVNode("input",e.mergeProps({id:e.unref(M),ref_key:"inputEl",ref:te},e.unref(xe),{style:e.unref(_e),onKeyup:l[0]||(l[0]=e=>c("keyup",e)),onKeydown:Ne,onKeypress:l[1]||(l[1]=e=>c("keypress",e))}),null,16,z),(t.unit||t.$slots.unit)&&e.unref(ke)?(e.openBlock(),e.createElementBlock("div",q,[e.renderSlot(t.$slots,"default",e.normalizeProps(e.guardReactiveProps(e.unref($e))),(()=>[e.createTextVNode(e.toDisplayString(t.unit),1)]))])):e.createCommentVNode("v-if",!0)],512),e.unref(ye)?(e.openBlock(),e.createBlock(m,e.mergeProps({key:1},e.unref(ye),{class:"vv-input-text__icon vv-input-text__icon-after"}),null,16)):e.unref(re)&&!t.hideActions&&e.unref(Se)?(e.openBlock(),e.createBlock(e.unref(De),{key:2,onTogglePassword:de})):e.unref(ve)&&!t.hideActions&&e.unref(Se)?(e.openBlock(),e.createBlock(e.unref(Ie),{key:3,onStepUp:ce,onStepDown:pe})):e.unref(fe)&&!t.hideActions&&e.unref(Se)?(e.openBlock(),e.createBlock(e.unref(Oe),{key:4,onClear:me})):e.createCommentVNode("v-if",!0),t.$slots.after?(e.openBlock(),e.createElementBlock("div",K,[e.renderSlot(t.$slots,"after",e.normalizeProps(e.guardReactiveProps(e.unref($e))))])):e.createCommentVNode("v-if",!0),e.unref(L)?(e.openBlock(),e.createElementBlock("span",X,[e.renderSlot(t.$slots,"count",e.normalizeProps(e.guardReactiveProps(e.unref($e))),(()=>[e.createTextVNode(e.toDisplayString(e.unref(ge)),1)]))])):e.createCommentVNode("v-if",!0)]),e.createVNode(e.unref(Te),{id:e.unref(R),class:"vv-input-text__hint"},e.createSlots({_:2},[t.$slots.hint?{name:"hint",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"hint",e.normalizeProps(e.guardReactiveProps(e.unref(Ce))))])),key:"0"}:void 0,t.$slots.loading?{name:"loading",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"loading",e.normalizeProps(e.guardReactiveProps(e.unref(Ce))))])),key:"1"}:void 0,t.$slots.valid?{name:"valid",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"valid",e.normalizeProps(e.guardReactiveProps(e.unref(Ce))))])),key:"2"}:void 0,t.$slots.invalid?{name:"invalid",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"invalid",e.normalizeProps(e.guardReactiveProps(e.unref(Ce))))])),key:"3"}:void 0]),1032,["id"])],2))}})}));
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("vue"),require("vue-imask"),require("@iconify/vue"),require("uid"),require("@vueuse/core")):"function"==typeof define&&define.amd?define(["vue","vue-imask","@iconify/vue","uid","@vueuse/core"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).VvInputText=t(e.vue,e.vueImask,e.vue$1,e.uid,e.core)}(this,(function(e,t,l,o,a){"use strict";function n(t){return null==(l=e.unref(t))||""===l||Array.isArray(l)&&0===l.length||!(l instanceof Date)&&"object"==typeof l&&0===Object.keys(l).length;var l}function i(e){return Array.isArray(e)?e.filter((e=>{return"string"==typeof(t=e)||t instanceof String;var t})).join(" "):e}const u="eye-on",r="eye-off",d="calendar",s="time",v="color",c="close",p={prefix:"normal"};var f=(e=>(e.left="left",e.right="right",e.top="top",e.bottom="bottom",e))(f||{}),m=(e=>(e.before="before",e.after="after",e))(m||{}),h=(e=>(e.button="button",e.submit="submit",e.reset="reset",e))(h||{}),b=(e=>(e.nuxtLink="nuxt-link",e.routerLink="router-link",e.a="a",e.button="button",e))(b||{});const y=Symbol.for("volver");function g(){return e.inject(y)}function S(t,l,o){return e.computed((()=>{const a={[t]:!0},n="string"==typeof(null==l?void 0:l.value)?l.value.split(" "):null==l?void 0:l.value;return n&&Array.isArray(n)&&n.forEach((e=>{e&&(a[`${t}--${e}`]=!0)})),o&&Object.keys(o.value).forEach((l=>{a[`${t}--${l}`]=e.unref(o.value[l])})),a}))}const w=e.defineComponent({name:"VvIcon",props:e.mergeDefaults({name:{},color:{},width:{},height:{},provider:{},prefix:{},src:{},horizontalFlip:{type:Boolean},verticalFlip:{type:Boolean},flip:{},mode:{},inline:{type:Boolean},rotate:{},onLoad:{type:Function},svg:{},modifiers:{}},p),setup(t){const o=t,a=e.computed((()=>"string"==typeof o.rotate?parseFloat(o.rotate):o.rotate)),n=e.ref(!0),i=g(),{modifiers:u}=e.toRefs(o),r=S("vv-icon",u),d=e.computed((()=>o.provider||(null==i?void 0:i.iconsProvider))),s=e.computed((()=>{const e=o.name??"",t=`@${d.value}:${o.prefix}:${e}`;if(l.iconExists(t))return t;const a=null==i?void 0:i.iconsCollections.find((t=>{const o=`@${d.value}:${t.prefix}:${e}`;return l.iconExists(o)}));return a?`@${d.value}:${a.prefix}:${e}`:e}));function v(e){const t=function(e){let t;if("undefined"==typeof window){const{JSDOM:e}=require("jsdom");t=(new e).window}return(t?new t.DOMParser:new window.DOMParser).parseFromString(e,"text/html").querySelector("svg")}(e),a=(null==t?void 0:t.innerHTML.trim())||"";t&&a&&l.addIcon(`@${d.value}:${o.prefix}:${o.name}`,{body:a,height:t.viewBox.baseVal.height,width:t.viewBox.baseVal.width})}return i&&o.src&&!l.iconExists(`@${d.value}:${o.prefix}:${o.name}`)&&(n.value=!1,i.fetchIcon(o.src).then((e=>{e&&(v(e),n.value=!0)})).catch((e=>{throw new Error(`Error during fetch icon: ${null==e?void 0:e.message}`)}))),o.svg&&v(o.svg),(t,o)=>e.unref(n)?(e.openBlock(),e.createBlock(e.unref(l.Icon),e.mergeProps({key:0,class:e.unref(r)},{inline:t.inline,width:t.width,height:t.height,horizontalFlip:t.horizontalFlip,verticalFlip:t.verticalFlip,flip:t.flip,rotate:e.unref(a),color:t.color,onLoad:t.onLoad,icon:e.unref(s)}),null,16,["class"])):e.createCommentVNode("v-if",!0)}}),k={valid:{type:Boolean,default:!1},validLabel:{type:[String,Array],default:void 0}},L={invalid:{type:Boolean,default:!1},invalidLabel:{type:[String,Array],default:void 0}},E={loading:{type:Boolean,default:!1},loadingLabel:{type:String,default:"Loading..."}},B={disabled:{type:Boolean,default:!1}},x=(Boolean,Boolean,Boolean,{label:{type:[String,Number],default:void 0}}),$={readonly:{type:Boolean,default:!1}},T={modifiers:{type:[String,Array],default:void 0}},A={hintLabel:{type:String,default:""}},I={count:{type:[Boolean,String],default:!1,validator:e=>[!0,!1,"limit","countdown"].includes(e)}},P={debounce:{type:[Number,String],default:void 0}},O={icon:{type:[String,Object],default:void 0},iconPosition:{type:String,default:m.before,validation:e=>Object.values(m).includes(e)}},C={tabindex:{type:[String,Number],default:0}},D={floating:{type:Boolean,default:!1}},V={id:[String,Number]};f.bottom,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean;const _={...{...V,name:{type:String,required:!0}},...{autofocus:{type:Boolean,default:!1}},...{autocomplete:{type:String,default:"off"}},...C,...B,...$,...k,...L,...A,...E,...T,...I,...P,...O,...D,...x,minlength:{type:[String,Number],default:void 0},maxlength:{type:[String,Number],default:void 0},placeholder:{type:String,default:void 0},required:{type:Boolean,default:!1}};h.button,b.button;const N={TEXT:"text",PASSWORD:"password",NUMBER:"number",EMAIL:"email",TEL:"tel",URL:"url",COLOR:"color",SEARCH:"search",DATE:"date",TIME:"time",DATETIME_LOCAL:"datetime-local",MONTH:"month",WEEK:"week"},M={..._,modelValue:[String,Number],type:{type:String,default:N.TEXT,validator:e=>Object.values(N).includes(e)},min:[Number,Date,String],max:[Number,Date,String],step:{type:[String,Number],default:1},pattern:String,multiple:Boolean,iconShowPassword:{type:[String,Object],default:u},iconHidePassword:{type:[String,Object],default:r},iconClear:{type:[String,Object],default:c},labelStepUp:{type:String,default:"Increase value"},labelStepDown:{type:String,default:"Decrease value"},labelShowPassword:{type:String,default:"Show password"},labelHidePassword:{type:String,default:"Hide password"},labelClear:{type:String,default:"Clear"},iMask:{type:Object,default:void 0},masked:{type:String,default:void 0},autoWidth:{type:Boolean,default:!1},hideActions:{type:Boolean,default:!1},unit:{type:String},selectOnFocus:{type:Boolean,default:!1}};function R(t,l){const o=e.computed((()=>"string"==typeof(null==t?void 0:t.value)?{name:null==t?void 0:t.value}:null==t?void 0:t.value)),a=e.computed((()=>(null==l?void 0:l.value)===m.before?o.value:void 0)),n=e.computed((()=>(null==l?void 0:l.value)===m.after?o.value:void 0)),i=e.computed((()=>(null==l?void 0:l.value)===f.left?o.value:void 0)),u=e.computed((()=>(null==l?void 0:l.value)===f.right?o.value:void 0)),r=e.computed((()=>(null==l?void 0:l.value)===f.top?o.value:void 0)),d=e.computed((()=>(null==l?void 0:l.value)===f.bottom?o.value:void 0));return{hasIcon:o,hasIconLeft:i,hasIconRight:u,hasIconTop:r,hasIconBottom:d,hasIconBefore:a,hasIconAfter:n}}const H=e.defineComponent({components:{VvIcon:w},props:{disabled:{type:Boolean,default:!1},labelShow:{type:String,default:"Show password"},labelHide:{type:String,default:"Hide password"},iconShow:{type:[String,Object],default:u},iconHide:{type:[String,Object],default:r}},emits:["toggle-password"],setup(t,{emit:l}){const o=e.ref(!1),a=e.computed((()=>o.value?t.iconHide:t.iconShow)),{hasIcon:n}=R(a);return{active:o,activeIcon:a,hasIcon:n,onClick:function(e){null==e||e.stopPropagation(),t.disabled||(o.value=!o.value,l("toggle-password",o.value))}}},render(){const t=this.hasIcon?e.h(w,{...this.hasIcon,class:"vv-input-text__icon"}):void 0;return e.h("button",{disabled:this.disabled,class:"vv-input-text__action",ariaLabel:this.active?this.labelHide:this.labelShow,type:"button",onClick:this.onClick},t)}}),U=e.defineComponent({components:{VvIcon:w},props:{disabled:{type:Boolean,default:!1},label:{type:String},mode:{type:String,validator:e=>["up","down"].includes(e),default:"up"}},emits:["step-up","step-down"],setup(t,{emit:l}){const o=e.computed((()=>"up"===t.mode));return{isUp:o,onClick:e=>{null==e||e.stopPropagation(),t.disabled||l(o.value?"step-up":"step-down")}}},render(){return e.h("button",{class:["vv-input-text__action vv-input-text__action-chevron",this.isUp&&"vv-input-text__action-chevron-up"],disabled:this.disabled,ariaLabel:this.label,type:"button",onClick:this.onClick})}}),j=e.defineComponent({components:{VvIcon:w},props:{disabled:{type:Boolean,default:!1},label:{type:String,default:"Clear"},icon:{type:[String,Object],default:"close"}},emits:["clear"],setup(t,{emit:l}){const{hasIcon:o}=R(e.computed((()=>t.icon)));return{hasIcon:o,onClick:function(e){null==e||e.stopPropagation(),t.disabled||l("clear")}}},render(){const t=this.hasIcon?e.h(w,{...this.hasIcon,class:"vv-input-text__icon"}):void 0;return e.h("button",{disabled:this.disabled,class:"vv-input-text__action",ariaLabel:this.label,type:"button",onClick:this.onClick},t)}});function F(t,l){return{name:"VvInputTextActions",components:{VvIcon:w,VvInputPasswordAction:H,VvInputStepAction:U,VvInputClearAction:j},setup:()=>({isDisabled:e.computed((()=>l.disabled||l.readonly)),labelStepUp:l.labelStepUp,labelStepDown:l.labelStepDown,labelShowPassword:l.labelShowPassword,labelHidePassword:l.labelHidePassword,labelClear:l.labelClear,iconShowPassword:l.iconShowPassword,iconHidePassword:l.iconHidePassword}),render(){let o=null;switch(t){case N.SEARCH:{const{onClear:t}=this.$attrs;o=[e.h(j,{disabled:this.isDisabled,label:this.labelShowPassword,onClear:t})];break}case N.PASSWORD:{const{onTogglePassword:t}=this.$attrs;o=[e.h(H,{disabled:this.isDisabled,onTogglePassword:t,labelShow:this.labelShowPassword,labelHide:this.labelHidePassword,iconShow:this.iconShowPassword,iconHide:this.iconHidePassword})];break}case N.NUMBER:{const{onStepUp:t,onStepDown:a}=this.$attrs;o=[e.h(U,{mode:"up",disabled:this.isDisabled||void 0!==l.max&&l.modelValue===l.max,label:this.labelStepUp,onStepUp:t,onStepDown:a}),e.h(U,{mode:"down",disabled:this.isDisabled||void 0!==l.min&&l.modelValue===l.min,label:this.labelStepDown,onStepUp:t,onStepDown:a})];break}}return Array.isArray(o)?e.h("div",{class:"vv-input-text__actions-group"},o):o}}}const W=["for"],z={class:"vv-input-text__wrapper"},q={key:0,class:"vv-input-text__input-before"},K=["id"],X={key:1,class:"vv-input-text__unit"},J={key:5,class:"vv-input-text__input-after"},Y={key:6,class:"vv-input-text__limit"};return e.defineComponent({name:"VvInputText",props:M,emits:["update:modelValue","update:masked","accept","accept:typed","accept:masked","accept:unmasked","complete","complete:typed","complete:masked","complete:unmasked","focus","blur","keyup","keydown","keypress"],setup(l,{expose:u,emit:r}){const c=l,p=r,f=e.useSlots(),m=function(t,l,o){const a=g(),n=e.computed((()=>{var e;if(a&&(null==(e=a.defaults.value)?void 0:e[t]))return a.defaults.value[t]}));return e.computed((()=>{if(void 0===n.value)return o;const e=n.value,t=l,a=o;return Object.keys(t).reduce(((l,o)=>{const n=a[o];if(l[o]=n,o in e){if(Array.isArray(t[o])){const a=t[o];a.length&&a[0]===n&&(l[o]=e[o])}if("function"==typeof t[o]&&(0,t[o])()===n&&(l[o]=e[o]),"object"==typeof t[o]){let a=t[o].default;"function"==typeof a&&(a=a()),"object"==typeof a?JSON.stringify(a)===JSON.stringify(n)&&(l[o]=e[o]):a===n&&(l[o]=e[o])}}return l}),{})}))}("VvInputText",M,c),{id:h,icon:b,iconPosition:y,label:k,modelValue:L,count:E,valid:B,invalid:x,loading:$,debounce:T,maxlength:A,minlength:I,type:P,iMask:O,step:C}=e.toRefs(c),D=(t=>e.computed((()=>String((null==t?void 0:t.value)||o.uid()))))(h),V=e.computed((()=>`${D.value}-hint`)),_=e.computed((()=>c.floating&&n(c.placeholder)?" ":c.placeholder)),H=e.ref(!1),{el:U,mask:j,typed:G,masked:Q,unmasked:Z}=t.useIMask(e.computed((()=>(null==O?void 0:O.value)??{mask:/./})),{emit:p,onAccept:()=>{if(H.value){if(p("update:masked",Q.value),P.value===N.NUMBER){if(""===Q.value){if(null===le.value||void 0===le.value)return;return void(le.value=void 0)}return"number"!=typeof G.value?void(le.value=Number(G.value)):void(le.value=G.value)}if(P.value===N.DATE){if(U.value instanceof HTMLInputElement&&"date"===U.value.type)return void(le.value=U.value.value);let e=G.value;if(null===e||""===e){if(!le.value)return;return void(le.value="")}return e instanceof Date||(e=new Date(e)),void(le.value=`${e.getFullYear()}-${("0"+(e.getMonth()+1)).slice(-2)}-${("0"+e.getDate()).slice(-2)}`)}if(P.value===N.DATETIME_LOCAL){if(U.value instanceof HTMLInputElement&&"datetime-local"===U.value.type)return void(le.value=U.value.value);let e=G.value;if(null===e||""===e){if(!le.value)return;return void(le.value="")}return G.value instanceof Date||(e=new Date(e)),void(le.value=`${e.getFullYear()}-${("0"+(e.getMonth()+1)).slice(-2)}-${("0"+e.getDate()).slice(-2)}T${("0"+e.getHours()).slice(-2)}:${("0"+e.getMinutes()).slice(-2)}`)}(le.value||Z.value)&&(le.value=Z.value)}}});e.onMounted((()=>{j.value&&(H.value=!0,G.value=le.value??"")})),e.watch((()=>c.modelValue),(e=>{var t;j.value&&(G.value=e&&(null==(t=null==O?void 0:O.value)?void 0:t.mask)===Date?new Date(e):e??"")})),e.watch((()=>c.masked),(e=>{Q.value=e??""}));const ee=U,te=e.ref();u({$inner:te});const le=function(t,l,o=0,{getter:a=(e=>e),setter:n=(e=>e)}={}){let i;return"string"==typeof o&&(o=parseInt(o)),e.computed({get:()=>a(null==t?void 0:t.value),set:e=>{i&&clearTimeout(i),i=setTimeout((()=>{l("update:modelValue",n(e))}),o)}})}(L,p,(null==T?void 0:T.value)??0),{focused:oe}=function(t,l){const{focused:o}=a.useFocus(t);return e.watch(o,(o=>{l(o?"focus":"blur",e.unref(t))})),{focused:o}}(ee,p),ae=e.computed((()=>oe.value&&!c.disabled&&!c.readonly));e.watch(ae,(e=>{e&&m.value.selectOnFocus&&ee.value&&ee.value.select()}));const ne=a.useElementVisibility(ee);e.watch(ne,(e=>{e&&c.autofocus&&!c.disabled&&!c.readonly&&(oe.value=!0)}));const ie=e.ref(!1),ue=e.computed((()=>c.type===N.PASSWORD)),re=()=>{ie.value=!ie.value},de=e.computed((()=>c.type===N.TIME||c.type===N.DATETIME_LOCAL||c.type===N.DATE||c.type===N.WEEK||c.type===N.MONTH)),se=e.computed((()=>c.type===N.NUMBER)),ve=()=>{if(ge.value){if(null==O?void 0:O.value)return void(G.value=G.value+Number((null==C?void 0:C.value)??1));ee.value.stepUp(),le.value=Number(e.unref(ee).value)}},ce=()=>{if(ge.value){if(null==O?void 0:O.value)return void(G.value=G.value-Number((null==C?void 0:C.value)??1));ee.value.stepDown(),le.value=Number(e.unref(ee).value)}},pe=e.computed((()=>c.type===N.SEARCH)),fe=()=>{le.value=""},{hasIconBefore:me,hasIconAfter:he}=R(b,y),be=e.computed((()=>{if(void 0!==he.value)return he.value;switch(c.type){case N.COLOR:return{name:v};case N.DATE:case N.DATETIME_LOCAL:case N.WEEK:case N.MONTH:return{name:d};case N.TIME:return{name:s}}})),{formatted:ye}=function(t,l){const o=e.computed((()=>(e.unref(t)??"").length)),a=e.computed((()=>void 0!==(null==l?void 0:l.lowerLimit)&&o.value<(null==l?void 0:l.lowerLimit)?o.value-l.lowerLimit:void 0!==(null==l?void 0:l.upperLimit)&&o.value<(null==l?void 0:l.upperLimit)?l.upperLimit-o.value:0)),n=e.computed((()=>{if(!1===(null==l?void 0:l.mode))return"";if("limit"===(null==l?void 0:l.mode)&&(null==l?void 0:l.upperLimit))return`${o.value} / ${l.lowerLimit?`${l.lowerLimit}-`:""}${l.upperLimit}`;if("countdown"===(null==l?void 0:l.mode)){if(0===a.value)return;return a}return o.value}));return{length:o,gap:a,formatted:n}}(le,{mode:E.value,upperLimit:Number(null==A?void 0:A.value),lowerLimit:Number(null==I?void 0:I.value)}),ge=e.computed((()=>!c.disabled&&!c.readonly)),Se=e.computed((()=>ge.value?c.tabindex:-1)),we=e.computed((()=>!n(L))),ke=e.computed((()=>!0===x.value||!0!==B.value&&void 0)),{modifiers:Le}=e.toRefs(c),Ee=S("vv-input-text",Le,e.computed((()=>({valid:B.value,invalid:x.value,loading:$.value,disabled:c.disabled,readonly:c.readonly,"icon-before":!!me.value,"icon-after":!!be.value,floating:c.floating&&!n(c.label),dirty:we.value,focus:ae.value,"auto-width":c.autoWidth})))),Be=e.computed((()=>{const e=ue.value&&ie.value?N.TEXT:!de.value||we.value||oe.value?(null==O?void 0:O.value)?N.TEXT:c.type:N.TEXT,t={type:e,name:c.name,tabindex:Se.value,disabled:c.disabled,readonly:c.readonly,required:c.required,autocomplete:c.autocomplete,"aria-invalid":ke.value,"aria-describedby":Te.value?V.value:void 0,"aria-errormessage":Ae.value?V.value:void 0};return e!==N.DATE&&e!==N.MONTH&&e!==N.WEEK&&e!==N.TIME&&e!==N.DATETIME_LOCAL&&e!==N.NUMBER||(t.step=c.step,t.max=void 0!==c.max?String(c.max):void 0,t.min=void 0!==c.min?String(c.min):void 0),e!==N.TEXT&&e!==N.SEARCH&&e!==N.URL&&e!==N.TEL&&e!==N.EMAIL&&e!==N.PASSWORD&&e!==N.NUMBER||(t.placeholder=_.value),e!==N.TEXT&&e!==N.SEARCH&&e!==N.URL&&e!==N.TEL&&e!==N.EMAIL&&e!==N.PASSWORD||(t.minlength=c.minlength,t.maxlength=c.maxlength,t.pattern=c.pattern),e===N.EMAIL&&(t.multiple=c.multiple),t})),xe=e.computed((()=>({valid:c.valid,invalid:c.invalid,modelValue:c.modelValue,togglePassword:re,stepUp:ve,stepDown:ce,clear:fe}))),{HintSlot:$e,hasHintLabelOrSlot:Te,hasInvalidLabelOrSlot:Ae,hintSlotScope:Ie}=function(t,l){const o=e.computed((()=>e.isRef(t)?t.value:t)),a=e.computed((()=>i(o.value.invalidLabel))),n=e.computed((()=>i(o.value.validLabel))),u=e.computed((()=>o.value.loadingLabel)),r=e.computed((()=>o.value.hintLabel)),d=e.computed((()=>Boolean(o.value.loading&&(l.loading||u.value)))),s=e.computed((()=>!d.value&&Boolean(o.value.invalid&&(l.invalid||a.value)))),v=e.computed((()=>!d.value&&!s.value&&Boolean(o.value.valid&&(l.valid||n.value)))),c=e.computed((()=>!d.value&&!s.value&&!v.value&&Boolean(l.hint||r.value))),p=e.computed((()=>s.value||v.value||d.value||c.value)),f=e.computed((()=>({modelValue:o.value.modelValue,valid:o.value.valid,invalid:o.value.invalid,loading:o.value.loading}))),m=e.defineComponent({name:"HintSlot",props:{tag:{type:String,default:"small"}},setup:()=>({isVisible:p,invalidLabel:a,validLabel:n,loadingLabel:u,hintLabel:r,hasInvalidLabelOrSlot:s,hasValidLabelOrSlot:v,hasLoadingLabelOrSlot:d,hasHintLabelOrSlot:c}),render(){var t,l,o,a,n,i,u,r;if(this.isVisible){let d;return this.hasInvalidLabelOrSlot&&(d="alert"),this.hasValidLabelOrSlot&&(d="status"),this.hasLoadingLabelOrSlot?e.h(this.tag,{role:d},(null==(l=(t=this.$slots).loading)?void 0:l.call(t))??this.loadingLabel):this.hasInvalidLabelOrSlot?e.h(this.tag,{role:d},(null==(a=(o=this.$slots).invalid)?void 0:a.call(o))??this.$slots.invalid??this.invalidLabel):this.hasValidLabelOrSlot?e.h(this.tag,{role:d},(null==(i=(n=this.$slots).valid)?void 0:i.call(n))??this.validLabel):e.h(this.tag,{role:d},(null==(r=(u=this.$slots).hint)?void 0:r.call(u))??this.$slots.hint??this.hintLabel)}return null}});return{hasInvalidLabelOrSlot:s,hasHintLabelOrSlot:c,hasValidLabelOrSlot:v,hasLoadingLabelOrSlot:d,hintSlotScope:f,HintSlot:m}}(m,f),Pe=F(N.PASSWORD,c),Oe=F(N.NUMBER,c),Ce=F(N.SEARCH,c),De=()=>{ge.value&&(oe.value=!0)},Ve=e.computed((()=>{if(c.autoWidth)return{width:void 0!==le.value?`${String(le.value).length+1}ch`:void 0}})),_e=e=>{switch(e.code){case"ArrowUp":se.value&&(ve(),e.preventDefault());break;case"ArrowDown":se.value&&(ce(),e.preventDefault())}p("keydown",e)};return(t,l)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(Ee))},[e.unref(k)?(e.openBlock(),e.createElementBlock("label",{key:0,for:e.unref(D),class:"vv-input-text__label"},e.toDisplayString(e.unref(k)),9,W)):e.createCommentVNode("v-if",!0),e.createElementVNode("div",z,[t.$slots.before?(e.openBlock(),e.createElementBlock("div",q,[e.renderSlot(t.$slots,"before",e.normalizeProps(e.guardReactiveProps(e.unref(xe))))])):e.createCommentVNode("v-if",!0),e.createElementVNode("div",{ref_key:"innerEl",ref:te,class:"vv-input-text__inner",onClick:e.withModifiers(De,["stop"])},[e.unref(me)?(e.openBlock(),e.createBlock(w,e.mergeProps({key:0},e.unref(me),{class:"vv-input-text__icon"}),null,16)):e.createCommentVNode("v-if",!0),e.createElementVNode("input",e.mergeProps({id:e.unref(D),ref_key:"inputEl",ref:ee},e.unref(Be),{style:e.unref(Ve),onKeyup:l[0]||(l[0]=e=>p("keyup",e)),onKeydown:_e,onKeypress:l[1]||(l[1]=e=>p("keypress",e))}),null,16,K),(t.unit||t.$slots.unit)&&e.unref(we)?(e.openBlock(),e.createElementBlock("div",X,[e.renderSlot(t.$slots,"default",e.normalizeProps(e.guardReactiveProps(e.unref(xe))),(()=>[e.createTextVNode(e.toDisplayString(t.unit),1)]))])):e.createCommentVNode("v-if",!0)],512),e.unref(be)?(e.openBlock(),e.createBlock(w,e.mergeProps({key:1},e.unref(be),{class:"vv-input-text__icon vv-input-text__icon-after"}),null,16)):e.unref(ue)&&!t.hideActions&&e.unref(ge)?(e.openBlock(),e.createBlock(e.unref(Pe),{key:2,onTogglePassword:re})):e.unref(se)&&!t.hideActions&&e.unref(ge)?(e.openBlock(),e.createBlock(e.unref(Oe),{key:3,onStepUp:ve,onStepDown:ce})):e.unref(pe)&&!t.hideActions&&e.unref(ge)?(e.openBlock(),e.createBlock(e.unref(Ce),{key:4,onClear:fe})):e.createCommentVNode("v-if",!0),t.$slots.after?(e.openBlock(),e.createElementBlock("div",J,[e.renderSlot(t.$slots,"after",e.normalizeProps(e.guardReactiveProps(e.unref(xe))))])):e.createCommentVNode("v-if",!0),e.unref(E)?(e.openBlock(),e.createElementBlock("span",Y,[e.renderSlot(t.$slots,"count",e.normalizeProps(e.guardReactiveProps(e.unref(xe))),(()=>[e.createTextVNode(e.toDisplayString(e.unref(ye)),1)]))])):e.createCommentVNode("v-if",!0)]),e.createVNode(e.unref($e),{id:e.unref(V),class:"vv-input-text__hint"},e.createSlots({_:2},[t.$slots.hint?{name:"hint",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"hint",e.normalizeProps(e.guardReactiveProps(e.unref(Ie))))])),key:"0"}:void 0,t.$slots.loading?{name:"loading",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"loading",e.normalizeProps(e.guardReactiveProps(e.unref(Ie))))])),key:"1"}:void 0,t.$slots.valid?{name:"valid",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"valid",e.normalizeProps(e.guardReactiveProps(e.unref(Ie))))])),key:"2"}:void 0,t.$slots.invalid?{name:"invalid",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"invalid",e.normalizeProps(e.guardReactiveProps(e.unref(Ie))))])),key:"3"}:void 0]),1032,["id"])],2))}})}));
@@ -14,15 +14,15 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
14
14
  pattern: StringConstructor;
15
15
  multiple: BooleanConstructor;
16
16
  iconShowPassword: {
17
- type: StringConstructor;
17
+ type: globalThis.PropType<string | import("../VvIcon").VvIconProps>;
18
18
  default: "eye-on";
19
19
  };
20
20
  iconHidePassword: {
21
- type: StringConstructor;
21
+ type: globalThis.PropType<string | import("../VvIcon").VvIconProps>;
22
22
  default: "eye-off";
23
23
  };
24
24
  iconClear: {
25
- type: StringConstructor;
25
+ type: globalThis.PropType<string | import("../VvIcon").VvIconProps>;
26
26
  default: "close";
27
27
  };
28
28
  labelStepUp: {
@@ -171,7 +171,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
171
171
  $inner: globalThis.Ref<any>;
172
172
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
173
173
  [x: string]: (...args: any[]) => void;
174
- }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<globalThis.ExtractPropTypes<{
174
+ }, string, import("vue").PublicProps, Readonly<globalThis.ExtractPropTypes<{
175
175
  modelValue: (StringConstructor | NumberConstructor)[];
176
176
  type: {
177
177
  type: globalThis.PropType<import("../VvInputText").InputType>;
@@ -187,15 +187,15 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
187
187
  pattern: StringConstructor;
188
188
  multiple: BooleanConstructor;
189
189
  iconShowPassword: {
190
- type: StringConstructor;
190
+ type: globalThis.PropType<string | import("../VvIcon").VvIconProps>;
191
191
  default: "eye-on";
192
192
  };
193
193
  iconHidePassword: {
194
- type: StringConstructor;
194
+ type: globalThis.PropType<string | import("../VvIcon").VvIconProps>;
195
195
  default: "eye-off";
196
196
  };
197
197
  iconClear: {
198
- type: StringConstructor;
198
+ type: globalThis.PropType<string | import("../VvIcon").VvIconProps>;
199
199
  default: "close";
200
200
  };
201
201
  labelStepUp: {
@@ -363,9 +363,9 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
363
363
  autocomplete: string;
364
364
  autofocus: boolean;
365
365
  step: string | number;
366
- iconShowPassword: string;
367
- iconHidePassword: string;
368
- iconClear: string;
366
+ iconShowPassword: string | import("../VvIcon").VvIconProps;
367
+ iconHidePassword: string | import("../VvIcon").VvIconProps;
368
+ iconClear: string | import("../VvIcon").VvIconProps;
369
369
  labelStepUp: string;
370
370
  labelStepDown: string;
371
371
  labelShowPassword: string;
@@ -1,5 +1,6 @@
1
1
  import type { ExtractPropTypes, PropType } from 'vue';
2
2
  import type { FactoryOpts } from 'imask';
3
+ import { type VvIconProps } from '../VvIcon';
3
4
  export declare const INPUT_TYPES: {
4
5
  readonly TEXT: "text";
5
6
  readonly PASSWORD: "password";
@@ -16,14 +17,6 @@ export declare const INPUT_TYPES: {
16
17
  readonly WEEK: "week";
17
18
  };
18
19
  export type InputType = ValueOf<typeof INPUT_TYPES>;
19
- export declare const TYPES_ICON: {
20
- readonly PASSWORD_SHOW: "eye-on";
21
- readonly PASSWORD_HIDE: "eye-off";
22
- readonly DATE: "calendar";
23
- readonly TIME: "time";
24
- readonly COLOR: "color";
25
- readonly SEARCH: "close";
26
- };
27
20
  export declare const VvInputTextEvents: string[];
28
21
  export declare const VvInputTextProps: {
29
22
  /**
@@ -78,7 +71,7 @@ export declare const VvInputTextProps: {
78
71
  * @see VVIcon
79
72
  */
80
73
  iconShowPassword: {
81
- type: StringConstructor;
74
+ type: PropType<string | VvIconProps>;
82
75
  default: "eye-on";
83
76
  };
84
77
  /**
@@ -86,7 +79,7 @@ export declare const VvInputTextProps: {
86
79
  * @see VVIcon
87
80
  */
88
81
  iconHidePassword: {
89
- type: StringConstructor;
82
+ type: PropType<string | VvIconProps>;
90
83
  default: "eye-off";
91
84
  };
92
85
  /**
@@ -94,7 +87,7 @@ export declare const VvInputTextProps: {
94
87
  * @see VVIcon
95
88
  */
96
89
  iconClear: {
97
- type: StringConstructor;
90
+ type: PropType<string | VvIconProps>;
98
91
  default: "close";
99
92
  };
100
93
  /**
@@ -199,7 +192,7 @@ export declare const VvInputTextProps: {
199
192
  default: boolean;
200
193
  };
201
194
  icon: {
202
- type: PropType<string | import("../VvIcon").VvIconProps>;
195
+ type: PropType<string | VvIconProps>;
203
196
  default: undefined;
204
197
  };
205
198
  iconPosition: {
@@ -210,9 +203,7 @@ export declare const VvInputTextProps: {
210
203
  debounce: {
211
204
  type: (StringConstructor | NumberConstructor)[];
212
205
  default: undefined;
213
- }; /**
214
- * Hide type number, password and search actions
215
- */
206
+ };
216
207
  count: {
217
208
  type: (BooleanConstructor | StringConstructor)[];
218
209
  default: boolean;
@@ -9,7 +9,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
9
9
  };
10
10
  }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
11
11
  [x: string]: (...args: any[]) => void;
12
- }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<globalThis.ExtractPropTypes<{
12
+ }, string, import("vue").PublicProps, Readonly<globalThis.ExtractPropTypes<{
13
13
  items: {
14
14
  type: globalThis.PropType<import("../..").NavItem[]>;
15
15
  default: () => never[];
@@ -1,4 +1,4 @@
1
- declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<globalThis.ExtractPropTypes<{}>>, {}, {}>, {
1
+ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<globalThis.ExtractPropTypes<{}>>, {}, {}>, {
2
2
  default?(_: {}): any;
3
3
  }>;
4
4
  export default _default;
@@ -1,2 +1,2 @@
1
- declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<globalThis.ExtractPropTypes<{}>>, {}, {}>;
1
+ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<globalThis.ExtractPropTypes<{}>>, {}, {}>;
2
2
  export default _default;
@@ -14,7 +14,7 @@ declare const _default: import("vue").DefineComponent<{
14
14
  type: globalThis.PropType<string | string[]>;
15
15
  default: undefined;
16
16
  };
17
- }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<globalThis.ExtractPropTypes<{
17
+ }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<globalThis.ExtractPropTypes<{
18
18
  value: {
19
19
  type: (StringConstructor | NumberConstructor)[];
20
20
  default: undefined;
@@ -62,7 +62,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
62
62
  id: (StringConstructor | NumberConstructor)[];
63
63
  }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
64
64
  [x: string]: (...args: any[]) => void;
65
- }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<globalThis.ExtractPropTypes<{
65
+ }, string, import("vue").PublicProps, Readonly<globalThis.ExtractPropTypes<{
66
66
  value: {
67
67
  type: (BooleanConstructor | StringConstructor | NumberConstructor)[];
68
68
  default: undefined;
@@ -74,7 +74,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
74
74
  };
75
75
  }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
76
76
  [x: string]: (...args: any[]) => void;
77
- }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<globalThis.ExtractPropTypes<{
77
+ }, string, import("vue").PublicProps, Readonly<globalThis.ExtractPropTypes<{
78
78
  modelValue: {
79
79
  type: (SymbolConstructor | ArrayConstructor | BooleanConstructor | StringConstructor | NumberConstructor)[];
80
80
  default: undefined;
@@ -104,7 +104,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
104
104
  id: (StringConstructor | NumberConstructor)[];
105
105
  }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
106
106
  [x: string]: (...args: any[]) => void;
107
- }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<globalThis.ExtractPropTypes<{
107
+ }, string, import("vue").PublicProps, Readonly<globalThis.ExtractPropTypes<{
108
108
  multiple: BooleanConstructor;
109
109
  required: BooleanConstructor;
110
110
  size: (StringConstructor | NumberConstructor)[];
@@ -17,7 +17,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
17
17
  };
18
18
  }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
19
19
  [x: string]: (...args: any[]) => void;
20
- }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<globalThis.ExtractPropTypes<{
20
+ }, string, import("vue").PublicProps, Readonly<globalThis.ExtractPropTypes<{
21
21
  navModifiers: {
22
22
  type: globalThis.PropType<string | string[]>;
23
23
  };
@@ -118,7 +118,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
118
118
  id: (StringConstructor | NumberConstructor)[];
119
119
  }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
120
120
  [x: string]: (...args: any[]) => void;
121
- }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<globalThis.ExtractPropTypes<{
121
+ }, string, import("vue").PublicProps, Readonly<globalThis.ExtractPropTypes<{
122
122
  modelValue: StringConstructor;
123
123
  cols: {
124
124
  type: (StringConstructor | NumberConstructor)[];
@@ -10,7 +10,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
10
10
  type: globalThis.PropType<string | string[]>;
11
11
  default: undefined;
12
12
  };
13
- }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<globalThis.ExtractPropTypes<{
13
+ }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<globalThis.ExtractPropTypes<{
14
14
  position: {
15
15
  type: globalThis.PropType<"left" | "right" | "top" | "bottom">;
16
16
  default: import("../../constants").Side;
@@ -46,7 +46,7 @@ export declare function HintSlotFactory(propsOrRef: HintSlotProps | Ref<HintSlot
46
46
  hasValidLabelOrSlot: globalThis.ComputedRef<boolean>;
47
47
  hasLoadingLabelOrSlot: globalThis.ComputedRef<boolean>;
48
48
  hasHintLabelOrSlot: globalThis.ComputedRef<boolean>;
49
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
49
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ExtractPropTypes<{
50
50
  tag: {
51
51
  type: StringConstructor;
52
52
  default: string;