@sikka/hawa 0.35.5-next → 0.35.6-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/appLayout/index.js +177 -170
- package/dist/appLayout/index.js.map +1 -1
- package/dist/appLayout/index.mjs +198 -191
- package/dist/appLayout/index.mjs.map +1 -1
- package/dist/blocks/index.js +60 -60
- package/dist/blocks/index.mjs +12 -12
- package/dist/blocks/misc/index.js +49 -49
- package/dist/blocks/misc/index.mjs +62 -62
- package/dist/{chunk-TERP5K6R.mjs → chunk-57EAKTAP.mjs} +1 -184
- package/dist/{chunk-G7JHUC5N.mjs → chunk-ANXGMZXS.mjs} +205 -0
- package/dist/{chunk-HSRW7X3Z.mjs → chunk-MZRUEJED.mjs} +1 -1
- package/dist/chunk-SYGWSBJL.mjs +63 -0
- package/dist/elements/index.js +74 -74
- package/dist/elements/index.mjs +9 -9
- package/dist/hooks/index.d.mts +4 -1
- package/dist/hooks/index.d.ts +4 -1
- package/dist/hooks/index.js +31 -2
- package/dist/hooks/index.mjs +4 -2
- package/dist/index.d.mts +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +177 -177
- package/dist/index.mjs +723 -724
- package/dist/layout/index.js +285 -278
- package/dist/layout/index.mjs +26 -57
- package/dist/passwordInput/index.js.map +1 -1
- package/dist/passwordInput/index.mjs.map +1 -1
- package/dist/tabs/index.js +20 -20
- package/dist/tabs/index.js.map +1 -1
- package/dist/tabs/index.mjs +25 -25
- package/dist/tabs/index.mjs.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-545D35G6.mjs +0 -54
package/dist/appLayout/index.mjs
CHANGED
@@ -1,28 +1,37 @@
|
|
1
1
|
"use client";
|
2
2
|
|
3
3
|
// layout/appLayout/AppLayout.tsx
|
4
|
-
import
|
4
|
+
import React12, { useEffect as useEffect2, useState as useState2 } from "react";
|
5
5
|
|
6
|
-
// hooks/
|
7
|
-
import
|
8
|
-
var
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
6
|
+
// hooks/useClickOutside.ts
|
7
|
+
import { useEffect, useRef } from "react";
|
8
|
+
var DEFAULT_EVENTS = ["mousedown", "touchstart"];
|
9
|
+
function useClickOutside(handler, events, nodes) {
|
10
|
+
const ref = useRef();
|
11
|
+
useEffect(() => {
|
12
|
+
const listener = (event) => {
|
13
|
+
const { target } = event != null ? event : {};
|
14
|
+
if (Array.isArray(nodes)) {
|
15
|
+
const shouldIgnore = (target == null ? void 0 : target.hasAttribute("data-ignore-outside-clicks")) || !document.body.contains(target) && target.tagName !== "HTML";
|
16
|
+
const shouldTrigger = nodes.every(
|
17
|
+
(node) => !!node && !event.composedPath().includes(node)
|
18
|
+
);
|
19
|
+
shouldTrigger && !shouldIgnore && handler();
|
20
|
+
} else if (ref.current && !ref.current.contains(target)) {
|
21
|
+
handler();
|
14
22
|
}
|
15
23
|
};
|
16
|
-
|
17
|
-
|
24
|
+
(events || DEFAULT_EVENTS).forEach(
|
25
|
+
(fn) => document.addEventListener(fn, listener)
|
26
|
+
);
|
18
27
|
return () => {
|
19
|
-
|
20
|
-
|
28
|
+
(events || DEFAULT_EVENTS).forEach(
|
29
|
+
(fn) => document.removeEventListener(fn, listener)
|
30
|
+
);
|
21
31
|
};
|
22
|
-
}, [ref,
|
32
|
+
}, [ref, handler, nodes]);
|
23
33
|
return ref;
|
24
|
-
}
|
25
|
-
var useOutsideClick_default = useOutsideClick;
|
34
|
+
}
|
26
35
|
|
27
36
|
// util/index.ts
|
28
37
|
import { clsx } from "clsx";
|
@@ -32,12 +41,12 @@ function cn(...inputs) {
|
|
32
41
|
}
|
33
42
|
|
34
43
|
// elements/button/Button.tsx
|
35
|
-
import * as
|
44
|
+
import * as React5 from "react";
|
36
45
|
import { cva } from "class-variance-authority";
|
37
46
|
|
38
47
|
// elements/helperText/HelperText.tsx
|
39
|
-
import
|
40
|
-
var HelperText = ({ helperText }) => /* @__PURE__ */
|
48
|
+
import React from "react";
|
49
|
+
var HelperText = ({ helperText }) => /* @__PURE__ */ React.createElement(
|
41
50
|
"p",
|
42
51
|
{
|
43
52
|
className: cn(
|
@@ -49,12 +58,12 @@ var HelperText = ({ helperText }) => /* @__PURE__ */ React2.createElement(
|
|
49
58
|
);
|
50
59
|
|
51
60
|
// elements/label/Label.tsx
|
52
|
-
import * as
|
61
|
+
import * as React3 from "react";
|
53
62
|
|
54
63
|
// elements/tooltip/Tooltip.tsx
|
55
|
-
import
|
64
|
+
import React2 from "react";
|
56
65
|
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
57
|
-
var TooltipContent =
|
66
|
+
var TooltipContent = React2.forwardRef(({ className, sideOffset = 4, size = "default", ...props }, ref) => /* @__PURE__ */ React2.createElement(
|
58
67
|
TooltipPrimitive.Content,
|
59
68
|
{
|
60
69
|
ref,
|
@@ -71,7 +80,7 @@ var TooltipContent = React3.forwardRef(({ className, sideOffset = 4, size = "def
|
|
71
80
|
}
|
72
81
|
));
|
73
82
|
TooltipContent.displayName = TooltipPrimitive.Content.displayName;
|
74
|
-
var TooltipArrow =
|
83
|
+
var TooltipArrow = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React2.createElement(TooltipPrimitive.Arrow, { ref, className: cn(className), ...props }));
|
75
84
|
TooltipArrow.displayName = TooltipPrimitive.Arrow.displayName;
|
76
85
|
var Tooltip = ({
|
77
86
|
side,
|
@@ -88,13 +97,13 @@ var Tooltip = ({
|
|
88
97
|
delayDuration = 300,
|
89
98
|
...props
|
90
99
|
}) => {
|
91
|
-
return /* @__PURE__ */
|
100
|
+
return /* @__PURE__ */ React2.createElement(
|
92
101
|
TooltipPrimitive.TooltipProvider,
|
93
102
|
{
|
94
103
|
delayDuration,
|
95
104
|
...providerProps
|
96
105
|
},
|
97
|
-
/* @__PURE__ */
|
106
|
+
/* @__PURE__ */ React2.createElement(
|
98
107
|
TooltipPrimitive.Root,
|
99
108
|
{
|
100
109
|
open: !disabled && open,
|
@@ -102,8 +111,8 @@ var Tooltip = ({
|
|
102
111
|
onOpenChange,
|
103
112
|
...props
|
104
113
|
},
|
105
|
-
/* @__PURE__ */
|
106
|
-
/* @__PURE__ */
|
114
|
+
/* @__PURE__ */ React2.createElement(TooltipPrimitive.Trigger, { ...triggerProps }, children),
|
115
|
+
/* @__PURE__ */ React2.createElement(
|
107
116
|
TooltipContent,
|
108
117
|
{
|
109
118
|
size,
|
@@ -123,7 +132,7 @@ var Tooltip = ({
|
|
123
132
|
};
|
124
133
|
|
125
134
|
// elements/label/Label.tsx
|
126
|
-
var Label =
|
135
|
+
var Label = React3.forwardRef(({ className, hint, hintSide, required, children, ...props }, ref) => /* @__PURE__ */ React3.createElement("div", { className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-1 hawa-transition-all" }, /* @__PURE__ */ React3.createElement(
|
127
136
|
"label",
|
128
137
|
{
|
129
138
|
ref,
|
@@ -134,8 +143,8 @@ var Label = React4.forwardRef(({ className, hint, hintSide, required, children,
|
|
134
143
|
...props
|
135
144
|
},
|
136
145
|
children,
|
137
|
-
required && /* @__PURE__ */
|
138
|
-
), hint && /* @__PURE__ */
|
146
|
+
required && /* @__PURE__ */ React3.createElement("span", { className: "hawa-mx-0.5 hawa-text-red-500" }, "*")
|
147
|
+
), hint && /* @__PURE__ */ React3.createElement(
|
139
148
|
Tooltip,
|
140
149
|
{
|
141
150
|
content: hint,
|
@@ -145,7 +154,7 @@ var Label = React4.forwardRef(({ className, hint, hintSide, required, children,
|
|
145
154
|
onClick: (event) => event.preventDefault()
|
146
155
|
}
|
147
156
|
},
|
148
|
-
/* @__PURE__ */
|
157
|
+
/* @__PURE__ */ React3.createElement("div", null, /* @__PURE__ */ React3.createElement(
|
149
158
|
"svg",
|
150
159
|
{
|
151
160
|
xmlns: "http://www.w3.org/2000/svg",
|
@@ -157,15 +166,15 @@ var Label = React4.forwardRef(({ className, hint, hintSide, required, children,
|
|
157
166
|
strokeLinecap: "round",
|
158
167
|
strokeLinejoin: "round"
|
159
168
|
},
|
160
|
-
/* @__PURE__ */
|
161
|
-
/* @__PURE__ */
|
162
|
-
/* @__PURE__ */
|
169
|
+
/* @__PURE__ */ React3.createElement("circle", { cx: "12", cy: "12", r: "10" }),
|
170
|
+
/* @__PURE__ */ React3.createElement("path", { d: "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3" }),
|
171
|
+
/* @__PURE__ */ React3.createElement("path", { d: "M12 17h.01" })
|
163
172
|
))
|
164
173
|
)));
|
165
174
|
Label.displayName = "Label";
|
166
175
|
|
167
176
|
// elements/loading/Loading.tsx
|
168
|
-
import
|
177
|
+
import React4 from "react";
|
169
178
|
var Loading = ({
|
170
179
|
design = "spinner",
|
171
180
|
size = "normal",
|
@@ -196,7 +205,7 @@ var Loading = ({
|
|
196
205
|
};
|
197
206
|
switch (design.split("-")[0]) {
|
198
207
|
case "dots":
|
199
|
-
return /* @__PURE__ */
|
208
|
+
return /* @__PURE__ */ React4.createElement(
|
200
209
|
"div",
|
201
210
|
{
|
202
211
|
className: cn(
|
@@ -204,7 +213,7 @@ var Loading = ({
|
|
204
213
|
classNames == null ? void 0 : classNames.container
|
205
214
|
)
|
206
215
|
},
|
207
|
-
/* @__PURE__ */
|
216
|
+
/* @__PURE__ */ React4.createElement(
|
208
217
|
"div",
|
209
218
|
{
|
210
219
|
className: cn(
|
@@ -215,7 +224,7 @@ var Loading = ({
|
|
215
224
|
)
|
216
225
|
}
|
217
226
|
),
|
218
|
-
/* @__PURE__ */
|
227
|
+
/* @__PURE__ */ React4.createElement(
|
219
228
|
"div",
|
220
229
|
{
|
221
230
|
className: cn(
|
@@ -226,7 +235,7 @@ var Loading = ({
|
|
226
235
|
)
|
227
236
|
}
|
228
237
|
),
|
229
|
-
/* @__PURE__ */
|
238
|
+
/* @__PURE__ */ React4.createElement(
|
230
239
|
"div",
|
231
240
|
{
|
232
241
|
className: cn(
|
@@ -239,7 +248,7 @@ var Loading = ({
|
|
239
248
|
)
|
240
249
|
);
|
241
250
|
case "square":
|
242
|
-
return /* @__PURE__ */
|
251
|
+
return /* @__PURE__ */ React4.createElement(
|
243
252
|
"svg",
|
244
253
|
{
|
245
254
|
className: cn(
|
@@ -251,7 +260,7 @@ var Loading = ({
|
|
251
260
|
height: "35",
|
252
261
|
width: "35"
|
253
262
|
},
|
254
|
-
/* @__PURE__ */
|
263
|
+
/* @__PURE__ */ React4.createElement(
|
255
264
|
"rect",
|
256
265
|
{
|
257
266
|
className: "squircle-track",
|
@@ -263,7 +272,7 @@ var Loading = ({
|
|
263
272
|
height: "32.5"
|
264
273
|
}
|
265
274
|
),
|
266
|
-
/* @__PURE__ */
|
275
|
+
/* @__PURE__ */ React4.createElement(
|
267
276
|
"rect",
|
268
277
|
{
|
269
278
|
className: "square-car",
|
@@ -278,7 +287,7 @@ var Loading = ({
|
|
278
287
|
)
|
279
288
|
);
|
280
289
|
case "squircle":
|
281
|
-
return /* @__PURE__ */
|
290
|
+
return /* @__PURE__ */ React4.createElement(
|
282
291
|
"svg",
|
283
292
|
{
|
284
293
|
x: "0px",
|
@@ -293,7 +302,7 @@ var Loading = ({
|
|
293
302
|
classNames == null ? void 0 : classNames.container
|
294
303
|
)
|
295
304
|
},
|
296
|
-
/* @__PURE__ */
|
305
|
+
/* @__PURE__ */ React4.createElement(
|
297
306
|
"path",
|
298
307
|
{
|
299
308
|
className: cn("squircle-track", classNames == null ? void 0 : classNames.track),
|
@@ -303,7 +312,7 @@ var Loading = ({
|
|
303
312
|
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"
|
304
313
|
}
|
305
314
|
),
|
306
|
-
/* @__PURE__ */
|
315
|
+
/* @__PURE__ */ React4.createElement(
|
307
316
|
"path",
|
308
317
|
{
|
309
318
|
className: cn("squircle-car", classNames == null ? void 0 : classNames.car),
|
@@ -315,7 +324,7 @@ var Loading = ({
|
|
315
324
|
)
|
316
325
|
);
|
317
326
|
case "progress":
|
318
|
-
return /* @__PURE__ */
|
327
|
+
return /* @__PURE__ */ React4.createElement(
|
319
328
|
"div",
|
320
329
|
{
|
321
330
|
className: cn(
|
@@ -326,9 +335,9 @@ var Loading = ({
|
|
326
335
|
}
|
327
336
|
);
|
328
337
|
case "orbit":
|
329
|
-
return /* @__PURE__ */
|
338
|
+
return /* @__PURE__ */ React4.createElement("div", { className: cn("orbit-container", classNames == null ? void 0 : classNames.container) });
|
330
339
|
default:
|
331
|
-
return /* @__PURE__ */
|
340
|
+
return /* @__PURE__ */ React4.createElement(
|
332
341
|
"svg",
|
333
342
|
{
|
334
343
|
viewBox: "0 0 40 40",
|
@@ -340,7 +349,7 @@ var Loading = ({
|
|
340
349
|
classNames == null ? void 0 : classNames.container
|
341
350
|
)
|
342
351
|
},
|
343
|
-
/* @__PURE__ */
|
352
|
+
/* @__PURE__ */ React4.createElement(
|
344
353
|
"circle",
|
345
354
|
{
|
346
355
|
className: cn(
|
@@ -359,7 +368,7 @@ var Loading = ({
|
|
359
368
|
pathLength: "100"
|
360
369
|
}
|
361
370
|
),
|
362
|
-
/* @__PURE__ */
|
371
|
+
/* @__PURE__ */ React4.createElement(
|
363
372
|
"circle",
|
364
373
|
{
|
365
374
|
className: cn(
|
@@ -413,7 +422,7 @@ var buttonVariants = cva(
|
|
413
422
|
defaultVariants: { variant: "default", size: "default" }
|
414
423
|
}
|
415
424
|
);
|
416
|
-
var Button =
|
425
|
+
var Button = React5.forwardRef(
|
417
426
|
({
|
418
427
|
className,
|
419
428
|
label,
|
@@ -429,7 +438,7 @@ var Button = React6.forwardRef(
|
|
429
438
|
}, ref) => {
|
430
439
|
const Comp = "button";
|
431
440
|
const loadingColor = variant === "outline" || variant === "ghost" || variant === "neoBrutalism" ? "hawa-bg-primary" : "hawa-bg-primary-foreground";
|
432
|
-
return /* @__PURE__ */
|
441
|
+
return /* @__PURE__ */ React5.createElement("div", { className: "hawa-flex hawa-flex-col hawa-gap-2" }, label && /* @__PURE__ */ React5.createElement(Label, { ...labelProps }, label), /* @__PURE__ */ React5.createElement(
|
433
442
|
Comp,
|
434
443
|
{
|
435
444
|
className: cn(
|
@@ -439,7 +448,7 @@ var Button = React6.forwardRef(
|
|
439
448
|
ref,
|
440
449
|
...props
|
441
450
|
},
|
442
|
-
isLoading ? /* @__PURE__ */
|
451
|
+
isLoading ? /* @__PURE__ */ React5.createElement(
|
443
452
|
Loading,
|
444
453
|
{
|
445
454
|
design: size === "icon" || size === "smallIcon" ? "spinner" : "dots-pulse",
|
@@ -448,20 +457,20 @@ var Button = React6.forwardRef(
|
|
448
457
|
size: size === "sm" || size === "xs" ? "xs" : "button"
|
449
458
|
}
|
450
459
|
) : children
|
451
|
-
), showHelperText && /* @__PURE__ */
|
460
|
+
), showHelperText && /* @__PURE__ */ React5.createElement(HelperText, { helperText: props.helperText }));
|
452
461
|
}
|
453
462
|
);
|
454
463
|
Button.displayName = "Button";
|
455
464
|
|
456
465
|
// elements/dropdownMenu/DropdownMenu.tsx
|
457
|
-
import * as
|
466
|
+
import * as React6 from "react";
|
458
467
|
import { Portal } from "@headlessui/react";
|
459
468
|
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
|
460
469
|
var DropdownMenuRoot = DropdownMenuPrimitive.Root;
|
461
470
|
var DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
|
462
471
|
var DropdownMenuSub = DropdownMenuPrimitive.Sub;
|
463
472
|
var DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
|
464
|
-
var DropdownMenuSubTrigger =
|
473
|
+
var DropdownMenuSubTrigger = React6.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ React6.createElement(
|
465
474
|
DropdownMenuPrimitive.SubTrigger,
|
466
475
|
{
|
467
476
|
ref,
|
@@ -472,9 +481,9 @@ var DropdownMenuSubTrigger = React7.forwardRef(({ className, inset, children, ..
|
|
472
481
|
),
|
473
482
|
...props
|
474
483
|
},
|
475
|
-
/* @__PURE__ */
|
484
|
+
/* @__PURE__ */ React6.createElement("div", { className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-2" }, children),
|
476
485
|
" ",
|
477
|
-
/* @__PURE__ */
|
486
|
+
/* @__PURE__ */ React6.createElement(
|
478
487
|
"svg",
|
479
488
|
{
|
480
489
|
"aria-label": "Chevron Right Icon",
|
@@ -486,7 +495,7 @@ var DropdownMenuSubTrigger = React7.forwardRef(({ className, inset, children, ..
|
|
486
495
|
width: "1em",
|
487
496
|
className: cn(props.dir === "rtl" ? "hawa-rotate-180" : "")
|
488
497
|
},
|
489
|
-
/* @__PURE__ */
|
498
|
+
/* @__PURE__ */ React6.createElement(
|
490
499
|
"path",
|
491
500
|
{
|
492
501
|
fillRule: "evenodd",
|
@@ -496,7 +505,7 @@ var DropdownMenuSubTrigger = React7.forwardRef(({ className, inset, children, ..
|
|
496
505
|
)
|
497
506
|
));
|
498
507
|
DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;
|
499
|
-
var DropdownMenuSubContent =
|
508
|
+
var DropdownMenuSubContent = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React6.createElement(
|
500
509
|
DropdownMenuPrimitive.SubContent,
|
501
510
|
{
|
502
511
|
ref,
|
@@ -508,7 +517,7 @@ var DropdownMenuSubContent = React7.forwardRef(({ className, ...props }, ref) =>
|
|
508
517
|
}
|
509
518
|
));
|
510
519
|
DropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;
|
511
|
-
var DropdownMenuContent =
|
520
|
+
var DropdownMenuContent = React6.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ React6.createElement(Portal, null, /* @__PURE__ */ React6.createElement(
|
512
521
|
DropdownMenuPrimitive.Content,
|
513
522
|
{
|
514
523
|
ref,
|
@@ -521,8 +530,8 @@ var DropdownMenuContent = React7.forwardRef(({ className, sideOffset = 4, ...pro
|
|
521
530
|
}
|
522
531
|
)));
|
523
532
|
DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
|
524
|
-
var DropdownMenuItem =
|
525
|
-
return /* @__PURE__ */
|
533
|
+
var DropdownMenuItem = React6.forwardRef(({ className, inset, badged, slug, LinkComponent, ...props }, ref) => {
|
534
|
+
return /* @__PURE__ */ React6.createElement(LinkComponent, { href: slug }, /* @__PURE__ */ React6.createElement(
|
526
535
|
DropdownMenuPrimitive.Item,
|
527
536
|
{
|
528
537
|
disabled: props.disabled,
|
@@ -535,14 +544,14 @@ var DropdownMenuItem = React7.forwardRef(({ className, inset, badged, slug, Link
|
|
535
544
|
),
|
536
545
|
...props
|
537
546
|
},
|
538
|
-
/* @__PURE__ */
|
547
|
+
/* @__PURE__ */ React6.createElement("div", { className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-2 " }, props.children),
|
539
548
|
props.end && props.end,
|
540
|
-
!props.end && props.shortcut && /* @__PURE__ */
|
541
|
-
!props.end && badged && /* @__PURE__ */
|
549
|
+
!props.end && props.shortcut && /* @__PURE__ */ React6.createElement(DropdownMenuShortcut, null, props.shortcut),
|
550
|
+
!props.end && badged && /* @__PURE__ */ React6.createElement("div", { className: "hawa-h-3 hawa-w-3 hawa-rounded-full hawa-bg-red-500" })
|
542
551
|
));
|
543
552
|
});
|
544
553
|
DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
|
545
|
-
var DropdownMenuCheckboxItem =
|
554
|
+
var DropdownMenuCheckboxItem = React6.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ React6.createElement(
|
546
555
|
DropdownMenuPrimitive.CheckboxItem,
|
547
556
|
{
|
548
557
|
ref,
|
@@ -553,7 +562,7 @@ var DropdownMenuCheckboxItem = React7.forwardRef(({ className, children, checked
|
|
553
562
|
checked,
|
554
563
|
...props
|
555
564
|
},
|
556
|
-
/* @__PURE__ */
|
565
|
+
/* @__PURE__ */ React6.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__ */ React6.createElement(DropdownMenuPrimitive.ItemIndicator, null, /* @__PURE__ */ React6.createElement(
|
557
566
|
"svg",
|
558
567
|
{
|
559
568
|
"aria-label": "Check Mark",
|
@@ -564,12 +573,12 @@ var DropdownMenuCheckboxItem = React7.forwardRef(({ className, children, checked
|
|
564
573
|
height: "0.60em",
|
565
574
|
width: "0.60em"
|
566
575
|
},
|
567
|
-
/* @__PURE__ */
|
576
|
+
/* @__PURE__ */ React6.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" })
|
568
577
|
), " ")),
|
569
578
|
children
|
570
579
|
));
|
571
580
|
DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;
|
572
|
-
var DropdownMenuRadioItem =
|
581
|
+
var DropdownMenuRadioItem = React6.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ React6.createElement(
|
573
582
|
DropdownMenuPrimitive.RadioItem,
|
574
583
|
{
|
575
584
|
ref,
|
@@ -579,7 +588,7 @@ var DropdownMenuRadioItem = React7.forwardRef(({ className, children, ...props }
|
|
579
588
|
),
|
580
589
|
...props
|
581
590
|
},
|
582
|
-
/* @__PURE__ */
|
591
|
+
/* @__PURE__ */ React6.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__ */ React6.createElement(DropdownMenuPrimitive.ItemIndicator, null, /* @__PURE__ */ React6.createElement(
|
583
592
|
"svg",
|
584
593
|
{
|
585
594
|
xmlns: "http://www.w3.org/2000/svg",
|
@@ -594,12 +603,12 @@ var DropdownMenuRadioItem = React7.forwardRef(({ className, children, ...props }
|
|
594
603
|
strokeLinejoin: "round",
|
595
604
|
className: "hawa-h-2 hawa-w-2 hawa-fill-current"
|
596
605
|
},
|
597
|
-
/* @__PURE__ */
|
606
|
+
/* @__PURE__ */ React6.createElement("circle", { cx: "12", cy: "12", r: "10" })
|
598
607
|
))),
|
599
608
|
children
|
600
609
|
));
|
601
610
|
DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;
|
602
|
-
var DropdownMenuLabel =
|
611
|
+
var DropdownMenuLabel = React6.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ React6.createElement(
|
603
612
|
DropdownMenuPrimitive.Label,
|
604
613
|
{
|
605
614
|
ref,
|
@@ -612,7 +621,7 @@ var DropdownMenuLabel = React7.forwardRef(({ className, inset, ...props }, ref)
|
|
612
621
|
}
|
613
622
|
));
|
614
623
|
DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
|
615
|
-
var DropdownMenuSeparator =
|
624
|
+
var DropdownMenuSeparator = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React6.createElement(
|
616
625
|
DropdownMenuPrimitive.Separator,
|
617
626
|
{
|
618
627
|
ref,
|
@@ -625,7 +634,7 @@ var DropdownMenuShortcut = ({
|
|
625
634
|
className,
|
626
635
|
...props
|
627
636
|
}) => {
|
628
|
-
return /* @__PURE__ */
|
637
|
+
return /* @__PURE__ */ React6.createElement(
|
629
638
|
"span",
|
630
639
|
{
|
631
640
|
className: cn(
|
@@ -666,10 +675,10 @@ var DropdownMenu = ({
|
|
666
675
|
default: "hawa-px-2 hawa-py-3 ",
|
667
676
|
sm: "hawa-text-xs hawa-px-1.5 hawa-py-1.5 "
|
668
677
|
};
|
669
|
-
let [values, setValues] =
|
678
|
+
let [values, setValues] = React6.useState(
|
670
679
|
items.map((item) => item.currentOption)
|
671
680
|
);
|
672
|
-
return /* @__PURE__ */
|
681
|
+
return /* @__PURE__ */ React6.createElement(
|
673
682
|
DropdownMenuRoot,
|
674
683
|
{
|
675
684
|
onOpenChange,
|
@@ -677,7 +686,7 @@ var DropdownMenu = ({
|
|
677
686
|
modal: false,
|
678
687
|
dir: direction
|
679
688
|
},
|
680
|
-
/* @__PURE__ */
|
689
|
+
/* @__PURE__ */ React6.createElement(
|
681
690
|
DropdownMenuTrigger,
|
682
691
|
{
|
683
692
|
asChild: true,
|
@@ -686,7 +695,7 @@ var DropdownMenu = ({
|
|
686
695
|
},
|
687
696
|
trigger
|
688
697
|
),
|
689
|
-
/* @__PURE__ */
|
698
|
+
/* @__PURE__ */ React6.createElement(Portal, null, /* @__PURE__ */ React6.createElement(
|
690
699
|
DropdownMenuContent,
|
691
700
|
{
|
692
701
|
side,
|
@@ -707,12 +716,12 @@ var DropdownMenu = ({
|
|
707
716
|
var _a;
|
708
717
|
const ItemLinkComponent = item.slug ? LinkComponent : "a";
|
709
718
|
if (item.itemType === "separator") {
|
710
|
-
return /* @__PURE__ */
|
719
|
+
return /* @__PURE__ */ React6.createElement(DropdownMenuSeparator, { key: index });
|
711
720
|
} else if (item.itemType === "label") {
|
712
|
-
return /* @__PURE__ */
|
721
|
+
return /* @__PURE__ */ React6.createElement(DropdownMenuLabel, { key: index }, item.label);
|
713
722
|
} else if (item.itemType === "radio") {
|
714
723
|
let dd = item.currentOption;
|
715
|
-
return /* @__PURE__ */
|
724
|
+
return /* @__PURE__ */ React6.createElement(DropdownMenuSub, { key: index }, /* @__PURE__ */ React6.createElement(
|
716
725
|
DropdownMenuSubTrigger,
|
717
726
|
{
|
718
727
|
dir: direction,
|
@@ -720,7 +729,7 @@ var DropdownMenu = ({
|
|
720
729
|
},
|
721
730
|
item.icon && item.icon,
|
722
731
|
item.label && item.label
|
723
|
-
), /* @__PURE__ */
|
732
|
+
), /* @__PURE__ */ React6.createElement(DropdownMenuSubContent, null, /* @__PURE__ */ React6.createElement(
|
724
733
|
DropdownMenuRadioGroup,
|
725
734
|
{
|
726
735
|
value: values[index],
|
@@ -734,12 +743,12 @@ var DropdownMenu = ({
|
|
734
743
|
}
|
735
744
|
}
|
736
745
|
},
|
737
|
-
(_a = item.options) == null ? void 0 : _a.map((opt, i) => /* @__PURE__ */
|
746
|
+
(_a = item.options) == null ? void 0 : _a.map((opt, i) => /* @__PURE__ */ React6.createElement(DropdownMenuRadioItem, { key: i, value: opt.value }, opt.label))
|
738
747
|
)));
|
739
748
|
} else if (item.itemType === "custom") {
|
740
|
-
return /* @__PURE__ */
|
749
|
+
return /* @__PURE__ */ React6.createElement("div", { key: index }, item.content);
|
741
750
|
} else {
|
742
|
-
return item.subitems ? /* @__PURE__ */
|
751
|
+
return item.subitems ? /* @__PURE__ */ React6.createElement(DropdownMenuSub, { key: index }, /* @__PURE__ */ React6.createElement(
|
743
752
|
DropdownMenuSubTrigger,
|
744
753
|
{
|
745
754
|
dir: direction,
|
@@ -747,9 +756,9 @@ var DropdownMenu = ({
|
|
747
756
|
},
|
748
757
|
item.icon && item.icon,
|
749
758
|
item.label && item.label
|
750
|
-
), /* @__PURE__ */
|
759
|
+
), /* @__PURE__ */ React6.createElement(Portal, null, /* @__PURE__ */ React6.createElement(DropdownMenuSubContent, null, item.subitems.map((subitem, subIndex) => {
|
751
760
|
const SubitemLinkComponent = subitem.slug ? LinkComponent : "a";
|
752
|
-
return /* @__PURE__ */
|
761
|
+
return /* @__PURE__ */ React6.createElement(
|
753
762
|
DropdownMenuItem,
|
754
763
|
{
|
755
764
|
key: subIndex,
|
@@ -778,7 +787,7 @@ var DropdownMenu = ({
|
|
778
787
|
subitem.icon && subitem.icon,
|
779
788
|
subitem.label && subitem.label
|
780
789
|
);
|
781
|
-
})))) : /* @__PURE__ */
|
790
|
+
})))) : /* @__PURE__ */ React6.createElement(
|
782
791
|
DropdownMenuItem,
|
783
792
|
{
|
784
793
|
LinkComponent: ItemLinkComponent,
|
@@ -831,13 +840,43 @@ var DropdownMenu = ({
|
|
831
840
|
);
|
832
841
|
};
|
833
842
|
|
843
|
+
// icons/Emojis.tsx
|
844
|
+
import React7 from "react";
|
845
|
+
|
846
|
+
// icons/InputIcons.tsx
|
847
|
+
import React8 from "react";
|
848
|
+
|
849
|
+
// icons/CommonIcons.tsx
|
850
|
+
import React9 from "react";
|
851
|
+
var MenuIcon = () => /* @__PURE__ */ React9.createElement(
|
852
|
+
"svg",
|
853
|
+
{
|
854
|
+
"aria-label": "Menu Button",
|
855
|
+
stroke: "currentColor",
|
856
|
+
fill: "currentColor",
|
857
|
+
strokeWidth: 0,
|
858
|
+
viewBox: "0 0 20 20",
|
859
|
+
"aria-hidden": "true",
|
860
|
+
height: "1.6em",
|
861
|
+
width: "1.6em"
|
862
|
+
},
|
863
|
+
/* @__PURE__ */ React9.createElement(
|
864
|
+
"path",
|
865
|
+
{
|
866
|
+
fillRule: "evenodd",
|
867
|
+
clipRule: "evenodd",
|
868
|
+
d: "M3 5a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM3 10a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM3 15a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1z"
|
869
|
+
}
|
870
|
+
)
|
871
|
+
);
|
872
|
+
|
834
873
|
// layout/sidebar/Sidebar.tsx
|
835
|
-
import * as
|
874
|
+
import * as React11 from "react";
|
836
875
|
import * as AccordionPrimitive from "@radix-ui/react-accordion";
|
837
876
|
|
838
877
|
// elements/chip/Chip.tsx
|
839
|
-
import
|
840
|
-
var Chip =
|
878
|
+
import React10 from "react";
|
879
|
+
var Chip = React10.forwardRef(
|
841
880
|
({
|
842
881
|
label,
|
843
882
|
size = "normal",
|
@@ -879,7 +918,7 @@ var Chip = React8.forwardRef(
|
|
879
918
|
oceanic: "hawa-text-white dark:hawa-text-black hawa-bg-gradient-to-bl hawa-from-green-300 hawa-via-blue-500 hawa-to-purple-600"
|
880
919
|
};
|
881
920
|
if (label) {
|
882
|
-
return /* @__PURE__ */
|
921
|
+
return /* @__PURE__ */ React10.createElement(
|
883
922
|
"span",
|
884
923
|
{
|
885
924
|
...rest,
|
@@ -891,7 +930,7 @@ var Chip = React8.forwardRef(
|
|
891
930
|
color ? colorStyles[color] : "hawa-border hawa-bg-none"
|
892
931
|
)
|
893
932
|
},
|
894
|
-
dotType && /* @__PURE__ */
|
933
|
+
dotType && /* @__PURE__ */ React10.createElement(
|
895
934
|
"span",
|
896
935
|
{
|
897
936
|
className: cn(dotStyles[size], dotTypeStyles[dotType])
|
@@ -901,7 +940,7 @@ var Chip = React8.forwardRef(
|
|
901
940
|
label
|
902
941
|
);
|
903
942
|
} else {
|
904
|
-
return /* @__PURE__ */
|
943
|
+
return /* @__PURE__ */ React10.createElement(
|
905
944
|
"span",
|
906
945
|
{
|
907
946
|
...rest,
|
@@ -919,9 +958,9 @@ var Chip = React8.forwardRef(
|
|
919
958
|
// layout/sidebar/Sidebar.tsx
|
920
959
|
var Accordion = AccordionPrimitive.Root;
|
921
960
|
var triggerStyles = "hawa-flex hawa-flex-1 hawa-items-center hawa-duration-75 hawa-select-none hawa-cursor-pointer hawa-rounded hawa-justify-between hawa-p-2 hawa-px-3 hawa-font-medium hawa-transition-all [&[data-state=open]>svg]:hawa--rotate-90";
|
922
|
-
var AccordionItem =
|
961
|
+
var AccordionItem = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React11.createElement(AccordionPrimitive.Item, { ref, className: cn(className), ...props }));
|
923
962
|
AccordionItem.displayName = "AccordionItem";
|
924
|
-
var AccordionTrigger =
|
963
|
+
var AccordionTrigger = React11.forwardRef(({ className, showArrow, children, ...props }, ref) => /* @__PURE__ */ React11.createElement(AccordionPrimitive.Header, { className: "flex" }, /* @__PURE__ */ React11.createElement(
|
925
964
|
AccordionPrimitive.Trigger,
|
926
965
|
{
|
927
966
|
ref,
|
@@ -929,7 +968,7 @@ var AccordionTrigger = React9.forwardRef(({ className, showArrow, children, ...p
|
|
929
968
|
...props
|
930
969
|
},
|
931
970
|
children,
|
932
|
-
showArrow && /* @__PURE__ */
|
971
|
+
showArrow && /* @__PURE__ */ React11.createElement(
|
933
972
|
"svg",
|
934
973
|
{
|
935
974
|
"aria-label": "Chevron Right Icon",
|
@@ -940,11 +979,11 @@ var AccordionTrigger = React9.forwardRef(({ className, showArrow, children, ...p
|
|
940
979
|
width: "1em",
|
941
980
|
className: "hawa-icon hawa-shrink-0 hawa-rotate-90 hawa-transition-transform hawa-duration-200"
|
942
981
|
},
|
943
|
-
/* @__PURE__ */
|
982
|
+
/* @__PURE__ */ React11.createElement("path", { 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" })
|
944
983
|
)
|
945
984
|
)));
|
946
985
|
AccordionTrigger.displayName = AccordionPrimitive.Trigger.displayName;
|
947
|
-
var AccordionContent =
|
986
|
+
var AccordionContent = React11.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ React11.createElement(
|
948
987
|
AccordionPrimitive.Content,
|
949
988
|
{
|
950
989
|
ref,
|
@@ -954,7 +993,7 @@ var AccordionContent = React9.forwardRef(({ className, children, ...props }, ref
|
|
954
993
|
),
|
955
994
|
...props
|
956
995
|
},
|
957
|
-
/* @__PURE__ */
|
996
|
+
/* @__PURE__ */ React11.createElement("div", null, children)
|
958
997
|
));
|
959
998
|
AccordionContent.displayName = AccordionPrimitive.Content.displayName;
|
960
999
|
var SidebarGroup = ({
|
@@ -970,7 +1009,7 @@ var SidebarGroup = ({
|
|
970
1009
|
...props
|
971
1010
|
}) => {
|
972
1011
|
const LinkComponent = props.LinkComponent || "a";
|
973
|
-
return /* @__PURE__ */
|
1012
|
+
return /* @__PURE__ */ React11.createElement("div", { className: "hawa-m-2" }, title && /* @__PURE__ */ React11.createElement("h3", { className: "hawa-mb-1 hawa-font-bold" }, title), /* @__PURE__ */ React11.createElement("ul", { className: "hawa-flex hawa-flex-col hawa-gap-2" }, /* @__PURE__ */ React11.createElement(
|
974
1013
|
Accordion,
|
975
1014
|
{
|
976
1015
|
value: openedItem,
|
@@ -981,7 +1020,7 @@ var SidebarGroup = ({
|
|
981
1020
|
collapsible: true,
|
982
1021
|
className: "hawa-flex hawa-flex-col hawa-gap-1"
|
983
1022
|
},
|
984
|
-
items.map((item, idx) => /* @__PURE__ */
|
1023
|
+
items.map((item, idx) => /* @__PURE__ */ React11.createElement(
|
985
1024
|
SidebarItem,
|
986
1025
|
{
|
987
1026
|
isOpen,
|
@@ -1009,14 +1048,14 @@ var SidebarItem = ({
|
|
1009
1048
|
return props.selectedItem === value ? "hawa-bg-primary/90 hawa-text-primary-foreground hawa-cursor-default" : "hover:hawa-bg-primary/10";
|
1010
1049
|
};
|
1011
1050
|
if (item.subitems) {
|
1012
|
-
return /* @__PURE__ */
|
1051
|
+
return /* @__PURE__ */ React11.createElement(
|
1013
1052
|
AccordionItem,
|
1014
1053
|
{
|
1015
1054
|
value: item.value,
|
1016
1055
|
className: "hawa-overflow-x-clip ",
|
1017
1056
|
dir: direction
|
1018
1057
|
},
|
1019
|
-
/* @__PURE__ */
|
1058
|
+
/* @__PURE__ */ React11.createElement(
|
1020
1059
|
AccordionTrigger,
|
1021
1060
|
{
|
1022
1061
|
className: cn(
|
@@ -1028,7 +1067,7 @@ var SidebarItem = ({
|
|
1028
1067
|
),
|
1029
1068
|
showArrow: isOpen
|
1030
1069
|
},
|
1031
|
-
/* @__PURE__ */
|
1070
|
+
/* @__PURE__ */ React11.createElement(
|
1032
1071
|
"div",
|
1033
1072
|
{
|
1034
1073
|
className: cn(
|
@@ -1036,7 +1075,7 @@ var SidebarItem = ({
|
|
1036
1075
|
)
|
1037
1076
|
},
|
1038
1077
|
item.icon && item.icon,
|
1039
|
-
/* @__PURE__ */
|
1078
|
+
/* @__PURE__ */ React11.createElement(
|
1040
1079
|
"span",
|
1041
1080
|
{
|
1042
1081
|
className: cn(
|
@@ -1048,14 +1087,14 @@ var SidebarItem = ({
|
|
1048
1087
|
)
|
1049
1088
|
)
|
1050
1089
|
),
|
1051
|
-
item.subitems && /* @__PURE__ */
|
1090
|
+
item.subitems && /* @__PURE__ */ React11.createElement(AccordionContent, { className: "hawa-mt-1 hawa-h-full hawa-rounded" }, /* @__PURE__ */ React11.createElement(
|
1052
1091
|
"div",
|
1053
1092
|
{
|
1054
1093
|
className: cn(
|
1055
1094
|
"hawa-flex hawa-h-full hawa-flex-col hawa-gap-2 hawa-bg-foreground/5 hawa-p-1"
|
1056
1095
|
)
|
1057
1096
|
},
|
1058
|
-
item.subitems.map((subitem, idx) => /* @__PURE__ */
|
1097
|
+
item.subitems.map((subitem, idx) => /* @__PURE__ */ React11.createElement(
|
1059
1098
|
LinkComponent,
|
1060
1099
|
{
|
1061
1100
|
href: subitem.slug,
|
@@ -1086,7 +1125,7 @@ var SidebarItem = ({
|
|
1086
1125
|
))
|
1087
1126
|
);
|
1088
1127
|
} else {
|
1089
|
-
return /* @__PURE__ */
|
1128
|
+
return /* @__PURE__ */ React11.createElement(
|
1090
1129
|
LinkComponent,
|
1091
1130
|
{
|
1092
1131
|
href: item.slug,
|
@@ -1110,7 +1149,7 @@ var SidebarItem = ({
|
|
1110
1149
|
"hawa-overflow-x-clip "
|
1111
1150
|
)
|
1112
1151
|
},
|
1113
|
-
/* @__PURE__ */
|
1152
|
+
/* @__PURE__ */ React11.createElement("div", { className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-2" }, item.icon && item.icon, /* @__PURE__ */ React11.createElement(
|
1114
1153
|
"span",
|
1115
1154
|
{
|
1116
1155
|
className: cn(
|
@@ -1120,7 +1159,7 @@ var SidebarItem = ({
|
|
1120
1159
|
},
|
1121
1160
|
item.label,
|
1122
1161
|
" ",
|
1123
|
-
item.badge && /* @__PURE__ */
|
1162
|
+
item.badge && /* @__PURE__ */ React11.createElement(Chip, { label: item.badge.label, color: "hyper", size: "small" })
|
1124
1163
|
))
|
1125
1164
|
);
|
1126
1165
|
}
|
@@ -1162,7 +1201,16 @@ var AppLayout = ({
|
|
1162
1201
|
);
|
1163
1202
|
const [openSideMenu, setOpenSideMenu] = useState2(true);
|
1164
1203
|
const [keepDrawerOpen, setKeepDrawerOpen] = useState2(keepOpen);
|
1165
|
-
|
1204
|
+
const handleClickOutside = () => {
|
1205
|
+
if (typeof window !== "undefined") {
|
1206
|
+
if (window.innerWidth < 600) {
|
1207
|
+
setKeepDrawerOpen(false);
|
1208
|
+
setOpenSideMenu(false);
|
1209
|
+
}
|
1210
|
+
}
|
1211
|
+
};
|
1212
|
+
const ref = useClickOutside(handleClickOutside);
|
1213
|
+
useEffect2(() => {
|
1166
1214
|
if (typeof window !== "undefined") {
|
1167
1215
|
const resize = () => {
|
1168
1216
|
setSize(window.innerWidth);
|
@@ -1177,29 +1225,18 @@ var AppLayout = ({
|
|
1177
1225
|
};
|
1178
1226
|
}
|
1179
1227
|
}, []);
|
1180
|
-
|
1228
|
+
useEffect2(() => {
|
1181
1229
|
setKeepDrawerOpen(keepOpen);
|
1182
1230
|
}, [setKeepOpen]);
|
1183
|
-
|
1184
|
-
if (typeof window !== "undefined") {
|
1185
|
-
if (keepDrawerOpen)
|
1186
|
-
return;
|
1187
|
-
if (window.innerWidth < 600) {
|
1188
|
-
setKeepDrawerOpen(false);
|
1189
|
-
setOpenSideMenu(false);
|
1190
|
-
}
|
1191
|
-
}
|
1192
|
-
};
|
1193
|
-
const ref = useOutsideClick_default(handleClickOutside);
|
1194
|
-
const drawerSizeCondition = size > 600 ? drawerSizeStyle[keepDrawerOpen ? "opened" : "closed"][drawerSize] : 0;
|
1195
|
-
useEffect(() => {
|
1231
|
+
useEffect2(() => {
|
1196
1232
|
if (size > 600) {
|
1197
1233
|
setOpenSideMenu(keepDrawerOpen);
|
1198
1234
|
} else {
|
1199
1235
|
setOpenSideMenu(false);
|
1200
1236
|
}
|
1201
|
-
}, [size]);
|
1202
|
-
|
1237
|
+
}, [size, keepDrawerOpen]);
|
1238
|
+
const drawerSizeCondition = size > 600 ? drawerSizeStyle[keepDrawerOpen ? "opened" : "closed"][drawerSize] : 0;
|
1239
|
+
return /* @__PURE__ */ React12.createElement("div", { className: "hawa-fixed hawa-start-0" }, props.topBar && /* @__PURE__ */ React12.createElement(
|
1203
1240
|
"div",
|
1204
1241
|
{
|
1205
1242
|
dir: direction,
|
@@ -1208,7 +1245,7 @@ var AppLayout = ({
|
|
1208
1245
|
bordered && "hawa-border-b-[1px]"
|
1209
1246
|
)
|
1210
1247
|
},
|
1211
|
-
size > 600 ? /* @__PURE__ */
|
1248
|
+
size > 600 ? /* @__PURE__ */ React12.createElement(
|
1212
1249
|
"div",
|
1213
1250
|
{
|
1214
1251
|
className: cn(
|
@@ -1222,24 +1259,24 @@ var AppLayout = ({
|
|
1222
1259
|
props.pageTitle
|
1223
1260
|
) : (
|
1224
1261
|
// Mobile Drawer Menu Button
|
1225
|
-
/* @__PURE__ */
|
1262
|
+
/* @__PURE__ */ React12.createElement(
|
1226
1263
|
"div",
|
1227
1264
|
{
|
1228
1265
|
dir: direction,
|
1229
1266
|
className: "hawa-flex hawa-items-center hawa-justify-center hawa-gap-0.5"
|
1230
1267
|
},
|
1231
|
-
/* @__PURE__ */
|
1268
|
+
/* @__PURE__ */ React12.createElement(
|
1232
1269
|
"div",
|
1233
1270
|
{
|
1234
1271
|
onClick: () => setOpenSideMenu(true),
|
1235
1272
|
className: "hawa-z-40 hawa-mx-1 hawa-cursor-pointer hawa-rounded hawa-p-2 hawa-transition-all hover:hawa-bg-gray-100"
|
1236
1273
|
},
|
1237
|
-
/* @__PURE__ */
|
1274
|
+
/* @__PURE__ */ React12.createElement(MenuIcon, null)
|
1238
1275
|
),
|
1239
|
-
props.pageTitle ? /* @__PURE__ */
|
1276
|
+
props.pageTitle ? /* @__PURE__ */ React12.createElement("div", { className: "hawa-text-sm" }, props.pageTitle) : /* @__PURE__ */ React12.createElement("div", null)
|
1240
1277
|
)
|
1241
1278
|
),
|
1242
|
-
/* @__PURE__ */
|
1279
|
+
/* @__PURE__ */ React12.createElement("div", { className: cn("hawa-flex hawa-gap-2 dark:hawa-text-white") }, size > 600 ? /* @__PURE__ */ React12.createElement("div", { className: "hawa-text-end hawa-text-xs" }, /* @__PURE__ */ React12.createElement("div", { className: "hawa-font-bold" }, props.username), " ", /* @__PURE__ */ React12.createElement("div", null, props.email)) : null, /* @__PURE__ */ React12.createElement(
|
1243
1280
|
DropdownMenu,
|
1244
1281
|
{
|
1245
1282
|
LinkComponent: MenuLinkComponent,
|
@@ -1251,13 +1288,13 @@ var AppLayout = ({
|
|
1251
1288
|
direction,
|
1252
1289
|
items: props.profileMenuItems || [],
|
1253
1290
|
onItemSelect: (e) => console.log("selecting item ", e),
|
1254
|
-
trigger: /* @__PURE__ */
|
1291
|
+
trigger: /* @__PURE__ */ React12.createElement(
|
1255
1292
|
"div",
|
1256
1293
|
{
|
1257
1294
|
onClick: onAvatarClick,
|
1258
1295
|
className: "hawa-relative hawa-h-8 hawa-w-8 hawa-cursor-pointer hawa-overflow-clip hawa-rounded hawa-ring-1 hawa-ring-primary/30 dark:hawa-bg-gray-600"
|
1259
1296
|
},
|
1260
|
-
props.avatarImage ? /* @__PURE__ */
|
1297
|
+
props.avatarImage ? /* @__PURE__ */ React12.createElement("img", { src: props.avatarImage, alt: "User Avatar" }) : /* @__PURE__ */ React12.createElement(
|
1261
1298
|
"svg",
|
1262
1299
|
{
|
1263
1300
|
"aria-label": "Avatar Icon",
|
@@ -1265,7 +1302,7 @@ var AppLayout = ({
|
|
1265
1302
|
fill: "currentColor",
|
1266
1303
|
viewBox: "0 0 20 20"
|
1267
1304
|
},
|
1268
|
-
/* @__PURE__ */
|
1305
|
+
/* @__PURE__ */ React12.createElement(
|
1269
1306
|
"path",
|
1270
1307
|
{
|
1271
1308
|
fillRule: "evenodd",
|
@@ -1277,20 +1314,19 @@ var AppLayout = ({
|
|
1277
1314
|
)
|
1278
1315
|
}
|
1279
1316
|
))
|
1280
|
-
), /* @__PURE__ */
|
1317
|
+
), /* @__PURE__ */ React12.createElement(
|
1281
1318
|
"div",
|
1282
1319
|
{
|
1283
1320
|
className: cn(
|
1284
|
-
"hawa-fixed hawa-z-0 hawa-flex hawa-flex-col hawa-justify-between hawa-overflow-x-clip hawa-transition-all hawa-top-0 hawa-h-[calc(100dvh)] hawa-bg-
|
1321
|
+
"hawa-fixed hawa-z-0 hawa-flex hawa-flex-col hawa-justify-between hawa-overflow-x-clip hawa-transition-all hawa-top-0 hawa-h-[calc(100dvh)] hawa-bg-red-500",
|
1322
|
+
// 'hawa-bg-primary-foreground',
|
1285
1323
|
isRTL ? "hawa-right-0" : "hawa-left-0",
|
1286
1324
|
bordered ? direction === "rtl" ? "hawa-border-s-[1px]" : "hawa-border-e-[1px]" : ""
|
1287
1325
|
),
|
1288
1326
|
style: {
|
1289
1327
|
width: size > 600 ? openSideMenu ? `${drawerSizeStyle["opened"][drawerSize]}px` : `${drawerSizeStyle["closed"][drawerSize]}px` : openSideMenu ? `${drawerSizeStyle["opened"][drawerSize]}px` : "0px"
|
1290
1328
|
},
|
1291
|
-
onMouseEnter: () =>
|
1292
|
-
setOpenSideMenu(true);
|
1293
|
-
},
|
1329
|
+
onMouseEnter: () => setOpenSideMenu(true),
|
1294
1330
|
onMouseLeave: () => {
|
1295
1331
|
if (size > 600) {
|
1296
1332
|
if (keepDrawerOpen) {
|
@@ -1305,7 +1341,7 @@ var AppLayout = ({
|
|
1305
1341
|
},
|
1306
1342
|
ref
|
1307
1343
|
},
|
1308
|
-
/* @__PURE__ */
|
1344
|
+
/* @__PURE__ */ React12.createElement(
|
1309
1345
|
"div",
|
1310
1346
|
{
|
1311
1347
|
onClick: props.onLogoClick,
|
@@ -1320,30 +1356,30 @@ var AppLayout = ({
|
|
1320
1356
|
}
|
1321
1357
|
},
|
1322
1358
|
openSideMenu && props.header && props.header,
|
1323
|
-
!props.header && /* @__PURE__ */
|
1359
|
+
!props.header && /* @__PURE__ */ React12.createElement(
|
1324
1360
|
"img",
|
1325
1361
|
{
|
1362
|
+
src: props.logoLink,
|
1326
1363
|
className: cn(
|
1327
1364
|
"hawa-h-9 hawa-opacity-0 hawa-transition-all",
|
1328
1365
|
!openSideMenu ? "hawa-invisible hawa-opacity-0" : "hawa-visible hawa-opacity-100",
|
1329
1366
|
classNames == null ? void 0 : classNames.fullLogoImg
|
1330
|
-
)
|
1331
|
-
src: props.logoLink
|
1367
|
+
)
|
1332
1368
|
}
|
1333
1369
|
),
|
1334
|
-
size > 600 ? /* @__PURE__ */
|
1370
|
+
size > 600 ? /* @__PURE__ */ React12.createElement(
|
1335
1371
|
"img",
|
1336
1372
|
{
|
1373
|
+
src: props.logoSymbol,
|
1337
1374
|
className: cn(
|
1338
1375
|
"hawa-fixed hawa-h-9 hawa-transition-all hawa-start-2.5 hawa-top-2.5",
|
1339
1376
|
openSideMenu ? "hawa-invisible hawa-opacity-0" : "hawa-visible hawa-opacity-100",
|
1340
1377
|
classNames == null ? void 0 : classNames.symbolLogoImg
|
1341
|
-
)
|
1342
|
-
src: props.logoSymbol
|
1378
|
+
)
|
1343
1379
|
}
|
1344
1380
|
) : null
|
1345
1381
|
),
|
1346
|
-
/* @__PURE__ */
|
1382
|
+
/* @__PURE__ */ React12.createElement(
|
1347
1383
|
"div",
|
1348
1384
|
{
|
1349
1385
|
className: cn(
|
@@ -1354,30 +1390,22 @@ var AppLayout = ({
|
|
1354
1390
|
width: size > 600 ? `${openSideMenu ? openDrawerWidth : drawerSizeCondition}px` : `${openSideMenu ? openDrawerWidth : 0}px`
|
1355
1391
|
}
|
1356
1392
|
},
|
1357
|
-
/* @__PURE__ */
|
1393
|
+
/* @__PURE__ */ React12.createElement(
|
1358
1394
|
SidebarGroup,
|
1359
1395
|
{
|
1360
1396
|
direction,
|
1361
|
-
onItemClick: (values) => {
|
1362
|
-
if (clickedItem) {
|
1363
|
-
clickedItem(values);
|
1364
|
-
}
|
1365
|
-
},
|
1366
|
-
onSubItemClick: (values) => {
|
1367
|
-
if (clickedItem) {
|
1368
|
-
clickedItem(values);
|
1369
|
-
}
|
1370
|
-
},
|
1371
1397
|
selectedItem: currentPage,
|
1372
1398
|
openedItem: openedSidebarItem,
|
1373
1399
|
setOpenedItem: (e) => setOpenedSidebarItem(e),
|
1374
1400
|
isOpen: keepDrawerOpen || openSideMenu,
|
1375
1401
|
items: props.drawerItems,
|
1376
|
-
LinkComponent: DrawerLinkComponent
|
1402
|
+
LinkComponent: DrawerLinkComponent,
|
1403
|
+
onItemClick: (values) => clickedItem && clickedItem(values),
|
1404
|
+
onSubItemClick: (values) => clickedItem && clickedItem(values)
|
1377
1405
|
}
|
1378
1406
|
)
|
1379
1407
|
),
|
1380
|
-
/* @__PURE__ */
|
1408
|
+
/* @__PURE__ */ React12.createElement(
|
1381
1409
|
"div",
|
1382
1410
|
{
|
1383
1411
|
className: cn(
|
@@ -1388,8 +1416,8 @@ var AppLayout = ({
|
|
1388
1416
|
width: size > 600 ? `${openSideMenu ? openDrawerWidth : 56}px` : `${openSideMenu ? openDrawerWidth : 0}px`
|
1389
1417
|
}
|
1390
1418
|
},
|
1391
|
-
DrawerFooterActions && openSideMenu ? /* @__PURE__ */
|
1392
|
-
size > 600 && openSideMenu ? /* @__PURE__ */
|
1419
|
+
DrawerFooterActions && openSideMenu ? /* @__PURE__ */ React12.createElement(React12.Fragment, null, DrawerFooterActions) : null,
|
1420
|
+
size > 600 && openSideMenu ? /* @__PURE__ */ React12.createElement(
|
1393
1421
|
Tooltip,
|
1394
1422
|
{
|
1395
1423
|
side: "left",
|
@@ -1397,7 +1425,7 @@ var AppLayout = ({
|
|
1397
1425
|
triggerProps: { asChild: true },
|
1398
1426
|
content: keepDrawerOpen ? ((_a = props.texts) == null ? void 0 : _a.collapseSidebar) || "Collapse Sidebar" : ((_b = props.texts) == null ? void 0 : _b.expandSidebar) || "Expand Sidebar"
|
1399
1427
|
},
|
1400
|
-
/* @__PURE__ */
|
1428
|
+
/* @__PURE__ */ React12.createElement(
|
1401
1429
|
Button,
|
1402
1430
|
{
|
1403
1431
|
variant: "outline",
|
@@ -1410,7 +1438,7 @@ var AppLayout = ({
|
|
1410
1438
|
setKeepDrawerOpen(newKeepOpenState);
|
1411
1439
|
}
|
1412
1440
|
},
|
1413
|
-
/* @__PURE__ */
|
1441
|
+
/* @__PURE__ */ React12.createElement(
|
1414
1442
|
"svg",
|
1415
1443
|
{
|
1416
1444
|
className: cn(
|
@@ -1420,7 +1448,7 @@ var AppLayout = ({
|
|
1420
1448
|
fill: "currentColor",
|
1421
1449
|
viewBox: "0 0 20 20"
|
1422
1450
|
},
|
1423
|
-
/* @__PURE__ */
|
1451
|
+
/* @__PURE__ */ React12.createElement(
|
1424
1452
|
"path",
|
1425
1453
|
{
|
1426
1454
|
fillRule: "evenodd",
|
@@ -1432,7 +1460,7 @@ var AppLayout = ({
|
|
1432
1460
|
)
|
1433
1461
|
) : null
|
1434
1462
|
)
|
1435
|
-
), /* @__PURE__ */
|
1463
|
+
), /* @__PURE__ */ React12.createElement(
|
1436
1464
|
"div",
|
1437
1465
|
{
|
1438
1466
|
className: "hawa-fixed -hawa-z-10 hawa-overflow-y-auto hawa-transition-all",
|
@@ -1451,27 +1479,6 @@ var AppLayout = ({
|
|
1451
1479
|
props.children
|
1452
1480
|
));
|
1453
1481
|
};
|
1454
|
-
var MenuIcon = () => /* @__PURE__ */ React10.createElement(
|
1455
|
-
"svg",
|
1456
|
-
{
|
1457
|
-
"aria-label": "Menu Button",
|
1458
|
-
stroke: "currentColor",
|
1459
|
-
fill: "currentColor",
|
1460
|
-
strokeWidth: 0,
|
1461
|
-
viewBox: "0 0 20 20",
|
1462
|
-
"aria-hidden": "true",
|
1463
|
-
height: "1.6em",
|
1464
|
-
width: "1.6em"
|
1465
|
-
},
|
1466
|
-
/* @__PURE__ */ React10.createElement(
|
1467
|
-
"path",
|
1468
|
-
{
|
1469
|
-
fillRule: "evenodd",
|
1470
|
-
clipRule: "evenodd",
|
1471
|
-
d: "M3 5a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM3 10a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM3 15a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1z"
|
1472
|
-
}
|
1473
|
-
)
|
1474
|
-
);
|
1475
1482
|
export {
|
1476
1483
|
AppLayout
|
1477
1484
|
};
|