asma-ui-core 3.64.0 → 3.64.1
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.
|
@@ -4,51 +4,52 @@ import { TOP_LAYER_PROPS as U, TOP_LAYER_RESET_STYLE as Y, getOpenModalDialogAnc
|
|
|
4
4
|
import { cloneElement as D, useRef as H, useState as I } from "react";
|
|
5
5
|
import { Fragment as N, jsx as f, jsxs as g } from "react/jsx-runtime";
|
|
6
6
|
import { FloatingArrow as z, FloatingPortal as B, arrow as G, autoUpdate as W, flip as q, offset as J, shift as K, useDismiss as Q, useFloating as V, useFocus as X, useHover as Z, useInteractions as $, useMergeRefs as ee, useRole as oe } from "@floating-ui/react";
|
|
7
|
-
var te = "#363E4A", pe = (e) => !e.title && e.title !== 0 ? e.children : /* @__PURE__ */ f(re, { ...e }), re = ({ title: e, children: t, placement: u = "top", arrow: r = !1, enterDelay: x = 500, leaveDelay:
|
|
8
|
-
const [
|
|
9
|
-
|
|
10
|
-
}, { refs:
|
|
11
|
-
open:
|
|
7
|
+
var te = "#363E4A", pe = (e) => !e.title && e.title !== 0 ? e.children : /* @__PURE__ */ f(re, { ...e }), re = ({ title: e, children: t, placement: u = "top", arrow: r = !1, enterDelay: x = 500, leaveDelay: v = 0, open: p, onOpen: R, onClose: y, disableHoverListener: h, disableFocusListener: w, offsetDistance: F, className: T, slotProps: s }) => {
|
|
8
|
+
const [_, E] = I(!1), l = p !== void 0, n = p ?? _, c = H(null), O = (m) => {
|
|
9
|
+
l || E(m), m ? R?.() : y?.();
|
|
10
|
+
}, { refs: i, floatingStyles: b, context: o } = V({
|
|
11
|
+
open: n,
|
|
12
12
|
onOpenChange: O,
|
|
13
13
|
placement: u,
|
|
14
14
|
strategy: "fixed",
|
|
15
15
|
whileElementsMounted: W,
|
|
16
16
|
middleware: [
|
|
17
|
-
J(
|
|
17
|
+
J(F ?? (r ? 8 : 6)),
|
|
18
18
|
q({ padding: 8 }),
|
|
19
19
|
K({ padding: 8 }),
|
|
20
20
|
...r ? [G({ element: c })] : []
|
|
21
21
|
]
|
|
22
|
-
}), { getReferenceProps:
|
|
22
|
+
}), { getReferenceProps: P, getFloatingProps: A } = $([
|
|
23
23
|
Z(o, {
|
|
24
|
-
enabled: !
|
|
24
|
+
enabled: !l && !h,
|
|
25
25
|
delay: {
|
|
26
26
|
open: x,
|
|
27
|
-
close:
|
|
27
|
+
close: v
|
|
28
28
|
},
|
|
29
29
|
move: !1
|
|
30
30
|
}),
|
|
31
|
-
X(o, { enabled: !
|
|
31
|
+
X(o, { enabled: !l && !w }),
|
|
32
32
|
Q(o),
|
|
33
33
|
oe(o, { role: "tooltip" })
|
|
34
|
-
]), d =
|
|
35
|
-
return /* @__PURE__ */ g(N, { children: [D(t,
|
|
36
|
-
ref: ee([
|
|
34
|
+
]), d = n ? j(i.reference.current) : void 0, a = k(d), L = C(i.setFloating, a);
|
|
35
|
+
return /* @__PURE__ */ g(N, { children: [D(t, P({
|
|
36
|
+
ref: ee([i.setReference, t.ref]),
|
|
37
37
|
...t.props
|
|
38
|
-
})),
|
|
38
|
+
})), n && /* @__PURE__ */ f(B, {
|
|
39
39
|
root: d,
|
|
40
40
|
children: /* @__PURE__ */ g("div", {
|
|
41
41
|
ref: L,
|
|
42
|
-
...
|
|
42
|
+
...a ? U : {},
|
|
43
43
|
...A(),
|
|
44
44
|
style: {
|
|
45
|
-
...
|
|
46
|
-
...
|
|
45
|
+
...a ? Y : {},
|
|
46
|
+
...b,
|
|
47
47
|
fontFamily: "Roboto, Helvetica, Arial, sans-serif",
|
|
48
|
-
|
|
49
|
-
...
|
|
48
|
+
overflow: "visible",
|
|
49
|
+
...s?.tooltip?.style,
|
|
50
|
+
...M(s?.tooltip?.sx)
|
|
50
51
|
},
|
|
51
|
-
className: S("z-[1500] block max-w-[320px] whitespace-normal break-words rounded-[3px] bg-[#363E4A] px-2 py-1 text-sm leading-5 text-white shadow-[0px_1px_6px_0px_rgba(0,0,0,0.15)]",
|
|
52
|
+
className: S("z-[1500] block max-w-[320px] whitespace-normal break-words rounded-[3px] bg-[#363E4A] px-2 py-1 text-sm leading-5 text-white shadow-[0px_1px_6px_0px_rgba(0,0,0,0.15)]", T, s?.tooltip?.className),
|
|
52
53
|
children: [e, r && /* @__PURE__ */ f(z, {
|
|
53
54
|
ref: c,
|
|
54
55
|
context: o,
|