@monolith-forensics/monolith-ui 1.2.92 → 1.2.93

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.
@@ -52,8 +52,8 @@ export const MenuComponent = forwardRef((_a, forwardedRef) => {
52
52
  });
53
53
  const click = useClick(context, {
54
54
  event: "click",
55
- toggle: !isNested,
56
- ignoreMouse: isNested,
55
+ toggle: true,
56
+ ignoreMouse: false,
57
57
  });
58
58
  const role = useRole(context, { role: "menu" });
59
59
  const dismiss = useDismiss(context, { bubbles: true });
@@ -75,8 +75,8 @@ export const MenuComponent = forwardRef((_a, forwardedRef) => {
75
75
  useEffect(() => {
76
76
  if (!tree)
77
77
  return;
78
- function handleTreeClick() {
79
- if (!multiselect) {
78
+ function handleTreeClick(event) {
79
+ if (!multiselect && !event.nested) {
80
80
  setIsOpen(false);
81
81
  }
82
82
  }
@@ -107,7 +107,7 @@ export const MenuComponent = forwardRef((_a, forwardedRef) => {
107
107
  (_a = props.onFocus) === null || _a === void 0 ? void 0 : _a.call(props, event);
108
108
  setHasFocusInside(false);
109
109
  parent.setHasFocusInside(true);
110
- } }))), { rightSection: arrow ? (_jsx(ChevronDownIcon, { size: 12 })) : isNested ? (_jsx(ChevronRightIcon, { size: 12 })) : null, size: buttonSize, variant: variant, selected: isOpen }, buttonProps, { children: label })), _jsx(MenuContext.Provider, { value: {
110
+ } }))), { rightSection: arrow ? (_jsx(ChevronDownIcon, { size: 12 })) : isNested ? (_jsx(ChevronRightIcon, { size: 12 })) : null, size: buttonSize, variant: variant, selected: isOpen, nested: isNested }, buttonProps, { children: label })), _jsx(MenuContext.Provider, { value: {
111
111
  activeIndex,
112
112
  setActiveIndex,
113
113
  getItemProps,
@@ -17,7 +17,7 @@ import { useFloatingTree, useListItem, useMergeRefs } from "@floating-ui/react";
17
17
  import { MenuContext } from "./MenuContext";
18
18
  import Tooltip from "../../Tooltip";
19
19
  export const MenuItem = styled(forwardRef((_a, forwardedRef) => {
20
- var { label, children, disabled, multiselect, TooltipContent, itemData } = _a, props = __rest(_a, ["label", "children", "disabled", "multiselect", "TooltipContent", "itemData"]);
20
+ var { label, children, disabled, multiselect, TooltipContent, itemData, nested } = _a, props = __rest(_a, ["label", "children", "disabled", "multiselect", "TooltipContent", "itemData", "nested"]);
21
21
  const menu = useContext(MenuContext);
22
22
  const item = useListItem({ label: disabled ? null : label });
23
23
  const tree = useFloatingTree();
@@ -26,7 +26,7 @@ export const MenuItem = styled(forwardRef((_a, forwardedRef) => {
26
26
  onClick(event) {
27
27
  var _a;
28
28
  (_a = props.onClick) === null || _a === void 0 ? void 0 : _a.call(props, event);
29
- tree === null || tree === void 0 ? void 0 : tree.events.emit("click");
29
+ tree === null || tree === void 0 ? void 0 : tree.events.emit("click", { nested });
30
30
  },
31
31
  onFocus(event) {
32
32
  var _a;
@@ -100,7 +100,7 @@ const TableMenu = () => {
100
100
  })), multiselect: true, searchable: true, buttonProps: {
101
101
  title: "Show/Hide Columns",
102
102
  size: "xs",
103
- style: { padding: "0px 4px" },
103
+ style: { padding: "0px 4px", height: 24 },
104
104
  }, dropDownProps: {
105
105
  style: { width: 175, maxWidth: 400 },
106
106
  }, children: _jsx(Columns3Icon, { size: 14 }) })), (searchOptions === null || searchOptions === void 0 ? void 0 : searchOptions.enabled) === true && (_jsx(TextInput, { size: "xs", placeholder: ((_c = tableMenuOptions === null || tableMenuOptions === void 0 ? void 0 : tableMenuOptions.searchOptions) === null || _c === void 0 ? void 0 : _c.placeholder) || "Search", defaultValue: searchState, onChange: handleSearch }))] })] }), _jsx(QueryFilter, { queryFilter: queryFilter })] }));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@monolith-forensics/monolith-ui",
3
- "version": "1.2.92",
3
+ "version": "1.2.93",
4
4
  "main": "./dist/index.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "author": "Matt Danner (Monolith Forensics LLC)",