@floegence/floe-webapp-core 0.50.5 → 0.51.0

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.
Files changed (44) hide show
  1. package/dist/components/chat/input/ChatInput.js +8 -8
  2. package/dist/components/ui/Button.js +16 -13
  3. package/dist/components/ui/Card.js +125 -119
  4. package/dist/components/ui/Checkbox.js +178 -132
  5. package/dist/components/ui/CommandPalette.js +10 -10
  6. package/dist/components/ui/Dialog.js +1 -1
  7. package/dist/components/ui/DirectoryInput.js +5 -5
  8. package/dist/components/ui/Dropdown.d.ts +2 -0
  9. package/dist/components/ui/Dropdown.js +119 -114
  10. package/dist/components/ui/FloatingWindow.js +211 -199
  11. package/dist/components/ui/HighlightBlock.js +8 -8
  12. package/dist/components/ui/Input.js +40 -40
  13. package/dist/components/ui/Pagination.js +90 -88
  14. package/dist/components/ui/ProcessingIndicator.js +1 -1
  15. package/dist/components/ui/Progress.js +99 -88
  16. package/dist/components/ui/QuoteBlock.js +9 -9
  17. package/dist/components/ui/Radio.js +151 -127
  18. package/dist/components/ui/SegmentedControl.js +26 -25
  19. package/dist/components/ui/Stepper.js +114 -112
  20. package/dist/components/ui/Switch.js +34 -33
  21. package/dist/components/ui/Tabs.js +153 -150
  22. package/dist/components/ui/Tag.js +24 -21
  23. package/dist/components/ui/Tooltip.js +10 -10
  24. package/dist/components/ui/floatingPresence.js +40 -30
  25. package/dist/components/workbench/WorkbenchHud.js +9 -9
  26. package/dist/components/workbench/WorkbenchLockButton.js +4 -4
  27. package/dist/components/workbench/WorkbenchWidget.js +46 -43
  28. package/dist/context/FloeConfigContext.d.ts +5 -1
  29. package/dist/context/FloeConfigContext.js +10 -9
  30. package/dist/context/ThemeContext.d.ts +3 -1
  31. package/dist/context/ThemeContext.js +78 -71
  32. package/dist/floe.css +2 -37
  33. package/dist/full.js +839 -836
  34. package/dist/index.js +150 -147
  35. package/dist/input-focus.css +36 -0
  36. package/dist/styles/themes/index.d.ts +3 -0
  37. package/dist/styles/themes/index.js +40 -31
  38. package/dist/styles/tokens.d.ts +36 -0
  39. package/dist/styles/tokens.js +12 -5
  40. package/dist/styles.css +1 -1
  41. package/dist/surface.css +467 -0
  42. package/dist/themes.d.ts +1 -1
  43. package/dist/ui.css +9 -0
  44. package/package.json +3 -2
@@ -1,13 +1,13 @@
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";
1
+ import { setAttribute as m, insert as v, createComponent as l, Portal as W, use as I, spread as G, mergeProps as J, effect as F, className as O, template as $, memo as z, delegateEvents as te } from "solid-js/web";
2
+ import { createSignal as j, createMemo as ne, createEffect as Q, onCleanup as re, Show as y, Index as V } from "solid-js";
3
3
  import { cn as k } from "../../utils/cn.js";
4
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";
5
+ import { ChevronDown as ie, Check as ae, ChevronRight as ue } from "../icons/index.js";
6
+ import { focusMenuItem as D, MENU_ITEM_SELECTOR as le, moveMenuFocus as U, calculateMenuPosition as de, calculateSubmenuPosition as ce } from "./menuUtils.js";
7
7
  import { LOCAL_INTERACTION_SURFACE_ATTR as X } from "./localInteractionSurface.js";
8
8
  import { createFloatingPresence as Y } from "./floatingPresence.js";
