fiboui 2.7.0 → 2.8.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.
package/dist/content.js CHANGED
@@ -1,6 +1,6 @@
1
- import { A as s, B as r, I as o } from "./icons-GEqYd2M9.js";
2
- import { a9 as n, a8 as I } from "./client-CGjHCx8F.js";
3
- import { A as m, I as p, L as x, P as A, a as f, S as l } from "./index-7bieEGAP.js";
1
+ import { A as s, B as r, I as o } from "./icons-BKXx-EqO.js";
2
+ import { a9 as n, a8 as I } from "./client-BxtRoL1i.js";
3
+ import { A as m, I as p, L as x, P as A, a as f, S as l } from "./index-DD-zM-WX.js";
4
4
  export {
5
5
  m as Alert,
6
6
  s as Avatar,
package/dist/core.js CHANGED
@@ -1,5 +1,5 @@
1
- import { C as e, E as t, N as r, a0 as i, Z as o, _ as n, U as l, F as u, I as c, M as S, T as p, O as g, h as b, w as T, P as v, R as E, x as d, y as C, S as R, a2 as F, l as I, k as f, c as m, b as y, a as O, Y as P, Q as x, W as M, g as N, V as _, X as w, K as A, L as B, i as L, $ as V, J as h, o as q, H as z, r as G, z as K, s as W, G as X, A as j, D as k, B as D, a1 as H, f as J, q as Q, e as U, t as Y, j as Z, d as $, v as ss, u as as, n as es, p as ts, m as rs } from "./client-CGjHCx8F.js";
2
- import { L as os, c as ns, b as ls, a as us, e as cs, l as Ss, p as ps, w as gs } from "./page-CYqQOLXe.js";
1
+ import { C as e, E as t, N as r, a0 as i, Z as o, _ as n, U as l, F as u, I as c, M as S, T as p, O as g, h as b, w as T, P as v, R as E, x as d, y as C, S as R, a2 as F, l as I, k as f, c as m, b as y, a as O, Y as P, Q as x, W as M, g as N, V as _, X as w, K as A, L as B, i as L, $ as V, J as h, o as q, H as z, r as G, z as K, s as W, G as X, A as j, D as k, B as D, a1 as H, f as J, q as Q, e as U, t as Y, j as Z, d as $, v as ss, u as as, n as es, p as ts, m as rs } from "./client-BxtRoL1i.js";
2
+ import { L as os, c as ns, b as ls, a as us, e as cs, l as Ss, p as ps, w as gs } from "./page-BiOQBd4k.js";
3
3
  export {
4
4
  e as ComputedSignal,
5
5
  t as Easing,
@@ -2,14 +2,14 @@ var L = Object.defineProperty;
2
2
  var R = (t, r, e) => r in t ? L(t, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : t[r] = e;
3
3
  var i = (t, r, e) => R(t, typeof r != "symbol" ? r + "" : r, e);
4
4
  import h from "react";
5
- import { aT as C, aU as E, au as y, a_ as I, a3 as j, a8 as H, aV as W, aX as M, aW as D } from "./client-CGjHCx8F.js";
5
+ import { aT as C, aU as E, au as y, b1 as I, a3 as j, a8 as H, aW as W, aZ as M, aX as D } from "./client-BxtRoL1i.js";
6
6
  import { jsx as s, jsxs as v } from "react/jsx-runtime";
7
- function V(t) {
7
+ function $(t) {
8
8
  if (typeof t != "string") return "";
9
9
  const r = t.trim();
10
10
  return !r || I(r) ? "" : r;
11
11
  }
12
- const $ = ({ size: t }) => h.createElement(
12
+ const V = ({ size: t }) => h.createElement(
13
13
  "svg",
14
14
  {
15
15
  width: t,
@@ -25,7 +25,7 @@ const $ = ({ size: t }) => h.createElement(
25
25
  fill: "#6a6a6a"
26
26
  })
27
27
  ), U = h.memo((t) => {
28
- const { image: r, size: e, border: u, shape: g, status: d, initials: b, icon: p, alt: x, className: n, style: o, ...l } = t, c = V(r), _ = typeof e == "number" ? `${e}px` : e, a = typeof e == "number" ? e : 40, F = {
28
+ const { image: r, size: e, border: u, shape: g, status: d, initials: b, icon: p, alt: x, className: n, style: o, ...l } = t, c = $(r), _ = typeof e == "number" ? `${e}px` : e, a = typeof e == "number" ? e : 40, F = {
29
29
  circle: "50%",
30
30
  rounded: "24%",
31
31
  square: "0"
@@ -46,7 +46,7 @@ const $ = ({ size: t }) => h.createElement(
46
46
  borderRadius: "50%",
47
47
  border: "3px solid #ffffff",
48
48
  boxSizing: "content-box"
49
- }).build() : null, f = typeof b == "string" ? b.trim().slice(0, 2).toUpperCase() : "", w = c ? null : f || (p === "user" ? h.createElement($, { size: _ }) : p || null), N = typeof x == "string" && x.trim() || f || "Avatar", A = y().style({
49
+ }).build() : null, f = typeof b == "string" ? b.trim().slice(0, 2).toUpperCase() : "", w = c ? null : f || (p === "user" ? h.createElement(V, { size: _ }) : p || null), N = typeof x == "string" && x.trim() || f || "Avatar", A = y().style({
50
50
  width: "100%",
51
51
  height: "100%",
52
52
  borderRadius: F[g],
@@ -265,7 +265,7 @@ const X = {
265
265
  circle: "50%",
266
266
  rounded: "8px",
267
267
  square: "0px"
268
- }, K = h.memo((t) => {
268
+ }, Z = h.memo((t) => {
269
269
  const {
270
270
  src: r,
271
271
  alt: e,
@@ -291,7 +291,7 @@ const X = {
291
291
  style: l
292
292
  });
293
293
  });
294
- class Q extends E {
294
+ class K extends E {
295
295
  constructor(e = "") {
296
296
  super();
297
297
  i(this, "_src", "");
@@ -345,10 +345,10 @@ class Q extends E {
345
345
  className: u,
346
346
  style: g
347
347
  };
348
- return h.createElement(K, d);
348
+ return h.createElement(Z, d);
349
349
  }
350
350
  }
351
- const se = C(Q), m = { "aria-hidden": !0, focusable: "false" }, oe = {
351
+ const se = C(K), m = { "aria-hidden": !0, focusable: "false" }, oe = {
352
352
  Heart: /* @__PURE__ */ s("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", ...m, 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" }) }),
353
353
  Eth: /* @__PURE__ */ s("svg", { width: "14", height: "24", viewBox: "0 0 32 32", fill: "currentColor", ...m, 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" }) }),
354
354
  Verify: /* @__PURE__ */ s("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "#3B82F6", stroke: "none", role: "img", "aria-label": "Verified", "aria-hidden": !1, focusable: "false", 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" }) }),
@@ -2,10 +2,10 @@ var w = Object.defineProperty;
2
2
  var S = (s, e, t) => e in s ? w(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t;
3
3
  var n = (s, e, t) => S(s, typeof e != "symbol" ? e + "" : e, t);
4
4
  import m from "react";
5
- import { aT as g, aU as d, aW as N, aV as _, aX as j } from "./client-CGjHCx8F.js";
6
- function C(s, e) {
5
+ import { aT as g, aU as d, a_ as N, a$ as C, aX as j, aW as _, aZ as z } from "./client-BxtRoL1i.js";
6
+ function B(s, e) {
7
7
  if (!(typeof e != "string" || !_(e)))
8
- for (const t of j(e))
8
+ for (const t of z(e))
9
9
  s.bindSignal(t);
10
10
  }
11
11
  function l(s, e) {
@@ -17,20 +17,20 @@ function l(s, e) {
17
17
  return;
18
18
  }
19
19
  if (typeof e == "string") {
20
- C(s, e);
20
+ B(s, e);
21
21
  return;
22
22
  }
23
23
  if (Array.isArray(e))
24
24
  for (const t of e) l(s, t);
25
25
  }
26
- function z(s) {
27
- return typeof s == "string" && _(s) ? N(s) : s;
26
+ function I(s) {
27
+ return typeof s == "string" && _(s) ? j(s) : s;
28
28
  }
29
- function B(s, e) {
30
- const { children: t, ...r } = e, o = t !== void 0 ? t : s;
31
- return { nodes: o == null ? [] : Array.isArray(o) ? o : [o], rest: r };
29
+ function M(s, e) {
30
+ const { children: t, ...r } = e, a = t !== void 0 ? t : s;
31
+ return { nodes: a == null ? [] : Array.isArray(a) ? a : [a], rest: r };
32
32
  }
33
- class I extends d {
33
+ class $ extends d {
34
34
  constructor() {
35
35
  super(...arguments);
36
36
  n(this, "_mainAxisAlignment", "start");
@@ -51,6 +51,14 @@ class I extends d {
51
51
  crossAxisAlignment(t) {
52
52
  return this._crossAxisAlignment = t, this;
53
53
  }
54
+ /** Horizontal screen axis → cross axis on a Column. */
55
+ alignX(t) {
56
+ return this.crossAxisAlignment(N(t));
57
+ }
58
+ /** Vertical screen axis → main axis on a Column. */
59
+ alignY(t) {
60
+ return this.mainAxisAlignment(C(t));
61
+ }
54
62
  spacing(t) {
55
63
  return this._spacing = t, this;
56
64
  }
@@ -70,7 +78,7 @@ class I extends d {
70
78
  center: "items-center",
71
79
  end: "items-end",
72
80
  stretch: "items-stretch"
73
- }, o = {
81
+ }, a = {
74
82
  small: "flex-[0.3]",
75
83
  medium: "flex-1",
76
84
  large: "flex-[1.5]"
@@ -82,31 +90,31 @@ class I extends d {
82
90
  this.isHug() ? "w-auto self-auto" : "w-full min-w-0 min-h-0",
83
91
  t[this._mainAxisAlignment],
84
92
  r[this._crossAxisAlignment],
85
- this._size ? o[this._size] : "",
93
+ this._size ? a[this._size] : "",
86
94
  ...this._classNames
87
- ], h = this.getStyle(), { nodes: c, rest: p } = B(this.processChildren(), this._props), { className: y, style: u, ...x } = p, A = [...i, y].filter(Boolean).join(" "), b = c.map(z), a = {
95
+ ], h = this.getStyle(), { nodes: c, rest: p } = M(this.processChildren(), this._props), { className: x, style: u, ...y } = p, A = [...i, x].filter(Boolean).join(" "), b = c.map(I), o = {
88
96
  ...h,
89
97
  ...u && typeof u == "object" ? u : {}
90
98
  };
91
- return this._spacing != null && this._spacing !== "" && (typeof this._spacing == "number" ? a.gap = `${this._spacing}px` : isNaN(Number(this._spacing)) ? a.gap = this._spacing : a.gap = `${Number(this._spacing) * 4}px`), m.createElement(
99
+ return this._spacing != null && this._spacing !== "" && (typeof this._spacing == "number" ? o.gap = `${this._spacing}px` : isNaN(Number(this._spacing)) ? o.gap = this._spacing : o.gap = `${Number(this._spacing) * 4}px`), m.createElement(
92
100
  "div",
93
101
  {
94
- style: a,
95
- ...x,
102
+ style: o,
103
+ ...y,
96
104
  className: A
97
105
  },
98
106
  ...b
99
107
  );
100
108
  }
101
109
  }
102
- const F = g(I);
110
+ const X = g($);
103
111
  function f(s) {
104
112
  return typeof s == "number" ? `${s}px` : s;
105
113
  }
106
- function M(s) {
114
+ function E(s) {
107
115
  return s && typeof s == "object" && !Array.isArray(s) ? s : {};
108
116
  }
109
- class $ extends d {
117
+ class H extends d {
110
118
  constructor() {
111
119
  super(...arguments);
112
120
  n(this, "_height");
@@ -132,19 +140,19 @@ class $ extends d {
132
140
  return this._grow = Number.isFinite(r) ? r : 1, this._expand = !0, this;
133
141
  }
134
142
  build() {
135
- const { className: t, style: r, ...o } = this._props, i = { ...this.getStyle(), ...M(r) }, h = this._height != null || this._width != null, c = this._expand ?? !h;
143
+ const { className: t, style: r, ...a } = this._props, i = { ...this.getStyle(), ...E(r) }, h = this._height != null || this._width != null, c = this._expand ?? !h;
136
144
  this._height != null && (i.height = f(this._height)), this._width != null && (i.width = f(this._width)), c ? (i.flex = `${this._grow ?? 1} 1 0%`, i.alignSelf = i.alignSelf ?? "stretch", i.minWidth = i.minWidth ?? 0, i.minHeight = i.minHeight ?? 0) : i.flex = "0 0 auto";
137
145
  const p = ["fibo-spacer", this.getClassName(), t].filter(Boolean).join(" ");
138
146
  return m.createElement("div", {
139
- ...o,
147
+ ...a,
140
148
  style: i,
141
149
  className: p,
142
150
  "aria-hidden": !0
143
151
  });
144
152
  }
145
153
  }
146
- const T = g($);
154
+ const k = g(H);
147
155
  export {
148
- F as C,
149
- T as S
156
+ X as C,
157
+ k as S
150
158
  };
@@ -2,15 +2,15 @@ var ae = Object.defineProperty;
2
2
  var ie = (s, r, e) => r in s ? ae(s, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[r] = e;
3
3
  var i = (s, r, e) => ie(s, typeof r != "symbol" ? r + "" : r, e);
4
4
  import t from "react";
5
- import { aT as I, aU as $, aV as z, aX as R, aW as V, t as le, a_ as Z, b9 as oe } from "./client-CGjHCx8F.js";
6
- import { a as F } from "./icons-GEqYd2M9.js";
5
+ import { aT as I, aU as $, aW as z, aZ as R, aX as q, t as le, b1 as Q, bc as oe } from "./client-BxtRoL1i.js";
6
+ import { a as F } from "./icons-BKXx-EqO.js";
7
7
  function ce(s, r) {
8
8
  if (!(typeof r != "string" || !z(r)))
9
9
  for (const e of R(r))
10
10
  s.bindSignal(e);
11
11
  }
12
12
  function de(s) {
13
- return typeof s != "string" ? s : z(s) ? V(s) : s;
13
+ return typeof s != "string" ? s : z(s) ? q(s) : s;
14
14
  }
15
15
  const ue = t.memo((s) => {
16
16
  const { text: r, htmlFor: e, required: l, className: o, style: n, ...c } = s, v = [
@@ -61,7 +61,7 @@ class me extends $ {
61
61
  return t.createElement(ue, e);
62
62
  }
63
63
  }
64
- const Ve = I(me), he = `@media (prefers-reduced-motion: reduce) {
64
+ const qe = I(me), he = `@media (prefers-reduced-motion: reduce) {
65
65
  .fibo-spinner,
66
66
  .fibo-spinner * {
67
67
  animation: none !important;
@@ -212,7 +212,7 @@ class be extends $ {
212
212
  return t.createElement(ge, e);
213
213
  }
214
214
  }
215
- const qe = I(be), ye = `@keyframes fibo-skeleton-pulse {
215
+ const Ue = I(be), ye = `@keyframes fibo-skeleton-pulse {
216
216
  50% { opacity: 0.5; }
217
217
  }
218
218
  .loading-skeleton {
@@ -297,14 +297,14 @@ class ke extends $ {
297
297
  return t.createElement(Ee, u);
298
298
  }
299
299
  }
300
- const Ue = I(ke);
300
+ const Ve = I(ke);
301
301
  function H(s, r) {
302
302
  if (!(typeof r != "string" || !z(r)))
303
303
  for (const e of R(r))
304
304
  s.bindSignal(e);
305
305
  }
306
306
  function X(s) {
307
- return typeof s != "string" ? s : z(s) ? V(s) : s;
307
+ return typeof s != "string" ? s : z(s) ? q(s) : s;
308
308
  }
309
309
  const _e = {
310
310
  info: "bg-blue-500 text-white",
@@ -448,8 +448,8 @@ function K(s, r) {
448
448
  for (const e of R(r))
449
449
  s.bindSignal(e);
450
450
  }
451
- function J(s) {
452
- return typeof s != "string" ? s : z(s) ? V(s) : s;
451
+ function Z(s) {
452
+ return typeof s != "string" ? s : z(s) ? q(s) : s;
453
453
  }
454
454
  const ze = t.memo((s) => {
455
455
  const {
@@ -470,9 +470,9 @@ const ze = t.memo((s) => {
470
470
  className: w,
471
471
  style: N,
472
472
  ...P
473
- } = s, q = typeof r == "number" && Number.isFinite(r) ? r : 0, L = typeof e == "number" && Number.isFinite(e) ? e : 100, U = L > 0 ? Math.min(L, Math.max(0, q)) : Math.max(0, q), E = L > 0 ? U / L * 100 : 0, _ = l || "#3B82F6", ee = typeof P["aria-label"] == "string" ? P["aria-label"] : "", C = { ...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
474
  role: "progressbar",
475
- "aria-valuenow": U,
475
+ "aria-valuenow": V,
476
476
  "aria-valuemin": 0,
477
477
  "aria-valuemax": L,
478
478
  "aria-label": ee || c || "Progress"
@@ -819,8 +819,8 @@ class Le extends $ {
819
819
  color: this._color,
820
820
  height: this._height,
821
821
  variant: this._variant,
822
- label: J(this._label),
823
- subLabel: J(this._subLabel),
822
+ label: Z(this._label),
823
+ subLabel: Z(this._subLabel),
824
824
  items: this._items,
825
825
  size: this._size,
826
826
  strokeWidth: this._strokeWidth,
@@ -841,14 +841,14 @@ function T(s) {
841
841
  }
842
842
  function Be(s) {
843
843
  const r = s.trim();
844
- return !r || T(r) ? !1 : Z(r) || /^(https?:)?\/\//i.test(r) || r.startsWith("/") || r.startsWith("./") || r.startsWith("../") ? !0 : /^[a-z][a-z0-9+.-]*:/i.test(r);
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
845
  }
846
846
  function Me(s) {
847
847
  if (typeof s != "string") return "";
848
848
  const r = s.trim();
849
- return !r || Z(r) || !oe(r) ? "" : r;
849
+ return !r || Q(r) || !oe(r) ? "" : r;
850
850
  }
851
- function Q(s, r = {}) {
851
+ function J(s, r = {}) {
852
852
  const e = s.sandbox ?? r.sandbox;
853
853
  return {
854
854
  ...r,
@@ -872,7 +872,7 @@ const je = t.memo((s) => {
872
872
  const c = o == null || Array.isArray(o) && o.length === 0 ? void 0 : o, v = (m) => t.createElement(
873
873
  "iframe",
874
874
  {
875
- ...Q(m !== void 0 ? { ...n, src: m } : n),
875
+ ...J(m !== void 0 ? { ...n, src: m } : n),
876
876
  className: e,
877
877
  style: l
878
878
  },
@@ -885,7 +885,7 @@ const je = t.memo((s) => {
885
885
  if (typeof r == "string")
886
886
  return null;
887
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) ? { ...Q(n, p), className: y, style: d } : { ...n, className: y, style: d };
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
889
  return c !== void 0 ? t.cloneElement(m, u, c) : t.cloneElement(m, u);
890
890
  }
891
891
  return typeof r != "function" && !(typeof r == "object" && r !== null && "$$typeof" in r) ? null : t.createElement(
@@ -937,8 +937,8 @@ const Ge = I(We);
937
937
  export {
938
938
  Oe as A,
939
939
  Ge as I,
940
- Ve as L,
940
+ qe as L,
941
941
  Ye as P,
942
- qe as S,
943
- Ue as a
942
+ Ue as S,
943
+ Ve as a
944
944
  };
@@ -2,7 +2,7 @@ var tt = Object.defineProperty;
2
2
  var it = (e, i, t) => i in e ? tt(e, i, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[i] = t;
3
3
  var h = (e, i, t) => it(e, typeof i != "symbol" ? i + "" : i, t);
4
4
  import d from "react";
5
- import { aT as v, aU as T, aW as C, aV as g, aX as $, ba as w, bb as O, bc as S, bd as et, aZ as nt } from "./client-CGjHCx8F.js";
5
+ import { aT as v, aU as T, aX as C, aW as g, aZ as $, bd as w, be as O, bf as S, bg as et, b0 as nt } from "./client-BxtRoL1i.js";
6
6
  function rt(e, i) {
7
7
  if (!(typeof i != "string" || !g(i)))
8
8
  for (const t of $(i))
@@ -0,0 +1,140 @@
1
+ var _ = Object.defineProperty;
2
+ var u = (s, e, t) => e in s ? _(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t;
3
+ var i = (s, e, t) => u(s, typeof e != "symbol" ? e + "" : e, t);
4
+ import c from "react";
5
+ import { aT as m, aU as f, aV as n, aW as o, aX as a, aY as d, aZ as y } from "./client-BxtRoL1i.js";
6
+ function p(s, e) {
7
+ if (!(typeof e != "string" || !o(e)))
8
+ for (const t of y(e))
9
+ s.bindSignal(t);
10
+ }
11
+ function h(s, e) {
12
+ if (typeof e == "function") {
13
+ try {
14
+ h(s, e());
15
+ } catch {
16
+ }
17
+ return;
18
+ }
19
+ if (typeof e == "string") {
20
+ p(s, e);
21
+ return;
22
+ }
23
+ if (Array.isArray(e))
24
+ for (const t of e) h(s, t);
25
+ }
26
+ function x(s) {
27
+ return typeof s == "string" && o(s) ? a(s) : s;
28
+ }
29
+ class T extends f {
30
+ constructor(t = "") {
31
+ super();
32
+ i(this, "_text", "");
33
+ i(this, "_variant", "elevated");
34
+ i(this, "_size", "md");
35
+ i(this, "_onPress");
36
+ i(this, "_onHover");
37
+ i(this, "_disabled", !1);
38
+ i(this, "_icon");
39
+ i(this, "_shape", "default");
40
+ i(this, "_shadow", "none");
41
+ i(this, "_tone", "default");
42
+ i(this, "_motion", "default");
43
+ i(this, "_expand", !1);
44
+ i(this, "_htmlType", "button");
45
+ i(this, "_htmlTypeExplicit", !1);
46
+ this.text(t);
47
+ }
48
+ text(t) {
49
+ return this._text = t, typeof t == "function" ? this.observer() : p(this, t), this;
50
+ }
51
+ children(t) {
52
+ return h(this, t), super.children(t);
53
+ }
54
+ variant(t) {
55
+ return this._variant = t, this;
56
+ }
57
+ clean() {
58
+ return this._variant = "raw", this;
59
+ }
60
+ size(t) {
61
+ return this._size = t, this;
62
+ }
63
+ onPress(t) {
64
+ return this._onPress = t, this;
65
+ }
66
+ onHover(t) {
67
+ return this._onHover = t, this;
68
+ }
69
+ disabled(t = !0) {
70
+ return this._disabled = t, this;
71
+ }
72
+ icon(t) {
73
+ return this._icon = t, this;
74
+ }
75
+ shape(t) {
76
+ return this._shape = t, this;
77
+ }
78
+ shadow(t) {
79
+ return this._shadow = t, this;
80
+ }
81
+ tone(t) {
82
+ return this._tone = t, this;
83
+ }
84
+ motion(t) {
85
+ return this._motion = t, this;
86
+ }
87
+ expand(t = !0) {
88
+ return this._expand = t, this;
89
+ }
90
+ /**
91
+ * HTML button type. `.type('submit')` is what people write inside a Form.
92
+ * React still reads `element.type` as the component: a string sets this,
93
+ * a props object renders the button.
94
+ */
95
+ type(t) {
96
+ return this._htmlType = n(t), this._htmlTypeExplicit = !0, this;
97
+ }
98
+ htmlType(t) {
99
+ return this._htmlType = n(t), this._htmlTypeExplicit = !0, this;
100
+ }
101
+ /** Shortcut for `.htmlType('submit')` inside a `Form`. */
102
+ submit() {
103
+ return this._htmlType = "submit", this._htmlTypeExplicit = !0, this;
104
+ }
105
+ /** Shortcut for `.htmlType('reset')`. */
106
+ reset() {
107
+ return this._htmlType = "reset", this._htmlTypeExplicit = !0, this;
108
+ }
109
+ resolvedHtmlType() {
110
+ var t;
111
+ return this._htmlTypeExplicit ? n(this._htmlType) : n(((t = this._props) == null ? void 0 : t.type) ?? this._htmlType);
112
+ }
113
+ build() {
114
+ const t = this.getClassName(), r = typeof this._text == "function" ? this._text() : this._text, l = {
115
+ text: typeof r == "string" && o(r) ? a(r) : r,
116
+ variant: this._variant,
117
+ size: this._size,
118
+ onPress: this._onPress,
119
+ onHover: this._onHover,
120
+ disabled: this._disabled,
121
+ icon: this._icon,
122
+ shape: this._shape,
123
+ shadow: this._shadow,
124
+ tone: this._tone,
125
+ motion: this._motion,
126
+ expand: this._expand,
127
+ className: t,
128
+ style: this.getStyle(),
129
+ children: this.processChildren().map(x),
130
+ ...this._props,
131
+ type: this.resolvedHtmlType(),
132
+ bare: this.isReset()
133
+ };
134
+ return c.createElement(d, l);
135
+ }
136
+ }
137
+ const H = m(T);
138
+ export {
139
+ H as B
140
+ };