fiboui 2.4.4 → 2.6.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.
@@ -1,160 +0,0 @@
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 { D as c, E as x } from "./builder-B5cebEWZ.js";
7
- import { F as g } from "./FineGrain-CvcJ5OxF.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 x {
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 = c(v);
158
- export {
159
- z as T
160
- };