@floegence/floe-webapp-core 0.90.4 → 0.90.6

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.
@@ -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(x) {
51
+ function O(p) {
52
52
  return (() => {
53
53
  var s = W();
54
- return f(() => m(s, "class", x.class)), s;
54
+ return f(() => m(s, "class", p.class)), s;
55
55
  })();
56
56
  }
57
- function fe(x) {
57
+ function fe(p) {
58
58
  return (() => {
59
59
  var s = X();
60
- return f(() => m(s, "class", x.class)), s;
60
+ return f(() => m(s, "class", p.class)), s;
61
61
  })();
62
62
  }
63
- function ve(x) {
64
- const [s, p] = P(x, ["value", "onChange", "size", "orientation", "variant", "disabled", "class", "children"]), e = () => s.variant ?? "default", M = {
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
- }, p), !1, !0), a(h, () => s.children), h;
91
+ }, x), !1, !0), a(h, () => s.children), h;
92
92
  }
93
93
  });
94
94
  }
95
- function he(x) {
96
- const s = T(), p = ce(), [e, M] = P(x, ["value", "checked", "onChange", "label", "description", "icon", "size", "variant", "indeterminate", "ref", "class", "disabled", "id"]), S = U(), h = () => e.id ?? (p ? S : s.id) ?? S, y = () => p !== void 0, u = () => e.size ?? p?.size() ?? "md", w = () => e.variant ?? p?.variant() ?? "default", k = () => e.disabled ?? (p?.disabled() || s.disabled || !1), c = () => y() && e.value ? p.value().includes(e.value) : e.checked ?? !1, H = () => {
97
- k() || (y() && e.value ? p.onChange(e.value, !c()) : e.onChange?.(!c()));
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-2 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");
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
- (x.readOnly ?? s.readOnly) && l.preventDefault();
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 xe(x) {
322
- const [s, p] = P(x, ["options"]);
323
- return n(ve, B(p, {
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
- xe as CheckboxList
353
+ pe as CheckboxList
354
354
  };
package/dist/language.css CHANGED
@@ -77,9 +77,10 @@
77
77
  --floe-field-edge-hover: color-mix(in srgb, var(--foreground) 32%, var(--card));
78
78
  --floe-field-placeholder: color-mix(in srgb, var(--foreground) 42%, var(--background));
79
79
  /* An unchecked box or switch has no fill of its own, so its boundary *is*
80
- * the control and must clear 3:1 against every plane it can sit on. */
81
- --floe-control-edge: color-mix(in srgb, var(--foreground) 50%, var(--card));
82
- --floe-control-edge-hover: color-mix(in srgb, var(--foreground) 66%, var(--card));
80
+ * the control and must clear 3:1 against every plane it can sit on. The 66%
81
+ * default covers the built-in planes; low-ink palettes own stronger overrides. */
82
+ --floe-control-edge: color-mix(in srgb, var(--foreground) 66%, var(--card));
83
+ --floe-control-edge-hover: color-mix(in srgb, var(--foreground) 80%, var(--card));
83
84
 
84
85
  /* ---------------------------------------------------------------------
85
86
  * State — the only hover/press/selection values in the system. They are
@@ -643,6 +643,10 @@ const C = {
643
643
  }),
644
644
  o({
645
645
  name: "solarized-light",
646
+ semanticTokens: {
647
+ "--floe-control-edge": "color-mix(in srgb, #586E75 85%, #FFFDF4)",
648
+ "--floe-control-edge-hover": "#586E75"
649
+ },
646
650
  inlineCode: { foreground: "#135BA7", background: "#F2EFE0" },
647
651
  displayName: "Solarized Light",
648
652
  description: "Solarized warmth with measured cyan, green, and amber syntax.",
@@ -964,7 +968,7 @@ const C = {
964
968
  card: "#30312B",
965
969
  muted: "#3A3B34",
966
970
  mutedForeground: "#C5C8B5",
967
- primary: "#F92672",
971
+ primary: "#FA2874",
968
972
  // Preserve the pink action fill while keeping its darker hover state readable.
969
973
  primaryForeground: "#050604",
970
974
  border: "#494A42",