"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),h=require("../VisuallyHidden-AoRh4WRK.js"),r=require("../index-DnaHaH_0.js"),S=r.cva([],{variants:{isAnimated:{true:["[mask-image:linear-gradient(90deg,#000_40%,rgba(0,0,0,.3)_60%,#000_100%)]","[mask-size:200%_100%]","animate-standalone-shimmer motion-reduce:animate-none!"],false:[]}},defaultVariants:{isAnimated:!0}}),p=({isAnimated:e=!0,label:t,className:a,children:n,ref:s,...g})=>l.jsxs("div",{ref:s,"data-spark-component":"skeleton",role:"presentation",className:S({isAnimated:e,className:a}),...g,children:[n,t&&l.jsx(h.VisuallyHidden,{children:t})]});p.displayName="Skeleton";const x=r.cva(["bg-neutral/dim-4","min-h-lg min-w-lg"],{variants:{shape:{line:["w-full [&:last-child:not(:first-child)]:w-5/6","rounded-lg"],rectangle:["rounded-sm"],circle:["flex-none","rounded-full"]}},defaultVariants:{shape:"rectangle"}}),y=r.cva(["flex flex-col","w-full"],{variants:{gap:{sm:"gap-sm",md:"gap-md",lg:"gap-lg",xl:"gap-xl","2xl":"gap-2xl","3xl":"gap-3xl"}},defaultVariants:{gap:"md"}}),i=e=>typeof e=="number"?`${e}px`:e,c=({shape:e,className:t,ref:a,...n})=>l.jsx("div",{ref:a,"aria-hidden":"true",className:x({shape:e,className:t}),...n}),o=({width:e="100%",height:t,...a})=>l.jsx(c,{style:{"--skeleton-rect-width":i(e),"--skeleton-rect-height":i(t)},className:"h-(--skeleton-rect-height) w-(--skeleton-rect-width)",...a,shape:"rectangle","data-shape":"rectangle"}),d=({size:e,...t})=>l.jsx(c,{style:{"--skeleton-circle-size":i(e)},className:"size-(--skeleton-circle-size)",...t,shape:"circle","data-shape":"circle"}),m=({lines:e=1,gap:t,className:a,...n})=>{const s=t||"md";return l.jsx("div",{className:y({gap:s,className:a}),"aria-hidden":"true",children:[...new Array(e)].map((g,k)=>l.jsx(c,{...n,shape:"line","data-shape":"line"},`line_${k}`))})};o.displayName="Skeleton.Rectangle";d.displayName="Skeleton.Circle";m.displayName="Skeleton.Line";const u=Object.assign(p,{Circle:d,Line:m,Rectangle:o});u.displayName="Skeleton";m.displayName="Skeleton.Line";d.displayName="Skeleton.Circle";o.displayName="Skeleton.Rectangle";exports.Skeleton=u;
//# sourceMappingURL=index.js.map
