@volverjs/ui-vue 0.0.10 → 0.0.12

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 (94) hide show
  1. package/bin/icons.js +1 -93
  2. package/dist/components/VvAccordion/VvAccordion.es.js +1 -366
  3. package/dist/components/VvAccordion/VvAccordion.vue.d.ts +2 -1
  4. package/dist/components/VvAccordionGroup/VvAccordionGroup.es.js +2 -702
  5. package/dist/components/VvAccordionGroup/VvAccordionGroup.vue.d.ts +3 -2
  6. package/dist/components/VvAction/VvAction.es.js +1 -302
  7. package/dist/components/VvAction/VvAction.vue.d.ts +2 -1
  8. package/dist/components/VvAlert/VvAlert.es.js +1 -527
  9. package/dist/components/VvAlert/VvAlert.umd.js +1 -1
  10. package/dist/components/VvAlert/VvAlert.vue.d.ts +2 -1
  11. package/dist/components/VvAlertGroup/VvAlertGroup.es.js +1 -730
  12. package/dist/components/VvAlertGroup/VvAlertGroup.umd.js +1 -1
  13. package/dist/components/VvAlertGroup/VvAlertGroup.vue.d.ts +2 -1
  14. package/dist/components/VvAvatar/VvAvatar.es.js +1 -132
  15. package/dist/components/VvAvatar/VvAvatar.vue.d.ts +2 -1
  16. package/dist/components/VvAvatarGroup/VvAvatarGroup.es.js +1 -250
  17. package/dist/components/VvAvatarGroup/VvAvatarGroup.vue.d.ts +2 -1
  18. package/dist/components/VvBadge/VvBadge.es.js +1 -131
  19. package/dist/components/VvBadge/VvBadge.vue.d.ts +2 -1
  20. package/dist/components/VvBreadcrumb/VvBreadcrumb.es.js +1 -410
  21. package/dist/components/VvBreadcrumb/VvBreadcrumb.vue.d.ts +2 -1
  22. package/dist/components/VvButton/VvButton.es.js +1 -882
  23. package/dist/components/VvButton/VvButton.umd.js +1 -1
  24. package/dist/components/VvButton/VvButton.vue.d.ts +2 -1
  25. package/dist/components/VvButtonGroup/VvButtonGroup.es.js +1 -214
  26. package/dist/components/VvButtonGroup/VvButtonGroup.vue.d.ts +2 -1
  27. package/dist/components/VvCard/VvCard.es.js +1 -152
  28. package/dist/components/VvCard/VvCard.vue.d.ts +2 -1
  29. package/dist/components/VvCheckbox/VvCheckbox.es.js +1 -741
  30. package/dist/components/VvCheckbox/VvCheckbox.vue.d.ts +3 -2
  31. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.es.js +1 -981
  32. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.vue.d.ts +2 -1
  33. package/dist/components/VvCombobox/VvCombobox.es.js +1 -3463
  34. package/dist/components/VvCombobox/VvCombobox.umd.js +1 -1
  35. package/dist/components/VvCombobox/VvCombobox.vue.d.ts +263 -317
  36. package/dist/components/VvDialog/VvDialog.es.js +1 -317
  37. package/dist/components/VvDialog/VvDialog.vue.d.ts +2 -1
  38. package/dist/components/VvDropdown/VvDropdown.es.js +1 -750
  39. package/dist/components/VvDropdown/VvDropdown.vue.d.ts +2 -1
  40. package/dist/components/VvDropdown/VvDropdownAction.vue.d.ts +5 -4
  41. package/dist/components/VvDropdown/VvDropdownItem.vue.d.ts +2 -1
  42. package/dist/components/VvDropdown/VvDropdownOptgroup.vue.d.ts +10 -2
  43. package/dist/components/VvDropdown/VvDropdownOption.vue.d.ts +2 -1
  44. package/dist/components/VvDropdownAction/VvDropdownAction.es.js +1 -448
  45. package/dist/components/VvDropdownItem/VvDropdownItem.es.js +1 -149
  46. package/dist/components/VvDropdownOptgroup/VvDropdownOptgroup.es.js +1 -104
  47. package/dist/components/VvDropdownOptgroup/VvDropdownOptgroup.umd.js +1 -1
  48. package/dist/components/VvDropdownOption/VvDropdownOption.es.js +1 -281
  49. package/dist/components/VvIcon/VvIcon.es.js +1 -143
  50. package/dist/components/VvIcon/VvIcon.umd.js +1 -1
  51. package/dist/components/VvIcon/VvIcon.vue.d.ts +2 -1
  52. package/dist/components/VvInputFile/VvInputFile.es.js +1 -1704
  53. package/dist/components/VvInputFile/VvInputFile.umd.js +1 -1
  54. package/dist/components/VvInputFile/VvInputFile.vue.d.ts +2 -1
  55. package/dist/components/VvInputText/VvInputText.es.js +4 -2790
  56. package/dist/components/VvInputText/VvInputText.umd.js +1 -1
  57. package/dist/components/VvInputText/VvInputText.vue.d.ts +2 -1
  58. package/dist/components/VvNav/VvNav.es.js +1 -438
  59. package/dist/components/VvNav/VvNav.vue.d.ts +2 -1
  60. package/dist/components/VvNav/VvNavItem.vue.d.ts +2 -1
  61. package/dist/components/VvNav/VvNavSeparator.vue.d.ts +2 -1
  62. package/dist/components/VvNavItem/VvNavItem.es.js +1 -337
  63. package/dist/components/VvNavSeparator/VvNavSeparator.es.js +1 -24
  64. package/dist/components/VvProgress/VvProgress.es.js +1 -163
  65. package/dist/components/VvProgress/VvProgress.vue.d.ts +2 -1
  66. package/dist/components/VvRadio/VvRadio.es.js +1 -661
  67. package/dist/components/VvRadio/VvRadio.vue.d.ts +3 -2
  68. package/dist/components/VvRadioGroup/VvRadioGroup.es.js +1 -901
  69. package/dist/components/VvRadioGroup/VvRadioGroup.vue.d.ts +2 -1
  70. package/dist/components/VvSelect/VvSelect.es.js +1 -1103
  71. package/dist/components/VvSelect/VvSelect.umd.js +1 -1
  72. package/dist/components/VvSelect/VvSelect.vue.d.ts +130 -71
  73. package/dist/components/VvTab/VvTab.es.js +1 -558
  74. package/dist/components/VvTab/VvTab.vue.d.ts +2 -1
  75. package/dist/components/VvTextarea/VvTextarea.es.js +2 -1989
  76. package/dist/components/VvTextarea/VvTextarea.umd.js +1 -1
  77. package/dist/components/VvTextarea/VvTextarea.vue.d.ts +2 -1
  78. package/dist/components/VvTooltip/VvTooltip.es.js +1 -154
  79. package/dist/components/VvTooltip/VvTooltip.vue.d.ts +2 -1
  80. package/dist/components/index.es.js +6 -8558
  81. package/dist/components/index.umd.js +1 -1
  82. package/dist/composables/index.es.js +2 -247
  83. package/dist/composables/index.umd.js +1 -1
  84. package/dist/directives/index.es.js +2 -311
  85. package/dist/directives/index.umd.js +1 -1
  86. package/dist/directives/v-contextmenu.es.js +2 -142
  87. package/dist/directives/v-contextmenu.umd.js +1 -1
  88. package/dist/directives/v-tooltip.es.js +1 -172
  89. package/dist/icons.es.js +1 -39
  90. package/dist/icons.umd.js +1 -1
  91. package/dist/index.es.js +1 -219
  92. package/dist/resolvers/unplugin.es.js +1 -187
  93. package/dist/stories/AccordionGroup/AccordionGroupSlots.stories.d.ts +14 -14
  94. package/package.json +37 -37
