@sikka/hawa 0.26.19-next → 0.26.20
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 +10 -12
- package/dist/accordion/index.mjs +8 -8
- package/dist/alert/index.js +8 -7
- package/dist/alert/index.mjs +7 -6
- package/dist/appLayout/index.js +13 -12
- package/dist/appLayout/index.mjs +12 -11
- package/dist/appMenubar/index.js +4 -4
- package/dist/appMenubar/index.mjs +2 -2
- package/dist/appStores/index.js +2 -2
- package/dist/appStores/index.mjs +1 -1
- package/dist/appTabs/index.js +4 -4
- package/dist/appTabs/index.mjs +2 -2
- package/dist/appTopbar/index.js +6 -6
- package/dist/appTopbar/index.mjs +4 -4
- package/dist/avatar/index.js +5 -5
- package/dist/avatar/index.mjs +4 -4
- package/dist/backToTop/index.js +8 -7
- package/dist/backToTop/index.mjs +7 -6
- package/dist/badge/index.js +4 -4
- package/dist/badge/index.mjs +2 -2
- package/dist/blocks/auth/index.js +38 -37
- package/dist/blocks/auth/index.mjs +24 -24
- package/dist/blocks/feedback/index.js +27 -26
- package/dist/blocks/feedback/index.mjs +11 -11
- package/dist/blocks/index.js +77 -76
- package/dist/blocks/index.mjs +34 -34
- package/dist/blocks/misc/index.js +31 -30
- package/dist/blocks/misc/index.mjs +14 -14
- package/dist/blocks/pricing/index.js +123 -122
- package/dist/blocks/pricing/index.mjs +18 -18
- package/dist/breadcrumb/index.js +2 -2
- package/dist/breadcrumb/index.mjs +1 -1
- package/dist/button/index.js +6 -5
- package/dist/button/index.mjs +5 -4
- package/dist/card/index.js +4 -4
- package/dist/card/index.mjs +2 -2
- package/dist/carousel/index.d.mts +1 -1
- package/dist/carousel/index.d.ts +1 -1
- package/dist/carousel/index.js +9 -18
- package/dist/carousel/index.mjs +7 -16
- package/dist/checkbox/index.js +4 -4
- package/dist/checkbox/index.mjs +2 -2
- package/dist/chip/index.js +4 -4
- package/dist/chip/index.mjs +2 -2
- package/dist/{chunk-343SRWR4.mjs → chunk-3GBITBPL.mjs} +2 -2
- package/dist/{chunk-TTKRRN7S.mjs → chunk-4IOG44R3.mjs} +2 -2
- package/dist/{chunk-3N6JJKMN.mjs → chunk-65TG6EVD.mjs} +5 -4
- package/dist/{chunk-LT3VHLAG.mjs → chunk-APZM24KK.mjs} +2 -2
- package/dist/{chunk-FYH74ZRQ.mjs → chunk-AREFDTXK.mjs} +9 -8
- package/dist/{chunk-FNVYY7ND.mjs → chunk-D22AALLE.mjs} +1 -1
- package/dist/{chunk-OD5WIQGQ.mjs → chunk-FDKCMEMD.mjs} +2 -2
- package/dist/{chunk-KNHT2UBG.mjs → chunk-KMCIHW76.mjs} +2 -2
- package/dist/{chunk-M2ZS3EDT.mjs → chunk-OAXF3RCQ.mjs} +2 -2
- package/dist/chunk-OTGCLEKC.mjs +62 -0
- package/dist/{chunk-OE23TTPS.mjs → chunk-POIP5U4M.mjs} +3 -3
- package/dist/{chunk-EYUG3GRC.mjs → chunk-SJ2Z6ZOG.mjs} +4 -4
- package/dist/{chunk-WRZFWCOQ.mjs → chunk-TGZRVRLP.mjs} +4 -4
- package/dist/{chunk-TE3BKEXL.mjs → chunk-TWNGV3RE.mjs} +1 -1
- package/dist/{chunk-ATUSR6VI.mjs → chunk-U3TZWNDZ.mjs} +4 -4
- package/dist/{chunk-W77KCP35.mjs → chunk-VQQ6MUX5.mjs} +2 -2
- package/dist/{chunk-SUS6O2PO.mjs → chunk-WPSUV4AD.mjs} +21 -21
- package/dist/{chunk-3KMBSNM3.mjs → chunk-Z5SL5QTQ.mjs} +11 -10
- package/dist/{chunk-ZCZ3WARS.mjs → chunk-ZS3FB3PO.mjs} +1 -1
- package/dist/codeBlock/index.js +153 -2454
- package/dist/codeBlock/index.mjs +129 -2393
- package/dist/collapsible/index.js +2 -2
- package/dist/collapsible/index.mjs +1 -1
- package/dist/colorPicker/index.js +7 -7
- package/dist/colorPicker/index.mjs +126 -2
- package/dist/combobox/index.js +193 -193
- package/dist/combobox/index.mjs +8 -8
- package/dist/command/index.js +5 -5
- package/dist/command/index.mjs +1 -1
- package/dist/copyrights/index.js +2 -2
- package/dist/copyrights/index.mjs +1 -1
- package/dist/count/index.js +2 -2
- package/dist/count/index.mjs +1 -1
- package/dist/dataTable/index.js +16 -15
- package/dist/dataTable/index.mjs +15 -14
- package/dist/destroyableCard/index.js +6 -8
- package/dist/destroyableCard/index.mjs +4 -4
- package/dist/dialog/index.js +4 -4
- package/dist/dialog/index.mjs +2 -2
- package/dist/docsLayout/index.js +12 -11
- package/dist/docsLayout/index.mjs +11 -10
- package/dist/docsSidebar/index.js +4 -4
- package/dist/docsSidebar/index.mjs +2 -2
- package/dist/dropdownMenu/index.js +4 -4
- package/dist/dropdownMenu/index.mjs +2 -2
- package/dist/elements/index.d.mts +1 -1
- package/dist/elements/index.d.ts +1 -1
- package/dist/elements/index.js +155 -163
- package/dist/elements/index.mjs +47 -56
- package/dist/fileDropzone/index.js +10 -9
- package/dist/fileDropzone/index.mjs +9 -8
- package/dist/fileUploader/index.js +2 -2
- package/dist/fileUploader/index.mjs +1 -1
- package/dist/glow/index.js +2 -2
- package/dist/glow/index.mjs +1 -1
- package/dist/hooks/index.d.mts +7 -7
- package/dist/hooks/index.d.ts +7 -7
- package/dist/hooks/index.js +16 -16
- package/dist/hooks/index.mjs +14 -14
- package/dist/index.css +0 -465
- package/dist/index.d.mts +8 -8
- package/dist/index.d.ts +8 -8
- package/dist/index.js +213 -221
- package/dist/index.mjs +212 -220
- package/dist/input/index.js +8 -8
- package/dist/input/index.mjs +4 -4
- package/dist/interfaceSettings/index.js +9 -9
- package/dist/interfaceSettings/index.mjs +4 -4
- package/dist/label/index.js +5 -5
- package/dist/label/index.mjs +4 -4
- package/dist/layout/index.d.mts +1 -1
- package/dist/layout/index.d.ts +1 -1
- package/dist/layout/index.js +31 -30
- package/dist/layout/index.mjs +16 -16
- package/dist/loading/index.js +4 -4
- package/dist/loading/index.mjs +2 -2
- package/dist/logos/index.js +2 -2
- package/dist/logos/index.mjs +1 -1
- package/dist/navbar/index.js +5 -5
- package/dist/navbar/index.mjs +4 -4
- package/dist/navigationMenu/index.js +4 -4
- package/dist/navigationMenu/index.mjs +2 -2
- package/dist/pagination/index.js +4 -4
- package/dist/pagination/index.mjs +2 -2
- package/dist/passwordInput/index.js +15 -15
- package/dist/passwordInput/index.mjs +13 -13
- package/dist/phoneInput/index.js +11 -11
- package/dist/phoneInput/index.mjs +10 -10
- package/dist/pinInput/index.js +4 -4
- package/dist/pinInput/index.mjs +2 -2
- package/dist/popover/index.js +4 -4
- package/dist/popover/index.mjs +2 -2
- package/dist/progress/index.js +4 -4
- package/dist/progress/index.mjs +2 -2
- package/dist/progressCircle/index.js +4 -4
- package/dist/progressCircle/index.mjs +2 -2
- package/dist/radio/index.js +7 -7
- package/dist/radio/index.mjs +6 -6
- package/dist/scrollArea/index.js +4 -4
- package/dist/scrollArea/index.mjs +2 -2
- package/dist/scrollIndicator/index.js +2 -2
- package/dist/scrollIndicator/index.mjs +1 -1
- package/dist/select/index.js +8 -8
- package/dist/select/index.mjs +7 -7
- package/dist/separator/index.js +4 -4
- package/dist/separator/index.mjs +2 -2
- package/dist/sheet/index.js +4 -4
- package/dist/sheet/index.mjs +2 -2
- package/dist/sidebar/index.js +6 -6
- package/dist/sidebar/index.mjs +4 -4
- package/dist/signature/index.js +8 -8
- package/dist/signature/index.mjs +6 -6
- package/dist/simpleTable/index.js +6 -6
- package/dist/simpleTable/index.mjs +5 -5
- package/dist/skeleton/index.js +4 -4
- package/dist/skeleton/index.mjs +2 -2
- package/dist/slider/index.js +4 -4
- package/dist/slider/index.mjs +2 -2
- package/dist/sortButton/index.js +8 -7
- package/dist/sortButton/index.mjs +2 -2
- package/dist/splitButton/index.js +9 -8
- package/dist/splitButton/index.mjs +4 -4
- package/dist/stats/index.js +7 -7
- package/dist/stats/index.mjs +6 -6
- package/dist/stopPropagationWrapper/index.js +2 -2
- package/dist/stopPropagationWrapper/index.mjs +1 -1
- package/dist/switch/index.js +4 -4
- package/dist/switch/index.mjs +2 -2
- package/dist/table/index.js +4 -4
- package/dist/table/index.mjs +2 -2
- package/dist/tabs/index.js +5 -5
- package/dist/tabs/index.mjs +4 -4
- package/dist/textarea/index.js +7 -7
- package/dist/textarea/index.mjs +6 -6
- package/dist/toast/index.js +4 -4
- package/dist/toast/index.mjs +2 -2
- package/dist/toaster/index.js +6 -6
- package/dist/toaster/index.mjs +5 -5
- package/dist/tooltip/index.js +4 -4
- package/dist/tooltip/index.mjs +3 -3
- package/dist/types/index.js +1 -1
- package/package.json +16 -42
- package/README.md +0 -107
- package/dist/chunk-S36W2LDN.mjs +0 -189
package/dist/codeBlock/index.js
CHANGED
@@ -27,109 +27,56 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
27
27
|
));
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
29
29
|
|
30
|
-
//
|
30
|
+
// elements/codeBlock/index.ts
|
31
31
|
var codeBlock_exports = {};
|
32
32
|
__export(codeBlock_exports, {
|
33
33
|
CodeBlock: () => CodeBlock
|
34
34
|
});
|
35
35
|
module.exports = __toCommonJS(codeBlock_exports);
|
36
36
|
|
37
|
-
//
|
38
|
-
var
|
37
|
+
// elements/codeBlock/CodeBlock.tsx
|
38
|
+
var import_react4 = __toESM(require("react"));
|
39
39
|
var import_prism_react_renderer = require("prism-react-renderer");
|
40
40
|
|
41
|
-
//
|
42
|
-
var
|
41
|
+
// hooks/useClipboard.ts
|
42
|
+
var import_react = require("react");
|
43
|
+
function useClipboard({ timeout = 2e3 } = {}) {
|
44
|
+
const [error, setError] = (0, import_react.useState)(null);
|
45
|
+
const [copied, setCopied] = (0, import_react.useState)(false);
|
46
|
+
const [copyTimeout, setCopyTimeout] = (0, import_react.useState)(null);
|
47
|
+
const handleCopyResult = (value) => {
|
48
|
+
clearTimeout(copyTimeout);
|
49
|
+
setCopyTimeout(setTimeout(() => setCopied(false), timeout));
|
50
|
+
setCopied(value);
|
51
|
+
};
|
52
|
+
const copy = (valueToCopy) => {
|
53
|
+
if ("clipboard" in navigator) {
|
54
|
+
navigator.clipboard.writeText(valueToCopy).then(() => handleCopyResult(true)).catch((err) => setError(err));
|
55
|
+
} else {
|
56
|
+
setError(new Error("useClipboard: navigator.clipboard is not supported"));
|
57
|
+
}
|
58
|
+
};
|
59
|
+
const reset = () => {
|
60
|
+
setCopied(false);
|
61
|
+
setError(null);
|
62
|
+
clearTimeout(copyTimeout);
|
63
|
+
};
|
64
|
+
return { copy, reset, error, copied };
|
65
|
+
}
|
43
66
|
|
44
|
-
//
|
67
|
+
// util/index.ts
|
45
68
|
var import_clsx = require("clsx");
|
46
69
|
var import_tailwind_merge = require("tailwind-merge");
|
47
70
|
function cn(...inputs) {
|
48
71
|
return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs));
|
49
72
|
}
|
50
73
|
|
51
|
-
//
|
52
|
-
var
|
53
|
-
|
54
|
-
let variantStyles = {
|
55
|
-
default: cn(
|
56
|
-
"hawa-rounded-lg hawa-border hawa-bg-card hawa-text-card-foreground hawa-shadow-sm",
|
57
|
-
clickable && "hawa-cursor-pointer hawa-transition-all hover:hawa-drop-shadow-md dark:hover:dark-shadow"
|
58
|
-
),
|
59
|
-
neoBrutalism: cn(
|
60
|
-
"neo-brutalism",
|
61
|
-
// "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]",
|
62
|
-
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"
|
63
|
-
)
|
64
|
-
};
|
65
|
-
return /* @__PURE__ */ React.createElement(
|
66
|
-
"div",
|
67
|
-
{
|
68
|
-
ref,
|
69
|
-
className: cn(className, variantStyles[variant]),
|
70
|
-
...props
|
71
|
-
}
|
72
|
-
);
|
73
|
-
}
|
74
|
-
);
|
75
|
-
var CardHeader = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React.createElement(
|
76
|
-
"div",
|
77
|
-
{
|
78
|
-
ref,
|
79
|
-
className: cn(
|
80
|
-
"hawa-flex hawa-flex-col hawa-space-y-1.5 hawa-p-6",
|
81
|
-
className
|
82
|
-
),
|
83
|
-
...props
|
84
|
-
}
|
85
|
-
));
|
86
|
-
var CardTitle = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React.createElement(
|
87
|
-
"h3",
|
88
|
-
{
|
89
|
-
ref,
|
90
|
-
className: cn("hawa-text-2xl hawa-font-semibold ", className),
|
91
|
-
...props
|
92
|
-
}
|
93
|
-
));
|
94
|
-
var CardDescription = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React.createElement(
|
95
|
-
"p",
|
96
|
-
{
|
97
|
-
ref,
|
98
|
-
className: cn("hawa-text-sm hawa-text-muted-foreground", className),
|
99
|
-
...props
|
100
|
-
}
|
101
|
-
));
|
102
|
-
var CardContent = React.forwardRef(
|
103
|
-
({ headless, noPadding, className, ...props }, ref) => /* @__PURE__ */ React.createElement(
|
104
|
-
"div",
|
105
|
-
{
|
106
|
-
ref,
|
107
|
-
className: cn(
|
108
|
-
noPadding ? "hawa-p-0" : "hawa-p-6",
|
109
|
-
headless ? "hawa-pt-6" : "hawa-pt-0",
|
110
|
-
className
|
111
|
-
),
|
112
|
-
...props
|
113
|
-
}
|
114
|
-
)
|
115
|
-
);
|
116
|
-
var CardFooter = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React.createElement(
|
117
|
-
"div",
|
118
|
-
{
|
119
|
-
ref,
|
120
|
-
className: cn("hawa-flex hawa-items-center hawa-p-6 hawa-pt-0", className),
|
121
|
-
...props
|
122
|
-
}
|
123
|
-
));
|
124
|
-
CardDescription.displayName = "CardDescription";
|
125
|
-
CardContent.displayName = "CardContent";
|
126
|
-
CardHeader.displayName = "CardHeader";
|
127
|
-
CardFooter.displayName = "CardFooter";
|
128
|
-
CardTitle.displayName = "CardTitle";
|
129
|
-
Card.displayName = "Card";
|
74
|
+
// elements/button/Button.tsx
|
75
|
+
var React2 = __toESM(require("react"));
|
76
|
+
var import_class_variance_authority = require("class-variance-authority");
|
130
77
|
|
131
|
-
//
|
132
|
-
var
|
78
|
+
// elements/loading/Loading.tsx
|
79
|
+
var import_react2 = __toESM(require("react"));
|
133
80
|
var Loading = ({
|
134
81
|
design = "spinner",
|
135
82
|
size = "sm",
|
@@ -137,7 +84,7 @@ var Loading = ({
|
|
137
84
|
color,
|
138
85
|
...props
|
139
86
|
}) => {
|
140
|
-
let
|
87
|
+
let sizeStyles = {
|
141
88
|
button: "hawa-h-4 hawa-w-4",
|
142
89
|
xs: "hawa-h-1 hawa-w-1",
|
143
90
|
sm: "hawa-h-6 hawa-w-6",
|
@@ -151,39 +98,39 @@ var Loading = ({
|
|
151
98
|
};
|
152
99
|
switch (design.split("-")[0]) {
|
153
100
|
case "dots":
|
154
|
-
return /* @__PURE__ */
|
101
|
+
return /* @__PURE__ */ import_react2.default.createElement(
|
155
102
|
"div",
|
156
103
|
{
|
157
104
|
className: cn("hawa-flex hawa-flex-row hawa-gap-2", props.className)
|
158
105
|
},
|
159
|
-
/* @__PURE__ */
|
106
|
+
/* @__PURE__ */ import_react2.default.createElement(
|
160
107
|
"div",
|
161
108
|
{
|
162
109
|
className: cn(
|
163
110
|
"hawa-animate-bounce hawa-rounded-full hawa-delay-100 hawa-repeat-infinite",
|
164
|
-
size === "button" ? "hawa-h-2 hawa-w-2" :
|
111
|
+
size === "button" ? "hawa-h-2 hawa-w-2" : sizeStyles[size],
|
165
112
|
animationStyles[design.split("-")[1]],
|
166
113
|
color ? color : "hawa-bg-primary"
|
167
114
|
)
|
168
115
|
}
|
169
116
|
),
|
170
|
-
/* @__PURE__ */
|
117
|
+
/* @__PURE__ */ import_react2.default.createElement(
|
171
118
|
"div",
|
172
119
|
{
|
173
120
|
className: cn(
|
174
121
|
"hawa-animate-bounce hawa-rounded-full hawa-delay-200 hawa-repeat-infinite",
|
175
|
-
size === "button" ? "hawa-h-2 hawa-w-2" :
|
122
|
+
size === "button" ? "hawa-h-2 hawa-w-2" : sizeStyles[size],
|
176
123
|
animationStyles[design.split("-")[1]],
|
177
124
|
color ? color : "hawa-bg-primary"
|
178
125
|
)
|
179
126
|
}
|
180
127
|
),
|
181
|
-
/* @__PURE__ */
|
128
|
+
/* @__PURE__ */ import_react2.default.createElement(
|
182
129
|
"div",
|
183
130
|
{
|
184
131
|
className: cn(
|
185
132
|
"hawa-animate-bounce hawa-rounded-full hawa-delay-300 hawa-repeat-infinite",
|
186
|
-
size === "button" ? "hawa-h-2 hawa-w-2" :
|
133
|
+
size === "button" ? "hawa-h-2 hawa-w-2" : sizeStyles[size],
|
187
134
|
animationStyles[design.split("-")[1]],
|
188
135
|
color ? color : "hawa-bg-primary"
|
189
136
|
)
|
@@ -191,15 +138,15 @@ var Loading = ({
|
|
191
138
|
)
|
192
139
|
);
|
193
140
|
case "square":
|
194
|
-
return /* @__PURE__ */
|
141
|
+
return /* @__PURE__ */ import_react2.default.createElement(
|
195
142
|
"svg",
|
196
143
|
{
|
197
|
-
className: cn("squircle-container",
|
144
|
+
className: cn("squircle-container", sizeStyles[size]),
|
198
145
|
viewBox: "0 0 35 35",
|
199
146
|
height: "35",
|
200
147
|
width: "35"
|
201
148
|
},
|
202
|
-
/* @__PURE__ */
|
149
|
+
/* @__PURE__ */ import_react2.default.createElement(
|
203
150
|
"rect",
|
204
151
|
{
|
205
152
|
className: "squircle-track",
|
@@ -211,7 +158,7 @@ var Loading = ({
|
|
211
158
|
height: "32.5"
|
212
159
|
}
|
213
160
|
),
|
214
|
-
/* @__PURE__ */
|
161
|
+
/* @__PURE__ */ import_react2.default.createElement(
|
215
162
|
"rect",
|
216
163
|
{
|
217
164
|
className: "square-car",
|
@@ -226,10 +173,10 @@ var Loading = ({
|
|
226
173
|
)
|
227
174
|
);
|
228
175
|
case "squircle":
|
229
|
-
return /* @__PURE__ */
|
176
|
+
return /* @__PURE__ */ import_react2.default.createElement(
|
230
177
|
"svg",
|
231
178
|
{
|
232
|
-
className: cn("squircle-container",
|
179
|
+
className: cn("squircle-container", sizeStyles[size]),
|
233
180
|
x: "0px",
|
234
181
|
y: "0px",
|
235
182
|
viewBox: "0 0 37 37",
|
@@ -237,7 +184,7 @@ var Loading = ({
|
|
237
184
|
width: "37",
|
238
185
|
preserveAspectRatio: "xMidYMid meet"
|
239
186
|
},
|
240
|
-
/* @__PURE__ */
|
187
|
+
/* @__PURE__ */ import_react2.default.createElement(
|
241
188
|
"path",
|
242
189
|
{
|
243
190
|
className: "squircle-track",
|
@@ -247,7 +194,7 @@ var Loading = ({
|
|
247
194
|
d: "M0.37 18.5 C0.37 5.772 5.772 0.37 18.5 0.37 S36.63 5.772 36.63 18.5 S31.228 36.63 18.5 36.63 S0.37 31.228 0.37 18.5"
|
248
195
|
}
|
249
196
|
),
|
250
|
-
/* @__PURE__ */
|
197
|
+
/* @__PURE__ */ import_react2.default.createElement(
|
251
198
|
"path",
|
252
199
|
{
|
253
200
|
className: "squircle-car",
|
@@ -259,19 +206,19 @@ var Loading = ({
|
|
259
206
|
)
|
260
207
|
);
|
261
208
|
case "progress":
|
262
|
-
return /* @__PURE__ */
|
209
|
+
return /* @__PURE__ */ import_react2.default.createElement("div", { className: "progress-loading" });
|
263
210
|
case "orbit":
|
264
|
-
return /* @__PURE__ */
|
211
|
+
return /* @__PURE__ */ import_react2.default.createElement("div", { className: "orbit-container" });
|
265
212
|
default:
|
266
|
-
return /* @__PURE__ */
|
213
|
+
return /* @__PURE__ */ import_react2.default.createElement(
|
267
214
|
"svg",
|
268
215
|
{
|
269
|
-
className: cn("circle-container",
|
216
|
+
className: cn("circle-container", sizeStyles[size]),
|
270
217
|
viewBox: "0 0 40 40",
|
271
218
|
height: "40",
|
272
219
|
width: "40"
|
273
220
|
},
|
274
|
-
/* @__PURE__ */
|
221
|
+
/* @__PURE__ */ import_react2.default.createElement(
|
275
222
|
"circle",
|
276
223
|
{
|
277
224
|
className: cn("circle-track", {
|
@@ -286,7 +233,7 @@ var Loading = ({
|
|
286
233
|
fill: "none"
|
287
234
|
}
|
288
235
|
),
|
289
|
-
/* @__PURE__ */
|
236
|
+
/* @__PURE__ */ import_react2.default.createElement(
|
290
237
|
"circle",
|
291
238
|
{
|
292
239
|
className: cn("circle-car", {
|
@@ -305,10 +252,82 @@ var Loading = ({
|
|
305
252
|
}
|
306
253
|
};
|
307
254
|
|
308
|
-
//
|
309
|
-
var
|
255
|
+
// elements/button/Button.tsx
|
256
|
+
var buttonVariants = (0, import_class_variance_authority.cva)(
|
257
|
+
"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",
|
258
|
+
{
|
259
|
+
variants: {
|
260
|
+
variant: {
|
261
|
+
default: "hawa-bg-primary hawa-text-primary-foreground hover:hawa-bg-primary/90",
|
262
|
+
light: "hawa-bg-primary/20 hawa-text-primary hover:hawa-bg-primary/40",
|
263
|
+
destructive: "hawa-bg-destructive hawa-text-destructive-foreground hover:hawa-bg-destructive/90",
|
264
|
+
outline: "hawa-border hawa-border-input hawa-bg-transparent hover:hawa-bg-accent hover:hawa-text-accent-foreground",
|
265
|
+
secondary: "hawa-bg-secondary hawa-text-secondary-foreground hover:hawa-bg-secondary/80",
|
266
|
+
ghost: "hover:hawa-bg-accent hover:hawa-text-accent-foreground",
|
267
|
+
link: "hawa-text-primary hawa-underline-offset-4 hover:hawa-underline",
|
268
|
+
combobox: "hawa-bg-background hawa-border",
|
269
|
+
neoBrutalism: "neo-brutalism"
|
270
|
+
// "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",
|
271
|
+
},
|
272
|
+
size: {
|
273
|
+
default: "hawa-h-10 hawa-px-4 hawa-py-2",
|
274
|
+
heightless: "hawa-px-4 hawa-py-4",
|
275
|
+
xs: "hawa-h-fit hawa-min-h-[25px] hawa-py-1 hawa-text-[10px] hawa-px-2 ",
|
276
|
+
sm: "hawa-h-9 hawa-text-[11px] hawa-rounded-md hawa-px-3",
|
277
|
+
lg: "hawa-h-11 hawa-rounded-md hawa-px-8",
|
278
|
+
xl: "hawa-h-14 hawa-rounded-md hawa-px-10",
|
279
|
+
icon: "hawa-h-10 hawa-w-10",
|
280
|
+
smallIcon: "hawa-h-7 hawa-w-7"
|
281
|
+
}
|
282
|
+
},
|
283
|
+
defaultVariants: {
|
284
|
+
variant: "default",
|
285
|
+
size: "default"
|
286
|
+
}
|
287
|
+
}
|
288
|
+
);
|
289
|
+
var Button = React2.forwardRef(
|
290
|
+
({
|
291
|
+
className,
|
292
|
+
variant,
|
293
|
+
size,
|
294
|
+
asChild = false,
|
295
|
+
centered = true,
|
296
|
+
isLoading,
|
297
|
+
children,
|
298
|
+
...props
|
299
|
+
}, ref) => {
|
300
|
+
const Comp = "button";
|
301
|
+
const loadingColor = variant === "outline" || variant === "ghost" || variant === "neoBrutalism" ? "hawa-bg-primary" : "hawa-bg-primary-foreground";
|
302
|
+
return /* @__PURE__ */ React2.createElement(
|
303
|
+
Comp,
|
304
|
+
{
|
305
|
+
className: cn(
|
306
|
+
buttonVariants({ variant, size, className }),
|
307
|
+
centered && "hawa-justify-center"
|
308
|
+
// "hawa-bg-red-500"
|
309
|
+
),
|
310
|
+
ref,
|
311
|
+
...props
|
312
|
+
},
|
313
|
+
isLoading ? /* @__PURE__ */ React2.createElement(
|
314
|
+
Loading,
|
315
|
+
{
|
316
|
+
design: size === "icon" || size === "smallIcon" ? "spinner" : "dots-pulse",
|
317
|
+
themeMode: variant === "outline" ? "light" : "dark",
|
318
|
+
color: loadingColor,
|
319
|
+
size: size === "sm" || size === "xs" ? "xs" : "button"
|
320
|
+
}
|
321
|
+
) : children
|
322
|
+
);
|
323
|
+
}
|
324
|
+
);
|
325
|
+
Button.displayName = "Button";
|
326
|
+
|
327
|
+
// elements/tooltip/Tooltip.tsx
|
328
|
+
var import_react3 = __toESM(require("react"));
|
310
329
|
var TooltipPrimitive = __toESM(require("@radix-ui/react-tooltip"));
|
311
|
-
var TooltipContent =
|
330
|
+
var TooltipContent = import_react3.default.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ import_react3.default.createElement(
|
312
331
|
TooltipPrimitive.Content,
|
313
332
|
{
|
314
333
|
ref,
|
@@ -321,7 +340,7 @@ var TooltipContent = import_react2.default.forwardRef(({ className, sideOffset =
|
|
321
340
|
}
|
322
341
|
));
|
323
342
|
TooltipContent.displayName = TooltipPrimitive.Content.displayName;
|
324
|
-
var TooltipArrow =
|
343
|
+
var TooltipArrow = import_react3.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ import_react3.default.createElement(TooltipPrimitive.Arrow, { ref, className: cn(className), ...props }));
|
325
344
|
TooltipArrow.displayName = TooltipPrimitive.Arrow.displayName;
|
326
345
|
var Tooltip = ({
|
327
346
|
side,
|
@@ -336,13 +355,13 @@ var Tooltip = ({
|
|
336
355
|
delayDuration = 300,
|
337
356
|
...props
|
338
357
|
}) => {
|
339
|
-
return /* @__PURE__ */
|
358
|
+
return /* @__PURE__ */ import_react3.default.createElement(
|
340
359
|
TooltipPrimitive.TooltipProvider,
|
341
360
|
{
|
342
361
|
delayDuration,
|
343
362
|
...providerProps
|
344
363
|
},
|
345
|
-
/* @__PURE__ */
|
364
|
+
/* @__PURE__ */ import_react3.default.createElement(
|
346
365
|
TooltipPrimitive.Root,
|
347
366
|
{
|
348
367
|
open,
|
@@ -350,2333 +369,13 @@ var Tooltip = ({
|
|
350
369
|
onOpenChange,
|
351
370
|
...props
|
352
371
|
},
|
353
|
-
/* @__PURE__ */
|
354
|
-
/* @__PURE__ */
|
355
|
-
)
|
356
|
-
);
|
357
|
-
};
|
358
|
-
|
359
|
-
// components/elements/skeleton/Skeleton.tsx
|
360
|
-
var import_react3 = __toESM(require("react"));
|
361
|
-
function Skeleton({
|
362
|
-
className,
|
363
|
-
content,
|
364
|
-
animation = "pulse",
|
365
|
-
...props
|
366
|
-
}) {
|
367
|
-
const animationStyles = {
|
368
|
-
none: "hawa-rounded hawa-bg-muted",
|
369
|
-
pulse: "hawa-animate-pulse hawa-rounded hawa-bg-muted",
|
370
|
-
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"
|
371
|
-
};
|
372
|
-
return /* @__PURE__ */ import_react3.default.createElement(
|
373
|
-
"div",
|
374
|
-
{
|
375
|
-
className: cn(
|
376
|
-
animationStyles[animation],
|
377
|
-
content && "hawa-flex hawa-flex-col hawa-items-center hawa-justify-center",
|
378
|
-
className
|
379
|
-
),
|
380
|
-
...props
|
381
|
-
},
|
382
|
-
content && content
|
383
|
-
);
|
384
|
-
}
|
385
|
-
|
386
|
-
// components/elements/dropdownMenu/DropdownMenu.tsx
|
387
|
-
var React5 = __toESM(require("react"));
|
388
|
-
var DropdownMenuPrimitive = __toESM(require("@radix-ui/react-dropdown-menu"));
|
389
|
-
var DropdownMenuSubTrigger = React5.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ React5.createElement(
|
390
|
-
DropdownMenuPrimitive.SubTrigger,
|
391
|
-
{
|
392
|
-
ref,
|
393
|
-
className: cn(
|
394
|
-
"hawa-flex hawa-cursor-default hawa-select-none hawa-items-center hawa-justify-between hawa-rounded-sm hawa-text-sm hawa-outline-none focus:hawa-bg-accent data-[state=open]:hawa-bg-accent",
|
395
|
-
inset && "hawa-pl-8",
|
396
|
-
className
|
397
|
-
),
|
398
|
-
...props
|
399
|
-
},
|
400
|
-
/* @__PURE__ */ React5.createElement("div", { className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-2" }, children),
|
401
|
-
" ",
|
402
|
-
/* @__PURE__ */ React5.createElement(
|
403
|
-
"svg",
|
404
|
-
{
|
405
|
-
"aria-label": "Chevron Right Icon",
|
406
|
-
stroke: "currentColor",
|
407
|
-
fill: "currentColor",
|
408
|
-
strokeWidth: "0",
|
409
|
-
viewBox: "0 0 16 16",
|
410
|
-
height: "1em",
|
411
|
-
width: "1em",
|
412
|
-
className: cn(props.dir === "rtl" ? "hawa-rotate-180" : "")
|
413
|
-
},
|
414
|
-
/* @__PURE__ */ React5.createElement(
|
415
|
-
"path",
|
416
|
-
{
|
417
|
-
fillRule: "evenodd",
|
418
|
-
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"
|
419
|
-
}
|
372
|
+
/* @__PURE__ */ import_react3.default.createElement(TooltipPrimitive.Trigger, { ...triggerProps }, children),
|
373
|
+
/* @__PURE__ */ import_react3.default.createElement(TooltipContent, { side, align: "center", ...contentProps }, content)
|
420
374
|
)
|
421
|
-
)
|
422
|
-
));
|
423
|
-
DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;
|
424
|
-
var DropdownMenuSubContent = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React5.createElement(
|
425
|
-
DropdownMenuPrimitive.SubContent,
|
426
|
-
{
|
427
|
-
ref,
|
428
|
-
className: cn(
|
429
|
-
"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",
|
430
|
-
className
|
431
|
-
),
|
432
|
-
...props
|
433
|
-
}
|
434
|
-
));
|
435
|
-
DropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;
|
436
|
-
var DropdownMenuContent = React5.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ React5.createElement(DropdownMenuPrimitive.Portal, null, /* @__PURE__ */ React5.createElement(
|
437
|
-
DropdownMenuPrimitive.Content,
|
438
|
-
{
|
439
|
-
ref,
|
440
|
-
sideOffset,
|
441
|
-
className: cn(
|
442
|
-
"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",
|
443
|
-
className
|
444
|
-
),
|
445
|
-
...props
|
446
|
-
}
|
447
|
-
)));
|
448
|
-
DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
|
449
|
-
var DropdownMenuItem = React5.forwardRef(({ className, inset, badged, slug, ...props }, ref) => {
|
450
|
-
return /* @__PURE__ */ React5.createElement("a", { href: slug }, /* @__PURE__ */ React5.createElement(
|
451
|
-
DropdownMenuPrimitive.Item,
|
452
|
-
{
|
453
|
-
disabled: props.disabled,
|
454
|
-
ref,
|
455
|
-
className: cn(
|
456
|
-
"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",
|
457
|
-
inset && "hawa-pl-8",
|
458
|
-
props.end && Array.isArray(props.children) && props.children[1] && "hawa-gap-6",
|
459
|
-
className
|
460
|
-
),
|
461
|
-
...props
|
462
|
-
},
|
463
|
-
/* @__PURE__ */ React5.createElement("div", { className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-2 " }, props.children),
|
464
|
-
props.end && props.end,
|
465
|
-
!props.end && props.shortcut && /* @__PURE__ */ React5.createElement(DropdownMenuShortcut, null, props.shortcut),
|
466
|
-
!props.end && badged && /* @__PURE__ */ React5.createElement("div", { className: "hawa-h-3 hawa-w-3 hawa-rounded-full hawa-bg-red-500" })
|
467
|
-
));
|
468
|
-
});
|
469
|
-
DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
|
470
|
-
var DropdownMenuCheckboxItem = React5.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ React5.createElement(
|
471
|
-
DropdownMenuPrimitive.CheckboxItem,
|
472
|
-
{
|
473
|
-
ref,
|
474
|
-
className: cn(
|
475
|
-
"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",
|
476
|
-
className
|
477
|
-
),
|
478
|
-
checked,
|
479
|
-
...props
|
480
|
-
},
|
481
|
-
/* @__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(
|
482
|
-
"svg",
|
483
|
-
{
|
484
|
-
"aria-label": "Check Mark",
|
485
|
-
stroke: "currentColor",
|
486
|
-
fill: "currentColor",
|
487
|
-
strokeWidth: "0",
|
488
|
-
viewBox: "0 0 512 512",
|
489
|
-
height: "0.60em",
|
490
|
-
width: "0.60em"
|
491
|
-
},
|
492
|
-
/* @__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" })
|
493
|
-
), " ")),
|
494
|
-
children
|
495
|
-
));
|
496
|
-
DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;
|
497
|
-
var DropdownMenuRadioItem = React5.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ React5.createElement(
|
498
|
-
DropdownMenuPrimitive.RadioItem,
|
499
|
-
{
|
500
|
-
ref,
|
501
|
-
className: cn(
|
502
|
-
"hawa-relative hawa-flex hawa-cursor-pointer 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",
|
503
|
-
className
|
504
|
-
),
|
505
|
-
...props
|
506
|
-
},
|
507
|
-
/* @__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(
|
508
|
-
"svg",
|
509
|
-
{
|
510
|
-
xmlns: "http://www.w3.org/2000/svg",
|
511
|
-
width: "24",
|
512
|
-
"aria-label": "Circle",
|
513
|
-
height: "24",
|
514
|
-
viewBox: "0 0 24 24",
|
515
|
-
fill: "none",
|
516
|
-
stroke: "currentColor",
|
517
|
-
strokeWidth: "2",
|
518
|
-
strokeLinecap: "round",
|
519
|
-
strokeLinejoin: "round",
|
520
|
-
className: "hawa-h-2 hawa-w-2 hawa-fill-current"
|
521
|
-
},
|
522
|
-
/* @__PURE__ */ React5.createElement("circle", { cx: "12", cy: "12", r: "10" })
|
523
|
-
))),
|
524
|
-
children
|
525
|
-
));
|
526
|
-
DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;
|
527
|
-
var DropdownMenuLabel = React5.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ React5.createElement(
|
528
|
-
DropdownMenuPrimitive.Label,
|
529
|
-
{
|
530
|
-
ref,
|
531
|
-
className: cn(
|
532
|
-
"hawa-px-2 hawa-py-1.5 hawa-text-sm hawa-font-semibold",
|
533
|
-
inset && "hawa-pl-8",
|
534
|
-
className
|
535
|
-
),
|
536
|
-
...props
|
537
|
-
}
|
538
|
-
));
|
539
|
-
DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
|
540
|
-
var DropdownMenuSeparator = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React5.createElement(
|
541
|
-
DropdownMenuPrimitive.Separator,
|
542
|
-
{
|
543
|
-
ref,
|
544
|
-
className: cn("hawa--mx-1 hawa-my-1 hawa-h-px hawa-bg-muted", className),
|
545
|
-
...props
|
546
|
-
}
|
547
|
-
));
|
548
|
-
DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;
|
549
|
-
var DropdownMenuShortcut = ({
|
550
|
-
className,
|
551
|
-
...props
|
552
|
-
}) => {
|
553
|
-
return /* @__PURE__ */ React5.createElement(
|
554
|
-
"span",
|
555
|
-
{
|
556
|
-
className: cn(
|
557
|
-
"hawa-text-xs hawa-tracking-widest hawa-opacity-60",
|
558
|
-
className
|
559
|
-
),
|
560
|
-
...props
|
561
|
-
}
|
562
375
|
);
|
563
376
|
};
|
564
|
-
DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
|
565
|
-
|
566
|
-
// components/elements/accordion/Accordion.tsx
|
567
|
-
var React9 = __toESM(require("react"));
|
568
|
-
var AccordionPrimitive3 = __toESM(require("@radix-ui/react-accordion"));
|
569
|
-
|
570
|
-
// components/elements/chip/Chip.tsx
|
571
|
-
var import_react4 = __toESM(require("react"));
|
572
|
-
var Chip = import_react4.default.forwardRef(
|
573
|
-
({
|
574
|
-
label,
|
575
|
-
size = "normal",
|
576
|
-
icon,
|
577
|
-
color,
|
578
|
-
radius = "inherit",
|
579
|
-
dotType,
|
580
|
-
...rest
|
581
|
-
}, ref) => {
|
582
|
-
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 ";
|
583
|
-
let radiusStyles = {
|
584
|
-
inherit: " hawa-rounded",
|
585
|
-
full: "hawa-rounded-full",
|
586
|
-
none: "hawa-rounded-none"
|
587
|
-
};
|
588
|
-
let sizeStyles2 = {
|
589
|
-
small: "hawa-h-[15px] hawa-leading-4 hawa-px-0 hawa-py-0 hawa-text-[9px] hawa-gap-0.5 ",
|
590
|
-
normal: "hawa-h-fit hawa-text-xs",
|
591
|
-
large: "hawa-text-base"
|
592
|
-
};
|
593
|
-
let dotStyles = {
|
594
|
-
small: "hawa-flex hawa-h-1 hawa-w-1 hawa-rounded-full",
|
595
|
-
normal: "hawa-flex hawa-h-2 hawa-w-2 hawa-rounded-full",
|
596
|
-
large: "hawa-flex hawa-h-3 hawa-w-3 hawa-rounded-full"
|
597
|
-
};
|
598
|
-
let dotTypeStyles = {
|
599
|
-
available: "hawa-bg-green-500",
|
600
|
-
unavailable: "hawa-bg-red-500"
|
601
|
-
};
|
602
|
-
let colorStyles = {
|
603
|
-
green: "hawa-bg-green-100 hawa-text-green-500 dark:hawa-bg-green-400 dark:hawa-text-green-800",
|
604
|
-
blue: "hawa-bg-blue-100 hawa-text-blue-500 dark:hawa-bg-blue-400 dark:hawa-text-blue-100",
|
605
|
-
red: "hawa-bg-red-100 hawa-text-red-500 dark:hawa-bg-red-400 dark:hawa-text-red-100",
|
606
|
-
yellow: "hawa-bg-yellow-100 hawa-text-yellow-600 dark:hawa-bg-yellow-400 dark:hawa-text-yellow-800",
|
607
|
-
orange: "hawa-bg-orange-100 hawa-text-orange-500 dark:hawa-bg-orange-400 dark:hawa-text-orange-100",
|
608
|
-
purple: "hawa-bg-purple-100 hawa-text-purple-500 dark:hawa-bg-purple-400 dark:hawa-text-purple-100",
|
609
|
-
cyan: "hawa-bg-cyan-100 hawa-text-cyan-800 dark:hawa-bg-cyan-400 dark:hawa-text-cyan-800",
|
610
|
-
hyper: "hawa-text-white hawa-bg-gradient-to-tl hawa-from-pink-500 hawa-via-red-500 hawa-to-yellow-500 ",
|
611
|
-
oceanic: "hawa-text-white hawa-bg-gradient-to-bl hawa-from-green-300 hawa-via-blue-500 hawa-to-purple-600"
|
612
|
-
};
|
613
|
-
if (label) {
|
614
|
-
return /* @__PURE__ */ import_react4.default.createElement(
|
615
|
-
"span",
|
616
|
-
{
|
617
|
-
...rest,
|
618
|
-
ref,
|
619
|
-
className: cn(
|
620
|
-
defaultStyles,
|
621
|
-
sizeStyles2[size],
|
622
|
-
radiusStyles[radius],
|
623
|
-
color ? colorStyles[color] : "hawa-border hawa-bg-none"
|
624
|
-
)
|
625
|
-
},
|
626
|
-
dotType && /* @__PURE__ */ import_react4.default.createElement(
|
627
|
-
"span",
|
628
|
-
{
|
629
|
-
className: cn(dotStyles[size], dotTypeStyles[dotType])
|
630
|
-
}
|
631
|
-
),
|
632
|
-
icon && icon,
|
633
|
-
label
|
634
|
-
);
|
635
|
-
} else {
|
636
|
-
return /* @__PURE__ */ import_react4.default.createElement(
|
637
|
-
"span",
|
638
|
-
{
|
639
|
-
...rest,
|
640
|
-
ref,
|
641
|
-
className: cn(
|
642
|
-
"hawa-h-2 hawa-w-2 hawa-rounded-full",
|
643
|
-
color ? colorStyles[color] : "hawa-border hawa-bg-none"
|
644
|
-
)
|
645
|
-
}
|
646
|
-
);
|
647
|
-
}
|
648
|
-
}
|
649
|
-
);
|
650
|
-
|
651
|
-
// components/elements/accordion/AccordionContent.tsx
|
652
|
-
var React7 = __toESM(require("react"));
|
653
|
-
var AccordionPrimitive = __toESM(require("@radix-ui/react-accordion"));
|
654
|
-
var AccordionContent = React7.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ React7.createElement(
|
655
|
-
AccordionPrimitive.Content,
|
656
|
-
{
|
657
|
-
ref,
|
658
|
-
className: !props.unstyled ? cn(
|
659
|
-
"hawa-overflow-hidden hawa-text-sm hawa-transition-all data-[state=closed]:hawa-animate-accordion-up data-[state=open]:hawa-animate-accordion-down",
|
660
|
-
className
|
661
|
-
) : className,
|
662
|
-
...props
|
663
|
-
},
|
664
|
-
/* @__PURE__ */ React7.createElement("div", { className: "hawa-bg-background hawa-p-4" }, children)
|
665
|
-
));
|
666
|
-
AccordionContent.displayName = AccordionPrimitive.Content.displayName;
|
667
|
-
|
668
|
-
// components/elements/accordion/AccordionTrigger.tsx
|
669
|
-
var React8 = __toESM(require("react"));
|
670
|
-
var AccordionPrimitive2 = __toESM(require("@radix-ui/react-accordion"));
|
671
|
-
var AccordionTrigger = React8.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ React8.createElement(AccordionPrimitive2.Header, { className: "hawa-flex" }, /* @__PURE__ */ React8.createElement(
|
672
|
-
AccordionPrimitive2.Trigger,
|
673
|
-
{
|
674
|
-
ref,
|
675
|
-
className: !props.unstyled ? cn(
|
676
|
-
"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",
|
677
|
-
props.disabled ? "hawa-bg-muted/30 hawa-text-muted-foreground/50" : "hover:hawa-bg-muted",
|
678
|
-
className
|
679
|
-
) : className,
|
680
|
-
...props
|
681
|
-
},
|
682
|
-
children,
|
683
|
-
!props.hideArrow && /* @__PURE__ */ React8.createElement(
|
684
|
-
"svg",
|
685
|
-
{
|
686
|
-
xmlns: "http://www.w3.org/2000/svg",
|
687
|
-
width: "24",
|
688
|
-
height: "24",
|
689
|
-
viewBox: "0 0 24 24",
|
690
|
-
fill: "none",
|
691
|
-
stroke: "currentColor",
|
692
|
-
strokeWidth: "2",
|
693
|
-
strokeLinecap: "round",
|
694
|
-
strokeLinejoin: "round",
|
695
|
-
className: "hawa-icon hawa-shrink-0 hawa-transition-transform hawa-duration-200"
|
696
|
-
},
|
697
|
-
/* @__PURE__ */ React8.createElement("path", { d: "m6 9 6 6 6-6" })
|
698
|
-
)
|
699
|
-
)));
|
700
|
-
AccordionTrigger.displayName = AccordionPrimitive2.Trigger.displayName;
|
701
|
-
|
702
|
-
// components/elements/accordion/Accordion.tsx
|
703
|
-
var Accordion = React9.forwardRef(
|
704
|
-
({
|
705
|
-
items,
|
706
|
-
design = "default",
|
707
|
-
itemClassNames,
|
708
|
-
triggerclassNames,
|
709
|
-
contentclassNames,
|
710
|
-
className,
|
711
|
-
...props
|
712
|
-
}, ref) => /* @__PURE__ */ React9.createElement(AccordionPrimitive3.Root, { type: props.type, collapsible: true }, /* @__PURE__ */ React9.createElement(
|
713
|
-
"div",
|
714
|
-
{
|
715
|
-
className: cn("hawa-flex hawa-flex-col", {
|
716
|
-
"hawa-gap-4": design === "separated",
|
717
|
-
"hawa-gap-0": design === "default"
|
718
|
-
})
|
719
|
-
},
|
720
|
-
items.map((item, index) => /* @__PURE__ */ React9.createElement(
|
721
|
-
AccordionPrimitive3.Item,
|
722
|
-
{
|
723
|
-
disabled: item.disabled || false,
|
724
|
-
className: cn(itemClassNames, "hawa-rounded"),
|
725
|
-
key: index,
|
726
|
-
value: `item-${index}`
|
727
|
-
},
|
728
|
-
/* @__PURE__ */ React9.createElement(
|
729
|
-
AccordionTrigger,
|
730
|
-
{
|
731
|
-
disabled: item.disabled || false,
|
732
|
-
className: cn(
|
733
|
-
"hawa-transition-all",
|
734
|
-
design === "separated" ? "hawa-rounded data-[state=open]:hawa-rounded-b-none" : {
|
735
|
-
"hawa-rounded-t": index === 0,
|
736
|
-
"data-[state=closed]:hawa-rounded-b": index === items.length - 1
|
737
|
-
},
|
738
|
-
triggerclassNames
|
739
|
-
)
|
740
|
-
},
|
741
|
-
/* @__PURE__ */ React9.createElement(
|
742
|
-
"span",
|
743
|
-
{
|
744
|
-
className: cn(
|
745
|
-
"hawa-flex hawa-flex-row",
|
746
|
-
item.chip && "hawa-gap-2"
|
747
|
-
)
|
748
|
-
},
|
749
|
-
item.trigger,
|
750
|
-
" ",
|
751
|
-
item.chip && /* @__PURE__ */ React9.createElement(Chip, { ...item.chip })
|
752
|
-
)
|
753
|
-
),
|
754
|
-
/* @__PURE__ */ React9.createElement(
|
755
|
-
AccordionContent,
|
756
|
-
{
|
757
|
-
"aria-disabled": item.disabled || false,
|
758
|
-
className: cn(
|
759
|
-
"hawa-border hawa-transition-all",
|
760
|
-
design === "separated" ? "hawa-rounded data-[state=open]:hawa-rounded-t-none" : {
|
761
|
-
"data-[state=open]:hawa-rounded-b": index === items.length - 1
|
762
|
-
},
|
763
|
-
contentclassNames
|
764
|
-
)
|
765
|
-
},
|
766
|
-
item.content
|
767
|
-
)
|
768
|
-
))
|
769
|
-
))
|
770
|
-
);
|
771
|
-
Accordion.displayName = "Accordion";
|
772
|
-
|
773
|
-
// components/elements/accordion/AccordionItem.tsx
|
774
|
-
var React10 = __toESM(require("react"));
|
775
|
-
var AccordionPrimitive4 = __toESM(require("@radix-ui/react-accordion"));
|
776
|
-
var AccordionItem = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React10.createElement(AccordionPrimitive4.Item, { ref, className: cn(className), ...props }));
|
777
|
-
AccordionItem.displayName = "AccordionItem";
|
778
|
-
|
779
|
-
// components/elements/accordion/AccordionRoot.tsx
|
780
|
-
var AccordionPrimitive5 = __toESM(require("@radix-ui/react-accordion"));
|
781
|
-
|
782
|
-
// components/elements/logos/Logos.tsx
|
783
|
-
var import_react5 = __toESM(require("react"));
|
784
|
-
|
785
|
-
// components/elements/navigationMenu/NavigationMenu.tsx
|
786
|
-
var React12 = __toESM(require("react"));
|
787
|
-
var NavigationMenuPrimitive = __toESM(require("@radix-ui/react-navigation-menu"));
|
788
|
-
var import_class_variance_authority = require("class-variance-authority");
|
789
|
-
var navigationMenuTriggerStyle = (0, import_class_variance_authority.cva)(
|
790
|
-
"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 "
|
791
|
-
);
|
792
|
-
var NavigationMenuRoot = React12.forwardRef(({ className, children, viewportClassNames, ...props }, ref) => /* @__PURE__ */ React12.createElement(
|
793
|
-
NavigationMenuPrimitive.Root,
|
794
|
-
{
|
795
|
-
ref,
|
796
|
-
className: cn(
|
797
|
-
"hawa-relative hawa-z-10 hawa-flex hawa-flex-1 hawa-items-center hawa-justify-center",
|
798
|
-
// "hawa-max-w-max",
|
799
|
-
className
|
800
|
-
),
|
801
|
-
...props
|
802
|
-
},
|
803
|
-
children,
|
804
|
-
/* @__PURE__ */ React12.createElement(NavigationMenuViewport, { className: viewportClassNames })
|
805
|
-
));
|
806
|
-
var NavigationMenuList = React12.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React12.createElement(
|
807
|
-
NavigationMenuPrimitive.List,
|
808
|
-
{
|
809
|
-
ref,
|
810
|
-
className: cn(
|
811
|
-
"hawa-group hawa-flex hawa-flex-1 hawa-list-none hawa-items-center hawa-justify-center hawa-gap-1",
|
812
|
-
className
|
813
|
-
),
|
814
|
-
...props
|
815
|
-
}
|
816
|
-
));
|
817
|
-
var NavigationMenuTrigger = React12.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ React12.createElement(
|
818
|
-
NavigationMenuPrimitive.Trigger,
|
819
|
-
{
|
820
|
-
ref,
|
821
|
-
className: cn(navigationMenuTriggerStyle(), "hawa-group", className),
|
822
|
-
...props
|
823
|
-
},
|
824
|
-
children,
|
825
|
-
/* @__PURE__ */ React12.createElement(
|
826
|
-
"svg",
|
827
|
-
{
|
828
|
-
"aria-label": "Chevron Icon",
|
829
|
-
xmlns: "http://www.w3.org/2000/svg",
|
830
|
-
width: "24",
|
831
|
-
height: "24",
|
832
|
-
viewBox: "0 0 24 24",
|
833
|
-
fill: "none",
|
834
|
-
stroke: "currentColor",
|
835
|
-
strokeWidth: "2",
|
836
|
-
strokeLinecap: "round",
|
837
|
-
strokeLinejoin: "round",
|
838
|
-
"aria-hidden": "true",
|
839
|
-
className: "hawa-icon hawa-relative hawa-top-[1px] hawa-transition hawa-duration-200 group-data-[state=open]:hawa-rotate-180"
|
840
|
-
},
|
841
|
-
/* @__PURE__ */ React12.createElement("path", { d: "m6 9 6 6 6-6" })
|
842
|
-
)
|
843
|
-
));
|
844
|
-
var NavigationMenuContent = React12.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React12.createElement(
|
845
|
-
NavigationMenuPrimitive.Content,
|
846
|
-
{
|
847
|
-
ref,
|
848
|
-
className: cn(
|
849
|
-
"hawa-absolute hawa-left-0 hawa-top-0 hawa-w-full hawa-rounded ",
|
850
|
-
// "md:hawa-absolute md:hawa-w-auto hawa-left-0 hawa-top-0 ",
|
851
|
-
// animation
|
852
|
-
"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",
|
853
|
-
className
|
854
|
-
),
|
855
|
-
...props
|
856
|
-
}
|
857
|
-
));
|
858
|
-
var NavigationMenuViewport = React12.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React12.createElement(
|
859
|
-
"div",
|
860
|
-
{
|
861
|
-
className: cn(
|
862
|
-
"hawa-absolute hawa-top-full hawa-flex hawa-w-full hawa-justify-center"
|
863
|
-
)
|
864
|
-
},
|
865
|
-
/* @__PURE__ */ React12.createElement(
|
866
|
-
NavigationMenuPrimitive.Viewport,
|
867
|
-
{
|
868
|
-
className: cn(
|
869
|
-
"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 ",
|
870
|
-
// hawa-h-[var(--radix-navigation-menu-viewport-height)]
|
871
|
-
// "md:hawa-w-[var(--radix-navigation-menu-viewport-width)]",
|
872
|
-
className
|
873
|
-
),
|
874
|
-
style: {
|
875
|
-
height: "calc(var(--radix-navigation-menu-viewport-height) + 1px)"
|
876
|
-
},
|
877
|
-
ref,
|
878
|
-
...props
|
879
|
-
}
|
880
|
-
)
|
881
|
-
));
|
882
|
-
var NavigationMenuIndicator = React12.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React12.createElement(
|
883
|
-
NavigationMenuPrimitive.Indicator,
|
884
|
-
{
|
885
|
-
ref,
|
886
|
-
className: cn(
|
887
|
-
"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",
|
888
|
-
className
|
889
|
-
),
|
890
|
-
...props
|
891
|
-
},
|
892
|
-
/* @__PURE__ */ React12.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" })
|
893
|
-
));
|
894
|
-
NavigationMenuContent.displayName = NavigationMenuPrimitive.Content.displayName;
|
895
|
-
NavigationMenuTrigger.displayName = NavigationMenuPrimitive.Trigger.displayName;
|
896
|
-
NavigationMenuList.displayName = NavigationMenuPrimitive.List.displayName;
|
897
|
-
NavigationMenuRoot.displayName = NavigationMenuPrimitive.Root.displayName;
|
898
|
-
NavigationMenuIndicator.displayName = NavigationMenuPrimitive.Indicator.displayName;
|
899
|
-
NavigationMenuViewport.displayName = NavigationMenuPrimitive.Viewport.displayName;
|
900
|
-
|
901
|
-
// components/elements/sheet/Sheet.tsx
|
902
|
-
var React13 = __toESM(require("react"));
|
903
|
-
var SheetPrimitive = __toESM(require("@radix-ui/react-dialog"));
|
904
|
-
var import_class_variance_authority2 = require("class-variance-authority");
|
905
|
-
var SheetPortal = SheetPrimitive.Portal;
|
906
|
-
var SheetOverlay = React13.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React13.createElement(
|
907
|
-
SheetPrimitive.Overlay,
|
908
|
-
{
|
909
|
-
className: cn(
|
910
|
-
"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",
|
911
|
-
className
|
912
|
-
),
|
913
|
-
...props,
|
914
|
-
ref
|
915
|
-
}
|
916
|
-
));
|
917
|
-
var sheetVariants = (0, import_class_variance_authority2.cva)(
|
918
|
-
"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",
|
919
|
-
{
|
920
|
-
variants: {
|
921
|
-
side: {
|
922
|
-
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",
|
923
|
-
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",
|
924
|
-
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",
|
925
|
-
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"
|
926
|
-
}
|
927
|
-
},
|
928
|
-
defaultVariants: {
|
929
|
-
side: "right"
|
930
|
-
}
|
931
|
-
}
|
932
|
-
);
|
933
|
-
var SheetContent = React13.forwardRef(
|
934
|
-
({ side = "right", className, children, persist, hideCloseButton, ...props }, ref) => /* @__PURE__ */ React13.createElement(SheetPortal, null, /* @__PURE__ */ React13.createElement(SheetOverlay, null), /* @__PURE__ */ React13.createElement(
|
935
|
-
SheetPrimitive.Content,
|
936
|
-
{
|
937
|
-
ref,
|
938
|
-
className: cn(sheetVariants({ side }), className),
|
939
|
-
onPointerDownOutside: (e) => {
|
940
|
-
if (persist) {
|
941
|
-
e.preventDefault();
|
942
|
-
}
|
943
|
-
},
|
944
|
-
...props
|
945
|
-
},
|
946
|
-
children,
|
947
|
-
!hideCloseButton && /* @__PURE__ */ React13.createElement(
|
948
|
-
SheetPrimitive.Close,
|
949
|
-
{
|
950
|
-
className: cn(
|
951
|
-
"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",
|
952
|
-
{
|
953
|
-
"hawa-right-4 hawa-top-4": side === "left" || side === "bottom",
|
954
|
-
"hawa-left-4 hawa-top-4": side === "right",
|
955
|
-
"hawa-bottom-4 hawa-right-4": side === "top"
|
956
|
-
}
|
957
|
-
)
|
958
|
-
},
|
959
|
-
/* @__PURE__ */ React13.createElement(
|
960
|
-
"svg",
|
961
|
-
{
|
962
|
-
"aria-label": "Close Icon",
|
963
|
-
"aria-hidden": "true",
|
964
|
-
className: "hawa-h-5 hawa-w-5",
|
965
|
-
fill: "currentColor",
|
966
|
-
viewBox: "0 0 20 20"
|
967
|
-
},
|
968
|
-
/* @__PURE__ */ React13.createElement(
|
969
|
-
"path",
|
970
|
-
{
|
971
|
-
fillRule: "evenodd",
|
972
|
-
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",
|
973
|
-
clipRule: "evenodd"
|
974
|
-
}
|
975
|
-
)
|
976
|
-
),
|
977
|
-
/* @__PURE__ */ React13.createElement("span", { className: "hawa-sr-only" }, "Close")
|
978
|
-
)
|
979
|
-
))
|
980
|
-
);
|
981
|
-
var SheetHeader = ({
|
982
|
-
className,
|
983
|
-
...props
|
984
|
-
}) => /* @__PURE__ */ React13.createElement(
|
985
|
-
"div",
|
986
|
-
{
|
987
|
-
className: cn(
|
988
|
-
"hawa-flex hawa-flex-col hawa-space-y-2 hawa-text-center sm:hawa-text-left",
|
989
|
-
className
|
990
|
-
),
|
991
|
-
...props
|
992
|
-
}
|
993
|
-
);
|
994
|
-
var SheetFooter = ({
|
995
|
-
className,
|
996
|
-
...props
|
997
|
-
}) => /* @__PURE__ */ React13.createElement(
|
998
|
-
"div",
|
999
|
-
{
|
1000
|
-
className: cn(
|
1001
|
-
"hawa-flex hawa-flex-col-reverse sm:hawa-flex-row sm:hawa-justify-end sm:hawa-space-x-2",
|
1002
|
-
className
|
1003
|
-
),
|
1004
|
-
...props
|
1005
|
-
}
|
1006
|
-
);
|
1007
|
-
var SheetTitle = React13.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React13.createElement(
|
1008
|
-
SheetPrimitive.Title,
|
1009
|
-
{
|
1010
|
-
ref,
|
1011
|
-
className: cn(
|
1012
|
-
"hawa-text-lg hawa-font-semibold hawa-text-foreground",
|
1013
|
-
className
|
1014
|
-
),
|
1015
|
-
...props
|
1016
|
-
}
|
1017
|
-
));
|
1018
|
-
var SheetDescription = React13.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React13.createElement(
|
1019
|
-
SheetPrimitive.Description,
|
1020
|
-
{
|
1021
|
-
ref,
|
1022
|
-
className: cn("hawa-text-sm hawa-text-muted-foreground", className),
|
1023
|
-
...props
|
1024
|
-
}
|
1025
|
-
));
|
1026
|
-
SheetDescription.displayName = SheetPrimitive.Description.displayName;
|
1027
|
-
SheetOverlay.displayName = SheetPrimitive.Overlay.displayName;
|
1028
|
-
SheetContent.displayName = SheetPrimitive.Content.displayName;
|
1029
|
-
SheetHeader.displayName = "SheetHeader";
|
1030
|
-
SheetFooter.displayName = "SheetFooter";
|
1031
|
-
SheetTitle.displayName = SheetPrimitive.Title.displayName;
|
1032
|
-
|
1033
|
-
// components/elements/dialog/Dialog.tsx
|
1034
|
-
var React14 = __toESM(require("react"));
|
1035
|
-
var DialogPrimitive = __toESM(require("@radix-ui/react-dialog"));
|
1036
|
-
var DialogPortal = ({ ...props }) => /* @__PURE__ */ React14.createElement(DialogPrimitive.Portal, { ...props });
|
1037
|
-
var DialogOverlay = React14.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React14.createElement(
|
1038
|
-
DialogPrimitive.Overlay,
|
1039
|
-
{
|
1040
|
-
ref,
|
1041
|
-
className: cn(
|
1042
|
-
"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",
|
1043
|
-
className
|
1044
|
-
),
|
1045
|
-
...props
|
1046
|
-
}
|
1047
|
-
));
|
1048
|
-
var DialogContent = React14.forwardRef(({ className, children, persist, hideCloseButton, ...props }, ref) => /* @__PURE__ */ React14.createElement(DialogPortal, null, /* @__PURE__ */ React14.createElement(DialogOverlay, null), /* @__PURE__ */ React14.createElement(
|
1049
|
-
DialogPrimitive.Content,
|
1050
|
-
{
|
1051
|
-
onPointerDownOutside: (e) => {
|
1052
|
-
if (persist) {
|
1053
|
-
e.preventDefault();
|
1054
|
-
}
|
1055
|
-
},
|
1056
|
-
ref,
|
1057
|
-
className: cn(
|
1058
|
-
"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",
|
1059
|
-
className
|
1060
|
-
),
|
1061
|
-
...props
|
1062
|
-
},
|
1063
|
-
children,
|
1064
|
-
!hideCloseButton && /* @__PURE__ */ React14.createElement(
|
1065
|
-
DialogPrimitive.Close,
|
1066
|
-
{
|
1067
|
-
className: cn(
|
1068
|
-
"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",
|
1069
|
-
props.dir === "rtl" ? " hawa-left-4" : " hawa-right-4"
|
1070
|
-
)
|
1071
|
-
},
|
1072
|
-
/* @__PURE__ */ React14.createElement(
|
1073
|
-
"svg",
|
1074
|
-
{
|
1075
|
-
"aria-label": "Close Icon",
|
1076
|
-
"aria-hidden": "true",
|
1077
|
-
className: "hawa-h-5 hawa-w-5",
|
1078
|
-
fill: "currentColor",
|
1079
|
-
viewBox: "0 0 20 20"
|
1080
|
-
},
|
1081
|
-
/* @__PURE__ */ React14.createElement(
|
1082
|
-
"path",
|
1083
|
-
{
|
1084
|
-
fillRule: "evenodd",
|
1085
|
-
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",
|
1086
|
-
clipRule: "evenodd"
|
1087
|
-
}
|
1088
|
-
)
|
1089
|
-
),
|
1090
|
-
/* @__PURE__ */ React14.createElement("span", { className: "hawa-sr-only" }, "Close")
|
1091
|
-
)
|
1092
|
-
)));
|
1093
|
-
var DialogCarouselContent = React14.forwardRef(
|
1094
|
-
({
|
1095
|
-
className,
|
1096
|
-
children,
|
1097
|
-
onPrev,
|
1098
|
-
persist,
|
1099
|
-
hideCloseButton,
|
1100
|
-
hidePrevButton,
|
1101
|
-
...props
|
1102
|
-
}, ref) => /* @__PURE__ */ React14.createElement(DialogPortal, null, /* @__PURE__ */ React14.createElement(DialogOverlay, null), /* @__PURE__ */ React14.createElement(
|
1103
|
-
DialogPrimitive.Content,
|
1104
|
-
{
|
1105
|
-
onPointerDownOutside: (e) => {
|
1106
|
-
if (persist) {
|
1107
|
-
e.preventDefault();
|
1108
|
-
}
|
1109
|
-
},
|
1110
|
-
ref,
|
1111
|
-
className: cn(
|
1112
|
-
"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",
|
1113
|
-
className
|
1114
|
-
),
|
1115
|
-
...props
|
1116
|
-
},
|
1117
|
-
children,
|
1118
|
-
/* @__PURE__ */ React14.createElement(
|
1119
|
-
"div",
|
1120
|
-
{
|
1121
|
-
className: cn(
|
1122
|
-
"hawa-absolute hawa-top-0 hawa-flex hawa-w-full hawa-flex-row hawa-p-4",
|
1123
|
-
onPrev ? "hawa-justify-between" : "hawa-justify-end"
|
1124
|
-
)
|
1125
|
-
},
|
1126
|
-
hidePrevButton ? /* @__PURE__ */ React14.createElement("div", null) : /* @__PURE__ */ React14.createElement(
|
1127
|
-
"div",
|
1128
|
-
{
|
1129
|
-
onClick: onPrev,
|
1130
|
-
className: cn(
|
1131
|
-
"hawa-end-0 hawa-cursor-pointer 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",
|
1132
|
-
props.dir === "rtl" && "hawa-rotate-180"
|
1133
|
-
)
|
1134
|
-
},
|
1135
|
-
/* @__PURE__ */ React14.createElement(
|
1136
|
-
"svg",
|
1137
|
-
{
|
1138
|
-
xmlns: "http://www.w3.org/2000/svg",
|
1139
|
-
width: "24",
|
1140
|
-
height: "24",
|
1141
|
-
viewBox: "0 0 24 24",
|
1142
|
-
fill: "none",
|
1143
|
-
className: "hawa-h-6 hawa-w-6",
|
1144
|
-
stroke: "currentColor",
|
1145
|
-
strokeWidth: "2",
|
1146
|
-
strokeLinecap: "round",
|
1147
|
-
strokeLinejoin: "round"
|
1148
|
-
},
|
1149
|
-
/* @__PURE__ */ React14.createElement("path", { d: "m15 18-6-6 6-6" })
|
1150
|
-
)
|
1151
|
-
),
|
1152
|
-
!hideCloseButton && /* @__PURE__ */ React14.createElement(
|
1153
|
-
DialogPrimitive.Close,
|
1154
|
-
{
|
1155
|
-
className: cn(
|
1156
|
-
"hawa-end-0 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 ",
|
1157
|
-
props.dir === "rtl" ? " hawa-left-4" : " hawa-right-4"
|
1158
|
-
)
|
1159
|
-
},
|
1160
|
-
/* @__PURE__ */ React14.createElement(
|
1161
|
-
"svg",
|
1162
|
-
{
|
1163
|
-
"aria-label": "Close Icon",
|
1164
|
-
"aria-hidden": "true",
|
1165
|
-
className: "hawa-h-6 hawa-w-6",
|
1166
|
-
fill: "currentColor",
|
1167
|
-
viewBox: "0 0 20 20"
|
1168
|
-
},
|
1169
|
-
/* @__PURE__ */ React14.createElement(
|
1170
|
-
"path",
|
1171
|
-
{
|
1172
|
-
fillRule: "evenodd",
|
1173
|
-
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",
|
1174
|
-
clipRule: "evenodd"
|
1175
|
-
}
|
1176
|
-
)
|
1177
|
-
),
|
1178
|
-
/* @__PURE__ */ React14.createElement("span", { className: "hawa-sr-only" }, "Close")
|
1179
|
-
)
|
1180
|
-
)
|
1181
|
-
))
|
1182
|
-
);
|
1183
|
-
var DialogHeader = ({
|
1184
|
-
className,
|
1185
|
-
...props
|
1186
|
-
}) => /* @__PURE__ */ React14.createElement(
|
1187
|
-
"div",
|
1188
|
-
{
|
1189
|
-
className: cn(
|
1190
|
-
"hawa-flex hawa-flex-col hawa-space-y-1.5 hawa-text-center sm:hawa-text-left",
|
1191
|
-
className
|
1192
|
-
),
|
1193
|
-
...props
|
1194
|
-
}
|
1195
|
-
);
|
1196
|
-
var DialogTitle = React14.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React14.createElement(
|
1197
|
-
DialogPrimitive.Title,
|
1198
|
-
{
|
1199
|
-
ref,
|
1200
|
-
className: cn(
|
1201
|
-
"hawa-text-start hawa-text-lg hawa-font-semibold hawa-leading-none hawa-tracking-tight",
|
1202
|
-
className
|
1203
|
-
),
|
1204
|
-
...props
|
1205
|
-
}
|
1206
|
-
));
|
1207
|
-
var DialogDescription = React14.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React14.createElement(
|
1208
|
-
DialogPrimitive.Description,
|
1209
|
-
{
|
1210
|
-
ref,
|
1211
|
-
className: cn(
|
1212
|
-
"hawa-text-start hawa-text-sm hawa-text-muted-foreground",
|
1213
|
-
className
|
1214
|
-
),
|
1215
|
-
...props
|
1216
|
-
}
|
1217
|
-
));
|
1218
|
-
var DialogFooter = ({
|
1219
|
-
className,
|
1220
|
-
...props
|
1221
|
-
}) => /* @__PURE__ */ React14.createElement(
|
1222
|
-
"div",
|
1223
|
-
{
|
1224
|
-
className: cn(
|
1225
|
-
"hawa-flex hawa-flex-col-reverse sm:hawa-flex-row sm:hawa-justify-end sm:hawa-gap-2",
|
1226
|
-
className
|
1227
|
-
),
|
1228
|
-
...props
|
1229
|
-
}
|
1230
|
-
);
|
1231
|
-
var DialogCarousel = ({
|
1232
|
-
stepsApi,
|
1233
|
-
stepsRef,
|
1234
|
-
children,
|
1235
|
-
direction
|
1236
|
-
}) => {
|
1237
|
-
React14.useEffect(() => {
|
1238
|
-
if (stepsApi) {
|
1239
|
-
stepsApi.reInit();
|
1240
|
-
}
|
1241
|
-
}, [stepsApi, children]);
|
1242
|
-
return /* @__PURE__ */ React14.createElement("div", { className: "hawa-overflow-hidden" }, /* @__PURE__ */ React14.createElement("div", { ref: stepsRef, dir: direction }, /* @__PURE__ */ React14.createElement(
|
1243
|
-
"div",
|
1244
|
-
{
|
1245
|
-
className: "hawa-flex",
|
1246
|
-
style: {
|
1247
|
-
transition: "height 0.2s"
|
1248
|
-
}
|
1249
|
-
},
|
1250
|
-
React14.Children.map(children, (child, index) => /* @__PURE__ */ React14.createElement(
|
1251
|
-
"div",
|
1252
|
-
{
|
1253
|
-
className: cn(
|
1254
|
-
"hawa-flex hawa-h-fit hawa-flex-[0_0_100%] hawa-items-center hawa-justify-center"
|
1255
|
-
),
|
1256
|
-
key: index
|
1257
|
-
},
|
1258
|
-
child
|
1259
|
-
))
|
1260
|
-
)));
|
1261
|
-
};
|
1262
|
-
var DialogSteps = ({
|
1263
|
-
currentStep,
|
1264
|
-
visibleStepRef,
|
1265
|
-
children
|
1266
|
-
}) => {
|
1267
|
-
const [dialogHeight, setDialogHeight] = React14.useState(null);
|
1268
|
-
React14.useEffect(() => {
|
1269
|
-
if (visibleStepRef.current) {
|
1270
|
-
setDialogHeight(visibleStepRef.current.offsetHeight);
|
1271
|
-
console.log("height is ", visibleStepRef.current.offsetHeight);
|
1272
|
-
}
|
1273
|
-
}, [currentStep, visibleStepRef]);
|
1274
|
-
return /* @__PURE__ */ React14.createElement(
|
1275
|
-
"div",
|
1276
|
-
{
|
1277
|
-
className: "hawa-relative hawa-overflow-clip",
|
1278
|
-
style: {
|
1279
|
-
height: dialogHeight || "fit-content",
|
1280
|
-
transition: "height 0.2s"
|
1281
|
-
}
|
1282
|
-
},
|
1283
|
-
React14.Children.map(children, (child, index) => /* @__PURE__ */ React14.createElement(
|
1284
|
-
"div",
|
1285
|
-
{
|
1286
|
-
ref: currentStep === `step-${index + 1}` ? visibleStepRef : null,
|
1287
|
-
className: cn(
|
1288
|
-
currentStep === `step-${index + 1}` ? "hawa-visible hawa-block" : "hawa-invisible hawa-hidden"
|
1289
|
-
)
|
1290
|
-
},
|
1291
|
-
child
|
1292
|
-
))
|
1293
|
-
);
|
1294
|
-
};
|
1295
|
-
var DialogStep = ({
|
1296
|
-
id,
|
1297
|
-
children,
|
1298
|
-
className,
|
1299
|
-
stepRef
|
1300
|
-
}) => {
|
1301
|
-
return /* @__PURE__ */ React14.createElement(
|
1302
|
-
"div",
|
1303
|
-
{
|
1304
|
-
id,
|
1305
|
-
ref: stepRef,
|
1306
|
-
className: cn("hawa-w-full hawa-px-1", className)
|
1307
|
-
},
|
1308
|
-
children
|
1309
|
-
);
|
1310
|
-
};
|
1311
|
-
var DialogBody = ({ children, className }) => {
|
1312
|
-
return /* @__PURE__ */ React14.createElement("div", { className: cn("hawa-py-6", className) }, children);
|
1313
|
-
};
|
1314
|
-
DialogBody.displayName = "DialogBody";
|
1315
|
-
DialogStep.displayName = "DialogStep";
|
1316
|
-
DialogSteps.displayName = "DialogSteps";
|
1317
|
-
DialogCarousel.displayName = "DialogCarousel";
|
1318
|
-
DialogCarouselContent.displayName = "DialogCarouselContent";
|
1319
|
-
DialogHeader.displayName = "DialogHeader";
|
1320
|
-
DialogFooter.displayName = "DialogFooter";
|
1321
|
-
DialogTitle.displayName = DialogPrimitive.Title.displayName;
|
1322
|
-
DialogPortal.displayName = DialogPrimitive.Portal.displayName;
|
1323
|
-
DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
|
1324
|
-
DialogContent.displayName = DialogPrimitive.Content.displayName;
|
1325
|
-
DialogDescription.displayName = DialogPrimitive.Description.displayName;
|
1326
|
-
|
1327
|
-
// components/elements/alert/Alert.tsx
|
1328
|
-
var import_react6 = __toESM(require("react"));
|
1329
|
-
|
1330
|
-
// components/elements/button/Button.tsx
|
1331
|
-
var React15 = __toESM(require("react"));
|
1332
|
-
var import_class_variance_authority3 = require("class-variance-authority");
|
1333
|
-
var buttonVariants = (0, import_class_variance_authority3.cva)(
|
1334
|
-
"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",
|
1335
|
-
{
|
1336
|
-
variants: {
|
1337
|
-
variant: {
|
1338
|
-
default: "hawa-bg-primary hawa-text-primary-foreground hover:hawa-bg-primary/90",
|
1339
|
-
light: "hawa-bg-primary/20 hawa-text-primary hover:hawa-bg-primary/40",
|
1340
|
-
destructive: "hawa-bg-destructive hawa-text-destructive-foreground hover:hawa-bg-destructive/90",
|
1341
|
-
outline: "hawa-border hawa-border-input hawa-bg-transparent hover:hawa-bg-accent hover:hawa-text-accent-foreground",
|
1342
|
-
secondary: "hawa-bg-secondary hawa-text-secondary-foreground hover:hawa-bg-secondary/80",
|
1343
|
-
ghost: "hover:hawa-bg-accent hover:hawa-text-accent-foreground",
|
1344
|
-
link: "hawa-text-primary hawa-underline-offset-4 hover:hawa-underline",
|
1345
|
-
combobox: "hawa-bg-background hawa-border",
|
1346
|
-
neoBrutalism: "neo-brutalism"
|
1347
|
-
// "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",
|
1348
|
-
},
|
1349
|
-
size: {
|
1350
|
-
default: "hawa-h-10 hawa-px-4 hawa-py-2",
|
1351
|
-
heightless: "hawa-px-4 hawa-py-4",
|
1352
|
-
xs: "hawa-h-fit hawa-min-h-[25px] hawa-py-1 hawa-text-[10px] hawa-px-2 ",
|
1353
|
-
sm: "hawa-h-9 hawa-text-[11px] hawa-rounded-md hawa-px-3",
|
1354
|
-
lg: "hawa-h-11 hawa-rounded-md hawa-px-8",
|
1355
|
-
xl: "hawa-h-14 hawa-rounded-md hawa-px-10",
|
1356
|
-
icon: "hawa-h-10 hawa-w-10",
|
1357
|
-
smallIcon: "hawa-h-7 hawa-w-7"
|
1358
|
-
}
|
1359
|
-
},
|
1360
|
-
defaultVariants: {
|
1361
|
-
variant: "default",
|
1362
|
-
size: "default"
|
1363
|
-
}
|
1364
|
-
}
|
1365
|
-
);
|
1366
|
-
var Button = React15.forwardRef(
|
1367
|
-
({
|
1368
|
-
className,
|
1369
|
-
variant,
|
1370
|
-
size,
|
1371
|
-
asChild = false,
|
1372
|
-
centered = true,
|
1373
|
-
isLoading,
|
1374
|
-
children,
|
1375
|
-
...props
|
1376
|
-
}, ref) => {
|
1377
|
-
const Comp = "button";
|
1378
|
-
const loadingColor = variant === "outline" || variant === "ghost" || variant === "neoBrutalism" ? "hawa-bg-primary" : "hawa-bg-primary-foreground";
|
1379
|
-
return /* @__PURE__ */ React15.createElement(
|
1380
|
-
Comp,
|
1381
|
-
{
|
1382
|
-
className: cn(
|
1383
|
-
buttonVariants({ variant, size, className }),
|
1384
|
-
centered && "hawa-justify-center"
|
1385
|
-
),
|
1386
|
-
ref,
|
1387
|
-
...props
|
1388
|
-
},
|
1389
|
-
isLoading ? /* @__PURE__ */ React15.createElement(
|
1390
|
-
Loading,
|
1391
|
-
{
|
1392
|
-
design: size === "icon" || size === "smallIcon" ? "spinner" : "dots-pulse",
|
1393
|
-
themeMode: variant === "outline" ? "light" : "dark",
|
1394
|
-
color: loadingColor,
|
1395
|
-
size: size === "sm" || size === "xs" ? "xs" : "button"
|
1396
|
-
}
|
1397
|
-
) : children
|
1398
|
-
);
|
1399
|
-
}
|
1400
|
-
);
|
1401
|
-
Button.displayName = "Button";
|
1402
|
-
|
1403
|
-
// components/elements/avatar/Avatar.tsx
|
1404
|
-
var import_react8 = __toESM(require("react"));
|
1405
|
-
|
1406
|
-
// components/elements/fileUploader/FileUploader.tsx
|
1407
|
-
var import_react7 = __toESM(require("react"));
|
1408
|
-
|
1409
|
-
// components/elements/dataTable/DataTable.tsx
|
1410
|
-
var React22 = __toESM(require("react"));
|
1411
|
-
var import_react_table = require("@tanstack/react-table");
|
1412
|
-
|
1413
|
-
// components/elements/input/Input.tsx
|
1414
|
-
var import_react9 = __toESM(require("react"));
|
1415
|
-
|
1416
|
-
// components/elements/label/Label.tsx
|
1417
|
-
var React19 = __toESM(require("react"));
|
1418
|
-
var Label2 = React19.forwardRef(({ className, hint, hintSide, required, children, ...props }, ref) => /* @__PURE__ */ React19.createElement("div", { className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-1 hawa-transition-all" }, /* @__PURE__ */ React19.createElement(
|
1419
|
-
"label",
|
1420
|
-
{
|
1421
|
-
ref,
|
1422
|
-
className: cn(
|
1423
|
-
"hawa-text-sm hawa-font-medium hawa-leading-none peer-disabled:hawa-cursor-not-allowed peer-disabled:hawa-opacity-70",
|
1424
|
-
className
|
1425
|
-
),
|
1426
|
-
...props
|
1427
|
-
},
|
1428
|
-
children,
|
1429
|
-
required && /* @__PURE__ */ React19.createElement("span", { className: "hawa-mx-0.5 hawa-text-red-500" }, "*")
|
1430
|
-
), hint && /* @__PURE__ */ React19.createElement(
|
1431
|
-
Tooltip,
|
1432
|
-
{
|
1433
|
-
content: hint,
|
1434
|
-
side: hintSide,
|
1435
|
-
triggerProps: {
|
1436
|
-
tabIndex: -1,
|
1437
|
-
onClick: (event) => event.preventDefault()
|
1438
|
-
}
|
1439
|
-
},
|
1440
|
-
/* @__PURE__ */ React19.createElement("div", null, /* @__PURE__ */ React19.createElement(
|
1441
|
-
"svg",
|
1442
|
-
{
|
1443
|
-
xmlns: "http://www.w3.org/2000/svg",
|
1444
|
-
className: "hawa-h-[14px] hawa-w-[14px] hawa-cursor-help",
|
1445
|
-
viewBox: "0 0 24 24",
|
1446
|
-
fill: "none",
|
1447
|
-
stroke: "currentColor",
|
1448
|
-
strokeWidth: "2",
|
1449
|
-
strokeLinecap: "round",
|
1450
|
-
strokeLinejoin: "round"
|
1451
|
-
},
|
1452
|
-
/* @__PURE__ */ React19.createElement("circle", { cx: "12", cy: "12", r: "10" }),
|
1453
|
-
/* @__PURE__ */ React19.createElement("path", { d: "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3" }),
|
1454
|
-
/* @__PURE__ */ React19.createElement("path", { d: "M12 17h.01" })
|
1455
|
-
))
|
1456
|
-
)));
|
1457
|
-
Label2.displayName = "Label";
|
1458
|
-
|
1459
|
-
// components/elements/input/Input.tsx
|
1460
|
-
var Input = (0, import_react9.forwardRef)(
|
1461
|
-
({
|
1462
|
-
margin = "none",
|
1463
|
-
width = "full",
|
1464
|
-
preview = false,
|
1465
|
-
forceHideHelperText = false,
|
1466
|
-
labelProps,
|
1467
|
-
placeholder,
|
1468
|
-
showCount,
|
1469
|
-
inputProps,
|
1470
|
-
countPosition = "bottom",
|
1471
|
-
...props
|
1472
|
-
}, ref) => {
|
1473
|
-
var _a;
|
1474
|
-
let marginStyles = {
|
1475
|
-
none: "hawa-mb-0",
|
1476
|
-
normal: "hawa-mb-3",
|
1477
|
-
large: "hawa-mb-5"
|
1478
|
-
};
|
1479
|
-
let widthStyles = {
|
1480
|
-
small: "hawa-w-full hawa-max-w-2xs",
|
1481
|
-
normal: "hawa-w-1/2",
|
1482
|
-
full: "hawa-w-full",
|
1483
|
-
auto: ""
|
1484
|
-
};
|
1485
|
-
let defaultStyle = "hawa-flex hawa-max-h-fit hawa-h-fit hawa-relative hawa-flex-col hawa-justify-center hawa-gap-0";
|
1486
|
-
let defaultInputStyle = "hawa-block hawa-w-full hawa-rounded hawa-border hawa-transition-all hawa-bg-background hawa-p-3 hawa-text-sm ";
|
1487
|
-
return /* @__PURE__ */ import_react9.default.createElement(
|
1488
|
-
"div",
|
1489
|
-
{
|
1490
|
-
className: cn(
|
1491
|
-
defaultStyle,
|
1492
|
-
marginStyles[margin],
|
1493
|
-
widthStyles[width],
|
1494
|
-
props.containerClassName,
|
1495
|
-
"hawa-w-full hawa-gap-2"
|
1496
|
-
)
|
1497
|
-
},
|
1498
|
-
props.label && /* @__PURE__ */ import_react9.default.createElement(Label2, { ...labelProps }, props.label),
|
1499
|
-
props.isLoading ? /* @__PURE__ */ import_react9.default.createElement("div", { className: "hawa-pb-2" }, /* @__PURE__ */ import_react9.default.createElement(Skeleton, { className: "hawa-h-[40px] hawa-w-full" })) : /* @__PURE__ */ import_react9.default.createElement(import_react9.default.Fragment, null, !props.hideSeparator && /* @__PURE__ */ import_react9.default.createElement(
|
1500
|
-
"div",
|
1501
|
-
{
|
1502
|
-
className: cn(
|
1503
|
-
"hawa-absolute hawa-top-[22px] hawa-h-[0.8px] hawa-w-full hawa-bg-gray-200 hawa-transition-all dark:hawa-bg-gray-800",
|
1504
|
-
preview ? "hawa-opacity-100" : "hawa-opacity-0"
|
1505
|
-
)
|
1506
|
-
}
|
1507
|
-
), /* @__PURE__ */ import_react9.default.createElement(import_react9.default.Fragment, null, /* @__PURE__ */ import_react9.default.createElement("div", { className: "hawa-relative" }, props.startIcon && /* @__PURE__ */ import_react9.default.createElement("div", { className: "hawa-absolute hawa-start-3 hawa-top-1/2 hawa--translate-y-1/2" }, props.startIcon), props.endIcon && /* @__PURE__ */ import_react9.default.createElement(
|
1508
|
-
"div",
|
1509
|
-
{
|
1510
|
-
className: cn(
|
1511
|
-
"hawa-absolute hawa-end-3 hawa-top-1/2 hawa--translate-y-1/2",
|
1512
|
-
(_a = props.endIconProps) == null ? void 0 : _a.className
|
1513
|
-
)
|
1514
|
-
},
|
1515
|
-
props.endIcon
|
1516
|
-
), /* @__PURE__ */ import_react9.default.createElement(
|
1517
|
-
"input",
|
1518
|
-
{
|
1519
|
-
required: true,
|
1520
|
-
dir: props.dir,
|
1521
|
-
type: props.type,
|
1522
|
-
value: props.value,
|
1523
|
-
onChange: props.onChange,
|
1524
|
-
autoComplete: props.autoComplete,
|
1525
|
-
defaultValue: props.defaultValue,
|
1526
|
-
placeholder,
|
1527
|
-
disabled: props.disabled || preview,
|
1528
|
-
style: { height: 40 },
|
1529
|
-
...inputProps,
|
1530
|
-
className: cn(
|
1531
|
-
defaultInputStyle,
|
1532
|
-
" 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",
|
1533
|
-
{
|
1534
|
-
"hawa-pe-9": props.endIcon,
|
1535
|
-
"hawa-ps-9": props.startIcon,
|
1536
|
-
"hawa-pe-[60px]": countPosition === "center"
|
1537
|
-
},
|
1538
|
-
preview && "hawa-border-transparent hawa-bg-transparent hawa-px-0",
|
1539
|
-
inputProps == null ? void 0 : inputProps.className
|
1540
|
-
)
|
1541
|
-
}
|
1542
|
-
)), !forceHideHelperText && /* @__PURE__ */ import_react9.default.createElement(
|
1543
|
-
"p",
|
1544
|
-
{
|
1545
|
-
className: cn(
|
1546
|
-
"hawa-my-0 hawa-text-start hawa-text-xs hawa-text-helper-color hawa-transition-all",
|
1547
|
-
props.helperText ? "hawa-h-4 hawa-opacity-100" : "hawa-h-0 hawa-opacity-0"
|
1548
|
-
)
|
1549
|
-
},
|
1550
|
-
props.helperText
|
1551
|
-
), !props.disabled && forceHideHelperText && /* @__PURE__ */ import_react9.default.createElement(
|
1552
|
-
"div",
|
1553
|
-
{
|
1554
|
-
className: cn(
|
1555
|
-
"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",
|
1556
|
-
props.helperText ? "hawa-border hawa-p-1" : "hawa-border-none hawa-p-0"
|
1557
|
-
)
|
1558
|
-
},
|
1559
|
-
props.helperText
|
1560
|
-
), showCount && /* @__PURE__ */ import_react9.default.createElement(
|
1561
|
-
"div",
|
1562
|
-
{
|
1563
|
-
className: cn(
|
1564
|
-
"hawa-absolute hawa-translate-y-1/2 hawa-text-start hawa-text-xs hawa-transition-all",
|
1565
|
-
{
|
1566
|
-
"hawa-end-0 hawa-top-[62px]": countPosition === "bottom",
|
1567
|
-
"hawa-bottom-[62px] hawa-end-0": countPosition === "top",
|
1568
|
-
"hawa-end-2": countPosition === "center"
|
1569
|
-
}
|
1570
|
-
)
|
1571
|
-
},
|
1572
|
-
props.value ? String(props.value).length : 0,
|
1573
|
-
"/",
|
1574
|
-
props.maxLength
|
1575
|
-
)))
|
1576
|
-
);
|
1577
|
-
}
|
1578
|
-
);
|
1579
|
-
|
1580
|
-
// components/elements/table/Table.tsx
|
1581
|
-
var React21 = __toESM(require("react"));
|
1582
|
-
var Table = React21.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React21.createElement("div", { className: "hawa-relative hawa-w-full hawa-overflow-auto hawa-rounded hawa-border" }, /* @__PURE__ */ React21.createElement(
|
1583
|
-
"table",
|
1584
|
-
{
|
1585
|
-
ref,
|
1586
|
-
className: cn("hawa-w-full hawa-caption-bottom hawa-text-sm", className),
|
1587
|
-
...props
|
1588
|
-
}
|
1589
|
-
)));
|
1590
|
-
Table.displayName = "Table";
|
1591
|
-
var TableHeader = React21.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React21.createElement(
|
1592
|
-
"thead",
|
1593
|
-
{
|
1594
|
-
ref,
|
1595
|
-
className: cn("[&_tr]:hawa-border-b", "hawa-bg-muted/50", className),
|
1596
|
-
...props
|
1597
|
-
}
|
1598
|
-
));
|
1599
|
-
TableHeader.displayName = "TableHeader";
|
1600
|
-
var TableHead = React21.forwardRef(
|
1601
|
-
({ className, condensed, clickable, dir, ...props }, ref) => /* @__PURE__ */ React21.createElement(
|
1602
|
-
"th",
|
1603
|
-
{
|
1604
|
-
ref,
|
1605
|
-
className: cn(
|
1606
|
-
"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",
|
1607
|
-
dir === "rtl" ? "[&:not(:last-child)]:hawa-border-l" : "[&:not(:last-child)]:hawa-border-r",
|
1608
|
-
condensed ? "hawa-h-8" : "hawa-h-12",
|
1609
|
-
clickable ? "hawa-px-1" : "hawa-px-4",
|
1610
|
-
//First and last columns
|
1611
|
-
clickable ? " [&:not(:last-child)&:not(:first-child)]:hawa-p-1" : "hawa-px-4",
|
1612
|
-
//Columns in between
|
1613
|
-
className
|
1614
|
-
),
|
1615
|
-
...props
|
1616
|
-
}
|
1617
|
-
)
|
1618
|
-
);
|
1619
|
-
TableHead.displayName = "TableHead";
|
1620
|
-
var TableBody = React21.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React21.createElement("tbody", { ref, className: cn("hawa-border-none", className), ...props }));
|
1621
|
-
TableBody.displayName = "TableBody";
|
1622
|
-
var TableFooter = React21.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React21.createElement(
|
1623
|
-
"tfoot",
|
1624
|
-
{
|
1625
|
-
ref,
|
1626
|
-
className: cn(
|
1627
|
-
"hawa-bg-primary hawa-font-medium hawa-text-primary-foreground",
|
1628
|
-
className
|
1629
|
-
),
|
1630
|
-
...props
|
1631
|
-
}
|
1632
|
-
));
|
1633
|
-
TableFooter.displayName = "TableFooter";
|
1634
|
-
var TableRow = React21.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React21.createElement(
|
1635
|
-
"tr",
|
1636
|
-
{
|
1637
|
-
ref,
|
1638
|
-
className: cn(
|
1639
|
-
"hawa-bg-background hawa-transition-colors data-[state=selected]:hawa-bg-muted",
|
1640
|
-
"[&:not(:last-child)&:not(:first-child)]:hawa-border-y",
|
1641
|
-
"[&:not(:last-child)]:hawa-border-b",
|
1642
|
-
className
|
1643
|
-
),
|
1644
|
-
...props
|
1645
|
-
}
|
1646
|
-
));
|
1647
|
-
TableRow.displayName = "TableRow";
|
1648
|
-
var TableCell = React21.forwardRef(
|
1649
|
-
({ className, enablePadding = true, padding = "default", ...props }, ref) => {
|
1650
|
-
let paddingStyles = {
|
1651
|
-
condensed: "hawa-p-0 hawa-px-4",
|
1652
|
-
default: "hawa-p-4",
|
1653
|
-
noPadding: "hawa-p-0"
|
1654
|
-
};
|
1655
|
-
return /* @__PURE__ */ React21.createElement(
|
1656
|
-
"td",
|
1657
|
-
{
|
1658
|
-
ref,
|
1659
|
-
className: cn(
|
1660
|
-
paddingStyles[padding],
|
1661
|
-
// "border-x",
|
1662
|
-
// enablePadding ? "hawa-p-4" : "hawa-p-0",
|
1663
|
-
// props.disablePadding ? "hawa-p-0" : "hawa-p-4",
|
1664
|
-
// props.condensed ? "hawa-p-0 hawa-px-4" : "hawa-p-4",
|
1665
|
-
"hawa-align-middle [&:has([role=checkbox])]:hawa-pr-0 ",
|
1666
|
-
"[&:not(:last-child)&:not(:first-child)]:hawa-border-x",
|
1667
|
-
// "[&:not(:last-child)]:hawa-border-r",
|
1668
|
-
props.dir === "rtl" ? "[&:not(:last-child)]:hawa-border-l" : "[&:not(:last-child)]:hawa-border-r",
|
1669
|
-
className
|
1670
|
-
),
|
1671
|
-
...props
|
1672
|
-
}
|
1673
|
-
);
|
1674
|
-
}
|
1675
|
-
);
|
1676
|
-
TableCell.displayName = "TableCell";
|
1677
|
-
var TableCaption = React21.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React21.createElement(
|
1678
|
-
"caption",
|
1679
|
-
{
|
1680
|
-
ref,
|
1681
|
-
className: cn(
|
1682
|
-
"hawa-mt-4 hawa-text-sm hawa-text-muted-foreground",
|
1683
|
-
className
|
1684
|
-
),
|
1685
|
-
...props
|
1686
|
-
}
|
1687
|
-
));
|
1688
|
-
TableCaption.displayName = "TableCaption";
|
1689
|
-
|
1690
|
-
// components/elements/backToTop/BackToTop.tsx
|
1691
|
-
var import_react10 = __toESM(require("react"));
|
1692
|
-
|
1693
|
-
// components/elements/radio/Radio.tsx
|
1694
|
-
var import_react11 = __toESM(require("react"));
|
1695
|
-
|
1696
|
-
// components/elements/combobox/Combobox.tsx
|
1697
|
-
var React27 = __toESM(require("react"));
|
1698
|
-
var PopoverPrimitive2 = __toESM(require("@radix-ui/react-popover"));
|
1699
|
-
|
1700
|
-
// components/elements/command/Command.tsx
|
1701
|
-
var React25 = __toESM(require("react"));
|
1702
|
-
var import_cmdk = require("cmdk");
|
1703
|
-
var Command = React25.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React25.createElement(
|
1704
|
-
import_cmdk.Command,
|
1705
|
-
{
|
1706
|
-
ref,
|
1707
|
-
className: cn(
|
1708
|
-
"hawa-flex hawa-h-full hawa-w-full hawa-flex-col hawa-overflow-hidden hawa-rounded-md hawa-bg-popover hawa-text-popover-foreground",
|
1709
|
-
className
|
1710
|
-
),
|
1711
|
-
...props
|
1712
|
-
}
|
1713
|
-
));
|
1714
|
-
Command.displayName = import_cmdk.Command.displayName;
|
1715
|
-
var CommandInput = React25.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React25.createElement(
|
1716
|
-
"div",
|
1717
|
-
{
|
1718
|
-
className: "hawa-flex hawa-items-center hawa-border-b hawa-px-3",
|
1719
|
-
"cmdk-input-wrapper": ""
|
1720
|
-
},
|
1721
|
-
/* @__PURE__ */ React25.createElement(
|
1722
|
-
"svg",
|
1723
|
-
{
|
1724
|
-
"aria-label": "Search Icon",
|
1725
|
-
xmlns: "http://www.w3.org/2000/svg",
|
1726
|
-
width: "24",
|
1727
|
-
height: "24",
|
1728
|
-
viewBox: "0 0 24 24",
|
1729
|
-
fill: "none",
|
1730
|
-
stroke: "currentColor",
|
1731
|
-
strokeWidth: "2",
|
1732
|
-
strokeLinecap: "round",
|
1733
|
-
strokeLinejoin: "round",
|
1734
|
-
className: "hawa-icon hawa-me-2 hawa-shrink-0 hawa-opacity-50"
|
1735
|
-
},
|
1736
|
-
/* @__PURE__ */ React25.createElement("circle", { cx: "11", cy: "11", r: "8" }),
|
1737
|
-
/* @__PURE__ */ React25.createElement("path", { d: "m21 21-4.3-4.3" })
|
1738
|
-
),
|
1739
|
-
/* @__PURE__ */ React25.createElement(
|
1740
|
-
import_cmdk.Command.Input,
|
1741
|
-
{
|
1742
|
-
ref,
|
1743
|
-
className: cn(
|
1744
|
-
"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",
|
1745
|
-
className
|
1746
|
-
),
|
1747
|
-
...props
|
1748
|
-
}
|
1749
|
-
)
|
1750
|
-
));
|
1751
|
-
CommandInput.displayName = import_cmdk.Command.Input.displayName;
|
1752
|
-
var CommandList = React25.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React25.createElement(
|
1753
|
-
import_cmdk.Command.List,
|
1754
|
-
{
|
1755
|
-
ref,
|
1756
|
-
className: cn(
|
1757
|
-
"hawa-max-h-[300px] hawa-overflow-y-auto hawa-overflow-x-hidden",
|
1758
|
-
className
|
1759
|
-
),
|
1760
|
-
...props
|
1761
|
-
}
|
1762
|
-
));
|
1763
|
-
CommandList.displayName = import_cmdk.Command.List.displayName;
|
1764
|
-
var CommandEmpty = React25.forwardRef((props, ref) => /* @__PURE__ */ React25.createElement(
|
1765
|
-
import_cmdk.Command.Empty,
|
1766
|
-
{
|
1767
|
-
ref,
|
1768
|
-
className: "hawa-py-6 hawa-text-center hawa-text-sm",
|
1769
|
-
...props
|
1770
|
-
}
|
1771
|
-
));
|
1772
|
-
CommandEmpty.displayName = import_cmdk.Command.Empty.displayName;
|
1773
|
-
var CommandGroup = React25.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React25.createElement(
|
1774
|
-
import_cmdk.Command.Group,
|
1775
|
-
{
|
1776
|
-
ref,
|
1777
|
-
className: cn(
|
1778
|
-
"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",
|
1779
|
-
className
|
1780
|
-
),
|
1781
|
-
...props
|
1782
|
-
}
|
1783
|
-
));
|
1784
|
-
CommandGroup.displayName = import_cmdk.Command.Group.displayName;
|
1785
|
-
var CommandSeparator = React25.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React25.createElement(
|
1786
|
-
import_cmdk.Command.Separator,
|
1787
|
-
{
|
1788
|
-
ref,
|
1789
|
-
className: cn("hawa--mx-1 hawa-h-px hawa-bg-border", className),
|
1790
|
-
...props
|
1791
|
-
}
|
1792
|
-
));
|
1793
|
-
CommandSeparator.displayName = import_cmdk.Command.Separator.displayName;
|
1794
|
-
var CommandItem = React25.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React25.createElement(
|
1795
|
-
import_cmdk.Command.Item,
|
1796
|
-
{
|
1797
|
-
ref,
|
1798
|
-
className: cn(
|
1799
|
-
"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",
|
1800
|
-
className
|
1801
|
-
),
|
1802
|
-
...props
|
1803
|
-
}
|
1804
|
-
));
|
1805
|
-
CommandItem.displayName = import_cmdk.Command.Item.displayName;
|
1806
|
-
var CommandShortcut = ({
|
1807
|
-
className,
|
1808
|
-
...props
|
1809
|
-
}) => {
|
1810
|
-
return /* @__PURE__ */ React25.createElement(
|
1811
|
-
"span",
|
1812
|
-
{
|
1813
|
-
className: cn(
|
1814
|
-
"hawa-ml-auto hawa-text-xs hawa-tracking-widest hawa-text-muted-foreground",
|
1815
|
-
className
|
1816
|
-
),
|
1817
|
-
...props
|
1818
|
-
}
|
1819
|
-
);
|
1820
|
-
};
|
1821
|
-
CommandShortcut.displayName = "CommandShortcut";
|
1822
|
-
|
1823
|
-
// components/elements/popover/Popover.tsx
|
1824
|
-
var React26 = __toESM(require("react"));
|
1825
|
-
var PopoverPrimitive = __toESM(require("@radix-ui/react-popover"));
|
1826
|
-
var PopoverContent = React26.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ React26.createElement(PopoverPrimitive.Portal, null, /* @__PURE__ */ React26.createElement(
|
1827
|
-
PopoverPrimitive.Content,
|
1828
|
-
{
|
1829
|
-
ref,
|
1830
|
-
align,
|
1831
|
-
sideOffset,
|
1832
|
-
className: cn(
|
1833
|
-
"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",
|
1834
|
-
className
|
1835
|
-
),
|
1836
|
-
...props
|
1837
|
-
}
|
1838
|
-
)));
|
1839
|
-
PopoverContent.displayName = PopoverPrimitive.Content.displayName;
|
1840
|
-
var PopoverTrigger = PopoverPrimitive.Trigger;
|
1841
|
-
|
1842
|
-
// components/elements/combobox/Combobox.tsx
|
1843
|
-
var Combobox = React27.forwardRef(
|
1844
|
-
({
|
1845
|
-
labelKey = "label",
|
1846
|
-
valueKey = "value",
|
1847
|
-
defaultValue = "",
|
1848
|
-
popoverClassName,
|
1849
|
-
direction,
|
1850
|
-
labelProps,
|
1851
|
-
data,
|
1852
|
-
...props
|
1853
|
-
}, ref) => {
|
1854
|
-
var _a, _b, _c;
|
1855
|
-
const [open, setOpen] = React27.useState(false);
|
1856
|
-
const [value, setValue] = React27.useState(defaultValue);
|
1857
|
-
function getProperty(obj, key) {
|
1858
|
-
return obj[key];
|
1859
|
-
}
|
1860
|
-
const handleOpenChange = (open2) => {
|
1861
|
-
if (!(props.isLoading || props.preview)) {
|
1862
|
-
setOpen(open2);
|
1863
|
-
}
|
1864
|
-
};
|
1865
|
-
return /* @__PURE__ */ React27.createElement(
|
1866
|
-
"div",
|
1867
|
-
{
|
1868
|
-
className: cn(
|
1869
|
-
"hawa-relative hawa-flex hawa-h-fit hawa-flex-col hawa-gap-2",
|
1870
|
-
props.width === "fit" ? "hawa-w-fit" : "hawa-w-full"
|
1871
|
-
)
|
1872
|
-
},
|
1873
|
-
props.label && /* @__PURE__ */ React27.createElement(Label2, { ...labelProps }, props.label),
|
1874
|
-
/* @__PURE__ */ React27.createElement(PopoverPrimitive2.Root, { open, onOpenChange: handleOpenChange }, /* @__PURE__ */ React27.createElement(PopoverTrigger, { asChild: true }, props.isLoading ? /* @__PURE__ */ React27.createElement("div", { className: "hawa-pb-2" }, /* @__PURE__ */ React27.createElement(Skeleton, { className: "hawa-h-[40px] hawa-w-full" })) : /* @__PURE__ */ React27.createElement("div", { className: "hawa-flex hawa-flex-col hawa-items-start hawa-gap-2 " }, /* @__PURE__ */ React27.createElement(
|
1875
|
-
"div",
|
1876
|
-
{
|
1877
|
-
className: cn(
|
1878
|
-
"hawa-absolute hawa-top-[22px] hawa-h-[0.8px] hawa-w-full hawa-bg-gray-200 hawa-transition-all dark:hawa-bg-gray-800",
|
1879
|
-
props.preview ? "hawa-opacity-100" : "hawa-opacity-0"
|
1880
|
-
)
|
1881
|
-
}
|
1882
|
-
), /* @__PURE__ */ React27.createElement(
|
1883
|
-
"button",
|
1884
|
-
{
|
1885
|
-
role: "combobox",
|
1886
|
-
type: "button",
|
1887
|
-
"aria-expanded": open,
|
1888
|
-
className: cn(
|
1889
|
-
"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-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",
|
1890
|
-
props.preview ? "hawa-cursor-default hawa-rounded-none hawa-border-transparent hawa-px-0" : "hawa-bg-background hawa-px-3 "
|
1891
|
-
)
|
1892
|
-
},
|
1893
|
-
value ? getProperty(
|
1894
|
-
data.find((item) => item[valueKey] === value) || {},
|
1895
|
-
labelKey
|
1896
|
-
) : ((_a = props.texts) == null ? void 0 : _a.placeholder) || ". . .",
|
1897
|
-
/* @__PURE__ */ React27.createElement(
|
1898
|
-
"svg",
|
1899
|
-
{
|
1900
|
-
xmlns: "http://www.w3.org/2000/svg",
|
1901
|
-
className: cn(
|
1902
|
-
"hawa-icon hawa-transition-all",
|
1903
|
-
!props.preview ? "hawa-visible hawa-opacity-100" : "hawa-invisible hawa-opacity-0"
|
1904
|
-
),
|
1905
|
-
"aria-label": "Chevron down icon",
|
1906
|
-
viewBox: "0 0 24 24",
|
1907
|
-
fill: "none",
|
1908
|
-
stroke: "currentColor",
|
1909
|
-
strokeWidth: "2",
|
1910
|
-
strokeLinecap: "round",
|
1911
|
-
strokeLinejoin: "round"
|
1912
|
-
},
|
1913
|
-
/* @__PURE__ */ React27.createElement("path", { d: "m6 9 6 6 6-6" })
|
1914
|
-
)
|
1915
|
-
), /* @__PURE__ */ React27.createElement(
|
1916
|
-
"p",
|
1917
|
-
{
|
1918
|
-
className: cn(
|
1919
|
-
"hawa-my-0 hawa-text-start hawa-text-xs hawa-text-helper-color hawa-transition-all",
|
1920
|
-
props.helperText ? "hawa-h-4 hawa-opacity-100" : "hawa-h-0 hawa-opacity-0"
|
1921
|
-
)
|
1922
|
-
},
|
1923
|
-
props.helperText
|
1924
|
-
))), /* @__PURE__ */ React27.createElement(
|
1925
|
-
PopoverContent,
|
1926
|
-
{
|
1927
|
-
sideOffset: 0,
|
1928
|
-
className: cn("popover-w-parent", props.helperText && "-hawa-mt-4"),
|
1929
|
-
dir: direction
|
1930
|
-
},
|
1931
|
-
/* @__PURE__ */ React27.createElement(Command, null, !props.hideInput && /* @__PURE__ */ React27.createElement(
|
1932
|
-
CommandInput,
|
1933
|
-
{
|
1934
|
-
dir: direction,
|
1935
|
-
placeholder: ((_b = props.texts) == null ? void 0 : _b.searchPlaceholder) || "Search"
|
1936
|
-
}
|
1937
|
-
), /* @__PURE__ */ React27.createElement(CommandEmpty, null, ((_c = props.texts) == null ? void 0 : _c.noItems) || "No items found."), /* @__PURE__ */ React27.createElement(CommandGroup, { className: "hawa-max-h-[200px] hawa-overflow-y-auto" }, data.map((item, i) => /* @__PURE__ */ React27.createElement(
|
1938
|
-
CommandItem,
|
1939
|
-
{
|
1940
|
-
key: i,
|
1941
|
-
onSelect: () => {
|
1942
|
-
const newValue = getProperty(item, valueKey);
|
1943
|
-
setValue(newValue === value ? "" : newValue);
|
1944
|
-
if (props.onChange) {
|
1945
|
-
props.onChange(
|
1946
|
-
newValue === value ? "" : newValue
|
1947
|
-
);
|
1948
|
-
}
|
1949
|
-
setOpen(false);
|
1950
|
-
}
|
1951
|
-
},
|
1952
|
-
/* @__PURE__ */ React27.createElement(
|
1953
|
-
"svg",
|
1954
|
-
{
|
1955
|
-
"aria-label": "Check Icon",
|
1956
|
-
xmlns: "http://www.w3.org/2000/svg",
|
1957
|
-
width: "24",
|
1958
|
-
height: "24",
|
1959
|
-
viewBox: "0 0 24 24",
|
1960
|
-
fill: "none",
|
1961
|
-
stroke: "currentColor",
|
1962
|
-
strokeWidth: "2",
|
1963
|
-
strokeLinecap: "round",
|
1964
|
-
strokeLinejoin: "round",
|
1965
|
-
className: cn(
|
1966
|
-
"hawa-icon",
|
1967
|
-
value === getProperty(item, valueKey) ? "hawa-opacity-100" : "hawa-opacity-0"
|
1968
|
-
),
|
1969
|
-
style: { marginInlineEnd: "0.5rem" }
|
1970
|
-
},
|
1971
|
-
/* @__PURE__ */ React27.createElement("polyline", { points: "20 6 9 17 4 12" })
|
1972
|
-
),
|
1973
|
-
getProperty(item, labelKey)
|
1974
|
-
))))
|
1975
|
-
))
|
1976
|
-
);
|
1977
|
-
}
|
1978
|
-
);
|
1979
|
-
|
1980
|
-
// components/elements/textarea/Textarea.tsx
|
1981
|
-
var React28 = __toESM(require("react"));
|
1982
|
-
var Textarea = React28.forwardRef(
|
1983
|
-
({
|
1984
|
-
className,
|
1985
|
-
classNames,
|
1986
|
-
labelProps,
|
1987
|
-
showCount,
|
1988
|
-
forceHideHelperText,
|
1989
|
-
textareaProps,
|
1990
|
-
countPosition = "bottom",
|
1991
|
-
...props
|
1992
|
-
}, ref) => {
|
1993
|
-
return /* @__PURE__ */ React28.createElement(
|
1994
|
-
"div",
|
1995
|
-
{
|
1996
|
-
className: cn(
|
1997
|
-
"textarea-main hawa-relative hawa-flex hawa-h-full hawa-w-full hawa-flex-col",
|
1998
|
-
!forceHideHelperText && "hawa-gap-2",
|
1999
|
-
className
|
2000
|
-
)
|
2001
|
-
},
|
2002
|
-
props.label && /* @__PURE__ */ React28.createElement(Label2, { ...labelProps }, props.label),
|
2003
|
-
/* @__PURE__ */ React28.createElement(
|
2004
|
-
"textarea",
|
2005
|
-
{
|
2006
|
-
className: cn(
|
2007
|
-
"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",
|
2008
|
-
classNames == null ? void 0 : classNames.textarea
|
2009
|
-
),
|
2010
|
-
ref,
|
2011
|
-
...textareaProps
|
2012
|
-
}
|
2013
|
-
),
|
2014
|
-
/* @__PURE__ */ React28.createElement("div", { className: "hawa-flex hawa-flex-row hawa-justify-between" }, !forceHideHelperText && /* @__PURE__ */ React28.createElement(
|
2015
|
-
"p",
|
2016
|
-
{
|
2017
|
-
className: cn(
|
2018
|
-
"hawa-my-0 hawa-text-start hawa-text-xs hawa-text-helper-color hawa-transition-all",
|
2019
|
-
props.helperText ? "hawa-h-4 hawa-opacity-100" : "hawa-h-0 hawa-opacity-0"
|
2020
|
-
)
|
2021
|
-
},
|
2022
|
-
props.helperText
|
2023
|
-
), showCount && /* @__PURE__ */ React28.createElement(
|
2024
|
-
"div",
|
2025
|
-
{
|
2026
|
-
className: cn(
|
2027
|
-
"hawa-text-start hawa-text-xs hawa-transition-all",
|
2028
|
-
{
|
2029
|
-
"hawa-absolute hawa-bottom-[80px] hawa-end-0 hawa-translate-y-1/2": countPosition === "top"
|
2030
|
-
}
|
2031
|
-
)
|
2032
|
-
},
|
2033
|
-
(textareaProps == null ? void 0 : textareaProps.value) ? String(textareaProps == null ? void 0 : textareaProps.value).length : 0,
|
2034
|
-
"/",
|
2035
|
-
textareaProps == null ? void 0 : textareaProps.maxLength
|
2036
|
-
))
|
2037
|
-
);
|
2038
|
-
}
|
2039
|
-
);
|
2040
|
-
Textarea.displayName = "Textarea";
|
2041
|
-
|
2042
|
-
// components/elements/fileDropzone/FileDropzone.tsx
|
2043
|
-
var import_react12 = __toESM(require("react"));
|
2044
|
-
var import_react_dropzone = require("react-dropzone");
|
2045
|
-
var import_clsx2 = __toESM(require("clsx"));
|
2046
|
-
|
2047
|
-
// components/elements/sortButton/SortButton.tsx
|
2048
|
-
var import_react13 = __toESM(require("react"));
|
2049
|
-
|
2050
|
-
// components/elements/tabs/Tabs.tsx
|
2051
|
-
var React31 = __toESM(require("react"));
|
2052
|
-
var TabsPrimitive = __toESM(require("@radix-ui/react-tabs"));
|
2053
|
-
var TabsContext = React31.createContext({ orientation: "vertical" });
|
2054
|
-
var Tabs = React31.forwardRef(({ className, orientation, ...props }, ref) => /* @__PURE__ */ React31.createElement(
|
2055
|
-
TabsPrimitive.Root,
|
2056
|
-
{
|
2057
|
-
ref,
|
2058
|
-
className: cn(
|
2059
|
-
"hawa-flex hawa-gap-2",
|
2060
|
-
orientation === "vertical" ? "hawa-flex-row" : "hawa-flex-col",
|
2061
|
-
className
|
2062
|
-
),
|
2063
|
-
...props
|
2064
|
-
},
|
2065
|
-
/* @__PURE__ */ React31.createElement(TabsContext.Provider, { value: { orientation } }, props.children)
|
2066
|
-
));
|
2067
|
-
Tabs.displayName = TabsPrimitive.Root.displayName;
|
2068
|
-
var TabsList = React31.forwardRef(({ className, ...props }, ref) => {
|
2069
|
-
const { orientation } = React31.useContext(TabsContext);
|
2070
|
-
return /* @__PURE__ */ React31.createElement(
|
2071
|
-
TabsPrimitive.List,
|
2072
|
-
{
|
2073
|
-
ref,
|
2074
|
-
className: cn(
|
2075
|
-
"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",
|
2076
|
-
orientation === "vertical" ? "hawa-flex-col" : "hawa-flex-row",
|
2077
|
-
className
|
2078
|
-
),
|
2079
|
-
...props
|
2080
|
-
}
|
2081
|
-
);
|
2082
|
-
});
|
2083
|
-
TabsList.displayName = TabsPrimitive.List.displayName;
|
2084
|
-
var TabsTrigger = React31.forwardRef(({ className, chipProps, ...props }, ref) => {
|
2085
|
-
return /* @__PURE__ */ React31.createElement(
|
2086
|
-
TabsPrimitive.Trigger,
|
2087
|
-
{
|
2088
|
-
ref,
|
2089
|
-
className: cn(
|
2090
|
-
"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",
|
2091
|
-
className
|
2092
|
-
),
|
2093
|
-
...props
|
2094
|
-
},
|
2095
|
-
props.children,
|
2096
|
-
chipProps && /* @__PURE__ */ React31.createElement(Chip, { ...chipProps })
|
2097
|
-
);
|
2098
|
-
});
|
2099
|
-
TabsTrigger.displayName = TabsPrimitive.Trigger.displayName;
|
2100
|
-
var TabsContent = React31.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React31.createElement(
|
2101
|
-
TabsPrimitive.Content,
|
2102
|
-
{
|
2103
|
-
ref,
|
2104
|
-
className: cn(
|
2105
|
-
"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",
|
2106
|
-
className
|
2107
|
-
),
|
2108
|
-
...props
|
2109
|
-
}
|
2110
|
-
));
|
2111
|
-
TabsContent.displayName = TabsPrimitive.Content.displayName;
|
2112
|
-
|
2113
|
-
// components/elements/select/Select.tsx
|
2114
|
-
var import_react14 = __toESM(require("react"));
|
2115
|
-
var import_react_select = __toESM(require("react-select"));
|
2116
|
-
var import_creatable = __toESM(require("react-select/creatable"));
|
2117
|
-
var import_clsx3 = __toESM(require("clsx"));
|
2118
|
-
|
2119
|
-
// components/elements/switch/Switch.tsx
|
2120
|
-
var React33 = __toESM(require("react"));
|
2121
|
-
var SwitchPrimitives = __toESM(require("@radix-ui/react-switch"));
|
2122
|
-
var Switch = React33.forwardRef(
|
2123
|
-
({ className, size = "default", roundedness = "inherit", label, ...props }, ref) => {
|
2124
|
-
const [parentDirection, setParentDirection] = React33.useState(
|
2125
|
-
null
|
2126
|
-
);
|
2127
|
-
const parentRef = React33.useRef(null);
|
2128
|
-
React33.useEffect(() => {
|
2129
|
-
var _a;
|
2130
|
-
const parentNode = (_a = parentRef.current) == null ? void 0 : _a.parentNode;
|
2131
|
-
if (parentNode) {
|
2132
|
-
const dir = window.getComputedStyle(parentNode).direction;
|
2133
|
-
setParentDirection(dir);
|
2134
|
-
}
|
2135
|
-
});
|
2136
|
-
const rootSize = {
|
2137
|
-
default: "hawa-h-[25px] hawa-w-[42px]",
|
2138
|
-
sm: "hawa-h-[20px] hawa-w-[37px]",
|
2139
|
-
lg: "hawa-h-[30px] hawa-w-[47px]"
|
2140
|
-
};
|
2141
|
-
const thumbSize = {
|
2142
|
-
default: "hawa-h-[21px] hawa-w-[21px]",
|
2143
|
-
sm: "hawa-h-[16px] hawa-w-[16px]",
|
2144
|
-
lg: "hawa-h-[26px] hawa-w-[26px]"
|
2145
|
-
};
|
2146
|
-
const rootRoundednessStyles = {
|
2147
|
-
none: "hawa-rounded-none",
|
2148
|
-
full: "hawa-rounded-full",
|
2149
|
-
inherit: "hawa-rounded"
|
2150
|
-
};
|
2151
|
-
const thumbRoundednessStyles = {
|
2152
|
-
none: "hawa-rounded-none",
|
2153
|
-
full: "hawa-rounded-full",
|
2154
|
-
inherit: "hawa-rounded-inner"
|
2155
|
-
};
|
2156
|
-
return /* @__PURE__ */ React33.createElement(
|
2157
|
-
"div",
|
2158
|
-
{
|
2159
|
-
className: "hawa-flex hawa-flex-row hawa-items-center",
|
2160
|
-
ref: parentRef
|
2161
|
-
},
|
2162
|
-
/* @__PURE__ */ React33.createElement(
|
2163
|
-
SwitchPrimitives.Root,
|
2164
|
-
{
|
2165
|
-
className: cn(
|
2166
|
-
"data-[state=unchecked]:hawa-bg-primary/20",
|
2167
|
-
"data-[state=checked]:hawa-bg-primary",
|
2168
|
-
"hawa-relative hawa-cursor-pointer hawa-rounded hawa-outline-none",
|
2169
|
-
rootRoundednessStyles[roundedness],
|
2170
|
-
className,
|
2171
|
-
rootSize[size]
|
2172
|
-
),
|
2173
|
-
...props,
|
2174
|
-
ref
|
2175
|
-
},
|
2176
|
-
/* @__PURE__ */ React33.createElement(
|
2177
|
-
SwitchPrimitives.Thumb,
|
2178
|
-
{
|
2179
|
-
className: cn(
|
2180
|
-
thumbSize[size],
|
2181
|
-
"hawa-block hawa-rounded hawa-transition-transform hawa-duration-100 hawa-will-change-transform",
|
2182
|
-
"data-[state=checked]:hawa-bg-primary-foreground",
|
2183
|
-
"hawa-bg-white dark:hawa-bg-background",
|
2184
|
-
thumbRoundednessStyles[roundedness],
|
2185
|
-
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]"
|
2186
|
-
)
|
2187
|
-
}
|
2188
|
-
)
|
2189
|
-
),
|
2190
|
-
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)
|
2191
|
-
);
|
2192
|
-
}
|
2193
|
-
);
|
2194
|
-
Switch.displayName = SwitchPrimitives.Root.displayName;
|
2195
|
-
|
2196
|
-
// components/elements/checkbox/Checkbox.tsx
|
2197
|
-
var React34 = __toESM(require("react"));
|
2198
|
-
var CheckboxPrimitive = __toESM(require("@radix-ui/react-checkbox"));
|
2199
|
-
var CheckboxElement = React34.forwardRef(({ radius = "inherit", size = "default", className, ...props }, ref) => {
|
2200
|
-
let checkboxRadius = {
|
2201
|
-
none: "hawa-rounded-none",
|
2202
|
-
inherit: "hawa-rounded-sm",
|
2203
|
-
full: "hawa-rounded-full"
|
2204
|
-
};
|
2205
|
-
let checkboxSizes = {
|
2206
|
-
xs: "hawa-w-3 hawa-h-3",
|
2207
|
-
sm: "hawa-w-6 hawa-h-6",
|
2208
|
-
default: "hawa-icon",
|
2209
|
-
md: "hawa-w-8 hawa-h-8",
|
2210
|
-
lg: "hawa-w-10 hawa-h-10",
|
2211
|
-
xl: "hawa-w-12 hawa-h-12"
|
2212
|
-
};
|
2213
|
-
let checkboxIndicatorSizes = {
|
2214
|
-
xs: "0.5em",
|
2215
|
-
default: "0.60em",
|
2216
|
-
sm: "0.75em",
|
2217
|
-
md: "0.875em",
|
2218
|
-
lg: "1em",
|
2219
|
-
xl: "1.25em"
|
2220
|
-
};
|
2221
|
-
return /* @__PURE__ */ React34.createElement(
|
2222
|
-
CheckboxPrimitive.Root,
|
2223
|
-
{
|
2224
|
-
ref,
|
2225
|
-
className: cn(
|
2226
|
-
"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",
|
2227
|
-
checkboxSizes[size],
|
2228
|
-
checkboxRadius[radius],
|
2229
|
-
className
|
2230
|
-
),
|
2231
|
-
...props
|
2232
|
-
},
|
2233
|
-
/* @__PURE__ */ React34.createElement(
|
2234
|
-
CheckboxPrimitive.Indicator,
|
2235
|
-
{
|
2236
|
-
className: cn(
|
2237
|
-
"hawa-flex hawa-items-center hawa-justify-center hawa-text-current"
|
2238
|
-
)
|
2239
|
-
},
|
2240
|
-
/* @__PURE__ */ React34.createElement(
|
2241
|
-
"svg",
|
2242
|
-
{
|
2243
|
-
"aria-label": "Check Mark",
|
2244
|
-
stroke: "currentColor",
|
2245
|
-
fill: "currentColor",
|
2246
|
-
strokeWidth: "0",
|
2247
|
-
viewBox: "0 0 512 512",
|
2248
|
-
height: checkboxIndicatorSizes[size],
|
2249
|
-
width: checkboxIndicatorSizes[size]
|
2250
|
-
},
|
2251
|
-
/* @__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" })
|
2252
|
-
),
|
2253
|
-
" "
|
2254
|
-
)
|
2255
|
-
);
|
2256
|
-
});
|
2257
|
-
CheckboxElement.displayName = CheckboxPrimitive.Root.displayName;
|
2258
|
-
|
2259
|
-
// components/elements/progress/Progress.tsx
|
2260
|
-
var React35 = __toESM(require("react"));
|
2261
|
-
var ProgressPrimitive = __toESM(require("@radix-ui/react-progress"));
|
2262
|
-
var Progress = React35.forwardRef(({ className, value, ...props }, ref) => /* @__PURE__ */ React35.createElement(
|
2263
|
-
ProgressPrimitive.Root,
|
2264
|
-
{
|
2265
|
-
ref,
|
2266
|
-
className: cn(
|
2267
|
-
"hawa-relative hawa-h-4 hawa-w-full hawa-overflow-hidden hawa-rounded hawa-bg-secondary",
|
2268
|
-
className
|
2269
|
-
),
|
2270
|
-
...props
|
2271
|
-
},
|
2272
|
-
/* @__PURE__ */ React35.createElement(
|
2273
|
-
ProgressPrimitive.Indicator,
|
2274
|
-
{
|
2275
|
-
className: "hawa-h-full hawa-w-full hawa-flex-1 hawa-bg-primary hawa-transition-all",
|
2276
|
-
style: { transform: `translateX(-${100 - (value || 0)}%)` }
|
2277
|
-
}
|
2278
|
-
)
|
2279
|
-
));
|
2280
|
-
Progress.displayName = ProgressPrimitive.Root.displayName;
|
2281
|
-
|
2282
|
-
// components/elements/breadcrumb/Breadcrumb.tsx
|
2283
|
-
var import_react15 = __toESM(require("react"));
|
2284
|
-
|
2285
|
-
// components/elements/appStores/AppStores.tsx
|
2286
|
-
var import_react16 = __toESM(require("react"));
|
2287
|
-
|
2288
|
-
// components/elements/badge/Badge.tsx
|
2289
|
-
var import_react17 = __toESM(require("react"));
|
2290
|
-
|
2291
|
-
// components/elements/phoneInput/PhoneInput.tsx
|
2292
|
-
var import_react18 = __toESM(require("react"));
|
2293
|
-
|
2294
|
-
// components/elements/pinInput/PinInput.tsx
|
2295
|
-
var import_react19 = __toESM(require("react"));
|
2296
|
-
|
2297
|
-
// components/elements/stopPropagationWrapper/StopPropagationWrapper.tsx
|
2298
|
-
var import_react20 = __toESM(require("react"));
|
2299
|
-
|
2300
|
-
// components/elements/scrollArea/ScrollArea.tsx
|
2301
|
-
var React42 = __toESM(require("react"));
|
2302
|
-
var ScrollAreaPrimitive = __toESM(require("@radix-ui/react-scroll-area"));
|
2303
|
-
var ScrollArea = React42.forwardRef(({ className, children, orientation = "vertical", ...props }, ref) => /* @__PURE__ */ React42.createElement(
|
2304
|
-
ScrollAreaPrimitive.Root,
|
2305
|
-
{
|
2306
|
-
ref,
|
2307
|
-
className: cn("hawa-relative hawa-overflow-hidden", className),
|
2308
|
-
...props
|
2309
|
-
},
|
2310
|
-
/* @__PURE__ */ React42.createElement(ScrollAreaPrimitive.Viewport, { className: "hawa-h-full hawa-w-full hawa-rounded-[inherit]" }, children),
|
2311
|
-
/* @__PURE__ */ React42.createElement(ScrollBar, { orientation }),
|
2312
|
-
/* @__PURE__ */ React42.createElement(ScrollAreaPrimitive.Corner, null)
|
2313
|
-
));
|
2314
|
-
ScrollArea.displayName = ScrollAreaPrimitive.Root.displayName;
|
2315
|
-
var ScrollBar = React42.forwardRef(({ className, orientation = "vertical", ...props }, ref) => /* @__PURE__ */ React42.createElement(
|
2316
|
-
ScrollAreaPrimitive.ScrollAreaScrollbar,
|
2317
|
-
{
|
2318
|
-
ref,
|
2319
|
-
orientation,
|
2320
|
-
className: cn(
|
2321
|
-
"hawa-flex hawa-touch-none hawa-select-none hawa-transition-colors",
|
2322
|
-
orientation === "vertical" && "hawa-h-full hawa-w-2.5 hawa-border-l hawa-border-l-transparent hawa-p-[1px]",
|
2323
|
-
orientation === "horizontal" && "hawa-h-2.5 hawa-border-t hawa-border-t-transparent hawa-p-[1px]",
|
2324
|
-
className
|
2325
|
-
),
|
2326
|
-
...props
|
2327
|
-
},
|
2328
|
-
/* @__PURE__ */ React42.createElement(
|
2329
|
-
ScrollAreaPrimitive.ScrollAreaThumb,
|
2330
|
-
{
|
2331
|
-
className: cn(
|
2332
|
-
"hawa-relative hawa-rounded-full hawa-bg-border",
|
2333
|
-
orientation === "vertical" && "hawa-flex-1"
|
2334
|
-
)
|
2335
|
-
}
|
2336
|
-
)
|
2337
|
-
));
|
2338
|
-
ScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName;
|
2339
|
-
|
2340
|
-
// components/elements/colorPicker/ColorPicker.tsx
|
2341
|
-
var import_react21 = __toESM(require("react"));
|
2342
|
-
|
2343
|
-
// components/elements/progressCircle/ProgressCircle.tsx
|
2344
|
-
var import_react22 = __toESM(require("react"));
|
2345
|
-
var size2config = {
|
2346
|
-
xs: {
|
2347
|
-
radius: 15,
|
2348
|
-
strokeWidth: 3
|
2349
|
-
},
|
2350
|
-
sm: {
|
2351
|
-
radius: 19,
|
2352
|
-
strokeWidth: 4
|
2353
|
-
},
|
2354
|
-
md: {
|
2355
|
-
radius: 32,
|
2356
|
-
strokeWidth: 6
|
2357
|
-
},
|
2358
|
-
lg: {
|
2359
|
-
radius: 52,
|
2360
|
-
strokeWidth: 8
|
2361
|
-
},
|
2362
|
-
xl: {
|
2363
|
-
radius: 80,
|
2364
|
-
strokeWidth: 10
|
2365
|
-
}
|
2366
|
-
};
|
2367
|
-
function getLimitedValue(input) {
|
2368
|
-
if (input === void 0) {
|
2369
|
-
return 0;
|
2370
|
-
} else if (input > 100) {
|
2371
|
-
return 100;
|
2372
|
-
} else {
|
2373
|
-
return input;
|
2374
|
-
}
|
2375
|
-
}
|
2376
|
-
var ProgressCircle = import_react22.default.forwardRef((props, ref) => {
|
2377
|
-
const {
|
2378
|
-
value: inputValue,
|
2379
|
-
size = "md",
|
2380
|
-
className,
|
2381
|
-
showAnimation = true,
|
2382
|
-
color,
|
2383
|
-
tooltip,
|
2384
|
-
radius: inputRadius,
|
2385
|
-
strokeWidth: inputStrokeWidth,
|
2386
|
-
children,
|
2387
|
-
...other
|
2388
|
-
} = props;
|
2389
|
-
const value = getLimitedValue(inputValue);
|
2390
|
-
const radius = inputRadius != null ? inputRadius : size2config[size].radius;
|
2391
|
-
const strokeWidth = inputStrokeWidth != null ? inputStrokeWidth : size2config[size].strokeWidth;
|
2392
|
-
const normalizedRadius = radius - strokeWidth / 2;
|
2393
|
-
const circumference = normalizedRadius * 2 * Math.PI;
|
2394
|
-
const strokeDashoffset = value / 100 * circumference;
|
2395
|
-
const offset = circumference - strokeDashoffset;
|
2396
|
-
return /* @__PURE__ */ import_react22.default.createElement(import_react22.default.Fragment, null, /* @__PURE__ */ import_react22.default.createElement(
|
2397
|
-
"div",
|
2398
|
-
{
|
2399
|
-
ref,
|
2400
|
-
className: cn(
|
2401
|
-
"hawa-flex hawa-flex-col hawa-items-center hawa-justify-center",
|
2402
|
-
className
|
2403
|
-
)
|
2404
|
-
},
|
2405
|
-
/* @__PURE__ */ import_react22.default.createElement(
|
2406
|
-
"svg",
|
2407
|
-
{
|
2408
|
-
width: radius * 2,
|
2409
|
-
height: radius * 2,
|
2410
|
-
viewBox: `0 0 ${radius * 2} ${radius * 2}`,
|
2411
|
-
className: "hawa-rotate-180 hawa-transform"
|
2412
|
-
},
|
2413
|
-
/* @__PURE__ */ import_react22.default.createElement(
|
2414
|
-
"circle",
|
2415
|
-
{
|
2416
|
-
r: normalizedRadius,
|
2417
|
-
cx: radius,
|
2418
|
-
cy: radius,
|
2419
|
-
strokeWidth,
|
2420
|
-
fill: "transparent",
|
2421
|
-
stroke: "",
|
2422
|
-
strokeLinecap: "round",
|
2423
|
-
className: cn(
|
2424
|
-
"hawa-transition-colors hawa-ease-linear",
|
2425
|
-
" hawa-stroke-primary/20"
|
2426
|
-
)
|
2427
|
-
}
|
2428
|
-
),
|
2429
|
-
value > 0 ? /* @__PURE__ */ import_react22.default.createElement(
|
2430
|
-
"circle",
|
2431
|
-
{
|
2432
|
-
r: normalizedRadius,
|
2433
|
-
cx: radius,
|
2434
|
-
cy: radius,
|
2435
|
-
strokeWidth,
|
2436
|
-
strokeDasharray: circumference + " " + circumference,
|
2437
|
-
strokeDashoffset: offset,
|
2438
|
-
fill: "transparent",
|
2439
|
-
stroke: "",
|
2440
|
-
strokeLinecap: "round",
|
2441
|
-
className: cn(
|
2442
|
-
"hawa-transition-colors hawa-ease-linear",
|
2443
|
-
"hawa-stroke-primary",
|
2444
|
-
showAnimation ? "hawa-transition-all hawa-duration-300 hawa-ease-in-out" : ""
|
2445
|
-
)
|
2446
|
-
}
|
2447
|
-
) : null
|
2448
|
-
),
|
2449
|
-
/* @__PURE__ */ import_react22.default.createElement("div", { className: cn("hawa-absolute hawa-flex") }, children)
|
2450
|
-
));
|
2451
|
-
});
|
2452
|
-
ProgressCircle.displayName = "ProgressCircle";
|
2453
|
-
|
2454
|
-
// components/elements/pagination/Pagination.tsx
|
2455
|
-
var import_react23 = __toESM(require("react"));
|
2456
|
-
var import_react_headless_pagination = require("react-headless-pagination");
|
2457
|
-
|
2458
|
-
// components/elements/passwordInput/PasswordInput.tsx
|
2459
|
-
var import_react27 = __toESM(require("react"));
|
2460
|
-
|
2461
|
-
// components/icons/Emojis.tsx
|
2462
|
-
var import_react24 = __toESM(require("react"));
|
2463
|
-
|
2464
|
-
// components/icons/InputIcons.tsx
|
2465
|
-
var import_react25 = __toESM(require("react"));
|
2466
|
-
|
2467
|
-
// components/icons/CommonIcons.tsx
|
2468
|
-
var import_react26 = __toESM(require("react"));
|
2469
|
-
|
2470
|
-
// components/elements/slider/Slider.tsx
|
2471
|
-
var React50 = __toESM(require("react"));
|
2472
|
-
var SliderPrimitive = __toESM(require("@radix-ui/react-slider"));
|
2473
|
-
var Slider = React50.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React50.createElement(
|
2474
|
-
SliderPrimitive.Root,
|
2475
|
-
{
|
2476
|
-
ref,
|
2477
|
-
className: cn(
|
2478
|
-
"hawa-relative hawa-flex hawa-w-full hawa-touch-none hawa-select-none hawa-items-center",
|
2479
|
-
className
|
2480
|
-
),
|
2481
|
-
...props
|
2482
|
-
},
|
2483
|
-
/* @__PURE__ */ React50.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__ */ React50.createElement(SliderPrimitive.Range, { className: "hawa-absolute hawa-h-full hawa-bg-primary" })),
|
2484
|
-
/* @__PURE__ */ React50.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" })
|
2485
|
-
));
|
2486
|
-
Slider.displayName = SliderPrimitive.Root.displayName;
|
2487
|
-
|
2488
|
-
// components/elements/simpleTable/SimpleTable.tsx
|
2489
|
-
var React51 = __toESM(require("react"));
|
2490
|
-
var import_react_table2 = require("@tanstack/react-table");
|
2491
|
-
|
2492
|
-
// components/elements/separator/Separator.tsx
|
2493
|
-
var React52 = __toESM(require("react"));
|
2494
|
-
|
2495
|
-
// components/elements/scrollIndicator/ScrollIndicator.tsx
|
2496
|
-
var import_react28 = __toESM(require("react"));
|
2497
|
-
|
2498
|
-
// components/elements/carousel/Carousel.tsx
|
2499
|
-
var import_react29 = __toESM(require("react"));
|
2500
|
-
var import_embla_carousel_react = __toESM(require("embla-carousel-react"));
|
2501
|
-
|
2502
|
-
// components/elements/count/Count.tsx
|
2503
|
-
var import_react30 = __toESM(require("react"));
|
2504
|
-
|
2505
|
-
// components/elements/toast/Toast.tsx
|
2506
|
-
var React56 = __toESM(require("react"));
|
2507
|
-
var ToastPrimitives = __toESM(require("@radix-ui/react-toast"));
|
2508
|
-
var import_class_variance_authority4 = require("class-variance-authority");
|
2509
|
-
var toastVariants = (0, import_class_variance_authority4.cva)(
|
2510
|
-
"hawa-group hawa-z-[900] hawa-pointer-events-auto hawa-relative hawa-flex hawa-w-full hawa-items-center hawa-justify-between 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",
|
2511
|
-
{
|
2512
|
-
variants: {
|
2513
|
-
variant: {
|
2514
|
-
default: "hawa-border hawa-bg-background hawa-text-foreground",
|
2515
|
-
destructive: "hawa-destructive hawa-group hawa-border-destructive hawa-bg-destructive hawa-text-destructive-foreground"
|
2516
|
-
},
|
2517
|
-
severity: {
|
2518
|
-
info: "hawa-info hawa-group hawa-text-info-foreground hawa-bg-info",
|
2519
|
-
warning: "hawa-warning hawa-group hawa-text-warning-foreground hawa-bg-warning",
|
2520
|
-
error: "hawa-error hawa-group hawa-border-error hawa-bg-error hawa-text-white",
|
2521
|
-
success: "hawa-success hawa-group hawa-text-success-foreground hawa-bg-success",
|
2522
|
-
none: ""
|
2523
|
-
}
|
2524
|
-
},
|
2525
|
-
defaultVariants: { variant: "default" }
|
2526
|
-
}
|
2527
|
-
);
|
2528
|
-
var sizeStyles = {
|
2529
|
-
default: "hawa-text-sm",
|
2530
|
-
// Update this based on the desired padding for rtl
|
2531
|
-
sm: "hawa-text-xs"
|
2532
|
-
};
|
2533
|
-
var ToastViewport = React56.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React56.createElement(
|
2534
|
-
ToastPrimitives.Viewport,
|
2535
|
-
{
|
2536
|
-
ref,
|
2537
|
-
className: cn(
|
2538
|
-
"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]",
|
2539
|
-
className
|
2540
|
-
),
|
2541
|
-
...props
|
2542
|
-
}
|
2543
|
-
));
|
2544
|
-
ToastViewport.displayName = ToastPrimitives.Viewport.displayName;
|
2545
|
-
var Toast = React56.forwardRef(({ className, variant, severity = "none", direction, ...props }, ref) => {
|
2546
|
-
return /* @__PURE__ */ React56.createElement(
|
2547
|
-
ToastPrimitives.Root,
|
2548
|
-
{
|
2549
|
-
ref,
|
2550
|
-
className: cn(
|
2551
|
-
toastVariants({ variant, severity }),
|
2552
|
-
className,
|
2553
|
-
direction === "rtl" ? "data-[state=closed]:hawa-slide-out-to-left-full" : "data-[state=closed]:hawa-slide-out-to-right-full"
|
2554
|
-
),
|
2555
|
-
dir: direction,
|
2556
|
-
...props
|
2557
|
-
}
|
2558
|
-
);
|
2559
|
-
});
|
2560
|
-
Toast.displayName = ToastPrimitives.Root.displayName;
|
2561
|
-
var ToastAction = React56.forwardRef(({ className, ...props }, ref) => {
|
2562
|
-
return /* @__PURE__ */ React56.createElement(
|
2563
|
-
ToastPrimitives.Action,
|
2564
|
-
{
|
2565
|
-
ref,
|
2566
|
-
className: cn(
|
2567
|
-
"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",
|
2568
|
-
"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",
|
2569
|
-
"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",
|
2570
|
-
"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",
|
2571
|
-
"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",
|
2572
|
-
"hawa-whitespace-nowrap",
|
2573
|
-
className
|
2574
|
-
),
|
2575
|
-
...props
|
2576
|
-
}
|
2577
|
-
);
|
2578
|
-
});
|
2579
|
-
ToastAction.displayName = ToastPrimitives.Action.displayName;
|
2580
|
-
var ToastClose = React56.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React56.createElement(
|
2581
|
-
ToastPrimitives.Close,
|
2582
|
-
{
|
2583
|
-
ref,
|
2584
|
-
className: cn(
|
2585
|
-
// "hawa-absolute hawa-start-2 hawa-top-2",
|
2586
|
-
// "group-hover:hawa-opacity-100",
|
2587
|
-
"hawa-opacity-100",
|
2588
|
-
"hawa-rounded-md hawa-p-1 hawa-text-foreground/50 hawa-transition-opacity hover:hawa-text-foreground focus:hawa-opacity-100 focus:hawa-outline-none focus:hawa-ring-2 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",
|
2589
|
-
className
|
2590
|
-
),
|
2591
|
-
"toast-close": "",
|
2592
|
-
...props
|
2593
|
-
},
|
2594
|
-
/* @__PURE__ */ React56.createElement(
|
2595
|
-
"svg",
|
2596
|
-
{
|
2597
|
-
"aria-label": "Close Icon",
|
2598
|
-
"aria-hidden": "true",
|
2599
|
-
className: "hawa-icon",
|
2600
|
-
fill: "currentColor",
|
2601
|
-
viewBox: "0 0 20 20"
|
2602
|
-
},
|
2603
|
-
/* @__PURE__ */ React56.createElement(
|
2604
|
-
"path",
|
2605
|
-
{
|
2606
|
-
fillRule: "evenodd",
|
2607
|
-
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",
|
2608
|
-
clipRule: "evenodd"
|
2609
|
-
}
|
2610
|
-
)
|
2611
|
-
)
|
2612
|
-
));
|
2613
|
-
ToastClose.displayName = ToastPrimitives.Close.displayName;
|
2614
|
-
var ToastTitle = React56.forwardRef(({ className, size = "default", ...props }, ref) => /* @__PURE__ */ React56.createElement(
|
2615
|
-
ToastPrimitives.Title,
|
2616
|
-
{
|
2617
|
-
ref,
|
2618
|
-
className: cn(
|
2619
|
-
"hawa-select-text hawa-text-sm hawa-font-semibold",
|
2620
|
-
sizeStyles[size],
|
2621
|
-
className
|
2622
|
-
),
|
2623
|
-
...props
|
2624
|
-
}
|
2625
|
-
));
|
2626
|
-
ToastTitle.displayName = ToastPrimitives.Title.displayName;
|
2627
|
-
var ToastDescription = React56.forwardRef(({ className, size = "default", ...props }, ref) => /* @__PURE__ */ React56.createElement(
|
2628
|
-
ToastPrimitives.Description,
|
2629
|
-
{
|
2630
|
-
ref,
|
2631
|
-
className: cn(
|
2632
|
-
"hawa-select-text hawa-opacity-90",
|
2633
|
-
sizeStyles[size],
|
2634
|
-
className
|
2635
|
-
),
|
2636
|
-
...props
|
2637
|
-
}
|
2638
|
-
));
|
2639
|
-
ToastDescription.displayName = ToastPrimitives.Description.displayName;
|
2640
|
-
|
2641
|
-
// components/elements/toaster/Toaster.tsx
|
2642
|
-
var import_react31 = __toESM(require("react"));
|
2643
|
-
|
2644
|
-
// components/hooks/useToast.ts
|
2645
|
-
var React57 = __toESM(require("react"));
|
2646
|
-
|
2647
|
-
// components/elements/destroyableCard/DestroyableCard.tsx
|
2648
|
-
var import_react32 = __toESM(require("react"));
|
2649
|
-
|
2650
|
-
// components/elements/interfaceSettings/InterfaceSettings.tsx
|
2651
|
-
var import_react33 = __toESM(require("react"));
|
2652
|
-
|
2653
|
-
// components/hooks/useClipboard.ts
|
2654
|
-
var import_react34 = require("react");
|
2655
|
-
function useClipboard({ timeout = 2e3 } = {}) {
|
2656
|
-
const [error, setError] = (0, import_react34.useState)(null);
|
2657
|
-
const [copied, setCopied] = (0, import_react34.useState)(false);
|
2658
|
-
const [copyTimeout, setCopyTimeout] = (0, import_react34.useState)(null);
|
2659
|
-
const handleCopyResult = (value) => {
|
2660
|
-
clearTimeout(copyTimeout);
|
2661
|
-
setCopyTimeout(setTimeout(() => setCopied(false), timeout));
|
2662
|
-
setCopied(value);
|
2663
|
-
};
|
2664
|
-
const copy = (valueToCopy) => {
|
2665
|
-
if ("clipboard" in navigator) {
|
2666
|
-
navigator.clipboard.writeText(valueToCopy).then(() => handleCopyResult(true)).catch((err) => setError(err));
|
2667
|
-
} else {
|
2668
|
-
setError(new Error("useClipboard: navigator.clipboard is not supported"));
|
2669
|
-
}
|
2670
|
-
};
|
2671
|
-
const reset = () => {
|
2672
|
-
setCopied(false);
|
2673
|
-
setError(null);
|
2674
|
-
clearTimeout(copyTimeout);
|
2675
|
-
};
|
2676
|
-
return { copy, reset, error, copied };
|
2677
|
-
}
|
2678
377
|
|
2679
|
-
//
|
378
|
+
// elements/codeBlock/CodeBlock.tsx
|
2680
379
|
var CodeBlock = ({
|
2681
380
|
tabs,
|
2682
381
|
code,
|
@@ -2688,7 +387,7 @@ var CodeBlock = ({
|
|
2688
387
|
...props
|
2689
388
|
}) => {
|
2690
389
|
const clipboard = useClipboard();
|
2691
|
-
const [selectedTab, setSelectedTab] = (0,
|
390
|
+
const [selectedTab, setSelectedTab] = (0, import_react4.useState)(0);
|
2692
391
|
const isDarkMode = props.forcedDarkMode || document.body.classList.contains("dark");
|
2693
392
|
const theme = isDarkMode ? import_prism_react_renderer.themes.vsDark : import_prism_react_renderer.themes.vsLight;
|
2694
393
|
let widthStyles = {
|
@@ -2697,7 +396,7 @@ var CodeBlock = ({
|
|
2697
396
|
sm: "hawa-w-full hawa-max-w-sm",
|
2698
397
|
xs: "hawa-w-full hawa-max-w-xs"
|
2699
398
|
};
|
2700
|
-
return /* @__PURE__ */
|
399
|
+
return /* @__PURE__ */ import_react4.default.createElement(
|
2701
400
|
"div",
|
2702
401
|
{
|
2703
402
|
className: cn(
|
@@ -2706,7 +405,7 @@ var CodeBlock = ({
|
|
2706
405
|
className
|
2707
406
|
)
|
2708
407
|
},
|
2709
|
-
fileName && /* @__PURE__ */
|
408
|
+
fileName && /* @__PURE__ */ import_react4.default.createElement(
|
2710
409
|
"div",
|
2711
410
|
{
|
2712
411
|
className: cn(
|
@@ -2714,7 +413,7 @@ var CodeBlock = ({
|
|
2714
413
|
fileName && tabs ? "hawa-bg-gray-300 dark:hawa-bg-muted/50" : "hawa-bg-gray-200"
|
2715
414
|
)
|
2716
415
|
},
|
2717
|
-
/* @__PURE__ */
|
416
|
+
/* @__PURE__ */ import_react4.default.createElement(
|
2718
417
|
"div",
|
2719
418
|
{
|
2720
419
|
className: cn(
|
@@ -2724,7 +423,7 @@ var CodeBlock = ({
|
|
2724
423
|
fileName
|
2725
424
|
)
|
2726
425
|
),
|
2727
|
-
tabs && /* @__PURE__ */
|
426
|
+
tabs && /* @__PURE__ */ import_react4.default.createElement(
|
2728
427
|
"div",
|
2729
428
|
{
|
2730
429
|
className: cn(
|
@@ -2732,7 +431,7 @@ var CodeBlock = ({
|
|
2732
431
|
tabs && fileName && "hawa-rounded-t-none"
|
2733
432
|
)
|
2734
433
|
},
|
2735
|
-
tabs.map((tab, i) => /* @__PURE__ */
|
434
|
+
tabs.map((tab, i) => /* @__PURE__ */ import_react4.default.createElement(
|
2736
435
|
"div",
|
2737
436
|
{
|
2738
437
|
key: i,
|
@@ -2740,7 +439,7 @@ var CodeBlock = ({
|
|
2740
439
|
selectedTab === i ? " hawa-border-b-2 hawa-border-primary" : "hawa-bg-transparent"
|
2741
440
|
)
|
2742
441
|
},
|
2743
|
-
/* @__PURE__ */
|
442
|
+
/* @__PURE__ */ import_react4.default.createElement(
|
2744
443
|
"div",
|
2745
444
|
{
|
2746
445
|
onClick: () => setSelectedTab(i),
|
@@ -2752,7 +451,7 @@ var CodeBlock = ({
|
|
2752
451
|
)
|
2753
452
|
))
|
2754
453
|
),
|
2755
|
-
/* @__PURE__ */
|
454
|
+
/* @__PURE__ */ import_react4.default.createElement(
|
2756
455
|
"div",
|
2757
456
|
{
|
2758
457
|
className: cn(
|
@@ -2760,26 +459,26 @@ var CodeBlock = ({
|
|
2760
459
|
tabs || fileName ? "hawa-rounded-b hawa-rounded-t-none" : "hawa-rounded"
|
2761
460
|
)
|
2762
461
|
},
|
2763
|
-
/* @__PURE__ */
|
462
|
+
/* @__PURE__ */ import_react4.default.createElement(
|
2764
463
|
import_prism_react_renderer.Highlight,
|
2765
464
|
{
|
2766
465
|
theme,
|
2767
466
|
code: tabs ? tabs[selectedTab].code : code || "",
|
2768
467
|
language
|
2769
468
|
},
|
2770
|
-
({ className: className2, style, tokens, getLineProps, getTokenProps }) => /* @__PURE__ */
|
469
|
+
({ className: className2, style, tokens, getLineProps, getTokenProps }) => /* @__PURE__ */ import_react4.default.createElement("pre", { className: "hawa-min-h-[37.75px] hawa-w-full hawa-overflow-auto hawa-p-4 hawa-font-mono hawa-text-foreground" }, tokens.map((line, i) => /* @__PURE__ */ import_react4.default.createElement("div", { key: i, ...getLineProps({ line }) }, props.lineNumbers && /* @__PURE__ */ import_react4.default.createElement("span", { className: "hawa-mr-4" }, i + 1), line.map((token, key) => /* @__PURE__ */ import_react4.default.createElement("span", { key, ...getTokenProps({ token }) })))))
|
2771
470
|
),
|
2772
|
-
/* @__PURE__ */
|
471
|
+
/* @__PURE__ */ import_react4.default.createElement("div", { className: "hawa-flex hawa-w-fit hawa-flex-row hawa-items-center hawa-gap-2 hawa-p-2" }, /* @__PURE__ */ import_react4.default.createElement(
|
2773
472
|
Tooltip,
|
2774
473
|
{
|
2775
474
|
open: clipboard.copied,
|
2776
475
|
side: "left",
|
2777
|
-
content: /* @__PURE__ */
|
476
|
+
content: /* @__PURE__ */ import_react4.default.createElement("div", null, "Copied!"),
|
2778
477
|
triggerProps: {
|
2779
478
|
asChild: true
|
2780
479
|
}
|
2781
480
|
},
|
2782
|
-
/* @__PURE__ */
|
481
|
+
/* @__PURE__ */ import_react4.default.createElement(
|
2783
482
|
Button,
|
2784
483
|
{
|
2785
484
|
size: "icon",
|
@@ -2787,7 +486,7 @@ var CodeBlock = ({
|
|
2787
486
|
variant: "outline",
|
2788
487
|
className: "hawa-text-foreground hawa-opacity-50 sm:hawa-opacity-100"
|
2789
488
|
},
|
2790
|
-
/* @__PURE__ */
|
489
|
+
/* @__PURE__ */ import_react4.default.createElement(
|
2791
490
|
"svg",
|
2792
491
|
{
|
2793
492
|
"aria-label": "Copy Icon",
|
@@ -2800,8 +499,8 @@ var CodeBlock = ({
|
|
2800
499
|
height: "1em",
|
2801
500
|
width: "1em"
|
2802
501
|
},
|
2803
|
-
/* @__PURE__ */
|
2804
|
-
/* @__PURE__ */
|
502
|
+
/* @__PURE__ */ import_react4.default.createElement("rect", { width: "14", height: "14", x: "8", y: "8", rx: "2", ry: "2" }),
|
503
|
+
/* @__PURE__ */ import_react4.default.createElement("path", { d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2" })
|
2805
504
|
)
|
2806
505
|
)
|
2807
506
|
))
|