fiboui 2.0.0 → 2.2.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.
@@ -0,0 +1,104 @@
1
+ "use client";
2
+ var p = Object.defineProperty;
3
+ var m = (i, e, t) => e in i ? p(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t;
4
+ var o = (i, e, t) => m(i, typeof e != "symbol" ? e + "" : e, t);
5
+ import s from "react";
6
+ import { v as c, F as f } from "./builder-KLTu7nAI.js";
7
+ import { F as g } from "./FineGrain-6w615KQw.js";
8
+ const y = {
9
+ h1: { fontSize: "2.25rem", fontWeight: 700, letterSpacing: "-0.025em", lineHeight: 1.2 },
10
+ h2: { fontSize: "1.875rem", fontWeight: 700, letterSpacing: "-0.025em", lineHeight: 1.25 },
11
+ h3: { fontSize: "1.5rem", fontWeight: 600, letterSpacing: "-0.02em", lineHeight: 1.3 },
12
+ h4: { fontSize: "1.25rem", fontWeight: 600, lineHeight: 1.35 },
13
+ h5: { fontSize: "1.125rem", fontWeight: 600, lineHeight: 1.4 },
14
+ h6: { fontSize: "1rem", fontWeight: 600, lineHeight: 1.45 },
15
+ body: { fontSize: "1rem", fontWeight: 400, lineHeight: 1.5 },
16
+ caption: { fontSize: "0.875rem", fontWeight: 400, lineHeight: 1.4 },
17
+ label: { fontSize: "0.875rem", fontWeight: 500, lineHeight: 1.4 }
18
+ };
19
+ function r(i, e) {
20
+ return { margin: 0, ...y[i], ...e };
21
+ }
22
+ const u = s.memo((i) => {
23
+ const { text: e, type: t, className: h, style: n, ...a } = i, l = {
24
+ h1: "h1",
25
+ h2: "h2",
26
+ h3: "h3",
27
+ h4: "h4",
28
+ h5: "h5",
29
+ h6: "h6",
30
+ body: "p",
31
+ caption: "span",
32
+ label: "label"
33
+ };
34
+ return s.createElement(
35
+ l[t],
36
+ {
37
+ className: `fibo-text fibo-text-${t} ${h}`,
38
+ style: r(t, n),
39
+ ...a
40
+ },
41
+ e
42
+ );
43
+ });
44
+ class x extends f {
45
+ constructor(t = "") {
46
+ super();
47
+ o(this, "_text", "");
48
+ o(this, "_type", "body");
49
+ this.text(t);
50
+ }
51
+ text(t) {
52
+ return this._text = t, this;
53
+ }
54
+ type(t) {
55
+ return this._type = t, this;
56
+ }
57
+ variant(t) {
58
+ return this._type = t, this;
59
+ }
60
+ nowrap() {
61
+ return this._classNames.push("whitespace-nowrap"), this;
62
+ }
63
+ mono() {
64
+ return this._classNames.push("font-mono"), this;
65
+ }
66
+ muted() {
67
+ return this._style = { ...this._style, color: "#9a9a9a" }, this;
68
+ }
69
+ build() {
70
+ const t = {
71
+ h1: "h1",
72
+ h2: "h2",
73
+ h3: "h3",
74
+ h4: "h4",
75
+ h5: "h5",
76
+ h6: "h6",
77
+ body: "p",
78
+ caption: "span",
79
+ label: "label"
80
+ };
81
+ if (typeof this._text == "function") {
82
+ const n = this._text;
83
+ return s.createElement(g, {
84
+ compute: n,
85
+ as: t[this._type],
86
+ className: `fibo-text fibo-text-${this._type} ${this.getClassName()}`,
87
+ style: r(this._type, this.getStyle()),
88
+ ...this._props
89
+ });
90
+ }
91
+ const h = {
92
+ text: this._text,
93
+ type: this._type,
94
+ className: this.getClassName(),
95
+ style: this.getStyle(),
96
+ ...this._props
97
+ };
98
+ return s.createElement(u, h);
99
+ }
100
+ }
101
+ const z = c(x);
102
+ export {
103
+ z as T
104
+ };
@@ -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 { h as a, F as u } from "./builder-DjLYXkXu.js";
6
+ import { v as a, F as u } from "./builder-KLTu7nAI.js";
7
7
  class g extends u {
8
8
  constructor() {
9
9
  super(...arguments);