@primer/react 0.0.0-20260223174400 → 0.0.0-20260223175050

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-20260223174400
3
+ ## 0.0.0-20260223175050
4
4
 
5
5
  ### Minor Changes
6
6
 
@@ -179,13 +179,13 @@ function getPreviousVisibleElement(element) {
179
179
  * is also an expanded directory, we drill all the way down.
180
180
  */
181
181
  function getDeepestLastDescendant(element) {
182
- if (element.getAttribute('aria-expanded') === 'true') {
183
- const lastChild = getLastChildTreeItem(element);
184
- if (lastChild) {
185
- return getDeepestLastDescendant(lastChild);
186
- }
182
+ let current = element;
183
+ while (current.getAttribute('aria-expanded') === 'true') {
184
+ const lastChild = getLastChildTreeItem(current);
185
+ if (!lastChild) break;
186
+ current = lastChild;
187
187
  }
188
- return element;
188
+ return current;
189
189
  }
190
190
  function getNextSiblingTreeItem(element) {
191
191
  let sibling = element.nextElementSibling;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@primer/react",
3
3
  "type": "module",
4
- "version": "0.0.0-20260223174400",
4
+ "version": "0.0.0-20260223175050",
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",