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