@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.
- package/dist/components/layout/SplitWorkspace.d.ts +21 -0
- package/dist/components/layout/SplitWorkspace.js +182 -0
- package/dist/components/layout/index.d.ts +2 -0
- package/dist/components/layout/splitWorkspaceModel.d.ts +38 -0
- package/dist/components/layout/splitWorkspaceModel.js +96 -0
- package/dist/components/ui/Dropdown.d.ts +7 -0
- package/dist/components/ui/Dropdown.js +156 -145
- package/dist/components/ui/FloatingWindow.js +1 -1
- package/dist/components/ui/Select.accessibility.test.d.ts +1 -0
- package/dist/components/ui/Tabs.js +161 -161
- package/dist/full.js +468 -455
- package/dist/layout.js +45 -32
- package/dist/styles.css +1 -1
- package/package.json +1 -1
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
import { createComponent as
|
|
2
|
-
import { splitProps as ve, Show as
|
|
3
|
-
import { cn as
|
|
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
|
|
6
|
-
import { createUIFirstSelection as
|
|
7
|
-
import { useViewActivation as
|
|
8
|
-
import { X as
|
|
9
|
-
var
|
|
10
|
-
const
|
|
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
|
|
17
|
-
if (!
|
|
18
|
-
const
|
|
19
|
-
if (
|
|
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 = (
|
|
24
|
+
g = (k + 1) % c.length;
|
|
25
25
|
break;
|
|
26
26
|
case "ArrowLeft":
|
|
27
27
|
case "ArrowUp":
|
|
28
|
-
g = (
|
|
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 =
|
|
34
|
+
g = c.length - 1;
|
|
35
35
|
break;
|
|
36
36
|
default:
|
|
37
37
|
return null;
|
|
38
38
|
}
|
|
39
|
-
return
|
|
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
|
-
|
|
48
|
+
tabMarkerClass: "after:h-px",
|
|
49
49
|
sliderHeightClass: "h-px"
|
|
50
50
|
};
|
|
51
51
|
case 3:
|
|
52
52
|
return {
|
|
53
|
-
|
|
53
|
+
tabMarkerClass: "after:h-[3px]",
|
|
54
54
|
sliderHeightClass: "h-[3px]"
|
|
55
55
|
};
|
|
56
56
|
case 4:
|
|
57
57
|
return {
|
|
58
|
-
|
|
58
|
+
tabMarkerClass: "after:h-1",
|
|
59
59
|
sliderHeightClass: "h-1"
|
|
60
60
|
};
|
|
61
61
|
default:
|
|
62
62
|
return {
|
|
63
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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 =
|
|
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,
|
|
96
|
-
if (
|
|
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:
|
|
100
|
-
visible:
|
|
99
|
+
width: k,
|
|
100
|
+
visible: k > 0
|
|
101
101
|
};
|
|
102
|
-
const g = t.getBoundingClientRect(),
|
|
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: (
|
|
105
|
-
width:
|
|
106
|
-
visible:
|
|
104
|
+
x: (p.left - g.left + t.scrollLeft) / z,
|
|
105
|
+
width: R,
|
|
106
|
+
visible: R > 0
|
|
107
107
|
};
|
|
108
108
|
}
|
|
109
|
-
function
|
|
110
|
-
const [t, b] = ve(i, ["items", "activeId", "defaultActiveId", "onChange", "onActiveIdChange", "onClose", "onAdd", "showAdd", "closable", "size", "features", "slotClassNames", "ariaLabel", "class"]),
|
|
111
|
-
let
|
|
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
|
|
114
|
+
return Te();
|
|
115
115
|
} catch {
|
|
116
116
|
return null;
|
|
117
117
|
}
|
|
118
|
-
})(),
|
|
119
|
-
let
|
|
120
|
-
const [
|
|
121
|
-
let
|
|
122
|
-
const
|
|
123
|
-
if (!
|
|
124
|
-
const r =
|
|
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
|
|
127
|
-
container:
|
|
126
|
+
const l = Ze({
|
|
127
|
+
container: f,
|
|
128
128
|
tab: r
|
|
129
129
|
});
|
|
130
|
-
return
|
|
130
|
+
return F(l), l.visible;
|
|
131
131
|
}, be = () => {
|
|
132
|
-
if (!
|
|
133
|
-
|
|
132
|
+
if (!H()) {
|
|
133
|
+
F(K);
|
|
134
134
|
return;
|
|
135
135
|
}
|
|
136
|
-
Q(
|
|
137
|
-
},
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
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(
|
|
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: (
|
|
146
|
-
Z() || we(
|
|
145
|
+
commit: (a) => {
|
|
146
|
+
Z() || we(a), ge()?.(a);
|
|
147
147
|
}
|
|
148
|
-
}),
|
|
149
|
-
|
|
150
|
-
|
|
148
|
+
}), j = ee.visual;
|
|
149
|
+
X(() => {
|
|
150
|
+
B() && (c(), j(), P());
|
|
151
151
|
});
|
|
152
|
-
const [
|
|
153
|
-
if (!
|
|
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:
|
|
155
|
+
scrollLeft: a,
|
|
156
156
|
scrollWidth: r,
|
|
157
|
-
clientWidth:
|
|
158
|
-
} =
|
|
159
|
-
ye(e), Ce(
|
|
160
|
-
},
|
|
161
|
-
|
|
162
|
-
|
|
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
|
-
},
|
|
165
|
-
|
|
164
|
+
}, Ie = () => {
|
|
165
|
+
f && f.scrollBy({
|
|
166
166
|
left: -150,
|
|
167
167
|
behavior: "smooth"
|
|
168
168
|
});
|
|
169
|
-
},
|
|
170
|
-
|
|
169
|
+
}, Se = () => {
|
|
170
|
+
f && f.scrollBy({
|
|
171
171
|
left: 150,
|
|
172
172
|
behavior: "smooth"
|
|
173
173
|
});
|
|
174
174
|
};
|
|
175
|
-
|
|
176
|
-
if (!
|
|
177
|
-
|
|
178
|
-
const
|
|
179
|
-
|
|
175
|
+
X(() => {
|
|
176
|
+
if (!f || !B()) return;
|
|
177
|
+
D(), P();
|
|
178
|
+
const a = () => D();
|
|
179
|
+
f.addEventListener("scroll", a);
|
|
180
180
|
const r = () => {
|
|
181
|
-
|
|
181
|
+
D(), P();
|
|
182
182
|
};
|
|
183
|
-
let
|
|
184
|
-
typeof ResizeObserver < "u" ? (
|
|
185
|
-
|
|
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
|
-
}),
|
|
188
|
-
|
|
187
|
+
}), X(() => {
|
|
188
|
+
B() && (t.items.length, D(), P());
|
|
189
189
|
});
|
|
190
|
-
const
|
|
191
|
-
r || (ee.request(
|
|
192
|
-
},
|
|
193
|
-
const r = t.items.find((e) => e.id ===
|
|
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
|
-
|
|
196
|
-
const
|
|
197
|
-
|
|
195
|
+
U(r.id, r.disabled);
|
|
196
|
+
const l = E.get(r.id);
|
|
197
|
+
l?.focus({
|
|
198
198
|
preventScroll: !0
|
|
199
|
-
}),
|
|
199
|
+
}), l?.scrollIntoView({
|
|
200
200
|
block: "nearest",
|
|
201
201
|
inline: "nearest"
|
|
202
202
|
});
|
|
203
|
-
},
|
|
204
|
-
const
|
|
205
|
-
|
|
206
|
-
}, Ne = (
|
|
207
|
-
|
|
208
|
-
const
|
|
209
|
-
if (!
|
|
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(() =>
|
|
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 = (
|
|
216
|
-
const
|
|
217
|
-
const
|
|
218
|
-
return
|
|
219
|
-
}
|
|
220
|
-
return
|
|
221
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
236
|
-
|
|
235
|
+
var a = je(), r = a.firstChild;
|
|
236
|
+
fe(a, ue({
|
|
237
237
|
get class() {
|
|
238
|
-
return
|
|
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
|
-
|
|
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),
|
|
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 =
|
|
257
|
+
return e.$$click = Ie, u(e, h(Qe, {
|
|
258
258
|
class: "w-4 h-4"
|
|
259
259
|
})), x((o) => {
|
|
260
|
-
var
|
|
261
|
-
return
|
|
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
|
|
269
|
-
return typeof
|
|
268
|
+
var l = f;
|
|
269
|
+
return typeof l == "function" ? ie(l, r) : f = r, u(r, h(S, {
|
|
270
270
|
get when() {
|
|
271
|
-
return
|
|
271
|
+
return le(() => !!H())() && T().visible;
|
|
272
272
|
},
|
|
273
273
|
get children() {
|
|
274
274
|
var e = We();
|
|
275
275
|
return x((o) => {
|
|
276
|
-
var
|
|
277
|
-
return
|
|
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),
|
|
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 ===
|
|
290
|
+
const o = () => e().id === j(), d = () => e().closable ?? R();
|
|
291
291
|
return (() => {
|
|
292
|
-
var
|
|
293
|
-
return
|
|
292
|
+
var s = Ue(), y = s.firstChild;
|
|
293
|
+
return s.$$keydown = (n) => {
|
|
294
294
|
if (n.key === "Enter" || n.key === " ") {
|
|
295
|
-
n.preventDefault(),
|
|
295
|
+
n.preventDefault(), U(e().id, e().disabled);
|
|
296
296
|
return;
|
|
297
297
|
}
|
|
298
|
-
|
|
299
|
-
},
|
|
300
|
-
|
|
301
|
-
},
|
|
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
|
|
307
|
+
return u(n, () => e().icon), n;
|
|
308
308
|
}
|
|
309
|
-
}), y),
|
|
309
|
+
}), y), u(y, () => e().label), u(s, h(S, {
|
|
310
310
|
get when() {
|
|
311
|
-
return
|
|
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),
|
|
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 =
|
|
319
|
-
return N !== w.e &&
|
|
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,
|
|
327
|
-
return w !== n.e &&
|
|
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
|
-
}),
|
|
336
|
+
}), s;
|
|
337
337
|
})();
|
|
338
338
|
}
|
|
339
|
-
}), null),
|
|
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
|
-
},
|
|
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(() =>
|
|
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),
|
|
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 =
|
|
360
|
+
return e.$$click = Se, u(e, h(Pe, {
|
|
361
361
|
class: "w-4 h-4"
|
|
362
362
|
})), x((o) => {
|
|
363
|
-
var
|
|
364
|
-
return
|
|
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 =
|
|
372
|
-
"relative flex-1 flex items-
|
|
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
|
-
),
|
|
378
|
-
return o !== e.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
|
-
}),
|
|
384
|
+
}), a;
|
|
385
385
|
})();
|
|
386
386
|
}
|
|
387
|
-
function
|
|
387
|
+
function dt(i) {
|
|
388
388
|
const [t, b] = ve(i, ["active", "keepMounted", "labelledBy", "class", "children"]);
|
|
389
|
-
return
|
|
389
|
+
return h(S, {
|
|
390
390
|
get when() {
|
|
391
391
|
return t.keepMounted || t.active;
|
|
392
392
|
},
|
|
393
393
|
get children() {
|
|
394
|
-
var
|
|
395
|
-
return
|
|
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
|
|
406
|
+
return v(!t.active && t.keepMounted && "hidden", t.class);
|
|
407
407
|
}
|
|
408
|
-
}, b), !1, !0),
|
|
408
|
+
}, b), !1, !0), u(c, () => t.children), c;
|
|
409
409
|
}
|
|
410
410
|
});
|
|
411
411
|
}
|
|
412
|
-
|
|
412
|
+
Me(["click", "keydown"]);
|
|
413
413
|
export {
|
|
414
|
-
|
|
415
|
-
|
|
414
|
+
dt as TabPanel,
|
|
415
|
+
ct as Tabs,
|
|
416
416
|
Ke as resolveTabNavigationTargetId
|
|
417
417
|
};
|