@primer/react 0.0.0-20260619202956 → 0.0.0-20260619204009

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/CHANGELOG.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @primer/react
2
2
 
3
- ## 0.0.0-20260619202956
3
+ ## 0.0.0-20260619204009
4
4
 
5
5
  ### Minor Changes
6
6
 
@@ -1 +1 @@
1
- {"version":3,"file":"UnderlineNav.d.ts","sourceRoot":"","sources":["../../src/UnderlineNav/UnderlineNav.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAgB9B,MAAM,MAAM,iBAAiB,GAAG;IAC9B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,YAAY,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,YAAY,CAAC,CAAA;IACjD,EAAE,CAAC,EAAE,KAAK,CAAC,WAAW,CAAA;IACtB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;;OAEG;IACH,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,GAAG,OAAO,CAAA;CAC5B,CAAA;AAED,eAAO,MAAM,YAAY,mFAiIxB,CAAA"}
1
+ {"version":3,"file":"UnderlineNav.d.ts","sourceRoot":"","sources":["../../src/UnderlineNav/UnderlineNav.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAgB9B,MAAM,MAAM,iBAAiB,GAAG;IAC9B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,YAAY,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,YAAY,CAAC,CAAA;IACjD,EAAE,CAAC,EAAE,KAAK,CAAC,WAAW,CAAA;IACtB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;;OAEG;IACH,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,GAAG,OAAO,CAAA;CAC5B,CAAA;AAED,eAAO,MAAM,YAAY,mFAsIxB,CAAA"}
@@ -47,6 +47,10 @@ const UnderlineNav = /*#__PURE__*/forwardRef(({
47
47
  const contextValue = useMemo(() => ({
48
48
  loadingCounters
49
49
  }), [loadingCounters]);
50
+ const [menuOpen, setMenuOpen] = useState(false);
51
+
52
+ // Edge case to avoid empty menu: close the menu if it's open but there's no longer an overflow (window resized or items removed)
53
+ if (menuOpen && !isOverflowing) setMenuOpen(false);
50
54
  return /*#__PURE__*/jsxs(UnderlineNavContext.Provider, {
51
55
  value: contextValue,
52
56
  children: [ariaLabel && /*#__PURE__*/jsx(VisuallyHidden, {
@@ -78,6 +82,8 @@ const UnderlineNav = /*#__PURE__*/forwardRef(({
78
82
  children: [/*#__PURE__*/jsx("div", {
79
83
  className: classes.MoreButtonDivider
80
84
  }), /*#__PURE__*/jsxs(ActionMenu, {
85
+ open: menuOpen,
86
+ onOpenChange: setMenuOpen,
81
87
  children: [/*#__PURE__*/jsx(ActionMenu.Button, {
82
88
  className: classes.MoreButton,
83
89
  variant: "invisible",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@primer/react",
3
3
  "type": "module",
4
- "version": "0.0.0-20260619202956",
4
+ "version": "0.0.0-20260619204009",
5
5
  "description": "An implementation of GitHub's Primer Design System using React",
6
6
  "main": "./dist/index.js",
7
7
  "module": "./dist/index.js",