@floegence/floe-webapp-core 0.50.6 → 0.51.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/dist/components/chat/input/ChatInput.js +8 -8
  2. package/dist/components/ui/Button.js +16 -13
  3. package/dist/components/ui/Card.js +125 -119
  4. package/dist/components/ui/Checkbox.js +178 -132
  5. package/dist/components/ui/CommandPalette.js +10 -10
  6. package/dist/components/ui/Dialog.js +1 -1
  7. package/dist/components/ui/DirectoryInput.js +5 -5
  8. package/dist/components/ui/Dropdown.d.ts +2 -0
  9. package/dist/components/ui/Dropdown.js +119 -114
  10. package/dist/components/ui/FloatingWindow.js +211 -199
  11. package/dist/components/ui/HighlightBlock.js +8 -8
  12. package/dist/components/ui/Input.js +40 -40
  13. package/dist/components/ui/Pagination.js +90 -88
  14. package/dist/components/ui/ProcessingIndicator.js +1 -1
  15. package/dist/components/ui/Progress.js +99 -88
  16. package/dist/components/ui/QuoteBlock.js +9 -9
  17. package/dist/components/ui/Radio.js +151 -127
  18. package/dist/components/ui/SegmentedControl.js +26 -25
  19. package/dist/components/ui/Stepper.js +114 -112
  20. package/dist/components/ui/Switch.js +34 -33
  21. package/dist/components/ui/Tabs.js +153 -150
  22. package/dist/components/ui/Tag.js +24 -21
  23. package/dist/components/ui/Tooltip.js +10 -10
  24. package/dist/components/ui/floatingPresence.js +40 -30
  25. package/dist/components/workbench/WorkbenchHud.js +9 -9
  26. package/dist/components/workbench/WorkbenchLockButton.js +4 -4
  27. package/dist/components/workbench/WorkbenchWidget.js +46 -43
  28. package/dist/context/FloeConfigContext.d.ts +5 -1
  29. package/dist/context/FloeConfigContext.js +10 -9
  30. package/dist/context/ThemeContext.d.ts +3 -1
  31. package/dist/context/ThemeContext.js +78 -71
  32. package/dist/floe.css +1 -0
  33. package/dist/full.js +839 -836
  34. package/dist/index.js +150 -147
  35. package/dist/input-focus.css +0 -1
  36. package/dist/styles/themes/index.d.ts +3 -0
  37. package/dist/styles/themes/index.js +40 -31
  38. package/dist/styles/tokens.d.ts +36 -0
  39. package/dist/styles/tokens.js +12 -5
  40. package/dist/styles.css +1 -1
  41. package/dist/surface.css +467 -0
  42. package/dist/themes.d.ts +1 -1
  43. package/dist/ui.css +9 -0
  44. package/package.json +1 -1
