fiboui 1.0.2 → 2.1.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.
Files changed (169) hide show
  1. package/README.md +141 -96
  2. package/dist/FineGrain-BTgNt7fN.js +29 -0
  3. package/dist/Link-DDzSPY1Q.js +88 -0
  4. package/dist/PluginManager-D5-ApsSN.js +111 -0
  5. package/dist/Router-i6Nc6qVs.js +386 -0
  6. package/dist/builder-6GkZlCaz.js +1894 -0
  7. package/dist/bundle-mjs-wppB-TKB.js +2760 -0
  8. package/dist/cli/bin.js +20 -0
  9. package/dist/cli/commands/generate/component.js +67 -0
  10. package/dist/cli/commands/generate/index.js +10 -0
  11. package/dist/cli/commands/generate/module.js +58 -0
  12. package/dist/cli/commands/generate/plugin.js +67 -0
  13. package/dist/cli/commands/init.js +58 -0
  14. package/dist/content.js +17 -0
  15. package/dist/core.js +33 -0
  16. package/dist/{effects-D16XdB_d.mjs → effects-CnevV566.js} +1 -0
  17. package/dist/index-BaX5zy8O.js +33 -0
  18. package/dist/index-C4xZywsh.js +1024 -0
  19. package/dist/index-C8y7FIYH.js +119 -0
  20. package/dist/index-CREALegH.js +1031 -0
  21. package/dist/index-CWz0hYog.js +778 -0
  22. package/dist/index-OLW4l8s8.js +1102 -0
  23. package/dist/index-zOfPHD00.js +90 -0
  24. package/dist/index.d.ts +43764 -6
  25. package/dist/index.js +2070 -0
  26. package/dist/interactive.js +12 -0
  27. package/dist/layout.js +18 -0
  28. package/dist/mount-rDUAHuDT.js +95 -0
  29. package/dist/navigation.js +13 -0
  30. package/dist/provider-B0eB-Wy7.js +286 -0
  31. package/dist/structure.js +15 -0
  32. package/dist/style.css +1 -1
  33. package/dist/style.js +1 -0
  34. package/dist/theme.js +9 -0
  35. package/package.json +88 -13
  36. package/dist/content/Alert/index.d.ts +0 -878
  37. package/dist/content/Avatar/index.d.ts +0 -886
  38. package/dist/content/Badge/index.d.ts +0 -887
  39. package/dist/content/Image/index.d.ts +0 -893
  40. package/dist/content/Label/index.d.ts +0 -879
  41. package/dist/content/Progress/index.d.ts +0 -898
  42. package/dist/content/Skeleton/index.d.ts +0 -879
  43. package/dist/content/Spinner/index.d.ts +0 -880
  44. package/dist/content/Text/index.d.ts +0 -878
  45. package/dist/content/index.d.ts +0 -9
  46. package/dist/core/StateWrapper.d.ts +0 -31
  47. package/dist/core/builder.d.ts +0 -58
  48. package/dist/core/component.d.ts +0 -7
  49. package/dist/core/effects.d.ts +0 -4
  50. package/dist/core/hooks.d.ts +0 -5
  51. package/dist/core/icons.d.ts +0 -11
  52. package/dist/core/index.d.ts +0 -6
  53. package/dist/core/state.d.ts +0 -86
  54. package/dist/core/types.d.ts +0 -51
  55. package/dist/demo.d.ts +0 -7
  56. package/dist/index.esm.js +0 -4777
  57. package/dist/index.umd.js +0 -251
  58. package/dist/interactive/Button/index.d.ts +0 -897
  59. package/dist/interactive/Checkbox/index.d.ts +0 -884
  60. package/dist/interactive/Combobox/index.d.ts +0 -898
  61. package/dist/interactive/RadioGroup/index.d.ts +0 -888
  62. package/dist/interactive/Select/index.d.ts +0 -895
  63. package/dist/interactive/Switch/index.d.ts +0 -881
  64. package/dist/interactive/TextField/index.d.ts +0 -893
  65. package/dist/interactive/Textarea/index.d.ts +0 -890
  66. package/dist/interactive/index.d.ts +0 -8
  67. package/dist/layout/Center/index.d.ts +0 -869
  68. package/dist/layout/Column/index.d.ts +0 -881
  69. package/dist/layout/Container/index.d.ts +0 -870
  70. package/dist/layout/DashboardLayout/index.d.ts +0 -870
  71. package/dist/layout/Header/index.d.ts +0 -870
  72. package/dist/layout/Line/index.d.ts +0 -872
  73. package/dist/layout/Row/index.d.ts +0 -879
  74. package/dist/layout/Scaffold/index.d.ts +0 -878
  75. package/dist/layout/ScrollView/index.d.ts +0 -879
  76. package/dist/layout/Sidebar/index.d.ts +0 -870
  77. package/dist/layout/Spacer/index.d.ts +0 -875
  78. package/dist/layout/StakentComponents.d.ts +0 -4
  79. package/dist/layout/index.d.ts +0 -11
  80. package/dist/structure/Banner/index.d.ts +0 -879
  81. package/dist/structure/Box/index.d.ts +0 -869
  82. package/dist/structure/Card/index.d.ts +0 -881
  83. package/dist/structure/Collapse/index.d.ts +0 -884
  84. package/dist/structure/Grid/index.d.ts +0 -1757
  85. package/dist/structure/List/index.d.ts +0 -888
  86. package/dist/structure/Table/index.d.ts +0 -895
  87. package/dist/structure/Tags/index.d.ts +0 -876
  88. package/dist/structure/cards/AssetCard/index.d.ts +0 -884
  89. package/dist/structure/cards/CollectionCard/index.d.ts +0 -880
  90. package/dist/structure/cards/ContentCard/index.d.ts +0 -884
  91. package/dist/structure/cards/ProfileCard/index.d.ts +0 -892
  92. package/dist/structure/cards/index.d.ts +0 -5
  93. package/dist/structure/cards/variants/index.d.ts +0 -3490
  94. package/dist/structure/index.d.ts +0 -9
  95. package/dist/theme/cupertino.d.ts +0 -3
  96. package/dist/theme/index.d.ts +0 -5
  97. package/dist/theme/material.d.ts +0 -3
  98. package/dist/theme/provider.d.ts +0 -16
  99. package/dist/theme/types.d.ts +0 -57
  100. package/dist/theme/web.d.ts +0 -3
  101. package/src/content/Alert/index.ts +0 -110
  102. package/src/content/Avatar/index.ts +0 -116
  103. package/src/content/Badge/index.ts +0 -162
  104. package/src/content/Image/index.ts +0 -137
  105. package/src/content/Label/index.ts +0 -66
  106. package/src/content/Progress/index.ts +0 -378
  107. package/src/content/Skeleton/index.ts +0 -71
  108. package/src/content/Spinner/index.ts +0 -139
  109. package/src/content/Text/index.ts +0 -74
  110. package/src/content/index.ts +0 -9
  111. package/src/core/StateWrapper.tsx +0 -131
  112. package/src/core/builder.ts +0 -301
  113. package/src/core/component.ts +0 -49
  114. package/src/core/effects.ts +0 -27
  115. package/src/core/hooks.ts +0 -48
  116. package/src/core/icons.tsx +0 -57
  117. package/src/core/index.ts +0 -6
  118. package/src/core/state.ts +0 -297
  119. package/src/core/types.ts +0 -62
  120. package/src/demo.tsx +0 -1050
  121. package/src/index.ts +0 -8
  122. package/src/interactive/Button/index.ts +0 -219
  123. package/src/interactive/Checkbox/index.ts +0 -145
  124. package/src/interactive/Combobox/index.ts +0 -278
  125. package/src/interactive/RadioGroup/index.ts +0 -124
  126. package/src/interactive/Select/index.ts +0 -227
  127. package/src/interactive/Switch/index.ts +0 -123
  128. package/src/interactive/TextField/index.ts +0 -223
  129. package/src/interactive/Textarea/index.ts +0 -129
  130. package/src/interactive/index.ts +0 -8
  131. package/src/layout/Center/index.ts +0 -34
  132. package/src/layout/Column/index.ts +0 -101
  133. package/src/layout/Container/index.ts +0 -28
  134. package/src/layout/DashboardLayout/index.ts +0 -106
  135. package/src/layout/Header/index.ts +0 -50
  136. package/src/layout/Line/index.ts +0 -41
  137. package/src/layout/Row/index.ts +0 -93
  138. package/src/layout/Scaffold/index.ts +0 -133
  139. package/src/layout/ScrollView/index.ts +0 -67
  140. package/src/layout/Sidebar/index.ts +0 -56
  141. package/src/layout/Spacer/index.ts +0 -46
  142. package/src/layout/StakentComponents.tsx +0 -57
  143. package/src/layout/index.ts +0 -11
  144. package/src/structure/Banner/index.ts +0 -92
  145. package/src/structure/Box/index.ts +0 -46
  146. package/src/structure/Card/index.ts +0 -113
  147. package/src/structure/Collapse/index.ts +0 -122
  148. package/src/structure/Grid/index.ts +0 -197
  149. package/src/structure/List/index.ts +0 -185
  150. package/src/structure/Table/index.ts +0 -165
  151. package/src/structure/Tags/index.ts +0 -69
  152. package/src/structure/cards/AssetCard/index.ts +0 -158
  153. package/src/structure/cards/CollectionCard/index.ts +0 -95
  154. package/src/structure/cards/ContentCard/index.ts +0 -127
  155. package/src/structure/cards/ProfileCard/index.ts +0 -152
  156. package/src/structure/cards/index.ts +0 -5
  157. package/src/structure/cards/variants/index.ts +0 -301
  158. package/src/structure/index.ts +0 -10
  159. package/src/styles/base.css +0 -186
  160. package/src/styles/core.css +0 -52
  161. package/src/styles/themes/cupertino.css +0 -197
  162. package/src/styles/themes/material.css +0 -322
  163. package/src/styles/themes/web.css +0 -196
  164. package/src/theme/cupertino.ts +0 -85
  165. package/src/theme/index.ts +0 -5
  166. package/src/theme/material.ts +0 -86
  167. package/src/theme/provider.tsx +0 -76
  168. package/src/theme/types.ts +0 -62
  169. package/src/theme/web.ts +0 -82
