@oneplatformdev/ui 0.0.1-beta.129 → 0.0.1-beta.130
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 +5 -5
- package/Popover/Popover.d.ts +1 -1
- package/Popover/Popover.mjs +8 -7
- package/package.json +1 -1
package/Dialog/Dialog.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as o, jsxs as c } from "react/jsx-runtime";
|
|
2
|
-
import i, { useRef as
|
|
2
|
+
import i, { useRef as D, useMemo as h, useState as v, useEffect as b } from "react";
|
|
3
3
|
import * as e from "@radix-ui/react-dialog";
|
|
4
4
|
import { XIcon as C } from "lucide-react";
|
|
5
5
|
import { cn as n, composeRefs as w } from "@oneplatformdev/utils";
|
|
@@ -25,7 +25,7 @@ const z = i.forwardRef(
|
|
|
25
25
|
preventAutoFocus: u,
|
|
26
26
|
...y
|
|
27
27
|
}, m) => {
|
|
28
|
-
const f =
|
|
28
|
+
const f = D(null), x = h(
|
|
29
29
|
() => w(m, f),
|
|
30
30
|
[m]
|
|
31
31
|
), [N, p] = v(null);
|
|
@@ -38,7 +38,7 @@ const z = i.forwardRef(
|
|
|
38
38
|
};
|
|
39
39
|
}, []), /* @__PURE__ */ c(R, { children: [
|
|
40
40
|
/* @__PURE__ */ o(g, {}),
|
|
41
|
-
/* @__PURE__ */
|
|
41
|
+
/* @__PURE__ */ c(
|
|
42
42
|
e.Content,
|
|
43
43
|
{
|
|
44
44
|
ref: x,
|
|
@@ -52,7 +52,7 @@ const z = i.forwardRef(
|
|
|
52
52
|
onOpenAutoFocus: (r) => (u && r.preventDefault(), d == null ? void 0 : d(r)),
|
|
53
53
|
...y,
|
|
54
54
|
children: [
|
|
55
|
-
a,
|
|
55
|
+
/* @__PURE__ */ o(E, { value: N, children: a }),
|
|
56
56
|
s && /* @__PURE__ */ c(
|
|
57
57
|
e.Close,
|
|
58
58
|
{
|
|
@@ -76,7 +76,7 @@ const z = i.forwardRef(
|
|
|
76
76
|
)
|
|
77
77
|
]
|
|
78
78
|
}
|
|
79
|
-
)
|
|
79
|
+
)
|
|
80
80
|
] });
|
|
81
81
|
}
|
|
82
82
|
);
|
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
|
@@ -3,21 +3,22 @@ import * as m from "react";
|
|
|
3
3
|
import * as o from "@radix-ui/react-popover";
|
|
4
4
|
import { cn as l } from "@oneplatformdev/utils";
|
|
5
5
|
import { useDialogOverlayContainer as c } from "../Dialog/DialogOverlayScope.mjs";
|
|
6
|
-
const P =
|
|
7
|
-
const
|
|
8
|
-
return console.log("container",
|
|
6
|
+
const P = o.Root, h = o.Trigger, b = o.Anchor, f = m.forwardRef(({ className: r, align: n = "center", sideOffset: i = 4, style: s, ...d }, p) => {
|
|
7
|
+
const t = c(), e = t ? { container: t } : {};
|
|
8
|
+
return console.log("container", t), console.log("portalProps", e), /* @__PURE__ */ a(o.Portal, { ...e, children: /* @__PURE__ */ a(
|
|
9
9
|
o.Content,
|
|
10
10
|
{
|
|
11
11
|
ref: p,
|
|
12
12
|
align: n,
|
|
13
|
-
sideOffset:
|
|
13
|
+
sideOffset: i,
|
|
14
14
|
className: l(
|
|
15
|
-
"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",
|
|
16
|
-
|
|
15
|
+
// "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",
|
|
16
|
+
"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
|
+
r
|
|
17
18
|
),
|
|
18
19
|
style: {
|
|
19
20
|
pointerEvents: "auto",
|
|
20
|
-
...
|
|
21
|
+
...s
|
|
21
22
|
},
|
|
22
23
|
...d
|
|
23
24
|
}
|