fiboui 2.5.0 → 2.6.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.
package/dist/content.js CHANGED
@@ -1,6 +1,6 @@
1
- import { b as s, A as r, B as o, I as t, c as n, L as I, P as g, a as m, S as p } from "./index-BLBoIYdN.js";
2
- import { $ as f } from "./client-C5fy1-Lh.js";
3
- import { I as A } from "./index-CaDcYvIh.js";
1
+ import { b as s, A as r, B as o, I as t, c as n, L as I, P as g, a as m, S as p } from "./index-BOR_ChBS.js";
2
+ import { $ as f } from "./client-De3cGjVE.js";
3
+ import { I as A } from "./index-DJMMkBOg.js";
4
4
  export {
5
5
  s as Alert,
6
6
  r as Avatar,
package/dist/core.js CHANGED
@@ -1,5 +1,5 @@
1
- import { C as a, E as t, L as r, T as o, F as i, I as n, M as l, Q as u, O as S, h as c, v as p, P as g, R as b, w as T, x as v, S as E, Y as C, k as F, j as R, c as d, b as m, a as f, X as I, N as y, V as O, g as P, U as x, W as M, J as N, K as w, H as A, o as B, G as _, r as V, y as h, s as q, D as z, z as G, B as K, A as W, f as X, p as j, e as k, q as D, i as H, d as J, t as L, u as Q, m as U, n as Y, l as Z } from "./client-C5fy1-Lh.js";
2
- import { b as ss, F as es, a as as, c as ts, m as rs, p as os, t as is, w as ns } from "./mount-jsbS9qm4.js";
1
+ import { C as a, E as t, L as r, T as o, F as i, I as n, M as l, Q as u, O as S, h as c, v as p, P as g, R as b, w as T, x as v, S as E, Y as C, k as F, j as R, c as d, b as m, a as f, X as I, N as y, V as O, g as P, U as x, W as M, J as N, K as w, H as A, o as B, G as _, r as V, y as h, s as q, D as z, z as G, B as K, A as W, f as X, p as j, e as k, q as D, i as H, d as J, t as L, u as Q, m as U, n as Y, l as Z } from "./client-De3cGjVE.js";
2
+ import { b as ss, F as es, a as as, c as ts, m as rs, p as os, t as is, w as ns } from "./mount-BHYOA7Dg.js";
3
3
  export {
4
4
  a as ComputedSignal,
5
5
  t as Easing,
@@ -2,8 +2,8 @@ var U = Object.defineProperty;
2
2
  var G = (n, s, e) => s in n ? U(n, s, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[s] = e;
3
3
  var r = (n, s, e) => G(n, typeof s != "symbol" ? s + "" : s, e);
4
4
  import t from "react";
5
- import { at as C, au as F, a4 as j, $ as O } from "./client-C5fy1-Lh.js";
6
- import { R as J } from "./index-CaDcYvIh.js";
5
+ import { at as C, au as F, a4 as j, $ as O } from "./client-De3cGjVE.js";
6
+ import { R as J } from "./index-DJMMkBOg.js";
7
7
  import { jsxs as $, jsx as f } from "react/jsx-runtime";
8
8
  const K = ({ size: n }) => t.createElement(
9
9
  "svg",
@@ -2,7 +2,7 @@ var v = Object.defineProperty;
2
2
  var $ = (i, r, e) => r in i ? v(i, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[r] = e;
3
3
  var o = (i, r, e) => $(i, typeof r != "symbol" ? r + "" : r, e);
4
4
  import t from "react";
5
- import { at as b, au as _, a4 as E, az as x } from "./client-C5fy1-Lh.js";
5
+ import { at as b, au as _, a4 as E, az as x } from "./client-De3cGjVE.js";
6
6
  const w = t.memo((i) => {
7
7
  const { text: r, subtitle: e, number: n, color: c, className: m, style: d, children: p, ...u } = i;
8
8
  return t.createElement(
@@ -1,12 +1,12 @@
1
- var T = Object.defineProperty;
2
- var V = (o, s, e) => s in o ? T(o, s, { enumerable: !0, configurable: !0, writable: !0, value: e }) : o[s] = e;
3
- var r = (o, s, e) => V(o, typeof s != "symbol" ? s + "" : s, e);
1
+ var V = Object.defineProperty;
2
+ var Z = (r, s, e) => s in r ? V(r, s, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[s] = e;
3
+ var o = (r, s, e) => Z(r, typeof s != "symbol" ? s + "" : s, e);
4
4
  import i from "react";
5
- import { at as u, au as m, aA as Z, av as X, P as q, as as G, $ as J } from "./client-C5fy1-Lh.js";
5
+ import { at as u, au as m, aA as X, av as q, P as G, as as J, $ as K } from "./client-De3cGjVE.js";
6
6
  import { P as M } from "./PluginManager-BRjgOLVa.js";
7
- import { R as K, I as Q } from "./index-CaDcYvIh.js";
8
- import { L as U } from "./Link-DU8XI2Na.js";
9
- class ee extends m {
7
+ import { R as Q, I as U } from "./index-DJMMkBOg.js";
8
+ import { L as ee } from "./Link-BIjIaYAb.js";
9
+ class te extends m {
10
10
  build() {
11
11
  const e = [
12
12
  "fibo-center",
@@ -26,15 +26,15 @@ class ee extends m {
26
26
  );
27
27
  }
28
28
  }
29
- const xe = u(ee);
30
- class te extends m {
29
+ const ve = u(te);
30
+ class ie extends m {
31
31
  constructor() {
32
32
  super(...arguments);
33
- r(this, "_mainAxisAlignment", "start");
33
+ o(this, "_mainAxisAlignment", "start");
34
34
  // Flutter Column / SwiftUI VStack default: center. Stretch is opt-in.
35
- r(this, "_crossAxisAlignment", "center");
36
- r(this, "_spacing");
37
- r(this, "_size");
35
+ o(this, "_crossAxisAlignment", "center");
36
+ o(this, "_spacing");
37
+ o(this, "_size");
38
38
  }
39
39
  mainAxisAlignment(e) {
40
40
  return this._mainAxisAlignment = e, this;
@@ -89,8 +89,8 @@ class te extends m {
89
89
  );
90
90
  }
91
91
  }
92
- const ve = u(te);
93
- class ie extends m {
92
+ const we = u(ie);
93
+ class se extends m {
94
94
  build() {
95
95
  const s = this.getClassName(), e = this.getStyle(), t = this.processChildren();
96
96
  return i.createElement(
@@ -104,13 +104,17 @@ class ie extends m {
104
104
  );
105
105
  }
106
106
  }
107
- const we = u(ie);
108
- class se extends m {
107
+ const Be = u(se);
108
+ function W(r) {
109
+ return typeof r == "number" ? `${r}px` : r;
110
+ }
111
+ class re extends m {
109
112
  constructor() {
110
113
  super(...arguments);
111
- r(this, "_height");
112
- r(this, "_width");
113
- r(this, "_direction");
114
+ o(this, "_height");
115
+ o(this, "_width");
116
+ o(this, "_grow");
117
+ o(this, "_expand");
114
118
  }
115
119
  height(e) {
116
120
  return this._height = e, this;
@@ -119,23 +123,28 @@ class se extends m {
119
123
  return this._width = e, this;
120
124
  }
121
125
  vertical() {
122
- return this._direction = "vertical", this;
126
+ return this._expand = !0, this;
123
127
  }
124
128
  horizontal() {
125
- return this._direction = "horizontal", this;
129
+ return this._expand = !0, this;
130
+ }
131
+ /** Grow factor inside a Row or Column. Does not turn the spacer into a flex container. */
132
+ flex(e = 1) {
133
+ const t = typeof e == "number" ? e : Number(e);
134
+ return this._grow = Number.isFinite(t) ? t : 1, this._expand = !0, this;
126
135
  }
127
136
  build() {
128
- const e = this.getStyle();
129
- this._direction === "vertical" ? (e.flex = "1", e.height = this._height ? typeof this._height == "number" ? `${this._height}px` : this._height : "auto") : this._direction === "horizontal" ? (e.flex = "1", e.width = this._width ? typeof this._width == "number" ? `${this._width}px` : this._width : "auto") : (this._height && (e.height = typeof this._height == "number" ? `${this._height}px` : this._height), this._width && (e.width = typeof this._width == "number" ? `${this._width}px` : this._width));
130
- const t = this.getClassName();
137
+ const e = this.getStyle(), t = this._height != null || this._width != null, n = this._expand ?? !t;
138
+ this._height != null && (e.height = W(this._height)), this._width != null && (e.width = W(this._width)), n ? (e.flex = `${this._grow ?? 1} 1 0%`, e.alignSelf = e.alignSelf ?? "stretch", e.minWidth = 0, e.minHeight = 0) : e.flex = "0 0 auto";
139
+ const l = this.getClassName();
131
140
  return i.createElement("div", {
132
- className: `fibo-spacer ${t}`,
141
+ className: `fibo-spacer ${l}`,
133
142
  style: e,
134
143
  ...this._props
135
144
  });
136
145
  }
137
146
  }
138
- const Be = u(se), re = i.memo((o) => {
147
+ const ke = u(re), oe = i.memo((r) => {
139
148
  const {
140
149
  theme: s,
141
150
  locale: e,
@@ -144,7 +153,7 @@ const Be = u(se), re = i.memo((o) => {
144
153
  style: l,
145
154
  children: a,
146
155
  overlays: c = []
147
- } = o, h = /* @__PURE__ */ new Map();
156
+ } = r, h = /* @__PURE__ */ new Map();
148
157
  s && h.set("theme", s), e && h.set("locale", e), Object.entries(t).forEach(([g, p]) => {
149
158
  h.set(g, p);
150
159
  });
@@ -165,23 +174,23 @@ const Be = u(se), re = i.memo((o) => {
165
174
  [a, ...c]
166
175
  );
167
176
  return h.size > 0 ? i.createElement(
168
- q,
177
+ G,
169
178
  {
170
179
  providers: h,
171
180
  children: f
172
181
  }
173
182
  ) : f;
174
183
  });
175
- class oe extends m {
184
+ class ne extends m {
176
185
  constructor() {
177
186
  super(...arguments);
178
- r(this, "_locale");
179
- r(this, "_customProviders", {});
180
- r(this, "_structure", {});
181
- r(this, "_headerBar");
182
- r(this, "_footerBar");
183
- r(this, "_sideBarLeft");
184
- r(this, "_sideBarRight");
187
+ o(this, "_locale");
188
+ o(this, "_customProviders", {});
189
+ o(this, "_structure", {});
190
+ o(this, "_headerBar");
191
+ o(this, "_footerBar");
192
+ o(this, "_sideBarLeft");
193
+ o(this, "_sideBarRight");
185
194
  }
186
195
  locale(e) {
187
196
  return this._locale = e, this;
@@ -209,10 +218,10 @@ class oe extends m {
209
218
  }
210
219
  _normalizeBar(e) {
211
220
  return this._isLayoutBarConfig(e) ? {
212
- content: i.createElement(i.Fragment, null, ...Z(e.children)),
221
+ content: i.createElement(i.Fragment, null, ...X(e.children)),
213
222
  fixed: e.fixed ?? !1
214
223
  } : {
215
- content: X(e),
224
+ content: q(e),
216
225
  fixed: !1
217
226
  };
218
227
  }
@@ -220,7 +229,7 @@ class oe extends m {
220
229
  return !e || typeof e != "object" || i.isValidElement(e) || "build" in e && typeof e.build == "function" ? !1 : "children" in e && !("type" in e);
221
230
  }
222
231
  build() {
223
- var y, x, v, w, B, k, C, N, z, S, E, L, R, A, $, j, I, H, O, P, D, F;
232
+ var y, x, v, w, B, k, N, C, S, z, E, L, R, A, j, I, $, H, O, P, F, D;
224
233
  const e = this.processChildren(), t = this._structure, n = this._headerBar && ((y = t.header) == null ? void 0 : y.visible) !== !1, l = this._footerBar && ((x = t.footer) == null ? void 0 : x.visible) !== !1, a = this._sideBarLeft && ((v = t.sidebarLeft) == null ? void 0 : v.visible) !== !1, c = this._sideBarRight && ((w = t.sidebarRight) == null ? void 0 : w.visible) !== !1, h = a && ((B = t.sidebarLeft) == null ? void 0 : B.fullHeight), f = c && ((k = t.sidebarRight) == null ? void 0 : k.fullHeight), g = i.createElement(
225
234
  "div",
226
235
  {
@@ -238,9 +247,9 @@ class oe extends m {
238
247
  key: "sidebar-left",
239
248
  className: "z-20",
240
249
  style: {
241
- width: (C = t.sidebarLeft) == null ? void 0 : C.width,
242
- position: ((N = t.sidebarLeft) == null ? void 0 : N.mode) === "over" ? "absolute" : ((z = t.sidebarLeft) == null ? void 0 : z.behavior) === "fixed" || this._sideBarLeft.fixed ? "sticky" : void 0,
243
- top: ((S = t.sidebarLeft) == null ? void 0 : S.behavior) === "fixed" || this._sideBarLeft.fixed ? 0 : void 0,
250
+ width: (N = t.sidebarLeft) == null ? void 0 : N.width,
251
+ position: ((C = t.sidebarLeft) == null ? void 0 : C.mode) === "over" ? "absolute" : ((S = t.sidebarLeft) == null ? void 0 : S.behavior) === "fixed" || this._sideBarLeft.fixed ? "sticky" : void 0,
252
+ top: ((z = t.sidebarLeft) == null ? void 0 : z.behavior) === "fixed" || this._sideBarLeft.fixed ? 0 : void 0,
244
253
  height: ((E = t.sidebarLeft) == null ? void 0 : E.behavior) === "fixed" || this._sideBarLeft.fixed ? "100%" : void 0,
245
254
  overflowY: "auto",
246
255
  borderRight: "1px solid var(--fibo-outline, #e0e0e0)",
@@ -263,8 +272,8 @@ class oe extends m {
263
272
  style: {
264
273
  width: (L = t.sidebarRight) == null ? void 0 : L.width,
265
274
  position: ((R = t.sidebarRight) == null ? void 0 : R.mode) === "over" ? "absolute" : ((A = t.sidebarRight) == null ? void 0 : A.behavior) === "fixed" || this._sideBarRight.fixed ? "sticky" : void 0,
266
- top: (($ = t.sidebarRight) == null ? void 0 : $.behavior) === "fixed" || this._sideBarRight.fixed ? 0 : void 0,
267
- height: ((j = t.sidebarRight) == null ? void 0 : j.behavior) === "fixed" || this._sideBarRight.fixed ? "100%" : void 0,
275
+ top: ((j = t.sidebarRight) == null ? void 0 : j.behavior) === "fixed" || this._sideBarRight.fixed ? 0 : void 0,
276
+ height: ((I = t.sidebarRight) == null ? void 0 : I.behavior) === "fixed" || this._sideBarRight.fixed ? "100%" : void 0,
268
277
  overflowY: "auto",
269
278
  borderLeft: "1px solid var(--fibo-outline, #e0e0e0)",
270
279
  backgroundColor: "var(--fibo-surface, #ffffff)"
@@ -276,7 +285,7 @@ class oe extends m {
276
285
  key: "header-bar",
277
286
  className: "z-30",
278
287
  style: {
279
- height: (I = t.header) == null ? void 0 : I.height,
288
+ height: ($ = t.header) == null ? void 0 : $.height,
280
289
  position: ((H = t.header) == null ? void 0 : H.position) || (this._headerBar.fixed ? "sticky" : "static"),
281
290
  top: 0,
282
291
  backgroundColor: "var(--fibo-surface, #ffffff)",
@@ -316,7 +325,7 @@ class oe extends m {
316
325
  i.createElement("div", {
317
326
  key: "sidebar-left-full",
318
327
  style: {
319
- width: (D = t.sidebarLeft) == null ? void 0 : D.width,
328
+ width: (F = t.sidebarLeft) == null ? void 0 : F.width,
320
329
  overflowY: "auto",
321
330
  borderRight: "1px solid var(--fibo-outline, #e0e0e0)",
322
331
  backgroundColor: "var(--fibo-surface, #ffffff)",
@@ -332,7 +341,7 @@ class oe extends m {
332
341
  i.createElement("div", {
333
342
  key: "sidebar-right-full",
334
343
  style: {
335
- width: (F = t.sidebarRight) == null ? void 0 : F.width,
344
+ width: (D = t.sidebarRight) == null ? void 0 : D.width,
336
345
  overflowY: "auto",
337
346
  borderLeft: "1px solid var(--fibo-outline, #e0e0e0)",
338
347
  backgroundColor: "var(--fibo-surface, #ffffff)",
@@ -340,7 +349,7 @@ class oe extends m {
340
349
  }
341
350
  }, this._sideBarRight.content)
342
351
  ]));
343
- const _ = M.getInstance().getOverlays().map((Y) => Y().build()), W = {
352
+ const _ = M.getInstance().getOverlays().map((T) => T().build()), Y = {
344
353
  theme: this._theme,
345
354
  locale: this._locale,
346
355
  providers: this._customProviders,
@@ -349,11 +358,11 @@ class oe extends m {
349
358
  children: d,
350
359
  overlays: _
351
360
  };
352
- return i.createElement(re, W);
361
+ return i.createElement(oe, Y);
353
362
  }
354
363
  }
355
- const ke = u(oe), ne = i.memo((o) => {
356
- const { height: s = 64, sticky: e, className: t, style: n, children: l, ...a } = o;
364
+ const Ne = u(ne), le = i.memo((r) => {
365
+ const { height: s = 64, sticky: e, className: t, style: n, children: l, ...a } = r;
357
366
  return i.createElement(
358
367
  "header",
359
368
  {
@@ -364,11 +373,11 @@ const ke = u(oe), ne = i.memo((o) => {
364
373
  l
365
374
  );
366
375
  });
367
- class le extends m {
376
+ class ae extends m {
368
377
  constructor() {
369
378
  super(...arguments);
370
- r(this, "_height", 64);
371
- r(this, "_sticky", !1);
379
+ o(this, "_height", 64);
380
+ o(this, "_sticky", !1);
372
381
  }
373
382
  height(e) {
374
383
  return this._height = e, this._sticky && this.syncStickyOffset(!0), this;
@@ -402,22 +411,22 @@ class le extends m {
402
411
  children: this.processChildren(),
403
412
  ...this._props
404
413
  };
405
- return i.createElement(ne, e);
414
+ return i.createElement(le, e);
406
415
  }
407
416
  }
408
- const Ce = u(le), ae = i.memo((o) => {
409
- const { width: s = 260, collapsed: e, className: t, style: n, children: l, ...a } = o, c = G(), h = (c == null ? void 0 : c.currentPath) ?? "", f = e ? 80 : s, p = M.getInstance().getSidebarItems().map((d, b) => {
417
+ const Ce = u(ae), he = i.memo((r) => {
418
+ const { width: s = 260, collapsed: e, className: t, style: n, children: l, ...a } = r, c = J(), h = (c == null ? void 0 : c.currentPath) ?? "", f = e ? 80 : s, p = M.getInstance().getSidebarItems().map((d, b) => {
410
419
  const _ = h === d.path;
411
- return i.createElement(U, {
420
+ return i.createElement(ee, {
412
421
  key: `plugin-item-${d.path || b}`,
413
422
  to: d.path,
414
423
  className: "no-underline block mb-1",
415
- children: K().padding(12).alignItems("center").gap(12).className(`
424
+ children: Q().padding(12).alignItems("center").gap(12).className(`
416
425
  transition-colors duration-200 rounded-lg mx-2
417
426
  ${_ ? "bg-primary/10 text-primary" : "text-gray-600 hover:bg-gray-100"}
418
427
  `).children([
419
- d.icon ? Q(d.icon).size(20).build() : null,
420
- e ? null : J(d.label).style({ fontSize: 14 }).weight(500).build()
428
+ d.icon ? U(d.icon).size(20).build() : null,
429
+ e ? null : K(d.label).style({ fontSize: 14 }).weight(500).build()
421
430
  ].filter(Boolean)).build()
422
431
  });
423
432
  });
@@ -432,11 +441,11 @@ const Ce = u(le), ae = i.memo((o) => {
432
441
  p
433
442
  );
434
443
  });
435
- class he extends m {
444
+ class ce extends m {
436
445
  constructor() {
437
446
  super(...arguments);
438
- r(this, "_width", 260);
439
- r(this, "_collapsed", !1);
447
+ o(this, "_width", 260);
448
+ o(this, "_collapsed", !1);
440
449
  }
441
450
  width(e) {
442
451
  return this._width = e, this;
@@ -453,14 +462,14 @@ class he extends m {
453
462
  children: this.processChildren(),
454
463
  ...this._props
455
464
  };
456
- return i.createElement(ae, e);
465
+ return i.createElement(he, e);
457
466
  }
458
467
  }
459
- const Ne = u(he);
460
- class ce extends m {
468
+ const Se = u(ce);
469
+ class de extends m {
461
470
  constructor() {
462
471
  super(...arguments);
463
- r(this, "_alignment", "center");
472
+ o(this, "_alignment", "center");
464
473
  }
465
474
  alignment(e) {
466
475
  return this._alignment = e, this;
@@ -496,11 +505,11 @@ class ce extends m {
496
505
  );
497
506
  }
498
507
  }
499
- const ze = u(ce);
500
- class de extends m {
508
+ const ze = u(de);
509
+ class fe extends m {
501
510
  constructor() {
502
511
  super(...arguments);
503
- r(this, "_sizeHeight");
512
+ o(this, "_sizeHeight");
504
513
  }
505
514
  sizeHeight(e) {
506
515
  return this._sizeHeight = e, this;
@@ -520,19 +529,19 @@ class de extends m {
520
529
  );
521
530
  }
522
531
  }
523
- const Se = u(de);
524
- function fe(...o) {
532
+ const Ee = u(fe);
533
+ function ue(...r) {
525
534
  return (s) => {
526
- for (const e of o)
535
+ for (const e of r)
527
536
  e && (typeof e == "function" ? e(s) : e.current = s);
528
537
  };
529
538
  }
530
- class ue extends m {
539
+ class me extends m {
531
540
  constructor() {
532
541
  super(...arguments);
533
- r(this, "_direction", "vertical");
534
- r(this, "_scrollbar", "auto");
535
- r(this, "_controller");
542
+ o(this, "_direction", "vertical");
543
+ o(this, "_scrollbar", "auto");
544
+ o(this, "_controller");
536
545
  }
537
546
  direction(e) {
538
547
  return this._direction = e, this;
@@ -560,7 +569,7 @@ class ue extends m {
560
569
  ...this.getStyle()
561
570
  }, t = [...this.getClassName().split(" ").filter(Boolean)];
562
571
  this._scrollbar === "hidden" && (t.push("scrollbar-hide"), e.scrollbarWidth = "none", e.msOverflowStyle = "none");
563
- const n = this._controller, l = this._props.ref, { ref: a, ...c } = this._props, h = fe(
572
+ const n = this._controller, l = this._props.ref, { ref: a, ...c } = this._props, h = ue(
564
573
  (f) => {
565
574
  n == null || n.attach(f);
566
575
  },
@@ -578,16 +587,16 @@ class ue extends m {
578
587
  );
579
588
  }
580
589
  }
581
- const Ee = u(ue);
590
+ const Le = u(me);
582
591
  export {
583
- xe as C,
592
+ ve as C,
584
593
  Ce as H,
585
- Se as L,
586
- Be as S,
594
+ Ee as L,
595
+ ke as S,
587
596
  ze as Z,
588
- ve as a,
589
- we as b,
590
- ke as c,
591
- Ne as d,
592
- Ee as e
597
+ we as a,
598
+ Be as b,
599
+ Ne as c,
600
+ Se as d,
601
+ Le as e
593
602
  };
@@ -2,7 +2,7 @@ var m = Object.defineProperty;
2
2
  var p = (e, t, s) => t in e ? m(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s;
3
3
  var r = (e, t, s) => p(e, typeof t != "symbol" ? t + "" : t, s);
4
4
  import o from "react";
5
- import { at as a, au as u } from "./client-C5fy1-Lh.js";
5
+ import { at as a, au as u } from "./client-De3cGjVE.js";
6
6
  class g extends u {
7
7
  constructor() {
8
8
  super(...arguments);