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