@berdsk/ui 0.2.7 → 0.2.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. package/README.md +0 -0
  2. package/dist/Button.cjs +1 -1
  3. package/dist/Button.d.cts +4 -4
  4. package/dist/Button.d.ts +4 -4
  5. package/dist/Button.js +1 -1
  6. package/dist/Icon.cjs +1 -1
  7. package/dist/Icon.js +1 -1
  8. package/dist/Section.cjs +1 -1
  9. package/dist/Section.d.cts +2 -2
  10. package/dist/Section.d.ts +2 -2
  11. package/dist/Section.js +1 -1
  12. package/dist/ThemeProvider.cjs +1 -1
  13. package/dist/ThemeProvider.d.cts +4 -0
  14. package/dist/ThemeProvider.d.ts +4 -0
  15. package/dist/ThemeProvider.js +1 -1
  16. package/dist/chunk-3SA2QKC6.js +2 -0
  17. package/dist/chunk-3SA2QKC6.js.map +1 -0
  18. package/dist/{chunk-JD5SEMO3.js → chunk-GUQJ6RZT.js} +2 -2
  19. package/dist/chunk-GUQJ6RZT.js.map +1 -0
  20. package/dist/{chunk-ASY4HDST.cjs → chunk-KXPGO6PS.cjs} +3 -3
  21. package/dist/chunk-KXPGO6PS.cjs.map +1 -0
  22. package/dist/chunk-MVVNEKMH.js +2 -0
  23. package/dist/chunk-MVVNEKMH.js.map +1 -0
  24. package/dist/{chunk-YY4J5WFK.cjs → chunk-O3TVZAQB.cjs} +7 -7
  25. package/dist/chunk-O3TVZAQB.cjs.map +1 -0
  26. package/dist/chunk-OI62N27S.cjs +2 -0
  27. package/dist/chunk-OI62N27S.cjs.map +1 -0
  28. package/dist/{chunk-CTLSX32U.js → chunk-TO52GBVF.js} +7 -7
  29. package/dist/chunk-TO52GBVF.js.map +1 -0
  30. package/dist/{chunk-CL3NQPYL.cjs → chunk-U7VSEXSW.cjs} +2 -2
  31. package/dist/chunk-U7VSEXSW.cjs.map +1 -0
  32. package/dist/chunk-Z5XWNRFP.cjs +2 -0
  33. package/dist/chunk-Z5XWNRFP.cjs.map +1 -0
  34. package/dist/{chunk-UYXCJGNM.js → chunk-ZOVZGLB5.js} +3 -3
  35. package/dist/chunk-ZOVZGLB5.js.map +1 -0
  36. package/dist/index.cjs +1 -1
  37. package/dist/index.js +1 -1
  38. package/package.json +56 -53
  39. package/dist/chunk-ACL5MABU.js +0 -2
  40. package/dist/chunk-ACL5MABU.js.map +0 -1
  41. package/dist/chunk-ASY4HDST.cjs.map +0 -1
  42. package/dist/chunk-BQKAOXAV.js +0 -2
  43. package/dist/chunk-BQKAOXAV.js.map +0 -1
  44. package/dist/chunk-CL3NQPYL.cjs.map +0 -1
  45. package/dist/chunk-CTLSX32U.js.map +0 -1
  46. package/dist/chunk-JD5SEMO3.js.map +0 -1
  47. package/dist/chunk-KRYE247M.cjs +0 -2
  48. package/dist/chunk-KRYE247M.cjs.map +0 -1
  49. package/dist/chunk-RNA5V64T.cjs +0 -2
  50. package/dist/chunk-RNA5V64T.cjs.map +0 -1
  51. package/dist/chunk-UYXCJGNM.js.map +0 -1
  52. package/dist/chunk-YY4J5WFK.cjs.map +0 -1
