@6thbridge/hexa 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.d.mts +17 -20
- package/dist/index.d.ts +17 -20
- package/dist/index.js +2 -1053
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -1009
- package/dist/index.mjs.map +1 -1
- package/dist/output.css +0 -16
- package/package.json +1 -1
- package/turbo/generators/config.ts +0 -30
- package/turbo/generators/templates/component.hbs +0 -8
package/dist/index.mjs
CHANGED
@@ -1,1009 +1,2 @@
|
|
1
|
-
// src/components/label/FormLabel.tsx
|
2
|
-
|
3
|
-
|
4
|
-
// src/components/label/index.tsx
|
5
|
-
import * as React from "react";
|
6
|
-
import * as LabelPrimitive from "@radix-ui/react-label";
|
7
|
-
import { cva } from "class-variance-authority";
|
8
|
-
|
9
|
-
// src/utils/index.ts
|
10
|
-
import { clsx } from "clsx";
|
11
|
-
import { twMerge } from "tailwind-merge";
|
12
|
-
function cn(...inputs) {
|
13
|
-
return twMerge(clsx(inputs));
|
14
|
-
}
|
15
|
-
|
16
|
-
// src/components/label/index.tsx
|
17
|
-
import { jsx } from "react/jsx-runtime";
|
18
|
-
var labelVariants = cva(
|
19
|
-
"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
|
20
|
-
);
|
21
|
-
var Label = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
22
|
-
LabelPrimitive.Root,
|
23
|
-
{
|
24
|
-
ref,
|
25
|
-
className: cn(labelVariants(), className),
|
26
|
-
...props
|
27
|
-
}
|
28
|
-
));
|
29
|
-
Label.displayName = LabelPrimitive.Root.displayName;
|
30
|
-
|
31
|
-
// src/components/label/FormLabel.tsx
|
32
|
-
import { jsx as jsx2, jsxs } from "react/jsx-runtime";
|
33
|
-
var FormLabel = React2.forwardRef(({ className, children, showAsterisk, error, ...props }, ref) => {
|
34
|
-
return /* @__PURE__ */ jsx2(
|
35
|
-
Label,
|
36
|
-
{
|
37
|
-
ref,
|
38
|
-
className: cn(error && "text-red-500", className),
|
39
|
-
...props,
|
40
|
-
children: showAsterisk ? /* @__PURE__ */ jsxs("p", { children: [
|
41
|
-
children,
|
42
|
-
/* @__PURE__ */ jsx2("span", { className: "text-red-500", children: "*" })
|
43
|
-
] }) : children
|
44
|
-
}
|
45
|
-
);
|
46
|
-
});
|
47
|
-
FormLabel.displayName = "FormLabel";
|
48
|
-
|
49
|
-
// src/components/loader/index.tsx
|
50
|
-
import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
|
51
|
-
var Loader = ({
|
52
|
-
size = 16,
|
53
|
-
colour = "primary"
|
54
|
-
}) => {
|
55
|
-
return /* @__PURE__ */ jsxs2(
|
56
|
-
"svg",
|
57
|
-
{
|
58
|
-
className: "animate-spin",
|
59
|
-
width: size,
|
60
|
-
height: size,
|
61
|
-
viewBox: "0 0 20 20",
|
62
|
-
fill: "none",
|
63
|
-
children: [
|
64
|
-
/* @__PURE__ */ jsx3("circle", { cx: "10", cy: "10", r: "9.25", stroke: "transparent", strokeWidth: "1.5" }),
|
65
|
-
/* @__PURE__ */ jsx3(
|
66
|
-
"path",
|
67
|
-
{
|
68
|
-
d: "M10 0.595792C10 0.266746 10.267 -0.00185055 10.5954 0.0177417C11.9786 0.100242 13.3318 0.469461 14.5682 1.1044C15.9816 1.83021 17.2016 2.88235 18.1273 4.17366C19.0531 5.46496 19.6578 6.95826 19.8913 8.52984C20.1249 10.1014 19.9807 11.706 19.4705 13.2108C18.9604 14.7155 18.0991 16.077 16.9579 17.1825C15.8167 18.288 14.4285 19.1056 12.9084 19.5677C11.3882 20.0298 9.77982 20.123 8.21646 19.8397C6.84883 19.5918 5.55009 19.0619 4.40196 18.2863C4.12931 18.1021 4.08072 17.7265 4.28083 17.4653C4.48094 17.2041 4.85388 17.1564 5.12801 17.3384C6.12474 18.0001 7.24768 18.4531 8.42898 18.6672C9.80606 18.9168 11.2228 18.8347 12.5618 18.4276C13.9008 18.0206 15.1236 17.3004 16.1288 16.3266C17.134 15.3528 17.8927 14.1536 18.342 12.8282C18.7914 11.5027 18.9185 10.0893 18.7127 8.70502C18.507 7.32071 17.9743 6.00535 17.1589 4.86792C16.3435 3.73048 15.2688 2.80371 14.0238 2.16439C12.9559 1.61596 11.789 1.29259 10.5954 1.21173C10.2671 1.18949 10 0.92484 10 0.595792Z",
|
69
|
-
fill: colour === "primary" ? "#ffffff" : "currentColor",
|
70
|
-
className: "rounded"
|
71
|
-
}
|
72
|
-
)
|
73
|
-
]
|
74
|
-
}
|
75
|
-
);
|
76
|
-
};
|
77
|
-
|
78
|
-
// src/components/button/index.tsx
|
79
|
-
import * as React3 from "react";
|
80
|
-
import { Slot } from "@radix-ui/react-slot";
|
81
|
-
import { cva as cva2 } from "class-variance-authority";
|
82
|
-
import { Fragment, jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
|
83
|
-
var buttonVariants = cva2(
|
84
|
-
"overflow-hidden isolate relative inline-flex h-fit items-center justify-center whitespace-nowrap text-sm font-medium ring-offset-background dark:ring-offset-transparent transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:!pointer-events-none",
|
85
|
-
{
|
86
|
-
variants: {
|
87
|
-
variant: {
|
88
|
-
primary: "border-primary-main bg-primary-main hover:bg-primary-main/70 disabled:bg-primary-main/70 text-white font-bold",
|
89
|
-
neutral: "!border-0 bg-transparent text-primary-main hover:opacity-80 disabled:opacity-60",
|
90
|
-
outlined: "border-blue-950 text-blue-950 hover:opacity-80 disabled:opacity-60",
|
91
|
-
"light-outlined": "border-white text-white hover:opacity-80 disabled:opacity-60",
|
92
|
-
"primary-outlined": " text-primary-main bg-primary-main/20 hover:opacity-80 disabled:opacity-60 !font-medium",
|
93
|
-
"dark-text": "border-transparent bg-transparent hover:bg-opacity-70 disabled:bg-opacity-70 text-black font-medium",
|
94
|
-
light: "border-white bg-white hover:bg-opacity-70 disabled:bg-opacity-70 text-blue-950 font-semibold"
|
95
|
-
},
|
96
|
-
size: {
|
97
|
-
// lg: "h-15 px-8 items-center",
|
98
|
-
// sm: "h-10 px-3.5 items-center text-sm",
|
99
|
-
default: "py-[0.625rem] px-[1.5rem] text-[0.875rem] leading-[1.25rem] font-medium rounded-lg",
|
100
|
-
sm: "py-[0.375rem] px-[1rem] text-[0.75rem] leading-[1rem] font-medium rounded-lg",
|
101
|
-
lg: "py-[0.75rem] px-[1.5rem] text-[1rem] leading-[1.5rem] font-medium rounded-lg",
|
102
|
-
md: "h-12 py-1 px-5 items-center",
|
103
|
-
"icon-sm": "h-[1.75rem] w-[1.75rem] flex justify-center items-center font-medium rounded-lg",
|
104
|
-
icon: "h-[2.5rem] w-[2.75rem] flex justify-center items-center font-medium rounded-lg",
|
105
|
-
"icon-lg": "h-[3rem] w-[3rem] flex justify-center items-center font-medium rounded-lg"
|
106
|
-
}
|
107
|
-
},
|
108
|
-
defaultVariants: {
|
109
|
-
variant: "primary",
|
110
|
-
size: "default"
|
111
|
-
}
|
112
|
-
}
|
113
|
-
);
|
114
|
-
var Button = ({
|
115
|
-
className,
|
116
|
-
variant = "primary",
|
117
|
-
size,
|
118
|
-
asChild = false,
|
119
|
-
isLoading = false,
|
120
|
-
leftNode,
|
121
|
-
rightNode,
|
122
|
-
LoaderSize,
|
123
|
-
ref,
|
124
|
-
...props
|
125
|
-
}) => {
|
126
|
-
const Component = asChild ? Slot : "button";
|
127
|
-
const { children, disabled, ...rest } = props;
|
128
|
-
const reference = React3.useRef(null);
|
129
|
-
return /* @__PURE__ */ jsx4(
|
130
|
-
Component,
|
131
|
-
{
|
132
|
-
className: cn(buttonVariants({ variant, size, className })),
|
133
|
-
ref: reference || ref,
|
134
|
-
disabled: disabled || isLoading,
|
135
|
-
...rest,
|
136
|
-
children: /* @__PURE__ */ jsx4("div", { className: "flex font-medium justify-center items-center gap-2", children: isLoading ? /* @__PURE__ */ jsx4(Fragment, { children: /* @__PURE__ */ jsx4("span", { className: "mx-auto", children: /* @__PURE__ */ jsx4(Loader, { size: LoaderSize }) }) }) : /* @__PURE__ */ jsxs3(Fragment, { children: [
|
137
|
-
leftNode,
|
138
|
-
children,
|
139
|
-
rightNode
|
140
|
-
] }) })
|
141
|
-
}
|
142
|
-
);
|
143
|
-
};
|
144
|
-
Button.displayName = "Button";
|
145
|
-
|
146
|
-
// src/components/input/index.tsx
|
147
|
-
import { cva as cva3 } from "class-variance-authority";
|
148
|
-
|
149
|
-
// src/components/form/ErrorMessage.tsx
|
150
|
-
import React4 from "react";
|
151
|
-
import { jsx as jsx5 } from "react/jsx-runtime";
|
152
|
-
var ErrorMessage = React4.forwardRef(({ className, children, error, ...props }, ref) => {
|
153
|
-
const body = error ?? children;
|
154
|
-
if (!body) {
|
155
|
-
return null;
|
156
|
-
}
|
157
|
-
return /* @__PURE__ */ jsx5(
|
158
|
-
"p",
|
159
|
-
{
|
160
|
-
ref,
|
161
|
-
className: cn("text-xs font-normal text-[#F04248]", className),
|
162
|
-
...props,
|
163
|
-
children: body
|
164
|
-
}
|
165
|
-
);
|
166
|
-
});
|
167
|
-
ErrorMessage.displayName = "ErrorMessage";
|
168
|
-
|
169
|
-
// src/components/form/FormDescription.tsx
|
170
|
-
import React5 from "react";
|
171
|
-
import { jsx as jsx6 } from "react/jsx-runtime";
|
172
|
-
var FormDescription = React5.forwardRef(({ className, ...props }, ref) => {
|
173
|
-
return /* @__PURE__ */ jsx6(
|
174
|
-
"p",
|
175
|
-
{
|
176
|
-
ref,
|
177
|
-
className: cn("text-sm text-[#8E98A8", className),
|
178
|
-
...props
|
179
|
-
}
|
180
|
-
);
|
181
|
-
});
|
182
|
-
FormDescription.displayName = "FormDescription";
|
183
|
-
|
184
|
-
// src/components/input/index.tsx
|
185
|
-
import { jsx as jsx7, jsxs as jsxs4 } from "react/jsx-runtime";
|
186
|
-
var inputVariants = cva3(
|
187
|
-
"!p-0 flex h-full w-full !border-transparent !bg-transparent text-base focus-visible:bg-transparent focus-visible:outline-none focus-visible:ring-0 focus-visible:ring-offset-0 disabled:cursor-not-allowed disabled:opacity-50",
|
188
|
-
{
|
189
|
-
variants: {
|
190
|
-
status: {
|
191
|
-
default: "placeholder:text-[#C4C4C4] dark:placeholder:text-[#9299A2]",
|
192
|
-
error: "placeholder:text-red-500 text-red-500",
|
193
|
-
loading: "placeholder:text-[#C4C4C4] dark:placeholder:text-[#9299A2]",
|
194
|
-
prefilled: ""
|
195
|
-
}
|
196
|
-
},
|
197
|
-
defaultVariants: {
|
198
|
-
status: "default"
|
199
|
-
}
|
200
|
-
}
|
201
|
-
);
|
202
|
-
var BaseInnerInput = ({
|
203
|
-
className,
|
204
|
-
status,
|
205
|
-
type,
|
206
|
-
ref,
|
207
|
-
...props
|
208
|
-
}) => {
|
209
|
-
return /* @__PURE__ */ jsx7(
|
210
|
-
"input",
|
211
|
-
{
|
212
|
-
type,
|
213
|
-
className: cn(inputVariants({ status }), className),
|
214
|
-
ref,
|
215
|
-
...props
|
216
|
-
}
|
217
|
-
);
|
218
|
-
};
|
219
|
-
BaseInnerInput.displayName = "BaseInnerInput";
|
220
|
-
var inputContainerVariants = cva3(
|
221
|
-
"flex relative h-10 w-full rounded-[4px] dark:!bg-transparent border transition px-3 py-2 text-base placeholder:text-[#79818C] focus-within:outline-0 focus-within:ring-0 focus-visible:ring-offset-0 disabled:cursor-not-allowed disabled:opacity-50 dark:disabled:!border-[#9299A2]",
|
222
|
-
{
|
223
|
-
variants: {
|
224
|
-
status: {
|
225
|
-
default: "border-[#DEDEDE] dark:border-[#676767] bg-white text-[#191919] dark:!bg-transparent caret-[#00B2A9] focus-within:bg-white dark:focus-within:!bg-transparent dark:text-white focus-within:border-[#00B2A9] dark:focus-within:border-[#9299A2] dark:disabled:!border-[#9299A2]",
|
226
|
-
error: "placeholder:text-red-500 bg-red-50 border-red-500 dark:!bg-status-error-bg-dark text-red-500 focus-within:bg-red-50 focus-within:border-red-500",
|
227
|
-
loading: "",
|
228
|
-
prefilled: "bg-[#F6F6F6] border-[#DEDEDE] dark:!bg-transparent caret-[#DEDEDE] focus-within:bg-[#F6F6F6] focus-within:border-[#DEDEDE] dark:!border-[#9299A2] dark:focus-within:border-[#9299A2]"
|
229
|
-
}
|
230
|
-
},
|
231
|
-
defaultVariants: {
|
232
|
-
status: "default"
|
233
|
-
}
|
234
|
-
}
|
235
|
-
);
|
236
|
-
var sideVariants = cva3(
|
237
|
-
"top-0 flex justify-center items-center h-full min-w-[50px] max-w-[100px] dark:!bg-transparent transition px-3 py-2 text-base placeholder:text-[#79818C] focus-within:outline-0 focus-within:ring-0 focus-visible:ring-offset-0 disabled:cursor-not-allowed disabled:opacity-50 dark:disabled:!border-[#9299A2]",
|
238
|
-
{
|
239
|
-
variants: {
|
240
|
-
side: {
|
241
|
-
left: "left-0 rounded-l-[8px] border-r",
|
242
|
-
right: "right-0 rounded-r-[8px] border-l"
|
243
|
-
},
|
244
|
-
status: {
|
245
|
-
default: "border-[#DEDEDE] dark:border-[#676767] bg-white text-[#191919] dark:!bg-transparent caret-[#00B2A9] focus-within:bg-white dark:focus-within:!bg-transparent dark:text-white focus-within:border-[#00B2A9] dark:focus-within:border-[#9299A2] dark:disabled:!border-[#9299A2]",
|
246
|
-
error: "placeholder:text-red-500 bg-red-50 border-red-500 dark:!bg-red-50 text-red-500 focus-within:bg-red-50 focus-within:border-red-500",
|
247
|
-
loading: "",
|
248
|
-
prefilled: "bg-[#F6F6F6] border-[#DEDEDE] dark:!bg-transparent caret-[#DEDEDE] focus-within:bg-[#F6F6F6] focus-within:border-[#DEDEDE] dark:!border-[#9299A2] dark:focus-within:border-[#9299A2]"
|
249
|
-
}
|
250
|
-
},
|
251
|
-
defaultVariants: {
|
252
|
-
status: "default",
|
253
|
-
side: "left"
|
254
|
-
}
|
255
|
-
}
|
256
|
-
);
|
257
|
-
var Input = ({
|
258
|
-
className,
|
259
|
-
status = "default",
|
260
|
-
disabled,
|
261
|
-
error,
|
262
|
-
isLoading,
|
263
|
-
sideNodeClassName,
|
264
|
-
showAsterisk,
|
265
|
-
label,
|
266
|
-
description,
|
267
|
-
ref,
|
268
|
-
...props
|
269
|
-
}) => {
|
270
|
-
let containerStatus = status;
|
271
|
-
if (error) containerStatus = "error";
|
272
|
-
if (isLoading) containerStatus = "loading";
|
273
|
-
if (disabled) containerStatus = "prefilled";
|
274
|
-
return /* @__PURE__ */ jsxs4("div", { className: "relative space-y-1", children: [
|
275
|
-
/* @__PURE__ */ jsx7(FormLabel, { showAsterisk, error, children: label }),
|
276
|
-
/* @__PURE__ */ jsxs4(
|
277
|
-
"div",
|
278
|
-
{
|
279
|
-
className: cn(
|
280
|
-
inputContainerVariants({ status: containerStatus }),
|
281
|
-
props.leftNode || props.rightNode ? "p-0" : "",
|
282
|
-
className
|
283
|
-
),
|
284
|
-
children: [
|
285
|
-
props.leftNode ? /* @__PURE__ */ jsx7(
|
286
|
-
"div",
|
287
|
-
{
|
288
|
-
className: cn(
|
289
|
-
sideVariants({
|
290
|
-
status: containerStatus,
|
291
|
-
side: "left"
|
292
|
-
}),
|
293
|
-
sideNodeClassName
|
294
|
-
),
|
295
|
-
children: props.leftNode
|
296
|
-
}
|
297
|
-
) : null,
|
298
|
-
/* @__PURE__ */ jsx7(
|
299
|
-
BaseInnerInput,
|
300
|
-
{
|
301
|
-
ref,
|
302
|
-
disabled: isLoading || disabled,
|
303
|
-
className: props.leftNode || props.rightNode ? "!px-3 !py-2" : "",
|
304
|
-
...props
|
305
|
-
}
|
306
|
-
),
|
307
|
-
props.rightNode ? /* @__PURE__ */ jsx7(
|
308
|
-
"div",
|
309
|
-
{
|
310
|
-
className: cn(
|
311
|
-
sideVariants({
|
312
|
-
status: containerStatus,
|
313
|
-
side: "right"
|
314
|
-
}),
|
315
|
-
sideNodeClassName
|
316
|
-
),
|
317
|
-
children: props.rightNode
|
318
|
-
}
|
319
|
-
) : null
|
320
|
-
]
|
321
|
-
}
|
322
|
-
),
|
323
|
-
/* @__PURE__ */ jsx7(FormDescription, { className: "text-gray-400 text-sm !font-normal", children: description }),
|
324
|
-
/* @__PURE__ */ jsx7(ErrorMessage, { error })
|
325
|
-
] });
|
326
|
-
};
|
327
|
-
Input.displayName = "Input";
|
328
|
-
|
329
|
-
// src/components/password-input/index.tsx
|
330
|
-
import { useState } from "react";
|
331
|
-
|
332
|
-
// src/components/password-input/icons/Eye.tsx
|
333
|
-
import { jsx as jsx8, jsxs as jsxs5 } from "react/jsx-runtime";
|
334
|
-
var Eye = () => {
|
335
|
-
return /* @__PURE__ */ jsxs5(
|
336
|
-
"svg",
|
337
|
-
{
|
338
|
-
width: "18",
|
339
|
-
height: "14",
|
340
|
-
viewBox: "0 0 18 14",
|
341
|
-
fill: "none",
|
342
|
-
xmlns: "http://www.w3.org/2000/svg",
|
343
|
-
children: [
|
344
|
-
/* @__PURE__ */ jsx8(
|
345
|
-
"path",
|
346
|
-
{
|
347
|
-
d: "M1.54639 7.26103C1.48389 7.09264 1.48389 6.90741 1.54639 6.73903C2.15517 5.26292 3.18853 4.00081 4.51547 3.1127C5.84241 2.22459 7.40317 1.75049 8.99989 1.75049C10.5966 1.75049 12.1574 2.22459 13.4843 3.1127C14.8113 4.00081 15.8446 5.26292 16.4534 6.73903C16.5159 6.90741 16.5159 7.09264 16.4534 7.26103C15.8446 8.73713 14.8113 9.99925 13.4843 10.8874C12.1574 11.7755 10.5966 12.2496 8.99989 12.2496C7.40317 12.2496 5.84241 11.7755 4.51547 10.8874C3.18853 9.99925 2.15517 8.73713 1.54639 7.26103Z",
|
348
|
-
stroke: "#8E98A8",
|
349
|
-
strokeWidth: "2",
|
350
|
-
strokeLinecap: "round",
|
351
|
-
strokeLinejoin: "round"
|
352
|
-
}
|
353
|
-
),
|
354
|
-
/* @__PURE__ */ jsx8(
|
355
|
-
"path",
|
356
|
-
{
|
357
|
-
d: "M9 9.25C10.2426 9.25 11.25 8.24264 11.25 7C11.25 5.75736 10.2426 4.75 9 4.75C7.75736 4.75 6.75 5.75736 6.75 7C6.75 8.24264 7.75736 9.25 9 9.25Z",
|
358
|
-
stroke: "#8E98A8",
|
359
|
-
strokeWidth: "2",
|
360
|
-
strokeLinecap: "round",
|
361
|
-
strokeLinejoin: "round"
|
362
|
-
}
|
363
|
-
)
|
364
|
-
]
|
365
|
-
}
|
366
|
-
);
|
367
|
-
};
|
368
|
-
|
369
|
-
// src/components/password-input/icons/EyeOff.tsx
|
370
|
-
import { jsx as jsx9, jsxs as jsxs6 } from "react/jsx-runtime";
|
371
|
-
var EyeOff = () => {
|
372
|
-
return /* @__PURE__ */ jsxs6(
|
373
|
-
"svg",
|
374
|
-
{
|
375
|
-
width: "18",
|
376
|
-
height: "18",
|
377
|
-
viewBox: "0 0 18 18",
|
378
|
-
fill: "none",
|
379
|
-
xmlns: "http://www.w3.org/2000/svg",
|
380
|
-
children: [
|
381
|
-
/* @__PURE__ */ jsx9(
|
382
|
-
"path",
|
383
|
-
{
|
384
|
-
d: "M4.08759 12.69C3.26171 11.9072 2.61006 10.9591 2.17509 9.90752C2.10081 9.73454 2.0625 9.54826 2.0625 9.36001C2.0625 9.17177 2.10081 8.98549 2.17509 8.81252C2.75274 7.4073 3.72095 6.19704 4.96509 5.32502C6.14597 4.4998 7.55989 4.07405 9.00009 4.11002C10.0363 4.084 11.064 4.30239 12.0001 4.74752M13.9201 6.03752C14.7415 6.81964 15.3904 7.76486 15.8251 8.81252C15.8994 8.98549 15.9377 9.17177 15.9377 9.36001C15.9377 9.54826 15.8994 9.73454 15.8251 9.90752C15.2474 11.3127 14.2792 12.523 13.0351 13.395C11.8542 14.2202 10.4403 14.646 9.00009 14.61C7.9639 14.636 6.93616 14.4176 6.00009 13.9725",
|
385
|
-
stroke: "#8E98A8",
|
386
|
-
strokeWidth: "1.5",
|
387
|
-
strokeLinecap: "round",
|
388
|
-
strokeLinejoin: "round"
|
389
|
-
}
|
390
|
-
),
|
391
|
-
/* @__PURE__ */ jsx9(
|
392
|
-
"path",
|
393
|
-
{
|
394
|
-
d: "M6.5325 10.2375C6.42732 9.95694 6.37395 9.65962 6.375 9.36C6.375 8.66381 6.65156 7.99613 7.14384 7.50384C7.63613 7.01156 8.30381 6.735 9 6.735C9.3 6.7335 9.597 6.7875 9.8775 6.8925M11.4675 8.4825C11.5725 8.763 11.6265 9.06 11.625 9.36C11.625 10.0562 11.3484 10.7239 10.8562 11.2162C10.3639 11.7084 9.69619 11.985 9 11.985C8.70038 11.986 8.40306 11.9327 8.1225 11.8275M2.25 15L14.25 3",
|
395
|
-
stroke: "#8E98A8",
|
396
|
-
strokeWidth: "1.5",
|
397
|
-
strokeLinecap: "round",
|
398
|
-
strokeLinejoin: "round"
|
399
|
-
}
|
400
|
-
)
|
401
|
-
]
|
402
|
-
}
|
403
|
-
);
|
404
|
-
};
|
405
|
-
|
406
|
-
// src/components/password-input/index.tsx
|
407
|
-
import { jsx as jsx10 } from "react/jsx-runtime";
|
408
|
-
var PasswordInput = ({ ...props }) => {
|
409
|
-
const [passwordVisible, setPasswordVisible] = useState(false);
|
410
|
-
return /* @__PURE__ */ jsx10(
|
411
|
-
Input,
|
412
|
-
{
|
413
|
-
sideNodeClassName: "!border-l-0",
|
414
|
-
rightNode: passwordVisible ? /* @__PURE__ */ jsx10(
|
415
|
-
"button",
|
416
|
-
{
|
417
|
-
type: "button",
|
418
|
-
onClick: () => setPasswordVisible((val) => !val),
|
419
|
-
children: /* @__PURE__ */ jsx10(Eye, {})
|
420
|
-
}
|
421
|
-
) : /* @__PURE__ */ jsx10(
|
422
|
-
"button",
|
423
|
-
{
|
424
|
-
type: "button",
|
425
|
-
onClick: () => setPasswordVisible((val) => !val),
|
426
|
-
children: /* @__PURE__ */ jsx10(EyeOff, {})
|
427
|
-
}
|
428
|
-
),
|
429
|
-
type: passwordVisible ? "text" : "password",
|
430
|
-
...props
|
431
|
-
}
|
432
|
-
);
|
433
|
-
};
|
434
|
-
PasswordInput.displayName = "PasswordInput";
|
435
|
-
|
436
|
-
// src/components/textarea/index.tsx
|
437
|
-
import { cva as cva4 } from "class-variance-authority";
|
438
|
-
import { jsx as jsx11, jsxs as jsxs7 } from "react/jsx-runtime";
|
439
|
-
var textareaContainerVariants = cva4(
|
440
|
-
"flex relative min-h-[80px] w-full rounded-[8px] border transition px-3 py-2 text-base placeholder:text-[#79818C] focus-within:outline-0 focus-within:ring-0 focus-visible:ring-offset-0 disabled:cursor-not-allowed disabled:opacity-50",
|
441
|
-
{
|
442
|
-
variants: {
|
443
|
-
status: {
|
444
|
-
default: "border-[#D7D7D7] dark:border-[#676767] bg-white text-[#191919] dark:!bg-transparent caret-[#00B2A9] focus-within:bg-white dark:focus-within:!bg-transparent dark:text-white focus-within:border-[#00B2A9] dark:focus-within:border-[#9299A2] dark:border-[#9299A2] dark:disabled:!border-[#9299A2]",
|
445
|
-
error: "placeholder:text-status-error-fill bg-status-error-bg border-status-error-fill dark:!bg-status-error-bg-dark text-status-error-fill focus-within:bg-status-error-bg focus-within:border-status-error-fill",
|
446
|
-
loading: "placeholder:text-[#C4C4C4]",
|
447
|
-
prefilled: "resize-none bg-[#F6F6F6] border-[#D7D7D7] dark:!bg-transparent caret-[#D7D7D7] focus-within:bg-[#F6F6F6] focus-within:border-[#D7D7D7] dark:!border-[#9299A2] dark:focus-within:border-[#9299A2]"
|
448
|
-
}
|
449
|
-
},
|
450
|
-
defaultVariants: {
|
451
|
-
status: "default"
|
452
|
-
}
|
453
|
-
}
|
454
|
-
);
|
455
|
-
var Textarea = ({
|
456
|
-
className,
|
457
|
-
status = "default",
|
458
|
-
disabled,
|
459
|
-
error,
|
460
|
-
isLoading,
|
461
|
-
showAsterisk,
|
462
|
-
label,
|
463
|
-
description,
|
464
|
-
...props
|
465
|
-
}) => {
|
466
|
-
let containerStatus = status;
|
467
|
-
if (error) containerStatus = "error";
|
468
|
-
if (isLoading) containerStatus = "loading";
|
469
|
-
if (disabled) containerStatus = "prefilled";
|
470
|
-
return /* @__PURE__ */ jsxs7("div", { className: "relative space-y-1", children: [
|
471
|
-
/* @__PURE__ */ jsx11(FormLabel, { showAsterisk, error, children: label }),
|
472
|
-
/* @__PURE__ */ jsx11(
|
473
|
-
"textarea",
|
474
|
-
{
|
475
|
-
className: cn(
|
476
|
-
"min-h-[80px]",
|
477
|
-
inputContainerVariants({ status: containerStatus }),
|
478
|
-
className
|
479
|
-
),
|
480
|
-
disabled: isLoading || disabled,
|
481
|
-
...props
|
482
|
-
}
|
483
|
-
),
|
484
|
-
/* @__PURE__ */ jsx11(FormDescription, { className: "text-gray-400 text-sm !font-normal", children: description }),
|
485
|
-
/* @__PURE__ */ jsx11(ErrorMessage, { error })
|
486
|
-
] });
|
487
|
-
};
|
488
|
-
Textarea.displayName = "Textarea";
|
489
|
-
|
490
|
-
// src/components/select/index.tsx
|
491
|
-
import * as React10 from "react";
|
492
|
-
|
493
|
-
// src/components/command/index.tsx
|
494
|
-
import * as React7 from "react";
|
495
|
-
import { Command as CommandPrimitive } from "cmdk";
|
496
|
-
import { Search } from "lucide-react";
|
497
|
-
|
498
|
-
// src/components/dialog/index.tsx
|
499
|
-
import * as React6 from "react";
|
500
|
-
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
501
|
-
|
502
|
-
// src/components/dialog/icon/CloseIcon.tsx
|
503
|
-
import { jsx as jsx12, jsxs as jsxs8 } from "react/jsx-runtime";
|
504
|
-
var CloseIcon = () => {
|
505
|
-
return /* @__PURE__ */ jsxs8(
|
506
|
-
"svg",
|
507
|
-
{
|
508
|
-
width: "20",
|
509
|
-
height: "20",
|
510
|
-
viewBox: "0 0 24 24",
|
511
|
-
fill: "none",
|
512
|
-
xmlns: "http://www.w3.org/2000/svg",
|
513
|
-
className: "stroke-[#232528]]",
|
514
|
-
children: [
|
515
|
-
/* @__PURE__ */ jsx12(
|
516
|
-
"path",
|
517
|
-
{
|
518
|
-
d: "M5.00098 5L19 18.9991",
|
519
|
-
strokeWidth: "1.5",
|
520
|
-
strokeLinecap: "round",
|
521
|
-
strokeLinejoin: "round"
|
522
|
-
}
|
523
|
-
),
|
524
|
-
/* @__PURE__ */ jsx12(
|
525
|
-
"path",
|
526
|
-
{
|
527
|
-
d: "M4.99996 18.9991L18.999 5",
|
528
|
-
strokeWidth: "1.5",
|
529
|
-
strokeLinecap: "round",
|
530
|
-
strokeLinejoin: "round"
|
531
|
-
}
|
532
|
-
)
|
533
|
-
]
|
534
|
-
}
|
535
|
-
);
|
536
|
-
};
|
537
|
-
|
538
|
-
// src/components/dialog/index.tsx
|
539
|
-
import { Fragment as Fragment2, jsx as jsx13, jsxs as jsxs9 } from "react/jsx-runtime";
|
540
|
-
var DialogRoot = DialogPrimitive.Root;
|
541
|
-
var DialogTrigger = DialogPrimitive.Trigger;
|
542
|
-
var DialogPortal = DialogPrimitive.Portal;
|
543
|
-
var DialogOverlay = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx13(
|
544
|
-
DialogPrimitive.Overlay,
|
545
|
-
{
|
546
|
-
ref,
|
547
|
-
className: cn(
|
548
|
-
"fixed inset-0 z-50 bg-black/70 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
549
|
-
className
|
550
|
-
),
|
551
|
-
...props
|
552
|
-
}
|
553
|
-
));
|
554
|
-
DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
|
555
|
-
var DialogContent = React6.forwardRef(({ className, hideCloseButton, children, ...props }, ref) => /* @__PURE__ */ jsxs9(DialogPortal, { children: [
|
556
|
-
/* @__PURE__ */ jsx13(DialogOverlay, {}),
|
557
|
-
/* @__PURE__ */ jsxs9(
|
558
|
-
DialogPrimitive.Content,
|
559
|
-
{
|
560
|
-
ref,
|
561
|
-
className: cn(
|
562
|
-
"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-transparent bg-white p-6 shadow-lg duration-200 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%] rounded-lg",
|
563
|
-
className
|
564
|
-
),
|
565
|
-
...props,
|
566
|
-
children: [
|
567
|
-
children,
|
568
|
-
!hideCloseButton && /* @__PURE__ */ jsxs9(DialogPrimitive.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground", children: [
|
569
|
-
/* @__PURE__ */ jsx13(CloseIcon, {}),
|
570
|
-
/* @__PURE__ */ jsx13("span", { className: "sr-only", children: "Close" })
|
571
|
-
] })
|
572
|
-
]
|
573
|
-
}
|
574
|
-
)
|
575
|
-
] }));
|
576
|
-
DialogContent.displayName = DialogPrimitive.Content.displayName;
|
577
|
-
var DialogHeader = ({
|
578
|
-
className,
|
579
|
-
...props
|
580
|
-
}) => /* @__PURE__ */ jsx13(
|
581
|
-
"div",
|
582
|
-
{
|
583
|
-
className: cn("flex flex-col space-y-1.5 text-left", className),
|
584
|
-
...props
|
585
|
-
}
|
586
|
-
);
|
587
|
-
DialogHeader.displayName = "DialogHeader";
|
588
|
-
var DialogFooter = ({
|
589
|
-
className,
|
590
|
-
...props
|
591
|
-
}) => /* @__PURE__ */ jsx13(
|
592
|
-
"div",
|
593
|
-
{
|
594
|
-
className: cn("flex flex-row justify-end sm:space-x-2", className),
|
595
|
-
...props
|
596
|
-
}
|
597
|
-
);
|
598
|
-
DialogFooter.displayName = "DialogFooter";
|
599
|
-
var DialogTitle = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx13(
|
600
|
-
DialogPrimitive.Title,
|
601
|
-
{
|
602
|
-
ref,
|
603
|
-
className: cn(
|
604
|
-
"text-lg font-semibold leading-none tracking-tight",
|
605
|
-
className
|
606
|
-
),
|
607
|
-
...props
|
608
|
-
}
|
609
|
-
));
|
610
|
-
DialogTitle.displayName = DialogPrimitive.Title.displayName;
|
611
|
-
var DialogDescription = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx13(
|
612
|
-
DialogPrimitive.Description,
|
613
|
-
{
|
614
|
-
ref,
|
615
|
-
className: cn("text-sm text-muted-foreground", className),
|
616
|
-
...props
|
617
|
-
}
|
618
|
-
));
|
619
|
-
DialogDescription.displayName = DialogPrimitive.Description.displayName;
|
620
|
-
var Dialog2 = ({
|
621
|
-
trigger,
|
622
|
-
children,
|
623
|
-
open,
|
624
|
-
onOpenChange,
|
625
|
-
hideCloseButton,
|
626
|
-
footer,
|
627
|
-
title,
|
628
|
-
description,
|
629
|
-
contentClassName,
|
630
|
-
headerClassName,
|
631
|
-
titleClassName,
|
632
|
-
descriptionClassName,
|
633
|
-
footerClassName,
|
634
|
-
asChild = true,
|
635
|
-
onOpenAutoFocus,
|
636
|
-
onCloseAutoFocus,
|
637
|
-
onEscapeKeyDown,
|
638
|
-
onInteractOutside,
|
639
|
-
onPointerDownOutside,
|
640
|
-
...props
|
641
|
-
}) => {
|
642
|
-
return /* @__PURE__ */ jsxs9(DialogRoot, { ...props, open, onOpenChange, children: [
|
643
|
-
/* @__PURE__ */ jsx13(DialogTrigger, { asChild, children: trigger }),
|
644
|
-
/* @__PURE__ */ jsx13(DialogPortal, { children: /* @__PURE__ */ jsxs9(
|
645
|
-
DialogContent,
|
646
|
-
{
|
647
|
-
className: contentClassName,
|
648
|
-
hideCloseButton,
|
649
|
-
onOpenAutoFocus,
|
650
|
-
onCloseAutoFocus,
|
651
|
-
onEscapeKeyDown,
|
652
|
-
onPointerDownOutside,
|
653
|
-
onInteractOutside,
|
654
|
-
children: [
|
655
|
-
title || description ? /* @__PURE__ */ jsxs9(DialogHeader, { className: headerClassName, children: [
|
656
|
-
title && /* @__PURE__ */ jsx13(DialogTitle, { className: titleClassName, children: title }),
|
657
|
-
description && /* @__PURE__ */ jsx13(DialogDescription, { className: descriptionClassName, children: description })
|
658
|
-
] }) : /* @__PURE__ */ jsx13(Fragment2, {}),
|
659
|
-
children,
|
660
|
-
footer && /* @__PURE__ */ jsx13(DialogFooter, { className: footerClassName, children: footer })
|
661
|
-
]
|
662
|
-
}
|
663
|
-
) })
|
664
|
-
] });
|
665
|
-
};
|
666
|
-
Dialog2.displayName = DialogPrimitive.Dialog.displayName;
|
667
|
-
|
668
|
-
// src/components/command/index.tsx
|
669
|
-
import { Fragment as Fragment3, jsx as jsx14, jsxs as jsxs10 } from "react/jsx-runtime";
|
670
|
-
var Command = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx14(
|
671
|
-
CommandPrimitive,
|
672
|
-
{
|
673
|
-
ref,
|
674
|
-
className: cn(
|
675
|
-
"flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",
|
676
|
-
className
|
677
|
-
),
|
678
|
-
...props
|
679
|
-
}
|
680
|
-
));
|
681
|
-
Command.displayName = CommandPrimitive.displayName;
|
682
|
-
var CommandInput = React7.forwardRef(({ className, CommandInputContainerClassName, loading, ...props }, ref) => /* @__PURE__ */ jsxs10(
|
683
|
-
"div",
|
684
|
-
{
|
685
|
-
className: cn(
|
686
|
-
"flex items-center border-0 px-3 gap-2",
|
687
|
-
CommandInputContainerClassName
|
688
|
-
),
|
689
|
-
"cmdk-input-wrapper": "",
|
690
|
-
children: [
|
691
|
-
loading ? /* @__PURE__ */ jsx14(Loader, { size: 16, colour: "secondary" }) : /* @__PURE__ */ jsx14(Search, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }),
|
692
|
-
/* @__PURE__ */ jsx14(
|
693
|
-
CommandPrimitive.Input,
|
694
|
-
{
|
695
|
-
ref,
|
696
|
-
className: cn(
|
697
|
-
"flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",
|
698
|
-
className
|
699
|
-
),
|
700
|
-
disabled: loading,
|
701
|
-
...props
|
702
|
-
}
|
703
|
-
)
|
704
|
-
]
|
705
|
-
}
|
706
|
-
));
|
707
|
-
CommandInput.displayName = CommandPrimitive.Input.displayName;
|
708
|
-
var CommandList = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx14(
|
709
|
-
CommandPrimitive.List,
|
710
|
-
{
|
711
|
-
ref,
|
712
|
-
className: cn("max-h-[300px] overflow-y-auto overflow-x-hidden", className),
|
713
|
-
...props
|
714
|
-
}
|
715
|
-
));
|
716
|
-
CommandList.displayName = CommandPrimitive.List.displayName;
|
717
|
-
var CommandEmpty = React7.forwardRef((props, ref) => /* @__PURE__ */ jsx14(
|
718
|
-
CommandPrimitive.Empty,
|
719
|
-
{
|
720
|
-
ref,
|
721
|
-
className: "py-6 text-center text-sm",
|
722
|
-
...props
|
723
|
-
}
|
724
|
-
));
|
725
|
-
CommandEmpty.displayName = CommandPrimitive.Empty.displayName;
|
726
|
-
var CommandGroup = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx14(
|
727
|
-
CommandPrimitive.Group,
|
728
|
-
{
|
729
|
-
ref,
|
730
|
-
className: cn(
|
731
|
-
"overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",
|
732
|
-
className
|
733
|
-
),
|
734
|
-
...props
|
735
|
-
}
|
736
|
-
));
|
737
|
-
CommandGroup.displayName = CommandPrimitive.Group.displayName;
|
738
|
-
var CommandSeparator = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx14(
|
739
|
-
CommandPrimitive.Separator,
|
740
|
-
{
|
741
|
-
ref,
|
742
|
-
className: cn("-mx-1 h-px bg-border", className),
|
743
|
-
...props
|
744
|
-
}
|
745
|
-
));
|
746
|
-
CommandSeparator.displayName = CommandPrimitive.Separator.displayName;
|
747
|
-
var CommandItem = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx14(
|
748
|
-
CommandPrimitive.Item,
|
749
|
-
{
|
750
|
-
ref,
|
751
|
-
className: cn(
|
752
|
-
"relative flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected=true]:bg-primary-accent data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
|
753
|
-
className
|
754
|
-
),
|
755
|
-
...props
|
756
|
-
}
|
757
|
-
));
|
758
|
-
CommandItem.displayName = CommandPrimitive.Item.displayName;
|
759
|
-
var CommandShortcut = ({
|
760
|
-
className,
|
761
|
-
...props
|
762
|
-
}) => {
|
763
|
-
return /* @__PURE__ */ jsx14(
|
764
|
-
"span",
|
765
|
-
{
|
766
|
-
className: cn(
|
767
|
-
"ml-auto text-xs tracking-widest text-muted-foreground",
|
768
|
-
className
|
769
|
-
),
|
770
|
-
...props
|
771
|
-
}
|
772
|
-
);
|
773
|
-
};
|
774
|
-
CommandShortcut.displayName = "CommandShortcut";
|
775
|
-
|
776
|
-
// src/components/popover/index.tsx
|
777
|
-
import * as React8 from "react";
|
778
|
-
import * as PopoverPrimitive from "@radix-ui/react-popover";
|
779
|
-
import { jsx as jsx15, jsxs as jsxs11 } from "react/jsx-runtime";
|
780
|
-
var PopoverRoot = PopoverPrimitive.Root;
|
781
|
-
var PopoverTrigger = PopoverPrimitive.Trigger;
|
782
|
-
var PopoverContent = React8.forwardRef(
|
783
|
-
({ className, align = "center", sideOffset = 4, portal = true, ...props }, ref) => portal ? /* @__PURE__ */ jsx15(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsx15(
|
784
|
-
PopoverPrimitive.Content,
|
785
|
-
{
|
786
|
-
ref,
|
787
|
-
align,
|
788
|
-
sideOffset,
|
789
|
-
className: cn(
|
790
|
-
"pointer-events-auto z-50 w-72 rounded-md border border-transparent bg-white p-4 text-[#191919] shadow-md outline-none 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-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
791
|
-
className
|
792
|
-
),
|
793
|
-
onOpenAutoFocus: props.onOpenAutoFocus,
|
794
|
-
onCloseAutoFocus: props.onCloseAutoFocus,
|
795
|
-
...props
|
796
|
-
}
|
797
|
-
) }) : /* @__PURE__ */ jsx15(
|
798
|
-
PopoverPrimitive.Content,
|
799
|
-
{
|
800
|
-
ref,
|
801
|
-
align,
|
802
|
-
sideOffset,
|
803
|
-
className: cn(
|
804
|
-
"pointer-events-auto z-50 w-72 rounded-md border border-transparent bg-white p-4 text-[#191919] shadow-md outline-none 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-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
805
|
-
className
|
806
|
-
),
|
807
|
-
onOpenAutoFocus: props.onOpenAutoFocus,
|
808
|
-
onCloseAutoFocus: props.onCloseAutoFocus,
|
809
|
-
...props
|
810
|
-
}
|
811
|
-
)
|
812
|
-
);
|
813
|
-
PopoverContent.displayName = PopoverPrimitive.Content.displayName;
|
814
|
-
var Popover = ({
|
815
|
-
trigger,
|
816
|
-
children,
|
817
|
-
open,
|
818
|
-
onOpenChange,
|
819
|
-
contentClassName,
|
820
|
-
asChild = true,
|
821
|
-
align,
|
822
|
-
side,
|
823
|
-
alignOffset,
|
824
|
-
sideOffset,
|
825
|
-
onOpenAutoFocus,
|
826
|
-
onCloseAutoFocus,
|
827
|
-
...props
|
828
|
-
}) => {
|
829
|
-
return /* @__PURE__ */ jsxs11(PopoverRoot, { ...props, open, onOpenChange, children: [
|
830
|
-
/* @__PURE__ */ jsx15(PopoverTrigger, { asChild, children: trigger }),
|
831
|
-
/* @__PURE__ */ jsx15(
|
832
|
-
PopoverContent,
|
833
|
-
{
|
834
|
-
alignOffset,
|
835
|
-
sideOffset,
|
836
|
-
side,
|
837
|
-
align,
|
838
|
-
className: contentClassName,
|
839
|
-
onOpenAutoFocus,
|
840
|
-
onCloseAutoFocus,
|
841
|
-
children
|
842
|
-
}
|
843
|
-
)
|
844
|
-
] });
|
845
|
-
};
|
846
|
-
Popover.displayName = PopoverPrimitive.Root.displayName;
|
847
|
-
|
848
|
-
// src/components/scroll-area/index.tsx
|
849
|
-
import * as React9 from "react";
|
850
|
-
import * as ScrollAreaPrimitive from "@radix-ui/react-scroll-area";
|
851
|
-
import { jsx as jsx16, jsxs as jsxs12 } from "react/jsx-runtime";
|
852
|
-
var ScrollArea = React9.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs12(
|
853
|
-
ScrollAreaPrimitive.Root,
|
854
|
-
{
|
855
|
-
ref,
|
856
|
-
className: cn("relative overflow-hidden", className),
|
857
|
-
...props,
|
858
|
-
children: [
|
859
|
-
/* @__PURE__ */ jsx16(ScrollAreaPrimitive.Viewport, { className: "h-full w-full rounded-[inherit]", children }),
|
860
|
-
/* @__PURE__ */ jsx16(ScrollBar, {}),
|
861
|
-
/* @__PURE__ */ jsx16(ScrollAreaPrimitive.Corner, {})
|
862
|
-
]
|
863
|
-
}
|
864
|
-
));
|
865
|
-
ScrollArea.displayName = ScrollAreaPrimitive.Root.displayName;
|
866
|
-
var ScrollBar = React9.forwardRef(({ className, orientation = "vertical", ...props }, ref) => /* @__PURE__ */ jsx16(
|
867
|
-
ScrollAreaPrimitive.ScrollAreaScrollbar,
|
868
|
-
{
|
869
|
-
ref,
|
870
|
-
orientation,
|
871
|
-
className: cn(
|
872
|
-
"flex touch-none select-none transition-colors",
|
873
|
-
orientation === "vertical" && "h-full w-2.5 border-l border-l-transparent p-[1px]",
|
874
|
-
orientation === "horizontal" && "h-2.5 flex-col border-t border-t-transparent p-[1px]",
|
875
|
-
className
|
876
|
-
),
|
877
|
-
...props,
|
878
|
-
children: /* @__PURE__ */ jsx16(ScrollAreaPrimitive.ScrollAreaThumb, { className: "relative flex-1 rounded-full bg-border" })
|
879
|
-
}
|
880
|
-
));
|
881
|
-
ScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName;
|
882
|
-
|
883
|
-
// src/components/select/index.tsx
|
884
|
-
import { jsx as jsx17, jsxs as jsxs13 } from "react/jsx-runtime";
|
885
|
-
var SearchableTrigger = ({
|
886
|
-
className,
|
887
|
-
value,
|
888
|
-
placeholder = "",
|
889
|
-
status,
|
890
|
-
disabled
|
891
|
-
}) => {
|
892
|
-
return /* @__PURE__ */ jsx17(PopoverTrigger, { asChild: true, disabled, children: /* @__PURE__ */ jsxs13(
|
893
|
-
"button",
|
894
|
-
{
|
895
|
-
disabled,
|
896
|
-
className: cn(
|
897
|
-
inputContainerVariants({ status }),
|
898
|
-
"[&>span]:justify-start [&>span]:items-center gap-2 flex h-12 w-full items-center justify-between goup",
|
899
|
-
value ? "" : "text-[#79818C]",
|
900
|
-
className
|
901
|
-
),
|
902
|
-
children: [
|
903
|
-
value ?? placeholder ?? "Select options...",
|
904
|
-
/* @__PURE__ */ jsx17(
|
905
|
-
"svg",
|
906
|
-
{
|
907
|
-
width: "20",
|
908
|
-
height: "20",
|
909
|
-
viewBox: "0 0 20 20",
|
910
|
-
fill: "none",
|
911
|
-
className: " data-[state=open]:goup-rotate-180",
|
912
|
-
children: /* @__PURE__ */ jsx17(
|
913
|
-
"path",
|
914
|
-
{
|
915
|
-
d: "M16.5999 7.45825L11.1666 12.8916C10.5249 13.5333 9.4749 13.5333 8.83324 12.8916L3.3999 7.45825",
|
916
|
-
stroke: "currentColor",
|
917
|
-
strokeWidth: "1.5",
|
918
|
-
strokeMiterlimit: "10",
|
919
|
-
strokeLinecap: "round",
|
920
|
-
strokeLinejoin: "round"
|
921
|
-
}
|
922
|
-
)
|
923
|
-
}
|
924
|
-
)
|
925
|
-
]
|
926
|
-
}
|
927
|
-
) });
|
928
|
-
};
|
929
|
-
var Searchable = ({
|
930
|
-
options,
|
931
|
-
value,
|
932
|
-
onChange,
|
933
|
-
containerClassName,
|
934
|
-
placeholder,
|
935
|
-
disabled,
|
936
|
-
loading,
|
937
|
-
optionComponent,
|
938
|
-
children,
|
939
|
-
modal,
|
940
|
-
hideSearch,
|
941
|
-
className,
|
942
|
-
inputValue,
|
943
|
-
onInputValueChange
|
944
|
-
}) => {
|
945
|
-
const [open, setOpen] = React10.useState(false);
|
946
|
-
const triggerRef = React10.useRef(null);
|
947
|
-
const [width, setWidth] = React10.useState(void 0);
|
948
|
-
React10.useLayoutEffect(() => {
|
949
|
-
if (triggerRef.current) {
|
950
|
-
setWidth(triggerRef.current.clientWidth);
|
951
|
-
}
|
952
|
-
}, [triggerRef.current]);
|
953
|
-
return /* @__PURE__ */ jsxs13(PopoverRoot, { modal, open, onOpenChange: setOpen, children: [
|
954
|
-
/* @__PURE__ */ jsx17("div", { className: cn("w-full", className), ref: triggerRef, children }),
|
955
|
-
/* @__PURE__ */ jsx17(
|
956
|
-
PopoverContent,
|
957
|
-
{
|
958
|
-
portal: modal,
|
959
|
-
className: "p-0 min-w-[200px]",
|
960
|
-
style: { width },
|
961
|
-
children: /* @__PURE__ */ jsxs13(Command, { className: "max-h-[270px] pt-3", children: [
|
962
|
-
!hideSearch && /* @__PURE__ */ jsx17(
|
963
|
-
CommandInput,
|
964
|
-
{
|
965
|
-
loading,
|
966
|
-
placeholder: placeholder ?? "Search options...",
|
967
|
-
onValueChange: onInputValueChange,
|
968
|
-
value: inputValue,
|
969
|
-
CommandInputContainerClassName: "mx-3 border rounded-md border-[#DEDEDE]"
|
970
|
-
}
|
971
|
-
),
|
972
|
-
/* @__PURE__ */ jsx17(
|
973
|
-
ScrollArea,
|
974
|
-
{
|
975
|
-
className: cn("w-full px-0", containerClassName),
|
976
|
-
children: /* @__PURE__ */ jsxs13(CommandList, { children: [
|
977
|
-
!hideSearch && /* @__PURE__ */ jsx17(CommandEmpty, { children: "No result found." }),
|
978
|
-
/* @__PURE__ */ jsx17(CommandGroup, { className: "w-full", children: options.map((option) => /* @__PURE__ */ jsx17(
|
979
|
-
CommandItem,
|
980
|
-
{
|
981
|
-
defaultValue: value?.label,
|
982
|
-
value: option.label,
|
983
|
-
disabled,
|
984
|
-
onSelect: () => {
|
985
|
-
onChange(option);
|
986
|
-
setOpen(false);
|
987
|
-
},
|
988
|
-
children: !optionComponent ? option.label : optionComponent(option)
|
989
|
-
},
|
990
|
-
option.value
|
991
|
-
)) })
|
992
|
-
] })
|
993
|
-
}
|
994
|
-
)
|
995
|
-
] })
|
996
|
-
}
|
997
|
-
)
|
998
|
-
] });
|
999
|
-
};
|
1000
|
-
export {
|
1001
|
-
Button,
|
1002
|
-
FormLabel,
|
1003
|
-
Input,
|
1004
|
-
Loader,
|
1005
|
-
PasswordInput,
|
1006
|
-
Searchable,
|
1007
|
-
SearchableTrigger,
|
1008
|
-
Textarea
|
1009
|
-
};
|
1
|
+
import _e from"react";import*as se from"react";import*as q from"@radix-ui/react-label";import{cva as Oe}from"class-variance-authority";import{clsx as Me}from"clsx";import{twMerge as He}from"tailwind-merge";function r(...t){return He(Me(t))}import{jsx as We}from"react/jsx-runtime";var Be=Oe("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),J=se.forwardRef(({className:t,...e},o)=>We(q.Root,{ref:o,className:r(Be(),t),...e}));J.displayName=q.Root.displayName;import{jsx as le,jsxs as ze}from"react/jsx-runtime";var D=_e.forwardRef(({className:t,children:e,showAsterisk:o,error:a,...i},s)=>le(J,{ref:s,className:r(a&&"text-red-500",t),...i,children:o?ze("p",{children:[e,le("span",{className:"text-red-500",children:"*"})]}):e}));D.displayName="FormLabel";import{jsx as de,jsxs as Ge}from"react/jsx-runtime";var S=({size:t=16,colour:e="primary"})=>Ge("svg",{className:"animate-spin",width:t,height:t,viewBox:"0 0 20 20",fill:"none",children:[de("circle",{cx:"10",cy:"10",r:"9.25",stroke:"transparent",strokeWidth:"1.5"}),de("path",{d:"M10 0.595792C10 0.266746 10.267 -0.00185055 10.5954 0.0177417C11.9786 0.100242 13.3318 0.469461 14.5682 1.1044C15.9816 1.83021 17.2016 2.88235 18.1273 4.17366C19.0531 5.46496 19.6578 6.95826 19.8913 8.52984C20.1249 10.1014 19.9807 11.706 19.4705 13.2108C18.9604 14.7155 18.0991 16.077 16.9579 17.1825C15.8167 18.288 14.4285 19.1056 12.9084 19.5677C11.3882 20.0298 9.77982 20.123 8.21646 19.8397C6.84883 19.5918 5.55009 19.0619 4.40196 18.2863C4.12931 18.1021 4.08072 17.7265 4.28083 17.4653C4.48094 17.2041 4.85388 17.1564 5.12801 17.3384C6.12474 18.0001 7.24768 18.4531 8.42898 18.6672C9.80606 18.9168 11.2228 18.8347 12.5618 18.4276C13.9008 18.0206 15.1236 17.3004 16.1288 16.3266C17.134 15.3528 17.8927 14.1536 18.342 12.8282C18.7914 11.5027 18.9185 10.0893 18.7127 8.70502C18.507 7.32071 17.9743 6.00535 17.1589 4.86792C16.3435 3.73048 15.2688 2.80371 14.0238 2.16439C12.9559 1.61596 11.789 1.29259 10.5954 1.21173C10.2671 1.18949 10 0.92484 10 0.595792Z",fill:e==="primary"?"#ffffff":"currentColor",className:"rounded"})]});import*as pe from"react";import{Slot as Ke}from"@radix-ui/react-slot";import{cva as Ze}from"class-variance-authority";import{Fragment as me,jsx as L,jsxs as qe}from"react/jsx-runtime";var je=Ze("overflow-hidden isolate relative inline-flex h-fit items-center justify-center whitespace-nowrap text-sm font-medium ring-offset-background dark:ring-offset-transparent transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:!pointer-events-none",{variants:{variant:{primary:"border-primary-main bg-primary-main hover:bg-primary-main/70 disabled:bg-primary-main/70 text-white font-bold",neutral:"!border-0 bg-transparent text-primary-main hover:opacity-80 disabled:opacity-60",outlined:"border-blue-950 text-blue-950 hover:opacity-80 disabled:opacity-60","light-outlined":"border-white text-white hover:opacity-80 disabled:opacity-60","primary-outlined":" text-primary-main bg-primary-main/20 hover:opacity-80 disabled:opacity-60 !font-medium","dark-text":"border-transparent bg-transparent hover:bg-opacity-70 disabled:bg-opacity-70 text-black font-medium",light:"border-white bg-white hover:bg-opacity-70 disabled:bg-opacity-70 text-blue-950 font-semibold"},size:{default:"py-[0.625rem] px-[1.5rem] text-[0.875rem] leading-[1.25rem] font-medium rounded-lg",sm:"py-[0.375rem] px-[1rem] text-[0.75rem] leading-[1rem] font-medium rounded-lg",lg:"py-[0.75rem] px-[1.5rem] text-[1rem] leading-[1.5rem] font-medium rounded-lg",md:"h-12 py-1 px-5 items-center","icon-sm":"h-[1.75rem] w-[1.75rem] flex justify-center items-center font-medium rounded-lg",icon:"h-[2.5rem] w-[2.75rem] flex justify-center items-center font-medium rounded-lg","icon-lg":"h-[3rem] w-[3rem] flex justify-center items-center font-medium rounded-lg"}},defaultVariants:{variant:"primary",size:"default"}}),ce=({className:t,variant:e="primary",size:o,asChild:a=!1,isLoading:i=!1,leftNode:s,rightNode:u,LoaderSize:m,ref:b,...d})=>{let l=a?Ke:"button",{children:p,disabled:P,...E}=d,A=pe.useRef(null);return L(l,{className:r(je({variant:e,size:o,className:t})),ref:A||b,disabled:P||i,...E,children:L("div",{className:"flex font-medium justify-center items-center gap-2",children:i?L(me,{children:L("span",{className:"mx-auto",children:L(S,{size:m})})}):qe(me,{children:[s,p,u]})})})};ce.displayName="Button";import{cva as Q}from"class-variance-authority";import Je from"react";import{jsx as Qe}from"react/jsx-runtime";var T=Je.forwardRef(({className:t,children:e,error:o,...a},i)=>{let s=o??e;return s?Qe("p",{ref:i,className:r("text-xs font-normal text-[#F04248]",t),...a,children:s}):null});T.displayName="ErrorMessage";import Ue from"react";import{jsx as Xe}from"react/jsx-runtime";var F=Ue.forwardRef(({className:t,...e},o)=>Xe("p",{ref:o,className:r("text-sm text-[#8E98A8",t),...e}));F.displayName="FormDescription";import{jsx as x,jsxs as ue}from"react/jsx-runtime";var Ye=Q("!p-0 flex h-full w-full !border-transparent !bg-transparent text-base focus-visible:bg-transparent focus-visible:outline-none focus-visible:ring-0 focus-visible:ring-offset-0 disabled:cursor-not-allowed disabled:opacity-50",{variants:{status:{default:"placeholder:text-[#C4C4C4] dark:placeholder:text-[#9299A2]",error:"placeholder:text-red-500 text-red-500",loading:"placeholder:text-[#C4C4C4] dark:placeholder:text-[#9299A2]",prefilled:""}},defaultVariants:{status:"default"}}),ge=({className:t,status:e,type:o,ref:a,...i})=>x("input",{type:o,className:r(Ye({status:e}),t),ref:a,...i});ge.displayName="BaseInnerInput";var I=Q("flex relative h-10 w-full rounded-[4px] dark:!bg-transparent border transition px-3 py-2 text-base placeholder:text-[#79818C] focus-within:outline-0 focus-within:ring-0 focus-visible:ring-offset-0 disabled:cursor-not-allowed disabled:opacity-50 dark:disabled:!border-[#9299A2]",{variants:{status:{default:"border-[#DEDEDE] dark:border-[#676767] bg-white text-[#191919] dark:!bg-transparent caret-[#00B2A9] focus-within:bg-white dark:focus-within:!bg-transparent dark:text-white focus-within:border-[#00B2A9] dark:focus-within:border-[#9299A2] dark:disabled:!border-[#9299A2]",error:"placeholder:text-red-500 bg-red-50 border-red-500 dark:!bg-status-error-bg-dark text-red-500 focus-within:bg-red-50 focus-within:border-red-500",loading:"",prefilled:"bg-[#F6F6F6] border-[#DEDEDE] dark:!bg-transparent caret-[#DEDEDE] focus-within:bg-[#F6F6F6] focus-within:border-[#DEDEDE] dark:!border-[#9299A2] dark:focus-within:border-[#9299A2]"}},defaultVariants:{status:"default"}}),fe=Q("top-0 flex justify-center items-center h-full min-w-[50px] max-w-[100px] dark:!bg-transparent transition px-3 py-2 text-base placeholder:text-[#79818C] focus-within:outline-0 focus-within:ring-0 focus-visible:ring-offset-0 disabled:cursor-not-allowed disabled:opacity-50 dark:disabled:!border-[#9299A2]",{variants:{side:{left:"left-0 rounded-l-[8px] border-r",right:"right-0 rounded-r-[8px] border-l"},status:{default:"border-[#DEDEDE] dark:border-[#676767] bg-white text-[#191919] dark:!bg-transparent caret-[#00B2A9] focus-within:bg-white dark:focus-within:!bg-transparent dark:text-white focus-within:border-[#00B2A9] dark:focus-within:border-[#9299A2] dark:disabled:!border-[#9299A2]",error:"placeholder:text-red-500 bg-red-50 border-red-500 dark:!bg-red-50 text-red-500 focus-within:bg-red-50 focus-within:border-red-500",loading:"",prefilled:"bg-[#F6F6F6] border-[#DEDEDE] dark:!bg-transparent caret-[#DEDEDE] focus-within:bg-[#F6F6F6] focus-within:border-[#DEDEDE] dark:!border-[#9299A2] dark:focus-within:border-[#9299A2]"}},defaultVariants:{status:"default",side:"left"}}),W=({className:t,status:e="default",disabled:o,error:a,isLoading:i,sideNodeClassName:s,showAsterisk:u,label:m,description:b,ref:d,...l})=>{let p=e;return a&&(p="error"),i&&(p="loading"),o&&(p="prefilled"),ue("div",{className:"relative space-y-1",children:[x(D,{showAsterisk:u,error:a,children:m}),ue("div",{className:r(I({status:p}),l.leftNode||l.rightNode?"p-0":"",t),children:[l.leftNode?x("div",{className:r(fe({status:p,side:"left"}),s),children:l.leftNode}):null,x(ge,{ref:d,disabled:i||o,className:l.leftNode||l.rightNode?"!px-3 !py-2":"",...l}),l.rightNode?x("div",{className:r(fe({status:p,side:"right"}),s),children:l.rightNode}):null]}),x(F,{className:"text-gray-400 text-sm !font-normal",children:b}),x(T,{error:a})]})};W.displayName="Input";import{useState as tt}from"react";import{jsx as be,jsxs as $e}from"react/jsx-runtime";var he=()=>$e("svg",{width:"18",height:"14",viewBox:"0 0 18 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[be("path",{d:"M1.54639 7.26103C1.48389 7.09264 1.48389 6.90741 1.54639 6.73903C2.15517 5.26292 3.18853 4.00081 4.51547 3.1127C5.84241 2.22459 7.40317 1.75049 8.99989 1.75049C10.5966 1.75049 12.1574 2.22459 13.4843 3.1127C14.8113 4.00081 15.8446 5.26292 16.4534 6.73903C16.5159 6.90741 16.5159 7.09264 16.4534 7.26103C15.8446 8.73713 14.8113 9.99925 13.4843 10.8874C12.1574 11.7755 10.5966 12.2496 8.99989 12.2496C7.40317 12.2496 5.84241 11.7755 4.51547 10.8874C3.18853 9.99925 2.15517 8.73713 1.54639 7.26103Z",stroke:"#8E98A8",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),be("path",{d:"M9 9.25C10.2426 9.25 11.25 8.24264 11.25 7C11.25 5.75736 10.2426 4.75 9 4.75C7.75736 4.75 6.75 5.75736 6.75 7C6.75 8.24264 7.75736 9.25 9 9.25Z",stroke:"#8E98A8",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]});import{jsx as ve,jsxs as et}from"react/jsx-runtime";var ye=()=>et("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[ve("path",{d:"M4.08759 12.69C3.26171 11.9072 2.61006 10.9591 2.17509 9.90752C2.10081 9.73454 2.0625 9.54826 2.0625 9.36001C2.0625 9.17177 2.10081 8.98549 2.17509 8.81252C2.75274 7.4073 3.72095 6.19704 4.96509 5.32502C6.14597 4.4998 7.55989 4.07405 9.00009 4.11002C10.0363 4.084 11.064 4.30239 12.0001 4.74752M13.9201 6.03752C14.7415 6.81964 15.3904 7.76486 15.8251 8.81252C15.8994 8.98549 15.9377 9.17177 15.9377 9.36001C15.9377 9.54826 15.8994 9.73454 15.8251 9.90752C15.2474 11.3127 14.2792 12.523 13.0351 13.395C11.8542 14.2202 10.4403 14.646 9.00009 14.61C7.9639 14.636 6.93616 14.4176 6.00009 13.9725",stroke:"#8E98A8",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),ve("path",{d:"M6.5325 10.2375C6.42732 9.95694 6.37395 9.65962 6.375 9.36C6.375 8.66381 6.65156 7.99613 7.14384 7.50384C7.63613 7.01156 8.30381 6.735 9 6.735C9.3 6.7335 9.597 6.7875 9.8775 6.8925M11.4675 8.4825C11.5725 8.763 11.6265 9.06 11.625 9.36C11.625 10.0562 11.3484 10.7239 10.8562 11.2162C10.3639 11.7084 9.69619 11.985 9 11.985C8.70038 11.986 8.40306 11.9327 8.1225 11.8275M2.25 15L14.25 3",stroke:"#8E98A8",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]});import{jsx as V}from"react/jsx-runtime";var Ce=({...t})=>{let[e,o]=tt(!1);return V(W,{sideNodeClassName:"!border-l-0",rightNode:e?V("button",{type:"button",onClick:()=>o(a=>!a),children:V(he,{})}):V("button",{type:"button",onClick:()=>o(a=>!a),children:V(ye,{})}),type:e?"text":"password",...t})};Ce.displayName="PasswordInput";import{cva as ot}from"class-variance-authority";import{jsx as _,jsxs as rt}from"react/jsx-runtime";var go=ot("flex relative min-h-[80px] w-full rounded-[8px] border transition px-3 py-2 text-base placeholder:text-[#79818C] focus-within:outline-0 focus-within:ring-0 focus-visible:ring-offset-0 disabled:cursor-not-allowed disabled:opacity-50",{variants:{status:{default:"border-[#D7D7D7] dark:border-[#676767] bg-white text-[#191919] dark:!bg-transparent caret-[#00B2A9] focus-within:bg-white dark:focus-within:!bg-transparent dark:text-white focus-within:border-[#00B2A9] dark:focus-within:border-[#9299A2] dark:border-[#9299A2] dark:disabled:!border-[#9299A2]",error:"placeholder:text-status-error-fill bg-status-error-bg border-status-error-fill dark:!bg-status-error-bg-dark text-status-error-fill focus-within:bg-status-error-bg focus-within:border-status-error-fill",loading:"placeholder:text-[#C4C4C4]",prefilled:"resize-none bg-[#F6F6F6] border-[#D7D7D7] dark:!bg-transparent caret-[#D7D7D7] focus-within:bg-[#F6F6F6] focus-within:border-[#D7D7D7] dark:!border-[#9299A2] dark:focus-within:border-[#9299A2]"}},defaultVariants:{status:"default"}}),Pe=({className:t,status:e="default",disabled:o,error:a,isLoading:i,showAsterisk:s,label:u,description:m,...b})=>{let d=e;return a&&(d="error"),i&&(d="loading"),o&&(d="prefilled"),rt("div",{className:"relative space-y-1",children:[_(D,{showAsterisk:s,error:a,children:u}),_("textarea",{className:r("min-h-[80px]",I({status:d}),t),disabled:i||o,...b}),_(F,{className:"text-gray-400 text-sm !font-normal",children:m}),_(T,{error:a})]})};Pe.displayName="Textarea";import*as R from"react";import*as C from"react";import{Command as f}from"cmdk";import{Search as lt}from"lucide-react";import*as M from"react";import*as n from"@radix-ui/react-dialog";import{jsx as xe,jsxs as at}from"react/jsx-runtime";var Re=()=>at("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"stroke-[#232528]]",children:[xe("path",{d:"M5.00098 5L19 18.9991",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),xe("path",{d:"M4.99996 18.9991L18.999 5",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]});import{Fragment as st,jsx as c,jsxs as k}from"react/jsx-runtime";var it=n.Root,nt=n.Trigger,we=n.Portal,Ne=M.forwardRef(({className:t,...e},o)=>c(n.Overlay,{ref:o,className:r("fixed inset-0 z-50 bg-black/70 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",t),...e}));Ne.displayName=n.Overlay.displayName;var U=M.forwardRef(({className:t,hideCloseButton:e,children:o,...a},i)=>k(we,{children:[c(Ne,{}),k(n.Content,{ref:i,className:r("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-transparent bg-white p-6 shadow-lg duration-200 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%] rounded-lg",t),...a,children:[o,!e&&k(n.Close,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[c(Re,{}),c("span",{className:"sr-only",children:"Close"})]})]})]}));U.displayName=n.Content.displayName;var De=({className:t,...e})=>c("div",{className:r("flex flex-col space-y-1.5 text-left",t),...e});De.displayName="DialogHeader";var ke=({className:t,...e})=>c("div",{className:r("flex flex-row justify-end sm:space-x-2",t),...e});ke.displayName="DialogFooter";var Ee=M.forwardRef(({className:t,...e},o)=>c(n.Title,{ref:o,className:r("text-lg font-semibold leading-none tracking-tight",t),...e}));Ee.displayName=n.Title.displayName;var Ae=M.forwardRef(({className:t,...e},o)=>c(n.Description,{ref:o,className:r("text-sm text-muted-foreground",t),...e}));Ae.displayName=n.Description.displayName;var Se=({trigger:t,children:e,open:o,onOpenChange:a,hideCloseButton:i,footer:s,title:u,description:m,contentClassName:b,headerClassName:d,titleClassName:l,descriptionClassName:p,footerClassName:P,asChild:E=!0,onOpenAutoFocus:A,onCloseAutoFocus:K,onEscapeKeyDown:B,onInteractOutside:w,onPointerDownOutside:Z,...j})=>k(it,{...j,open:o,onOpenChange:a,children:[c(nt,{asChild:E,children:t}),c(we,{children:k(U,{className:b,hideCloseButton:i,onOpenAutoFocus:A,onCloseAutoFocus:K,onEscapeKeyDown:B,onPointerDownOutside:Z,onInteractOutside:w,children:[u||m?k(De,{className:d,children:[u&&c(Ee,{className:l,children:u}),m&&c(Ae,{className:p,children:m})]}):c(st,{}),e,s&&c(ke,{className:P,children:s})]})})]});Se.displayName=n.Dialog.displayName;import{Fragment as So,jsx as v,jsxs as pt}from"react/jsx-runtime";var X=C.forwardRef(({className:t,...e},o)=>v(f,{ref:o,className:r("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",t),...e}));X.displayName=f.displayName;var Y=C.forwardRef(({className:t,CommandInputContainerClassName:e,loading:o,...a},i)=>pt("div",{className:r("flex items-center border-0 px-3 gap-2",e),"cmdk-input-wrapper":"",children:[o?v(S,{size:16,colour:"secondary"}):v(lt,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),v(f.Input,{ref:i,className:r("flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:o,...a})]}));Y.displayName=f.Input.displayName;var $=C.forwardRef(({className:t,...e},o)=>v(f.List,{ref:o,className:r("max-h-[300px] overflow-y-auto overflow-x-hidden",t),...e}));$.displayName=f.List.displayName;var ee=C.forwardRef((t,e)=>v(f.Empty,{ref:e,className:"py-6 text-center text-sm",...t}));ee.displayName=f.Empty.displayName;var te=C.forwardRef(({className:t,...e},o)=>v(f.Group,{ref:o,className:r("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",t),...e}));te.displayName=f.Group.displayName;var dt=C.forwardRef(({className:t,...e},o)=>v(f.Separator,{ref:o,className:r("-mx-1 h-px bg-border",t),...e}));dt.displayName=f.Separator.displayName;var oe=C.forwardRef(({className:t,...e},o)=>v(f.Item,{ref:o,className:r("relative flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected=true]:bg-primary-accent data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t),...e}));oe.displayName=f.Item.displayName;var mt=({className:t,...e})=>v("span",{className:r("ml-auto text-xs tracking-widest text-muted-foreground",t),...e});mt.displayName="CommandShortcut";import*as Le from"react";import*as h from"@radix-ui/react-popover";import{jsx as H,jsxs as ft}from"react/jsx-runtime";var re=h.Root,ae=h.Trigger,z=Le.forwardRef(({className:t,align:e="center",sideOffset:o=4,portal:a=!0,...i},s)=>a?H(h.Portal,{children:H(h.Content,{ref:s,align:e,sideOffset:o,className:r("pointer-events-auto z-50 w-72 rounded-md border border-transparent bg-white p-4 text-[#191919] shadow-md outline-none 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-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t),onOpenAutoFocus:i.onOpenAutoFocus,onCloseAutoFocus:i.onCloseAutoFocus,...i})}):H(h.Content,{ref:s,align:e,sideOffset:o,className:r("pointer-events-auto z-50 w-72 rounded-md border border-transparent bg-white p-4 text-[#191919] shadow-md outline-none 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-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t),onOpenAutoFocus:i.onOpenAutoFocus,onCloseAutoFocus:i.onCloseAutoFocus,...i}));z.displayName=h.Content.displayName;var ct=({trigger:t,children:e,open:o,onOpenChange:a,contentClassName:i,asChild:s=!0,align:u,side:m,alignOffset:b,sideOffset:d,onOpenAutoFocus:l,onCloseAutoFocus:p,...P})=>ft(re,{...P,open:o,onOpenChange:a,children:[H(ae,{asChild:s,children:t}),H(z,{alignOffset:b,sideOffset:d,side:m,align:u,className:i,onOpenAutoFocus:l,onCloseAutoFocus:p,children:e})]});ct.displayName=h.Root.displayName;import*as ie from"react";import*as g from"@radix-ui/react-scroll-area";import{jsx as O,jsxs as ut}from"react/jsx-runtime";var ne=ie.forwardRef(({className:t,children:e,...o},a)=>ut(g.Root,{ref:a,className:r("relative overflow-hidden",t),...o,children:[O(g.Viewport,{className:"h-full w-full rounded-[inherit]",children:e}),O(Te,{}),O(g.Corner,{})]}));ne.displayName=g.Root.displayName;var Te=ie.forwardRef(({className:t,orientation:e="vertical",...o},a)=>O(g.ScrollAreaScrollbar,{ref:a,orientation:e,className:r("flex touch-none select-none transition-colors",e==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",e==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",t),...o,children:O(g.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}));Te.displayName=g.ScrollAreaScrollbar.displayName;import{jsx as y,jsxs as G}from"react/jsx-runtime";var Fe=({className:t,value:e,placeholder:o="",status:a,disabled:i})=>y(ae,{asChild:!0,disabled:i,children:G("button",{disabled:i,className:r(I({status:a}),"[&>span]:justify-start [&>span]:items-center gap-2 flex h-12 w-full items-center justify-between goup",e?"":"text-[#79818C]",t),children:[e??o??"Select options...",y("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",className:" data-[state=open]:goup-rotate-180",children:y("path",{d:"M16.5999 7.45825L11.1666 12.8916C10.5249 13.5333 9.4749 13.5333 8.83324 12.8916L3.3999 7.45825",stroke:"currentColor",strokeWidth:"1.5",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"})})]})}),Ie=({options:t,value:e,onChange:o,containerClassName:a,placeholder:i,disabled:s,loading:u,optionComponent:m,children:b,modal:d,hideSearch:l,className:p,inputValue:P,onValueChange:E,onInputValueChange:A})=>{let[K,B]=R.useState(!1),w=R.useRef(null),[Z,j]=R.useState(void 0);return R.useLayoutEffect(()=>{w.current&&j(w.current.clientWidth)},[w.current]),G(re,{modal:d,open:K,onOpenChange:B,children:[y("div",{className:r("w-full",p),ref:w,children:b}),y(z,{portal:d,className:"p-0 min-w-[200px]",style:{width:Z},children:G(X,{className:"max-h-[270px] pt-3",children:[!l&&y(Y,{loading:u,placeholder:i??"Search options...",onValueChange:A,value:P,CommandInputContainerClassName:"mx-3 border rounded-md border-[#DEDEDE]"}),y(ne,{className:r("w-full px-0",a),children:G($,{children:[!l&&y(ee,{children:"No result found."}),y(te,{className:"w-full",children:t.map(N=>y(oe,{defaultValue:e?.label,value:N.label,disabled:s,onSelect:()=>{o(N),B(!1),E?.(N?.value)},children:m?m(N):N.label},N.value))})]})})]})})]})};import{jsx as Ve}from"react/jsx-runtime";var gt=({hideSearch:t=!0,status:e,...o})=>Ve(Ie,{hideSearch:t,...o,children:Ve(Fe,{disabled:o?.disabled,placeholder:"Select or search email",status:e,value:o?.value?.label??o?.value?.value})});export{ce as Button,D as FormLabel,W as Input,S as Loader,Ce as PasswordInput,gt as Select,Pe as Textarea};
|
2
|
+
//# sourceMappingURL=index.mjs.map
|