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