@neuctra/ui 0.2.9 → 0.2.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (82) hide show
  1. package/dist/index.cjs.js +109 -140
  2. package/dist/index.cjs.js.map +1 -1
  3. package/dist/index.es.js +1563 -2402
  4. package/dist/index.es.js.map +1 -1
  5. package/dist/{components → types/components}/basic/Alert.d.ts +3 -2
  6. package/dist/{components → types/components}/basic/Avatar.d.ts +1 -0
  7. package/dist/{components → types/components}/basic/Badge.d.ts +1 -2
  8. package/dist/{components → types/components}/basic/Button.d.ts +2 -2
  9. package/dist/types/components/basic/Container.d.ts +15 -0
  10. package/dist/{components → types/components}/basic/Input.d.ts +1 -1
  11. package/dist/types/components/basic/Tabs.d.ts +76 -0
  12. package/dist/{components → types/components}/basic/Text.d.ts +25 -20
  13. package/dist/{index.d.ts → types/index.d.ts} +3 -7
  14. package/dist/ui.css +1 -1
  15. package/package.json +9 -2
  16. package/dist/components/basic/Container.d.ts +0 -21
  17. package/dist/components/basic/Tabs.d.ts +0 -47
  18. package/dist/src/components/basic/Accordation.js +0 -73
  19. package/dist/src/components/basic/Alert.js +0 -36
  20. package/dist/src/components/basic/AudioGallery.js +0 -425
  21. package/dist/src/components/basic/AudioPlayer.js +0 -130
  22. package/dist/src/components/basic/Avatar.js +0 -68
  23. package/dist/src/components/basic/Badge.js +0 -27
  24. package/dist/src/components/basic/Button.js +0 -24
  25. package/dist/src/components/basic/CheckboxGroup.js +0 -63
  26. package/dist/src/components/basic/Container.js +0 -56
  27. package/dist/src/components/basic/Drawer.js +0 -43
  28. package/dist/src/components/basic/DropDown.js +0 -98
  29. package/dist/src/components/basic/FlexView.js +0 -19
  30. package/dist/src/components/basic/GridView.js +0 -18
  31. package/dist/src/components/basic/Image.js +0 -55
  32. package/dist/src/components/basic/Input.js +0 -82
  33. package/dist/src/components/basic/List.js +0 -29
  34. package/dist/src/components/basic/Modal.js +0 -34
  35. package/dist/src/components/basic/RadioGroup.js +0 -54
  36. package/dist/src/components/basic/Stack.js +0 -22
  37. package/dist/src/components/basic/SwitchGroup.js +0 -76
  38. package/dist/src/components/basic/Table.js +0 -30
  39. package/dist/src/components/basic/Tabs.js +0 -140
  40. package/dist/src/components/basic/Text.js +0 -25
  41. package/dist/src/index.js +0 -44
  42. package/dist/types/src/components/basic/Accordation.d.ts +0 -40
  43. package/dist/types/src/components/basic/Alert.d.ts +0 -17
  44. package/dist/types/src/components/basic/AudioGallery.d.ts +0 -23
  45. package/dist/types/src/components/basic/AudioPlayer.d.ts +0 -16
  46. package/dist/types/src/components/basic/Avatar.d.ts +0 -23
  47. package/dist/types/src/components/basic/Badge.d.ts +0 -21
  48. package/dist/types/src/components/basic/Button.d.ts +0 -15
  49. package/dist/types/src/components/basic/CheckboxGroup.d.ts +0 -27
  50. package/dist/types/src/components/basic/Container.d.ts +0 -21
  51. package/dist/types/src/components/basic/Drawer.d.ts +0 -22
  52. package/dist/types/src/components/basic/DropDown.d.ts +0 -33
  53. package/dist/types/src/components/basic/FlexView.d.ts +0 -16
  54. package/dist/types/src/components/basic/GridView.d.ts +0 -14
  55. package/dist/types/src/components/basic/Image.d.ts +0 -37
  56. package/dist/types/src/components/basic/Input.d.ts +0 -33
  57. package/dist/types/src/components/basic/List.d.ts +0 -20
  58. package/dist/types/src/components/basic/Modal.d.ts +0 -17
  59. package/dist/types/src/components/basic/RadioGroup.d.ts +0 -26
  60. package/dist/types/src/components/basic/Stack.d.ts +0 -17
  61. package/dist/types/src/components/basic/SwitchGroup.d.ts +0 -26
  62. package/dist/types/src/components/basic/Table.d.ts +0 -28
  63. package/dist/types/src/components/basic/Tabs.d.ts +0 -47
  64. package/dist/types/src/components/basic/Text.d.ts +0 -1121
  65. package/dist/types/src/index.d.ts +0 -24
  66. package/dist/types/vite.config.d.ts +0 -2
  67. package/dist/vite.config.js +0 -34
  68. /package/dist/{components/basic/Accordation.d.ts → types/components/basic/Accordion.d.ts} +0 -0
  69. /package/dist/{components → types/components}/basic/AudioGallery.d.ts +0 -0
  70. /package/dist/{components → types/components}/basic/AudioPlayer.d.ts +0 -0
  71. /package/dist/{components → types/components}/basic/CheckboxGroup.d.ts +0 -0
  72. /package/dist/{components → types/components}/basic/Drawer.d.ts +0 -0
  73. /package/dist/{components → types/components}/basic/DropDown.d.ts +0 -0
  74. /package/dist/{components → types/components}/basic/FlexView.d.ts +0 -0
  75. /package/dist/{components → types/components}/basic/GridView.d.ts +0 -0
  76. /package/dist/{components → types/components}/basic/Image.d.ts +0 -0
  77. /package/dist/{components → types/components}/basic/List.d.ts +0 -0
  78. /package/dist/{components → types/components}/basic/Modal.d.ts +0 -0
  79. /package/dist/{components → types/components}/basic/RadioGroup.d.ts +0 -0
  80. /package/dist/{components → types/components}/basic/Stack.d.ts +0 -0
  81. /package/dist/{components → types/components}/basic/SwitchGroup.d.ts +0 -0
  82. /package/dist/{components → types/components}/basic/Table.d.ts +0 -0
package/dist/index.es.js CHANGED
@@ -1,5 +1,5 @@
1
- import ze, { forwardRef as ce, createElement as he, createContext as Fe, useState as L, useCallback as me, useContext as Be, memo as _e, useRef as K, useEffect as X, useMemo as ue, useImperativeHandle as Ee } from "react";
2
- var de = { exports: {} }, le = {};
1
+ import le, { forwardRef as Q, createElement as oe, createContext as xe, useState as W, useCallback as ae, useContext as me, useEffect as U, memo as pe, useRef as V, useMemo as te, useImperativeHandle as be } from "react";
2
+ var ee = { exports: {} }, K = {};
3
3
  /**
4
4
  * @license React
5
5
  * react-jsx-runtime.production.js
@@ -9,29 +9,29 @@ var de = { exports: {} }, le = {};
9
9
  * This source code is licensed under the MIT license found in the
10
10
  * LICENSE file in the root directory of this source tree.
11
11
  */
