@szum-tech/design-system 2.6.0 → 3.0.0

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 (126) hide show
  1. package/dist/chunk-2Y2ZCPNV.cjs +61 -0
  2. package/dist/chunk-3376ZTRC.cjs +2 -0
  3. package/dist/chunk-3KMXFN6M.cjs +141 -0
  4. package/dist/chunk-5AA4IE2T.cjs +27 -0
  5. package/dist/chunk-5F2Y65JH.js +32 -0
  6. package/dist/chunk-6BSR3O2J.js +53 -0
  7. package/dist/chunk-BYXBJQAS.js +1 -0
  8. package/dist/{chunk-5RNHEHRL.js → chunk-DP7UEOTA.js} +173 -176
  9. package/dist/chunk-HCHVDUI6.cjs +34 -0
  10. package/dist/chunk-HD7ZDQWW.js +173 -0
  11. package/dist/chunk-I3RSTJP6.js +20 -0
  12. package/dist/chunk-I7AV5IQO.cjs +33 -0
  13. package/dist/chunk-N4O2GO6V.cjs +204 -0
  14. package/dist/chunk-NGVFYKAT.js +29 -0
  15. package/dist/chunk-NU5UQPBX.cjs +25 -0
  16. package/dist/chunk-OQCNPNPS.js +23 -0
  17. package/dist/chunk-S3ANEJJ7.cjs +22 -0
  18. package/dist/chunk-U4AWAABZ.js +4901 -0
  19. package/dist/chunk-UGSNASZM.js +25 -0
  20. package/dist/{chunk-Q2IKZZ3U.cjs → chunk-UIOBJSKZ.cjs} +2 -3
  21. package/dist/chunk-WJSS32MY.js +130 -0
  22. package/dist/{chunk-RXYZURP4.js → chunk-XJIUGEPN.js} +2 -3
  23. package/dist/chunk-Y6EVJSAH.cjs +4928 -0
  24. package/dist/{chunk-AIXT3Q3I.cjs → chunk-ZV4467OW.cjs} +176 -185
  25. package/dist/components/alert-dialog/index.cjs +1 -0
  26. package/dist/components/alert-dialog/index.js +1 -0
  27. package/dist/components/avatar/index.cjs +5 -4
  28. package/dist/components/avatar/index.d.cts +5 -19
  29. package/dist/components/avatar/index.d.ts +5 -19
  30. package/dist/components/avatar/index.js +2 -1
  31. package/dist/components/badge/index.cjs +1 -0
  32. package/dist/components/badge/index.js +1 -0
  33. package/dist/components/button/index.cjs +23 -3
  34. package/dist/components/button/index.d.cts +8 -15
  35. package/dist/components/button/index.d.ts +8 -15
  36. package/dist/components/button/index.js +22 -2
  37. package/dist/components/card/index.cjs +12 -7
  38. package/dist/components/card/index.d.cts +8 -5
  39. package/dist/components/card/index.d.ts +8 -5
  40. package/dist/components/card/index.js +2 -1
  41. package/dist/components/checkbox/index.cjs +12 -0
  42. package/dist/components/checkbox/index.d.cts +8 -0
  43. package/dist/components/checkbox/index.d.ts +8 -0
  44. package/dist/components/checkbox/index.js +3 -0
  45. package/dist/components/dialog/index.cjs +1 -0
  46. package/dist/components/dialog/index.d.cts +1 -1
  47. package/dist/components/dialog/index.d.ts +1 -1
  48. package/dist/components/dialog/index.js +1 -0
  49. package/dist/components/field/index.cjs +50 -0
  50. package/dist/components/field/index.d.cts +50 -0
  51. package/dist/components/field/index.d.ts +50 -0
  52. package/dist/components/field/index.js +5 -0
  53. package/dist/components/header/index.cjs +1 -0
  54. package/dist/components/header/index.js +1 -0
  55. package/dist/components/index.cjs +155 -82
  56. package/dist/components/index.d.cts +8 -8
  57. package/dist/components/index.d.ts +8 -8
  58. package/dist/components/index.js +13 -12
  59. package/dist/components/input/index.cjs +3 -2
  60. package/dist/components/input/index.d.cts +2 -4
  61. package/dist/components/input/index.d.ts +2 -4
  62. package/dist/components/input/index.js +2 -1
  63. package/dist/components/item/index.cjs +49 -0
  64. package/dist/components/item/index.d.cts +60 -0
  65. package/dist/components/item/index.d.ts +60 -0
  66. package/dist/components/item/index.js +4 -0
  67. package/dist/components/label/index.cjs +3 -2
  68. package/dist/components/label/index.js +2 -1
  69. package/dist/components/select/index.cjs +20 -3
  70. package/dist/components/select/index.d.cts +20 -6
  71. package/dist/components/select/index.d.ts +20 -6
  72. package/dist/components/select/index.js +2 -1
  73. package/dist/components/separator/index.cjs +3 -2
  74. package/dist/components/separator/index.js +2 -1
  75. package/dist/components/sheet/index.cjs +1 -0
  76. package/dist/components/sheet/index.d.cts +1 -1
  77. package/dist/components/sheet/index.d.ts +1 -1
  78. package/dist/components/sheet/index.js +1 -0
  79. package/dist/components/spinner/index.cjs +1 -0
  80. package/dist/components/spinner/index.js +1 -0
  81. package/dist/components/stepper/index.cjs +32 -31
  82. package/dist/components/stepper/index.js +13 -12
  83. package/dist/components/textarea/index.cjs +4 -2
  84. package/dist/components/textarea/index.d.cts +2 -2
  85. package/dist/components/textarea/index.d.ts +2 -2
  86. package/dist/components/textarea/index.js +3 -1
  87. package/dist/components/tooltip/index.cjs +1 -0
  88. package/dist/components/tooltip/index.js +1 -0
  89. package/dist/contexts/index.cjs +1 -0
  90. package/dist/contexts/index.js +1 -0
  91. package/dist/hooks/index.cjs +1 -0
  92. package/dist/hooks/index.js +1 -0
  93. package/dist/icons/index.cjs +89 -18
  94. package/dist/icons/index.js +88 -1
  95. package/dist/utils/index.cjs +1 -0
  96. package/dist/utils/index.js +1 -0
  97. package/package.json +8 -9
  98. package/tailwind/global.css +5 -9
  99. package/tailwind/palette.css +149 -204
  100. package/tailwind/typography.css +33 -57
  101. package/dist/chunk-36YD6ICC.js +0 -70
  102. package/dist/chunk-3DSBDIFJ.cjs +0 -31
  103. package/dist/chunk-4NO6IM75.cjs +0 -40
  104. package/dist/chunk-5PBHBOXI.js +0 -30
  105. package/dist/chunk-EU7G37IS.js +0 -36
  106. package/dist/chunk-FVSO3RHT.cjs +0 -17
  107. package/dist/chunk-G6VXQ7DJ.cjs +0 -63
  108. package/dist/chunk-IAI7BIAG.js +0 -31
  109. package/dist/chunk-K4TRAPRN.cjs +0 -341
  110. package/dist/chunk-MI3CQBHC.js +0 -60
  111. package/dist/chunk-OIWEXHFE.cjs +0 -33
  112. package/dist/chunk-P4J2TTH7.cjs +0 -32
  113. package/dist/chunk-UKWZ5BHD.cjs +0 -93
  114. package/dist/chunk-V5OVQTDR.js +0 -24
  115. package/dist/chunk-VZKTT6CG.js +0 -15
  116. package/dist/chunk-XTO7CMIM.js +0 -88
  117. package/dist/chunk-YJFJLF7Y.js +0 -319
  118. package/dist/chunk-ZZ3EBGSD.cjs +0 -72
  119. package/dist/components/form/index.cjs +0 -54
  120. package/dist/components/form/index.d.cts +0 -32
  121. package/dist/components/form/index.d.ts +0 -32
  122. package/dist/components/form/index.js +0 -21
  123. package/dist/components/helper-text/index.cjs +0 -10
  124. package/dist/components/helper-text/index.d.cts +0 -18
  125. package/dist/components/helper-text/index.d.ts +0 -18
  126. package/dist/components/helper-text/index.js +0 -1
