@floegence/floe-webapp-core 0.86.58 → 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 +266 -261
- 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,29 +1,29 @@
|
|
|
1
|
-
import { insert as l, createComponent as
|
|
2
|
-
import { splitProps as N, createUniqueId as E, Show as w, createSignal as ie, createEffect as
|
|
1
|
+
import { insert as l, createComponent as c, effect as y, className as k, memo as _, spread as B, mergeProps as L, setAttribute as h, template as C, Portal as ae, setStyleProperty as re, use as ne, delegateEvents as se } from "solid-js/web";
|
|
2
|
+
import { splitProps as N, createUniqueId as E, Show as w, createSignal as ie, createEffect as de, onCleanup as ue, For as fe } from "solid-js";
|
|
3
3
|
import { cn as I } from "../../utils/cn.js";
|
|
4
|
-
import { Minus as
|
|
5
|
-
var
|
|
6
|
-
const
|
|
4
|
+
import { Minus as ce, Plus as ve, ChevronDown as he } from "../icons/index.js";
|
|
5
|
+
var ge = /* @__PURE__ */ C('<div class="absolute left-2.5 top-1/2 -translate-y-1/2 text-[var(--floe-ink-quiet)] pointer-events-none">'), xe = /* @__PURE__ */ C('<div class="absolute right-2.5 top-1/2 -translate-y-1/2 text-[var(--floe-ink-quiet)] pointer-events-none">'), M = /* @__PURE__ */ C('<p class="mt-1 text-caption text-error"role=alert>'), R = /* @__PURE__ */ C('<p class="mt-1 text-[length:var(--floe-type-caption)] leading-[var(--floe-line-caption)] text-[var(--floe-ink-soft)]">'), be = /* @__PURE__ */ C("<div class=relative><input data-floe-control=input data-floe-surface=inset>"), me = /* @__PURE__ */ C("<div><textarea data-floe-control=input data-floe-surface=inset>"), pe = /* @__PURE__ */ C('<div><div data-floe-input-surface data-floe-control=compound-input data-floe-surface=inset><button type=button aria-label="Decrease value"></button><input type=number><button type=button aria-label="Increase value">'), we = /* @__PURE__ */ C("<div><div data-floe-input-surface data-floe-control=compound-input data-floe-surface=inset><input>"), oe = /* @__PURE__ */ C("<span>"), ye = /* @__PURE__ */ C("<button type=button><span>"), Ie = /* @__PURE__ */ C("<div role=listbox>"), $e = /* @__PURE__ */ C("<button type=button data-floe-interactive=item role=option>");
|
|
6
|
+
const ke = {
|
|
7
7
|
sm: "h-7 text-xs px-2",
|
|
8
8
|
md: "h-8 text-[length:var(--floe-type-control)] px-2.5",
|
|
9
9
|
lg: "h-9 text-sm px-3"
|
|
10
10
|
};
|
|
11
11
|
function Te(r) {
|
|
12
|
-
const [e, b] = N(r, ["size", "error", "helperText", "leftIcon", "rightIcon", "class", "id"]),
|
|
12
|
+
const [e, b] = N(r, ["size", "error", "helperText", "leftIcon", "rightIcon", "class", "id"]), z = E(), m = () => e.id ?? z, v = () => `${m()}-error`, x = () => `${m()}-helper`, $ = () => {
|
|
13
13
|
const o = [];
|
|
14
|
-
return e.error && o.push(
|
|
14
|
+
return e.error && o.push(v()), e.helperText && !e.error && o.push(x()), o.length > 0 ? o.join(" ") : void 0;
|
|
15
15
|
};
|
|
16
16
|
return (() => {
|
|
17
|
-
var o = be(),
|
|
18
|
-
return l(o,
|
|
17
|
+
var o = be(), g = o.firstChild;
|
|
18
|
+
return l(o, c(w, {
|
|
19
19
|
get when() {
|
|
20
20
|
return e.leftIcon;
|
|
21
21
|
},
|
|
22
22
|
get children() {
|
|
23
|
-
var
|
|
24
|
-
return l(
|
|
23
|
+
var s = ge();
|
|
24
|
+
return l(s, () => e.leftIcon), s;
|
|
25
25
|
}
|
|
26
|
-
}),
|
|
26
|
+
}), g), B(g, L({
|
|
27
27
|
get id() {
|
|
28
28
|
return m();
|
|
29
29
|
},
|
|
@@ -35,54 +35,51 @@ function Te(r) {
|
|
|
35
35
|
},
|
|
36
36
|
get class() {
|
|
37
37
|
return I(
|
|
38
|
-
"w-full
|
|
39
|
-
"placeholder:text-muted-foreground",
|
|
40
|
-
"transition-colors duration-100",
|
|
38
|
+
"floe-field w-full",
|
|
41
39
|
"focus:outline-none",
|
|
42
|
-
"disabled:cursor-not-allowed disabled:opacity-
|
|
43
|
-
e.
|
|
44
|
-
Ce[e.size ?? "md"],
|
|
40
|
+
"disabled:cursor-not-allowed disabled:opacity-60",
|
|
41
|
+
ke[e.size ?? "md"],
|
|
45
42
|
// Icon padding must come AFTER sizeStyles to override px-*
|
|
46
43
|
e.leftIcon && "pl-10",
|
|
47
44
|
e.rightIcon && "pr-10",
|
|
48
45
|
e.class
|
|
49
46
|
);
|
|
50
47
|
}
|
|
51
|
-
}, b), !1, !1), l(o,
|
|
48
|
+
}, b), !1, !1), l(o, c(w, {
|
|
52
49
|
get when() {
|
|
53
50
|
return e.rightIcon;
|
|
54
51
|
},
|
|
55
52
|
get children() {
|
|
56
|
-
var
|
|
57
|
-
return l(
|
|
53
|
+
var s = xe();
|
|
54
|
+
return l(s, () => e.rightIcon), s;
|
|
58
55
|
}
|
|
59
|
-
}), null), l(o,
|
|
56
|
+
}), null), l(o, c(w, {
|
|
60
57
|
get when() {
|
|
61
58
|
return e.error;
|
|
62
59
|
},
|
|
63
60
|
get children() {
|
|
64
|
-
var
|
|
65
|
-
return l(
|
|
61
|
+
var s = M();
|
|
62
|
+
return l(s, () => e.error), y(() => h(s, "id", v())), s;
|
|
66
63
|
}
|
|
67
|
-
}), null), l(o,
|
|
64
|
+
}), null), l(o, c(w, {
|
|
68
65
|
get when() {
|
|
69
66
|
return _(() => !!e.helperText)() && !e.error;
|
|
70
67
|
},
|
|
71
68
|
get children() {
|
|
72
|
-
var
|
|
73
|
-
return l(
|
|
69
|
+
var s = R();
|
|
70
|
+
return l(s, () => e.helperText), y(() => h(s, "id", x())), s;
|
|
74
71
|
}
|
|
75
72
|
}), null), o;
|
|
76
73
|
})();
|
|
77
74
|
}
|
|
78
75
|
function _e(r) {
|
|
79
|
-
const [e, b] = N(r, ["error", "helperText", "class", "id"]),
|
|
76
|
+
const [e, b] = N(r, ["error", "helperText", "class", "id"]), z = E(), m = () => e.id ?? z, v = () => `${m()}-error`, x = () => `${m()}-helper`, $ = () => {
|
|
80
77
|
const o = [];
|
|
81
|
-
return e.error && o.push(
|
|
78
|
+
return e.error && o.push(v()), e.helperText && !e.error && o.push(x()), o.length > 0 ? o.join(" ") : void 0;
|
|
82
79
|
};
|
|
83
80
|
return (() => {
|
|
84
|
-
var o = me(),
|
|
85
|
-
return B(
|
|
81
|
+
var o = me(), g = o.firstChild;
|
|
82
|
+
return B(g, L({
|
|
86
83
|
get id() {
|
|
87
84
|
return m();
|
|
88
85
|
},
|
|
@@ -93,42 +90,42 @@ function _e(r) {
|
|
|
93
90
|
return $();
|
|
94
91
|
},
|
|
95
92
|
get class() {
|
|
96
|
-
return I("w-full min-h-16
|
|
93
|
+
return I("floe-field w-full min-h-16 p-2.5 text-[length:var(--floe-type-control)]", "focus:outline-none", "disabled:cursor-not-allowed disabled:opacity-60", "resize-y", e.class);
|
|
97
94
|
}
|
|
98
|
-
}, b), !1, !1), l(o,
|
|
95
|
+
}, b), !1, !1), l(o, c(w, {
|
|
99
96
|
get when() {
|
|
100
97
|
return e.error;
|
|
101
98
|
},
|
|
102
99
|
get children() {
|
|
103
|
-
var
|
|
104
|
-
return l(
|
|
100
|
+
var s = M();
|
|
101
|
+
return l(s, () => e.error), y(() => h(s, "id", v())), s;
|
|
105
102
|
}
|
|
106
|
-
}), null), l(o,
|
|
103
|
+
}), null), l(o, c(w, {
|
|
107
104
|
get when() {
|
|
108
105
|
return _(() => !!e.helperText)() && !e.error;
|
|
109
106
|
},
|
|
110
107
|
get children() {
|
|
111
|
-
var
|
|
112
|
-
return l(
|
|
108
|
+
var s = R();
|
|
109
|
+
return l(s, () => e.helperText), y(() => h(s, "id", x())), s;
|
|
113
110
|
}
|
|
114
111
|
}), null), o;
|
|
115
112
|
})();
|
|
116
113
|
}
|
|
117
114
|
function Pe(r) {
|
|
118
|
-
const e = E(), b = `${e}-error`,
|
|
115
|
+
const e = E(), b = `${e}-error`, z = `${e}-helper`, m = () => r.step ?? 1, v = () => r.min ?? -1 / 0, x = () => r.max ?? 1 / 0, $ = (t) => Math.min(x(), Math.max(v(), t)), o = () => !r.disabled && r.value > v(), g = () => !r.disabled && r.value < x(), s = () => {
|
|
119
116
|
o() && r.onChange($(r.value - m()));
|
|
120
117
|
}, T = () => {
|
|
121
|
-
|
|
118
|
+
g() && r.onChange($(r.value + m()));
|
|
122
119
|
}, P = (t) => {
|
|
123
|
-
const
|
|
124
|
-
isNaN(
|
|
120
|
+
const d = parseFloat(t.currentTarget.value);
|
|
121
|
+
isNaN(d) || r.onChange($(d));
|
|
125
122
|
}, i = (t) => {
|
|
126
|
-
const
|
|
127
|
-
isNaN(
|
|
128
|
-
},
|
|
123
|
+
const d = parseFloat(t.currentTarget.value);
|
|
124
|
+
isNaN(d) ? r.onChange(v() === -1 / 0 ? 0 : v()) : r.onChange($(d));
|
|
125
|
+
}, u = () => {
|
|
129
126
|
const t = [];
|
|
130
|
-
return r.error && t.push(b), r.helperText && !r.error && t.push(
|
|
131
|
-
},
|
|
127
|
+
return r.error && t.push(b), r.helperText && !r.error && t.push(z), t.length > 0 ? t.join(" ") : void 0;
|
|
128
|
+
}, f = {
|
|
132
129
|
sm: {
|
|
133
130
|
height: "h-7",
|
|
134
131
|
btnSize: "w-7",
|
|
@@ -144,36 +141,36 @@ function Pe(r) {
|
|
|
144
141
|
btnSize: "w-9",
|
|
145
142
|
iconSize: "w-4 h-4"
|
|
146
143
|
}
|
|
147
|
-
}, a = () =>
|
|
144
|
+
}, a = () => f[r.size ?? "md"];
|
|
148
145
|
return (() => {
|
|
149
|
-
var t = pe(),
|
|
150
|
-
return
|
|
146
|
+
var t = pe(), d = t.firstChild, S = d.firstChild, p = S.nextSibling, O = p.nextSibling;
|
|
147
|
+
return S.$$click = s, l(S, c(ce, {
|
|
151
148
|
get class() {
|
|
152
149
|
return a().iconSize;
|
|
153
150
|
}
|
|
154
|
-
})), p.addEventListener("blur", i), p.$$input = P,
|
|
151
|
+
})), p.addEventListener("blur", i), p.$$input = P, h(p, "id", e), O.$$click = T, l(O, c(ve, {
|
|
155
152
|
get class() {
|
|
156
153
|
return a().iconSize;
|
|
157
154
|
}
|
|
158
|
-
})), l(t,
|
|
155
|
+
})), l(t, c(w, {
|
|
159
156
|
get when() {
|
|
160
157
|
return r.error;
|
|
161
158
|
},
|
|
162
159
|
get children() {
|
|
163
160
|
var n = M();
|
|
164
|
-
return
|
|
161
|
+
return h(n, "id", b), l(n, () => r.error), n;
|
|
165
162
|
}
|
|
166
|
-
}), null), l(t,
|
|
163
|
+
}), null), l(t, c(w, {
|
|
167
164
|
get when() {
|
|
168
165
|
return _(() => !!r.helperText)() && !r.error;
|
|
169
166
|
},
|
|
170
167
|
get children() {
|
|
171
168
|
var n = R();
|
|
172
|
-
return
|
|
169
|
+
return h(n, "id", z), l(n, () => r.helperText), n;
|
|
173
170
|
}
|
|
174
171
|
}), null), y((n) => {
|
|
175
|
-
var V = r.class, j = r.error ? !0 : void 0, A = r.disabled ? !0 : void 0, F = I("inline-flex items-center
|
|
176
|
-
return V !== n.e &&
|
|
172
|
+
var V = r.class, j = r.error ? !0 : void 0, A = r.disabled ? !0 : void 0, F = I("floe-field inline-flex items-center", r.disabled && "cursor-not-allowed", a().height), q = !o(), W = I("flex items-center justify-center border-r border-[var(--floe-line)] cursor-pointer", "text-[var(--floe-ink-soft)] transition-colors", "hover:bg-[var(--floe-state-hover)] hover:text-foreground", "focus:outline-none", "disabled:opacity-50 disabled:cursor-not-allowed disabled:hover:bg-transparent disabled:hover:text-[var(--floe-ink-soft)]", a().btnSize, a().height), H = r.min, G = r.max, U = r.step, X = r.disabled, J = r.inputDisabled, K = r.placeholder, Q = r.error ? !0 : void 0, Y = u(), Z = I("w-16 text-center text-[length:var(--floe-type-control)] bg-transparent border-none", "outline-none focus:outline-none focus:ring-0", "[appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none", r.inputDisabled && "cursor-default"), ee = !g(), te = I("flex items-center justify-center border-l border-[var(--floe-line)] cursor-pointer", "text-[var(--floe-ink-soft)] transition-colors", "hover:bg-[var(--floe-state-hover)] hover:text-foreground", "focus:outline-none", "disabled:opacity-50 disabled:cursor-not-allowed disabled:hover:bg-transparent disabled:hover:text-[var(--floe-ink-soft)]", a().btnSize, a().height);
|
|
173
|
+
return V !== n.e && k(t, n.e = V), j !== n.t && h(d, "aria-invalid", n.t = j), A !== n.a && h(d, "aria-disabled", n.a = A), F !== n.o && k(d, n.o = F), q !== n.i && (S.disabled = n.i = q), W !== n.n && k(S, n.n = W), H !== n.s && h(p, "min", n.s = H), G !== n.h && h(p, "max", n.h = G), U !== n.r && h(p, "step", n.r = U), X !== n.d && (p.disabled = n.d = X), J !== n.l && (p.readOnly = n.l = J), K !== n.u && h(p, "placeholder", n.u = K), Q !== n.c && h(p, "aria-invalid", n.c = Q), Y !== n.w && h(p, "aria-describedby", n.w = Y), Z !== n.m && k(p, n.m = Z), ee !== n.f && (O.disabled = n.f = ee), te !== n.y && k(O, n.y = te), n;
|
|
177
174
|
}, {
|
|
178
175
|
e: void 0,
|
|
179
176
|
t: void 0,
|
|
@@ -197,9 +194,9 @@ function Pe(r) {
|
|
|
197
194
|
}
|
|
198
195
|
const D = 8;
|
|
199
196
|
function De(r) {
|
|
200
|
-
const [e, b] = N(r, ["size", "error", "helperText", "prefix", "suffix", "prefixOptions", "prefixValue", "onPrefixChange", "suffixOptions", "suffixValue", "onSuffixChange", "class", "id"]),
|
|
201
|
-
const
|
|
202
|
-
return e.error &&
|
|
197
|
+
const [e, b] = N(r, ["size", "error", "helperText", "prefix", "suffix", "prefixOptions", "prefixValue", "onPrefixChange", "suffixOptions", "suffixValue", "onSuffixChange", "class", "id"]), z = E(), m = () => e.id ?? z, v = () => `${m()}-error`, x = () => `${m()}-helper`, $ = () => {
|
|
198
|
+
const u = [];
|
|
199
|
+
return e.error && u.push(v()), e.helperText && !e.error && u.push(x()), u.length > 0 ? u.join(" ") : void 0;
|
|
203
200
|
}, o = {
|
|
204
201
|
sm: {
|
|
205
202
|
height: "h-7",
|
|
@@ -216,26 +213,26 @@ function De(r) {
|
|
|
216
213
|
text: "text-sm",
|
|
217
214
|
px: "px-3"
|
|
218
215
|
}
|
|
219
|
-
},
|
|
216
|
+
}, g = () => o[e.size ?? "md"], s = () => !!e.prefix || e.prefixOptions && e.prefixOptions.length > 0, T = () => !!e.suffix || e.suffixOptions && e.suffixOptions.length > 0, P = () => e.prefix ? e.prefix : e.prefixOptions?.find((u) => u.value === e.prefixValue)?.label ?? e.prefixOptions?.[0]?.label, i = () => e.suffix ? e.suffix : e.suffixOptions?.find((u) => u.value === e.suffixValue)?.label ?? e.suffixOptions?.[0]?.label;
|
|
220
217
|
return (() => {
|
|
221
|
-
var
|
|
222
|
-
return l(
|
|
218
|
+
var u = we(), f = u.firstChild, a = f.firstChild;
|
|
219
|
+
return l(f, c(w, {
|
|
223
220
|
get when() {
|
|
224
|
-
return
|
|
221
|
+
return s();
|
|
225
222
|
},
|
|
226
223
|
get children() {
|
|
227
|
-
return
|
|
224
|
+
return c(w, {
|
|
228
225
|
get when() {
|
|
229
226
|
return _(() => !!e.prefixOptions)() && e.prefixOptions.length > 0;
|
|
230
227
|
},
|
|
231
228
|
get fallback() {
|
|
232
229
|
return (() => {
|
|
233
230
|
var t = oe();
|
|
234
|
-
return l(t, () => e.prefix), y(() =>
|
|
231
|
+
return l(t, () => e.prefix), y(() => k(t, I("flex items-center border-r border-[var(--floe-line)] bg-[var(--floe-state-hover)] text-[var(--floe-ink-soft)]", g().text, g().px, g().height))), t;
|
|
235
232
|
})();
|
|
236
233
|
},
|
|
237
234
|
get children() {
|
|
238
|
-
return
|
|
235
|
+
return c(le, {
|
|
239
236
|
get options() {
|
|
240
237
|
return e.prefixOptions;
|
|
241
238
|
},
|
|
@@ -270,25 +267,25 @@ function De(r) {
|
|
|
270
267
|
return $();
|
|
271
268
|
},
|
|
272
269
|
get class() {
|
|
273
|
-
return I("flex-1 min-w-0 bg-transparent border-none", "placeholder:text-
|
|
270
|
+
return I("flex-1 min-w-0 bg-transparent border-none", "placeholder:text-[var(--floe-field-placeholder)]", "outline-none focus:outline-none focus:ring-0", "disabled:cursor-not-allowed", g().text, g().px);
|
|
274
271
|
}
|
|
275
|
-
}, b), !1, !1), l(
|
|
272
|
+
}, b), !1, !1), l(f, c(w, {
|
|
276
273
|
get when() {
|
|
277
274
|
return T();
|
|
278
275
|
},
|
|
279
276
|
get children() {
|
|
280
|
-
return
|
|
277
|
+
return c(w, {
|
|
281
278
|
get when() {
|
|
282
279
|
return _(() => !!e.suffixOptions)() && e.suffixOptions.length > 0;
|
|
283
280
|
},
|
|
284
281
|
get fallback() {
|
|
285
282
|
return (() => {
|
|
286
283
|
var t = oe();
|
|
287
|
-
return l(t, () => e.suffix), y(() =>
|
|
284
|
+
return l(t, () => e.suffix), y(() => k(t, I("flex items-center border-l border-[var(--floe-line)] bg-[var(--floe-state-hover)] text-[var(--floe-ink-soft)]", g().text, g().px, g().height))), t;
|
|
288
285
|
})();
|
|
289
286
|
},
|
|
290
287
|
get children() {
|
|
291
|
-
return
|
|
288
|
+
return c(le, {
|
|
292
289
|
get options() {
|
|
293
290
|
return e.suffixOptions;
|
|
294
291
|
},
|
|
@@ -312,39 +309,39 @@ function De(r) {
|
|
|
312
309
|
}
|
|
313
310
|
});
|
|
314
311
|
}
|
|
315
|
-
}), null), l(
|
|
312
|
+
}), null), l(u, c(w, {
|
|
316
313
|
get when() {
|
|
317
314
|
return e.error;
|
|
318
315
|
},
|
|
319
316
|
get children() {
|
|
320
317
|
var t = M();
|
|
321
|
-
return l(t, () => e.error), y(() =>
|
|
318
|
+
return l(t, () => e.error), y(() => h(t, "id", v())), t;
|
|
322
319
|
}
|
|
323
|
-
}), null), l(
|
|
320
|
+
}), null), l(u, c(w, {
|
|
324
321
|
get when() {
|
|
325
322
|
return _(() => !!e.helperText)() && !e.error;
|
|
326
323
|
},
|
|
327
324
|
get children() {
|
|
328
325
|
var t = R();
|
|
329
|
-
return l(t, () => e.helperText), y(() =>
|
|
326
|
+
return l(t, () => e.helperText), y(() => h(t, "id", x())), t;
|
|
330
327
|
}
|
|
331
328
|
}), null), y((t) => {
|
|
332
|
-
var
|
|
333
|
-
return
|
|
329
|
+
var d = e.class, S = e.error ? !0 : void 0, p = b.disabled ? !0 : void 0, O = I("floe-field inline-flex items-center", b.disabled && "cursor-not-allowed", g().height);
|
|
330
|
+
return d !== t.e && k(u, t.e = d), S !== t.t && h(f, "aria-invalid", t.t = S), p !== t.a && h(f, "aria-disabled", t.a = p), O !== t.o && k(f, t.o = O), t;
|
|
334
331
|
}, {
|
|
335
332
|
e: void 0,
|
|
336
333
|
t: void 0,
|
|
337
334
|
a: void 0,
|
|
338
335
|
o: void 0
|
|
339
|
-
}),
|
|
336
|
+
}), u;
|
|
340
337
|
})();
|
|
341
338
|
}
|
|
342
339
|
function le(r) {
|
|
343
|
-
const [e, b] = ie(!1), [
|
|
340
|
+
const [e, b] = ie(!1), [z, m] = ie({
|
|
344
341
|
x: -9999,
|
|
345
342
|
y: -9999
|
|
346
343
|
});
|
|
347
|
-
let
|
|
344
|
+
let v, x;
|
|
348
345
|
const $ = {
|
|
349
346
|
sm: {
|
|
350
347
|
height: "h-7",
|
|
@@ -361,22 +358,22 @@ function le(r) {
|
|
|
361
358
|
text: "text-sm",
|
|
362
359
|
px: "px-3"
|
|
363
360
|
}
|
|
364
|
-
}, o = () => $[r.size ?? "md"],
|
|
365
|
-
if (!
|
|
366
|
-
const i =
|
|
367
|
-
let t = i.left,
|
|
368
|
-
t +
|
|
361
|
+
}, o = () => $[r.size ?? "md"], g = () => {
|
|
362
|
+
if (!v || !x) return;
|
|
363
|
+
const i = v.getBoundingClientRect(), u = x.getBoundingClientRect(), f = window.innerWidth, a = window.innerHeight;
|
|
364
|
+
let t = i.left, d = i.bottom + 2;
|
|
365
|
+
t + u.width > f - D && (t = i.right - u.width), t = Math.max(D, t), d + u.height > a - D && (d = i.top - u.height - 2), d = Math.max(D, d), m({
|
|
369
366
|
x: t,
|
|
370
|
-
y:
|
|
367
|
+
y: d
|
|
371
368
|
});
|
|
372
|
-
},
|
|
373
|
-
|
|
369
|
+
}, s = (i) => {
|
|
370
|
+
v && !v.contains(i.target) && x && !x.contains(i.target) && b(!1);
|
|
374
371
|
}, T = (i) => {
|
|
375
372
|
i.key === "Escape" && b(!1);
|
|
376
373
|
}, P = (i) => {
|
|
377
374
|
r.onChange?.(i), b(!1);
|
|
378
375
|
};
|
|
379
|
-
return
|
|
376
|
+
return de(() => {
|
|
380
377
|
if (!e()) {
|
|
381
378
|
m({
|
|
382
379
|
x: -9999,
|
|
@@ -384,49 +381,49 @@ function le(r) {
|
|
|
384
381
|
});
|
|
385
382
|
return;
|
|
386
383
|
}
|
|
387
|
-
typeof document > "u" || (document.addEventListener("mousedown",
|
|
388
|
-
document.removeEventListener("mousedown",
|
|
384
|
+
typeof document > "u" || (document.addEventListener("mousedown", s), document.addEventListener("keydown", T), requestAnimationFrame(g), ue(() => {
|
|
385
|
+
document.removeEventListener("mousedown", s), document.removeEventListener("keydown", T);
|
|
389
386
|
}));
|
|
390
387
|
}), [(() => {
|
|
391
|
-
var i = ye(),
|
|
388
|
+
var i = ye(), u = i.firstChild;
|
|
392
389
|
i.$$click = () => {
|
|
393
390
|
b((a) => !a);
|
|
394
391
|
};
|
|
395
|
-
var
|
|
396
|
-
return typeof
|
|
392
|
+
var f = v;
|
|
393
|
+
return typeof f == "function" ? ne(f, i) : v = i, l(u, () => r.label), l(i, c(he, {
|
|
397
394
|
class: "w-3 h-3 opacity-60"
|
|
398
395
|
}), null), y((a) => {
|
|
399
|
-
var t = r.disabled,
|
|
400
|
-
return t !== a.e && (i.disabled = a.e = t),
|
|
396
|
+
var t = r.disabled, d = I("flex items-center gap-1 cursor-pointer", "bg-[var(--floe-state-hover)] text-[var(--floe-ink-soft)]", "hover:bg-[var(--floe-state-press)] hover:text-foreground", "transition-[background-color,color] duration-[var(--floe-duration-fast)] ease-[var(--floe-ease-out)]", "focus:outline-none", "disabled:cursor-not-allowed disabled:bg-[var(--floe-state-hover)] disabled:hover:text-[var(--floe-ink-soft)]", r.position === "prefix" ? "border-r border-[var(--floe-line)]" : "border-l border-[var(--floe-line)]", o().text, o().px, o().height);
|
|
397
|
+
return t !== a.e && (i.disabled = a.e = t), d !== a.t && k(i, a.t = d), a;
|
|
401
398
|
}, {
|
|
402
399
|
e: void 0,
|
|
403
400
|
t: void 0
|
|
404
401
|
}), i;
|
|
405
|
-
})(),
|
|
402
|
+
})(), c(w, {
|
|
406
403
|
get when() {
|
|
407
404
|
return e();
|
|
408
405
|
},
|
|
409
406
|
get children() {
|
|
410
|
-
return
|
|
407
|
+
return c(ae, {
|
|
411
408
|
get children() {
|
|
412
|
-
var i = Ie(),
|
|
413
|
-
return typeof
|
|
409
|
+
var i = Ie(), u = x;
|
|
410
|
+
return typeof u == "function" ? ne(u, i) : x = i, l(i, c(fe, {
|
|
414
411
|
get each() {
|
|
415
412
|
return r.options;
|
|
416
413
|
},
|
|
417
|
-
children: (
|
|
414
|
+
children: (f) => (() => {
|
|
418
415
|
var a = $e();
|
|
419
|
-
return a.$$click = () => P(
|
|
420
|
-
var
|
|
421
|
-
return
|
|
416
|
+
return a.$$click = () => P(f.value), l(a, () => f.label), y((t) => {
|
|
417
|
+
var d = I("w-full flex items-center px-2.5 cursor-pointer", "min-h-[var(--floe-row-height)] rounded-sm", "text-[length:var(--floe-type-control)] leading-[var(--floe-line-control)]", "text-[var(--floe-ink-soft)] hover:text-foreground", "focus:outline-none", r.value === f.value && "bg-[var(--floe-state-selected)] text-foreground font-medium"), S = r.value === f.value;
|
|
418
|
+
return d !== t.e && k(a, t.e = d), S !== t.t && h(a, "aria-selected", t.t = S), t;
|
|
422
419
|
}, {
|
|
423
420
|
e: void 0,
|
|
424
421
|
t: void 0
|
|
425
422
|
}), a;
|
|
426
423
|
})()
|
|
427
|
-
})), y((
|
|
428
|
-
var a = I("fixed z-50 min-w-24 py-0.5", "bg-popover text-popover-foreground", "rounded border border-
|
|
429
|
-
return a !==
|
|
424
|
+
})), y((f) => {
|
|
425
|
+
var a = I("fixed z-50 min-w-24 py-0.5", "bg-popover text-popover-foreground", "rounded-group border border-[var(--floe-line)]", "shadow-[var(--floe-elevation-float)]", "floe-floating-presence floe-floating-menu"), t = `${z().x}px`, d = `${z().y}px`;
|
|
426
|
+
return a !== f.e && k(i, f.e = a), t !== f.t && re(i, "left", f.t = t), d !== f.a && re(i, "top", f.a = d), f;
|
|
430
427
|
}, {
|
|
431
428
|
e: void 0,
|
|
432
429
|
t: void 0,
|
|
@@ -437,7 +434,7 @@ function le(r) {
|
|
|
437
434
|
}
|
|
438
435
|
})];
|
|
439
436
|
}
|
|
440
|
-
|
|
437
|
+
se(["click", "input"]);
|
|
441
438
|
export {
|
|
442
439
|
De as AffixInput,
|
|
443
440
|
Te as Input,
|