@@ -0,0 +1,1024 @@
1
+ "use client";
2
+ var ae = Object.defineProperty;
3
+ var le = (n, s, e) => s in n ? ae(n, s, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[s] = e;
4
+ var i = (n, s, e) => le(n, typeof s != "symbol" ? s + "" : s, e);
5
+ import t, { useState as D, useRef as L, useLayoutEffect as q, useEffect as oe } from "react";
6
+ import { h as w, F as I, l as T } from "./builder-6GkZlCaz.js";
7
+ import { B as C } from "./index-BaX5zy8O.js";
8
+ import { t as ce } from "./bundle-mjs-wppB-TKB.js";
9
+ import { T as de } from "./index-zOfPHD00.js";
10
+ const me = t.memo((n) => {
11
+ const { text: s, subtitle: e, number: r, color: d, className: p, style: o, children: u, ...g } = n;
12
+ return t.createElement(
13
+ "div",
14
+ {
15
+ 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 ${p || ""}`,
16
+ style: { backgroundColor: "#ffffff", ...o },
17
+ ...g
18
+ },
19
+ t.createElement(
20
+ "div",
21
+ { className: "flex flex-col gap-2" },
22
+ s && t.createElement(
23
+ "h3",
24
+ {
25
+ className: "font-semibold text-[var(--fibo-on-surface-variant)] text-sm uppercase tracking-wide"
26
+ },
27
+ s
28
+ ),
29
+ r && t.createElement(
30
+ "p",
31
+ {
32
+ className: "font-bold text-[var(--fibo-on-surface)] text-3xl"
33
+ },
34
+ r
35
+ ),
36
+ e && t.createElement(
37
+ "p",
38
+ {
39
+ className: "text-[var(--fibo-on-surface-variant)] text-xs"
40
+ },
41
+ e
42
+ ),
43
+ ...u
44
+ )
45
+ );
46
+ });
47
+ class he extends I {
48
+ constructor() {
49
+ super(...arguments);
50
+ i(this, "_text", "");
51
+ i(this, "_subtitle");
52
+ i(this, "_number");
53
+ i(this, "_color");
54
+ }
55
+ text(e) {
56
+ return this._text = e, this;
57
+ }
58
+ subtitle(e) {
59
+ return this._subtitle = e, this;
60
+ }
61
+ number(e) {
62
+ return this._number = e, this;
63
+ }
64
+ color(e) {
65
+ return this._color = e, this;
66
+ }
67
+ build() {
68
+ const e = {
69
+ green: "border-l-green-500",
70
+ orange: "border-l-orange-500",
71
+ red: "border-l-red-500",
72
+ blue: "border-l-blue-500",
73
+ purple: "border-l-purple-500"
74
+ }, r = [
75
+ "fibo-card",
76
+ this._color ? `border-l-4 ${e[this._color]}` : "",
77
+ ...this._classNames
78
+ ].filter(Boolean).join(" "), d = {
79
+ text: this._text,
80
+ subtitle: this._subtitle,
81
+ number: this._number,
82
+ color: this._color,
83
+ className: r,
84
+ style: this.getStyle(),
85
+ children: this.processChildren(),
86
+ ...this._props
87
+ };
88
+ return t.createElement(me, d);
89
+ }
90
+ }
91
+ const je = w(he);
92
+ class V {
93
+ constructor() {
94
+ i(this, "styles", /* @__PURE__ */ new Map());
95
+ }
96
+ bg(s) {
97
+ return this.styles.set("background-color", s), this;
98
+ }
99
+ color(s) {
100
+ return this.styles.set("color", s), this;
101
+ }
102
+ opacity(s) {
103
+ return this.styles.set("opacity", String(s)), this;
104
+ }
105
+ borderColor(s) {
106
+ return this.styles.set("border-color", s), this;
107
+ }
108
+ transform(s) {
109
+ return this.styles.set("transform", s), this;
110
+ }
111
+ scale(s) {
112
+ return this.styles.set("transform", `scale(${s})`), this;
113
+ }
114
+ translateX(s) {
115
+ const e = typeof s == "number" ? `${s}px` : s;
116
+ return this.styles.set("transform", `translateX(${e})`), this;
117
+ }
118
+ translateY(s) {
119
+ const e = typeof s == "number" ? `${s}px` : s;
120
+ return this.styles.set("transform", `translateY(${e})`), this;
121
+ }
122
+ shadow(s) {
123
+ return this.styles.set("box-shadow", s), this;
124
+ }
125
+ css(s, e) {
126
+ return this.styles.set(s, e), this;
127
+ }
128
+ toCSSString() {
129
+ const s = [];
130
+ return this.styles.forEach((e, r) => {
131
+ s.push(`${r}: ${e}`);
132
+ }), s.join("; ") + ";";
133
+ }
134
+ }
135
+ const ue = 100, J = 60, K = 5, pe = t.memo((n) => {
136
+ const {
137
+ items: s,
138
+ renderItem: e,
139
+ variant: r,
140
+ separator: d,
141
+ loading: p,
142
+ threshold: o,
143
+ onEndReached: u,
144
+ className: g,
145
+ style: x,
146
+ containerHeight: v = 500,
147
+ resetItemStyles: m = !1,
148
+ direction: a = "vertical",
149
+ customItemHover: c,
150
+ customItemActive: _,
151
+ customItemFocus: y
152
+ } = n, [H, Q] = D(0), [ee, te] = D(0), se = L(null), R = L(/* @__PURE__ */ new Map()), O = L(/* @__PURE__ */ new Map()), F = L(null), b = a === "horizontal", $ = s.length, B = $ > ue, A = (h) => O.current.get(h) ?? J, j = (h) => {
153
+ let l = 0;
154
+ for (let f = 0; f < h; f++)
155
+ l += A(f);
156
+ return l;
157
+ }, re = () => {
158
+ let h = 0;
159
+ for (let l = 0; l < $; l++)
160
+ h += A(l);
161
+ return h;
162
+ }, ie = (h) => {
163
+ let l = 0, f = $ - 1;
164
+ for (; l < f; ) {
165
+ const N = Math.floor((l + f) / 2);
166
+ j(N) < h ? l = N + 1 : f = N;
167
+ }
168
+ return Math.max(0, l - 1);
169
+ };
170
+ let S = 0, X = $, G = 0, M = 0;
171
+ if (B) {
172
+ S = Math.max(0, ie(H) - K);
173
+ let h = j(S), l = S;
174
+ for (; h < H + v + K * J && l < $; )
175
+ h += A(l), l++;
176
+ X = Math.min($, l), G = j(S), M = re();
177
+ }
178
+ const P = s.slice(S, X);
179
+ q(() => {
180
+ if (!B) return;
181
+ let h = !1;
182
+ P.forEach((l, f) => {
183
+ const N = S + f, k = R.current.get(N);
184
+ if (k) {
185
+ const Z = k.getBoundingClientRect(), z = b ? Z.width : Z.height;
186
+ z > 0 && O.current.get(N) !== z && (O.current.set(N, z), h = !0);
187
+ }
188
+ }), h && te((l) => l + 1);
189
+ }, [P, S, B, b, ee]), q(() => {
190
+ if (!u || p) return;
191
+ const h = new IntersectionObserver(
192
+ (l) => {
193
+ l[0].isIntersecting && (u == null || u());
194
+ },
195
+ { threshold: o }
196
+ );
197
+ return F.current && h.observe(F.current), () => h.disconnect();
198
+ }, [p, s.length, u, o]);
199
+ const ne = (h) => {
200
+ B && Q(b ? h.currentTarget.scrollLeft : h.currentTarget.scrollTop);
201
+ };
202
+ oe(() => {
203
+ if (typeof document > "u" || !c && !_ && !y) return;
204
+ const h = "fibo-list-custom-styles";
205
+ let l = document.getElementById(h);
206
+ l || (l = document.createElement("style"), l.id = h, document.head.appendChild(l));
207
+ let f = "";
208
+ return c && (f += `.fibo-list-item-custom-hover:hover { ${c} }
209
+ `), _ && (f += `.fibo-list-item-custom-active:active { ${_} }
210
+ `), y && (f += `.fibo-list-item-custom-focus:focus { ${y} }
211
+ `), l.textContent = f, () => {
212
+ };
213
+ }, [c, _, y]);
214
+ const Y = {
215
+ default: { gap: "0px" },
216
+ card: { gap: "12px" },
217
+ floating: { gap: "8px" }
218
+ }, W = m ? {
219
+ default: {},
220
+ card: {},
221
+ floating: {}
222
+ } : {
223
+ default: {
224
+ padding: "12px 16px",
225
+ borderBottom: d ? "1px solid #F3F4F6" : "none",
226
+ backgroundColor: "transparent",
227
+ transition: "background-color 0.2s"
228
+ },
229
+ card: {
230
+ padding: "16px",
231
+ backgroundColor: "#fff",
232
+ borderRadius: "16px",
233
+ boxShadow: "0 2px 8px -2px rgba(0,0,0,0.05)",
234
+ border: "1px solid #F3F4F6",
235
+ transition: "transform 0.2s, box-shadow 0.2s"
236
+ },
237
+ floating: {
238
+ padding: "8px 12px",
239
+ borderRadius: "12px",
240
+ backgroundColor: "transparent",
241
+ transition: "background-color 0.2s"
242
+ }
243
+ }, E = [];
244
+ c && E.push("fibo-list-item-custom-hover"), _ && E.push("fibo-list-item-custom-active"), y && E.push("fibo-list-item-custom-focus");
245
+ const U = m ? {
246
+ default: [...E],
247
+ card: [...E],
248
+ floating: [...E]
249
+ } : {
250
+ default: ["hover:bg-gray-50", "first:rounded-t-xl", "last:rounded-b-xl", ...E],
251
+ card: ["hover:-translate-y-0.5", "hover:shadow-md", ...E],
252
+ floating: ["hover:bg-white", "hover:shadow-sm", ...E]
253
+ };
254
+ return B ? t.createElement(
255
+ "div",
256
+ {
257
+ ref: se,
258
+ className: `fibo-list fibo-list-virtualized ${g || ""}`,
259
+ style: {
260
+ height: b ? void 0 : `${v}px`,
261
+ width: b ? `${v}px` : void 0,
262
+ overflowY: b ? "hidden" : "auto",
263
+ overflowX: b ? "auto" : "hidden",
264
+ position: "relative",
265
+ display: "flex",
266
+ flexDirection: b ? "row" : "column",
267
+ ...Y[r],
268
+ ...x
269
+ },
270
+ onScroll: ne
271
+ },
272
+ t.createElement("div", {
273
+ style: {
274
+ height: b ? "1px" : `${M}px`,
275
+ width: b ? `${M}px` : "1px",
276
+ position: "absolute",
277
+ top: 0,
278
+ left: 0,
279
+ visibility: "hidden",
280
+ pointerEvents: "none"
281
+ }
282
+ }),
283
+ t.createElement(
284
+ "div",
285
+ {
286
+ style: {
287
+ transform: b ? `translateX(${G}px)` : `translateY(${G}px)`,
288
+ width: b ? "auto" : "100%",
289
+ height: b ? "100%" : void 0,
290
+ display: b ? "flex" : void 0,
291
+ flexDirection: b ? "row" : void 0
292
+ }
293
+ },
294
+ P.map((h, l) => {
295
+ const f = S + l, N = e ? e(h, f) : null;
296
+ return t.cloneElement(
297
+ C().style(W[r]).classNames(U[r]).children(N).build(),
298
+ {
299
+ key: `item-${f}`,
300
+ ref: (k) => {
301
+ k ? R.current.set(f, k) : R.current.delete(f);
302
+ }
303
+ }
304
+ );
305
+ })
306
+ ),
307
+ u && t.createElement("div", {
308
+ ref: F,
309
+ className: "py-4 flex justify-center w-full"
310
+ }, p ? t.createElement("div", { className: "animate-spin rounded-full h-5 w-5 border-2 border-gray-300 border-b-blue-600" }) : t.createElement("div", { style: { height: "20px" } }))
311
+ ) : C().className(g).classNames(["flex", a === "horizontal" ? "flex-row" : "flex-col", "w-full"]).style({
312
+ ...Y[r],
313
+ ...x
314
+ }).children(
315
+ t.createElement(t.Fragment, {}, [
316
+ ...s.map(
317
+ (h, l) => t.cloneElement(
318
+ C().style(W[r]).classNames(U[r]).children(
319
+ e ? e(h, l) : null
320
+ ).build(),
321
+ { key: `item-${l}` }
322
+ )
323
+ ),
324
+ u && t.createElement("div", {
325
+ ref: F,
326
+ className: "py-4 flex justify-center w-full"
327
+ }, p ? t.createElement("div", { className: "animate-spin rounded-full h-5 w-5 border-2 border-gray-300 border-b-blue-600" }) : t.createElement("div", { style: { height: "20px" } }))
328
+ ])
329
+ ).build();
330
+ });
331
+ class fe extends I {
332
+ constructor() {
333
+ super(...arguments);
334
+ i(this, "_items", []);
335
+ i(this, "_renderItem");
336
+ i(this, "_variant", "default");
337
+ i(this, "_separator", !1);
338
+ i(this, "_onEndReached");
339
+ i(this, "_loading", !1);
340
+ i(this, "_threshold", 0.5);
341
+ i(this, "_containerHeight", 500);
342
+ i(this, "_resetItemStyles", !1);
343
+ i(this, "_direction", "vertical");
344
+ i(this, "_customItemHover");
345
+ i(this, "_customItemActive");
346
+ i(this, "_customItemFocus");
347
+ }
348
+ items(e) {
349
+ return this._items = e, this;
350
+ }
351
+ renderItem(e) {
352
+ return this._renderItem = e, this;
353
+ }
354
+ variant(e) {
355
+ return this._variant = e, this;
356
+ }
357
+ separator(e = !0) {
358
+ return this._separator = e, this;
359
+ }
360
+ onEndReached(e) {
361
+ return this._onEndReached = e, this;
362
+ }
363
+ loading(e) {
364
+ return this._loading = e, this;
365
+ }
366
+ threshold(e) {
367
+ return this._threshold = e, this;
368
+ }
369
+ containerHeight(e) {
370
+ return this._containerHeight = e, this;
371
+ }
372
+ resetItemStyles(e = !0) {
373
+ return this._resetItemStyles = e, this;
374
+ }
375
+ direction(e) {
376
+ return this._direction = e, this;
377
+ }
378
+ reset() {
379
+ return this._resetItemStyles = !0, this;
380
+ }
381
+ itemHover(e) {
382
+ if (typeof e == "function") {
383
+ const r = new V();
384
+ e(r), this._customItemHover = r.toCSSString();
385
+ } else
386
+ this._customItemHover = e;
387
+ return this;
388
+ }
389
+ itemActive(e) {
390
+ if (typeof e == "function") {
391
+ const r = new V();
392
+ e(r), this._customItemActive = r.toCSSString();
393
+ } else
394
+ this._customItemActive = e;
395
+ return this;
396
+ }
397
+ itemFocus(e) {
398
+ if (typeof e == "function") {
399
+ const r = new V();
400
+ e(r), this._customItemFocus = r.toCSSString();
401
+ } else
402
+ this._customItemFocus = e;
403
+ return this;
404
+ }
405
+ build() {
406
+ const e = {
407
+ items: this._items,
408
+ renderItem: this._renderItem,
409
+ variant: this._variant,
410
+ separator: this._separator,
411
+ loading: this._loading,
412
+ threshold: this._threshold,
413
+ onEndReached: this._onEndReached,
414
+ containerHeight: this._containerHeight,
415
+ resetItemStyles: this._resetItemStyles,
416
+ direction: this._direction,
417
+ customItemHover: this._customItemHover,
418
+ customItemActive: this._customItemActive,
419
+ customItemFocus: this._customItemFocus,
420
+ className: this.getClassName(),
421
+ style: this.getStyle()
422
+ };
423
+ return t.createElement(pe, e);
424
+ }
425
+ }
426
+ const Ge = w(fe), ge = () => t.createElement(
427
+ "svg",
428
+ {
429
+ width: 12,
430
+ height: 12,
431
+ viewBox: "0 0 24 24",
432
+ fill: "none",
433
+ stroke: "currentColor",
434
+ strokeWidth: 2,
435
+ "aria-hidden": !0
436
+ },
437
+ t.createElement("path", { d: "M9 5l7 7-7 7" })
438
+ ), _e = t.memo((n) => {
439
+ const {
440
+ leading: s,
441
+ title: e,
442
+ subtitle: r,
443
+ trailing: d,
444
+ chevron: p,
445
+ divider: o,
446
+ dividerColor: u,
447
+ onPress: g,
448
+ className: x,
449
+ style: v,
450
+ ...m
451
+ } = n, a = v || {}, c = a.padding ?? "14px 0", _ = typeof e == "string" ? t.createElement(
452
+ "span",
453
+ {
454
+ className: "fibo-list-tile-title",
455
+ style: { fontSize: 11, letterSpacing: "0.06em", lineHeight: 1.3, margin: 0 }
456
+ },
457
+ e
458
+ ) : e, y = typeof r == "string" ? t.createElement(
459
+ "span",
460
+ {
461
+ className: "fibo-list-tile-subtitle",
462
+ style: {
463
+ fontSize: 8,
464
+ letterSpacing: "0.06em",
465
+ lineHeight: 1.3,
466
+ margin: 0,
467
+ color: "#9a9a9a"
468
+ }
469
+ },
470
+ r
471
+ ) : r;
472
+ return t.createElement(
473
+ "div",
474
+ {
475
+ className: ce("fibo-list-tile flex flex-row items-center w-full", x),
476
+ style: {
477
+ padding: c,
478
+ borderBottom: o ? `1px solid ${u || "#3b3b3b"}` : "none",
479
+ cursor: g ? "pointer" : void 0,
480
+ ...a
481
+ },
482
+ onClick: g,
483
+ role: g ? "button" : void 0,
484
+ ...m
485
+ },
486
+ s ? t.createElement(
487
+ "div",
488
+ {
489
+ key: "leading",
490
+ className: "fibo-list-tile-leading shrink-0 flex items-center",
491
+ style: { color: "#9a9a9a", marginRight: 12 }
492
+ },
493
+ s
494
+ ) : null,
495
+ t.createElement(
496
+ "div",
497
+ {
498
+ key: "body",
499
+ className: "fibo-list-tile-body flex-1 min-w-0 flex flex-col justify-center"
500
+ },
501
+ _,
502
+ y
503
+ ),
504
+ d ? t.createElement(
505
+ "div",
506
+ {
507
+ key: "trailing",
508
+ className: "fibo-list-tile-trailing shrink-0 flex items-center",
509
+ style: { color: "#9a9a9a", marginLeft: 12 }
510
+ },
511
+ d
512
+ ) : null,
513
+ p ? t.createElement(
514
+ "div",
515
+ {
516
+ key: "chevron",
517
+ className: "fibo-list-tile-chevron shrink-0 flex items-center",
518
+ style: { color: "#9a9a9a", marginLeft: d ? 8 : 0 }
519
+ },
520
+ t.createElement(ge)
521
+ ) : null
522
+ );
523
+ });
524
+ class be extends I {
525
+ constructor() {
526
+ super(...arguments);
527
+ i(this, "_leading");
528
+ i(this, "_title");
529
+ i(this, "_subtitle");
530
+ i(this, "_trailing");
531
+ i(this, "_chevron", !1);
532
+ i(this, "_divider", !1);
533
+ i(this, "_dividerColor");
534
+ i(this, "_onPress");
535
+ }
536
+ leading(e) {
537
+ return this._leading = T(e), this;
538
+ }
539
+ icon(e) {
540
+ return this.leading(e);
541
+ }
542
+ title(e) {
543
+ return this._title = typeof e == "string" ? e : T(e), this;
544
+ }
545
+ subtitle(e) {
546
+ return this._subtitle = typeof e == "string" ? e : T(e), this;
547
+ }
548
+ trailing(e) {
549
+ return this._trailing = T(e), this;
550
+ }
551
+ chevron(e = !0) {
552
+ return this._chevron = e, this;
553
+ }
554
+ divider(e = !0, r) {
555
+ return this._divider = e, r && (this._dividerColor = r), this;
556
+ }
557
+ onPress(e) {
558
+ return this._onPress = e, this;
559
+ }
560
+ build() {
561
+ return t.createElement(_e, {
562
+ leading: this._leading,
563
+ title: this._title,
564
+ subtitle: this._subtitle,
565
+ trailing: this._trailing,
566
+ chevron: this._chevron,
567
+ divider: this._divider,
568
+ dividerColor: this._dividerColor,
569
+ onPress: this._onPress,
570
+ className: this.getClassName(),
571
+ style: this.getStyle(),
572
+ ...this._props
573
+ });
574
+ }
575
+ }
576
+ const Me = w(be), ye = t.memo((n) => {
577
+ const {
578
+ data: s,
579
+ columns: e,
580
+ variant: r,
581
+ density: d,
582
+ striped: p,
583
+ width: o,
584
+ className: u,
585
+ style: g
586
+ } = n, x = {
587
+ width: "100%",
588
+ borderCollapse: "separate",
589
+ borderSpacing: "0",
590
+ ...g
591
+ };
592
+ o && (x.width = typeof o == "number" ? `${o}px` : o);
593
+ const v = r === "clean" ? ["bg-white", "rounded-2xl", "border", "border-gray-100", "overflow-hidden", "shadow-sm"] : [], a = {
594
+ compact: "10px 16px",
595
+ standard: "16px 24px",
596
+ relaxed: "24px 32px"
597
+ }[d];
598
+ return C().className(u).classNames(v).children(
599
+ t.createElement("table", { style: x }, [
600
+ t.createElement(
601
+ "thead",
602
+ { key: "thead", className: "bg-gray-50/50" },
603
+ t.createElement(
604
+ "tr",
605
+ {},
606
+ e.map(
607
+ (c, _) => t.createElement("th", {
608
+ key: String(c.accessor ?? c.header ?? _),
609
+ scope: "col",
610
+ style: {
611
+ textAlign: c.align || "left",
612
+ padding: a,
613
+ width: c.width
614
+ },
615
+ className: "text-xs font-bold text-gray-400 uppercase tracking-widest"
616
+ }, c.header)
617
+ )
618
+ )
619
+ ),
620
+ t.createElement(
621
+ "tbody",
622
+ { key: "tbody" },
623
+ s.map(
624
+ (c, _) => t.createElement(
625
+ "tr",
626
+ {
627
+ key: (c == null ? void 0 : c.id) ?? (c == null ? void 0 : c.key) ?? _,
628
+ className: `group transition-all duration-200 border-b border-gray-50 last:border-b-0 ${p && _ % 2 !== 0 ? "bg-gray-50/30" : "bg-transparent"} ${r === "clean" ? "hover:bg-white hover:shadow-md hover:scale-[1.002] hover:z-10 relative" : "hover:bg-gray-50/50"}`
629
+ },
630
+ e.map(
631
+ (y, H) => t.createElement(
632
+ "td",
633
+ {
634
+ key: H,
635
+ style: {
636
+ textAlign: y.align || "left",
637
+ padding: a,
638
+ borderTop: r === "default" ? "1px solid #F3F4F6" : "none"
639
+ },
640
+ className: "text-sm text-gray-900 font-medium"
641
+ },
642
+ y.render ? y.render(c) : y.accessor ? c[y.accessor] : null
643
+ )
644
+ )
645
+ )
646
+ )
647
+ )
648
+ ])
649
+ ).build();
650
+ });
651
+ class xe extends I {
652
+ constructor() {
653
+ super(...arguments);
654
+ i(this, "_data", []);
655
+ i(this, "_columns", []);
656
+ i(this, "_variant", "clean");
657
+ i(this, "_density", "standard");
658
+ i(this, "_striped", !1);
659
+ i(this, "_width");
660
+ }
661
+ data(e) {
662
+ return this._data = e, this;
663
+ }
664
+ columns(e) {
665
+ return this._columns = e, this;
666
+ }
667
+ variant(e) {
668
+ return this._variant = e, this;
669
+ }
670
+ density(e) {
671
+ return this._density = e, this;
672
+ }
673
+ striped(e = !0) {
674
+ return this._striped = e, this;
675
+ }
676
+ width(e) {
677
+ return this._width = e, this;
678
+ }
679
+ build() {
680
+ const e = {
681
+ data: this._data,
682
+ columns: this._columns,
683
+ variant: this._variant,
684
+ density: this._density,
685
+ striped: this._striped,
686
+ width: this._width,
687
+ className: this.getClassName(),
688
+ style: this.getStyle()
689
+ };
690
+ return t.createElement(ye, e);
691
+ }
692
+ }
693
+ const Pe = w(xe), ve = t.memo((n) => {
694
+ const { items: s, className: e, style: r, ...d } = n, p = s.map(
695
+ (o, u) => t.createElement(
696
+ "span",
697
+ {
698
+ key: o.title ? `${o.title}-${u}` : `tag-${u}`,
699
+ className: "fibo-tag"
700
+ },
701
+ o.title
702
+ )
703
+ );
704
+ return t.createElement(
705
+ "div",
706
+ {
707
+ className: e,
708
+ style: r,
709
+ ...d
710
+ },
711
+ ...p
712
+ );
713
+ });
714
+ class Ee extends I {
715
+ constructor(e = []) {
716
+ super();
717
+ i(this, "_items", []);
718
+ this._items = e;
719
+ }
720
+ items(e) {
721
+ return this._items = e, this;
722
+ }
723
+ build() {
724
+ const e = ["fibo-tags", "flex", "gap-2", "flex-wrap", ...this._classNames].filter(Boolean).join(" "), r = {
725
+ items: this._items,
726
+ className: e,
727
+ style: this.getStyle(),
728
+ ...this._props
729
+ };
730
+ return t.createElement(ve, r);
731
+ }
732
+ }
733
+ const ze = w(Ee), Ne = t.memo((n) => {
734
+ const { status: s, title: e, subtitle: r, className: d, style: p, ...o } = n;
735
+ return t.createElement(
736
+ "div",
737
+ {
738
+ className: d,
739
+ style: p,
740
+ ...o
741
+ },
742
+ t.createElement(
743
+ "div",
744
+ { className: "flex flex-col gap-1" },
745
+ e && t.createElement(
746
+ "h4",
747
+ {
748
+ className: "font-semibold text-sm uppercase tracking-wide opacity-90"
749
+ },
750
+ e
751
+ ),
752
+ r && t.createElement(
753
+ "p",
754
+ {
755
+ className: "opacity-80 text-sm"
756
+ },
757
+ r
758
+ )
759
+ )
760
+ );
761
+ });
762
+ class we extends I {
763
+ constructor(e = "") {
764
+ super();
765
+ i(this, "_status", "info");
766
+ i(this, "_title", "");
767
+ i(this, "_subtitle");
768
+ this._title = e;
769
+ }
770
+ status(e) {
771
+ return this._status = e, this;
772
+ }
773
+ title(e) {
774
+ return this._title = e, this;
775
+ }
776
+ subtitle(e) {
777
+ return this._subtitle = e, this;
778
+ }
779
+ build() {
780
+ const r = [
781
+ "fibo-banner",
782
+ `fibo-banner-${this._status}`,
783
+ ...this._classNames
784
+ ].filter(Boolean).join(" "), d = {
785
+ status: this._status,
786
+ title: this._title,
787
+ subtitle: this._subtitle,
788
+ className: r,
789
+ style: this.getStyle(),
790
+ ...this._props
791
+ };
792
+ return t.createElement(Ne, d);
793
+ }
794
+ }
795
+ const Ve = w(we);
796
+ class Ie extends I {
797
+ constructor() {
798
+ super(...arguments);
799
+ i(this, "_title", "");
800
+ i(this, "_content", null);
801
+ i(this, "_defaultExpanded", !1);
802
+ i(this, "_expanded");
803
+ i(this, "_onToggle");
804
+ }
805
+ title(e) {
806
+ return this._title = e, this;
807
+ }
808
+ content(e) {
809
+ return this._content = T(e), this;
810
+ }
811
+ isOpen(e) {
812
+ return this._expanded = e, this;
813
+ }
814
+ defaultOpen(e) {
815
+ return this._defaultExpanded = e, this;
816
+ }
817
+ onToggle(e) {
818
+ return this._onToggle = e, this;
819
+ }
820
+ build() {
821
+ return t.createElement(Se, {
822
+ builder: this,
823
+ ...this._props
824
+ });
825
+ }
826
+ }
827
+ const Se = t.memo(({ builder: n }) => {
828
+ const s = t.useId(), e = `${s}-content`, r = n._expanded !== void 0, [d, p] = D(n._defaultExpanded), o = r ? n._expanded : d, u = () => {
829
+ r || p(!o), n._onToggle && n._onToggle(!o);
830
+ };
831
+ return C().classNames(["w-full", "border", "border-gray-200", "rounded-xl", "overflow-hidden", "bg-white", "transition-all", "duration-300"]).className(n.getClassName()).style(n.getStyle()).children([
832
+ t.createElement("button", {
833
+ key: "header",
834
+ type: "button",
835
+ id: s,
836
+ "aria-expanded": o,
837
+ "aria-controls": e,
838
+ className: "w-full flex items-center justify-between p-4 cursor-pointer hover:bg-gray-50 transition-colors select-none text-left bg-transparent border-0",
839
+ onClick: u
840
+ }, [
841
+ t.createElement(
842
+ t.Fragment,
843
+ { key: "title" },
844
+ typeof n._title == "string" ? de(n._title).fontWeight(600).fontSize(15).color("#1F2937").build() : n._title
845
+ ),
846
+ t.createElement("span", {
847
+ key: "chevron",
848
+ className: "transition-transform duration-300",
849
+ style: { transform: o ? "rotate(180deg)" : "rotate(0deg)" },
850
+ "aria-hidden": !0
851
+ }, t.createElement("svg", {
852
+ width: "20",
853
+ height: "20",
854
+ viewBox: "0 0 24 24",
855
+ fill: "none",
856
+ stroke: "currentColor",
857
+ strokeWidth: "2",
858
+ strokeLinecap: "round",
859
+ strokeLinejoin: "round",
860
+ className: "text-gray-400"
861
+ }, t.createElement("polyline", { points: "6 9 12 15 18 9" })))
862
+ ]),
863
+ C().props({
864
+ id: e,
865
+ role: "region",
866
+ "aria-labelledby": s,
867
+ hidden: !o || void 0
868
+ }).classNames(["transition-all", "duration-300", "ease-in-out", "overflow-hidden"]).style({
869
+ maxHeight: o ? "500px" : "0px",
870
+ opacity: o ? 1 : 0
871
+ }).children(
872
+ C().classNames(["p-4", "pt-0", "text-gray-600", "text-sm"]).children(n._content).build()
873
+ ).build()
874
+ ]).build();
875
+ }), De = w(Ie), Ce = t.memo((n) => {
876
+ const {
877
+ children: s,
878
+ variant: e = "standard",
879
+ columns: r = 1,
880
+ gap: d = "md",
881
+ className: p,
882
+ style: o,
883
+ ...u
884
+ } = n, g = (m) => typeof m == "number" ? "" : {
885
+ none: "gap-0",
886
+ sm: "gap-2",
887
+ md: "gap-4",
888
+ lg: "gap-6",
889
+ xl: "gap-8"
890
+ }[m] || "gap-4", x = (m) => {
891
+ if (typeof m == "number") return m + "px";
892
+ }, v = (m) => {
893
+ if (typeof m == "number") return `grid-cols-${m}`;
894
+ let a = [];
895
+ return m.sm && a.push(`sm:grid-cols-${m.sm}`), m.md && a.push(`md:grid-cols-${m.md}`), m.lg && a.push(`lg:grid-cols-${m.lg}`), m.xl && a.push(`xl:grid-cols-${m.xl}`), a.join(" ") || "grid-cols-1";
896
+ };
897
+ if (e === "bento") {
898
+ const m = [
899
+ { col: 2, row: 2 },
900
+ { col: 1, row: 1 },
901
+ { col: 1, row: 1 },
902
+ { col: 1, row: 2 },
903
+ { col: 2, row: 1 }
904
+ ];
905
+ return t.createElement("div", {
906
+ className: `grid ${v(r)} ${g(d)} ${p}`,
907
+ style: {
908
+ gap: x(d),
909
+ gridAutoFlow: "dense",
910
+ ...o
911
+ },
912
+ ...u
913
+ }, t.Children.map(s, (a, c) => {
914
+ if (t.isValidElement(a) && typeof a.props.className == "string" && a.props.className.includes("col-span"))
915
+ return a;
916
+ const _ = m[c % m.length];
917
+ return t.createElement("div", {
918
+ key: t.isValidElement(a) && a.key != null ? a.key : c,
919
+ style: { gridColumn: `span ${_.col}`, gridRow: `span ${_.row}` }
920
+ }, a);
921
+ }));
922
+ }
923
+ if (e === "masonry") {
924
+ const m = (a) => {
925
+ if (typeof a == "number") return `columns-${a}`;
926
+ let c = [];
927
+ return a.sm && c.push(`sm:columns-${a.sm}`), a.md && c.push(`md:columns-${a.md}`), a.lg && c.push(`lg:columns-${a.lg}`), a.xl && c.push(`xl:columns-${a.xl}`), c.join(" ") || "columns-1";
928
+ };
929
+ return t.createElement("div", {
930
+ className: `${m(r)} ${g(d)} space-y-4 ${p}`,
931
+ style: {
932
+ columnGap: x(d),
933
+ ...o
934
+ },
935
+ ...u
936
+ }, t.Children.map(
937
+ s,
938
+ (a) => t.createElement("div", { className: "break-inside-avoid mb-4" }, a)
939
+ ));
940
+ }
941
+ return t.createElement("div", {
942
+ className: `grid ${v(r)} ${g(d)} ${p}`,
943
+ style: {
944
+ gap: x(d),
945
+ ...o
946
+ },
947
+ ...u
948
+ }, s);
949
+ }), $e = t.memo((n) => {
950
+ const { children: s, colSpan: e, rowSpan: r, className: d, style: p, ...o } = n, u = () => {
951
+ let g = [];
952
+ return e && g.push(`col-span-${e}`), r && g.push(`row-span-${r}`), g.join(" ");
953
+ };
954
+ return t.createElement("div", {
955
+ className: `${u()} ${d}`,
956
+ style: p,
957
+ ...o
958
+ }, s);
959
+ });
960
+ class ke extends I {
961
+ constructor() {
962
+ super(...arguments);
963
+ i(this, "_variant", "standard");
964
+ i(this, "_columns", 1);
965
+ i(this, "_gap", "md");
966
+ }
967
+ variant(e) {
968
+ return this._variant = e, this;
969
+ }
970
+ columns(e) {
971
+ return this._columns = e, this;
972
+ }
973
+ gap(e) {
974
+ return this._gap = e, this;
975
+ }
976
+ build() {
977
+ const e = {
978
+ variant: this._variant,
979
+ columns: this._columns,
980
+ gap: this._gap,
981
+ children: this.processChildren(),
982
+ className: this.getClassName(),
983
+ style: this.getStyle(),
984
+ ...this._props
985
+ };
986
+ return t.createElement(Ce, e);
987
+ }
988
+ }
989
+ class Be extends I {
990
+ constructor() {
991
+ super(...arguments);
992
+ i(this, "_colSpan");
993
+ i(this, "_rowSpan");
994
+ }
995
+ colSpan(e) {
996
+ return this._colSpan = e, this;
997
+ }
998
+ rowSpan(e) {
999
+ return this._rowSpan = e, this;
1000
+ }
1001
+ build() {
1002
+ const e = {
1003
+ colSpan: this._colSpan,
1004
+ rowSpan: this._rowSpan,
1005
+ children: this.processChildren(),
1006
+ className: this.getClassName(),
1007
+ style: this.getStyle(),
1008
+ ...this._props
1009
+ };
1010
+ return t.createElement($e, e);
1011
+ }
1012
+ }
1013
+ const Xe = w(ke), Ye = w(Be);
1014
+ export {
1015
+ Ve as B,
1016
+ je as C,
1017
+ Xe as G,
1018
+ Ge as L,
1019
+ Pe as T,
1020
+ Me as a,
1021
+ ze as b,
1022
+ De as c,
1023
+ Ye as d
1024
+ };