@floegence/floe-webapp-core 0.40.1 → 0.40.3

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.
@@ -1,4 +1,8 @@
1
1
  /**
2
2
  * Command palette / search modal
3
3
  */
4
- export declare function CommandPalette(): import("solid-js").JSX.Element;
4
+ export interface CommandPaletteProps {
5
+ /** Optional global stacking layer shared by the backdrop and palette panel. */
6
+ zIndex?: number;
7
+ }
8
+ export declare function CommandPalette(props?: CommandPaletteProps): import("solid-js").JSX.Element;
@@ -1,23 +1,23 @@
1
- import { createComponent as s, Portal as R, effect as w, setAttribute as g, insert as i, Dynamic as z, className as D, template as u, use as E, delegateEvents as I } from "solid-js/web";
2
- import { createSignal as T, createEffect as j, createMemo as B, Show as x, For as F } from "solid-js";
3
- import { cn as M } from "../../utils/cn.js";
4
- import { useCommand as H } from "../../context/CommandContext.js";
5
- import { Search as L } from "../icons/index.js";
6
- import { useResolvedFloeConfig as N } from "../../context/FloeConfigContext.js";
7
- import { useOverlayMask as U } from "../../hooks/useOverlayMask.js";
8
- import { matchKeybind as W } from "../../utils/keybind.js";
9
- import { createFloatingPresence as q } from "./floatingPresence.js";
10
- var G = /* @__PURE__ */ u('<div class="fixed inset-0 z-50 bg-background/60 backdrop-blur-sm floe-floating-presence floe-floating-backdrop">'), J = /* @__PURE__ */ u('<div><div class="flex items-center gap-3 px-4 pt-1 border-b border-border"><input type=text><kbd class="text-xs text-muted-foreground px-1.5 py-0.5 rounded bg-muted font-mono"></kbd></div><div class="max-h-80 overflow-y-auto overscroll-contain py-2">'), Q = /* @__PURE__ */ u('<div class="px-4 py-8 text-center text-sm text-muted-foreground">'), V = /* @__PURE__ */ u('<div><div class="px-4 py-1 text-xs font-semibold text-muted-foreground uppercase tracking-wider">'), X = /* @__PURE__ */ u('<span class="w-5 h-5 flex items-center justify-center text-muted-foreground">'), Y = /* @__PURE__ */ u('<span class="ml-2 text-muted-foreground text-xs">'), Z = /* @__PURE__ */ u('<kbd class="text-xs text-muted-foreground px-1.5 py-0.5 rounded bg-muted font-mono">'), ee = /* @__PURE__ */ u('<button type=button><div class="flex-1 text-left"><span>');
11
- function de() {
12
- const n = H(), v = N();
13
- let S, y;
14
- const [_, h] = T(0), f = q({
1
+ import { createComponent as c, Portal as R, effect as C, className as _, setStyleProperty as E, setAttribute as x, insert as i, Dynamic as T, template as m, use as F, delegateEvents as j } from "solid-js/web";
2
+ import { createSignal as B, createEffect as H, createMemo as L, Show as h, For as I } from "solid-js";
3
+ import { cn as D } from "../../utils/cn.js";
4
+ import { useCommand as N } from "../../context/CommandContext.js";
5
+ import { Search as U } from "../icons/index.js";
6
+ import { useResolvedFloeConfig as W } from "../../context/FloeConfigContext.js";
7
+ import { useOverlayMask as q } from "../../hooks/useOverlayMask.js";
8
+ import { matchKeybind as G } from "../../utils/keybind.js";
9
+ import { createFloatingPresence as J } from "./floatingPresence.js";
10
+ var Q = /* @__PURE__ */ m("<div>"), V = /* @__PURE__ */ m('<div><div class="flex items-center gap-3 px-4 pt-1 border-b border-border"><input type=text><kbd class="text-xs text-muted-foreground px-1.5 py-0.5 rounded bg-muted font-mono"></kbd></div><div class="max-h-80 overflow-y-auto overscroll-contain py-2">'), X = /* @__PURE__ */ m('<div class="px-4 py-8 text-center text-sm text-muted-foreground">'), Y = /* @__PURE__ */ m('<div><div class="px-4 py-1 text-xs font-semibold text-muted-foreground uppercase tracking-wider">'), Z = /* @__PURE__ */ m('<span class="w-5 h-5 flex items-center justify-center text-muted-foreground">'), ee = /* @__PURE__ */ m('<span class="ml-2 text-muted-foreground text-xs">'), te = /* @__PURE__ */ m('<kbd class="text-xs text-muted-foreground px-1.5 py-0.5 rounded bg-muted font-mono">'), re = /* @__PURE__ */ m('<button type=button><div class="flex-1 text-left"><span>');
11
+ function me(b = {}) {
12
+ const n = N(), k = W();
13
+ let z, M;
14
+ const [S, w] = B(0), v = J({
15
15
  open: n.isOpen,
16
16
  exitDurationMs: 120
17
17
  });
18
- U({
18
+ q({
19
19
  open: n.isOpen,
20
- root: () => y,
20
+ root: () => M,
21
21
  onClose: () => n.close(),
22
22
  lockBodyScroll: !0,
23
23
  trapFocus: !0,
@@ -30,144 +30,147 @@ function de() {
30
30
  selector: "input"
31
31
  },
32
32
  restoreFocus: !0
33
- }), j(() => {
34
- n.isOpen() && (n.search(), h(0));
33
+ }), H(() => {
34
+ n.isOpen() && (n.search(), w(0));
35
35
  });
36
36
  const O = (e) => {
37
- if (W(e, v.config.commands.palette.keybind)) {
37
+ if (G(e, k.config.commands.palette.keybind)) {
38
38
  e.preventDefault(), n.close();
39
39
  return;
40
40
  }
41
- const r = n.filteredCommands();
41
+ const t = n.filteredCommands();
42
42
  switch (e.key) {
43
43
  case "ArrowDown": {
44
44
  e.preventDefault();
45
- const t = r.length;
46
- if (t <= 0) return;
47
- h((a) => Math.max(0, Math.min(a + 1, t - 1)));
45
+ const r = t.length;
46
+ if (r <= 0) return;
47
+ w((a) => Math.max(0, Math.min(a + 1, r - 1)));
48
48
  break;
49
49
  }
50
50
  case "ArrowUp": {
51
51
  e.preventDefault();
52
- const t = r.length;
53
- if (t <= 0) return;
54
- h((a) => Math.max(0, Math.min(a - 1, t - 1)));
52
+ const r = t.length;
53
+ if (r <= 0) return;
54
+ w((a) => Math.max(0, Math.min(a - 1, r - 1)));
55
55
  break;
56
56
  }
57
57
  case "Enter":
58
- e.preventDefault(), r[_()] && n.execute(r[_()].id);
58
+ e.preventDefault(), t[S()] && n.execute(t[S()].id);
59
59
  break;
60
60
  }
61
- }, A = B(() => {
62
- const e = n.filteredCommands(), r = /* @__PURE__ */ new Map();
63
- return e.forEach((t, a) => {
64
- const b = t.category ?? "Commands", p = r.get(b);
65
- p ? p.push({
66
- cmd: t,
61
+ }, A = L(() => {
62
+ const e = n.filteredCommands(), t = /* @__PURE__ */ new Map();
63
+ return e.forEach((r, a) => {
64
+ const f = r.category ?? "Commands", s = t.get(f);
65
+ s ? s.push({
66
+ cmd: r,
67
67
  index: a
68
- }) : r.set(b, [{
69
- cmd: t,
68
+ }) : t.set(f, [{
69
+ cmd: r,
70
70
  index: a
71
71
  }]);
72
- }), Array.from(r.entries());
72
+ }), Array.from(t.entries());
73
73
  });
74
- return s(x, {
74
+ return c(h, {
75
75
  get when() {
76
- return f.mounted();
76
+ return v.mounted();
77
77
  },
78
78
  get children() {
79
- return s(R, {
79
+ return c(R, {
80
80
  get children() {
81
81
  return [(() => {
82
- var e = G();
83
- return e.$$click = () => n.close(), w((r) => {
84
- var t = f.state(), a = f.exiting() ? "true" : void 0;
85
- return t !== r.e && g(e, "data-floating-presence", r.e = t), a !== r.t && g(e, "aria-hidden", r.t = a), r;
82
+ var e = Q();
83
+ return e.$$click = () => n.close(), C((t) => {
84
+ var r = D("fixed inset-0 bg-background/60 backdrop-blur-sm floe-floating-presence floe-floating-backdrop", b.zIndex === void 0 && "z-50"), a = b.zIndex, f = v.state(), s = v.exiting() ? "true" : void 0;
85
+ return r !== t.e && _(e, t.e = r), a !== t.t && E(e, "z-index", t.t = a), f !== t.a && x(e, "data-floating-presence", t.a = f), s !== t.o && x(e, "aria-hidden", t.o = s), t;
86
86
  }, {
87
87
  e: void 0,
88
- t: void 0
88
+ t: void 0,
89
+ a: void 0,
90
+ o: void 0
89
91
  }), e;
90
92
  })(), (() => {
91
- var e = J(), r = e.firstChild, t = r.firstChild, a = t.nextSibling, b = r.nextSibling;
93
+ var e = V(), t = e.firstChild, r = t.firstChild, a = r.nextSibling, f = t.nextSibling;
92
94
  e.$$keydown = O;
93
- var p = y;
94
- typeof p == "function" ? E(p, e) : y = e, i(r, s(L, {
95
+ var s = M;
96
+ typeof s == "function" ? F(s, e) : M = e, i(t, c(U, {
95
97
  class: "w-5 h-5 text-muted-foreground flex-shrink-0"
96
- }), t), t.$$input = (o) => n.setSearch(o.currentTarget.value);
97
- var P = S;
98
- return typeof P == "function" ? E(P, t) : S = t, i(a, () => v.config.strings.commandPalette.esc), i(b, s(x, {
98
+ }), r), r.$$input = (o) => n.setSearch(o.currentTarget.value);
99
+ var P = z;
100
+ return typeof P == "function" ? F(P, r) : z = r, i(a, () => k.config.strings.commandPalette.esc), i(f, c(h, {
99
101
  get when() {
100
102
  return n.filteredCommands().length > 0;
101
103
  },
102
104
  get fallback() {
103
105
  return (() => {
104
- var o = Q();
105
- return i(o, () => v.config.strings.commandPalette.empty), o;
106
+ var o = X();
107
+ return i(o, () => k.config.strings.commandPalette.empty), o;
106
108
  })();
107
109
  },
108
110
  get children() {
109
- return s(F, {
111
+ return c(I, {
110
112
  get each() {
111
113
  return A();
112
114
  },
113
- children: ([o, k]) => (() => {
114
- var m = V(), $ = m.firstChild;
115
- return i($, o), i(m, s(F, {
116
- each: k,
115
+ children: ([o, y]) => (() => {
116
+ var g = Y(), $ = g.firstChild;
117
+ return i($, o), i(g, c(I, {
118
+ each: y,
117
119
  children: (l) => (() => {
118
- var c = ee(), C = c.firstChild, K = C.firstChild;
119
- return c.addEventListener("mouseenter", () => h(l.index)), c.$$click = () => n.execute(l.cmd.id), i(c, s(x, {
120
+ var d = re(), p = d.firstChild, K = p.firstChild;
121
+ return d.addEventListener("mouseenter", () => w(l.index)), d.$$click = () => n.execute(l.cmd.id), i(d, c(h, {
120
122
  get when() {
121
123
  return l.cmd.icon;
122
124
  },
123
125
  get children() {
124
- var d = X();
125
- return i(d, s(z, {
126
+ var u = Z();
127
+ return i(u, c(T, {
126
128
  get component() {
127
129
  return l.cmd.icon;
128
130
  },
129
131
  class: "w-5 h-5"
130
- })), d;
132
+ })), u;
131
133
  }
132
- }), C), i(K, () => l.cmd.title), i(C, s(x, {
134
+ }), p), i(K, () => l.cmd.title), i(p, c(h, {
133
135
  get when() {
134
136
  return l.cmd.description;
135
137
  },
136
138
  get children() {
137
- var d = Y();
138
- return i(d, () => l.cmd.description), d;
139
+ var u = ee();
140
+ return i(u, () => l.cmd.description), u;
139
141
  }
140
- }), null), i(c, s(x, {
142
+ }), null), i(d, c(h, {
141
143
  get when() {
142
144
  return l.cmd.keybind;
143
145
  },
144
146
  get children() {
145
- var d = Z();
146
- return i(d, () => n.getKeybindDisplay(l.cmd.keybind)), d;
147
+ var u = te();
148
+ return i(u, () => n.getKeybindDisplay(l.cmd.keybind)), u;
147
149
  }
148
- }), null), w(() => D(c, M("w-full flex items-center gap-3 px-4 py-2 text-sm cursor-pointer", "transition-colors duration-75", "focus:outline-none", _() === l.index ? "bg-accent text-accent-foreground" : "hover:bg-accent/50"))), c;
150
+ }), null), C(() => _(d, D("w-full flex items-center gap-3 px-4 py-2 text-sm cursor-pointer", "transition-colors duration-75", "focus:outline-none", S() === l.index ? "bg-accent text-accent-foreground" : "hover:bg-accent/50"))), d;
149
151
  })()
150
- }), null), m;
152
+ }), null), g;
151
153
  })()
152
154
  });
153
155
  }
154
- })), w((o) => {
155
- var k = M("fixed left-1/2 top-[20%] z-50 -translate-x-1/2", "w-full max-w-xl", "bg-popover text-popover-foreground rounded-lg shadow-2xl", "border border-border", "floe-floating-presence floe-floating-dialog-panel", "overflow-hidden"), m = f.state(), $ = f.exiting() ? "true" : void 0, l = v.config.strings.commandPalette.placeholder, c = M("flex-1 h-12 bg-transparent text-sm", "placeholder:text-muted-foreground", "focus:outline-none");
156
- return k !== o.e && D(e, o.e = k), m !== o.t && g(e, "data-floating-presence", o.t = m), $ !== o.a && g(e, "aria-hidden", o.a = $), l !== o.o && g(t, "placeholder", o.o = l), c !== o.i && D(t, o.i = c), o;
156
+ })), C((o) => {
157
+ var y = D("fixed left-1/2 top-[20%] -translate-x-1/2", b.zIndex === void 0 && "z-50", "w-full max-w-xl", "bg-popover text-popover-foreground rounded-lg shadow-2xl", "border border-border", "floe-floating-presence floe-floating-dialog-panel", "overflow-hidden"), g = b.zIndex, $ = v.state(), l = v.exiting() ? "true" : void 0, d = k.config.strings.commandPalette.placeholder, p = D("flex-1 h-12 bg-transparent text-sm", "placeholder:text-muted-foreground", "focus:outline-none");
158
+ return y !== o.e && _(e, o.e = y), g !== o.t && E(e, "z-index", o.t = g), $ !== o.a && x(e, "data-floating-presence", o.a = $), l !== o.o && x(e, "aria-hidden", o.o = l), d !== o.i && x(r, "placeholder", o.i = d), p !== o.n && _(r, o.n = p), o;
157
159
  }, {
158
160
  e: void 0,
159
161
  t: void 0,
160
162
  a: void 0,
161
163
  o: void 0,
162
- i: void 0
163
- }), w(() => t.value = n.search()), e;
164
+ i: void 0,
165
+ n: void 0
166
+ }), C(() => r.value = n.search()), e;
164
167
  })()];
165
168
  }
166
169
  });
167
170
  }
168
171
  });
169
172
  }
170
- I(["click", "keydown", "input"]);
173
+ j(["click", "keydown", "input"]);
171
174
  export {
172
- de as CommandPalette
175
+ me as CommandPalette
173
176
  };
@@ -8,6 +8,8 @@ export interface DialogProps {
8
8
  children: JSX.Element;
9
9
  footer?: JSX.Element;
10
10
  class?: string;
11
+ /** Optional stacking layer for global dialogs. Surface-scoped dialogs remain locally layered. */
12
+ globalZIndex?: number;
11
13
  }
12
14
  /**
13
15
  * Modal dialog component
@@ -29,5 +31,7 @@ export interface ConfirmDialogProps {
29
31
  variant?: 'default' | 'destructive';
30
32
  onConfirm: () => void | Promise<void>;
31
33
  loading?: boolean;
34
+ /** Optional stacking layer for the underlying global dialog. */
35
+ globalZIndex?: number;
32
36
  }
33
37
  export declare function ConfirmDialog(props: ConfirmDialogProps): JSX.Element;
@@ -1,18 +1,18 @@
1
- import { createComponent as n, use as I, setAttribute as f, style as Y, Portal as X, spread as O, mergeProps as R, memo as k, insert as d, effect as H, template as s } from "solid-js/web";
2
- import { createUniqueId as J, createSignal as P, createMemo as N, createEffect as Q, onCleanup as Z, Show as h, untrack as ee } from "solid-js";
3
- import { cn as S } from "../../utils/cn.js";
4
- import { Button as B } from "./Button.js";
1
+ import { createComponent as r, use as E, setAttribute as f, style as W, Portal as Y, spread as R, mergeProps as k, memo as P, insert as d, effect as H, template as u } from "solid-js/web";
2
+ import { createUniqueId as X, createSignal as S, createMemo as N, createEffect as J, onCleanup as Q, Show as h, untrack as ee } from "solid-js";
3
+ import { cn as p } from "../../utils/cn.js";
4
+ import { Button as I } from "./Button.js";
5
5
  import { X as te } from "../icons/index.js";
6
- import { useResolvedFloeConfig as re } from "../../context/FloeConfigContext.js";
7
- import { useOverlayMask as ne } from "../../hooks/useOverlayMask.js";
8
- import { resolveSurfacePortalHost as oe, isSurfacePortalMode as F, DIALOG_SURFACE_BOUNDARY_ATTR as $, projectSurfacePortalRect as ie, resolveSurfacePortalBoundaryRect as le, resolveSurfacePortalMount as ae } from "./dialogSurfaceScope.js";
6
+ import { useResolvedFloeConfig as ne } from "../../context/FloeConfigContext.js";
7
+ import { useOverlayMask as re } from "../../hooks/useOverlayMask.js";
8
+ import { resolveSurfacePortalHost as oe, isSurfacePortalMode as F, DIALOG_SURFACE_BOUNDARY_ATTR as _, projectSurfacePortalRect as ie, resolveSurfacePortalBoundaryRect as le, resolveSurfacePortalMount as ae } from "./dialogSurfaceScope.js";
9
9
  import { LOCAL_INTERACTION_SURFACE_ATTR as de } from "./localInteractionSurface.js";
10
10
  import { createFloatingPresence as ce } from "./floatingPresence.js";
11
- var se = /* @__PURE__ */ s("<span aria-hidden=true>"), ue = /* @__PURE__ */ s('<h2 class="text-sm font-semibold">'), fe = /* @__PURE__ */ s('<p class="mt-0.5 text-xs text-muted-foreground">'), ge = /* @__PURE__ */ s('<div class="flex items-start justify-between p-3 border-b border-border"><div>'), me = /* @__PURE__ */ s('<div class="flex items-center justify-end gap-2 p-3 border-t border-border">'), he = /* @__PURE__ */ s('<div><div></div><div class="relative z-[1] flex h-full w-full items-center justify-center"><div><div class="flex-1 overflow-auto overscroll-contain p-3">'), we = /* @__PURE__ */ s("<div>");
12
- const ve = {
11
+ var ue = /* @__PURE__ */ u("<span aria-hidden=true>"), se = /* @__PURE__ */ u('<h2 class="text-sm font-semibold">'), fe = /* @__PURE__ */ u('<p class="mt-0.5 text-xs text-muted-foreground">'), ge = /* @__PURE__ */ u('<div class="flex items-start justify-between p-3 border-b border-border"><div>'), me = /* @__PURE__ */ u('<div class="flex items-center justify-end gap-2 p-3 border-t border-border">'), he = /* @__PURE__ */ u('<div><div></div><div class="relative z-[1] flex h-full w-full items-center justify-center"><div><div class="flex-1 overflow-auto overscroll-contain p-3">'), be = /* @__PURE__ */ u("<div>");
12
+ const we = {
13
13
  display: "none"
14
14
  };
15
- function be(e) {
15
+ function ve(e) {
16
16
  if (typeof queueMicrotask == "function") {
17
17
  queueMicrotask(e);
18
18
  return;
@@ -25,168 +25,170 @@ function j(e) {
25
25
  function ye(e) {
26
26
  return typeof window < "u" && typeof window.requestAnimationFrame == "function" ? window.requestAnimationFrame(e) : window.setTimeout(() => e(Date.now()), 16);
27
27
  }
28
- function pe(e) {
28
+ function xe(e) {
29
29
  if (typeof window < "u" && typeof window.cancelAnimationFrame == "function") {
30
30
  window.cancelAnimationFrame(e);
31
31
  return;
32
32
  }
33
33
  window.clearTimeout(e);
34
34
  }
35
- function xe(e) {
36
- const o = J(), T = () => `dialog-${o}-title`, D = () => `dialog-${o}-description`;
37
- let _;
38
- const [w, q] = P(null), [M, G] = P(0), [L, z] = P(0), E = () => e.open && !!w() && M() > 0, u = ce({
39
- open: E,
35
+ function $e(e) {
36
+ const o = X(), B = () => `dialog-${o}-title`, T = () => `dialog-${o}-description`;
37
+ let C;
38
+ const [b, q] = S(null), [D, G] = S(0), [z, L] = S(0), M = () => e.open && !!b() && D() > 0, s = ce({
39
+ open: M,
40
40
  exitDurationMs: 120
41
- }), C = () => u.mounted() && !!w() && M() > 0, U = (t) => {
42
- q(t), be(() => {
43
- ee(w) === t && G((l) => l + 1);
41
+ }), A = () => s.mounted() && !!b() && D() > 0, U = (t) => {
42
+ q(t), ve(() => {
43
+ ee(b) === t && G((l) => l + 1);
44
44
  });
45
- }, v = N(() => C() ? oe({
46
- owner: w()
45
+ }, w = N(() => A() ? oe({
46
+ owner: b()
47
47
  }) : {
48
48
  host: null,
49
49
  boundaryHost: null,
50
50
  mountHost: null,
51
51
  mode: "global"
52
- }), b = () => `dialog-boundary-${o}`, r = () => F(v()), V = () => ae(v()), A = (t) => ie(le(t), t), K = () => A(v()), y = N(() => (L(), K())), W = (t) => typeof Element < "u" && t instanceof Element ? !!t.closest(`[${$}="${b()}"]`) : typeof Node < "u" && t instanceof Node ? !!t.parentElement?.closest(`[${$}="${b()}"]`) : !1;
53
- return Q(() => {
54
- const t = v();
55
- if (!C() || !F(t) || typeof window > "u")
52
+ }), v = () => `dialog-boundary-${o}`, n = () => F(w()), V = () => ae(w()), O = (t) => ie(le(t), t), Z = () => O(w()), y = N(() => (z(), Z())), K = (t) => typeof Element < "u" && t instanceof Element ? !!t.closest(`[${_}="${v()}"]`) : typeof Node < "u" && t instanceof Node ? !!t.parentElement?.closest(`[${_}="${v()}"]`) : !1;
53
+ return J(() => {
54
+ const t = w();
55
+ if (!A() || !F(t) || typeof window > "u")
56
56
  return;
57
- let l = !1, g = null, i = j(A(t));
58
- const p = () => {
57
+ let l = !1, g = null, i = j(O(t));
58
+ const x = () => {
59
59
  if (l || !F(t))
60
60
  return;
61
- const a = j(A(t));
62
- a !== i && (i = a, z((x) => x + 1));
61
+ const a = j(O(t));
62
+ a !== i && (i = a, L(($) => $ + 1));
63
63
  }, m = () => {
64
64
  l || (g = ye(() => {
65
- p(), m();
65
+ x(), m();
66
66
  }));
67
67
  };
68
- m(), Z(() => {
69
- l = !0, g !== null && pe(g);
68
+ m(), Q(() => {
69
+ l = !0, g !== null && xe(g);
70
70
  });
71
- }), ne({
72
- open: E,
73
- root: () => _,
74
- containsTarget: r() ? (t) => W(t) : void 0,
71
+ }), re({
72
+ open: M,
73
+ root: () => C,
74
+ containsTarget: n() ? (t) => K(t) : void 0,
75
75
  onClose: () => e.onOpenChange(!1),
76
- lockBodyScroll: () => !r(),
76
+ lockBodyScroll: () => !n(),
77
77
  trapFocus: !0,
78
- closeOnEscape: () => r() ? "inside" : !0,
78
+ closeOnEscape: () => n() ? "inside" : !0,
79
79
  blockHotkeys: !0,
80
80
  // Block scroll bleed outside the dialog while keeping the dialog content scrollable.
81
- blockWheel: () => r() ? "none" : "outside",
82
- blockTouchMove: () => r() ? "none" : "outside",
81
+ blockWheel: () => n() ? "none" : "outside",
82
+ blockTouchMove: () => n() ? "none" : "outside",
83
83
  restoreFocus: !0
84
84
  }), [(() => {
85
- var t = se();
86
- return I(U, t), f(t, "data-floe-dialog-owner-anchor", o), Y(t, ve), t;
87
- })(), n(h, {
85
+ var t = ue();
86
+ return E(U, t), f(t, "data-floe-dialog-owner-anchor", o), W(t, we), t;
87
+ })(), r(h, {
88
88
  get when() {
89
- return C();
89
+ return A();
90
90
  },
91
91
  get children() {
92
- return n(X, {
92
+ return r(Y, {
93
93
  get mount() {
94
94
  return V();
95
95
  },
96
96
  get children() {
97
- var t = he(), l = t.firstChild, g = l.nextSibling, i = g.firstChild, p = i.firstChild;
98
- f(t, "data-floe-dialog-overlay-root", o), O(t, R({
97
+ var t = he(), l = t.firstChild, g = l.nextSibling, i = g.firstChild, x = i.firstChild;
98
+ f(t, "data-floe-dialog-overlay-root", o), R(t, k({
99
99
  get "data-floe-dialog-mode"() {
100
- return r() ? "surface" : "global";
100
+ return n() ? "surface" : "global";
101
101
  },
102
102
  get "data-floating-presence"() {
103
- return u.state();
103
+ return s.state();
104
104
  },
105
105
  get "aria-hidden"() {
106
- return u.exiting() ? "true" : void 0;
106
+ return s.exiting() ? "true" : void 0;
107
107
  }
108
108
  }, () => ({
109
- [de]: r() ? "true" : void 0
109
+ [de]: n() ? "true" : void 0
110
110
  }), {
111
111
  get class() {
112
- return S(r() ? "absolute z-20 box-border p-3" : "fixed inset-0 box-border z-50 p-4", u.exiting() && "pointer-events-none");
112
+ return p(n() ? "absolute z-20 box-border p-3" : p("fixed inset-0 box-border p-4", e.globalZIndex === void 0 && "z-50"), s.exiting() && "pointer-events-none");
113
113
  },
114
114
  get style() {
115
- return k(() => !!r())() ? {
115
+ return P(() => !!n())() ? {
116
116
  left: `${y().left}px`,
117
117
  top: `${y().top}px`,
118
118
  width: `${y().width}px`,
119
119
  height: `${y().height}px`
120
- } : void 0;
120
+ } : {
121
+ "z-index": e.globalZIndex
122
+ };
121
123
  }
122
- }), !1, !0), f(l, "data-floe-dialog-backdrop", o), O(l, R(() => ({
123
- [$]: b()
124
+ }), !1, !0), f(l, "data-floe-dialog-backdrop", o), R(l, k(() => ({
125
+ [_]: v()
124
126
  }), {
125
127
  get "data-floating-presence"() {
126
- return u.state();
128
+ return s.state();
127
129
  },
128
130
  get class() {
129
- return S("absolute inset-0 cursor-pointer floe-floating-presence floe-floating-backdrop", r() ? "bg-background/72 backdrop-blur-[2px]" : "bg-background/80 backdrop-blur-sm");
131
+ return p("absolute inset-0 cursor-pointer floe-floating-presence floe-floating-backdrop", n() ? "bg-background/72 backdrop-blur-[2px]" : "bg-background/80 backdrop-blur-sm");
130
132
  },
131
133
  onClick: () => e.onOpenChange(!1)
132
134
  }), !1, !1);
133
- var m = _;
134
- return typeof m == "function" ? I(m, i) : _ = i, f(i, "data-floe-dialog-panel", o), O(i, R(() => ({
135
- [$]: b()
135
+ var m = C;
136
+ return typeof m == "function" ? E(m, i) : C = i, f(i, "data-floe-dialog-panel", o), R(i, k(() => ({
137
+ [_]: v()
136
138
  }), {
137
139
  get class() {
138
- return S(r() ? "flex max-h-[calc(100%-1rem)] w-[min(32rem,calc(100%-1rem))] max-w-[calc(100%-1rem)] flex-col" : "w-full max-w-md max-h-[85vh]", "bg-card text-card-foreground rounded-md shadow-lg", "border border-border", "floe-floating-presence floe-floating-dialog-panel", "flex flex-col", e.class);
140
+ return p(n() ? "flex max-h-[calc(100%-1rem)] w-[min(32rem,calc(100%-1rem))] max-w-[calc(100%-1rem)] flex-col" : "w-full max-w-md max-h-[85vh]", "bg-card text-card-foreground rounded-md shadow-lg", "border border-border", "floe-floating-presence floe-floating-dialog-panel", "flex flex-col", e.class);
139
141
  },
140
142
  get "data-floating-presence"() {
141
- return u.state();
143
+ return s.state();
142
144
  },
143
145
  role: "dialog",
144
146
  get "aria-modal"() {
145
- return r() ? void 0 : "true";
147
+ return n() ? void 0 : "true";
146
148
  },
147
149
  get "aria-labelledby"() {
148
- return k(() => !!e.title)() ? T() : void 0;
150
+ return P(() => !!e.title)() ? B() : void 0;
149
151
  },
150
152
  get "aria-describedby"() {
151
- return k(() => !!e.description)() ? D() : void 0;
153
+ return P(() => !!e.description)() ? T() : void 0;
152
154
  },
153
155
  tabIndex: -1
154
- }), !1, !0), d(i, n(h, {
156
+ }), !1, !0), d(i, r(h, {
155
157
  get when() {
156
158
  return e.title || e.description;
157
159
  },
158
160
  get children() {
159
- var a = ge(), x = a.firstChild;
160
- return d(x, n(h, {
161
+ var a = ge(), $ = a.firstChild;
162
+ return d($, r(h, {
161
163
  get when() {
162
164
  return e.title;
163
165
  },
164
166
  get children() {
165
- var c = ue();
166
- return d(c, () => e.title), H(() => f(c, "id", T())), c;
167
+ var c = se();
168
+ return d(c, () => e.title), H(() => f(c, "id", B())), c;
167
169
  }
168
- }), null), d(x, n(h, {
170
+ }), null), d($, r(h, {
169
171
  get when() {
170
172
  return e.description;
171
173
  },
172
174
  get children() {
173
175
  var c = fe();
174
- return d(c, () => e.description), H(() => f(c, "id", D())), c;
176
+ return d(c, () => e.description), H(() => f(c, "id", T())), c;
175
177
  }
176
- }), null), d(a, n(B, {
178
+ }), null), d(a, r(I, {
177
179
  variant: "ghost-destructive",
178
180
  size: "icon",
179
181
  class: "-my-2 -mr-2 h-[46px] w-[46px] shrink-0 sm:my-0 sm:-mr-1 sm:h-6 sm:w-6",
180
182
  onClick: () => e.onOpenChange(!1),
181
183
  "aria-label": "Close",
182
184
  get children() {
183
- return n(te, {
185
+ return r(te, {
184
186
  class: "w-3.5 h-3.5"
185
187
  });
186
188
  }
187
189
  }), null), a;
188
190
  }
189
- }), p), d(p, () => e.children), d(i, n(h, {
191
+ }), x), d(x, () => e.children), d(i, r(h, {
190
192
  get when() {
191
193
  return e.footer;
192
194
  },
@@ -200,9 +202,9 @@ function xe(e) {
200
202
  }
201
203
  })];
202
204
  }
203
- function Be(e) {
204
- const o = re();
205
- return n(xe, {
205
+ function Ie(e) {
206
+ const o = ne();
207
+ return r($e, {
206
208
  get open() {
207
209
  return e.open;
208
210
  },
@@ -215,8 +217,11 @@ function Be(e) {
215
217
  get description() {
216
218
  return e.description;
217
219
  },
220
+ get globalZIndex() {
221
+ return e.globalZIndex;
222
+ },
218
223
  get footer() {
219
- return [n(B, {
224
+ return [r(I, {
220
225
  variant: "ghost",
221
226
  onClick: () => e.onOpenChange(!1),
222
227
  get disabled() {
@@ -225,7 +230,7 @@ function Be(e) {
225
230
  get children() {
226
231
  return e.cancelText ?? o.config.strings.confirmDialog.cancel;
227
232
  }
228
- }), n(B, {
233
+ }), r(I, {
229
234
  get variant() {
230
235
  return e.variant === "destructive" ? "destructive" : "primary";
231
236
  },
@@ -241,11 +246,11 @@ function Be(e) {
241
246
  })];
242
247
  },
243
248
  get children() {
244
- return e.children ?? we();
249
+ return e.children ?? be();
245
250
  }
246
251
  });
247
252
  }
248
253
  export {
249
- Be as ConfirmDialog,
250
- xe as Dialog
254
+ Ie as ConfirmDialog,
255
+ $e as Dialog
251
256
  };