package/README.md CHANGED
Binary file
package/dist/Button.cjs CHANGED
@@ -1,2 +1,2 @@
1
- 'use strict';var chunkKRYE247M_cjs=require('./chunk-KRYE247M.cjs');require('./chunk-CL3NQPYL.cjs'),require('./chunk-GNFE24S7.cjs');Object.defineProperty(exports,"Button",{enumerable:true,get:function(){return chunkKRYE247M_cjs.a}});//# sourceMappingURL=Button.cjs.map
1
+ 'use strict';var chunkZ5XWNRFP_cjs=require('./chunk-Z5XWNRFP.cjs');require('./chunk-U7VSEXSW.cjs'),require('./chunk-GNFE24S7.cjs');Object.defineProperty(exports,"Button",{enumerable:true,get:function(){return chunkZ5XWNRFP_cjs.a}});//# sourceMappingURL=Button.cjs.map
2
2
  //# sourceMappingURL=Button.cjs.map
package/dist/Button.d.cts CHANGED
@@ -1,10 +1,10 @@
1
1
  import * as React from 'react';
2
2
 
3
3
  interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement | HTMLAnchorElement> {
4
- variant?: "solid" | "outlined" | "ghost" | "link";
5
- color?: "primary" | "secondary" | "danger" | "success";
6
- size?: "xs" | "sm" | "md" | "lg" | "xl" | "2xl";
7
- rounded?: "none" | "xs" | "sm" | "md" | "lg" | "full";
4
+ variant?: 'solid' | 'outlined' | 'ghost' | 'link';
5
+ color?: 'primary' | 'secondary' | 'danger' | 'success';
6
+ size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';
7
+ rounded?: 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'full';
8
8
  leftIcon?: React.ReactNode;
9
9
  rightIcon?: React.ReactNode;
10
10
  fullWidth?: boolean;
package/dist/Button.d.ts CHANGED
@@ -1,10 +1,10 @@
1
1
  import * as React from 'react';
2
2
 
3
3
  interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement | HTMLAnchorElement> {
4
- variant?: "solid" | "outlined" | "ghost" | "link";
5
- color?: "primary" | "secondary" | "danger" | "success";
6
- size?: "xs" | "sm" | "md" | "lg" | "xl" | "2xl";
7
- rounded?: "none" | "xs" | "sm" | "md" | "lg" | "full";
4
+ variant?: 'solid' | 'outlined' | 'ghost' | 'link';
5
+ color?: 'primary' | 'secondary' | 'danger' | 'success';
6
+ size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';
7
+ rounded?: 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'full';
8
8
  leftIcon?: React.ReactNode;
9
9
  rightIcon?: React.ReactNode;
10
10
  fullWidth?: boolean;
package/dist/Button.js CHANGED
@@ -1,2 +1,2 @@
1
- export{a as Button}from'./chunk-BQKAOXAV.js';import'./chunk-JD5SEMO3.js';import'./chunk-FW4363Y4.js';//# sourceMappingURL=Button.js.map
1
+ export{a as Button}from'./chunk-3SA2QKC6.js';import'./chunk-GUQJ6RZT.js';import'./chunk-FW4363Y4.js';//# sourceMappingURL=Button.js.map
2
2
  //# sourceMappingURL=Button.js.map
package/dist/Icon.cjs CHANGED
@@ -1,2 +1,2 @@
1
- 'use strict';var chunkRNA5V64T_cjs=require('./chunk-RNA5V64T.cjs');require('./chunk-CL3NQPYL.cjs'),require('./chunk-GNFE24S7.cjs');Object.defineProperty(exports,"Icon",{enumerable:true,get:function(){return chunkRNA5V64T_cjs.a}});//# sourceMappingURL=Icon.cjs.map
1
+ 'use strict';var chunkOI62N27S_cjs=require('./chunk-OI62N27S.cjs');require('./chunk-U7VSEXSW.cjs'),require('./chunk-GNFE24S7.cjs');Object.defineProperty(exports,"Icon",{enumerable:true,get:function(){return chunkOI62N27S_cjs.a}});//# sourceMappingURL=Icon.cjs.map
2
2
  //# sourceMappingURL=Icon.cjs.map
package/dist/Icon.js CHANGED
@@ -1,2 +1,2 @@
1
- export{a as Icon}from'./chunk-ACL5MABU.js';import'./chunk-JD5SEMO3.js';import'./chunk-FW4363Y4.js';//# sourceMappingURL=Icon.js.map
1
+ export{a as Icon}from'./chunk-MVVNEKMH.js';import'./chunk-GUQJ6RZT.js';import'./chunk-FW4363Y4.js';//# sourceMappingURL=Icon.js.map
2
2
  //# sourceMappingURL=Icon.js.map
package/dist/Section.cjs CHANGED
@@ -1,2 +1,2 @@
1
- 'use strict';Object.defineProperty(exports,'__esModule',{value:true});var chunkASY4HDST_cjs=require('./chunk-ASY4HDST.cjs');require('./chunk-CL3NQPYL.cjs'),require('./chunk-GNFE24S7.cjs');Object.defineProperty(exports,"Section",{enumerable:true,get:function(){return chunkASY4HDST_cjs.a}});Object.defineProperty(exports,"default",{enumerable:true,get:function(){return chunkASY4HDST_cjs.b}});//# sourceMappingURL=Section.cjs.map
1
+ 'use strict';Object.defineProperty(exports,'__esModule',{value:true});var chunkKXPGO6PS_cjs=require('./chunk-KXPGO6PS.cjs');require('./chunk-U7VSEXSW.cjs'),require('./chunk-GNFE24S7.cjs');Object.defineProperty(exports,"Section",{enumerable:true,get:function(){return chunkKXPGO6PS_cjs.a}});Object.defineProperty(exports,"default",{enumerable:true,get:function(){return chunkKXPGO6PS_cjs.b}});//# sourceMappingURL=Section.cjs.map
2
2
  //# sourceMappingURL=Section.cjs.map
@@ -1,7 +1,7 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import { HTMLAttributes, ReactNode } from 'react';
3
3
 
4
- type DivisorVariant = "wavy" | "wavy-simple" | "arched";
4
+ type DivisorVariant = 'wavy' | 'wavy-simple' | 'arched';
5
5
  interface DivisorOptions {
6
6
  variant: DivisorVariant;
7
7
  color?: string;
@@ -10,7 +10,7 @@ interface DivisorOptions {
10
10
  }
11
11
  interface SectionProps extends HTMLAttributes<HTMLElement> {
12
12
  children: ReactNode;
13
- as?: "section" | "header" | "footer" | "nav" | "article" | "main";
13
+ as?: 'section' | 'header' | 'footer' | 'nav' | 'article' | 'main';
14
14
  fullWidth?: boolean;
15
15
  screenHeight?: boolean;
16
16
  flex?: boolean;
package/dist/Section.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import { HTMLAttributes, ReactNode } from 'react';
3
3
 
4
- type DivisorVariant = "wavy" | "wavy-simple" | "arched";
4
+ type DivisorVariant = 'wavy' | 'wavy-simple' | 'arched';
5
5
  interface DivisorOptions {
6
6
  variant: DivisorVariant;
7
7
  color?: string;
@@ -10,7 +10,7 @@ interface DivisorOptions {
10
10
  }
11
11
  interface SectionProps extends HTMLAttributes<HTMLElement> {
12
12
  children: ReactNode;
13
- as?: "section" | "header" | "footer" | "nav" | "article" | "main";
13
+ as?: 'section' | 'header' | 'footer' | 'nav' | 'article' | 'main';
14
14
  fullWidth?: boolean;
15
15
  screenHeight?: boolean;
16
16
  flex?: boolean;
package/dist/Section.js CHANGED
@@ -1,2 +1,2 @@
1
- export{a as Section,b as default}from'./chunk-UYXCJGNM.js';import'./chunk-JD5SEMO3.js';import'./chunk-FW4363Y4.js';//# sourceMappingURL=Section.js.map
1
+ export{a as Section,b as default}from'./chunk-ZOVZGLB5.js';import'./chunk-GUQJ6RZT.js';import'./chunk-FW4363Y4.js';//# sourceMappingURL=Section.js.map
2
2
  //# sourceMappingURL=Section.js.map
@@ -1,2 +1,2 @@
1
- 'use strict';var chunkYY4J5WFK_cjs=require('./chunk-YY4J5WFK.cjs');require('./chunk-GNFE24S7.cjs');Object.defineProperty(exports,"ThemeProvider",{enumerable:true,get:function(){return chunkYY4J5WFK_cjs.b}});Object.defineProperty(exports,"defaultTheme",{enumerable:true,get:function(){return chunkYY4J5WFK_cjs.a}});Object.defineProperty(exports,"useTheme",{enumerable:true,get:function(){return chunkYY4J5WFK_cjs.c}});//# sourceMappingURL=ThemeProvider.cjs.map
1
+ 'use strict';var chunkO3TVZAQB_cjs=require('./chunk-O3TVZAQB.cjs');require('./chunk-GNFE24S7.cjs');Object.defineProperty(exports,"ThemeProvider",{enumerable:true,get:function(){return chunkO3TVZAQB_cjs.b}});Object.defineProperty(exports,"defaultTheme",{enumerable:true,get:function(){return chunkO3TVZAQB_cjs.a}});Object.defineProperty(exports,"useTheme",{enumerable:true,get:function(){return chunkO3TVZAQB_cjs.c}});//# sourceMappingURL=ThemeProvider.cjs.map
2
2
  //# sourceMappingURL=ThemeProvider.cjs.map
@@ -8,6 +8,10 @@ interface ThemeColors {
8
8
  }
9
9
  interface ThemeConfig {
10
10
  colors: ThemeColors;
11
+ typography: {
12
+ fontFamily: string;
13
+ fontWeight: string;
14
+ };
11
15
  spacing: {
12
16
  gap: string;
13
17
  };
@@ -8,6 +8,10 @@ interface ThemeColors {
8
8
  }
9
9
  interface ThemeConfig {
10
10
  colors: ThemeColors;
11
+ typography: {
12
+ fontFamily: string;
13
+ fontWeight: string;
14
+ };
11
15
  spacing: {
12
16
  gap: string;
13
17
  };
@@ -1,2 +1,2 @@
1
- export{b as ThemeProvider,a as defaultTheme,c as useTheme}from'./chunk-CTLSX32U.js';import'./chunk-FW4363Y4.js';//# sourceMappingURL=ThemeProvider.js.map
1
+ export{b as ThemeProvider,a as defaultTheme,c as useTheme}from'./chunk-TO52GBVF.js';import'./chunk-FW4363Y4.js';//# sourceMappingURL=ThemeProvider.js.map
2
2
  //# sourceMappingURL=ThemeProvider.js.map
@@ -0,0 +1,2 @@
1
+ import {a}from'./chunk-GUQJ6RZT.js';import*as p from'react';import {jsxs,Fragment,jsx}from'react/jsx-runtime';var R=p.forwardRef(({children:s,variant:t="solid",color:u="primary",size:o="md",rounded:x="md",leftIcon:r,rightIcon:n,fullWidth:m=false,className:g="",href:d,...c},l)=>{let h={solid:{primary:"bg-primary border-primary text-white hover:brightness-90",secondary:"bg-secondary border-secondary text-white hover:brightness-90",danger:"bg-danger border-danger text-white hover:brightness-90",success:"bg-success border-success text-white hover:brightness-90"},outlined:{primary:"border-primary text-primary hover:bg-black/5 bg-transparent",secondary:"border-secondary text-secondary hover:bg-black/5 bg-transparent",danger:"border-danger text-danger hover:bg-black/5 bg-transparent",success:"border-success text-success hover:bg-black/5 bg-transparent"},ghost:{primary:"text-primary hover:bg-black/5 bg-transparent border-transparent",secondary:"text-secondary hover:bg-black/5 bg-transparent border-transparent",danger:"text-danger hover:bg-black/5 bg-transparent border-transparent",success:"text-success hover:bg-black/5 bg-transparent border-transparent"},link:{primary:"text-primary hover:opacity-80 underline bg-transparent border-none p-0 h-auto",secondary:"text-secondary hover:opacity-80 underline bg-transparent border-none p-0 h-auto",danger:"text-danger hover:opacity-80 underline bg-transparent border-none p-0 h-auto",success:"text-success hover:opacity-80 underline bg-transparent border-none p-0 h-auto"}},y={xs:"h-6 px-2 text-xs",sm:"h-8 px-3 text-sm",md:"h-10 px-4 text-base",lg:"h-12 px-6 text-lg",xl:"h-14 px-8 text-xl","2xl":"h-16 px-10 text-2xl"},f={xs:"w-6",sm:"w-8",md:"w-10",lg:"w-12",xl:"w-14","2xl":"w-16"},v={none:"rounded-none",xs:"rounded-xs",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"},w=!s&&(r||n),b=a("inline-flex items-center justify-center font-medium cursor-pointer transition-all border disabled:opacity-60 disabled:cursor-not-allowed gap-gap",t!=="link"?y[o]:"",t!=="link"&&w?`${f[o]} aspect-square px-0`:"",t!=="link"?v[x]:"",h[t][u],m?"w-full flex":"",g),i=jsxs(Fragment,{children:[r&&jsx("span",{className:"flex items-center justify-center",children:r}),s&&jsx("span",{className:a("text-center",{"flex-1":!!(r||n)}),children:s}),n&&jsx("span",{className:"flex items-center justify-center",children:n})]});return d?jsx("a",{href:d,className:b,ref:l,...c,children:i}):jsx("button",{className:b,ref:l,...c,children:i})});R.displayName="Button";export{R as a};//# sourceMappingURL=chunk-3SA2QKC6.js.map
2
+ //# sourceMappingURL=chunk-3SA2QKC6.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/Button.tsx"],"names":["Button","children","variant","color","size","rounded","leftIcon","rightIcon","fullWidth","className","href","props","ref","variants","sizes","iconOnlySizes","roundness","isIconOnly","combinedClasses","cn","content","jsxs","Fragment","jsx"],"mappings":"8GAcO,IAAMA,CAAAA,CAAe,CAAA,CAAA,UAAA,CAC1B,CACE,CACE,QAAA,CAAAC,CAAAA,CACA,OAAA,CAAAC,CAAAA,CAAU,OAAA,CACV,KAAA,CAAAC,CAAAA,CAAQ,SAAA,CACR,IAAA,CAAAC,CAAAA,CAAO,IAAA,CACP,OAAA,CAAAC,CAAAA,CAAU,IAAA,CACV,QAAA,CAAAC,EACA,SAAA,CAAAC,CAAAA,CACA,SAAA,CAAAC,CAAAA,CAAY,KAAA,CACZ,SAAA,CAAAC,CAAAA,CAAY,EAAA,CACZ,IAAA,CAAAC,CAAAA,CACA,GAAGC,CACL,CAAA,CACAC,CAAAA,GACG,CACH,IAAMC,CAAAA,CAAW,CACf,KAAA,CAAO,CACL,OAAA,CAAS,0DAAA,CACT,SAAA,CAAW,8DAAA,CACX,MAAA,CAAQ,wDAAA,CACR,OAAA,CAAS,0DACX,CAAA,CACA,QAAA,CAAU,CACR,OAAA,CAAS,6DAAA,CACT,SAAA,CAAW,iEAAA,CACX,MAAA,CAAQ,2DAAA,CACR,OAAA,CAAS,6DACX,CAAA,CACA,KAAA,CAAO,CACL,OAAA,CAAS,iEAAA,CACT,SAAA,CAAW,mEAAA,CACX,MAAA,CAAQ,gEAAA,CACR,OAAA,CAAS,iEACX,CAAA,CACA,IAAA,CAAM,CACJ,OAAA,CAAS,+EAAA,CACT,SAAA,CAAW,iFAAA,CACX,MAAA,CAAQ,8EAAA,CACR,OAAA,CAAS,+EACX,CACF,CAAA,CAEMC,CAAAA,CAAQ,CACZ,EAAA,CAAI,kBAAA,CACJ,EAAA,CAAI,kBAAA,CACJ,EAAA,CAAI,qBAAA,CACJ,EAAA,CAAI,mBAAA,CACJ,EAAA,CAAI,mBAAA,CACJ,KAAA,CAAO,qBACT,CAAA,CAEMC,CAAAA,CAAgB,CACpB,EAAA,CAAI,KAAA,CACJ,EAAA,CAAI,KAAA,CACJ,EAAA,CAAI,MAAA,CACJ,EAAA,CAAI,MAAA,CACJ,EAAA,CAAI,MAAA,CACJ,KAAA,CAAO,MACT,EAEMC,CAAAA,CAAY,CAChB,IAAA,CAAM,cAAA,CACN,EAAA,CAAI,YAAA,CACJ,EAAA,CAAI,YAAA,CACJ,EAAA,CAAI,YAAA,CACJ,EAAA,CAAI,YAAA,CACJ,IAAA,CAAM,cACR,CAAA,CAEMC,CAAAA,CAAa,CAAChB,CAAAA,GAAaK,CAAAA,EAAYC,CAAAA,CAAAA,CAEvCW,CAAAA,CAAkBC,CAAAA,CACtB,kJAAA,CACAjB,CAAAA,GAAY,MAAA,CAASY,CAAAA,CAAMV,CAAI,CAAA,CAAI,EAAA,CACnCF,CAAAA,GAAY,QAAUe,CAAAA,CAAa,CAAA,EAAGF,CAAAA,CAAcX,CAAI,CAAC,CAAA,mBAAA,CAAA,CAAwB,EAAA,CACjFF,CAAAA,GAAY,MAAA,CAASc,CAAAA,CAAUX,CAAO,CAAA,CAAI,EAAA,CAC1CQ,CAAAA,CAASX,CAAO,CAAA,CAAEC,CAAK,CAAA,CACvBK,CAAAA,CAAY,aAAA,CAAgB,EAAA,CAC5BC,CACF,CAAA,CAEMW,CAAAA,CACJC,IAAAA,CAAAC,QAAAA,CAAA,CACG,QAAA,CAAA,CAAAhB,CAAAA,EAAYiB,GAAAA,CAAC,QAAK,SAAA,CAAU,kCAAA,CAAoC,QAAA,CAAAjB,CAAAA,CAAS,CAAA,CACzEL,CAAAA,EACCsB,GAAAA,CAAC,MAAA,CAAA,CACC,SAAA,CAAWJ,CAAAA,CAAG,aAAA,CAAe,CAC3B,QAAA,CAAU,CAAC,EAAEb,CAAAA,EAAYC,CAAAA,CAC3B,CAAC,CAAA,CAEA,QAAA,CAAAN,CAAAA,CACH,CAAA,CAEDM,CAAAA,EAAagB,GAAAA,CAAC,MAAA,CAAA,CAAK,SAAA,CAAU,kCAAA,CAAoC,QAAA,CAAAhB,CAAAA,CAAU,CAAA,CAAA,CAC9E,CAAA,CAGF,OAAIG,CAAAA,CAEAa,GAAAA,CAAC,GAAA,CAAA,CACC,IAAA,CAAMb,CAAAA,CACN,SAAA,CAAWQ,CAAAA,CACX,GAAA,CAAKN,CAAAA,CACJ,GAAID,CAAAA,CAEJ,QAAA,CAAAS,CAAAA,CACH,CAAA,CAKFG,GAAAA,CAAC,QAAA,CAAA,CACC,SAAA,CAAWL,CAAAA,CACX,GAAA,CAAKN,CAAAA,CACJ,GAAID,CAAAA,CAEJ,QAAA,CAAAS,CAAAA,CACH,CAEJ,CACF,EAEApB,CAAAA,CAAO,WAAA,CAAc,QAAA","file":"chunk-3SA2QKC6.js","sourcesContent":["import * as React from 'react';\nimport cn from '../utils/cn';\n\nexport interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement | HTMLAnchorElement> {\n variant?: 'solid' | 'outlined' | 'ghost' | 'link';\n color?: 'primary' | 'secondary' | 'danger' | 'success';\n size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n rounded?: 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'full';\n leftIcon?: React.ReactNode;\n rightIcon?: React.ReactNode;\n fullWidth?: boolean;\n href?: string;\n}\n\nexport const Button = React.forwardRef<HTMLButtonElement | HTMLAnchorElement, ButtonProps>(\n (\n {\n children,\n variant = 'solid',\n color = 'primary',\n size = 'md',\n rounded = 'md',\n leftIcon,\n rightIcon,\n fullWidth = false,\n className = '',\n href,\n ...props\n },\n ref,\n ) => {\n const variants = {\n solid: {\n primary: 'bg-primary border-primary text-white hover:brightness-90',\n secondary: 'bg-secondary border-secondary text-white hover:brightness-90',\n danger: 'bg-danger border-danger text-white hover:brightness-90',\n success: 'bg-success border-success text-white hover:brightness-90',\n },\n outlined: {\n primary: 'border-primary text-primary hover:bg-black/5 bg-transparent',\n secondary: 'border-secondary text-secondary hover:bg-black/5 bg-transparent',\n danger: 'border-danger text-danger hover:bg-black/5 bg-transparent',\n success: 'border-success text-success hover:bg-black/5 bg-transparent',\n },\n ghost: {\n primary: 'text-primary hover:bg-black/5 bg-transparent border-transparent',\n secondary: 'text-secondary hover:bg-black/5 bg-transparent border-transparent',\n danger: 'text-danger hover:bg-black/5 bg-transparent border-transparent',\n success: 'text-success hover:bg-black/5 bg-transparent border-transparent',\n },\n link: {\n primary: 'text-primary hover:opacity-80 underline bg-transparent border-none p-0 h-auto',\n secondary: 'text-secondary hover:opacity-80 underline bg-transparent border-none p-0 h-auto',\n danger: 'text-danger hover:opacity-80 underline bg-transparent border-none p-0 h-auto',\n success: 'text-success hover:opacity-80 underline bg-transparent border-none p-0 h-auto',\n },\n };\n\n const sizes = {\n xs: 'h-6 px-2 text-xs',\n sm: 'h-8 px-3 text-sm',\n md: 'h-10 px-4 text-base',\n lg: 'h-12 px-6 text-lg',\n xl: 'h-14 px-8 text-xl',\n '2xl': 'h-16 px-10 text-2xl',\n };\n\n const iconOnlySizes = {\n xs: 'w-6',\n sm: 'w-8',\n md: 'w-10',\n lg: 'w-12',\n xl: 'w-14',\n '2xl': 'w-16',\n };\n\n const roundness = {\n none: 'rounded-none',\n xs: 'rounded-xs',\n sm: 'rounded-sm',\n md: 'rounded-md',\n lg: 'rounded-lg',\n full: 'rounded-full',\n };\n\n const isIconOnly = !children && (leftIcon || rightIcon);\n\n const combinedClasses = cn(\n 'inline-flex items-center justify-center font-medium cursor-pointer transition-all border disabled:opacity-60 disabled:cursor-not-allowed gap-gap',\n variant !== 'link' ? sizes[size] : '',\n variant !== 'link' && isIconOnly ? `${iconOnlySizes[size]} aspect-square px-0` : '',\n variant !== 'link' ? roundness[rounded] : '',\n variants[variant][color],\n fullWidth ? 'w-full flex' : '',\n className,\n );\n\n const content = (\n <>\n {leftIcon && <span className=\"flex items-center justify-center\">{leftIcon}</span>}\n {children && (\n <span\n className={cn('text-center', {\n 'flex-1': !!(leftIcon || rightIcon),\n })}\n >\n {children}\n </span>\n )}\n {rightIcon && <span className=\"flex items-center justify-center\">{rightIcon}</span>}\n </>\n );\n\n if (href) {\n return (\n <a\n href={href}\n className={combinedClasses}\n ref={ref as React.ForwardedRef<HTMLAnchorElement>}\n {...(props as React.AnchorHTMLAttributes<HTMLAnchorElement>)}\n >\n {content}\n </a>\n );\n }\n\n return (\n <button\n className={combinedClasses}\n ref={ref as React.ForwardedRef<HTMLButtonElement>}\n {...(props as React.ButtonHTMLAttributes<HTMLButtonElement>)}\n >\n {content}\n </button>\n );\n },\n);\n\nButton.displayName = 'Button';\n"]}
@@ -6,5 +6,5 @@ classnames/index.js:
6
6
  Licensed under the MIT License (MIT), see
7
7
  http://jedwatson.github.io/classnames
8
8
  *)
9
- */export{ko as a};//# sourceMappingURL=chunk-JD5SEMO3.js.map
10
- //# sourceMappingURL=chunk-JD5SEMO3.js.map
9
+ */export{ko as a};//# sourceMappingURL=chunk-GUQJ6RZT.js.map
10
+ //# sourceMappingURL=chunk-GUQJ6RZT.js.map