@sikka/hawa 0.31.10-next → 0.31.12-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.d.mts +1 -0
- package/dist/appLayout/index.d.ts +1 -0
- package/dist/appLayout/index.js +163 -143
- package/dist/appLayout/index.js.map +1 -1
- package/dist/appLayout/index.mjs +158 -138
- package/dist/appLayout/index.mjs.map +1 -1
- package/dist/blocks/index.js +199 -196
- package/dist/blocks/index.mjs +3 -3
- package/dist/blocks/misc/index.js +145 -142
- package/dist/blocks/misc/index.mjs +63 -60
- package/dist/{chunk-UDCDD66A.mjs → chunk-JU6Q4Q3T.mjs} +21 -1
- package/dist/{chunk-JXN2PVGT.mjs → chunk-VZNDYO6H.mjs} +1 -1
- package/dist/elements/index.js +253 -250
- package/dist/elements/index.mjs +3 -3
- package/dist/hooks/index.js +3 -0
- package/dist/hooks/index.mjs +2 -2
- package/dist/index.d.mts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +749 -729
- package/dist/index.mjs +679 -659
- package/dist/layout/index.d.mts +1 -0
- package/dist/layout/index.d.ts +1 -0
- package/dist/layout/index.js +271 -251
- package/dist/layout/index.mjs +30 -28
- package/dist/tabs/index.js +26 -23
- package/dist/tabs/index.js.map +1 -1
- package/dist/tabs/index.mjs +26 -23
- package/dist/tabs/index.mjs.map +1 -1
- package/package.json +12 -12
- /package/dist/{chunk-R2SKHHDK.mjs → chunk-OPYDG34F.mjs} +0 -0
package/dist/appLayout/index.mjs
CHANGED
@@ -1,7 +1,26 @@
|
|
1
1
|
"use client";
|
2
2
|
|
3
3
|
// layout/appLayout/AppLayout.tsx
|
4
|
-
import
|
4
|
+
import React8, { useEffect, useRef, useState as useState2 } from "react";
|
5
|
+
|
6
|
+
// hooks/useOutsideClick.ts
|
7
|
+
import React from "react";
|
8
|
+
var useOutsideClick = (callback) => {
|
9
|
+
const ref = React.useRef(null);
|
10
|
+
React.useEffect(() => {
|
11
|
+
const handleClick = (event) => {
|
12
|
+
if (ref.current && !ref.current.contains(event.target)) {
|
13
|
+
callback();
|
14
|
+
}
|
15
|
+
};
|
16
|
+
document.addEventListener("click", handleClick, true);
|
17
|
+
return () => {
|
18
|
+
document.removeEventListener("click", handleClick, true);
|
19
|
+
};
|
20
|
+
}, [ref]);
|
21
|
+
return ref;
|
22
|
+
};
|
23
|
+
var useOutsideClick_default = useOutsideClick;
|
5
24
|
|
6
25
|
// util/index.ts
|
7
26
|
import { clsx } from "clsx";
|
@@ -11,11 +30,11 @@ function cn(...inputs) {
|
|
11
30
|
}
|
12
31
|
|
13
32
|
// elements/button/Button.tsx
|
14
|
-
import * as
|
33
|
+
import * as React3 from "react";
|
15
34
|
import { cva } from "class-variance-authority";
|
16
35
|
|
17
36
|
// elements/loading/Loading.tsx
|
18
|
-
import
|
37
|
+
import React2 from "react";
|
19
38
|
var Loading = ({
|
20
39
|
design = "spinner",
|
21
40
|
size = "normal",
|
@@ -46,7 +65,7 @@ var Loading = ({
|
|
46
65
|
};
|
47
66
|
switch (design.split("-")[0]) {
|
48
67
|
case "dots":
|
49
|
-
return /* @__PURE__ */
|
68
|
+
return /* @__PURE__ */ React2.createElement(
|
50
69
|
"div",
|
51
70
|
{
|
52
71
|
className: cn(
|
@@ -54,7 +73,7 @@ var Loading = ({
|
|
54
73
|
classNames == null ? void 0 : classNames.container
|
55
74
|
)
|
56
75
|
},
|
57
|
-
/* @__PURE__ */
|
76
|
+
/* @__PURE__ */ React2.createElement(
|
58
77
|
"div",
|
59
78
|
{
|
60
79
|
className: cn(
|
@@ -65,7 +84,7 @@ var Loading = ({
|
|
65
84
|
)
|
66
85
|
}
|
67
86
|
),
|
68
|
-
/* @__PURE__ */
|
87
|
+
/* @__PURE__ */ React2.createElement(
|
69
88
|
"div",
|
70
89
|
{
|
71
90
|
className: cn(
|
@@ -76,7 +95,7 @@ var Loading = ({
|
|
76
95
|
)
|
77
96
|
}
|
78
97
|
),
|
79
|
-
/* @__PURE__ */
|
98
|
+
/* @__PURE__ */ React2.createElement(
|
80
99
|
"div",
|
81
100
|
{
|
82
101
|
className: cn(
|
@@ -89,7 +108,7 @@ var Loading = ({
|
|
89
108
|
)
|
90
109
|
);
|
91
110
|
case "square":
|
92
|
-
return /* @__PURE__ */
|
111
|
+
return /* @__PURE__ */ React2.createElement(
|
93
112
|
"svg",
|
94
113
|
{
|
95
114
|
className: cn(
|
@@ -101,7 +120,7 @@ var Loading = ({
|
|
101
120
|
height: "35",
|
102
121
|
width: "35"
|
103
122
|
},
|
104
|
-
/* @__PURE__ */
|
123
|
+
/* @__PURE__ */ React2.createElement(
|
105
124
|
"rect",
|
106
125
|
{
|
107
126
|
className: "squircle-track",
|
@@ -113,7 +132,7 @@ var Loading = ({
|
|
113
132
|
height: "32.5"
|
114
133
|
}
|
115
134
|
),
|
116
|
-
/* @__PURE__ */
|
135
|
+
/* @__PURE__ */ React2.createElement(
|
117
136
|
"rect",
|
118
137
|
{
|
119
138
|
className: "square-car",
|
@@ -128,7 +147,7 @@ var Loading = ({
|
|
128
147
|
)
|
129
148
|
);
|
130
149
|
case "squircle":
|
131
|
-
return /* @__PURE__ */
|
150
|
+
return /* @__PURE__ */ React2.createElement(
|
132
151
|
"svg",
|
133
152
|
{
|
134
153
|
x: "0px",
|
@@ -143,7 +162,7 @@ var Loading = ({
|
|
143
162
|
classNames == null ? void 0 : classNames.container
|
144
163
|
)
|
145
164
|
},
|
146
|
-
/* @__PURE__ */
|
165
|
+
/* @__PURE__ */ React2.createElement(
|
147
166
|
"path",
|
148
167
|
{
|
149
168
|
className: cn("squircle-track", classNames == null ? void 0 : classNames.track),
|
@@ -153,7 +172,7 @@ var Loading = ({
|
|
153
172
|
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"
|
154
173
|
}
|
155
174
|
),
|
156
|
-
/* @__PURE__ */
|
175
|
+
/* @__PURE__ */ React2.createElement(
|
157
176
|
"path",
|
158
177
|
{
|
159
178
|
className: cn("squircle-car", classNames == null ? void 0 : classNames.car),
|
@@ -165,7 +184,7 @@ var Loading = ({
|
|
165
184
|
)
|
166
185
|
);
|
167
186
|
case "progress":
|
168
|
-
return /* @__PURE__ */
|
187
|
+
return /* @__PURE__ */ React2.createElement(
|
169
188
|
"div",
|
170
189
|
{
|
171
190
|
className: cn(
|
@@ -176,9 +195,9 @@ var Loading = ({
|
|
176
195
|
}
|
177
196
|
);
|
178
197
|
case "orbit":
|
179
|
-
return /* @__PURE__ */
|
198
|
+
return /* @__PURE__ */ React2.createElement("div", { className: cn("orbit-container", classNames == null ? void 0 : classNames.container) });
|
180
199
|
default:
|
181
|
-
return /* @__PURE__ */
|
200
|
+
return /* @__PURE__ */ React2.createElement(
|
182
201
|
"svg",
|
183
202
|
{
|
184
203
|
viewBox: "0 0 40 40",
|
@@ -190,7 +209,7 @@ var Loading = ({
|
|
190
209
|
classNames == null ? void 0 : classNames.container
|
191
210
|
)
|
192
211
|
},
|
193
|
-
/* @__PURE__ */
|
212
|
+
/* @__PURE__ */ React2.createElement(
|
194
213
|
"circle",
|
195
214
|
{
|
196
215
|
className: cn(
|
@@ -209,7 +228,7 @@ var Loading = ({
|
|
209
228
|
pathLength: "100"
|
210
229
|
}
|
211
230
|
),
|
212
|
-
/* @__PURE__ */
|
231
|
+
/* @__PURE__ */ React2.createElement(
|
213
232
|
"circle",
|
214
233
|
{
|
215
234
|
className: cn(
|
@@ -266,7 +285,7 @@ var buttonVariants = cva(
|
|
266
285
|
}
|
267
286
|
}
|
268
287
|
);
|
269
|
-
var Button =
|
288
|
+
var Button = React3.forwardRef(
|
270
289
|
({
|
271
290
|
className,
|
272
291
|
variant,
|
@@ -279,7 +298,7 @@ var Button = React2.forwardRef(
|
|
279
298
|
}, ref) => {
|
280
299
|
const Comp = "button";
|
281
300
|
const loadingColor = variant === "outline" || variant === "ghost" || variant === "neoBrutalism" ? "hawa-bg-primary" : "hawa-bg-primary-foreground";
|
282
|
-
return /* @__PURE__ */
|
301
|
+
return /* @__PURE__ */ React3.createElement(
|
283
302
|
Comp,
|
284
303
|
{
|
285
304
|
className: cn(
|
@@ -289,7 +308,7 @@ var Button = React2.forwardRef(
|
|
289
308
|
ref,
|
290
309
|
...props
|
291
310
|
},
|
292
|
-
isLoading ? /* @__PURE__ */
|
311
|
+
isLoading ? /* @__PURE__ */ React3.createElement(
|
293
312
|
Loading,
|
294
313
|
{
|
295
314
|
design: size === "icon" || size === "smallIcon" ? "spinner" : "dots-pulse",
|
@@ -304,14 +323,14 @@ var Button = React2.forwardRef(
|
|
304
323
|
Button.displayName = "Button";
|
305
324
|
|
306
325
|
// elements/dropdownMenu/DropdownMenu.tsx
|
307
|
-
import * as
|
326
|
+
import * as React4 from "react";
|
308
327
|
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
|
309
328
|
var DropdownMenuRoot = DropdownMenuPrimitive.Root;
|
310
329
|
var DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
|
311
330
|
var DropdownMenuPortal = DropdownMenuPrimitive.Portal;
|
312
331
|
var DropdownMenuSub = DropdownMenuPrimitive.Sub;
|
313
332
|
var DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
|
314
|
-
var DropdownMenuSubTrigger =
|
333
|
+
var DropdownMenuSubTrigger = React4.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ React4.createElement(
|
315
334
|
DropdownMenuPrimitive.SubTrigger,
|
316
335
|
{
|
317
336
|
ref,
|
@@ -322,9 +341,9 @@ var DropdownMenuSubTrigger = React3.forwardRef(({ className, inset, children, ..
|
|
322
341
|
),
|
323
342
|
...props
|
324
343
|
},
|
325
|
-
/* @__PURE__ */
|
344
|
+
/* @__PURE__ */ React4.createElement("div", { className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-2" }, children),
|
326
345
|
" ",
|
327
|
-
/* @__PURE__ */
|
346
|
+
/* @__PURE__ */ React4.createElement(
|
328
347
|
"svg",
|
329
348
|
{
|
330
349
|
"aria-label": "Chevron Right Icon",
|
@@ -336,7 +355,7 @@ var DropdownMenuSubTrigger = React3.forwardRef(({ className, inset, children, ..
|
|
336
355
|
width: "1em",
|
337
356
|
className: cn(props.dir === "rtl" ? "hawa-rotate-180" : "")
|
338
357
|
},
|
339
|
-
/* @__PURE__ */
|
358
|
+
/* @__PURE__ */ React4.createElement(
|
340
359
|
"path",
|
341
360
|
{
|
342
361
|
fillRule: "evenodd",
|
@@ -346,7 +365,7 @@ var DropdownMenuSubTrigger = React3.forwardRef(({ className, inset, children, ..
|
|
346
365
|
)
|
347
366
|
));
|
348
367
|
DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;
|
349
|
-
var DropdownMenuSubContent =
|
368
|
+
var DropdownMenuSubContent = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React4.createElement(
|
350
369
|
DropdownMenuPrimitive.SubContent,
|
351
370
|
{
|
352
371
|
ref,
|
@@ -358,7 +377,7 @@ var DropdownMenuSubContent = React3.forwardRef(({ className, ...props }, ref) =>
|
|
358
377
|
}
|
359
378
|
));
|
360
379
|
DropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;
|
361
|
-
var DropdownMenuContent =
|
380
|
+
var DropdownMenuContent = React4.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ React4.createElement(DropdownMenuPrimitive.Portal, null, /* @__PURE__ */ React4.createElement(
|
362
381
|
DropdownMenuPrimitive.Content,
|
363
382
|
{
|
364
383
|
ref,
|
@@ -371,8 +390,8 @@ var DropdownMenuContent = React3.forwardRef(({ className, sideOffset = 4, ...pro
|
|
371
390
|
}
|
372
391
|
)));
|
373
392
|
DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
|
374
|
-
var DropdownMenuItem =
|
375
|
-
return /* @__PURE__ */
|
393
|
+
var DropdownMenuItem = React4.forwardRef(({ className, inset, badged, slug, LinkComponent, ...props }, ref) => {
|
394
|
+
return /* @__PURE__ */ React4.createElement(LinkComponent, { href: slug }, /* @__PURE__ */ React4.createElement(
|
376
395
|
DropdownMenuPrimitive.Item,
|
377
396
|
{
|
378
397
|
disabled: props.disabled,
|
@@ -385,14 +404,14 @@ var DropdownMenuItem = React3.forwardRef(({ className, inset, badged, slug, Link
|
|
385
404
|
),
|
386
405
|
...props
|
387
406
|
},
|
388
|
-
/* @__PURE__ */
|
407
|
+
/* @__PURE__ */ React4.createElement("div", { className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-2 " }, props.children),
|
389
408
|
props.end && props.end,
|
390
|
-
!props.end && props.shortcut && /* @__PURE__ */
|
391
|
-
!props.end && badged && /* @__PURE__ */
|
409
|
+
!props.end && props.shortcut && /* @__PURE__ */ React4.createElement(DropdownMenuShortcut, null, props.shortcut),
|
410
|
+
!props.end && badged && /* @__PURE__ */ React4.createElement("div", { className: "hawa-h-3 hawa-w-3 hawa-rounded-full hawa-bg-red-500" })
|
392
411
|
));
|
393
412
|
});
|
394
413
|
DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
|
395
|
-
var DropdownMenuCheckboxItem =
|
414
|
+
var DropdownMenuCheckboxItem = React4.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ React4.createElement(
|
396
415
|
DropdownMenuPrimitive.CheckboxItem,
|
397
416
|
{
|
398
417
|
ref,
|
@@ -403,7 +422,7 @@ var DropdownMenuCheckboxItem = React3.forwardRef(({ className, children, checked
|
|
403
422
|
checked,
|
404
423
|
...props
|
405
424
|
},
|
406
|
-
/* @__PURE__ */
|
425
|
+
/* @__PURE__ */ React4.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__ */ React4.createElement(DropdownMenuPrimitive.ItemIndicator, null, /* @__PURE__ */ React4.createElement(
|
407
426
|
"svg",
|
408
427
|
{
|
409
428
|
"aria-label": "Check Mark",
|
@@ -414,12 +433,12 @@ var DropdownMenuCheckboxItem = React3.forwardRef(({ className, children, checked
|
|
414
433
|
height: "0.60em",
|
415
434
|
width: "0.60em"
|
416
435
|
},
|
417
|
-
/* @__PURE__ */
|
436
|
+
/* @__PURE__ */ React4.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" })
|
418
437
|
), " ")),
|
419
438
|
children
|
420
439
|
));
|
421
440
|
DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;
|
422
|
-
var DropdownMenuRadioItem =
|
441
|
+
var DropdownMenuRadioItem = React4.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ React4.createElement(
|
423
442
|
DropdownMenuPrimitive.RadioItem,
|
424
443
|
{
|
425
444
|
ref,
|
@@ -429,7 +448,7 @@ var DropdownMenuRadioItem = React3.forwardRef(({ className, children, ...props }
|
|
429
448
|
),
|
430
449
|
...props
|
431
450
|
},
|
432
|
-
/* @__PURE__ */
|
451
|
+
/* @__PURE__ */ React4.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__ */ React4.createElement(DropdownMenuPrimitive.ItemIndicator, null, /* @__PURE__ */ React4.createElement(
|
433
452
|
"svg",
|
434
453
|
{
|
435
454
|
xmlns: "http://www.w3.org/2000/svg",
|
@@ -444,12 +463,12 @@ var DropdownMenuRadioItem = React3.forwardRef(({ className, children, ...props }
|
|
444
463
|
strokeLinejoin: "round",
|
445
464
|
className: "hawa-h-2 hawa-w-2 hawa-fill-current"
|
446
465
|
},
|
447
|
-
/* @__PURE__ */
|
466
|
+
/* @__PURE__ */ React4.createElement("circle", { cx: "12", cy: "12", r: "10" })
|
448
467
|
))),
|
449
468
|
children
|
450
469
|
));
|
451
470
|
DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;
|
452
|
-
var DropdownMenuLabel =
|
471
|
+
var DropdownMenuLabel = React4.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ React4.createElement(
|
453
472
|
DropdownMenuPrimitive.Label,
|
454
473
|
{
|
455
474
|
ref,
|
@@ -462,7 +481,7 @@ var DropdownMenuLabel = React3.forwardRef(({ className, inset, ...props }, ref)
|
|
462
481
|
}
|
463
482
|
));
|
464
483
|
DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
|
465
|
-
var DropdownMenuSeparator =
|
484
|
+
var DropdownMenuSeparator = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React4.createElement(
|
466
485
|
DropdownMenuPrimitive.Separator,
|
467
486
|
{
|
468
487
|
ref,
|
@@ -475,7 +494,7 @@ var DropdownMenuShortcut = ({
|
|
475
494
|
className,
|
476
495
|
...props
|
477
496
|
}) => {
|
478
|
-
return /* @__PURE__ */
|
497
|
+
return /* @__PURE__ */ React4.createElement(
|
479
498
|
"span",
|
480
499
|
{
|
481
500
|
className: cn(
|
@@ -515,10 +534,10 @@ var DropdownMenu = ({
|
|
515
534
|
default: "hawa-px-2 hawa-py-3 ",
|
516
535
|
sm: "hawa-text-xs hawa-px-1.5 hawa-py-1.5 "
|
517
536
|
};
|
518
|
-
let [values, setValues] =
|
537
|
+
let [values, setValues] = React4.useState(
|
519
538
|
items.map((item) => item.currentOption)
|
520
539
|
);
|
521
|
-
return /* @__PURE__ */
|
540
|
+
return /* @__PURE__ */ React4.createElement(
|
522
541
|
DropdownMenuRoot,
|
523
542
|
{
|
524
543
|
onOpenChange,
|
@@ -526,8 +545,8 @@ var DropdownMenu = ({
|
|
526
545
|
modal: false,
|
527
546
|
dir: direction
|
528
547
|
},
|
529
|
-
/* @__PURE__ */
|
530
|
-
/* @__PURE__ */
|
548
|
+
/* @__PURE__ */ React4.createElement(DropdownMenuTrigger, { asChild: true, className: triggerClassname }, trigger),
|
549
|
+
/* @__PURE__ */ React4.createElement(DropdownMenuPortal, null, /* @__PURE__ */ React4.createElement(
|
531
550
|
DropdownMenuContent,
|
532
551
|
{
|
533
552
|
side,
|
@@ -548,12 +567,12 @@ var DropdownMenu = ({
|
|
548
567
|
var _a;
|
549
568
|
const ItemLinkComponent = item.slug ? LinkComponent : "a";
|
550
569
|
if (item.itemType === "separator") {
|
551
|
-
return /* @__PURE__ */
|
570
|
+
return /* @__PURE__ */ React4.createElement(DropdownMenuSeparator, { key: index });
|
552
571
|
} else if (item.itemType === "label") {
|
553
|
-
return /* @__PURE__ */
|
572
|
+
return /* @__PURE__ */ React4.createElement(DropdownMenuLabel, { key: index }, item.label);
|
554
573
|
} else if (item.itemType === "radio") {
|
555
574
|
let dd = item.currentOption;
|
556
|
-
return /* @__PURE__ */
|
575
|
+
return /* @__PURE__ */ React4.createElement(DropdownMenuSub, { key: index }, /* @__PURE__ */ React4.createElement(
|
557
576
|
DropdownMenuSubTrigger,
|
558
577
|
{
|
559
578
|
dir: direction,
|
@@ -561,7 +580,7 @@ var DropdownMenu = ({
|
|
561
580
|
},
|
562
581
|
item.icon && item.icon,
|
563
582
|
item.label && item.label
|
564
|
-
), /* @__PURE__ */
|
583
|
+
), /* @__PURE__ */ React4.createElement(DropdownMenuSubContent, null, /* @__PURE__ */ React4.createElement(
|
565
584
|
DropdownMenuRadioGroup,
|
566
585
|
{
|
567
586
|
value: values[index],
|
@@ -575,12 +594,12 @@ var DropdownMenu = ({
|
|
575
594
|
}
|
576
595
|
}
|
577
596
|
},
|
578
|
-
(_a = item.options) == null ? void 0 : _a.map((opt, i) => /* @__PURE__ */
|
597
|
+
(_a = item.options) == null ? void 0 : _a.map((opt, i) => /* @__PURE__ */ React4.createElement(DropdownMenuRadioItem, { key: i, value: opt.value }, opt.label))
|
579
598
|
)));
|
580
599
|
} else if (item.itemType === "custom") {
|
581
|
-
return /* @__PURE__ */
|
600
|
+
return /* @__PURE__ */ React4.createElement("div", { key: index }, item.content);
|
582
601
|
} else {
|
583
|
-
return item.subitems ? /* @__PURE__ */
|
602
|
+
return item.subitems ? /* @__PURE__ */ React4.createElement(DropdownMenuSub, { key: index }, /* @__PURE__ */ React4.createElement(
|
584
603
|
DropdownMenuSubTrigger,
|
585
604
|
{
|
586
605
|
dir: direction,
|
@@ -588,9 +607,9 @@ var DropdownMenu = ({
|
|
588
607
|
},
|
589
608
|
item.icon && item.icon,
|
590
609
|
item.label && item.label
|
591
|
-
), /* @__PURE__ */
|
610
|
+
), /* @__PURE__ */ React4.createElement(DropdownMenuPortal, null, /* @__PURE__ */ React4.createElement(DropdownMenuSubContent, null, item.subitems.map((subitem, subIndex) => {
|
592
611
|
const SubitemLinkComponent = subitem.slug ? LinkComponent : "a";
|
593
|
-
return /* @__PURE__ */
|
612
|
+
return /* @__PURE__ */ React4.createElement(
|
594
613
|
DropdownMenuItem,
|
595
614
|
{
|
596
615
|
key: subIndex,
|
@@ -619,7 +638,7 @@ var DropdownMenu = ({
|
|
619
638
|
subitem.icon && subitem.icon,
|
620
639
|
subitem.label && subitem.label
|
621
640
|
);
|
622
|
-
})))) : /* @__PURE__ */
|
641
|
+
})))) : /* @__PURE__ */ React4.createElement(
|
623
642
|
DropdownMenuItem,
|
624
643
|
{
|
625
644
|
LinkComponent: ItemLinkComponent,
|
@@ -673,9 +692,9 @@ var DropdownMenu = ({
|
|
673
692
|
};
|
674
693
|
|
675
694
|
// elements/tooltip/Tooltip.tsx
|
676
|
-
import
|
695
|
+
import React5 from "react";
|
677
696
|
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
678
|
-
var TooltipContent =
|
697
|
+
var TooltipContent = React5.forwardRef(({ className, sideOffset = 4, size = "default", ...props }, ref) => /* @__PURE__ */ React5.createElement(
|
679
698
|
TooltipPrimitive.Content,
|
680
699
|
{
|
681
700
|
ref,
|
@@ -692,7 +711,7 @@ var TooltipContent = React4.forwardRef(({ className, sideOffset = 4, size = "def
|
|
692
711
|
}
|
693
712
|
));
|
694
713
|
TooltipContent.displayName = TooltipPrimitive.Content.displayName;
|
695
|
-
var TooltipArrow =
|
714
|
+
var TooltipArrow = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React5.createElement(TooltipPrimitive.Arrow, { ref, className: cn(className), ...props }));
|
696
715
|
TooltipArrow.displayName = TooltipPrimitive.Arrow.displayName;
|
697
716
|
var Tooltip = ({
|
698
717
|
side,
|
@@ -709,13 +728,13 @@ var Tooltip = ({
|
|
709
728
|
delayDuration = 300,
|
710
729
|
...props
|
711
730
|
}) => {
|
712
|
-
return /* @__PURE__ */
|
731
|
+
return /* @__PURE__ */ React5.createElement(
|
713
732
|
TooltipPrimitive.TooltipProvider,
|
714
733
|
{
|
715
734
|
delayDuration,
|
716
735
|
...providerProps
|
717
736
|
},
|
718
|
-
/* @__PURE__ */
|
737
|
+
/* @__PURE__ */ React5.createElement(
|
719
738
|
TooltipPrimitive.Root,
|
720
739
|
{
|
721
740
|
open: !disabled && open,
|
@@ -723,8 +742,8 @@ var Tooltip = ({
|
|
723
742
|
onOpenChange,
|
724
743
|
...props
|
725
744
|
},
|
726
|
-
/* @__PURE__ */
|
727
|
-
/* @__PURE__ */
|
745
|
+
/* @__PURE__ */ React5.createElement(TooltipPrimitive.Trigger, { ...triggerProps }, children),
|
746
|
+
/* @__PURE__ */ React5.createElement(
|
728
747
|
TooltipContent,
|
729
748
|
{
|
730
749
|
size,
|
@@ -744,12 +763,12 @@ var Tooltip = ({
|
|
744
763
|
};
|
745
764
|
|
746
765
|
// layout/sidebar/Sidebar.tsx
|
747
|
-
import * as
|
766
|
+
import * as React7 from "react";
|
748
767
|
import * as AccordionPrimitive from "@radix-ui/react-accordion";
|
749
768
|
|
750
769
|
// elements/chip/Chip.tsx
|
751
|
-
import
|
752
|
-
var Chip =
|
770
|
+
import React6 from "react";
|
771
|
+
var Chip = React6.forwardRef(
|
753
772
|
({
|
754
773
|
label,
|
755
774
|
size = "normal",
|
@@ -791,7 +810,7 @@ var Chip = React5.forwardRef(
|
|
791
810
|
oceanic: "hawa-text-white hawa-bg-gradient-to-bl hawa-from-green-300 hawa-via-blue-500 hawa-to-purple-600"
|
792
811
|
};
|
793
812
|
if (label) {
|
794
|
-
return /* @__PURE__ */
|
813
|
+
return /* @__PURE__ */ React6.createElement(
|
795
814
|
"span",
|
796
815
|
{
|
797
816
|
...rest,
|
@@ -803,7 +822,7 @@ var Chip = React5.forwardRef(
|
|
803
822
|
color ? colorStyles[color] : "hawa-border hawa-bg-none"
|
804
823
|
)
|
805
824
|
},
|
806
|
-
dotType && /* @__PURE__ */
|
825
|
+
dotType && /* @__PURE__ */ React6.createElement(
|
807
826
|
"span",
|
808
827
|
{
|
809
828
|
className: cn(dotStyles[size], dotTypeStyles[dotType])
|
@@ -813,7 +832,7 @@ var Chip = React5.forwardRef(
|
|
813
832
|
label
|
814
833
|
);
|
815
834
|
} else {
|
816
|
-
return /* @__PURE__ */
|
835
|
+
return /* @__PURE__ */ React6.createElement(
|
817
836
|
"span",
|
818
837
|
{
|
819
838
|
...rest,
|
@@ -831,9 +850,9 @@ var Chip = React5.forwardRef(
|
|
831
850
|
// layout/sidebar/Sidebar.tsx
|
832
851
|
var Accordion = AccordionPrimitive.Root;
|
833
852
|
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";
|
834
|
-
var AccordionItem =
|
853
|
+
var AccordionItem = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React7.createElement(AccordionPrimitive.Item, { ref, className: cn(className), ...props }));
|
835
854
|
AccordionItem.displayName = "AccordionItem";
|
836
|
-
var AccordionTrigger =
|
855
|
+
var AccordionTrigger = React7.forwardRef(({ className, showArrow, children, ...props }, ref) => /* @__PURE__ */ React7.createElement(AccordionPrimitive.Header, { className: "flex" }, /* @__PURE__ */ React7.createElement(
|
837
856
|
AccordionPrimitive.Trigger,
|
838
857
|
{
|
839
858
|
ref,
|
@@ -841,7 +860,7 @@ var AccordionTrigger = React6.forwardRef(({ className, showArrow, children, ...p
|
|
841
860
|
...props
|
842
861
|
},
|
843
862
|
children,
|
844
|
-
showArrow && /* @__PURE__ */
|
863
|
+
showArrow && /* @__PURE__ */ React7.createElement(
|
845
864
|
"svg",
|
846
865
|
{
|
847
866
|
"aria-label": "Chevron Right Icon",
|
@@ -852,11 +871,11 @@ var AccordionTrigger = React6.forwardRef(({ className, showArrow, children, ...p
|
|
852
871
|
width: "1em",
|
853
872
|
className: "hawa-icon hawa-shrink-0 hawa-rotate-90 hawa-transition-transform hawa-duration-200"
|
854
873
|
},
|
855
|
-
/* @__PURE__ */
|
874
|
+
/* @__PURE__ */ React7.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" })
|
856
875
|
)
|
857
876
|
)));
|
858
877
|
AccordionTrigger.displayName = AccordionPrimitive.Trigger.displayName;
|
859
|
-
var AccordionContent =
|
878
|
+
var AccordionContent = React7.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ React7.createElement(
|
860
879
|
AccordionPrimitive.Content,
|
861
880
|
{
|
862
881
|
ref,
|
@@ -866,7 +885,7 @@ var AccordionContent = React6.forwardRef(({ className, children, ...props }, ref
|
|
866
885
|
),
|
867
886
|
...props
|
868
887
|
},
|
869
|
-
/* @__PURE__ */
|
888
|
+
/* @__PURE__ */ React7.createElement("div", null, children)
|
870
889
|
));
|
871
890
|
AccordionContent.displayName = AccordionPrimitive.Content.displayName;
|
872
891
|
var SidebarGroup = ({
|
@@ -882,7 +901,7 @@ var SidebarGroup = ({
|
|
882
901
|
...props
|
883
902
|
}) => {
|
884
903
|
const LinkComponent = props.LinkComponent || "a";
|
885
|
-
return /* @__PURE__ */
|
904
|
+
return /* @__PURE__ */ React7.createElement("div", { className: "hawa-m-2" }, title && /* @__PURE__ */ React7.createElement("h3", { className: "hawa-mb-1 hawa-font-bold" }, title), /* @__PURE__ */ React7.createElement("ul", { className: "hawa-flex hawa-flex-col hawa-gap-2" }, /* @__PURE__ */ React7.createElement(
|
886
905
|
Accordion,
|
887
906
|
{
|
888
907
|
value: openedItem,
|
@@ -893,7 +912,7 @@ var SidebarGroup = ({
|
|
893
912
|
collapsible: true,
|
894
913
|
className: "hawa-flex hawa-flex-col hawa-gap-1"
|
895
914
|
},
|
896
|
-
items.map((item, idx) => /* @__PURE__ */
|
915
|
+
items.map((item, idx) => /* @__PURE__ */ React7.createElement(
|
897
916
|
SidebarItem,
|
898
917
|
{
|
899
918
|
isOpen,
|
@@ -921,14 +940,14 @@ var SidebarItem = ({
|
|
921
940
|
return props.selectedItem === value ? "hawa-bg-primary/90 hawa-text-primary-foreground hawa-cursor-default" : "hover:hawa-bg-primary/10";
|
922
941
|
};
|
923
942
|
if (item.subitems) {
|
924
|
-
return /* @__PURE__ */
|
943
|
+
return /* @__PURE__ */ React7.createElement(
|
925
944
|
AccordionItem,
|
926
945
|
{
|
927
946
|
value: item.value,
|
928
947
|
className: "hawa-overflow-x-clip ",
|
929
948
|
dir: direction
|
930
949
|
},
|
931
|
-
/* @__PURE__ */
|
950
|
+
/* @__PURE__ */ React7.createElement(
|
932
951
|
AccordionTrigger,
|
933
952
|
{
|
934
953
|
className: cn(
|
@@ -940,7 +959,7 @@ var SidebarItem = ({
|
|
940
959
|
),
|
941
960
|
showArrow: isOpen
|
942
961
|
},
|
943
|
-
/* @__PURE__ */
|
962
|
+
/* @__PURE__ */ React7.createElement(
|
944
963
|
"div",
|
945
964
|
{
|
946
965
|
className: cn(
|
@@ -948,7 +967,7 @@ var SidebarItem = ({
|
|
948
967
|
)
|
949
968
|
},
|
950
969
|
item.icon && item.icon,
|
951
|
-
/* @__PURE__ */
|
970
|
+
/* @__PURE__ */ React7.createElement(
|
952
971
|
"span",
|
953
972
|
{
|
954
973
|
className: cn(
|
@@ -960,14 +979,14 @@ var SidebarItem = ({
|
|
960
979
|
)
|
961
980
|
)
|
962
981
|
),
|
963
|
-
item.subitems && /* @__PURE__ */
|
982
|
+
item.subitems && /* @__PURE__ */ React7.createElement(AccordionContent, { className: "hawa-mt-1 hawa-h-full hawa-rounded" }, /* @__PURE__ */ React7.createElement(
|
964
983
|
"div",
|
965
984
|
{
|
966
985
|
className: cn(
|
967
986
|
"hawa-flex hawa-h-full hawa-flex-col hawa-gap-2 hawa-bg-foreground/5 hawa-p-1"
|
968
987
|
)
|
969
988
|
},
|
970
|
-
item.subitems.map((subitem, idx) => /* @__PURE__ */
|
989
|
+
item.subitems.map((subitem, idx) => /* @__PURE__ */ React7.createElement(
|
971
990
|
LinkComponent,
|
972
991
|
{
|
973
992
|
href: subitem.slug,
|
@@ -998,7 +1017,7 @@ var SidebarItem = ({
|
|
998
1017
|
))
|
999
1018
|
);
|
1000
1019
|
} else {
|
1001
|
-
return /* @__PURE__ */
|
1020
|
+
return /* @__PURE__ */ React7.createElement(
|
1002
1021
|
LinkComponent,
|
1003
1022
|
{
|
1004
1023
|
href: item.slug,
|
@@ -1022,7 +1041,7 @@ var SidebarItem = ({
|
|
1022
1041
|
"hawa-overflow-x-clip "
|
1023
1042
|
)
|
1024
1043
|
},
|
1025
|
-
/* @__PURE__ */
|
1044
|
+
/* @__PURE__ */ React7.createElement("div", { className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-2" }, item.icon && item.icon, /* @__PURE__ */ React7.createElement(
|
1026
1045
|
"span",
|
1027
1046
|
{
|
1028
1047
|
className: cn(
|
@@ -1032,7 +1051,7 @@ var SidebarItem = ({
|
|
1032
1051
|
},
|
1033
1052
|
item.label,
|
1034
1053
|
" ",
|
1035
|
-
item.badge && /* @__PURE__ */
|
1054
|
+
item.badge && /* @__PURE__ */ React7.createElement(Chip, { label: item.badge.label, color: "hyper", size: "small" })
|
1036
1055
|
))
|
1037
1056
|
);
|
1038
1057
|
}
|
@@ -1053,6 +1072,7 @@ var AppLayout = ({
|
|
1053
1072
|
keepOpen,
|
1054
1073
|
DrawerLinkComponent,
|
1055
1074
|
MenuLinkComponent,
|
1075
|
+
onAvatarClick,
|
1056
1076
|
...props
|
1057
1077
|
}) => {
|
1058
1078
|
var _a, _b;
|
@@ -1066,11 +1086,15 @@ var AppLayout = ({
|
|
1066
1086
|
lg: closeDrawerWidth
|
1067
1087
|
}
|
1068
1088
|
};
|
1069
|
-
const
|
1089
|
+
const drawerRef = useRef(null);
|
1070
1090
|
const isRTL = direction === "rtl";
|
1071
1091
|
const [openedSidebarItem, setOpenedSidebarItem] = useState2("");
|
1072
1092
|
const [size, setSize] = useState2(1200);
|
1073
1093
|
const [openSideMenu, setOpenSideMenu] = useState2(true);
|
1094
|
+
const handleClickOutside = () => {
|
1095
|
+
setOpenSideMenu(false);
|
1096
|
+
};
|
1097
|
+
const ref = useOutsideClick_default(handleClickOutside);
|
1074
1098
|
const drawerSizeCondition = size > 600 ? drawerSizeStyle[keepOpen ? "opened" : "closed"][drawerSize] : 0;
|
1075
1099
|
useEffect(() => {
|
1076
1100
|
if (typeof window !== "undefined") {
|
@@ -1091,18 +1115,7 @@ var AppLayout = ({
|
|
1091
1115
|
setOpenSideMenu(false);
|
1092
1116
|
}
|
1093
1117
|
}, [size]);
|
1094
|
-
|
1095
|
-
const handleClickOutside = (event) => {
|
1096
|
-
if (ref.current && !ref.current.contains(event.target) && !keepOpen) {
|
1097
|
-
setOpenSideMenu(false);
|
1098
|
-
}
|
1099
|
-
};
|
1100
|
-
document.addEventListener("click", handleClickOutside, true);
|
1101
|
-
return () => {
|
1102
|
-
document.removeEventListener("click", handleClickOutside, true);
|
1103
|
-
};
|
1104
|
-
}, [keepOpen]);
|
1105
|
-
return /* @__PURE__ */ React7.createElement("div", { className: "hawa-fixed hawa-left-0" }, props.topBar && /* @__PURE__ */ React7.createElement(
|
1118
|
+
return /* @__PURE__ */ React8.createElement("div", { className: "hawa-fixed hawa-left-0" }, props.topBar && /* @__PURE__ */ React8.createElement(
|
1106
1119
|
"div",
|
1107
1120
|
{
|
1108
1121
|
className: cn(
|
@@ -1111,7 +1124,7 @@ var AppLayout = ({
|
|
1111
1124
|
bordered && "hawa-border-b-[1px]"
|
1112
1125
|
)
|
1113
1126
|
},
|
1114
|
-
size > 600 ? /* @__PURE__ */
|
1127
|
+
size > 600 ? /* @__PURE__ */ React8.createElement(
|
1115
1128
|
"div",
|
1116
1129
|
{
|
1117
1130
|
className: cn(
|
@@ -1133,24 +1146,24 @@ var AppLayout = ({
|
|
1133
1146
|
props.pageTitle
|
1134
1147
|
) : (
|
1135
1148
|
// Mobile Drawer Menu Button
|
1136
|
-
/* @__PURE__ */
|
1149
|
+
/* @__PURE__ */ React8.createElement(
|
1137
1150
|
"div",
|
1138
1151
|
{
|
1139
1152
|
dir: direction,
|
1140
1153
|
className: "hawa-flex hawa-items-center hawa-justify-center hawa-gap-0.5"
|
1141
1154
|
},
|
1142
|
-
/* @__PURE__ */
|
1155
|
+
/* @__PURE__ */ React8.createElement(
|
1143
1156
|
"div",
|
1144
1157
|
{
|
1145
1158
|
onClick: () => setOpenSideMenu(true),
|
1146
1159
|
className: "hawa-z-40 hawa-mx-1 hawa-cursor-pointer hawa-rounded hawa-p-2 hawa-transition-all hover:hawa-bg-gray-100"
|
1147
1160
|
},
|
1148
|
-
/* @__PURE__ */
|
1161
|
+
/* @__PURE__ */ React8.createElement(MenuIcon, null)
|
1149
1162
|
),
|
1150
|
-
props.pageTitle ? /* @__PURE__ */
|
1163
|
+
props.pageTitle ? /* @__PURE__ */ React8.createElement("div", { className: "hawa-text-sm" }, props.pageTitle) : /* @__PURE__ */ React8.createElement("div", null)
|
1151
1164
|
)
|
1152
1165
|
),
|
1153
|
-
/* @__PURE__ */
|
1166
|
+
/* @__PURE__ */ React8.createElement(
|
1154
1167
|
"div",
|
1155
1168
|
{
|
1156
1169
|
className: cn(
|
@@ -1158,16 +1171,16 @@ var AppLayout = ({
|
|
1158
1171
|
isRTL ? "hawa-flex-row-reverse" : "hawa-flex-row"
|
1159
1172
|
)
|
1160
1173
|
},
|
1161
|
-
size > 600 ? /* @__PURE__ */
|
1174
|
+
size > 600 ? /* @__PURE__ */ React8.createElement(
|
1162
1175
|
"div",
|
1163
1176
|
{
|
1164
1177
|
className: isRTL ? "hawa-text-left hawa-text-xs" : "hawa-text-right hawa-text-xs"
|
1165
1178
|
},
|
1166
|
-
/* @__PURE__ */
|
1179
|
+
/* @__PURE__ */ React8.createElement("div", { className: "hawa-font-bold" }, props.username),
|
1167
1180
|
" ",
|
1168
|
-
/* @__PURE__ */
|
1181
|
+
/* @__PURE__ */ React8.createElement("div", null, props.email)
|
1169
1182
|
) : null,
|
1170
|
-
/* @__PURE__ */
|
1183
|
+
/* @__PURE__ */ React8.createElement(
|
1171
1184
|
DropdownMenu,
|
1172
1185
|
{
|
1173
1186
|
LinkComponent: MenuLinkComponent,
|
@@ -1180,31 +1193,38 @@ var AppLayout = ({
|
|
1180
1193
|
direction: isRTL ? "rtl" : "ltr",
|
1181
1194
|
items: props.profileMenuItems || [],
|
1182
1195
|
onItemSelect: (e) => console.log("selecting item ", e),
|
1183
|
-
trigger: /* @__PURE__ */
|
1184
|
-
"
|
1196
|
+
trigger: /* @__PURE__ */ React8.createElement(
|
1197
|
+
"div",
|
1185
1198
|
{
|
1186
|
-
|
1187
|
-
className: "hawa-
|
1188
|
-
fill: "currentColor",
|
1189
|
-
viewBox: "0 0 20 20"
|
1199
|
+
onClick: onAvatarClick,
|
1200
|
+
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"
|
1190
1201
|
},
|
1191
|
-
/* @__PURE__ */
|
1192
|
-
"
|
1202
|
+
props.avatarImage ? /* @__PURE__ */ React8.createElement("img", { src: props.avatarImage, alt: "User Avatar" }) : /* @__PURE__ */ React8.createElement(
|
1203
|
+
"svg",
|
1193
1204
|
{
|
1194
|
-
|
1195
|
-
|
1196
|
-
|
1197
|
-
|
1205
|
+
"aria-label": "Avatar Icon",
|
1206
|
+
className: "hawa-absolute hawa--left-1 hawa-h-10 hawa-w-10 hawa-text-gray-400",
|
1207
|
+
fill: "currentColor",
|
1208
|
+
viewBox: "0 0 20 20"
|
1209
|
+
},
|
1210
|
+
/* @__PURE__ */ React8.createElement(
|
1211
|
+
"path",
|
1212
|
+
{
|
1213
|
+
fillRule: "evenodd",
|
1214
|
+
d: "M10 9a3 3 0 100-6 3 3 0 000 6zm-7 9a7 7 0 1114 0H3z",
|
1215
|
+
clipRule: "evenodd"
|
1216
|
+
}
|
1217
|
+
)
|
1198
1218
|
)
|
1199
|
-
)
|
1219
|
+
)
|
1200
1220
|
}
|
1201
1221
|
)
|
1202
1222
|
)
|
1203
|
-
), /* @__PURE__ */
|
1223
|
+
), /* @__PURE__ */ React8.createElement(
|
1204
1224
|
"div",
|
1205
1225
|
{
|
1206
1226
|
className: cn(
|
1207
|
-
"hawa-fixed hawa-z-0 hawa-flex hawa-flex-col hawa-justify-between hawa-overflow-x-clip hawa-transition-all",
|
1227
|
+
"hawa-fixed hawa-z-0 hawa-flex hawa-flex-col hawa-justify-between hawa-overflow-x-clip hawa-transition-all hawa-bg-blue-500",
|
1208
1228
|
isRTL ? "hawa-right-0 hawa-top-0 hawa-h-14" : "hawa-left-0 hawa-top-0 hawa-h-14",
|
1209
1229
|
"hawa-h-[calc(100dvh)]",
|
1210
1230
|
"hawa-bg-primary-foreground",
|
@@ -1230,7 +1250,7 @@ var AppLayout = ({
|
|
1230
1250
|
},
|
1231
1251
|
ref
|
1232
1252
|
},
|
1233
|
-
/* @__PURE__ */
|
1253
|
+
/* @__PURE__ */ React8.createElement(
|
1234
1254
|
"div",
|
1235
1255
|
{
|
1236
1256
|
onClick: props.onLogoClick,
|
@@ -1245,7 +1265,7 @@ var AppLayout = ({
|
|
1245
1265
|
}
|
1246
1266
|
},
|
1247
1267
|
openSideMenu && props.header && props.header,
|
1248
|
-
!props.header && /* @__PURE__ */
|
1268
|
+
!props.header && /* @__PURE__ */ React8.createElement(
|
1249
1269
|
"img",
|
1250
1270
|
{
|
1251
1271
|
className: cn(
|
@@ -1256,7 +1276,7 @@ var AppLayout = ({
|
|
1256
1276
|
src: props.logoLink
|
1257
1277
|
}
|
1258
1278
|
),
|
1259
|
-
size > 600 ? /* @__PURE__ */
|
1279
|
+
size > 600 ? /* @__PURE__ */ React8.createElement(
|
1260
1280
|
"img",
|
1261
1281
|
{
|
1262
1282
|
className: cn(
|
@@ -1269,7 +1289,7 @@ var AppLayout = ({
|
|
1269
1289
|
}
|
1270
1290
|
) : null
|
1271
1291
|
),
|
1272
|
-
/* @__PURE__ */
|
1292
|
+
/* @__PURE__ */ React8.createElement(
|
1273
1293
|
"div",
|
1274
1294
|
{
|
1275
1295
|
className: cn(
|
@@ -1280,7 +1300,7 @@ var AppLayout = ({
|
|
1280
1300
|
width: size > 600 ? `${openSideMenu ? openDrawerWidth : drawerSizeCondition}px` : `${openSideMenu ? openDrawerWidth : 0}px`
|
1281
1301
|
}
|
1282
1302
|
},
|
1283
|
-
/* @__PURE__ */
|
1303
|
+
/* @__PURE__ */ React8.createElement(
|
1284
1304
|
SidebarGroup,
|
1285
1305
|
{
|
1286
1306
|
direction,
|
@@ -1303,7 +1323,7 @@ var AppLayout = ({
|
|
1303
1323
|
}
|
1304
1324
|
)
|
1305
1325
|
),
|
1306
|
-
/* @__PURE__ */
|
1326
|
+
/* @__PURE__ */ React8.createElement(
|
1307
1327
|
"div",
|
1308
1328
|
{
|
1309
1329
|
className: cn(
|
@@ -1314,8 +1334,8 @@ var AppLayout = ({
|
|
1314
1334
|
width: size > 600 ? `${openSideMenu ? openDrawerWidth : 56}px` : `${openSideMenu ? openDrawerWidth : 0}px`
|
1315
1335
|
}
|
1316
1336
|
},
|
1317
|
-
DrawerFooterActions && openSideMenu ? /* @__PURE__ */
|
1318
|
-
size > 600 && openSideMenu ? /* @__PURE__ */
|
1337
|
+
DrawerFooterActions && openSideMenu ? /* @__PURE__ */ React8.createElement(React8.Fragment, null, DrawerFooterActions) : null,
|
1338
|
+
size > 600 && openSideMenu ? /* @__PURE__ */ React8.createElement(
|
1319
1339
|
Tooltip,
|
1320
1340
|
{
|
1321
1341
|
side: "left",
|
@@ -1323,7 +1343,7 @@ var AppLayout = ({
|
|
1323
1343
|
content: keepOpen ? ((_a = props.texts) == null ? void 0 : _a.collapseSidebar) || "Collapse Sidebar" : ((_b = props.texts) == null ? void 0 : _b.expandSidebar) || "Expand Sidebar",
|
1324
1344
|
triggerProps: { asChild: true }
|
1325
1345
|
},
|
1326
|
-
/* @__PURE__ */
|
1346
|
+
/* @__PURE__ */ React8.createElement(
|
1327
1347
|
Button,
|
1328
1348
|
{
|
1329
1349
|
variant: "outline",
|
@@ -1336,7 +1356,7 @@ var AppLayout = ({
|
|
1336
1356
|
},
|
1337
1357
|
size: "smallIcon"
|
1338
1358
|
},
|
1339
|
-
/* @__PURE__ */
|
1359
|
+
/* @__PURE__ */ React8.createElement(
|
1340
1360
|
"svg",
|
1341
1361
|
{
|
1342
1362
|
className: cn(
|
@@ -1346,7 +1366,7 @@ var AppLayout = ({
|
|
1346
1366
|
fill: "currentColor",
|
1347
1367
|
viewBox: "0 0 20 20"
|
1348
1368
|
},
|
1349
|
-
/* @__PURE__ */
|
1369
|
+
/* @__PURE__ */ React8.createElement(
|
1350
1370
|
"path",
|
1351
1371
|
{
|
1352
1372
|
fillRule: "evenodd",
|
@@ -1358,7 +1378,7 @@ var AppLayout = ({
|
|
1358
1378
|
)
|
1359
1379
|
) : null
|
1360
1380
|
)
|
1361
|
-
), /* @__PURE__ */
|
1381
|
+
), /* @__PURE__ */ React8.createElement(
|
1362
1382
|
"div",
|
1363
1383
|
{
|
1364
1384
|
className: "hawa-fixed -hawa-z-10 hawa-overflow-y-auto hawa-transition-all",
|
@@ -1377,7 +1397,7 @@ var AppLayout = ({
|
|
1377
1397
|
props.children
|
1378
1398
|
));
|
1379
1399
|
};
|
1380
|
-
var MenuIcon = () => /* @__PURE__ */
|
1400
|
+
var MenuIcon = () => /* @__PURE__ */ React8.createElement(
|
1381
1401
|
"svg",
|
1382
1402
|
{
|
1383
1403
|
"aria-label": "Menu Button",
|
@@ -1389,7 +1409,7 @@ var MenuIcon = () => /* @__PURE__ */ React7.createElement(
|
|
1389
1409
|
height: "1.6em",
|
1390
1410
|
width: "1.6em"
|
1391
1411
|
},
|
1392
|
-
/* @__PURE__ */
|
1412
|
+
/* @__PURE__ */ React8.createElement(
|
1393
1413
|
"path",
|
1394
1414
|
{
|
1395
1415
|
fillRule: "evenodd",
|