fiboui 2.6.4 → 2.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. package/README.md +16 -6
  2. package/dist/cli/bin.js +3 -4
  3. package/dist/cli/commands/generate/component.js +21 -33
  4. package/dist/cli/commands/generate/index.js +3 -3
  5. package/dist/cli/commands/generate/module.js +21 -24
  6. package/dist/cli/commands/generate/plugin.js +18 -34
  7. package/dist/cli/commands/init.js +5 -25
  8. package/dist/cli/config.js +118 -0
  9. package/dist/cli/names.js +35 -0
  10. package/dist/cli/templates.js +76 -0
  11. package/dist/client-Bydlscpe.js +17697 -0
  12. package/dist/content.d.ts +1 -0
  13. package/dist/content.js +14 -14
  14. package/dist/core.d.ts +2 -0
  15. package/dist/core.js +65 -59
  16. package/dist/effects-BxvduC-G.js +14 -0
  17. package/dist/icons-B9HMYLtE.js +383 -0
  18. package/dist/index-B7eVMy2M.js +150 -0
  19. package/dist/index-C9I92HPE.js +140 -0
  20. package/dist/index-CXQSA8WJ.js +944 -0
  21. package/dist/index-D4JzwKSP.js +1474 -0
  22. package/dist/index-DBeyafKI.js +839 -0
  23. package/dist/index.d.ts +73156 -505
  24. package/dist/index.js +4419 -2238
  25. package/dist/interactive.d.ts +2 -0
  26. package/dist/interactive.js +22 -9
  27. package/dist/layout.d.ts +1 -0
  28. package/dist/layout.js +14 -13
  29. package/dist/metadata-BbFwNwNa.js +147 -0
  30. package/dist/navigation.d.ts +1 -0
  31. package/dist/navigation.js +15 -9
  32. package/dist/page-BJoj7vSk.js +266 -0
  33. package/dist/server.d.ts +2 -0
  34. package/dist/server.js +4991 -1774
  35. package/dist/structure.d.ts +1 -0
  36. package/dist/structure.js +13 -9
  37. package/dist/style.css +1 -1
  38. package/dist/theme.d.ts +2 -0
  39. package/dist/theme.js +8 -8
  40. package/package.json +9 -2
  41. package/dist/Link-YjcbA4af.js +0 -50
  42. package/dist/PluginManager-BRjgOLVa.js +0 -110
  43. package/dist/client-DzQ13khL.js +0 -10605
  44. package/dist/effects-D16XdB_d.js +0 -10
  45. package/dist/index-B-cCNvV4.js +0 -455
  46. package/dist/index-Bj-IMHC8.js +0 -119
  47. package/dist/index-CWyBsVAL.js +0 -608
  48. package/dist/index-CYisDyI8.js +0 -602
  49. package/dist/index-Dil2ZG0X.js +0 -1028
  50. package/dist/mount-CDwiTTXM.js +0 -135
