@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
|
@@ -0,0 +1,319 @@
|
|
|
1
|
+
import { LoadingIcon } from './chunk-INJBKPIE.js';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { Slot } from '@radix-ui/react-slot';
|
|
4
|
+
import { cva } from 'class-variance-authority';
|
|
5
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
6
|
+
|
|
7
|
+
var buttonCva = cva(
|
|
8
|
+
[
|
|
9
|
+
"inline-flex cursor-pointer items-center justify-center align-middle no-underline transition-colors duration-300 ease-in-out",
|
|
10
|
+
"select-none appearance-none rounded-sm border font-sans font-medium tracking-[.02857em]",
|
|
11
|
+
"aria-disabled:pointer-events-none aria-disabled:cursor-not-allowed aria-disabled:opacity-50"
|
|
12
|
+
],
|
|
13
|
+
{
|
|
14
|
+
variants: {
|
|
15
|
+
fullWidth: {
|
|
16
|
+
true: "w-full"
|
|
17
|
+
},
|
|
18
|
+
color: {
|
|
19
|
+
neutral: "",
|
|
20
|
+
primary: "",
|
|
21
|
+
success: "",
|
|
22
|
+
warning: "",
|
|
23
|
+
error: ""
|
|
24
|
+
},
|
|
25
|
+
size: {
|
|
26
|
+
sm: "px-2.5 py-1 text-[.8125rem] leading-4",
|
|
27
|
+
md: "px-4 py-1.5 text-[0.875rem] leading-5",
|
|
28
|
+
lg: "px-5 py-2 text-[.9375rem] leading-6"
|
|
29
|
+
},
|
|
30
|
+
variant: {
|
|
31
|
+
text: "border-transparent bg-transparent",
|
|
32
|
+
outlined: "bg-transparent",
|
|
33
|
+
contained: ""
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
compoundVariants: [
|
|
37
|
+
// ---------- TEXT ---------- //
|
|
38
|
+
{
|
|
39
|
+
variant: "text",
|
|
40
|
+
color: "neutral",
|
|
41
|
+
class: [
|
|
42
|
+
"text-gray-100",
|
|
43
|
+
"hover:border-gray-350 hover:bg-gray-350 hover:text-gray-100",
|
|
44
|
+
"active:border-gray-400 active:bg-gray-400"
|
|
45
|
+
]
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
variant: "text",
|
|
49
|
+
color: "primary",
|
|
50
|
+
class: [
|
|
51
|
+
"text-primary-500",
|
|
52
|
+
"hover:border-primary-500 hover:bg-primary-500 hover:text-white",
|
|
53
|
+
"active:border-primary-600 active:bg-primary-600 active:text-white"
|
|
54
|
+
]
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
variant: "text",
|
|
58
|
+
color: "success",
|
|
59
|
+
class: [
|
|
60
|
+
"text-success-500",
|
|
61
|
+
"hover:border-success-500 hover:bg-success-500 hover:text-white",
|
|
62
|
+
"active:border-success-600 active:bg-success-600 active:text-white"
|
|
63
|
+
]
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
variant: "text",
|
|
67
|
+
color: "warning",
|
|
68
|
+
class: [
|
|
69
|
+
"text-warning-500",
|
|
70
|
+
"hover:border-warning-500 hover:bg-warning-500 hover:text-white",
|
|
71
|
+
"active:border-warning-600 active:bg-warning-600 active:text-white"
|
|
72
|
+
]
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
variant: "text",
|
|
76
|
+
color: "error",
|
|
77
|
+
class: [
|
|
78
|
+
"text-error-500",
|
|
79
|
+
"hover:border-error-500 hover:bg-error-500 hover:text-white",
|
|
80
|
+
"active:border-error-600 active:bg-error-600 active:text-white"
|
|
81
|
+
]
|
|
82
|
+
},
|
|
83
|
+
// ---------- OUTLINED ---------- //
|
|
84
|
+
{
|
|
85
|
+
variant: "outlined",
|
|
86
|
+
color: "neutral",
|
|
87
|
+
class: ["border-gray-350 text-gray-100", "hover:bg-gray-350", "active:bg-gray-400"]
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
variant: "outlined",
|
|
91
|
+
color: "primary",
|
|
92
|
+
class: [
|
|
93
|
+
"text-primary-500 border-primary-500",
|
|
94
|
+
"hover:bg-primary-500 hover:text-white",
|
|
95
|
+
"active:bg-primary-600 active:text-white"
|
|
96
|
+
]
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
variant: "outlined",
|
|
100
|
+
color: "success",
|
|
101
|
+
class: [
|
|
102
|
+
"text-success-500 border-success-500",
|
|
103
|
+
"hover:bg-success-500 hover:text-white",
|
|
104
|
+
"active:bg-success-600 active:text-white"
|
|
105
|
+
]
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
variant: "outlined",
|
|
109
|
+
color: "warning",
|
|
110
|
+
class: [
|
|
111
|
+
"text-warning-500 border-warning-500",
|
|
112
|
+
"hover:bg-warning-500 hover:text-white",
|
|
113
|
+
"active:bg-warning-600 active:text-white"
|
|
114
|
+
]
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
variant: "outlined",
|
|
118
|
+
color: "error",
|
|
119
|
+
class: [
|
|
120
|
+
"text-error-500 border-error-500",
|
|
121
|
+
"hover:bg-error-500 hover:text-white",
|
|
122
|
+
"active:bg-error-600 active:text-white"
|
|
123
|
+
]
|
|
124
|
+
},
|
|
125
|
+
// ---------- OUTLINED ---------- //
|
|
126
|
+
{
|
|
127
|
+
variant: "contained",
|
|
128
|
+
color: "neutral",
|
|
129
|
+
class: [
|
|
130
|
+
"border-gray-350 bg-gray-350 text-gray-100",
|
|
131
|
+
"hover:border-gray-300 hover:bg-gray-300",
|
|
132
|
+
"active:border-gray-400 active:bg-gray-400"
|
|
133
|
+
]
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
variant: "contained",
|
|
137
|
+
color: "primary",
|
|
138
|
+
class: [
|
|
139
|
+
"border-primary-500 bg-primary-500 text-white",
|
|
140
|
+
"hover:border-primary-400 hover:bg-primary-400",
|
|
141
|
+
"active:border-primary-600 active:bg-primary-600"
|
|
142
|
+
]
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
variant: "contained",
|
|
146
|
+
color: "success",
|
|
147
|
+
class: [
|
|
148
|
+
"border-success-500 bg-success-500 text-white",
|
|
149
|
+
"hover:border-success-400 hover:bg-success-400",
|
|
150
|
+
"active:border-success-600 active:bg-success-600"
|
|
151
|
+
]
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
variant: "contained",
|
|
155
|
+
color: "warning",
|
|
156
|
+
class: [
|
|
157
|
+
"border-warning-500 bg-warning-500 text-white",
|
|
158
|
+
"hover:border-warning-400 hover:bg-warning-400",
|
|
159
|
+
"active:border-warning-600 active:bg-warning-600"
|
|
160
|
+
]
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
variant: "contained",
|
|
164
|
+
color: "error",
|
|
165
|
+
class: [
|
|
166
|
+
"border-error-500 bg-error-500 text-white",
|
|
167
|
+
"hover:border-error-400 hover:bg-error-400",
|
|
168
|
+
"active:border-error-600 active:bg-error-600"
|
|
169
|
+
]
|
|
170
|
+
}
|
|
171
|
+
],
|
|
172
|
+
defaultVariants: {
|
|
173
|
+
fullWidth: false,
|
|
174
|
+
color: "primary",
|
|
175
|
+
size: "md",
|
|
176
|
+
variant: "text"
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
);
|
|
180
|
+
var iconContainerCva = cva("", {
|
|
181
|
+
variants: {
|
|
182
|
+
site: {
|
|
183
|
+
left: "",
|
|
184
|
+
right: ""
|
|
185
|
+
},
|
|
186
|
+
size: {
|
|
187
|
+
sm: "",
|
|
188
|
+
md: "",
|
|
189
|
+
lg: ""
|
|
190
|
+
}
|
|
191
|
+
},
|
|
192
|
+
compoundVariants: [
|
|
193
|
+
// ---------- LEFT ---------- //
|
|
194
|
+
{
|
|
195
|
+
site: "left",
|
|
196
|
+
size: "sm",
|
|
197
|
+
class: "-ml-0.5 mr-1.5"
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
site: "left",
|
|
201
|
+
size: "md",
|
|
202
|
+
class: "-ml-1 mr-2"
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
site: "left",
|
|
206
|
+
size: "lg",
|
|
207
|
+
class: "-ml-1.5 mr-2.5"
|
|
208
|
+
},
|
|
209
|
+
// ---------- RIGHT ---------- //
|
|
210
|
+
{
|
|
211
|
+
site: "right",
|
|
212
|
+
size: "sm",
|
|
213
|
+
class: "-mr-0.5 ml-1.5"
|
|
214
|
+
},
|
|
215
|
+
{
|
|
216
|
+
site: "right",
|
|
217
|
+
size: "md",
|
|
218
|
+
class: "-mr-1 ml-2"
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
site: "right",
|
|
222
|
+
size: "lg",
|
|
223
|
+
class: "-mr-1.5 ml-2.5"
|
|
224
|
+
}
|
|
225
|
+
],
|
|
226
|
+
defaultVariants: {
|
|
227
|
+
site: "left",
|
|
228
|
+
size: "md"
|
|
229
|
+
}
|
|
230
|
+
});
|
|
231
|
+
var iconCva = cva("", {
|
|
232
|
+
variants: {
|
|
233
|
+
loading: {
|
|
234
|
+
true: "animate-spin motion-reduce:hidden"
|
|
235
|
+
},
|
|
236
|
+
size: {
|
|
237
|
+
sm: "h-4.5 w-4.5",
|
|
238
|
+
md: "size-5",
|
|
239
|
+
lg: "h-5.5 w-5.5"
|
|
240
|
+
}
|
|
241
|
+
},
|
|
242
|
+
defaultVariants: {
|
|
243
|
+
loading: false,
|
|
244
|
+
size: "md"
|
|
245
|
+
}
|
|
246
|
+
});
|
|
247
|
+
function Button({
|
|
248
|
+
asChild = false,
|
|
249
|
+
variant = "text",
|
|
250
|
+
color = "primary",
|
|
251
|
+
disabled = false,
|
|
252
|
+
fullWidth = false,
|
|
253
|
+
loadingPosition = "start",
|
|
254
|
+
ref,
|
|
255
|
+
...props
|
|
256
|
+
}) {
|
|
257
|
+
const {
|
|
258
|
+
children,
|
|
259
|
+
type = "button",
|
|
260
|
+
loading = false,
|
|
261
|
+
size = "md",
|
|
262
|
+
endIcon,
|
|
263
|
+
startIcon,
|
|
264
|
+
...rest
|
|
265
|
+
} = { ...props, loadingPosition };
|
|
266
|
+
const Comp = asChild ? Slot : "button";
|
|
267
|
+
const buttonStyles = buttonCva({ fullWidth, size, variant, color });
|
|
268
|
+
const isDisabled = disabled || loading;
|
|
269
|
+
return /* @__PURE__ */ jsx(
|
|
270
|
+
Comp,
|
|
271
|
+
{
|
|
272
|
+
...asChild ? props : rest,
|
|
273
|
+
"aria-disabled": isDisabled || void 0,
|
|
274
|
+
className: buttonStyles,
|
|
275
|
+
"data-state": loading ? "loading" : void 0,
|
|
276
|
+
disabled: isDisabled,
|
|
277
|
+
ref,
|
|
278
|
+
role: Comp !== "button" ? "button" : void 0,
|
|
279
|
+
tabIndex: isDisabled ? -1 : 0,
|
|
280
|
+
type: Comp === "button" ? type : void 0,
|
|
281
|
+
children: asChild ? /* @__PURE__ */ jsx(ButtonContent, { children }) : /* @__PURE__ */ jsx(ButtonContent, { ...props })
|
|
282
|
+
}
|
|
283
|
+
);
|
|
284
|
+
}
|
|
285
|
+
function ButtonContent({
|
|
286
|
+
children,
|
|
287
|
+
loading = false,
|
|
288
|
+
size = "md",
|
|
289
|
+
loadingPosition = "start",
|
|
290
|
+
startIcon,
|
|
291
|
+
endIcon,
|
|
292
|
+
...props
|
|
293
|
+
}) {
|
|
294
|
+
const isStartLoading = loading && loadingPosition === "start";
|
|
295
|
+
const StartIcon = isStartLoading ? /* @__PURE__ */ jsx(LoadingIcon, { "aria-label": "Loading" }) : startIcon || null;
|
|
296
|
+
const startIconStyles = iconCva({ size, loading: isStartLoading });
|
|
297
|
+
const startIconContainerStyles = iconContainerCva({ size, site: "left" });
|
|
298
|
+
const isEndLoading = loading && loadingPosition === "end";
|
|
299
|
+
const EndIcon = isEndLoading ? /* @__PURE__ */ jsx(LoadingIcon, { "aria-label": "Loading" }) : endIcon || null;
|
|
300
|
+
const endIconStyles = iconCva({ size, loading: isEndLoading });
|
|
301
|
+
const endIconContainerStyles = iconContainerCva({ size, site: "right" });
|
|
302
|
+
const LeadingIcon = StartIcon ? /* @__PURE__ */ jsx("span", { className: startIconContainerStyles, role: isStartLoading ? "progressbar" : void 0, children: React.cloneElement(StartIcon, { className: startIconStyles }) }) : null;
|
|
303
|
+
const TrailingIcon = EndIcon ? /* @__PURE__ */ jsx("span", { className: endIconContainerStyles, role: isEndLoading ? "progressbar" : void 0, children: React.cloneElement(EndIcon, { className: endIconStyles }) }) : null;
|
|
304
|
+
return React.isValidElement(children) ? React.cloneElement(
|
|
305
|
+
children,
|
|
306
|
+
props,
|
|
307
|
+
/* @__PURE__ */ jsxs(React.Fragment, { children: [
|
|
308
|
+
LeadingIcon,
|
|
309
|
+
React.isValidElement(children) ? children.props?.children : null,
|
|
310
|
+
TrailingIcon
|
|
311
|
+
] })
|
|
312
|
+
) : /* @__PURE__ */ jsxs(React.Fragment, { children: [
|
|
313
|
+
LeadingIcon,
|
|
314
|
+
children,
|
|
315
|
+
TrailingIcon
|
|
316
|
+
] });
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
export { Button };
|
package/dist/chunk-H2BWO3SI.cjs
CHANGED
|
@@ -0,0 +1,36 @@
|
|
|
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, 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("bg-gray-350 flex h-full w-full items-center justify-center", className),
|
|
31
|
+
...props
|
|
32
|
+
}
|
|
33
|
+
);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export { Avatar, AvatarFallback, AvatarImage };
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { Select as Select$1 } from 'radix-ui';
|
|
2
|
+
import { CaretSortIcon, CheckIcon } from '@radix-ui/react-icons';
|
|
3
|
+
import { cva } from 'class-variance-authority';
|
|
4
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
5
|
+
|
|
6
|
+
var selectCva = cva(
|
|
7
|
+
[
|
|
8
|
+
"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",
|
|
9
|
+
"placeholder:select-none placeholder:text-gray-200",
|
|
10
|
+
"invalid:border-error-500 focus:border-primary-400 active:border-primary-400",
|
|
11
|
+
"disabled:border-gray-400 disabled:text-gray-200 disabled:placeholder:text-gray-300"
|
|
12
|
+
],
|
|
13
|
+
{
|
|
14
|
+
variants: {
|
|
15
|
+
invalid: {
|
|
16
|
+
true: ["text-error-500 border-error-500 hover:border-error-400 focus:text-gray-100"],
|
|
17
|
+
false: ["border-gray-350 hover:border-primary-500 text-gray-100"]
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
defaultVariants: {
|
|
21
|
+
invalid: false
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
);
|
|
25
|
+
function Select({ children, placeholder, invalid = false, ref, ...props }) {
|
|
26
|
+
const selectStyles = selectCva({ invalid });
|
|
27
|
+
return /* @__PURE__ */ jsxs(Select$1.Root, { ...props, children: [
|
|
28
|
+
/* @__PURE__ */ jsxs(Select$1.Trigger, { className: selectStyles, ref, children: [
|
|
29
|
+
/* @__PURE__ */ jsx(Select$1.Value, { placeholder }),
|
|
30
|
+
/* @__PURE__ */ jsx(Select$1.Icon, { className: "-mr-1.5", children: /* @__PURE__ */ jsx(CaretSortIcon, { className: "size-5 text-gray-200" }) })
|
|
31
|
+
] }),
|
|
32
|
+
/* @__PURE__ */ jsx(Select$1.Portal, { children: /* @__PURE__ */ jsx(
|
|
33
|
+
Select$1.Content,
|
|
34
|
+
{
|
|
35
|
+
sideOffset: 4,
|
|
36
|
+
className: "bg-app-foreground z-50 w-full overflow-hidden border border-gray-400 py-1",
|
|
37
|
+
children: /* @__PURE__ */ jsx(Select$1.Viewport, { children })
|
|
38
|
+
}
|
|
39
|
+
) })
|
|
40
|
+
] });
|
|
41
|
+
}
|
|
42
|
+
function SelectItem({ children, ...props }) {
|
|
43
|
+
return /* @__PURE__ */ jsxs(
|
|
44
|
+
Select$1.Item,
|
|
45
|
+
{
|
|
46
|
+
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",
|
|
47
|
+
...props,
|
|
48
|
+
children: [
|
|
49
|
+
/* @__PURE__ */ jsx(Select$1.ItemText, { className: "flex-1", children }),
|
|
50
|
+
/* @__PURE__ */ jsx(Select$1.ItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, { className: "size-4" }) })
|
|
51
|
+
]
|
|
52
|
+
}
|
|
53
|
+
);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export { Select, SelectItem };
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { Tooltip as Tooltip$1 } from 'radix-ui';
|
|
2
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
|
+
|
|
4
|
+
function Tooltip({
|
|
5
|
+
defaultOpen,
|
|
6
|
+
content,
|
|
7
|
+
open,
|
|
8
|
+
onOpenChange,
|
|
9
|
+
children,
|
|
10
|
+
side,
|
|
11
|
+
align,
|
|
12
|
+
collisionPadding = 8,
|
|
13
|
+
sideOffset = 8,
|
|
14
|
+
...props
|
|
15
|
+
}) {
|
|
16
|
+
return /* @__PURE__ */ jsxs(Tooltip$1.Root, { delayDuration: 0, open, defaultOpen, onOpenChange, children: [
|
|
17
|
+
/* @__PURE__ */ jsx(Tooltip$1.Trigger, { asChild: true, children }),
|
|
18
|
+
content ? /* @__PURE__ */ jsx(Tooltip$1.Portal, { children: /* @__PURE__ */ jsxs(
|
|
19
|
+
Tooltip$1.Content,
|
|
20
|
+
{
|
|
21
|
+
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",
|
|
22
|
+
sideOffset,
|
|
23
|
+
side,
|
|
24
|
+
align,
|
|
25
|
+
collisionPadding,
|
|
26
|
+
...props,
|
|
27
|
+
children: [
|
|
28
|
+
content,
|
|
29
|
+
/* @__PURE__ */ jsx(Tooltip$1.Arrow, { width: 8, height: 4, className: "fill-white" })
|
|
30
|
+
]
|
|
31
|
+
}
|
|
32
|
+
) }) : null
|
|
33
|
+
] });
|
|
34
|
+
}
|
|
35
|
+
function TooltipProvider({ children }) {
|
|
36
|
+
return /* @__PURE__ */ jsx(Tooltip$1.Provider, { skipDelayDuration: 500, children });
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export { Tooltip, TooltipProvider };
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { cn } from './chunk-ZD2QRAOX.js';
|
|
2
|
+
import { cva } from 'class-variance-authority';
|
|
3
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
4
|
+
|
|
5
|
+
var inputCva = cva(
|
|
6
|
+
[
|
|
7
|
+
"bg-app-foreground font-poppins h-10 w-full appearance-none border py-2 outline-0 transition-colors duration-300 ease-in-out",
|
|
8
|
+
"placeholder:select-none placeholder:text-gray-200",
|
|
9
|
+
"invalid:border-error-500 focus:border-primary-400 active:border-primary-400",
|
|
10
|
+
"disabled:border-gray-400 disabled:text-gray-200 disabled:placeholder:text-gray-300"
|
|
11
|
+
],
|
|
12
|
+
{
|
|
13
|
+
variants: {
|
|
14
|
+
invalid: {
|
|
15
|
+
true: ["text-error-500 border-error-500 hover:border-error-400 focus:text-gray-100"],
|
|
16
|
+
false: ["border-gray-350 hover:border-primary-500 text-gray-100"]
|
|
17
|
+
},
|
|
18
|
+
withStartIcon: {
|
|
19
|
+
true: "pl-11",
|
|
20
|
+
false: "pl-3"
|
|
21
|
+
},
|
|
22
|
+
withEndIcon: {
|
|
23
|
+
true: "pr-11",
|
|
24
|
+
false: "pr-3"
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
defaultVariants: {
|
|
28
|
+
invalid: false,
|
|
29
|
+
withStartIcon: false,
|
|
30
|
+
withEndIcon: false
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
);
|
|
34
|
+
var inputIconContainerCva = cva(
|
|
35
|
+
["pointer-events-none absolute inset-y-2 inline-flex w-10 place-content-center items-center text-center"],
|
|
36
|
+
{
|
|
37
|
+
variants: {
|
|
38
|
+
disabled: {
|
|
39
|
+
true: "text-gray-200"
|
|
40
|
+
},
|
|
41
|
+
site: {
|
|
42
|
+
right: "right-0 border-l border-l-gray-400 pr-1",
|
|
43
|
+
left: "left-0 border-r border-r-gray-400 pl-1"
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
defaultVariants: {
|
|
47
|
+
disabled: false
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
);
|
|
51
|
+
function Input({ invalid = false, startIcon, endIcon, disabled = false, className, ...props }) {
|
|
52
|
+
const inputStyles = inputCva({ withEndIcon: !!endIcon, withStartIcon: !!startIcon, invalid });
|
|
53
|
+
const inputIconStartContainer = inputIconContainerCva({ site: "left", disabled });
|
|
54
|
+
const inputIconEndContainer = inputIconContainerCva({ site: "right", disabled });
|
|
55
|
+
return /* @__PURE__ */ jsxs("div", { className: "text-body-2 relative text-gray-100", children: [
|
|
56
|
+
startIcon ? /* @__PURE__ */ jsx("span", { className: inputIconStartContainer, children: startIcon }) : null,
|
|
57
|
+
/* @__PURE__ */ jsx(
|
|
58
|
+
"input",
|
|
59
|
+
{
|
|
60
|
+
"aria-invalid": invalid || void 0,
|
|
61
|
+
disabled,
|
|
62
|
+
className: cn(inputStyles, className),
|
|
63
|
+
...props
|
|
64
|
+
}
|
|
65
|
+
),
|
|
66
|
+
endIcon ? /* @__PURE__ */ jsx("span", { "aria-hidden": true, className: inputIconEndContainer, children: endIcon }) : null
|
|
67
|
+
] });
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export { Input };
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
+
export * from '@radix-ui/react-icons';
|
|
3
|
+
|
|
4
|
+
function GoogleLogoIcon(props) {
|
|
5
|
+
return /* @__PURE__ */ jsxs(
|
|
6
|
+
"svg",
|
|
7
|
+
{
|
|
8
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
9
|
+
viewBox: "0 0 24 24",
|
|
10
|
+
strokeWidth: "2",
|
|
11
|
+
stroke: "currentColor",
|
|
12
|
+
fill: "none",
|
|
13
|
+
strokeLinecap: "round",
|
|
14
|
+
strokeLinejoin: "round",
|
|
15
|
+
...props,
|
|
16
|
+
children: [
|
|
17
|
+
/* @__PURE__ */ jsx("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }),
|
|
18
|
+
/* @__PURE__ */ jsx(
|
|
19
|
+
"path",
|
|
20
|
+
{
|
|
21
|
+
d: "M12 2a9.96 9.96 0 0 1 6.29 2.226a1 1 0 0 1 .04 1.52l-1.51 1.362a1 1 0 0 1 -1.265 .06a6 6 0 1 0 2.103 6.836l.001 -.004h-3.66a1 1 0 0 1 -.992 -.883l-.007 -.117v-2a1 1 0 0 1 1 -1h6.945a1 1 0 0 1 .994 .89c.04 .367 .061 .737 .061 1.11c0 5.523 -4.477 10 -10 10s-10 -4.477 -10 -10s4.477 -10 10 -10z",
|
|
22
|
+
strokeWidth: "0",
|
|
23
|
+
fill: "currentColor"
|
|
24
|
+
}
|
|
25
|
+
)
|
|
26
|
+
]
|
|
27
|
+
}
|
|
28
|
+
);
|
|
29
|
+
}
|
|
30
|
+
function LoadingIcon(props) {
|
|
31
|
+
return /* @__PURE__ */ jsx(
|
|
32
|
+
"svg",
|
|
33
|
+
{
|
|
34
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
35
|
+
xmlnsXlink: "http://www.w3.org/1999/xlink",
|
|
36
|
+
fill: "currentColor",
|
|
37
|
+
version: "1.1",
|
|
38
|
+
viewBox: "0 0 26.349 26.35",
|
|
39
|
+
xmlSpace: "preserve",
|
|
40
|
+
...props,
|
|
41
|
+
children: /* @__PURE__ */ jsx("g", { children: /* @__PURE__ */ jsxs("g", { children: [
|
|
42
|
+
/* @__PURE__ */ jsx("circle", { cx: "13.792", cy: "3.082", r: "3.082" }),
|
|
43
|
+
/* @__PURE__ */ jsx("circle", { cx: "13.792", cy: "24.501", r: "1.849" }),
|
|
44
|
+
/* @__PURE__ */ jsx("circle", { cx: "6.219", cy: "6.218", r: "2.774" }),
|
|
45
|
+
/* @__PURE__ */ jsx("circle", { cx: "21.365", cy: "21.363", r: "1.541" }),
|
|
46
|
+
/* @__PURE__ */ jsx("circle", { cx: "3.082", cy: "13.792", r: "2.465" }),
|
|
47
|
+
/* @__PURE__ */ jsx("circle", { cx: "24.501", cy: "13.791", r: "1.232" }),
|
|
48
|
+
/* @__PURE__ */ jsx("path", { d: "M4.694,19.84c-0.843,0.843-0.843,2.207,0,3.05c0.842,0.843,2.208,0.843,3.05,0c0.843-0.843,0.843-2.207,0-3.05 C6.902,18.996,5.537,18.988,4.694,19.84z" }),
|
|
49
|
+
/* @__PURE__ */ jsx("circle", { cx: "21.364", cy: "6.218", r: "0.924" })
|
|
50
|
+
] }) })
|
|
51
|
+
}
|
|
52
|
+
);
|
|
53
|
+
}
|
|
54
|
+
function Auth0LogoIcon(props) {
|
|
55
|
+
return /* @__PURE__ */ jsxs("svg", { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", ...props, children: [
|
|
56
|
+
/* @__PURE__ */ jsx("title", {}),
|
|
57
|
+
/* @__PURE__ */ jsx(
|
|
58
|
+
"path",
|
|
59
|
+
{
|
|
60
|
+
d: "M21.98 7.448L19.62 0H4.347L2.02 7.448c-1.352 4.312.03 9.206 3.815 12.015L12.007 24l6.157-4.552c3.755-2.81 5.182-7.688 3.815-12.015l-6.16 4.58 2.343 7.45-6.157-4.597-6.158 4.58 2.358-7.433-6.188-4.55 7.63-.045L12.008 0l2.356 7.404 7.615.044z",
|
|
61
|
+
fill: "currentColor"
|
|
62
|
+
}
|
|
63
|
+
)
|
|
64
|
+
] });
|
|
65
|
+
}
|
|
66
|
+
function XLogoIcon(props) {
|
|
67
|
+
return /* @__PURE__ */ jsx(
|
|
68
|
+
"svg",
|
|
69
|
+
{
|
|
70
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
71
|
+
version: "1.1",
|
|
72
|
+
id: "Layer_1",
|
|
73
|
+
width: "24px",
|
|
74
|
+
height: "24px",
|
|
75
|
+
viewBox: "0 0 24 24",
|
|
76
|
+
...props,
|
|
77
|
+
children: /* @__PURE__ */ jsx(
|
|
78
|
+
"path",
|
|
79
|
+
{
|
|
80
|
+
d: "M14.095479,10.316482L22.286354,1h-1.940718l-7.115352,8.087682L7.551414,1H1l8.589488,12.231093L1,23h1.940717 l7.509372-8.542861L16.448587,23H23L14.095479,10.316482z M11.436522,13.338465l-0.871624-1.218704l-6.924311-9.68815h2.981339 l5.58978,7.82155l0.867949,1.218704l7.26506,10.166271h-2.981339L11.436522,13.338465z",
|
|
81
|
+
fill: "currentColor"
|
|
82
|
+
}
|
|
83
|
+
)
|
|
84
|
+
}
|
|
85
|
+
);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export { Auth0LogoIcon, GoogleLogoIcon, LoadingIcon, XLogoIcon };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { cn } from './chunk-ZD2QRAOX.js';
|
|
2
|
+
import { Separator as Separator$1 } from 'radix-ui';
|
|
3
|
+
import { jsx } from 'react/jsx-runtime';
|
|
4
|
+
|
|
5
|
+
function Separator({ className, orientation = "horizontal", decorative = false, ...props }) {
|
|
6
|
+
return /* @__PURE__ */ jsx(
|
|
7
|
+
Separator$1.Root,
|
|
8
|
+
{
|
|
9
|
+
decorative,
|
|
10
|
+
orientation,
|
|
11
|
+
"aria-orientation": orientation,
|
|
12
|
+
className: cn(
|
|
13
|
+
"shrink-0 bg-gray-400",
|
|
14
|
+
orientation === "horizontal" ? "h-[1px] w-full" : "h-full w-[1px]",
|
|
15
|
+
className
|
|
16
|
+
),
|
|
17
|
+
...props
|
|
18
|
+
}
|
|
19
|
+
);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export { Separator };
|