@sikka/hawa 0.35.5-next → 0.36.0-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/{Chip-BtgTAs8x.d.mts → Chip-CGl24Kd9.d.mts} +2 -2
- package/dist/{Chip-DQsP5hFS.d.ts → Chip-Cato49ar.d.ts} +2 -2
- package/dist/accordion/index.d.mts +1 -1
- package/dist/accordion/index.d.ts +1 -1
- package/dist/accordion/index.js +6 -4
- package/dist/accordion/index.js.map +1 -1
- package/dist/accordion/index.mjs +6 -4
- package/dist/accordion/index.mjs.map +1 -1
- package/dist/appLayout/index.js +180 -172
- package/dist/appLayout/index.js.map +1 -1
- package/dist/appLayout/index.mjs +201 -193
- package/dist/appLayout/index.mjs.map +1 -1
- package/dist/blocks/auth/index.js +28 -5
- package/dist/blocks/auth/index.mjs +4 -4
- package/dist/blocks/feedback/index.js +0 -1
- package/dist/blocks/feedback/index.mjs +1 -1
- package/dist/blocks/index.js +94 -69
- package/dist/blocks/index.mjs +12 -12
- package/dist/blocks/misc/index.js +81 -56
- package/dist/blocks/misc/index.mjs +65 -65
- package/dist/blocks/pricing/index.js +6 -4
- package/dist/blocks/pricing/index.mjs +1 -1
- package/dist/chip/index.d.mts +2 -2
- package/dist/chip/index.d.ts +2 -2
- package/dist/chip/index.js +6 -4
- package/dist/chip/index.js.map +1 -1
- package/dist/chip/index.mjs +6 -4
- package/dist/chip/index.mjs.map +1 -1
- package/dist/{chunk-HSRW7X3Z.mjs → chunk-6QIOEUE2.mjs} +1 -1
- package/dist/{chunk-JEZLVXSU.mjs → chunk-BXBSZD5X.mjs} +26 -2
- package/dist/{chunk-LVXG3SMD.mjs → chunk-CJ57JBYA.mjs} +6 -4
- package/dist/{chunk-CD6AQVU3.mjs → chunk-HLYAX77R.mjs} +0 -1
- package/dist/{chunk-G7JHUC5N.mjs → chunk-NNPNQK6F.mjs} +211 -4
- package/dist/chunk-SYGWSBJL.mjs +63 -0
- package/dist/{chunk-TERP5K6R.mjs → chunk-T33FXOHA.mjs} +29 -189
- package/dist/colorPicker/index.js +1 -1
- package/dist/colorPicker/index.js.map +1 -1
- package/dist/colorPicker/index.mjs +1 -1
- package/dist/colorPicker/index.mjs.map +1 -1
- package/dist/dataTable/index.js +41 -5
- package/dist/dataTable/index.js.map +1 -1
- package/dist/dataTable/index.mjs +41 -5
- package/dist/dataTable/index.mjs.map +1 -1
- package/dist/datePicker/index.d.mts +1 -0
- package/dist/datePicker/index.d.ts +1 -0
- package/dist/datePicker/index.js +3 -2
- package/dist/datePicker/index.js.map +1 -1
- package/dist/datePicker/index.mjs +3 -2
- package/dist/datePicker/index.mjs.map +1 -1
- package/dist/elements/index.d.mts +8 -4
- package/dist/elements/index.d.ts +8 -4
- package/dist/elements/index.js +124 -87
- package/dist/elements/index.mjs +25 -13
- 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.css +10 -0
- package/dist/index.d.mts +11 -5
- package/dist/index.d.ts +11 -5
- package/dist/index.js +225 -189
- package/dist/index.mjs +771 -736
- package/dist/input/index.d.mts +6 -2
- package/dist/input/index.d.ts +6 -2
- package/dist/input/index.js +26 -2
- package/dist/input/index.js.map +1 -1
- package/dist/input/index.mjs +26 -2
- package/dist/input/index.mjs.map +1 -1
- package/dist/layout/index.d.mts +1 -1
- package/dist/layout/index.d.ts +1 -1
- package/dist/layout/index.js +289 -281
- package/dist/layout/index.mjs +24 -56
- package/dist/passwordInput/index.js +26 -2
- package/dist/passwordInput/index.js.map +1 -1
- package/dist/passwordInput/index.mjs +26 -2
- package/dist/passwordInput/index.mjs.map +1 -1
- package/dist/phoneInput/index.js +1 -2
- package/dist/phoneInput/index.js.map +1 -1
- package/dist/phoneInput/index.mjs +1 -2
- package/dist/phoneInput/index.mjs.map +1 -1
- package/dist/pinInput/index.js +1 -1
- package/dist/pinInput/index.js.map +1 -1
- package/dist/pinInput/index.mjs +1 -1
- package/dist/pinInput/index.mjs.map +1 -1
- package/dist/select/index.js +0 -1
- package/dist/select/index.js.map +1 -1
- package/dist/select/index.mjs +0 -1
- package/dist/select/index.mjs.map +1 -1
- package/dist/sidebar/index.js +6 -4
- package/dist/sidebar/index.js.map +1 -1
- package/dist/sidebar/index.mjs +6 -4
- package/dist/sidebar/index.mjs.map +1 -1
- package/dist/tabs/index.d.mts +1 -1
- package/dist/tabs/index.d.ts +1 -1
- package/dist/tabs/index.js +26 -24
- package/dist/tabs/index.js.map +1 -1
- package/dist/tabs/index.mjs +30 -28
- package/dist/tabs/index.mjs.map +1 -1
- package/package.json +7 -8
- package/dist/chunk-545D35G6.mjs +0 -54
package/dist/appLayout/index.js
CHANGED
@@ -36,28 +36,37 @@ __export(appLayout_exports, {
|
|
36
36
|
module.exports = __toCommonJS(appLayout_exports);
|
37
37
|
|
38
38
|
// layout/appLayout/AppLayout.tsx
|
39
|
-
var
|
39
|
+
var import_react10 = __toESM(require("react"));
|
40
40
|
|
41
|
-
// hooks/
|
42
|
-
var import_react =
|
43
|
-
var
|
44
|
-
|
45
|
-
import_react.
|
46
|
-
|
47
|
-
|
48
|
-
|
41
|
+
// hooks/useClickOutside.ts
|
42
|
+
var import_react = require("react");
|
43
|
+
var DEFAULT_EVENTS = ["mousedown", "touchstart"];
|
44
|
+
function useClickOutside(handler, events, nodes) {
|
45
|
+
const ref = (0, import_react.useRef)();
|
46
|
+
(0, import_react.useEffect)(() => {
|
47
|
+
const listener = (event) => {
|
48
|
+
const { target } = event != null ? event : {};
|
49
|
+
if (Array.isArray(nodes)) {
|
50
|
+
const shouldIgnore = (target == null ? void 0 : target.hasAttribute("data-ignore-outside-clicks")) || !document.body.contains(target) && target.tagName !== "HTML";
|
51
|
+
const shouldTrigger = nodes.every(
|
52
|
+
(node) => !!node && !event.composedPath().includes(node)
|
53
|
+
);
|
54
|
+
shouldTrigger && !shouldIgnore && handler();
|
55
|
+
} else if (ref.current && !ref.current.contains(target)) {
|
56
|
+
handler();
|
49
57
|
}
|
50
58
|
};
|
51
|
-
|
52
|
-
|
59
|
+
(events || DEFAULT_EVENTS).forEach(
|
60
|
+
(fn) => document.addEventListener(fn, listener)
|
61
|
+
);
|
53
62
|
return () => {
|
54
|
-
|
55
|
-
|
63
|
+
(events || DEFAULT_EVENTS).forEach(
|
64
|
+
(fn) => document.removeEventListener(fn, listener)
|
65
|
+
);
|
56
66
|
};
|
57
|
-
}, [ref,
|
67
|
+
}, [ref, handler, nodes]);
|
58
68
|
return ref;
|
59
|
-
}
|
60
|
-
var useOutsideClick_default = useOutsideClick;
|
69
|
+
}
|
61
70
|
|
62
71
|
// util/index.ts
|
63
72
|
var import_clsx = require("clsx");
|
@@ -67,7 +76,7 @@ function cn(...inputs) {
|
|
67
76
|
}
|
68
77
|
|
69
78
|
// elements/button/Button.tsx
|
70
|
-
var
|
79
|
+
var React5 = __toESM(require("react"));
|
71
80
|
var import_class_variance_authority = require("class-variance-authority");
|
72
81
|
|
73
82
|
// elements/helperText/HelperText.tsx
|
@@ -84,7 +93,7 @@ var HelperText = ({ helperText }) => /* @__PURE__ */ import_react2.default.creat
|
|
84
93
|
);
|
85
94
|
|
86
95
|
// elements/label/Label.tsx
|
87
|
-
var
|
96
|
+
var React3 = __toESM(require("react"));
|
88
97
|
|
89
98
|
// elements/tooltip/Tooltip.tsx
|
90
99
|
var import_react3 = __toESM(require("react"));
|
@@ -158,7 +167,7 @@ var Tooltip = ({
|
|
158
167
|
};
|
159
168
|
|
160
169
|
// elements/label/Label.tsx
|
161
|
-
var Label =
|
170
|
+
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(
|
162
171
|
"label",
|
163
172
|
{
|
164
173
|
ref,
|
@@ -169,8 +178,8 @@ var Label = React4.forwardRef(({ className, hint, hintSide, required, children,
|
|
169
178
|
...props
|
170
179
|
},
|
171
180
|
children,
|
172
|
-
required && /* @__PURE__ */
|
173
|
-
), hint && /* @__PURE__ */
|
181
|
+
required && /* @__PURE__ */ React3.createElement("span", { className: "hawa-mx-0.5 hawa-text-red-500" }, "*")
|
182
|
+
), hint && /* @__PURE__ */ React3.createElement(
|
174
183
|
Tooltip,
|
175
184
|
{
|
176
185
|
content: hint,
|
@@ -180,7 +189,7 @@ var Label = React4.forwardRef(({ className, hint, hintSide, required, children,
|
|
180
189
|
onClick: (event) => event.preventDefault()
|
181
190
|
}
|
182
191
|
},
|
183
|
-
/* @__PURE__ */
|
192
|
+
/* @__PURE__ */ React3.createElement("div", null, /* @__PURE__ */ React3.createElement(
|
184
193
|
"svg",
|
185
194
|
{
|
186
195
|
xmlns: "http://www.w3.org/2000/svg",
|
@@ -192,9 +201,9 @@ var Label = React4.forwardRef(({ className, hint, hintSide, required, children,
|
|
192
201
|
strokeLinecap: "round",
|
193
202
|
strokeLinejoin: "round"
|
194
203
|
},
|
195
|
-
/* @__PURE__ */
|
196
|
-
/* @__PURE__ */
|
197
|
-
/* @__PURE__ */
|
204
|
+
/* @__PURE__ */ React3.createElement("circle", { cx: "12", cy: "12", r: "10" }),
|
205
|
+
/* @__PURE__ */ React3.createElement("path", { d: "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3" }),
|
206
|
+
/* @__PURE__ */ React3.createElement("path", { d: "M12 17h.01" })
|
198
207
|
))
|
199
208
|
)));
|
200
209
|
Label.displayName = "Label";
|
@@ -448,7 +457,7 @@ var buttonVariants = (0, import_class_variance_authority.cva)(
|
|
448
457
|
defaultVariants: { variant: "default", size: "default" }
|
449
458
|
}
|
450
459
|
);
|
451
|
-
var Button =
|
460
|
+
var Button = React5.forwardRef(
|
452
461
|
({
|
453
462
|
className,
|
454
463
|
label,
|
@@ -464,7 +473,7 @@ var Button = React6.forwardRef(
|
|
464
473
|
}, ref) => {
|
465
474
|
const Comp = "button";
|
466
475
|
const loadingColor = variant === "outline" || variant === "ghost" || variant === "neoBrutalism" ? "hawa-bg-primary" : "hawa-bg-primary-foreground";
|
467
|
-
return /* @__PURE__ */
|
476
|
+
return /* @__PURE__ */ React5.createElement("div", { className: "hawa-flex hawa-flex-col hawa-gap-2" }, label && /* @__PURE__ */ React5.createElement(Label, { ...labelProps }, label), /* @__PURE__ */ React5.createElement(
|
468
477
|
Comp,
|
469
478
|
{
|
470
479
|
className: cn(
|
@@ -474,7 +483,7 @@ var Button = React6.forwardRef(
|
|
474
483
|
ref,
|
475
484
|
...props
|
476
485
|
},
|
477
|
-
isLoading ? /* @__PURE__ */
|
486
|
+
isLoading ? /* @__PURE__ */ React5.createElement(
|
478
487
|
Loading,
|
479
488
|
{
|
480
489
|
design: size === "icon" || size === "smallIcon" ? "spinner" : "dots-pulse",
|
@@ -483,20 +492,20 @@ var Button = React6.forwardRef(
|
|
483
492
|
size: size === "sm" || size === "xs" ? "xs" : "button"
|
484
493
|
}
|
485
494
|
) : children
|
486
|
-
), showHelperText && /* @__PURE__ */
|
495
|
+
), showHelperText && /* @__PURE__ */ React5.createElement(HelperText, { helperText: props.helperText }));
|
487
496
|
}
|
488
497
|
);
|
489
498
|
Button.displayName = "Button";
|
490
499
|
|
491
500
|
// elements/dropdownMenu/DropdownMenu.tsx
|
492
|
-
var
|
501
|
+
var React6 = __toESM(require("react"));
|
493
502
|
var import_react5 = require("@headlessui/react");
|
494
503
|
var DropdownMenuPrimitive = __toESM(require("@radix-ui/react-dropdown-menu"));
|
495
504
|
var DropdownMenuRoot = DropdownMenuPrimitive.Root;
|
496
505
|
var DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
|
497
506
|
var DropdownMenuSub = DropdownMenuPrimitive.Sub;
|
498
507
|
var DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
|
499
|
-
var DropdownMenuSubTrigger =
|
508
|
+
var DropdownMenuSubTrigger = React6.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ React6.createElement(
|
500
509
|
DropdownMenuPrimitive.SubTrigger,
|
501
510
|
{
|
502
511
|
ref,
|
@@ -507,9 +516,9 @@ var DropdownMenuSubTrigger = React7.forwardRef(({ className, inset, children, ..
|
|
507
516
|
),
|
508
517
|
...props
|
509
518
|
},
|
510
|
-
/* @__PURE__ */
|
519
|
+
/* @__PURE__ */ React6.createElement("div", { className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-2" }, children),
|
511
520
|
" ",
|
512
|
-
/* @__PURE__ */
|
521
|
+
/* @__PURE__ */ React6.createElement(
|
513
522
|
"svg",
|
514
523
|
{
|
515
524
|
"aria-label": "Chevron Right Icon",
|
@@ -521,7 +530,7 @@ var DropdownMenuSubTrigger = React7.forwardRef(({ className, inset, children, ..
|
|
521
530
|
width: "1em",
|
522
531
|
className: cn(props.dir === "rtl" ? "hawa-rotate-180" : "")
|
523
532
|
},
|
524
|
-
/* @__PURE__ */
|
533
|
+
/* @__PURE__ */ React6.createElement(
|
525
534
|
"path",
|
526
535
|
{
|
527
536
|
fillRule: "evenodd",
|
@@ -531,7 +540,7 @@ var DropdownMenuSubTrigger = React7.forwardRef(({ className, inset, children, ..
|
|
531
540
|
)
|
532
541
|
));
|
533
542
|
DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;
|
534
|
-
var DropdownMenuSubContent =
|
543
|
+
var DropdownMenuSubContent = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React6.createElement(
|
535
544
|
DropdownMenuPrimitive.SubContent,
|
536
545
|
{
|
537
546
|
ref,
|
@@ -543,7 +552,7 @@ var DropdownMenuSubContent = React7.forwardRef(({ className, ...props }, ref) =>
|
|
543
552
|
}
|
544
553
|
));
|
545
554
|
DropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;
|
546
|
-
var DropdownMenuContent =
|
555
|
+
var DropdownMenuContent = React6.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ React6.createElement(import_react5.Portal, null, /* @__PURE__ */ React6.createElement(
|
547
556
|
DropdownMenuPrimitive.Content,
|
548
557
|
{
|
549
558
|
ref,
|
@@ -556,8 +565,8 @@ var DropdownMenuContent = React7.forwardRef(({ className, sideOffset = 4, ...pro
|
|
556
565
|
}
|
557
566
|
)));
|
558
567
|
DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
|
559
|
-
var DropdownMenuItem =
|
560
|
-
return /* @__PURE__ */
|
568
|
+
var DropdownMenuItem = React6.forwardRef(({ className, inset, badged, slug, LinkComponent, ...props }, ref) => {
|
569
|
+
return /* @__PURE__ */ React6.createElement(LinkComponent, { href: slug }, /* @__PURE__ */ React6.createElement(
|
561
570
|
DropdownMenuPrimitive.Item,
|
562
571
|
{
|
563
572
|
disabled: props.disabled,
|
@@ -570,14 +579,14 @@ var DropdownMenuItem = React7.forwardRef(({ className, inset, badged, slug, Link
|
|
570
579
|
),
|
571
580
|
...props
|
572
581
|
},
|
573
|
-
/* @__PURE__ */
|
582
|
+
/* @__PURE__ */ React6.createElement("div", { className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-2 " }, props.children),
|
574
583
|
props.end && props.end,
|
575
|
-
!props.end && props.shortcut && /* @__PURE__ */
|
576
|
-
!props.end && badged && /* @__PURE__ */
|
584
|
+
!props.end && props.shortcut && /* @__PURE__ */ React6.createElement(DropdownMenuShortcut, null, props.shortcut),
|
585
|
+
!props.end && badged && /* @__PURE__ */ React6.createElement("div", { className: "hawa-h-3 hawa-w-3 hawa-rounded-full hawa-bg-red-500" })
|
577
586
|
));
|
578
587
|
});
|
579
588
|
DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
|
580
|
-
var DropdownMenuCheckboxItem =
|
589
|
+
var DropdownMenuCheckboxItem = React6.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ React6.createElement(
|
581
590
|
DropdownMenuPrimitive.CheckboxItem,
|
582
591
|
{
|
583
592
|
ref,
|
@@ -588,7 +597,7 @@ var DropdownMenuCheckboxItem = React7.forwardRef(({ className, children, checked
|
|
588
597
|
checked,
|
589
598
|
...props
|
590
599
|
},
|
591
|
-
/* @__PURE__ */
|
600
|
+
/* @__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(
|
592
601
|
"svg",
|
593
602
|
{
|
594
603
|
"aria-label": "Check Mark",
|
@@ -599,12 +608,12 @@ var DropdownMenuCheckboxItem = React7.forwardRef(({ className, children, checked
|
|
599
608
|
height: "0.60em",
|
600
609
|
width: "0.60em"
|
601
610
|
},
|
602
|
-
/* @__PURE__ */
|
611
|
+
/* @__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" })
|
603
612
|
), " ")),
|
604
613
|
children
|
605
614
|
));
|
606
615
|
DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;
|
607
|
-
var DropdownMenuRadioItem =
|
616
|
+
var DropdownMenuRadioItem = React6.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ React6.createElement(
|
608
617
|
DropdownMenuPrimitive.RadioItem,
|
609
618
|
{
|
610
619
|
ref,
|
@@ -614,7 +623,7 @@ var DropdownMenuRadioItem = React7.forwardRef(({ className, children, ...props }
|
|
614
623
|
),
|
615
624
|
...props
|
616
625
|
},
|
617
|
-
/* @__PURE__ */
|
626
|
+
/* @__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(
|
618
627
|
"svg",
|
619
628
|
{
|
620
629
|
xmlns: "http://www.w3.org/2000/svg",
|
@@ -629,12 +638,12 @@ var DropdownMenuRadioItem = React7.forwardRef(({ className, children, ...props }
|
|
629
638
|
strokeLinejoin: "round",
|
630
639
|
className: "hawa-h-2 hawa-w-2 hawa-fill-current"
|
631
640
|
},
|
632
|
-
/* @__PURE__ */
|
641
|
+
/* @__PURE__ */ React6.createElement("circle", { cx: "12", cy: "12", r: "10" })
|
633
642
|
))),
|
634
643
|
children
|
635
644
|
));
|
636
645
|
DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;
|
637
|
-
var DropdownMenuLabel =
|
646
|
+
var DropdownMenuLabel = React6.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ React6.createElement(
|
638
647
|
DropdownMenuPrimitive.Label,
|
639
648
|
{
|
640
649
|
ref,
|
@@ -647,7 +656,7 @@ var DropdownMenuLabel = React7.forwardRef(({ className, inset, ...props }, ref)
|
|
647
656
|
}
|
648
657
|
));
|
649
658
|
DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
|
650
|
-
var DropdownMenuSeparator =
|
659
|
+
var DropdownMenuSeparator = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React6.createElement(
|
651
660
|
DropdownMenuPrimitive.Separator,
|
652
661
|
{
|
653
662
|
ref,
|
@@ -660,7 +669,7 @@ var DropdownMenuShortcut = ({
|
|
660
669
|
className,
|
661
670
|
...props
|
662
671
|
}) => {
|
663
|
-
return /* @__PURE__ */
|
672
|
+
return /* @__PURE__ */ React6.createElement(
|
664
673
|
"span",
|
665
674
|
{
|
666
675
|
className: cn(
|
@@ -701,10 +710,10 @@ var DropdownMenu = ({
|
|
701
710
|
default: "hawa-px-2 hawa-py-3 ",
|
702
711
|
sm: "hawa-text-xs hawa-px-1.5 hawa-py-1.5 "
|
703
712
|
};
|
704
|
-
let [values, setValues] =
|
713
|
+
let [values, setValues] = React6.useState(
|
705
714
|
items.map((item) => item.currentOption)
|
706
715
|
);
|
707
|
-
return /* @__PURE__ */
|
716
|
+
return /* @__PURE__ */ React6.createElement(
|
708
717
|
DropdownMenuRoot,
|
709
718
|
{
|
710
719
|
onOpenChange,
|
@@ -712,7 +721,7 @@ var DropdownMenu = ({
|
|
712
721
|
modal: false,
|
713
722
|
dir: direction
|
714
723
|
},
|
715
|
-
/* @__PURE__ */
|
724
|
+
/* @__PURE__ */ React6.createElement(
|
716
725
|
DropdownMenuTrigger,
|
717
726
|
{
|
718
727
|
asChild: true,
|
@@ -721,7 +730,7 @@ var DropdownMenu = ({
|
|
721
730
|
},
|
722
731
|
trigger
|
723
732
|
),
|
724
|
-
/* @__PURE__ */
|
733
|
+
/* @__PURE__ */ React6.createElement(import_react5.Portal, null, /* @__PURE__ */ React6.createElement(
|
725
734
|
DropdownMenuContent,
|
726
735
|
{
|
727
736
|
side,
|
@@ -742,12 +751,12 @@ var DropdownMenu = ({
|
|
742
751
|
var _a;
|
743
752
|
const ItemLinkComponent = item.slug ? LinkComponent : "a";
|
744
753
|
if (item.itemType === "separator") {
|
745
|
-
return /* @__PURE__ */
|
754
|
+
return /* @__PURE__ */ React6.createElement(DropdownMenuSeparator, { key: index });
|
746
755
|
} else if (item.itemType === "label") {
|
747
|
-
return /* @__PURE__ */
|
756
|
+
return /* @__PURE__ */ React6.createElement(DropdownMenuLabel, { key: index }, item.label);
|
748
757
|
} else if (item.itemType === "radio") {
|
749
758
|
let dd = item.currentOption;
|
750
|
-
return /* @__PURE__ */
|
759
|
+
return /* @__PURE__ */ React6.createElement(DropdownMenuSub, { key: index }, /* @__PURE__ */ React6.createElement(
|
751
760
|
DropdownMenuSubTrigger,
|
752
761
|
{
|
753
762
|
dir: direction,
|
@@ -755,7 +764,7 @@ var DropdownMenu = ({
|
|
755
764
|
},
|
756
765
|
item.icon && item.icon,
|
757
766
|
item.label && item.label
|
758
|
-
), /* @__PURE__ */
|
767
|
+
), /* @__PURE__ */ React6.createElement(DropdownMenuSubContent, null, /* @__PURE__ */ React6.createElement(
|
759
768
|
DropdownMenuRadioGroup,
|
760
769
|
{
|
761
770
|
value: values[index],
|
@@ -769,12 +778,12 @@ var DropdownMenu = ({
|
|
769
778
|
}
|
770
779
|
}
|
771
780
|
},
|
772
|
-
(_a = item.options) == null ? void 0 : _a.map((opt, i) => /* @__PURE__ */
|
781
|
+
(_a = item.options) == null ? void 0 : _a.map((opt, i) => /* @__PURE__ */ React6.createElement(DropdownMenuRadioItem, { key: i, value: opt.value }, opt.label))
|
773
782
|
)));
|
774
783
|
} else if (item.itemType === "custom") {
|
775
|
-
return /* @__PURE__ */
|
784
|
+
return /* @__PURE__ */ React6.createElement("div", { key: index }, item.content);
|
776
785
|
} else {
|
777
|
-
return item.subitems ? /* @__PURE__ */
|
786
|
+
return item.subitems ? /* @__PURE__ */ React6.createElement(DropdownMenuSub, { key: index }, /* @__PURE__ */ React6.createElement(
|
778
787
|
DropdownMenuSubTrigger,
|
779
788
|
{
|
780
789
|
dir: direction,
|
@@ -782,9 +791,9 @@ var DropdownMenu = ({
|
|
782
791
|
},
|
783
792
|
item.icon && item.icon,
|
784
793
|
item.label && item.label
|
785
|
-
), /* @__PURE__ */
|
794
|
+
), /* @__PURE__ */ React6.createElement(import_react5.Portal, null, /* @__PURE__ */ React6.createElement(DropdownMenuSubContent, null, item.subitems.map((subitem, subIndex) => {
|
786
795
|
const SubitemLinkComponent = subitem.slug ? LinkComponent : "a";
|
787
|
-
return /* @__PURE__ */
|
796
|
+
return /* @__PURE__ */ React6.createElement(
|
788
797
|
DropdownMenuItem,
|
789
798
|
{
|
790
799
|
key: subIndex,
|
@@ -813,7 +822,7 @@ var DropdownMenu = ({
|
|
813
822
|
subitem.icon && subitem.icon,
|
814
823
|
subitem.label && subitem.label
|
815
824
|
);
|
816
|
-
})))) : /* @__PURE__ */
|
825
|
+
})))) : /* @__PURE__ */ React6.createElement(
|
817
826
|
DropdownMenuItem,
|
818
827
|
{
|
819
828
|
LinkComponent: ItemLinkComponent,
|
@@ -866,20 +875,51 @@ var DropdownMenu = ({
|
|
866
875
|
);
|
867
876
|
};
|
868
877
|
|
878
|
+
// icons/Emojis.tsx
|
879
|
+
var import_react6 = __toESM(require("react"));
|
880
|
+
|
881
|
+
// icons/InputIcons.tsx
|
882
|
+
var import_react7 = __toESM(require("react"));
|
883
|
+
|
884
|
+
// icons/CommonIcons.tsx
|
885
|
+
var import_react8 = __toESM(require("react"));
|
886
|
+
var MenuIcon = () => /* @__PURE__ */ import_react8.default.createElement(
|
887
|
+
"svg",
|
888
|
+
{
|
889
|
+
"aria-label": "Menu Button",
|
890
|
+
stroke: "currentColor",
|
891
|
+
fill: "currentColor",
|
892
|
+
strokeWidth: 0,
|
893
|
+
viewBox: "0 0 20 20",
|
894
|
+
"aria-hidden": "true",
|
895
|
+
height: "1.6em",
|
896
|
+
width: "1.6em"
|
897
|
+
},
|
898
|
+
/* @__PURE__ */ import_react8.default.createElement(
|
899
|
+
"path",
|
900
|
+
{
|
901
|
+
fillRule: "evenodd",
|
902
|
+
clipRule: "evenodd",
|
903
|
+
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"
|
904
|
+
}
|
905
|
+
)
|
906
|
+
);
|
907
|
+
|
869
908
|
// layout/sidebar/Sidebar.tsx
|
870
|
-
var
|
909
|
+
var React11 = __toESM(require("react"));
|
871
910
|
var AccordionPrimitive = __toESM(require("@radix-ui/react-accordion"));
|
872
911
|
|
873
912
|
// elements/chip/Chip.tsx
|
874
|
-
var
|
875
|
-
var Chip =
|
913
|
+
var import_react9 = __toESM(require("react"));
|
914
|
+
var Chip = import_react9.default.forwardRef(
|
876
915
|
({
|
877
916
|
label,
|
878
917
|
size = "normal",
|
879
918
|
icon,
|
880
919
|
color,
|
881
920
|
radius = "inherit",
|
882
|
-
|
921
|
+
dot,
|
922
|
+
dotStatus = "none",
|
883
923
|
...rest
|
884
924
|
}, ref) => {
|
885
925
|
let defaultStyles = "hawa-flex hawa-flex-row hawa-w-fit hawa-gap-1 hawa-items-center hawa-px-2.5 hawa-py-1 hawa-font-bold ";
|
@@ -898,7 +938,8 @@ var Chip = import_react6.default.forwardRef(
|
|
898
938
|
normal: "hawa-flex hawa-h-2 hawa-w-2 hawa-rounded-full",
|
899
939
|
large: "hawa-flex hawa-h-3 hawa-w-3 hawa-rounded-full"
|
900
940
|
};
|
901
|
-
let
|
941
|
+
let dotStatusStyles = {
|
942
|
+
none: "hawa-bg-gray-500 dark:hawa-bg-gray-800",
|
902
943
|
available: "hawa-bg-green-500",
|
903
944
|
unavailable: "hawa-bg-red-500"
|
904
945
|
};
|
@@ -914,7 +955,7 @@ var Chip = import_react6.default.forwardRef(
|
|
914
955
|
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"
|
915
956
|
};
|
916
957
|
if (label) {
|
917
|
-
return /* @__PURE__ */
|
958
|
+
return /* @__PURE__ */ import_react9.default.createElement(
|
918
959
|
"span",
|
919
960
|
{
|
920
961
|
...rest,
|
@@ -926,17 +967,17 @@ var Chip = import_react6.default.forwardRef(
|
|
926
967
|
color ? colorStyles[color] : "hawa-border hawa-bg-none"
|
927
968
|
)
|
928
969
|
},
|
929
|
-
|
970
|
+
dot && /* @__PURE__ */ import_react9.default.createElement(
|
930
971
|
"span",
|
931
972
|
{
|
932
|
-
className: cn(dotStyles[size],
|
973
|
+
className: cn(dotStyles[size], dotStatusStyles[dotStatus])
|
933
974
|
}
|
934
975
|
),
|
935
976
|
icon && icon,
|
936
977
|
label
|
937
978
|
);
|
938
979
|
} else {
|
939
|
-
return /* @__PURE__ */
|
980
|
+
return /* @__PURE__ */ import_react9.default.createElement(
|
940
981
|
"span",
|
941
982
|
{
|
942
983
|
...rest,
|
@@ -954,9 +995,9 @@ var Chip = import_react6.default.forwardRef(
|
|
954
995
|
// layout/sidebar/Sidebar.tsx
|
955
996
|
var Accordion = AccordionPrimitive.Root;
|
956
997
|
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";
|
957
|
-
var AccordionItem =
|
998
|
+
var AccordionItem = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React11.createElement(AccordionPrimitive.Item, { ref, className: cn(className), ...props }));
|
958
999
|
AccordionItem.displayName = "AccordionItem";
|
959
|
-
var AccordionTrigger =
|
1000
|
+
var AccordionTrigger = React11.forwardRef(({ className, showArrow, children, ...props }, ref) => /* @__PURE__ */ React11.createElement(AccordionPrimitive.Header, { className: "flex" }, /* @__PURE__ */ React11.createElement(
|
960
1001
|
AccordionPrimitive.Trigger,
|
961
1002
|
{
|
962
1003
|
ref,
|
@@ -964,7 +1005,7 @@ var AccordionTrigger = React9.forwardRef(({ className, showArrow, children, ...p
|
|
964
1005
|
...props
|
965
1006
|
},
|
966
1007
|
children,
|
967
|
-
showArrow && /* @__PURE__ */
|
1008
|
+
showArrow && /* @__PURE__ */ React11.createElement(
|
968
1009
|
"svg",
|
969
1010
|
{
|
970
1011
|
"aria-label": "Chevron Right Icon",
|
@@ -975,11 +1016,11 @@ var AccordionTrigger = React9.forwardRef(({ className, showArrow, children, ...p
|
|
975
1016
|
width: "1em",
|
976
1017
|
className: "hawa-icon hawa-shrink-0 hawa-rotate-90 hawa-transition-transform hawa-duration-200"
|
977
1018
|
},
|
978
|
-
/* @__PURE__ */
|
1019
|
+
/* @__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" })
|
979
1020
|
)
|
980
1021
|
)));
|
981
1022
|
AccordionTrigger.displayName = AccordionPrimitive.Trigger.displayName;
|
982
|
-
var AccordionContent =
|
1023
|
+
var AccordionContent = React11.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ React11.createElement(
|
983
1024
|
AccordionPrimitive.Content,
|
984
1025
|
{
|
985
1026
|
ref,
|
@@ -989,7 +1030,7 @@ var AccordionContent = React9.forwardRef(({ className, children, ...props }, ref
|
|
989
1030
|
),
|
990
1031
|
...props
|
991
1032
|
},
|
992
|
-
/* @__PURE__ */
|
1033
|
+
/* @__PURE__ */ React11.createElement("div", null, children)
|
993
1034
|
));
|
994
1035
|
AccordionContent.displayName = AccordionPrimitive.Content.displayName;
|
995
1036
|
var SidebarGroup = ({
|
@@ -1005,7 +1046,7 @@ var SidebarGroup = ({
|
|
1005
1046
|
...props
|
1006
1047
|
}) => {
|
1007
1048
|
const LinkComponent = props.LinkComponent || "a";
|
1008
|
-
return /* @__PURE__ */
|
1049
|
+
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(
|
1009
1050
|
Accordion,
|
1010
1051
|
{
|
1011
1052
|
value: openedItem,
|
@@ -1016,7 +1057,7 @@ var SidebarGroup = ({
|
|
1016
1057
|
collapsible: true,
|
1017
1058
|
className: "hawa-flex hawa-flex-col hawa-gap-1"
|
1018
1059
|
},
|
1019
|
-
items.map((item, idx) => /* @__PURE__ */
|
1060
|
+
items.map((item, idx) => /* @__PURE__ */ React11.createElement(
|
1020
1061
|
SidebarItem,
|
1021
1062
|
{
|
1022
1063
|
isOpen,
|
@@ -1044,14 +1085,14 @@ var SidebarItem = ({
|
|
1044
1085
|
return props.selectedItem === value ? "hawa-bg-primary/90 hawa-text-primary-foreground hawa-cursor-default" : "hover:hawa-bg-primary/10";
|
1045
1086
|
};
|
1046
1087
|
if (item.subitems) {
|
1047
|
-
return /* @__PURE__ */
|
1088
|
+
return /* @__PURE__ */ React11.createElement(
|
1048
1089
|
AccordionItem,
|
1049
1090
|
{
|
1050
1091
|
value: item.value,
|
1051
1092
|
className: "hawa-overflow-x-clip ",
|
1052
1093
|
dir: direction
|
1053
1094
|
},
|
1054
|
-
/* @__PURE__ */
|
1095
|
+
/* @__PURE__ */ React11.createElement(
|
1055
1096
|
AccordionTrigger,
|
1056
1097
|
{
|
1057
1098
|
className: cn(
|
@@ -1063,7 +1104,7 @@ var SidebarItem = ({
|
|
1063
1104
|
),
|
1064
1105
|
showArrow: isOpen
|
1065
1106
|
},
|
1066
|
-
/* @__PURE__ */
|
1107
|
+
/* @__PURE__ */ React11.createElement(
|
1067
1108
|
"div",
|
1068
1109
|
{
|
1069
1110
|
className: cn(
|
@@ -1071,7 +1112,7 @@ var SidebarItem = ({
|
|
1071
1112
|
)
|
1072
1113
|
},
|
1073
1114
|
item.icon && item.icon,
|
1074
|
-
/* @__PURE__ */
|
1115
|
+
/* @__PURE__ */ React11.createElement(
|
1075
1116
|
"span",
|
1076
1117
|
{
|
1077
1118
|
className: cn(
|
@@ -1083,14 +1124,14 @@ var SidebarItem = ({
|
|
1083
1124
|
)
|
1084
1125
|
)
|
1085
1126
|
),
|
1086
|
-
item.subitems && /* @__PURE__ */
|
1127
|
+
item.subitems && /* @__PURE__ */ React11.createElement(AccordionContent, { className: "hawa-mt-1 hawa-h-full hawa-rounded" }, /* @__PURE__ */ React11.createElement(
|
1087
1128
|
"div",
|
1088
1129
|
{
|
1089
1130
|
className: cn(
|
1090
1131
|
"hawa-flex hawa-h-full hawa-flex-col hawa-gap-2 hawa-bg-foreground/5 hawa-p-1"
|
1091
1132
|
)
|
1092
1133
|
},
|
1093
|
-
item.subitems.map((subitem, idx) => /* @__PURE__ */
|
1134
|
+
item.subitems.map((subitem, idx) => /* @__PURE__ */ React11.createElement(
|
1094
1135
|
LinkComponent,
|
1095
1136
|
{
|
1096
1137
|
href: subitem.slug,
|
@@ -1121,7 +1162,7 @@ var SidebarItem = ({
|
|
1121
1162
|
))
|
1122
1163
|
);
|
1123
1164
|
} else {
|
1124
|
-
return /* @__PURE__ */
|
1165
|
+
return /* @__PURE__ */ React11.createElement(
|
1125
1166
|
LinkComponent,
|
1126
1167
|
{
|
1127
1168
|
href: item.slug,
|
@@ -1145,7 +1186,7 @@ var SidebarItem = ({
|
|
1145
1186
|
"hawa-overflow-x-clip "
|
1146
1187
|
)
|
1147
1188
|
},
|
1148
|
-
/* @__PURE__ */
|
1189
|
+
/* @__PURE__ */ React11.createElement("div", { className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-2" }, item.icon && item.icon, /* @__PURE__ */ React11.createElement(
|
1149
1190
|
"span",
|
1150
1191
|
{
|
1151
1192
|
className: cn(
|
@@ -1155,7 +1196,7 @@ var SidebarItem = ({
|
|
1155
1196
|
},
|
1156
1197
|
item.label,
|
1157
1198
|
" ",
|
1158
|
-
item.badge && /* @__PURE__ */
|
1199
|
+
item.badge && /* @__PURE__ */ React11.createElement(Chip, { label: item.badge.label, color: "hyper", size: "small" })
|
1159
1200
|
))
|
1160
1201
|
);
|
1161
1202
|
}
|
@@ -1191,13 +1232,22 @@ var AppLayout = ({
|
|
1191
1232
|
}
|
1192
1233
|
};
|
1193
1234
|
const isRTL = direction === "rtl";
|
1194
|
-
const [openedSidebarItem, setOpenedSidebarItem] = (0,
|
1195
|
-
const [size, setSize] = (0,
|
1235
|
+
const [openedSidebarItem, setOpenedSidebarItem] = (0, import_react10.useState)("");
|
1236
|
+
const [size, setSize] = (0, import_react10.useState)(
|
1196
1237
|
typeof window !== "undefined" && window.innerWidth || 1200
|
1197
1238
|
);
|
1198
|
-
const [openSideMenu, setOpenSideMenu] = (0,
|
1199
|
-
const [keepDrawerOpen, setKeepDrawerOpen] = (0,
|
1200
|
-
|
1239
|
+
const [openSideMenu, setOpenSideMenu] = (0, import_react10.useState)(true);
|
1240
|
+
const [keepDrawerOpen, setKeepDrawerOpen] = (0, import_react10.useState)(keepOpen);
|
1241
|
+
const handleClickOutside = () => {
|
1242
|
+
if (typeof window !== "undefined") {
|
1243
|
+
if (window.innerWidth < 600) {
|
1244
|
+
setKeepDrawerOpen(false);
|
1245
|
+
setOpenSideMenu(false);
|
1246
|
+
}
|
1247
|
+
}
|
1248
|
+
};
|
1249
|
+
const ref = useClickOutside(handleClickOutside);
|
1250
|
+
(0, import_react10.useEffect)(() => {
|
1201
1251
|
if (typeof window !== "undefined") {
|
1202
1252
|
const resize = () => {
|
1203
1253
|
setSize(window.innerWidth);
|
@@ -1212,29 +1262,18 @@ var AppLayout = ({
|
|
1212
1262
|
};
|
1213
1263
|
}
|
1214
1264
|
}, []);
|
1215
|
-
(0,
|
1265
|
+
(0, import_react10.useEffect)(() => {
|
1216
1266
|
setKeepDrawerOpen(keepOpen);
|
1217
1267
|
}, [setKeepOpen]);
|
1218
|
-
|
1219
|
-
if (typeof window !== "undefined") {
|
1220
|
-
if (keepDrawerOpen)
|
1221
|
-
return;
|
1222
|
-
if (window.innerWidth < 600) {
|
1223
|
-
setKeepDrawerOpen(false);
|
1224
|
-
setOpenSideMenu(false);
|
1225
|
-
}
|
1226
|
-
}
|
1227
|
-
};
|
1228
|
-
const ref = useOutsideClick_default(handleClickOutside);
|
1229
|
-
const drawerSizeCondition = size > 600 ? drawerSizeStyle[keepDrawerOpen ? "opened" : "closed"][drawerSize] : 0;
|
1230
|
-
(0, import_react7.useEffect)(() => {
|
1268
|
+
(0, import_react10.useEffect)(() => {
|
1231
1269
|
if (size > 600) {
|
1232
1270
|
setOpenSideMenu(keepDrawerOpen);
|
1233
1271
|
} else {
|
1234
1272
|
setOpenSideMenu(false);
|
1235
1273
|
}
|
1236
|
-
}, [size]);
|
1237
|
-
|
1274
|
+
}, [size, keepDrawerOpen]);
|
1275
|
+
const drawerSizeCondition = size > 600 ? drawerSizeStyle[keepDrawerOpen ? "opened" : "closed"][drawerSize] : 0;
|
1276
|
+
return /* @__PURE__ */ import_react10.default.createElement("div", { className: "hawa-fixed hawa-start-0" }, props.topBar && /* @__PURE__ */ import_react10.default.createElement(
|
1238
1277
|
"div",
|
1239
1278
|
{
|
1240
1279
|
dir: direction,
|
@@ -1243,7 +1282,7 @@ var AppLayout = ({
|
|
1243
1282
|
bordered && "hawa-border-b-[1px]"
|
1244
1283
|
)
|
1245
1284
|
},
|
1246
|
-
size > 600 ? /* @__PURE__ */
|
1285
|
+
size > 600 ? /* @__PURE__ */ import_react10.default.createElement(
|
1247
1286
|
"div",
|
1248
1287
|
{
|
1249
1288
|
className: cn(
|
@@ -1257,24 +1296,24 @@ var AppLayout = ({
|
|
1257
1296
|
props.pageTitle
|
1258
1297
|
) : (
|
1259
1298
|
// Mobile Drawer Menu Button
|
1260
|
-
/* @__PURE__ */
|
1299
|
+
/* @__PURE__ */ import_react10.default.createElement(
|
1261
1300
|
"div",
|
1262
1301
|
{
|
1263
1302
|
dir: direction,
|
1264
1303
|
className: "hawa-flex hawa-items-center hawa-justify-center hawa-gap-0.5"
|
1265
1304
|
},
|
1266
|
-
/* @__PURE__ */
|
1305
|
+
/* @__PURE__ */ import_react10.default.createElement(
|
1267
1306
|
"div",
|
1268
1307
|
{
|
1269
1308
|
onClick: () => setOpenSideMenu(true),
|
1270
1309
|
className: "hawa-z-40 hawa-mx-1 hawa-cursor-pointer hawa-rounded hawa-p-2 hawa-transition-all hover:hawa-bg-gray-100"
|
1271
1310
|
},
|
1272
|
-
/* @__PURE__ */
|
1311
|
+
/* @__PURE__ */ import_react10.default.createElement(MenuIcon, null)
|
1273
1312
|
),
|
1274
|
-
props.pageTitle ? /* @__PURE__ */
|
1313
|
+
props.pageTitle ? /* @__PURE__ */ import_react10.default.createElement("div", { className: "hawa-text-sm" }, props.pageTitle) : /* @__PURE__ */ import_react10.default.createElement("div", null)
|
1275
1314
|
)
|
1276
1315
|
),
|
1277
|
-
/* @__PURE__ */
|
1316
|
+
/* @__PURE__ */ import_react10.default.createElement("div", { className: cn("hawa-flex hawa-gap-2 dark:hawa-text-white") }, size > 600 ? /* @__PURE__ */ import_react10.default.createElement("div", { className: "hawa-text-end hawa-text-xs" }, /* @__PURE__ */ import_react10.default.createElement("div", { className: "hawa-font-bold" }, props.username), " ", /* @__PURE__ */ import_react10.default.createElement("div", null, props.email)) : null, /* @__PURE__ */ import_react10.default.createElement(
|
1278
1317
|
DropdownMenu,
|
1279
1318
|
{
|
1280
1319
|
LinkComponent: MenuLinkComponent,
|
@@ -1286,13 +1325,13 @@ var AppLayout = ({
|
|
1286
1325
|
direction,
|
1287
1326
|
items: props.profileMenuItems || [],
|
1288
1327
|
onItemSelect: (e) => console.log("selecting item ", e),
|
1289
|
-
trigger: /* @__PURE__ */
|
1328
|
+
trigger: /* @__PURE__ */ import_react10.default.createElement(
|
1290
1329
|
"div",
|
1291
1330
|
{
|
1292
1331
|
onClick: onAvatarClick,
|
1293
1332
|
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"
|
1294
1333
|
},
|
1295
|
-
props.avatarImage ? /* @__PURE__ */
|
1334
|
+
props.avatarImage ? /* @__PURE__ */ import_react10.default.createElement("img", { src: props.avatarImage, alt: "User Avatar" }) : /* @__PURE__ */ import_react10.default.createElement(
|
1296
1335
|
"svg",
|
1297
1336
|
{
|
1298
1337
|
"aria-label": "Avatar Icon",
|
@@ -1300,7 +1339,7 @@ var AppLayout = ({
|
|
1300
1339
|
fill: "currentColor",
|
1301
1340
|
viewBox: "0 0 20 20"
|
1302
1341
|
},
|
1303
|
-
/* @__PURE__ */
|
1342
|
+
/* @__PURE__ */ import_react10.default.createElement(
|
1304
1343
|
"path",
|
1305
1344
|
{
|
1306
1345
|
fillRule: "evenodd",
|
@@ -1312,7 +1351,7 @@ var AppLayout = ({
|
|
1312
1351
|
)
|
1313
1352
|
}
|
1314
1353
|
))
|
1315
|
-
), /* @__PURE__ */
|
1354
|
+
), /* @__PURE__ */ import_react10.default.createElement(
|
1316
1355
|
"div",
|
1317
1356
|
{
|
1318
1357
|
className: cn(
|
@@ -1323,9 +1362,7 @@ var AppLayout = ({
|
|
1323
1362
|
style: {
|
1324
1363
|
width: size > 600 ? openSideMenu ? `${drawerSizeStyle["opened"][drawerSize]}px` : `${drawerSizeStyle["closed"][drawerSize]}px` : openSideMenu ? `${drawerSizeStyle["opened"][drawerSize]}px` : "0px"
|
1325
1364
|
},
|
1326
|
-
onMouseEnter: () =>
|
1327
|
-
setOpenSideMenu(true);
|
1328
|
-
},
|
1365
|
+
onMouseEnter: () => setOpenSideMenu(true),
|
1329
1366
|
onMouseLeave: () => {
|
1330
1367
|
if (size > 600) {
|
1331
1368
|
if (keepDrawerOpen) {
|
@@ -1340,7 +1377,7 @@ var AppLayout = ({
|
|
1340
1377
|
},
|
1341
1378
|
ref
|
1342
1379
|
},
|
1343
|
-
/* @__PURE__ */
|
1380
|
+
/* @__PURE__ */ import_react10.default.createElement(
|
1344
1381
|
"div",
|
1345
1382
|
{
|
1346
1383
|
onClick: props.onLogoClick,
|
@@ -1355,30 +1392,30 @@ var AppLayout = ({
|
|
1355
1392
|
}
|
1356
1393
|
},
|
1357
1394
|
openSideMenu && props.header && props.header,
|
1358
|
-
!props.header && /* @__PURE__ */
|
1395
|
+
!props.header && /* @__PURE__ */ import_react10.default.createElement(
|
1359
1396
|
"img",
|
1360
1397
|
{
|
1398
|
+
src: props.logoLink,
|
1361
1399
|
className: cn(
|
1362
1400
|
"hawa-h-9 hawa-opacity-0 hawa-transition-all",
|
1363
1401
|
!openSideMenu ? "hawa-invisible hawa-opacity-0" : "hawa-visible hawa-opacity-100",
|
1364
1402
|
classNames == null ? void 0 : classNames.fullLogoImg
|
1365
|
-
)
|
1366
|
-
src: props.logoLink
|
1403
|
+
)
|
1367
1404
|
}
|
1368
1405
|
),
|
1369
|
-
size > 600 ? /* @__PURE__ */
|
1406
|
+
size > 600 ? /* @__PURE__ */ import_react10.default.createElement(
|
1370
1407
|
"img",
|
1371
1408
|
{
|
1409
|
+
src: props.logoSymbol,
|
1372
1410
|
className: cn(
|
1373
1411
|
"hawa-fixed hawa-h-9 hawa-transition-all hawa-start-2.5 hawa-top-2.5",
|
1374
1412
|
openSideMenu ? "hawa-invisible hawa-opacity-0" : "hawa-visible hawa-opacity-100",
|
1375
1413
|
classNames == null ? void 0 : classNames.symbolLogoImg
|
1376
|
-
)
|
1377
|
-
src: props.logoSymbol
|
1414
|
+
)
|
1378
1415
|
}
|
1379
1416
|
) : null
|
1380
1417
|
),
|
1381
|
-
/* @__PURE__ */
|
1418
|
+
/* @__PURE__ */ import_react10.default.createElement(
|
1382
1419
|
"div",
|
1383
1420
|
{
|
1384
1421
|
className: cn(
|
@@ -1389,30 +1426,22 @@ var AppLayout = ({
|
|
1389
1426
|
width: size > 600 ? `${openSideMenu ? openDrawerWidth : drawerSizeCondition}px` : `${openSideMenu ? openDrawerWidth : 0}px`
|
1390
1427
|
}
|
1391
1428
|
},
|
1392
|
-
/* @__PURE__ */
|
1429
|
+
/* @__PURE__ */ import_react10.default.createElement(
|
1393
1430
|
SidebarGroup,
|
1394
1431
|
{
|
1395
1432
|
direction,
|
1396
|
-
onItemClick: (values) => {
|
1397
|
-
if (clickedItem) {
|
1398
|
-
clickedItem(values);
|
1399
|
-
}
|
1400
|
-
},
|
1401
|
-
onSubItemClick: (values) => {
|
1402
|
-
if (clickedItem) {
|
1403
|
-
clickedItem(values);
|
1404
|
-
}
|
1405
|
-
},
|
1406
1433
|
selectedItem: currentPage,
|
1407
1434
|
openedItem: openedSidebarItem,
|
1408
1435
|
setOpenedItem: (e) => setOpenedSidebarItem(e),
|
1409
1436
|
isOpen: keepDrawerOpen || openSideMenu,
|
1410
1437
|
items: props.drawerItems,
|
1411
|
-
LinkComponent: DrawerLinkComponent
|
1438
|
+
LinkComponent: DrawerLinkComponent,
|
1439
|
+
onItemClick: (values) => clickedItem && clickedItem(values),
|
1440
|
+
onSubItemClick: (values) => clickedItem && clickedItem(values)
|
1412
1441
|
}
|
1413
1442
|
)
|
1414
1443
|
),
|
1415
|
-
/* @__PURE__ */
|
1444
|
+
/* @__PURE__ */ import_react10.default.createElement(
|
1416
1445
|
"div",
|
1417
1446
|
{
|
1418
1447
|
className: cn(
|
@@ -1423,8 +1452,8 @@ var AppLayout = ({
|
|
1423
1452
|
width: size > 600 ? `${openSideMenu ? openDrawerWidth : 56}px` : `${openSideMenu ? openDrawerWidth : 0}px`
|
1424
1453
|
}
|
1425
1454
|
},
|
1426
|
-
DrawerFooterActions && openSideMenu ? /* @__PURE__ */
|
1427
|
-
size > 600 && openSideMenu ? /* @__PURE__ */
|
1455
|
+
DrawerFooterActions && openSideMenu ? /* @__PURE__ */ import_react10.default.createElement(import_react10.default.Fragment, null, DrawerFooterActions) : null,
|
1456
|
+
size > 600 && openSideMenu ? /* @__PURE__ */ import_react10.default.createElement(
|
1428
1457
|
Tooltip,
|
1429
1458
|
{
|
1430
1459
|
side: "left",
|
@@ -1432,7 +1461,7 @@ var AppLayout = ({
|
|
1432
1461
|
triggerProps: { asChild: true },
|
1433
1462
|
content: keepDrawerOpen ? ((_a = props.texts) == null ? void 0 : _a.collapseSidebar) || "Collapse Sidebar" : ((_b = props.texts) == null ? void 0 : _b.expandSidebar) || "Expand Sidebar"
|
1434
1463
|
},
|
1435
|
-
/* @__PURE__ */
|
1464
|
+
/* @__PURE__ */ import_react10.default.createElement(
|
1436
1465
|
Button,
|
1437
1466
|
{
|
1438
1467
|
variant: "outline",
|
@@ -1445,7 +1474,7 @@ var AppLayout = ({
|
|
1445
1474
|
setKeepDrawerOpen(newKeepOpenState);
|
1446
1475
|
}
|
1447
1476
|
},
|
1448
|
-
/* @__PURE__ */
|
1477
|
+
/* @__PURE__ */ import_react10.default.createElement(
|
1449
1478
|
"svg",
|
1450
1479
|
{
|
1451
1480
|
className: cn(
|
@@ -1455,7 +1484,7 @@ var AppLayout = ({
|
|
1455
1484
|
fill: "currentColor",
|
1456
1485
|
viewBox: "0 0 20 20"
|
1457
1486
|
},
|
1458
|
-
/* @__PURE__ */
|
1487
|
+
/* @__PURE__ */ import_react10.default.createElement(
|
1459
1488
|
"path",
|
1460
1489
|
{
|
1461
1490
|
fillRule: "evenodd",
|
@@ -1467,7 +1496,7 @@ var AppLayout = ({
|
|
1467
1496
|
)
|
1468
1497
|
) : null
|
1469
1498
|
)
|
1470
|
-
), /* @__PURE__ */
|
1499
|
+
), /* @__PURE__ */ import_react10.default.createElement(
|
1471
1500
|
"div",
|
1472
1501
|
{
|
1473
1502
|
className: "hawa-fixed -hawa-z-10 hawa-overflow-y-auto hawa-transition-all",
|
@@ -1486,27 +1515,6 @@ var AppLayout = ({
|
|
1486
1515
|
props.children
|
1487
1516
|
));
|
1488
1517
|
};
|
1489
|
-
var MenuIcon = () => /* @__PURE__ */ import_react7.default.createElement(
|
1490
|
-
"svg",
|
1491
|
-
{
|
1492
|
-
"aria-label": "Menu Button",
|
1493
|
-
stroke: "currentColor",
|
1494
|
-
fill: "currentColor",
|
1495
|
-
strokeWidth: 0,
|
1496
|
-
viewBox: "0 0 20 20",
|
1497
|
-
"aria-hidden": "true",
|
1498
|
-
height: "1.6em",
|
1499
|
-
width: "1.6em"
|
1500
|
-
},
|
1501
|
-
/* @__PURE__ */ import_react7.default.createElement(
|
1502
|
-
"path",
|
1503
|
-
{
|
1504
|
-
fillRule: "evenodd",
|
1505
|
-
clipRule: "evenodd",
|
1506
|
-
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"
|
1507
|
-
}
|
1508
|
-
)
|
1509
|
-
);
|
1510
1518
|
// Annotate the CommonJS export names for ESM import in node:
|
1511
1519
|
0 && (module.exports = {
|
1512
1520
|
AppLayout
|