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