@volverjs/ui-vue 0.0.9-beta.1 → 0.0.9-beta.10

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 (134) hide show
  1. package/README.md +3 -3
  2. package/auto-imports.d.ts +2 -0
  3. package/dist/components/VvAccordion/VvAccordion.es.js +7 -0
  4. package/dist/components/VvAccordionGroup/VvAccordionGroup.es.js +7 -0
  5. package/dist/components/VvAction/VvAction.es.js +9 -1
  6. package/dist/components/VvAction/VvAction.umd.js +1 -1
  7. package/dist/components/VvAction/VvAction.vue.d.ts +9 -0
  8. package/dist/components/VvAction/index.d.ts +4 -0
  9. package/dist/components/VvAlert/VvAlert.es.js +14 -6
  10. package/dist/components/VvAlert/VvAlert.umd.js +1 -1
  11. package/dist/components/VvAlert/VvAlert.vue.d.ts +6 -6
  12. package/dist/components/VvAlert/index.d.ts +3 -3
  13. package/dist/components/VvAlertGroup/VvAlertGroup.es.js +14 -6
  14. package/dist/components/VvAlertGroup/VvAlertGroup.umd.js +1 -1
  15. package/dist/components/VvAvatar/VvAvatar.es.js +7 -0
  16. package/dist/components/VvAvatarGroup/VvAvatarGroup.es.js +7 -0
  17. package/dist/components/VvBadge/VvBadge.es.js +7 -0
  18. package/dist/components/VvBreadcrumb/VvBreadcrumb.es.js +7 -0
  19. package/dist/components/VvButton/VvButton.es.js +11 -2
  20. package/dist/components/VvButton/VvButton.umd.js +1 -1
  21. package/dist/components/VvButton/VvButton.vue.d.ts +9 -0
  22. package/dist/components/VvButton/index.d.ts +4 -0
  23. package/dist/components/VvButtonGroup/VvButtonGroup.es.js +7 -0
  24. package/dist/components/VvCard/VvCard.es.js +7 -0
  25. package/dist/components/VvCheckbox/VvCheckbox.es.js +91 -14
  26. package/dist/components/VvCheckbox/VvCheckbox.umd.js +1 -1
  27. package/dist/components/VvCheckbox/VvCheckbox.vue.d.ts +4 -4
  28. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.es.js +97 -15
  29. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.umd.js +1 -1
  30. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.vue.d.ts +4 -4
  31. package/dist/components/VvCombobox/VvCombobox.es.js +127 -84
  32. package/dist/components/VvCombobox/VvCombobox.umd.js +1 -1
  33. package/dist/components/VvCombobox/VvCombobox.vue.d.ts +35 -14
  34. package/dist/components/VvCombobox/index.d.ts +24 -7
  35. package/dist/components/VvDialog/VvDialog.es.js +34 -26
  36. package/dist/components/VvDialog/VvDialog.umd.js +1 -1
  37. package/dist/components/VvDropdown/VvDropdown.es.js +21 -10
  38. package/dist/components/VvDropdown/VvDropdown.umd.js +1 -1
  39. package/dist/components/VvDropdown/VvDropdown.vue.d.ts +4 -11
  40. package/dist/components/VvDropdown/VvDropdownAction.vue.d.ts +9 -0
  41. package/dist/components/VvDropdown/index.d.ts +1 -7
  42. package/dist/components/VvDropdownAction/VvDropdownAction.es.js +9 -1
  43. package/dist/components/VvDropdownAction/VvDropdownAction.umd.js +1 -1
  44. package/dist/components/VvDropdownOptgroup/VvDropdownOptgroup.es.js +7 -0
  45. package/dist/components/VvDropdownOption/VvDropdownOption.es.js +7 -0
  46. package/dist/components/VvInputText/VvInputText.es.js +87 -14
  47. package/dist/components/VvInputText/VvInputText.umd.js +1 -1
  48. package/dist/components/VvInputText/VvInputText.vue.d.ts +4 -4
  49. package/dist/components/VvNav/VvNav.es.js +10 -2
  50. package/dist/components/VvNav/VvNav.umd.js +1 -1
  51. package/dist/components/VvNav/index.d.ts +1 -1
  52. package/dist/components/VvProgress/VvProgress.es.js +7 -0
  53. package/dist/components/VvRadio/VvRadio.es.js +91 -14
  54. package/dist/components/VvRadio/VvRadio.umd.js +1 -1
  55. package/dist/components/VvRadio/VvRadio.vue.d.ts +4 -4
  56. package/dist/components/VvRadioGroup/VvRadioGroup.es.js +97 -15
  57. package/dist/components/VvRadioGroup/VvRadioGroup.umd.js +1 -1
  58. package/dist/components/VvRadioGroup/VvRadioGroup.vue.d.ts +4 -4
  59. package/dist/components/VvSelect/VvSelect.es.js +87 -14
  60. package/dist/components/VvSelect/VvSelect.umd.js +1 -1
  61. package/dist/components/VvSelect/VvSelect.vue.d.ts +4 -4
  62. package/dist/components/VvTab/VvTab.es.js +10 -2
  63. package/dist/components/VvTab/VvTab.umd.js +1 -1
  64. package/dist/components/VvTextarea/VvTextarea.es.js +87 -14
  65. package/dist/components/VvTextarea/VvTextarea.umd.js +1 -1
  66. package/dist/components/VvTextarea/VvTextarea.vue.d.ts +4 -4
  67. package/dist/components/VvTooltip/VvTooltip.es.js +7 -0
  68. package/dist/components/common/HintSlot.d.ts +4 -3
  69. package/dist/components/index.d.ts +5 -0
  70. package/dist/components/index.es.js +905 -437
  71. package/dist/components/index.umd.js +1 -1
  72. package/dist/composables/alert/useAlert.d.ts +27 -0
  73. package/dist/composables/index.d.ts +1 -0
  74. package/dist/composables/index.es.js +81 -0
  75. package/dist/composables/index.umd.js +1 -0
  76. package/dist/constants.d.ts +10 -0
  77. package/dist/directives/index.es.js +7 -0
  78. package/dist/directives/v-tooltip.es.js +7 -0
  79. package/dist/icons.es.js +3 -3
  80. package/dist/icons.umd.js +1 -1
  81. package/dist/props/index.d.ts +7 -0
  82. package/dist/resolvers/unplugin.es.js +3 -0
  83. package/dist/resolvers/unplugin.umd.js +1 -1
  84. package/dist/stories/AccordionGroup/AccordionGroupSlots.stories.d.ts +43 -258
  85. package/dist/stories/Alert/Alert.settings.d.ts +3 -7
  86. package/dist/stories/AlertGroup/AlertGroupSlots.stories.d.ts +2 -2
  87. package/dist/stories/AlertGroup/AlertGroupWithComposable.stories.d.ts +6 -0
  88. package/dist/stories/Button/Button.settings.d.ts +3 -13
  89. package/dist/stories/Combobox/Combobox.settings.d.ts +117 -19
  90. package/dist/stories/Nav/Nav.settings.d.ts +3 -21
  91. package/package.json +54 -46
  92. package/src/assets/icons/detailed.json +1 -1
  93. package/src/assets/icons/normal.json +1 -1
  94. package/src/assets/icons/simple.json +1 -1
  95. package/src/components/VvAction/VvAction.vue +2 -1
  96. package/src/components/VvAlert/VvAlert.vue +5 -1
  97. package/src/components/VvAlert/index.ts +3 -3
  98. package/src/components/VvAlertGroup/VvAlertGroup.vue +2 -0
  99. package/src/components/VvButton/VvButton.vue +1 -0
  100. package/src/components/VvCheckbox/VvCheckbox.vue +8 -1
  101. package/src/components/VvCheckboxGroup/VvCheckboxGroup.vue +8 -1
  102. package/src/components/VvCombobox/VvCombobox.vue +9 -4
  103. package/src/components/VvCombobox/index.ts +24 -0
  104. package/src/components/VvDialog/VvDialog.vue +16 -17
  105. package/src/components/VvDropdown/VvDropdown.vue +7 -3
  106. package/src/components/VvDropdown/index.ts +2 -8
  107. package/src/components/VvInputText/VvInputText.vue +8 -1
  108. package/src/components/VvNav/VvNav.vue +1 -1
  109. package/src/components/VvNav/index.ts +1 -1
  110. package/src/components/VvRadio/VvRadio.vue +8 -1
  111. package/src/components/VvRadioGroup/VvRadioGroup.vue +8 -1
  112. package/src/components/VvSelect/VvSelect.vue +8 -1
  113. package/src/components/VvTextarea/VvTextarea.vue +8 -1
  114. package/src/components/common/HintSlot.ts +26 -13
  115. package/src/components/index.ts +5 -0
  116. package/src/composables/alert/useAlert.ts +103 -0
  117. package/src/composables/index.ts +1 -0
  118. package/src/constants.ts +21 -0
  119. package/src/props/index.ts +7 -0
  120. package/src/resolvers/unplugin.ts +3 -0
  121. package/src/stories/Alert/Alert.settings.ts +3 -1
  122. package/src/stories/AlertGroup/AlertGroup.test.ts +13 -0
  123. package/src/stories/AlertGroup/AlertGroupSlots.stories.ts +3 -3
  124. package/src/stories/AlertGroup/AlertGroupWithComposable.stories.ts +118 -0
  125. package/src/stories/Button/Button.settings.ts +5 -3
  126. package/src/stories/Combobox/Combobox.settings.ts +119 -2
  127. package/src/stories/Nav/Nav.settings.ts +3 -1
  128. package/src/stories/Tab/Tab.stories.ts +3 -3
  129. package/src/stories/Textarea/TextareaLength.stories.ts +1 -1
  130. package/src/types/alert.d.ts +20 -0
  131. /package/dist/components/{VvNavItemTitle → VvNav}/VvNavItemTitle.vue.d.ts +0 -0
  132. /package/dist/components/{VvNavSeparator → VvNav}/VvNavSeparator.d.ts +0 -0
  133. /package/src/components/{VvNavItemTitle → VvNav}/VvNavItemTitle.vue +0 -0
  134. /package/src/components/{VvNavSeparator → VvNav}/VvNavSeparator.ts +0 -0
