@oneplatformdev/ui 0.0.1-beta.123 → 0.0.1-beta.125
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/Dialog/Dialog.mjs +2 -2
- package/Popover/Popover.d.ts +1 -1
- package/Popover/Popover.mjs +28 -27
- package/package.json +1 -1
package/Dialog/Dialog.mjs
CHANGED
|
@@ -29,7 +29,6 @@ const w = i.forwardRef(
|
|
|
29
29
|
const d = y(null), [u, x] = N(null);
|
|
30
30
|
return D(() => x(d.current), []), /* @__PURE__ */ n(v, { children: [
|
|
31
31
|
/* @__PURE__ */ o(m, {}),
|
|
32
|
-
/* @__PURE__ */ o("div", { ref: d, className: "fixed inset-0 z-80" }),
|
|
33
32
|
/* @__PURE__ */ o(b, { value: u, children: /* @__PURE__ */ n(
|
|
34
33
|
e.Content,
|
|
35
34
|
{
|
|
@@ -68,7 +67,8 @@ const w = i.forwardRef(
|
|
|
68
67
|
)
|
|
69
68
|
]
|
|
70
69
|
}
|
|
71
|
-
) })
|
|
70
|
+
) }),
|
|
71
|
+
/* @__PURE__ */ o("div", { ref: d, className: "fixed inset-0 z-80" })
|
|
72
72
|
] });
|
|
73
73
|
}
|
|
74
74
|
);
|
package/Popover/Popover.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import * as PopoverPrimitive from '@radix-ui/react-popover';
|
|
3
|
-
declare const Popover:
|
|
3
|
+
declare const Popover: React.FC<PopoverPrimitive.PopoverProps>;
|
|
4
4
|
declare const PopoverTrigger: React.ForwardRefExoticComponent<PopoverPrimitive.PopoverTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
5
5
|
declare const PopoverAnchor: React.ForwardRefExoticComponent<PopoverPrimitive.PopoverAnchorProps & React.RefAttributes<HTMLDivElement>>;
|
|
6
6
|
declare const PopoverContent: React.ForwardRefExoticComponent<Omit<PopoverPrimitive.PopoverContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
package/Popover/Popover.mjs
CHANGED
|
@@ -1,32 +1,33 @@
|
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import * as
|
|
2
|
+
import * as m from "react";
|
|
3
3
|
import * as o from "@radix-ui/react-popover";
|
|
4
|
-
import { cn as
|
|
4
|
+
import { cn as p } from "@oneplatformdev/utils";
|
|
5
5
|
import "../Dialog/Dialog.mjs";
|
|
6
|
-
import { useDialogOverlayContainer as
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
o.
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
) })
|
|
26
|
-
|
|
6
|
+
import { useDialogOverlayContainer as l } from "../Dialog/DialogOverlayScope.mjs";
|
|
7
|
+
const P = o.Root, h = o.Trigger, b = o.Anchor, c = m.forwardRef(({ className: a, align: r = "center", sideOffset: n = 4, style: i, ...d }, s) => {
|
|
8
|
+
const t = l();
|
|
9
|
+
return console.log("container", t), /* @__PURE__ */ e(o.Portal, { container: t ?? void 0, children: /* @__PURE__ */ e(
|
|
10
|
+
o.Content,
|
|
11
|
+
{
|
|
12
|
+
ref: s,
|
|
13
|
+
align: r,
|
|
14
|
+
sideOffset: n,
|
|
15
|
+
className: p(
|
|
16
|
+
"z-90 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
17
|
+
a
|
|
18
|
+
),
|
|
19
|
+
style: {
|
|
20
|
+
pointerEvents: "auto",
|
|
21
|
+
...i
|
|
22
|
+
},
|
|
23
|
+
...d
|
|
24
|
+
}
|
|
25
|
+
) });
|
|
26
|
+
});
|
|
27
|
+
c.displayName = o.Content.displayName;
|
|
27
28
|
export {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
29
|
+
P as Popover,
|
|
30
|
+
b as PopoverAnchor,
|
|
31
|
+
c as PopoverContent,
|
|
32
|
+
h as PopoverTrigger
|
|
32
33
|
};
|