@volverjs/ui-vue
Version:
@volverjs/ui-vue is a lightweight Vue 3 component library to accompany @volverjs/style.
2 lines (1 loc) • 1.15 kB
JavaScript
import{computed as t,defineComponent as e,toRefs as o,createElementBlock as r,openBlock as n,normalizeClass as s,unref as u,renderSlot as a,createTextVNode as i,toDisplayString as l}from"vue";var b=/* @__PURE__ */(t=>(t.local="local",t.session="session",t))(b||{}),f=/* @__PURE__ */(t=>(t.left="left",t.right="right",t.top="top",t.bottom="bottom",t))(f||{}),m=/* @__PURE__ */(t=>(t.before="before",t.after="after",t))(m||{}),p=/* @__PURE__ */(t=>(t.button="button",t.submit="submit",t.reset="reset",t))(p||{}),v=/* @__PURE__ */(t=>(t.nuxtLink="nuxt-link",t.routerLink="router-link",t.a="a",t.button="button",t))(v||{});const c={modifiers:{type:[String,Array],default:void 0}};m.before,f.bottom,p.button,v.button,b.local;const d=/* @__PURE__ */e({name:"VvBadge",props:{...c,value:[String,Number]},setup(e){const b=e,{modifiers:f}=o(b),m=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-badge",f);return(t,e)=>(n(),r("span",{class:s(u(m))},[a(t.$slots,"default",{},()=>[i(l(t.value),1)])],2))}});export{d as default};