@@ -1 +1 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("vue"),require("@iconify/vue")):"function"==typeof define&&define.amd?define(["vue","@iconify/vue"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).VvButton=t(e.vue,e.vue$1)}(this,function(e,t){"use strict";var o=(e=>(e.local="local",e.session="session",e))(o||{}),n=(e=>(e.left="left",e.right="right",e.top="top",e.bottom="bottom",e))(n||{}),r=(e=>(e.before="before",e.after="after",e))(r||{}),l=(e=>(e.button="button",e.submit="submit",e.reset="reset",e))(l||{}),a=(e=>(e.nuxtLink="nuxt-link",e.routerLink="router-link",e.a="a",e.button="button",e))(a||{});const i=Symbol.for("volver"),u=Symbol.for("buttonGroup"),s=Symbol.for("dropdownTrigger"),c=Symbol.for("dropdownAction"),d={prefix:"normal"},f={to:{type:[String,Object]},href:String,target:String,rel:{type:String,default:"noopener noreferrer"}},v={loading:{type:Boolean,default:!1},loadingLabel:{type:String,default:"Loading..."}},p={disabled:{type:Boolean,default:!1}},m={active:{type:Boolean,default:!1}},g={current:{type:Boolean,default:!1}},b={pressed:{type:Boolean,default:!1}},y={label:{type:[String,Number],default:void 0}},h={modifiers:{type:[String,Array],default:void 0}},k={icon:{type:[String,Object],default:void 0},iconPosition:{type:String,default:r.before,validation:e=>Object.values(r).includes(e)}},S={unselectable:{type:Boolean,default:!0}},B={id:[String,Number]};n.bottom;const $={...p,...y,...b,...m,...g,...f,type:{type:String,default:l.button,validator:e=>Object.values(l).includes(e)},ariaLabel:{type:String,default:void 0},defaultTag:{type:String,default:a.button}};o.local;const w={...$,...B,...h,...S,...v,...k,iconPosition:{type:String,default:n.left,validator:e=>Object.values(n).includes(e)},loadingIcon:{type:String,default:"eos-icons:bubble-loading"},toggle:{type:Boolean,default:!1},value:{type:[String,Number,Boolean],default:void 0},uncheckedValue:{type:[String,Number,Boolean],default:void 0},modelValue:{type:[String,Number,Boolean],default:void 0}};function x(t,o){const{group:n,isInGroup:r,getGroupOrLocalRef:l}=function(t){const o=e.inject(t,void 0),n=e.computed(()=>void 0!==o);return{group:o,isInGroup:n,getGroupOrLocalRef:function(t,n,r){const l=o?.[t];if(l)return e.computed({get:()=>l.value,set(e){l.value=e}});const a=e.toRef(n,t);return e.computed({get:()=>a.value,set(e){r&&r(`update:${t}`,e)}})}}}(u),{id:a,iconPosition:i,icon:s,label:c,pressed:d}=e.toRefs(t),f=l("modelValue",t,o),v=l("toggle",t),p=l("unselectable",t),m=e.computed(()=>n?.multiple.value??!1),g=e.computed(()=>{let e=t.modifiers,o=n?.modifiers.value;const r=new Set;return e&&(Array.isArray(e)||(e=e.split(" ")),e.forEach(e=>r.add(e))),o&&(Array.isArray(o)||(o=o.split(" ")),o.forEach(e=>r.add(e))),Array.from(r)}),b=e.computed(()=>Boolean(t.disabled||n?.disabled.value));return{group:n,isInGroup:r,modelValue:f,toggle:v,unselectable:p,multiple:m,modifiers:g,disabled:b,id:a,pressed:d,iconPosition:i,icon:s,label:c}}const L=$;function A(){return e.inject(i,void 0)}const I=e.defineComponent({name:"VvAction",props:L,emits:["click","mouseover","mouseleave"],setup(t,{expose:o,emit:n}){const r=t,l=n,i=e.getCurrentInstance(),u=A(),d=e.ref(null);o({$el:d});const{reference:f,bus:v,aria:p,expanded:m}=e.inject(s,{});e.watch(()=>d.value,e=>{f&&(f.value=e)});const g=e.computed(()=>r.pressed||m?.value),{role:b}=e.inject(c,{}),y=e.computed(()=>{switch(!0){case r.disabled:return a.button;case void 0!==r.to:return u?.nuxt?e.resolveComponent(a.nuxtLink):a.routerLink;case void 0!==r.href:return a.a;default:return r.defaultTag}}),h=e.computed(()=>{const e={...p?.value,ariaPressed:!!g.value||void 0,ariaLabel:r.ariaLabel,role:b?.value};switch(y.value){case a.a:return{...e,href:r.href,target:r.target,rel:r.rel};case a.routerLink:case a.nuxtLink:return{...e,to:r.to,target:r.target};case a.button:return{...e,type:r.type,disabled:r.disabled};default:return e}});function k(e){r.disabled?e.preventDefault():i?.vnode.props?.onClick?l("click",e):v?.emit("click",e)}function S(e){i?.vnode.props?.onMouseover?l("mouseover",e):v?.emit("mouseover",e)}function B(e){i?.vnode.props?.onMouseleave?l("mouseleave",e):v?.emit("mouseleave",e)}return(t,o)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(y)),e.mergeProps(e.unref(h),{ref_key:"element",ref:d,class:{active:t.active,pressed:e.unref(g),disabled:t.disabled,current:t.current},onClickPassive:k,onMouseoverPassive:S,onMouseleavePassive:B}),{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(t.label),1)])]),_:3},16,["class"]))}});function V(t,o,n){return e.computed(()=>{const r={[t]:!0},l="string"==typeof o?.value?o.value.split(" "):o?.value;return l&&Array.isArray(l)&&l.forEach(e=>{e&&(r[`${t}--${e}`]=!0)}),n&&Object.keys(n.value).forEach(o=>{r[`${t}--${o}`]=e.unref(n.value[o])}),r})}const N=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:{}},d),setup(o){const n=o,r=e.computed(()=>"string"==typeof n.rotate?Number.parseFloat(n.rotate):n.rotate),l=e.ref(!0),a=A(),{modifiers:i}=e.toRefs(n),u=V("vv-icon",i),s=e.computed(()=>n.provider||a?.iconsProvider),c=e.computed(()=>{const e=n.name??"",o=`@${s.value}:${n.prefix}:${e}`;if(t.iconLoaded(o))return o;const r=a?.iconsCollections.find(o=>{const n=`@${s.value}:${o.prefix}:${e}`;return t.iconLoaded(n)});return r?`@${s.value}:${r.prefix}:${e}`:e});function d(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),r=o?.innerHTML.trim()||"";o&&r&&t.addIcon(`@${s.value}:${n.prefix}:${n.name}`,{body:r,height:o.viewBox.baseVal.height,width:o.viewBox.baseVal.width})}return a&&n.src&&!t.iconLoaded(`@${s.value}:${n.prefix}:${n.name}`)&&(l.value=!1,a.fetchIcon(n.src).then(e=>{e&&(d(e),l.value=!0)}).catch(e=>{throw new Error(`Error during fetch icon: ${e?.message}`)})),n.svg&&d(n.svg),(o,n)=>e.unref(l)?(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(r),color:o.color,icon:e.unref(c)},{onLoad:o.onLoad}),null,16,["class","onLoad"])):e.createCommentVNode("v-if",!0)}});function j(e,t,o){return C(e,t)}function C(e,t){if(e===t)return!0;if(e&&t&&"object"==typeof e&&"object"==typeof t){const o=Array.isArray(e),n=Array.isArray(t);let r,l,a;if(o&&n){if(l=e.length,l!==t.length)return!1;for(r=l;0!==r--;)if(!C(e[r],t[r]))return!1;return!0}if(o!==n)return!1;const i=e instanceof Date,u=t instanceof Date;if(i!==u)return!1;if(i&&u)return e.getTime()===t.getTime();const s=e instanceof RegExp,c=t instanceof RegExp;if(s!==c)return!1;if(s&&c)return e.toString()===t.toString();const d=Object.keys(e);if(l=d.length,l!==Object.keys(t).length)return!1;for(r=l;0!==r--;)if(!Object.prototype.hasOwnProperty.call(t,d[r]))return!1;for(r=l;0!==r--;)if(a=d[r],!C(e[a],t[a]))return!1;return!0}return Number.isNaN(e)&&Number.isNaN(t)}function P(e,t){if(null!=e&&t&&t.length)for(const o of t)if(j(e,o))return!0;return!1}const O={key:1,class:"vv-button__label"},_={key:1,class:"vv-button__label"};return e.defineComponent({name:"VvButton",inheritAttrs:!1,props:w,emits:["update:modelValue"],setup(t,{expose:o,emit:l}){const a=t,i=l,u=e.useAttrs(),s=e.useSlots(),{id:c,modifiers:d,iconPosition:f,icon:v,label:p,modelValue:m,disabled:g,toggle:b,unselectable:y}=x(a,i),h=function(t){return e.computed(()=>String(t?.value||e.useId()))}(c),k=e.computed(()=>u?.name||h.value),S=e.ref(null);o({$el:e.computed(()=>S.value?.$el)});const B=e.computed(()=>b.value?Array.isArray(m.value)?P(k.value,m.value):j(k.value,m.value):a.pressed),$=V("vv-button",d,e.computed(()=>({reverse:[n.right,n.bottom].includes(f.value),column:[n.top,n.bottom].includes(f.value),"icon-only":Boolean(v?.value&&!p?.value&&!s.default)}))),{hasIcon:w}=function(t,o){const l=e.computed(()=>"string"==typeof t?.value?{name:t?.value}:t?.value),a=e.computed(()=>o?.value===r.before?l.value:void 0),i=e.computed(()=>o?.value===r.after?l.value:void 0),u=e.computed(()=>o?.value===n.left?l.value:void 0),s=e.computed(()=>o?.value===n.right?l.value:void 0),c=e.computed(()=>o?.value===n.top?l.value:void 0),d=e.computed(()=>o?.value===n.bottom?l.value:void 0);return{hasIcon:l,hasIconLeft:u,hasIconRight:s,hasIconTop:c,hasIconBottom:d,hasIconBefore:a,hasIconAfter:i}}(v),L=e.computed(()=>void 0!==a.value?a.value:k.value),A=e.computed(()=>{if(b.value)return{onClick:C}});function C(){if(b.value){if(Array.isArray(m.value))return P(L.value,m.value)?void(y.value&&(m.value=m.value.filter(e=>e!==L.value))):void m.value.push(L.value);if(L.value===m.value&&y.value)return void(m.value=a.uncheckedValue);m.value=L.value}}return(t,o)=>(e.openBlock(),e.createBlock(I,e.mergeProps({...e.unref(u),...e.unref(A),disabled:e.unref(g),pressed:e.unref(B),active:t.active,type:t.type,to:t.to,href:t.href,target:t.target,rel:t.rel,ariaLabel:t.ariaLabel},{id:e.unref(h),ref_key:"element",ref:S,class:e.unref($)}),{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default",{},()=>[t.loading?e.renderSlot(t.$slots,"loading",{key:0},()=>[t.loadingIcon?(e.openBlock(),e.createBlock(N,{key:0,class:"vv-button__loading-icon",name:t.loadingIcon},null,8,["name"])):e.createCommentVNode("v-if",!0),t.loadingLabel?(e.openBlock(),e.createElementBlock("span",O,e.toDisplayString(t.loadingLabel),1)):e.createCommentVNode("v-if",!0)]):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.renderSlot(t.$slots,"before"),e.unref(w)?(e.openBlock(),e.createBlock(N,e.mergeProps({key:0},e.unref(w),{class:"vv-button__icon"}),null,16)):e.createCommentVNode("v-if",!0),e.unref(p)?(e.openBlock(),e.createElementBlock("span",_,[e.renderSlot(t.$slots,"label",{},()=>[e.createTextVNode(e.toDisplayString(e.unref(p)),1)])])):e.createCommentVNode("v-if",!0),e.renderSlot(t.$slots,"after")],64))])]),_:3},16,["id","class"]))}})});
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("vue"),require("@iconify/vue")):"function"==typeof define&&define.amd?define(["vue","@iconify/vue"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).VvButton=t(e.vue,e.vue$1)}(this,function(e,t){"use strict";var o=(e=>(e.local="local",e.session="session",e))(o||{}),n=(e=>(e.left="left",e.right="right",e.top="top",e.bottom="bottom",e))(n||{}),r=(e=>(e.before="before",e.after="after",e))(r||{}),l=(e=>(e.button="button",e.submit="submit",e.reset="reset",e))(l||{}),a=(e=>(e.nuxtLink="nuxt-link",e.routerLink="router-link",e.a="a",e.button="button",e))(a||{});const i=Symbol.for("volver"),u=Symbol.for("buttonGroup"),s=Symbol.for("dropdownTrigger"),c=Symbol.for("dropdownAction"),d={prefix:"normal"},f={to:{type:[String,Object]},href:String,target:String,rel:{type:String,default:"noopener noreferrer"}},v={loading:{type:Boolean,default:!1},loadingLabel:{type:String,default:"Loading..."}},p={disabled:{type:Boolean,default:!1}},m={active:{type:Boolean,default:!1}},g={current:{type:Boolean,default:!1}},b={pressed:{type:Boolean,default:!1}},y={label:{type:[String,Number],default:void 0}},h={modifiers:{type:[String,Array],default:void 0}},k={icon:{type:[String,Object],default:void 0},iconPosition:{type:String,default:r.before,validation:e=>Object.values(r).includes(e)}},S={unselectable:{type:Boolean,default:!0}},B={id:[String,Number]};n.bottom;const $={...p,...y,...b,...m,...g,...f,type:{type:String,default:l.button,validator:e=>Object.values(l).includes(e)},ariaLabel:{type:String,default:void 0},defaultTag:{type:String,default:a.button}};o.local;const w={...$,...B,...h,...S,...v,...k,iconPosition:{type:String,default:n.left,validator:e=>Object.values(n).includes(e)},loadingIcon:{type:String,default:"eos-icons:bubble-loading"},toggle:{type:Boolean,default:!1},value:{type:[String,Number,Boolean],default:void 0},uncheckedValue:{type:[String,Number,Boolean],default:void 0},modelValue:{type:[String,Number,Boolean],default:void 0}};function x(t,o){const{group:n,isInGroup:r,getGroupOrLocalRef:l}=function(t){const o=e.inject(t,void 0),n=e.computed(()=>void 0!==o);return{group:o,isInGroup:n,getGroupOrLocalRef:function(t,n,r){const l=o?.[t];if(l)return e.computed({get:()=>l.value,set(e){l.value=e}});const a=e.toRef(n,t);return e.computed({get:()=>a.value,set(e){r&&r(`update:${t}`,e)}})}}}(u),{id:a,iconPosition:i,icon:s,label:c,pressed:d}=e.toRefs(t),f=l("modelValue",t,o),v=l("toggle",t),p=l("unselectable",t),m=e.computed(()=>n?.multiple.value??!1),g=e.computed(()=>{let e=t.modifiers,o=n?.modifiers.value;const r=new Set;return e&&(Array.isArray(e)||(e=e.split(" ")),e.forEach(e=>r.add(e))),o&&(Array.isArray(o)||(o=o.split(" ")),o.forEach(e=>r.add(e))),Array.from(r)}),b=e.computed(()=>Boolean(t.disabled||n?.disabled.value));return{group:n,isInGroup:r,modelValue:f,toggle:v,unselectable:p,multiple:m,modifiers:g,disabled:b,id:a,pressed:d,iconPosition:i,icon:s,label:c}}const L=$;function A(){return e.inject(i,void 0)}const I=e.defineComponent({name:"VvAction",props:L,emits:["click","mouseover","mouseleave"],setup(t,{expose:o,emit:n}){const r=t,l=n,i=e.getCurrentInstance(),u=A(),d=e.ref(null);o({$el:d});const{reference:f,bus:v,aria:p,expanded:m}=e.inject(s,{});e.watch(()=>d.value,e=>{f&&(f.value=e)});const g=e.computed(()=>r.pressed||m?.value),{role:b}=e.inject(c,{}),y=e.computed(()=>{switch(!0){case r.disabled:return a.button;case void 0!==r.to:return u?.nuxt?e.resolveComponent(a.nuxtLink):a.routerLink;case void 0!==r.href:return a.a;default:return r.defaultTag}}),h=e.computed(()=>{const e={...p?.value,ariaPressed:!!g.value||void 0,ariaLabel:r.ariaLabel,role:b?.value};switch(y.value){case a.a:return{...e,href:r.href,target:r.target,rel:r.rel};case a.routerLink:case a.nuxtLink:return{...e,to:r.to,target:r.target};case a.button:return{...e,type:r.type,disabled:r.disabled};default:return e}});function k(e){r.disabled?e.preventDefault():i?.vnode.props?.onClick?l("click",e):v?.emit("click",e)}function S(e){i?.vnode.props?.onMouseover?l("mouseover",e):v?.emit("mouseover",e)}function B(e){i?.vnode.props?.onMouseleave?l("mouseleave",e):v?.emit("mouseleave",e)}return(t,o)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(y)),e.mergeProps(e.unref(h),{ref_key:"element",ref:d,class:{active:t.active,pressed:e.unref(g),disabled:t.disabled,current:t.current},onClickPassive:k,onMouseoverPassive:S,onMouseleavePassive:B}),{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(t.label),1)])]),_:3},16,["class"]))}});function V(t,o,n){return e.computed(()=>{const r={[t]:!0},l="string"==typeof o?.value?o.value.split(" "):o?.value;return l&&Array.isArray(l)&&l.forEach(e=>{e&&(r[`${t}--${e}`]=!0)}),n&&Object.keys(n.value).forEach(o=>{r[`${t}--${o}`]=e.unref(n.value[o])}),r})}const N=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:{}},d),setup(o){const n=o,r=e.computed(()=>"string"==typeof n.rotate?Number.parseFloat(n.rotate):n.rotate),l=e.ref(!0),a=A(),{modifiers:i}=e.toRefs(n),u=V("vv-icon",i),s=e.computed(()=>n.provider||a?.iconsProvider),c=e.computed(()=>{const e=n.name??"",o=`@${s.value}:${n.prefix}:${e}`;if(t.iconLoaded(o))return o;const r=a?.iconsCollections.find(o=>{const n=`@${s.value}:${o.prefix}:${e}`;return t.iconLoaded(n)});return r?`@${s.value}:${r.prefix}:${e}`:e});function d(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),r=o?.innerHTML.trim()||"";o&&r&&t.addIcon(`@${s.value}:${n.prefix}:${n.name}`,{body:r,height:o.viewBox.baseVal.height,width:o.viewBox.baseVal.width})}return a&&n.src&&!t.iconLoaded(`@${s.value}:${n.prefix}:${n.name}`)&&(l.value=!1,a.fetchIcon(n.src).then(e=>{e&&(d(e),l.value=!0)}).catch(e=>{throw new Error(`Error during fetch icon: ${e?.message}`)})),n.svg&&d(n.svg),(n,a)=>e.unref(l)?(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(r),color:o.color,icon:e.unref(c)},{onLoad:o.onLoad}),null,16,["class","onLoad"])):e.createCommentVNode("v-if",!0)}});function j(e,t,o){return C(e,t)}function C(e,t){if(e===t)return!0;if(e&&t&&"object"==typeof e&&"object"==typeof t){const o=Array.isArray(e),n=Array.isArray(t);let r,l,a;if(o&&n){if(l=e.length,l!==t.length)return!1;for(r=l;0!==r--;)if(!C(e[r],t[r]))return!1;return!0}if(o!==n)return!1;const i=e instanceof Date,u=t instanceof Date;if(i!==u)return!1;if(i&&u)return e.getTime()===t.getTime();const s=e instanceof RegExp,c=t instanceof RegExp;if(s!==c)return!1;if(s&&c)return e.toString()===t.toString();const d=Object.keys(e);if(l=d.length,l!==Object.keys(t).length)return!1;for(r=l;0!==r--;)if(!Object.prototype.hasOwnProperty.call(t,d[r]))return!1;for(r=l;0!==r--;)if(a=d[r],!C(e[a],t[a]))return!1;return!0}return Number.isNaN(e)&&Number.isNaN(t)}function P(e,t){if(null!=e&&t&&t.length)for(const o of t)if(j(e,o))return!0;return!1}const O={key:1,class:"vv-button__label"},_={key:1,class:"vv-button__label"};return e.defineComponent({name:"VvButton",inheritAttrs:!1,props:w,emits:["update:modelValue"],setup(t,{expose:o,emit:l}){const a=t,i=l,u=e.useAttrs(),s=e.useSlots(),{id:c,modifiers:d,iconPosition:f,icon:v,label:p,modelValue:m,disabled:g,toggle:b,unselectable:y}=x(a,i),h=function(t){return e.computed(()=>String(t?.value||e.useId()))}(c),k=e.computed(()=>u?.name||h.value),S=e.ref(null);o({$el:e.computed(()=>S.value?.$el)});const B=e.computed(()=>b.value?Array.isArray(m.value)?P(k.value,m.value):j(k.value,m.value):a.pressed),$=V("vv-button",d,e.computed(()=>({reverse:[n.right,n.bottom].includes(f.value),column:[n.top,n.bottom].includes(f.value),"icon-only":Boolean(v?.value&&!p?.value&&!s.default)}))),{hasIcon:w}=function(t,o){const l=e.computed(()=>"string"==typeof t?.value?{name:t?.value}:t?.value),a=e.computed(()=>o?.value===r.before?l.value:void 0),i=e.computed(()=>o?.value===r.after?l.value:void 0),u=e.computed(()=>o?.value===n.left?l.value:void 0),s=e.computed(()=>o?.value===n.right?l.value:void 0),c=e.computed(()=>o?.value===n.top?l.value:void 0),d=e.computed(()=>o?.value===n.bottom?l.value:void 0);return{hasIcon:l,hasIconLeft:u,hasIconRight:s,hasIconTop:c,hasIconBottom:d,hasIconBefore:a,hasIconAfter:i}}(v),L=e.computed(()=>void 0!==a.value?a.value:k.value),A=e.computed(()=>{if(b.value)return{onClick:C}});function C(){if(b.value){if(Array.isArray(m.value))return P(L.value,m.value)?void(y.value&&(m.value=m.value.filter(e=>e!==L.value))):void m.value.push(L.value);if(L.value===m.value&&y.value)return void(m.value=a.uncheckedValue);m.value=L.value}}return(t,o)=>(e.openBlock(),e.createBlock(I,e.mergeProps({...e.unref(u),...e.unref(A),disabled:e.unref(g),pressed:e.unref(B),active:t.active,type:t.type,to:t.to,href:t.href,target:t.target,rel:t.rel,ariaLabel:t.ariaLabel},{id:e.unref(h),ref_key:"element",ref:S,class:e.unref($)}),{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default",{},()=>[t.loading?e.renderSlot(t.$slots,"loading",{key:0},()=>[t.loadingIcon?(e.openBlock(),e.createBlock(N,{key:0,class:"vv-button__loading-icon",name:t.loadingIcon},null,8,["name"])):e.createCommentVNode("v-if",!0),t.loadingLabel?(e.openBlock(),e.createElementBlock("span",O,e.toDisplayString(t.loadingLabel),1)):e.createCommentVNode("v-if",!0)]):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.renderSlot(t.$slots,"before"),e.unref(w)?(e.openBlock(),e.createBlock(N,e.mergeProps({key:0},e.unref(w),{class:"vv-button__icon"}),null,16)):e.createCommentVNode("v-if",!0),e.unref(p)?(e.openBlock(),e.createElementBlock("span",_,[e.renderSlot(t.$slots,"label",{},()=>[e.createTextVNode(e.toDisplayString(e.unref(p)),1)])])):e.createCommentVNode("v-if",!0),e.renderSlot(t.$slots,"after")],64))])]),_:3},16,["id","class"]))}})});
@@ -1,5 +1,5 @@
1
1
  import { Side } from '../../constants';
2
- declare const _default: __VLS_WithSlots<import("vue").DefineComponent<globalThis.ExtractPropTypes<{
2
+ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<globalThis.ExtractPropTypes<{
3
3
  iconPosition: {
4
4
  type: PropType<`${Side}`>;
5
5
  default: Side;
@@ -211,6 +211,7 @@ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<globalThis
211
211
  } & {
212
212
  after?: (props: {}) => any;
213
213
  }>;
214
+ declare const _default: typeof __VLS_export;
214
215
  export default _default;
215
216
  type __VLS_WithSlots<T, S> = T & {
216
217
  new (): {
@@ -1,214 +1 @@
1
- import { provide, computed, defineComponent, toRefs, watchEffect, createElementBlock, openBlock, normalizeClass, unref, createCommentVNode, renderSlot, createTextVNode, toDisplayString } from "vue";
2
- var StorageType = /* @__PURE__ */ ((StorageType2) => {
3
- StorageType2["local"] = "local";
4
- StorageType2["session"] = "session";
5
- return StorageType2;
6
- })(StorageType || {});
7
- var Side = /* @__PURE__ */ ((Side2) => {
8
- Side2["left"] = "left";
9
- Side2["right"] = "right";
10
- Side2["top"] = "top";
11
- Side2["bottom"] = "bottom";
12
- return Side2;
13
- })(Side || {});
14
- var Position = /* @__PURE__ */ ((Position2) => {
15
- Position2["before"] = "before";
16
- Position2["after"] = "after";
17
- return Position2;
18
- })(Position || {});
19
- var ButtonType = /* @__PURE__ */ ((ButtonType2) => {
20
- ButtonType2["button"] = "button";
21
- ButtonType2["submit"] = "submit";
22
- ButtonType2["reset"] = "reset";
23
- return ButtonType2;
24
- })(ButtonType || {});
25
- var ActionTag = /* @__PURE__ */ ((ActionTag2) => {
26
- ActionTag2["nuxtLink"] = "nuxt-link";
27
- ActionTag2["routerLink"] = "router-link";
28
- ActionTag2["a"] = "a";
29
- ActionTag2["button"] = "button";
30
- return ActionTag2;
31
- })(ActionTag || {});
32
- const INJECTION_KEY_BUTTON_GROUP = Symbol.for(
33
- "buttonGroup"
34
- );
35
- const DisabledProps = {
36
- /**
37
- * Whether the form control is disabled
38
- */
39
- disabled: {
40
- type: Boolean,
41
- default: false
42
- }
43
- };
44
- const ModifiersProps = {
45
- /**
46
- * Component BEM modifiers
47
- */
48
- modifiers: {
49
- type: [String, Array],
50
- default: void 0
51
- }
52
- };
53
- ({
54
- /**
55
- * VvIcon position
56
- */
57
- iconPosition: {
58
- default: Position.before
59
- }
60
- });
61
- const UnselectableProps = {
62
- /**
63
- * If true the input will be unselectable
64
- */
65
- unselectable: { type: Boolean, default: true }
66
- };
67
- ({
68
- /**
69
- * Dropdown placement
70
- */
71
- placement: {
72
- default: Side.bottom
73
- }
74
- });
75
- ({
76
- /**
77
- * Button type
78
- */
79
- type: {
80
- default: ButtonType.button
81
- },
82
- /**
83
- * Default tag for the action
84
- */
85
- defaultTag: {
86
- default: ActionTag.button
87
- }
88
- });
89
- ({
90
- storageType: {
91
- default: StorageType.local
92
- }
93
- });
94
- const VvButtonGroupProps = {
95
- ...ModifiersProps,
96
- ...DisabledProps,
97
- ...UnselectableProps,
98
- legendLabel: { type: String },
99
- /**
100
- * String or String[] of css classes (modifiers) that will be provided to each button'
101
- */
102
- itemModifiers: {
103
- type: [String, Array],
104
- default: ""
105
- },
106
- toggle: { type: Boolean, default: false },
107
- multiple: { type: Boolean, default: false },
108
- modelValue: {
109
- type: [String, Number, Boolean, Array],
110
- default: void 0
111
- }
112
- };
113
- const VvButtonGroupEvents = ["update:modelValue"];
114
- function useGroupStateProvide(key, groupState) {
115
- provide(key, groupState);
116
- }
117
- function useModifiers(prefix, modifiers, others) {
118
- return computed(() => {
119
- const toReturn = {
120
- [prefix]: true
121
- };
122
- const modifiersArray = typeof modifiers?.value === "string" ? modifiers.value.split(" ") : modifiers?.value;
123
- if (modifiersArray) {
124
- if (Array.isArray(modifiersArray)) {
125
- modifiersArray.forEach((modifier) => {
126
- if (modifier) {
127
- toReturn[`${prefix}--${modifier}`] = true;
128
- }
129
- });
130
- }
131
- }
132
- return toReturn;
133
- });
134
- }
135
- const _hoisted_1 = {
136
- key: 0,
137
- class: "vv-button-group__legend"
138
- };
139
- const __default__ = {
140
- name: "VvButtonGroup"
141
- };
142
- const _sfc_main = /* @__PURE__ */ defineComponent({
143
- ...__default__,
144
- props: VvButtonGroupProps,
145
- emits: VvButtonGroupEvents,
146
- setup(__props, { emit: __emit }) {
147
- const props = __props;
148
- const emit = __emit;
149
- const {
150
- disabled,
151
- toggle,
152
- modifiers,
153
- multiple,
154
- unselectable,
155
- itemModifiers
156
- } = toRefs(props);
157
- watchEffect(() => {
158
- if (typeof props.modelValue === "string" && multiple.value) {
159
- console.warn(
160
- `[VvButtonGroup]: modelValue is a string but multiple is true.`
161
- );
162
- }
163
- });
164
- const modelValue = computed({
165
- get: () => {
166
- if (!multiple.value) {
167
- return Array.isArray(props.modelValue) ? props.modelValue[0] : props.modelValue;
168
- }
169
- return props.modelValue;
170
- },
171
- set: (newValue) => {
172
- if (newValue !== void 0 && (Array.isArray(props.modelValue) || multiple.value) && !Array.isArray(newValue)) {
173
- return emit("update:modelValue", [newValue]);
174
- }
175
- return emit("update:modelValue", newValue);
176
- }
177
- });
178
- useGroupStateProvide(INJECTION_KEY_BUTTON_GROUP, {
179
- modelValue,
180
- disabled,
181
- toggle,
182
- multiple,
183
- unselectable,
184
- modifiers: itemModifiers
185
- });
186
- const bemCssClasses = useModifiers("vv-button-group", modifiers);
187
- return (_ctx, _cache) => {
188
- return openBlock(), createElementBlock(
189
- "fieldset",
190
- {
191
- class: normalizeClass(unref(bemCssClasses)),
192
- role: "group"
193
- },
194
- [
195
- _ctx.$slots.legend || _ctx.legendLabel ? (openBlock(), createElementBlock("legend", _hoisted_1, [
196
- renderSlot(_ctx.$slots, "legend", {}, () => [
197
- createTextVNode(
198
- toDisplayString(_ctx.legendLabel),
199
- 1
200
- /* TEXT */
201
- )
202
- ])
203
- ])) : createCommentVNode("v-if", true),
204
- renderSlot(_ctx.$slots, "default")
205
- ],
206
- 2
207
- /* CLASS */
208
- );
209
- };
210
- }
211
- });
212
- export {
213
- _sfc_main as default
214
- };
1
+ import{provide as e,computed as t,defineComponent as l,toRefs as o,watchEffect as a,createElementBlock as r,openBlock as u,normalizeClass as n,unref as s,createCommentVNode as i,renderSlot as d,createTextVNode as m,toDisplayString as p}from"vue";var b=/* @__PURE__ */(e=>(e.local="local",e.session="session",e))(b||{}),f=/* @__PURE__ */(e=>(e.left="left",e.right="right",e.top="top",e.bottom="bottom",e))(f||{}),g=/* @__PURE__ */(e=>(e.before="before",e.after="after",e))(g||{}),y=/* @__PURE__ */(e=>(e.button="button",e.submit="submit",e.reset="reset",e))(y||{}),c=/* @__PURE__ */(e=>(e.nuxtLink="nuxt-link",e.routerLink="router-link",e.a="a",e.button="button",e))(c||{});const v=Symbol.for("buttonGroup"),V={disabled:{type:Boolean,default:!1}},A={modifiers:{type:[String,Array],default:void 0}};g.before;const B={unselectable:{type:Boolean,default:!0}};f.bottom,y.button,c.button,b.local;const k={...A,...V,...B,legendLabel:{type:String},itemModifiers:{type:[String,Array],default:""},toggle:{type:Boolean,default:!1},multiple:{type:Boolean,default:!1},modelValue:{type:[String,Number,Boolean,Array],default:void 0}};const L={key:0,class:"vv-button-group__legend"},S=/* @__PURE__ */l({name:"VvButtonGroup",props:k,emits:["update:modelValue"],setup(l,{emit:b}){const f=l,g=b,{disabled:y,toggle:c,modifiers:V,multiple:A,unselectable:B,itemModifiers:k}=o(f);a(()=>{"string"==typeof f.modelValue&&A.value&&console.warn("[VvButtonGroup]: modelValue is a string but multiple is true.")});const S=t({get:()=>A.value?f.modelValue:Array.isArray(f.modelValue)?f.modelValue[0]:f.modelValue,set:e=>void 0===e||!Array.isArray(f.modelValue)&&!A.value||Array.isArray(e)?g("update:modelValue",e):g("update:modelValue",[e])});e(v,{modelValue:S,disabled:y,toggle:c,multiple:A,unselectable:B,modifiers:k});const $=function(e,l){return t(()=>{const t={[e]:!0},o="string"==typeof l?.value?l.value.split(" "):l?.value;return o&&Array.isArray(o)&&o.forEach(l=>{l&&(t[`${e}--${l}`]=!0)}),t})}("vv-button-group",V);return(e,t)=>(u(),r("fieldset",{class:n(s($)),role:"group"},[e.$slots.legend||e.legendLabel?(u(),r("legend",L,[d(e.$slots,"legend",{},()=>[m(p(e.legendLabel),1)])])):i("v-if",!0),d(e.$slots,"default")],2))}});export{S as default};
@@ -1,4 +1,4 @@
1
- declare const _default: __VLS_WithSlots<import("vue").DefineComponent<globalThis.ExtractPropTypes<{
1
+ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<globalThis.ExtractPropTypes<{
2
2
  legendLabel: {
3
3
  type: StringConstructor;
4
4
  };
@@ -75,6 +75,7 @@ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<globalThis
75
75
  } & {
76
76
  default?: (props: {}) => any;
77
77
  }>;
78
+ declare const _default: typeof __VLS_export;
78
79
  export default _default;
79
80
  type __VLS_WithSlots<T, S> = T & {
80
81
  new (): {
@@ -1,152 +1 @@
1
- import { computed, defineComponent, toRefs, createElementBlock, openBlock, normalizeClass, unref, createCommentVNode, renderSlot, createTextVNode, toDisplayString } from "vue";
2
- var StorageType = /* @__PURE__ */ ((StorageType2) => {
3
- StorageType2["local"] = "local";
4
- StorageType2["session"] = "session";
5
- return StorageType2;
6
- })(StorageType || {});
7
- var Side = /* @__PURE__ */ ((Side2) => {
8
- Side2["left"] = "left";
9
- Side2["right"] = "right";
10
- Side2["top"] = "top";
11
- Side2["bottom"] = "bottom";
12
- return Side2;
13
- })(Side || {});
14
- var Position = /* @__PURE__ */ ((Position2) => {
15
- Position2["before"] = "before";
16
- Position2["after"] = "after";
17
- return Position2;
18
- })(Position || {});
19
- var ButtonType = /* @__PURE__ */ ((ButtonType2) => {
20
- ButtonType2["button"] = "button";
21
- ButtonType2["submit"] = "submit";
22
- ButtonType2["reset"] = "reset";
23
- return ButtonType2;
24
- })(ButtonType || {});
25
- var ActionTag = /* @__PURE__ */ ((ActionTag2) => {
26
- ActionTag2["nuxtLink"] = "nuxt-link";
27
- ActionTag2["routerLink"] = "router-link";
28
- ActionTag2["a"] = "a";
29
- ActionTag2["button"] = "button";
30
- return ActionTag2;
31
- })(ActionTag || {});
32
- const ModifiersProps = {
33
- /**
34
- * Component BEM modifiers
35
- */
36
- modifiers: {
37
- type: [String, Array],
38
- default: void 0
39
- }
40
- };
41
- ({
42
- /**
43
- * VvIcon position
44
- */
45
- iconPosition: {
46
- default: Position.before
47
- }
48
- });
49
- ({
50
- /**
51
- * Dropdown placement
52
- */
53
- placement: {
54
- default: Side.bottom
55
- }
56
- });
57
- ({
58
- /**
59
- * Button type
60
- */
61
- type: {
62
- default: ButtonType.button
63
- },
64
- /**
65
- * Default tag for the action
66
- */
67
- defaultTag: {
68
- default: ActionTag.button
69
- }
70
- });
71
- ({
72
- storageType: {
73
- default: StorageType.local
74
- }
75
- });
76
- const VvCardProps = {
77
- ...ModifiersProps,
78
- title: String
79
- };
80
- function useModifiers(prefix, modifiers, others) {
81
- return computed(() => {
82
- const toReturn = {
83
- [prefix]: true
84
- };
85
- const modifiersArray = typeof modifiers?.value === "string" ? modifiers.value.split(" ") : modifiers?.value;
86
- if (modifiersArray) {
87
- if (Array.isArray(modifiersArray)) {
88
- modifiersArray.forEach((modifier) => {
89
- if (modifier) {
90
- toReturn[`${prefix}--${modifier}`] = true;
91
- }
92
- });
93
- }
94
- }
95
- return toReturn;
96
- });
97
- }
98
- const _hoisted_1 = {
99
- key: 0,
100
- class: "vv-card__header"
101
- };
102
- const _hoisted_2 = {
103
- key: 1,
104
- class: "vv-card__content"
105
- };
106
- const _hoisted_3 = {
107
- key: 2,
108
- class: "vv-card__footer"
109
- };
110
- const __default__ = {
111
- name: "VvCard"
112
- };
113
- const _sfc_main = /* @__PURE__ */ defineComponent({
114
- ...__default__,
115
- props: VvCardProps,
116
- setup(__props) {
117
- const props = __props;
118
- const { modifiers } = toRefs(props);
119
- const bemCssClasses = useModifiers("vv-card", modifiers);
120
- return (_ctx, _cache) => {
121
- return openBlock(), createElementBlock(
122
- "article",
123
- {
124
- class: normalizeClass(unref(bemCssClasses))
125
- },
126
- [
127
- _ctx.$slots.header || _ctx.title ? (openBlock(), createElementBlock("header", _hoisted_1, [
128
- renderSlot(_ctx.$slots, "header", {}, () => [
129
- createTextVNode(
130
- toDisplayString(_ctx.title),
131
- 1
132
- /* TEXT */
133
- )
134
- ])
135
- ])) : createCommentVNode("v-if", true),
136
- renderSlot(_ctx.$slots, "default"),
137
- _ctx.$slots.content ? (openBlock(), createElementBlock("div", _hoisted_2, [
138
- renderSlot(_ctx.$slots, "content")
139
- ])) : createCommentVNode("v-if", true),
140
- _ctx.$slots.footer ? (openBlock(), createElementBlock("footer", _hoisted_3, [
141
- renderSlot(_ctx.$slots, "footer")
142
- ])) : createCommentVNode("v-if", true)
143
- ],
144
- 2
145
- /* CLASS */
146
- );
147
- };
148
- }
149
- });
150
- export {
151
- _sfc_main as default
152
- };
1
+ import{computed as t,defineComponent as e,toRefs as o,createElementBlock as r,openBlock as s,normalizeClass as a,unref as n,createCommentVNode as l,renderSlot as i,createTextVNode as u,toDisplayString as f}from"vue";var c=/* @__PURE__ */(t=>(t.local="local",t.session="session",t))(c||{}),v=/* @__PURE__ */(t=>(t.left="left",t.right="right",t.top="top",t.bottom="bottom",t))(v||{}),d=/* @__PURE__ */(t=>(t.before="before",t.after="after",t))(d||{}),b=/* @__PURE__ */(t=>(t.button="button",t.submit="submit",t.reset="reset",t))(b||{}),m=/* @__PURE__ */(t=>(t.nuxtLink="nuxt-link",t.routerLink="router-link",t.a="a",t.button="button",t))(m||{});const p={modifiers:{type:[String,Array],default:void 0}};d.before,v.bottom,b.button,m.button,c.local;const $={...p,title:String};const y={key:0,class:"vv-card__header"},h={key:1,class:"vv-card__content"},k={key:2,class:"vv-card__footer"},_=/* @__PURE__ */e({name:"VvCard",props:$,setup(e){const c=e,{modifiers:v}=o(c),d=function(e,o){return t(()=>{const t={[e]:!0},r="string"==typeof o?.value?o.value.split(" "):o?.value;return r&&Array.isArray(r)&&r.forEach(o=>{o&&(t[`${e}--${o}`]=!0)}),t})}("vv-card",v);return(t,e)=>(s(),r("article",{class:a(n(d))},[t.$slots.header||t.title?(s(),r("header",y,[i(t.$slots,"header",{},()=>[u(f(t.title),1)])])):l("v-if",!0),i(t.$slots,"default"),t.$slots.content?(s(),r("div",h,[i(t.$slots,"content")])):l("v-if",!0),t.$slots.footer?(s(),r("footer",k,[i(t.$slots,"footer")])):l("v-if",!0)],2))}});export{_ as default};
@@ -1,4 +1,4 @@
1
- declare const _default: __VLS_WithSlots<import("vue").DefineComponent<globalThis.ExtractPropTypes<{
1
+ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<globalThis.ExtractPropTypes<{
2
2
  title: StringConstructor;
3
3
  modifiers: {
4
4
  type: PropType<string | string[]>;
@@ -21,6 +21,7 @@ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<globalThis
21
21
  } & {
22
22
  footer?: (props: {}) => any;
23
23
  }>;
24
+ declare const _default: typeof __VLS_export;
24
25
  export default _default;
25
26
  type __VLS_WithSlots<T, S> = T & {
26
27
  new (): {