@floegence/floe-webapp-core 0.35.21 → 0.35.23

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 (33) hide show
  1. package/dist/chat.css +33 -7
  2. package/dist/components/chat/blocks/FileBlock.js +42 -27
  3. package/dist/components/chat/blocks/ToolCallBlock.js +150 -149
  4. package/dist/components/file-browser/Breadcrumb.js +73 -72
  5. package/dist/components/file-browser/DragPreview.d.ts +2 -2
  6. package/dist/components/file-browser/DragPreview.js +15 -15
  7. package/dist/components/file-browser/FileBrowser.js +13 -13
  8. package/dist/components/file-browser/index.d.ts +1 -0
  9. package/dist/components/layout/ActivityBar.d.ts +1 -0
  10. package/dist/components/layout/ActivityBar.js +51 -45
  11. package/dist/components/layout/MobileTabBar.d.ts +1 -0
  12. package/dist/components/layout/MobileTabBar.js +109 -65
  13. package/dist/components/layout/Shell.js +190 -158
  14. package/dist/components/layout/Sidebar.d.ts +1 -0
  15. package/dist/components/layout/Sidebar.js +33 -31
  16. package/dist/components/layout/SidebarPane.d.ts +1 -0
  17. package/dist/components/layout/SidebarPane.js +40 -37
  18. package/dist/components/layout/TopBar.d.ts +1 -0
  19. package/dist/components/layout/TopBar.js +23 -22
  20. package/dist/components/ui/Dropdown.d.ts +13 -0
  21. package/dist/components/ui/Dropdown.js +263 -145
  22. package/dist/components/ui/Tabs.d.ts +4 -0
  23. package/dist/components/ui/Tabs.js +207 -149
  24. package/dist/context/FloeConfigContext.d.ts +17 -0
  25. package/dist/context/FloeConfigContext.js +34 -25
  26. package/dist/context/NotificationContext.js +76 -69
  27. package/dist/file-browser.js +19 -17
  28. package/dist/full.js +302 -300
  29. package/dist/styles/tokens.d.ts +4 -4
  30. package/dist/styles/tokens.js +55 -14
  31. package/dist/styles.css +1 -1
  32. package/dist/themes/light.css +2 -2
  33. package/package.json +1 -1
