@primer/react 0.0.0-20260402145624 → 0.0.0-20260402150048

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.
Files changed (149) hide show
  1. package/CHANGELOG.md +91 -1
  2. package/dist/ActionBar/ActionBar.d.ts +1 -1
  3. package/dist/ActionBar/ActionBar.js +17 -20
  4. package/dist/ActionBar/index.d.ts +1 -1
  5. package/dist/ActionList/Heading.js +17 -16
  6. package/dist/ActionList/Item.d.ts.map +1 -1
  7. package/dist/ActionList/Item.js +626 -192
  8. package/dist/ActionList/LinkItem.d.ts +6 -3
  9. package/dist/ActionList/LinkItem.d.ts.map +1 -1
  10. package/dist/ActionList/LinkItem.js +42 -87
  11. package/dist/ActionList/List.d.ts.map +1 -1
  12. package/dist/ActionList/List.js +6 -5
  13. package/dist/ActionList/index.d.ts +25 -1
  14. package/dist/ActionList/index.d.ts.map +1 -1
  15. package/dist/ActionMenu/{ActionMenu-53493541.css → ActionMenu-58362ca7.css} +2 -2
  16. package/dist/ActionMenu/ActionMenu-58362ca7.css.map +1 -0
  17. package/dist/ActionMenu/ActionMenu.d.ts.map +1 -1
  18. package/dist/ActionMenu/ActionMenu.js +14 -3
  19. package/dist/ActionMenu/ActionMenu.module.css.js +1 -1
  20. package/dist/AnchoredOverlay/AnchoredOverlay-647c7065.css +2 -0
  21. package/dist/AnchoredOverlay/AnchoredOverlay-647c7065.css.map +1 -0
  22. package/dist/AnchoredOverlay/AnchoredOverlay.d.ts.map +1 -1
  23. package/dist/AnchoredOverlay/AnchoredOverlay.js +83 -10
  24. package/dist/AnchoredOverlay/AnchoredOverlay.module.css.js +2 -2
  25. package/dist/Autocomplete/AutocompleteInput.js +3 -3
  26. package/dist/Autocomplete/AutocompleteOverlay.js +3 -3
  27. package/dist/Banner/{Banner-b3871000.css → Banner-41040ab7.css} +2 -2
  28. package/dist/Banner/{Banner-b3871000.css.map → Banner-41040ab7.css.map} +1 -1
  29. package/dist/Banner/Banner.d.ts.map +1 -1
  30. package/dist/Banner/Banner.js +2 -1
  31. package/dist/Banner/Banner.module.css.js +1 -1
  32. package/dist/Breadcrumbs/Breadcrumbs.d.ts +23 -8
  33. package/dist/Breadcrumbs/Breadcrumbs.d.ts.map +1 -1
  34. package/dist/Breadcrumbs/Breadcrumbs.js +27 -66
  35. package/dist/Button/{ButtonBase-781fba8b.css → ButtonBase-4da3fa22.css} +2 -2
  36. package/dist/Button/ButtonBase-4da3fa22.css.map +1 -0
  37. package/dist/Button/ButtonBase.d.ts.map +1 -1
  38. package/dist/Button/ButtonBase.js +4 -5
  39. package/dist/Button/ButtonBase.module.css.js +2 -2
  40. package/dist/Button/types.d.ts +1 -1
  41. package/dist/Button/types.d.ts.map +1 -1
  42. package/dist/Details/Details.js +1 -1
  43. package/dist/Dialog/{Dialog-2d417a89.css → Dialog-f9bb927a.css} +2 -2
  44. package/dist/Dialog/Dialog-f9bb927a.css.map +1 -0
  45. package/dist/Dialog/Dialog.d.ts.map +1 -1
  46. package/dist/Dialog/Dialog.js +40 -22
  47. package/dist/Dialog/Dialog.module.css.js +2 -2
  48. package/dist/FeatureFlags/DefaultFeatureFlags.js +2 -2
  49. package/dist/FeatureFlags/FeatureFlags.d.ts +0 -6
  50. package/dist/FeatureFlags/FeatureFlags.d.ts.map +1 -1
  51. package/dist/FeatureFlags/FeatureFlags.js +32 -41
  52. package/dist/FilteredActionList/FilteredActionList-6808e67a.css +2 -0
  53. package/dist/FilteredActionList/FilteredActionList-6808e67a.css.map +1 -0
  54. package/dist/FilteredActionList/FilteredActionList.module.css.js +1 -1
  55. package/dist/Heading/Heading.js +3 -3
  56. package/dist/Link/{Link-968346ff.css → Link-ba423096.css} +2 -2
  57. package/dist/Link/Link-ba423096.css.map +1 -0
  58. package/dist/Link/Link.d.ts.map +1 -1
  59. package/dist/Link/Link.js +5 -5
  60. package/dist/Link/Link.module.css.js +1 -1
  61. package/dist/NavList/NavList.d.ts +20 -3
  62. package/dist/NavList/NavList.d.ts.map +1 -1
  63. package/dist/NavList/NavList.js +50 -124
  64. package/dist/Overlay/Overlay-f81a131d.css +2 -0
  65. package/dist/Overlay/Overlay-f81a131d.css.map +1 -0
  66. package/dist/Overlay/Overlay.d.ts +1 -0
  67. package/dist/Overlay/Overlay.d.ts.map +1 -1
  68. package/dist/Overlay/Overlay.js +106 -82
  69. package/dist/Overlay/Overlay.module.css.js +1 -1
  70. package/dist/PageLayout/PageLayout.d.ts +4 -20
  71. package/dist/PageLayout/PageLayout.d.ts.map +1 -1
  72. package/dist/PageLayout/PageLayout.js +17 -5
  73. package/dist/SelectPanel/SelectPanel.d.ts +2 -2
  74. package/dist/SelectPanel/SelectPanel.d.ts.map +1 -1
  75. package/dist/SelectPanel/SelectPanel.js +32 -29
  76. package/dist/Stack/Stack-58c33984.css +2 -0
  77. package/dist/Stack/Stack-58c33984.css.map +1 -0
  78. package/dist/Stack/Stack.d.ts +12 -2
  79. package/dist/Stack/Stack.d.ts.map +1 -1
  80. package/dist/Stack/Stack.js +89 -61
  81. package/dist/Stack/Stack.module.css.js +1 -1
  82. package/dist/StateLabel/{StateLabel-056eec66.css → StateLabel-cd51ae39.css} +2 -2
  83. package/dist/StateLabel/StateLabel-cd51ae39.css.map +1 -0
  84. package/dist/StateLabel/StateLabel.d.ts +1 -0
  85. package/dist/StateLabel/StateLabel.d.ts.map +1 -1
  86. package/dist/StateLabel/StateLabel.js +4 -2
  87. package/dist/StateLabel/StateLabel.module.css.js +1 -1
  88. package/dist/TextInput/TextInput.d.ts.map +1 -1
  89. package/dist/TextInput/TextInput.js +31 -5
  90. package/dist/TextInputWithTokens/TextInputWithTokens.js +91 -90
  91. package/dist/ThemeProvider.d.ts.map +1 -1
  92. package/dist/ThemeProvider.js +163 -104
  93. package/dist/Timeline/Timeline-4d67684a.css +2 -0
  94. package/dist/Timeline/Timeline-4d67684a.css.map +1 -0
  95. package/dist/Timeline/Timeline.d.ts +1 -1
  96. package/dist/Timeline/Timeline.d.ts.map +1 -1
  97. package/dist/Timeline/Timeline.js +27 -14
  98. package/dist/Timeline/Timeline.module.css.js +1 -1
  99. package/dist/TooltipV2/{Tooltip-fcb90d9c.css → Tooltip-dd983e5b.css} +2 -2
  100. package/dist/TooltipV2/Tooltip-dd983e5b.css.map +1 -0
  101. package/dist/TooltipV2/Tooltip.d.ts +1 -1
  102. package/dist/TooltipV2/Tooltip.d.ts.map +1 -1
  103. package/dist/TooltipV2/Tooltip.js +17 -11
  104. package/dist/TooltipV2/Tooltip.module.css.js +2 -2
  105. package/dist/TreeView/TreeView.d.ts.map +1 -1
  106. package/dist/TreeView/TreeView.js +101 -59
  107. package/dist/deprecated/DialogV1/Dialog.js +10 -9
  108. package/dist/hooks/index.d.ts +1 -0
  109. package/dist/hooks/index.d.ts.map +1 -1
  110. package/dist/hooks/useAnchoredPosition.d.ts.map +1 -1
  111. package/dist/hooks/useAnchoredPosition.js +47 -0
  112. package/dist/hooks/useMergedRefs.d.ts +51 -0
  113. package/dist/hooks/useMergedRefs.d.ts.map +1 -0
  114. package/dist/hooks/useMergedRefs.js +86 -0
  115. package/dist/hooks/useProvidedRefOrCreate.d.ts +12 -0
  116. package/dist/hooks/useProvidedRefOrCreate.d.ts.map +1 -1
  117. package/dist/hooks/useProvidedRefOrCreate.js +12 -0
  118. package/dist/hooks/useRefObjectAsForwardedRef.d.ts +12 -0
  119. package/dist/hooks/useRefObjectAsForwardedRef.d.ts.map +1 -1
  120. package/dist/hooks/useRefObjectAsForwardedRef.js +12 -0
  121. package/dist/index.d.ts +1 -0
  122. package/dist/index.d.ts.map +1 -1
  123. package/dist/index.js +1 -0
  124. package/dist/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroup.d.ts.map +1 -1
  125. package/dist/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroup.js +17 -8
  126. package/dist/utils/character-counter.d.ts.map +1 -1
  127. package/dist/utils/character-counter.js +1 -0
  128. package/generated/components.json +49 -9
  129. package/generated/hooks.json +22 -0
  130. package/package.json +9 -7
  131. package/dist/ActionMenu/ActionMenu-53493541.css.map +0 -1
  132. package/dist/AnchoredOverlay/AnchoredOverlay-73c1b2d1.css +0 -2
  133. package/dist/AnchoredOverlay/AnchoredOverlay-73c1b2d1.css.map +0 -1
  134. package/dist/Button/ButtonBase-781fba8b.css.map +0 -1
  135. package/dist/Dialog/Dialog-2d417a89.css.map +0 -1
  136. package/dist/FilteredActionList/FilteredActionList-02db90c6.css +0 -2
  137. package/dist/FilteredActionList/FilteredActionList-02db90c6.css.map +0 -1
  138. package/dist/Link/Link-968346ff.css.map +0 -1
  139. package/dist/Overlay/Overlay-15519c09.css +0 -2
  140. package/dist/Overlay/Overlay-15519c09.css.map +0 -1
  141. package/dist/Stack/Stack-9e7b935d.css +0 -2
  142. package/dist/Stack/Stack-9e7b935d.css.map +0 -1
  143. package/dist/StateLabel/StateLabel-056eec66.css.map +0 -1
  144. package/dist/Timeline/Timeline-19bef8c5.css +0 -2
  145. package/dist/Timeline/Timeline-19bef8c5.css.map +0 -1
  146. package/dist/TooltipV2/Tooltip-fcb90d9c.css.map +0 -1
  147. package/dist/internal/hooks/useMergedRefs.d.ts +0 -2
  148. package/dist/internal/hooks/useMergedRefs.d.ts.map +0 -1
  149. package/dist/internal/hooks/useMergedRefs.js +0 -16
