{"version":3,"sources":["Button.tsx"],"sourcesContent":["import { Link, LinkOptions } from \"../link/Link.tsx\";\nexport type ButtonOptions = {\n\tprimary?: boolean;\n\tsecondary?: boolean;\n\ttransparent?: boolean;\n\ttype?: string;\n\tstyle?: Record<string, string | number>;\n} & (\n\tLinkOptions | {\n\t\tonclick?: () => void\n\t}\n);\n\nexport const Button = blankTemplate<ButtonOptions & Omit<Partial<HTMLButtonElement>, \"children\" | \"style\"> & { children?: any }>(props => \n\t<button  {...props as any} stylesheet=\"./Button.css?\" data-transparent={props.transparent ?? false} class={[\"unyt-button\", (\n\t\tprops.type ? props.type : (props.primary ? \"primary\" : \"secondary\")\n\t), ...(props.class ? [props.class] : [])].join(\" \")}>\n\t\t{\"href\" in props ? <Link {...props} disableUnderline/> : <div {...props} data-button-content>\n\t\t\t{props.children}\n\t\t</div>}\n\t</button>\n);"],"names":["Link","Button","blankTemplate","props","button","stylesheet","data-transparent","transparent","class","type","primary","join","disableUnderline","div","data-button-content","children"],"mappings":";AAAA,SAASA,IAAI,QAAqB,mBAAmB;AAarD,OAAO,MAAMC,SAASC,cAA2GC,CAAAA,sBAChI,KAACC;QAAS,GAAGD,KAAK;QAASE,YAAW;QAAgBC,oBAAkBH,MAAMI,WAAW,IAAI,CAAA;QAAOC,OAAO;YAAC;YAC3GL,MAAMM,IAAI,GAAGN,MAAMM,IAAI,GAAIN,MAAMO,OAAO,GAAG,YAAY;eACjDP,MAAMK,KAAK,GAAG;gBAACL,MAAMK,KAAK;aAAC,GAAG,EAAE;SAAE,CAACG,IAAI,CAAC;kBAC7C,UAAUR,sBAAQ,KAACH;YAAM,GAAGG,KAAK;YAAES,gBAAgB;2BAAK,KAACC;YAAK,GAAGV,KAAK;YAAEW,qBAAmB;sBAC1FX,MAAMY,QAAQ;;QAGhB","sourceRoot":"/lib/unyt-components-0.0.17/elements/button/","file":"Button.tsx"}