@neuctra/ui 0.2.8 → 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 (81) hide show
  1. package/dist/index.cjs.js +107 -138
  2. package/dist/index.cjs.js.map +1 -1
  3. package/dist/index.es.js +1555 -2367
  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/{components → types/components}/basic/Input.d.ts +1 -1
  10. package/dist/types/components/basic/Tabs.d.ts +76 -0
  11. package/dist/{components → types/components}/basic/Text.d.ts +25 -20
  12. package/dist/{index.d.ts → types/index.d.ts} +3 -7
  13. package/dist/ui.css +1 -1
  14. package/package.json +9 -2
  15. package/dist/components/basic/Tabs.d.ts +0 -47
  16. package/dist/src/components/basic/Accordation.js +0 -73
  17. package/dist/src/components/basic/Alert.js +0 -36
  18. package/dist/src/components/basic/AudioGallery.js +0 -425
  19. package/dist/src/components/basic/AudioPlayer.js +0 -130
  20. package/dist/src/components/basic/Avatar.js +0 -68
  21. package/dist/src/components/basic/Badge.js +0 -27
  22. package/dist/src/components/basic/Button.js +0 -25
  23. package/dist/src/components/basic/CheckboxGroup.js +0 -63
  24. package/dist/src/components/basic/Container.js +0 -26
  25. package/dist/src/components/basic/Drawer.js +0 -43
  26. package/dist/src/components/basic/DropDown.js +0 -98
  27. package/dist/src/components/basic/FlexView.js +0 -19
  28. package/dist/src/components/basic/GridView.js +0 -18
  29. package/dist/src/components/basic/Image.js +0 -55
  30. package/dist/src/components/basic/Input.js +0 -82
  31. package/dist/src/components/basic/List.js +0 -29
  32. package/dist/src/components/basic/Modal.js +0 -34
  33. package/dist/src/components/basic/RadioGroup.js +0 -54
  34. package/dist/src/components/basic/Stack.js +0 -22
  35. package/dist/src/components/basic/SwitchGroup.js +0 -76
  36. package/dist/src/components/basic/Table.js +0 -30
  37. package/dist/src/components/basic/Tabs.js +0 -140
  38. package/dist/src/components/basic/Text.js +0 -25
  39. package/dist/src/index.js +0 -44
  40. package/dist/types/src/components/basic/Accordation.d.ts +0 -40
  41. package/dist/types/src/components/basic/Alert.d.ts +0 -17
  42. package/dist/types/src/components/basic/AudioGallery.d.ts +0 -23
  43. package/dist/types/src/components/basic/AudioPlayer.d.ts +0 -16
  44. package/dist/types/src/components/basic/Avatar.d.ts +0 -23
  45. package/dist/types/src/components/basic/Badge.d.ts +0 -21
  46. package/dist/types/src/components/basic/Button.d.ts +0 -15
  47. package/dist/types/src/components/basic/CheckboxGroup.d.ts +0 -27
  48. package/dist/types/src/components/basic/Container.d.ts +0 -15
  49. package/dist/types/src/components/basic/Drawer.d.ts +0 -22
  50. package/dist/types/src/components/basic/DropDown.d.ts +0 -33
  51. package/dist/types/src/components/basic/FlexView.d.ts +0 -16
  52. package/dist/types/src/components/basic/GridView.d.ts +0 -14
  53. package/dist/types/src/components/basic/Image.d.ts +0 -37
  54. package/dist/types/src/components/basic/Input.d.ts +0 -33
  55. package/dist/types/src/components/basic/List.d.ts +0 -20
  56. package/dist/types/src/components/basic/Modal.d.ts +0 -17
  57. package/dist/types/src/components/basic/RadioGroup.d.ts +0 -26
  58. package/dist/types/src/components/basic/Stack.d.ts +0 -17
  59. package/dist/types/src/components/basic/SwitchGroup.d.ts +0 -26
  60. package/dist/types/src/components/basic/Table.d.ts +0 -28
  61. package/dist/types/src/components/basic/Tabs.d.ts +0 -47
  62. package/dist/types/src/components/basic/Text.d.ts +0 -1121
  63. package/dist/types/src/index.d.ts +0 -24
  64. package/dist/types/vite.config.d.ts +0 -2
  65. package/dist/vite.config.js +0 -34
  66. /package/dist/{components/basic/Accordation.d.ts → types/components/basic/Accordion.d.ts} +0 -0
  67. /package/dist/{components → types/components}/basic/AudioGallery.d.ts +0 -0
  68. /package/dist/{components → types/components}/basic/AudioPlayer.d.ts +0 -0
  69. /package/dist/{components → types/components}/basic/CheckboxGroup.d.ts +0 -0
  70. /package/dist/{components → types/components}/basic/Container.d.ts +0 -0
  71. /package/dist/{components → types/components}/basic/Drawer.d.ts +0 -0
  72. /package/dist/{components → types/components}/basic/DropDown.d.ts +0 -0
  73. /package/dist/{components → types/components}/basic/FlexView.d.ts +0 -0
  74. /package/dist/{components → types/components}/basic/GridView.d.ts +0 -0
  75. /package/dist/{components → types/components}/basic/Image.d.ts +0 -0
  76. /package/dist/{components → types/components}/basic/List.d.ts +0 -0
  77. /package/dist/{components → types/components}/basic/Modal.d.ts +0 -0
  78. /package/dist/{components → types/components}/basic/RadioGroup.d.ts +0 -0
  79. /package/dist/{components → types/components}/basic/Stack.d.ts +0 -0
  80. /package/dist/{components → types/components}/basic/SwitchGroup.d.ts +0 -0
  81. /package/dist/{components → types/components}/basic/Table.d.ts +0 -0
package/dist/index.es.js CHANGED
@@ -1,5 +1,5 @@
1
- import Re, { forwardRef as ie, createElement as pe, createContext as Oe, useState as L, useCallback as he, useContext as Fe, memo as ze, useRef as K, useEffect as X, useMemo as de, useImperativeHandle as _e } from "react";
2
- var ce = { exports: {} }, oe = {};
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 ce = { exports: {} }, oe = {};
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 Be() {
14
- if (we) return oe;
15
- we = 1;
16
- var n = Symbol.for("react.transitional.element"), t = Symbol.for("react.fragment");
17
- function s(r, o, 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
- if (l !== void 0 && (i = "" + l), o.key !== void 0 && (i = "" + o.key), "key" in o) {
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 o)
22
- d !== "key" && (l[d] = o[d]);
23
- } else l = o;
24
- return o = l.ref, {
25
- $$typeof: n,
26
- type: r,
21
+ for (var c in a)
22
+ c !== "key" && (l[c] = a[c]);
23
+ } else l = a;
24
+ return a = l.ref, {
25
+ $$typeof: r,
26
+ type: s,
27
27
  key: i,
28
- ref: o !== void 0 ? o : null,
28
+ ref: a !== void 0 ? a : null,
29
29
  props: l
30
30
  };
31
31
  }
32
- return oe.Fragment = t, oe.jsx = s, oe.jsxs = s, oe;
32
+ return K.Fragment = t, K.jsx = n, K.jsxs = n, K;
33
33
  }
34
- var le = {};
34
+ var Z = {};
35
35
  /**
36
36
  * @license React
37
37
  * react-jsx-runtime.development.js
@@ -41,256 +41,256 @@ var le = {};
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 je;
45
- function Ye() {
46
- return je || (je = 1, process.env.NODE_ENV !== "production" && (function() {
47
- function n(a) {
48
- if (a == null) return null;
49
- if (typeof a == "function")
50
- return a.$$typeof === q ? null : a.displayName || a.name || null;
51
- if (typeof a == "string") return a;
52
- switch (a) {
53
- case M:
44
+ var de;
45
+ function Ee() {
46
+ return de || (de = 1, process.env.NODE_ENV !== "production" && (function() {
47
+ function r(o) {
48
+ if (o == null) return null;
49
+ if (typeof o == "function")
50
+ return o.$$typeof === O ? null : o.displayName || o.name || null;
51
+ if (typeof o == "string") return o;
52
+ switch (o) {
53
+ case S:
54
54
  return "Fragment";
55
- case E:
55
+ case j:
56
56
  return "Profiler";
57
57
  case k:
58
58
  return "StrictMode";
59
- case m:
59
+ case f:
60
60
  return "Suspense";
61
- case p:
61
+ case b:
62
62
  return "SuspenseList";
63
- case O:
63
+ case M:
64
64
  return "Activity";
65
65
  }
66
- if (typeof a == "object")
67
- switch (typeof a.tag == "number" && console.error(
66
+ if (typeof o == "object")
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
- ), a.$$typeof) {
70
- case j:
69
+ ), o.$$typeof) {
70
+ case E:
71
71
  return "Portal";
72
- case R:
73
- return a.displayName || "Context";
74
- case A:
75
- return (a._context.displayName || "Context") + ".Consumer";
76
- case y:
77
- var b = a.render;
78
- return a = a.displayName, a || (a = b.displayName || b.name || "", a = a !== "" ? "ForwardRef(" + a + ")" : "ForwardRef"), a;
72
+ case C:
73
+ return o.displayName || "Context";
74
+ case _:
75
+ return (o._context.displayName || "Context") + ".Consumer";
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
79
  case x:
80
- return b = a.displayName || null, b !== null ? b : n(a.type) || "Memo";
81
- case P:
82
- b = a._payload, a = a._init;
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(a(b));
84
+ return r(o(v));
85
85
  } catch {
86
86
  }
87
87
  }
88
88
  return null;
89
89
  }
90
- function t(a) {
91
- return "" + a;
90
+ function t(o) {
91
+ return "" + o;
92
92
  }
93
- function s(a) {
93
+ function n(o) {
94
94
  try {
95
- t(a);
96
- var b = !1;
95
+ t(o);
96
+ var v = !1;
97
97
  } catch {
98
- b = !0;
98
+ v = !0;
99
99
  }
100
- if (b) {
101
- b = console;
102
- var v = b.error, I = typeof Symbol == "function" && Symbol.toStringTag && a[Symbol.toStringTag] || a.constructor.name || "Object";
103
- return v.call(
104
- b,
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
+ return w.call(
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
- ), t(a);
106
+ L
107
+ ), t(o);
108
108
  }
109
109
  }
110
- function r(a) {
111
- if (a === M) return "<>";
112
- if (typeof a == "object" && a !== null && a.$$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 b = n(a);
116
- return b ? "<" + b + ">" : "<...>";
115
+ var v = r(o);
116
+ return v ? "<" + v + ">" : "<...>";
117
117
  } catch {
118
118
  return "<...>";
119
119
  }
120
120
  }
121
- function o() {
122
- var a = Y.A;
123
- return a === null ? null : a.getOwner();
121
+ function a() {
122
+ var o = P.A;
123
+ return o === null ? null : o.getOwner();
124
124
  }
125
125
  function l() {
126
126
  return Error("react-stack-top-frame");
127
127
  }
128
- function i(a) {
129
- if (W.call(a, "key")) {
130
- var b = Object.getOwnPropertyDescriptor(a, "key").get;
131
- if (b && b.isReactWarning) return !1;
128
+ function i(o) {
129
+ if (F.call(o, "key")) {
130
+ var v = Object.getOwnPropertyDescriptor(o, "key").get;
131
+ if (v && v.isReactWarning) return !1;
132
132
  }
133
- return a.key !== void 0;
133
+ return o.key !== void 0;
134
134
  }
135
- function d(a, b) {
136
- function v() {
137
- u || (u = !0, console.error(
135
+ function c(o, v) {
136
+ function w() {
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
- b
139
+ v
140
140
  ));
141
141
  }
142
- v.isReactWarning = !0, Object.defineProperty(a, "key", {
143
- get: v,
142
+ w.isReactWarning = !0, Object.defineProperty(o, "key", {
143
+ get: w,
144
144
  configurable: !0
145
145
  });
146
146
  }
147
- function w() {
148
- var a = n(this.type);
149
- return S[a] || (S[a] = !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
- )), a = this.props.ref, a !== void 0 ? a : null;
151
+ )), o = this.props.ref, o !== void 0 ? o : null;
152
152
  }
153
- function h(a, b, v, I, H, te) {
154
- var B = v.ref;
155
- return a = {
156
- $$typeof: _,
157
- type: a,
158
- key: b,
159
- props: v,
160
- _owner: I
161
- }, (B !== void 0 ? B : null) !== null ? Object.defineProperty(a, "ref", {
153
+ function h(o, v, w, L, X, G) {
154
+ var D = w.ref;
155
+ return o = {
156
+ $$typeof: T,
157
+ type: o,
158
+ key: v,
159
+ props: w,
160
+ _owner: L
161
+ }, (D !== void 0 ? D : null) !== null ? Object.defineProperty(o, "ref", {
162
162
  enumerable: !1,
163
- get: w
164
- }) : Object.defineProperty(a, "ref", { enumerable: !1, value: null }), a._store = {}, Object.defineProperty(a._store, "validated", {
163
+ get: u
164
+ }) : Object.defineProperty(o, "ref", { enumerable: !1, value: null }), o._store = {}, Object.defineProperty(o._store, "validated", {
165
165
  configurable: !1,
166
166
  enumerable: !1,
167
167
  writable: !0,
168
168
  value: 0
169
- }), Object.defineProperty(a, "_debugInfo", {
169
+ }), Object.defineProperty(o, "_debugInfo", {
170
170
  configurable: !1,
171
171
  enumerable: !1,
172
172
  writable: !0,
173
173
  value: null
174
- }), Object.defineProperty(a, "_debugStack", {
174
+ }), Object.defineProperty(o, "_debugStack", {
175
175
  configurable: !1,
176
176
  enumerable: !1,
177
177
  writable: !0,
178
- value: H
179
- }), Object.defineProperty(a, "_debugTask", {
178
+ value: X
179
+ }), Object.defineProperty(o, "_debugTask", {
180
180
  configurable: !1,
181
181
  enumerable: !1,
182
182
  writable: !0,
183
- value: te
184
- }), Object.freeze && (Object.freeze(a.props), Object.freeze(a)), a;
183
+ value: G
184
+ }), Object.freeze && (Object.freeze(o.props), Object.freeze(o)), o;
185
185
  }
186
- function g(a, b, v, I, H, te) {
187
- var B = b.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(b, "key")) {
200
- B = n(a);
201
- var Q = Object.keys(b).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, v !== void 0 && (s(v), B = "" + v), i(b) && (s(b.key), B = "" + b.key), "key" in b) {
218
- v = {};
219
- for (var J in b)
220
- J !== "key" && (v[J] = b[J]);
221
- } else v = b;
222
- return B && d(
223
- v,
224
- typeof a == "function" ? a.displayName || a.name || "Unknown" : a
217
+ if (D = null, w !== void 0 && (n(w), D = "" + w), i(v) && (n(v.key), D = "" + v.key), "key" in v) {
218
+ w = {};
219
+ for (var ne in v)
220
+ ne !== "key" && (w[ne] = v[ne]);
221
+ } else w = v;
222
+ return D && c(
223
+ w,
224
+ typeof o == "function" ? o.displayName || o.name || "Unknown" : o
225
225
  ), h(
226
- a,
227
- B,
228
- v,
229
- o(),
230
- H,
231
- te
226
+ o,
227
+ D,
228
+ w,
229
+ a(),
230
+ X,
231
+ G
232
232
  );
233
233
  }
234
- function c(a) {
235
- f(a) ? a._store && (a._store.validated = 1) : typeof a == "object" && a !== null && a.$$typeof === P && (a._payload.status === "fulfilled" ? f(a._payload.value) && a._payload.value._store && (a._payload.value._store.validated = 1) : a._store && (a._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 f(a) {
238
- return typeof a == "object" && a !== null && a.$$typeof === _;
237
+ function p(o) {
238
+ return typeof o == "object" && o !== null && o.$$typeof === T;
239
239
  }
240
- var N = Re, _ = Symbol.for("react.transitional.element"), j = Symbol.for("react.portal"), M = Symbol.for("react.fragment"), k = Symbol.for("react.strict_mode"), E = Symbol.for("react.profiler"), A = Symbol.for("react.consumer"), R = Symbol.for("react.context"), y = Symbol.for("react.forward_ref"), m = Symbol.for("react.suspense"), p = Symbol.for("react.suspense_list"), x = Symbol.for("react.memo"), P = Symbol.for("react.lazy"), O = Symbol.for("react.activity"), q = Symbol.for("react.client.reference"), Y = N.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, W = Object.prototype.hasOwnProperty, F = Array.isArray, $ = 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
- N = {
244
- react_stack_bottom_frame: function(a) {
245
- return a();
243
+ y = {
244
+ react_stack_bottom_frame: function(o) {
245
+ return o();
246
246
  }
247
247
  };
248
- var u, S = {}, V = N.react_stack_bottom_frame.bind(
249
- N,
248
+ var z, A = {}, Y = y.react_stack_bottom_frame.bind(
249
+ y,
250
250
  l
251
- )(), G = $(r(l)), Z = {};
252
- le.Fragment = M, le.jsx = function(a, b, v) {
253
- var I = 1e4 > Y.recentlyCreatedOwnerStacks++;
254
- return g(
255
- a,
256
- b,
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
+ o,
257
256
  v,
257
+ w,
258
258
  !1,
259
- I ? Error("react-stack-top-frame") : V,
260
- I ? $(r(a)) : G
259
+ L ? Error("react-stack-top-frame") : Y,
260
+ L ? R(s(o)) : B
261
261
  );
262
- }, le.jsxs = function(a, b, v) {
263
- var I = 1e4 > Y.recentlyCreatedOwnerStacks++;
264
- return g(
265
- a,
266
- b,
262
+ }, Z.jsxs = function(o, v, w) {
263
+ var L = 1e4 > P.recentlyCreatedOwnerStacks++;
264
+ return m(
265
+ o,
267
266
  v,
267
+ w,
268
268
  !0,
269
- I ? Error("react-stack-top-frame") : V,
270
- I ? $(r(a)) : G
269
+ L ? Error("react-stack-top-frame") : Y,
270
+ L ? R(s(o)) : B
271
271
  );
272
272
  };
273
- })()), le;
273
+ })()), Z;
274
274
  }
275
- var ke;
276
- function Ve() {
277
- return ke || (ke = 1, process.env.NODE_ENV === "production" ? ce.exports = Be() : ce.exports = Ye()), ce.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 = Ve();
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 Ue = (n) => n.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), We = (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
- (t, s, r) => r ? r.toUpperCase() : s.toLowerCase()
289
- ), $e = (n) => {
290
- const t = We(n);
288
+ (t, n, s) => s ? s.toUpperCase() : n.toLowerCase()
289
+ ), fe = (r) => {
290
+ const t = $e(r);
291
291
  return t.charAt(0).toUpperCase() + t.slice(1);
292
- }, Ee = (...n) => n.filter((t, s, r) => !!t && t.trim() !== "" && r.indexOf(t) === s).join(" ").trim(), qe = (n) => {
293
- for (const t in n)
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
294
  if (t.startsWith("aria-") || t === "role" || t === "title")
295
295
  return !0;
296
296
  };
@@ -300,7 +300,7 @@ const Ue = (n) => n.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), We = (
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 He = {
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 He = {
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 Ge = ie(
320
+ const Ae = Q(
321
321
  ({
322
- color: n = "currentColor",
322
+ color: r = "currentColor",
323
323
  size: t = 24,
324
- strokeWidth: s = 2,
325
- absoluteStrokeWidth: r,
326
- className: o = "",
324
+ strokeWidth: n = 2,
325
+ absoluteStrokeWidth: s,
326
+ className: a = "",
327
327
  children: l,
328
328
  iconNode: i,
329
- ...d
330
- }, w) => pe(
329
+ ...c
330
+ }, u) => oe(
331
331
  "svg",
332
332
  {
333
- ref: w,
334
- ...He,
333
+ ref: u,
334
+ ..._e,
335
335
  width: t,
336
336
  height: t,
337
- stroke: n,
338
- strokeWidth: r ? Number(s) * 24 / Number(t) : s,
339
- className: Ee("lucide", o),
340
- ...!l && !qe(d) && { "aria-hidden": "true" },
341
- ...d
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, g]) => pe(h, g)),
344
+ ...i.map(([h, m]) => oe(h, m)),
345
345
  ...Array.isArray(l) ? l : [l]
346
346
  ]
347
347
  )
@@ -352,20 +352,20 @@ const Ge = ie(
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, t) => {
356
- const s = ie(
357
- ({ className: r, ...o }, l) => pe(Ge, {
355
+ const H = (r, t) => {
356
+ const n = Q(
357
+ ({ className: s, ...a }, l) => oe(Ae, {
358
358
  ref: l,
359
359
  iconNode: t,
360
- className: Ee(
361
- `lucide-${Ue($e(n))}`,
362
- `lucide-${n}`,
363
- r
360
+ className: he(
361
+ `lucide-${Te(fe(r))}`,
362
+ `lucide-${r}`,
363
+ s
364
364
  ),
365
- ...o
365
+ ...a
366
366
  })
367
367
  );
368
- return s.displayName = $e(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, t) => {
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 Xe = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]], Se = U("chevron-down", Xe);
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 Je = [["path", { d: "m18 15-6-6-6 6", key: "153udz" }]], Ke = U("chevron-up", Je);
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 Ze = [
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
- ], Qe = U("circle-alert", Ze);
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 et = [
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
- ], tt = U("circle-check-big", et);
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 rt = [
411
+ const Oe = [
412
412
  [
413
413
  "path",
414
414
  {
@@ -425,14 +425,14 @@ const rt = [
425
425
  }
426
426
  ],
427
427
  ["path", { d: "m2 2 20 20", key: "1ooewy" }]
428
- ], nt = U("eye-off", rt);
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 st = [
435
+ const Fe = [
436
436
  [
437
437
  "path",
438
438
  {
@@ -441,155 +441,25 @@ const st = [
441
441
  }
442
442
  ],
443
443
  ["circle", { cx: "12", cy: "12", r: "3", key: "1v7zrd" }]
444
- ], at = U("eye", st);
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 ot = [
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
- ], lt = U("heart", ot);
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 it = [
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
- ], ct = U("info", it);
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 dt = [
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
- ], ut = U("maximize", dt);
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 ft = [
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
- ], xt = U("minimize", ft);
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 pt = [
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
- ], Ne = U("music", pt);
506
- /**
507
- * @license lucide-react v0.536.0 - ISC
508
- *
509
- * This source code is licensed under the ISC license.
510
- * See the LICENSE file in the root directory of this source tree.
511
- */
512
- const ht = [
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
- ], me = U("pause", ht);
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 mt = [
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
- ], be = U("play", mt);
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 bt = [
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
- ], Me = U("rotate-ccw", bt);
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 gt = [
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
- ], yt = U("shuffle", gt);
455
+ ], Ue = H("info", We);
554
456
  /**
555
457
  * @license lucide-react v0.536.0 - ISC
556
458
  *
557
459
  * This source code is licensed under the ISC license.
558
460
  * See the LICENSE file in the root directory of this source tree.
559
461
  */