package/CHANGELOG.md CHANGED
@@ -1,17 +1,107 @@
1
1
  # @primer/react
2
2
 
3
- ## 0.0.0-20260402145624
3
+ ## 0.0.0-20260402150048
4
4
 
5
5
  ### Minor Changes
6
6
 
7
7
  - [#7655](https://github.com/primer/react/pull/7655) [`8f1f205`](https://github.com/primer/react/commit/8f1f205a637939eb167095b4ac766cf6524ac558) Thanks [@iansan5653](https://github.com/iansan5653)! - Replace `ActionBar` overflow calculations with CSS wrapping approach to improve performance and stability
8
8
 
9
+ - [#7677](https://github.com/primer/react/pull/7677) [`c1a81b1`](https://github.com/primer/react/commit/c1a81b178742ba547b85a3df3ed3c27bcff6b7c5) Thanks [@TylerJDev](https://github.com/TylerJDev)! - AnchoredOverlay: Add Popover API to AnchoredOverlay (behind `primer_react_css_anchor_positioning` feature flag)
10
+
11
+ - [#7697](https://github.com/primer/react/pull/7697) [`990ce7b`](https://github.com/primer/react/commit/990ce7b625bcf90ef3867e93086d0c74835a9068) Thanks [@hectahertz](https://github.com/hectahertz)! - **Stack**: Add `tight` (4px) and `cozy` (12px) spacing values to `gap` and `padding` props. Add `paddingBlock` and `paddingInline` props for directional padding control.
12
+
9
13
  ### Patch Changes
10
14
 
15
+ - [#7652](https://github.com/primer/react/pull/7652) [`5d19e2b`](https://github.com/primer/react/commit/5d19e2bb5bbd444f2e82d98eef300c221863941c) Thanks [@owenniblock](https://github.com/owenniblock)! - useAnchoredPosition: recalculate overlay position when any scrollable ancestor (or the window) is scrolled.
16
+
17
+ - [#7707](https://github.com/primer/react/pull/7707) [`6431bfe`](https://github.com/primer/react/commit/6431bfecd72e24db1dfa90b02f8a42834e63843b) Thanks [@liuliu-dev](https://github.com/liuliu-dev)! - Fix anchor-name not being set on the anchor element when SelectPanel is opened in Copilot code agent.
18
+
19
+ - [#7638](https://github.com/primer/react/pull/7638) [`f04e85d`](https://github.com/primer/react/commit/f04e85df536cd6e8047f70b070bd3cf7c0961f92) Thanks [@iansan5653](https://github.com/iansan5653)! - Update internal implementations of combined refs to improve performance and add support for React 19 callback refs
20
+
11
21
  - Fake entry to force publishing
12
22
 
23
+ - [#7633](https://github.com/primer/react/pull/7633) [`a107d39`](https://github.com/primer/react/commit/a107d398e0574b5f8085485c96b27a168061eb50) Thanks [@copilot-swe-agent](https://github.com/apps/copilot-swe-agent)! - Graduate `primer_react_css_has_selector_perf` feature flag: the CSS `:has()` performance optimization (`body[data-dialog-scroll-disabled]`) is now the default behavior for Dialog scroll disabling
24
+
25
+ - [#7695](https://github.com/primer/react/pull/7695) [`780fc3d`](https://github.com/primer/react/commit/780fc3d7b52fd0f9b63f313af6355398180a0118) Thanks [@mattcosta7](https://github.com/mattcosta7)! - perf(ThemeProvider): Reduce unnecessary renders and effect cascades
26
+
27
+ - Replace `useState` + `useEffect` SSR hydration handoff with `useSyncExternalStore` — eliminates post-hydration re-render
28
+ - Replace `useState` + `useEffect` in `useSystemColorMode` with `useSyncExternalStore` — eliminates effect gap and stale-then-update flicker
29
+ - Cache `getServerHandoff` DOM read + JSON.parse per ID (runs once, not on every call)
30
+ - Memoize context value object to prevent unnecessary re-renders of all consumers
31
+
32
+ - [#7706](https://github.com/primer/react/pull/7706) [`fd8910a`](https://github.com/primer/react/commit/fd8910abff851f43d19805ceaa439a9a18c4f226) Thanks [@liuliu-dev](https://github.com/liuliu-dev)! - ActionList.Item: fix inline descriptions being referenced via `aria-labelledby` instead of `aria-describedby`
33
+
34
+ ## 38.18.0
35
+
36
+ ### Minor Changes
37
+
38
+ - [#7700](https://github.com/primer/react/pull/7700) [`91bf343`](https://github.com/primer/react/commit/91bf343210483be373f7ec5ce1ba652518a9ce4c) Thanks [@francinelucca](https://github.com/francinelucca)! - ActionMenu: Graduate `primer_react_action_menu_display_in_viewport_inside_dialog` feature flag. ActionMenu now automatically uses `displayInViewport` when rendered inside a Dialog, without requiring the feature flag.
39
+
40
+ - [#7699](https://github.com/primer/react/pull/7699) [`1505d9b`](https://github.com/primer/react/commit/1505d9b06bbcbb1d6bf87b4d21461d79b71eff10) Thanks [@francinelucca](https://github.com/francinelucca)! - SelectPanel: Add `displayInViewport` prop
41
+
42
+ - [#7662](https://github.com/primer/react/pull/7662) [`39c8cf3`](https://github.com/primer/react/commit/39c8cf30254268d770422b9d890d96da51d35d89) Thanks [@HiroAgustin](https://github.com/HiroAgustin)! - Timeline: Update `clipSidebar` prop to accept `'start'`, `'end'`, or `'both'` in addition to `boolean`. Use `'start'` to only clip the top, `'end'` to only clip the bottom, or `'both'`/`true` to clip both ends.
43
+
44
+ ### Patch Changes
45
+
46
+ - [#7690](https://github.com/primer/react/pull/7690) [`b492cc8`](https://github.com/primer/react/commit/b492cc82efdb68189a070dfa7fcd88f18cc9d7b4) Thanks [@HiroAgustin](https://github.com/HiroAgustin)! - fix(Button): Apply inline-flex display to loading wrapper for link variant buttons
47
+
48
+ - [#7696](https://github.com/primer/react/pull/7696) [`1acb7d3`](https://github.com/primer/react/commit/1acb7d3dc416094e481ac9b45d3fa45ebd527c86) Thanks [@francinelucca](https://github.com/francinelucca)! - Fix item dividers not visible in SelectPanel and FilteredActionList when `showItemDividers` is enabled, caused by `content-visibility: auto` clipping the absolutely-positioned divider pseudo-elements.
49
+
50
+ - [#7683](https://github.com/primer/react/pull/7683) [`f05fcac`](https://github.com/primer/react/commit/f05fcacedafe8a9a1af9caa6a762403d47851250) Thanks [@liuliu-dev](https://github.com/liuliu-dev)! - Dialog: dynamically switch footer button layout based on available height.
51
+
52
+ - [#7676](https://github.com/primer/react/pull/7676) [`35ca056`](https://github.com/primer/react/commit/35ca05690910ffb8286a2aeef01c043af377a6c2) Thanks [@HiroAgustin](https://github.com/HiroAgustin)! - Remove link underline effect on hover for both Link (inline) and Button with variant link (no visuals)
53
+
54
+ - [#7631](https://github.com/primer/react/pull/7631) [`0ecaf6f`](https://github.com/primer/react/commit/0ecaf6f64c50235081416515b7d5b6b2e364b33f) Thanks [@mattcosta7](https://github.com/mattcosta7)! - Add test to validate that the `muted` prop is not leaked as a bare DOM attribute on `Link`
55
+
56
+ ## 38.17.0
57
+
58
+ ### Minor Changes
59
+
60
+ - [#7658](https://github.com/primer/react/pull/7658) [`259fdff`](https://github.com/primer/react/commit/259fdff67550e328b851129a78e87413ddb07229) Thanks [@hussam-i-am](https://github.com/hussam-i-am)! - fix(polymorphic): Improve prop passthrough for ActionList.LinkItem and Breadcrumbs.Item
61
+
62
+ - [#7672](https://github.com/primer/react/pull/7672) [`77735f9`](https://github.com/primer/react/commit/77735f975c71b267130899fc1fd7b47bcb5f062d) Thanks [@iansan5653](https://github.com/iansan5653)! - - New: Exposes new `useMergedRefs` hook that can merge two refs into a single combined ref
63
+
64
+ - Deprecates `useRefObjectAsForwardedRef`; see doc comment for migration instructions
65
+ - Deprecates `useProvidedRefOrCreate`; see doc comment for migration instructions
66
+
67
+ - [#7623](https://github.com/primer/react/pull/7623) [`42847d1`](https://github.com/primer/react/commit/42847d1bb943c2db6d2309dfd604e8d3ab55d387) Thanks [@copilot-swe-agent](https://github.com/apps/copilot-swe-agent)! - `IconButton`: `keybindingHint` now accepts `string[]` in addition to `string`. Multiple hints are rendered joined with "or".
68
+
69
+ ### Patch Changes
70
+
71
+ - [#7510](https://github.com/primer/react/pull/7510) [`8fa988b`](https://github.com/primer/react/commit/8fa988ba613117874657af722ef6de768b0e0eb8) Thanks [@francinelucca](https://github.com/francinelucca)! - chore: ensure max-height does not surpass viewport height in Overlay, ActionMenu under feature flag
72
+
73
+ - [#7682](https://github.com/primer/react/pull/7682) [`8aed331`](https://github.com/primer/react/commit/8aed331f9dcb8c51d86bf531f7e331a6ccd23d9a) Thanks [@llastflowers](https://github.com/llastflowers)! - Update CheckboxOrRadioGroup.tsx to add `required` announcement
74
+
75
+ ## 38.16.0
76
+
77
+ ### Minor Changes
78
+
79
+ - [#7661](https://github.com/primer/react/pull/7661) [`dceb79c`](https://github.com/primer/react/commit/dceb79c5e0f8ab5c25bbc9727bc3207fb77d520e) Thanks [@TylerJDev](https://github.com/TylerJDev)! - AnchoredOverlay: Add CSS Anchor Positioning to `AnchoredOverlay` (under a feature flag)
80
+
81
+ ## 38.15.1
82
+
83
+ ### Patch Changes
84
+
13
85
  - [#7625](https://github.com/primer/react/pull/7625) [`2e8c707`](https://github.com/primer/react/commit/2e8c70702d5096551049c29c8e79749bf63a919f) Thanks [@liuliu-dev](https://github.com/liuliu-dev)! - Banner: stack inline actions vertically on narrow viewports.
14
86
 
87
+ - [#7554](https://github.com/primer/react/pull/7554) [`f34f0c3`](https://github.com/primer/react/commit/f34f0c37c2bb144e34b029696c580ee8104dbce6) Thanks [@hectahertz](https://github.com/hectahertz)! - perf(ActionList): memoize context values, menuItemProps, and aria attributes
88
+
89
+ - [#7598](https://github.com/primer/react/pull/7598) [`4b345db`](https://github.com/primer/react/commit/4b345db228997b66c381f7d03369f87ee25fdf02) Thanks [@hectahertz](https://github.com/hectahertz)! - perf(Banner): replace `:has(.BannerActions)` with `[data-has-actions]` attribute selector
90
+
91
+ - [#7597](https://github.com/primer/react/pull/7597) [`adadd38`](https://github.com/primer/react/commit/adadd380043c637d431e30643e910e7b4ec7fe03) Thanks [@hectahertz](https://github.com/hectahertz)! - perf(Button): replace `:has(.Visual)` with `[data-no-visuals]` attribute selector in link variant styling
92
+
93
+ - [#7599](https://github.com/primer/react/pull/7599) [`e6513c2`](https://github.com/primer/react/commit/e6513c2a8a5b99e61c9009e0e3c7112a7388a295) Thanks [@hectahertz](https://github.com/hectahertz)! - perf(Dialog): replace `:has(.Footer)` with `[data-has-footer]` attribute selector for footer border detection
94
+
95
+ - [#7620](https://github.com/primer/react/pull/7620) [`ec0b789`](https://github.com/primer/react/commit/ec0b7890b45ca939c24d6236d94a69d9006c3a64) Thanks [@hectahertz](https://github.com/hectahertz)! - Use stable object reference for DialogContext value to prevent unnecessary re-renders
96
+
97
+ - [#7621](https://github.com/primer/react/pull/7621) [`235126a`](https://github.com/primer/react/commit/235126abbd271e0a6e1e95110f40d72c193c6d24) Thanks [@hectahertz](https://github.com/hectahertz)! - Memoize SelectPanel overlayProps, focusTrapSettings, and preventBubbling to reduce allocations on re-renders
98
+
99
+ - [#7600](https://github.com/primer/react/pull/7600) [`0d7cc92`](https://github.com/primer/react/commit/0d7cc92b474185c7efa09871b42c6a97a9326be6) Thanks [@hectahertz](https://github.com/hectahertz)! - perf(TextInput): skip redundant character counter updates
100
+
101
+ - [#7654](https://github.com/primer/react/pull/7654) [`a09a60c`](https://github.com/primer/react/commit/a09a60cb8218adf8fe2ab71e46da76fbf8331bc6) Thanks [@copilot-swe-agent](https://github.com/apps/copilot-swe-agent)! - SelectPanel: use `100dvh` and `env(safe-area-inset-bottom)` in fullscreen-on-narrow mode to prevent content from being obscured by iOS Safari's browser chrome.
102
+
103
+ - [#7545](https://github.com/primer/react/pull/7545) [`17ec46f`](https://github.com/primer/react/commit/17ec46f77524f3ad5e1789102bdf2dbaf47eab49) Thanks [@hectahertz](https://github.com/hectahertz)! - perf(TreeView): defer scrollIntoView to coalesce reflows during rapid navigation
104
+
15
105
  ## 38.15.0
16
106
 
17
107
  ### Minor Changes
@@ -118,7 +118,7 @@ export declare const ActionBarMenu: React.ForwardRefExoticComponent<{
118
118
  description?: string;
119
119
  tooltipDirection?: import("../TooltipV2").TooltipDirection;
120
120
  keyshortcuts?: string;
121
- keybindingHint?: string;
121
+ keybindingHint?: string | string[];
122
122
  } & Omit<import("..").ButtonBaseProps, "aria-label" | "aria-labelledby"> & React.RefAttributes<unknown>>;
123
123
  export declare const VerticalDivider: () => React.JSX.Element;
124
124
  export {};
@@ -8,7 +8,7 @@ import styles from './ActionBar.module.css.js';
8
8
  import { clsx } from 'clsx';
9
9
  import { createDescendantRegistry } from '../utils/descendant-registry.js';
10
10
  import { jsx, jsxs } from 'react/jsx-runtime';
11
- import { useRefObjectAsForwardedRef } from '../hooks/useRefObjectAsForwardedRef.js';
11
+ import { useMergedRefs } from '../hooks/useMergedRefs.js';
12
12
  import { FocusKeys } from '@primer/behaviors';
13
13
  import { ActionMenu } from '../ActionMenu/ActionMenu.js';
14
14
 
@@ -95,7 +95,7 @@ const ActionBar = props => {
95
95
  focusOutBehavior: "wrap",
96
96
  getNextFocusable: (direction, from) => {
97
97
  var _listRef$current$quer, _listRef$current;
98
- const items = Array.from((_listRef$current$quer = (_listRef$current = listRef.current) === null || _listRef$current === void 0 ? void 0 : _listRef$current.querySelectorAll("button, a, input, [tabindex]")) !== null && _listRef$current$quer !== void 0 ? _listRef$current$quer : []).filter(_temp);
98
+ const items = Array.from((_listRef$current$quer = (_listRef$current = listRef.current) === null || _listRef$current === void 0 ? void 0 : _listRef$current.querySelectorAll(":is(button, a, input, [tabindex]):not([data-overflowing]):not(:disabled)")) !== null && _listRef$current$quer !== void 0 ? _listRef$current$quer : []);
99
99
  const fromIndex = from ? items.indexOf(from) : -1;
100
100
  switch (direction) {
101
101
  case "start":
@@ -126,7 +126,7 @@ const ActionBar = props => {
126
126
  useFocusZone(t3);
127
127
  let t4;
128
128
  if ($[1] !== childRegistry) {
129
- t4 = childRegistry && Array.from(childRegistry.entries()).filter(_temp2);
129
+ t4 = childRegistry && Array.from(childRegistry.entries()).filter(_temp);
130
130
  $[1] = childRegistry;
131
131
  $[2] = t4;
132
132
  } else {
@@ -192,7 +192,7 @@ const ActionBar = props => {
192
192
  }
193
193
  let t12;
194
194
  if ($[13] !== overflowItems) {
195
- t12 = overflowItems === null || overflowItems === void 0 ? void 0 : overflowItems.map(_temp4);
195
+ t12 = overflowItems === null || overflowItems === void 0 ? void 0 : overflowItems.map(_temp3);
196
196
  $[13] = overflowItems;
197
197
  $[14] = t12;
198
198
  } else {
@@ -283,7 +283,7 @@ function useActionBarItem(ref, registryProps) {
283
283
  if ($[0] !== isInGroup || $[1] !== ref) {
284
284
  t0 = onChange => {
285
285
  if (isInGroup) {
286
- return _temp5;
286
+ return _temp4;
287
287
  }
288
288
  const observer = new IntersectionObserver(() => onChange(), {
289
289
  threshold: 1
@@ -308,7 +308,7 @@ function useActionBarItem(ref, registryProps) {
308
308
  } else {
309
309
  t1 = $[4];
310
310
  }
311
- const isItemOverflowing = useSyncExternalStore(subscribeIntersectionObserver, t1, _temp6);
311
+ const isItemOverflowing = useSyncExternalStore(subscribeIntersectionObserver, t1, _temp5);
312
312
  const isOverflowing = isGroupOverflowing || isItemOverflowing;
313
313
  ActionBarItemsRegistry.useRegisterDescendant(isOverflowing ? registryProps : null);
314
314
  const t2 = isOverflowing ? "" : undefined;
@@ -326,17 +326,17 @@ function useActionBarItem(ref, registryProps) {
326
326
  }
327
327
  return t3;
328
328
  }
329
- function _temp6() {
329
+ function _temp5() {
330
330
  return false;
331
331
  }
332
- function _temp5() {}
332
+ function _temp4() {}
333
333
  const ActionBarIconButton = /*#__PURE__*/forwardRef(({
334
334
  disabled,
335
335
  onClick,
336
336
  ...props
337
337
  }, forwardedRef) => {
338
338
  const ref = useRef(null);
339
- useRefObjectAsForwardedRef(forwardedRef, ref);
339
+ const mergedRef = useMergedRefs(ref, forwardedRef);
340
340
  const {
341
341
  size
342
342
  } = React.useContext(ActionBarContext);
@@ -359,7 +359,7 @@ const ActionBarIconButton = /*#__PURE__*/forwardRef(({
359
359
  }, [disabled, onClick]);
360
360
  return /*#__PURE__*/jsx(IconButton, {
361
361
  "aria-disabled": disabled,
362
- ref: ref,
362
+ ref: mergedRef,
363
363
  size: size,
364
364
  onClick: clickHandler,
365
365
  ...props,
@@ -514,7 +514,7 @@ const ActionBarMenu = /*#__PURE__*/forwardRef((t0, forwardedRef) => {
514
514
  }
515
515
  let t5;
516
516
  if ($[19] !== items) {
517
- t5 = items.map(_temp7);
517
+ t5 = items.map(_temp6);
518
518
  $[19] = items;
519
519
  $[20] = t5;
520
520
  } else {
@@ -591,16 +591,13 @@ const VerticalDivider = () => {
591
591
  }
592
592
  return t1;
593
593
  };
594
- function _temp(item) {
595
- return !item.hasAttribute("data-overflowing") && !item.hasAttribute("disabled");
596
- }
597
- function _temp2(entry) {
594
+ function _temp(entry) {
598
595
  return entry[1] !== null;
599
596
  }
600
- function _temp3(item_0, index) {
601
- return renderMenuItem(item_0, index);
597
+ function _temp2(item, index) {
598
+ return renderMenuItem(item, index);
602
599
  }
603
- function _temp4(t0) {
600
+ function _temp3(t0) {
604
601
  const [id, menuItem] = t0;
605
602
  if (menuItem.type === "divider") {
606
603
  return /*#__PURE__*/jsx(ActionList.Divider, {}, id);
@@ -641,13 +638,13 @@ function _temp4(t0) {
641
638
  returnFocusRef
642
639
  }),
643
640
  children: /*#__PURE__*/jsx(ActionList, {
644
- children: menuItems.map(_temp3)
641
+ children: menuItems.map(_temp2)
645
642
  })
646
643
  })]
647
644
  }, id);
648
645
  }
649
646
  }
650
- function _temp7(item, index) {
647
+ function _temp6(item, index) {
651
648
  return renderMenuItem(item, index);
652
649
  }
653
650
 
@@ -20,7 +20,7 @@ declare const ActionBar: import("react").FC<import("react").PropsWithChildren<im
20
20
  description?: string;
21
21
  tooltipDirection?: import("../TooltipV2").TooltipDirection;
22
22
  keyshortcuts?: string;
23
- keybindingHint?: string;
23
+ keybindingHint?: string | string[];
24
24
  } & Omit<import("..").ButtonBaseProps, "aria-label" | "aria-labelledby"> & import("react").RefAttributes<unknown>>;
25
25
  };
26
26
  export default ActionBar;
@@ -7,12 +7,12 @@ import { invariant } from '../utils/invariant.js';
7
7
  import { clsx } from 'clsx';
8
8
  import classes from './Heading.module.css.js';
9
9
  import { jsx } from 'react/jsx-runtime';
10
- import { useRefObjectAsForwardedRef } from '../hooks/useRefObjectAsForwardedRef.js';
10
+ import { useMergedRefs } from '../hooks/useMergedRefs.js';
11
11
  import Heading$1 from '../Heading/Heading.js';
12
12
 
13
13
  const Heading = /*#__PURE__*/forwardRef((t0, forwardedRef) => {
14
14
  var _props$id;
15
- const $ = c(20);
15
+ const $ = c(21);
16
16
  let as;
17
17
  let children;
18
18
  let className;
@@ -45,7 +45,7 @@ const Heading = /*#__PURE__*/forwardRef((t0, forwardedRef) => {
45
45
  }
46
46
  const visuallyHidden = t1 === undefined ? false : t1;
47
47
  const innerRef = React.useRef(null);
48
- useRefObjectAsForwardedRef(forwardedRef, innerRef);
48
+ const mergedRef = useMergedRefs(forwardedRef, innerRef);
49
49
  const {
50
50
  headingId,
51
51
  variant: listVariant
@@ -65,11 +65,11 @@ const Heading = /*#__PURE__*/forwardRef((t0, forwardedRef) => {
65
65
  t4 = $[8];
66
66
  }
67
67
  let t5;
68
- if ($[9] !== as || $[10] !== children || $[11] !== listVariant || $[12] !== props || $[13] !== size || $[14] !== t3 || $[15] !== t4) {
68
+ if ($[9] !== as || $[10] !== children || $[11] !== listVariant || $[12] !== mergedRef || $[13] !== props || $[14] !== size || $[15] !== t3 || $[16] !== t4) {
69
69
  t5 = /*#__PURE__*/jsx(Heading$1, {
70
70
  as: as,
71
71
  variant: size,
72
- ref: innerRef,
72
+ ref: mergedRef,
73
73
  id: t3,
74
74
  className: t4,
75
75
  "data-list-variant": listVariant,
@@ -79,25 +79,26 @@ const Heading = /*#__PURE__*/forwardRef((t0, forwardedRef) => {
79
79
  $[9] = as;
80
80
  $[10] = children;
81
81
  $[11] = listVariant;
82
- $[12] = props;
83
- $[13] = size;
84
- $[14] = t3;
85
- $[15] = t4;
86
- $[16] = t5;
82
+ $[12] = mergedRef;
83
+ $[13] = props;
84
+ $[14] = size;
85
+ $[15] = t3;
86
+ $[16] = t4;
87
+ $[17] = t5;
87
88
  } else {
88
- t5 = $[16];
89
+ t5 = $[17];
89
90
  }
90
91
  let t6;
91
- if ($[17] !== t2 || $[18] !== t5) {
92
+ if ($[18] !== t2 || $[19] !== t5) {
92
93
  t6 = /*#__PURE__*/jsx(VisuallyHidden, {
93
94
  isVisible: t2,
94
95
  children: t5
95
96
  });
96
- $[17] = t2;
97
- $[18] = t5;
98
- $[19] = t6;
97
+ $[18] = t2;
98
+ $[19] = t5;
99
+ $[20] = t6;
99
100
  } else {
100
- t6 = $[19];
101
+ t6 = $[20];
101
102
  }
102
103
  return t6;
103
104
  });
@@ -1 +1 @@
1
- {"version":3,"file":"Item.d.ts","sourceRoot":"","sources":["../../src/ActionList/Item.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAiB,MAAM,OAAO,CAAA;AAoBrC,KAAK,sBAAsB,GAAG;IAC5B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CAC3B,CAAA;AAwBD,eAAO,MAAM,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC,sBAAsB,CAEpD,CAAA;AAkTD,QAAA,MAAM,IAAI,IA1Ra,EAAE,SAAS,KAAK,CAAC,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6RjD,CAAA;AAEF,OAAO,EAAC,IAAI,EAAC,CAAA"}
1
+ {"version":3,"file":"Item.d.ts","sourceRoot":"","sources":["../../src/ActionList/Item.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAiB,MAAM,OAAO,CAAA;AAoBrC,KAAK,sBAAsB,GAAG;IAC5B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CAC3B,CAAA;AAwBD,eAAO,MAAM,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC,sBAAsB,CAEpD,CAAA;AAyVD,QAAA,MAAM,IAAI,IApTa,EAAE,SAAS,KAAK,CAAC,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuTjD,CAAA;AAEF,OAAO,EAAC,IAAI,EAAC,CAAA"}