fiboui 1.0.2 → 2.0.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 +138 -92
  2. package/dist/FineGrain-kBxv0WeR.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-DjLYXkXu.js +1842 -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-B1av7e36.js +1102 -0
  18. package/dist/index-BQGRpkzR.js +1024 -0
  19. package/dist/index-CTRZRn9S.js +90 -0
  20. package/dist/index-DKFr-sai.js +33 -0
  21. package/dist/index-Dm4j2mMM.js +1031 -0
  22. package/dist/index-RbfIZuAo.js +119 -0
  23. package/dist/index-yeYkDTAx.js +778 -0
  24. package/dist/index.d.ts +43753 -6
  25. package/dist/index.js +2054 -0
  26. package/dist/interactive.js +12 -0
  27. package/dist/layout.js +18 -0
  28. package/dist/mount-sAVX_FBU.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
package/dist/index.esm.js DELETED
@@ -1,4777 +0,0 @@
1
- var ne = Object.defineProperty;
2
- var oe = (i, t, e) => t in i ? ne(i, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[t] = e;
3
- var n = (i, t, e) => oe(i, typeof t != "symbol" ? t + "" : t, e);
4
- import s, { createContext as X, useState as $, useRef as U, useEffect as M, useContext as Y } from "react";
5
- import { jsx as S, Fragment as J, jsxs as O } from "react/jsx-runtime";
6
- let A = null;
7
- class le {
8
- constructor(t) {
9
- n(this, "dependencies", /* @__PURE__ */ new Set());
10
- n(this, "_onDispose");
11
- this.fn = t, this.run();
12
- }
13
- run() {
14
- const t = A;
15
- A = this;
16
- try {
17
- this.cleanup(), this.fn();
18
- } finally {
19
- A = t;
20
- }
21
- }
22
- track(t) {
23
- this.dependencies.add(t), t.subscribeEffect(this);
24
- }
25
- trigger() {
26
- this.run();
27
- }
28
- cleanup() {
29
- this.dependencies.forEach((t) => t.unsubscribeEffect(this)), this.dependencies.clear();
30
- }
31
- dispose() {
32
- var t;
33
- this.cleanup(), (t = this._onDispose) == null || t.call(this);
34
- }
35
- }
36
- class ae {
37
- constructor(t) {
38
- n(this, "dependencies", /* @__PURE__ */ new Set());
39
- this._onInvalidate = t;
40
- }
41
- execute(t) {
42
- const e = A;
43
- A = this;
44
- try {
45
- return this.cleanup(), t();
46
- } finally {
47
- A = e;
48
- }
49
- }
50
- // Called by Signals when they are accessed
51
- track(t) {
52
- this.dependencies.add(t), t.subscribeEffect(this);
53
- }
54
- // Called by Signals when they change
55
- trigger() {
56
- this._onInvalidate();
57
- }
58
- cleanup() {
59
- this.dependencies.forEach((t) => t.unsubscribeEffect(this)), this.dependencies.clear();
60
- }
61
- dispose() {
62
- this.cleanup();
63
- }
64
- }
65
- class Z {
66
- constructor(t) {
67
- n(this, "listeners", /* @__PURE__ */ new Set());
68
- n(this, "effects", /* @__PURE__ */ new Set());
69
- this._value = t;
70
- }
71
- get value() {
72
- return A && A.track(this), this._value;
73
- }
74
- set value(t) {
75
- this._value !== t && (this._value = t, this.notify());
76
- }
77
- subscribe(t) {
78
- return this.listeners.add(t), () => this.listeners.delete(t);
79
- }
80
- subscribeEffect(t) {
81
- this.effects.add(t);
82
- }
83
- unsubscribeEffect(t) {
84
- this.effects.delete(t);
85
- }
86
- notify() {
87
- const t = Array.from(this.effects), e = Array.from(this.listeners);
88
- t.forEach((r) => r.trigger()), e.forEach((r) => r(this._value));
89
- }
90
- }
91
- function cs(i) {
92
- return new Z(i);
93
- }
94
- class ce {
95
- constructor(t) {
96
- n(this, "listeners", /* @__PURE__ */ new Set());
97
- n(this, "effects", /* @__PURE__ */ new Set());
98
- n(this, "_value");
99
- n(this, "_dirty", !0);
100
- n(this, "internalEffect");
101
- this.fn = t, this.internalEffect = new le(() => {
102
- this._dirty || (this._dirty = !0, this.notify());
103
- });
104
- }
105
- get value() {
106
- if (A && A.track(this), this._dirty) {
107
- const t = A;
108
- A = this.internalEffect;
109
- try {
110
- this.internalEffect.cleanup(), this._value = this.fn(), this._dirty = !1;
111
- } finally {
112
- A = t;
113
- }
114
- }
115
- return this._value;
116
- }
117
- subscribe(t) {
118
- return this.listeners.add(t), () => this.listeners.delete(t);
119
- }
120
- subscribeEffect(t) {
121
- this.effects.add(t);
122
- }
123
- unsubscribeEffect(t) {
124
- this.effects.delete(t);
125
- }
126
- notify() {
127
- const t = Array.from(this.effects), e = Array.from(this.listeners);
128
- t.forEach((r) => r.trigger()), e.forEach((r) => r(this._value));
129
- }
130
- }
131
- function hs(i) {
132
- return new ce(i);
133
- }
134
- class he {
135
- constructor(t) {
136
- n(this, "listeners", /* @__PURE__ */ new Set());
137
- n(this, "effects", /* @__PURE__ */ new Set());
138
- this._value = t;
139
- }
140
- get() {
141
- return A && A.track(this), this._value;
142
- }
143
- set(t) {
144
- this._value !== t && (this._value = t, this.notify());
145
- }
146
- subscribe(t) {
147
- return this.listeners.add(t), () => this.listeners.delete(t);
148
- }
149
- subscribeEffect(t) {
150
- this.effects.add(t);
151
- }
152
- unsubscribeEffect(t) {
153
- this.effects.delete(t);
154
- }
155
- notify() {
156
- Array.from(this.effects).forEach((t) => t.trigger()), Array.from(this.listeners).forEach((t) => t(this._value));
157
- }
158
- }
159
- function ds(i) {
160
- return new he(i);
161
- }
162
- class de {
163
- constructor(t) {
164
- n(this, "listeners", /* @__PURE__ */ new Set());
165
- n(this, "effects", /* @__PURE__ */ new Set());
166
- this.state = t;
167
- }
168
- getState() {
169
- return A && A.track(this), this.state;
170
- }
171
- setState(t) {
172
- const e = typeof t == "function" ? t(this.state) : t, r = { ...this.state, ...e };
173
- this.state !== r && (this.state = r, this.notify());
174
- }
175
- subscribe(t) {
176
- return this.listeners.add(t), () => this.listeners.delete(t);
177
- }
178
- subscribeEffect(t) {
179
- this.effects.add(t);
180
- }
181
- unsubscribeEffect(t) {
182
- this.effects.delete(t);
183
- }
184
- notify() {
185
- Array.from(this.effects).forEach((t) => t.trigger()), Array.from(this.listeners).forEach((t) => t(this.state));
186
- }
187
- }
188
- function us(i) {
189
- return new de(i);
190
- }
191
- function ue({ children: i }) {
192
- const [, t] = $({}), e = U(null);
193
- e.current || (e.current = new ae(() => {
194
- t({});
195
- })), M(() => () => {
196
- var o;
197
- (o = e.current) == null || o.dispose();
198
- }, []);
199
- let r;
200
- try {
201
- r = e.current.execute(i);
202
- } catch (o) {
203
- console.error("Observer render error", o), r = null;
204
- }
205
- return /* @__PURE__ */ S(J, { children: r });
206
- }
207
- const ee = X(/* @__PURE__ */ new Map());
208
- function ms() {
209
- return Y(ee);
210
- }
211
- function ps({ stateMap: i, children: t }) {
212
- const [e] = $(() => new Map(i));
213
- return /* @__PURE__ */ S(ee.Provider, { value: e, children: t });
214
- }
215
- function fs({ observables: i, children: t }) {
216
- const [, e] = $({});
217
- return M(() => {
218
- const r = Array.from(i).map(
219
- (o) => o.subscribe(() => e({}))
220
- );
221
- return () => r.forEach((o) => o());
222
- }, [i]), /* @__PURE__ */ S(J, { children: t });
223
- }
224
- function gs({ signals: i, children: t }) {
225
- const [, e] = $({});
226
- return M(() => {
227
- const r = Array.from(i).map(
228
- (o) => o.subscribe(() => e({}))
229
- );
230
- return () => r.forEach((o) => o());
231
- }, [i]), /* @__PURE__ */ S(J, { children: t });
232
- }
233
- const te = X(/* @__PURE__ */ new Map());
234
- function bs(i) {
235
- return Y(te).get(i);
236
- }
237
- function me({ providers: i, children: t }) {
238
- return /* @__PURE__ */ S(te.Provider, { value: i, children: t });
239
- }
240
- function se(i) {
241
- var t, e, r = "";
242
- if (typeof i == "string" || typeof i == "number") r += i;
243
- else if (typeof i == "object") if (Array.isArray(i)) {
244
- var o = i.length;
245
- for (t = 0; t < o; t++) i[t] && (e = se(i[t])) && (r && (r += " "), r += e);
246
- } else for (e in i) i[e] && (r && (r += " "), r += e);
247
- return r;
248
- }
249
- function pe() {
250
- for (var i, t, e = 0, r = "", o = arguments.length; e < o; e++) (i = arguments[e]) && (t = se(i)) && (r && (r += " "), r += t);
251
- return r;
252
- }
253
- function fe(i) {
254
- const t = i.match(/oklch\(\s*([\d.]+)\s+([\d.]+)\s+([\d.]+)\s*\)/);
255
- if (!t)
256
- return i;
257
- const [, e, r, o] = t, l = parseFloat(e), a = parseFloat(r), c = parseFloat(o), d = a * Math.cos(c * Math.PI / 180), p = a * Math.sin(c * Math.PI / 180), u = l + 0.3963377774 * d + 0.2158037573 * p, m = l - 0.1055613458 * d - 0.0638541728 * p, h = l - 0.0894841775 * d - 1.291485548 * p, g = u * u * u, N = m * m * m, v = h * h * h, B = 4.0767416621 * g - 3.3077115913 * N + 0.2309699292 * v, I = -1.2684380046 * g + 2.6097574011 * N - 0.3413193965 * v, k = -0.0041960863 * g - 0.7034186147 * N + 1.707614701 * v, C = (W) => W >= 31308e-7 ? 1.055 * W ** (1 / 2.4) - 0.055 : 12.92 * W, b = Math.max(0, Math.min(1, C(B))), f = Math.max(0, Math.min(1, C(I))), F = Math.max(0, Math.min(1, C(k))), j = (W) => {
258
- var z;
259
- const _ = (z = Math.round(W * 255).toString(16)) == null ? void 0 : z.toUpperCase();
260
- return _.length === 1 ? `0${_}` : _;
261
- };
262
- return `#${j(b)}${j(f)}${j(F)}`;
263
- }
264
- function ge(i) {
265
- const t = {}, e = {}, r = i.split(`
266
- `);
267
- for (const o of r) {
268
- const l = o.trim();
269
- if (!l || l.startsWith("//") || l.startsWith("*") || l === "@theme {" || l === "}")
270
- continue;
271
- const a = l.match(/^--color-([a-z0-9\-]+): (oklch\([^)]+\));?$/), c = l.match(/^--color-([a-z0-9\-]+): (#[a-fA-F0-9]{3,6});?$/);
272
- if (a) {
273
- const [, d, p] = a, u = fe(p);
274
- t[u.toLowerCase()] = `bg-${d}`, e[u.toLowerCase()] = `text-${d}`;
275
- } else if (c) {
276
- const [, d, p] = c;
277
- t[p.toLowerCase()] = `bg-${d}`, e[p.toLowerCase()] = `text-${d}`;
278
- }
279
- }
280
- return { background: t, text: e };
281
- }
282
- const be = (i) => {
283
- if (i !== void 0)
284
- return typeof i == "number" ? `${i}px` : i.toString();
285
- }, H = (i, t) => {
286
- const e = be(t);
287
- return e === void 0 ? "" : `${i}-[${e}]`;
288
- }, xe = `
289
- --color-red-50: oklch(0.971 0.013 17.38);
290
- --color-red-100: oklch(0.936 0.032 17.717);
291
- --color-red-200: oklch(0.885 0.062 18.334);
292
- --color-red-300: oklch(0.808 0.114 19.571);
293
- --color-red-400: oklch(0.704 0.191 22.216);
294
- --color-red-500: oklch(0.637 0.237 25.331);
295
- --color-red-600: oklch(0.577 0.245 27.325);
296
- --color-red-700: oklch(0.505 0.213 27.518);
297
- --color-red-800: oklch(0.444 0.177 26.899);
298
- --color-red-900: oklch(0.396 0.141 25.723);
299
- --color-red-950: oklch(0.258 0.092 26.042);
300
- --color-orange-50: oklch(0.98 0.016 73.684);
301
- --color-orange-100: oklch(0.954 0.038 75.164);
302
- --color-orange-200: oklch(0.901 0.076 70.697);
303
- --color-orange-300: oklch(0.837 0.128 66.29);
304
- --color-orange-400: oklch(0.75 0.183 55.934);
305
- --color-orange-500: oklch(0.705 0.213 47.604);
306
- --color-orange-600: oklch(0.646 0.222 41.116);
307
- --color-orange-700: oklch(0.553 0.195 38.402);
308
- --color-orange-800: oklch(0.47 0.157 37.304);
309
- --color-orange-900: oklch(0.408 0.123 38.172);
310
- --color-orange-950: oklch(0.266 0.079 36.259);
311
- --color-amber-50: oklch(0.987 0.022 95.277);
312
- --color-amber-100: oklch(0.962 0.059 95.617);
313
- --color-amber-200: oklch(0.924 0.12 95.746);
314
- --color-amber-300: oklch(0.879 0.169 91.605);
315
- --color-amber-400: oklch(0.828 0.189 84.429);
316
- --color-amber-500: oklch(0.769 0.188 70.08);
317
- --color-amber-600: oklch(0.666 0.179 58.318);
318
- --color-amber-700: oklch(0.555 0.163 48.998);
319
- --color-amber-800: oklch(0.473 0.137 46.201);
320
- --color-amber-900: oklch(0.414 0.112 45.904);
321
- --color-amber-950: oklch(0.279 0.077 45.635);
322
- --color-yellow-50: oklch(0.987 0.026 102.212);
323
- --color-yellow-100: oklch(0.973 0.071 103.193);
324
- --color-yellow-200: oklch(0.945 0.129 101.54);
325
- --color-yellow-300: oklch(0.905 0.182 98.111);
326
- --color-yellow-400: oklch(0.852 0.199 91.936);
327
- --color-yellow-500: oklch(0.795 0.184 86.047);
328
- --color-yellow-600: oklch(0.681 0.162 75.834);
329
- --color-yellow-700: oklch(0.554 0.135 66.442);
330
- --color-yellow-800: oklch(0.476 0.114 61.907);
331
- --color-yellow-900: oklch(0.421 0.095 57.708);
332
- --color-yellow-950: oklch(0.286 0.066 53.813);
333
- --color-lime-50: oklch(0.986 0.031 120.757);
334
- --color-lime-100: oklch(0.967 0.067 122.328);
335
- --color-lime-200: oklch(0.938 0.127 124.321);
336
- --color-lime-300: oklch(0.897 0.196 126.665);
337
- --color-lime-400: oklch(0.841 0.238 128.85);
338
- --color-lime-500: oklch(0.768 0.233 130.85);
339
- --color-lime-600: oklch(0.648 0.2 131.684);
340
- --color-lime-700: oklch(0.532 0.157 131.589);
341
- --color-lime-800: oklch(0.453 0.124 130.933);
342
- --color-lime-900: oklch(0.405 0.101 131.063);
343
- --color-lime-950: oklch(0.274 0.072 132.109);
344
- --color-green-50: oklch(0.982 0.018 155.826);
345
- --color-green-100: oklch(0.962 0.044 156.743);
346
- --color-green-200: oklch(0.925 0.084 155.995);
347
- --color-green-300: oklch(0.871 0.15 154.449);
348
- --color-green-400: oklch(0.792 0.209 151.711);
349
- --color-green-500: oklch(0.723 0.219 149.579);
350
- --color-green-600: oklch(0.627 0.194 149.214);
351
- --color-green-700: oklch(0.527 0.154 150.069);
352
- --color-green-800: oklch(0.448 0.119 151.328);
353
- --color-green-900: oklch(0.393 0.095 152.535);
354
- --color-green-950: oklch(0.266 0.065 152.934);
355
- --color-emerald-50: oklch(0.979 0.021 166.113);
356
- --color-emerald-100: oklch(0.95 0.052 163.051);
357
- --color-emerald-200: oklch(0.905 0.093 164.15);
358
- --color-emerald-300: oklch(0.845 0.143 164.978);
359
- --color-emerald-400: oklch(0.765 0.177 163.223);
360
- --color-emerald-500: oklch(0.696 0.17 162.48);
361
- --color-emerald-600: oklch(0.596 0.145 163.225);
362
- --color-emerald-700: oklch(0.508 0.118 165.612);
363
- --color-emerald-800: oklch(0.432 0.095 166.913);
364
- --color-emerald-900: oklch(0.378 0.077 168.94);
365
- --color-emerald-950: oklch(0.262 0.051 172.552);
366
- --color-teal-50: oklch(0.984 0.014 180.72);
367
- --color-teal-100: oklch(0.953 0.051 180.801);
368
- --color-teal-200: oklch(0.91 0.096 180.426);
369
- --color-teal-300: oklch(0.855 0.138 181.071);
370
- --color-teal-400: oklch(0.777 0.152 181.912);
371
- --color-teal-500: oklch(0.704 0.14 182.503);
372
- --color-teal-600: oklch(0.6 0.118 184.704);
373
- --color-teal-700: oklch(0.511 0.096 186.391);
374
- --color-teal-800: oklch(0.437 0.078 188.216);
375
- --color-teal-900: oklch(0.386 0.063 188.416);
376
- --color-teal-950: oklch(0.277 0.046 192.524);
377
- --color-cyan-50: oklch(0.984 0.019 200.873);
378
- --color-cyan-100: oklch(0.956 0.045 203.388);
379
- --color-cyan-200: oklch(0.917 0.08 205.041);
380
- --color-cyan-300: oklch(0.865 0.127 207.078);
381
- --color-cyan-400: oklch(0.789 0.154 211.53);
382
- --color-cyan-500: oklch(0.715 0.143 215.221);
383
- --color-cyan-600: oklch(0.609 0.126 221.723);
384
- --color-cyan-700: oklch(0.52 0.105 223.128);
385
- --color-cyan-800: oklch(0.45 0.085 224.283);
386
- --color-cyan-900: oklch(0.398 0.07 227.392);
387
- --color-cyan-950: oklch(0.302 0.056 229.695);
388
- --color-sky-50: oklch(0.977 0.013 236.62);
389
- --color-sky-100: oklch(0.951 0.026 236.824);
390
- --color-sky-200: oklch(0.901 0.058 230.902);
391
- --color-sky-300: oklch(0.828 0.111 230.318);
392
- --color-sky-400: oklch(0.746 0.16 232.661);
393
- --color-sky-500: oklch(0.685 0.169 237.323);
394
- --color-sky-600: oklch(0.588 0.158 241.966);
395
- --color-sky-700: oklch(0.5 0.134 242.749);
396
- --color-sky-800: oklch(0.443 0.11 240.79);
397
- --color-sky-900: oklch(0.391 0.09 240.876);
398
- --color-sky-950: oklch(0.293 0.066 243.157);
399
- --color-blue-50: oklch(0.97 0.014 254.604);
400
- --color-blue-100: oklch(0.932 0.032 255.585);
401
- --color-blue-200: oklch(0.882 0.059 254.128);
402
- --color-blue-300: oklch(0.809 0.105 251.813);
403
- --color-blue-400: oklch(0.707 0.165 254.624);
404
- --color-blue-500: oklch(0.623 0.214 259.815);
405
- --color-blue-600: oklch(0.546 0.245 262.881);
406
- --color-blue-700: oklch(0.488 0.243 264.376);
407
- --color-blue-800: oklch(0.424 0.199 265.638);
408
- --color-blue-900: oklch(0.379 0.146 265.522);
409
- --color-blue-950: oklch(0.282 0.091 267.935);
410
- --color-indigo-50: oklch(0.962 0.018 272.314);
411
- --color-indigo-100: oklch(0.93 0.034 272.788);
412
- --color-indigo-200: oklch(0.87 0.065 274.039);
413
- --color-indigo-300: oklch(0.785 0.115 274.713);
414
- --color-indigo-400: oklch(0.673 0.182 276.935);
415
- --color-indigo-500: oklch(0.585 0.233 277.117);
416
- --color-indigo-600: oklch(0.511 0.262 276.966);
417
- --color-indigo-700: oklch(0.457 0.24 277.023);
418
- --color-indigo-800: oklch(0.398 0.195 277.366);
419
- --color-indigo-900: oklch(0.359 0.144 278.697);
420
- --color-indigo-950: oklch(0.257 0.09 281.288);
421
- --color-violet-50: oklch(0.969 0.016 293.756);
422
- --color-violet-100: oklch(0.943 0.029 294.588);
423
- --color-violet-200: oklch(0.894 0.057 293.283);
424
- --color-violet-300: oklch(0.811 0.111 293.571);
425
- --color-violet-400: oklch(0.702 0.183 293.541);
426
- --color-violet-500: oklch(0.606 0.25 292.717);
427
- --color-violet-600: oklch(0.541 0.281 293.009);
428
- --color-violet-700: oklch(0.491 0.27 292.581);
429
- --color-violet-800: oklch(0.432 0.232 292.759);
430
- --color-violet-900: oklch(0.38 0.189 293.745);
431
- --color-violet-950: oklch(0.283 0.141 291.089);
432
- --color-purple-50: oklch(0.977 0.014 308.299);
433
- --color-purple-100: oklch(0.946 0.033 307.174);
434
- --color-purple-200: oklch(0.902 0.063 306.703);
435
- --color-purple-300: oklch(0.827 0.119 306.383);
436
- --color-purple-400: oklch(0.714 0.203 305.504);
437
- --color-purple-500: oklch(0.627 0.265 303.9);
438
- --color-purple-600: oklch(0.558 0.288 302.321);
439
- --color-purple-700: oklch(0.496 0.265 301.924);
440
- --color-purple-800: oklch(0.438 0.218 303.724);
441
- --color-purple-900: oklch(0.381 0.176 304.987);
442
- --color-purple-950: oklch(0.291 0.149 302.717);
443
- --color-fuchsia-50: oklch(0.977 0.017 320.058);
444
- --color-fuchsia-100: oklch(0.952 0.037 318.852);
445
- --color-fuchsia-200: oklch(0.903 0.076 319.62);
446
- --color-fuchsia-300: oklch(0.833 0.145 321.434);
447
- --color-fuchsia-400: oklch(0.74 0.238 322.16);
448
- --color-fuchsia-500: oklch(0.667 0.295 322.15);
449
- --color-fuchsia-600: oklch(0.591 0.293 322.896);
450
- --color-fuchsia-700: oklch(0.518 0.253 323.949);
451
- --color-fuchsia-800: oklch(0.452 0.211 324.591);
452
- --color-fuchsia-900: oklch(0.401 0.17 325.612);
453
- --color-fuchsia-950: oklch(0.293 0.136 325.661);
454
- --color-pink-50: oklch(0.971 0.014 343.198);
455
- --color-pink-100: oklch(0.948 0.028 342.258);
456
- --color-pink-200: oklch(0.899 0.061 343.231);
457
- --color-pink-300: oklch(0.823 0.12 346.018);
458
- --color-pink-400: oklch(0.718 0.202 349.761);
459
- --color-pink-500: oklch(0.656 0.241 354.308);
460
- --color-pink-600: oklch(0.592 0.249 0.584);
461
- --color-pink-700: oklch(0.525 0.223 3.958);
462
- --color-pink-800: oklch(0.459 0.187 3.815);
463
- --color-pink-900: oklch(0.408 0.153 2.432);
464
- --color-pink-950: oklch(0.284 0.109 3.907);
465
- --color-rose-50: oklch(0.969 0.015 12.422);
466
- --color-rose-100: oklch(0.941 0.03 12.58);
467
- --color-rose-200: oklch(0.892 0.058 10.001);
468
- --color-rose-300: oklch(0.81 0.117 11.638);
469
- --color-rose-400: oklch(0.712 0.194 13.428);
470
- --color-rose-500: oklch(0.645 0.246 16.439);
471
- --color-rose-600: oklch(0.586 0.253 17.585);
472
- --color-rose-700: oklch(0.514 0.222 16.935);
473
- --color-rose-800: oklch(0.455 0.188 13.697);
474
- --color-rose-900: oklch(0.41 0.159 10.272);
475
- --color-rose-950: oklch(0.271 0.105 12.094);
476
- --color-slate-50: oklch(0.984 0.003 247.858);
477
- --color-slate-100: oklch(0.968 0.007 247.896);
478
- --color-slate-200: oklch(0.929 0.013 255.508);
479
- --color-slate-300: oklch(0.869 0.022 252.894);
480
- --color-slate-400: oklch(0.704 0.04 256.788);
481
- --color-slate-500: oklch(0.554 0.046 257.417);
482
- --color-slate-600: oklch(0.446 0.043 257.281);
483
- --color-slate-700: oklch(0.372 0.044 257.287);
484
- --color-slate-800: oklch(0.279 0.041 260.031);
485
- --color-slate-900: oklch(0.208 0.042 265.755);
486
- --color-slate-950: oklch(0.129 0.042 264.695);
487
- --color-gray-50: oklch(0.985 0.002 247.839);
488
- --color-gray-100: oklch(0.967 0.003 264.542);
489
- --color-gray-200: oklch(0.928 0.006 264.531);
490
- --color-gray-300: oklch(0.872 0.01 258.338);
491
- --color-gray-400: oklch(0.707 0.022 261.325);
492
- --color-gray-500: oklch(0.551 0.027 264.364);
493
- --color-gray-600: oklch(0.446 0.03 256.802);
494
- --color-gray-700: oklch(0.373 0.034 259.733);
495
- --color-gray-800: oklch(0.278 0.033 256.848);
496
- --color-gray-900: oklch(0.21 0.034 264.665);
497
- --color-gray-950: oklch(0.13 0.028 261.692);
498
- --color-zinc-50: oklch(0.985 0 0);
499
- --color-zinc-100: oklch(0.967 0.001 286.375);
500
- --color-zinc-200: oklch(0.92 0.004 286.32);
501
- --color-zinc-300: oklch(0.871 0.006 286.286);
502
- --color-zinc-400: oklch(0.705 0.015 286.067);
503
- --color-zinc-500: oklch(0.552 0.016 285.938);
504
- --color-zinc-600: oklch(0.442 0.017 285.786);
505
- --color-zinc-700: oklch(0.37 0.013 285.805);
506
- --color-zinc-800: oklch(0.274 0.006 286.033);
507
- --color-zinc-900: oklch(0.21 0.006 285.885);
508
- --color-zinc-950: oklch(0.141 0.005 285.823);
509
- --color-neutral-50: oklch(0.985 0 0);
510
- --color-neutral-100: oklch(0.97 0 0);
511
- --color-neutral-200: oklch(0.922 0 0);
512
- --color-neutral-300: oklch(0.87 0 0);
513
- --color-neutral-400: oklch(0.708 0 0);
514
- --color-neutral-500: oklch(0.556 0 0);
515
- --color-neutral-600: oklch(0.439 0 0);
516
- --color-neutral-700: oklch(0.371 0 0);
517
- --color-neutral-800: oklch(0.269 0 0);
518
- --color-neutral-900: oklch(0.205 0 0);
519
- --color-neutral-950: oklch(0.145 0 0);
520
- --color-stone-50: oklch(0.985 0.001 106.423);
521
- --color-stone-100: oklch(0.97 0.001 106.424);
522
- --color-stone-200: oklch(0.923 0.003 48.717);
523
- --color-stone-300: oklch(0.869 0.005 56.366);
524
- --color-stone-400: oklch(0.709 0.01 56.259);
525
- --color-stone-500: oklch(0.553 0.013 58.071);
526
- --color-stone-600: oklch(0.444 0.011 73.639);
527
- --color-stone-700: oklch(0.374 0.01 67.558);
528
- --color-stone-800: oklch(0.268 0.007 34.298);
529
- --color-stone-900: oklch(0.216 0.006 56.043);
530
- --color-stone-950: oklch(0.147 0.004 49.25);
531
- --color-black: #000;
532
- --color-white: #fff;
533
- `, ye = ge(xe), re = {
534
- borderRadius: {
535
- 0: "rounded-none",
536
- "0px": "rounded-none",
537
- "1px": "rounded-sm",
538
- "2px": "rounded-sm",
539
- "3px": "rounded",
540
- "4px": "rounded",
541
- "5px": "rounded-md",
542
- "6px": "rounded-md",
543
- "7px": "rounded-lg",
544
- "8px": "rounded-lg",
545
- "9px": "rounded-lg",
546
- "10px": "rounded-lg",
547
- "11px": "rounded-xl",
548
- "12px": "rounded-xl",
549
- "14px": "rounded-2xl",
550
- "16px": "rounded-2xl",
551
- "20px": "rounded-3xl",
552
- "50%": "rounded-full",
553
- "9999px": "rounded-full"
554
- },
555
- fontSize: {
556
- "0.75rem": "text-xs",
557
- "0.875rem": "text-sm",
558
- "1rem": "text-base",
559
- "1.125rem": "text-lg",
560
- "1.25rem": "text-xl",
561
- "1.5rem": "text-2xl",
562
- "1.875rem": "text-3xl",
563
- "2.25rem": "text-4xl",
564
- "3rem": "text-5xl",
565
- "3.75rem": "text-6xl",
566
- "4.5rem": "text-7xl",
567
- "6rem": "text-8xl",
568
- "8rem": "text-9xl"
569
- },
570
- fontWeight: {
571
- 100: "font-thin",
572
- 200: "font-extralight",
573
- 300: "font-light",
574
- 400: "font-normal",
575
- 500: "font-medium",
576
- 600: "font-semibold",
577
- 700: "font-bold",
578
- 800: "font-extrabold",
579
- 900: "font-black"
580
- },
581
- fontFamily: {
582
- "ui-serif": "font-serif",
583
- "ui-monospace": "font-mono",
584
- "ui-sans-serif": "font-sans",
585
- default: "font-sans"
586
- },
587
- textAlign: {
588
- left: "text-left",
589
- center: "text-center",
590
- right: "text-right",
591
- justify: "text-justify"
592
- },
593
- textDecoration: {
594
- underline: "underline",
595
- overline: "overline",
596
- "line-through": "line-through",
597
- none: "no-underline"
598
- },
599
- fontVariantNumeric: {
600
- "tabular-nums": "tabular-nums",
601
- "oldstyle-nums": "oldstyle-nums",
602
- "lining-nums": "lining-nums",
603
- "proportional-nums": "proportional-nums",
604
- "diagonal-fractions": "diagonal-fractions",
605
- "stacked-fractions": "stacked-fractions",
606
- ordinal: "ordinal",
607
- "slashed-zero": "slashed-zero",
608
- normal: "normal-nums"
609
- },
610
- fontStyle: {
611
- normal: "normal",
612
- italic: "italic",
613
- oblique: "oblique"
614
- },
615
- display: {
616
- block: "block",
617
- flex: "flex",
618
- "inline-flex": "inline-flex",
619
- grid: "grid",
620
- hidden: "hidden",
621
- none: "hidden"
622
- },
623
- position: {
624
- static: "static",
625
- relative: "relative",
626
- absolute: "absolute",
627
- fixed: "fixed",
628
- sticky: "sticky"
629
- }
630
- }, _e = (i, t) => ({
631
- // 背景色
632
- backgroundColor: (e) => e.backgroundColor ? [i.background[e.backgroundColor.toLowerCase()] || `bg-[${e.backgroundColor}]`] : [],
633
- // 文字色
634
- color: (e) => e.color ? [i.text[e.color.toLowerCase()] || `text-[${e.color}]`] : [],
635
- // 圆角
636
- borderRadius: (e) => {
637
- if (!e.borderRadius)
638
- return [];
639
- const r = re.borderRadius[e.borderRadius] || H("rounded", e.borderRadius);
640
- return r ? [r] : [];
641
- },
642
- // 外边距
643
- margin: (e) => {
644
- const r = [];
645
- if (e.margin !== void 0) {
646
- const l = H("m", e.margin);
647
- return l ? [l] : [];
648
- }
649
- return [
650
- { prop: e.marginTop, dir: "mt" },
651
- { prop: e.marginRight, dir: "mr" },
652
- { prop: e.marginBottom, dir: "mb" },
653
- { prop: e.marginLeft, dir: "ml" },
654
- { prop: e.marginX, dir: "mx" },
655
- { prop: e.marginY, dir: "my" }
656
- ].forEach(({ prop: l, dir: a }) => {
657
- if (l !== void 0) {
658
- const c = H(a, l);
659
- c && r.push(c);
660
- }
661
- }), r;
662
- },
663
- // 内边距
664
- padding: (e) => {
665
- const r = [];
666
- if (e.padding !== void 0) {
667
- const l = H("p", e.padding);
668
- return l ? [l] : [];
669
- }
670
- return [
671
- { prop: e.paddingTop, dir: "pt" },
672
- { prop: e.paddingRight, dir: "pr" },
673
- { prop: e.paddingBottom, dir: "pb" },
674
- { prop: e.paddingLeft, dir: "pl" },
675
- { prop: e.paddingX, dir: "px" },
676
- { prop: e.paddingY, dir: "py" }
677
- ].forEach(({ prop: l, dir: a }) => {
678
- if (l !== void 0) {
679
- const c = H(a, l);
680
- c && r.push(c);
681
- }
682
- }), r;
683
- },
684
- // 字体
685
- font: (e) => {
686
- const r = [];
687
- if (e.fontSize && r.push(t.fontSize[e.fontSize.toString()] || `text-[${e.fontSize}]`), e.fontWeight) {
688
- const o = t.fontWeight[e.fontWeight.toString()];
689
- o && r.push(o);
690
- }
691
- if (e.textAlign) {
692
- const o = t.textAlign[e.textAlign];
693
- o && r.push(o);
694
- }
695
- if (e.fontFamily) {
696
- const o = t.fontFamily[e.fontFamily];
697
- o && r.push(o);
698
- }
699
- if (e.textDecoration) {
700
- const o = t.textDecoration[e.textDecoration];
701
- o && r.push(o);
702
- }
703
- if (e.fontVariantNumeric) {
704
- const o = t.fontVariantNumeric[e.fontVariantNumeric];
705
- o && r.push(o);
706
- }
707
- if (e.fontStyle) {
708
- const o = t.fontStyle[e.fontStyle];
709
- o && r.push(o);
710
- }
711
- return r;
712
- },
713
- // 尺寸
714
- size: (e) => {
715
- const r = [];
716
- if (e.width) {
717
- const o = e.width.toString();
718
- r.push(`w-[${o}]`);
719
- }
720
- if (e.height) {
721
- const o = e.height.toString();
722
- r.push(`h-[${o}]`);
723
- }
724
- return r;
725
- },
726
- // 布局
727
- layout: (e) => {
728
- const r = [];
729
- if (e.display) {
730
- const o = t.display[e.display];
731
- o && r.push(o);
732
- }
733
- if (e.flexDirection) {
734
- const l = {
735
- row: "flex-row",
736
- column: "flex-col",
737
- "row-reverse": "flex-row-reverse",
738
- "column-reverse": "flex-col-reverse"
739
- }[e.flexDirection];
740
- l && r.push(l);
741
- }
742
- if (e.justifyContent) {
743
- const l = {
744
- "flex-start": "justify-start",
745
- "flex-end": "justify-end",
746
- center: "justify-center",
747
- "space-between": "justify-between",
748
- "space-around": "justify-around",
749
- "space-evenly": "justify-evenly"
750
- }[e.justifyContent];
751
- l && r.push(l);
752
- }
753
- if (e.alignItems) {
754
- const l = {
755
- "flex-start": "items-start",
756
- "flex-end": "items-end",
757
- center: "items-center",
758
- baseline: "items-baseline",
759
- stretch: "items-stretch"
760
- }[e.alignItems];
761
- l && r.push(l);
762
- }
763
- if (e.gap) {
764
- const o = H("gap", e.gap);
765
- o && r.push(o);
766
- }
767
- return r;
768
- },
769
- // 定位
770
- position: (e) => e.position ? [t.position[e.position] || ""].filter(Boolean) : [],
771
- // 透明度
772
- opacity: (e) => {
773
- if (e.opacity === void 0)
774
- return [];
775
- const r = typeof e.opacity == "string" ? parseFloat(e.opacity) : e.opacity;
776
- return [`opacity-${{
777
- 0: "0",
778
- 0.25: "25",
779
- 0.5: "50",
780
- 0.75: "75",
781
- 1: "100"
782
- }[r] || Math.round(r * 100)}`];
783
- },
784
- // 自定义类名
785
- className: (e) => e.className ? [e.className] : []
786
- }), ke = {
787
- backgroundColor: "backgroundColor",
788
- color: "color",
789
- borderRadius: "borderRadius",
790
- margin: "margin",
791
- marginTop: "margin",
792
- marginRight: "margin",
793
- marginBottom: "margin",
794
- marginLeft: "margin",
795
- marginX: "margin",
796
- marginY: "margin",
797
- padding: "padding",
798
- paddingTop: "padding",
799
- paddingRight: "padding",
800
- paddingBottom: "padding",
801
- paddingLeft: "padding",
802
- paddingX: "padding",
803
- paddingY: "padding",
804
- fontSize: "font",
805
- fontWeight: "font",
806
- textAlign: "font",
807
- textDecoration: "font",
808
- fontVariantNumeric: "font",
809
- fontStyle: "font",
810
- width: "size",
811
- height: "size",
812
- display: "layout",
813
- flexDirection: "layout",
814
- justifyContent: "layout",
815
- alignItems: "layout",
816
- gap: "layout",
817
- position: "position",
818
- opacity: "opacity",
819
- className: "className"
820
- }, ve = (i, t) => {
821
- const e = (t == null ? void 0 : t.colorMaps) || ye, r = (t == null ? void 0 : t.styleMaps) || re, o = _e(e, r), l = [], a = /* @__PURE__ */ new Set();
822
- return Object.keys(i).forEach((c) => {
823
- const d = ke[c];
824
- if (d && !a.has(d)) {
825
- const p = o[d];
826
- if (p) {
827
- const u = p(i);
828
- l.push(...u), a.add(d);
829
- }
830
- }
831
- }), l.filter(Boolean).join(" ");
832
- };
833
- class x {
834
- constructor() {
835
- n(this, "_props", {});
836
- n(this, "_style", {});
837
- n(this, "_cssStyles", {});
838
- n(this, "_classNames", []);
839
- n(this, "_children", []);
840
- n(this, "_responsive");
841
- n(this, "_state", /* @__PURE__ */ new Map());
842
- n(this, "_providers", /* @__PURE__ */ new Map());
843
- n(this, "_observers", /* @__PURE__ */ new Set());
844
- n(this, "_signals", /* @__PURE__ */ new Set());
845
- n(this, "_isObserver", !1);
846
- n(this, "_childFunction");
847
- }
848
- id(t) {
849
- return this._props.id = t, this;
850
- }
851
- key(t) {
852
- return this._props.key = t, this;
853
- }
854
- paddingHorizontal(t) {
855
- return typeof t == "number" ? this._classNames.push(`px-[${t}px]`) : this._classNames.push(`px-${t}`), this;
856
- }
857
- paddingVertical(t) {
858
- return typeof t == "number" ? this._classNames.push(`py-[${t}px]`) : this._classNames.push(`py-${t}`), this;
859
- }
860
- marginHorizontal(t) {
861
- return typeof t == "number" ? this._classNames.push(`mx-[${t}px]`) : this._classNames.push(`mx-${t}`), this;
862
- }
863
- marginVertical(t) {
864
- return typeof t == "number" ? this._classNames.push(`my-[${t}px]`) : this._classNames.push(`my-${t}`), this;
865
- }
866
- flexDirection(t) {
867
- return this._classNames.push(`flex-${t}`), this;
868
- }
869
- alignItems(t) {
870
- return this._classNames.push(`items-${t}`), this;
871
- }
872
- justifyContent(t) {
873
- return this._classNames.push(`justify-${t}`), this;
874
- }
875
- responsive(t) {
876
- return this._responsive = t, this;
877
- }
878
- state(t, e) {
879
- return this._state.set(t, e), this;
880
- }
881
- getState(t) {
882
- return this._state.get(t);
883
- }
884
- setState(t, e) {
885
- return this._state.set(t, e), this;
886
- }
887
- provide(t, e) {
888
- return this._providers.set(t, e), this;
889
- }
890
- consume(t) {
891
- return this._providers.get(t);
892
- }
893
- observer() {
894
- return this._isObserver = !0, this;
895
- }
896
- observe(t) {
897
- return this._observers.add(t), this;
898
- }
899
- bindSignal(t) {
900
- return this._signals.add(t), this;
901
- }
902
- hasStateManagement() {
903
- return this._state.size > 0 || this._providers.size > 0 || this._observers.size > 0 || this._signals.size > 0 || this._isObserver;
904
- }
905
- className(t) {
906
- return this._classNames.push(t), this;
907
- }
908
- classNames(t) {
909
- return this._classNames.push(...t), this;
910
- }
911
- css(t) {
912
- return this._cssStyles = { ...this._cssStyles, ...t }, this;
913
- }
914
- style(t) {
915
- return this._style = { ...this._style, ...t }, this;
916
- }
917
- props(t) {
918
- return this._props = { ...this._props, ...t }, this;
919
- }
920
- children(t) {
921
- if (typeof t == "function")
922
- this._childFunction = t, this._children = [];
923
- else {
924
- const e = Array.isArray(t) ? t : [t];
925
- this._children = e.map((r) => r && typeof r == "object" && "build" in r && typeof r.build == "function" ? r.build() : r), this._childFunction = void 0;
926
- }
927
- return this;
928
- }
929
- getClassName() {
930
- if (Object.keys(this._cssStyles).length > 0) {
931
- const t = ve(this._cssStyles);
932
- t && this._classNames.push(t);
933
- }
934
- return pe(this._classNames);
935
- }
936
- getStyle() {
937
- let t = { ...this._style, ...this._cssStyles };
938
- return this._responsive && this._responsive.mobile && (t = { ...t, ...this._responsive.mobile }), t;
939
- }
940
- processChildren() {
941
- if (this._childFunction) {
942
- const t = this._childFunction();
943
- return Array.isArray(t) ? t : [t];
944
- }
945
- return this._children;
946
- }
947
- getChildFunction() {
948
- return this._childFunction;
949
- }
950
- }
951
- function y(i) {
952
- return (...t) => {
953
- const e = new i(...t);
954
- return new Proxy(e, {
955
- get(r, o, l) {
956
- return o === "build" ? () => r._isObserver ? s.createElement(ue, {
957
- children: () => r.build()
958
- }) : r.build() : Reflect.has(r, o) ? Reflect.get(r, o, l) : (a) => (r.css({ [o]: a }), l);
959
- }
960
- });
961
- };
962
- }
963
- function xs(i) {
964
- return (Array.isArray(i) ? i : [i]).map((e) => e && typeof e == "object" && "build" in e ? e.build() : e);
965
- }
966
- function ys(...i) {
967
- return i.reduce((t, e) => e ? { ...t, ...e } : t, {});
968
- }
969
- function _s(i, t) {
970
- if (!t) return i;
971
- let e = { ...i };
972
- if (typeof window < "u") {
973
- const r = window.innerWidth;
974
- r < 768 && t.mobile ? e = { ...e, ...t.mobile } : r >= 768 && r < 1024 && t.tablet ? e = { ...e, ...t.tablet } : r >= 1024 && t.desktop && (e = { ...e, ...t.desktop });
975
- }
976
- return e;
977
- }
978
- function ks(i, t = "px") {
979
- return typeof i == "number" ? `${i}${t}` : i;
980
- }
981
- function vs(i) {
982
- const [t, e] = $(i.value);
983
- return M(() => (e(i.value), i.subscribe((o) => {
984
- e(o);
985
- })), [i]), t;
986
- }
987
- function ws(i) {
988
- const [t, e] = $(i.getState());
989
- return M(() => (e(i.getState()), i.subscribe((o) => {
990
- e(o);
991
- })), [i]), t;
992
- }
993
- function Ns(i) {
994
- const [t, e] = $(i.get());
995
- return M(() => (e(i.get()), i.subscribe((o) => {
996
- e(o);
997
- })), [i]), t;
998
- }
999
- const we = {
1000
- name: "material",
1001
- colors: {
1002
- primary: "#6200EE",
1003
- primaryVariant: "#3700B3",
1004
- secondary: "#03DAC6",
1005
- secondaryVariant: "#018786",
1006
- background: "#FFFFFF",
1007
- surface: "#FFFFFF",
1008
- error: "#B00020",
1009
- success: "#4CAF50",
1010
- warning: "#FF9800",
1011
- info: "#2196F3",
1012
- onPrimary: "#FFFFFF",
1013
- onSecondary: "#000000",
1014
- onBackground: "#000000",
1015
- onSurface: "#000000",
1016
- onError: "#FFFFFF"
1017
- },
1018
- typography: {
1019
- h1: {
1020
- fontSize: "96px",
1021
- fontWeight: 300,
1022
- letterSpacing: "-1.5px"
1023
- },
1024
- h2: {
1025
- fontSize: "60px",
1026
- fontWeight: 300,
1027
- letterSpacing: "-0.5px"
1028
- },
1029
- h3: {
1030
- fontSize: "48px",
1031
- fontWeight: 400
1032
- },
1033
- h4: {
1034
- fontSize: "34px",
1035
- fontWeight: 400,
1036
- letterSpacing: "0.25px"
1037
- },
1038
- h5: {
1039
- fontSize: "24px",
1040
- fontWeight: 400
1041
- },
1042
- h6: {
1043
- fontSize: "20px",
1044
- fontWeight: 500,
1045
- letterSpacing: "0.15px"
1046
- },
1047
- body: {
1048
- fontSize: "16px",
1049
- fontWeight: 400,
1050
- letterSpacing: "0.5px"
1051
- },
1052
- caption: {
1053
- fontSize: "12px",
1054
- fontWeight: 400,
1055
- letterSpacing: "0.4px"
1056
- },
1057
- label: {
1058
- fontSize: "14px",
1059
- fontWeight: 500,
1060
- letterSpacing: "1.25px"
1061
- }
1062
- },
1063
- spacing: {
1064
- xs: "4px",
1065
- sm: "8px",
1066
- md: "16px",
1067
- lg: "24px",
1068
- xl: "32px"
1069
- },
1070
- borderRadius: {
1071
- sm: "4px",
1072
- md: "8px",
1073
- lg: "16px",
1074
- full: "9999px"
1075
- },
1076
- shadows: {
1077
- sm: "0 2px 4px rgba(0,0,0,0.1)",
1078
- md: "0 4px 8px rgba(0,0,0,0.12)",
1079
- lg: "0 8px 16px rgba(0,0,0,0.14)"
1080
- },
1081
- fontFamily: "Roboto, sans-serif"
1082
- }, Ne = {
1083
- name: "cupertino",
1084
- colors: {
1085
- primary: "#007AFF",
1086
- secondary: "#AF52DE",
1087
- background: "#FFFFFF",
1088
- surface: "#F2F2F7",
1089
- error: "#FF3B30",
1090
- success: "#34C759",
1091
- warning: "#FF9500",
1092
- info: "#5AC8FA",
1093
- onPrimary: "#FFFFFF",
1094
- onSecondary: "#FFFFFF",
1095
- onBackground: "#000000",
1096
- onSurface: "#000000",
1097
- onError: "#FFFFFF"
1098
- },
1099
- typography: {
1100
- h1: {
1101
- fontSize: "34px",
1102
- fontWeight: 700,
1103
- letterSpacing: "0.37px"
1104
- },
1105
- h2: {
1106
- fontSize: "28px",
1107
- fontWeight: 700,
1108
- letterSpacing: "0.36px"
1109
- },
1110
- h3: {
1111
- fontSize: "22px",
1112
- fontWeight: 600,
1113
- letterSpacing: "0.35px"
1114
- },
1115
- h4: {
1116
- fontSize: "20px",
1117
- fontWeight: 600
1118
- },
1119
- h5: {
1120
- fontSize: "17px",
1121
- fontWeight: 600,
1122
- letterSpacing: "-0.41px"
1123
- },
1124
- h6: {
1125
- fontSize: "15px",
1126
- fontWeight: 600,
1127
- letterSpacing: "-0.24px"
1128
- },
1129
- body: {
1130
- fontSize: "17px",
1131
- fontWeight: 400,
1132
- letterSpacing: "-0.41px"
1133
- },
1134
- caption: {
1135
- fontSize: "13px",
1136
- fontWeight: 400,
1137
- letterSpacing: "-0.08px"
1138
- },
1139
- label: {
1140
- fontSize: "15px",
1141
- fontWeight: 500,
1142
- letterSpacing: "-0.24px"
1143
- }
1144
- },
1145
- spacing: {
1146
- xs: "4px",
1147
- sm: "8px",
1148
- md: "12px",
1149
- lg: "20px",
1150
- xl: "32px"
1151
- },
1152
- borderRadius: {
1153
- sm: "8px",
1154
- md: "12px",
1155
- lg: "20px",
1156
- full: "9999px"
1157
- },
1158
- shadows: {
1159
- sm: "0 1px 3px rgba(0,0,0,0.08)",
1160
- md: "0 2px 8px rgba(0,0,0,0.1)",
1161
- lg: "0 4px 16px rgba(0,0,0,0.12)"
1162
- },
1163
- fontFamily: '-apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif'
1164
- }, Ee = {
1165
- name: "web",
1166
- colors: {
1167
- primary: "#3B82F6",
1168
- secondary: "#8B5CF6",
1169
- background: "#FFFFFF",
1170
- surface: "#F9FAFB",
1171
- error: "#EF4444",
1172
- success: "#10B981",
1173
- warning: "#F59E0B",
1174
- info: "#06B6D4",
1175
- onPrimary: "#FFFFFF",
1176
- onSecondary: "#FFFFFF",
1177
- onBackground: "#111827",
1178
- onSurface: "#374151",
1179
- onError: "#FFFFFF"
1180
- },
1181
- typography: {
1182
- h1: {
1183
- fontSize: "60px",
1184
- fontWeight: 800,
1185
- letterSpacing: "-0.02em"
1186
- },
1187
- h2: {
1188
- fontSize: "48px",
1189
- fontWeight: 700,
1190
- letterSpacing: "-0.01em"
1191
- },
1192
- h3: {
1193
- fontSize: "36px",
1194
- fontWeight: 700
1195
- },
1196
- h4: {
1197
- fontSize: "30px",
1198
- fontWeight: 600
1199
- },
1200
- h5: {
1201
- fontSize: "24px",
1202
- fontWeight: 600
1203
- },
1204
- h6: {
1205
- fontSize: "20px",
1206
- fontWeight: 600
1207
- },
1208
- body: {
1209
- fontSize: "16px",
1210
- fontWeight: 400,
1211
- lineHeight: "1.5"
1212
- },
1213
- caption: {
1214
- fontSize: "14px",
1215
- fontWeight: 400,
1216
- lineHeight: "1.4"
1217
- },
1218
- label: {
1219
- fontSize: "14px",
1220
- fontWeight: 500,
1221
- letterSpacing: "0.01em"
1222
- }
1223
- },
1224
- spacing: {
1225
- xs: "4px",
1226
- sm: "8px",
1227
- md: "16px",
1228
- lg: "24px",
1229
- xl: "32px"
1230
- },
1231
- borderRadius: {
1232
- sm: "6px",
1233
- md: "8px",
1234
- lg: "12px",
1235
- full: "9999px"
1236
- },
1237
- shadows: {
1238
- sm: "0 1px 2px rgba(0,0,0,0.05)",
1239
- md: "0 4px 6px rgba(0,0,0,0.07)",
1240
- lg: "0 10px 15px rgba(0,0,0,0.1)"
1241
- },
1242
- fontFamily: "Inter, system-ui, sans-serif"
1243
- }, ie = X(void 0), Q = {
1244
- material: we,
1245
- cupertino: Ne,
1246
- web: Ee
1247
- };
1248
- function Es({
1249
- theme: i = "material",
1250
- children: t
1251
- }) {
1252
- const [e, r] = $(i), [o, l] = $(Q[i]);
1253
- M(() => {
1254
- const c = Q[e];
1255
- if (l(c), typeof document < "u") {
1256
- const d = document.documentElement;
1257
- d.classList.remove("fibo-theme-material", "fibo-theme-cupertino", "fibo-theme-web"), d.classList.add(`fibo-theme-${e}`), d.style.setProperty("--fibo-primary", c.colors.primary), d.style.setProperty("--fibo-secondary", c.colors.secondary), d.style.setProperty("--fibo-background", c.colors.background), d.style.setProperty("--fibo-surface", c.colors.surface), d.style.setProperty("--fibo-error", c.colors.error), d.style.setProperty("--fibo-font-family", c.fontFamily);
1258
- }
1259
- }, [e]);
1260
- const a = {
1261
- theme: o,
1262
- themeName: e,
1263
- setTheme: r
1264
- };
1265
- return /* @__PURE__ */ S(ie.Provider, { value: a, children: t });
1266
- }
1267
- function Cs() {
1268
- const i = Y(ie);
1269
- if (!i)
1270
- throw new Error("useFiboTheme must be used within a FiboThemeProvider");
1271
- return i;
1272
- }
1273
- class Ce extends x {
1274
- build() {
1275
- const t = this.getClassName(), e = this.getStyle(), r = this.processChildren();
1276
- return s.createElement(
1277
- "div",
1278
- {
1279
- className: `fibo-container ${t}`,
1280
- style: e,
1281
- ...this._props
1282
- },
1283
- ...r
1284
- );
1285
- }
1286
- }
1287
- const Ss = y(Ce);
1288
- class Se extends x {
1289
- constructor() {
1290
- super(...arguments);
1291
- n(this, "_mainAxisAlignment", "start");
1292
- n(this, "_crossAxisAlignment", "start");
1293
- n(this, "_spacing");
1294
- }
1295
- mainAxisAlignment(e) {
1296
- return this._mainAxisAlignment = e, this;
1297
- }
1298
- crossAxisAlignment(e) {
1299
- return this._crossAxisAlignment = e, this;
1300
- }
1301
- spacing(e) {
1302
- return this._spacing = e, this;
1303
- }
1304
- items(e) {
1305
- return this.children(e), this;
1306
- }
1307
- build() {
1308
- const e = {
1309
- start: "justify-start",
1310
- center: "justify-center",
1311
- end: "justify-end",
1312
- spaceBetween: "justify-between",
1313
- spaceAround: "justify-around",
1314
- spaceEvenly: "justify-evenly"
1315
- }, r = {
1316
- start: "items-start",
1317
- center: "items-center",
1318
- end: "items-end",
1319
- stretch: "items-stretch"
1320
- }, o = [
1321
- "fibo-row",
1322
- "flex",
1323
- "flex-row",
1324
- e[this._mainAxisAlignment],
1325
- r[this._crossAxisAlignment],
1326
- ...this._classNames
1327
- ], l = this.getStyle();
1328
- this._spacing && (typeof this._spacing == "number" ? l.gap = `${this._spacing}px` : isNaN(Number(this._spacing)) ? l.gap = this._spacing : l.gap = `${Number(this._spacing) * 4}px`);
1329
- const a = o.filter(Boolean).join(" "), c = this.processChildren();
1330
- return s.createElement(
1331
- "div",
1332
- {
1333
- className: a,
1334
- style: l,
1335
- ...this._props
1336
- },
1337
- ...c
1338
- );
1339
- }
1340
- }
1341
- const R = y(Se);
1342
- class Fe extends x {
1343
- constructor() {
1344
- super(...arguments);
1345
- n(this, "_mainAxisAlignment", "start");
1346
- n(this, "_crossAxisAlignment", "start");
1347
- n(this, "_spacing");
1348
- n(this, "_size");
1349
- }
1350
- mainAxisAlignment(e) {
1351
- return this._mainAxisAlignment = e, this;
1352
- }
1353
- crossAxisAlignment(e) {
1354
- return this._crossAxisAlignment = e, this;
1355
- }
1356
- spacing(e) {
1357
- return this._spacing = e, this;
1358
- }
1359
- size(e) {
1360
- return this._size = e, this;
1361
- }
1362
- build() {
1363
- const e = {
1364
- start: "justify-start",
1365
- center: "justify-center",
1366
- end: "justify-end",
1367
- spaceBetween: "justify-between",
1368
- spaceAround: "justify-around",
1369
- spaceEvenly: "justify-evenly"
1370
- }, r = {
1371
- start: "items-start",
1372
- center: "items-center",
1373
- end: "items-end",
1374
- stretch: "items-stretch"
1375
- }, o = {
1376
- small: "flex-[0.3]",
1377
- medium: "flex-1",
1378
- large: "flex-[1.5]"
1379
- }, l = [
1380
- "fibo-column",
1381
- "flex",
1382
- "flex-col",
1383
- e[this._mainAxisAlignment],
1384
- r[this._crossAxisAlignment],
1385
- this._size ? o[this._size] : "",
1386
- ...this._classNames
1387
- ], a = this.getStyle();
1388
- 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`);
1389
- const c = l.filter(Boolean).join(" "), d = this.processChildren();
1390
- return s.createElement(
1391
- "div",
1392
- {
1393
- className: c,
1394
- style: a,
1395
- ...this._props
1396
- },
1397
- ...d
1398
- );
1399
- }
1400
- }
1401
- const P = y(Fe);
1402
- class ze extends x {
1403
- constructor() {
1404
- super(...arguments);
1405
- n(this, "_height");
1406
- n(this, "_width");
1407
- }
1408
- height(e) {
1409
- return this._height = e, this;
1410
- }
1411
- width(e) {
1412
- return this._width = e, this;
1413
- }
1414
- build() {
1415
- const e = this.getStyle();
1416
- 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);
1417
- const r = this.getClassName();
1418
- return s.createElement("div", {
1419
- className: `fibo-spacer ${r}`,
1420
- style: e,
1421
- ...this._props
1422
- });
1423
- }
1424
- }
1425
- const V = y(ze);
1426
- class Be extends x {
1427
- constructor() {
1428
- super(...arguments);
1429
- n(this, "_sizeHeight");
1430
- }
1431
- sizeHeight(e) {
1432
- return this._sizeHeight = e, this;
1433
- }
1434
- build() {
1435
- const r = ["fibo-line", "flex", "flex-row", ...this._classNames].filter(Boolean).join(" "), o = this.getStyle();
1436
- this._sizeHeight && (o.height = this._sizeHeight);
1437
- const l = this.processChildren();
1438
- return s.createElement(
1439
- "div",
1440
- {
1441
- className: r,
1442
- style: o,
1443
- ...this._props
1444
- },
1445
- ...l
1446
- );
1447
- }
1448
- }
1449
- const Fs = y(Be);
1450
- class Ae extends x {
1451
- build() {
1452
- const e = [
1453
- "fibo-center",
1454
- "flex",
1455
- "items-center",
1456
- "justify-center",
1457
- ...this._classNames
1458
- ].filter(Boolean).join(" "), r = this.getStyle(), o = this.processChildren();
1459
- return s.createElement(
1460
- "div",
1461
- {
1462
- className: e,
1463
- style: r,
1464
- ...this._props
1465
- },
1466
- ...o
1467
- );
1468
- }
1469
- }
1470
- const zs = y(Ae);
1471
- class $e extends x {
1472
- constructor() {
1473
- super(...arguments);
1474
- n(this, "_direction", "vertical");
1475
- n(this, "_scrollbar", "auto");
1476
- }
1477
- direction(e) {
1478
- return this._direction = e, this;
1479
- }
1480
- horizontal() {
1481
- return this._direction = "horizontal", this;
1482
- }
1483
- vertical() {
1484
- return this._direction = "vertical", this;
1485
- }
1486
- scrollbar(e) {
1487
- return this._scrollbar = e, this;
1488
- }
1489
- build() {
1490
- const e = {
1491
- overflowX: this._direction === "horizontal" || this._direction === "both" ? "auto" : "hidden",
1492
- overflowY: this._direction === "vertical" || this._direction === "both" ? "auto" : "hidden",
1493
- WebkitOverflowScrolling: "touch",
1494
- display: "flex",
1495
- flexDirection: this._direction === "horizontal" ? "row" : "column",
1496
- ...this.getStyle()
1497
- }, r = [...this.getClassName().split(" ")];
1498
- return this._scrollbar === "hidden" && (r.push("scrollbar-hide"), e.scrollbarWidth = "none", e.msOverflowStyle = "none"), s.createElement("div", {
1499
- className: r.join(" "),
1500
- style: e,
1501
- ...this._props
1502
- }, ...this._children);
1503
- }
1504
- }
1505
- const Bs = y($e), Ie = s.memo((i) => {
1506
- const { height: t = 64, sticky: e, className: r, style: o, children: l, ...a } = i;
1507
- return s.createElement(
1508
- "header",
1509
- {
1510
- className: `flex items-center px-6 border-b border-gray-200 bg-white/80 backdrop-blur-md z-10 w-full ${e ? "sticky top-0" : ""} ${r || ""}`,
1511
- style: { height: t, minHeight: t, ...o },
1512
- ...a
1513
- },
1514
- l
1515
- );
1516
- });
1517
- class je extends x {
1518
- constructor() {
1519
- super(...arguments);
1520
- n(this, "_height", 64);
1521
- n(this, "_sticky", !1);
1522
- }
1523
- height(e) {
1524
- return this._height = e, this;
1525
- }
1526
- sticky(e = !0) {
1527
- return this._sticky = e, this;
1528
- }
1529
- build() {
1530
- const e = {
1531
- height: this._height,
1532
- sticky: this._sticky,
1533
- className: this.getClassName(),
1534
- style: this.getStyle(),
1535
- children: this.processChildren(),
1536
- ...this._props
1537
- };
1538
- return s.createElement(Ie, e);
1539
- }
1540
- }
1541
- const As = y(je), We = s.memo((i) => {
1542
- const { width: t = 260, collapsed: e, className: r, style: o, children: l, ...a } = i, c = e ? 80 : t;
1543
- return s.createElement(
1544
- "aside",
1545
- {
1546
- className: `flex flex-col border-r border-gray-200 bg-white transition-all duration-300 h-full ${r || ""}`,
1547
- style: { width: c, minWidth: c, ...o },
1548
- ...a
1549
- },
1550
- l
1551
- );
1552
- });
1553
- class Le extends x {
1554
- constructor() {
1555
- super(...arguments);
1556
- n(this, "_width", 260);
1557
- n(this, "_collapsed", !1);
1558
- }
1559
- width(e) {
1560
- return this._width = e, this;
1561
- }
1562
- collapsible(e = !1) {
1563
- return this._collapsed = e, this;
1564
- }
1565
- build() {
1566
- const e = {
1567
- width: this._width,
1568
- collapsed: this._collapsed,
1569
- className: this.getClassName(),
1570
- style: this.getStyle(),
1571
- children: this.processChildren(),
1572
- ...this._props
1573
- };
1574
- return s.createElement(We, e);
1575
- }
1576
- }
1577
- const $s = y(Le), Me = s.memo((i) => {
1578
- const { sidebar: t, header: e, children: r, className: o, style: l, ...a } = i, [c, d] = $(!1);
1579
- return s.createElement(
1580
- "div",
1581
- {
1582
- className: `h-full w-full bg-[#0B0C15] overflow-hidden relative ${o || ""}`,
1583
- style: l,
1584
- ...a
1585
- },
1586
- c && s.createElement("div", {
1587
- className: "fixed inset-0 z-40 bg-black/50 backdrop-blur-sm transition-opacity lg:hidden",
1588
- onClick: () => d(!1)
1589
- }),
1590
- s.createElement(
1591
- "button",
1592
- {
1593
- className: "lg:hidden fixed top-4 right-4 z-50 p-2 rounded-lg bg-[#1A1B23] border border-white/10 text-white shadow-lg",
1594
- onClick: () => d(!c)
1595
- },
1596
- s.createElement("div", { className: c ? "i-heroicons-x-mark w-6 h-6" : "i-heroicons-bars-3 w-6 h-6" })
1597
- ),
1598
- s.createElement(
1599
- "div",
1600
- {
1601
- className: "grid h-full w-full lg:grid-cols-[260px_1fr] transition-all duration-300"
1602
- },
1603
- s.createElement(
1604
- "aside",
1605
- {
1606
- className: `
1607
- fixed inset-y-0 left-0 z-50 w-[260px] bg-[#0B0C15] border-r border-white/5 transition-transform duration-300 transform
1608
- lg:relative lg:translate-x-0
1609
- ${c ? "translate-x-0 shadow-2xl" : "-translate-x-full"}
1610
- `
1611
- },
1612
- t
1613
- ),
1614
- s.createElement(
1615
- "main",
1616
- {
1617
- className: "flex flex-col min-w-0 h-full overflow-hidden relative"
1618
- },
1619
- e && s.createElement("div", { className: "flex-shrink-0" }, e),
1620
- s.createElement(
1621
- "div",
1622
- { className: "flex-1 overflow-y-auto scrollbar-hide p-4 lg:p-0" },
1623
- r
1624
- )
1625
- )
1626
- )
1627
- );
1628
- });
1629
- class Re extends x {
1630
- constructor() {
1631
- super(...arguments);
1632
- n(this, "_sidebar");
1633
- n(this, "_header");
1634
- }
1635
- sidebar(e) {
1636
- return this._sidebar = e, this;
1637
- }
1638
- header(e) {
1639
- return this._header = e, this;
1640
- }
1641
- build() {
1642
- const e = {
1643
- sidebar: this._sidebar,
1644
- header: this._header,
1645
- className: this.getClassName(),
1646
- style: this.getStyle(),
1647
- children: this.processChildren(),
1648
- ...this._props
1649
- };
1650
- return s.createElement(Me, e);
1651
- }
1652
- }
1653
- const Is = y(Re), Te = s.memo((i) => {
1654
- const {
1655
- theme: t,
1656
- locale: e,
1657
- providers: r = {},
1658
- className: o,
1659
- style: l,
1660
- children: a
1661
- } = i, c = /* @__PURE__ */ new Map();
1662
- return t && c.set("theme", t), e && c.set("locale", e), Object.entries(r).forEach(([d, p]) => {
1663
- c.set(d, p);
1664
- }), c.size > 0 ? s.createElement(
1665
- me,
1666
- {
1667
- providers: c,
1668
- children: s.createElement(
1669
- "div",
1670
- {
1671
- className: `fibo-scaffold ${o || ""}`,
1672
- style: {
1673
- minHeight: "100vh",
1674
- display: "flex",
1675
- flexDirection: "column",
1676
- ...l
1677
- }
1678
- },
1679
- a
1680
- )
1681
- }
1682
- ) : s.createElement(
1683
- "div",
1684
- {
1685
- className: `fibo-scaffold ${o || ""}`,
1686
- style: {
1687
- minHeight: "100vh",
1688
- display: "flex",
1689
- flexDirection: "column",
1690
- ...l
1691
- }
1692
- },
1693
- a
1694
- );
1695
- });
1696
- class Pe extends x {
1697
- constructor() {
1698
- super(...arguments);
1699
- n(this, "_theme");
1700
- n(this, "_locale");
1701
- n(this, "_customProviders", {});
1702
- }
1703
- theme(e) {
1704
- return this._theme = e, this;
1705
- }
1706
- locale(e) {
1707
- return this._locale = e, this;
1708
- }
1709
- providers(e) {
1710
- return this._customProviders = { ...this._customProviders, ...e }, this;
1711
- }
1712
- provider(e, r) {
1713
- return this._customProviders[e] = r, this;
1714
- }
1715
- build() {
1716
- const e = {
1717
- theme: this._theme,
1718
- locale: this._locale,
1719
- providers: this._customProviders,
1720
- className: this.getClassName(),
1721
- style: this.getStyle(),
1722
- children: this.processChildren()
1723
- };
1724
- return s.createElement(Te, e);
1725
- }
1726
- }
1727
- const js = y(Pe), De = s.memo((i) => {
1728
- const { className: t, style: e, children: r, ...o } = i;
1729
- return s.createElement(
1730
- "div",
1731
- {
1732
- className: t,
1733
- style: e,
1734
- ...o
1735
- },
1736
- ...r
1737
- );
1738
- });
1739
- class Oe extends x {
1740
- build() {
1741
- const e = [
1742
- "fibo-box",
1743
- ...this._classNames
1744
- ].filter(Boolean).join(" "), r = this.getStyle(), o = this.processChildren(), l = {
1745
- className: e,
1746
- style: r,
1747
- children: o,
1748
- ...this._props
1749
- };
1750
- return s.createElement(De, l);
1751
- }
1752
- }
1753
- const w = y(Oe), He = s.memo((i) => {
1754
- const { image: t, size: e, border: r, shape: o, status: l, className: a, style: c } = i, d = typeof e == "number" ? `${e}px` : e, p = {
1755
- circle: "50%",
1756
- rounded: "24%",
1757
- square: "0"
1758
- }, u = {
1759
- none: "transparent",
1760
- online: "#10B981",
1761
- offline: "#9CA3AF",
1762
- busy: "#EF4444"
1763
- };
1764
- return w().className(a).style({
1765
- position: "relative",
1766
- width: d,
1767
- height: d,
1768
- borderRadius: p[o],
1769
- backgroundImage: `url(${t})`,
1770
- backgroundSize: "cover",
1771
- backgroundPosition: "center",
1772
- border: r,
1773
- boxShadow: r !== "none" ? "0 2px 8px rgba(0,0,0,0.05)" : "none",
1774
- ...c
1775
- }).children(
1776
- l !== "none" ? w().style({
1777
- position: "absolute",
1778
- bottom: "-2%",
1779
- right: "-2%",
1780
- width: "28%",
1781
- height: "28%",
1782
- minWidth: "10px",
1783
- minHeight: "10px",
1784
- backgroundColor: u[l],
1785
- borderRadius: "50%",
1786
- border: "3px solid #ffffff",
1787
- boxSizing: "content-box"
1788
- }).build() : null
1789
- ).build();
1790
- });
1791
- class Ve extends x {
1792
- constructor() {
1793
- super(...arguments);
1794
- n(this, "_image", "");
1795
- n(this, "_size", 40);
1796
- n(this, "_border", "none");
1797
- n(this, "_shape", "circle");
1798
- n(this, "_status", "none");
1799
- }
1800
- image(e) {
1801
- return this._image = e, this;
1802
- }
1803
- size(e) {
1804
- return this._size = e, this;
1805
- }
1806
- border(e) {
1807
- return this._border = e, this;
1808
- }
1809
- shape(e) {
1810
- return this._shape = e, this;
1811
- }
1812
- status(e) {
1813
- return this._status = e, this;
1814
- }
1815
- build() {
1816
- const e = {
1817
- image: this._image,
1818
- size: this._size,
1819
- border: this._border,
1820
- shape: this._shape,
1821
- status: this._status,
1822
- className: this.getClassName(),
1823
- style: this.getStyle()
1824
- };
1825
- return s.createElement(He, e);
1826
- }
1827
- }
1828
- const qe = y(Ve), Ge = s.memo((i) => {
1829
- const { text: t, type: e, className: r, style: o, ...l } = i, a = {
1830
- h1: "h1",
1831
- h2: "h2",
1832
- h3: "h3",
1833
- h4: "h4",
1834
- h5: "h5",
1835
- h6: "h6",
1836
- body: "p",
1837
- caption: "span",
1838
- label: "label"
1839
- };
1840
- return s.createElement(
1841
- a[e],
1842
- {
1843
- className: `fibo-text fibo-text-${e} ${r}`,
1844
- style: o,
1845
- ...l
1846
- },
1847
- t
1848
- );
1849
- });
1850
- class Xe extends x {
1851
- constructor(e = "") {
1852
- super();
1853
- n(this, "_text", "");
1854
- n(this, "_type", "body");
1855
- this._text = e;
1856
- }
1857
- text(e) {
1858
- return this._text = e, this;
1859
- }
1860
- type(e) {
1861
- return this._type = e, this;
1862
- }
1863
- variant(e) {
1864
- return this._type = e, this;
1865
- }
1866
- build() {
1867
- const e = {
1868
- text: this._text,
1869
- type: this._type,
1870
- className: this.getClassName(),
1871
- style: this.getStyle(),
1872
- ...this._props
1873
- };
1874
- return s.createElement(Ge, e);
1875
- }
1876
- }
1877
- const E = y(Xe), Ue = s.memo((i) => {
1878
- const { text: t, icon: e, variant: r, intent: o, shape: l, className: a, style: c } = i, d = {
1879
- none: { bg: "#F9FAFB", text: "#6B7280", border: "#E5E7EB" },
1880
- success: { bg: "#ECFDF5", text: "#059669", border: "transparent" },
1881
- warning: { bg: "#FFFBEB", text: "#D97706", border: "transparent" },
1882
- error: { bg: "#FFF1F2", text: "#E11D48", border: "transparent" },
1883
- info: { bg: "#EFF6FF", text: "#2563EB", border: "transparent" }
1884
- };
1885
- let u = { ...{
1886
- neutral: { backgroundColor: "#F9FAFB", color: "#6B7280", border: "1px solid #E5E7EB" },
1887
- accent: { backgroundColor: "#EFF6FF", color: "#3B82F6", border: "none" },
1888
- outline: { backgroundColor: "transparent", color: "#FFFFFF", border: "1px solid rgba(255,255,255,0.3)" },
1889
- glass: {
1890
- backgroundColor: "rgba(255, 255, 255, 0.85)",
1891
- backdropFilter: "blur(12px)",
1892
- color: "#111827",
1893
- border: "1px solid rgba(255, 255, 255, 0.4)"
1894
- },
1895
- solid: { backgroundColor: "#111827", color: "#FFFFFF", border: "none" },
1896
- dot: { backgroundColor: "transparent", color: "#6B7280", border: "1px solid #E5E7EB", padding: "4px 10px" }
1897
- }[r] };
1898
- if (o !== "none") {
1899
- const h = d[o];
1900
- if (r === "solid") {
1901
- const g = {
1902
- none: "#111827",
1903
- success: "#059669",
1904
- warning: "#D97706",
1905
- error: "#E11D48",
1906
- info: "#2563EB"
1907
- };
1908
- u.backgroundColor = g[o], u.color = "#FFFFFF";
1909
- } else r === "dot" ? (u.color = "#374151", u.borderColor = "#E5E7EB") : (u.backgroundColor = h.bg, u.color = h.text, h.border ? u.border = `1px solid ${h.border}` : u.border = "none");
1910
- }
1911
- const m = {
1912
- pill: "9999px",
1913
- rounded: "8px"
1914
- };
1915
- return w().className(a).style({
1916
- ...u,
1917
- borderRadius: m[l],
1918
- padding: r === "dot" ? "4px 8px" : "4px 10px",
1919
- display: "inline-flex",
1920
- alignItems: "center",
1921
- justifyContent: "center",
1922
- height: "fit-content",
1923
- fontSize: "11px",
1924
- lineHeight: "1",
1925
- fontWeight: 600,
1926
- ...c
1927
- }).children(
1928
- R().gap(6).alignItems("center").children([
1929
- r === "dot" && o !== "none" ? w().style({
1930
- width: "6px",
1931
- height: "6px",
1932
- borderRadius: "50%",
1933
- backgroundColor: d[o].text,
1934
- boxShadow: `0 0 6px ${d[o].text}66`
1935
- }).build() : null,
1936
- e ? w().classNames(["flex", "items-center"]).children(e).build() : null,
1937
- E(t).fontSize(12).fontWeight(600).style({ color: "inherit" }).build()
1938
- ]).build()
1939
- ).build();
1940
- });
1941
- class Ye extends x {
1942
- constructor() {
1943
- super(...arguments);
1944
- n(this, "_text", "");
1945
- n(this, "_icon");
1946
- n(this, "_variant", "neutral");
1947
- n(this, "_intent", "none");
1948
- n(this, "_shape", "rounded");
1949
- }
1950
- text(e) {
1951
- return this._text = e, this;
1952
- }
1953
- icon(e) {
1954
- return this._icon = e, this;
1955
- }
1956
- variant(e) {
1957
- return this._variant = e, this;
1958
- }
1959
- intent(e) {
1960
- return this._intent = e, this;
1961
- }
1962
- shape(e) {
1963
- return this._shape = e, this;
1964
- }
1965
- build() {
1966
- const e = {
1967
- text: this._text,
1968
- icon: this._icon,
1969
- variant: this._variant,
1970
- intent: this._intent,
1971
- shape: this._shape,
1972
- className: this.getClassName(),
1973
- style: this.getStyle()
1974
- };
1975
- return s.createElement(Ue, e);
1976
- }
1977
- }
1978
- const G = y(Ye), Je = s.memo((i) => {
1979
- const { text: t, htmlFor: e, required: r, className: o, style: l, ...a } = i;
1980
- return s.createElement(
1981
- "label",
1982
- {
1983
- className: `fibo-label text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 ${o}`,
1984
- htmlFor: e,
1985
- style: l,
1986
- ...a
1987
- },
1988
- t,
1989
- r && s.createElement("span", { className: "text-red-500 ml-0.5" }, "*")
1990
- );
1991
- });
1992
- class Ke extends x {
1993
- constructor(e = "") {
1994
- super();
1995
- n(this, "_text", "");
1996
- n(this, "_htmlFor");
1997
- n(this, "_required", !1);
1998
- this._text = e;
1999
- }
2000
- text(e) {
2001
- return this._text = e, this;
2002
- }
2003
- htmlFor(e) {
2004
- return this._htmlFor = e, this;
2005
- }
2006
- required(e = !0) {
2007
- return this._required = e, this;
2008
- }
2009
- build() {
2010
- const e = {
2011
- text: this._text,
2012
- htmlFor: this._htmlFor,
2013
- required: this._required,
2014
- className: this.getClassName(),
2015
- style: this.getStyle(),
2016
- ...this._props
2017
- };
2018
- return s.createElement(Je, e);
2019
- }
2020
- }
2021
- const Ws = y(Ke), Qe = s.memo((i) => {
2022
- const {
2023
- src: t,
2024
- alt: e,
2025
- fit: r,
2026
- resizable: o,
2027
- clipShape: l,
2028
- frameWidth: a,
2029
- frameHeight: c,
2030
- className: d,
2031
- style: p,
2032
- ...u
2033
- } = i, m = { ...p };
2034
- return m.objectFit = r, a && (m.width = `${a}px`), c && (m.height = `${c}px`), o && (m.maxWidth = "100%", m.height = "auto"), s.createElement("img", {
2035
- src: t,
2036
- alt: e,
2037
- className: d,
2038
- style: m,
2039
- ...u
2040
- });
2041
- });
2042
- class Ze extends x {
2043
- constructor(e = "") {
2044
- super();
2045
- n(this, "_src", "");
2046
- n(this, "_alt", "");
2047
- n(this, "_fit", "cover");
2048
- n(this, "_resizable", !1);
2049
- n(this, "_clipShape");
2050
- n(this, "_frameWidth");
2051
- n(this, "_frameHeight");
2052
- this._src = e;
2053
- }
2054
- src(e) {
2055
- return this._src = e, this;
2056
- }
2057
- alt(e) {
2058
- return this._alt = e, this;
2059
- }
2060
- resizable() {
2061
- return this._resizable = !0, this;
2062
- }
2063
- scaledToFit() {
2064
- return this._fit = "contain", this;
2065
- }
2066
- scaledToFill() {
2067
- return this._fit = "cover", this;
2068
- }
2069
- frame(e) {
2070
- return this._frameWidth = e.width, this._frameHeight = e.height, this;
2071
- }
2072
- clipShape(e) {
2073
- return this._clipShape = e, this;
2074
- }
2075
- foregroundStyle(e) {
2076
- return this;
2077
- }
2078
- build() {
2079
- const e = ["fibo-image", ...this._classNames];
2080
- this._clipShape === "circle" ? e.push("rounded-full") : this._clipShape === "rounded" && e.push("rounded-lg");
2081
- const r = e.filter(Boolean).join(" "), o = {
2082
- src: this._src,
2083
- alt: this._alt,
2084
- fit: this._fit,
2085
- resizable: this._resizable,
2086
- clipShape: this._clipShape,
2087
- frameWidth: this._frameWidth,
2088
- frameHeight: this._frameHeight,
2089
- className: r,
2090
- style: this.getStyle(),
2091
- ...this._props
2092
- };
2093
- return s.createElement(Qe, o);
2094
- }
2095
- }
2096
- const et = y(Ze), tt = s.memo((i) => {
2097
- const { size: t, color: e, variant: r = "circle", className: o, style: l, ...a } = i, d = typeof t == "number" ? t : {
2098
- sm: 16,
2099
- md: 24,
2100
- lg: 32,
2101
- xl: 48
2102
- }[t] || 24, p = e || "currentColor", u = {
2103
- className: `fibo-spinner ${o}`,
2104
- style: { width: d, height: d, ...l },
2105
- ...a
2106
- };
2107
- return r === "dots" ? s.createElement(
2108
- "div",
2109
- { ...u, className: `${u.className} flex items-center justify-between` },
2110
- [0, 1, 2].map((m) => s.createElement("div", {
2111
- key: m,
2112
- className: "w-[25%] h-[25%] rounded-full animate-bounce",
2113
- style: {
2114
- backgroundColor: p,
2115
- animationDelay: `${m * 0.1}s`
2116
- }
2117
- }))
2118
- ) : r === "pulse" ? s.createElement(
2119
- "div",
2120
- { ...u, className: `${u.className} relative flex items-center justify-center` },
2121
- [
2122
- s.createElement("div", {
2123
- key: "ring",
2124
- className: "absolute inset-0 rounded-full opacity-75 animate-ping",
2125
- style: { backgroundColor: p }
2126
- }),
2127
- s.createElement("div", {
2128
- key: "dot",
2129
- className: "relative rounded-full h-[75%] w-[75%]",
2130
- style: { backgroundColor: p }
2131
- })
2132
- ]
2133
- ) : r === "blocks" ? s.createElement(
2134
- "div",
2135
- { ...u, className: `${u.className} grid grid-cols-2 gap-[10%] p-[10%]` },
2136
- [0, 1, 2, 3].map((m) => s.createElement("div", {
2137
- key: m,
2138
- className: "w-full h-full bg-current animate-pulse",
2139
- style: {
2140
- backgroundColor: p,
2141
- animationDelay: `${m * 0.15}s`,
2142
- opacity: 0.6
2143
- }
2144
- }))
2145
- ) : s.createElement(
2146
- "div",
2147
- { ...u, className: `${u.className} animate-spin` },
2148
- s.createElement(
2149
- "svg",
2150
- {
2151
- xmlns: "http://www.w3.org/2000/svg",
2152
- fill: "none",
2153
- viewBox: "0 0 24 24",
2154
- style: { width: "100%", height: "100%" }
2155
- },
2156
- s.createElement("circle", {
2157
- className: "opacity-20",
2158
- cx: "12",
2159
- cy: "12",
2160
- r: "10",
2161
- stroke: p,
2162
- strokeWidth: "4"
2163
- }),
2164
- s.createElement("path", {
2165
- className: "",
2166
- fill: p,
2167
- d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"
2168
- })
2169
- )
2170
- );
2171
- });
2172
- class st extends x {
2173
- constructor() {
2174
- super(...arguments);
2175
- n(this, "_size", "md");
2176
- n(this, "_color");
2177
- n(this, "_variant", "circle");
2178
- }
2179
- size(e) {
2180
- return this._size = e, this;
2181
- }
2182
- color(e) {
2183
- return this._color = e, this;
2184
- }
2185
- variant(e) {
2186
- return this._variant = e, this;
2187
- }
2188
- build() {
2189
- const e = {
2190
- size: this._size,
2191
- color: this._color,
2192
- variant: this._variant,
2193
- className: this.getClassName(),
2194
- style: this.getStyle(),
2195
- ...this._props
2196
- };
2197
- return s.createElement(tt, e);
2198
- }
2199
- }
2200
- const Ls = y(st), rt = s.memo((i) => {
2201
- const { width: t, height: e, shape: r, className: o, style: l, ...a } = i, c = ["animate-pulse", "bg-gray-200", "loading-skeleton"];
2202
- return r === "circle" ? c.push("rounded-full") : r === "rounded-sm" ? c.push("rounded-sm") : r === "rounded-md" ? c.push("rounded-md") : r === "rounded-lg" ? c.push("rounded-lg") : r === "square" ? c.push("rounded-none") : c.push("rounded"), s.createElement("div", {
2203
- className: [...c, o].filter(Boolean).join(" "),
2204
- style: {
2205
- width: t,
2206
- height: e,
2207
- ...l
2208
- },
2209
- ...a
2210
- });
2211
- });
2212
- class it extends x {
2213
- constructor() {
2214
- super(...arguments);
2215
- n(this, "_width", "100%");
2216
- n(this, "_height", "20px");
2217
- n(this, "_shape", "rounded");
2218
- }
2219
- width(e) {
2220
- return this._width = e, this;
2221
- }
2222
- height(e) {
2223
- return this._height = e, this;
2224
- }
2225
- shape(e) {
2226
- return this._shape = e, this;
2227
- }
2228
- build() {
2229
- const e = {
2230
- width: this._width,
2231
- height: this._height,
2232
- shape: this._shape,
2233
- className: this.getClassName(),
2234
- style: this.getStyle(),
2235
- ...this._props
2236
- };
2237
- return s.createElement(rt, e);
2238
- }
2239
- }
2240
- const Ms = y(it), L = {
2241
- Heart: /* @__PURE__ */ S("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: /* @__PURE__ */ S("path", { d: "M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z" }) }),
2242
- Eth: /* @__PURE__ */ S("svg", { width: "14", height: "24", viewBox: "0 0 32 32", fill: "currentColor", children: /* @__PURE__ */ S("path", { d: "M15.925 23.96l-9.815-5.8 9.815 13.84 9.825-13.84-9.825 5.8zm0-23.96l-9.815 16.275 9.815 5.675 9.825-5.675-9.825-16.275zm0 20.3l-8.915-5.265 8.915-12.42 8.925 12.42-8.925 5.265z" }) }),
2243
- Verify: /* @__PURE__ */ S("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "#3B82F6", stroke: "none", children: /* @__PURE__ */ S("path", { d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z" }) }),
2244
- More: /* @__PURE__ */ O("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [
2245
- /* @__PURE__ */ S("circle", { cx: "12", cy: "12", r: "1" }),
2246
- /* @__PURE__ */ S("circle", { cx: "19", cy: "12", r: "1" }),
2247
- /* @__PURE__ */ S("circle", { cx: "5", cy: "12", r: "1" })
2248
- ] }),
2249
- Clock: /* @__PURE__ */ O("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [
2250
- /* @__PURE__ */ S("circle", { cx: "12", cy: "12", r: "10" }),
2251
- /* @__PURE__ */ S("polyline", { points: "12 6 12 12 16 14" })
2252
- ] }),
2253
- Info: /* @__PURE__ */ O("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
2254
- /* @__PURE__ */ S("circle", { cx: "12", cy: "12", r: "10" }),
2255
- /* @__PURE__ */ S("line", { x1: "12", y1: "16", x2: "12", y2: "12" }),
2256
- /* @__PURE__ */ S("line", { x1: "12", y1: "8", x2: "12.01", y2: "8" })
2257
- ] }),
2258
- Check: /* @__PURE__ */ O("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
2259
- /* @__PURE__ */ S("path", { d: "M22 11.08V12a10 10 0 1 1-5.93-9.14" }),
2260
- /* @__PURE__ */ S("polyline", { points: "22 4 12 14.01 9 11.01" })
2261
- ] }),
2262
- Search: /* @__PURE__ */ O("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
2263
- /* @__PURE__ */ S("circle", { cx: "11", cy: "11", r: "8" }),
2264
- /* @__PURE__ */ S("line", { x1: "21", y1: "21", x2: "16.65", y2: "16.65" })
2265
- ] }),
2266
- Close: /* @__PURE__ */ O("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
2267
- /* @__PURE__ */ S("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
2268
- /* @__PURE__ */ S("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
2269
- ] })
2270
- }, nt = s.memo((i) => {
2271
- const { title: t, description: e, intent: r = "info", className: o, style: l, ...a } = i, c = r, d = {
2272
- info: "bg-blue-500 text-white",
2273
- success: "bg-emerald-500 text-white",
2274
- warning: "bg-orange-400 text-white",
2275
- error: "bg-rose-500 text-white"
2276
- }, p = {
2277
- info: "bg-blue-600",
2278
- success: "bg-emerald-600",
2279
- warning: "bg-orange-500",
2280
- error: "bg-rose-600"
2281
- }, u = {
2282
- info: L.Info || s.createElement("span", {}, "?"),
2283
- success: L.Check || s.createElement("span", {}, "✔"),
2284
- warning: L.Search || s.createElement("span", {}, "!"),
2285
- error: L.Close || s.createElement("span", {}, "x")
2286
- }, m = `relative overflow-hidden flex items-start gap-4 p-5 rounded-3xl shadow-lg border-none ${d[c]}`;
2287
- return s.createElement("div", {
2288
- className: `${m} ${o}`,
2289
- style: l,
2290
- ...a
2291
- }, [
2292
- s.createElement("div", {
2293
- key: "blob1",
2294
- className: "absolute -top-6 -right-6 w-24 h-24 rounded-full bg-white opacity-10 pointer-events-none"
2295
- }),
2296
- s.createElement("div", {
2297
- key: "blob2",
2298
- className: "absolute bottom-[-10px] left-10 w-12 h-12 rounded-full bg-black opacity-5 pointer-events-none"
2299
- }),
2300
- s.createElement("div", {
2301
- key: "blob3",
2302
- className: "absolute top-10 right-20 w-8 h-8 rounded-full bg-white opacity-10 pointer-events-none"
2303
- }),
2304
- s.createElement("div", {
2305
- key: "icon-wrapper",
2306
- className: `relative z-10 shrink-0 w-10 h-10 rounded-full flex items-center justify-center shadow-sm ${p[c]}`
2307
- }, s.cloneElement(u[c], { width: 20, height: 20, strokeWidth: 3 })),
2308
- s.createElement("div", { key: "content", className: "relative z-10 flex flex-col gap-1.5 pt-0.5" }, [
2309
- t && s.createElement("h5", { key: "title", className: "font-bold text-lg leading-none tracking-tight" }, t),
2310
- e && s.createElement("p", { key: "desc", className: "text-sm font-medium opacity-90 leading-relaxed" }, e)
2311
- ])
2312
- ]);
2313
- });
2314
- class ot extends x {
2315
- constructor() {
2316
- super(...arguments);
2317
- n(this, "_title", "");
2318
- n(this, "_description");
2319
- n(this, "_intent", "info");
2320
- }
2321
- title(e) {
2322
- return this._title = e, this;
2323
- }
2324
- description(e) {
2325
- return this._description = e, this;
2326
- }
2327
- intent(e) {
2328
- return this._intent = e, this;
2329
- }
2330
- build() {
2331
- const e = {
2332
- title: this._title,
2333
- description: this._description,
2334
- intent: this._intent,
2335
- className: this.getClassName(),
2336
- style: this.getStyle(),
2337
- ...this._props
2338
- };
2339
- return s.createElement(nt, e);
2340
- }
2341
- }
2342
- const Rs = y(ot), lt = s.memo((i) => {
2343
- const {
2344
- value: t,
2345
- max: e,
2346
- color: r,
2347
- height: o,
2348
- variant: l = "default",
2349
- label: a,
2350
- subLabel: c,
2351
- items: d = [],
2352
- className: p,
2353
- style: u,
2354
- ...m
2355
- } = i, h = Math.min(100, Math.max(0, t / e * 100)), g = r || "#3B82F6";
2356
- if (l === "circular") {
2357
- const k = typeof o == "number" ? o : 64, C = 8, b = (k - C) / 2, f = b * 2 * Math.PI, F = f - h / 100 * f;
2358
- return s.createElement("div", {
2359
- className: `relative inline-flex items-center justify-center ${p}`,
2360
- style: { width: k, height: k, ...u },
2361
- ...m
2362
- }, [
2363
- s.createElement("svg", {
2364
- key: "svg",
2365
- className: "transform -rotate-90",
2366
- width: k,
2367
- height: k
2368
- }, [
2369
- s.createElement("circle", {
2370
- key: "track",
2371
- className: "text-gray-100",
2372
- stroke: "currentColor",
2373
- strokeWidth: C,
2374
- fill: "transparent",
2375
- r: b,
2376
- cx: k / 2,
2377
- cy: k / 2
2378
- }),
2379
- s.createElement("circle", {
2380
- key: "prog",
2381
- stroke: g,
2382
- strokeWidth: C,
2383
- strokeDasharray: f,
2384
- strokeDashoffset: F,
2385
- strokeLinecap: "round",
2386
- fill: "transparent",
2387
- r: b,
2388
- cx: k / 2,
2389
- cy: k / 2,
2390
- className: "transition-all duration-1000 ease-out"
2391
- })
2392
- ]),
2393
- s.createElement("span", {
2394
- key: "label",
2395
- className: "absolute text-sm font-bold text-gray-700"
2396
- }, a || `${Math.round(h)}%`)
2397
- ]);
2398
- }
2399
- if (l === "pagination") {
2400
- const C = Math.floor(h / 100 * 5);
2401
- return s.createElement("div", {
2402
- className: `flex items-center gap-2 ${p}`,
2403
- style: u,
2404
- ...m
2405
- }, Array.from({ length: 5 }).map((b, f) => {
2406
- const F = f === C;
2407
- return s.createElement("div", {
2408
- key: f,
2409
- className: `h-3 rounded-full transition-all duration-300 ${F ? "w-8" : "w-3"}`,
2410
- style: { backgroundColor: f <= C ? g : "#E5E7EB" }
2411
- });
2412
- }));
2413
- }
2414
- if (l === "timeline") {
2415
- const k = d.length ? d : [
2416
- { title: "Order components", date: "Done" },
2417
- { title: "Draft implementation", date: "In Progress" },
2418
- { title: "Verify functionality", date: "Pending" }
2419
- ], C = Math.floor(h / 100 * k.length);
2420
- return s.createElement("div", {
2421
- className: `flex flex-col relative ${p}`,
2422
- style: u,
2423
- ...m
2424
- }, k.map((b, f) => {
2425
- const F = f < C, j = f === C, W = f === k.length - 1, _ = F || j ? g : "#E5E7EB", z = F ? s.createElement("span", {}, "✓") : f + 1;
2426
- return s.createElement("div", {
2427
- key: f,
2428
- className: "relative flex items-start gap-4 pb-8 last:pb-0"
2429
- }, [
2430
- !W && s.createElement("div", {
2431
- key: "tail",
2432
- className: "absolute left-[19px] top-10 bottom-0 w-0.5 transition-colors duration-500",
2433
- style: { backgroundColor: F ? g : "#E5E7EB" }
2434
- }),
2435
- s.createElement("div", {
2436
- key: "dot",
2437
- className: "relative z-10 w-10 h-10 rounded-full flex items-center justify-center border-2 bg-white transition-all duration-300 shrink-0 text-sm font-bold shadow-sm",
2438
- style: {
2439
- borderColor: _,
2440
- color: F ? "#fff" : j ? _ : "#9CA3AF",
2441
- backgroundColor: F ? _ : "#fff"
2442
- }
2443
- }, z),
2444
- s.createElement("div", { key: "content", className: "pt-2" }, [
2445
- s.createElement("div", { className: "text-sm font-bold text-gray-900 leading-none" }, b.title),
2446
- b.description && s.createElement("div", { className: "text-xs text-gray-500 mt-1.5" }, b.description),
2447
- b.date && s.createElement("div", { className: "text-xs font-mono text-gray-400 mt-1" }, b.date)
2448
- ])
2449
- ]);
2450
- }));
2451
- }
2452
- if (l === "floating")
2453
- return s.createElement("div", {
2454
- className: `w-full bg-white rounded-xl shadow-sm border border-gray-100 p-4 relative overflow-hidden ${p}`,
2455
- style: u,
2456
- ...m
2457
- }, [
2458
- s.createElement("div", { key: "info", className: "flex justify-between items-center mb-3 px-1" }, [
2459
- s.createElement(
2460
- "span",
2461
- { key: "l", className: "text-sm font-semibold text-gray-700" },
2462
- a ? s.createElement("span", { className: "text-blue-600 mr-2" }, `${Math.round(h)}%`) : null,
2463
- a || "Update in progress..."
2464
- ),
2465
- c && s.createElement("span", { key: "r", className: "text-xs font-medium text-gray-400" }, c)
2466
- ]),
2467
- s.createElement("div", {
2468
- key: "track",
2469
- className: "w-full bg-blue-50 h-1.5 rounded-full overflow-hidden"
2470
- }, s.createElement("div", {
2471
- className: "h-full rounded-full transition-all duration-1000 ease-out",
2472
- style: { width: `${h}%`, backgroundColor: g }
2473
- }))
2474
- ]);
2475
- if (l === "chevron") {
2476
- const C = Math.floor(h / 100 * 3);
2477
- return s.createElement("div", {
2478
- className: `flex w-full rounded-lg overflow-hidden ${p}`,
2479
- style: u,
2480
- ...m
2481
- }, Array.from({ length: 3 }).map((b, f) => {
2482
- const F = f <= C;
2483
- return s.createElement("div", {
2484
- key: f,
2485
- className: "flex-1 h-10 flex items-center justify-center text-sm font-bold text-white transition-colors duration-300",
2486
- style: {
2487
- backgroundColor: F ? f === C ? g : "#60A5FA" : "#E5E7EB",
2488
- clipPath: f === 0 ? "polygon(0% 0%, 85% 0%, 100% 50%, 85% 100%, 0% 100%)" : f === 2 ? "polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%, 15% 50%)" : "polygon(0% 0%, 85% 0%, 100% 50%, 85% 100%, 0% 100%, 15% 50%)",
2489
- marginLeft: f === 0 ? 0 : "-10px",
2490
- paddingLeft: f === 0 ? 0 : "10px",
2491
- zIndex: 3 - f
2492
- }
2493
- }, `Step ${f + 1}`);
2494
- }));
2495
- }
2496
- if (l === "steps") {
2497
- const C = Math.ceil(h / 100 * 3);
2498
- return s.createElement("div", {
2499
- className: `w-full flex items-center justify-between relative ${p}`,
2500
- style: {
2501
- marginTop: "1rem",
2502
- ...u
2503
- },
2504
- ...m
2505
- }, [
2506
- s.createElement("div", {
2507
- key: "line-bg",
2508
- className: "absolute top-1/2 left-0 w-full h-1.5 bg-gray-200 z-0 transform -translate-y-1/2 rounded-full"
2509
- }),
2510
- s.createElement("div", {
2511
- key: "line-active",
2512
- className: "absolute top-1/2 left-0 h-1.5 z-0 transform -translate-y-1/2 transition-all duration-500 rounded-full",
2513
- style: { width: `${h}%`, backgroundColor: g }
2514
- }),
2515
- ...Array.from({ length: 3 }).map((b, f) => {
2516
- const F = f + 1, j = F <= C, W = F < C;
2517
- return s.createElement("div", {
2518
- key: f,
2519
- className: `relative z-10 w-10 h-10 rounded-full flex items-center justify-center text-sm font-bold transition-all duration-300 border-4 ${j ? "text-white border-white shadow-md" : "bg-gray-100 text-gray-400 border-gray-50"}`,
2520
- style: { backgroundColor: j ? g : void 0 }
2521
- }, W ? s.createElement("span", {}, "✔") : F);
2522
- })
2523
- ]);
2524
- }
2525
- const N = o || 12;
2526
- if (l === "segments") {
2527
- const C = Math.round(h / 100 * 10);
2528
- return s.createElement(
2529
- "div",
2530
- {
2531
- className: `flex gap-1.5 w-full ${p}`,
2532
- style: u,
2533
- ...m
2534
- },
2535
- Array.from({ length: 10 }).map((b, f) => s.createElement("div", {
2536
- key: f,
2537
- className: "h-3 flex-1 rounded-sm transition-all duration-300 first:rounded-l-full last:rounded-r-full",
2538
- style: {
2539
- height: o || 12,
2540
- backgroundColor: f < C ? g : "#E5E7EB"
2541
- }
2542
- }))
2543
- );
2544
- }
2545
- let v = null;
2546
- l === "striped" && (v = s.createElement("div", {
2547
- className: "w-full h-full opacity-30 animate-[stripes_1s_linear_infinite]",
2548
- style: {
2549
- backgroundImage: "linear-gradient(45deg,rgba(255,255,255,.25) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.25) 50%,rgba(255,255,255,.25) 75%,transparent 75%,transparent)",
2550
- backgroundSize: "20px 20px"
2551
- }
2552
- }));
2553
- const B = l === "labeled" ? s.createElement("div", {
2554
- className: "absolute -top-12 transform -translate-x-1/2 bg-slate-800 text-white text-xs font-bold py-1.5 px-3 rounded-lg shadow-xl whitespace-nowrap",
2555
- style: { left: `${h}%` }
2556
- }, [
2557
- a || `${Math.round(h)}%`,
2558
- s.createElement("div", { key: "arrow", className: "absolute -bottom-1 left-1/2 transform -translate-x-1/2 w-2 h-2 bg-slate-800 rotate-45" })
2559
- ]) : null, I = l === "knob" ? s.createElement("div", {
2560
- className: "absolute top-1/2 right-0 w-7 h-7 bg-white rounded-full shadow-lg border-4 transform translate-x-1/2 -translate-y-1/2 flex items-center justify-center",
2561
- style: { borderColor: g }
2562
- }, s.createElement("div", { className: "w-1.5 h-1.5 rounded-full", style: { backgroundColor: g } })) : null;
2563
- return s.createElement("div", {
2564
- className: `relative w-full ${l === "labeled" ? "mt-8" : ""}`,
2565
- ...m
2566
- }, [
2567
- B,
2568
- s.createElement(
2569
- "div",
2570
- {
2571
- key: "track",
2572
- className: `w-full bg-slate-100 rounded-full ${p}`,
2573
- style: {
2574
- width: "100%",
2575
- height: N,
2576
- ...u
2577
- }
2578
- },
2579
- s.createElement("div", {
2580
- className: "h-full transition-all duration-1000 ease-out rounded-full flex items-center justify-center relative",
2581
- style: {
2582
- width: `${h}%`,
2583
- backgroundColor: g
2584
- }
2585
- }, [v, I])
2586
- )
2587
- ]);
2588
- });
2589
- class at extends x {
2590
- constructor() {
2591
- super(...arguments);
2592
- n(this, "_value", 0);
2593
- n(this, "_max", 100);
2594
- n(this, "_color");
2595
- n(this, "_height");
2596
- n(this, "_variant", "default");
2597
- n(this, "_label");
2598
- n(this, "_subLabel");
2599
- n(this, "_items");
2600
- }
2601
- value(e) {
2602
- return this._value = e, this;
2603
- }
2604
- max(e) {
2605
- return this._max = e, this;
2606
- }
2607
- color(e) {
2608
- return this._color = e, this;
2609
- }
2610
- height(e) {
2611
- return this._height = e, this;
2612
- }
2613
- variant(e) {
2614
- return this._variant = e, this;
2615
- }
2616
- label(e) {
2617
- return this._label = e, this;
2618
- }
2619
- subLabel(e) {
2620
- return this._subLabel = e, this;
2621
- }
2622
- items(e) {
2623
- return this._items = e, this;
2624
- }
2625
- build() {
2626
- const e = {
2627
- value: this._value,
2628
- max: this._max,
2629
- color: this._color,
2630
- height: this._height,
2631
- variant: this._variant,
2632
- label: this._label,
2633
- subLabel: this._subLabel,
2634
- items: this._items,
2635
- className: this.getClassName(),
2636
- style: this.getStyle(),
2637
- ...this._props
2638
- };
2639
- return s.createElement(lt, e);
2640
- }
2641
- }
2642
- const Ts = y(at), ct = s.memo((i) => {
2643
- const {
2644
- text: t,
2645
- variant: e,
2646
- size: r,
2647
- onPress: o,
2648
- disabled: l,
2649
- icon: a,
2650
- shape: c,
2651
- shadow: d,
2652
- className: p,
2653
- style: u,
2654
- ...m
2655
- } = i, h = { ...u };
2656
- Object.assign(h, {
2657
- sm: { padding: "6px 14px", fontSize: "13px", gap: "6px", height: "32px" },
2658
- md: { padding: "10px 22px", fontSize: "15px", gap: "8px", height: "44px" },
2659
- lg: { padding: "16px 32px", fontSize: "17px", gap: "10px", height: "56px" }
2660
- }[r]), c === "pill" ? h.borderRadius = "9999px" : c === "square" ? h.borderRadius = "12px" : h.borderRadius = "14px", d === "soft" && (h.boxShadow = "0 8px 20px -6px rgba(59, 130, 246, 0.4)"), e === "ghost" ? (h.backgroundColor = "transparent", h.color = "#4B5563", h.boxShadow = "none", h.border = "1px solid transparent") : e === "text" ? (h.backgroundColor = "transparent", h.color = "#4B5563", h.boxShadow = "none", h.border = "none", h.paddingLeft = "8px", h.paddingRight = "8px") : e === "soft" ? (h.backgroundColor = "#EEF2FF", h.color = "#4F46E5", h.boxShadow = "none", h.border = "none") : e === "outline" && (h.backgroundColor = "transparent", h.border = "1.5px solid #E5E7EB", h.color = "#374151", h.boxShadow = "none");
2661
- const N = [];
2662
- return a && N.push(a), t && N.push(t), s.createElement(
2663
- "button",
2664
- {
2665
- className: p,
2666
- style: {
2667
- display: "inline-flex",
2668
- alignItems: "center",
2669
- justifyContent: "center",
2670
- cursor: l ? "not-allowed" : "pointer",
2671
- opacity: l ? 0.6 : 1,
2672
- fontWeight: 600,
2673
- whiteSpace: "nowrap",
2674
- ...h
2675
- },
2676
- onClick: (v) => {
2677
- if (!l) {
2678
- if (document.documentElement.classList.contains("fibo-theme-material")) {
2679
- const B = v.currentTarget;
2680
- import("./effects-D16XdB_d.mjs").then(({ createRipple: I }) => {
2681
- I(v, B);
2682
- });
2683
- }
2684
- o == null || o();
2685
- }
2686
- },
2687
- disabled: l,
2688
- ...m
2689
- },
2690
- ...N
2691
- );
2692
- });
2693
- class ht extends x {
2694
- constructor(e = "") {
2695
- super();
2696
- n(this, "_text", "");
2697
- n(this, "_variant", "elevated");
2698
- n(this, "_size", "md");
2699
- n(this, "_onPress");
2700
- n(this, "_disabled", !1);
2701
- n(this, "_icon");
2702
- n(this, "_shape", "default");
2703
- n(this, "_shadow", "none");
2704
- this._text = e;
2705
- }
2706
- text(e) {
2707
- return this._text = e, this;
2708
- }
2709
- variant(e) {
2710
- return this._variant = e, this;
2711
- }
2712
- size(e) {
2713
- return this._size = e, this;
2714
- }
2715
- onPress(e) {
2716
- return this._onPress = e, this;
2717
- }
2718
- disabled(e = !0) {
2719
- return this._disabled = e, this;
2720
- }
2721
- icon(e) {
2722
- return this._icon = e, this;
2723
- }
2724
- shape(e) {
2725
- return this._shape = e, this;
2726
- }
2727
- shadow(e) {
2728
- return this._shadow = e, this;
2729
- }
2730
- build() {
2731
- const e = [
2732
- "fibo-button",
2733
- `fibo-button-${this._variant}`,
2734
- "active:scale-[0.96]",
2735
- "transform",
2736
- "transition-all",
2737
- "duration-200",
2738
- "ease-out",
2739
- ...this._classNames
2740
- ].filter(Boolean).join(" "), r = {
2741
- text: this._text,
2742
- variant: this._variant,
2743
- size: this._size,
2744
- onPress: this._onPress,
2745
- disabled: this._disabled,
2746
- icon: this._icon,
2747
- shape: this._shape,
2748
- shadow: this._shadow,
2749
- className: e,
2750
- style: this.getStyle(),
2751
- ...this._props
2752
- };
2753
- return s.createElement(ct, r);
2754
- }
2755
- }
2756
- const K = y(ht), dt = (i, t) => {
2757
- let e = 0;
2758
- const r = i.replace(/\D/g, "").split("");
2759
- let o = "";
2760
- for (let l = 0; l < t.length && !(e >= r.length); l++)
2761
- t[l] === "9" ? o += r[e++] : o += t[l];
2762
- return o;
2763
- }, ut = s.memo((i) => {
2764
- const t = s.useId(), e = i.id || t, [r, o] = s.useState(!1), {
2765
- containerClass: l,
2766
- containerStyle: a,
2767
- label: c,
2768
- error: d,
2769
- mask: p,
2770
- type: u,
2771
- value: m,
2772
- // Can be string or Signal
2773
- onChange: h,
2774
- ...g
2775
- } = i, N = m instanceof Z, [v, B] = $(N ? m.value : m);
2776
- M(() => {
2777
- if (N)
2778
- return m.subscribe((f) => {
2779
- B(f);
2780
- });
2781
- B(m);
2782
- }, [m, N]);
2783
- const I = u === "password", k = I && r ? "text" : u, C = (b) => {
2784
- let f = b.target.value;
2785
- if (p) {
2786
- f = dt(f, p);
2787
- const F = {
2788
- ...b,
2789
- target: {
2790
- ...b.target,
2791
- value: f
2792
- }
2793
- };
2794
- N && (m.value = f), h == null || h(F);
2795
- } else
2796
- N && (m.value = f), h == null || h(b);
2797
- };
2798
- return s.createElement(
2799
- "div",
2800
- { className: l, style: a },
2801
- s.createElement("div", { className: "relative w-full" }, [
2802
- s.createElement("input", {
2803
- key: "input",
2804
- id: e,
2805
- className: "fibo-textfield-input",
2806
- type: k,
2807
- onChange: C,
2808
- value: v,
2809
- ...g
2810
- }),
2811
- c && s.createElement(
2812
- "label",
2813
- {
2814
- key: "label",
2815
- htmlFor: e,
2816
- className: "fibo-textfield-label"
2817
- },
2818
- c
2819
- ),
2820
- I && s.createElement(
2821
- "button",
2822
- {
2823
- key: "toggle",
2824
- type: "button",
2825
- className: "absolute right-3 top-1/2 transform -translate-y-1/2 text-gray-400 hover:text-gray-600 focus:outline-none",
2826
- onClick: () => o(!r),
2827
- tabIndex: -1
2828
- },
2829
- r ? s.createElement(
2830
- "svg",
2831
- { width: 16, height: 16, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round" },
2832
- s.createElement("path", { d: "M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24" }),
2833
- s.createElement("line", { x1: 1, y1: 1, x2: 23, y2: 23 })
2834
- ) : s.createElement(
2835
- "svg",
2836
- { width: 16, height: 16, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round" },
2837
- s.createElement("path", { d: "M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z" }),
2838
- s.createElement("circle", { cx: 12, cy: 12, r: 3 })
2839
- )
2840
- )
2841
- ]),
2842
- d && s.createElement(
2843
- "span",
2844
- { className: "text-[var(--fibo-error)] text-xs mt-1 ml-1" },
2845
- d
2846
- )
2847
- );
2848
- });
2849
- class mt extends x {
2850
- constructor(e = "") {
2851
- super();
2852
- n(this, "_value", "");
2853
- n(this, "_label", "");
2854
- n(this, "_placeholder", "");
2855
- n(this, "_type", "text");
2856
- n(this, "_disabled", !1);
2857
- n(this, "_error");
2858
- n(this, "_mask");
2859
- n(this, "_onChange");
2860
- this._value = e;
2861
- }
2862
- value(e) {
2863
- return this._value = e, this;
2864
- }
2865
- label(e) {
2866
- return this._label = e, this;
2867
- }
2868
- placeholder(e) {
2869
- return this._placeholder = e, this;
2870
- }
2871
- type(e) {
2872
- return this._type = e, this;
2873
- }
2874
- mask(e) {
2875
- return this._mask = e, this;
2876
- }
2877
- disabled(e = !0) {
2878
- return this._disabled = e, this;
2879
- }
2880
- error(e) {
2881
- return this._error = e, this;
2882
- }
2883
- onChange(e) {
2884
- return this._onChange = e, this;
2885
- }
2886
- build() {
2887
- const r = {
2888
- containerClass: ["fibo-textfield-container", ...this._classNames].filter(Boolean).join(" "),
2889
- containerStyle: this.getStyle(),
2890
- label: this._label,
2891
- error: this._error,
2892
- value: this._value,
2893
- placeholder: this._placeholder || " ",
2894
- type: this._type,
2895
- mask: this._mask,
2896
- disabled: this._disabled,
2897
- onChange: (o) => {
2898
- var l;
2899
- (l = this._onChange) == null || l.call(this, o.target.value);
2900
- },
2901
- ...this._props
2902
- };
2903
- return s.createElement(ut, r);
2904
- }
2905
- }
2906
- const pt = y(mt), ft = s.memo((i) => {
2907
- const {
2908
- checked: t,
2909
- onChange: e,
2910
- label: r,
2911
- disabled: o,
2912
- className: l,
2913
- style: a
2914
- } = i, c = {
2915
- width: "44px",
2916
- height: "24px",
2917
- borderRadius: "9999px",
2918
- position: "relative",
2919
- transition: "background-color 0.2s ease-in-out",
2920
- cursor: o ? "not-allowed" : "pointer",
2921
- opacity: o ? 0.5 : 1,
2922
- backgroundColor: t ? "var(--fibo-primary, #3B82F6)" : "#E5E7EB",
2923
- ...a
2924
- }, d = {
2925
- width: "20px",
2926
- height: "20px",
2927
- borderRadius: "50%",
2928
- backgroundColor: "white",
2929
- position: "absolute",
2930
- top: "2px",
2931
- left: "2px",
2932
- transition: "transform 0.2s ease-in-out",
2933
- transform: t ? "translateX(20px)" : "translateX(0)",
2934
- boxShadow: "0 1px 3px rgba(0,0,0,0.1)"
2935
- };
2936
- return s.createElement(
2937
- "label",
2938
- {
2939
- className: `fibo-switch flex items-center gap-3 ${l}`
2940
- },
2941
- s.createElement(
2942
- "div",
2943
- {
2944
- className: "fibo-switch-track",
2945
- style: c,
2946
- onClick: (p) => {
2947
- p.preventDefault(), !o && e && e(!t);
2948
- }
2949
- },
2950
- s.createElement("div", { style: d })
2951
- ),
2952
- r && s.createElement(
2953
- "span",
2954
- { className: "text-sm font-medium text-gray-700 select-none" },
2955
- r
2956
- ),
2957
- s.createElement("input", {
2958
- type: "checkbox",
2959
- checked: t,
2960
- disabled: o,
2961
- className: "sr-only",
2962
- onChange: (p) => !o && (e == null ? void 0 : e(p.target.checked))
2963
- })
2964
- );
2965
- });
2966
- class gt extends x {
2967
- constructor() {
2968
- super(...arguments);
2969
- n(this, "_checked", !1);
2970
- n(this, "_onChange");
2971
- n(this, "_label");
2972
- n(this, "_disabled", !1);
2973
- }
2974
- checked(e) {
2975
- return this._checked = e, this;
2976
- }
2977
- onChange(e) {
2978
- return this._onChange = e, this;
2979
- }
2980
- label(e) {
2981
- return this._label = e, this;
2982
- }
2983
- disabled(e = !0) {
2984
- return this._disabled = e, this;
2985
- }
2986
- build() {
2987
- const e = {
2988
- checked: this._checked,
2989
- onChange: this._onChange,
2990
- label: this._label,
2991
- disabled: this._disabled,
2992
- className: this.getClassName(),
2993
- style: this.getStyle()
2994
- };
2995
- return s.createElement(ft, e);
2996
- }
2997
- }
2998
- const bt = y(gt), xt = s.memo((i) => {
2999
- const {
3000
- checked: t,
3001
- onChange: e,
3002
- label: r,
3003
- disabled: o,
3004
- indeterminate: l,
3005
- className: a,
3006
- style: c
3007
- } = i, d = t || l, p = {
3008
- width: "20px",
3009
- height: "20px",
3010
- borderRadius: "6px",
3011
- border: d ? "none" : "2px solid #D1D5DB",
3012
- backgroundColor: d ? "var(--fibo-primary, #3B82F6)" : "transparent",
3013
- display: "flex",
3014
- alignItems: "center",
3015
- justifyContent: "center",
3016
- transition: "all 0.2s",
3017
- cursor: o ? "not-allowed" : "pointer",
3018
- opacity: o ? 0.5 : 1,
3019
- ...c
3020
- };
3021
- let u = null;
3022
- return l ? u = s.createElement("div", { style: { width: "10px", height: "2px", backgroundColor: "white", borderRadius: "1px" } }) : t && (u = s.createElement(
3023
- "svg",
3024
- {
3025
- width: "12",
3026
- height: "12",
3027
- viewBox: "0 0 12 12",
3028
- fill: "none",
3029
- xmlns: "http://www.w3.org/2000/svg"
3030
- },
3031
- s.createElement("path", {
3032
- d: "M10 3L4.5 8.5L2 6",
3033
- stroke: "white",
3034
- strokeWidth: "2",
3035
- strokeLinecap: "round",
3036
- strokeLinejoin: "round"
3037
- })
3038
- )), s.createElement(
3039
- "label",
3040
- {
3041
- className: `fibo-checkbox flex items-center gap-2 ${a}`
3042
- },
3043
- s.createElement(
3044
- "div",
3045
- {
3046
- className: "fibo-checkbox-box",
3047
- style: p,
3048
- onClick: (m) => {
3049
- m.preventDefault(), !o && e && e(!t);
3050
- }
3051
- },
3052
- u
3053
- ),
3054
- r && s.createElement(
3055
- "span",
3056
- { className: "text-sm text-gray-700 select-none" },
3057
- r
3058
- ),
3059
- s.createElement("input", {
3060
- type: "checkbox",
3061
- checked: t,
3062
- disabled: o,
3063
- className: "sr-only",
3064
- onChange: (m) => !o && (e == null ? void 0 : e(m.target.checked))
3065
- })
3066
- );
3067
- });
3068
- class yt extends x {
3069
- constructor() {
3070
- super(...arguments);
3071
- n(this, "_checked", !1);
3072
- n(this, "_onChange");
3073
- n(this, "_label");
3074
- n(this, "_disabled", !1);
3075
- n(this, "_indeterminate", !1);
3076
- }
3077
- checked(e) {
3078
- return this._checked = e, this;
3079
- }
3080
- indeterminate(e) {
3081
- return this._indeterminate = e, this;
3082
- }
3083
- onChange(e) {
3084
- return this._onChange = e, this;
3085
- }
3086
- label(e) {
3087
- return this._label = e, this;
3088
- }
3089
- disabled(e = !0) {
3090
- return this._disabled = e, this;
3091
- }
3092
- build() {
3093
- const e = {
3094
- checked: this._checked,
3095
- onChange: this._onChange,
3096
- label: this._label,
3097
- disabled: this._disabled,
3098
- indeterminate: this._indeterminate,
3099
- className: this.getClassName(),
3100
- style: this.getStyle()
3101
- };
3102
- return s.createElement(xt, e);
3103
- }
3104
- }
3105
- const Ps = y(yt), _t = s.memo((i) => {
3106
- const {
3107
- value: t,
3108
- options: e,
3109
- onChange: r,
3110
- name: o,
3111
- direction: l,
3112
- className: a,
3113
- style: c
3114
- } = i;
3115
- return s.createElement(
3116
- "div",
3117
- {
3118
- className: `fibo-radio-group flex ${l === "vertical" ? "flex-col gap-2" : "flex-row gap-4"} ${a}`,
3119
- style: c
3120
- },
3121
- e.map((d) => {
3122
- const p = t === d.value, u = d.disabled;
3123
- return s.createElement(
3124
- "label",
3125
- {
3126
- key: d.value,
3127
- className: `flex items-center gap-2 cursor-pointer ${u ? "opacity-50 cursor-not-allowed" : ""}`
3128
- },
3129
- s.createElement(
3130
- "div",
3131
- {
3132
- className: "relative flex items-center justify-center",
3133
- style: {
3134
- width: "18px",
3135
- height: "18px",
3136
- borderRadius: "50%",
3137
- border: p ? "5px solid var(--fibo-primary, #3B82F6)" : "2px solid #D1D5DB",
3138
- transition: "all 0.2s"
3139
- }
3140
- },
3141
- s.createElement("input", {
3142
- type: "radio",
3143
- name: o,
3144
- value: d.value,
3145
- checked: p,
3146
- disabled: u,
3147
- className: "sr-only",
3148
- onChange: () => !u && (r == null ? void 0 : r(d.value))
3149
- })
3150
- ),
3151
- s.createElement(
3152
- "span",
3153
- { className: "text-sm text-gray-700" },
3154
- d.label
3155
- )
3156
- );
3157
- })
3158
- );
3159
- });
3160
- class kt extends x {
3161
- constructor() {
3162
- super(...arguments);
3163
- n(this, "_value", "");
3164
- n(this, "_options", []);
3165
- n(this, "_onChange");
3166
- n(this, "_name", `radio-group-${Math.random().toString(36).substr(2, 9)}`);
3167
- n(this, "_direction", "vertical");
3168
- }
3169
- value(e) {
3170
- return this._value = e, this;
3171
- }
3172
- options(e) {
3173
- return this._options = e, this;
3174
- }
3175
- onChange(e) {
3176
- return this._onChange = e, this;
3177
- }
3178
- direction(e) {
3179
- return this._direction = e, this;
3180
- }
3181
- name(e) {
3182
- return this._name = e, this;
3183
- }
3184
- build() {
3185
- const e = {
3186
- value: this._value,
3187
- options: this._options,
3188
- onChange: this._onChange,
3189
- name: this._name,
3190
- direction: this._direction,
3191
- className: this.getClassName(),
3192
- style: this.getStyle()
3193
- };
3194
- return s.createElement(_t, e);
3195
- }
3196
- }
3197
- const Ds = y(kt), vt = s.memo((i) => {
3198
- const t = s.useId(), e = i.id || t, {
3199
- containerClass: r,
3200
- containerStyle: o,
3201
- label: l,
3202
- error: a,
3203
- ...c
3204
- } = i;
3205
- return s.createElement(
3206
- "div",
3207
- { className: r, style: o },
3208
- s.createElement("textarea", {
3209
- id: e,
3210
- className: "fibo-textarea-input",
3211
- ...c
3212
- }),
3213
- l && s.createElement(
3214
- "label",
3215
- {
3216
- htmlFor: e,
3217
- className: "fibo-textarea-label"
3218
- },
3219
- l
3220
- ),
3221
- a && s.createElement(
3222
- "span",
3223
- { className: "text-[var(--fibo-error)] text-xs mt-1 ml-1" },
3224
- a
3225
- )
3226
- );
3227
- });
3228
- class wt extends x {
3229
- constructor() {
3230
- super(...arguments);
3231
- n(this, "_value", "");
3232
- n(this, "_label", "");
3233
- n(this, "_placeholder", "");
3234
- n(this, "_disabled", !1);
3235
- n(this, "_rows", 4);
3236
- n(this, "_error");
3237
- n(this, "_resize", "vertical");
3238
- n(this, "_onChange");
3239
- }
3240
- value(e) {
3241
- return this._value = e, this;
3242
- }
3243
- label(e) {
3244
- return this._label = e, this;
3245
- }
3246
- placeholder(e) {
3247
- return this._placeholder = e, this;
3248
- }
3249
- disabled(e = !0) {
3250
- return this._disabled = e, this;
3251
- }
3252
- rows(e) {
3253
- return this._rows = e, this;
3254
- }
3255
- resize(e) {
3256
- return this._resize = e, this;
3257
- }
3258
- error(e) {
3259
- return this._error = e, this;
3260
- }
3261
- onChange(e) {
3262
- return this._onChange = e, this;
3263
- }
3264
- build() {
3265
- const r = {
3266
- containerClass: ["fibo-textarea-container", ...this._classNames].filter(Boolean).join(" "),
3267
- containerStyle: { width: "100%", ...this.getStyle() },
3268
- label: this._label,
3269
- error: this._error,
3270
- rows: this._rows,
3271
- value: this._value,
3272
- placeholder: this._placeholder || " ",
3273
- disabled: this._disabled,
3274
- style: { resize: this._resize },
3275
- onChange: (o) => {
3276
- var l;
3277
- (l = this._onChange) == null || l.call(this, o.target.value);
3278
- },
3279
- ...this._props
3280
- };
3281
- return s.createElement(vt, r);
3282
- }
3283
- }
3284
- const Os = y(wt), Nt = s.memo((i) => {
3285
- const t = s.useId(), e = i.id || t, [r, o] = $(!1), l = U(null), {
3286
- containerClass: a,
3287
- containerStyle: c,
3288
- label: d,
3289
- error: p,
3290
- value: u,
3291
- options: m = [],
3292
- placeholder: h,
3293
- onChange: g,
3294
- disabled: N,
3295
- multiple: v,
3296
- ...B
3297
- } = i;
3298
- M(() => {
3299
- const b = (f) => {
3300
- l.current && !l.current.contains(f.target) && o(!1);
3301
- };
3302
- return document.addEventListener("mousedown", b), () => document.removeEventListener("mousedown", b);
3303
- }, []);
3304
- const I = (b) => v ? Array.isArray(u) && u.includes(b) : u === b;
3305
- let k = "";
3306
- if (v)
3307
- Array.isArray(u) && u.length > 0 && (k = m.filter((b) => u.includes(b.value)).map((b) => b.label).join(", "));
3308
- else {
3309
- const b = m.find((f) => f.value === u);
3310
- k = b ? b.label : "";
3311
- }
3312
- const C = (b) => {
3313
- if (!N)
3314
- if (v) {
3315
- const f = Array.isArray(u) ? [...u] : [], F = f.indexOf(b);
3316
- F > -1 ? f.splice(F, 1) : f.push(b), g == null || g(f);
3317
- } else
3318
- g == null || g(b), o(!1);
3319
- };
3320
- return s.createElement(
3321
- "div",
3322
- {
3323
- ref: l,
3324
- className: a,
3325
- style: c
3326
- },
3327
- s.createElement("div", { className: "relative w-full" }, [
3328
- s.createElement("button", {
3329
- key: "trigger",
3330
- id: e,
3331
- type: "button",
3332
- disabled: N,
3333
- className: `fibo-textfield-input text-left w-full flex items-center justify-between ${k ? "" : "text-gray-400"}`,
3334
- onClick: () => !N && o(!r),
3335
- ...B
3336
- }, [
3337
- s.createElement("span", { key: "text", className: "truncate" }, k || h || " "),
3338
- s.createElement("svg", {
3339
- key: "icon",
3340
- className: `w-4 h-4 transition-transform ${r ? "rotate-180" : ""}`,
3341
- fill: "none",
3342
- stroke: "currentColor",
3343
- viewBox: "0 0 24 24"
3344
- }, s.createElement("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M19 9l-7 7-7-7" }))
3345
- ]),
3346
- d && s.createElement(
3347
- "label",
3348
- {
3349
- key: "label",
3350
- htmlFor: e,
3351
- className: "fibo-textfield-label"
3352
- },
3353
- d
3354
- ),
3355
- r && s.createElement("div", {
3356
- key: "dropdown",
3357
- className: "absolute z-50 w-full mt-1 bg-[var(--fibo-surface)] border border-[var(--fibo-outline)] rounded-md shadow-lg max-h-60 overflow-auto focus:outline-none"
3358
- }, m.map((b) => {
3359
- const f = I(b.value);
3360
- return s.createElement("div", {
3361
- key: b.value,
3362
- className: `px-4 py-2 cursor-pointer text-sm hover:bg-[var(--fibo-primary-container)] hover:text-[var(--fibo-on-primary-container)] flex items-center justify-between ${f ? "bg-[var(--fibo-primary-container)] text-[var(--fibo-on-primary-container)] font-medium" : "text-[var(--fibo-on-surface)]"}`,
3363
- onClick: () => C(b.value)
3364
- }, [
3365
- s.createElement("span", { key: "label" }, b.label),
3366
- f && s.createElement("svg", {
3367
- key: "check",
3368
- className: "w-4 h-4 text-[var(--fibo-primary)]",
3369
- viewBox: "0 0 20 20",
3370
- fill: "currentColor"
3371
- }, s.createElement("path", { fillRule: "evenodd", d: "M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z", clipRule: "evenodd" }))
3372
- ]);
3373
- }))
3374
- ]),
3375
- p && s.createElement(
3376
- "span",
3377
- { className: "text-[var(--fibo-error)] text-xs mt-1 ml-1" },
3378
- p
3379
- )
3380
- );
3381
- });
3382
- class Et extends x {
3383
- constructor() {
3384
- super(...arguments);
3385
- n(this, "_value", "");
3386
- n(this, "_label", "");
3387
- n(this, "_placeholder", "");
3388
- n(this, "_disabled", !1);
3389
- n(this, "_error");
3390
- n(this, "_multiple", !1);
3391
- n(this, "_options", []);
3392
- n(this, "_onChange");
3393
- }
3394
- value(e) {
3395
- return this._value = e, this;
3396
- }
3397
- label(e) {
3398
- return this._label = e, this;
3399
- }
3400
- placeholder(e) {
3401
- return this._placeholder = e, this;
3402
- }
3403
- options(e) {
3404
- return this._options = e, this;
3405
- }
3406
- multiple(e = !0) {
3407
- return this._multiple = e, this;
3408
- }
3409
- disabled(e = !0) {
3410
- return this._disabled = e, this;
3411
- }
3412
- error(e) {
3413
- return this._error = e, this;
3414
- }
3415
- onChange(e) {
3416
- return this._onChange = e, this;
3417
- }
3418
- build() {
3419
- const r = {
3420
- containerClass: ["fibo-textfield-container relative", ...this._classNames].filter(Boolean).join(" "),
3421
- containerStyle: this.getStyle(),
3422
- label: this._label,
3423
- error: this._error,
3424
- value: this._value,
3425
- placeholder: this._placeholder,
3426
- options: this._options,
3427
- disabled: this._disabled,
3428
- multiple: this._multiple,
3429
- onChange: this._onChange,
3430
- ...this._props
3431
- };
3432
- return s.createElement(Nt, r);
3433
- }
3434
- }
3435
- const Hs = y(Et), Ct = s.memo((i) => {
3436
- const t = s.useId(), e = i.id || t, [r, o] = $(!1), [l, a] = $(""), c = U(null), {
3437
- containerClass: d,
3438
- containerStyle: p,
3439
- label: u,
3440
- error: m,
3441
- value: h,
3442
- options: g = [],
3443
- placeholder: N,
3444
- onChange: v,
3445
- onAdd: B,
3446
- disabled: I,
3447
- multiple: k,
3448
- ...C
3449
- } = i;
3450
- M(() => {
3451
- if (!k) {
3452
- const _ = i.options.find((z) => z.value === i.value);
3453
- _ && !r && l !== _.label && a(_.label);
3454
- }
3455
- }, [i.value, i.options, r, k]);
3456
- const b = g.filter(
3457
- (_) => _.label.toLowerCase().includes(l.toLowerCase())
3458
- );
3459
- M(() => {
3460
- const _ = (z) => {
3461
- if (c.current && !c.current.contains(z.target))
3462
- if (o(!1), k)
3463
- a("");
3464
- else {
3465
- const D = g.find((q) => q.value === h);
3466
- a(D ? D.label : "");
3467
- }
3468
- };
3469
- return document.addEventListener("mousedown", _), () => document.removeEventListener("mousedown", _);
3470
- }, [h, g, k]);
3471
- const f = (_) => {
3472
- if (k) {
3473
- const z = Array.isArray(h) ? [...h] : [];
3474
- z.includes(_.value) || (z.push(_.value), v == null || v(z)), a("");
3475
- } else
3476
- a(_.label), v == null || v(_.value), o(!1);
3477
- }, F = (_) => {
3478
- if (k && Array.isArray(h)) {
3479
- const z = h.filter((D) => D !== _);
3480
- v == null || v(z);
3481
- }
3482
- }, j = () => {
3483
- B == null || B(l), k ? a("") : o(!1);
3484
- }, W = (_) => k ? Array.isArray(h) && h.includes(_) : h === _;
3485
- return s.createElement(
3486
- "div",
3487
- {
3488
- ref: c,
3489
- className: d,
3490
- style: p
3491
- },
3492
- s.createElement("div", { className: "relative w-full" }, [
3493
- s.createElement("div", {
3494
- className: `fibo-textfield-input flex flex-wrap items-center gap-1 ${r ? "ring-2 ring-[var(--fibo-primary-container)] border-[var(--fibo-primary)]" : ""}`,
3495
- style: { minHeight: "42px", padding: "4px 8px" }
3496
- }, [
3497
- k && Array.isArray(h) && h.map((_) => {
3498
- const z = g.find((q) => q.value === _), D = z ? z.label : _;
3499
- return s.createElement("span", {
3500
- key: _,
3501
- className: "bg-[var(--fibo-primary-container)] text-[var(--fibo-on-primary-container)] text-xs font-medium px-2 py-1 rounded-md flex items-center"
3502
- }, [
3503
- D,
3504
- s.createElement("button", {
3505
- type: "button",
3506
- className: "ml-1 hover:text-[var(--fibo-primary)] focus:outline-none",
3507
- onClick: (q) => {
3508
- q.stopPropagation(), F(_);
3509
- }
3510
- }, "×")
3511
- ]);
3512
- }),
3513
- s.createElement("input", {
3514
- key: "input",
3515
- id: e,
3516
- className: "bg-transparent outline-none flex-1 min-w-[60px] text-sm h-8",
3517
- value: l,
3518
- placeholder: k && Array.isArray(h) && h.length > 0 ? "" : N || " ",
3519
- disabled: I,
3520
- onChange: (_) => {
3521
- a(_.target.value), r || o(!0);
3522
- },
3523
- onFocus: () => o(!0),
3524
- ...C
3525
- })
3526
- ]),
3527
- u && s.createElement(
3528
- "label",
3529
- {
3530
- key: "label",
3531
- htmlFor: e,
3532
- className: "fibo-textfield-label"
3533
- },
3534
- u
3535
- ),
3536
- r && s.createElement("div", {
3537
- key: "dropdown",
3538
- className: "absolute z-50 w-full mt-1 bg-[var(--fibo-surface)] border border-[var(--fibo-outline)] rounded-md shadow-lg max-h-60 overflow-auto focus:outline-none left-0"
3539
- }, [
3540
- b.length > 0 ? b.map((_) => {
3541
- const z = W(_.value);
3542
- return s.createElement("div", {
3543
- key: _.value,
3544
- className: `px-4 py-2 cursor-pointer text-sm hover:bg-[var(--fibo-primary-container)] hover:text-[var(--fibo-on-primary-container)] ${z ? "bg-[var(--fibo-primary-container)] text-[var(--fibo-on-primary-container)] font-medium opacity-50" : "text-[var(--fibo-on-surface)]"}`,
3545
- onClick: () => !z && f(_)
3546
- }, _.label);
3547
- }) : s.createElement("div", { className: "px-4 py-2 text-sm text-gray-500" }, "No results found."),
3548
- l && !b.some((_) => _.label.toLowerCase() === l.toLowerCase()) && B && s.createElement("div", {
3549
- key: "add-new",
3550
- className: "border-t border-[var(--fibo-outline)] px-4 py-2 cursor-pointer text-sm text-[var(--fibo-primary)] hover:bg-[var(--fibo-primary-container)] font-medium flex items-center",
3551
- onClick: j
3552
- }, [
3553
- s.createElement("span", { className: "mr-1" }, "+"),
3554
- `Add "${l}"`
3555
- ])
3556
- ])
3557
- ]),
3558
- m && s.createElement(
3559
- "span",
3560
- { className: "text-[var(--fibo-error)] text-xs mt-1 ml-1" },
3561
- m
3562
- )
3563
- );
3564
- });
3565
- class St extends x {
3566
- constructor() {
3567
- super(...arguments);
3568
- n(this, "_value", "");
3569
- n(this, "_label", "");
3570
- n(this, "_placeholder", "");
3571
- n(this, "_disabled", !1);
3572
- n(this, "_error");
3573
- n(this, "_multiple", !1);
3574
- n(this, "_options", []);
3575
- n(this, "_onChange");
3576
- n(this, "_onAdd");
3577
- }
3578
- value(e) {
3579
- return this._value = e, this;
3580
- }
3581
- label(e) {
3582
- return this._label = e, this;
3583
- }
3584
- placeholder(e) {
3585
- return this._placeholder = e, this;
3586
- }
3587
- options(e) {
3588
- return this._options = e, this;
3589
- }
3590
- multiple(e = !0) {
3591
- return this._multiple = e, this;
3592
- }
3593
- disabled(e = !0) {
3594
- return this._disabled = e, this;
3595
- }
3596
- error(e) {
3597
- return this._error = e, this;
3598
- }
3599
- onChange(e) {
3600
- return this._onChange = e, this;
3601
- }
3602
- onAdd(e) {
3603
- return this._onAdd = e, this;
3604
- }
3605
- build() {
3606
- const r = {
3607
- containerClass: ["fibo-textfield-container relative", ...this._classNames].filter(Boolean).join(" "),
3608
- containerStyle: this.getStyle(),
3609
- label: this._label,
3610
- error: this._error,
3611
- value: this._value,
3612
- placeholder: this._placeholder,
3613
- options: this._options,
3614
- disabled: this._disabled,
3615
- multiple: this._multiple,
3616
- onChange: this._onChange,
3617
- onAdd: this._onAdd,
3618
- ...this._props
3619
- };
3620
- return s.createElement(Ct, r);
3621
- }
3622
- }
3623
- const Vs = y(St), Ft = s.memo((i) => {
3624
- const { text: t, subtitle: e, number: r, color: o, className: l, style: a, children: c, ...d } = i;
3625
- return s.createElement(
3626
- "div",
3627
- {
3628
- 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 ${l || ""}`,
3629
- style: { backgroundColor: "#ffffff", ...a },
3630
- ...d
3631
- },
3632
- s.createElement(
3633
- "div",
3634
- { className: "flex flex-col gap-2" },
3635
- t && s.createElement(
3636
- "h3",
3637
- {
3638
- className: "font-semibold text-[var(--fibo-on-surface-variant)] text-sm uppercase tracking-wide"
3639
- },
3640
- t
3641
- ),
3642
- r && s.createElement(
3643
- "p",
3644
- {
3645
- className: "font-bold text-[var(--fibo-on-surface)] text-3xl"
3646
- },
3647
- r
3648
- ),
3649
- e && s.createElement(
3650
- "p",
3651
- {
3652
- className: "text-[var(--fibo-on-surface-variant)] text-xs"
3653
- },
3654
- e
3655
- ),
3656
- ...c
3657
- )
3658
- );
3659
- });
3660
- class zt extends x {
3661
- constructor() {
3662
- super(...arguments);
3663
- n(this, "_text", "");
3664
- n(this, "_subtitle");
3665
- n(this, "_number");
3666
- n(this, "_color");
3667
- }
3668
- text(e) {
3669
- return this._text = e, this;
3670
- }
3671
- subtitle(e) {
3672
- return this._subtitle = e, this;
3673
- }
3674
- number(e) {
3675
- return this._number = e, this;
3676
- }
3677
- color(e) {
3678
- return this._color = e, this;
3679
- }
3680
- build() {
3681
- const e = {
3682
- green: "border-l-green-500",
3683
- orange: "border-l-orange-500",
3684
- red: "border-l-red-500",
3685
- blue: "border-l-blue-500",
3686
- purple: "border-l-purple-500"
3687
- }, r = [
3688
- "fibo-card",
3689
- this._color ? `border-l-4 ${e[this._color]}` : "",
3690
- ...this._classNames
3691
- ].filter(Boolean).join(" "), o = {
3692
- text: this._text,
3693
- subtitle: this._subtitle,
3694
- number: this._number,
3695
- color: this._color,
3696
- className: r,
3697
- style: this.getStyle(),
3698
- children: this.processChildren(),
3699
- ...this._props
3700
- };
3701
- return s.createElement(Ft, o);
3702
- }
3703
- }
3704
- const T = y(zt), Bt = s.memo((i) => {
3705
- const {
3706
- items: t,
3707
- renderItem: e,
3708
- variant: r,
3709
- separator: o,
3710
- loading: l,
3711
- threshold: a,
3712
- onEndReached: c,
3713
- className: d,
3714
- style: p
3715
- } = i, u = s.useRef(null);
3716
- s.useEffect(() => {
3717
- if (!c || l) return;
3718
- const N = new IntersectionObserver(
3719
- (v) => {
3720
- v[0].isIntersecting && (c == null || c());
3721
- },
3722
- { threshold: a }
3723
- );
3724
- return u.current && N.observe(u.current), () => N.disconnect();
3725
- }, [l, t.length, c, a]);
3726
- const m = {
3727
- default: { gap: "0px" },
3728
- card: { gap: "12px" },
3729
- floating: { gap: "8px" }
3730
- }, h = {
3731
- default: {
3732
- padding: "12px 16px",
3733
- borderBottom: o ? "1px solid #F3F4F6" : "none",
3734
- backgroundColor: "transparent",
3735
- transition: "background-color 0.2s"
3736
- },
3737
- card: {
3738
- padding: "16px",
3739
- backgroundColor: "#fff",
3740
- borderRadius: "16px",
3741
- boxShadow: "0 2px 8px -2px rgba(0,0,0,0.05)",
3742
- border: "1px solid #F3F4F6",
3743
- transition: "transform 0.2s, box-shadow 0.2s"
3744
- },
3745
- floating: {
3746
- padding: "8px 12px",
3747
- borderRadius: "12px",
3748
- backgroundColor: "transparent",
3749
- transition: "background-color 0.2s"
3750
- }
3751
- }, g = {
3752
- default: ["hover:bg-gray-50", "first:rounded-t-xl", "last:rounded-b-xl"],
3753
- card: ["hover:-translate-y-0.5", "hover:shadow-md"],
3754
- floating: ["hover:bg-white", "hover:shadow-sm"]
3755
- };
3756
- return w().className(d).classNames(["flex", "flex-col", "w-full"]).style({
3757
- ...m[r],
3758
- ...p
3759
- }).children(
3760
- s.createElement(s.Fragment, {}, [
3761
- ...t.map(
3762
- (N, v) => s.cloneElement(
3763
- w().style(h[r]).classNames(g[r]).children(
3764
- e ? e(N, v) : null
3765
- ).build(),
3766
- { key: `item-${v}` }
3767
- )
3768
- ),
3769
- c && s.createElement("div", {
3770
- ref: u,
3771
- className: "py-4 flex justify-center w-full"
3772
- }, l ? s.createElement("div", { className: "animate-spin rounded-full h-5 w-5 border-2 border-gray-300 border-b-blue-600" }) : s.createElement("div", { style: { height: "20px" } }))
3773
- ])
3774
- ).build();
3775
- });
3776
- class At extends x {
3777
- constructor() {
3778
- super(...arguments);
3779
- n(this, "_items", []);
3780
- n(this, "_renderItem");
3781
- n(this, "_variant", "default");
3782
- n(this, "_separator", !1);
3783
- n(this, "_onEndReached");
3784
- n(this, "_loading", !1);
3785
- n(this, "_threshold", 0.5);
3786
- }
3787
- items(e) {
3788
- return this._items = e, this;
3789
- }
3790
- renderItem(e) {
3791
- return this._renderItem = e, this;
3792
- }
3793
- variant(e) {
3794
- return this._variant = e, this;
3795
- }
3796
- separator(e = !0) {
3797
- return this._separator = e, this;
3798
- }
3799
- onEndReached(e) {
3800
- return this._onEndReached = e, this;
3801
- }
3802
- loading(e) {
3803
- return this._loading = e, this;
3804
- }
3805
- threshold(e) {
3806
- return this._threshold = e, this;
3807
- }
3808
- build() {
3809
- const e = {
3810
- items: this._items,
3811
- renderItem: this._renderItem,
3812
- variant: this._variant,
3813
- separator: this._separator,
3814
- loading: this._loading,
3815
- threshold: this._threshold,
3816
- onEndReached: this._onEndReached,
3817
- className: this.getClassName(),
3818
- style: this.getStyle()
3819
- };
3820
- return s.createElement(Bt, e);
3821
- }
3822
- }
3823
- const qs = y(At), $t = s.memo((i) => {
3824
- const {
3825
- data: t,
3826
- columns: e,
3827
- variant: r,
3828
- density: o,
3829
- striped: l,
3830
- width: a,
3831
- className: c,
3832
- style: d
3833
- } = i, p = {
3834
- width: "100%",
3835
- borderCollapse: "separate",
3836
- borderSpacing: "0",
3837
- ...d
3838
- };
3839
- a && (p.width = typeof a == "number" ? `${a}px` : a);
3840
- const u = r === "clean" ? ["bg-white", "rounded-2xl", "border", "border-gray-100", "overflow-hidden", "shadow-sm"] : [], h = {
3841
- compact: "10px 16px",
3842
- standard: "16px 24px",
3843
- relaxed: "24px 32px"
3844
- }[o];
3845
- return w().className(c).classNames(u).children(
3846
- s.createElement("table", { style: p }, [
3847
- s.createElement(
3848
- "thead",
3849
- { key: "thead", className: "bg-gray-50/50" },
3850
- s.createElement(
3851
- "tr",
3852
- {},
3853
- e.map(
3854
- (g, N) => s.createElement("th", {
3855
- key: N,
3856
- style: {
3857
- textAlign: g.align || "left",
3858
- padding: h,
3859
- width: g.width
3860
- },
3861
- className: "text-xs font-bold text-gray-400 uppercase tracking-widest"
3862
- }, g.header)
3863
- )
3864
- )
3865
- ),
3866
- s.createElement(
3867
- "tbody",
3868
- { key: "tbody" },
3869
- t.map(
3870
- (g, N) => s.createElement(
3871
- "tr",
3872
- {
3873
- key: N,
3874
- className: `group transition-all duration-200 border-b border-gray-50 last:border-b-0 ${l && N % 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"}`
3875
- },
3876
- e.map(
3877
- (v, B) => s.createElement(
3878
- "td",
3879
- {
3880
- key: B,
3881
- style: {
3882
- textAlign: v.align || "left",
3883
- padding: h,
3884
- borderTop: r === "default" ? "1px solid #F3F4F6" : "none"
3885
- },
3886
- className: "text-sm text-gray-900 font-medium"
3887
- },
3888
- v.render ? v.render(g) : v.accessor ? g[v.accessor] : null
3889
- )
3890
- )
3891
- )
3892
- )
3893
- )
3894
- ])
3895
- ).build();
3896
- });
3897
- class It extends x {
3898
- constructor() {
3899
- super(...arguments);
3900
- n(this, "_data", []);
3901
- n(this, "_columns", []);
3902
- n(this, "_variant", "clean");
3903
- n(this, "_density", "standard");
3904
- n(this, "_striped", !1);
3905
- n(this, "_width");
3906
- }
3907
- data(e) {
3908
- return this._data = e, this;
3909
- }
3910
- columns(e) {
3911
- return this._columns = e, this;
3912
- }
3913
- variant(e) {
3914
- return this._variant = e, this;
3915
- }
3916
- density(e) {
3917
- return this._density = e, this;
3918
- }
3919
- striped(e = !0) {
3920
- return this._striped = e, this;
3921
- }
3922
- width(e) {
3923
- return this._width = e, this;
3924
- }
3925
- build() {
3926
- const e = {
3927
- data: this._data,
3928
- columns: this._columns,
3929
- variant: this._variant,
3930
- density: this._density,
3931
- striped: this._striped,
3932
- width: this._width,
3933
- className: this.getClassName(),
3934
- style: this.getStyle()
3935
- };
3936
- return s.createElement($t, e);
3937
- }
3938
- }
3939
- const Gs = y(It), jt = s.memo((i) => {
3940
- const { items: t, className: e, style: r, ...o } = i, l = t.map(
3941
- (a, c) => s.createElement(
3942
- "span",
3943
- {
3944
- key: c,
3945
- className: "fibo-tag"
3946
- },
3947
- a.title
3948
- )
3949
- );
3950
- return s.createElement(
3951
- "div",
3952
- {
3953
- className: e,
3954
- style: r,
3955
- ...o
3956
- },
3957
- ...l
3958
- );
3959
- });
3960
- class Wt extends x {
3961
- constructor(e = []) {
3962
- super();
3963
- n(this, "_items", []);
3964
- this._items = e;
3965
- }
3966
- items(e) {
3967
- return this._items = e, this;
3968
- }
3969
- build() {
3970
- const e = ["fibo-tags", "flex", "gap-2", "flex-wrap", ...this._classNames].filter(Boolean).join(" "), r = {
3971
- items: this._items,
3972
- className: e,
3973
- style: this.getStyle(),
3974
- ...this._props
3975
- };
3976
- return s.createElement(jt, r);
3977
- }
3978
- }
3979
- const Xs = y(Wt), Lt = s.memo((i) => {
3980
- const { status: t, title: e, subtitle: r, className: o, style: l, ...a } = i;
3981
- return s.createElement(
3982
- "div",
3983
- {
3984
- className: o,
3985
- style: l,
3986
- ...a
3987
- },
3988
- s.createElement(
3989
- "div",
3990
- { className: "flex flex-col gap-1" },
3991
- e && s.createElement(
3992
- "h4",
3993
- {
3994
- className: "font-semibold text-sm uppercase tracking-wide opacity-90"
3995
- },
3996
- e
3997
- ),
3998
- r && s.createElement(
3999
- "p",
4000
- {
4001
- className: "opacity-80 text-sm"
4002
- },
4003
- r
4004
- )
4005
- )
4006
- );
4007
- });
4008
- class Mt extends x {
4009
- constructor(e = "") {
4010
- super();
4011
- n(this, "_status", "info");
4012
- n(this, "_title", "");
4013
- n(this, "_subtitle");
4014
- this._title = e;
4015
- }
4016
- status(e) {
4017
- return this._status = e, this;
4018
- }
4019
- title(e) {
4020
- return this._title = e, this;
4021
- }
4022
- subtitle(e) {
4023
- return this._subtitle = e, this;
4024
- }
4025
- build() {
4026
- const r = [
4027
- "fibo-banner",
4028
- `fibo-banner-${this._status}`,
4029
- ...this._classNames
4030
- ].filter(Boolean).join(" "), o = {
4031
- status: this._status,
4032
- title: this._title,
4033
- subtitle: this._subtitle,
4034
- className: r,
4035
- style: this.getStyle(),
4036
- ...this._props
4037
- };
4038
- return s.createElement(Lt, o);
4039
- }
4040
- }
4041
- const Us = y(Mt), Rt = s.memo((i) => {
4042
- const { image: t, title: e, price: r, likes: o, timeLeft: l, className: a, style: c, ...d } = i;
4043
- return T().classNames(["group", "transition-all", "duration-300", "hover:-translate-y-1"]).style({
4044
- width: "100%",
4045
- borderRadius: "24px",
4046
- border: "none",
4047
- boxShadow: "0 10px 40px -10px rgba(0,0,0,0.05)",
4048
- padding: "16px",
4049
- background: "#fff",
4050
- ...c
4051
- }).className(a).props(d).children([
4052
- w().classNames(["relative", "aspect-square", "overflow-hidden", "rounded-[20px]"]).children([
4053
- w().classNames(["w-full", "h-full", "bg-gray-200", "bg-cover", "bg-center"]).style({ backgroundImage: `url(${t})` }).build(),
4054
- w().classNames(["absolute", "top-3", "right-3"]).children(
4055
- G().variant("glass").shape("pill").icon(w().classNames(["text-gray-400", "hover:text-red-500"]).children(L.Heart).build()).text(`${o}`).build()
4056
- ).build()
4057
- ]).build(),
4058
- V().height(16).build(),
4059
- R().justifyContent("between").alignItems("start").children([
4060
- P().gap(4).children([
4061
- E(e).fontWeight(700).fontSize(18).color("#111827").build(),
4062
- G().variant("neutral").text("Not for sale x1").build()
4063
- ]).build(),
4064
- w().classNames(["text-gray-300"]).children(L.More).build()
4065
- ]).build(),
4066
- V().height(16).build(),
4067
- R().justifyContent("between").alignItems("center").children([
4068
- P().gap(4).children([
4069
- E("Current Bid").fontSize(11).fontWeight(600).color("#6B7280").build(),
4070
- R().gap(4).alignItems("center").children([
4071
- w().classNames(["text-blue-500"]).children(L.Eth).build(),
4072
- E(`${r} ETH`).fontSize(15).fontWeight(700).color("#111827").build()
4073
- ]).build()
4074
- ]).build(),
4075
- K("Place a bid").variant("filled").shape("pill").shadow("soft").style({
4076
- backgroundColor: "#111827",
4077
- color: "#fff",
4078
- padding: "10px 20px",
4079
- fontSize: "13px",
4080
- fontWeight: 600
4081
- }).build()
4082
- ]).build(),
4083
- V().height(12).build(),
4084
- l ? G().variant("accent").shape("rounded").icon(w().children(L.Clock).build()).text(l).style({ width: "100%" }).build() : null
4085
- ]).build();
4086
- });
4087
- class Tt extends x {
4088
- constructor() {
4089
- super(...arguments);
4090
- n(this, "_image", "");
4091
- n(this, "_title", "");
4092
- n(this, "_price", "");
4093
- n(this, "_likes", "");
4094
- n(this, "_timeLeft");
4095
- }
4096
- image(e) {
4097
- return this._image = e, this;
4098
- }
4099
- title(e) {
4100
- return this._title = e, this;
4101
- }
4102
- price(e) {
4103
- return this._price = e, this;
4104
- }
4105
- likes(e) {
4106
- return this._likes = e, this;
4107
- }
4108
- timeLeft(e) {
4109
- return this._timeLeft = e, this;
4110
- }
4111
- build() {
4112
- const e = {
4113
- image: this._image,
4114
- title: this._title,
4115
- price: this._price,
4116
- likes: this._likes,
4117
- timeLeft: this._timeLeft,
4118
- className: this.getClassName(),
4119
- style: this.getStyle(),
4120
- ...this._props
4121
- };
4122
- return s.createElement(Rt, e);
4123
- }
4124
- }
4125
- const Ys = y(Tt), Pt = s.memo((i) => {
4126
- const { banner: t, avatar: e, name: r, handle: o, stats: l, className: a, style: c, ...d } = i;
4127
- return T().style({
4128
- width: "100%",
4129
- borderRadius: "24px",
4130
- border: "none",
4131
- boxShadow: "0 10px 40px -10px rgba(0,0,0,0.05)",
4132
- padding: "0",
4133
- overflow: "hidden",
4134
- background: "#fff",
4135
- ...c
4136
- }).className(a).props(d).children([
4137
- w().style({ height: "100px", backgroundImage: `url(${t})`, backgroundSize: "cover", backgroundPosition: "center" }).build(),
4138
- P().padding(20).alignItems("center").style({ marginTop: "-50px" }).children([
4139
- qe().image(e).size(80).border("4px solid #fff").build(),
4140
- V().height(12).build(),
4141
- R().gap(6).alignItems("center").children([
4142
- E(r).fontWeight(700).fontSize(18).color("#111827").build(),
4143
- L.Verify
4144
- ]).build(),
4145
- E(o).fontSize(13).color("#6B7280").style({ marginTop: "4px" }).build(),
4146
- V().height(16).build(),
4147
- K("+ Follow").variant("filled").shape("pill").shadow("soft").style({
4148
- backgroundColor: "#3B82F6",
4149
- color: "#fff",
4150
- padding: "8px 24px",
4151
- fontSize: "13px",
4152
- fontWeight: 600
4153
- }).build(),
4154
- V().height(24).build(),
4155
- R().classNames(["w-full", "border-t", "border-gray-100", "pt-4"]).justifyContent("between").children([
4156
- P().alignItems("center").gap(4).children([
4157
- E(l.items).fontWeight(700).fontSize(14).build(),
4158
- E("Items").fontSize(11).color("#9CA3AF").build()
4159
- ]).build(),
4160
- P().alignItems("center").gap(4).children([
4161
- E(l.owners).fontWeight(700).fontSize(14).build(),
4162
- E("Owners").fontSize(11).color("#9CA3AF").build()
4163
- ]).build(),
4164
- P().alignItems("center").gap(4).children([
4165
- R().alignItems("center").gap(2).children([
4166
- w().width(8).children(L.Eth).build(),
4167
- E(l.floor).fontWeight(700).fontSize(14).build()
4168
- ]).build(),
4169
- E("Floor").fontSize(11).color("#9CA3AF").build()
4170
- ]).build()
4171
- ]).build()
4172
- ]).build()
4173
- ]).build();
4174
- });
4175
- class Dt extends x {
4176
- constructor() {
4177
- super(...arguments);
4178
- n(this, "_banner", "");
4179
- n(this, "_avatar", "");
4180
- n(this, "_name", "");
4181
- n(this, "_handle", "");
4182
- n(this, "_stats", { items: "0", owners: "0", floor: "0" });
4183
- }
4184
- banner(e) {
4185
- return this._banner = e, this;
4186
- }
4187
- avatar(e) {
4188
- return this._avatar = e, this;
4189
- }
4190
- name(e) {
4191
- return this._name = e, this;
4192
- }
4193
- handle(e) {
4194
- return this._handle = e, this;
4195
- }
4196
- stats(e) {
4197
- return this._stats = e, this;
4198
- }
4199
- build() {
4200
- const e = {
4201
- banner: this._banner,
4202
- avatar: this._avatar,
4203
- name: this._name,
4204
- handle: this._handle,
4205
- stats: this._stats,
4206
- className: this.getClassName(),
4207
- style: this.getStyle(),
4208
- ...this._props
4209
- };
4210
- return s.createElement(Pt, e);
4211
- }
4212
- }
4213
- const Js = y(Dt), Ot = s.memo((i) => {
4214
- const { image: t, title: e, author: r, items: o, className: l, style: a, ...c } = i;
4215
- return T().classNames(["group", "cursor-pointer"]).style({
4216
- width: "100%",
4217
- borderRadius: "24px",
4218
- height: "320px",
4219
- position: "relative",
4220
- overflow: "hidden",
4221
- border: "none",
4222
- ...a
4223
- }).className(l).props(c).children([
4224
- w().classNames(["absolute", "inset-0", "bg-cover", "bg-center", "transition-transform", "duration-500"]).style({ backgroundImage: `url(${t})` }).build(),
4225
- w().classNames(["absolute", "inset-0", "bg-gradient-to-t", "from-black/80", "via-black/20", "to-transparent"]).build(),
4226
- P().classNames(["absolute", "bottom-0", "left-0", "p-6"]).gap(4).children([
4227
- E(o).color("white").fontSize(12).classNames(["opacity-90", "mb-1", "uppercase", "tracking-wider"]).fontWeight(600).build(),
4228
- E(e).color("white").fontSize(22).fontWeight(700).build(),
4229
- R().gap(6).alignItems("center").children([
4230
- E("Created by").color("white").fontSize(13).classNames(["opacity-80"]).build(),
4231
- E(r).color("white").fontSize(13).fontWeight(600).build(),
4232
- L.Verify
4233
- ]).build()
4234
- ]).build()
4235
- ]).build();
4236
- });
4237
- class Ht extends x {
4238
- constructor() {
4239
- super(...arguments);
4240
- n(this, "_image", "");
4241
- n(this, "_title", "");
4242
- n(this, "_author", "");
4243
- n(this, "_items", "");
4244
- }
4245
- image(e) {
4246
- return this._image = e, this;
4247
- }
4248
- title(e) {
4249
- return this._title = e, this;
4250
- }
4251
- author(e) {
4252
- return this._author = e, this;
4253
- }
4254
- items(e) {
4255
- return this._items = e, this;
4256
- }
4257
- build() {
4258
- const e = {
4259
- image: this._image,
4260
- title: this._title,
4261
- author: this._author,
4262
- items: this._items,
4263
- className: this.getClassName(),
4264
- style: this.getStyle(),
4265
- ...this._props
4266
- };
4267
- return s.createElement(Ot, e);
4268
- }
4269
- }
4270
- const Ks = y(Ht), Vt = s.memo((i) => {
4271
- const {
4272
- image: t,
4273
- title: e,
4274
- description: r,
4275
- date: o,
4276
- source: l,
4277
- className: a,
4278
- style: c
4279
- } = i;
4280
- return T().className(`overflow-hidden hover:shadow-lg transition-shadow duration-300 ${a}`).style(c).children([
4281
- t ? et().src(t).className("w-full object-cover rounded-[20px] mb-4").style({ height: "200px" }).build() : null,
4282
- w().className("flex flex-col gap-2").children([
4283
- e ? E(e).fontSize(18).fontWeight(700).color("#111827").lineHeight(1.25).build() : null,
4284
- r ? E(r).fontSize(14).color("#4B5563").lineHeight(1.5).className("line-clamp-2").build() : null,
4285
- l || o ? w().className("flex items-center gap-2 mt-2").children([
4286
- E(`${l || ""}${l && o ? " • " : ""}${o || ""}`).fontSize(11).fontWeight(600).color("#9CA3AF").textTransform("uppercase").letterSpacing("0.05em").build()
4287
- ]).build() : null
4288
- ]).build()
4289
- ]).build();
4290
- });
4291
- class qt extends x {
4292
- constructor() {
4293
- super(...arguments);
4294
- n(this, "_image");
4295
- n(this, "_title");
4296
- n(this, "_description");
4297
- n(this, "_date");
4298
- n(this, "_source");
4299
- }
4300
- image(e) {
4301
- return this._image = e, this;
4302
- }
4303
- title(e) {
4304
- return this._title = e, this;
4305
- }
4306
- description(e) {
4307
- return this._description = e, this;
4308
- }
4309
- date(e) {
4310
- return this._date = e, this;
4311
- }
4312
- source(e) {
4313
- return this._source = e, this;
4314
- }
4315
- build() {
4316
- const e = {
4317
- image: this._image,
4318
- title: this._title,
4319
- description: this._description,
4320
- date: this._date,
4321
- source: this._source,
4322
- className: this.getClassName(),
4323
- style: this.getStyle(),
4324
- ...this._props
4325
- };
4326
- return s.createElement(Vt, e);
4327
- }
4328
- }
4329
- const Qs = y(qt), Gt = s.memo((i) => {
4330
- const { title: t, description: e, icon: r, footer: o, className: l, style: a } = i;
4331
- return T().className(l).style(a).children([
4332
- w().className("flex items-start gap-4").children([
4333
- r ? w().className("mt-1 text-gray-400").children(r).build() : null,
4334
- w().className("flex-1").children([
4335
- t ? E(t).fontSize(16).fontWeight(600).color("#111827").build() : null,
4336
- e ? E(e).fontSize(14).color("#6B7280").className("mt-1").build() : null,
4337
- o ? w().className("mt-4").children(o).build() : null
4338
- ]).build()
4339
- ]).build()
4340
- ]).build();
4341
- });
4342
- class Xt extends x {
4343
- constructor() {
4344
- super(...arguments);
4345
- n(this, "_title");
4346
- n(this, "_description");
4347
- n(this, "_icon");
4348
- n(this, "_footer");
4349
- }
4350
- title(e) {
4351
- return this._title = e, this;
4352
- }
4353
- description(e) {
4354
- return this._description = e, this;
4355
- }
4356
- icon(e) {
4357
- return this._icon = e, this;
4358
- }
4359
- footer(e) {
4360
- return this._footer = e, this;
4361
- }
4362
- build() {
4363
- const e = {
4364
- title: this._title,
4365
- description: this._description,
4366
- icon: this._icon,
4367
- footer: this._footer,
4368
- className: this.getClassName(),
4369
- style: this.getStyle(),
4370
- ...this._props
4371
- };
4372
- return s.createElement(Gt, e);
4373
- }
4374
- }
4375
- const Ut = s.memo((i) => {
4376
- const { title: t, description: e, action: r, actionType: o, onAction: l, actionLabel: a, className: c, style: d } = i;
4377
- let p = r;
4378
- return p || (o === "button" ? p = K(a || "Action").variant("soft").size("sm").onPress(l).build() : o === "switch" && (p = bt().onChange(l).build())), T().className(`flex items-center justify-between gap-4 ${c || ""}`).style(d).children([
4379
- w().className("flex-1").children([
4380
- t ? E(t).fontSize(16).fontWeight(600).color("#111827").build() : null,
4381
- e ? E(e).fontSize(14).color("#6B7280").className("mt-1").build() : null
4382
- ]).build(),
4383
- p ? w().className("flex-shrink-0").children(p).build() : null
4384
- ]).build();
4385
- });
4386
- class Yt extends x {
4387
- constructor() {
4388
- super(...arguments);
4389
- n(this, "_title");
4390
- n(this, "_description");
4391
- n(this, "_action");
4392
- n(this, "_actionType");
4393
- n(this, "_actionLabel");
4394
- n(this, "_onAction");
4395
- }
4396
- title(e) {
4397
- return this._title = e, this;
4398
- }
4399
- description(e) {
4400
- return this._description = e, this;
4401
- }
4402
- action(e) {
4403
- return this._action = e, this;
4404
- }
4405
- withButton(e, r) {
4406
- return this._actionType = "button", this._actionLabel = e, this._onAction = r, this;
4407
- }
4408
- withSwitch(e) {
4409
- return this._actionType = "switch", this._onAction = e, this;
4410
- }
4411
- build() {
4412
- const e = {
4413
- title: this._title,
4414
- description: this._description,
4415
- action: this._action,
4416
- actionType: this._actionType,
4417
- actionLabel: this._actionLabel,
4418
- onAction: this._onAction,
4419
- className: this.getClassName(),
4420
- style: this.getStyle(),
4421
- ...this._props
4422
- };
4423
- return s.createElement(Ut, e);
4424
- }
4425
- }
4426
- const Zs = y(Xt), er = y(Yt), Jt = s.memo((i) => {
4427
- const { title: t, description: e, placeholder: r, value: o, onChange: l, type: a, className: c, style: d } = i;
4428
- return T().className(c).style(d).children([
4429
- t ? E(t).fontSize(14).fontWeight(600).color("#374151").className("mb-1").build() : null,
4430
- e ? E(e).fontSize(12).color("#6B7280").className("mb-3").build() : null,
4431
- pt().placeholder(r).value(o).type(a).onChange(l).className("w-full").build()
4432
- ]).build();
4433
- });
4434
- class Kt extends x {
4435
- constructor() {
4436
- super(...arguments);
4437
- n(this, "_title");
4438
- n(this, "_description");
4439
- n(this, "_placeholder");
4440
- n(this, "_value");
4441
- n(this, "_type", "text");
4442
- n(this, "_onChange");
4443
- }
4444
- title(e) {
4445
- return this._title = e, this;
4446
- }
4447
- description(e) {
4448
- return this._description = e, this;
4449
- }
4450
- placeholder(e) {
4451
- return this._placeholder = e, this;
4452
- }
4453
- value(e) {
4454
- return this._value = e, this;
4455
- }
4456
- type(e) {
4457
- return this._type = e, this;
4458
- }
4459
- onChange(e) {
4460
- return this._onChange = e, this;
4461
- }
4462
- build() {
4463
- const e = {
4464
- title: this._title,
4465
- description: this._description,
4466
- placeholder: this._placeholder,
4467
- value: this._value,
4468
- type: this._type,
4469
- onChange: this._onChange,
4470
- className: this.getClassName(),
4471
- style: this.getStyle(),
4472
- ...this._props
4473
- };
4474
- return s.createElement(Jt, e);
4475
- }
4476
- }
4477
- const tr = y(Kt), Qt = s.memo((i) => {
4478
- const { title: t, value: e, trend: r, trendDirection: o, className: l, style: a } = i, c = o === "up" ? "success" : o === "down" ? "error" : "none", d = o === "up" ? "↑" : o === "down" ? "↓" : "•";
4479
- return T().className(l).style(a).children([
4480
- E(t).fontSize(14).fontWeight(600).color("#6B7280").build(),
4481
- w().className("flex items-end justify-between mt-2").children([
4482
- E(e).fontSize(32).fontWeight(800).color("#111827").build(),
4483
- r ? G().text(`${d} ${r}`).intent(c).variant("accent").build() : null
4484
- ]).build()
4485
- ]).build();
4486
- });
4487
- class Zt extends x {
4488
- constructor() {
4489
- super(...arguments);
4490
- n(this, "_title", "");
4491
- n(this, "_value", "");
4492
- n(this, "_trend");
4493
- n(this, "_trendDirection", "neutral");
4494
- }
4495
- title(e) {
4496
- return this._title = e, this;
4497
- }
4498
- value(e) {
4499
- return this._value = e, this;
4500
- }
4501
- trend(e, r = "neutral") {
4502
- return this._trend = e, this._trendDirection = r, this;
4503
- }
4504
- build() {
4505
- const e = {
4506
- title: this._title,
4507
- value: this._value,
4508
- trend: this._trend,
4509
- trendDirection: this._trendDirection,
4510
- className: this.getClassName(),
4511
- style: this.getStyle(),
4512
- ...this._props
4513
- };
4514
- return s.createElement(Qt, e);
4515
- }
4516
- }
4517
- const sr = y(Zt);
4518
- class es extends x {
4519
- constructor() {
4520
- super(...arguments);
4521
- n(this, "_title", "");
4522
- n(this, "_content", null);
4523
- n(this, "_defaultExpanded", !1);
4524
- n(this, "_expanded");
4525
- n(this, "_onToggle");
4526
- }
4527
- title(e) {
4528
- return this._title = e, this;
4529
- }
4530
- content(e) {
4531
- return this._content = e, this;
4532
- }
4533
- isOpen(e) {
4534
- return this._expanded = e, this;
4535
- }
4536
- defaultOpen(e) {
4537
- return this._defaultExpanded = e, this;
4538
- }
4539
- onToggle(e) {
4540
- return this._onToggle = e, this;
4541
- }
4542
- build() {
4543
- return s.createElement(ts, {
4544
- builder: this,
4545
- ...this._props
4546
- });
4547
- }
4548
- }
4549
- const ts = s.memo(({ builder: i }) => {
4550
- const t = i, e = t._expanded !== void 0, [r, o] = $(t._defaultExpanded), l = e ? t._expanded : r, a = () => {
4551
- e || o(!l), t._onToggle && t._onToggle(!l);
4552
- };
4553
- return w().classNames(["w-full", "border", "border-gray-200", "rounded-xl", "overflow-hidden", "bg-white", "transition-all", "duration-300"]).className(t.getClassName()).style(t.getStyle()).children([
4554
- R().justifyContent("between").alignItems("center").classNames(["p-4", "cursor-pointer", "hover:bg-gray-50", "transition-colors", "select-none"]).props({ onClick: a }).children([
4555
- typeof t._title == "string" ? E(t._title).fontWeight(600).fontSize(15).color("#1F2937").build() : t._title,
4556
- w().classNames(["transition-transform", "duration-300"]).style({ transform: l ? "rotate(180deg)" : "rotate(0deg)" }).children(
4557
- s.createElement("svg", {
4558
- width: "20",
4559
- height: "20",
4560
- viewBox: "0 0 24 24",
4561
- fill: "none",
4562
- stroke: "currentColor",
4563
- strokeWidth: "2",
4564
- strokeLinecap: "round",
4565
- strokeLinejoin: "round",
4566
- className: "text-gray-400"
4567
- }, s.createElement("polyline", { points: "6 9 12 15 18 9" }))
4568
- ).build()
4569
- ]).build(),
4570
- w().classNames(["transition-all", "duration-300", "ease-in-out", "overflow-hidden"]).style({
4571
- maxHeight: l ? "500px" : "0px",
4572
- opacity: l ? 1 : 0
4573
- }).children(
4574
- w().classNames(["p-4", "pt-0", "text-gray-600", "text-sm"]).children(t._content).build()
4575
- ).build()
4576
- ]).build();
4577
- }), rr = y(es), ss = s.memo((i) => {
4578
- const {
4579
- children: t,
4580
- variant: e = "standard",
4581
- columns: r = 1,
4582
- gap: o = "md",
4583
- className: l,
4584
- style: a,
4585
- ...c
4586
- } = i, d = (m) => typeof m == "number" ? "" : {
4587
- none: "gap-0",
4588
- sm: "gap-2",
4589
- md: "gap-4",
4590
- lg: "gap-6",
4591
- xl: "gap-8"
4592
- }[m] || "gap-4", p = (m) => {
4593
- if (typeof m == "number") return m + "px";
4594
- }, u = (m) => {
4595
- if (typeof m == "number") return `grid-cols-${m}`;
4596
- let h = [];
4597
- return m.sm && h.push(`sm:grid-cols-${m.sm}`), m.md && h.push(`md:grid-cols-${m.md}`), m.lg && h.push(`lg:grid-cols-${m.lg}`), m.xl && h.push(`xl:grid-cols-${m.xl}`), h.join(" ") || "grid-cols-1";
4598
- };
4599
- if (e === "masonry") {
4600
- const m = (h) => {
4601
- if (typeof h == "number") return `columns-${h}`;
4602
- let g = [];
4603
- return h.sm && g.push(`sm:columns-${h.sm}`), h.md && g.push(`md:columns-${h.md}`), h.lg && g.push(`lg:columns-${h.lg}`), h.xl && g.push(`xl:columns-${h.xl}`), g.join(" ") || "columns-1";
4604
- };
4605
- return s.createElement("div", {
4606
- className: `${m(r)} ${d(o)} space-y-4 ${l}`,
4607
- style: {
4608
- columnGap: p(o),
4609
- ...a
4610
- },
4611
- ...c
4612
- }, s.Children.map(
4613
- t,
4614
- (h) => s.createElement("div", { className: "break-inside-avoid mb-4" }, h)
4615
- ));
4616
- }
4617
- return s.createElement("div", {
4618
- className: `grid ${u(r)} ${d(o)} ${l}`,
4619
- style: {
4620
- gap: p(o),
4621
- ...a
4622
- },
4623
- ...c
4624
- }, t);
4625
- }), rs = s.memo((i) => {
4626
- const { children: t, colSpan: e, rowSpan: r, className: o, style: l, ...a } = i, c = () => {
4627
- let d = [];
4628
- return e && d.push(`col-span-${e}`), r && d.push(`row-span-${r}`), d.join(" ");
4629
- };
4630
- return s.createElement("div", {
4631
- className: `${c()} ${o}`,
4632
- style: l,
4633
- ...a
4634
- }, t);
4635
- });
4636
- class is extends x {
4637
- constructor() {
4638
- super(...arguments);
4639
- n(this, "_variant", "standard");
4640
- n(this, "_columns", 1);
4641
- n(this, "_gap", "md");
4642
- n(this, "_children", []);
4643
- }
4644
- variant(e) {
4645
- return this._variant = e, this;
4646
- }
4647
- columns(e) {
4648
- return this._columns = e, this;
4649
- }
4650
- gap(e) {
4651
- return this._gap = e, this;
4652
- }
4653
- children(e) {
4654
- return this._children = e, this;
4655
- }
4656
- build() {
4657
- const e = {
4658
- variant: this._variant,
4659
- columns: this._columns,
4660
- gap: this._gap,
4661
- children: this._children,
4662
- className: this.getClassName(),
4663
- style: this.getStyle(),
4664
- ...this._props
4665
- };
4666
- return s.createElement(ss, e);
4667
- }
4668
- }
4669
- class ns extends x {
4670
- constructor() {
4671
- super(...arguments);
4672
- n(this, "_colSpan");
4673
- n(this, "_rowSpan");
4674
- n(this, "_children", []);
4675
- }
4676
- colSpan(e) {
4677
- return this._colSpan = e, this;
4678
- }
4679
- rowSpan(e) {
4680
- return this._rowSpan = e, this;
4681
- }
4682
- children(e) {
4683
- return this._children = e, this;
4684
- }
4685
- build() {
4686
- const e = {
4687
- colSpan: this._colSpan,
4688
- rowSpan: this._rowSpan,
4689
- children: this._children,
4690
- className: this.getClassName(),
4691
- style: this.getStyle(),
4692
- ...this._props
4693
- };
4694
- return s.createElement(rs, e);
4695
- }
4696
- }
4697
- const ir = y(is), nr = y(ns);
4698
- export {
4699
- er as ActionCard,
4700
- Rs as Alert,
4701
- Ys as AssetCard,
4702
- qe as Avatar,
4703
- G as Badge,
4704
- Us as Banner,
4705
- w as Box,
4706
- K as Button,
4707
- T as Card,
4708
- zs as Center,
4709
- Ps as Checkbox,
4710
- rr as Collapse,
4711
- Ks as CollectionCard,
4712
- P as Column,
4713
- Vs as Combobox,
4714
- ce as ComputedSignal,
4715
- Ss as Container,
4716
- Qs as ContentCard,
4717
- Is as DashboardLayout,
4718
- le as Effect,
4719
- x as FiboBuilder,
4720
- Es as FiboThemeProvider,
4721
- ir as Grid,
4722
- nr as GridItem,
4723
- As as Header,
4724
- et as Image,
4725
- Zs as InfoCard,
4726
- tr as InputCard,
4727
- Ws as Label,
4728
- Fs as Line,
4729
- qs as List,
4730
- sr as MetricCard,
4731
- he as Observable,
4732
- ue as Observer,
4733
- fs as ObserverWrapper,
4734
- Js as ProfileCard,
4735
- Ts as Progress,
4736
- te as ProviderContext,
4737
- me as ProviderWrapper,
4738
- Ds as RadioGroup,
4739
- R as Row,
4740
- js as Scaffold,
4741
- Bs as ScrollView,
4742
- Hs as Select,
4743
- $s as Sidebar,
4744
- Z as Signal,
4745
- gs as SignalWrapper,
4746
- Ms as Skeleton,
4747
- V as Spacer,
4748
- Ls as Spinner,
4749
- ee as StateContext,
4750
- ps as StateWrapper,
4751
- de as StoreImpl,
4752
- bt as Switch,
4753
- Gs as Table,
4754
- Xs as Tags,
4755
- E as Text,
4756
- pt as TextField,
4757
- Os as Textarea,
4758
- ae as Tracker,
4759
- _s as applyResponsiveStyles,
4760
- hs as computed,
4761
- y as createBuilder,
4762
- us as createStore,
4763
- Ne as cupertinoTheme,
4764
- we as materialTheme,
4765
- ys as mergeStyles,
4766
- ks as normalizeValue,
4767
- ds as observable,
4768
- xs as processChildren,
4769
- cs as signal,
4770
- Cs as useFiboTheme,
4771
- Ns as useObservable,
4772
- bs as useProvider,
4773
- vs as useSignal,
4774
- ms as useStateContext,
4775
- ws as useStore,
4776
- Ee as webTheme
4777
- };