@sikka/hawa 0.2.38 → 0.2.40-next

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js ADDED
@@ -0,0 +1,1523 @@
1
+ "use strict";
2
+ function _array_like_to_array(arr, len) {
3
+ if (len == null || len > arr.length) len = arr.length;
4
+ for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
5
+ return arr2;
6
+ }
7
+ function _array_with_holes(arr) {
8
+ if (Array.isArray(arr)) return arr;
9
+ }
10
+ function _array_without_holes(arr) {
11
+ if (Array.isArray(arr)) return _array_like_to_array(arr);
12
+ }
13
+ function _define_property(obj, key, value) {
14
+ if (key in obj) {
15
+ Object.defineProperty(obj, key, {
16
+ value: value,
17
+ enumerable: true,
18
+ configurable: true,
19
+ writable: true
20
+ });
21
+ } else {
22
+ obj[key] = value;
23
+ }
24
+ return obj;
25
+ }
26
+ function _extends() {
27
+ _extends = Object.assign || function(target) {
28
+ for(var i = 1; i < arguments.length; i++){
29
+ var source = arguments[i];
30
+ for(var key in source){
31
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
32
+ target[key] = source[key];
33
+ }
34
+ }
35
+ }
36
+ return target;
37
+ };
38
+ return _extends.apply(this, arguments);
39
+ }
40
+ function _iterable_to_array(iter) {
41
+ if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
42
+ }
43
+ function _iterable_to_array_limit(arr, i) {
44
+ var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
45
+ if (_i == null) return;
46
+ var _arr = [];
47
+ var _n = true;
48
+ var _d = false;
49
+ var _s, _e;
50
+ try {
51
+ for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
52
+ _arr.push(_s.value);
53
+ if (i && _arr.length === i) break;
54
+ }
55
+ } catch (err) {
56
+ _d = true;
57
+ _e = err;
58
+ } finally{
59
+ try {
60
+ if (!_n && _i["return"] != null) _i["return"]();
61
+ } finally{
62
+ if (_d) throw _e;
63
+ }
64
+ }
65
+ return _arr;
66
+ }
67
+ function _non_iterable_rest() {
68
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
69
+ }
70
+ function _non_iterable_spread() {
71
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
72
+ }
73
+ function _object_destructuring_empty(o) {
74
+ if (o === null || o === void 0) throw new TypeError("Cannot destructure " + o);
75
+ return o;
76
+ }
77
+ function _object_spread(target) {
78
+ for(var i = 1; i < arguments.length; i++){
79
+ var source = arguments[i] != null ? arguments[i] : {};
80
+ var ownKeys = Object.keys(source);
81
+ if (typeof Object.getOwnPropertySymbols === "function") {
82
+ ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
83
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
84
+ }));
85
+ }
86
+ ownKeys.forEach(function(key) {
87
+ _define_property(target, key, source[key]);
88
+ });
89
+ }
90
+ return target;
91
+ }
92
+ function ownKeys(object, enumerableOnly) {
93
+ var keys = Object.keys(object);
94
+ if (Object.getOwnPropertySymbols) {
95
+ var symbols = Object.getOwnPropertySymbols(object);
96
+ if (enumerableOnly) {
97
+ symbols = symbols.filter(function(sym) {
98
+ return Object.getOwnPropertyDescriptor(object, sym).enumerable;
99
+ });
100
+ }
101
+ keys.push.apply(keys, symbols);
102
+ }
103
+ return keys;
104
+ }
105
+ function _object_spread_props(target, source) {
106
+ source = source != null ? source : {};
107
+ if (Object.getOwnPropertyDescriptors) {
108
+ Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
109
+ } else {
110
+ ownKeys(Object(source)).forEach(function(key) {
111
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
112
+ });
113
+ }
114
+ return target;
115
+ }
116
+ function _object_without_properties(source, excluded) {
117
+ if (source == null) return {};
118
+ var target = _object_without_properties_loose(source, excluded);
119
+ var key, i;
120
+ if (Object.getOwnPropertySymbols) {
121
+ var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
122
+ for(i = 0; i < sourceSymbolKeys.length; i++){
123
+ key = sourceSymbolKeys[i];
124
+ if (excluded.indexOf(key) >= 0) continue;
125
+ if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
126
+ target[key] = source[key];
127
+ }
128
+ }
129
+ return target;
130
+ }
131
+ function _object_without_properties_loose(source, excluded) {
132
+ if (source == null) return {};
133
+ var target = {};
134
+ var sourceKeys = Object.keys(source);
135
+ var key, i;
136
+ for(i = 0; i < sourceKeys.length; i++){
137
+ key = sourceKeys[i];
138
+ if (excluded.indexOf(key) >= 0) continue;
139
+ target[key] = source[key];
140
+ }
141
+ return target;
142
+ }
143
+ function _sliced_to_array(arr, i) {
144
+ return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
145
+ }
146
+ function _to_consumable_array(arr) {
147
+ return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();
148
+ }
149
+ function _unsupported_iterable_to_array(o, minLen) {
150
+ if (!o) return;
151
+ if (typeof o === "string") return _array_like_to_array(o, minLen);
152
+ var n = Object.prototype.toString.call(o).slice(8, -1);
153
+ if (n === "Object" && o.constructor) n = o.constructor.name;
154
+ if (n === "Map" || n === "Set") return Array.from(n);
155
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
156
+ }
157
+ var __create = Object.create;
158
+ var __defProp = Object.defineProperty;
159
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
160
+ var __getOwnPropNames = Object.getOwnPropertyNames;
161
+ var __getProtoOf = Object.getPrototypeOf;
162
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
163
+ var __export = function(target, all) {
164
+ for(var name in all)__defProp(target, name, {
165
+ get: all[name],
166
+ enumerable: true
167
+ });
168
+ };
169
+ var __copyProps = function(to, from, except, desc) {
170
+ if (from && typeof from === "object" || typeof from === "function") {
171
+ var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
172
+ try {
173
+ var _loop = function() {
174
+ var key = _step.value;
175
+ if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
176
+ get: function() {
177
+ return from[key];
178
+ },
179
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
180
+ });
181
+ };
182
+ for(var _iterator = __getOwnPropNames(from)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true)_loop();
183
+ } catch (err) {
184
+ _didIteratorError = true;
185
+ _iteratorError = err;
186
+ } finally{
187
+ try {
188
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
189
+ _iterator.return();
190
+ }
191
+ } finally{
192
+ if (_didIteratorError) {
193
+ throw _iteratorError;
194
+ }
195
+ }
196
+ }
197
+ }
198
+ return to;
199
+ };
200
+ var __toESM = function(mod, isNodeMode, target) {
201
+ return target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(// If the importer is in node compatibility mode or this is not an ESM
202
+ // file that has been converted to a CommonJS file using a Babel-
203
+ // compatible transform (i.e. "__esModule" has not been set), then set
204
+ // "default" to the CommonJS "module.exports" for node compatibility.
205
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
206
+ value: mod,
207
+ enumerable: true
208
+ }) : target, mod);
209
+ };
210
+ var __toCommonJS = function(mod) {
211
+ return __copyProps(__defProp({}, "__esModule", {
212
+ value: true
213
+ }), mod);
214
+ };
215
+ // components/index.tsx
216
+ var components_exports = {};
217
+ __export(components_exports, {
218
+ ActionCard: function() {
219
+ return ActionCard;
220
+ },
221
+ Breadcrumb: function() {
222
+ return Breadcrumb;
223
+ },
224
+ Button: function() {
225
+ return Button;
226
+ },
227
+ Card: function() {
228
+ return Card;
229
+ },
230
+ CardContent: function() {
231
+ return CardContent;
232
+ },
233
+ CardDescription: function() {
234
+ return CardDescription;
235
+ },
236
+ CardFooter: function() {
237
+ return CardFooter;
238
+ },
239
+ CardHeader: function() {
240
+ return CardHeader;
241
+ },
242
+ CardTitle: function() {
243
+ return CardTitle;
244
+ },
245
+ Checkbox: function() {
246
+ return Checkbox;
247
+ },
248
+ CodeBlock: function() {
249
+ return CodeBlock;
250
+ },
251
+ Dialog: function() {
252
+ return Dialog;
253
+ },
254
+ DialogContent: function() {
255
+ return DialogContent;
256
+ },
257
+ DialogDescription: function() {
258
+ return DialogDescription;
259
+ },
260
+ DialogFooter: function() {
261
+ return DialogFooter;
262
+ },
263
+ DialogHeader: function() {
264
+ return DialogHeader;
265
+ },
266
+ DialogTitle: function() {
267
+ return DialogTitle;
268
+ },
269
+ DialogTrigger: function() {
270
+ return DialogTrigger;
271
+ },
272
+ DropdownMenu: function() {
273
+ return DropdownMenu;
274
+ },
275
+ Loading: function() {
276
+ return Loading;
277
+ },
278
+ Radio: function() {
279
+ return Radio;
280
+ },
281
+ Switch: function() {
282
+ return Switch;
283
+ },
284
+ Toast: function() {
285
+ return Toast;
286
+ },
287
+ ToastAction: function() {
288
+ return ToastAction;
289
+ },
290
+ ToastClose: function() {
291
+ return ToastClose;
292
+ },
293
+ ToastDescription: function() {
294
+ return ToastDescription;
295
+ },
296
+ ToastProvider: function() {
297
+ return ToastProvider;
298
+ },
299
+ ToastTitle: function() {
300
+ return ToastTitle;
301
+ },
302
+ ToastViewport: function() {
303
+ return ToastViewport;
304
+ },
305
+ Toaster: function() {
306
+ return Toaster;
307
+ },
308
+ Tooltip: function() {
309
+ return Tooltip;
310
+ },
311
+ buttonVariants: function() {
312
+ return buttonVariants;
313
+ }
314
+ });
315
+ module.exports = __toCommonJS(components_exports);
316
+ // components/elements/Button.tsx
317
+ var React2 = __toESM(require("react"));
318
+ var import_class_variance_authority = require("class-variance-authority");
319
+ // components/util.ts
320
+ var import_clsx = require("clsx");
321
+ var import_tailwind_merge = require("tailwind-merge");
322
+ function cn() {
323
+ for(var _len = arguments.length, inputs = new Array(_len), _key = 0; _key < _len; _key++){
324
+ inputs[_key] = arguments[_key];
325
+ }
326
+ return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs));
327
+ }
328
+ // components/elements/Loading.tsx
329
+ var import_react = __toESM(require("react"));
330
+ var import_clsx2 = __toESM(require("clsx"));
331
+ var Loading = function(_param) {
332
+ var _param_design = _param.design, design = _param_design === void 0 ? "spinner" : _param_design, _param_size = _param.size, size = _param_size === void 0 ? "sm" : _param_size, color = _param.color, props = _object_without_properties(_param, [
333
+ "design",
334
+ "size",
335
+ "color"
336
+ ]);
337
+ var sizeStyles = {
338
+ button: "hawa-h-4 hawa-w-4",
339
+ xs: "hawa-h-1 hawa-w-1",
340
+ sm: "hawa-h-6 hawa-w-6",
341
+ normal: "hawa-h-8 hawa-w-8",
342
+ lg: "hawa-h-14 hawa-w-14",
343
+ xl: "hawa-h-24 hawa-w-24"
344
+ };
345
+ var animationStyles = {
346
+ pulse: "hawa-animate-in hawa-fade-in hawa-duration-1000",
347
+ bounce: "hawa-animate-bounce"
348
+ };
349
+ switch(design.split("-")[0]){
350
+ case "dots":
351
+ return /* @__PURE__ */ import_react.default.createElement("div", {
352
+ className: "hawa-flex hawa-flex-row hawa-gap-2"
353
+ }, /* @__PURE__ */ import_react.default.createElement("div", {
354
+ className: (0, import_clsx2.default)("hawa-animate-bounce hawa-rounded-full hawa-delay-100 hawa-repeat-infinite", size === "button" ? "hawa-h-2 hawa-w-2" : sizeStyles[size], animationStyles[design.split("-")[1]], color ? color : "hawa-bg-primary")
355
+ }), /* @__PURE__ */ import_react.default.createElement("div", {
356
+ className: (0, import_clsx2.default)("hawa-animate-bounce hawa-rounded-full hawa-delay-200 hawa-repeat-infinite", size === "button" ? "hawa-h-2 hawa-w-2" : sizeStyles[size], animationStyles[design.split("-")[1]], color ? color : "hawa-bg-primary")
357
+ }), /* @__PURE__ */ import_react.default.createElement("div", {
358
+ className: (0, import_clsx2.default)("hawa-animate-bounce hawa-rounded-full hawa-delay-300 hawa-repeat-infinite", size === "button" ? "hawa-h-2 hawa-w-2" : sizeStyles[size], animationStyles[design.split("-")[1]], color ? color : "hawa-bg-primary")
359
+ }));
360
+ default:
361
+ return /* @__PURE__ */ import_react.default.createElement("div", {
362
+ className: "hawa-flex hawa-flex-row hawa-gap-x-3"
363
+ }, /* @__PURE__ */ import_react.default.createElement("div", {
364
+ "aria-label": "Loading...",
365
+ role: "status"
366
+ }, /* @__PURE__ */ import_react.default.createElement("svg", {
367
+ className: (0, import_clsx2.default)(sizeStyles[size], "hawa-animate-spin"),
368
+ viewBox: "3 3 18 18"
369
+ }, /* @__PURE__ */ import_react.default.createElement("path", {
370
+ className: "hawa-fill-primary/20",
371
+ d: "M12 5C8.13401 5 5 8.13401 5 12C5 15.866 8.13401 19 12 19C15.866 19 19 15.866 19 12C19 8.13401 15.866 5 12 5ZM3 12C3 7.02944 7.02944 3 12 3C16.9706 3 21 7.02944 21 12C21 16.9706 16.9706 21 12 21C7.02944 21 3 16.9706 3 12Z"
372
+ }), /* @__PURE__ */ import_react.default.createElement("path", {
373
+ className: color ? color : "hawa-fill-primary",
374
+ d: "M16.9497 7.05015C14.2161 4.31648 9.78392 4.31648 7.05025 7.05015C6.65973 7.44067 6.02656 7.44067 5.63604 7.05015C5.24551 6.65962 5.24551 6.02646 5.63604 5.63593C9.15076 2.12121 14.8492 2.12121 18.364 5.63593C18.7545 6.02646 18.7545 6.65962 18.364 7.05015C17.9734 7.44067 17.3403 7.44067 16.9497 7.05015Z"
375
+ }))));
376
+ }
377
+ };
378
+ // components/elements/Button.tsx
379
+ var buttonVariants = (0, import_class_variance_authority.cva)("hawa-inline-flex hawa-items-center hawa-justify-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", {
380
+ variants: {
381
+ variant: {
382
+ default: "hawa-bg-primary hawa-text-primary-foreground hover:hawa-bg-primary/90",
383
+ light: "hawa-bg-primary/20 hawa-text-primary hover:hawa-bg-primary/40",
384
+ destructive: "hawa-bg-destructive hawa-text-destructive-foreground hover:hawa-bg-destructive/90",
385
+ outline: "hawa-border hawa-border-input hawa-bg-transparent hover:hawa-bg-accent hover:hawa-text-accent-foreground",
386
+ secondary: "hawa-bg-secondary hawa-text-secondary-foreground hover:hawa-bg-secondary/80",
387
+ ghost: "hover:hawa-bg-accent hover:hawa-text-accent-foreground",
388
+ link: "hawa-text-primary hawa-underline-offset-4 hover:hawa-underline",
389
+ neoBrutalism: "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"
390
+ },
391
+ size: {
392
+ default: "hawa-h-10 hawa-px-4 hawa-py-2",
393
+ heightless: "hawa-px-4 hawa-py-4",
394
+ xs: "hawa-h-fit hawa-py-1 hawa-text-[10px] hawa-px-2 ",
395
+ sm: "hawa-h-9 hawa-text-[11px] hawa-rounded-md hawa-px-3",
396
+ lg: "hawa-h-11 hawa-rounded-md hawa-px-8",
397
+ xl: "hawa-h-14 hawa-rounded-md hawa-px-10",
398
+ icon: "hawa-h-10 hawa-w-10",
399
+ smallIcon: "hawa-h-7 hawa-w-7"
400
+ }
401
+ },
402
+ defaultVariants: {
403
+ variant: "default",
404
+ size: "default"
405
+ }
406
+ });
407
+ var Button = React2.forwardRef(function(_param, ref) {
408
+ var className = _param.className, variant = _param.variant, size = _param.size, _param_asChild = _param.asChild, asChild = _param_asChild === void 0 ? false : _param_asChild, isLoading = _param.isLoading, children = _param.children, props = _object_without_properties(_param, [
409
+ "className",
410
+ "variant",
411
+ "size",
412
+ "asChild",
413
+ "isLoading",
414
+ "children"
415
+ ]);
416
+ var Comp = "button";
417
+ var loadingColor = variant === "outline" || variant === "ghost" || variant === "neoBrutalism" ? "hawa-bg-primary" : "hawa-bg-primary-foreground";
418
+ return /* @__PURE__ */ React2.createElement(Comp, _object_spread({
419
+ className: cn(buttonVariants({
420
+ variant: variant,
421
+ size: size,
422
+ className: className
423
+ })),
424
+ ref: ref
425
+ }, props), isLoading ? /* @__PURE__ */ React2.createElement(Loading, {
426
+ design: "dots-pulse",
427
+ color: loadingColor,
428
+ size: size === "sm" ? "xs" : "button"
429
+ }) : children);
430
+ });
431
+ Button.displayName = "Button";
432
+ // components/elements/Dialog.tsx
433
+ var React3 = __toESM(require("react"));
434
+ var DialogPrimitive = __toESM(require("@radix-ui/react-dialog"));
435
+ var Dialog = DialogPrimitive.Root;
436
+ var DialogTrigger = DialogPrimitive.Trigger;
437
+ var DialogPortal = function(_param) /* @__PURE__ */ {
438
+ var props = _extends({}, _object_destructuring_empty(_param));
439
+ return React3.createElement(DialogPrimitive.Portal, _object_spread({}, props));
440
+ };
441
+ DialogPortal.displayName = DialogPrimitive.Portal.displayName;
442
+ var DialogOverlay = React3.forwardRef(function(_param, ref) /* @__PURE__ */ {
443
+ var className = _param.className, props = _object_without_properties(_param, [
444
+ "className"
445
+ ]);
446
+ return React3.createElement(DialogPrimitive.Overlay, _object_spread({
447
+ ref: ref,
448
+ className: cn("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", className)
449
+ }, props));
450
+ });
451
+ DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
452
+ var DialogContent = React3.forwardRef(function(_param, ref) /* @__PURE__ */ {
453
+ var className = _param.className, children = _param.children, props = _object_without_properties(_param, [
454
+ "className",
455
+ "children"
456
+ ]);
457
+ return React3.createElement(DialogPortal, null, /* @__PURE__ */ React3.createElement(DialogOverlay, null), /* @__PURE__ */ React3.createElement(DialogPrimitive.Content, _object_spread({
458
+ onPointerDownOutside: function(e) {
459
+ if (props.persist) {
460
+ e.preventDefault();
461
+ }
462
+ },
463
+ ref: ref,
464
+ className: cn("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-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", className)
465
+ }, props), children, /* @__PURE__ */ React3.createElement(DialogPrimitive.Close, {
466
+ className: cn("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", props.dir === "rtl" ? " hawa-left-4" : " hawa-right-4")
467
+ }, /* @__PURE__ */ React3.createElement("svg", {
468
+ "aria-label": "Close Icon",
469
+ "aria-hidden": "true",
470
+ className: "hawa-h-5 hawa-w-5",
471
+ fill: "currentColor",
472
+ viewBox: "0 0 20 20"
473
+ }, /* @__PURE__ */ React3.createElement("path", {
474
+ fillRule: "evenodd",
475
+ 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",
476
+ clipRule: "evenodd"
477
+ })), /* @__PURE__ */ React3.createElement("span", {
478
+ className: "hawa-sr-only"
479
+ }, "Close"))));
480
+ });
481
+ DialogContent.displayName = DialogPrimitive.Content.displayName;
482
+ var DialogHeader = function(_param) /* @__PURE__ */ {
483
+ var className = _param.className, props = _object_without_properties(_param, [
484
+ "className"
485
+ ]);
486
+ return React3.createElement("div", _object_spread({
487
+ className: cn("hawa-flex hawa-flex-col hawa-space-y-1.5 hawa-text-center sm:hawa-text-left", className)
488
+ }, props));
489
+ };
490
+ DialogHeader.displayName = "DialogHeader";
491
+ var DialogTitle = React3.forwardRef(function(_param, ref) /* @__PURE__ */ {
492
+ var className = _param.className, props = _object_without_properties(_param, [
493
+ "className"
494
+ ]);
495
+ return React3.createElement(DialogPrimitive.Title, _object_spread({
496
+ ref: ref,
497
+ className: cn("hawa-text-start hawa-text-lg hawa-font-semibold hawa-leading-none hawa-tracking-tight", className)
498
+ }, props));
499
+ });
500
+ DialogTitle.displayName = DialogPrimitive.Title.displayName;
501
+ var DialogDescription = React3.forwardRef(function(_param, ref) /* @__PURE__ */ {
502
+ var className = _param.className, props = _object_without_properties(_param, [
503
+ "className"
504
+ ]);
505
+ return React3.createElement(DialogPrimitive.Description, _object_spread({
506
+ ref: ref,
507
+ className: cn("hawa-text-start hawa-text-sm hawa-text-muted-foreground", className)
508
+ }, props));
509
+ });
510
+ DialogDescription.displayName = DialogPrimitive.Description.displayName;
511
+ var DialogFooter = function(_param) /* @__PURE__ */ {
512
+ var className = _param.className, props = _object_without_properties(_param, [
513
+ "className"
514
+ ]);
515
+ return React3.createElement("div", _object_spread({
516
+ className: cn("hawa-flex hawa-flex-col-reverse sm:hawa-flex-row sm:hawa-justify-end sm:hawa-gap-2", className)
517
+ }, props));
518
+ };
519
+ DialogFooter.displayName = "DialogFooter";
520
+ // components/elements/Card.tsx
521
+ var React4 = __toESM(require("react"));
522
+ var Card = React4.forwardRef(function(_param, ref) /* @__PURE__ */ {
523
+ var className = _param.className, _param_clickable = _param.clickable, clickable = _param_clickable === void 0 ? false : _param_clickable, props = _object_without_properties(_param, [
524
+ "className",
525
+ "clickable"
526
+ ]);
527
+ return React4.createElement("div", _object_spread({
528
+ ref: ref,
529
+ className: cn("hawa-rounded-lg hawa-border hawa-bg-card hawa-text-card-foreground hawa-shadow-sm", clickable && "hawa-cursor-pointer hawa-transition-all hover:hawa-drop-shadow-md dark:hover:hawa-shadow-dark", className)
530
+ }, props));
531
+ });
532
+ Card.displayName = "Card";
533
+ var CardHeader = React4.forwardRef(function(_param, ref) /* @__PURE__ */ {
534
+ var className = _param.className, props = _object_without_properties(_param, [
535
+ "className"
536
+ ]);
537
+ return React4.createElement("div", _object_spread({
538
+ ref: ref,
539
+ className: cn("hawa-flex hawa-flex-col hawa-space-y-1.5 hawa-p-6", className)
540
+ }, props));
541
+ });
542
+ CardHeader.displayName = "CardHeader";
543
+ var CardTitle = React4.forwardRef(function(_param, ref) /* @__PURE__ */ {
544
+ var className = _param.className, props = _object_without_properties(_param, [
545
+ "className"
546
+ ]);
547
+ return React4.createElement("h3", _object_spread({
548
+ ref: ref,
549
+ className: cn("hawa-text-2xl hawa-font-semibold hawa-leading-none hawa-tracking-tight", className)
550
+ }, props));
551
+ });
552
+ CardTitle.displayName = "CardTitle";
553
+ var CardDescription = React4.forwardRef(function(_param, ref) /* @__PURE__ */ {
554
+ var className = _param.className, props = _object_without_properties(_param, [
555
+ "className"
556
+ ]);
557
+ return React4.createElement("p", _object_spread({
558
+ ref: ref,
559
+ className: cn("hawa-text-sm hawa-text-muted-foreground", className)
560
+ }, props));
561
+ });
562
+ CardDescription.displayName = "CardDescription";
563
+ var CardContent = React4.forwardRef(function(_param, ref) /* @__PURE__ */ {
564
+ var headless = _param.headless, className = _param.className, props = _object_without_properties(_param, [
565
+ "headless",
566
+ "className"
567
+ ]);
568
+ return React4.createElement("div", _object_spread({
569
+ ref: ref,
570
+ className: cn("hawa-p-6", headless ? "hawa-pt-6" : "hawa-pt-0", className)
571
+ }, props));
572
+ });
573
+ CardContent.displayName = "CardContent";
574
+ var CardFooter = React4.forwardRef(function(_param, ref) /* @__PURE__ */ {
575
+ var className = _param.className, props = _object_without_properties(_param, [
576
+ "className"
577
+ ]);
578
+ return React4.createElement("div", _object_spread({
579
+ ref: ref,
580
+ className: cn("hawa-flex hawa-items-center hawa-p-6 hawa-pt-0", className)
581
+ }, props));
582
+ });
583
+ CardFooter.displayName = "CardFooter";
584
+ // components/elements/Breadcrumb.tsx
585
+ var import_react2 = __toESM(require("react"));
586
+ var Breadcrumb = function(param) {
587
+ var breadcrumbLinks = param.breadcrumbLinks, _param_separator = param.separator, separator = _param_separator === void 0 ? ">" : _param_separator;
588
+ return /* @__PURE__ */ import_react2.default.createElement("div", {
589
+ className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-2 hawa-text-sm"
590
+ }, breadcrumbLinks.map(function(singleBreadcrumbLink, index) {
591
+ return /* @__PURE__ */ import_react2.default.createElement("div", {
592
+ className: "hawa-flex hawa-flex-row hawa-items-center hawa-justify-center hawa-gap-2"
593
+ }, /* @__PURE__ */ import_react2.default.createElement("a", {
594
+ href: singleBreadcrumbLink.href,
595
+ className: index + 1 === breadcrumbLinks.length ? "hawa-pointer-events-none" : "hawa-underline-offset-4 hawa-transition-all hover:hawa-text-primary hover:hawa-underline hover:hawa-decoration-2"
596
+ }, singleBreadcrumbLink.label), index != breadcrumbLinks.length - 1 ? typeof separator == "string" ? /* @__PURE__ */ import_react2.default.createElement("div", null, separator) : /* @__PURE__ */ import_react2.default.createElement("div", null, separator) : null);
597
+ }));
598
+ };
599
+ // components/elements/Tooltip.tsx
600
+ var import_react3 = __toESM(require("react"));
601
+ var TooltipPrimitive = __toESM(require("@radix-ui/react-tooltip"));
602
+ var TooltipContent = import_react3.default.forwardRef(function(_param, ref) /* @__PURE__ */ {
603
+ var className = _param.className, _param_sideOffset = _param.sideOffset, sideOffset = _param_sideOffset === void 0 ? 4 : _param_sideOffset, props = _object_without_properties(_param, [
604
+ "className",
605
+ "sideOffset"
606
+ ]);
607
+ return import_react3.default.createElement(TooltipPrimitive.Content, _object_spread({
608
+ ref: ref,
609
+ sideOffset: sideOffset,
610
+ className: cn("hawa-z-50 hawa-overflow-hidden hawa-rounded-md hawa-border hawa-bg-popover hawa-px-3 hawa-py-1.5 hawa-text-sm hawa-text-popover-foreground hawa-shadow-md hawa-animate-in hawa-fade-in-0 hawa-zoom-in-95 data-[state=closed]:hawa-animate-out data-[state=closed]:hawa-fade-out-0 data-[state=closed]:hawa-zoom-out-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", className)
611
+ }, props));
612
+ });
613
+ TooltipContent.displayName = TooltipPrimitive.Content.displayName;
614
+ var TooltipArrow = import_react3.default.forwardRef(function(_param, ref) /* @__PURE__ */ {
615
+ var className = _param.className, props = _object_without_properties(_param, [
616
+ "className"
617
+ ]);
618
+ return import_react3.default.createElement(TooltipPrimitive.Arrow, _object_spread({
619
+ ref: ref,
620
+ className: cn(className)
621
+ }, props));
622
+ });
623
+ TooltipArrow.displayName = TooltipPrimitive.Arrow.displayName;
624
+ var Tooltip = function(_param) {
625
+ var side = _param.side, open = _param.open, content = _param.content, children = _param.children, defaultOpen = _param.defaultOpen, onOpenChange = _param.onOpenChange, _param_delayDuration = _param.delayDuration, delayDuration = _param_delayDuration === void 0 ? 300 : _param_delayDuration, props = _object_without_properties(_param, [
626
+ "side",
627
+ "open",
628
+ "content",
629
+ "children",
630
+ "defaultOpen",
631
+ "onOpenChange",
632
+ "delayDuration"
633
+ ]);
634
+ return /* @__PURE__ */ import_react3.default.createElement(TooltipPrimitive.TooltipProvider, {
635
+ delayDuration: delayDuration
636
+ }, /* @__PURE__ */ import_react3.default.createElement(TooltipPrimitive.Root, {
637
+ open: open,
638
+ defaultOpen: defaultOpen,
639
+ onOpenChange: onOpenChange
640
+ }, /* @__PURE__ */ import_react3.default.createElement(TooltipPrimitive.Trigger, {
641
+ asChild: true
642
+ }, children), /* @__PURE__ */ import_react3.default.createElement(TooltipContent, _object_spread({
643
+ side: side,
644
+ align: "center"
645
+ }, props), content)));
646
+ };
647
+ // components/elements/CodeBlock.tsx
648
+ var import_react5 = __toESM(require("react"));
649
+ // components/hooks/useClipboard.ts
650
+ var import_react4 = require("react");
651
+ function useClipboard() {
652
+ var _ref = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, _ref_timeout = _ref.timeout, timeout = _ref_timeout === void 0 ? 2e3 : _ref_timeout;
653
+ var _ref1 = _sliced_to_array((0, import_react4.useState)(null), 2), error = _ref1[0], setError = _ref1[1];
654
+ var _ref2 = _sliced_to_array((0, import_react4.useState)(false), 2), copied = _ref2[0], setCopied = _ref2[1];
655
+ var _ref3 = _sliced_to_array((0, import_react4.useState)(null), 2), copyTimeout = _ref3[0], setCopyTimeout = _ref3[1];
656
+ var handleCopyResult = function(value) {
657
+ clearTimeout(copyTimeout);
658
+ setCopyTimeout(setTimeout(function() {
659
+ return setCopied(false);
660
+ }, timeout));
661
+ setCopied(value);
662
+ };
663
+ var copy = function(valueToCopy) {
664
+ if ("clipboard" in navigator) {
665
+ navigator.clipboard.writeText(valueToCopy).then(function() {
666
+ return handleCopyResult(true);
667
+ }).catch(function(err) {
668
+ return setError(err);
669
+ });
670
+ } else {
671
+ setError(new Error("useClipboard: navigator.clipboard is not supported"));
672
+ }
673
+ };
674
+ var reset = function() {
675
+ setCopied(false);
676
+ setError(null);
677
+ clearTimeout(copyTimeout);
678
+ };
679
+ return {
680
+ copy: copy,
681
+ reset: reset,
682
+ error: error,
683
+ copied: copied
684
+ };
685
+ }
686
+ // components/elements/CodeBlock.tsx
687
+ var CodeBlock = function(param) {
688
+ var tabs = param.tabs, code = param.code, fileName = param.fileName, _param_width = param.width, width = _param_width === void 0 ? "full" : _param_width;
689
+ var clipboard = useClipboard();
690
+ var _ref = _sliced_to_array((0, import_react5.useState)(0), 2), selectedTab = _ref[0], setSelectedTab = _ref[1];
691
+ var widthStyles = {
692
+ full: "hawa-w-full",
693
+ md: "hawa-w-full hawa-max-w-md",
694
+ sm: "hawa-w-full hawa-max-w-sm",
695
+ xs: "hawa-w-full hawa-max-w-xs"
696
+ };
697
+ return /* @__PURE__ */ import_react5.default.createElement("div", {
698
+ className: cn(widthStyles[width], "hawa-w-full hawa-flex-col hawa-items-center hawa-rounded hawa-bg-background hawa-text-left hawa-text-white sm:hawa-text-base")
699
+ }, tabs && /* @__PURE__ */ import_react5.default.createElement("div", {
700
+ className: "hawa-flex hawa-flex-row hawa-gap-2 hawa-rounded-t hawa-bg-gray-200 dark:hawa-bg-muted hawa-p-2 hawa-pb-0 hawa-text-foreground hawa-font-mono "
701
+ }, tabs.map(function(tab, i) {
702
+ return /* @__PURE__ */ import_react5.default.createElement("div", {
703
+ className: cn(selectedTab === i ? " hawa-border-b-2 hawa-border-primary" : "hawa-bg-transparent")
704
+ }, /* @__PURE__ */ import_react5.default.createElement("div", {
705
+ onClick: function() {
706
+ return setSelectedTab(i);
707
+ },
708
+ className: cn("hawa-mb-1 hawa-transition-all hawa-w-full hawa-max-w-[52px] hawa-cursor-pointer hawa-rounded-inner hawa-p-2 hawa-py-1 hawa-text-center hawa-text-[1rem] hover:hawa-bg-muted-foreground/20")
709
+ }, tab.title));
710
+ })), fileName && /* @__PURE__ */ import_react5.default.createElement("div", {
711
+ className: "hawa-flex hawa-flex-row hawa-gap-2 hawa-rounded-t hawa-bg-gray-200 dark:hawa-bg-muted hawa-p-2 hawa-pb-0 hawa-text-foreground hawa-font-mono"
712
+ }, /* @__PURE__ */ import_react5.default.createElement("div", {
713
+ className: cn("hawa-mb-1 hawa-w-full hawa-max-w-[52px] hawa-rounded-inner hawa-p-2 hawa-py-1 hawa-text-center hawa-text-[1rem]")
714
+ }, fileName)), /* @__PURE__ */ import_react5.default.createElement("pre", null, /* @__PURE__ */ import_react5.default.createElement("code", {
715
+ className: cn("hawa-relative hawa-flex hawa-w-full hawa-flex-row hawa-items-start hawa-justify-between hawa-p-0 hawa-text-left hawa-text-sm sm:hawa-text-base hawa-bg-gray-300 ", tabs || fileName ? "hawa-rounded-b hawa-rounded-t-none" : "hawa-rounded")
716
+ }, /* @__PURE__ */ import_react5.default.createElement("div", {
717
+ className: "hawa-flex hawa-min-h-[37.75px] hawa-w-full hawa-flex-row hawa-justify-start hawa-overflow-auto hawa-p-4 hawa-text-foreground hawa-bg-background/70 hawa-font-mono "
718
+ }, tabs ? tabs[selectedTab].code : code), /* @__PURE__ */ import_react5.default.createElement("div", {
719
+ className: "hawa-absolute hawa-right-0 hawa-flex hawa-w-fit hawa-flex-row hawa-items-center hawa-gap-2 hawa-p-2"
720
+ }, /* @__PURE__ */ import_react5.default.createElement(Tooltip, {
721
+ open: clipboard.copied,
722
+ side: "left",
723
+ content: /* @__PURE__ */ import_react5.default.createElement("div", null, "Copied!")
724
+ }, /* @__PURE__ */ import_react5.default.createElement(Button, {
725
+ size: "icon",
726
+ onClick: function() {
727
+ return clipboard.copy(tabs ? tabs[selectedTab].code : code);
728
+ },
729
+ variant: "outline",
730
+ className: "hawa-opacity-50 sm:hawa-opacity-100 hawa-text-foreground"
731
+ }, /* @__PURE__ */ import_react5.default.createElement("svg", {
732
+ "aria-label": "Copy Icon",
733
+ stroke: "currentColor",
734
+ fill: "none",
735
+ strokeWidth: "2",
736
+ viewBox: "0 0 24 24",
737
+ strokeLinecap: "round",
738
+ strokeLinejoin: "round",
739
+ height: "1em",
740
+ width: "1em"
741
+ }, /* @__PURE__ */ import_react5.default.createElement("rect", {
742
+ width: "14",
743
+ height: "14",
744
+ x: "8",
745
+ y: "8",
746
+ rx: "2",
747
+ ry: "2"
748
+ }), /* @__PURE__ */ import_react5.default.createElement("path", {
749
+ d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"
750
+ }))))))));
751
+ };
752
+ // components/elements/Checkbox.tsx
753
+ var React8 = __toESM(require("react"));
754
+ var CheckboxPrimitive = __toESM(require("@radix-ui/react-checkbox"));
755
+ var Checkbox = function(_param) {
756
+ var id = _param.id, label = _param.label, sublabel = _param.sublabel, helperText = _param.helperText, checkboxProps = _object_without_properties(_param, [
757
+ "id",
758
+ "label",
759
+ "sublabel",
760
+ "helperText"
761
+ ]);
762
+ return /* @__PURE__ */ React8.createElement("div", {
763
+ className: "hawa-items-top hawa-flex hawa-gap-2 "
764
+ }, /* @__PURE__ */ React8.createElement(CheckboxElement, _object_spread({
765
+ id: id
766
+ }, checkboxProps)), (label || helperText) && /* @__PURE__ */ React8.createElement("div", {
767
+ className: "hawa-grid hawa-gap-1.5 hawa-leading-none"
768
+ }, label && /* @__PURE__ */ React8.createElement("label", {
769
+ role: "checkbox",
770
+ htmlFor: id,
771
+ className: cn("hawa-cursor-pointer hawa-select-none hawa-text-sm hawa-font-medium hawa-leading-none hawa-pt-0.5", checkboxProps.disabled && "hawa-cursor-not-allowed hawa-text-muted-foreground hawa-opacity-70 ")
772
+ }, label), sublabel && /* @__PURE__ */ React8.createElement("label", {
773
+ role: "checkbox",
774
+ htmlFor: id,
775
+ className: cn("hawa-cursor-pointer hawa-select-none hawa-text-sm hawa-text-muted-foreground", checkboxProps.disabled && "hawa-cursor-not-allowed hawa-text-muted-foreground hawa-opacity-70")
776
+ }, sublabel), helperText && !checkboxProps.disabled && /* @__PURE__ */ React8.createElement("label", {
777
+ role: "checkbox",
778
+ htmlFor: id,
779
+ className: cn("hawa-select-none hawa-text-xs hawa-text-red-500", checkboxProps.disabled && "hawa-cursor-not-allowed hawa-opacity-70")
780
+ }, helperText)));
781
+ };
782
+ var CheckboxElement = React8.forwardRef(function(_param, ref) /* @__PURE__ */ {
783
+ var className = _param.className, props = _object_without_properties(_param, [
784
+ "className"
785
+ ]);
786
+ return React8.createElement(CheckboxPrimitive.Root, _object_spread({
787
+ ref: ref,
788
+ className: cn("hawa-peer hawa-h-4 hawa-w-4 hawa-shrink-0 hawa-rounded-sm 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", className)
789
+ }, props), /* @__PURE__ */ React8.createElement(CheckboxPrimitive.Indicator, {
790
+ className: cn("hawa-flex hawa-items-center hawa-justify-center hawa-text-current")
791
+ }, /* @__PURE__ */ React8.createElement("svg", {
792
+ "aria-label": "Check Mark",
793
+ stroke: "currentColor",
794
+ fill: "currentColor",
795
+ strokeWidth: "0",
796
+ viewBox: "0 0 512 512",
797
+ height: "0.60em",
798
+ width: "0.60em"
799
+ }, /* @__PURE__ */ React8.createElement("path", {
800
+ 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"
801
+ })), " "));
802
+ });
803
+ CheckboxElement.displayName = CheckboxPrimitive.Root.displayName;
804
+ // components/elements/Toast.tsx
805
+ var React9 = __toESM(require("react"));
806
+ var ToastPrimitives = __toESM(require("@radix-ui/react-toast"));
807
+ var import_class_variance_authority2 = require("class-variance-authority");
808
+ var toastVariants = (0, import_class_variance_authority2.cva)("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full", {
809
+ variants: {
810
+ variant: {
811
+ default: "border bg-background text-foreground",
812
+ destructive: "destructive group border-destructive bg-destructive text-destructive-foreground"
813
+ },
814
+ severity: {
815
+ info: "info group text-info-foreground bg-info",
816
+ warning: "warning group text-warning-foreground bg-warning",
817
+ error: "error group border-error bg-error text-error-foreground",
818
+ success: "success group text-success-foreground bg-success",
819
+ none: ""
820
+ }
821
+ },
822
+ defaultVariants: {
823
+ variant: "default"
824
+ }
825
+ });
826
+ var ToastProvider = ToastPrimitives.Provider;
827
+ var ToastViewport = React9.forwardRef(function(_param, ref) /* @__PURE__ */ {
828
+ var className = _param.className, props = _object_without_properties(_param, [
829
+ "className"
830
+ ]);
831
+ return React9.createElement(ToastPrimitives.Viewport, _object_spread({
832
+ ref: ref,
833
+ className: cn("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]", className)
834
+ }, props));
835
+ });
836
+ ToastViewport.displayName = ToastPrimitives.Viewport.displayName;
837
+ var Toast = React9.forwardRef(function(_param, ref) {
838
+ var className = _param.className, variant = _param.variant, _param_severity = _param.severity, severity = _param_severity === void 0 ? "none" : _param_severity, direction = _param.direction, props = _object_without_properties(_param, [
839
+ "className",
840
+ "variant",
841
+ "severity",
842
+ "direction"
843
+ ]);
844
+ return /* @__PURE__ */ React9.createElement(ToastPrimitives.Root, _object_spread({
845
+ ref: ref,
846
+ className: cn(toastVariants({
847
+ variant: variant,
848
+ severity: severity
849
+ }), className, direction === "rtl" ? "p-6 pl-0 pr-10 data-[state=closed]:slide-out-to-left-full" : "p-6 pr-8 data-[state=closed]:slide-out-to-right-full"),
850
+ dir: direction
851
+ }, props));
852
+ });
853
+ Toast.displayName = ToastPrimitives.Root.displayName;
854
+ var ToastAction = React9.forwardRef(function(_param, ref) {
855
+ var className = _param.className, props = _object_without_properties(_param, [
856
+ "className"
857
+ ]);
858
+ return /* @__PURE__ */ React9.createElement(ToastPrimitives.Action, _object_spread({
859
+ ref: ref,
860
+ className: cn("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50", "group-[.info]:border-muted/40 group-[.info]:hover:border-info/30 group-[.info]:hover:bg-info group-[.info]:hover:text-info-foreground group-[.info]:focus:ring-info", "group-[.error]:border-muted/40 group-[.error]:hover:border-error/30 group-[.error]:hover:bg-error group-[.error]:hover:text-error-foreground group-[.error]:focus:ring-error", "group-[.success]:border-muted/40 group-[.success]:hover:border-success/30 group-[.success]:hover:bg-success group-[.success]:hover:text-success-foreground group-[.success]:focus:ring-success", "group-[.warning]:border-muted/40 group-[.warning]:hover:border-warning/30 group-[.warning]:hover:bg-warning group-[.warning]:hover:text-warning-foreground group-[.warning]:focus:ring-warning", className)
861
+ }, props));
862
+ });
863
+ ToastAction.displayName = ToastPrimitives.Action.displayName;
864
+ var ToastClose = React9.forwardRef(function(_param, ref) /* @__PURE__ */ {
865
+ var className = _param.className, props = _object_without_properties(_param, [
866
+ "className"
867
+ ]);
868
+ return React9.createElement(ToastPrimitives.Close, _object_spread({
869
+ ref: ref,
870
+ className: cn("absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600", className),
871
+ "toast-close": ""
872
+ }, props), /* @__PURE__ */ React9.createElement("svg", {
873
+ "aria-label": "Close Icon",
874
+ "aria-hidden": "true",
875
+ className: "h-4 w-4",
876
+ fill: "currentColor",
877
+ viewBox: "0 0 20 20"
878
+ }, /* @__PURE__ */ React9.createElement("path", {
879
+ fillRule: "evenodd",
880
+ 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",
881
+ clipRule: "evenodd"
882
+ })));
883
+ });
884
+ ToastClose.displayName = ToastPrimitives.Close.displayName;
885
+ var ToastTitle = React9.forwardRef(function(_param, ref) /* @__PURE__ */ {
886
+ var className = _param.className, props = _object_without_properties(_param, [
887
+ "className"
888
+ ]);
889
+ return React9.createElement(ToastPrimitives.Title, _object_spread({
890
+ ref: ref,
891
+ className: cn("text-sm font-semibold", className)
892
+ }, props));
893
+ });
894
+ ToastTitle.displayName = ToastPrimitives.Title.displayName;
895
+ var ToastDescription = React9.forwardRef(function(_param, ref) /* @__PURE__ */ {
896
+ var className = _param.className, props = _object_without_properties(_param, [
897
+ "className"
898
+ ]);
899
+ return React9.createElement(ToastPrimitives.Description, _object_spread({
900
+ ref: ref,
901
+ className: cn("text-sm opacity-90", className)
902
+ }, props));
903
+ });
904
+ ToastDescription.displayName = ToastPrimitives.Description.displayName;
905
+ // components/elements/Toaster.tsx
906
+ var import_react6 = __toESM(require("react"));
907
+ // components/hooks/useToast.ts
908
+ var React10 = __toESM(require("react"));
909
+ var TOAST_LIMIT = 5;
910
+ var TOAST_REMOVE_DELAY = 1e5;
911
+ var count = 0;
912
+ function genId() {
913
+ count = (count + 1) % Number.MAX_VALUE;
914
+ return count.toString();
915
+ }
916
+ var toastTimeouts = /* @__PURE__ */ new Map();
917
+ var addToRemoveQueue = function(toastId) {
918
+ if (toastTimeouts.has(toastId)) {
919
+ return;
920
+ }
921
+ var timeout = setTimeout(function() {
922
+ toastTimeouts.delete(toastId);
923
+ dispatch({
924
+ type: "REMOVE_TOAST",
925
+ toastId: toastId
926
+ });
927
+ }, TOAST_REMOVE_DELAY);
928
+ toastTimeouts.set(toastId, timeout);
929
+ };
930
+ var reducer = function(state, action) {
931
+ switch(action.type){
932
+ case "ADD_TOAST":
933
+ return _object_spread_props(_object_spread({}, state), {
934
+ toasts: [
935
+ action.toast
936
+ ].concat(_to_consumable_array(state.toasts)).slice(0, TOAST_LIMIT)
937
+ });
938
+ case "UPDATE_TOAST":
939
+ return _object_spread_props(_object_spread({}, state), {
940
+ toasts: state.toasts.map(function(t) {
941
+ return t.id === action.toast.id ? _object_spread({}, t, action.toast) : t;
942
+ })
943
+ });
944
+ case "DISMISS_TOAST":
945
+ {
946
+ var toastId = action.toastId;
947
+ if (toastId) {
948
+ addToRemoveQueue(toastId);
949
+ } else {
950
+ state.toasts.forEach(function(toast2) {
951
+ addToRemoveQueue(toast2.id);
952
+ });
953
+ }
954
+ return _object_spread_props(_object_spread({}, state), {
955
+ toasts: state.toasts.map(function(t) {
956
+ return t.id === toastId || toastId === void 0 ? _object_spread_props(_object_spread({}, t), {
957
+ open: false
958
+ }) : t;
959
+ })
960
+ });
961
+ }
962
+ case "REMOVE_TOAST":
963
+ if (action.toastId === void 0) {
964
+ return _object_spread_props(_object_spread({}, state), {
965
+ toasts: []
966
+ });
967
+ }
968
+ return _object_spread_props(_object_spread({}, state), {
969
+ toasts: state.toasts.filter(function(t) {
970
+ return t.id !== action.toastId;
971
+ })
972
+ });
973
+ }
974
+ };
975
+ var listeners = [];
976
+ var memoryState = {
977
+ toasts: []
978
+ };
979
+ function dispatch(action) {
980
+ memoryState = reducer(memoryState, action);
981
+ listeners.forEach(function(listener) {
982
+ listener(memoryState);
983
+ });
984
+ }
985
+ function toast(_param) {
986
+ var props = _extends({}, _object_destructuring_empty(_param));
987
+ var id = genId();
988
+ var update = function(props2) {
989
+ return dispatch({
990
+ type: "UPDATE_TOAST",
991
+ toast: _object_spread_props(_object_spread({}, props2), {
992
+ id: id
993
+ })
994
+ });
995
+ };
996
+ var dismiss = function() {
997
+ return dispatch({
998
+ type: "DISMISS_TOAST",
999
+ toastId: id
1000
+ });
1001
+ };
1002
+ dispatch({
1003
+ type: "ADD_TOAST",
1004
+ toast: _object_spread_props(_object_spread({}, props), {
1005
+ id: id,
1006
+ open: true,
1007
+ onOpenChange: function(open) {
1008
+ if (!open) dismiss();
1009
+ }
1010
+ })
1011
+ });
1012
+ return {
1013
+ id: id,
1014
+ dismiss: dismiss,
1015
+ update: update
1016
+ };
1017
+ }
1018
+ function useToast() {
1019
+ var _React10_useState = _sliced_to_array(React10.useState(memoryState), 2), state = _React10_useState[0], setState = _React10_useState[1];
1020
+ React10.useEffect(function() {
1021
+ listeners.push(setState);
1022
+ return function() {
1023
+ var index = listeners.indexOf(setState);
1024
+ if (index > -1) {
1025
+ listeners.splice(index, 1);
1026
+ }
1027
+ };
1028
+ }, [
1029
+ state
1030
+ ]);
1031
+ return _object_spread_props(_object_spread({}, state), {
1032
+ toast: toast,
1033
+ dismiss: function(toastId) {
1034
+ return dispatch({
1035
+ type: "DISMISS_TOAST",
1036
+ toastId: toastId
1037
+ });
1038
+ }
1039
+ });
1040
+ }
1041
+ // components/elements/Toaster.tsx
1042
+ function Toaster(props) {
1043
+ var toasts = useToast().toasts;
1044
+ var isRTL = props.direction === "rtl";
1045
+ return /* @__PURE__ */ import_react6.default.createElement(ToastProvider, {
1046
+ swipeDirection: isRTL ? "left" : "right"
1047
+ }, toasts.map(function(_param) {
1048
+ var id = _param.id, title = _param.title, description = _param.description, action = _param.action, toastProps = _object_without_properties(_param, [
1049
+ "id",
1050
+ "title",
1051
+ "description",
1052
+ "action"
1053
+ ]);
1054
+ return /* @__PURE__ */ import_react6.default.createElement(Toast, _object_spread({
1055
+ direction: props.direction,
1056
+ key: id
1057
+ }, toastProps), /* @__PURE__ */ import_react6.default.createElement("div", {
1058
+ className: "grid gap-1 text-start"
1059
+ }, title && /* @__PURE__ */ import_react6.default.createElement(ToastTitle, null, title), description && /* @__PURE__ */ import_react6.default.createElement(ToastDescription, null, description)), action, /* @__PURE__ */ import_react6.default.createElement(ToastClose, null));
1060
+ }), /* @__PURE__ */ import_react6.default.createElement(ToastViewport, {
1061
+ className: cn("gap-2", isRTL && "fixed left-0")
1062
+ }));
1063
+ }
1064
+ // components/elements/Switch.tsx
1065
+ var React12 = __toESM(require("react"));
1066
+ var SwitchPrimitives = __toESM(require("@radix-ui/react-switch"));
1067
+ var rootSize = {
1068
+ default: "hawa-h-[25px] hawa-w-[42px]",
1069
+ sm: "hawa-h-[20px] hawa-w-[37px]",
1070
+ lg: "hawa-h-[30px] hawa-w-[47px]"
1071
+ };
1072
+ var thumbSize = {
1073
+ default: "hawa-h-[21px] hawa-w-[21px]",
1074
+ sm: "hawa-h-[16px] hawa-w-[16px]",
1075
+ lg: "hawa-h-[26px] hawa-w-[26px]"
1076
+ };
1077
+ var Switch = React12.forwardRef(function(_param, ref) {
1078
+ var className = _param.className, _param_size = _param.size, size = _param_size === void 0 ? "default" : _param_size, label = _param.label, props = _object_without_properties(_param, [
1079
+ "className",
1080
+ "size",
1081
+ "label"
1082
+ ]);
1083
+ var _React12_useState = _sliced_to_array(React12.useState(null), 2), parentDirection = _React12_useState[0], setParentDirection = _React12_useState[1];
1084
+ var parentRef = React12.useRef(null);
1085
+ React12.useEffect(function() {
1086
+ var _parentRef_current;
1087
+ var parentNode = (_parentRef_current = parentRef.current) === null || _parentRef_current === void 0 ? void 0 : _parentRef_current.parentNode;
1088
+ if (parentNode) {
1089
+ var dir = window.getComputedStyle(parentNode).direction;
1090
+ setParentDirection(dir);
1091
+ }
1092
+ });
1093
+ return /* @__PURE__ */ React12.createElement("div", {
1094
+ className: "hawa-flex hawa-flex-row hawa-items-center",
1095
+ ref: parentRef
1096
+ }, /* @__PURE__ */ React12.createElement(SwitchPrimitives.Root, _object_spread_props(_object_spread({
1097
+ className: cn("hawa-relative hawa-cursor-pointer hawa-rounded-full hawa-bg-primary/20 hawa-outline-none data-[state=checked]:hawa-bg-primary", className, rootSize[size])
1098
+ }, props), {
1099
+ ref: ref
1100
+ }), /* @__PURE__ */ React12.createElement(SwitchPrimitives.Thumb, {
1101
+ className: cn(thumbSize[size], "hawa-block hawa-rounded-full hawa-bg-white hawa-transition-transform hawa-duration-100 hawa-will-change-transform data-[state=checked]:hawa-bg-primary-foreground dark:hawa-bg-background", 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]")
1102
+ })), label && /* @__PURE__ */ React12.createElement("span", {
1103
+ className: "hawa-mx-2 hawa-text-sm hawa-font-medium hawa-text-gray-900 dark:hawa-text-gray-300"
1104
+ }, label));
1105
+ });
1106
+ Switch.displayName = SwitchPrimitives.Root.displayName;
1107
+ // components/elements/Radio.tsx
1108
+ var import_react7 = __toESM(require("react"));
1109
+ var Radio = function(_param) {
1110
+ var _param_design = _param.design, design = _param_design === void 0 ? "default" : _param_design, _param_width = _param.width, width = _param_width === void 0 ? "default" : _param_width, _param_orientation = _param.orientation, orientation = _param_orientation === void 0 ? "horizontal" : _param_orientation, props = _object_without_properties(_param, [
1111
+ "design",
1112
+ "width",
1113
+ "orientation"
1114
+ ]);
1115
+ var _ref = _sliced_to_array((0, import_react7.useState)(props.defaultValue), 2), selectedOption = _ref[0], setSelectedOption = _ref[1];
1116
+ var activeTabStyle = "hawa-inline-block hawa-py-2 hawa-px-4 hawa-w-full hawa-text-primary-foreground hawa-bg-primary hawa-active dark:hawa-bg-primary ";
1117
+ var inactiveTabStyle = "hawa-inline-block hawa-py-2 hawa-px-4 hawa-w-full hawa-transition-all hover:hawa-bg-primary/10 dark:hawa-bg-background hawa-bg-primary/5 hover:hawa-text-gray-900 dark:hover:hawa-bg-primary/10 dark:hover:hawa-text-white dark:hawa-bg-primary/5";
1118
+ var orientationStyle = {
1119
+ horizontal: "hawa-flex hawa-flex-row",
1120
+ vertical: "hawa-flex hawa-flex-col"
1121
+ };
1122
+ var widthStyle = {
1123
+ default: "hawa-max-w-fit",
1124
+ full: "hawa-w-full"
1125
+ };
1126
+ var _import_react7_default_useState = _sliced_to_array(import_react7.default.useState(null), 2), parentDirection = _import_react7_default_useState[0], setParentDirection = _import_react7_default_useState[1];
1127
+ var parentRef = (0, import_react7.useRef)(null);
1128
+ (0, import_react7.useEffect)(function() {
1129
+ var _parentRef_current;
1130
+ var parentNode = (_parentRef_current = parentRef.current) === null || _parentRef_current === void 0 ? void 0 : _parentRef_current.parentNode;
1131
+ if (parentNode) {
1132
+ var dir = window.getComputedStyle(parentNode).direction;
1133
+ setParentDirection(dir);
1134
+ }
1135
+ });
1136
+ switch(design){
1137
+ case "tabs":
1138
+ var _props_options, _props_options1;
1139
+ return /* @__PURE__ */ import_react7.default.createElement("ul", {
1140
+ ref: parentRef,
1141
+ className: cn(props.options && ((_props_options = props.options) === null || _props_options === void 0 ? void 0 : _props_options.length) > 2 ? "hawa-flex-wrap xs:hawa-max-w-full xs:hawa-flex-nowrap" : "", "hawa-select-none hawa-whitespace-nowrap hawa-rounded hawa-border hawa-text-center hawa-text-sm hawa-font-medium", widthStyle[width], orientationStyle[orientation])
1142
+ }, (_props_options1 = props.options) === null || _props_options1 === void 0 ? void 0 : _props_options1.map(function(opt, o) {
1143
+ return /* @__PURE__ */ import_react7.default.createElement("li", {
1144
+ "aria-current": "page",
1145
+ onClick: function() {
1146
+ setSelectedOption(opt.value);
1147
+ props.onChangeTab(opt.value);
1148
+ },
1149
+ className: cn("hawa-w-full hawa-cursor-pointer ", orientation === "horizontal" && parentDirection === "ltr" && "hawa-rounded-none first:hawa-rounded-l last:hawa-rounded-r", orientation === "horizontal" && parentDirection === "rtl" && "hawa-rounded-none first:hawa-rounded-r last:hawa-rounded-l", orientation === "vertical" && "hawa-rounded-none first:hawa-rounded-t last:hawa-rounded-b", "hawa-last hawa-flex hawa-flex-row hawa-items-center hawa-justify-center hawa-gap-2 ", selectedOption === opt.value ? activeTabStyle : inactiveTabStyle),
1150
+ key: o
1151
+ }, opt.icon && opt.icon, opt.label);
1152
+ }));
1153
+ case "bordered":
1154
+ return /* @__PURE__ */ import_react7.default.createElement("div", {
1155
+ className: cn(orientationStyle[orientation], "hawa-gap-4")
1156
+ }, props.options && props.options.map(function(opt, i) {
1157
+ return /* @__PURE__ */ import_react7.default.createElement("div", {
1158
+ className: "hawa-rounded hawa-border hawa-border-gray-200 "
1159
+ }, /* @__PURE__ */ import_react7.default.createElement("div", {
1160
+ className: "radio-item radio-item-bordered hawa-flex hawa-items-center hawa-transition-all",
1161
+ key: i + 1
1162
+ }, /* @__PURE__ */ import_react7.default.createElement("input", {
1163
+ disabled: opt.disabled,
1164
+ id: opt.value.toString(),
1165
+ type: "radio",
1166
+ value: opt.value,
1167
+ name: "bordered-radio"
1168
+ }), /* @__PURE__ */ import_react7.default.createElement("label", {
1169
+ htmlFor: opt.value.toString(),
1170
+ className: cn("hawa-ml-2 hawa-w-full hawa-p-4 hawa-pl-3 hawa-text-sm hawa-font-medium dark:hawa-text-white", opt.disabled ? "hawa-opacity-50" : "hawa-cursor-pointer hawa-text-gray-900")
1171
+ }, opt.label)));
1172
+ }));
1173
+ case "cards":
1174
+ var _props_options2;
1175
+ return /* @__PURE__ */ import_react7.default.createElement("ul", {
1176
+ className: cn(orientationStyle[orientation], "hawa-gap-4")
1177
+ }, (_props_options2 = props.options) === null || _props_options2 === void 0 ? void 0 : _props_options2.map(function(opt, o) {
1178
+ return /* @__PURE__ */ import_react7.default.createElement("li", null, /* @__PURE__ */ import_react7.default.createElement("input", {
1179
+ type: "radio",
1180
+ id: opt.value.toString(),
1181
+ name: "cards-radio",
1182
+ value: opt.value.toString(),
1183
+ className: "hawa-peer hawa-hidden",
1184
+ required: true,
1185
+ disabled: opt.disabled
1186
+ }), /* @__PURE__ */ import_react7.default.createElement("label", {
1187
+ htmlFor: opt.value.toString(),
1188
+ className: cn("hawa-inline-flex hawa-h-full hawa-w-full hawa-items-center hawa-justify-between hawa-rounded-lg hawa-border hawa-border-gray-200 hawa-bg-white hawa-p-5 hawa-text-gray-500 peer-checked:hawa-border-blue-600 peer-checked:hawa-text-blue-600 dark:hawa-border-gray-700 dark:hawa-bg-gray-800 dark:hawa-text-gray-400 dark:peer-checked:hawa-text-primary", opt.disabled ? "hawa-opacity-50" : "hawa-cursor-pointer hover:hawa-bg-gray-100 hover:hawa-text-gray-600 dark:hover:hawa-bg-gray-700 dark:hover:hawa-text-gray-300")
1189
+ }, /* @__PURE__ */ import_react7.default.createElement("div", {
1190
+ className: "hawa-block hawa-h-full hawa-w-full"
1191
+ }, /* @__PURE__ */ import_react7.default.createElement("div", {
1192
+ className: "hawa-w-full hawa-text-lg hawa-font-semibold"
1193
+ }, opt.label), /* @__PURE__ */ import_react7.default.createElement("div", {
1194
+ className: "hawa-w-full"
1195
+ }, opt.sublabel))));
1196
+ }));
1197
+ default:
1198
+ return /* @__PURE__ */ import_react7.default.createElement("div", {
1199
+ className: cn(orientationStyle[orientation], "hawa-gap-2")
1200
+ }, props.options && props.options.map(function(opt, i) {
1201
+ return /* @__PURE__ */ import_react7.default.createElement("div", {
1202
+ className: "radio-item radio-item-default hawa-flex hawa-items-center hawa-transition-all",
1203
+ key: i + 1
1204
+ }, /* @__PURE__ */ import_react7.default.createElement("input", {
1205
+ disabled: opt.disabled,
1206
+ id: opt.value.toString(),
1207
+ type: "radio",
1208
+ value: opt.value,
1209
+ name: "default-radio"
1210
+ }), /* @__PURE__ */ import_react7.default.createElement("label", {
1211
+ htmlFor: opt.value.toString(),
1212
+ className: cn("hawa-text-sm hawa-font-medium dark:hawa-text-white", opt.disabled ? "hawa-text-gray-400" : "hawa-cursor-pointer hawa-text-gray-900")
1213
+ }, opt.label));
1214
+ }));
1215
+ }
1216
+ };
1217
+ // components/elements/DropdownMenu.tsx
1218
+ var React14 = __toESM(require("react"));
1219
+ var DropdownMenuPrimitive = __toESM(require("@radix-ui/react-dropdown-menu"));
1220
+ var DropdownMenuRoot = DropdownMenuPrimitive.Root;
1221
+ var DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
1222
+ var DropdownMenuPortal = DropdownMenuPrimitive.Portal;
1223
+ var DropdownMenuSub = DropdownMenuPrimitive.Sub;
1224
+ var DropdownMenuSubTrigger = React14.forwardRef(function(_param, ref) /* @__PURE__ */ {
1225
+ var className = _param.className, inset = _param.inset, children = _param.children, props = _object_without_properties(_param, [
1226
+ "className",
1227
+ "inset",
1228
+ "children"
1229
+ ]);
1230
+ return React14.createElement(DropdownMenuPrimitive.SubTrigger, _object_spread({
1231
+ ref: ref,
1232
+ className: cn("hawa-flex hawa-cursor-default hawa-select-none hawa-items-center hawa-justify-between hawa-rounded-sm hawa-px-2 hawa-py-3 hawa-text-sm hawa-outline-none focus:hawa-bg-accent data-[state=open]:hawa-bg-accent", inset && "hawa-pl-8", className)
1233
+ }, props), /* @__PURE__ */ React14.createElement("div", {
1234
+ className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-2"
1235
+ }, children), " ", /* @__PURE__ */ React14.createElement("svg", {
1236
+ "aria-label": "Chevron Right Icon",
1237
+ stroke: "currentColor",
1238
+ fill: "currentColor",
1239
+ strokeWidth: "0",
1240
+ viewBox: "0 0 16 16",
1241
+ height: "1em",
1242
+ width: "1em",
1243
+ className: cn(props.dir === "rtl" ? "hawa-rotate-180" : "")
1244
+ }, /* @__PURE__ */ React14.createElement("path", {
1245
+ fillRule: "evenodd",
1246
+ 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"
1247
+ })));
1248
+ });
1249
+ DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;
1250
+ var DropdownMenuSubContent = React14.forwardRef(function(_param, ref) /* @__PURE__ */ {
1251
+ var className = _param.className, props = _object_without_properties(_param, [
1252
+ "className"
1253
+ ]);
1254
+ return React14.createElement(DropdownMenuPrimitive.SubContent, _object_spread({
1255
+ ref: ref,
1256
+ className: cn("hawa-z-50 hawa-min-w-[8rem] 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", className)
1257
+ }, props));
1258
+ });
1259
+ DropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;
1260
+ var DropdownMenuContent = React14.forwardRef(function(_param, ref) /* @__PURE__ */ {
1261
+ var className = _param.className, _param_sideOffset = _param.sideOffset, sideOffset = _param_sideOffset === void 0 ? 4 : _param_sideOffset, props = _object_without_properties(_param, [
1262
+ "className",
1263
+ "sideOffset"
1264
+ ]);
1265
+ return React14.createElement(DropdownMenuPrimitive.Portal, null, /* @__PURE__ */ React14.createElement(DropdownMenuPrimitive.Content, _object_spread({
1266
+ ref: ref,
1267
+ sideOffset: sideOffset,
1268
+ className: cn("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", className)
1269
+ }, props)));
1270
+ });
1271
+ DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
1272
+ var DropdownMenuItem = React14.forwardRef(function(_param, ref) {
1273
+ var className = _param.className, inset = _param.inset, props = _object_without_properties(_param, [
1274
+ "className",
1275
+ "inset"
1276
+ ]);
1277
+ console.log("sdsdsds", props.children);
1278
+ return /* @__PURE__ */ React14.createElement(DropdownMenuPrimitive.Item, _object_spread({
1279
+ disabled: props.disabled,
1280
+ ref: ref,
1281
+ className: cn("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", inset && "hawa-pl-8", props.end && Array.isArray(props.children) && props.children[1] && "hawa-gap-6", className)
1282
+ }, props), /* @__PURE__ */ React14.createElement("div", {
1283
+ className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-2 "
1284
+ }, props.children), props.end && props.end);
1285
+ });
1286
+ DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
1287
+ var DropdownMenuCheckboxItem = React14.forwardRef(function(_param, ref) /* @__PURE__ */ {
1288
+ var className = _param.className, children = _param.children, checked = _param.checked, props = _object_without_properties(_param, [
1289
+ "className",
1290
+ "children",
1291
+ "checked"
1292
+ ]);
1293
+ return React14.createElement(DropdownMenuPrimitive.CheckboxItem, _object_spread({
1294
+ ref: ref,
1295
+ className: cn("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", className),
1296
+ checked: checked
1297
+ }, props), /* @__PURE__ */ React14.createElement("span", {
1298
+ className: "hawa-absolute hawa-left-2 hawa-flex hawa-h-3.5 hawa-w-3.5 hawa-items-center hawa-justify-center"
1299
+ }, /* @__PURE__ */ React14.createElement(DropdownMenuPrimitive.ItemIndicator, null, /* @__PURE__ */ React14.createElement("svg", {
1300
+ "aria-label": "Check Mark",
1301
+ stroke: "currentColor",
1302
+ fill: "currentColor",
1303
+ strokeWidth: "0",
1304
+ viewBox: "0 0 512 512",
1305
+ height: "0.60em",
1306
+ width: "0.60em"
1307
+ }, /* @__PURE__ */ React14.createElement("path", {
1308
+ 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"
1309
+ })), " ")), children);
1310
+ });
1311
+ DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;
1312
+ var DropdownMenuRadioItem = React14.forwardRef(function(_param, ref) /* @__PURE__ */ {
1313
+ var className = _param.className, children = _param.children, props = _object_without_properties(_param, [
1314
+ "className",
1315
+ "children"
1316
+ ]);
1317
+ return React14.createElement(DropdownMenuPrimitive.RadioItem, _object_spread({
1318
+ ref: ref,
1319
+ className: cn("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", className)
1320
+ }, props), /* @__PURE__ */ React14.createElement("span", {
1321
+ className: "hawa-absolute hawa-left-2 hawa-flex hawa-h-3.5 hawa-w-3.5 hawa-items-center hawa-justify-center"
1322
+ }, /* @__PURE__ */ React14.createElement(DropdownMenuPrimitive.ItemIndicator, null, /* @__PURE__ */ React14.createElement("svg", {
1323
+ xmlns: "http://www.w3.org/2000/svg",
1324
+ width: "24",
1325
+ "aria-label": "Circle",
1326
+ height: "24",
1327
+ viewBox: "0 0 24 24",
1328
+ fill: "none",
1329
+ stroke: "currentColor",
1330
+ strokeWidth: "2",
1331
+ strokeLinecap: "round",
1332
+ strokeLinejoin: "round",
1333
+ className: "hawa-h-2 hawa-w-2 hawa-fill-current"
1334
+ }, /* @__PURE__ */ React14.createElement("circle", {
1335
+ cx: "12",
1336
+ cy: "12",
1337
+ r: "10"
1338
+ })))), children);
1339
+ });
1340
+ DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;
1341
+ var DropdownMenuLabel = React14.forwardRef(function(_param, ref) /* @__PURE__ */ {
1342
+ var className = _param.className, inset = _param.inset, props = _object_without_properties(_param, [
1343
+ "className",
1344
+ "inset"
1345
+ ]);
1346
+ return React14.createElement(DropdownMenuPrimitive.Label, _object_spread({
1347
+ ref: ref,
1348
+ className: cn("hawa-px-2 hawa-py-1.5 hawa-text-sm hawa-font-semibold", inset && "hawa-pl-8", className)
1349
+ }, props));
1350
+ });
1351
+ DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
1352
+ var DropdownMenuSeparator = React14.forwardRef(function(_param, ref) /* @__PURE__ */ {
1353
+ var className = _param.className, props = _object_without_properties(_param, [
1354
+ "className"
1355
+ ]);
1356
+ return React14.createElement(DropdownMenuPrimitive.Separator, _object_spread({
1357
+ ref: ref,
1358
+ className: cn("hawa--mx-1 hawa-my-1 hawa-h-px hawa-bg-muted", className)
1359
+ }, props));
1360
+ });
1361
+ DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;
1362
+ var DropdownMenuShortcut = function(_param) {
1363
+ var className = _param.className, props = _object_without_properties(_param, [
1364
+ "className"
1365
+ ]);
1366
+ return /* @__PURE__ */ React14.createElement("span", _object_spread({
1367
+ className: cn("hawa-ml-auto hawa-text-xs hawa-tracking-widest hawa-opacity-60", className)
1368
+ }, props));
1369
+ };
1370
+ DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
1371
+ var DropdownMenu = function(param) {
1372
+ var trigger = param.trigger, items = param.items, direction = param.direction, sideOffset = param.sideOffset, side = param.side, className = param.className, triggerClassname = param.triggerClassname, align = param.align, alignOffset = param.alignOffset, onItemSelect = param.onItemSelect, _param_size = param.size, size = _param_size === void 0 ? "default" : _param_size, _param_width = param.width, width = _param_width === void 0 ? "default" : _param_width;
1373
+ var widthStyles = {
1374
+ default: "hawa-min-w-[8rem]",
1375
+ sm: "hawa-w-fit",
1376
+ lg: "hawa-w-[200px]",
1377
+ parent: "ddm-w-parent"
1378
+ };
1379
+ var sizeStyles = {
1380
+ default: "hawa-px-2 hawa-py-3 ",
1381
+ sm: "hawa-text-xs hawa-px-1.5 hawa-py-1.5"
1382
+ };
1383
+ return /* @__PURE__ */ React14.createElement(DropdownMenuRoot, {
1384
+ dir: direction
1385
+ }, /* @__PURE__ */ React14.createElement(DropdownMenuTrigger, {
1386
+ asChild: true,
1387
+ className: triggerClassname
1388
+ }, trigger), /* @__PURE__ */ React14.createElement(DropdownMenuPortal, null, /* @__PURE__ */ React14.createElement(DropdownMenuContent, {
1389
+ side: side,
1390
+ sideOffset: sideOffset,
1391
+ className: cn(className, widthStyles[width], "hawa-flex hawa-flex-col hawa-gap-2"),
1392
+ align: align,
1393
+ alignOffset: alignOffset
1394
+ }, items && items.map(function(item, index) {
1395
+ if (item.type === "separator") {
1396
+ return /* @__PURE__ */ React14.createElement(DropdownMenuSeparator, {
1397
+ key: index
1398
+ });
1399
+ } else if (item.type === "label") {
1400
+ return /* @__PURE__ */ React14.createElement(DropdownMenuLabel, {
1401
+ key: index
1402
+ }, item.label);
1403
+ } else {
1404
+ return item.subitems ? /* @__PURE__ */ React14.createElement(DropdownMenuSub, {
1405
+ key: index
1406
+ }, /* @__PURE__ */ React14.createElement(DropdownMenuSubTrigger, {
1407
+ className: cn(sizeStyles[size]),
1408
+ dir: direction
1409
+ }, item.icon && item.icon, item.label && item.label), /* @__PURE__ */ React14.createElement(DropdownMenuPortal, null, /* @__PURE__ */ React14.createElement(DropdownMenuSubContent, null, item.subitems.map(function(subitem, subIndex) {
1410
+ return /* @__PURE__ */ React14.createElement(DropdownMenuItem, {
1411
+ key: subIndex,
1412
+ className: cn(sizeStyles[size], !item.icon && !item.label ? "hawa-px-0 hawa-py-0 focus:hawa-bg-transparent" : "focus:hawa-bg-accent"),
1413
+ disabled: subitem.disabled,
1414
+ onSelect: function() {
1415
+ subitem.action && subitem.action();
1416
+ if (onItemSelect) {
1417
+ onItemSelect(subitem.value);
1418
+ }
1419
+ }
1420
+ }, subitem.icon && subitem.icon, subitem.label && subitem.label);
1421
+ })))) : /* @__PURE__ */ React14.createElement(DropdownMenuItem, {
1422
+ key: index,
1423
+ disabled: item.disabled,
1424
+ onSelect: function(e) {
1425
+ if (item.presist) {
1426
+ e.preventDefault();
1427
+ }
1428
+ if (item.action) {
1429
+ item.action();
1430
+ if (onItemSelect) {
1431
+ onItemSelect(item.value);
1432
+ }
1433
+ } else {
1434
+ if (onItemSelect) {
1435
+ onItemSelect(item.value);
1436
+ }
1437
+ }
1438
+ },
1439
+ end: item.end,
1440
+ className: cn(sizeStyles[size], !item.icon && !item.label ? "hawa-px-0 hawa-py-0 focus:hawa-bg-transparent " : "focus:hawa-bg-accent ", item.presist && "focus:hawa-bg-transparent")
1441
+ }, item.icon && item.icon, item.label && item.label);
1442
+ }
1443
+ }))));
1444
+ };
1445
+ // components/elements/ActionCard.tsx
1446
+ var import_react8 = __toESM(require("react"));
1447
+ var ActionCard = function(props) {
1448
+ var _ref = _sliced_to_array((0, import_react8.useState)(false), 2), hovered = _ref[0], setHovered = _ref[1];
1449
+ return /* @__PURE__ */ import_react8.default.createElement("div", {
1450
+ className: "hawa-flex hawa-h-full hawa-w-full hawa-flex-col hawa-gap-1"
1451
+ }, /* @__PURE__ */ import_react8.default.createElement("div", {
1452
+ className: "hawa-group hawa-relative hawa-h-full hawa-w-full hawa-rounded hawa-border hawa-bg-background hawa-bg-cover hawa-bg-center hawa-transition-all hawa-duration-500 hover:hawa-drop-shadow-2xl",
1453
+ style: {
1454
+ backgroundImage: "url(".concat(props.blank ? "" : props.cardImage, ")")
1455
+ },
1456
+ onMouseEnter: function() {
1457
+ return setHovered(true);
1458
+ },
1459
+ onMouseLeave: function() {
1460
+ return setHovered(false);
1461
+ }
1462
+ }, props.blank ? /* @__PURE__ */ import_react8.default.createElement("div", {
1463
+ className: "hawa-flex hawa-h-full hawa-flex-col hawa-items-center hawa-justify-center "
1464
+ }, /* @__PURE__ */ import_react8.default.createElement("svg", {
1465
+ className: "hawa-h-10 hawa-w-10 hawa-text-foreground",
1466
+ stroke: "currentColor",
1467
+ fill: "currentColor",
1468
+ "stroke-width": "0",
1469
+ viewBox: "0 0 24 24",
1470
+ height: "1em",
1471
+ width: "1em",
1472
+ xmlns: "http://www.w3.org/2000/svg"
1473
+ }, /* @__PURE__ */ import_react8.default.createElement("path", {
1474
+ d: "M19 11h-6V5h-2v6H5v2h6v6h2v-6h6z"
1475
+ }))) : /* @__PURE__ */ import_react8.default.createElement("div", {
1476
+ className: "hawa-absolute hawa-inset-0 hawa-rounded hawa-bg-black hawa-opacity-50"
1477
+ }), /* @__PURE__ */ import_react8.default.createElement("div", {
1478
+ className: "hawa-absolute hawa-bottom-2 hawa-right-2 hawa-z-10 hawa-opacity-0 hawa-transition-all hawa-duration-200 group-hover:hawa-opacity-100"
1479
+ }, props.inCardActions), !props.blank && /* @__PURE__ */ import_react8.default.createElement("div", {
1480
+ className: "hawa-relative hawa-p-4"
1481
+ }, /* @__PURE__ */ import_react8.default.createElement("h1", {
1482
+ className: "hawa-text-white"
1483
+ }, props.title), /* @__PURE__ */ import_react8.default.createElement("p", {
1484
+ className: "hawa-text-white"
1485
+ }, props.subtitle))), /* @__PURE__ */ import_react8.default.createElement("div", {
1486
+ className: "hawa-flex hawa-flex-row hawa-justify-between hawa-text-sm hawa-transition-all hawa-duration-200 ".concat(hovered ? "hawa-opacity-100" : "hawa-opacity-0")
1487
+ }, props.bottomElement));
1488
+ };
1489
+ // Annotate the CommonJS export names for ESM import in node:
1490
+ 0 && (module.exports = {
1491
+ ActionCard: ActionCard,
1492
+ Breadcrumb: Breadcrumb,
1493
+ Button: Button,
1494
+ Card: Card,
1495
+ CardContent: CardContent,
1496
+ CardDescription: CardDescription,
1497
+ CardFooter: CardFooter,
1498
+ CardHeader: CardHeader,
1499
+ CardTitle: CardTitle,
1500
+ Checkbox: Checkbox,
1501
+ CodeBlock: CodeBlock,
1502
+ Dialog: Dialog,
1503
+ DialogContent: DialogContent,
1504
+ DialogDescription: DialogDescription,
1505
+ DialogFooter: DialogFooter,
1506
+ DialogHeader: DialogHeader,
1507
+ DialogTitle: DialogTitle,
1508
+ DialogTrigger: DialogTrigger,
1509
+ DropdownMenu: DropdownMenu,
1510
+ Loading: Loading,
1511
+ Radio: Radio,
1512
+ Switch: Switch,
1513
+ Toast: Toast,
1514
+ ToastAction: ToastAction,
1515
+ ToastClose: ToastClose,
1516
+ ToastDescription: ToastDescription,
1517
+ ToastProvider: ToastProvider,
1518
+ ToastTitle: ToastTitle,
1519
+ ToastViewport: ToastViewport,
1520
+ Toaster: Toaster,
1521
+ Tooltip: Tooltip,
1522
+ buttonVariants: buttonVariants
1523
+ });