@volverjs/ui-vue 0.0.1-beta.6 → 0.0.1-beta.8

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 (82) hide show
  1. package/README.md +61 -2
  2. package/dist/components/VvButton/vv-button.es.js +56 -58
  3. package/dist/components/VvButton/vv-button.umd.js +1 -1
  4. package/dist/components/VvCheckGroup/vv-check-group.es.js +221 -203
  5. package/dist/components/VvCheckGroup/vv-check-group.umd.js +2 -2
  6. package/dist/components/VvInputText/VvInputText.d.ts +14 -0
  7. package/dist/components/VvInputText/VvInputText.vue.d.ts +36 -1
  8. package/dist/components/VvInputText/VvInputTextActions.d.ts +3 -0
  9. package/dist/components/VvInputText/vv-input-text.es.js +509 -380
  10. package/dist/components/VvInputText/vv-input-text.umd.js +2 -2
  11. package/dist/components/VvNativeSelect/vv-native-select.es.js +180 -161
  12. package/dist/components/VvNativeSelect/vv-native-select.umd.js +2 -2
  13. package/dist/components/VvRadioGroup/vv-radio-group.es.js +211 -193
  14. package/dist/components/VvRadioGroup/vv-radio-group.umd.js +2 -2
  15. package/dist/components/VvSelect/vv-select.es.js +189 -171
  16. package/dist/components/VvSelect/vv-select.umd.js +2 -2
  17. package/dist/components/VvTextarea/VvTextarea.d.ts +43 -22
  18. package/dist/components/VvTextarea/VvTextarea.vue.d.ts +140 -85
  19. package/dist/components/VvTextarea/vv-textarea.es.js +364 -288
  20. package/dist/components/VvTextarea/vv-textarea.umd.js +2 -2
  21. package/dist/composables/debouncedInput/useDebouncedInput.d.ts +2 -0
  22. package/dist/composables/icons/useComponentIcons.d.ts +6 -0
  23. package/dist/composables/textLimit/useTextLimit.d.ts +14 -0
  24. package/dist/composables/useModifiers.d.ts +3 -2
  25. package/dist/icons.es.js +3 -3
  26. package/dist/icons.umd.js +1 -1
  27. package/dist/props/index.d.ts +42 -0
  28. package/dist/stories/utils.d.ts +5 -0
  29. package/dist/ui-vue.es.js +417 -401
  30. package/dist/ui-vue.umd.js +2 -2
  31. package/package.json +3 -1
  32. package/src/assets/icons/detailed.json +1 -1
  33. package/src/assets/icons/normal.json +1 -1
  34. package/src/assets/icons/simple.json +1 -1
  35. package/src/components/VvButton/VvButton.vue +1 -2
  36. package/src/components/VvInputText/VvInputText.ts +19 -2
  37. package/src/components/VvInputText/VvInputText.vue +123 -149
  38. package/src/components/VvInputText/VvInputTextActions.ts +151 -0
  39. package/src/components/VvTextarea/VvTextarea.ts +25 -16
  40. package/src/components/VvTextarea/VvTextarea.vue +89 -93
  41. package/src/components/common/HintSlot.ts +31 -13
  42. package/src/composables/debouncedInput/useDebouncedInput.ts +19 -0
  43. package/src/composables/icons/useComponentIcons.ts +35 -0
  44. package/src/composables/textLimit/useTextLimit.ts +44 -0
  45. package/src/composables/useModifiers.ts +47 -1
  46. package/src/props/index.ts +39 -0
  47. package/src/stories/InputText/InputTextMaxLength.stories.mdx +21 -0
  48. package/src/stories/Textarea/Textarea.stories.mdx +33 -51
  49. package/src/stories/Textarea/TextareaAutoclear.stories.mdx +23 -0
  50. package/src/stories/Textarea/TextareaAutocomplete.stories.mdx +10 -2
  51. package/src/stories/Textarea/TextareaAutofocus.stories.mdx +5 -1
  52. package/src/stories/Textarea/TextareaDebounce.stories.mdx +23 -0
  53. package/src/stories/Textarea/TextareaDisabled.stories.mdx +5 -1
  54. package/src/stories/Textarea/TextareaError.stories.mdx +6 -3
  55. package/src/stories/Textarea/TextareaErrorLabel.stories.mdx +37 -0
  56. package/src/stories/Textarea/TextareaFloating.stories.mdx +7 -2
  57. package/src/stories/Textarea/TextareaHintLabel.stories.mdx +5 -1
  58. package/src/stories/Textarea/TextareaIcon.stories.mdx +5 -1
  59. package/src/stories/Textarea/TextareaIconPosition.stories.mdx +9 -1
  60. package/src/stories/Textarea/TextareaId.stories.mdx +19 -0
  61. package/src/stories/Textarea/TextareaLabel.stories.mdx +5 -1
  62. package/src/stories/Textarea/TextareaLimit.stories.mdx +50 -0
  63. package/src/stories/Textarea/TextareaLoading.stories.mdx +6 -3
  64. package/src/stories/Textarea/TextareaLoadingLabel.stories.mdx +23 -0
  65. package/src/stories/Textarea/TextareaMaxLength.stories.mdx +6 -2
  66. package/src/stories/Textarea/TextareaMinLength.stories.mdx +5 -1
  67. package/src/stories/Textarea/TextareaModifiers.stories.mdx +24 -0
  68. package/src/stories/Textarea/TextareaName.stories.mdx +23 -0
  69. package/src/stories/Textarea/TextareaPlaceholder.stories.mdx +5 -1
  70. package/src/stories/Textarea/TextareaReadonly.stories.mdx +5 -1
  71. package/src/stories/Textarea/TextareaRequired.stories.mdx +22 -0
  72. package/src/stories/Textarea/TextareaResizable.stories.mdx +22 -0
  73. package/src/stories/Textarea/TextareaRowsCols.stories.mdx +9 -1
  74. package/src/stories/Textarea/TextareaValid.stories.mdx +7 -4
  75. package/src/stories/Textarea/TextareaValidLabel.stories.mdx +35 -0
  76. package/src/stories/stories.scss +11 -0
  77. package/src/stories/utils.ts +12 -0
  78. package/src/stories/volver-ui-vue.stories.mdx +7 -1
  79. package/dist/components/VvInputText/useInputNumber.d.ts +0 -16
  80. package/dist/components/VvInputText/useInputPassword.d.ts +0 -16
  81. package/src/components/VvInputText/useInputNumber.ts +0 -40
  82. package/src/components/VvInputText/useInputPassword.ts +0 -38
