@floegence/floe-webapp-core 0.90.4 → 0.90.7
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/ui/Checkbox.js +17 -17
- package/dist/components/ui/Select.js +224 -205
- package/dist/language.css +4 -3
- package/dist/styles/themes/presets.js +5 -1
- package/dist/styles.css +1 -1
- package/dist/surface.css +50 -2
- package/dist/themes/shell-presets.generated.css +9 -7
- package/package.json +1 -1
|
@@ -2,7 +2,7 @@ import { createComponent as n, insert as a, effect as f, className as g, setAttr
|
|
|
2
2
|
import { splitProps as P, createUniqueId as U, Switch as V, Match as j, Show as b, For as J, useContext as K, createEffect as Q, createContext as R } from "solid-js";
|
|
3
3
|
import { useFormControl as T } from "./formFieldContext.js";
|
|
4
4
|
import { cn as d } from "../../utils/cn.js";
|
|
5
|
-
var W = /* @__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">'), X = /* @__PURE__ */ v('<svg viewBox="0 0 12 12"fill=none stroke=currentColor stroke-width=2 stroke-linecap=round><path d="M2 6h8">'), Y = /* @__PURE__ */ v("<div role=group>"), Z = /* @__PURE__ */ v("<div data-floe-surface=inset data-floe-surface-part=indicator>"), ee = /* @__PURE__ */ v("<input>"), $ = /* @__PURE__ */ v("<span>"), re = /* @__PURE__ */ v('<div class="flex flex-col">'), te = /* @__PURE__ */ v('<label><div class="relative flex items-center justify-center pt-0.5">'), ne = /* @__PURE__ */ v("<label data-floe-surface-part=choice><span class=font-medium>"), oe = /* @__PURE__ */ v('<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>'), le = /* @__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">'), ae = /* @__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">'), ie = /* @__PURE__ */ v("<label data-floe-surface-part=choice>"), se = /* @__PURE__ */ v("<div>");
|
|
5
|
+
var W = /* @__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">'), X = /* @__PURE__ */ v('<svg viewBox="0 0 12 12"fill=none stroke=currentColor stroke-width=2 stroke-linecap=round><path d="M2 6h8">'), Y = /* @__PURE__ */ v("<div role=group>"), Z = /* @__PURE__ */ v("<div data-floe-surface=inset data-floe-surface-part=indicator data-floe-choice-kind=checkbox aria-hidden=true>"), ee = /* @__PURE__ */ v("<input>"), $ = /* @__PURE__ */ v("<span>"), re = /* @__PURE__ */ v('<div class="flex flex-col">'), te = /* @__PURE__ */ v('<label data-floe-checkbox-target><div class="relative flex items-center justify-center pt-0.5">'), ne = /* @__PURE__ */ v("<label data-floe-surface-part=choice><span class=font-medium>"), oe = /* @__PURE__ */ v('<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>'), le = /* @__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">'), ae = /* @__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">'), ie = /* @__PURE__ */ v("<label data-floe-surface-part=choice>"), se = /* @__PURE__ */ v("<div>");
|
|
6
6
|
const E = R();
|
|
7
7
|
function ce() {
|
|
8
8
|
return K(E);
|
|
@@ -48,20 +48,20 @@ const C = {
|
|
|
48
48
|
icon: "w-8 h-8"
|
|
49
49
|
}
|
|
50
50
|
};
|
|
51
|
-
function O(
|
|
51
|
+
function O(p) {
|
|
52
52
|
return (() => {
|
|
53
53
|
var s = W();
|
|
54
|
-
return f(() => m(s, "class",
|
|
54
|
+
return f(() => m(s, "class", p.class)), s;
|
|
55
55
|
})();
|
|
56
56
|
}
|
|
57
|
-
function fe(
|
|
57
|
+
function fe(p) {
|
|
58
58
|
return (() => {
|
|
59
59
|
var s = X();
|
|
60
|
-
return f(() => m(s, "class",
|
|
60
|
+
return f(() => m(s, "class", p.class)), s;
|
|
61
61
|
})();
|
|
62
62
|
}
|
|
63
|
-
function ve(
|
|
64
|
-
const [s,
|
|
63
|
+
function ve(p) {
|
|
64
|
+
const [s, x] = P(p, ["value", "onChange", "size", "orientation", "variant", "disabled", "class", "children"]), e = () => s.variant ?? "default", M = {
|
|
65
65
|
value: () => s.value ?? [],
|
|
66
66
|
onChange: (h, y) => {
|
|
67
67
|
const u = s.value ?? [], w = y ? [...u, h] : u.filter((k) => k !== h);
|
|
@@ -88,13 +88,13 @@ function ve(x) {
|
|
|
88
88
|
get class() {
|
|
89
89
|
return d(S(), s.class);
|
|
90
90
|
}
|
|
91
|
-
},
|
|
91
|
+
}, x), !1, !0), a(h, () => s.children), h;
|
|
92
92
|
}
|
|
93
93
|
});
|
|
94
94
|
}
|
|
95
|
-
function he(
|
|
96
|
-
const s = T(),
|
|
97
|
-
k() || (y() && e.value ?
|
|
95
|
+
function he(p) {
|
|
96
|
+
const s = T(), x = ce(), [e, M] = P(p, ["value", "checked", "onChange", "label", "description", "icon", "size", "variant", "indeterminate", "ref", "class", "disabled", "id"]), S = U(), h = () => e.id ?? (x ? S : s.id) ?? S, y = () => x !== void 0, u = () => e.size ?? x?.size() ?? "md", w = () => e.variant ?? x?.variant() ?? "default", k = () => e.disabled ?? (x?.disabled() || s.disabled || !1), c = () => y() && e.value ? x.value().includes(e.value) : e.checked ?? !1, H = () => {
|
|
97
|
+
k() || (y() && e.value ? x.onChange(e.value, !c()) : e.onChange?.(!c()));
|
|
98
98
|
}, q = () => (() => {
|
|
99
99
|
var t = Z();
|
|
100
100
|
return a(t, n(b, {
|
|
@@ -120,7 +120,7 @@ function he(x) {
|
|
|
120
120
|
});
|
|
121
121
|
}
|
|
122
122
|
}), null), f((r) => {
|
|
123
|
-
var o = c() || e.indeterminate ? "true" : void 0, l = d("rounded-xs border
|
|
123
|
+
var o = c() || e.indeterminate ? "true" : void 0, l = d("rounded-xs border transition-[background-color,border-color,color,transform] duration-[var(--floe-duration-fast)] ease-[var(--floe-ease-out)]", "flex items-center justify-center", C[u()].box, c() || e.indeterminate ? "border-primary bg-primary text-primary-foreground" : "border-[var(--floe-control-edge)] bg-transparent hover:border-[var(--floe-control-edge-hover)]", k() && "cursor-not-allowed");
|
|
124
124
|
return o !== r.e && m(t, "data-floe-selected", r.e = o), l !== r.t && g(t, r.t = l), r;
|
|
125
125
|
}, {
|
|
126
126
|
e: void 0,
|
|
@@ -153,7 +153,7 @@ function he(x) {
|
|
|
153
153
|
return k();
|
|
154
154
|
},
|
|
155
155
|
onClick: (l) => {
|
|
156
|
-
(
|
|
156
|
+
(p.readOnly ?? s.readOnly) && l.preventDefault();
|
|
157
157
|
},
|
|
158
158
|
onChange: H,
|
|
159
159
|
get class() {
|
|
@@ -318,9 +318,9 @@ function he(x) {
|
|
|
318
318
|
}
|
|
319
319
|
});
|
|
320
320
|
}
|
|
321
|
-
function
|
|
322
|
-
const [s,
|
|
323
|
-
return n(ve, B(
|
|
321
|
+
function pe(p) {
|
|
322
|
+
const [s, x] = P(p, ["options"]);
|
|
323
|
+
return n(ve, B(x, {
|
|
324
324
|
get children() {
|
|
325
325
|
return n(J, {
|
|
326
326
|
get each() {
|
|
@@ -350,5 +350,5 @@ function xe(x) {
|
|
|
350
350
|
export {
|
|
351
351
|
he as Checkbox,
|
|
352
352
|
ve as CheckboxGroup,
|
|
353
|
-
|
|
353
|
+
pe as CheckboxList
|
|
354
354
|
};
|