@@ -1,4 +1,4 @@
1
- import { unref, computed, defineComponent, h, inject, ref, toRefs, openBlock, createBlock, mergeProps, createCommentVNode, watch, useSlots, createElementBlock, normalizeClass, toDisplayString, createElementVNode, renderSlot, normalizeProps, guardReactiveProps, withDirectives, isRef, vModelText, createTextVNode, createVNode, createSlots, withCtx } from "vue";
1
+ import { unref, computed, isRef, defineComponent, h, inject, ref, toRefs, openBlock, createBlock, mergeProps, createCommentVNode, watch, useSlots, createElementBlock, normalizeClass, toDisplayString, createElementVNode, renderSlot, normalizeProps, guardReactiveProps, withDirectives, vModelText, createTextVNode, createVNode, createSlots, withCtx } from "vue";
2
2
  import { iconExists, Icon, addIcon } from "@iconify/vue";
3
3
  import { nanoid } from "nanoid";
4
4
  import { useFocus, useElementVisibility } from "@vueuse/core";
@@ -14,19 +14,27 @@ function joinLines(items) {
14
14
  }
15
15
  return items;
16
16
  }
17
- function HintSlotFactory(props, slots) {
18
- const invalidLabel = computed(() => joinLines(props.invalidLabel));
19
- const validLabel = computed(() => joinLines(props.validLabel));
20
- const loadingLabel = computed(() => props.loadingLabel);
21
- const hintLabel = computed(() => props.hintLabel);
17
+ function HintSlotFactory(propsOrRef, slots) {
18
+ const props = computed(() => {
19
+ if (isRef(propsOrRef)) {
20
+ return propsOrRef.value;
21
+ }
22
+ return propsOrRef;
23
+ });
24
+ const invalidLabel = computed(() => joinLines(props.value.invalidLabel));
25
+ const validLabel = computed(() => joinLines(props.value.validLabel));
26
+ const loadingLabel = computed(() => props.value.loadingLabel);
27
+ const hintLabel = computed(() => props.value.hintLabel);
22
28
  const hasLoadingLabelOrSlot = computed(
23
- () => Boolean(props.loading && (slots.loading || loadingLabel.value))
29
+ () => Boolean(props.value.loading && (slots.loading || loadingLabel.value))
24
30
  );
25
31
  const hasInvalidLabelOrSlot = computed(
26
- () => !hasLoadingLabelOrSlot.value && Boolean(props.invalid && (slots.invalid || invalidLabel.value))
32
+ () => !hasLoadingLabelOrSlot.value && Boolean(
33
+ props.value.invalid && (slots.invalid || invalidLabel.value)
34
+ )
27
35
  );
28
36
  const hasValidLabelOrSlot = computed(
29
- () => !hasLoadingLabelOrSlot.value && !hasInvalidLabelOrSlot.value && Boolean(props.valid && (slots.valid || validLabel.value))
37
+ () => !hasLoadingLabelOrSlot.value && !hasInvalidLabelOrSlot.value && Boolean(props.value.valid && (slots.valid || validLabel.value))
30
38
  );
31
39
  const hasHintLabelOrSlot = computed(
32
40
  () => !hasLoadingLabelOrSlot.value && !hasInvalidLabelOrSlot.value && !hasValidLabelOrSlot.value && Boolean(slots.hint || hintLabel.value)
@@ -35,10 +43,10 @@ function HintSlotFactory(props, slots) {
35
43
  () => hasInvalidLabelOrSlot.value || hasValidLabelOrSlot.value || hasLoadingLabelOrSlot.value || hasHintLabelOrSlot.value
36
44
  );
37
45
  const hintSlotScope = computed(() => ({
38
- modelValue: props.modelValue,
39
- valid: props.valid,
40
- invalid: props.invalid,
41
- loading: props.loading
46
+ modelValue: props.value.modelValue,
47
+ valid: props.value.valid,
48
+ invalid: props.value.invalid,
49
+ loading: props.value.loading
42
50
  }));
43
51
  const HintSlot = defineComponent({
44
52
  name: "HintSlot",
@@ -699,6 +707,13 @@ const InputTextareaProps = {
699
707
  type: String,
700
708
  default: ButtonType.button,
701
709
  validator: (value) => Object.values(ButtonType).includes(value)
710
+ },
711
+ /**
712
+ * Button aria-label
713
+ */
714
+ ariaLabel: {
715
+ type: String,
716
+ default: void 0
702
717
  }
703
718
  });
704
719
  const WRAP = {
@@ -743,6 +758,59 @@ const VvTextareaProps = {
743
758
  */
744
759
  resizable: Boolean
745
760
  };
761
+ function useDefaults(componentName, propsDefinition, props) {
762
+ const volver = useVolver();
763
+ const volverComponentDefaults = computed(() => {
764
+ var _a;
765
+ if (!volver || !((_a = volver.defaults.value) == null ? void 0 : _a[componentName])) {
766
+ return void 0;
767
+ }
768
+ return volver.defaults.value[componentName];
769
+ });
770
+ return computed(() => {
771
+ if (volverComponentDefaults.value === void 0) {
772
+ return props;
773
+ }
774
+ const componentDefaults = volverComponentDefaults.value;
775
+ const simplifiedPropsDefinition = propsDefinition;
776
+ const simplifiedProps = props;
777
+ return Object.keys(simplifiedPropsDefinition).reduce((acc, key) => {
778
+ const propValue = simplifiedProps[key];
779
+ acc[key] = propValue;
780
+ if (key in componentDefaults) {
781
+ if (Array.isArray(simplifiedPropsDefinition[key])) {
782
+ const typeArray = simplifiedPropsDefinition[key];
783
+ if (typeArray.length) {
784
+ const typeFunction = typeArray[0];
785
+ if (typeFunction === propValue) {
786
+ acc[key] = componentDefaults[key];
787
+ }
788
+ }
789
+ }
790
+ if (typeof simplifiedPropsDefinition[key] === "function") {
791
+ const typeFunction = simplifiedPropsDefinition[key];
792
+ if (typeFunction() === propValue) {
793
+ acc[key] = componentDefaults[key];
794
+ }
795
+ }
796
+ if (typeof simplifiedPropsDefinition[key] === "object") {
797
+ let defaultValue = simplifiedPropsDefinition[key].default;
798
+ if (typeof defaultValue === "function") {
799
+ defaultValue = defaultValue();
800
+ }
801
+ if (typeof defaultValue === "object") {
802
+ if (JSON.stringify(defaultValue) === JSON.stringify(propValue)) {
803
+ acc[key] = componentDefaults[key];
804
+ }
805
+ } else if (defaultValue === propValue) {
806
+ acc[key] = componentDefaults[key];
807
+ }
808
+ }
809
+ }
810
+ return acc;
811
+ }, {});
812
+ });
813
+ }
746
814
  const useUniqueId = (id) => computed(() => String((id == null ? void 0 : id.value) || nanoid()));
747
815
  function useDebouncedInput(modelValue, emit, ms = 0, {
748
816
  getter = (value) => value,
@@ -868,6 +936,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
868
936
  setup(__props, { emit }) {
869
937
  const props = __props;
870
938
  const slots = useSlots();
939
+ const propsDefaults = useDefaults(
940
+ "VvTextarea",
941
+ VvTextareaProps,
942
+ props
943
+ );
871
944
  const textarea = ref();
872
945
  const {
873
946
  id,
@@ -922,7 +995,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
922
995
  hasHintLabelOrSlot,
923
996
  hasInvalidLabelOrSlot,
924
997
  hintSlotScope
925
- } = HintSlotFactory(props, slots);
998
+ } = HintSlotFactory(propsDefaults, slots);
926
999
  const bemCssClasses = useModifiers(
927
1000
  "vv-textarea",
928
1001
  modifiers,
@@ -1 +1 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("vue"),require("@iconify/vue"),require("nanoid"),require("@vueuse/core")):"function"==typeof define&&define.amd?define(["vue","@iconify/vue","nanoid","@vueuse/core"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).VvTextarea=t(e.vue,e.vue$1,e.nanoid,e.core)}(this,(function(e,t,o,l){"use strict";function a(t){return null==(o=e.unref(t))||""===o||Array.isArray(o)&&0===o.length||!(o instanceof Date)&&"object"==typeof o&&0===Object.keys(o).length;var o}function n(e){return Array.isArray(e)?e.filter((e=>{return"string"==typeof(t=e)||t instanceof String;var t})).join(" "):e}const i={color:String,width:{type:[String,Number]},height:{type:[String,Number]},name:{type:String,required:!0},provider:{type:String},prefix:{type:String,default:"normal"},src:String,horizontalFlip:Boolean,verticalFlip:Boolean,flip:String,mode:String,inline:Boolean,rotate:[Number,String],onLoad:Function,svg:String,modifiers:{type:[String,Array]}};var r=(e=>(e.left="left",e.right="right",e.top="top",e.bottom="bottom",e))(r||{}),u=(e=>(e.before="before",e.after="after",e))(u||{}),d=(e=>(e.button="button",e.submit="submit",e.reset="reset",e))(d||{});const s=Symbol.for("volver");function c(t,o,l){return e.computed((()=>{const a={[t]:!0},n="string"==typeof(null==o?void 0:o.value)?o.value.split(" "):null==o?void 0:o.value;return n&&Array.isArray(n)&&n.forEach((e=>{e&&(a[`${t}--${e}`]=!0)})),l&&Object.keys(l.value).forEach((o=>{a[`${t}--${o}`]=e.unref(l.value[o])})),a}))}const v=e.defineComponent({name:"VvIcon",props:i,setup(o){const l=o,a=e.computed((()=>"string"==typeof l.rotate?parseFloat(l.rotate):l.rotate)),n=e.ref(!0),i=e.inject(s),{modifiers:r}=e.toRefs(l),u=c("vv-icon",r),d=e.computed((()=>l.provider||(null==i?void 0:i.iconsProvider))),v=e.computed((()=>{const e=l.name??"",o=`@${d.value}:${l.prefix}:${e}`;if(t.iconExists(o))return o;const a=null==i?void 0:i.iconsCollections.find((o=>{const l=`@${d.value}:${o.prefix}:${e}`;return t.iconExists(l)}));return a?`@${d.value}:${a.prefix}:${e}`:e}));function m(e){const o=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==o?void 0:o.innerHTML.trim())||"";o&&a&&t.addIcon(`@${d.value}:${l.prefix}:${l.name}`,{body:a,height:o.viewBox.baseVal.height,width:o.viewBox.baseVal.width})}return i&&l.src&&!t.iconExists(`@${d.value}:${l.prefix}:${l.name}`)&&(n.value=!1,i.fetchIcon(l.src).then((e=>{e&&(m(e),n.value=!0)})).catch((e=>{throw new Error(`Error during fetch icon: ${null==e?void 0:e.message}`)}))),l.svg&&m(l.svg),(o,l)=>e.unref(n)?(e.openBlock(),e.createBlock(e.unref(t.Icon),e.mergeProps({key:0,class:e.unref(u)},{inline:o.inline,width:o.width,height:o.height,horizontalFlip:o.horizontalFlip,verticalFlip:o.verticalFlip,flip:o.flip,rotate:e.unref(a),color:o.color,onLoad:o.onLoad,icon:e.unref(v)}),null,16,["class"])):e.createCommentVNode("",!0)}}),m={valid:Boolean,validLabel:[String,Array]},p={invalid:Boolean,invalidLabel:[String,Array]},f={loading:Boolean,loadingLabel:{type:String,default:"Loading..."}},h={disabled:Boolean},g=(Boolean,Boolean,{label:[String,Number]}),b={readonly:Boolean},S={modifiers:[String,Array]},y={hintLabel:{type:String,default:""}},B={count:{type:[Boolean,String],default:!1,validator:e=>[!0,!1,"limit","countdown"].includes(e)}},L={debounce:[Number,String]},$={icon:{type:[String,Object]},iconPosition:{type:String,default:u.before,validation:e=>Object.values(u).includes(e)}},x={tabindex:{type:[String,Number],default:0}},w={floating:Boolean},k={id:[String,Number]};r.bottom,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean;const V={...{...k,name:{type:String,required:!0}},...{autofocus:Boolean},...{autocomplete:{type:String,default:"off"}},...x,...h,...b,...m,...p,...y,...f,...S,...B,...L,...$,...w,...g,minlength:[String,Number],maxlength:[String,Number],placeholder:String,required:Boolean};d.button;const N={...V,modelValue:String,cols:{type:[String,Number],default:20},rows:{type:[String,Number],default:2},wrap:{type:String,default:"soft"},spellcheck:{type:[Boolean,String],default:"default"},resizable:Boolean};const P=["for"],O={class:"vv-textarea__wrapper"},_={key:0,class:"vv-textarea__input-before"},I={class:"vv-textarea__inner"},C=["id"],E={key:1,class:"vv-textarea__input-after"},z={key:2,class:"vv-textarea__limit"};return e.defineComponent({name:"VvTextarea",props:N,emits:["update:modelValue","focus","blur","keyup"],setup(t,{emit:i}){const d=t,s=e.useSlots(),m=e.ref(),{id:p,icon:f,iconPosition:h,label:g,modelValue:b,count:S,valid:y,invalid:B,loading:L,modifiers:$}=e.toRefs(d),x=(t=>e.computed((()=>String((null==t?void 0:t.value)||o.nanoid()))))(p),w=e.computed((()=>`${x.value}-hint`)),k=e.computed((()=>d.floating&&a(d.placeholder)?" ":d.placeholder)),V=function(t,o,l=0,{getter:a=(e=>e),setter:n=(e=>e)}={}){let i;return"string"==typeof l&&(l=parseInt(l)),e.computed({get:()=>a(null==t?void 0:t.value),set:e=>{i&&clearTimeout(i),i=setTimeout((()=>{o("update:modelValue",n(e))}),l)}})}(b,i,d.debounce),{hasIcon:N,hasIconBefore:A,hasIconAfter:q}=function(t,o){const l=e.computed((()=>Boolean((null==t?void 0:t.value)&&o.value===u.before))),a=e.computed((()=>Boolean((null==t?void 0:t.value)&&o.value===u.after))),n=e.computed((()=>Boolean((null==t?void 0:t.value)&&o.value===r.left))),i=e.computed((()=>Boolean((null==t?void 0:t.value)&&o.value===r.right))),d=e.computed((()=>Boolean((null==t?void 0:t.value)&&o.value===r.top))),s=e.computed((()=>Boolean((null==t?void 0:t.value)&&o.value===r.bottom)));return{hasIcon:e.computed((()=>"string"==typeof(null==t?void 0:t.value)?{name:null==t?void 0:t.value}:null==t?void 0:t.value)),hasIconLeft:n,hasIconRight:i,hasIconTop:d,hasIconBottom:s,hasIconBefore:l,hasIconAfter:a}}(f,h),{focused:R}=function(t,o){const{focused:a}=l.useFocus(t);return e.watch(a,(l=>{o(l?"focus":"blur",e.unref(t))})),{focused:a}}(m,i),F=l.useElementVisibility(m);e.watch(F,(e=>{e&&d.autofocus&&(R.value=!0)}));const{formatted:T}=function(t,o){const l=e.computed((()=>(e.unref(t)??"").length)),a=e.computed((()=>void 0!==(null==o?void 0:o.lowerLimit)&&l.value<(null==o?void 0:o.lowerLimit)?l.value-o.lowerLimit:void 0!==(null==o?void 0:o.upperLimit)&&l.value<(null==o?void 0:o.upperLimit)?o.upperLimit-l.value:0)),n=e.computed((()=>{if(!1===(null==o?void 0:o.mode))return"";if("limit"===(null==o?void 0:o.mode)&&(null==o?void 0:o.upperLimit))return`${l.value} / ${o.lowerLimit?`${o.lowerLimit}-`:""}${o.upperLimit}`;if("countdown"===(null==o?void 0:o.mode)){if(0===a.value)return;return a}return l.value}));return{length:l,gap:a,formatted:n}}(V,{mode:d.count,upperLimit:Number(d.maxlength),lowerLimit:Number(d.minlength)}),j=e.computed((()=>!d.disabled&&!d.readonly)),D=e.computed((()=>j.value?d.tabindex:-1)),H=e.computed((()=>!a(b))),M=e.computed((()=>!0===d.invalid||!0!==d.valid&&void 0)),{HintSlot:J,hasHintLabelOrSlot:K,hasInvalidLabelOrSlot:U,hintSlotScope:G}=function(t,o){const l=e.computed((()=>n(t.invalidLabel))),a=e.computed((()=>n(t.validLabel))),i=e.computed((()=>t.loadingLabel)),r=e.computed((()=>t.hintLabel)),u=e.computed((()=>Boolean(t.loading&&(o.loading||i.value)))),d=e.computed((()=>!u.value&&Boolean(t.invalid&&(o.invalid||l.value)))),s=e.computed((()=>!u.value&&!d.value&&Boolean(t.valid&&(o.valid||a.value)))),c=e.computed((()=>!u.value&&!d.value&&!s.value&&Boolean(o.hint||r.value))),v=e.computed((()=>d.value||s.value||u.value||c.value)),m=e.computed((()=>({modelValue:t.modelValue,valid:t.valid,invalid:t.invalid,loading:t.loading}))),p=e.defineComponent({name:"HintSlot",props:{tag:{type:String,default:"small"}},setup:()=>({isVisible:v,invalidLabel:l,validLabel:a,loadingLabel:i,hintLabel:r,hasInvalidLabelOrSlot:d,hasValidLabelOrSlot:s,hasLoadingLabelOrSlot:u,hasHintLabelOrSlot:c}),render(){var t,o,l,a,n,i,r,u;if(this.isVisible){let d;return this.hasInvalidLabelOrSlot&&(d="alert"),this.hasValidLabelOrSlot&&(d="status"),this.hasLoadingLabelOrSlot?e.h(this.tag,{role:d},(null==(o=(t=this.$slots).loading)?void 0:o.call(t))??this.loadingLabel):this.hasInvalidLabelOrSlot?e.h(this.tag,{role:d},(null==(a=(l=this.$slots).invalid)?void 0:a.call(l))??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==(u=(r=this.$slots).hint)?void 0:u.call(r))??this.$slots.hint??this.hintLabel)}return null}});return{hasInvalidLabelOrSlot:d,hasHintLabelOrSlot:c,hasValidLabelOrSlot:s,hasLoadingLabelOrSlot:u,hintSlotScope:m,HintSlot:p}}(d,s),Q=c("vv-textarea",$,e.computed((()=>({valid:y.value,invalid:B.value,loading:L.value,disabled:d.disabled,readonly:d.readonly,"icon-before":A.value,"icon-after":q.value,floating:d.floating&&!a(d.label),dirty:H.value,focused:R.value,resizable:d.resizable})))),W=e.computed((()=>({name:d.name,placeholder:k.value,tabindex:D.value,disabled:d.disabled,readonly:d.readonly,required:d.required,autocomplete:d.autocomplete,minlength:d.minlength,maxlength:d.maxlength,cols:d.cols,rows:d.rows,wrap:d.wrap,spellcheck:d.spellcheck,"aria-invalid":M.value,"aria-describedby":K.value?w.value:void 0,"aria-errormessage":U.value?w.value:void 0}))),X=e.computed((()=>({valid:d.valid,invalid:d.invalid,modelValue:d.modelValue,hintLabel:d.hintLabel,maxlength:d.maxlength,minlength:d.minlength,clear:Y}))),Y=()=>{V.value=void 0};return(t,o)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(Q))},[e.unref(g)?(e.openBlock(),e.createElementBlock("label",{key:0,for:e.unref(x),class:"vv-textarea__label"},e.toDisplayString(e.unref(g)),9,P)):e.createCommentVNode("",!0),e.createElementVNode("div",O,[t.$slots.before?(e.openBlock(),e.createElementBlock("div",_,[e.renderSlot(t.$slots,"before",e.normalizeProps(e.guardReactiveProps(e.unref(X))))])):e.createCommentVNode("",!0),e.createElementVNode("div",I,[e.unref(A)?(e.openBlock(),e.createBlock(v,e.mergeProps({key:0,class:"vv-textarea__icon"},e.unref(N)),null,16)):e.createCommentVNode("",!0),e.withDirectives(e.createElementVNode("textarea",e.mergeProps({id:e.unref(x),ref_key:"textarea",ref:m,"onUpdate:modelValue":o[0]||(o[0]=t=>e.isRef(V)?V.value=t:null)},e.unref(W),{onKeyup:o[1]||(o[1]=e=>i("keyup",e))}),null,16,C),[[e.vModelText,e.unref(V)]]),e.unref(q)?(e.openBlock(),e.createBlock(v,e.mergeProps({key:1,class:"vv-textarea__icon vv-textarea__icon-after"},e.unref(N)),null,16)):e.createCommentVNode("",!0)]),t.$slots.after?(e.openBlock(),e.createElementBlock("div",E,[e.renderSlot(t.$slots,"after",e.normalizeProps(e.guardReactiveProps(e.unref(X))))])):e.createCommentVNode("",!0),e.unref(S)?(e.openBlock(),e.createElementBlock("span",z,[e.renderSlot(t.$slots,"count",e.normalizeProps(e.guardReactiveProps(e.unref(X))),(()=>[e.createTextVNode(e.toDisplayString(e.unref(T)),1)]))])):e.createCommentVNode("",!0)]),e.createVNode(e.unref(J),{id:e.unref(w),class:"vv-textarea__hint"},e.createSlots({_:2},[t.$slots.hint?{name:"hint",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"hint",e.normalizeProps(e.guardReactiveProps(e.unref(G))))])),key:"0"}:void 0,t.$slots.loading?{name:"loading",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"loading",e.normalizeProps(e.guardReactiveProps(e.unref(G))))])),key:"1"}:void 0,t.$slots.valid?{name:"valid",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"valid",e.normalizeProps(e.guardReactiveProps(e.unref(G))))])),key:"2"}:void 0,t.$slots.invalid?{name:"invalid",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"invalid",e.normalizeProps(e.guardReactiveProps(e.unref(G))))])),key:"3"}:void 0]),1032,["id"])],2))}})}));
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("vue"),require("@iconify/vue"),require("nanoid"),require("@vueuse/core")):"function"==typeof define&&define.amd?define(["vue","@iconify/vue","nanoid","@vueuse/core"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).VvTextarea=t(e.vue,e.vue$1,e.nanoid,e.core)}(this,(function(e,t,o,l){"use strict";function a(t){return null==(o=e.unref(t))||""===o||Array.isArray(o)&&0===o.length||!(o instanceof Date)&&"object"==typeof o&&0===Object.keys(o).length;var o}function n(e){return Array.isArray(e)?e.filter((e=>{return"string"==typeof(t=e)||t instanceof String;var t})).join(" "):e}const i={color:String,width:{type:[String,Number]},height:{type:[String,Number]},name:{type:String,required:!0},provider:{type:String},prefix:{type:String,default:"normal"},src:String,horizontalFlip:Boolean,verticalFlip:Boolean,flip:String,mode:String,inline:Boolean,rotate:[Number,String],onLoad:Function,svg:String,modifiers:{type:[String,Array]}};var r=(e=>(e.left="left",e.right="right",e.top="top",e.bottom="bottom",e))(r||{}),u=(e=>(e.before="before",e.after="after",e))(u||{}),d=(e=>(e.button="button",e.submit="submit",e.reset="reset",e))(d||{});const s=Symbol.for("volver");function c(){return e.inject(s)}function v(t,o,l){return e.computed((()=>{const a={[t]:!0},n="string"==typeof(null==o?void 0:o.value)?o.value.split(" "):null==o?void 0:o.value;return n&&Array.isArray(n)&&n.forEach((e=>{e&&(a[`${t}--${e}`]=!0)})),l&&Object.keys(l.value).forEach((o=>{a[`${t}--${o}`]=e.unref(l.value[o])})),a}))}const f=e.defineComponent({name:"VvIcon",props:i,setup(o){const l=o,a=e.computed((()=>"string"==typeof l.rotate?parseFloat(l.rotate):l.rotate)),n=e.ref(!0),i=c(),{modifiers:r}=e.toRefs(l),u=v("vv-icon",r),d=e.computed((()=>l.provider||(null==i?void 0:i.iconsProvider))),s=e.computed((()=>{const e=l.name??"",o=`@${d.value}:${l.prefix}:${e}`;if(t.iconExists(o))return o;const a=null==i?void 0:i.iconsCollections.find((o=>{const l=`@${d.value}:${o.prefix}:${e}`;return t.iconExists(l)}));return a?`@${d.value}:${a.prefix}:${e}`:e}));function f(e){const o=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==o?void 0:o.innerHTML.trim())||"";o&&a&&t.addIcon(`@${d.value}:${l.prefix}:${l.name}`,{body:a,height:o.viewBox.baseVal.height,width:o.viewBox.baseVal.width})}return i&&l.src&&!t.iconExists(`@${d.value}:${l.prefix}:${l.name}`)&&(n.value=!1,i.fetchIcon(l.src).then((e=>{e&&(f(e),n.value=!0)})).catch((e=>{throw new Error(`Error during fetch icon: ${null==e?void 0:e.message}`)}))),l.svg&&f(l.svg),(o,l)=>e.unref(n)?(e.openBlock(),e.createBlock(e.unref(t.Icon),e.mergeProps({key:0,class:e.unref(u)},{inline:o.inline,width:o.width,height:o.height,horizontalFlip:o.horizontalFlip,verticalFlip:o.verticalFlip,flip:o.flip,rotate:e.unref(a),color:o.color,onLoad:o.onLoad,icon:e.unref(s)}),null,16,["class"])):e.createCommentVNode("",!0)}}),p={valid:Boolean,validLabel:[String,Array]},m={invalid:Boolean,invalidLabel:[String,Array]},h={loading:Boolean,loadingLabel:{type:String,default:"Loading..."}},g={disabled:Boolean},b=(Boolean,Boolean,{label:[String,Number]}),y={readonly:Boolean},S={modifiers:[String,Array]},B={hintLabel:{type:String,default:""}},L={count:{type:[Boolean,String],default:!1,validator:e=>[!0,!1,"limit","countdown"].includes(e)}},x={debounce:[Number,String]},$={icon:{type:[String,Object]},iconPosition:{type:String,default:u.before,validation:e=>Object.values(u).includes(e)}},w={tabindex:{type:[String,Number],default:0}},k={floating:Boolean},V={id:[String,Number]};r.bottom,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean;const N={...{...V,name:{type:String,required:!0}},...{autofocus:Boolean},...{autocomplete:{type:String,default:"off"}},...w,...g,...y,...p,...m,...B,...h,...S,...L,...x,...$,...k,...b,minlength:[String,Number],maxlength:[String,Number],placeholder:String,required:Boolean};d.button;const O={...N,modelValue:String,cols:{type:[String,Number],default:20},rows:{type:[String,Number],default:2},wrap:{type:String,default:"soft"},spellcheck:{type:[Boolean,String],default:"default"},resizable:Boolean};const P=["for"],_={class:"vv-textarea__wrapper"},I={key:0,class:"vv-textarea__input-before"},C={class:"vv-textarea__inner"},E=["id"],z={key:1,class:"vv-textarea__input-after"},A={key:2,class:"vv-textarea__limit"};return e.defineComponent({name:"VvTextarea",props:O,emits:["update:modelValue","focus","blur","keyup"],setup(t,{emit:i}){const d=t,s=e.useSlots(),p=function(t,o,l){const a=c(),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 l;const e=n.value,t=o,a=l;return Object.keys(t).reduce(((o,l)=>{const n=a[l];if(o[l]=n,l in e){if(Array.isArray(t[l])){const a=t[l];a.length&&a[0]===n&&(o[l]=e[l])}if("function"==typeof t[l]&&(0,t[l])()===n&&(o[l]=e[l]),"object"==typeof t[l]){let a=t[l].default;"function"==typeof a&&(a=a()),"object"==typeof a?JSON.stringify(a)===JSON.stringify(n)&&(o[l]=e[l]):a===n&&(o[l]=e[l])}}return o}),{})}))}("VvTextarea",O,d),m=e.ref(),{id:h,icon:g,iconPosition:b,label:y,modelValue:S,count:B,valid:L,invalid:x,loading:$,modifiers:w}=e.toRefs(d),k=(t=>e.computed((()=>String((null==t?void 0:t.value)||o.nanoid()))))(h),V=e.computed((()=>`${k.value}-hint`)),N=e.computed((()=>d.floating&&a(d.placeholder)?" ":d.placeholder)),j=function(t,o,l=0,{getter:a=(e=>e),setter:n=(e=>e)}={}){let i;return"string"==typeof l&&(l=parseInt(l)),e.computed({get:()=>a(null==t?void 0:t.value),set:e=>{i&&clearTimeout(i),i=setTimeout((()=>{o("update:modelValue",n(e))}),l)}})}(S,i,d.debounce),{hasIcon:R,hasIconBefore:q,hasIconAfter:T}=function(t,o){const l=e.computed((()=>Boolean((null==t?void 0:t.value)&&o.value===u.before))),a=e.computed((()=>Boolean((null==t?void 0:t.value)&&o.value===u.after))),n=e.computed((()=>Boolean((null==t?void 0:t.value)&&o.value===r.left))),i=e.computed((()=>Boolean((null==t?void 0:t.value)&&o.value===r.right))),d=e.computed((()=>Boolean((null==t?void 0:t.value)&&o.value===r.top))),s=e.computed((()=>Boolean((null==t?void 0:t.value)&&o.value===r.bottom)));return{hasIcon:e.computed((()=>"string"==typeof(null==t?void 0:t.value)?{name:null==t?void 0:t.value}:null==t?void 0:t.value)),hasIconLeft:n,hasIconRight:i,hasIconTop:d,hasIconBottom:s,hasIconBefore:l,hasIconAfter:a}}(g,b),{focused:F}=function(t,o){const{focused:a}=l.useFocus(t);return e.watch(a,(l=>{o(l?"focus":"blur",e.unref(t))})),{focused:a}}(m,i),D=l.useElementVisibility(m);e.watch(D,(e=>{e&&d.autofocus&&(F.value=!0)}));const{formatted:H}=function(t,o){const l=e.computed((()=>(e.unref(t)??"").length)),a=e.computed((()=>void 0!==(null==o?void 0:o.lowerLimit)&&l.value<(null==o?void 0:o.lowerLimit)?l.value-o.lowerLimit:void 0!==(null==o?void 0:o.upperLimit)&&l.value<(null==o?void 0:o.upperLimit)?o.upperLimit-l.value:0)),n=e.computed((()=>{if(!1===(null==o?void 0:o.mode))return"";if("limit"===(null==o?void 0:o.mode)&&(null==o?void 0:o.upperLimit))return`${l.value} / ${o.lowerLimit?`${o.lowerLimit}-`:""}${o.upperLimit}`;if("countdown"===(null==o?void 0:o.mode)){if(0===a.value)return;return a}return l.value}));return{length:l,gap:a,formatted:n}}(j,{mode:d.count,upperLimit:Number(d.maxlength),lowerLimit:Number(d.minlength)}),M=e.computed((()=>!d.disabled&&!d.readonly)),J=e.computed((()=>M.value?d.tabindex:-1)),K=e.computed((()=>!a(S))),U=e.computed((()=>!0===d.invalid||!0!==d.valid&&void 0)),{HintSlot:G,hasHintLabelOrSlot:Q,hasInvalidLabelOrSlot:W,hintSlotScope:X}=function(t,o){const l=e.computed((()=>e.isRef(t)?t.value:t)),a=e.computed((()=>n(l.value.invalidLabel))),i=e.computed((()=>n(l.value.validLabel))),r=e.computed((()=>l.value.loadingLabel)),u=e.computed((()=>l.value.hintLabel)),d=e.computed((()=>Boolean(l.value.loading&&(o.loading||r.value)))),s=e.computed((()=>!d.value&&Boolean(l.value.invalid&&(o.invalid||a.value)))),c=e.computed((()=>!d.value&&!s.value&&Boolean(l.value.valid&&(o.valid||i.value)))),v=e.computed((()=>!d.value&&!s.value&&!c.value&&Boolean(o.hint||u.value))),f=e.computed((()=>s.value||c.value||d.value||v.value)),p=e.computed((()=>({modelValue:l.value.modelValue,valid:l.value.valid,invalid:l.value.invalid,loading:l.value.loading}))),m=e.defineComponent({name:"HintSlot",props:{tag:{type:String,default:"small"}},setup:()=>({isVisible:f,invalidLabel:a,validLabel:i,loadingLabel:r,hintLabel:u,hasInvalidLabelOrSlot:s,hasValidLabelOrSlot:c,hasLoadingLabelOrSlot:d,hasHintLabelOrSlot:v}),render(){var t,o,l,a,n,i,r,u;if(this.isVisible){let d;return this.hasInvalidLabelOrSlot&&(d="alert"),this.hasValidLabelOrSlot&&(d="status"),this.hasLoadingLabelOrSlot?e.h(this.tag,{role:d},(null==(o=(t=this.$slots).loading)?void 0:o.call(t))??this.loadingLabel):this.hasInvalidLabelOrSlot?e.h(this.tag,{role:d},(null==(a=(l=this.$slots).invalid)?void 0:a.call(l))??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==(u=(r=this.$slots).hint)?void 0:u.call(r))??this.$slots.hint??this.hintLabel)}return null}});return{hasInvalidLabelOrSlot:s,hasHintLabelOrSlot:v,hasValidLabelOrSlot:c,hasLoadingLabelOrSlot:d,hintSlotScope:p,HintSlot:m}}(p,s),Y=v("vv-textarea",w,e.computed((()=>({valid:L.value,invalid:x.value,loading:$.value,disabled:d.disabled,readonly:d.readonly,"icon-before":q.value,"icon-after":T.value,floating:d.floating&&!a(d.label),dirty:K.value,focused:F.value,resizable:d.resizable})))),Z=e.computed((()=>({name:d.name,placeholder:N.value,tabindex:J.value,disabled:d.disabled,readonly:d.readonly,required:d.required,autocomplete:d.autocomplete,minlength:d.minlength,maxlength:d.maxlength,cols:d.cols,rows:d.rows,wrap:d.wrap,spellcheck:d.spellcheck,"aria-invalid":U.value,"aria-describedby":Q.value?V.value:void 0,"aria-errormessage":W.value?V.value:void 0}))),ee=e.computed((()=>({valid:d.valid,invalid:d.invalid,modelValue:d.modelValue,hintLabel:d.hintLabel,maxlength:d.maxlength,minlength:d.minlength,clear:te}))),te=()=>{j.value=void 0};return(t,o)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(Y))},[e.unref(y)?(e.openBlock(),e.createElementBlock("label",{key:0,for:e.unref(k),class:"vv-textarea__label"},e.toDisplayString(e.unref(y)),9,P)):e.createCommentVNode("",!0),e.createElementVNode("div",_,[t.$slots.before?(e.openBlock(),e.createElementBlock("div",I,[e.renderSlot(t.$slots,"before",e.normalizeProps(e.guardReactiveProps(e.unref(ee))))])):e.createCommentVNode("",!0),e.createElementVNode("div",C,[e.unref(q)?(e.openBlock(),e.createBlock(f,e.mergeProps({key:0,class:"vv-textarea__icon"},e.unref(R)),null,16)):e.createCommentVNode("",!0),e.withDirectives(e.createElementVNode("textarea",e.mergeProps({id:e.unref(k),ref_key:"textarea",ref:m,"onUpdate:modelValue":o[0]||(o[0]=t=>e.isRef(j)?j.value=t:null)},e.unref(Z),{onKeyup:o[1]||(o[1]=e=>i("keyup",e))}),null,16,E),[[e.vModelText,e.unref(j)]]),e.unref(T)?(e.openBlock(),e.createBlock(f,e.mergeProps({key:1,class:"vv-textarea__icon vv-textarea__icon-after"},e.unref(R)),null,16)):e.createCommentVNode("",!0)]),t.$slots.after?(e.openBlock(),e.createElementBlock("div",z,[e.renderSlot(t.$slots,"after",e.normalizeProps(e.guardReactiveProps(e.unref(ee))))])):e.createCommentVNode("",!0),e.unref(B)?(e.openBlock(),e.createElementBlock("span",A,[e.renderSlot(t.$slots,"count",e.normalizeProps(e.guardReactiveProps(e.unref(ee))),(()=>[e.createTextVNode(e.toDisplayString(e.unref(H)),1)]))])):e.createCommentVNode("",!0)]),e.createVNode(e.unref(G),{id:e.unref(V),class:"vv-textarea__hint"},e.createSlots({_:2},[t.$slots.hint?{name:"hint",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"hint",e.normalizeProps(e.guardReactiveProps(e.unref(X))))])),key:"0"}:void 0,t.$slots.loading?{name:"loading",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"loading",e.normalizeProps(e.guardReactiveProps(e.unref(X))))])),key:"1"}:void 0,t.$slots.valid?{name:"valid",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"valid",e.normalizeProps(e.guardReactiveProps(e.unref(X))))])),key:"2"}:void 0,t.$slots.invalid?{name:"invalid",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"invalid",e.normalizeProps(e.guardReactiveProps(e.unref(X))))])),key:"3"}:void 0]),1032,["id"])],2))}})}));
@@ -187,25 +187,25 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
187
187
  clear: () => void;