@@ -1,2 +1,2 @@
1
- (function(r,_){typeof exports=="object"&&typeof module<"u"?module.exports=_(require("vue"),require("@vueuse/core")):typeof define=="function"&&define.amd?define(["vue","@vueuse/core"],_):(r=typeof globalThis<"u"?globalThis:r||self,r.VvRadioGroup=_(r.vue,r.core))})(this,function(r,_){"use strict";const E={valid:Boolean,validLabel:[String,Array]},b={error:Boolean,errorLabel:[String,Array]},j={hintLabel:{type:String,default:""}},I={options:{type:Array,default:()=>[]},optionLabel:{type:[String,Function],default:()=>"label"},optionValue:{type:[String,Function],default:()=>"value"}},P=["update:modelValue"],F={...E,...b,...I,...j,modelValue:null,label:{type:String,default:""},name:{type:String,default:"",required:!0},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},vertical:{type:Boolean,default:!1}};function q(e){if(Object.keys(e).some(t=>t!=="key"&&!r.isRef(e[t])))throw Error("One or more groupState props aren't ref.");console.log("PRovide - ",e),r.provide(e.key,r.computed(()=>e))}function D(e){const{options:t,optionLabel:n,optionValue:o}=r.toRefs(e);return{options:t,getOptionLabel:l=>typeof l!="object"&&l!==null?l:typeof n.value=="function"?n.value(l):l[n.value],getOptionValue:l=>typeof l!="object"&&l!==null?l:typeof o.value=="function"?o.value(l):l[o.value]}}const h={equals(e,t,n){return n?this.resolveFieldData(e,n)===this.resolveFieldData(t,n):this.deepEquals(e,t)},deepEquals(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){const n=Array.isArray(e),o=Array.isArray(t);let s,a,l;if(n&&o){if(a=e.length,a!=t.length)return!1;for(s=a;s--!==0;)if(!this.deepEquals(e[s],t[s]))return!1;return!0}if(n!=o)return!1;const i=e instanceof Date,c=t instanceof Date;if(i!=c)return!1;if(i&&c)return e.getTime()==t.getTime();const f=e instanceof RegExp,p=t instanceof RegExp;if(f!=p)return!1;if(f&&p)return e.toString()==t.toString();const d=Object.keys(e);if(a=d.length,a!==Object.keys(t).length)return!1;for(s=a;s--!==0;)if(!Object.prototype.hasOwnProperty.call(t,d[s]))return!1;for(s=a;s--!==0;)if(l=d[s],!this.deepEquals(e[l],t[l]))return!1;return!0}return e!==e&&t!==t},resolveFieldData(e,t){if(e&&Object.keys(e).length&&t){if(t.indexOf(".")===-1)return e[t];{const n=t.split(".");let o=e;for(let s=0,a=n.length;s<a;++s){if(e==null)return null;o=o[n[s]]}return o}}else return null},isFunction(e){return!!(e&&e.constructor&&e.call&&e.apply)},findIndexInList(e,t){let n=-1;if(t){for(let o=0;o<t.length;o++)if(this.equals(t[o],e)){n=o;break}}return n},contains(e,t){if(e!=null&&t&&t.length){for(const n of t)if(this.equals(e,n))return!0}return!1},isEmpty(e){return e==null||e===""||Array.isArray(e)&&e.length===0||!(e instanceof Date)&&typeof e=="object"&&Object.keys(e).length===0},isNotEmpty(e){return!this.isEmpty(e)},pickBy(e,t){return Object.fromEntries(Object.entries(e).filter(([n])=>t(n)))},removeFromList(e,t){const n=this.findIndexInList(e,t);return n>-1?t.filter((o,s)=>s!==n):t},isString(e){return typeof e=="string"||e instanceof String},propsToObject(e){return Object.keys(e).reduce((t,n)=>{var o,s,a,l,i;return this.isFunction(e[n])?t[n]=e[n]():Array.isArray(e[n])?t[n]=e[n][0]():(o=e[n])!=null&&o.type&&(Array.isArray(e[n].type)?t[n]=((s=e[n])==null?void 0:s.default)||((a=e[n])==null?void 0:a.type[0]()):t[n]=((l=e[n])==null?void 0:l.default)||((i=e[n])==null?void 0:i.type())),t},{})},filterArray(e,t,n){return e.filter(o=>t.some(s=>typeof s=="string"?o[n]==s:this.equals(o[n],s[n])))},kebabCase(e){var t,n;if(e)return(n=(t=e.match(/[A-Z]{2,}(?=[A-Z][a-z]+[0-9]*|\b)|[A-Z]?[a-z]+[0-9]*|[A-Z]|[0-9]+/g))==null?void 0:t.join("-"))==null?void 0:n.toLowerCase()}};function v(e,t){const n={[`${e}`]:!0};return{bemCssClasses:r.computed(()=>Object.keys(t).reduce((s,a)=>{const l=r.unref(t[a])||!1;if(!l)return s;if(a==="modifiers"){const i=Array.isArray(l)?l:[l];return{...s,...i.reduce((c,f)=>({...c,[`${e}--${h.kebabCase(f)}`]:!0}),{})}}else return{...s,[`${e}--${h.kebabCase(a)}`]:l}},n)||{})}}const S=Symbol("VV_RADIO_GROUP"),G={...E,...b,value:null,modelValue:{type:[Object,Number,Boolean,String]},label:{type:String,default:""},disabled:Boolean,readonly:Boolean},$=["click","update:modelValue","change","focus","blur"];function N(e){const t=r.inject(e,void 0);console.log("Inject - ",t);const n=r.computed(()=>h.isNotEmpty(t));function o(s,a,l){if(t!=null&&t.value){const i=r.unref(t.value)[s];return r.computed({get(){return i==null?void 0:i.value},set(c){i.value=c}})}else{const i=r.toRef(a,s);return r.computed({get(){return i.value},set(c){l&&l(`update:${s}`,c)}})}}return{group:t,isInGroup:n,getGroupOrLocalRef:o}}function x(e,t){const{group:n,isInGroup:o,getGroupOrLocalRef:s}=N(S),{valid:a,error:l}=r.toRefs(e),i=s("modelValue",e,t),c=s("readonly",e),f=s("disabled",e);return{group:n,isInGroup:o,valid:a,error:l,modelValue:i,readonly:c,disabled:f}}function H(e,t){const{focused:n}=_.useFocus(e);return r.watch(n,o=>{t(o?"focus":"blur",e.value)}),{focused:n}}const w={inheritAttrs:!1},T=r.defineComponent({...w,__name:"VvRadio",props:G,emits:$,setup(e,{emit:t}){const n=e,o=r.useAttrs(),{disabled:s,readonly:a,modelValue:l,valid:i,error:c}=x(n,t),f=r.ref(),p=r.computed(()=>Array.isArray(l.value)?h.contains(n.value,l.value):h.equals(n.value,l.value)),{focused:d}=H(f,t),{bemCssClasses:u}=v("vv-input-radio",{valid:i,invalid:c}),{bemCssClasses:y}=v("vv-input-radio__input",{checked:p,disabled:s,readonly:a}),A=r.computed(()=>{const{class:g}=o;return{class:g,...u.value}}),R=r.computed(()=>({"focus-visible":d.value,...y.value})),m=r.computed(()=>{const{id:g,name:O,style:B}=o,J=h.pickBy(o,K=>K.startsWith("data-"));return{for:g||O,style:B,...J}}),C=r.computed(()=>{const{id:g="",name:O=""}=o;return{type:"radio",id:g||O,name:O,value:n.value,disabled:s.value,readonly:a.value,checked:p.value,...V.value}}),V=r.computed(()=>{const{name:g}=o,O=h.pickBy(o,B=>B.startsWith("aria-"));return{"aria-label":g,"aria-checked":p.value,...O}});function k(){p.value||t("change",n.value),l.value=n.value}function W(g){s.value||(t("click",g),d.value=!0)}return(g,O)=>(r.openBlock(),r.createElementBlock("label",r.mergeProps({class:r.unref(A)},r.unref(m),{onClick:W}),[r.createElementVNode("input",r.mergeProps({ref_key:"input",ref:f,class:r.unref(R)},r.unref(C),{onInput:k}),null,16),r.renderSlot(g.$slots,"default",{value:r.unref(l)},()=>[r.createTextVNode(r.toDisplayString(g.label),1)])],16))}});function z(e){return Array.isArray(e)?e.filter(t=>h.isString(t)).reduce((t,n)=>t.length>0?t+`
2
- `+n:n,""):e}function Z(e,t){return{name:"HintSlot",setup(){const n=r.toRefs(e),{error:o,valid:s,hint:a,loading:l}=t,{hintLabel:i,modelValue:c,valid:f,validLabel:p,error:d,errorLabel:u}=n,y=h.resolveFieldData(n,"loading"),A=h.resolveFieldData(n,"loadingLabel"),R=r.computed(()=>d.value?!!(d.value&&o||(u==null?void 0:u.value)&&Array.isArray(u.value)&&u.value.length>0||(u==null?void 0:u.value)&&h.isNotEmpty(u.value)):!1),m=r.computed(()=>!!(i&&i.value||a||s||p&&p.value||R.value||(y==null?void 0:y.value)&&l||(y==null?void 0:y.value)&&(A==null?void 0:A.value))),C=r.computed(()=>Array.isArray(u==null?void 0:u.value)?z((u==null?void 0:u.value)||""):u==null?void 0:u.value),V=r.computed(()=>{const k={modelValue:c,error:d,valid:f};return d!=null&&d.value?(o==null?void 0:o(k))||(C==null?void 0:C.value)||(i==null?void 0:i.value):f!=null&&f.value?(s==null?void 0:s(k))||(p==null?void 0:p.value)||(i==null?void 0:i.value):y!=null&&y.value?(l==null?void 0:l(k))||(A==null?void 0:A.value)||(i==null?void 0:i.value):(a==null?void 0:a(k))||(i==null?void 0:i.value)||(i==null?void 0:i.value)});return{hasHint:m,hintContent:V}},render(){if(this.hasHint)return r.h("span",null,this.hintContent)}}}const U=["textContent"],M={class:"vv-input-radio-group__wrapper"};return r.defineComponent({__name:"VvRadioGroup",props:F,emits:P,setup(e,{emit:t}){const n=e,o=r.useSlots(),s=_.useVModel(n,"modelValue",t),{disabled:a,readonly:l,vertical:i,valid:c,error:f}=r.toRefs(n);q({key:S,modelValue:s,disabled:a,readonly:l});const{getOptionLabel:d,getOptionValue:u}=D(n),{bemCssClasses:y}=v("vv-input-radio-group",{horizontal:r.computed(()=>!i.value),valid:c,invalid:f});function A(m,C){return{id:`${n.name}_opt${C}`,name:n.name,label:d(m),value:u(m)}}const R=Z(n,o);return(m,C)=>(r.openBlock(),r.createElementBlock("fieldset",{class:r.normalizeClass(r.unref(y))},[m.label?(r.openBlock(),r.createElementBlock("legend",{key:0,textContent:r.toDisplayString(m.label)},null,8,U)):r.createCommentVNode("",!0),r.createElementVNode("div",M,[m.options.length>0?(r.openBlock(!0),r.createElementBlock(r.Fragment,{key:0},r.renderList(m.options,(V,k)=>(r.openBlock(),r.createBlock(T,r.mergeProps({key:k},A(V,k)),null,16))),128)):r.renderSlot(m.$slots,"default",{key:1})]),r.createVNode(r.unref(R),{class:"vv-input-radio-group__hint"})],2))}})});
1
+ (function(r,O){typeof exports=="object"&&typeof module<"u"?module.exports=O(require("vue"),require("@vueuse/core")):typeof define=="function"&&define.amd?define(["vue","@vueuse/core"],O):(r=typeof globalThis<"u"?globalThis:r||self,r.VvRadioGroup=O(r.vue,r.core))})(this,function(r,O){"use strict";const E={valid:Boolean,validLabel:[String,Array]},j={error:Boolean,errorLabel:[String,Array]},I={hintLabel:{type:String,default:""}},P={options:{type:Array,default:()=>[]},optionLabel:{type:[String,Function],default:()=>"label"},optionValue:{type:[String,Function],default:()=>"value"}},F=["update:modelValue"],q={...E,...j,...P,...I,modelValue:null,label:{type:String,default:""},name:{type:String,default:"",required:!0},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},vertical:{type:Boolean,default:!1}};function D(e){if(Object.keys(e).some(t=>t!=="key"&&!r.isRef(e[t])))throw Error("One or more groupState props aren't ref.");console.log("PRovide - ",e),r.provide(e.key,r.computed(()=>e))}function G(e){const{options:t,optionLabel:n,optionValue:o}=r.toRefs(e);return{options:t,getOptionLabel:l=>typeof l!="object"&&l!==null?l:typeof n.value=="function"?n.value(l):l[n.value],getOptionValue:l=>typeof l!="object"&&l!==null?l:typeof o.value=="function"?o.value(l):l[o.value]}}const h={equals(e,t,n){return n?this.resolveFieldData(e,n)===this.resolveFieldData(t,n):this.deepEquals(e,t)},deepEquals(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){const n=Array.isArray(e),o=Array.isArray(t);let s,i,l;if(n&&o){if(i=e.length,i!=t.length)return!1;for(s=i;s--!==0;)if(!this.deepEquals(e[s],t[s]))return!1;return!0}if(n!=o)return!1;const u=e instanceof Date,a=t instanceof Date;if(u!=a)return!1;if(u&&a)return e.getTime()==t.getTime();const p=e instanceof RegExp,y=t instanceof RegExp;if(p!=y)return!1;if(p&&y)return e.toString()==t.toString();const f=Object.keys(e);if(i=f.length,i!==Object.keys(t).length)return!1;for(s=i;s--!==0;)if(!Object.prototype.hasOwnProperty.call(t,f[s]))return!1;for(s=i;s--!==0;)if(l=f[s],!this.deepEquals(e[l],t[l]))return!1;return!0}return e!==e&&t!==t},resolveFieldData(e,t){if(e&&Object.keys(e).length&&t){if(t.indexOf(".")===-1)return e[t];{const n=t.split(".");let o=e;for(let s=0,i=n.length;s<i;++s){if(e==null)return null;o=o[n[s]]}return o}}else return null},isFunction(e){return!!(e&&e.constructor&&e.call&&e.apply)},findIndexInList(e,t){let n=-1;if(t){for(let o=0;o<t.length;o++)if(this.equals(t[o],e)){n=o;break}}return n},contains(e,t){if(e!=null&&t&&t.length){for(const n of t)if(this.equals(e,n))return!0}return!1},isEmpty(e){return e==null||e===""||Array.isArray(e)&&e.length===0||!(e instanceof Date)&&typeof e=="object"&&Object.keys(e).length===0},isNotEmpty(e){return!this.isEmpty(e)},pickBy(e,t){return Object.fromEntries(Object.entries(e).filter(([n])=>t(n)))},removeFromList(e,t){const n=this.findIndexInList(e,t);return n>-1?t.filter((o,s)=>s!==n):t},isString(e){return typeof e=="string"||e instanceof String},propsToObject(e){return Object.keys(e).reduce((t,n)=>{var o,s,i,l,u;return this.isFunction(e[n])?t[n]=e[n]():Array.isArray(e[n])?t[n]=e[n][0]():(o=e[n])!=null&&o.type&&(Array.isArray(e[n].type)?t[n]=((s=e[n])==null?void 0:s.default)||((i=e[n])==null?void 0:i.type[0]()):t[n]=((l=e[n])==null?void 0:l.default)||((u=e[n])==null?void 0:u.type())),t},{})},filterArray(e,t,n){return e.filter(o=>t.some(s=>typeof s=="string"?o[n]==s:this.equals(o[n],s[n])))},kebabCase(e){var t,n;if(e)return(n=(t=e.match(/[A-Z]{2,}(?=[A-Z][a-z]+[0-9]*|\b)|[A-Z]?[a-z]+[0-9]*|[A-Z]|[0-9]+/g))==null?void 0:t.join("-"))==null?void 0:n.toLowerCase()}};function B(e,t){const n={[`${e}`]:!0};return{bemCssClasses:r.computed(()=>Object.keys(t).reduce((s,i)=>{const l=r.unref(t[i])||!1;if(!l)return s;if(i==="modifiers"){const u=Array.isArray(l)?l:[l];return{...s,...u.reduce((a,p)=>({...a,[`${e}--${h.kebabCase(p)}`]:!0}),{})}}else return{...s,[`${e}--${h.kebabCase(i)}`]:l}},n)||{})}}const S=Symbol("VV_RADIO_GROUP"),$={...E,...j,value:null,modelValue:{type:[Object,Number,Boolean,String]},label:{type:String,default:""},disabled:Boolean,readonly:Boolean},N=["click","update:modelValue","change","focus","blur"];function w(e){const t=r.inject(e,void 0);console.log("Inject - ",t);const n=r.computed(()=>h.isNotEmpty(t));function o(s,i,l){if(t!=null&&t.value){const u=r.unref(t.value)[s];return r.computed({get(){return u==null?void 0:u.value},set(a){u.value=a}})}else{const u=r.toRef(i,s);return r.computed({get(){return u.value},set(a){l&&l(`update:${s}`,a)}})}}return{group:t,isInGroup:n,getGroupOrLocalRef:o}}function x(e,t){const{group:n,isInGroup:o,getGroupOrLocalRef:s}=w(S),{valid:i,error:l}=r.toRefs(e),u=s("modelValue",e,t),a=s("readonly",e),p=s("disabled",e);return{group:n,isInGroup:o,valid:i,error:l,modelValue:u,readonly:a,disabled:p}}function H(e,t){const{focused:n}=O.useFocus(e);return r.watch(n,o=>{t(o?"focus":"blur",e.value)}),{focused:n}}const T={inheritAttrs:!1},z=r.defineComponent({...T,__name:"VvRadio",props:$,emits:N,setup(e,{emit:t}){const n=e,o=r.useAttrs(),{disabled:s,readonly:i,modelValue:l,valid:u,error:a}=x(n,t),p=r.ref(),y=r.computed(()=>Array.isArray(l.value)?h.contains(n.value,l.value):h.equals(n.value,l.value)),{focused:f}=H(p,t),{bemCssClasses:k}=B("vv-input-radio",{valid:u,invalid:a}),{bemCssClasses:c}=B("vv-input-radio__input",{checked:y,disabled:s,readonly:i}),d=r.computed(()=>{const{class:g}=o;return{class:g,...k.value}}),A=r.computed(()=>({"focus-visible":f.value,...c.value})),m=r.computed(()=>{const{id:g,name:_,style:v}=o,J=h.pickBy(o,K=>K.startsWith("data-"));return{for:g||_,style:v,...J}}),b=r.computed(()=>{const{id:g="",name:_=""}=o;return{type:"radio",id:g||_,name:_,value:n.value,disabled:s.value,readonly:i.value,checked:y.value,...R.value}}),R=r.computed(()=>{const{name:g}=o,_=h.pickBy(o,v=>v.startsWith("aria-"));return{"aria-label":g,"aria-checked":y.value,..._}});function C(){y.value||t("change",n.value),l.value=n.value}function W(g){s.value||(t("click",g),f.value=!0)}return(g,_)=>(r.openBlock(),r.createElementBlock("label",r.mergeProps({class:r.unref(d)},r.unref(m),{onClick:W}),[r.createElementVNode("input",r.mergeProps({ref_key:"input",ref:p,class:r.unref(A)},r.unref(b),{onInput:C}),null,16),r.renderSlot(g.$slots,"default",{value:r.unref(l)},()=>[r.createTextVNode(r.toDisplayString(g.label),1)])],16))}});function V(e){return Array.isArray(e)?e.filter(t=>h.isString(t)).reduce((t,n)=>t.length>0?t+`
2
+ `+n:n,""):e}function Z(e,t){return{name:"HintSlot",props:{params:{type:Object,default:()=>{}}},setup(n){const o=r.toRefs(e),{error:s,valid:i,hint:l,loading:u}=t,{hintLabel:a,modelValue:p,valid:y,validLabel:f,error:k,errorLabel:c}=o,d=h.resolveFieldData(o,"loading"),A=h.resolveFieldData(o,"loadingLabel"),m=r.computed(()=>k.value?!!(k.value&&s||(c==null?void 0:c.value)&&Array.isArray(c.value)&&c.value.length>0||(c==null?void 0:c.value)&&h.isNotEmpty(c.value)):!1),b=r.computed(()=>!!(a&&a.value||l||i||f&&f.value||m.value||(d==null?void 0:d.value)&&u||(d==null?void 0:d.value)&&(A==null?void 0:A.value))),R=r.computed(()=>{const C=O.toReactive({hintLabel:a,modelValue:p,valid:y,validLabel:f,error:k,errorLabel:c,loading:d,loadingLabel:A,...n.params});return k!=null&&k.value?(s==null?void 0:s(C))||V(c==null?void 0:c.value)||(a==null?void 0:a.value):y!=null&&y.value?(i==null?void 0:i(C))||V(f==null?void 0:f.value)||(a==null?void 0:a.value):d!=null&&d.value?(u==null?void 0:u(C))||V(A==null?void 0:A.value)||(a==null?void 0:a.value):(l==null?void 0:l(C))||V(a==null?void 0:a.value)||(a==null?void 0:a.value)});return{hasHint:b,hintContent:R}},render(){if(this.hasHint)return r.h("pre",{style:{"white-space":"pre"}},this.hintContent)}}}const M=["textContent"],U={class:"vv-input-radio-group__wrapper"};return r.defineComponent({__name:"VvRadioGroup",props:q,emits:F,setup(e,{emit:t}){const n=e,o=r.useSlots(),s=O.useVModel(n,"modelValue",t),{disabled:i,readonly:l,vertical:u,valid:a,error:p}=r.toRefs(n);D({key:S,modelValue:s,disabled:i,readonly:l});const{getOptionLabel:f,getOptionValue:k}=G(n),{bemCssClasses:c}=B("vv-input-radio-group",{horizontal:r.computed(()=>!u.value),valid:a,invalid:p});function d(m,b){return{id:`${n.name}_opt${b}`,name:n.name,label:f(m),value:k(m)}}const A=Z(n,o);return(m,b)=>(r.openBlock(),r.createElementBlock("fieldset",{class:r.normalizeClass(r.unref(c))},[m.label?(r.openBlock(),r.createElementBlock("legend",{key:0,textContent:r.toDisplayString(m.label)},null,8,M)):r.createCommentVNode("",!0),r.createElementVNode("div",U,[m.options.length>0?(r.openBlock(!0),r.createElementBlock(r.Fragment,{key:0},r.renderList(m.options,(R,C)=>(r.openBlock(),r.createBlock(z,r.mergeProps({key:C},d(R,C)),null,16))),128)):r.renderSlot(m.$slots,"default",{key:1})]),r.createVNode(r.unref(A),{class:"vv-input-radio-group__hint"})],2))}})});
@@ -1,6 +1,6 @@
1
- import { toRefs as _, computed as A, h as W, unref as h, defineComponent as $, openBlock as C, createElementBlock as j, normalizeClass as q, createElementVNode as E, toDisplayString as D, createCommentVNode as F, Fragment as x, renderList as X, createTextVNode as R, useSlots as Y, ref as B, watch as L, withKeys as K, withDirectives as ee, vModelText as te, createVNode as P, mergeProps as re } from "vue";
2
- import { useFocus as ne, refDebounced as se, onClickOutside as le } from "@vueuse/core";
3
- import { v4 as T } from "uuid";
1
+ import { toRefs as K, computed as S, h as W, unref as v, defineComponent as q, openBlock as j, createElementBlock as C, normalizeClass as F, createElementVNode as B, toDisplayString as N, createCommentVNode as x, Fragment as R, renderList as X, createTextVNode as T, useSlots as Y, ref as E, watch as ee, withKeys as P, withDirectives as te, vModelText as re, createVNode as $, mergeProps as ne } from "vue";
2
+ import { toReactive as se, useFocus as le, refDebounced as oe, onClickOutside as ae } from "@vueuse/core";
3
+ import { v4 as H } from "uuid";
4
4
  const m = {
5
5
  equals(t, r, e) {
6
6
  return e ? this.resolveFieldData(t, e) === this.resolveFieldData(r, e) : this.deepEquals(t, r);
@@ -9,9 +9,9 @@ const m = {
9
9
  if (t === r)
10
10
  return !0;
11
11
  if (t && r && typeof t == "object" && typeof r == "object") {
12
- const e = Array.isArray(t), o = Array.isArray(r);
13
- let n, s, c;
14
- if (e && o) {
12
+ const e = Array.isArray(t), u = Array.isArray(r);
13
+ let n, s, i;
14
+ if (e && u) {
15
15
  if (s = t.length, s != r.length)
16
16
  return !1;
17
17
  for (n = s; n-- !== 0; )
@@ -19,17 +19,17 @@ const m = {
19
19
  return !1;
20
20
  return !0;
21
21
  }
22
- if (e != o)
22
+ if (e != u)
23
23
  return !1;
24
- const a = t instanceof Date, g = r instanceof Date;
25
- if (a != g)
24
+ const p = t instanceof Date, o = r instanceof Date;
25
+ if (p != o)
26
26
  return !1;
27
- if (a && g)
27
+ if (p && o)
28
28
  return t.getTime() == r.getTime();
29
- const p = t instanceof RegExp, v = r instanceof RegExp;
30
- if (p != v)
29
+ const g = t instanceof RegExp, b = r instanceof RegExp;
30
+ if (g != b)
31
31
  return !1;
32
- if (p && v)
32
+ if (g && b)
33
33
  return t.toString() == r.toString();
34
34
  const l = Object.keys(t);
35
35
  if (s = l.length, s !== Object.keys(r).length)
@@ -38,7 +38,7 @@ const m = {
38
38
  if (!Object.prototype.hasOwnProperty.call(r, l[n]))
39
39
  return !1;
40
40
  for (n = s; n-- !== 0; )
41
- if (c = l[n], !this.deepEquals(t[c], r[c]))
41
+ if (i = l[n], !this.deepEquals(t[i], r[i]))
42
42
  return !1;
43
43
  return !0;
44
44
  }
@@ -50,13 +50,13 @@ const m = {
50
50
  return t[r];
51
51
  {
52
52
  const e = r.split(".");
53
- let o = t;
53
+ let u = t;
54
54
  for (let n = 0, s = e.length; n < s; ++n) {
55
55
  if (t == null)
56
56
  return null;
57
- o = o[e[n]];
57
+ u = u[e[n]];
58
58
  }
59
- return o;
59
+ return u;
60
60
  }
61
61
  } else
62
62
  return null;
@@ -67,9 +67,9 @@ const m = {
67
67
  findIndexInList(t, r) {
68
68
  let e = -1;
69
69
  if (r) {
70
- for (let o = 0; o < r.length; o++)
71
- if (this.equals(r[o], t)) {
72
- e = o;
70
+ for (let u = 0; u < r.length; u++)
71
+ if (this.equals(r[u], t)) {
72
+ e = u;
73
73
  break;
74
74
  }
75
75
  }
@@ -96,20 +96,20 @@ const m = {
96
96
  },
97
97
  removeFromList(t, r) {
98
98
  const e = this.findIndexInList(t, r);
99
- return e > -1 ? r.filter((o, n) => n !== e) : r;
99
+ return e > -1 ? r.filter((u, n) => n !== e) : r;
100
100
  },
101
101
  isString(t) {
102
102
  return typeof t == "string" || t instanceof String;
103
103
  },
104
104
  propsToObject(t) {
105
105
  return Object.keys(t).reduce((r, e) => {
106
- var o, n, s, c, a;
107
- return this.isFunction(t[e]) ? r[e] = t[e]() : Array.isArray(t[e]) ? r[e] = t[e][0]() : (o = t[e]) != null && o.type && (Array.isArray(t[e].type) ? r[e] = ((n = t[e]) == null ? void 0 : n.default) || ((s = t[e]) == null ? void 0 : s.type[0]()) : r[e] = ((c = t[e]) == null ? void 0 : c.default) || ((a = t[e]) == null ? void 0 : a.type())), r;
106
+ var u, n, s, i, p;
107
+ return this.isFunction(t[e]) ? r[e] = t[e]() : Array.isArray(t[e]) ? r[e] = t[e][0]() : (u = t[e]) != null && u.type && (Array.isArray(t[e].type) ? r[e] = ((n = t[e]) == null ? void 0 : n.default) || ((s = t[e]) == null ? void 0 : s.type[0]()) : r[e] = ((i = t[e]) == null ? void 0 : i.default) || ((p = t[e]) == null ? void 0 : p.type())), r;
108
108
  }, {});
109
109
  },
110
110
  filterArray(t, r, e) {
111
- return t.filter((o) => r.some((n) => typeof n == "string" ? o[e] == n : this.equals(
112
- o[e],
111
+ return t.filter((u) => r.some((n) => typeof n == "string" ? u[e] == n : this.equals(
112
+ u[e],
113
113
  n[e]
114
114
  )));
115
115
  },
@@ -120,31 +120,31 @@ const m = {
120
120
  /[A-Z]{2,}(?=[A-Z][a-z]+[0-9]*|\b)|[A-Z]?[a-z]+[0-9]*|[A-Z]|[0-9]+/g
121
121
  )) == null ? void 0 : r.join("-")) == null ? void 0 : e.toLowerCase();
122
122
  }
123
- }, oe = {
123
+ }, ue = {
124
124
  valid: Boolean,
125
125
  validLabel: [String, Array]
126
- }, ae = {
126
+ }, ie = {
127
127
  error: Boolean,
128
128
  errorLabel: [String, Array]
129
- }, ue = {
129
+ }, ce = {
130
130
  loading: Boolean,
131
131
  loadingLabel: String
132
- }, H = {
132
+ }, I = {
133
133
  disabled: Boolean
134
- }, ie = {
134
+ }, de = {
135
135
  readonly: Boolean
136
- }, I = {
136
+ }, M = {
137
137
  modifiers: [String, Array]
138
- }, ce = {
138
+ }, fe = {
139
139
  hintLabel: { type: String, default: "" }
140
- }, de = {
141
- ...oe,
142
- ...ae,
143
- ...ce,
140
+ }, pe = {
144
141
  ...ue,
145
- ...H,
146
142
  ...ie,
143
+ ...fe,
144
+ ...ce,
147
145
  ...I,
146
+ ...de,
147
+ ...M,
148
148
  modelValue: [String, Array, Object],
149
149
  label: String,
150
150
  labelNoResult: { type: String, default: "No results" },
@@ -168,60 +168,78 @@ const m = {
168
168
  iconLeft: String,
169
169
  iconRight: String
170
170
  };
171
- function fe(t) {
171
+ function D(t) {
172
172
  return Array.isArray(t) ? t.filter((r) => m.isString(r)).reduce((r, e) => r.length > 0 ? r + `
173
173
  ` + e : e, "") : t;
174
174
  }
175
- function pe(t, r) {
175
+ function ye(t, r) {
176
176
  return {
177
177
  name: "HintSlot",
178
- setup() {
179
- const e = _(t), {
180
- error: o,
181
- valid: n,
182
- hint: s,
183
- loading: c
178
+ props: {
179
+ params: { type: Object, default: () => {
180
+ } }
181
+ },
182
+ setup(e) {
183
+ const u = K(t), {
184
+ error: n,
185
+ valid: s,
186
+ hint: i,
187
+ loading: p
184
188
  } = r, {
185
- hintLabel: a,
189
+ hintLabel: o,
186
190
  modelValue: g,
187
- valid: p,
188
- validLabel: v,
189
- error: l,
190
- errorLabel: i
191
- } = e, u = m.resolveFieldData(e, "loading"), y = m.resolveFieldData(
192
- e,
191
+ valid: b,
192
+ validLabel: l,
193
+ error: h,
194
+ errorLabel: a
195
+ } = u, d = m.resolveFieldData(u, "loading"), y = m.resolveFieldData(
196
+ u,
193
197
  "loadingLabel"
194
- ), b = A(() => l.value ? !!(l.value && o || (i == null ? void 0 : i.value) && Array.isArray(i.value) && i.value.length > 0 || (i == null ? void 0 : i.value) && m.isNotEmpty(i.value)) : !1), V = A(() => !!(a && a.value || s || n || v && v.value || b.value || (u == null ? void 0 : u.value) && c || (u == null ? void 0 : u.value) && (y == null ? void 0 : y.value))), O = A(() => Array.isArray(i == null ? void 0 : i.value) ? fe((i == null ? void 0 : i.value) || "") : i == null ? void 0 : i.value), N = A(() => {
195
- const k = { modelValue: g, error: l, valid: p };
196
- return l != null && l.value ? (o == null ? void 0 : o(k)) || (O == null ? void 0 : O.value) || (a == null ? void 0 : a.value) : p != null && p.value ? (n == null ? void 0 : n(k)) || (v == null ? void 0 : v.value) || (a == null ? void 0 : a.value) : u != null && u.value ? (c == null ? void 0 : c(k)) || (y == null ? void 0 : y.value) || (a == null ? void 0 : a.value) : (s == null ? void 0 : s(k)) || (a == null ? void 0 : a.value) || (a == null ? void 0 : a.value);
198
+ ), V = S(() => h.value ? !!(h.value && n || (a == null ? void 0 : a.value) && Array.isArray(a.value) && a.value.length > 0 || (a == null ? void 0 : a.value) && m.isNotEmpty(a.value)) : !1), k = S(() => !!(o && o.value || i || s || l && l.value || V.value || (d == null ? void 0 : d.value) && p || (d == null ? void 0 : d.value) && (y == null ? void 0 : y.value))), _ = S(() => {
199
+ const O = se({
200
+ hintLabel: o,
201
+ modelValue: g,
202
+ valid: b,
203
+ validLabel: l,
204
+ error: h,
205
+ errorLabel: a,
206
+ loading: d,
207
+ loadingLabel: y,
208
+ ...e.params
209
+ });
210
+ return h != null && h.value ? (n == null ? void 0 : n(O)) || D(a == null ? void 0 : a.value) || (o == null ? void 0 : o.value) : b != null && b.value ? (s == null ? void 0 : s(O)) || D(l == null ? void 0 : l.value) || (o == null ? void 0 : o.value) : d != null && d.value ? (p == null ? void 0 : p(O)) || D(y == null ? void 0 : y.value) || (o == null ? void 0 : o.value) : (i == null ? void 0 : i(O)) || D(o == null ? void 0 : o.value) || (o == null ? void 0 : o.value);
197
211
  });
198
212
  return {
199
- hasHint: V,
200
- hintContent: N
213
+ hasHint: k,
214
+ hintContent: _
201
215
  };
202
216
  },
203
217
  render() {
204
218
  if (this.hasHint)
205
- return W("span", null, this.hintContent);
219
+ return W(
220
+ "pre",
221
+ { style: { "white-space": "pre" } },
222
+ this.hintContent
223
+ );
206
224
  }
207
225
  };
208
226
  }
209
227
  function Z(t, r) {
210
228
  const e = { [`${t}`]: !0 };
211
229
  return {
212
- bemCssClasses: A(() => Object.keys(r).reduce((n, s) => {
213
- const c = h(r[s]) || !1;
214
- if (!c)
230
+ bemCssClasses: S(() => Object.keys(r).reduce((n, s) => {
231
+ const i = v(r[s]) || !1;
232
+ if (!i)
215
233
  return n;
216
234
  if (s === "modifiers") {
217
- const a = Array.isArray(c) ? c : [c];
235
+ const p = Array.isArray(i) ? i : [i];
218
236
  return {
219
237
  ...n,
220
- ...a.reduce(
221
- (g, p) => ({
222
- ...g,
238
+ ...p.reduce(
239
+ (o, g) => ({
240
+ ...o,
223
241
  [`${t}--${m.kebabCase(
224
- p
242
+ g
225
243
  )}`]: !0
226
244
  }),
227
245
  {}
@@ -230,14 +248,14 @@ function Z(t, r) {
230
248
  } else
231
249
  return {
232
250
  ...n,
233
- [`${t}--${m.kebabCase(s)}`]: c
251
+ [`${t}--${m.kebabCase(s)}`]: i
234
252
  };
235
253
  }, e) || {})
236
254
  };
237
255
  }
238
- const ye = {
239
- ...H,
256
+ const me = {
240
257
  ...I,
258
+ ...M,
241
259
  modelValue: [String, Array, Object],
242
260
  labelNoResult: { type: String, default: "No results" },
243
261
  options: {
@@ -249,179 +267,179 @@ const ye = {
249
267
  maxValues: [Number, String],
250
268
  labelKey: { type: String, default: "label" },
251
269
  valueKey: { type: String, default: "value" }
252
- }, me = { key: 0 }, ge = ["for"], ve = ["id", "type", "value", "checked", "disabled"], he = /* @__PURE__ */ $({
270
+ }, ge = { key: 0 }, he = ["for"], ve = ["id", "type", "value", "checked", "disabled"], be = /* @__PURE__ */ q({
253
271
  __name: "VvDropdown",
254
- props: ye,
272
+ props: me,
255
273
  emits: ["update:modelValue"],
256
274
  setup(t, { emit: r }) {
257
- const e = t, o = T(), { modifiers: n, disabled: s } = _(e), { bemCssClasses: c } = Z("vv-dropdown", {
275
+ const e = t, u = H(), { modifiers: n, disabled: s } = K(e), { bemCssClasses: i } = Z("vv-dropdown", {
258
276
  modifiers: n,
259
277
  disabled: s
260
278
  });
261
- function a(l) {
262
- return Array.isArray(e.modelValue) ? m.contains(l, e.modelValue) || m.contains(g(l), e.modelValue) : m.equals(l, e.modelValue) || m.equals(g(l), e.modelValue);
279
+ function p(l) {
280
+ return Array.isArray(e.modelValue) ? m.contains(l, e.modelValue) || m.contains(o(l), e.modelValue) : m.equals(l, e.modelValue) || m.equals(o(l), e.modelValue);
263
281
  }
264
- function g(l) {
282
+ function o(l) {
265
283
  return typeof l == "string" ? l : String(l[e.valueKey]);
266
284
  }
267
- function p(l) {
285
+ function g(l) {
268
286
  return typeof l == "string" ? l : l[e.labelKey];
269
287
  }
270
- function v(l) {
271
- var b, V;
272
- const i = l.target;
273
- let u = i.value;
274
- if (u = (e.useObject ? (b = e.options) == null ? void 0 : b.find(
275
- (O) => O[e.valueKey] == u
276
- ) : null) || u, e.multiple) {
277
- if (typeof e.maxValues < "u" && e.maxValues >= 0 && ((V = e.modelValue) == null ? void 0 : V.length) >= e.maxValues && (Array.isArray(e.modelValue) && !m.contains(u, e.modelValue) || e.maxValues == 0)) {
278
- i.checked = !1;
288
+ function b(l) {
289
+ var y, V;
290
+ const h = l.target;
291
+ let a = h.value;
292
+ if (a = (e.useObject ? (y = e.options) == null ? void 0 : y.find(
293
+ (k) => k[e.valueKey] == a
294
+ ) : null) || a, e.multiple) {
295
+ if (typeof e.maxValues < "u" && e.maxValues >= 0 && ((V = e.modelValue) == null ? void 0 : V.length) >= e.maxValues && (Array.isArray(e.modelValue) && !m.contains(a, e.modelValue) || e.maxValues == 0)) {
296
+ h.checked = !1;
279
297
  return;
280
298
  }
281
- Array.isArray(e.modelValue) ? u = m.contains(u, e.modelValue) ? m.removeFromList(u, e.modelValue) : [...e.modelValue, u] : u = [u];
299
+ Array.isArray(e.modelValue) ? a = m.contains(a, e.modelValue) ? m.removeFromList(a, e.modelValue) : [...e.modelValue, a] : a = [a];
282
300
  }
283
- r("update:modelValue", u);
301
+ r("update:modelValue", a);
284
302
  }
285
- return (l, i) => {
286
- var u;
287
- return C(), j("ul", {
288
- class: q(h(c)),
303
+ return (l, h) => {
304
+ var a;
305
+ return j(), C("ul", {
306
+ class: F(v(i)),
289
307
  role: "listbox"
290
308
  }, [
291
- (u = l.options) != null && u.length ? F("", !0) : (C(), j("li", me, [
292
- E("label", null, D(l.labelNoResult), 1)
309
+ (a = l.options) != null && a.length ? x("", !0) : (j(), C("li", ge, [
310
+ B("label", null, N(l.labelNoResult), 1)
293
311
  ])),
294
- (C(!0), j(x, null, X(l.options, (y, b) => {
312
+ (j(!0), C(R, null, X(l.options, (d, y) => {
295
313
  var V;
296
- return C(), j("li", { key: b }, [
297
- E("label", {
298
- for: `dropdown-${b}-${h(o)}`
314
+ return j(), C("li", { key: y }, [
315
+ B("label", {
316
+ for: `dropdown-${y}-${v(u)}`
299
317
  }, [
300
- E("input", {
301
- id: `dropdown-${b}-${h(o)}`,
318
+ B("input", {
319
+ id: `dropdown-${y}-${v(u)}`,
302
320
  type: l.multiple ? "checkbox" : "radio",
303
- value: g(y),
304
- checked: a(y),
305
- disabled: typeof y == "object" ? (V = y.disabled) != null ? V : h(s) : h(s),
306
- onInput: v
321
+ value: o(d),
322
+ checked: p(d),
323
+ disabled: typeof d == "object" ? (V = d.disabled) != null ? V : v(s) : v(s),
324
+ onInput: b
307
325
  }, null, 40, ve),
308
- R(" " + D(p(y)), 1)
309
- ], 8, ge)
326
+ T(" " + N(g(d)), 1)
327
+ ], 8, he)
310
328
  ]);
311
329
  }), 128))
312
330
  ], 2);
313
331
  };
314
332
  }
315
- }), be = ["id"], Ae = {
333
+ }), Ve = ["id"], Ae = {
316
334
  key: 0,
317
335
  for: "select"
318
- }, Ve = ["placeholder"], Oe = /* @__PURE__ */ $({
336
+ }, Se = ["placeholder"], ke = /* @__PURE__ */ q({
319
337
  __name: "VvSelect",
320
- props: de,
338
+ props: pe,
321
339
  emits: ["update:modelValue", "change:search"],
322
340
  setup(t, { emit: r }) {
323
- const e = t, o = Y(), n = pe(e, o), s = B(), c = B();
324
- ne(c, { initialValue: !0 });
325
- const a = T(), g = B(""), p = se(
326
- g,
341
+ const e = t, u = Y(), n = ye(e, u), s = E(), i = E();
342
+ le(i, { initialValue: !0 });
343
+ const p = H(), o = E(""), g = oe(
344
+ o,
327
345
  Number(e.debounceSearch)
328
- ), v = B(!1), {
346
+ ), b = E(!1), {
329
347
  modifiers: l,
330
- disabled: i,
331
- readonly: u,
332
- loading: y,
333
- iconLeft: b,
348
+ disabled: h,
349
+ readonly: a,
350
+ loading: d,
351
+ iconLeft: y,
334
352
  iconRight: V,
335
- valid: O,
336
- error: N
337
- } = _(e);
338
- L(
339
- p,
340
- () => r("change:search", p.value)
353
+ valid: k,
354
+ error: _
355
+ } = K(e);
356
+ ee(
357
+ g,
358
+ () => r("change:search", g.value)
341
359
  );
342
- const { bemCssClasses: k } = Z("vv-select", {
360
+ const { bemCssClasses: O } = Z("vv-select", {
343
361
  modifiers: l,
344
- disabled: i,
345
- loading: y,
346
- readonly: u,
347
- iconLeft: b,
362
+ disabled: h,
363
+ loading: d,
364
+ readonly: a,
365
+ iconLeft: y,
348
366
  iconRight: V,
349
- valid: O,
350
- invalid: N,
351
- dirty: A(() => m.isNotEmpty(e.modelValue))
352
- }), z = A(
367
+ valid: k,
368
+ invalid: _,
369
+ dirty: S(() => m.isNotEmpty(e.modelValue))
370
+ }), z = S(
353
371
  () => {
354
- var d;
355
- return (d = e.options) == null ? void 0 : d.every((f) => typeof f == "object");
372
+ var c;
373
+ return (c = e.options) == null ? void 0 : c.every((f) => typeof f == "object");
356
374
  }
357
- ), M = A(
358
- () => e.searchable ? U.value : e.options
359
- ), U = A(() => {
360
- var d;
361
- return (d = e.options) == null ? void 0 : d.filter((f) => typeof f == "string" ? f.toLowerCase().includes(p.value.toLowerCase().trim()) : f[e.labelKey].toLowerCase().includes(p.value.toLowerCase().trim()));
362
- }), G = A(() => {
363
- var f, S;
375
+ ), U = S(
376
+ () => e.searchable ? L.value : e.options
377
+ ), L = S(() => {
378
+ var c;
379
+ return (c = e.options) == null ? void 0 : c.filter((f) => typeof f == "string" ? f.toLowerCase().includes(g.value.toLowerCase().trim()) : f[e.labelKey].toLowerCase().includes(g.value.toLowerCase().trim()));
380
+ }), G = S(() => {
381
+ var f, A;
364
382
  if (e.multiple && ((f = e.modelValue) == null ? void 0 : f.length) && Array.isArray(e.modelValue))
365
383
  return z.value ? m.filterArray(
366
384
  e.options,
367
385
  e.modelValue,
368
386
  e.valueKey
369
387
  ).map((w) => w[e.labelKey]).join(e.separator) : e.modelValue.join(e.separator);
370
- const d = e.useObject ? e.modelValue : (S = e.options) == null ? void 0 : S.find(
388
+ const c = e.useObject ? e.modelValue : (A = e.options) == null ? void 0 : A.find(
371
389
  (w) => typeof w == "object" ? w[e.valueKey] == e.modelValue : w == e.modelValue
372
390
  );
373
- return typeof d == "object" ? d == null ? void 0 : d[e.labelKey] : d;
391
+ return typeof c == "object" ? c == null ? void 0 : c[e.labelKey] : c;
374
392
  });
375
- le(s, () => {
393
+ ae(s, () => {
376
394
  s.value.open = !1;
377
395
  });
378
- function J(d) {
379
- const f = d.target;
380
- v.value = f.open;
396
+ function J(c) {
397
+ const f = c.target;
398
+ b.value = f.open;
381
399
  }
382
- function Q(d) {
383
- s.value && !e.multiple && (s.value.open = !1), r("update:modelValue", d);
400
+ function Q(c) {
401
+ s.value && !e.multiple && (s.value.open = !1), r("update:modelValue", c);
384
402
  }
385
- return (d, f) => (C(), j("div", {
386
- id: h(a),
387
- class: q(h(k))
403
+ return (c, f) => (j(), C("div", {
404
+ id: v(p),
405
+ class: F(v(O))
388
406
  }, [
389
- d.label ? (C(), j("label", Ae, D(d.label), 1)) : F("", !0),
390
- E("details", {
407
+ c.label ? (j(), C("label", Ae, N(c.label), 1)) : x("", !0),
408
+ B("details", {
391
409
  ref_key: "dropdown",
392
410
  ref: s,
393
411
  role: "list",
394
412
  class: "vv-select__wrapper",
395
- onClick: f[2] || (f[2] = (S) => h(i) || h(u) ? S.preventDefault() : null),
396
- onKeyup: f[3] || (f[3] = K((S) => s.value.open = !1, ["esc"])),
413
+ onClick: f[2] || (f[2] = (A) => v(h) || v(a) ? A.preventDefault() : null),
414
+ onKeyup: f[3] || (f[3] = P((A) => s.value.open = !1, ["esc"])),
397
415
  onToggle: J
398
416
  }, [
399
- E("summary", {
417
+ B("summary", {
400
418
  class: "vv-select__input",
401
419
  "aria-haspopup": "listbox",
402
- onKeyup: f[1] || (f[1] = K((S) => d.searchable ? S.preventDefault() : null, ["space"]))
420
+ onKeyup: f[1] || (f[1] = P((A) => c.searchable ? A.preventDefault() : null, ["space"]))
403
421
  }, [
404
- d.searchable && v.value ? ee((C(), j("input", {
422
+ c.searchable && b.value ? te((j(), C("input", {
405
423
  key: 0,
406
424
  ref_key: "inputSearch",
407
- ref: c,
408
- "onUpdate:modelValue": f[0] || (f[0] = (S) => g.value = S),
409
- placeholder: d.searchPlaceholder
410
- }, null, 8, Ve)), [
411
- [te, g.value]
412
- ]) : (C(), j(x, { key: 1 }, [
413
- R(D(h(G) || d.placeholder), 1)
425
+ ref: i,
426
+ "onUpdate:modelValue": f[0] || (f[0] = (A) => o.value = A),
427
+ placeholder: c.searchPlaceholder
428
+ }, null, 8, Se)), [
429
+ [re, o.value]
430
+ ]) : (j(), C(R, { key: 1 }, [
431
+ T(N(v(G) || c.placeholder), 1)
414
432
  ], 64))
415
433
  ], 32),
416
- P(he, re({
434
+ $(be, ne({
417
435
  ...e,
418
- options: h(M)
436
+ options: v(U)
419
437
  }, { "onUpdate:modelValue": Q }), null, 16)
420
438
  ], 544),
421
- P(h(n), { class: "vv-select__hint" })
422
- ], 10, be));
439
+ $(v(n), { class: "vv-select__hint" })
440
+ ], 10, Ve));
423
441
  }
424
442
  });
425
443
  export {
426
- Oe as default
444
+ ke as default
427
445
  };