PageSourceSearch

https://domdhi.com/assets/button-DrB63Wrb.js

js domdhi.com collected 2026-10-02 01:27:38 UTC 13,117 bytes, 1 lines download raw bytes

1import{H as e,W as t,i as n}from"./chunk-6CSD65Y2-D6zLy3dp.js";import{t as r}from"./jsx-runtime-BGLTrfZy.js";import{t as i}from"./utils-UvpNVb9C.js";import{t as a}from"./dist-k5UaVEGE.js";var o=t(e(),1);function s(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function c(...e){return t=>{let n=!1,r=e.map(e=>{let r=s(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():s(e[t],null)}}}}function l(...e){return o.useCallback(c(...e),e)}function u(e){let t=o.forwardRef((t,n)=>{let{children:r,...i}=t,a=null,s=!1,c=[];v(r)&&typeof S==`function`&&(r=S(r._payload)),o.Children.forEach(r,e=>{if(g(e)){s=!0;let t=e,n=`child`in t.props?t.props.child:t.props.children;v(n)&&typeof S==`function`&&(n=S(n._payload)),a=p(t,n),c.push(a?.props?.children)}else c.push(e)}),a?a=o.cloneElement(a,void 0,c):!s&&o.Children.count(r)===1&&o.isValidElement(r)&&(a=r);let u=a?h(a):void 0,d=l(n,u);if(!a){if(r||r===0)throw Error(s?x(e):b(e));return r}let f=m(i,a.props??{});return a.type!==o.Fragment&&(f.ref=n?d:u),o.cloneElement(a,f)});return t.displayName=`${e}.Slot`,t}var d=u(`Slot`),f=Symbol.for(`radix.slottable`),p=(e,t)=>{if(`child`in e.props){let t=e.props.child;return o.isValidElement(t)?o.cloneElement(t,void 0,e.props.children(t.props.children)):null}return o.isValidElement(t)?t:null};function m(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function h(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function g(e){return o.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===f}var _=Symbol.for(`react.lazy`);function v(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===_&&`_payload`in e&&y(e._payload)}function y(e){return typeof e==`object`&&!!e&&`then`in e}var b=e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,x=e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,S=o.use,C=r(),w=a(`inline-flex items-center justify-center font-bold font-mono uppercase tracking-[0.07em] transition-button disabled:opacity-50 disabled:cursor-not-allowed`,{variants:{variant:{brutal:`border-2 hover:translate-x-[-2px] hover:translate-y-[-2px] active:translate-x-[1px] active:translate-y-[1px]`,hero:`bg-transparent border-2 hover:translate-x-[-2px] hover:translate-y-[-2px] active:translate-x-[1px] active:translate-y-[1px]`,outline:`bg-transparent border-2 border-white/20 hover:translate-x-[-2px] hover:translate-y-[-2px] active:translate-x-[1px] active:translate-y-[1px]`,ghost:`bg-transparent border-0`,fill:`bg-transparent border`,nav:`bg-transparent border border-transparent`,chip:`bg-transparent border transition-colors`},accent:{amethyst:``,amber:``,emerald:``,cyan:``,rose:``,violet:``,white:``,magenta:``},size:{default:`px-6 py-3 text-sm`,sm:`px-4 py-2 text-xs`,lg:`px-8 py-4 text-base`},active:{true:``,false:``}},compoundVariants:[{variant:`brutal`,accent:`amethyst`,className:`bg-amethyst/60 text-black border-white/[0.08] shadow-brutal-amethyst hover:border-amethyst hover:shadow-brutal-amethyst active:shadow-brutal-amethyst`},{variant:`brutal`,accent:`amber`,className:`bg-amber/60 text-black border-white/[0.08] shadow-brutal-amber hover:border-amber hover:shadow-brutal-amber active:shadow-brutal-amber`},{variant:`brutal`,accent:`emerald`,className:`bg-emerald/60 text-black border-white/[0.08] shadow-brutal-emerald hover:border-emerald hover:shadow-brutal-emerald active:shadow-brutal-emerald`},{variant:`brutal`,accent:`cyan`,className:`bg-cyan/60 text-black border-white/[0.08] shadow-brutal-cyan hover:border-cyan hover:shadow-brutal-cyan active:shadow-brutal-cyan`},{variant:`brutal`,accent:`rose`,className:`bg-rose/60 text-black border-white/[0.08] shadow-brutal-rose hover:border-rose hover:shadow-brutal-rose active:shadow-brutal-rose`},{variant:`brutal`,accent:`violet`,className:`bg-violet/60 text-black border-white/[0.08] shadow-brutal-violet hover:border-violet hover:shadow-brutal-violet active:shadow-brutal-violet`},{variant:`brutal`,accent:`white`,className:`bg-white/60 text-black border-white/[0.08] shadow-soft-white hover:border-white hover:shadow-soft-white active:shadow-soft-white`},{variant:`brutal`,accent:`magenta`,className:`bg-magenta/60 text-black border-white/[0.08] shadow-brutal-magenta hover:border-magenta hover:shadow-brutal-magenta active:shadow-brutal-magenta`},{variant:`hero`,accent:`amethyst`,className:`text-white border-amethyst shadow-soft-amethyst hover:text-amethyst hover:shadow-soft-amethyst hover:text-glow-amethyst active:shadow-soft-amethyst`},{variant:`hero`,accent:`amber`,className:`text-white border-amber shadow-soft-amber hover:text-amber hover:shadow-soft-amber hover:text-glow-amber active:shadow-soft-amber`},{variant:`hero`,accent:`emerald`,className:`text-white border-emerald shadow-soft-emerald hover:text-emerald hover:shadow-soft-emerald hover:text-glow-emerald active:shadow-soft-emerald`},{variant:`hero`,accent:`cyan`,className:`text-white border-cyan shadow-soft-cyan hover:text-cyan hover:shadow-soft-cyan hover:text-glow-cyan active:shadow-soft-cyan`},{variant:`hero`,accent:`rose`,className:`text-white border-rose shadow-soft-rose hover:text-rose hover:shadow-soft-rose hover:text-glow-rose active:shadow-soft-rose`},{variant:`hero`,accent:`violet`,className:`text-white border-violet shadow-soft-violet hover:text-violet hover:shadow-soft-violet hover:text-glow-violet active:shadow-soft-violet`},{variant:`hero`,accent:`white`,className:`text-white border-white shadow-soft-white hover:text-white hover:shadow-soft-white hover:text-glow-white active:shadow-soft-white`},{variant:`hero`,accent:`magenta`,className:`text-white border-magenta shadow-soft-magenta hover:text-magenta hover:shadow-soft-magenta hover:text-glow-magenta active:shadow-soft-magenta`},{variant:`outline`,accent:`amethyst`,className:`text-white shadow-soft-amethyst hover:border-amethyst hover:text-amethyst hover:shadow-soft-amethyst hover:text-glow-amethyst active:shadow-soft-amethyst`},{variant:`outline`,accent:`amber`,className:`text-white shadow-soft-amber hover:border-amber hover:text-amber hover:shadow-soft-amber hover:text-glow-amber active:shadow-soft-amber`},{variant:`outline`,accent:`emerald`,className:`text-white shadow-soft-emerald hover:border-emerald hover:text-emerald hover:shadow-soft-emerald hover:text-glow-emerald active:shadow-soft-emerald`},{variant:`outline`,accent:`cyan`,className:`text-white shadow-soft-cyan hover:border-cyan hover:text-cyan hover:shadow-soft-cyan hover:text-glow-cyan active:shadow-soft-cyan`},{variant:`outline`,accent:`rose`,className:`text-white shadow-soft-rose hover:border-rose hover:text-rose hover:shadow-soft-rose hover:text-glow-rose active:shadow-soft-rose`},{variant:`outline`,accent:`violet`,className:`text-white shadow-soft-violet hover:border-violet hover:text-violet hover:shadow-soft-violet hover:text-glow-violet active:shadow-soft-violet`},{variant:`outline`,accent:`white`,className:`text-white shadow-soft-white hover:border-white hover:text-white hover:shadow-soft-white hover:text-glow-white active:shadow-soft-white`},{variant:`outline`,accent:`magenta`,className:`text-white shadow-soft-magenta hover:border-magenta hover:text-magenta hover:shadow-soft-magenta hover:text-glow-magenta active:shadow-soft-magenta`},{variant:`ghost`,accent:`amethyst`,className:`text-amethyst hover:bg-amethyst/10`},{variant:`ghost`,accent:`amber`,className:`text-amber hover:bg-amber/10`},{variant:`ghost`,accent:`emerald`,className:`text-emerald hover:bg-emerald/10`},{variant:`ghost`,accent:`cyan`,className:`text-cyan hover:bg-cyan/10`},{variant:`ghost`,accent:`rose`,className:`text-rose hover:bg-rose/10`},{variant:`ghost`,accent:`violet`,className:`text-violet hover:bg-violet/10`},{variant:`ghost`,accent:`white`,className:`text-white hover:bg-white/10`},{variant:`ghost`,accent:`magenta`,className:`text-magenta hover:bg-magenta/10`},{variant:`fill`,accent:`amethyst`,className:`text-amethyst border-amethyst/40 hover:bg-amethyst hover:border-amethyst hover:text-black`},{variant:`fill`,accent:`amber`,className:`text-amber border-amber/40 hover:bg-amber hover:border-amber hover:text-black`},{variant:`fill`,accent:`emerald`,className:`text-emerald border-emerald/40 hover:bg-emerald hover:border-emerald hover:text-black`},{variant:`fill`,accent:`cyan`,className:`text-cyan border-cyan/40 hover:bg-cyan hover:border-cyan hover:text-black`},{variant:`fill`,accent:`rose`,className:`text-rose border-rose/40 hover:bg-rose hover:border-rose hover:text-white`},{variant:`fill`,accent:`violet`,className:`text-violet border-violet/40 hover:bg-violet hover:border-violet hover:text-white`},{variant:`fill`,accent:`white`,className:`text-white border-white/40 hover:bg-white hover:border-white hover:text-black`},{variant:`fill`,accent:`magenta`,className:`text-magenta border-magenta/40 hover:bg-magenta hover:border-magenta hover:text-black`},{variant:`nav`,accent:`amethyst`,className:`text-zinc-400 hover:text-amethyst hover:border-white/20 hover:text-glow-amethyst`},{variant:`nav`,accent:`amber`,className:`text-zinc-400 hover:text-amber hover:border-white/20 hover:text-glow-amber`},{variant:`nav`,accent:`emerald`,className:`text-zinc-400 hover:text-emerald hover:border-white/20 hover:text-glow-emerald`},{variant:`nav`,accent:`cyan`,className:`text-zinc-400 hover:text-cyan hover:border-white/20 hover:text-glow-cyan`},{variant:`nav`,accent:`rose`,className:`text-zinc-400 hover:text-rose hover:border-white/20 hover:text-glow-rose`},{variant:`nav`,accent:`violet`,className:`text-zinc-400 hover:text-violet hover:border-white/20 hover:text-glow-violet`},{variant:`nav`,accent:`white`,className:`text-zinc-400 hover:text-white hover:border-white/20 hover:text-glow-white`},{variant:`nav`,accent:`magenta`,className:`text-zinc-400 hover:text-magenta hover:border-white/20 hover:text-glow-magenta`},{variant:`chip`,className:`px-3 py-1 text-[10px] tracking-wider`},{variant:`chip`,accent:`amethyst`,active:!0,className:`bg-amethyst text-black border-amethyst`},{variant:`chip`,accent:`amethyst`,active:!1,className:`border-amethyst text-amethyst hover:bg-amethyst/10`},{variant:`chip`,accent:`amber`,active:!0,className:`bg-amber text-black border-amber`},{variant:`chip`,accent:`amber`,active:!1,className:`border-amber text-amber hover:bg-amber/10`},{variant:`chip`,accent:`emerald`,active:!0,className:`bg-emerald text-black border-emerald`},{variant:`chip`,accent:`emerald`,active:!1,className:`border-emerald text-emerald hover:bg-emerald/10`},{variant:`chip`,accent:`cyan`,active:!0,className:`bg-cyan text-black border-cyan`},{variant:`chip`,accent:`cyan`,active:!1,className:`border-cyan text-cyan hover:bg-cyan/10`},{variant:`chip`,accent:`rose`,active:!0,className:`bg-rose text-black border-rose`},{variant:`chip`,accent:`rose`,active:!1,className:`border-rose text-rose hover:bg-rose/10`},{variant:`chip`,accent:`violet`,active:!0,className:`bg-violet text-black border-violet`},{variant:`chip`,accent:`violet`,active:!1,className:`border-violet text-violet hover:bg-violet/10`},{variant:`chip`,accent:`magenta`,active:!0,className:`bg-magenta text-black border-magenta`},{variant:`chip`,accent:`magenta`,active:!1,className:`border-magenta text-magenta hover:bg-magenta/10`},{variant:`chip`,accent:`white`,active:!0,className:`bg-white text-black border-white`},{variant:`chip`,accent:`white`,active:!1,className:`border-white/20 text-zinc-400 hover:text-white hover:border-white/40`}],defaultVariants:{variant:`brutal`,accent:`amethyst`,size:`default`}});function T({className:e}){return(0,C.jsxs)(`svg`,{className:i(`animate-spin h-4 w-4`,e),xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,children:[(0,C.jsx)(`circle`,{className:`opacity-25`,cx:`12`,cy:`12`,r:`10`,stroke:`currentColor`,strokeWidth:`4`}),(0,C.jsx)(`path`,{className:`opacity-75`,fill:`currentColor`,d:`M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z`})]})}var E=o.forwardRef(({className:e,variant:t,accent:n,size:r,active:a,asChild:o=!1,loading:s=!1,disabled:c,
1children:l,...u},f)=>{let p=o?d:`button`,m=c||s;return(0,C.jsx)(p,{className:i(w({variant:t,accent:n,size:r,active:a,className:e})),ref:f,disabled:m,...u,children:s?(0,C.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,C.jsx)(T,{}),(0,C.jsx)(`span`,{children:l})]}):l})});E.displayName=`Button`;var D=o.forwardRef(({className:e,variant:t,accent:r,size:a,...o},s)=>(0,C.jsx)(n,{className:i(w({variant:t,accent:r,size:a,className:e})),ref:s,...o}));D.displayName=`ButtonLink`;export{l as i,D as n,u as r,E as t};

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.