@floegence/floe-webapp-core 0.86.60 → 0.86.62
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/blocks/BlockRenderer.js +1 -1
- package/dist/components/chat/blocks/CodeDiffBlock.js +56 -56
- package/dist/components/chat/blocks/ImageBlock.js +1 -1
- package/dist/components/chat/blocks/ToolCallBlock.js +57 -57
- package/dist/components/chat/status/ConnectionStatus.js +10 -10
- package/dist/components/deck/DeckCell.js +25 -25
- package/dist/components/deck/DeckContextMenu.js +20 -20
- package/dist/components/deck/DeckGrid.js +1 -1
- package/dist/components/deck/DeckTopBar.js +42 -42
- package/dist/components/deck/DropZonePreview.js +6 -6
- package/dist/components/deck/LayoutSelector.js +53 -53
- package/dist/components/deck/WidgetFrame.js +28 -28
- package/dist/components/deck/WidgetPalette.js +31 -31
- package/dist/components/deck/WidgetTypeSwitcher.js +31 -31
- package/dist/components/file-browser/Breadcrumb.js +27 -27
- package/dist/components/file-browser/DirectoryTree.js +15 -15
- package/dist/components/file-browser/DragPreview.js +58 -58
- package/dist/components/file-browser/FileBrowser.js +17 -17
- package/dist/components/file-browser/FileBrowserStatusBar.js +18 -18
- package/dist/components/file-browser/FileBrowserToolbar.js +27 -27
- package/dist/components/file-browser/FileContextMenu.js +47 -47
- package/dist/components/file-browser/FileGridView.js +53 -51
- package/dist/components/file-browser/FileItemDecorations.js +30 -27
- package/dist/components/file-browser/FileListView.js +114 -114
- package/dist/components/icons/index.js +1357 -1357
- package/dist/components/launchpad/Launchpad.js +14 -14
- package/dist/components/launchpad/LaunchpadGrid.js +7 -7
- package/dist/components/launchpad/LaunchpadItem.js +11 -11
- package/dist/components/launchpad/LaunchpadPagination.js +16 -16
- package/dist/components/launchpad/LaunchpadSearch.js +9 -9
- package/dist/components/layout/ActivityBar.js +52 -55
- package/dist/components/layout/BottomBar.js +17 -17
- package/dist/components/layout/MobileNavigationPanel.js +36 -36
- package/dist/components/layout/MobileTabBar.js +39 -39
- package/dist/components/layout/Panel.js +16 -16
- package/dist/components/layout/ResizeHandle.js +19 -19
- package/dist/components/layout/Shell.js +50 -50
- package/dist/components/layout/Sidebar.js +37 -36
- package/dist/components/layout/SidebarPane.js +19 -19
- package/dist/components/layout/TopBar.js +16 -16
- package/dist/components/layout/TopBarIconButton.js +15 -15
- package/dist/components/loading/LoadingOverlay.js +9 -9
- package/dist/components/loading/Skeleton.js +11 -11
- package/dist/components/ui/Button.js +36 -36
- package/dist/components/ui/Card.d.ts +11 -62
- package/dist/components/ui/Card.js +64 -237
- package/dist/components/ui/Checkbox.js +79 -79
- package/dist/components/ui/CommandPalette.js +56 -55
- package/dist/components/ui/Dialog.js +91 -93
- package/dist/components/ui/DirectoryInput.js +22 -22
- package/dist/components/ui/DirectoryPicker.js +8 -8
- package/dist/components/ui/Dropdown.js +89 -87
- package/dist/components/ui/FeedbackIndicator.js +57 -57
- package/dist/components/ui/FileOpenPicker.js +37 -37
- package/dist/components/ui/FileSavePicker.js +41 -41
- package/dist/components/ui/FloatingWindow.js +213 -205
- package/dist/components/ui/Form.js +76 -76
- package/dist/components/ui/HighlightBlock.js +14 -14
- package/dist/components/ui/Input.js +106 -109
- package/dist/components/ui/Pagination.js +86 -86
- package/dist/components/ui/Popover.d.ts +33 -0
- package/dist/components/ui/Popover.js +133 -0
- package/dist/components/ui/ProcessingIndicator.js +344 -345
- package/dist/components/ui/Progress.js +94 -97
- package/dist/components/ui/QuoteBlock.js +25 -25
- package/dist/components/ui/Radio.js +91 -91
- package/dist/components/ui/SegmentedControl.js +24 -24
- package/dist/components/ui/Stepper.js +68 -60
- package/dist/components/ui/Switch.js +25 -25
- package/dist/components/ui/Tabs.js +99 -87
- package/dist/components/ui/Tag.js +12 -9
- package/dist/components/ui/Tooltip.js +30 -30
- package/dist/components/ui/floatingPresence.d.ts +7 -0
- package/dist/components/ui/floatingPresence.js +80 -39
- package/dist/components/ui/index.d.ts +2 -1
- package/dist/components/ui/picker/DirectoryFavorites.js +27 -27
- package/dist/components/ui/picker/PickerBase.js +107 -107
- package/dist/context/NotificationContext.js +4 -4
- package/dist/context/ThemeContext.js +71 -70
- package/dist/floe.css +205 -43
- package/dist/full.js +650 -652
- package/dist/language.css +320 -0
- package/dist/primitives.css +23 -17
- package/dist/standalone.css +1 -0
- package/dist/styles/themes/classicSemanticTokens.d.ts +122 -122
- package/dist/styles/themes/classicSemanticTokens.js +140 -138
- package/dist/styles/themes/index.d.ts +3 -1
- package/dist/styles/themes/index.js +10 -10
- package/dist/styles/themes/presets.d.ts +2 -2
- package/dist/styles/themes/presets.js +34 -34
- package/dist/styles/tokens.d.ts +152 -68
- package/dist/styles/tokens.js +87 -49
- package/dist/styles.css +1 -1
- package/dist/surface.css +161 -116
- package/dist/themes/dark.css +64 -64
- package/dist/themes/light.css +64 -64
- package/dist/ui.css +171 -255
- package/dist/ui.js +176 -178
- package/dist/utils/hotInteraction.d.ts +7 -0
- package/dist/utils/hotInteraction.js +12 -12
- package/dist/widgets/TerminalWidget.js +28 -28
- package/dist/workbench-composition.css +15 -15
- package/package.json +1 -1
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
import { createComponent as v, spread as ue, mergeProps as fe, insert as f, effect as y, className as
|
|
2
|
-
import { splitProps as ve, Show as B, createSignal as L, untrack as
|
|
3
|
-
import { cn as
|
|
1
|
+
import { createComponent as v, spread as ue, mergeProps as fe, insert as f, effect as y, className as x, setStyleProperty as ae, memo as le, use as ie, setAttribute as p, template as w, delegateEvents as Re } from "solid-js/web";
|
|
2
|
+
import { splitProps as ve, Show as B, createSignal as L, untrack as ce, createEffect as U, onCleanup as de } from "solid-js";
|
|
3
|
+
import { cn as h } from "../../utils/cn.js";
|
|
4
4
|
import { deferAfterPaint as _ } from "../../utils/defer.js";
|
|
5
5
|
import { KeyedFor as Te } from "./KeyedFor.js";
|
|
6
6
|
import { createUIFirstSelection as ze } from "../../utils/uiFirstSelection.js";
|
|
7
7
|
import { useViewActivation as Ee } from "../../context/ViewActivationContext.js";
|
|
8
8
|
import { X as He, Plus as Pe, ChevronRight as De } from "../icons/index.js";
|
|
9
|
-
var Me = /* @__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">'), Oe = /* @__PURE__ */ w("<div>"), We = /* @__PURE__ */ w('<button type=button aria-label="Add new tab">'), Fe = /* @__PURE__ */ w('<button type=button aria-label="Scroll right">'), je = /* @__PURE__ */ w("<div><div role=tablist data-floe-surface=inset data-floe-surface-part=tab-rail aria-orientation=horizontal>"),
|
|
10
|
-
const
|
|
9
|
+
var Me = /* @__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 data-floe-interactive=icon aria-label="Scroll left">'), Oe = /* @__PURE__ */ w("<div>"), We = /* @__PURE__ */ w('<button type=button data-floe-interactive=icon aria-label="Add new tab">'), Fe = /* @__PURE__ */ w('<button type=button data-floe-interactive=icon aria-label="Scroll right">'), je = /* @__PURE__ */ w("<div><div role=tablist data-floe-surface=inset data-floe-surface-part=tab-rail aria-orientation=horizontal>"), qe = /* @__PURE__ */ w("<span class=flex-shrink-0>"), Ge = /* @__PURE__ */ w("<button type=button data-floe-interactive=icon>"), Ue = /* @__PURE__ */ w('<div role=tab data-floe-surface-part=tab data-floe-interactive=item><span class="truncate max-w-32">'), Xe = /* @__PURE__ */ w("<div role=tabpanel>");
|
|
10
|
+
const X = {
|
|
11
11
|
x: 0,
|
|
12
12
|
width: 0,
|
|
13
13
|
visible: !1
|
|
14
14
|
};
|
|
15
|
-
function
|
|
16
|
-
const
|
|
17
|
-
if (!
|
|
18
|
-
const C =
|
|
15
|
+
function Ke(i, e, b) {
|
|
16
|
+
const c = i.filter((k) => !k.disabled);
|
|
17
|
+
if (!c.length) return null;
|
|
18
|
+
const C = c.findIndex((k) => k.id === e);
|
|
19
19
|
if (C < 0) return null;
|
|
20
|
-
let
|
|
21
|
-
switch (
|
|
20
|
+
let g = null;
|
|
21
|
+
switch (b) {
|
|
22
22
|
case "ArrowRight":
|
|
23
23
|
case "ArrowDown":
|
|
24
|
-
|
|
24
|
+
g = (C + 1) % c.length;
|
|
25
25
|
break;
|
|
26
26
|
case "ArrowLeft":
|
|
27
27
|
case "ArrowUp":
|
|
28
|
-
|
|
28
|
+
g = (C - 1 + c.length) % c.length;
|
|
29
29
|
break;
|
|
30
30
|
case "Home":
|
|
31
|
-
|
|
31
|
+
g = 0;
|
|
32
32
|
break;
|
|
33
33
|
case "End":
|
|
34
|
-
|
|
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
|
-
function
|
|
41
|
+
function Ve(i) {
|
|
42
42
|
return i === 1 || i === 2 || i === 3 || i === 4 ? i : 2;
|
|
43
43
|
}
|
|
44
44
|
function Ye(i) {
|
|
@@ -69,18 +69,18 @@ function Je(i) {
|
|
|
69
69
|
switch (i) {
|
|
70
70
|
case "border":
|
|
71
71
|
return {
|
|
72
|
-
tabBorderClass: "border-
|
|
73
|
-
sliderBgClass: "bg-
|
|
72
|
+
tabBorderClass: "border-[var(--floe-line)]",
|
|
73
|
+
sliderBgClass: "bg-[var(--floe-line)]"
|
|
74
74
|
};
|
|
75
75
|
case "muted-foreground":
|
|
76
76
|
return {
|
|
77
77
|
tabBorderClass: "border-muted-foreground",
|
|
78
|
-
sliderBgClass: "bg-
|
|
78
|
+
sliderBgClass: "bg-[var(--floe-ink-ghost)]"
|
|
79
79
|
};
|
|
80
80
|
default:
|
|
81
81
|
return {
|
|
82
|
-
tabBorderClass: "border-
|
|
83
|
-
sliderBgClass: "bg-
|
|
82
|
+
tabBorderClass: "border-[var(--floe-accent-ink)]",
|
|
83
|
+
sliderBgClass: "bg-[var(--floe-accent-ink)]"
|
|
84
84
|
};
|
|
85
85
|
}
|
|
86
86
|
}
|
|
@@ -91,35 +91,35 @@ const Qe = (i) => (() => {
|
|
|
91
91
|
function Ze(i) {
|
|
92
92
|
const {
|
|
93
93
|
container: e,
|
|
94
|
-
tab:
|
|
95
|
-
} = i,
|
|
96
|
-
if (
|
|
94
|
+
tab: b
|
|
95
|
+
} = i, c = b.offsetParent, C = b.offsetWidth;
|
|
96
|
+
if (c === e && Number.isFinite(b.offsetLeft) && Number.isFinite(C))
|
|
97
97
|
return {
|
|
98
|
-
x:
|
|
98
|
+
x: b.offsetLeft,
|
|
99
99
|
width: C,
|
|
100
100
|
visible: C > 0
|
|
101
101
|
};
|
|
102
|
-
const
|
|
102
|
+
const g = e.getBoundingClientRect(), k = b.getBoundingClientRect(), R = e.offsetWidth || e.clientWidth, I = g.width > 0 && R > 0 ? g.width / R : 1, T = Number.isFinite(I) && I > 0 ? I : 1, z = k.width / T;
|
|
103
103
|
return {
|
|
104
|
-
x: (
|
|
104
|
+
x: (k.left - g.left + e.scrollLeft) / T,
|
|
105
105
|
width: z,
|
|
106
106
|
visible: z > 0
|
|
107
107
|
};
|
|
108
108
|
}
|
|
109
|
-
function
|
|
110
|
-
const [e,
|
|
109
|
+
function ct(i) {
|
|
110
|
+
const [e, b] = ve(i, ["items", "activeId", "defaultActiveId", "onChange", "onActiveIdChange", "onClose", "onAdd", "showAdd", "closable", "size", "features", "slotClassNames", "ariaLabel", "class"]), c = () => e.features?.indicator?.mode ?? "activeBorder", C = () => Ve(e.features?.indicator?.thicknessPx), g = () => e.features?.indicator?.colorToken ?? "primary", k = () => 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, he = () => e.features?.addButton?.enabled ?? e.showAdd ?? !1, K = () => Ye(C()), O = () => Je(g());
|
|
111
111
|
let u;
|
|
112
|
-
const
|
|
112
|
+
const V = (() => {
|
|
113
113
|
try {
|
|
114
114
|
return Ee();
|
|
115
115
|
} catch {
|
|
116
116
|
return null;
|
|
117
117
|
}
|
|
118
|
-
})(), S = () =>
|
|
118
|
+
})(), S = () => V ? V.active() : !0;
|
|
119
119
|
let W = !1;
|
|
120
|
-
const [E, F] = L(
|
|
120
|
+
const [E, F] = L(X), H = /* @__PURE__ */ new Map();
|
|
121
121
|
let j = !1;
|
|
122
|
-
const P = () =>
|
|
122
|
+
const P = () => c() === "slider", Y = (s) => {
|
|
123
123
|
if (!u || !P()) return !1;
|
|
124
124
|
const o = H.get(s);
|
|
125
125
|
if (!o) return !1;
|
|
@@ -130,26 +130,26 @@ function dt(i) {
|
|
|
130
130
|
return F(a), a.visible;
|
|
131
131
|
}, be = () => {
|
|
132
132
|
if (!P()) {
|
|
133
|
-
F(
|
|
133
|
+
F(X);
|
|
134
134
|
return;
|
|
135
135
|
}
|
|
136
|
-
Y(
|
|
136
|
+
Y(q()) || F(X);
|
|
137
137
|
}, D = () => {
|
|
138
138
|
j || (j = !0, _(() => {
|
|
139
|
-
j = !1,
|
|
139
|
+
j = !1, ce(() => {
|
|
140
140
|
S() && be();
|
|
141
141
|
});
|
|
142
142
|
}));
|
|
143
|
-
}, J = () => e.activeId !== void 0, ge = () => e.onChange ?? e.onActiveIdChange, [me, we] = L(
|
|
143
|
+
}, J = () => e.activeId !== void 0, ge = () => e.onChange ?? e.onActiveIdChange, [me, we] = L(ce(() => e.defaultActiveId ?? e.items[0]?.id ?? "")), Q = ze({
|
|
144
144
|
committed: () => J() ? e.activeId : me(),
|
|
145
145
|
commit: (s) => {
|
|
146
146
|
J() || we(s), ge()?.(s);
|
|
147
147
|
}
|
|
148
|
-
}),
|
|
149
|
-
|
|
150
|
-
S() && (
|
|
148
|
+
}), q = Q.visual;
|
|
149
|
+
U(() => {
|
|
150
|
+
S() && (c(), q(), D());
|
|
151
151
|
});
|
|
152
|
-
const [Z, Ce] = L(!1), [ee, pe] = L(!1), [
|
|
152
|
+
const [Z, Ce] = L(!1), [ee, pe] = L(!1), [ke, ye] = L(!1), te = () => I() === "auto" && ke(), xe = () => {
|
|
153
153
|
if (!u) return;
|
|
154
154
|
const {
|
|
155
155
|
scrollLeft: s,
|
|
@@ -159,7 +159,7 @@ function dt(i) {
|
|
|
159
159
|
ye(t), Ce(s > 0), pe(s + a < o - 1);
|
|
160
160
|
}, M = () => {
|
|
161
161
|
W || (W = !0, _(() => {
|
|
162
|
-
W = !1, S() &&
|
|
162
|
+
W = !1, S() && xe();
|
|
163
163
|
}));
|
|
164
164
|
}, Be = () => {
|
|
165
165
|
u && u.scrollBy({
|
|
@@ -172,7 +172,7 @@ function dt(i) {
|
|
|
172
172
|
behavior: "smooth"
|
|
173
173
|
});
|
|
174
174
|
};
|
|
175
|
-
|
|
175
|
+
U(() => {
|
|
176
176
|
if (!u || !S()) return;
|
|
177
177
|
M(), D();
|
|
178
178
|
const s = () => M();
|
|
@@ -181,18 +181,18 @@ function dt(i) {
|
|
|
181
181
|
M(), D();
|
|
182
182
|
};
|
|
183
183
|
let a;
|
|
184
|
-
typeof ResizeObserver < "u" ? (a = new ResizeObserver(o), a.observe(u)) : typeof window < "u" && window.addEventListener("resize", o),
|
|
184
|
+
typeof ResizeObserver < "u" ? (a = new ResizeObserver(o), a.observe(u)) : typeof window < "u" && window.addEventListener("resize", o), de(() => {
|
|
185
185
|
u?.removeEventListener("scroll", s), a?.disconnect(), typeof window < "u" && window.removeEventListener("resize", o);
|
|
186
186
|
});
|
|
187
|
-
}),
|
|
187
|
+
}), U(() => {
|
|
188
188
|
S() && (e.items.length, M(), D());
|
|
189
189
|
});
|
|
190
|
-
const
|
|
190
|
+
const G = (s, o) => {
|
|
191
191
|
o || (Q.request(s), P() && Y(s));
|
|
192
192
|
}, Se = (s) => {
|
|
193
193
|
const o = e.items.find((t) => t.id === s);
|
|
194
194
|
if (!o) return;
|
|
195
|
-
|
|
195
|
+
G(o.id, o.disabled);
|
|
196
196
|
const a = H.get(o.id);
|
|
197
197
|
a?.focus({
|
|
198
198
|
preventScroll: !0
|
|
@@ -201,7 +201,7 @@ function dt(i) {
|
|
|
201
201
|
inline: "nearest"
|
|
202
202
|
});
|
|
203
203
|
}, Ae = (s, o) => {
|
|
204
|
-
const a =
|
|
204
|
+
const a = Ke(e.items, o.id, s.key);
|
|
205
205
|
a && (s.preventDefault(), Se(a));
|
|
206
206
|
}, $e = (s, o) => {
|
|
207
207
|
s.stopPropagation();
|
|
@@ -210,22 +210,34 @@ function dt(i) {
|
|
|
210
210
|
const t = o;
|
|
211
211
|
_(() => a(t));
|
|
212
212
|
}, Ne = {
|
|
213
|
-
sm: "h-
|
|
214
|
-
md: "h-
|
|
213
|
+
sm: "h-[var(--floe-control-height-sm)] px-[var(--floe-control-padding-sm)]",
|
|
214
|
+
md: "h-[var(--floe-control-height-md)] px-[var(--floe-control-padding-md)]"
|
|
215
215
|
}, Le = (s, o) => {
|
|
216
|
-
const a = "inline-flex items-center gap-1.5
|
|
217
|
-
const
|
|
218
|
-
return
|
|
216
|
+
const a = h("inline-flex items-center gap-1.5 whitespace-nowrap", "text-[length:var(--floe-type-control)] leading-[var(--floe-line-control)]"), t = o ? "cursor-not-allowed opacity-50" : "cursor-pointer", r = (() => {
|
|
217
|
+
const d = c();
|
|
218
|
+
return d === "none" || d === "slider" && E().visible ? "border-transparent" : O().tabBorderClass;
|
|
219
219
|
})();
|
|
220
|
-
return
|
|
220
|
+
return h(
|
|
221
|
+
a,
|
|
222
|
+
t,
|
|
223
|
+
Ne[e.size ?? "md"],
|
|
224
|
+
"rounded-control",
|
|
225
|
+
K().tabBorderClass,
|
|
226
|
+
/* The selected face is painted by the surface layer (`data-floe-surface`
|
|
227
|
+
* plus `aria-selected`), which keeps the fill, hairline and first
|
|
228
|
+
* elevation step identical to every other selected control. */
|
|
229
|
+
s ? h(r, "text-foreground", e.slotClassNames?.tabActive) : h("border-transparent text-[var(--floe-ink-soft)]", e.slotClassNames?.tabInactive),
|
|
230
|
+
o && "opacity-50",
|
|
231
|
+
e.slotClassNames?.tab
|
|
232
|
+
);
|
|
221
233
|
};
|
|
222
234
|
return (() => {
|
|
223
235
|
var s = je(), o = s.firstChild;
|
|
224
236
|
ue(s, fe({
|
|
225
237
|
get class() {
|
|
226
|
-
return
|
|
238
|
+
return h("relative flex items-center gap-0.5", R() && "border-b border-[var(--floe-line)]", e.slotClassNames?.root, e.class);
|
|
227
239
|
}
|
|
228
|
-
},
|
|
240
|
+
}, b), !1, !0), f(s, v(B, {
|
|
229
241
|
get when() {
|
|
230
242
|
return te();
|
|
231
243
|
},
|
|
@@ -234,8 +246,8 @@ function dt(i) {
|
|
|
234
246
|
return t.$$click = Be, f(t, v(Qe, {
|
|
235
247
|
class: "w-4 h-4"
|
|
236
248
|
})), y((r) => {
|
|
237
|
-
var
|
|
238
|
-
return
|
|
249
|
+
var d = !Z(), l = h("flex-shrink-0 flex items-center justify-center", "w-6 h-6 rounded-control cursor-pointer", "transition-opacity duration-[var(--floe-duration-fast)] ease-[var(--floe-ease-out)]", Z() ? "text-[var(--floe-ink-quiet)] hover:bg-[var(--floe-state-hover)] opacity-100" : "opacity-0 pointer-events-none", e.slotClassNames?.scrollButton);
|
|
250
|
+
return d !== r.e && (t.disabled = r.e = d), l !== r.t && x(t, r.t = l), r;
|
|
239
251
|
}, {
|
|
240
252
|
e: void 0,
|
|
241
253
|
t: void 0
|
|
@@ -250,8 +262,8 @@ function dt(i) {
|
|
|
250
262
|
get children() {
|
|
251
263
|
var t = Oe();
|
|
252
264
|
return y((r) => {
|
|
253
|
-
var
|
|
254
|
-
return
|
|
265
|
+
var d = h("pointer-events-none absolute bottom-0 left-0 z-10", K().sliderHeightClass, O().sliderBgClass, k() ? "transition-[transform,width] duration-[var(--floe-duration-base)] ease-out motion-reduce:transition-none" : "transition-none", "will-change-transform", e.slotClassNames?.indicator), l = `translate3d(${E().x}px, 0, 0)`, A = `${E().width}px`;
|
|
266
|
+
return d !== r.e && x(t, r.e = d), l !== r.t && ae(t, "transform", r.t = l), A !== r.a && ae(t, "width", r.a = A), r;
|
|
255
267
|
}, {
|
|
256
268
|
e: void 0,
|
|
257
269
|
t: void 0,
|
|
@@ -264,36 +276,36 @@ function dt(i) {
|
|
|
264
276
|
},
|
|
265
277
|
by: (t) => t.id,
|
|
266
278
|
children: (t) => {
|
|
267
|
-
const r = () => t().id ===
|
|
279
|
+
const r = () => t().id === q(), d = () => t().closable ?? z();
|
|
268
280
|
return (() => {
|
|
269
|
-
var l =
|
|
281
|
+
var l = Ue(), A = l.firstChild;
|
|
270
282
|
return l.$$keydown = (n) => {
|
|
271
283
|
if (n.key === "Enter" || n.key === " ") {
|
|
272
|
-
n.preventDefault(),
|
|
284
|
+
n.preventDefault(), G(t().id, t().disabled);
|
|
273
285
|
return;
|
|
274
286
|
}
|
|
275
287
|
Ae(n, t());
|
|
276
|
-
}, l.$$click = () =>
|
|
277
|
-
H.set(t().id, n),
|
|
288
|
+
}, l.$$click = () => G(t().id, t().disabled), ie((n) => {
|
|
289
|
+
H.set(t().id, n), de(() => H.delete(t().id));
|
|
278
290
|
}, l), f(l, v(B, {
|
|
279
291
|
get when() {
|
|
280
292
|
return t().icon;
|
|
281
293
|
},
|
|
282
294
|
get children() {
|
|
283
|
-
var n =
|
|
295
|
+
var n = qe();
|
|
284
296
|
return f(n, () => t().icon), n;
|
|
285
297
|
}
|
|
286
298
|
}), A), f(A, () => t().label), f(l, v(B, {
|
|
287
299
|
get when() {
|
|
288
|
-
return le(() => !!
|
|
300
|
+
return le(() => !!d())() && !t().disabled;
|
|
289
301
|
},
|
|
290
302
|
get children() {
|
|
291
|
-
var n =
|
|
303
|
+
var n = Ge();
|
|
292
304
|
return n.$$click = (m) => $e(m, t().id), f(n, v(He, {
|
|
293
305
|
class: "w-3 h-3"
|
|
294
306
|
})), y((m) => {
|
|
295
|
-
var $ =
|
|
296
|
-
return $ !== m.e &&
|
|
307
|
+
var $ = h("flex-shrink-0 flex items-center justify-center", "w-5 h-5 rounded-control cursor-pointer", "bg-transparent text-[var(--floe-ink-quiet)]", T() ? "hover:bg-error hover:text-error-foreground" : "hover:bg-[var(--floe-state-hover)]", "ml-1.5", e.slotClassNames?.closeButton), N = `Close ${t().label}`;
|
|
308
|
+
return $ !== m.e && x(n, m.e = $), N !== m.t && p(n, "aria-label", m.t = N), m;
|
|
297
309
|
}, {
|
|
298
310
|
e: void 0,
|
|
299
311
|
t: void 0
|
|
@@ -301,7 +313,7 @@ function dt(i) {
|
|
|
301
313
|
}
|
|
302
314
|
}), null), y((n) => {
|
|
303
315
|
var m = Le(r(), t().disabled), $ = t().domId, N = t().panelId, re = r() ? "raised" : "flat", oe = r(), ne = t().disabled, se = t().disabled ? -1 : r() ? 0 : -1;
|
|
304
|
-
return m !== n.e &&
|
|
316
|
+
return m !== n.e && x(l, n.e = m), $ !== n.t && p(l, "id", n.t = $), N !== n.a && p(l, "aria-controls", n.a = N), re !== n.o && p(l, "data-floe-surface", n.o = re), oe !== n.i && p(l, "aria-selected", n.i = oe), ne !== n.n && p(l, "aria-disabled", n.n = ne), se !== n.s && p(l, "tabindex", n.s = se), n;
|
|
305
317
|
}, {
|
|
306
318
|
e: void 0,
|
|
307
319
|
t: void 0,
|
|
@@ -326,7 +338,7 @@ function dt(i) {
|
|
|
326
338
|
get class() {
|
|
327
339
|
return e.size === "sm" ? "w-3.5 h-3.5" : "w-4 h-4";
|
|
328
340
|
}
|
|
329
|
-
})), y(() =>
|
|
341
|
+
})), y(() => x(t, h("flex-shrink-0 flex items-center justify-center", "rounded-control cursor-pointer", "text-[var(--floe-ink-quiet)] hover:bg-[var(--floe-state-hover)]", e.size === "sm" ? "w-6 h-6" : "w-7 h-7", e.slotClassNames?.addButton))), t;
|
|
330
342
|
}
|
|
331
343
|
}), null), f(s, v(B, {
|
|
332
344
|
get when() {
|
|
@@ -337,37 +349,37 @@ function dt(i) {
|
|
|
337
349
|
return t.$$click = Ie, f(t, v(De, {
|
|
338
350
|
class: "w-4 h-4"
|
|
339
351
|
})), y((r) => {
|
|
340
|
-
var
|
|
341
|
-
return
|
|
352
|
+
var d = !ee(), l = h("flex-shrink-0 flex items-center justify-center", "w-6 h-6 rounded-control cursor-pointer", "transition-opacity duration-[var(--floe-duration-fast)] ease-[var(--floe-ease-out)]", ee() ? "text-[var(--floe-ink-quiet)] hover:bg-[var(--floe-state-hover)] opacity-100" : "opacity-0 pointer-events-none", e.slotClassNames?.scrollButton);
|
|
353
|
+
return d !== r.e && (t.disabled = r.e = d), l !== r.t && x(t, r.t = l), r;
|
|
342
354
|
}, {
|
|
343
355
|
e: void 0,
|
|
344
356
|
t: void 0
|
|
345
357
|
}), t;
|
|
346
358
|
}
|
|
347
359
|
}), null), y((t) => {
|
|
348
|
-
var r =
|
|
360
|
+
var r = h(
|
|
349
361
|
"relative flex-1 flex items-end gap-0.5 overflow-x-auto",
|
|
350
362
|
"scrollbar-none",
|
|
351
363
|
// Hide scrollbar for all browsers
|
|
352
364
|
"[&::-webkit-scrollbar]:hidden [-ms-overflow-style:none] [scrollbar-width:none]",
|
|
353
365
|
e.slotClassNames?.scrollContainer
|
|
354
|
-
),
|
|
355
|
-
return r !== t.e &&
|
|
366
|
+
), d = e.ariaLabel;
|
|
367
|
+
return r !== t.e && x(o, t.e = r), d !== t.t && p(o, "aria-label", t.t = d), t;
|
|
356
368
|
}, {
|
|
357
369
|
e: void 0,
|
|
358
370
|
t: void 0
|
|
359
371
|
}), s;
|
|
360
372
|
})();
|
|
361
373
|
}
|
|
362
|
-
function
|
|
363
|
-
const [e,
|
|
374
|
+
function dt(i) {
|
|
375
|
+
const [e, b] = ve(i, ["active", "keepMounted", "labelledBy", "class", "children"]);
|
|
364
376
|
return v(B, {
|
|
365
377
|
get when() {
|
|
366
378
|
return e.keepMounted || e.active;
|
|
367
379
|
},
|
|
368
380
|
get children() {
|
|
369
|
-
var
|
|
370
|
-
return ue(
|
|
381
|
+
var c = Xe();
|
|
382
|
+
return ue(c, fe({
|
|
371
383
|
get "aria-labelledby"() {
|
|
372
384
|
return e.labelledBy;
|
|
373
385
|
},
|
|
@@ -378,15 +390,15 @@ function ct(i) {
|
|
|
378
390
|
return e.active ? 0 : -1;
|
|
379
391
|
},
|
|
380
392
|
get class() {
|
|
381
|
-
return
|
|
393
|
+
return h(!e.active && e.keepMounted && "hidden", e.class);
|
|
382
394
|
}
|
|
383
|
-
},
|
|
395
|
+
}, b), !1, !0), f(c, () => e.children), c;
|
|
384
396
|
}
|
|
385
397
|
});
|
|
386
398
|
}
|
|
387
399
|
Re(["click", "keydown"]);
|
|
388
400
|
export {
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
401
|
+
dt as TabPanel,
|
|
402
|
+
ct as Tabs,
|
|
403
|
+
Ke as resolveTabNavigationTargetId
|
|
392
404
|
};
|
|
@@ -1,24 +1,27 @@
|
|
|
1
|
-
import { spread as i, mergeProps as u, insert as a, memo as n, createComponent as
|
|
2
|
-
import { splitProps as
|
|
3
|
-
import { cn as
|
|
4
|
-
var
|
|
1
|
+
import { spread as i, mergeProps as u, insert as a, memo as n, createComponent as f, Dynamic as p, template as l } from "solid-js/web";
|
|
2
|
+
import { splitProps as d } from "solid-js";
|
|
3
|
+
import { cn as m } from "../../utils/cn.js";
|
|
4
|
+
var g = /* @__PURE__ */ l("<span data-floe-surface-part=badge>"), _ = /* @__PURE__ */ l("<span class=floe-tag__dot aria-hidden=true>"), $ = /* @__PURE__ */ l("<span class=floe-tag__label>");
|
|
5
5
|
function z(s) {
|
|
6
|
-
const [e, c] =
|
|
6
|
+
const [e, c] = d(s, ["variant", "size", "tone", "icon", "dot", "class", "children"]);
|
|
7
7
|
return (() => {
|
|
8
|
-
var t =
|
|
8
|
+
var t = g();
|
|
9
9
|
return i(t, u({
|
|
10
10
|
get "data-floe-surface"() {
|
|
11
11
|
return e.tone === "soft" ? "inset" : "raised";
|
|
12
12
|
},
|
|
13
|
+
get "data-floe-tone"() {
|
|
14
|
+
return e.tone ?? "solid";
|
|
15
|
+
},
|
|
13
16
|
get class() {
|
|
14
|
-
return
|
|
17
|
+
return m("floe-tag", `floe-tag--${e.variant ?? "neutral"}`, `floe-tag--${e.size ?? "md"}`, `floe-tag--${e.tone ?? "solid"}`, e.class);
|
|
15
18
|
}
|
|
16
19
|
}, c), !1, !0), a(t, (() => {
|
|
17
20
|
var r = n(() => !!e.dot);
|
|
18
|
-
return () => r() &&
|
|
21
|
+
return () => r() && _();
|
|
19
22
|
})(), null), a(t, (() => {
|
|
20
23
|
var r = n(() => !!e.icon);
|
|
21
|
-
return () => r() && p
|
|
24
|
+
return () => r() && f(p, {
|
|
22
25
|
get component() {
|
|
23
26
|
return e.icon;
|
|
24
27
|
},
|
|
@@ -1,60 +1,60 @@
|
|
|
1
|
-
import { insert as
|
|
2
|
-
import { createSignal as
|
|
3
|
-
import { cn as
|
|
4
|
-
import { createFloatingPresence as
|
|
5
|
-
var
|
|
6
|
-
function
|
|
7
|
-
const [
|
|
8
|
-
open:
|
|
9
|
-
|
|
1
|
+
import { insert as s, createComponent as S, effect as k, className as g, setAttribute as h, template as x, use as C, delegateEvents as E } from "solid-js/web";
|
|
2
|
+
import { createSignal as L, onCleanup as P, Show as _ } from "solid-js";
|
|
3
|
+
import { cn as y } from "../../utils/cn.js";
|
|
4
|
+
import { createFloatingPresence as z } from "./floatingPresence.js";
|
|
5
|
+
var A = /* @__PURE__ */ x("<div role=tooltip data-floe-surface=floating><div>"), F = /* @__PURE__ */ x('<div class="relative inline-block">');
|
|
6
|
+
function q(l) {
|
|
7
|
+
const [w, a] = L(!1), n = z({
|
|
8
|
+
open: w,
|
|
9
|
+
element: () => i
|
|
10
10
|
});
|
|
11
|
-
let
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
let i, t;
|
|
12
|
+
P(() => {
|
|
13
|
+
t && (clearTimeout(t), t = void 0);
|
|
14
14
|
});
|
|
15
|
-
const
|
|
16
|
-
|
|
17
|
-
const
|
|
18
|
-
if (
|
|
15
|
+
const f = () => {
|
|
16
|
+
t && clearTimeout(t);
|
|
17
|
+
const e = l.delay ?? 300;
|
|
18
|
+
if (e <= 0) {
|
|
19
19
|
a(!0);
|
|
20
20
|
return;
|
|
21
21
|
}
|
|
22
|
-
|
|
22
|
+
t = setTimeout(() => a(!0), e);
|
|
23
23
|
}, d = () => {
|
|
24
|
-
|
|
25
|
-
},
|
|
24
|
+
t && (clearTimeout(t), t = void 0), a(!1);
|
|
25
|
+
}, $ = {
|
|
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",
|
|
28
28
|
left: "right-full top-1/2 -translate-y-1/2 mr-2",
|
|
29
29
|
right: "left-full top-1/2 -translate-y-1/2 ml-2"
|
|
30
|
-
},
|
|
30
|
+
}, T = {
|
|
31
31
|
top: "top-full left-1/2 -translate-x-1/2 border-t-popover border-x-transparent border-b-transparent",
|
|
32
32
|
bottom: "bottom-full left-1/2 -translate-x-1/2 border-b-popover border-x-transparent border-t-transparent",
|
|
33
33
|
left: "left-full top-1/2 -translate-y-1/2 border-l-popover border-y-transparent border-r-transparent",
|
|
34
34
|
right: "right-full top-1/2 -translate-y-1/2 border-r-popover border-y-transparent border-l-transparent"
|
|
35
35
|
};
|
|
36
36
|
return (() => {
|
|
37
|
-
var
|
|
38
|
-
return
|
|
37
|
+
var e = F();
|
|
38
|
+
return e.$$focusout = d, e.$$focusin = f, e.addEventListener("mouseleave", d), e.addEventListener("mouseenter", f), s(e, () => l.children, null), s(e, S(_, {
|
|
39
39
|
get when() {
|
|
40
40
|
return n.mounted();
|
|
41
41
|
},
|
|
42
42
|
get children() {
|
|
43
|
-
var
|
|
44
|
-
return i(
|
|
45
|
-
var
|
|
46
|
-
return
|
|
43
|
+
var o = A(), u = o.firstChild, p = i;
|
|
44
|
+
return typeof p == "function" ? C(p, o) : i = o, s(o, () => l.content, u), k((r) => {
|
|
45
|
+
var c = y("absolute z-50 px-2.5 py-1.5", "bg-popover text-popover-foreground text-[length:var(--floe-type-caption)]", "rounded-panel border border-[var(--floe-line)]", "shadow-[var(--floe-elevation-float)]", "tracking-[var(--floe-tracking-normal)]", "whitespace-nowrap", "floe-floating-presence floe-floating-tooltip", $[l.placement ?? "top"], l.class), v = n.state(), m = n.exiting() ? "true" : void 0, b = y("absolute w-0 h-0 border-4", T[l.placement ?? "top"]);
|
|
46
|
+
return c !== r.e && g(o, r.e = c), v !== r.t && h(o, "data-floating-presence", r.t = v), m !== r.a && h(o, "aria-hidden", r.a = m), b !== r.o && g(u, r.o = b), r;
|
|
47
47
|
}, {
|
|
48
48
|
e: void 0,
|
|
49
49
|
t: void 0,
|
|
50
50
|
a: void 0,
|
|
51
51
|
o: void 0
|
|
52
|
-
}),
|
|
52
|
+
}), o;
|
|
53
53
|
}
|
|
54
|
-
}), null),
|
|
54
|
+
}), null), e;
|
|
55
55
|
})();
|
|
56
56
|
}
|
|
57
|
-
|
|
57
|
+
E(["focusin", "focusout"]);
|
|
58
58
|
export {
|
|
59
|
-
|
|
59
|
+
q as Tooltip
|
|
60
60
|
};
|
|
@@ -2,6 +2,13 @@ import { type Accessor } from 'solid-js';
|
|
|
2
2
|
export type FloatingPresenceState = 'entering' | 'open' | 'exiting';
|
|
3
3
|
export interface FloatingPresenceOptions {
|
|
4
4
|
open: Accessor<boolean>;
|
|
5
|
+
/**
|
|
6
|
+
* The element carrying the surface's motion classes. When present, the exit
|
|
7
|
+
* follows that element's own transitions, so the DOM outlives the motion CSS
|
|
8
|
+
* declared for it instead of a duration duplicated in JavaScript.
|
|
9
|
+
*/
|
|
10
|
+
element?: Accessor<HTMLElement | undefined>;
|
|
11
|
+
/** Fallback for elements with no observable transition, as in SSR and unit tests. */
|
|
5
12
|
exitDurationMs?: number;
|
|
6
13
|
reducedMotionExitDurationMs?: number;
|
|
7
14
|
}
|