@choice-ui/react 1.4.8 → 1.4.9
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.
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Kbd } from "../../kbd/dist/index.js";
|
|
2
2
|
import { useMergeRefs, useDelayGroup, useTransitionStyles, FloatingPortal, offset, flip, shift, arrow, useFloating, autoUpdate, useHover, useFocus, useDismiss, useRole, useInteractions } from "@floating-ui/react";
|
|
3
3
|
import { FloatingDelayGroup } from "@floating-ui/react";
|
|
4
|
-
import { forwardRef, createContext, useMemo, useState, useRef, useContext } from "react";
|
|
4
|
+
import React, { forwardRef, createContext, useMemo, useState, useRef, useContext } from "react";
|
|
5
5
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
6
6
|
import { Slot } from "../../slot/dist/index.js";
|
|
7
7
|
import { tcv, tcx } from "../../../shared/utils/tcx/tcx.js";
|
|
@@ -183,7 +183,7 @@ var TooltipContent = forwardRef(
|
|
|
183
183
|
var TooltipTrigger = forwardRef(
|
|
184
184
|
function TooltipTrigger2({ children, ...props }, propRef) {
|
|
185
185
|
const state = useTooltipState();
|
|
186
|
-
const childrenRef = children
|
|
186
|
+
const childrenRef = React.isValidElement(children) ? children.props.ref : void 0;
|
|
187
187
|
const ref = useMergeRefs([state.refs.setReference, propRef, childrenRef]);
|
|
188
188
|
return /* @__PURE__ */ jsx(
|
|
189
189
|
Slot,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const TooltipTrigger:
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export declare const TooltipTrigger: React.ForwardRefExoticComponent<Omit<React.HTMLProps<HTMLElement>, "ref"> & React.RefAttributes<HTMLElement>>;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { Slot } from "../../../slot/dist/index.js";
|
|
3
3
|
import { useMergeRefs } from "@floating-ui/react";
|
|
4
|
-
import { forwardRef } from "react";
|
|
4
|
+
import React, { forwardRef } from "react";
|
|
5
5
|
import { useTooltipState } from "../context/tooltip-context.js";
|
|
6
6
|
const TooltipTrigger = forwardRef(
|
|
7
7
|
function TooltipTrigger2({ children, ...props }, propRef) {
|
|
8
8
|
const state = useTooltipState();
|
|
9
|
-
const childrenRef = children
|
|
9
|
+
const childrenRef = React.isValidElement(children) ? children.props.ref : void 0;
|
|
10
10
|
const ref = useMergeRefs([state.refs.setReference, propRef, childrenRef]);
|
|
11
11
|
return /* @__PURE__ */ jsx(
|
|
12
12
|
Slot,
|
package/package.json
CHANGED