@sikka/hawa 0.35.4-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 +178 -171
- package/dist/appLayout/index.js.map +1 -1
- package/dist/appLayout/index.mjs +199 -192
- 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 +178 -178
- package/dist/index.mjs +724 -725
- package/dist/layout/index.js +286 -279
- package/dist/layout/index.mjs +27 -60
- 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-JU6Q4Q3T.mjs +0 -52
package/dist/appLayout/index.mjs
CHANGED
@@ -1,26 +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
|
-
|
24
|
+
(events || DEFAULT_EVENTS).forEach(
|
25
|
+
(fn) => document.addEventListener(fn, listener)
|
26
|
+
);
|
17
27
|
return () => {
|
18
|
-
|
28
|
+
(events || DEFAULT_EVENTS).forEach(
|
29
|
+
(fn) => document.removeEventListener(fn, listener)
|
30
|
+
);
|
19
31
|
};
|
20
|
-
}, [ref]);
|
32
|
+
}, [ref, handler, nodes]);
|
21
33
|
return ref;
|
22
|
-
}
|
23
|
-
var useOutsideClick_default = useOutsideClick;
|
34
|
+
}
|
24
35
|
|
25
36
|
// util/index.ts
|
26
37
|
import { clsx } from "clsx";
|
@@ -30,12 +41,12 @@ function cn(...inputs) {
|
|
30
41
|
}
|
31
42
|
|
32
43
|
// elements/button/Button.tsx
|
33
|
-
import * as
|
44
|
+
import * as React5 from "react";
|
34
45
|
import { cva } from "class-variance-authority";
|
35
46
|
|
36
47
|
// elements/helperText/HelperText.tsx
|
37
|
-
import
|
38
|
-
var HelperText = ({ helperText }) => /* @__PURE__ */
|
48
|
+
import React from "react";
|
49
|
+
var HelperText = ({ helperText }) => /* @__PURE__ */ React.createElement(
|
39
50
|
"p",
|
40
51
|
{
|
41
52
|
className: cn(
|
@@ -47,12 +58,12 @@ var HelperText = ({ helperText }) => /* @__PURE__ */ React2.createElement(
|
|
47
58
|
);
|
48
59
|
|
49
60
|
// elements/label/Label.tsx
|
50
|
-
import * as
|
61
|
+
import * as React3 from "react";
|
51
62
|
|
52
63
|
// elements/tooltip/Tooltip.tsx
|
53
|
-
import
|
64
|
+
import React2 from "react";
|
54
65
|
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
55
|
-
var TooltipContent =
|
66
|
+
var TooltipContent = React2.forwardRef(({ className, sideOffset = 4, size = "default", ...props }, ref) => /* @__PURE__ */ React2.createElement(
|
56
67
|
TooltipPrimitive.Content,
|
57
68
|
{
|
58
69
|
ref,
|
@@ -69,7 +80,7 @@ var TooltipContent = React3.forwardRef(({ className, sideOffset = 4, size = "def
|
|
69
80
|
}
|
70
81
|
));
|
71
82
|
TooltipContent.displayName = TooltipPrimitive.Content.displayName;
|
72
|
-
var TooltipArrow =
|
83
|
+
var TooltipArrow = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React2.createElement(TooltipPrimitive.Arrow, { ref, className: cn(className), ...props }));
|
73
84
|
TooltipArrow.displayName = TooltipPrimitive.Arrow.displayName;
|
74
85
|
var Tooltip = ({
|
75
86
|
side,
|
@@ -86,13 +97,13 @@ var Tooltip = ({
|
|
86
97
|
delayDuration = 300,
|
87
98
|
...props
|
88
99
|
}) => {
|
89
|
-
return /* @__PURE__ */
|
100
|
+
return /* @__PURE__ */ React2.createElement(
|
90
101
|
TooltipPrimitive.TooltipProvider,
|
91
102
|
{
|
92
103
|
delayDuration,
|
93
104
|
...providerProps
|
94
105
|
},
|
95
|
-
/* @__PURE__ */
|
106
|
+
/* @__PURE__ */ React2.createElement(
|
96
107
|
TooltipPrimitive.Root,
|
97
108
|
{
|
98
109
|
open: !disabled && open,
|
@@ -100,8 +111,8 @@ var Tooltip = ({
|
|
100
111
|
onOpenChange,
|
101
112
|
...props
|
102
113
|
},
|
103
|
-
/* @__PURE__ */
|
104
|
-
/* @__PURE__ */
|
114
|
+
/* @__PURE__ */ React2.createElement(TooltipPrimitive.Trigger, { ...triggerProps }, children),
|
115
|
+
/* @__PURE__ */ React2.createElement(
|
105
116
|
TooltipContent,
|
106
117
|
{
|
107
118
|
size,
|
@@ -121,7 +132,7 @@ var Tooltip = ({
|
|
121
132
|
};
|
122
133
|
|
123
134
|
// elements/label/Label.tsx
|
124
|
-
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(
|
125
136
|
"label",
|
126
137
|
{
|
127
138
|
ref,
|
@@ -132,8 +143,8 @@ var Label = React4.forwardRef(({ className, hint, hintSide, required, children,
|
|
132
143
|
...props
|
133
144
|
},
|
134
145
|
children,
|
135
|
-
required && /* @__PURE__ */
|
136
|
-
), hint && /* @__PURE__ */
|
146
|
+
required && /* @__PURE__ */ React3.createElement("span", { className: "hawa-mx-0.5 hawa-text-red-500" }, "*")
|
147
|
+
), hint && /* @__PURE__ */ React3.createElement(
|
137
148
|
Tooltip,
|
138
149
|
{
|
139
150
|
content: hint,
|
@@ -143,7 +154,7 @@ var Label = React4.forwardRef(({ className, hint, hintSide, required, children,
|
|
143
154
|
onClick: (event) => event.preventDefault()
|
144
155
|
}
|
145
156
|
},
|
146
|
-
/* @__PURE__ */
|
157
|
+
/* @__PURE__ */ React3.createElement("div", null, /* @__PURE__ */ React3.createElement(
|
147
158
|
"svg",
|
148
159
|
{
|
149
160
|
xmlns: "http://www.w3.org/2000/svg",
|
@@ -155,15 +166,15 @@ var Label = React4.forwardRef(({ className, hint, hintSide, required, children,
|
|
155
166
|
strokeLinecap: "round",
|
156
167
|
strokeLinejoin: "round"
|
157
168
|
},
|
158
|
-
/* @__PURE__ */
|
159
|
-
/* @__PURE__ */
|
160
|
-
/* @__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" })
|
161
172
|
))
|
162
173
|
)));
|
163
174
|
Label.displayName = "Label";
|
164
175
|
|
165
176
|
// elements/loading/Loading.tsx
|
166
|
-
import
|
177
|
+
import React4 from "react";
|
167
178
|
var Loading = ({
|
168
179
|
design = "spinner",
|
169
180
|
size = "normal",
|
@@ -194,7 +205,7 @@ var Loading = ({
|
|
194
205
|
};
|
195
206
|
switch (design.split("-")[0]) {
|
196
207
|
case "dots":
|
197
|
-
return /* @__PURE__ */
|
208
|
+
return /* @__PURE__ */ React4.createElement(
|
198
209
|
"div",
|
199
210
|
{
|
200
211
|
className: cn(
|
@@ -202,7 +213,7 @@ var Loading = ({
|
|
202
213
|
classNames == null ? void 0 : classNames.container
|
203
214
|
)
|
204
215
|
},
|
205
|
-
/* @__PURE__ */
|
216
|
+
/* @__PURE__ */ React4.createElement(
|
206
217
|
"div",
|
207
218
|
{
|
208
219
|
className: cn(
|
@@ -213,7 +224,7 @@ var Loading = ({
|
|
213
224
|
)
|
214
225
|
}
|
215
226
|
),
|
216
|
-
/* @__PURE__ */
|
227
|
+
/* @__PURE__ */ React4.createElement(
|
217
228
|
"div",
|
218
229
|
{
|
219
230
|
className: cn(
|
@@ -224,7 +235,7 @@ var Loading = ({
|
|
224
235
|
)
|
225
236
|
}
|
226
237
|
),
|
227
|
-
/* @__PURE__ */
|
238
|
+
/* @__PURE__ */ React4.createElement(
|
228
239
|
"div",
|
229
240
|
{
|
230
241
|
className: cn(
|
@@ -237,7 +248,7 @@ var Loading = ({
|
|
237
248
|
)
|
238
249
|
);
|
239
250
|
case "square":
|
240
|
-
return /* @__PURE__ */
|
251
|
+
return /* @__PURE__ */ React4.createElement(
|
241
252
|
"svg",
|
242
253
|
{
|
243
254
|
className: cn(
|
@@ -249,7 +260,7 @@ var Loading = ({
|
|
249
260
|
height: "35",
|
250
261
|
width: "35"
|
251
262
|
},
|
252
|
-
/* @__PURE__ */
|
263
|
+
/* @__PURE__ */ React4.createElement(
|
253
264
|
"rect",
|
254
265
|
{
|
255
266
|
className: "squircle-track",
|
@@ -261,7 +272,7 @@ var Loading = ({
|
|
261
272
|
height: "32.5"
|
262
273
|
}
|
263
274
|
),
|
264
|
-
/* @__PURE__ */
|
275
|
+
/* @__PURE__ */ React4.createElement(
|
265
276
|
"rect",
|
266
277
|
{
|
267
278
|
className: "square-car",
|
@@ -276,7 +287,7 @@ var Loading = ({
|
|
276
287
|
)
|
277
288
|
);
|
278
289
|
case "squircle":
|
279
|
-
return /* @__PURE__ */
|
290
|
+
return /* @__PURE__ */ React4.createElement(
|
280
291
|
"svg",
|
281
292
|
{
|
282
293
|
x: "0px",
|
@@ -291,7 +302,7 @@ var Loading = ({
|
|
291
302
|
classNames == null ? void 0 : classNames.container
|
292
303
|
)
|
293
304
|
},
|
294
|
-
/* @__PURE__ */
|
305
|
+
/* @__PURE__ */ React4.createElement(
|
295
306
|
"path",
|
296
307
|
{
|
297
308
|
className: cn("squircle-track", classNames == null ? void 0 : classNames.track),
|
@@ -301,7 +312,7 @@ var Loading = ({
|
|
301
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"
|
302
313
|
}
|
303
314
|
),
|
304
|
-
/* @__PURE__ */
|
315
|
+
/* @__PURE__ */ React4.createElement(
|
305
316
|
"path",
|
306
317
|
{
|
307
318
|
className: cn("squircle-car", classNames == null ? void 0 : classNames.car),
|
@@ -313,7 +324,7 @@ var Loading = ({
|
|
313
324
|
)
|
314
325
|
);
|
315
326
|
case "progress":
|
316
|
-
return /* @__PURE__ */
|
327
|
+
return /* @__PURE__ */ React4.createElement(
|
317
328
|
"div",
|
318
329
|
{
|
319
330
|
className: cn(
|
@@ -324,9 +335,9 @@ var Loading = ({
|
|
324
335
|
}
|
325
336
|
);
|
326
337
|
case "orbit":
|
327
|
-
return /* @__PURE__ */
|
338
|
+
return /* @__PURE__ */ React4.createElement("div", { className: cn("orbit-container", classNames == null ? void 0 : classNames.container) });
|
328
339
|
default:
|
329
|
-
return /* @__PURE__ */
|
340
|
+
return /* @__PURE__ */ React4.createElement(
|
330
341
|
"svg",
|
331
342
|
{
|
332
343
|
viewBox: "0 0 40 40",
|
@@ -338,7 +349,7 @@ var Loading = ({
|
|
338
349
|
classNames == null ? void 0 : classNames.container
|
339
350
|
)
|
340
351
|
},
|
341
|
-
/* @__PURE__ */
|
352
|
+
/* @__PURE__ */ React4.createElement(
|
342
353
|
"circle",
|
343
354
|
{
|
344
355
|
className: cn(
|
@@ -357,7 +368,7 @@ var Loading = ({
|
|
357
368
|
pathLength: "100"
|
358
369
|
}
|
359
370
|
),
|
360
|
-
/* @__PURE__ */
|
371
|
+
/* @__PURE__ */ React4.createElement(
|
361
372
|
"circle",
|
362
373
|
{
|
363
374
|
className: cn(
|
@@ -411,7 +422,7 @@ var buttonVariants = cva(
|
|
411
422
|
defaultVariants: { variant: "default", size: "default" }
|
412
423
|
}
|
413
424
|
);
|
414
|
-
var Button =
|
425
|
+
var Button = React5.forwardRef(
|
415
426
|
({
|
416
427
|
className,
|
417
428
|
label,
|
@@ -427,7 +438,7 @@ var Button = React6.forwardRef(
|
|
427
438
|
}, ref) => {
|
428
439
|
const Comp = "button";
|
429
440
|
const loadingColor = variant === "outline" || variant === "ghost" || variant === "neoBrutalism" ? "hawa-bg-primary" : "hawa-bg-primary-foreground";
|
430
|
-
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(
|
431
442
|
Comp,
|
432
443
|
{
|
433
444
|
className: cn(
|
@@ -437,7 +448,7 @@ var Button = React6.forwardRef(
|
|
437
448
|
ref,
|
438
449
|
...props
|
439
450
|
},
|
440
|
-
isLoading ? /* @__PURE__ */
|
451
|
+
isLoading ? /* @__PURE__ */ React5.createElement(
|
441
452
|
Loading,
|
442
453
|
{
|
443
454
|
design: size === "icon" || size === "smallIcon" ? "spinner" : "dots-pulse",
|
@@ -446,20 +457,20 @@ var Button = React6.forwardRef(
|
|
446
457
|
size: size === "sm" || size === "xs" ? "xs" : "button"
|
447
458
|
}
|
448
459
|
) : children
|
449
|
-
), showHelperText && /* @__PURE__ */
|
460
|
+
), showHelperText && /* @__PURE__ */ React5.createElement(HelperText, { helperText: props.helperText }));
|
450
461
|
}
|
451
462
|
);
|
452
463
|
Button.displayName = "Button";
|
453
464
|
|
454
465
|
// elements/dropdownMenu/DropdownMenu.tsx
|
455
|
-
import * as
|
466
|
+
import * as React6 from "react";
|
456
467
|
import { Portal } from "@headlessui/react";
|
457
468
|
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
|
458
469
|
var DropdownMenuRoot = DropdownMenuPrimitive.Root;
|
459
470
|
var DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
|
460
471
|
var DropdownMenuSub = DropdownMenuPrimitive.Sub;
|
461
472
|
var DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
|
462
|
-
var DropdownMenuSubTrigger =
|
473
|
+
var DropdownMenuSubTrigger = React6.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ React6.createElement(
|
463
474
|
DropdownMenuPrimitive.SubTrigger,
|
464
475
|
{
|
465
476
|
ref,
|
@@ -470,9 +481,9 @@ var DropdownMenuSubTrigger = React7.forwardRef(({ className, inset, children, ..
|
|
470
481
|
),
|
471
482
|
...props
|
472
483
|
},
|
473
|
-
/* @__PURE__ */
|
484
|
+
/* @__PURE__ */ React6.createElement("div", { className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-2" }, children),
|
474
485
|
" ",
|
475
|
-
/* @__PURE__ */
|
486
|
+
/* @__PURE__ */ React6.createElement(
|
476
487
|
"svg",
|
477
488
|
{
|
478
489
|
"aria-label": "Chevron Right Icon",
|
@@ -484,7 +495,7 @@ var DropdownMenuSubTrigger = React7.forwardRef(({ className, inset, children, ..
|
|
484
495
|
width: "1em",
|
485
496
|
className: cn(props.dir === "rtl" ? "hawa-rotate-180" : "")
|
486
497
|
},
|
487
|
-
/* @__PURE__ */
|
498
|
+
/* @__PURE__ */ React6.createElement(
|
488
499
|
"path",
|
489
500
|
{
|
490
501
|
fillRule: "evenodd",
|
@@ -494,7 +505,7 @@ var DropdownMenuSubTrigger = React7.forwardRef(({ className, inset, children, ..
|
|
494
505
|
)
|
495
506
|
));
|
496
507
|
DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;
|
497
|
-
var DropdownMenuSubContent =
|
508
|
+
var DropdownMenuSubContent = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React6.createElement(
|
498
509
|
DropdownMenuPrimitive.SubContent,
|
499
510
|
{
|
500
511
|
ref,
|
@@ -506,7 +517,7 @@ var DropdownMenuSubContent = React7.forwardRef(({ className, ...props }, ref) =>
|
|
506
517
|
}
|
507
518
|
));
|
508
519
|
DropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;
|
509
|
-
var DropdownMenuContent =
|
520
|
+
var DropdownMenuContent = React6.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ React6.createElement(Portal, null, /* @__PURE__ */ React6.createElement(
|
510
521
|
DropdownMenuPrimitive.Content,
|
511
522
|
{
|
512
523
|
ref,
|
@@ -519,8 +530,8 @@ var DropdownMenuContent = React7.forwardRef(({ className, sideOffset = 4, ...pro
|
|
519
530
|
}
|
520
531
|
)));
|
521
532
|
DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
|
522
|
-
var DropdownMenuItem =
|
523
|
-
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(
|
524
535
|
DropdownMenuPrimitive.Item,
|
525
536
|
{
|
526
537
|
disabled: props.disabled,
|
@@ -533,14 +544,14 @@ var DropdownMenuItem = React7.forwardRef(({ className, inset, badged, slug, Link
|
|
533
544
|
),
|
534
545
|
...props
|
535
546
|
},
|
536
|
-
/* @__PURE__ */
|
547
|
+
/* @__PURE__ */ React6.createElement("div", { className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-2 " }, props.children),
|
537
548
|
props.end && props.end,
|
538
|
-
!props.end && props.shortcut && /* @__PURE__ */
|
539
|
-
!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" })
|
540
551
|
));
|
541
552
|
});
|
542
553
|
DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
|
543
|
-
var DropdownMenuCheckboxItem =
|
554
|
+
var DropdownMenuCheckboxItem = React6.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ React6.createElement(
|
544
555
|
DropdownMenuPrimitive.CheckboxItem,
|
545
556
|
{
|
546
557
|
ref,
|
@@ -551,7 +562,7 @@ var DropdownMenuCheckboxItem = React7.forwardRef(({ className, children, checked
|
|
551
562
|
checked,
|
552
563
|
...props
|
553
564
|
},
|
554
|
-
/* @__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(
|
555
566
|
"svg",
|
556
567
|
{
|
557
568
|
"aria-label": "Check Mark",
|
@@ -562,12 +573,12 @@ var DropdownMenuCheckboxItem = React7.forwardRef(({ className, children, checked
|
|
562
573
|
height: "0.60em",
|
563
574
|
width: "0.60em"
|
564
575
|
},
|
565
|
-
/* @__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" })
|
566
577
|
), " ")),
|
567
578
|
children
|
568
579
|
));
|
569
580
|
DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;
|
570
|
-
var DropdownMenuRadioItem =
|
581
|
+
var DropdownMenuRadioItem = React6.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ React6.createElement(
|
571
582
|
DropdownMenuPrimitive.RadioItem,
|
572
583
|
{
|
573
584
|
ref,
|
@@ -577,7 +588,7 @@ var DropdownMenuRadioItem = React7.forwardRef(({ className, children, ...props }
|
|
577
588
|
),
|
578
589
|
...props
|
579
590
|
},
|
580
|
-
/* @__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(
|
581
592
|
"svg",
|
582
593
|
{
|
583
594
|
xmlns: "http://www.w3.org/2000/svg",
|
@@ -592,12 +603,12 @@ var DropdownMenuRadioItem = React7.forwardRef(({ className, children, ...props }
|
|
592
603
|
strokeLinejoin: "round",
|
593
604
|
className: "hawa-h-2 hawa-w-2 hawa-fill-current"
|
594
605
|
},
|
595
|
-
/* @__PURE__ */
|
606
|
+
/* @__PURE__ */ React6.createElement("circle", { cx: "12", cy: "12", r: "10" })
|
596
607
|
))),
|
597
608
|
children
|
598
609
|
));
|
599
610
|
DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;
|
600
|
-
var DropdownMenuLabel =
|
611
|
+
var DropdownMenuLabel = React6.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ React6.createElement(
|
601
612
|
DropdownMenuPrimitive.Label,
|
602
613
|
{
|
603
614
|
ref,
|
@@ -610,7 +621,7 @@ var DropdownMenuLabel = React7.forwardRef(({ className, inset, ...props }, ref)
|
|
610
621
|
}
|
611
622
|
));
|
612
623
|
DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
|
613
|
-
var DropdownMenuSeparator =
|
624
|
+
var DropdownMenuSeparator = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React6.createElement(
|
614
625
|
DropdownMenuPrimitive.Separator,
|
615
626
|
{
|
616
627
|
ref,
|
@@ -623,7 +634,7 @@ var DropdownMenuShortcut = ({
|
|
623
634
|
className,
|
624
635
|
...props
|
625
636
|
}) => {
|
626
|
-
return /* @__PURE__ */
|
637
|
+
return /* @__PURE__ */ React6.createElement(
|
627
638
|
"span",
|
628
639
|
{
|
629
640
|
className: cn(
|
@@ -664,10 +675,10 @@ var DropdownMenu = ({
|
|
664
675
|
default: "hawa-px-2 hawa-py-3 ",
|
665
676
|
sm: "hawa-text-xs hawa-px-1.5 hawa-py-1.5 "
|
666
677
|
};
|
667
|
-
let [values, setValues] =
|
678
|
+
let [values, setValues] = React6.useState(
|
668
679
|
items.map((item) => item.currentOption)
|
669
680
|
);
|
670
|
-
return /* @__PURE__ */
|
681
|
+
return /* @__PURE__ */ React6.createElement(
|
671
682
|
DropdownMenuRoot,
|
672
683
|
{
|
673
684
|
onOpenChange,
|
@@ -675,7 +686,7 @@ var DropdownMenu = ({
|
|
675
686
|
modal: false,
|
676
687
|
dir: direction
|
677
688
|
},
|
678
|
-
/* @__PURE__ */
|
689
|
+
/* @__PURE__ */ React6.createElement(
|
679
690
|
DropdownMenuTrigger,
|
680
691
|
{
|
681
692
|
asChild: true,
|
@@ -684,7 +695,7 @@ var DropdownMenu = ({
|
|
684
695
|
},
|
685
696
|
trigger
|
686
697
|
),
|
687
|
-
/* @__PURE__ */
|
698
|
+
/* @__PURE__ */ React6.createElement(Portal, null, /* @__PURE__ */ React6.createElement(
|
688
699
|
DropdownMenuContent,
|
689
700
|
{
|
690
701
|
side,
|
@@ -705,12 +716,12 @@ var DropdownMenu = ({
|
|
705
716
|
var _a;
|
706
717
|
const ItemLinkComponent = item.slug ? LinkComponent : "a";
|
707
718
|
if (item.itemType === "separator") {
|
708
|
-
return /* @__PURE__ */
|
719
|
+
return /* @__PURE__ */ React6.createElement(DropdownMenuSeparator, { key: index });
|
709
720
|
} else if (item.itemType === "label") {
|
710
|
-
return /* @__PURE__ */
|
721
|
+
return /* @__PURE__ */ React6.createElement(DropdownMenuLabel, { key: index }, item.label);
|
711
722
|
} else if (item.itemType === "radio") {
|
712
723
|
let dd = item.currentOption;
|
713
|
-
return /* @__PURE__ */
|
724
|
+
return /* @__PURE__ */ React6.createElement(DropdownMenuSub, { key: index }, /* @__PURE__ */ React6.createElement(
|
714
725
|
DropdownMenuSubTrigger,
|
715
726
|
{
|
716
727
|
dir: direction,
|
@@ -718,7 +729,7 @@ var DropdownMenu = ({
|
|
718
729
|
},
|
719
730
|
item.icon && item.icon,
|
720
731
|
item.label && item.label
|
721
|
-
), /* @__PURE__ */
|
732
|
+
), /* @__PURE__ */ React6.createElement(DropdownMenuSubContent, null, /* @__PURE__ */ React6.createElement(
|
722
733
|
DropdownMenuRadioGroup,
|
723
734
|
{
|
724
735
|
value: values[index],
|
@@ -732,12 +743,12 @@ var DropdownMenu = ({
|
|
732
743
|
}
|
733
744
|
}
|
734
745
|
},
|
735
|
-
(_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))
|
736
747
|
)));
|
737
748
|
} else if (item.itemType === "custom") {
|
738
|
-
return /* @__PURE__ */
|
749
|
+
return /* @__PURE__ */ React6.createElement("div", { key: index }, item.content);
|
739
750
|
} else {
|
740
|
-
return item.subitems ? /* @__PURE__ */
|
751
|
+
return item.subitems ? /* @__PURE__ */ React6.createElement(DropdownMenuSub, { key: index }, /* @__PURE__ */ React6.createElement(
|
741
752
|
DropdownMenuSubTrigger,
|
742
753
|
{
|
743
754
|
dir: direction,
|
@@ -745,9 +756,9 @@ var DropdownMenu = ({
|
|
745
756
|
},
|
746
757
|
item.icon && item.icon,
|
747
758
|
item.label && item.label
|
748
|
-
), /* @__PURE__ */
|
759
|
+
), /* @__PURE__ */ React6.createElement(Portal, null, /* @__PURE__ */ React6.createElement(DropdownMenuSubContent, null, item.subitems.map((subitem, subIndex) => {
|
749
760
|
const SubitemLinkComponent = subitem.slug ? LinkComponent : "a";
|
750
|
-
return /* @__PURE__ */
|
761
|
+
return /* @__PURE__ */ React6.createElement(
|
751
762
|
DropdownMenuItem,
|
752
763
|
{
|
753
764
|
key: subIndex,
|
@@ -776,7 +787,7 @@ var DropdownMenu = ({
|
|
776
787
|
subitem.icon && subitem.icon,
|
777
788
|
subitem.label && subitem.label
|
778
789
|
);
|
779
|
-
})))) : /* @__PURE__ */
|
790
|
+
})))) : /* @__PURE__ */ React6.createElement(
|
780
791
|
DropdownMenuItem,
|
781
792
|
{
|
782
793
|
LinkComponent: ItemLinkComponent,
|
@@ -829,13 +840,43 @@ var DropdownMenu = ({
|
|
829
840
|
);
|
830
841
|
};
|
831
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
|
+
|
832
873
|
// layout/sidebar/Sidebar.tsx
|
833
|
-
import * as
|
874
|
+
import * as React11 from "react";
|
834
875
|
import * as AccordionPrimitive from "@radix-ui/react-accordion";
|
835
876
|
|
836
877
|
// elements/chip/Chip.tsx
|
837
|
-
import
|
838
|
-
var Chip =
|
878
|
+
import React10 from "react";
|
879
|
+
var Chip = React10.forwardRef(
|
839
880
|
({
|
840
881
|
label,
|
841
882
|
size = "normal",
|
@@ -877,7 +918,7 @@ var Chip = React8.forwardRef(
|
|
877
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"
|
878
919
|
};
|
879
920
|
if (label) {
|
880
|
-
return /* @__PURE__ */
|
921
|
+
return /* @__PURE__ */ React10.createElement(
|
881
922
|
"span",
|
882
923
|
{
|
883
924
|
...rest,
|
@@ -889,7 +930,7 @@ var Chip = React8.forwardRef(
|
|
889
930
|
color ? colorStyles[color] : "hawa-border hawa-bg-none"
|
890
931
|
)
|
891
932
|
},
|
892
|
-
dotType && /* @__PURE__ */
|
933
|
+
dotType && /* @__PURE__ */ React10.createElement(
|
893
934
|
"span",
|
894
935
|
{
|
895
936
|
className: cn(dotStyles[size], dotTypeStyles[dotType])
|
@@ -899,7 +940,7 @@ var Chip = React8.forwardRef(
|
|
899
940
|
label
|
900
941
|
);
|
901
942
|
} else {
|
902
|
-
return /* @__PURE__ */
|
943
|
+
return /* @__PURE__ */ React10.createElement(
|
903
944
|
"span",
|
904
945
|
{
|
905
946
|
...rest,
|
@@ -917,9 +958,9 @@ var Chip = React8.forwardRef(
|
|
917
958
|
// layout/sidebar/Sidebar.tsx
|
918
959
|
var Accordion = AccordionPrimitive.Root;
|
919
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";
|
920
|
-
var AccordionItem =
|
961
|
+
var AccordionItem = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React11.createElement(AccordionPrimitive.Item, { ref, className: cn(className), ...props }));
|
921
962
|
AccordionItem.displayName = "AccordionItem";
|
922
|
-
var AccordionTrigger =
|
963
|
+
var AccordionTrigger = React11.forwardRef(({ className, showArrow, children, ...props }, ref) => /* @__PURE__ */ React11.createElement(AccordionPrimitive.Header, { className: "flex" }, /* @__PURE__ */ React11.createElement(
|
923
964
|
AccordionPrimitive.Trigger,
|
924
965
|
{
|
925
966
|
ref,
|
@@ -927,7 +968,7 @@ var AccordionTrigger = React9.forwardRef(({ className, showArrow, children, ...p
|
|
927
968
|
...props
|
928
969
|
},
|
929
970
|
children,
|
930
|
-
showArrow && /* @__PURE__ */
|
971
|
+
showArrow && /* @__PURE__ */ React11.createElement(
|
931
972
|
"svg",
|
932
973
|
{
|
933
974
|
"aria-label": "Chevron Right Icon",
|
@@ -938,11 +979,11 @@ var AccordionTrigger = React9.forwardRef(({ className, showArrow, children, ...p
|
|
938
979
|
width: "1em",
|
939
980
|
className: "hawa-icon hawa-shrink-0 hawa-rotate-90 hawa-transition-transform hawa-duration-200"
|
940
981
|
},
|
941
|
-
/* @__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" })
|
942
983
|
)
|
943
984
|
)));
|
944
985
|
AccordionTrigger.displayName = AccordionPrimitive.Trigger.displayName;
|
945
|
-
var AccordionContent =
|
986
|
+
var AccordionContent = React11.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ React11.createElement(
|
946
987
|
AccordionPrimitive.Content,
|
947
988
|
{
|
948
989
|
ref,
|
@@ -952,7 +993,7 @@ var AccordionContent = React9.forwardRef(({ className, children, ...props }, ref
|
|
952
993
|
),
|
953
994
|
...props
|
954
995
|
},
|
955
|
-
/* @__PURE__ */
|
996
|
+
/* @__PURE__ */ React11.createElement("div", null, children)
|
956
997
|
));
|
957
998
|
AccordionContent.displayName = AccordionPrimitive.Content.displayName;
|
958
999
|
var SidebarGroup = ({
|
@@ -968,7 +1009,7 @@ var SidebarGroup = ({
|
|
968
1009
|
...props
|
969
1010
|
}) => {
|
970
1011
|
const LinkComponent = props.LinkComponent || "a";
|
971
|
-
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(
|
972
1013
|
Accordion,
|
973
1014
|
{
|
974
1015
|
value: openedItem,
|
@@ -979,7 +1020,7 @@ var SidebarGroup = ({
|
|
979
1020
|
collapsible: true,
|
980
1021
|
className: "hawa-flex hawa-flex-col hawa-gap-1"
|
981
1022
|
},
|
982
|
-
items.map((item, idx) => /* @__PURE__ */
|
1023
|
+
items.map((item, idx) => /* @__PURE__ */ React11.createElement(
|
983
1024
|
SidebarItem,
|
984
1025
|
{
|
985
1026
|
isOpen,
|
@@ -1007,14 +1048,14 @@ var SidebarItem = ({
|
|
1007
1048
|
return props.selectedItem === value ? "hawa-bg-primary/90 hawa-text-primary-foreground hawa-cursor-default" : "hover:hawa-bg-primary/10";
|
1008
1049
|
};
|
1009
1050
|
if (item.subitems) {
|
1010
|
-
return /* @__PURE__ */
|
1051
|
+
return /* @__PURE__ */ React11.createElement(
|
1011
1052
|
AccordionItem,
|
1012
1053
|
{
|
1013
1054
|
value: item.value,
|
1014
1055
|
className: "hawa-overflow-x-clip ",
|
1015
1056
|
dir: direction
|
1016
1057
|
},
|
1017
|
-
/* @__PURE__ */
|
1058
|
+
/* @__PURE__ */ React11.createElement(
|
1018
1059
|
AccordionTrigger,
|
1019
1060
|
{
|
1020
1061
|
className: cn(
|
@@ -1026,7 +1067,7 @@ var SidebarItem = ({
|
|
1026
1067
|
),
|
1027
1068
|
showArrow: isOpen
|
1028
1069
|
},
|
1029
|
-
/* @__PURE__ */
|
1070
|
+
/* @__PURE__ */ React11.createElement(
|
1030
1071
|
"div",
|
1031
1072
|
{
|
1032
1073
|
className: cn(
|
@@ -1034,7 +1075,7 @@ var SidebarItem = ({
|
|
1034
1075
|
)
|
1035
1076
|
},
|
1036
1077
|
item.icon && item.icon,
|
1037
|
-
/* @__PURE__ */
|
1078
|
+
/* @__PURE__ */ React11.createElement(
|
1038
1079
|
"span",
|
1039
1080
|
{
|
1040
1081
|
className: cn(
|
@@ -1046,14 +1087,14 @@ var SidebarItem = ({
|
|
1046
1087
|
)
|
1047
1088
|
)
|
1048
1089
|
),
|
1049
|
-
item.subitems && /* @__PURE__ */
|
1090
|
+
item.subitems && /* @__PURE__ */ React11.createElement(AccordionContent, { className: "hawa-mt-1 hawa-h-full hawa-rounded" }, /* @__PURE__ */ React11.createElement(
|
1050
1091
|
"div",
|
1051
1092
|
{
|
1052
1093
|
className: cn(
|
1053
1094
|
"hawa-flex hawa-h-full hawa-flex-col hawa-gap-2 hawa-bg-foreground/5 hawa-p-1"
|
1054
1095
|
)
|
1055
1096
|
},
|
1056
|
-
item.subitems.map((subitem, idx) => /* @__PURE__ */
|
1097
|
+
item.subitems.map((subitem, idx) => /* @__PURE__ */ React11.createElement(
|
1057
1098
|
LinkComponent,
|
1058
1099
|
{
|
1059
1100
|
href: subitem.slug,
|
@@ -1084,7 +1125,7 @@ var SidebarItem = ({
|
|
1084
1125
|
))
|
1085
1126
|
);
|
1086
1127
|
} else {
|
1087
|
-
return /* @__PURE__ */
|
1128
|
+
return /* @__PURE__ */ React11.createElement(
|
1088
1129
|
LinkComponent,
|
1089
1130
|
{
|
1090
1131
|
href: item.slug,
|
@@ -1108,7 +1149,7 @@ var SidebarItem = ({
|
|
1108
1149
|
"hawa-overflow-x-clip "
|
1109
1150
|
)
|
1110
1151
|
},
|
1111
|
-
/* @__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(
|
1112
1153
|
"span",
|
1113
1154
|
{
|
1114
1155
|
className: cn(
|
@@ -1118,7 +1159,7 @@ var SidebarItem = ({
|
|
1118
1159
|
},
|
1119
1160
|
item.label,
|
1120
1161
|
" ",
|
1121
|
-
item.badge && /* @__PURE__ */
|
1162
|
+
item.badge && /* @__PURE__ */ React11.createElement(Chip, { label: item.badge.label, color: "hyper", size: "small" })
|
1122
1163
|
))
|
1123
1164
|
);
|
1124
1165
|
}
|
@@ -1160,7 +1201,16 @@ var AppLayout = ({
|
|
1160
1201
|
);
|
1161
1202
|
const [openSideMenu, setOpenSideMenu] = useState2(true);
|
1162
1203
|
const [keepDrawerOpen, setKeepDrawerOpen] = useState2(keepOpen);
|
1163
|
-
|
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(() => {
|
1164
1214
|
if (typeof window !== "undefined") {
|
1165
1215
|
const resize = () => {
|
1166
1216
|
setSize(window.innerWidth);
|
@@ -1175,29 +1225,18 @@ var AppLayout = ({
|
|
1175
1225
|
};
|
1176
1226
|
}
|
1177
1227
|
}, []);
|
1178
|
-
|
1228
|
+
useEffect2(() => {
|
1179
1229
|
setKeepDrawerOpen(keepOpen);
|
1180
1230
|
}, [setKeepOpen]);
|
1181
|
-
|
1182
|
-
if (typeof window !== "undefined") {
|
1183
|
-
if (keepDrawerOpen)
|
1184
|
-
return;
|
1185
|
-
if (window.innerWidth < 600) {
|
1186
|
-
setKeepDrawerOpen(false);
|
1187
|
-
setOpenSideMenu(false);
|
1188
|
-
}
|
1189
|
-
}
|
1190
|
-
};
|
1191
|
-
const ref = useOutsideClick_default(handleClickOutside);
|
1192
|
-
const drawerSizeCondition = size > 600 ? drawerSizeStyle[keepDrawerOpen ? "opened" : "closed"][drawerSize] : 0;
|
1193
|
-
useEffect(() => {
|
1231
|
+
useEffect2(() => {
|
1194
1232
|
if (size > 600) {
|
1195
1233
|
setOpenSideMenu(keepDrawerOpen);
|
1196
1234
|
} else {
|
1197
1235
|
setOpenSideMenu(false);
|
1198
1236
|
}
|
1199
|
-
}, [size]);
|
1200
|
-
|
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(
|
1201
1240
|
"div",
|
1202
1241
|
{
|
1203
1242
|
dir: direction,
|
@@ -1206,7 +1245,7 @@ var AppLayout = ({
|
|
1206
1245
|
bordered && "hawa-border-b-[1px]"
|
1207
1246
|
)
|
1208
1247
|
},
|
1209
|
-
size > 600 ? /* @__PURE__ */
|
1248
|
+
size > 600 ? /* @__PURE__ */ React12.createElement(
|
1210
1249
|
"div",
|
1211
1250
|
{
|
1212
1251
|
className: cn(
|
@@ -1220,44 +1259,42 @@ var AppLayout = ({
|
|
1220
1259
|
props.pageTitle
|
1221
1260
|
) : (
|
1222
1261
|
// Mobile Drawer Menu Button
|
1223
|
-
/* @__PURE__ */
|
1262
|
+
/* @__PURE__ */ React12.createElement(
|
1224
1263
|
"div",
|
1225
1264
|
{
|
1226
1265
|
dir: direction,
|
1227
1266
|
className: "hawa-flex hawa-items-center hawa-justify-center hawa-gap-0.5"
|
1228
1267
|
},
|
1229
|
-
/* @__PURE__ */
|
1268
|
+
/* @__PURE__ */ React12.createElement(
|
1230
1269
|
"div",
|
1231
1270
|
{
|
1232
1271
|
onClick: () => setOpenSideMenu(true),
|
1233
1272
|
className: "hawa-z-40 hawa-mx-1 hawa-cursor-pointer hawa-rounded hawa-p-2 hawa-transition-all hover:hawa-bg-gray-100"
|
1234
1273
|
},
|
1235
|
-
/* @__PURE__ */
|
1274
|
+
/* @__PURE__ */ React12.createElement(MenuIcon, null)
|
1236
1275
|
),
|
1237
|
-
props.pageTitle ? /* @__PURE__ */
|
1276
|
+
props.pageTitle ? /* @__PURE__ */ React12.createElement("div", { className: "hawa-text-sm" }, props.pageTitle) : /* @__PURE__ */ React12.createElement("div", null)
|
1238
1277
|
)
|
1239
1278
|
),
|
1240
|
-
/* @__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(
|
1241
1280
|
DropdownMenu,
|
1242
1281
|
{
|
1243
1282
|
LinkComponent: MenuLinkComponent,
|
1244
1283
|
triggerClassname: "hawa-mx-2",
|
1245
1284
|
align: "end",
|
1246
|
-
alignOffset: 8,
|
1247
1285
|
side: "bottom",
|
1248
|
-
sideOffset:
|
1286
|
+
sideOffset: 10,
|
1249
1287
|
width: profileMenuWidth,
|
1250
1288
|
direction,
|
1251
1289
|
items: props.profileMenuItems || [],
|
1252
1290
|
onItemSelect: (e) => console.log("selecting item ", e),
|
1253
|
-
|
1254
|
-
trigger: /* @__PURE__ */ React10.createElement(
|
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
|
};
|