@sikka/hawa 0.16.5-next → 0.16.8-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
@@ -966,12 +966,14 @@ type AppLayoutSidebarItemProps = {
966
966
  icon?: any;
967
967
  subitems?: SubItem[];
968
968
  onClick?: (e: React$1.MouseEvent) => void;
969
+ onMouseDown?: (e: React$1.MouseEvent) => void;
969
970
  };
970
971
  type SubItem = {
971
972
  value: string;
972
973
  label: string;
973
974
  icon?: any;
974
- onClick?: () => void;
975
+ onMouseDown: (e: React$1.MouseEvent) => void;
976
+ onClick?: (e: React$1.MouseEvent) => void;
975
977
  };
976
978
  interface SidebarGroupProps {
977
979
  title?: string;
package/dist/index.d.ts CHANGED
@@ -966,12 +966,14 @@ type AppLayoutSidebarItemProps = {
966
966
  icon?: any;
967
967
  subitems?: SubItem[];
968
968
  onClick?: (e: React$1.MouseEvent) => void;
969
+ onMouseDown?: (e: React$1.MouseEvent) => void;
969
970
  };
970
971
  type SubItem = {
971
972
  value: string;
972
973
  label: string;
973
974
  icon?: any;
974
- onClick?: () => void;
975
+ onMouseDown: (e: React$1.MouseEvent) => void;
976
+ onClick?: (e: React$1.MouseEvent) => void;
975
977
  };
976
978
  interface SidebarGroupProps {
977
979
  title?: string;
package/dist/index.js CHANGED
@@ -7201,10 +7201,15 @@ var SidebarItem = function(_param) {
7201
7201
  }, item.subitems.map(function(subitem, idx) {
7202
7202
  return /* @__PURE__ */ React62.createElement("li", {
7203
7203
  key: idx,
7204
+ onMouseDown: function(e) {
7205
+ if (subitem.onMouseDown) {
7206
+ subitem.onMouseDown(e);
7207
+ }
7208
+ },
7204
7209
  onClick: function(e) {
7205
7210
  e.stopPropagation();
7206
7211
  if (subitem.onClick) {
7207
- subitem.onClick();
7212
+ subitem.onClick(e);
7208
7213
  }
7209
7214
  if (onSubItemClick) {
7210
7215
  onSubItemClick([
@@ -7221,6 +7226,11 @@ var SidebarItem = function(_param) {
7221
7226
  return /* @__PURE__ */ React62.createElement("div", {
7222
7227
  dir: direction,
7223
7228
  onMouseDown: function(e) {
7229
+ if (item.onMouseDown) {
7230
+ item.onMouseDown(e);
7231
+ }
7232
+ },
7233
+ onClick: function(e) {
7224
7234
  if (item.onClick) {
7225
7235
  item.onClick(e);
7226
7236
  }
package/dist/index.mjs CHANGED
@@ -7035,10 +7035,15 @@ var SidebarItem = ({
7035
7035
  "li",
7036
7036
  {
7037
7037
  key: idx,
7038
+ onMouseDown: (e) => {
7039
+ if (subitem.onMouseDown) {
7040
+ subitem.onMouseDown(e);
7041
+ }
7042
+ },
7038
7043
  onClick: (e) => {
7039
7044
  e.stopPropagation();
7040
7045
  if (subitem.onClick) {
7041
- subitem.onClick();
7046
+ subitem.onClick(e);
7042
7047
  }
7043
7048
  if (onSubItemClick) {
7044
7049
  onSubItemClick([item.value, subitem.value]);
@@ -7061,6 +7066,11 @@ var SidebarItem = ({
7061
7066
  {
7062
7067
  dir: direction,
7063
7068
  onMouseDown: (e) => {
7069
+ if (item.onMouseDown) {
7070
+ item.onMouseDown(e);
7071
+ }
7072
+ },
7073
+ onClick: (e) => {
7064
7074
  if (item.onClick) {
7065
7075
  item.onClick(e);
7066
7076
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sikka/hawa",
3
- "version": "0.16.5-next",
3
+ "version": "0.16.8-next",
4
4
  "main": "./dist/index.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "exports": {