PageSourceSearch

https://gradguard.com/build/assets/Button-3jeBTrUS.js

js gradguard.com collected 2026-10-01 11:29:36 UTC 5,716 bytes, 6 lines download raw bytes

1import{$ as e,B as t,D as n,P as r,U as i,_ as a,_t as o,b as s,bt as c,p as l,st as u,v as d,w as f,x as p,y as m}from"./vue.esm-bundler-Cs2C9GC0.js";import{a as h,l as g,t as _}from"./dist-CCDeE_Af.js";var v=`focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 `,y=`peer-focus-visible:outline-none peer-focus-visible:ring-2 peer-focus-visible:ring-offset-2`,b={custom:``,primary:`border-2 border-gg-blue-600`,success:`border-2 border-positive`,secondary:`border-2 border-gray-600`,error:`border-2 border-negative`},x={custom:``,primary:`text-gg-blue-600 bg-white`,success:`text-gg-green-600 bg-white`,secondary:`text-gray-600 bg-white`,error:`text-negative bg-white`},S={custom:``,primary:`text-gg-blue-600`,success:`text-gg-green-600`,secondary:`text-gray-600`,error:`text-negative`},C={custom:``,primary:`hover:border-primary hover:text-primary`,success:`hover:border-gg-green-600 hover:text-gg-green-600`,secondary:`hover:border-gray-700 hover:text-gray-700`,error:`hover:border-negative-darker hover:text-negative-darker`},w={custom:``,primary:`text-gg-blue-600`,success:`text-gg-green-600`,secondary:`text-gray-600`,error:`text-negative`},T={custom:``,primary:`bg-gg-blue-100`,success:`bg-gg-green-50`,secondary:`bg-gray-100`,error:`bg-red-100`},E={custom:``,primary:`hover:bg-gg-blue-300`,success:`hover:bg-gg-green-100`,secondary:`hover:bg-gray-300`,error:`hover:bg-red-300`},D={custom:``,primary:`border border-gg-blue-600 bg-gg-blue-600 text-white`,success:`border border-positive text-white bg-positive`,secondary:`border border-gray-500 text-white bg-gray-500`,error:`border border-negative text-white bg-negative`},O={custom:``,primary:`hover:bg-gg-blue-700`,success:`hover:bg-gg-green-600`,secondary:`hover:bg-gray-300`,error:`hover:bg-negative-darker`},k={custom:``,primary:`text-gg-blue-600`,success:`text-positive`,secondary:`text-gray-400`,error:`text-negative`},A={custom:``,primary:`hover:text-gg-blue-700`,success:`hover:bg-gg-green-600`,secondary:`hover:text-gray-300`,error:`hover:text-negative-darker`},j={custom:``,primary:`focus-visible:ring-gg-blue-600`,success:`focus-visible:ring-positive`,secondary:`focus-visible:ring-gray-400`,error:`focus-visible:ring-negative`},M={custom:``,primary:`peer-focus-visible:ring-gg-blue-600`,success:`peer-focus-visible:ring-positive`,secondary:`peer-focus-visible:ring-gray-400`,error:`peer-focus-visible:ring-negative`},N={custom:``,large:`px-16 py-4 text-md`,big:`px-10 py-4 text-md`,normal:`px-6 py-3 text-md`,medium:`px-5 py-2 text-sm`,small:`px-3 py-1 text-xs`,xs:`px-1 py-0.5 text-xs`},P={type:g().def(`primary`),color:g().def(`normal`),size:g().def(`normal`),icon:g(),class:_(),defaultClass:g(),text:g(),htmlType:g().def(`button`),disabled:Boolean,loading:Boolean,textLoading:g(),iconLoading:g().def(`fas fa-spinner fa-spin`),tabindex:h(),dataTestId:g(),asLink:Boolean},F=(e,t,n)=>n?`btn-disabled`:t===`invert`?`${b[e]} ${x[e]} ${C[e]}`:t===`transparent`?`${b[e]} ${S[e]} ${C[e]}`:t===`soft`?`
2    ${w[e]}
3    ${T[e]}
4    ${E[e]}
5    ${b[e]}
6    ${C[e]}`:`${D[e]} ${O[e]}`,I=(e,t,n=`inline-flex items-center justify-center rounded-lg font-semibold`,r,i)=>`${N[t]} ${F(e,r,i)} ${n} ${v} ${j[e]}`,L=(e,t,n)=>{let r=k[e];if(t||n){let e=`${r} cursor-not-allowed`;return t?`${e} line-through`:e}return`${r} ${A[e]}`},R=/\b(?:hover:)?(?:no-)?underline\b|\bline-through\b/,z=e=>e?typeof e==`string`?e:Array.isArray(e)?e.map(z).filter(Boolean).join(` `):typeof e==`object`?Object.entries(e).filter(([,e])=>!!e).map(([e])=>e).join(` `):``:``,B=(e,t)=>{let n=z(t),r=R.test(n),i=R.test(e);return[e,r||i?``:`underline hover:no-underline`,n].filter(Boolean).join(` `)},V=[`type`,`disabled`,`tabindex`,`data-test-id`],H={key:0},U={key:1},W={key:1},G=n({__name:`BaseButton`,props:P,emits:[`click`,`keydown`],setup(e,{expose:n}){let r=e,f=a(()=>I(r.type,r.size,r.defaultClass,r.color,r.disabled)),m=u();return n({button:m}),(e,n)=>(t(),p(`button`,{ref_key:`button`,ref:m,class:o([f.value,e.$props.class,e.defaultClass,{"opacity-50 cursor-not-allowed":e.loading||e.disabled}]),type:e.htmlType,disabled:e.loading||e.disabled,tabindex:e.tabindex,"data-test-id":e.dataTestId,onClick:n[0]||(n[0]=t=>e.$emit(`click`,t)),onKeydown:n[1]||(n[1]=t=>e.$emit(`keydown`,t))},[e.loading?(t(),p(l,{key:0},[d(`i`,{class:o([e.iconLoading,`mr-2`])},null,2),e.textLoading?(t(),p(`span`,H,c(e.textLoading),1)):(t(),p(`span`,U,c(e.text),1))],64)):(t(),p(l,{key:1},[e.icon?(t(),p(`i`,{key:0,class:o([e.icon,`mr-2`])},null,2)):s(``,!0),e.text?(t(),p(`span`,W,c(e.text),1)):s(``,!0)],64)),i(e.$slots,`default`)],42,V))}}),K=[`disabled`,`type`,`dataTestId`],q={key:0,class:`fas fa-spinner fa-spin mr-1`},J=n({__name:`ButtonAsLink`,props:P,emits:[`click`,`keydown`],setup(e,{expose:n}){let r=e,l=a(()=>B(L(r.type,r.disabled||r.loading),r.class)),d=u();return n({button:d}),(e,n)=>(t(),p(`button`,{ref_key:`button`,ref:d,class:o(l.value),disabled:e.disabled||e.loading,type:e.htmlType,dataTestId:e.dataTestId,onClick:n[0]||(n[0]=t=>e.$emit(`click`,t))},[e.loading?(t(),p(`i`,q)):s(``,!0),f(` `+c(e.text)+` `,1),i(e.$slots,`default`)],10,K))}}),Y=n({__name:`Button`,props:P,emits:[`click`,`keydown`],setup(n,{expose:a}){let o=u();return a({button:o}),(n,a)=>n.asLink?(t(),m(J,r({key:0,ref_key:`button`,ref:o},n.$props,{onClick:a[0]||(a[0]=e=>n.$emit(`click`,e)),onKeydown:a[1]||(a[1]=e=>n.$emit(`keydown`,e))}),{default:e(()=>[i(n.$slots,`default`)]),_:3},16)):(t(),m(G,r({key:1,ref_key:`button`,ref:o},n.$props,{onClick:a[2]||(a[2]=e=>n.$emit(`click`,e)),onKeydown:a[3]||(a[3]=e=>n.$emit(`keydown`,e))}),{default:e(()=>[i(n.$slots,`default`)]),_:3},16))}});
6export{I as a,D as c,j as d,M as f,P as i,O as l,v as m,J as n,F as o,y as p,G as r,N as s,Y as t,b as u};

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.