@la-batcave/ui 3.5.0 → 4.0.0
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/Alert.d.ts +17 -7
- package/dist/Alert.js +31 -28
- package/dist/Button.js +27 -24
- package/dist/Card.d.ts +2 -6
- package/dist/Card.js +35 -58
- package/dist/CodeBlock.js +2 -2
- package/dist/Collapse.js +8 -8
- package/dist/Combobox.js +51 -51
- package/dist/DarkMode.js +11 -11
- package/dist/DatePicker.d.ts +5 -17
- package/dist/DatePicker.js +221 -205
- package/dist/Dialog.js +65 -65
- package/dist/Drawer.js +1 -1
- package/dist/Dropdown.js +10 -10
- package/dist/HoverCard.js +13 -13
- package/dist/Input.js +633 -626
- package/dist/LogViewer.js +1 -1
- package/dist/Menubar.js +25 -25
- package/dist/Pagination.js +17 -17
- package/dist/Popover.js +4 -4
- package/dist/Resizable.js +1 -1
- package/dist/Sheet.d.ts +1 -1
- package/dist/Sheet.js +21 -21
- package/dist/Sidebar.d.ts +39 -1
- package/dist/Sidebar.js +101 -63
- package/dist/Skeleton.js +9 -9
- package/dist/Table.js +31 -31
- package/dist/Tabs.d.ts +15 -11
- package/dist/Tabs.js +134 -125
- package/dist/Toast.js +35 -34
- package/dist/Tooltip.js +1 -1
- package/dist/Typography.js +9 -9
- package/dist/Widget.js +77 -81
- package/dist/index.css +1 -1
- package/package.json +3 -2
package/dist/Dialog.js
CHANGED
|
@@ -6,12 +6,12 @@ import { X as J } from "lucide-react";
|
|
|
6
6
|
import { c as h } from "./_shared/utils-eGXXUFl7.js";
|
|
7
7
|
import { Button as M } from "./Button.js";
|
|
8
8
|
import { EasyForm as Q } from "./EasyForm.js";
|
|
9
|
-
const P = X,
|
|
9
|
+
const P = X, oe = G, ae = z, U = V, I = d.forwardRef(({ className: n, ...e }, r) => /* @__PURE__ */ t(
|
|
10
10
|
K,
|
|
11
11
|
{
|
|
12
|
-
ref:
|
|
12
|
+
ref: r,
|
|
13
13
|
className: h(
|
|
14
|
-
"fixed inset-0 z-50 bg-black/
|
|
14
|
+
"fixed inset-0 z-50 bg-black/30 backdrop-blur-sm",
|
|
15
15
|
"data-[state=open]:animate-in data-[state=open]:fade-in-0",
|
|
16
16
|
"data-[state=closed]:animate-out data-[state=closed]:fade-out-0",
|
|
17
17
|
n
|
|
@@ -20,7 +20,7 @@ const P = X, re = G, ae = z, U = V, I = d.forwardRef(({ className: n, ...e }, o)
|
|
|
20
20
|
}
|
|
21
21
|
));
|
|
22
22
|
I.displayName = "DialogOverlay";
|
|
23
|
-
const N = d.forwardRef(({ className: n, children: e, hideClose:
|
|
23
|
+
const N = d.forwardRef(({ className: n, children: e, hideClose: r, ...i }, a) => /* @__PURE__ */ f(U, { children: [
|
|
24
24
|
/* @__PURE__ */ t(I, {}),
|
|
25
25
|
/* @__PURE__ */ t("div", { className: "fixed inset-x-0 top-0 z-50 h-[100dvh] flex items-center justify-center overflow-y-auto p-4 pointer-events-none", children: /* @__PURE__ */ f(
|
|
26
26
|
q,
|
|
@@ -29,7 +29,7 @@ const N = d.forwardRef(({ className: n, children: e, hideClose: o, ...i }, a) =>
|
|
|
29
29
|
className: h(
|
|
30
30
|
"relative pointer-events-auto my-auto",
|
|
31
31
|
"w-[90%] max-w-[480px] max-h-[85dvh]",
|
|
32
|
-
"blurred-bg bg-card/90 backdrop-blur-lg border border-border rounded-
|
|
32
|
+
"blurred-bg bg-card/90 backdrop-blur-lg border border-border rounded-4xl shadow-xl ring-1 ring-foreground/5 dark:ring-foreground/10",
|
|
33
33
|
"data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",
|
|
34
34
|
"data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95",
|
|
35
35
|
"focus:outline-none",
|
|
@@ -39,7 +39,7 @@ const N = d.forwardRef(({ className: n, children: e, hideClose: o, ...i }, a) =>
|
|
|
39
39
|
...i,
|
|
40
40
|
children: [
|
|
41
41
|
e,
|
|
42
|
-
!
|
|
42
|
+
!r && /* @__PURE__ */ t(z, { className: "absolute right-4 top-4 w-7 h-7 rounded-xl flex items-center justify-center text-muted-foreground hover:text-foreground hover:bg-secondary transition-colors cursor-pointer outline-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/30", children: /* @__PURE__ */ t(J, { size: 18 }) })
|
|
43
43
|
]
|
|
44
44
|
}
|
|
45
45
|
) })
|
|
@@ -54,7 +54,7 @@ function E({ className: n, ...e }) {
|
|
|
54
54
|
}
|
|
55
55
|
);
|
|
56
56
|
}
|
|
57
|
-
function
|
|
57
|
+
function k({ className: n, ...e }) {
|
|
58
58
|
return /* @__PURE__ */ t(
|
|
59
59
|
"div",
|
|
60
60
|
{
|
|
@@ -66,25 +66,25 @@ function S({ className: n, ...e }) {
|
|
|
66
66
|
}
|
|
67
67
|
);
|
|
68
68
|
}
|
|
69
|
-
const O = d.forwardRef(({ className: n, ...e },
|
|
69
|
+
const O = d.forwardRef(({ className: n, ...e }, r) => /* @__PURE__ */ t(
|
|
70
70
|
H,
|
|
71
71
|
{
|
|
72
|
-
ref:
|
|
72
|
+
ref: r,
|
|
73
73
|
className: h("text-base font-semibold text-foreground", n),
|
|
74
74
|
...e
|
|
75
75
|
}
|
|
76
76
|
));
|
|
77
77
|
O.displayName = "DialogTitle";
|
|
78
|
-
const R = d.forwardRef(({ className: n, ...e },
|
|
78
|
+
const R = d.forwardRef(({ className: n, ...e }, r) => /* @__PURE__ */ t(
|
|
79
79
|
L,
|
|
80
80
|
{
|
|
81
|
-
ref:
|
|
81
|
+
ref: r,
|
|
82
82
|
className: h("text-sm text-muted-foreground", n),
|
|
83
83
|
...e
|
|
84
84
|
}
|
|
85
85
|
));
|
|
86
86
|
R.displayName = "DialogDescription";
|
|
87
|
-
function
|
|
87
|
+
function S({ className: n, ...e }) {
|
|
88
88
|
return /* @__PURE__ */ t(
|
|
89
89
|
"div",
|
|
90
90
|
{
|
|
@@ -93,21 +93,21 @@ function j({ className: n, ...e }) {
|
|
|
93
93
|
}
|
|
94
94
|
);
|
|
95
95
|
}
|
|
96
|
-
function v(n, e,
|
|
96
|
+
function v(n, e, r, i, a) {
|
|
97
97
|
return d.isValidElement(n) ? d.cloneElement(n, {
|
|
98
|
-
onClick:
|
|
98
|
+
onClick: r,
|
|
99
99
|
loading: i,
|
|
100
100
|
disabled: a
|
|
101
|
-
}) : /* @__PURE__ */ t(M, { variant: e, onClick:
|
|
101
|
+
}) : /* @__PURE__ */ t(M, { variant: e, onClick: r, loading: i, disabled: a, children: n });
|
|
102
102
|
}
|
|
103
103
|
function A(n) {
|
|
104
104
|
return new Promise((e) => {
|
|
105
|
-
const
|
|
106
|
-
document.body.appendChild(
|
|
107
|
-
const a = i(
|
|
105
|
+
const r = document.createElement("div");
|
|
106
|
+
document.body.appendChild(r), import("react-dom/client").then(({ createRoot: i }) => {
|
|
107
|
+
const a = i(r);
|
|
108
108
|
a.render(
|
|
109
109
|
n((c) => {
|
|
110
|
-
a.unmount(),
|
|
110
|
+
a.unmount(), r.remove(), e(c);
|
|
111
111
|
})
|
|
112
112
|
);
|
|
113
113
|
});
|
|
@@ -116,7 +116,7 @@ function A(n) {
|
|
|
116
116
|
function W({
|
|
117
117
|
title: n,
|
|
118
118
|
description: e,
|
|
119
|
-
message:
|
|
119
|
+
message: r,
|
|
120
120
|
button: i = "OK",
|
|
121
121
|
onDone: a
|
|
122
122
|
}) {
|
|
@@ -130,8 +130,8 @@ function W({
|
|
|
130
130
|
/* @__PURE__ */ t(O, { children: n }),
|
|
131
131
|
e && /* @__PURE__ */ t(R, { children: e })
|
|
132
132
|
] }),
|
|
133
|
-
|
|
134
|
-
/* @__PURE__ */ t(
|
|
133
|
+
r && /* @__PURE__ */ t(S, { children: r }),
|
|
134
|
+
/* @__PURE__ */ t(k, { children: v(i, "primary", u, !1, !1) })
|
|
135
135
|
] }) });
|
|
136
136
|
}
|
|
137
137
|
function ie(n) {
|
|
@@ -140,7 +140,7 @@ function ie(n) {
|
|
|
140
140
|
function Y({
|
|
141
141
|
title: n,
|
|
142
142
|
description: e,
|
|
143
|
-
message:
|
|
143
|
+
message: r,
|
|
144
144
|
confirmButton: i = "Confirmer",
|
|
145
145
|
cancelButton: a = "Annuler",
|
|
146
146
|
closable: c = !0,
|
|
@@ -148,27 +148,27 @@ function Y({
|
|
|
148
148
|
onCancel: u,
|
|
149
149
|
onDone: D
|
|
150
150
|
}) {
|
|
151
|
-
const [b, T] = d.useState(!0), [p,
|
|
152
|
-
T(!1), setTimeout(() => D(
|
|
153
|
-
},
|
|
151
|
+
const [b, T] = d.useState(!0), [p, x] = d.useState(null), s = p !== null, m = (o) => {
|
|
152
|
+
T(!1), setTimeout(() => D(o), 200);
|
|
153
|
+
}, y = async () => {
|
|
154
154
|
if (!s)
|
|
155
155
|
if (g) {
|
|
156
|
-
|
|
156
|
+
x("confirm");
|
|
157
157
|
try {
|
|
158
158
|
await g(), m(!0);
|
|
159
159
|
} catch {
|
|
160
|
-
|
|
160
|
+
x(null);
|
|
161
161
|
}
|
|
162
162
|
} else
|
|
163
163
|
m(!0);
|
|
164
164
|
}, C = async () => {
|
|
165
165
|
if (!s)
|
|
166
166
|
if (u) {
|
|
167
|
-
|
|
167
|
+
x("cancel");
|
|
168
168
|
try {
|
|
169
169
|
await u(), m(!1);
|
|
170
170
|
} catch {
|
|
171
|
-
|
|
171
|
+
x(null);
|
|
172
172
|
}
|
|
173
173
|
} else
|
|
174
174
|
m(!1);
|
|
@@ -177,31 +177,31 @@ function Y({
|
|
|
177
177
|
P,
|
|
178
178
|
{
|
|
179
179
|
open: b,
|
|
180
|
-
onOpenChange: (
|
|
181
|
-
!
|
|
180
|
+
onOpenChange: (o) => {
|
|
181
|
+
!o && !s && c && C();
|
|
182
182
|
},
|
|
183
183
|
children: /* @__PURE__ */ f(
|
|
184
184
|
N,
|
|
185
185
|
{
|
|
186
186
|
hideClose: !c || s,
|
|
187
|
-
onEscapeKeyDown: (
|
|
188
|
-
(!c || s) &&
|
|
187
|
+
onEscapeKeyDown: (o) => {
|
|
188
|
+
(!c || s) && o.preventDefault();
|
|
189
189
|
},
|
|
190
|
-
onPointerDownOutside: (
|
|
191
|
-
(!c || s) &&
|
|
190
|
+
onPointerDownOutside: (o) => {
|
|
191
|
+
(!c || s) && o.preventDefault();
|
|
192
192
|
},
|
|
193
|
-
onInteractOutside: (
|
|
194
|
-
(!c || s) &&
|
|
193
|
+
onInteractOutside: (o) => {
|
|
194
|
+
(!c || s) && o.preventDefault();
|
|
195
195
|
},
|
|
196
196
|
children: [
|
|
197
197
|
/* @__PURE__ */ f(E, { children: [
|
|
198
198
|
/* @__PURE__ */ t(O, { children: n }),
|
|
199
199
|
e && /* @__PURE__ */ t(R, { children: e })
|
|
200
200
|
] }),
|
|
201
|
-
|
|
202
|
-
/* @__PURE__ */ f(
|
|
201
|
+
r && /* @__PURE__ */ t(S, { children: r }),
|
|
202
|
+
/* @__PURE__ */ f(k, { children: [
|
|
203
203
|
v(a, "secondary", C, p === "cancel", p === "confirm"),
|
|
204
|
-
v(i, "primary",
|
|
204
|
+
v(i, "primary", y, p === "confirm", p === "cancel")
|
|
205
205
|
] })
|
|
206
206
|
]
|
|
207
207
|
}
|
|
@@ -215,7 +215,7 @@ function le(n) {
|
|
|
215
215
|
function Z({
|
|
216
216
|
title: n,
|
|
217
217
|
description: e,
|
|
218
|
-
message:
|
|
218
|
+
message: r,
|
|
219
219
|
fields: i,
|
|
220
220
|
defaultValues: a,
|
|
221
221
|
confirmButton: c = "Confirmer",
|
|
@@ -225,10 +225,10 @@ function Z({
|
|
|
225
225
|
onCancel: b,
|
|
226
226
|
onDone: T
|
|
227
227
|
}) {
|
|
228
|
-
const [p,
|
|
229
|
-
|
|
228
|
+
const [p, x] = d.useState(!0), [s, m] = d.useState(null), y = d.useRef(null), C = d.useRef(null), o = s !== null, w = (l) => {
|
|
229
|
+
x(!1), setTimeout(() => T(l), 200);
|
|
230
230
|
}, B = async (l) => {
|
|
231
|
-
if (!
|
|
231
|
+
if (!o)
|
|
232
232
|
if (C.current = l, D) {
|
|
233
233
|
m("confirm");
|
|
234
234
|
try {
|
|
@@ -239,9 +239,9 @@ function Z({
|
|
|
239
239
|
} else
|
|
240
240
|
w(l);
|
|
241
241
|
}, F = () => {
|
|
242
|
-
|
|
243
|
-
},
|
|
244
|
-
if (!
|
|
242
|
+
o || y.current && y.current.requestSubmit();
|
|
243
|
+
}, j = async () => {
|
|
244
|
+
if (!o)
|
|
245
245
|
if (b) {
|
|
246
246
|
m("cancel");
|
|
247
247
|
try {
|
|
@@ -257,20 +257,20 @@ function Z({
|
|
|
257
257
|
{
|
|
258
258
|
open: p,
|
|
259
259
|
onOpenChange: (l) => {
|
|
260
|
-
!l && !
|
|
260
|
+
!l && !o && u && j();
|
|
261
261
|
},
|
|
262
262
|
children: /* @__PURE__ */ f(
|
|
263
263
|
N,
|
|
264
264
|
{
|
|
265
|
-
hideClose: !u ||
|
|
265
|
+
hideClose: !u || o,
|
|
266
266
|
onEscapeKeyDown: (l) => {
|
|
267
|
-
(!u ||
|
|
267
|
+
(!u || o) && l.preventDefault();
|
|
268
268
|
},
|
|
269
269
|
onPointerDownOutside: (l) => {
|
|
270
|
-
(!u ||
|
|
270
|
+
(!u || o) && l.preventDefault();
|
|
271
271
|
},
|
|
272
272
|
onInteractOutside: (l) => {
|
|
273
|
-
(!u ||
|
|
273
|
+
(!u || o) && l.preventDefault();
|
|
274
274
|
},
|
|
275
275
|
className: "max-h-[85dvh] flex flex-col",
|
|
276
276
|
children: [
|
|
@@ -278,20 +278,20 @@ function Z({
|
|
|
278
278
|
/* @__PURE__ */ t(O, { children: n }),
|
|
279
279
|
e && /* @__PURE__ */ t(R, { children: e })
|
|
280
280
|
] }),
|
|
281
|
-
/* @__PURE__ */ f(
|
|
282
|
-
|
|
281
|
+
/* @__PURE__ */ f(S, { className: "overflow-y-auto flex flex-col gap-4", children: [
|
|
282
|
+
r && /* @__PURE__ */ t("div", { children: r }),
|
|
283
283
|
/* @__PURE__ */ t(
|
|
284
284
|
Q,
|
|
285
285
|
{
|
|
286
|
-
ref:
|
|
286
|
+
ref: y,
|
|
287
287
|
fields: i,
|
|
288
288
|
defaultValues: a,
|
|
289
289
|
onSubmit: B
|
|
290
290
|
}
|
|
291
291
|
)
|
|
292
292
|
] }),
|
|
293
|
-
/* @__PURE__ */ f(
|
|
294
|
-
v(g, "secondary",
|
|
293
|
+
/* @__PURE__ */ f(k, { children: [
|
|
294
|
+
v(g, "secondary", j, s === "cancel", s === "confirm"),
|
|
295
295
|
v(c, "primary", F, s === "confirm", s === "cancel")
|
|
296
296
|
] })
|
|
297
297
|
]
|
|
@@ -302,16 +302,16 @@ function Z({
|
|
|
302
302
|
}
|
|
303
303
|
function ce(n) {
|
|
304
304
|
return new Promise((e) => {
|
|
305
|
-
const
|
|
306
|
-
document.body.appendChild(
|
|
307
|
-
const a = i(
|
|
305
|
+
const r = document.createElement("div");
|
|
306
|
+
document.body.appendChild(r), import("react-dom/client").then(({ createRoot: i }) => {
|
|
307
|
+
const a = i(r);
|
|
308
308
|
a.render(
|
|
309
309
|
/* @__PURE__ */ t(
|
|
310
310
|
Z,
|
|
311
311
|
{
|
|
312
312
|
...n,
|
|
313
313
|
onDone: (c) => {
|
|
314
|
-
a.unmount(),
|
|
314
|
+
a.unmount(), r.remove(), e(c);
|
|
315
315
|
}
|
|
316
316
|
}
|
|
317
317
|
)
|
|
@@ -321,16 +321,16 @@ function ce(n) {
|
|
|
321
321
|
}
|
|
322
322
|
export {
|
|
323
323
|
P as Dialog,
|
|
324
|
-
|
|
324
|
+
S as DialogBody,
|
|
325
325
|
ae as DialogClose,
|
|
326
326
|
N as DialogContent,
|
|
327
327
|
R as DialogDescription,
|
|
328
|
-
|
|
328
|
+
k as DialogFooter,
|
|
329
329
|
E as DialogHeader,
|
|
330
330
|
I as DialogOverlay,
|
|
331
331
|
U as DialogPortal,
|
|
332
332
|
O as DialogTitle,
|
|
333
|
-
|
|
333
|
+
oe as DialogTrigger,
|
|
334
334
|
ie as alertDialog,
|
|
335
335
|
le as confirmDialog,
|
|
336
336
|
ce as promptDialog
|
package/dist/Drawer.js
CHANGED
|
@@ -1049,7 +1049,7 @@ const pn = Q.Trigger, wn = Q.Close, on = Q.Portal, ae = mt.forwardRef(({ classNa
|
|
|
1049
1049
|
Q.Overlay,
|
|
1050
1050
|
{
|
|
1051
1051
|
ref: e,
|
|
1052
|
-
className: ot("fixed inset-0 z-50 bg-black/
|
|
1052
|
+
className: ot("fixed inset-0 z-50 bg-black/30", t),
|
|
1053
1053
|
...n
|
|
1054
1054
|
}
|
|
1055
1055
|
));
|
package/dist/Dropdown.js
CHANGED
|
@@ -68,14 +68,14 @@ var h = "DropdownMenuTrigger", R = d.forwardRef(
|
|
|
68
68
|
}
|
|
69
69
|
);
|
|
70
70
|
R.displayName = h;
|
|
71
|
-
var Z = "DropdownMenuPortal",
|
|
71
|
+
var Z = "DropdownMenuPortal", x = (e) => {
|
|
72
72
|
const { __scopeDropdownMenu: r, ...o } = e, n = s(r);
|
|
73
73
|
return /* @__PURE__ */ t(k, { ...n, ...o });
|
|
74
74
|
};
|
|
75
|
-
|
|
76
|
-
var
|
|
75
|
+
x.displayName = Z;
|
|
76
|
+
var N = "DropdownMenuContent", I = d.forwardRef(
|
|
77
77
|
(e, r) => {
|
|
78
|
-
const { __scopeDropdownMenu: o, ...n } = e, a = _(
|
|
78
|
+
const { __scopeDropdownMenu: o, ...n } = e, a = _(N, o), u = s(o), i = d.useRef(!1);
|
|
79
79
|
return /* @__PURE__ */ t(
|
|
80
80
|
L,
|
|
81
81
|
{
|
|
@@ -103,7 +103,7 @@ var x = "DropdownMenuContent", I = d.forwardRef(
|
|
|
103
103
|
);
|
|
104
104
|
}
|
|
105
105
|
);
|
|
106
|
-
I.displayName =
|
|
106
|
+
I.displayName = N;
|
|
107
107
|
var ee = "DropdownMenuGroup", y = d.forwardRef(
|
|
108
108
|
(e, r) => {
|
|
109
109
|
const { __scopeDropdownMenu: o, ...n } = e, a = s(o);
|
|
@@ -182,14 +182,14 @@ var Me = "DropdownMenuSubContent", ge = d.forwardRef((e, r) => {
|
|
|
182
182
|
);
|
|
183
183
|
});
|
|
184
184
|
ge.displayName = Me;
|
|
185
|
-
var De = b, ve = R, _e =
|
|
185
|
+
var De = b, ve = R, _e = x, be = I, he = y, Re = S, xe = C, Ne = A;
|
|
186
186
|
const Le = De, $e = ve, Ke = he, Ie = d.forwardRef(({ className: e, sideOffset: r = 4, container: o, ...n }, a) => /* @__PURE__ */ t(_e, { container: o, children: /* @__PURE__ */ t(
|
|
187
187
|
be,
|
|
188
188
|
{
|
|
189
189
|
ref: a,
|
|
190
190
|
sideOffset: r,
|
|
191
191
|
className: f(
|
|
192
|
-
"z-50 bg-card border border-border rounded-
|
|
192
|
+
"z-50 bg-card border border-border rounded-3xl shadow-lg p-1 min-w-[180px]",
|
|
193
193
|
"data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",
|
|
194
194
|
"data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95",
|
|
195
195
|
"outline-none",
|
|
@@ -200,11 +200,11 @@ const Le = De, $e = ve, Ke = he, Ie = d.forwardRef(({ className: e, sideOffset:
|
|
|
200
200
|
) }));
|
|
201
201
|
Ie.displayName = "DropdownMenuContent";
|
|
202
202
|
const ye = d.forwardRef(({ className: e, inset: r, ...o }, n) => /* @__PURE__ */ t(
|
|
203
|
-
|
|
203
|
+
xe,
|
|
204
204
|
{
|
|
205
205
|
ref: n,
|
|
206
206
|
className: f(
|
|
207
|
-
"flex items-center gap-2 px-3 py-2 text-sm rounded-
|
|
207
|
+
"flex items-center gap-2 px-3 py-2 text-sm rounded-2xl cursor-pointer outline-none",
|
|
208
208
|
"text-foreground hover:bg-muted focus:bg-muted",
|
|
209
209
|
"data-[disabled]:opacity-50 data-[disabled]:pointer-events-none",
|
|
210
210
|
r && "pl-8",
|
|
@@ -215,7 +215,7 @@ const ye = d.forwardRef(({ className: e, inset: r, ...o }, n) => /* @__PURE__ */
|
|
|
215
215
|
));
|
|
216
216
|
ye.displayName = "DropdownMenuItem";
|
|
217
217
|
const Se = d.forwardRef(({ className: e, ...r }, o) => /* @__PURE__ */ t(
|
|
218
|
-
|
|
218
|
+
Ne,
|
|
219
219
|
{
|
|
220
220
|
ref: o,
|
|
221
221
|
className: f("mx-1 my-1 h-px bg-border", e),
|
package/dist/HoverCard.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as i } from "react/jsx-runtime";
|
|
3
3
|
import * as n from "react";
|
|
4
|
-
import { P as
|
|
4
|
+
import { P as H, c as l, a as k, u as F } from "./_shared/index-CXeb1OMI.js";
|
|
5
5
|
import { u as I } from "./_shared/index-DLcqcWxM.js";
|
|
6
|
-
import { C as U, c as
|
|
6
|
+
import { C as U, c as T, R as $, A as W, a as z } from "./_shared/index-uu9PT5Nu.js";
|
|
7
7
|
import { P as B, D as G } from "./_shared/index-B03TCNO5.js";
|
|
8
8
|
import { P as K } from "./_shared/index-V-Ajw7Ac.js";
|
|
9
9
|
import { c as j } from "./_shared/utils-eGXXUFl7.js";
|
|
10
|
-
var
|
|
11
|
-
|
|
12
|
-
]), b =
|
|
10
|
+
var x, S = "HoverCard", [O] = k(S, [
|
|
11
|
+
T
|
|
12
|
+
]), b = T(), [V, g] = O(S), y = (e) => {
|
|
13
13
|
const {
|
|
14
14
|
__scopeHoverCard: o,
|
|
15
15
|
children: t,
|
|
@@ -65,17 +65,17 @@ var N = "HoverCardTrigger", _ = n.forwardRef(
|
|
|
65
65
|
}
|
|
66
66
|
);
|
|
67
67
|
_.displayName = N;
|
|
68
|
-
var
|
|
68
|
+
var E = "HoverCardPortal", [q, J] = O(E, {
|
|
69
69
|
forceMount: void 0
|
|
70
70
|
}), D = (e) => {
|
|
71
|
-
const { __scopeHoverCard: o, forceMount: t, children: s, container: a } = e, c = g(
|
|
72
|
-
return /* @__PURE__ */ i(q, { scope: o, forceMount: t, children: /* @__PURE__ */ i(
|
|
71
|
+
const { __scopeHoverCard: o, forceMount: t, children: s, container: a } = e, c = g(E, o);
|
|
72
|
+
return /* @__PURE__ */ i(q, { scope: o, forceMount: t, children: /* @__PURE__ */ i(H, { present: t || c.open, children: /* @__PURE__ */ i(B, { asChild: !0, container: a, children: s }) }) });
|
|
73
73
|
};
|
|
74
|
-
D.displayName =
|
|
74
|
+
D.displayName = E;
|
|
75
75
|
var R = "HoverCardContent", A = n.forwardRef(
|
|
76
76
|
(e, o) => {
|
|
77
77
|
const t = J(R, e.__scopeHoverCard), { forceMount: s = t.forceMount, ...a } = e, c = g(R, e.__scopeHoverCard);
|
|
78
|
-
return /* @__PURE__ */ i(
|
|
78
|
+
return /* @__PURE__ */ i(H, { present: s || c.open, children: /* @__PURE__ */ i(
|
|
79
79
|
Q,
|
|
80
80
|
{
|
|
81
81
|
"data-state": c.open ? "open" : "closed",
|
|
@@ -100,8 +100,8 @@ var Q = n.forwardRef((e, o) => {
|
|
|
100
100
|
return n.useEffect(() => {
|
|
101
101
|
if (p) {
|
|
102
102
|
const r = document.body;
|
|
103
|
-
return
|
|
104
|
-
r.style.userSelect =
|
|
103
|
+
return x = r.style.userSelect || r.style.webkitUserSelect, r.style.userSelect = "none", r.style.webkitUserSelect = "none", () => {
|
|
104
|
+
r.style.userSelect = x, r.style.webkitUserSelect = x;
|
|
105
105
|
};
|
|
106
106
|
}
|
|
107
107
|
}, [p]), n.useEffect(() => {
|
|
@@ -178,7 +178,7 @@ const pe = ee, fe = re, ne = n.forwardRef(({ className: e, align: o = "center",
|
|
|
178
178
|
align: o,
|
|
179
179
|
sideOffset: t,
|
|
180
180
|
className: j(
|
|
181
|
-
"z-50 bg-card border border-border rounded-
|
|
181
|
+
"z-50 bg-card border border-border rounded-3xl shadow-lg p-4 w-64",
|
|
182
182
|
"data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",
|
|
183
183
|
"data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95",
|
|
184
184
|
"outline-none",
|