@floegence/floe-webapp-core 0.50.6 → 0.52.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.d.ts +7 -0
- package/dist/components/ui/Dialog.js +160 -114
- package/dist/components/ui/DirectoryInput.js +5 -5
- package/dist/components/ui/Dropdown.d.ts +2 -0
- package/dist/components/ui/Dropdown.js +183 -160
- 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 +32 -0
- package/dist/full.js +839 -836
- package/dist/hooks/useOverlayMask.js +95 -83
- package/dist/index.js +150 -147
- package/dist/input-focus.css +0 -1
- 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 +1 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { createComponent as
|
|
2
|
-
import { splitProps as
|
|
3
|
-
import { cn as
|
|
4
|
-
var
|
|
5
|
-
const
|
|
6
|
-
function
|
|
7
|
-
return F
|
|
1
|
+
import { createComponent as l, insert as o, effect as f, className as m, setAttribute as p, spread as D, mergeProps as M, template as v, use as N, memo as G } from "solid-js/web";
|
|
2
|
+
import { splitProps as B, createUniqueId as U, Switch as V, Match as S, Show as b, For as J, useContext as K, createEffect as O, createContext as Q } from "solid-js";
|
|
3
|
+
import { cn as u } from "../../utils/cn.js";
|
|
4
|
+
var R = /* @__PURE__ */ v('<svg viewBox="0 0 12 12"fill=none stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round><path d="M2 6l3 3 5-6">'), T = /* @__PURE__ */ v('<svg viewBox="0 0 12 12"fill=none stroke=currentColor stroke-width=2 stroke-linecap=round><path d="M2 6h8">'), W = /* @__PURE__ */ v("<div role=group>"), X = /* @__PURE__ */ v("<div data-floe-surface=inset data-floe-surface-part=indicator>"), Y = /* @__PURE__ */ v("<input data-floe-choice-input type=checkbox>"), _ = /* @__PURE__ */ v("<span>"), Z = /* @__PURE__ */ v('<div class="flex flex-col">'), ee = /* @__PURE__ */ v('<label><div class="relative flex items-center justify-center pt-0.5">'), re = /* @__PURE__ */ v("<label data-floe-surface-part=choice><span class=font-medium>"), te = /* @__PURE__ */ v('<div class="absolute top-2 right-2"><svg class="w-4 h-4 text-primary"fill=currentColor viewBox="0 0 20 20"><path fill-rule=evenodd d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z"clip-rule=evenodd>'), ne = /* @__PURE__ */ v('<label data-floe-surface-part=choice><div class="flex items-start gap-3"><div class="flex items-center justify-center pt-0.5"></div><div class="flex flex-col flex-1 min-w-0">'), le = /* @__PURE__ */ v('<div class="absolute top-1.5 right-1.5"><div class="w-4 h-4 rounded-full bg-primary flex items-center justify-center">'), oe = /* @__PURE__ */ v("<label data-floe-surface-part=choice>"), ie = /* @__PURE__ */ v("<div>");
|
|
5
|
+
const F = Q();
|
|
6
|
+
function ae() {
|
|
7
|
+
return K(F);
|
|
8
8
|
}
|
|
9
|
-
const
|
|
9
|
+
const C = {
|
|
10
10
|
sm: {
|
|
11
11
|
box: "w-3.5 h-3.5",
|
|
12
12
|
icon: "w-2.5 h-2.5",
|
|
@@ -25,15 +25,15 @@ const v = {
|
|
|
25
25
|
label: "text-sm",
|
|
26
26
|
description: "text-xs"
|
|
27
27
|
}
|
|
28
|
-
},
|
|
28
|
+
}, se = {
|
|
29
29
|
sm: "px-2.5 py-1 text-xs",
|
|
30
30
|
md: "px-3 py-1.5 text-xs",
|
|
31
31
|
lg: "px-4 py-2 text-sm"
|
|
32
|
-
},
|
|
32
|
+
}, de = {
|
|
33
33
|
sm: "p-2.5",
|
|
34
34
|
md: "p-3",
|
|
35
35
|
lg: "p-4"
|
|
36
|
-
},
|
|
36
|
+
}, q = {
|
|
37
37
|
sm: {
|
|
38
38
|
container: "p-3 min-w-[80px]",
|
|
39
39
|
icon: "w-5 h-5"
|
|
@@ -47,233 +47,279 @@ const v = {
|
|
|
47
47
|
icon: "w-8 h-8"
|
|
48
48
|
}
|
|
49
49
|
};
|
|
50
|
-
function
|
|
50
|
+
function A(w) {
|
|
51
51
|
return (() => {
|
|
52
|
-
var
|
|
53
|
-
return
|
|
52
|
+
var a = R();
|
|
53
|
+
return f(() => p(a, "class", w.class)), a;
|
|
54
54
|
})();
|
|
55
55
|
}
|
|
56
|
-
function
|
|
56
|
+
function ce(w) {
|
|
57
57
|
return (() => {
|
|
58
|
-
var
|
|
59
|
-
return
|
|
58
|
+
var a = T();
|
|
59
|
+
return f(() => p(a, "class", w.class)), a;
|
|
60
60
|
})();
|
|
61
61
|
}
|
|
62
|
-
function
|
|
63
|
-
const [
|
|
64
|
-
value: () =>
|
|
65
|
-
onChange: (
|
|
66
|
-
const
|
|
67
|
-
|
|
62
|
+
function ue(w) {
|
|
63
|
+
const [a, e] = B(w, ["value", "onChange", "size", "orientation", "variant", "disabled", "class", "children"]), h = () => a.variant ?? "default", I = {
|
|
64
|
+
value: () => a.value ?? [],
|
|
65
|
+
onChange: (g, c) => {
|
|
66
|
+
const x = a.value ?? [], y = c ? [...x, g] : x.filter((d) => d !== g);
|
|
67
|
+
a.onChange?.(y);
|
|
68
68
|
},
|
|
69
|
-
size: () =>
|
|
69
|
+
size: () => a.size ?? "md",
|
|
70
70
|
variant: h,
|
|
71
|
-
disabled: () =>
|
|
72
|
-
},
|
|
73
|
-
const
|
|
74
|
-
return
|
|
71
|
+
disabled: () => a.disabled ?? !1
|
|
72
|
+
}, j = () => {
|
|
73
|
+
const g = h(), c = a.orientation === "horizontal";
|
|
74
|
+
return g === "button" ? u("inline-flex rounded-md border border-border overflow-hidden", c ? "flex-row" : "flex-col") : g === "card" || g === "tile" ? u("grid gap-2", c ? "grid-flow-col auto-cols-fr" : "grid-cols-1") : u("flex", c ? "flex-row flex-wrap gap-4" : "flex-col gap-2");
|
|
75
75
|
};
|
|
76
|
-
return
|
|
77
|
-
value:
|
|
76
|
+
return l(F.Provider, {
|
|
77
|
+
value: I,
|
|
78
78
|
get children() {
|
|
79
|
-
var
|
|
80
|
-
return
|
|
79
|
+
var g = W();
|
|
80
|
+
return D(g, M({
|
|
81
|
+
get "data-floe-surface"() {
|
|
82
|
+
return h() === "button" ? "inset" : void 0;
|
|
83
|
+
},
|
|
84
|
+
get "data-floe-surface-part"() {
|
|
85
|
+
return h() === "button" ? "rail" : void 0;
|
|
86
|
+
},
|
|
81
87
|
get class() {
|
|
82
|
-
return
|
|
88
|
+
return u(j(), a.class);
|
|
83
89
|
}
|
|
84
|
-
}, e), !1, !0),
|
|
90
|
+
}, e), !1, !0), o(g, () => a.children), g;
|
|
85
91
|
}
|
|
86
92
|
});
|
|
87
93
|
}
|
|
88
|
-
function
|
|
89
|
-
const
|
|
90
|
-
|
|
91
|
-
},
|
|
92
|
-
var t =
|
|
93
|
-
return
|
|
94
|
+
function fe(w) {
|
|
95
|
+
const a = ae(), [e, h] = B(w, ["value", "checked", "onChange", "label", "description", "icon", "size", "variant", "indeterminate", "ref", "class", "disabled", "id"]), I = U(), j = () => e.id ?? I, g = () => a !== void 0, c = () => e.size ?? a?.size() ?? "md", x = () => e.variant ?? a?.variant() ?? "default", y = () => e.disabled ?? a?.disabled() ?? !1, d = () => g() && e.value ? a.value().includes(e.value) : e.checked ?? !1, H = () => {
|
|
96
|
+
y() || (g() && e.value ? a.onChange(e.value, !d()) : e.onChange?.(!d()));
|
|
97
|
+
}, L = () => (() => {
|
|
98
|
+
var t = X();
|
|
99
|
+
return o(t, l(b, {
|
|
94
100
|
get when() {
|
|
95
101
|
return e.indeterminate;
|
|
96
102
|
},
|
|
97
103
|
get children() {
|
|
98
|
-
return
|
|
104
|
+
return l(ce, {
|
|
99
105
|
get class() {
|
|
100
|
-
return
|
|
106
|
+
return u(C[c()].icon, "transition-transform duration-150");
|
|
101
107
|
}
|
|
102
108
|
});
|
|
103
109
|
}
|
|
104
|
-
}), null),
|
|
110
|
+
}), null), o(t, l(b, {
|
|
105
111
|
get when() {
|
|
106
|
-
return
|
|
112
|
+
return G(() => !e.indeterminate)() && d();
|
|
107
113
|
},
|
|
108
114
|
get children() {
|
|
109
|
-
return
|
|
115
|
+
return l(A, {
|
|
110
116
|
get class() {
|
|
111
|
-
return
|
|
117
|
+
return u(C[c()].icon, "transition-transform duration-150");
|
|
112
118
|
}
|
|
113
119
|
});
|
|
114
120
|
}
|
|
115
|
-
}), null),
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
},
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
121
|
+
}), null), f((r) => {
|
|
122
|
+
var n = d() || e.indeterminate ? "true" : void 0, i = u("rounded-[3px] border-2 transition-all duration-150", "flex items-center justify-center", C[c()].box, d() || e.indeterminate ? "border-primary bg-primary text-primary-foreground" : "border-input bg-background hover:border-primary/50", y() && "cursor-not-allowed");
|
|
123
|
+
return n !== r.e && p(t, "data-floe-selected", r.e = n), i !== r.t && m(t, r.t = i), r;
|
|
124
|
+
}, {
|
|
125
|
+
e: void 0,
|
|
126
|
+
t: void 0
|
|
127
|
+
}), t;
|
|
128
|
+
})(), z = (t) => {
|
|
129
|
+
let r;
|
|
130
|
+
return O(() => {
|
|
131
|
+
r && (r.indeterminate = e.indeterminate ?? !1);
|
|
132
|
+
}), (() => {
|
|
133
|
+
var n = Y();
|
|
134
|
+
return N((i) => {
|
|
135
|
+
r = i, typeof e.ref == "function" && e.ref(i);
|
|
136
|
+
}, n), n.addEventListener("change", H), D(n, M({
|
|
137
|
+
get id() {
|
|
138
|
+
return j();
|
|
139
|
+
},
|
|
140
|
+
get value() {
|
|
141
|
+
return e.value;
|
|
142
|
+
},
|
|
143
|
+
get checked() {
|
|
144
|
+
return d();
|
|
145
|
+
},
|
|
146
|
+
get "aria-checked"() {
|
|
147
|
+
return G(() => !!e.indeterminate)() ? "mixed" : d();
|
|
148
|
+
},
|
|
149
|
+
get disabled() {
|
|
150
|
+
return y();
|
|
151
|
+
},
|
|
152
|
+
get class() {
|
|
153
|
+
return t.class ?? "sr-only peer";
|
|
154
|
+
}
|
|
155
|
+
}, h), !1, !1), n;
|
|
156
|
+
})();
|
|
157
|
+
};
|
|
158
|
+
return l(V, {
|
|
137
159
|
get children() {
|
|
138
|
-
return [
|
|
160
|
+
return [l(S, {
|
|
139
161
|
get when() {
|
|
140
|
-
return
|
|
162
|
+
return x() === "default";
|
|
141
163
|
},
|
|
142
164
|
get children() {
|
|
143
|
-
var t =
|
|
144
|
-
return
|
|
165
|
+
var t = ee(), r = t.firstChild;
|
|
166
|
+
return o(r, l(z, {}), null), o(r, l(L, {}), null), o(t, l(b, {
|
|
145
167
|
get when() {
|
|
146
168
|
return e.label || e.description;
|
|
147
169
|
},
|
|
148
170
|
get children() {
|
|
149
|
-
var
|
|
150
|
-
return n
|
|
171
|
+
var n = Z();
|
|
172
|
+
return o(n, l(b, {
|
|
151
173
|
get when() {
|
|
152
174
|
return e.label;
|
|
153
175
|
},
|
|
154
176
|
get children() {
|
|
155
|
-
var
|
|
156
|
-
return
|
|
177
|
+
var i = _();
|
|
178
|
+
return o(i, () => e.label), f(() => m(i, u("text-foreground", C[c()].label))), i;
|
|
157
179
|
}
|
|
158
|
-
}), null), n
|
|
180
|
+
}), null), o(n, l(b, {
|
|
159
181
|
get when() {
|
|
160
182
|
return e.description;
|
|
161
183
|
},
|
|
162
184
|
get children() {
|
|
163
|
-
var
|
|
164
|
-
return
|
|
185
|
+
var i = _();
|
|
186
|
+
return o(i, () => e.description), f(() => m(i, u("text-muted-foreground", C[c()].description))), i;
|
|
165
187
|
}
|
|
166
|
-
}), null),
|
|
188
|
+
}), null), n;
|
|
167
189
|
}
|
|
168
|
-
}), null),
|
|
190
|
+
}), null), f(() => m(t, u("inline-flex items-start gap-2 cursor-pointer select-none", y() && "opacity-50 cursor-not-allowed", e.class))), t;
|
|
169
191
|
}
|
|
170
|
-
}),
|
|
192
|
+
}), l(S, {
|
|
171
193
|
get when() {
|
|
172
|
-
return
|
|
194
|
+
return x() === "button";
|
|
173
195
|
},
|
|
174
196
|
get children() {
|
|
175
|
-
var t =
|
|
176
|
-
return
|
|
197
|
+
var t = re(), r = t.firstChild;
|
|
198
|
+
return o(t, l(z, {
|
|
177
199
|
class: "sr-only"
|
|
178
|
-
}),
|
|
200
|
+
}), r), o(r, () => e.label), f((n) => {
|
|
201
|
+
var i = d() ? "inset" : "raised", s = d() ? "true" : void 0, k = x(), $ = u("cursor-pointer select-none transition-colors duration-150", "border-r border-border last:border-r-0", se[c()], d() ? "bg-primary text-primary-foreground" : "bg-background text-foreground hover:bg-muted", y() && "opacity-50 cursor-not-allowed", e.class);
|
|
202
|
+
return i !== n.e && p(t, "data-floe-surface", n.e = i), s !== n.t && p(t, "data-floe-selected", n.t = s), k !== n.a && p(t, "data-floe-choice-variant", n.a = k), $ !== n.o && m(t, n.o = $), n;
|
|
203
|
+
}, {
|
|
204
|
+
e: void 0,
|
|
205
|
+
t: void 0,
|
|
206
|
+
a: void 0,
|
|
207
|
+
o: void 0
|
|
208
|
+
}), t;
|
|
179
209
|
}
|
|
180
|
-
}),
|
|
210
|
+
}), l(S, {
|
|
181
211
|
get when() {
|
|
182
|
-
return
|
|
212
|
+
return x() === "card";
|
|
183
213
|
},
|
|
184
214
|
get children() {
|
|
185
|
-
var t =
|
|
186
|
-
return
|
|
215
|
+
var t = ne(), r = t.firstChild, n = r.firstChild, i = n.nextSibling;
|
|
216
|
+
return o(t, l(z, {
|
|
187
217
|
class: "sr-only"
|
|
188
|
-
}),
|
|
218
|
+
}), r), o(n, l(L, {})), o(i, l(b, {
|
|
189
219
|
get when() {
|
|
190
220
|
return e.label;
|
|
191
221
|
},
|
|
192
222
|
get children() {
|
|
193
|
-
var
|
|
194
|
-
return
|
|
223
|
+
var s = _();
|
|
224
|
+
return o(s, () => e.label), f(() => m(s, u("font-medium text-foreground", C[c()].label))), s;
|
|
195
225
|
}
|
|
196
|
-
}), null),
|
|
226
|
+
}), null), o(i, l(b, {
|
|
197
227
|
get when() {
|
|
198
228
|
return e.description;
|
|
199
229
|
},
|
|
200
230
|
get children() {
|
|
201
|
-
var
|
|
202
|
-
return
|
|
231
|
+
var s = _();
|
|
232
|
+
return o(s, () => e.description), f(() => m(s, u("text-muted-foreground mt-0.5", C[c()].description))), s;
|
|
203
233
|
}
|
|
204
|
-
}), null),
|
|
234
|
+
}), null), o(t, l(b, {
|
|
205
235
|
get when() {
|
|
206
|
-
return
|
|
236
|
+
return d();
|
|
207
237
|
},
|
|
208
238
|
get children() {
|
|
209
|
-
return
|
|
239
|
+
return te();
|
|
210
240
|
}
|
|
211
|
-
}), null),
|
|
241
|
+
}), null), f((s) => {
|
|
242
|
+
var k = d() ? "inset" : "raised", $ = d() ? "true" : void 0, P = x(), E = u("relative cursor-pointer select-none rounded-lg border-2 transition-all duration-150", de[c()], d() ? "border-primary bg-primary/5" : "border-border bg-background hover:border-primary/50 hover:bg-muted/50", y() && "opacity-50 cursor-not-allowed", e.class);
|
|
243
|
+
return k !== s.e && p(t, "data-floe-surface", s.e = k), $ !== s.t && p(t, "data-floe-selected", s.t = $), P !== s.a && p(t, "data-floe-choice-variant", s.a = P), E !== s.o && m(t, s.o = E), s;
|
|
244
|
+
}, {
|
|
245
|
+
e: void 0,
|
|
246
|
+
t: void 0,
|
|
247
|
+
a: void 0,
|
|
248
|
+
o: void 0
|
|
249
|
+
}), t;
|
|
212
250
|
}
|
|
213
|
-
}),
|
|
251
|
+
}), l(S, {
|
|
214
252
|
get when() {
|
|
215
|
-
return
|
|
253
|
+
return x() === "tile";
|
|
216
254
|
},
|
|
217
255
|
get children() {
|
|
218
|
-
var t =
|
|
219
|
-
return
|
|
256
|
+
var t = oe();
|
|
257
|
+
return o(t, l(z, {
|
|
220
258
|
class: "sr-only"
|
|
221
|
-
}), null),
|
|
259
|
+
}), null), o(t, l(b, {
|
|
222
260
|
get when() {
|
|
223
261
|
return e.icon;
|
|
224
262
|
},
|
|
225
|
-
children: (
|
|
226
|
-
const
|
|
263
|
+
children: (r) => {
|
|
264
|
+
const n = r();
|
|
227
265
|
return (() => {
|
|
228
|
-
var
|
|
229
|
-
return
|
|
266
|
+
var i = ie();
|
|
267
|
+
return o(i, l(n, {
|
|
230
268
|
get class() {
|
|
231
|
-
return
|
|
269
|
+
return q[c()].icon;
|
|
232
270
|
}
|
|
233
|
-
})),
|
|
271
|
+
})), f(() => m(i, u("mb-2 transition-colors duration-150", d() ? "text-primary" : "text-muted-foreground"))), i;
|
|
234
272
|
})();
|
|
235
273
|
}
|
|
236
|
-
}), null),
|
|
274
|
+
}), null), o(t, l(b, {
|
|
237
275
|
get when() {
|
|
238
276
|
return e.label;
|
|
239
277
|
},
|
|
240
278
|
get children() {
|
|
241
|
-
var
|
|
242
|
-
return
|
|
279
|
+
var r = _();
|
|
280
|
+
return o(r, () => e.label), f(() => m(r, u("font-medium transition-colors duration-150", C[c()].label, d() ? "text-primary" : "text-foreground"))), r;
|
|
243
281
|
}
|
|
244
|
-
}), null),
|
|
282
|
+
}), null), o(t, l(b, {
|
|
245
283
|
get when() {
|
|
246
284
|
return e.description;
|
|
247
285
|
},
|
|
248
286
|
get children() {
|
|
249
|
-
var
|
|
250
|
-
return
|
|
287
|
+
var r = _();
|
|
288
|
+
return o(r, () => e.description), f(() => m(r, u("text-muted-foreground mt-0.5", C[c()].description))), r;
|
|
251
289
|
}
|
|
252
|
-
}), null),
|
|
290
|
+
}), null), o(t, l(b, {
|
|
253
291
|
get when() {
|
|
254
|
-
return
|
|
292
|
+
return d();
|
|
255
293
|
},
|
|
256
294
|
get children() {
|
|
257
|
-
var
|
|
258
|
-
return n
|
|
295
|
+
var r = le(), n = r.firstChild;
|
|
296
|
+
return o(n, l(A, {
|
|
259
297
|
class: "w-2.5 h-2.5 text-primary-foreground"
|
|
260
|
-
})),
|
|
298
|
+
})), r;
|
|
261
299
|
}
|
|
262
|
-
}), null),
|
|
300
|
+
}), null), f((r) => {
|
|
301
|
+
var n = d() ? "inset" : "raised", i = d() ? "true" : void 0, s = x(), k = u("relative flex flex-col items-center justify-center cursor-pointer select-none", "rounded-lg border-2 transition-all duration-150 text-center", q[c()].container, d() ? "border-primary bg-primary/5" : "border-border bg-background hover:border-primary/50 hover:bg-muted/50", y() && "opacity-50 cursor-not-allowed", e.class);
|
|
302
|
+
return n !== r.e && p(t, "data-floe-surface", r.e = n), i !== r.t && p(t, "data-floe-selected", r.t = i), s !== r.a && p(t, "data-floe-choice-variant", r.a = s), k !== r.o && m(t, r.o = k), r;
|
|
303
|
+
}, {
|
|
304
|
+
e: void 0,
|
|
305
|
+
t: void 0,
|
|
306
|
+
a: void 0,
|
|
307
|
+
o: void 0
|
|
308
|
+
}), t;
|
|
263
309
|
}
|
|
264
310
|
})];
|
|
265
311
|
}
|
|
266
312
|
});
|
|
267
313
|
}
|
|
268
|
-
function
|
|
269
|
-
const [
|
|
270
|
-
return
|
|
314
|
+
function me(w) {
|
|
315
|
+
const [a, e] = B(w, ["options"]);
|
|
316
|
+
return l(ue, M(e, {
|
|
271
317
|
get children() {
|
|
272
|
-
return
|
|
318
|
+
return l(J, {
|
|
273
319
|
get each() {
|
|
274
|
-
return
|
|
320
|
+
return a.options;
|
|
275
321
|
},
|
|
276
|
-
children: (h) =>
|
|
322
|
+
children: (h) => l(fe, {
|
|
277
323
|
get value() {
|
|
278
324
|
return h.value;
|
|
279
325
|
},
|
|
@@ -295,7 +341,7 @@ function se(f) {
|
|
|
295
341
|
}));
|
|
296
342
|
}
|
|
297
343
|
export {
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
344
|
+
fe as Checkbox,
|
|
345
|
+
ue as CheckboxGroup,
|
|
346
|
+
me as CheckboxList
|
|
301
347
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createComponent as c, Portal as R, effect as C, className as _, setStyleProperty as E, setAttribute as x, insert as i, Dynamic as T, template as
|
|
1
|
+
import { createComponent as c, Portal as R, effect as C, className as _, setStyleProperty as E, setAttribute as x, insert as i, Dynamic as T, template as f, use as F, delegateEvents as j } from "solid-js/web";
|
|
2
2
|
import { createSignal as B, createEffect as H, createMemo as L, Show as h, For as I } from "solid-js";
|
|
3
3
|
import { cn as D } from "../../utils/cn.js";
|
|
4
4
|
import { useCommand as N } from "../../context/CommandContext.js";
|
|
@@ -7,8 +7,8 @@ import { useResolvedFloeConfig as W } from "../../context/FloeConfigContext.js";
|
|
|
7
7
|
import { useOverlayMask as q } from "../../hooks/useOverlayMask.js";
|
|
8
8
|
import { matchKeybind as G } from "../../utils/keybind.js";
|
|
9
9
|
import { createFloatingPresence as J } from "./floatingPresence.js";
|
|
10
|
-
var Q = /* @__PURE__ */
|
|
11
|
-
function
|
|
10
|
+
var Q = /* @__PURE__ */ f("<div>"), V = /* @__PURE__ */ f('<div data-floe-surface=floating><div data-floe-input-surface data-floe-surface=inset class="flex items-center gap-3 px-4 pt-1 border-b border-border"><input type=text><kbd class="text-xs text-muted-foreground px-1.5 py-0.5 rounded bg-muted font-mono"></kbd></div><div class="max-h-80 overflow-y-auto overscroll-contain py-2">'), X = /* @__PURE__ */ f('<div class="px-4 py-8 text-center text-sm text-muted-foreground">'), Y = /* @__PURE__ */ f('<div><div class="px-4 py-1 text-xs font-semibold text-muted-foreground uppercase tracking-wider">'), Z = /* @__PURE__ */ f('<span class="w-5 h-5 flex items-center justify-center text-muted-foreground">'), ee = /* @__PURE__ */ f('<span class="ml-2 text-muted-foreground text-xs">'), te = /* @__PURE__ */ f('<kbd class="text-xs text-muted-foreground px-1.5 py-0.5 rounded bg-muted font-mono">'), re = /* @__PURE__ */ f('<button type=button><div class="flex-1 text-left"><span>');
|
|
11
|
+
function fe(b = {}) {
|
|
12
12
|
const n = N(), k = W();
|
|
13
13
|
let z, M;
|
|
14
14
|
const [S, w] = B(0), v = J({
|
|
@@ -61,11 +61,11 @@ function me(b = {}) {
|
|
|
61
61
|
}, A = L(() => {
|
|
62
62
|
const e = n.filteredCommands(), t = /* @__PURE__ */ new Map();
|
|
63
63
|
return e.forEach((r, a) => {
|
|
64
|
-
const
|
|
64
|
+
const m = r.category ?? "Commands", s = t.get(m);
|
|
65
65
|
s ? s.push({
|
|
66
66
|
cmd: r,
|
|
67
67
|
index: a
|
|
68
|
-
}) : t.set(
|
|
68
|
+
}) : t.set(m, [{
|
|
69
69
|
cmd: r,
|
|
70
70
|
index: a
|
|
71
71
|
}]);
|
|
@@ -81,8 +81,8 @@ function me(b = {}) {
|
|
|
81
81
|
return [(() => {
|
|
82
82
|
var e = Q();
|
|
83
83
|
return e.$$click = () => n.close(), C((t) => {
|
|
84
|
-
var r = D("fixed inset-0 bg-background/60 backdrop-blur-sm floe-floating-presence floe-floating-backdrop", b.zIndex === void 0 && "z-50"), a = b.zIndex,
|
|
85
|
-
return r !== t.e && _(e, t.e = r), a !== t.t && E(e, "z-index", t.t = a),
|
|
84
|
+
var r = D("fixed inset-0 bg-background/60 backdrop-blur-sm floe-floating-presence floe-floating-backdrop", b.zIndex === void 0 && "z-50"), a = b.zIndex, m = v.state(), s = v.exiting() ? "true" : void 0;
|
|
85
|
+
return r !== t.e && _(e, t.e = r), a !== t.t && E(e, "z-index", t.t = a), m !== t.a && x(e, "data-floating-presence", t.a = m), s !== t.o && x(e, "aria-hidden", t.o = s), t;
|
|
86
86
|
}, {
|
|
87
87
|
e: void 0,
|
|
88
88
|
t: void 0,
|
|
@@ -90,14 +90,14 @@ function me(b = {}) {
|
|
|
90
90
|
o: void 0
|
|
91
91
|
}), e;
|
|
92
92
|
})(), (() => {
|
|
93
|
-
var e = V(), t = e.firstChild, r = t.firstChild, a = r.nextSibling,
|
|
93
|
+
var e = V(), t = e.firstChild, r = t.firstChild, a = r.nextSibling, m = t.nextSibling;
|
|
94
94
|
e.$$keydown = O;
|
|
95
95
|
var s = M;
|
|
96
96
|
typeof s == "function" ? F(s, e) : M = e, i(t, c(U, {
|
|
97
97
|
class: "w-5 h-5 text-muted-foreground flex-shrink-0"
|
|
98
98
|
}), r), r.$$input = (o) => n.setSearch(o.currentTarget.value);
|
|
99
99
|
var P = z;
|
|
100
|
-
return typeof P == "function" ? F(P, r) : z = r, i(a, () => k.config.strings.commandPalette.esc), i(
|
|
100
|
+
return typeof P == "function" ? F(P, r) : z = r, i(a, () => k.config.strings.commandPalette.esc), i(m, c(h, {
|
|
101
101
|
get when() {
|
|
102
102
|
return n.filteredCommands().length > 0;
|
|
103
103
|
},
|
|
@@ -172,5 +172,5 @@ function me(b = {}) {
|
|
|
172
172
|
}
|
|
173
173
|
j(["click", "keydown", "input"]);
|
|
174
174
|
export {
|
|
175
|
-
|
|
175
|
+
fe as CommandPalette
|
|
176
176
|
};
|
|
@@ -15,6 +15,13 @@ export interface DialogProps {
|
|
|
15
15
|
children: JSX.Element;
|
|
16
16
|
footer?: JSX.Element;
|
|
17
17
|
class?: string;
|
|
18
|
+
/** Bottom drawers retain the same modal and surface-placement contract. */
|
|
19
|
+
presentation?: 'dialog' | 'bottom-drawer';
|
|
20
|
+
/** Undefined uses the default header; null leaves only accessible title/description. */
|
|
21
|
+
header?: JSX.Element;
|
|
22
|
+
contentClass?: string;
|
|
23
|
+
/** Includes the exit animation, so hosts can retain background input isolation. */
|
|
24
|
+
onPresenceChange?: (present: boolean) => void;
|
|
18
25
|
/** Optional stacking layer for global dialogs. Overrides the placement provider default. */
|
|
19
26
|
globalZIndex?: number;
|
|
20
27
|
}
|