560
- const vt = [
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
- ], ge = U("skip-back", vt);
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
- ], ye = 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 jt = [
462
+ const qe = [
593
463
  [
594
464
  "path",
595
465
  {
@@ -599,267 +469,314 @@ const jt = [
599
469
  ],
600
470
  ["path", { d: "M12 9v4", key: "juzpu7" }],
601
471
  ["path", { d: "M12 17h.01", key: "p32p05" }]
602
- ], kt = U("triangle-alert", jt);
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 $t = [
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
- ], Nt = U("user", $t);
482
+ ], Ge = H("user", He);
613
483
  /**
614
484
  * @license lucide-react v0.536.0 - ISC
615
485
  *
616
486
  * This source code is licensed under the ISC license.
617
487
  * See the LICENSE file in the root directory of this source tree.
618
488
  */
619
- const Tt = [
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
- ], Ae = U("volume-2", Tt);
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 Rt = [
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
- ], Ie = U("volume-x", Rt);
647
- /**
648
- * @license lucide-react v0.536.0 - ISC
649
- *
650
- * This source code is licensed under the ISC license.
651
- * See the LICENSE file in the root directory of this source tree.
652
- */
653
- const zt = [
489
+ const Xe = [
654
490
  ["path", { d: "M18 6 6 18", key: "1bl5f8" }],
655
491
  ["path", { d: "m6 6 12 12", key: "d8bk6v" }]
656
- ], ve = U("x", zt), Ce = Oe(void 0), Ut = () => {
657
- const n = Fe(Ce);
658
- if (!n) throw new Error("useToast must be used within ToastProvider");
659
- return n;
660
- }, Wt = ({ children: n }) => {
661
- const [t, s] = L([]), r = he((l) => {
662
- s((i) => i.filter((d) => d.id !== l));
663
- }, []), o = he((l) => {
664
- const i = Date.now() + Math.random();
665
- s((d) => [...d, { ...l, id: i }]), l.duration !== 0 && setTimeout(() => r(i), l.duration ?? 4e3);
666
- }, [r]);
667
- return /* @__PURE__ */ e.jsxs(Ce.Provider, { value: { addToast: o }, children: [
668
- n,
669
- /* @__PURE__ */ e.jsx("div", { className: "fixed top-5 right-5 flex flex-col gap-3 z-50", children: t.map((l) => /* @__PURE__ */ e.jsx(Et, { toast: l, onClose: () => r(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
- }, _t = {
672
- success: { bg: "bg-green-50", border: "border-green-400", icon: /* @__PURE__ */ e.jsx(tt, { size: 20, className: "text-green-600" }) },
673
- error: { bg: "bg-red-50", border: "border-red-400", icon: /* @__PURE__ */ e.jsx(Qe, { size: 20, className: "text-red-600" }) },
674
- warning: { bg: "bg-yellow-50", border: "border-yellow-400", icon: /* @__PURE__ */ e.jsx(kt, { size: 20, className: "text-yellow-600" }) },
675
- info: { bg: "bg-blue-50", border: "border-blue-400", icon: /* @__PURE__ */ e.jsx(ct, { size: 20, className: "text-blue-600" }) }
676
- }, Et = ({ toast: n, onClose: t }) => {
677
- const { title: s, description: r, type: o = "info" } = n, { bg: l, border: i, icon: d } = _t[o];
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
- r && /* @__PURE__ */ e.jsx("div", { className: "text-sm text-gray-700", children: r })
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: t, className: "text-gray-500 hover:text-gray-700", children: /* @__PURE__ */ e.jsx(ve, { 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
- }, St = ze(
603
+ }, Ze = pe(
694
604
  ({
695
- items: n,
605
+ items: r,
696
606
  allowMultiple: t = !1,
697
- defaultOpen: s = [],
698
- borderColor: r = "#e5e7eb",
699
- backgroundColor: o = "#fff",
607
+ defaultOpen: n = [],
608
+ borderColor: s = "#e5e7eb",
609
+ backgroundColor: a = "#fff",
700
610
  textColor: l = "#111827",
701
611
  hoverBgColor: i = "#f3f4f6",
702
- hoverTextColor: d = "#111827",
703
- contentBgColor: w = "#fff",
612
+ hoverTextColor: c = "#111827",
613
+ contentBgColor: u = "#fff",
704
614
  contentTextColor: h = "#374151",
705
- paddingY: g = "1rem",
706
- paddingX: c = "1rem",
707
- marginY: f = "0.5rem",
708
- borderRadius: N = "0.5rem",
709
- contentPadding: _ = "1rem",
710
- fontSize: j = "1rem",
711
- fontWeight: M = 600,
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,
712
622
  contentFontSize: k = "0.95rem",
713
- contentFontWeight: E = 400,
714
- iconOpen: A,
715
- iconClose: R,
716
- iconSize: y = "1.25rem",
717
- transitionDuration: m = "300ms",
718
- shadow: p = "0 1px 4px rgba(0,0,0,0.08)",
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)",
719
629
  className: x = "",
720
- style: P
630
+ style: $
721
631
  }) => {
722
- const [O, q] = L(s), Y = K([]);
723
- X(() => {
724
- Y.current.forEach(($, u) => {
725
- $ && ($.style.maxHeight = O.includes(u) ? `${$.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 = ($) => {
729
- q(
730
- (u) => t ? u.includes($) ? u.filter((S) => S !== $) : [...u, $] : u.includes($) ? [] : [$]
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 = ($) => $ !== void 0 ? typeof $ == "number" ? `${$}px` : $ : 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
646
  className: `space-y-2 ${x}`,
737
- style: { width: "100%", ...P },
738
- children: n.map(($, u) => {
739
- const S = O.includes(u);
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: r,
746
- borderRadius: F(N),
747
- margin: `${F(f)} 0`,
748
- boxShadow: p
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(u),
664
+ onClick: () => F(z),
755
665
  className: "w-full flex justify-between items-center transition-colors duration-300",
756
666
  style: {
757
- backgroundColor: o,
667
+ backgroundColor: a,
758
668
  color: l,
759
- padding: `${F(g)} ${F(c)}`,
760
- fontWeight: M,
761
- fontSize: F(j),
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 = o, 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: $.title }),
774
- /* @__PURE__ */ e.jsx("span", { style: { fontSize: F(y) }, children: S ? A || /* @__PURE__ */ e.jsx(Ke, { size: 16 }) : R || /* @__PURE__ */ e.jsx(Se, { 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[u] = 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[u]?.scrollHeight ?? 0}px` : "0px",
787
- transition: `max-height ${m} 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 ${r}`,
794
- backgroundColor: w,
703
+ borderTop: `1px solid ${s}`,
704
+ backgroundColor: u,
795
705
  color: h,
796
- padding: F(_),
797
- fontSize: F(k),
798
- fontWeight: E
706
+ padding: I(T),
707
+ fontSize: I(k),
708
+ fontWeight: j
799
709
  },
800
- children: $.content
710
+ children: R.content
801
711
  }
802
712
  )
803
713
  }
804
714
  )
805
715
  ]
806
716
  },
807
- u
717
+ z
808
718
  );
809
719
  })
810
720
  }
811
721
  );
812
722
  }
813
723
  );
814
- St.displayName = "Accordion";
815
- const Mt = {
816
- xs: 24,
817
- sm: 32,
818
- md: 40,
819
- lg: 48,
820
- xl: 56,
821
- "2xl": 64
822
- }, At = {
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
- }, It = {
732
+ }, et = {
830
733
  xs: "w-6 h-6",
831
734
  sm: "w-8 h-8",
832
735
  md: "w-10 h-10",
833
736
  lg: "w-12 h-12",
834
737
  xl: "w-14 h-14",
835
738
  "2xl": "w-16 h-16"
836
- }, fe = {
739
+ }, se = {
837
740
  circular: "rounded-full",
838
741
  rounded: "rounded-lg",
839
742
  square: "rounded-none"
840
- }, Ct = {
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
- }, qt = ({
846
- src: n,
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,
847
764
  alt: t = "User avatar",
848
- size: s = "md",
849
- variant: r = "circular",
850
- isOnline: o = !1,
765
+ size: n = "md",
766
+ variant: s = "circular",
767
+ isOnline: a = !1,
851
768
  isOffline: l = !1,
852
769
  fallback: i,
853
- ring: d = !1,
854
- ringColor: w = "#3b82f6",
770
+ ring: c = !1,
771
+ ringColor: u = "#3b82f6",
855
772
  onClick: h,
856
- statusPosition: g = "bottom-right",
857
- className: c = "",
858
- statusClassName: f = "",
859
- style: N,
860
- statusStyle: _
773
+ statusPosition: m = "bottom-right",
774
+ className: d = "",
775
+ statusClassName: p = "",
776
+ style: y,
777
+ statusStyle: T
861
778
  }) => {
862
- const [j, M] = L(!1), k = !!h, E = i || t.split(" ").map((y) => y[0]).join("").toUpperCase().slice(0, 2), A = o ? "bg-green-500" : l ? "bg-gray-400" : "", R = Mt[s];
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);
863
780
  return /* @__PURE__ */ e.jsxs(
864
781
  "div",
865
782
  {
@@ -867,1128 +784,302 @@ const Mt = {
867
784
  tabIndex: k ? 0 : -1,
868
785
  "aria-label": t,
869
786
  onClick: h,
870
- className: `relative inline-flex items-center justify-center overflow-hidden ${It[s]} ${fe[r]} transition-all duration-200 ${k ? "cursor-pointer hover:scale-105" : ""} ${d ? "ring-2" : ""} ${c}`,
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}`,
871
794
  style: {
872
- ...N,
873
- ...d ? { boxShadow: `0 0 0 2px ${w}` } : {}
795
+ ...y,
796
+ ...c ? { ringColor: u } : {}
874
797
  },
875
- onKeyDown: (y) => {
876
- k && (y.key === "Enter" || y.key === " ") && (y.preventDefault(), h?.());
798
+ onKeyDown: (b) => {
799
+ k && (b.key === "Enter" || b.key === " ") && (b.preventDefault(), h?.());
877
800
  },
878
801
  children: [
879
- n && !j ? /* @__PURE__ */ e.jsx(
802
+ r && !E ? /* @__PURE__ */ e.jsx(
880
803
  "img",
881
804
  {
882
- src: n,
805
+ src: r,
883
806
  alt: t,
884
- onError: () => M(!0),
885
- className: `w-full h-full object-cover ${fe[r]} transition-opacity duration-300`
807
+ onError: () => S(!0),
808
+ className: `w-full h-full object-cover ${se[s]}`
886
809
  }
887
810
  ) : /* @__PURE__ */ e.jsx(
888
811
  "div",
889
812
  {
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 ${At[s]} ${fe[r]}`,
891
- children: E || /* @__PURE__ */ e.jsx(Nt, { className: "text-white" })
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" })
892
817
  }
893
818
  ),
894
- (o || l) && /* @__PURE__ */ e.jsx(
819
+ (a || l) && /* @__PURE__ */ e.jsx(
895
820
  "span",
896
821
  {
897
- "aria-label": o ? "Online" : "Offline",
898
- title: o ? "Online" : "Offline",
899
- className: `absolute ${Ct[g]} ${A} border-2 border-white rounded-full shadow-sm ${f}`,
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
+ `,
900
836
  style: {
901
- width: R / 3,
902
- height: R / 3,
903
- ..._
837
+ ...T
904
838
  }
905
839
  }
906
840
  )
907
841
  ]
908
842
  }
909
843
  );
910
- }, Ht = ({
911
- src: n,
912
- thumbnail: t,
913
- autoPlay: s = !1,
914
- loop: r = !1,
915
- backgroundColor: o = "#0a0a0a",
916
- primaryColor: l = "#10b981",
917
- secondaryColor: i = "#ffffff",
918
- borderRadius: d = "12px",
919
- padding: w = "12px",
920
- width: h = "100%",
921
- className: g
922
- }) => {
923
- const c = K(null), f = K(null), [N, _] = L(s), [j, M] = L(0), [k, E] = L(0), [A, R] = L(0.7), [y, m] = L(!1), [p, x] = L(r);
924
- X(() => {
925
- c.current && (c.current.volume = A);
926
- }, [A]), X(() => {
927
- c.current && (c.current.loop = p);
928
- }, [p]);
929
- const P = () => {
930
- c.current && (N ? c.current.pause() : c.current.play(), _(!N));
931
- }, O = () => {
932
- c.current && (M(c.current.currentTime), E(c.current.duration));
933
- }, q = ($) => {
934
- if (!c.current) return;
935
- const u = $.currentTarget.getBoundingClientRect(), S = ($.clientX - u.left) / u.width;
936
- c.current.currentTime = S * k, M(S * k);
937
- }, Y = ($) => {
938
- c.current && (c.current.currentTime += $);
939
- }, W = () => {
940
- f.current && (y ? document.exitFullscreen?.() : f.current.requestFullscreen?.(), m(!y));
941
- }, F = ($) => {
942
- const u = Math.floor($ / 60), S = Math.floor($ % 60);
943
- return `${u}:${S < 10 ? "0" : ""}${S}`;
944
- };
945
- return /* @__PURE__ */ e.jsxs(
946
- "div",
947
- {
948
- ref: f,
949
- className: g,
950
- style: {
951
- display: "flex",
952
- alignItems: "center",
953
- gap: "12px",
954
- width: h,
955
- backgroundColor: o,
956
- borderRadius: d,
957
- padding: w,
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: r,
971
- onTimeUpdate: O,
972
- onLoadedMetadata: O
973
- }
974
- ),
975
- t && /* @__PURE__ */ e.jsx(
976
- "img",
977
- {
978
- src: t,
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(ge, { 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": N ? "Pause" : "Play",
1029
- children: N ? /* @__PURE__ */ e.jsx(me, { size: 20 }) : /* @__PURE__ */ e.jsx(be, { 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(ye, { 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: `${j / 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(j),
1073
- " / ",
1074
- F(k)
1075
- ] }),
1076
- /* @__PURE__ */ e.jsxs("div", { style: { display: "flex", alignItems: "center", gap: "8px" }, children: [
1077
- /* @__PURE__ */ e.jsx(
1078
- "button",
1079
- {
1080
- onClick: () => x(!p),
1081
- style: {
1082
- background: "transparent",
1083
- border: "none",
1084
- cursor: "pointer",
1085
- color: p ? l : i
1086
- },
1087
- "aria-label": "Toggle Loop",
1088
- children: /* @__PURE__ */ e.jsx(Me, { 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(Ae, { size: 18 }) : /* @__PURE__ */ e.jsx(Ie, { 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: y ? /* @__PURE__ */ e.jsx(xt, { size: 18 }) : /* @__PURE__ */ e.jsx(ut, { size: 18 })
1117
- }
1118
- )
1119
- ] })
1120
- ]
1121
- }
1122
- )
1123
- ]
1124
- }
1125
- );
1126
- }, Pt = [
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 Gt({
1150
- tracks: n = Pt,
1151
- className: t = "",
1152
- galleryTitle: s = "Audio Gallery",
1153
- primaryColor: r = "#8b5cf6",
1154
- backgroundColor: o = "#0f0f23",
1155
- textColor: l = "#e4e4e7",
1156
- secondaryColor: i = "#1a1a2e",
1157
- border: d = 0,
1158
- borderColor: w,
1159
- maxWidth: h = 420,
1160
- autoplay: g = !1,
1161
- loop: c = !1
1162
- }) {
1163
- const [f, N] = L(
1164
- null
1165
- ), [_, j] = L(!1), [M, k] = L(0), [E, A] = L(0), [R, y] = L(0.7), [m, p] = L(!1), [x, P] = L(c), [O, q] = L(!1), [Y, W] = L(!1), [F, $] = L(!1), u = K(null), S = K(null), V = K(null);
1166
- X(() => {
1167
- u.current && (u.current.volume = R);
1168
- }, [R]), X(() => {
1169
- u.current && (u.current.loop = x);
1170
- }, [x]), X(() => {
1171
- f === null && u.current && (u.current.pause(), j(!1), k(0), A(0));
1172
- }, [f]);
1173
- const G = (z) => {
1174
- if (f === z) {
1175
- if (!u.current) return;
1176
- u.current.paused ? (u.current.play().catch(() => {
1177
- }), j(!0)) : (u.current.pause(), j(!1));
1178
- } else
1179
- N(z), setTimeout(() => {
1180
- u.current && (u.current.play().catch(() => {
1181
- }), j(!0));
1182
- }, 100);
1183
- }, Z = () => {
1184
- u.current && (k(u.current.currentTime), u.current.duration && A(u.current.duration));
1185
- }, a = (z) => {
1186
- if (!u.current || !E) return;
1187
- const T = z.currentTarget.getBoundingClientRect(), re = (z.clientX - T.left) / T.width * E;
1188
- u.current.currentTime = re, k(re);
1189
- }, b = (z) => {
1190
- const T = z.currentTarget.getBoundingClientRect(), ee = (z.clientX - T.left) / T.width, re = Math.max(0, Math.min(1, ee));
1191
- y(re);
1192
- }, v = (z) => {
1193
- if (u.current && E) {
1194
- let T = u.current.currentTime + z;
1195
- T = Math.min(Math.max(T, 0), E), u.current.currentTime = T, k(T);
1196
- }
1197
- }, I = () => {
1198
- if (f === null) return;
1199
- let z;
1200
- O ? z = Math.floor(Math.random() * n.length) : z = (f + 1) % n.length, G(z);
1201
- }, H = () => {
1202
- if (f === null) return;
1203
- let z;
1204
- O ? z = Math.floor(Math.random() * n.length) : z = (f - 1 + n.length) % n.length, G(z);
1205
- }, te = () => {
1206
- y((z) => z > 0 ? 0 : 0.7);
1207
- }, B = () => {
1208
- $(!0), V.current && clearTimeout(V.current), V.current = setTimeout(() => {
1209
- $(!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 = f !== null ? n[f] : null;
1216
- return /* @__PURE__ */ e.jsxs(
1217
- "div",
1218
- {
1219
- className: t,
1220
- style: {
1221
- maxWidth: `${h}px`,
1222
- margin: "20px auto",
1223
- background: `linear-gradient(145deg, ${o}, ${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 ${w}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, ${r}, ${i})`,
1252
- display: "flex",
1253
- alignItems: "center",
1254
- justifyContent: "center"
1255
- },
1256
- children: /* @__PURE__ */ e.jsx(Ne, { 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: r
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 ? r : "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(yt, { 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 = f === 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, ${r}20, ${r}10)` : "rgba(255,255,255,0.05)",
1323
- border: D ? `1px solid ${r}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` : r,
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(Ne, { 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 ? r : 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 ? r : "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(me, { size: 16, color: "white" }) : /* @__PURE__ */ e.jsx(be, { 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}, ${o})`,
1458
- borderRadius: "20px",
1459
- padding: "20px",
1460
- border: `1px solid ${r}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: r
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(ge, { size: 20 })
1517
- }
1518
- ),
1519
- /* @__PURE__ */ e.jsxs(
1520
- "button",
1521
- {
1522
- onClick: () => v(-10),
1523
- style: ne(l, "rgba(255,255,255,0.1)"),
1524
- "aria-label": "Skip back 10 seconds",
1525
- children: [
1526
- /* @__PURE__ */ e.jsx(ge, { 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
- u.current && (_ ? (u.current.pause(), j(!1)) : (u.current.play().catch(() => {
1536
- }), j(!0)));
1537
- },
1538
- style: {
1539
- ...ne("#fff", r),
1540
- width: "60px",
1541
- height: "60px",
1542
- borderRadius: "50%",
1543
- boxShadow: `0 8px 25px ${r}40`
1544
- },
1545
- "aria-label": _ ? "Pause" : "Play",
1546
- children: _ ? /* @__PURE__ */ e.jsx(me, { size: 24 }) : /* @__PURE__ */ e.jsx(be, { size: 24 })
1547
- }
1548
- ),
1549
- /* @__PURE__ */ e.jsxs(
1550
- "button",
1551
- {
1552
- onClick: () => v(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(ye, { 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(ye, { 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: a,
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, ${r}, #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: r,
1624
- borderRadius: "50%",
1625
- boxShadow: `0 2px 8px ${r}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(lt, { size: 16, fill: Y ? "#ec4899" : "none" })
1654
- }
1655
- ),
1656
- /* @__PURE__ */ e.jsx(
1657
- "button",
1658
- {
1659
- onClick: () => P(!x),
1660
- style: ne(
1661
- x ? r : l,
1662
- "rgba(255,255,255,0.1)"
1663
- ),
1664
- "aria-label": "Toggle Loop",
1665
- children: /* @__PURE__ */ e.jsx(Me, { 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: b,
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: r,
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(Ae, { size: 16 }) : /* @__PURE__ */ e.jsx(Ie, { size: 16 })
1712
- }
1713
- )
1714
- ]
1715
- }
1716
- )
1717
- ]
1718
- }
1719
- )
1720
- ] }),
1721
- /* @__PURE__ */ e.jsx(
1722
- "audio",
1723
- {
1724
- ref: u,
1725
- src: J.src,
1726
- autoPlay: g,
1727
- loop: x,
1728
- onTimeUpdate: Z,
1729
- onEnded: () => {
1730
- j(!1), x || I();
1731
- },
1732
- onLoadedMetadata: Z,
1733
- preload: "metadata",
1734
- style: { display: "none" }
1735
- }
1736
- )
1737
- ]
1738
- }
1739
- ),
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: ${r};
1758
- border-radius: 2px;
1759
- }
1760
-
1761
- div::-webkit-scrollbar-thumb:hover {
1762
- background: ${r}dd;
1763
- }
1764
- ` })
1765
- ]
1766
- }
1767
- );
1768
- }
1769
- function ne(n, t) {
1770
- return {
1771
- border: "none",
1772
- backgroundColor: t,
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 Pe(n) {
1785
- var t, s, r = "";
1786
- if (typeof n == "string" || typeof n == "number") r += n;
1787
- else if (typeof n == "object") if (Array.isArray(n)) {
1788
- var o = n.length;
1789
- for (t = 0; t < o; t++) n[t] && (s = Pe(n[t])) && (r && (r += " "), r += s);
1790
- } else for (s in n) n[s] && (r && (r += " "), r += s);
1791
- return r;
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;
1792
853
  }
1793
- function C() {
1794
- for (var n, t, s = 0, r = "", o = arguments.length; s < o; s++) (n = arguments[s]) && (t = Pe(n)) && (r && (r += " "), r += t);
1795
- return r;
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 Lt = ze(
858
+ const st = pe(
1798
859
  ({
1799
- text: n,
860
+ text: r,
1800
861
  icon: t,
1801
- iconPosition: s = "left",
1802
- primaryTheme: r = !0,
1803
- primaryColor: o = "#3b82f6",
1804
- size: l = "md",
1805
- rounded: i = !0,
1806
- notificationDot: d = !1,
1807
- dotColor: w = "#ef4444",
1808
- count: h,
1809
- pulse: g = !1,
1810
- className: c,
1811
- onClick: f
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 N = {
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
- }, _ = r ? "bg-[var(--primary)] text-white" : "", j = r ? {} : {
1818
- backgroundColor: o,
877
+ }, y = {
878
+ backgroundColor: s,
1819
879
  color: "#fff"
1820
880
  };
1821
881
  return /* @__PURE__ */ e.jsxs(
1822
882
  "span",
1823
883
  {
1824
- onClick: f,
1825
- style: r ? void 0 : j,
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
- N[l],
1831
- _,
1832
- f && "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: r ? void 0 : { backgroundColor: w },
1840
- className: C(
898
+ style: { backgroundColor: c },
899
+ className: N(
1841
900
  "absolute -top-1 -right-1 w-2 h-2 rounded-full",
1842
- g && "animate-ping",
1843
- r ? "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: r ? void 0 : { backgroundColor: w },
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
- r ? "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
- t && s === "left" && /* @__PURE__ */ e.jsx("span", { className: "flex items-center", children: t }),
1860
- n && /* @__PURE__ */ e.jsx("span", { children: n }),
1861
- t && s === "right" && /* @__PURE__ */ e.jsx("span", { className: "flex items-center", children: t })
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
- Lt.displayName = "Badge";
1868
- const Dt = ie(
1869
- ({
1870
- children: n,
1871
- iconBefore: t,
921
+ st.displayName = "Badge";
922
+ const ot = Q(
923
+ function({
924
+ children: t,
925
+ iconBefore: n,
1872
926
  iconAfter: s,
1873
- loading: r = !1,
1874
- loadingText: o = "Loading...",
1875
- fullWidth: l = !1,
1876
- variant: i = "default",
1877
- size: d = "md",
1878
- disabled: w,
1879
- className: h,
1880
- type: g = "button",
1881
- // ✅ important fix
1882
- ...c
1883
- }, f) => {
1884
- const N = w || r, _ = {
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,
936
+ type: y = "button",
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
- }, j = {
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: f,
1897
- type: g,
1898
- disabled: N,
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
- j[i],
1905
- l && "w-full",
1906
- N && "opacity-60 cursor-not-allowed pointer-events-none",
1907
- h
974
+ ref: S,
975
+ type: y,
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: r ? /* @__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: o })
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
- t && /* @__PURE__ */ e.jsx("span", { className: "flex", children: t }),
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
1012
  );
1922
- Dt.displayName = "Button";
1923
- const Xt = ({
1924
- name: n,
1013
+ ot.displayName = "Button";
1014
+ const ht = ({
1015
+ name: r,
1925
1016
  options: t,
1926
- selectedValues: s = [],
1927
- onChange: r,
1928
- disabled: o = !1,
1017
+ selectedValues: n = [],
1018
+ onChange: s,
1019
+ disabled: a = !1,
1929
1020
  readOnly: l = !1,
1930
1021
  required: i = !1,
1931
- error: d,
1932
- className: w,
1022
+ error: c,
1023
+ className: u,
1933
1024
  customIcon: h,
1934
- style: g,
1935
- labelStyle: c,
1936
- iconSize: f = 20,
1937
- iconCheckedBgColor: N = "#2563eb",
1938
- iconUncheckedBorderColor: _ = "#9ca3af",
1939
- textColor: j = "#374151",
1940
- errorStyle: M,
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,
1941
1032
  darkMode: k = !1
1942
1033
  }) => {
1943
- const E = K(null), [A, R] = L(null), y = (m) => {
1944
- if (!r || o || l) return;
1945
- const p = s.includes(m) ? s.filter((x) => x !== m) : [...s, m];
1946
- r(p);
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);
1947
1038
  };
1948
- return X(() => {
1949
- const m = E.current;
1950
- if (!m) return;
1951
- const p = (x) => {
1952
- if (o || A === null) return;
1953
- const P = A;
1954
- (x.key === "ArrowDown" || x.key === "ArrowRight") && (x.preventDefault(), R((P + 1) % t.length)), (x.key === "ArrowUp" || x.key === "ArrowLeft") && (x.preventDefault(), R((P - 1 + t.length) % t.length)), (x.key === " " || x.key === "Enter") && (x.preventDefault(), y(t[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));
1955
1046
  };
1956
- return m.addEventListener("keydown", p), () => m.removeEventListener("keydown", p);
1957
- }, [A, t, s, o]), /* @__PURE__ */ e.jsxs(
1047
+ return f.addEventListener("keydown", b), () => f.removeEventListener("keydown", b);
1048
+ }, [_, t, n, a]), /* @__PURE__ */ e.jsxs(
1958
1049
  "div",
1959
1050
  {
1960
- ref: E,
1051
+ ref: j,
1961
1052
  role: "group",
1962
- "aria-disabled": o,
1963
- "aria-invalid": !!d,
1053
+ "aria-disabled": a,
1054
+ "aria-invalid": !!c,
1964
1055
  tabIndex: 0,
1965
- className: C("flex flex-col gap-2", w),
1966
- style: { ...g },
1056
+ className: N("flex flex-col gap-2", u),
1057
+ style: { ...m },
1967
1058
  children: [
1968
- t.map((m, p) => {
1969
- const x = s.includes(m.value), P = A === p;
1059
+ t.map((f, b) => {
1060
+ const x = n.includes(f.value), $ = _ === b;
1970
1061
  return /* @__PURE__ */ e.jsxs(
1971
1062
  "label",
1972
1063
  {
1973
- className: C(
1064
+ className: N(
1974
1065
  "flex items-center justify-between cursor-pointer select-none transition-opacity",
1975
- o ? "opacity-50 cursor-not-allowed" : "opacity-100",
1976
- P ? "ring-2 ring-blue-400" : ""
1066
+ a ? "opacity-50 cursor-not-allowed" : "opacity-100",
1067
+ $ ? "ring-2 ring-blue-400" : ""
1977
1068
  ),
1978
- style: { ...c },
1979
- onFocus: () => R(p),
1069
+ style: { ...d },
1070
+ onFocus: () => C(b),
1980
1071
  children: [
1981
- /* @__PURE__ */ e.jsx("span", { style: { color: j, fontSize: 14 }, children: m.label }),
1072
+ /* @__PURE__ */ e.jsx("span", { style: { color: E, fontSize: 14 }, children: f.label }),
1982
1073
  /* @__PURE__ */ e.jsx(
1983
1074
  "input",
1984
1075
  {
1985
1076
  type: "checkbox",
1986
- name: n,
1987
- value: m.value,
1077
+ name: r,
1078
+ value: f.value,
1988
1079
  checked: x,
1989
- disabled: o || l,
1080
+ disabled: a || l,
1990
1081
  required: i,
1991
- onChange: () => y(m.value),
1082
+ onChange: () => g(f.value),
1992
1083
  style: { display: "none" }
1993
1084
  }
1994
1085
  ),
@@ -1999,11 +1090,11 @@ const Xt = ({
1999
1090
  display: "inline-flex",
2000
1091
  justifyContent: "center",
2001
1092
  alignItems: "center",
2002
- width: f,
2003
- height: f,
1093
+ width: p,
1094
+ height: p,
2004
1095
  borderRadius: 4,
2005
- border: `2px solid ${x ? N : _}`,
2006
- backgroundColor: x ? N : "transparent",
1096
+ border: `2px solid ${x ? y : T}`,
1097
+ backgroundColor: x ? y : "transparent",
2007
1098
  transition: "all 0.25s ease"
2008
1099
  },
2009
1100
  children: x && /* @__PURE__ */ e.jsx(
@@ -2015,7 +1106,7 @@ const Xt = ({
2015
1106
  strokeWidth: 3,
2016
1107
  strokeLinecap: "round",
2017
1108
  strokeLinejoin: "round",
2018
- style: { width: f * 0.6, height: f * 0.6 },
1109
+ style: { width: p * 0.6, height: p * 0.6 },
2019
1110
  children: /* @__PURE__ */ e.jsx("polyline", { points: "20 6 9 17 4 12" })
2020
1111
  }
2021
1112
  )
@@ -2023,10 +1114,10 @@ const Xt = ({
2023
1114
  )
2024
1115
  ]
2025
1116
  },
2026
- m.value
1117
+ f.value
2027
1118
  );
2028
1119
  }),
2029
- d && /* @__PURE__ */ e.jsx(
1120
+ c && /* @__PURE__ */ e.jsx(
2030
1121
  "p",
2031
1122
  {
2032
1123
  role: "alert",
@@ -2034,106 +1125,106 @@ const Xt = ({
2034
1125
  color: "#dc2626",
2035
1126
  fontSize: 12,
2036
1127
  marginTop: 4,
2037
- ...M
1128
+ ...S
2038
1129
  },
2039
- children: d
1130
+ children: c
2040
1131
  }
2041
1132
  )
2042
1133
  ]
2043
1134
  }
2044
1135
  );
2045
- }, Jt = ({
2046
- name: n,
1136
+ }, yt = ({
1137
+ name: r,
2047
1138
  options: t,
2048
- selectedValue: s,
2049
- onChange: r,
2050
- disabled: o = !1,
1139
+ selectedValue: n,
1140
+ onChange: s,
1141
+ disabled: a = !1,
2051
1142
  readOnly: l = !1,
2052
1143
  required: i = !1,
2053
- error: d,
2054
- className: w,
1144
+ error: c,
1145
+ className: u,
2055
1146
  style: h,
2056
- labelStyle: g,
2057
- iconSize: c = 20,
2058
- iconCheckedBgColor: f = "#2563eb",
2059
- iconUncheckedBorderColor: N = "#9ca3af",
2060
- textColor: _ = "#374151",
2061
- errorStyle: j,
2062
- 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
2063
1154
  }) => {
2064
- const k = K(null), [E, A] = L(null);
2065
- return X(() => {
2066
- const R = k.current;
2067
- if (!R) return;
2068
- const y = (m) => {
2069
- if (o) return;
2070
- const p = E ?? t.findIndex((x) => x.value === s) ?? 0;
2071
- if (m.key === "ArrowDown" || m.key === "ArrowRight") {
2072
- m.preventDefault();
2073
- const x = (p + 1) % t.length;
2074
- r && r(t[x].value), A(x);
1155
+ const k = V(null), [j, _] = W(null);
1156
+ return U(() => {
1157
+ const C = k.current;
1158
+ if (!C) return;
1159
+ const g = (f) => {
1160
+ if (a) return;
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);
2075
1166
  }
2076
- if (m.key === "ArrowUp" || m.key === "ArrowLeft") {
2077
- m.preventDefault();
2078
- const x = (p - 1 + t.length) % t.length;
2079
- r && r(t[x].value), A(x);
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);
2080
1171
  }
2081
1172
  };
2082
- return R.addEventListener("keydown", y), () => R.removeEventListener("keydown", y);
2083
- }, [E, t, s, r, o]), /* @__PURE__ */ e.jsxs(
1173
+ return C.addEventListener("keydown", g), () => C.removeEventListener("keydown", g);
1174
+ }, [j, t, n, s, a]), /* @__PURE__ */ e.jsxs(
2084
1175
  "div",
2085
1176
  {
2086
1177
  ref: k,
2087
1178
  role: "radiogroup",
2088
- "aria-disabled": o,
2089
- "aria-invalid": !!d,
2090
- className: C("flex flex-col gap-2", w),
1179
+ "aria-disabled": a,
1180
+ "aria-invalid": !!c,
1181
+ className: N("flex flex-col gap-2", u),
2091
1182
  style: { ...h },
2092
1183
  tabIndex: 0,
2093
1184
  children: [
2094
- t.map((R, y) => {
2095
- const m = s === R.value, p = E === y;
1185
+ t.map((C, g) => {
1186
+ const f = n === C.value, b = j === g;
2096
1187
  return /* @__PURE__ */ e.jsxs(
2097
1188
  "label",
2098
1189
  {
2099
- className: C(
1190
+ className: N(
2100
1191
  "flex items-center justify-between cursor-pointer select-none gap-2",
2101
- o ? "opacity-50 cursor-not-allowed" : "opacity-100",
2102
- p ? "ring-2 ring-blue-400" : ""
1192
+ a ? "opacity-50 cursor-not-allowed" : "opacity-100",
1193
+ b ? "ring-2 ring-blue-400" : ""
2103
1194
  ),
2104
- style: { ...g },
1195
+ style: { ...m },
2105
1196
  children: [
2106
- /* @__PURE__ */ e.jsx("span", { style: { color: _, fontSize: 14 }, children: R.label }),
1197
+ /* @__PURE__ */ e.jsx("span", { style: { color: T, fontSize: 14 }, children: C.label }),
2107
1198
  /* @__PURE__ */ e.jsx(
2108
1199
  "input",
2109
1200
  {
2110
1201
  type: "radio",
2111
- name: n,
2112
- value: R.value,
2113
- checked: m,
2114
- disabled: o || l,
1202
+ name: r,
1203
+ value: C.value,
1204
+ checked: f,
1205
+ disabled: a || l,
2115
1206
  required: i,
2116
- onChange: () => r && r(R.value),
1207
+ onChange: () => s && s(C.value),
2117
1208
  style: { display: "none" }
2118
1209
  }
2119
1210
  ),
2120
1211
  /* @__PURE__ */ e.jsx(
2121
1212
  "span",
2122
1213
  {
2123
- 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"),
2124
1215
  style: {
2125
- width: c,
2126
- height: c,
2127
- border: `2px solid ${m ? f : N}`,
2128
- backgroundColor: m ? f : "transparent",
1216
+ width: d,
1217
+ height: d,
1218
+ border: `2px solid ${f ? p : y}`,
1219
+ backgroundColor: f ? p : "transparent",
2129
1220
  transition: "all 0.2s ease"
2130
1221
  },
2131
- children: m && /* @__PURE__ */ e.jsx(
1222
+ children: f && /* @__PURE__ */ e.jsx(
2132
1223
  "span",
2133
1224
  {
2134
1225
  style: {
2135
- width: c / 2,
2136
- height: c / 2,
1226
+ width: d / 2,
1227
+ height: d / 2,
2137
1228
  borderRadius: "50%",
2138
1229
  backgroundColor: "#fff"
2139
1230
  }
@@ -2143,10 +1234,10 @@ const Xt = ({
2143
1234
  )
2144
1235
  ]
2145
1236
  },
2146
- R.value
1237
+ C.value
2147
1238
  );
2148
1239
  }),
2149
- d && /* @__PURE__ */ e.jsx(
1240
+ c && /* @__PURE__ */ e.jsx(
2150
1241
  "p",
2151
1242
  {
2152
1243
  role: "alert",
@@ -2154,103 +1245,103 @@ const Xt = ({
2154
1245
  color: "#dc2626",
2155
1246
  fontSize: 12,
2156
1247
  marginTop: 4,
2157
- ...j
1248
+ ...E
2158
1249
  },
2159
- children: d
1250
+ children: c
2160
1251
  }
2161
1252
  )
2162
1253
  ]
2163
1254
  }
2164
1255
  );
2165
- }, Kt = ({
2166
- name: n,
1256
+ }, gt = ({
1257
+ name: r,
2167
1258
  options: t,
2168
- selectedValues: s = [],
2169
- onChange: r,
2170
- disabled: o = !1,
1259
+ selectedValues: n = [],
1260
+ onChange: s,
1261
+ disabled: a = !1,
2171
1262
  readOnly: l = !1,
2172
1263
  required: i = !1,
2173
- error: d,
2174
- className: w,
1264
+ error: c,
1265
+ className: u,
2175
1266
  style: h,
2176
- labelStyle: g,
2177
- iconSize: c = 20,
2178
- iconCheckedBgColor: f = "#2563eb",
2179
- switchBgColor: N = "#d1d5db",
2180
- textColor: _ = "#374151",
2181
- errorStyle: j,
2182
- 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
2183
1274
  }) => {
2184
- const k = K(null), [E, A] = L(null), R = (y) => {
2185
- if (!r || o || l) return;
2186
- const m = s.includes(y) ? s.filter((p) => p !== y) : [...s, y];
2187
- r(m);
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);
2188
1279
  };
2189
- return X(() => {
2190
- const y = k.current;
2191
- if (!y) return;
2192
- const m = (p) => {
2193
- if (o || E === null) return;
2194
- const x = E;
2195
- if (p.key === "ArrowRight" || p.key === "ArrowDown") {
2196
- p.preventDefault();
2197
- const P = (x + 1) % t.length;
2198
- 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
+ _($);
2199
1290
  }
2200
- if (p.key === "ArrowLeft" || p.key === "ArrowUp") {
2201
- p.preventDefault();
2202
- const P = (x - 1 + t.length) % t.length;
2203
- A(P);
1291
+ if (b.key === "ArrowLeft" || b.key === "ArrowUp") {
1292
+ b.preventDefault();
1293
+ const $ = (x - 1 + t.length) % t.length;
1294
+ _($);
2204
1295
  }
2205
- (p.key === " " || p.key === "Enter") && (p.preventDefault(), R(t[x].value));
1296
+ (b.key === " " || b.key === "Enter") && (b.preventDefault(), C(t[x].value));
2206
1297
  };
2207
- return y.addEventListener("keydown", m), () => y.removeEventListener("keydown", m);
2208
- }, [E, t, s, o]), /* @__PURE__ */ e.jsxs(
1298
+ return g.addEventListener("keydown", f), () => g.removeEventListener("keydown", f);
1299
+ }, [j, t, n, a]), /* @__PURE__ */ e.jsxs(
2209
1300
  "div",
2210
1301
  {
2211
1302
  ref: k,
2212
1303
  role: "group",
2213
- "aria-disabled": o,
2214
- "aria-invalid": !!d,
1304
+ "aria-disabled": a,
1305
+ "aria-invalid": !!c,
2215
1306
  tabIndex: 0,
2216
- className: C("flex flex-col gap-2", w),
1307
+ className: N("flex flex-col gap-2", u),
2217
1308
  style: { ...h },
2218
1309
  children: [
2219
- t.map((y, m) => {
2220
- const p = s.includes(y.value), x = E === m;
1310
+ t.map((g, f) => {
1311
+ const b = n.includes(g.value), x = j === f;
2221
1312
  return /* @__PURE__ */ e.jsxs(
2222
1313
  "label",
2223
1314
  {
2224
- className: C(
1315
+ className: N(
2225
1316
  "flex items-center justify-between cursor-pointer select-none transition-opacity",
2226
- o ? "opacity-50 cursor-not-allowed" : "opacity-100",
1317
+ a ? "opacity-50 cursor-not-allowed" : "opacity-100",
2227
1318
  x ? "ring-2 ring-blue-400" : ""
2228
1319
  ),
2229
- style: { ...g },
2230
- onFocus: () => A(m),
1320
+ style: { ...m },
1321
+ onFocus: () => _(f),
2231
1322
  children: [
2232
- /* @__PURE__ */ e.jsx("span", { style: { color: _, fontSize: 14 }, children: y.label }),
1323
+ /* @__PURE__ */ e.jsx("span", { style: { color: T, fontSize: 14 }, children: g.label }),
2233
1324
  /* @__PURE__ */ e.jsx(
2234
1325
  "input",
2235
1326
  {
2236
1327
  type: "checkbox",
2237
- name: n,
2238
- value: y.value,
2239
- checked: p,
2240
- disabled: o || l,
1328
+ name: r,
1329
+ value: g.value,
1330
+ checked: b,
1331
+ disabled: a || l,
2241
1332
  required: i,
2242
- onChange: () => R(y.value),
1333
+ onChange: () => C(g.value),
2243
1334
  style: { display: "none" }
2244
1335
  }
2245
1336
  ),
2246
1337
  /* @__PURE__ */ e.jsx(
2247
1338
  "span",
2248
1339
  {
2249
- className: C("relative inline-flex rounded-full transition-colors"),
1340
+ className: N("relative inline-flex rounded-full transition-colors"),
2250
1341
  style: {
2251
- width: c * 2,
2252
- height: c * 1.1,
2253
- backgroundColor: p ? f : N,
1342
+ width: d * 2,
1343
+ height: d * 1.1,
1344
+ backgroundColor: b ? p : y,
2254
1345
  transition: "background-color 0.25s ease",
2255
1346
  borderRadius: 9999
2256
1347
  },
@@ -2260,10 +1351,10 @@ const Xt = ({
2260
1351
  style: {
2261
1352
  position: "absolute",
2262
1353
  top: "50%",
2263
- left: p ? `calc(100% - ${c - 4}px - 2px)` : "2px",
1354
+ left: b ? `calc(100% - ${d - 4}px - 2px)` : "2px",
2264
1355
  transform: "translateY(-50%)",
2265
- width: c - 4,
2266
- height: c - 4,
1356
+ width: d - 4,
1357
+ height: d - 4,
2267
1358
  borderRadius: "50%",
2268
1359
  backgroundColor: "#fff",
2269
1360
  boxShadow: "0 1px 2px rgba(0,0,0,0.3)",
@@ -2275,10 +1366,10 @@ const Xt = ({
2275
1366
  )
2276
1367
  ]
2277
1368
  },
2278
- y.value
1369
+ g.value
2279
1370
  );
2280
1371
  }),
2281
- d && /* @__PURE__ */ e.jsx(
1372
+ c && /* @__PURE__ */ e.jsx(
2282
1373
  "p",
2283
1374
  {
2284
1375
  role: "alert",
@@ -2286,141 +1377,78 @@ const Xt = ({
2286
1377
  color: "#dc2626",
2287
1378
  fontSize: 12,
2288
1379
  marginTop: 4,
2289
- ...j
1380
+ ...E
2290
1381
  },
2291
- children: d
1382
+ children: c
2292
1383
  }
2293
1384
  )
2294
1385
  ]
2295
1386
  }
2296
1387
  );
2297
- }, Ot = {
1388
+ }, at = {
2298
1389
  sm: "max-w-sm",
2299
1390
  md: "max-w-md",
2300
1391
  lg: "max-w-lg",
2301
1392
  xl: "max-w-xl",
2302
1393
  "2xl": "max-w-2xl",
2303
- full: "w-full"
2304
- }, Ft = {
1394
+ full: "w-full h-full"
1395
+ }, lt = {
2305
1396
  none: "p-0",
2306
1397
  sm: "p-4",
2307
1398
  md: "p-6",
2308
1399
  lg: "p-8",
2309
1400
  xl: "p-12"
2310
- }, Zt = ({
2311
- size: n = "lg",
2312
- padding: t = "md",
2313
- center: s = !0,
2314
- className: r = "",
2315
- children: o
1401
+ }, vt = ({
1402
+ size: r = "full",
1403
+ padding: t = "none",
1404
+ center: n = !0,
1405
+ className: s = "",
1406
+ children: a
2316
1407
  }) => {
2317
- const l = C(
1408
+ const l = N(
2318
1409
  "w-full box-border",
2319
- Ot[n],
2320
- Ft[t],
2321
- s && "mx-auto",
2322
- r
2323
- );
2324
- return /* @__PURE__ */ e.jsx("div", { className: l, children: o });
2325
- }, ae = (n, t) => t == null ? "" : typeof t != "object" ? `${n}-${t}` : Object.entries(t).map(([s, r]) => `${s}:${n}-${r}`).join(" "), Qt = ({
2326
- direction: n = { sm: "column", md: "row" },
2327
- align: t = "center",
2328
- justify: s = "between",
2329
- wrap: r = "wrap",
2330
- gap: o,
2331
- padding: l,
2332
- margin: i,
2333
- className: d,
2334
- children: w
2335
- }) => {
2336
- const h = C(
2337
- "flex",
2338
- ae("flex", n),
2339
- ae("items", t),
2340
- ae("justify", s),
2341
- ae("flex", r),
2342
- // wrap classes: flex-wrap, flex-nowrap, flex-wrap-reverse
2343
- o ? ae("gap", o) : "",
2344
- l ? ae("p", l) : "",
2345
- i ? ae("m", i) : "",
2346
- d
1410
+ at[r],
1411
+ lt[t],
1412
+ n && "mx-auto",
1413
+ s
2347
1414
  );
2348
- return /* @__PURE__ */ e.jsx("div", { className: h, children: w });
2349
- }, Te = (n, t) => t == null ? "" : typeof t != "object" ? `${n}-${t}` : Object.entries(t).map(([s, r]) => `${s}:${n}-${r}`).join(" "), Le = ({
2350
- direction: n = { sm: "vertical", md: "horizontal" },
2351
- gap: t = 4,
2352
- align: s = "center",
2353
- justify: r = "start",
2354
- wrap: o = "nowrap",
2355
- className: l,
2356
- children: i
2357
- }) => {
2358
- const d = C(
2359
- "flex",
2360
- Te("flex", n),
2361
- // flex-col or flex-row
2362
- Te("gap", t),
2363
- s !== "stretch" ? `items-${s}` : "items-stretch",
2364
- r !== "start" ? `justify-${r}` : "justify-start",
2365
- o !== "nowrap" ? `flex-${o}` : "flex-nowrap",
2366
- l
2367
- );
2368
- return /* @__PURE__ */ e.jsx("div", { className: d, children: i });
2369
- }, er = (n) => /* @__PURE__ */ e.jsx(Le, { direction: "horizontal", ...n }), tr = (n) => /* @__PURE__ */ e.jsx(Le, { direction: "vertical", ...n }), xe = (n, t) => t == null ? "" : typeof t != "object" ? `${n}-${t}` : Object.entries(t).map(([s, r]) => `${s}:${n}-${r}`).join(" "), rr = ({
2370
- columns: n = { sm: 1, md: 2, lg: 3 },
2371
- gap: t = 4,
2372
- padding: s = 4,
2373
- alignItems: r = "stretch",
2374
- justifyItems: o = "stretch",
2375
- className: l,
2376
- children: i
2377
- }) => {
2378
- const d = C(
2379
- "grid",
2380
- xe("grid-cols", n),
2381
- xe("gap", t),
2382
- xe("p", s),
2383
- r !== "stretch" ? `items-${r}` : "items-stretch",
2384
- o !== "stretch" ? `justify-items-${o}` : "justify-items-stretch",
2385
- l
2386
- );
2387
- return /* @__PURE__ */ e.jsx("div", { className: d, children: i });
2388
- }, nr = ({
2389
- label: n = "Open Drawer",
1415
+ return /* @__PURE__ */ e.jsx("div", { className: l, children: a });
1416
+ }, wt = ({
1417
+ label: r = "Open Drawer",
2390
1418
  icon: t,
2391
- iconPosition: s = "left",
2392
- onClick: r,
2393
- className: o = ""
1419
+ iconPosition: n = "left",
1420
+ onClick: s,
1421
+ className: a = ""
2394
1422
  }) => /* @__PURE__ */ e.jsxs(
2395
1423
  "button",
2396
1424
  {
2397
1425
  type: "button",
2398
- onClick: r,
2399
- 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 ${o}`,
1426
+ onClick: s,
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}`,
2400
1428
  children: [
2401
- t && s === "left" && t,
2402
- n,
2403
- t && s === "right" && t
1429
+ t && n === "left" && t,
1430
+ r,
1431
+ t && n === "right" && t
2404
1432
  ]
2405
1433
  }
2406
- ), sr = ({
2407
- open: n,
1434
+ ), kt = ({
1435
+ open: r,
2408
1436
  onClose: t,
2409
- position: s = "right",
2410
- size: r = "320px",
2411
- children: o,
1437
+ position: n = "right",
1438
+ size: s = "320px",
1439
+ children: a,
2412
1440
  showCloseButton: l = !0,
2413
1441
  className: i = "",
2414
- overlayClassName: d = "",
2415
- closeButtonClassName: w = ""
1442
+ overlayClassName: c = "",
1443
+ closeButtonClassName: u = ""
2416
1444
  }) => {
2417
- const [h, g] = L(n);
2418
- X(() => {
2419
- n ? g(!0) : setTimeout(() => g(!1), 300);
2420
- }, [n]);
2421
- const c = de(() => {
2422
- if (n) return "translate(0,0)";
2423
- 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) {
2424
1452
  case "left":
2425
1453
  return "translateX(-100%)";
2426
1454
  case "right":
@@ -2432,13 +1460,13 @@ const Xt = ({
2432
1460
  default:
2433
1461
  return "translate(0,0)";
2434
1462
  }
2435
- }, [n, s]);
2436
- return !h && !n ? null : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1463
+ }, [r, n]);
1464
+ return !h && !r ? null : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
2437
1465
  /* @__PURE__ */ e.jsx(
2438
1466
  "div",
2439
1467
  {
2440
1468
  onClick: t,
2441
- className: `fixed inset-0 bg-black/50 transition-opacity ${n ? "opacity-100" : "opacity-0"} ${d}`
1469
+ className: `fixed inset-0 bg-black/50 transition-opacity ${r ? "opacity-100" : "opacity-0"} ${c}`
2442
1470
  }
2443
1471
  ),
2444
1472
  /* @__PURE__ */ e.jsxs(
@@ -2446,67 +1474,67 @@ const Xt = ({
2446
1474
  {
2447
1475
  className: `fixed bg-white shadow-lg flex flex-col transition-transform duration-300 ${i}`,
2448
1476
  style: {
2449
- width: s === "left" || s === "right" ? r : "100%",
2450
- height: s === "top" || s === "bottom" ? r : "100%",
2451
- top: (s === "bottom" || s === "top") && s === "bottom" ? "auto" : 0,
2452
- bottom: s === "bottom" ? 0 : "auto",
2453
- left: s === "left" ? 0 : s === "right" ? "auto" : 0,
2454
- right: s === "right" ? 0 : s === "left" ? "auto" : 0,
2455
- 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
2456
1484
  },
2457
1485
  children: [
2458
1486
  l && /* @__PURE__ */ e.jsx(
2459
1487
  "button",
2460
1488
  {
2461
1489
  onClick: t,
2462
- className: `absolute top-4 right-4 p-1 rounded-full hover:bg-gray-200 transition-colors ${w}`,
1490
+ className: `absolute top-4 right-4 p-1 rounded-full hover:bg-gray-200 transition-colors ${u}`,
2463
1491
  "aria-label": "Close drawer",
2464
- children: /* @__PURE__ */ e.jsx(ve, { size: 20 })
1492
+ children: /* @__PURE__ */ e.jsx(ie, { size: 20 })
2465
1493
  }
2466
1494
  ),
2467
- /* @__PURE__ */ e.jsx("div", { className: "flex-1 overflow-auto p-4", children: o })
1495
+ /* @__PURE__ */ e.jsx("div", { className: "flex-1 overflow-auto p-4", children: a })
2468
1496
  ]
2469
1497
  }
2470
1498
  )
2471
1499
  ] });
2472
- }, Bt = ie(
2473
- (n, t) => {
1500
+ }, it = Q(
1501
+ (r, t) => {
2474
1502
  const {
2475
- label: s,
2476
- name: r = "",
2477
- value: o,
1503
+ label: n,
1504
+ name: s = "",
1505
+ value: a,
2478
1506
  defaultValue: l,
2479
1507
  onChange: i,
2480
- options: d = [],
2481
- placeholder: w = "Select an option",
1508
+ options: c = [],
1509
+ placeholder: u = "Select an option",
2482
1510
  required: h,
2483
- disabled: g,
2484
- error: c,
2485
- success: f,
2486
- helperText: N,
2487
- labelIcon: _,
2488
- prefixIcon: j,
2489
- variant: M = "dark",
1511
+ disabled: m,
1512
+ error: d,
1513
+ success: p,
1514
+ helperText: y,
1515
+ labelIcon: T,
1516
+ prefixIcon: E,
1517
+ variant: S = "dark",
2490
1518
  primaryTheme: k = !0,
2491
- primaryColor: E = "#3b82f6",
2492
- containerClassName: A = "",
2493
- labelClassName: R = "",
2494
- triggerClassName: y = "",
2495
- dropdownClassName: m = "",
2496
- optionClassName: p = "",
1519
+ primaryColor: j = "#3b82f6",
1520
+ containerClassName: _ = "",
1521
+ labelClassName: C = "",
1522
+ triggerClassName: g = "",
1523
+ dropdownClassName: f = "",
1524
+ optionClassName: b = "",
2497
1525
  className: x = ""
2498
- } = n, P = K(null);
2499
- _e(t, () => P.current);
2500
- const [O, q] = L(!1), [Y, W] = L(l || ""), F = o !== void 0 ? o : Y, $ = d.find((v) => v.value === F);
2501
- X(() => {
2502
- const v = (I) => {
2503
- P.current && !P.current.contains(I.target) && q(!1);
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);
2504
1532
  };
2505
- return document.addEventListener("mousedown", v), () => document.removeEventListener("mousedown", v);
1533
+ return document.addEventListener("mousedown", w), () => document.removeEventListener("mousedown", w);
2506
1534
  }, []);
2507
- const u = (v) => {
2508
- W(v.value), i?.(r, v.value), q(!1);
2509
- }, S = {
1535
+ const z = (w) => {
1536
+ F(w.value), i?.(s, w.value), O(!1);
1537
+ }, A = {
2510
1538
  dark: {
2511
1539
  bg: "bg-zinc-900",
2512
1540
  text: "text-white",
@@ -2521,103 +1549,103 @@ const Xt = ({
2521
1549
  dropdown: "bg-white border-gray-200",
2522
1550
  option: "text-gray-700 hover:bg-gray-100"
2523
1551
  }
2524
- }[M], V = k ? {} : { color: E }, G = k ? {} : { borderColor: E }, Z = k ? {} : { backgroundColor: `${E}20` }, a = c ? "border-rose-500" : f ? "border-emerald-500" : S.border, b = j ? "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";
2525
1553
  return /* @__PURE__ */ e.jsxs(
2526
1554
  "div",
2527
1555
  {
2528
- ref: P,
2529
- className: `w-full space-y-1 ${A} ${x}`,
1556
+ ref: $,
1557
+ className: `w-full space-y-1 ${_} ${x}`,
2530
1558
  children: [
2531
- s && /* @__PURE__ */ e.jsxs(
1559
+ n && /* @__PURE__ */ e.jsxs(
2532
1560
  "label",
2533
1561
  {
2534
- className: `flex items-center gap-2 text-[13px] font-medium ${R}`,
1562
+ className: `flex items-center gap-2 text-[13px] font-medium ${C}`,
2535
1563
  children: [
2536
- _ && /* @__PURE__ */ e.jsx(
2537
- _,
1564
+ T && /* @__PURE__ */ e.jsx(
1565
+ T,
2538
1566
  {
2539
1567
  className: k ? "w-4 h-4 text-[var(--primary)]" : "w-4 h-4",
2540
- style: k ? void 0 : V
1568
+ style: k ? void 0 : Y
2541
1569
  }
2542
1570
  ),
2543
- s,
1571
+ n,
2544
1572
  h && /* @__PURE__ */ e.jsx("span", { className: "text-rose-500", children: "*" })
2545
1573
  ]
2546
1574
  }
2547
1575
  ),
2548
1576
  /* @__PURE__ */ e.jsxs("div", { className: "relative group", children: [
2549
- j && /* @__PURE__ */ e.jsx("div", { className: "absolute left-4 top-1/2 -translate-y-1/2 z-10", children: /* @__PURE__ */ e.jsx(
2550
- j,
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,
2551
1579
  {
2552
1580
  className: k ? "w-4 h-4 text-zinc-500 group-focus-within:text-[var(--primary)]" : "w-4 h-4 text-zinc-500",
2553
- style: k ? void 0 : V
1581
+ style: k ? void 0 : Y
2554
1582
  }
2555
1583
  ) }),
2556
1584
  /* @__PURE__ */ e.jsxs(
2557
1585
  "button",
2558
1586
  {
2559
1587
  type: "button",
2560
- disabled: g,
2561
- onClick: () => q((v) => !v),
2562
- style: k ? void 0 : G,
1588
+ disabled: m,
1589
+ onClick: () => O((w) => !w),
1590
+ style: k ? void 0 : B,
2563
1591
  className: `
2564
1592
  w-full py-2.5 rounded-lg text-left text-sm
2565
1593
  border transition-all duration-200
2566
- ${S.bg} ${S.text}
2567
- ${b}
2568
- ${a}
1594
+ ${A.bg} ${A.text}
1595
+ ${v}
1596
+ ${o}
2569
1597
  focus:ring-2
2570
1598
  ${k ? "focus:ring-[var(--primary)]/30 focus:border-[var(--primary)]" : ""}
2571
1599
  disabled:opacity-50 disabled:cursor-not-allowed
2572
- ${y}
1600
+ ${g}
2573
1601
  `,
2574
1602
  children: [
2575
- /* @__PURE__ */ e.jsx("span", { className: $ ? S.text : "text-zinc-500", children: $ ? $.label : w }),
1603
+ /* @__PURE__ */ e.jsx("span", { className: R ? A.text : "text-zinc-500", children: R ? R.label : u }),
2576
1604
  /* @__PURE__ */ e.jsx(
2577
- Se,
1605
+ ye,
2578
1606
  {
2579
- 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`
2580
1608
  }
2581
1609
  )
