acemyjob-ui 0.9.1 → 0.10.0
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/acemyjob-ui.es.js +1056 -434
- package/dist/acemyjob-ui.umd.js +4 -4
- package/dist/component/Accordion/index.d.ts +15 -0
- package/dist/component/CheckboxGroup/index.d.ts +17 -0
- package/dist/component/FormField/index.d.ts +10 -0
- package/dist/component/Input/index.d.ts +10 -0
- package/dist/component/OptionCard/index.d.ts +11 -0
- package/dist/component/RadioGroup/index.d.ts +18 -0
- package/dist/component/Select/index.d.ts +13 -0
- package/dist/component/Slider/index.d.ts +16 -0
- package/dist/component/Stepper/Stepper.d.ts +13 -1
- package/dist/component/Stepper/index.d.ts +1 -1
- package/dist/component/Tab/Tab.d.ts +9 -1
- package/dist/component/Tab/index.d.ts +1 -1
- package/dist/component/TagInput/index.d.ts +13 -0
- package/dist/component/Textarea/index.d.ts +10 -0
- package/dist/component/index.d.ts +37 -0
- package/dist/hooks/useForm.d.ts +33 -0
- package/dist/index.d.ts +26 -2
- package/dist/style.css +1 -1
- package/dist/utils/validation.d.ts +54 -0
- package/package.json +1 -1
package/dist/acemyjob-ui.es.js
CHANGED
|
@@ -1,8 +1,202 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import
|
|
3
|
-
import { Dialog as
|
|
4
|
-
import { XMarkIcon as
|
|
5
|
-
|
|
1
|
+
import * as W from "react";
|
|
2
|
+
import B, { useState as k, useCallback as R, createContext as he, useEffect as Z, useContext as ge } from "react";
|
|
3
|
+
import { Dialog as be, DialogBackdrop as pe, DialogPanel as je, TransitionChild as we } from "@headlessui/react";
|
|
4
|
+
import { XMarkIcon as ye, Bars3Icon as Ne, ChevronDownIcon as K, InformationCircleIcon as Ve, ExclamationCircleIcon as Ce, XCircleIcon as ke, CheckCircleIcon as Te } from "@heroicons/react/24/outline";
|
|
5
|
+
const ar = {
|
|
6
|
+
required: (r = "This field is required") => ({
|
|
7
|
+
validate: (s) => typeof s == "string" ? s.trim().length > 0 : Array.isArray(s) ? s.length > 0 : s != null,
|
|
8
|
+
message: r
|
|
9
|
+
}),
|
|
10
|
+
email: (r = "Please enter a valid email address") => ({
|
|
11
|
+
validate: (s) => /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(String(s)),
|
|
12
|
+
message: r
|
|
13
|
+
}),
|
|
14
|
+
minLength: (r, s) => ({
|
|
15
|
+
validate: (t) => String(t).length >= r,
|
|
16
|
+
message: s || `Must be at least ${r} characters`
|
|
17
|
+
}),
|
|
18
|
+
maxLength: (r, s) => ({
|
|
19
|
+
validate: (t) => String(t).length <= r,
|
|
20
|
+
message: s || `Must be no more than ${r} characters`
|
|
21
|
+
}),
|
|
22
|
+
pattern: (r, s = "Invalid format") => ({
|
|
23
|
+
validate: (t) => r.test(String(t)),
|
|
24
|
+
message: s
|
|
25
|
+
}),
|
|
26
|
+
minValue: (r, s) => ({
|
|
27
|
+
validate: (t) => Number(t) >= r,
|
|
28
|
+
message: s || `Must be at least ${r}`
|
|
29
|
+
}),
|
|
30
|
+
maxValue: (r, s) => ({
|
|
31
|
+
validate: (t) => Number(t) <= r,
|
|
32
|
+
message: s || `Must be no more than ${r}`
|
|
33
|
+
}),
|
|
34
|
+
url: (r = "Please enter a valid URL") => ({
|
|
35
|
+
validate: (s) => {
|
|
36
|
+
try {
|
|
37
|
+
return new URL(String(s)), !0;
|
|
38
|
+
} catch {
|
|
39
|
+
return !1;
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
message: r
|
|
43
|
+
}),
|
|
44
|
+
phone: (r = "Please enter a valid phone number") => ({
|
|
45
|
+
validate: (s) => {
|
|
46
|
+
const t = /^[\d\s\-+()]+$/, a = String(s);
|
|
47
|
+
return t.test(a) && a.replace(/\D/g, "").length >= 10;
|
|
48
|
+
},
|
|
49
|
+
message: r
|
|
50
|
+
}),
|
|
51
|
+
match: (r, s = "Fields do not match") => ({
|
|
52
|
+
validate: (t) => t === r,
|
|
53
|
+
message: s
|
|
54
|
+
}),
|
|
55
|
+
custom: (r, s) => ({
|
|
56
|
+
validate: r,
|
|
57
|
+
message: s
|
|
58
|
+
})
|
|
59
|
+
};
|
|
60
|
+
function $e(r, s) {
|
|
61
|
+
for (const t of s)
|
|
62
|
+
if (!t.validate(r))
|
|
63
|
+
return t.message;
|
|
64
|
+
return null;
|
|
65
|
+
}
|
|
66
|
+
function X(r, s) {
|
|
67
|
+
const t = {};
|
|
68
|
+
for (const [a, l] of Object.entries(s)) {
|
|
69
|
+
const o = r[a], i = $e(o, l);
|
|
70
|
+
t[a] = i;
|
|
71
|
+
}
|
|
72
|
+
return t;
|
|
73
|
+
}
|
|
74
|
+
function Ee(r) {
|
|
75
|
+
return Object.values(r).some((s) => s !== null);
|
|
76
|
+
}
|
|
77
|
+
function tr(r) {
|
|
78
|
+
for (const s of Object.values(r))
|
|
79
|
+
if (s !== null)
|
|
80
|
+
return s;
|
|
81
|
+
return null;
|
|
82
|
+
}
|
|
83
|
+
function nr(r, s) {
|
|
84
|
+
return {
|
|
85
|
+
...r,
|
|
86
|
+
[s]: null
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
function or(r) {
|
|
90
|
+
const s = {};
|
|
91
|
+
for (const t of Object.keys(r))
|
|
92
|
+
s[t] = null;
|
|
93
|
+
return s;
|
|
94
|
+
}
|
|
95
|
+
function lr({
|
|
96
|
+
initialValues: r,
|
|
97
|
+
validationRules: s = {},
|
|
98
|
+
onSubmit: t
|
|
99
|
+
}) {
|
|
100
|
+
const [a, l] = k(r), [o, i] = k({}), [c, u] = k({}), [v, d] = k(!1), m = JSON.stringify(a) !== JSON.stringify(r), h = R(
|
|
101
|
+
(b) => {
|
|
102
|
+
const { name: f, value: j, type: C } = b.target;
|
|
103
|
+
let L = j;
|
|
104
|
+
if (C === "checkbox" ? L = b.target.checked : C === "number" && (L = j ? Number(j) : ""), l((P) => ({
|
|
105
|
+
...P,
|
|
106
|
+
[f]: L
|
|
107
|
+
})), s[f]) {
|
|
108
|
+
const P = X({ [f]: L }, { [f]: s[f] });
|
|
109
|
+
i((Y) => ({
|
|
110
|
+
...Y,
|
|
111
|
+
[f]: P[f]
|
|
112
|
+
}));
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
[s]
|
|
116
|
+
), g = R(
|
|
117
|
+
(b) => {
|
|
118
|
+
const { name: f } = b.target;
|
|
119
|
+
u((j) => ({
|
|
120
|
+
...j,
|
|
121
|
+
[f]: !0
|
|
122
|
+
}));
|
|
123
|
+
},
|
|
124
|
+
[]
|
|
125
|
+
), N = R((b, f) => {
|
|
126
|
+
if (l((j) => ({
|
|
127
|
+
...j,
|
|
128
|
+
[b]: f
|
|
129
|
+
})), s[b]) {
|
|
130
|
+
const j = X({ [b]: f }, { [b]: s[b] });
|
|
131
|
+
i((C) => ({
|
|
132
|
+
...C,
|
|
133
|
+
[b]: j[b]
|
|
134
|
+
}));
|
|
135
|
+
}
|
|
136
|
+
}, [s]), T = R((b, f) => {
|
|
137
|
+
i((j) => ({
|
|
138
|
+
...j,
|
|
139
|
+
[b]: f
|
|
140
|
+
}));
|
|
141
|
+
}, []), _ = R(
|
|
142
|
+
async (b) => {
|
|
143
|
+
b.preventDefault();
|
|
144
|
+
const f = X(a, s);
|
|
145
|
+
i(f);
|
|
146
|
+
const j = {};
|
|
147
|
+
for (const C of Object.keys(a))
|
|
148
|
+
j[C] = !0;
|
|
149
|
+
if (u(j), !Ee(f) && t) {
|
|
150
|
+
d(!0);
|
|
151
|
+
try {
|
|
152
|
+
await t(a);
|
|
153
|
+
} catch (C) {
|
|
154
|
+
console.error("Form submission error:", C);
|
|
155
|
+
} finally {
|
|
156
|
+
d(!1);
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
},
|
|
160
|
+
[a, s, t]
|
|
161
|
+
), A = R(() => {
|
|
162
|
+
l(r), i({}), u({}), d(!1);
|
|
163
|
+
}, [r]), $ = R(
|
|
164
|
+
(b) => ({
|
|
165
|
+
name: b,
|
|
166
|
+
value: a[b] || "",
|
|
167
|
+
onChange: h,
|
|
168
|
+
onBlur: g
|
|
169
|
+
}),
|
|
170
|
+
[a, h, g]
|
|
171
|
+
), S = R(
|
|
172
|
+
(b) => o[b] || null,
|
|
173
|
+
[o]
|
|
174
|
+
), D = R(
|
|
175
|
+
(b) => c[b] || !1,
|
|
176
|
+
[c]
|
|
177
|
+
), F = R(
|
|
178
|
+
(b) => a[b] !== r[b],
|
|
179
|
+
[a, r]
|
|
180
|
+
);
|
|
181
|
+
return {
|
|
182
|
+
values: a,
|
|
183
|
+
errors: o,
|
|
184
|
+
touched: c,
|
|
185
|
+
isSubmitting: v,
|
|
186
|
+
isDirty: m,
|
|
187
|
+
handleChange: h,
|
|
188
|
+
handleBlur: g,
|
|
189
|
+
setFieldValue: N,
|
|
190
|
+
setFieldError: T,
|
|
191
|
+
handleSubmit: _,
|
|
192
|
+
resetForm: A,
|
|
193
|
+
getFieldProps: $,
|
|
194
|
+
getFieldError: S,
|
|
195
|
+
isFieldTouched: D,
|
|
196
|
+
isFieldDirty: F
|
|
197
|
+
};
|
|
198
|
+
}
|
|
199
|
+
var U = { exports: {} }, I = {};
|
|
6
200
|
/**
|
|
7
201
|
* @license React
|
|
8
202
|
* react-jsx-runtime.production.js
|
|
@@ -12,29 +206,29 @@ var E = { exports: {} }, k = {};
|
|
|
12
206
|
* This source code is licensed under the MIT license found in the
|
|
13
207
|
* LICENSE file in the root directory of this source tree.
|
|
14
208
|
*/
|
|
15
|
-
var
|
|
16
|
-
function
|
|
17
|
-
if (
|
|
18
|
-
|
|
19
|
-
var
|
|
20
|
-
function t(
|
|
209
|
+
var ne;
|
|
210
|
+
function Re() {
|
|
211
|
+
if (ne) return I;
|
|
212
|
+
ne = 1;
|
|
213
|
+
var r = Symbol.for("react.transitional.element"), s = Symbol.for("react.fragment");
|
|
214
|
+
function t(a, l, o) {
|
|
21
215
|
var i = null;
|
|
22
|
-
if (
|
|
23
|
-
|
|
24
|
-
for (var
|
|
25
|
-
|
|
26
|
-
} else
|
|
27
|
-
return
|
|
28
|
-
$$typeof:
|
|
29
|
-
type:
|
|
216
|
+
if (o !== void 0 && (i = "" + o), l.key !== void 0 && (i = "" + l.key), "key" in l) {
|
|
217
|
+
o = {};
|
|
218
|
+
for (var c in l)
|
|
219
|
+
c !== "key" && (o[c] = l[c]);
|
|
220
|
+
} else o = l;
|
|
221
|
+
return l = o.ref, {
|
|
222
|
+
$$typeof: r,
|
|
223
|
+
type: a,
|
|
30
224
|
key: i,
|
|
31
|
-
ref:
|
|
32
|
-
props:
|
|
225
|
+
ref: l !== void 0 ? l : null,
|
|
226
|
+
props: o
|
|
33
227
|
};
|
|
34
228
|
}
|
|
35
|
-
return
|
|
229
|
+
return I.Fragment = s, I.jsx = t, I.jsxs = t, I;
|
|
36
230
|
}
|
|
37
|
-
var
|
|
231
|
+
var z = {};
|
|
38
232
|
/**
|
|
39
233
|
* @license React
|
|
40
234
|
* react-jsx-runtime.development.js
|
|
@@ -44,245 +238,245 @@ var T = {};
|
|
|
44
238
|
* This source code is licensed under the MIT license found in the
|
|
45
239
|
* LICENSE file in the root directory of this source tree.
|
|
46
240
|
*/
|
|
47
|
-
var
|
|
48
|
-
function
|
|
49
|
-
return
|
|
50
|
-
function
|
|
51
|
-
if (
|
|
52
|
-
if (typeof
|
|
53
|
-
return
|
|
54
|
-
if (typeof
|
|
55
|
-
switch (
|
|
56
|
-
case
|
|
241
|
+
var oe;
|
|
242
|
+
function Ae() {
|
|
243
|
+
return oe || (oe = 1, process.env.NODE_ENV !== "production" && function() {
|
|
244
|
+
function r(n) {
|
|
245
|
+
if (n == null) return null;
|
|
246
|
+
if (typeof n == "function")
|
|
247
|
+
return n.$$typeof === L ? null : n.displayName || n.name || null;
|
|
248
|
+
if (typeof n == "string") return n;
|
|
249
|
+
switch (n) {
|
|
250
|
+
case T:
|
|
57
251
|
return "Fragment";
|
|
58
|
-
case
|
|
252
|
+
case A:
|
|
59
253
|
return "Profiler";
|
|
60
|
-
case
|
|
254
|
+
case _:
|
|
61
255
|
return "StrictMode";
|
|
62
|
-
case
|
|
256
|
+
case F:
|
|
63
257
|
return "Suspense";
|
|
64
|
-
case
|
|
258
|
+
case b:
|
|
65
259
|
return "SuspenseList";
|
|
66
|
-
case
|
|
260
|
+
case C:
|
|
67
261
|
return "Activity";
|
|
68
262
|
}
|
|
69
|
-
if (typeof
|
|
70
|
-
switch (typeof
|
|
263
|
+
if (typeof n == "object")
|
|
264
|
+
switch (typeof n.tag == "number" && console.error(
|
|
71
265
|
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
72
|
-
),
|
|
73
|
-
case
|
|
266
|
+
), n.$$typeof) {
|
|
267
|
+
case N:
|
|
74
268
|
return "Portal";
|
|
75
|
-
case
|
|
76
|
-
return (
|
|
77
|
-
case
|
|
78
|
-
return (
|
|
79
|
-
case
|
|
80
|
-
var
|
|
81
|
-
return
|
|
82
|
-
case
|
|
83
|
-
return
|
|
84
|
-
case
|
|
85
|
-
|
|
269
|
+
case S:
|
|
270
|
+
return (n.displayName || "Context") + ".Provider";
|
|
271
|
+
case $:
|
|
272
|
+
return (n._context.displayName || "Context") + ".Consumer";
|
|
273
|
+
case D:
|
|
274
|
+
var x = n.render;
|
|
275
|
+
return n = n.displayName, n || (n = x.displayName || x.name || "", n = n !== "" ? "ForwardRef(" + n + ")" : "ForwardRef"), n;
|
|
276
|
+
case f:
|
|
277
|
+
return x = n.displayName || null, x !== null ? x : r(n.type) || "Memo";
|
|
278
|
+
case j:
|
|
279
|
+
x = n._payload, n = n._init;
|
|
86
280
|
try {
|
|
87
|
-
return
|
|
281
|
+
return r(n(x));
|
|
88
282
|
} catch {
|
|
89
283
|
}
|
|
90
284
|
}
|
|
91
285
|
return null;
|
|
92
286
|
}
|
|
93
|
-
function
|
|
94
|
-
return "" +
|
|
287
|
+
function s(n) {
|
|
288
|
+
return "" + n;
|
|
95
289
|
}
|
|
96
|
-
function t(
|
|
290
|
+
function t(n) {
|
|
97
291
|
try {
|
|
98
|
-
|
|
99
|
-
var
|
|
292
|
+
s(n);
|
|
293
|
+
var x = !1;
|
|
100
294
|
} catch {
|
|
101
|
-
|
|
295
|
+
x = !0;
|
|
102
296
|
}
|
|
103
|
-
if (
|
|
104
|
-
|
|
105
|
-
var
|
|
106
|
-
return
|
|
107
|
-
|
|
297
|
+
if (x) {
|
|
298
|
+
x = console;
|
|
299
|
+
var p = x.error, w = typeof Symbol == "function" && Symbol.toStringTag && n[Symbol.toStringTag] || n.constructor.name || "Object";
|
|
300
|
+
return p.call(
|
|
301
|
+
x,
|
|
108
302
|
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
109
|
-
|
|
110
|
-
),
|
|
303
|
+
w
|
|
304
|
+
), s(n);
|
|
111
305
|
}
|
|
112
306
|
}
|
|
113
|
-
function
|
|
114
|
-
if (
|
|
115
|
-
if (typeof
|
|
307
|
+
function a(n) {
|
|
308
|
+
if (n === T) return "<>";
|
|
309
|
+
if (typeof n == "object" && n !== null && n.$$typeof === j)
|
|
116
310
|
return "<...>";
|
|
117
311
|
try {
|
|
118
|
-
var
|
|
119
|
-
return
|
|
312
|
+
var x = r(n);
|
|
313
|
+
return x ? "<" + x + ">" : "<...>";
|
|
120
314
|
} catch {
|
|
121
315
|
return "<...>";
|
|
122
316
|
}
|
|
123
317
|
}
|
|
124
|
-
function n() {
|
|
125
|
-
var r = A.A;
|
|
126
|
-
return r === null ? null : r.getOwner();
|
|
127
|
-
}
|
|
128
318
|
function l() {
|
|
319
|
+
var n = P.A;
|
|
320
|
+
return n === null ? null : n.getOwner();
|
|
321
|
+
}
|
|
322
|
+
function o() {
|
|
129
323
|
return Error("react-stack-top-frame");
|
|
130
324
|
}
|
|
131
|
-
function i(
|
|
132
|
-
if (
|
|
133
|
-
var
|
|
134
|
-
if (
|
|
325
|
+
function i(n) {
|
|
326
|
+
if (Y.call(n, "key")) {
|
|
327
|
+
var x = Object.getOwnPropertyDescriptor(n, "key").get;
|
|
328
|
+
if (x && x.isReactWarning) return !1;
|
|
135
329
|
}
|
|
136
|
-
return
|
|
330
|
+
return n.key !== void 0;
|
|
137
331
|
}
|
|
138
|
-
function
|
|
139
|
-
function
|
|
140
|
-
|
|
332
|
+
function c(n, x) {
|
|
333
|
+
function p() {
|
|
334
|
+
ee || (ee = !0, console.error(
|
|
141
335
|
"%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)",
|
|
142
|
-
|
|
336
|
+
x
|
|
143
337
|
));
|
|
144
338
|
}
|
|
145
|
-
|
|
146
|
-
get:
|
|
339
|
+
p.isReactWarning = !0, Object.defineProperty(n, "key", {
|
|
340
|
+
get: p,
|
|
147
341
|
configurable: !0
|
|
148
342
|
});
|
|
149
343
|
}
|
|
150
|
-
function
|
|
151
|
-
var
|
|
152
|
-
return
|
|
344
|
+
function u() {
|
|
345
|
+
var n = r(this.type);
|
|
346
|
+
return re[n] || (re[n] = !0, console.error(
|
|
153
347
|
"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."
|
|
154
|
-
)),
|
|
348
|
+
)), n = this.props.ref, n !== void 0 ? n : null;
|
|
155
349
|
}
|
|
156
|
-
function
|
|
157
|
-
return
|
|
158
|
-
$$typeof:
|
|
159
|
-
type:
|
|
160
|
-
key:
|
|
161
|
-
props:
|
|
162
|
-
_owner:
|
|
163
|
-
}, (
|
|
350
|
+
function v(n, x, p, w, O, E, H, J) {
|
|
351
|
+
return p = E.ref, n = {
|
|
352
|
+
$$typeof: g,
|
|
353
|
+
type: n,
|
|
354
|
+
key: x,
|
|
355
|
+
props: E,
|
|
356
|
+
_owner: O
|
|
357
|
+
}, (p !== void 0 ? p : null) !== null ? Object.defineProperty(n, "ref", {
|
|
164
358
|
enumerable: !1,
|
|
165
|
-
get:
|
|
166
|
-
}) : Object.defineProperty(
|
|
359
|
+
get: u
|
|
360
|
+
}) : Object.defineProperty(n, "ref", { enumerable: !1, value: null }), n._store = {}, Object.defineProperty(n._store, "validated", {
|
|
167
361
|
configurable: !1,
|
|
168
362
|
enumerable: !1,
|
|
169
363
|
writable: !0,
|
|
170
364
|
value: 0
|
|
171
|
-
}), Object.defineProperty(
|
|
365
|
+
}), Object.defineProperty(n, "_debugInfo", {
|
|
172
366
|
configurable: !1,
|
|
173
367
|
enumerable: !1,
|
|
174
368
|
writable: !0,
|
|
175
369
|
value: null
|
|
176
|
-
}), Object.defineProperty(
|
|
370
|
+
}), Object.defineProperty(n, "_debugStack", {
|
|
177
371
|
configurable: !1,
|
|
178
372
|
enumerable: !1,
|
|
179
373
|
writable: !0,
|
|
180
|
-
value:
|
|
181
|
-
}), Object.defineProperty(
|
|
374
|
+
value: H
|
|
375
|
+
}), Object.defineProperty(n, "_debugTask", {
|
|
182
376
|
configurable: !1,
|
|
183
377
|
enumerable: !1,
|
|
184
378
|
writable: !0,
|
|
185
|
-
value:
|
|
186
|
-
}), Object.freeze && (Object.freeze(
|
|
379
|
+
value: J
|
|
380
|
+
}), Object.freeze && (Object.freeze(n.props), Object.freeze(n)), n;
|
|
187
381
|
}
|
|
188
|
-
function
|
|
189
|
-
var
|
|
190
|
-
if (
|
|
191
|
-
if (
|
|
192
|
-
if (
|
|
193
|
-
for (
|
|
194
|
-
|
|
195
|
-
Object.freeze && Object.freeze(
|
|
382
|
+
function d(n, x, p, w, O, E, H, J) {
|
|
383
|
+
var y = x.children;
|
|
384
|
+
if (y !== void 0)
|
|
385
|
+
if (w)
|
|
386
|
+
if (fe(y)) {
|
|
387
|
+
for (w = 0; w < y.length; w++)
|
|
388
|
+
m(y[w]);
|
|
389
|
+
Object.freeze && Object.freeze(y);
|
|
196
390
|
} else
|
|
197
391
|
console.error(
|
|
198
392
|
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
199
393
|
);
|
|
200
|
-
else
|
|
201
|
-
if (
|
|
202
|
-
|
|
203
|
-
var
|
|
204
|
-
return
|
|
394
|
+
else m(y);
|
|
395
|
+
if (Y.call(x, "key")) {
|
|
396
|
+
y = r(n);
|
|
397
|
+
var M = Object.keys(x).filter(function(ve) {
|
|
398
|
+
return ve !== "key";
|
|
205
399
|
});
|
|
206
|
-
|
|
400
|
+
w = 0 < M.length ? "{key: someKey, " + M.join(": ..., ") + ": ...}" : "{key: someKey}", te[y + w] || (M = 0 < M.length ? "{" + M.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
207
401
|
`A props object containing a "key" prop is being spread into JSX:
|
|
208
402
|
let props = %s;
|
|
209
403
|
<%s {...props} />
|
|
210
404
|
React keys must be passed directly to JSX without using spread:
|
|
211
405
|
let props = %s;
|
|
212
406
|
<%s key={someKey} {...props} />`,
|
|
213
|
-
|
|
214
|
-
v,
|
|
407
|
+
w,
|
|
215
408
|
y,
|
|
216
|
-
|
|
217
|
-
|
|
409
|
+
M,
|
|
410
|
+
y
|
|
411
|
+
), te[y + w] = !0);
|
|
218
412
|
}
|
|
219
|
-
if (
|
|
220
|
-
|
|
221
|
-
for (var
|
|
222
|
-
|
|
223
|
-
} else
|
|
224
|
-
return
|
|
225
|
-
|
|
226
|
-
typeof
|
|
227
|
-
),
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
w,
|
|
232
|
-
n(),
|
|
233
|
-
d,
|
|
413
|
+
if (y = null, p !== void 0 && (t(p), y = "" + p), i(x) && (t(x.key), y = "" + x.key), "key" in x) {
|
|
414
|
+
p = {};
|
|
415
|
+
for (var q in x)
|
|
416
|
+
q !== "key" && (p[q] = x[q]);
|
|
417
|
+
} else p = x;
|
|
418
|
+
return y && c(
|
|
419
|
+
p,
|
|
420
|
+
typeof n == "function" ? n.displayName || n.name || "Unknown" : n
|
|
421
|
+
), v(
|
|
422
|
+
n,
|
|
423
|
+
y,
|
|
424
|
+
E,
|
|
234
425
|
O,
|
|
235
|
-
|
|
426
|
+
l(),
|
|
427
|
+
p,
|
|
428
|
+
H,
|
|
429
|
+
J
|
|
236
430
|
);
|
|
237
431
|
}
|
|
238
|
-
function
|
|
239
|
-
typeof
|
|
432
|
+
function m(n) {
|
|
433
|
+
typeof n == "object" && n !== null && n.$$typeof === g && n._store && (n._store.validated = 1);
|
|
240
434
|
}
|
|
241
|
-
var h =
|
|
435
|
+
var h = B, g = Symbol.for("react.transitional.element"), N = Symbol.for("react.portal"), T = Symbol.for("react.fragment"), _ = Symbol.for("react.strict_mode"), A = Symbol.for("react.profiler"), $ = Symbol.for("react.consumer"), S = Symbol.for("react.context"), D = Symbol.for("react.forward_ref"), F = Symbol.for("react.suspense"), b = Symbol.for("react.suspense_list"), f = Symbol.for("react.memo"), j = Symbol.for("react.lazy"), C = Symbol.for("react.activity"), L = Symbol.for("react.client.reference"), P = h.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, Y = Object.prototype.hasOwnProperty, fe = Array.isArray, G = console.createTask ? console.createTask : function() {
|
|
242
436
|
return null;
|
|
243
437
|
};
|
|
244
438
|
h = {
|
|
245
|
-
"react-stack-bottom-frame": function(
|
|
246
|
-
return
|
|
439
|
+
"react-stack-bottom-frame": function(n) {
|
|
440
|
+
return n();
|
|
247
441
|
}
|
|
248
442
|
};
|
|
249
|
-
var
|
|
443
|
+
var ee, re = {}, se = h["react-stack-bottom-frame"].bind(
|
|
250
444
|
h,
|
|
251
|
-
|
|
252
|
-
)(),
|
|
253
|
-
|
|
254
|
-
var
|
|
255
|
-
return
|
|
256
|
-
|
|
257
|
-
c,
|
|
258
|
-
d,
|
|
259
|
-
!1,
|
|
445
|
+
o
|
|
446
|
+
)(), ae = G(a(o)), te = {};
|
|
447
|
+
z.Fragment = T, z.jsx = function(n, x, p, w, O) {
|
|
448
|
+
var E = 1e4 > P.recentlyCreatedOwnerStacks++;
|
|
449
|
+
return d(
|
|
450
|
+
n,
|
|
260
451
|
x,
|
|
452
|
+
p,
|
|
453
|
+
!1,
|
|
261
454
|
w,
|
|
262
|
-
|
|
263
|
-
|
|
455
|
+
O,
|
|
456
|
+
E ? Error("react-stack-top-frame") : se,
|
|
457
|
+
E ? G(a(n)) : ae
|
|
264
458
|
);
|
|
265
|
-
},
|
|
266
|
-
var
|
|
267
|
-
return
|
|
268
|
-
|
|
269
|
-
c,
|
|
270
|
-
d,
|
|
271
|
-
!0,
|
|
459
|
+
}, z.jsxs = function(n, x, p, w, O) {
|
|
460
|
+
var E = 1e4 > P.recentlyCreatedOwnerStacks++;
|
|
461
|
+
return d(
|
|
462
|
+
n,
|
|
272
463
|
x,
|
|
464
|
+
p,
|
|
465
|
+
!0,
|
|
273
466
|
w,
|
|
274
|
-
|
|
275
|
-
|
|
467
|
+
O,
|
|
468
|
+
E ? Error("react-stack-top-frame") : se,
|
|
469
|
+
E ? G(a(n)) : ae
|
|
276
470
|
);
|
|
277
471
|
};
|
|
278
|
-
}()),
|
|
472
|
+
}()), z;
|
|
279
473
|
}
|
|
280
|
-
var
|
|
281
|
-
function
|
|
282
|
-
return
|
|
474
|
+
var le;
|
|
475
|
+
function _e() {
|
|
476
|
+
return le || (le = 1, process.env.NODE_ENV === "production" ? U.exports = Re() : U.exports = Ae()), U.exports;
|
|
283
477
|
}
|
|
284
|
-
var e =
|
|
285
|
-
const
|
|
478
|
+
var e = _e();
|
|
479
|
+
const Oe = {
|
|
286
480
|
bg: "bg-indigo-600",
|
|
287
481
|
activeBg: "bg-indigo-700",
|
|
288
482
|
text: "text-indigo-200",
|
|
@@ -290,188 +484,188 @@ const Ce = {
|
|
|
290
484
|
hoverBg: "hover:bg-indigo-700",
|
|
291
485
|
hoverText: "hover:text-white"
|
|
292
486
|
};
|
|
293
|
-
function
|
|
294
|
-
return
|
|
487
|
+
function V(...r) {
|
|
488
|
+
return r.filter(Boolean).join(" ");
|
|
295
489
|
}
|
|
296
|
-
function
|
|
297
|
-
const [t,
|
|
490
|
+
function ce({ item: r, colorScheme: s }) {
|
|
491
|
+
const [t, a] = k(r.current || r.children?.some((o) => o.current)), l = r.children && r.children.length > 0;
|
|
298
492
|
return /* @__PURE__ */ e.jsxs("li", { children: [
|
|
299
493
|
/* @__PURE__ */ e.jsx("div", { children: /* @__PURE__ */ e.jsxs(
|
|
300
494
|
"a",
|
|
301
495
|
{
|
|
302
|
-
href:
|
|
303
|
-
onClick: (
|
|
304
|
-
|
|
496
|
+
href: l ? void 0 : r.href,
|
|
497
|
+
onClick: (o) => {
|
|
498
|
+
l && (o.preventDefault(), a(!t));
|
|
305
499
|
},
|
|
306
|
-
className:
|
|
307
|
-
|
|
500
|
+
className: V(
|
|
501
|
+
r.current ? `${s.activeBg} ${s.activeText}` : `${s.text} ${s.hoverBg} ${s.hoverText}`,
|
|
308
502
|
"group flex items-center justify-between gap-x-3 rounded-md p-2 text-sm/6 font-semibold",
|
|
309
|
-
|
|
503
|
+
l ? "cursor-pointer" : ""
|
|
310
504
|
),
|
|
311
505
|
children: [
|
|
312
506
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-x-3", children: [
|
|
313
507
|
/* @__PURE__ */ e.jsx(
|
|
314
|
-
|
|
508
|
+
r.icon,
|
|
315
509
|
{
|
|
316
510
|
"aria-hidden": "true",
|
|
317
|
-
className:
|
|
318
|
-
|
|
511
|
+
className: V(
|
|
512
|
+
r.current ? s.activeText : `${s.text} group-${s.hoverText}`,
|
|
319
513
|
"size-6 shrink-0"
|
|
320
514
|
)
|
|
321
515
|
}
|
|
322
516
|
),
|
|
323
|
-
|
|
517
|
+
r.name
|
|
324
518
|
] }),
|
|
325
|
-
|
|
326
|
-
|
|
519
|
+
l && /* @__PURE__ */ e.jsx(
|
|
520
|
+
K,
|
|
327
521
|
{
|
|
328
|
-
className:
|
|
522
|
+
className: V(
|
|
329
523
|
"size-5 shrink-0 transition-transform",
|
|
330
524
|
t ? "rotate-180" : "",
|
|
331
|
-
|
|
525
|
+
r.current ? s.activeText : s.text
|
|
332
526
|
)
|
|
333
527
|
}
|
|
334
528
|
)
|
|
335
529
|
]
|
|
336
530
|
}
|
|
337
531
|
) }),
|
|
338
|
-
|
|
532
|
+
l && t && /* @__PURE__ */ e.jsx("ul", { className: "mt-1 ml-9 space-y-1", children: r.children.map((o) => /* @__PURE__ */ e.jsx("li", { children: /* @__PURE__ */ e.jsxs(
|
|
339
533
|
"a",
|
|
340
534
|
{
|
|
341
|
-
href:
|
|
342
|
-
className:
|
|
343
|
-
|
|
535
|
+
href: o.href,
|
|
536
|
+
className: V(
|
|
537
|
+
o.current ? `${s.activeBg} ${s.activeText}` : `${s.text} ${s.hoverBg} ${s.hoverText}`,
|
|
344
538
|
"group flex gap-x-3 rounded-md p-2 text-sm/6 font-semibold"
|
|
345
539
|
),
|
|
346
540
|
children: [
|
|
347
541
|
/* @__PURE__ */ e.jsx(
|
|
348
|
-
|
|
542
|
+
o.icon,
|
|
349
543
|
{
|
|
350
544
|
"aria-hidden": "true",
|
|
351
|
-
className:
|
|
352
|
-
|
|
545
|
+
className: V(
|
|
546
|
+
o.current ? s.activeText : `${s.text} group-${s.hoverText}`,
|
|
353
547
|
"size-5 shrink-0"
|
|
354
548
|
)
|
|
355
549
|
}
|
|
356
550
|
),
|
|
357
|
-
|
|
551
|
+
o.name
|
|
358
552
|
]
|
|
359
553
|
}
|
|
360
|
-
) },
|
|
554
|
+
) }, o.name)) })
|
|
361
555
|
] });
|
|
362
556
|
}
|
|
363
|
-
function
|
|
364
|
-
const [
|
|
557
|
+
function cr({ company: r, profile: s, navigation: t, colorScheme: a = Oe }) {
|
|
558
|
+
const [l, o] = k(!1);
|
|
365
559
|
return /* @__PURE__ */ e.jsx(e.Fragment, { children: /* @__PURE__ */ e.jsxs("div", { children: [
|
|
366
|
-
/* @__PURE__ */ e.jsxs(
|
|
560
|
+
/* @__PURE__ */ e.jsxs(be, { open: l, onClose: o, className: "relative z-50 lg:hidden", children: [
|
|
367
561
|
/* @__PURE__ */ e.jsx(
|
|
368
|
-
|
|
562
|
+
pe,
|
|
369
563
|
{
|
|
370
564
|
transition: !0,
|
|
371
565
|
className: "fixed inset-0 bg-gray-900/80 transition-opacity duration-300 ease-linear data-closed:opacity-0"
|
|
372
566
|
}
|
|
373
567
|
),
|
|
374
568
|
/* @__PURE__ */ e.jsx("div", { className: "fixed inset-0 flex", children: /* @__PURE__ */ e.jsxs(
|
|
375
|
-
|
|
569
|
+
je,
|
|
376
570
|
{
|
|
377
571
|
transition: !0,
|
|
378
572
|
className: "relative mr-16 flex w-full max-w-xs flex-1 transform transition duration-300 ease-in-out data-closed:-translate-x-full",
|
|
379
573
|
children: [
|
|
380
|
-
/* @__PURE__ */ e.jsx(
|
|
574
|
+
/* @__PURE__ */ e.jsx(we, { children: /* @__PURE__ */ e.jsx("div", { className: "absolute top-0 left-full flex w-16 justify-center pt-5 duration-300 ease-in-out data-closed:opacity-0", children: /* @__PURE__ */ e.jsxs("button", { type: "button", onClick: () => o(!1), className: "-m-2.5 p-2.5", children: [
|
|
381
575
|
/* @__PURE__ */ e.jsx("span", { className: "sr-only", children: "Close sidebar" }),
|
|
382
|
-
/* @__PURE__ */ e.jsx(
|
|
576
|
+
/* @__PURE__ */ e.jsx(ye, { "aria-hidden": "true", className: "size-6 text-white" })
|
|
383
577
|
] }) }) }),
|
|
384
|
-
/* @__PURE__ */ e.jsxs("div", { className:
|
|
578
|
+
/* @__PURE__ */ e.jsxs("div", { className: V("flex grow flex-col gap-y-5 overflow-y-auto px-6 pb-2", a.bg), children: [
|
|
385
579
|
/* @__PURE__ */ e.jsx("div", { className: "flex h-16 shrink-0 items-center", children: /* @__PURE__ */ e.jsx(
|
|
386
580
|
"img",
|
|
387
581
|
{
|
|
388
|
-
alt:
|
|
389
|
-
src:
|
|
582
|
+
alt: r.name,
|
|
583
|
+
src: r.logo,
|
|
390
584
|
className: "h-8 w-auto"
|
|
391
585
|
}
|
|
392
586
|
) }),
|
|
393
|
-
/* @__PURE__ */ e.jsx("nav", { className: "flex flex-1 flex-col", children: /* @__PURE__ */ e.jsx("ul", { role: "list", className: "flex flex-1 flex-col gap-y-7", children: /* @__PURE__ */ e.jsx("li", { children: /* @__PURE__ */ e.jsx("ul", { role: "list", className: "-mx-2 space-y-1", children: t.map((i) => /* @__PURE__ */ e.jsx(
|
|
587
|
+
/* @__PURE__ */ e.jsx("nav", { className: "flex flex-1 flex-col", children: /* @__PURE__ */ e.jsx("ul", { role: "list", className: "flex flex-1 flex-col gap-y-7", children: /* @__PURE__ */ e.jsx("li", { children: /* @__PURE__ */ e.jsx("ul", { role: "list", className: "-mx-2 space-y-1", children: t.map((i) => /* @__PURE__ */ e.jsx(ce, { item: i, colorScheme: a }, i.name)) }) }) }) })
|
|
394
588
|
] })
|
|
395
589
|
]
|
|
396
590
|
}
|
|
397
591
|
) })
|
|
398
592
|
] }),
|
|
399
|
-
/* @__PURE__ */ e.jsx("div", { className: "hidden lg:fixed lg:inset-y-0 lg:z-50 lg:flex lg:w-72 lg:flex-col", children: /* @__PURE__ */ e.jsxs("div", { className:
|
|
593
|
+
/* @__PURE__ */ e.jsx("div", { className: "hidden lg:fixed lg:inset-y-0 lg:z-50 lg:flex lg:w-72 lg:flex-col", children: /* @__PURE__ */ e.jsxs("div", { className: V("flex grow flex-col gap-y-5 overflow-y-auto px-6", a.bg), children: [
|
|
400
594
|
/* @__PURE__ */ e.jsx("div", { className: "flex h-16 shrink-0 items-center", children: /* @__PURE__ */ e.jsx(
|
|
401
595
|
"img",
|
|
402
596
|
{
|
|
403
|
-
alt:
|
|
404
|
-
src:
|
|
597
|
+
alt: r.name,
|
|
598
|
+
src: r.logo,
|
|
405
599
|
className: "h-8 w-auto"
|
|
406
600
|
}
|
|
407
601
|
) }),
|
|
408
602
|
/* @__PURE__ */ e.jsx("nav", { className: "flex flex-1 flex-col", children: /* @__PURE__ */ e.jsxs("ul", { role: "list", className: "flex flex-1 flex-col gap-y-7", children: [
|
|
409
|
-
/* @__PURE__ */ e.jsx("li", { children: /* @__PURE__ */ e.jsx("ul", { role: "list", className: "-mx-2 space-y-1", children: t.map((i) => /* @__PURE__ */ e.jsx(
|
|
603
|
+
/* @__PURE__ */ e.jsx("li", { children: /* @__PURE__ */ e.jsx("ul", { role: "list", className: "-mx-2 space-y-1", children: t.map((i) => /* @__PURE__ */ e.jsx(ce, { item: i, colorScheme: a }, i.name)) }) }),
|
|
410
604
|
/* @__PURE__ */ e.jsx("li", { className: "-mx-6 mt-auto", children: /* @__PURE__ */ e.jsxs(
|
|
411
605
|
"a",
|
|
412
606
|
{
|
|
413
607
|
href: "#",
|
|
414
|
-
className:
|
|
608
|
+
className: V(
|
|
415
609
|
"flex items-center gap-x-4 px-6 py-3 text-sm/6 font-semibold",
|
|
416
|
-
|
|
417
|
-
|
|
610
|
+
a.activeText,
|
|
611
|
+
a.hoverBg
|
|
418
612
|
),
|
|
419
613
|
children: [
|
|
420
614
|
/* @__PURE__ */ e.jsx(
|
|
421
615
|
"img",
|
|
422
616
|
{
|
|
423
|
-
alt:
|
|
424
|
-
src:
|
|
425
|
-
className:
|
|
617
|
+
alt: s.name,
|
|
618
|
+
src: s.image,
|
|
619
|
+
className: V("size-8 rounded-full", a.activeBg)
|
|
426
620
|
}
|
|
427
621
|
),
|
|
428
622
|
/* @__PURE__ */ e.jsx("span", { className: "sr-only", children: "Your profile" }),
|
|
429
|
-
/* @__PURE__ */ e.jsx("span", { "aria-hidden": "true", children:
|
|
623
|
+
/* @__PURE__ */ e.jsx("span", { "aria-hidden": "true", children: s.name })
|
|
430
624
|
]
|
|
431
625
|
}
|
|
432
626
|
) })
|
|
433
627
|
] }) })
|
|
434
628
|
] }) }),
|
|
435
|
-
/* @__PURE__ */ e.jsxs("div", { className:
|
|
436
|
-
/* @__PURE__ */ e.jsxs("button", { type: "button", onClick: () =>
|
|
629
|
+
/* @__PURE__ */ e.jsxs("div", { className: V("sticky top-0 z-40 flex items-center gap-x-6 px-4 py-4 shadow-xs sm:px-6 lg:hidden", a.bg), children: [
|
|
630
|
+
/* @__PURE__ */ e.jsxs("button", { type: "button", onClick: () => o(!0), className: V("-m-2.5 p-2.5 lg:hidden", a.text), children: [
|
|
437
631
|
/* @__PURE__ */ e.jsx("span", { className: "sr-only", children: "Open sidebar" }),
|
|
438
|
-
/* @__PURE__ */ e.jsx(
|
|
632
|
+
/* @__PURE__ */ e.jsx(Ne, { "aria-hidden": "true", className: "size-6" })
|
|
439
633
|
] }),
|
|
440
|
-
/* @__PURE__ */ e.jsx("div", { className:
|
|
634
|
+
/* @__PURE__ */ e.jsx("div", { className: V("flex-1 text-sm/6 font-semibold", a.activeText), children: "Dashboard" }),
|
|
441
635
|
/* @__PURE__ */ e.jsxs("a", { href: "#", children: [
|
|
442
636
|
/* @__PURE__ */ e.jsx("span", { className: "sr-only", children: "Your profile" }),
|
|
443
637
|
/* @__PURE__ */ e.jsx(
|
|
444
638
|
"img",
|
|
445
639
|
{
|
|
446
|
-
alt:
|
|
447
|
-
src:
|
|
448
|
-
className:
|
|
640
|
+
alt: s.name,
|
|
641
|
+
src: s.image,
|
|
642
|
+
className: V("size-8 rounded-full", a.activeBg)
|
|
449
643
|
}
|
|
450
644
|
)
|
|
451
645
|
] })
|
|
452
646
|
] })
|
|
453
647
|
] }) });
|
|
454
648
|
}
|
|
455
|
-
const
|
|
456
|
-
const
|
|
649
|
+
const me = (r) => r.replace("--color-", "bg-"), Be = ({ name: r, cssVar: s, value: t }) => {
|
|
650
|
+
const a = `rgb(${t})`;
|
|
457
651
|
return /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col items-center space-y-2 p-3 rounded-lg border border-border-subtle bg-surface hover:bg-surface-variant transition-colors", children: [
|
|
458
652
|
/* @__PURE__ */ e.jsx(
|
|
459
653
|
"div",
|
|
460
654
|
{
|
|
461
|
-
className: `w-16 h-16 rounded-lg border border-border shadow-sm ${
|
|
655
|
+
className: `w-16 h-16 rounded-lg border border-border shadow-sm ${me(s)}`
|
|
462
656
|
}
|
|
463
657
|
),
|
|
464
658
|
/* @__PURE__ */ e.jsxs("div", { className: "text-center", children: [
|
|
465
|
-
/* @__PURE__ */ e.jsx("div", { className: "text-sm font-medium text-text-primary", children:
|
|
466
|
-
/* @__PURE__ */ e.jsx("div", { className: "text-xs text-text-muted font-mono", children:
|
|
467
|
-
/* @__PURE__ */ e.jsx("div", { className: "text-xs text-text-secondary", children:
|
|
659
|
+
/* @__PURE__ */ e.jsx("div", { className: "text-sm font-medium text-text-primary", children: r }),
|
|
660
|
+
/* @__PURE__ */ e.jsx("div", { className: "text-xs text-text-muted font-mono", children: s }),
|
|
661
|
+
/* @__PURE__ */ e.jsx("div", { className: "text-xs text-text-secondary", children: a })
|
|
468
662
|
] })
|
|
469
663
|
] });
|
|
470
|
-
},
|
|
471
|
-
/* @__PURE__ */ e.jsx("h3", { className: "text-lg font-semibold text-text-primary border-b border-border-subtle pb-2", children:
|
|
472
|
-
/* @__PURE__ */ e.jsx("div", { className: "grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-6 xl:grid-cols-11 gap-4", children:
|
|
473
|
-
] }),
|
|
474
|
-
const
|
|
664
|
+
}, ie = ({ title: r, colors: s }) => /* @__PURE__ */ e.jsxs("div", { className: "space-y-4", children: [
|
|
665
|
+
/* @__PURE__ */ e.jsx("h3", { className: "text-lg font-semibold text-text-primary border-b border-border-subtle pb-2", children: r }),
|
|
666
|
+
/* @__PURE__ */ e.jsx("div", { className: "grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-6 xl:grid-cols-11 gap-4", children: s.map((t) => /* @__PURE__ */ e.jsx(Be, { ...t }, t.name)) })
|
|
667
|
+
] }), Pe = () => {
|
|
668
|
+
const r = [
|
|
475
669
|
{
|
|
476
670
|
title: "Success Colors (Green)",
|
|
477
671
|
colors: [
|
|
@@ -520,7 +714,7 @@ const K = (s) => s.replace("--color-", "bg-"), _e = ({ name: s, cssVar: a, value
|
|
|
520
714
|
{ name: "950", cssVar: "--color-error-950", value: "69 10 10" }
|
|
521
715
|
]
|
|
522
716
|
}
|
|
523
|
-
],
|
|
717
|
+
], s = [
|
|
524
718
|
{
|
|
525
719
|
title: "Reseda Green",
|
|
526
720
|
colors: [
|
|
@@ -686,62 +880,62 @@ const K = (s) => s.replace("--color-", "bg-"), _e = ({ name: s, cssVar: a, value
|
|
|
686
880
|
/* @__PURE__ */ e.jsx("h1", { className: "text-3xl font-bold text-text-primary", children: "AceMyJob Color Palette" }),
|
|
687
881
|
/* @__PURE__ */ e.jsx("p", { className: "text-text-secondary", children: "Your complete design system color reference" })
|
|
688
882
|
] }),
|
|
689
|
-
|
|
690
|
-
|
|
883
|
+
s.map((a) => /* @__PURE__ */ e.jsx(ie, { ...a }, a.title)),
|
|
884
|
+
r.map((a) => /* @__PURE__ */ e.jsx(ie, { ...a }, a.title)),
|
|
691
885
|
/* @__PURE__ */ e.jsxs("div", { className: "space-y-4", children: [
|
|
692
886
|
/* @__PURE__ */ e.jsx("h3", { className: "text-lg font-semibold text-text-primary border-b border-border-subtle pb-2", children: "Semantic Colors (Theme-aware)" }),
|
|
693
|
-
/* @__PURE__ */ e.jsx("div", { className: "grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 gap-4", children: t.map((
|
|
887
|
+
/* @__PURE__ */ e.jsx("div", { className: "grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 gap-4", children: t.map((a) => /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col items-center space-y-2 p-3 rounded-lg border border-border-subtle bg-surface hover:bg-surface-variant transition-colors", children: [
|
|
694
888
|
/* @__PURE__ */ e.jsx(
|
|
695
889
|
"div",
|
|
696
890
|
{
|
|
697
|
-
className: `w-16 h-16 rounded-lg border border-border shadow-sm ${
|
|
891
|
+
className: `w-16 h-16 rounded-lg border border-border shadow-sm ${me(a.cssVar)}`
|
|
698
892
|
}
|
|
699
893
|
),
|
|
700
894
|
/* @__PURE__ */ e.jsxs("div", { className: "text-center", children: [
|
|
701
|
-
/* @__PURE__ */ e.jsx("div", { className: "text-sm font-medium text-text-primary", children:
|
|
702
|
-
/* @__PURE__ */ e.jsx("div", { className: "text-xs text-text-muted font-mono", children:
|
|
895
|
+
/* @__PURE__ */ e.jsx("div", { className: "text-sm font-medium text-text-primary", children: a.name }),
|
|
896
|
+
/* @__PURE__ */ e.jsx("div", { className: "text-xs text-text-muted font-mono", children: a.cssVar })
|
|
703
897
|
] })
|
|
704
|
-
] },
|
|
898
|
+
] }, a.name)) })
|
|
705
899
|
] }),
|
|
706
900
|
/* @__PURE__ */ e.jsx("div", { className: "text-center pt-8 border-t border-border-subtle", children: /* @__PURE__ */ e.jsx("p", { className: "text-text-muted text-sm", children: "Toggle between light and dark themes to see how semantic colors adapt" }) })
|
|
707
901
|
] });
|
|
708
|
-
},
|
|
709
|
-
children:
|
|
710
|
-
defaultTheme:
|
|
902
|
+
}, xe = he(void 0), Se = ({
|
|
903
|
+
children: r,
|
|
904
|
+
defaultTheme: s = "system",
|
|
711
905
|
storageKey: t = "acemyjob-ui-theme"
|
|
712
906
|
}) => {
|
|
713
|
-
const [
|
|
714
|
-
|
|
715
|
-
const
|
|
716
|
-
|
|
717
|
-
}, [t]),
|
|
718
|
-
if (!
|
|
719
|
-
const
|
|
907
|
+
const [a, l] = k(s), [o, i] = k("light"), [c, u] = k(!1);
|
|
908
|
+
Z(() => {
|
|
909
|
+
const d = localStorage.getItem(t);
|
|
910
|
+
d && l(d), u(!0);
|
|
911
|
+
}, [t]), Z(() => {
|
|
912
|
+
if (!c) return;
|
|
913
|
+
const d = window.document.documentElement, m = () => {
|
|
720
914
|
let h;
|
|
721
|
-
|
|
915
|
+
a === "system" ? h = window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light" : h = a, i(h), d.classList.remove("light", "dark"), d.classList.add(h);
|
|
722
916
|
};
|
|
723
|
-
if (
|
|
724
|
-
const h = window.matchMedia("(prefers-color-scheme: dark)"),
|
|
725
|
-
return h.addEventListener("change",
|
|
917
|
+
if (m(), a === "system") {
|
|
918
|
+
const h = window.matchMedia("(prefers-color-scheme: dark)"), g = () => m();
|
|
919
|
+
return h.addEventListener("change", g), () => h.removeEventListener("change", g);
|
|
726
920
|
}
|
|
727
|
-
}, [
|
|
728
|
-
const
|
|
729
|
-
theme:
|
|
730
|
-
setTheme: (
|
|
731
|
-
localStorage.setItem(t,
|
|
921
|
+
}, [a, c]);
|
|
922
|
+
const v = {
|
|
923
|
+
theme: a,
|
|
924
|
+
setTheme: (d) => {
|
|
925
|
+
localStorage.setItem(t, d), l(d);
|
|
732
926
|
},
|
|
733
|
-
resolvedTheme:
|
|
927
|
+
resolvedTheme: o
|
|
734
928
|
};
|
|
735
|
-
return /* @__PURE__ */ e.jsx(
|
|
736
|
-
},
|
|
737
|
-
const
|
|
738
|
-
if (
|
|
929
|
+
return /* @__PURE__ */ e.jsx(xe.Provider, { value: v, children: r });
|
|
930
|
+
}, De = () => {
|
|
931
|
+
const r = ge(xe);
|
|
932
|
+
if (r === void 0)
|
|
739
933
|
throw new Error("useTheme must be used within a ThemeProvider");
|
|
740
|
-
return
|
|
741
|
-
},
|
|
742
|
-
const { theme:
|
|
743
|
-
if (
|
|
744
|
-
|
|
934
|
+
return r;
|
|
935
|
+
}, Fe = () => {
|
|
936
|
+
const { theme: r, setTheme: s } = De(), [t, a] = k(!1);
|
|
937
|
+
if (Z(() => {
|
|
938
|
+
a(!0);
|
|
745
939
|
}, []), !t)
|
|
746
940
|
return /* @__PURE__ */ e.jsxs(
|
|
747
941
|
"button",
|
|
@@ -754,10 +948,10 @@ const K = (s) => s.replace("--color-", "bg-"), _e = ({ name: s, cssVar: a, value
|
|
|
754
948
|
]
|
|
755
949
|
}
|
|
756
950
|
);
|
|
757
|
-
const
|
|
758
|
-
|
|
759
|
-
},
|
|
760
|
-
switch (
|
|
951
|
+
const l = () => {
|
|
952
|
+
s(r === "light" ? "dark" : r === "dark" ? "system" : "light");
|
|
953
|
+
}, o = () => {
|
|
954
|
+
switch (r) {
|
|
761
955
|
case "light":
|
|
762
956
|
return /* @__PURE__ */ e.jsx("svg", { className: "w-4 h-4", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ e.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M12 3v1m0 16v1m9-9h-1M4 12H3m15.364 6.364l-.707-.707M6.343 6.343l-.707-.707m12.728 0l-.707.707M6.343 17.657l-.707.707M16 12a4 4 0 11-8 0 4 4 0 018 0z" }) });
|
|
763
957
|
case "dark":
|
|
@@ -766,7 +960,7 @@ const K = (s) => s.replace("--color-", "bg-"), _e = ({ name: s, cssVar: a, value
|
|
|
766
960
|
return /* @__PURE__ */ e.jsx("svg", { className: "w-4 h-4", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ e.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M9.75 17L9 20l-1 1h8l-1-1-.75-3M3 13h18M5 17h14a2 2 0 002-2V5a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z" }) });
|
|
767
961
|
}
|
|
768
962
|
}, i = () => {
|
|
769
|
-
switch (
|
|
963
|
+
switch (r) {
|
|
770
964
|
case "light":
|
|
771
965
|
return "Light";
|
|
772
966
|
case "dark":
|
|
@@ -778,19 +972,19 @@ const K = (s) => s.replace("--color-", "bg-"), _e = ({ name: s, cssVar: a, value
|
|
|
778
972
|
return /* @__PURE__ */ e.jsxs(
|
|
779
973
|
"button",
|
|
780
974
|
{
|
|
781
|
-
onClick:
|
|
975
|
+
onClick: l,
|
|
782
976
|
className: "flex items-center gap-2 px-3 py-2 text-sm font-medium text-text-secondary hover:text-text-primary bg-surface hover:bg-surface-variant border border-border-subtle rounded-md transition-colors",
|
|
783
977
|
"aria-label": `Current theme: ${i()}. Click to cycle themes.`,
|
|
784
978
|
children: [
|
|
785
|
-
|
|
979
|
+
o(),
|
|
786
980
|
/* @__PURE__ */ e.jsx("span", { className: "hidden sm:inline", children: i() })
|
|
787
981
|
]
|
|
788
982
|
}
|
|
789
983
|
);
|
|
790
984
|
}, Le = () => /* @__PURE__ */ e.jsxs("div", { className: "relative", children: [
|
|
791
|
-
/* @__PURE__ */ e.jsx("div", { className: "fixed top-4 right-4 z-10", children: /* @__PURE__ */ e.jsx(
|
|
792
|
-
/* @__PURE__ */ e.jsx(
|
|
793
|
-
] }),
|
|
985
|
+
/* @__PURE__ */ e.jsx("div", { className: "fixed top-4 right-4 z-10", children: /* @__PURE__ */ e.jsx(Fe, {}) }),
|
|
986
|
+
/* @__PURE__ */ e.jsx(Pe, {})
|
|
987
|
+
] }), ir = () => /* @__PURE__ */ e.jsx(Se, { defaultTheme: "system", storageKey: "acemyjob-demo-theme", children: /* @__PURE__ */ e.jsx(Le, {}) }), de = {
|
|
794
988
|
variant: {
|
|
795
989
|
default: "bg-reseda-green-500 text-white hover:bg-reseda-green-600 focus-visible:ring-reseda-green-500",
|
|
796
990
|
destructive: "bg-error-500 text-white hover:bg-error-600 focus-visible:ring-error-500",
|
|
@@ -808,35 +1002,35 @@ const K = (s) => s.replace("--color-", "bg-"), _e = ({ name: s, cssVar: a, value
|
|
|
808
1002
|
xl: "h-12 rounded-md px-10 text-base",
|
|
809
1003
|
icon: "h-10 w-10"
|
|
810
1004
|
}
|
|
811
|
-
},
|
|
1005
|
+
}, Me = "inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50", Ie = (...r) => r.filter(Boolean).join(" "), Q = B.forwardRef(
|
|
812
1006
|
({
|
|
813
|
-
className:
|
|
814
|
-
variant:
|
|
1007
|
+
className: r,
|
|
1008
|
+
variant: s = "default",
|
|
815
1009
|
size: t = "default",
|
|
816
|
-
fullWidth:
|
|
817
|
-
loading:
|
|
818
|
-
leftIcon:
|
|
1010
|
+
fullWidth: a = !1,
|
|
1011
|
+
loading: l = !1,
|
|
1012
|
+
leftIcon: o,
|
|
819
1013
|
rightIcon: i,
|
|
820
|
-
children:
|
|
821
|
-
disabled:
|
|
822
|
-
...
|
|
823
|
-
},
|
|
824
|
-
const
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
1014
|
+
children: c,
|
|
1015
|
+
disabled: u,
|
|
1016
|
+
...v
|
|
1017
|
+
}, d) => {
|
|
1018
|
+
const m = u || l, h = Ie(
|
|
1019
|
+
Me,
|
|
1020
|
+
de.variant[s],
|
|
1021
|
+
de.size[t],
|
|
1022
|
+
a ? "w-full" : "",
|
|
1023
|
+
r
|
|
830
1024
|
);
|
|
831
1025
|
return /* @__PURE__ */ e.jsxs(
|
|
832
1026
|
"button",
|
|
833
1027
|
{
|
|
834
1028
|
className: h,
|
|
835
|
-
ref:
|
|
836
|
-
disabled:
|
|
837
|
-
...
|
|
1029
|
+
ref: d,
|
|
1030
|
+
disabled: m,
|
|
1031
|
+
...v,
|
|
838
1032
|
children: [
|
|
839
|
-
|
|
1033
|
+
l && /* @__PURE__ */ e.jsxs(
|
|
840
1034
|
"svg",
|
|
841
1035
|
{
|
|
842
1036
|
className: "mr-2 h-4 w-4 animate-spin",
|
|
@@ -866,16 +1060,16 @@ const K = (s) => s.replace("--color-", "bg-"), _e = ({ name: s, cssVar: a, value
|
|
|
866
1060
|
]
|
|
867
1061
|
}
|
|
868
1062
|
),
|
|
869
|
-
!
|
|
870
|
-
|
|
871
|
-
!
|
|
1063
|
+
!l && o && /* @__PURE__ */ e.jsx("span", { className: "mr-2", children: o }),
|
|
1064
|
+
c,
|
|
1065
|
+
!l && i && /* @__PURE__ */ e.jsx("span", { className: "ml-2", children: i })
|
|
872
1066
|
]
|
|
873
1067
|
}
|
|
874
1068
|
);
|
|
875
1069
|
}
|
|
876
1070
|
);
|
|
877
|
-
|
|
878
|
-
const
|
|
1071
|
+
Q.displayName = "Button";
|
|
1072
|
+
const ue = {
|
|
879
1073
|
provider: {
|
|
880
1074
|
linkedin: "bg-[#0077B5] hover:bg-[#005885] text-white focus-visible:ring-[#0077B5]"
|
|
881
1075
|
},
|
|
@@ -884,56 +1078,56 @@ const Q = {
|
|
|
884
1078
|
right: "flex-row-reverse",
|
|
885
1079
|
only: "justify-center"
|
|
886
1080
|
}
|
|
887
|
-
},
|
|
1081
|
+
}, ze = (...r) => r.filter(Boolean).join(" "), Ye = B.forwardRef(
|
|
888
1082
|
({
|
|
889
|
-
className:
|
|
890
|
-
provider:
|
|
1083
|
+
className: r,
|
|
1084
|
+
provider: s,
|
|
891
1085
|
iconPosition: t = "left",
|
|
892
|
-
icon:
|
|
893
|
-
showText:
|
|
894
|
-
children:
|
|
1086
|
+
icon: a,
|
|
1087
|
+
showText: l = !0,
|
|
1088
|
+
children: o,
|
|
895
1089
|
size: i = "default",
|
|
896
|
-
fullWidth:
|
|
897
|
-
...
|
|
898
|
-
},
|
|
899
|
-
const
|
|
1090
|
+
fullWidth: c = !0,
|
|
1091
|
+
...u
|
|
1092
|
+
}, v) => {
|
|
1093
|
+
const m = a || {
|
|
900
1094
|
linkedin: /* @__PURE__ */ e.jsx("svg", { className: "w-5 h-5", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ e.jsx("path", { d: "M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433c-1.144 0-2.063-.926-2.063-2.065 0-1.138.92-2.063 2.063-2.063 1.14 0 2.064.925 2.064 2.063 0 1.139-.925 2.065-2.064 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z" }) })
|
|
901
|
-
}[
|
|
1095
|
+
}[s], g = o || (l ? {
|
|
902
1096
|
linkedin: "Continue with LinkedIn"
|
|
903
|
-
}[
|
|
1097
|
+
}[s] : ""), N = ze(
|
|
904
1098
|
"relative overflow-hidden transition-all duration-200",
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
1099
|
+
ue.provider[s],
|
|
1100
|
+
ue.iconPosition[t],
|
|
1101
|
+
r
|
|
908
1102
|
);
|
|
909
1103
|
return /* @__PURE__ */ e.jsxs(
|
|
910
|
-
|
|
1104
|
+
Q,
|
|
911
1105
|
{
|
|
912
|
-
ref:
|
|
1106
|
+
ref: v,
|
|
913
1107
|
variant: "none",
|
|
914
|
-
className:
|
|
1108
|
+
className: N,
|
|
915
1109
|
size: i,
|
|
916
|
-
fullWidth:
|
|
917
|
-
leftIcon: t === "left" ?
|
|
918
|
-
rightIcon: t === "right" ?
|
|
919
|
-
...
|
|
1110
|
+
fullWidth: c,
|
|
1111
|
+
leftIcon: t === "left" ? m : void 0,
|
|
1112
|
+
rightIcon: t === "right" ? m : void 0,
|
|
1113
|
+
...u,
|
|
920
1114
|
children: [
|
|
921
|
-
t === "only" &&
|
|
922
|
-
t !== "only" &&
|
|
1115
|
+
t === "only" && m,
|
|
1116
|
+
t !== "only" && g
|
|
923
1117
|
]
|
|
924
1118
|
}
|
|
925
1119
|
);
|
|
926
1120
|
}
|
|
927
1121
|
);
|
|
928
|
-
|
|
929
|
-
function
|
|
930
|
-
children:
|
|
931
|
-
variant:
|
|
1122
|
+
Ye.displayName = "SocialButton";
|
|
1123
|
+
function dr({
|
|
1124
|
+
children: r,
|
|
1125
|
+
variant: s = "default",
|
|
932
1126
|
isActive: t = !1,
|
|
933
|
-
onClick:
|
|
934
|
-
className:
|
|
1127
|
+
onClick: a,
|
|
1128
|
+
className: l = ""
|
|
935
1129
|
}) {
|
|
936
|
-
const
|
|
1130
|
+
const o = "rounded-lg transition-all", i = {
|
|
937
1131
|
default: "border border-border p-4",
|
|
938
1132
|
surface: "bg-surface-variant p-4",
|
|
939
1133
|
elevated: "bg-surface shadow-md p-6",
|
|
@@ -942,63 +1136,63 @@ function Je({
|
|
|
942
1136
|
return /* @__PURE__ */ e.jsx(
|
|
943
1137
|
"div",
|
|
944
1138
|
{
|
|
945
|
-
className: `${
|
|
946
|
-
onClick:
|
|
947
|
-
role:
|
|
948
|
-
tabIndex:
|
|
949
|
-
onKeyDown:
|
|
950
|
-
(
|
|
1139
|
+
className: `${o} ${i[s]} ${l}`,
|
|
1140
|
+
onClick: a,
|
|
1141
|
+
role: a ? "button" : void 0,
|
|
1142
|
+
tabIndex: a ? 0 : void 0,
|
|
1143
|
+
onKeyDown: a ? (c) => {
|
|
1144
|
+
(c.key === "Enter" || c.key === " ") && a();
|
|
951
1145
|
} : void 0,
|
|
952
|
-
children:
|
|
1146
|
+
children: r
|
|
953
1147
|
}
|
|
954
1148
|
);
|
|
955
1149
|
}
|
|
956
|
-
function
|
|
957
|
-
title:
|
|
958
|
-
children:
|
|
1150
|
+
function ur({
|
|
1151
|
+
title: r,
|
|
1152
|
+
children: s,
|
|
959
1153
|
subtitle: t,
|
|
960
|
-
spacing:
|
|
961
|
-
className:
|
|
1154
|
+
spacing: a = "normal",
|
|
1155
|
+
className: l = ""
|
|
962
1156
|
}) {
|
|
963
|
-
const
|
|
1157
|
+
const o = {
|
|
964
1158
|
compact: "space-y-3",
|
|
965
1159
|
normal: "space-y-6",
|
|
966
1160
|
spacious: "space-y-8"
|
|
967
1161
|
};
|
|
968
|
-
return /* @__PURE__ */ e.jsxs("div", { className: `${
|
|
1162
|
+
return /* @__PURE__ */ e.jsxs("div", { className: `${o[a]} ${l}`, children: [
|
|
969
1163
|
/* @__PURE__ */ e.jsxs("div", { children: [
|
|
970
|
-
/* @__PURE__ */ e.jsx("h3", { className: "text-lg font-semibold text-text-primary", children:
|
|
1164
|
+
/* @__PURE__ */ e.jsx("h3", { className: "text-lg font-semibold text-text-primary", children: r }),
|
|
971
1165
|
t && /* @__PURE__ */ e.jsx("p", { className: "text-sm text-text-secondary mt-1", children: t })
|
|
972
1166
|
] }),
|
|
973
|
-
|
|
1167
|
+
s
|
|
974
1168
|
] });
|
|
975
1169
|
}
|
|
976
|
-
function
|
|
977
|
-
variant:
|
|
978
|
-
title:
|
|
1170
|
+
function mr({
|
|
1171
|
+
variant: r,
|
|
1172
|
+
title: s,
|
|
979
1173
|
message: t,
|
|
980
|
-
icon:
|
|
981
|
-
onClose:
|
|
982
|
-
className:
|
|
1174
|
+
icon: a,
|
|
1175
|
+
onClose: l,
|
|
1176
|
+
className: o = ""
|
|
983
1177
|
}) {
|
|
984
|
-
const
|
|
1178
|
+
const c = {
|
|
985
1179
|
success: {
|
|
986
1180
|
bg: "bg-success-50",
|
|
987
1181
|
border: "border-success-200",
|
|
988
1182
|
text: "text-success-700",
|
|
989
|
-
icon: /* @__PURE__ */ e.jsx(
|
|
1183
|
+
icon: /* @__PURE__ */ e.jsx(Te, { className: "h-5 w-5" })
|
|
990
1184
|
},
|
|
991
1185
|
error: {
|
|
992
1186
|
bg: "bg-error-50",
|
|
993
1187
|
border: "border-error-200",
|
|
994
1188
|
text: "text-error-700",
|
|
995
|
-
icon: /* @__PURE__ */ e.jsx(
|
|
1189
|
+
icon: /* @__PURE__ */ e.jsx(ke, { className: "h-5 w-5" })
|
|
996
1190
|
},
|
|
997
1191
|
warning: {
|
|
998
1192
|
bg: "bg-warning-50",
|
|
999
1193
|
border: "border-warning-200",
|
|
1000
1194
|
text: "text-warning-700",
|
|
1001
|
-
icon: /* @__PURE__ */ e.jsx(
|
|
1195
|
+
icon: /* @__PURE__ */ e.jsx(Ce, { className: "h-5 w-5" })
|
|
1002
1196
|
},
|
|
1003
1197
|
info: {
|
|
1004
1198
|
bg: "bg-info-50",
|
|
@@ -1006,23 +1200,23 @@ function He({
|
|
|
1006
1200
|
text: "text-info-700",
|
|
1007
1201
|
icon: /* @__PURE__ */ e.jsx(Ve, { className: "h-5 w-5" })
|
|
1008
1202
|
}
|
|
1009
|
-
}[
|
|
1203
|
+
}[r];
|
|
1010
1204
|
return /* @__PURE__ */ e.jsx(
|
|
1011
1205
|
"div",
|
|
1012
1206
|
{
|
|
1013
|
-
className: `${
|
|
1207
|
+
className: `${c.bg} border ${c.border} rounded-md p-3 ${o}`,
|
|
1014
1208
|
role: "alert",
|
|
1015
1209
|
children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-start gap-3", children: [
|
|
1016
|
-
/* @__PURE__ */ e.jsx("div", { className: `flex-shrink-0 ${
|
|
1210
|
+
/* @__PURE__ */ e.jsx("div", { className: `flex-shrink-0 ${c.text}`, children: a || c.icon }),
|
|
1017
1211
|
/* @__PURE__ */ e.jsxs("div", { className: "flex-1", children: [
|
|
1018
|
-
|
|
1019
|
-
/* @__PURE__ */ e.jsx("p", { className: `text-sm ${
|
|
1212
|
+
s && /* @__PURE__ */ e.jsx("p", { className: `text-sm font-medium ${c.text}`, children: s }),
|
|
1213
|
+
/* @__PURE__ */ e.jsx("p", { className: `text-sm ${c.text}`, children: t })
|
|
1020
1214
|
] }),
|
|
1021
|
-
|
|
1215
|
+
l && /* @__PURE__ */ e.jsx(
|
|
1022
1216
|
"button",
|
|
1023
1217
|
{
|
|
1024
|
-
onClick:
|
|
1025
|
-
className: `flex-shrink-0 ${
|
|
1218
|
+
onClick: l,
|
|
1219
|
+
className: `flex-shrink-0 ${c.text} hover:opacity-70`,
|
|
1026
1220
|
"aria-label": "Close alert",
|
|
1027
1221
|
children: "✕"
|
|
1028
1222
|
}
|
|
@@ -1031,117 +1225,545 @@ function He({
|
|
|
1031
1225
|
}
|
|
1032
1226
|
);
|
|
1033
1227
|
}
|
|
1034
|
-
function
|
|
1035
|
-
title:
|
|
1036
|
-
titleId:
|
|
1228
|
+
function Ue({
|
|
1229
|
+
title: r,
|
|
1230
|
+
titleId: s,
|
|
1037
1231
|
...t
|
|
1038
|
-
},
|
|
1039
|
-
return /* @__PURE__ */
|
|
1232
|
+
}, a) {
|
|
1233
|
+
return /* @__PURE__ */ W.createElement("svg", Object.assign({
|
|
1040
1234
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1041
1235
|
viewBox: "0 0 20 20",
|
|
1042
1236
|
fill: "currentColor",
|
|
1043
1237
|
"aria-hidden": "true",
|
|
1044
1238
|
"data-slot": "icon",
|
|
1045
|
-
ref:
|
|
1046
|
-
"aria-labelledby":
|
|
1047
|
-
}, t),
|
|
1048
|
-
id:
|
|
1049
|
-
},
|
|
1239
|
+
ref: a,
|
|
1240
|
+
"aria-labelledby": s
|
|
1241
|
+
}, t), r ? /* @__PURE__ */ W.createElement("title", {
|
|
1242
|
+
id: s
|
|
1243
|
+
}, r) : null, /* @__PURE__ */ W.createElement("path", {
|
|
1050
1244
|
d: "M6.28 5.22a.75.75 0 0 0-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 1 0 1.06 1.06L10 11.06l3.72 3.72a.75.75 0 1 0 1.06-1.06L11.06 10l3.72-3.72a.75.75 0 0 0-1.06-1.06L10 8.94 6.28 5.22Z"
|
|
1051
1245
|
}));
|
|
1052
1246
|
}
|
|
1053
|
-
const
|
|
1054
|
-
function
|
|
1055
|
-
children:
|
|
1056
|
-
variant:
|
|
1247
|
+
const We = /* @__PURE__ */ W.forwardRef(Ue);
|
|
1248
|
+
function Ge({
|
|
1249
|
+
children: r,
|
|
1250
|
+
variant: s = "default",
|
|
1057
1251
|
size: t = "md",
|
|
1058
|
-
removable:
|
|
1059
|
-
onRemove:
|
|
1060
|
-
className:
|
|
1252
|
+
removable: a = !1,
|
|
1253
|
+
onRemove: l,
|
|
1254
|
+
className: o = "",
|
|
1061
1255
|
style: i,
|
|
1062
|
-
colorClass:
|
|
1256
|
+
colorClass: c
|
|
1063
1257
|
}) {
|
|
1064
|
-
const
|
|
1258
|
+
const u = {
|
|
1065
1259
|
default: "bg-surface-variant text-text-secondary",
|
|
1066
1260
|
success: "bg-success-50 text-success-700",
|
|
1067
1261
|
error: "bg-error-50 text-error-700",
|
|
1068
1262
|
warning: "bg-warning-50 text-warning-700",
|
|
1069
1263
|
info: "bg-info-50 text-info-700"
|
|
1070
|
-
},
|
|
1264
|
+
}, v = {
|
|
1071
1265
|
sm: "px-2 py-0.5 text-xs",
|
|
1072
1266
|
md: "px-3 py-1 text-sm",
|
|
1073
1267
|
lg: "px-4 py-1.5 text-base"
|
|
1074
|
-
},
|
|
1268
|
+
}, d = c || u[s];
|
|
1075
1269
|
return /* @__PURE__ */ e.jsxs(
|
|
1076
1270
|
"span",
|
|
1077
1271
|
{
|
|
1078
|
-
className: `inline-flex items-center gap-1 rounded-full ${
|
|
1272
|
+
className: `inline-flex items-center gap-1 rounded-full ${d} ${v[t]} ${o}`,
|
|
1079
1273
|
style: i,
|
|
1080
1274
|
children: [
|
|
1081
|
-
|
|
1082
|
-
|
|
1275
|
+
r,
|
|
1276
|
+
a && l && /* @__PURE__ */ e.jsx(
|
|
1083
1277
|
"button",
|
|
1084
1278
|
{
|
|
1085
|
-
onClick:
|
|
1279
|
+
onClick: l,
|
|
1086
1280
|
className: "ml-1 hover:opacity-70",
|
|
1087
1281
|
"aria-label": "Remove badge",
|
|
1088
|
-
children: /* @__PURE__ */ e.jsx(
|
|
1282
|
+
children: /* @__PURE__ */ e.jsx(We, { className: "w-3 h-3" })
|
|
1089
1283
|
}
|
|
1090
1284
|
)
|
|
1091
1285
|
]
|
|
1092
1286
|
}
|
|
1093
1287
|
);
|
|
1094
1288
|
}
|
|
1095
|
-
function
|
|
1096
|
-
|
|
1097
|
-
|
|
1289
|
+
function xr({
|
|
1290
|
+
label: r,
|
|
1291
|
+
children: s,
|
|
1292
|
+
helperText: t,
|
|
1293
|
+
errorText: a,
|
|
1294
|
+
required: l = !1,
|
|
1295
|
+
className: o = ""
|
|
1296
|
+
}) {
|
|
1297
|
+
return /* @__PURE__ */ e.jsxs("div", { className: `space-y-2 ${o}`, children: [
|
|
1298
|
+
/* @__PURE__ */ e.jsxs("label", { className: "block text-sm font-medium text-text-primary", children: [
|
|
1299
|
+
r,
|
|
1300
|
+
l && /* @__PURE__ */ e.jsx("span", { className: "text-error-500 ml-1", children: "*" })
|
|
1301
|
+
] }),
|
|
1302
|
+
s,
|
|
1303
|
+
a && /* @__PURE__ */ e.jsx("p", { className: "text-xs text-error-600", children: a }),
|
|
1304
|
+
t && !a && /* @__PURE__ */ e.jsx("p", { className: "text-xs text-text-muted", children: t })
|
|
1305
|
+
] });
|
|
1306
|
+
}
|
|
1307
|
+
const He = B.forwardRef(
|
|
1308
|
+
({
|
|
1309
|
+
className: r = "",
|
|
1310
|
+
leftIcon: s,
|
|
1311
|
+
rightIcon: t,
|
|
1312
|
+
error: a = !1,
|
|
1313
|
+
fullWidth: l = !0,
|
|
1314
|
+
disabled: o,
|
|
1315
|
+
...i
|
|
1316
|
+
}, c) => {
|
|
1317
|
+
const u = "px-3 py-2 border rounded-lg transition-colors text-sm", v = a ? "border-error-300 focus:ring-2 focus:ring-error-500 focus:border-transparent" : "border-border focus:ring-2 focus:ring-reseda-green-500 focus:border-transparent", d = o ? "bg-surface-variant text-text-muted cursor-not-allowed" : "bg-surface text-text-primary", m = l ? "w-full" : "", h = s || t ? "relative flex items-center" : "", g = `${u} ${v} ${d} ${m} ${s ? "pl-10" : ""} ${t ? "pr-10" : ""} ${r}`;
|
|
1318
|
+
return /* @__PURE__ */ e.jsxs("div", { className: h, children: [
|
|
1319
|
+
s && /* @__PURE__ */ e.jsx("div", { className: "absolute left-3 flex items-center pointer-events-none text-text-muted", children: s }),
|
|
1320
|
+
/* @__PURE__ */ e.jsx(
|
|
1321
|
+
"input",
|
|
1322
|
+
{
|
|
1323
|
+
ref: c,
|
|
1324
|
+
className: g,
|
|
1325
|
+
disabled: o,
|
|
1326
|
+
...i
|
|
1327
|
+
}
|
|
1328
|
+
),
|
|
1329
|
+
t && /* @__PURE__ */ e.jsx("div", { className: "absolute right-3 flex items-center pointer-events-none text-text-muted", children: t })
|
|
1330
|
+
] });
|
|
1331
|
+
}
|
|
1332
|
+
);
|
|
1333
|
+
He.displayName = "Input";
|
|
1334
|
+
const Je = B.forwardRef(
|
|
1335
|
+
({
|
|
1336
|
+
options: r,
|
|
1337
|
+
placeholder: s,
|
|
1338
|
+
className: t = "",
|
|
1339
|
+
error: a = !1,
|
|
1340
|
+
fullWidth: l = !0,
|
|
1341
|
+
disabled: o,
|
|
1342
|
+
...i
|
|
1343
|
+
}, c) => {
|
|
1344
|
+
const h = `px-3 py-2 border rounded-lg transition-colors text-sm appearance-none ${a ? "border-error-300 focus:ring-2 focus:ring-error-500 focus:border-transparent" : "border-border focus:ring-2 focus:ring-reseda-green-500 focus:border-transparent"} ${o ? "bg-surface-variant text-text-muted cursor-not-allowed" : "bg-surface text-text-primary"} ${l ? "w-full" : ""} pr-10 ${t}`;
|
|
1345
|
+
return /* @__PURE__ */ e.jsxs("div", { className: "relative flex items-center", children: [
|
|
1346
|
+
/* @__PURE__ */ e.jsxs(
|
|
1347
|
+
"select",
|
|
1348
|
+
{
|
|
1349
|
+
ref: c,
|
|
1350
|
+
className: h,
|
|
1351
|
+
disabled: o,
|
|
1352
|
+
...i,
|
|
1353
|
+
children: [
|
|
1354
|
+
s && /* @__PURE__ */ e.jsx("option", { value: "", disabled: !0, children: s }),
|
|
1355
|
+
r.map((g) => /* @__PURE__ */ e.jsx("option", { value: g.value, children: g.label }, g.value))
|
|
1356
|
+
]
|
|
1357
|
+
}
|
|
1358
|
+
),
|
|
1359
|
+
/* @__PURE__ */ e.jsx(K, { className: "absolute right-3 w-4 h-4 text-text-muted pointer-events-none" })
|
|
1360
|
+
] });
|
|
1361
|
+
}
|
|
1362
|
+
);
|
|
1363
|
+
Je.displayName = "Select";
|
|
1364
|
+
const qe = B.forwardRef(
|
|
1365
|
+
({
|
|
1366
|
+
tags: r,
|
|
1367
|
+
onTagsChange: s,
|
|
1368
|
+
onAddTag: t,
|
|
1369
|
+
onRemoveTag: a,
|
|
1370
|
+
placeholder: l = "Add a tag and press Enter",
|
|
1371
|
+
error: o = !1,
|
|
1372
|
+
fullWidth: i = !0,
|
|
1373
|
+
maxTags: c,
|
|
1374
|
+
duplicateCheck: u = !0,
|
|
1375
|
+
disabled: v,
|
|
1376
|
+
className: d = "",
|
|
1377
|
+
...m
|
|
1378
|
+
}, h) => {
|
|
1379
|
+
const [g, N] = k(""), T = (f) => {
|
|
1380
|
+
f.key === "Enter" && g.trim() ? (f.preventDefault(), _(g.trim())) : f.key === "Backspace" && !g && r.length > 0 && A(r[r.length - 1]);
|
|
1381
|
+
}, _ = (f) => {
|
|
1382
|
+
if (c && r.length >= c || u && r.includes(f))
|
|
1383
|
+
return;
|
|
1384
|
+
const j = [...r, f];
|
|
1385
|
+
s(j), t?.(f), N("");
|
|
1386
|
+
}, A = (f) => {
|
|
1387
|
+
const j = r.filter((C) => C !== f);
|
|
1388
|
+
s(j), a?.(f);
|
|
1389
|
+
}, b = `w-full px-3 py-2 border rounded-lg transition-colors text-sm ${o ? "border-error-300 focus:ring-2 focus:ring-error-500 focus:border-transparent" : "border-border focus:ring-2 focus:ring-reseda-green-500 focus:border-transparent"} ${v ? "bg-surface-variant text-text-muted cursor-not-allowed" : "bg-surface text-text-primary"} ${i ? "w-full" : ""} ${d}`;
|
|
1390
|
+
return /* @__PURE__ */ e.jsxs("div", { className: "space-y-2", children: [
|
|
1391
|
+
/* @__PURE__ */ e.jsx("div", { className: "flex flex-wrap gap-2 mb-2", children: r.map((f) => /* @__PURE__ */ e.jsx(
|
|
1392
|
+
Ge,
|
|
1393
|
+
{
|
|
1394
|
+
removable: !0,
|
|
1395
|
+
onRemove: () => A(f),
|
|
1396
|
+
variant: "default",
|
|
1397
|
+
children: f
|
|
1398
|
+
},
|
|
1399
|
+
f
|
|
1400
|
+
)) }),
|
|
1401
|
+
/* @__PURE__ */ e.jsx(
|
|
1402
|
+
"input",
|
|
1403
|
+
{
|
|
1404
|
+
ref: h,
|
|
1405
|
+
type: "text",
|
|
1406
|
+
className: b,
|
|
1407
|
+
placeholder: l,
|
|
1408
|
+
value: g,
|
|
1409
|
+
onChange: (f) => N(f.target.value),
|
|
1410
|
+
onKeyDown: T,
|
|
1411
|
+
disabled: v || (c ? r.length >= c : !1),
|
|
1412
|
+
...m
|
|
1413
|
+
}
|
|
1414
|
+
),
|
|
1415
|
+
c && /* @__PURE__ */ e.jsxs("p", { className: "text-xs text-text-muted", children: [
|
|
1416
|
+
r.length,
|
|
1417
|
+
" / ",
|
|
1418
|
+
c
|
|
1419
|
+
] })
|
|
1420
|
+
] });
|
|
1421
|
+
}
|
|
1422
|
+
);
|
|
1423
|
+
qe.displayName = "TagInput";
|
|
1424
|
+
const Xe = B.forwardRef(
|
|
1425
|
+
({
|
|
1426
|
+
className: r = "",
|
|
1427
|
+
error: s = !1,
|
|
1428
|
+
fullWidth: t = !0,
|
|
1429
|
+
autoResize: a = !1,
|
|
1430
|
+
maxLength: l,
|
|
1431
|
+
showCharCount: o = !1,
|
|
1432
|
+
disabled: i,
|
|
1433
|
+
value: c,
|
|
1434
|
+
onChange: u,
|
|
1435
|
+
...v
|
|
1436
|
+
}, d) => {
|
|
1437
|
+
const T = `px-3 py-2 border rounded-lg transition-colors text-sm font-normal resize-none ${s ? "border-error-300 focus:ring-2 focus:ring-error-500 focus:border-transparent" : "border-border focus:ring-2 focus:ring-reseda-green-500 focus:border-transparent"} ${i ? "bg-surface-variant text-text-muted cursor-not-allowed" : "bg-surface text-text-primary"} ${t ? "w-full" : ""} ${r}`, _ = ($) => {
|
|
1438
|
+
a && ($.target.style.height = "auto", $.target.style.height = `${$.target.scrollHeight}px`), u?.($);
|
|
1439
|
+
}, A = typeof c == "string" ? c.length : 0;
|
|
1440
|
+
return /* @__PURE__ */ e.jsxs("div", { className: "space-y-1", children: [
|
|
1441
|
+
/* @__PURE__ */ e.jsx(
|
|
1442
|
+
"textarea",
|
|
1443
|
+
{
|
|
1444
|
+
ref: d,
|
|
1445
|
+
className: T,
|
|
1446
|
+
disabled: i,
|
|
1447
|
+
value: c,
|
|
1448
|
+
onChange: _,
|
|
1449
|
+
maxLength: l,
|
|
1450
|
+
...v
|
|
1451
|
+
}
|
|
1452
|
+
),
|
|
1453
|
+
o && l && /* @__PURE__ */ e.jsxs("p", { className: "text-xs text-text-muted text-right", children: [
|
|
1454
|
+
A,
|
|
1455
|
+
" / ",
|
|
1456
|
+
l
|
|
1457
|
+
] })
|
|
1458
|
+
] });
|
|
1459
|
+
}
|
|
1460
|
+
);
|
|
1461
|
+
Xe.displayName = "Textarea";
|
|
1462
|
+
function fr({
|
|
1463
|
+
options: r,
|
|
1464
|
+
selectedValues: s,
|
|
1465
|
+
onSelectionChange: t,
|
|
1466
|
+
layout: a = "vertical",
|
|
1467
|
+
columns: l = 2,
|
|
1468
|
+
disabled: o = !1,
|
|
1469
|
+
error: i = !1
|
|
1470
|
+
}) {
|
|
1471
|
+
const c = (m) => {
|
|
1472
|
+
const h = s.includes(m) ? s.filter((g) => g !== m) : [...s, m];
|
|
1473
|
+
t(h);
|
|
1474
|
+
}, u = {
|
|
1475
|
+
vertical: "space-y-3",
|
|
1476
|
+
horizontal: "flex flex-wrap gap-3",
|
|
1477
|
+
grid: `grid grid-cols-${l} gap-3`
|
|
1478
|
+
}, v = a === "grid" ? "grid gap-3" : u[a], d = a === "grid" ? `md:grid-cols-${l}` : "";
|
|
1479
|
+
return /* @__PURE__ */ e.jsx("div", { className: `${v} ${d}`, children: r.map((m) => {
|
|
1480
|
+
const h = s.includes(m.value), N = h ? "border-reseda-green-500 bg-reseda-green-50 ring-2 ring-reseda-green-200" : `border-${i ? "border-error-300" : "border-border"} hover:border-border-subtle hover:bg-surface-variant`;
|
|
1481
|
+
return /* @__PURE__ */ e.jsxs(
|
|
1482
|
+
"label",
|
|
1483
|
+
{
|
|
1484
|
+
className: `relative flex items-start p-3 border rounded-lg cursor-pointer transition-all ${N} ${o ? "opacity-50 cursor-not-allowed" : ""}`,
|
|
1485
|
+
children: [
|
|
1486
|
+
/* @__PURE__ */ e.jsx(
|
|
1487
|
+
"input",
|
|
1488
|
+
{
|
|
1489
|
+
type: "checkbox",
|
|
1490
|
+
checked: h,
|
|
1491
|
+
onChange: () => c(m.value),
|
|
1492
|
+
disabled: o,
|
|
1493
|
+
className: "sr-only"
|
|
1494
|
+
}
|
|
1495
|
+
),
|
|
1496
|
+
m.icon && /* @__PURE__ */ e.jsx("div", { className: "mr-3 flex-shrink-0 text-text-secondary", children: m.icon }),
|
|
1497
|
+
/* @__PURE__ */ e.jsxs("div", { className: "flex-1", children: [
|
|
1498
|
+
/* @__PURE__ */ e.jsx("div", { className: "font-medium text-text-primary", children: m.label }),
|
|
1499
|
+
m.description && /* @__PURE__ */ e.jsx("div", { className: "text-sm text-text-secondary", children: m.description })
|
|
1500
|
+
] }),
|
|
1501
|
+
h && /* @__PURE__ */ e.jsx("div", { className: "text-reseda-green-500 flex-shrink-0", children: /* @__PURE__ */ e.jsx("svg", { className: "w-5 h-5", fill: "currentColor", viewBox: "0 0 20 20", children: /* @__PURE__ */ e.jsx("path", { fillRule: "evenodd", d: "M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z", clipRule: "evenodd" }) }) })
|
|
1502
|
+
]
|
|
1503
|
+
},
|
|
1504
|
+
m.value
|
|
1505
|
+
);
|
|
1506
|
+
}) });
|
|
1507
|
+
}
|
|
1508
|
+
function vr({
|
|
1509
|
+
options: r,
|
|
1510
|
+
selectedValue: s,
|
|
1511
|
+
onSelectionChange: t,
|
|
1512
|
+
layout: a = "vertical",
|
|
1513
|
+
columns: l = 2,
|
|
1514
|
+
disabled: o = !1,
|
|
1515
|
+
error: i = !1,
|
|
1516
|
+
name: c = "radio-group"
|
|
1517
|
+
}) {
|
|
1518
|
+
const v = a === "grid" ? `grid gap-3 md:grid-cols-${l}` : {
|
|
1519
|
+
vertical: "space-y-3",
|
|
1520
|
+
horizontal: "flex flex-wrap gap-3",
|
|
1521
|
+
grid: "grid gap-3"
|
|
1522
|
+
}[a];
|
|
1523
|
+
return /* @__PURE__ */ e.jsx("div", { className: v, children: r.map((d) => {
|
|
1524
|
+
const m = s === d.value, g = m ? "border-reseda-green-500 bg-reseda-green-50 ring-2 ring-reseda-green-200" : `border-${i ? "border-error-300" : "border-border"} hover:border-border-subtle hover:bg-surface-variant`;
|
|
1525
|
+
return /* @__PURE__ */ e.jsxs(
|
|
1526
|
+
"label",
|
|
1527
|
+
{
|
|
1528
|
+
className: `relative flex items-start p-3 border rounded-lg cursor-pointer transition-all ${g} ${o ? "opacity-50 cursor-not-allowed" : ""}`,
|
|
1529
|
+
children: [
|
|
1530
|
+
/* @__PURE__ */ e.jsx(
|
|
1531
|
+
"input",
|
|
1532
|
+
{
|
|
1533
|
+
type: "radio",
|
|
1534
|
+
name: c,
|
|
1535
|
+
value: d.value,
|
|
1536
|
+
checked: m,
|
|
1537
|
+
onChange: () => t(d.value),
|
|
1538
|
+
disabled: o,
|
|
1539
|
+
className: "sr-only"
|
|
1540
|
+
}
|
|
1541
|
+
),
|
|
1542
|
+
d.icon && /* @__PURE__ */ e.jsx("div", { className: "mr-3 flex-shrink-0 text-text-secondary", children: d.icon }),
|
|
1543
|
+
/* @__PURE__ */ e.jsxs("div", { className: "flex-1", children: [
|
|
1544
|
+
/* @__PURE__ */ e.jsx("div", { className: "font-medium text-text-primary", children: d.label }),
|
|
1545
|
+
d.description && /* @__PURE__ */ e.jsx("div", { className: "text-sm text-text-secondary", children: d.description })
|
|
1546
|
+
] }),
|
|
1547
|
+
m && /* @__PURE__ */ e.jsx("div", { className: "text-reseda-green-500 flex-shrink-0", children: /* @__PURE__ */ e.jsx("svg", { className: "w-5 h-5", fill: "currentColor", viewBox: "0 0 20 20", children: /* @__PURE__ */ e.jsx("path", { fillRule: "evenodd", d: "M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z", clipRule: "evenodd" }) }) })
|
|
1548
|
+
]
|
|
1549
|
+
},
|
|
1550
|
+
d.value
|
|
1551
|
+
);
|
|
1552
|
+
}) });
|
|
1553
|
+
}
|
|
1554
|
+
function hr({
|
|
1555
|
+
items: r,
|
|
1556
|
+
allowMultiple: s = !1,
|
|
1557
|
+
defaultOpenId: t,
|
|
1558
|
+
onOpenChange: a,
|
|
1559
|
+
className: l = ""
|
|
1560
|
+
}) {
|
|
1561
|
+
const [o, i] = k(() => t ? Array.isArray(t) ? t : [t] : []), c = (u) => {
|
|
1562
|
+
let v;
|
|
1563
|
+
s ? v = o.includes(u) ? o.filter((d) => d !== u) : [...o, u] : v = o.includes(u) ? [] : [u], i(v), a?.(v);
|
|
1564
|
+
};
|
|
1565
|
+
return /* @__PURE__ */ e.jsx("div", { className: `space-y-2 ${l}`, children: r.map((u) => {
|
|
1566
|
+
const v = o.includes(u.id);
|
|
1567
|
+
return /* @__PURE__ */ e.jsxs(
|
|
1568
|
+
"div",
|
|
1569
|
+
{
|
|
1570
|
+
className: "border border-border rounded-lg overflow-hidden",
|
|
1571
|
+
children: [
|
|
1572
|
+
/* @__PURE__ */ e.jsxs(
|
|
1573
|
+
"button",
|
|
1574
|
+
{
|
|
1575
|
+
onClick: () => c(u.id),
|
|
1576
|
+
className: "w-full px-4 py-3 flex items-center justify-between hover:bg-surface-variant transition-colors text-left",
|
|
1577
|
+
children: [
|
|
1578
|
+
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-3 flex-1", children: [
|
|
1579
|
+
u.icon && /* @__PURE__ */ e.jsx("div", { className: "flex-shrink-0 text-text-secondary", children: u.icon }),
|
|
1580
|
+
/* @__PURE__ */ e.jsx("h3", { className: "font-medium text-text-primary", children: u.title })
|
|
1581
|
+
] }),
|
|
1582
|
+
/* @__PURE__ */ e.jsx(
|
|
1583
|
+
K,
|
|
1584
|
+
{
|
|
1585
|
+
className: `w-5 h-5 text-text-secondary transition-transform flex-shrink-0 ${v ? "rotate-180" : ""}`
|
|
1586
|
+
}
|
|
1587
|
+
)
|
|
1588
|
+
]
|
|
1589
|
+
}
|
|
1590
|
+
),
|
|
1591
|
+
v && /* @__PURE__ */ e.jsx("div", { className: "border-t border-border px-4 py-3 bg-surface-variant text-text-primary", children: u.content })
|
|
1592
|
+
]
|
|
1593
|
+
},
|
|
1594
|
+
u.id
|
|
1595
|
+
);
|
|
1596
|
+
}) });
|
|
1597
|
+
}
|
|
1598
|
+
const Ze = B.forwardRef(
|
|
1599
|
+
({
|
|
1600
|
+
value: r,
|
|
1601
|
+
onChange: s,
|
|
1602
|
+
min: t = 0,
|
|
1603
|
+
max: a = 100,
|
|
1604
|
+
step: l = 1,
|
|
1605
|
+
showValue: o = !0,
|
|
1606
|
+
showLabels: i = !1,
|
|
1607
|
+
minLabel: c,
|
|
1608
|
+
maxLabel: u,
|
|
1609
|
+
error: v = !1,
|
|
1610
|
+
fullWidth: d = !0,
|
|
1611
|
+
disabled: m,
|
|
1612
|
+
className: h = "",
|
|
1613
|
+
...g
|
|
1614
|
+
}, N) => {
|
|
1615
|
+
const S = `w-full h-2 rounded-lg appearance-none cursor-pointer ${v ? "bg-error-200 accent-error-500" : "bg-border accent-reseda-green-500"} ${m ? "opacity-50 cursor-not-allowed" : ""} ${d ? "w-full" : ""} ${h}`, D = (r - t) / (a - t) * 100;
|
|
1616
|
+
return /* @__PURE__ */ e.jsxs("div", { className: "space-y-2", children: [
|
|
1617
|
+
i && (c || u) && /* @__PURE__ */ e.jsxs("div", { className: "flex justify-between text-xs text-text-muted", children: [
|
|
1618
|
+
c && /* @__PURE__ */ e.jsx("span", { children: c }),
|
|
1619
|
+
u && /* @__PURE__ */ e.jsx("span", { children: u })
|
|
1620
|
+
] }),
|
|
1621
|
+
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-3", children: [
|
|
1622
|
+
/* @__PURE__ */ e.jsx(
|
|
1623
|
+
"input",
|
|
1624
|
+
{
|
|
1625
|
+
ref: N,
|
|
1626
|
+
type: "range",
|
|
1627
|
+
min: t,
|
|
1628
|
+
max: a,
|
|
1629
|
+
step: l,
|
|
1630
|
+
value: r,
|
|
1631
|
+
onChange: (F) => s(Number(F.target.value)),
|
|
1632
|
+
disabled: m,
|
|
1633
|
+
className: S,
|
|
1634
|
+
...g
|
|
1635
|
+
}
|
|
1636
|
+
),
|
|
1637
|
+
o && /* @__PURE__ */ e.jsx("span", { className: "text-sm font-medium text-text-primary min-w-[3rem] text-right", children: r })
|
|
1638
|
+
] }),
|
|
1639
|
+
/* @__PURE__ */ e.jsx("div", { className: "h-1 bg-border rounded-full overflow-hidden", children: /* @__PURE__ */ e.jsx(
|
|
1640
|
+
"div",
|
|
1641
|
+
{
|
|
1642
|
+
className: "h-full bg-reseda-green-500 transition-all",
|
|
1643
|
+
style: { width: `${D}%` }
|
|
1644
|
+
}
|
|
1645
|
+
) })
|
|
1646
|
+
] });
|
|
1647
|
+
}
|
|
1648
|
+
);
|
|
1649
|
+
Ze.displayName = "Slider";
|
|
1650
|
+
function gr({
|
|
1651
|
+
icon: r,
|
|
1652
|
+
title: s,
|
|
1653
|
+
description: t,
|
|
1654
|
+
isSelected: a = !1,
|
|
1655
|
+
onClick: l,
|
|
1656
|
+
disabled: o = !1,
|
|
1657
|
+
className: i = ""
|
|
1658
|
+
}) {
|
|
1659
|
+
const c = "p-4 border rounded-lg transition-all text-center cursor-pointer", u = a ? "border-reseda-green-500 bg-reseda-green-50 ring-2 ring-reseda-green-200" : "border-border hover:border-border-subtle hover:bg-surface-variant", v = o ? "opacity-50 cursor-not-allowed" : "";
|
|
1660
|
+
return /* @__PURE__ */ e.jsxs(
|
|
1661
|
+
"div",
|
|
1662
|
+
{
|
|
1663
|
+
className: `${c} ${u} ${v} ${i}`,
|
|
1664
|
+
onClick: () => !o && l?.(),
|
|
1665
|
+
role: "button",
|
|
1666
|
+
tabIndex: o ? -1 : 0,
|
|
1667
|
+
onKeyDown: (d) => {
|
|
1668
|
+
!o && (d.key === "Enter" || d.key === " ") && l?.();
|
|
1669
|
+
},
|
|
1670
|
+
children: [
|
|
1671
|
+
r && /* @__PURE__ */ e.jsx("div", { className: "mb-3 flex justify-center", children: /* @__PURE__ */ e.jsx("div", { className: "text-text-secondary", children: r }) }),
|
|
1672
|
+
/* @__PURE__ */ e.jsx("h3", { className: "font-medium text-text-primary mb-1", children: s }),
|
|
1673
|
+
t && /* @__PURE__ */ e.jsx("p", { className: "text-xs text-text-secondary", children: t }),
|
|
1674
|
+
a && /* @__PURE__ */ e.jsx("div", { className: "mt-3 flex justify-center", children: /* @__PURE__ */ e.jsx("div", { className: "text-reseda-green-500", children: /* @__PURE__ */ e.jsx("svg", { className: "w-5 h-5", fill: "currentColor", viewBox: "0 0 20 20", children: /* @__PURE__ */ e.jsx("path", { fillRule: "evenodd", d: "M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z", clipRule: "evenodd" }) }) }) })
|
|
1675
|
+
]
|
|
1676
|
+
}
|
|
1677
|
+
);
|
|
1678
|
+
}
|
|
1679
|
+
const Ke = {
|
|
1680
|
+
activeText: "text-reseda-green-700",
|
|
1681
|
+
activeBorder: "border-reseda-green-700",
|
|
1682
|
+
inactiveText: "text-text-secondary",
|
|
1683
|
+
inactiveHoverText: "hover:text-text-primary",
|
|
1684
|
+
disabledText: "text-text-disabled"
|
|
1685
|
+
};
|
|
1686
|
+
function br({ tabs: r, activeTab: s, disabled: t = !1, onChange: a, colorConfig: l }) {
|
|
1687
|
+
const o = l || Ke;
|
|
1688
|
+
return /* @__PURE__ */ e.jsx("div", { className: "flex border-b border-border mb-6", children: r.map((i) => {
|
|
1689
|
+
const c = s === i.id;
|
|
1098
1690
|
return /* @__PURE__ */ e.jsx(
|
|
1099
|
-
|
|
1691
|
+
Q,
|
|
1100
1692
|
{
|
|
1101
1693
|
variant: "ghost",
|
|
1102
|
-
onClick: () => !t &&
|
|
1103
|
-
disabled: t && !
|
|
1104
|
-
className: `px-4 py-2.5 text-sm font-medium whitespace-nowrap transition-colors border-b-2 -mb-px ${
|
|
1105
|
-
children:
|
|
1694
|
+
onClick: () => !t && a(i.id),
|
|
1695
|
+
disabled: t && !c,
|
|
1696
|
+
className: `px-4 py-2.5 text-sm font-medium whitespace-nowrap transition-colors border-b-2 -mb-px ${c ? `${o.activeBorder} ${o.activeText}` : t ? `border-transparent ${o.disabledText} cursor-not-allowed` : `border-transparent ${o.inactiveText} ${o.inactiveHoverText}`}`,
|
|
1697
|
+
children: i.label
|
|
1106
1698
|
},
|
|
1107
|
-
|
|
1699
|
+
i.id
|
|
1108
1700
|
);
|
|
1109
1701
|
}) });
|
|
1110
1702
|
}
|
|
1111
|
-
|
|
1112
|
-
|
|
1703
|
+
const Qe = {
|
|
1704
|
+
activeBg: "bg-reseda-green-700",
|
|
1705
|
+
activeText: "text-white",
|
|
1706
|
+
completedBg: "bg-success-500",
|
|
1707
|
+
completedText: "text-white",
|
|
1708
|
+
incompleteBorder: "border-border",
|
|
1709
|
+
incompleteText: "text-text-muted",
|
|
1710
|
+
labelActiveText: "text-reseda-green-800",
|
|
1711
|
+
labelInactiveText: "text-text-muted",
|
|
1712
|
+
connectorBg: "bg-border"
|
|
1713
|
+
};
|
|
1714
|
+
function pr({ currentStep: r, steps: s, colorConfig: t }) {
|
|
1715
|
+
const a = t || Qe;
|
|
1716
|
+
return /* @__PURE__ */ e.jsx("nav", { className: "mb-10", children: /* @__PURE__ */ e.jsx("ol", { className: "flex items-center w-full", children: s.map((l, o) => /* @__PURE__ */ e.jsxs("li", { className: `flex items-center ${o < s.length - 1 ? "flex-1" : ""}`, children: [
|
|
1113
1717
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center", children: [
|
|
1114
1718
|
/* @__PURE__ */ e.jsx(
|
|
1115
1719
|
"span",
|
|
1116
1720
|
{
|
|
1117
|
-
className: `flex items-center justify-center w-9 h-9 rounded-full text-sm font-semibold shrink-0 ${
|
|
1118
|
-
children:
|
|
1721
|
+
className: `flex items-center justify-center w-9 h-9 rounded-full text-sm font-semibold shrink-0 ${r === l.number ? `${a.activeBg} ${a.activeText}` : r > l.number ? `${a.completedBg} ${a.completedText}` : `border-2 ${a.incompleteBorder} ${a.incompleteText}`}`,
|
|
1722
|
+
children: l.number
|
|
1119
1723
|
}
|
|
1120
1724
|
),
|
|
1121
1725
|
/* @__PURE__ */ e.jsx(
|
|
1122
1726
|
"span",
|
|
1123
1727
|
{
|
|
1124
|
-
className: `ml-3 text-sm font-medium whitespace-nowrap ${
|
|
1125
|
-
children:
|
|
1728
|
+
className: `ml-3 text-sm font-medium whitespace-nowrap ${r >= l.number ? a.labelActiveText : a.labelInactiveText}`,
|
|
1729
|
+
children: l.label
|
|
1126
1730
|
}
|
|
1127
1731
|
)
|
|
1128
1732
|
] }),
|
|
1129
|
-
o <
|
|
1130
|
-
] },
|
|
1733
|
+
o < s.length - 1 && /* @__PURE__ */ e.jsx("div", { className: `flex-1 h-0.5 mx-4 ${a.connectorBg}` })
|
|
1734
|
+
] }, l.number)) }) });
|
|
1131
1735
|
}
|
|
1132
1736
|
export {
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1737
|
+
hr as Accordion,
|
|
1738
|
+
mr as Alert,
|
|
1739
|
+
Ge as Badge,
|
|
1740
|
+
Q as Button,
|
|
1741
|
+
dr as Card,
|
|
1742
|
+
fr as CheckboxGroup,
|
|
1743
|
+
Pe as ColorPalette,
|
|
1744
|
+
ir as Demo,
|
|
1745
|
+
xr as FormField,
|
|
1746
|
+
He as Input,
|
|
1747
|
+
gr as OptionCard,
|
|
1748
|
+
vr as RadioGroup,
|
|
1749
|
+
ur as Section,
|
|
1750
|
+
Je as Select,
|
|
1751
|
+
cr as Sidebar,
|
|
1752
|
+
Ze as Slider,
|
|
1753
|
+
Ye as SocialButton,
|
|
1754
|
+
pr as Stepper,
|
|
1755
|
+
br as TabBar,
|
|
1756
|
+
qe as TagInput,
|
|
1757
|
+
Xe as Textarea,
|
|
1758
|
+
Se as ThemeProvider,
|
|
1759
|
+
Fe as ThemeToggle,
|
|
1760
|
+
or as clearAllErrors,
|
|
1761
|
+
nr as clearFieldError,
|
|
1762
|
+
tr as getFirstError,
|
|
1763
|
+
Ee as hasErrors,
|
|
1764
|
+
lr as useForm,
|
|
1765
|
+
De as useTheme,
|
|
1766
|
+
$e as validateField,
|
|
1767
|
+
X as validateForm,
|
|
1768
|
+
ar as validators
|
|
1147
1769
|
};
|