@stackloop/ui 2.3.0 → 2.3.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.
package/dist/index.js CHANGED
@@ -6,13 +6,13 @@ function Be(e) {
6
6
  var t, a, o = "";
7
7
  if (typeof e == "string" || typeof e == "number") o += e;
8
8
  else if (typeof e == "object") if (Array.isArray(e)) {
9
- var n = e.length;
10
- for (t = 0; t < n; t++) e[t] && (a = Be(e[t])) && (o && (o += " "), o += a);
9
+ var s = e.length;
10
+ for (t = 0; t < s; t++) e[t] && (a = Be(e[t])) && (o && (o += " "), o += a);
11
11
  } else for (a in e) e[a] && (o && (o += " "), o += a);
12
12
  return o;
13
13
  }
14
14
  function Nr() {
15
- for (var e, t, a = 0, o = "", n = arguments.length; a < n; a++) (e = arguments[a]) && (t = Be(e)) && (o && (o += " "), o += t);
15
+ for (var e, t, a = 0, o = "", s = arguments.length; a < s; a++) (e = arguments[a]) && (t = Be(e)) && (o && (o += " "), o += t);
16
16
  return o;
17
17
  }
18
18
  const kr = (e, t) => {
@@ -35,34 +35,34 @@ const kr = (e, t) => {
35
35
  conflictingClassGroupModifiers: o
36
36
  } = e;
37
37
  return {
38
- getClassGroupId: (s) => {
39
- if (s.startsWith("[") && s.endsWith("]"))
40
- return Tr(s);
41
- const c = s.split(ue), i = c[0] === "" && c.length > 1 ? 1 : 0;
38
+ getClassGroupId: (n) => {
39
+ if (n.startsWith("[") && n.endsWith("]"))
40
+ return Tr(n);
41
+ const c = n.split(ue), i = c[0] === "" && c.length > 1 ? 1 : 0;
42
42
  return $e(c, i, t);
43
43
  },
44
- getConflictingClassGroupIds: (s, c) => {
44
+ getConflictingClassGroupIds: (n, c) => {
45
45
  if (c) {
46
- const i = o[s], m = a[s];
46
+ const i = o[n], m = a[n];
47
47
  return i ? m ? kr(m, i) : i : m || Re;
48
48
  }
49
- return a[s] || Re;
49
+ return a[n] || Re;
50
50
  }
51
51
  };
52
52
  }, $e = (e, t, a) => {
53
53
  if (e.length - t === 0)
54
54
  return a.classGroupId;
55
- const n = e[t], l = a.nextPart.get(n);
55
+ const s = e[t], l = a.nextPart.get(s);
56
56
  if (l) {
57
57
  const m = $e(e, t + 1, l);
58
58
  if (m) return m;
59
59
  }
60
- const s = a.validators;
61
- if (s === null)
60
+ const n = a.validators;
61
+ if (n === null)
62
62
  return;
63
- const c = t === 0 ? e.join(ue) : e.slice(t).join(ue), i = s.length;
63
+ const c = t === 0 ? e.join(ue) : e.slice(t).join(ue), i = n.length;
64
64
  for (let m = 0; m < i; m++) {
65
- const x = s[m];
65
+ const x = n[m];
66
66
  if (x.validator(c))
67
67
  return x.classGroupId;
68
68
  }
@@ -78,15 +78,15 @@ const kr = (e, t) => {
78
78
  }, Rr = (e, t) => {
79
79
  const a = Ue();
80
80
  for (const o in e) {
81
- const n = e[o];
82
- we(n, a, o, t);
81
+ const s = e[o];
82
+ we(s, a, o, t);
83
83
  }
84
84
  return a;
85
85
  }, we = (e, t, a, o) => {
86
- const n = e.length;
87
- for (let l = 0; l < n; l++) {
88
- const s = e[l];
89
- Ar(s, t, a, o);
86
+ const s = e.length;
87
+ for (let l = 0; l < s; l++) {
88
+ const n = e[l];
89
+ Ar(n, t, a, o);
90
90
  }
91
91
  }, Ar = (e, t, a, o) => {
92
92
  if (typeof e == "string") {
@@ -108,18 +108,18 @@ const kr = (e, t) => {
108
108
  }
109
109
  t.validators === null && (t.validators = []), t.validators.push(Cr(a, e));
110
110
  }, Dr = (e, t, a, o) => {
111
- const n = Object.entries(e), l = n.length;
112
- for (let s = 0; s < l; s++) {
113
- const [c, i] = n[s];
111
+ const s = Object.entries(e), l = s.length;
112
+ for (let n = 0; n < l; n++) {
113
+ const [c, i] = s[n];
114
114
  we(i, _e(t, c), a, o);
115
115
  }
116
116
  }, _e = (e, t) => {
117
117
  let a = e;
118
- const o = t.split(ue), n = o.length;
119
- for (let l = 0; l < n; l++) {
120
- const s = o[l];
121
- let c = a.nextPart.get(s);
122
- c || (c = Ue(), a.nextPart.set(s, c)), a = c;
118
+ const o = t.split(ue), s = o.length;
119
+ for (let l = 0; l < s; l++) {
120
+ const n = o[l];
121
+ let c = a.nextPart.get(n);
122
+ c || (c = Ue(), a.nextPart.set(n, c)), a = c;
123
123
  }
124
124
  return a;
125
125
  }, Lr = (e) => "isThemeGetter" in e && e.isThemeGetter === !0, Or = (e) => {
@@ -131,41 +131,41 @@ const kr = (e, t) => {
131
131
  }
132
132
  };
133
133
  let t = 0, a = /* @__PURE__ */ Object.create(null), o = /* @__PURE__ */ Object.create(null);
134
- const n = (l, s) => {
135
- a[l] = s, t++, t > e && (t = 0, o = a, a = /* @__PURE__ */ Object.create(null));
134
+ const s = (l, n) => {
135
+ a[l] = n, t++, t > e && (t = 0, o = a, a = /* @__PURE__ */ Object.create(null));
136
136
  };
137
137
  return {
138
138
  get(l) {
139
- let s = a[l];
140
- if (s !== void 0)
141
- return s;
142
- if ((s = o[l]) !== void 0)
143
- return n(l, s), s;
139
+ let n = a[l];
140
+ if (n !== void 0)
141
+ return n;
142
+ if ((n = o[l]) !== void 0)
143
+ return s(l, n), n;
144
144
  },
145
- set(l, s) {
146
- l in a ? a[l] = s : n(l, s);
145
+ set(l, n) {
146
+ l in a ? a[l] = n : s(l, n);
147
147
  }
148
148
  };
149
- }, ye = "!", Ae = ":", Er = [], Ie = (e, t, a, o, n) => ({
149
+ }, ye = "!", Ae = ":", Er = [], Ie = (e, t, a, o, s) => ({
150
150
  modifiers: e,
151
151
  hasImportantModifier: t,
152
152
  baseClassName: a,
153
153
  maybePostfixModifierPosition: o,
154
- isExternal: n
154
+ isExternal: s
155
155
  }), Fr = (e) => {
156
156
  const {
157
157
  prefix: t,
158
158
  experimentalParseClassName: a
159
159
  } = e;
160
- let o = (n) => {
160
+ let o = (s) => {
161
161
  const l = [];
162
- let s = 0, c = 0, i = 0, m;
163
- const x = n.length;
162
+ let n = 0, c = 0, i = 0, m;
163
+ const x = s.length;
164
164
  for (let w = 0; w < x; w++) {
165
- const M = n[w];
166
- if (s === 0 && c === 0) {
165
+ const M = s[w];
166
+ if (n === 0 && c === 0) {
167
167
  if (M === Ae) {
168
- l.push(n.slice(i, w)), i = w + 1;
168
+ l.push(s.slice(i, w)), i = w + 1;
169
169
  continue;
170
170
  }
171
171
  if (M === "/") {
@@ -173,9 +173,9 @@ const kr = (e, t) => {
173
173
  continue;
174
174
  }
175
175
  }
176
- M === "[" ? s++ : M === "]" ? s-- : M === "(" ? c++ : M === ")" && c--;
176
+ M === "[" ? n++ : M === "]" ? n-- : M === "(" ? c++ : M === ")" && c--;
177
177
  }
178
- const y = l.length === 0 ? n : n.slice(i);
178
+ const y = l.length === 0 ? s : s.slice(i);
179
179
  let h = y, N = !1;
180
180
  y.endsWith(ye) ? (h = y.slice(0, -1), N = !0) : (
181
181
  /**
@@ -188,14 +188,14 @@ const kr = (e, t) => {
188
188
  return Ie(l, N, h, k);
189
189
  };
190
190
  if (t) {
191
- const n = t + Ae, l = o;
192
- o = (s) => s.startsWith(n) ? l(s.slice(n.length)) : Ie(Er, !1, s, void 0, !0);
191
+ const s = t + Ae, l = o;
192
+ o = (n) => n.startsWith(s) ? l(n.slice(s.length)) : Ie(Er, !1, n, void 0, !0);
193
193
  }
194
194
  if (a) {
195
- const n = o;
195
+ const s = o;
196
196
  o = (l) => a({
197
197
  className: l,
198
- parseClassName: n
198
+ parseClassName: s
199
199
  });
200
200
  }
201
201
  return o;
@@ -205,12 +205,12 @@ const kr = (e, t) => {
205
205
  t.set(a, 1e6 + o);
206
206
  }), (a) => {
207
207
  const o = [];
208
- let n = [];
208
+ let s = [];
209
209
  for (let l = 0; l < a.length; l++) {
210
- const s = a[l], c = s[0] === "[", i = t.has(s);
211
- c || i ? (n.length > 0 && (n.sort(), o.push(...n), n = []), o.push(s)) : n.push(s);
210
+ const n = a[l], c = n[0] === "[", i = t.has(n);
211
+ c || i ? (s.length > 0 && (s.sort(), o.push(...s), s = []), o.push(n)) : s.push(n);
212
212
  }
213
- return n.length > 0 && (n.sort(), o.push(...n)), o;
213
+ return s.length > 0 && (s.sort(), o.push(...s)), o;
214
214
  };
215
215
  }, Gr = (e) => ({
216
216
  cache: Or(e.cacheSize),
@@ -221,9 +221,9 @@ const kr = (e, t) => {
221
221
  const {
222
222
  parseClassName: a,
223
223
  getClassGroupId: o,
224
- getConflictingClassGroupIds: n,
224
+ getConflictingClassGroupIds: s,
225
225
  sortModifiers: l
226
- } = t, s = [], c = e.trim().split(Br);
226
+ } = t, n = [], c = e.trim().split(Br);
227
227
  let i = "";
228
228
  for (let m = c.length - 1; m >= 0; m -= 1) {
229
229
  const x = c[m], {
@@ -250,22 +250,22 @@ const kr = (e, t) => {
250
250
  M = !1;
251
251
  }
252
252
  const L = h.length === 0 ? "" : h.length === 1 ? h[0] : l(h).join(":"), T = N ? L + ye : L, F = T + j;
253
- if (s.indexOf(F) > -1)
253
+ if (n.indexOf(F) > -1)
254
254
  continue;
255
- s.push(F);
256
- const P = n(j, M);
255
+ n.push(F);
256
+ const P = s(j, M);
257
257
  for (let S = 0; S < P.length; ++S) {
258
258
  const O = P[S];
259
- s.push(T + O);
259
+ n.push(T + O);
260
260
  }
261
261
  i = x + (i.length > 0 ? " " + i : i);
262
262
  }
263
263
  return i;
264
264
  }, $r = (...e) => {
265
- let t = 0, a, o, n = "";
265
+ let t = 0, a, o, s = "";
266
266
  for (; t < e.length; )
267
- (a = e[t++]) && (o = Ve(a)) && (n && (n += " "), n += o);
268
- return n;
267
+ (a = e[t++]) && (o = Ve(a)) && (s && (s += " "), s += o);
268
+ return s;
269
269
  }, Ve = (e) => {
270
270
  if (typeof e == "string")
271
271
  return e;
@@ -274,18 +274,18 @@ const kr = (e, t) => {
274
274
  e[o] && (t = Ve(e[o])) && (a && (a += " "), a += t);
275
275
  return a;
276
276
  }, _r = (e, ...t) => {
277
- let a, o, n, l;
278
- const s = (i) => {
277
+ let a, o, s, l;
278
+ const n = (i) => {
279
279
  const m = t.reduce((x, y) => y(x), e());
280
- return a = Gr(m), o = a.cache.get, n = a.cache.set, l = c, c(i);
280
+ return a = Gr(m), o = a.cache.get, s = a.cache.set, l = c, c(i);
281
281
  }, c = (i) => {
282
282
  const m = o(i);
283
283
  if (m)
284
284
  return m;
285
285
  const x = Ur(i, a);
286
- return n(i, x), x;
286
+ return s(i, x), x;
287
287
  };
288
- return l = s, (...i) => l($r(...i));
288
+ return l = n, (...i) => l($r(...i));
289
289
  }, Vr = [], R = (e) => {
290
290
  const t = (a) => a[e] || Vr;
291
291
  return t.isThemeGetter = !0, t;
@@ -301,7 +301,7 @@ const kr = (e, t) => {
301
301
  const o = Ye.exec(e);
302
302
  return o ? o[1] ? t(o[1]) : a : !1;
303
303
  }, qe = (e) => e === "position" || e === "percentage", Je = (e) => e === "image" || e === "url", Qe = (e) => e === "length" || e === "size" || e === "bg-size", Ke = (e) => e === "length", it = (e) => e === "number", lt = (e) => e === "family-name", Xe = (e) => e === "shadow", ct = () => {
304
- const e = R("color"), t = R("font"), a = R("text"), o = R("font-weight"), n = R("tracking"), l = R("leading"), s = R("breakpoint"), c = R("container"), i = R("spacing"), m = R("radius"), x = R("shadow"), y = R("inset-shadow"), h = R("text-shadow"), N = R("drop-shadow"), k = R("blur"), w = R("perspective"), M = R("aspect"), j = R("ease"), L = R("animate"), T = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], F = () => [
304
+ const e = R("color"), t = R("font"), a = R("text"), o = R("font-weight"), s = R("tracking"), l = R("leading"), n = R("breakpoint"), c = R("container"), i = R("spacing"), m = R("radius"), x = R("shadow"), y = R("inset-shadow"), h = R("text-shadow"), N = R("drop-shadow"), k = R("blur"), w = R("perspective"), M = R("aspect"), j = R("ease"), L = R("animate"), T = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], F = () => [
305
305
  "center",
306
306
  "top",
307
307
  "bottom",
@@ -1001,7 +1001,7 @@ const kr = (e, t) => {
1001
1001
  "prose",
1002
1002
  /** Deprecated since Tailwind CSS v4.0.0. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */
1003
1003
  {
1004
- screen: [s]
1004
+ screen: [n]
1005
1005
  },
1006
1006
  ...G()
1007
1007
  ]
@@ -1103,7 +1103,7 @@ const kr = (e, t) => {
1103
1103
  * @see https://tailwindcss.com/docs/letter-spacing
1104
1104
  */
1105
1105
  tracking: [{
1106
- tracking: [n, b, p]
1106
+ tracking: [s, b, p]
1107
1107
  }],
1108
1108
  /**
1109
1109
  * Line Clamp
@@ -2775,7 +2775,7 @@ function u(...e) {
2775
2775
  return dt(Nr(e));
2776
2776
  }
2777
2777
  const xe = Le.forwardRef(
2778
- ({ variant: e = "primary", size: t = "md", loading: a, icon: o, className: n, children: l, disabled: s, ...c }, i) => {
2778
+ ({ variant: e = "primary", size: t = "md", loading: a, icon: o, className: s, children: l, disabled: n, ...c }, i) => {
2779
2779
  const m = "inline-flex items-center justify-center gap-2 font-medium rounded-md transition-all duration-200 touch-target disabled:opacity-50 disabled:cursor-not-allowed active:scale-[0.98] flex-shrink-0 whitespace-nowrap", x = {
2780
2780
  primary: "bg-primary text-white hover:bg-primary-dark active:bg-primary-dark/90 shadow-sm",
2781
2781
  secondary: "bg-secondary text-foreground hover:bg-border active:bg-border-dark",
@@ -2791,9 +2791,9 @@ const xe = Le.forwardRef(
2791
2791
  g.button,
2792
2792
  {
2793
2793
  ref: i,
2794
- whileTap: { scale: s || a ? 1 : 0.98 },
2795
- className: u(m, x[e], y[t], n),
2796
- disabled: s || a,
2794
+ whileTap: { scale: n || a ? 1 : 0.98 },
2795
+ className: u(m, x[e], y[t], s),
2796
+ disabled: n || a,
2797
2797
  ...c,
2798
2798
  children: [
2799
2799
  a ? /* @__PURE__ */ r(tr, { className: "h-5 w-5 animate-spin" }) : o ? /* @__PURE__ */ r("span", { className: "flex-shrink-0", children: o }) : null,
@@ -2805,8 +2805,8 @@ const xe = Le.forwardRef(
2805
2805
  );
2806
2806
  xe.displayName = "Button";
2807
2807
  const mt = se(
2808
- ({ label: e, error: t, hint: a, leftIcon: o, rightIcon: n, className: l, type: s, ...c }, i) => {
2809
- const [m, x] = D(!1), y = s === "password", h = y && m ? "text" : s;
2808
+ ({ label: e, error: t, hint: a, leftIcon: o, rightIcon: s, className: l, type: n, ...c }, i) => {
2809
+ const [m, x] = D(!1), y = n === "password", h = y && m ? "text" : n;
2810
2810
  return /* @__PURE__ */ d("div", { className: "w-full space-y-1.5", children: [
2811
2811
  e && /* @__PURE__ */ d("label", { className: "block text-sm font-medium text-foreground", children: [
2812
2812
  e,
@@ -2833,7 +2833,7 @@ const mt = se(
2833
2833
  paddingTop: "12px",
2834
2834
  paddingBottom: "12px",
2835
2835
  paddingLeft: o ? "44px" : "16px",
2836
- paddingRight: n || y ? "44px" : "16px"
2836
+ paddingRight: s || y ? "44px" : "16px"
2837
2837
  },
2838
2838
  ...c
2839
2839
  }
@@ -2858,7 +2858,7 @@ const mt = se(
2858
2858
  children: m ? /* @__PURE__ */ r(or, { className: "w-5 h-5" }) : /* @__PURE__ */ r(ar, { className: "w-5 h-5" })
2859
2859
  }
2860
2860
  ),
2861
- n && !y && /* @__PURE__ */ r("div", { className: "absolute flex items-center pointer-events-none text-primary", style: { right: "14px", top: "50%", transform: "translateY(-50%)" }, children: n })
2861
+ s && !y && /* @__PURE__ */ r("div", { className: "absolute flex items-center pointer-events-none text-primary", style: { right: "14px", top: "50%", transform: "translateY(-50%)" }, children: s })
2862
2862
  ] }),
2863
2863
  t && /* @__PURE__ */ r(
2864
2864
  g.p,
@@ -2875,7 +2875,7 @@ const mt = se(
2875
2875
  );
2876
2876
  mt.displayName = "Input";
2877
2877
  const ut = se(
2878
- ({ label: e, error: t, helperText: a, className: o, required: n, ...l }, s) => /* @__PURE__ */ d(
2878
+ ({ label: e, error: t, helperText: a, className: o, required: s, ...l }, n) => /* @__PURE__ */ d(
2879
2879
  g.div,
2880
2880
  {
2881
2881
  initial: { opacity: 0, y: 10 },
@@ -2885,12 +2885,12 @@ const ut = se(
2885
2885
  children: [
2886
2886
  e && /* @__PURE__ */ d("label", { className: "block text-sm font-medium text-foreground mb-1.5", children: [
2887
2887
  e,
2888
- n && /* @__PURE__ */ r("span", { className: "text-error ml-1", children: "*" })
2888
+ s && /* @__PURE__ */ r("span", { className: "text-error ml-1", children: "*" })
2889
2889
  ] }),
2890
2890
  /* @__PURE__ */ r(
2891
2891
  "textarea",
2892
2892
  {
2893
- ref: s,
2893
+ ref: n,
2894
2894
  className: u(
2895
2895
  "w-full px-4 py-3 bg-background border border-border rounded-md",
2896
2896
  "text-foreground placeholder:text-foreground/50",
@@ -2920,8 +2920,8 @@ const ut = se(
2920
2920
  );
2921
2921
  ut.displayName = "Textarea";
2922
2922
  const pt = se(
2923
- ({ label: e, description: t, className: a, checked: o, defaultChecked: n, onChange: l, ...s }, c) => {
2924
- const [i, m] = D(n || !1), x = o !== void 0 ? o : i;
2923
+ ({ label: e, description: t, className: a, checked: o, defaultChecked: s, onChange: l, ...n }, c) => {
2924
+ const [i, m] = D(s || !1), x = o !== void 0 ? o : i;
2925
2925
  return /* @__PURE__ */ d("label", { className: "flex items-start gap-3 cursor-pointer group", children: [
2926
2926
  /* @__PURE__ */ d("div", { className: "relative flex-shrink-0 mt-0.5", children: [
2927
2927
  /* @__PURE__ */ r(
@@ -2934,7 +2934,7 @@ const pt = se(
2934
2934
  onChange: (h) => {
2935
2935
  o === void 0 && m(h.target.checked), l?.(h.target.checked);
2936
2936
  },
2937
- ...s
2937
+ ...n
2938
2938
  }
2939
2939
  ),
2940
2940
  /* @__PURE__ */ r(
@@ -2969,27 +2969,27 @@ const Rt = ({
2969
2969
  value: t,
2970
2970
  onChange: a,
2971
2971
  name: o,
2972
- disabled: n,
2972
+ disabled: s,
2973
2973
  className: l
2974
- }) => /* @__PURE__ */ r("div", { className: u("flex flex-wrap gap-2", l), children: e.map((s) => {
2975
- const c = t === s.value;
2974
+ }) => /* @__PURE__ */ r("div", { className: u("flex flex-wrap gap-2", l), children: e.map((n) => {
2975
+ const c = t === n.value;
2976
2976
  return /* @__PURE__ */ d("label", { className: "relative cursor-pointer", children: [
2977
2977
  /* @__PURE__ */ r(
2978
2978
  "input",
2979
2979
  {
2980
2980
  type: "radio",
2981
2981
  name: o,
2982
- value: s.value,
2982
+ value: n.value,
2983
2983
  checked: c,
2984
2984
  onChange: (i) => a?.(i.target.value),
2985
- disabled: n,
2985
+ disabled: s,
2986
2986
  className: "sr-only peer"
2987
2987
  }
2988
2988
  ),
2989
2989
  /* @__PURE__ */ d(
2990
2990
  g.div,
2991
2991
  {
2992
- whileTap: { scale: n ? 1 : 0.95 },
2992
+ whileTap: { scale: s ? 1 : 0.95 },
2993
2993
  className: u(
2994
2994
  "px-4 py-2.5 rounded-full border-2 transition-all duration-200",
2995
2995
  "flex items-center gap-2 min-h-[2.75rem]",
@@ -2998,14 +2998,14 @@ const Rt = ({
2998
2998
  c ? "bg-primary border-primary text-white" : "bg-background border-border text-primary hover:border-border-dark"
2999
2999
  ),
3000
3000
  children: [
3001
- s.icon && /* @__PURE__ */ r("span", { className: "flex-shrink-0", children: s.icon }),
3002
- /* @__PURE__ */ r("span", { className: "font-medium text-base", children: s.label })
3001
+ n.icon && /* @__PURE__ */ r("span", { className: "flex-shrink-0", children: n.icon }),
3002
+ /* @__PURE__ */ r("span", { className: "font-medium text-base", children: n.label })
3003
3003
  ]
3004
3004
  }
3005
3005
  )
3006
- ] }, s.value);
3006
+ ] }, n.value);
3007
3007
  }) }), bt = se(
3008
- ({ label: e, description: t, className: a, checked: o, onChange: n, ...l }, s) => /* @__PURE__ */ d("label", { className: "flex items-center justify-between gap-4 cursor-pointer group", children: [
3008
+ ({ label: e, description: t, className: a, checked: o, onChange: s, ...l }, n) => /* @__PURE__ */ d("label", { className: "flex items-center justify-between gap-4 cursor-pointer group", children: [
3009
3009
  (e || t) && /* @__PURE__ */ d("div", { className: "flex-1 space-y-0.5", children: [
3010
3010
  e && /* @__PURE__ */ r("div", { className: "text-base font-medium text-foreground", children: e }),
3011
3011
  t && /* @__PURE__ */ r("div", { className: "text-sm text-primary/70", children: t })
@@ -3014,10 +3014,10 @@ const Rt = ({
3014
3014
  /* @__PURE__ */ r(
3015
3015
  "input",
3016
3016
  {
3017
- ref: s,
3017
+ ref: n,
3018
3018
  type: "checkbox",
3019
3019
  onChange: (i) => {
3020
- n?.(i.target.checked);
3020
+ s?.(i.target.checked);
3021
3021
  },
3022
3022
  className: "sr-only peer",
3023
3023
  checked: o,
@@ -3053,18 +3053,18 @@ const At = ({
3053
3053
  onChange: t,
3054
3054
  min: a = 0,
3055
3055
  max: o = 100,
3056
- step: n = 1,
3056
+ step: s = 1,
3057
3057
  label: l,
3058
- showValue: s = !0,
3058
+ showValue: n = !0,
3059
3059
  unit: c = "%",
3060
3060
  disabled: i,
3061
3061
  className: m
3062
3062
  }) => {
3063
3063
  const [x, y] = D(!1), h = (e - a) / (o - a) * 100;
3064
3064
  return /* @__PURE__ */ d("div", { className: u("w-full space-y-2", m), children: [
3065
- (l || s) && /* @__PURE__ */ d("div", { className: "flex items-center justify-between", children: [
3065
+ (l || n) && /* @__PURE__ */ d("div", { className: "flex items-center justify-between", children: [
3066
3066
  l && /* @__PURE__ */ r("label", { className: "text-sm font-medium text-primary", children: l }),
3067
- s && /* @__PURE__ */ d("span", { className: "text-sm font-semibold text-primary", children: [
3067
+ n && /* @__PURE__ */ d("span", { className: "text-sm font-semibold text-primary", children: [
3068
3068
  e,
3069
3069
  c
3070
3070
  ] })
@@ -3086,7 +3086,7 @@ const At = ({
3086
3086
  type: "range",
3087
3087
  min: a,
3088
3088
  max: o,
3089
- step: n,
3089
+ step: s,
3090
3090
  value: e,
3091
3091
  onChange: (N) => t(Number(N.target.value)),
3092
3092
  onMouseDown: () => y(!0),
@@ -3118,17 +3118,17 @@ const At = ({
3118
3118
  value2: t,
3119
3119
  onChange: a,
3120
3120
  label1: o,
3121
- label2: n,
3121
+ label2: s,
3122
3122
  min: l = 0,
3123
- max: s = 100,
3123
+ max: n = 100,
3124
3124
  step: c = 1,
3125
3125
  unit: i = "%",
3126
3126
  disabled: m,
3127
3127
  className: x
3128
3128
  }) => {
3129
3129
  const y = e + t, h = y > 0 ? e / y * 100 : 50, N = y > 0 ? t / y * 100 : 50, k = (w) => {
3130
- const M = s - w;
3131
- a(w, Math.max(l, Math.min(s, M)));
3130
+ const M = n - w;
3131
+ a(w, Math.max(l, Math.min(n, M)));
3132
3132
  };
3133
3133
  return /* @__PURE__ */ d("div", { className: u("w-full space-y-3", x), children: [
3134
3134
  /* @__PURE__ */ d("div", { className: "space-y-2", children: [
@@ -3154,7 +3154,7 @@ const At = ({
3154
3154
  {
3155
3155
  type: "range",
3156
3156
  min: l,
3157
- max: s,
3157
+ max: n,
3158
3158
  step: c,
3159
3159
  value: e,
3160
3160
  onChange: (w) => k(Number(w.target.value)),
@@ -3166,7 +3166,7 @@ const At = ({
3166
3166
  ] }),
3167
3167
  /* @__PURE__ */ d("div", { className: "space-y-2", children: [
3168
3168
  /* @__PURE__ */ d("div", { className: "flex items-center justify-between", children: [
3169
- /* @__PURE__ */ r("label", { className: "text-sm font-medium text-primary", children: n }),
3169
+ /* @__PURE__ */ r("label", { className: "text-sm font-medium text-primary", children: s }),
3170
3170
  /* @__PURE__ */ d("span", { className: "text-sm font-semibold text-success", children: [
3171
3171
  t,
3172
3172
  i
@@ -3187,10 +3187,10 @@ const At = ({
3187
3187
  {
3188
3188
  type: "range",
3189
3189
  min: l,
3190
- max: s,
3190
+ max: n,
3191
3191
  step: c,
3192
3192
  value: t,
3193
- onChange: (w) => k(s - Number(w.target.value)),
3193
+ onChange: (w) => k(n - Number(w.target.value)),
3194
3194
  disabled: m,
3195
3195
  className: "absolute inset-0 w-full opacity-0 cursor-pointer disabled:cursor-not-allowed"
3196
3196
  }
@@ -3208,14 +3208,14 @@ const At = ({
3208
3208
  value: t,
3209
3209
  onChange: a,
3210
3210
  placeholder: o = "Select an option",
3211
- label: n,
3211
+ label: s,
3212
3212
  error: l,
3213
- searchable: s = !1,
3213
+ searchable: n = !1,
3214
3214
  clearable: c = !0,
3215
3215
  disabled: i,
3216
3216
  className: m
3217
3217
  }) => {
3218
- const [x, y] = D(!1), [h, N] = D(""), k = H(null), w = e.find((T) => T.value === t), M = s ? e.filter(
3218
+ const [x, y] = D(!1), [h, N] = D(""), k = H(null), w = e.find((T) => T.value === t), M = n ? e.filter(
3219
3219
  (T) => T.label.toLowerCase().includes(h.toLowerCase())
3220
3220
  ) : e;
3221
3221
  Z(() => {
@@ -3230,7 +3230,7 @@ const At = ({
3230
3230
  T.stopPropagation(), a("");
3231
3231
  };
3232
3232
  return /* @__PURE__ */ d("div", { ref: k, className: u("relative w-full", m), children: [
3233
- n && /* @__PURE__ */ r("label", { className: "block mb-1.5 text-sm font-medium text-foreground", children: n }),
3233
+ s && /* @__PURE__ */ r("label", { className: "block mb-1.5 text-sm font-medium text-foreground", children: s }),
3234
3234
  /* @__PURE__ */ d(
3235
3235
  "button",
3236
3236
  {
@@ -3284,7 +3284,7 @@ const At = ({
3284
3284
  transition: { duration: 0.2 },
3285
3285
  className: "absolute z-50 w-full mt-2 bg-background rounded-md border border-border shadow-lg max-h-80 overflow-hidden",
3286
3286
  children: [
3287
- s && /* @__PURE__ */ r("div", { className: "p-2 border-b border-border", children: /* @__PURE__ */ d("div", { className: "relative", children: [
3287
+ n && /* @__PURE__ */ r("div", { className: "p-2 border-b border-border", children: /* @__PURE__ */ d("div", { className: "relative", children: [
3288
3288
  /* @__PURE__ */ r(Fe, { className: "absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-primary/50" }),
3289
3289
  /* @__PURE__ */ r(
3290
3290
  "input",
@@ -3340,9 +3340,9 @@ const At = ({
3340
3340
  value: t,
3341
3341
  onChange: a,
3342
3342
  placeholder: o = "Select an option",
3343
- label: n,
3343
+ label: s,
3344
3344
  error: l,
3345
- hint: s,
3345
+ hint: n,
3346
3346
  searchable: c = !1,
3347
3347
  clearable: i = !0,
3348
3348
  disabled: m,
@@ -3364,8 +3364,8 @@ const At = ({
3364
3364
  S.stopPropagation(), a("");
3365
3365
  };
3366
3366
  return /* @__PURE__ */ d("div", { ref: h, className: u("w-full space-y-1.5", y), children: [
3367
- n && /* @__PURE__ */ d("label", { className: "block text-sm font-medium text-foreground", children: [
3368
- n,
3367
+ s && /* @__PURE__ */ d("label", { className: "block text-sm font-medium text-foreground", children: [
3368
+ s,
3369
3369
  x && /* @__PURE__ */ r("span", { className: "text-error ml-1", children: "*" })
3370
3370
  ] }),
3371
3371
  /* @__PURE__ */ d("div", { ref: j, className: "relative", children: [
@@ -3485,7 +3485,7 @@ const At = ({
3485
3485
  children: l
3486
3486
  }
3487
3487
  ),
3488
- s && !l && /* @__PURE__ */ r("p", { className: "text-sm text-primary/70", children: s })
3488
+ n && !l && /* @__PURE__ */ r("p", { className: "text-sm text-primary/70", children: n })
3489
3489
  ] });
3490
3490
  }
3491
3491
  );
@@ -3495,9 +3495,9 @@ const Dt = ({
3495
3495
  onChange: t,
3496
3496
  label: a,
3497
3497
  placeholder: o = "Select date",
3498
- error: n,
3498
+ error: s,
3499
3499
  disabled: l,
3500
- minDate: s,
3500
+ minDate: n,
3501
3501
  maxDate: c,
3502
3502
  className: i
3503
3503
  }) => {
@@ -3536,7 +3536,7 @@ const Dt = ({
3536
3536
  h(new Date(y.getFullYear(), y.getMonth() + 1, 1));
3537
3537
  }, T = (C) => {
3538
3538
  t(C), x(!1);
3539
- }, F = (C) => !!(s && C < s || c && C > c), P = (C, A) => !C || !A ? !1 : C.getDate() === A.getDate() && C.getMonth() === A.getMonth() && C.getFullYear() === A.getFullYear(), S = (C) => C ? P(C, /* @__PURE__ */ new Date()) : !1, O = (C) => C ? C.toLocaleDateString("en-US", {
3539
+ }, F = (C) => !!(n && C < n || c && C > c), P = (C, A) => !C || !A ? !1 : C.getDate() === A.getDate() && C.getMonth() === A.getMonth() && C.getFullYear() === A.getFullYear(), S = (C) => C ? P(C, /* @__PURE__ */ new Date()) : !1, O = (C) => C ? C.toLocaleDateString("en-US", {
3540
3540
  year: "numeric",
3541
3541
  month: "short",
3542
3542
  day: "numeric"
@@ -3555,8 +3555,8 @@ const Dt = ({
3555
3555
  "focus:outline-none focus:ring-2 focus:ring-primary",
3556
3556
  "disabled:bg-secondary disabled:cursor-not-allowed",
3557
3557
  "touch-target",
3558
- n && "border-error",
3559
- !n && "border-border",
3558
+ s && "border-error",
3559
+ !s && "border-border",
3560
3560
  m && "ring-2 ring-primary"
3561
3561
  ),
3562
3562
  children: [
@@ -3644,13 +3644,13 @@ const Dt = ({
3644
3644
  ]
3645
3645
  }
3646
3646
  ) }),
3647
- n && /* @__PURE__ */ r(
3647
+ s && /* @__PURE__ */ r(
3648
3648
  g.p,
3649
3649
  {
3650
3650
  initial: { opacity: 0, y: -5 },
3651
3651
  animate: { opacity: 1, y: 0 },
3652
3652
  className: "mt-1.5 text-sm text-error",
3653
- children: n
3653
+ children: s
3654
3654
  }
3655
3655
  )
3656
3656
  ] });
@@ -3659,10 +3659,10 @@ const Dt = ({
3659
3659
  variant: t = "default",
3660
3660
  padding: a = "md",
3661
3661
  className: o,
3662
- onClick: n,
3662
+ onClick: s,
3663
3663
  hover: l = !1
3664
3664
  }) => {
3665
- const s = {
3665
+ const n = {
3666
3666
  default: "bg-background border border-border",
3667
3667
  outlined: "bg-transparent border-2 border-border-dark",
3668
3668
  elevated: "bg-background border-2 border-border shadow-card"
@@ -3671,23 +3671,23 @@ const Dt = ({
3671
3671
  sm: "p-3",
3672
3672
  md: "p-4 sm:p-6",
3673
3673
  lg: "p-6 sm:p-8"
3674
- }, i = n ? g.button : g.div;
3674
+ }, i = s ? g.button : g.div;
3675
3675
  return /* @__PURE__ */ r(
3676
3676
  i,
3677
3677
  {
3678
3678
  initial: { opacity: 0, y: 20 },
3679
3679
  animate: { opacity: 1, y: 0 },
3680
3680
  transition: { duration: 0.3 },
3681
- whileHover: l || n ? { y: -2, boxShadow: "0 10px 15px -3px rgb(0 0 0 / 0.1)" } : void 0,
3682
- whileTap: n ? { scale: 0.98 } : void 0,
3681
+ whileHover: l || s ? { y: -2, boxShadow: "0 10px 15px -3px rgb(0 0 0 / 0.1)" } : void 0,
3682
+ whileTap: s ? { scale: 0.98 } : void 0,
3683
3683
  className: u(
3684
3684
  "rounded-lg transition-all duration-200",
3685
- s[t],
3685
+ n[t],
3686
3686
  c[a],
3687
- n && "cursor-pointer w-full text-left",
3687
+ s && "cursor-pointer w-full text-left",
3688
3688
  o
3689
3689
  ),
3690
- onClick: n,
3690
+ onClick: s,
3691
3691
  children: e
3692
3692
  }
3693
3693
  );
@@ -3696,14 +3696,14 @@ const Dt = ({
3696
3696
  onClose: t,
3697
3697
  children: a,
3698
3698
  title: o,
3699
- position: n = "right",
3699
+ position: s = "right",
3700
3700
  className: l
3701
3701
  }) => (Z(() => {
3702
- const s = (c) => {
3702
+ const n = (c) => {
3703
3703
  c.key === "Escape" && t();
3704
3704
  };
3705
- return e && (document.addEventListener("keydown", s), document.body.style.overflow = "hidden"), () => {
3706
- document.removeEventListener("keydown", s), document.body.style.overflow = "unset";
3705
+ return e && (document.addEventListener("keydown", n), document.body.style.overflow = "hidden"), () => {
3706
+ document.removeEventListener("keydown", n), document.body.style.overflow = "unset";
3707
3707
  };
3708
3708
  }, [e, t]), /* @__PURE__ */ r(Q, { children: e && /* @__PURE__ */ d(ae, { children: [
3709
3709
  /* @__PURE__ */ r(
@@ -3720,13 +3720,13 @@ const Dt = ({
3720
3720
  /* @__PURE__ */ d(
3721
3721
  g.div,
3722
3722
  {
3723
- initial: { x: n === "left" ? "-100%" : "100%" },
3723
+ initial: { x: s === "left" ? "-100%" : "100%" },
3724
3724
  animate: { x: 0 },
3725
- exit: { x: n === "left" ? "-100%" : "100%" },
3725
+ exit: { x: s === "left" ? "-100%" : "100%" },
3726
3726
  transition: { type: "spring", damping: 30, stiffness: 300 },
3727
3727
  className: u(
3728
3728
  "fixed top-0 z-50 h-full w-[400px] sm:w-[480px] bg-background shadow-xl",
3729
- n === "left" ? "left-0 border-r" : "right-0 border-l",
3729
+ s === "left" ? "left-0 border-r" : "right-0 border-l",
3730
3730
  "border-border",
3731
3731
  l
3732
3732
  ),
@@ -3752,10 +3752,10 @@ const Dt = ({
3752
3752
  onClose: t,
3753
3753
  children: a,
3754
3754
  title: o,
3755
- size: n = "md",
3755
+ size: s = "md",
3756
3756
  className: l
3757
3757
  }) => {
3758
- const s = H(null);
3758
+ const n = H(null);
3759
3759
  Z(() => {
3760
3760
  const i = (m) => {
3761
3761
  m.key === "Escape" && t();
@@ -3781,14 +3781,14 @@ const Dt = ({
3781
3781
  children: /* @__PURE__ */ d(
3782
3782
  g.div,
3783
3783
  {
3784
- ref: s,
3784
+ ref: n,
3785
3785
  initial: { opacity: 0, scale: 0.95 },
3786
3786
  animate: { opacity: 1, scale: 1 },
3787
3787
  exit: { opacity: 0, scale: 0.95 },
3788
3788
  transition: { duration: 0.2 },
3789
3789
  className: u(
3790
3790
  "bg-background border border-border rounded-lg shadow-2xl w-full max-h-[90vh] overflow-hidden flex flex-col",
3791
- c[n],
3791
+ c[s],
3792
3792
  l
3793
3793
  ),
3794
3794
  children: [
@@ -3821,7 +3821,7 @@ const Dt = ({
3821
3821
  onClose: t,
3822
3822
  title: a,
3823
3823
  children: o,
3824
- showCloseButton: n = !0,
3824
+ showCloseButton: s = !0,
3825
3825
  className: l
3826
3826
  }) => (Z(() => (e ? document.body.style.overflow = "hidden" : document.body.style.overflow = "unset", () => {
3827
3827
  document.body.style.overflow = "unset";
@@ -3851,9 +3851,9 @@ const Dt = ({
3851
3851
  ),
3852
3852
  children: [
3853
3853
  /* @__PURE__ */ r("div", { className: "flex justify-center pt-3 pb-2", children: /* @__PURE__ */ r("div", { className: "w-12 h-1.5 bg-border-dark rounded-full" }) }),
3854
- (a || n) && /* @__PURE__ */ d("div", { className: "flex items-center justify-between px-6 py-4 border-b border-border", children: [
3854
+ (a || s) && /* @__PURE__ */ d("div", { className: "flex items-center justify-between px-6 py-4 border-b border-border", children: [
3855
3855
  a && /* @__PURE__ */ r("h2", { className: "text-lg font-semibold text-foreground", children: a }),
3856
- n && /* @__PURE__ */ r(
3856
+ s && /* @__PURE__ */ r(
3857
3857
  "button",
3858
3858
  {
3859
3859
  onClick: t,
@@ -3872,13 +3872,13 @@ function Vt({
3872
3872
  columns: t,
3873
3873
  loading: a = !1,
3874
3874
  onRowClick: o,
3875
- keyExtractor: n,
3875
+ keyExtractor: s,
3876
3876
  className: l
3877
3877
  }) {
3878
- const [s, c] = D(null), [i, m] = D("asc"), x = (h) => {
3879
- s === h ? m(i === "asc" ? "desc" : "asc") : (c(h), m("asc"));
3880
- }, y = s ? [...e].sort((h, N) => {
3881
- const k = h[s], w = N[s];
3878
+ const [n, c] = D(null), [i, m] = D("asc"), x = (h) => {
3879
+ n === h ? m(i === "asc" ? "desc" : "asc") : (c(h), m("asc"));
3880
+ }, y = n ? [...e].sort((h, N) => {
3881
+ const k = h[n], w = N[n];
3882
3882
  return k < w ? i === "asc" ? -1 : 1 : k > w ? i === "asc" ? 1 : -1 : 0;
3883
3883
  }) : e;
3884
3884
  return a ? /* @__PURE__ */ r("div", { className: u("border border-border rounded-lg overflow-hidden", l), children: /* @__PURE__ */ r("div", { className: "overflow-x-auto", children: /* @__PURE__ */ d("table", { className: "w-full", children: [
@@ -3903,7 +3903,7 @@ function Vt({
3903
3903
  onClick: () => h.sortable && x(h.key),
3904
3904
  children: /* @__PURE__ */ d("div", { className: "flex items-center gap-2", children: [
3905
3905
  h.header,
3906
- h.sortable && /* @__PURE__ */ r("span", { className: "text-primary/50 hover:text-primary transition-colors", children: s === h.key ? i === "asc" ? /* @__PURE__ */ r(nr, { className: "w-4 h-4" }) : /* @__PURE__ */ r(ir, { className: "w-4 h-4" }) : /* @__PURE__ */ r(lr, { className: "w-4 h-4" }) })
3906
+ h.sortable && /* @__PURE__ */ r("span", { className: "text-primary/50 hover:text-primary transition-colors", children: n === h.key ? i === "asc" ? /* @__PURE__ */ r(nr, { className: "w-4 h-4" }) : /* @__PURE__ */ r(ir, { className: "w-4 h-4" }) : /* @__PURE__ */ r(lr, { className: "w-4 h-4" }) })
3907
3907
  ] })
3908
3908
  },
3909
3909
  N
@@ -3933,7 +3933,7 @@ function Vt({
3933
3933
  w
3934
3934
  ))
3935
3935
  },
3936
- n(h)
3936
+ s(h)
3937
3937
  )) })
3938
3938
  ] }) })
3939
3939
  }
@@ -3944,7 +3944,7 @@ const Wt = ({
3944
3944
  totalPages: t,
3945
3945
  onPageChange: a,
3946
3946
  totalItems: o,
3947
- itemsPerPage: n,
3947
+ itemsPerPage: s,
3948
3948
  className: l
3949
3949
  }) => {
3950
3950
  const c = Array.from({ length: t }, (i, m) => m + 1).slice(
@@ -3959,12 +3959,12 @@ const Wt = ({
3959
3959
  transition: { duration: 0.3 },
3960
3960
  className: u("flex items-center justify-between gap-4 flex-wrap", l),
3961
3961
  children: [
3962
- /* @__PURE__ */ r("div", { className: "text-sm text-foreground/70", children: o && n && /* @__PURE__ */ d("span", { children: [
3962
+ /* @__PURE__ */ r("div", { className: "text-sm text-foreground/70", children: o && s && /* @__PURE__ */ d("span", { children: [
3963
3963
  "Showing ",
3964
- Math.min((e - 1) * n + 1, o),
3964
+ Math.min((e - 1) * s + 1, o),
3965
3965
  " to",
3966
3966
  " ",
3967
- Math.min(e * n, o),
3967
+ Math.min(e * s, o),
3968
3968
  " of ",
3969
3969
  o,
3970
3970
  " results"
@@ -4043,9 +4043,9 @@ const Wt = ({
4043
4043
  onClick: t,
4044
4044
  label: a,
4045
4045
  actions: o,
4046
- variant: n = "primary",
4046
+ variant: s = "primary",
4047
4047
  position: l = "bottom-right",
4048
- disabled: s,
4048
+ disabled: n,
4049
4049
  className: c
4050
4050
  }) => {
4051
4051
  const [i, m] = D(!1), x = {
@@ -4105,15 +4105,15 @@ const Wt = ({
4105
4105
  /* @__PURE__ */ d(
4106
4106
  g.button,
4107
4107
  {
4108
- whileTap: { scale: s ? 1 : 0.9 },
4109
- whileHover: { scale: s ? 1 : 1.05 },
4108
+ whileTap: { scale: n ? 1 : 0.9 },
4109
+ whileHover: { scale: n ? 1 : 1.05 },
4110
4110
  onClick: N,
4111
- disabled: s,
4111
+ disabled: n,
4112
4112
  className: u(
4113
4113
  "z-30 rounded-full p-4 transition-all duration-200",
4114
4114
  "disabled:opacity-50 disabled:cursor-not-allowed",
4115
4115
  "flex items-center gap-2",
4116
- y[n],
4116
+ y[s],
4117
4117
  a ? "px-6" : "w-16 h-16 justify-center",
4118
4118
  i && "rotate-45"
4119
4119
  ),
@@ -4131,8 +4131,8 @@ const Wt = ({
4131
4131
  }) => {
4132
4132
  const o = e[t];
4133
4133
  return /* @__PURE__ */ d("div", { className: u("w-full", a), children: [
4134
- /* @__PURE__ */ r("div", { className: "hidden md:block", children: /* @__PURE__ */ r("div", { className: "relative flex items-center mb-2", children: e.map((n, l) => {
4135
- const s = l < t, c = l === t, i = l > t;
4134
+ /* @__PURE__ */ r("div", { className: "hidden md:block", children: /* @__PURE__ */ r("div", { className: "relative flex items-center mb-2", children: e.map((s, l) => {
4135
+ const n = l < t, c = l === t, i = l > t;
4136
4136
  return /* @__PURE__ */ d(Le.Fragment, { children: [
4137
4137
  /* @__PURE__ */ d("div", { className: "flex flex-col items-center relative z-10", children: [
4138
4138
  /* @__PURE__ */ r(
@@ -4140,17 +4140,16 @@ const Wt = ({
4140
4140
  {
4141
4141
  initial: !1,
4142
4142
  animate: {
4143
- scale: c ? 1.05 : 1,
4144
- backgroundColor: s || c ? "var(--color-primary)" : "var(--color-border)"
4143
+ scale: c ? 1.05 : 1
4145
4144
  },
4146
4145
  className: u(
4147
4146
  "w-12 h-12 rounded-full flex items-center justify-center",
4148
4147
  "font-semibold text-base transition-all duration-300",
4149
- (s || c) && "text-white shadow-lg",
4150
- i && "text-primary/50",
4151
- "ring-4 ring-white"
4148
+ "ring-4 ring-white",
4149
+ (n || c) && "bg-primary text-white shadow-lg",
4150
+ i && "bg-border text-muted-foreground"
4152
4151
  ),
4153
- children: s ? /* @__PURE__ */ r(Oe, { className: "w-6 h-6 stroke-[3]" }) : /* @__PURE__ */ r("span", { children: l + 1 })
4152
+ children: n ? /* @__PURE__ */ r(Oe, { className: "w-6 h-6 stroke-[3]" }) : /* @__PURE__ */ r("span", { children: l + 1 })
4154
4153
  }
4155
4154
  ),
4156
4155
  /* @__PURE__ */ d("div", { className: "mt-3 text-center max-w-[120px]", children: [
@@ -4160,22 +4159,22 @@ const Wt = ({
4160
4159
  className: u(
4161
4160
  "text-sm font-semibold block",
4162
4161
  c && "text-primary",
4163
- s && "text-primary",
4162
+ n && "text-primary",
4164
4163
  i && "text-primary/50"
4165
4164
  ),
4166
- children: n.label
4165
+ children: s.label
4167
4166
  }
4168
4167
  ),
4169
- n.description && /* @__PURE__ */ r(
4168
+ s.description && /* @__PURE__ */ r(
4170
4169
  "p",
4171
4170
  {
4172
4171
  className: u(
4173
4172
  "text-xs mt-1 leading-tight",
4174
4173
  c && "text-primary",
4175
- s && "text-primary/70",
4174
+ n && "text-primary/70",
4176
4175
  i && "text-primary/50"
4177
4176
  ),
4178
- children: n.description
4177
+ children: s.description
4179
4178
  }
4180
4179
  )
4181
4180
  ] })
@@ -4194,20 +4193,20 @@ const Wt = ({
4194
4193
  ] }, l);
4195
4194
  }) }) }),
4196
4195
  /* @__PURE__ */ d("div", { className: "md:hidden", children: [
4197
- /* @__PURE__ */ r("div", { className: "flex items-center justify-center gap-2 mb-3", children: e.map((n, l) => {
4198
- const s = l < t, c = l === t;
4196
+ /* @__PURE__ */ r("div", { className: "flex items-center justify-center gap-2 mb-3", children: e.map((s, l) => {
4197
+ const n = l < t, c = l === t;
4199
4198
  return /* @__PURE__ */ r(
4200
4199
  g.div,
4201
4200
  {
4202
4201
  initial: !1,
4203
4202
  animate: {
4204
4203
  scale: c ? 1.2 : 1,
4205
- backgroundColor: s || c ? "var(--color-primary)" : "var(--color-border-dark)"
4204
+ backgroundColor: n || c ? "var(--color-primary)" : "var(--color-border-dark)"
4206
4205
  },
4207
4206
  className: u(
4208
4207
  "rounded-full transition-all duration-300",
4209
4208
  c ? "w-3 h-3" : "w-2 h-2",
4210
- (s || c) && "shadow-sm"
4209
+ (n || c) && "shadow-sm"
4211
4210
  )
4212
4211
  },
4213
4212
  l
@@ -4231,7 +4230,7 @@ const Wt = ({
4231
4230
  variant: t = "default",
4232
4231
  size: a = "md",
4233
4232
  className: o,
4234
- dot: n = !1
4233
+ dot: s = !1
4235
4234
  }) => {
4236
4235
  const l = {
4237
4236
  default: "bg-secondary text-primary border border-border",
@@ -4240,7 +4239,7 @@ const Wt = ({
4240
4239
  warning: "bg-warning/10 text-warning border border-warning/20",
4241
4240
  danger: "bg-error/10 text-error border border-error/20",
4242
4241
  info: "bg-info/10 text-info border border-info/20"
4243
- }, s = {
4242
+ }, n = {
4244
4243
  sm: "px-2 py-0.5 text-xs",
4245
4244
  md: "px-2.5 py-1 text-sm",
4246
4245
  lg: "px-3 py-1.5 text-base"
@@ -4261,11 +4260,11 @@ const Wt = ({
4261
4260
  className: u(
4262
4261
  "inline-flex items-center gap-1.5 rounded-lg font-medium",
4263
4262
  l[t],
4264
- s[a],
4263
+ n[a],
4265
4264
  o
4266
4265
  ),
4267
4266
  children: [
4268
- n && /* @__PURE__ */ r("span", { className: u("w-1.5 h-1.5 rounded-full", c[t]) }),
4267
+ s && /* @__PURE__ */ r("span", { className: u("w-1.5 h-1.5 rounded-full", c[t]) }),
4269
4268
  e
4270
4269
  ]
4271
4270
  }
@@ -4294,7 +4293,7 @@ const Wt = ({
4294
4293
  count: t,
4295
4294
  className: a
4296
4295
  }) => {
4297
- const n = {
4296
+ const s = {
4298
4297
  synced: {
4299
4298
  icon: /* @__PURE__ */ r(Te, { className: "w-4 h-4" }),
4300
4299
  label: "Synced",
@@ -4324,12 +4323,12 @@ const Wt = ({
4324
4323
  className: u(
4325
4324
  "inline-flex items-center gap-2 px-3 py-1.5 rounded-full",
4326
4325
  "text-sm font-medium shadow-sm",
4327
- n.color,
4326
+ s.color,
4328
4327
  a
4329
4328
  ),
4330
4329
  children: [
4331
- n.icon,
4332
- /* @__PURE__ */ r("span", { children: n.label })
4330
+ s.icon,
4331
+ /* @__PURE__ */ r("span", { children: s.label })
4333
4332
  ]
4334
4333
  }
4335
4334
  );
@@ -4394,7 +4393,7 @@ const Ze = er(void 0), Kt = () => {
4394
4393
  "bottom-center": "bottom-4 left-1/2 -translate-x-1/2",
4395
4394
  "bottom-right": "bottom-4 right-4"
4396
4395
  }, kt = ({ toast: e, onRemove: t }) => {
4397
- const a = e.variant || "default", o = vt[a];
4396
+ const a = e.variant || "default", o = vt[a], s = typeof e.message == "string" ? e.message : String(e.message);
4398
4397
  return /* @__PURE__ */ d(
4399
4398
  g.div,
4400
4399
  {
@@ -4410,7 +4409,7 @@ const Ze = er(void 0), Kt = () => {
4410
4409
  children: [
4411
4410
  o && /* @__PURE__ */ r(o, { className: "w-5 h-5 flex-shrink-0 mt-0.5" }),
4412
4411
  /* @__PURE__ */ d("div", { className: "flex-1 min-w-0", children: [
4413
- /* @__PURE__ */ r("p", { className: "text-sm font-medium leading-relaxed", children: e.message }),
4412
+ /* @__PURE__ */ r("p", { className: "text-sm font-medium leading-relaxed", children: s }),
4414
4413
  e.action && /* @__PURE__ */ r(
4415
4414
  "button",
4416
4415
  {
@@ -4437,20 +4436,24 @@ const Ze = er(void 0), Kt = () => {
4437
4436
  position: t = "top-right",
4438
4437
  maxToasts: a = 5
4439
4438
  }) => {
4440
- const [o, n] = D([]), l = ze(
4439
+ const [o, s] = D([]), l = ze((c) => {
4440
+ s((i) => i.filter((m) => m.id !== c));
4441
+ }, []), n = ze(
4441
4442
  (c) => {
4443
+ if (typeof c.message != "string") {
4444
+ console.error("Toast message must be a string, received:", c.message);
4445
+ return;
4446
+ }
4442
4447
  const i = Math.random().toString(36).substring(2, 9), m = c.duration ?? 5e3;
4443
- n((x) => [...x, { ...c, id: i }].slice(-a)), m > 0 && setTimeout(() => {
4444
- s(i);
4448
+ s((x) => [...x, { ...c, id: i }].slice(-a)), m > 0 && setTimeout(() => {
4449
+ l(i);
4445
4450
  }, m);
4446
4451
  },
4447
- [a]
4448
- ), s = ze((c) => {
4449
- n((i) => i.filter((m) => m.id !== c));
4450
- }, []);
4451
- return /* @__PURE__ */ d(Ze.Provider, { value: { toasts: o, addToast: l, removeToast: s }, children: [
4452
+ [a, l]
4453
+ );
4454
+ return /* @__PURE__ */ d(Ze.Provider, { value: { toasts: o, addToast: n, removeToast: l }, children: [
4452
4455
  e,
4453
- /* @__PURE__ */ r("div", { className: u("fixed z-[100] flex flex-col gap-2", Nt[t]), children: /* @__PURE__ */ r(Q, { mode: "popLayout", children: o.map((c) => /* @__PURE__ */ r(kt, { toast: c, onRemove: s }, c.id)) }) })
4456
+ /* @__PURE__ */ r("div", { className: u("fixed z-[100] flex flex-col gap-2", Nt[t]), children: /* @__PURE__ */ r(Q, { mode: "popLayout", children: o.map((c) => /* @__PURE__ */ r(kt, { toast: c, onRemove: l }, c.id)) }) })
4454
4457
  ] });
4455
4458
  };
4456
4459
  Ct.displayName = "ToastProvider";
@@ -4459,10 +4462,10 @@ const Xt = ({
4459
4462
  onRemove: t,
4460
4463
  preview: a,
4461
4464
  label: o = "Take Photo",
4462
- disabled: n,
4465
+ disabled: s,
4463
4466
  className: l
4464
4467
  }) => {
4465
- const s = H(null), c = (i) => {
4468
+ const n = H(null), c = (i) => {
4466
4469
  const m = i.target.files?.[0];
4467
4470
  m && e(m);
4468
4471
  };
@@ -4489,9 +4492,9 @@ const Xt = ({
4489
4492
  g.button,
4490
4493
  {
4491
4494
  type: "button",
4492
- whileTap: { scale: n ? 1 : 0.98 },
4493
- onClick: () => s.current?.click(),
4494
- disabled: n,
4495
+ whileTap: { scale: s ? 1 : 0.98 },
4496
+ onClick: () => n.current?.click(),
4497
+ disabled: s,
4495
4498
  className: u(
4496
4499
  "w-full p-4 rounded-lg border-2 border-border",
4497
4500
  "flex items-center justify-center gap-3",
@@ -4508,13 +4511,13 @@ const Xt = ({
4508
4511
  /* @__PURE__ */ r(
4509
4512
  "input",
4510
4513
  {
4511
- ref: s,
4514
+ ref: n,
4512
4515
  type: "file",
4513
4516
  accept: "image/*",
4514
4517
  capture: "environment",
4515
4518
  onChange: c,
4516
4519
  className: "hidden",
4517
- disabled: n
4520
+ disabled: s
4518
4521
  }
4519
4522
  )
4520
4523
  ] });
@@ -4523,10 +4526,10 @@ const Xt = ({
4523
4526
  accept: t = "*/*",
4524
4527
  multiple: a = !1,
4525
4528
  label: o = "Upload Files",
4526
- disabled: n,
4529
+ disabled: s,
4527
4530
  className: l
4528
4531
  }) => {
4529
- const s = H(null), c = (i) => {
4532
+ const n = H(null), c = (i) => {
4530
4533
  i && e(Array.from(i));
4531
4534
  };
4532
4535
  return /* @__PURE__ */ d("div", { className: u("w-full", l), children: [
@@ -4535,9 +4538,9 @@ const Xt = ({
4535
4538
  g.button,
4536
4539
  {
4537
4540
  type: "button",
4538
- whileTap: { scale: n ? 1 : 0.98 },
4539
- onClick: () => !n && s.current?.click(),
4540
- disabled: n,
4541
+ whileTap: { scale: s ? 1 : 0.98 },
4542
+ onClick: () => !s && n.current?.click(),
4543
+ disabled: s,
4541
4544
  className: u(
4542
4545
  "w-full p-4 rounded-lg border-2 border-border",
4543
4546
  "flex items-center justify-center gap-3",
@@ -4554,13 +4557,13 @@ const Xt = ({
4554
4557
  /* @__PURE__ */ r(
4555
4558
  "input",
4556
4559
  {
4557
- ref: s,
4560
+ ref: n,
4558
4561
  type: "file",
4559
4562
  accept: t,
4560
4563
  multiple: a,
4561
4564
  onChange: (i) => c(i.target.files),
4562
4565
  className: "hidden",
4563
- disabled: n
4566
+ disabled: s
4564
4567
  }
4565
4568
  )
4566
4569
  ] });
@@ -4570,9 +4573,9 @@ const Xt = ({
4570
4573
  maxDuration: a = 300,
4571
4574
  // 5 minutes default
4572
4575
  disabled: o,
4573
- className: n
4576
+ className: s
4574
4577
  }) => {
4575
- const [l, s] = D(!1), [c, i] = D(!1), [m, x] = D(0), [y, h] = D(null), N = H(null), k = H([]), w = H(null), M = async () => {
4578
+ const [l, n] = D(!1), [c, i] = D(!1), [m, x] = D(0), [y, h] = D(null), N = H(null), k = H([]), w = H(null), M = async () => {
4576
4579
  try {
4577
4580
  const S = await navigator.mediaDevices.getUserMedia({ audio: !0 }), O = new MediaRecorder(S);
4578
4581
  N.current = O, k.current = [], O.ondataavailable = (f) => {
@@ -4580,7 +4583,7 @@ const Xt = ({
4580
4583
  }, O.onstop = () => {
4581
4584
  const f = new Blob(k.current, { type: "audio/webm" }), C = URL.createObjectURL(f);
4582
4585
  h(C), e(f), S.getTracks().forEach((A) => A.stop());
4583
- }, O.start(), s(!0), x(0), w.current = setInterval(() => {
4586
+ }, O.start(), n(!0), x(0), w.current = setInterval(() => {
4584
4587
  x((f) => f >= a ? (T(), f) : f + 1);
4585
4588
  }, 1e3);
4586
4589
  } catch (S) {
@@ -4593,14 +4596,14 @@ const Xt = ({
4593
4596
  x((S) => Math.min(S + 1, a));
4594
4597
  }, 1e3));
4595
4598
  }, T = () => {
4596
- N.current && (N.current.stop(), s(!1), i(!1), w.current && (clearInterval(w.current), w.current = null));
4599
+ N.current && (N.current.stop(), n(!1), i(!1), w.current && (clearInterval(w.current), w.current = null));
4597
4600
  }, F = () => {
4598
4601
  h(null), x(0);
4599
4602
  }, P = (S) => {
4600
4603
  const O = Math.floor(S / 60), f = S % 60;
4601
4604
  return `${O.toString().padStart(2, "0")}:${f.toString().padStart(2, "0")}`;
4602
4605
  };
4603
- return /* @__PURE__ */ d("div", { className: u("w-full", n), children: [
4606
+ return /* @__PURE__ */ d("div", { className: u("w-full", s), children: [
4604
4607
  t && /* @__PURE__ */ r("label", { className: "block mb-2 text-sm font-medium text-primary", children: t }),
4605
4608
  /* @__PURE__ */ d("div", { className: "p-4 md:p-6 bg-background rounded-lg border-2 border-border space-y-4", children: [
4606
4609
  !y && /* @__PURE__ */ d("div", { className: "flex flex-col items-center gap-4", children: [
@@ -4685,13 +4688,13 @@ const Xt = ({
4685
4688
  onRemove: t,
4686
4689
  onView: a,
4687
4690
  columns: o = 3,
4688
- className: n
4691
+ className: s
4689
4692
  }) => {
4690
4693
  const l = {
4691
4694
  2: "grid-cols-2",
4692
4695
  3: "grid-cols-3",
4693
4696
  4: "grid-cols-4"
4694
- }, s = (i) => {
4697
+ }, n = (i) => {
4695
4698
  if (!i) return "";
4696
4699
  const m = i / 1024;
4697
4700
  return m < 1024 ? `${m.toFixed(1)} KB` : `${(m / 1024).toFixed(1)} MB`;
@@ -4705,7 +4708,7 @@ const Xt = ({
4705
4708
  return /* @__PURE__ */ r(vr, { className: "w-8 h-8 text-primary" });
4706
4709
  }
4707
4710
  };
4708
- return e.length === 0 ? null : /* @__PURE__ */ r("div", { className: u("w-full", n), children: /* @__PURE__ */ r("div", { className: u("grid gap-3", l[o]), children: e.map((i) => /* @__PURE__ */ d(
4711
+ return e.length === 0 ? null : /* @__PURE__ */ r("div", { className: u("w-full", s), children: /* @__PURE__ */ r("div", { className: u("grid gap-3", l[o]), children: e.map((i) => /* @__PURE__ */ d(
4709
4712
  g.div,
4710
4713
  {
4711
4714
  initial: { opacity: 0, scale: 0.8 },
@@ -4750,7 +4753,7 @@ const Xt = ({
4750
4753
  ),
4751
4754
  i.size && /* @__PURE__ */ d("div", { className: "absolute bottom-0 left-0 right-0 bg-black/60 text-white text-xs p-1.5 backdrop-blur-sm", children: [
4752
4755
  /* @__PURE__ */ r("p", { className: "truncate", children: i.name }),
4753
- /* @__PURE__ */ r("p", { className: "text-white/70", children: s(i.size) })
4756
+ /* @__PURE__ */ r("p", { className: "text-white/70", children: n(i.size) })
4754
4757
  ] })
4755
4758
  ]
4756
4759
  },
@@ -4761,9 +4764,9 @@ const Xt = ({
4761
4764
  showHeart: t = !0,
4762
4765
  href: a,
4763
4766
  position: o = "fixed",
4764
- backgroundColor: n = "bg-gray-900",
4767
+ backgroundColor: s = "bg-gray-900",
4765
4768
  textColor: l = "text-gray-400",
4766
- className: s = ""
4769
+ className: n = ""
4767
4770
  }) => {
4768
4771
  const c = t ? /* @__PURE__ */ d(ae, { children: [
4769
4772
  "Built with ",
@@ -4783,7 +4786,7 @@ const Xt = ({
4783
4786
  return /* @__PURE__ */ r(
4784
4787
  "div",
4785
4788
  {
4786
- className: `${o} bottom-0 left-0 right-0 ${n} ${s}`,
4789
+ className: `${o} bottom-0 left-0 right-0 ${s} ${n}`,
4787
4790
  style: { zIndex: 40 },
4788
4791
  children: /* @__PURE__ */ r("div", { className: "flex items-center justify-center py-2 px-4", children: i })
4789
4792
  }