188
188
  }): any;
189
189
  hint?(_: {
190
- modelValue: any;
190
+ modelValue: unknown;
191
191
  valid: boolean;
192
192
  invalid: boolean;
193
193
  loading: boolean;
194
194
  }): any;
195
195
  loading?(_: {
196
- modelValue: any;
196
+ modelValue: unknown;
197
197
  valid: boolean;
198
198
  invalid: boolean;
199
199
  loading: boolean;
200
200
  }): any;
201
201
  valid?(_: {
202
- modelValue: any;
202
+ modelValue: unknown;
203
203
  valid: boolean;
204
204
  invalid: boolean;
205
205
  loading: boolean;
206
206
  }): any;
207
207
  invalid?(_: {
208
- modelValue: any;
208
+ modelValue: unknown;
209
209
  valid: boolean;
210
210
  invalid: boolean;
211
211
  loading: boolean;
@@ -216,6 +216,13 @@ const ModifiersProps = {
216
216
  type: String,
217
217
  default: ButtonType.button,
218
218
  validator: (value) => Object.values(ButtonType).includes(value)
219
+ },
220
+ /**
221
+ * Button aria-label
222
+ */
223
+ ariaLabel: {
224
+ type: String,
225
+ default: void 0
219
226
  }
220
227
  });
