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
@@ -0,0 +1,150 @@
1
+ var w = Object.defineProperty;
2
+ var S = (s, e, t) => e in s ? w(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t;
3
+ var n = (s, e, t) => S(s, typeof e != "symbol" ? e + "" : e, t);
4
+ import m from "react";
5
+ import { aT as g, aU as d, aX as N, aW as _, aZ as j } from "./client-Bydlscpe.js";
6
+ function C(s, e) {
7
+ if (!(typeof e != "string" || !_(e)))
8
+ for (const t of j(e))
9
+ s.bindSignal(t);
10
+ }
11
+ function l(s, e) {
12
+ if (typeof e == "function") {
13
+ try {
14
+ l(s, e());
15
+ } catch {
16
+ }
17
+ return;
18
+ }
19
+ if (typeof e == "string") {
20
+ C(s, e);
21
+ return;
22
+ }
23
+ if (Array.isArray(e))
24
+ for (const t of e) l(s, t);
25
+ }
26
+ function z(s) {
27
+ return typeof s == "string" && _(s) ? N(s) : s;
28
+ }
29
+ function B(s, e) {
30
+ const { children: t, ...r } = e, o = t !== void 0 ? t : s;
31
+ return { nodes: o == null ? [] : Array.isArray(o) ? o : [o], rest: r };
32
+ }
33
+ class I extends d {
34
+ constructor() {
35
+ super(...arguments);
36
+ n(this, "_mainAxisAlignment", "start");
37
+ // Flutter Column / SwiftUI VStack default: center. Stretch is opt-in.
38
+ n(this, "_crossAxisAlignment", "center");
39
+ n(this, "_spacing");
40
+ n(this, "_size");
41
+ }
42
+ children(t) {
43
+ return l(this, t), super.children(t);
44
+ }
45
+ props(t) {
46
+ return t && "children" in t && l(this, t.children), super.props(t);
47
+ }
48
+ mainAxisAlignment(t) {
49
+ return this._mainAxisAlignment = t, this;
50
+ }
51
+ crossAxisAlignment(t) {
52
+ return this._crossAxisAlignment = t, this;
53
+ }
54
+ spacing(t) {
55
+ return this._spacing = t, this;
56
+ }
57
+ size(t) {
58
+ return this._size = t, this;
59
+ }
60
+ build() {
61
+ const t = {
62
+ start: "justify-start",
63
+ center: "justify-center",
64
+ end: "justify-end",
65
+ spaceBetween: "justify-between",
66
+ spaceAround: "justify-around",
67
+ spaceEvenly: "justify-evenly"
68
+ }, r = {
69
+ start: "items-start",
70
+ center: "items-center",
71
+ end: "items-end",
72
+ stretch: "items-stretch"
73
+ }, o = {
74
+ small: "flex-[0.3]",
75
+ medium: "flex-1",
76
+ large: "flex-[1.5]"
77
+ }, i = [
78
+ "fibo-column",
79
+ "flex",
80
+ "flex-col",
81
+ // min-w-0 / min-h-0: shrink inside flex/grid so nested overflow can scroll
82
+ this.isHug() ? "w-auto self-auto" : "w-full min-w-0 min-h-0",
83
+ t[this._mainAxisAlignment],
84
+ r[this._crossAxisAlignment],
85
+ this._size ? o[this._size] : "",
86
+ ...this._classNames
87
+ ], h = this.getStyle(), { nodes: c, rest: p } = B(this.processChildren(), this._props), { className: y, style: u, ...x } = p, A = [...i, y].filter(Boolean).join(" "), b = c.map(z), a = {
88
+ ...h,
89
+ ...u && typeof u == "object" ? u : {}
90
+ };
91
+ return this._spacing != null && this._spacing !== "" && (typeof this._spacing == "number" ? a.gap = `${this._spacing}px` : isNaN(Number(this._spacing)) ? a.gap = this._spacing : a.gap = `${Number(this._spacing) * 4}px`), m.createElement(
92
+ "div",
93
+ {
94
+ style: a,
95
+ ...x,
96
+ className: A
97
+ },
98
+ ...b
99
+ );
100
+ }
101
+ }
102
+ const F = g(I);
103
+ function f(s) {
104
+ return typeof s == "number" ? `${s}px` : s;
105
+ }
106
+ function M(s) {
107
+ return s && typeof s == "object" && !Array.isArray(s) ? s : {};
108
+ }
109
+ class $ extends d {
110
+ constructor() {
111
+ super(...arguments);
112
+ n(this, "_height");
113
+ n(this, "_width");
114
+ n(this, "_grow");
115
+ n(this, "_expand");
116
+ }
117
+ height(t) {
118
+ return this._height = t, this;
119
+ }
120
+ width(t) {
121
+ return this._width = t, this;
122
+ }
123
+ vertical() {
124
+ return this._expand = !0, this;
125
+ }
126
+ horizontal() {
127
+ return this._expand = !0, this;
128
+ }
129
+ /** Grow factor inside a Row or Column. Does not turn the spacer into a flex container. */
130
+ flex(t = 1) {
131
+ const r = typeof t == "number" ? t : Number(t);
132
+ return this._grow = Number.isFinite(r) ? r : 1, this._expand = !0, this;
133
+ }
134
+ build() {
135
+ const { className: t, style: r, ...o } = this._props, i = { ...this.getStyle(), ...M(r) }, h = this._height != null || this._width != null, c = this._expand ?? !h;
136
+ this._height != null && (i.height = f(this._height)), this._width != null && (i.width = f(this._width)), c ? (i.flex = `${this._grow ?? 1} 1 0%`, i.alignSelf = i.alignSelf ?? "stretch", i.minWidth = i.minWidth ?? 0, i.minHeight = i.minHeight ?? 0) : i.flex = "0 0 auto";
137
+ const p = ["fibo-spacer", this.getClassName(), t].filter(Boolean).join(" ");
138
+ return m.createElement("div", {
139
+ ...o,
140
+ style: i,
141
+ className: p,
142
+ "aria-hidden": !0
143
+ });
144
+ }
145
+ }
146
+ const T = g($);
147
+ export {
148
+ F as C,
149
+ T as S
150
+ };
@@ -0,0 +1,140 @@
1
+ var _ = Object.defineProperty;
2
+ var u = (s, e, t) => e in s ? _(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t;
3
+ var i = (s, e, t) => u(s, typeof e != "symbol" ? e + "" : e, t);
4
+ import c from "react";
5
+ import { aT as m, aU as f, aV as n, aW as o, aX as a, aY as d, aZ as y } from "./client-Bydlscpe.js";
6
+ function p(s, e) {
7
+ if (!(typeof e != "string" || !o(e)))
8
+ for (const t of y(e))
9
+ s.bindSignal(t);
10
+ }
11
+ function h(s, e) {
12
+ if (typeof e == "function") {
13
+ try {
14
+ h(s, e());
15
+ } catch {
16
+ }
17
+ return;
18
+ }
19
+ if (typeof e == "string") {
20
+ p(s, e);
21
+ return;
22
+ }
23
+ if (Array.isArray(e))
24
+ for (const t of e) h(s, t);
25
+ }
26
+ function x(s) {
27
+ return typeof s == "string" && o(s) ? a(s) : s;
28
+ }
29
+ class T extends f {
30
+ constructor(t = "") {
31
+ super();
32
+ i(this, "_text", "");
33
+ i(this, "_variant", "elevated");
34
+ i(this, "_size", "md");
35
+ i(this, "_onPress");
36
+ i(this, "_onHover");
37
+ i(this, "_disabled", !1);
38
+ i(this, "_icon");
39
+ i(this, "_shape", "default");
40
+ i(this, "_shadow", "none");
41
+ i(this, "_tone", "default");
42
+ i(this, "_motion", "default");
43
+ i(this, "_expand", !1);
44
+ i(this, "_htmlType", "button");
45
+ i(this, "_htmlTypeExplicit", !1);
46
+ this.text(t);
47
+ }
48
+ text(t) {
49
+ return this._text = t, typeof t == "function" ? this.observer() : p(this, t), this;
50
+ }
51
+ children(t) {
52
+ return h(this, t), super.children(t);
53
+ }
54
+ variant(t) {
55
+ return this._variant = t, this;
56
+ }
57
+ clean() {
58
+ return this._variant = "raw", this;
59
+ }
60
+ size(t) {
61
+ return this._size = t, this;
62
+ }
63
+ onPress(t) {
64
+ return this._onPress = t, this;
65
+ }
66
+ onHover(t) {
67
+ return this._onHover = t, this;
68
+ }
69
+ disabled(t = !0) {
70
+ return this._disabled = t, this;
71
+ }
72
+ icon(t) {
73
+ return this._icon = t, this;
74
+ }
75
+ shape(t) {
76
+ return this._shape = t, this;
77
+ }
78
+ shadow(t) {
79
+ return this._shadow = t, this;
80
+ }
81
+ tone(t) {
82
+ return this._tone = t, this;
83
+ }
84
+ motion(t) {
85
+ return this._motion = t, this;
86
+ }
87
+ expand(t = !0) {
88
+ return this._expand = t, this;
89
+ }
90
+ /**
91
+ * HTML button type. `.type('submit')` is what people write inside a Form.
92
+ * React still reads `element.type` as the component: a string sets this,
93
+ * a props object renders the button.
94
+ */
95
+ type(t) {
96
+ return this._htmlType = n(t), this._htmlTypeExplicit = !0, this;
97
+ }
98
+ htmlType(t) {
99
+ return this._htmlType = n(t), this._htmlTypeExplicit = !0, this;
100
+ }
101
+ /** Shortcut for `.htmlType('submit')` inside a `Form`. */
102
+ submit() {
103
+ return this._htmlType = "submit", this._htmlTypeExplicit = !0, this;
104
+ }
105
+ /** Shortcut for `.htmlType('reset')`. */
106
+ reset() {
107
+ return this._htmlType = "reset", this._htmlTypeExplicit = !0, this;
108
+ }
109
+ resolvedHtmlType() {
110
+ var t;
111
+ return this._htmlTypeExplicit ? n(this._htmlType) : n(((t = this._props) == null ? void 0 : t.type) ?? this._htmlType);
112
+ }
113
+ build() {
114
+ const t = this.getClassName(), r = typeof this._text == "function" ? this._text() : this._text, l = {
115
+ text: typeof r == "string" && o(r) ? a(r) : r,
116
+ variant: this._variant,
117
+ size: this._size,
118
+ onPress: this._onPress,
119
+ onHover: this._onHover,
120
+ disabled: this._disabled,
121
+ icon: this._icon,
122
+ shape: this._shape,
123
+ shadow: this._shadow,
124
+ tone: this._tone,
125
+ motion: this._motion,
126
+ expand: this._expand,
127
+ className: t,
128
+ style: this.getStyle(),
129
+ children: this.processChildren().map(x),
130
+ ...this._props,
131
+ type: this.resolvedHtmlType(),
132
+ bare: this.isReset()
133
+ };
134
+ return c.createElement(d, l);
135
+ }
136
+ }
137
+ const H = m(T);
138
+ export {
139
+ H as B
140
+ };