@devup-ui/components 0.1.43 → 0.1.45

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 (34) hide show
  1. package/dist/_virtual/_rolldown/runtime.cjs +1 -0
  2. package/dist/components/Button/IconSpinner.cjs +1 -1
  3. package/dist/components/Button/IconSpinner.js +72 -84
  4. package/dist/components/Button/index.cjs +1 -1
  5. package/dist/components/Button/index.js +220 -217
  6. package/dist/components/Checkbox/CheckIcon.cjs +1 -1
  7. package/dist/components/Checkbox/CheckIcon.js +17 -23
  8. package/dist/components/Checkbox/index.cjs +1 -2
  9. package/dist/components/Checkbox/index.js +87 -127
  10. package/dist/components/Input/index.cjs +1 -2
  11. package/dist/components/Input/index.js +130 -181
  12. package/dist/components/Radio/index.cjs +1 -1
  13. package/dist/components/Radio/index.js +143 -194
  14. package/dist/components/RadioGroup/index.cjs +1 -2
  15. package/dist/components/RadioGroup/index.js +43 -59
  16. package/dist/components/Select/IconCheck.cjs +1 -1
  17. package/dist/components/Select/IconCheck.js +18 -24
  18. package/dist/components/Select/index.cjs +1 -2
  19. package/dist/components/Select/index.js +215 -315
  20. package/dist/components/Stepper/IconMinus.cjs +1 -1
  21. package/dist/components/Stepper/IconMinus.js +18 -24
  22. package/dist/components/Stepper/IconPlus.cjs +1 -1
  23. package/dist/components/Stepper/IconPlus.js +17 -23
  24. package/dist/components/Stepper/index.cjs +1 -2
  25. package/dist/components/Stepper/index.js +98 -142
  26. package/dist/components/Textarea/index.cjs +1 -2
  27. package/dist/components/Textarea/index.js +85 -108
  28. package/dist/components/Toggle/index.cjs +1 -2
  29. package/dist/components/Toggle/index.js +71 -91
  30. package/dist/contexts/useSelect.cjs +1 -2
  31. package/dist/contexts/useSelect.js +9 -10
  32. package/dist/index.cjs +1 -1
  33. package/dist/index.js +11 -32
  34. package/package.json +13 -13
