@oneplatformdev/ui 0.0.1-beta.112 → 0.0.1-beta.113
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 +34 -30
- package/package.json +1 -1
package/Dialog/Dialog.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { jsx as o, jsxs as
|
|
1
|
+
import { jsx as o, jsxs as d } from "react/jsx-runtime";
|
|
2
2
|
import * as l from "react";
|
|
3
3
|
import * as e from "@radix-ui/react-dialog";
|
|
4
|
-
import {
|
|
4
|
+
import { XIcon as p } from "lucide-react";
|
|
5
5
|
import { cn as i } from "@oneplatformdev/utils";
|
|
6
|
-
const
|
|
6
|
+
const v = e.Root, C = e.Trigger, g = e.Portal, R = e.Close, c = l.forwardRef(({ className: a, ...t }, s) => /* @__PURE__ */ o(
|
|
7
7
|
e.Overlay,
|
|
8
8
|
{
|
|
9
9
|
ref: s,
|
|
@@ -14,13 +14,13 @@ const h = e.Root, w = e.Trigger, f = e.Portal, v = e.Close, r = l.forwardRef(({
|
|
|
14
14
|
...t
|
|
15
15
|
}
|
|
16
16
|
));
|
|
17
|
-
|
|
18
|
-
const
|
|
19
|
-
/* @__PURE__ */ o(
|
|
20
|
-
/* @__PURE__ */
|
|
17
|
+
c.displayName = e.Overlay.displayName;
|
|
18
|
+
const u = l.forwardRef(({ className: a, children: t, showCloseButton: s = !0, onOpenAutoFocus: r, ...m }, f) => /* @__PURE__ */ d(g, { children: [
|
|
19
|
+
/* @__PURE__ */ o(c, {}),
|
|
20
|
+
/* @__PURE__ */ d(
|
|
21
21
|
e.Content,
|
|
22
22
|
{
|
|
23
|
-
ref:
|
|
23
|
+
ref: f,
|
|
24
24
|
className: i(
|
|
25
25
|
"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg",
|
|
26
26
|
"duration-200 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-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",
|
|
@@ -28,23 +28,27 @@ const p = l.forwardRef(({ className: a, children: t, showCloseButton: s = !0, ..
|
|
|
28
28
|
"bg-[#FCFCFC] border border-[#E8E9EB] rounded-[16px]",
|
|
29
29
|
a
|
|
30
30
|
),
|
|
31
|
-
|
|
31
|
+
onOpenAutoFocus: (n) => (n.preventDefault(), r == null ? void 0 : r(n)),
|
|
32
|
+
...m,
|
|
32
33
|
children: [
|
|
33
34
|
t,
|
|
34
|
-
s && /* @__PURE__ */
|
|
35
|
+
s && /* @__PURE__ */ d(
|
|
35
36
|
e.Close,
|
|
36
37
|
{
|
|
38
|
+
tabIndex: 0,
|
|
39
|
+
"aria-label": "Close",
|
|
37
40
|
className: i(
|
|
38
41
|
"absolute right-4 top-4 rounded-sm ring-offset-background w-10 aspect-square",
|
|
39
42
|
"flex items-center justify-center",
|
|
40
43
|
"data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",
|
|
41
44
|
"opacity-70 hover:opacity-100",
|
|
42
45
|
"focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
|
|
46
|
+
"hover:bg-accent",
|
|
43
47
|
"disabled:pointer-events-none",
|
|
44
48
|
"transition-opacity"
|
|
45
49
|
),
|
|
46
50
|
children: [
|
|
47
|
-
/* @__PURE__ */ o(
|
|
51
|
+
/* @__PURE__ */ o(p, { className: "h-4 w-4" }),
|
|
48
52
|
/* @__PURE__ */ o("span", { className: "sr-only", children: "Close" })
|
|
49
53
|
]
|
|
50
54
|
}
|
|
@@ -53,8 +57,8 @@ const p = l.forwardRef(({ className: a, children: t, showCloseButton: s = !0, ..
|
|
|
53
57
|
}
|
|
54
58
|
)
|
|
55
59
|
] }));
|
|
56
|
-
|
|
57
|
-
const
|
|
60
|
+
u.displayName = e.Content.displayName;
|
|
61
|
+
const x = ({
|
|
58
62
|
className: a,
|
|
59
63
|
...t
|
|
60
64
|
}) => /* @__PURE__ */ o(
|
|
@@ -67,8 +71,8 @@ const g = ({
|
|
|
67
71
|
...t
|
|
68
72
|
}
|
|
69
73
|
);
|
|
70
|
-
|
|
71
|
-
const
|
|
74
|
+
x.displayName = "DialogHeader";
|
|
75
|
+
const y = ({
|
|
72
76
|
className: a,
|
|
73
77
|
...t
|
|
74
78
|
}) => /* @__PURE__ */ o(
|
|
@@ -81,8 +85,8 @@ const u = ({
|
|
|
81
85
|
...t
|
|
82
86
|
}
|
|
83
87
|
);
|
|
84
|
-
|
|
85
|
-
const
|
|
88
|
+
y.displayName = "DialogFooter";
|
|
89
|
+
const N = l.forwardRef(({ className: a, ...t }, s) => /* @__PURE__ */ o(
|
|
86
90
|
e.Title,
|
|
87
91
|
{
|
|
88
92
|
ref: s,
|
|
@@ -93,8 +97,8 @@ const x = l.forwardRef(({ className: a, ...t }, s) => /* @__PURE__ */ o(
|
|
|
93
97
|
...t
|
|
94
98
|
}
|
|
95
99
|
));
|
|
96
|
-
|
|
97
|
-
const
|
|
100
|
+
N.displayName = e.Title.displayName;
|
|
101
|
+
const b = l.forwardRef(({ className: a, ...t }, s) => /* @__PURE__ */ o(
|
|
98
102
|
e.Description,
|
|
99
103
|
{
|
|
100
104
|
ref: s,
|
|
@@ -102,16 +106,16 @@ const y = l.forwardRef(({ className: a, ...t }, s) => /* @__PURE__ */ o(
|
|
|
102
106
|
...t
|
|
103
107
|
}
|
|
104
108
|
));
|
|
105
|
-
|
|
109
|
+
b.displayName = e.Description.displayName;
|
|
106
110
|
export {
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
111
|
+
v as Dialog,
|
|
112
|
+
R as DialogClose,
|
|
113
|
+
u as DialogContent,
|
|
114
|
+
b as DialogDescription,
|
|
115
|
+
y as DialogFooter,
|
|
116
|
+
x as DialogHeader,
|
|
117
|
+
c as DialogOverlay,
|
|
118
|
+
g as DialogPortal,
|
|
119
|
+
N as DialogTitle,
|
|
120
|
+
C as DialogTrigger
|
|
117
121
|
};
|