@szum-tech/design-system 2.0.3 → 2.1.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.
- package/dist/chunk-463KEXY6.cjs +79 -0
- package/dist/chunk-4YZSPNLW.cjs +42 -0
- package/dist/chunk-5EN2HNFU.js +50 -0
- package/dist/chunk-5ENMEB5L.cjs +341 -0
- package/dist/chunk-AO4TMCYJ.js +88 -0
- package/dist/chunk-C5YRMEKV.js +319 -0
- package/dist/chunk-H2BWO3SI.cjs +0 -1
- package/dist/chunk-HFHADY43.js +36 -0
- package/dist/chunk-HIWVHD4V.js +56 -0
- package/dist/chunk-HXC3EALP.js +39 -0
- package/dist/chunk-IFBQNWVG.js +70 -0
- package/dist/chunk-INJBKPIE.js +88 -0
- package/dist/chunk-J264N6AZ.js +22 -0
- package/dist/chunk-J56UDYA3.js +70 -0
- package/dist/chunk-KPB3CBHE.cjs +40 -0
- package/dist/chunk-LI7IHIOM.cjs +30 -0
- package/dist/chunk-LND2W67K.cjs +17 -0
- package/dist/chunk-N7DXGCBJ.cjs +30 -0
- package/dist/chunk-PB3EGVTV.cjs +116 -0
- package/dist/chunk-QRSQCHBO.cjs +59 -0
- package/dist/chunk-RF5YR553.cjs +24 -0
- package/dist/chunk-TD2KDWNP.js +57 -0
- package/dist/chunk-TSN5DAKH.cjs +99 -0
- package/dist/chunk-US32J7DK.js +15 -0
- package/dist/chunk-UZBZFCWX.js +28 -0
- package/dist/chunk-V4POHGAW.cjs +60 -0
- package/dist/chunk-VFRIU5CV.cjs +16 -0
- package/dist/chunk-VQMM75HD.cjs +66 -0
- package/dist/chunk-WTVBTZ3P.js +29 -0
- package/dist/chunk-XGA2F5GG.cjs +72 -0
- package/dist/chunk-XPM62WMM.js +23 -0
- package/dist/chunk-YHU2OW52.js +14 -0
- package/dist/chunk-YXTTED5V.cjs +31 -0
- package/dist/chunk-ZD2QRAOX.js +0 -1
- package/dist/components/alert-dialog/index.cjs +43 -0
- package/dist/components/alert-dialog/index.d.cts +32 -0
- package/dist/components/alert-dialog/index.d.ts +32 -0
- package/dist/components/alert-dialog/index.js +2 -0
- package/dist/components/avatar/index.cjs +19 -0
- package/dist/components/avatar/index.d.cts +28 -0
- package/dist/components/avatar/index.d.ts +28 -0
- package/dist/components/avatar/index.js +2 -0
- package/dist/components/button/index.cjs +11 -0
- package/dist/components/button/index.d.cts +64 -0
- package/dist/components/button/index.d.ts +64 -0
- package/dist/components/button/index.js +2 -0
- package/dist/components/card/index.cjs +30 -0
- package/dist/components/card/index.d.cts +22 -0
- package/dist/components/card/index.d.ts +22 -0
- package/dist/components/card/index.js +1 -0
- package/dist/components/dialog/index.cjs +38 -0
- package/dist/components/dialog/index.d.cts +40 -0
- package/dist/components/dialog/index.d.ts +40 -0
- package/dist/components/dialog/index.js +1 -0
- package/dist/components/form/index.cjs +50 -0
- package/dist/components/form/index.d.cts +32 -0
- package/dist/components/form/index.d.ts +32 -0
- package/dist/components/form/index.js +17 -0
- package/dist/components/header/index.cjs +10 -0
- package/dist/components/header/index.d.cts +9 -0
- package/dist/components/header/index.d.ts +9 -0
- package/dist/components/header/index.js +1 -0
- package/dist/components/helper-text/index.cjs +10 -0
- package/dist/components/helper-text/index.d.cts +18 -0
- package/dist/components/helper-text/index.d.ts +18 -0
- package/dist/components/helper-text/index.js +1 -0
- package/dist/components/index.cjs +230 -0
- package/dist/components/index.d.cts +22 -0
- package/dist/components/index.d.ts +22 -0
- package/dist/components/index.js +17 -0
- package/dist/components/input/index.cjs +11 -0
- package/dist/components/input/index.d.cts +11 -0
- package/dist/components/input/index.d.ts +11 -0
- package/dist/components/input/index.js +2 -0
- package/dist/components/label/index.cjs +10 -0
- package/dist/components/label/index.d.cts +8 -0
- package/dist/components/label/index.d.ts +8 -0
- package/dist/components/label/index.js +1 -0
- package/dist/components/select/index.cjs +14 -0
- package/dist/components/select/index.d.cts +15 -0
- package/dist/components/select/index.d.ts +15 -0
- package/dist/components/select/index.js +1 -0
- package/dist/components/separator/index.cjs +11 -0
- package/dist/components/separator/index.d.cts +8 -0
- package/dist/components/separator/index.d.ts +8 -0
- package/dist/components/separator/index.js +2 -0
- package/dist/components/sheet/index.cjs +38 -0
- package/dist/components/sheet/index.d.cts +40 -0
- package/dist/components/sheet/index.d.ts +40 -0
- package/dist/components/sheet/index.js +1 -0
- package/dist/components/textarea/index.cjs +10 -0
- package/dist/components/textarea/index.d.cts +9 -0
- package/dist/components/textarea/index.d.ts +9 -0
- package/dist/components/textarea/index.js +1 -0
- package/dist/components/tooltip/index.cjs +14 -0
- package/dist/components/tooltip/index.d.cts +20 -0
- package/dist/components/tooltip/index.d.ts +20 -0
- package/dist/components/tooltip/index.js +1 -0
- package/dist/icons/index.cjs +22 -0
- package/dist/icons/index.js +1 -0
- package/dist/{utils.cjs → utils/index.cjs} +1 -1
- package/dist/utils/index.js +1 -0
- package/package.json +50 -38
- package/dist/chunk-EKHM64CK.js +0 -7290
- package/dist/chunk-G4TX2R77.cjs +0 -7613
- package/dist/icons.cjs +0 -1294
- package/dist/icons.js +0 -1
- package/dist/index.cjs +0 -906
- package/dist/index.d.cts +0 -285
- package/dist/index.d.ts +0 -285
- package/dist/index.js +0 -830
- package/dist/utils.js +0 -1
- package/dist/{icons.d.ts → icons/index.d.cts} +1 -1
- package/dist/{icons.d.cts → icons/index.d.ts} +1 -1
- /package/dist/{utils.d.cts → utils/index.d.cts} +0 -0
- /package/dist/{utils.d.ts → utils/index.d.ts} +0 -0
package/dist/index.js
DELETED
|
@@ -1,830 +0,0 @@
|
|
|
1
|
-
import { cn } from './chunk-ZD2QRAOX.js';
|
|
2
|
-
export { cn } from './chunk-ZD2QRAOX.js';
|
|
3
|
-
import { CaretSortIcon, CheckIcon, Cross1Icon, LoadingIcon } from './chunk-EKHM64CK.js';
|
|
4
|
-
import { Dialog as Dialog$1, AlertDialog as AlertDialog$1, Label as Label$1, Avatar as Avatar$1, Tooltip as Tooltip$1, Select as Select$1, Separator as Separator$1 } from 'radix-ui';
|
|
5
|
-
import { cva } from 'class-variance-authority';
|
|
6
|
-
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
7
|
-
import * as React from 'react';
|
|
8
|
-
import { Slot } from '@radix-ui/react-slot';
|
|
9
|
-
import { twMerge } from 'tailwind-merge';
|
|
10
|
-
import { useFormContext, FormProvider, Controller } from 'react-hook-form';
|
|
11
|
-
|
|
12
|
-
var avatarCva = cva("relative flex shrink-0 overflow-hidden rounded text-gray-100", {
|
|
13
|
-
variants: {
|
|
14
|
-
size: {
|
|
15
|
-
sm: "size-6 text-xs",
|
|
16
|
-
md: "size-10 text-lg",
|
|
17
|
-
lg: "size-14 text-2xl"
|
|
18
|
-
}
|
|
19
|
-
},
|
|
20
|
-
defaultVariants: {
|
|
21
|
-
size: "md"
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
function Avatar({ className, size, ref, ...props }) {
|
|
25
|
-
const avatarStyles = avatarCva({ size });
|
|
26
|
-
return /* @__PURE__ */ jsx(Avatar$1.Root, { ref, className: cn(avatarStyles, className), ...props });
|
|
27
|
-
}
|
|
28
|
-
function AvatarImage({ className, ref, ...props }) {
|
|
29
|
-
return /* @__PURE__ */ jsx(Avatar$1.Image, { ref, className: cn("aspect-square h-full w-full", className), ...props });
|
|
30
|
-
}
|
|
31
|
-
function AvatarFallback({ className, ref, ...props }) {
|
|
32
|
-
return /* @__PURE__ */ jsx(
|
|
33
|
-
Avatar$1.Fallback,
|
|
34
|
-
{
|
|
35
|
-
ref,
|
|
36
|
-
className: cn("bg-gray-350 flex h-full w-full items-center justify-center", className),
|
|
37
|
-
...props
|
|
38
|
-
}
|
|
39
|
-
);
|
|
40
|
-
}
|
|
41
|
-
var buttonCva = cva(
|
|
42
|
-
[
|
|
43
|
-
"inline-flex cursor-pointer items-center justify-center align-middle no-underline transition-colors duration-300 ease-in-out",
|
|
44
|
-
"select-none appearance-none rounded-sm border font-sans font-medium tracking-[.02857em]",
|
|
45
|
-
"aria-disabled:pointer-events-none aria-disabled:cursor-not-allowed aria-disabled:opacity-50"
|
|
46
|
-
],
|
|
47
|
-
{
|
|
48
|
-
variants: {
|
|
49
|
-
fullWidth: {
|
|
50
|
-
true: "w-full"
|
|
51
|
-
},
|
|
52
|
-
color: {
|
|
53
|
-
neutral: "",
|
|
54
|
-
primary: "",
|
|
55
|
-
success: "",
|
|
56
|
-
warning: "",
|
|
57
|
-
error: ""
|
|
58
|
-
},
|
|
59
|
-
size: {
|
|
60
|
-
sm: "px-2.5 py-1 text-[.8125rem] leading-4",
|
|
61
|
-
md: "px-4 py-1.5 text-[0.875rem] leading-5",
|
|
62
|
-
lg: "px-5 py-2 text-[.9375rem] leading-6"
|
|
63
|
-
},
|
|
64
|
-
variant: {
|
|
65
|
-
text: "border-transparent bg-transparent",
|
|
66
|
-
outlined: "bg-transparent",
|
|
67
|
-
contained: ""
|
|
68
|
-
}
|
|
69
|
-
},
|
|
70
|
-
compoundVariants: [
|
|
71
|
-
// ---------- TEXT ---------- //
|
|
72
|
-
{
|
|
73
|
-
variant: "text",
|
|
74
|
-
color: "neutral",
|
|
75
|
-
class: [
|
|
76
|
-
"text-gray-100",
|
|
77
|
-
"hover:border-gray-350 hover:bg-gray-350 hover:text-gray-100",
|
|
78
|
-
"active:border-gray-400 active:bg-gray-400"
|
|
79
|
-
]
|
|
80
|
-
},
|
|
81
|
-
{
|
|
82
|
-
variant: "text",
|
|
83
|
-
color: "primary",
|
|
84
|
-
class: [
|
|
85
|
-
"text-primary-500",
|
|
86
|
-
"hover:border-primary-500 hover:bg-primary-500 hover:text-white",
|
|
87
|
-
"active:border-primary-600 active:bg-primary-600 active:text-white"
|
|
88
|
-
]
|
|
89
|
-
},
|
|
90
|
-
{
|
|
91
|
-
variant: "text",
|
|
92
|
-
color: "success",
|
|
93
|
-
class: [
|
|
94
|
-
"text-success-500",
|
|
95
|
-
"hover:border-success-500 hover:bg-success-500 hover:text-white",
|
|
96
|
-
"active:border-success-600 active:bg-success-600 active:text-white"
|
|
97
|
-
]
|
|
98
|
-
},
|
|
99
|
-
{
|
|
100
|
-
variant: "text",
|
|
101
|
-
color: "warning",
|
|
102
|
-
class: [
|
|
103
|
-
"text-warning-500",
|
|
104
|
-
"hover:border-warning-500 hover:bg-warning-500 hover:text-white",
|
|
105
|
-
"active:border-warning-600 active:bg-warning-600 active:text-white"
|
|
106
|
-
]
|
|
107
|
-
},
|
|
108
|
-
{
|
|
109
|
-
variant: "text",
|
|
110
|
-
color: "error",
|
|
111
|
-
class: [
|
|
112
|
-
"text-error-500",
|
|
113
|
-
"hover:border-error-500 hover:bg-error-500 hover:text-white",
|
|
114
|
-
"active:border-error-600 active:bg-error-600 active:text-white"
|
|
115
|
-
]
|
|
116
|
-
},
|
|
117
|
-
// ---------- OUTLINED ---------- //
|
|
118
|
-
{
|
|
119
|
-
variant: "outlined",
|
|
120
|
-
color: "neutral",
|
|
121
|
-
class: ["border-gray-350 text-gray-100", "hover:bg-gray-350", "active:bg-gray-400"]
|
|
122
|
-
},
|
|
123
|
-
{
|
|
124
|
-
variant: "outlined",
|
|
125
|
-
color: "primary",
|
|
126
|
-
class: [
|
|
127
|
-
"text-primary-500 border-primary-500",
|
|
128
|
-
"hover:bg-primary-500 hover:text-white",
|
|
129
|
-
"active:bg-primary-600 active:text-white"
|
|
130
|
-
]
|
|
131
|
-
},
|
|
132
|
-
{
|
|
133
|
-
variant: "outlined",
|
|
134
|
-
color: "success",
|
|
135
|
-
class: [
|
|
136
|
-
"text-success-500 border-success-500",
|
|
137
|
-
"hover:bg-success-500 hover:text-white",
|
|
138
|
-
"active:bg-success-600 active:text-white"
|
|
139
|
-
]
|
|
140
|
-
},
|
|
141
|
-
{
|
|
142
|
-
variant: "outlined",
|
|
143
|
-
color: "warning",
|
|
144
|
-
class: [
|
|
145
|
-
"text-warning-500 border-warning-500",
|
|
146
|
-
"hover:bg-warning-500 hover:text-white",
|
|
147
|
-
"active:bg-warning-600 active:text-white"
|
|
148
|
-
]
|
|
149
|
-
},
|
|
150
|
-
{
|
|
151
|
-
variant: "outlined",
|
|
152
|
-
color: "error",
|
|
153
|
-
class: [
|
|
154
|
-
"text-error-500 border-error-500",
|
|
155
|
-
"hover:bg-error-500 hover:text-white",
|
|
156
|
-
"active:bg-error-600 active:text-white"
|
|
157
|
-
]
|
|
158
|
-
},
|
|
159
|
-
// ---------- OUTLINED ---------- //
|
|
160
|
-
{
|
|
161
|
-
variant: "contained",
|
|
162
|
-
color: "neutral",
|
|
163
|
-
class: [
|
|
164
|
-
"border-gray-350 bg-gray-350 text-gray-100",
|
|
165
|
-
"hover:border-gray-300 hover:bg-gray-300",
|
|
166
|
-
"active:border-gray-400 active:bg-gray-400"
|
|
167
|
-
]
|
|
168
|
-
},
|
|
169
|
-
{
|
|
170
|
-
variant: "contained",
|
|
171
|
-
color: "primary",
|
|
172
|
-
class: [
|
|
173
|
-
"border-primary-500 bg-primary-500 text-white",
|
|
174
|
-
"hover:border-primary-400 hover:bg-primary-400",
|
|
175
|
-
"active:border-primary-600 active:bg-primary-600"
|
|
176
|
-
]
|
|
177
|
-
},
|
|
178
|
-
{
|
|
179
|
-
variant: "contained",
|
|
180
|
-
color: "success",
|
|
181
|
-
class: [
|
|
182
|
-
"border-success-500 bg-success-500 text-white",
|
|
183
|
-
"hover:border-success-400 hover:bg-success-400",
|
|
184
|
-
"active:border-success-600 active:bg-success-600"
|
|
185
|
-
]
|
|
186
|
-
},
|
|
187
|
-
{
|
|
188
|
-
variant: "contained",
|
|
189
|
-
color: "warning",
|
|
190
|
-
class: [
|
|
191
|
-
"border-warning-500 bg-warning-500 text-white",
|
|
192
|
-
"hover:border-warning-400 hover:bg-warning-400",
|
|
193
|
-
"active:border-warning-600 active:bg-warning-600"
|
|
194
|
-
]
|
|
195
|
-
},
|
|
196
|
-
{
|
|
197
|
-
variant: "contained",
|
|
198
|
-
color: "error",
|
|
199
|
-
class: [
|
|
200
|
-
"border-error-500 bg-error-500 text-white",
|
|
201
|
-
"hover:border-error-400 hover:bg-error-400",
|
|
202
|
-
"active:border-error-600 active:bg-error-600"
|
|
203
|
-
]
|
|
204
|
-
}
|
|
205
|
-
],
|
|
206
|
-
defaultVariants: {
|
|
207
|
-
fullWidth: false,
|
|
208
|
-
color: "primary",
|
|
209
|
-
size: "md",
|
|
210
|
-
variant: "text"
|
|
211
|
-
}
|
|
212
|
-
}
|
|
213
|
-
);
|
|
214
|
-
var iconContainerCva = cva("", {
|
|
215
|
-
variants: {
|
|
216
|
-
site: {
|
|
217
|
-
left: "",
|
|
218
|
-
right: ""
|
|
219
|
-
},
|
|
220
|
-
size: {
|
|
221
|
-
sm: "",
|
|
222
|
-
md: "",
|
|
223
|
-
lg: ""
|
|
224
|
-
}
|
|
225
|
-
},
|
|
226
|
-
compoundVariants: [
|
|
227
|
-
// ---------- LEFT ---------- //
|
|
228
|
-
{
|
|
229
|
-
site: "left",
|
|
230
|
-
size: "sm",
|
|
231
|
-
class: "-ml-0.5 mr-1.5"
|
|
232
|
-
},
|
|
233
|
-
{
|
|
234
|
-
site: "left",
|
|
235
|
-
size: "md",
|
|
236
|
-
class: "-ml-1 mr-2"
|
|
237
|
-
},
|
|
238
|
-
{
|
|
239
|
-
site: "left",
|
|
240
|
-
size: "lg",
|
|
241
|
-
class: "-ml-1.5 mr-2.5"
|
|
242
|
-
},
|
|
243
|
-
// ---------- RIGHT ---------- //
|
|
244
|
-
{
|
|
245
|
-
site: "right",
|
|
246
|
-
size: "sm",
|
|
247
|
-
class: "-mr-0.5 ml-1.5"
|
|
248
|
-
},
|
|
249
|
-
{
|
|
250
|
-
site: "right",
|
|
251
|
-
size: "md",
|
|
252
|
-
class: "-mr-1 ml-2"
|
|
253
|
-
},
|
|
254
|
-
{
|
|
255
|
-
site: "right",
|
|
256
|
-
size: "lg",
|
|
257
|
-
class: "-mr-1.5 ml-2.5"
|
|
258
|
-
}
|
|
259
|
-
],
|
|
260
|
-
defaultVariants: {
|
|
261
|
-
site: "left",
|
|
262
|
-
size: "md"
|
|
263
|
-
}
|
|
264
|
-
});
|
|
265
|
-
var iconCva = cva("", {
|
|
266
|
-
variants: {
|
|
267
|
-
loading: {
|
|
268
|
-
true: "animate-spin motion-reduce:hidden"
|
|
269
|
-
},
|
|
270
|
-
size: {
|
|
271
|
-
sm: "h-4.5 w-4.5",
|
|
272
|
-
md: "size-5",
|
|
273
|
-
lg: "h-5.5 w-5.5"
|
|
274
|
-
}
|
|
275
|
-
},
|
|
276
|
-
defaultVariants: {
|
|
277
|
-
loading: false,
|
|
278
|
-
size: "md"
|
|
279
|
-
}
|
|
280
|
-
});
|
|
281
|
-
function Button({
|
|
282
|
-
asChild = false,
|
|
283
|
-
variant = "text",
|
|
284
|
-
color = "primary",
|
|
285
|
-
disabled = false,
|
|
286
|
-
fullWidth = false,
|
|
287
|
-
ref,
|
|
288
|
-
...props
|
|
289
|
-
}) {
|
|
290
|
-
const {
|
|
291
|
-
children,
|
|
292
|
-
type = "button",
|
|
293
|
-
loading = false,
|
|
294
|
-
size = "md",
|
|
295
|
-
loadingPosition = "start",
|
|
296
|
-
endIcon,
|
|
297
|
-
startIcon,
|
|
298
|
-
...rest
|
|
299
|
-
} = props;
|
|
300
|
-
const Comp = asChild ? Slot : "button";
|
|
301
|
-
const buttonStyles = buttonCva({ fullWidth, size, variant, color });
|
|
302
|
-
const isDisabled = disabled || loading;
|
|
303
|
-
return /* @__PURE__ */ jsx(
|
|
304
|
-
Comp,
|
|
305
|
-
{
|
|
306
|
-
...asChild ? props : rest,
|
|
307
|
-
"aria-disabled": isDisabled || void 0,
|
|
308
|
-
className: buttonStyles,
|
|
309
|
-
"data-state": loading ? "loading" : void 0,
|
|
310
|
-
disabled: isDisabled,
|
|
311
|
-
ref,
|
|
312
|
-
role: Comp !== "button" ? "button" : void 0,
|
|
313
|
-
tabIndex: isDisabled ? -1 : 0,
|
|
314
|
-
type: Comp === "button" ? type : void 0,
|
|
315
|
-
children: asChild ? /* @__PURE__ */ jsx(ButtonContent, { children }) : /* @__PURE__ */ jsx(ButtonContent, { ...props })
|
|
316
|
-
}
|
|
317
|
-
);
|
|
318
|
-
}
|
|
319
|
-
function ButtonContent({
|
|
320
|
-
children,
|
|
321
|
-
loading = false,
|
|
322
|
-
size = "md",
|
|
323
|
-
loadingPosition = "start",
|
|
324
|
-
startIcon,
|
|
325
|
-
endIcon,
|
|
326
|
-
...props
|
|
327
|
-
}) {
|
|
328
|
-
const isStartLoading = loading && loadingPosition === "start";
|
|
329
|
-
const StartIcon = isStartLoading ? /* @__PURE__ */ jsx(LoadingIcon, { "aria-label": "Loading" }) : startIcon || null;
|
|
330
|
-
const startIconStyles = iconCva({ size, loading: isStartLoading });
|
|
331
|
-
const startIconContainerStyles = iconContainerCva({ size, site: "left" });
|
|
332
|
-
const isEndLoading = loading && loadingPosition === "end";
|
|
333
|
-
const EndIcon = isEndLoading ? /* @__PURE__ */ jsx(LoadingIcon, { "aria-label": "Loading" }) : endIcon || null;
|
|
334
|
-
const endIconStyles = iconCva({ size, loading: isEndLoading });
|
|
335
|
-
const endIconContainerStyles = iconContainerCva({ size, site: "right" });
|
|
336
|
-
const LeadingIcon = StartIcon ? /* @__PURE__ */ jsx("span", { className: startIconContainerStyles, role: isStartLoading ? "progressbar" : void 0, children: React.cloneElement(StartIcon, { className: startIconStyles }) }) : null;
|
|
337
|
-
const TrailingIcon = EndIcon ? /* @__PURE__ */ jsx("span", { className: endIconContainerStyles, role: isEndLoading ? "progressbar" : void 0, children: React.cloneElement(EndIcon, { className: endIconStyles }) }) : null;
|
|
338
|
-
return React.isValidElement(children) ? React.cloneElement(
|
|
339
|
-
children,
|
|
340
|
-
props,
|
|
341
|
-
/* @__PURE__ */ jsxs(React.Fragment, { children: [
|
|
342
|
-
LeadingIcon,
|
|
343
|
-
React.isValidElement(children) ? children.props?.children : null,
|
|
344
|
-
TrailingIcon
|
|
345
|
-
] })
|
|
346
|
-
) : /* @__PURE__ */ jsxs(React.Fragment, { children: [
|
|
347
|
-
LeadingIcon,
|
|
348
|
-
children,
|
|
349
|
-
TrailingIcon
|
|
350
|
-
] });
|
|
351
|
-
}
|
|
352
|
-
var inputCva = cva(
|
|
353
|
-
[
|
|
354
|
-
"bg-app-foreground font-poppins h-10 w-full appearance-none border py-2 outline-0 transition-colors duration-300 ease-in-out",
|
|
355
|
-
"placeholder:select-none placeholder:text-gray-200",
|
|
356
|
-
"invalid:border-error-500 focus:border-primary-400 active:border-primary-400",
|
|
357
|
-
"disabled:border-gray-400 disabled:text-gray-200 disabled:placeholder:text-gray-300"
|
|
358
|
-
],
|
|
359
|
-
{
|
|
360
|
-
variants: {
|
|
361
|
-
invalid: {
|
|
362
|
-
true: ["text-error-500 border-error-500 hover:border-error-400 focus:text-gray-100"],
|
|
363
|
-
false: ["border-gray-350 hover:border-primary-500 text-gray-100"]
|
|
364
|
-
},
|
|
365
|
-
withStartIcon: {
|
|
366
|
-
true: "pl-11",
|
|
367
|
-
false: "pl-3"
|
|
368
|
-
},
|
|
369
|
-
withEndIcon: {
|
|
370
|
-
true: "pr-11",
|
|
371
|
-
false: "pr-3"
|
|
372
|
-
}
|
|
373
|
-
},
|
|
374
|
-
defaultVariants: {
|
|
375
|
-
invalid: false,
|
|
376
|
-
withStartIcon: false,
|
|
377
|
-
withEndIcon: false
|
|
378
|
-
}
|
|
379
|
-
}
|
|
380
|
-
);
|
|
381
|
-
var inputIconContainerCva = cva(
|
|
382
|
-
["pointer-events-none absolute inset-y-2 inline-flex w-10 place-content-center items-center text-center"],
|
|
383
|
-
{
|
|
384
|
-
variants: {
|
|
385
|
-
disabled: {
|
|
386
|
-
true: "text-gray-200"
|
|
387
|
-
},
|
|
388
|
-
site: {
|
|
389
|
-
right: "right-0 border-l border-l-gray-400 pr-1",
|
|
390
|
-
left: "left-0 border-r border-r-gray-400 pl-1"
|
|
391
|
-
}
|
|
392
|
-
},
|
|
393
|
-
defaultVariants: {
|
|
394
|
-
disabled: false
|
|
395
|
-
}
|
|
396
|
-
}
|
|
397
|
-
);
|
|
398
|
-
function Input({ invalid = false, startIcon, endIcon, disabled = false, className, ...props }) {
|
|
399
|
-
const inputStyles = inputCva({ withEndIcon: !!endIcon, withStartIcon: !!startIcon, invalid });
|
|
400
|
-
const inputIconStartContainer = inputIconContainerCva({ site: "left", disabled });
|
|
401
|
-
const inputIconEndContainer = inputIconContainerCva({ site: "right", disabled });
|
|
402
|
-
return /* @__PURE__ */ jsxs("div", { className: "text-body-2 relative text-gray-100", children: [
|
|
403
|
-
startIcon ? /* @__PURE__ */ jsx("span", { className: inputIconStartContainer, children: startIcon }) : null,
|
|
404
|
-
/* @__PURE__ */ jsx(
|
|
405
|
-
"input",
|
|
406
|
-
{
|
|
407
|
-
"aria-invalid": invalid || void 0,
|
|
408
|
-
disabled,
|
|
409
|
-
className: cn(inputStyles, className),
|
|
410
|
-
...props
|
|
411
|
-
}
|
|
412
|
-
),
|
|
413
|
-
endIcon ? /* @__PURE__ */ jsx("span", { "aria-hidden": true, className: inputIconEndContainer, children: endIcon }) : null
|
|
414
|
-
] });
|
|
415
|
-
}
|
|
416
|
-
function Tooltip({
|
|
417
|
-
defaultOpen,
|
|
418
|
-
content,
|
|
419
|
-
open,
|
|
420
|
-
onOpenChange,
|
|
421
|
-
children,
|
|
422
|
-
side,
|
|
423
|
-
align,
|
|
424
|
-
collisionPadding = 8,
|
|
425
|
-
sideOffset = 8,
|
|
426
|
-
...props
|
|
427
|
-
}) {
|
|
428
|
-
return /* @__PURE__ */ jsxs(Tooltip$1.Root, { delayDuration: 0, open, defaultOpen, onOpenChange, children: [
|
|
429
|
-
/* @__PURE__ */ jsx(Tooltip$1.Trigger, { asChild: true, children }),
|
|
430
|
-
content ? /* @__PURE__ */ jsx(Tooltip$1.Portal, { children: /* @__PURE__ */ jsxs(
|
|
431
|
-
Tooltip$1.Content,
|
|
432
|
-
{
|
|
433
|
-
className: "text-body-1 data-[state=delayed-open]:data-[side=bottom]:animate-slideUpAndFade data-[state=delayed-open]:data-[side=left]:animate-slideRightAndFade data-[state=delayed-open]:data-[side=right]:animate-slideLeftAndFade data-[state=delayed-open]:data-[side=top]:animate-slideDownAndFade rounded bg-white p-2 text-gray-100 will-change-[transform,opacity] select-none",
|
|
434
|
-
sideOffset,
|
|
435
|
-
side,
|
|
436
|
-
align,
|
|
437
|
-
collisionPadding,
|
|
438
|
-
...props,
|
|
439
|
-
children: [
|
|
440
|
-
content,
|
|
441
|
-
/* @__PURE__ */ jsx(Tooltip$1.Arrow, { width: 8, height: 4, className: "fill-white" })
|
|
442
|
-
]
|
|
443
|
-
}
|
|
444
|
-
) }) : null
|
|
445
|
-
] });
|
|
446
|
-
}
|
|
447
|
-
function TooltipProvider({ children }) {
|
|
448
|
-
return /* @__PURE__ */ jsx(Tooltip$1.Provider, { skipDelayDuration: 500, children });
|
|
449
|
-
}
|
|
450
|
-
var textareaCva = cva(
|
|
451
|
-
[
|
|
452
|
-
"bg-app-primary font-poppins text-body-2 h-28 min-h-10 w-full appearance-none border px-3 py-2 outline-0 transition-colors duration-300 ease-in-out placeholder:select-none placeholder:text-gray-200",
|
|
453
|
-
"focus:border-primary-400",
|
|
454
|
-
"active:border-primary-400",
|
|
455
|
-
"disabled:border-gray-400 disabled:text-gray-200 disabled:placeholder:text-gray-300"
|
|
456
|
-
],
|
|
457
|
-
{
|
|
458
|
-
variants: {
|
|
459
|
-
invalid: {
|
|
460
|
-
true: ["text-error-500 border-error-500", "hover:border-error-400", "focus:text-gray-100"],
|
|
461
|
-
false: ["border-gray-350 text-gray-100", "hover:border-primary-500"]
|
|
462
|
-
}
|
|
463
|
-
},
|
|
464
|
-
defaultVariants: {
|
|
465
|
-
invalid: false
|
|
466
|
-
}
|
|
467
|
-
}
|
|
468
|
-
);
|
|
469
|
-
function Textarea({ invalid = false, ...props }) {
|
|
470
|
-
const textareaStyles = textareaCva({ invalid });
|
|
471
|
-
return /* @__PURE__ */ jsx("textarea", { "aria-invalid": invalid || void 0, className: textareaStyles, ...props });
|
|
472
|
-
}
|
|
473
|
-
var selectCva = cva(
|
|
474
|
-
[
|
|
475
|
-
"bg-app-foreground text-body-2 inline-flex h-10 w-full appearance-none items-center justify-between gap-2 border px-3 py-2 text-gray-100 outline-0 transition-colors duration-300 ease-in-out",
|
|
476
|
-
"placeholder:select-none placeholder:text-gray-200",
|
|
477
|
-
"invalid:border-error-500 focus:border-primary-400 active:border-primary-400",
|
|
478
|
-
"disabled:border-gray-400 disabled:text-gray-200 disabled:placeholder:text-gray-300"
|
|
479
|
-
],
|
|
480
|
-
{
|
|
481
|
-
variants: {
|
|
482
|
-
invalid: {
|
|
483
|
-
true: ["text-error-500 border-error-500 hover:border-error-400 focus:text-gray-100"],
|
|
484
|
-
false: ["border-gray-350 hover:border-primary-500 text-gray-100"]
|
|
485
|
-
}
|
|
486
|
-
},
|
|
487
|
-
defaultVariants: {
|
|
488
|
-
invalid: false
|
|
489
|
-
}
|
|
490
|
-
}
|
|
491
|
-
);
|
|
492
|
-
function Select({ children, placeholder, invalid = false, ref, ...props }) {
|
|
493
|
-
const selectStyles = selectCva({ invalid });
|
|
494
|
-
return /* @__PURE__ */ jsxs(Select$1.Root, { ...props, children: [
|
|
495
|
-
/* @__PURE__ */ jsxs(Select$1.Trigger, { className: selectStyles, ref, children: [
|
|
496
|
-
/* @__PURE__ */ jsx(Select$1.Value, { placeholder }),
|
|
497
|
-
/* @__PURE__ */ jsx(Select$1.Icon, { className: "-mr-1.5", children: /* @__PURE__ */ jsx(CaretSortIcon, { className: "size-5 text-gray-200" }) })
|
|
498
|
-
] }),
|
|
499
|
-
/* @__PURE__ */ jsx(Select$1.Portal, { children: /* @__PURE__ */ jsx(
|
|
500
|
-
Select$1.Content,
|
|
501
|
-
{
|
|
502
|
-
sideOffset: 4,
|
|
503
|
-
className: "bg-app-foreground z-50 w-full overflow-hidden border border-gray-400 py-1",
|
|
504
|
-
children: /* @__PURE__ */ jsx(Select$1.Viewport, { children })
|
|
505
|
-
}
|
|
506
|
-
) })
|
|
507
|
-
] });
|
|
508
|
-
}
|
|
509
|
-
function SelectItem({ children, ...props }) {
|
|
510
|
-
return /* @__PURE__ */ jsxs(
|
|
511
|
-
Select$1.Item,
|
|
512
|
-
{
|
|
513
|
-
className: "text-body-2 data-[state=checked]:bg-primary-300 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-400 data-[highlighted]:outline-none",
|
|
514
|
-
...props,
|
|
515
|
-
children: [
|
|
516
|
-
/* @__PURE__ */ jsx(Select$1.ItemText, { className: "flex-1", children }),
|
|
517
|
-
/* @__PURE__ */ jsx(Select$1.ItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, { className: "size-4" }) })
|
|
518
|
-
]
|
|
519
|
-
}
|
|
520
|
-
);
|
|
521
|
-
}
|
|
522
|
-
function Card({ className, ...props }) {
|
|
523
|
-
return /* @__PURE__ */ jsx("div", { className: twMerge("bg-app-foreground h-full rounded border border-gray-400", className), ...props });
|
|
524
|
-
}
|
|
525
|
-
function CardHeader({ className, ...props }) {
|
|
526
|
-
return /* @__PURE__ */ jsx("div", { className: twMerge("flex flex-col p-6", className), ...props });
|
|
527
|
-
}
|
|
528
|
-
function CardTitle({ className, ...props }) {
|
|
529
|
-
return /* @__PURE__ */ jsx("h3", { className: twMerge("text-heading-5", className), ...props });
|
|
530
|
-
}
|
|
531
|
-
function CardDescription({ className, ...props }) {
|
|
532
|
-
return /* @__PURE__ */ jsx("p", { className: twMerge("text-body-2 text-gray-200", className), ...props });
|
|
533
|
-
}
|
|
534
|
-
function CardContent({ className, ...props }) {
|
|
535
|
-
return /* @__PURE__ */ jsx("div", { className: twMerge("p-6 pt-0", className), ...props });
|
|
536
|
-
}
|
|
537
|
-
function CardFooter({ className, ...props }) {
|
|
538
|
-
return /* @__PURE__ */ jsx("div", { className: twMerge("flex items-center p-6 pt-0", className), ...props });
|
|
539
|
-
}
|
|
540
|
-
var Sheet = Dialog$1.Root;
|
|
541
|
-
var SheetTrigger = Dialog$1.Trigger;
|
|
542
|
-
var SheetClose = Dialog$1.Close;
|
|
543
|
-
var sheetContentStyles = cva(
|
|
544
|
-
"bg-foreground data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col border-gray-400 p-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500",
|
|
545
|
-
{
|
|
546
|
-
variants: {
|
|
547
|
-
side: {
|
|
548
|
-
top: "data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 border-b",
|
|
549
|
-
bottom: "data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 border-t",
|
|
550
|
-
left: "data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",
|
|
551
|
-
right: "data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm"
|
|
552
|
-
}
|
|
553
|
-
},
|
|
554
|
-
defaultVariants: {
|
|
555
|
-
side: "right"
|
|
556
|
-
}
|
|
557
|
-
}
|
|
558
|
-
);
|
|
559
|
-
function SheetContent({ side = "right", className, children, ...props }) {
|
|
560
|
-
return /* @__PURE__ */ jsxs(Dialog$1.Portal, { children: [
|
|
561
|
-
/* @__PURE__ */ jsx(
|
|
562
|
-
Dialog$1.Overlay,
|
|
563
|
-
{
|
|
564
|
-
className: "bg-background/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 backdrop-blur-sm",
|
|
565
|
-
...props
|
|
566
|
-
}
|
|
567
|
-
),
|
|
568
|
-
/* @__PURE__ */ jsxs(Dialog$1.Content, { className: twMerge(sheetContentStyles({ side }), className), ...props, children: [
|
|
569
|
-
children,
|
|
570
|
-
/* @__PURE__ */ jsxs(Dialog$1.Close, { className: "focus:ring-ring ring-primary-500 ring-offset-foreground data-[state=open]:bg-foreground absolute top-4 right-4 rounded-sm opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-none disabled:pointer-events-none", children: [
|
|
571
|
-
/* @__PURE__ */ jsx(Cross1Icon, { className: "size-4" }),
|
|
572
|
-
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "Close" })
|
|
573
|
-
] })
|
|
574
|
-
] })
|
|
575
|
-
] });
|
|
576
|
-
}
|
|
577
|
-
function SheetHeader({ className, ...props }) {
|
|
578
|
-
return /* @__PURE__ */ jsx("div", { className: twMerge("flex flex-col space-y-2 text-center sm:text-left", className), ...props });
|
|
579
|
-
}
|
|
580
|
-
function SheetFooter({ className, ...props }) {
|
|
581
|
-
return /* @__PURE__ */ jsx("div", { className: twMerge("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", className), ...props });
|
|
582
|
-
}
|
|
583
|
-
function SheetTitle({ className, ...props }) {
|
|
584
|
-
return /* @__PURE__ */ jsx(Dialog$1.Title, { className: twMerge("typography-heading-6", className), ...props });
|
|
585
|
-
}
|
|
586
|
-
function SheetDescription({ className, ...props }) {
|
|
587
|
-
return /* @__PURE__ */ jsx(Dialog$1.Description, { className: twMerge("typography-body-2 text-gray-200", className), ...props });
|
|
588
|
-
}
|
|
589
|
-
function Separator({ className, orientation = "horizontal", decorative = true, ...props }) {
|
|
590
|
-
return /* @__PURE__ */ jsx(
|
|
591
|
-
Separator$1.Root,
|
|
592
|
-
{
|
|
593
|
-
decorative,
|
|
594
|
-
orientation,
|
|
595
|
-
className: twMerge(
|
|
596
|
-
"shrink-0 bg-gray-400",
|
|
597
|
-
orientation === "horizontal" ? "h-[1px] w-full" : "h-full w-[1px]",
|
|
598
|
-
className
|
|
599
|
-
),
|
|
600
|
-
...props
|
|
601
|
-
}
|
|
602
|
-
);
|
|
603
|
-
}
|
|
604
|
-
function Header({ children, ...props }) {
|
|
605
|
-
return /* @__PURE__ */ jsx(
|
|
606
|
-
"header",
|
|
607
|
-
{
|
|
608
|
-
className: "bg-foreground/95 supports-[backdrop-filter]:bg-foreground/60 sticky top-0 z-50 w-full border-b border-gray-400 backdrop-blur",
|
|
609
|
-
...props,
|
|
610
|
-
children: /* @__PURE__ */ jsx("div", { className: "container flex h-16 items-center", children })
|
|
611
|
-
}
|
|
612
|
-
);
|
|
613
|
-
}
|
|
614
|
-
var Dialog = Dialog$1.Root;
|
|
615
|
-
var DialogClose = Dialog$1.Close;
|
|
616
|
-
var dialogContentStyles = cva(
|
|
617
|
-
[
|
|
618
|
-
"bg-foreground fixed left-1/2 top-1/2 z-50 flex w-full -translate-x-1/2 -translate-y-1/2 flex-col rounded border border-gray-400 p-4 shadow-lg",
|
|
619
|
-
"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] duration-200"
|
|
620
|
-
],
|
|
621
|
-
{
|
|
622
|
-
variants: {
|
|
623
|
-
width: {
|
|
624
|
-
xs: "max-w-xs",
|
|
625
|
-
sm: "max-w-sm",
|
|
626
|
-
md: "max-w-md",
|
|
627
|
-
lg: "max-w-lg",
|
|
628
|
-
xl: "max-w-xl",
|
|
629
|
-
"2xl": "max-w-2xl",
|
|
630
|
-
"3xl": "max-w-3xl",
|
|
631
|
-
"4xl": "max-w-4xl",
|
|
632
|
-
"5xl": "max-w-5xl",
|
|
633
|
-
"6xl": "max-w-6xl",
|
|
634
|
-
full: "max-w-full"
|
|
635
|
-
}
|
|
636
|
-
},
|
|
637
|
-
defaultVariants: {
|
|
638
|
-
width: "md"
|
|
639
|
-
}
|
|
640
|
-
}
|
|
641
|
-
);
|
|
642
|
-
function DialogOverlay(props) {
|
|
643
|
-
return /* @__PURE__ */ jsx(
|
|
644
|
-
Dialog$1.Overlay,
|
|
645
|
-
{
|
|
646
|
-
className: "bg-background/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 backdrop-blur-xs",
|
|
647
|
-
...props
|
|
648
|
-
}
|
|
649
|
-
);
|
|
650
|
-
}
|
|
651
|
-
function DialogContent({ className, children, width = "md", ...props }) {
|
|
652
|
-
return /* @__PURE__ */ jsxs(Dialog$1.Portal, { children: [
|
|
653
|
-
/* @__PURE__ */ jsx(DialogOverlay, {}),
|
|
654
|
-
/* @__PURE__ */ jsxs(Dialog$1.Content, { className: twMerge(dialogContentStyles({ width }), className), ...props, children: [
|
|
655
|
-
children,
|
|
656
|
-
/* @__PURE__ */ jsxs(Dialog$1.Close, { className: "focus:ring-ring ring-primary-500 ring-offset-foreground data-[state=open]:bg-foreground absolute top-4 right-4 rounded-sm opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-none disabled:pointer-events-none", children: [
|
|
657
|
-
/* @__PURE__ */ jsx(Cross1Icon, { className: "size-4" }),
|
|
658
|
-
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "Close" })
|
|
659
|
-
] })
|
|
660
|
-
] })
|
|
661
|
-
] });
|
|
662
|
-
}
|
|
663
|
-
var DialogTrigger = Dialog$1.Trigger;
|
|
664
|
-
function DialogHeader({ className, ...props }) {
|
|
665
|
-
return /* @__PURE__ */ jsx("div", { className: twMerge("mb-4 flex flex-col space-y-1.5 text-center sm:text-left", className), ...props });
|
|
666
|
-
}
|
|
667
|
-
function DialogFooter({ className, ...props }) {
|
|
668
|
-
return /* @__PURE__ */ jsx("div", { className: twMerge("mt-4 flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", className), ...props });
|
|
669
|
-
}
|
|
670
|
-
function DialogTitle({ className, ...props }) {
|
|
671
|
-
return /* @__PURE__ */ jsx(Dialog$1.Title, { className: twMerge("text-heading-6", className), ...props });
|
|
672
|
-
}
|
|
673
|
-
function DialogDescription({ className, ...props }) {
|
|
674
|
-
return /* @__PURE__ */ jsx(Dialog$1.Description, { className: twMerge("text-body-2 text-gray-200", className), ...props });
|
|
675
|
-
}
|
|
676
|
-
var Form = FormProvider;
|
|
677
|
-
var FormItemContext = React.createContext({});
|
|
678
|
-
var FormItem = React.forwardRef(function({ className, ...props }, ref) {
|
|
679
|
-
const id = React.useId();
|
|
680
|
-
return /* @__PURE__ */ jsx(FormItemContext.Provider, { value: { id }, children: /* @__PURE__ */ jsx("div", { ref, className: twMerge("space-y-2", className), ...props }) });
|
|
681
|
-
});
|
|
682
|
-
FormItem.displayName = "FormItem";
|
|
683
|
-
var FormFieldContext = React.createContext({});
|
|
684
|
-
var FormField = ({
|
|
685
|
-
...props
|
|
686
|
-
}) => {
|
|
687
|
-
return /* @__PURE__ */ jsx(FormFieldContext.Provider, { value: { name: props.name }, children: /* @__PURE__ */ jsx(Controller, { ...props }) });
|
|
688
|
-
};
|
|
689
|
-
function Label({ className, ...props }) {
|
|
690
|
-
return /* @__PURE__ */ jsx(
|
|
691
|
-
Label$1.Root,
|
|
692
|
-
{
|
|
693
|
-
className: twMerge("text-subtitle-1 peer-disabled:cursor-not-allowed peer-disabled:opacity-70", className),
|
|
694
|
-
...props
|
|
695
|
-
}
|
|
696
|
-
);
|
|
697
|
-
}
|
|
698
|
-
var useFormField = () => {
|
|
699
|
-
const fieldContext = React.useContext(FormFieldContext);
|
|
700
|
-
const itemContext = React.useContext(FormItemContext);
|
|
701
|
-
const { getFieldState, formState } = useFormContext();
|
|
702
|
-
const fieldState = getFieldState(fieldContext.name, formState);
|
|
703
|
-
if (!fieldContext) {
|
|
704
|
-
throw new Error("useFormField should be used within <FormField>");
|
|
705
|
-
}
|
|
706
|
-
const { id } = itemContext;
|
|
707
|
-
return {
|
|
708
|
-
id,
|
|
709
|
-
name: fieldContext.name,
|
|
710
|
-
formItemId: `${id}-form-item`,
|
|
711
|
-
formDescriptionId: `${id}-form-item-description`,
|
|
712
|
-
formMessageId: `${id}-form-item-message`,
|
|
713
|
-
...fieldState
|
|
714
|
-
};
|
|
715
|
-
};
|
|
716
|
-
var FormLabel = React.forwardRef(
|
|
717
|
-
({ className, caption, ...props }, ref) => {
|
|
718
|
-
const { error, formItemId } = useFormField();
|
|
719
|
-
return /* @__PURE__ */ jsxs("div", { className: "flex flex-row items-end justify-between", children: [
|
|
720
|
-
/* @__PURE__ */ jsx(
|
|
721
|
-
Label,
|
|
722
|
-
{
|
|
723
|
-
ref,
|
|
724
|
-
className: twMerge(error ? "text-error-500" : null, className),
|
|
725
|
-
htmlFor: formItemId,
|
|
726
|
-
...props
|
|
727
|
-
}
|
|
728
|
-
),
|
|
729
|
-
caption ? /* @__PURE__ */ jsx("div", { className: "typography-caption text-gray-200", children: caption }) : null
|
|
730
|
-
] });
|
|
731
|
-
}
|
|
732
|
-
);
|
|
733
|
-
FormLabel.displayName = "FormLabel";
|
|
734
|
-
var FormControl = React.forwardRef(function(props, ref) {
|
|
735
|
-
const { error, formItemId, formDescriptionId, formMessageId } = useFormField();
|
|
736
|
-
const newProps = { ...props, invalid: !!error };
|
|
737
|
-
return /* @__PURE__ */ jsx(
|
|
738
|
-
Slot,
|
|
739
|
-
{
|
|
740
|
-
ref,
|
|
741
|
-
id: formItemId,
|
|
742
|
-
"aria-describedby": !error ? `${formDescriptionId}` : `${formDescriptionId} ${formMessageId}`,
|
|
743
|
-
"aria-invalid": !!error,
|
|
744
|
-
...newProps
|
|
745
|
-
}
|
|
746
|
-
);
|
|
747
|
-
});
|
|
748
|
-
FormControl.displayName = "FormControl";
|
|
749
|
-
var FormMessage = React.forwardRef(function({ children, ...props }, ref) {
|
|
750
|
-
const { error, formMessageId } = useFormField();
|
|
751
|
-
const body = error ? String(error?.message) : children;
|
|
752
|
-
if (!body) {
|
|
753
|
-
return null;
|
|
754
|
-
}
|
|
755
|
-
return /* @__PURE__ */ jsx(HelperText, { ref, type: "error", id: formMessageId, ...props, children: body });
|
|
756
|
-
});
|
|
757
|
-
FormMessage.displayName = "FormMessage";
|
|
758
|
-
var FormDescription = React.forwardRef(function(props, ref) {
|
|
759
|
-
const { formDescriptionId } = useFormField();
|
|
760
|
-
return /* @__PURE__ */ jsx(HelperText, { ref, id: formDescriptionId, ...props });
|
|
761
|
-
});
|
|
762
|
-
FormDescription.displayName = "FormDescription";
|
|
763
|
-
var helperTextCva = cva("", {
|
|
764
|
-
variants: {
|
|
765
|
-
type: {
|
|
766
|
-
description: "text-body-2 text-gray-200",
|
|
767
|
-
error: "text-caption text-error-500"
|
|
768
|
-
}
|
|
769
|
-
},
|
|
770
|
-
defaultVariants: {
|
|
771
|
-
type: "description"
|
|
772
|
-
}
|
|
773
|
-
});
|
|
774
|
-
function HelperText({ className, children, type = "description", role, ref, ...props }) {
|
|
775
|
-
return /* @__PURE__ */ jsx(
|
|
776
|
-
"p",
|
|
777
|
-
{
|
|
778
|
-
ref,
|
|
779
|
-
className: twMerge(helperTextCva({ type }), className),
|
|
780
|
-
role: type === "error" ? "alert" : role,
|
|
781
|
-
...props,
|
|
782
|
-
children
|
|
783
|
-
}
|
|
784
|
-
);
|
|
785
|
-
}
|
|
786
|
-
var AlertDialog = AlertDialog$1.Root;
|
|
787
|
-
var AlertDialogTrigger = AlertDialog$1.Trigger;
|
|
788
|
-
function AlertDialogOverlay({ className, ...props }) {
|
|
789
|
-
return /* @__PURE__ */ jsx(
|
|
790
|
-
AlertDialog$1.Overlay,
|
|
791
|
-
{
|
|
792
|
-
className: cn(
|
|
793
|
-
"bg-background/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 backdrop-blur-xs",
|
|
794
|
-
className
|
|
795
|
-
),
|
|
796
|
-
...props
|
|
797
|
-
}
|
|
798
|
-
);
|
|
799
|
-
}
|
|
800
|
-
function AlertDialogContent({ className, ...props }) {
|
|
801
|
-
return /* @__PURE__ */ jsxs(AlertDialog$1.Portal, { children: [
|
|
802
|
-
/* @__PURE__ */ jsx(AlertDialogOverlay, {}),
|
|
803
|
-
/* @__PURE__ */ jsx(
|
|
804
|
-
AlertDialog$1.Content,
|
|
805
|
-
{
|
|
806
|
-
className: cn(
|
|
807
|
-
"bg-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] fixed top-1/2 left-1/2 z-50 flex w-full max-w-lg -translate-x-1/2 -translate-y-1/2 flex-col rounded border border-gray-400 p-4 shadow-lg duration-200",
|
|
808
|
-
className
|
|
809
|
-
),
|
|
810
|
-
...props
|
|
811
|
-
}
|
|
812
|
-
)
|
|
813
|
-
] });
|
|
814
|
-
}
|
|
815
|
-
function AlertDialogHeader({ className, ...props }) {
|
|
816
|
-
return /* @__PURE__ */ jsx("div", { className: twMerge("mb-4 flex flex-col space-y-2 text-center sm:text-left", className), ...props });
|
|
817
|
-
}
|
|
818
|
-
function AlertDialogFooter({ className, ...props }) {
|
|
819
|
-
return /* @__PURE__ */ jsx("div", { className: twMerge("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", className), ...props });
|
|
820
|
-
}
|
|
821
|
-
function AlertDialogTitle({ className, ref, ...props }) {
|
|
822
|
-
return /* @__PURE__ */ jsx(AlertDialog$1.Title, { ref, className: cn("text-heading-6", className), ...props });
|
|
823
|
-
}
|
|
824
|
-
function AlertDialogDescription({ className, ...props }) {
|
|
825
|
-
return /* @__PURE__ */ jsx(AlertDialog$1.Description, { className: cn("text-body-2 text-gray-200", className), ...props });
|
|
826
|
-
}
|
|
827
|
-
var AlertDialogAction = AlertDialog$1.Action;
|
|
828
|
-
var AlertDialogCancel = AlertDialog$1.Cancel;
|
|
829
|
-
|
|
830
|
-
export { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, AlertDialogTrigger, Avatar, AvatarFallback, AvatarImage, Button, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, Header, HelperText, Input, Label, Select, SelectItem, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Textarea, Tooltip, TooltipProvider };
|