@particle-academy/react-fancy 4.13.0 → 4.13.1
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/dist/index.cjs +5 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +15 -6
- package/dist/index.d.ts +15 -6
- package/dist/index.js +5 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -7884,11 +7884,12 @@ function usePopover() {
|
|
|
7884
7884
|
}
|
|
7885
7885
|
return ctx;
|
|
7886
7886
|
}
|
|
7887
|
-
function PopoverTrigger({ children, className }) {
|
|
7887
|
+
function PopoverTrigger({ children, className, ...rest }) {
|
|
7888
7888
|
const { setOpen, open, anchorRef, hover, onHoverEnter, onHoverLeave } = usePopover();
|
|
7889
7889
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
7890
7890
|
"span",
|
|
7891
7891
|
{
|
|
7892
|
+
...rest,
|
|
7892
7893
|
ref: anchorRef,
|
|
7893
7894
|
"data-react-fancy-popover-trigger": "",
|
|
7894
7895
|
className: cn("inline-flex", className),
|
|
@@ -7902,7 +7903,7 @@ function PopoverTrigger({ children, className }) {
|
|
|
7902
7903
|
);
|
|
7903
7904
|
}
|
|
7904
7905
|
PopoverTrigger.displayName = "PopoverTrigger";
|
|
7905
|
-
function PopoverContent({ children, className }) {
|
|
7906
|
+
function PopoverContent({ children, className, style, ...rest }) {
|
|
7906
7907
|
const { open, setOpen, anchorRef, floatingRef, placement, offset, hover, onHoverEnter, onHoverLeave } = usePopover();
|
|
7907
7908
|
const outsideRef = react.useRef(null);
|
|
7908
7909
|
const position = useFloatingPosition(anchorRef, floatingRef, {
|
|
@@ -7918,6 +7919,7 @@ function PopoverContent({ children, className }) {
|
|
|
7918
7919
|
return /* @__PURE__ */ jsxRuntime.jsx(Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
7919
7920
|
"div",
|
|
7920
7921
|
{
|
|
7922
|
+
...rest,
|
|
7921
7923
|
ref: (node) => {
|
|
7922
7924
|
outsideRef.current = node;
|
|
7923
7925
|
floatingRef.current = node;
|
|
@@ -7928,7 +7930,7 @@ function PopoverContent({ children, className }) {
|
|
|
7928
7930
|
positioned ? "fancy-scale-in" : "invisible",
|
|
7929
7931
|
className
|
|
7930
7932
|
),
|
|
7931
|
-
style: { left: position.x, top: position.y },
|
|
7933
|
+
style: { ...style, left: position.x, top: position.y },
|
|
7932
7934
|
onMouseEnter: hover ? onHoverEnter : void 0,
|
|
7933
7935
|
onMouseLeave: hover ? onHoverLeave : void 0,
|
|
7934
7936
|
children
|