@floegence/floe-webapp-core 0.35.21 → 0.35.22

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,14 +1,40 @@
1
- import { createComponent as f, spread as te, mergeProps as re, insert as u, effect as m, className as w, setStyleProperty as K, memo as Q, use as Y, setAttribute as I, template as b, delegateEvents as Re } from "solid-js/web";
2
- import { splitProps as oe, Show as p, createSignal as g, untrack as Z, createEffect as R, For as Ne, onCleanup as ee } from "solid-js";
3
- import { cn as v } from "../../utils/cn.js";
4
- import { deferAfterPaint as S } from "../../utils/defer.js";
5
- import { useViewActivation as Le } from "../../context/ViewActivationContext.js";
6
- import { X as Te, Plus as _e, ChevronRight as He } from "../icons/index.js";
7
- var Ee = /* @__PURE__ */ b('<svg xmlns=http://www.w3.org/2000/svg width=24 height=24 viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round><path d="m15 18-6-6 6-6">'), Pe = /* @__PURE__ */ b('<button type=button aria-label="Scroll left">'), Me = /* @__PURE__ */ b("<div>"), Oe = /* @__PURE__ */ b('<button type=button aria-label="Add new tab">'), je = /* @__PURE__ */ b('<button type=button aria-label="Scroll right">'), We = /* @__PURE__ */ b("<div><div>"), De = /* @__PURE__ */ b("<span class=flex-shrink-0>"), Ve = /* @__PURE__ */ b("<button type=button>"), Xe = /* @__PURE__ */ b('<div role=tab><span class="truncate max-w-32">'), Fe = /* @__PURE__ */ b("<div role=tabpanel>");
8
- function Ue(d) {
1
+ import { createComponent as v, spread as oe, mergeProps as se, insert as f, effect as w, className as p, setStyleProperty as Z, memo as ee, use as te, setAttribute as k, template as g, delegateEvents as Re } from "solid-js/web";
2
+ import { splitProps as le, Show as x, createSignal as m, untrack as re, createEffect as E, For as Te, onCleanup as ne } from "solid-js";
3
+ import { cn as h } from "../../utils/cn.js";
4
+ import { deferAfterPaint as L } from "../../utils/defer.js";
5
+ import { useViewActivation as He } from "../../context/ViewActivationContext.js";
6
+ import { X as Ee, Plus as Pe, ChevronRight as _e } from "../icons/index.js";
7
+ var Me = /* @__PURE__ */ g('<svg xmlns=http://www.w3.org/2000/svg width=24 height=24 viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round><path d="m15 18-6-6 6-6">'), Oe = /* @__PURE__ */ g('<button type=button aria-label="Scroll left">'), je = /* @__PURE__ */ g("<div>"), De = /* @__PURE__ */ g('<button type=button aria-label="Add new tab">'), Ve = /* @__PURE__ */ g('<button type=button aria-label="Scroll right">'), We = /* @__PURE__ */ g("<div><div role=tablist aria-orientation=horizontal>"), Fe = /* @__PURE__ */ g("<span class=flex-shrink-0>"), Ue = /* @__PURE__ */ g("<button type=button>"), Xe = /* @__PURE__ */ g('<div role=tab><span class="truncate max-w-32">'), qe = /* @__PURE__ */ g("<div role=tabpanel>");
8
+ function Ke(d, t, y) {
9
+ const c = d.filter((I) => !I.disabled);
10
+ if (!c.length) return null;
11
+ const B = c.findIndex((I) => I.id === t);
12
+ if (B < 0) return null;
13
+ let C = null;
14
+ switch (y) {
15
+ case "ArrowRight":
16
+ case "ArrowDown":
17
+ C = (B + 1) % c.length;
18
+ break;
19
+ case "ArrowLeft":
20
+ case "ArrowUp":
21
+ C = (B - 1 + c.length) % c.length;
22
+ break;
23
+ case "Home":
24
+ C = 0;
25
+ break;
26
+ case "End":
27
+ C = c.length - 1;
28
+ break;
29
+ default:
30
+ return null;
31
+ }
32
+ return c[C]?.id ?? null;
33
+ }
34
+ function Ge(d) {
9
35
  return d === 1 || d === 2 || d === 3 || d === 4 ? d : 2;
10
36
  }
11
- function qe(d) {
37
+ function Je(d) {
12
38
  switch (d) {
13
39
  case 1:
14
40
  return {
@@ -32,7 +58,7 @@ function qe(d) {
32
58
  };
33
59
  }
34
60
  }
35
- function Ge(d) {
61
+ function Qe(d) {
36
62
  switch (d) {
37
63
  case "border":
38
64
  return {
@@ -51,252 +77,284 @@ function Ge(d) {
51
77
  };
52
78
  }
53
79
  }
54
- const Je = (d) => (() => {
55
- var t = Ee();
56
- return m(() => I(t, "class", d.class)), t;
80
+ const Ye = (d) => (() => {
81
+ var t = Me();
82
+ return w(() => k(t, "class", d.class)), t;
57
83
  })();
58
- function rt(d) {
59
- const [t, N] = oe(d, ["items", "activeId", "defaultActiveId", "onChange", "onActiveIdChange", "onClose", "onAdd", "showAdd", "closable", "size", "features", "slotClassNames", "class"]), C = () => t.features?.indicator?.mode ?? "activeBorder", ne = () => Ue(t.features?.indicator?.thicknessPx), se = () => t.features?.indicator?.colorToken ?? "primary", le = () => t.features?.indicator?.animated ?? !0, ae = () => t.features?.containerBorder ?? !0, ie = () => t.features?.scrollButtons ?? "auto", de = () => t.features?.closeButton?.dangerHover ?? !0, ce = () => t.features?.closeButton?.enabledByDefault ?? t.closable ?? !1, ue = () => t.features?.addButton?.enabled ?? t.showAdd ?? !1, M = () => qe(ne()), L = () => Ge(se());
60
- let c;
61
- const O = (() => {
84
+ function st(d) {
85
+ const [t, y] = le(d, ["items", "activeId", "defaultActiveId", "onChange", "onActiveIdChange", "onClose", "onAdd", "showAdd", "closable", "size", "features", "slotClassNames", "ariaLabel", "class"]), c = () => t.features?.indicator?.mode ?? "activeBorder", B = () => Ge(t.features?.indicator?.thicknessPx), C = () => t.features?.indicator?.colorToken ?? "primary", I = () => t.features?.indicator?.animated ?? !0, ae = () => t.features?.containerBorder ?? !0, ie = () => t.features?.scrollButtons ?? "auto", de = () => t.features?.closeButton?.dangerHover ?? !0, ce = () => t.features?.closeButton?.enabledByDefault ?? t.closable ?? !1, ue = () => t.features?.addButton?.enabled ?? t.showAdd ?? !1, V = () => Je(B()), P = () => Qe(C());
86
+ let u;
87
+ const W = (() => {
62
88
  try {
63
- return Le();
89
+ return He();
64
90
  } catch {
65
91
  return null;
66
92
  }
67
- })(), x = () => O ? O.active() : !0;
68
- let T = !1;
69
- const [fe, ve] = g(0), [he, be] = g(0), [j, _] = g(!1), H = /* @__PURE__ */ new Map();
70
- let E = !1;
71
- const $ = () => C() === "slider", W = (o) => {
72
- if (!c || !$()) return !1;
73
- const s = H.get(o);
74
- if (!s) return !1;
75
- const a = c.getBoundingClientRect(), e = s.getBoundingClientRect(), r = e.left - a.left + c.scrollLeft, i = e.width;
76
- return ve(r), be(i), _(i > 0), i > 0;
93
+ })(), A = () => W ? W.active() : !0;
94
+ let _ = !1;
95
+ const [fe, ve] = m(0), [he, be] = m(0), [F, M] = m(!1), N = /* @__PURE__ */ new Map();
96
+ let O = !1;
97
+ const R = () => c() === "slider", U = (o) => {
98
+ if (!u || !R()) return !1;
99
+ const n = N.get(o);
100
+ if (!n) return !1;
101
+ const s = u.getBoundingClientRect(), e = n.getBoundingClientRect(), r = e.left - s.left + u.scrollLeft, a = e.width;
102
+ return ve(r), be(a), M(a > 0), a > 0;
77
103
  }, ge = () => {
78
- if (!$()) {
79
- _(!1);
104
+ if (!R()) {
105
+ M(!1);
80
106
  return;
81
107
  }
82
- W(P()) || _(!1);
83
- }, A = () => {
84
- E || (E = !0, S(() => {
85
- E = !1, Z(() => {
86
- x() && ge();
108
+ U(j()) || M(!1);
109
+ }, T = () => {
110
+ O || (O = !0, L(() => {
111
+ O = !1, re(() => {
112
+ A() && ge();
87
113
  });
88
114
  }));
89
- }, D = () => t.activeId !== void 0, me = () => t.onChange ?? t.onActiveIdChange, [Ce, we] = g(Z(() => t.defaultActiveId ?? t.items[0]?.id ?? "")), V = () => D() ? t.activeId : Ce(), [P, X] = g(V());
90
- R(() => {
91
- X(V());
92
- }), R(() => {
93
- x() && (C(), P(), A());
115
+ }, X = () => t.activeId !== void 0, me = () => t.onChange ?? t.onActiveIdChange, [we, Ce] = m(re(() => t.defaultActiveId ?? t.items[0]?.id ?? "")), q = () => X() ? t.activeId : we(), [j, K] = m(q());
116
+ E(() => {
117
+ K(q());
118
+ }), E(() => {
119
+ A() && (c(), j(), T());
94
120
  });
95
- const [F, pe] = g(!1), [U, xe] = g(!1), [ke, ye] = g(!1), q = () => ie() === "auto" && ke(), Be = () => {
96
- if (!c) return;
121
+ const [G, pe] = m(!1), [J, xe] = m(!1), [ke, ye] = m(!1), Q = () => ie() === "auto" && ke(), Be = () => {
122
+ if (!u) return;
97
123
  const {
98
124
  scrollLeft: o,
99
- scrollWidth: s,
100
- clientWidth: a
101
- } = c, e = s > a;
102
- ye(e), pe(o > 0), xe(o + a < s - 1);
103
- }, z = () => {
104
- T || (T = !0, S(() => {
105
- T = !1, x() && Be();
125
+ scrollWidth: n,
126
+ clientWidth: s
127
+ } = u, e = n > s;
128
+ ye(e), pe(o > 0), xe(o + s < n - 1);
129
+ }, H = () => {
130
+ _ || (_ = !0, L(() => {
131
+ _ = !1, A() && Be();
106
132
  }));
107
- }, Se = () => {
108
- c && c.scrollBy({
133
+ }, Ie = () => {
134
+ u && u.scrollBy({
109
135
  left: -150,
110
136
  behavior: "smooth"
111
137
  });
112
- }, Ie = () => {
113
- c && c.scrollBy({
138
+ }, Ae = () => {
139
+ u && u.scrollBy({
114
140
  left: 150,
115
141
  behavior: "smooth"
116
142
  });
117
143
  };
118
- R(() => {
119
- if (!c || !x()) return;
120
- z(), A();
121
- const o = () => z();
122
- c.addEventListener("scroll", o);
123
- const s = () => {
124
- z(), A();
144
+ E(() => {
145
+ if (!u || !A()) return;
146
+ H(), T();
147
+ const o = () => H();
148
+ u.addEventListener("scroll", o);
149
+ const n = () => {
150
+ H(), T();
125
151
  };
126
- let a;
127
- typeof ResizeObserver < "u" ? (a = new ResizeObserver(s), a.observe(c)) : typeof window < "u" && window.addEventListener("resize", s), ee(() => {
128
- c?.removeEventListener("scroll", o), a?.disconnect(), typeof window < "u" && window.removeEventListener("resize", s);
152
+ let s;
153
+ typeof ResizeObserver < "u" ? (s = new ResizeObserver(n), s.observe(u)) : typeof window < "u" && window.addEventListener("resize", n), ne(() => {
154
+ u?.removeEventListener("scroll", o), s?.disconnect(), typeof window < "u" && window.removeEventListener("resize", n);
129
155
  });
130
- }), R(() => {
131
- x() && (t.items.length, z(), A());
156
+ }), E(() => {
157
+ A() && (t.items.length, H(), T());
132
158
  });
133
- const G = (o, s) => {
134
- if (s) return;
135
- const a = me();
136
- if (X(o), $() && W(o), D() || we(o), a) {
159
+ const D = (o, n) => {
160
+ if (n) return;
161
+ const s = me();
162
+ if (K(o), R() && U(o), X() || Ce(o), s) {
137
163
  const e = o;
138
- S(() => a(e));
164
+ L(() => s(e));
139
165
  }
140
- }, $e = (o, s) => {
166
+ }, Se = (o) => {
167
+ const n = t.items.find((s) => s.id === o);
168
+ n && (D(n.id, n.disabled), requestAnimationFrame(() => {
169
+ const s = N.get(n.id);
170
+ s?.focus(), s?.scrollIntoView({
171
+ block: "nearest",
172
+ inline: "nearest"
173
+ });
174
+ }));
175
+ }, $e = (o, n) => {
176
+ const s = Ke(t.items, n.id, o.key);
177
+ s && (o.preventDefault(), Se(s));
178
+ }, ze = (o, n) => {
141
179
  o.stopPropagation();
142
- const a = t.onClose;
143
- if (!a) return;
144
- const e = s;
145
- S(() => a(e));
146
- }, Ae = {
180
+ const s = t.onClose;
181
+ if (!s) return;
182
+ const e = n;
183
+ L(() => s(e));
184
+ }, Le = {
147
185
  sm: "h-7 px-2 text-[11px]",
148
186
  md: "h-8 px-3 text-xs"
149
- }, ze = (o, s) => {
150
- const a = "inline-flex items-center gap-1.5 font-medium transition-colors duration-150 whitespace-nowrap", e = s ? "cursor-not-allowed opacity-50" : "cursor-pointer", r = (() => {
151
- const i = C();
152
- return i === "none" || i === "slider" && j() ? "border-transparent" : L().tabBorderClass;
187
+ }, Ne = (o, n) => {
188
+ const s = "inline-flex items-center gap-1.5 font-medium transition-colors duration-150 whitespace-nowrap", e = n ? "cursor-not-allowed opacity-50" : "cursor-pointer", r = (() => {
189
+ const a = c();
190
+ return a === "none" || a === "slider" && F() ? "border-transparent" : P().tabBorderClass;
153
191
  })();
154
- return v(a, e, Ae[t.size ?? "md"], "rounded-t", M().tabBorderClass, o ? v(r, "text-foreground bg-background", t.slotClassNames?.tabActive) : v("border-transparent text-muted-foreground hover:text-foreground hover:bg-muted/50", t.slotClassNames?.tabInactive), s && "hover:bg-transparent hover:text-muted-foreground hover:border-transparent", t.slotClassNames?.tab);
192
+ return h(s, e, Le[t.size ?? "md"], "rounded-t", V().tabBorderClass, o ? h(r, "text-foreground bg-background", t.slotClassNames?.tabActive) : h("border-transparent text-muted-foreground hover:text-foreground hover:bg-muted/50", t.slotClassNames?.tabInactive), n && "hover:bg-transparent hover:text-muted-foreground hover:border-transparent", t.slotClassNames?.tab);
155
193
  };
156
194
  return (() => {
157
- var o = We(), s = o.firstChild;
158
- te(o, re({
195
+ var o = We(), n = o.firstChild;
196
+ oe(o, se({
159
197
  get class() {
160
- return v("relative flex items-center gap-0.5", ae() && "border-b border-border", t.slotClassNames?.root, t.class);
198
+ return h("relative flex items-center gap-0.5", ae() && "border-b border-border", t.slotClassNames?.root, t.class);
161
199
  }
162
- }, N), !1, !0), u(o, f(p, {
200
+ }, y), !1, !0), f(o, v(x, {
163
201
  get when() {
164
- return q();
202
+ return Q();
165
203
  },
166
204
  get children() {
167
- var e = Pe();
168
- return e.$$click = Se, u(e, f(Je, {
205
+ var e = Oe();
206
+ return e.$$click = Ie, f(e, v(Ye, {
169
207
  class: "w-4 h-4"
170
- })), m((r) => {
171
- var i = !F(), l = v("flex-shrink-0 flex items-center justify-center", "w-6 h-6 rounded cursor-pointer", "transition-all duration-150", F() ? "text-muted-foreground hover:text-foreground hover:bg-muted/80 opacity-100" : "opacity-0 pointer-events-none", t.slotClassNames?.scrollButton);
172
- return i !== r.e && (e.disabled = r.e = i), l !== r.t && w(e, r.t = l), r;
208
+ })), w((r) => {
209
+ var a = !G(), i = h("flex-shrink-0 flex items-center justify-center", "w-6 h-6 rounded cursor-pointer", "transition-all duration-150", G() ? "text-muted-foreground hover:text-foreground hover:bg-muted/80 opacity-100" : "opacity-0 pointer-events-none", t.slotClassNames?.scrollButton);
210
+ return a !== r.e && (e.disabled = r.e = a), i !== r.t && p(e, r.t = i), r;
173
211
  }, {
174
212
  e: void 0,
175
213
  t: void 0
176
214
  }), e;
177
215
  }
178
- }), s);
179
- var a = c;
180
- return typeof a == "function" ? Y(a, s) : c = s, u(s, f(p, {
216
+ }), n);
217
+ var s = u;
218
+ return typeof s == "function" ? te(s, n) : u = n, f(n, v(x, {
181
219
  get when() {
182
- return Q(() => !!$())() && j();
220
+ return ee(() => !!R())() && F();
183
221
  },
184
222
  get children() {
185
- var e = Me();
186
- return m((r) => {
187
- var i = v("pointer-events-none absolute bottom-0 left-0 z-10", M().sliderHeightClass, L().sliderBgClass, le() ? "transition-[transform,width] duration-200 ease-out motion-reduce:transition-none" : "transition-none", "will-change-transform", t.slotClassNames?.indicator), l = `translate3d(${fe()}px, 0, 0)`, k = `${he()}px`;
188
- return i !== r.e && w(e, r.e = i), l !== r.t && K(e, "transform", r.t = l), k !== r.a && K(e, "width", r.a = k), r;
223
+ var e = je();
224
+ return w((r) => {
225
+ var a = h("pointer-events-none absolute bottom-0 left-0 z-10", V().sliderHeightClass, P().sliderBgClass, I() ? "transition-[transform,width] duration-200 ease-out motion-reduce:transition-none" : "transition-none", "will-change-transform", t.slotClassNames?.indicator), i = `translate3d(${fe()}px, 0, 0)`, S = `${he()}px`;
226
+ return a !== r.e && p(e, r.e = a), i !== r.t && Z(e, "transform", r.t = i), S !== r.a && Z(e, "width", r.a = S), r;
189
227
  }, {
190
228
  e: void 0,
191
229
  t: void 0,
192
230
  a: void 0
193
231
  }), e;
194
232
  }
195
- }), null), u(s, f(Ne, {
233
+ }), null), f(n, v(Te, {
196
234
  get each() {
197
235
  return t.items;
198
236
  },
199
237
  children: (e) => {
200
- const r = () => e.id === P(), i = () => e.closable ?? ce();
238
+ const r = () => e.id === j(), a = () => e.closable ?? ce();
201
239
  return (() => {
202
- var l = Xe(), k = l.firstChild;
203
- return l.$$keydown = (n) => {
204
- (n.key === "Enter" || n.key === " ") && (n.preventDefault(), G(e.id, e.disabled));
205
- }, l.$$click = () => G(e.id, e.disabled), Y((n) => {
206
- H.set(e.id, n), ee(() => H.delete(e.id));
207
- }, l), u(l, f(p, {
240
+ var i = Xe(), S = i.firstChild;
241
+ return i.$$keydown = (l) => {
242
+ if (l.key === "Enter" || l.key === " ") {
243
+ l.preventDefault(), D(e.id, e.disabled);
244
+ return;
245
+ }
246
+ $e(l, e);
247
+ }, i.$$click = () => D(e.id, e.disabled), te((l) => {
248
+ N.set(e.id, l), ne(() => N.delete(e.id));
249
+ }, i), f(i, v(x, {
208
250
  get when() {
209
251
  return e.icon;
210
252
  },
211
253
  get children() {
212
- var n = De();
213
- return u(n, () => e.icon), n;
254
+ var l = Fe();
255
+ return f(l, () => e.icon), l;
214
256
  }
215
- }), k), u(k, () => e.label), u(l, f(p, {
257
+ }), S), f(S, () => e.label), f(i, v(x, {
216
258
  get when() {
217
- return Q(() => !!i())() && !e.disabled;
259
+ return ee(() => !!a())() && !e.disabled;
218
260
  },
219
261
  get children() {
220
- var n = Ve();
221
- return n.$$click = (h) => $e(h, e.id), u(n, f(Te, {
262
+ var l = Ue();
263
+ return l.$$click = (b) => ze(b, e.id), f(l, v(Ee, {
222
264
  class: "w-3 h-3"
223
- })), m((h) => {
224
- var y = v("flex-shrink-0 flex items-center justify-center", "w-5 h-5 rounded cursor-pointer", "bg-transparent text-muted-foreground", de() ? "hover:bg-error hover:text-error-foreground" : "hover:bg-muted/80 hover:text-foreground", "transition-colors duration-150", "ml-1.5", t.slotClassNames?.closeButton), B = `Close ${e.label}`;
225
- return y !== h.e && w(n, h.e = y), B !== h.t && I(n, "aria-label", h.t = B), h;
265
+ })), w((b) => {
266
+ var $ = h("flex-shrink-0 flex items-center justify-center", "w-5 h-5 rounded cursor-pointer", "bg-transparent text-muted-foreground", de() ? "hover:bg-error hover:text-error-foreground" : "hover:bg-muted/80 hover:text-foreground", "transition-colors duration-150", "ml-1.5", t.slotClassNames?.closeButton), z = `Close ${e.label}`;
267
+ return $ !== b.e && p(l, b.e = $), z !== b.t && k(l, "aria-label", b.t = z), b;
226
268
  }, {
227
269
  e: void 0,
228
270
  t: void 0
229
- }), n;
271
+ }), l;
230
272
  }
231
- }), null), m((n) => {
232
- var h = ze(r(), e.disabled), y = r(), B = e.disabled, J = e.disabled ? -1 : 0;
233
- return h !== n.e && w(l, n.e = h), y !== n.t && I(l, "aria-selected", n.t = y), B !== n.a && I(l, "aria-disabled", n.a = B), J !== n.o && I(l, "tabindex", n.o = J), n;
273
+ }), null), w((l) => {
274
+ var b = Ne(r(), e.disabled), $ = r(), z = e.disabled, Y = e.disabled ? -1 : r() ? 0 : -1;
275
+ return b !== l.e && p(i, l.e = b), $ !== l.t && k(i, "aria-selected", l.t = $), z !== l.a && k(i, "aria-disabled", l.a = z), Y !== l.o && k(i, "tabindex", l.o = Y), l;
234
276
  }, {
235
277
  e: void 0,
236
278
  t: void 0,
237
279
  a: void 0,
238
280
  o: void 0
239
- }), l;
281
+ }), i;
240
282
  })();
241
283
  }
242
- }), null), u(o, f(p, {
284
+ }), null), f(o, v(x, {
243
285
  get when() {
244
286
  return ue();
245
287
  },
246
288
  get children() {
247
- var e = Oe();
289
+ var e = De();
248
290
  return e.$$click = () => {
249
291
  const r = t.onAdd;
250
- r && S(() => r());
251
- }, u(e, f(_e, {
292
+ r && L(() => r());
293
+ }, f(e, v(Pe, {
252
294
  get class() {
253
295
  return t.size === "sm" ? "w-3.5 h-3.5" : "w-4 h-4";
254
296
  }
255
- })), m(() => w(e, v("flex-shrink-0 flex items-center justify-center", "rounded hover:bg-muted/80 cursor-pointer", "text-muted-foreground hover:text-foreground", "transition-colors duration-150", t.size === "sm" ? "w-6 h-6" : "w-7 h-7", t.slotClassNames?.addButton))), e;
297
+ })), w(() => p(e, h("flex-shrink-0 flex items-center justify-center", "rounded hover:bg-muted/80 cursor-pointer", "text-muted-foreground hover:text-foreground", "transition-colors duration-150", t.size === "sm" ? "w-6 h-6" : "w-7 h-7", t.slotClassNames?.addButton))), e;
256
298
  }
257
- }), null), u(o, f(p, {
299
+ }), null), f(o, v(x, {
258
300
  get when() {
259
- return q();
301
+ return Q();
260
302
  },
261
303
  get children() {
262
- var e = je();
263
- return e.$$click = Ie, u(e, f(He, {
304
+ var e = Ve();
305
+ return e.$$click = Ae, f(e, v(_e, {
264
306
  class: "w-4 h-4"
265
- })), m((r) => {
266
- var i = !U(), l = v("flex-shrink-0 flex items-center justify-center", "w-6 h-6 rounded cursor-pointer", "transition-all duration-150", U() ? "text-muted-foreground hover:text-foreground hover:bg-muted/80 opacity-100" : "opacity-0 pointer-events-none", t.slotClassNames?.scrollButton);
267
- return i !== r.e && (e.disabled = r.e = i), l !== r.t && w(e, r.t = l), r;
307
+ })), w((r) => {
308
+ var a = !J(), i = h("flex-shrink-0 flex items-center justify-center", "w-6 h-6 rounded cursor-pointer", "transition-all duration-150", J() ? "text-muted-foreground hover:text-foreground hover:bg-muted/80 opacity-100" : "opacity-0 pointer-events-none", t.slotClassNames?.scrollButton);
309
+ return a !== r.e && (e.disabled = r.e = a), i !== r.t && p(e, r.t = i), r;
268
310
  }, {
269
311
  e: void 0,
270
312
  t: void 0
271
313
  }), e;
272
314
  }
273
- }), null), m(() => w(s, v(
274
- "relative flex-1 flex items-end gap-0.5 overflow-x-auto",
275
- "scrollbar-none",
276
- // Hide scrollbar for all browsers
277
- "[&::-webkit-scrollbar]:hidden [-ms-overflow-style:none] [scrollbar-width:none]",
278
- t.slotClassNames?.scrollContainer
279
- ))), o;
315
+ }), null), w((e) => {
316
+ var r = h(
317
+ "relative flex-1 flex items-end gap-0.5 overflow-x-auto",
318
+ "scrollbar-none",
319
+ // Hide scrollbar for all browsers
320
+ "[&::-webkit-scrollbar]:hidden [-ms-overflow-style:none] [scrollbar-width:none]",
321
+ t.slotClassNames?.scrollContainer
322
+ ), a = t.ariaLabel;
323
+ return r !== e.e && p(n, e.e = r), a !== e.t && k(n, "aria-label", e.t = a), e;
324
+ }, {
325
+ e: void 0,
326
+ t: void 0
327
+ }), o;
280
328
  })();
281
329
  }
282
- function ot(d) {
283
- const [t, N] = oe(d, ["active", "keepMounted", "class", "children"]);
284
- return f(p, {
330
+ function lt(d) {
331
+ const [t, y] = le(d, ["active", "keepMounted", "labelledBy", "class", "children"]);
332
+ return v(x, {
285
333
  get when() {
286
334
  return t.keepMounted || t.active;
287
335
  },
288
336
  get children() {
289
- var C = Fe();
290
- return te(C, re({
337
+ var c = qe();
338
+ return oe(c, se({
339
+ get "aria-labelledby"() {
340
+ return t.labelledBy;
341
+ },
342
+ get "aria-hidden"() {
343
+ return !t.active && t.keepMounted ? "true" : void 0;
344
+ },
345
+ get tabIndex() {
346
+ return t.active ? 0 : -1;
347
+ },
291
348
  get class() {
292
- return v(!t.active && t.keepMounted && "hidden", t.class);
349
+ return h(!t.active && t.keepMounted && "hidden", t.class);
293
350
  }
294
- }, N), !1, !0), u(C, () => t.children), C;
351
+ }, y), !1, !0), f(c, () => t.children), c;
295
352
  }
296
353
  });
297
354
  }
298
355
  Re(["click", "keydown"]);
299
356
  export {
300
- ot as TabPanel,
301
- rt as Tabs
357
+ lt as TabPanel,
358
+ st as Tabs,
359
+ Ke as resolveTabNavigationTargetId
302
360
  };
@@ -86,6 +86,22 @@ export interface FloeThemeConfig {
86
86
  */
87
87
  tokens?: FloeThemeTokenOverrides;
88
88
  }
89
+ export interface FloeAccessibilityConfig {
90
+ /** Stable id applied to the primary `<main>` region for skip-link targeting. */
91
+ mainContentId: string;
92
+ /** Visible-on-focus label for the shell skip link. */
93
+ skipLinkLabel: string;
94
+ /** Accessible name for the shell top bar landmark. */
95
+ topBarLabel: string;
96
+ /** Accessible name for the desktop activity/navigation landmark. */
97
+ primaryNavigationLabel: string;
98
+ /** Accessible name for the mobile tab navigation landmark. */
99
+ mobileNavigationLabel: string;
100
+ /** Accessible name for the shared sidebar/complementary region. */
101
+ sidebarLabel: string;
102
+ /** Accessible name for the primary application content region. */
103
+ mainLabel: string;
104
+ }
89
105
  export interface FloeDeckConfig {
90
106
  storageKey: string;
91
107
  /**
@@ -152,6 +168,7 @@ export interface FloeConfig {
152
168
  commands: FloeCommandsConfig;
153
169
  layout: FloeLayoutConfig;
154
170
  theme: FloeThemeConfig;
171
+ accessibility: FloeAccessibilityConfig;
155
172
  deck: FloeDeckConfig;
156
173
  strings: FloeStrings;
157
174
  }