@primer/react 0.0.0-20260701224029 → 0.0.0-20260701230315

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-20260701224029
3
+ ## 0.0.0-20260701230315
4
4
 
5
5
  ### Minor Changes
6
6
 
@@ -75,11 +75,14 @@ const delayTimeMap = {
75
75
  const isInteractive = (element) => {
76
76
  return interactiveElements.some((selector) => element.matches(selector)) || element.hasAttribute("role") && element.getAttribute("role") === "button";
77
77
  };
78
+ function getChildRef(element) {
79
+ return "ref" in element ? element.ref : void 0;
80
+ }
78
81
  const emptyKeybindingHints = [];
79
82
  const Tooltip = /*#__PURE__*/ React.forwardRef(({ direction = "s", text, type = "description", children, id, className, keybindingHint = emptyKeybindingHints, delay = "short", _privateDisableTooltip = false, ...rest }, forwardedRef) => {
80
83
  const tooltipId = useId$1(id);
81
84
  const child = Children.only(children);
82
- const childRef = child.props.ref;
85
+ const childRef = /*#__PURE__*/ React.isValidElement(child) ? getChildRef(child) : void 0;
83
86
  const triggerRef = useRef(null);
84
87
  const tooltipElRef = React.useRef(null);
85
88
  const assignRef = (ref, node) => {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@primer/react",
3
3
  "type": "module",
4
- "version": "0.0.0-20260701224029",
4
+ "version": "0.0.0-20260701230315",
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",