@@ -0,0 +1 @@
1
+ var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},s=(n,r,a)=>(a=n==null?{}:e(i(n)),o(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));exports.__toESM=s;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),n=require("@devup-ui/react");function e({type:r="whole",...a}){const t=n.keyframes({"0%":{transform:"rotateZ(0deg)"},"100%":{transform:"rotateZ(360deg)"}});return r==="partial"?i.jsx(n.Box,{animationDuration:"1s",animationIterationCount:"infinite",animationName:t,animationTimingFunction:"linear","aria-label":"Partial loading spinner",as:"svg",props:{fill:"none",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",...a},children:i.jsx("path",{d:"M17 10C17 11.291 16.643 12.5568 15.9685 13.6575C15.294 14.7582 14.3282 15.651 13.1779 16.237C12.0277 16.8231 10.7378 17.0797 9.45078 16.9784C8.1638 16.8771 6.9299 16.4219 5.8855 15.6631",stroke:"light-dark(var(--primary, #272727), var(--primary, #F6F6F6))",strokeLinecap:"round",strokeWidth:"3"})}):i.jsxs(n.Box,{animationDuration:"1s",animationIterationCount:"infinite",animationName:t,animationTimingFunction:"linear","aria-label":"Whole loading spinner",as:"svg",props:{fill:"none",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",...a},children:[i.jsx("g",{clipPath:"url(#paint0_angular_1842_200_clip_path)",children:i.jsx("g",{transform:"matrix(0 0.007 -0.007 0 10 10)",children:i.jsx("foreignObject",{height:"2857.14",width:"2857.14",x:"-1428.57",y:"-1428.57",children:i.jsx("div",{style:{background:"conic-gradient(from 90deg, light-dark(var(--primary, #272727), var(--primary, #F6F6F6)) 0deg,rgba(0,0,0,0) 360deg)",height:"100%",width:"100%",opacity:1}})})})}),i.jsx("path",{d:"M17 10H15.5C15.5 13.0376 13.0376 15.5 10 15.5V17V18.5C14.6944 18.5 18.5 14.6944 18.5 10H17ZM10 17V15.5C6.96243 15.5 4.5 13.0376 4.5 10H3H1.5C1.5 14.6944 5.30558 18.5 10 18.5V17ZM3 10H4.5C4.5 6.96243 6.96243 4.5 10 4.5V3V1.5C5.30558 1.5 1.5 5.30558 1.5 10H3ZM10 3V4.5C13.0376 4.5 15.5 6.96243 15.5 10H17H18.5C18.5 5.30558 14.6944 1.5 10 1.5V3Z"}),i.jsx("defs",{children:i.jsx("clipPath",{id:"paint0_angular_1842_200_clip_path",children:i.jsx("path",{d:"M17 10H15.5C15.5 13.0376 13.0376 15.5 10 15.5V17V18.5C14.6944 18.5 18.5 14.6944 18.5 10H17ZM10 17V15.5C6.96243 15.5 4.5 13.0376 4.5 10H3H1.5C1.5 14.6944 5.30558 18.5 10 18.5V17ZM3 10H4.5C4.5 6.96243 6.96243 4.5 10 4.5V3V1.5C5.30558 1.5 1.5 5.30558 1.5 10H3ZM10 3V4.5C13.0376 4.5 15.5 6.96243 15.5 10H17H18.5C18.5 5.30558 14.6944 1.5 10 1.5V3Z"})})})]})}exports.IconSpinner=e;
1
+ require(`../../_virtual/_rolldown/runtime.cjs`);let e=require(`@devup-ui/react`),t=require(`react/jsx-runtime`);function n({type:n=`whole`,...r}){let i=(0,e.keyframes)({"0%":{transform:`rotateZ(0deg)`},"100%":{transform:`rotateZ(360deg)`}});return n===`partial`?(0,t.jsx)(e.Box,{animationDuration:`1s`,animationIterationCount:`infinite`,animationName:i,animationTimingFunction:`linear`,"aria-label":`Partial loading spinner`,as:`svg`,props:{fill:`none`,height:`20`,viewBox:`0 0 20 20`,width:`20`,xmlns:`http://www.w3.org/2000/svg`,...r},children:(0,t.jsx)(`path`,{d:`M17 10C17 11.291 16.643 12.5568 15.9685 13.6575C15.294 14.7582 14.3282 15.651 13.1779 16.237C12.0277 16.8231 10.7378 17.0797 9.45078 16.9784C8.1638 16.8771 6.9299 16.4219 5.8855 15.6631`,stroke:`light-dark(var(--primary, #272727), var(--primary, #F6F6F6))`,strokeLinecap:`round`,strokeWidth:`3`})}):(0,t.jsxs)(e.Box,{animationDuration:`1s`,animationIterationCount:`infinite`,animationName:i,animationTimingFunction:`linear`,"aria-label":`Whole loading spinner`,as:`svg`,props:{fill:`none`,height:`20`,viewBox:`0 0 20 20`,width:`20`,xmlns:`http://www.w3.org/2000/svg`,...r},children:[(0,t.jsx)(`g`,{clipPath:`url(#paint0_angular_1842_200_clip_path)`,children:(0,t.jsx)(`g`,{transform:`matrix(0 0.007 -0.007 0 10 10)`,children:(0,t.jsx)(`foreignObject`,{height:`2857.14`,width:`2857.14`,x:`-1428.57`,y:`-1428.57`,children:(0,t.jsx)(`div`,{style:{background:`conic-gradient(from 90deg, light-dark(var(--primary, #272727), var(--primary, #F6F6F6)) 0deg,rgba(0,0,0,0) 360deg)`,height:`100%`,width:`100%`,opacity:1}})})})}),(0,t.jsx)(`path`,{d:`M17 10H15.5C15.5 13.0376 13.0376 15.5 10 15.5V17V18.5C14.6944 18.5 18.5 14.6944 18.5 10H17ZM10 17V15.5C6.96243 15.5 4.5 13.0376 4.5 10H3H1.5C1.5 14.6944 5.30558 18.5 10 18.5V17ZM3 10H4.5C4.5 6.96243 6.96243 4.5 10 4.5V3V1.5C5.30558 1.5 1.5 5.30558 1.5 10H3ZM10 3V4.5C13.0376 4.5 15.5 6.96243 15.5 10H17H18.5C18.5 5.30558 14.6944 1.5 10 1.5V3Z`}),(0,t.jsx)(`defs`,{children:(0,t.jsx)(`clipPath`,{id:`paint0_angular_1842_200_clip_path`,children:(0,t.jsx)(`path`,{d:`M17 10H15.5C15.5 13.0376 13.0376 15.5 10 15.5V17V18.5C14.6944 18.5 18.5 14.6944 18.5 10H17ZM10 17V15.5C6.96243 15.5 4.5 13.0376 4.5 10H3H1.5C1.5 14.6944 5.30558 18.5 10 18.5V17ZM3 10H4.5C4.5 6.96243 6.96243 4.5 10 4.5V3V1.5C5.30558 1.5 1.5 5.30558 1.5 10H3ZM10 3V4.5C13.0376 4.5 15.5 6.96243 15.5 10H17H18.5C18.5 5.30558 14.6944 1.5 10 1.5V3Z`})})})]})}exports.IconSpinner=n;
@@ -1,85 +1,73 @@
1
- import { jsx as i, jsxs as e } from "react/jsx-runtime";
2
- import { keyframes as o, Box as r } from "@devup-ui/react";
3
- function d({ type: t = "whole", ...n }) {
4
- const a = o({
5
- "0%": {
6
- transform: "rotateZ(0deg)"
7
- },
8
- "100%": {
9
- transform: "rotateZ(360deg)"
10
- }
11
- });
12
- return t === "partial" ? /* @__PURE__ */ i(
13
- r,
14
- {
15
- animationDuration: "1s",
16
- animationIterationCount: "infinite",
17
- animationName: a,
18
- animationTimingFunction: "linear",
19
- "aria-label": "Partial loading spinner",
20
- as: "svg",
21
- props: {
22
- fill: "none",
23
- height: "20",
24
- viewBox: "0 0 20 20",
25
- width: "20",
26
- xmlns: "http://www.w3.org/2000/svg",
27
- ...n
28
- },
29
- children: /* @__PURE__ */ i(
30
- "path",
31
- {
32
- d: "M17 10C17 11.291 16.643 12.5568 15.9685 13.6575C15.294 14.7582 14.3282 15.651 13.1779 16.237C12.0277 16.8231 10.7378 17.0797 9.45078 16.9784C8.1638 16.8771 6.9299 16.4219 5.8855 15.6631",
33
- stroke: "light-dark(var(--primary, #272727), var(--primary, #F6F6F6))",
34
- strokeLinecap: "round",
35
- strokeWidth: "3"
36
- }
37
- )
38
- }
39
- ) : /* @__PURE__ */ e(
40
- r,
41
- {
42
- animationDuration: "1s",
43
- animationIterationCount: "infinite",
44
- animationName: a,
45
- animationTimingFunction: "linear",
46
- "aria-label": "Whole loading spinner",
47
- as: "svg",
48
- props: {
49
- fill: "none",
50
- height: "20",
51
- viewBox: "0 0 20 20",
52
- width: "20",
53
- xmlns: "http://www.w3.org/2000/svg",
54
- ...n
55
- },
56
- children: [
57
- /* @__PURE__ */ i("g", { clipPath: "url(#paint0_angular_1842_200_clip_path)", children: /* @__PURE__ */ i("g", { transform: "matrix(0 0.007 -0.007 0 10 10)", children: /* @__PURE__ */ i(
58
- "foreignObject",
59
- {
60
- height: "2857.14",
61
- width: "2857.14",
62
- x: "-1428.57",
63
- y: "-1428.57",
64
- children: /* @__PURE__ */ i(
65
- "div",
66
- {
67
- style: {
68
- background: "conic-gradient(from 90deg, light-dark(var(--primary, #272727), var(--primary, #F6F6F6)) 0deg,rgba(0,0,0,0) 360deg)",
69
- height: "100%",
70
- width: "100%",
71
- opacity: 1
72
- }
73
- }
74
- )
75
- }
76
- ) }) }),
77
- /* @__PURE__ */ i("path", { d: "M17 10H15.5C15.5 13.0376 13.0376 15.5 10 15.5V17V18.5C14.6944 18.5 18.5 14.6944 18.5 10H17ZM10 17V15.5C6.96243 15.5 4.5 13.0376 4.5 10H3H1.5C1.5 14.6944 5.30558 18.5 10 18.5V17ZM3 10H4.5C4.5 6.96243 6.96243 4.5 10 4.5V3V1.5C5.30558 1.5 1.5 5.30558 1.5 10H3ZM10 3V4.5C13.0376 4.5 15.5 6.96243 15.5 10H17H18.5C18.5 5.30558 14.6944 1.5 10 1.5V3Z" }),
78
- /* @__PURE__ */ i("defs", { children: /* @__PURE__ */ i("clipPath", { id: "paint0_angular_1842_200_clip_path", children: /* @__PURE__ */ i("path", { d: "M17 10H15.5C15.5 13.0376 13.0376 15.5 10 15.5V17V18.5C14.6944 18.5 18.5 14.6944 18.5 10H17ZM10 17V15.5C6.96243 15.5 4.5 13.0376 4.5 10H3H1.5C1.5 14.6944 5.30558 18.5 10 18.5V17ZM3 10H4.5C4.5 6.96243 6.96243 4.5 10 4.5V3V1.5C5.30558 1.5 1.5 5.30558 1.5 10H3ZM10 3V4.5C13.0376 4.5 15.5 6.96243 15.5 10H17H18.5C18.5 5.30558 14.6944 1.5 10 1.5V3Z" }) }) })
79
- ]
80
- }
81
- );
1
+ import { Box as e, keyframes as t } from "@devup-ui/react";
2
+ import { jsx as n, jsxs as r } from "react/jsx-runtime";
3
+ //#region src/components/Button/IconSpinner.tsx
4
+ function i({ type: i = "whole", ...a }) {
5
+ let o = t({
6
+ "0%": { transform: "rotateZ(0deg)" },
7
+ "100%": { transform: "rotateZ(360deg)" }
8
+ });
9
+ return i === "partial" ? /* @__PURE__ */ n(e, {
10
+ animationDuration: "1s",
11
+ animationIterationCount: "infinite",
12
+ animationName: o,
13
+ animationTimingFunction: "linear",
14
+ "aria-label": "Partial loading spinner",
15
+ as: "svg",
16
+ props: {
17
+ fill: "none",
18
+ height: "20",
19
+ viewBox: "0 0 20 20",
20
+ width: "20",
21
+ xmlns: "http://www.w3.org/2000/svg",
22
+ ...a
23
+ },
24
+ children: /* @__PURE__ */ n("path", {
25
+ d: "M17 10C17 11.291 16.643 12.5568 15.9685 13.6575C15.294 14.7582 14.3282 15.651 13.1779 16.237C12.0277 16.8231 10.7378 17.0797 9.45078 16.9784C8.1638 16.8771 6.9299 16.4219 5.8855 15.6631",
26
+ stroke: "light-dark(var(--primary, #272727), var(--primary, #F6F6F6))",
27
+ strokeLinecap: "round",
28
+ strokeWidth: "3"
29
+ })
30
+ }) : /* @__PURE__ */ r(e, {
31
+ animationDuration: "1s",
32
+ animationIterationCount: "infinite",
33
+ animationName: o,
34
+ animationTimingFunction: "linear",
35
+ "aria-label": "Whole loading spinner",
36
+ as: "svg",
37
+ props: {
38
+ fill: "none",
39
+ height: "20",
40
+ viewBox: "0 0 20 20",
41
+ width: "20",
42
+ xmlns: "http://www.w3.org/2000/svg",
43
+ ...a
44
+ },
45
+ children: [
46
+ /* @__PURE__ */ n("g", {
47
+ clipPath: "url(#paint0_angular_1842_200_clip_path)",
48
+ children: /* @__PURE__ */ n("g", {
49
+ transform: "matrix(0 0.007 -0.007 0 10 10)",
50
+ children: /* @__PURE__ */ n("foreignObject", {
51
+ height: "2857.14",
52
+ width: "2857.14",
53
+ x: "-1428.57",
54
+ y: "-1428.57",
55
+ children: /* @__PURE__ */ n("div", { style: {
56
+ background: "conic-gradient(from 90deg, light-dark(var(--primary, #272727), var(--primary, #F6F6F6)) 0deg,rgba(0,0,0,0) 360deg)",
57
+ height: "100%",
58
+ width: "100%",
59
+ opacity: 1
60
+ } })
61
+ })
62
+ })
63
+ }),
64
+ /* @__PURE__ */ n("path", { d: "M17 10H15.5C15.5 13.0376 13.0376 15.5 10 15.5V17V18.5C14.6944 18.5 18.5 14.6944 18.5 10H17ZM10 17V15.5C6.96243 15.5 4.5 13.0376 4.5 10H3H1.5C1.5 14.6944 5.30558 18.5 10 18.5V17ZM3 10H4.5C4.5 6.96243 6.96243 4.5 10 4.5V3V1.5C5.30558 1.5 1.5 5.30558 1.5 10H3ZM10 3V4.5C13.0376 4.5 15.5 6.96243 15.5 10H17H18.5C18.5 5.30558 14.6944 1.5 10 1.5V3Z" }),
65
+ /* @__PURE__ */ n("defs", { children: /* @__PURE__ */ n("clipPath", {
66
+ id: "paint0_angular_1842_200_clip_path",
67
+ children: /* @__PURE__ */ n("path", { d: "M17 10H15.5C15.5 13.0376 13.0376 15.5 10 15.5V17V18.5C14.6944 18.5 18.5 14.6944 18.5 10H17ZM10 17V15.5C6.96243 15.5 4.5 13.0376 4.5 10H3H1.5C1.5 14.6944 5.30558 18.5 10 18.5V17ZM3 10H4.5C4.5 6.96243 6.96243 4.5 10 4.5V3V1.5C5.30558 1.5 1.5 5.30558 1.5 10H3ZM10 3V4.5C13.0376 4.5 15.5 6.96243 15.5 10H17H18.5C18.5 5.30558 14.6944 1.5 10 1.5V3Z" })
68
+ }) })
69
+ ]
70
+ });
82
71
  }
83
- export {
84
- d as IconSpinner
85
- };
72
+ //#endregion
73
+ export { i as IconSpinner };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),t=require("@devup-ui/react"),y=require("./IconSpinner.cjs");function f({variant:r="default",type:s="button",colors:e,danger:o=!1,children:n,size:p="md",className:m,icon:a,ellipsis:x=!1,typography:b,disabled:u,loading:i=!1,loadingSpinner:d="whole",...c}){return l.jsx(t.Button,{_active:{primary:{bg:"color-mix(in srgb, var(--primary, #674DC7) 100%, #000 30%)"},default:{bg:{true:"var(--error, #D52B2E)",false:"color-mix(in srgb, var(--primary, #8163E1) 20%, #FFF 80%)"}[o.toString()],border:{true:"1px solid var(--error, #D52B2E)",false:"1px solid var(--primary, #8163E1)"}[o.toString()],color:"var(--text, #272727)"}}[r],_disabled:{primary:{color:"#D6D7DE",bgColor:"#F0F0F3",cursor:"not-allowed"},default:{color:"#D6D7DE",bgColor:"#F0F0F3",cursor:"not-allowed",borderColor:"var(--border, #E4E4E4)"}}[r],_focusVisible:{outline:"2px solid",outlineColor:{primary:"var(--primaryFocus, #9385D3)",default:{true:"var(--error, #FF5B5E)",false:"var(--primaryFocus, #9385D3)"}[o.toString()]}[r]},_hover:{primary:{bg:"color-mix(in srgb, var(--primary, #674DC7) 100%, #000 15%)"},default:{borderColor:{true:"var(--error, #D52B2E)",false:"var(--primary, #8163E1)"}[o.toString()],bg:!o&&"color-mix(in srgb, var(--primary, #8163E1) 10%, #FFF 90%)"}}[r],_themeDark:{_active:{primary:{bg:"color-mix(in srgb, var(--primary, #8163E1) 100%, #FFF 30%);"},default:{bg:{true:"var(--error, #FF5B5E)",false:"var(--primary, #8163E1)"}[o.toString()],color:"var(--text, #F6F6F6)"}}[r],_disabled:{primary:{color:"#373737",bgColor:"#47474A",borderColor:"transparent"},default:{color:"#373737",bgColor:"#47474A",borderColor:"transparent"}}[r],_hover:{primary:{bg:"color-mix(in srgb, var(--primary, #8163E1) 100%, #FFF 15%);",outlineColor:"var(--primary, #674DC7)"},default:{borderColor:{true:"var(--error, #FF5B5E)",false:"var(--primary, #8163E1)"}[o.toString()],bg:!o&&"color-mix(in srgb, var(--primary, #674DC7) 10%, var(--inputBackground, #2E2E2E) 90%)"}}[r],_focusVisible:{outlineColor:{primary:"var(--primaryFocus, #927CE4)",default:{true:"var(--error, #D52B2E)",false:"var(--primaryFocus, #927CE4)"}[o.toString()]}[r]},bg:{primary:"var(--primary, #8163E1)",default:"var(--inputBackground, #2E2E2E)"}[r]},"aria-disabled":u,"aria-label":"button",bg:{primary:"var(--primary, #8163E1)",default:"var(--inputBackground, #FFF)"}[r],border:{primary:"none",default:"1px solid var(--border, #E4E4E4)"}[r],borderRadius:{primary:"8px",default:"10px"}[r],boxSizing:"border-box",className:m,color:{primary:"#FFF",default:{true:"var(--error, #D52B2E)",false:"var(--text, #272727)"}[o.toString()]}[r],cursor:"pointer",disabled:u,fontSize:{default:["14px",null,null,null,"15px"],primary:["15px",null,null,null,"16px"]}[r],fontWeight:700,letterSpacing:{default:["-0.02em",null,null,null,"-0.03em"],primary:["0px",null,null,null,"-0.01em"]}[r],outlineOffset:"2px",pos:"relative",px:{false:{sm:"12px",md:"16px",lg:"20px"}[p],true:{sm:"24px",md:"28px",lg:"32px"}[p]}[(!!(a||i)).toString()],py:{sm:"8px",md:"10px",lg:"12px"}[p],styleOrder:1,styleVars:{primary:e?.primary,error:e?.error,text:e?.text,border:e?.border,inputBackground:e?.inputBackground,primaryFocus:e?.primaryFocus},transition:".25s",type:s,typography:b,...c,children:l.jsxs(t.Box,{maxW:"100%",mx:"auto",pos:"relative",w:"fit-content",children:[(a||i)&&l.jsx(t.Center,{boxSize:"24px",left:"4px",pos:"absolute",role:"presentation",selectors:{"&>svg":{color:"inherit"}},top:"50%",transform:"translate(-100%, -50%)",children:i?l.jsx(y.IconSpinner,{type:d}):a}),l.jsx(t.Box,{className:x?t.css({overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}):void 0,lineHeight:"1.2",minH:"1.2em",transform:!!(a||i)&&"translateX(8px)",children:n})]})})}exports.Button=f;
1
+ require(`../../_virtual/_rolldown/runtime.cjs`);const e=require(`./IconSpinner.cjs`);let t=require(`@devup-ui/react`),n=require(`react/jsx-runtime`);function r({variant:r=`default`,type:i=`button`,colors:a,danger:o=!1,children:s,size:c=`md`,className:l,icon:u,ellipsis:d=!1,typography:f,disabled:p,loading:m=!1,loadingSpinner:h=`whole`,...g}){return(0,n.jsx)(t.Button,{_active:{primary:{bg:`color-mix(in srgb, var(--primary, #674DC7) 100%, #000 30%)`},default:{bg:{true:`var(--error, #D52B2E)`,false:`color-mix(in srgb, var(--primary, #8163E1) 20%, #FFF 80%)`}[o.toString()],border:{true:`1px solid var(--error, #D52B2E)`,false:`1px solid var(--primary, #8163E1)`}[o.toString()],color:`var(--text, #272727)`}}[r],_disabled:{primary:{color:`#D6D7DE`,bgColor:`#F0F0F3`,cursor:`not-allowed`},default:{color:`#D6D7DE`,bgColor:`#F0F0F3`,cursor:`not-allowed`,borderColor:`var(--border, #E4E4E4)`}}[r],_focusVisible:{outline:`2px solid`,outlineColor:{primary:`var(--primaryFocus, #9385D3)`,default:{true:`var(--error, #FF5B5E)`,false:`var(--primaryFocus, #9385D3)`}[o.toString()]}[r]},_hover:{primary:{bg:`color-mix(in srgb, var(--primary, #674DC7) 100%, #000 15%)`},default:{borderColor:{true:`var(--error, #D52B2E)`,false:`var(--primary, #8163E1)`}[o.toString()],bg:!o&&`color-mix(in srgb, var(--primary, #8163E1) 10%, #FFF 90%)`}}[r],_themeDark:{_active:{primary:{bg:`color-mix(in srgb, var(--primary, #8163E1) 100%, #FFF 30%);`},default:{bg:{true:`var(--error, #FF5B5E)`,false:`var(--primary, #8163E1)`}[o.toString()],color:`var(--text, #F6F6F6)`}}[r],_disabled:{primary:{color:`#373737`,bgColor:`#47474A`,borderColor:`transparent`},default:{color:`#373737`,bgColor:`#47474A`,borderColor:`transparent`}}[r],_hover:{primary:{bg:`color-mix(in srgb, var(--primary, #8163E1) 100%, #FFF 15%);`,outlineColor:`var(--primary, #674DC7)`},default:{borderColor:{true:`var(--error, #FF5B5E)`,false:`var(--primary, #8163E1)`}[o.toString()],bg:!o&&`color-mix(in srgb, var(--primary, #674DC7) 10%, var(--inputBackground, #2E2E2E) 90%)`}}[r],_focusVisible:{outlineColor:{primary:`var(--primaryFocus, #927CE4)`,default:{true:`var(--error, #D52B2E)`,false:`var(--primaryFocus, #927CE4)`}[o.toString()]}[r]},bg:{primary:`var(--primary, #8163E1)`,default:`var(--inputBackground, #2E2E2E)`}[r]},"aria-disabled":p,"aria-label":`button`,bg:{primary:`var(--primary, #8163E1)`,default:`var(--inputBackground, #FFF)`}[r],border:{primary:`none`,default:`1px solid var(--border, #E4E4E4)`}[r],borderRadius:{primary:`8px`,default:`10px`}[r],boxSizing:`border-box`,className:l,color:{primary:`#FFF`,default:{true:`var(--error, #D52B2E)`,false:`var(--text, #272727)`}[o.toString()]}[r],cursor:`pointer`,disabled:p,fontSize:{default:[`14px`,null,null,null,`15px`],primary:[`15px`,null,null,null,`16px`]}[r],fontWeight:700,letterSpacing:{default:[`-0.02em`,null,null,null,`-0.03em`],primary:[`0px`,null,null,null,`-0.01em`]}[r],outlineOffset:`2px`,pos:`relative`,px:{false:{sm:`12px`,md:`16px`,lg:`20px`}[c],true:{sm:`24px`,md:`28px`,lg:`32px`}[c]}[(!!(u||m)).toString()],py:{sm:`8px`,md:`10px`,lg:`12px`}[c],styleOrder:1,styleVars:{primary:a?.primary,error:a?.error,text:a?.text,border:a?.border,inputBackground:a?.inputBackground,primaryFocus:a?.primaryFocus},transition:`.25s`,type:i,typography:f,...g,children:(0,n.jsxs)(t.Box,{maxW:`100%`,mx:`auto`,pos:`relative`,w:`fit-content`,children:[(u||m)&&(0,n.jsx)(t.Center,{boxSize:`24px`,left:`4px`,pos:`absolute`,role:`presentation`,selectors:{"&>svg":{color:`inherit`}},top:`50%`,transform:`translate(-100%, -50%)`,children:m?(0,n.jsx)(e.IconSpinner,{type:h}):u}),(0,n.jsx)(t.Box,{className:d?(0,t.css)({overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`}):void 0,lineHeight:`1.2`,minH:`1.2em`,transform:!!(u||m)&&`translateX(8px)`,children:s})]})})}exports.Button=r;