@@ -0,0 +1,944 @@
1
+ var ae = Object.defineProperty;
2
+ var ie = (s, r, e) => r in s ? ae(s, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[r] = e;
3
+ var i = (s, r, e) => ie(s, typeof r != "symbol" ? r + "" : r, e);
4
+ import t from "react";
5
+ import { aT as I, aU as $, aW as z, aZ as R, aX as q, t as le, a$ as Q, ba as oe } from "./client-Bydlscpe.js";
6
+ import { a as F } from "./icons-B9HMYLtE.js";
7
+ function ce(s, r) {
8
+ if (!(typeof r != "string" || !z(r)))
9
+ for (const e of R(r))
10
+ s.bindSignal(e);
11
+ }
12
+ function de(s) {
13
+ return typeof s != "string" ? s : z(s) ? q(s) : s;
14
+ }
15
+ const ue = t.memo((s) => {
16
+ const { text: r, htmlFor: e, required: l, className: o, style: n, ...c } = s, v = [
17
+ "fibo-label",
18
+ "fibo-text-label",
19
+ "peer-disabled:cursor-not-allowed",
20
+ "peer-disabled:opacity-70",
21
+ o
22
+ ].filter(Boolean).join(" ");
23
+ return t.createElement(
24
+ "label",
25
+ {
26
+ ...c,
27
+ className: v,
28
+ htmlFor: e,
29
+ style: n
30
+ },
31
+ r,
32
+ l && t.createElement("span", { className: "text-red-500 ml-0.5", "aria-hidden": !0 }, "*")
33
+ );
34
+ });
35
+ class me extends $ {
36
+ constructor(e = "") {
37
+ super();
38
+ i(this, "_text", "");
39
+ i(this, "_htmlFor");
40
+ i(this, "_required", !1);
41
+ this.text(e);
42
+ }
43
+ text(e) {
44
+ return this._text = e, ce(this, e), this;
45
+ }
46
+ htmlFor(e) {
47
+ return this._htmlFor = e, this;
48
+ }
49
+ required(e = !0) {
50
+ return this._required = e, this;
51
+ }
52
+ build() {
53
+ const e = {
54
+ text: de(this._text),
55
+ htmlFor: this._htmlFor,
56
+ required: this._required,
57
+ className: this.getClassName(),
58
+ style: this.getStyle(),
59
+ ...this._props
60
+ };
61
+ return t.createElement(ue, e);
62
+ }
63
+ }
64
+ const qe = I(me), he = `@media (prefers-reduced-motion: reduce) {
65
+ .fibo-spinner,
66
+ .fibo-spinner * {
67
+ animation: none !important;
68
+ }
69
+ }`;
70
+ function W(s) {
71
+ return t.createElement(
72
+ t.Fragment,
73
+ null,
74
+ t.createElement("style", { "data-fibo-spinner-motion": "" }, he),
75
+ s
76
+ );
77
+ }
78
+ const fe = {
79
+ position: "absolute",
80
+ width: "1px",
81
+ height: "1px",
82
+ padding: 0,
83
+ margin: "-1px",
84
+ overflow: "hidden",
85
+ clip: "rect(0, 0, 0, 0)",
86
+ whiteSpace: "nowrap",
87
+ border: 0
88
+ };
89
+ function pe(s) {
90
+ return t.createElement("span", {
91
+ key: "fibo-spinner-label",
92
+ className: "fibo-spinner-label",
93
+ style: fe
94
+ }, s);
95
+ }
96
+ const ge = t.memo((s) => {
97
+ const { size: r, color: e, variant: l = "circle", className: o, style: n, ...c } = s, m = typeof r == "number" ? r : {
98
+ sm: 16,
99
+ md: 24,
100
+ lg: 32,
101
+ xl: 48
102
+ }[r] || 24, p = e || "currentColor", y = c["aria-label"] || s["aria-label"] || "Loading", d = {
103
+ className: `fibo-spinner ${o || ""}`,
104
+ style: { position: "relative", width: m, height: m, ...n },
105
+ ...c,
106
+ role: "status",
107
+ "aria-live": "polite",
108
+ "aria-label": y
109
+ }, u = pe(y);
110
+ return W(l === "dots" ? t.createElement(
111
+ "div",
112
+ { ...d, className: `${d.className} flex items-center justify-between` },
113
+ [
114
+ u,
115
+ ...[0, 1, 2].map((k) => t.createElement("div", {
116
+ key: k,
117
+ className: "w-[25%] h-[25%] rounded-full animate-bounce",
118
+ style: {
119
+ backgroundColor: p,
120
+ animationDelay: `${k * 0.1}s`
121
+ }
122
+ }))
123
+ ]
124
+ ) : l === "pulse" ? t.createElement(
125
+ "div",
126
+ { ...d, className: `${d.className} relative flex items-center justify-center` },
127
+ [
128
+ u,
129
+ t.createElement("div", {
130
+ key: "ring",
131
+ className: "absolute inset-0 rounded-full opacity-75 animate-ping",
132
+ style: { backgroundColor: p }
133
+ }),
134
+ t.createElement("div", {
135
+ key: "dot",
136
+ className: "relative rounded-full h-[75%] w-[75%]",
137
+ style: { backgroundColor: p }
138
+ })
139
+ ]
140
+ ) : l === "blocks" ? t.createElement(
141
+ "div",
142
+ { ...d, className: `${d.className} grid grid-cols-2 gap-[10%] p-[10%]` },
143
+ [
144
+ u,
145
+ ...[0, 1, 2, 3].map((k) => t.createElement("div", {
146
+ key: k,
147
+ className: "w-full h-full bg-current animate-pulse",
148
+ style: {
149
+ backgroundColor: p,
150
+ animationDelay: `${k * 0.15}s`,
151
+ opacity: 0.6
152
+ }
153
+ }))
154
+ ]
155
+ ) : t.createElement(
156
+ "div",
157
+ { ...d, className: `${d.className} animate-spin` },
158
+ [
159
+ u,
160
+ t.createElement(
161
+ "svg",
162
+ {
163
+ key: "graphic",
164
+ xmlns: "http://www.w3.org/2000/svg",
165
+ fill: "none",
166
+ viewBox: "0 0 24 24",
167
+ style: { width: "100%", height: "100%" },
168
+ "aria-hidden": !0
169
+ },
170
+ t.createElement("circle", {
171
+ className: "opacity-20",
172
+ cx: "12",
173
+ cy: "12",
174
+ r: "10",
175
+ stroke: p,
176
+ strokeWidth: "4"
177
+ }),
178
+ t.createElement("path", {
179
+ className: "",
180
+ fill: p,
181
+ 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"
182
+ })
183
+ )
184
+ ]
185
+ ));
186
+ });
187
+ class be extends $ {
188
+ constructor() {
189
+ super(...arguments);
190
+ i(this, "_size", "md");
191
+ i(this, "_color");
192
+ i(this, "_variant", "circle");
193
+ }
194
+ size(e) {
195
+ return this._size = e, this;
196
+ }
197
+ color(e) {
198
+ return this._color = e, this;
199
+ }
200
+ variant(e) {
201
+ return this._variant = e, this;
202
+ }
203
+ build() {
204
+ const e = {
205
+ size: this._size,
206
+ color: this._color,
207
+ variant: this._variant,
208
+ className: this.getClassName(),
209
+ style: this.getStyle(),
210
+ ...this._props
211
+ };
212
+ return t.createElement(ge, e);
213
+ }
214
+ }
215
+ const Ue = I(be), ye = `@keyframes fibo-skeleton-pulse {
216
+ 50% { opacity: 0.5; }
217
+ }
218
+ .loading-skeleton {
219
+ animation: fibo-skeleton-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
220
+ }
221
+ @media (prefers-reduced-motion: reduce) {
222
+ .loading-skeleton,
223
+ .loading-skeleton * {
224
+ animation: none !important;
225
+ }
226
+ }`;
227
+ function ve(s) {
228
+ return t.createElement(
229
+ t.Fragment,
230
+ null,
231
+ t.createElement("style", { "data-fibo-skeleton-motion": "" }, ye),
232
+ s
233
+ );
234
+ }
235
+ function G(s) {
236
+ return typeof s == "number" && Number.isFinite(s) ? `${s}px` : s;
237
+ }
238
+ const Ee = t.memo((s) => {
239
+ const { width: r, height: e, shape: l, className: o, style: n, ...c } = s, {
240
+ "aria-hidden": v,
241
+ role: m,
242
+ "aria-busy": p,
243
+ ...y
244
+ } = c, d = le(), u = ["bg-gray-200", "loading-skeleton"];
245
+ d || u.unshift("animate-pulse"), l === "circle" ? u.push("rounded-full") : l === "rounded-sm" ? u.push("rounded-sm") : l === "rounded-md" ? u.push("rounded-md") : l === "rounded-lg" ? u.push("rounded-lg") : l === "square" ? u.push("rounded-none") : u.push("rounded");
246
+ const k = t.createElement("div", {
247
+ ...y,
248
+ className: [...u, o].filter(Boolean).join(" "),
249
+ style: {
250
+ ...n,
251
+ width: G(r),
252
+ height: G(e),
253
+ ...d ? { animation: "none" } : {}
254
+ },
255
+ role: "status",
256
+ "aria-busy": !0,
257
+ "aria-live": "polite",
258
+ "aria-label": y["aria-label"] || c["aria-label"] || "Loading"
259
+ });
260
+ return ve(k);
261
+ });
262
+ class ke extends $ {
263
+ constructor() {
264
+ super(...arguments);
265
+ i(this, "_width", "100%");
266
+ i(this, "_height", "20px");
267
+ i(this, "_shape", "rounded");
268
+ }
269
+ width(e) {
270
+ return this._width = e, this;
271
+ }
272
+ height(e) {
273
+ return this._height = e, this;
274
+ }
275
+ shape(e) {
276
+ return this._shape = e, this;
277
+ }
278
+ build() {
279
+ const e = this._props || {}, {
280
+ width: l,
281
+ height: o,
282
+ shape: n,
283
+ className: c,
284
+ style: v,
285
+ role: m,
286
+ "aria-busy": p,
287
+ "aria-hidden": y,
288
+ ...d
289
+ } = e, u = {
290
+ ...d,
291
+ width: this._width,
292
+ height: this._height,
293
+ shape: this._shape,
294
+ className: [this.getClassName(), c].filter(Boolean).join(" "),
295
+ style: { ...v || {}, ...this.getStyle() }
296
+ };
297
+ return t.createElement(Ee, u);
298
+ }
299
+ }
300
+ const Ve = I(ke);
301
+ function H(s, r) {
302
+ if (!(typeof r != "string" || !z(r)))
303
+ for (const e of R(r))
304
+ s.bindSignal(e);
305
+ }
306
+ function X(s) {
307
+ return typeof s != "string" ? s : z(s) ? q(s) : s;
308
+ }
309
+ const _e = {
310
+ info: "bg-blue-500 text-white",
311
+ success: "bg-emerald-500 text-white",
312
+ warning: "bg-orange-400 text-white",
313
+ error: "bg-rose-500 text-white"
314
+ }, xe = {
315
+ info: "bg-blue-600",
316
+ success: "bg-emerald-600",
317
+ warning: "bg-orange-500",
318
+ error: "bg-rose-600"
319
+ };
320
+ function we(s) {
321
+ return s === "success" || s === "warning" || s === "error" || s === "info" ? s : "info";
322
+ }
323
+ function Ne() {
324
+ return t.createElement(
325
+ "svg",
326
+ {
327
+ width: 20,
328
+ height: 20,
329
+ viewBox: "0 0 24 24",
330
+ fill: "none",
331
+ stroke: "currentColor",
332
+ strokeWidth: 2,
333
+ strokeLinecap: "round",
334
+ strokeLinejoin: "round",
335
+ "aria-hidden": !0,
336
+ focusable: "false"
337
+ },
338
+ [
339
+ t.createElement("path", {
340
+ key: "tri",
341
+ d: "M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"
342
+ }),
343
+ t.createElement("line", { key: "stem", x1: "12", y1: "9", x2: "12", y2: "13" }),
344
+ t.createElement("line", { key: "dot", x1: "12", y1: "17", x2: "12.01", y2: "17" })
345
+ ]
346
+ );
347
+ }
348
+ function Ce(s) {
349
+ const r = t.createElement("span", { "aria-hidden": !0 }, "?"), l = {
350
+ info: F.Info,
351
+ success: F.Check,
352
+ warning: Ne(),
353
+ error: F.Close
354
+ }[s] || r;
355
+ return t.isValidElement(l) ? t.cloneElement(l, {
356
+ width: 20,
357
+ height: 20,
358
+ strokeWidth: 3,
359
+ "aria-hidden": !0
360
+ }) : r;
361
+ }
362
+ function Se() {
363
+ const s = F.Close;
364
+ return t.isValidElement(s) ? t.cloneElement(s, {
365
+ width: 16,
366
+ height: 16,
367
+ strokeWidth: 2.5,
368
+ "aria-hidden": !0
369
+ }) : t.createElement("span", { "aria-hidden": !0 }, "×");
370
+ }
371
+ const Ie = t.memo((s) => {
372
+ const { title: r, description: e, intent: l = "info", className: o, style: n, onClose: c, ...v } = s, m = we(l), p = m === "error" || m === "warning", y = typeof c == "function", d = `fibo-alert relative overflow-hidden flex items-start gap-4 p-5 rounded-3xl shadow-lg border-none ${_e[m]}`, u = [r, e].filter(Boolean).join(". "), k = [
373
+ t.createElement("div", {
374
+ key: "blob1",
375
+ className: "absolute -top-6 -right-6 w-24 h-24 rounded-full bg-white opacity-10 pointer-events-none",
376
+ "aria-hidden": !0
377
+ }),
378
+ t.createElement("div", {
379
+ key: "blob2",
380
+ className: "absolute bottom-[-10px] left-10 w-12 h-12 rounded-full bg-black opacity-5 pointer-events-none",
381
+ "aria-hidden": !0
382
+ }),
383
+ t.createElement("div", {
384
+ key: "blob3",
385
+ className: "absolute top-10 right-20 w-8 h-8 rounded-full bg-white opacity-10 pointer-events-none",
386
+ "aria-hidden": !0
387
+ }),
388
+ t.createElement("div", {
389
+ key: "icon-wrapper",
390
+ className: `relative z-10 shrink-0 w-10 h-10 rounded-full flex items-center justify-center shadow-sm ${xe[m]}`
391
+ }, Ce(m)),
392
+ t.createElement("div", { key: "content", className: "relative z-10 flex flex-col gap-1.5 pt-0.5 min-w-0" }, [
393
+ r && t.createElement("h5", { key: "title", className: "font-bold text-lg leading-none tracking-tight" }, r),
394
+ e && t.createElement("p", { key: "desc", className: "text-sm font-medium opacity-90 leading-relaxed" }, e)
395
+ ])
396
+ ];
397
+ return y && k.push(
398
+ t.createElement("button", {
399
+ key: "dismiss",
400
+ type: "button",
401
+ className: "relative z-10 ml-auto shrink-0 w-8 h-8 rounded-full flex items-center justify-center bg-black/10",
402
+ "aria-label": "Dismiss",
403
+ onClick: (j) => {
404
+ j.stopPropagation(), c();
405
+ }
406
+ }, Se())
407
+ ), t.createElement("div", {
408
+ ...v,
409
+ className: `${d} ${o || ""}`.trim(),
410
+ style: n,
411
+ role: p ? "alert" : "status",
412
+ "aria-live": p ? "assertive" : "polite",
413
+ "aria-atomic": !0,
414
+ "aria-label": v["aria-label"] || u || void 0
415
+ }, k);
416
+ });
417
+ class $e extends $ {
418
+ constructor() {
419
+ super(...arguments);
420
+ i(this, "_title", "");
421
+ i(this, "_description");
422
+ i(this, "_intent", "info");
423
+ }
424
+ title(e) {
425
+ return this._title = e, H(this, e), this;
426
+ }
427
+ description(e) {
428
+ return this._description = e, H(this, e), this;
429
+ }
430
+ intent(e) {
431
+ return this._intent = e, this;
432
+ }
433
+ build() {
434
+ const e = {
435
+ title: X(this._title),
436
+ description: X(this._description),
437
+ intent: this._intent,
438
+ className: this.getClassName(),
439
+ style: this.getStyle(),
440
+ ...this._props
441
+ };
442
+ return t.createElement(Ie, e);
443
+ }
444
+ }
445
+ const Oe = I($e);
446
+ function K(s, r) {
447
+ if (!(typeof r != "string" || !z(r)))
448
+ for (const e of R(r))
449
+ s.bindSignal(e);
450
+ }
451
+ function Z(s) {
452
+ return typeof s != "string" ? s : z(s) ? q(s) : s;
453
+ }
454
+ const ze = t.memo((s) => {
455
+ const {
456
+ value: r,
457
+ max: e,
458
+ color: l,
459
+ height: o,
460
+ variant: n = "default",
461
+ label: c,
462
+ subLabel: v,
463
+ items: m = [],
464
+ size: p,
465
+ strokeWidth: y,
466
+ segments: d,
467
+ gap: u,
468
+ trackColor: k,
469
+ children: j,
470
+ className: w,
471
+ style: N,
472
+ ...P
473
+ } = s, U = typeof r == "number" && Number.isFinite(r) ? r : 0, L = typeof e == "number" && Number.isFinite(e) ? e : 100, V = L > 0 ? Math.min(L, Math.max(0, U)) : Math.max(0, U), E = L > 0 ? V / L * 100 : 0, _ = l || "#3B82F6", ee = typeof P["aria-label"] == "string" ? P["aria-label"] : "", C = { ...P, ...{
474
+ role: "progressbar",
475
+ "aria-valuenow": V,
476
+ "aria-valuemin": 0,
477
+ "aria-valuemax": L,
478
+ "aria-label": ee || c || "Progress"
479
+ } };
480
+ if (n === "ring") {
481
+ const h = p ?? (typeof o == "number" ? o : 190), f = y ?? 2.4, b = Array.isArray(d) && d.length ? d : [{ value: E, color: _ }], a = u ?? (b.length > 1 ? 5e-3 : 0), g = 88, x = 2 * Math.PI * g, A = b.reduce((M, D) => M + D.value, 0) || 1;
482
+ let S = 0;
483
+ const B = [];
484
+ return k && B.push(t.createElement("circle", {
485
+ key: "track",
486
+ cx: 100,
487
+ cy: 100,
488
+ r: g,
489
+ stroke: k,
490
+ strokeWidth: f,
491
+ fill: "none"
492
+ })), b.forEach((M, D) => {
493
+ const Y = M.value / A, ne = Math.max(0, Y * x - a * x);
494
+ B.push(t.createElement("circle", {
495
+ key: `seg-${D}`,
496
+ cx: 100,
497
+ cy: 100,
498
+ r: g,
499
+ stroke: M.color,
500
+ strokeWidth: M.strokeWidth ?? f,
501
+ fill: "none",
502
+ strokeDasharray: `${ne} ${x}`,
503
+ strokeDashoffset: -S,
504
+ transform: "rotate(-90 100 100)",
505
+ style: { transition: "all .4s" }
506
+ })), S += Y * x;
507
+ }), t.createElement("div", {
508
+ className: `fibo-progress-ring relative inline-flex items-center justify-center ${w || ""}`,
509
+ style: { width: h, height: h, ...N },
510
+ ...C
511
+ }, [
512
+ t.createElement("svg", {
513
+ key: "svg",
514
+ width: h,
515
+ height: h,
516
+ viewBox: "0 0 200 200",
517
+ "aria-hidden": !0
518
+ }, B),
519
+ j ? t.createElement("div", {
520
+ key: "center",
521
+ className: "absolute inset-0 flex flex-col items-center justify-center"
522
+ }, j) : null
523
+ ]);
524
+ }
525
+ if (n === "circular") {
526
+ const h = typeof o == "number" ? o : 64, f = 8, b = (h - f) / 2, a = b * 2 * Math.PI, g = a - E / 100 * a;
527
+ return t.createElement("div", {
528
+ className: `relative inline-flex items-center justify-center ${w || ""}`,
529
+ style: { width: h, height: h, ...N },
530
+ ...C
531
+ }, [
532
+ t.createElement("svg", {
533
+ key: "svg",
534
+ className: "transform -rotate-90",
535
+ width: h,
536
+ height: h,
537
+ "aria-hidden": !0
538
+ }, [
539
+ t.createElement("circle", {
540
+ key: "track",
541
+ className: "text-gray-100",
542
+ stroke: "currentColor",
543
+ strokeWidth: f,
544
+ fill: "transparent",
545
+ r: b,
546
+ cx: h / 2,
547
+ cy: h / 2
548
+ }),
549
+ t.createElement("circle", {
550
+ key: "prog",
551
+ stroke: _,
552
+ strokeWidth: f,
553
+ strokeDasharray: a,
554
+ strokeDashoffset: g,
555
+ strokeLinecap: "round",
556
+ fill: "transparent",
557
+ r: b,
558
+ cx: h / 2,
559
+ cy: h / 2,
560
+ className: "transition-all duration-1000 ease-out"
561
+ })
562
+ ]),
563
+ t.createElement("span", {
564
+ key: "label",
565
+ className: "absolute text-sm font-bold text-gray-700"
566
+ }, c || `${Math.round(E)}%`)
567
+ ]);
568
+ }
569
+ if (n === "pagination") {
570
+ const f = Math.floor(E / 100 * 5);
571
+ return t.createElement("div", {
572
+ className: `flex items-center gap-2 ${w || ""}`,
573
+ style: N,
574
+ ...C
575
+ }, Array.from({ length: 5 }).map((b, a) => {
576
+ const g = a === f;
577
+ return t.createElement("div", {
578
+ key: a,
579
+ className: `h-3 rounded-full transition-all duration-300 ${g ? "w-8" : "w-3"}`,
580
+ style: { backgroundColor: a <= f ? _ : "#E5E7EB" }
581
+ });
582
+ }));
583
+ }
584
+ if (n === "timeline") {
585
+ const h = m.length ? m : [
586
+ { title: "Order components", date: "Done" },
587
+ { title: "Draft implementation", date: "In Progress" },
588
+ { title: "Verify functionality", date: "Pending" }
589
+ ], f = Math.floor(E / 100 * h.length);
590
+ return t.createElement("div", {
591
+ className: `flex flex-col relative ${w || ""}`,
592
+ style: N,
593
+ ...C
594
+ }, h.map((b, a) => {
595
+ const g = a < f, x = a === f, A = a === h.length - 1, S = g || x ? _ : "#E5E7EB", B = g ? t.createElement("span", {}, "✓") : a + 1;
596
+ return t.createElement("div", {
597
+ key: a,
598
+ className: "relative flex items-start gap-4 pb-8 last:pb-0"
599
+ }, [
600
+ !A && t.createElement("div", {
601
+ key: "tail",
602
+ className: "absolute left-[19px] top-10 bottom-0 w-0.5 transition-colors duration-500",
603
+ style: { backgroundColor: g ? _ : "#E5E7EB" }
604
+ }),
605
+ t.createElement("div", {
606
+ key: "dot",
607
+ 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",
608
+ style: {
609
+ borderColor: S,
610
+ color: g ? "#fff" : x ? S : "#9CA3AF",
611
+ backgroundColor: g ? S : "#fff"
612
+ }
613
+ }, B),
614
+ t.createElement("div", { key: "content", className: "pt-2" }, [
615
+ t.createElement("div", { className: "text-sm font-bold text-gray-900 leading-none" }, b.title),
616
+ b.description && t.createElement("div", { className: "text-xs text-gray-500 mt-1.5" }, b.description),
617
+ b.date && t.createElement("div", { className: "text-xs font-mono text-gray-400 mt-1" }, b.date)
618
+ ])
619
+ ]);
620
+ }));
621
+ }
622
+ if (n === "floating")
623
+ return t.createElement("div", {
624
+ className: `w-full bg-white rounded-xl shadow-sm border border-gray-100 p-4 relative overflow-hidden ${w || ""}`,
625
+ style: N,
626
+ ...C
627
+ }, [
628
+ t.createElement("div", { key: "info", className: "flex justify-between items-center mb-3 px-1" }, [
629
+ t.createElement(
630
+ "span",
631
+ { key: "l", className: "text-sm font-semibold text-gray-700" },
632
+ c ? t.createElement("span", { className: "text-blue-600 mr-2" }, `${Math.round(E)}%`) : null,
633
+ c || "Update in progress..."
634
+ ),
635
+ v && t.createElement("span", { key: "r", className: "text-xs font-medium text-gray-400" }, v)
636
+ ]),
637
+ t.createElement("div", {
638
+ key: "track",
639
+ className: "w-full bg-blue-50 h-1.5 rounded-full overflow-hidden"
640
+ }, t.createElement("div", {
641
+ className: "h-full rounded-full transition-all duration-1000 ease-out",
642
+ style: { width: `${E}%`, backgroundColor: _ }
643
+ }))
644
+ ]);
645
+ if (n === "chevron") {
646
+ const f = Math.floor(E / 100 * 3);
647
+ return t.createElement("div", {
648
+ className: `flex w-full rounded-lg overflow-hidden ${w || ""}`,
649
+ style: N,
650
+ ...C
651
+ }, Array.from({ length: 3 }).map((b, a) => {
652
+ const g = a <= f;
653
+ return t.createElement("div", {
654
+ key: a,
655
+ className: "flex-1 h-10 flex items-center justify-center text-sm font-bold text-white transition-colors duration-300",
656
+ style: {
657
+ backgroundColor: g ? a === f ? _ : "#60A5FA" : "#E5E7EB",
658
+ clipPath: a === 0 ? "polygon(0% 0%, 85% 0%, 100% 50%, 85% 100%, 0% 100%)" : a === 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%)",
659
+ marginLeft: a === 0 ? 0 : "-10px",
660
+ paddingLeft: a === 0 ? 0 : "10px",
661
+ zIndex: 3 - a
662
+ }
663
+ }, `Step ${a + 1}`);
664
+ }));
665
+ }
666
+ if (n === "steps") {
667
+ const f = Math.ceil(E / 100 * 3);
668
+ return t.createElement("div", {
669
+ className: `w-full flex items-center justify-between relative ${w || ""}`,
670
+ style: {
671
+ marginTop: "1rem",
672
+ ...N
673
+ },
674
+ ...C
675
+ }, [
676
+ t.createElement("div", {
677
+ key: "line-bg",
678
+ className: "absolute top-1/2 left-0 w-full h-1.5 bg-gray-200 z-0 transform -translate-y-1/2 rounded-full"
679
+ }),
680
+ t.createElement("div", {
681
+ key: "line-active",
682
+ className: "absolute top-1/2 left-0 h-1.5 z-0 transform -translate-y-1/2 transition-all duration-500 rounded-full",
683
+ style: { width: `${E}%`, backgroundColor: _ }
684
+ }),
685
+ ...Array.from({ length: 3 }).map((b, a) => {
686
+ const g = a + 1, x = g <= f, A = g < f;
687
+ return t.createElement("div", {
688
+ key: a,
689
+ 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 ${x ? "text-white border-white shadow-md" : "bg-gray-100 text-gray-400 border-gray-50"}`,
690
+ style: { backgroundColor: x ? _ : void 0 }
691
+ }, A ? t.createElement("span", {}, "✔") : g);
692
+ })
693
+ ]);
694
+ }
695
+ const te = o || 12;
696
+ if (n === "segments") {
697
+ const f = Math.round(E / 100 * 10);
698
+ return t.createElement(
699
+ "div",
700
+ {
701
+ className: `flex gap-1.5 w-full ${w || ""}`,
702
+ style: N,
703
+ ...C
704
+ },
705
+ Array.from({ length: 10 }).map((b, a) => t.createElement("div", {
706
+ key: a,
707
+ className: "h-3 flex-1 rounded-sm transition-all duration-300 first:rounded-l-full last:rounded-r-full",
708
+ style: {
709
+ height: o || 12,
710
+ backgroundColor: a < f ? _ : "#E5E7EB"
711
+ }
712
+ }))
713
+ );
714
+ }
715
+ let O = null;
716
+ n === "striped" && (O = t.createElement("div", {
717
+ className: "w-full h-full opacity-30 animate-[stripes_1s_linear_infinite]",
718
+ style: {
719
+ 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)",
720
+ backgroundSize: "20px 20px"
721
+ }
722
+ }));
723
+ const se = n === "labeled" ? t.createElement("div", {
724
+ 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",
725
+ style: { left: `${E}%` }
726
+ }, [
727
+ c || `${Math.round(E)}%`,
728
+ t.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" })
729
+ ]) : null, re = n === "knob" ? t.createElement("div", {
730
+ 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",
731
+ style: { borderColor: _ }
732
+ }, t.createElement("div", { className: "w-1.5 h-1.5 rounded-full", style: { backgroundColor: _ } })) : null;
733
+ return t.createElement("div", {
734
+ className: `relative w-full ${n === "labeled" ? "mt-8" : ""} ${w || ""}`,
735
+ style: N,
736
+ ...C
737
+ }, [
738
+ se,
739
+ t.createElement(
740
+ "div",
741
+ {
742
+ key: "track",
743
+ className: "w-full bg-slate-100 rounded-full",
744
+ style: {
745
+ width: "100%",
746
+ height: te
747
+ }
748
+ },
749
+ t.createElement("div", {
750
+ className: "h-full transition-all duration-1000 ease-out rounded-full flex items-center justify-center relative",
751
+ style: {
752
+ width: `${E}%`,
753
+ backgroundColor: _
754
+ }
755
+ }, [O, re])
756
+ )
757
+ ]);
758
+ });
759
+ class Le extends $ {
760
+ constructor() {
761
+ super(...arguments);
762
+ i(this, "_value", 0);
763
+ i(this, "_max", 100);
764
+ i(this, "_color");
765
+ i(this, "_height");
766
+ i(this, "_variant", "default");
767
+ i(this, "_label");
768
+ i(this, "_subLabel");
769
+ i(this, "_items");
770
+ i(this, "_size");
771
+ i(this, "_strokeWidth");
772
+ i(this, "_segments");
773
+ i(this, "_gap");
774
+ i(this, "_trackColor");
775
+ }
776
+ value(e) {
777
+ return this._value = e, this;
778
+ }
779
+ max(e) {
780
+ return this._max = e, this;
781
+ }
782
+ color(e) {
783
+ return this._color = e, this;
784
+ }
785
+ height(e) {
786
+ return this._height = e, this;
787
+ }
788
+ size(e) {
789
+ return this._size = e, this;
790
+ }
791
+ strokeWidth(e) {
792
+ return this._strokeWidth = e, this;
793
+ }
794
+ segments(e) {
795
+ return this._segments = e, this;
796
+ }
797
+ gap(e) {
798
+ return this._gap = e, this;
799
+ }
800
+ trackColor(e) {
801
+ return this._trackColor = e, this;
802
+ }
803
+ variant(e) {
804
+ return this._variant = e, this;
805
+ }
806
+ label(e) {
807
+ return this._label = e, K(this, e), this;
808
+ }
809
+ subLabel(e) {
810
+ return this._subLabel = e, K(this, e), this;
811
+ }
812
+ items(e) {
813
+ return this._items = e, this;
814
+ }
815
+ build() {
816
+ const e = {
817
+ value: this._value,
818
+ max: this._max,
819
+ color: this._color,
820
+ height: this._height,
821
+ variant: this._variant,
822
+ label: Z(this._label),
823
+ subLabel: Z(this._subLabel),
824
+ items: this._items,
825
+ size: this._size,
826
+ strokeWidth: this._strokeWidth,
827
+ segments: this._segments,
828
+ gap: this._gap,
829
+ trackColor: this._trackColor,
830
+ children: this.processChildren(),
831
+ className: this.getClassName(),
832
+ style: this.getStyle(),
833
+ ...this._props
834
+ };
835
+ return t.createElement(ze, e);
836
+ }
837
+ }
838
+ const Ye = I(Le), Ae = "allow-scripts allow-popups allow-forms";
839
+ function T(s) {
840
+ return typeof s == "string" && s.toLowerCase() === "iframe";
841
+ }
842
+ function Be(s) {
843
+ const r = s.trim();
844
+ return !r || T(r) ? !1 : Q(r) || /^(https?:)?\/\//i.test(r) || r.startsWith("/") || r.startsWith("./") || r.startsWith("../") ? !0 : /^[a-z][a-z0-9+.-]*:/i.test(r);
845
+ }
846
+ function Me(s) {
847
+ if (typeof s != "string") return "";
848
+ const r = s.trim();
849
+ return !r || Q(r) || !oe(r) ? "" : r;
850
+ }
851
+ function J(s, r = {}) {
852
+ const e = s.sandbox ?? r.sandbox;
853
+ return {
854
+ ...r,
855
+ ...s,
856
+ src: Me(s.src ?? r.src),
857
+ // `srcdoc=""` is still "present" and blanks `src` in browsers. `undefined` drops the attr
858
+ // on createElement and overwrites a cloned javascript: srcdoc so it cannot stick.
859
+ srcdoc: void 0,
860
+ sandbox: typeof e == "string" ? e : Ae
861
+ };
862
+ }
863
+ const je = t.memo((s) => {
864
+ const {
865
+ source: r,
866
+ className: e,
867
+ style: l,
868
+ children: o,
869
+ ...n
870
+ } = s;
871
+ if (!r) return null;
872
+ const c = o == null || Array.isArray(o) && o.length === 0 ? void 0 : o, v = (m) => t.createElement(
873
+ "iframe",
874
+ {
875
+ ...J(m !== void 0 ? { ...n, src: m } : n),
876
+ className: e,
877
+ style: l
878
+ },
879
+ c
880
+ );
881
+ if (typeof r == "string" && T(r))
882
+ return v();
883
+ if (typeof r == "string" && Be(r))
884
+ return v(n.src ?? r);
885
+ if (typeof r == "string")
886
+ return null;
887
+ if (t.isValidElement(r)) {
888
+ const m = r, p = m.props || {}, y = [e, p.className].filter(Boolean).join(" ") || void 0, d = { ...p.style, ...l }, u = T(m.type) ? { ...J(n, p), className: y, style: d } : { ...n, className: y, style: d };
889
+ return c !== void 0 ? t.cloneElement(m, u, c) : t.cloneElement(m, u);
890
+ }
891
+ return typeof r != "function" && !(typeof r == "object" && r !== null && "$$typeof" in r) ? null : t.createElement(
892
+ r,
893
+ {
894
+ ...n,
895
+ className: e,
896
+ style: l
897
+ },
898
+ c
899
+ );
900
+ });
901
+ class We extends $ {
902
+ constructor(e) {
903
+ super();
904
+ i(this, "_source");
905
+ this._source = e;
906
+ }
907
+ source(e) {
908
+ return this._source = e, this;
909
+ }
910
+ props(e) {
911
+ return this._props = { ...this._props, ...e }, this;
912
+ }
913
+ build() {
914
+ const e = this._props || {}, {
915
+ className: l,
916
+ style: o,
917
+ children: n,
918
+ ...c
919
+ } = e, m = [
920
+ "fibo-integration",
921
+ ...this._classNames,
922
+ typeof l == "string" ? l : ""
923
+ ].filter(Boolean).join(" "), p = {
924
+ ...this.getStyle(),
925
+ ...o && typeof o == "object" && !Array.isArray(o) ? o : {}
926
+ }, y = this.processChildren(), d = n !== void 0 ? n : y.length ? y : void 0, u = {
927
+ source: this._source,
928
+ className: m,
929
+ style: p,
930
+ ...c,
931
+ ...d !== void 0 ? { children: d } : {}
932
+ };
933
+ return t.createElement(je, u);
934
+ }
935
+ }
936
+ const Ge = I(We);
937
+ export {
938
+ Oe as A,
939
+ Ge as I,
940
+ qe as L,
941
+ Ye as P,
942
+ Ue as S,
943
+ Ve as a
944
+ };