1 line
5.7 KiB
JavaScript
1 line
5.7 KiB
JavaScript
import{A as e,Jt as t,Qn as n,St as r,V as i,Y as a,ht as o,kn as s,tt as c,x as l,y as u}from"./PageHeader.js";import{_ as d,b as f,f as p,g as m}from"./api.js";var h={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":2,"stroke-linecap":`round`,"stroke-linejoin":`round`},g=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim();function _(e){return e!=null}function v(e,t={}){let n=t.attributeNames??{},r=e=>n[e]??e,i=e.size??e.width??h.width,a=e.size??e.height??h.height,o=e.aliases?.filter(e=>typeof e==`string`&&e.trim()!==``).map(e=>`lucide-${e}`)??[],s=[...e.name?[`lucide-${e.name}`]:[],...o],c=t.className?.split(` `).filter(Boolean)??[],l=t.includeDefaultClasses===!1?g(...c):g(`lucide`,...s,...c),u=t.absoluteStrokeWidth?Number(t.strokeWidth??h[`stroke-width`])*Number(e.size??e.width??h.width)/Number(t.size??t.width??h.width):t.strokeWidth??h[`stroke-width`];return[`svg`,{...Object.entries(h).reduce((e,[t,n])=>(e[r(t)]=n,e),{}),...`color`in t&&t.color&&{[r(`stroke`)]:t.color},...`size`in t&&_(t.size)&&{[r(`width`)]:t.size,[r(`height`)]:t.size},...`width`in t&&_(t.width)&&{[r(`width`)]:t.width},...`height`in t&&_(t.height)&&{[r(`height`)]:t.height},[r(`stroke-width`)]:u,...l&&{[r(`class`)]:l},[r(`viewBox`)]:`0 0 ${i} ${a}`,...t.hasA11yProp===!1?{[r(`aria-hidden`)]:`true`}:{},...`attributes`in t&&t.attributes},e.node.map(e=>{let[n,i,a]=e,o=t.nonScalingStroke?{[r(`vector-effect`)]:`non-scaling-stroke`,...i}:i;return a?[n,o,a]:[n,o]})]}var y=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},b=e=>e===``,x=e=>e?.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),S=Symbol(`lucide-icons`);function C(){return a(S,{})}var w=({name:e,iconNode:t,"icon-node":n,icon:r={name:e&&x(e),node:t??n??[],size:24,aliases:[]},absoluteStrokeWidth:a,"absolute-stroke-width":o,nonScalingStroke:s,"non-scaling-stroke":c,strokeWidth:l,"stroke-width":u,size:d,width:f=d,height:p=d,color:m,...h},{slots:g})=>{let{size:_,color:S,strokeWidth:w=2,absoluteStrokeWidth:T=!1,nonScalingStroke:E=!1,class:D=``}=C(),O=b(a)||b(o)||a===!0||o===!0||T===!0,k=b(s)||b(c)||s===!0||c===!0||E===!0;delete h.class;let A=g.default?.(),[,j,M=[]]=v(r,{color:m??S,width:f??d??_,height:p??d??_,strokeWidth:l??u??w,absoluteStrokeWidth:O,nonScalingStroke:k,className:D,hasA11yProp:A!=null&&A.length>0||y(h),attributes:h});return i(`svg`,j,[...M.map(([e,t])=>i(e,t)),...A??[]])};function T(e,t=[]){let n=typeof e==`string`?{name:e,node:t}:e;return(e,{slots:t})=>i(w,{...e,icon:n},t.default?{default:t.default}:void 0)}var E=T({name:`chevron-down`,size:24,node:[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]}),D=e({__name:`Badge`,props:{asChild:{type:Boolean},as:{},variant:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){let n=e,i=p(n,`class`);return(a,l)=>(o(),u(s(d),c({"data-slot":`badge`,"data-variant":e.variant,class:s(m)(s(O)({variant:e.variant}),n.class)},s(i)),{default:t(()=>[r(a.$slots,`default`)]),_:3},16,[`data-variant`,`class`]))}}),O=f(`h-5 gap-1 rounded-sm border border-transparent px-2 py-0.5 text-xs font-medium transition-all has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&>svg]:size-3! group/badge inline-flex w-fit shrink-0 items-center justify-center overflow-hidden whitespace-nowrap focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none`,{variants:{variant:{default:`bg-primary text-primary-foreground [a]:hover:bg-primary/80`,secondary:`bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80`,destructive:`bg-destructive/10 [a]:hover:bg-destructive/20 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 text-destructive dark:bg-destructive/20`,outline:`border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground`,ghost:`hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50`,link:`text-primary underline-offset-4 hover:underline`,ok:`bg-ok-soft text-ok`,warn:`bg-warn-soft text-warn`,danger:`bg-danger-soft text-danger`,info:`bg-info-soft text-info`,idle:`bg-idle-soft text-idle`}},defaultVariants:{variant:`default`}}),k=e({__name:`Alert`,props:{class:{type:[Boolean,null,String,Object,Array]},variant:{}},setup(e){let t=e;return(i,a)=>(o(),l(`div`,{"data-slot":`alert`,class:n(s(m)(s(M)({variant:e.variant}),t.class)),role:`alert`},[r(i.$slots,`default`)],2))}}),A=e({__name:`AlertDescription`,props:{class:{type:[Boolean,null,String,Object,Array]}},setup(e){let t=e;return(e,i)=>(o(),l(`div`,{"data-slot":`alert-description`,class:n(s(m)(`text-muted-foreground text-sm text-balance md:text-pretty [&_p:not(:last-child)]:mb-4 [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground`,t.class))},[r(e.$slots,`default`)],2))}}),j=e({__name:`AlertTitle`,props:{class:{type:[Boolean,null,String,Object,Array]}},setup(e){let t=e;return(e,i)=>(o(),l(`div`,{"data-slot":`alert-title`,class:n(s(m)(`font-medium group-has-[>svg]/alert:col-start-2 cn-font-heading [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground`,t.class))},[r(e.$slots,`default`)],2))}}),M=f(`grid gap-0.5 rounded-lg border px-2.5 py-2 text-left text-sm has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pr-18 has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-2 *:[svg]:row-span-2 *:[svg]:translate-y-0.5 *:[svg]:text-current *:[svg:not([class*=size-])]:size-4 group/alert relative w-full`,{variants:{variant:{default:`bg-card text-card-foreground`,destructive:`text-destructive bg-card *:data-[slot=alert-description]:text-destructive/90 *:[svg]:text-current`}},defaultVariants:{variant:`default`}});export{E as a,D as i,A as n,T as o,k as r,j as t}; |