@inf-monkeys-tech/monkeys-design 2.0.5 → 2.0.7

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.
@@ -7557,6 +7557,7 @@ function DataExplorerViewTree({
7557
7557
  onSelectNode?.(node, context);
7558
7558
  },
7559
7559
  onKeyDown: (event) => {
7560
+ if (event.target !== event.currentTarget) return;
7560
7561
  if (!isSelectable) return;
7561
7562
  if (event.key !== "Enter" && event.key !== " ") return;
7562
7563
  event.preventDefault();
@@ -7683,7 +7684,7 @@ function DataExplorerViewTree({
7683
7684
  "div",
7684
7685
  {
7685
7686
  className: cn2(theme.slots.treeRoot, classNames?.root, className),
7686
- role: hasAnyNodes ? "tree" : void 0,
7687
+ role: hasAnyNodes || resolvedGroups.some((group) => !group.hideHeader) ? "tree" : void 0,
7687
7688
  children: resolvedGroups.map((group) => {
7688
7689
  const groupExpanded = group.hideHeader || group.collapsible === false || resolvedExpandedGroupIds.has(group.id);
7689
7690
  const groupNodeCount = group.nodes?.length ?? 0;
@@ -7700,6 +7701,10 @@ function DataExplorerViewTree({
7700
7701
  !group.hideHeader ? /* @__PURE__ */ jsxs(
7701
7702
  "div",
7702
7703
  {
7704
+ role: "treeitem",
7705
+ "aria-label": typeof group.label === "string" ? group.label : void 0,
7706
+ "aria-selected": group.selectable ? groupSelected : void 0,
7707
+ "aria-expanded": groupCollapsible ? groupExpanded : void 0,
7703
7708
  className: cn2(
7704
7709
  theme.slots.treeGroupHeader,
7705
7710
  theme.slots.treeGroupHeaderButton,
@@ -7784,6 +7789,7 @@ function DataExplorerViewTree({
7784
7789
  groupExpanded ? /* @__PURE__ */ jsx(
7785
7790
  "div",
7786
7791
  {
7792
+ role: "group",
7787
7793
  className: cn2(
7788
7794
  theme.slots.treeGroupContent,
7789
7795
  classNames?.groupContent,