@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,10 +1,10 @@
|
|
|
1
|
-
import { createComponent as
|
|
2
|
-
import { splitProps as j, createUniqueId as
|
|
1
|
+
import { createComponent as a, spread as E, mergeProps as I, insert as l, effect as g, className as f, setAttribute as m, template as h } from "solid-js/web";
|
|
2
|
+
import { splitProps as j, createUniqueId as G, For as A, Switch as B, Match as S, Show as x, createContext as D, useContext as F } from "solid-js";
|
|
3
3
|
import { cn as c } from "../../utils/cn.js";
|
|
4
|
-
var H = /* @__PURE__ */
|
|
5
|
-
const
|
|
4
|
+
var H = /* @__PURE__ */ h("<div role=radiogroup>"), U = /* @__PURE__ */ h("<input data-floe-choice-input type=radio>"), V = /* @__PURE__ */ h("<div data-floe-surface=inset data-floe-surface-part=indicator><div data-floe-surface=flat data-floe-surface-part=radio-dot>"), $ = /* @__PURE__ */ h("<span>"), J = /* @__PURE__ */ h('<div class="flex flex-col">'), K = /* @__PURE__ */ h('<label><div class="relative flex items-center justify-center pt-0.5">'), Q = /* @__PURE__ */ h("<label data-floe-surface-part=choice><span class=font-medium>"), T = /* @__PURE__ */ h('<div class="absolute top-2 right-2"><svg class="w-4 h-4 text-[var(--floe-accent-ink)]"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>'), W = /* @__PURE__ */ h('<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">'), X = /* @__PURE__ */ h('<div class="absolute top-1.5 right-1.5"><div class="w-2 h-2 rounded-full bg-primary">'), Y = /* @__PURE__ */ h("<label data-floe-surface-part=choice>"), Z = /* @__PURE__ */ h("<div>");
|
|
5
|
+
const M = D();
|
|
6
6
|
function ee() {
|
|
7
|
-
const y = F(
|
|
7
|
+
const y = F(M);
|
|
8
8
|
if (!y)
|
|
9
9
|
throw new Error("RadioOption must be used within a RadioGroup");
|
|
10
10
|
return y;
|
|
@@ -14,13 +14,13 @@ const C = {
|
|
|
14
14
|
outer: "w-3.5 h-3.5",
|
|
15
15
|
inner: "w-1.5 h-1.5",
|
|
16
16
|
label: "text-xs",
|
|
17
|
-
description: "text-
|
|
17
|
+
description: "text-caption"
|
|
18
18
|
},
|
|
19
19
|
md: {
|
|
20
20
|
outer: "w-4 h-4",
|
|
21
21
|
inner: "w-2 h-2",
|
|
22
|
-
label: "text-
|
|
23
|
-
description: "text-
|
|
22
|
+
label: "text-sm",
|
|
23
|
+
description: "text-caption"
|
|
24
24
|
},
|
|
25
25
|
lg: {
|
|
26
26
|
outer: "w-5 h-5",
|
|
@@ -36,7 +36,7 @@ const C = {
|
|
|
36
36
|
sm: "p-2.5",
|
|
37
37
|
md: "p-3",
|
|
38
38
|
lg: "p-4"
|
|
39
|
-
},
|
|
39
|
+
}, q = {
|
|
40
40
|
sm: {
|
|
41
41
|
container: "p-3 min-w-[80px]",
|
|
42
42
|
icon: "w-5 h-5"
|
|
@@ -50,23 +50,23 @@ const C = {
|
|
|
50
50
|
icon: "w-8 h-8"
|
|
51
51
|
}
|
|
52
52
|
};
|
|
53
|
-
function
|
|
54
|
-
const [
|
|
55
|
-
value: () =>
|
|
56
|
-
onChange: (u) =>
|
|
57
|
-
size: () =>
|
|
53
|
+
function oe(y) {
|
|
54
|
+
const [d, t] = j(y, ["value", "onChange", "size", "orientation", "variant", "disabled", "name", "class", "children"]), w = G(), R = () => d.name ?? w, _ = () => d.variant ?? "default", v = {
|
|
55
|
+
value: () => d.value,
|
|
56
|
+
onChange: (u) => d.onChange?.(u),
|
|
57
|
+
size: () => d.size ?? "md",
|
|
58
58
|
variant: _,
|
|
59
|
-
disabled: () =>
|
|
60
|
-
name:
|
|
61
|
-
},
|
|
62
|
-
const u = _(),
|
|
63
|
-
return u === "button" ? c("inline-flex rounded-
|
|
59
|
+
disabled: () => d.disabled ?? !1,
|
|
60
|
+
name: R
|
|
61
|
+
}, p = () => {
|
|
62
|
+
const u = _(), s = d.orientation === "horizontal";
|
|
63
|
+
return u === "button" ? c("inline-flex rounded-group border border-[var(--floe-line)] overflow-hidden", s ? "flex-row" : "flex-col") : u === "card" || u === "tile" ? c("grid gap-2", s ? "grid-flow-col auto-cols-fr" : "grid-cols-1") : c("flex", s ? "flex-row flex-wrap gap-4" : "flex-col gap-2");
|
|
64
64
|
};
|
|
65
|
-
return
|
|
66
|
-
value:
|
|
65
|
+
return a(M.Provider, {
|
|
66
|
+
value: v,
|
|
67
67
|
get children() {
|
|
68
68
|
var u = H();
|
|
69
|
-
return
|
|
69
|
+
return E(u, I({
|
|
70
70
|
get "data-floe-surface"() {
|
|
71
71
|
return _() === "button" ? "inset" : void 0;
|
|
72
72
|
},
|
|
@@ -74,29 +74,29 @@ function ne(y) {
|
|
|
74
74
|
return _() === "button" ? "rail" : void 0;
|
|
75
75
|
},
|
|
76
76
|
get class() {
|
|
77
|
-
return c(
|
|
77
|
+
return c(p(), d.class);
|
|
78
78
|
}
|
|
79
|
-
}, t), !1, !0),
|
|
79
|
+
}, t), !1, !0), l(u, () => d.children), u;
|
|
80
80
|
}
|
|
81
81
|
});
|
|
82
82
|
}
|
|
83
|
-
function
|
|
84
|
-
const
|
|
85
|
-
u() ||
|
|
86
|
-
},
|
|
83
|
+
function ne(y) {
|
|
84
|
+
const d = ee(), [t, w] = j(y, ["value", "label", "description", "icon", "size", "class", "disabled", "id"]), R = G(), _ = () => t.id ?? R, v = () => t.size ?? d.size(), p = () => d.variant(), u = () => t.disabled ?? d.disabled(), s = () => d.value() === t.value, O = () => {
|
|
85
|
+
u() || d.onChange(t.value);
|
|
86
|
+
}, k = (e) => (() => {
|
|
87
87
|
var r = U();
|
|
88
|
-
return r.addEventListener("change",
|
|
88
|
+
return r.addEventListener("change", O), E(r, I({
|
|
89
89
|
get id() {
|
|
90
90
|
return _();
|
|
91
91
|
},
|
|
92
92
|
get name() {
|
|
93
|
-
return
|
|
93
|
+
return d.name();
|
|
94
94
|
},
|
|
95
95
|
get value() {
|
|
96
96
|
return t.value;
|
|
97
97
|
},
|
|
98
98
|
get checked() {
|
|
99
|
-
return
|
|
99
|
+
return s();
|
|
100
100
|
},
|
|
101
101
|
get disabled() {
|
|
102
102
|
return u();
|
|
@@ -107,60 +107,60 @@ function oe(y) {
|
|
|
107
107
|
}, w), !1, !1), r;
|
|
108
108
|
})(), L = () => (() => {
|
|
109
109
|
var e = V(), r = e.firstChild;
|
|
110
|
-
return
|
|
111
|
-
var i =
|
|
112
|
-
return i !==
|
|
110
|
+
return g((o) => {
|
|
111
|
+
var i = s() ? "true" : void 0, n = c("rounded-full border-2 transition-colors duration-[var(--floe-duration-fast)]", "flex items-center justify-center", C[v()].outer, s() ? "border-primary bg-primary" : c("border-[var(--floe-control-edge)] bg-transparent", p() === "default" && "hover:border-[var(--floe-control-edge-hover)]"), u() && "cursor-not-allowed", "peer-focus-visible:ring-2 peer-focus-visible:ring-ring peer-focus-visible:ring-offset-2"), b = c("rounded-full bg-primary-foreground transition-transform duration-[var(--floe-duration-fast)]", C[v()].inner, s() ? "scale-100" : "scale-0");
|
|
112
|
+
return i !== o.e && m(e, "data-floe-selected", o.e = i), n !== o.t && f(e, o.t = n), b !== o.a && f(r, o.a = b), o;
|
|
113
113
|
}, {
|
|
114
114
|
e: void 0,
|
|
115
115
|
t: void 0,
|
|
116
116
|
a: void 0
|
|
117
117
|
}), e;
|
|
118
118
|
})();
|
|
119
|
-
return
|
|
119
|
+
return a(B, {
|
|
120
120
|
get children() {
|
|
121
|
-
return [
|
|
121
|
+
return [a(S, {
|
|
122
122
|
get when() {
|
|
123
|
-
return
|
|
123
|
+
return p() === "default";
|
|
124
124
|
},
|
|
125
125
|
get children() {
|
|
126
126
|
var e = K(), r = e.firstChild;
|
|
127
|
-
return
|
|
127
|
+
return l(r, a(k, {}), null), l(r, a(L, {}), null), l(e, a(x, {
|
|
128
128
|
get when() {
|
|
129
129
|
return t.label || t.description;
|
|
130
130
|
},
|
|
131
131
|
get children() {
|
|
132
|
-
var
|
|
133
|
-
return
|
|
132
|
+
var o = J();
|
|
133
|
+
return l(o, a(x, {
|
|
134
134
|
get when() {
|
|
135
135
|
return t.label;
|
|
136
136
|
},
|
|
137
137
|
get children() {
|
|
138
138
|
var i = $();
|
|
139
|
-
return
|
|
139
|
+
return l(i, () => t.label), g(() => f(i, c("text-foreground", C[v()].label))), i;
|
|
140
140
|
}
|
|
141
|
-
}), null),
|
|
141
|
+
}), null), l(o, a(x, {
|
|
142
142
|
get when() {
|
|
143
143
|
return t.description;
|
|
144
144
|
},
|
|
145
145
|
get children() {
|
|
146
146
|
var i = $();
|
|
147
|
-
return
|
|
147
|
+
return l(i, () => t.description), g(() => f(i, c("text-[var(--floe-ink-soft)]", C[v()].description))), i;
|
|
148
148
|
}
|
|
149
|
-
}), null),
|
|
149
|
+
}), null), o;
|
|
150
150
|
}
|
|
151
|
-
}), null),
|
|
151
|
+
}), null), g(() => f(e, c("inline-flex items-start gap-2 cursor-pointer select-none", u() && "opacity-50 cursor-not-allowed", t.class))), e;
|
|
152
152
|
}
|
|
153
|
-
}),
|
|
153
|
+
}), a(S, {
|
|
154
154
|
get when() {
|
|
155
|
-
return
|
|
155
|
+
return p() === "button";
|
|
156
156
|
},
|
|
157
157
|
get children() {
|
|
158
158
|
var e = Q(), r = e.firstChild;
|
|
159
|
-
return
|
|
159
|
+
return l(e, a(k, {
|
|
160
160
|
class: "sr-only"
|
|
161
|
-
}), r),
|
|
162
|
-
var i =
|
|
163
|
-
return i !==
|
|
161
|
+
}), r), l(r, () => t.label), g((o) => {
|
|
162
|
+
var i = s() ? "inset" : "raised", n = s() ? "true" : void 0, b = p(), z = c("cursor-pointer select-none transition-colors duration-[var(--floe-duration-fast)]", "border-r border-[var(--floe-line)] last:border-r-0", re[v()], s() ? "bg-[var(--primary)] text-[var(--primary-foreground)] border-[var(--primary)]" : "bg-transparent text-[var(--floe-ink-soft)] hover:bg-[var(--floe-state-hover)] hover:text-[var(--floe-ink)]", u() && "opacity-50 cursor-not-allowed", t.class);
|
|
163
|
+
return i !== o.e && m(e, "data-floe-surface", o.e = i), n !== o.t && m(e, "data-floe-selected", o.t = n), b !== o.a && m(e, "data-floe-choice-variant", o.a = b), z !== o.o && f(e, o.o = z), o;
|
|
164
164
|
}, {
|
|
165
165
|
e: void 0,
|
|
166
166
|
t: void 0,
|
|
@@ -168,38 +168,38 @@ function oe(y) {
|
|
|
168
168
|
o: void 0
|
|
169
169
|
}), e;
|
|
170
170
|
}
|
|
171
|
-
}),
|
|
171
|
+
}), a(S, {
|
|
172
172
|
get when() {
|
|
173
|
-
return
|
|
173
|
+
return p() === "card";
|
|
174
174
|
},
|
|
175
175
|
get children() {
|
|
176
|
-
var e = W(), r = e.firstChild,
|
|
177
|
-
return
|
|
176
|
+
var e = W(), r = e.firstChild, o = r.firstChild, i = o.nextSibling;
|
|
177
|
+
return l(e, a(k, {}), r), l(o, a(L, {})), l(i, a(x, {
|
|
178
178
|
get when() {
|
|
179
179
|
return t.label;
|
|
180
180
|
},
|
|
181
181
|
get children() {
|
|
182
|
-
var
|
|
183
|
-
return
|
|
182
|
+
var n = $();
|
|
183
|
+
return l(n, () => t.label), g(() => f(n, c("font-medium text-foreground", C[v()].label))), n;
|
|
184
184
|
}
|
|
185
|
-
}), null),
|
|
185
|
+
}), null), l(i, a(x, {
|
|
186
186
|
get when() {
|
|
187
187
|
return t.description;
|
|
188
188
|
},
|
|
189
189
|
get children() {
|
|
190
|
-
var
|
|
191
|
-
return
|
|
190
|
+
var n = $();
|
|
191
|
+
return l(n, () => t.description), g(() => f(n, c("text-[var(--floe-ink-soft)] mt-0.5", C[v()].description))), n;
|
|
192
192
|
}
|
|
193
|
-
}), null),
|
|
193
|
+
}), null), l(e, a(x, {
|
|
194
194
|
get when() {
|
|
195
|
-
return
|
|
195
|
+
return s();
|
|
196
196
|
},
|
|
197
197
|
get children() {
|
|
198
198
|
return T();
|
|
199
199
|
}
|
|
200
|
-
}), null),
|
|
201
|
-
var
|
|
202
|
-
return
|
|
200
|
+
}), null), g((n) => {
|
|
201
|
+
var b = s() ? "inset" : "raised", z = s() ? "true" : void 0, N = p(), P = c("relative cursor-pointer select-none rounded-group border transition-[background-color,border-color,color] duration-[var(--floe-duration-fast)] ease-[var(--floe-ease-out)]", te[v()], s() ? "border-[var(--floe-accent-line)] bg-[var(--floe-state-selected)]" : "border-[var(--floe-line)] bg-transparent hover:border-[var(--floe-line-strong)] hover:bg-[var(--floe-state-hover)]", u() && "opacity-50 cursor-not-allowed", t.class);
|
|
202
|
+
return b !== n.e && m(e, "data-floe-surface", n.e = b), z !== n.t && m(e, "data-floe-selected", n.t = z), N !== n.a && m(e, "data-floe-choice-variant", n.a = N), P !== n.o && f(e, n.o = P), n;
|
|
203
203
|
}, {
|
|
204
204
|
e: void 0,
|
|
205
205
|
t: void 0,
|
|
@@ -207,55 +207,55 @@ function oe(y) {
|
|
|
207
207
|
o: void 0
|
|
208
208
|
}), e;
|
|
209
209
|
}
|
|
210
|
-
}),
|
|
210
|
+
}), a(S, {
|
|
211
211
|
get when() {
|
|
212
|
-
return
|
|
212
|
+
return p() === "tile";
|
|
213
213
|
},
|
|
214
214
|
get children() {
|
|
215
215
|
var e = Y();
|
|
216
|
-
return
|
|
216
|
+
return l(e, a(k, {
|
|
217
217
|
class: "sr-only"
|
|
218
|
-
}), null),
|
|
218
|
+
}), null), l(e, a(x, {
|
|
219
219
|
get when() {
|
|
220
220
|
return t.icon;
|
|
221
221
|
},
|
|
222
222
|
children: (r) => {
|
|
223
|
-
const
|
|
223
|
+
const o = r();
|
|
224
224
|
return (() => {
|
|
225
225
|
var i = Z();
|
|
226
|
-
return
|
|
226
|
+
return l(i, a(o, {
|
|
227
227
|
get class() {
|
|
228
|
-
return
|
|
228
|
+
return q[v()].icon;
|
|
229
229
|
}
|
|
230
|
-
})),
|
|
230
|
+
})), g(() => f(i, c("mb-2 transition-colors duration-[var(--floe-duration-fast)]", s() ? "text-[var(--floe-accent-ink)]" : "text-[var(--floe-ink-quiet)]"))), i;
|
|
231
231
|
})();
|
|
232
232
|
}
|
|
233
|
-
}), null),
|
|
233
|
+
}), null), l(e, a(x, {
|
|
234
234
|
get when() {
|
|
235
235
|
return t.label;
|
|
236
236
|
},
|
|
237
237
|
get children() {
|
|
238
238
|
var r = $();
|
|
239
|
-
return
|
|
239
|
+
return l(r, () => t.label), g(() => f(r, c("font-medium transition-colors duration-[var(--floe-duration-fast)]", C[v()].label, s() ? "text-[var(--floe-ink)]" : "text-[var(--floe-ink-soft)]"))), r;
|
|
240
240
|
}
|
|
241
|
-
}), null),
|
|
241
|
+
}), null), l(e, a(x, {
|
|
242
242
|
get when() {
|
|
243
243
|
return t.description;
|
|
244
244
|
},
|
|
245
245
|
get children() {
|
|
246
246
|
var r = $();
|
|
247
|
-
return
|
|
247
|
+
return l(r, () => t.description), g(() => f(r, c("text-[var(--floe-ink-soft)] mt-0.5", C[v()].description))), r;
|
|
248
248
|
}
|
|
249
|
-
}), null),
|
|
249
|
+
}), null), l(e, a(x, {
|
|
250
250
|
get when() {
|
|
251
|
-
return
|
|
251
|
+
return s();
|
|
252
252
|
},
|
|
253
253
|
get children() {
|
|
254
254
|
return X();
|
|
255
255
|
}
|
|
256
|
-
}), null),
|
|
257
|
-
var
|
|
258
|
-
return
|
|
256
|
+
}), null), g((r) => {
|
|
257
|
+
var o = s() ? "inset" : "raised", i = s() ? "true" : void 0, n = p(), b = c("relative flex flex-col items-center justify-center cursor-pointer select-none", "rounded-control border transition-[background-color,border-color,color] duration-[var(--floe-duration-fast)] ease-[var(--floe-ease-out)] text-center", q[v()].container, s() ? "border-[var(--floe-accent-line)] bg-[var(--floe-state-selected)]" : "border-[var(--floe-line)] bg-transparent hover:border-[var(--floe-line-strong)] hover:bg-[var(--floe-state-hover)]", u() && "opacity-50 cursor-not-allowed", t.class);
|
|
258
|
+
return o !== r.e && m(e, "data-floe-surface", r.e = o), i !== r.t && m(e, "data-floe-selected", r.t = i), n !== r.a && m(e, "data-floe-choice-variant", r.a = n), b !== r.o && f(e, r.o = b), r;
|
|
259
259
|
}, {
|
|
260
260
|
e: void 0,
|
|
261
261
|
t: void 0,
|
|
@@ -267,15 +267,15 @@ function oe(y) {
|
|
|
267
267
|
}
|
|
268
268
|
});
|
|
269
269
|
}
|
|
270
|
-
function
|
|
271
|
-
const [
|
|
272
|
-
return
|
|
270
|
+
function se(y) {
|
|
271
|
+
const [d, t] = j(y, ["options"]);
|
|
272
|
+
return a(oe, I(t, {
|
|
273
273
|
get children() {
|
|
274
|
-
return
|
|
274
|
+
return a(A, {
|
|
275
275
|
get each() {
|
|
276
|
-
return
|
|
276
|
+
return d.options;
|
|
277
277
|
},
|
|
278
|
-
children: (w) =>
|
|
278
|
+
children: (w) => a(ne, {
|
|
279
279
|
get value() {
|
|
280
280
|
return w.value;
|
|
281
281
|
},
|
|
@@ -297,7 +297,7 @@ function de(y) {
|
|
|
297
297
|
}));
|
|
298
298
|
}
|
|
299
299
|
export {
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
300
|
+
oe as RadioGroup,
|
|
301
|
+
se as RadioList,
|
|
302
|
+
ne as RadioOption
|
|
303
303
|
};
|
|
@@ -1,58 +1,58 @@
|
|
|
1
|
-
import { spread as
|
|
1
|
+
import { spread as C, mergeProps as w, insert as i, createComponent as g, memo as z, effect as _, setAttribute as m, className as $, template as p, delegateEvents as S } from "solid-js/web";
|
|
2
2
|
import { splitProps as P, For as A } from "solid-js";
|
|
3
|
-
import { cn as
|
|
4
|
-
var D = /* @__PURE__ */ p("<div role=group data-floe-surface=inset data-floe-surface-part=rail>"), E = /* @__PURE__ */ p('<button type=button role=radio data-floe-surface-part=segment><span class="inline-flex items-center gap-1.5">');
|
|
3
|
+
import { cn as b } from "../../utils/cn.js";
|
|
4
|
+
var D = /* @__PURE__ */ p("<div role=group data-floe-surface=inset data-floe-surface-part=rail>"), E = /* @__PURE__ */ p('<button type=button role=radio data-floe-surface-part=segment data-floe-interactive=item><span class="inline-flex items-center gap-1.5">');
|
|
5
5
|
const F = {
|
|
6
6
|
sm: {
|
|
7
7
|
container: "p-0.5 gap-0.5",
|
|
8
|
-
button: "
|
|
8
|
+
button: "h-[var(--floe-control-height-xs)] px-[var(--floe-control-padding-sm)] rounded-sm",
|
|
9
9
|
icon: "w-3 h-3"
|
|
10
10
|
},
|
|
11
11
|
md: {
|
|
12
12
|
container: "p-0.5 gap-0.5",
|
|
13
|
-
button: "
|
|
13
|
+
button: "h-[var(--floe-control-height-sm)] px-[var(--floe-control-padding-md)] rounded-sm",
|
|
14
14
|
icon: "w-3.5 h-3.5"
|
|
15
15
|
},
|
|
16
16
|
lg: {
|
|
17
|
-
container: "p-1 gap-
|
|
18
|
-
button: "
|
|
17
|
+
container: "p-1 gap-0.5",
|
|
18
|
+
button: "h-[var(--floe-control-height-md)] px-[var(--floe-control-padding-lg)] rounded-md",
|
|
19
19
|
icon: "w-4 h-4"
|
|
20
20
|
}
|
|
21
21
|
};
|
|
22
|
-
function B(
|
|
23
|
-
const [
|
|
24
|
-
|
|
22
|
+
function B(h) {
|
|
23
|
+
const [o, x] = P(h, ["value", "onChange", "options", "size", "disabled", "class"]), y = () => o.size ?? "md", a = () => F[y()], k = (n, r) => {
|
|
24
|
+
o.disabled || r || n !== o.value && o.onChange(n);
|
|
25
25
|
};
|
|
26
26
|
return (() => {
|
|
27
27
|
var n = D();
|
|
28
|
-
return
|
|
28
|
+
return C(n, w({
|
|
29
29
|
get class() {
|
|
30
|
-
return
|
|
30
|
+
return b("floe-segmented-control inline-flex items-center border", "rounded-group", "text-[length:var(--floe-type-control)] leading-[var(--floe-line-control)]", a().container, o.disabled && "opacity-50 pointer-events-none", o.class);
|
|
31
31
|
}
|
|
32
|
-
},
|
|
32
|
+
}, x), !1, !0), i(n, g(A, {
|
|
33
33
|
get each() {
|
|
34
|
-
return
|
|
34
|
+
return o.options;
|
|
35
35
|
},
|
|
36
36
|
children: (r) => {
|
|
37
|
-
const l = () =>
|
|
37
|
+
const l = () => o.value === r.value, s = () => o.disabled || r.disabled;
|
|
38
38
|
return (() => {
|
|
39
|
-
var
|
|
40
|
-
return
|
|
41
|
-
var e =
|
|
42
|
-
return () => e() &&
|
|
39
|
+
var t = E(), c = t.firstChild;
|
|
40
|
+
return t.$$click = () => k(r.value, r.disabled), i(c, (() => {
|
|
41
|
+
var e = z(() => !!r.icon);
|
|
42
|
+
return () => e() && g(r.icon, {
|
|
43
43
|
get class() {
|
|
44
|
-
return
|
|
44
|
+
return a().icon;
|
|
45
45
|
}
|
|
46
46
|
});
|
|
47
|
-
})(), null),
|
|
48
|
-
var d = l() ? "raised" : "flat",
|
|
49
|
-
return d !== e.e &&
|
|
47
|
+
})(), null), i(c, () => r.label, null), _((e) => {
|
|
48
|
+
var d = l() ? "raised" : "flat", f = l(), u = s(), v = b("floe-segmented-control__item font-medium cursor-pointer border", "transition-[background-color,border-color,color,box-shadow] duration-[var(--floe-duration-fast)] ease-[var(--floe-ease-out)]", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-[var(--floe-plane)]", a().button, l() ? "text-[var(--primary-foreground)]" : "text-[var(--floe-ink-soft)] hover:text-foreground", s() && "cursor-not-allowed opacity-50");
|
|
49
|
+
return d !== e.e && m(t, "data-floe-surface", e.e = d), f !== e.t && m(t, "aria-checked", e.t = f), u !== e.a && (t.disabled = e.a = u), v !== e.o && $(t, e.o = v), e;
|
|
50
50
|
}, {
|
|
51
51
|
e: void 0,
|
|
52
52
|
t: void 0,
|
|
53
53
|
a: void 0,
|
|
54
54
|
o: void 0
|
|
55
|
-
}),
|
|
55
|
+
}), t;
|
|
56
56
|
})();
|
|
57
57
|
}
|
|
58
58
|
})), n;
|