@floegence/floe-webapp-core 0.86.69 → 0.86.71

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,42 +1,42 @@
1
- import { createComponent as v, spread as ue, mergeProps as fe, insert as f, effect as x, className as B, setStyleProperty as le, memo as ae, use as ie, setAttribute as m, template as C, delegateEvents as ze } from "solid-js/web";
2
- import { splitProps as ve, Show as I, createSignal as L, untrack as de, createEffect as K, onCleanup as ce } from "solid-js";
3
- import { cn as h } from "../../utils/cn.js";
1
+ import { createComponent as h, spread as fe, mergeProps as ue, insert as u, effect as x, className as I, setStyleProperty as se, memo as le, use as ie, setAttribute as m, template as C, delegateEvents as Me } from "solid-js/web";
2
+ import { splitProps as ve, Show as S, createSignal as L, untrack as ce, createEffect as X, onCleanup as de } from "solid-js";
3
+ import { cn as v } from "../../utils/cn.js";
4
4
  import { deferAfterPaint as O } from "../../utils/defer.js";
5
- import { KeyedFor as Re } from "./KeyedFor.js";
6
- import { createUIFirstSelection as Te } from "../../utils/uiFirstSelection.js";
7
- import { useViewActivation as Ee } from "../../context/ViewActivationContext.js";
8
- import { X as He, Plus as Pe, ChevronRight as De } from "../icons/index.js";
9
- var Me = /* @__PURE__ */ C('<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__ */ C('<button type=button data-floe-interactive=icon aria-label="Scroll left">'), We = /* @__PURE__ */ C("<div>"), Fe = /* @__PURE__ */ C('<button type=button data-floe-interactive=icon aria-label="Add new tab">'), _e = /* @__PURE__ */ C('<button type=button data-floe-interactive=icon aria-label="Scroll right">'), je = /* @__PURE__ */ C("<div><div role=tablist data-floe-surface=inset data-floe-surface-part=tab-rail aria-orientation=horizontal>"), qe = /* @__PURE__ */ C("<span class=flex-shrink-0>"), Ge = /* @__PURE__ */ C("<button type=button data-floe-interactive=icon>"), Ue = /* @__PURE__ */ C('<div role=tab data-floe-surface-part=tab data-floe-interactive=item><span class="truncate max-w-32">'), Xe = /* @__PURE__ */ C("<div role=tabpanel>");
10
- const V = {
5
+ import { KeyedFor as ze } from "./KeyedFor.js";
6
+ import { createUIFirstSelection as Re } from "../../utils/uiFirstSelection.js";
7
+ import { useViewActivation as Te } from "../../context/ViewActivationContext.js";
8
+ import { X as Ee, Plus as He, ChevronRight as Pe } from "../icons/index.js";
9
+ var De = /* @__PURE__ */ C('<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__ */ C('<button type=button data-floe-interactive=icon aria-label="Scroll left">'), We = /* @__PURE__ */ C("<div>"), Fe = /* @__PURE__ */ C('<button type=button data-floe-interactive=icon aria-label="Add new tab">'), _e = /* @__PURE__ */ C('<button type=button data-floe-interactive=icon aria-label="Scroll right">'), je = /* @__PURE__ */ C("<div><div role=tablist data-floe-surface=inset data-floe-surface-part=tab-rail aria-orientation=horizontal>"), qe = /* @__PURE__ */ C("<span class=flex-shrink-0>"), Ge = /* @__PURE__ */ C("<button type=button data-floe-interactive=icon>"), Ue = /* @__PURE__ */ C('<div role=tab data-floe-surface-part=tab data-floe-interactive=item><span class="truncate max-w-32">'), Xe = /* @__PURE__ */ C("<div role=tabpanel>");
10
+ const K = {
11
11
  x: 0,
12
12
  width: 0,
13
13
  visible: !1
14
14
  };
15
15
  function Ke(i, t, b) {
16
- const d = i.filter((k) => !k.disabled);
17
- if (!d.length) return null;
18
- const p = d.findIndex((k) => k.id === t);
19
- if (p < 0) return null;
16
+ const c = i.filter((p) => !p.disabled);
17
+ if (!c.length) return null;
18
+ const k = c.findIndex((p) => p.id === t);
19
+ if (k < 0) return null;
20
20
  let g = null;
21
21
  switch (b) {
22
22
  case "ArrowRight":
23
23
  case "ArrowDown":
24
- g = (p + 1) % d.length;
24
+ g = (k + 1) % c.length;
25
25
  break;
26
26
  case "ArrowLeft":
27
27
  case "ArrowUp":
28
- g = (p - 1 + d.length) % d.length;
28
+ g = (k - 1 + c.length) % c.length;
29
29
  break;
30
30
  case "Home":
31
31
  g = 0;
32
32
  break;
33
33
  case "End":
34
- g = d.length - 1;
34
+ g = c.length - 1;
35
35
  break;
36
36
  default:
37
37
  return null;
38
38
  }
39
- return d[g]?.id ?? null;
39
+ return c[g]?.id ?? null;
40
40
  }
41
41
  function Ve(i) {
42
42
  return i === 1 || i === 2 || i === 3 || i === 4 ? i : 2;
@@ -45,22 +45,22 @@ function Ye(i) {
45
45
  switch (i) {
46
46
  case 1:
47
47
  return {
48
- tabBorderClass: "border-b",
48
+ tabMarkerClass: "after:h-px",
49
49
  sliderHeightClass: "h-px"
50
50
  };
51
51
  case 3:
52
52
  return {
53
- tabBorderClass: "border-b-[3px]",
53
+ tabMarkerClass: "after:h-[3px]",
54
54
  sliderHeightClass: "h-[3px]"
55
55
  };
56
56
  case 4:
57
57
  return {
58
- tabBorderClass: "border-b-4",
58
+ tabMarkerClass: "after:h-1",
59
59
  sliderHeightClass: "h-1"
60
60
  };
61
61
  default:
62
62
  return {
63
- tabBorderClass: "border-b-2",
63
+ tabMarkerClass: "after:h-0.5",
64
64
  sliderHeightClass: "h-0.5"
65
65
  };
66
66
  }
@@ -69,173 +69,173 @@ function Je(i) {
69
69
  switch (i) {
70
70
  case "border":
71
71
  return {
72
- tabBorderClass: "border-[var(--floe-line)]",
72
+ tabMarkerClass: "after:bg-[var(--floe-line)]",
73
73
  sliderBgClass: "bg-[var(--floe-line)]"
74
74
  };
75
75
  case "muted-foreground":
76
76
  return {
77
- tabBorderClass: "border-muted-foreground",
77
+ tabMarkerClass: "after:bg-[var(--floe-ink-ghost)]",
78
78
  sliderBgClass: "bg-[var(--floe-ink-ghost)]"
79
79
  };
80
80
  default:
81
81
  return {
82
- tabBorderClass: "border-[var(--floe-accent-ink)]",
82
+ tabMarkerClass: "after:bg-[var(--floe-accent-ink)]",
83
83
  sliderBgClass: "bg-[var(--floe-accent-ink)]"
84
84
  };
85
85
  }
86
86
  }
87
87
  const Qe = (i) => (() => {
88
- var t = Me();
88
+ var t = De();
89
89
  return x(() => m(t, "class", i.class)), t;
90
90
  })();
91
91
  function Ze(i) {
92
92
  const {
93
93
  container: t,
94
94
  tab: b
95
- } = i, d = b.offsetParent, p = b.offsetWidth;
96
- if (d === t && Number.isFinite(b.offsetLeft) && Number.isFinite(p))
95
+ } = i, c = b.offsetParent, k = b.offsetWidth;
96
+ if (c === t && Number.isFinite(b.offsetLeft) && Number.isFinite(k))
97
97
  return {
98
98
  x: b.offsetLeft,
99
- width: p,
100
- visible: p > 0
99
+ width: k,
100
+ visible: k > 0
101
101
  };
102
- const g = t.getBoundingClientRect(), k = b.getBoundingClientRect(), z = t.offsetWidth || t.clientWidth, S = g.width > 0 && z > 0 ? g.width / z : 1, R = Number.isFinite(S) && S > 0 ? S : 1, T = k.width / R;
102
+ const g = t.getBoundingClientRect(), p = b.getBoundingClientRect(), M = t.offsetWidth || t.clientWidth, A = g.width > 0 && M > 0 ? g.width / M : 1, z = Number.isFinite(A) && A > 0 ? A : 1, R = p.width / z;
103
103
  return {
104
- x: (k.left - g.left + t.scrollLeft) / R,
105
- width: T,
106
- visible: T > 0
104
+ x: (p.left - g.left + t.scrollLeft) / z,
105
+ width: R,
106
+ visible: R > 0
107
107
  };
108
108
  }
109
- function dt(i) {
110
- const [t, b] = ve(i, ["items", "activeId", "defaultActiveId", "onChange", "onActiveIdChange", "onClose", "onAdd", "showAdd", "closable", "size", "features", "slotClassNames", "ariaLabel", "class"]), d = () => t.features?.indicator?.mode ?? "activeBorder", p = () => Ve(t.features?.indicator?.thicknessPx), g = () => t.features?.indicator?.colorToken ?? "primary", k = () => t.features?.indicator?.animated ?? !0, z = () => t.features?.containerBorder ?? !0, S = () => t.features?.scrollButtons ?? "auto", R = () => t.features?.closeButton?.dangerHover ?? !0, T = () => t.features?.closeButton?.enabledByDefault ?? t.closable ?? !1, he = () => t.features?.addButton?.enabled ?? t.showAdd ?? !1, Y = () => Ye(p()), W = () => Je(g());
111
- let u;
109
+ function ct(i) {
110
+ const [t, b] = ve(i, ["items", "activeId", "defaultActiveId", "onChange", "onActiveIdChange", "onClose", "onAdd", "showAdd", "closable", "size", "features", "slotClassNames", "ariaLabel", "class"]), c = () => t.features?.indicator?.mode ?? "activeBorder", k = () => Ve(t.features?.indicator?.thicknessPx), g = () => t.features?.indicator?.colorToken ?? "primary", p = () => t.features?.indicator?.animated ?? !0, M = () => t.features?.containerBorder ?? !0, A = () => t.features?.scrollButtons ?? "auto", z = () => t.features?.closeButton?.dangerHover ?? !0, R = () => t.features?.closeButton?.enabledByDefault ?? t.closable ?? !1, he = () => t.features?.addButton?.enabled ?? t.showAdd ?? !1, V = () => Ye(k()), Y = () => Je(g());
111
+ let f;
112
112
  const J = (() => {
113
113
  try {
114
- return Ee();
114
+ return Te();
115
115
  } catch {
116
116
  return null;
117
117
  }
118
- })(), A = () => J ? J.active() : !0;
119
- let F = !1;
120
- const [E, _] = L(V), H = /* @__PURE__ */ new Map();
121
- let j = !1;
122
- const P = () => d() === "slider", Q = (s) => {
123
- if (!u || !P()) return !1;
124
- const r = H.get(s);
118
+ })(), B = () => J ? J.active() : !0;
119
+ let W = !1;
120
+ const [T, F] = L(K), E = /* @__PURE__ */ new Map();
121
+ let _ = !1;
122
+ const H = () => c() === "slider", Q = (a) => {
123
+ if (!f || !H()) return !1;
124
+ const r = E.get(a);
125
125
  if (!r) return !1;
126
- const a = Ze({
127
- container: u,
126
+ const l = Ze({
127
+ container: f,
128
128
  tab: r
129
129
  });
130
- return _(a), a.visible;
130
+ return F(l), l.visible;
131
131
  }, be = () => {
132
- if (!P()) {
133
- _(V);
132
+ if (!H()) {
133
+ F(K);
134
134
  return;
135
135
  }
136
- Q(q()) || _(V);
137
- }, D = () => {
138
- j || (j = !0, O(() => {
139
- j = !1, de(() => {
140
- A() && be();
136
+ Q(j()) || F(K);
137
+ }, P = () => {
138
+ _ || (_ = !0, O(() => {
139
+ _ = !1, ce(() => {
140
+ B() && be();
141
141
  });
142
142
  }));
143
- }, Z = () => t.activeId !== void 0, ge = () => t.onChange ?? t.onActiveIdChange, [me, we] = L(de(() => t.defaultActiveId ?? t.items[0]?.id ?? "")), ee = Te({
143
+ }, Z = () => t.activeId !== void 0, ge = () => t.onChange ?? t.onActiveIdChange, [me, we] = L(ce(() => t.defaultActiveId ?? t.items[0]?.id ?? "")), ee = Re({
144
144
  committed: () => Z() ? t.activeId : me(),
145
- commit: (s) => {
146
- Z() || we(s), ge()?.(s);
145
+ commit: (a) => {
146
+ Z() || we(a), ge()?.(a);
147
147
  }
148
- }), q = ee.visual;
149
- K(() => {
150
- A() && (d(), q(), D());
148
+ }), j = ee.visual;
149
+ X(() => {
150
+ B() && (c(), j(), P());
151
151
  });
152
- const [G, Ce] = L(!1), [U, pe] = L(!1), [ke, ye] = L(!1), te = () => S() === "auto" && ke(), xe = () => {
153
- if (!u) return;
152
+ const [q, Ce] = L(!1), [G, ke] = L(!1), [pe, ye] = L(!1), te = () => A() === "auto" && pe(), xe = () => {
153
+ if (!f) return;
154
154
  const {
155
- scrollLeft: s,
155
+ scrollLeft: a,
156
156
  scrollWidth: r,
157
- clientWidth: a
158
- } = u, e = r > a;
159
- ye(e), Ce(s > 0), pe(s + a < r - 1);
160
- }, M = () => {
161
- F || (F = !0, O(() => {
162
- F = !1, A() && xe();
157
+ clientWidth: l
158
+ } = f, e = r > l;
159
+ ye(e), Ce(a > 0), ke(a + l < r - 1);
160
+ }, D = () => {
161
+ W || (W = !0, O(() => {
162
+ W = !1, B() && xe();
163
163
  }));
164
- }, Be = () => {
165
- u && u.scrollBy({
164
+ }, Ie = () => {
165
+ f && f.scrollBy({
166
166
  left: -150,
167
167
  behavior: "smooth"
168
168
  });
169
- }, Ie = () => {
170
- u && u.scrollBy({
169
+ }, Se = () => {
170
+ f && f.scrollBy({
171
171
  left: 150,
172
172
  behavior: "smooth"
173
173
  });
174
174
  };
175
- K(() => {
176
- if (!u || !A()) return;
177
- M(), D();
178
- const s = () => M();
179
- u.addEventListener("scroll", s);
175
+ X(() => {
176
+ if (!f || !B()) return;
177
+ D(), P();
178
+ const a = () => D();
179
+ f.addEventListener("scroll", a);
180
180
  const r = () => {
181
- M(), D();
181
+ D(), P();
182
182
  };
183
- let a;
184
- typeof ResizeObserver < "u" ? (a = new ResizeObserver(r), a.observe(u)) : typeof window < "u" && window.addEventListener("resize", r), ce(() => {
185
- u?.removeEventListener("scroll", s), a?.disconnect(), typeof window < "u" && window.removeEventListener("resize", r);
183
+ let l;
184
+ typeof ResizeObserver < "u" ? (l = new ResizeObserver(r), l.observe(f)) : typeof window < "u" && window.addEventListener("resize", r), de(() => {
185
+ f?.removeEventListener("scroll", a), l?.disconnect(), typeof window < "u" && window.removeEventListener("resize", r);
186
186
  });
187
- }), K(() => {
188
- A() && (t.items.length, M(), D());
187
+ }), X(() => {
188
+ B() && (t.items.length, D(), P());
189
189
  });
190
- const X = (s, r) => {
191
- r || (ee.request(s), P() && Q(s));
192
- }, Se = (s) => {
193
- const r = t.items.find((e) => e.id === s);
190
+ const U = (a, r) => {
191
+ r || (ee.request(a), H() && Q(a));
192
+ }, Ae = (a) => {
193
+ const r = t.items.find((e) => e.id === a);
194
194
  if (!r) return;
195
- X(r.id, r.disabled);
196
- const a = H.get(r.id);
197
- a?.focus({
195
+ U(r.id, r.disabled);
196
+ const l = E.get(r.id);
197
+ l?.focus({
198
198
  preventScroll: !0
199
- }), a?.scrollIntoView({
199
+ }), l?.scrollIntoView({
200
200
  block: "nearest",
201
201
  inline: "nearest"
202
202
  });
203
- }, Ae = (s, r) => {
204
- const a = Ke(t.items, r.id, s.key);
205
- a && (s.preventDefault(), Se(a));
206
- }, Ne = (s, r) => {
207
- s.stopPropagation();
208
- const a = t.onClose;
209
- if (!a) return;
203
+ }, Be = (a, r) => {
204
+ const l = Ke(t.items, r.id, a.key);
205
+ l && (a.preventDefault(), Ae(l));
206
+ }, Ne = (a, r) => {
207
+ a.stopPropagation();
208
+ const l = t.onClose;
209
+ if (!l) return;
210
210
  const e = r;
211
- O(() => a(e));
211
+ O(() => l(e));
212
212
  }, $e = {
213
213
  sm: "h-[var(--floe-control-height-sm)] px-[var(--floe-control-padding-sm)]",
214
214
  md: "h-[var(--floe-control-height-md)] px-[var(--floe-control-padding-md)]"
215
- }, Le = (s, r) => {
216
- const a = h("inline-flex items-center gap-1.5 whitespace-nowrap", "text-[length:var(--floe-type-control)] leading-[var(--floe-line-control)]"), e = r ? "cursor-not-allowed opacity-50" : "cursor-pointer", o = (() => {
217
- const c = d();
218
- return c === "none" || c === "slider" && E().visible ? "border-transparent" : W().tabBorderClass;
219
- })();
220
- return h(
221
- a,
215
+ }, Le = (a, r) => {
216
+ const l = v("relative inline-flex items-center gap-1.5 whitespace-nowrap", "text-[length:var(--floe-type-control)] leading-[var(--floe-line-control)]"), e = r ? "cursor-not-allowed opacity-50" : "cursor-pointer", o = () => {
217
+ const d = c();
218
+ return d === "none" || d === "slider" && T().visible ? "" : v("after:pointer-events-none after:absolute after:bottom-0 after:inset-x-2 after:rounded-full after:content-['']", V().tabMarkerClass, Y().tabMarkerClass);
219
+ };
220
+ return v(
221
+ l,
222
222
  e,
223
223
  $e[t.size ?? "md"],
224
224
  "rounded-control",
225
- Y().tabBorderClass,
225
+ "border",
226
226
  /* The selected face is painted by the surface layer (`data-floe-surface`
227
227
  * plus `aria-selected`), which keeps the fill, hairline and first
228
228
  * elevation step identical to every other selected control. */
229
- s ? h(o, "text-foreground", t.slotClassNames?.tabActive) : h("border-transparent text-[var(--floe-ink-soft)]", t.slotClassNames?.tabInactive),
229
+ a ? v(o(), "text-foreground", t.slotClassNames?.tabActive) : v("border-transparent text-[var(--floe-ink-soft)]", t.slotClassNames?.tabInactive),
230
230
  r && "opacity-50",
231
231
  t.slotClassNames?.tab
232
232
  );
233
233
  };
234
234
  return (() => {
235
- var s = je(), r = s.firstChild;
236
- ue(s, fe({
235
+ var a = je(), r = a.firstChild;
236
+ fe(a, ue({
237
237
  get class() {
238
- return h(
238
+ return v(
239
239
  /* One strip, one baseline: the rail, the scroll buttons and the add
240
240
  * button all take their height from the row, so nothing floats above
241
241
  * the rule. The rail's fill is carried onto those trailing controls,
@@ -243,88 +243,88 @@ function dt(i) {
243
243
  * control. */
244
244
  "relative flex items-stretch",
245
245
  t.size === "sm" ? "min-h-[var(--floe-control-height-sm)]" : "min-h-[var(--floe-control-height-md)]",
246
- z() && "border-b border-[var(--floe-line)]",
246
+ M() && "border-b border-[var(--floe-line)]",
247
247
  t.slotClassNames?.root,
248
248
  t.class
249
249
  );
250
250
  }
251
- }, b), !1, !0), f(s, v(I, {
251
+ }, b), !1, !0), u(a, h(S, {
252
252
  get when() {
253
253
  return te();
254
254
  },
255
255
  get children() {
256
256
  var e = Oe();
257
- return e.$$click = Be, f(e, v(Qe, {
257
+ return e.$$click = Ie, u(e, h(Qe, {
258
258
  class: "w-4 h-4"
259
259
  })), x((o) => {
260
- var c = !G(), l = h("flex-shrink-0 flex items-center justify-center", "w-6 rounded-control cursor-pointer bg-[var(--floe-well)] border border-[var(--floe-line)]", "transition-opacity duration-[var(--floe-duration-fast)] ease-[var(--floe-ease-out)]", G() ? "text-[var(--floe-ink-quiet)] hover:bg-[var(--floe-state-hover)] opacity-100" : "opacity-0 pointer-events-none", t.slotClassNames?.scrollButton);
261
- return c !== o.e && (e.disabled = o.e = c), l !== o.t && B(e, o.t = l), o;
260
+ var d = !q(), s = v("flex-shrink-0 flex items-center justify-center", "w-6 rounded-control cursor-pointer bg-[var(--floe-well)] border border-[var(--floe-line)]", "transition-opacity duration-[var(--floe-duration-fast)] ease-[var(--floe-ease-out)]", q() ? "text-[var(--floe-ink-quiet)] hover:bg-[var(--floe-state-hover)] opacity-100" : "opacity-0 pointer-events-none", t.slotClassNames?.scrollButton);
261
+ return d !== o.e && (e.disabled = o.e = d), s !== o.t && I(e, o.t = s), o;
262
262
  }, {
263
263
  e: void 0,
264
264
  t: void 0
265
265
  }), e;
266
266
  }
267
267
  }), r);
268
- var a = u;
269
- return typeof a == "function" ? ie(a, r) : u = r, f(r, v(I, {
268
+ var l = f;
269
+ return typeof l == "function" ? ie(l, r) : f = r, u(r, h(S, {
270
270
  get when() {
271
- return ae(() => !!P())() && E().visible;
271
+ return le(() => !!H())() && T().visible;
272
272
  },
273
273
  get children() {
274
274
  var e = We();
275
275
  return x((o) => {
276
- var c = h("pointer-events-none absolute bottom-0 left-0 z-10", Y().sliderHeightClass, W().sliderBgClass, k() ? "transition-[transform,width] duration-[var(--floe-duration-base)] ease-out motion-reduce:transition-none" : "transition-none", "will-change-transform", t.slotClassNames?.indicator), l = `translate3d(${E().x}px, 0, 0)`, y = `${E().width}px`;
277
- return c !== o.e && B(e, o.e = c), l !== o.t && le(e, "transform", o.t = l), y !== o.a && le(e, "width", o.a = y), o;
276
+ var d = v("pointer-events-none absolute bottom-0 left-0 z-10", V().sliderHeightClass, Y().sliderBgClass, p() ? "transition-[transform,width] duration-[var(--floe-duration-base)] ease-out motion-reduce:transition-none" : "transition-none", "will-change-transform", t.slotClassNames?.indicator), s = `translate3d(${T().x}px, 0, 0)`, y = `${T().width}px`;
277
+ return d !== o.e && I(e, o.e = d), s !== o.t && se(e, "transform", o.t = s), y !== o.a && se(e, "width", o.a = y), o;
278
278
  }, {
279
279
  e: void 0,
280
280
  t: void 0,
281
281
  a: void 0
282
282
  }), e;
283
283
  }
284
- }), null), f(r, v(Re, {
284
+ }), null), u(r, h(ze, {
285
285
  get each() {
286
286
  return t.items;
287
287
  },
288
288
  by: (e) => e.id,
289
289
  children: (e) => {
290
- const o = () => e().id === q(), c = () => e().closable ?? T();
290
+ const o = () => e().id === j(), d = () => e().closable ?? R();
291
291
  return (() => {
292
- var l = Ue(), y = l.firstChild;
293
- return l.$$keydown = (n) => {
292
+ var s = Ue(), y = s.firstChild;
293
+ return s.$$keydown = (n) => {
294
294
  if (n.key === "Enter" || n.key === " ") {
295
- n.preventDefault(), X(e().id, e().disabled);
295
+ n.preventDefault(), U(e().id, e().disabled);
296
296
  return;
297
297
  }
298
- Ae(n, e());
299
- }, l.$$click = () => X(e().id, e().disabled), ie((n) => {
300
- H.set(e().id, n), ce(() => H.delete(e().id));
301
- }, l), f(l, v(I, {
298
+ Be(n, e());
299
+ }, s.$$click = () => U(e().id, e().disabled), ie((n) => {
300
+ E.set(e().id, n), de(() => E.delete(e().id));
301
+ }, s), u(s, h(S, {
302
302
  get when() {
303
303
  return e().icon;
304
304
  },
305
305
  get children() {
306
306
  var n = qe();
307
- return f(n, () => e().icon), n;
307
+ return u(n, () => e().icon), n;
308
308
  }
309
- }), y), f(y, () => e().label), f(l, v(I, {
309
+ }), y), u(y, () => e().label), u(s, h(S, {
310
310
  get when() {
311
- return ae(() => !!c())() && !e().disabled;
311
+ return le(() => !!d())() && !e().disabled;
312
312
  },
313
313
  get children() {
314
314
  var n = Ge();
315
- return n.$$click = (w) => Ne(w, e().id), f(n, v(He, {
315
+ return n.$$click = (w) => Ne(w, e().id), u(n, h(Ee, {
316
316
  class: "w-3 h-3"
317
317
  })), x((w) => {
318
- var N = h("flex-shrink-0 flex items-center justify-center", "w-5 h-5 rounded-control cursor-pointer", "bg-transparent text-[var(--floe-ink-quiet)]", R() ? "hover:bg-error hover:text-error-foreground" : "hover:bg-[var(--floe-state-hover)]", "ml-1.5", t.slotClassNames?.closeButton), $ = `Close ${e().label}`;
319
- return N !== w.e && B(n, w.e = N), $ !== w.t && m(n, "aria-label", w.t = $), w;
318
+ var N = v("flex-shrink-0 flex items-center justify-center", "w-5 h-5 rounded-control cursor-pointer", "bg-transparent text-[var(--floe-ink-quiet)]", z() ? "hover:bg-error hover:text-error-foreground" : "hover:bg-[var(--floe-state-hover)]", "ml-1.5", t.slotClassNames?.closeButton), $ = `Close ${e().label}`;
319
+ return N !== w.e && I(n, w.e = N), $ !== w.t && m(n, "aria-label", w.t = $), w;
320
320
  }, {
321
321
  e: void 0,
322
322
  t: void 0
323
323
  }), n;
324
324
  }
325
325
  }), null), x((n) => {
326
- var w = Le(o(), e().disabled), N = e().domId, $ = e().panelId, re = o() ? "raised" : "flat", oe = o(), ne = e().disabled, se = e().disabled ? -1 : o() ? 0 : -1;
327
- return w !== n.e && B(l, n.e = w), N !== n.t && m(l, "id", n.t = N), $ !== n.a && m(l, "aria-controls", n.a = $), re !== n.o && m(l, "data-floe-surface", n.o = re), oe !== n.i && m(l, "aria-selected", n.i = oe), ne !== n.n && m(l, "aria-disabled", n.n = ne), se !== n.s && m(l, "tabindex", n.s = se), n;
326
+ var w = Le(o(), e().disabled), N = e().domId, $ = e().panelId, re = o() ? "raised" : "flat", oe = o(), ne = e().disabled, ae = e().disabled ? -1 : o() ? 0 : -1;
327
+ return w !== n.e && I(s, n.e = w), N !== n.t && m(s, "id", n.t = N), $ !== n.a && m(s, "aria-controls", n.a = $), re !== n.o && m(s, "data-floe-surface", n.o = re), oe !== n.i && m(s, "aria-selected", n.i = oe), ne !== n.n && m(s, "aria-disabled", n.n = ne), ae !== n.s && m(s, "tabindex", n.s = ae), n;
328
328
  }, {
329
329
  e: void 0,
330
330
  t: void 0,
@@ -333,10 +333,10 @@ function dt(i) {
333
333
  i: void 0,
334
334
  n: void 0,
335
335
  s: void 0
336
- }), l;
336
+ }), s;
337
337
  })();
338
338
  }
339
- }), null), f(s, v(I, {
339
+ }), null), u(a, h(S, {
340
340
  get when() {
341
341
  return he();
342
342
  },
@@ -345,54 +345,54 @@ function dt(i) {
345
345
  return e.$$click = () => {
346
346
  const o = t.onAdd;
347
347
  o && O(() => o());
348
- }, f(e, v(Pe, {
348
+ }, u(e, h(He, {
349
349
  get class() {
350
350
  return t.size === "sm" ? "w-3.5 h-3.5" : "w-4 h-4";
351
351
  }
352
- })), x(() => B(e, h("flex-shrink-0 flex items-center justify-center", "rounded-control cursor-pointer bg-[var(--floe-well)] border border-[var(--floe-line)]", "text-[var(--floe-ink-quiet)] hover:bg-[var(--floe-state-hover)] hover:text-foreground", t.size === "sm" ? "w-7" : "w-8", t.slotClassNames?.addButton))), e;
352
+ })), x(() => I(e, v("flex-shrink-0 flex items-center justify-center", "rounded-control cursor-pointer bg-[var(--floe-well)] border border-[var(--floe-line)]", "text-[var(--floe-ink-quiet)] hover:bg-[var(--floe-state-hover)] hover:text-foreground", t.size === "sm" ? "w-7" : "w-8", t.slotClassNames?.addButton))), e;
353
353
  }
354
- }), null), f(s, v(I, {
354
+ }), null), u(a, h(S, {
355
355
  get when() {
356
356
  return te();
357
357
  },
358
358
  get children() {
359
359
  var e = _e();
360
- return e.$$click = Ie, f(e, v(De, {
360
+ return e.$$click = Se, u(e, h(Pe, {
361
361
  class: "w-4 h-4"
362
362
  })), x((o) => {
363
- var c = !U(), l = h("flex-shrink-0 flex items-center justify-center", "w-6 rounded-control cursor-pointer bg-[var(--floe-well)] border border-[var(--floe-line)]", "transition-opacity duration-[var(--floe-duration-fast)] ease-[var(--floe-ease-out)]", U() ? "text-[var(--floe-ink-quiet)] hover:bg-[var(--floe-state-hover)] opacity-100" : "opacity-0 pointer-events-none", t.slotClassNames?.scrollButton);
364
- return c !== o.e && (e.disabled = o.e = c), l !== o.t && B(e, o.t = l), o;
363
+ var d = !G(), s = v("flex-shrink-0 flex items-center justify-center", "w-6 rounded-control cursor-pointer bg-[var(--floe-well)] border border-[var(--floe-line)]", "transition-opacity duration-[var(--floe-duration-fast)] ease-[var(--floe-ease-out)]", G() ? "text-[var(--floe-ink-quiet)] hover:bg-[var(--floe-state-hover)] opacity-100" : "opacity-0 pointer-events-none", t.slotClassNames?.scrollButton);
364
+ return d !== o.e && (e.disabled = o.e = d), s !== o.t && I(e, o.t = s), o;
365
365
  }, {
366
366
  e: void 0,
367
367
  t: void 0
368
368
  }), e;
369
369
  }
370
370
  }), null), x((e) => {
371
- var o = h(
372
- "relative flex-1 flex items-end gap-0.5 overflow-x-auto",
371
+ var o = v(
372
+ "relative flex-1 flex items-center gap-0.5 overflow-x-auto",
373
373
  "scrollbar-none",
374
374
  // Hide scrollbar for all browsers
375
375
  "[&::-webkit-scrollbar]:hidden [-ms-overflow-style:none] [scrollbar-width:none]",
376
376
  t.slotClassNames?.scrollContainer
377
- ), c = G() ? "" : void 0, l = U() ? "" : void 0, y = t.ariaLabel;
378
- return o !== e.e && B(r, e.e = o), c !== e.t && m(r, "data-floe-overflow-start", e.t = c), l !== e.a && m(r, "data-floe-overflow-end", e.a = l), y !== e.o && m(r, "aria-label", e.o = y), e;
377
+ ), d = q() ? "" : void 0, s = G() ? "" : void 0, y = t.ariaLabel;
378
+ return o !== e.e && I(r, e.e = o), d !== e.t && m(r, "data-floe-overflow-start", e.t = d), s !== e.a && m(r, "data-floe-overflow-end", e.a = s), y !== e.o && m(r, "aria-label", e.o = y), e;
379
379
  }, {
380
380
  e: void 0,
381
381
  t: void 0,
382
382
  a: void 0,
383
383
  o: void 0
384
- }), s;
384
+ }), a;
385
385
  })();
386
386
  }
387
- function ct(i) {
387
+ function dt(i) {
388
388
  const [t, b] = ve(i, ["active", "keepMounted", "labelledBy", "class", "children"]);
389
- return v(I, {
389
+ return h(S, {
390
390
  get when() {
391
391
  return t.keepMounted || t.active;
392
392
  },
393
393
  get children() {
394
- var d = Xe();
395
- return ue(d, fe({
394
+ var c = Xe();
395
+ return fe(c, ue({
396
396
  get "aria-labelledby"() {
397
397
  return t.labelledBy;
398
398
  },
@@ -403,15 +403,15 @@ function ct(i) {
403
403
  return t.active ? 0 : -1;
404
404
  },
405
405
  get class() {
406
- return h(!t.active && t.keepMounted && "hidden", t.class);
406
+ return v(!t.active && t.keepMounted && "hidden", t.class);
407
407
  }
408
- }, b), !1, !0), f(d, () => t.children), d;
408
+ }, b), !1, !0), u(c, () => t.children), c;
409
409
  }
410
410
  });
411
411
  }
412
- ze(["click", "keydown"]);
412
+ Me(["click", "keydown"]);
413
413
  export {
414
- ct as TabPanel,
415
- dt as Tabs,
414
+ dt as TabPanel,
415
+ ct as Tabs,
416
416
  Ke as resolveTabNavigationTargetId
417
417
  };