@floegence/floe-webapp-core 0.36.12 → 0.36.13

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,24 +1,24 @@
1
- import { createComponent as n, Portal as R, setAttribute as s, spread as v, mergeProps as C, memo as T, insert as l, effect as A, template as c, use as E } from "solid-js/web";
2
- import { createUniqueId as S, createMemo as p, Show as u } from "solid-js";
1
+ import { createComponent as n, Portal as B, setAttribute as u, spread as b, mergeProps as v, memo as T, insert as l, effect as A, template as c, use as D } from "solid-js/web";
2
+ import { createUniqueId as E, createMemo as M, Show as s } from "solid-js";
3
3
  import { cn as x } from "../../utils/cn.js";
4
- import { Button as $ } from "./Button.js";
5
- import { X as z } from "../icons/index.js";
6
- import { useResolvedFloeConfig as F } from "../../context/FloeConfigContext.js";
7
- import { useOverlayMask as M } from "../../hooks/useOverlayMask.js";
8
- import { resolveDialogSurfaceHost as N, DIALOG_SURFACE_BOUNDARY_ATTR as g } from "./dialogSurfaceScope.js";
9
- import { LOCAL_INTERACTION_SURFACE_ATTR as U } from "./localInteractionSurface.js";
10
- var j = /* @__PURE__ */ c('<h2 class="text-sm font-semibold">'), H = /* @__PURE__ */ c('<p class="mt-0.5 text-xs text-muted-foreground">'), L = /* @__PURE__ */ c('<div class="flex items-start justify-between p-3 border-b border-border"><div>'), P = /* @__PURE__ */ c('<div class="flex items-center justify-end gap-2 p-3 border-t border-border">'), W = /* @__PURE__ */ c('<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">'), q = /* @__PURE__ */ c("<div>");
11
- function G(e) {
12
- const o = S(), _ = () => `dialog-${o}-title`, w = () => `dialog-${o}-description`;
4
+ import { Button as C } from "./Button.js";
5
+ import { X as p } from "../icons/index.js";
6
+ import { useResolvedFloeConfig as z } from "../../context/FloeConfigContext.js";
7
+ import { useOverlayMask as F } from "../../hooks/useOverlayMask.js";
8
+ import { resolveSurfacePortalHost as N, DIALOG_SURFACE_BOUNDARY_ATTR as g, isSurfacePortalMode as P, resolveSurfacePortalMount as U } from "./dialogSurfaceScope.js";
9
+ import { LOCAL_INTERACTION_SURFACE_ATTR as j } from "./localInteractionSurface.js";
10
+ var H = /* @__PURE__ */ c('<h2 class="text-sm font-semibold">'), L = /* @__PURE__ */ c('<p class="mt-0.5 text-xs text-muted-foreground">'), W = /* @__PURE__ */ c('<div class="flex items-start justify-between p-3 border-b border-border"><div>'), q = /* @__PURE__ */ c('<div class="flex items-center justify-end gap-2 p-3 border-t border-border">'), G = /* @__PURE__ */ c('<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">'), X = /* @__PURE__ */ c("<div>");
11
+ function Y(e) {
12
+ const o = E(), $ = () => `dialog-${o}-title`, _ = () => `dialog-${o}-description`;
13
13
  let m;
14
- const h = p(() => e.open ? N() : {
14
+ const w = M(() => e.open ? N() : {
15
15
  host: null,
16
16
  mode: "global"
17
- }), f = () => `dialog-boundary-${o}`, t = () => h().mode === "surface" && !!h().host?.isConnected, I = () => h().host ?? void 0, B = (r) => typeof Element < "u" && r instanceof Element ? !!r.closest(`[${g}="${f()}"]`) : typeof Node < "u" && r instanceof Node ? !!r.parentElement?.closest(`[${g}="${f()}"]`) : !1;
18
- return M({
17
+ }), f = () => `dialog-boundary-${o}`, t = () => P(w()), I = () => U(w()), S = (r) => typeof Element < "u" && r instanceof Element ? !!r.closest(`[${g}="${f()}"]`) : typeof Node < "u" && r instanceof Node ? !!r.parentElement?.closest(`[${g}="${f()}"]`) : !1;
18
+ return F({
19
19
  open: () => e.open,
20
20
  root: () => m,
21
- containsTarget: (r) => t() && B(r),
21
+ containsTarget: (r) => t() && S(r),
22
22
  onClose: () => e.onOpenChange(!1),
23
23
  lockBodyScroll: () => !t(),
24
24
  trapFocus: !0,
@@ -28,28 +28,28 @@ function G(e) {
28
28
  blockWheel: () => t() ? "none" : "outside",
29
29
  blockTouchMove: () => t() ? "none" : "outside",
30
30
  restoreFocus: !0
31
- }), n(u, {
31
+ }), n(s, {
32
32
  get when() {
33
33
  return e.open;
34
34
  },
35
35
  get children() {
36
- return n(R, {
36
+ return n(B, {
37
37
  get mount() {
38
38
  return I();
39
39
  },
40
40
  get children() {
41
- var r = W(), b = r.firstChild, D = b.nextSibling, i = D.firstChild, y = i.firstChild;
42
- s(r, "data-floe-dialog-overlay-root", o), v(r, C({
41
+ var r = G(), h = r.firstChild, R = h.nextSibling, i = R.firstChild, y = i.firstChild;
42
+ u(r, "data-floe-dialog-overlay-root", o), b(r, v({
43
43
  get "data-floe-dialog-mode"() {
44
44
  return t() ? "surface" : "global";
45
45
  }
46
46
  }, () => ({
47
- [U]: t() ? "true" : void 0
47
+ [j]: t() ? "true" : void 0
48
48
  }), {
49
49
  get class() {
50
50
  return x(t() ? "absolute inset-0 z-20 p-3" : "fixed inset-0 z-50 p-4");
51
51
  }
52
- }), !1, !0), s(b, "data-floe-dialog-backdrop", o), v(b, C(() => ({
52
+ }), !1, !0), u(h, "data-floe-dialog-backdrop", o), b(h, v(() => ({
53
53
  [g]: f()
54
54
  }), {
55
55
  get class() {
@@ -58,7 +58,7 @@ function G(e) {
58
58
  onClick: () => e.onOpenChange(!1)
59
59
  }), !1, !1);
60
60
  var k = m;
61
- return typeof k == "function" ? E(k, i) : m = i, s(i, "data-floe-dialog-panel", o), v(i, C(() => ({
61
+ return typeof k == "function" ? D(k, i) : m = i, u(i, "data-floe-dialog-panel", o), b(i, v(() => ({
62
62
  [g]: f()
63
63
  }), {
64
64
  get class() {
@@ -69,53 +69,53 @@ function G(e) {
69
69
  return t() ? void 0 : "true";
70
70
  },
71
71
  get "aria-labelledby"() {
72
- return T(() => !!e.title)() ? _() : void 0;
72
+ return T(() => !!e.title)() ? $() : void 0;
73
73
  },
74
74
  get "aria-describedby"() {
75
- return T(() => !!e.description)() ? w() : void 0;
75
+ return T(() => !!e.description)() ? _() : void 0;
76
76
  },
77
77
  tabIndex: -1
78
- }), !1, !0), l(i, n(u, {
78
+ }), !1, !0), l(i, n(s, {
79
79
  get when() {
80
80
  return e.title || e.description;
81
81
  },
82
82
  get children() {
83
- var d = L(), O = d.firstChild;
84
- return l(O, n(u, {
83
+ var d = W(), O = d.firstChild;
84
+ return l(O, n(s, {
85
85
  get when() {
86
86
  return e.title;
87
87
  },
88
88
  get children() {
89
- var a = j();
90
- return l(a, () => e.title), A(() => s(a, "id", _())), a;
89
+ var a = H();
90
+ return l(a, () => e.title), A(() => u(a, "id", $())), a;
91
91
  }
92
- }), null), l(O, n(u, {
92
+ }), null), l(O, n(s, {
93
93
  get when() {
94
94
  return e.description;
95
95
  },
96
96
  get children() {
97
- var a = H();
98
- return l(a, () => e.description), A(() => s(a, "id", w())), a;
97
+ var a = L();
98
+ return l(a, () => e.description), A(() => u(a, "id", _())), a;
99
99
  }
100
- }), null), l(d, n($, {
100
+ }), null), l(d, n(C, {
101
101
  variant: "ghost-destructive",
102
102
  size: "icon",
103
103
  class: "h-6 w-6 -mr-1",
104
104
  onClick: () => e.onOpenChange(!1),
105
105
  "aria-label": "Close",
106
106
  get children() {
107
- return n(z, {
107
+ return n(p, {
108
108
  class: "w-3.5 h-3.5"
109
109
  });
110
110
  }
111
111
  }), null), d;
112
112
  }
113
- }), y), l(y, () => e.children), l(i, n(u, {
113
+ }), y), l(y, () => e.children), l(i, n(s, {
114
114
  get when() {
115
115
  return e.footer;
116
116
  },
117
117
  get children() {
118
- var d = P();
118
+ var d = q();
119
119
  return l(d, () => e.footer), d;
120
120
  }
121
121
  }), null), r;
@@ -124,9 +124,9 @@ function G(e) {
124
124
  }
125
125
  });
126
126
  }
127
- function re(e) {
128
- const o = F();
129
- return n(G, {
127
+ function oe(e) {
128
+ const o = z();
129
+ return n(Y, {
130
130
  get open() {
131
131
  return e.open;
132
132
  },
@@ -140,7 +140,7 @@ function re(e) {
140
140
  return e.description;
141
141
  },
142
142
  get footer() {
143
- return [n($, {
143
+ return [n(C, {
144
144
  variant: "ghost",
145
145
  onClick: () => e.onOpenChange(!1),
146
146
  get disabled() {
@@ -149,7 +149,7 @@ function re(e) {
149
149
  get children() {
150
150
  return e.cancelText ?? o.config.strings.confirmDialog.cancel;
151
151
  }
152
- }), n($, {
152
+ }), n(C, {
153
153
  get variant() {
154
154
  return e.variant === "destructive" ? "destructive" : "primary";
155
155
  },
@@ -165,11 +165,11 @@ function re(e) {
165
165
  })];
166
166
  },
167
167
  get children() {
168
- return e.children ?? q();
168
+ return e.children ?? X();
169
169
  }
170
170
  });
171
171
  }
172
172
  export {
173
- re as ConfirmDialog,
174
- G as Dialog
173
+ oe as ConfirmDialog,
174
+ Y as Dialog
175
175
  };