@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.
- package/dist/chat.css +33 -7
- package/dist/components/chat/blocks/FileBlock.js +42 -27
- package/dist/components/chat/blocks/ToolCallBlock.js +150 -149
- package/dist/components/file-browser/Breadcrumb.js +73 -72
- package/dist/components/layout/ActivityBar.d.ts +1 -0
- package/dist/components/layout/ActivityBar.js +51 -45
- package/dist/components/layout/MobileTabBar.d.ts +1 -0
- package/dist/components/layout/MobileTabBar.js +109 -65
- package/dist/components/layout/Shell.js +190 -158
- package/dist/components/layout/Sidebar.d.ts +1 -0
- package/dist/components/layout/Sidebar.js +33 -31
- package/dist/components/layout/SidebarPane.d.ts +1 -0
- package/dist/components/layout/SidebarPane.js +40 -37
- package/dist/components/layout/TopBar.d.ts +1 -0
- package/dist/components/layout/TopBar.js +23 -22
- package/dist/components/ui/Dropdown.d.ts +13 -0
- package/dist/components/ui/Dropdown.js +263 -145
- package/dist/components/ui/Tabs.d.ts +4 -0
- package/dist/components/ui/Tabs.js +207 -149
- package/dist/context/FloeConfigContext.d.ts +17 -0
- package/dist/context/FloeConfigContext.js +34 -25
- package/dist/context/NotificationContext.js +76 -69
- package/dist/styles/tokens.d.ts +4 -4
- package/dist/styles/tokens.js +55 -14
- package/dist/styles.css +1 -1
- package/dist/themes/light.css +2 -2
- package/package.json +1 -1
|
@@ -1,14 +1,40 @@
|
|
|
1
|
-
import { createComponent as
|
|
2
|
-
import { splitProps as
|
|
3
|
-
import { cn as
|
|
4
|
-
import { deferAfterPaint as
|
|
5
|
-
import { useViewActivation as
|
|
6
|
-
import { X as
|
|
7
|
-
var
|
|
8
|
-
function
|
|
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
|
|
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
|
|
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
|
|
55
|
-
var t =
|
|
56
|
-
return
|
|
80
|
+
const Ye = (d) => (() => {
|
|
81
|
+
var t = Me();
|
|
82
|
+
return w(() => k(t, "class", d.class)), t;
|
|
57
83
|
})();
|
|
58
|
-
function
|
|
59
|
-
const [t,
|
|
60
|
-
let
|
|
61
|
-
const
|
|
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
|
|
89
|
+
return He();
|
|
64
90
|
} catch {
|
|
65
91
|
return null;
|
|
66
92
|
}
|
|
67
|
-
})(),
|
|
68
|
-
let
|
|
69
|
-
const [fe, ve] =
|
|
70
|
-
let
|
|
71
|
-
const
|
|
72
|
-
if (!
|
|
73
|
-
const
|
|
74
|
-
if (!
|
|
75
|
-
const
|
|
76
|
-
return ve(r), be(
|
|
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
|
-
|
|
104
|
+
if (!R()) {
|
|
105
|
+
M(!1);
|
|
80
106
|
return;
|
|
81
107
|
}
|
|
82
|
-
|
|
83
|
-
},
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
108
|
+
U(j()) || M(!1);
|
|
109
|
+
}, T = () => {
|
|
110
|
+
O || (O = !0, L(() => {
|
|
111
|
+
O = !1, re(() => {
|
|
112
|
+
A() && ge();
|
|
87
113
|
});
|
|
88
114
|
}));
|
|
89
|
-
},
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
}),
|
|
93
|
-
|
|
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 [
|
|
96
|
-
if (!
|
|
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:
|
|
100
|
-
clientWidth:
|
|
101
|
-
} =
|
|
102
|
-
ye(e), pe(o > 0), xe(o +
|
|
103
|
-
},
|
|
104
|
-
|
|
105
|
-
|
|
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
|
-
},
|
|
108
|
-
|
|
133
|
+
}, Ie = () => {
|
|
134
|
+
u && u.scrollBy({
|
|
109
135
|
left: -150,
|
|
110
136
|
behavior: "smooth"
|
|
111
137
|
});
|
|
112
|
-
},
|
|
113
|
-
|
|
138
|
+
}, Ae = () => {
|
|
139
|
+
u && u.scrollBy({
|
|
114
140
|
left: 150,
|
|
115
141
|
behavior: "smooth"
|
|
116
142
|
});
|
|
117
143
|
};
|
|
118
|
-
|
|
119
|
-
if (!
|
|
120
|
-
|
|
121
|
-
const o = () =>
|
|
122
|
-
|
|
123
|
-
const
|
|
124
|
-
|
|
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
|
|
127
|
-
typeof ResizeObserver < "u" ? (
|
|
128
|
-
|
|
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
|
-
}),
|
|
131
|
-
|
|
156
|
+
}), E(() => {
|
|
157
|
+
A() && (t.items.length, H(), T());
|
|
132
158
|
});
|
|
133
|
-
const
|
|
134
|
-
if (
|
|
135
|
-
const
|
|
136
|
-
if (
|
|
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
|
-
|
|
164
|
+
L(() => s(e));
|
|
139
165
|
}
|
|
140
|
-
},
|
|
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
|
|
143
|
-
if (!
|
|
144
|
-
const e =
|
|
145
|
-
|
|
146
|
-
},
|
|
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
|
-
},
|
|
150
|
-
const
|
|
151
|
-
const
|
|
152
|
-
return
|
|
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
|
|
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(),
|
|
158
|
-
|
|
195
|
+
var o = We(), n = o.firstChild;
|
|
196
|
+
oe(o, se({
|
|
159
197
|
get class() {
|
|
160
|
-
return
|
|
198
|
+
return h("relative flex items-center gap-0.5", ae() && "border-b border-border", t.slotClassNames?.root, t.class);
|
|
161
199
|
}
|
|
162
|
-
},
|
|
200
|
+
}, y), !1, !0), f(o, v(x, {
|
|
163
201
|
get when() {
|
|
164
|
-
return
|
|
202
|
+
return Q();
|
|
165
203
|
},
|
|
166
204
|
get children() {
|
|
167
|
-
var e =
|
|
168
|
-
return e.$$click =
|
|
205
|
+
var e = Oe();
|
|
206
|
+
return e.$$click = Ie, f(e, v(Ye, {
|
|
169
207
|
class: "w-4 h-4"
|
|
170
|
-
})),
|
|
171
|
-
var
|
|
172
|
-
return
|
|
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
|
-
}),
|
|
179
|
-
var
|
|
180
|
-
return typeof
|
|
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
|
|
220
|
+
return ee(() => !!R())() && F();
|
|
183
221
|
},
|
|
184
222
|
get children() {
|
|
185
|
-
var e =
|
|
186
|
-
return
|
|
187
|
-
var
|
|
188
|
-
return
|
|
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),
|
|
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 ===
|
|
238
|
+
const r = () => e.id === j(), a = () => e.closable ?? ce();
|
|
201
239
|
return (() => {
|
|
202
|
-
var
|
|
203
|
-
return
|
|
204
|
-
(
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
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
|
|
213
|
-
return
|
|
254
|
+
var l = Fe();
|
|
255
|
+
return f(l, () => e.icon), l;
|
|
214
256
|
}
|
|
215
|
-
}),
|
|
257
|
+
}), S), f(S, () => e.label), f(i, v(x, {
|
|
216
258
|
get when() {
|
|
217
|
-
return
|
|
259
|
+
return ee(() => !!a())() && !e.disabled;
|
|
218
260
|
},
|
|
219
261
|
get children() {
|
|
220
|
-
var
|
|
221
|
-
return
|
|
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
|
-
})),
|
|
224
|
-
var
|
|
225
|
-
return
|
|
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
|
-
}),
|
|
271
|
+
}), l;
|
|
230
272
|
}
|
|
231
|
-
}), null),
|
|
232
|
-
var
|
|
233
|
-
return
|
|
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
|
-
}),
|
|
281
|
+
}), i;
|
|
240
282
|
})();
|
|
241
283
|
}
|
|
242
|
-
}), null),
|
|
284
|
+
}), null), f(o, v(x, {
|
|
243
285
|
get when() {
|
|
244
286
|
return ue();
|
|
245
287
|
},
|
|
246
288
|
get children() {
|
|
247
|
-
var e =
|
|
289
|
+
var e = De();
|
|
248
290
|
return e.$$click = () => {
|
|
249
291
|
const r = t.onAdd;
|
|
250
|
-
r &&
|
|
251
|
-
},
|
|
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
|
-
})),
|
|
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),
|
|
299
|
+
}), null), f(o, v(x, {
|
|
258
300
|
get when() {
|
|
259
|
-
return
|
|
301
|
+
return Q();
|
|
260
302
|
},
|
|
261
303
|
get children() {
|
|
262
|
-
var e =
|
|
263
|
-
return e.$$click =
|
|
304
|
+
var e = Ve();
|
|
305
|
+
return e.$$click = Ae, f(e, v(_e, {
|
|
264
306
|
class: "w-4 h-4"
|
|
265
|
-
})),
|
|
266
|
-
var
|
|
267
|
-
return
|
|
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),
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
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
|
|
283
|
-
const [t,
|
|
284
|
-
return
|
|
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
|
|
290
|
-
return
|
|
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
|
|
349
|
+
return h(!t.active && t.keepMounted && "hidden", t.class);
|
|
293
350
|
}
|
|
294
|
-
},
|
|
351
|
+
}, y), !1, !0), f(c, () => t.children), c;
|
|
295
352
|
}
|
|
296
353
|
});
|
|
297
354
|
}
|
|
298
355
|
Re(["click", "keydown"]);
|
|
299
356
|
export {
|
|
300
|
-
|
|
301
|
-
|
|
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
|
}
|