@floegence/floe-webapp-core 0.78.0 → 0.78.2

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.
@@ -1,21 +1,21 @@
1
- import { createComponent as b, use as E, setAttribute as a, insert as f, effect as S, memo as N, className as P, template as g, delegateEvents as T } from "solid-js/web";
2
- import { createUniqueId as j, createEffect as M, onCleanup as q, createMemo as A, Show as _, untrack as I } from "solid-js";
3
- import { useOverlayMask as K } from "../../hooks/useOverlayMask.js";
4
- import { createFloatingPresence as O } from "../ui/floatingPresence.js";
5
- import { cn as F } from "../../utils/cn.js";
6
- import { deferAfterPaint as z } from "../../utils/defer.js";
7
- import { X as L } from "../icons/index.js";
8
- var R = /* @__PURE__ */ g('<header class="flex shrink-0 items-center gap-2 border-b px-4 py-2"><h2 class="min-w-0 flex-1 text-base font-semibold"></h2><button type=button data-floe-autofocus class="flex h-11 w-11 shrink-0 items-center justify-center rounded-md hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring">'), U = /* @__PURE__ */ g('<div data-floe-mobile-navigation-overlay class="absolute inset-0 z-50 overflow-hidden p-2"><div class="absolute inset-0 floe-floating-presence floe-floating-backdrop floe-bottom-drawer-backdrop"data-floe-mobile-navigation-backdrop></div><div class="relative pointer-events-none flex h-full min-h-0 items-end justify-center"><div role=dialog tabindex=-1 data-floe-mobile-navigation-panel data-floe-surface=floating data-floe-surface-portal-layer=true style="max-height:min(680px, 86%);border-radius:24px"><div>'), W = /* @__PURE__ */ g("<h2 class=sr-only>");
9
- function Z(t) {
10
- const u = `mobile-navigation-${j()}`, r = O({
1
+ import { createComponent as g, use as T, setAttribute as a, insert as f, effect as S, memo as j, className as M, template as h, delegateEvents as q } from "solid-js/web";
2
+ import { createUniqueId as A, createEffect as _, onCleanup as E, createMemo as F, Show as B, untrack as K } from "solid-js";
3
+ import { useOverlayMask as O } from "../../hooks/useOverlayMask.js";
4
+ import { createFloatingPresence as z } from "../ui/floatingPresence.js";
5
+ import { cn as D } from "../../utils/cn.js";
6
+ import { deferAfterPaint as L } from "../../utils/defer.js";
7
+ import { X as R } from "../icons/index.js";
8
+ var U = /* @__PURE__ */ h('<header class="flex shrink-0 items-center gap-2 border-b px-4 py-2"><h2 class="min-w-0 flex-1 text-base font-semibold"></h2><button type=button data-floe-autofocus class="flex h-11 w-11 shrink-0 items-center justify-center rounded-md hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring">'), W = /* @__PURE__ */ h('<div data-floe-mobile-navigation-overlay class="absolute inset-0 z-50 overflow-hidden p-2"><div class="absolute inset-0 floe-floating-presence floe-floating-backdrop floe-bottom-drawer-backdrop"data-floe-mobile-navigation-backdrop></div><div class="relative pointer-events-none flex h-full min-h-0 items-end justify-center"><div role=dialog tabindex=-1 data-floe-mobile-navigation-panel data-floe-surface=floating data-floe-surface-portal-layer=true style="max-height:min(680px, 86%);border-radius:24px"><div>'), X = /* @__PURE__ */ h("<h2 class=sr-only>");
9
+ function p(t) {
10
+ const v = `mobile-navigation-${A()}`, r = z({
11
11
  open: () => t.open,
12
12
  exitDurationMs: 180
13
13
  });
14
14
  let i, d = null;
15
- const v = () => {
15
+ const m = () => {
16
16
  d = t.trigger ?? null, t.onOpenChange(!1);
17
17
  };
18
- M(() => {
18
+ _(() => {
19
19
  const n = r.mounted();
20
20
  if (t.onPresenceChange?.(n), !n && d) {
21
21
  const l = d;
@@ -23,21 +23,28 @@ function Z(t) {
23
23
  preventScroll: !0
24
24
  });
25
25
  }
26
- }), q(() => t.onPresenceChange?.(!1)), M(() => {
27
- const n = t.id;
28
- t.open && (d = null, z(() => I(() => {
29
- if (!t.open || t.id !== n || !i?.isConnected) return;
30
- const l = i.ownerDocument.activeElement;
31
- l && i.contains(l) || (i.querySelector("[data-floe-autofocus]") ?? i).focus({
26
+ }), E(() => t.onPresenceChange?.(!1));
27
+ const I = F(() => t.open ? t.id : null);
28
+ _(() => {
29
+ const n = I();
30
+ if (n === null) return;
31
+ d = null;
32
+ let l = !0;
33
+ E(() => {
34
+ l = !1;
35
+ }), L(() => K(() => {
36
+ if (!l || !t.open || t.id !== n || !i?.isConnected) return;
37
+ const u = i.ownerDocument.activeElement;
38
+ u && i.contains(u) || (i.querySelector("[data-floe-autofocus]") ?? i).focus({
32
39
  preventScroll: !0
33
40
  });
34
- })));
35
- }), K({
41
+ }));
42
+ }), O({
36
43
  open: r.mounted,
37
44
  root: () => i,
38
45
  focusRoots: () => [i, t.navigation()].filter((n) => !!n),
39
46
  containsTarget: (n) => n instanceof Node && !!(i?.contains(n) || t.navigation()?.contains(n)),
40
- onClose: v,
47
+ onClose: m,
41
48
  lockBodyScroll: !1,
42
49
  trapFocus: !0,
43
50
  blockWheel: "outside",
@@ -46,36 +53,36 @@ function Z(t) {
46
53
  autoFocus: !1,
47
54
  restoreFocus: !1
48
55
  });
49
- const B = A(() => t.children);
50
- return b(_, {
56
+ const N = F(() => t.children);
57
+ return g(B, {
51
58
  get when() {
52
59
  return r.mounted();
53
60
  },
54
61
  get children() {
55
- var n = U(), l = n.firstChild, D = l.nextSibling, o = D.firstChild, m = o.firstChild;
62
+ var n = W(), l = n.firstChild, u = l.nextSibling, o = u.firstChild, b = o.firstChild;
56
63
  l.$$click = () => {
57
- t.open && v();
64
+ t.open && m();
58
65
  }, o.$$keydown = (e) => t.onKeyDown?.(e);
59
- var h = i;
60
- return typeof h == "function" ? E(h, o) : i = o, a(o, "aria-labelledby", u), f(o, b(_, {
66
+ var x = i;
67
+ return typeof x == "function" ? T(x, o) : i = o, a(o, "aria-labelledby", v), f(o, g(B, {
61
68
  get when() {
62
69
  return t.header === void 0;
63
70
  },
64
71
  get fallback() {
65
72
  return [(() => {
66
- var e = W();
67
- return a(e, "id", u), f(e, () => t.title), e;
68
- })(), N(() => t.header)];
73
+ var e = X();
74
+ return a(e, "id", v), f(e, () => t.title), e;
75
+ })(), j(() => t.header)];
69
76
  },
70
77
  get children() {
71
- var e = R(), s = e.firstChild, c = s.nextSibling;
72
- return a(s, "id", u), f(s, () => t.title), c.$$click = v, f(c, b(L, {
78
+ var e = U(), s = e.firstChild, c = s.nextSibling;
79
+ return a(s, "id", v), f(s, () => t.title), c.$$click = m, f(c, g(R, {
73
80
  class: "h-5 w-5"
74
81
  })), S(() => a(c, "aria-label", t.closeLabel ?? "Close")), e;
75
82
  }
76
- }), m), f(m, B), S((e) => {
77
- var s = r.state(), c = r.state(), x = t.id, w = r.state(), y = r.exiting(), k = r.exiting() ? "true" : void 0, C = F("pointer-events-auto relative flex min-h-0 w-full max-w-[640px] flex-col border border-border bg-card text-card-foreground shadow-xl floe-floating-presence floe-bottom-drawer-panel", t.class), $ = F("flex min-h-0 flex-col overflow-auto overscroll-contain", t.contentClass);
78
- return s !== e.e && a(n, "data-floating-presence", e.e = s), c !== e.t && a(l, "data-floating-presence", e.t = c), x !== e.a && a(o, "id", e.a = x), w !== e.o && a(o, "data-floating-presence", e.o = w), y !== e.i && (o.inert = e.i = y), k !== e.n && a(o, "aria-hidden", e.n = k), C !== e.s && P(o, e.s = C), $ !== e.h && P(m, e.h = $), e;
83
+ }), b), f(b, N), S((e) => {
84
+ var s = r.state(), c = r.state(), y = t.id, w = r.state(), k = r.exiting(), C = r.exiting() ? "true" : void 0, $ = D("pointer-events-auto relative flex min-h-0 w-full max-w-[640px] flex-col border border-border bg-card text-card-foreground shadow-xl floe-floating-presence floe-bottom-drawer-panel", t.class), P = D("flex min-h-0 flex-col overflow-auto overscroll-contain", t.contentClass);
85
+ return s !== e.e && a(n, "data-floating-presence", e.e = s), c !== e.t && a(l, "data-floating-presence", e.t = c), y !== e.a && a(o, "id", e.a = y), w !== e.o && a(o, "data-floating-presence", e.o = w), k !== e.i && (o.inert = e.i = k), C !== e.n && a(o, "aria-hidden", e.n = C), $ !== e.s && M(o, e.s = $), P !== e.h && M(b, e.h = P), e;
79
86
  }, {
80
87
  e: void 0,
81
88
  t: void 0,
@@ -89,7 +96,7 @@ function Z(t) {
89
96
  }
90
97
  });
91
98
  }
92
- T(["click", "keydown"]);
99
+ q(["click", "keydown"]);
93
100
  export {
94
- Z as MobileNavigationPanel
101
+ p as MobileNavigationPanel
95
102
  };
@@ -1,8 +1,8 @@
1
- import { spread as d, mergeProps as c, insert as n, createComponent as t, memo as g, Dynamic as u, template as l } from "solid-js/web";
1
+ import { spread as d, mergeProps as c, insert as n, createComponent as t, memo as g, Dynamic as l, template as u } from "solid-js/web";
2
2
  import { splitProps as m, Show as b } from "solid-js";
3
3
  import { cn as a } from "../../utils/cn.js";
4
4
  import { Loader2 as p } from "../icons/index.js";
5
- var h = /* @__PURE__ */ l("<button type=button data-floe-surface-part=action>");
5
+ var h = /* @__PURE__ */ u("<button type=button data-floe-control=button data-floe-surface-part=action>");
6
6
  const v = {
7
7
  default: "bg-primary text-primary-foreground shadow-sm hover:bg-primary/90 active:bg-primary/80",
8
8
  primary: "bg-primary text-primary-foreground shadow-sm hover:bg-primary/90 active:bg-primary/80",
@@ -43,7 +43,7 @@ function k(i) {
43
43
  return r.loading;
44
44
  },
45
45
  get fallback() {
46
- return g(() => !!r.icon)() && t(u, {
46
+ return g(() => !!r.icon)() && t(l, {
47
47
  get component() {
48
48
  return r.icon;
49
49
  },
@@ -216,8 +216,8 @@ function $e(e) {
216
216
  });
217
217
  }
218
218
  }), null), F((t) => {
219
- var s = k("relative inline-block", e.class), u = k("cursor-pointer", e.triggerClass, e.disabled && "pointer-events-none opacity-50"), x = e.disabled ? -1 : 0, a = c(), S = e.triggerAriaLabel, E = e.disabled ? "true" : void 0, L = e.triggerInputSurface ? "true" : void 0, p = e.triggerInputSurface ? "inset" : void 0;
220
- return s !== t.e && D(r, t.e = s), u !== t.t && D(n, t.t = u), x !== t.a && f(n, "tabindex", t.a = x), a !== t.o && f(n, "aria-expanded", t.o = a), S !== t.i && f(n, "aria-label", t.i = S), E !== t.n && f(n, "aria-disabled", t.n = E), L !== t.s && f(n, "data-floe-input-surface", t.s = L), p !== t.h && f(n, "data-floe-surface", t.h = p), t;
219
+ var s = k("relative inline-block", e.class), u = k("cursor-pointer", e.triggerClass, e.disabled && "pointer-events-none opacity-50"), x = e.disabled ? -1 : 0, a = c(), S = e.triggerAriaLabel, E = e.disabled ? "true" : void 0, p = e.triggerInputSurface ? "true" : void 0, L = e.triggerInputSurface ? "inset" : void 0;
220
+ return s !== t.e && D(r, t.e = s), u !== t.t && D(n, t.t = u), x !== t.a && f(n, "tabindex", t.a = x), a !== t.o && f(n, "aria-expanded", t.o = a), S !== t.i && f(n, "aria-label", t.i = S), E !== t.n && f(n, "aria-disabled", t.n = E), p !== t.s && f(n, "data-floe-input-surface", t.s = p), L !== t.h && f(n, "data-floe-surface", t.h = L), t;
221
221
  }, {
222
222
  e: void 0,
223
223
  t: void 0,
@@ -328,8 +328,8 @@ function ee(e) {
328
328
  });
329
329
  }
330
330
  }), null), F((a) => {
331
- var S = k("w-full flex items-center gap-1.5 px-2 py-1 text-xs", "transition-colors duration-75", "focus:outline-none focus:bg-accent", e.item.tone === "danger" && "text-destructive", e.item.disabled ? "opacity-50 cursor-not-allowed" : "hover:bg-accent cursor-pointer"), E = e.item.disabled, L = o() ? "menu" : void 0, p = o() ? c() : void 0, K = e.selected && !o() ? "true" : void 0, N = e.item.tone ?? "default";
332
- return S !== a.e && D(t, a.e = S), E !== a.t && (t.disabled = a.t = E), L !== a.a && f(t, "aria-haspopup", a.a = L), p !== a.o && f(t, "aria-expanded", a.o = p), K !== a.i && f(t, "data-floe-selected", a.i = K), N !== a.n && f(t, "data-tone", a.n = N), a;
331
+ var S = k("w-full flex items-center gap-1.5 px-2 py-1 text-xs", "transition-colors duration-75", "focus:outline-none focus:bg-accent", e.item.tone === "danger" && "text-destructive", e.item.disabled ? "opacity-50 cursor-not-allowed" : "hover:bg-accent cursor-pointer"), E = e.item.disabled, p = o() ? "menu" : void 0, L = o() ? c() : void 0, K = e.selected && !o() ? "true" : void 0, N = e.item.tone ?? "default";
332
+ return S !== a.e && D(t, a.e = S), E !== a.t && (t.disabled = a.t = E), p !== a.a && f(t, "aria-haspopup", a.a = p), L !== a.o && f(t, "aria-expanded", a.o = L), K !== a.i && f(t, "data-floe-selected", a.i = K), N !== a.n && f(t, "data-tone", a.n = N), a;
333
333
  }, {
334
334
  e: void 0,
335
335
  t: void 0,
@@ -429,7 +429,7 @@ function Fe(e) {
429
429
  return l($e, {
430
430
  triggerInputSurface: !0,
431
431
  get triggerClass() {
432
- return k("flex items-center justify-between gap-2 h-8 px-2.5 w-full", "rounded border border-input bg-background text-xs shadow-sm", "transition-colors duration-100", e.class);
432
+ return k("flex items-center justify-between gap-2 h-8 px-2.5 w-full", "rounded border border-input bg-background text-[length:var(--floe-type-control)] shadow-sm", "transition-colors duration-100", e.class);
433
433
  },
434
434
  get trigger() {
435
435
  return [(() => {
@@ -2,28 +2,28 @@ import { insert as l, createComponent as f, effect as y, className as C, memo as
2
2
  import { splitProps as N, createUniqueId as E, Show as w, createSignal as ie, createEffect as ue, onCleanup as se, For as ce } from "solid-js";
3
3
  import { cn as I } from "../../utils/cn.js";
4
4
  import { Minus as fe, Plus as he, ChevronDown as ge } from "../icons/index.js";
5
- var xe = /* @__PURE__ */ z('<div class="absolute left-2.5 top-1/2 -translate-y-1/2 text-muted-foreground pointer-events-none">'), ve = /* @__PURE__ */ z('<div class="absolute right-2.5 top-1/2 -translate-y-1/2 text-muted-foreground pointer-events-none">'), M = /* @__PURE__ */ z('<p class="mt-1 text-[11px] text-error"role=alert>'), R = /* @__PURE__ */ z('<p class="mt-1 text-[11px] text-muted-foreground">'), be = /* @__PURE__ */ z("<div class=relative><input data-floe-surface=inset>"), me = /* @__PURE__ */ z("<div><textarea data-floe-surface=inset>"), pe = /* @__PURE__ */ z('<div><div data-floe-input-surface data-floe-surface=inset><button type=button aria-label="Decrease value"></button><input type=number><button type=button aria-label="Increase value">'), we = /* @__PURE__ */ z("<div><div data-floe-input-surface data-floe-surface=inset><input>"), oe = /* @__PURE__ */ z("<span>"), ye = /* @__PURE__ */ z("<button type=button><span>"), Ie = /* @__PURE__ */ z("<div role=listbox>"), $e = /* @__PURE__ */ z("<button type=button role=option>");
5
+ var ve = /* @__PURE__ */ z('<div class="absolute left-2.5 top-1/2 -translate-y-1/2 text-muted-foreground pointer-events-none">'), xe = /* @__PURE__ */ z('<div class="absolute right-2.5 top-1/2 -translate-y-1/2 text-muted-foreground pointer-events-none">'), M = /* @__PURE__ */ z('<p class="mt-1 text-[11px] text-error"role=alert>'), R = /* @__PURE__ */ z('<p class="mt-1 text-[11px] text-muted-foreground">'), be = /* @__PURE__ */ z("<div class=relative><input data-floe-control=input data-floe-surface=inset>"), me = /* @__PURE__ */ z("<div><textarea data-floe-control=input data-floe-surface=inset>"), pe = /* @__PURE__ */ z('<div><div data-floe-input-surface data-floe-control=compound-input data-floe-surface=inset><button type=button aria-label="Decrease value"></button><input type=number><button type=button aria-label="Increase value">'), we = /* @__PURE__ */ z("<div><div data-floe-input-surface data-floe-control=compound-input data-floe-surface=inset><input>"), oe = /* @__PURE__ */ z("<span>"), ye = /* @__PURE__ */ z("<button type=button><span>"), Ie = /* @__PURE__ */ z("<div role=listbox>"), $e = /* @__PURE__ */ z("<button type=button role=option>");
6
6
  const Ce = {
7
7
  sm: "h-7 text-xs px-2",
8
- md: "h-8 text-xs px-2.5",
8
+ md: "h-8 text-[length:var(--floe-type-control)] px-2.5",
9
9
  lg: "h-9 text-sm px-3"
10
10
  };
11
11
  function Te(r) {
12
- const [e, b] = N(r, ["size", "error", "helperText", "leftIcon", "rightIcon", "class", "id"]), S = E(), m = () => e.id ?? S, h = () => `${m()}-error`, v = () => `${m()}-helper`, $ = () => {
12
+ const [e, b] = N(r, ["size", "error", "helperText", "leftIcon", "rightIcon", "class", "id"]), S = E(), m = () => e.id ?? S, h = () => `${m()}-error`, x = () => `${m()}-helper`, $ = () => {
13
13
  const o = [];
14
- return e.error && o.push(h()), e.helperText && !e.error && o.push(v()), o.length > 0 ? o.join(" ") : void 0;
14
+ return e.error && o.push(h()), e.helperText && !e.error && o.push(x()), o.length > 0 ? o.join(" ") : void 0;
15
15
  };
16
16
  return (() => {
17
- var o = be(), x = o.firstChild;
17
+ var o = be(), v = o.firstChild;
18
18
  return l(o, f(w, {
19
19
  get when() {
20
20
  return e.leftIcon;
21
21
  },
22
22
  get children() {
23
- var d = xe();
23
+ var d = ve();
24
24
  return l(d, () => e.leftIcon), d;
25
25
  }
26
- }), x), B(x, L({
26
+ }), v), B(v, L({
27
27
  get id() {
28
28
  return m();
29
29
  },
@@ -53,7 +53,7 @@ function Te(r) {
53
53
  return e.rightIcon;
54
54
  },
55
55
  get children() {
56
- var d = ve();
56
+ var d = xe();
57
57
  return l(d, () => e.rightIcon), d;
58
58
  }
59
59
  }), null), l(o, f(w, {
@@ -70,19 +70,19 @@ function Te(r) {
70
70
  },
71
71
  get children() {
72
72
  var d = R();
73
- return l(d, () => e.helperText), y(() => g(d, "id", v())), d;
73
+ return l(d, () => e.helperText), y(() => g(d, "id", x())), d;
74
74
  }
75
75
  }), null), o;
76
76
  })();
77
77
  }
78
78
  function _e(r) {
79
- const [e, b] = N(r, ["error", "helperText", "class", "id"]), S = E(), m = () => e.id ?? S, h = () => `${m()}-error`, v = () => `${m()}-helper`, $ = () => {
79
+ const [e, b] = N(r, ["error", "helperText", "class", "id"]), S = E(), m = () => e.id ?? S, h = () => `${m()}-error`, x = () => `${m()}-helper`, $ = () => {
80
80
  const o = [];
81
- return e.error && o.push(h()), e.helperText && !e.error && o.push(v()), o.length > 0 ? o.join(" ") : void 0;
81
+ return e.error && o.push(h()), e.helperText && !e.error && o.push(x()), o.length > 0 ? o.join(" ") : void 0;
82
82
  };
83
83
  return (() => {
84
- var o = me(), x = o.firstChild;
85
- return B(x, L({
84
+ var o = me(), v = o.firstChild;
85
+ return B(v, L({
86
86
  get id() {
87
87
  return m();
88
88
  },
@@ -93,7 +93,7 @@ function _e(r) {
93
93
  return $();
94
94
  },
95
95
  get class() {
96
- return I("w-full min-h-16 rounded border border-input bg-background p-2.5 text-xs shadow-sm", "placeholder:text-muted-foreground", "transition-colors duration-100", "focus:outline-none", "disabled:cursor-not-allowed disabled:opacity-50", "resize-y", e.error && "border-error", e.class);
96
+ return I("w-full min-h-16 rounded border border-input bg-background p-2.5 text-[length:var(--floe-type-control)] shadow-sm", "placeholder:text-muted-foreground", "transition-colors duration-100", "focus:outline-none", "disabled:cursor-not-allowed disabled:opacity-50", "resize-y", e.error && "border-error", e.class);
97
97
  }
98
98
  }, b), !1, !1), l(o, f(w, {
99
99
  get when() {
@@ -109,16 +109,16 @@ function _e(r) {
109
109
  },
110
110
  get children() {
111
111
  var d = R();
112
- return l(d, () => e.helperText), y(() => g(d, "id", v())), d;
112
+ return l(d, () => e.helperText), y(() => g(d, "id", x())), d;
113
113
  }
114
114
  }), null), o;
115
115
  })();
116
116
  }
117
117
  function Pe(r) {
118
- const e = E(), b = `${e}-error`, S = `${e}-helper`, m = () => r.step ?? 1, h = () => r.min ?? -1 / 0, v = () => r.max ?? 1 / 0, $ = (t) => Math.min(v(), Math.max(h(), t)), o = () => !r.disabled && r.value > h(), x = () => !r.disabled && r.value < v(), d = () => {
118
+ const e = E(), b = `${e}-error`, S = `${e}-helper`, m = () => r.step ?? 1, h = () => r.min ?? -1 / 0, x = () => r.max ?? 1 / 0, $ = (t) => Math.min(x(), Math.max(h(), t)), o = () => !r.disabled && r.value > h(), v = () => !r.disabled && r.value < x(), d = () => {
119
119
  o() && r.onChange($(r.value - m()));
120
120
  }, T = () => {
121
- x() && r.onChange($(r.value + m()));
121
+ v() && r.onChange($(r.value + m()));
122
122
  }, P = (t) => {
123
123
  const u = parseFloat(t.currentTarget.value);
124
124
  isNaN(u) || r.onChange($(u));
@@ -172,7 +172,7 @@ function Pe(r) {
172
172
  return g(n, "id", S), l(n, () => r.helperText), n;
173
173
  }
174
174
  }), null), y((n) => {
175
- var V = r.class, j = r.error ? !0 : void 0, A = r.disabled ? !0 : void 0, F = I("inline-flex items-center rounded border border-input bg-background shadow-sm", "transition-colors duration-100", r.disabled && "opacity-50 cursor-not-allowed", r.error && "border-error", a().height), W = !o(), q = I("flex items-center justify-center border-r border-input cursor-pointer", "text-muted-foreground transition-colors", "hover:bg-accent hover:text-foreground", "focus:outline-none", "disabled:opacity-50 disabled:cursor-not-allowed disabled:hover:bg-transparent disabled:hover:text-muted-foreground", a().btnSize, a().height), H = r.min, G = r.max, U = r.step, X = r.disabled, J = r.inputDisabled, K = r.placeholder, Q = r.error ? !0 : void 0, Y = s(), Z = I("w-16 text-center text-xs bg-transparent border-none", "outline-none focus:outline-none focus:ring-0", "[appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none", r.inputDisabled && "cursor-default"), ee = !x(), te = I("flex items-center justify-center border-l border-input cursor-pointer", "text-muted-foreground transition-colors", "hover:bg-accent hover:text-foreground", "focus:outline-none", "disabled:opacity-50 disabled:cursor-not-allowed disabled:hover:bg-transparent disabled:hover:text-muted-foreground", a().btnSize, a().height);
175
+ var V = r.class, j = r.error ? !0 : void 0, A = r.disabled ? !0 : void 0, F = I("inline-flex items-center rounded border border-input bg-background shadow-sm", "transition-colors duration-100", r.disabled && "opacity-50 cursor-not-allowed", r.error && "border-error", a().height), W = !o(), q = I("flex items-center justify-center border-r border-input cursor-pointer", "text-muted-foreground transition-colors", "hover:bg-accent hover:text-foreground", "focus:outline-none", "disabled:opacity-50 disabled:cursor-not-allowed disabled:hover:bg-transparent disabled:hover:text-muted-foreground", a().btnSize, a().height), H = r.min, G = r.max, U = r.step, X = r.disabled, J = r.inputDisabled, K = r.placeholder, Q = r.error ? !0 : void 0, Y = s(), Z = I("w-16 text-center text-[length:var(--floe-type-control)] bg-transparent border-none", "outline-none focus:outline-none focus:ring-0", "[appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none", r.inputDisabled && "cursor-default"), ee = !v(), te = I("flex items-center justify-center border-l border-input cursor-pointer", "text-muted-foreground transition-colors", "hover:bg-accent hover:text-foreground", "focus:outline-none", "disabled:opacity-50 disabled:cursor-not-allowed disabled:hover:bg-transparent disabled:hover:text-muted-foreground", a().btnSize, a().height);
176
176
  return V !== n.e && C(t, n.e = V), j !== n.t && g(u, "aria-invalid", n.t = j), A !== n.a && g(u, "aria-disabled", n.a = A), F !== n.o && C(u, n.o = F), W !== n.i && (k.disabled = n.i = W), q !== n.n && C(k, n.n = q), H !== n.s && g(p, "min", n.s = H), G !== n.h && g(p, "max", n.h = G), U !== n.r && g(p, "step", n.r = U), X !== n.d && (p.disabled = n.d = X), J !== n.l && (p.readOnly = n.l = J), K !== n.u && g(p, "placeholder", n.u = K), Q !== n.c && g(p, "aria-invalid", n.c = Q), Y !== n.w && g(p, "aria-describedby", n.w = Y), Z !== n.m && C(p, n.m = Z), ee !== n.f && (O.disabled = n.f = ee), te !== n.y && C(O, n.y = te), n;
177
177
  }, {
178
178
  e: void 0,
@@ -197,9 +197,9 @@ function Pe(r) {
197
197
  }
198
198
  const D = 8;
199
199
  function De(r) {
200
- const [e, b] = N(r, ["size", "error", "helperText", "prefix", "suffix", "prefixOptions", "prefixValue", "onPrefixChange", "suffixOptions", "suffixValue", "onSuffixChange", "class", "id"]), S = E(), m = () => e.id ?? S, h = () => `${m()}-error`, v = () => `${m()}-helper`, $ = () => {
200
+ const [e, b] = N(r, ["size", "error", "helperText", "prefix", "suffix", "prefixOptions", "prefixValue", "onPrefixChange", "suffixOptions", "suffixValue", "onSuffixChange", "class", "id"]), S = E(), m = () => e.id ?? S, h = () => `${m()}-error`, x = () => `${m()}-helper`, $ = () => {
201
201
  const s = [];
202
- return e.error && s.push(h()), e.helperText && !e.error && s.push(v()), s.length > 0 ? s.join(" ") : void 0;
202
+ return e.error && s.push(h()), e.helperText && !e.error && s.push(x()), s.length > 0 ? s.join(" ") : void 0;
203
203
  }, o = {
204
204
  sm: {
205
205
  height: "h-7",
@@ -208,7 +208,7 @@ function De(r) {
208
208
  },
209
209
  md: {
210
210
  height: "h-8",
211
- text: "text-xs",
211
+ text: "text-[length:var(--floe-type-control)]",
212
212
  px: "px-2.5"
213
213
  },
214
214
  lg: {
@@ -216,7 +216,7 @@ function De(r) {
216
216
  text: "text-sm",
217
217
  px: "px-3"
218
218
  }
219
- }, x = () => o[e.size ?? "md"], d = () => !!e.prefix || e.prefixOptions && e.prefixOptions.length > 0, T = () => !!e.suffix || e.suffixOptions && e.suffixOptions.length > 0, P = () => e.prefix ? e.prefix : e.prefixOptions?.find((s) => s.value === e.prefixValue)?.label ?? e.prefixOptions?.[0]?.label, i = () => e.suffix ? e.suffix : e.suffixOptions?.find((s) => s.value === e.suffixValue)?.label ?? e.suffixOptions?.[0]?.label;
219
+ }, v = () => o[e.size ?? "md"], d = () => !!e.prefix || e.prefixOptions && e.prefixOptions.length > 0, T = () => !!e.suffix || e.suffixOptions && e.suffixOptions.length > 0, P = () => e.prefix ? e.prefix : e.prefixOptions?.find((s) => s.value === e.prefixValue)?.label ?? e.prefixOptions?.[0]?.label, i = () => e.suffix ? e.suffix : e.suffixOptions?.find((s) => s.value === e.suffixValue)?.label ?? e.suffixOptions?.[0]?.label;
220
220
  return (() => {
221
221
  var s = we(), c = s.firstChild, a = c.firstChild;
222
222
  return l(c, f(w, {
@@ -231,7 +231,7 @@ function De(r) {
231
231
  get fallback() {
232
232
  return (() => {
233
233
  var t = oe();
234
- return l(t, () => e.prefix), y(() => C(t, I("flex items-center border-r border-input bg-muted/50 text-muted-foreground", x().text, x().px, x().height))), t;
234
+ return l(t, () => e.prefix), y(() => C(t, I("flex items-center border-r border-input bg-muted/50 text-muted-foreground", v().text, v().px, v().height))), t;
235
235
  })();
236
236
  },
237
237
  get children() {
@@ -270,7 +270,7 @@ function De(r) {
270
270
  return $();
271
271
  },
272
272
  get class() {
273
- return I("flex-1 min-w-0 bg-transparent border-none", "placeholder:text-muted-foreground", "outline-none focus:outline-none focus:ring-0", "disabled:cursor-not-allowed", x().text, x().px);
273
+ return I("flex-1 min-w-0 bg-transparent border-none", "placeholder:text-muted-foreground", "outline-none focus:outline-none focus:ring-0", "disabled:cursor-not-allowed", v().text, v().px);
274
274
  }
275
275
  }, b), !1, !1), l(c, f(w, {
276
276
  get when() {
@@ -284,7 +284,7 @@ function De(r) {
284
284
  get fallback() {
285
285
  return (() => {
286
286
  var t = oe();
287
- return l(t, () => e.suffix), y(() => C(t, I("flex items-center border-l border-input bg-muted/50 text-muted-foreground", x().text, x().px, x().height))), t;
287
+ return l(t, () => e.suffix), y(() => C(t, I("flex items-center border-l border-input bg-muted/50 text-muted-foreground", v().text, v().px, v().height))), t;
288
288
  })();
289
289
  },
290
290
  get children() {
@@ -326,10 +326,10 @@ function De(r) {
326
326
  },
327
327
  get children() {
328
328
  var t = R();
329
- return l(t, () => e.helperText), y(() => g(t, "id", v())), t;
329
+ return l(t, () => e.helperText), y(() => g(t, "id", x())), t;
330
330
  }
331
331
  }), null), y((t) => {
332
- var u = e.class, k = e.error ? !0 : void 0, p = b.disabled ? !0 : void 0, O = I("inline-flex items-center rounded border border-input bg-background shadow-sm", "transition-colors duration-100", b.disabled && "opacity-50 cursor-not-allowed", e.error && "border-error", x().height);
332
+ var u = e.class, k = e.error ? !0 : void 0, p = b.disabled ? !0 : void 0, O = I("inline-flex items-center rounded border border-input bg-background shadow-sm", "transition-colors duration-100", b.disabled && "opacity-50 cursor-not-allowed", e.error && "border-error", v().height);
333
333
  return u !== t.e && C(s, t.e = u), k !== t.t && g(c, "aria-invalid", t.t = k), p !== t.a && g(c, "aria-disabled", t.a = p), O !== t.o && C(c, t.o = O), t;
334
334
  }, {
335
335
  e: void 0,
@@ -344,7 +344,7 @@ function le(r) {
344
344
  x: -9999,
345
345
  y: -9999
346
346
  });
347
- let h, v;
347
+ let h, x;
348
348
  const $ = {
349
349
  sm: {
350
350
  height: "h-7",
@@ -353,7 +353,7 @@ function le(r) {
353
353
  },
354
354
  md: {
355
355
  height: "h-8",
356
- text: "text-xs",
356
+ text: "text-[length:var(--floe-type-control)]",
357
357
  px: "px-2.5"
358
358
  },
359
359
  lg: {
@@ -361,16 +361,16 @@ function le(r) {
361
361
  text: "text-sm",
362
362
  px: "px-3"
363
363
  }
364
- }, o = () => $[r.size ?? "md"], x = () => {
365
- if (!h || !v) return;
366
- const i = h.getBoundingClientRect(), s = v.getBoundingClientRect(), c = window.innerWidth, a = window.innerHeight;
364
+ }, o = () => $[r.size ?? "md"], v = () => {
365
+ if (!h || !x) return;
366
+ const i = h.getBoundingClientRect(), s = x.getBoundingClientRect(), c = window.innerWidth, a = window.innerHeight;
367
367
  let t = i.left, u = i.bottom + 2;
368
368
  t + s.width > c - D && (t = i.right - s.width), t = Math.max(D, t), u + s.height > a - D && (u = i.top - s.height - 2), u = Math.max(D, u), m({
369
369
  x: t,
370
370
  y: u
371
371
  });
372
372
  }, d = (i) => {
373
- h && !h.contains(i.target) && v && !v.contains(i.target) && b(!1);
373
+ h && !h.contains(i.target) && x && !x.contains(i.target) && b(!1);
374
374
  }, T = (i) => {
375
375
  i.key === "Escape" && b(!1);
376
376
  }, P = (i) => {
@@ -384,7 +384,7 @@ function le(r) {
384
384
  });
385
385
  return;
386
386
  }
387
- typeof document > "u" || (document.addEventListener("mousedown", d), document.addEventListener("keydown", T), requestAnimationFrame(x), se(() => {
387
+ typeof document > "u" || (document.addEventListener("mousedown", d), document.addEventListener("keydown", T), requestAnimationFrame(v), se(() => {
388
388
  document.removeEventListener("mousedown", d), document.removeEventListener("keydown", T);
389
389
  }));
390
390
  }), [(() => {
@@ -409,8 +409,8 @@ function le(r) {
409
409
  get children() {
410
410
  return f(ae, {
411
411
  get children() {
412
- var i = Ie(), s = v;
413
- return typeof s == "function" ? ne(s, i) : v = i, l(i, f(ce, {
412
+ var i = Ie(), s = x;
413
+ return typeof s == "function" ? ne(s, i) : x = i, l(i, f(ce, {
414
414
  get each() {
415
415
  return r.options;
416
416
  },
@@ -4,9 +4,15 @@
4
4
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
5
5
  --font-mono: 'JetBrains Mono', 'Fira Code', 'SF Mono', Menlo, Monaco, Consolas, monospace;
6
6
  --floe-type-caption: 0.6875rem;
7
+ --floe-type-supporting: 0.75rem;
7
8
  --floe-type-control: 0.8125rem;
8
9
  --floe-type-body: 0.875rem;
9
10
  --floe-type-heading: 1rem;
11
+ --floe-line-control: 1.25rem;
12
+ --floe-line-body: 1.375rem;
13
+ --floe-control-height-sm: 1.75rem;
14
+ --floe-control-height-md: 2rem;
15
+ --floe-row-height: 2rem;
10
16
  --floe-space-1: 0.25rem;
11
17
  --floe-space-2: 0.5rem;
12
18
  --floe-space-3: 0.75rem;
@@ -16,3 +22,19 @@
16
22
  --floe-radius-group: 0.5rem;
17
23
  --floe-radius-floating: 12px;
18
24
  }
25
+
26
+ /* Compact visual controls retain usable, non-overlapping touch geometry. */
27
+ @media (pointer: coarse) {
28
+ [data-floe-control='button'],
29
+ [data-floe-control='input'],
30
+ [data-floe-control='compound-input'],
31
+ [data-floe-control='compound-input'] button,
32
+ button[data-floe-input-surface] {
33
+ min-height: 44px;
34
+ }
35
+ [data-floe-control='button'],
36
+ [data-floe-control='compound-input'] button { min-width: 44px; }
37
+ [data-floe-control='compound-input'] input { font-size: max(16px, 1rem); }
38
+ [data-floe-control='compound-input'] { height: auto; }
39
+ [data-floe-control='input'] { font-size: max(16px, 1rem); }
40
+ }
@@ -48,9 +48,15 @@ export declare const floeSharedCssVariables: {
48
48
  readonly '--font-sans': "'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif";
49
49
  readonly '--font-mono': "'JetBrains Mono', 'Fira Code', 'SF Mono', Menlo, Monaco, Consolas, monospace";
50
50
  readonly '--floe-type-caption': "0.6875rem";
51
+ readonly '--floe-type-supporting': "0.75rem";
51
52
  readonly '--floe-type-control': "0.8125rem";
52
53
  readonly '--floe-type-body': "0.875rem";
53
54
  readonly '--floe-type-heading': "1rem";
55
+ readonly '--floe-line-control': "1.25rem";
56
+ readonly '--floe-line-body': "1.375rem";
57
+ readonly '--floe-control-height-sm': "1.75rem";
58
+ readonly '--floe-control-height-md': "2rem";
59
+ readonly '--floe-row-height': "2rem";
54
60
  readonly '--floe-space-1': "0.25rem";
55
61
  readonly '--floe-space-2': "0.5rem";
56
62
  readonly '--floe-space-3': "0.75rem";
@@ -1258,9 +1264,15 @@ export declare const floeDesignTokens: {
1258
1264
  readonly '--font-sans': "'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif";
1259
1265
  readonly '--font-mono': "'JetBrains Mono', 'Fira Code', 'SF Mono', Menlo, Monaco, Consolas, monospace";
1260
1266
  readonly '--floe-type-caption': "0.6875rem";
1267
+ readonly '--floe-type-supporting': "0.75rem";
1261
1268
  readonly '--floe-type-control': "0.8125rem";
1262
1269
  readonly '--floe-type-body': "0.875rem";
1263
1270
  readonly '--floe-type-heading': "1rem";
1271
+ readonly '--floe-line-control': "1.25rem";
1272
+ readonly '--floe-line-body': "1.375rem";
1273
+ readonly '--floe-control-height-sm': "1.75rem";
1274
+ readonly '--floe-control-height-md': "2rem";
1275
+ readonly '--floe-row-height': "2rem";
1264
1276
  readonly '--floe-space-1': "0.25rem";
1265
1277
  readonly '--floe-space-2': "0.5rem";
1266
1278
  readonly '--floe-space-3': "0.75rem";
@@ -4,9 +4,15 @@ const i = {
4
4
  "--font-sans": "'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif",
5
5
  "--font-mono": "'JetBrains Mono', 'Fira Code', 'SF Mono', Menlo, Monaco, Consolas, monospace",
6
6
  "--floe-type-caption": "0.6875rem",
7
+ "--floe-type-supporting": "0.75rem",
7
8
  "--floe-type-control": "0.8125rem",
8
9
  "--floe-type-body": "0.875rem",
9
10
  "--floe-type-heading": "1rem",
11
+ "--floe-line-control": "1.25rem",
12
+ "--floe-line-body": "1.375rem",
13
+ "--floe-control-height-sm": "1.75rem",
14
+ "--floe-control-height-md": "2rem",
15
+ "--floe-row-height": "2rem",
10
16
  "--floe-space-1": "0.25rem",
11
17
  "--floe-space-2": "0.5rem",
12
18
  "--floe-space-3": "0.75rem",