fiboui 2.4.3 → 2.5.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 +195 -144
- package/dist/Link-DU8XI2Na.js +50 -0
- package/dist/{PluginManager-D5-ApsSN.js → PluginManager-BRjgOLVa.js} +5 -6
- package/dist/client-C5fy1-Lh.js +10555 -0
- package/dist/content.js +7 -8
- package/dist/core.js +60 -60
- package/dist/{effects-CnevV566.js → effects-D16XdB_d.js} +0 -1
- package/dist/{index-DRVdVimz.js → index-BLBoIYdN.js} +40 -43
- package/dist/index-CL2Ecds4.js +455 -0
- package/dist/index-CaC2tQbt.js +604 -0
- package/dist/{index-BMIo5j9Y.js → index-CaDcYvIh.js} +1 -2
- package/dist/{index-DGQVwcWx.js → index-DVECnj1z.js} +136 -362
- package/dist/index.d.ts +44201 -42913
- package/dist/index.js +1519 -1094
- package/dist/interactive.js +9 -9
- package/dist/layout.js +13 -13
- package/dist/mount-jsbS9qm4.js +135 -0
- package/dist/navigation.js +9 -10
- package/dist/{builder-B5cebEWZ.js → server.js} +4463 -967
- package/dist/structure.js +12 -13
- package/dist/style.css +1 -1
- package/dist/style.js +1 -1
- package/dist/theme.js +15 -17
- package/package.json +9 -4
- package/dist/FineGrain-CvcJ5OxF.js +0 -29
- package/dist/Link-ElmaMZB8.js +0 -89
- package/dist/Router-BwbaHooU.js +0 -398
- package/dist/bundle-mjs-wppB-TKB.js +0 -2760
- package/dist/index-BxH8dhoT.js +0 -1112
- package/dist/index-DbaNIwWW.js +0 -160
- package/dist/index-MeDbhMEg.js +0 -1031
- package/dist/index-orKQGpHl.js +0 -34
- package/dist/mount-DbMVakA4.js +0 -358
- package/dist/provider-BTNE3N5g.js +0 -44
- package/dist/themeData-Dtm0M_mF.js +0 -441
|
@@ -0,0 +1,455 @@
|
|
|
1
|
+
var v = Object.defineProperty;
|
|
2
|
+
var $ = (i, r, e) => r in i ? v(i, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[r] = e;
|
|
3
|
+
var o = (i, r, e) => $(i, typeof r != "symbol" ? r + "" : r, e);
|
|
4
|
+
import t from "react";
|
|
5
|
+
import { at as b, au as _, a4 as E, az as x } from "./client-C5fy1-Lh.js";
|
|
6
|
+
const w = t.memo((i) => {
|
|
7
|
+
const { text: r, subtitle: e, number: n, color: c, className: m, style: d, children: p, ...u } = i;
|
|
8
|
+
return t.createElement(
|
|
9
|
+
"div",
|
|
10
|
+
{
|
|
11
|
+
className: `rounded-[24px] shadow-[0_8px_30px_rgb(0,0,0,0.04)] hover:shadow-[0_8px_30px_rgb(0,0,0,0.08)] transition-shadow duration-300 border-none p-4 ${m || ""}`,
|
|
12
|
+
style: { backgroundColor: "#ffffff", ...d },
|
|
13
|
+
...u
|
|
14
|
+
},
|
|
15
|
+
t.createElement(
|
|
16
|
+
"div",
|
|
17
|
+
{ className: "flex flex-col gap-2" },
|
|
18
|
+
r && t.createElement(
|
|
19
|
+
"h3",
|
|
20
|
+
{
|
|
21
|
+
className: "font-semibold text-[var(--fibo-on-surface-variant)] text-sm uppercase tracking-wide"
|
|
22
|
+
},
|
|
23
|
+
r
|
|
24
|
+
),
|
|
25
|
+
n && t.createElement(
|
|
26
|
+
"p",
|
|
27
|
+
{
|
|
28
|
+
className: "font-bold text-[var(--fibo-on-surface)] text-3xl"
|
|
29
|
+
},
|
|
30
|
+
n
|
|
31
|
+
),
|
|
32
|
+
e && t.createElement(
|
|
33
|
+
"p",
|
|
34
|
+
{
|
|
35
|
+
className: "text-[var(--fibo-on-surface-variant)] text-xs"
|
|
36
|
+
},
|
|
37
|
+
e
|
|
38
|
+
),
|
|
39
|
+
...p
|
|
40
|
+
)
|
|
41
|
+
);
|
|
42
|
+
});
|
|
43
|
+
class C extends _ {
|
|
44
|
+
constructor() {
|
|
45
|
+
super(...arguments);
|
|
46
|
+
o(this, "_text", "");
|
|
47
|
+
o(this, "_subtitle");
|
|
48
|
+
o(this, "_number");
|
|
49
|
+
o(this, "_color");
|
|
50
|
+
}
|
|
51
|
+
text(e) {
|
|
52
|
+
return this._text = e, this;
|
|
53
|
+
}
|
|
54
|
+
subtitle(e) {
|
|
55
|
+
return this._subtitle = e, this;
|
|
56
|
+
}
|
|
57
|
+
number(e) {
|
|
58
|
+
return this._number = e, this;
|
|
59
|
+
}
|
|
60
|
+
color(e) {
|
|
61
|
+
return this._color = e, this;
|
|
62
|
+
}
|
|
63
|
+
build() {
|
|
64
|
+
const e = {
|
|
65
|
+
green: "border-l-green-500",
|
|
66
|
+
orange: "border-l-orange-500",
|
|
67
|
+
red: "border-l-red-500",
|
|
68
|
+
blue: "border-l-blue-500",
|
|
69
|
+
purple: "border-l-purple-500"
|
|
70
|
+
}, n = [
|
|
71
|
+
"fibo-card",
|
|
72
|
+
this._color ? `border-l-4 ${e[this._color]}` : "",
|
|
73
|
+
...this._classNames
|
|
74
|
+
].filter(Boolean).join(" "), c = {
|
|
75
|
+
text: this._text,
|
|
76
|
+
subtitle: this._subtitle,
|
|
77
|
+
number: this._number,
|
|
78
|
+
color: this._color,
|
|
79
|
+
className: n,
|
|
80
|
+
style: this.getStyle(),
|
|
81
|
+
children: this.processChildren(),
|
|
82
|
+
...this._props
|
|
83
|
+
};
|
|
84
|
+
return t.createElement(w, c);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
const L = b(C), S = t.memo((i) => {
|
|
88
|
+
const {
|
|
89
|
+
data: r,
|
|
90
|
+
columns: e,
|
|
91
|
+
variant: n,
|
|
92
|
+
density: c,
|
|
93
|
+
striped: m,
|
|
94
|
+
width: d,
|
|
95
|
+
className: p,
|
|
96
|
+
style: u
|
|
97
|
+
} = i, g = {
|
|
98
|
+
width: "100%",
|
|
99
|
+
borderCollapse: "separate",
|
|
100
|
+
borderSpacing: "0",
|
|
101
|
+
...u
|
|
102
|
+
};
|
|
103
|
+
d && (g.width = typeof d == "number" ? `${d}px` : d);
|
|
104
|
+
const f = n === "clean" ? ["bg-white", "rounded-2xl", "border", "border-gray-100", "overflow-hidden", "shadow-sm"] : [], s = {
|
|
105
|
+
compact: "10px 16px",
|
|
106
|
+
standard: "16px 24px",
|
|
107
|
+
relaxed: "24px 32px"
|
|
108
|
+
}[c];
|
|
109
|
+
return E().className(p).classNames(f).children(
|
|
110
|
+
t.createElement("table", { style: g }, [
|
|
111
|
+
t.createElement(
|
|
112
|
+
"thead",
|
|
113
|
+
{ key: "thead", className: "bg-gray-50/50" },
|
|
114
|
+
t.createElement(
|
|
115
|
+
"tr",
|
|
116
|
+
{},
|
|
117
|
+
e.map(
|
|
118
|
+
(a, h) => t.createElement("th", {
|
|
119
|
+
key: String(a.accessor ?? a.header ?? h),
|
|
120
|
+
scope: "col",
|
|
121
|
+
style: {
|
|
122
|
+
textAlign: a.align || "left",
|
|
123
|
+
padding: s,
|
|
124
|
+
width: a.width
|
|
125
|
+
},
|
|
126
|
+
className: "text-xs font-bold text-gray-400 uppercase tracking-widest"
|
|
127
|
+
}, a.header)
|
|
128
|
+
)
|
|
129
|
+
)
|
|
130
|
+
),
|
|
131
|
+
t.createElement(
|
|
132
|
+
"tbody",
|
|
133
|
+
{ key: "tbody" },
|
|
134
|
+
r.map(
|
|
135
|
+
(a, h) => t.createElement(
|
|
136
|
+
"tr",
|
|
137
|
+
{
|
|
138
|
+
key: (a == null ? void 0 : a.id) ?? (a == null ? void 0 : a.key) ?? h,
|
|
139
|
+
className: `group transition-all duration-200 border-b border-gray-50 last:border-b-0 ${m && h % 2 !== 0 ? "bg-gray-50/30" : "bg-transparent"} ${n === "clean" ? "hover:bg-white hover:shadow-md hover:scale-[1.002] hover:z-10 relative" : "hover:bg-gray-50/50"}`
|
|
140
|
+
},
|
|
141
|
+
e.map(
|
|
142
|
+
(y, N) => t.createElement(
|
|
143
|
+
"td",
|
|
144
|
+
{
|
|
145
|
+
key: N,
|
|
146
|
+
style: {
|
|
147
|
+
textAlign: y.align || "left",
|
|
148
|
+
padding: s,
|
|
149
|
+
borderTop: n === "default" ? "1px solid #F3F4F6" : "none"
|
|
150
|
+
},
|
|
151
|
+
className: "text-sm text-gray-900 font-medium"
|
|
152
|
+
},
|
|
153
|
+
y.render ? y.render(a) : y.accessor ? a[y.accessor] : null
|
|
154
|
+
)
|
|
155
|
+
)
|
|
156
|
+
)
|
|
157
|
+
)
|
|
158
|
+
)
|
|
159
|
+
])
|
|
160
|
+
).build();
|
|
161
|
+
});
|
|
162
|
+
class B extends _ {
|
|
163
|
+
constructor() {
|
|
164
|
+
super(...arguments);
|
|
165
|
+
o(this, "_data", []);
|
|
166
|
+
o(this, "_columns", []);
|
|
167
|
+
o(this, "_variant", "clean");
|
|
168
|
+
o(this, "_density", "standard");
|
|
169
|
+
o(this, "_striped", !1);
|
|
170
|
+
o(this, "_width");
|
|
171
|
+
}
|
|
172
|
+
data(e) {
|
|
173
|
+
return this._data = e, this;
|
|
174
|
+
}
|
|
175
|
+
columns(e) {
|
|
176
|
+
return this._columns = e, this;
|
|
177
|
+
}
|
|
178
|
+
variant(e) {
|
|
179
|
+
return this._variant = e, this;
|
|
180
|
+
}
|
|
181
|
+
density(e) {
|
|
182
|
+
return this._density = e, this;
|
|
183
|
+
}
|
|
184
|
+
striped(e = !0) {
|
|
185
|
+
return this._striped = e, this;
|
|
186
|
+
}
|
|
187
|
+
width(e) {
|
|
188
|
+
return this._width = e, this;
|
|
189
|
+
}
|
|
190
|
+
build() {
|
|
191
|
+
const e = {
|
|
192
|
+
data: this._data,
|
|
193
|
+
columns: this._columns,
|
|
194
|
+
variant: this._variant,
|
|
195
|
+
density: this._density,
|
|
196
|
+
striped: this._striped,
|
|
197
|
+
width: this._width,
|
|
198
|
+
className: this.getClassName(),
|
|
199
|
+
style: this.getStyle()
|
|
200
|
+
};
|
|
201
|
+
return t.createElement(S, e);
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
const M = b(B), k = t.memo((i) => {
|
|
205
|
+
const { items: r, className: e, style: n, ...c } = i, m = r.map(
|
|
206
|
+
(d, p) => t.createElement(
|
|
207
|
+
"span",
|
|
208
|
+
{
|
|
209
|
+
key: d.title ? `${d.title}-${p}` : `tag-${p}`,
|
|
210
|
+
className: "fibo-tag"
|
|
211
|
+
},
|
|
212
|
+
d.title
|
|
213
|
+
)
|
|
214
|
+
);
|
|
215
|
+
return t.createElement(
|
|
216
|
+
"div",
|
|
217
|
+
{
|
|
218
|
+
className: e,
|
|
219
|
+
style: n,
|
|
220
|
+
...c
|
|
221
|
+
},
|
|
222
|
+
...m
|
|
223
|
+
);
|
|
224
|
+
});
|
|
225
|
+
class G extends _ {
|
|
226
|
+
constructor(e = []) {
|
|
227
|
+
super();
|
|
228
|
+
o(this, "_items", []);
|
|
229
|
+
this._items = e;
|
|
230
|
+
}
|
|
231
|
+
items(e) {
|
|
232
|
+
return this._items = e, this;
|
|
233
|
+
}
|
|
234
|
+
build() {
|
|
235
|
+
const e = ["fibo-tags", "flex", "gap-2", "flex-wrap", ...this._classNames].filter(Boolean).join(" "), n = {
|
|
236
|
+
items: this._items,
|
|
237
|
+
className: e,
|
|
238
|
+
style: this.getStyle(),
|
|
239
|
+
...this._props
|
|
240
|
+
};
|
|
241
|
+
return t.createElement(k, n);
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
const V = b(G), I = t.memo((i) => {
|
|
245
|
+
const { status: r, title: e, subtitle: n, className: c, style: m, ...d } = i;
|
|
246
|
+
return t.createElement(
|
|
247
|
+
"div",
|
|
248
|
+
{
|
|
249
|
+
className: c,
|
|
250
|
+
style: m,
|
|
251
|
+
...d
|
|
252
|
+
},
|
|
253
|
+
t.createElement(
|
|
254
|
+
"div",
|
|
255
|
+
{ className: "flex flex-col gap-1" },
|
|
256
|
+
e && t.createElement(
|
|
257
|
+
"h4",
|
|
258
|
+
{
|
|
259
|
+
className: "font-semibold text-sm uppercase tracking-wide opacity-90"
|
|
260
|
+
},
|
|
261
|
+
e
|
|
262
|
+
),
|
|
263
|
+
n && t.createElement(
|
|
264
|
+
"p",
|
|
265
|
+
{
|
|
266
|
+
className: "opacity-80 text-sm"
|
|
267
|
+
},
|
|
268
|
+
n
|
|
269
|
+
)
|
|
270
|
+
)
|
|
271
|
+
);
|
|
272
|
+
});
|
|
273
|
+
class T extends _ {
|
|
274
|
+
constructor(e = "") {
|
|
275
|
+
super();
|
|
276
|
+
o(this, "_status", "info");
|
|
277
|
+
o(this, "_title", "");
|
|
278
|
+
o(this, "_subtitle");
|
|
279
|
+
this._title = e;
|
|
280
|
+
}
|
|
281
|
+
status(e) {
|
|
282
|
+
return this._status = e, this;
|
|
283
|
+
}
|
|
284
|
+
title(e) {
|
|
285
|
+
return this._title = e, this;
|
|
286
|
+
}
|
|
287
|
+
subtitle(e) {
|
|
288
|
+
return this._subtitle = e, this;
|
|
289
|
+
}
|
|
290
|
+
build() {
|
|
291
|
+
const n = [
|
|
292
|
+
"fibo-banner",
|
|
293
|
+
`fibo-banner-${this._status}`,
|
|
294
|
+
...this._classNames
|
|
295
|
+
].filter(Boolean).join(" "), c = {
|
|
296
|
+
status: this._status,
|
|
297
|
+
title: this._title,
|
|
298
|
+
subtitle: this._subtitle,
|
|
299
|
+
className: n,
|
|
300
|
+
style: this.getStyle(),
|
|
301
|
+
...this._props
|
|
302
|
+
};
|
|
303
|
+
return t.createElement(I, c);
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
const q = b(T), j = t.memo((i) => {
|
|
307
|
+
const {
|
|
308
|
+
children: r,
|
|
309
|
+
variant: e = "standard",
|
|
310
|
+
columns: n = 1,
|
|
311
|
+
gap: c = "md",
|
|
312
|
+
className: m,
|
|
313
|
+
style: d,
|
|
314
|
+
...p
|
|
315
|
+
} = i, u = (l) => typeof l == "number" ? "" : {
|
|
316
|
+
none: "gap-0",
|
|
317
|
+
sm: "gap-2",
|
|
318
|
+
md: "gap-4",
|
|
319
|
+
lg: "gap-6",
|
|
320
|
+
xl: "gap-8"
|
|
321
|
+
}[l] || "gap-4", g = (l) => {
|
|
322
|
+
if (typeof l == "number") return l + "px";
|
|
323
|
+
}, f = (l) => {
|
|
324
|
+
if (typeof l == "number") return `grid-cols-${l}`;
|
|
325
|
+
let s = [];
|
|
326
|
+
return l.sm && s.push(`sm:grid-cols-${l.sm}`), l.md && s.push(`md:grid-cols-${l.md}`), l.lg && s.push(`lg:grid-cols-${l.lg}`), l.xl && s.push(`xl:grid-cols-${l.xl}`), s.join(" ") || "grid-cols-1";
|
|
327
|
+
};
|
|
328
|
+
if (e === "bento") {
|
|
329
|
+
const l = [
|
|
330
|
+
{ col: 2, row: 2 },
|
|
331
|
+
{ col: 1, row: 1 },
|
|
332
|
+
{ col: 1, row: 1 },
|
|
333
|
+
{ col: 1, row: 2 },
|
|
334
|
+
{ col: 2, row: 1 }
|
|
335
|
+
];
|
|
336
|
+
return t.createElement("div", {
|
|
337
|
+
className: `grid ${f(n)} ${u(c)} ${m}`,
|
|
338
|
+
style: {
|
|
339
|
+
gap: g(c),
|
|
340
|
+
gridAutoFlow: "dense",
|
|
341
|
+
...d
|
|
342
|
+
},
|
|
343
|
+
...p
|
|
344
|
+
}, t.Children.map(r, (s, a) => {
|
|
345
|
+
if (t.isValidElement(s) && typeof s.props.className == "string" && s.props.className.includes("col-span"))
|
|
346
|
+
return s;
|
|
347
|
+
const h = l[a % l.length];
|
|
348
|
+
return t.createElement("div", {
|
|
349
|
+
key: x(s, a),
|
|
350
|
+
style: { gridColumn: `span ${h.col}`, gridRow: `span ${h.row}` }
|
|
351
|
+
}, s);
|
|
352
|
+
}));
|
|
353
|
+
}
|
|
354
|
+
if (e === "masonry") {
|
|
355
|
+
const l = (s) => {
|
|
356
|
+
if (typeof s == "number") return `columns-${s}`;
|
|
357
|
+
let a = [];
|
|
358
|
+
return s.sm && a.push(`sm:columns-${s.sm}`), s.md && a.push(`md:columns-${s.md}`), s.lg && a.push(`lg:columns-${s.lg}`), s.xl && a.push(`xl:columns-${s.xl}`), a.join(" ") || "columns-1";
|
|
359
|
+
};
|
|
360
|
+
return t.createElement("div", {
|
|
361
|
+
className: `${l(n)} ${u(c)} space-y-4 ${m}`,
|
|
362
|
+
style: {
|
|
363
|
+
columnGap: g(c),
|
|
364
|
+
...d
|
|
365
|
+
},
|
|
366
|
+
...p
|
|
367
|
+
}, t.Children.map(
|
|
368
|
+
r,
|
|
369
|
+
(s, a) => t.createElement("div", {
|
|
370
|
+
key: x(s, a),
|
|
371
|
+
className: "break-inside-avoid mb-4"
|
|
372
|
+
}, s)
|
|
373
|
+
));
|
|
374
|
+
}
|
|
375
|
+
return t.createElement("div", {
|
|
376
|
+
className: `grid ${f(n)} ${u(c)} ${m}`,
|
|
377
|
+
style: {
|
|
378
|
+
gap: g(c),
|
|
379
|
+
...d
|
|
380
|
+
},
|
|
381
|
+
...p
|
|
382
|
+
}, r);
|
|
383
|
+
}), F = t.memo((i) => {
|
|
384
|
+
const { children: r, colSpan: e, rowSpan: n, className: c, style: m, ...d } = i, p = () => {
|
|
385
|
+
let u = [];
|
|
386
|
+
return e && u.push(`col-span-${e}`), n && u.push(`row-span-${n}`), u.join(" ");
|
|
387
|
+
};
|
|
388
|
+
return t.createElement("div", {
|
|
389
|
+
className: `${p()} ${c}`,
|
|
390
|
+
style: m,
|
|
391
|
+
...d
|
|
392
|
+
}, r);
|
|
393
|
+
});
|
|
394
|
+
class A extends _ {
|
|
395
|
+
constructor() {
|
|
396
|
+
super(...arguments);
|
|
397
|
+
o(this, "_variant", "standard");
|
|
398
|
+
o(this, "_columns", 1);
|
|
399
|
+
o(this, "_gap", "md");
|
|
400
|
+
}
|
|
401
|
+
variant(e) {
|
|
402
|
+
return this._variant = e, this;
|
|
403
|
+
}
|
|
404
|
+
columns(e) {
|
|
405
|
+
return this._columns = e, this;
|
|
406
|
+
}
|
|
407
|
+
gap(e) {
|
|
408
|
+
return this._gap = e, this;
|
|
409
|
+
}
|
|
410
|
+
build() {
|
|
411
|
+
const e = {
|
|
412
|
+
variant: this._variant,
|
|
413
|
+
columns: this._columns,
|
|
414
|
+
gap: this._gap,
|
|
415
|
+
children: this.processChildren(),
|
|
416
|
+
className: this.getClassName(),
|
|
417
|
+
style: this.getStyle(),
|
|
418
|
+
...this._props
|
|
419
|
+
};
|
|
420
|
+
return t.createElement(j, e);
|
|
421
|
+
}
|
|
422
|
+
}
|
|
423
|
+
class z extends _ {
|
|
424
|
+
constructor() {
|
|
425
|
+
super(...arguments);
|
|
426
|
+
o(this, "_colSpan");
|
|
427
|
+
o(this, "_rowSpan");
|
|
428
|
+
}
|
|
429
|
+
colSpan(e) {
|
|
430
|
+
return this._colSpan = e, this;
|
|
431
|
+
}
|
|
432
|
+
rowSpan(e) {
|
|
433
|
+
return this._rowSpan = e, this;
|
|
434
|
+
}
|
|
435
|
+
build() {
|
|
436
|
+
const e = {
|
|
437
|
+
colSpan: this._colSpan,
|
|
438
|
+
rowSpan: this._rowSpan,
|
|
439
|
+
children: this.processChildren(),
|
|
440
|
+
className: this.getClassName(),
|
|
441
|
+
style: this.getStyle(),
|
|
442
|
+
...this._props
|
|
443
|
+
};
|
|
444
|
+
return t.createElement(F, e);
|
|
445
|
+
}
|
|
446
|
+
}
|
|
447
|
+
const D = b(A), H = b(z);
|
|
448
|
+
export {
|
|
449
|
+
q as B,
|
|
450
|
+
L as C,
|
|
451
|
+
D as G,
|
|
452
|
+
M as T,
|
|
453
|
+
V as a,
|
|
454
|
+
H as b
|
|
455
|
+
};
|