221
228
  const VvTooltipProps = {
@@ -1,11 +1,12 @@
1
1
  import type { ExtractPropTypes, Slots } from 'vue';
2
+ import type { Ref } from 'vue';
2
3
  export type HintSlotProps = Readonly<ExtractPropTypes<{
3
4
  hintLabel: {
4
5
  type: StringConstructor;
5
6
  default: '';
6
7
  required: true;
7
8
  };
8
- modelValue: null;
9
+ modelValue: unknown;
9
10
  valid: BooleanConstructor;
10
11
  validLabel: (StringConstructor | ArrayConstructor)[];
11
12
  invalid: BooleanConstructor;
@@ -19,13 +20,13 @@ export type HintSlotProps = Readonly<ExtractPropTypes<{
19
20
  * @param {Slots} parentSlots vue slots
20
21
  * @returns {Component} vue component
21
22
  */
22
- export declare function HintSlotFactory(props: HintSlotProps, slots: Slots): {
23
+ export declare function HintSlotFactory(propsOrRef: HintSlotProps | Ref<HintSlotProps>, slots: Slots): {
23
24
  hasInvalidLabelOrSlot: globalThis.ComputedRef<boolean>;
24
25
  hasHintLabelOrSlot: globalThis.ComputedRef<boolean>;
25
26
  hasValidLabelOrSlot: globalThis.ComputedRef<boolean>;
26
27
  hasLoadingLabelOrSlot: globalThis.ComputedRef<boolean>;
27
28
  hintSlotScope: globalThis.ComputedRef<{
28
- modelValue: any;
29
+ modelValue: unknown;
29
30
  valid: boolean;
30
31
  invalid: boolean;
31
32
  loading: boolean;
@@ -1,5 +1,7 @@
1
1
  export { default as VvAccordion } from './VvAccordion/VvAccordion.vue';
2
2
  export { default as VvAccordionGroup } from './VvAccordionGroup/VvAccordionGroup.vue';
3
+ export { default as VvAction } from './VvAction/VvAction.vue';
4
+ export { default as VvAlert } from './VvAlert/VvAlert.vue';
3
5
  export { default as VvBadge } from './VvBadge/VvBadge.vue';
4
6
  export { default as VvBreadcrumb } from './VvBreadcrumb/VvBreadcrumb.vue';
5
7
  export { default as VvButton } from './VvButton/VvButton.vue';
@@ -12,8 +14,11 @@ export { default as VvDialog } from './VvDialog/VvDialog.vue';
12
14
  export { default as VvDropdown } from './VvDropdown/VvDropdown.vue';
13
15
  export { default as VvIcon } from './VvIcon/VvIcon.vue';
14
16
  export { default as VvInputText } from './VvInputText/VvInputText.vue';
17
+ export { default as VvNav } from './VvNav/VvNav.vue';
15
18
  export { default as VvProgress } from './VvProgress/VvProgress.vue';
16
19
  export { default as VvRadio } from './VvRadio/VvRadio.vue';
17
20
  export { default as VvRadioGroup } from './VvRadioGroup/VvRadioGroup.vue';
18
21
  export { default as VvSelect } from './VvSelect/VvSelect.vue';
22
+ export { default as VvTab } from './VvTab/VvTab.vue';
19
23
  export { default as VvTextarea } from './VvTextarea/VvTextarea.vue';
24
+ export { default as VvTooltip } from './VvTooltip/VvTooltip.vue';