@@ -1,237 +1,354 @@
1
- import { setAttribute as O, insert as m, createComponent as d, Portal as B, effect as E, className as S, setStyleProperty as _, template as C, memo as A, use as I, delegateEvents as D } from "solid-js/web";
2
- import { createSignal as L, createEffect as F, onCleanup as N, Show as y, Index as W } from "solid-js";
3
- import { cn as p } from "../../utils/cn.js";
4
- import { deferNonBlocking as z } from "../../utils/defer.js";
5
- import { ChevronDown as G, Check as V, ChevronRight as J } from "../icons/index.js";
6
- var q = /* @__PURE__ */ C("<div role=menu>"), K = /* @__PURE__ */ C("<div><div class=cursor-pointer>"), H = /* @__PURE__ */ C('<div class="my-1 h-px bg-border"role=separator>'), Q = /* @__PURE__ */ C("<div>"), U = /* @__PURE__ */ C('<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">'), X = /* @__PURE__ */ C("<div class=relative>"), Y = /* @__PURE__ */ C('<span class="w-3.5 h-3.5 flex items-center justify-center">'), Z = /* @__PURE__ */ C("<button type=button><span>");
7
- const h = 8;
8
- let R = 0;
9
- function ee(e, r, c) {
10
- const i = window.innerWidth, a = window.innerHeight;
11
- let n;
12
- switch (c) {
1
+ import { setAttribute as b, insert as w, createComponent as m, Portal as U, use as P, effect as D, className as I, setStyleProperty as F, template as C, memo as j, delegateEvents as Y } from "solid-js/web";
2
+ import { createSignal as _, createEffect as Z, onCleanup as R, Show as S, Index as z } from "solid-js";
3
+ import { cn as A } from "../../utils/cn.js";
4
+ import { deferNonBlocking as ee } from "../../utils/defer.js";
5
+ import { ChevronDown as te, Check as ne, ChevronRight as re } from "../icons/index.js";
6
+ var G = /* @__PURE__ */ C("<div role=menu>"), ie = /* @__PURE__ */ C("<div><div role=button aria-haspopup=menu data-floe-dropdown-trigger>"), V = /* @__PURE__ */ C('<div class="my-1 h-px bg-border"role=separator>'), oe = /* @__PURE__ */ C("<div>"), le = /* @__PURE__ */ C('<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">'), ae = /* @__PURE__ */ C("<div class=relative>"), ue = /* @__PURE__ */ C('<span class="w-3.5 h-3.5 flex items-center justify-center">'), de = /* @__PURE__ */ C("<span>");
7
+ const h = 8, J = '[role="menuitem"]:not([disabled]):not([aria-disabled="true"])';
8
+ let se = 0, ce = 0;
9
+ function fe(e, r) {
10
+ switch (e) {
11
+ case "Enter":
12
+ case " ":
13
+ return r.open ? {
14
+ nextOpen: !1
15
+ } : {
16
+ nextOpen: !0,
17
+ focusMode: r.hasSelection ? "selected" : "first"
18
+ };
19
+ case "ArrowDown":
20
+ return {
21
+ nextOpen: !0,
22
+ focusMode: r.hasSelection ? "selected" : "first"
23
+ };
24
+ case "ArrowUp":
25
+ return {
26
+ nextOpen: !0,
27
+ focusMode: "last"
28
+ };
29
+ default:
30
+ return null;
31
+ }
32
+ }
33
+ function me(e, r, i) {
34
+ return e <= 0 ? null : r < 0 ? i > 0 ? 0 : e - 1 : (r + i + e) % e;
35
+ }
36
+ function ve(e, r, i) {
37
+ const o = window.innerWidth, f = window.innerHeight;
38
+ let a;
39
+ switch (i) {
13
40
  case "center":
14
- n = e.left + e.width / 2 - r.width / 2;
41
+ a = e.left + e.width / 2 - r.width / 2;
15
42
  break;
16
43
  case "end":
17
- n = e.right - r.width;
44
+ a = e.right - r.width;
18
45
  break;
19
46
  default:
20
- n = e.left;
47
+ a = e.left;
21
48
  }
22
- let l = e.bottom + 4;
23
- if (n + r.width > i - h && (n = i - r.width - h), n = Math.max(h, n), l + r.height > a - h) {
24
- const s = e.top - h, g = a - e.bottom - h;
25
- s > g && s >= r.height ? l = e.top - r.height - 4 : l = a - r.height - h;
49
+ let c = e.bottom + 4;
50
+ if (a + r.width > o - h && (a = o - r.width - h), a = Math.max(h, a), c + r.height > f - h) {
51
+ const g = e.top - h, k = f - e.bottom - h;
52
+ g > k && g >= r.height ? c = e.top - r.height - 4 : c = f - r.height - h;
26
53
  }
27
- return l = Math.max(h, l), {
28
- x: n,
29
- y: l
54
+ return c = Math.max(h, c), {
55
+ x: a,
56
+ y: c
30
57
  };
31
58
  }
32
- function te(e, r) {
33
- const c = window.innerWidth, i = window.innerHeight;
34
- let a = e.right, n = e.top;
35
- if (a + r.width > c - h) {
36
- const l = e.left - r.width;
37
- l >= h ? a = l : a = c - r.width - h;
59
+ function he(e, r) {
60
+ const i = window.innerWidth, o = window.innerHeight;
61
+ let f = e.right, a = e.top;
62
+ if (f + r.width > i - h) {
63
+ const c = e.left - r.width;
64
+ c >= h ? f = c : f = i - r.width - h;
38
65
  }
39
- return n + r.height > i - h && (n = i - r.height - h), a = Math.max(h, a), n = Math.max(h, n), {
40
- x: a,
41
- y: n
66
+ return a + r.height > o - h && (a = o - r.height - h), f = Math.max(h, f), a = Math.max(h, a), {
67
+ x: f,
68
+ y: a
42
69
  };
43
70
  }
44
- function ne(e) {
45
- const [r, c] = L(!1), [i, a] = L({
71
+ function Q(e) {
72
+ return !e || typeof HTMLElement > "u" ? [] : Array.from(e.querySelectorAll(J)).filter((r) => r instanceof HTMLElement);
73
+ }
74
+ function p(e, r = "first") {
75
+ const i = Q(e);
76
+ if (!i.length) return !1;
77
+ let o = i[0];
78
+ return r === "last" ? o = i[i.length - 1] : r === "selected" && (o = i.find((f) => f.getAttribute("data-floe-selected") === "true") ?? i[0]), o.focus(), !0;
79
+ }
80
+ function K(e, r, i) {
81
+ const o = Q(e);
82
+ if (!o.length) return !1;
83
+ const f = r ? o.indexOf(r) : -1, a = me(o.length, f, i);
84
+ return a === null ? !1 : (o[a]?.focus(), !0);
85
+ }
86
+ function ge(e) {
87
+ const [r, i] = _(!1), [o, f] = _({
46
88
  x: -9999,
47
89
  y: -9999
48
90
  });
49
- let n, l;
50
- const s = `floe-dropdown-${R += 1}`, g = () => {
51
- if (!n || !l) return;
52
- const f = n.getBoundingClientRect(), v = l.getBoundingClientRect(), b = ee(f, v, e.align ?? "start");
53
- a(b);
91
+ let a, c;
92
+ const g = `floe-dropdown-${se += 1}`, k = `${g}-menu`, L = () => {
93
+ if (!a || !c) return;
94
+ const u = a.getBoundingClientRect(), l = c.getBoundingClientRect(), v = ve(u, l, e.align ?? "start");
95
+ f(v);
54
96
  };
55
- F(() => {
97
+ Z(() => {
56
98
  if (!r()) {
57
- a({
99
+ f({
58
100
  x: -9999,
59
101
  y: -9999
60
102
  });
61
103
  return;
62
104
  }
63
- const f = (b) => {
64
- const o = b.target;
65
- o && typeof o.closest == "function" && o.closest(`[data-floe-dropdown="${s}"]`) || c(!1);
66
- }, v = (b) => {
67
- b.key === "Escape" && c(!1);
105
+ const u = (v) => {
106
+ const n = v.target;
107
+ n && typeof n.closest == "function" && n.closest(`[data-floe-dropdown="${g}"]`) || i(!1);
108
+ }, l = (v) => {
109
+ v.key === "Escape" && (i(!1), requestAnimationFrame(() => a?.focus()));
68
110
  };
69
- document.addEventListener("mousedown", f), document.addEventListener("keydown", v), requestAnimationFrame(g), N(() => {
70
- document.removeEventListener("mousedown", f), document.removeEventListener("keydown", v);
111
+ document.addEventListener("mousedown", u), document.addEventListener("keydown", l), requestAnimationFrame(() => {
112
+ L(), p(c, e.value ? "selected" : "first");
113
+ }), R(() => {
114
+ document.removeEventListener("mousedown", u), document.removeEventListener("keydown", l);
71
115
  });
72
116
  });
73
- const P = (f) => {
74
- const v = e.onSelect;
75
- f.keepOpen || c(!1), z(() => v(f.id));
117
+ const x = (u) => {
118
+ const l = e.onSelect;
119
+ u.keepOpen || i(!1), ee(() => l(u.id));
120
+ }, O = (u, l = "first") => {
121
+ e.disabled || (i(u), requestAnimationFrame(() => {
122
+ L(), p(c, l);
123
+ }));
124
+ }, B = (u) => {
125
+ if (e.disabled) return;
126
+ const l = fe(u.key, {
127
+ open: r(),
128
+ hasSelection: !!e.value
129
+ });
130
+ if (l) {
131
+ if (u.preventDefault(), !l.nextOpen) {
132
+ i(!1);
133
+ return;
134
+ }
135
+ O(!0, l.focusMode ?? "first");
136
+ }
137
+ }, q = (u) => {
138
+ const l = u.target, v = l?.closest('[role="menu"]'), n = l?.closest(J);
139
+ switch (u.key) {
140
+ case "ArrowDown":
141
+ u.preventDefault(), K(v, n, 1);
142
+ return;
143
+ case "ArrowUp":
144
+ u.preventDefault(), K(v, n, -1);
145
+ return;
146
+ case "Home":
147
+ u.preventDefault(), p(v, "first");
148
+ return;
149
+ case "End":
150
+ u.preventDefault(), p(v, "last");
151
+ return;
152
+ case "Tab":
153
+ i(!1);
154
+ return;
155
+ default:
156
+ return;
157
+ }
76
158
  };
77
159
  return (() => {
78
- var f = K(), v = f.firstChild;
79
- O(f, "data-floe-dropdown", s), v.$$click = () => c((o) => !o);
80
- var b = n;
81
- return typeof b == "function" ? I(b, v) : n = v, m(v, () => e.trigger), m(f, d(y, {
160
+ var u = ie(), l = u.firstChild;
161
+ b(u, "data-floe-dropdown", g), l.$$keydown = B, l.$$click = () => {
162
+ if (!e.disabled) {
163
+ if (r()) {
164
+ i(!1);
165
+ return;
166
+ }
167
+ O(!0, e.value ? "selected" : "first");
168
+ }
169
+ };
170
+ var v = a;
171
+ return typeof v == "function" ? P(v, l) : a = l, b(l, "aria-controls", k), w(l, () => e.trigger), w(u, m(S, {
82
172
  get when() {
83
173
  return r();
84
174
  },
85
175
  get children() {
86
- return d(B, {
176
+ return m(U, {
87
177
  get children() {
88
- var o = q(), x = l;
89
- return typeof x == "function" ? I(x, o) : l = o, O(o, "data-floe-dropdown", s), m(o, d(W, {
178
+ var n = G();
179
+ n.$$keydown = q;
180
+ var y = c;
181
+ return typeof y == "function" ? P(y, n) : c = n, b(n, "data-floe-dropdown", g), b(n, "id", k), w(n, m(z, {
90
182
  get each() {
91
183
  return e.items;
92
184
  },
93
- children: (t) => d(y, {
185
+ children: (t) => m(S, {
94
186
  get when() {
95
187
  return !t().separator;
96
188
  },
97
189
  get fallback() {
98
- return H();
190
+ return V();
99
191
  },
100
192
  get children() {
101
- return d(j, {
193
+ return m(X, {
102
194
  get item() {
103
195
  return t();
104
196
  },
105
197
  get selected() {
106
198
  return e.value === t().id;
107
199
  },
108
- onSelect: P,
109
- onCloseMenu: () => c(!1),
110
- dropdownId: s
200
+ onSelect: x,
201
+ onCloseMenu: () => i(!1),
202
+ dropdownId: g
111
203
  });
112
204
  }
113
205
  })
114
- })), E((t) => {
115
- var $ = p("fixed z-50 min-w-36 py-0.5", "bg-popover text-popover-foreground", "rounded border border-border shadow-md", "animate-in fade-in slide-in-from-top-2"), u = `${i().x}px`, w = `${i().y}px`;
116
- return $ !== t.e && S(o, t.e = $), u !== t.t && _(o, "left", t.t = u), w !== t.a && _(o, "top", t.a = w), t;
206
+ })), D((t) => {
207
+ var M = A("fixed z-50 min-w-36 py-0.5", "bg-popover text-popover-foreground", "rounded border border-border shadow-md", "animate-in fade-in slide-in-from-top-2"), d = `${o().x}px`, $ = `${o().y}px`;
208
+ return M !== t.e && I(n, t.e = M), d !== t.t && F(n, "left", t.t = d), $ !== t.a && F(n, "top", t.a = $), t;
117
209
  }, {
118
210
  e: void 0,
119
211
  t: void 0,
120
212
  a: void 0
121
- }), o;
213
+ }), n;
122
214
  }
123
215
  });
124
216
  }
125
- }), null), E(() => S(f, p("relative inline-block", e.class))), f;
217
+ }), null), D((n) => {
218
+ var y = A("relative inline-block", e.class), t = A("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, d = r(), $ = e.triggerAriaLabel, s = e.disabled ? "true" : void 0;
219
+ return y !== n.e && I(u, n.e = y), t !== n.t && I(l, n.t = t), M !== n.a && b(l, "tabindex", n.a = M), d !== n.o && b(l, "aria-expanded", n.o = d), $ !== n.i && b(l, "aria-label", n.i = $), s !== n.n && b(l, "aria-disabled", n.n = s), n;
220
+ }, {
221
+ e: void 0,
222
+ t: void 0,
223
+ a: void 0,
224
+ o: void 0,
225
+ i: void 0,
226
+ n: void 0
227
+ }), u;
126
228
  })();
127
229
  }
128
- function j(e) {
129
- const [r, c] = L(!1), [i, a] = L({
230
+ function X(e) {
231
+ const [r, i] = _(!1), [o, f] = _({
130
232
  x: -9999,
131
233
  y: -9999
132
234
  });
133
- let n, l, s;
134
- const g = () => e.item.children && e.item.children.length > 0, P = () => {
135
- if (!n || !l) return;
136
- const o = n.getBoundingClientRect(), x = l.getBoundingClientRect(), t = te(o, x);
137
- a(t);
138
- }, f = () => {
139
- g() && (clearTimeout(s), s = setTimeout(() => {
140
- c(!0), requestAnimationFrame(P);
235
+ let a, c, g, k;
236
+ const L = `floe-dropdown-item-${ce += 1}`, x = () => e.item.children && e.item.children.length > 0, O = () => {
237
+ if (!a || !g) return;
238
+ const n = a.getBoundingClientRect(), y = g.getBoundingClientRect(), t = he(n, y);
239
+ f(t);
240
+ }, B = () => {
241
+ x() && (clearTimeout(k), k = setTimeout(() => {
242
+ i(!0), requestAnimationFrame(O);
141
243
  }, 100));
142
- }, v = () => {
143
- g() && (clearTimeout(s), s = void 0, !e.item.keepOpen && (s = setTimeout(() => {
144
- c(!1);
244
+ }, q = () => {
245
+ x() && (clearTimeout(k), k = void 0, !e.item.keepOpen && (k = setTimeout(() => {
246
+ i(!1);
145
247
  }, 150)));
146
- }, b = (o) => {
248
+ }, u = (n) => {
147
249
  if (!e.item.disabled) {
148
250
  if (e.item.content && e.item.keepOpen) {
149
- o.stopPropagation();
251
+ n.stopPropagation();
150
252
  return;
151
253
  }
152
- g() ? (c((x) => !x), requestAnimationFrame(P)) : e.item.content || e.onSelect(e.item);
254
+ x() ? (i((y) => !y), requestAnimationFrame(O)) : e.item.content || e.onSelect(e.item);
153
255
  }
256
+ }, l = (n = "first") => {
257
+ x() && (i(!0), requestAnimationFrame(() => {
258
+ O(), p(g, n);
259
+ }));
260
+ }, v = () => {
261
+ i(!1), requestAnimationFrame(() => c?.focus());
154
262
  };
155
263
  return (() => {
156
- var o = X();
157
- o.addEventListener("mouseleave", v), o.addEventListener("mouseenter", f);
158
- var x = n;
159
- return typeof x == "function" ? I(x, o) : n = o, m(o, d(y, {
264
+ var n = ae();
265
+ n.addEventListener("mouseleave", q), n.addEventListener("mouseenter", B);
266
+ var y = a;
267
+ return typeof y == "function" ? P(y, n) : a = n, w(n, m(S, {
160
268
  get when() {
161
269
  return e.item.content;
162
270
  },
163
271
  get children() {
164
- var t = Q();
165
- return t.$$click = b, m(t, e.item.content), E(() => S(t, p("w-full px-2 py-1.5", e.item.disabled && "opacity-50 pointer-events-none"))), t;
272
+ var t = oe();
273
+ return t.$$click = u, w(t, e.item.content), D(() => I(t, A("w-full px-2 py-1.5", e.item.disabled && "opacity-50 pointer-events-none"))), t;
166
274
  }
167
- }), null), m(o, d(y, {
275
+ }), null), w(n, m(S, {
168
276
  get when() {
169
277
  return !e.item.content;
170
278
  },
171
279
  get children() {
172
- var t = U(), $ = t.firstChild, u = $.nextSibling;
173
- return t.$$click = b, m($, d(y, {
280
+ var t = le(), M = t.firstChild, d = M.nextSibling;
281
+ t.$$keydown = (s) => {
282
+ e.item.disabled || x() && ((s.key === "ArrowRight" || s.key === "Enter" || s.key === " ") && (s.preventDefault(), l("first")), s.key === "ArrowLeft" && (s.preventDefault(), v()));
283
+ }, t.$$click = u;
284
+ var $ = c;
285
+ return typeof $ == "function" ? P($, t) : c = t, b(t, "id", L), w(M, m(S, {
174
286
  get when() {
175
- return A(() => !!e.selected)() && !g();
287
+ return j(() => !!e.selected)() && !x();
176
288
  },
177
289
  get children() {
178
- return d(V, {
290
+ return m(ne, {
179
291
  class: "w-3 h-3"
180
292
  });
181
293
  }
182
- })), m(t, d(y, {
294
+ })), w(t, m(S, {
183
295
  get when() {
184
296
  return e.item.icon;
185
297
  },
186
298
  keyed: !0,
187
- children: (w) => (() => {
188
- var k = Y();
189
- return m(k, w), k;
299
+ children: (s) => (() => {
300
+ var E = ue();
301
+ return w(E, s), E;
190
302
  })()
191
- }), u), m(u, () => e.item.label), m(t, d(y, {
303
+ }), d), w(d, () => e.item.label), w(t, m(S, {
192
304
  get when() {
193
- return g();
305
+ return x();
194
306
  },
195
307
  get children() {
196
- return d(J, {
308
+ return m(re, {
197
309
  class: "w-3 h-3 text-muted-foreground"
198
310
  });
199
311
  }
200
- }), null), E((w) => {
201
- var k = 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"), M = e.item.disabled;
202
- return k !== w.e && S(t, w.e = k), M !== w.t && (t.disabled = w.t = M), w;
312
+ }), null), D((s) => {
313
+ var E = A("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"), T = e.item.disabled, H = x() ? "menu" : void 0, W = x() ? r() : void 0, N = e.selected && !x() ? "true" : void 0;
314
+ return E !== s.e && I(t, s.e = E), T !== s.t && (t.disabled = s.t = T), H !== s.a && b(t, "aria-haspopup", s.a = H), W !== s.o && b(t, "aria-expanded", s.o = W), N !== s.i && b(t, "data-floe-selected", s.i = N), s;
203
315
  }, {
204
316
  e: void 0,
205
- t: void 0
317
+ t: void 0,
318
+ a: void 0,
319
+ o: void 0,
320
+ i: void 0
206
321
  }), t;
207
322
  }
208
- }), null), m(o, d(y, {
323
+ }), null), w(n, m(S, {
209
324
  get when() {
210
- return A(() => !!r())() && g();
325
+ return j(() => !!r())() && x();
211
326
  },
212
327
  get children() {
213
- return d(B, {
328
+ return m(U, {
214
329
  get children() {
215
- var t = q();
216
- t.addEventListener("mouseleave", v), t.addEventListener("mouseenter", () => {
217
- clearTimeout(s);
330
+ var t = G();
331
+ t.$$keydown = (d) => {
332
+ d.key !== "ArrowLeft" && d.key !== "Escape" || (d.preventDefault(), d.stopPropagation(), v());
333
+ }, t.addEventListener("mouseleave", q), t.addEventListener("mouseenter", () => {
334
+ clearTimeout(k);
218
335
  });
219
- var $ = l;
220
- return typeof $ == "function" ? I($, t) : l = t, m(t, d(W, {
336
+ var M = g;
337
+ return typeof M == "function" ? P(M, t) : g = t, b(t, "aria-labelledby", L), w(t, m(z, {
221
338
  get each() {
222
339
  return e.item.children;
223
340
  },
224
- children: (u) => d(y, {
341
+ children: (d) => m(S, {
225
342
  get when() {
226
- return !u().separator;
343
+ return !d().separator;
227
344
  },
228
345
  get fallback() {
229
- return H();
346
+ return V();
230
347
  },
231
348
  get children() {
232
- return d(j, {
349
+ return m(X, {
233
350
  get item() {
234
- return u();
351
+ return d();
235
352
  },
236
353
  selected: !1,
237
354
  get onSelect() {
@@ -246,9 +363,9 @@ function j(e) {
246
363
  });
247
364
  }
248
365
  })
249
- })), E((u) => {
250
- var w = p("fixed z-50 min-w-36 py-0.5", "bg-popover text-popover-foreground", "rounded border border-border shadow-md", "animate-in fade-in slide-in-from-left-1"), k = e.dropdownId, M = `${i().x}px`, T = `${i().y}px`;
251
- return w !== u.e && S(t, u.e = w), k !== u.t && O(t, "data-floe-dropdown", u.t = k), M !== u.a && _(t, "left", u.a = M), T !== u.o && _(t, "top", u.o = T), u;
366
+ })), D((d) => {
367
+ var $ = A("fixed z-50 min-w-36 py-0.5", "bg-popover text-popover-foreground", "rounded border border-border shadow-md", "animate-in fade-in slide-in-from-left-1"), s = e.dropdownId, E = `${o().x}px`, T = `${o().y}px`;
368
+ return $ !== d.e && I(t, d.e = $), s !== d.t && b(t, "data-floe-dropdown", d.t = s), E !== d.a && F(t, "left", d.a = E), T !== d.o && F(t, "top", d.o = T), d;
252
369
  }, {
253
370
  e: void 0,
254
371
  t: void 0,
@@ -258,43 +375,44 @@ function j(e) {
258
375
  }
259
376
  });
260
377
  }
261
- }), null), o;
378
+ }), null), n;
262
379
  })();
263
380
  }
264
- function ae(e) {
265
- const r = () => e.options.find((i) => i.value === e.value), c = () => e.options.map((i) => ({
266
- id: i.value,
267
- label: i.label
381
+ function Me(e) {
382
+ const r = () => e.options.find((o) => o.value === e.value), i = () => e.options.map((o) => ({
383
+ id: o.value,
384
+ label: o.label
268
385
  }));
269
- return d(ne, {
386
+ return m(ge, {
387
+ get triggerClass() {
388
+ return A("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);
389
+ },
270
390
  get trigger() {
271
- return (() => {
272
- var i = Z(), a = i.firstChild;
273
- return m(a, () => r()?.label ?? e.placeholder ?? "Select..."), m(i, d(G, {
274
- class: "w-3.5 h-3.5 text-muted-foreground"
275
- }), null), E((n) => {
276
- var l = p("flex items-center justify-between gap-2 h-8 px-2.5 w-full cursor-pointer", "rounded border border-input bg-background text-xs shadow-sm", "transition-colors duration-100", "focus:outline-none focus:ring-1 focus:ring-ring", "disabled:cursor-not-allowed disabled:opacity-50", e.class), s = e.disabled, g = p(!r() && "text-muted-foreground");
277
- return l !== n.e && S(i, n.e = l), s !== n.t && (i.disabled = n.t = s), g !== n.a && S(a, n.a = g), n;
278
- }, {
279
- e: void 0,
280
- t: void 0,
281
- a: void 0
282
- }), i;
283
- })();
391
+ return [(() => {
392
+ var o = de();
393
+ return w(o, () => r()?.label ?? e.placeholder ?? "Select..."), D(() => I(o, A("truncate", !r() && "text-muted-foreground"))), o;
394
+ })(), m(te, {
395
+ class: "w-3.5 h-3.5 text-muted-foreground"
396
+ })];
284
397
  },
285
398
  get items() {
286
- return c();
399
+ return i();
287
400
  },
288
401
  get value() {
289
402
  return e.value;
290
403
  },
291
404
  get onSelect() {
292
405
  return e.onChange;
406
+ },
407
+ get disabled() {
408
+ return e.disabled;
293
409
  }
294
410
  });
295
411
  }
296
- D(["click"]);
412
+ Y(["click", "keydown"]);
297
413
  export {
298
- ne as Dropdown,
299
- ae as Select
414
+ ge as Dropdown,
415
+ Me as Select,
416
+ me as getWrappedMenuItemIndex,
417
+ fe as resolveDropdownTriggerKeyAction
300
418
  };
@@ -77,10 +77,14 @@ export interface TabsProps extends Omit<JSX.HTMLAttributes<HTMLDivElement>, 'onC
77
77
  features?: TabsFeatures;
78
78
  /** Optional class overrides for each visual slot */
79
79
  slotClassNames?: TabsSlotClassNames;
80
+ /** Accessible name for the tablist container. */
81
+ ariaLabel?: string;
80
82
  }
83
+ export declare function resolveTabNavigationTargetId(items: Pick<TabItem, 'id' | 'disabled'>[], currentId: string, key: string): string | null;
81
84
  export declare function Tabs(props: TabsProps): JSX.Element;
82
85
  export interface TabPanelProps extends JSX.HTMLAttributes<HTMLDivElement> {
83
86
  active?: boolean;
84
87
  keepMounted?: boolean;
88
+ labelledBy?: string;
85
89
  }
86
90
  export declare function TabPanel(props: TabPanelProps): JSX.Element;