@athbnb/ui 0.0.2 → 0.0.3

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.
@@ -0,0 +1,120 @@
1
+ import { Modal as e } from "./Modal.js";
2
+ import { c as t } from "react/compiler-runtime";
3
+ import { Fragment as n, jsx as r, jsxs as i } from "react/jsx-runtime";
4
+ import { useEffect as a, useState as o } from "react";
5
+ //#region src/ui/ImagePreviewModal.tsx
6
+ function s(e) {
7
+ let n = t(3), { className: i } = e, a;
8
+ n[0] === Symbol.for("react.memo_cache_sentinel") ? (a = /* @__PURE__ */ r("path", { d: "M18 6L6 18M6 6l12 12" }), n[0] = a) : a = n[0];
9
+ let o;
10
+ return n[1] === i ? o = n[2] : (o = /* @__PURE__ */ r("svg", {
11
+ xmlns: "http://www.w3.org/2000/svg",
12
+ viewBox: "0 0 24 24",
13
+ fill: "none",
14
+ stroke: "currentColor",
15
+ strokeWidth: 2,
16
+ className: i,
17
+ "aria-hidden": !0,
18
+ children: a
19
+ }), n[1] = i, n[2] = o), o;
20
+ }
21
+ function c(e) {
22
+ let n = t(2), { dir: i } = e, a;
23
+ return n[0] === i ? a = n[1] : (a = /* @__PURE__ */ r("svg", {
24
+ xmlns: "http://www.w3.org/2000/svg",
25
+ viewBox: "0 0 24 24",
26
+ className: "h-4 w-4 fill-primary",
27
+ "aria-hidden": !0,
28
+ children: i === "left" ? /* @__PURE__ */ r("path", { d: "M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z" }) : /* @__PURE__ */ r("path", { d: "M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z" })
29
+ }), n[0] = i, n[1] = a), a;
30
+ }
31
+ function l(e) {
32
+ return ["relative !max-w-[min(96vw,1200px)] w-full overflow-hidden p-0", e].filter(Boolean).join(" ");
33
+ }
34
+ function u(e) {
35
+ let l = t(19), { images: u, initialIndex: d, imageUrl: f, placeholderUrl: p, className: m, alt: h, onClose: g } = e, _ = d === void 0 ? 0 : d, v = Math.max(0, u.length - 1), [y, b] = o(Math.min(Math.max(0, _), v)), x, S;
36
+ l[0] === u.length ? (x = l[1], S = l[2]) : (x = () => {
37
+ if (u.length <= 1) return;
38
+ let e = (e) => {
39
+ e.key === "ArrowLeft" && (e.preventDefault(), b((e) => (e - 1 + u.length) % u.length)), e.key === "ArrowRight" && (e.preventDefault(), b((e) => (e + 1) % u.length));
40
+ };
41
+ return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
42
+ }, S = [u.length], l[0] = u.length, l[1] = x, l[2] = S), a(x, S);
43
+ let C = u.length > 1, w = u[y] ?? f ?? p ?? "", T;
44
+ l[3] === Symbol.for("react.memo_cache_sentinel") ? (T = /* @__PURE__ */ r(s, { className: "h-5 w-5" }), l[3] = T) : T = l[3];
45
+ let E;
46
+ l[4] === g ? E = l[5] : (E = /* @__PURE__ */ r("button", {
47
+ type: "button",
48
+ onClick: g,
49
+ className: "absolute top-3 right-3 z-10 cursor-pointer text-gray-400 transition-colors hover:text-gray-500 sm:top-5 sm:right-5",
50
+ "aria-label": "Close",
51
+ children: T
52
+ }), l[4] = g, l[5] = E);
53
+ let D;
54
+ l[6] !== h || l[7] !== m || l[8] !== w ? (D = w ? /* @__PURE__ */ r("img", {
55
+ src: w,
56
+ className: `block max-h-[68vh] w-auto max-w-full rounded-lg object-contain ${m}`.trim(),
57
+ alt: h
58
+ }) : /* @__PURE__ */ r("div", {
59
+ className: "flex min-h-[40vh] items-center justify-center px-4 text-center paragraph-text text-secondary",
60
+ children: "No image URL provided."
61
+ }), l[6] = h, l[7] = m, l[8] = w, l[9] = D) : D = l[9];
62
+ let O;
63
+ l[10] !== C || l[11] !== u.length ? (O = C ? /* @__PURE__ */ i(n, { children: [/* @__PURE__ */ r("button", {
64
+ type: "button",
65
+ className: "absolute left-2 flex h-9 w-9 items-center justify-center rounded-md border border-primary/50 bg-white/90 sm:left-4",
66
+ onClick: () => b((e) => (e - 1 + u.length) % u.length),
67
+ "aria-label": "Previous image",
68
+ children: /* @__PURE__ */ r(c, { dir: "left" })
69
+ }), /* @__PURE__ */ r("button", {
70
+ type: "button",
71
+ className: "absolute right-2 flex h-9 w-9 items-center justify-center rounded-md border border-primary/50 bg-white/90 sm:right-4",
72
+ onClick: () => b((e) => (e + 1) % u.length),
73
+ "aria-label": "Next image",
74
+ children: /* @__PURE__ */ r(c, { dir: "right" })
75
+ })] }) : null, l[10] = C, l[11] = u.length, l[12] = O) : O = l[12];
76
+ let k;
77
+ l[13] !== D || l[14] !== O ? (k = /* @__PURE__ */ i("div", {
78
+ className: "relative flex items-center justify-center px-10 py-8 sm:px-14 sm:py-10",
79
+ children: [D, O]
80
+ }), l[13] = D, l[14] = O, l[15] = k) : k = l[15];
81
+ let A;
82
+ return l[16] !== E || l[17] !== k ? (A = /* @__PURE__ */ i(n, { children: [E, k] }), l[16] = E, l[17] = k, l[18] = A) : A = l[18], A;
83
+ }
84
+ function d(n) {
85
+ let i = t(25), { isOpen: a, onClose: o, imageUrl: s, imageUrls: c, initialIndex: d, className: f, modalClassName: p, alt: m, placeholderUrl: h } = n, g;
86
+ i[0] === c ? g = i[1] : (g = c === void 0 ? [] : c, i[0] = c, i[1] = g);
87
+ let _ = g, v = d === void 0 ? 0 : d, y = f === void 0 ? "" : f, b = p === void 0 ? "" : p, x = m === void 0 ? "Preview" : m, S;
88
+ bb0: {
89
+ if (Array.isArray(_) && _.length > 0) {
90
+ let e;
91
+ i[2] === _ ? e = i[3] : (e = _.filter(Boolean), i[2] = _, i[3] = e), S = e;
92
+ break bb0;
93
+ }
94
+ let e;
95
+ i[4] === s ? e = i[5] : (e = s ? [s] : [], i[4] = s, i[5] = e), S = e;
96
+ }
97
+ let C = S, w;
98
+ i[6] === C ? w = i[7] : (w = C.join(""), i[6] = C, i[7] = w);
99
+ let T = `${w}::${v}`, E;
100
+ i[8] === b ? E = i[9] : (E = l(b), i[8] = b, i[9] = E);
101
+ let D;
102
+ i[10] !== x || i[11] !== y || i[12] !== s || i[13] !== C || i[14] !== v || i[15] !== a || i[16] !== o || i[17] !== T || i[18] !== h ? (D = a ? /* @__PURE__ */ r(u, {
103
+ images: C,
104
+ initialIndex: v,
105
+ imageUrl: s,
106
+ placeholderUrl: h,
107
+ className: y,
108
+ alt: x,
109
+ onClose: o
110
+ }, T) : null, i[10] = x, i[11] = y, i[12] = s, i[13] = C, i[14] = v, i[15] = a, i[16] = o, i[17] = T, i[18] = h, i[19] = D) : D = i[19];
111
+ let O;
112
+ return i[20] !== a || i[21] !== o || i[22] !== D || i[23] !== E ? (O = /* @__PURE__ */ r(e, {
113
+ isOpen: a,
114
+ onClose: o,
115
+ className: E,
116
+ children: D
117
+ }), i[20] = a, i[21] = o, i[22] = D, i[23] = E, i[24] = O) : O = i[24], O;
118
+ }
119
+ //#endregion
120
+ export { d as ImagePreviewModal };
@@ -0,0 +1,56 @@
1
+ import { c as e } from "react/compiler-runtime";
2
+ import { jsx as t, jsxs as n } from "react/jsx-runtime";
3
+ //#region src/ui/List.tsx
4
+ var r = "text-secondary paragraph-text leading-relaxed whitespace-pre-line", i = "list-disc pl-5 text-secondary paragraph-text leading-relaxed space-y-2", a = "text-secondary paragraph-text leading-relaxed space-y-2", o = `${r}`, s = "text-base sm:text-lg md:text-xl font-bold text-secondary w-full text-left block";
5
+ function c(c) {
6
+ let l = e(29), { content: u, variant: d, headerSubtitle: f, className: p, listClassName: m, listItemClassName: h, blocksWrapperClassName: g, blockClassName: _, paragraphClassName: v, headerSubtitleClassName: y } = c, b = d === void 0 ? "bullets" : d, x = p === void 0 ? "" : p, S = m === void 0 ? "" : m, C = h === void 0 ? "" : h, w = g === void 0 ? "" : g, T = _ === void 0 ? "" : _, E = v === void 0 ? "" : v, D = y === void 0 ? "" : y;
7
+ if (Array.isArray(u)) {
8
+ if (u.length === 0) return null;
9
+ if (b === "bullets") {
10
+ let e = `${i} ${S} ${x}`, n;
11
+ l[0] === e ? n = l[1] : (n = e.trim(), l[0] = e, l[1] = n);
12
+ let r;
13
+ if (l[2] !== u || l[3] !== C) {
14
+ let e;
15
+ l[5] === C ? e = l[6] : (e = (e, n) => /* @__PURE__ */ t("li", {
16
+ className: C.trim() || void 0,
17
+ children: e
18
+ }, n), l[5] = C, l[6] = e), r = u.map(e), l[2] = u, l[3] = C, l[4] = r;
19
+ } else r = l[4];
20
+ let a;
21
+ return l[7] !== n || l[8] !== r ? (a = /* @__PURE__ */ t("ul", {
22
+ className: n,
23
+ children: r
24
+ }), l[7] = n, l[8] = r, l[9] = a) : a = l[9], a;
25
+ }
26
+ let e = `${a} ${w} ${x}`, r;
27
+ l[10] === e ? r = l[11] : (r = e.trim(), l[10] = e, l[11] = r);
28
+ let c;
29
+ l[12] !== f || l[13] !== D ? (c = f ? /* @__PURE__ */ t("span", {
30
+ className: `${s} ${D}`.trim(),
31
+ children: f
32
+ }) : null, l[12] = f, l[13] = D, l[14] = c) : c = l[14];
33
+ let d;
34
+ if (l[15] !== T || l[16] !== u) {
35
+ let e;
36
+ l[18] === T ? e = l[19] : (e = (e, n) => /* @__PURE__ */ t("p", {
37
+ className: `${o} ${T}`.trim(),
38
+ children: e
39
+ }, n), l[18] = T, l[19] = e), d = u.map(e), l[15] = T, l[16] = u, l[17] = d;
40
+ } else d = l[17];
41
+ let p;
42
+ return l[20] !== r || l[21] !== c || l[22] !== d ? (p = /* @__PURE__ */ n("div", {
43
+ className: r,
44
+ children: [c, d]
45
+ }), l[20] = r, l[21] = c, l[22] = d, l[23] = p) : p = l[23], p;
46
+ }
47
+ let O = `${r} ${E} ${x}`, k;
48
+ l[24] === O ? k = l[25] : (k = O.trim(), l[24] = O, l[25] = k);
49
+ let A;
50
+ return l[26] !== u || l[27] !== k ? (A = /* @__PURE__ */ t("p", {
51
+ className: k,
52
+ children: u
53
+ }), l[26] = u, l[27] = k, l[28] = A) : A = l[28], A;
54
+ }
55
+ //#endregion
56
+ export { c as List };
@@ -0,0 +1,115 @@
1
+ import { c as e } from "react/compiler-runtime";
2
+ import { jsx as t, jsxs as n } from "react/jsx-runtime";
3
+ //#region src/ui/Loader.tsx
4
+ function r(n) {
5
+ let r = e(8), { loadingClass: i, pulseDotClass: a, dotColorClass: o, className: s } = n, c = i === void 0 ? "" : i, l = a === void 0 ? "" : a, u = o === void 0 ? "bg-primary" : o, d = `flex items-center space-x-2.5 py-2 ${c} ${s === void 0 ? "" : s}`, f;
6
+ r[0] === d ? f = r[1] : (f = d.trim(), r[0] = d, r[1] = f);
7
+ let p;
8
+ r[2] !== u || r[3] !== l ? (p = Array.from({ length: 3 }, (e, n) => /* @__PURE__ */ t("div", { className: `h-2 w-2 rounded-full pulse-scale-dot ${u} ${l}`.trim() }, n)), r[2] = u, r[3] = l, r[4] = p) : p = r[4];
9
+ let m;
10
+ return r[5] !== f || r[6] !== p ? (m = /* @__PURE__ */ t("div", {
11
+ className: f,
12
+ role: "status",
13
+ "aria-label": "Loading",
14
+ "aria-live": "polite",
15
+ children: p
16
+ }), r[5] = f, r[6] = p, r[7] = m) : m = r[7], m;
17
+ }
18
+ function i(r) {
19
+ let i = e(28), { fullScreen: a, className: o, svgWidth: s, heartColor: c, diamondColor: l } = r, u = a === void 0 ? !0 : a, d = o === void 0 ? "" : o, f = s === void 0 ? 300 : s, p = c === void 0 ? "#00BC78" : c, m = l === void 0 ? "#0072D8" : l, h;
20
+ i[0] === f ? h = i[1] : (h = { width: f }, i[0] = f, i[1] = h);
21
+ let g;
22
+ i[2] === p ? g = i[3] : (g = { color: p }, i[2] = p, i[3] = g);
23
+ let _;
24
+ i[4] === Symbol.for("react.memo_cache_sentinel") ? (_ = /* @__PURE__ */ t("path", {
25
+ className: "logo-path logo-heart-green",
26
+ d: "M532.8 41C532.8 51.2 529 61.5 521.3 69.4L487.8 104.2L431 163.2L372 106.4L339.7 75.3C323.4 59.6 322.9 33.7 338.6 17.4C346.7 9 357.4 4.8 368.1 4.8C378.3 4.8 388.6 8.6 396.5 16.3L428.8 47.4L462.3 12.6C478 -3.7 504 -4.2 520.3 11.5C528.6 19.5 532.8 30.2 532.8 41Z"
27
+ }), i[4] = _) : _ = i[4];
28
+ let v;
29
+ i[5] === g ? v = i[6] : (v = /* @__PURE__ */ t("g", {
30
+ style: g,
31
+ children: _
32
+ }), i[5] = g, i[6] = v);
33
+ let y;
34
+ i[7] === m ? y = i[8] : (y = { color: m }, i[7] = m, i[8] = y);
35
+ let b;
36
+ i[9] === Symbol.for("react.memo_cache_sentinel") ? (b = /* @__PURE__ */ t("path", {
37
+ className: "logo-path logo-diamond-blue",
38
+ d: "M682.1 291.2L625.3 350.2L559.4 286.8L492.9 356L492.7 356.1L492.9 356.2L554.6 415.6L497.7 474.7L436 415.3L435.9 415.1L435.8 415.3L374 479.5L314.9 422.6L376.7 358.4L376.9 358.3L376.7 358.2L307.7 291.8L307.5 291.6L307.3 291.8L246.5 355L187.4 298.1L248.3 234.9L248.5 234.7L248.2 234.5L182.6 171.3L239.5 112.3L305.1 175.5L305.3 175.7L305.5 175.5L372 106.4L431 163.2L364.6 232.3L364.3 232.5L364.6 232.7L433.6 299.1L433.7 299.3L433.8 299.1L500.4 230L431 163.2L487.9 104.2L557.2 170.9L618.3 107.5L677.3 164.4L616.2 227.8L682.1 291.2Z"
39
+ }), i[9] = b) : b = i[9];
40
+ let x;
41
+ i[10] === y ? x = i[11] : (x = /* @__PURE__ */ t("g", {
42
+ style: y,
43
+ children: b
44
+ }), i[10] = y, i[11] = x);
45
+ let S;
46
+ i[12] !== x || i[13] !== v ? (S = /* @__PURE__ */ n("svg", {
47
+ viewBox: "0 0 865 685",
48
+ xmlns: "http://www.w3.org/2000/svg",
49
+ children: [v, x]
50
+ }), i[12] = x, i[13] = v, i[14] = S) : S = i[14];
51
+ let C;
52
+ i[15] !== S || i[16] !== h ? (C = /* @__PURE__ */ t("div", {
53
+ className: "relative",
54
+ children: /* @__PURE__ */ t("div", {
55
+ className: "icon-loader",
56
+ style: h,
57
+ children: S
58
+ })
59
+ }), i[15] = S, i[16] = h, i[17] = C) : C = i[17];
60
+ let w = C;
61
+ if (!u) {
62
+ let e = `flex items-center justify-center ${d}`, n;
63
+ i[18] === e ? n = i[19] : (n = e.trim(), i[18] = e, i[19] = n);
64
+ let r;
65
+ return i[20] !== w || i[21] !== n ? (r = /* @__PURE__ */ t("div", {
66
+ className: n,
67
+ role: "status",
68
+ "aria-label": "Loading",
69
+ "aria-live": "polite",
70
+ children: w
71
+ }), i[20] = w, i[21] = n, i[22] = r) : r = i[22], r;
72
+ }
73
+ let T = `fixed inset-0 z-50 flex items-center justify-center bg-white ${d}`, E;
74
+ i[23] === T ? E = i[24] : (E = T.trim(), i[23] = T, i[24] = E);
75
+ let D;
76
+ return i[25] !== w || i[26] !== E ? (D = /* @__PURE__ */ t("div", {
77
+ className: E,
78
+ role: "status",
79
+ "aria-label": "Loading",
80
+ "aria-live": "polite",
81
+ children: w
82
+ }), i[25] = w, i[26] = E, i[27] = D) : D = i[27], D;
83
+ }
84
+ function a(r) {
85
+ let i = e(10), { sizeClass: a, className: o } = r, s = a === void 0 ? "h-24 w-24" : a, c = `relative ${o === void 0 ? "" : o}`, l;
86
+ i[0] === c ? l = i[1] : (l = c.trim(), i[0] = c, i[1] = l);
87
+ let u = `${s} rounded-full border-b-8 border-t-8 border-primary/50`, d;
88
+ i[2] === u ? d = i[3] : (d = /* @__PURE__ */ t("div", { className: u }), i[2] = u, i[3] = d);
89
+ let f = `absolute top-0 left-0 ${s} animate-spin rounded-full border-b-8 border-t-8 border-primary`, p;
90
+ i[4] === f ? p = i[5] : (p = /* @__PURE__ */ t("div", { className: f }), i[4] = f, i[5] = p);
91
+ let m;
92
+ return i[6] !== l || i[7] !== d || i[8] !== p ? (m = /* @__PURE__ */ n("div", {
93
+ className: l,
94
+ children: [d, p]
95
+ }), i[6] = l, i[7] = d, i[8] = p, i[9] = m) : m = i[9], m;
96
+ }
97
+ function o(n) {
98
+ let r = e(8), { sizeClass: i, className: o, backdropClassName: s } = n, c = o === void 0 ? "" : o, l = `fixed inset-0 z-50 flex items-center justify-center bg-white ${s === void 0 ? "" : s}`, u;
99
+ r[0] === l ? u = r[1] : (u = l.trim(), r[0] = l, r[1] = u);
100
+ let d;
101
+ r[2] !== c || r[3] !== i ? (d = /* @__PURE__ */ t(a, {
102
+ sizeClass: i,
103
+ className: c
104
+ }), r[2] = c, r[3] = i, r[4] = d) : d = r[4];
105
+ let f;
106
+ return r[5] !== u || r[6] !== d ? (f = /* @__PURE__ */ t("div", {
107
+ className: u,
108
+ role: "status",
109
+ "aria-label": "Loading",
110
+ "aria-live": "polite",
111
+ children: d
112
+ }), r[5] = u, r[6] = d, r[7] = f) : f = r[7], f;
113
+ }
114
+ //#endregion
115
+ export { i as IconLoader, r as Loader, a as RingSpinner, o as RingSpinnerOverlay };
@@ -0,0 +1,53 @@
1
+ import { c as e } from "react/compiler-runtime";
2
+ import { jsx as t, jsxs as n } from "react/jsx-runtime";
3
+ import { useEffect as r } from "react";
4
+ import { createPortal as i } from "react-dom";
5
+ //#region src/ui/Modal.tsx
6
+ function a(a) {
7
+ let s = e(18), { isOpen: c, onClose: l, children: u, className: d, zIndexClass: f, closeOnBackdropClick: p, contentId: m } = a, h = d === void 0 ? "" : d, g = f === void 0 ? "z-[1500]" : f, _ = p === void 0 ? !0 : p, v, y;
8
+ if (s[0] !== c || s[1] !== l ? (v = () => {
9
+ if (!c) return;
10
+ let e = (e) => {
11
+ e.key === "Escape" && l();
12
+ }, t = document.body.style.overflow;
13
+ return document.addEventListener("keydown", e), document.body.style.overflow = "hidden", () => {
14
+ document.removeEventListener("keydown", e), document.body.style.overflow = t;
15
+ };
16
+ }, y = [c, l], s[0] = c, s[1] = l, s[2] = v, s[3] = y) : (v = s[2], y = s[3]), r(v, y), !c || typeof document > "u") return null;
17
+ let b = `fixed inset-0 flex items-center justify-center p-2 ${g}`, x;
18
+ s[4] !== _ || s[5] !== l ? (x = /* @__PURE__ */ t("div", {
19
+ className: "absolute inset-0 bg-black/50 backdrop-blur-md",
20
+ "aria-hidden": !0,
21
+ onClick: () => {
22
+ _ && l();
23
+ }
24
+ }), s[4] = _, s[5] = l, s[6] = x) : x = s[6];
25
+ let S = `relative z-10 w-full max-w-[420px] rounded-primary bg-white shadow-primary sm:max-w-[700px] md:max-w-[800px] ${h}`, C;
26
+ s[7] === S ? C = s[8] : (C = S.trim(), s[7] = S, s[8] = C);
27
+ let w;
28
+ s[9] === Symbol.for("react.memo_cache_sentinel") ? (w = {
29
+ maxHeight: "80vh",
30
+ overflowY: "auto"
31
+ }, s[9] = w) : w = s[9];
32
+ let T;
33
+ s[10] !== u || s[11] !== m || s[12] !== C ? (T = /* @__PURE__ */ t("div", {
34
+ id: m,
35
+ role: "dialog",
36
+ "aria-modal": "true",
37
+ className: C,
38
+ style: w,
39
+ onClick: o,
40
+ children: u
41
+ }), s[10] = u, s[11] = m, s[12] = C, s[13] = T) : T = s[13];
42
+ let E;
43
+ return s[14] !== T || s[15] !== b || s[16] !== x ? (E = i(/* @__PURE__ */ n("div", {
44
+ className: b,
45
+ role: "presentation",
46
+ children: [x, T]
47
+ }), document.body), s[14] = T, s[15] = b, s[16] = x, s[17] = E) : E = s[17], E;
48
+ }
49
+ function o(e) {
50
+ return e.stopPropagation();
51
+ }
52
+ //#endregion
53
+ export { a as Modal };
@@ -0,0 +1,167 @@
1
+ import { c as ee } from "react/compiler-runtime";
2
+ import { jsx as e, jsxs as t } from "react/jsx-runtime";
3
+ import { useEffect as te, useState as n } from "react";
4
+ //#region src/ui/ProgressBar.tsx
5
+ function r(r) {
6
+ let i = ee(59), { progress: a, currentStep: o, totalSteps: s, height: c, bgColor: l, fillColor: u, animated: d, showPercentage: f, showMovingPercentage: ne, showMovingIcon: re, showStepNumbers: p, icon: ie, duration: m, label: h, progressLabel: g, iconClassName: _, className: v } = r, y = a === void 0 ? 0 : a, b = o === void 0 ? null : o, x = s === void 0 ? null : s, S = c === void 0 ? "h-2" : c, C = l === void 0 ? "bg-primary/50" : l, w = u === void 0 ? "bg-primary" : u, T = d === void 0 ? !0 : d, E = f === void 0 ? !0 : f, D = ne === void 0 ? !0 : ne, O = re === void 0 ? !0 : re, k = p === void 0 ? !1 : p, A = ie === void 0 ? null : ie, j = m === void 0 ? 3e3 : m, M = h === void 0 ? "" : h, N = _ === void 0 ? "" : _, P = v === void 0 ? "" : v, [F, I] = n(0), L = b != null && x != null && x > 0, R = L ? Math.min(b / x * 100, 100) : y, z, B;
7
+ i[0] !== T || i[1] !== R ? (z = () => {
8
+ if (!T) return;
9
+ let ee = window.setTimeout(() => {
10
+ I(R);
11
+ }, 100);
12
+ return () => window.clearTimeout(ee);
13
+ }, B = [R, T], i[0] = T, i[1] = R, i[2] = z, i[3] = B) : (z = i[2], B = i[3]), te(z, B);
14
+ let V = Math.min(Math.max(T ? F : R, 0), 100), H;
15
+ i[4] !== V || i[5] !== b || i[6] !== L || i[7] !== g || i[8] !== k || i[9] !== x ? (H = () => g ?? (L && k ? `${b}/${x}` : `${Math.round(V)}%`), i[4] = V, i[5] = b, i[6] = L, i[7] = g, i[8] = k, i[9] = x, i[10] = H) : H = i[10];
16
+ let U = H, ae = typeof A == "string" && L ? b : A, oe = !!M || E, se = `relative w-full space-y-2 ${P}`, W;
17
+ i[11] === se ? W = i[12] : (W = se.trim(), i[11] = se, i[12] = W);
18
+ let G;
19
+ i[13] !== b || i[14] !== U || i[15] !== L || i[16] !== M || i[17] !== D || i[18] !== E || i[19] !== k || i[20] !== oe || i[21] !== x ? (G = oe ? /* @__PURE__ */ t("div", {
20
+ className: "flex items-center justify-between text-sm text-gray-700",
21
+ children: [
22
+ M ? /* @__PURE__ */ e("span", {
23
+ className: "font-medium",
24
+ children: M
25
+ }) : null,
26
+ E && !D ? /* @__PURE__ */ e("span", {
27
+ className: "font-medium",
28
+ children: U()
29
+ }) : null,
30
+ L && k && !D ? /* @__PURE__ */ t("span", {
31
+ className: "font-medium",
32
+ children: [
33
+ "Step ",
34
+ b,
35
+ " of ",
36
+ x
37
+ ]
38
+ }) : null
39
+ ]
40
+ }) : null, i[13] = b, i[14] = U, i[15] = L, i[16] = M, i[17] = D, i[18] = E, i[19] = k, i[20] = oe, i[21] = x, i[22] = G) : G = i[22];
41
+ let K;
42
+ i[23] !== T || i[24] !== V || i[25] !== j || i[26] !== A || i[27] !== N || i[28] !== ae || i[29] !== O ? (K = O && A != null ? /* @__PURE__ */ e("div", {
43
+ className: "relative h-2 sm:h-8",
44
+ children: /* @__PURE__ */ e("div", {
45
+ className: `absolute top-0 -translate-x-1/2 transform transition-all ease-out ${N}`.trim(),
46
+ style: {
47
+ left: `${V}%`,
48
+ transitionDuration: T ? `${j}ms` : "0ms"
49
+ },
50
+ children: /* @__PURE__ */ e("div", {
51
+ className: "text-lg",
52
+ children: ae
53
+ })
54
+ })
55
+ }) : null, i[23] = T, i[24] = V, i[25] = j, i[26] = A, i[27] = N, i[28] = ae, i[29] = O, i[30] = K) : K = i[30];
56
+ let ce = `relative w-full overflow-hidden ${C} mt-[14px] sm:mt-0 ${S}`, q;
57
+ i[31] === ce ? q = i[32] : (q = ce.trim(), i[31] = ce, i[32] = q);
58
+ let le = `relative overflow-hidden ${S} ${w} transition-all ease-out`, ue = `${V}%`, de = T ? `${j}ms` : "0ms", J;
59
+ i[33] !== ue || i[34] !== de ? (J = {
60
+ width: ue,
61
+ transitionDuration: de
62
+ }, i[33] = ue, i[34] = de, i[35] = J) : J = i[35];
63
+ let Y;
64
+ i[36] === Symbol.for("react.memo_cache_sentinel") ? (Y = /* @__PURE__ */ e("div", { className: "pointer-events-none absolute inset-0 -skew-x-12 animate-shimmer bg-gradient-to-r from-transparent via-white/20 to-transparent" }), i[36] = Y) : Y = i[36];
65
+ let X;
66
+ i[37] !== le || i[38] !== J ? (X = /* @__PURE__ */ e("div", {
67
+ className: le,
68
+ style: J,
69
+ children: Y
70
+ }), i[37] = le, i[38] = J, i[39] = X) : X = i[39];
71
+ let Z;
72
+ i[40] !== q || i[41] !== X ? (Z = /* @__PURE__ */ e("div", {
73
+ className: q,
74
+ children: X
75
+ }), i[40] = q, i[41] = X, i[42] = Z) : Z = i[42];
76
+ let Q;
77
+ i[43] !== T || i[44] !== V || i[45] !== b || i[46] !== j || i[47] !== U || i[48] !== L || i[49] !== D || i[50] !== k || i[51] !== x ? (Q = D ? /* @__PURE__ */ e("div", {
78
+ className: "relative -mt-[8px] h-2 sm:h-8",
79
+ children: /* @__PURE__ */ e("div", {
80
+ className: "absolute top-0 -translate-x-1/2 transform transition-all ease-out",
81
+ style: {
82
+ left: `${V}%`,
83
+ transitionDuration: T ? `${j}ms` : "0ms"
84
+ },
85
+ children: /* @__PURE__ */ e("span", {
86
+ className: "text-lg font-bold text-primary/75",
87
+ children: L && k ? `${b}/${x}` : U()
88
+ })
89
+ })
90
+ }) : null, i[43] = T, i[44] = V, i[45] = b, i[46] = j, i[47] = U, i[48] = L, i[49] = D, i[50] = k, i[51] = x, i[52] = Q) : Q = i[52];
91
+ let $;
92
+ return i[53] !== W || i[54] !== G || i[55] !== K || i[56] !== Z || i[57] !== Q ? ($ = /* @__PURE__ */ t("div", {
93
+ className: W,
94
+ children: [
95
+ G,
96
+ K,
97
+ Z,
98
+ Q
99
+ ]
100
+ }), i[53] = W, i[54] = G, i[55] = K, i[56] = Z, i[57] = Q, i[58] = $) : $ = i[58], $;
101
+ }
102
+ function i(te) {
103
+ let n = ee(40), { sqSize: r, strokeWidth: i, percentage: a, textClassName: o, className: s, trackClassName: c, progressClassName: l } = te, u = r === void 0 ? 60 : r, d = i === void 0 ? 5 : i, f = a === void 0 ? 0 : a, ne = o === void 0 ? "" : o, re = s === void 0 ? "" : s, p = c === void 0 ? "text-primary/25" : c, ie = l === void 0 ? "text-primary" : l, m = (u - d) / 2, h = 2 * Math.PI * m, g = h - h * f / 100, _ = Math.min(Math.max(f, 0), 100), v = `relative ${re}`, y;
104
+ n[0] === v ? y = n[1] : (y = v.trim(), n[0] = v, n[1] = y);
105
+ let b;
106
+ n[2] === u ? b = n[3] : (b = {
107
+ width: u,
108
+ height: u
109
+ }, n[2] = u, n[3] = b);
110
+ let x;
111
+ n[4] === _ ? x = n[5] : (x = Math.round(_), n[4] = _, n[5] = x);
112
+ let S = `0 0 ${u} ${u}`, C = u / 2, w = u / 2, T;
113
+ n[6] !== m || n[7] !== d || n[8] !== C || n[9] !== w || n[10] !== p ? (T = /* @__PURE__ */ e("circle", {
114
+ className: p,
115
+ strokeWidth: d,
116
+ stroke: "currentColor",
117
+ fill: "transparent",
118
+ r: m,
119
+ cx: C,
120
+ cy: w
121
+ }), n[6] = m, n[7] = d, n[8] = C, n[9] = w, n[10] = p, n[11] = T) : T = n[11];
122
+ let E = `transition-all duration-500 ease-in-out ${ie}`, D;
123
+ n[12] === E ? D = n[13] : (D = E.trim(), n[12] = E, n[13] = D);
124
+ let O = u / 2, k = u / 2, A;
125
+ n[14] !== h || n[15] !== m || n[16] !== g || n[17] !== d || n[18] !== D || n[19] !== O || n[20] !== k ? (A = /* @__PURE__ */ e("circle", {
126
+ className: D,
127
+ strokeWidth: d,
128
+ strokeLinecap: "round",
129
+ stroke: "currentColor",
130
+ fill: "transparent",
131
+ r: m,
132
+ cx: O,
133
+ cy: k,
134
+ strokeDasharray: h,
135
+ strokeDashoffset: g
136
+ }), n[14] = h, n[15] = m, n[16] = g, n[17] = d, n[18] = D, n[19] = O, n[20] = k, n[21] = A) : A = n[21];
137
+ let j;
138
+ n[22] !== u || n[23] !== S || n[24] !== T || n[25] !== A ? (j = /* @__PURE__ */ t("svg", {
139
+ className: "-rotate-90 transform",
140
+ width: u,
141
+ height: u,
142
+ viewBox: S,
143
+ "aria-hidden": !0,
144
+ children: [T, A]
145
+ }), n[22] = u, n[23] = S, n[24] = T, n[25] = A, n[26] = j) : j = n[26];
146
+ let M = `absolute inset-0 flex flex-col items-center justify-center text-sm font-semibold text-secondary ${ne}`, N;
147
+ n[27] === M ? N = n[28] : (N = M.trim(), n[27] = M, n[28] = N);
148
+ let P;
149
+ n[29] === _ ? P = n[30] : (P = Math.round(_), n[29] = _, n[30] = P);
150
+ let F;
151
+ n[31] !== N || n[32] !== P ? (F = /* @__PURE__ */ t("span", {
152
+ className: N,
153
+ children: [P, "%"]
154
+ }), n[31] = N, n[32] = P, n[33] = F) : F = n[33];
155
+ let I;
156
+ return n[34] !== b || n[35] !== x || n[36] !== j || n[37] !== F || n[38] !== y ? (I = /* @__PURE__ */ t("div", {
157
+ className: y,
158
+ style: b,
159
+ role: "progressbar",
160
+ "aria-valuenow": x,
161
+ "aria-valuemin": 0,
162
+ "aria-valuemax": 100,
163
+ children: [j, F]
164
+ }), n[34] = b, n[35] = x, n[36] = j, n[37] = F, n[38] = y, n[39] = I) : I = n[39], I;
165
+ }
166
+ //#endregion
167
+ export { i as CircularProgressBar, r as ProgressBar };