@sikka/hawa 0.23.2-next → 0.23.7-next
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/accordion/index.js +30 -2399
- package/dist/accordion/index.mjs +19 -461
- package/dist/alert/index.mjs +0 -1
- package/dist/appStores/index.js +75 -0
- package/dist/appStores/index.mjs +38 -0
- package/dist/avatar/index.mjs +118 -3
- package/dist/backToTop/index.mjs +102 -4
- package/dist/badge/index.js +127 -0
- package/dist/badge/index.mjs +84 -0
- package/dist/blocks/auth/index.js +1173 -3092
- package/dist/blocks/auth/index.mjs +16 -10
- package/dist/blocks/feedback/index.js +864 -2913
- package/dist/blocks/feedback/index.mjs +14 -8
- package/dist/blocks/index.js +5714 -5316
- package/dist/blocks/index.mjs +390 -45
- package/dist/blocks/misc/index.js +634 -2409
- package/dist/blocks/misc/index.mjs +14 -8
- package/dist/blocks/pricing/index.js +522 -524
- package/dist/blocks/pricing/index.mjs +1861 -45
- package/dist/breadcrumb/index.js +63 -0
- package/dist/breadcrumb/index.mjs +26 -0
- package/dist/card/index.mjs +83 -8
- package/dist/checkbox/index.mjs +138 -3
- package/dist/chip/index.js +129 -0
- package/dist/chip/index.mjs +8 -0
- package/dist/{chunk-X6PCWJYD.mjs → chunk-2R2QPJT7.mjs} +761 -1104
- package/dist/chunk-677VOLD4.mjs +464 -0
- package/dist/chunk-72HYR6WB.mjs +88 -0
- package/dist/chunk-A25EXELT.mjs +131 -0
- package/dist/{chunk-OE27DSIY.mjs → chunk-F6TKEDDP.mjs} +2 -4
- package/dist/{chunk-YFC2GSJ6.mjs → chunk-P2O6R3S6.mjs} +66 -5
- package/dist/{chunk-GXXX5UB4.mjs → chunk-QGKW5R5F.mjs} +59 -20
- package/dist/chunk-TR56G3NM.mjs +2350 -0
- package/dist/chunk-UAVBFK53.mjs +346 -0
- package/dist/combobox/index.mjs +153 -7
- package/dist/dataTable/index.mjs +355 -8
- package/dist/elements/index.js +800 -1148
- package/dist/elements/index.mjs +1 -11
- package/dist/fileDropzone/index.mjs +226 -4
- package/dist/index.js +1721 -1721
- package/dist/index.mjs +1663 -1663
- package/dist/layout/index.js +493 -510
- package/dist/layout/index.mjs +1 -1
- package/dist/loading/index.mjs +0 -1
- package/dist/logos/index.mjs +204 -3
- package/dist/navigationMenu/index.mjs +155 -13
- package/dist/phoneInput/index.js +2074 -0
- package/dist/phoneInput/index.mjs +1776 -0
- package/dist/pinInput/index.js +130 -0
- package/dist/pinInput/index.mjs +88 -0
- package/dist/progress/index.js +71 -0
- package/dist/progress/index.mjs +29 -0
- package/dist/radio/index.mjs +202 -4
- package/dist/scrollArea/index.js +90 -0
- package/dist/scrollArea/index.mjs +47 -0
- package/dist/select/index.mjs +1 -1
- package/dist/sheet/index.mjs +137 -12
- package/dist/sortButton/index.mjs +40 -4
- package/dist/stopPropagationWrapper/index.js +48 -0
- package/dist/stopPropagationWrapper/index.mjs +11 -0
- package/dist/switch/index.mjs +79 -3
- package/dist/tabs/index.js +1 -1
- package/dist/tabs/index.mjs +68 -6
- package/dist/textarea/index.mjs +54 -4
- package/package.json +2 -2
- package/dist/Chip-DJ6ThZc_.d.ts +0 -21
- package/dist/Chip-eal8vwDz.d.mts +0 -21
- package/dist/accordion/index.d.mts +0 -42
- package/dist/accordion/index.d.ts +0 -42
- package/dist/alert/index.d.mts +0 -28
- package/dist/alert/index.d.ts +0 -28
- package/dist/avatar/index.d.mts +0 -15
- package/dist/avatar/index.d.ts +0 -15
- package/dist/backToTop/index.d.mts +0 -15
- package/dist/backToTop/index.d.ts +0 -15
- package/dist/button/index.d.mts +0 -16
- package/dist/button/index.d.ts +0 -16
- package/dist/card/index.d.mts +0 -17
- package/dist/card/index.d.ts +0 -17
- package/dist/checkbox/index.d.mts +0 -20
- package/dist/checkbox/index.d.ts +0 -20
- package/dist/chunk-BK5WF7UO.mjs +0 -231
- package/dist/chunk-CXWYC6FS.mjs +0 -360
- package/dist/chunk-D2USGMDT.mjs +0 -208
- package/dist/chunk-DX4SLF2L.mjs +0 -45
- package/dist/chunk-ENNSA4VR.mjs +0 -5566
- package/dist/chunk-GXSYCLZZ.mjs +0 -158
- package/dist/chunk-IQPGAHUR.mjs +0 -107
- package/dist/chunk-POT2IP62.mjs +0 -123
- package/dist/chunk-TWDZB2VH.mjs +0 -151
- package/dist/chunk-VBTYVVA7.mjs +0 -93
- package/dist/chunk-VCGW5DIP.mjs +0 -170
- package/dist/chunk-X3SMPIA3.mjs +0 -0
- package/dist/chunk-XA646BZ2.mjs +0 -143
- package/dist/chunk-ZCUUQ5VV.mjs +0 -84
- package/dist/combobox/index.d.mts +0 -32
- package/dist/combobox/index.d.ts +0 -32
- package/dist/command/index.d.mts +0 -48
- package/dist/command/index.d.ts +0 -48
- package/dist/commonTypes-gbO4hPli.d.mts +0 -7
- package/dist/commonTypes-gbO4hPli.d.ts +0 -7
- package/dist/dataTable/index.d.mts +0 -39
- package/dist/dataTable/index.d.ts +0 -39
- package/dist/dialog/index.d.mts +0 -57
- package/dist/dialog/index.d.ts +0 -57
- package/dist/dropdownMenu/index.d.mts +0 -95
- package/dist/dropdownMenu/index.d.ts +0 -95
- package/dist/fileDropzone/index.d.mts +0 -37
- package/dist/fileDropzone/index.d.ts +0 -37
- package/dist/input/index.d.mts +0 -36
- package/dist/input/index.d.ts +0 -36
- package/dist/label/index.d.mts +0 -12
- package/dist/label/index.d.ts +0 -12
- package/dist/loading/index.d.mts +0 -15
- package/dist/loading/index.d.ts +0 -15
- package/dist/logos/index.d.mts +0 -27
- package/dist/logos/index.d.ts +0 -27
- package/dist/navigationMenu/index.d.mts +0 -39
- package/dist/navigationMenu/index.d.ts +0 -39
- package/dist/popover/index.d.mts +0 -23
- package/dist/popover/index.d.ts +0 -23
- package/dist/radio/index.d.mts +0 -28
- package/dist/radio/index.d.ts +0 -28
- package/dist/select/index.d.mts +0 -43
- package/dist/select/index.d.ts +0 -43
- package/dist/sheet/index.d.mts +0 -30
- package/dist/sheet/index.d.ts +0 -30
- package/dist/skeleton/index.d.mts +0 -10
- package/dist/skeleton/index.d.ts +0 -10
- package/dist/sortButton/index.d.mts +0 -10
- package/dist/sortButton/index.d.ts +0 -10
- package/dist/splitButton/index.d.mts +0 -15
- package/dist/splitButton/index.d.ts +0 -15
- package/dist/switch/index.d.mts +0 -12
- package/dist/switch/index.d.ts +0 -12
- package/dist/table/index.d.mts +0 -21
- package/dist/table/index.d.ts +0 -21
- package/dist/tabs/index.d.mts +0 -16
- package/dist/tabs/index.d.ts +0 -16
- package/dist/textarea/index.d.mts +0 -17
- package/dist/textarea/index.d.ts +0 -17
- package/dist/tooltip/index.d.mts +0 -26
- package/dist/tooltip/index.d.ts +0 -26
- /package/dist/{chunk-A7OPD7H7.mjs → chunk-B6UCD4GP.mjs} +0 -0
- /package/dist/{chunk-O2ALK7UE.mjs → chunk-Z4M72OD3.mjs} +0 -0
|
@@ -38,13 +38,14 @@ __export(feedback_exports, {
|
|
|
38
38
|
module.exports = __toCommonJS(feedback_exports);
|
|
39
39
|
|
|
40
40
|
// components/blocks/feedback/UserReferralSource.tsx
|
|
41
|
-
var
|
|
41
|
+
var import_react4 = __toESM(require("react"));
|
|
42
42
|
var import_react_hook_form = require("react-hook-form");
|
|
43
43
|
var import_zod = require("@hookform/resolvers/zod");
|
|
44
44
|
var z = __toESM(require("zod"));
|
|
45
45
|
|
|
46
|
-
// components/elements/
|
|
47
|
-
var
|
|
46
|
+
// components/elements/button/Button.tsx
|
|
47
|
+
var React2 = __toESM(require("react"));
|
|
48
|
+
var import_class_variance_authority = require("class-variance-authority");
|
|
48
49
|
|
|
49
50
|
// components/util.ts
|
|
50
51
|
var import_clsx = require("clsx");
|
|
@@ -53,86 +54,6 @@ function cn(...inputs) {
|
|
|
53
54
|
return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs));
|
|
54
55
|
}
|
|
55
56
|
|
|
56
|
-
// components/elements/card/Card.tsx
|
|
57
|
-
var Card = React.forwardRef(
|
|
58
|
-
({ className, variant = "default", clickable = false, ...props }, ref) => {
|
|
59
|
-
let variantStyles = {
|
|
60
|
-
default: cn(
|
|
61
|
-
"hawa-rounded-lg hawa-border hawa-bg-card hawa-text-card-foreground hawa-shadow-sm",
|
|
62
|
-
clickable && "hawa-cursor-pointer hawa-transition-all hover:hawa-drop-shadow-md dark:hover:dark-shadow"
|
|
63
|
-
),
|
|
64
|
-
neoBrutalism: cn(
|
|
65
|
-
"neo-brutalism",
|
|
66
|
-
// "hawa-transition-all hawa-uppercase hawa-font-mono dark:hawa-bg-black hawa-font-bold hawa-py-2 hawa-px-4 hawa-rounded hawa-border-2 hawa-border-primary hawa-shadow-color-primary hawa-transition-[hawa-transform_50ms, hawa-box-shadow_50ms] transition-all uppercase font-mono dark:bg-black font-bold py-2 px-4 rounded border-2 border-primary shadow-color-primary transition-[transform_50ms, box-shadow_50ms]",
|
|
67
|
-
clickable && "hawa-cursor-pointer active:hawa-translate-x-0.5 active:hawa-translate-y-0.5 active:hawa-shadow-color-primary-active active:translate-x-0.5 active:translate-y-0.5 active:shadow-color-primary-active"
|
|
68
|
-
)
|
|
69
|
-
};
|
|
70
|
-
return /* @__PURE__ */ React.createElement(
|
|
71
|
-
"div",
|
|
72
|
-
{
|
|
73
|
-
ref,
|
|
74
|
-
className: cn(className, variantStyles[variant]),
|
|
75
|
-
...props
|
|
76
|
-
}
|
|
77
|
-
);
|
|
78
|
-
}
|
|
79
|
-
);
|
|
80
|
-
var CardHeader = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React.createElement(
|
|
81
|
-
"div",
|
|
82
|
-
{
|
|
83
|
-
ref,
|
|
84
|
-
className: cn(
|
|
85
|
-
"hawa-flex hawa-flex-col hawa-space-y-1.5 hawa-p-6",
|
|
86
|
-
className
|
|
87
|
-
),
|
|
88
|
-
...props
|
|
89
|
-
}
|
|
90
|
-
));
|
|
91
|
-
var CardTitle = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React.createElement(
|
|
92
|
-
"h3",
|
|
93
|
-
{
|
|
94
|
-
ref,
|
|
95
|
-
className: cn("hawa-text-2xl hawa-font-semibold ", className),
|
|
96
|
-
...props
|
|
97
|
-
}
|
|
98
|
-
));
|
|
99
|
-
var CardDescription = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React.createElement(
|
|
100
|
-
"p",
|
|
101
|
-
{
|
|
102
|
-
ref,
|
|
103
|
-
className: cn("hawa-text-sm hawa-text-muted-foreground", className),
|
|
104
|
-
...props
|
|
105
|
-
}
|
|
106
|
-
));
|
|
107
|
-
var CardContent = React.forwardRef(
|
|
108
|
-
({ headless, noPadding, className, ...props }, ref) => /* @__PURE__ */ React.createElement(
|
|
109
|
-
"div",
|
|
110
|
-
{
|
|
111
|
-
ref,
|
|
112
|
-
className: cn(
|
|
113
|
-
noPadding ? "hawa-p-0" : "hawa-p-6",
|
|
114
|
-
headless ? "hawa-pt-6" : "hawa-pt-0",
|
|
115
|
-
className
|
|
116
|
-
),
|
|
117
|
-
...props
|
|
118
|
-
}
|
|
119
|
-
)
|
|
120
|
-
);
|
|
121
|
-
var CardFooter = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React.createElement(
|
|
122
|
-
"div",
|
|
123
|
-
{
|
|
124
|
-
ref,
|
|
125
|
-
className: cn("hawa-flex hawa-items-center hawa-p-6 hawa-pt-0", className),
|
|
126
|
-
...props
|
|
127
|
-
}
|
|
128
|
-
));
|
|
129
|
-
CardDescription.displayName = "CardDescription";
|
|
130
|
-
CardContent.displayName = "CardContent";
|
|
131
|
-
CardHeader.displayName = "CardHeader";
|
|
132
|
-
CardFooter.displayName = "CardFooter";
|
|
133
|
-
CardTitle.displayName = "CardTitle";
|
|
134
|
-
Card.displayName = "Card";
|
|
135
|
-
|
|
136
57
|
// components/elements/loading/Loading.tsx
|
|
137
58
|
var import_react = __toESM(require("react"));
|
|
138
59
|
var Loading = ({
|
|
@@ -310,6 +231,164 @@ var Loading = ({
|
|
|
310
231
|
}
|
|
311
232
|
};
|
|
312
233
|
|
|
234
|
+
// components/elements/button/Button.tsx
|
|
235
|
+
var buttonVariants = (0, import_class_variance_authority.cva)(
|
|
236
|
+
"hawa-inline-flex hawa-items-center hawa-select-none hawa-rounded-md hawa-text-sm hawa-font-medium hawa-ring-offset-background hawa-transition-colors focus-visible:hawa-outline-none focus-visible:hawa-ring-2 focus-visible:hawa-ring-ring focus-visible:hawa-ring-offset-2 disabled:hawa-pointer-events-none disabled:hawa-opacity-50",
|
|
237
|
+
{
|
|
238
|
+
variants: {
|
|
239
|
+
variant: {
|
|
240
|
+
default: "hawa-bg-primary hawa-text-primary-foreground hover:hawa-bg-primary/90",
|
|
241
|
+
light: "hawa-bg-primary/20 hawa-text-primary hover:hawa-bg-primary/40",
|
|
242
|
+
destructive: "hawa-bg-destructive hawa-text-destructive-foreground hover:hawa-bg-destructive/90",
|
|
243
|
+
outline: "hawa-border hawa-border-input hawa-bg-transparent hover:hawa-bg-accent hover:hawa-text-accent-foreground",
|
|
244
|
+
secondary: "hawa-bg-secondary hawa-text-secondary-foreground hover:hawa-bg-secondary/80",
|
|
245
|
+
ghost: "hover:hawa-bg-accent hover:hawa-text-accent-foreground",
|
|
246
|
+
link: "hawa-text-primary hawa-underline-offset-4 hover:hawa-underline",
|
|
247
|
+
combobox: "hawa-bg-background hawa-border",
|
|
248
|
+
neoBrutalism: "neo-brutalism"
|
|
249
|
+
// "hawa-cursor-pointer hawa-transition-all hawa-uppercase hawa-font-mono dark:hawa-bg-black hawa-font-bold hawa-py-2 hawa-px-4 hawa-rounded hawa-border-2 hawa-border-primary hawa-shadow-color-primary hawa-transition-[hawa-transform_50ms, hawa-box-shadow_50ms] active:hawa-translate-x-0.5 active:hawa-translate-y-0.5 active:hawa-shadow-color-primary-active shadow-color-primary active:shadow-color-primary-active",
|
|
250
|
+
},
|
|
251
|
+
size: {
|
|
252
|
+
default: "hawa-h-10 hawa-px-4 hawa-py-2",
|
|
253
|
+
heightless: "hawa-px-4 hawa-py-4",
|
|
254
|
+
xs: "hawa-h-fit hawa-min-h-[25px] hawa-py-1 hawa-text-[10px] hawa-px-2 ",
|
|
255
|
+
sm: "hawa-h-9 hawa-text-[11px] hawa-rounded-md hawa-px-3",
|
|
256
|
+
lg: "hawa-h-11 hawa-rounded-md hawa-px-8",
|
|
257
|
+
xl: "hawa-h-14 hawa-rounded-md hawa-px-10",
|
|
258
|
+
icon: "hawa-h-10 hawa-w-10",
|
|
259
|
+
smallIcon: "hawa-h-7 hawa-w-7"
|
|
260
|
+
}
|
|
261
|
+
},
|
|
262
|
+
defaultVariants: {
|
|
263
|
+
variant: "default",
|
|
264
|
+
size: "default"
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
);
|
|
268
|
+
var Button = React2.forwardRef(
|
|
269
|
+
({
|
|
270
|
+
className,
|
|
271
|
+
variant,
|
|
272
|
+
size,
|
|
273
|
+
asChild = false,
|
|
274
|
+
centered = true,
|
|
275
|
+
isLoading,
|
|
276
|
+
children,
|
|
277
|
+
...props
|
|
278
|
+
}, ref) => {
|
|
279
|
+
const Comp = "button";
|
|
280
|
+
const loadingColor = variant === "outline" || variant === "ghost" || variant === "neoBrutalism" ? "hawa-bg-primary" : "hawa-bg-primary-foreground";
|
|
281
|
+
return /* @__PURE__ */ React2.createElement(
|
|
282
|
+
Comp,
|
|
283
|
+
{
|
|
284
|
+
className: cn(
|
|
285
|
+
buttonVariants({ variant, size, className }),
|
|
286
|
+
centered && "hawa-justify-center"
|
|
287
|
+
),
|
|
288
|
+
ref,
|
|
289
|
+
...props
|
|
290
|
+
},
|
|
291
|
+
isLoading ? /* @__PURE__ */ React2.createElement(
|
|
292
|
+
Loading,
|
|
293
|
+
{
|
|
294
|
+
design: size === "icon" || size === "smallIcon" ? "spinner" : "dots-pulse",
|
|
295
|
+
themeMode: variant === "outline" ? "light" : "dark",
|
|
296
|
+
color: loadingColor,
|
|
297
|
+
size: size === "sm" || size === "xs" ? "xs" : "button"
|
|
298
|
+
}
|
|
299
|
+
) : children
|
|
300
|
+
);
|
|
301
|
+
}
|
|
302
|
+
);
|
|
303
|
+
Button.displayName = "Button";
|
|
304
|
+
|
|
305
|
+
// components/elements/card/Card.tsx
|
|
306
|
+
var React3 = __toESM(require("react"));
|
|
307
|
+
var Card = React3.forwardRef(
|
|
308
|
+
({ className, variant = "default", clickable = false, ...props }, ref) => {
|
|
309
|
+
let variantStyles = {
|
|
310
|
+
default: cn(
|
|
311
|
+
"hawa-rounded-lg hawa-border hawa-bg-card hawa-text-card-foreground hawa-shadow-sm",
|
|
312
|
+
clickable && "hawa-cursor-pointer hawa-transition-all hover:hawa-drop-shadow-md dark:hover:dark-shadow"
|
|
313
|
+
),
|
|
314
|
+
neoBrutalism: cn(
|
|
315
|
+
"neo-brutalism",
|
|
316
|
+
// "hawa-transition-all hawa-uppercase hawa-font-mono dark:hawa-bg-black hawa-font-bold hawa-py-2 hawa-px-4 hawa-rounded hawa-border-2 hawa-border-primary hawa-shadow-color-primary hawa-transition-[hawa-transform_50ms, hawa-box-shadow_50ms] transition-all uppercase font-mono dark:bg-black font-bold py-2 px-4 rounded border-2 border-primary shadow-color-primary transition-[transform_50ms, box-shadow_50ms]",
|
|
317
|
+
clickable && "hawa-cursor-pointer active:hawa-translate-x-0.5 active:hawa-translate-y-0.5 active:hawa-shadow-color-primary-active active:translate-x-0.5 active:translate-y-0.5 active:shadow-color-primary-active"
|
|
318
|
+
)
|
|
319
|
+
};
|
|
320
|
+
return /* @__PURE__ */ React3.createElement(
|
|
321
|
+
"div",
|
|
322
|
+
{
|
|
323
|
+
ref,
|
|
324
|
+
className: cn(className, variantStyles[variant]),
|
|
325
|
+
...props
|
|
326
|
+
}
|
|
327
|
+
);
|
|
328
|
+
}
|
|
329
|
+
);
|
|
330
|
+
var CardHeader = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React3.createElement(
|
|
331
|
+
"div",
|
|
332
|
+
{
|
|
333
|
+
ref,
|
|
334
|
+
className: cn(
|
|
335
|
+
"hawa-flex hawa-flex-col hawa-space-y-1.5 hawa-p-6",
|
|
336
|
+
className
|
|
337
|
+
),
|
|
338
|
+
...props
|
|
339
|
+
}
|
|
340
|
+
));
|
|
341
|
+
var CardTitle = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React3.createElement(
|
|
342
|
+
"h3",
|
|
343
|
+
{
|
|
344
|
+
ref,
|
|
345
|
+
className: cn("hawa-text-2xl hawa-font-semibold ", className),
|
|
346
|
+
...props
|
|
347
|
+
}
|
|
348
|
+
));
|
|
349
|
+
var CardDescription = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React3.createElement(
|
|
350
|
+
"p",
|
|
351
|
+
{
|
|
352
|
+
ref,
|
|
353
|
+
className: cn("hawa-text-sm hawa-text-muted-foreground", className),
|
|
354
|
+
...props
|
|
355
|
+
}
|
|
356
|
+
));
|
|
357
|
+
var CardContent = React3.forwardRef(
|
|
358
|
+
({ headless, noPadding, className, ...props }, ref) => /* @__PURE__ */ React3.createElement(
|
|
359
|
+
"div",
|
|
360
|
+
{
|
|
361
|
+
ref,
|
|
362
|
+
className: cn(
|
|
363
|
+
noPadding ? "hawa-p-0" : "hawa-p-6",
|
|
364
|
+
headless ? "hawa-pt-6" : "hawa-pt-0",
|
|
365
|
+
className
|
|
366
|
+
),
|
|
367
|
+
...props
|
|
368
|
+
}
|
|
369
|
+
)
|
|
370
|
+
);
|
|
371
|
+
var CardFooter = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React3.createElement(
|
|
372
|
+
"div",
|
|
373
|
+
{
|
|
374
|
+
ref,
|
|
375
|
+
className: cn("hawa-flex hawa-items-center hawa-p-6 hawa-pt-0", className),
|
|
376
|
+
...props
|
|
377
|
+
}
|
|
378
|
+
));
|
|
379
|
+
CardDescription.displayName = "CardDescription";
|
|
380
|
+
CardContent.displayName = "CardContent";
|
|
381
|
+
CardHeader.displayName = "CardHeader";
|
|
382
|
+
CardFooter.displayName = "CardFooter";
|
|
383
|
+
CardTitle.displayName = "CardTitle";
|
|
384
|
+
Card.displayName = "Card";
|
|
385
|
+
|
|
386
|
+
// components/elements/radio/Radio.tsx
|
|
387
|
+
var import_react3 = __toESM(require("react"));
|
|
388
|
+
|
|
389
|
+
// components/elements/label/Label.tsx
|
|
390
|
+
var React5 = __toESM(require("react"));
|
|
391
|
+
|
|
313
392
|
// components/elements/tooltip/Tooltip.tsx
|
|
314
393
|
var import_react2 = __toESM(require("react"));
|
|
315
394
|
var TooltipPrimitive = __toESM(require("@radix-ui/react-tooltip"));
|
|
@@ -361,2754 +440,281 @@ var Tooltip = ({
|
|
|
361
440
|
);
|
|
362
441
|
};
|
|
363
442
|
|
|
364
|
-
// components/elements/
|
|
365
|
-
var
|
|
366
|
-
|
|
367
|
-
className,
|
|
368
|
-
content,
|
|
369
|
-
animation = "pulse",
|
|
370
|
-
...props
|
|
371
|
-
}) {
|
|
372
|
-
const animationStyles = {
|
|
373
|
-
none: "hawa-rounded hawa-bg-muted",
|
|
374
|
-
pulse: "hawa-animate-pulse hawa-rounded hawa-bg-muted",
|
|
375
|
-
shimmer: "hawa-space-y-5 hawa-rounded hawa-bg-muted hawa-p-4 hawa-relative before:hawa-absolute before:hawa-inset-0 before:hawa--translate-x-full before:hawa-animate-[shimmer_2s_infinite] before:hawa-bg-gradient-to-r before:hawa-from-transparent before:hawa-via-gray-300/40 dark:before:hawa-via-white/10 before:hawa-to-transparent hawa-isolate hawa-overflow-hidden before:hawa-border-t before:hawa-border-rose-100/10"
|
|
376
|
-
};
|
|
377
|
-
return /* @__PURE__ */ import_react3.default.createElement(
|
|
378
|
-
"div",
|
|
379
|
-
{
|
|
380
|
-
className: cn(
|
|
381
|
-
animationStyles[animation],
|
|
382
|
-
content && "hawa-flex hawa-flex-col hawa-items-center hawa-justify-center",
|
|
383
|
-
className
|
|
384
|
-
),
|
|
385
|
-
...props
|
|
386
|
-
},
|
|
387
|
-
content && content
|
|
388
|
-
);
|
|
389
|
-
}
|
|
390
|
-
|
|
391
|
-
// components/elements/dropdownMenu/DropdownMenu.tsx
|
|
392
|
-
var React5 = __toESM(require("react"));
|
|
393
|
-
var DropdownMenuPrimitive = __toESM(require("@radix-ui/react-dropdown-menu"));
|
|
394
|
-
var DropdownMenuSubTrigger = React5.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ React5.createElement(
|
|
395
|
-
DropdownMenuPrimitive.SubTrigger,
|
|
443
|
+
// components/elements/label/Label.tsx
|
|
444
|
+
var Label = React5.forwardRef(({ className, hint, hintSide, required, children, ...props }, ref) => /* @__PURE__ */ React5.createElement("div", { className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-1 hawa-transition-all" }, /* @__PURE__ */ React5.createElement(
|
|
445
|
+
"label",
|
|
396
446
|
{
|
|
397
447
|
ref,
|
|
398
448
|
className: cn(
|
|
399
|
-
"hawa-
|
|
400
|
-
inset && "hawa-pl-8",
|
|
449
|
+
"hawa-text-sm hawa-font-medium hawa-leading-none peer-disabled:hawa-cursor-not-allowed peer-disabled:hawa-opacity-70",
|
|
401
450
|
className
|
|
402
451
|
),
|
|
403
452
|
...props
|
|
404
453
|
},
|
|
405
|
-
|
|
406
|
-
" ",
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
{
|
|
410
|
-
"aria-label": "Chevron Right Icon",
|
|
411
|
-
stroke: "currentColor",
|
|
412
|
-
fill: "currentColor",
|
|
413
|
-
strokeWidth: "0",
|
|
414
|
-
viewBox: "0 0 16 16",
|
|
415
|
-
height: "1em",
|
|
416
|
-
width: "1em",
|
|
417
|
-
className: cn(props.dir === "rtl" ? "hawa-rotate-180" : "")
|
|
418
|
-
},
|
|
419
|
-
/* @__PURE__ */ React5.createElement(
|
|
420
|
-
"path",
|
|
421
|
-
{
|
|
422
|
-
fillRule: "evenodd",
|
|
423
|
-
d: "M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z"
|
|
424
|
-
}
|
|
425
|
-
)
|
|
426
|
-
)
|
|
427
|
-
));
|
|
428
|
-
DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;
|
|
429
|
-
var DropdownMenuSubContent = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React5.createElement(
|
|
430
|
-
DropdownMenuPrimitive.SubContent,
|
|
431
|
-
{
|
|
432
|
-
ref,
|
|
433
|
-
className: cn(
|
|
434
|
-
"hawa-z-50 hawa-min-w-[8rem] hawa-gap-1 hawa-overflow-hidden hawa-rounded-md hawa-border hawa-bg-popover hawa-p-1 hawa-text-popover-foreground hawa-shadow-lg data-[state=open]:hawa-animate-in data-[state=closed]:hawa-animate-out data-[state=closed]:hawa-fade-out-0 data-[state=open]:hawa-fade-in-0 data-[state=closed]:hawa-zoom-out-95 data-[state=open]:hawa-zoom-in-95 data-[side=bottom]:hawa-slide-in-from-top-2 data-[side=left]:hawa-slide-in-from-right-2 data-[side=right]:hawa-slide-in-from-left-2 data-[side=top]:hawa-slide-in-from-bottom-2",
|
|
435
|
-
className
|
|
436
|
-
),
|
|
437
|
-
...props
|
|
438
|
-
}
|
|
439
|
-
));
|
|
440
|
-
DropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;
|
|
441
|
-
var DropdownMenuContent = React5.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ React5.createElement(DropdownMenuPrimitive.Portal, null, /* @__PURE__ */ React5.createElement(
|
|
442
|
-
DropdownMenuPrimitive.Content,
|
|
443
|
-
{
|
|
444
|
-
ref,
|
|
445
|
-
sideOffset,
|
|
446
|
-
className: cn(
|
|
447
|
-
"hawa-z-50 hawa-overflow-hidden hawa-rounded-md hawa-border hawa-bg-popover hawa-p-1 hawa-text-popover-foreground hawa-shadow-md data-[state=open]:hawa-animate-in data-[state=closed]:hawa-animate-out data-[state=closed]:hawa-fade-out-0 data-[state=open]:hawa-fade-in-0 data-[state=closed]:hawa-zoom-out-95 data-[state=open]:hawa-zoom-in-95 data-[side=bottom]:hawa-slide-in-from-top-2 data-[side=left]:hawa-slide-in-from-right-2 data-[side=right]:hawa-slide-in-from-left-2 data-[side=top]:hawa-slide-in-from-bottom-2",
|
|
448
|
-
className
|
|
449
|
-
),
|
|
450
|
-
...props
|
|
451
|
-
}
|
|
452
|
-
)));
|
|
453
|
-
DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
|
|
454
|
-
var DropdownMenuItem = React5.forwardRef(({ className, inset, badged, slug, ...props }, ref) => {
|
|
455
|
-
return /* @__PURE__ */ React5.createElement("a", { href: slug }, /* @__PURE__ */ React5.createElement(
|
|
456
|
-
DropdownMenuPrimitive.Item,
|
|
457
|
-
{
|
|
458
|
-
disabled: props.disabled,
|
|
459
|
-
ref,
|
|
460
|
-
className: cn(
|
|
461
|
-
"hawa-relative hawa-flex hawa-cursor-pointer hawa-select-none hawa-items-center hawa-justify-between hawa-rounded-sm hawa-text-sm hawa-outline-none hawa-transition-colors focus:hawa-text-accent-foreground data-[disabled]:hawa-pointer-events-none data-[disabled]:hawa-opacity-50",
|
|
462
|
-
inset && "hawa-pl-8",
|
|
463
|
-
props.end && Array.isArray(props.children) && props.children[1] && "hawa-gap-6",
|
|
464
|
-
className
|
|
465
|
-
),
|
|
466
|
-
...props
|
|
467
|
-
},
|
|
468
|
-
/* @__PURE__ */ React5.createElement("div", { className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-2 " }, props.children),
|
|
469
|
-
props.end && props.end,
|
|
470
|
-
!props.end && props.shortcut && /* @__PURE__ */ React5.createElement(DropdownMenuShortcut, null, props.shortcut),
|
|
471
|
-
!props.end && badged && /* @__PURE__ */ React5.createElement("div", { className: "hawa-h-3 hawa-w-3 hawa-rounded-full hawa-bg-red-500" })
|
|
472
|
-
));
|
|
473
|
-
});
|
|
474
|
-
DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
|
|
475
|
-
var DropdownMenuCheckboxItem = React5.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ React5.createElement(
|
|
476
|
-
DropdownMenuPrimitive.CheckboxItem,
|
|
477
|
-
{
|
|
478
|
-
ref,
|
|
479
|
-
className: cn(
|
|
480
|
-
"hawa-relative hawa-flex hawa-cursor-default hawa-select-none hawa-items-center hawa-rounded-sm hawa-py-1.5 hawa-pl-8 hawa-pr-2 hawa-text-sm hawa-outline-none hawa-transition-colors focus:hawa-bg-accent focus:hawa-text-accent-foreground data-[disabled]:hawa-pointer-events-none data-[disabled]:hawa-opacity-50",
|
|
481
|
-
className
|
|
482
|
-
),
|
|
483
|
-
checked,
|
|
484
|
-
...props
|
|
485
|
-
},
|
|
486
|
-
/* @__PURE__ */ React5.createElement("span", { className: "hawa-absolute hawa-left-2 hawa-flex hawa-h-3.5 hawa-w-3.5 hawa-items-center hawa-justify-center" }, /* @__PURE__ */ React5.createElement(DropdownMenuPrimitive.ItemIndicator, null, /* @__PURE__ */ React5.createElement(
|
|
487
|
-
"svg",
|
|
488
|
-
{
|
|
489
|
-
"aria-label": "Check Mark",
|
|
490
|
-
stroke: "currentColor",
|
|
491
|
-
fill: "currentColor",
|
|
492
|
-
strokeWidth: "0",
|
|
493
|
-
viewBox: "0 0 512 512",
|
|
494
|
-
height: "0.60em",
|
|
495
|
-
width: "0.60em"
|
|
496
|
-
},
|
|
497
|
-
/* @__PURE__ */ React5.createElement("path", { d: "M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z" })
|
|
498
|
-
), " ")),
|
|
499
|
-
children
|
|
500
|
-
));
|
|
501
|
-
DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;
|
|
502
|
-
var DropdownMenuRadioItem = React5.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ React5.createElement(
|
|
503
|
-
DropdownMenuPrimitive.RadioItem,
|
|
454
|
+
children,
|
|
455
|
+
required && /* @__PURE__ */ React5.createElement("span", { className: "hawa-mx-0.5 hawa-text-red-500" }, "*")
|
|
456
|
+
), hint && /* @__PURE__ */ React5.createElement(Tooltip, { content: hint, side: hintSide }, /* @__PURE__ */ React5.createElement(
|
|
457
|
+
"svg",
|
|
504
458
|
{
|
|
505
|
-
|
|
506
|
-
className:
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
459
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
460
|
+
className: "hawa-h-[14px] hawa-w-[14px] hawa-cursor-help",
|
|
461
|
+
viewBox: "0 0 24 24",
|
|
462
|
+
fill: "none",
|
|
463
|
+
stroke: "currentColor",
|
|
464
|
+
strokeWidth: "2",
|
|
465
|
+
strokeLinecap: "round",
|
|
466
|
+
strokeLinejoin: "round"
|
|
511
467
|
},
|
|
512
|
-
/* @__PURE__ */ React5.createElement("
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
},
|
|
527
|
-
/* @__PURE__ */ React5.createElement("circle", { cx: "12", cy: "12", r: "10" })
|
|
528
|
-
))),
|
|
529
|
-
children
|
|
530
|
-
));
|
|
531
|
-
DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;
|
|
532
|
-
var DropdownMenuLabel = React5.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ React5.createElement(
|
|
533
|
-
DropdownMenuPrimitive.Label,
|
|
534
|
-
{
|
|
535
|
-
ref,
|
|
536
|
-
className: cn(
|
|
537
|
-
"hawa-px-2 hawa-py-1.5 hawa-text-sm hawa-font-semibold",
|
|
538
|
-
inset && "hawa-pl-8",
|
|
539
|
-
className
|
|
540
|
-
),
|
|
541
|
-
...props
|
|
542
|
-
}
|
|
543
|
-
));
|
|
544
|
-
DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
|
|
545
|
-
var DropdownMenuSeparator = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React5.createElement(
|
|
546
|
-
DropdownMenuPrimitive.Separator,
|
|
547
|
-
{
|
|
548
|
-
ref,
|
|
549
|
-
className: cn("hawa--mx-1 hawa-my-1 hawa-h-px hawa-bg-muted", className),
|
|
550
|
-
...props
|
|
551
|
-
}
|
|
552
|
-
));
|
|
553
|
-
DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;
|
|
554
|
-
var DropdownMenuShortcut = ({
|
|
555
|
-
className,
|
|
468
|
+
/* @__PURE__ */ React5.createElement("circle", { cx: "12", cy: "12", r: "10" }),
|
|
469
|
+
/* @__PURE__ */ React5.createElement("path", { d: "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3" }),
|
|
470
|
+
/* @__PURE__ */ React5.createElement("path", { d: "M12 17h.01" })
|
|
471
|
+
))));
|
|
472
|
+
Label.displayName = "Label";
|
|
473
|
+
|
|
474
|
+
// components/elements/radio/Radio.tsx
|
|
475
|
+
var Radio = ({
|
|
476
|
+
design = "default",
|
|
477
|
+
width = "default",
|
|
478
|
+
size = "default",
|
|
479
|
+
orientation = "horizontal",
|
|
480
|
+
labelProps,
|
|
481
|
+
tabsContainerClassName,
|
|
556
482
|
...props
|
|
557
483
|
}) => {
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
484
|
+
var _a, _b, _c;
|
|
485
|
+
const [selectedOption, setSelectedOption] = (0, import_react3.useState)(props.defaultValue);
|
|
486
|
+
let activeTabStyle = "hawa-inline-block hawa-w-full hawa-text-primary-foreground hawa-bg-primary hawa-active dark:hawa-bg-primary";
|
|
487
|
+
let inactiveTabStyle = "hawa-inline-block hawa-w-full hawa-transition-all hover:hawa-bg-muted hawa-bg-primary-foreground dark:hover:hawa-text-white";
|
|
488
|
+
let orientationStyle = {
|
|
489
|
+
horizontal: "hawa-flex hawa-flex-row",
|
|
490
|
+
vertical: "hawa-flex hawa-flex-col"
|
|
491
|
+
};
|
|
492
|
+
let tabSizeStyle = {
|
|
493
|
+
default: "hawa-py-2 hawa-px-4 hawa-text-sm",
|
|
494
|
+
lg: "hawa-py-2 hawa-px-4",
|
|
495
|
+
sm: "hawa-p-1.5 hawa-text-xs",
|
|
496
|
+
xs: "hawa-p-1 hawa-text-[10px]"
|
|
497
|
+
};
|
|
498
|
+
let widthStyle = {
|
|
499
|
+
none: "",
|
|
500
|
+
default: "hawa-max-w-fit",
|
|
501
|
+
full: "hawa-w-full"
|
|
502
|
+
};
|
|
503
|
+
const [parentDirection, setParentDirection] = import_react3.default.useState(
|
|
504
|
+
null
|
|
567
505
|
);
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
ref,
|
|
582
|
-
className: !props.unstyled ? cn(
|
|
583
|
-
"hawa-overflow-hidden hawa-text-sm hawa-transition-all data-[state=closed]:hawa-animate-accordion-up data-[state=open]:hawa-animate-accordion-down",
|
|
584
|
-
className
|
|
585
|
-
) : className,
|
|
586
|
-
...props
|
|
587
|
-
},
|
|
588
|
-
/* @__PURE__ */ React6.createElement("div", { className: "hawa-bg-background hawa-p-4" }, children)
|
|
589
|
-
));
|
|
590
|
-
AccordionContent.displayName = AccordionPrimitive.Content.displayName;
|
|
591
|
-
|
|
592
|
-
// components/elements/accordion/AccordionTrigger.tsx
|
|
593
|
-
var React7 = __toESM(require("react"));
|
|
594
|
-
var AccordionPrimitive2 = __toESM(require("@radix-ui/react-accordion"));
|
|
595
|
-
var AccordionTrigger = React7.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ React7.createElement(AccordionPrimitive2.Header, { className: "hawa-flex" }, /* @__PURE__ */ React7.createElement(
|
|
596
|
-
AccordionPrimitive2.Trigger,
|
|
597
|
-
{
|
|
598
|
-
ref,
|
|
599
|
-
className: !props.unstyled ? cn(
|
|
600
|
-
"hawa-flex hawa-flex-1 hawa-items-center hawa-justify-between hawa-bg-muted/50 hawa-p-4 hawa-font-medium hawa-transition-all [&[data-state=open]>svg]:hawa-rotate-180",
|
|
601
|
-
props.disabled ? "hawa-bg-muted/30 hawa-text-muted-foreground/50" : "hover:hawa-bg-muted",
|
|
602
|
-
className
|
|
603
|
-
) : className,
|
|
604
|
-
...props
|
|
605
|
-
},
|
|
606
|
-
children,
|
|
607
|
-
!props.hideArrow && /* @__PURE__ */ React7.createElement(
|
|
608
|
-
"svg",
|
|
609
|
-
{
|
|
610
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
611
|
-
width: "24",
|
|
612
|
-
height: "24",
|
|
613
|
-
viewBox: "0 0 24 24",
|
|
614
|
-
fill: "none",
|
|
615
|
-
stroke: "currentColor",
|
|
616
|
-
strokeWidth: "2",
|
|
617
|
-
strokeLinecap: "round",
|
|
618
|
-
strokeLinejoin: "round",
|
|
619
|
-
className: "hawa-icon hawa-shrink-0 hawa-transition-transform hawa-duration-200"
|
|
620
|
-
},
|
|
621
|
-
/* @__PURE__ */ React7.createElement("path", { d: "m6 9 6 6 6-6" })
|
|
622
|
-
)
|
|
623
|
-
)));
|
|
624
|
-
AccordionTrigger.displayName = AccordionPrimitive2.Trigger.displayName;
|
|
625
|
-
|
|
626
|
-
// components/elements/accordion/Accordion.tsx
|
|
627
|
-
var Accordion = React8.forwardRef(
|
|
628
|
-
({
|
|
629
|
-
items,
|
|
630
|
-
design = "default",
|
|
631
|
-
itemClassNames,
|
|
632
|
-
triggerclassNames,
|
|
633
|
-
contentclassNames,
|
|
634
|
-
className,
|
|
635
|
-
...props
|
|
636
|
-
}, ref) => /* @__PURE__ */ React8.createElement(AccordionPrimitive3.Root, { type: props.type, collapsible: true }, /* @__PURE__ */ React8.createElement(
|
|
637
|
-
"div",
|
|
638
|
-
{
|
|
639
|
-
className: cn("hawa-flex hawa-flex-col", {
|
|
640
|
-
"hawa-gap-4": design === "separated",
|
|
641
|
-
"hawa-gap-0": design === "default"
|
|
642
|
-
})
|
|
643
|
-
},
|
|
644
|
-
items.map((item, index) => /* @__PURE__ */ React8.createElement(
|
|
645
|
-
AccordionPrimitive3.Item,
|
|
646
|
-
{
|
|
647
|
-
disabled: item.disabled || false,
|
|
648
|
-
className: cn(itemClassNames, "hawa-rounded"),
|
|
649
|
-
key: index,
|
|
650
|
-
value: `item-${index}`
|
|
651
|
-
},
|
|
652
|
-
/* @__PURE__ */ React8.createElement(
|
|
653
|
-
AccordionTrigger,
|
|
506
|
+
const parentRef = (0, import_react3.useRef)(null);
|
|
507
|
+
(0, import_react3.useEffect)(() => {
|
|
508
|
+
var _a2;
|
|
509
|
+
const parentNode = (_a2 = parentRef.current) == null ? void 0 : _a2.parentNode;
|
|
510
|
+
if (parentNode) {
|
|
511
|
+
const dir = window.getComputedStyle(parentNode).direction;
|
|
512
|
+
setParentDirection(dir);
|
|
513
|
+
}
|
|
514
|
+
});
|
|
515
|
+
switch (design) {
|
|
516
|
+
case "tabs":
|
|
517
|
+
return /* @__PURE__ */ import_react3.default.createElement(
|
|
518
|
+
"ul",
|
|
654
519
|
{
|
|
655
|
-
|
|
520
|
+
ref: parentRef,
|
|
656
521
|
className: cn(
|
|
657
|
-
"hawa-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
triggerclassNames
|
|
522
|
+
props.options && ((_a = props.options) == null ? void 0 : _a.length) > 2 ? "hawa-flex-wrap xs:hawa-max-w-full xs:hawa-flex-nowrap" : "",
|
|
523
|
+
"hawa-select-none hawa-whitespace-nowrap hawa-rounded hawa-border hawa-text-center hawa-font-medium",
|
|
524
|
+
orientationStyle[orientation],
|
|
525
|
+
widthStyle[width],
|
|
526
|
+
tabsContainerClassName
|
|
663
527
|
)
|
|
664
528
|
},
|
|
665
|
-
/* @__PURE__ */
|
|
666
|
-
"
|
|
529
|
+
(_b = props.options) == null ? void 0 : _b.map((opt, o) => /* @__PURE__ */ import_react3.default.createElement(
|
|
530
|
+
"li",
|
|
531
|
+
{
|
|
532
|
+
"aria-current": "page",
|
|
533
|
+
onClick: () => {
|
|
534
|
+
setSelectedOption(opt.value);
|
|
535
|
+
if (props.onChangeTab) {
|
|
536
|
+
props.onChangeTab(opt);
|
|
537
|
+
} else {
|
|
538
|
+
console.log("onChangeTab was not provided");
|
|
539
|
+
}
|
|
540
|
+
},
|
|
541
|
+
className: cn(
|
|
542
|
+
"hawa-w-full hawa-cursor-pointer ",
|
|
543
|
+
orientation === "horizontal" && parentDirection === "ltr" && "hawa-rounded-none first:hawa-rounded-l last:hawa-rounded-r",
|
|
544
|
+
orientation === "horizontal" && parentDirection === "rtl" && "hawa-rounded-none first:hawa-rounded-r last:hawa-rounded-l",
|
|
545
|
+
orientation === "vertical" && "hawa-rounded-none first:hawa-rounded-t last:hawa-rounded-b",
|
|
546
|
+
tabSizeStyle[size],
|
|
547
|
+
"hawa-last hawa-flex hawa-flex-row hawa-items-center hawa-justify-center hawa-gap-2 ",
|
|
548
|
+
selectedOption === opt.value ? activeTabStyle : inactiveTabStyle
|
|
549
|
+
),
|
|
550
|
+
key: o
|
|
551
|
+
},
|
|
552
|
+
opt.icon && opt.icon,
|
|
553
|
+
opt.label
|
|
554
|
+
))
|
|
555
|
+
);
|
|
556
|
+
case "bordered":
|
|
557
|
+
return /* @__PURE__ */ import_react3.default.createElement("div", { className: cn(orientationStyle[orientation], "hawa-gap-4") }, props.options && props.options.map((opt, i) => /* @__PURE__ */ import_react3.default.createElement(
|
|
558
|
+
"div",
|
|
559
|
+
{
|
|
560
|
+
key: i,
|
|
561
|
+
className: "hawa-rounded hawa-border hawa-border-gray-200 "
|
|
562
|
+
},
|
|
563
|
+
/* @__PURE__ */ import_react3.default.createElement(
|
|
564
|
+
"div",
|
|
667
565
|
{
|
|
668
566
|
className: cn(
|
|
669
|
-
"hawa-flex hawa-
|
|
670
|
-
|
|
671
|
-
)
|
|
567
|
+
"radio-item radio-item-bordered hawa-flex hawa-items-center hawa-transition-all",
|
|
568
|
+
props.direction === "rtl" ? "margin-left right-19px" : "margin-right left-23px"
|
|
569
|
+
),
|
|
570
|
+
key: i + 1
|
|
672
571
|
},
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
572
|
+
/* @__PURE__ */ import_react3.default.createElement(
|
|
573
|
+
"input",
|
|
574
|
+
{
|
|
575
|
+
disabled: opt.disabled,
|
|
576
|
+
id: opt.value.toString(),
|
|
577
|
+
type: "radio",
|
|
578
|
+
value: opt.value,
|
|
579
|
+
name: "bordered-radio"
|
|
580
|
+
}
|
|
581
|
+
),
|
|
582
|
+
/* @__PURE__ */ import_react3.default.createElement(
|
|
583
|
+
"label",
|
|
584
|
+
{
|
|
585
|
+
htmlFor: opt.value.toString(),
|
|
586
|
+
className: cn(
|
|
587
|
+
"hawa-ml-2 hawa-w-full hawa-p-4 hawa-pl-3 hawa-text-sm hawa-font-medium dark:hawa-text-white",
|
|
588
|
+
opt.disabled ? "hawa-opacity-50" : "hawa-cursor-pointer hawa-text-gray-900"
|
|
589
|
+
)
|
|
590
|
+
},
|
|
591
|
+
opt.label
|
|
592
|
+
)
|
|
676
593
|
)
|
|
677
|
-
)
|
|
678
|
-
|
|
679
|
-
|
|
594
|
+
)));
|
|
595
|
+
case "cards":
|
|
596
|
+
return /* @__PURE__ */ import_react3.default.createElement("ul", { className: cn(orientationStyle[orientation], "hawa-gap-4") }, (_c = props.options) == null ? void 0 : _c.map((opt, o) => /* @__PURE__ */ import_react3.default.createElement("li", { key: o }, /* @__PURE__ */ import_react3.default.createElement(
|
|
597
|
+
"input",
|
|
598
|
+
{
|
|
599
|
+
type: "radio",
|
|
600
|
+
id: opt.value.toString(),
|
|
601
|
+
name: "cards-radio",
|
|
602
|
+
value: opt.value.toString(),
|
|
603
|
+
className: "hawa-peer hawa-hidden",
|
|
604
|
+
required: true,
|
|
605
|
+
disabled: opt.disabled
|
|
606
|
+
}
|
|
607
|
+
), /* @__PURE__ */ import_react3.default.createElement(
|
|
608
|
+
"label",
|
|
680
609
|
{
|
|
681
|
-
|
|
610
|
+
htmlFor: opt.value.toString(),
|
|
682
611
|
className: cn(
|
|
683
|
-
"hawa-border hawa-
|
|
684
|
-
|
|
685
|
-
"data-[state=open]:hawa-rounded-b": index === items.length - 1
|
|
686
|
-
},
|
|
687
|
-
contentclassNames
|
|
612
|
+
"hawa-inline-flex hawa-h-full hawa-w-full hawa-items-center hawa-justify-between hawa-rounded-lg hawa-border hawa-border-gray-200 hawa-bg-white hawa-p-5 hawa-text-gray-500 peer-checked:hawa-border-primary peer-checked:hawa-text-primary dark:hawa-border-gray-700 dark:hawa-bg-gray-800 dark:hawa-text-gray-400 dark:peer-checked:hawa-text-primary",
|
|
613
|
+
opt.disabled ? "hawa-opacity-50" : "hawa-cursor-pointer hover:hawa-bg-gray-100 hover:hawa-text-gray-600 dark:hover:hawa-bg-gray-700 dark:hover:hawa-text-gray-300"
|
|
688
614
|
)
|
|
689
615
|
},
|
|
690
|
-
|
|
691
|
-
)
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
);
|
|
695
|
-
Accordion.displayName = "Accordion";
|
|
696
|
-
|
|
697
|
-
// components/elements/accordion/AccordionItem.tsx
|
|
698
|
-
var React9 = __toESM(require("react"));
|
|
699
|
-
var AccordionPrimitive4 = __toESM(require("@radix-ui/react-accordion"));
|
|
700
|
-
var AccordionItem = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React9.createElement(AccordionPrimitive4.Item, { ref, className: cn(className), ...props }));
|
|
701
|
-
AccordionItem.displayName = "AccordionItem";
|
|
702
|
-
|
|
703
|
-
// components/elements/accordion/AccordionRoot.tsx
|
|
704
|
-
var AccordionPrimitive5 = __toESM(require("@radix-ui/react-accordion"));
|
|
705
|
-
|
|
706
|
-
// components/elements/logos/Logos.tsx
|
|
707
|
-
var import_react4 = __toESM(require("react"));
|
|
708
|
-
|
|
709
|
-
// components/elements/navigationMenu/NavigationMenu.tsx
|
|
710
|
-
var React11 = __toESM(require("react"));
|
|
711
|
-
var NavigationMenuPrimitive = __toESM(require("@radix-ui/react-navigation-menu"));
|
|
712
|
-
var import_class_variance_authority = require("class-variance-authority");
|
|
713
|
-
var navigationMenuTriggerStyle = (0, import_class_variance_authority.cva)(
|
|
714
|
-
"hawa-group hawa-inline-flex hawa-h-10 hawa-w-max hawa-items-center hawa-gap-1 hawa-justify-center hawa-rounded-md hawa-bg-background hawa-px-4 hawa-py-2 hawa-text-sm hawa-font-medium hawa-transition-colors hover:hawa-bg-accent hover:hawa-text-accent-foreground focus:hawa-bg-accent focus:hawa-text-accent-foreground focus:hawa-outline-none disabled:hawa-pointer-events-none disabled:hawa-opacity-50 data-[active]:hawa-bg-accent/50 "
|
|
715
|
-
);
|
|
716
|
-
var NavigationMenuRoot = React11.forwardRef(({ className, children, viewportClassNames, ...props }, ref) => /* @__PURE__ */ React11.createElement(
|
|
717
|
-
NavigationMenuPrimitive.Root,
|
|
718
|
-
{
|
|
719
|
-
ref,
|
|
720
|
-
className: cn(
|
|
721
|
-
"hawa-relative hawa-z-10 hawa-flex hawa-flex-1 hawa-items-center hawa-justify-center",
|
|
722
|
-
// "hawa-max-w-max",
|
|
723
|
-
className
|
|
724
|
-
),
|
|
725
|
-
...props
|
|
726
|
-
},
|
|
727
|
-
children,
|
|
728
|
-
/* @__PURE__ */ React11.createElement(NavigationMenuViewport, { className: viewportClassNames })
|
|
729
|
-
));
|
|
730
|
-
var NavigationMenuList = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React11.createElement(
|
|
731
|
-
NavigationMenuPrimitive.List,
|
|
732
|
-
{
|
|
733
|
-
ref,
|
|
734
|
-
className: cn(
|
|
735
|
-
"hawa-group hawa-flex hawa-flex-1 hawa-list-none hawa-items-center hawa-justify-center hawa-gap-1",
|
|
736
|
-
className
|
|
737
|
-
),
|
|
738
|
-
...props
|
|
739
|
-
}
|
|
740
|
-
));
|
|
741
|
-
var NavigationMenuTrigger = React11.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ React11.createElement(
|
|
742
|
-
NavigationMenuPrimitive.Trigger,
|
|
743
|
-
{
|
|
744
|
-
ref,
|
|
745
|
-
className: cn(navigationMenuTriggerStyle(), "hawa-group", className),
|
|
746
|
-
...props
|
|
747
|
-
},
|
|
748
|
-
children,
|
|
749
|
-
/* @__PURE__ */ React11.createElement(
|
|
750
|
-
"svg",
|
|
751
|
-
{
|
|
752
|
-
"aria-label": "Chevron Icon",
|
|
753
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
754
|
-
width: "24",
|
|
755
|
-
height: "24",
|
|
756
|
-
viewBox: "0 0 24 24",
|
|
757
|
-
fill: "none",
|
|
758
|
-
stroke: "currentColor",
|
|
759
|
-
strokeWidth: "2",
|
|
760
|
-
strokeLinecap: "round",
|
|
761
|
-
strokeLinejoin: "round",
|
|
762
|
-
"aria-hidden": "true",
|
|
763
|
-
className: "hawa-icon hawa-relative hawa-top-[1px] hawa-transition hawa-duration-200 group-data-[state=open]:hawa-rotate-180"
|
|
764
|
-
},
|
|
765
|
-
/* @__PURE__ */ React11.createElement("path", { d: "m6 9 6 6 6-6" })
|
|
766
|
-
)
|
|
767
|
-
));
|
|
768
|
-
var NavigationMenuContent = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React11.createElement(
|
|
769
|
-
NavigationMenuPrimitive.Content,
|
|
770
|
-
{
|
|
771
|
-
ref,
|
|
772
|
-
className: cn(
|
|
773
|
-
"hawa-absolute hawa-left-0 hawa-top-0 hawa-w-full hawa-rounded ",
|
|
774
|
-
// "md:hawa-absolute md:hawa-w-auto hawa-left-0 hawa-top-0 ",
|
|
775
|
-
// animation
|
|
776
|
-
"data-[motion^=from-]:hawa-animate-in data-[motion^=to-]:hawa-animate-out data-[motion^=from-]:hawa-fade-in data-[motion^=to-]:hawa-fade-out data-[motion=from-end]:hawa-slide-in-from-right-52 data-[motion=from-start]:hawa-slide-in-from-left-52 data-[motion=to-end]:hawa-slide-out-to-right-52 data-[motion=to-start]:hawa-slide-out-to-left-52",
|
|
777
|
-
className
|
|
778
|
-
),
|
|
779
|
-
...props
|
|
780
|
-
}
|
|
781
|
-
));
|
|
782
|
-
var NavigationMenuViewport = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React11.createElement(
|
|
783
|
-
"div",
|
|
784
|
-
{
|
|
785
|
-
className: cn(
|
|
786
|
-
"hawa-absolute hawa-top-full hawa-flex hawa-w-full hawa-justify-center"
|
|
787
|
-
)
|
|
788
|
-
},
|
|
789
|
-
/* @__PURE__ */ React11.createElement(
|
|
790
|
-
NavigationMenuPrimitive.Viewport,
|
|
791
|
-
{
|
|
792
|
-
className: cn(
|
|
793
|
-
"hawa-origin-top-center hawa-relative hawa-mt-1.5 hawa-w-full hawa-overflow-hidden hawa-rounded-md hawa-border hawa-bg-popover hawa-text-popover-foreground hawa-shadow-lg data-[state=open]:hawa-animate-in data-[state=closed]:hawa-animate-out data-[state=closed]:hawa-zoom-out-95 data-[state=open]:hawa-zoom-in-90 ",
|
|
794
|
-
// hawa-h-[var(--radix-navigation-menu-viewport-height)]
|
|
795
|
-
// "md:hawa-w-[var(--radix-navigation-menu-viewport-width)]",
|
|
796
|
-
className
|
|
797
|
-
),
|
|
798
|
-
style: {
|
|
799
|
-
height: "calc(var(--radix-navigation-menu-viewport-height) + 1px)"
|
|
800
|
-
},
|
|
801
|
-
ref,
|
|
802
|
-
...props
|
|
803
|
-
}
|
|
804
|
-
)
|
|
805
|
-
));
|
|
806
|
-
var NavigationMenuIndicator = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React11.createElement(
|
|
807
|
-
NavigationMenuPrimitive.Indicator,
|
|
808
|
-
{
|
|
809
|
-
ref,
|
|
810
|
-
className: cn(
|
|
811
|
-
"hawa-top-full hawa-z-[1] hawa-flex hawa-h-1.5 hawa-items-end hawa-justify-center hawa-overflow-hidden data-[state=visible]:hawa-animate-in data-[state=hidden]:hawa-animate-out data-[state=hidden]:hawa-fade-out data-[state=visible]:hawa-fade-in",
|
|
812
|
-
className
|
|
813
|
-
),
|
|
814
|
-
...props
|
|
815
|
-
},
|
|
816
|
-
/* @__PURE__ */ React11.createElement("div", { className: "hawa-relative hawa-top-[60%] hawa-h-2 hawa-w-2 hawa-rotate-45 hawa-rounded-tl-sm hawa-bg-border hawa-shadow-md" })
|
|
817
|
-
));
|
|
818
|
-
NavigationMenuContent.displayName = NavigationMenuPrimitive.Content.displayName;
|
|
819
|
-
NavigationMenuTrigger.displayName = NavigationMenuPrimitive.Trigger.displayName;
|
|
820
|
-
NavigationMenuList.displayName = NavigationMenuPrimitive.List.displayName;
|
|
821
|
-
NavigationMenuRoot.displayName = NavigationMenuPrimitive.Root.displayName;
|
|
822
|
-
NavigationMenuIndicator.displayName = NavigationMenuPrimitive.Indicator.displayName;
|
|
823
|
-
NavigationMenuViewport.displayName = NavigationMenuPrimitive.Viewport.displayName;
|
|
824
|
-
|
|
825
|
-
// components/elements/sheet/Sheet.tsx
|
|
826
|
-
var React12 = __toESM(require("react"));
|
|
827
|
-
var SheetPrimitive = __toESM(require("@radix-ui/react-dialog"));
|
|
828
|
-
var import_class_variance_authority2 = require("class-variance-authority");
|
|
829
|
-
var SheetPortal = SheetPrimitive.Portal;
|
|
830
|
-
var SheetOverlay = React12.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React12.createElement(
|
|
831
|
-
SheetPrimitive.Overlay,
|
|
832
|
-
{
|
|
833
|
-
className: cn(
|
|
834
|
-
"hawa-fixed hawa-inset-0 hawa-z-50 hawa-bg-background/80 hawa-backdrop-blur-sm data-[state=open]:hawa-animate-in data-[state=closed]:hawa-animate-out data-[state=closed]:hawa-fade-out-0 data-[state=open]:hawa-fade-in-0",
|
|
835
|
-
className
|
|
836
|
-
),
|
|
837
|
-
...props,
|
|
838
|
-
ref
|
|
839
|
-
}
|
|
840
|
-
));
|
|
841
|
-
var sheetVariants = (0, import_class_variance_authority2.cva)(
|
|
842
|
-
"hawa-fixed hawa-z-50 hawa-gap-4 hawa-bg-background hawa-p-2 hawa-shadow-lg hawa-transition hawa-ease-in-out data-[state=open]:hawa-animate-in data-[state=closed]:hawa-animate-out data-[state=closed]:hawa-duration-300 data-[state=open]:hawa-duration-300",
|
|
843
|
-
{
|
|
844
|
-
variants: {
|
|
845
|
-
side: {
|
|
846
|
-
top: "hawa-inset-x-0 hawa-top-0 hawa-border-b data-[state=closed]:hawa-slide-out-to-top data-[state=open]:hawa-slide-in-from-top",
|
|
847
|
-
bottom: "hawa-inset-x-0 hawa-bottom-0 hawa-border-t data-[state=closed]:hawa-slide-out-to-bottom data-[state=open]:hawa-slide-in-from-bottom",
|
|
848
|
-
left: "hawa-inset-y-0 hawa-left-0 hawa-h-full hawa-w-3/4 hawa-border-r data-[state=closed]:hawa-slide-out-to-left data-[state=open]:hawa-slide-in-from-left sm:hawa-max-w-sm",
|
|
849
|
-
right: "hawa-inset-y-0 hawa-right-0 hawa-h-full hawa-w-3/4 hawa-border-l data-[state=closed]:hawa-slide-out-to-right data-[state=open]:hawa-slide-in-from-right sm:hawa-max-w-sm"
|
|
850
|
-
}
|
|
851
|
-
},
|
|
852
|
-
defaultVariants: {
|
|
853
|
-
side: "right"
|
|
854
|
-
}
|
|
855
|
-
}
|
|
856
|
-
);
|
|
857
|
-
var SheetContent = React12.forwardRef(
|
|
858
|
-
({ side = "right", className, children, persist, hideCloseButton, ...props }, ref) => /* @__PURE__ */ React12.createElement(SheetPortal, null, /* @__PURE__ */ React12.createElement(SheetOverlay, null), /* @__PURE__ */ React12.createElement(
|
|
859
|
-
SheetPrimitive.Content,
|
|
860
|
-
{
|
|
861
|
-
ref,
|
|
862
|
-
className: cn(sheetVariants({ side }), className),
|
|
863
|
-
onPointerDownOutside: (e) => {
|
|
864
|
-
if (persist) {
|
|
865
|
-
e.preventDefault();
|
|
866
|
-
}
|
|
867
|
-
},
|
|
868
|
-
...props
|
|
869
|
-
},
|
|
870
|
-
children,
|
|
871
|
-
!hideCloseButton && /* @__PURE__ */ React12.createElement(
|
|
872
|
-
SheetPrimitive.Close,
|
|
873
|
-
{
|
|
874
|
-
className: cn(
|
|
875
|
-
"hawa-absolute hawa-rounded-sm hawa-opacity-70 hawa-ring-offset-background hawa-transition-opacity hover:hawa-opacity-100 focus:hawa-outline-none focus:hawa-ring-2 focus:hawa-ring-ring focus:hawa-ring-offset-2 disabled:hawa-pointer-events-none data-[state=open]:hawa-bg-secondary",
|
|
876
|
-
{
|
|
877
|
-
"hawa-right-4 hawa-top-4": side === "left" || side === "bottom",
|
|
878
|
-
"hawa-left-4 hawa-top-4": side === "right",
|
|
879
|
-
"hawa-bottom-4 hawa-right-4": side === "top"
|
|
880
|
-
}
|
|
881
|
-
)
|
|
882
|
-
},
|
|
883
|
-
/* @__PURE__ */ React12.createElement(
|
|
884
|
-
"svg",
|
|
885
|
-
{
|
|
886
|
-
"aria-label": "Close Icon",
|
|
887
|
-
"aria-hidden": "true",
|
|
888
|
-
className: "hawa-h-5 hawa-w-5",
|
|
889
|
-
fill: "currentColor",
|
|
890
|
-
viewBox: "0 0 20 20"
|
|
891
|
-
},
|
|
892
|
-
/* @__PURE__ */ React12.createElement(
|
|
893
|
-
"path",
|
|
894
|
-
{
|
|
895
|
-
fillRule: "evenodd",
|
|
896
|
-
d: "M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",
|
|
897
|
-
clipRule: "evenodd"
|
|
898
|
-
}
|
|
899
|
-
)
|
|
900
|
-
),
|
|
901
|
-
/* @__PURE__ */ React12.createElement("span", { className: "hawa-sr-only" }, "Close")
|
|
902
|
-
)
|
|
903
|
-
))
|
|
904
|
-
);
|
|
905
|
-
var SheetHeader = ({
|
|
906
|
-
className,
|
|
907
|
-
...props
|
|
908
|
-
}) => /* @__PURE__ */ React12.createElement(
|
|
909
|
-
"div",
|
|
910
|
-
{
|
|
911
|
-
className: cn(
|
|
912
|
-
"hawa-flex hawa-flex-col hawa-space-y-2 hawa-text-center sm:hawa-text-left",
|
|
913
|
-
className
|
|
914
|
-
),
|
|
915
|
-
...props
|
|
916
|
-
}
|
|
917
|
-
);
|
|
918
|
-
var SheetFooter = ({
|
|
919
|
-
className,
|
|
920
|
-
...props
|
|
921
|
-
}) => /* @__PURE__ */ React12.createElement(
|
|
922
|
-
"div",
|
|
923
|
-
{
|
|
924
|
-
className: cn(
|
|
925
|
-
"hawa-flex hawa-flex-col-reverse sm:hawa-flex-row sm:hawa-justify-end sm:hawa-space-x-2",
|
|
926
|
-
className
|
|
927
|
-
),
|
|
928
|
-
...props
|
|
929
|
-
}
|
|
930
|
-
);
|
|
931
|
-
var SheetTitle = React12.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React12.createElement(
|
|
932
|
-
SheetPrimitive.Title,
|
|
933
|
-
{
|
|
934
|
-
ref,
|
|
935
|
-
className: cn(
|
|
936
|
-
"hawa-text-lg hawa-font-semibold hawa-text-foreground",
|
|
937
|
-
className
|
|
938
|
-
),
|
|
939
|
-
...props
|
|
940
|
-
}
|
|
941
|
-
));
|
|
942
|
-
var SheetDescription = React12.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React12.createElement(
|
|
943
|
-
SheetPrimitive.Description,
|
|
944
|
-
{
|
|
945
|
-
ref,
|
|
946
|
-
className: cn("hawa-text-sm hawa-text-muted-foreground", className),
|
|
947
|
-
...props
|
|
948
|
-
}
|
|
949
|
-
));
|
|
950
|
-
SheetDescription.displayName = SheetPrimitive.Description.displayName;
|
|
951
|
-
SheetOverlay.displayName = SheetPrimitive.Overlay.displayName;
|
|
952
|
-
SheetContent.displayName = SheetPrimitive.Content.displayName;
|
|
953
|
-
SheetHeader.displayName = "SheetHeader";
|
|
954
|
-
SheetFooter.displayName = "SheetFooter";
|
|
955
|
-
SheetTitle.displayName = SheetPrimitive.Title.displayName;
|
|
956
|
-
|
|
957
|
-
// components/elements/dialog/Dialog.tsx
|
|
958
|
-
var React13 = __toESM(require("react"));
|
|
959
|
-
var DialogPrimitive = __toESM(require("@radix-ui/react-dialog"));
|
|
960
|
-
var DialogPortal = ({ ...props }) => /* @__PURE__ */ React13.createElement(DialogPrimitive.Portal, { ...props });
|
|
961
|
-
var DialogOverlay = React13.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React13.createElement(
|
|
962
|
-
DialogPrimitive.Overlay,
|
|
963
|
-
{
|
|
964
|
-
ref,
|
|
965
|
-
className: cn(
|
|
966
|
-
"hawa-fixed hawa-inset-0 hawa-z-50 hawa-bg-background/80 hawa-backdrop-blur-sm data-[state=open]:hawa-animate-in data-[state=closed]:hawa-animate-out data-[state=closed]:hawa-fade-out-0 data-[state=open]:hawa-fade-in-0",
|
|
967
|
-
className
|
|
968
|
-
),
|
|
969
|
-
...props
|
|
970
|
-
}
|
|
971
|
-
));
|
|
972
|
-
var DialogContent = React13.forwardRef(({ className, children, persist, hideCloseButton, ...props }, ref) => /* @__PURE__ */ React13.createElement(DialogPortal, null, /* @__PURE__ */ React13.createElement(DialogOverlay, null), /* @__PURE__ */ React13.createElement(
|
|
973
|
-
DialogPrimitive.Content,
|
|
974
|
-
{
|
|
975
|
-
onPointerDownOutside: (e) => {
|
|
976
|
-
if (persist) {
|
|
977
|
-
e.preventDefault();
|
|
978
|
-
}
|
|
979
|
-
},
|
|
980
|
-
ref,
|
|
981
|
-
className: cn(
|
|
982
|
-
"hawa-fixed hawa-left-[50%] hawa-top-[50%] hawa-z-50 hawa-grid hawa-w-full hawa-max-w-lg hawa-translate-x-[-50%] hawa-translate-y-[-50%] hawa-gap-4 hawa-border hawa-bg-background hawa-p-6 hawa-shadow-lg hawa-transition-all hawa-duration-200 data-[state=open]:hawa-animate-in data-[state=closed]:hawa-animate-out data-[state=closed]:hawa-fade-out-0 data-[state=open]:hawa-fade-in-0 data-[state=closed]:hawa-zoom-out-95 data-[state=open]:hawa-zoom-in-95 data-[state=closed]:hawa-slide-out-to-left-1/2 data-[state=closed]:hawa-slide-out-to-top-[48%] data-[state=open]:hawa-slide-in-from-left-1/2 data-[state=open]:hawa-slide-in-from-top-[48%] sm:hawa-rounded md:hawa-w-full",
|
|
983
|
-
className
|
|
984
|
-
),
|
|
985
|
-
...props
|
|
986
|
-
},
|
|
987
|
-
children,
|
|
988
|
-
!hideCloseButton && /* @__PURE__ */ React13.createElement(
|
|
989
|
-
DialogPrimitive.Close,
|
|
990
|
-
{
|
|
991
|
-
className: cn(
|
|
992
|
-
"hawa-absolute hawa-top-4 hawa-rounded hawa-opacity-70 hawa-ring-offset-background hawa-transition-opacity hover:hawa-opacity-100 focus:hawa-outline-none focus:hawa-ring-2 focus:hawa-ring-ring focus:hawa-ring-offset-2 disabled:hawa-pointer-events-none data-[state=open]:hawa-bg-accent data-[state=open]:hawa-text-muted-foreground",
|
|
993
|
-
props.dir === "rtl" ? " hawa-left-4" : " hawa-right-4"
|
|
994
|
-
)
|
|
995
|
-
},
|
|
996
|
-
/* @__PURE__ */ React13.createElement(
|
|
997
|
-
"svg",
|
|
998
|
-
{
|
|
999
|
-
"aria-label": "Close Icon",
|
|
1000
|
-
"aria-hidden": "true",
|
|
1001
|
-
className: "hawa-h-5 hawa-w-5",
|
|
1002
|
-
fill: "currentColor",
|
|
1003
|
-
viewBox: "0 0 20 20"
|
|
1004
|
-
},
|
|
1005
|
-
/* @__PURE__ */ React13.createElement(
|
|
1006
|
-
"path",
|
|
1007
|
-
{
|
|
1008
|
-
fillRule: "evenodd",
|
|
1009
|
-
d: "M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",
|
|
1010
|
-
clipRule: "evenodd"
|
|
1011
|
-
}
|
|
1012
|
-
)
|
|
1013
|
-
),
|
|
1014
|
-
/* @__PURE__ */ React13.createElement("span", { className: "hawa-sr-only" }, "Close")
|
|
1015
|
-
)
|
|
1016
|
-
)));
|
|
1017
|
-
var DialogCarouselContent = React13.forwardRef(
|
|
1018
|
-
({
|
|
1019
|
-
className,
|
|
1020
|
-
children,
|
|
1021
|
-
onPrev,
|
|
1022
|
-
persist,
|
|
1023
|
-
hideCloseButton,
|
|
1024
|
-
hidePrevButton,
|
|
1025
|
-
...props
|
|
1026
|
-
}, ref) => /* @__PURE__ */ React13.createElement(DialogPortal, null, /* @__PURE__ */ React13.createElement(DialogOverlay, null), /* @__PURE__ */ React13.createElement(
|
|
1027
|
-
DialogPrimitive.Content,
|
|
1028
|
-
{
|
|
1029
|
-
onPointerDownOutside: (e) => {
|
|
1030
|
-
if (persist) {
|
|
1031
|
-
e.preventDefault();
|
|
1032
|
-
}
|
|
1033
|
-
},
|
|
1034
|
-
ref,
|
|
1035
|
-
className: cn(
|
|
1036
|
-
"hawa-fixed hawa-left-[50%] hawa-top-[50%] hawa-z-50 hawa-grid hawa-w-full hawa-max-w-lg hawa-translate-x-[-50%] hawa-translate-y-[-50%] hawa-gap-4 hawa-border hawa-bg-background hawa-p-6 hawa-pt-14 hawa-shadow-lg hawa-transition-all hawa-duration-200 data-[state=open]:hawa-animate-in data-[state=closed]:hawa-animate-out data-[state=closed]:hawa-fade-out-0 data-[state=open]:hawa-fade-in-0 data-[state=closed]:hawa-zoom-out-95 data-[state=open]:hawa-zoom-in-95 data-[state=closed]:hawa-slide-out-to-left-1/2 data-[state=closed]:hawa-slide-out-to-top-[48%] data-[state=open]:hawa-slide-in-from-left-1/2 data-[state=open]:hawa-slide-in-from-top-[48%] sm:hawa-rounded md:hawa-w-full",
|
|
1037
|
-
className
|
|
1038
|
-
),
|
|
1039
|
-
...props
|
|
1040
|
-
},
|
|
1041
|
-
children,
|
|
1042
|
-
/* @__PURE__ */ React13.createElement(
|
|
1043
|
-
"div",
|
|
1044
|
-
{
|
|
1045
|
-
className: cn(
|
|
1046
|
-
"hawa-absolute hawa-top-0 hawa-flex hawa-w-full hawa-flex-row hawa-p-4",
|
|
1047
|
-
onPrev ? "hawa-justify-between" : "hawa-justify-end"
|
|
1048
|
-
)
|
|
1049
|
-
},
|
|
1050
|
-
hidePrevButton ? /* @__PURE__ */ React13.createElement("div", null) : /* @__PURE__ */ React13.createElement(
|
|
616
|
+
/* @__PURE__ */ import_react3.default.createElement("div", { className: "hawa-block hawa-h-full hawa-w-full" }, /* @__PURE__ */ import_react3.default.createElement("div", { className: "hawa-w-full hawa-text-lg hawa-font-semibold" }, opt.label), /* @__PURE__ */ import_react3.default.createElement("div", { className: "hawa-w-full" }, opt.sublabel))
|
|
617
|
+
))));
|
|
618
|
+
default:
|
|
619
|
+
return /* @__PURE__ */ import_react3.default.createElement("div", { className: "hawa-flex hawa-flex-col hawa-gap-2" }, props.label && /* @__PURE__ */ import_react3.default.createElement(Label, { ...labelProps }, props.label), /* @__PURE__ */ import_react3.default.createElement("div", { className: cn(orientationStyle[orientation], "hawa-gap-2") }, props.options && props.options.map((opt, i) => /* @__PURE__ */ import_react3.default.createElement(
|
|
1051
620
|
"div",
|
|
1052
621
|
{
|
|
1053
|
-
onClick: onPrev,
|
|
1054
622
|
className: cn(
|
|
1055
|
-
"
|
|
1056
|
-
props.
|
|
1057
|
-
)
|
|
623
|
+
"radio-item radio-item-default hawa-flex hawa-items-center hawa-transition-all",
|
|
624
|
+
props.direction === "rtl" ? "margin-left right-3px" : "margin-right left-3px"
|
|
625
|
+
),
|
|
626
|
+
key: i + 1
|
|
1058
627
|
},
|
|
1059
|
-
/* @__PURE__ */
|
|
1060
|
-
"
|
|
628
|
+
/* @__PURE__ */ import_react3.default.createElement(
|
|
629
|
+
"input",
|
|
1061
630
|
{
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
631
|
+
disabled: opt.disabled,
|
|
632
|
+
id: opt.value.toString(),
|
|
633
|
+
type: "radio",
|
|
634
|
+
value: opt.value,
|
|
635
|
+
name: "default-radio",
|
|
636
|
+
onChange: () => {
|
|
637
|
+
setSelectedOption(opt.value);
|
|
638
|
+
if (props.onChangeTab) {
|
|
639
|
+
props.onChangeTab(opt);
|
|
640
|
+
} else {
|
|
641
|
+
console.log("onChangeTab was not provided");
|
|
642
|
+
}
|
|
643
|
+
}
|
|
644
|
+
}
|
|
645
|
+
),
|
|
646
|
+
/* @__PURE__ */ import_react3.default.createElement(
|
|
647
|
+
"label",
|
|
648
|
+
{
|
|
649
|
+
htmlFor: opt.value.toString(),
|
|
650
|
+
className: cn(
|
|
651
|
+
"hawa-text-sm hawa-font-medium dark:hawa-text-white",
|
|
652
|
+
opt.disabled ? "hawa-text-gray-400" : "hawa-cursor-pointer hawa-text-gray-900"
|
|
653
|
+
)
|
|
1072
654
|
},
|
|
1073
|
-
|
|
655
|
+
opt.label
|
|
1074
656
|
)
|
|
1075
|
-
),
|
|
1076
|
-
|
|
1077
|
-
DialogPrimitive.Close,
|
|
657
|
+
))), /* @__PURE__ */ import_react3.default.createElement(
|
|
658
|
+
"p",
|
|
1078
659
|
{
|
|
1079
660
|
className: cn(
|
|
1080
|
-
"hawa-
|
|
1081
|
-
props.
|
|
661
|
+
"hawa-my-0 hawa-text-start hawa-text-xs hawa-text-helper-color hawa-transition-all",
|
|
662
|
+
props.helperText ? "hawa-h-4 hawa-opacity-100" : "hawa-h-0 hawa-opacity-0"
|
|
1082
663
|
)
|
|
1083
664
|
},
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
{
|
|
1087
|
-
"aria-label": "Close Icon",
|
|
1088
|
-
"aria-hidden": "true",
|
|
1089
|
-
className: "hawa-h-6 hawa-w-6",
|
|
1090
|
-
fill: "currentColor",
|
|
1091
|
-
viewBox: "0 0 20 20"
|
|
1092
|
-
},
|
|
1093
|
-
/* @__PURE__ */ React13.createElement(
|
|
1094
|
-
"path",
|
|
1095
|
-
{
|
|
1096
|
-
fillRule: "evenodd",
|
|
1097
|
-
d: "M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",
|
|
1098
|
-
clipRule: "evenodd"
|
|
1099
|
-
}
|
|
1100
|
-
)
|
|
1101
|
-
),
|
|
1102
|
-
/* @__PURE__ */ React13.createElement("span", { className: "hawa-sr-only" }, "Close")
|
|
1103
|
-
)
|
|
1104
|
-
)
|
|
1105
|
-
))
|
|
1106
|
-
);
|
|
1107
|
-
var DialogHeader = ({
|
|
1108
|
-
className,
|
|
1109
|
-
...props
|
|
1110
|
-
}) => /* @__PURE__ */ React13.createElement(
|
|
1111
|
-
"div",
|
|
1112
|
-
{
|
|
1113
|
-
className: cn(
|
|
1114
|
-
"hawa-flex hawa-flex-col hawa-space-y-1.5 hawa-text-center sm:hawa-text-left",
|
|
1115
|
-
className
|
|
1116
|
-
),
|
|
1117
|
-
...props
|
|
1118
|
-
}
|
|
1119
|
-
);
|
|
1120
|
-
var DialogTitle = React13.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React13.createElement(
|
|
1121
|
-
DialogPrimitive.Title,
|
|
1122
|
-
{
|
|
1123
|
-
ref,
|
|
1124
|
-
className: cn(
|
|
1125
|
-
"hawa-text-start hawa-text-lg hawa-font-semibold hawa-leading-none hawa-tracking-tight",
|
|
1126
|
-
className
|
|
1127
|
-
),
|
|
1128
|
-
...props
|
|
1129
|
-
}
|
|
1130
|
-
));
|
|
1131
|
-
var DialogDescription = React13.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React13.createElement(
|
|
1132
|
-
DialogPrimitive.Description,
|
|
1133
|
-
{
|
|
1134
|
-
ref,
|
|
1135
|
-
className: cn(
|
|
1136
|
-
"hawa-text-start hawa-text-sm hawa-text-muted-foreground",
|
|
1137
|
-
className
|
|
1138
|
-
),
|
|
1139
|
-
...props
|
|
665
|
+
props.helperText
|
|
666
|
+
));
|
|
1140
667
|
}
|
|
1141
|
-
));
|
|
1142
|
-
var DialogFooter = ({
|
|
1143
|
-
className,
|
|
1144
|
-
...props
|
|
1145
|
-
}) => /* @__PURE__ */ React13.createElement(
|
|
1146
|
-
"div",
|
|
1147
|
-
{
|
|
1148
|
-
className: cn(
|
|
1149
|
-
"hawa-flex hawa-flex-col-reverse sm:hawa-flex-row sm:hawa-justify-end sm:hawa-gap-2",
|
|
1150
|
-
className
|
|
1151
|
-
),
|
|
1152
|
-
...props
|
|
1153
|
-
}
|
|
1154
|
-
);
|
|
1155
|
-
var DialogCarousel = ({
|
|
1156
|
-
stepsApi,
|
|
1157
|
-
stepsRef,
|
|
1158
|
-
children,
|
|
1159
|
-
direction
|
|
1160
|
-
}) => {
|
|
1161
|
-
React13.useEffect(() => {
|
|
1162
|
-
if (stepsApi) {
|
|
1163
|
-
stepsApi.reInit();
|
|
1164
|
-
}
|
|
1165
|
-
}, [stepsApi, children]);
|
|
1166
|
-
return /* @__PURE__ */ React13.createElement("div", { className: "hawa-overflow-hidden" }, /* @__PURE__ */ React13.createElement("div", { ref: stepsRef, dir: direction }, /* @__PURE__ */ React13.createElement(
|
|
1167
|
-
"div",
|
|
1168
|
-
{
|
|
1169
|
-
className: "hawa-flex",
|
|
1170
|
-
style: {
|
|
1171
|
-
transition: "height 0.2s"
|
|
1172
|
-
}
|
|
1173
|
-
},
|
|
1174
|
-
React13.Children.map(children, (child, index) => /* @__PURE__ */ React13.createElement(
|
|
1175
|
-
"div",
|
|
1176
|
-
{
|
|
1177
|
-
className: cn(
|
|
1178
|
-
"hawa-flex hawa-h-fit hawa-flex-[0_0_100%] hawa-items-center hawa-justify-center"
|
|
1179
|
-
),
|
|
1180
|
-
key: index
|
|
1181
|
-
},
|
|
1182
|
-
child
|
|
1183
|
-
))
|
|
1184
|
-
)));
|
|
1185
|
-
};
|
|
1186
|
-
var DialogSteps = ({
|
|
1187
|
-
currentStep,
|
|
1188
|
-
visibleStepRef,
|
|
1189
|
-
children
|
|
1190
|
-
}) => {
|
|
1191
|
-
const [dialogHeight, setDialogHeight] = React13.useState(null);
|
|
1192
|
-
React13.useEffect(() => {
|
|
1193
|
-
if (visibleStepRef.current) {
|
|
1194
|
-
setDialogHeight(visibleStepRef.current.offsetHeight);
|
|
1195
|
-
console.log("height is ", visibleStepRef.current.offsetHeight);
|
|
1196
|
-
}
|
|
1197
|
-
}, [currentStep, visibleStepRef]);
|
|
1198
|
-
return /* @__PURE__ */ React13.createElement(
|
|
1199
|
-
"div",
|
|
1200
|
-
{
|
|
1201
|
-
className: "hawa-relative hawa-overflow-clip",
|
|
1202
|
-
style: {
|
|
1203
|
-
height: dialogHeight || "fit-content",
|
|
1204
|
-
transition: "height 0.2s"
|
|
1205
|
-
}
|
|
1206
|
-
},
|
|
1207
|
-
React13.Children.map(children, (child, index) => /* @__PURE__ */ React13.createElement(
|
|
1208
|
-
"div",
|
|
1209
|
-
{
|
|
1210
|
-
ref: currentStep === `step-${index + 1}` ? visibleStepRef : null,
|
|
1211
|
-
className: cn(
|
|
1212
|
-
currentStep === `step-${index + 1}` ? "hawa-visible hawa-block" : "hawa-invisible hawa-hidden"
|
|
1213
|
-
)
|
|
1214
|
-
},
|
|
1215
|
-
child
|
|
1216
|
-
))
|
|
1217
|
-
);
|
|
1218
|
-
};
|
|
1219
|
-
var DialogStep = ({
|
|
1220
|
-
id,
|
|
1221
|
-
children,
|
|
1222
|
-
className,
|
|
1223
|
-
stepRef
|
|
1224
|
-
}) => {
|
|
1225
|
-
return /* @__PURE__ */ React13.createElement(
|
|
1226
|
-
"div",
|
|
1227
|
-
{
|
|
1228
|
-
id,
|
|
1229
|
-
ref: stepRef,
|
|
1230
|
-
className: cn("hawa-w-full hawa-px-1", className)
|
|
1231
|
-
},
|
|
1232
|
-
children
|
|
1233
|
-
);
|
|
1234
668
|
};
|
|
1235
|
-
var DialogBody = ({ children, className }) => {
|
|
1236
|
-
return /* @__PURE__ */ React13.createElement("div", { className: cn("hawa-py-6", className) }, children);
|
|
1237
|
-
};
|
|
1238
|
-
DialogBody.displayName = "DialogBody";
|
|
1239
|
-
DialogStep.displayName = "DialogStep";
|
|
1240
|
-
DialogSteps.displayName = "DialogSteps";
|
|
1241
|
-
DialogCarousel.displayName = "DialogCarousel";
|
|
1242
|
-
DialogCarouselContent.displayName = "DialogCarouselContent";
|
|
1243
|
-
DialogHeader.displayName = "DialogHeader";
|
|
1244
|
-
DialogFooter.displayName = "DialogFooter";
|
|
1245
|
-
DialogTitle.displayName = DialogPrimitive.Title.displayName;
|
|
1246
|
-
DialogPortal.displayName = DialogPrimitive.Portal.displayName;
|
|
1247
|
-
DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
|
|
1248
|
-
DialogContent.displayName = DialogPrimitive.Content.displayName;
|
|
1249
|
-
DialogDescription.displayName = DialogPrimitive.Description.displayName;
|
|
1250
|
-
|
|
1251
|
-
// components/elements/alert/Alert.tsx
|
|
1252
|
-
var import_react5 = __toESM(require("react"));
|
|
1253
669
|
|
|
1254
|
-
// components/elements/
|
|
1255
|
-
var
|
|
1256
|
-
var
|
|
1257
|
-
var buttonVariants = (0, import_class_variance_authority3.cva)(
|
|
1258
|
-
"hawa-inline-flex hawa-items-center hawa-select-none hawa-rounded-md hawa-text-sm hawa-font-medium hawa-ring-offset-background hawa-transition-colors focus-visible:hawa-outline-none focus-visible:hawa-ring-2 focus-visible:hawa-ring-ring focus-visible:hawa-ring-offset-2 disabled:hawa-pointer-events-none disabled:hawa-opacity-50",
|
|
1259
|
-
{
|
|
1260
|
-
variants: {
|
|
1261
|
-
variant: {
|
|
1262
|
-
default: "hawa-bg-primary hawa-text-primary-foreground hover:hawa-bg-primary/90",
|
|
1263
|
-
light: "hawa-bg-primary/20 hawa-text-primary hover:hawa-bg-primary/40",
|
|
1264
|
-
destructive: "hawa-bg-destructive hawa-text-destructive-foreground hover:hawa-bg-destructive/90",
|
|
1265
|
-
outline: "hawa-border hawa-border-input hawa-bg-transparent hover:hawa-bg-accent hover:hawa-text-accent-foreground",
|
|
1266
|
-
secondary: "hawa-bg-secondary hawa-text-secondary-foreground hover:hawa-bg-secondary/80",
|
|
1267
|
-
ghost: "hover:hawa-bg-accent hover:hawa-text-accent-foreground",
|
|
1268
|
-
link: "hawa-text-primary hawa-underline-offset-4 hover:hawa-underline",
|
|
1269
|
-
combobox: "hawa-bg-background hawa-border",
|
|
1270
|
-
neoBrutalism: "neo-brutalism"
|
|
1271
|
-
// "hawa-cursor-pointer hawa-transition-all hawa-uppercase hawa-font-mono dark:hawa-bg-black hawa-font-bold hawa-py-2 hawa-px-4 hawa-rounded hawa-border-2 hawa-border-primary hawa-shadow-color-primary hawa-transition-[hawa-transform_50ms, hawa-box-shadow_50ms] active:hawa-translate-x-0.5 active:hawa-translate-y-0.5 active:hawa-shadow-color-primary-active shadow-color-primary active:shadow-color-primary-active",
|
|
1272
|
-
},
|
|
1273
|
-
size: {
|
|
1274
|
-
default: "hawa-h-10 hawa-px-4 hawa-py-2",
|
|
1275
|
-
heightless: "hawa-px-4 hawa-py-4",
|
|
1276
|
-
xs: "hawa-h-fit hawa-min-h-[25px] hawa-py-1 hawa-text-[10px] hawa-px-2 ",
|
|
1277
|
-
sm: "hawa-h-9 hawa-text-[11px] hawa-rounded-md hawa-px-3",
|
|
1278
|
-
lg: "hawa-h-11 hawa-rounded-md hawa-px-8",
|
|
1279
|
-
xl: "hawa-h-14 hawa-rounded-md hawa-px-10",
|
|
1280
|
-
icon: "hawa-h-10 hawa-w-10",
|
|
1281
|
-
smallIcon: "hawa-h-7 hawa-w-7"
|
|
1282
|
-
}
|
|
1283
|
-
},
|
|
1284
|
-
defaultVariants: {
|
|
1285
|
-
variant: "default",
|
|
1286
|
-
size: "default"
|
|
1287
|
-
}
|
|
1288
|
-
}
|
|
1289
|
-
);
|
|
1290
|
-
var Button = React14.forwardRef(
|
|
670
|
+
// components/elements/textarea/Textarea.tsx
|
|
671
|
+
var React7 = __toESM(require("react"));
|
|
672
|
+
var Textarea = React7.forwardRef(
|
|
1291
673
|
({
|
|
1292
674
|
className,
|
|
1293
|
-
variant,
|
|
1294
|
-
size,
|
|
1295
|
-
asChild = false,
|
|
1296
|
-
centered = true,
|
|
1297
|
-
isLoading,
|
|
1298
|
-
children,
|
|
1299
|
-
...props
|
|
1300
|
-
}, ref) => {
|
|
1301
|
-
const Comp = "button";
|
|
1302
|
-
const loadingColor = variant === "outline" || variant === "ghost" || variant === "neoBrutalism" ? "hawa-bg-primary" : "hawa-bg-primary-foreground";
|
|
1303
|
-
return /* @__PURE__ */ React14.createElement(
|
|
1304
|
-
Comp,
|
|
1305
|
-
{
|
|
1306
|
-
className: cn(
|
|
1307
|
-
buttonVariants({ variant, size, className }),
|
|
1308
|
-
centered && "hawa-justify-center"
|
|
1309
|
-
),
|
|
1310
|
-
ref,
|
|
1311
|
-
...props
|
|
1312
|
-
},
|
|
1313
|
-
isLoading ? /* @__PURE__ */ React14.createElement(
|
|
1314
|
-
Loading,
|
|
1315
|
-
{
|
|
1316
|
-
design: size === "icon" || size === "smallIcon" ? "spinner" : "dots-pulse",
|
|
1317
|
-
themeMode: variant === "outline" ? "light" : "dark",
|
|
1318
|
-
color: loadingColor,
|
|
1319
|
-
size: size === "sm" || size === "xs" ? "xs" : "button"
|
|
1320
|
-
}
|
|
1321
|
-
) : children
|
|
1322
|
-
);
|
|
1323
|
-
}
|
|
1324
|
-
);
|
|
1325
|
-
Button.displayName = "Button";
|
|
1326
|
-
|
|
1327
|
-
// components/elements/avatar/Avatar.tsx
|
|
1328
|
-
var import_react7 = __toESM(require("react"));
|
|
1329
|
-
|
|
1330
|
-
// components/elements/FileUploader.tsx
|
|
1331
|
-
var import_react6 = __toESM(require("react"));
|
|
1332
|
-
|
|
1333
|
-
// components/elements/dataTable/DataTable.tsx
|
|
1334
|
-
var React21 = __toESM(require("react"));
|
|
1335
|
-
var import_react_table = require("@tanstack/react-table");
|
|
1336
|
-
|
|
1337
|
-
// components/elements/input/Input.tsx
|
|
1338
|
-
var import_react8 = __toESM(require("react"));
|
|
1339
|
-
|
|
1340
|
-
// components/elements/label/Label.tsx
|
|
1341
|
-
var React18 = __toESM(require("react"));
|
|
1342
|
-
var Label2 = React18.forwardRef(({ className, hint, hintSide, required, children, ...props }, ref) => /* @__PURE__ */ React18.createElement("div", { className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-1 hawa-transition-all" }, /* @__PURE__ */ React18.createElement(
|
|
1343
|
-
"label",
|
|
1344
|
-
{
|
|
1345
|
-
ref,
|
|
1346
|
-
className: cn(
|
|
1347
|
-
"hawa-text-sm hawa-font-medium hawa-leading-none peer-disabled:hawa-cursor-not-allowed peer-disabled:hawa-opacity-70",
|
|
1348
|
-
className
|
|
1349
|
-
),
|
|
1350
|
-
...props
|
|
1351
|
-
},
|
|
1352
|
-
children,
|
|
1353
|
-
required && /* @__PURE__ */ React18.createElement("span", { className: "hawa-mx-0.5 hawa-text-red-500" }, "*")
|
|
1354
|
-
), hint && /* @__PURE__ */ React18.createElement(Tooltip, { content: hint, side: hintSide }, /* @__PURE__ */ React18.createElement(
|
|
1355
|
-
"svg",
|
|
1356
|
-
{
|
|
1357
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
1358
|
-
className: "hawa-h-[14px] hawa-w-[14px] hawa-cursor-help",
|
|
1359
|
-
viewBox: "0 0 24 24",
|
|
1360
|
-
fill: "none",
|
|
1361
|
-
stroke: "currentColor",
|
|
1362
|
-
strokeWidth: "2",
|
|
1363
|
-
strokeLinecap: "round",
|
|
1364
|
-
strokeLinejoin: "round"
|
|
1365
|
-
},
|
|
1366
|
-
/* @__PURE__ */ React18.createElement("circle", { cx: "12", cy: "12", r: "10" }),
|
|
1367
|
-
/* @__PURE__ */ React18.createElement("path", { d: "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3" }),
|
|
1368
|
-
/* @__PURE__ */ React18.createElement("path", { d: "M12 17h.01" })
|
|
1369
|
-
))));
|
|
1370
|
-
Label2.displayName = "Label";
|
|
1371
|
-
|
|
1372
|
-
// components/elements/input/Input.tsx
|
|
1373
|
-
var Input = (0, import_react8.forwardRef)(
|
|
1374
|
-
({
|
|
1375
|
-
margin = "none",
|
|
1376
|
-
width = "full",
|
|
1377
|
-
preview = false,
|
|
1378
|
-
forceHideHelperText = false,
|
|
1379
675
|
labelProps,
|
|
1380
|
-
placeholder,
|
|
1381
676
|
showCount,
|
|
1382
|
-
|
|
677
|
+
forceHideHelperText,
|
|
678
|
+
textareaProps,
|
|
1383
679
|
countPosition = "bottom",
|
|
1384
|
-
...props
|
|
1385
|
-
}, ref) => {
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
none: "hawa-mb-0",
|
|
1389
|
-
normal: "hawa-mb-3",
|
|
1390
|
-
large: "hawa-mb-5"
|
|
1391
|
-
};
|
|
1392
|
-
let widthStyles = {
|
|
1393
|
-
small: "hawa-w-full hawa-max-w-2xs",
|
|
1394
|
-
normal: "hawa-w-1/2",
|
|
1395
|
-
full: "hawa-w-full",
|
|
1396
|
-
auto: ""
|
|
1397
|
-
};
|
|
1398
|
-
let defaultStyle = "hawa-flex hawa-max-h-fit hawa-h-fit hawa-relative hawa-flex-col hawa-justify-center hawa-gap-0";
|
|
1399
|
-
let defaultInputStyle = "hawa-block hawa-w-full hawa-rounded hawa-border hawa-transition-all hawa-bg-background hawa-p-3 hawa-text-sm ";
|
|
1400
|
-
return /* @__PURE__ */ import_react8.default.createElement(
|
|
1401
|
-
"div",
|
|
1402
|
-
{
|
|
1403
|
-
className: cn(
|
|
1404
|
-
defaultStyle,
|
|
1405
|
-
marginStyles[margin],
|
|
1406
|
-
widthStyles[width],
|
|
1407
|
-
props.containerClassName,
|
|
1408
|
-
"hawa-w-full hawa-gap-2"
|
|
1409
|
-
)
|
|
1410
|
-
},
|
|
1411
|
-
props.label && /* @__PURE__ */ import_react8.default.createElement(Label2, { ...labelProps }, props.label),
|
|
1412
|
-
props.isLoading ? /* @__PURE__ */ import_react8.default.createElement("div", { className: "hawa-pb-2" }, /* @__PURE__ */ import_react8.default.createElement(Skeleton, { className: "hawa-h-[40px] hawa-w-full" })) : /* @__PURE__ */ import_react8.default.createElement(import_react8.default.Fragment, null, !props.hideSeparator && /* @__PURE__ */ import_react8.default.createElement(
|
|
1413
|
-
"div",
|
|
1414
|
-
{
|
|
1415
|
-
className: cn(
|
|
1416
|
-
"hawa-absolute hawa-top-[22px] hawa-h-[0.8px] hawa-w-full hawa-bg-gray-200 hawa-transition-all dark:hawa-bg-gray-800",
|
|
1417
|
-
preview ? "hawa-opacity-100" : "hawa-opacity-0"
|
|
1418
|
-
)
|
|
1419
|
-
}
|
|
1420
|
-
), /* @__PURE__ */ import_react8.default.createElement(import_react8.default.Fragment, null, /* @__PURE__ */ import_react8.default.createElement("div", { className: "hawa-relative" }, props.startIcon && /* @__PURE__ */ import_react8.default.createElement("div", { className: "hawa-absolute hawa-start-3 hawa-top-1/2 hawa--translate-y-1/2" }, props.startIcon), props.endIcon && /* @__PURE__ */ import_react8.default.createElement(
|
|
1421
|
-
"div",
|
|
1422
|
-
{
|
|
1423
|
-
className: cn(
|
|
1424
|
-
"hawa-absolute hawa-end-3 hawa-top-1/2 hawa--translate-y-1/2",
|
|
1425
|
-
(_a = props.endIconProps) == null ? void 0 : _a.className
|
|
1426
|
-
)
|
|
1427
|
-
},
|
|
1428
|
-
props.endIcon
|
|
1429
|
-
), /* @__PURE__ */ import_react8.default.createElement(
|
|
1430
|
-
"input",
|
|
1431
|
-
{
|
|
1432
|
-
required: true,
|
|
1433
|
-
dir: props.dir,
|
|
1434
|
-
type: props.type,
|
|
1435
|
-
value: props.value,
|
|
1436
|
-
onChange: props.onChange,
|
|
1437
|
-
autoComplete: props.autoComplete,
|
|
1438
|
-
defaultValue: props.defaultValue,
|
|
1439
|
-
placeholder,
|
|
1440
|
-
disabled: props.disabled || preview,
|
|
1441
|
-
style: { height: 40 },
|
|
1442
|
-
...inputProps,
|
|
1443
|
-
className: cn(
|
|
1444
|
-
defaultInputStyle,
|
|
1445
|
-
" focus-visible:hawa-outline-none focus-visible:hawa-ring-2 focus-visible:hawa-ring-ring focus-visible:hawa-ring-offset-0 dark:hawa-text-white",
|
|
1446
|
-
{
|
|
1447
|
-
"hawa-pe-9": props.endIcon,
|
|
1448
|
-
"hawa-ps-9": props.startIcon,
|
|
1449
|
-
"hawa-pe-[60px]": countPosition === "center"
|
|
1450
|
-
},
|
|
1451
|
-
preview && "hawa-border-transparent hawa-bg-transparent hawa-px-0",
|
|
1452
|
-
inputProps == null ? void 0 : inputProps.className
|
|
1453
|
-
)
|
|
1454
|
-
}
|
|
1455
|
-
)), !forceHideHelperText && /* @__PURE__ */ import_react8.default.createElement(
|
|
1456
|
-
"p",
|
|
1457
|
-
{
|
|
1458
|
-
className: cn(
|
|
1459
|
-
"hawa-my-0 hawa-text-start hawa-text-xs hawa-text-helper-color hawa-transition-all",
|
|
1460
|
-
props.helperText ? "hawa-h-4 hawa-opacity-100" : "hawa-h-0 hawa-opacity-0"
|
|
1461
|
-
)
|
|
1462
|
-
},
|
|
1463
|
-
props.helperText
|
|
1464
|
-
), !props.disabled && forceHideHelperText && /* @__PURE__ */ import_react8.default.createElement(
|
|
1465
|
-
"div",
|
|
1466
|
-
{
|
|
1467
|
-
className: cn(
|
|
1468
|
-
"hawa-absolute hawa-end-0 hawa-top-[47px] hawa-z-20 hawa-translate-y-1/2 hawa-rounded hawa-bg-background hawa-text-start hawa-text-xs hawa-text-helper-color hawa-drop-shadow-md hawa-transition-all",
|
|
1469
|
-
props.helperText ? "hawa-border hawa-p-1" : "hawa-border-none hawa-p-0"
|
|
1470
|
-
)
|
|
1471
|
-
},
|
|
1472
|
-
props.helperText
|
|
1473
|
-
), showCount && /* @__PURE__ */ import_react8.default.createElement(
|
|
1474
|
-
"div",
|
|
1475
|
-
{
|
|
1476
|
-
className: cn(
|
|
1477
|
-
"hawa-absolute hawa-translate-y-1/2 hawa-text-start hawa-text-xs hawa-transition-all",
|
|
1478
|
-
{
|
|
1479
|
-
"hawa-end-0 hawa-top-[62px]": countPosition === "bottom",
|
|
1480
|
-
"hawa-bottom-[62px] hawa-end-0": countPosition === "top",
|
|
1481
|
-
"hawa-end-2": countPosition === "center"
|
|
1482
|
-
}
|
|
1483
|
-
)
|
|
1484
|
-
},
|
|
1485
|
-
props.value ? String(props.value).length : 0,
|
|
1486
|
-
"/",
|
|
1487
|
-
props.maxLength
|
|
1488
|
-
)))
|
|
1489
|
-
);
|
|
1490
|
-
}
|
|
1491
|
-
);
|
|
1492
|
-
|
|
1493
|
-
// components/elements/table/Table.tsx
|
|
1494
|
-
var React20 = __toESM(require("react"));
|
|
1495
|
-
var Table = React20.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React20.createElement("div", { className: "hawa-relative hawa-w-full hawa-overflow-auto hawa-rounded hawa-border" }, /* @__PURE__ */ React20.createElement(
|
|
1496
|
-
"table",
|
|
1497
|
-
{
|
|
1498
|
-
ref,
|
|
1499
|
-
className: cn("hawa-w-full hawa-caption-bottom hawa-text-sm", className),
|
|
1500
|
-
...props
|
|
1501
|
-
}
|
|
1502
|
-
)));
|
|
1503
|
-
Table.displayName = "Table";
|
|
1504
|
-
var TableHeader = React20.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React20.createElement(
|
|
1505
|
-
"thead",
|
|
1506
|
-
{
|
|
1507
|
-
ref,
|
|
1508
|
-
className: cn("[&_tr]:hawa-border-b", "hawa-bg-muted/50", className),
|
|
1509
|
-
...props
|
|
1510
|
-
}
|
|
1511
|
-
));
|
|
1512
|
-
TableHeader.displayName = "TableHeader";
|
|
1513
|
-
var TableHead = React20.forwardRef(
|
|
1514
|
-
({ className, condensed, clickable, dir, ...props }, ref) => /* @__PURE__ */ React20.createElement(
|
|
1515
|
-
"th",
|
|
1516
|
-
{
|
|
1517
|
-
ref,
|
|
1518
|
-
className: cn(
|
|
1519
|
-
"hawa-bg-muted/60 hawa-text-start hawa-align-middle hawa-font-medium hawa-text-muted-foreground dark:hawa-bg-muted/40 [&:has([role=checkbox])]:hawa-pr-0 [&:not(:last-child)&:not(:first-child)]:hawa-border-x",
|
|
1520
|
-
dir === "rtl" ? "[&:not(:last-child)]:hawa-border-l" : "[&:not(:last-child)]:hawa-border-r",
|
|
1521
|
-
condensed ? "hawa-h-8" : "hawa-h-12",
|
|
1522
|
-
clickable ? "hawa-px-1" : "hawa-px-4",
|
|
1523
|
-
//First and last columns
|
|
1524
|
-
clickable ? " [&:not(:last-child)&:not(:first-child)]:hawa-p-1" : "hawa-px-4",
|
|
1525
|
-
//Columns in between
|
|
1526
|
-
className
|
|
1527
|
-
),
|
|
1528
|
-
...props
|
|
1529
|
-
}
|
|
1530
|
-
)
|
|
1531
|
-
);
|
|
1532
|
-
TableHead.displayName = "TableHead";
|
|
1533
|
-
var TableBody = React20.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React20.createElement("tbody", { ref, className: cn("hawa-border-none", className), ...props }));
|
|
1534
|
-
TableBody.displayName = "TableBody";
|
|
1535
|
-
var TableFooter = React20.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React20.createElement(
|
|
1536
|
-
"tfoot",
|
|
1537
|
-
{
|
|
1538
|
-
ref,
|
|
1539
|
-
className: cn(
|
|
1540
|
-
"hawa-bg-primary hawa-font-medium hawa-text-primary-foreground",
|
|
1541
|
-
className
|
|
1542
|
-
),
|
|
1543
|
-
...props
|
|
1544
|
-
}
|
|
1545
|
-
));
|
|
1546
|
-
TableFooter.displayName = "TableFooter";
|
|
1547
|
-
var TableRow = React20.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React20.createElement(
|
|
1548
|
-
"tr",
|
|
1549
|
-
{
|
|
1550
|
-
ref,
|
|
1551
|
-
className: cn(
|
|
1552
|
-
"hawa-bg-background hawa-transition-colors data-[state=selected]:hawa-bg-muted",
|
|
1553
|
-
"[&:not(:last-child)&:not(:first-child)]:hawa-border-y",
|
|
1554
|
-
"[&:not(:last-child)]:hawa-border-b",
|
|
1555
|
-
className
|
|
1556
|
-
),
|
|
1557
|
-
...props
|
|
1558
|
-
}
|
|
1559
|
-
));
|
|
1560
|
-
TableRow.displayName = "TableRow";
|
|
1561
|
-
var TableCell = React20.forwardRef(
|
|
1562
|
-
({ className, enablePadding = true, padding = "default", ...props }, ref) => {
|
|
1563
|
-
let paddingStyles = {
|
|
1564
|
-
condensed: "hawa-p-0 hawa-px-4",
|
|
1565
|
-
default: "hawa-p-4",
|
|
1566
|
-
noPadding: "hawa-p-0"
|
|
1567
|
-
};
|
|
1568
|
-
return /* @__PURE__ */ React20.createElement(
|
|
1569
|
-
"td",
|
|
1570
|
-
{
|
|
1571
|
-
ref,
|
|
1572
|
-
className: cn(
|
|
1573
|
-
paddingStyles[padding],
|
|
1574
|
-
// "border-x",
|
|
1575
|
-
// enablePadding ? "hawa-p-4" : "hawa-p-0",
|
|
1576
|
-
// props.disablePadding ? "hawa-p-0" : "hawa-p-4",
|
|
1577
|
-
// props.condensed ? "hawa-p-0 hawa-px-4" : "hawa-p-4",
|
|
1578
|
-
"hawa-align-middle [&:has([role=checkbox])]:hawa-pr-0 ",
|
|
1579
|
-
"[&:not(:last-child)&:not(:first-child)]:hawa-border-x",
|
|
1580
|
-
// "[&:not(:last-child)]:hawa-border-r",
|
|
1581
|
-
props.dir === "rtl" ? "[&:not(:last-child)]:hawa-border-l" : "[&:not(:last-child)]:hawa-border-r",
|
|
1582
|
-
className
|
|
1583
|
-
),
|
|
1584
|
-
...props
|
|
1585
|
-
}
|
|
1586
|
-
);
|
|
1587
|
-
}
|
|
1588
|
-
);
|
|
1589
|
-
TableCell.displayName = "TableCell";
|
|
1590
|
-
var TableCaption = React20.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React20.createElement(
|
|
1591
|
-
"caption",
|
|
1592
|
-
{
|
|
1593
|
-
ref,
|
|
1594
|
-
className: cn(
|
|
1595
|
-
"hawa-mt-4 hawa-text-sm hawa-text-muted-foreground",
|
|
1596
|
-
className
|
|
1597
|
-
),
|
|
1598
|
-
...props
|
|
1599
|
-
}
|
|
1600
|
-
));
|
|
1601
|
-
TableCaption.displayName = "TableCaption";
|
|
1602
|
-
|
|
1603
|
-
// components/elements/backToTop/BackToTop.tsx
|
|
1604
|
-
var import_react9 = __toESM(require("react"));
|
|
1605
|
-
|
|
1606
|
-
// components/elements/radio/Radio.tsx
|
|
1607
|
-
var import_react10 = __toESM(require("react"));
|
|
1608
|
-
var Radio = ({
|
|
1609
|
-
design = "default",
|
|
1610
|
-
width = "default",
|
|
1611
|
-
size = "default",
|
|
1612
|
-
orientation = "horizontal",
|
|
1613
|
-
labelProps,
|
|
1614
|
-
tabsContainerClassName,
|
|
1615
|
-
...props
|
|
1616
|
-
}) => {
|
|
1617
|
-
var _a, _b, _c;
|
|
1618
|
-
const [selectedOption, setSelectedOption] = (0, import_react10.useState)(props.defaultValue);
|
|
1619
|
-
let activeTabStyle = "hawa-inline-block hawa-w-full hawa-text-primary-foreground hawa-bg-primary hawa-active dark:hawa-bg-primary";
|
|
1620
|
-
let inactiveTabStyle = "hawa-inline-block hawa-w-full hawa-transition-all hover:hawa-bg-muted hawa-bg-primary-foreground dark:hover:hawa-text-white";
|
|
1621
|
-
let orientationStyle = {
|
|
1622
|
-
horizontal: "hawa-flex hawa-flex-row",
|
|
1623
|
-
vertical: "hawa-flex hawa-flex-col"
|
|
1624
|
-
};
|
|
1625
|
-
let tabSizeStyle = {
|
|
1626
|
-
default: "hawa-py-2 hawa-px-4 hawa-text-sm",
|
|
1627
|
-
lg: "hawa-py-2 hawa-px-4",
|
|
1628
|
-
sm: "hawa-p-1.5 hawa-text-xs",
|
|
1629
|
-
xs: "hawa-p-1 hawa-text-[10px]"
|
|
1630
|
-
};
|
|
1631
|
-
let widthStyle = {
|
|
1632
|
-
none: "",
|
|
1633
|
-
default: "hawa-max-w-fit",
|
|
1634
|
-
full: "hawa-w-full"
|
|
1635
|
-
};
|
|
1636
|
-
const [parentDirection, setParentDirection] = import_react10.default.useState(
|
|
1637
|
-
null
|
|
1638
|
-
);
|
|
1639
|
-
const parentRef = (0, import_react10.useRef)(null);
|
|
1640
|
-
(0, import_react10.useEffect)(() => {
|
|
1641
|
-
var _a2;
|
|
1642
|
-
const parentNode = (_a2 = parentRef.current) == null ? void 0 : _a2.parentNode;
|
|
1643
|
-
if (parentNode) {
|
|
1644
|
-
const dir = window.getComputedStyle(parentNode).direction;
|
|
1645
|
-
setParentDirection(dir);
|
|
1646
|
-
}
|
|
1647
|
-
});
|
|
1648
|
-
switch (design) {
|
|
1649
|
-
case "tabs":
|
|
1650
|
-
return /* @__PURE__ */ import_react10.default.createElement(
|
|
1651
|
-
"ul",
|
|
1652
|
-
{
|
|
1653
|
-
ref: parentRef,
|
|
1654
|
-
className: cn(
|
|
1655
|
-
props.options && ((_a = props.options) == null ? void 0 : _a.length) > 2 ? "hawa-flex-wrap xs:hawa-max-w-full xs:hawa-flex-nowrap" : "",
|
|
1656
|
-
"hawa-select-none hawa-whitespace-nowrap hawa-rounded hawa-border hawa-text-center hawa-font-medium",
|
|
1657
|
-
orientationStyle[orientation],
|
|
1658
|
-
widthStyle[width],
|
|
1659
|
-
tabsContainerClassName
|
|
1660
|
-
)
|
|
1661
|
-
},
|
|
1662
|
-
(_b = props.options) == null ? void 0 : _b.map((opt, o) => /* @__PURE__ */ import_react10.default.createElement(
|
|
1663
|
-
"li",
|
|
1664
|
-
{
|
|
1665
|
-
"aria-current": "page",
|
|
1666
|
-
onClick: () => {
|
|
1667
|
-
setSelectedOption(opt.value);
|
|
1668
|
-
if (props.onChangeTab) {
|
|
1669
|
-
props.onChangeTab(opt);
|
|
1670
|
-
} else {
|
|
1671
|
-
console.log("onChangeTab was not provided");
|
|
1672
|
-
}
|
|
1673
|
-
},
|
|
1674
|
-
className: cn(
|
|
1675
|
-
"hawa-w-full hawa-cursor-pointer ",
|
|
1676
|
-
orientation === "horizontal" && parentDirection === "ltr" && "hawa-rounded-none first:hawa-rounded-l last:hawa-rounded-r",
|
|
1677
|
-
orientation === "horizontal" && parentDirection === "rtl" && "hawa-rounded-none first:hawa-rounded-r last:hawa-rounded-l",
|
|
1678
|
-
orientation === "vertical" && "hawa-rounded-none first:hawa-rounded-t last:hawa-rounded-b",
|
|
1679
|
-
tabSizeStyle[size],
|
|
1680
|
-
"hawa-last hawa-flex hawa-flex-row hawa-items-center hawa-justify-center hawa-gap-2 ",
|
|
1681
|
-
selectedOption === opt.value ? activeTabStyle : inactiveTabStyle
|
|
1682
|
-
),
|
|
1683
|
-
key: o
|
|
1684
|
-
},
|
|
1685
|
-
opt.icon && opt.icon,
|
|
1686
|
-
opt.label
|
|
1687
|
-
))
|
|
1688
|
-
);
|
|
1689
|
-
case "bordered":
|
|
1690
|
-
return /* @__PURE__ */ import_react10.default.createElement("div", { className: cn(orientationStyle[orientation], "hawa-gap-4") }, props.options && props.options.map((opt, i) => /* @__PURE__ */ import_react10.default.createElement(
|
|
1691
|
-
"div",
|
|
1692
|
-
{
|
|
1693
|
-
key: i,
|
|
1694
|
-
className: "hawa-rounded hawa-border hawa-border-gray-200 "
|
|
1695
|
-
},
|
|
1696
|
-
/* @__PURE__ */ import_react10.default.createElement(
|
|
1697
|
-
"div",
|
|
1698
|
-
{
|
|
1699
|
-
className: cn(
|
|
1700
|
-
"radio-item radio-item-bordered hawa-flex hawa-items-center hawa-transition-all",
|
|
1701
|
-
props.direction === "rtl" ? "margin-left right-19px" : "margin-right left-23px"
|
|
1702
|
-
),
|
|
1703
|
-
key: i + 1
|
|
1704
|
-
},
|
|
1705
|
-
/* @__PURE__ */ import_react10.default.createElement(
|
|
1706
|
-
"input",
|
|
1707
|
-
{
|
|
1708
|
-
disabled: opt.disabled,
|
|
1709
|
-
id: opt.value.toString(),
|
|
1710
|
-
type: "radio",
|
|
1711
|
-
value: opt.value,
|
|
1712
|
-
name: "bordered-radio"
|
|
1713
|
-
}
|
|
1714
|
-
),
|
|
1715
|
-
/* @__PURE__ */ import_react10.default.createElement(
|
|
1716
|
-
"label",
|
|
1717
|
-
{
|
|
1718
|
-
htmlFor: opt.value.toString(),
|
|
1719
|
-
className: cn(
|
|
1720
|
-
"hawa-ml-2 hawa-w-full hawa-p-4 hawa-pl-3 hawa-text-sm hawa-font-medium dark:hawa-text-white",
|
|
1721
|
-
opt.disabled ? "hawa-opacity-50" : "hawa-cursor-pointer hawa-text-gray-900"
|
|
1722
|
-
)
|
|
1723
|
-
},
|
|
1724
|
-
opt.label
|
|
1725
|
-
)
|
|
1726
|
-
)
|
|
1727
|
-
)));
|
|
1728
|
-
case "cards":
|
|
1729
|
-
return /* @__PURE__ */ import_react10.default.createElement("ul", { className: cn(orientationStyle[orientation], "hawa-gap-4") }, (_c = props.options) == null ? void 0 : _c.map((opt, o) => /* @__PURE__ */ import_react10.default.createElement("li", { key: o }, /* @__PURE__ */ import_react10.default.createElement(
|
|
1730
|
-
"input",
|
|
1731
|
-
{
|
|
1732
|
-
type: "radio",
|
|
1733
|
-
id: opt.value.toString(),
|
|
1734
|
-
name: "cards-radio",
|
|
1735
|
-
value: opt.value.toString(),
|
|
1736
|
-
className: "hawa-peer hawa-hidden",
|
|
1737
|
-
required: true,
|
|
1738
|
-
disabled: opt.disabled
|
|
1739
|
-
}
|
|
1740
|
-
), /* @__PURE__ */ import_react10.default.createElement(
|
|
1741
|
-
"label",
|
|
1742
|
-
{
|
|
1743
|
-
htmlFor: opt.value.toString(),
|
|
1744
|
-
className: cn(
|
|
1745
|
-
"hawa-inline-flex hawa-h-full hawa-w-full hawa-items-center hawa-justify-between hawa-rounded-lg hawa-border hawa-border-gray-200 hawa-bg-white hawa-p-5 hawa-text-gray-500 peer-checked:hawa-border-primary peer-checked:hawa-text-primary dark:hawa-border-gray-700 dark:hawa-bg-gray-800 dark:hawa-text-gray-400 dark:peer-checked:hawa-text-primary",
|
|
1746
|
-
opt.disabled ? "hawa-opacity-50" : "hawa-cursor-pointer hover:hawa-bg-gray-100 hover:hawa-text-gray-600 dark:hover:hawa-bg-gray-700 dark:hover:hawa-text-gray-300"
|
|
1747
|
-
)
|
|
1748
|
-
},
|
|
1749
|
-
/* @__PURE__ */ import_react10.default.createElement("div", { className: "hawa-block hawa-h-full hawa-w-full" }, /* @__PURE__ */ import_react10.default.createElement("div", { className: "hawa-w-full hawa-text-lg hawa-font-semibold" }, opt.label), /* @__PURE__ */ import_react10.default.createElement("div", { className: "hawa-w-full" }, opt.sublabel))
|
|
1750
|
-
))));
|
|
1751
|
-
default:
|
|
1752
|
-
return /* @__PURE__ */ import_react10.default.createElement("div", { className: "hawa-flex hawa-flex-col hawa-gap-2" }, props.label && /* @__PURE__ */ import_react10.default.createElement(Label2, { ...labelProps }, props.label), /* @__PURE__ */ import_react10.default.createElement("div", { className: cn(orientationStyle[orientation], "hawa-gap-2") }, props.options && props.options.map((opt, i) => /* @__PURE__ */ import_react10.default.createElement(
|
|
1753
|
-
"div",
|
|
1754
|
-
{
|
|
1755
|
-
className: cn(
|
|
1756
|
-
"radio-item radio-item-default hawa-flex hawa-items-center hawa-transition-all",
|
|
1757
|
-
props.direction === "rtl" ? "margin-left right-3px" : "margin-right left-3px"
|
|
1758
|
-
),
|
|
1759
|
-
key: i + 1
|
|
1760
|
-
},
|
|
1761
|
-
/* @__PURE__ */ import_react10.default.createElement(
|
|
1762
|
-
"input",
|
|
1763
|
-
{
|
|
1764
|
-
disabled: opt.disabled,
|
|
1765
|
-
id: opt.value.toString(),
|
|
1766
|
-
type: "radio",
|
|
1767
|
-
value: opt.value,
|
|
1768
|
-
name: "default-radio",
|
|
1769
|
-
onChange: () => {
|
|
1770
|
-
setSelectedOption(opt.value);
|
|
1771
|
-
if (props.onChangeTab) {
|
|
1772
|
-
props.onChangeTab(opt);
|
|
1773
|
-
} else {
|
|
1774
|
-
console.log("onChangeTab was not provided");
|
|
1775
|
-
}
|
|
1776
|
-
}
|
|
1777
|
-
}
|
|
1778
|
-
),
|
|
1779
|
-
/* @__PURE__ */ import_react10.default.createElement(
|
|
1780
|
-
"label",
|
|
1781
|
-
{
|
|
1782
|
-
htmlFor: opt.value.toString(),
|
|
1783
|
-
className: cn(
|
|
1784
|
-
"hawa-text-sm hawa-font-medium dark:hawa-text-white",
|
|
1785
|
-
opt.disabled ? "hawa-text-gray-400" : "hawa-cursor-pointer hawa-text-gray-900"
|
|
1786
|
-
)
|
|
1787
|
-
},
|
|
1788
|
-
opt.label
|
|
1789
|
-
)
|
|
1790
|
-
))), /* @__PURE__ */ import_react10.default.createElement(
|
|
1791
|
-
"p",
|
|
1792
|
-
{
|
|
1793
|
-
className: cn(
|
|
1794
|
-
"hawa-my-0 hawa-text-start hawa-text-xs hawa-text-helper-color hawa-transition-all",
|
|
1795
|
-
props.helperText ? "hawa-h-4 hawa-opacity-100" : "hawa-h-0 hawa-opacity-0"
|
|
1796
|
-
)
|
|
1797
|
-
},
|
|
1798
|
-
props.helperText
|
|
1799
|
-
));
|
|
1800
|
-
}
|
|
1801
|
-
};
|
|
1802
|
-
|
|
1803
|
-
// components/elements/combobox/Combobox.tsx
|
|
1804
|
-
var React26 = __toESM(require("react"));
|
|
1805
|
-
var PopoverPrimitive2 = __toESM(require("@radix-ui/react-popover"));
|
|
1806
|
-
|
|
1807
|
-
// components/elements/command/Command.tsx
|
|
1808
|
-
var React24 = __toESM(require("react"));
|
|
1809
|
-
var import_cmdk = require("cmdk");
|
|
1810
|
-
var Command = React24.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React24.createElement(
|
|
1811
|
-
import_cmdk.Command,
|
|
1812
|
-
{
|
|
1813
|
-
ref,
|
|
1814
|
-
className: cn(
|
|
1815
|
-
"hawa-flex hawa-h-full hawa-w-full hawa-flex-col hawa-overflow-hidden hawa-rounded-md hawa-bg-popover hawa-text-popover-foreground",
|
|
1816
|
-
className
|
|
1817
|
-
),
|
|
1818
|
-
...props
|
|
1819
|
-
}
|
|
1820
|
-
));
|
|
1821
|
-
Command.displayName = import_cmdk.Command.displayName;
|
|
1822
|
-
var CommandInput = React24.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React24.createElement(
|
|
1823
|
-
"div",
|
|
1824
|
-
{
|
|
1825
|
-
className: "hawa-flex hawa-items-center hawa-border-b hawa-px-3",
|
|
1826
|
-
"cmdk-input-wrapper": ""
|
|
1827
|
-
},
|
|
1828
|
-
/* @__PURE__ */ React24.createElement(
|
|
1829
|
-
"svg",
|
|
1830
|
-
{
|
|
1831
|
-
"aria-label": "Search Icon",
|
|
1832
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
1833
|
-
width: "24",
|
|
1834
|
-
height: "24",
|
|
1835
|
-
viewBox: "0 0 24 24",
|
|
1836
|
-
fill: "none",
|
|
1837
|
-
stroke: "currentColor",
|
|
1838
|
-
strokeWidth: "2",
|
|
1839
|
-
strokeLinecap: "round",
|
|
1840
|
-
strokeLinejoin: "round",
|
|
1841
|
-
className: "hawa-icon hawa-mr-2 hawa-shrink-0 hawa-opacity-50"
|
|
1842
|
-
},
|
|
1843
|
-
/* @__PURE__ */ React24.createElement("circle", { cx: "11", cy: "11", r: "8" }),
|
|
1844
|
-
/* @__PURE__ */ React24.createElement("path", { d: "m21 21-4.3-4.3" })
|
|
1845
|
-
),
|
|
1846
|
-
/* @__PURE__ */ React24.createElement(
|
|
1847
|
-
import_cmdk.Command.Input,
|
|
1848
|
-
{
|
|
1849
|
-
ref,
|
|
1850
|
-
className: cn(
|
|
1851
|
-
"hawa-flex hawa-h-11 hawa-w-full hawa-rounded-md hawa-bg-transparent hawa-py-3 hawa-text-sm hawa-outline-none placeholder:hawa-text-muted-foreground disabled:hawa-cursor-not-allowed disabled:hawa-opacity-50",
|
|
1852
|
-
className
|
|
1853
|
-
),
|
|
1854
|
-
...props
|
|
1855
|
-
}
|
|
1856
|
-
)
|
|
1857
|
-
));
|
|
1858
|
-
CommandInput.displayName = import_cmdk.Command.Input.displayName;
|
|
1859
|
-
var CommandList = React24.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React24.createElement(
|
|
1860
|
-
import_cmdk.Command.List,
|
|
1861
|
-
{
|
|
1862
|
-
ref,
|
|
1863
|
-
className: cn(
|
|
1864
|
-
"hawa-max-h-[300px] hawa-overflow-y-auto hawa-overflow-x-hidden",
|
|
1865
|
-
className
|
|
1866
|
-
),
|
|
1867
|
-
...props
|
|
1868
|
-
}
|
|
1869
|
-
));
|
|
1870
|
-
CommandList.displayName = import_cmdk.Command.List.displayName;
|
|
1871
|
-
var CommandEmpty = React24.forwardRef((props, ref) => /* @__PURE__ */ React24.createElement(
|
|
1872
|
-
import_cmdk.Command.Empty,
|
|
1873
|
-
{
|
|
1874
|
-
ref,
|
|
1875
|
-
className: "hawa-py-6 hawa-text-center hawa-text-sm",
|
|
1876
|
-
...props
|
|
1877
|
-
}
|
|
1878
|
-
));
|
|
1879
|
-
CommandEmpty.displayName = import_cmdk.Command.Empty.displayName;
|
|
1880
|
-
var CommandGroup = React24.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React24.createElement(
|
|
1881
|
-
import_cmdk.Command.Group,
|
|
1882
|
-
{
|
|
1883
|
-
ref,
|
|
1884
|
-
className: cn(
|
|
1885
|
-
"hawa-overflow-hidden hawa-p-1 hawa-text-foreground [&_[cmdk-group-heading]]:hawa-px-2 [&_[cmdk-group-heading]]:hawa-py-1.5 [&_[cmdk-group-heading]]:hawa-text-xs [&_[cmdk-group-heading]]:hawa-font-medium [&_[cmdk-group-heading]]:hawa-text-muted-foreground",
|
|
1886
|
-
className
|
|
1887
|
-
),
|
|
1888
|
-
...props
|
|
1889
|
-
}
|
|
1890
|
-
));
|
|
1891
|
-
CommandGroup.displayName = import_cmdk.Command.Group.displayName;
|
|
1892
|
-
var CommandSeparator = React24.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React24.createElement(
|
|
1893
|
-
import_cmdk.Command.Separator,
|
|
1894
|
-
{
|
|
1895
|
-
ref,
|
|
1896
|
-
className: cn("hawa--mx-1 hawa-h-px hawa-bg-border", className),
|
|
1897
|
-
...props
|
|
1898
|
-
}
|
|
1899
|
-
));
|
|
1900
|
-
CommandSeparator.displayName = import_cmdk.Command.Separator.displayName;
|
|
1901
|
-
var CommandItem = React24.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React24.createElement(
|
|
1902
|
-
import_cmdk.Command.Item,
|
|
1903
|
-
{
|
|
1904
|
-
ref,
|
|
1905
|
-
className: cn(
|
|
1906
|
-
"hawa-relative hawa-flex hawa-cursor-default hawa-select-none hawa-items-center hawa-rounded-sm hawa-px-2 hawa-py-1.5 hawa-text-sm hawa-outline-none aria-selected:hawa-bg-accent aria-selected:hawa-text-accent-foreground data-[disabled]:hawa-pointer-events-none data-[disabled]:hawa-opacity-50",
|
|
1907
|
-
className
|
|
1908
|
-
),
|
|
1909
|
-
...props
|
|
1910
|
-
}
|
|
1911
|
-
));
|
|
1912
|
-
CommandItem.displayName = import_cmdk.Command.Item.displayName;
|
|
1913
|
-
var CommandShortcut = ({
|
|
1914
|
-
className,
|
|
1915
|
-
...props
|
|
1916
|
-
}) => {
|
|
1917
|
-
return /* @__PURE__ */ React24.createElement(
|
|
1918
|
-
"span",
|
|
1919
|
-
{
|
|
1920
|
-
className: cn(
|
|
1921
|
-
"hawa-ml-auto hawa-text-xs hawa-tracking-widest hawa-text-muted-foreground",
|
|
1922
|
-
className
|
|
1923
|
-
),
|
|
1924
|
-
...props
|
|
1925
|
-
}
|
|
1926
|
-
);
|
|
1927
|
-
};
|
|
1928
|
-
CommandShortcut.displayName = "CommandShortcut";
|
|
1929
|
-
|
|
1930
|
-
// components/elements/popover/Popover.tsx
|
|
1931
|
-
var React25 = __toESM(require("react"));
|
|
1932
|
-
var PopoverPrimitive = __toESM(require("@radix-ui/react-popover"));
|
|
1933
|
-
var PopoverContent = React25.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ React25.createElement(PopoverPrimitive.Portal, null, /* @__PURE__ */ React25.createElement(
|
|
1934
|
-
PopoverPrimitive.Content,
|
|
1935
|
-
{
|
|
1936
|
-
ref,
|
|
1937
|
-
align,
|
|
1938
|
-
sideOffset,
|
|
1939
|
-
className: cn(
|
|
1940
|
-
"dark:dark-shadow hawa-z-50 hawa-rounded hawa-border hawa-bg-popover hawa-text-popover-foreground hawa-shadow-md hawa-outline-none data-[state=open]:hawa-animate-in data-[state=closed]:hawa-animate-out data-[state=closed]:hawa-fade-out-0 data-[state=open]:hawa-fade-in-0 data-[state=closed]:hawa-zoom-out-95 data-[state=open]:hawa-zoom-in-95 data-[side=bottom]:hawa-slide-in-from-top-2 data-[side=left]:hawa-slide-in-from-right-2 data-[side=right]:hawa-slide-in-from-left-2 data-[side=top]:hawa-slide-in-from-bottom-2",
|
|
1941
|
-
className
|
|
1942
|
-
),
|
|
1943
|
-
...props
|
|
1944
|
-
}
|
|
1945
|
-
)));
|
|
1946
|
-
PopoverContent.displayName = PopoverPrimitive.Content.displayName;
|
|
1947
|
-
var Popover = ({
|
|
1948
|
-
trigger,
|
|
1949
|
-
children,
|
|
1950
|
-
className,
|
|
1951
|
-
align = "center",
|
|
1952
|
-
side,
|
|
1953
|
-
sideOffset = 4,
|
|
1954
|
-
open,
|
|
1955
|
-
width = "default",
|
|
1956
|
-
disableTrigger,
|
|
1957
|
-
contentProps,
|
|
1958
|
-
triggerProps,
|
|
1959
|
-
...props
|
|
1960
|
-
}) => {
|
|
1961
|
-
let widthStyles = {
|
|
1962
|
-
trigger: "var(--radix-popover-trigger-width)",
|
|
1963
|
-
default: "auto"
|
|
1964
|
-
};
|
|
1965
|
-
return /* @__PURE__ */ React25.createElement(PopoverPrimitive.Root, { open, ...props }, /* @__PURE__ */ React25.createElement(
|
|
1966
|
-
PopoverPrimitive.Trigger,
|
|
1967
|
-
{
|
|
1968
|
-
className: "hawa-w-full",
|
|
1969
|
-
disabled: disableTrigger,
|
|
1970
|
-
...triggerProps
|
|
1971
|
-
},
|
|
1972
|
-
trigger
|
|
1973
|
-
), /* @__PURE__ */ React25.createElement(
|
|
1974
|
-
PopoverContent,
|
|
1975
|
-
{
|
|
1976
|
-
side,
|
|
1977
|
-
className,
|
|
1978
|
-
align,
|
|
1979
|
-
sideOffset,
|
|
1980
|
-
style: {
|
|
1981
|
-
width: widthStyles[width]
|
|
1982
|
-
},
|
|
1983
|
-
...contentProps
|
|
1984
|
-
},
|
|
1985
|
-
children
|
|
1986
|
-
));
|
|
1987
|
-
};
|
|
1988
|
-
var PopoverTrigger = PopoverPrimitive.Trigger;
|
|
1989
|
-
|
|
1990
|
-
// components/elements/combobox/Combobox.tsx
|
|
1991
|
-
var Combobox = React26.forwardRef(
|
|
1992
|
-
({
|
|
1993
|
-
labelKey = "label",
|
|
1994
|
-
valueKey = "value",
|
|
1995
|
-
defaultValue = "",
|
|
1996
|
-
popoverClassName,
|
|
1997
|
-
labelProps,
|
|
1998
|
-
data,
|
|
1999
|
-
...props
|
|
2000
|
-
}, ref) => {
|
|
2001
|
-
var _a, _b, _c;
|
|
2002
|
-
const [open, setOpen] = React26.useState(false);
|
|
2003
|
-
const [value, setValue] = React26.useState(defaultValue);
|
|
2004
|
-
function getProperty(obj, key) {
|
|
2005
|
-
return obj[key];
|
|
2006
|
-
}
|
|
2007
|
-
const handleOpenChange = (open2) => {
|
|
2008
|
-
if (!(props.isLoading || props.preview)) {
|
|
2009
|
-
setOpen(open2);
|
|
2010
|
-
}
|
|
2011
|
-
};
|
|
2012
|
-
return /* @__PURE__ */ React26.createElement(
|
|
2013
|
-
"div",
|
|
2014
|
-
{
|
|
2015
|
-
className: cn(
|
|
2016
|
-
"hawa-relative hawa-flex hawa-h-fit hawa-flex-col hawa-gap-2",
|
|
2017
|
-
props.width === "fit" ? "hawa-w-fit" : "hawa-w-full"
|
|
2018
|
-
)
|
|
2019
|
-
},
|
|
2020
|
-
props.label && /* @__PURE__ */ React26.createElement(Label2, { ...labelProps }, props.label),
|
|
2021
|
-
/* @__PURE__ */ React26.createElement(PopoverPrimitive2.Root, { open, onOpenChange: handleOpenChange }, /* @__PURE__ */ React26.createElement(PopoverTrigger, { asChild: true }, props.isLoading ? /* @__PURE__ */ React26.createElement("div", { className: "hawa-pb-2" }, /* @__PURE__ */ React26.createElement(Skeleton, { className: "hawa-h-[40px] hawa-w-full" })) : /* @__PURE__ */ React26.createElement("div", { className: "hawa-flex hawa-flex-col hawa-items-start hawa-gap-2 " }, /* @__PURE__ */ React26.createElement(
|
|
2022
|
-
"div",
|
|
2023
|
-
{
|
|
2024
|
-
className: cn(
|
|
2025
|
-
"hawa-absolute hawa-top-[22px] hawa-h-[0.8px] hawa-w-full hawa-bg-gray-200 hawa-transition-all dark:hawa-bg-gray-800",
|
|
2026
|
-
props.preview ? "hawa-opacity-100" : "hawa-opacity-0"
|
|
2027
|
-
)
|
|
2028
|
-
}
|
|
2029
|
-
), /* @__PURE__ */ React26.createElement(
|
|
2030
|
-
"button",
|
|
2031
|
-
{
|
|
2032
|
-
role: "combobox",
|
|
2033
|
-
"aria-expanded": open,
|
|
2034
|
-
className: cn(
|
|
2035
|
-
"hawa-inline-flex hawa-h-10 hawa-w-full hawa-select-none hawa-items-center hawa-justify-between hawa-rounded-md hawa-border hawa-py-2 hawa-text-sm hawa-font-normal hawa-text-primary hawa-ring-offset-background hawa-transition-all focus-visible:hawa-outline-none focus-visible:hawa-ring-2 focus-visible:hawa-ring-ring focus-visible:hawa-ring-offset-2 disabled:hawa-pointer-events-none disabled:hawa-opacity-50",
|
|
2036
|
-
props.preview ? "hawa-cursor-default hawa-rounded-none hawa-border-transparent hawa-px-0" : "hawa-bg-background hawa-px-3 "
|
|
2037
|
-
)
|
|
2038
|
-
},
|
|
2039
|
-
value ? getProperty(
|
|
2040
|
-
data.find((item) => item[valueKey] === value) || {},
|
|
2041
|
-
labelKey
|
|
2042
|
-
) : ((_a = props.texts) == null ? void 0 : _a.placeholder) || "...",
|
|
2043
|
-
/* @__PURE__ */ React26.createElement(
|
|
2044
|
-
"svg",
|
|
2045
|
-
{
|
|
2046
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
2047
|
-
className: cn(
|
|
2048
|
-
"hawa-icon hawa-transition-all",
|
|
2049
|
-
!props.preview ? "hawa-visible hawa-opacity-100" : "hawa-invisible hawa-opacity-0"
|
|
2050
|
-
),
|
|
2051
|
-
"aria-label": "Chevron down icon",
|
|
2052
|
-
viewBox: "0 0 24 24",
|
|
2053
|
-
fill: "none",
|
|
2054
|
-
stroke: "currentColor",
|
|
2055
|
-
strokeWidth: "2",
|
|
2056
|
-
strokeLinecap: "round",
|
|
2057
|
-
strokeLinejoin: "round"
|
|
2058
|
-
},
|
|
2059
|
-
/* @__PURE__ */ React26.createElement("path", { d: "m6 9 6 6 6-6" })
|
|
2060
|
-
)
|
|
2061
|
-
), /* @__PURE__ */ React26.createElement(
|
|
2062
|
-
"p",
|
|
2063
|
-
{
|
|
2064
|
-
className: cn(
|
|
2065
|
-
"hawa-my-0 hawa-text-start hawa-text-xs hawa-text-helper-color hawa-transition-all",
|
|
2066
|
-
props.helperText ? "hawa-h-4 hawa-opacity-100" : "hawa-h-0 hawa-opacity-0"
|
|
2067
|
-
)
|
|
2068
|
-
},
|
|
2069
|
-
props.helperText
|
|
2070
|
-
))), /* @__PURE__ */ React26.createElement(
|
|
2071
|
-
PopoverContent,
|
|
2072
|
-
{
|
|
2073
|
-
className: cn("popover-w-parent", props.helperText && "-hawa-mt-4")
|
|
2074
|
-
},
|
|
2075
|
-
/* @__PURE__ */ React26.createElement(Command, null, !props.hideInput && /* @__PURE__ */ React26.createElement(
|
|
2076
|
-
CommandInput,
|
|
2077
|
-
{
|
|
2078
|
-
placeholder: ((_b = props.texts) == null ? void 0 : _b.searchPlaceholder) || "Search"
|
|
2079
|
-
}
|
|
2080
|
-
), /* @__PURE__ */ React26.createElement(CommandEmpty, null, ((_c = props.texts) == null ? void 0 : _c.noItems) || "No items found."), /* @__PURE__ */ React26.createElement(CommandGroup, { className: "hawa-max-h-[200px] hawa-overflow-y-auto" }, data.map((item, i) => /* @__PURE__ */ React26.createElement(
|
|
2081
|
-
CommandItem,
|
|
2082
|
-
{
|
|
2083
|
-
key: i,
|
|
2084
|
-
onSelect: () => {
|
|
2085
|
-
const newValue = getProperty(item, valueKey);
|
|
2086
|
-
setValue(newValue === value ? "" : newValue);
|
|
2087
|
-
if (props.onChange) {
|
|
2088
|
-
props.onChange(
|
|
2089
|
-
newValue === value ? "" : newValue
|
|
2090
|
-
);
|
|
2091
|
-
}
|
|
2092
|
-
setOpen(false);
|
|
2093
|
-
}
|
|
2094
|
-
},
|
|
2095
|
-
/* @__PURE__ */ React26.createElement(
|
|
2096
|
-
"svg",
|
|
2097
|
-
{
|
|
2098
|
-
"aria-label": "Check Icon",
|
|
2099
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
2100
|
-
width: "24",
|
|
2101
|
-
height: "24",
|
|
2102
|
-
viewBox: "0 0 24 24",
|
|
2103
|
-
fill: "none",
|
|
2104
|
-
stroke: "currentColor",
|
|
2105
|
-
strokeWidth: "2",
|
|
2106
|
-
strokeLinecap: "round",
|
|
2107
|
-
strokeLinejoin: "round",
|
|
2108
|
-
className: cn(
|
|
2109
|
-
"hawa-icon hawa-mr-2",
|
|
2110
|
-
value === getProperty(item, valueKey) ? "hawa-opacity-100" : "hawa-opacity-0"
|
|
2111
|
-
)
|
|
2112
|
-
},
|
|
2113
|
-
/* @__PURE__ */ React26.createElement("polyline", { points: "20 6 9 17 4 12" })
|
|
2114
|
-
),
|
|
2115
|
-
getProperty(item, labelKey)
|
|
2116
|
-
))))
|
|
2117
|
-
))
|
|
2118
|
-
);
|
|
2119
|
-
}
|
|
2120
|
-
);
|
|
2121
|
-
|
|
2122
|
-
// components/elements/textarea/Textarea.tsx
|
|
2123
|
-
var React27 = __toESM(require("react"));
|
|
2124
|
-
var Textarea = React27.forwardRef(
|
|
2125
|
-
({
|
|
2126
|
-
className,
|
|
2127
|
-
labelProps,
|
|
2128
|
-
showCount,
|
|
2129
|
-
forceHideHelperText,
|
|
2130
|
-
textareaProps,
|
|
2131
|
-
countPosition = "bottom",
|
|
2132
|
-
...props
|
|
2133
|
-
}, ref) => {
|
|
2134
|
-
return /* @__PURE__ */ React27.createElement("div", { className: "hawa-relative hawa-flex hawa-h-full hawa-w-full hawa-flex-col hawa-gap-2" }, props.label && /* @__PURE__ */ React27.createElement(Label2, { ...labelProps }, props.label), /* @__PURE__ */ React27.createElement(
|
|
2135
|
-
"textarea",
|
|
2136
|
-
{
|
|
2137
|
-
className: cn(
|
|
2138
|
-
"hawa-flex hawa-min-h-[40px] hawa-w-full hawa-rounded-md hawa-border hawa-border-input hawa-bg-background hawa-px-3 hawa-py-2 hawa-text-sm hawa-ring-offset-background placeholder:hawa-text-gray-400 placeholder:hawa-text-muted-foreground focus-visible:hawa-outline-none focus-visible:hawa-ring-2 focus-visible:hawa-ring-ring focus-visible:hawa-ring-offset-0 disabled:hawa-cursor-not-allowed disabled:hawa-opacity-50",
|
|
2139
|
-
className
|
|
2140
|
-
),
|
|
2141
|
-
ref,
|
|
2142
|
-
...textareaProps
|
|
2143
|
-
}
|
|
2144
|
-
), /* @__PURE__ */ React27.createElement("div", { className: "hawa-flex hawa-flex-row hawa-justify-between" }, !forceHideHelperText && /* @__PURE__ */ React27.createElement(
|
|
2145
|
-
"p",
|
|
2146
|
-
{
|
|
2147
|
-
className: cn(
|
|
2148
|
-
"hawa-my-0 hawa-text-start hawa-text-xs hawa-text-helper-color hawa-transition-all",
|
|
2149
|
-
props.helperText ? "hawa-h-4 hawa-opacity-100" : "hawa-h-0 hawa-opacity-0"
|
|
2150
|
-
)
|
|
2151
|
-
},
|
|
2152
|
-
props.helperText
|
|
2153
|
-
), showCount && /* @__PURE__ */ React27.createElement(
|
|
2154
|
-
"div",
|
|
2155
|
-
{
|
|
2156
|
-
className: cn(
|
|
2157
|
-
" hawa-text-start hawa-text-xs hawa-transition-all ",
|
|
2158
|
-
{
|
|
2159
|
-
"hawa-absolute hawa-bottom-[80px] hawa-end-0 hawa-translate-y-1/2": countPosition === "top"
|
|
2160
|
-
}
|
|
2161
|
-
)
|
|
2162
|
-
},
|
|
2163
|
-
(textareaProps == null ? void 0 : textareaProps.value) ? String(textareaProps == null ? void 0 : textareaProps.value).length : 0,
|
|
2164
|
-
"/",
|
|
2165
|
-
textareaProps == null ? void 0 : textareaProps.maxLength
|
|
2166
|
-
)));
|
|
2167
|
-
}
|
|
2168
|
-
);
|
|
2169
|
-
Textarea.displayName = "Textarea";
|
|
2170
|
-
|
|
2171
|
-
// components/elements/fileDropzone/FileDropzone.tsx
|
|
2172
|
-
var import_react11 = __toESM(require("react"));
|
|
2173
|
-
var import_react_dropzone = require("react-dropzone");
|
|
2174
|
-
var import_clsx2 = __toESM(require("clsx"));
|
|
2175
|
-
|
|
2176
|
-
// components/elements/sortButton/SortButton.tsx
|
|
2177
|
-
var import_react12 = __toESM(require("react"));
|
|
2178
|
-
|
|
2179
|
-
// components/elements/tabs/Tabs.tsx
|
|
2180
|
-
var React31 = __toESM(require("react"));
|
|
2181
|
-
var TabsPrimitive = __toESM(require("@radix-ui/react-tabs"));
|
|
2182
|
-
|
|
2183
|
-
// components/elements/Chip.tsx
|
|
2184
|
-
var import_react13 = __toESM(require("react"));
|
|
2185
|
-
var Chip = import_react13.default.forwardRef(
|
|
2186
|
-
({
|
|
2187
|
-
label,
|
|
2188
|
-
size = "normal",
|
|
2189
|
-
icon,
|
|
2190
|
-
color,
|
|
2191
|
-
radius = "inherit",
|
|
2192
|
-
dotType,
|
|
2193
|
-
...rest
|
|
2194
|
-
}, ref) => {
|
|
2195
|
-
let defaultStyles = "hawa-flex hawa-flex-row hawa-w-fit hawa-gap-1 hawa-items-center hawa-px-2.5 hawa-py-1 hawa-font-bold ";
|
|
2196
|
-
let radiusStyles = {
|
|
2197
|
-
inherit: " hawa-rounded",
|
|
2198
|
-
full: "hawa-rounded-full",
|
|
2199
|
-
none: "hawa-rounded-none"
|
|
2200
|
-
};
|
|
2201
|
-
let sizeStyles = {
|
|
2202
|
-
small: "hawa-h-[15px] hawa-leading-4 hawa-px-0 hawa-py-0 hawa-text-[9px] hawa-gap-0.5 ",
|
|
2203
|
-
normal: "hawa-h-fit hawa-text-xs",
|
|
2204
|
-
large: "hawa-text-base"
|
|
2205
|
-
};
|
|
2206
|
-
let dotStyles = {
|
|
2207
|
-
small: "hawa-flex hawa-h-1 hawa-w-1 hawa-rounded-full",
|
|
2208
|
-
normal: "hawa-flex hawa-h-2 hawa-w-2 hawa-rounded-full",
|
|
2209
|
-
large: "hawa-flex hawa-h-3 hawa-w-3 hawa-rounded-full"
|
|
2210
|
-
};
|
|
2211
|
-
let dotTypeStyles = {
|
|
2212
|
-
available: "hawa-bg-green-500",
|
|
2213
|
-
unavailable: "hawa-bg-red-500"
|
|
2214
|
-
};
|
|
2215
|
-
let colorStyles = {
|
|
2216
|
-
green: "hawa-bg-green-100 hawa-text-green-500 dark:hawa-bg-green-400 dark:hawa-text-green-800",
|
|
2217
|
-
blue: "hawa-bg-blue-100 hawa-text-blue-500 dark:hawa-bg-blue-400 dark:hawa-text-blue-100",
|
|
2218
|
-
red: "hawa-bg-red-100 hawa-text-red-500 dark:hawa-bg-red-400 dark:hawa-text-red-100",
|
|
2219
|
-
yellow: "hawa-bg-yellow-100 hawa-text-yellow-600 dark:hawa-bg-yellow-400 dark:hawa-text-yellow-800",
|
|
2220
|
-
orange: "hawa-bg-orange-100 hawa-text-orange-500 dark:hawa-bg-orange-400 dark:hawa-text-orange-100",
|
|
2221
|
-
purple: "hawa-bg-purple-100 hawa-text-purple-500 dark:hawa-bg-purple-400 dark:hawa-text-purple-100",
|
|
2222
|
-
cyan: "hawa-bg-cyan-100 hawa-text-cyan-800 dark:hawa-bg-cyan-400 dark:hawa-text-cyan-800",
|
|
2223
|
-
hyper: "hawa-text-white hawa-bg-gradient-to-tl hawa-from-pink-500 hawa-via-red-500 hawa-to-yellow-500 ",
|
|
2224
|
-
oceanic: "hawa-text-white hawa-bg-gradient-to-bl hawa-from-green-300 hawa-via-blue-500 hawa-to-purple-600"
|
|
2225
|
-
};
|
|
2226
|
-
if (label) {
|
|
2227
|
-
return /* @__PURE__ */ import_react13.default.createElement(
|
|
2228
|
-
"span",
|
|
2229
|
-
{
|
|
2230
|
-
...rest,
|
|
2231
|
-
ref,
|
|
2232
|
-
className: cn(
|
|
2233
|
-
defaultStyles,
|
|
2234
|
-
sizeStyles[size],
|
|
2235
|
-
radiusStyles[radius],
|
|
2236
|
-
color ? colorStyles[color] : "hawa-border hawa-bg-none"
|
|
2237
|
-
)
|
|
2238
|
-
},
|
|
2239
|
-
dotType && /* @__PURE__ */ import_react13.default.createElement(
|
|
2240
|
-
"span",
|
|
2241
|
-
{
|
|
2242
|
-
className: cn(dotStyles[size], dotTypeStyles[dotType])
|
|
2243
|
-
}
|
|
2244
|
-
),
|
|
2245
|
-
icon && icon,
|
|
2246
|
-
label
|
|
2247
|
-
);
|
|
2248
|
-
} else {
|
|
2249
|
-
return /* @__PURE__ */ import_react13.default.createElement(
|
|
2250
|
-
"span",
|
|
2251
|
-
{
|
|
2252
|
-
...rest,
|
|
2253
|
-
ref,
|
|
2254
|
-
className: cn(
|
|
2255
|
-
"hawa-h-2 hawa-w-2 hawa-rounded-full",
|
|
2256
|
-
color ? colorStyles[color] : "hawa-border hawa-bg-none"
|
|
2257
|
-
)
|
|
2258
|
-
}
|
|
2259
|
-
);
|
|
2260
|
-
}
|
|
2261
|
-
}
|
|
2262
|
-
);
|
|
2263
|
-
|
|
2264
|
-
// components/elements/tabs/Tabs.tsx
|
|
2265
|
-
var TabsContext = React31.createContext({ orientation: "vertical" });
|
|
2266
|
-
var Tabs = React31.forwardRef(({ className, orientation, ...props }, ref) => /* @__PURE__ */ React31.createElement(
|
|
2267
|
-
TabsPrimitive.Root,
|
|
2268
|
-
{
|
|
2269
|
-
ref,
|
|
2270
|
-
className: cn(
|
|
2271
|
-
"hawa-flex hawa-gap-2",
|
|
2272
|
-
orientation === "vertical" ? "hawa-flex-row" : "hawa-flex-col",
|
|
2273
|
-
className
|
|
2274
|
-
),
|
|
2275
|
-
...props
|
|
2276
|
-
},
|
|
2277
|
-
/* @__PURE__ */ React31.createElement(TabsContext.Provider, { value: { orientation } }, props.children)
|
|
2278
|
-
));
|
|
2279
|
-
Tabs.displayName = TabsPrimitive.Root.displayName;
|
|
2280
|
-
var TabsList = React31.forwardRef(({ className, ...props }, ref) => {
|
|
2281
|
-
const { orientation } = React31.useContext(TabsContext);
|
|
2282
|
-
return /* @__PURE__ */ React31.createElement(
|
|
2283
|
-
TabsPrimitive.List,
|
|
2284
|
-
{
|
|
2285
|
-
ref,
|
|
2286
|
-
className: cn(
|
|
2287
|
-
"hawa-flex hawa-w-fit hawa-flex-wrap hawa-items-center hawa-justify-start hawa-gap-1 hawa-rounded hawa-border hawa-bg-muted hawa-p-1 hawa-text-muted-foreground dark:hawa-border-primary/10",
|
|
2288
|
-
orientation === "vertical" ? "hawa-flex-col" : "hawa-flex-row",
|
|
2289
|
-
className
|
|
2290
|
-
),
|
|
2291
|
-
...props
|
|
2292
|
-
}
|
|
2293
|
-
);
|
|
2294
|
-
});
|
|
2295
|
-
TabsList.displayName = TabsPrimitive.List.displayName;
|
|
2296
|
-
var TabsTrigger = React31.forwardRef(({ className, chipProps, ...props }, ref) => {
|
|
2297
|
-
return /* @__PURE__ */ React31.createElement(
|
|
2298
|
-
TabsPrimitive.Trigger,
|
|
2299
|
-
{
|
|
2300
|
-
ref,
|
|
2301
|
-
className: cn(
|
|
2302
|
-
"hawa-inline-flex hawa-w-full hawa-flex-1 hawa-select-none hawa-items-center hawa-justify-center hawa-gap-2 hawa-whitespace-nowrap hawa-rounded hawa-border hawa-px-3 hawa-py-1.5 hawa-text-sm hawa-font-medium hawa-ring-offset-background hawa-transition-all focus-visible:hawa-outline-none focus-visible:hawa-ring-2 focus-visible:hawa-ring-ring focus-visible:hawa-ring-offset-2 disabled:hawa-pointer-events-none disabled:hawa-opacity-50 data-[state=active]:hawa-bg-primary data-[state=active]:hawa-text-primary-foreground data-[state=active]:hawa-shadow-sm dark:hawa-border-primary/10",
|
|
2303
|
-
className
|
|
2304
|
-
),
|
|
2305
|
-
...props
|
|
2306
|
-
},
|
|
2307
|
-
props.children,
|
|
2308
|
-
chipProps && /* @__PURE__ */ React31.createElement(Chip, { ...chipProps })
|
|
2309
|
-
);
|
|
2310
|
-
});
|
|
2311
|
-
TabsTrigger.displayName = TabsPrimitive.Trigger.displayName;
|
|
2312
|
-
var TabsContent = React31.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React31.createElement(
|
|
2313
|
-
TabsPrimitive.Content,
|
|
2314
|
-
{
|
|
2315
|
-
ref,
|
|
2316
|
-
className: cn(
|
|
2317
|
-
"hawa-ring-offset-hawa-background hawa-w-full focus-visible:hawa-outline-none focus-visible:hawa-ring-2 focus-visible:hawa-ring-ring focus-visible:hawa-ring-offset-2",
|
|
2318
|
-
className
|
|
2319
|
-
),
|
|
2320
|
-
...props
|
|
2321
|
-
}
|
|
2322
|
-
));
|
|
2323
|
-
TabsContent.displayName = TabsPrimitive.Content.displayName;
|
|
2324
|
-
|
|
2325
|
-
// components/elements/select/Select.tsx
|
|
2326
|
-
var import_react14 = __toESM(require("react"));
|
|
2327
|
-
var import_react_select = __toESM(require("react-select"));
|
|
2328
|
-
var import_creatable = __toESM(require("react-select/creatable"));
|
|
2329
|
-
var import_clsx3 = __toESM(require("clsx"));
|
|
2330
|
-
var Select = ({
|
|
2331
|
-
labelProps,
|
|
2332
|
-
labelKey = "label",
|
|
2333
|
-
...props
|
|
2334
|
-
}) => {
|
|
2335
|
-
const NoOption = () => {
|
|
2336
|
-
var _a, _b;
|
|
2337
|
-
return /* @__PURE__ */ import_react14.default.createElement("div", null, (_b = (_a = props.texts) == null ? void 0 : _a.noOptions) != null ? _b : "No Items Found");
|
|
2338
|
-
};
|
|
2339
|
-
const Control = ({ children, innerProps, innerRef }) => {
|
|
2340
|
-
return /* @__PURE__ */ import_react14.default.createElement(
|
|
2341
|
-
"div",
|
|
2342
|
-
{
|
|
2343
|
-
ref: innerRef,
|
|
2344
|
-
className: (0, import_clsx3.default)(
|
|
2345
|
-
"hawa-flex hawa-w-full hawa-rounded hawa-border hawa-bg-background hawa-p-2 hawa-text-sm hawa-text-gray-900 focus:hawa-border-blue-500 focus:hawa-ring-blue-500 dark:focus:hawa-ring-blue-500"
|
|
2346
|
-
),
|
|
2347
|
-
...innerProps
|
|
2348
|
-
},
|
|
2349
|
-
children
|
|
2350
|
-
);
|
|
2351
|
-
};
|
|
2352
|
-
const Option = ({ children, innerProps, innerRef }) => {
|
|
2353
|
-
return /* @__PURE__ */ import_react14.default.createElement(
|
|
2354
|
-
"div",
|
|
2355
|
-
{
|
|
2356
|
-
ref: innerRef,
|
|
2357
|
-
className: cn(
|
|
2358
|
-
"hawa-flex hawa-cursor-pointer hawa-select-none hawa-flex-row hawa-items-center hawa-justify-between hawa-rounded-inner hawa-p-1 hawa-px-2 hawa-transition-all hover:hawa-bg-primary hover:hawa-text-primary-foreground"
|
|
2359
|
-
),
|
|
2360
|
-
...innerProps
|
|
2361
|
-
},
|
|
2362
|
-
children
|
|
2363
|
-
);
|
|
2364
|
-
};
|
|
2365
|
-
const Menu = ({
|
|
2366
|
-
cx,
|
|
2367
|
-
children,
|
|
2368
|
-
getStyles,
|
|
2369
|
-
innerProps,
|
|
2370
|
-
innerRef,
|
|
2371
|
-
...menuProps
|
|
2372
|
-
}) => {
|
|
2373
|
-
const menuOpen = menuProps.selectProps.menuIsOpen;
|
|
2374
|
-
return /* @__PURE__ */ import_react14.default.createElement(
|
|
2375
|
-
"div",
|
|
2376
|
-
{
|
|
2377
|
-
className: cn(
|
|
2378
|
-
"dark:dark-shadow hawa-absolute hawa-z-10 -hawa-mx-1 hawa-mt-1 hawa-flex hawa-flex-col hawa-justify-start hawa-rounded hawa-border hawa-bg-background hawa-shadow-md",
|
|
2379
|
-
props.phoneCode ? "hawa-p-1.5" : "hawa-w-full hawa-p-1.5",
|
|
2380
|
-
menuOpen && "hawa-animate-in hawa-fade-in-0 hawa-zoom-in-95 "
|
|
2381
|
-
),
|
|
2382
|
-
ref: innerRef,
|
|
2383
|
-
...innerProps
|
|
2384
|
-
},
|
|
2385
|
-
children
|
|
2386
|
-
);
|
|
2387
|
-
};
|
|
2388
|
-
return /* @__PURE__ */ import_react14.default.createElement(
|
|
2389
|
-
"div",
|
|
2390
|
-
{
|
|
2391
|
-
className: cn(
|
|
2392
|
-
"hawa-flex hawa-flex-col hawa-gap-2",
|
|
2393
|
-
props.width === "fit" ? "hawa-w-fit" : "hawa-w-full"
|
|
2394
|
-
)
|
|
2395
|
-
},
|
|
2396
|
-
props.label && /* @__PURE__ */ import_react14.default.createElement(Label2, { ...labelProps }, props.label),
|
|
2397
|
-
props.isLoading ? /* @__PURE__ */ import_react14.default.createElement(Skeleton, { className: "hawa-h-[40px] hawa-w-full" }) : !props.isCreatable ? (
|
|
2398
|
-
// TODO: enable keyboard to go to the next item in the list
|
|
2399
|
-
/* @__PURE__ */ import_react14.default.createElement(
|
|
2400
|
-
import_react_select.default,
|
|
2401
|
-
{
|
|
2402
|
-
noOptionsMessage: NoOption,
|
|
2403
|
-
classNames: {
|
|
2404
|
-
control: () => cn(
|
|
2405
|
-
props.phoneCode && "hawa-rounded-r-none",
|
|
2406
|
-
props.controlClassNames
|
|
2407
|
-
),
|
|
2408
|
-
container: () => cn(
|
|
2409
|
-
"hawa-rounded",
|
|
2410
|
-
props.phoneCode && "hawa-w-fit hawa-min-w-[65px] hawa-text-right hawa-w-[100px] hawa-p-0 hawa-rounded-r-none hawa-h-[40px] ",
|
|
2411
|
-
"hawa-block hawa-w-full hawa-rounded hawa-border hawa-transition-all hawa-bg-background hawa-p-0 hawa-px-1 hawa-text-sm",
|
|
2412
|
-
props.disabled ? "hawa-cursor-not-allowed" : "hawa-cursor-pointer"
|
|
2413
|
-
),
|
|
2414
|
-
placeholder: () => "hawa-text-muted-foreground hawa-cursor-pointer hawa-px-1",
|
|
2415
|
-
valueContainer: () => "hawa-text-foreground hawa-px-1 ",
|
|
2416
|
-
singleValue: () => "hawa-text-foreground",
|
|
2417
|
-
indicatorsContainer: () => cn(
|
|
2418
|
-
"hawa-cursor-pointer hawa-text-muted-foreground",
|
|
2419
|
-
props.hideIndicator ? "hawa-invisible" : "hawa-px-1"
|
|
2420
|
-
)
|
|
2421
|
-
},
|
|
2422
|
-
unstyled: true,
|
|
2423
|
-
autoFocus: true,
|
|
2424
|
-
components: props.hideIndicator ? { Option, Menu, IndicatorsContainer: () => null } : { Option, Menu },
|
|
2425
|
-
onChange: (newValue, action) => props.onChange(newValue, action),
|
|
2426
|
-
options: props.options,
|
|
2427
|
-
getOptionLabel: props.getOptionLabel,
|
|
2428
|
-
defaultValue: props.defaultValue,
|
|
2429
|
-
placeholder: props.placeholder,
|
|
2430
|
-
isDisabled: props.disabled,
|
|
2431
|
-
isClearable: props.isClearable,
|
|
2432
|
-
isMulti: props.isMulti,
|
|
2433
|
-
isSearchable: props.isSearchable
|
|
2434
|
-
}
|
|
2435
|
-
)
|
|
2436
|
-
) : /* @__PURE__ */ import_react14.default.createElement(
|
|
2437
|
-
import_creatable.default,
|
|
2438
|
-
{
|
|
2439
|
-
formatCreateLabel: (inputValue) => {
|
|
2440
|
-
var _a, _b;
|
|
2441
|
-
return `${(_b = (_a = props.texts) == null ? void 0 : _a.createLabel) != null ? _b : "Create"} "${inputValue}"`;
|
|
2442
|
-
},
|
|
2443
|
-
classNames: {
|
|
2444
|
-
container: () => cn(
|
|
2445
|
-
"hawa-rounded",
|
|
2446
|
-
props.disabled ? "hawa-cursor-not-allowed" : "hawa-cursor-pointer"
|
|
2447
|
-
),
|
|
2448
|
-
placeholder: () => "hawa-px-2 hawa-text-muted-foreground",
|
|
2449
|
-
input: () => "hawa-text-primary hawa-px-2",
|
|
2450
|
-
valueContainer: () => "hawa-text-white dark:hawa-text-muted-foreground",
|
|
2451
|
-
singleValue: () => "hawa-text-black dark:hawa-text-white hawa-px-2",
|
|
2452
|
-
indicatorsContainer: () => " hawa-px-2 hawa-cursor-pointer hawa-text-muted-foreground"
|
|
2453
|
-
},
|
|
2454
|
-
unstyled: true,
|
|
2455
|
-
options: props.options,
|
|
2456
|
-
isClearable: props.isClearable,
|
|
2457
|
-
isMulti: props.isMulti,
|
|
2458
|
-
isSearchable: props.isSearchable,
|
|
2459
|
-
placeholder: props.placeholder,
|
|
2460
|
-
onCreateOption: props.handleCreateOption,
|
|
2461
|
-
onChange: (newValue, action) => props.onChange(newValue, action),
|
|
2462
|
-
components: { Control, Option, Menu },
|
|
2463
|
-
onInputChange: (newValue, action) => props.onInputChange(newValue, action)
|
|
2464
|
-
}
|
|
2465
|
-
),
|
|
2466
|
-
!props.hideHelperText && /* @__PURE__ */ import_react14.default.createElement(
|
|
2467
|
-
"p",
|
|
2468
|
-
{
|
|
2469
|
-
className: cn(
|
|
2470
|
-
"hawa-my-0 hawa-text-start hawa-text-xs hawa-text-helper-color hawa-transition-all",
|
|
2471
|
-
props.helperText ? "hawa-h-4 hawa-opacity-100" : "hawa-h-0 hawa-opacity-0"
|
|
2472
|
-
)
|
|
2473
|
-
},
|
|
2474
|
-
props.helperText
|
|
2475
|
-
)
|
|
2476
|
-
);
|
|
2477
|
-
};
|
|
2478
|
-
|
|
2479
|
-
// components/elements/switch/Switch.tsx
|
|
2480
|
-
var React33 = __toESM(require("react"));
|
|
2481
|
-
var SwitchPrimitives = __toESM(require("@radix-ui/react-switch"));
|
|
2482
|
-
var Switch = React33.forwardRef(
|
|
2483
|
-
({ className, size = "default", roundedness = "inherit", label, ...props }, ref) => {
|
|
2484
|
-
const [parentDirection, setParentDirection] = React33.useState(
|
|
2485
|
-
null
|
|
2486
|
-
);
|
|
2487
|
-
const parentRef = React33.useRef(null);
|
|
2488
|
-
React33.useEffect(() => {
|
|
2489
|
-
var _a;
|
|
2490
|
-
const parentNode = (_a = parentRef.current) == null ? void 0 : _a.parentNode;
|
|
2491
|
-
if (parentNode) {
|
|
2492
|
-
const dir = window.getComputedStyle(parentNode).direction;
|
|
2493
|
-
setParentDirection(dir);
|
|
2494
|
-
}
|
|
2495
|
-
});
|
|
2496
|
-
const rootSize = {
|
|
2497
|
-
default: "hawa-h-[25px] hawa-w-[42px]",
|
|
2498
|
-
sm: "hawa-h-[20px] hawa-w-[37px]",
|
|
2499
|
-
lg: "hawa-h-[30px] hawa-w-[47px]"
|
|
2500
|
-
};
|
|
2501
|
-
const thumbSize = {
|
|
2502
|
-
default: "hawa-h-[21px] hawa-w-[21px]",
|
|
2503
|
-
sm: "hawa-h-[16px] hawa-w-[16px]",
|
|
2504
|
-
lg: "hawa-h-[26px] hawa-w-[26px]"
|
|
2505
|
-
};
|
|
2506
|
-
const rootRoundednessStyles = {
|
|
2507
|
-
none: "hawa-rounded-none",
|
|
2508
|
-
full: "hawa-rounded-full",
|
|
2509
|
-
inherit: "hawa-rounded"
|
|
2510
|
-
};
|
|
2511
|
-
const thumbRoundednessStyles = {
|
|
2512
|
-
none: "hawa-rounded-none",
|
|
2513
|
-
full: "hawa-rounded-full",
|
|
2514
|
-
inherit: "hawa-rounded-inner"
|
|
2515
|
-
};
|
|
2516
|
-
return /* @__PURE__ */ React33.createElement(
|
|
2517
|
-
"div",
|
|
2518
|
-
{
|
|
2519
|
-
className: "hawa-flex hawa-flex-row hawa-items-center",
|
|
2520
|
-
ref: parentRef
|
|
2521
|
-
},
|
|
2522
|
-
/* @__PURE__ */ React33.createElement(
|
|
2523
|
-
SwitchPrimitives.Root,
|
|
2524
|
-
{
|
|
2525
|
-
className: cn(
|
|
2526
|
-
"data-[state=unchecked]:hawa-bg-primary/20",
|
|
2527
|
-
"data-[state=checked]:hawa-bg-primary",
|
|
2528
|
-
"hawa-relative hawa-cursor-pointer hawa-rounded hawa-outline-none",
|
|
2529
|
-
rootRoundednessStyles[roundedness],
|
|
2530
|
-
className,
|
|
2531
|
-
rootSize[size]
|
|
2532
|
-
),
|
|
2533
|
-
...props,
|
|
2534
|
-
ref
|
|
2535
|
-
},
|
|
2536
|
-
/* @__PURE__ */ React33.createElement(
|
|
2537
|
-
SwitchPrimitives.Thumb,
|
|
2538
|
-
{
|
|
2539
|
-
className: cn(
|
|
2540
|
-
thumbSize[size],
|
|
2541
|
-
"hawa-block hawa-rounded hawa-transition-transform hawa-duration-100 hawa-will-change-transform",
|
|
2542
|
-
"data-[state=checked]:hawa-bg-primary-foreground",
|
|
2543
|
-
"hawa-bg-white dark:hawa-bg-background",
|
|
2544
|
-
thumbRoundednessStyles[roundedness],
|
|
2545
|
-
parentDirection === "rtl" ? "hawa--translate-x-0.5 data-[state=checked]:hawa--translate-x-[19px]" : "hawa-translate-x-0.5 data-[state=checked]:hawa-translate-x-[19px]"
|
|
2546
|
-
)
|
|
2547
|
-
}
|
|
2548
|
-
)
|
|
2549
|
-
),
|
|
2550
|
-
label && /* @__PURE__ */ React33.createElement("span", { className: "hawa-mx-2 hawa-text-sm hawa-font-medium hawa-text-gray-900 dark:hawa-text-gray-300" }, label)
|
|
2551
|
-
);
|
|
2552
|
-
}
|
|
2553
|
-
);
|
|
2554
|
-
Switch.displayName = SwitchPrimitives.Root.displayName;
|
|
2555
|
-
|
|
2556
|
-
// components/elements/checkbox/Checkbox.tsx
|
|
2557
|
-
var React34 = __toESM(require("react"));
|
|
2558
|
-
var CheckboxPrimitive = __toESM(require("@radix-ui/react-checkbox"));
|
|
2559
|
-
var CheckboxElement = React34.forwardRef(({ radius = "inherit", size = "default", className, ...props }, ref) => {
|
|
2560
|
-
let checkboxRadius = {
|
|
2561
|
-
none: "hawa-rounded-none",
|
|
2562
|
-
inherit: "hawa-rounded-sm",
|
|
2563
|
-
full: "hawa-rounded-full"
|
|
2564
|
-
};
|
|
2565
|
-
let checkboxSizes = {
|
|
2566
|
-
xs: "hawa-w-3 hawa-h-3",
|
|
2567
|
-
sm: "hawa-w-6 hawa-h-6",
|
|
2568
|
-
default: "hawa-icon",
|
|
2569
|
-
md: "hawa-w-8 hawa-h-8",
|
|
2570
|
-
lg: "hawa-w-10 hawa-h-10",
|
|
2571
|
-
xl: "hawa-w-12 hawa-h-12"
|
|
2572
|
-
};
|
|
2573
|
-
let checkboxIndicatorSizes = {
|
|
2574
|
-
xs: "0.5em",
|
|
2575
|
-
default: "0.60em",
|
|
2576
|
-
sm: "0.75em",
|
|
2577
|
-
md: "0.875em",
|
|
2578
|
-
lg: "1em",
|
|
2579
|
-
xl: "1.25em"
|
|
2580
|
-
};
|
|
2581
|
-
return /* @__PURE__ */ React34.createElement(
|
|
2582
|
-
CheckboxPrimitive.Root,
|
|
2583
|
-
{
|
|
2584
|
-
ref,
|
|
2585
|
-
className: cn(
|
|
2586
|
-
"hawa-peer hawa-shrink-0 hawa-border hawa-border-primary hawa-ring-offset-background focus-visible:hawa-outline-none focus-visible:hawa-ring-2 focus-visible:hawa-ring-ring focus-visible:hawa-ring-offset-2 disabled:hawa-cursor-not-allowed disabled:hawa-opacity-50 data-[state=checked]:hawa-bg-primary data-[state=checked]:hawa-text-primary-foreground",
|
|
2587
|
-
checkboxSizes[size],
|
|
2588
|
-
checkboxRadius[radius],
|
|
2589
|
-
className
|
|
2590
|
-
),
|
|
2591
|
-
...props
|
|
2592
|
-
},
|
|
2593
|
-
/* @__PURE__ */ React34.createElement(
|
|
2594
|
-
CheckboxPrimitive.Indicator,
|
|
2595
|
-
{
|
|
2596
|
-
className: cn(
|
|
2597
|
-
"hawa-flex hawa-items-center hawa-justify-center hawa-text-current"
|
|
2598
|
-
)
|
|
2599
|
-
},
|
|
2600
|
-
/* @__PURE__ */ React34.createElement(
|
|
2601
|
-
"svg",
|
|
2602
|
-
{
|
|
2603
|
-
"aria-label": "Check Mark",
|
|
2604
|
-
stroke: "currentColor",
|
|
2605
|
-
fill: "currentColor",
|
|
2606
|
-
strokeWidth: "0",
|
|
2607
|
-
viewBox: "0 0 512 512",
|
|
2608
|
-
height: checkboxIndicatorSizes[size],
|
|
2609
|
-
width: checkboxIndicatorSizes[size]
|
|
2610
|
-
},
|
|
2611
|
-
/* @__PURE__ */ React34.createElement("path", { d: "M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z" })
|
|
2612
|
-
),
|
|
2613
|
-
" "
|
|
2614
|
-
)
|
|
2615
|
-
);
|
|
2616
|
-
});
|
|
2617
|
-
CheckboxElement.displayName = CheckboxPrimitive.Root.displayName;
|
|
2618
|
-
|
|
2619
|
-
// components/elements/cards/ActionCard.tsx
|
|
2620
|
-
var import_react15 = __toESM(require("react"));
|
|
2621
|
-
|
|
2622
|
-
// components/elements/cards/AdCard.tsx
|
|
2623
|
-
var import_react16 = __toESM(require("react"));
|
|
2624
|
-
|
|
2625
|
-
// components/elements/cards/PricingCard.tsx
|
|
2626
|
-
var import_react17 = __toESM(require("react"));
|
|
2627
|
-
|
|
2628
|
-
// components/elements/cards/ItemCard.tsx
|
|
2629
|
-
var import_react18 = __toESM(require("react"));
|
|
2630
|
-
|
|
2631
|
-
// components/elements/cards/LandingCard.tsx
|
|
2632
|
-
var import_react19 = __toESM(require("react"));
|
|
2633
|
-
|
|
2634
|
-
// components/elements/PinInput.tsx
|
|
2635
|
-
var import_react20 = __toESM(require("react"));
|
|
2636
|
-
|
|
2637
|
-
// components/elements/PhoneInput.tsx
|
|
2638
|
-
var import_react21 = __toESM(require("react"));
|
|
2639
|
-
|
|
2640
|
-
// components/elements/Progress.tsx
|
|
2641
|
-
var React42 = __toESM(require("react"));
|
|
2642
|
-
var ProgressPrimitive = __toESM(require("@radix-ui/react-progress"));
|
|
2643
|
-
var Progress = React42.forwardRef(({ className, value, ...props }, ref) => /* @__PURE__ */ React42.createElement(
|
|
2644
|
-
ProgressPrimitive.Root,
|
|
2645
|
-
{
|
|
2646
|
-
ref,
|
|
2647
|
-
className: cn(
|
|
2648
|
-
"hawa-relative hawa-h-4 hawa-w-full hawa-overflow-hidden hawa-rounded hawa-bg-secondary",
|
|
2649
|
-
className
|
|
2650
|
-
),
|
|
2651
|
-
...props
|
|
2652
|
-
},
|
|
2653
|
-
/* @__PURE__ */ React42.createElement(
|
|
2654
|
-
ProgressPrimitive.Indicator,
|
|
2655
|
-
{
|
|
2656
|
-
className: "hawa-h-full hawa-w-full hawa-flex-1 hawa-bg-primary hawa-transition-all",
|
|
2657
|
-
style: { transform: `translateX(-${100 - (value || 0)}%)` }
|
|
2658
|
-
}
|
|
2659
|
-
)
|
|
2660
|
-
));
|
|
2661
|
-
Progress.displayName = ProgressPrimitive.Root.displayName;
|
|
2662
|
-
|
|
2663
|
-
// components/elements/ProgressCircle.tsx
|
|
2664
|
-
var import_react22 = __toESM(require("react"));
|
|
2665
|
-
var size2config = {
|
|
2666
|
-
xs: {
|
|
2667
|
-
radius: 15,
|
|
2668
|
-
strokeWidth: 3
|
|
2669
|
-
},
|
|
2670
|
-
sm: {
|
|
2671
|
-
radius: 19,
|
|
2672
|
-
strokeWidth: 4
|
|
2673
|
-
},
|
|
2674
|
-
md: {
|
|
2675
|
-
radius: 32,
|
|
2676
|
-
strokeWidth: 6
|
|
2677
|
-
},
|
|
2678
|
-
lg: {
|
|
2679
|
-
radius: 52,
|
|
2680
|
-
strokeWidth: 8
|
|
2681
|
-
},
|
|
2682
|
-
xl: {
|
|
2683
|
-
radius: 80,
|
|
2684
|
-
strokeWidth: 10
|
|
2685
|
-
}
|
|
2686
|
-
};
|
|
2687
|
-
function getLimitedValue(input) {
|
|
2688
|
-
if (input === void 0) {
|
|
2689
|
-
return 0;
|
|
2690
|
-
} else if (input > 100) {
|
|
2691
|
-
return 100;
|
|
2692
|
-
} else {
|
|
2693
|
-
return input;
|
|
2694
|
-
}
|
|
2695
|
-
}
|
|
2696
|
-
var ProgressCircle = import_react22.default.forwardRef((props, ref) => {
|
|
2697
|
-
const {
|
|
2698
|
-
value: inputValue,
|
|
2699
|
-
size = "md",
|
|
2700
|
-
className,
|
|
2701
|
-
showAnimation = true,
|
|
2702
|
-
color,
|
|
2703
|
-
tooltip,
|
|
2704
|
-
radius: inputRadius,
|
|
2705
|
-
strokeWidth: inputStrokeWidth,
|
|
2706
|
-
children,
|
|
2707
|
-
...other
|
|
2708
|
-
} = props;
|
|
2709
|
-
const value = getLimitedValue(inputValue);
|
|
2710
|
-
const radius = inputRadius != null ? inputRadius : size2config[size].radius;
|
|
2711
|
-
const strokeWidth = inputStrokeWidth != null ? inputStrokeWidth : size2config[size].strokeWidth;
|
|
2712
|
-
const normalizedRadius = radius - strokeWidth / 2;
|
|
2713
|
-
const circumference = normalizedRadius * 2 * Math.PI;
|
|
2714
|
-
const strokeDashoffset = value / 100 * circumference;
|
|
2715
|
-
const offset = circumference - strokeDashoffset;
|
|
2716
|
-
return /* @__PURE__ */ import_react22.default.createElement(import_react22.default.Fragment, null, /* @__PURE__ */ import_react22.default.createElement(
|
|
2717
|
-
"div",
|
|
2718
|
-
{
|
|
2719
|
-
ref,
|
|
2720
|
-
className: cn(
|
|
2721
|
-
"hawa-flex hawa-flex-col hawa-items-center hawa-justify-center",
|
|
2722
|
-
className
|
|
2723
|
-
)
|
|
2724
|
-
},
|
|
2725
|
-
/* @__PURE__ */ import_react22.default.createElement(
|
|
2726
|
-
"svg",
|
|
2727
|
-
{
|
|
2728
|
-
width: radius * 2,
|
|
2729
|
-
height: radius * 2,
|
|
2730
|
-
viewBox: `0 0 ${radius * 2} ${radius * 2}`,
|
|
2731
|
-
className: "hawa-rotate-180 hawa-transform"
|
|
2732
|
-
},
|
|
2733
|
-
/* @__PURE__ */ import_react22.default.createElement(
|
|
2734
|
-
"circle",
|
|
2735
|
-
{
|
|
2736
|
-
r: normalizedRadius,
|
|
2737
|
-
cx: radius,
|
|
2738
|
-
cy: radius,
|
|
2739
|
-
strokeWidth,
|
|
2740
|
-
fill: "transparent",
|
|
2741
|
-
stroke: "",
|
|
2742
|
-
strokeLinecap: "round",
|
|
2743
|
-
className: cn(
|
|
2744
|
-
"hawa-transition-colors hawa-ease-linear",
|
|
2745
|
-
" hawa-stroke-primary/20"
|
|
2746
|
-
)
|
|
2747
|
-
}
|
|
2748
|
-
),
|
|
2749
|
-
value > 0 ? /* @__PURE__ */ import_react22.default.createElement(
|
|
2750
|
-
"circle",
|
|
2751
|
-
{
|
|
2752
|
-
r: normalizedRadius,
|
|
2753
|
-
cx: radius,
|
|
2754
|
-
cy: radius,
|
|
2755
|
-
strokeWidth,
|
|
2756
|
-
strokeDasharray: circumference + " " + circumference,
|
|
2757
|
-
strokeDashoffset: offset,
|
|
2758
|
-
fill: "transparent",
|
|
2759
|
-
stroke: "",
|
|
2760
|
-
strokeLinecap: "round",
|
|
2761
|
-
className: cn(
|
|
2762
|
-
"hawa-transition-colors hawa-ease-linear",
|
|
2763
|
-
"hawa-stroke-primary",
|
|
2764
|
-
showAnimation ? "hawa-transition-all hawa-duration-300 hawa-ease-in-out" : ""
|
|
2765
|
-
)
|
|
2766
|
-
}
|
|
2767
|
-
) : null
|
|
2768
|
-
),
|
|
2769
|
-
/* @__PURE__ */ import_react22.default.createElement("div", { className: cn("hawa-absolute hawa-flex") }, children)
|
|
2770
|
-
));
|
|
2771
|
-
});
|
|
2772
|
-
ProgressCircle.displayName = "ProgressCircle";
|
|
2773
|
-
|
|
2774
|
-
// components/elements/Pagination.tsx
|
|
2775
|
-
var import_react23 = __toESM(require("react"));
|
|
2776
|
-
var import_react_headless_pagination = require("react-headless-pagination");
|
|
2777
|
-
|
|
2778
|
-
// components/elements/PasswordInput.tsx
|
|
2779
|
-
var import_react27 = __toESM(require("react"));
|
|
2780
|
-
|
|
2781
|
-
// components/icons/Emojis.tsx
|
|
2782
|
-
var import_react24 = __toESM(require("react"));
|
|
2783
|
-
var VeryGoodEmoji = () => /* @__PURE__ */ import_react24.default.createElement(
|
|
2784
|
-
"svg",
|
|
2785
|
-
{
|
|
2786
|
-
fill: "none",
|
|
2787
|
-
height: "16",
|
|
2788
|
-
viewBox: "0 0 16 16",
|
|
2789
|
-
width: "16",
|
|
2790
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
2791
|
-
},
|
|
2792
|
-
/* @__PURE__ */ import_react24.default.createElement("g", { clipPath: "url(#clip0_53_166)" }, /* @__PURE__ */ import_react24.default.createElement(
|
|
2793
|
-
"path",
|
|
2794
|
-
{
|
|
2795
|
-
clipRule: "evenodd",
|
|
2796
|
-
d: "M14.5 8C14.5 11.5899 11.5899 14.5 8 14.5C4.41015 14.5 1.5 11.5899 1.5 8C1.5 4.41015 4.41015 1.5 8 1.5C11.5899 1.5 14.5 4.41015 14.5 8ZM16 8C16 12.4183 12.4183 16 8 16C3.58172 16 0 12.4183 0 8C0 3.58172 3.58172 0 8 0C12.4183 0 16 3.58172 16 8ZM4.5 8.97498H3.875V9.59998C3.875 11.4747 5.81046 12.8637 7.99817 12.8637C10.1879 12.8637 12.125 11.4832 12.125 9.59998V8.97498H11.5H4.5ZM7.99817 11.6137C6.59406 11.6137 5.63842 10.9482 5.28118 10.225H10.7202C10.3641 10.9504 9.40797 11.6137 7.99817 11.6137Z",
|
|
2797
|
-
fill: "currentColor",
|
|
2798
|
-
fillRule: "evenodd"
|
|
2799
|
-
}
|
|
2800
|
-
), /* @__PURE__ */ import_react24.default.createElement(
|
|
2801
|
-
"path",
|
|
2802
|
-
{
|
|
2803
|
-
clipRule: "evenodd",
|
|
2804
|
-
d: "M6.15295 4.92093L5.375 3.5L4.59705 4.92093L3 5.21885L4.11625 6.39495L3.90717 8L5.375 7.30593L6.84283 8L6.63375 6.39495L7.75 5.21885L6.15295 4.92093ZM11.403 4.92093L10.625 3.5L9.84705 4.92093L8.25 5.21885L9.36625 6.39495L9.15717 8L10.625 7.30593L12.0928 8L11.8837 6.39495L13 5.21885L11.403 4.92093Z",
|
|
2805
|
-
fill: "#FF990A",
|
|
2806
|
-
fillRule: "evenodd"
|
|
2807
|
-
}
|
|
2808
|
-
))
|
|
2809
|
-
);
|
|
2810
|
-
var GoodEmoji = () => /* @__PURE__ */ import_react24.default.createElement(
|
|
2811
|
-
"svg",
|
|
2812
|
-
{
|
|
2813
|
-
fill: "none",
|
|
2814
|
-
height: "16",
|
|
2815
|
-
viewBox: "0 0 16 16",
|
|
2816
|
-
width: "16",
|
|
2817
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
2818
|
-
},
|
|
2819
|
-
/* @__PURE__ */ import_react24.default.createElement("g", { clipPath: "url(#clip0_53_167)" }, /* @__PURE__ */ import_react24.default.createElement(
|
|
2820
|
-
"path",
|
|
2821
|
-
{
|
|
2822
|
-
clipRule: "evenodd",
|
|
2823
|
-
d: "M14.5 8C14.5 11.5899 11.5899 14.5 8 14.5C4.41015 14.5 1.5 11.5899 1.5 8C1.5 4.41015 4.41015 1.5 8 1.5C11.5899 1.5 14.5 4.41015 14.5 8ZM16 8C16 12.4183 12.4183 16 8 16C3.58172 16 0 12.4183 0 8C0 3.58172 3.58172 0 8 0C12.4183 0 16 3.58172 16 8ZM11.5249 10.8478L11.8727 10.3286L10.8342 9.6329L10.4863 10.1522C9.94904 10.9543 9.0363 11.4802 8.00098 11.4802C6.96759 11.4802 6.05634 10.9563 5.51863 10.1567L5.16986 9.63804L4.13259 10.3356L4.48137 10.8542C5.2414 11.9844 6.53398 12.7302 8.00098 12.7302C9.47073 12.7302 10.7654 11.9816 11.5249 10.8478ZM6.75 6.75C6.75 7.30228 6.30228 7.75 5.75 7.75C5.19772 7.75 4.75 7.30228 4.75 6.75C4.75 6.19772 5.19772 5.75 5.75 5.75C6.30228 5.75 6.75 6.19772 6.75 6.75ZM10.25 7.75C10.8023 7.75 11.25 7.30228 11.25 6.75C11.25 6.19772 10.8023 5.75 10.25 5.75C9.69771 5.75 9.25 6.19772 9.25 6.75C9.25 7.30228 9.69771 7.75 10.25 7.75Z",
|
|
2824
|
-
fill: "currentColor",
|
|
2825
|
-
fillRule: "evenodd"
|
|
2826
|
-
}
|
|
2827
|
-
))
|
|
2828
|
-
);
|
|
2829
|
-
var BadEmoji = () => /* @__PURE__ */ import_react24.default.createElement(
|
|
2830
|
-
"svg",
|
|
2831
|
-
{
|
|
2832
|
-
fill: "none",
|
|
2833
|
-
height: "16",
|
|
2834
|
-
viewBox: "0 0 16 16",
|
|
2835
|
-
width: "16",
|
|
2836
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
2837
|
-
},
|
|
2838
|
-
/* @__PURE__ */ import_react24.default.createElement("g", { clipPath: "url(#clip0_53_152)" }, /* @__PURE__ */ import_react24.default.createElement(
|
|
2839
|
-
"path",
|
|
2840
|
-
{
|
|
2841
|
-
clipRule: "evenodd",
|
|
2842
|
-
d: "M14.5 8C14.5 11.5899 11.5899 14.5 8 14.5C4.41015 14.5 1.5 11.5899 1.5 8C1.5 4.41015 4.41015 1.5 8 1.5C11.5899 1.5 14.5 4.41015 14.5 8ZM16 8C16 12.4183 12.4183 16 8 16C3.58172 16 0 12.4183 0 8C0 3.58172 3.58172 0 8 0C12.4183 0 16 3.58172 16 8ZM5.75 7.75C6.30228 7.75 6.75 7.30228 6.75 6.75C6.75 6.19772 6.30228 5.75 5.75 5.75C5.19772 5.75 4.75 6.19772 4.75 6.75C4.75 7.30228 5.19772 7.75 5.75 7.75ZM11.25 6.75C11.25 7.30228 10.8023 7.75 10.25 7.75C9.69771 7.75 9.25 7.30228 9.25 6.75C9.25 6.19772 9.69771 5.75 10.25 5.75C10.8023 5.75 11.25 6.19772 11.25 6.75ZM11.5249 11.2622L11.8727 11.7814L10.8342 12.4771L10.4863 11.9578C9.94904 11.1557 9.0363 10.6298 8.00098 10.6298C6.96759 10.6298 6.05634 11.1537 5.51863 11.9533L5.16986 12.4719L4.13259 11.7744L4.48137 11.2558C5.2414 10.1256 6.53398 9.37982 8.00098 9.37982C9.47073 9.37982 10.7654 10.1284 11.5249 11.2622Z",
|
|
2843
|
-
fill: "currentColor",
|
|
2844
|
-
fillRule: "evenodd"
|
|
2845
|
-
}
|
|
2846
|
-
))
|
|
2847
|
-
);
|
|
2848
|
-
var VeryBadEmoji = () => /* @__PURE__ */ import_react24.default.createElement(
|
|
2849
|
-
"svg",
|
|
2850
|
-
{
|
|
2851
|
-
fill: "none",
|
|
2852
|
-
height: "16",
|
|
2853
|
-
viewBox: "0 0 16 16",
|
|
2854
|
-
width: "16",
|
|
2855
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
2856
|
-
},
|
|
2857
|
-
/* @__PURE__ */ import_react24.default.createElement("g", { clipPath: "url(#clip0_53_151)" }, /* @__PURE__ */ import_react24.default.createElement(
|
|
2858
|
-
"path",
|
|
2859
|
-
{
|
|
2860
|
-
d: "M11.841 12.0225C12.7197 12.9324 12.7197 14.4077 11.841 15.3176C10.9623 16.2275 9.53769 16.2275 8.65901 15.3176C7.78033 14.4077 7.78033 12.9324 8.65901 12.0225L10.25 10.375L11.841 12.0225Z",
|
|
2861
|
-
fill: "#0070F3"
|
|
2862
|
-
}
|
|
2863
|
-
), /* @__PURE__ */ import_react24.default.createElement(
|
|
2864
|
-
"path",
|
|
2865
|
-
{
|
|
2866
|
-
clipRule: "evenodd",
|
|
2867
|
-
d: "M8 1.5C4.41015 1.5 1.5 4.41015 1.5 8C1.5 10.9668 3.48826 13.4711 6.20649 14.2496L5.79351 15.6916C2.44895 14.7338 0 11.6539 0 8C0 3.58172 3.58172 0 8 0C12.4183 0 16 3.58172 16 8C16 9.4652 15.6054 10.8405 14.9162 12.023L13.6203 11.2677C14.1794 10.3083 14.5 9.19272 14.5 8C14.5 4.41015 11.5899 1.5 8 1.5ZM6.75 6.75C6.75 7.30228 6.30228 7.75 5.75 7.75C5.19772 7.75 4.75 7.30228 4.75 6.75C4.75 6.19772 5.19772 5.75 5.75 5.75C6.30228 5.75 6.75 6.19772 6.75 6.75ZM10.25 7.75C10.8023 7.75 11.25 7.30228 11.25 6.75C11.25 6.19772 10.8023 5.75 10.25 5.75C9.69771 5.75 9.25 6.19772 9.25 6.75C9.25 7.30228 9.69771 7.75 10.25 7.75Z",
|
|
2868
|
-
fill: "currentColor",
|
|
2869
|
-
fillRule: "evenodd"
|
|
2870
|
-
}
|
|
2871
|
-
))
|
|
2872
|
-
);
|
|
2873
|
-
|
|
2874
|
-
// components/icons/InputIcons.tsx
|
|
2875
|
-
var import_react25 = __toESM(require("react"));
|
|
2876
|
-
|
|
2877
|
-
// components/icons/CommonIcons.tsx
|
|
2878
|
-
var import_react26 = __toESM(require("react"));
|
|
2879
|
-
|
|
2880
|
-
// components/elements/Slider.tsx
|
|
2881
|
-
var React49 = __toESM(require("react"));
|
|
2882
|
-
var SliderPrimitive = __toESM(require("@radix-ui/react-slider"));
|
|
2883
|
-
var Slider = React49.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React49.createElement(
|
|
2884
|
-
SliderPrimitive.Root,
|
|
2885
|
-
{
|
|
2886
|
-
ref,
|
|
2887
|
-
className: cn(
|
|
2888
|
-
"hawa-relative hawa-flex hawa-w-full hawa-touch-none hawa-select-none hawa-items-center",
|
|
2889
|
-
className
|
|
2890
|
-
),
|
|
2891
|
-
...props
|
|
2892
|
-
},
|
|
2893
|
-
/* @__PURE__ */ React49.createElement(SliderPrimitive.Track, { className: "hawa-relative hawa-h-2 hawa-w-full hawa-grow hawa-overflow-hidden hawa-rounded-full hawa-border hawa-bg-background" }, /* @__PURE__ */ React49.createElement(SliderPrimitive.Range, { className: "hawa-absolute hawa-h-full hawa-bg-primary" })),
|
|
2894
|
-
/* @__PURE__ */ React49.createElement(SliderPrimitive.Thumb, { className: "hawa-block hawa-h-5 hawa-w-5 hawa-rounded-full hawa-border-2 hawa-border-primary hawa-bg-background hawa-ring-offset-background hawa-transition-colors focus-visible:hawa-outline-none focus-visible:hawa-ring-2 focus-visible:hawa-ring-ring focus-visible:hawa-ring-offset-2 disabled:hawa-pointer-events-none disabled:hawa-opacity-50" })
|
|
2895
|
-
));
|
|
2896
|
-
Slider.displayName = SliderPrimitive.Root.displayName;
|
|
2897
|
-
|
|
2898
|
-
// components/elements/SimpleTable.tsx
|
|
2899
|
-
var React50 = __toESM(require("react"));
|
|
2900
|
-
var import_react_table2 = require("@tanstack/react-table");
|
|
2901
|
-
|
|
2902
|
-
// components/elements/Separator.tsx
|
|
2903
|
-
var React51 = __toESM(require("react"));
|
|
2904
|
-
|
|
2905
|
-
// components/elements/ScrollArea.tsx
|
|
2906
|
-
var React52 = __toESM(require("react"));
|
|
2907
|
-
var ScrollAreaPrimitive = __toESM(require("@radix-ui/react-scroll-area"));
|
|
2908
|
-
var ScrollArea = React52.forwardRef(({ className, children, orientation = "vertical", ...props }, ref) => /* @__PURE__ */ React52.createElement(
|
|
2909
|
-
ScrollAreaPrimitive.Root,
|
|
2910
|
-
{
|
|
2911
|
-
ref,
|
|
2912
|
-
className: cn("hawa-relative hawa-overflow-hidden", className),
|
|
2913
|
-
...props
|
|
2914
|
-
},
|
|
2915
|
-
/* @__PURE__ */ React52.createElement(ScrollAreaPrimitive.Viewport, { className: "hawa-h-full hawa-w-full hawa-rounded-[inherit]" }, children),
|
|
2916
|
-
/* @__PURE__ */ React52.createElement(ScrollBar, { orientation }),
|
|
2917
|
-
/* @__PURE__ */ React52.createElement(ScrollAreaPrimitive.Corner, null)
|
|
2918
|
-
));
|
|
2919
|
-
ScrollArea.displayName = ScrollAreaPrimitive.Root.displayName;
|
|
2920
|
-
var ScrollBar = React52.forwardRef(({ className, orientation = "vertical", ...props }, ref) => /* @__PURE__ */ React52.createElement(
|
|
2921
|
-
ScrollAreaPrimitive.ScrollAreaScrollbar,
|
|
2922
|
-
{
|
|
2923
|
-
ref,
|
|
2924
|
-
orientation,
|
|
2925
|
-
className: cn(
|
|
2926
|
-
"hawa-flex hawa-touch-none hawa-select-none hawa-transition-colors",
|
|
2927
|
-
orientation === "vertical" && "hawa-h-full hawa-w-2.5 hawa-border-l hawa-border-l-transparent hawa-p-[1px]",
|
|
2928
|
-
orientation === "horizontal" && "hawa-h-2.5 hawa-border-t hawa-border-t-transparent hawa-p-[1px]",
|
|
2929
|
-
className
|
|
2930
|
-
),
|
|
2931
|
-
...props
|
|
2932
|
-
},
|
|
2933
|
-
/* @__PURE__ */ React52.createElement(
|
|
2934
|
-
ScrollAreaPrimitive.ScrollAreaThumb,
|
|
2935
|
-
{
|
|
2936
|
-
className: cn(
|
|
2937
|
-
"hawa-relative hawa-rounded-full hawa-bg-border",
|
|
2938
|
-
orientation === "vertical" && "hawa-flex-1"
|
|
2939
|
-
)
|
|
2940
|
-
}
|
|
2941
|
-
)
|
|
2942
|
-
));
|
|
2943
|
-
ScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName;
|
|
2944
|
-
|
|
2945
|
-
// components/elements/ScrollIndicator.tsx
|
|
2946
|
-
var import_react28 = __toESM(require("react"));
|
|
2947
|
-
|
|
2948
|
-
// components/elements/StopPropagationWrapper.tsx
|
|
2949
|
-
var import_react29 = __toESM(require("react"));
|
|
2950
|
-
|
|
2951
|
-
// components/elements/ColorPicker.tsx
|
|
2952
|
-
var import_react30 = __toESM(require("react"));
|
|
2953
|
-
|
|
2954
|
-
// components/elements/CodeBlock.tsx
|
|
2955
|
-
var import_react32 = __toESM(require("react"));
|
|
2956
|
-
var import_prism_react_renderer = require("prism-react-renderer");
|
|
2957
|
-
|
|
2958
|
-
// components/hooks/useClipboard.ts
|
|
2959
|
-
var import_react31 = require("react");
|
|
2960
|
-
|
|
2961
|
-
// components/elements/Carousel.tsx
|
|
2962
|
-
var import_react33 = __toESM(require("react"));
|
|
2963
|
-
var import_embla_carousel_react = __toESM(require("embla-carousel-react"));
|
|
2964
|
-
|
|
2965
|
-
// components/elements/Count.tsx
|
|
2966
|
-
var import_react34 = __toESM(require("react"));
|
|
2967
|
-
|
|
2968
|
-
// components/elements/Toast.tsx
|
|
2969
|
-
var React59 = __toESM(require("react"));
|
|
2970
|
-
var ToastPrimitives = __toESM(require("@radix-ui/react-toast"));
|
|
2971
|
-
var import_class_variance_authority4 = require("class-variance-authority");
|
|
2972
|
-
var toastVariants = (0, import_class_variance_authority4.cva)(
|
|
2973
|
-
"hawa-group hawa-z-[900] hawa-pointer-events-auto hawa-relative hawa-flex hawa-w-full hawa-items-center hawa-justify-between hawa-space-x-4 hawa-overflow-hidden hawa-rounded-md hawa-border hawa-shadow-lg hawa-transition-all data-[swipe=cancel]:hawa-translate-x-0 data-[swipe=end]:hawa-translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:hawa-translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:hawa-transition-none data-[state=open]:hawa-animate-in data-[state=closed]:hawa-animate-out data-[swipe=end]:hawa-animate-out data-[state=closed]:hawa-fade-out-80 data-[state=open]:hawa-slide-in-from-top-full data-[state=open]:sm:hawa-slide-in-from-bottom-full",
|
|
2974
|
-
{
|
|
2975
|
-
variants: {
|
|
2976
|
-
variant: {
|
|
2977
|
-
default: "hawa-border hawa-bg-background hawa-text-foreground",
|
|
2978
|
-
destructive: "hawa-destructive hawa-group hawa-border-destructive hawa-bg-destructive hawa-text-destructive-foreground"
|
|
2979
|
-
},
|
|
2980
|
-
severity: {
|
|
2981
|
-
info: "hawa-info hawa-group hawa-text-info-foreground hawa-bg-info",
|
|
2982
|
-
warning: "hawa-warning hawa-group hawa-text-warning-foreground hawa-bg-warning",
|
|
2983
|
-
error: "hawa-error hawa-group hawa-border-error hawa-bg-error hawa-text-white",
|
|
2984
|
-
success: "hawa-success hawa-group hawa-text-success-foreground hawa-bg-success",
|
|
2985
|
-
none: ""
|
|
2986
|
-
}
|
|
2987
|
-
},
|
|
2988
|
-
defaultVariants: {
|
|
2989
|
-
variant: "default"
|
|
2990
|
-
}
|
|
2991
|
-
}
|
|
2992
|
-
);
|
|
2993
|
-
var ToastViewport = React59.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React59.createElement(
|
|
2994
|
-
ToastPrimitives.Viewport,
|
|
2995
|
-
{
|
|
2996
|
-
ref,
|
|
2997
|
-
className: cn(
|
|
2998
|
-
"hawa-fixed hawa-top-0 hawa-z-[100] hawa-flex hawa-max-h-screen hawa-w-full hawa-flex-col-reverse hawa-p-4 sm:hawa-bottom-0 sm:hawa-right-0 sm:hawa-top-auto sm:hawa-flex-col md:hawa-max-w-[420px]",
|
|
2999
|
-
className
|
|
3000
|
-
),
|
|
3001
|
-
...props
|
|
3002
|
-
}
|
|
3003
|
-
));
|
|
3004
|
-
ToastViewport.displayName = ToastPrimitives.Viewport.displayName;
|
|
3005
|
-
var Toast = React59.forwardRef(({ className, variant, severity = "none", direction, ...props }, ref) => {
|
|
3006
|
-
return /* @__PURE__ */ React59.createElement(
|
|
3007
|
-
ToastPrimitives.Root,
|
|
3008
|
-
{
|
|
3009
|
-
ref,
|
|
3010
|
-
className: cn(
|
|
3011
|
-
toastVariants({ variant, severity }),
|
|
3012
|
-
className,
|
|
3013
|
-
direction === "rtl" ? "hawa-p-6 hawa-pl-0 hawa-pr-10 data-[state=closed]:hawa-slide-out-to-left-full" : "hawa-p-6 hawa-pr-8 data-[state=closed]:hawa-slide-out-to-right-full"
|
|
3014
|
-
),
|
|
3015
|
-
dir: direction,
|
|
3016
|
-
...props
|
|
3017
|
-
}
|
|
3018
|
-
);
|
|
3019
|
-
});
|
|
3020
|
-
Toast.displayName = ToastPrimitives.Root.displayName;
|
|
3021
|
-
var ToastAction = React59.forwardRef(({ className, ...props }, ref) => {
|
|
3022
|
-
return /* @__PURE__ */ React59.createElement(
|
|
3023
|
-
ToastPrimitives.Action,
|
|
3024
|
-
{
|
|
3025
|
-
ref,
|
|
3026
|
-
className: cn(
|
|
3027
|
-
"hawa-inline-flex hawa-h-8 hawa-shrink-0 hawa-items-center hawa-justify-center hawa-rounded-md hawa-border hawa-bg-transparent hawa-px-3 hawa-text-sm hawa-font-medium hawa-ring-offset-background hawa-transition-colors hover:hawa-bg-secondary hover:hawa-text-secondary-foreground focus:hawa-outline-none focus:hawa-ring-2 focus:hawa-ring-ring focus:hawa-ring-offset-2 disabled:hawa-pointer-events-none disabled:hawa-opacity-50",
|
|
3028
|
-
"group-[.info]:hawa-border-muted/40 group-[.info]:hover:hawa-border-info/30 group-[.info]:hover:hawa-bg-info group-[.info]:hover:hawa-text-info-foreground group-[.info]:focus:hawa-ring-info",
|
|
3029
|
-
"group-[.error]:hawa-border-muted/40 group-[.error]:hover:hawa-border-error/30 group-[.error]:hover:hawa-bg-error group-[.error]:hover:hawa-text-error-foreground group-[.error]:focus:hawa-ring-error",
|
|
3030
|
-
"group-[.success]:hawa-border-muted/40 group-[.success]:hover:hawa-border-success/30 group-[.success]:hover:hawa-bg-success group-[.success]:hover:hawa-text-success-foreground group-[.success]:focus:hawa-ring-success",
|
|
3031
|
-
"group-[.warning]:hawa-border-muted/40 group-[.warning]:hover:hawa-border-warning/30 group-[.warning]:hover:hawa-bg-warning group-[.warning]:hover:hawa-text-warning-foreground group-[.warning]:focus:hawa-ring-warning",
|
|
3032
|
-
className
|
|
3033
|
-
),
|
|
3034
|
-
...props
|
|
3035
|
-
}
|
|
3036
|
-
);
|
|
3037
|
-
});
|
|
3038
|
-
ToastAction.displayName = ToastPrimitives.Action.displayName;
|
|
3039
|
-
var ToastClose = React59.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React59.createElement(
|
|
3040
|
-
ToastPrimitives.Close,
|
|
3041
|
-
{
|
|
3042
|
-
ref,
|
|
3043
|
-
className: cn(
|
|
3044
|
-
"hawa-absolute hawa-right-2 hawa-top-2 hawa-rounded-md hawa-p-1 hawa-text-foreground/50 hawa-opacity-0 hawa-transition-opacity hover:hawa-text-foreground focus:hawa-opacity-100 focus:hawa-outline-none focus:hawa-ring-2 group-hover:hawa-opacity-100 group-[.destructive]:hawa-text-red-300 group-[.destructive]:hover:hawa-text-red-50 group-[.destructive]:focus:hawa-ring-red-400 group-[.destructive]:focus:hawa-ring-offset-red-600",
|
|
3045
|
-
className
|
|
3046
|
-
),
|
|
3047
|
-
"toast-close": "",
|
|
3048
|
-
...props
|
|
3049
|
-
},
|
|
3050
|
-
/* @__PURE__ */ React59.createElement(
|
|
3051
|
-
"svg",
|
|
3052
|
-
{
|
|
3053
|
-
"aria-label": "Close Icon",
|
|
3054
|
-
"aria-hidden": "true",
|
|
3055
|
-
className: "hawa-icon",
|
|
3056
|
-
fill: "currentColor",
|
|
3057
|
-
viewBox: "0 0 20 20"
|
|
3058
|
-
},
|
|
3059
|
-
/* @__PURE__ */ React59.createElement(
|
|
3060
|
-
"path",
|
|
680
|
+
...props
|
|
681
|
+
}, ref) => {
|
|
682
|
+
return /* @__PURE__ */ React7.createElement("div", { className: "hawa-relative hawa-flex hawa-h-full hawa-w-full hawa-flex-col hawa-gap-2" }, props.label && /* @__PURE__ */ React7.createElement(Label, { ...labelProps }, props.label), /* @__PURE__ */ React7.createElement(
|
|
683
|
+
"textarea",
|
|
3061
684
|
{
|
|
3062
|
-
|
|
3063
|
-
|
|
3064
|
-
|
|
685
|
+
className: cn(
|
|
686
|
+
"hawa-flex hawa-min-h-[40px] hawa-w-full hawa-rounded-md hawa-border hawa-border-input hawa-bg-background hawa-px-3 hawa-py-2 hawa-text-sm hawa-ring-offset-background placeholder:hawa-text-gray-400 placeholder:hawa-text-muted-foreground focus-visible:hawa-outline-none focus-visible:hawa-ring-2 focus-visible:hawa-ring-ring focus-visible:hawa-ring-offset-0 disabled:hawa-cursor-not-allowed disabled:hawa-opacity-50",
|
|
687
|
+
className
|
|
688
|
+
),
|
|
689
|
+
ref,
|
|
690
|
+
...textareaProps
|
|
3065
691
|
}
|
|
3066
|
-
)
|
|
3067
|
-
|
|
3068
|
-
|
|
3069
|
-
|
|
3070
|
-
|
|
3071
|
-
|
|
3072
|
-
|
|
3073
|
-
|
|
3074
|
-
|
|
3075
|
-
|
|
3076
|
-
|
|
3077
|
-
|
|
3078
|
-
|
|
3079
|
-
|
|
3080
|
-
|
|
3081
|
-
|
|
3082
|
-
|
|
3083
|
-
|
|
3084
|
-
|
|
3085
|
-
|
|
3086
|
-
|
|
3087
|
-
|
|
692
|
+
), /* @__PURE__ */ React7.createElement("div", { className: "hawa-flex hawa-flex-row hawa-justify-between" }, !forceHideHelperText && /* @__PURE__ */ React7.createElement(
|
|
693
|
+
"p",
|
|
694
|
+
{
|
|
695
|
+
className: cn(
|
|
696
|
+
"hawa-my-0 hawa-text-start hawa-text-xs hawa-text-helper-color hawa-transition-all",
|
|
697
|
+
props.helperText ? "hawa-h-4 hawa-opacity-100" : "hawa-h-0 hawa-opacity-0"
|
|
698
|
+
)
|
|
699
|
+
},
|
|
700
|
+
props.helperText
|
|
701
|
+
), showCount && /* @__PURE__ */ React7.createElement(
|
|
702
|
+
"div",
|
|
703
|
+
{
|
|
704
|
+
className: cn(
|
|
705
|
+
" hawa-text-start hawa-text-xs hawa-transition-all ",
|
|
706
|
+
{
|
|
707
|
+
"hawa-absolute hawa-bottom-[80px] hawa-end-0 hawa-translate-y-1/2": countPosition === "top"
|
|
708
|
+
}
|
|
709
|
+
)
|
|
710
|
+
},
|
|
711
|
+
(textareaProps == null ? void 0 : textareaProps.value) ? String(textareaProps == null ? void 0 : textareaProps.value).length : 0,
|
|
712
|
+
"/",
|
|
713
|
+
textareaProps == null ? void 0 : textareaProps.maxLength
|
|
714
|
+
)));
|
|
3088
715
|
}
|
|
3089
|
-
)
|
|
3090
|
-
|
|
3091
|
-
|
|
3092
|
-
// components/elements/Toaster.tsx
|
|
3093
|
-
var import_react35 = __toESM(require("react"));
|
|
3094
|
-
|
|
3095
|
-
// components/hooks/useToast.ts
|
|
3096
|
-
var React60 = __toESM(require("react"));
|
|
3097
|
-
|
|
3098
|
-
// components/elements/Breadcrumb.tsx
|
|
3099
|
-
var import_react36 = __toESM(require("react"));
|
|
3100
|
-
|
|
3101
|
-
// components/elements/Badge.tsx
|
|
3102
|
-
var import_react37 = __toESM(require("react"));
|
|
3103
|
-
|
|
3104
|
-
// components/elements/AppStores.tsx
|
|
3105
|
-
var import_react38 = __toESM(require("react"));
|
|
3106
|
-
|
|
3107
|
-
// components/elements/DestroyableCard.tsx
|
|
3108
|
-
var import_react39 = __toESM(require("react"));
|
|
3109
|
-
|
|
3110
|
-
// components/elements/InterfaceSettings.tsx
|
|
3111
|
-
var import_react40 = __toESM(require("react"));
|
|
716
|
+
);
|
|
717
|
+
Textarea.displayName = "Textarea";
|
|
3112
718
|
|
|
3113
719
|
// components/blocks/feedback/UserReferralSource.tsx
|
|
3114
720
|
var UserReferralSource = ({
|
|
@@ -3117,8 +723,8 @@ var UserReferralSource = ({
|
|
|
3117
723
|
...props
|
|
3118
724
|
}) => {
|
|
3119
725
|
var _a, _b;
|
|
3120
|
-
const [closed, setClosed] = (0,
|
|
3121
|
-
const popUpRef = (0,
|
|
726
|
+
const [closed, setClosed] = (0, import_react4.useState)(false);
|
|
727
|
+
const popUpRef = (0, import_react4.useRef)(null);
|
|
3122
728
|
const formSchema = z.object({
|
|
3123
729
|
source: z.string({ required_error: (_a = props.texts) == null ? void 0 : _a.pleaseSelectOption }),
|
|
3124
730
|
feedback: z.string().optional()
|
|
@@ -3138,7 +744,7 @@ var UserReferralSource = ({
|
|
|
3138
744
|
label: "Other"
|
|
3139
745
|
}
|
|
3140
746
|
];
|
|
3141
|
-
return /* @__PURE__ */
|
|
747
|
+
return /* @__PURE__ */ import_react4.default.createElement(
|
|
3142
748
|
"div",
|
|
3143
749
|
{
|
|
3144
750
|
className: cn(
|
|
@@ -3147,7 +753,7 @@ var UserReferralSource = ({
|
|
|
3147
753
|
),
|
|
3148
754
|
ref: popUpRef
|
|
3149
755
|
},
|
|
3150
|
-
/* @__PURE__ */
|
|
756
|
+
/* @__PURE__ */ import_react4.default.createElement(
|
|
3151
757
|
Card,
|
|
3152
758
|
{
|
|
3153
759
|
className: cn(
|
|
@@ -3156,7 +762,7 @@ var UserReferralSource = ({
|
|
|
3156
762
|
),
|
|
3157
763
|
dir: props.direction
|
|
3158
764
|
},
|
|
3159
|
-
/* @__PURE__ */
|
|
765
|
+
/* @__PURE__ */ import_react4.default.createElement(
|
|
3160
766
|
"button",
|
|
3161
767
|
{
|
|
3162
768
|
type: "button",
|
|
@@ -3175,7 +781,7 @@ var UserReferralSource = ({
|
|
|
3175
781
|
}, 200);
|
|
3176
782
|
}
|
|
3177
783
|
},
|
|
3178
|
-
/* @__PURE__ */
|
|
784
|
+
/* @__PURE__ */ import_react4.default.createElement(
|
|
3179
785
|
"svg",
|
|
3180
786
|
{
|
|
3181
787
|
"aria-hidden": "true",
|
|
@@ -3183,7 +789,7 @@ var UserReferralSource = ({
|
|
|
3183
789
|
fill: "currentColor",
|
|
3184
790
|
viewBox: "0 0 20 20"
|
|
3185
791
|
},
|
|
3186
|
-
/* @__PURE__ */
|
|
792
|
+
/* @__PURE__ */ import_react4.default.createElement(
|
|
3187
793
|
"path",
|
|
3188
794
|
{
|
|
3189
795
|
fillRule: "evenodd",
|
|
@@ -3193,7 +799,7 @@ var UserReferralSource = ({
|
|
|
3193
799
|
)
|
|
3194
800
|
)
|
|
3195
801
|
),
|
|
3196
|
-
/* @__PURE__ */
|
|
802
|
+
/* @__PURE__ */ import_react4.default.createElement(CardContent, { headless: true }, /* @__PURE__ */ import_react4.default.createElement(
|
|
3197
803
|
"form",
|
|
3198
804
|
{
|
|
3199
805
|
noValidate: true,
|
|
@@ -3205,7 +811,7 @@ var UserReferralSource = ({
|
|
|
3205
811
|
}
|
|
3206
812
|
})
|
|
3207
813
|
},
|
|
3208
|
-
/* @__PURE__ */
|
|
814
|
+
/* @__PURE__ */ import_react4.default.createElement(
|
|
3209
815
|
"div",
|
|
3210
816
|
{
|
|
3211
817
|
className: cn(
|
|
@@ -3213,15 +819,15 @@ var UserReferralSource = ({
|
|
|
3213
819
|
closed ? "hawa-opacity-0" : "hawa-opacity-100"
|
|
3214
820
|
)
|
|
3215
821
|
},
|
|
3216
|
-
/* @__PURE__ */
|
|
3217
|
-
/* @__PURE__ */
|
|
822
|
+
/* @__PURE__ */ import_react4.default.createElement("div", { className: "hawa-mt-4 hawa-font-bold" }, props.question),
|
|
823
|
+
/* @__PURE__ */ import_react4.default.createElement("div", { className: "hawa-flex hawa-w-full hawa-flex-row hawa-gap-1 hawa-rounded " }, /* @__PURE__ */ import_react4.default.createElement(
|
|
3218
824
|
import_react_hook_form.Controller,
|
|
3219
825
|
{
|
|
3220
826
|
control,
|
|
3221
827
|
name: "source",
|
|
3222
828
|
render: ({ field }) => {
|
|
3223
829
|
var _a2, _b2;
|
|
3224
|
-
return /* @__PURE__ */
|
|
830
|
+
return /* @__PURE__ */ import_react4.default.createElement(
|
|
3225
831
|
Radio,
|
|
3226
832
|
{
|
|
3227
833
|
direction: props.direction,
|
|
@@ -3235,14 +841,14 @@ var UserReferralSource = ({
|
|
|
3235
841
|
}
|
|
3236
842
|
}
|
|
3237
843
|
)),
|
|
3238
|
-
/* @__PURE__ */
|
|
844
|
+
/* @__PURE__ */ import_react4.default.createElement("div", null, /* @__PURE__ */ import_react4.default.createElement(
|
|
3239
845
|
import_react_hook_form.Controller,
|
|
3240
846
|
{
|
|
3241
847
|
control,
|
|
3242
848
|
name: "feedback",
|
|
3243
849
|
render: ({ field }) => {
|
|
3244
850
|
var _a2, _b2;
|
|
3245
|
-
return /* @__PURE__ */
|
|
851
|
+
return /* @__PURE__ */ import_react4.default.createElement(
|
|
3246
852
|
Textarea,
|
|
3247
853
|
{
|
|
3248
854
|
...field,
|
|
@@ -3257,28 +863,28 @@ var UserReferralSource = ({
|
|
|
3257
863
|
}
|
|
3258
864
|
))
|
|
3259
865
|
),
|
|
3260
|
-
/* @__PURE__ */
|
|
866
|
+
/* @__PURE__ */ import_react4.default.createElement(Button, { type: "submit", className: "hawa-mt-4 hawa-w-full" }, ((_b = props.texts) == null ? void 0 : _b.submit) || "Submit")
|
|
3261
867
|
))
|
|
3262
868
|
)
|
|
3263
869
|
);
|
|
3264
870
|
};
|
|
3265
871
|
|
|
3266
872
|
// components/blocks/feedback/FeedbackRating.tsx
|
|
3267
|
-
var
|
|
873
|
+
var import_react5 = __toESM(require("react"));
|
|
3268
874
|
var FeedbackRating = ({
|
|
3269
875
|
position = "bottom-right",
|
|
3270
876
|
...props
|
|
3271
877
|
}) => {
|
|
3272
|
-
const [closed, setClosed] = (0,
|
|
3273
|
-
const [answered, setAnswered] = (0,
|
|
3274
|
-
const [clickedOption, setClickedOption] = (0,
|
|
3275
|
-
const [closingTimer, setClosingTimer] = (0,
|
|
3276
|
-
const popUpRef = (0,
|
|
878
|
+
const [closed, setClosed] = (0, import_react5.useState)(false);
|
|
879
|
+
const [answered, setAnswered] = (0, import_react5.useState)(false);
|
|
880
|
+
const [clickedOption, setClickedOption] = (0, import_react5.useState)(null);
|
|
881
|
+
const [closingTimer, setClosingTimer] = (0, import_react5.useState)(5);
|
|
882
|
+
const popUpRef = (0, import_react5.useRef)(null);
|
|
3277
883
|
const boxPosition = {
|
|
3278
884
|
"bottom-right": "hawa-right-4",
|
|
3279
885
|
"bottom-left": "hawa-left-4"
|
|
3280
886
|
};
|
|
3281
|
-
(0,
|
|
887
|
+
(0, import_react5.useEffect)(() => {
|
|
3282
888
|
const timeoutHide = setTimeout(() => {
|
|
3283
889
|
if (closingTimer >= 0) {
|
|
3284
890
|
setClosingTimer(closingTimer - 1);
|
|
@@ -3296,99 +902,259 @@ var FeedbackRating = ({
|
|
|
3296
902
|
}
|
|
3297
903
|
}, 200);
|
|
3298
904
|
};
|
|
3299
|
-
return /* @__PURE__ */
|
|
905
|
+
return /* @__PURE__ */ import_react5.default.createElement(
|
|
3300
906
|
"div",
|
|
3301
907
|
{
|
|
3302
|
-
ref: popUpRef,
|
|
3303
|
-
className: cn(
|
|
3304
|
-
props.banner ? "hawa-fixed hawa-bottom-0 hawa-left-0 hawa-w-full hawa-px-0 md:hawa-px-4" : "hawa-fixed hawa-bottom-4 ",
|
|
3305
|
-
boxPosition[position]
|
|
3306
|
-
)
|
|
3307
|
-
},
|
|
3308
|
-
/* @__PURE__ */
|
|
3309
|
-
"div",
|
|
3310
|
-
{
|
|
3311
|
-
className: cn(
|
|
3312
|
-
"hawa-relative hawa-flex hawa-w-full hawa-flex-col hawa-gap-2 hawa-rounded hawa-border hawa-bg-background hawa-p-4 hawa-shadow-md hawa-transition-all",
|
|
3313
|
-
closed ? "hawa-opacity-0" : "hawa-opacity-100",
|
|
3314
|
-
props.banner && "hawa-rounded-none hawa-px-4 md:hawa-rounded-t md:hawa-px-64"
|
|
3315
|
-
)
|
|
3316
|
-
},
|
|
3317
|
-
/* @__PURE__ */
|
|
3318
|
-
/* @__PURE__ */
|
|
3319
|
-
"button",
|
|
3320
|
-
{
|
|
3321
|
-
type: "button",
|
|
3322
|
-
className: "hawa-absolute hawa-right-2 hawa-top-2 hawa-inline-flex hawa-h-8 hawa-w-8 hawa-rounded hawa-p-1.5 hawa-text-gray-400 hover:hawa-bg-gray-100 hover:hawa-text-gray-900 focus:hawa-ring-2 focus:hawa-ring-gray-300 dark:hawa-bg-gray-800 dark:hawa-text-gray-500 dark:hover:hawa-bg-gray-700 dark:hover:hawa-text-white",
|
|
3323
|
-
"data-dismiss-target": "#toast-default",
|
|
3324
|
-
"aria-label": "Close",
|
|
3325
|
-
onClick: () => slowClose()
|
|
3326
|
-
},
|
|
3327
|
-
/* @__PURE__ */
|
|
3328
|
-
"svg",
|
|
3329
|
-
{
|
|
3330
|
-
"aria-hidden": "true",
|
|
3331
|
-
className: "hawa-h-5 hawa-w-5",
|
|
3332
|
-
fill: "currentColor",
|
|
3333
|
-
viewBox: "0 0 20 20"
|
|
3334
|
-
},
|
|
3335
|
-
/* @__PURE__ */
|
|
3336
|
-
"path",
|
|
3337
|
-
{
|
|
3338
|
-
fillRule: "evenodd",
|
|
3339
|
-
d: "M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",
|
|
3340
|
-
clipRule: "evenodd"
|
|
3341
|
-
}
|
|
3342
|
-
)
|
|
3343
|
-
)
|
|
3344
|
-
),
|
|
3345
|
-
/* @__PURE__ */
|
|
3346
|
-
/* @__PURE__ */
|
|
3347
|
-
"span",
|
|
3348
|
-
{
|
|
3349
|
-
key: i,
|
|
3350
|
-
onClick: () => {
|
|
3351
|
-
if (props.onOptionClicked) {
|
|
3352
|
-
props.onOptionClicked(op);
|
|
3353
|
-
}
|
|
3354
|
-
setClickedOption(op);
|
|
3355
|
-
setAnswered(true);
|
|
3356
|
-
const timeoutDestroy = setTimeout(() => {
|
|
3357
|
-
setClosed(true);
|
|
3358
|
-
}, 4800);
|
|
3359
|
-
setTimeout(() => {
|
|
3360
|
-
var _a, _b;
|
|
3361
|
-
(_b = popUpRef.current) == null ? void 0 : _b.removeChild(
|
|
3362
|
-
(_a = popUpRef.current) == null ? void 0 : _a.children[0]
|
|
3363
|
-
);
|
|
3364
|
-
clearTimeout(timeoutDestroy);
|
|
3365
|
-
}, 5300);
|
|
3366
|
-
},
|
|
3367
|
-
className: cn(
|
|
3368
|
-
"hawa-w-full hawa-cursor-pointer hawa-rounded hawa-border hawa-p-4 hawa-text-center hawa-transition-all ",
|
|
3369
|
-
clickedOption === op ? "hawa-bg-gray-500 hawa-text-white" : "hawa-border hawa-bg-background hover:hawa-bg-gray-300 dark:hover:hawa-bg-gray-700"
|
|
3370
|
-
)
|
|
3371
|
-
},
|
|
3372
|
-
op
|
|
3373
|
-
))),
|
|
3374
|
-
props.texts && /* @__PURE__ */
|
|
3375
|
-
answered && /* @__PURE__ */
|
|
3376
|
-
)
|
|
3377
|
-
);
|
|
3378
|
-
};
|
|
908
|
+
ref: popUpRef,
|
|
909
|
+
className: cn(
|
|
910
|
+
props.banner ? "hawa-fixed hawa-bottom-0 hawa-left-0 hawa-w-full hawa-px-0 md:hawa-px-4" : "hawa-fixed hawa-bottom-4 ",
|
|
911
|
+
boxPosition[position]
|
|
912
|
+
)
|
|
913
|
+
},
|
|
914
|
+
/* @__PURE__ */ import_react5.default.createElement(
|
|
915
|
+
"div",
|
|
916
|
+
{
|
|
917
|
+
className: cn(
|
|
918
|
+
"hawa-relative hawa-flex hawa-w-full hawa-flex-col hawa-gap-2 hawa-rounded hawa-border hawa-bg-background hawa-p-4 hawa-shadow-md hawa-transition-all",
|
|
919
|
+
closed ? "hawa-opacity-0" : "hawa-opacity-100",
|
|
920
|
+
props.banner && "hawa-rounded-none hawa-px-4 md:hawa-rounded-t md:hawa-px-64"
|
|
921
|
+
)
|
|
922
|
+
},
|
|
923
|
+
/* @__PURE__ */ import_react5.default.createElement("div", { className: "hawa-absolute hawa-left-2 hawa-top-2 hawa-p-1.5 hawa-text-sm" }, props.title),
|
|
924
|
+
/* @__PURE__ */ import_react5.default.createElement(
|
|
925
|
+
"button",
|
|
926
|
+
{
|
|
927
|
+
type: "button",
|
|
928
|
+
className: "hawa-absolute hawa-right-2 hawa-top-2 hawa-inline-flex hawa-h-8 hawa-w-8 hawa-rounded hawa-p-1.5 hawa-text-gray-400 hover:hawa-bg-gray-100 hover:hawa-text-gray-900 focus:hawa-ring-2 focus:hawa-ring-gray-300 dark:hawa-bg-gray-800 dark:hawa-text-gray-500 dark:hover:hawa-bg-gray-700 dark:hover:hawa-text-white",
|
|
929
|
+
"data-dismiss-target": "#toast-default",
|
|
930
|
+
"aria-label": "Close",
|
|
931
|
+
onClick: () => slowClose()
|
|
932
|
+
},
|
|
933
|
+
/* @__PURE__ */ import_react5.default.createElement(
|
|
934
|
+
"svg",
|
|
935
|
+
{
|
|
936
|
+
"aria-hidden": "true",
|
|
937
|
+
className: "hawa-h-5 hawa-w-5",
|
|
938
|
+
fill: "currentColor",
|
|
939
|
+
viewBox: "0 0 20 20"
|
|
940
|
+
},
|
|
941
|
+
/* @__PURE__ */ import_react5.default.createElement(
|
|
942
|
+
"path",
|
|
943
|
+
{
|
|
944
|
+
fillRule: "evenodd",
|
|
945
|
+
d: "M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",
|
|
946
|
+
clipRule: "evenodd"
|
|
947
|
+
}
|
|
948
|
+
)
|
|
949
|
+
)
|
|
950
|
+
),
|
|
951
|
+
/* @__PURE__ */ import_react5.default.createElement("div", { className: "hawa-mt-8" }, props.question),
|
|
952
|
+
/* @__PURE__ */ import_react5.default.createElement("div", { className: "hawa-flex hawa-w-full hawa-flex-row hawa-gap-1 hawa-rounded" }, props.options && props.options.map((op, i) => /* @__PURE__ */ import_react5.default.createElement(
|
|
953
|
+
"span",
|
|
954
|
+
{
|
|
955
|
+
key: i,
|
|
956
|
+
onClick: () => {
|
|
957
|
+
if (props.onOptionClicked) {
|
|
958
|
+
props.onOptionClicked(op);
|
|
959
|
+
}
|
|
960
|
+
setClickedOption(op);
|
|
961
|
+
setAnswered(true);
|
|
962
|
+
const timeoutDestroy = setTimeout(() => {
|
|
963
|
+
setClosed(true);
|
|
964
|
+
}, 4800);
|
|
965
|
+
setTimeout(() => {
|
|
966
|
+
var _a, _b;
|
|
967
|
+
(_b = popUpRef.current) == null ? void 0 : _b.removeChild(
|
|
968
|
+
(_a = popUpRef.current) == null ? void 0 : _a.children[0]
|
|
969
|
+
);
|
|
970
|
+
clearTimeout(timeoutDestroy);
|
|
971
|
+
}, 5300);
|
|
972
|
+
},
|
|
973
|
+
className: cn(
|
|
974
|
+
"hawa-w-full hawa-cursor-pointer hawa-rounded hawa-border hawa-p-4 hawa-text-center hawa-transition-all ",
|
|
975
|
+
clickedOption === op ? "hawa-bg-gray-500 hawa-text-white" : "hawa-border hawa-bg-background hover:hawa-bg-gray-300 dark:hover:hawa-bg-gray-700"
|
|
976
|
+
)
|
|
977
|
+
},
|
|
978
|
+
op
|
|
979
|
+
))),
|
|
980
|
+
props.texts && /* @__PURE__ */ import_react5.default.createElement("div", { className: " hawa-flex hawa-flex-row hawa-justify-between hawa-text-xs" }, /* @__PURE__ */ import_react5.default.createElement("span", null, props.texts.least), /* @__PURE__ */ import_react5.default.createElement("span", null, props.texts.most)),
|
|
981
|
+
answered && /* @__PURE__ */ import_react5.default.createElement("div", { className: "hawa-absolute hawa-left-0 hawa-top-0 hawa-flex hawa-h-full hawa-w-full hawa-flex-col hawa-items-center hawa-justify-center hawa-gap-2 hawa-rounded hawa-bg-black hawa-bg-opacity-80 hawa-p-4 hawa-text-center hawa-transition-all" }, /* @__PURE__ */ import_react5.default.createElement("span", { className: "hawa-font-bold hawa-text-white" }, "Thank you for your answer. This box will disappear in", " " + closingTimer, " seconds"), /* @__PURE__ */ import_react5.default.createElement("div", { className: "hawa-flex hawa-flex-row hawa-gap-2" }, /* @__PURE__ */ import_react5.default.createElement(Button, { variant: "secondary", onClick: () => slowClose() }, "Close")))
|
|
982
|
+
)
|
|
983
|
+
);
|
|
984
|
+
};
|
|
985
|
+
|
|
986
|
+
// components/blocks/feedback/FeedbackEmoji.tsx
|
|
987
|
+
var import_react9 = __toESM(require("react"));
|
|
988
|
+
|
|
989
|
+
// components/elements/popover/Popover.tsx
|
|
990
|
+
var React10 = __toESM(require("react"));
|
|
991
|
+
var PopoverPrimitive = __toESM(require("@radix-ui/react-popover"));
|
|
992
|
+
var PopoverContent = React10.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ React10.createElement(PopoverPrimitive.Portal, null, /* @__PURE__ */ React10.createElement(
|
|
993
|
+
PopoverPrimitive.Content,
|
|
994
|
+
{
|
|
995
|
+
ref,
|
|
996
|
+
align,
|
|
997
|
+
sideOffset,
|
|
998
|
+
className: cn(
|
|
999
|
+
"dark:dark-shadow hawa-z-50 hawa-rounded hawa-border hawa-bg-popover hawa-text-popover-foreground hawa-shadow-md hawa-outline-none data-[state=open]:hawa-animate-in data-[state=closed]:hawa-animate-out data-[state=closed]:hawa-fade-out-0 data-[state=open]:hawa-fade-in-0 data-[state=closed]:hawa-zoom-out-95 data-[state=open]:hawa-zoom-in-95 data-[side=bottom]:hawa-slide-in-from-top-2 data-[side=left]:hawa-slide-in-from-right-2 data-[side=right]:hawa-slide-in-from-left-2 data-[side=top]:hawa-slide-in-from-bottom-2",
|
|
1000
|
+
className
|
|
1001
|
+
),
|
|
1002
|
+
...props
|
|
1003
|
+
}
|
|
1004
|
+
)));
|
|
1005
|
+
PopoverContent.displayName = PopoverPrimitive.Content.displayName;
|
|
1006
|
+
var Popover = ({
|
|
1007
|
+
trigger,
|
|
1008
|
+
children,
|
|
1009
|
+
className,
|
|
1010
|
+
align = "center",
|
|
1011
|
+
side,
|
|
1012
|
+
sideOffset = 4,
|
|
1013
|
+
open,
|
|
1014
|
+
width = "default",
|
|
1015
|
+
disableTrigger,
|
|
1016
|
+
contentProps,
|
|
1017
|
+
triggerProps,
|
|
1018
|
+
...props
|
|
1019
|
+
}) => {
|
|
1020
|
+
let widthStyles = {
|
|
1021
|
+
trigger: "var(--radix-popover-trigger-width)",
|
|
1022
|
+
default: "auto"
|
|
1023
|
+
};
|
|
1024
|
+
return /* @__PURE__ */ React10.createElement(PopoverPrimitive.Root, { open, ...props }, /* @__PURE__ */ React10.createElement(
|
|
1025
|
+
PopoverPrimitive.Trigger,
|
|
1026
|
+
{
|
|
1027
|
+
className: "hawa-w-full",
|
|
1028
|
+
disabled: disableTrigger,
|
|
1029
|
+
...triggerProps
|
|
1030
|
+
},
|
|
1031
|
+
trigger
|
|
1032
|
+
), /* @__PURE__ */ React10.createElement(
|
|
1033
|
+
PopoverContent,
|
|
1034
|
+
{
|
|
1035
|
+
side,
|
|
1036
|
+
className,
|
|
1037
|
+
align,
|
|
1038
|
+
sideOffset,
|
|
1039
|
+
style: {
|
|
1040
|
+
width: widthStyles[width]
|
|
1041
|
+
},
|
|
1042
|
+
...contentProps
|
|
1043
|
+
},
|
|
1044
|
+
children
|
|
1045
|
+
));
|
|
1046
|
+
};
|
|
1047
|
+
|
|
1048
|
+
// components/icons/Emojis.tsx
|
|
1049
|
+
var import_react6 = __toESM(require("react"));
|
|
1050
|
+
var VeryGoodEmoji = () => /* @__PURE__ */ import_react6.default.createElement(
|
|
1051
|
+
"svg",
|
|
1052
|
+
{
|
|
1053
|
+
fill: "none",
|
|
1054
|
+
height: "16",
|
|
1055
|
+
viewBox: "0 0 16 16",
|
|
1056
|
+
width: "16",
|
|
1057
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
1058
|
+
},
|
|
1059
|
+
/* @__PURE__ */ import_react6.default.createElement("g", { clipPath: "url(#clip0_53_166)" }, /* @__PURE__ */ import_react6.default.createElement(
|
|
1060
|
+
"path",
|
|
1061
|
+
{
|
|
1062
|
+
clipRule: "evenodd",
|
|
1063
|
+
d: "M14.5 8C14.5 11.5899 11.5899 14.5 8 14.5C4.41015 14.5 1.5 11.5899 1.5 8C1.5 4.41015 4.41015 1.5 8 1.5C11.5899 1.5 14.5 4.41015 14.5 8ZM16 8C16 12.4183 12.4183 16 8 16C3.58172 16 0 12.4183 0 8C0 3.58172 3.58172 0 8 0C12.4183 0 16 3.58172 16 8ZM4.5 8.97498H3.875V9.59998C3.875 11.4747 5.81046 12.8637 7.99817 12.8637C10.1879 12.8637 12.125 11.4832 12.125 9.59998V8.97498H11.5H4.5ZM7.99817 11.6137C6.59406 11.6137 5.63842 10.9482 5.28118 10.225H10.7202C10.3641 10.9504 9.40797 11.6137 7.99817 11.6137Z",
|
|
1064
|
+
fill: "currentColor",
|
|
1065
|
+
fillRule: "evenodd"
|
|
1066
|
+
}
|
|
1067
|
+
), /* @__PURE__ */ import_react6.default.createElement(
|
|
1068
|
+
"path",
|
|
1069
|
+
{
|
|
1070
|
+
clipRule: "evenodd",
|
|
1071
|
+
d: "M6.15295 4.92093L5.375 3.5L4.59705 4.92093L3 5.21885L4.11625 6.39495L3.90717 8L5.375 7.30593L6.84283 8L6.63375 6.39495L7.75 5.21885L6.15295 4.92093ZM11.403 4.92093L10.625 3.5L9.84705 4.92093L8.25 5.21885L9.36625 6.39495L9.15717 8L10.625 7.30593L12.0928 8L11.8837 6.39495L13 5.21885L11.403 4.92093Z",
|
|
1072
|
+
fill: "#FF990A",
|
|
1073
|
+
fillRule: "evenodd"
|
|
1074
|
+
}
|
|
1075
|
+
))
|
|
1076
|
+
);
|
|
1077
|
+
var GoodEmoji = () => /* @__PURE__ */ import_react6.default.createElement(
|
|
1078
|
+
"svg",
|
|
1079
|
+
{
|
|
1080
|
+
fill: "none",
|
|
1081
|
+
height: "16",
|
|
1082
|
+
viewBox: "0 0 16 16",
|
|
1083
|
+
width: "16",
|
|
1084
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
1085
|
+
},
|
|
1086
|
+
/* @__PURE__ */ import_react6.default.createElement("g", { clipPath: "url(#clip0_53_167)" }, /* @__PURE__ */ import_react6.default.createElement(
|
|
1087
|
+
"path",
|
|
1088
|
+
{
|
|
1089
|
+
clipRule: "evenodd",
|
|
1090
|
+
d: "M14.5 8C14.5 11.5899 11.5899 14.5 8 14.5C4.41015 14.5 1.5 11.5899 1.5 8C1.5 4.41015 4.41015 1.5 8 1.5C11.5899 1.5 14.5 4.41015 14.5 8ZM16 8C16 12.4183 12.4183 16 8 16C3.58172 16 0 12.4183 0 8C0 3.58172 3.58172 0 8 0C12.4183 0 16 3.58172 16 8ZM11.5249 10.8478L11.8727 10.3286L10.8342 9.6329L10.4863 10.1522C9.94904 10.9543 9.0363 11.4802 8.00098 11.4802C6.96759 11.4802 6.05634 10.9563 5.51863 10.1567L5.16986 9.63804L4.13259 10.3356L4.48137 10.8542C5.2414 11.9844 6.53398 12.7302 8.00098 12.7302C9.47073 12.7302 10.7654 11.9816 11.5249 10.8478ZM6.75 6.75C6.75 7.30228 6.30228 7.75 5.75 7.75C5.19772 7.75 4.75 7.30228 4.75 6.75C4.75 6.19772 5.19772 5.75 5.75 5.75C6.30228 5.75 6.75 6.19772 6.75 6.75ZM10.25 7.75C10.8023 7.75 11.25 7.30228 11.25 6.75C11.25 6.19772 10.8023 5.75 10.25 5.75C9.69771 5.75 9.25 6.19772 9.25 6.75C9.25 7.30228 9.69771 7.75 10.25 7.75Z",
|
|
1091
|
+
fill: "currentColor",
|
|
1092
|
+
fillRule: "evenodd"
|
|
1093
|
+
}
|
|
1094
|
+
))
|
|
1095
|
+
);
|
|
1096
|
+
var BadEmoji = () => /* @__PURE__ */ import_react6.default.createElement(
|
|
1097
|
+
"svg",
|
|
1098
|
+
{
|
|
1099
|
+
fill: "none",
|
|
1100
|
+
height: "16",
|
|
1101
|
+
viewBox: "0 0 16 16",
|
|
1102
|
+
width: "16",
|
|
1103
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
1104
|
+
},
|
|
1105
|
+
/* @__PURE__ */ import_react6.default.createElement("g", { clipPath: "url(#clip0_53_152)" }, /* @__PURE__ */ import_react6.default.createElement(
|
|
1106
|
+
"path",
|
|
1107
|
+
{
|
|
1108
|
+
clipRule: "evenodd",
|
|
1109
|
+
d: "M14.5 8C14.5 11.5899 11.5899 14.5 8 14.5C4.41015 14.5 1.5 11.5899 1.5 8C1.5 4.41015 4.41015 1.5 8 1.5C11.5899 1.5 14.5 4.41015 14.5 8ZM16 8C16 12.4183 12.4183 16 8 16C3.58172 16 0 12.4183 0 8C0 3.58172 3.58172 0 8 0C12.4183 0 16 3.58172 16 8ZM5.75 7.75C6.30228 7.75 6.75 7.30228 6.75 6.75C6.75 6.19772 6.30228 5.75 5.75 5.75C5.19772 5.75 4.75 6.19772 4.75 6.75C4.75 7.30228 5.19772 7.75 5.75 7.75ZM11.25 6.75C11.25 7.30228 10.8023 7.75 10.25 7.75C9.69771 7.75 9.25 7.30228 9.25 6.75C9.25 6.19772 9.69771 5.75 10.25 5.75C10.8023 5.75 11.25 6.19772 11.25 6.75ZM11.5249 11.2622L11.8727 11.7814L10.8342 12.4771L10.4863 11.9578C9.94904 11.1557 9.0363 10.6298 8.00098 10.6298C6.96759 10.6298 6.05634 11.1537 5.51863 11.9533L5.16986 12.4719L4.13259 11.7744L4.48137 11.2558C5.2414 10.1256 6.53398 9.37982 8.00098 9.37982C9.47073 9.37982 10.7654 10.1284 11.5249 11.2622Z",
|
|
1110
|
+
fill: "currentColor",
|
|
1111
|
+
fillRule: "evenodd"
|
|
1112
|
+
}
|
|
1113
|
+
))
|
|
1114
|
+
);
|
|
1115
|
+
var VeryBadEmoji = () => /* @__PURE__ */ import_react6.default.createElement(
|
|
1116
|
+
"svg",
|
|
1117
|
+
{
|
|
1118
|
+
fill: "none",
|
|
1119
|
+
height: "16",
|
|
1120
|
+
viewBox: "0 0 16 16",
|
|
1121
|
+
width: "16",
|
|
1122
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
1123
|
+
},
|
|
1124
|
+
/* @__PURE__ */ import_react6.default.createElement("g", { clipPath: "url(#clip0_53_151)" }, /* @__PURE__ */ import_react6.default.createElement(
|
|
1125
|
+
"path",
|
|
1126
|
+
{
|
|
1127
|
+
d: "M11.841 12.0225C12.7197 12.9324 12.7197 14.4077 11.841 15.3176C10.9623 16.2275 9.53769 16.2275 8.65901 15.3176C7.78033 14.4077 7.78033 12.9324 8.65901 12.0225L10.25 10.375L11.841 12.0225Z",
|
|
1128
|
+
fill: "#0070F3"
|
|
1129
|
+
}
|
|
1130
|
+
), /* @__PURE__ */ import_react6.default.createElement(
|
|
1131
|
+
"path",
|
|
1132
|
+
{
|
|
1133
|
+
clipRule: "evenodd",
|
|
1134
|
+
d: "M8 1.5C4.41015 1.5 1.5 4.41015 1.5 8C1.5 10.9668 3.48826 13.4711 6.20649 14.2496L5.79351 15.6916C2.44895 14.7338 0 11.6539 0 8C0 3.58172 3.58172 0 8 0C12.4183 0 16 3.58172 16 8C16 9.4652 15.6054 10.8405 14.9162 12.023L13.6203 11.2677C14.1794 10.3083 14.5 9.19272 14.5 8C14.5 4.41015 11.5899 1.5 8 1.5ZM6.75 6.75C6.75 7.30228 6.30228 7.75 5.75 7.75C5.19772 7.75 4.75 7.30228 4.75 6.75C4.75 6.19772 5.19772 5.75 5.75 5.75C6.30228 5.75 6.75 6.19772 6.75 6.75ZM10.25 7.75C10.8023 7.75 11.25 7.30228 11.25 6.75C11.25 6.19772 10.8023 5.75 10.25 5.75C9.69771 5.75 9.25 6.19772 9.25 6.75C9.25 7.30228 9.69771 7.75 10.25 7.75Z",
|
|
1135
|
+
fill: "currentColor",
|
|
1136
|
+
fillRule: "evenodd"
|
|
1137
|
+
}
|
|
1138
|
+
))
|
|
1139
|
+
);
|
|
1140
|
+
|
|
1141
|
+
// components/icons/InputIcons.tsx
|
|
1142
|
+
var import_react7 = __toESM(require("react"));
|
|
1143
|
+
|
|
1144
|
+
// components/icons/CommonIcons.tsx
|
|
1145
|
+
var import_react8 = __toESM(require("react"));
|
|
3379
1146
|
|
|
3380
1147
|
// components/blocks/feedback/FeedbackEmoji.tsx
|
|
3381
|
-
var import_react43 = __toESM(require("react"));
|
|
3382
1148
|
var FeedbackEmoji = (props) => {
|
|
3383
|
-
const [selectedEmoji, setSelectedEmoji] = (0,
|
|
3384
|
-
const [loadingSubmit, setLoadingSubmit] = (0,
|
|
3385
|
-
const [feedbackText, setFeedbackText] = (0,
|
|
3386
|
-
const [helperText, setHelperText] = (0,
|
|
1149
|
+
const [selectedEmoji, setSelectedEmoji] = (0, import_react9.useState)(null);
|
|
1150
|
+
const [loadingSubmit, setLoadingSubmit] = (0, import_react9.useState)(false);
|
|
1151
|
+
const [feedbackText, setFeedbackText] = (0, import_react9.useState)("");
|
|
1152
|
+
const [helperText, setHelperText] = (0, import_react9.useState)(false);
|
|
3387
1153
|
let emojis = [
|
|
3388
|
-
{ icon: /* @__PURE__ */
|
|
3389
|
-
{ icon: /* @__PURE__ */
|
|
3390
|
-
{ icon: /* @__PURE__ */
|
|
3391
|
-
{ icon: /* @__PURE__ */
|
|
1154
|
+
{ icon: /* @__PURE__ */ import_react9.default.createElement(VeryGoodEmoji, null), value: "very-good" },
|
|
1155
|
+
{ icon: /* @__PURE__ */ import_react9.default.createElement(GoodEmoji, null), value: "good" },
|
|
1156
|
+
{ icon: /* @__PURE__ */ import_react9.default.createElement(BadEmoji, null), value: "bad" },
|
|
1157
|
+
{ icon: /* @__PURE__ */ import_react9.default.createElement(VeryBadEmoji, null), value: "very-bad" }
|
|
3392
1158
|
];
|
|
3393
1159
|
const onFeedbackSubmit = async () => {
|
|
3394
1160
|
if (feedbackText) {
|
|
@@ -3408,7 +1174,7 @@ var FeedbackEmoji = (props) => {
|
|
|
3408
1174
|
setHelperText(true);
|
|
3409
1175
|
}
|
|
3410
1176
|
};
|
|
3411
|
-
return /* @__PURE__ */
|
|
1177
|
+
return /* @__PURE__ */ import_react9.default.createElement(
|
|
3412
1178
|
"div",
|
|
3413
1179
|
{
|
|
3414
1180
|
className: cn(
|
|
@@ -3416,7 +1182,7 @@ var FeedbackEmoji = (props) => {
|
|
|
3416
1182
|
selectedEmoji ? "hawa-h-[189px] hawa-min-w-fit" : "hawa-h-[44px] "
|
|
3417
1183
|
)
|
|
3418
1184
|
},
|
|
3419
|
-
/* @__PURE__ */
|
|
1185
|
+
/* @__PURE__ */ import_react9.default.createElement("div", { className: "hawa-flex hawa-flex-row hawa-items-center hawa-justify-center hawa-gap-2 " }, /* @__PURE__ */ import_react9.default.createElement("div", { className: "hawa-flex hawa-flex-row hawa-justify-center hawa-gap-0.5 " }, emojis.map((emoji, i) => /* @__PURE__ */ import_react9.default.createElement(
|
|
3420
1186
|
Button,
|
|
3421
1187
|
{
|
|
3422
1188
|
key: i,
|
|
@@ -3435,7 +1201,7 @@ var FeedbackEmoji = (props) => {
|
|
|
3435
1201
|
},
|
|
3436
1202
|
emoji.icon
|
|
3437
1203
|
)))),
|
|
3438
|
-
/* @__PURE__ */
|
|
1204
|
+
/* @__PURE__ */ import_react9.default.createElement(
|
|
3439
1205
|
"div",
|
|
3440
1206
|
{
|
|
3441
1207
|
className: cn(
|
|
@@ -3443,7 +1209,7 @@ var FeedbackEmoji = (props) => {
|
|
|
3443
1209
|
selectedEmoji ? "hawa-visible hawa-opacity-100" : "hawa-invisible hawa-opacity-0 "
|
|
3444
1210
|
)
|
|
3445
1211
|
},
|
|
3446
|
-
props.showSuccess ? /* @__PURE__ */
|
|
1212
|
+
props.showSuccess ? /* @__PURE__ */ import_react9.default.createElement("div", { className: "hawa-flex hawa-h-full hawa-flex-col hawa-items-center hawa-justify-center hawa-gap-2 hawa-pt-4" }, /* @__PURE__ */ import_react9.default.createElement("div", { className: "hawa-rounded hawa-bg-primary hawa-p-2 hawa-text-primary-foreground" }, /* @__PURE__ */ import_react9.default.createElement(
|
|
3447
1213
|
"svg",
|
|
3448
1214
|
{
|
|
3449
1215
|
stroke: "currentColor",
|
|
@@ -3453,13 +1219,13 @@ var FeedbackEmoji = (props) => {
|
|
|
3453
1219
|
height: "0.5em",
|
|
3454
1220
|
width: "0.5em"
|
|
3455
1221
|
},
|
|
3456
|
-
/* @__PURE__ */
|
|
3457
|
-
)), /* @__PURE__ */
|
|
1222
|
+
/* @__PURE__ */ import_react9.default.createElement("path", { d: "M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z" })
|
|
1223
|
+
)), /* @__PURE__ */ import_react9.default.createElement("div", { className: "hawa-flex hawa-flex-col hawa-text-center hawa-text-sm" }, /* @__PURE__ */ import_react9.default.createElement("span", null, "Your feedback has been received!"), /* @__PURE__ */ import_react9.default.createElement("span", null, "Thank you for your help"))) : /* @__PURE__ */ import_react9.default.createElement("div", { className: "hawa-flex hawa-flex-col hawa-gap-1 hawa-p-1" }, /* @__PURE__ */ import_react9.default.createElement(
|
|
3458
1224
|
Popover,
|
|
3459
1225
|
{
|
|
3460
1226
|
className: "hawa-select-none hawa-p-1 hawa-text-xs ",
|
|
3461
1227
|
open: helperText,
|
|
3462
|
-
trigger: /* @__PURE__ */
|
|
1228
|
+
trigger: /* @__PURE__ */ import_react9.default.createElement(
|
|
3463
1229
|
Textarea,
|
|
3464
1230
|
{
|
|
3465
1231
|
className: cn("hawa-mt-2 hawa-h-full hawa-resize-none"),
|
|
@@ -3473,8 +1239,8 @@ var FeedbackEmoji = (props) => {
|
|
|
3473
1239
|
}
|
|
3474
1240
|
)
|
|
3475
1241
|
},
|
|
3476
|
-
/* @__PURE__ */
|
|
3477
|
-
), /* @__PURE__ */
|
|
1242
|
+
/* @__PURE__ */ import_react9.default.createElement("span", { className: "hawa-m-0" }, "Please enter your feedback")
|
|
1243
|
+
), /* @__PURE__ */ import_react9.default.createElement(
|
|
3478
1244
|
Button,
|
|
3479
1245
|
{
|
|
3480
1246
|
isLoading: loadingSubmit,
|
|
@@ -3489,10 +1255,195 @@ var FeedbackEmoji = (props) => {
|
|
|
3489
1255
|
};
|
|
3490
1256
|
|
|
3491
1257
|
// components/blocks/feedback/FeedbackForm.tsx
|
|
3492
|
-
var
|
|
1258
|
+
var import_react12 = __toESM(require("react"));
|
|
3493
1259
|
var import_react_hook_form2 = require("react-hook-form");
|
|
3494
1260
|
var import_zod2 = require("@hookform/resolvers/zod");
|
|
3495
1261
|
var z2 = __toESM(require("zod"));
|
|
1262
|
+
|
|
1263
|
+
// components/elements/select/Select.tsx
|
|
1264
|
+
var import_react11 = __toESM(require("react"));
|
|
1265
|
+
var import_react_select = __toESM(require("react-select"));
|
|
1266
|
+
var import_creatable = __toESM(require("react-select/creatable"));
|
|
1267
|
+
var import_clsx2 = __toESM(require("clsx"));
|
|
1268
|
+
|
|
1269
|
+
// components/elements/skeleton/Skeleton.tsx
|
|
1270
|
+
var import_react10 = __toESM(require("react"));
|
|
1271
|
+
function Skeleton({
|
|
1272
|
+
className,
|
|
1273
|
+
content,
|
|
1274
|
+
animation = "pulse",
|
|
1275
|
+
...props
|
|
1276
|
+
}) {
|
|
1277
|
+
const animationStyles = {
|
|
1278
|
+
none: "hawa-rounded hawa-bg-muted",
|
|
1279
|
+
pulse: "hawa-animate-pulse hawa-rounded hawa-bg-muted",
|
|
1280
|
+
shimmer: "hawa-space-y-5 hawa-rounded hawa-bg-muted hawa-p-4 hawa-relative before:hawa-absolute before:hawa-inset-0 before:hawa--translate-x-full before:hawa-animate-[shimmer_2s_infinite] before:hawa-bg-gradient-to-r before:hawa-from-transparent before:hawa-via-gray-300/40 dark:before:hawa-via-white/10 before:hawa-to-transparent hawa-isolate hawa-overflow-hidden before:hawa-border-t before:hawa-border-rose-100/10"
|
|
1281
|
+
};
|
|
1282
|
+
return /* @__PURE__ */ import_react10.default.createElement(
|
|
1283
|
+
"div",
|
|
1284
|
+
{
|
|
1285
|
+
className: cn(
|
|
1286
|
+
animationStyles[animation],
|
|
1287
|
+
content && "hawa-flex hawa-flex-col hawa-items-center hawa-justify-center",
|
|
1288
|
+
className
|
|
1289
|
+
),
|
|
1290
|
+
...props
|
|
1291
|
+
},
|
|
1292
|
+
content && content
|
|
1293
|
+
);
|
|
1294
|
+
}
|
|
1295
|
+
|
|
1296
|
+
// components/elements/select/Select.tsx
|
|
1297
|
+
var Select = ({
|
|
1298
|
+
labelProps,
|
|
1299
|
+
labelKey = "label",
|
|
1300
|
+
...props
|
|
1301
|
+
}) => {
|
|
1302
|
+
const NoOption = () => {
|
|
1303
|
+
var _a, _b;
|
|
1304
|
+
return /* @__PURE__ */ import_react11.default.createElement("div", null, (_b = (_a = props.texts) == null ? void 0 : _a.noOptions) != null ? _b : "No Items Found");
|
|
1305
|
+
};
|
|
1306
|
+
const Control = ({ children, innerProps, innerRef }) => {
|
|
1307
|
+
return /* @__PURE__ */ import_react11.default.createElement(
|
|
1308
|
+
"div",
|
|
1309
|
+
{
|
|
1310
|
+
ref: innerRef,
|
|
1311
|
+
className: (0, import_clsx2.default)(
|
|
1312
|
+
"hawa-flex hawa-w-full hawa-rounded hawa-border hawa-bg-background hawa-p-2 hawa-text-sm hawa-text-gray-900 focus:hawa-border-blue-500 focus:hawa-ring-blue-500 dark:focus:hawa-ring-blue-500"
|
|
1313
|
+
),
|
|
1314
|
+
...innerProps
|
|
1315
|
+
},
|
|
1316
|
+
children
|
|
1317
|
+
);
|
|
1318
|
+
};
|
|
1319
|
+
const Option = ({ children, innerProps, innerRef }) => {
|
|
1320
|
+
return /* @__PURE__ */ import_react11.default.createElement(
|
|
1321
|
+
"div",
|
|
1322
|
+
{
|
|
1323
|
+
ref: innerRef,
|
|
1324
|
+
className: cn(
|
|
1325
|
+
"hawa-flex hawa-cursor-pointer hawa-select-none hawa-flex-row hawa-items-center hawa-justify-between hawa-rounded-inner hawa-p-1 hawa-px-2 hawa-transition-all hover:hawa-bg-primary hover:hawa-text-primary-foreground"
|
|
1326
|
+
),
|
|
1327
|
+
...innerProps
|
|
1328
|
+
},
|
|
1329
|
+
children
|
|
1330
|
+
);
|
|
1331
|
+
};
|
|
1332
|
+
const Menu = ({
|
|
1333
|
+
cx,
|
|
1334
|
+
children,
|
|
1335
|
+
getStyles,
|
|
1336
|
+
innerProps,
|
|
1337
|
+
innerRef,
|
|
1338
|
+
...menuProps
|
|
1339
|
+
}) => {
|
|
1340
|
+
const menuOpen = menuProps.selectProps.menuIsOpen;
|
|
1341
|
+
return /* @__PURE__ */ import_react11.default.createElement(
|
|
1342
|
+
"div",
|
|
1343
|
+
{
|
|
1344
|
+
className: cn(
|
|
1345
|
+
"dark:dark-shadow hawa-absolute hawa-z-10 -hawa-mx-1 hawa-mt-1 hawa-flex hawa-flex-col hawa-justify-start hawa-rounded hawa-border hawa-bg-background hawa-shadow-md",
|
|
1346
|
+
props.phoneCode ? "hawa-p-1.5" : "hawa-w-full hawa-p-1.5",
|
|
1347
|
+
menuOpen && "hawa-animate-in hawa-fade-in-0 hawa-zoom-in-95 "
|
|
1348
|
+
),
|
|
1349
|
+
ref: innerRef,
|
|
1350
|
+
...innerProps
|
|
1351
|
+
},
|
|
1352
|
+
children
|
|
1353
|
+
);
|
|
1354
|
+
};
|
|
1355
|
+
return /* @__PURE__ */ import_react11.default.createElement(
|
|
1356
|
+
"div",
|
|
1357
|
+
{
|
|
1358
|
+
className: cn(
|
|
1359
|
+
"hawa-flex hawa-flex-col hawa-gap-2",
|
|
1360
|
+
props.width === "fit" ? "hawa-w-fit" : "hawa-w-full"
|
|
1361
|
+
)
|
|
1362
|
+
},
|
|
1363
|
+
props.label && /* @__PURE__ */ import_react11.default.createElement(Label, { ...labelProps }, props.label),
|
|
1364
|
+
props.isLoading ? /* @__PURE__ */ import_react11.default.createElement(Skeleton, { className: "hawa-h-[40px] hawa-w-full" }) : !props.isCreatable ? (
|
|
1365
|
+
// TODO: enable keyboard to go to the next item in the list
|
|
1366
|
+
/* @__PURE__ */ import_react11.default.createElement(
|
|
1367
|
+
import_react_select.default,
|
|
1368
|
+
{
|
|
1369
|
+
noOptionsMessage: NoOption,
|
|
1370
|
+
classNames: {
|
|
1371
|
+
control: () => cn(
|
|
1372
|
+
props.phoneCode && "hawa-rounded-r-none",
|
|
1373
|
+
props.controlClassNames
|
|
1374
|
+
),
|
|
1375
|
+
container: () => cn(
|
|
1376
|
+
"hawa-rounded",
|
|
1377
|
+
props.phoneCode && "hawa-w-fit hawa-min-w-[65px] hawa-text-right hawa-w-[100px] hawa-p-0 hawa-rounded-r-none hawa-h-[40px] ",
|
|
1378
|
+
"hawa-block hawa-w-full hawa-rounded hawa-border hawa-transition-all hawa-bg-background hawa-p-0 hawa-px-1 hawa-text-sm",
|
|
1379
|
+
props.disabled ? "hawa-cursor-not-allowed" : "hawa-cursor-pointer"
|
|
1380
|
+
),
|
|
1381
|
+
placeholder: () => "hawa-text-muted-foreground hawa-cursor-pointer hawa-px-1",
|
|
1382
|
+
valueContainer: () => "hawa-text-foreground hawa-px-1 ",
|
|
1383
|
+
singleValue: () => "hawa-text-foreground",
|
|
1384
|
+
indicatorsContainer: () => cn(
|
|
1385
|
+
"hawa-cursor-pointer hawa-text-muted-foreground",
|
|
1386
|
+
props.hideIndicator ? "hawa-invisible" : "hawa-px-1"
|
|
1387
|
+
)
|
|
1388
|
+
},
|
|
1389
|
+
unstyled: true,
|
|
1390
|
+
autoFocus: true,
|
|
1391
|
+
components: props.hideIndicator ? { Option, Menu, IndicatorsContainer: () => null } : { Option, Menu },
|
|
1392
|
+
onChange: (newValue, action) => props.onChange(newValue, action),
|
|
1393
|
+
options: props.options,
|
|
1394
|
+
getOptionLabel: props.getOptionLabel,
|
|
1395
|
+
defaultValue: props.defaultValue,
|
|
1396
|
+
placeholder: props.placeholder,
|
|
1397
|
+
isDisabled: props.disabled,
|
|
1398
|
+
isClearable: props.isClearable,
|
|
1399
|
+
isMulti: props.isMulti,
|
|
1400
|
+
isSearchable: props.isSearchable
|
|
1401
|
+
}
|
|
1402
|
+
)
|
|
1403
|
+
) : /* @__PURE__ */ import_react11.default.createElement(
|
|
1404
|
+
import_creatable.default,
|
|
1405
|
+
{
|
|
1406
|
+
formatCreateLabel: (inputValue) => {
|
|
1407
|
+
var _a, _b;
|
|
1408
|
+
return `${(_b = (_a = props.texts) == null ? void 0 : _a.createLabel) != null ? _b : "Create"} "${inputValue}"`;
|
|
1409
|
+
},
|
|
1410
|
+
classNames: {
|
|
1411
|
+
container: () => cn(
|
|
1412
|
+
"hawa-rounded",
|
|
1413
|
+
props.disabled ? "hawa-cursor-not-allowed" : "hawa-cursor-pointer"
|
|
1414
|
+
),
|
|
1415
|
+
placeholder: () => "hawa-px-2 hawa-text-muted-foreground",
|
|
1416
|
+
input: () => "hawa-text-primary hawa-px-2",
|
|
1417
|
+
valueContainer: () => "hawa-text-white dark:hawa-text-muted-foreground",
|
|
1418
|
+
singleValue: () => "hawa-text-black dark:hawa-text-white hawa-px-2",
|
|
1419
|
+
indicatorsContainer: () => " hawa-px-2 hawa-cursor-pointer hawa-text-muted-foreground"
|
|
1420
|
+
},
|
|
1421
|
+
unstyled: true,
|
|
1422
|
+
options: props.options,
|
|
1423
|
+
isClearable: props.isClearable,
|
|
1424
|
+
isMulti: props.isMulti,
|
|
1425
|
+
isSearchable: props.isSearchable,
|
|
1426
|
+
placeholder: props.placeholder,
|
|
1427
|
+
onCreateOption: props.handleCreateOption,
|
|
1428
|
+
onChange: (newValue, action) => props.onChange(newValue, action),
|
|
1429
|
+
components: { Control, Option, Menu },
|
|
1430
|
+
onInputChange: (newValue, action) => props.onInputChange(newValue, action)
|
|
1431
|
+
}
|
|
1432
|
+
),
|
|
1433
|
+
!props.hideHelperText && /* @__PURE__ */ import_react11.default.createElement(
|
|
1434
|
+
"p",
|
|
1435
|
+
{
|
|
1436
|
+
className: cn(
|
|
1437
|
+
"hawa-my-0 hawa-text-start hawa-text-xs hawa-text-helper-color hawa-transition-all",
|
|
1438
|
+
props.helperText ? "hawa-h-4 hawa-opacity-100" : "hawa-h-0 hawa-opacity-0"
|
|
1439
|
+
)
|
|
1440
|
+
},
|
|
1441
|
+
props.helperText
|
|
1442
|
+
)
|
|
1443
|
+
);
|
|
1444
|
+
};
|
|
1445
|
+
|
|
1446
|
+
// components/blocks/feedback/FeedbackForm.tsx
|
|
3496
1447
|
var FeedbackForm = (props) => {
|
|
3497
1448
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m;
|
|
3498
1449
|
const formSchema = z2.object({
|
|
@@ -3502,7 +1453,7 @@ var FeedbackForm = (props) => {
|
|
|
3502
1453
|
const { handleSubmit, control, formState } = (0, import_react_hook_form2.useForm)({
|
|
3503
1454
|
resolver: (0, import_zod2.zodResolver)(formSchema)
|
|
3504
1455
|
});
|
|
3505
|
-
return /* @__PURE__ */
|
|
1456
|
+
return /* @__PURE__ */ import_react12.default.createElement(
|
|
3506
1457
|
Card,
|
|
3507
1458
|
{
|
|
3508
1459
|
className: cn(
|
|
@@ -3510,7 +1461,7 @@ var FeedbackForm = (props) => {
|
|
|
3510
1461
|
),
|
|
3511
1462
|
style: props.cardless ? { boxShadow: "none" } : void 0
|
|
3512
1463
|
},
|
|
3513
|
-
/* @__PURE__ */
|
|
1464
|
+
/* @__PURE__ */ import_react12.default.createElement(CardContent, { headless: true }, /* @__PURE__ */ import_react12.default.createElement(
|
|
3514
1465
|
"form",
|
|
3515
1466
|
{
|
|
3516
1467
|
noValidate: true,
|
|
@@ -3523,15 +1474,15 @@ var FeedbackForm = (props) => {
|
|
|
3523
1474
|
}),
|
|
3524
1475
|
className: "hawa-flex hawa-flex-col hawa-gap-4"
|
|
3525
1476
|
},
|
|
3526
|
-
/* @__PURE__ */
|
|
3527
|
-
/* @__PURE__ */
|
|
1477
|
+
/* @__PURE__ */ import_react12.default.createElement(Label, null, (_j = (_i = props.texts) == null ? void 0 : _i.requestType) == null ? void 0 : _j.label),
|
|
1478
|
+
/* @__PURE__ */ import_react12.default.createElement(
|
|
3528
1479
|
import_react_hook_form2.Controller,
|
|
3529
1480
|
{
|
|
3530
1481
|
name: "requestType",
|
|
3531
1482
|
control,
|
|
3532
1483
|
render: ({ field }) => {
|
|
3533
1484
|
var _a2, _b2, _c2, _d2, _e2, _f2;
|
|
3534
|
-
return /* @__PURE__ */
|
|
1485
|
+
return /* @__PURE__ */ import_react12.default.createElement(
|
|
3535
1486
|
Select,
|
|
3536
1487
|
{
|
|
3537
1488
|
...field,
|
|
@@ -3548,15 +1499,15 @@ var FeedbackForm = (props) => {
|
|
|
3548
1499
|
}
|
|
3549
1500
|
}
|
|
3550
1501
|
),
|
|
3551
|
-
/* @__PURE__ */
|
|
3552
|
-
/* @__PURE__ */
|
|
1502
|
+
/* @__PURE__ */ import_react12.default.createElement(Label, null, (_l = (_k = props.texts) == null ? void 0 : _k.description) == null ? void 0 : _l.label),
|
|
1503
|
+
/* @__PURE__ */ import_react12.default.createElement(
|
|
3553
1504
|
import_react_hook_form2.Controller,
|
|
3554
1505
|
{
|
|
3555
1506
|
name: "description",
|
|
3556
1507
|
control,
|
|
3557
1508
|
render: ({ field }) => {
|
|
3558
1509
|
var _a2, _b2, _c2, _d2;
|
|
3559
|
-
return /* @__PURE__ */
|
|
1510
|
+
return /* @__PURE__ */ import_react12.default.createElement(
|
|
3560
1511
|
Textarea,
|
|
3561
1512
|
{
|
|
3562
1513
|
...field,
|
|
@@ -3567,7 +1518,7 @@ var FeedbackForm = (props) => {
|
|
|
3567
1518
|
}
|
|
3568
1519
|
}
|
|
3569
1520
|
),
|
|
3570
|
-
/* @__PURE__ */
|
|
1521
|
+
/* @__PURE__ */ import_react12.default.createElement(Button, { type: "submit" }, (_m = props.texts) == null ? void 0 : _m.submit)
|
|
3571
1522
|
))
|
|
3572
1523
|
);
|
|
3573
1524
|
};
|