fiboui 2.2.4 → 2.3.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.
- package/README.md +2 -2
- package/dist/{FineGrain-Bishpo5C.js → FineGrain-CLKZ-Sv6.js} +1 -1
- package/dist/{builder-DxmEDvW3.js → builder-DTH8K7ph.js} +483 -472
- package/dist/content.js +3 -3
- package/dist/core.js +3 -3
- package/dist/{index-CdDg3sZt.js → index-BIEK3zDu.js} +51 -51
- package/dist/{index-CKbAiJg2.js → index-BqVgjY03.js} +4 -4
- package/dist/{index-B_NshIUT.js → index-DPQMrIgq.js} +1 -1
- package/dist/{index-nFXU29Ly.js → index-DkRkbmmY.js} +1 -1
- package/dist/{index-K-VIFyCP.js → index-txulk1zM.js} +3 -3
- package/dist/{index-CIUytVXq.js → index-yb7roisl.js} +3 -3
- package/dist/index-z5BF-Y8H.js +160 -0
- package/dist/index.d.ts +317 -280
- package/dist/index.js +161 -151
- package/dist/interactive.js +1 -1
- package/dist/layout.js +2 -2
- package/dist/{mount-B316Ig0o.js → mount-DR5PekCC.js} +1 -1
- package/dist/provider-Muljv62_.js +44 -0
- package/dist/structure.js +2 -2
- package/dist/style.css +1 -1
- package/dist/theme.js +14 -4
- package/dist/themeData-CmTJt3dU.js +441 -0
- package/package.json +1 -1
- package/dist/index-Des7FiFH.js +0 -111
- package/dist/provider-CihtUuRx.js +0 -302
package/dist/content.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { b as s, A as r, B as o, I as t, c as n, L as I, P as g, a as l, S as m } from "./index-
|
|
3
|
-
import { T as x } from "./index-
|
|
4
|
-
import { I as f } from "./index-
|
|
2
|
+
import { b as s, A as r, B as o, I as t, c as n, L as I, P as g, a as l, S as m } from "./index-BqVgjY03.js";
|
|
3
|
+
import { T as x } from "./index-z5BF-Y8H.js";
|
|
4
|
+
import { I as f } from "./index-DkRkbmmY.js";
|
|
5
5
|
export {
|
|
6
6
|
s as Alert,
|
|
7
7
|
r as Avatar,
|
package/dist/core.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { C as a, F as r, M as o, p as t, O as i, d as l, P as n, R as u, f as p, h as S, S as c, V as g, c as b, b as v, a as d, t as m, g as T, q as R, v as P, o as F, n as y, r as C, i as E, s as f, m as M, j as O, l as x, k as V, u as B, e as h } from "./builder-
|
|
3
|
-
import { E as k, l as w, F as A, k as I, P as q, c as G, j as N, m as W, t as _, g as z, b as D, h as H, a as J, i as K, u as L, e as Q, f as U, d as X } from "./mount-
|
|
4
|
-
import { F as Z, b as $ } from "./FineGrain-
|
|
2
|
+
import { C as a, F as r, M as o, p as t, O as i, d as l, P as n, R as u, f as p, h as S, S as c, V as g, c as b, b as v, a as d, t as m, g as T, q as R, v as P, o as F, n as y, r as C, i as E, s as f, m as M, j as O, l as x, k as V, u as B, e as h } from "./builder-DTH8K7ph.js";
|
|
3
|
+
import { E as k, l as w, F as A, k as I, P as q, c as G, j as N, m as W, t as _, g as z, b as D, h as H, a as J, i as K, u as L, e as Q, f as U, d as X } from "./mount-DR5PekCC.js";
|
|
4
|
+
import { F as Z, b as $ } from "./FineGrain-CLKZ-Sv6.js";
|
|
5
5
|
export {
|
|
6
6
|
a as ComputedSignal,
|
|
7
7
|
k as Easing,
|
|
@@ -3,7 +3,7 @@ var H = Object.defineProperty;
|
|
|
3
3
|
var O = (c, l, e) => l in c ? H(c, l, { enumerable: !0, configurable: !0, writable: !0, value: e }) : c[l] = e;
|
|
4
4
|
var r = (c, l, e) => O(c, typeof l != "symbol" ? l + "" : l, e);
|
|
5
5
|
import t, { useState as M, useEffect as j, useRef as F } from "react";
|
|
6
|
-
import { w as $, x as D, S as P } from "./builder-
|
|
6
|
+
import { w as $, x as D, S as P } from "./builder-DTH8K7ph.js";
|
|
7
7
|
import { t as L } from "./bundle-mjs-wppB-TKB.js";
|
|
8
8
|
const q = t.memo((c) => {
|
|
9
9
|
const {
|
|
@@ -13,7 +13,7 @@ const q = t.memo((c) => {
|
|
|
13
13
|
onPress: a,
|
|
14
14
|
onHover: s,
|
|
15
15
|
disabled: d,
|
|
16
|
-
icon:
|
|
16
|
+
icon: u,
|
|
17
17
|
shape: p,
|
|
18
18
|
shadow: k,
|
|
19
19
|
tone: v,
|
|
@@ -32,8 +32,8 @@ const q = t.memo((c) => {
|
|
|
32
32
|
p === "pill" ? S = "rounded-full" : p === "square" ? S = "rounded-[12px]" : p === "rect" ? S = "rounded-[2px]" : p === "rounded" ? S = "rounded-[8px]" : p === "sharp" && (S = "rounded-none");
|
|
33
33
|
const m = v === "inverse";
|
|
34
34
|
let b = "";
|
|
35
|
-
e === "ghost" ? b = m ? "bg-transparent text-white shadow-none border border-transparent" : "bg-transparent text-
|
|
36
|
-
const w = y || {}, I = w.padding !== void 0 || w.paddingTop !== void 0 || w.paddingBottom !== void 0 || w.paddingLeft !== void 0 || w.paddingRight !== void 0 || w.fontSize !== void 0 || w.height !== void 0, C = w.borderRadius !== void 0, z = w.fontWeight !== void 0 || o === "xs" || m, n = e === "raw" || x === "none" || m || o === "xs",
|
|
35
|
+
e === "ghost" ? b = m ? "bg-transparent text-white shadow-none border border-transparent" : "bg-transparent text-[var(--fibo-on-surface)] shadow-none border border-transparent hover:bg-[color-mix(in_srgb,var(--fibo-on-surface)_8%,transparent)]" : e === "text" ? b = m ? "bg-transparent text-white shadow-none border-none px-2" : "bg-transparent text-[var(--fibo-on-surface)] shadow-none border-none px-2 hover:bg-[color-mix(in_srgb,var(--fibo-on-surface)_8%,transparent)]" : e === "soft" ? b = "bg-[color-mix(in_srgb,var(--fibo-primary)_12%,transparent)] text-[var(--fibo-primary)] shadow-none border-none hover:bg-[color-mix(in_srgb,var(--fibo-primary)_18%,transparent)]" : e === "outline" || e === "outlined" ? b = m ? "bg-black text-white shadow-none border border-[#3b3b3b]" : "bg-transparent border-[1.5px] border-[var(--fibo-outline,rgba(0,0,0,0.12))] text-[var(--fibo-on-surface)] shadow-none hover:bg-[color-mix(in_srgb,var(--fibo-on-surface)_6%,transparent)]" : e === "solid" ? b = m ? "bg-[#f2f2f2] text-black shadow-none border border-[#f2f2f2]" : "bg-[var(--fibo-primary)] text-[var(--fibo-on-primary)] shadow-none border-none hover:opacity-90" : e === "filled" || e === "primary" ? b = "bg-[var(--fibo-primary)] text-[var(--fibo-on-primary)] shadow-sm border-none hover:opacity-90 active:opacity-100" : e === "elevated" ? b = "bg-[var(--fibo-surface)] text-[var(--fibo-primary)] shadow-md border-none hover:shadow-lg" : e === "tonal" ? b = "bg-[var(--fibo-secondary-container)] text-[var(--fibo-on-secondary-container)] shadow-sm border-none" : e === "raw" && (b = "bg-transparent border-none shadow-none p-0 h-auto gap-0 text-inherit font-inherit hover:bg-transparent", S = ""), k === "soft" && e !== "raw" && (b += " shadow-[0_8px_20px_-6px_rgba(59,130,246,0.4)]");
|
|
36
|
+
const w = y || {}, I = w.padding !== void 0 || w.paddingTop !== void 0 || w.paddingBottom !== void 0 || w.paddingLeft !== void 0 || w.paddingRight !== void 0 || w.fontSize !== void 0 || w.height !== void 0, C = w.borderRadius !== void 0, z = w.fontWeight !== void 0 || o === "xs" || m, n = e === "raw" || x === "none" || m || o === "xs", h = L(
|
|
37
37
|
"fibo-button",
|
|
38
38
|
"inline-flex items-center justify-center whitespace-nowrap",
|
|
39
39
|
z ? "" : "font-semibold",
|
|
@@ -46,10 +46,10 @@ const q = t.memo((c) => {
|
|
|
46
46
|
b,
|
|
47
47
|
_
|
|
48
48
|
), A = [];
|
|
49
|
-
return
|
|
49
|
+
return u && A.push(u), l && A.push(l), c.children && (Array.isArray(c.children) ? A.push(...c.children) : A.push(c.children)), t.createElement(
|
|
50
50
|
"button",
|
|
51
51
|
{
|
|
52
|
-
className:
|
|
52
|
+
className: h,
|
|
53
53
|
onMouseEnter: s ? () => {
|
|
54
54
|
d || s();
|
|
55
55
|
} : f.onMouseEnter,
|
|
@@ -155,7 +155,7 @@ const de = $(V), W = (c, l) => {
|
|
|
155
155
|
const l = t.useId(), e = c.id || l, [o, a] = t.useState(!1), {
|
|
156
156
|
containerClass: s,
|
|
157
157
|
containerStyle: d,
|
|
158
|
-
label:
|
|
158
|
+
label: u,
|
|
159
159
|
error: p,
|
|
160
160
|
mask: k,
|
|
161
161
|
type: v,
|
|
@@ -167,25 +167,25 @@ const de = $(V), W = (c, l) => {
|
|
|
167
167
|
} = c, g = x instanceof P, [S, m] = M(g ? x.value : x);
|
|
168
168
|
j(() => {
|
|
169
169
|
if (g)
|
|
170
|
-
return x.subscribe((
|
|
171
|
-
m(
|
|
170
|
+
return x.subscribe((h) => {
|
|
171
|
+
m(h);
|
|
172
172
|
});
|
|
173
173
|
m(x);
|
|
174
174
|
}, [x, g]);
|
|
175
175
|
const b = v === "password", w = b && o ? "text" : v, I = (n) => {
|
|
176
|
-
let
|
|
176
|
+
let h = n.target.value;
|
|
177
177
|
if (k) {
|
|
178
|
-
|
|
178
|
+
h = W(h, k);
|
|
179
179
|
const A = {
|
|
180
180
|
...n,
|
|
181
181
|
target: {
|
|
182
182
|
...n.target,
|
|
183
|
-
value:
|
|
183
|
+
value: h
|
|
184
184
|
}
|
|
185
185
|
};
|
|
186
|
-
g && (x.value =
|
|
186
|
+
g && (x.value = h), E == null || E(A);
|
|
187
187
|
} else
|
|
188
|
-
g && (x.value =
|
|
188
|
+
g && (x.value = h), E == null || E(n);
|
|
189
189
|
}, C = _ ? "2.75rem" : "1rem", z = y || b ? "2.75rem" : "1rem";
|
|
190
190
|
return t.createElement(
|
|
191
191
|
"div",
|
|
@@ -209,7 +209,7 @@ const de = $(V), W = (c, l) => {
|
|
|
209
209
|
value: S,
|
|
210
210
|
...f
|
|
211
211
|
}),
|
|
212
|
-
|
|
212
|
+
u && t.createElement(
|
|
213
213
|
"label",
|
|
214
214
|
{
|
|
215
215
|
key: "label",
|
|
@@ -217,7 +217,7 @@ const de = $(V), W = (c, l) => {
|
|
|
217
217
|
className: "fibo-textfield-label",
|
|
218
218
|
style: { left: _ ? "2.75rem" : "1rem" }
|
|
219
219
|
},
|
|
220
|
-
|
|
220
|
+
u
|
|
221
221
|
),
|
|
222
222
|
(y || b) && t.createElement(
|
|
223
223
|
"div",
|
|
@@ -327,7 +327,7 @@ class G extends D {
|
|
|
327
327
|
return t.createElement(K, a);
|
|
328
328
|
}
|
|
329
329
|
}
|
|
330
|
-
const
|
|
330
|
+
const ue = $(G), U = t.memo((c) => {
|
|
331
331
|
const {
|
|
332
332
|
checked: l,
|
|
333
333
|
onChange: e,
|
|
@@ -335,7 +335,7 @@ const he = $(G), U = t.memo((c) => {
|
|
|
335
335
|
disabled: a,
|
|
336
336
|
className: s,
|
|
337
337
|
style: d,
|
|
338
|
-
id:
|
|
338
|
+
id: u
|
|
339
339
|
} = c, p = L(
|
|
340
340
|
"fibo-switch-track w-[44px] h-[24px] rounded-full relative transition-colors duration-200 ease-in-out",
|
|
341
341
|
a ? "cursor-not-allowed opacity-50" : "cursor-pointer",
|
|
@@ -364,7 +364,7 @@ const he = $(G), U = t.memo((c) => {
|
|
|
364
364
|
o
|
|
365
365
|
),
|
|
366
366
|
t.createElement("input", {
|
|
367
|
-
id:
|
|
367
|
+
id: u,
|
|
368
368
|
type: "checkbox",
|
|
369
369
|
role: "switch",
|
|
370
370
|
checked: !!l,
|
|
@@ -407,7 +407,7 @@ class J extends D {
|
|
|
407
407
|
return t.createElement(U, e);
|
|
408
408
|
}
|
|
409
409
|
}
|
|
410
|
-
const
|
|
410
|
+
const he = $(J), Q = t.memo((c) => {
|
|
411
411
|
const {
|
|
412
412
|
checked: l,
|
|
413
413
|
onChange: e,
|
|
@@ -415,7 +415,7 @@ const ue = $(J), Q = t.memo((c) => {
|
|
|
415
415
|
disabled: a,
|
|
416
416
|
indeterminate: s,
|
|
417
417
|
className: d,
|
|
418
|
-
style:
|
|
418
|
+
style: u,
|
|
419
419
|
id: p
|
|
420
420
|
} = c, k = F(null), v = l || s;
|
|
421
421
|
j(() => {
|
|
@@ -452,7 +452,7 @@ const ue = $(J), Q = t.memo((c) => {
|
|
|
452
452
|
a ? "cursor-not-allowed opacity-50" : "cursor-pointer",
|
|
453
453
|
v ? "border-transparent bg-[var(--fibo-primary,#3B82F6)]" : "border-gray-300 bg-transparent"
|
|
454
454
|
),
|
|
455
|
-
style:
|
|
455
|
+
style: u,
|
|
456
456
|
"aria-hidden": !0
|
|
457
457
|
},
|
|
458
458
|
x
|
|
@@ -519,14 +519,14 @@ const pe = $(X), Y = t.memo((c) => {
|
|
|
519
519
|
name: a,
|
|
520
520
|
direction: s,
|
|
521
521
|
className: d,
|
|
522
|
-
style:
|
|
522
|
+
style: u
|
|
523
523
|
} = c, p = t.useId(), k = a || p;
|
|
524
524
|
return t.createElement(
|
|
525
525
|
"div",
|
|
526
526
|
{
|
|
527
527
|
role: "radiogroup",
|
|
528
528
|
className: L(`fibo-radio-group flex ${s === "vertical" ? "flex-col gap-2" : "flex-row gap-4"}`, d),
|
|
529
|
-
style:
|
|
529
|
+
style: u
|
|
530
530
|
},
|
|
531
531
|
e.map((v) => {
|
|
532
532
|
const x = l === v.value, E = v.disabled, _ = L(
|
|
@@ -607,7 +607,7 @@ const me = $(Z), ee = t.memo((c) => {
|
|
|
607
607
|
containerStyle: a,
|
|
608
608
|
label: s,
|
|
609
609
|
error: d,
|
|
610
|
-
...
|
|
610
|
+
...u
|
|
611
611
|
} = c;
|
|
612
612
|
return t.createElement(
|
|
613
613
|
"div",
|
|
@@ -615,7 +615,7 @@ const me = $(Z), ee = t.memo((c) => {
|
|
|
615
615
|
t.createElement("textarea", {
|
|
616
616
|
id: e,
|
|
617
617
|
className: "fibo-textarea-input w-full p-4 text-base bg-transparent outline-none relative z-10",
|
|
618
|
-
...
|
|
618
|
+
...u
|
|
619
619
|
}),
|
|
620
620
|
s && t.createElement(
|
|
621
621
|
"label",
|
|
@@ -689,7 +689,7 @@ class te extends D {
|
|
|
689
689
|
}
|
|
690
690
|
}
|
|
691
691
|
const be = $(te), re = t.memo((c) => {
|
|
692
|
-
const l = t.useId(), e = c.id || l, o = `${e}-listbox`, [a, s] = M(!1), [d,
|
|
692
|
+
const l = t.useId(), e = c.id || l, o = `${e}-listbox`, [a, s] = M(!1), [d, u] = M(0), p = F(null), {
|
|
693
693
|
containerClass: k,
|
|
694
694
|
containerStyle: v,
|
|
695
695
|
label: x,
|
|
@@ -702,8 +702,8 @@ const be = $(te), re = t.memo((c) => {
|
|
|
702
702
|
multiple: m
|
|
703
703
|
} = c;
|
|
704
704
|
j(() => {
|
|
705
|
-
const n = (
|
|
706
|
-
p.current && !p.current.contains(
|
|
705
|
+
const n = (h) => {
|
|
706
|
+
p.current && !p.current.contains(h.target) && s(!1);
|
|
707
707
|
};
|
|
708
708
|
return document.addEventListener("mousedown", n), () => document.removeEventListener("mousedown", n);
|
|
709
709
|
}, []);
|
|
@@ -712,18 +712,18 @@ const be = $(te), re = t.memo((c) => {
|
|
|
712
712
|
if (m)
|
|
713
713
|
Array.isArray(_) && _.length > 0 && (w = y.filter((n) => _.includes(n.value)).map((n) => n.label).join(", "));
|
|
714
714
|
else {
|
|
715
|
-
const n = y.find((
|
|
715
|
+
const n = y.find((h) => h.value === _);
|
|
716
716
|
w = n ? n.label : "";
|
|
717
717
|
}
|
|
718
718
|
const I = (n) => {
|
|
719
719
|
if (!S)
|
|
720
720
|
if (m) {
|
|
721
|
-
const
|
|
722
|
-
A > -1 ?
|
|
721
|
+
const h = Array.isArray(_) ? [..._] : [], A = h.indexOf(n);
|
|
722
|
+
A > -1 ? h.splice(A, 1) : h.push(n), g == null || g(h);
|
|
723
723
|
} else
|
|
724
724
|
g == null || g(n), s(!1);
|
|
725
725
|
}, C = (n) => {
|
|
726
|
-
y.length !== 0 &&
|
|
726
|
+
y.length !== 0 && u((h) => (h + n + y.length) % y.length);
|
|
727
727
|
}, z = (n) => {
|
|
728
728
|
if (!S)
|
|
729
729
|
switch (n.key) {
|
|
@@ -734,10 +734,10 @@ const be = $(te), re = t.memo((c) => {
|
|
|
734
734
|
n.preventDefault(), a ? C(-1) : s(!0);
|
|
735
735
|
break;
|
|
736
736
|
case "Home":
|
|
737
|
-
n.preventDefault(),
|
|
737
|
+
n.preventDefault(), u(0);
|
|
738
738
|
break;
|
|
739
739
|
case "End":
|
|
740
|
-
n.preventDefault(),
|
|
740
|
+
n.preventDefault(), u(Math.max(0, y.length - 1));
|
|
741
741
|
break;
|
|
742
742
|
case "Enter":
|
|
743
743
|
case " ":
|
|
@@ -795,8 +795,8 @@ const be = $(te), re = t.memo((c) => {
|
|
|
795
795
|
role: "listbox",
|
|
796
796
|
"aria-multiselectable": m || void 0,
|
|
797
797
|
className: "absolute z-50 w-full mt-1 bg-[var(--fibo-surface)] border border-[var(--fibo-outline)] rounded-md shadow-lg max-h-60 overflow-auto focus:outline-none"
|
|
798
|
-
}, y.map((n,
|
|
799
|
-
const A = b(n.value), T =
|
|
798
|
+
}, y.map((n, h) => {
|
|
799
|
+
const A = b(n.value), T = h === d;
|
|
800
800
|
return t.createElement("div", {
|
|
801
801
|
key: n.value,
|
|
802
802
|
id: `${o}-opt-${n.value}`,
|
|
@@ -804,7 +804,7 @@ const be = $(te), re = t.memo((c) => {
|
|
|
804
804
|
"aria-selected": A,
|
|
805
805
|
className: `px-4 py-2 cursor-pointer text-sm hover:bg-[var(--fibo-primary-container)] hover:text-[var(--fibo-on-primary-container)] flex items-center justify-between ${A || T ? "bg-[var(--fibo-primary-container)] text-[var(--fibo-on-primary-container)] font-medium" : "text-[var(--fibo-on-surface)]"}`,
|
|
806
806
|
onClick: () => I(n.value),
|
|
807
|
-
onMouseEnter: () => h
|
|
807
|
+
onMouseEnter: () => u(h)
|
|
808
808
|
}, [
|
|
809
809
|
t.createElement("span", { key: "label" }, n.label),
|
|
810
810
|
A && t.createElement("svg", {
|
|
@@ -878,7 +878,7 @@ class ae extends D {
|
|
|
878
878
|
}
|
|
879
879
|
}
|
|
880
880
|
const fe = $(ae), se = t.memo((c) => {
|
|
881
|
-
const l = t.useId(), e = c.id || l, o = `${e}-listbox`, [a, s] = M(!1), [d,
|
|
881
|
+
const l = t.useId(), e = c.id || l, o = `${e}-listbox`, [a, s] = M(!1), [d, u] = M(""), [p, k] = M(0), v = F(null), {
|
|
882
882
|
containerClass: x,
|
|
883
883
|
containerStyle: E,
|
|
884
884
|
label: _,
|
|
@@ -894,7 +894,7 @@ const fe = $(ae), se = t.memo((c) => {
|
|
|
894
894
|
j(() => {
|
|
895
895
|
if (!I) {
|
|
896
896
|
const i = g.find((N) => N.value === f);
|
|
897
|
-
i && !a && d !== i.label &&
|
|
897
|
+
i && !a && d !== i.label && u(i.label);
|
|
898
898
|
}
|
|
899
899
|
}, [f, g, a, I]);
|
|
900
900
|
const C = g.filter(
|
|
@@ -906,10 +906,10 @@ const fe = $(ae), se = t.memo((c) => {
|
|
|
906
906
|
const i = (N) => {
|
|
907
907
|
if (v.current && !v.current.contains(N.target))
|
|
908
908
|
if (s(!1), I)
|
|
909
|
-
|
|
909
|
+
u("");
|
|
910
910
|
else {
|
|
911
911
|
const B = g.find((R) => R.value === f);
|
|
912
|
-
|
|
912
|
+
u(B ? B.label : "");
|
|
913
913
|
}
|
|
914
914
|
};
|
|
915
915
|
return document.addEventListener("mousedown", i), () => document.removeEventListener("mousedown", i);
|
|
@@ -917,16 +917,16 @@ const fe = $(ae), se = t.memo((c) => {
|
|
|
917
917
|
const z = (i) => {
|
|
918
918
|
if (I) {
|
|
919
919
|
const N = Array.isArray(f) ? [...f] : [];
|
|
920
|
-
N.includes(i.value) || (N.push(i.value), m == null || m(N)),
|
|
920
|
+
N.includes(i.value) || (N.push(i.value), m == null || m(N)), u("");
|
|
921
921
|
} else
|
|
922
|
-
|
|
922
|
+
u(i.label), m == null || m(i.value), s(!1);
|
|
923
923
|
}, n = (i) => {
|
|
924
924
|
if (I && Array.isArray(f)) {
|
|
925
925
|
const N = f.filter((B) => B !== i);
|
|
926
926
|
m == null || m(N);
|
|
927
927
|
}
|
|
928
|
-
},
|
|
929
|
-
b == null || b(d), I ?
|
|
928
|
+
}, h = () => {
|
|
929
|
+
b == null || b(d), I ? u("") : s(!1);
|
|
930
930
|
}, A = (i) => I ? Array.isArray(f) && f.includes(i) : f === i, T = (i) => {
|
|
931
931
|
if (!w)
|
|
932
932
|
switch (i.key) {
|
|
@@ -937,7 +937,7 @@ const fe = $(ae), se = t.memo((c) => {
|
|
|
937
937
|
i.preventDefault(), a ? C.length && k((N) => (N - 1 + C.length) % C.length) : s(!0);
|
|
938
938
|
break;
|
|
939
939
|
case "Enter":
|
|
940
|
-
i.preventDefault(), C[p] ? z(C[p]) : d && b &&
|
|
940
|
+
i.preventDefault(), C[p] ? z(C[p]) : d && b && h();
|
|
941
941
|
break;
|
|
942
942
|
case "Escape":
|
|
943
943
|
i.preventDefault(), s(!1);
|
|
@@ -987,7 +987,7 @@ const fe = $(ae), se = t.memo((c) => {
|
|
|
987
987
|
placeholder: I && Array.isArray(f) && f.length > 0 ? "" : S || " ",
|
|
988
988
|
disabled: w,
|
|
989
989
|
onChange: (i) => {
|
|
990
|
-
|
|
990
|
+
u(i.target.value), a || s(!0);
|
|
991
991
|
},
|
|
992
992
|
onFocus: () => s(!0),
|
|
993
993
|
onKeyDown: T
|
|
@@ -1026,7 +1026,7 @@ const fe = $(ae), se = t.memo((c) => {
|
|
|
1026
1026
|
role: "option",
|
|
1027
1027
|
"aria-selected": !1,
|
|
1028
1028
|
className: "border-t border-[var(--fibo-outline)] px-4 py-2 cursor-pointer text-sm text-[var(--fibo-primary)] hover:bg-[var(--fibo-primary-container)] font-medium flex items-center",
|
|
1029
|
-
onClick:
|
|
1029
|
+
onClick: h
|
|
1030
1030
|
}, [
|
|
1031
1031
|
t.createElement("span", { key: "plus", className: "mr-1" }, "+"),
|
|
1032
1032
|
`Add "${d}"`
|
|
@@ -1103,8 +1103,8 @@ export {
|
|
|
1103
1103
|
de as B,
|
|
1104
1104
|
pe as C,
|
|
1105
1105
|
me as R,
|
|
1106
|
-
|
|
1107
|
-
|
|
1106
|
+
he as S,
|
|
1107
|
+
ue as T,
|
|
1108
1108
|
be as a,
|
|
1109
1109
|
fe as b,
|
|
1110
1110
|
xe as c
|
|
@@ -3,10 +3,10 @@ var U = Object.defineProperty;
|
|
|
3
3
|
var G = (n, s, e) => s in n ? U(n, s, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[s] = e;
|
|
4
4
|
var r = (n, s, e) => G(n, typeof s != "symbol" ? s + "" : s, e);
|
|
5
5
|
import t from "react";
|
|
6
|
-
import { w as C, x as F } from "./builder-
|
|
7
|
-
import { B as j } from "./index-
|
|
8
|
-
import { T as O } from "./index-
|
|
9
|
-
import { R as J } from "./index-
|
|
6
|
+
import { w as C, x as F } from "./builder-DTH8K7ph.js";
|
|
7
|
+
import { B as j } from "./index-DPQMrIgq.js";
|
|
8
|
+
import { T as O } from "./index-z5BF-Y8H.js";
|
|
9
|
+
import { R as J } from "./index-DkRkbmmY.js";
|
|
10
10
|
import { jsxs as $, jsx as f } from "react/jsx-runtime";
|
|
11
11
|
const K = ({ size: n }) => t.createElement(
|
|
12
12
|
"svg",
|
|
@@ -3,7 +3,7 @@ var m = Object.defineProperty;
|
|
|
3
3
|
var p = (e, t, s) => t in e ? m(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s;
|
|
4
4
|
var r = (e, t, s) => p(e, typeof t != "symbol" ? t + "" : t, s);
|
|
5
5
|
import o from "react";
|
|
6
|
-
import { w as a, x as u } from "./builder-
|
|
6
|
+
import { w as a, x as u } from "./builder-DTH8K7ph.js";
|
|
7
7
|
class g extends u {
|
|
8
8
|
constructor() {
|
|
9
9
|
super(...arguments);
|
|
@@ -3,10 +3,10 @@ var G = Object.defineProperty;
|
|
|
3
3
|
var X = (n, s, e) => s in n ? G(n, s, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[s] = e;
|
|
4
4
|
var r = (n, s, e) => X(n, typeof s != "symbol" ? s + "" : s, e);
|
|
5
5
|
import i, { useState as V, useRef as D, useLayoutEffect as q } from "react";
|
|
6
|
-
import { w as _, x as b, I as J, G as F, P as K } from "./builder-
|
|
6
|
+
import { w as _, x as b, I as J, G as F, P as K } from "./builder-DTH8K7ph.js";
|
|
7
7
|
import { P as W } from "./PluginManager-D5-ApsSN.js";
|
|
8
|
-
import { R as Q, I as U } from "./index-
|
|
9
|
-
import { T as ee } from "./index-
|
|
8
|
+
import { R as Q, I as U } from "./index-DkRkbmmY.js";
|
|
9
|
+
import { T as ee } from "./index-z5BF-Y8H.js";
|
|
10
10
|
import { e as te, L as ie } from "./Link-ElmaMZB8.js";
|
|
11
11
|
class se extends b {
|
|
12
12
|
build() {
|
|
@@ -3,10 +3,10 @@ var oe = Object.defineProperty;
|
|
|
3
3
|
var le = (n, s, e) => s in n ? oe(n, s, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[s] = e;
|
|
4
4
|
var i = (n, s, e) => le(n, typeof s != "symbol" ? s + "" : s, e);
|
|
5
5
|
import t, { useState as D, useRef as L, useLayoutEffect as Z, useEffect as ce } from "react";
|
|
6
|
-
import { w, x as I, G as T, H as q } from "./builder-
|
|
7
|
-
import { B as C } from "./index-
|
|
6
|
+
import { w, x as I, G as T, H as q } from "./builder-DTH8K7ph.js";
|
|
7
|
+
import { B as C } from "./index-DPQMrIgq.js";
|
|
8
8
|
import { t as de } from "./bundle-mjs-wppB-TKB.js";
|
|
9
|
-
import { T as me } from "./index-
|
|
9
|
+
import { T as me } from "./index-z5BF-Y8H.js";
|
|
10
10
|
const he = t.memo((n) => {
|
|
11
11
|
const { text: s, subtitle: e, number: r, color: d, className: p, style: c, children: u, ...g } = n;
|
|
12
12
|
return t.createElement(
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
var f = Object.defineProperty;
|
|
3
|
+
var b = (i, e, t) => e in i ? f(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t;
|
|
4
|
+
var a = (i, e, t) => b(i, typeof e != "symbol" ? e + "" : e, t);
|
|
5
|
+
import o from "react";
|
|
6
|
+
import { w as x, x as c } from "./builder-DTH8K7ph.js";
|
|
7
|
+
import { F as g } from "./FineGrain-CLKZ-Sv6.js";
|
|
8
|
+
const p = {
|
|
9
|
+
h1: {
|
|
10
|
+
fontSize: "var(--fibo-text-h1-size, 2.25rem)",
|
|
11
|
+
fontWeight: "var(--fibo-text-h1-weight, 700)",
|
|
12
|
+
letterSpacing: "var(--fibo-text-h1-tracking, -0.025em)",
|
|
13
|
+
lineHeight: "var(--fibo-text-h1-height, 1.2)",
|
|
14
|
+
color: "var(--fibo-text-h1-color, inherit)"
|
|
15
|
+
},
|
|
16
|
+
h2: {
|
|
17
|
+
fontSize: "var(--fibo-text-h2-size, 1.875rem)",
|
|
18
|
+
fontWeight: "var(--fibo-text-h2-weight, 700)",
|
|
19
|
+
letterSpacing: "var(--fibo-text-h2-tracking, -0.025em)",
|
|
20
|
+
lineHeight: "var(--fibo-text-h2-height, 1.25)",
|
|
21
|
+
color: "var(--fibo-text-h2-color, inherit)"
|
|
22
|
+
},
|
|
23
|
+
h3: {
|
|
24
|
+
fontSize: "var(--fibo-text-h3-size, 1.5rem)",
|
|
25
|
+
fontWeight: "var(--fibo-text-h3-weight, 600)",
|
|
26
|
+
letterSpacing: "var(--fibo-text-h3-tracking, -0.02em)",
|
|
27
|
+
lineHeight: "var(--fibo-text-h3-height, 1.3)",
|
|
28
|
+
color: "var(--fibo-text-h3-color, inherit)"
|
|
29
|
+
},
|
|
30
|
+
h4: {
|
|
31
|
+
fontSize: "var(--fibo-text-h4-size, 1.25rem)",
|
|
32
|
+
fontWeight: "var(--fibo-text-h4-weight, 600)",
|
|
33
|
+
lineHeight: "var(--fibo-text-h4-height, 1.35)",
|
|
34
|
+
color: "var(--fibo-text-h4-color, inherit)"
|
|
35
|
+
},
|
|
36
|
+
h5: {
|
|
37
|
+
fontSize: "var(--fibo-text-h5-size, 1.125rem)",
|
|
38
|
+
fontWeight: "var(--fibo-text-h5-weight, 600)",
|
|
39
|
+
lineHeight: "var(--fibo-text-h5-height, 1.4)",
|
|
40
|
+
color: "var(--fibo-text-h5-color, inherit)"
|
|
41
|
+
},
|
|
42
|
+
h6: {
|
|
43
|
+
fontSize: "var(--fibo-text-h6-size, 1rem)",
|
|
44
|
+
fontWeight: "var(--fibo-text-h6-weight, 600)",
|
|
45
|
+
lineHeight: "var(--fibo-text-h6-height, 1.45)",
|
|
46
|
+
color: "var(--fibo-text-h6-color, inherit)"
|
|
47
|
+
},
|
|
48
|
+
body: {
|
|
49
|
+
fontSize: "var(--fibo-text-body-size, 1rem)",
|
|
50
|
+
fontWeight: "var(--fibo-text-body-weight, 400)",
|
|
51
|
+
lineHeight: "var(--fibo-text-body-height, 1.5)",
|
|
52
|
+
color: "var(--fibo-text-body-color, inherit)"
|
|
53
|
+
},
|
|
54
|
+
caption: {
|
|
55
|
+
fontSize: "var(--fibo-text-caption-size, 0.875rem)",
|
|
56
|
+
fontWeight: "var(--fibo-text-caption-weight, 400)",
|
|
57
|
+
lineHeight: "var(--fibo-text-caption-height, 1.4)",
|
|
58
|
+
color: "var(--fibo-text-caption-color, inherit)"
|
|
59
|
+
},
|
|
60
|
+
label: {
|
|
61
|
+
fontSize: "var(--fibo-text-label-size, 0.875rem)",
|
|
62
|
+
fontWeight: "var(--fibo-text-label-weight, 500)",
|
|
63
|
+
letterSpacing: "var(--fibo-text-label-tracking, 0.01em)",
|
|
64
|
+
lineHeight: "var(--fibo-text-label-height, 1.4)",
|
|
65
|
+
color: "var(--fibo-text-label-color, inherit)"
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
function n(i, e) {
|
|
69
|
+
return {
|
|
70
|
+
margin: 0,
|
|
71
|
+
overflowWrap: "anywhere",
|
|
72
|
+
wordBreak: "break-word",
|
|
73
|
+
maxWidth: "100%",
|
|
74
|
+
...p[i],
|
|
75
|
+
...e
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
const m = o.memo((i) => {
|
|
79
|
+
const { text: e, type: t, className: h, style: r, ...s } = i, l = {
|
|
80
|
+
h1: "h1",
|
|
81
|
+
h2: "h2",
|
|
82
|
+
h3: "h3",
|
|
83
|
+
h4: "h4",
|
|
84
|
+
h5: "h5",
|
|
85
|
+
h6: "h6",
|
|
86
|
+
body: "p",
|
|
87
|
+
caption: "span",
|
|
88
|
+
label: "label"
|
|
89
|
+
};
|
|
90
|
+
return o.createElement(
|
|
91
|
+
l[t],
|
|
92
|
+
{
|
|
93
|
+
className: `fibo-text fibo-text-${t} min-w-0 ${h}`,
|
|
94
|
+
style: n(t, r),
|
|
95
|
+
...s
|
|
96
|
+
},
|
|
97
|
+
e
|
|
98
|
+
);
|
|
99
|
+
});
|
|
100
|
+
class v extends c {
|
|
101
|
+
constructor(t = "") {
|
|
102
|
+
super();
|
|
103
|
+
a(this, "_text", "");
|
|
104
|
+
a(this, "_type", "body");
|
|
105
|
+
this.text(t);
|
|
106
|
+
}
|
|
107
|
+
text(t) {
|
|
108
|
+
return this._text = t, this;
|
|
109
|
+
}
|
|
110
|
+
type(t) {
|
|
111
|
+
return this._type = t, this;
|
|
112
|
+
}
|
|
113
|
+
variant(t) {
|
|
114
|
+
return this._type = t, this;
|
|
115
|
+
}
|
|
116
|
+
nowrap() {
|
|
117
|
+
return this._classNames.push("whitespace-nowrap"), this;
|
|
118
|
+
}
|
|
119
|
+
mono() {
|
|
120
|
+
return this._classNames.push("font-mono"), this;
|
|
121
|
+
}
|
|
122
|
+
muted() {
|
|
123
|
+
return this._style = { ...this._style, color: "#9a9a9a" }, this;
|
|
124
|
+
}
|
|
125
|
+
build() {
|
|
126
|
+
const t = {
|
|
127
|
+
h1: "h1",
|
|
128
|
+
h2: "h2",
|
|
129
|
+
h3: "h3",
|
|
130
|
+
h4: "h4",
|
|
131
|
+
h5: "h5",
|
|
132
|
+
h6: "h6",
|
|
133
|
+
body: "p",
|
|
134
|
+
caption: "span",
|
|
135
|
+
label: "label"
|
|
136
|
+
};
|
|
137
|
+
if (typeof this._text == "function") {
|
|
138
|
+
const r = this._text;
|
|
139
|
+
return o.createElement(g, {
|
|
140
|
+
compute: r,
|
|
141
|
+
as: t[this._type],
|
|
142
|
+
className: `fibo-text fibo-text-${this._type} min-w-0 ${this.getClassName()}`,
|
|
143
|
+
style: n(this._type, this.getStyle()),
|
|
144
|
+
...this._props
|
|
145
|
+
});
|
|
146
|
+
}
|
|
147
|
+
const h = {
|
|
148
|
+
text: this._text,
|
|
149
|
+
type: this._type,
|
|
150
|
+
className: this.getClassName(),
|
|
151
|
+
style: this.getStyle(),
|
|
152
|
+
...this._props
|
|
153
|
+
};
|
|
154
|
+
return o.createElement(m, h);
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
const z = x(v);
|
|
158
|
+
export {
|
|
159
|
+
z as T
|
|
160
|
+
};
|