@oneplatformdev/ui 0.0.1-beta.124 → 0.0.1-beta.126
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 +12 -12
- package/Popover/Popover.mjs +10 -10
- package/package.json +1 -1
package/Dialog/Dialog.mjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsx as o, jsxs as n } from "react/jsx-runtime";
|
|
2
|
-
import * as
|
|
2
|
+
import * as r from "react";
|
|
3
3
|
import { useRef as y, useState as N, useLayoutEffect as D } from "react";
|
|
4
4
|
import * as e from "@radix-ui/react-dialog";
|
|
5
5
|
import { XIcon as h } from "lucide-react";
|
|
6
6
|
import { cn as l } from "@oneplatformdev/utils";
|
|
7
7
|
import { DialogOverlayScope as b } from "./DialogOverlayScope.mjs";
|
|
8
|
-
const S = e.Root, F = e.Trigger, v = e.Portal, q = e.Close,
|
|
8
|
+
const S = e.Root, F = e.Trigger, v = e.Portal, q = e.Close, f = r.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ o(
|
|
9
9
|
e.Overlay,
|
|
10
10
|
{
|
|
11
11
|
ref: s,
|
|
@@ -16,19 +16,19 @@ const S = e.Root, F = e.Trigger, v = e.Portal, q = e.Close, m = i.forwardRef(({
|
|
|
16
16
|
...a
|
|
17
17
|
}
|
|
18
18
|
));
|
|
19
|
-
|
|
20
|
-
const w =
|
|
19
|
+
f.displayName = e.Overlay.displayName;
|
|
20
|
+
const w = r.forwardRef(
|
|
21
21
|
({
|
|
22
22
|
className: t,
|
|
23
23
|
children: a,
|
|
24
24
|
showCloseButton: s = !0,
|
|
25
|
-
onOpenAutoFocus:
|
|
26
|
-
preventAutoFocus:
|
|
25
|
+
onOpenAutoFocus: i,
|
|
26
|
+
preventAutoFocus: m,
|
|
27
27
|
...p
|
|
28
28
|
}, g) => {
|
|
29
29
|
const d = y(null), [u, x] = N(null);
|
|
30
|
-
return D(() => x(d.current), []), /* @__PURE__ */ n(v, { children: [
|
|
31
|
-
/* @__PURE__ */ o(
|
|
30
|
+
return D(() => x(d.current), []), /* @__PURE__ */ n(v, { forceMount: !0, children: [
|
|
31
|
+
/* @__PURE__ */ o(f, {}),
|
|
32
32
|
/* @__PURE__ */ o(b, { value: u, children: /* @__PURE__ */ n(
|
|
33
33
|
e.Content,
|
|
34
34
|
{
|
|
@@ -40,7 +40,7 @@ const w = i.forwardRef(
|
|
|
40
40
|
"bg-[#FCFCFC] border border-[#E8E9EB] rounded-[16px]",
|
|
41
41
|
t
|
|
42
42
|
),
|
|
43
|
-
onOpenAutoFocus: (c) => (
|
|
43
|
+
onOpenAutoFocus: (c) => (m && c.preventDefault(), i == null ? void 0 : i(c)),
|
|
44
44
|
...p,
|
|
45
45
|
children: [
|
|
46
46
|
a,
|
|
@@ -101,7 +101,7 @@ const R = ({
|
|
|
101
101
|
}
|
|
102
102
|
);
|
|
103
103
|
R.displayName = "DialogFooter";
|
|
104
|
-
const E =
|
|
104
|
+
const E = r.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ o(
|
|
105
105
|
e.Title,
|
|
106
106
|
{
|
|
107
107
|
ref: s,
|
|
@@ -113,7 +113,7 @@ const E = i.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ o(
|
|
|
113
113
|
}
|
|
114
114
|
));
|
|
115
115
|
E.displayName = e.Title.displayName;
|
|
116
|
-
const z =
|
|
116
|
+
const z = r.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ o(
|
|
117
117
|
e.Description,
|
|
118
118
|
{
|
|
119
119
|
ref: s,
|
|
@@ -129,7 +129,7 @@ export {
|
|
|
129
129
|
z as DialogDescription,
|
|
130
130
|
R as DialogFooter,
|
|
131
131
|
C as DialogHeader,
|
|
132
|
-
|
|
132
|
+
f as DialogOverlay,
|
|
133
133
|
v as DialogPortal,
|
|
134
134
|
E as DialogTitle,
|
|
135
135
|
F as DialogTrigger
|
package/Popover/Popover.mjs
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import * as m from "react";
|
|
3
3
|
import * as o from "@radix-ui/react-popover";
|
|
4
4
|
import { cn as p } from "@oneplatformdev/utils";
|
|
5
5
|
import "../Dialog/Dialog.mjs";
|
|
6
6
|
import { useDialogOverlayContainer as l } from "../Dialog/DialogOverlayScope.mjs";
|
|
7
|
-
const P = o.Root, h = o.Trigger, b = o.Anchor, c = m.forwardRef(({ className:
|
|
8
|
-
const
|
|
9
|
-
return /* @__PURE__ */
|
|
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
10
|
o.Content,
|
|
11
11
|
{
|
|
12
|
-
ref:
|
|
13
|
-
align:
|
|
14
|
-
sideOffset:
|
|
12
|
+
ref: s,
|
|
13
|
+
align: r,
|
|
14
|
+
sideOffset: n,
|
|
15
15
|
className: p(
|
|
16
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
|
-
|
|
17
|
+
a
|
|
18
18
|
),
|
|
19
19
|
style: {
|
|
20
20
|
pointerEvents: "auto",
|
|
21
|
-
...
|
|
21
|
+
...i
|
|
22
22
|
},
|
|
23
|
-
...
|
|
23
|
+
...d
|
|
24
24
|
}
|
|
25
25
|
) });
|
|
26
26
|
});
|