@diplodoc/client 5.2.5 → 5.2.6

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.
@@ -3995,6 +3995,11 @@ var TocItem = react.forwardRef(
3995
3995
  const handleClick = () => {
3996
3996
  toggleItem(id, expanded);
3997
3997
  };
3998
+ const handleArrowClick = (event) => {
3999
+ event.stopPropagation();
4000
+ event.preventDefault();
4001
+ toggleItem(id, expanded);
4002
+ };
3998
4003
  const { t } = (0,useTranslation/* .useTranslation */.B)("toc-nav-panel");
3999
4004
  const deprecatedIcon = deprecated ? /* @__PURE__ */ react.createElement(Ban/* ["default"] */.A, null) : null;
4000
4005
  const text = /* @__PURE__ */ react.createElement("span", null, name, " ", deprecatedIcon);
@@ -4034,18 +4039,18 @@ var TocItem = react.forwardRef(
4034
4039
  "data-router-shallow": true
4035
4040
  };
4036
4041
  if (expandable && href) {
4037
- return /* @__PURE__ */ react.createElement("div", { className: TocItem_b("wrapper", TocItem_b("text", textProps)) }, /* @__PURE__ */ react.createElement(
4042
+ return /* @__PURE__ */ react.createElement("a", __spreadValues({}, linkAttributes), /* @__PURE__ */ react.createElement("div", { className: TocItem_b("wrapper", TocItem_b("text", textProps)) }, /* @__PURE__ */ react.createElement(
4038
4043
  Button/* .Button */.$,
4039
4044
  {
4040
4045
  size: "xs",
4041
4046
  className: TocItem_b("arrow"),
4042
4047
  view: "flat",
4043
- onClick: handleClick,
4048
+ onClick: handleArrowClick,
4044
4049
  extraProps: allyButtonProps,
4045
4050
  ref
4046
4051
  },
4047
4052
  /* @__PURE__ */ react.createElement(Button/* .Button.Icon */.$.Icon, null, icon)
4048
- ), /* @__PURE__ */ react.createElement("a", __spreadValues({}, linkAttributes), /* @__PURE__ */ react.createElement("span", { className: TocItem_b("text") }, text)));
4053
+ ), /* @__PURE__ */ react.createElement("span", { className: TocItem_b("text") }, text)));
4049
4054
  }
4050
4055
  return /* @__PURE__ */ react.createElement("a", __spreadValues({}, linkAttributes), content);
4051
4056
  }