1import{_ as i,c as a,l,n as d,m as n,e as c,o}from"./C_dDoqqV.js";const g={success:"background-elevation-4 badge-success-foreground",greyscale:"background-elevation-4 badge-greyscale-foreground",error:"background-elevation-4 badge-error-foreground",warning:"background-elevation-4 badge-warning-foreground",informative:"background-elevation-4 badge-informative-foreground",primary:"background-elevation-4 badge-primary-foreground",secondary:"background-elevation-4 badge-secondary-foreground",tertiary:"background-elevation-4 badge-tertiary-foreground"},u={success:"badge-reverted-success-background badge-reverted-success-foreground",greyscale:"badge-reverted-greyscale-background badge-reverted-greyscale-foreground",error:"badge-reverted-error-background badge-reverted-error-foreground",warning:"badge-reverted-warning-background badge-reverted-warning-foreground",informative:"badge-reverted-informative-background badge-reverted-informative-foreground",primary:"badge-reverted-primary-background badge-reverted-primary-foreground",secondary:"badge-reverted-secondary-background badge-reverted-secondary-foreground",tertiary:"badge-reverted-tertiary-background badge-reverted-tertiary-foreground"},m={none:"rounded-sm",pill:"rounded-pill",top:"rounded-t-sm",bottom:"rounded-b-sm","top-left":"rounded-tl-sm rounded-br-sm"},f=["xs","sm","md","lg","xl"],b=["greyscale","success","error","warning","informative","primary","secondary","tertiary"],p=["none","top","bottom","top-left","pill"],y=["default","reverted"],v=["basic","dot","icon"],x={name:"Badge",props:{size:{type:String,validator:e=>f.includes(e),default:"md"},color:{type:String,validator:e=>b.includes(e),default:"greyscale"},corner:{type:String,validator:e=>p.includes(e),default:"none"},theme:{type:String,validator:e=>y.includes(e),default:"default"},type:{type:String,validator:e=>v.includes(e),default:"basic"}},computed:{badgeClass(){return this.color&&this.theme==="default"?g[this.color]:""},revertedBadgeClass(){return this.theme==="reverted"?u[this.color]:""},roundedClass(){if(this.corner==="top-left")switch(this.size){case"sm":return"rounded-tl-sm rounded-br-sm";case"md":return"rounded-tl-md rounded-br-sm";case"lg":return"rounded-tl-md rounded-br-sm";default:return"rounded-tl-sm rounded-br-sm"}return m[this.corner]},iconWrapperClass(){return`flex items-center justify-center ${this.theme==="reverted"?"text-foreground-on-dark":"text-foreground-1"}`},iconWrapperStyle(){const s={xs:10,sm:12,md:16,lg:18,xl:20}[this.size]||16;return{width:`${s}px`,height:`${s}px`}},paddingClass(){return this.size==="xs"?"py-3xs px-2xs":"py-3xs px-xs"},gapClass(){return this.size==="xs"?"gap-3xs":"gap-2xs"}}};function h(e,s,t,k,C,r){return o(),a("span",{class:d(["flex items-center justify-center font-bold w-fit flex-shrink-0",[r.badgeClass,r.roundedClass,r.revertedBadgeClass,r.paddingClass,r.gapClass,{"text-3xs leading-120":t.size==="xs","text-2xs leading-120":t.size==="sm","text-xs leading-150":t.size==="md","text-sm leading-150":t.size==="lg","text-md leading-150":t.size==="xl"}]])},[e.$slots.icon&&t.type==="icon"?(o(),a("span",{key:0,class:d(r.iconWrapperClass),style:l(r.iconWrapperStyle)},[n(e.$slots,"icon")],6)):c("",!0),n(e.$slots,"default")],2)}const _=Object.assign(i(x,[["render",h]]),{__name:"Badge"});export{_ as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.