fiboui 2.6.4 → 2.7.1

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.
Files changed (50) hide show
  1. package/README.md +16 -6
  2. package/dist/cli/bin.js +3 -4
  3. package/dist/cli/commands/generate/component.js +21 -33
  4. package/dist/cli/commands/generate/index.js +3 -3
  5. package/dist/cli/commands/generate/module.js +21 -24
  6. package/dist/cli/commands/generate/plugin.js +18 -34
  7. package/dist/cli/commands/init.js +5 -25
  8. package/dist/cli/config.js +118 -0
  9. package/dist/cli/names.js +35 -0
  10. package/dist/cli/templates.js +76 -0
  11. package/dist/client-Bydlscpe.js +17697 -0
  12. package/dist/content.d.ts +1 -0
  13. package/dist/content.js +14 -14
  14. package/dist/core.d.ts +2 -0
  15. package/dist/core.js +65 -59
  16. package/dist/effects-BxvduC-G.js +14 -0
  17. package/dist/icons-B9HMYLtE.js +383 -0
  18. package/dist/index-B7eVMy2M.js +150 -0
  19. package/dist/index-C9I92HPE.js +140 -0
  20. package/dist/index-CXQSA8WJ.js +944 -0
  21. package/dist/index-D4JzwKSP.js +1474 -0
  22. package/dist/index-DBeyafKI.js +839 -0
  23. package/dist/index.d.ts +73156 -505
  24. package/dist/index.js +4419 -2238
  25. package/dist/interactive.d.ts +2 -0
  26. package/dist/interactive.js +22 -9
  27. package/dist/layout.d.ts +1 -0
  28. package/dist/layout.js +14 -13
  29. package/dist/metadata-BbFwNwNa.js +147 -0
  30. package/dist/navigation.d.ts +1 -0
  31. package/dist/navigation.js +15 -9
  32. package/dist/page-BJoj7vSk.js +266 -0
  33. package/dist/server.d.ts +2 -0
  34. package/dist/server.js +4991 -1774
  35. package/dist/structure.d.ts +1 -0
  36. package/dist/structure.js +13 -9
  37. package/dist/style.css +1 -1
  38. package/dist/theme.d.ts +2 -0
  39. package/dist/theme.js +8 -8
  40. package/package.json +9 -2
  41. package/dist/Link-YjcbA4af.js +0 -50
  42. package/dist/PluginManager-BRjgOLVa.js +0 -110
  43. package/dist/client-DzQ13khL.js +0 -10605
  44. package/dist/effects-D16XdB_d.js +0 -10
  45. package/dist/index-B-cCNvV4.js +0 -455
  46. package/dist/index-Bj-IMHC8.js +0 -119
  47. package/dist/index-CWyBsVAL.js +0 -608
  48. package/dist/index-CYisDyI8.js +0 -602
  49. package/dist/index-Dil2ZG0X.js +0 -1028
  50. package/dist/mount-CDwiTTXM.js +0 -135
@@ -1,10 +0,0 @@
1
- const c = (i, t, s = "rgba(255, 255, 255, 0.3)") => {
2
- if (!t) return;
3
- const e = document.createElement("span"), l = Math.max(t.clientWidth, t.clientHeight), n = l / 2, r = t.getBoundingClientRect();
4
- e.style.width = e.style.height = `${l}px`, e.style.left = `${i.clientX - r.left - n}px`, e.style.top = `${i.clientY - r.top - n}px`, e.style.position = "absolute", e.style.borderRadius = "50%", e.style.transform = "scale(0)", e.style.animation = "fibo-ripple 600ms linear", e.style.backgroundColor = s, e.style.pointerEvents = "none", (t.querySelector(".fibo-ripple-container") || t).appendChild(e), setTimeout(() => {
5
- e.remove();
6
- }, 600);
7
- };
8
- export {
9
- c as createRipple
10
- };
@@ -1,455 +0,0 @@
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-DzQ13khL.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
- };
@@ -1,119 +0,0 @@
1
- var m = Object.defineProperty;
2
- var p = (e, t, s) => t in e ? m(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s;
3
- var r = (e, t, s) => p(e, typeof t != "symbol" ? t + "" : t, s);
4
- import o from "react";
5
- import { at as a, au as u } from "./client-DzQ13khL.js";
6
- class g extends u {
7
- constructor() {
8
- super(...arguments);
9
- r(this, "_mainAxisAlignment", "start");
10
- r(this, "_crossAxisAlignment", "start");
11
- r(this, "_spacing");
12
- }
13
- mainAxisAlignment(s) {
14
- return this._mainAxisAlignment = s, this;
15
- }
16
- crossAxisAlignment(s) {
17
- return this._crossAxisAlignment = s, this;
18
- }
19
- spacing(s) {
20
- return this._spacing = s, this;
21
- }
22
- items(s) {
23
- return this.children(s), this;
24
- }
25
- build() {
26
- const s = {
27
- start: "justify-start",
28
- center: "justify-center",
29
- end: "justify-end",
30
- spaceBetween: "justify-between",
31
- spaceAround: "justify-around",
32
- spaceEvenly: "justify-evenly"
33
- }, i = {
34
- start: "items-start",
35
- center: "items-center",
36
- end: "items-end",
37
- stretch: "items-stretch"
38
- }, c = [
39
- "fibo-row",
40
- "flex",
41
- "flex-row",
42
- // min-w-0: flex item can shrink below content intrinsic width (grid/flex overflow)
43
- this.isHug() ? "w-auto self-auto shrink-0" : "w-full min-w-0 self-stretch",
44
- s[this._mainAxisAlignment],
45
- i[this._crossAxisAlignment],
46
- ...this._classNames
47
- ], n = this.getStyle();
48
- this._spacing && (typeof this._spacing == "number" ? n.gap = `${this._spacing}px` : isNaN(Number(this._spacing)) ? n.gap = this._spacing : n.gap = `${Number(this._spacing) * 4}px`);
49
- const l = c.filter(Boolean).join(" "), h = this.processChildren();
50
- return o.createElement(
51
- "div",
52
- {
53
- className: l,
54
- style: n,
55
- ...this._props
56
- },
57
- ...h
58
- );
59
- }
60
- }
61
- const x = a(g), _ = o.memo((e) => {
62
- const {
63
- source: t,
64
- color: s,
65
- size: i,
66
- className: c,
67
- style: n,
68
- ...l
69
- } = e;
70
- return t ? typeof t == "string" ? o.createElement("img", {
71
- src: t,
72
- alt: "icon",
73
- width: i,
74
- height: i,
75
- className: c,
76
- style: { ...n, color: s },
77
- ...l
78
- }) : o.createElement(t, {
79
- color: s,
80
- size: i,
81
- className: c,
82
- style: n,
83
- ...l
84
- }) : null;
85
- });
86
- class f extends u {
87
- constructor(s) {
88
- super();
89
- r(this, "_source");
90
- r(this, "_color", "currentColor");
91
- r(this, "_size", 24);
92
- this._source = s;
93
- }
94
- source(s) {
95
- return this._source = s, this;
96
- }
97
- color(s) {
98
- return this._color = s, this;
99
- }
100
- size(s) {
101
- return this._size = s, this;
102
- }
103
- build() {
104
- const i = ["fibo-icon", ...this._classNames].filter(Boolean).join(" "), c = {
105
- source: this._source,
106
- color: this._color,
107
- size: this._size,
108
- className: i,
109
- style: this.getStyle(),
110
- ...this._props
111
- };
112
- return o.createElement(_, c);
113
- }
114
- }
115
- const w = a(f);
116
- export {
117
- w as I,
118
- x as R
119
- };