@floegence/floe-webapp-core 0.46.6 → 0.46.7

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.
@@ -3,6 +3,8 @@ export interface DropdownItem {
3
3
  id: string;
4
4
  label: string;
5
5
  icon?: () => JSX.Element;
6
+ /** Visual emphasis for destructive actions. */
7
+ tone?: 'default' | 'danger';
6
8
  disabled?: boolean;
7
9
  separator?: boolean;
8
10
  /** Submenu items for cascade dropdown */
@@ -1,28 +1,28 @@
1
- import { setAttribute as v, insert as f, createComponent as l, Portal as U, use as R, spread as W, mergeProps as G, effect as _, className as E, template as k, memo as N, delegateEvents as ee } from "solid-js/web";
2
- import { createSignal as T, createMemo as te, createEffect as J, onCleanup as ne, Show as y, Index as Q } from "solid-js";
3
- import { cn as p } from "../../utils/cn.js";
4
- import { deferNonBlocking as re } from "../../utils/defer.js";
5
- import { ChevronDown as oe, Check as ie, ChevronRight as ue } from "../icons/index.js";
6
- import { focusMenuItem as L, MENU_ITEM_SELECTOR as ae, moveMenuFocus as z, calculateMenuPosition as le, calculateSubmenuPosition as se } from "./menuUtils.js";
7
- import { LOCAL_INTERACTION_SURFACE_ATTR as V } from "./localInteractionSurface.js";
8
- import { createFloatingPresence as X } from "./floatingPresence.js";
9
- import { resolveSurfacePortalHost as de, projectSurfacePortalPosition as ce, resolveSurfacePortalBoundaryRect as fe, isSurfacePortalMode as me, resolveSurfacePortalMount as ge } from "./dialogSurfaceScope.js";
10
- var j = /* @__PURE__ */ k("<div>"), ve = /* @__PURE__ */ k("<div><div role=button aria-haspopup=menu data-floe-dropdown-trigger>"), Y = /* @__PURE__ */ k('<div class="my-1 h-px bg-border"role=separator>'), be = /* @__PURE__ */ k('<button type=button role=menuitem><span class="w-3.5 h-3.5 flex items-center justify-center"></span><span class="flex-1 text-left">'), he = /* @__PURE__ */ k("<div class=relative>"), we = /* @__PURE__ */ k('<span class="w-3.5 h-3.5 flex items-center justify-center">'), ye = /* @__PURE__ */ k("<span>");
11
- let xe = 0, Se = 0;
12
- function pe(e, d) {
1
+ import { setAttribute as v, insert as g, createComponent as l, Portal as W, use as E, spread as G, mergeProps as J, effect as T, className as D, template as P, memo as z, delegateEvents as te } from "solid-js/web";
2
+ import { createSignal as _, createMemo as ne, createEffect as Q, onCleanup as re, Show as y, Index as V } from "solid-js";
3
+ import { cn as k } from "../../utils/cn.js";
4
+ import { deferNonBlocking as oe } from "../../utils/defer.js";
5
+ import { ChevronDown as ie, Check as ue, ChevronRight as ae } from "../icons/index.js";
6
+ import { focusMenuItem as R, MENU_ITEM_SELECTOR as le, moveMenuFocus as U, calculateMenuPosition as de, calculateSubmenuPosition as ce } from "./menuUtils.js";
7
+ import { LOCAL_INTERACTION_SURFACE_ATTR as X } from "./localInteractionSurface.js";
8
+ import { createFloatingPresence as Y } from "./floatingPresence.js";
9
+ import { resolveSurfacePortalHost as se, projectSurfacePortalPosition as fe, resolveSurfacePortalBoundaryRect as me, isSurfacePortalMode as ge, resolveSurfacePortalMount as ve } from "./dialogSurfaceScope.js";
10
+ var j = /* @__PURE__ */ P("<div>"), be = /* @__PURE__ */ P("<div><div role=button aria-haspopup=menu data-floe-dropdown-trigger>"), Z = /* @__PURE__ */ P('<div class="my-1 h-px bg-border"role=separator>'), he = /* @__PURE__ */ P('<button type=button role=menuitem><span class="w-3.5 h-3.5 flex items-center justify-center"></span><span class="flex-1 text-left">'), we = /* @__PURE__ */ P("<div class=relative>"), ye = /* @__PURE__ */ P('<span class="w-3.5 h-3.5 flex items-center justify-center">'), xe = /* @__PURE__ */ P("<span>");
11
+ let Se = 0, Me = 0;
12
+ function ke(e, f) {
13
13
  switch (e) {
14
14
  case "Enter":
15
15
  case " ":
16
- return d.open ? {
16
+ return f.open ? {
17
17
  nextOpen: !1
18
18
  } : {
19
19
  nextOpen: !0,
20
- focusMode: d.hasSelection ? "selected" : "first"
20
+ focusMode: f.hasSelection ? "selected" : "first"
21
21
  };
22
22
  case "ArrowDown":
23
23
  return {
24
24
  nextOpen: !0,
25
- focusMode: d.hasSelection ? "selected" : "first"
25
+ focusMode: f.hasSelection ? "selected" : "first"
26
26
  };
27
27
  case "ArrowUp":
28
28
  return {
@@ -33,119 +33,119 @@ function pe(e, d) {
33
33
  return null;
34
34
  }
35
35
  }
36
- function Me(e) {
37
- const [d, s] = T(!1), u = X({
38
- open: d,
36
+ function $e(e) {
37
+ const [f, c] = _(!1), u = Y({
38
+ open: f,
39
39
  exitDurationMs: 100
40
- }), [F, M] = T({
40
+ }), [F, $] = _({
41
41
  x: -9999,
42
42
  y: -9999
43
43
  });
44
44
  let x, w;
45
- const b = `floe-dropdown-${xe += 1}`, $ = `${b}-menu`, h = te(() => u.mounted() ? de() : {
45
+ const b = `floe-dropdown-${Se += 1}`, C = `${b}-menu`, h = ne(() => u.mounted() ? se() : {
46
46
  host: null,
47
47
  boundaryHost: null,
48
48
  mountHost: null,
49
49
  mode: "global"
50
- }), c = {
51
- mount: () => ge(h()),
52
- isSurfaceMode: () => me(h()),
53
- boundaryRect: () => fe(h()),
54
- projectPosition: (o) => ce(o, h())
55
- }, P = () => {
50
+ }), m = {
51
+ mount: () => ve(h()),
52
+ isSurfaceMode: () => ge(h()),
53
+ boundaryRect: () => me(h()),
54
+ projectPosition: (o) => fe(o, h())
55
+ }, A = () => {
56
56
  if (!x || !w) return;
57
- const o = x.getBoundingClientRect(), r = w.getBoundingClientRect(), i = le(o, r, e.align ?? "start", c.boundaryRect());
58
- M(i);
57
+ const o = x.getBoundingClientRect(), r = w.getBoundingClientRect(), i = de(o, r, e.align ?? "start", m.boundaryRect());
58
+ $(i);
59
59
  };
60
- J(() => {
60
+ Q(() => {
61
61
  if (!u.mounted()) {
62
- M({
62
+ $({
63
63
  x: -9999,
64
64
  y: -9999
65
65
  });
66
66
  return;
67
67
  }
68
- if (!d()) return;
68
+ if (!f()) return;
69
69
  const o = (i) => {
70
- const t = i.target;
71
- t && typeof t.closest == "function" && t.closest(`[data-floe-dropdown="${b}"]`) || s(!1);
70
+ const n = i.target;
71
+ n && typeof n.closest == "function" && n.closest(`[data-floe-dropdown="${b}"]`) || c(!1);
72
72
  }, r = (i) => {
73
- i.key === "Escape" && (s(!1), requestAnimationFrame(() => x?.focus()));
73
+ i.key === "Escape" && (c(!1), requestAnimationFrame(() => x?.focus()));
74
74
  };
75
75
  document.addEventListener("pointerdown", o, !0), document.addEventListener("keydown", r), requestAnimationFrame(() => {
76
- P(), L(w, e.value ? "selected" : "first");
77
- }), ne(() => {
76
+ A(), R(w, e.value ? "selected" : "first");
77
+ }), re(() => {
78
78
  document.removeEventListener("pointerdown", o, !0), document.removeEventListener("keydown", r);
79
79
  });
80
80
  });
81
- const C = (o) => {
81
+ const L = (o) => {
82
82
  const r = e.onSelect;
83
- o.keepOpen || s(!1), re(() => r(o.id));
84
- }, D = (o, r = "first") => {
85
- e.disabled || (s(o), requestAnimationFrame(() => {
86
- P(), L(w, r);
83
+ o.keepOpen || c(!1), oe(() => r(o.id));
84
+ }, p = (o, r = "first") => {
85
+ e.disabled || (c(o), requestAnimationFrame(() => {
86
+ A(), R(w, r);
87
87
  }));
88
88
  }, I = (o) => {
89
89
  if (e.disabled) return;
90
- const r = pe(o.key, {
91
- open: d(),
90
+ const r = ke(o.key, {
91
+ open: f(),
92
92
  hasSelection: !!e.value
93
93
  });
94
94
  if (r) {
95
95
  if (o.preventDefault(), !r.nextOpen) {
96
- s(!1);
96
+ c(!1);
97
97
  return;
98
98
  }
99
- D(!0, r.focusMode ?? "first");
99
+ p(!0, r.focusMode ?? "first");
100
100
  }
101
101
  }, O = (o) => {
102
- const r = o.target, i = r?.closest('[role="menu"]'), t = r?.closest(ae);
102
+ const r = o.target, i = r?.closest('[role="menu"]'), n = r?.closest(le);
103
103
  switch (o.key) {
104
104
  case "ArrowDown":
105
- o.preventDefault(), z(i, t, 1);
105
+ o.preventDefault(), U(i, n, 1);
106
106
  return;
107
107
  case "ArrowUp":
108
- o.preventDefault(), z(i, t, -1);
108
+ o.preventDefault(), U(i, n, -1);
109
109
  return;
110
110
  case "Home":
111
- o.preventDefault(), L(i, "first");
111
+ o.preventDefault(), R(i, "first");
112
112
  return;
113
113
  case "End":
114
- o.preventDefault(), L(i, "last");
114
+ o.preventDefault(), R(i, "last");
115
115
  return;
116
116
  case "Tab":
117
- s(!1);
117
+ c(!1);
118
118
  return;
119
119
  default:
120
120
  return;
121
121
  }
122
122
  };
123
123
  return (() => {
124
- var o = ve(), r = o.firstChild;
124
+ var o = be(), r = o.firstChild;
125
125
  v(o, "data-floe-dropdown", b), r.$$keydown = I, r.$$click = () => {
126
126
  if (!e.disabled) {
127
- if (d()) {
128
- s(!1);
127
+ if (f()) {
128
+ c(!1);
129
129
  return;
130
130
  }
131
- D(!0, e.value ? "selected" : "first");
131
+ p(!0, e.value ? "selected" : "first");
132
132
  }
133
133
  };
134
134
  var i = x;
135
- return typeof i == "function" ? R(i, r) : x = r, v(r, "aria-controls", $), f(r, () => e.trigger), f(o, l(y, {
135
+ return typeof i == "function" ? E(i, r) : x = r, v(r, "aria-controls", C), g(r, () => e.trigger), g(o, l(y, {
136
136
  get when() {
137
137
  return u.mounted();
138
138
  },
139
139
  get children() {
140
- return l(U, {
140
+ return l(W, {
141
141
  get mount() {
142
- return c.mount();
142
+ return m.mount();
143
143
  },
144
144
  get children() {
145
- var t = j(), n = w;
146
- return typeof n == "function" ? R(n, t) : w = t, v(t, "data-floe-dropdown", b), W(t, G({
145
+ var n = j(), t = w;
146
+ return typeof t == "function" ? E(t, n) : w = n, v(n, "data-floe-dropdown", b), G(n, J({
147
147
  get class() {
148
- return p(c.isSurfaceMode() ? "absolute z-20 min-w-36 py-0.5" : "fixed z-50 min-w-36 py-0.5", "bg-popover text-popover-foreground", "rounded border border-border shadow-md", "floe-floating-presence floe-floating-menu");
148
+ return k(m.isSurfaceMode() ? "absolute z-20 min-w-36 py-0.5" : "fixed z-50 min-w-36 py-0.5", "bg-popover text-popover-foreground", "rounded border border-border shadow-md", "floe-floating-presence floe-floating-menu");
149
149
  },
150
150
  get "data-floating-presence"() {
151
151
  return u.state();
@@ -154,50 +154,50 @@ function Me(e) {
154
154
  return u.exiting() ? "true" : void 0;
155
155
  }
156
156
  }, () => ({
157
- [V]: c.isSurfaceMode() ? "true" : void 0
157
+ [X]: m.isSurfaceMode() ? "true" : void 0
158
158
  }), {
159
159
  get style() {
160
160
  return {
161
- left: `${c.projectPosition(F()).x}px`,
162
- top: `${c.projectPosition(F()).y}px`
161
+ left: `${m.projectPosition(F()).x}px`,
162
+ top: `${m.projectPosition(F()).y}px`
163
163
  };
164
164
  },
165
165
  role: "menu",
166
- id: $,
166
+ id: C,
167
167
  onKeyDown: O
168
- }), !1, !0), f(t, l(Q, {
168
+ }), !1, !0), g(n, l(V, {
169
169
  get each() {
170
170
  return e.items;
171
171
  },
172
- children: (g) => l(y, {
172
+ children: (d) => l(y, {
173
173
  get when() {
174
- return !g().separator;
174
+ return !d().separator;
175
175
  },
176
176
  get fallback() {
177
- return Y();
177
+ return Z();
178
178
  },
179
179
  get children() {
180
- return l(Z, {
180
+ return l(ee, {
181
181
  get item() {
182
- return g();
182
+ return d();
183
183
  },
184
184
  get selected() {
185
- return e.value === g().id;
185
+ return e.value === d().id;
186
186
  },
187
- onSelect: C,
188
- onCloseMenu: () => s(!1),
187
+ onSelect: L,
188
+ onCloseMenu: () => c(!1),
189
189
  dropdownId: b,
190
- portalLayout: c
190
+ portalLayout: m
191
191
  });
192
192
  }
193
193
  })
194
- })), t;
194
+ })), n;
195
195
  }
196
196
  });
197
197
  }
198
- }), null), _((t) => {
199
- var n = p("relative inline-block", e.class), g = p("cursor-pointer focus:outline-none focus-visible:ring-1 focus-visible:ring-ring", e.triggerClass, e.disabled && "pointer-events-none opacity-50"), m = e.disabled ? -1 : 0, A = d(), a = e.triggerAriaLabel, S = e.disabled ? "true" : void 0;
200
- return n !== t.e && E(o, t.e = n), g !== t.t && E(r, t.t = g), m !== t.a && v(r, "tabindex", t.a = m), A !== t.o && v(r, "aria-expanded", t.o = A), a !== t.i && v(r, "aria-label", t.i = a), S !== t.n && v(r, "aria-disabled", t.n = S), t;
198
+ }), null), T((n) => {
199
+ var t = k("relative inline-block", e.class), d = k("cursor-pointer focus:outline-none focus-visible:ring-1 focus-visible:ring-ring", e.triggerClass, e.disabled && "pointer-events-none opacity-50"), s = e.disabled ? -1 : 0, S = f(), a = e.triggerAriaLabel, M = e.disabled ? "true" : void 0;
200
+ return t !== n.e && D(o, n.e = t), d !== n.t && D(r, n.t = d), s !== n.a && v(r, "tabindex", n.a = s), S !== n.o && v(r, "aria-expanded", n.o = S), a !== n.i && v(r, "aria-label", n.i = a), M !== n.n && v(r, "aria-disabled", n.n = M), n;
201
201
  }, {
202
202
  e: void 0,
203
203
  t: void 0,
@@ -208,33 +208,33 @@ function Me(e) {
208
208
  }), o;
209
209
  })();
210
210
  }
211
- function Z(e) {
212
- const [d, s] = T(!1), u = () => e.item.children && e.item.children.length > 0, M = X({
213
- open: () => !!(d() && u()),
211
+ function ee(e) {
212
+ const [f, c] = _(!1), u = () => e.item.children && e.item.children.length > 0, $ = Y({
213
+ open: () => !!(f() && u()),
214
214
  exitDurationMs: 100
215
- }), [x, w] = T({
215
+ }), [x, w] = _({
216
216
  x: -9999,
217
217
  y: -9999
218
218
  });
219
- let b, $, h, c;
220
- const P = `floe-dropdown-item-${Se += 1}`;
221
- J(() => {
222
- M.mounted() || w({
219
+ let b, C, h, m;
220
+ const A = `floe-dropdown-item-${Me += 1}`;
221
+ Q(() => {
222
+ $.mounted() || w({
223
223
  x: -9999,
224
224
  y: -9999
225
225
  });
226
226
  });
227
- const C = () => {
227
+ const L = () => {
228
228
  if (!b || !h) return;
229
- const i = b.getBoundingClientRect(), t = h.getBoundingClientRect(), n = se(i, t, e.portalLayout.boundaryRect());
230
- w(n);
231
- }, D = () => {
232
- u() && (clearTimeout(c), c = setTimeout(() => {
233
- s(!0), requestAnimationFrame(C);
229
+ const i = b.getBoundingClientRect(), n = h.getBoundingClientRect(), t = ce(i, n, e.portalLayout.boundaryRect());
230
+ w(t);
231
+ }, p = () => {
232
+ u() && (clearTimeout(m), m = setTimeout(() => {
233
+ c(!0), requestAnimationFrame(L);
234
234
  }, 100));
235
235
  }, I = () => {
236
- u() && (clearTimeout(c), c = void 0, !e.item.keepOpen && (c = setTimeout(() => {
237
- s(!1);
236
+ u() && (clearTimeout(m), m = void 0, !e.item.keepOpen && (m = setTimeout(() => {
237
+ c(!1);
238
238
  }, 150)));
239
239
  }, O = (i) => {
240
240
  if (!e.item.disabled) {
@@ -242,101 +242,108 @@ function Z(e) {
242
242
  i.stopPropagation();
243
243
  return;
244
244
  }
245
- u() ? (s((t) => !t), requestAnimationFrame(C)) : e.item.content || e.onSelect(e.item);
245
+ u() ? (c((n) => !n), requestAnimationFrame(L)) : e.item.content || e.onSelect(e.item);
246
246
  }
247
247
  }, o = (i = "first") => {
248
- u() && (s(!0), requestAnimationFrame(() => {
249
- C(), L(h, i);
248
+ u() && (c(!0), requestAnimationFrame(() => {
249
+ L(), R(h, i);
250
250
  }));
251
251
  }, r = () => {
252
- s(!1), requestAnimationFrame(() => $?.focus());
252
+ c(!1), requestAnimationFrame(() => C?.focus());
253
253
  };
254
254
  return (() => {
255
- var i = he();
256
- i.addEventListener("mouseleave", I), i.addEventListener("mouseenter", D);
257
- var t = b;
258
- return typeof t == "function" ? R(t, i) : b = i, f(i, l(y, {
255
+ var i = we();
256
+ i.addEventListener("mouseleave", I), i.addEventListener("mouseenter", p);
257
+ var n = b;
258
+ return typeof n == "function" ? E(n, i) : b = i, g(i, l(y, {
259
259
  get when() {
260
260
  return e.item.content;
261
261
  },
262
262
  get children() {
263
- var n = j();
264
- return n.$$click = O, f(n, e.item.content), _(() => E(n, p("w-full px-2 py-1.5", e.item.disabled && "opacity-50 pointer-events-none"))), n;
263
+ var t = j();
264
+ return t.$$click = O, g(t, e.item.content), T((d) => {
265
+ var s = k("w-full px-2 py-1.5", e.item.tone === "danger" && "text-destructive", e.item.disabled && "opacity-50 pointer-events-none"), S = e.item.tone ?? "default";
266
+ return s !== d.e && D(t, d.e = s), S !== d.t && v(t, "data-tone", d.t = S), d;
267
+ }, {
268
+ e: void 0,
269
+ t: void 0
270
+ }), t;
265
271
  }
266
- }), null), f(i, l(y, {
272
+ }), null), g(i, l(y, {
267
273
  get when() {
268
274
  return !e.item.content;
269
275
  },
270
276
  get children() {
271
- var n = be(), g = n.firstChild, m = g.nextSibling;
272
- n.$$keydown = (a) => {
277
+ var t = he(), d = t.firstChild, s = d.nextSibling;
278
+ t.$$keydown = (a) => {
273
279
  e.item.disabled || u() && ((a.key === "ArrowRight" || a.key === "Enter" || a.key === " ") && (a.preventDefault(), o("first")), a.key === "ArrowLeft" && (a.preventDefault(), r()));
274
- }, n.$$click = O;
275
- var A = $;
276
- return typeof A == "function" ? R(A, n) : $ = n, v(n, "id", P), f(g, l(y, {
280
+ }, t.$$click = O;
281
+ var S = C;
282
+ return typeof S == "function" ? E(S, t) : C = t, v(t, "id", A), g(d, l(y, {
277
283
  get when() {
278
- return N(() => !!e.selected)() && !u();
284
+ return z(() => !!e.selected)() && !u();
279
285
  },
280
286
  get children() {
281
- return l(ie, {
287
+ return l(ue, {
282
288
  class: "w-3 h-3"
283
289
  });
284
290
  }
285
- })), f(n, l(y, {
291
+ })), g(t, l(y, {
286
292
  get when() {
287
293
  return e.item.icon;
288
294
  },
289
295
  keyed: !0,
290
296
  children: (a) => (() => {
291
- var S = we();
292
- return f(S, a), S;
297
+ var M = ye();
298
+ return g(M, a), M;
293
299
  })()
294
- }), m), f(m, () => e.item.label), f(n, l(y, {
300
+ }), s), g(s, () => e.item.label), g(t, l(y, {
295
301
  get when() {
296
302
  return u();
297
303
  },
298
304
  get children() {
299
- return l(ue, {
305
+ return l(ae, {
300
306
  class: "w-3 h-3 text-muted-foreground"
301
307
  });
302
308
  }
303
- }), null), _((a) => {
304
- var S = p("w-full flex items-center gap-1.5 px-2 py-1 text-xs", "transition-colors duration-75", "focus:outline-none focus:bg-accent", e.item.disabled ? "opacity-50 cursor-not-allowed" : "hover:bg-accent cursor-pointer"), q = e.item.disabled, B = u() ? "menu" : void 0, H = u() ? d() : void 0, K = e.selected && !u() ? "true" : void 0;
305
- return S !== a.e && E(n, a.e = S), q !== a.t && (n.disabled = a.t = q), B !== a.a && v(n, "aria-haspopup", a.a = B), H !== a.o && v(n, "aria-expanded", a.o = H), K !== a.i && v(n, "data-floe-selected", a.i = K), a;
309
+ }), null), T((a) => {
310
+ var M = k("w-full flex items-center gap-1.5 px-2 py-1 text-xs", "transition-colors duration-75", "focus:outline-none focus:bg-accent", e.item.tone === "danger" && "text-destructive", e.item.disabled ? "opacity-50 cursor-not-allowed" : "hover:bg-accent cursor-pointer"), q = e.item.disabled, B = u() ? "menu" : void 0, H = u() ? f() : void 0, K = e.selected && !u() ? "true" : void 0, N = e.item.tone ?? "default";
311
+ return M !== a.e && D(t, a.e = M), q !== a.t && (t.disabled = a.t = q), B !== a.a && v(t, "aria-haspopup", a.a = B), H !== a.o && v(t, "aria-expanded", a.o = H), K !== a.i && v(t, "data-floe-selected", a.i = K), N !== a.n && v(t, "data-tone", a.n = N), a;
306
312
  }, {
307
313
  e: void 0,
308
314
  t: void 0,
309
315
  a: void 0,
310
316
  o: void 0,
311
- i: void 0
312
- }), n;
317
+ i: void 0,
318
+ n: void 0
319
+ }), t;
313
320
  }
314
- }), null), f(i, l(y, {
321
+ }), null), g(i, l(y, {
315
322
  get when() {
316
- return N(() => !!M.mounted())() && u();
323
+ return z(() => !!$.mounted())() && u();
317
324
  },
318
325
  get children() {
319
- return l(U, {
326
+ return l(W, {
320
327
  get mount() {
321
328
  return e.portalLayout.mount();
322
329
  },
323
330
  get children() {
324
- var n = j(), g = h;
325
- return typeof g == "function" ? R(g, n) : h = n, W(n, G({
331
+ var t = j(), d = h;
332
+ return typeof d == "function" ? E(d, t) : h = t, G(t, J({
326
333
  get class() {
327
- return p(e.portalLayout.isSurfaceMode() ? "absolute z-20 min-w-36 py-0.5" : "fixed z-50 min-w-36 py-0.5", "bg-popover text-popover-foreground", "rounded border border-border shadow-md", "floe-floating-presence floe-floating-menu floe-floating-submenu");
334
+ return k(e.portalLayout.isSurfaceMode() ? "absolute z-20 min-w-36 py-0.5" : "fixed z-50 min-w-36 py-0.5", "bg-popover text-popover-foreground", "rounded border border-border shadow-md", "floe-floating-presence floe-floating-menu floe-floating-submenu");
328
335
  },
329
336
  get "data-floe-dropdown"() {
330
337
  return e.dropdownId;
331
338
  },
332
339
  get "data-floating-presence"() {
333
- return M.state();
340
+ return $.state();
334
341
  },
335
342
  get "aria-hidden"() {
336
- return M.exiting() ? "true" : void 0;
343
+ return $.exiting() ? "true" : void 0;
337
344
  }
338
345
  }, () => ({
339
- [V]: e.portalLayout.isSurfaceMode() ? "true" : void 0
346
+ [X]: e.portalLayout.isSurfaceMode() ? "true" : void 0
340
347
  }), {
341
348
  get style() {
342
349
  return {
@@ -345,29 +352,29 @@ function Z(e) {
345
352
  };
346
353
  },
347
354
  role: "menu",
348
- "aria-labelledby": P,
355
+ "aria-labelledby": A,
349
356
  onMouseEnter: () => {
350
- clearTimeout(c);
357
+ clearTimeout(m);
351
358
  },
352
359
  onMouseLeave: I,
353
- onKeyDown: (m) => {
354
- m.key !== "ArrowLeft" && m.key !== "Escape" || (m.preventDefault(), m.stopPropagation(), r());
360
+ onKeyDown: (s) => {
361
+ s.key !== "ArrowLeft" && s.key !== "Escape" || (s.preventDefault(), s.stopPropagation(), r());
355
362
  }
356
- }), !1, !0), f(n, l(Q, {
363
+ }), !1, !0), g(t, l(V, {
357
364
  get each() {
358
365
  return e.item.children;
359
366
  },
360
- children: (m) => l(y, {
367
+ children: (s) => l(y, {
361
368
  get when() {
362
- return !m().separator;
369
+ return !s().separator;
363
370
  },
364
371
  get fallback() {
365
- return Y();
372
+ return Z();
366
373
  },
367
374
  get children() {
368
- return l(Z, {
375
+ return l(ee, {
369
376
  get item() {
370
- return m();
377
+ return s();
371
378
  },
372
379
  selected: !1,
373
380
  get onSelect() {
@@ -385,32 +392,32 @@ function Z(e) {
385
392
  });
386
393
  }
387
394
  })
388
- })), n;
395
+ })), t;
389
396
  }
390
397
  });
391
398
  }
392
399
  }), null), i;
393
400
  })();
394
401
  }
395
- function Ie(e) {
396
- const d = () => e.options.find((u) => u.value === e.value), s = () => e.options.map((u) => ({
402
+ function Oe(e) {
403
+ const f = () => e.options.find((u) => u.value === e.value), c = () => e.options.map((u) => ({
397
404
  id: u.value,
398
405
  label: u.label
399
406
  }));
400
- return l(Me, {
407
+ return l($e, {
401
408
  get triggerClass() {
402
- return p("flex items-center justify-between gap-2 h-8 px-2.5 w-full", "rounded border border-input bg-background text-xs shadow-sm", "transition-colors duration-100", e.class);
409
+ return k("flex items-center justify-between gap-2 h-8 px-2.5 w-full", "rounded border border-input bg-background text-xs shadow-sm", "transition-colors duration-100", e.class);
403
410
  },
404
411
  get trigger() {
405
412
  return [(() => {
406
- var u = ye();
407
- return f(u, () => d()?.label ?? e.placeholder ?? "Select..."), _(() => E(u, p("truncate", !d() && "text-muted-foreground"))), u;
408
- })(), l(oe, {
413
+ var u = xe();
414
+ return g(u, () => f()?.label ?? e.placeholder ?? "Select..."), T(() => D(u, k("truncate", !f() && "text-muted-foreground"))), u;
415
+ })(), l(ie, {
409
416
  class: "w-3.5 h-3.5 text-muted-foreground"
410
417
  })];
411
418
  },
412
419
  get items() {
413
- return s();
420
+ return c();
414
421
  },
415
422
  get value() {
416
423
  return e.value;
@@ -423,9 +430,9 @@ function Ie(e) {
423
430
  }
424
431
  });
425
432
  }
426
- ee(["click", "keydown"]);
433
+ te(["click", "keydown"]);
427
434
  export {
428
- Me as Dropdown,
429
- Ie as Select,
430
- pe as resolveDropdownTriggerKeyAction
435
+ $e as Dropdown,
436
+ Oe as Select,
437
+ ke as resolveDropdownTriggerKeyAction
431
438
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@floegence/floe-webapp-core",
3
- "version": "0.46.6",
3
+ "version": "0.46.7",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",