@@ -1,15 +1,15 @@
1
- import { createComponent as t, spread as E, mergeProps as S, insert as l, effect as b, className as g, template as m } from "solid-js/web";
2
- import { splitProps as R, For as q, Switch as B, Match as z, Show as f, createContext as D, createUniqueId as G, useContext as F } from "solid-js";
3
- import { cn as i } from "../../utils/cn.js";
4
- var H = /* @__PURE__ */ m("<div role=radiogroup>"), U = /* @__PURE__ */ m("<input type=radio>"), V = /* @__PURE__ */ m("<div><div>"), y = /* @__PURE__ */ m("<span>"), A = /* @__PURE__ */ m('<div class="flex flex-col">'), J = /* @__PURE__ */ m('<label><div class="relative flex items-center justify-center pt-0.5">'), K = /* @__PURE__ */ m("<label><span class=font-medium>"), Q = /* @__PURE__ */ m('<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>'), T = /* @__PURE__ */ m('<label><div class="flex items-start gap-3"><div class="flex items-center justify-center pt-0.5"><div><div></div></div></div><div class="flex flex-col flex-1 min-w-0">'), W = /* @__PURE__ */ m('<div class="absolute top-1.5 right-1.5"><div class="w-2 h-2 rounded-full bg-primary">'), X = /* @__PURE__ */ m("<label>"), Y = /* @__PURE__ */ m("<div>");
5
- const M = D();
6
- function Z() {
7
- const x = F(M);
8
- if (!x)
1
+ import { createComponent as l, spread as G, mergeProps as I, insert as a, effect as g, className as f, setAttribute as p, template as m } from "solid-js/web";
2
+ import { splitProps as j, createUniqueId as M, For as A, Switch as B, Match as R, Show as x, createContext as D, useContext as F } from "solid-js";
3
+ import { cn as c } from "../../utils/cn.js";
4
+ var H = /* @__PURE__ */ m("<div role=radiogroup>"), U = /* @__PURE__ */ m("<input data-floe-choice-input type=radio>"), V = /* @__PURE__ */ m("<div data-floe-surface=inset data-floe-surface-part=indicator><div data-floe-surface=flat data-floe-surface-part=radio-dot>"), $ = /* @__PURE__ */ m("<span>"), J = /* @__PURE__ */ m('<div class="flex flex-col">'), K = /* @__PURE__ */ m('<label><div class="relative flex items-center justify-center pt-0.5">'), Q = /* @__PURE__ */ m("<label data-floe-surface-part=choice><span class=font-medium>"), T = /* @__PURE__ */ m('<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>'), W = /* @__PURE__ */ m('<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__ */ m('<div class="absolute top-1.5 right-1.5"><div class="w-2 h-2 rounded-full bg-primary">'), Y = /* @__PURE__ */ m("<label data-floe-surface-part=choice>"), Z = /* @__PURE__ */ m("<div>");
5
+ const O = D();
6
+ function ee() {
7
+ const y = F(O);
8
+ if (!y)
9
9
  throw new Error("RadioOption must be used within a RadioGroup");
10
- return x;
10
+ return y;
11
11
  }
12
- const v = {
12
+ const C = {
13
13
  sm: {
14
14
  outer: "w-3.5 h-3.5",
15
15
  inner: "w-1.5 h-1.5",
@@ -28,15 +28,15 @@ const v = {
28
28
  label: "text-sm",
29
29
  description: "text-xs"
30
30
  }
31
- }, ee = {
31
+ }, re = {
32
32
  sm: "px-2.5 py-1 text-xs",
33
33
  md: "px-3 py-1.5 text-xs",
34
34
  lg: "px-4 py-2 text-sm"
35
- }, re = {
35
+ }, te = {
36
36
  sm: "p-2.5",
37
37
  md: "p-3",
38
38
  lg: "p-4"
39
- }, P = {
39
+ }, E = {
40
40
  sm: {
41
41
  container: "p-3 min-w-[80px]",
42
42
  icon: "w-5 h-5"
@@ -50,222 +50,246 @@ const v = {
50
50
  icon: "w-8 h-8"
51
51
  }
52
52
  };
53
- function te(x) {
54
- const [o, e] = R(x, ["value", "onChange", "size", "orientation", "variant", "disabled", "name", "class", "children"]), h = () => o.name ?? G(), _ = () => o.variant ?? "default", d = {
55
- value: () => o.value,
56
- onChange: (a) => o.onChange?.(a),
57
- size: () => o.size ?? "md",
53
+ function ne(y) {
54
+ const [s, t] = j(y, ["value", "onChange", "size", "orientation", "variant", "disabled", "name", "class", "children"]), w = M(), k = () => s.name ?? w, _ = () => s.variant ?? "default", v = {
55
+ value: () => s.value,
56
+ onChange: (u) => s.onChange?.(u),
57
+ size: () => s.size ?? "md",
58
58
  variant: _,
59
- disabled: () => o.disabled ?? !1,
60
- name: h
61
- }, w = () => {
62
- const a = _(), u = o.orientation === "horizontal";
63
- return a === "button" ? i("inline-flex rounded-md border border-border overflow-hidden", u ? "flex-row" : "flex-col") : a === "card" || a === "tile" ? i("grid gap-2", u ? "grid-flow-col auto-cols-fr" : "grid-cols-1") : i("flex", u ? "flex-row flex-wrap gap-4" : "flex-col gap-2");
59
+ disabled: () => s.disabled ?? !1,
60
+ name: k
61
+ }, h = () => {
62
+ const u = _(), d = s.orientation === "horizontal";
63
+ return u === "button" ? c("inline-flex rounded-md border border-border overflow-hidden", d ? "flex-row" : "flex-col") : u === "card" || u === "tile" ? c("grid gap-2", d ? "grid-flow-col auto-cols-fr" : "grid-cols-1") : c("flex", d ? "flex-row flex-wrap gap-4" : "flex-col gap-2");
64
64
  };
65
- return t(M.Provider, {
66
- value: d,
65
+ return l(O.Provider, {
66
+ value: v,
67
67
  get children() {
68
- var a = H();
69
- return E(a, S({
68
+ var u = H();
69
+ return G(u, I({
70
+ get "data-floe-surface"() {
71
+ return _() === "button" ? "inset" : void 0;
72
+ },
73
+ get "data-floe-surface-part"() {
74
+ return _() === "button" ? "rail" : void 0;
75
+ },
70
76
  get class() {
71
- return i(w(), o.class);
77
+ return c(h(), s.class);
72
78
  }
73
- }, e), !1, !0), l(a, () => o.children), a;
79
+ }, t), !1, !0), a(u, () => s.children), u;
74
80
  }
75
81
  });
76
82
  }
77
- function ne(x) {
78
- const o = Z(), [e, h] = R(x, ["value", "label", "description", "icon", "size", "class", "disabled", "id"]), _ = () => e.id ?? G(), d = () => e.size ?? o.size(), w = () => o.variant(), a = () => e.disabled ?? o.disabled(), u = () => o.value() === e.value, N = () => {
79
- a() || o.onChange(e.value);
80
- }, $ = (r) => (() => {
81
- var n = U();
82
- return n.addEventListener("change", N), E(n, S({
83
+ function oe(y) {
84
+ const s = ee(), [t, w] = j(y, ["value", "label", "description", "icon", "size", "class", "disabled", "id"]), k = M(), _ = () => t.id ?? k, v = () => t.size ?? s.size(), h = () => s.variant(), u = () => t.disabled ?? s.disabled(), d = () => s.value() === t.value, q = () => {
85
+ u() || s.onChange(t.value);
86
+ }, S = (e) => (() => {
87
+ var r = U();
88
+ return r.addEventListener("change", q), G(r, I({
83
89
  get id() {
84
90
  return _();
85
91
  },
86
92
  get name() {
87
- return o.name();
93
+ return s.name();
88
94
  },
89
95
  get value() {
90
- return e.value;
96
+ return t.value;
91
97
  },
92
98
  get checked() {
93
- return u();
99
+ return d();
94
100
  },
95
101
  get disabled() {
96
- return a();
102
+ return u();
97
103
  },
98
104
  get class() {
99
- return r.class ?? "sr-only peer";
105
+ return e.class ?? "sr-only peer";
100
106
  }
101
- }, h), !1, !1), n;
102
- })(), O = () => (() => {
103
- var r = V(), n = r.firstChild;
104
- return b((p) => {
105
- var s = i("rounded-full border-2 transition-colors duration-150", "flex items-center justify-center", v[d()].outer, u() ? "border-primary bg-primary" : "border-input bg-background hover:border-primary/50", a() && "cursor-not-allowed", "peer-focus-visible:ring-2 peer-focus-visible:ring-ring peer-focus-visible:ring-offset-2"), C = i("rounded-full bg-primary-foreground transition-transform duration-150", v[d()].inner, u() ? "scale-100" : "scale-0");
106
- return s !== p.e && g(r, p.e = s), C !== p.t && g(n, p.t = C), p;
107
+ }, w), !1, !1), r;
108
+ })(), L = () => (() => {
109
+ var e = V(), r = e.firstChild;
110
+ return g((n) => {
111
+ var i = d() ? "true" : void 0, o = c("rounded-full border-2 transition-colors duration-150", "flex items-center justify-center", C[v()].outer, d() ? "border-primary bg-primary" : c("border-input bg-background", h() === "default" && "hover:border-primary/50"), 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-150", C[v()].inner, d() ? "scale-100" : "scale-0");
112
+ return i !== n.e && p(e, "data-floe-selected", n.e = i), o !== n.t && f(e, n.t = o), b !== n.a && f(r, n.a = b), n;
107
113
  }, {
108
114
  e: void 0,
109
- t: void 0
110
- }), r;
115
+ t: void 0,
116
+ a: void 0
117
+ }), e;
111
118
  })();
112
- return t(B, {
119
+ return l(B, {
113
120
  get children() {
114
- return [t(z, {
121
+ return [l(R, {
115
122
  get when() {
116
- return w() === "default";
123
+ return h() === "default";
117
124
  },
118
125
  get children() {
119
- var r = J(), n = r.firstChild;
120
- return l(n, t($, {}), null), l(n, t(O, {}), null), l(r, t(f, {
126
+ var e = K(), r = e.firstChild;
127
+ return a(r, l(S, {}), null), a(r, l(L, {}), null), a(e, l(x, {
121
128
  get when() {
122
- return e.label || e.description;
129
+ return t.label || t.description;
123
130
  },
124
131
  get children() {
125
- var p = A();
126
- return l(p, t(f, {
132
+ var n = J();
133
+ return a(n, l(x, {
127
134
  get when() {
128
- return e.label;
135
+ return t.label;
129
136
  },
130
137
  get children() {
131
- var s = y();
132
- return l(s, () => e.label), b(() => g(s, i("text-foreground", v[d()].label))), s;
138
+ var i = $();
139
+ return a(i, () => t.label), g(() => f(i, c("text-foreground", C[v()].label))), i;
133
140
  }
134
- }), null), l(p, t(f, {
141
+ }), null), a(n, l(x, {
135
142
  get when() {
136
- return e.description;
143
+ return t.description;
137
144
  },
138
145
  get children() {
139
- var s = y();
140
- return l(s, () => e.description), b(() => g(s, i("text-muted-foreground", v[d()].description))), s;
146
+ var i = $();
147
+ return a(i, () => t.description), g(() => f(i, c("text-muted-foreground", C[v()].description))), i;
141
148
  }
142
- }), null), p;
149
+ }), null), n;
143
150
  }
144
- }), null), b(() => g(r, i("inline-flex items-start gap-2 cursor-pointer select-none", a() && "opacity-50 cursor-not-allowed", e.class))), r;
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;
145
152
  }
146
- }), t(z, {
153
+ }), l(R, {
147
154
  get when() {
148
- return w() === "button";
155
+ return h() === "button";
149
156
  },
150
157
  get children() {
151
- var r = K(), n = r.firstChild;
152
- return l(r, t($, {
158
+ var e = Q(), r = e.firstChild;
159
+ return a(e, l(S, {
153
160
  class: "sr-only"
154
- }), n), l(n, () => e.label), b(() => g(r, i("cursor-pointer select-none transition-colors duration-150", "border-r border-border last:border-r-0", ee[d()], u() ? "bg-primary text-primary-foreground" : "bg-background text-foreground hover:bg-muted", a() && "opacity-50 cursor-not-allowed", e.class))), r;
161
+ }), r), a(r, () => t.label), g((n) => {
162
+ var i = d() ? "inset" : "raised", o = d() ? "true" : void 0, b = h(), z = c("cursor-pointer select-none transition-colors duration-150", "border-r border-border last:border-r-0", re[v()], d() ? "bg-primary text-primary-foreground" : "bg-background text-foreground hover:bg-muted", u() && "opacity-50 cursor-not-allowed", t.class);
163
+ return i !== n.e && p(e, "data-floe-surface", n.e = i), o !== n.t && p(e, "data-floe-selected", n.t = o), b !== n.a && p(e, "data-floe-choice-variant", n.a = b), z !== n.o && f(e, n.o = z), n;
164
+ }, {
165
+ e: void 0,
166
+ t: void 0,
167
+ a: void 0,
168
+ o: void 0
169
+ }), e;
155
170
  }
156
- }), t(z, {
171
+ }), l(R, {
157
172
  get when() {
158
- return w() === "card";
173
+ return h() === "card";
159
174
  },
160
175
  get children() {
161
- var r = T(), n = r.firstChild, p = n.firstChild, s = p.firstChild, C = s.firstChild, k = p.nextSibling;
162
- return l(r, t($, {}), n), l(k, t(f, {
176
+ var e = W(), r = e.firstChild, n = r.firstChild, i = n.nextSibling;
177
+ return a(e, l(S, {}), r), a(n, l(L, {})), a(i, l(x, {
163
178
  get when() {
164
- return e.label;
179
+ return t.label;
165
180
  },
166
181
  get children() {
167
- var c = y();
168
- return l(c, () => e.label), b(() => g(c, i("font-medium text-foreground", v[d()].label))), c;
182
+ var o = $();
183
+ return a(o, () => t.label), g(() => f(o, c("font-medium text-foreground", C[v()].label))), o;
169
184
  }
170
- }), null), l(k, t(f, {
185
+ }), null), a(i, l(x, {
171
186
  get when() {
172
- return e.description;
187
+ return t.description;
173
188
  },
174
189
  get children() {
175
- var c = y();
176
- return l(c, () => e.description), b(() => g(c, i("text-muted-foreground mt-0.5", v[d()].description))), c;
190
+ var o = $();
191
+ return a(o, () => t.description), g(() => f(o, c("text-muted-foreground mt-0.5", C[v()].description))), o;
177
192
  }
178
- }), null), l(r, t(f, {
193
+ }), null), a(e, l(x, {
179
194
  get when() {
180
- return u();
195
+ return d();
181
196
  },
182
197
  get children() {
183
- return Q();
198
+ return T();
184
199
  }
185
- }), null), b((c) => {
186
- var j = i("relative cursor-pointer select-none rounded-lg border-2 transition-all duration-150", re[d()], u() ? "border-primary bg-primary/5" : "border-border bg-background hover:border-primary/50 hover:bg-muted/50", a() && "opacity-50 cursor-not-allowed", e.class), I = i("rounded-full border-2 transition-colors duration-150", "flex items-center justify-center", v[d()].outer, u() ? "border-primary bg-primary" : "border-input bg-background", "peer-focus-visible:ring-2 peer-focus-visible:ring-ring peer-focus-visible:ring-offset-2"), L = i("rounded-full bg-primary-foreground transition-transform duration-150", v[d()].inner, u() ? "scale-100" : "scale-0");
187
- return j !== c.e && g(r, c.e = j), I !== c.t && g(s, c.t = I), L !== c.a && g(C, c.a = L), c;
200
+ }), null), g((o) => {
201
+ var b = d() ? "inset" : "raised", z = d() ? "true" : void 0, N = h(), P = c("relative cursor-pointer select-none rounded-lg border-2 transition-all duration-150", te[v()], d() ? "border-primary bg-primary/5" : "border-border bg-background hover:border-primary/50 hover:bg-muted/50", u() && "opacity-50 cursor-not-allowed", t.class);
202
+ return b !== o.e && p(e, "data-floe-surface", o.e = b), z !== o.t && p(e, "data-floe-selected", o.t = z), N !== o.a && p(e, "data-floe-choice-variant", o.a = N), P !== o.o && f(e, o.o = P), o;
188
203
  }, {
189
204
  e: void 0,
190
205
  t: void 0,
191
- a: void 0
192
- }), r;
206
+ a: void 0,
207
+ o: void 0
208
+ }), e;
193
209
  }
194
- }), t(z, {
210
+ }), l(R, {
195
211
  get when() {
196
- return w() === "tile";
212
+ return h() === "tile";
197
213
  },
198
214
  get children() {
199
- var r = X();
200
- return l(r, t($, {
215
+ var e = Y();
216
+ return a(e, l(S, {
201
217
  class: "sr-only"
202
- }), null), l(r, t(f, {
218
+ }), null), a(e, l(x, {
203
219
  get when() {
204
- return e.icon;
220
+ return t.icon;
205
221
  },
206
- children: (n) => {
207
- const p = n();
222
+ children: (r) => {
223
+ const n = r();
208
224
  return (() => {
209
- var s = Y();
210
- return l(s, t(p, {
225
+ var i = Z();
226
+ return a(i, l(n, {
211
227
  get class() {
212
- return P[d()].icon;
228
+ return E[v()].icon;
213
229
  }
214
- })), b(() => g(s, i("mb-2 transition-colors duration-150", u() ? "text-primary" : "text-muted-foreground"))), s;
230
+ })), g(() => f(i, c("mb-2 transition-colors duration-150", d() ? "text-primary" : "text-muted-foreground"))), i;
215
231
  })();
216
232
  }
217
- }), null), l(r, t(f, {
233
+ }), null), a(e, l(x, {
218
234
  get when() {
219
- return e.label;
235
+ return t.label;
220
236
  },
221
237
  get children() {
222
- var n = y();
223
- return l(n, () => e.label), b(() => g(n, i("font-medium transition-colors duration-150", v[d()].label, u() ? "text-primary" : "text-foreground"))), n;
238
+ var r = $();
239
+ return a(r, () => t.label), g(() => f(r, c("font-medium transition-colors duration-150", C[v()].label, d() ? "text-primary" : "text-foreground"))), r;
224
240
  }
225
- }), null), l(r, t(f, {
241
+ }), null), a(e, l(x, {
226
242
  get when() {
227
- return e.description;
243
+ return t.description;
228
244
  },
229
245
  get children() {
230
- var n = y();
231
- return l(n, () => e.description), b(() => g(n, i("text-muted-foreground mt-0.5", v[d()].description))), n;
246
+ var r = $();
247
+ return a(r, () => t.description), g(() => f(r, c("text-muted-foreground mt-0.5", C[v()].description))), r;
232
248
  }
233
- }), null), l(r, t(f, {
249
+ }), null), a(e, l(x, {
234
250
  get when() {
235
- return u();
251
+ return d();
236
252
  },
237
253
  get children() {
238
- return W();
254
+ return X();
239
255
  }
240
- }), null), b(() => g(r, i("relative flex flex-col items-center justify-center cursor-pointer select-none", "rounded-lg border-2 transition-all duration-150 text-center", P[d()].container, u() ? "border-primary bg-primary/5" : "border-border bg-background hover:border-primary/50 hover:bg-muted/50", a() && "opacity-50 cursor-not-allowed", e.class))), r;
256
+ }), null), g((r) => {
257
+ var n = d() ? "inset" : "raised", i = d() ? "true" : void 0, o = h(), b = c("relative flex flex-col items-center justify-center cursor-pointer select-none", "rounded-lg border-2 transition-all duration-150 text-center", E[v()].container, d() ? "border-primary bg-primary/5" : "border-border bg-background hover:border-primary/50 hover:bg-muted/50", u() && "opacity-50 cursor-not-allowed", t.class);
258
+ return n !== r.e && p(e, "data-floe-surface", r.e = n), i !== r.t && p(e, "data-floe-selected", r.t = i), o !== r.a && p(e, "data-floe-choice-variant", r.a = o), b !== r.o && f(e, r.o = b), r;
259
+ }, {
260
+ e: void 0,
261
+ t: void 0,
262
+ a: void 0,
263
+ o: void 0
264
+ }), e;
241
265
  }
242
266
  })];
243
267
  }
244
268
  });
245
269
  }
246
- function ae(x) {
247
- const [o, e] = R(x, ["options"]);
248
- return t(te, S(e, {
270
+ function de(y) {
271
+ const [s, t] = j(y, ["options"]);
272
+ return l(ne, I(t, {
249
273
  get children() {
250
- return t(q, {
274
+ return l(A, {
251
275
  get each() {
252
- return o.options;
276
+ return s.options;
253
277
  },
254
- children: (h) => t(ne, {
278
+ children: (w) => l(oe, {
255
279
  get value() {
256
- return h.value;
280
+ return w.value;
257
281
  },
258
282
  get label() {
259
- return h.label;
283
+ return w.label;
260
284
  },
261
285
  get description() {
262
- return h.description;
286
+ return w.description;
263
287
  },
264
288
  get icon() {
265
- return h.icon;
289
+ return w.icon;
266
290
  },
267
291
  get disabled() {
268
- return h.disabled;
292
+ return w.disabled;
269
293
  }
270
294
  })
271
295
  });
@@ -273,7 +297,7 @@ function ae(x) {
273
297
  }));
274
298
  }
275
299
  export {
276
- te as RadioGroup,
277
- ae as RadioList,
278
- ne as RadioOption
300
+ ne as RadioGroup,
301
+ de as RadioList,
302
+ oe as RadioOption
279
303
  };
@@ -1,8 +1,8 @@
1
- import { spread as y, mergeProps as _, insert as i, createComponent as b, memo as C, effect as k, setAttribute as w, className as $, template as g, delegateEvents as z } from "solid-js/web";
2
- import { splitProps as S, For as P } from "solid-js";
3
- import { cn as v } from "../../utils/cn.js";
4
- var A = /* @__PURE__ */ g("<div role=group>"), D = /* @__PURE__ */ g('<button type=button role=radio><span class="inline-flex items-center gap-1.5">');
5
- const E = {
1
+ import { spread as _, mergeProps as k, insert as l, createComponent as v, memo as w, effect as z, setAttribute as b, className as $, template as p, delegateEvents as S } from "solid-js/web";
2
+ import { splitProps as P, For as A } from "solid-js";
3
+ import { cn as g } 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><span class="inline-flex items-center gap-1.5">');
5
+ const F = {
6
6
  sm: {
7
7
  container: "p-0.5 gap-0.5",
8
8
  button: "px-2 py-1 text-[11px]",
@@ -19,45 +19,46 @@ const E = {
19
19
  icon: "w-4 h-4"
20
20
  }
21
21
  };
22
- function q(f) {
23
- const [e, p] = S(f, ["value", "onChange", "options", "size", "disabled", "class"]), x = () => e.size ?? "md", s = () => E[x()], h = (n, t) => {
24
- e.disabled || t || n !== e.value && e.onChange(n);
22
+ function B(x) {
23
+ const [t, h] = P(x, ["value", "onChange", "options", "size", "disabled", "class"]), y = () => t.size ?? "md", s = () => F[y()], C = (n, r) => {
24
+ t.disabled || r || n !== t.value && t.onChange(n);
25
25
  };
26
26
  return (() => {
27
- var n = A();
28
- return y(n, _({
27
+ var n = D();
28
+ return _(n, k({
29
29
  get class() {
30
- return v("floe-segmented-control inline-flex items-center rounded-lg border", s().container, e.disabled && "opacity-50 pointer-events-none", e.class);
30
+ return g("floe-segmented-control inline-flex items-center rounded-lg border", s().container, t.disabled && "opacity-50 pointer-events-none", t.class);
31
31
  }
32
- }, p), !1, !0), i(n, b(P, {
32
+ }, h), !1, !0), l(n, v(A, {
33
33
  get each() {
34
- return e.options;
34
+ return t.options;
35
35
  },
36
- children: (t) => {
37
- const l = () => e.value === t.value, a = () => e.disabled || t.disabled;
36
+ children: (r) => {
37
+ const a = () => t.value === r.value, i = () => t.disabled || r.disabled;
38
38
  return (() => {
39
- var o = D(), c = o.firstChild;
40
- return o.$$click = () => h(t.value, t.disabled), i(c, (() => {
41
- var r = C(() => !!t.icon);
42
- return () => r() && b(t.icon, {
39
+ var o = E(), c = o.firstChild;
40
+ return o.$$click = () => C(r.value, r.disabled), l(c, (() => {
41
+ var e = w(() => !!r.icon);
42
+ return () => e() && v(r.icon, {
43
43
  get class() {
44
44
  return s().icon;
45
45
  }
46
46
  });
47
- })(), null), i(c, () => t.label, null), k((r) => {
48
- var d = l(), u = a(), m = v("floe-segmented-control__item font-medium rounded-md transition-[background-color,border-color,color,box-shadow] duration-150 cursor-pointer", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1", s().button, "border", l() && "floe-segmented-control__item--active", a() && "cursor-not-allowed opacity-50");
49
- return d !== r.e && w(o, "aria-checked", r.e = d), u !== r.t && (o.disabled = r.t = u), m !== r.a && $(o, r.a = m), r;
47
+ })(), null), l(c, () => r.label, null), z((e) => {
48
+ var d = a() ? "raised" : "flat", u = a(), f = i(), m = g("floe-segmented-control__item font-medium rounded-md transition-[background-color,border-color,color,box-shadow] duration-150 cursor-pointer", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1", s().button, "border", a() && "floe-segmented-control__item--active", i() && "cursor-not-allowed opacity-50");
49
+ return d !== e.e && b(o, "data-floe-surface", e.e = d), u !== e.t && b(o, "aria-checked", e.t = u), f !== e.a && (o.disabled = e.a = f), m !== e.o && $(o, e.o = m), e;
50
50
  }, {
51
51
  e: void 0,
52
52
  t: void 0,
53
- a: void 0
53
+ a: void 0,
54
+ o: void 0
54
55
  }), o;
55
56
  })();
56
57
  }
57
58
  })), n;
58
59
  })();
59
60
  }
60
- z(["click"]);
61
+ S(["click"]);
61
62
  export {
62
- q as SegmentedControl
63
+ B as SegmentedControl
63
64
  };