9
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>");
10
+ var B = /* @__PURE__ */ $("<div>"), he = /* @__PURE__ */ $("<div><div role=button aria-haspopup=menu data-floe-dropdown-trigger>"), Z = /* @__PURE__ */ $('<div class="my-1 h-px bg-border"role=separator>'), be = /* @__PURE__ */ $('<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__ */ $("<div class=relative>"), ye = /* @__PURE__ */ $('<span class="w-3.5 h-3.5 flex items-center justify-center">'), xe = /* @__PURE__ */ $("<span>");
11
11
  let Se = 0, Me = 0;
12
12
  function ke(e, f) {
13
13
  switch (e) {
@@ -33,33 +33,33 @@ function ke(e, f) {
33
33
  return null;
34
34
  }
35
35
  }
36
- function $e(e) {
37
- const [f, c] = _(!1), u = Y({
36
+ function Pe(e) {
37
+ const [f, c] = j(!1), a = Y({
38
38
  open: f,
39
39
  exitDurationMs: 100
40
- }), [F, $] = _({
40
+ }), [q, P] = j({
41
41
  x: -9999,
42
42
  y: -9999
43
43
  });
44
44
  let x, w;
45
- const b = `floe-dropdown-${Se += 1}`, C = `${b}-menu`, h = ne(() => u.mounted() ? se() : {
45
+ const h = `floe-dropdown-${Se += 1}`, C = `${h}-menu`, b = ne(() => a.mounted() ? se() : {
46
46
  host: null,
47
47
  boundaryHost: null,
48
48
  mountHost: null,
49
49
  mode: "global"
50
- }), m = {
51
- mount: () => ve(h()),
52
- isSurfaceMode: () => ge(h()),
53
- boundaryRect: () => me(h()),
54
- projectPosition: (o) => fe(o, h())
50
+ }), g = {
51
+ mount: () => ve(b()),
52
+ isSurfaceMode: () => ge(b()),
53
+ boundaryRect: () => me(b()),
54
+ projectPosition: (o) => fe(o, b())
55
55
  }, A = () => {
56
56
  if (!x || !w) return;
57
- const o = x.getBoundingClientRect(), r = w.getBoundingClientRect(), i = de(o, r, e.align ?? "start", m.boundaryRect());
58
- $(i);
57
+ const o = x.getBoundingClientRect(), r = w.getBoundingClientRect(), i = de(o, r, e.align ?? "start", g.boundaryRect());
58
+ P(i);
59
59
  };
60
60
  Q(() => {
61
- if (!u.mounted()) {
62
- $({
61
+ if (!a.mounted()) {
62
+ P({
63
63
  x: -9999,
64
64
  y: -9999
65
65
  });
@@ -67,13 +67,13 @@ function $e(e) {
67
67
  }
68
68
  if (!f()) return;
69
69
  const o = (i) => {
70
- const n = i.target;
71
- n && typeof n.closest == "function" && n.closest(`[data-floe-dropdown="${b}"]`) || c(!1);
70
+ const t = i.target;
71
+ t && typeof t.closest == "function" && t.closest(`[data-floe-dropdown="${h}"]`) || c(!1);
72
72
  }, r = (i) => {
73
73
  i.key === "Escape" && (c(!1), requestAnimationFrame(() => x?.focus()));
74
74
  };
75
75
  document.addEventListener("pointerdown", o, !0), document.addEventListener("keydown", r), requestAnimationFrame(() => {
76
- A(), R(w, e.value ? "selected" : "first");
76
+ A(), D(w, e.value ? "selected" : "first");
77
77
  }), re(() => {
78
78
  document.removeEventListener("pointerdown", o, !0), document.removeEventListener("keydown", r);
79
79
  });
@@ -81,11 +81,11 @@ function $e(e) {
81
81
  const L = (o) => {
82
82
  const r = e.onSelect;
83
83
  o.keepOpen || c(!1), oe(() => r(o.id));
84
- }, p = (o, r = "first") => {
84
+ }, T = (o, r = "first") => {
85
85
  e.disabled || (c(o), requestAnimationFrame(() => {
86
- A(), R(w, r);
86
+ A(), D(w, r);
87
87
  }));
88
- }, I = (o) => {
88
+ }, p = (o) => {
89
89
  if (e.disabled) return;
90
90
  const r = ke(o.key, {
91
91
  open: f(),
@@ -96,22 +96,22 @@ function $e(e) {
96
96
  c(!1);
97
97
  return;
98
98
  }
99
- p(!0, r.focusMode ?? "first");
99
+ T(!0, r.focusMode ?? "first");
100
100
  }
101
- }, O = (o) => {
102
- const r = o.target, i = r?.closest('[role="menu"]'), n = r?.closest(le);
101
+ }, _ = (o) => {
102
+ const r = o.target, i = r?.closest('[role="menu"]'), t = r?.closest(le);
103
103
  switch (o.key) {
104
104
  case "ArrowDown":
105
- o.preventDefault(), U(i, n, 1);
105
+ o.preventDefault(), U(i, t, 1);
106
106
  return;
107
107
  case "ArrowUp":
108
- o.preventDefault(), U(i, n, -1);
108
+ o.preventDefault(), U(i, t, -1);
109
109
  return;
110
110
  case "Home":
111
- o.preventDefault(), R(i, "first");
111
+ o.preventDefault(), D(i, "first");
112
112
  return;
113
113
  case "End":
114
- o.preventDefault(), R(i, "last");
114
+ o.preventDefault(), D(i, "last");
115
115
  return;
116
116
  case "Tab":
117
117
  c(!1);
@@ -121,51 +121,52 @@ function $e(e) {
121
121
  }
122
122
  };
123
123
  return (() => {
124
- var o = be(), r = o.firstChild;
125
- v(o, "data-floe-dropdown", b), r.$$keydown = I, r.$$click = () => {
124
+ var o = he(), r = o.firstChild;
125
+ m(o, "data-floe-dropdown", h), r.$$keydown = p, r.$$click = () => {
126
126
  if (!e.disabled) {
127
127
  if (f()) {
128
128
  c(!1);
129
129
  return;
130
130
  }
131
- p(!0, e.value ? "selected" : "first");
131
+ T(!0, e.value ? "selected" : "first");
132
132
  }
133
133
  };
134
134
  var i = x;
135
- return typeof i == "function" ? E(i, r) : x = r, v(r, "aria-controls", C), g(r, () => e.trigger), g(o, l(y, {
135
+ return typeof i == "function" ? I(i, r) : x = r, m(r, "aria-controls", C), v(r, () => e.trigger), v(o, l(y, {
136
136
  get when() {
137
- return u.mounted();
137
+ return a.mounted();
138
138
  },
139
139
  get children() {
140
140
  return l(W, {
141
141
  get mount() {
142
- return m.mount();
142
+ return g.mount();
143
143
  },
144
144
  get children() {
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({
145
+ var t = B(), n = w;
146
+ return typeof n == "function" ? I(n, t) : w = t, m(t, "data-floe-dropdown", h), G(t, J({
147
147
  get class() {
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");
148
+ return k(g.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
- return u.state();
151
+ return a.state();
152
152
  },
153
153
  get "aria-hidden"() {
154
- return u.exiting() ? "true" : void 0;
154
+ return a.exiting() ? "true" : void 0;
155
155
  }
156
156
  }, () => ({
157
- [X]: m.isSurfaceMode() ? "true" : void 0
157
+ [X]: g.isSurfaceMode() ? "true" : void 0
158
158
  }), {
159
159
  get style() {
160
160
  return {
161
- left: `${m.projectPosition(F()).x}px`,
162
- top: `${m.projectPosition(F()).y}px`
161
+ left: `${g.projectPosition(q()).x}px`,
162
+ top: `${g.projectPosition(q()).y}px`
163
163
  };
164
164
  },
165
165
  role: "menu",
166
+ "data-floe-surface": "floating",
166
167
  id: C,
167
- onKeyDown: O
168
- }), !1, !0), g(n, l(V, {
168
+ onKeyDown: _
169
+ }), !1, !0), v(t, l(V, {
169
170
  get each() {
170
171
  return e.items;
171
172
  },
@@ -186,129 +187,131 @@ function $e(e) {
186
187
  },
187
188
  onSelect: L,
188
189
  onCloseMenu: () => c(!1),
189
- dropdownId: b,
190
- portalLayout: m
190
+ dropdownId: h,
191
+ portalLayout: g
191
192
  });
192
193
  }
193
194
  })
194
- })), n;
195
+ })), t;
195
196
  }
196
197
  });
197
198
  }
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;
199
+ }), null), F((t) => {
200
+ var n = k("relative inline-block", e.class), d = k("cursor-pointer", e.triggerClass, e.disabled && "pointer-events-none opacity-50"), s = e.disabled ? -1 : 0, S = f(), u = e.triggerAriaLabel, M = e.disabled ? "true" : void 0, R = e.triggerInputSurface ? "true" : void 0, E = e.triggerInputSurface ? "inset" : void 0;
201
+ return n !== t.e && O(o, t.e = n), d !== t.t && O(r, t.t = d), s !== t.a && m(r, "tabindex", t.a = s), S !== t.o && m(r, "aria-expanded", t.o = S), u !== t.i && m(r, "aria-label", t.i = u), M !== t.n && m(r, "aria-disabled", t.n = M), R !== t.s && m(r, "data-floe-input-surface", t.s = R), E !== t.h && m(r, "data-floe-surface", t.h = E), t;
201
202
  }, {
202
203
  e: void 0,
203
204
  t: void 0,
204
205
  a: void 0,
205
206
  o: void 0,
206
207
  i: void 0,
207
- n: void 0
208
+ n: void 0,
209
+ s: void 0,
210
+ h: void 0
208
211
  }), o;
209
212
  })();
210
213
  }
211
214
  function ee(e) {
212
- const [f, c] = _(!1), u = () => e.item.children && e.item.children.length > 0, $ = Y({
213
- open: () => !!(f() && u()),
215
+ const [f, c] = j(!1), a = () => e.item.children && e.item.children.length > 0, P = Y({
216
+ open: () => !!(f() && a()),
214
217
  exitDurationMs: 100
215
- }), [x, w] = _({
218
+ }), [x, w] = j({
216
219
  x: -9999,
217
220
  y: -9999
218
221
  });
219
- let b, C, h, m;
222
+ let h, C, b, g;
220
223
  const A = `floe-dropdown-item-${Me += 1}`;
221
224
  Q(() => {
222
- $.mounted() || w({
225
+ P.mounted() || w({
223
226
  x: -9999,
224
227
  y: -9999
225
228
  });
226
229
  });
227
230
  const L = () => {
228
- if (!b || !h) return;
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(() => {
231
+ if (!h || !b) return;
232
+ const i = h.getBoundingClientRect(), t = b.getBoundingClientRect(), n = ce(i, t, e.portalLayout.boundaryRect());
233
+ w(n);
234
+ }, T = () => {
235
+ a() && (clearTimeout(g), g = setTimeout(() => {
233
236
  c(!0), requestAnimationFrame(L);
234
237
  }, 100));
235
- }, I = () => {
236
- u() && (clearTimeout(m), m = void 0, !e.item.keepOpen && (m = setTimeout(() => {
238
+ }, p = () => {
239
+ a() && (clearTimeout(g), g = void 0, !e.item.keepOpen && (g = setTimeout(() => {
237
240
  c(!1);
238
241
  }, 150)));
239
- }, O = (i) => {
242
+ }, _ = (i) => {
240
243
  if (!e.item.disabled) {
241
244
  if (e.item.content && e.item.keepOpen) {
242
245
  i.stopPropagation();
243
246
  return;
244
247
  }
245
- u() ? (c((n) => !n), requestAnimationFrame(L)) : e.item.content || e.onSelect(e.item);
248
+ a() ? (c((t) => !t), requestAnimationFrame(L)) : e.item.content || e.onSelect(e.item);
246
249
  }
247
250
  }, o = (i = "first") => {
248
- u() && (c(!0), requestAnimationFrame(() => {
249
- L(), R(h, i);
251
+ a() && (c(!0), requestAnimationFrame(() => {
252
+ L(), D(b, i);
250
253
  }));
251
254
  }, r = () => {
252
255
  c(!1), requestAnimationFrame(() => C?.focus());
253
256
  };
254
257
  return (() => {
255
258
  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
+ i.addEventListener("mouseleave", p), i.addEventListener("mouseenter", T);
260
+ var t = h;
261
+ return typeof t == "function" ? I(t, i) : h = i, v(i, l(y, {
259
262
  get when() {
260
263
  return e.item.content;
261
264
  },
262
265
  get children() {
263
- var t = j();
264
- return t.$$click = O, g(t, e.item.content), T((d) => {
266
+ var n = B();
267
+ return n.$$click = _, v(n, e.item.content), F((d) => {
265
268
  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;
269
+ return s !== d.e && O(n, d.e = s), S !== d.t && m(n, "data-tone", d.t = S), d;
267
270
  }, {
268
271
  e: void 0,
269
272
  t: void 0
270
- }), t;
273
+ }), n;
271
274
  }
272
- }), null), g(i, l(y, {
275
+ }), null), v(i, l(y, {
273
276
  get when() {
274
277
  return !e.item.content;
275
278
  },
276
279
  get children() {
277
- var t = he(), d = t.firstChild, s = d.nextSibling;
278
- t.$$keydown = (a) => {
279
- e.item.disabled || u() && ((a.key === "ArrowRight" || a.key === "Enter" || a.key === " ") && (a.preventDefault(), o("first")), a.key === "ArrowLeft" && (a.preventDefault(), r()));
280
- }, t.$$click = O;
280
+ var n = be(), d = n.firstChild, s = d.nextSibling;
281
+ n.$$keydown = (u) => {
282
+ e.item.disabled || a() && ((u.key === "ArrowRight" || u.key === "Enter" || u.key === " ") && (u.preventDefault(), o("first")), u.key === "ArrowLeft" && (u.preventDefault(), r()));
283
+ }, n.$$click = _;
281
284
  var S = C;
282
- return typeof S == "function" ? E(S, t) : C = t, v(t, "id", A), g(d, l(y, {
285
+ return typeof S == "function" ? I(S, n) : C = n, m(n, "id", A), v(d, l(y, {
283
286
  get when() {
284
- return z(() => !!e.selected)() && !u();
287
+ return z(() => !!e.selected)() && !a();
285
288
  },
286
289
  get children() {
287
- return l(ue, {
290
+ return l(ae, {
288
291
  class: "w-3 h-3"
289
292
  });
290
293
  }
291
- })), g(t, l(y, {
294
+ })), v(n, l(y, {
292
295
  get when() {
293
296
  return e.item.icon;
294
297
  },
295
298
  keyed: !0,
296
- children: (a) => (() => {
299
+ children: (u) => (() => {
297
300
  var M = ye();
298
- return g(M, a), M;
301
+ return v(M, u), M;
299
302
  })()
300
- }), s), g(s, () => e.item.label), g(t, l(y, {
303
+ }), s), v(s, () => e.item.label), v(n, l(y, {
301
304
  get when() {
302
- return u();
305
+ return a();
303
306
  },
304
307
  get children() {
305
- return l(ae, {
308
+ return l(ue, {
306
309
  class: "w-3 h-3 text-muted-foreground"
307
310
  });
308
311
  }
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;
312
+ }), null), F((u) => {
313
+ 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"), R = e.item.disabled, E = a() ? "menu" : void 0, H = a() ? f() : void 0, K = e.selected && !a() ? "true" : void 0, N = e.item.tone ?? "default";
314
+ return M !== u.e && O(n, u.e = M), R !== u.t && (n.disabled = u.t = R), E !== u.a && m(n, "aria-haspopup", u.a = E), H !== u.o && m(n, "aria-expanded", u.o = H), K !== u.i && m(n, "data-floe-selected", u.i = K), N !== u.n && m(n, "data-tone", u.n = N), u;
312
315
  }, {
313
316
  e: void 0,
314
317
  t: void 0,
@@ -316,11 +319,11 @@ function ee(e) {
316
319
  o: void 0,
317
320
  i: void 0,
318
321
  n: void 0
319
- }), t;
322
+ }), n;
320
323
  }
321
- }), null), g(i, l(y, {
324
+ }), null), v(i, l(y, {
322
325
  get when() {
323
- return z(() => !!$.mounted())() && u();
326
+ return z(() => !!P.mounted())() && a();
324
327
  },
325
328
  get children() {
326
329
  return l(W, {
@@ -328,8 +331,8 @@ function ee(e) {
328
331
  return e.portalLayout.mount();
329
332
  },
330
333
  get children() {
331
- var t = j(), d = h;
332
- return typeof d == "function" ? E(d, t) : h = t, G(t, J({
334
+ var n = B(), d = b;
335
+ return typeof d == "function" ? I(d, n) : b = n, G(n, J({
333
336
  get class() {
334
337
  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");
335
338
  },
@@ -337,10 +340,10 @@ function ee(e) {
337
340
  return e.dropdownId;
338
341
  },
339
342
  get "data-floating-presence"() {
340
- return $.state();
343
+ return P.state();
341
344
  },
342
345
  get "aria-hidden"() {
343
- return $.exiting() ? "true" : void 0;
346
+ return P.exiting() ? "true" : void 0;
344
347
  }
345
348
  }, () => ({
346
349
  [X]: e.portalLayout.isSurfaceMode() ? "true" : void 0
@@ -352,15 +355,16 @@ function ee(e) {
352
355
  };
353
356
  },
354
357
  role: "menu",
358
+ "data-floe-surface": "floating",
355
359
  "aria-labelledby": A,
356
360
  onMouseEnter: () => {
357
- clearTimeout(m);
361
+ clearTimeout(g);
358
362
  },
359
- onMouseLeave: I,
363
+ onMouseLeave: p,
360
364
  onKeyDown: (s) => {
361
365
  s.key !== "ArrowLeft" && s.key !== "Escape" || (s.preventDefault(), s.stopPropagation(), r());
362
366
  }
363
- }), !1, !0), g(t, l(V, {
367
+ }), !1, !0), v(n, l(V, {
364
368
  get each() {
365
369
  return e.item.children;
366
370
  },
@@ -392,26 +396,27 @@ function ee(e) {
392
396
  });
393
397
  }
394
398
  })
395
- })), t;
399
+ })), n;
396
400
  }
397
401
  });
398
402
  }
399
403
  }), null), i;
400
404
  })();
401
405
  }
402
- function Oe(e) {
403
- const f = () => e.options.find((u) => u.value === e.value), c = () => e.options.map((u) => ({
404
- id: u.value,
405
- label: u.label
406
+ function Te(e) {
407
+ const f = () => e.options.find((a) => a.value === e.value), c = () => e.options.map((a) => ({
408
+ id: a.value,
409
+ label: a.label
406
410
  }));
407
- return l($e, {
411
+ return l(Pe, {
412
+ triggerInputSurface: !0,
408
413
  get triggerClass() {
409
414
  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);
410
415
  },
411
416
  get trigger() {
412
417
  return [(() => {
413
- var u = xe();
414
- return g(u, () => f()?.label ?? e.placeholder ?? "Select..."), T(() => D(u, k("truncate", !f() && "text-muted-foreground"))), u;
418
+ var a = xe();
419
+ return v(a, () => f()?.label ?? e.placeholder ?? "Select..."), F(() => O(a, k("truncate", !f() && "text-muted-foreground"))), a;
415
420
  })(), l(ie, {
416
421
  class: "w-3.5 h-3.5 text-muted-foreground"
417
422
  })];
@@ -432,7 +437,7 @@ function Oe(e) {
432
437
  }
433
438
  te(["click", "keydown"]);
434
439
  export {
435
- $e as Dropdown,
436
- Oe as Select,
440
+ Pe as Dropdown,
441
+ Te as Select,
437
442
  ke as resolveDropdownTriggerKeyAction
438
443
  };