12
- var we;
13
- function Ye() {
14
- if (we) return le;
15
- we = 1;
16
- var n = Symbol.for("react.transitional.element"), r = Symbol.for("react.fragment");
17
- function s(t, a, l) {
12
+ var ce;
13
+ function Ne() {
14
+ if (ce) return K;
15
+ ce = 1;
16
+ var r = Symbol.for("react.transitional.element"), t = Symbol.for("react.fragment");
17
+ function n(s, a, l) {
18
18
  var i = null;
19
19
  if (l !== void 0 && (i = "" + l), a.key !== void 0 && (i = "" + a.key), "key" in a) {
20
20
  l = {};
21
- for (var d in a)
22
- d !== "key" && (l[d] = a[d]);
21
+ for (var c in a)
22
+ c !== "key" && (l[c] = a[c]);
23
23
  } else l = a;
24
24
  return a = l.ref, {
25
- $$typeof: n,
26
- type: t,
25
+ $$typeof: r,
26
+ type: s,
27
27
  key: i,
28
28
  ref: a !== void 0 ? a : null,
29
29
  props: l
30
30
  };
31
31
  }
32
- return le.Fragment = r, le.jsx = s, le.jsxs = s, le;
32
+ return K.Fragment = t, K.jsx = n, K.jsxs = n, K;
33
33
  }
34
- var ie = {};
34
+ var Z = {};
35
35
  /**
36
36
  * @license React
37
37
  * react-jsx-runtime.development.js
@@ -41,102 +41,102 @@ var ie = {};
41
41
  * This source code is licensed under the MIT license found in the
42
42
  * LICENSE file in the root directory of this source tree.
43
43
  */
44
- var ke;
45
- function Ve() {
46
- return ke || (ke = 1, process.env.NODE_ENV !== "production" && (function() {
47
- function n(o) {
44
+ var de;
45
+ function Ee() {
46
+ return de || (de = 1, process.env.NODE_ENV !== "production" && (function() {
47
+ function r(o) {
48
48
  if (o == null) return null;
49
49
  if (typeof o == "function")
50
- return o.$$typeof === q ? null : o.displayName || o.name || null;
50
+ return o.$$typeof === O ? null : o.displayName || o.name || null;
51
51
  if (typeof o == "string") return o;
52
52
  switch (o) {
53
- case M:
53
+ case S:
54
54
  return "Fragment";
55
- case E:
55
+ case j:
56
56
  return "Profiler";
57
- case $:
57
+ case k:
58
58
  return "StrictMode";
59
- case b:
59
+ case f:
60
60
  return "Suspense";
61
- case m:
61
+ case b:
62
62
  return "SuspenseList";
63
- case O:
63
+ case M:
64
64
  return "Activity";
65
65
  }
66
66
  if (typeof o == "object")
67
67
  switch (typeof o.tag == "number" && console.error(
68
68
  "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
69
69
  ), o.$$typeof) {
70
- case k:
70
+ case E:
71
71
  return "Portal";
72
- case R:
72
+ case C:
73
73
  return o.displayName || "Context";
74
- case A:
74
+ case _:
75
75
  return (o._context.displayName || "Context") + ".Consumer";
76
- case j:
77
- var g = o.render;
78
- return o = o.displayName, o || (o = g.displayName || g.name || "", o = o !== "" ? "ForwardRef(" + o + ")" : "ForwardRef"), o;
79
- case p:
80
- return g = o.displayName || null, g !== null ? g : n(o.type) || "Memo";
81
- case P:
82
- g = o._payload, o = o._init;
76
+ case g:
77
+ var v = o.render;
78
+ return o = o.displayName, o || (o = v.displayName || v.name || "", o = o !== "" ? "ForwardRef(" + o + ")" : "ForwardRef"), o;
79
+ case x:
80
+ return v = o.displayName || null, v !== null ? v : r(o.type) || "Memo";
81
+ case $:
82
+ v = o._payload, o = o._init;
83
83
  try {
84
- return n(o(g));
84
+ return r(o(v));
85
85
  } catch {
86
86
  }
87
87
  }
88
88
  return null;
89
89
  }
90
- function r(o) {
90
+ function t(o) {
91
91
  return "" + o;
92
92
  }
93
- function s(o) {
93
+ function n(o) {
94
94
  try {
95
- r(o);
96
- var g = !1;
95
+ t(o);
96
+ var v = !1;
97
97
  } catch {
98
- g = !0;
98
+ v = !0;
99
99
  }
100
- if (g) {
101
- g = console;
102
- var w = g.error, I = typeof Symbol == "function" && Symbol.toStringTag && o[Symbol.toStringTag] || o.constructor.name || "Object";
100
+ if (v) {
101
+ v = console;
102
+ var w = v.error, L = typeof Symbol == "function" && Symbol.toStringTag && o[Symbol.toStringTag] || o.constructor.name || "Object";
103
103
  return w.call(
104
- g,
104
+ v,
105
105
  "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
106
- I
107
- ), r(o);
106
+ L
107
+ ), t(o);
108
108
  }
109
109
  }
110
- function t(o) {
111
- if (o === M) return "<>";
112
- if (typeof o == "object" && o !== null && o.$$typeof === P)
110
+ function s(o) {
111
+ if (o === S) return "<>";
112
+ if (typeof o == "object" && o !== null && o.$$typeof === $)
113
113
  return "<...>";
114
114
  try {
115
- var g = n(o);
116
- return g ? "<" + g + ">" : "<...>";
115
+ var v = r(o);
116
+ return v ? "<" + v + ">" : "<...>";
117
117
  } catch {
118
118
  return "<...>";
119
119
  }
120
120
  }
121
121
  function a() {
122
- var o = Y.A;
122
+ var o = P.A;
123
123
  return o === null ? null : o.getOwner();
124
124
  }
125
125
  function l() {
126
126
  return Error("react-stack-top-frame");
127
127
  }
128
128
  function i(o) {
129
- if (W.call(o, "key")) {
130
- var g = Object.getOwnPropertyDescriptor(o, "key").get;
131
- if (g && g.isReactWarning) return !1;
129
+ if (F.call(o, "key")) {
130
+ var v = Object.getOwnPropertyDescriptor(o, "key").get;
131
+ if (v && v.isReactWarning) return !1;
132
132
  }
133
133
  return o.key !== void 0;
134
134
  }
135
- function d(o, g) {
135
+ function c(o, v) {
136
136
  function w() {
137
- f || (f = !0, console.error(
137
+ z || (z = !0, console.error(
138
138
  "%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
139
- g
139
+ v
140
140
  ));
141
141
  }
142
142
  w.isReactWarning = !0, Object.defineProperty(o, "key", {
@@ -144,23 +144,23 @@ function Ve() {
144
144
  configurable: !0
145
145
  });
146
146
  }
147
- function v() {
148
- var o = n(this.type);
149
- return S[o] || (S[o] = !0, console.error(
147
+ function u() {
148
+ var o = r(this.type);
149
+ return A[o] || (A[o] = !0, console.error(
150
150
  "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
151
151
  )), o = this.props.ref, o !== void 0 ? o : null;
152
152
  }
153
- function h(o, g, w, I, H, te) {
154
- var B = w.ref;
153
+ function h(o, v, w, L, X, G) {
154
+ var D = w.ref;
155
155
  return o = {
156
- $$typeof: _,
156
+ $$typeof: T,
157
157
  type: o,
158
- key: g,
158
+ key: v,
159
159
  props: w,
160
- _owner: I
161
- }, (B !== void 0 ? B : null) !== null ? Object.defineProperty(o, "ref", {
160
+ _owner: L
161
+ }, (D !== void 0 ? D : null) !== null ? Object.defineProperty(o, "ref", {
162
162
  enumerable: !1,
163
- get: v
163
+ get: u
164
164
  }) : Object.defineProperty(o, "ref", { enumerable: !1, value: null }), o._store = {}, Object.defineProperty(o._store, "validated", {
165
165
  configurable: !1,
166
166
  enumerable: !1,
@@ -175,123 +175,123 @@ function Ve() {
175
175
  configurable: !1,
176
176
  enumerable: !1,
177
177
  writable: !0,
178
- value: H
178
+ value: X
179
179
  }), Object.defineProperty(o, "_debugTask", {
180
180
  configurable: !1,
181
181
  enumerable: !1,
182
182
  writable: !0,
183
- value: te
183
+ value: G
184
184
  }), Object.freeze && (Object.freeze(o.props), Object.freeze(o)), o;
185
185
  }
186
- function y(o, g, w, I, H, te) {
187
- var B = g.children;
188
- if (B !== void 0)
189
- if (I)
190
- if (F(B)) {
191
- for (I = 0; I < B.length; I++)
192
- c(B[I]);
193
- Object.freeze && Object.freeze(B);
186
+ function m(o, v, w, L, X, G) {
187
+ var D = v.children;
188
+ if (D !== void 0)
189
+ if (L)
190
+ if (I(D)) {
191
+ for (L = 0; L < D.length; L++)
192
+ d(D[L]);
193
+ Object.freeze && Object.freeze(D);
194
194
  } else
195
195
  console.error(
196
196
  "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
197
197
  );
198
- else c(B);
199
- if (W.call(g, "key")) {
200
- B = n(o);
201
- var Q = Object.keys(g).filter(function(z) {
202
- return z !== "key";
198
+ else d(D);
199
+ if (F.call(v, "key")) {
200
+ D = r(o);
201
+ var J = Object.keys(v).filter(function(je) {
202
+ return je !== "key";
203
203
  });
204
- I = 0 < Q.length ? "{key: someKey, " + Q.join(": ..., ") + ": ...}" : "{key: someKey}", Z[B + I] || (Q = 0 < Q.length ? "{" + Q.join(": ..., ") + ": ...}" : "{}", console.error(
204
+ L = 0 < J.length ? "{key: someKey, " + J.join(": ..., ") + ": ...}" : "{key: someKey}", q[D + L] || (J = 0 < J.length ? "{" + J.join(": ..., ") + ": ...}" : "{}", console.error(
205
205
  `A props object containing a "key" prop is being spread into JSX:
206
206
  let props = %s;
207
207
  <%s {...props} />
208
208
  React keys must be passed directly to JSX without using spread:
209
209
  let props = %s;
210
210
  <%s key={someKey} {...props} />`,
211
- I,
212
- B,
213
- Q,
214
- B
215
- ), Z[B + I] = !0);
211
+ L,
212
+ D,
213
+ J,
214
+ D
215
+ ), q[D + L] = !0);
216
216
  }
217
- if (B = null, w !== void 0 && (s(w), B = "" + w), i(g) && (s(g.key), B = "" + g.key), "key" in g) {
217
+ if (D = null, w !== void 0 && (n(w), D = "" + w), i(v) && (n(v.key), D = "" + v.key), "key" in v) {
218
218
  w = {};
219
- for (var J in g)
220
- J !== "key" && (w[J] = g[J]);
221
- } else w = g;
222
- return B && d(
219
+ for (var ne in v)
220
+ ne !== "key" && (w[ne] = v[ne]);
221
+ } else w = v;
222
+ return D && c(
223
223
  w,
224
224
  typeof o == "function" ? o.displayName || o.name || "Unknown" : o
225
225
  ), h(
226
226
  o,
227
- B,
227
+ D,
228
228
  w,
229
229
  a(),
230
- H,
231
- te
230
+ X,
231
+ G
232
232
  );
233
233
  }
234
- function c(o) {
235
- x(o) ? o._store && (o._store.validated = 1) : typeof o == "object" && o !== null && o.$$typeof === P && (o._payload.status === "fulfilled" ? x(o._payload.value) && o._payload.value._store && (o._payload.value._store.validated = 1) : o._store && (o._store.validated = 1));
234
+ function d(o) {
235
+ p(o) ? o._store && (o._store.validated = 1) : typeof o == "object" && o !== null && o.$$typeof === $ && (o._payload.status === "fulfilled" ? p(o._payload.value) && o._payload.value._store && (o._payload.value._store.validated = 1) : o._store && (o._store.validated = 1));
236
236
  }
237
- function x(o) {
238
- return typeof o == "object" && o !== null && o.$$typeof === _;
237
+ function p(o) {
238
+ return typeof o == "object" && o !== null && o.$$typeof === T;
239
239
  }
240
- var u = ze, _ = Symbol.for("react.transitional.element"), k = Symbol.for("react.portal"), M = Symbol.for("react.fragment"), $ = Symbol.for("react.strict_mode"), E = Symbol.for("react.profiler"), A = Symbol.for("react.consumer"), R = Symbol.for("react.context"), j = Symbol.for("react.forward_ref"), b = Symbol.for("react.suspense"), m = Symbol.for("react.suspense_list"), p = Symbol.for("react.memo"), P = Symbol.for("react.lazy"), O = Symbol.for("react.activity"), q = Symbol.for("react.client.reference"), Y = u.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, W = Object.prototype.hasOwnProperty, F = Array.isArray, N = console.createTask ? console.createTask : function() {
240
+ var y = le, T = Symbol.for("react.transitional.element"), E = Symbol.for("react.portal"), S = Symbol.for("react.fragment"), k = Symbol.for("react.strict_mode"), j = Symbol.for("react.profiler"), _ = Symbol.for("react.consumer"), C = Symbol.for("react.context"), g = Symbol.for("react.forward_ref"), f = Symbol.for("react.suspense"), b = Symbol.for("react.suspense_list"), x = Symbol.for("react.memo"), $ = Symbol.for("react.lazy"), M = Symbol.for("react.activity"), O = Symbol.for("react.client.reference"), P = y.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, F = Object.prototype.hasOwnProperty, I = Array.isArray, R = console.createTask ? console.createTask : function() {
241
241
  return null;
242
242
  };
243
- u = {
243
+ y = {
244
244
  react_stack_bottom_frame: function(o) {
245
245
  return o();
246
246
  }
247
247
  };
248
- var f, S = {}, V = u.react_stack_bottom_frame.bind(
249
- u,
248
+ var z, A = {}, Y = y.react_stack_bottom_frame.bind(
249
+ y,
250
250
  l
251
- )(), G = N(t(l)), Z = {};
252
- ie.Fragment = M, ie.jsx = function(o, g, w) {
253
- var I = 1e4 > Y.recentlyCreatedOwnerStacks++;
254
- return y(
251
+ )(), B = R(s(l)), q = {};
252
+ Z.Fragment = S, Z.jsx = function(o, v, w) {
253
+ var L = 1e4 > P.recentlyCreatedOwnerStacks++;
254
+ return m(
255
255
  o,
256
- g,
256
+ v,
257
257
  w,
258
258
  !1,
259
- I ? Error("react-stack-top-frame") : V,
260
- I ? N(t(o)) : G
259
+ L ? Error("react-stack-top-frame") : Y,
260
+ L ? R(s(o)) : B
261
261
  );
262
- }, ie.jsxs = function(o, g, w) {
263
- var I = 1e4 > Y.recentlyCreatedOwnerStacks++;
264
- return y(
262
+ }, Z.jsxs = function(o, v, w) {
263
+ var L = 1e4 > P.recentlyCreatedOwnerStacks++;
264
+ return m(
265
265
  o,
266
- g,
266
+ v,
267
267
  w,
268
268
  !0,
269
- I ? Error("react-stack-top-frame") : V,
270
- I ? N(t(o)) : G
269
+ L ? Error("react-stack-top-frame") : Y,
270
+ L ? R(s(o)) : B
271
271
  );
272
272
  };
273
- })()), ie;
273
+ })()), Z;
274
274
  }
275
- var $e;
276
- function Ue() {
277
- return $e || ($e = 1, process.env.NODE_ENV === "production" ? de.exports = Ye() : de.exports = Ve()), de.exports;
275
+ var ue;
276
+ function Ce() {
277
+ return ue || (ue = 1, process.env.NODE_ENV === "production" ? ee.exports = Ne() : ee.exports = Ee()), ee.exports;
278
278
  }
279
- var e = Ue();
279
+ var e = Ce();
280
280
  /**
281
281
  * @license lucide-react v0.536.0 - ISC
282
282
  *
283
283
  * This source code is licensed under the ISC license.
284
284
  * See the LICENSE file in the root directory of this source tree.
285
285
  */
286
- const We = (n) => n.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), qe = (n) => n.replace(
286
+ const Te = (r) => r.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), $e = (r) => r.replace(
287
287
  /^([A-Z])|[\s-_]+(\w)/g,
288
- (r, s, t) => t ? t.toUpperCase() : s.toLowerCase()
289
- ), Ne = (n) => {
290
- const r = qe(n);
291
- return r.charAt(0).toUpperCase() + r.slice(1);
292
- }, Se = (...n) => n.filter((r, s, t) => !!r && r.trim() !== "" && t.indexOf(r) === s).join(" ").trim(), He = (n) => {
293
- for (const r in n)
294
- if (r.startsWith("aria-") || r === "role" || r === "title")
288
+ (t, n, s) => s ? s.toUpperCase() : n.toLowerCase()
289
+ ), fe = (r) => {
290
+ const t = $e(r);
291
+ return t.charAt(0).toUpperCase() + t.slice(1);
292
+ }, he = (...r) => r.filter((t, n, s) => !!t && t.trim() !== "" && s.indexOf(t) === n).join(" ").trim(), Re = (r) => {
293
+ for (const t in r)
294
+ if (t.startsWith("aria-") || t === "role" || t === "title")
295
295
  return !0;
296
296
  };
297
297
  /**
@@ -300,7 +300,7 @@ const We = (n) => n.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), qe = (
300
300
  * This source code is licensed under the ISC license.
301
301
  * See the LICENSE file in the root directory of this source tree.
302
302
  */
303
- var Ge = {
303
+ var _e = {
304
304
  xmlns: "http://www.w3.org/2000/svg",
305
305
  width: 24,
306
306
  height: 24,
@@ -317,31 +317,31 @@ var Ge = {
317
317
  * This source code is licensed under the ISC license.
318
318
  * See the LICENSE file in the root directory of this source tree.
319
319
  */
320
- const Xe = ce(
320
+ const Ae = Q(
321
321
  ({
322
- color: n = "currentColor",
323
- size: r = 24,
324
- strokeWidth: s = 2,
325
- absoluteStrokeWidth: t,
322
+ color: r = "currentColor",
323
+ size: t = 24,
324
+ strokeWidth: n = 2,
325
+ absoluteStrokeWidth: s,
326
326
  className: a = "",
327
327
  children: l,
328
328
  iconNode: i,
329
- ...d
330
- }, v) => he(
329
+ ...c
330
+ }, u) => oe(
331
331
  "svg",
332
332
  {
333
- ref: v,
334
- ...Ge,
335
- width: r,
336
- height: r,
337
- stroke: n,
338
- strokeWidth: t ? Number(s) * 24 / Number(r) : s,
339
- className: Se("lucide", a),
340
- ...!l && !He(d) && { "aria-hidden": "true" },
341
- ...d
333
+ ref: u,
334
+ ..._e,
335
+ width: t,
336
+ height: t,
337
+ stroke: r,
338
+ strokeWidth: s ? Number(n) * 24 / Number(t) : n,
339
+ className: he("lucide", a),
340
+ ...!l && !Re(c) && { "aria-hidden": "true" },
341
+ ...c
342
342
  },
343
343
  [
344
- ...i.map(([h, y]) => he(h, y)),
344
+ ...i.map(([h, m]) => oe(h, m)),
345
345
  ...Array.isArray(l) ? l : [l]
346
346
  ]
347
347
  )
@@ -352,20 +352,20 @@ const Xe = ce(
352
352
  * This source code is licensed under the ISC license.
353
353
  * See the LICENSE file in the root directory of this source tree.
354
354
  */
355
- const U = (n, r) => {
356
- const s = ce(
357
- ({ className: t, ...a }, l) => he(Xe, {
355
+ const H = (r, t) => {
356
+ const n = Q(
357
+ ({ className: s, ...a }, l) => oe(Ae, {
358
358
  ref: l,
359
- iconNode: r,
360
- className: Se(
361
- `lucide-${We(Ne(n))}`,
362
- `lucide-${n}`,
363
- t
359
+ iconNode: t,
360
+ className: he(
361
+ `lucide-${Te(fe(r))}`,
362
+ `lucide-${r}`,
363
+ s
364
364
  ),
365
365
  ...a
366
366
  })
367
367
  );
368
- return s.displayName = Ne(n), s;
368
+ return n.displayName = fe(r), n;
369
369
  };
370
370
  /**
371
371
  * @license lucide-react v0.536.0 - ISC
@@ -373,42 +373,42 @@ const U = (n, r) => {
373
373
  * This source code is licensed under the ISC license.
374
374
  * See the LICENSE file in the root directory of this source tree.
375
375
  */
376
- const Je = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]], Me = U("chevron-down", Je);
376
+ const Se = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]], ye = H("chevron-down", Se);
377
377
  /**
378
378
  * @license lucide-react v0.536.0 - ISC
379
379
  *
380
380
  * This source code is licensed under the ISC license.
381
381
  * See the LICENSE file in the root directory of this source tree.
382
382
  */
383
- const Ke = [["path", { d: "m18 15-6-6-6 6", key: "153udz" }]], Ze = U("chevron-up", Ke);
383
+ const ze = [["path", { d: "m18 15-6-6-6 6", key: "153udz" }]], Ie = H("chevron-up", ze);
384
384
  /**
385
385
  * @license lucide-react v0.536.0 - ISC
386
386
  *
387
387
  * This source code is licensed under the ISC license.
388
388
  * See the LICENSE file in the root directory of this source tree.
389
389
  */
390
- const Qe = [
390
+ const Le = [
391
391
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
392
392
  ["line", { x1: "12", x2: "12", y1: "8", y2: "12", key: "1pkeuh" }],
393
393
  ["line", { x1: "12", x2: "12.01", y1: "16", y2: "16", key: "4dfq90" }]
394
- ], et = U("circle-alert", Qe);
394
+ ], Pe = H("circle-alert", Le);
395
395
  /**
396
396
  * @license lucide-react v0.536.0 - ISC
397
397
  *
398
398
  * This source code is licensed under the ISC license.
399
399
  * See the LICENSE file in the root directory of this source tree.
400
400
  */
401
- const tt = [
401
+ const De = [
402
402
  ["path", { d: "M21.801 10A10 10 0 1 1 17 3.335", key: "yps3ct" }],
403
403
  ["path", { d: "m9 11 3 3L22 4", key: "1pflzl" }]
404
- ], rt = U("circle-check-big", tt);
404
+ ], Me = H("circle-check-big", De);
405
405
  /**
406
406
  * @license lucide-react v0.536.0 - ISC
407
407
  *
408
408
  * This source code is licensed under the ISC license.
409
409
  * See the LICENSE file in the root directory of this source tree.
410
410
  */
411
- const nt = [
411
+ const Oe = [
412
412
  [
413
413
  "path",
414
414
  {
@@ -425,14 +425,14 @@ const nt = [
425
425
  }
426
426
  ],
427
427
  ["path", { d: "m2 2 20 20", key: "1ooewy" }]
428
- ], st = U("eye-off", nt);
428
+ ], Ye = H("eye-off", Oe);
429
429
  /**
430
430
  * @license lucide-react v0.536.0 - ISC
431
431
  *
432
432
  * This source code is licensed under the ISC license.
433
433
  * See the LICENSE file in the root directory of this source tree.
434
434
  */
435
- const ot = [
435
+ const Fe = [
436
436
  [
437
437
  "path",
438
438
  {
@@ -441,155 +441,25 @@ const ot = [
441
441
  }
442
442
  ],
443
443
  ["circle", { cx: "12", cy: "12", r: "3", key: "1v7zrd" }]
444
- ], at = U("eye", ot);
445
- /**
446
- * @license lucide-react v0.536.0 - ISC
447
- *
448
- * This source code is licensed under the ISC license.
449
- * See the LICENSE file in the root directory of this source tree.
450
- */
451
- const lt = [
452
- [
453
- "path",
454
- {
455
- d: "M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5",
456
- key: "mvr1a0"
457
- }
458
- ]
459
- ], it = U("heart", lt);
444
+ ], Be = H("eye", Fe);
460
445
  /**
461
446
  * @license lucide-react v0.536.0 - ISC
462
447
  *
463
448
  * This source code is licensed under the ISC license.
464
449
  * See the LICENSE file in the root directory of this source tree.
465
450
  */
466
- const ct = [
451
+ const We = [
467
452
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
468
453
  ["path", { d: "M12 16v-4", key: "1dtifu" }],
469
454
  ["path", { d: "M12 8h.01", key: "e9boi3" }]
470
- ], dt = U("info", ct);
471
- /**
472
- * @license lucide-react v0.536.0 - ISC
473
- *
474
- * This source code is licensed under the ISC license.
475
- * See the LICENSE file in the root directory of this source tree.
476
- */
477
- const ut = [
478
- ["path", { d: "M8 3H5a2 2 0 0 0-2 2v3", key: "1dcmit" }],
479
- ["path", { d: "M21 8V5a2 2 0 0 0-2-2h-3", key: "1e4gt3" }],
480
- ["path", { d: "M3 16v3a2 2 0 0 0 2 2h3", key: "wsl5sc" }],
481
- ["path", { d: "M16 21h3a2 2 0 0 0 2-2v-3", key: "18trek" }]
482
- ], ft = U("maximize", ut);
483
- /**
484
- * @license lucide-react v0.536.0 - ISC
485
- *
486
- * This source code is licensed under the ISC license.
487
- * See the LICENSE file in the root directory of this source tree.
488
- */
489
- const xt = [
490
- ["path", { d: "M8 3v3a2 2 0 0 1-2 2H3", key: "hohbtr" }],
491
- ["path", { d: "M21 8h-3a2 2 0 0 1-2-2V3", key: "5jw1f3" }],
492
- ["path", { d: "M3 16h3a2 2 0 0 1 2 2v3", key: "198tvr" }],
493
- ["path", { d: "M16 21v-3a2 2 0 0 1 2-2h3", key: "ph8mxp" }]
494
- ], pt = U("minimize", xt);
495
- /**
496
- * @license lucide-react v0.536.0 - ISC
497
- *
498
- * This source code is licensed under the ISC license.
499
- * See the LICENSE file in the root directory of this source tree.
500
- */
501
- const ht = [
502
- ["path", { d: "M9 18V5l12-2v13", key: "1jmyc2" }],
503
- ["circle", { cx: "6", cy: "18", r: "3", key: "fqmcym" }],
504
- ["circle", { cx: "18", cy: "16", r: "3", key: "1hluhg" }]
505
- ], Te = U("music", ht);
455
+ ], Ue = H("info", We);
506
456
  /**
507
457
  * @license lucide-react v0.536.0 - ISC
508
458
  *
509
459
  * This source code is licensed under the ISC license.
510
460
  * See the LICENSE file in the root directory of this source tree.
511
461
  */
512
- const mt = [
513
- ["rect", { x: "14", y: "3", width: "5", height: "18", rx: "1", key: "kaeet6" }],
514
- ["rect", { x: "5", y: "3", width: "5", height: "18", rx: "1", key: "1wsw3u" }]
515
- ], be = U("pause", mt);
516
- /**
517
- * @license lucide-react v0.536.0 - ISC
518
- *
519
- * This source code is licensed under the ISC license.
520
- * See the LICENSE file in the root directory of this source tree.
521
- */
522
- const bt = [
523
- [
524
- "path",
525
- {
526
- d: "M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",
527
- key: "10ikf1"
528
- }
529
- ]
530
- ], ge = U("play", bt);
531
- /**
532
- * @license lucide-react v0.536.0 - ISC
533
- *
534
- * This source code is licensed under the ISC license.
535
- * See the LICENSE file in the root directory of this source tree.
536
- */
537
- const gt = [
538
- ["path", { d: "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8", key: "1357e3" }],
539
- ["path", { d: "M3 3v5h5", key: "1xhq8a" }]
540
- ], Ae = U("rotate-ccw", gt);
541
- /**
542
- * @license lucide-react v0.536.0 - ISC
543
- *
544
- * This source code is licensed under the ISC license.
545
- * See the LICENSE file in the root directory of this source tree.
546
- */
547
- const yt = [
548
- ["path", { d: "m18 14 4 4-4 4", key: "10pe0f" }],
549
- ["path", { d: "m18 2 4 4-4 4", key: "pucp1d" }],
550
- ["path", { d: "M2 18h1.973a4 4 0 0 0 3.3-1.7l5.454-8.6a4 4 0 0 1 3.3-1.7H22", key: "1ailkh" }],
551
- ["path", { d: "M2 6h1.972a4 4 0 0 1 3.6 2.2", key: "km57vx" }],
552
- ["path", { d: "M22 18h-6.041a4 4 0 0 1-3.3-1.8l-.359-.45", key: "os18l9" }]
553
- ], vt = U("shuffle", yt);
554
- /**
555
- * @license lucide-react v0.536.0 - ISC
556
- *
557
- * This source code is licensed under the ISC license.
558
- * See the LICENSE file in the root directory of this source tree.
559
- */
560
- const jt = [
561
- [
562
- "path",
563
- {
564
- d: "M17.971 4.285A2 2 0 0 1 21 6v12a2 2 0 0 1-3.029 1.715l-9.997-5.998a2 2 0 0 1-.003-3.432z",
565
- key: "15892j"
566
- }
567
- ],
568
- ["path", { d: "M3 20V4", key: "1ptbpl" }]
569
- ], ye = U("skip-back", jt);
570
- /**
571
- * @license lucide-react v0.536.0 - ISC
572
- *
573
- * This source code is licensed under the ISC license.
574
- * See the LICENSE file in the root directory of this source tree.
575
- */
576
- const wt = [
577
- ["path", { d: "M21 4v16", key: "7j8fe9" }],
578
- [
579
- "path",
580
- {
581
- d: "M6.029 4.285A2 2 0 0 0 3 6v12a2 2 0 0 0 3.029 1.715l9.997-5.998a2 2 0 0 0 .003-3.432z",
582
- key: "zs4d6"
583
- }
584
- ]
585
- ], ve = U("skip-forward", wt);
586
- /**
587
- * @license lucide-react v0.536.0 - ISC
588
- *
589
- * This source code is licensed under the ISC license.
590
- * See the LICENSE file in the root directory of this source tree.
591
- */
592
- const kt = [
462
+ const qe = [
593
463
  [
594
464
  "path",
595
465
  {
@@ -599,1412 +469,635 @@ const kt = [
599
469
  ],
600
470
  ["path", { d: "M12 9v4", key: "juzpu7" }],
601
471
  ["path", { d: "M12 17h.01", key: "p32p05" }]
602
- ], $t = U("triangle-alert", kt);
472
+ ], Ve = H("triangle-alert", qe);
603
473
  /**
604
474
  * @license lucide-react v0.536.0 - ISC
605
475
  *
606
476
  * This source code is licensed under the ISC license.
607
477
  * See the LICENSE file in the root directory of this source tree.
608
478
  */
609
- const Nt = [
479
+ const He = [
610
480
  ["path", { d: "M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2", key: "975kel" }],
611
481
  ["circle", { cx: "12", cy: "7", r: "4", key: "17ys0d" }]
612
- ], Tt = U("user", Nt);
613
- /**
614
- * @license lucide-react v0.536.0 - ISC
615
- *
616
- * This source code is licensed under the ISC license.
617
- * See the LICENSE file in the root directory of this source tree.
618
- */
619
- const Rt = [
620
- [
621
- "path",
622
- {
623
- d: "M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",
624
- key: "uqj9uw"
625
- }
626
- ],
627
- ["path", { d: "M16 9a5 5 0 0 1 0 6", key: "1q6k2b" }],
628
- ["path", { d: "M19.364 18.364a9 9 0 0 0 0-12.728", key: "ijwkga" }]
629
- ], Ie = U("volume-2", Rt);
630
- /**
631
- * @license lucide-react v0.536.0 - ISC
632
- *
633
- * This source code is licensed under the ISC license.
634
- * See the LICENSE file in the root directory of this source tree.
635
- */
636
- const zt = [
637
- [
638
- "path",
639
- {
640
- d: "M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",
641
- key: "uqj9uw"
642
- }
643
- ],
644
- ["line", { x1: "22", x2: "16", y1: "9", y2: "15", key: "1ewh16" }],
645
- ["line", { x1: "16", x2: "22", y1: "9", y2: "15", key: "5ykzw1" }]
646
- ], Ce = U("volume-x", zt);
482
+ ], Ge = H("user", He);
647
483
  /**
648
484
  * @license lucide-react v0.536.0 - ISC
649
485
  *
650
486
  * This source code is licensed under the ISC license.
651
487
  * See the LICENSE file in the root directory of this source tree.
652
488
  */
653
- const _t = [
489
+ const Xe = [
654
490
  ["path", { d: "M18 6 6 18", key: "1bl5f8" }],
655
491
  ["path", { d: "m6 6 12 12", key: "d8bk6v" }]
656
- ], je = U("x", _t), Pe = Fe(void 0), Wt = () => {
657
- const n = Be(Pe);
658
- if (!n) throw new Error("useToast must be used within ToastProvider");
659
- return n;
660
- }, qt = ({ children: n }) => {
661
- const [r, s] = L([]), t = me((l) => {
662
- s((i) => i.filter((d) => d.id !== l));
663
- }, []), a = me((l) => {
664
- const i = Date.now() + Math.random();
665
- s((d) => [...d, { ...l, id: i }]), l.duration !== 0 && setTimeout(() => t(i), l.duration ?? 4e3);
666
- }, [t]);
667
- return /* @__PURE__ */ e.jsxs(Pe.Provider, { value: { addToast: a }, children: [
668
- n,
669
- /* @__PURE__ */ e.jsx("div", { className: "fixed top-5 right-5 flex flex-col gap-3 z-50", children: r.map((l) => /* @__PURE__ */ e.jsx(St, { toast: l, onClose: () => t(l.id) }, l.id)) })
492
+ ], ie = H("x", Xe), ge = xe(void 0), mt = () => {
493
+ const r = me(ge);
494
+ if (!r) throw new Error("useToast must be used within ToastProvider");
495
+ return r;
496
+ }, pt = ({
497
+ children: r
498
+ }) => {
499
+ const [t, n] = W([]), s = ae((l) => {
500
+ n(l ? (i) => i.filter((c) => c.id !== l) : []);
501
+ }, []), a = ae(
502
+ ({
503
+ title: l,
504
+ description: i,
505
+ type: c = "info",
506
+ duration: u = 4e3
507
+ }) => {
508
+ const h = Math.random().toString(36).substring(2, 9);
509
+ n((m) => [
510
+ ...m,
511
+ { id: h, title: l, description: i, type: c, duration: u }
512
+ ]), u !== 0 && setTimeout(() => s(h), u);
513
+ },
514
+ [s]
515
+ );
516
+ return /* @__PURE__ */ e.jsxs(ge.Provider, { value: { toast: a, dismiss: s }, children: [
517
+ r,
518
+ /* @__PURE__ */ e.jsx("div", { className: "fixed bottom-4 right-4 z-50 flex flex-col gap-2 sm:bottom-6 sm:right-6", children: t.map((l) => /* @__PURE__ */ e.jsx(
519
+ Ke,
520
+ {
521
+ toast: l,
522
+ onClose: () => s(l.id)
523
+ },
524
+ l.id
525
+ )) })
670
526
  ] });
671
- }, Et = {
672
- success: { bg: "bg-green-50", border: "border-green-400", icon: /* @__PURE__ */ e.jsx(rt, { size: 20, className: "text-green-600" }) },
673
- error: { bg: "bg-red-50", border: "border-red-400", icon: /* @__PURE__ */ e.jsx(et, { size: 20, className: "text-red-600" }) },
674
- warning: { bg: "bg-yellow-50", border: "border-yellow-400", icon: /* @__PURE__ */ e.jsx($t, { size: 20, className: "text-yellow-600" }) },
675
- info: { bg: "bg-blue-50", border: "border-blue-400", icon: /* @__PURE__ */ e.jsx(dt, { size: 20, className: "text-blue-600" }) }
676
- }, St = ({ toast: n, onClose: r }) => {
677
- const { title: s, description: t, type: a = "info" } = n, { bg: l, border: i, icon: d } = Et[a];
678
- return /* @__PURE__ */ e.jsxs(
527
+ }, Je = {
528
+ success: {
529
+ bg: "bg-white dark:bg-zinc-900",
530
+ border: "border-green-500",
531
+ text: "text-green-600 dark:text-green-500",
532
+ iconColor: "text-green-500",
533
+ icon: Me
534
+ },
535
+ error: {
536
+ bg: "bg-white dark:bg-zinc-900",
537
+ border: "border-red-500",
538
+ text: "text-red-600 dark:text-red-500",
539
+ iconColor: "text-red-500",
540
+ icon: Pe
541
+ },
542
+ warning: {
543
+ bg: "bg-white dark:bg-zinc-900",
544
+ border: "border-yellow-500",
545
+ text: "text-yellow-600 dark:text-yellow-500",
546
+ iconColor: "text-yellow-500",
547
+ icon: Ve
548
+ },
549
+ info: {
550
+ bg: "bg-white dark:bg-zinc-900",
551
+ border: "border-blue-500",
552
+ text: "text-blue-600 dark:text-blue-500",
553
+ iconColor: "text-blue-500",
554
+ icon: Ue
555
+ }
556
+ }, Ke = ({
557
+ toast: r,
558
+ onClose: t
559
+ }) => {
560
+ const { title: n, description: s, type: a = "info" } = r, l = Je[a], i = l.icon;
561
+ return U(() => {
562
+ const c = (u) => {
563
+ u.key === "Escape" && t();
564
+ };
565
+ return document.addEventListener("keydown", c), () => document.removeEventListener("keydown", c);
566
+ }, [t]), /* @__PURE__ */ e.jsxs(
679
567
  "div",
680
568
  {
681
- className: `flex items-start gap-3 p-4 border-l-4 rounded shadow ${l} ${i} animate-slide-in-right`,
569
+ className: `
570
+ group relative flex w-full max-w-sm items-start gap-3 rounded-lg border shadow-lg
571
+ ${l.bg} ${l.border}
572
+ p-4 pr-8
573
+ transition-all duration-300 ease-out
574
+ animate-in slide-in-from-right-full fade-in
575
+ hover:shadow-xl hover:scale-105
576
+ dark:border-zinc-800
577
+ `,
682
578
  role: "alert",
683
579
  children: [
684
- /* @__PURE__ */ e.jsx("div", { children: d }),
685
- /* @__PURE__ */ e.jsxs("div", { className: "flex-1 min-w-0", children: [
686
- s && /* @__PURE__ */ e.jsx("div", { className: "font-semibold text-sm mb-1", children: s }),
687
- t && /* @__PURE__ */ e.jsx("div", { className: "text-sm text-gray-700", children: t })
580
+ /* @__PURE__ */ e.jsx(i, { className: `h-5 w-5 flex-shrink-0 ${l.iconColor}` }),
581
+ /* @__PURE__ */ e.jsxs("div", { className: "flex-1 space-y-1", children: [
582
+ n && /* @__PURE__ */ e.jsx("div", { className: `text-sm font-semibold ${l.text}`, children: n }),
583
+ s && /* @__PURE__ */ e.jsx("div", { className: "text-sm text-zinc-600 dark:text-zinc-400", children: s })
688
584
  ] }),
689
- /* @__PURE__ */ e.jsx("button", { onClick: r, className: "text-gray-500 hover:text-gray-700", children: /* @__PURE__ */ e.jsx(je, { size: 16 }) })
585
+ /* @__PURE__ */ e.jsx(
586
+ "button",
587
+ {
588
+ onClick: t,
589
+ className: `
590
+ absolute right-2 top-2 rounded-md p-1
591
+ text-zinc-400 hover:text-zinc-700
592
+ dark:text-zinc-600 dark:hover:text-zinc-300
593
+ transition-colors
594
+ focus:outline-none focus:ring-2 focus:ring-zinc-400
595
+ `,
596
+ "aria-label": "Close toast",
597
+ children: /* @__PURE__ */ e.jsx(ie, { className: "h-4 w-4" })
598
+ }
599
+ )
690
600
  ]
691
601
  }
692
602
  );
693
- }, Mt = _e(
603
+ }, Ze = pe(
694
604
  ({
695
- items: n,
696
- allowMultiple: r = !1,
697
- defaultOpen: s = [],
698
- borderColor: t = "#e5e7eb",
605
+ items: r,
606
+ allowMultiple: t = !1,
607
+ defaultOpen: n = [],
608
+ borderColor: s = "#e5e7eb",
699
609
  backgroundColor: a = "#fff",
700
610
  textColor: l = "#111827",
701
611
  hoverBgColor: i = "#f3f4f6",
702
- hoverTextColor: d = "#111827",
703
- contentBgColor: v = "#fff",
612
+ hoverTextColor: c = "#111827",
613
+ contentBgColor: u = "#fff",
704
614
  contentTextColor: h = "#374151",
705
- paddingY: y = "1rem",
706
- paddingX: c = "1rem",
707
- marginY: x = "0.5rem",
708
- borderRadius: u = "0.5rem",
709
- contentPadding: _ = "1rem",
710
- fontSize: k = "1rem",
711
- fontWeight: M = 600,
712
- contentFontSize: $ = "0.95rem",
713
- contentFontWeight: E = 400,
714
- iconOpen: A,
715
- iconClose: R,
716
- iconSize: j = "1.25rem",
717
- transitionDuration: b = "300ms",
718
- shadow: m = "0 1px 4px rgba(0,0,0,0.08)",
719
- className: p = "",
720
- style: P
615
+ paddingY: m = "1rem",
616
+ paddingX: d = "1rem",
617
+ marginY: p = "0.5rem",
618
+ borderRadius: y = "0.5rem",
619
+ contentPadding: T = "1rem",
620
+ fontSize: E = "1rem",
621
+ fontWeight: S = 600,
622
+ contentFontSize: k = "0.95rem",
623
+ contentFontWeight: j = 400,
624
+ iconOpen: _,
625
+ iconClose: C,
626
+ iconSize: g = "1.25rem",
627
+ transitionDuration: f = "300ms",
628
+ shadow: b = "0 1px 4px rgba(0,0,0,0.08)",
629
+ className: x = "",
630
+ style: $
721
631
  }) => {
722
- const [O, q] = L(s), Y = K([]);
723
- X(() => {
724
- Y.current.forEach((N, f) => {
725
- N && (N.style.maxHeight = O.includes(f) ? `${N.scrollHeight}px` : "0px");
632
+ const [M, O] = W(n), P = V([]);
633
+ U(() => {
634
+ P.current.forEach((R, z) => {
635
+ R && (R.style.maxHeight = M.includes(z) ? `${R.scrollHeight}px` : "0px");
726
636
  });
727
- }, [O]);
728
- const W = (N) => {
729
- q(
730
- (f) => r ? f.includes(N) ? f.filter((S) => S !== N) : [...f, N] : f.includes(N) ? [] : [N]
637
+ }, [M]);
638
+ const F = (R) => {
639
+ O(
640
+ (z) => t ? z.includes(R) ? z.filter((A) => A !== R) : [...z, R] : z.includes(R) ? [] : [R]
731
641
  );
732
- }, F = (N) => N !== void 0 ? typeof N == "number" ? `${N}px` : N : void 0;
642
+ }, I = (R) => R !== void 0 ? typeof R == "number" ? `${R}px` : R : void 0;
733
643
  return /* @__PURE__ */ e.jsx(
734
644
  "div",
735
645
  {
736
- className: `space-y-2 ${p}`,
737
- style: { width: "100%", ...P },
738
- children: n.map((N, f) => {
739
- const S = O.includes(f);
646
+ className: `space-y-2 ${x}`,
647
+ style: { width: "100%", ...$ },
648
+ children: r.map((R, z) => {
649
+ const A = M.includes(z);
740
650
  return /* @__PURE__ */ e.jsxs(
741
651
  "div",
742
652
  {
743
653
  className: "border shadow-sm overflow-hidden transition-all duration-300",
744
654
  style: {
745
- borderColor: t,
746
- borderRadius: F(u),
747
- margin: `${F(x)} 0`,
748
- boxShadow: m
655
+ borderColor: s,
656
+ borderRadius: I(y),
657
+ margin: `${I(p)} 0`,
658
+ boxShadow: b
749
659
  },
750
660
  children: [
751
661
  /* @__PURE__ */ e.jsxs(
752
662
  "button",
753
663
  {
754
- onClick: () => W(f),
664
+ onClick: () => F(z),
755
665
  className: "w-full flex justify-between items-center transition-colors duration-300",
756
666
  style: {
757
667
  backgroundColor: a,
758
668
  color: l,
759
- padding: `${F(y)} ${F(c)}`,
760
- fontWeight: M,
761
- fontSize: F(k),
669
+ padding: `${I(m)} ${I(d)}`,
670
+ fontWeight: S,
671
+ fontSize: I(E),
762
672
  cursor: "pointer",
763
673
  border: "none",
764
674
  outline: "none"
765
675
  },
766
- onMouseEnter: (V) => {
767
- V.currentTarget.style.backgroundColor = i, V.currentTarget.style.color = d;
676
+ onMouseEnter: (Y) => {
677
+ Y.currentTarget.style.backgroundColor = i, Y.currentTarget.style.color = c;
768
678
  },
769
- onMouseLeave: (V) => {
770
- V.currentTarget.style.backgroundColor = a, V.currentTarget.style.color = l;
679
+ onMouseLeave: (Y) => {
680
+ Y.currentTarget.style.backgroundColor = a, Y.currentTarget.style.color = l;
771
681
  },
772
682
  children: [
773
- /* @__PURE__ */ e.jsx("span", { children: N.title }),
774
- /* @__PURE__ */ e.jsx("span", { style: { fontSize: F(j) }, children: S ? A || /* @__PURE__ */ e.jsx(Ze, { size: 16 }) : R || /* @__PURE__ */ e.jsx(Me, { size: 16 }) })
683
+ /* @__PURE__ */ e.jsx("span", { children: R.title }),
684
+ /* @__PURE__ */ e.jsx("span", { style: { fontSize: I(g) }, children: A ? _ || /* @__PURE__ */ e.jsx(Ie, { size: 16 }) : C || /* @__PURE__ */ e.jsx(ye, { size: 16 }) })
775
685
  ]
776
686
  }
777
687
  ),
778
688
  /* @__PURE__ */ e.jsx(
779
689
  "div",
780
690
  {
781
- ref: (V) => {
782
- Y.current[f] = V;
691
+ ref: (Y) => {
692
+ P.current[z] = Y;
783
693
  },
784
694
  className: "overflow-hidden transition-all duration-300",
785
695
  style: {
786
- maxHeight: S ? `${Y.current[f]?.scrollHeight ?? 0}px` : "0px",
787
- transition: `max-height ${b} ease-in-out`
696
+ maxHeight: A ? `${P.current[z]?.scrollHeight ?? 0}px` : "0px",
697
+ transition: `max-height ${f} ease-in-out`
788
698
  },
789
699
  children: /* @__PURE__ */ e.jsx(
790
700
  "div",
791
701
  {
792
702
  style: {
793
- borderTop: `1px solid ${t}`,
794
- backgroundColor: v,
703
+ borderTop: `1px solid ${s}`,
704
+ backgroundColor: u,
795
705
  color: h,
796
- padding: F(_),
797
- fontSize: F($),
798
- fontWeight: E
706
+ padding: I(T),
707
+ fontSize: I(k),
708
+ fontWeight: j
799
709
  },
800
- children: N.content
710
+ children: R.content
801
711
  }
802
712
  )
803
713
  }
804
714
  )
805
715
  ]
806
716
  },
807
- f
717
+ z
808
718
  );
809
719
  })
810
720
  }
811
721
  );
812
722
  }
813
723
  );
814
- Mt.displayName = "Accordion";
815
- const At = {
816
- xs: 24,
817
- sm: 32,
818
- md: 40,
819
- lg: 48,
820
- xl: 56,
821
- "2xl": 64
822
- }, It = {
724
+ Ze.displayName = "Accordion";
725
+ const Qe = {
823
726
  xs: "text-[10px]",
824
727
  sm: "text-[12px]",
825
728
  md: "text-[14px]",
826
729
  lg: "text-[16px]",
827
730
  xl: "text-[18px]",
828
731
  "2xl": "text-[20px]"
829
- }, Ct = {
732
+ }, et = {
830
733
  xs: "w-6 h-6",
831
734
  sm: "w-8 h-8",
832
- md: "w-10 h-10",
833
- lg: "w-12 h-12",
834
- xl: "w-14 h-14",
835
- "2xl": "w-16 h-16"
836
- }, xe = {
837
- circular: "rounded-full",
838
- rounded: "rounded-lg",
839
- square: "rounded-none"
840
- }, Pt = {
841
- "top-left": "top-0 left-0",
842
- "top-right": "top-0 right-0",
843
- "bottom-left": "bottom-0 left-0",
844
- "bottom-right": "bottom-0 right-0"
845
- }, Ht = ({
846
- src: n,
847
- alt: r = "User avatar",
848
- size: s = "md",
849
- variant: t = "circular",
850
- isOnline: a = !1,
851
- isOffline: l = !1,
852
- fallback: i,
853
- ring: d = !1,
854
- ringColor: v = "#3b82f6",
855
- onClick: h,
856
- statusPosition: y = "bottom-right",
857
- className: c = "",
858
- statusClassName: x = "",
859
- style: u,
860
- statusStyle: _
861
- }) => {
862
- const [k, M] = L(!1), $ = !!h, E = i || r.split(" ").map((j) => j[0]).join("").toUpperCase().slice(0, 2), A = a ? "bg-green-500" : l ? "bg-gray-400" : "", R = At[s];
863
- return /* @__PURE__ */ e.jsxs(
864
- "div",
865
- {
866
- role: $ ? "button" : "img",
867
- tabIndex: $ ? 0 : -1,
868
- "aria-label": r,
869
- onClick: h,
870
- className: `relative inline-flex items-center justify-center overflow-hidden ${Ct[s]} ${xe[t]} transition-all duration-200 ${$ ? "cursor-pointer hover:scale-105" : ""} ${d ? "ring-2" : ""} ${c}`,
871
- style: {
872
- ...u,
873
- ...d ? { boxShadow: `0 0 0 2px ${v}` } : {}
874
- },
875
- onKeyDown: (j) => {
876
- $ && (j.key === "Enter" || j.key === " ") && (j.preventDefault(), h?.());
877
- },
878
- children: [
879
- n && !k ? /* @__PURE__ */ e.jsx(
880
- "img",
881
- {
882
- src: n,
883
- alt: r,
884
- onError: () => M(!0),
885
- className: `w-full h-full object-cover ${xe[t]} transition-opacity duration-300`
886
- }
887
- ) : /* @__PURE__ */ e.jsx(
888
- "div",
889
- {
890
- className: `w-full h-full flex items-center justify-center bg-gradient-to-tr from-purple-500 to-blue-500 text-white font-semibold ${It[s]} ${xe[t]}`,
891
- children: E || /* @__PURE__ */ e.jsx(Tt, { className: "text-white" })
892
- }
893
- ),
894
- (a || l) && /* @__PURE__ */ e.jsx(
895
- "span",
896
- {
897
- "aria-label": a ? "Online" : "Offline",
898
- title: a ? "Online" : "Offline",
899
- className: `absolute ${Pt[y]} ${A} border-2 border-white rounded-full shadow-sm ${x}`,
900
- style: {
901
- width: R / 3,
902
- height: R / 3,
903
- ..._
904
- }
905
- }
906
- )
907
- ]
908
- }
909
- );
910
- }, Gt = ({
911
- src: n,
912
- thumbnail: r,
913
- autoPlay: s = !1,
914
- loop: t = !1,
915
- backgroundColor: a = "#0a0a0a",
916
- primaryColor: l = "#10b981",
917
- secondaryColor: i = "#ffffff",
918
- borderRadius: d = "12px",
919
- padding: v = "12px",
920
- width: h = "100%",
921
- className: y
922
- }) => {
923
- const c = K(null), x = K(null), [u, _] = L(s), [k, M] = L(0), [$, E] = L(0), [A, R] = L(0.7), [j, b] = L(!1), [m, p] = L(t);
924
- X(() => {
925
- c.current && (c.current.volume = A);
926
- }, [A]), X(() => {
927
- c.current && (c.current.loop = m);
928
- }, [m]);
929
- const P = () => {
930
- c.current && (u ? c.current.pause() : c.current.play(), _(!u));
931
- }, O = () => {
932
- c.current && (M(c.current.currentTime), E(c.current.duration));
933
- }, q = (N) => {
934
- if (!c.current) return;
935
- const f = N.currentTarget.getBoundingClientRect(), S = (N.clientX - f.left) / f.width;
936
- c.current.currentTime = S * $, M(S * $);
937
- }, Y = (N) => {
938
- c.current && (c.current.currentTime += N);
939
- }, W = () => {
940
- x.current && (j ? document.exitFullscreen?.() : x.current.requestFullscreen?.(), b(!j));
941
- }, F = (N) => {
942
- const f = Math.floor(N / 60), S = Math.floor(N % 60);
943
- return `${f}:${S < 10 ? "0" : ""}${S}`;
944
- };
945
- return /* @__PURE__ */ e.jsxs(
946
- "div",
947
- {
948
- ref: x,
949
- className: y,
950
- style: {
951
- display: "flex",
952
- alignItems: "center",
953
- gap: "12px",
954
- width: h,
955
- backgroundColor: a,
956
- borderRadius: d,
957
- padding: v,
958
- boxSizing: "border-box",
959
- color: i,
960
- boxShadow: "0 6px 16px rgba(0,0,0,0.2)",
961
- flexWrap: "wrap"
962
- },
963
- children: [
964
- /* @__PURE__ */ e.jsx(
965
- "audio",
966
- {
967
- ref: c,
968
- src: n,
969
- autoPlay: s,
970
- loop: t,
971
- onTimeUpdate: O,
972
- onLoadedMetadata: O
973
- }
974
- ),
975
- r && /* @__PURE__ */ e.jsx(
976
- "img",
977
- {
978
- src: r,
979
- alt: "Audio Thumbnail",
980
- style: {
981
- width: "60px",
982
- height: "60px",
983
- borderRadius: "50%",
984
- objectFit: "cover",
985
- flexShrink: 0
986
- }
987
- }
988
- ),
989
- /* @__PURE__ */ e.jsxs(
990
- "div",
991
- {
992
- style: {
993
- display: "flex",
994
- alignItems: "center",
995
- gap: "12px",
996
- flex: 1,
997
- minWidth: "0"
998
- },
999
- children: [
1000
- /* @__PURE__ */ e.jsx(
1001
- "button",
1002
- {
1003
- onClick: () => Y(-10),
1004
- style: {
1005
- background: "transparent",
1006
- border: "none",
1007
- color: i,
1008
- cursor: "pointer"
1009
- },
1010
- "aria-label": "Skip Back 10s",
1011
- children: /* @__PURE__ */ e.jsx(ye, { size: 20 })
1012
- }
1013
- ),
1014
- /* @__PURE__ */ e.jsx(
1015
- "button",
1016
- {
1017
- onClick: P,
1018
- style: {
1019
- background: l,
1020
- borderRadius: "50%",
1021
- padding: "10px",
1022
- border: "none",
1023
- cursor: "pointer",
1024
- display: "flex",
1025
- alignItems: "center",
1026
- justifyContent: "center"
1027
- },
1028
- "aria-label": u ? "Pause" : "Play",
1029
- children: u ? /* @__PURE__ */ e.jsx(be, { size: 20 }) : /* @__PURE__ */ e.jsx(ge, { size: 20 })
1030
- }
1031
- ),
1032
- /* @__PURE__ */ e.jsx(
1033
- "button",
1034
- {
1035
- onClick: () => Y(10),
1036
- style: {
1037
- background: "transparent",
1038
- border: "none",
1039
- color: i,
1040
- cursor: "pointer"
1041
- },
1042
- "aria-label": "Skip Forward 10s",
1043
- children: /* @__PURE__ */ e.jsx(ve, { size: 20 })
1044
- }
1045
- ),
1046
- /* @__PURE__ */ e.jsx(
1047
- "div",
1048
- {
1049
- onClick: q,
1050
- style: {
1051
- flex: 1,
1052
- height: "6px",
1053
- background: "#444",
1054
- borderRadius: "3px",
1055
- cursor: "pointer",
1056
- position: "relative"
1057
- },
1058
- children: /* @__PURE__ */ e.jsx(
1059
- "div",
1060
- {
1061
- style: {
1062
- width: `${k / $ * 100 || 0}%`,
1063
- height: "100%",
1064
- background: l,
1065
- borderRadius: "3px"
1066
- }
1067
- }
1068
- )
1069
- }
1070
- ),
1071
- /* @__PURE__ */ e.jsxs("div", { style: { minWidth: "70px", textAlign: "right", fontSize: "0.8rem" }, children: [
1072
- F(k),
1073
- " / ",
1074
- F($)
1075
- ] }),
1076
- /* @__PURE__ */ e.jsxs("div", { style: { display: "flex", alignItems: "center", gap: "8px" }, children: [
1077
- /* @__PURE__ */ e.jsx(
1078
- "button",
1079
- {
1080
- onClick: () => p(!m),
1081
- style: {
1082
- background: "transparent",
1083
- border: "none",
1084
- cursor: "pointer",
1085
- color: m ? l : i
1086
- },
1087
- "aria-label": "Toggle Loop",
1088
- children: /* @__PURE__ */ e.jsx(Ae, { size: 18 })
1089
- }
1090
- ),
1091
- /* @__PURE__ */ e.jsx(
1092
- "button",
1093
- {
1094
- onClick: () => R(A > 0 ? 0 : 0.7),
1095
- style: {
1096
- background: "transparent",
1097
- border: "none",
1098
- cursor: "pointer",
1099
- color: i
1100
- },
1101
- "aria-label": "Toggle Mute",
1102
- children: A > 0 ? /* @__PURE__ */ e.jsx(Ie, { size: 18 }) : /* @__PURE__ */ e.jsx(Ce, { size: 18 })
1103
- }
1104
- ),
1105
- /* @__PURE__ */ e.jsx(
1106
- "button",
1107
- {
1108
- onClick: W,
1109
- style: {
1110
- background: "transparent",
1111
- border: "none",
1112
- cursor: "pointer",
1113
- color: i
1114
- },
1115
- "aria-label": "Toggle Fullscreen",
1116
- children: j ? /* @__PURE__ */ e.jsx(pt, { size: 18 }) : /* @__PURE__ */ e.jsx(ft, { size: 18 })
1117
- }
1118
- )
1119
- ] })
1120
- ]
1121
- }
1122
- )
1123
- ]
1124
- }
1125
- );
1126
- }, Lt = [
1127
- {
1128
- src: "https://www.soundjay.com/misc/sounds/bell-ringing-05.wav",
1129
- title: "Morning Bell",
1130
- artist: "Nature Sounds",
1131
- duration: "0:15",
1132
- thumbnail: "https://images.unsplash.com/photo-1493225457124-a3eb161ffa5f?w=300&h=300&fit=crop"
1133
- },
1134
- {
1135
- src: "https://www.soundjay.com/buttons/sounds/button-4.wav",
1136
- title: "Digital Click",
1137
- artist: "Tech Audio",
1138
- duration: "0:05",
1139
- thumbnail: "https://images.unsplash.com/photo-1514525253161-7a46d19cd819?w=300&h=300&fit=crop"
1140
- },
1141
- {
1142
- src: "https://www.soundjay.com/buttons/sounds/button-10.wav",
1143
- title: "Soft Chime",
1144
- artist: "Ambient Studio",
1145
- duration: "0:08",
1146
- thumbnail: "https://images.unsplash.com/photo-1493225457124-a3eb161ffa5f?w=300&h=300&fit=crop"
1147
- }
1148
- ];
1149
- function Xt({
1150
- tracks: n = Lt,
1151
- className: r = "",
1152
- galleryTitle: s = "Audio Gallery",
1153
- primaryColor: t = "#8b5cf6",
1154
- backgroundColor: a = "#0f0f23",
1155
- textColor: l = "#e4e4e7",
1156
- secondaryColor: i = "#1a1a2e",
1157
- border: d = 0,
1158
- borderColor: v,
1159
- maxWidth: h = 420,
1160
- autoplay: y = !1,
1161
- loop: c = !1
1162
- }) {
1163
- const [x, u] = L(
1164
- null
1165
- ), [_, k] = L(!1), [M, $] = L(0), [E, A] = L(0), [R, j] = L(0.7), [b, m] = L(!1), [p, P] = L(c), [O, q] = L(!1), [Y, W] = L(!1), [F, N] = L(!1), f = K(null), S = K(null), V = K(null);
1166
- X(() => {
1167
- f.current && (f.current.volume = R);
1168
- }, [R]), X(() => {
1169
- f.current && (f.current.loop = p);
1170
- }, [p]), X(() => {
1171
- x === null && f.current && (f.current.pause(), k(!1), $(0), A(0));
1172
- }, [x]);
1173
- const G = (z) => {
1174
- if (x === z) {
1175
- if (!f.current) return;
1176
- f.current.paused ? (f.current.play().catch(() => {
1177
- }), k(!0)) : (f.current.pause(), k(!1));
1178
- } else
1179
- u(z), setTimeout(() => {
1180
- f.current && (f.current.play().catch(() => {
1181
- }), k(!0));
1182
- }, 100);
1183
- }, Z = () => {
1184
- f.current && ($(f.current.currentTime), f.current.duration && A(f.current.duration));
1185
- }, o = (z) => {
1186
- if (!f.current || !E) return;
1187
- const T = z.currentTarget.getBoundingClientRect(), re = (z.clientX - T.left) / T.width * E;
1188
- f.current.currentTime = re, $(re);
1189
- }, g = (z) => {
1190
- const T = z.currentTarget.getBoundingClientRect(), ee = (z.clientX - T.left) / T.width, re = Math.max(0, Math.min(1, ee));
1191
- j(re);
1192
- }, w = (z) => {
1193
- if (f.current && E) {
1194
- let T = f.current.currentTime + z;
1195
- T = Math.min(Math.max(T, 0), E), f.current.currentTime = T, $(T);
1196
- }
1197
- }, I = () => {
1198
- if (x === null) return;
1199
- let z;
1200
- O ? z = Math.floor(Math.random() * n.length) : z = (x + 1) % n.length, G(z);
1201
- }, H = () => {
1202
- if (x === null) return;
1203
- let z;
1204
- O ? z = Math.floor(Math.random() * n.length) : z = (x - 1 + n.length) % n.length, G(z);
1205
- }, te = () => {
1206
- j((z) => z > 0 ? 0 : 0.7);
1207
- }, B = () => {
1208
- N(!0), V.current && clearTimeout(V.current), V.current = setTimeout(() => {
1209
- N(!1);
1210
- }, 3e3);
1211
- }, Q = (z) => {
1212
- if (isNaN(z)) return "0:00";
1213
- const T = Math.floor(z / 60), D = Math.floor(z % 60);
1214
- return `${T}:${D < 10 ? "0" : ""}${D}`;
1215
- }, J = x !== null ? n[x] : null;
1216
- return /* @__PURE__ */ e.jsxs(
1217
- "div",
1218
- {
1219
- className: r,
1220
- style: {
1221
- maxWidth: `${h}px`,
1222
- margin: "20px auto",
1223
- background: `linear-gradient(145deg, ${a}, ${i})`,
1224
- color: l,
1225
- borderRadius: "24px",
1226
- padding: "24px 16px",
1227
- fontFamily: "'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif",
1228
- userSelect: "none",
1229
- backdropFilter: "blur(20px)",
1230
- border: `${d}px solid ${v}40`
1231
- },
1232
- children: [
1233
- /* @__PURE__ */ e.jsxs(
1234
- "div",
1235
- {
1236
- style: {
1237
- display: "flex",
1238
- alignItems: "center",
1239
- justifyContent: "space-between",
1240
- marginBottom: "24px"
1241
- },
1242
- children: [
1243
- /* @__PURE__ */ e.jsxs("div", { style: { display: "flex", alignItems: "center", gap: "12px" }, children: [
1244
- /* @__PURE__ */ e.jsx(
1245
- "div",
1246
- {
1247
- style: {
1248
- width: "40px",
1249
- height: "40px",
1250
- borderRadius: "12px",
1251
- background: `linear-gradient(135deg, ${t}, ${i})`,
1252
- display: "flex",
1253
- alignItems: "center",
1254
- justifyContent: "center"
1255
- },
1256
- children: /* @__PURE__ */ e.jsx(Te, { size: 20, color: "white" })
1257
- }
1258
- ),
1259
- /* @__PURE__ */ e.jsxs("div", { children: [
1260
- /* @__PURE__ */ e.jsx(
1261
- "h2",
1262
- {
1263
- style: {
1264
- margin: 0,
1265
- fontSize: "1.25rem",
1266
- fontWeight: "700",
1267
- color: t
1268
- // fallback for browsers without WebkitTextFillColor
1269
- },
1270
- children: s
1271
- }
1272
- ),
1273
- /* @__PURE__ */ e.jsxs("p", { style: { margin: 0, fontSize: "0.875rem", opacity: 0.7 }, children: [
1274
- n.length,
1275
- " tracks"
1276
- ] })
1277
- ] })
1278
- ] }),
1279
- /* @__PURE__ */ e.jsx(
1280
- "button",
1281
- {
1282
- onClick: () => q(!O),
1283
- style: {
1284
- background: O ? t : "transparent",
1285
- border: "none",
1286
- borderRadius: "12px",
1287
- padding: "8px",
1288
- cursor: "pointer",
1289
- transition: "all 0.3s ease",
1290
- opacity: O ? 1 : 0.6
1291
- },
1292
- "aria-label": "Toggle Shuffle",
1293
- children: /* @__PURE__ */ e.jsx(vt, { size: 18, color: O ? "white" : l })
1294
- }
1295
- )
1296
- ]
1297
- }
1298
- ),
1299
- /* @__PURE__ */ e.jsx(
1300
- "div",
1301
- {
1302
- style: {
1303
- display: "flex",
1304
- flexDirection: "column",
1305
- gap: "8px",
1306
- marginBottom: "20px",
1307
- maxHeight: "240px",
1308
- overflowY: "auto",
1309
- paddingRight: "4px"
1310
- },
1311
- children: n.map((z, T) => {
1312
- const D = x === T, ee = D && _;
1313
- return /* @__PURE__ */ e.jsxs(
1314
- "div",
1315
- {
1316
- onClick: () => G(T),
1317
- style: {
1318
- display: "flex",
1319
- alignItems: "center",
1320
- padding: "12px 16px",
1321
- borderRadius: "16px",
1322
- background: D ? `linear-gradient(135deg, ${t}20, ${t}10)` : "rgba(255,255,255,0.05)",
1323
- border: D ? `1px solid ${t}40` : "1px solid transparent",
1324
- cursor: "pointer",
1325
- transition: "all 0.3s ease",
1326
- backdropFilter: D ? "blur(20px)" : "none"
1327
- },
1328
- children: [
1329
- /* @__PURE__ */ e.jsxs(
1330
- "div",
1331
- {
1332
- style: {
1333
- width: "48px",
1334
- height: "48px",
1335
- borderRadius: "12px",
1336
- background: z.thumbnail ? `url(${z.thumbnail}) center/cover` : t,
1337
- display: "flex",
1338
- alignItems: "center",
1339
- justifyContent: "center",
1340
- marginRight: "12px",
1341
- position: "relative",
1342
- overflow: "hidden"
1343
- },
1344
- children: [
1345
- !z.thumbnail && /* @__PURE__ */ e.jsx(Te, { size: 20, color: "white" }),
1346
- ee && /* @__PURE__ */ e.jsx(
1347
- "div",
1348
- {
1349
- style: {
1350
- position: "absolute",
1351
- top: 0,
1352
- left: 0,
1353
- right: 0,
1354
- bottom: 0,
1355
- background: "rgba(0,0,0,0.6)",
1356
- display: "flex",
1357
- alignItems: "center",
1358
- justifyContent: "center"
1359
- },
1360
- children: /* @__PURE__ */ e.jsx(
1361
- "div",
1362
- {
1363
- style: {
1364
- width: "16px",
1365
- height: "16px",
1366
- display: "flex",
1367
- gap: "2px",
1368
- alignItems: "end",
1369
- justifyContent: "center"
1370
- },
1371
- children: [0, 1, 2].map((re) => /* @__PURE__ */ e.jsx(
1372
- "div",
1373
- {
1374
- style: {
1375
- width: "3px",
1376
- background: "white",
1377
- borderRadius: "2px",
1378
- animation: `equalizer 1s ease-in-out infinite ${re * 0.2}s`,
1379
- height: "12px"
1380
- }
1381
- },
1382
- re
1383
- ))
1384
- }
1385
- )
1386
- }
1387
- )
1388
- ]
1389
- }
1390
- ),
1391
- /* @__PURE__ */ e.jsxs("div", { style: { flex: 1, minWidth: 0 }, children: [
1392
- /* @__PURE__ */ e.jsx(
1393
- "div",
1394
- {
1395
- style: {
1396
- fontWeight: "600",
1397
- fontSize: "0.95rem",
1398
- color: D ? t : l,
1399
- whiteSpace: "nowrap",
1400
- overflow: "hidden",
1401
- textOverflow: "ellipsis"
1402
- },
1403
- children: z.title
1404
- }
1405
- ),
1406
- z.artist && /* @__PURE__ */ e.jsx(
1407
- "div",
1408
- {
1409
- style: {
1410
- fontSize: "0.8rem",
1411
- opacity: 0.7,
1412
- whiteSpace: "nowrap",
1413
- overflow: "hidden",
1414
- textOverflow: "ellipsis"
1415
- },
1416
- children: z.artist
1417
- }
1418
- )
1419
- ] }),
1420
- /* @__PURE__ */ e.jsxs(
1421
- "div",
1422
- {
1423
- style: { display: "flex", alignItems: "center", gap: "12px" },
1424
- children: [
1425
- z.duration && /* @__PURE__ */ e.jsx("span", { style: { fontSize: "0.8rem", opacity: 0.6 }, children: z.duration }),
1426
- /* @__PURE__ */ e.jsx(
1427
- "div",
1428
- {
1429
- style: {
1430
- width: "32px",
1431
- height: "32px",
1432
- borderRadius: "8px",
1433
- background: D ? t : "rgba(255,255,255,0.1)",
1434
- display: "flex",
1435
- alignItems: "center",
1436
- justifyContent: "center",
1437
- transition: "all 0.3s ease"
1438
- },
1439
- children: ee ? /* @__PURE__ */ e.jsx(be, { size: 16, color: "white" }) : /* @__PURE__ */ e.jsx(ge, { size: 16, color: "white" })
1440
- }
1441
- )
1442
- ]
1443
- }
1444
- )
1445
- ]
1446
- },
1447
- T
1448
- );
1449
- })
1450
- }
1451
- ),
1452
- J && /* @__PURE__ */ e.jsxs(
1453
- "div",
1454
- {
1455
- ref: S,
1456
- style: {
1457
- background: `linear-gradient(135deg, ${i}, ${a})`,
1458
- borderRadius: "20px",
1459
- padding: "20px",
1460
- border: `1px solid ${t}40`,
1461
- backdropFilter: "blur(20px)",
1462
- position: "relative",
1463
- overflow: "hidden"
1464
- },
1465
- children: [
1466
- J.thumbnail && /* @__PURE__ */ e.jsx(
1467
- "div",
1468
- {
1469
- style: {
1470
- position: "absolute",
1471
- top: 0,
1472
- left: 0,
1473
- right: 0,
1474
- bottom: 0,
1475
- backgroundImage: `url(${J.thumbnail})`,
1476
- backgroundSize: "cover",
1477
- backgroundPosition: "center",
1478
- filter: "blur(60px) opacity(0.1)",
1479
- transform: "scale(1.1)"
1480
- }
1481
- }
1482
- ),
1483
- /* @__PURE__ */ e.jsxs("div", { style: { position: "relative", zIndex: 1 }, children: [
1484
- /* @__PURE__ */ e.jsxs("div", { style: { textAlign: "center", marginBottom: "20px" }, children: [
1485
- /* @__PURE__ */ e.jsx(
1486
- "h3",
1487
- {
1488
- style: {
1489
- margin: "0 0 4px 0",
1490
- fontSize: "1.1rem",
1491
- fontWeight: "700",
1492
- color: t
1493
- },
1494
- children: J.title
1495
- }
1496
- ),
1497
- J.artist && /* @__PURE__ */ e.jsx("p", { style: { margin: 0, opacity: 0.7, fontSize: "0.9rem" }, children: J.artist })
1498
- ] }),
1499
- /* @__PURE__ */ e.jsxs(
1500
- "div",
1501
- {
1502
- style: {
1503
- display: "flex",
1504
- alignItems: "center",
1505
- justifyContent: "center",
1506
- gap: "20px",
1507
- marginBottom: "20px"
1508
- },
1509
- children: [
1510
- /* @__PURE__ */ e.jsx(
1511
- "button",
1512
- {
1513
- onClick: H,
1514
- style: ne(l, "rgba(255,255,255,0.1)"),
1515
- "aria-label": "Previous Track",
1516
- children: /* @__PURE__ */ e.jsx(ye, { size: 20 })
1517
- }
1518
- ),
1519
- /* @__PURE__ */ e.jsxs(
1520
- "button",
1521
- {
1522
- onClick: () => w(-10),
1523
- style: ne(l, "rgba(255,255,255,0.1)"),
1524
- "aria-label": "Skip back 10 seconds",
1525
- children: [
1526
- /* @__PURE__ */ e.jsx(ye, { size: 16 }),
1527
- /* @__PURE__ */ e.jsx("span", { style: { fontSize: "0.7rem", marginLeft: "2px" }, children: "10" })
1528
- ]
1529
- }
1530
- ),
1531
- /* @__PURE__ */ e.jsx(
1532
- "button",
1533
- {
1534
- onClick: () => {
1535
- f.current && (_ ? (f.current.pause(), k(!1)) : (f.current.play().catch(() => {
1536
- }), k(!0)));
1537
- },
1538
- style: {
1539
- ...ne("#fff", t),
1540
- width: "60px",
1541
- height: "60px",
1542
- borderRadius: "50%",
1543
- boxShadow: `0 8px 25px ${t}40`
1544
- },
1545
- "aria-label": _ ? "Pause" : "Play",
1546
- children: _ ? /* @__PURE__ */ e.jsx(be, { size: 24 }) : /* @__PURE__ */ e.jsx(ge, { size: 24 })
1547
- }
1548
- ),
1549
- /* @__PURE__ */ e.jsxs(
1550
- "button",
1551
- {
1552
- onClick: () => w(10),
1553
- style: ne(l, "rgba(255,255,255,0.1)"),
1554
- "aria-label": "Skip forward 10 seconds",
1555
- children: [
1556
- /* @__PURE__ */ e.jsx("span", { style: { fontSize: "0.7rem", marginRight: "2px" }, children: "10" }),
1557
- /* @__PURE__ */ e.jsx(ve, { size: 16 })
1558
- ]
1559
- }
1560
- ),
1561
- /* @__PURE__ */ e.jsx(
1562
- "button",
1563
- {
1564
- onClick: I,
1565
- style: ne(l, "rgba(255,255,255,0.1)"),
1566
- "aria-label": "Next Track",
1567
- children: /* @__PURE__ */ e.jsx(ve, { size: 20 })
1568
- }
1569
- )
1570
- ]
1571
- }
1572
- ),
1573
- /* @__PURE__ */ e.jsxs("div", { style: { marginBottom: "16px" }, children: [
1574
- /* @__PURE__ */ e.jsxs(
1575
- "div",
1576
- {
1577
- style: {
1578
- display: "flex",
1579
- alignItems: "center",
1580
- justifyContent: "space-between",
1581
- marginBottom: "8px",
1582
- fontSize: "0.8rem",
1583
- opacity: 0.7
1584
- },
1585
- children: [
1586
- /* @__PURE__ */ e.jsx("span", { children: Q(M) }),
1587
- /* @__PURE__ */ e.jsx("span", { children: Q(E) })
1588
- ]
1589
- }
1590
- ),
1591
- /* @__PURE__ */ e.jsx(
1592
- "div",
1593
- {
1594
- onClick: o,
1595
- style: {
1596
- height: "6px",
1597
- background: "rgba(255,255,255,0.2)",
1598
- borderRadius: "3px",
1599
- cursor: "pointer",
1600
- position: "relative",
1601
- overflow: "hidden"
1602
- },
1603
- children: /* @__PURE__ */ e.jsx(
1604
- "div",
1605
- {
1606
- style: {
1607
- width: `${M / E * 100 || 0}%`,
1608
- height: "100%",
1609
- background: `linear-gradient(90deg, ${t}, #ec4899)`,
1610
- borderRadius: "3px",
1611
- position: "relative"
1612
- },
1613
- children: /* @__PURE__ */ e.jsx(
1614
- "div",
1615
- {
1616
- style: {
1617
- position: "absolute",
1618
- right: "-6px",
1619
- top: "50%",
1620
- transform: "translateY(-50%)",
1621
- width: "12px",
1622
- height: "12px",
1623
- background: t,
1624
- borderRadius: "50%",
1625
- boxShadow: `0 2px 8px ${t}60`
1626
- }
1627
- }
1628
- )
1629
- }
1630
- )
1631
- }
1632
- )
1633
- ] }),
1634
- /* @__PURE__ */ e.jsxs(
1635
- "div",
1636
- {
1637
- style: {
1638
- display: "flex",
1639
- alignItems: "center",
1640
- justifyContent: "space-between"
1641
- },
1642
- children: [
1643
- /* @__PURE__ */ e.jsxs("div", { style: { display: "flex", gap: "8px" }, children: [
1644
- /* @__PURE__ */ e.jsx(
1645
- "button",
1646
- {
1647
- onClick: () => W(!Y),
1648
- style: ne(
1649
- Y ? "#ec4899" : l,
1650
- "rgba(255,255,255,0.1)"
1651
- ),
1652
- "aria-label": "Like",
1653
- children: /* @__PURE__ */ e.jsx(it, { size: 16, fill: Y ? "#ec4899" : "none" })
1654
- }
1655
- ),
1656
- /* @__PURE__ */ e.jsx(
1657
- "button",
1658
- {
1659
- onClick: () => P(!p),
1660
- style: ne(
1661
- p ? t : l,
1662
- "rgba(255,255,255,0.1)"
1663
- ),
1664
- "aria-label": "Toggle Loop",
1665
- children: /* @__PURE__ */ e.jsx(Ae, { size: 16 })
1666
- }
1667
- )
1668
- ] }),
1669
- /* @__PURE__ */ e.jsxs(
1670
- "div",
1671
- {
1672
- style: {
1673
- display: "flex",
1674
- alignItems: "center",
1675
- gap: "8px",
1676
- position: "relative"
1677
- },
1678
- children: [
1679
- F && /* @__PURE__ */ e.jsx(
1680
- "div",
1681
- {
1682
- onClick: g,
1683
- style: {
1684
- width: "80px",
1685
- height: "4px",
1686
- background: "rgba(255,255,255,0.2)",
1687
- borderRadius: "2px",
1688
- cursor: "pointer",
1689
- position: "relative"
1690
- },
1691
- children: /* @__PURE__ */ e.jsx(
1692
- "div",
1693
- {
1694
- style: {
1695
- width: `${R * 100}%`,
1696
- height: "100%",
1697
- background: t,
1698
- borderRadius: "2px"
1699
- }
1700
- }
1701
- )
1702
- }
1703
- ),
1704
- /* @__PURE__ */ e.jsx(
1705
- "button",
1706
- {
1707
- onClick: te,
1708
- onMouseEnter: B,
1709
- style: ne(l, "rgba(255,255,255,0.1)"),
1710
- "aria-label": R > 0 ? "Mute" : "Unmute",
1711
- children: R > 0 ? /* @__PURE__ */ e.jsx(Ie, { size: 16 }) : /* @__PURE__ */ e.jsx(Ce, { size: 16 })
1712
- }
1713
- )
1714
- ]
1715
- }
1716
- )
1717
- ]
1718
- }
1719
- )
1720
- ] }),
1721
- /* @__PURE__ */ e.jsx(
1722
- "audio",
1723
- {
1724
- ref: f,
1725
- src: J.src,
1726
- autoPlay: y,
1727
- loop: p,
1728
- onTimeUpdate: Z,
1729
- onEnded: () => {
1730
- k(!1), p || I();
1731
- },
1732
- onLoadedMetadata: Z,
1733
- preload: "metadata",
1734
- style: { display: "none" }
1735
- }
1736
- )
1737
- ]
735
+ md: "w-10 h-10",
736
+ lg: "w-12 h-12",
737
+ xl: "w-14 h-14",
738
+ "2xl": "w-16 h-16"
739
+ }, se = {
740
+ circular: "rounded-full",
741
+ rounded: "rounded-lg",
742
+ square: "rounded-none"
743
+ }, tt = {
744
+ "top-left": "-top-0.5 -left-0.5",
745
+ "top-right": "-top-0.5 -right-0.5",
746
+ "bottom-left": "-bottom-0.5 -left-0.5",
747
+ "bottom-right": "-bottom-0.5 -right-0.5"
748
+ }, rt = (r) => ({
749
+ xs: "w-2 h-2",
750
+ sm: "w-2.5 h-2.5",
751
+ md: "w-3 h-3",
752
+ lg: "w-3.5 h-3.5",
753
+ xl: "w-4 h-4",
754
+ "2xl": "w-4.5 h-4.5"
755
+ })[r], nt = (r) => ({
756
+ xs: "border",
757
+ sm: "border",
758
+ md: "border-2",
759
+ lg: "border-2",
760
+ xl: "border-[3px]",
761
+ "2xl": "border-[3px]"
762
+ })[r], bt = ({
763
+ src: r,
764
+ alt: t = "User avatar",
765
+ size: n = "md",
766
+ variant: s = "circular",
767
+ isOnline: a = !1,
768
+ isOffline: l = !1,
769
+ fallback: i,
770
+ ring: c = !1,
771
+ ringColor: u = "#3b82f6",
772
+ onClick: h,
773
+ statusPosition: m = "bottom-right",
774
+ className: d = "",
775
+ statusClassName: p = "",
776
+ style: y,
777
+ statusStyle: T
778
+ }) => {
779
+ const [E, S] = W(!1), k = !!h, j = n === "responsive" ? "md" : n, _ = i || t.split(" ").map((b) => b[0]).join("").toUpperCase().slice(0, 2), C = a ? "bg-green-500" : l ? "bg-gray-400" : "", g = rt(j), f = nt(j);
780
+ return /* @__PURE__ */ e.jsxs(
781
+ "div",
782
+ {
783
+ role: k ? "button" : "img",
784
+ tabIndex: k ? 0 : -1,
785
+ "aria-label": t,
786
+ onClick: h,
787
+ className: `relative inline-flex items-center justify-center overflow-hidden
788
+ ${et[j]}
789
+ ${se[s]}
790
+ transition-all duration-200
791
+ ${k ? "cursor-pointer hover:scale-105 active:scale-95" : ""}
792
+ ${c ? "ring-2 ring-offset-2" : ""}
793
+ ${d}`,
794
+ style: {
795
+ ...y,
796
+ ...c ? { ringColor: u } : {}
797
+ },
798
+ onKeyDown: (b) => {
799
+ k && (b.key === "Enter" || b.key === " ") && (b.preventDefault(), h?.());
800
+ },
801
+ children: [
802
+ r && !E ? /* @__PURE__ */ e.jsx(
803
+ "img",
804
+ {
805
+ src: r,
806
+ alt: t,
807
+ onError: () => S(!0),
808
+ className: `w-full h-full object-cover ${se[s]}`
809
+ }
810
+ ) : /* @__PURE__ */ e.jsx(
811
+ "div",
812
+ {
813
+ className: `w-full h-full flex items-center justify-center bg-gradient-to-br from-purple-500 via-purple-600 to-blue-600 text-white font-semibold
814
+ ${Qe[j]}
815
+ ${se[s]}`,
816
+ children: _ || /* @__PURE__ */ e.jsx(Ge, { className: "w-1/2 h-1/2" })
1738
817
  }
1739
818
  ),
1740
- /* @__PURE__ */ e.jsx("style", { children: `
1741
- @keyframes equalizer {
1742
- 0%, 100% { height: 4px; }
1743
- 50% { height: 12px; }
1744
- }
1745
-
1746
- /* Custom Scrollbar */
1747
- div::-webkit-scrollbar {
1748
- width: 4px;
1749
- }
1750
-
1751
- div::-webkit-scrollbar-track {
1752
- background: rgba(255,255,255,0.1);
1753
- border-radius: 2px;
1754
- }
1755
-
1756
- div::-webkit-scrollbar-thumb {
1757
- background: ${t};
1758
- border-radius: 2px;
1759
- }
1760
-
1761
- div::-webkit-scrollbar-thumb:hover {
1762
- background: ${t}dd;
1763
- }
1764
- ` })
819
+ (a || l) && /* @__PURE__ */ e.jsx(
820
+ "span",
821
+ {
822
+ "aria-label": a ? "Online" : "Offline",
823
+ title: a ? "Online" : "Offline",
824
+ className: `
825
+ absolute
826
+ ${tt[m]}
827
+ ${C}
828
+ ${g}
829
+ ${f}
830
+ border-white
831
+ rounded-full
832
+ shadow-md
833
+ z-10
834
+ ${p}
835
+ `,
836
+ style: {
837
+ ...T
838
+ }
839
+ }
840
+ )
1765
841
  ]
1766
842
  }
1767
843
  );
844
+ };
845
+ function ve(r) {
846
+ var t, n, s = "";
847
+ if (typeof r == "string" || typeof r == "number") s += r;
848
+ else if (typeof r == "object") if (Array.isArray(r)) {
849
+ var a = r.length;
850
+ for (t = 0; t < a; t++) r[t] && (n = ve(r[t])) && (s && (s += " "), s += n);
851
+ } else for (n in r) r[n] && (s && (s += " "), s += n);
852
+ return s;
1768
853
  }
1769
- function ne(n, r) {
1770
- return {
1771
- border: "none",
1772
- backgroundColor: r,
1773
- color: n,
1774
- cursor: "pointer",
1775
- padding: "10px",
1776
- borderRadius: "12px",
1777
- display: "flex",
1778
- alignItems: "center",
1779
- justifyContent: "center",
1780
- transition: "all 0.3s ease",
1781
- backdropFilter: "blur(10px)"
1782
- };
1783
- }
1784
- function Le(n) {
1785
- var r, s, t = "";
1786
- if (typeof n == "string" || typeof n == "number") t += n;
1787
- else if (typeof n == "object") if (Array.isArray(n)) {
1788
- var a = n.length;
1789
- for (r = 0; r < a; r++) n[r] && (s = Le(n[r])) && (t && (t += " "), t += s);
1790
- } else for (s in n) n[s] && (t && (t += " "), t += s);
1791
- return t;
1792
- }
1793
- function C() {
1794
- for (var n, r, s = 0, t = "", a = arguments.length; s < a; s++) (n = arguments[s]) && (r = Le(n)) && (t && (t += " "), t += r);
1795
- return t;
854
+ function N() {
855
+ for (var r, t, n = 0, s = "", a = arguments.length; n < a; n++) (r = arguments[n]) && (t = ve(r)) && (s && (s += " "), s += t);
856
+ return s;
1796
857
  }
1797
- const Dt = _e(
858
+ const st = pe(
1798
859
  ({
1799
- text: n,
1800
- icon: r,
1801
- iconPosition: s = "left",
1802
- primaryTheme: t = !0,
1803
- primaryColor: a = "#3b82f6",
1804
- size: l = "md",
1805
- rounded: i = !0,
1806
- notificationDot: d = !1,
1807
- dotColor: v = "#ef4444",
1808
- count: h,
1809
- pulse: y = !1,
1810
- className: c,
1811
- onClick: x
860
+ text: r,
861
+ icon: t,
862
+ iconPosition: n = "left",
863
+ primaryColor: s = "#3b82f6",
864
+ size: a = "md",
865
+ rounded: l = !0,
866
+ notificationDot: i = !1,
867
+ dotColor: c = "#ef4444",
868
+ count: u,
869
+ pulse: h = !1,
870
+ className: m,
871
+ onClick: d
1812
872
  }) => {
1813
- const u = {
873
+ const p = {
1814
874
  sm: "px-2 py-0.5 text-xs",
1815
875
  md: "px-3 py-1 text-xs",
1816
876
  lg: "px-4 py-1.5 text-sm"
1817
- }, _ = t ? "bg-[var(--primary)] text-white" : "", k = t ? {} : {
1818
- backgroundColor: a,
877
+ }, y = {
878
+ backgroundColor: s,
1819
879
  color: "#fff"
1820
880
  };
1821
881
  return /* @__PURE__ */ e.jsxs(
1822
882
  "span",
1823
883
  {
1824
- onClick: x,
1825
- style: t ? void 0 : k,
1826
- className: C(
884
+ onClick: d,
885
+ style: y,
886
+ className: N(
1827
887
  "relative inline-flex items-center justify-center gap-1 font-medium",
1828
888
  "transition-all duration-200 select-none",
1829
- i ? "rounded-full" : "rounded-md",
1830
- u[l],
1831
- _,
1832
- x && "cursor-pointer hover:opacity-90",
1833
- c
889
+ l ? "rounded-full" : "rounded-md",
890
+ p[a],
891
+ d && "cursor-pointer hover:opacity-90",
892
+ m
1834
893
  ),
1835
894
  children: [
1836
- d && /* @__PURE__ */ e.jsx(
895
+ i && /* @__PURE__ */ e.jsx(
1837
896
  "span",
1838
897
  {
1839
- style: t ? void 0 : { backgroundColor: v },
1840
- className: C(
898
+ style: { backgroundColor: c },
899
+ className: N(
1841
900
  "absolute -top-1 -right-1 w-2 h-2 rounded-full",
1842
- y && "animate-ping",
1843
- t ? "bg-red-500" : ""
901
+ h && "animate-ping"
1844
902
  )
1845
903
  }
1846
904
  ),
1847
- h !== void 0 && /* @__PURE__ */ e.jsx(
905
+ u !== void 0 && /* @__PURE__ */ e.jsx(
1848
906
  "span",
1849
907
  {
1850
- style: t ? void 0 : { backgroundColor: v },
1851
- className: C(
1852
- "absolute -top-2 -right-2 min-w-[18px] h-[18px] px-1 text-[10px]",
1853
- "flex items-center justify-center rounded-full text-white",
1854
- t ? "bg-red-500" : ""
1855
- ),
1856
- children: h
908
+ style: { backgroundColor: c },
909
+ className: "absolute -top-2 -right-2 min-w-[18px] h-[18px] px-1 text-[10px] flex items-center justify-center rounded-full text-white",
910
+ children: u
1857
911
  }
1858
912
  ),
1859
- r && s === "left" && /* @__PURE__ */ e.jsx("span", { className: "flex items-center", children: r }),
1860
- n && /* @__PURE__ */ e.jsx("span", { children: n }),
1861
- r && s === "right" && /* @__PURE__ */ e.jsx("span", { className: "flex items-center", children: r })
913
+ t && n === "left" && /* @__PURE__ */ e.jsx("span", { className: "flex items-center", children: t }),
914
+ r && /* @__PURE__ */ e.jsx("span", { children: r }),
915
+ t && n === "right" && /* @__PURE__ */ e.jsx("span", { className: "flex items-center", children: t })
1862
916
  ]
1863
917
  }
1864
918
  );
1865
919
  }
1866
920
  );
1867
- Dt.displayName = "Badge";
1868
- const Jt = ce(
1869
- ({
1870
- children: n,
1871
- iconBefore: r,
921
+ st.displayName = "Badge";
922
+ const ot = Q(
923
+ function({
924
+ children: t,
925
+ iconBefore: n,
1872
926
  iconAfter: s,
1873
- loading: t = !1,
1874
- loadingText: a = "Loading...",
1875
- fullWidth: l = !1,
1876
- variant: i = "default",
1877
- size: d = "md",
1878
- disabled: v,
1879
- className: h,
927
+ loading: a = !1,
928
+ loadingText: l = "Loading...",
929
+ fullWidth: i = !1,
930
+ variant: c = "default",
931
+ size: u = "md",
932
+ weight: h = 400,
933
+ primaryColor: m = "#3b82f6",
934
+ disabled: d,
935
+ className: p,
1880
936
  type: y = "button",
1881
- // ✅ important fix
1882
- ...c
1883
- }, x) => {
1884
- const u = v || t, _ = {
937
+ style: T,
938
+ ...E
939
+ }, S) {
940
+ const k = d || a, j = m, _ = {
1885
941
  sm: "h-8 px-3 text-sm",
1886
942
  md: "h-10 px-4 text-sm",
1887
943
  lg: "h-12 px-6 text-base"
1888
- }, k = {
1889
- default: "bg-blue-600 text-white hover:bg-blue-600/90",
1890
- outline: "border border-zinc-300 text-zinc-900 hover:bg-zinc-100 dark:border-zinc-700 dark:text-white dark:hover:bg-zinc-800",
1891
- ghost: "text-zinc-900 hover:bg-zinc-100 dark:text-white dark:hover:bg-zinc-800"
944
+ }, C = {
945
+ default: {
946
+ backgroundColor: j,
947
+ color: "#fff"
948
+ },
949
+ outline: {
950
+ border: `1px solid ${j}`,
951
+ color: j,
952
+ backgroundColor: "transparent"
953
+ },
954
+ ghost: {
955
+ color: j,
956
+ backgroundColor: "transparent"
957
+ }
958
+ }, g = {
959
+ sm: 16,
960
+ md: 20,
961
+ lg: 24
962
+ }, f = {
963
+ width: g[u],
964
+ height: g[u],
965
+ display: "inline-flex",
966
+ alignItems: "center",
967
+ justifyContent: "center",
968
+ flexShrink: 0
969
+ // ✅ prevents icon collapse
1892
970
  };
1893
971
  return /* @__PURE__ */ e.jsx(
1894
972
  "button",
1895
973
  {
1896
- ref: x,
974
+ ref: S,
1897
975
  type: y,
1898
- disabled: u,
1899
- className: C(
1900
- "inline-flex items-center justify-center gap-2 rounded-lg font-medium transition-all duration-200",
1901
- "focus:outline-none focus:ring-2 focus:ring-blue-500/30",
1902
- "active:scale-[0.98]",
1903
- _[d],
1904
- k[i],
1905
- l && "w-full",
1906
- u && "opacity-60 cursor-not-allowed pointer-events-none",
1907
- h
976
+ disabled: k,
977
+ className: N(
978
+ "inline-flex items-center justify-center gap-2 rounded-lg",
979
+ "transition-all duration-200",
980
+ _[u],
981
+ i && "w-full",
982
+ k && "opacity-60 cursor-not-allowed pointer-events-none",
983
+ p
1908
984
  ),
1909
- ...c,
1910
- children: t ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1911
- /* @__PURE__ */ e.jsx("span", { className: "w-4 h-4 border-2 border-current border-t-transparent rounded-full animate-spin" }),
1912
- /* @__PURE__ */ e.jsx("span", { children: a })
985
+ style: {
986
+ fontWeight: h,
987
+ ...C[c],
988
+ ...T
989
+ },
990
+ ...E,
991
+ children: a ? /* @__PURE__ */ e.jsxs("span", { className: "inline-flex items-center gap-2", children: [
992
+ /* @__PURE__ */ e.jsx(
993
+ "span",
994
+ {
995
+ className: "border-2 border-current border-t-transparent rounded-full animate-spin",
996
+ style: {
997
+ width: g[u],
998
+ height: g[u],
999
+ flexShrink: 0
1000
+ }
1001
+ }
1002
+ ),
1003
+ /* @__PURE__ */ e.jsx("span", { children: l })
1913
1004
  ] }) : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1914
- r && /* @__PURE__ */ e.jsx("span", { className: "flex", children: r }),
1915
- /* @__PURE__ */ e.jsx("span", { children: n }),
1916
- s && /* @__PURE__ */ e.jsx("span", { className: "flex", children: s })
1005
+ n && /* @__PURE__ */ e.jsx("span", { style: f, children: n }),
1006
+ /* @__PURE__ */ e.jsx("span", { className: "whitespace-nowrap", children: t }),
1007
+ s && /* @__PURE__ */ e.jsx("span", { style: f, children: s })
1917
1008
  ] })
1918
1009
  }
1919
1010
  );
1920
1011
  }
1921
- ), Kt = ({
1922
- name: n,
1923
- options: r,
1924
- selectedValues: s = [],
1925
- onChange: t,
1012
+ );
1013
+ ot.displayName = "Button";
1014
+ const ht = ({
1015
+ name: r,
1016
+ options: t,
1017
+ selectedValues: n = [],
1018
+ onChange: s,
1926
1019
  disabled: a = !1,
1927
1020
  readOnly: l = !1,
1928
1021
  required: i = !1,
1929
- error: d,
1930
- className: v,
1022
+ error: c,
1023
+ className: u,
1931
1024
  customIcon: h,
1932
- style: y,
1933
- labelStyle: c,
1934
- iconSize: x = 20,
1935
- iconCheckedBgColor: u = "#2563eb",
1936
- iconUncheckedBorderColor: _ = "#9ca3af",
1937
- textColor: k = "#374151",
1938
- errorStyle: M,
1939
- darkMode: $ = !1
1025
+ style: m,
1026
+ labelStyle: d,
1027
+ iconSize: p = 20,
1028
+ iconCheckedBgColor: y = "#2563eb",
1029
+ iconUncheckedBorderColor: T = "#9ca3af",
1030
+ textColor: E = "#374151",
1031
+ errorStyle: S,
1032
+ darkMode: k = !1
1940
1033
  }) => {
1941
- const E = K(null), [A, R] = L(null), j = (b) => {
1942
- if (!t || a || l) return;
1943
- const m = s.includes(b) ? s.filter((p) => p !== b) : [...s, b];
1944
- t(m);
1034
+ const j = V(null), [_, C] = W(null), g = (f) => {
1035
+ if (!s || a || l) return;
1036
+ const b = n.includes(f) ? n.filter((x) => x !== f) : [...n, f];
1037
+ s(b);
1945
1038
  };
1946
- return X(() => {
1947
- const b = E.current;
1948
- if (!b) return;
1949
- const m = (p) => {
1950
- if (a || A === null) return;
1951
- const P = A;
1952
- (p.key === "ArrowDown" || p.key === "ArrowRight") && (p.preventDefault(), R((P + 1) % r.length)), (p.key === "ArrowUp" || p.key === "ArrowLeft") && (p.preventDefault(), R((P - 1 + r.length) % r.length)), (p.key === " " || p.key === "Enter") && (p.preventDefault(), j(r[P].value));
1039
+ return U(() => {
1040
+ const f = j.current;
1041
+ if (!f) return;
1042
+ const b = (x) => {
1043
+ if (a || _ === null) return;
1044
+ const $ = _;
1045
+ (x.key === "ArrowDown" || x.key === "ArrowRight") && (x.preventDefault(), C(($ + 1) % t.length)), (x.key === "ArrowUp" || x.key === "ArrowLeft") && (x.preventDefault(), C(($ - 1 + t.length) % t.length)), (x.key === " " || x.key === "Enter") && (x.preventDefault(), g(t[$].value));
1953
1046
  };
1954
- return b.addEventListener("keydown", m), () => b.removeEventListener("keydown", m);
1955
- }, [A, r, s, a]), /* @__PURE__ */ e.jsxs(
1047
+ return f.addEventListener("keydown", b), () => f.removeEventListener("keydown", b);
1048
+ }, [_, t, n, a]), /* @__PURE__ */ e.jsxs(
1956
1049
  "div",
1957
1050
  {
1958
- ref: E,
1051
+ ref: j,
1959
1052
  role: "group",
1960
1053
  "aria-disabled": a,
1961
- "aria-invalid": !!d,
1054
+ "aria-invalid": !!c,
1962
1055
  tabIndex: 0,
1963
- className: C("flex flex-col gap-2", v),
1964
- style: { ...y },
1056
+ className: N("flex flex-col gap-2", u),
1057
+ style: { ...m },
1965
1058
  children: [
1966
- r.map((b, m) => {
1967
- const p = s.includes(b.value), P = A === m;
1059
+ t.map((f, b) => {
1060
+ const x = n.includes(f.value), $ = _ === b;
1968
1061
  return /* @__PURE__ */ e.jsxs(
1969
1062
  "label",
1970
1063
  {
1971
- className: C(
1064
+ className: N(
1972
1065
  "flex items-center justify-between cursor-pointer select-none transition-opacity",
1973
1066
  a ? "opacity-50 cursor-not-allowed" : "opacity-100",
1974
- P ? "ring-2 ring-blue-400" : ""
1067
+ $ ? "ring-2 ring-blue-400" : ""
1975
1068
  ),
1976
- style: { ...c },
1977
- onFocus: () => R(m),
1069
+ style: { ...d },
1070
+ onFocus: () => C(b),
1978
1071
  children: [
1979
- /* @__PURE__ */ e.jsx("span", { style: { color: k, fontSize: 14 }, children: b.label }),
1072
+ /* @__PURE__ */ e.jsx("span", { style: { color: E, fontSize: 14 }, children: f.label }),
1980
1073
  /* @__PURE__ */ e.jsx(
1981
1074
  "input",
1982
1075
  {
1983
1076
  type: "checkbox",
1984
- name: n,
1985
- value: b.value,
1986
- checked: p,
1077
+ name: r,
1078
+ value: f.value,
1079
+ checked: x,
1987
1080
  disabled: a || l,
1988
1081
  required: i,
1989
- onChange: () => j(b.value),
1082
+ onChange: () => g(f.value),
1990
1083
  style: { display: "none" }
1991
1084
  }
1992
1085
  ),
1993
- h ? h(p) : /* @__PURE__ */ e.jsx(
1086
+ h ? h(x) : /* @__PURE__ */ e.jsx(
1994
1087
  "span",
1995
1088
  {
1996
1089
  style: {
1997
1090
  display: "inline-flex",
1998
1091
  justifyContent: "center",
1999
1092
  alignItems: "center",
2000
- width: x,
2001
- height: x,
1093
+ width: p,
1094
+ height: p,
2002
1095
  borderRadius: 4,
2003
- border: `2px solid ${p ? u : _}`,
2004
- backgroundColor: p ? u : "transparent",
1096
+ border: `2px solid ${x ? y : T}`,
1097
+ backgroundColor: x ? y : "transparent",
2005
1098
  transition: "all 0.25s ease"
2006
1099
  },
2007
- children: p && /* @__PURE__ */ e.jsx(
1100
+ children: x && /* @__PURE__ */ e.jsx(
2008
1101
  "svg",
2009
1102
  {
2010
1103
  viewBox: "0 0 24 24",
@@ -2013,7 +1106,7 @@ const Jt = ce(
2013
1106
  strokeWidth: 3,
2014
1107
  strokeLinecap: "round",
2015
1108
  strokeLinejoin: "round",
2016
- style: { width: x * 0.6, height: x * 0.6 },
1109
+ style: { width: p * 0.6, height: p * 0.6 },
2017
1110
  children: /* @__PURE__ */ e.jsx("polyline", { points: "20 6 9 17 4 12" })
2018
1111
  }
2019
1112
  )
@@ -2021,10 +1114,10 @@ const Jt = ce(
2021
1114
  )
2022
1115
  ]
2023
1116
  },
2024
- b.value
1117
+ f.value
2025
1118
  );
2026
1119
  }),
2027
- d && /* @__PURE__ */ e.jsx(
1120
+ c && /* @__PURE__ */ e.jsx(
2028
1121
  "p",
2029
1122
  {
2030
1123
  role: "alert",
@@ -2032,106 +1125,106 @@ const Jt = ce(
2032
1125
  color: "#dc2626",
2033
1126
  fontSize: 12,
2034
1127
  marginTop: 4,
2035
- ...M
1128
+ ...S
2036
1129
  },
2037
- children: d
1130
+ children: c
2038
1131
  }
2039
1132
  )
2040
1133
  ]
2041
1134
  }
2042
1135
  );
2043
- }, Zt = ({
2044
- name: n,
2045
- options: r,
2046
- selectedValue: s,
2047
- onChange: t,
1136
+ }, yt = ({
1137
+ name: r,
1138
+ options: t,
1139
+ selectedValue: n,
1140
+ onChange: s,
2048
1141
  disabled: a = !1,
2049
1142
  readOnly: l = !1,
2050
1143
  required: i = !1,
2051
- error: d,
2052
- className: v,
1144
+ error: c,
1145
+ className: u,
2053
1146
  style: h,
2054
- labelStyle: y,
2055
- iconSize: c = 20,
2056
- iconCheckedBgColor: x = "#2563eb",
2057
- iconUncheckedBorderColor: u = "#9ca3af",
2058
- textColor: _ = "#374151",
2059
- errorStyle: k,
2060
- darkMode: M = !1
1147
+ labelStyle: m,
1148
+ iconSize: d = 20,
1149
+ iconCheckedBgColor: p = "#2563eb",
1150
+ iconUncheckedBorderColor: y = "#9ca3af",
1151
+ textColor: T = "#374151",
1152
+ errorStyle: E,
1153
+ darkMode: S = !1
2061
1154
  }) => {
2062
- const $ = K(null), [E, A] = L(null);
2063
- return X(() => {
2064
- const R = $.current;
2065
- if (!R) return;
2066
- const j = (b) => {
1155
+ const k = V(null), [j, _] = W(null);
1156
+ return U(() => {
1157
+ const C = k.current;
1158
+ if (!C) return;
1159
+ const g = (f) => {
2067
1160
  if (a) return;
2068
- const m = E ?? r.findIndex((p) => p.value === s) ?? 0;
2069
- if (b.key === "ArrowDown" || b.key === "ArrowRight") {
2070
- b.preventDefault();
2071
- const p = (m + 1) % r.length;
2072
- t && t(r[p].value), A(p);
1161
+ const b = j ?? t.findIndex((x) => x.value === n) ?? 0;
1162
+ if (f.key === "ArrowDown" || f.key === "ArrowRight") {
1163
+ f.preventDefault();
1164
+ const x = (b + 1) % t.length;
1165
+ s && s(t[x].value), _(x);
2073
1166
  }
2074
- if (b.key === "ArrowUp" || b.key === "ArrowLeft") {
2075
- b.preventDefault();
2076
- const p = (m - 1 + r.length) % r.length;
2077
- t && t(r[p].value), A(p);
1167
+ if (f.key === "ArrowUp" || f.key === "ArrowLeft") {
1168
+ f.preventDefault();
1169
+ const x = (b - 1 + t.length) % t.length;
1170
+ s && s(t[x].value), _(x);
2078
1171
  }
2079
1172
  };
2080
- return R.addEventListener("keydown", j), () => R.removeEventListener("keydown", j);
2081
- }, [E, r, s, t, a]), /* @__PURE__ */ e.jsxs(
1173
+ return C.addEventListener("keydown", g), () => C.removeEventListener("keydown", g);
1174
+ }, [j, t, n, s, a]), /* @__PURE__ */ e.jsxs(
2082
1175
  "div",
2083
1176
  {
2084
- ref: $,
1177
+ ref: k,
2085
1178
  role: "radiogroup",
2086
1179
  "aria-disabled": a,
2087
- "aria-invalid": !!d,
2088
- className: C("flex flex-col gap-2", v),
1180
+ "aria-invalid": !!c,
1181
+ className: N("flex flex-col gap-2", u),
2089
1182
  style: { ...h },
2090
1183
  tabIndex: 0,
2091
1184
  children: [
2092
- r.map((R, j) => {
2093
- const b = s === R.value, m = E === j;
1185
+ t.map((C, g) => {
1186
+ const f = n === C.value, b = j === g;
2094
1187
  return /* @__PURE__ */ e.jsxs(
2095
1188
  "label",
2096
1189
  {
2097
- className: C(
1190
+ className: N(
2098
1191
  "flex items-center justify-between cursor-pointer select-none gap-2",
2099
1192
  a ? "opacity-50 cursor-not-allowed" : "opacity-100",
2100
- m ? "ring-2 ring-blue-400" : ""
1193
+ b ? "ring-2 ring-blue-400" : ""
2101
1194
  ),
2102
- style: { ...y },
1195
+ style: { ...m },
2103
1196
  children: [
2104
- /* @__PURE__ */ e.jsx("span", { style: { color: _, fontSize: 14 }, children: R.label }),
1197
+ /* @__PURE__ */ e.jsx("span", { style: { color: T, fontSize: 14 }, children: C.label }),
2105
1198
  /* @__PURE__ */ e.jsx(
2106
1199
  "input",
2107
1200
  {
2108
1201
  type: "radio",
2109
- name: n,
2110
- value: R.value,
2111
- checked: b,
1202
+ name: r,
1203
+ value: C.value,
1204
+ checked: f,
2112
1205
  disabled: a || l,
2113
1206
  required: i,
2114
- onChange: () => t && t(R.value),
1207
+ onChange: () => s && s(C.value),
2115
1208
  style: { display: "none" }
2116
1209
  }
2117
1210
  ),
2118
1211
  /* @__PURE__ */ e.jsx(
2119
1212
  "span",
2120
1213
  {
2121
- className: C("inline-flex items-center justify-center rounded-full transition-all"),
1214
+ className: N("inline-flex items-center justify-center rounded-full transition-all"),
2122
1215
  style: {
2123
- width: c,
2124
- height: c,
2125
- border: `2px solid ${b ? x : u}`,
2126
- backgroundColor: b ? x : "transparent",
1216
+ width: d,
1217
+ height: d,
1218
+ border: `2px solid ${f ? p : y}`,
1219
+ backgroundColor: f ? p : "transparent",
2127
1220
  transition: "all 0.2s ease"
2128
1221
  },
2129
- children: b && /* @__PURE__ */ e.jsx(
1222
+ children: f && /* @__PURE__ */ e.jsx(
2130
1223
  "span",
2131
1224
  {
2132
1225
  style: {
2133
- width: c / 2,
2134
- height: c / 2,
1226
+ width: d / 2,
1227
+ height: d / 2,
2135
1228
  borderRadius: "50%",
2136
1229
  backgroundColor: "#fff"
2137
1230
  }
@@ -2141,10 +1234,10 @@ const Jt = ce(
2141
1234
  )
2142
1235
  ]
2143
1236
  },
2144
- R.value
1237
+ C.value
2145
1238
  );
2146
1239
  }),
2147
- d && /* @__PURE__ */ e.jsx(
1240
+ c && /* @__PURE__ */ e.jsx(
2148
1241
  "p",
2149
1242
  {
2150
1243
  role: "alert",
@@ -2152,103 +1245,103 @@ const Jt = ce(
2152
1245
  color: "#dc2626",
2153
1246
  fontSize: 12,
2154
1247
  marginTop: 4,
2155
- ...k
1248
+ ...E
2156
1249
  },
2157
- children: d
1250
+ children: c
2158
1251
  }
2159
1252
  )
2160
1253
  ]
2161
1254
  }
2162
1255
  );
2163
- }, Qt = ({
2164
- name: n,
2165
- options: r,
2166
- selectedValues: s = [],
2167
- onChange: t,
1256
+ }, gt = ({
1257
+ name: r,
1258
+ options: t,
1259
+ selectedValues: n = [],
1260
+ onChange: s,
2168
1261
  disabled: a = !1,
2169
1262
  readOnly: l = !1,
2170
1263
  required: i = !1,
2171
- error: d,
2172
- className: v,
1264
+ error: c,
1265
+ className: u,
2173
1266
  style: h,
2174
- labelStyle: y,
2175
- iconSize: c = 20,
2176
- iconCheckedBgColor: x = "#2563eb",
2177
- switchBgColor: u = "#d1d5db",
2178
- textColor: _ = "#374151",
2179
- errorStyle: k,
2180
- darkMode: M = !1
1267
+ labelStyle: m,
1268
+ iconSize: d = 20,
1269
+ iconCheckedBgColor: p = "#2563eb",
1270
+ switchBgColor: y = "#d1d5db",
1271
+ textColor: T = "#374151",
1272
+ errorStyle: E,
1273
+ darkMode: S = !1
2181
1274
  }) => {
2182
- const $ = K(null), [E, A] = L(null), R = (j) => {
2183
- if (!t || a || l) return;
2184
- const b = s.includes(j) ? s.filter((m) => m !== j) : [...s, j];
2185
- t(b);
1275
+ const k = V(null), [j, _] = W(null), C = (g) => {
1276
+ if (!s || a || l) return;
1277
+ const f = n.includes(g) ? n.filter((b) => b !== g) : [...n, g];
1278
+ s(f);
2186
1279
  };
2187
- return X(() => {
2188
- const j = $.current;
2189
- if (!j) return;
2190
- const b = (m) => {
2191
- if (a || E === null) return;
2192
- const p = E;
2193
- if (m.key === "ArrowRight" || m.key === "ArrowDown") {
2194
- m.preventDefault();
2195
- const P = (p + 1) % r.length;
2196
- A(P);
1280
+ return U(() => {
1281
+ const g = k.current;
1282
+ if (!g) return;
1283
+ const f = (b) => {
1284
+ if (a || j === null) return;
1285
+ const x = j;
1286
+ if (b.key === "ArrowRight" || b.key === "ArrowDown") {
1287
+ b.preventDefault();
1288
+ const $ = (x + 1) % t.length;
1289
+ _($);
2197
1290
  }
2198
- if (m.key === "ArrowLeft" || m.key === "ArrowUp") {
2199
- m.preventDefault();
2200
- const P = (p - 1 + r.length) % r.length;
2201
- A(P);
1291
+ if (b.key === "ArrowLeft" || b.key === "ArrowUp") {
1292
+ b.preventDefault();
1293
+ const $ = (x - 1 + t.length) % t.length;
1294
+ _($);
2202
1295
  }
2203
- (m.key === " " || m.key === "Enter") && (m.preventDefault(), R(r[p].value));
1296
+ (b.key === " " || b.key === "Enter") && (b.preventDefault(), C(t[x].value));
2204
1297
  };
2205
- return j.addEventListener("keydown", b), () => j.removeEventListener("keydown", b);
2206
- }, [E, r, s, a]), /* @__PURE__ */ e.jsxs(
1298
+ return g.addEventListener("keydown", f), () => g.removeEventListener("keydown", f);
1299
+ }, [j, t, n, a]), /* @__PURE__ */ e.jsxs(
2207
1300
  "div",
2208
1301
  {
2209
- ref: $,
1302
+ ref: k,
2210
1303
  role: "group",
2211
1304
  "aria-disabled": a,
2212
- "aria-invalid": !!d,
1305
+ "aria-invalid": !!c,
2213
1306
  tabIndex: 0,
2214
- className: C("flex flex-col gap-2", v),
1307
+ className: N("flex flex-col gap-2", u),
2215
1308
  style: { ...h },
2216
1309
  children: [
2217
- r.map((j, b) => {
2218
- const m = s.includes(j.value), p = E === b;
1310
+ t.map((g, f) => {
1311
+ const b = n.includes(g.value), x = j === f;
2219
1312
  return /* @__PURE__ */ e.jsxs(
2220
1313
  "label",
2221
1314
  {
2222
- className: C(
1315
+ className: N(
2223
1316
  "flex items-center justify-between cursor-pointer select-none transition-opacity",
2224
1317
  a ? "opacity-50 cursor-not-allowed" : "opacity-100",
2225
- p ? "ring-2 ring-blue-400" : ""
1318
+ x ? "ring-2 ring-blue-400" : ""
2226
1319
  ),
2227
- style: { ...y },
2228
- onFocus: () => A(b),
1320
+ style: { ...m },
1321
+ onFocus: () => _(f),
2229
1322
  children: [
2230
- /* @__PURE__ */ e.jsx("span", { style: { color: _, fontSize: 14 }, children: j.label }),
1323
+ /* @__PURE__ */ e.jsx("span", { style: { color: T, fontSize: 14 }, children: g.label }),
2231
1324
  /* @__PURE__ */ e.jsx(
2232
1325
  "input",
2233
1326
  {
2234
1327
  type: "checkbox",
2235
- name: n,
2236
- value: j.value,
2237
- checked: m,
1328
+ name: r,
1329
+ value: g.value,
1330
+ checked: b,
2238
1331
  disabled: a || l,
2239
1332
  required: i,
2240
- onChange: () => R(j.value),
1333
+ onChange: () => C(g.value),
2241
1334
  style: { display: "none" }
2242
1335
  }
2243
1336
  ),
2244
1337
  /* @__PURE__ */ e.jsx(
2245
1338
  "span",
2246
1339
  {
2247
- className: C("relative inline-flex rounded-full transition-colors"),
1340
+ className: N("relative inline-flex rounded-full transition-colors"),
2248
1341
  style: {
2249
- width: c * 2,
2250
- height: c * 1.1,
2251
- backgroundColor: m ? x : u,
1342
+ width: d * 2,
1343
+ height: d * 1.1,
1344
+ backgroundColor: b ? p : y,
2252
1345
  transition: "background-color 0.25s ease",
2253
1346
  borderRadius: 9999
2254
1347
  },
@@ -2258,10 +1351,10 @@ const Jt = ce(
2258
1351
  style: {
2259
1352
  position: "absolute",
2260
1353
  top: "50%",
2261
- left: m ? `calc(100% - ${c - 4}px - 2px)` : "2px",
1354
+ left: b ? `calc(100% - ${d - 4}px - 2px)` : "2px",
2262
1355
  transform: "translateY(-50%)",
2263
- width: c - 4,
2264
- height: c - 4,
1356
+ width: d - 4,
1357
+ height: d - 4,
2265
1358
  borderRadius: "50%",
2266
1359
  backgroundColor: "#fff",
2267
1360
  boxShadow: "0 1px 2px rgba(0,0,0,0.3)",
@@ -2273,10 +1366,10 @@ const Jt = ce(
2273
1366
  )
2274
1367
  ]
2275
1368
  },
2276
- j.value
1369
+ g.value
2277
1370
  );
2278
1371
  }),
2279
- d && /* @__PURE__ */ e.jsx(
1372
+ c && /* @__PURE__ */ e.jsx(
2280
1373
  "p",
2281
1374
  {
2282
1375
  role: "alert",
@@ -2284,170 +1377,78 @@ const Jt = ce(
2284
1377
  color: "#dc2626",
2285
1378
  fontSize: 12,
2286
1379
  marginTop: 4,
2287
- ...k
1380
+ ...E
2288
1381
  },
2289
- children: d
1382
+ children: c
2290
1383
  }
2291
1384
  )
2292
1385
  ]
2293
1386
  }
2294
1387
  );
2295
- }, Ot = {
1388
+ }, at = {
2296
1389
  sm: "max-w-sm",
2297
1390
  md: "max-w-md",
2298
1391
  lg: "max-w-lg",
2299
1392
  xl: "max-w-xl",
2300
1393
  "2xl": "max-w-2xl",
2301
- full: "w-full"
2302
- }, Ft = {
1394
+ full: "w-full h-full"
1395
+ }, lt = {
2303
1396
  none: "p-0",
2304
1397
  sm: "p-4",
2305
1398
  md: "p-6",
2306
1399
  lg: "p-8",
2307
1400
  xl: "p-12"
2308
- }, Bt = {
2309
- none: "gap-0",
2310
- sm: "gap-2",
2311
- md: "gap-4",
2312
- lg: "gap-6",
2313
- xl: "gap-8"
2314
- };
2315
- function se(n, r) {
2316
- return n ? typeof n != "object" ? r(n) : Object.entries(n).map(([s, t]) => `${s}:${r(t)}`).join(" ") : "";
2317
- }
2318
- const er = ({
2319
- size: n = "lg",
2320
- padding: r = "md",
2321
- center: s = !0,
2322
- display: t = "block",
2323
- direction: a,
2324
- align: l,
2325
- justify: i,
2326
- wrap: d,
2327
- cols: v,
2328
- gap: h,
2329
- className: y = "",
2330
- children: c
1401
+ }, vt = ({
1402
+ size: r = "full",
1403
+ padding: t = "none",
1404
+ center: n = !0,
1405
+ className: s = "",
1406
+ children: a
2331
1407
  }) => {
2332
- const x = C(
1408
+ const l = N(
2333
1409
  "w-full box-border",
2334
- /* Size & Padding */
2335
- se(n, (u) => Ot[u]),
2336
- se(r, (u) => Ft[u]),
2337
- s && "mx-auto",
2338
- /* Display */
2339
- t === "flex" && "flex",
2340
- t === "grid" && "grid",
2341
- /* Flex */
2342
- t === "flex" && se(a, (u) => `flex-${u}`),
2343
- t === "flex" && se(l, (u) => `items-${u}`),
2344
- t === "flex" && se(i, (u) => `justify-${u}`),
2345
- t === "flex" && se(d, (u) => `flex-${u}`),
2346
- /* Grid */
2347
- t === "grid" && se(v, (u) => `grid-cols-${u}`),
2348
- t === "grid" && se(h, (u) => Bt[u]),
2349
- y
2350
- );
2351
- return /* @__PURE__ */ e.jsx("div", { className: x, children: c });
2352
- }, ae = (n, r) => r == null ? "" : typeof r != "object" ? `${n}-${r}` : Object.entries(r).map(([s, t]) => `${s}:${n}-${t}`).join(" "), tr = ({
2353
- direction: n = { sm: "column", md: "row" },
2354
- align: r = "center",
2355
- justify: s = "between",
2356
- wrap: t = "wrap",
2357
- gap: a,
2358
- padding: l,
2359
- margin: i,
2360
- className: d,
2361
- children: v
2362
- }) => {
2363
- const h = C(
2364
- "flex",
2365
- ae("flex", n),
2366
- ae("items", r),
2367
- ae("justify", s),
2368
- ae("flex", t),
2369
- // wrap classes: flex-wrap, flex-nowrap, flex-wrap-reverse
2370
- a ? ae("gap", a) : "",
2371
- l ? ae("p", l) : "",
2372
- i ? ae("m", i) : "",
2373
- d
2374
- );
2375
- return /* @__PURE__ */ e.jsx("div", { className: h, children: v });
2376
- }, Re = (n, r) => r == null ? "" : typeof r != "object" ? `${n}-${r}` : Object.entries(r).map(([s, t]) => `${s}:${n}-${t}`).join(" "), De = ({
2377
- direction: n = { sm: "vertical", md: "horizontal" },
2378
- gap: r = 4,
2379
- align: s = "center",
2380
- justify: t = "start",
2381
- wrap: a = "nowrap",
2382
- className: l,
2383
- children: i
2384
- }) => {
2385
- const d = C(
2386
- "flex",
2387
- Re("flex", n),
2388
- // flex-col or flex-row
2389
- Re("gap", r),
2390
- s !== "stretch" ? `items-${s}` : "items-stretch",
2391
- t !== "start" ? `justify-${t}` : "justify-start",
2392
- a !== "nowrap" ? `flex-${a}` : "flex-nowrap",
2393
- l
2394
- );
2395
- return /* @__PURE__ */ e.jsx("div", { className: d, children: i });
2396
- }, rr = (n) => /* @__PURE__ */ e.jsx(De, { direction: "horizontal", ...n }), nr = (n) => /* @__PURE__ */ e.jsx(De, { direction: "vertical", ...n }), pe = (n, r) => r == null ? "" : typeof r != "object" ? `${n}-${r}` : Object.entries(r).map(([s, t]) => `${s}:${n}-${t}`).join(" "), sr = ({
2397
- columns: n = { sm: 1, md: 2, lg: 3 },
2398
- gap: r = 4,
2399
- padding: s = 4,
2400
- alignItems: t = "stretch",
2401
- justifyItems: a = "stretch",
2402
- className: l,
2403
- children: i
2404
- }) => {
2405
- const d = C(
2406
- "grid",
2407
- pe("grid-cols", n),
2408
- pe("gap", r),
2409
- pe("p", s),
2410
- t !== "stretch" ? `items-${t}` : "items-stretch",
2411
- a !== "stretch" ? `justify-items-${a}` : "justify-items-stretch",
2412
- l
1410
+ at[r],
1411
+ lt[t],
1412
+ n && "mx-auto",
1413
+ s
2413
1414
  );
2414
- return /* @__PURE__ */ e.jsx("div", { className: d, children: i });
2415
- }, or = ({
2416
- label: n = "Open Drawer",
2417
- icon: r,
2418
- iconPosition: s = "left",
2419
- onClick: t,
1415
+ return /* @__PURE__ */ e.jsx("div", { className: l, children: a });
1416
+ }, wt = ({
1417
+ label: r = "Open Drawer",
1418
+ icon: t,
1419
+ iconPosition: n = "left",
1420
+ onClick: s,
2420
1421
  className: a = ""
2421
1422
  }) => /* @__PURE__ */ e.jsxs(
2422
1423
  "button",
2423
1424
  {
2424
1425
  type: "button",
2425
- onClick: t,
1426
+ onClick: s,
2426
1427
  className: `inline-flex items-center justify-center gap-2 px-4 py-2 rounded-md font-medium text-white bg-blue-600 hover:bg-blue-700 transition-colors focus:outline-none focus:ring-2 focus:ring-blue-400 ${a}`,
2427
1428
  children: [
2428
- r && s === "left" && r,
2429
- n,
2430
- r && s === "right" && r
1429
+ t && n === "left" && t,
1430
+ r,
1431
+ t && n === "right" && t
2431
1432
  ]
2432
1433
  }
2433
- ), ar = ({
2434
- open: n,
2435
- onClose: r,
2436
- position: s = "right",
2437
- size: t = "320px",
1434
+ ), kt = ({
1435
+ open: r,
1436
+ onClose: t,
1437
+ position: n = "right",
1438
+ size: s = "320px",
2438
1439
  children: a,
2439
1440
  showCloseButton: l = !0,
2440
1441
  className: i = "",
2441
- overlayClassName: d = "",
2442
- closeButtonClassName: v = ""
1442
+ overlayClassName: c = "",
1443
+ closeButtonClassName: u = ""
2443
1444
  }) => {
2444
- const [h, y] = L(n);
2445
- X(() => {
2446
- n ? y(!0) : setTimeout(() => y(!1), 300);
2447
- }, [n]);
2448
- const c = ue(() => {
2449
- if (n) return "translate(0,0)";
2450
- switch (s) {
1445
+ const [h, m] = W(r);
1446
+ U(() => {
1447
+ r ? m(!0) : setTimeout(() => m(!1), 300);
1448
+ }, [r]);
1449
+ const d = te(() => {
1450
+ if (r) return "translate(0,0)";
1451
+ switch (n) {
2451
1452
  case "left":
2452
1453
  return "translateX(-100%)";
2453
1454
  case "right":
@@ -2459,13 +1460,13 @@ const er = ({
2459
1460
  default:
2460
1461
  return "translate(0,0)";
2461
1462
  }
2462
- }, [n, s]);
2463
- return !h && !n ? null : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1463
+ }, [r, n]);
1464
+ return !h && !r ? null : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
2464
1465
  /* @__PURE__ */ e.jsx(
2465
1466
  "div",
2466
1467
  {
2467
- onClick: r,
2468
- className: `fixed inset-0 bg-black/50 transition-opacity ${n ? "opacity-100" : "opacity-0"} ${d}`
1468
+ onClick: t,
1469
+ className: `fixed inset-0 bg-black/50 transition-opacity ${r ? "opacity-100" : "opacity-0"} ${c}`
2469
1470
  }
2470
1471
  ),
2471
1472
  /* @__PURE__ */ e.jsxs(
@@ -2473,22 +1474,22 @@ const er = ({
2473
1474
  {
2474
1475
  className: `fixed bg-white shadow-lg flex flex-col transition-transform duration-300 ${i}`,
2475
1476
  style: {
2476
- width: s === "left" || s === "right" ? t : "100%",
2477
- height: s === "top" || s === "bottom" ? t : "100%",
2478
- top: (s === "bottom" || s === "top") && s === "bottom" ? "auto" : 0,
2479
- bottom: s === "bottom" ? 0 : "auto",
2480
- left: s === "left" ? 0 : s === "right" ? "auto" : 0,
2481
- right: s === "right" ? 0 : s === "left" ? "auto" : 0,
2482
- transform: c
1477
+ width: n === "left" || n === "right" ? s : "100%",
1478
+ height: n === "top" || n === "bottom" ? s : "100%",
1479
+ top: (n === "bottom" || n === "top") && n === "bottom" ? "auto" : 0,
1480
+ bottom: n === "bottom" ? 0 : "auto",
1481
+ left: n === "left" ? 0 : n === "right" ? "auto" : 0,
1482
+ right: n === "right" ? 0 : n === "left" ? "auto" : 0,
1483
+ transform: d
2483
1484
  },
2484
1485
  children: [
2485
1486
  l && /* @__PURE__ */ e.jsx(
2486
1487
  "button",
2487
1488
  {
2488
- onClick: r,
2489
- className: `absolute top-4 right-4 p-1 rounded-full hover:bg-gray-200 transition-colors ${v}`,
1489
+ onClick: t,
1490
+ className: `absolute top-4 right-4 p-1 rounded-full hover:bg-gray-200 transition-colors ${u}`,
2490
1491
  "aria-label": "Close drawer",
2491
- children: /* @__PURE__ */ e.jsx(je, { size: 20 })
1492
+ children: /* @__PURE__ */ e.jsx(ie, { size: 20 })
2492
1493
  }
2493
1494
  ),
2494
1495
  /* @__PURE__ */ e.jsx("div", { className: "flex-1 overflow-auto p-4", children: a })
@@ -2496,44 +1497,44 @@ const er = ({
2496
1497
  }
2497
1498
  )
2498
1499
  ] });
2499
- }, Yt = ce(
2500
- (n, r) => {
1500
+ }, it = Q(
1501
+ (r, t) => {
2501
1502
  const {
2502
- label: s,
2503
- name: t = "",
1503
+ label: n,
1504
+ name: s = "",
2504
1505
  value: a,
2505
1506
  defaultValue: l,
2506
1507
  onChange: i,
2507
- options: d = [],
2508
- placeholder: v = "Select an option",
1508
+ options: c = [],
1509
+ placeholder: u = "Select an option",
2509
1510
  required: h,
2510
- disabled: y,
2511
- error: c,
2512
- success: x,
2513
- helperText: u,
2514
- labelIcon: _,
2515
- prefixIcon: k,
2516
- variant: M = "dark",
2517
- primaryTheme: $ = !0,
2518
- primaryColor: E = "#3b82f6",
2519
- containerClassName: A = "",
2520
- labelClassName: R = "",
2521
- triggerClassName: j = "",
2522
- dropdownClassName: b = "",
2523
- optionClassName: m = "",
2524
- className: p = ""
2525
- } = n, P = K(null);
2526
- Ee(r, () => P.current);
2527
- const [O, q] = L(!1), [Y, W] = L(l || ""), F = a !== void 0 ? a : Y, N = d.find((w) => w.value === F);
2528
- X(() => {
2529
- const w = (I) => {
2530
- P.current && !P.current.contains(I.target) && q(!1);
1511
+ disabled: m,
1512
+ error: d,
1513
+ success: p,
1514
+ helperText: y,
1515
+ labelIcon: T,
1516
+ prefixIcon: E,
1517
+ variant: S = "dark",
1518
+ primaryTheme: k = !0,
1519
+ primaryColor: j = "#3b82f6",
1520
+ containerClassName: _ = "",
1521
+ labelClassName: C = "",
1522
+ triggerClassName: g = "",
1523
+ dropdownClassName: f = "",
1524
+ optionClassName: b = "",
1525
+ className: x = ""
1526
+ } = r, $ = V(null);
1527
+ be(t, () => $.current);
1528
+ const [M, O] = W(!1), [P, F] = W(l || ""), I = a !== void 0 ? a : P, R = c.find((w) => w.value === I);
1529
+ U(() => {
1530
+ const w = (L) => {
1531
+ $.current && !$.current.contains(L.target) && O(!1);
2531
1532
  };
2532
1533
  return document.addEventListener("mousedown", w), () => document.removeEventListener("mousedown", w);
2533
1534
  }, []);
2534
- const f = (w) => {
2535
- W(w.value), i?.(t, w.value), q(!1);
2536
- }, S = {
1535
+ const z = (w) => {
1536
+ F(w.value), i?.(s, w.value), O(!1);
1537
+ }, A = {
2537
1538
  dark: {
2538
1539
  bg: "bg-zinc-900",
2539
1540
  text: "text-white",
@@ -2548,86 +1549,86 @@ const er = ({
2548
1549
  dropdown: "bg-white border-gray-200",
2549
1550
  option: "text-gray-700 hover:bg-gray-100"
2550
1551
  }
2551
- }[M], V = $ ? {} : { color: E }, G = $ ? {} : { borderColor: E }, Z = $ ? {} : { backgroundColor: `${E}20` }, o = c ? "border-rose-500" : x ? "border-emerald-500" : S.border, g = k ? "pl-12 pr-10" : "px-4";
1552
+ }[S], Y = k ? {} : { color: j }, B = k ? {} : { borderColor: j }, q = k ? {} : { backgroundColor: `${j}20` }, o = d ? "border-rose-500" : p ? "border-emerald-500" : A.border, v = E ? "pl-12 pr-10" : "px-4";
2552
1553
  return /* @__PURE__ */ e.jsxs(
2553
1554
  "div",
2554
1555
  {
2555
- ref: P,
2556
- className: `w-full space-y-1 ${A} ${p}`,
1556
+ ref: $,
1557
+ className: `w-full space-y-1 ${_} ${x}`,
2557
1558
  children: [
2558
- s && /* @__PURE__ */ e.jsxs(
1559
+ n && /* @__PURE__ */ e.jsxs(
2559
1560
  "label",
2560
1561
  {
2561
- className: `flex items-center gap-2 text-[13px] font-medium ${R}`,
1562
+ className: `flex items-center gap-2 text-[13px] font-medium ${C}`,
2562
1563
  children: [
2563
- _ && /* @__PURE__ */ e.jsx(
2564
- _,
1564
+ T && /* @__PURE__ */ e.jsx(
1565
+ T,
2565
1566
  {
2566
- className: $ ? "w-4 h-4 text-[var(--primary)]" : "w-4 h-4",
2567
- style: $ ? void 0 : V
1567
+ className: k ? "w-4 h-4 text-[var(--primary)]" : "w-4 h-4",
1568
+ style: k ? void 0 : Y
2568
1569
  }
2569
1570
  ),
2570
- s,
1571
+ n,
2571
1572
  h && /* @__PURE__ */ e.jsx("span", { className: "text-rose-500", children: "*" })
2572
1573
  ]
2573
1574
  }
2574
1575
  ),
2575
1576
  /* @__PURE__ */ e.jsxs("div", { className: "relative group", children: [
2576
- k && /* @__PURE__ */ e.jsx("div", { className: "absolute left-4 top-1/2 -translate-y-1/2 z-10", children: /* @__PURE__ */ e.jsx(
2577
- k,
1577
+ E && /* @__PURE__ */ e.jsx("div", { className: "absolute left-4 top-1/2 -translate-y-1/2 z-10", children: /* @__PURE__ */ e.jsx(
1578
+ E,
2578
1579
  {
2579
- className: $ ? "w-4 h-4 text-zinc-500 group-focus-within:text-[var(--primary)]" : "w-4 h-4 text-zinc-500",
2580
- style: $ ? void 0 : V
1580
+ className: k ? "w-4 h-4 text-zinc-500 group-focus-within:text-[var(--primary)]" : "w-4 h-4 text-zinc-500",
1581
+ style: k ? void 0 : Y
2581
1582
  }
2582
1583
  ) }),
2583
1584
  /* @__PURE__ */ e.jsxs(
2584
1585
  "button",
2585
1586
  {
2586
1587
  type: "button",
2587
- disabled: y,
2588
- onClick: () => q((w) => !w),
2589
- style: $ ? void 0 : G,
1588
+ disabled: m,
1589
+ onClick: () => O((w) => !w),
1590
+ style: k ? void 0 : B,
2590
1591
  className: `
2591
1592
  w-full py-2.5 rounded-lg text-left text-sm
2592
1593
  border transition-all duration-200
2593
- ${S.bg} ${S.text}
2594
- ${g}
1594
+ ${A.bg} ${A.text}
1595
+ ${v}
2595
1596
  ${o}
2596
1597
  focus:ring-2
2597
- ${$ ? "focus:ring-[var(--primary)]/30 focus:border-[var(--primary)]" : ""}
1598
+ ${k ? "focus:ring-[var(--primary)]/30 focus:border-[var(--primary)]" : ""}
2598
1599
  disabled:opacity-50 disabled:cursor-not-allowed
2599
- ${j}
1600
+ ${g}
2600
1601
  `,
2601
1602
  children: [
2602
- /* @__PURE__ */ e.jsx("span", { className: N ? S.text : "text-zinc-500", children: N ? N.label : v }),
1603
+ /* @__PURE__ */ e.jsx("span", { className: R ? A.text : "text-zinc-500", children: R ? R.label : u }),
2603
1604
  /* @__PURE__ */ e.jsx(
2604
- Me,
1605
+ ye,
2605
1606
  {
2606
- className: `absolute right-4 top-1/2 -translate-y-1/2 w-4 h-4 transition-transform ${O ? "rotate-180" : ""} text-zinc-400`
1607
+ className: `absolute right-4 top-1/2 -translate-y-1/2 w-4 h-4 transition-transform ${M ? "rotate-180" : ""} text-zinc-400`
2607
1608
  }
2608
1609
  )
2609
1610
  ]
2610
1611
  }
2611
1612
  ),
2612
- O && /* @__PURE__ */ e.jsx(
1613
+ M && /* @__PURE__ */ e.jsx(
2613
1614
  "div",
2614
1615
  {
2615
1616
  className: `
2616
1617
  absolute z-50 mt-2 w-full rounded-xl border shadow-xl overflow-hidden
2617
- ${S.dropdown}
2618
- ${b}
1618
+ ${A.dropdown}
1619
+ ${f}
2619
1620
  `,
2620
- children: /* @__PURE__ */ e.jsx("ul", { className: "max-h-60 overflow-y-auto", children: d.map((w) => {
2621
- const I = F === w.value;
1621
+ children: /* @__PURE__ */ e.jsx("ul", { className: "max-h-60 overflow-y-auto", children: c.map((w) => {
1622
+ const L = I === w.value;
2622
1623
  return /* @__PURE__ */ e.jsxs(
2623
1624
  "li",
2624
1625
  {
2625
- onClick: () => f(w),
2626
- style: !$ && I ? Z : void 0,
1626
+ onClick: () => z(w),
1627
+ style: !k && L ? q : void 0,
2627
1628
  className: `
2628
1629
  px-4 py-3 cursor-pointer text-sm flex items-center gap-2
2629
- ${I ? $ ? "bg-[var(--primary)]/15 text-[var(--primary)]" : "" : S.option}
2630
- ${m}
1630
+ ${L ? k ? "bg-[var(--primary)]/15 text-[var(--primary)]" : "" : A.option}
1631
+ ${b}
2631
1632
  `,
2632
1633
  children: [
2633
1634
  w.icon && /* @__PURE__ */ e.jsx("span", { children: w.icon }),
@@ -2640,11 +1641,11 @@ const er = ({
2640
1641
  }
2641
1642
  )
2642
1643
  ] }),
2643
- (u || c) && /* @__PURE__ */ e.jsx(
1644
+ (y || d) && /* @__PURE__ */ e.jsx(
2644
1645
  "p",
2645
1646
  {
2646
- className: `text-xs ${c ? "text-rose-500" : x ? "text-emerald-500" : "text-zinc-500"}`,
2647
- children: typeof c == "string" ? c : u
1647
+ className: `text-xs ${d ? "text-rose-500" : p ? "text-emerald-500" : "text-zinc-500"}`,
1648
+ children: typeof d == "string" ? d : y
2648
1649
  }
2649
1650
  )
2650
1651
  ]
@@ -2652,449 +1653,448 @@ const er = ({
2652
1653
  );
2653
1654
  }
2654
1655
  );
2655
- Yt.displayName = "Dropdown";
2656
- const lr = ce((n, r) => {
2657
- const {
2658
- label: s,
2659
- name: t = "",
2660
- type: a = "text",
2661
- placeholder: l = "",
2662
- value: i,
2663
- defaultValue: d,
2664
- onChange: v,
2665
- required: h,
2666
- disabled: y,
2667
- readOnly: c,
2668
- error: x,
2669
- success: u,
2670
- helperText: _,
2671
- icon: k,
2672
- prefix: M,
2673
- prefixIcon: $,
2674
- suffixIcon: E,
2675
- min: A,
2676
- max: R,
2677
- step: j,
2678
- rows: b = 4,
2679
- primaryTheme: m = !0,
2680
- primaryColor: p = "#3b82f6",
2681
- className: P = ""
2682
- } = n, O = K(null);
2683
- Ee(r, () => O.current);
2684
- const [q, Y] = L(d || ""), [W, F] = L(!1), N = !!$, f = !!M, S = N || f, V = i !== void 0 ? i : q, G = (H) => {
2685
- const te = H.target.value;
2686
- Y(te), v?.(t, te);
2687
- }, Z = (H) => {
2688
- a === "number" && H.key === "-" && H.preventDefault();
2689
- }, o = () => S ? N && f ? "pl-20 pr-4" : f ? "pl-14 pr-4" : N ? "pl-10 pr-4" : "px-4" : "px-4", g = m ? {} : {
2690
- borderColor: p,
2691
- boxShadow: `0 0 0 1px ${p}`
2692
- }, w = m ? {} : { color: p }, I = x ? "border-red-500" : u ? "border-emerald-500" : "border-zinc-300 dark:border-zinc-800";
2693
- return /* @__PURE__ */ e.jsxs("div", { className: `w-full space-y-1 ${P}`, children: [
2694
- s && /* @__PURE__ */ e.jsxs("label", { className: "flex items-center gap-2 text-[12px] font-medium text-gray-700 dark:text-zinc-100", children: [
2695
- k && /* @__PURE__ */ e.jsx(
2696
- k,
2697
- {
2698
- size: 16,
2699
- className: m ? "text-[var(--primary)]" : "",
2700
- style: m ? void 0 : w
2701
- }
2702
- ),
2703
- s,
2704
- h && /* @__PURE__ */ e.jsx("span", { className: "text-red-500", children: "*" })
2705
- ] }),
2706
- /* @__PURE__ */ e.jsxs("div", { className: "relative", children: [
2707
- S && /* @__PURE__ */ e.jsxs("div", { className: "absolute inset-y-0 left-0 flex items-center pl-3 gap-2 text-sm text-zinc-400 pointer-events-none", children: [
2708
- $ && /* @__PURE__ */ e.jsx($, { size: 14 }),
2709
- f && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
2710
- /* @__PURE__ */ e.jsx("span", { className: "font-medium text-zinc-600 dark:text-zinc-200", children: M }),
2711
- /* @__PURE__ */ e.jsx("span", { className: "h-4 w-px bg-zinc-300 dark:bg-zinc-700" })
2712
- ] })
1656
+ it.displayName = "Dropdown";
1657
+ const jt = Q(
1658
+ function(t, n) {
1659
+ const {
1660
+ label: s,
1661
+ name: a = "",
1662
+ type: l = "text",
1663
+ placeholder: i = "",
1664
+ value: c,
1665
+ defaultValue: u,
1666
+ onChange: h,
1667
+ required: m,
1668
+ disabled: d,
1669
+ readOnly: p,
1670
+ error: y,
1671
+ success: T,
1672
+ helperText: E,
1673
+ icon: S,
1674
+ prefix: k,
1675
+ prefixIcon: j,
1676
+ suffixIcon: _,
1677
+ min: C,
1678
+ max: g,
1679
+ step: f,
1680
+ rows: b = 4,
1681
+ primaryTheme: x = !0,
1682
+ primaryColor: $ = "#3b82f6",
1683
+ className: M = ""
1684
+ } = t, O = V(null);
1685
+ be(n, () => O.current);
1686
+ const [P, F] = W(u || ""), [I, R] = W(!1), z = !!j, A = !!k, Y = z || A, B = c !== void 0 ? c : P, q = (G) => {
1687
+ const D = G.target.value;
1688
+ F(D), h?.(a, D);
1689
+ }, o = (G) => {
1690
+ l === "number" && G.key === "-" && G.preventDefault();
1691
+ }, v = () => Y ? z && A ? "pl-20 pr-4" : A ? "pl-14 pr-4" : z ? "pl-10 pr-4" : "px-4" : "px-4", w = x ? {} : { borderColor: $, boxShadow: `0 0 0 1px ${$}` }, L = x ? {} : { color: $ }, X = y ? "border-red-500" : T ? "border-emerald-500" : "border-zinc-300 dark:border-zinc-800";
1692
+ return /* @__PURE__ */ e.jsxs("div", { className: `w-full space-y-1 ${M}`, children: [
1693
+ s && /* @__PURE__ */ e.jsxs("label", { className: "flex items-center gap-2 text-[12px] font-medium text-gray-700 dark:text-zinc-100", children: [
1694
+ S && /* @__PURE__ */ e.jsx(
1695
+ S,
1696
+ {
1697
+ size: 16,
1698
+ className: x ? "text-[var(--primary)]" : "",
1699
+ style: x ? void 0 : L
1700
+ }
1701
+ ),
1702
+ s,
1703
+ m && /* @__PURE__ */ e.jsx("span", { className: "text-red-500", children: "*" })
2713
1704
  ] }),
2714
- a === "textarea" ? /* @__PURE__ */ e.jsx(
2715
- "textarea",
2716
- {
2717
- ref: O,
2718
- name: t,
2719
- value: V,
2720
- onChange: G,
2721
- placeholder: l,
2722
- required: h,
2723
- disabled: y,
2724
- readOnly: c,
2725
- rows: b,
2726
- style: m ? void 0 : g,
2727
- className: `
2728
- w-full rounded-lg text-sm
2729
- bg-white dark:bg-zinc-900 border
2730
- text-gray-900 dark:text-white
2731
- placeholder:text-zinc-400
2732
- py-2.5 outline-none
2733
- focus:ring-1
2734
- ${m && "focus:ring-[var(--primary)] focus:border-[var(--primary)]"}
2735
- ${o()}
2736
- ${I}
2737
- `
2738
- }
2739
- ) : /* @__PURE__ */ e.jsx(
2740
- "input",
2741
- {
2742
- ref: O,
2743
- type: a === "password" ? W ? "text" : "password" : a,
2744
- name: t,
2745
- value: V,
2746
- onChange: G,
2747
- onKeyDown: Z,
2748
- placeholder: l,
2749
- required: h,
2750
- disabled: y,
2751
- readOnly: c,
2752
- min: a === "number" ? A ?? 0 : void 0,
2753
- max: R,
2754
- step: j,
2755
- style: m ? void 0 : g,
2756
- className: `
2757
- w-full rounded-lg text-sm
2758
- bg-white dark:bg-zinc-900 border
2759
- text-gray-900 dark:text-white
2760
- placeholder:text-zinc-400
2761
- py-2.5 outline-none
2762
- focus:ring-1
2763
- disabled:opacity-50 disabled:cursor-not-allowed
2764
- ${m && "focus:ring-[var(--primary)] focus:border-[var(--primary)]"}
2765
- ${o()}
2766
- ${I}
2767
- `
2768
- }
2769
- ),
2770
- a === "password" && /* @__PURE__ */ e.jsx(
2771
- "button",
1705
+ /* @__PURE__ */ e.jsxs("div", { className: "relative", children: [
1706
+ Y && /* @__PURE__ */ e.jsxs("div", { className: "absolute inset-y-0 left-0 flex items-center pl-3 gap-2 text-sm text-zinc-400 pointer-events-none", children: [
1707
+ j && /* @__PURE__ */ e.jsx(j, { size: 14 }),
1708
+ A && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1709
+ /* @__PURE__ */ e.jsx("span", { className: "font-medium text-zinc-600 dark:text-zinc-200", children: k }),
1710
+ /* @__PURE__ */ e.jsx("span", { className: "h-4 w-px bg-zinc-300 dark:bg-zinc-700" })
1711
+ ] })
1712
+ ] }),
1713
+ l === "textarea" ? /* @__PURE__ */ e.jsx(
1714
+ "textarea",
1715
+ {
1716
+ ref: O,
1717
+ name: a,
1718
+ value: B,
1719
+ onChange: q,
1720
+ placeholder: i,
1721
+ required: m,
1722
+ disabled: d,
1723
+ readOnly: p,
1724
+ rows: b,
1725
+ style: x ? void 0 : w,
1726
+ className: `
1727
+ w-full rounded-lg text-sm
1728
+ bg-white dark:bg-zinc-900 border
1729
+ text-gray-900 dark:text-white
1730
+ placeholder:text-zinc-400
1731
+ py-2.5 outline-none
1732
+ focus:ring-1
1733
+ ${x && "focus:ring-[var(--primary)] focus:border-[var(--primary)]"}
1734
+ ${v()}
1735
+ ${X}
1736
+ `
1737
+ }
1738
+ ) : /* @__PURE__ */ e.jsx(
1739
+ "input",
1740
+ {
1741
+ ref: O,
1742
+ type: l === "password" ? I ? "text" : "password" : l,
1743
+ name: a,
1744
+ value: B,
1745
+ onChange: q,
1746
+ onKeyDown: o,
1747
+ placeholder: i,
1748
+ required: m,
1749
+ disabled: d,
1750
+ readOnly: p,
1751
+ min: l === "number" ? C ?? 0 : void 0,
1752
+ max: g,
1753
+ step: f,
1754
+ style: x ? void 0 : w,
1755
+ className: `
1756
+ w-full rounded-lg text-sm
1757
+ bg-white dark:bg-zinc-900 border
1758
+ text-gray-900 dark:text-white
1759
+ placeholder:text-zinc-400
1760
+ py-2.5 outline-none
1761
+ focus:ring-1
1762
+ disabled:opacity-50 disabled:cursor-not-allowed
1763
+ ${x && "focus:ring-[var(--primary)] focus:border-[var(--primary)]"}
1764
+ ${v()}
1765
+ ${X}
1766
+ `
1767
+ }
1768
+ ),
1769
+ l === "password" && /* @__PURE__ */ e.jsx(
1770
+ "button",
1771
+ {
1772
+ type: "button",
1773
+ onClick: () => R(!I),
1774
+ className: "absolute right-3 top-1/2 -translate-y-1/2 text-zinc-400",
1775
+ children: I ? /* @__PURE__ */ e.jsx(Ye, { size: 18 }) : /* @__PURE__ */ e.jsx(Be, { size: 18 })
1776
+ }
1777
+ ),
1778
+ _ && l !== "password" && /* @__PURE__ */ e.jsx("span", { className: "absolute right-3 top-1/2 -translate-y-1/2 text-zinc-400", children: _ })
1779
+ ] }),
1780
+ (E || y) && /* @__PURE__ */ e.jsx(
1781
+ "p",
2772
1782
  {
2773
- type: "button",
2774
- onClick: () => F(!W),
2775
- className: "absolute right-3 top-1/2 -translate-y-1/2 text-zinc-400",
2776
- children: W ? /* @__PURE__ */ e.jsx(st, { size: 18 }) : /* @__PURE__ */ e.jsx(at, { size: 18 })
1783
+ className: `text-xs ${y ? "text-red-500" : T ? "text-emerald-500" : "text-zinc-500"}`,
1784
+ children: y && typeof y == "string" ? y : E
2777
1785
  }
2778
- ),
2779
- E && a !== "password" && /* @__PURE__ */ e.jsx("span", { className: "absolute right-3 top-1/2 -translate-y-1/2 text-zinc-400", children: E })
2780
- ] }),
2781
- (_ || x) && /* @__PURE__ */ e.jsx(
2782
- "p",
2783
- {
2784
- className: `text-xs ${x ? "text-red-500" : u ? "text-emerald-500" : "text-zinc-500"}`,
2785
- children: x && typeof x == "string" ? x : _
2786
- }
2787
- )
2788
- ] });
2789
- }), ir = ({
2790
- src: n,
2791
- alt: r = "Image",
2792
- title: s,
2793
- width: t = "w-full",
1786
+ )
1787
+ ] });
1788
+ }
1789
+ ), Nt = ({
1790
+ src: r,
1791
+ alt: t = "Image",
1792
+ title: n,
1793
+ width: s = "w-full",
2794
1794
  height: a = "h-auto",
2795
1795
  rounded: l = "rounded-lg",
2796
1796
  borderColor: i = "transparent",
2797
- borderWidth: d = "0",
2798
- shadow: v = !1,
1797
+ borderWidth: c = "0",
1798
+ shadow: u = !1,
2799
1799
  opacity: h = 1,
2800
- objectFit: y = "cover",
2801
- overlayText: c,
2802
- overlayColor: x = "rgba(0,0,0,0.5)",
2803
- svgIcon: u,
2804
- responsive: _ = !1,
2805
- p: k,
2806
- m: M,
2807
- hoverScale: $ = 1.05,
2808
- hoverRotate: E = 0,
2809
- hoverOpacity: A,
2810
- hoverShadow: R = !1,
2811
- transitionDuration: j = "300ms",
2812
- overflow: b = "hidden",
2813
- className: m = "",
2814
- style: p,
2815
- onClick: P,
2816
- onLoad: O,
2817
- onError: q
1800
+ objectFit: m = "cover",
1801
+ overlayText: d,
1802
+ overlayColor: p = "rgba(0,0,0,0.5)",
1803
+ svgIcon: y,
1804
+ responsive: T = !1,
1805
+ p: E,
1806
+ m: S,
1807
+ hoverScale: k = 1.05,
1808
+ hoverRotate: j = 0,
1809
+ hoverOpacity: _,
1810
+ hoverShadow: C = !1,
1811
+ transitionDuration: g = "300ms",
1812
+ overflow: f = "hidden",
1813
+ className: b = "",
1814
+ style: x,
1815
+ onClick: $,
1816
+ onLoad: M,
1817
+ onError: O
2818
1818
  }) => {
2819
- const Y = ue(() => [
1819
+ const P = te(() => [
2820
1820
  "relative inline-block transition-all",
2821
- v ? "shadow-md" : "",
1821
+ u ? "shadow-md" : "",
2822
1822
  l,
2823
- k ?? "",
2824
- M ?? "",
2825
- _ ? "w-full h-auto" : "",
2826
- m
2827
- ].join(" "), [v, l, k, M, _, m]), W = ue(
1823
+ E ?? "",
1824
+ S ?? "",
1825
+ T ? "w-full h-auto" : "",
1826
+ b
1827
+ ].join(" "), [u, l, E, S, T, b]), F = te(
2828
1828
  () => ({
2829
- width: typeof t == "number" ? t : void 0,
1829
+ width: typeof s == "number" ? s : void 0,
2830
1830
  height: typeof a == "number" ? a : void 0,
2831
- objectFit: y,
1831
+ objectFit: m,
2832
1832
  opacity: h,
2833
1833
  borderColor: i,
2834
- borderWidth: d,
2835
- transition: `all ${j} ease`,
2836
- ...p
1834
+ borderWidth: c,
1835
+ transition: `all ${g} ease`,
1836
+ ...x
2837
1837
  }),
2838
- [t, a, y, h, i, d, j, p]
2839
- ), F = ue(() => {
2840
- switch (b) {
1838
+ [s, a, m, h, i, c, g, x]
1839
+ ), I = te(() => {
1840
+ switch (f) {
2841
1841
  case "x":
2842
1842
  return { overflowX: "hidden" };
2843
1843
  case "y":
2844
1844
  return { overflowY: "hidden" };
2845
1845
  default:
2846
- return { overflow: b };
1846
+ return { overflow: f };
2847
1847
  }
2848
- }, [b]), N = (S) => {
2849
- A !== void 0 && (S.currentTarget.style.opacity = A.toString()), S.currentTarget.style.transform = `scale(${$}) rotate(${E}deg)`, R && (S.currentTarget.style.boxShadow = "0 8px 20px rgba(0,0,0,0.3)");
2850
- }, f = (S) => {
2851
- S.currentTarget.style.opacity = h.toString(), S.currentTarget.style.transform = "scale(1) rotate(0deg)", R && (S.currentTarget.style.boxShadow = "");
1848
+ }, [f]), R = (A) => {
1849
+ _ !== void 0 && (A.currentTarget.style.opacity = _.toString()), A.currentTarget.style.transform = `scale(${k}) rotate(${j}deg)`, C && (A.currentTarget.style.boxShadow = "0 8px 20px rgba(0,0,0,0.3)");
1850
+ }, z = (A) => {
1851
+ A.currentTarget.style.opacity = h.toString(), A.currentTarget.style.transform = "scale(1) rotate(0deg)", C && (A.currentTarget.style.boxShadow = "");
2852
1852
  };
2853
1853
  return /* @__PURE__ */ e.jsxs(
2854
1854
  "div",
2855
1855
  {
2856
1856
  role: "img",
2857
- "aria-label": r,
2858
- title: s || r,
2859
- onClick: P,
2860
- className: Y,
2861
- style: { position: "relative", cursor: P ? "pointer" : "default", ...F },
1857
+ "aria-label": t,
1858
+ title: n || t,
1859
+ onClick: $,
1860
+ className: P,
1861
+ style: { position: "relative", cursor: $ ? "pointer" : "default", ...I },
2862
1862
  children: [
2863
- u ? /* @__PURE__ */ e.jsx("div", { className: "w-full h-full flex items-center justify-center", children: u }) : /* @__PURE__ */ e.jsx(
1863
+ y ? /* @__PURE__ */ e.jsx("div", { className: "w-full h-full flex items-center justify-center", children: y }) : /* @__PURE__ */ e.jsx(
2864
1864
  "img",
2865
1865
  {
2866
- src: n,
2867
- alt: r,
2868
- title: s || r,
1866
+ src: r,
1867
+ alt: t,
1868
+ title: n || t,
2869
1869
  loading: "lazy",
2870
- style: W,
1870
+ style: F,
2871
1871
  className: "block",
2872
- onLoad: O,
2873
- onError: q,
2874
- onMouseEnter: N,
2875
- onMouseLeave: f
1872
+ onLoad: M,
1873
+ onError: O,
1874
+ onMouseEnter: R,
1875
+ onMouseLeave: z
2876
1876
  }
2877
1877
  ),
2878
- c && /* @__PURE__ */ e.jsx(
1878
+ d && /* @__PURE__ */ e.jsx(
2879
1879
  "div",
2880
1880
  {
2881
- style: { backgroundColor: x },
1881
+ style: { backgroundColor: p },
2882
1882
  className: "absolute inset-0 flex items-center justify-center text-white font-bold text-center p-4",
2883
- children: c
1883
+ children: d
2884
1884
  }
2885
1885
  )
2886
1886
  ]
2887
1887
  }
2888
1888
  );
2889
- }, Oe = ({
2890
- text: n,
2891
- icon: r,
2892
- onClick: s,
2893
- subItems: t,
1889
+ }, we = ({
1890
+ text: r,
1891
+ icon: t,
1892
+ onClick: n,
1893
+ subItems: s,
2894
1894
  isInline: a,
2895
1895
  isOrdered: l,
2896
1896
  primaryTheme: i = !0,
2897
- primaryColor: d = "#3b82f6",
2898
- itemClassName: v,
1897
+ primaryColor: c = "#3b82f6",
1898
+ itemClassName: u,
2899
1899
  bulletClassName: h
2900
1900
  }) => {
2901
- const y = i ? {} : { color: d }, c = i ? {} : { backgroundColor: d };
2902
- return /* @__PURE__ */ e.jsxs("li", { className: C(!a && "mb-3"), children: [
1901
+ const m = i ? {} : { color: c }, d = i ? {} : { backgroundColor: c };
1902
+ return /* @__PURE__ */ e.jsxs("li", { className: N(!a && "mb-3"), children: [
2903
1903
  /* @__PURE__ */ e.jsxs(
2904
1904
  "div",
2905
1905
  {
2906
- onClick: s,
2907
- style: i ? void 0 : y,
2908
- className: C(
1906
+ onClick: n,
1907
+ style: i ? void 0 : m,
1908
+ className: N(
2909
1909
  "flex items-center gap-2 text-sm text-zinc-800 dark:text-zinc-200 transition-all",
2910
- s && (i ? "cursor-pointer hover:text-[var(--primary)]" : "cursor-pointer"),
2911
- v
1910
+ n && (i ? "cursor-pointer hover:text-[var(--primary)]" : "cursor-pointer"),
1911
+ u
2912
1912
  ),
2913
1913
  children: [
2914
- r ? /* @__PURE__ */ e.jsx("span", { className: "text-base", children: r }) : !a && !l && /* @__PURE__ */ e.jsx(
1914
+ t ? /* @__PURE__ */ e.jsx("span", { className: "text-base", children: t }) : !a && !l && /* @__PURE__ */ e.jsx(
2915
1915
  "span",
2916
1916
  {
2917
- style: i ? void 0 : c,
2918
- className: C(
1917
+ style: i ? void 0 : d,
1918
+ className: N(
2919
1919
  "w-2 h-2 rounded-full",
2920
1920
  i && "bg-[var(--primary)]",
2921
1921
  h
2922
1922
  )
2923
1923
  }
2924
1924
  ),
2925
- /* @__PURE__ */ e.jsx("span", { children: n })
1925
+ /* @__PURE__ */ e.jsx("span", { children: r })
2926
1926
  ]
2927
1927
  }
2928
1928
  ),
2929
- t && t.length > 0 && /* @__PURE__ */ e.jsx(
1929
+ s && s.length > 0 && /* @__PURE__ */ e.jsx(
2930
1930
  "ul",
2931
1931
  {
2932
- className: C(
1932
+ className: N(
2933
1933
  "pl-5 mt-2 space-y-2",
2934
1934
  l ? "list-decimal" : "list-none"
2935
1935
  ),
2936
- children: t.map((x, u) => /* @__PURE__ */ e.jsx(
2937
- Oe,
1936
+ children: s.map((p, y) => /* @__PURE__ */ e.jsx(
1937
+ we,
2938
1938
  {
2939
- ...x,
1939
+ ...p,
2940
1940
  isInline: !1,
2941
1941
  isOrdered: l,
2942
1942
  primaryTheme: i,
2943
- primaryColor: d,
2944
- itemClassName: v,
1943
+ primaryColor: c,
1944
+ itemClassName: u,
2945
1945
  bulletClassName: h
2946
1946
  },
2947
- u
1947
+ y
2948
1948
  ))
2949
1949
  }
2950
1950
  )
2951
1951
  ] });
2952
- }, cr = ({
2953
- title: n,
2954
- titleIcon: r,
2955
- items: s,
2956
- type: t = "unordered",
1952
+ }, Et = ({
1953
+ title: r,
1954
+ titleIcon: t,
1955
+ items: n,
1956
+ type: s = "unordered",
2957
1957
  primaryTheme: a = !0,
2958
1958
  primaryColor: l = "#3b82f6",
2959
1959
  className: i,
2960
- itemClassName: d,
2961
- titleClassName: v,
1960
+ itemClassName: c,
1961
+ titleClassName: u,
2962
1962
  bulletClassName: h
2963
1963
  }) => {
2964
- const y = t === "ordered", c = t === "inline", x = y ? "ol" : "ul";
1964
+ const m = s === "ordered", d = s === "inline", p = m ? "ol" : "ul";
2965
1965
  return /* @__PURE__ */ e.jsxs(
2966
1966
  "div",
2967
1967
  {
2968
- className: C(
1968
+ className: N(
2969
1969
  "bg-white dark:bg-zinc-900 border border-zinc-200 dark:border-zinc-800 rounded-xl p-4",
2970
1970
  i
2971
1971
  ),
2972
1972
  children: [
2973
- n && /* @__PURE__ */ e.jsxs(
1973
+ r && /* @__PURE__ */ e.jsxs(
2974
1974
  "div",
2975
1975
  {
2976
- className: C(
1976
+ className: N(
2977
1977
  "flex items-center gap-2 mb-3 text-base font-semibold text-zinc-900 dark:text-white",
2978
- v
1978
+ u
2979
1979
  ),
2980
1980
  children: [
2981
- r && /* @__PURE__ */ e.jsx("span", { children: r }),
2982
- /* @__PURE__ */ e.jsx("span", { children: n })
1981
+ t && /* @__PURE__ */ e.jsx("span", { children: t }),
1982
+ /* @__PURE__ */ e.jsx("span", { children: r })
2983
1983
  ]
2984
1984
  }
2985
1985
  ),
2986
1986
  /* @__PURE__ */ e.jsx(
2987
- x,
1987
+ p,
2988
1988
  {
2989
- className: C(
2990
- c ? "flex flex-wrap gap-4" : y ? "list-decimal pl-5 space-y-2" : "list-none p-0"
1989
+ className: N(
1990
+ d ? "flex flex-wrap gap-4" : m ? "list-decimal pl-5 space-y-2" : "list-none p-0"
2991
1991
  ),
2992
- children: s.map((u, _) => /* @__PURE__ */ e.jsx(
2993
- Oe,
1992
+ children: n.map((y, T) => /* @__PURE__ */ e.jsx(
1993
+ we,
2994
1994
  {
2995
- ...u,
2996
- isInline: c,
2997
- isOrdered: y,
1995
+ ...y,
1996
+ isInline: d,
1997
+ isOrdered: m,
2998
1998
  primaryTheme: a,
2999
1999
  primaryColor: l,
3000
- itemClassName: d,
2000
+ itemClassName: c,
3001
2001
  bulletClassName: h
3002
2002
  },
3003
- _
2003
+ T
3004
2004
  ))
3005
2005
  }
3006
2006
  )
3007
2007
  ]
3008
2008
  }
3009
2009
  );
3010
- }, dr = ({
3011
- isOpen: n,
3012
- onClose: r,
3013
- children: s,
3014
- title: t,
2010
+ }, Ct = ({
2011
+ isOpen: r,
2012
+ onClose: t,
2013
+ children: n,
2014
+ title: s,
3015
2015
  icon: a,
3016
2016
  ariaLabel: l,
3017
2017
  className: i,
3018
- overlayClassName: d,
3019
- contentClassName: v,
2018
+ overlayClassName: c,
2019
+ contentClassName: u,
3020
2020
  closeButtonClassName: h,
3021
- disableOverlayClose: y = !1,
3022
- darkMode: c = !1,
3023
- transitionDuration: x = 200
2021
+ disableOverlayClose: m = !1,
2022
+ darkMode: d = !1,
2023
+ transitionDuration: p = 200
3024
2024
  }) => {
3025
- const u = K(null);
3026
- X(() => {
3027
- const k = (M) => {
3028
- M.key === "Escape" && r();
2025
+ const y = V(null);
2026
+ U(() => {
2027
+ const E = (S) => {
2028
+ S.key === "Escape" && t();
3029
2029
  };
3030
- return n && document.addEventListener("keydown", k), () => document.removeEventListener("keydown", k);
3031
- }, [n, r]), X(() => {
3032
- if (n) {
3033
- const k = document.body.style.overflow;
2030
+ return r && document.addEventListener("keydown", E), () => document.removeEventListener("keydown", E);
2031
+ }, [r, t]), U(() => {
2032
+ if (r) {
2033
+ const E = document.body.style.overflow;
3034
2034
  return document.body.style.overflow = "hidden", () => {
3035
- document.body.style.overflow = k;
2035
+ document.body.style.overflow = E;
3036
2036
  };
3037
2037
  }
3038
- }, [n]);
3039
- const _ = me(() => {
3040
- y || r();
3041
- }, [y, r]);
3042
- return n ? /* @__PURE__ */ e.jsx(
2038
+ }, [r]);
2039
+ const T = ae(() => {
2040
+ m || t();
2041
+ }, [m, t]);
2042
+ return r ? /* @__PURE__ */ e.jsx(
3043
2043
  "div",
3044
2044
  {
3045
2045
  role: "dialog",
3046
2046
  "aria-modal": "true",
3047
- "aria-label": l || t || "Modal",
3048
- className: C(
2047
+ "aria-label": l || s || "Modal",
2048
+ className: N(
3049
2049
  "fixed inset-0 flex items-center justify-center z-50 transition-opacity",
3050
- c ? "bg-black/80" : "bg-black/60",
3051
- d
2050
+ d ? "bg-black/80" : "bg-black/60",
2051
+ c
3052
2052
  ),
3053
- style: { transitionDuration: `${x}ms` },
3054
- onClick: _,
2053
+ style: { transitionDuration: `${p}ms` },
2054
+ onClick: T,
3055
2055
  children: /* @__PURE__ */ e.jsxs(
3056
2056
  "div",
3057
2057
  {
3058
- ref: u,
3059
- className: C(
2058
+ ref: y,
2059
+ className: N(
3060
2060
  "relative w-[90vw] max-w-2xl max-h-[90vh] overflow-y-auto p-6 rounded-lg shadow-lg transition-transform",
3061
- c ? "bg-zinc-900 text-white" : "bg-white text-gray-900",
2061
+ d ? "bg-zinc-900 text-white" : "bg-white text-gray-900",
3062
2062
  "scale-100",
3063
- v
2063
+ u
3064
2064
  ),
3065
- style: { transitionDuration: `${x}ms` },
3066
- onClick: (k) => k.stopPropagation(),
2065
+ style: { transitionDuration: `${p}ms` },
2066
+ onClick: (E) => E.stopPropagation(),
3067
2067
  children: [
3068
2068
  /* @__PURE__ */ e.jsx(
3069
2069
  "button",
3070
2070
  {
3071
- onClick: r,
2071
+ onClick: t,
3072
2072
  "aria-label": "Close modal",
3073
- className: C(
2073
+ className: N(
3074
2074
  "absolute top-4 right-4 p-1 rounded-full hover:scale-110 transition-transform",
3075
- c ? "text-white hover:text-gray-200" : "text-gray-700 hover:text-gray-900",
2075
+ d ? "text-white hover:text-gray-200" : "text-gray-700 hover:text-gray-900",
3076
2076
  h
3077
2077
  ),
3078
- children: /* @__PURE__ */ e.jsx(je, { size: 24 })
2078
+ children: /* @__PURE__ */ e.jsx(ie, { size: 24 })
3079
2079
  }
3080
2080
  ),
3081
- t && /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2 mb-4", children: [
2081
+ s && /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2 mb-4", children: [
3082
2082
  a && /* @__PURE__ */ e.jsx("span", { className: "flex-shrink-0", children: a }),
3083
- /* @__PURE__ */ e.jsx("h2", { className: "text-xl font-semibold", children: t })
2083
+ /* @__PURE__ */ e.jsx("h2", { className: "text-xl font-semibold", children: s })
3084
2084
  ] }),
3085
- s
2085
+ n
3086
2086
  ]
3087
2087
  }
3088
2088
  )
3089
2089
  }
3090
2090
  ) : null;
3091
- }, ur = ({ children: n, style: r, className: s }) => /* @__PURE__ */ e.jsx(
2091
+ }, Tt = ({ children: r, style: t, className: n }) => /* @__PURE__ */ e.jsx(
3092
2092
  "div",
3093
2093
  {
3094
- className: C("overflow-x-auto rounded-lg shadow-sm border border-gray-200", s),
2094
+ className: N("overflow-x-auto rounded-lg shadow-sm border border-gray-200", n),
3095
2095
  style: {
3096
2096
  background: "#ffffff",
3097
- ...r
2097
+ ...t
3098
2098
  },
3099
2099
  children: /* @__PURE__ */ e.jsx(
3100
2100
  "table",
@@ -3105,333 +2105,494 @@ const lr = ce((n, r) => {
3105
2105
  borderRadius: 12,
3106
2106
  overflow: "hidden"
3107
2107
  },
3108
- children: n
2108
+ children: r
3109
2109
  }
3110
2110
  )
3111
2111
  }
3112
- ), fr = ({
3113
- children: n,
3114
- style: r,
3115
- className: s
2112
+ ), $t = ({
2113
+ children: r,
2114
+ style: t,
2115
+ className: n
3116
2116
  }) => /* @__PURE__ */ e.jsx(
3117
2117
  "thead",
3118
2118
  {
3119
- className: C("bg-gray-100 text-gray-900 font-semibold", s),
2119
+ className: N("bg-gray-100 text-gray-900 font-semibold", n),
3120
2120
  style: {
3121
- ...r
2121
+ ...t
3122
2122
  },
3123
- children: n
2123
+ children: r
3124
2124
  }
3125
- ), xr = ({ children: n, style: r, className: s }) => /* @__PURE__ */ e.jsx("tbody", { className: C("bg-white", s), style: { ...r }, children: n }), pr = ({
3126
- children: n,
3127
- style: r,
3128
- className: s,
3129
- onClick: t,
2125
+ ), Rt = ({ children: r, style: t, className: n }) => /* @__PURE__ */ e.jsx("tbody", { className: N("bg-white", n), style: { ...t }, children: r }), _t = ({
2126
+ children: r,
2127
+ style: t,
2128
+ className: n,
2129
+ onClick: s,
3130
2130
  hoverBgColor: a = "#f9fafb",
3131
2131
  darkMode: l = !1
3132
2132
  }) => /* @__PURE__ */ e.jsx(
3133
2133
  "tr",
3134
2134
  {
3135
- className: C(
2135
+ className: N(
3136
2136
  "transition-colors duration-200 cursor-default",
3137
- t ? "hover:cursor-pointer" : "",
3138
- s
2137
+ s ? "hover:cursor-pointer" : "",
2138
+ n
3139
2139
  ),
3140
- style: { borderBottom: "1px solid #e5e7eb", ...r },
3141
- onClick: t,
2140
+ style: { borderBottom: "1px solid #e5e7eb", ...t },
2141
+ onClick: s,
3142
2142
  onMouseEnter: (i) => {
3143
2143
  l ? i.currentTarget.style.backgroundColor = "#1f2937" : i.currentTarget.style.backgroundColor = a;
3144
2144
  },
3145
2145
  onMouseLeave: (i) => {
3146
2146
  i.currentTarget.style.backgroundColor = "transparent";
3147
2147
  },
3148
- children: n
2148
+ children: r
3149
2149
  }
3150
- ), hr = ({ children: n, style: r, className: s }) => /* @__PURE__ */ e.jsx(
2150
+ ), At = ({ children: r, style: t, className: n }) => /* @__PURE__ */ e.jsx(
3151
2151
  "th",
3152
2152
  {
3153
- className: C("text-left px-4 py-3 text-sm text-gray-700 border-b-2 border-gray-200", s),
3154
- style: { ...r },
3155
- children: n
2153
+ className: N("text-left px-4 py-3 text-sm text-gray-700 border-b-2 border-gray-200", n),
2154
+ style: { ...t },
2155
+ children: r
3156
2156
  }
3157
- ), mr = ({ children: n, style: r, className: s }) => /* @__PURE__ */ e.jsx(
2157
+ ), St = ({ children: r, style: t, className: n }) => /* @__PURE__ */ e.jsx(
3158
2158
  "td",
3159
2159
  {
3160
- className: C("px-4 py-3 text-sm text-gray-600", s),
3161
- style: { ...r },
3162
- children: n
2160
+ className: N("px-4 py-3 text-sm text-gray-600", n),
2161
+ style: { ...t },
2162
+ children: r
3163
2163
  }
3164
- ), br = ({
3165
- tabs: n,
3166
- defaultActive: r = 0,
3167
- position: s = "top",
3168
- variant: t = "solid",
2164
+ );
2165
+ function ct(r = 768) {
2166
+ const [t, n] = W(!1);
2167
+ return U(() => {
2168
+ const s = window.matchMedia(`(max-width: ${r}px)`), a = (l) => n(l.matches);
2169
+ return n(s.matches), s.addEventListener("change", a), () => s.removeEventListener("change", a);
2170
+ }, [r]), t;
2171
+ }
2172
+ const ke = xe(null);
2173
+ function re() {
2174
+ const r = me(ke);
2175
+ if (!r) throw new Error("<Tab>, <TabList>, <TabPanel> must be inside <Tabs>");
2176
+ return r;
2177
+ }
2178
+ const zt = ({
2179
+ children: r,
2180
+ defaultActive: t = 0,
2181
+ position: n = "top",
2182
+ variant: s = "solid",
3169
2183
  fullWidth: a = !1,
3170
- gap: l = 8,
3171
- radius: i = 8,
3172
- padding: d = "12px 18px",
3173
- transitionDuration: v = 200,
3174
- elevation: h = 1,
3175
- bordered: y = !1,
3176
- primaryColor: c = "#2563eb",
3177
- backgroundColor: x = "transparent",
3178
- textColor: u = "#374151",
3179
- hoverColor: _ = "#1d4ed8",
3180
- activeColor: k = "#ffffff",
3181
- borderColor: M = "#e5e7eb",
3182
- disabledColor: $ = "#9ca3af",
3183
- responsiveBreakpoint: E = 768,
3184
- showDrawerLabel: A = "Select Tab",
3185
- drawerIcon: R = "☰",
3186
- onTabChange: j,
3187
- className: b = "",
3188
- style: m,
3189
- tabClassName: p = "",
3190
- contentClassName: P = "",
3191
- activeTabStyle: O,
3192
- inactiveTabStyle: q,
3193
- contentStyle: Y
2184
+ radius: l = 8,
2185
+ transitionDuration: i = 200,
2186
+ bordered: c = !1,
2187
+ mobileBreakpoint: u = 768,
2188
+ mobileVariant: h = "scroll",
2189
+ primaryColor: m = "#2563eb",
2190
+ activeColor: d = "#ffffff",
2191
+ textColor: p = "#374151",
2192
+ hoverColor: y = "#1d4ed8",
2193
+ borderColor: T = "#e5e7eb",
2194
+ disabledColor: E = "#9ca3af",
2195
+ backgroundColor: S = "transparent",
2196
+ onTabChange: k,
2197
+ tabCount: j = 0,
2198
+ style: _,
2199
+ className: C
3194
2200
  }) => {
3195
- const [W, F] = L(r), [N, f] = L(null), [S, V] = L(!1), [G, Z] = L(!1), o = K(null);
3196
- X(() => {
3197
- const T = () => V(window.innerWidth <= E);
3198
- return T(), window.addEventListener("resize", T), () => window.removeEventListener("resize", T);
3199
- }, [E]);
3200
- const g = (T) => {
3201
- n[T].disabled || (F(T), j?.(T), S && Z(!1));
3202
- }, w = (T, D) => {
3203
- T.key === "ArrowRight" || T.key === "ArrowDown" ? (T.preventDefault(), g((D + 1) % n.length)) : (T.key === "ArrowLeft" || T.key === "ArrowUp") && (T.preventDefault(), g((D - 1 + n.length) % n.length));
3204
- }, I = {
3205
- padding: d,
3206
- borderRadius: i,
3207
- cursor: "pointer",
3208
- display: "flex",
3209
- alignItems: "center",
3210
- gap: 8,
3211
- justifyContent: "center",
3212
- fontWeight: 500,
3213
- transition: `all ${v}ms ease`,
3214
- background: "transparent",
3215
- border: t === "outline" ? `1px solid ${M}` : "none",
3216
- borderBottom: t === "underline" ? "2px solid transparent" : void 0,
3217
- color: u,
3218
- width: a ? "100%" : "auto",
3219
- userSelect: "none"
3220
- }, H = {
3221
- background: t === "solid" ? c : "transparent",
3222
- color: k,
3223
- borderBottom: t === "underline" ? `2px solid ${c}` : void 0,
3224
- boxShadow: h > 0 ? `0 ${h}px ${h * 4}px ${c}33` : void 0,
3225
- ...O
3226
- }, te = {
3227
- ...t === "outline" ? { borderColor: M } : {},
3228
- ...t === "underline" ? { borderBottomColor: "transparent" } : {},
3229
- ...q
3230
- }, B = {
3231
- color: _,
3232
- background: t === "solid" ? `${c}11` : t === "outline" ? `${c}11` : "transparent"
3233
- }, Q = {
3234
- color: $,
3235
- cursor: "not-allowed",
3236
- opacity: 0.6
3237
- }, J = {
3238
- flexGrow: 1,
3239
- borderTop: y && s === "top" ? `1px solid ${M}` : void 0,
3240
- borderLeft: y && s === "left" ? `1px solid ${M}` : void 0,
3241
- borderRight: y && s === "right" ? `1px solid ${M}` : void 0,
3242
- borderRadius: i,
3243
- ...Y
3244
- }, z = s === "left" || s === "right";
3245
- return /* @__PURE__ */ e.jsxs(
3246
- "div",
2201
+ const [g, f] = W(t), [b, x] = W(j), [$, M] = W(!1), O = V(null), P = ct(u);
2202
+ U(() => {
2203
+ !j && O.current && x(
2204
+ O.current.querySelectorAll("[data-tab-button]").length
2205
+ );
2206
+ }), U(() => {
2207
+ P || M(!1);
2208
+ }, [P]);
2209
+ const F = (z) => {
2210
+ f(z), k?.(z), P && h === "drawer" && M(!1);
2211
+ }, I = P && (n === "left" || n === "right") ? "top" : n, R = I === "left" || I === "right";
2212
+ return /* @__PURE__ */ e.jsx(
2213
+ ke.Provider,
3247
2214
  {
3248
- ref: o,
3249
- className: `modern-tabs ${b}`,
3250
- style: {
3251
- display: "flex",
3252
- flexDirection: z ? s === "right" ? "row-reverse" : "row" : "column",
3253
- background: x,
3254
- border: y ? `1px solid ${M}` : void 0,
3255
- borderRadius: i,
3256
- overflow: "hidden",
3257
- ...m
2215
+ value: {
2216
+ active: g,
2217
+ setActive: F,
2218
+ variant: s,
2219
+ position: I,
2220
+ primaryColor: m,
2221
+ activeColor: d,
2222
+ textColor: p,
2223
+ hoverColor: y,
2224
+ borderColor: T,
2225
+ disabledColor: E,
2226
+ radius: l,
2227
+ transitionDuration: i,
2228
+ fullWidth: a,
2229
+ tabCount: b,
2230
+ isMobile: P,
2231
+ mobileVariant: h,
2232
+ drawerOpen: $,
2233
+ setDrawerOpen: M
3258
2234
  },
3259
- children: [
3260
- /* @__PURE__ */ e.jsx("style", { children: `
3261
- @keyframes tab-fade {
3262
- from { opacity: 0; transform: translateY(5px); }
3263
- to { opacity: 1; transform: translateY(0); }
2235
+ children: /* @__PURE__ */ e.jsxs(
2236
+ "div",
2237
+ {
2238
+ ref: O,
2239
+ className: N(
2240
+ "modern-tabs",
2241
+ R ? "flex flex-row" : "flex flex-col",
2242
+ I === "right" && "flex-row-reverse",
2243
+ I === "bottom" && "flex-col-reverse",
2244
+ c && "border border-gray-200",
2245
+ C
2246
+ ),
2247
+ style: {
2248
+ background: S,
2249
+ borderRadius: l,
2250
+ overflow: "hidden",
2251
+ ..._
2252
+ },
2253
+ children: [
2254
+ /* @__PURE__ */ e.jsx("style", { children: `
2255
+ @keyframes tab-fade-in {
2256
+ from { opacity: 0; transform: translateY(4px); }
2257
+ to { opacity: 1; transform: translateY(0); }
2258
+ }
2259
+ @keyframes tab-drawer-open {
2260
+ from { opacity: 0; transform: translateY(-6px); }
2261
+ to { opacity: 1; transform: translateY(0); }
2262
+ }
2263
+ .tab-panel-active {
2264
+ animation: tab-fade-in ${i}ms ease;
3264
2265
  }
3265
- .modern-tabs__content {
3266
- animation: tab-fade ${v}ms ease;
2266
+ .tab-drawer-menu {
2267
+ animation: tab-drawer-open ${i}ms ease;
2268
+ }
2269
+ /* scroll strip: hide scrollbar, enable snap */
2270
+ .tab-scroll-strip {
2271
+ overflow-x: auto;
2272
+ scrollbar-width: none;
2273
+ -ms-overflow-style: none;
2274
+ scroll-snap-type: x mandatory;
2275
+ -webkit-overflow-scrolling: touch;
2276
+ }
2277
+ .tab-scroll-strip::-webkit-scrollbar { display: none; }
2278
+ .tab-scroll-strip [data-tab-button] {
2279
+ scroll-snap-align: start;
2280
+ flex-shrink: 0;
3267
2281
  }
3268
2282
  ` }),
3269
- S ? /* @__PURE__ */ e.jsxs("div", { style: { width: "100%", padding: 8 }, children: [
2283
+ r
2284
+ ]
2285
+ }
2286
+ )
2287
+ }
2288
+ );
2289
+ }, dt = ({ open: r }) => /* @__PURE__ */ e.jsx(
2290
+ "svg",
2291
+ {
2292
+ width: "14",
2293
+ height: "14",
2294
+ viewBox: "0 0 24 24",
2295
+ fill: "none",
2296
+ stroke: "currentColor",
2297
+ strokeWidth: "2.5",
2298
+ strokeLinecap: "round",
2299
+ strokeLinejoin: "round",
2300
+ style: {
2301
+ transform: r ? "rotate(180deg)" : "rotate(0deg)",
2302
+ transition: "transform 200ms ease",
2303
+ display: "flex",
2304
+ flexShrink: 0
2305
+ },
2306
+ children: /* @__PURE__ */ e.jsx("polyline", { points: "6 9 12 15 18 9" })
2307
+ }
2308
+ ), It = ({
2309
+ children: r,
2310
+ gap: t = 8,
2311
+ drawerLabel: n = "Select tab",
2312
+ style: s,
2313
+ className: a
2314
+ }) => {
2315
+ const {
2316
+ position: l,
2317
+ isMobile: i,
2318
+ mobileVariant: c,
2319
+ drawerOpen: u,
2320
+ setDrawerOpen: h,
2321
+ primaryColor: m,
2322
+ activeColor: d,
2323
+ radius: p,
2324
+ active: y
2325
+ } = re(), T = l === "left" || l === "right";
2326
+ if (i && c === "drawer") {
2327
+ const k = le.Children.toArray(r)[y]?.props?.children ?? n;
2328
+ return /* @__PURE__ */ e.jsxs(
2329
+ "div",
2330
+ {
2331
+ className: N("relative w-full", a),
2332
+ style: { padding: 8, ...s },
2333
+ children: [
3270
2334
  /* @__PURE__ */ e.jsxs(
3271
2335
  "button",
3272
2336
  {
3273
- onClick: () => Z(!G),
2337
+ onClick: () => h(!u),
2338
+ className: "flex items-center justify-between w-full font-medium",
3274
2339
  style: {
3275
- ...I,
3276
- ...H,
3277
- justifyContent: "space-between",
3278
- width: "100%",
3279
- fontSize: 16
2340
+ padding: "10px 16px",
2341
+ borderRadius: p,
2342
+ background: m,
2343
+ color: d,
2344
+ border: "none",
2345
+ cursor: "pointer",
2346
+ fontSize: 14
3280
2347
  },
3281
2348
  children: [
3282
- A,
3283
- /* @__PURE__ */ e.jsx("span", { children: R })
2349
+ /* @__PURE__ */ e.jsx("span", { children: k }),
2350
+ /* @__PURE__ */ e.jsx(dt, { open: u })
3284
2351
  ]
3285
2352
  }
3286
2353
  ),
3287
- G && /* @__PURE__ */ e.jsx("div", { style: { display: "flex", flexDirection: "column", marginTop: 8, gap: l }, children: n.map((T, D) => {
3288
- const ee = D === W, re = N === D, oe = T.disabled;
3289
- return /* @__PURE__ */ e.jsxs(
3290
- "button",
3291
- {
3292
- disabled: oe,
3293
- onClick: () => g(D),
3294
- onKeyDown: (fe) => w(fe, D),
3295
- onMouseEnter: () => f(D),
3296
- onMouseLeave: () => f(null),
3297
- className: p,
3298
- style: {
3299
- ...I,
3300
- ...ee ? H : te,
3301
- ...re && !ee && !oe ? B : {},
3302
- ...oe ? Q : {}
3303
- },
3304
- children: [
3305
- T.icon && /* @__PURE__ */ e.jsx("span", { children: T.icon }),
3306
- T.label
3307
- ]
2354
+ u && /* @__PURE__ */ e.jsx(
2355
+ "div",
2356
+ {
2357
+ className: "tab-drawer-menu absolute left-0 right-0 z-50 flex flex-col",
2358
+ style: {
2359
+ top: "calc(100% + 4px)",
2360
+ background: "#fff",
2361
+ border: "1px solid #e5e7eb",
2362
+ borderRadius: p,
2363
+ boxShadow: "0 8px 24px rgba(0,0,0,0.12)",
2364
+ gap: 4,
2365
+ padding: 6
3308
2366
  },
3309
- D
3310
- );
3311
- }) })
3312
- ] }) : /* @__PURE__ */ e.jsx(
3313
- "div",
3314
- {
3315
- style: {
3316
- display: "flex",
3317
- flexDirection: z ? "column" : "row",
3318
- gap: l,
3319
- padding: 8,
3320
- minWidth: z ? 200 : void 0
3321
- },
3322
- children: n.map((T, D) => {
3323
- const ee = D === W, re = N === D, oe = T.disabled;
3324
- return /* @__PURE__ */ e.jsxs(
3325
- "button",
3326
- {
3327
- disabled: oe,
3328
- onClick: () => g(D),
3329
- onKeyDown: (fe) => w(fe, D),
3330
- onMouseEnter: () => f(D),
3331
- onMouseLeave: () => f(null),
3332
- className: p,
3333
- style: {
3334
- ...I,
3335
- ...ee ? H : te,
3336
- ...re && !ee && !oe ? B : {},
3337
- ...oe ? Q : {}
3338
- },
3339
- role: "tab",
3340
- "aria-selected": ee,
3341
- children: [
3342
- T.icon && /* @__PURE__ */ e.jsx("span", { children: T.icon }),
3343
- T.label
3344
- ]
3345
- },
3346
- D
3347
- );
3348
- })
3349
- }
3350
- ),
3351
- /* @__PURE__ */ e.jsx(
3352
- "div",
3353
- {
3354
- className: `modern-tabs__content ${P}`,
3355
- style: J,
3356
- role: "tabpanel",
3357
- children: n[W]?.content
3358
- }
3359
- )
2367
+ children: r
2368
+ }
2369
+ )
2370
+ ]
2371
+ }
2372
+ );
2373
+ }
2374
+ return i && c === "scroll" ? /* @__PURE__ */ e.jsx(
2375
+ "div",
2376
+ {
2377
+ role: "tablist",
2378
+ className: N("tab-scroll-strip flex flex-row w-full", a),
2379
+ style: { gap: t, padding: 8, ...s },
2380
+ children: r
2381
+ }
2382
+ ) : i && c === "stack" ? /* @__PURE__ */ e.jsx(
2383
+ "div",
2384
+ {
2385
+ role: "tablist",
2386
+ className: N("flex flex-col w-full", a),
2387
+ style: { gap: t, padding: 8, ...s },
2388
+ children: r
2389
+ }
2390
+ ) : /* @__PURE__ */ e.jsx(
2391
+ "div",
2392
+ {
2393
+ role: "tablist",
2394
+ className: N(
2395
+ "flex",
2396
+ T ? "flex-col" : "flex-row",
2397
+ T ? "min-w-[160px]" : "w-full",
2398
+ a
2399
+ ),
2400
+ style: { gap: t, padding: 8, ...s },
2401
+ children: r
2402
+ }
2403
+ );
2404
+ }, Lt = ({
2405
+ children: r,
2406
+ index: t,
2407
+ icon: n,
2408
+ disabled: s = !1,
2409
+ ariaLabel: a,
2410
+ style: l,
2411
+ className: i,
2412
+ activeStyle: c,
2413
+ inactiveStyle: u
2414
+ }) => {
2415
+ const {
2416
+ active: h,
2417
+ setActive: m,
2418
+ variant: d,
2419
+ primaryColor: p,
2420
+ activeColor: y,
2421
+ textColor: T,
2422
+ hoverColor: E,
2423
+ borderColor: S,
2424
+ disabledColor: k,
2425
+ radius: j,
2426
+ transitionDuration: _,
2427
+ fullWidth: C,
2428
+ tabCount: g,
2429
+ isMobile: f,
2430
+ mobileVariant: b
2431
+ } = re(), x = V(t), $ = V(null), M = () => {
2432
+ if (x.current !== void 0) return x.current;
2433
+ if (!$.current) return 0;
2434
+ const B = $.current.closest("[role=tablist], .tab-drawer-menu")?.querySelectorAll("[data-tab-button]");
2435
+ return B ? Array.from(B).indexOf($.current) : 0;
2436
+ }, [O, P] = W(!1), F = M() === h, I = (B) => {
2437
+ const q = g || 1, o = M();
2438
+ B.key === "ArrowRight" || B.key === "ArrowDown" ? (B.preventDefault(), m((o + 1) % q)) : (B.key === "ArrowLeft" || B.key === "ArrowUp") && (B.preventDefault(), m((o - 1 + q) % q));
2439
+ }, R = d === "outline" ? { border: `1px solid ${S}` } : d === "underline" ? { borderBottom: "2px solid transparent", borderRadius: 0 } : d === "pill" ? { borderRadius: 999 } : { border: "none" }, z = d === "solid" || d === "pill" ? { background: p, color: y, boxShadow: `0 2px 8px ${p}44` } : d === "outline" ? { borderColor: p, color: p, background: `${p}11` } : d === "underline" ? { borderBottomColor: p, color: p } : {}, A = d === "underline" ? { color: E } : { background: `${p}11`, color: E }, Y = f && (b === "stack" || b === "drawer" || b === "collapse");
2440
+ return /* @__PURE__ */ e.jsxs(
2441
+ "button",
2442
+ {
2443
+ ref: $,
2444
+ "data-tab-button": !0,
2445
+ role: "tab",
2446
+ "aria-selected": F,
2447
+ "aria-label": a,
2448
+ disabled: s,
2449
+ onClick: () => !s && m(M()),
2450
+ onKeyDown: I,
2451
+ onMouseEnter: () => P(!0),
2452
+ onMouseLeave: () => P(!1),
2453
+ className: N(
2454
+ "flex items-center justify-center gap-2 font-medium select-none transition-all",
2455
+ (C || Y) && "w-full",
2456
+ s ? "opacity-60 cursor-not-allowed" : "cursor-pointer",
2457
+ i
2458
+ ),
2459
+ style: {
2460
+ padding: "10px 16px",
2461
+ borderRadius: j,
2462
+ background: "transparent",
2463
+ color: T,
2464
+ transitionDuration: `${_}ms`,
2465
+ fontSize: 14,
2466
+ whiteSpace: "nowrap",
2467
+ // prevents wrapping in scroll strip
2468
+ ...R,
2469
+ ...F ? z : {},
2470
+ ...F ? c : u,
2471
+ ...O && !F && !s ? A : {},
2472
+ ...s ? { color: k } : {},
2473
+ ...l
2474
+ },
2475
+ children: [
2476
+ n && /* @__PURE__ */ e.jsx("span", { className: "flex-shrink-0", children: n }),
2477
+ r
3360
2478
  ]
3361
2479
  }
3362
2480
  );
3363
- }, Vt = {
2481
+ }, Pt = ({
2482
+ children: r,
2483
+ style: t,
2484
+ className: n
2485
+ }) => {
2486
+ const { borderColor: s, position: a } = re();
2487
+ return /* @__PURE__ */ e.jsx(
2488
+ "div",
2489
+ {
2490
+ className: N("flex-1 min-w-0", n),
2491
+ style: {
2492
+ ...t
2493
+ },
2494
+ children: r
2495
+ }
2496
+ );
2497
+ }, Dt = ({
2498
+ children: r,
2499
+ index: t,
2500
+ keepMounted: n = !1,
2501
+ style: s,
2502
+ className: a
2503
+ }) => {
2504
+ const { active: l } = re(), i = t === l;
2505
+ return !n && !i ? null : /* @__PURE__ */ e.jsx(
2506
+ "div",
2507
+ {
2508
+ role: "tabpanel",
2509
+ hidden: !i,
2510
+ className: N(i && "tab-panel-active", a),
2511
+ style: { display: i ? void 0 : "none", ...s },
2512
+ children: r
2513
+ }
2514
+ );
2515
+ }, ut = {
3364
2516
  xs: "text-xs",
3365
2517
  sm: "text-sm",
3366
2518
  md: "text-base",
3367
2519
  lg: "text-lg",
3368
2520
  xl: "text-xl",
3369
2521
  "2xl": "text-2xl"
2522
+ }, ft = {
2523
+ uppercase: "uppercase",
2524
+ lowercase: "lowercase",
2525
+ capitalize: "capitalize"
3370
2526
  };
3371
- function gr({
3372
- as: n,
3373
- children: r,
3374
- size: s = "md",
3375
- weight: t = 400,
2527
+ function Mt({
2528
+ as: r,
2529
+ children: t,
2530
+ size: n = "md",
2531
+ weight: s = 400,
3376
2532
  align: a = "left",
3377
- truncate: l = !1,
3378
- className: i,
2533
+ transform: l,
2534
+ italic: i = !1,
2535
+ underline: c = !1,
2536
+ strikethrough: u = !1,
2537
+ truncate: h = !1,
2538
+ className: m,
3379
2539
  style: d,
3380
- ...v
2540
+ ...p
3381
2541
  }) {
3382
- const h = n || "p";
3383
- return ze.createElement(
3384
- h,
2542
+ const y = r || "p";
2543
+ return le.createElement(
2544
+ y,
3385
2545
  {
3386
- className: C(
2546
+ className: N(
3387
2547
  "text-inherit",
3388
- // inherits parent color
3389
- Vt[s] || "",
3390
- l && "truncate",
3391
- i
2548
+ ut[n] || "",
2549
+ // text styles
2550
+ l && ft[l],
2551
+ i && "italic",
2552
+ c && "underline",
2553
+ u && "line-through",
2554
+ h && "truncate",
2555
+ m
3392
2556
  ),
3393
2557
  style: {
3394
- fontWeight: t,
2558
+ fontWeight: s,
3395
2559
  textAlign: a,
3396
2560
  ...d
3397
2561
  },
3398
- ...v
2562
+ ...p
3399
2563
  },
3400
- r
2564
+ t
3401
2565
  );
3402
2566
  }
3403
2567
  export {
3404
- Mt as Accordion,
3405
- Xt as AudioGallery,
3406
- Gt as AudioPlayer,
3407
- Ht as Avatar,
3408
- Dt as Badge,
3409
- Jt as Button,
3410
- Kt as CheckboxGroup,
3411
- er as Container,
3412
- ar as Drawer,
3413
- or as DrawerButton,
3414
- Yt as Dropdown,
3415
- tr as FlexView,
3416
- sr as GridView,
3417
- rr as HStack,
3418
- ir as Image,
3419
- lr as Input,
3420
- cr as List,
3421
- dr as Modal,
3422
- Zt as RadioGroup,
3423
- De as Stack,
3424
- Qt as SwitchGroup,
3425
- xr as TBody,
3426
- mr as TD,
3427
- hr as TH,
3428
- fr as THead,
3429
- pr as TRow,
3430
- ur as Table,
3431
- br as Tabs,
3432
- gr as Text,
3433
- qt as ToastProvider,
3434
- nr as VStack,
3435
- Wt as useToast
2568
+ Ze as Accordion,
2569
+ bt as Avatar,
2570
+ st as Badge,
2571
+ ot as Button,
2572
+ ht as CheckboxGroup,
2573
+ vt as Container,
2574
+ kt as Drawer,
2575
+ wt as DrawerButton,
2576
+ it as Dropdown,
2577
+ Nt as Image,
2578
+ jt as Input,
2579
+ Et as List,
2580
+ Ct as Modal,
2581
+ yt as RadioGroup,
2582
+ gt as SwitchGroup,
2583
+ Rt as TBody,
2584
+ St as TD,
2585
+ At as TH,
2586
+ $t as THead,
2587
+ _t as TRow,
2588
+ Lt as Tab,
2589
+ It as TabList,
2590
+ Dt as TabPanel,
2591
+ Pt as TabPanels,
2592
+ Tt as Table,
2593
+ zt as Tabs,
2594
+ Mt as Text,
2595
+ pt as ToastProvider,
2596
+ mt as useToast
3436
2597
  };
3437
2598
  //# sourceMappingURL=index.es.js.map