PageSourceSearch

https://shadcn-spinner.vercel.app/_next/static/chunks/app/page-35c946d51d1202b8.js

js shadcn-spinner.vercel.app collected 2026-10-03 07:41:23 UTC 16,155 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1931],{43212:(e,t,s)=>{Promise.resolve().then(s.bind(s,57799))},57799:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>B});var r=s(29004),a=s(73673),l=s(40672),i=s(334),n=s(62954),o=s(26532),d=s(21222),c=s(43639),m=s(12509),u=s(34300),f=s(28393),h=s(67016),p=s(62994);function x(){for(var e=arguments.length,t=Array(e),s=0;s<e;s++)t[s]=arguments[s];return(0,p.m6)((0,h.W)(t))}let g=(0,f.j)("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),b=a.forwardRef((e,t)=>{let{className:s,variant:a,size:l,asChild:i=!1,...n}=e,o=i?u.g7:"button";return(0,r.jsx)(o,{className:x(g({variant:a,size:l,className:s})),ref:t,...n})});b.displayName="Button";let v=e=>{let{code:t}=e,[s,l]=(0,a.useState)(!1),i=async()=>{try{l(!0);let e=t.replace(/```ts|```/g,"").trim();await navigator.clipboard.writeText(e),setTimeout(()=>{l(!1)},2e3)}catch(e){console.error("Erro ao copiar o c\xf3digo:",e)}};return(0,r.jsx)(b,{onClick:i,variant:"secondary",className:"bg-zinc-200/50 dark:bg-zinc-500/50 hover:dark:bg-zinc-500/30 hover:bg-zinc-200/30 rounded-lg px-2 h-8",children:s?(0,r.jsx)(m.Z,{className:"w-4 h-4 text-black dark:text-white hover:cursor-pointer"}):(0,r.jsx)(c.Z,{className:"w-4 h-4 text-black dark:text-white hover:cursor-pointer"})})};var j=s(36578);function C(e){let{code:t}=e,[s,l]=(0,a.useState)(""),{theme:i}=(0,j.F)();return(0,a.useEffect)(()=>{(async()=>{l(await w(t,i))})()},[t,i]),(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsx)("div",{className:"absolute top-3 right-4",children:(0,r.jsx)(v,{c
1ode:t})}),(0,r.jsx)("section",{className:"bg-zinc-100 dark:bg-zinc-800 p-4 rounded-b-xl selection:bg-white/20 overflow-auto max-h-96 rounded-xl",dangerouslySetInnerHTML:{__html:s}})]})}async function w(e,t){return String(await (0,l.l)().use(i.Z).use(n.Z).use(d.Z,{keepBackground:!1,theme:"light"===t?"github-light":"vesper"}).use(o.Z).process(e))}function N(e){let{...t}=e;return(0,r.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:t.width||24,height:t.height||24,viewBox:"0 0 24 24",fill:"none",...t,role:"img",color:"currentColor",children:[(0,r.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 2C12.5523 2 13 2.44772 13 3V6C13 6.55228 12.5523 7 12 7C11.4477 7 11 6.55228 11 6V3C11 2.44772 11.4477 2 12 2Z",fill:"currentColor",stroke:"currentColor",strokeWidth:t.strokeWidth||1}),(0,r.jsx)("path",{opacity:"0.4",fillRule:"evenodd",clipRule:"evenodd",d:"M12 17C12.5523 17 13 17.4477 13 18V21C13 21.5523 12.5523 22 12 22C11.4477 22 11 21.5523 11 21V18C11 17.4477 11.4477 17 12 17Z",fill:"currentColor",stroke:"currentColor",strokeWidth:t.strokeWidth||1}),(0,r.jsx)("path",{opacity:"0.4",fillRule:"evenodd",clipRule:"evenodd",d:"M17 12C17 11.4477 17.4477 11 18 11L21 11C21.5523 11 22 11.4477 22 12C22 12.5523 21.5523 13 21 13H18C17.4477 13 17 12.5523 17 12Z",fill:"currentColor",stroke:"currentColor",strokeWidth:t.strokeWidth||1}),(0,r.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2 12C2 11.4477 2.44772 11 3 11L6 11C6.55228 11 7 11.4477 7 12C7 12.5523 6.55228 13 6 13H3C2.44772 13 2 12.5523 2 12Z",fill:"currentColor",stroke:"currentColor",strokeWidth:t.strokeWidth||1}),(0,r.jsx)("path",{opacity:"0.4",fillRule:"evenodd",clipRule:"evenodd",d:"M19.0706 4.92961C19.4611 5.32014 19.4611 5.9533 19.0706 6.34383L16.9493 8.46515C16.5588 8.85567 15.9256 8.85567 15.5351 8.46515C15.1446 8.07462 15.1446 7.44146 15.5351 7.05093L17.6564 4.92961C18.0469 4.53909 18.6801 4.53909 19.0706 4.92961Z",fill:"currentColor",stroke:"currentColor",strokeWidth:t.strokeWidth||1}),(0,r.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.46515 15.5351C8.85567 15.9256 8.85567 16.5588 8.46515 16.9493L6.34383 19.0706C5.9533 19.4611 5.32014 19.4611 4.92961 19.0706C4.53909 18.6801 4.53909 18.0469 4.92961 17.6564L7.05093 15.5351C7.44146 15.1446 8.07462 15.1446 8.46515 15.5351Z",fill:"currentColor",stroke:"currentColor",strokeWidth:t.strokeWidth||1}),(0,r.jsx)("path",{opacity:"0.4",fillRule:"evenodd",clipRule:"evenodd",d:"M15.5351 15.5351C15.9256 15.1446 16.5588 15.1446 16.9493 15.5351L19.0706 17.6564C19.4611 18.0469 19.4611 18.6801 19.0706 19.0706C18.6801 19.4611 18.0469 19.4611 17.6564 19.0706L15.5351 16.9493C15.1446 16.5588 15.1446 15.9256 15.5351 15.5351Z",fill:"currentColor",stroke:"currentColor",strokeWidth:t.strokeWidth||1}),(0,r.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.92961 4.92961C5.32014 4.53909 5.9533 4.53909 6.34383 4.92961L8.46515 7.05093C8.85567 7.44146 8.85567 8.07462 8.46515 8.46515C8.07462 8.85567 7.44146 8.85567 7.05093 8.46515L4.92961 6.34383C4.53909 5.9533 4.53909 5.32014 4.92961 4.92961Z",fill:"currentColor",stroke:"currentColor",strokeWidth:t.strokeWidth||1})]})}function k(e){let{...t}=e;return(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:t.width||24,height:t.height||24,viewBox:"0 0 24 24",fill:"none",...t,color:"currentColor",children:(0,r.jsx)("path",{d:"M9.94118 17.8804C9.94118 17.5169 10.0494 17.2011 10.2238 16.9157C10.3434 16.7199 10.2615 16.4422 10.0453 16.3808C8.25526 15.8726 7 15.0555 7 12.3451C7 11.6404 7.22356 10.9779 7.61654 10.4013C7.71414 10.2581 7.76181 10.193 7.77491 10.1215C7.78806 10.0497 7.76638 9.97161 7.72543 9.80167C7.58167 9.20515 7.57017 8.57672 7.73081 7.99051C7.78361 7.79782 7.8968 7.68543 8.10166 7.70713C8.3674 7.73528 8.82753 7.86109 9.50999 8.30139C9.77813 8.47438 9.9122 8.56088 10.0303 8.58023C10.1484 8.59958 10.3062 8.55906 10.622 8.478C11.0537 8.36716 11.4986 8.30765 12 8.30765C12.5014 8.30765 12.9463 8.36715 13.378 8.478C13.6938 8.55905 13.8516 8.59958 13.9697 8.58023C14.0878 8.56088 14.2219 8.47439 14.49 8.3014C15.1725 7.8611 15.6326 7.73528 15.8983 7.70713C16.1032 7.68543 16.2164 7.79782 16.2692 7.99051C16.4298 8.57672 16.4183 9.20514 16.2746 9.80166C16.2336 9.9716 16.2119 10.0497 16.2251 10.1215C16.2382 10.1929 16.2859 10.2581 16.3834 10.4013C16.7764 10.9779 17 11.6404 17 12.3451C17 15.0555 15.7447 15.8726 13.9547 16.3808C13.7385 16.4422 13.6566 16.7199 13.7762 16.9157C13.9506 17.2011 14.0588 17.5169 14.0588 17.8804V22.6514C19.011 21.6909 22.7
15 17.3313 22.75 12.0984C22.75 6.16133 17.9371 1.34839 12 1.34839C6.06294 1.34839 1.25 6.16133 1.25 12.0984C1.25 17.3313 4.98901 21.6909 9.94118 22.6514V19.8518C9.88484 19.8452 9.81816 19.8354 9.74225 19.821C9.52615 19.7799 9.23571 19.7012 8.89714 19.5511C8.21489 19.2485 7.36263 18.6669 6.53685 17.5663C6.28826 17.2349 6.35533 16.7648 6.68665 16.5162C7.01798 16.2676 7.48809 16.3347 7.73668 16.666C8.4109 17.5647 9.06058 17.9827 9.50527 18.1799C9.6822 18.2583 9.83089 18.3037 9.94118 18.3299V17.8804Z",fill:"currentColor"})})}var y=s(71093),z=s(19357),R=s(92355),Z=s(58696),_=s(62190);let W=R.fC,L=R.xz;R.ZA,R.Uv,R.Tr,R.Ee,a.forwardRef((e,t)=>{let{className:s,inset:a,children:l,...i}=e;return(0,r.jsxs)(R.fF,{ref:t,className:x("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",a&&"pl-8",s),...i,children:[l,(0,r.jsx)(Z.Z,{className:"ml-auto h-4 w-4"})]})}).displayName=R.fF.displayName,a.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,r.jsx)(R.tu,{ref:t,className:x("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",s),...a})}).displayName=R.tu.displayName;let V=a.forwardRef((e,t)=>{let{className:s,sideOffset:a=4,...l}=e;return(0,r.jsx)(R.Uv,{children:(0,r.jsx)(R.VY,{ref:t,sideOffset:a,className:x("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",s),...l})})});V.displayName=R.VY.displayName;let M=a.forwardRef((e,t)=>{let{className:s,inset:a,...l}=e;return(0,r.jsx)(R.ck,{ref:t,className:x("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",a&&"pl-8",s),...l})});function S(){let{setTheme:e}=(0,j.F)();return(0,r.jsxs)(W,{children:[(0,r.jsx)(L,{asChild:!0,children:(0,r.jsxs)(b,{variant:"outline",size:"sm",className:"px-2 h-6 rounded-lg bg-zinc-50 dark:bg-zinc-900",children:[(0,r.jsx)(y.Z,{className:"h-[1.2rem] w-[1.2rem] rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),(0,r.jsx)(z.Z,{className:"absolute h-[1.2rem] w-[1.2rem] rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100"}),(0,r.jsx)("span",{className:"sr-only",children:"Toggle theme"})]})}),(0,r.jsxs)(V,{align:"end",className:"bg-zinc-100 dark:bg-zinc-800",children:[(0,r.jsx)(M,{onClick:()=>e("light"),children:"Light"}),(0,r.jsx)(M,{onClick:()=>e("dark"),children:"Dark"})]})]})}M.displayName=R.ck.displayName,a.forwardRef((e,t)=>{let{className:s,children:a,checked:l,...i}=e;return(0,r.jsxs)(R.oC,{ref:t,className:x("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",s),checked:l,...i,children:[(0,r.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,r.jsx)(R.wU,{children:(0,r.jsx)(m.Z,{className:"h-4 w-4"})})}),a]})}).displayName=R.oC.displayName,a.forwardRef((e,t)=>{let{className:s,children:a,...l}=e;return(0,r.jsxs)(R.Rk,{ref:t,className:x("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",s),...l,children:[(0,r.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,r.jsx)(R.wU,{children:(0,r.jsx)(_.Z,{className:"h-2 w-2 fill-current"})})}),a]})}).displayName=R.Rk.displayName,a.forwardRef((e,t)=>
1{let{className:s,inset:a,...l}=e;return(0,r.jsx)(R.__,{ref:t,className:x("px-2 py-1.5 text-sm font-semibold",a&&"pl-8",s),...l})}).displayName=R.__.displayName,a.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,r.jsx)(R.Z0,{ref:t,className:x("-mx-1 my-1 h-px bg-muted",s),...a})}).displayName=R.Z0.displayName;let T=(0,f.j)("relative block opacity-[0.65]",{variants:{size:{sm:"w-4 h-4",md:"w-6 h-6",lg:"w-8 h-8"}},defaultVariants:{size:"sm"}}),A=a.forwardRef((e,t)=>{let{className:s,size:l,loading:i=!0,asChild:n=!1,...o}=e,d=n?u.g7:"span",[c,m]=a.useMemo(()=>[(null==s?void 0:s.match(/(?:dark:bg-|bg-)[a-zA-Z0-9-]+/g))||[],null==s?void 0:s.replace(/(?:dark:bg-|bg-)[a-zA-Z0-9-]+/g,"").trim()],[s]);return i?(0,r.jsx)(d,{className:x(T({size:l,className:m})),ref:t,...o,children:Array.from({length:8}).map((e,t)=>(0,r.jsx)("span",{className:"absolute top-0 left-1/2 w-[12.5%] h-full animate-spinner-leaf-fade",style:{transform:"rotate(".concat(45*t,"deg)"),animationDelay:"".concat(-(100*(7-t)),"ms")},children:(0,r.jsx)("span",{className:x("block w-full h-[30%] rounded-full",c)})},t))}):null});A.displayName="Spinner";var E=s(31684),U=s(82002);function B(){let[e,t]=(0,a.useState)(!0);return((0,a.useEffect)(()=>{let e=setTimeout(()=>{t(!1)},500);return()=>clearTimeout(e)},[]),e)?(0,r.jsx)("div",{className:"flex items-center justify-center w-full h-screen",children:(0,r.jsx)(A,{size:"sm",className:"bg-black dark:bg-white"})}):(0,r.jsxs)("main",{className:"flex flex-col items-center justify-center w-full p-6",children:[(0,r.jsxs)("div",{className:"flex flex-col w-full sm:w-96 lg:w-[650px] gap-8 mt-20",children:[(0,r.jsxs)("div",{className:"flex flex-row justify-between",children:[(0,r.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,r.jsx)("div",{className:"flex flex-row items-start space-x-1 opacity-70",children:(0,r.jsx)("span",{className:"px-2 text-sm bg-zinc-100/60 rounded-lg dark:text-black",children:"New"})}),(0,r.jsxs)("div",{className:"flex items-center space-x-1",children:[(0,r.jsx)(N,{width:30,height:30,color:"fill-black dark:fill-white"}),(0,r.jsx)("h2",{className:"text-3xl font-semibold",children:"Shadcn Spinner"})]}),(0,r.jsx)("p",{className:"text-lg opacity-70 leading-none",children:"Inspired by the Radix UI."})]}),(0,r.jsxs)("div",{className:"flex flex-col items-end justify-end w-72 gap-4",children:[(0,r.jsx)(E.default,{href:"https://x.com/alipiopereira7/status/1849664054974935343",target:"_blank",className:"flex flex-row items-center px-3 py-1.5 bg-zinc-100 dark:bg-zinc-700 rounded-full text-sm font-medium opacity-70",children:"View Tweet"}),(0,r.jsxs)(E.default,{href:"https://github.com/allipiopereira/shadcn-spinner",target:"_blank",className:"flex flex-row items-center px-3 py-1.5 hover:bg-zinc-100 hover:dark:bg-zinc-700 rounded-full text-sm font-medium opacity-70",children:[(0,r.jsx)(k,{width:20,height:20,className:"mr-1",color:"fill-black dark:fill-white"}),"allipiopereira/shadcn-spinner"]})]})]}),(0,r.jsxs)("div",{className:"flex flex-row items-center justify-center gap-7 p-4 bg-zinc-200/50 dark:bg-zinc-950/40 border rounded-xl",children:[(0,r.jsx)(A,{size:"sm",className:"bg-green-500"}),(0,r.jsx)(A,{size:"md",className:"bg-blue-500"}),(0,r.jsx)(A,{size:"lg",className:"bg-red-500"}),(0,r.jsx)(A,{className:"w-10 h-10 bg-black dark:bg-white mr-0.5"}),(0,r.jsx)(A,{size:"lg",className:"bg-red-500"}),(0,r.jsx)(A,{size:"md",className:"bg-blue-500"}),(0,r.jsx)(A,{size:"sm",className:"bg-green-500"})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("h2",{className:"text-lg font-semibold",children:"Step 1"}),(0,r.jsx)("h2",{className:"text-sm font-medium opacity-70 mb-2",children:"Adding the component to your project"}),(0,r.jsx)(C,{code:"\n```\nnpx shadcn add https://shadcn-spinner.vercel.app/api/r/spinner\n```\n"})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("h2",{className:"text-lg font-semibold",children:"Step 2"}),(0,r.jsx)("h2",{className:"text-sm font-medium opacity-70 mb-2",children:"Now just use it."}),(0,r.jsx)(C,{code:'\n```ts\n<Spinner size="sm" className="bg-black dark:bg-white" />\n```\n'})]})]}),(0,r.jsxs)("footer",{className:"flex flex-row items-center mt-20 gap-1",children:["Created by",(0,r.jsxs)(E.default,{href:"https://github.com/allipiopereira",target:"_blank",className:"flex flex-row items-center gap-1 px-2 py-0.5 hover:bg-zinc-100 hover:dark:bg-zinc-700 rounded-full",children:[(0,r.jsx)(U.default,{src:"https://github.com/allipiopereira.png",alt:"Al\xedpio Pereira",width:22,height:22,className:"rounded-full"}),(0,r.jsx)("span",{className:"text-sm font-medium",children:"@allpiopereira"})]}),(0,r.jsx)("span",{className:"opacity-50 mr-2",children:"|"}),"Theme ",(0,r.jsx)(S,{})]})]})}}},e=>{var t=t=>e(e.s=t);e.O(0,[5088,4723,4700,1744],()=>t(43212)),_N_E=e.O()}]);

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.