@@ -1,36 +0,0 @@
1
- import { cn } from './chunk-ZD2QRAOX.js';
2
- import { Avatar as Avatar$1 } from 'radix-ui';
3
- import { cva } from 'class-variance-authority';
4
- import { jsx } from 'react/jsx-runtime';
5
-
6
- var avatarCva = cva("relative flex shrink-0 overflow-hidden rounded text-gray-100", {
7
- variants: {
8
- size: {
9
- sm: "size-6 text-xs",
10
- md: "size-10 text-lg",
11
- lg: "size-14 text-2xl"
12
- }
13
- },
14
- defaultVariants: {
15
- size: "md"
16
- }
17
- });
18
- function Avatar({ className, size = "md", ref, ...props }) {
19
- const avatarStyles = avatarCva({ size });
20
- return /* @__PURE__ */ jsx(Avatar$1.Root, { ref, className: cn(avatarStyles, className), ...props });
21
- }
22
- function AvatarImage({ className, ref, ...props }) {
23
- return /* @__PURE__ */ jsx(Avatar$1.Image, { ref, className: cn("aspect-square h-full w-full", className), ...props });
24
- }
25
- function AvatarFallback({ className, ref, ...props }) {
26
- return /* @__PURE__ */ jsx(
27
- Avatar$1.Fallback,
28
- {
29
- ref,
30
- className: cn("flex h-full w-full items-center justify-center bg-gray-600", className),
31
- ...props
32
- }
33
- );
34
- }
35
-
36
- export { Avatar, AvatarFallback, AvatarImage };
@@ -1,17 +0,0 @@
1
- 'use strict';
2
-
3
- var chunkH2BWO3SI_cjs = require('./chunk-H2BWO3SI.cjs');
4
- var radixUi = require('radix-ui');
5
- var jsxRuntime = require('react/jsx-runtime');
6
-
7
- function Label({ className, ...props }) {
8
- return /* @__PURE__ */ jsxRuntime.jsx(
9
- radixUi.Label.Root,
10
- {
11
- className: chunkH2BWO3SI_cjs.cn("text-subtitle-1 peer-disabled:cursor-not-allowed peer-disabled:opacity-70", className),
12
- ...props
13
- }
14
- );
15
- }
16
-
17
- exports.Label = Label;
@@ -1,63 +0,0 @@
1
- 'use strict';
2
-
3
- var chunkH2BWO3SI_cjs = require('./chunk-H2BWO3SI.cjs');
4
- var lucideReact = require('lucide-react');
5
- var radixUi = require('radix-ui');
6
- var classVarianceAuthority = require('class-variance-authority');
7
- var jsxRuntime = require('react/jsx-runtime');
8
-
9
- var selectCva = classVarianceAuthority.cva(
10
- [
11
- "bg-app-foreground font-poppins text-body-2 inline-flex h-10 w-full items-center justify-between gap-2 border py-2 pl-3 pr-1.5 outline-0 transition-colors duration-300 ease-in-out [&>span]:line-clamp-1",
12
- "data-[placeholder]:select-none data-[placeholder]:text-gray-400",
13
- "invalid:border-error-500 focus:border-primary-500 active:border-primary-500",
14
- "disabled:cursor-not-allowed disabled:border-gray-800 disabled:text-gray-300 disabled:placeholder:text-gray-600 disabled:[&>svg]:text-gray-300"
15
- ],
16
- {
17
- variants: {
18
- invalid: {
19
- true: ["text-error-500 border-error-500 hover:border-error-400 focus:text-gray-100"],
20
- false: ["hover:border-primary-600 border-gray-600 text-gray-100"]
21
- }
22
- },
23
- defaultVariants: {
24
- invalid: false
25
- }
26
- }
27
- );
28
- function Select({ children, placeholder, invalid = false, ref, ...props }) {
29
- const selectStyles = selectCva({ invalid });
30
- return /* @__PURE__ */ jsxRuntime.jsxs(radixUi.Select.Root, { ...props, children: [
31
- /* @__PURE__ */ jsxRuntime.jsxs(radixUi.Select.Trigger, { className: selectStyles, ref, "aria-invalid": invalid || void 0, children: [
32
- /* @__PURE__ */ jsxRuntime.jsx(radixUi.Select.Value, { placeholder }),
33
- /* @__PURE__ */ jsxRuntime.jsx(radixUi.Select.Icon, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDown, { className: "size-5 text-gray-100" }) })
34
- ] }),
35
- /* @__PURE__ */ jsxRuntime.jsx(radixUi.Select.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
36
- radixUi.Select.Content,
37
- {
38
- sideOffset: 4,
39
- className: "bg-app-foreground z-50 w-full overflow-hidden border border-gray-800 py-1",
40
- children: /* @__PURE__ */ jsxRuntime.jsx(radixUi.Select.Viewport, { children })
41
- }
42
- ) })
43
- ] });
44
- }
45
- function SelectItem({ children, className, ...props }) {
46
- return /* @__PURE__ */ jsxRuntime.jsxs(
47
- radixUi.Select.Item,
48
- {
49
- className: chunkH2BWO3SI_cjs.cn(
50
- "text-body-2 data-[state=checked]:bg-primary-500 data-[state=checked]:text-app-foreground flex w-full flex-row items-center justify-between px-3 py-2 text-gray-100 select-none data-[disabled]:pointer-events-none data-[highlighted]:bg-gray-900 data-[highlighted]:outline-none data-[state=checked]:outline-none",
51
- className
52
- ),
53
- ...props,
54
- children: [
55
- /* @__PURE__ */ jsxRuntime.jsx(radixUi.Select.ItemText, { className: "flex-1", children }),
56
- /* @__PURE__ */ jsxRuntime.jsx(radixUi.Select.ItemIndicator, { children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className: "size-4" }) })
57
- ]
58
- }
59
- );
60
- }
61
-
62
- exports.Select = Select;
63
- exports.SelectItem = SelectItem;
@@ -1,31 +0,0 @@
1
- import { cva } from 'class-variance-authority';
2
- import { jsx } from 'react/jsx-runtime';
3
-
4
- // src/components/textarea/textarea.styles.tsx
5
- var textareaCva = cva(
6
- [
7
- "bg-app-foreground font-poppins h-28 min-h-10 w-full appearance-none border px-3 py-2 outline-0 transition-colors duration-300 ease-in-out",
8
- "placeholder:select-none placeholder:text-gray-400",
9
- "invalid:border-error-500",
10
- "focus:border-primary-500",
11
- "active:border-primary-500",
12
- "disabled:cursor-not-allowed disabled:border-gray-800 disabled:text-gray-300 disabled:placeholder:text-gray-600"
13
- ],
14
- {
15
- variants: {
16
- invalid: {
17
- true: ["text-error-500 border-error-500 hover:border-error-400 focus:text-gray-100"],
18
- false: ["hover:border-primary-600 border-gray-600 text-gray-100"]
19
- }
20
- },
21
- defaultVariants: {
22
- invalid: false
23
- }
24
- }
25
- );
26
- function Textarea({ invalid = false, ...props }) {
27
- const textareaStyles = textareaCva({ invalid });
28
- return /* @__PURE__ */ jsx("textarea", { "aria-invalid": invalid || void 0, className: textareaStyles, ...props });
29
- }
30
-
31
- export { Textarea };
@@ -1,341 +0,0 @@
1
- 'use strict';
2
-
3
- var chunkUKWZ5BHD_cjs = require('./chunk-UKWZ5BHD.cjs');
4
- var React = require('react');
5
- var reactSlot = require('@radix-ui/react-slot');
6
- var classVarianceAuthority = require('class-variance-authority');
7
- var jsxRuntime = require('react/jsx-runtime');
8
-
9
- function _interopNamespace(e) {
10
- if (e && e.__esModule) return e;
11
- var n = Object.create(null);
12
- if (e) {
13
- Object.keys(e).forEach(function (k) {
14
- if (k !== 'default') {
15
- var d = Object.getOwnPropertyDescriptor(e, k);
16
- Object.defineProperty(n, k, d.get ? d : {
17
- enumerable: true,
18
- get: function () { return e[k]; }
19
- });
20
- }
21
- });
22
- }
23
- n.default = e;
24
- return Object.freeze(n);
25
- }
26
-
27
- var React__namespace = /*#__PURE__*/_interopNamespace(React);
28
-
29
- var buttonCva = classVarianceAuthority.cva(
30
- [
31
- "inline-flex cursor-pointer items-center justify-center align-middle no-underline transition-colors duration-300 ease-in-out",
32
- "select-none appearance-none rounded-sm border font-sans font-medium tracking-[.02857em]",
33
- "aria-disabled:pointer-events-none aria-disabled:cursor-not-allowed aria-disabled:opacity-50"
34
- ],
35
- {
36
- variants: {
37
- fullWidth: {
38
- true: "w-full"
39
- },
40
- color: {
41
- neutral: "",
42
- primary: "",
43
- success: "",
44
- warning: "",
45
- error: ""
46
- },
47
- size: {
48
- sm: "px-2.5 py-1 text-[.8125rem] leading-4",
49
- md: "px-4 py-1.5 text-[0.875rem] leading-5",
50
- lg: "px-5 py-2 text-[.9375rem] leading-6"
51
- },
52
- variant: {
53
- text: "border-transparent bg-transparent",
54
- outlined: "bg-transparent",
55
- contained: ""
56
- }
57
- },
58
- compoundVariants: [
59
- // ---------- TEXT ---------- //
60
- {
61
- variant: "text",
62
- color: "neutral",
63
- class: [
64
- "text-gray-100",
65
- "hover:text-app-foreground hover:border-gray-500 hover:bg-gray-500",
66
- "active:border-gray-600 active:bg-gray-600"
67
- ]
68
- },
69
- {
70
- variant: "text",
71
- color: "primary",
72
- class: [
73
- "text-primary-500",
74
- "hover:border-primary-500 hover:bg-primary-500 hover:text-white",
75
- "active:border-primary-600 active:bg-primary-600 active:text-white"
76
- ]
77
- },
78
- {
79
- variant: "text",
80
- color: "success",
81
- class: [
82
- "text-success-500",
83
- "hover:border-success-500 hover:bg-success-500 hover:text-white",
84
- "active:border-success-600 active:bg-success-600 active:text-white"
85
- ]
86
- },
87
- {
88
- variant: "text",
89
- color: "warning",
90
- class: [
91
- "text-warning-500",
92
- "hover:border-warning-500 hover:bg-warning-500 hover:text-white",
93
- "active:border-warning-600 active:bg-warning-600 active:text-white"
94
- ]
95
- },
96
- {
97
- variant: "text",
98
- color: "error",
99
- class: [
100
- "text-error-500",
101
- "hover:border-error-500 hover:bg-error-500 hover:text-white",
102
- "active:border-error-600 active:bg-error-600 active:text-white"
103
- ]
104
- },
105
- // ---------- OUTLINED ---------- //
106
- {
107
- variant: "outlined",
108
- color: "neutral",
109
- class: ["border-gray-500 text-gray-100", "hover:text-app-foreground hover:bg-gray-500", "active:bg-gray-600"]
110
- },
111
- {
112
- variant: "outlined",
113
- color: "primary",
114
- class: [
115
- "text-primary-500 border-primary-500",
116
- "hover:bg-primary-500 hover:text-white",
117
- "active:bg-primary-600 active:text-white"
118
- ]
119
- },
120
- {
121
- variant: "outlined",
122
- color: "success",
123
- class: [
124
- "text-success-500 border-success-500",
125
- "hover:bg-success-500 hover:text-white",
126
- "active:bg-success-600 active:text-white"
127
- ]
128
- },
129
- {
130
- variant: "outlined",
131
- color: "warning",
132
- class: [
133
- "text-warning-500 border-warning-500",
134
- "hover:bg-warning-500 hover:text-white",
135
- "active:bg-warning-600 active:text-white"
136
- ]
137
- },
138
- {
139
- variant: "outlined",
140
- color: "error",
141
- class: [
142
- "text-error-500 border-error-500",
143
- "hover:bg-error-500 hover:text-white",
144
- "active:bg-error-600 active:text-white"
145
- ]
146
- },
147
- // ---------- OUTLINED ---------- //
148
- {
149
- variant: "contained",
150
- color: "neutral",
151
- class: [
152
- "border-gray-500 bg-gray-500 text-gray-100",
153
- "hover:text-app-foreground hover:border-gray-400 hover:bg-gray-400",
154
- "active:border-gray-600 active:bg-gray-600"
155
- ]
156
- },
157
- {
158
- variant: "contained",
159
- color: "primary",
160
- class: [
161
- "border-primary-500 bg-primary-500 text-white",
162
- "hover:border-primary-400 hover:bg-primary-400",
163
- "active:border-primary-600 active:bg-primary-600"
164
- ]
165
- },
166
- {
167
- variant: "contained",
168
- color: "success",
169
- class: [
170
- "border-success-500 bg-success-500 text-white",
171
- "hover:border-success-400 hover:bg-success-400",
172
- "active:border-success-600 active:bg-success-600"
173
- ]
174
- },
175
- {
176
- variant: "contained",
177
- color: "warning",
178
- class: [
179
- "border-warning-500 bg-warning-500 text-white",
180
- "hover:border-warning-400 hover:bg-warning-400",
181
- "active:border-warning-600 active:bg-warning-600"
182
- ]
183
- },
184
- {
185
- variant: "contained",
186
- color: "error",
187
- class: [
188
- "border-error-500 bg-error-500 text-white",
189
- "hover:border-error-400 hover:bg-error-400",
190
- "active:border-error-600 active:bg-error-600"
191
- ]
192
- }
193
- ],
194
- defaultVariants: {
195
- fullWidth: false,
196
- color: "primary",
197
- size: "md",
198
- variant: "text"
199
- }
200
- }
201
- );
202
- var iconContainerCva = classVarianceAuthority.cva("", {
203
- variants: {
204
- site: {
205
- left: "",
206
- right: ""
207
- },
208
- size: {
209
- sm: "",
210
- md: "",
211
- lg: ""
212
- }
213
- },
214
- compoundVariants: [
215
- // ---------- LEFT ---------- //
216
- {
217
- site: "left",
218
- size: "sm",
219
- class: "-ml-0.5 mr-1.5"
220
- },
221
- {
222
- site: "left",
223
- size: "md",
224
- class: "-ml-1 mr-2"
225
- },
226
- {
227
- site: "left",
228
- size: "lg",
229
- class: "-ml-1.5 mr-2.5"
230
- },
231
- // ---------- RIGHT ---------- //
232
- {
233
- site: "right",
234
- size: "sm",
235
- class: "-mr-0.5 ml-1.5"
236
- },
237
- {
238
- site: "right",
239
- size: "md",
240
- class: "-mr-1 ml-2"
241
- },
242
- {
243
- site: "right",
244
- size: "lg",
245
- class: "-mr-1.5 ml-2.5"
246
- }
247
- ],
248
- defaultVariants: {
249
- site: "left",
250
- size: "md"
251
- }
252
- });
253
- var iconCva = classVarianceAuthority.cva("", {
254
- variants: {
255
- loading: {
256
- true: "animate-spin motion-reduce:hidden"
257
- },
258
- size: {
259
- sm: "h-4.5 w-4.5",
260
- md: "size-5",
261
- lg: "h-5.5 w-5.5"
262
- }
263
- },
264
- defaultVariants: {
265
- loading: false,
266
- size: "md"
267
- }
268
- });
269
- function Button({
270
- asChild = false,
271
- variant = "text",
272
- color = "primary",
273
- disabled = false,
274
- fullWidth = false,
275
- loadingPosition = "start",
276
- ref,
277
- ...props
278
- }) {
279
- const {
280
- children,
281
- type = "button",
282
- loading = false,
283
- size = "md",
284
- endIcon,
285
- startIcon,
286
- ...rest
287
- } = { ...props, loadingPosition };
288
- const Comp = asChild ? reactSlot.Slot : "button";
289
- const buttonStyles = buttonCva({ fullWidth, size, variant, color });
290
- const isDisabled = disabled || loading;
291
- return /* @__PURE__ */ jsxRuntime.jsx(
292
- Comp,
293
- {
294
- ...asChild ? props : rest,
295
- "aria-disabled": isDisabled || void 0,
296
- className: buttonStyles,
297
- "data-state": loading ? "loading" : void 0,
298
- disabled: isDisabled,
299
- ref,
300
- role: Comp !== "button" ? "button" : void 0,
301
- tabIndex: isDisabled ? -1 : 0,
302
- type: Comp === "button" ? type : void 0,
303
- children: asChild ? /* @__PURE__ */ jsxRuntime.jsx(ButtonContent, { children }) : /* @__PURE__ */ jsxRuntime.jsx(ButtonContent, { ...props })
304
- }
305
- );
306
- }
307
- function ButtonContent({
308
- children,
309
- loading = false,
310
- size = "md",
311
- loadingPosition = "start",
312
- startIcon,
313
- endIcon,
314
- ...props
315
- }) {
316
- const isStartLoading = loading && loadingPosition === "start";
317
- const StartIcon = isStartLoading ? /* @__PURE__ */ jsxRuntime.jsx(chunkUKWZ5BHD_cjs.LoadingIcon, { "aria-label": "Loading" }) : startIcon || null;
318
- const startIconStyles = iconCva({ size, loading: isStartLoading });
319
- const startIconContainerStyles = iconContainerCva({ size, site: "left" });
320
- const isEndLoading = loading && loadingPosition === "end";
321
- const EndIcon = isEndLoading ? /* @__PURE__ */ jsxRuntime.jsx(chunkUKWZ5BHD_cjs.LoadingIcon, { "aria-label": "Loading" }) : endIcon || null;
322
- const endIconStyles = iconCva({ size, loading: isEndLoading });
323
- const endIconContainerStyles = iconContainerCva({ size, site: "right" });
324
- const LeadingIcon = StartIcon ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: startIconContainerStyles, role: isStartLoading ? "progressbar" : void 0, children: React__namespace.cloneElement(StartIcon, { className: startIconStyles }) }) : null;
325
- const TrailingIcon = EndIcon ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: endIconContainerStyles, role: isEndLoading ? "progressbar" : void 0, children: React__namespace.cloneElement(EndIcon, { className: endIconStyles }) }) : null;
326
- return React__namespace.isValidElement(children) ? React__namespace.cloneElement(
327
- children,
328
- props,
329
- /* @__PURE__ */ jsxRuntime.jsxs(React__namespace.Fragment, { children: [
330
- LeadingIcon,
331
- React__namespace.isValidElement(children) ? children.props?.children : null,
332
- TrailingIcon
333
- ] })
334
- ) : /* @__PURE__ */ jsxRuntime.jsxs(React__namespace.Fragment, { children: [
335
- LeadingIcon,
336
- children,
337
- TrailingIcon
338
- ] });
339
- }
340
-
341
- exports.Button = Button;
@@ -1,60 +0,0 @@
1
- import { cn } from './chunk-ZD2QRAOX.js';
2
- import { ChevronDown, Check } from 'lucide-react';
3
- import { Select as Select$1 } from 'radix-ui';
4
- import { cva } from 'class-variance-authority';
5
- import { jsxs, jsx } from 'react/jsx-runtime';
6
-
7
- var selectCva = cva(
8
- [
9
- "bg-app-foreground font-poppins text-body-2 inline-flex h-10 w-full items-center justify-between gap-2 border py-2 pl-3 pr-1.5 outline-0 transition-colors duration-300 ease-in-out [&>span]:line-clamp-1",
10
- "data-[placeholder]:select-none data-[placeholder]:text-gray-400",
11
- "invalid:border-error-500 focus:border-primary-500 active:border-primary-500",
12
- "disabled:cursor-not-allowed disabled:border-gray-800 disabled:text-gray-300 disabled:placeholder:text-gray-600 disabled:[&>svg]:text-gray-300"
13
- ],
14
- {
15
- variants: {
16
- invalid: {
17
- true: ["text-error-500 border-error-500 hover:border-error-400 focus:text-gray-100"],
18
- false: ["hover:border-primary-600 border-gray-600 text-gray-100"]
19
- }
20
- },
21
- defaultVariants: {
22
- invalid: false
23
- }
24
- }
25
- );
26
- function Select({ children, placeholder, invalid = false, ref, ...props }) {
27
- const selectStyles = selectCva({ invalid });
28
- return /* @__PURE__ */ jsxs(Select$1.Root, { ...props, children: [
29
- /* @__PURE__ */ jsxs(Select$1.Trigger, { className: selectStyles, ref, "aria-invalid": invalid || void 0, children: [
30
- /* @__PURE__ */ jsx(Select$1.Value, { placeholder }),
31
- /* @__PURE__ */ jsx(Select$1.Icon, { asChild: true, children: /* @__PURE__ */ jsx(ChevronDown, { className: "size-5 text-gray-100" }) })
32
- ] }),
33
- /* @__PURE__ */ jsx(Select$1.Portal, { children: /* @__PURE__ */ jsx(
34
- Select$1.Content,
35
- {
36
- sideOffset: 4,
37
- className: "bg-app-foreground z-50 w-full overflow-hidden border border-gray-800 py-1",
38
- children: /* @__PURE__ */ jsx(Select$1.Viewport, { children })
39
- }
40
- ) })
41
- ] });
42
- }
43
- function SelectItem({ children, className, ...props }) {
44
- return /* @__PURE__ */ jsxs(
45
- Select$1.Item,
46
- {
47
- className: cn(
48
- "text-body-2 data-[state=checked]:bg-primary-500 data-[state=checked]:text-app-foreground flex w-full flex-row items-center justify-between px-3 py-2 text-gray-100 select-none data-[disabled]:pointer-events-none data-[highlighted]:bg-gray-900 data-[highlighted]:outline-none data-[state=checked]:outline-none",
49
- className
50
- ),
51
- ...props,
52
- children: [
53
- /* @__PURE__ */ jsx(Select$1.ItemText, { className: "flex-1", children }),
54
- /* @__PURE__ */ jsx(Select$1.ItemIndicator, { children: /* @__PURE__ */ jsx(Check, { className: "size-4" }) })
55
- ]
56
- }
57
- );
58
- }
59
-
60
- export { Select, SelectItem };
@@ -1,33 +0,0 @@
1
- 'use strict';
2
-
3
- var classVarianceAuthority = require('class-variance-authority');
4
- var jsxRuntime = require('react/jsx-runtime');
5
-
6
- // src/components/textarea/textarea.styles.tsx
7
- var textareaCva = classVarianceAuthority.cva(
8
- [
9
- "bg-app-foreground font-poppins h-28 min-h-10 w-full appearance-none border px-3 py-2 outline-0 transition-colors duration-300 ease-in-out",
10
- "placeholder:select-none placeholder:text-gray-400",
11
- "invalid:border-error-500",
12
- "focus:border-primary-500",
13
- "active:border-primary-500",
14
- "disabled:cursor-not-allowed disabled:border-gray-800 disabled:text-gray-300 disabled:placeholder:text-gray-600"
15
- ],
16
- {
17
- variants: {
18
- invalid: {
19
- true: ["text-error-500 border-error-500 hover:border-error-400 focus:text-gray-100"],
20
- false: ["hover:border-primary-600 border-gray-600 text-gray-100"]
21
- }
22
- },
23
- defaultVariants: {
24
- invalid: false
25
- }
26
- }
27
- );
28
- function Textarea({ invalid = false, ...props }) {
29
- const textareaStyles = textareaCva({ invalid });
30
- return /* @__PURE__ */ jsxRuntime.jsx("textarea", { "aria-invalid": invalid || void 0, className: textareaStyles, ...props });
31
- }
32
-
33
- exports.Textarea = Textarea;
@@ -1,32 +0,0 @@
1
- 'use strict';
2
-
3
- var tailwindMerge = require('tailwind-merge');
4
- var classVarianceAuthority = require('class-variance-authority');
5
- var jsxRuntime = require('react/jsx-runtime');
6
-
7
- // src/components/helper-text/helper-text.tsx
8
- var helperTextCva = classVarianceAuthority.cva("", {
9
- variants: {
10
- type: {
11
- description: "text-body-2 text-gray-300",
12
- error: "text-caption text-error-500"
13
- }
14
- },
15
- defaultVariants: {
16
- type: "description"
17
- }
18
- });
19
- function HelperText({ className, children, type = "description", role, ref, ...props }) {
20
- return /* @__PURE__ */ jsxRuntime.jsx(
21
- "p",
22
- {
23
- ref,
24
- className: tailwindMerge.twMerge(helperTextCva({ type }), className),
25
- role: type === "error" ? "alert" : role,
26
- ...props,
27
- children
28
- }
29
- );
30
- }
31
-
32
- exports.HelperText = HelperText;