2582
1610
  ]
2583
1611
  }
2584
1612
  ),
2585
- O && /* @__PURE__ */ e.jsx(
1613
+ M && /* @__PURE__ */ e.jsx(
2586
1614
  "div",
2587
1615
  {
2588
1616
  className: `
2589
1617
  absolute z-50 mt-2 w-full rounded-xl border shadow-xl overflow-hidden
2590
- ${S.dropdown}
2591
- ${m}
1618
+ ${A.dropdown}
1619
+ ${f}
2592
1620
  `,
2593
- children: /* @__PURE__ */ e.jsx("ul", { className: "max-h-60 overflow-y-auto", children: d.map((v) => {
2594
- const I = F === v.value;
1621
+ children: /* @__PURE__ */ e.jsx("ul", { className: "max-h-60 overflow-y-auto", children: c.map((w) => {
1622
+ const L = I === w.value;
2595
1623
  return /* @__PURE__ */ e.jsxs(
2596
1624
  "li",
2597
1625
  {
2598
- onClick: () => u(v),
2599
- style: !k && I ? Z : void 0,
1626
+ onClick: () => z(w),
1627
+ style: !k && L ? q : void 0,
2600
1628
  className: `
2601
1629
  px-4 py-3 cursor-pointer text-sm flex items-center gap-2
2602
- ${I ? k ? "bg-[var(--primary)]/15 text-[var(--primary)]" : "" : S.option}
2603
- ${p}
1630
+ ${L ? k ? "bg-[var(--primary)]/15 text-[var(--primary)]" : "" : A.option}
1631
+ ${b}
2604
1632
  `,
2605
1633
  children: [
2606
- v.icon && /* @__PURE__ */ e.jsx("span", { children: v.icon }),
2607
- v.label
1634
+ w.icon && /* @__PURE__ */ e.jsx("span", { children: w.icon }),
1635
+ w.label
2608
1636
  ]
2609
1637
  },
2610
- v.value
1638
+ w.value
2611
1639
  );
2612
1640
  }) })
2613
1641
  }
2614
1642
  )
2615
1643
  ] }),
2616
- (N || c) && /* @__PURE__ */ e.jsx(
1644
+ (y || d) && /* @__PURE__ */ e.jsx(
2617
1645
  "p",
2618
1646
  {
2619
- className: `text-xs ${c ? "text-rose-500" : f ? "text-emerald-500" : "text-zinc-500"}`,
2620
- children: typeof c == "string" ? c : N
1647
+ className: `text-xs ${d ? "text-rose-500" : p ? "text-emerald-500" : "text-zinc-500"}`,
1648
+ children: typeof d == "string" ? d : y
2621
1649
  }
2622
1650
  )
2623
1651
  ]
@@ -2625,446 +1653,445 @@ const Xt = ({
2625
1653
  );
2626
1654
  }
2627
1655
  );
2628
- Bt.displayName = "Dropdown";
2629
- const ar = ie((n, t) => {
2630
- const {
2631
- label: s,
2632
- name: r = "",
2633
- type: o = "text",
2634
- placeholder: l = "",
2635
- value: i,
2636
- defaultValue: d,
2637
- onChange: w,
2638
- required: h,
2639
- disabled: g,
2640
- readOnly: c,
2641
- error: f,
2642
- success: N,
2643
- helperText: _,
2644
- icon: j,
2645
- prefix: M,
2646
- prefixIcon: k,
2647
- suffixIcon: E,
2648
- min: A,
2649
- max: R,
2650
- step: y,
2651
- rows: m = 4,
2652
- primaryTheme: p = !0,
2653
- primaryColor: x = "#3b82f6",
2654
- className: P = ""
2655
- } = n, O = K(null);
2656
- _e(t, () => O.current);
2657
- const [q, Y] = L(d || ""), [W, F] = L(!1), $ = !!k, u = !!M, S = $ || u, V = i !== void 0 ? i : q, G = (H) => {
2658
- const te = H.target.value;
2659
- Y(te), w?.(r, te);
2660
- }, Z = (H) => {
2661
- o === "number" && H.key === "-" && H.preventDefault();
2662
- }, a = () => S ? $ && u ? "pl-20 pr-4" : u ? "pl-14 pr-4" : $ ? "pl-10 pr-4" : "px-4" : "px-4", b = p ? {} : {
2663
- borderColor: x,
2664
- boxShadow: `0 0 0 1px ${x}`
2665
- }, v = p ? {} : { color: x }, I = f ? "border-red-500" : N ? "border-emerald-500" : "border-zinc-300 dark:border-zinc-800";
2666
- return /* @__PURE__ */ e.jsxs("div", { className: `w-full space-y-1 ${P}`, children: [
2667
- s && /* @__PURE__ */ e.jsxs("label", { className: "flex items-center gap-2 text-[12px] font-medium text-gray-700 dark:text-zinc-100", children: [
2668
- j && /* @__PURE__ */ e.jsx(
2669
- j,
2670
- {
2671
- size: 16,
2672
- className: p ? "text-[var(--primary)]" : "",
2673
- style: p ? void 0 : v
2674
- }
2675
- ),
2676
- s,
2677
- h && /* @__PURE__ */ e.jsx("span", { className: "text-red-500", children: "*" })
2678
- ] }),
2679
- /* @__PURE__ */ e.jsxs("div", { className: "relative", children: [
2680
- 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: [
2681
- k && /* @__PURE__ */ e.jsx(k, { size: 14 }),
2682
- u && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
2683
- /* @__PURE__ */ e.jsx("span", { className: "font-medium text-zinc-600 dark:text-zinc-200", children: M }),
2684
- /* @__PURE__ */ e.jsx("span", { className: "h-4 w-px bg-zinc-300 dark:bg-zinc-700" })
2685
- ] })
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: "*" })
2686
1704
  ] }),
2687
- o === "textarea" ? /* @__PURE__ */ e.jsx(
2688
- "textarea",
2689
- {
2690
- ref: O,
2691
- name: r,
2692
- value: V,
2693
- onChange: G,
2694
- placeholder: l,
2695
- required: h,
2696
- disabled: g,
2697
- readOnly: c,
2698
- rows: m,
2699
- style: p ? void 0 : b,
2700
- className: `
2701
- w-full rounded-lg text-sm
2702
- bg-white dark:bg-zinc-900 border
2703
- text-gray-900 dark:text-white
2704
- placeholder:text-zinc-400
2705
- py-2.5 outline-none
2706
- focus:ring-1
2707
- ${p && "focus:ring-[var(--primary)] focus:border-[var(--primary)]"}
2708
- ${a()}
2709
- ${I}
2710
- `
2711
- }
2712
- ) : /* @__PURE__ */ e.jsx(
2713
- "input",
2714
- {
2715
- ref: O,
2716
- type: o === "password" ? W ? "text" : "password" : o,
2717
- name: r,
2718
- value: V,
2719
- onChange: G,
2720
- onKeyDown: Z,
2721
- placeholder: l,
2722
- required: h,
2723
- disabled: g,
2724
- readOnly: c,
2725
- min: o === "number" ? A ?? 0 : void 0,
2726
- max: R,
2727
- step: y,
2728
- style: p ? void 0 : b,
2729
- className: `
2730
- w-full rounded-lg text-sm
2731
- bg-white dark:bg-zinc-900 border
2732
- text-gray-900 dark:text-white
2733
- placeholder:text-zinc-400
2734
- py-2.5 outline-none
2735
- focus:ring-1
2736
- disabled:opacity-50 disabled:cursor-not-allowed
2737
- ${p && "focus:ring-[var(--primary)] focus:border-[var(--primary)]"}
2738
- ${a()}
2739
- ${I}
2740
- `
2741
- }
2742
- ),
2743
- o === "password" && /* @__PURE__ */ e.jsx(
2744
- "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",
2745
1782
  {
2746
- type: "button",
2747
- onClick: () => F(!W),
2748
- className: "absolute right-3 top-1/2 -translate-y-1/2 text-zinc-400",
2749
- children: W ? /* @__PURE__ */ e.jsx(nt, { 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
2750
1785
  }
2751
- ),
2752
- E && o !== "password" && /* @__PURE__ */ e.jsx("span", { className: "absolute right-3 top-1/2 -translate-y-1/2 text-zinc-400", children: E })
2753
- ] }),
2754
- (_ || f) && /* @__PURE__ */ e.jsx(
2755
- "p",
2756
- {
2757
- className: `text-xs ${f ? "text-red-500" : N ? "text-emerald-500" : "text-zinc-500"}`,
2758
- children: f && typeof f == "string" ? f : _
2759
- }
2760
- )
2761
- ] });
2762
- }), or = ({
2763
- src: n,
1786
+ )
1787
+ ] });
1788
+ }
1789
+ ), Nt = ({
1790
+ src: r,
2764
1791
  alt: t = "Image",
2765
- title: s,
2766
- width: r = "w-full",
2767
- height: o = "h-auto",
1792
+ title: n,
1793
+ width: s = "w-full",
1794
+ height: a = "h-auto",
2768
1795
  rounded: l = "rounded-lg",
2769
1796
  borderColor: i = "transparent",
2770
- borderWidth: d = "0",
2771
- shadow: w = !1,
1797
+ borderWidth: c = "0",
1798
+ shadow: u = !1,
2772
1799
  opacity: h = 1,
2773
- objectFit: g = "cover",
2774
- overlayText: c,
2775
- overlayColor: f = "rgba(0,0,0,0.5)",
2776
- svgIcon: N,
2777
- responsive: _ = !1,
2778
- p: j,
2779
- m: M,
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,
2780
1807
  hoverScale: k = 1.05,
2781
- hoverRotate: E = 0,
2782
- hoverOpacity: A,
2783
- hoverShadow: R = !1,
2784
- transitionDuration: y = "300ms",
2785
- overflow: m = "hidden",
2786
- className: p = "",
1808
+ hoverRotate: j = 0,
1809
+ hoverOpacity: _,
1810
+ hoverShadow: C = !1,
1811
+ transitionDuration: g = "300ms",
1812
+ overflow: f = "hidden",
1813
+ className: b = "",
2787
1814
  style: x,
2788
- onClick: P,
2789
- onLoad: O,
2790
- onError: q
1815
+ onClick: $,
1816
+ onLoad: M,
1817
+ onError: O
2791
1818
  }) => {
2792
- const Y = de(() => [
1819
+ const P = te(() => [
2793
1820
  "relative inline-block transition-all",
2794
- w ? "shadow-md" : "",
1821
+ u ? "shadow-md" : "",
2795
1822
  l,
2796
- j ?? "",
2797
- M ?? "",
2798
- _ ? "w-full h-auto" : "",
2799
- p
2800
- ].join(" "), [w, l, j, M, _, p]), W = de(
1823
+ E ?? "",
1824
+ S ?? "",
1825
+ T ? "w-full h-auto" : "",
1826
+ b
1827
+ ].join(" "), [u, l, E, S, T, b]), F = te(
2801
1828
  () => ({
2802
- width: typeof r == "number" ? r : void 0,
2803
- height: typeof o == "number" ? o : void 0,
2804
- objectFit: g,
1829
+ width: typeof s == "number" ? s : void 0,
1830
+ height: typeof a == "number" ? a : void 0,
1831
+ objectFit: m,
2805
1832
  opacity: h,
2806
1833
  borderColor: i,
2807
- borderWidth: d,
2808
- transition: `all ${y} ease`,
1834
+ borderWidth: c,
1835
+ transition: `all ${g} ease`,
2809
1836
  ...x
2810
1837
  }),
2811
- [r, o, g, h, i, d, y, x]
2812
- ), F = de(() => {
2813
- switch (m) {
1838
+ [s, a, m, h, i, c, g, x]
1839
+ ), I = te(() => {
1840
+ switch (f) {
2814
1841
  case "x":
2815
1842
  return { overflowX: "hidden" };
2816
1843
  case "y":
2817
1844
  return { overflowY: "hidden" };
2818
1845
  default:
2819
- return { overflow: m };
1846
+ return { overflow: f };
2820
1847
  }
2821
- }, [m]), $ = (S) => {
2822
- A !== void 0 && (S.currentTarget.style.opacity = A.toString()), S.currentTarget.style.transform = `scale(${k}) rotate(${E}deg)`, R && (S.currentTarget.style.boxShadow = "0 8px 20px rgba(0,0,0,0.3)");
2823
- }, u = (S) => {
2824
- 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 = "");
2825
1852
  };
2826
1853
  return /* @__PURE__ */ e.jsxs(
2827
1854
  "div",
2828
1855
  {
2829
1856
  role: "img",
2830
1857
  "aria-label": t,
2831
- title: s || t,
2832
- onClick: P,
2833
- className: Y,
2834
- style: { position: "relative", cursor: P ? "pointer" : "default", ...F },
1858
+ title: n || t,
1859
+ onClick: $,
1860
+ className: P,
1861
+ style: { position: "relative", cursor: $ ? "pointer" : "default", ...I },
2835
1862
  children: [
2836
- N ? /* @__PURE__ */ e.jsx("div", { className: "w-full h-full flex items-center justify-center", children: N }) : /* @__PURE__ */ e.jsx(
1863
+ y ? /* @__PURE__ */ e.jsx("div", { className: "w-full h-full flex items-center justify-center", children: y }) : /* @__PURE__ */ e.jsx(
2837
1864
  "img",
2838
1865
  {
2839
- src: n,
1866
+ src: r,
2840
1867
  alt: t,
2841
- title: s || t,
1868
+ title: n || t,
2842
1869
  loading: "lazy",
2843
- style: W,
1870
+ style: F,
2844
1871
  className: "block",
2845
- onLoad: O,
2846
- onError: q,
2847
- onMouseEnter: $,
2848
- onMouseLeave: u
1872
+ onLoad: M,
1873
+ onError: O,
1874
+ onMouseEnter: R,
1875
+ onMouseLeave: z
2849
1876
  }
2850
1877
  ),
2851
- c && /* @__PURE__ */ e.jsx(
1878
+ d && /* @__PURE__ */ e.jsx(
2852
1879
  "div",
2853
1880
  {
2854
- style: { backgroundColor: f },
1881
+ style: { backgroundColor: p },
2855
1882
  className: "absolute inset-0 flex items-center justify-center text-white font-bold text-center p-4",
2856
- children: c
1883
+ children: d
2857
1884
  }
2858
1885
  )
2859
1886
  ]
2860
1887
  }
2861
1888
  );
2862
- }, De = ({
2863
- text: n,
1889
+ }, we = ({
1890
+ text: r,
2864
1891
  icon: t,
2865
- onClick: s,
2866
- subItems: r,
2867
- isInline: o,
1892
+ onClick: n,
1893
+ subItems: s,
1894
+ isInline: a,
2868
1895
  isOrdered: l,
2869
1896
  primaryTheme: i = !0,
2870
- primaryColor: d = "#3b82f6",
2871
- itemClassName: w,
1897
+ primaryColor: c = "#3b82f6",
1898
+ itemClassName: u,
2872
1899
  bulletClassName: h
2873
1900
  }) => {
2874
- const g = i ? {} : { color: d }, c = i ? {} : { backgroundColor: d };
2875
- return /* @__PURE__ */ e.jsxs("li", { className: C(!o && "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: [
2876
1903
  /* @__PURE__ */ e.jsxs(
2877
1904
  "div",
2878
1905
  {
2879
- onClick: s,
2880
- style: i ? void 0 : g,
2881
- className: C(
1906
+ onClick: n,
1907
+ style: i ? void 0 : m,
1908
+ className: N(
2882
1909
  "flex items-center gap-2 text-sm text-zinc-800 dark:text-zinc-200 transition-all",
2883
- s && (i ? "cursor-pointer hover:text-[var(--primary)]" : "cursor-pointer"),
2884
- w
1910
+ n && (i ? "cursor-pointer hover:text-[var(--primary)]" : "cursor-pointer"),
1911
+ u
2885
1912
  ),
2886
1913
  children: [
2887
- t ? /* @__PURE__ */ e.jsx("span", { className: "text-base", children: t }) : !o && !l && /* @__PURE__ */ e.jsx(
1914
+ t ? /* @__PURE__ */ e.jsx("span", { className: "text-base", children: t }) : !a && !l && /* @__PURE__ */ e.jsx(
2888
1915
  "span",
2889
1916
  {
2890
- style: i ? void 0 : c,
2891
- className: C(
1917
+ style: i ? void 0 : d,
1918
+ className: N(
2892
1919
  "w-2 h-2 rounded-full",
2893
1920
  i && "bg-[var(--primary)]",
2894
1921
  h
2895
1922
  )
2896
1923
  }
2897
1924
  ),
2898
- /* @__PURE__ */ e.jsx("span", { children: n })
1925
+ /* @__PURE__ */ e.jsx("span", { children: r })
2899
1926
  ]
2900
1927
  }
2901
1928
  ),
2902
- r && r.length > 0 && /* @__PURE__ */ e.jsx(
1929
+ s && s.length > 0 && /* @__PURE__ */ e.jsx(
2903
1930
  "ul",
2904
1931
  {
2905
- className: C(
1932
+ className: N(
2906
1933
  "pl-5 mt-2 space-y-2",
2907
1934
  l ? "list-decimal" : "list-none"
2908
1935
  ),
2909
- children: r.map((f, N) => /* @__PURE__ */ e.jsx(
2910
- De,
1936
+ children: s.map((p, y) => /* @__PURE__ */ e.jsx(
1937
+ we,
2911
1938
  {
2912
- ...f,
1939
+ ...p,
2913
1940
  isInline: !1,
2914
1941
  isOrdered: l,
2915
1942
  primaryTheme: i,
2916
- primaryColor: d,
2917
- itemClassName: w,
1943
+ primaryColor: c,
1944
+ itemClassName: u,
2918
1945
  bulletClassName: h
2919
1946
  },
2920
- N
1947
+ y
2921
1948
  ))
2922
1949
  }
2923
1950
  )
2924
1951
  ] });
2925
- }, lr = ({
2926
- title: n,
1952
+ }, Et = ({
1953
+ title: r,
2927
1954
  titleIcon: t,
2928
- items: s,
2929
- type: r = "unordered",
2930
- primaryTheme: o = !0,
1955
+ items: n,
1956
+ type: s = "unordered",
1957
+ primaryTheme: a = !0,
2931
1958
  primaryColor: l = "#3b82f6",
2932
1959
  className: i,
2933
- itemClassName: d,
2934
- titleClassName: w,
1960
+ itemClassName: c,
1961
+ titleClassName: u,
2935
1962
  bulletClassName: h
2936
1963
  }) => {
2937
- const g = r === "ordered", c = r === "inline", f = g ? "ol" : "ul";
1964
+ const m = s === "ordered", d = s === "inline", p = m ? "ol" : "ul";
2938
1965
  return /* @__PURE__ */ e.jsxs(
2939
1966
  "div",
2940
1967
  {
2941
- className: C(
1968
+ className: N(
2942
1969
  "bg-white dark:bg-zinc-900 border border-zinc-200 dark:border-zinc-800 rounded-xl p-4",
2943
1970
  i
2944
1971
  ),
2945
1972
  children: [
2946
- n && /* @__PURE__ */ e.jsxs(
1973
+ r && /* @__PURE__ */ e.jsxs(
2947
1974
  "div",
2948
1975
  {
2949
- className: C(
1976
+ className: N(
2950
1977
  "flex items-center gap-2 mb-3 text-base font-semibold text-zinc-900 dark:text-white",
2951
- w
1978
+ u
2952
1979
  ),
2953
1980
  children: [
2954
1981
  t && /* @__PURE__ */ e.jsx("span", { children: t }),
2955
- /* @__PURE__ */ e.jsx("span", { children: n })
1982
+ /* @__PURE__ */ e.jsx("span", { children: r })
2956
1983
  ]
2957
1984
  }
2958
1985
  ),
2959
1986
  /* @__PURE__ */ e.jsx(
2960
- f,
1987
+ p,
2961
1988
  {
2962
- className: C(
2963
- c ? "flex flex-wrap gap-4" : g ? "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"
2964
1991
  ),
2965
- children: s.map((N, _) => /* @__PURE__ */ e.jsx(
2966
- De,
1992
+ children: n.map((y, T) => /* @__PURE__ */ e.jsx(
1993
+ we,
2967
1994
  {
2968
- ...N,
2969
- isInline: c,
2970
- isOrdered: g,
2971
- primaryTheme: o,
1995
+ ...y,
1996
+ isInline: d,
1997
+ isOrdered: m,
1998
+ primaryTheme: a,
2972
1999
  primaryColor: l,
2973
- itemClassName: d,
2000
+ itemClassName: c,
2974
2001
  bulletClassName: h
2975
2002
  },
2976
- _
2003
+ T
2977
2004
  ))
2978
2005
  }
2979
2006
  )
2980
2007
  ]
2981
2008
  }
2982
2009
  );
2983
- }, ir = ({
2984
- isOpen: n,
2010
+ }, Ct = ({
2011
+ isOpen: r,
2985
2012
  onClose: t,
2986
- children: s,
2987
- title: r,
2988
- icon: o,
2013
+ children: n,
2014
+ title: s,
2015
+ icon: a,
2989
2016
  ariaLabel: l,
2990
2017
  className: i,
2991
- overlayClassName: d,
2992
- contentClassName: w,
2018
+ overlayClassName: c,
2019
+ contentClassName: u,
2993
2020
  closeButtonClassName: h,
2994
- disableOverlayClose: g = !1,
2995
- darkMode: c = !1,
2996
- transitionDuration: f = 200
2021
+ disableOverlayClose: m = !1,
2022
+ darkMode: d = !1,
2023
+ transitionDuration: p = 200
2997
2024
  }) => {
2998
- const N = K(null);
2999
- X(() => {
3000
- const j = (M) => {
3001
- M.key === "Escape" && t();
2025
+ const y = V(null);
2026
+ U(() => {
2027
+ const E = (S) => {
2028
+ S.key === "Escape" && t();
3002
2029
  };
3003
- return n && document.addEventListener("keydown", j), () => document.removeEventListener("keydown", j);
3004
- }, [n, t]), X(() => {
3005
- if (n) {
3006
- const j = 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;
3007
2034
  return document.body.style.overflow = "hidden", () => {
3008
- document.body.style.overflow = j;
2035
+ document.body.style.overflow = E;
3009
2036
  };
3010
2037
  }
3011
- }, [n]);
3012
- const _ = he(() => {
3013
- g || t();
3014
- }, [g, t]);
3015
- return n ? /* @__PURE__ */ e.jsx(
2038
+ }, [r]);
2039
+ const T = ae(() => {
2040
+ m || t();
2041
+ }, [m, t]);
2042
+ return r ? /* @__PURE__ */ e.jsx(
3016
2043
  "div",
3017
2044
  {
3018
2045
  role: "dialog",
3019
2046
  "aria-modal": "true",
3020
- "aria-label": l || r || "Modal",
3021
- className: C(
2047
+ "aria-label": l || s || "Modal",
2048
+ className: N(
3022
2049
  "fixed inset-0 flex items-center justify-center z-50 transition-opacity",
3023
- c ? "bg-black/80" : "bg-black/60",
3024
- d
2050
+ d ? "bg-black/80" : "bg-black/60",
2051
+ c
3025
2052
  ),
3026
- style: { transitionDuration: `${f}ms` },
3027
- onClick: _,
2053
+ style: { transitionDuration: `${p}ms` },
2054
+ onClick: T,
3028
2055
  children: /* @__PURE__ */ e.jsxs(
3029
2056
  "div",
3030
2057
  {
3031
- ref: N,
3032
- className: C(
2058
+ ref: y,
2059
+ className: N(
3033
2060
  "relative w-[90vw] max-w-2xl max-h-[90vh] overflow-y-auto p-6 rounded-lg shadow-lg transition-transform",
3034
- c ? "bg-zinc-900 text-white" : "bg-white text-gray-900",
2061
+ d ? "bg-zinc-900 text-white" : "bg-white text-gray-900",
3035
2062
  "scale-100",
3036
- w
2063
+ u
3037
2064
  ),
3038
- style: { transitionDuration: `${f}ms` },
3039
- onClick: (j) => j.stopPropagation(),
2065
+ style: { transitionDuration: `${p}ms` },
2066
+ onClick: (E) => E.stopPropagation(),
3040
2067
  children: [
3041
2068
  /* @__PURE__ */ e.jsx(
3042
2069
  "button",
3043
2070
  {
3044
2071
  onClick: t,
3045
2072
  "aria-label": "Close modal",
3046
- className: C(
2073
+ className: N(
3047
2074
  "absolute top-4 right-4 p-1 rounded-full hover:scale-110 transition-transform",
3048
- 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",
3049
2076
  h
3050
2077
  ),
3051
- children: /* @__PURE__ */ e.jsx(ve, { size: 24 })
2078
+ children: /* @__PURE__ */ e.jsx(ie, { size: 24 })
3052
2079
  }
3053
2080
  ),
3054
- r && /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2 mb-4", children: [
3055
- o && /* @__PURE__ */ e.jsx("span", { className: "flex-shrink-0", children: o }),
3056
- /* @__PURE__ */ e.jsx("h2", { className: "text-xl font-semibold", children: r })
2081
+ s && /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2 mb-4", children: [
2082
+ a && /* @__PURE__ */ e.jsx("span", { className: "flex-shrink-0", children: a }),
2083
+ /* @__PURE__ */ e.jsx("h2", { className: "text-xl font-semibold", children: s })
3057
2084
  ] }),
3058
- s
2085
+ n
3059
2086
  ]
3060
2087
  }
3061
2088
  )
3062
2089
  }
3063
2090
  ) : null;
3064
- }, cr = ({ children: n, style: t, className: s }) => /* @__PURE__ */ e.jsx(
2091
+ }, Tt = ({ children: r, style: t, className: n }) => /* @__PURE__ */ e.jsx(
3065
2092
  "div",
3066
2093
  {
3067
- 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),
3068
2095
  style: {
3069
2096
  background: "#ffffff",
3070
2097
  ...t
@@ -3078,333 +2105,494 @@ const ar = ie((n, t) => {
3078
2105
  borderRadius: 12,
3079
2106
  overflow: "hidden"
3080
2107
  },
3081
- children: n
2108
+ children: r
3082
2109
  }
3083
2110
  )
3084
2111
  }
3085
- ), dr = ({
3086
- children: n,
2112
+ ), $t = ({
2113
+ children: r,
3087
2114
  style: t,
3088
- className: s
2115
+ className: n
3089
2116
  }) => /* @__PURE__ */ e.jsx(
3090
2117
  "thead",
3091
2118
  {
3092
- className: C("bg-gray-100 text-gray-900 font-semibold", s),
2119
+ className: N("bg-gray-100 text-gray-900 font-semibold", n),
3093
2120
  style: {
3094
2121
  ...t
3095
2122
  },
3096
- children: n
2123
+ children: r
3097
2124
  }
3098
- ), ur = ({ children: n, style: t, className: s }) => /* @__PURE__ */ e.jsx("tbody", { className: C("bg-white", s), style: { ...t }, children: n }), fr = ({
3099
- children: n,
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,
3100
2127
  style: t,
3101
- className: s,
3102
- onClick: r,
3103
- hoverBgColor: o = "#f9fafb",
2128
+ className: n,
2129
+ onClick: s,
2130
+ hoverBgColor: a = "#f9fafb",
3104
2131
  darkMode: l = !1
3105
2132
  }) => /* @__PURE__ */ e.jsx(
3106
2133
  "tr",
3107
2134
  {
3108
- className: C(
2135
+ className: N(
3109
2136
  "transition-colors duration-200 cursor-default",
3110
- r ? "hover:cursor-pointer" : "",
3111
- s
2137
+ s ? "hover:cursor-pointer" : "",
2138
+ n
3112
2139
  ),
3113
2140
  style: { borderBottom: "1px solid #e5e7eb", ...t },
3114
- onClick: r,
2141
+ onClick: s,
3115
2142
  onMouseEnter: (i) => {
3116
- l ? i.currentTarget.style.backgroundColor = "#1f2937" : i.currentTarget.style.backgroundColor = o;
2143
+ l ? i.currentTarget.style.backgroundColor = "#1f2937" : i.currentTarget.style.backgroundColor = a;
3117
2144
  },
3118
2145
  onMouseLeave: (i) => {
3119
2146
  i.currentTarget.style.backgroundColor = "transparent";
3120
2147
  },
3121
- children: n
2148
+ children: r
3122
2149
  }
3123
- ), xr = ({ children: n, style: t, className: s }) => /* @__PURE__ */ e.jsx(
2150
+ ), At = ({ children: r, style: t, className: n }) => /* @__PURE__ */ e.jsx(
3124
2151
  "th",
3125
2152
  {
3126
- className: C("text-left px-4 py-3 text-sm text-gray-700 border-b-2 border-gray-200", s),
2153
+ className: N("text-left px-4 py-3 text-sm text-gray-700 border-b-2 border-gray-200", n),
3127
2154
  style: { ...t },
3128
- children: n
2155
+ children: r
3129
2156
  }
3130
- ), pr = ({ children: n, style: t, className: s }) => /* @__PURE__ */ e.jsx(
2157
+ ), St = ({ children: r, style: t, className: n }) => /* @__PURE__ */ e.jsx(
3131
2158
  "td",
3132
2159
  {
3133
- className: C("px-4 py-3 text-sm text-gray-600", s),
2160
+ className: N("px-4 py-3 text-sm text-gray-600", n),
3134
2161
  style: { ...t },
3135
- children: n
2162
+ children: r
3136
2163
  }
3137
- ), hr = ({
3138
- tabs: n,
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,
3139
2180
  defaultActive: t = 0,
3140
- position: s = "top",
3141
- variant: r = "solid",
3142
- fullWidth: o = !1,
3143
- gap: l = 8,
3144
- radius: i = 8,
3145
- padding: d = "12px 18px",
3146
- transitionDuration: w = 200,
3147
- elevation: h = 1,
3148
- bordered: g = !1,
3149
- primaryColor: c = "#2563eb",
3150
- backgroundColor: f = "transparent",
3151
- textColor: N = "#374151",
3152
- hoverColor: _ = "#1d4ed8",
3153
- activeColor: j = "#ffffff",
3154
- borderColor: M = "#e5e7eb",
3155
- disabledColor: k = "#9ca3af",
3156
- responsiveBreakpoint: E = 768,
3157
- showDrawerLabel: A = "Select Tab",
3158
- drawerIcon: R = "☰",
3159
- onTabChange: y,
3160
- className: m = "",
3161
- style: p,
3162
- tabClassName: x = "",
3163
- contentClassName: P = "",
3164
- activeTabStyle: O,
3165
- inactiveTabStyle: q,
3166
- contentStyle: Y
2181
+ position: n = "top",
2182
+ variant: s = "solid",
2183
+ fullWidth: a = !1,
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
3167
2200
  }) => {
3168
- const [W, F] = L(t), [$, u] = L(null), [S, V] = L(!1), [G, Z] = L(!1), a = K(null);
3169
- X(() => {
3170
- const T = () => V(window.innerWidth <= E);
3171
- return T(), window.addEventListener("resize", T), () => window.removeEventListener("resize", T);
3172
- }, [E]);
3173
- const b = (T) => {
3174
- n[T].disabled || (F(T), y?.(T), S && Z(!1));
3175
- }, v = (T, D) => {
3176
- T.key === "ArrowRight" || T.key === "ArrowDown" ? (T.preventDefault(), b((D + 1) % n.length)) : (T.key === "ArrowLeft" || T.key === "ArrowUp") && (T.preventDefault(), b((D - 1 + n.length) % n.length));
3177
- }, I = {
3178
- padding: d,
3179
- borderRadius: i,
3180
- cursor: "pointer",
3181
- display: "flex",
3182
- alignItems: "center",
3183
- gap: 8,
3184
- justifyContent: "center",
3185
- fontWeight: 500,
3186
- transition: `all ${w}ms ease`,
3187
- background: "transparent",
3188
- border: r === "outline" ? `1px solid ${M}` : "none",
3189
- borderBottom: r === "underline" ? "2px solid transparent" : void 0,
3190
- color: N,
3191
- width: o ? "100%" : "auto",
3192
- userSelect: "none"
3193
- }, H = {
3194
- background: r === "solid" ? c : "transparent",
3195
- color: j,
3196
- borderBottom: r === "underline" ? `2px solid ${c}` : void 0,
3197
- boxShadow: h > 0 ? `0 ${h}px ${h * 4}px ${c}33` : void 0,
3198
- ...O
3199
- }, te = {
3200
- ...r === "outline" ? { borderColor: M } : {},
3201
- ...r === "underline" ? { borderBottomColor: "transparent" } : {},
3202
- ...q
3203
- }, B = {
3204
- color: _,
3205
- background: r === "solid" ? `${c}11` : r === "outline" ? `${c}11` : "transparent"
3206
- }, Q = {
3207
- color: k,
3208
- cursor: "not-allowed",
3209
- opacity: 0.6
3210
- }, J = {
3211
- flexGrow: 1,
3212
- borderTop: g && s === "top" ? `1px solid ${M}` : void 0,
3213
- borderLeft: g && s === "left" ? `1px solid ${M}` : void 0,
3214
- borderRight: g && s === "right" ? `1px solid ${M}` : void 0,
3215
- borderRadius: i,
3216
- ...Y
3217
- }, z = s === "left" || s === "right";
3218
- return /* @__PURE__ */ e.jsxs(
3219
- "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,
3220
2214
  {
3221
- ref: a,
3222
- className: `modern-tabs ${m}`,
3223
- style: {
3224
- display: "flex",
3225
- flexDirection: z ? s === "right" ? "row-reverse" : "row" : "column",
3226
- background: f,
3227
- border: g ? `1px solid ${M}` : void 0,
3228
- borderRadius: i,
3229
- overflow: "hidden",
3230
- ...p
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
3231
2234
  },
3232
- children: [
3233
- /* @__PURE__ */ e.jsx("style", { children: `
3234
- @keyframes tab-fade {
3235
- from { opacity: 0; transform: translateY(5px); }
3236
- 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;
3237
2265
  }
3238
- .modern-tabs__content {
3239
- animation: tab-fade ${w}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;
3240
2281
  }
3241
2282
  ` }),
3242
- 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: [
3243
2334
  /* @__PURE__ */ e.jsxs(
3244
2335
  "button",
3245
2336
  {
3246
- onClick: () => Z(!G),
2337
+ onClick: () => h(!u),
2338
+ className: "flex items-center justify-between w-full font-medium",
3247
2339
  style: {
3248
- ...I,
3249
- ...H,
3250
- justifyContent: "space-between",
3251
- width: "100%",
3252
- fontSize: 16
2340
+ padding: "10px 16px",
2341
+ borderRadius: p,
2342
+ background: m,
2343
+ color: d,
2344
+ border: "none",
2345
+ cursor: "pointer",
2346
+ fontSize: 14
3253
2347
  },
3254
2348
  children: [
3255
- A,
3256
- /* @__PURE__ */ e.jsx("span", { children: R })
2349
+ /* @__PURE__ */ e.jsx("span", { children: k }),
2350
+ /* @__PURE__ */ e.jsx(dt, { open: u })
3257
2351
  ]
3258
2352
  }
3259
2353
  ),
3260
- G && /* @__PURE__ */ e.jsx("div", { style: { display: "flex", flexDirection: "column", marginTop: 8, gap: l }, children: n.map((T, D) => {
3261
- const ee = D === W, re = $ === D, se = T.disabled;
3262
- return /* @__PURE__ */ e.jsxs(
3263
- "button",
3264
- {
3265
- disabled: se,
3266
- onClick: () => b(D),
3267
- onKeyDown: (ue) => v(ue, D),
3268
- onMouseEnter: () => u(D),
3269
- onMouseLeave: () => u(null),
3270
- className: x,
3271
- style: {
3272
- ...I,
3273
- ...ee ? H : te,
3274
- ...re && !ee && !se ? B : {},
3275
- ...se ? Q : {}
3276
- },
3277
- children: [
3278
- T.icon && /* @__PURE__ */ e.jsx("span", { children: T.icon }),
3279
- T.label
3280
- ]
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
3281
2366
  },
3282
- D
3283
- );
3284
- }) })
3285
- ] }) : /* @__PURE__ */ e.jsx(
3286
- "div",
3287
- {
3288
- style: {
3289
- display: "flex",
3290
- flexDirection: z ? "column" : "row",
3291
- gap: l,
3292
- padding: 8,
3293
- minWidth: z ? 200 : void 0
3294
- },
3295
- children: n.map((T, D) => {
3296
- const ee = D === W, re = $ === D, se = T.disabled;
3297
- return /* @__PURE__ */ e.jsxs(
3298
- "button",
3299
- {
3300
- disabled: se,
3301
- onClick: () => b(D),
3302
- onKeyDown: (ue) => v(ue, D),
3303
- onMouseEnter: () => u(D),
3304
- onMouseLeave: () => u(null),
3305
- className: x,
3306
- style: {
3307
- ...I,
3308
- ...ee ? H : te,
3309
- ...re && !ee && !se ? B : {},
3310
- ...se ? Q : {}
3311
- },
3312
- role: "tab",
3313
- "aria-selected": ee,
3314
- children: [
3315
- T.icon && /* @__PURE__ */ e.jsx("span", { children: T.icon }),
3316
- T.label
3317
- ]
3318
- },
3319
- D
3320
- );
3321
- })
3322
- }
3323
- ),
3324
- /* @__PURE__ */ e.jsx(
3325
- "div",
3326
- {
3327
- className: `modern-tabs__content ${P}`,
3328
- style: J,
3329
- role: "tabpanel",
3330
- children: n[W]?.content
3331
- }
3332
- )
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
3333
2478
  ]
3334
2479
  }
3335
2480
  );
3336
- }, Yt = {
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 = {
3337
2516
  xs: "text-xs",
3338
2517
  sm: "text-sm",
3339
2518
  md: "text-base",
3340
2519
  lg: "text-lg",
3341
2520
  xl: "text-xl",
3342
2521
  "2xl": "text-2xl"
2522
+ }, ft = {
2523
+ uppercase: "uppercase",
2524
+ lowercase: "lowercase",
2525
+ capitalize: "capitalize"
3343
2526
  };
3344
- function mr({
3345
- as: n,
2527
+ function Mt({
2528
+ as: r,
3346
2529
  children: t,
3347
- size: s = "md",
3348
- weight: r = 400,
3349
- align: o = "left",
3350
- truncate: l = !1,
3351
- className: i,
2530
+ size: n = "md",
2531
+ weight: s = 400,
2532
+ align: a = "left",
2533
+ transform: l,
2534
+ italic: i = !1,
2535
+ underline: c = !1,
2536
+ strikethrough: u = !1,
2537
+ truncate: h = !1,
2538
+ className: m,
3352
2539
  style: d,
3353
- ...w
2540
+ ...p
3354
2541
  }) {
3355
- const h = n || "p";
3356
- return Re.createElement(
3357
- h,
2542
+ const y = r || "p";
2543
+ return le.createElement(
2544
+ y,
3358
2545
  {
3359
- className: C(
2546
+ className: N(
3360
2547
  "text-inherit",
3361
- // inherits parent color
3362
- Yt[s] || "",
3363
- l && "truncate",
3364
- 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
3365
2556
  ),
3366
2557
  style: {
3367
- fontWeight: r,
3368
- textAlign: o,
2558
+ fontWeight: s,
2559
+ textAlign: a,
3369
2560
  ...d
3370
2561
  },
3371
- ...w
2562
+ ...p
3372
2563
  },
3373
2564
  t
3374
2565
  );
3375
2566
  }
3376
2567
  export {
3377
- St as Accordion,
3378
- Gt as AudioGallery,
3379
- Ht as AudioPlayer,
3380
- qt as Avatar,
3381
- Lt as Badge,
3382
- Dt as Button,
3383
- Xt as CheckboxGroup,
3384
- Zt as Container,
3385
- sr as Drawer,
3386
- nr as DrawerButton,
3387
- Bt as Dropdown,
3388
- Qt as FlexView,
3389
- rr as GridView,
3390
- er as HStack,
3391
- or as Image,
3392
- ar as Input,
3393
- lr as List,
3394
- ir as Modal,
3395
- Jt as RadioGroup,
3396
- Le as Stack,
3397
- Kt as SwitchGroup,
3398
- ur as TBody,
3399
- pr as TD,
3400
- xr as TH,
3401
- dr as THead,
3402
- fr as TRow,
3403
- cr as Table,
3404
- hr as Tabs,
3405
- mr as Text,
3406
- Wt as ToastProvider,
3407
- tr as VStack,
3408
- Ut 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
3409
2597
  };
3410
2598
  //# sourceMappingURL=index.es.js.map