@sikka/hawa 0.18.0-next → 0.18.1-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/index.d.mts CHANGED
@@ -83,6 +83,7 @@ declare const DropdownMenuItem: React$1.ForwardRefExoticComponent<Omit<DropdownM
83
83
  end?: any;
84
84
  shortcut?: React$1.ReactNode;
85
85
  badged?: boolean | undefined;
86
+ slug?: string | undefined;
86
87
  } & React$1.RefAttributes<HTMLDivElement>>;
87
88
  declare const DropdownMenuCheckboxItem: React$1.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuCheckboxItemProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
88
89
  declare const DropdownMenuLabel: React$1.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuLabelProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & {
@@ -99,6 +100,7 @@ type SubItem$1 = {
99
100
  onMiddleClick?: (e: any) => void;
100
101
  highlighted?: boolean;
101
102
  disabled?: boolean;
103
+ slug?: string;
102
104
  };
103
105
  type MenuItemType = {
104
106
  icon?: React$1.ReactNode;
@@ -107,6 +109,7 @@ type MenuItemType = {
107
109
  badged?: boolean;
108
110
  value?: any;
109
111
  content?: any;
112
+ slug?: string;
110
113
  end?: any;
111
114
  presist?: boolean;
112
115
  itemType?: "separator" | "label" | string;
package/dist/index.d.ts CHANGED
@@ -83,6 +83,7 @@ declare const DropdownMenuItem: React$1.ForwardRefExoticComponent<Omit<DropdownM
83
83
  end?: any;
84
84
  shortcut?: React$1.ReactNode;
85
85
  badged?: boolean | undefined;
86
+ slug?: string | undefined;
86
87
  } & React$1.RefAttributes<HTMLDivElement>>;
87
88
  declare const DropdownMenuCheckboxItem: React$1.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuCheckboxItemProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
88
89
  declare const DropdownMenuLabel: React$1.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuLabelProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & {
@@ -99,6 +100,7 @@ type SubItem$1 = {
99
100
  onMiddleClick?: (e: any) => void;
100
101
  highlighted?: boolean;
101
102
  disabled?: boolean;
103
+ slug?: string;
102
104
  };
103
105
  type MenuItemType = {
104
106
  icon?: React$1.ReactNode;
@@ -107,6 +109,7 @@ type MenuItemType = {
107
109
  badged?: boolean;
108
110
  value?: any;
109
111
  content?: any;
112
+ slug?: string;
110
113
  end?: any;
111
114
  presist?: boolean;
112
115
  itemType?: "separator" | "label" | string;
package/dist/index.js CHANGED
@@ -804,7 +804,7 @@ var DropdownMenuContent = React8.forwardRef(({ className, sideOffset = 4, ...pro
804
804
  }
805
805
  )));
806
806
  DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
807
- var DropdownMenuItem = React8.forwardRef(({ className, inset, ...props }, ref) => {
807
+ var DropdownMenuItem = React8.forwardRef(({ className, inset, slug, ...props }, ref) => {
808
808
  return /* @__PURE__ */ React8.createElement(
809
809
  DropdownMenuPrimitive.Item,
810
810
  {
@@ -818,7 +818,14 @@ var DropdownMenuItem = React8.forwardRef(({ className, inset, ...props }, ref) =
818
818
  ),
819
819
  ...props
820
820
  },
821
- /* @__PURE__ */ React8.createElement("div", { className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-2 " }, props.children),
821
+ /* @__PURE__ */ React8.createElement(
822
+ "a",
823
+ {
824
+ href: slug,
825
+ className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-2 "
826
+ },
827
+ props.children
828
+ ),
822
829
  props.end && props.end,
823
830
  !props.end && props.shortcut && /* @__PURE__ */ React8.createElement(DropdownMenuShortcut, null, props.shortcut),
824
831
  !props.end && props.badged && /* @__PURE__ */ React8.createElement("div", { className: "hawa-h-3 hawa-w-3 hawa-bg-red-500 hawa-rounded-full" })
@@ -989,6 +996,7 @@ var DropdownMenu = ({
989
996
  ), /* @__PURE__ */ React8.createElement(DropdownMenuPortal, null, /* @__PURE__ */ React8.createElement(DropdownMenuSubContent, null, item.subitems.map((subitem, subIndex) => /* @__PURE__ */ React8.createElement(
990
997
  DropdownMenuItem,
991
998
  {
999
+ slug: subitem.slug,
992
1000
  onMouseDown: (event) => {
993
1001
  if (event.button === 1 || event.button === 0 && event.ctrlKey) {
994
1002
  event.preventDefault();
@@ -1015,6 +1023,7 @@ var DropdownMenu = ({
1015
1023
  ))))) : /* @__PURE__ */ React8.createElement(
1016
1024
  DropdownMenuItem,
1017
1025
  {
1026
+ slug: item.slug,
1018
1027
  key: index,
1019
1028
  disabled: item.disabled,
1020
1029
  onMouseDown: (event) => {
package/dist/index.mjs CHANGED
@@ -582,7 +582,7 @@ var DropdownMenuContent = React8.forwardRef(({ className, sideOffset = 4, ...pro
582
582
  }
583
583
  )));
584
584
  DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
585
- var DropdownMenuItem = React8.forwardRef(({ className, inset, ...props }, ref) => {
585
+ var DropdownMenuItem = React8.forwardRef(({ className, inset, slug, ...props }, ref) => {
586
586
  return /* @__PURE__ */ React8.createElement(
587
587
  DropdownMenuPrimitive.Item,
588
588
  {
@@ -596,7 +596,14 @@ var DropdownMenuItem = React8.forwardRef(({ className, inset, ...props }, ref) =
596
596
  ),
597
597
  ...props
598
598
  },
599
- /* @__PURE__ */ React8.createElement("div", { className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-2 " }, props.children),
599
+ /* @__PURE__ */ React8.createElement(
600
+ "a",
601
+ {
602
+ href: slug,
603
+ className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-2 "
604
+ },
605
+ props.children
606
+ ),
600
607
  props.end && props.end,
601
608
  !props.end && props.shortcut && /* @__PURE__ */ React8.createElement(DropdownMenuShortcut, null, props.shortcut),
602
609
  !props.end && props.badged && /* @__PURE__ */ React8.createElement("div", { className: "hawa-h-3 hawa-w-3 hawa-bg-red-500 hawa-rounded-full" })
@@ -767,6 +774,7 @@ var DropdownMenu = ({
767
774
  ), /* @__PURE__ */ React8.createElement(DropdownMenuPortal, null, /* @__PURE__ */ React8.createElement(DropdownMenuSubContent, null, item.subitems.map((subitem, subIndex) => /* @__PURE__ */ React8.createElement(
768
775
  DropdownMenuItem,
769
776
  {
777
+ slug: subitem.slug,
770
778
  onMouseDown: (event) => {
771
779
  if (event.button === 1 || event.button === 0 && event.ctrlKey) {
772
780
  event.preventDefault();
@@ -793,6 +801,7 @@ var DropdownMenu = ({
793
801
  ))))) : /* @__PURE__ */ React8.createElement(
794
802
  DropdownMenuItem,
795
803
  {
804
+ slug: item.slug,
796
805
  key: index,
797
806
  disabled: item.disabled,
798
807
  onMouseDown: (event) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sikka/hawa",
3
- "version": "0.18.0-next",
3
+ "version": "0.18.1-next",
4
4
  "description": "Modern UI Kit made with Tailwind",
5
5
  "author": {
6
6
  "name": "Sikka Software",