@floegence/floe-webapp-core 0.86.67 → 0.86.69
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/components/ui/Popover.js +33 -32
- package/dist/components/ui/picker/PickerBase.js +340 -331
- package/dist/styles.css +1 -1
- package/dist/workbench-themes.css +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { setAttribute as
|
|
1
|
+
import { setAttribute as s, insert as g, createComponent as R, Portal as M, spread as H, mergeProps as T, memo as z, effect as j, template as k, use as S, delegateEvents as q } from "solid-js/web";
|
|
2
2
|
import { createSignal as O, createMemo as N, createEffect as U, onCleanup as K, Show as W } from "solid-js";
|
|
3
3
|
import { cn as D } from "../../utils/cn.js";
|
|
4
4
|
import { calculateMenuPosition as G } from "./menuUtils.js";
|
|
@@ -9,33 +9,34 @@ import { resolveSurfacePortalHost as X, projectSurfacePortalPosition as Y, isSur
|
|
|
9
9
|
var oe = /* @__PURE__ */ k("<div data-floe-popover-panel role=dialog aria-modal=false data-floe-surface=floating>"), ne = /* @__PURE__ */ k('<div class="relative inline-flex"><div class=inline-flex data-floe-popover-trigger aria-haspopup=dialog>');
|
|
10
10
|
let re = 0;
|
|
11
11
|
function me(n) {
|
|
12
|
-
const h = () => n.open !== void 0, [B,
|
|
13
|
-
h() ||
|
|
14
|
-
},
|
|
15
|
-
open:
|
|
16
|
-
element: () =>
|
|
12
|
+
const h = () => n.open !== void 0, [B, I] = O(n.defaultOpen ?? !1), c = () => h() ? !!n.open : B(), i = (o) => {
|
|
13
|
+
h() || I(o), o !== c() && n.onOpenChange?.(o);
|
|
14
|
+
}, a = Q({
|
|
15
|
+
open: c,
|
|
16
|
+
element: () => r
|
|
17
17
|
}), [w, v] = O({
|
|
18
18
|
x: -9999,
|
|
19
19
|
y: -9999
|
|
20
20
|
});
|
|
21
|
-
let
|
|
22
|
-
const p = `floe-popover-${re += 1}`, b = `${p}-panel`,
|
|
23
|
-
owner:
|
|
21
|
+
let l, r;
|
|
22
|
+
const p = `floe-popover-${re += 1}`, b = `${p}-panel`, d = N(() => a.mounted() ? X({
|
|
23
|
+
owner: l
|
|
24
24
|
}) : {
|
|
25
25
|
host: null,
|
|
26
26
|
boundaryHost: null,
|
|
27
27
|
mountHost: null,
|
|
28
28
|
mode: "global"
|
|
29
|
-
}),
|
|
29
|
+
}), A = () => ee(d()), y = () => Z(d()), F = () => te(d()), x = (o) => Y(o, d()), P = () => (n.placement ?? "bottom-start").startsWith("top") ? "top" : "bottom", L = () => (n.placement ?? "bottom-start").slice(P() === "top" ? 5 : 7), _ = () => i(!1);
|
|
30
30
|
V({
|
|
31
|
-
open:
|
|
32
|
-
root: () =>
|
|
31
|
+
open: a.mounted,
|
|
32
|
+
root: () => r,
|
|
33
33
|
containsTarget: (o) => {
|
|
34
34
|
const e = o instanceof Element ? o : document.activeElement;
|
|
35
|
-
return e?.closest(`[data-floe-popover="${p}"]`) ? !0 : !!
|
|
35
|
+
return r?.contains(e ?? null) || e?.closest(`[data-floe-popover="${p}"]`) ? !0 : !!l?.contains(e ?? null);
|
|
36
36
|
},
|
|
37
|
-
onClose: () =>
|
|
38
|
-
|
|
37
|
+
onClose: () => i(!1),
|
|
38
|
+
onInteractOutside: () => i(!1),
|
|
39
|
+
onEscapeOutside: () => i(!1),
|
|
39
40
|
lockBodyScroll: !1,
|
|
40
41
|
trapFocus: !1,
|
|
41
42
|
autoFocus: !1,
|
|
@@ -45,10 +46,10 @@ function me(n) {
|
|
|
45
46
|
escapeKeyPhase: "bubble"
|
|
46
47
|
});
|
|
47
48
|
const E = () => {
|
|
48
|
-
if (!
|
|
49
|
-
const o = G(
|
|
49
|
+
if (!l || !r) return;
|
|
50
|
+
const o = G(l.getBoundingClientRect(), r.getBoundingClientRect(), L(), F());
|
|
50
51
|
if (P() === "top") {
|
|
51
|
-
const e =
|
|
52
|
+
const e = l.getBoundingClientRect(), f = r.getBoundingClientRect();
|
|
52
53
|
v({
|
|
53
54
|
x: o.x,
|
|
54
55
|
y: e.top - f.height - 6
|
|
@@ -58,7 +59,7 @@ function me(n) {
|
|
|
58
59
|
v(o);
|
|
59
60
|
};
|
|
60
61
|
return U(() => {
|
|
61
|
-
if (!
|
|
62
|
+
if (!a.mounted()) {
|
|
62
63
|
v({
|
|
63
64
|
x: -9999,
|
|
64
65
|
y: -9999
|
|
@@ -71,30 +72,30 @@ function me(n) {
|
|
|
71
72
|
});
|
|
72
73
|
}), (() => {
|
|
73
74
|
var o = ne(), e = o.firstChild;
|
|
74
|
-
|
|
75
|
-
t.key === "Escape" &&
|
|
76
|
-
}, e.$$click = () =>
|
|
77
|
-
var f =
|
|
78
|
-
return typeof f == "function" ? S(f, e) :
|
|
75
|
+
s(o, "data-floe-popover", p), e.$$keydown = (t) => {
|
|
76
|
+
t.key === "Escape" && c() && (t.stopPropagation(), i(!1));
|
|
77
|
+
}, e.$$click = () => i(!c());
|
|
78
|
+
var f = l;
|
|
79
|
+
return typeof f == "function" ? S(f, e) : l = e, g(e, () => n.trigger), g(o, R(W, {
|
|
79
80
|
get when() {
|
|
80
|
-
return
|
|
81
|
+
return a.mounted();
|
|
81
82
|
},
|
|
82
83
|
get children() {
|
|
83
84
|
return R(M, {
|
|
84
85
|
get mount() {
|
|
85
|
-
return
|
|
86
|
+
return A();
|
|
86
87
|
},
|
|
87
88
|
get children() {
|
|
88
|
-
var t = oe(),
|
|
89
|
-
return typeof
|
|
89
|
+
var t = oe(), u = r;
|
|
90
|
+
return typeof u == "function" ? S(u, t) : r = t, s(t, "id", b), H(t, T({
|
|
90
91
|
get class() {
|
|
91
92
|
return D(y() ? "absolute z-20" : "fixed z-50", "bg-popover text-popover-foreground", "rounded-panel border border-[var(--floe-line)]", "shadow-[var(--floe-window-shadow)]", "floe-floating-presence floe-floating-menu", n.class);
|
|
92
93
|
},
|
|
93
94
|
get "data-floating-presence"() {
|
|
94
|
-
return
|
|
95
|
+
return a.state();
|
|
95
96
|
},
|
|
96
97
|
get "aria-hidden"() {
|
|
97
|
-
return
|
|
98
|
+
return a.exiting() ? "true" : void 0;
|
|
98
99
|
},
|
|
99
100
|
get "aria-label"() {
|
|
100
101
|
return n.ariaLabel;
|
|
@@ -117,8 +118,8 @@ function me(n) {
|
|
|
117
118
|
});
|
|
118
119
|
}
|
|
119
120
|
}), null), j((t) => {
|
|
120
|
-
var
|
|
121
|
-
return
|
|
121
|
+
var u = n.triggerInputSurface ? "true" : void 0, m = n.triggerInputSurface ? "inset" : void 0, $ = c(), C = a.mounted() ? b : void 0;
|
|
122
|
+
return u !== t.e && s(e, "data-floe-input-surface", t.e = u), m !== t.t && s(e, "data-floe-surface", t.t = m), $ !== t.a && s(e, "aria-expanded", t.a = $), C !== t.o && s(e, "aria-controls", t.o = C), t;
|
|
122
123
|
}, {
|
|
123
124
|
e: void 0,
|
|
124
125
|
t: void 0,
|