@fabio.caffarello/react-design-system 1.3.2 → 1.4.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/index.cjs +4 -4
- package/dist/index.js +535 -352
- package/dist/ui/atoms/Skeleton/Skeleton.d.ts +20 -0
- package/dist/ui/atoms/Skeleton/Skeleton.stories.d.ts +24 -0
- package/dist/ui/atoms/Skeleton/Skeleton.test.d.ts +1 -0
- package/dist/ui/atoms/Tooltip/Tooltip.d.ts +21 -0
- package/dist/ui/atoms/Tooltip/Tooltip.stories.d.ts +23 -0
- package/dist/ui/atoms/Tooltip/Tooltip.test.d.ts +1 -0
- package/dist/ui/atoms/index.d.ts +4 -0
- package/dist/ui/molecules/Dropdown/Dropdown.d.ts +31 -0
- package/dist/ui/molecules/Dropdown/Dropdown.stories.d.ts +25 -0
- package/dist/ui/molecules/Dropdown/Dropdown.test.d.ts +1 -0
- package/dist/ui/molecules/EmptyState/EmptyState.d.ts +26 -0
- package/dist/ui/molecules/EmptyState/EmptyState.stories.d.ts +21 -0
- package/dist/ui/molecules/EmptyState/EmptyState.test.d.ts +1 -0
- package/dist/ui/molecules/index.d.ts +4 -0
- package/package.json +1 -1
- package/src/ui/atoms/Skeleton/Skeleton.stories.tsx +61 -0
- package/src/ui/atoms/Skeleton/Skeleton.test.tsx +40 -0
- package/src/ui/atoms/Skeleton/Skeleton.tsx +70 -0
- package/src/ui/atoms/Tooltip/Tooltip.stories.tsx +60 -0
- package/src/ui/atoms/Tooltip/Tooltip.test.tsx +53 -0
- package/src/ui/atoms/Tooltip/Tooltip.tsx +87 -0
- package/src/ui/atoms/index.ts +6 -0
- package/src/ui/molecules/Dropdown/Dropdown.stories.tsx +58 -0
- package/src/ui/molecules/Dropdown/Dropdown.test.tsx +73 -0
- package/src/ui/molecules/Dropdown/Dropdown.tsx +125 -0
- package/src/ui/molecules/EmptyState/EmptyState.stories.tsx +63 -0
- package/src/ui/molecules/EmptyState/EmptyState.test.tsx +55 -0
- package/src/ui/molecules/EmptyState/EmptyState.tsx +81 -0
- package/src/ui/molecules/index.ts +6 -0
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { createPortal as
|
|
3
|
-
var
|
|
1
|
+
import le, { useState as M, useRef as Y, useEffect as z } from "react";
|
|
2
|
+
import { createPortal as oe } from "react-dom";
|
|
3
|
+
var A = { exports: {} }, _ = {};
|
|
4
4
|
/**
|
|
5
5
|
* @license React
|
|
6
6
|
* react-jsx-runtime.production.js
|
|
@@ -10,29 +10,29 @@ var S = { exports: {} }, _ = {};
|
|
|
10
10
|
* This source code is licensed under the MIT license found in the
|
|
11
11
|
* LICENSE file in the root directory of this source tree.
|
|
12
12
|
*/
|
|
13
|
-
var
|
|
14
|
-
function
|
|
15
|
-
if (
|
|
16
|
-
|
|
17
|
-
var
|
|
13
|
+
var J;
|
|
14
|
+
function ie() {
|
|
15
|
+
if (J) return _;
|
|
16
|
+
J = 1;
|
|
17
|
+
var t = Symbol.for("react.transitional.element"), s = Symbol.for("react.fragment");
|
|
18
18
|
function a(n, l, o) {
|
|
19
|
-
var
|
|
20
|
-
if (o !== void 0 && (
|
|
19
|
+
var i = null;
|
|
20
|
+
if (o !== void 0 && (i = "" + o), l.key !== void 0 && (i = "" + l.key), "key" in l) {
|
|
21
21
|
o = {};
|
|
22
|
-
for (var
|
|
23
|
-
|
|
22
|
+
for (var c in l)
|
|
23
|
+
c !== "key" && (o[c] = l[c]);
|
|
24
24
|
} else o = l;
|
|
25
25
|
return l = o.ref, {
|
|
26
|
-
$$typeof:
|
|
26
|
+
$$typeof: t,
|
|
27
27
|
type: n,
|
|
28
|
-
key:
|
|
28
|
+
key: i,
|
|
29
29
|
ref: l !== void 0 ? l : null,
|
|
30
30
|
props: o
|
|
31
31
|
};
|
|
32
32
|
}
|
|
33
|
-
return _.Fragment =
|
|
33
|
+
return _.Fragment = s, _.jsx = a, _.jsxs = a, _;
|
|
34
34
|
}
|
|
35
|
-
var
|
|
35
|
+
var C = {};
|
|
36
36
|
/**
|
|
37
37
|
* @license React
|
|
38
38
|
* react-jsx-runtime.development.js
|
|
@@ -42,79 +42,79 @@ var R = {};
|
|
|
42
42
|
* This source code is licensed under the MIT license found in the
|
|
43
43
|
* LICENSE file in the root directory of this source tree.
|
|
44
44
|
*/
|
|
45
|
-
var
|
|
46
|
-
function
|
|
47
|
-
return
|
|
48
|
-
function
|
|
45
|
+
var G;
|
|
46
|
+
function ce() {
|
|
47
|
+
return G || (G = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
48
|
+
function t(e) {
|
|
49
49
|
if (e == null) return null;
|
|
50
50
|
if (typeof e == "function")
|
|
51
|
-
return e.$$typeof ===
|
|
51
|
+
return e.$$typeof === se ? null : e.displayName || e.name || null;
|
|
52
52
|
if (typeof e == "string") return e;
|
|
53
53
|
switch (e) {
|
|
54
|
-
case d:
|
|
55
|
-
return "Fragment";
|
|
56
54
|
case f:
|
|
55
|
+
return "Fragment";
|
|
56
|
+
case b:
|
|
57
57
|
return "Profiler";
|
|
58
|
-
case
|
|
58
|
+
case k:
|
|
59
59
|
return "StrictMode";
|
|
60
|
-
case
|
|
60
|
+
case K:
|
|
61
61
|
return "Suspense";
|
|
62
|
-
case Q:
|
|
63
|
-
return "SuspenseList";
|
|
64
62
|
case ee:
|
|
63
|
+
return "SuspenseList";
|
|
64
|
+
case te:
|
|
65
65
|
return "Activity";
|
|
66
66
|
}
|
|
67
67
|
if (typeof e == "object")
|
|
68
68
|
switch (typeof e.tag == "number" && console.error(
|
|
69
69
|
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
70
70
|
), e.$$typeof) {
|
|
71
|
-
case
|
|
71
|
+
case w:
|
|
72
72
|
return "Portal";
|
|
73
|
-
case
|
|
73
|
+
case Z:
|
|
74
74
|
return e.displayName || "Context";
|
|
75
75
|
case T:
|
|
76
76
|
return (e._context.displayName || "Context") + ".Consumer";
|
|
77
|
-
case
|
|
78
|
-
var
|
|
79
|
-
return e = e.displayName, e || (e =
|
|
80
|
-
case
|
|
81
|
-
return
|
|
77
|
+
case Q:
|
|
78
|
+
var d = e.render;
|
|
79
|
+
return e = e.displayName, e || (e = d.displayName || d.name || "", e = e !== "" ? "ForwardRef(" + e + ")" : "ForwardRef"), e;
|
|
80
|
+
case re:
|
|
81
|
+
return d = e.displayName || null, d !== null ? d : t(e.type) || "Memo";
|
|
82
82
|
case O:
|
|
83
|
-
|
|
83
|
+
d = e._payload, e = e._init;
|
|
84
84
|
try {
|
|
85
|
-
return
|
|
85
|
+
return t(e(d));
|
|
86
86
|
} catch {
|
|
87
87
|
}
|
|
88
88
|
}
|
|
89
89
|
return null;
|
|
90
90
|
}
|
|
91
|
-
function
|
|
91
|
+
function s(e) {
|
|
92
92
|
return "" + e;
|
|
93
93
|
}
|
|
94
94
|
function a(e) {
|
|
95
95
|
try {
|
|
96
|
-
|
|
97
|
-
var
|
|
96
|
+
s(e);
|
|
97
|
+
var d = !1;
|
|
98
98
|
} catch {
|
|
99
|
-
|
|
99
|
+
d = !0;
|
|
100
100
|
}
|
|
101
|
-
if (
|
|
102
|
-
|
|
103
|
-
var
|
|
104
|
-
return
|
|
105
|
-
|
|
101
|
+
if (d) {
|
|
102
|
+
d = console;
|
|
103
|
+
var p = d.error, v = typeof Symbol == "function" && Symbol.toStringTag && e[Symbol.toStringTag] || e.constructor.name || "Object";
|
|
104
|
+
return p.call(
|
|
105
|
+
d,
|
|
106
106
|
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
107
|
-
|
|
108
|
-
),
|
|
107
|
+
v
|
|
108
|
+
), s(e);
|
|
109
109
|
}
|
|
110
110
|
}
|
|
111
111
|
function n(e) {
|
|
112
|
-
if (e ===
|
|
112
|
+
if (e === f) return "<>";
|
|
113
113
|
if (typeof e == "object" && e !== null && e.$$typeof === O)
|
|
114
114
|
return "<...>";
|
|
115
115
|
try {
|
|
116
|
-
var
|
|
117
|
-
return
|
|
116
|
+
var d = t(e);
|
|
117
|
+
return d ? "<" + d + ">" : "<...>";
|
|
118
118
|
} catch {
|
|
119
119
|
return "<...>";
|
|
120
120
|
}
|
|
@@ -126,42 +126,42 @@ function oe() {
|
|
|
126
126
|
function o() {
|
|
127
127
|
return Error("react-stack-top-frame");
|
|
128
128
|
}
|
|
129
|
-
function
|
|
130
|
-
if (
|
|
131
|
-
var
|
|
132
|
-
if (
|
|
129
|
+
function i(e) {
|
|
130
|
+
if (D.call(e, "key")) {
|
|
131
|
+
var d = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
132
|
+
if (d && d.isReactWarning) return !1;
|
|
133
133
|
}
|
|
134
134
|
return e.key !== void 0;
|
|
135
135
|
}
|
|
136
|
-
function
|
|
137
|
-
function
|
|
138
|
-
|
|
136
|
+
function c(e, d) {
|
|
137
|
+
function p() {
|
|
138
|
+
W || (W = !0, console.error(
|
|
139
139
|
"%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)",
|
|
140
|
-
|
|
140
|
+
d
|
|
141
141
|
));
|
|
142
142
|
}
|
|
143
|
-
|
|
144
|
-
get:
|
|
143
|
+
p.isReactWarning = !0, Object.defineProperty(e, "key", {
|
|
144
|
+
get: p,
|
|
145
145
|
configurable: !0
|
|
146
146
|
});
|
|
147
147
|
}
|
|
148
|
-
function
|
|
149
|
-
var e =
|
|
150
|
-
return
|
|
148
|
+
function u() {
|
|
149
|
+
var e = t(this.type);
|
|
150
|
+
return P[e] || (P[e] = !0, console.error(
|
|
151
151
|
"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."
|
|
152
152
|
)), e = this.props.ref, e !== void 0 ? e : null;
|
|
153
153
|
}
|
|
154
|
-
function
|
|
155
|
-
var
|
|
154
|
+
function h(e, d, p, v, S, B) {
|
|
155
|
+
var g = p.ref;
|
|
156
156
|
return e = {
|
|
157
|
-
$$typeof:
|
|
157
|
+
$$typeof: N,
|
|
158
158
|
type: e,
|
|
159
|
-
key:
|
|
160
|
-
props:
|
|
161
|
-
_owner:
|
|
162
|
-
}, (
|
|
159
|
+
key: d,
|
|
160
|
+
props: p,
|
|
161
|
+
_owner: v
|
|
162
|
+
}, (g !== void 0 ? g : null) !== null ? Object.defineProperty(e, "ref", {
|
|
163
163
|
enumerable: !1,
|
|
164
|
-
get:
|
|
164
|
+
get: u
|
|
165
165
|
}) : Object.defineProperty(e, "ref", { enumerable: !1, value: null }), e._store = {}, Object.defineProperty(e._store, "validated", {
|
|
166
166
|
configurable: !1,
|
|
167
167
|
enumerable: !1,
|
|
@@ -176,7 +176,7 @@ function oe() {
|
|
|
176
176
|
configurable: !1,
|
|
177
177
|
enumerable: !1,
|
|
178
178
|
writable: !0,
|
|
179
|
-
value:
|
|
179
|
+
value: S
|
|
180
180
|
}), Object.defineProperty(e, "_debugTask", {
|
|
181
181
|
configurable: !1,
|
|
182
182
|
enumerable: !1,
|
|
@@ -184,103 +184,103 @@ function oe() {
|
|
|
184
184
|
value: B
|
|
185
185
|
}), Object.freeze && (Object.freeze(e.props), Object.freeze(e)), e;
|
|
186
186
|
}
|
|
187
|
-
function
|
|
188
|
-
var
|
|
189
|
-
if (
|
|
190
|
-
if (
|
|
191
|
-
if (
|
|
192
|
-
for (
|
|
193
|
-
|
|
194
|
-
Object.freeze && Object.freeze(
|
|
187
|
+
function y(e, d, p, v, S, B) {
|
|
188
|
+
var g = d.children;
|
|
189
|
+
if (g !== void 0)
|
|
190
|
+
if (v)
|
|
191
|
+
if (ae(g)) {
|
|
192
|
+
for (v = 0; v < g.length; v++)
|
|
193
|
+
m(g[v]);
|
|
194
|
+
Object.freeze && Object.freeze(g);
|
|
195
195
|
} else
|
|
196
196
|
console.error(
|
|
197
197
|
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
198
198
|
);
|
|
199
|
-
else
|
|
200
|
-
if (
|
|
201
|
-
|
|
202
|
-
var E = Object.keys(
|
|
203
|
-
return
|
|
199
|
+
else m(g);
|
|
200
|
+
if (D.call(d, "key")) {
|
|
201
|
+
g = t(e);
|
|
202
|
+
var E = Object.keys(d).filter(function(ne) {
|
|
203
|
+
return ne !== "key";
|
|
204
204
|
});
|
|
205
|
-
|
|
205
|
+
v = 0 < E.length ? "{key: someKey, " + E.join(": ..., ") + ": ...}" : "{key: someKey}", U[g + v] || (E = 0 < E.length ? "{" + E.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
206
206
|
`A props object containing a "key" prop is being spread into JSX:
|
|
207
207
|
let props = %s;
|
|
208
208
|
<%s {...props} />
|
|
209
209
|
React keys must be passed directly to JSX without using spread:
|
|
210
210
|
let props = %s;
|
|
211
211
|
<%s key={someKey} {...props} />`,
|
|
212
|
-
|
|
213
|
-
|
|
212
|
+
v,
|
|
213
|
+
g,
|
|
214
214
|
E,
|
|
215
|
-
|
|
216
|
-
),
|
|
215
|
+
g
|
|
216
|
+
), U[g + v] = !0);
|
|
217
217
|
}
|
|
218
|
-
if (
|
|
219
|
-
|
|
220
|
-
for (var
|
|
221
|
-
|
|
222
|
-
} else
|
|
223
|
-
return
|
|
224
|
-
|
|
218
|
+
if (g = null, p !== void 0 && (a(p), g = "" + p), i(d) && (a(d.key), g = "" + d.key), "key" in d) {
|
|
219
|
+
p = {};
|
|
220
|
+
for (var I in d)
|
|
221
|
+
I !== "key" && (p[I] = d[I]);
|
|
222
|
+
} else p = d;
|
|
223
|
+
return g && c(
|
|
224
|
+
p,
|
|
225
225
|
typeof e == "function" ? e.displayName || e.name || "Unknown" : e
|
|
226
|
-
),
|
|
226
|
+
), h(
|
|
227
227
|
e,
|
|
228
|
-
|
|
229
|
-
|
|
228
|
+
g,
|
|
229
|
+
p,
|
|
230
230
|
l(),
|
|
231
|
-
|
|
231
|
+
S,
|
|
232
232
|
B
|
|
233
233
|
);
|
|
234
234
|
}
|
|
235
|
-
function
|
|
235
|
+
function m(e) {
|
|
236
236
|
x(e) ? e._store && (e._store.validated = 1) : typeof e == "object" && e !== null && e.$$typeof === O && (e._payload.status === "fulfilled" ? x(e._payload.value) && e._payload.value._store && (e._payload.value._store.validated = 1) : e._store && (e._store.validated = 1));
|
|
237
237
|
}
|
|
238
238
|
function x(e) {
|
|
239
|
-
return typeof e == "object" && e !== null && e.$$typeof ===
|
|
239
|
+
return typeof e == "object" && e !== null && e.$$typeof === N;
|
|
240
240
|
}
|
|
241
|
-
var
|
|
241
|
+
var j = le, N = Symbol.for("react.transitional.element"), w = Symbol.for("react.portal"), f = Symbol.for("react.fragment"), k = Symbol.for("react.strict_mode"), b = Symbol.for("react.profiler"), T = Symbol.for("react.consumer"), Z = Symbol.for("react.context"), Q = Symbol.for("react.forward_ref"), K = Symbol.for("react.suspense"), ee = Symbol.for("react.suspense_list"), re = Symbol.for("react.memo"), O = Symbol.for("react.lazy"), te = Symbol.for("react.activity"), se = Symbol.for("react.client.reference"), L = j.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, D = Object.prototype.hasOwnProperty, ae = Array.isArray, $ = console.createTask ? console.createTask : function() {
|
|
242
242
|
return null;
|
|
243
243
|
};
|
|
244
|
-
|
|
244
|
+
j = {
|
|
245
245
|
react_stack_bottom_frame: function(e) {
|
|
246
246
|
return e();
|
|
247
247
|
}
|
|
248
248
|
};
|
|
249
|
-
var
|
|
250
|
-
|
|
249
|
+
var W, P = {}, V = j.react_stack_bottom_frame.bind(
|
|
250
|
+
j,
|
|
251
251
|
o
|
|
252
|
-
)(),
|
|
253
|
-
|
|
254
|
-
var
|
|
255
|
-
return
|
|
252
|
+
)(), q = $(n(o)), U = {};
|
|
253
|
+
C.Fragment = f, C.jsx = function(e, d, p) {
|
|
254
|
+
var v = 1e4 > L.recentlyCreatedOwnerStacks++;
|
|
255
|
+
return y(
|
|
256
256
|
e,
|
|
257
|
-
|
|
258
|
-
|
|
257
|
+
d,
|
|
258
|
+
p,
|
|
259
259
|
!1,
|
|
260
|
-
|
|
261
|
-
|
|
260
|
+
v ? Error("react-stack-top-frame") : V,
|
|
261
|
+
v ? $(n(e)) : q
|
|
262
262
|
);
|
|
263
|
-
},
|
|
264
|
-
var
|
|
265
|
-
return
|
|
263
|
+
}, C.jsxs = function(e, d, p) {
|
|
264
|
+
var v = 1e4 > L.recentlyCreatedOwnerStacks++;
|
|
265
|
+
return y(
|
|
266
266
|
e,
|
|
267
|
-
|
|
268
|
-
|
|
267
|
+
d,
|
|
268
|
+
p,
|
|
269
269
|
!0,
|
|
270
|
-
|
|
271
|
-
|
|
270
|
+
v ? Error("react-stack-top-frame") : V,
|
|
271
|
+
v ? $(n(e)) : q
|
|
272
272
|
);
|
|
273
273
|
};
|
|
274
|
-
})()),
|
|
274
|
+
})()), C;
|
|
275
275
|
}
|
|
276
|
-
var
|
|
277
|
-
function
|
|
278
|
-
return
|
|
276
|
+
var X;
|
|
277
|
+
function de() {
|
|
278
|
+
return X || (X = 1, process.env.NODE_ENV === "production" ? A.exports = ie() : A.exports = ce()), A.exports;
|
|
279
279
|
}
|
|
280
|
-
var r =
|
|
281
|
-
function
|
|
282
|
-
const n = [
|
|
283
|
-
switch (
|
|
280
|
+
var r = de();
|
|
281
|
+
function he({ variant: t = "info", className: s, ...a }) {
|
|
282
|
+
const n = [s || ""];
|
|
283
|
+
switch (t) {
|
|
284
284
|
case "warning": {
|
|
285
285
|
n.push("bg-yellow-100 text-yellow-800 border-yellow-500");
|
|
286
286
|
break;
|
|
@@ -304,37 +304,37 @@ function xe({ variant: s = "info", className: t, ...a }) {
|
|
|
304
304
|
}
|
|
305
305
|
);
|
|
306
306
|
}
|
|
307
|
-
function
|
|
308
|
-
variant:
|
|
309
|
-
bold:
|
|
307
|
+
function F({
|
|
308
|
+
variant: t,
|
|
309
|
+
bold: s,
|
|
310
310
|
italic: a,
|
|
311
311
|
className: n,
|
|
312
312
|
as: l,
|
|
313
313
|
color: o,
|
|
314
|
-
...
|
|
314
|
+
...i
|
|
315
315
|
}) {
|
|
316
|
-
const
|
|
317
|
-
let
|
|
316
|
+
const c = [n];
|
|
317
|
+
let u;
|
|
318
318
|
if (l)
|
|
319
|
-
|
|
319
|
+
u = l;
|
|
320
320
|
else
|
|
321
|
-
switch (
|
|
321
|
+
switch (t) {
|
|
322
322
|
case "heading":
|
|
323
|
-
|
|
323
|
+
u = "h2";
|
|
324
324
|
break;
|
|
325
325
|
case "list":
|
|
326
|
-
|
|
326
|
+
u = "li";
|
|
327
327
|
break;
|
|
328
328
|
case "paragraph":
|
|
329
329
|
default:
|
|
330
|
-
|
|
330
|
+
u = "p";
|
|
331
331
|
break;
|
|
332
332
|
}
|
|
333
|
-
return
|
|
333
|
+
return s && c.push("font-bold"), a && c.push("italic"), o && c.push(`text-${o}`), /* @__PURE__ */ r.jsx(u, { className: c.join(" "), ...i });
|
|
334
334
|
}
|
|
335
|
-
function
|
|
335
|
+
function ue({ className: t, ...s }) {
|
|
336
336
|
const a = [
|
|
337
|
-
|
|
337
|
+
t,
|
|
338
338
|
"px-large",
|
|
339
339
|
"border",
|
|
340
340
|
"border-1",
|
|
@@ -344,22 +344,22 @@ function de({ className: s, ...t }) {
|
|
|
344
344
|
"h-form-element",
|
|
345
345
|
"text-base"
|
|
346
346
|
];
|
|
347
|
-
return /* @__PURE__ */ r.jsx("input", { className: a.join(" "), ...
|
|
347
|
+
return /* @__PURE__ */ r.jsx("input", { className: a.join(" "), ...s });
|
|
348
348
|
}
|
|
349
|
-
function
|
|
350
|
-
className:
|
|
351
|
-
variant:
|
|
349
|
+
function R({
|
|
350
|
+
className: t,
|
|
351
|
+
variant: s = "regular",
|
|
352
352
|
...a
|
|
353
353
|
}) {
|
|
354
354
|
const n = [
|
|
355
|
-
|
|
355
|
+
t,
|
|
356
356
|
"rounded",
|
|
357
357
|
"h-form-element",
|
|
358
358
|
"lh-form-element",
|
|
359
359
|
"px-large",
|
|
360
360
|
"text-base"
|
|
361
361
|
];
|
|
362
|
-
switch (
|
|
362
|
+
switch (s) {
|
|
363
363
|
case "error":
|
|
364
364
|
n.push("bg-red-light", "text-red-dark", "font-bold");
|
|
365
365
|
break;
|
|
@@ -373,13 +373,13 @@ function A({
|
|
|
373
373
|
}
|
|
374
374
|
return /* @__PURE__ */ r.jsx("button", { className: n.join(" "), ...a });
|
|
375
375
|
}
|
|
376
|
-
function
|
|
377
|
-
const a = [
|
|
378
|
-
return /* @__PURE__ */ r.jsx("div", { className: a.join(" "), ...
|
|
376
|
+
function fe({ className: t, ...s }) {
|
|
377
|
+
const a = [t, "p-large", "bg-bg", "rounded", "shadow-card"];
|
|
378
|
+
return /* @__PURE__ */ r.jsx("div", { className: a.join(" "), ...s });
|
|
379
379
|
}
|
|
380
380
|
function pe({
|
|
381
|
-
variant:
|
|
382
|
-
className:
|
|
381
|
+
variant: t = "neutral",
|
|
382
|
+
className: s = "",
|
|
383
383
|
children: a,
|
|
384
384
|
...n
|
|
385
385
|
}) {
|
|
@@ -398,25 +398,25 @@ function pe({
|
|
|
398
398
|
error: "bg-red-100 text-red-800 border-red-500",
|
|
399
399
|
info: "bg-blue-100 text-blue-800 border-blue-500",
|
|
400
400
|
neutral: "bg-gray-100 text-gray-800 border-gray-500"
|
|
401
|
-
},
|
|
401
|
+
}, i = [
|
|
402
402
|
...l,
|
|
403
|
-
o[
|
|
404
|
-
|
|
403
|
+
o[t],
|
|
404
|
+
s
|
|
405
405
|
].filter(Boolean).join(" ");
|
|
406
406
|
return /* @__PURE__ */ r.jsx(
|
|
407
407
|
"span",
|
|
408
408
|
{
|
|
409
409
|
role: "status",
|
|
410
410
|
"aria-label": typeof a == "string" ? a : void 0,
|
|
411
|
-
className:
|
|
411
|
+
className: i,
|
|
412
412
|
...n,
|
|
413
413
|
children: a
|
|
414
414
|
}
|
|
415
415
|
);
|
|
416
416
|
}
|
|
417
|
-
function
|
|
418
|
-
options:
|
|
419
|
-
placeholder:
|
|
417
|
+
function ve({
|
|
418
|
+
options: t,
|
|
419
|
+
placeholder: s,
|
|
420
420
|
error: a = !1,
|
|
421
421
|
className: n = "",
|
|
422
422
|
...l
|
|
@@ -432,36 +432,36 @@ function he({
|
|
|
432
432
|
"focus:outline-none",
|
|
433
433
|
"focus:ring-2",
|
|
434
434
|
"focus:ring-offset-2"
|
|
435
|
-
],
|
|
435
|
+
], i = a ? "border-red-500 focus:ring-red-500" : "border-gray-300 focus:ring-indigo-500", c = [
|
|
436
436
|
...o,
|
|
437
|
-
|
|
437
|
+
i,
|
|
438
438
|
n
|
|
439
439
|
].filter(Boolean).join(" ");
|
|
440
440
|
return /* @__PURE__ */ r.jsxs(
|
|
441
441
|
"select",
|
|
442
442
|
{
|
|
443
|
-
className:
|
|
443
|
+
className: c,
|
|
444
444
|
"aria-invalid": a,
|
|
445
445
|
"aria-describedby": a ? `${l.id}-error` : void 0,
|
|
446
446
|
...l,
|
|
447
447
|
children: [
|
|
448
|
-
|
|
449
|
-
|
|
448
|
+
s && /* @__PURE__ */ r.jsx("option", { value: "", disabled: !0, children: s }),
|
|
449
|
+
t.map((u) => /* @__PURE__ */ r.jsx(
|
|
450
450
|
"option",
|
|
451
451
|
{
|
|
452
|
-
value:
|
|
453
|
-
disabled:
|
|
454
|
-
children:
|
|
452
|
+
value: u.value,
|
|
453
|
+
disabled: u.disabled,
|
|
454
|
+
children: u.label
|
|
455
455
|
},
|
|
456
|
-
|
|
456
|
+
u.value
|
|
457
457
|
))
|
|
458
458
|
]
|
|
459
459
|
}
|
|
460
460
|
);
|
|
461
461
|
}
|
|
462
|
-
function
|
|
463
|
-
error:
|
|
464
|
-
resize:
|
|
462
|
+
function ge({
|
|
463
|
+
error: t = !1,
|
|
464
|
+
resize: s = "vertical",
|
|
465
465
|
className: a = "",
|
|
466
466
|
...n
|
|
467
467
|
}) {
|
|
@@ -481,25 +481,25 @@ function ve({
|
|
|
481
481
|
both: "resize",
|
|
482
482
|
horizontal: "resize-x",
|
|
483
483
|
vertical: "resize-y"
|
|
484
|
-
},
|
|
484
|
+
}, i = t ? "border-red-500 focus:ring-red-500" : "border-gray-300 focus:ring-indigo-500", c = [
|
|
485
485
|
...l,
|
|
486
|
-
o[
|
|
487
|
-
|
|
486
|
+
o[s],
|
|
487
|
+
i,
|
|
488
488
|
a
|
|
489
489
|
].filter(Boolean).join(" ");
|
|
490
490
|
return /* @__PURE__ */ r.jsx(
|
|
491
491
|
"textarea",
|
|
492
492
|
{
|
|
493
|
-
className:
|
|
494
|
-
"aria-invalid":
|
|
495
|
-
"aria-describedby":
|
|
493
|
+
className: c,
|
|
494
|
+
"aria-invalid": t,
|
|
495
|
+
"aria-describedby": t && n.id ? `${n.id}-error` : void 0,
|
|
496
496
|
...n
|
|
497
497
|
}
|
|
498
498
|
);
|
|
499
499
|
}
|
|
500
|
-
function
|
|
501
|
-
variant:
|
|
502
|
-
className:
|
|
500
|
+
function ye({
|
|
501
|
+
variant: t = "default",
|
|
502
|
+
className: s = "",
|
|
503
503
|
children: a,
|
|
504
504
|
...n
|
|
505
505
|
}) {
|
|
@@ -512,16 +512,16 @@ function ge({
|
|
|
512
512
|
default: "",
|
|
513
513
|
required: "after:content-['*'] after:ml-0.5 after:text-red-500",
|
|
514
514
|
optional: "after:content-['(optional)'] after:ml-1 after:text-gray-400 after:font-normal"
|
|
515
|
-
},
|
|
515
|
+
}, i = [
|
|
516
516
|
...l,
|
|
517
|
-
o[
|
|
518
|
-
|
|
517
|
+
o[t],
|
|
518
|
+
s
|
|
519
519
|
].filter(Boolean).join(" ");
|
|
520
|
-
return /* @__PURE__ */ r.jsx("label", { className:
|
|
520
|
+
return /* @__PURE__ */ r.jsx("label", { className: i, ...n, children: a });
|
|
521
521
|
}
|
|
522
522
|
function je({
|
|
523
|
-
message:
|
|
524
|
-
id:
|
|
523
|
+
message: t,
|
|
524
|
+
id: s,
|
|
525
525
|
className: a = "",
|
|
526
526
|
...n
|
|
527
527
|
}) {
|
|
@@ -540,7 +540,7 @@ function je({
|
|
|
540
540
|
"div",
|
|
541
541
|
{
|
|
542
542
|
role: "alert",
|
|
543
|
-
id:
|
|
543
|
+
id: s,
|
|
544
544
|
className: o,
|
|
545
545
|
"aria-live": "polite",
|
|
546
546
|
...n,
|
|
@@ -562,14 +562,14 @@ function je({
|
|
|
562
562
|
)
|
|
563
563
|
}
|
|
564
564
|
),
|
|
565
|
-
/* @__PURE__ */ r.jsx("span", { children:
|
|
565
|
+
/* @__PURE__ */ r.jsx("span", { children: t })
|
|
566
566
|
]
|
|
567
567
|
}
|
|
568
568
|
);
|
|
569
569
|
}
|
|
570
|
-
function
|
|
571
|
-
variant:
|
|
572
|
-
className:
|
|
570
|
+
function me({
|
|
571
|
+
variant: t = "default",
|
|
572
|
+
className: s = "",
|
|
573
573
|
children: a,
|
|
574
574
|
...n
|
|
575
575
|
}) {
|
|
@@ -586,22 +586,108 @@ function fe({
|
|
|
586
586
|
default: "border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700",
|
|
587
587
|
active: "border-indigo-500 text-gray-900",
|
|
588
588
|
disabled: "border-transparent text-gray-300 cursor-not-allowed pointer-events-none"
|
|
589
|
-
},
|
|
589
|
+
}, i = [
|
|
590
590
|
...l,
|
|
591
|
-
o[
|
|
592
|
-
|
|
591
|
+
o[t],
|
|
592
|
+
s
|
|
593
593
|
].filter(Boolean).join(" ");
|
|
594
|
-
return
|
|
594
|
+
return t === "disabled" ? /* @__PURE__ */ r.jsx("span", { className: i, "aria-disabled": "true", children: a }) : /* @__PURE__ */ r.jsx("a", { className: i, ...n, children: a });
|
|
595
595
|
}
|
|
596
|
-
function
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
596
|
+
function Ne({
|
|
597
|
+
content: t,
|
|
598
|
+
children: s,
|
|
599
|
+
position: a = "top",
|
|
600
|
+
delay: n = 200,
|
|
601
|
+
className: l = "",
|
|
602
|
+
...o
|
|
603
|
+
}) {
|
|
604
|
+
const [i, c] = M(!1), [u, h] = M(null), y = () => {
|
|
605
|
+
const N = setTimeout(() => {
|
|
606
|
+
c(!0);
|
|
607
|
+
}, n);
|
|
608
|
+
h(N);
|
|
609
|
+
}, m = () => {
|
|
610
|
+
u && (clearTimeout(u), h(null)), c(!1);
|
|
611
|
+
}, x = {
|
|
612
|
+
top: "bottom-full left-1/2 transform -translate-x-1/2 mb-2",
|
|
613
|
+
bottom: "top-full left-1/2 transform -translate-x-1/2 mt-2",
|
|
614
|
+
left: "right-full top-1/2 transform -translate-y-1/2 mr-2",
|
|
615
|
+
right: "left-full top-1/2 transform -translate-y-1/2 ml-2"
|
|
616
|
+
}, j = {
|
|
617
|
+
top: "top-full left-1/2 transform -translate-x-1/2 border-t-gray-900",
|
|
618
|
+
bottom: "bottom-full left-1/2 transform -translate-x-1/2 border-b-gray-900",
|
|
619
|
+
left: "left-full top-1/2 transform -translate-y-1/2 border-l-gray-900",
|
|
620
|
+
right: "right-full top-1/2 transform -translate-y-1/2 border-r-gray-900"
|
|
621
|
+
};
|
|
622
|
+
return /* @__PURE__ */ r.jsxs(
|
|
623
|
+
"div",
|
|
624
|
+
{
|
|
625
|
+
className: `relative inline-block ${l}`,
|
|
626
|
+
onMouseEnter: y,
|
|
627
|
+
onMouseLeave: m,
|
|
628
|
+
...o,
|
|
629
|
+
children: [
|
|
630
|
+
s,
|
|
631
|
+
i && /* @__PURE__ */ r.jsxs(
|
|
632
|
+
"div",
|
|
633
|
+
{
|
|
634
|
+
className: `absolute z-50 px-2 py-1 text-xs text-white bg-gray-900 rounded shadow-lg whitespace-nowrap ${x[a]}`,
|
|
635
|
+
role: "tooltip",
|
|
636
|
+
children: [
|
|
637
|
+
t,
|
|
638
|
+
/* @__PURE__ */ r.jsx(
|
|
639
|
+
"div",
|
|
640
|
+
{
|
|
641
|
+
className: `absolute w-0 h-0 border-4 border-transparent ${j[a]}`
|
|
642
|
+
}
|
|
643
|
+
)
|
|
644
|
+
]
|
|
645
|
+
}
|
|
646
|
+
)
|
|
647
|
+
]
|
|
648
|
+
}
|
|
649
|
+
);
|
|
650
|
+
}
|
|
651
|
+
function we({
|
|
652
|
+
variant: t = "text",
|
|
653
|
+
width: s,
|
|
654
|
+
height: a,
|
|
655
|
+
lines: n = 1,
|
|
656
|
+
className: l = "",
|
|
657
|
+
...o
|
|
658
|
+
}) {
|
|
659
|
+
const i = [
|
|
660
|
+
"animate-pulse",
|
|
661
|
+
"bg-gray-200",
|
|
662
|
+
"rounded"
|
|
663
|
+
], c = {
|
|
664
|
+
text: "h-4",
|
|
665
|
+
card: "h-32",
|
|
666
|
+
list: "h-12",
|
|
667
|
+
circle: "rounded-full"
|
|
668
|
+
}, u = [
|
|
669
|
+
...i,
|
|
670
|
+
c[t],
|
|
671
|
+
l
|
|
672
|
+
].filter(Boolean).join(" "), h = {};
|
|
673
|
+
return s && (h.width = s), a && (h.height = a), t === "text" && n > 1 ? /* @__PURE__ */ r.jsx("div", { className: "space-y-2", ...o, children: Array.from({ length: n }).map((y, m) => /* @__PURE__ */ r.jsx(
|
|
674
|
+
"div",
|
|
675
|
+
{
|
|
676
|
+
className: u,
|
|
677
|
+
style: m === n - 1 ? { width: "75%" } : h
|
|
678
|
+
},
|
|
679
|
+
m
|
|
680
|
+
)) }) : /* @__PURE__ */ r.jsx("div", { className: u, style: h, ...o });
|
|
681
|
+
}
|
|
682
|
+
function H({ label: t, ...s }) {
|
|
683
|
+
return s.id || console.error("InputWithLabel component requires an id prop"), /* @__PURE__ */ r.jsxs("div", { className: "mb-medium grid gap-small", children: [
|
|
684
|
+
/* @__PURE__ */ r.jsx(F, { as: "label", htmlFor: s.id, className: "cursor-pointer", children: t }),
|
|
685
|
+
/* @__PURE__ */ r.jsx(ue, { ...s })
|
|
600
686
|
] });
|
|
601
687
|
}
|
|
602
|
-
function
|
|
603
|
-
variant:
|
|
604
|
-
padding:
|
|
688
|
+
function ke({
|
|
689
|
+
variant: t = "default",
|
|
690
|
+
padding: s = "medium",
|
|
605
691
|
className: a = "",
|
|
606
692
|
children: n,
|
|
607
693
|
...l
|
|
@@ -612,49 +698,49 @@ function ye({
|
|
|
612
698
|
"border",
|
|
613
699
|
"border-gray-200",
|
|
614
700
|
"shadow-sm"
|
|
615
|
-
],
|
|
701
|
+
], i = {
|
|
616
702
|
default: "",
|
|
617
703
|
hover: "hover:shadow-md transition-shadow cursor-pointer",
|
|
618
704
|
selected: "border-indigo-500 shadow-md"
|
|
619
|
-
},
|
|
705
|
+
}, c = {
|
|
620
706
|
none: "",
|
|
621
707
|
small: "p-2",
|
|
622
708
|
medium: "p-4",
|
|
623
709
|
large: "p-6"
|
|
624
|
-
},
|
|
710
|
+
}, u = [
|
|
625
711
|
...o,
|
|
712
|
+
i[t],
|
|
626
713
|
c[s],
|
|
627
|
-
u[t],
|
|
628
714
|
a
|
|
629
715
|
].filter(Boolean).join(" ");
|
|
630
|
-
return /* @__PURE__ */ r.jsx("div", { className:
|
|
716
|
+
return /* @__PURE__ */ r.jsx("div", { className: u, ...l, children: n });
|
|
631
717
|
}
|
|
632
|
-
function
|
|
633
|
-
children:
|
|
634
|
-
onSubmit:
|
|
718
|
+
function Ee({
|
|
719
|
+
children: t,
|
|
720
|
+
onSubmit: s,
|
|
635
721
|
loading: a = !1,
|
|
636
722
|
error: n = null,
|
|
637
723
|
success: l = null,
|
|
638
724
|
className: o = "",
|
|
639
|
-
...
|
|
725
|
+
...i
|
|
640
726
|
}) {
|
|
641
|
-
const
|
|
727
|
+
const u = [
|
|
642
728
|
...[
|
|
643
729
|
"space-y-4"
|
|
644
730
|
],
|
|
645
731
|
o
|
|
646
|
-
].filter(Boolean).join(" "),
|
|
647
|
-
|
|
732
|
+
].filter(Boolean).join(" "), h = (y) => {
|
|
733
|
+
y.preventDefault(), s && !a && s(y);
|
|
648
734
|
};
|
|
649
735
|
return /* @__PURE__ */ r.jsxs(
|
|
650
736
|
"form",
|
|
651
737
|
{
|
|
652
|
-
className:
|
|
653
|
-
onSubmit:
|
|
738
|
+
className: u,
|
|
739
|
+
onSubmit: h,
|
|
654
740
|
noValidate: !0,
|
|
655
|
-
...
|
|
741
|
+
...i,
|
|
656
742
|
children: [
|
|
657
|
-
|
|
743
|
+
t,
|
|
658
744
|
n && /* @__PURE__ */ r.jsx(
|
|
659
745
|
"div",
|
|
660
746
|
{
|
|
@@ -675,9 +761,9 @@ function Ne({
|
|
|
675
761
|
}
|
|
676
762
|
);
|
|
677
763
|
}
|
|
678
|
-
function
|
|
679
|
-
items:
|
|
680
|
-
separator:
|
|
764
|
+
function _e({
|
|
765
|
+
items: t,
|
|
766
|
+
separator: s = "/",
|
|
681
767
|
className: a = "",
|
|
682
768
|
...n
|
|
683
769
|
}) {
|
|
@@ -690,51 +776,51 @@ function ke({
|
|
|
690
776
|
],
|
|
691
777
|
a
|
|
692
778
|
].filter(Boolean).join(" ");
|
|
693
|
-
return /* @__PURE__ */ r.jsx("nav", { "aria-label": "Breadcrumb", className: o, ...n, children: /* @__PURE__ */ r.jsx("ol", { className: "flex items-center space-x-2", children:
|
|
694
|
-
const
|
|
779
|
+
return /* @__PURE__ */ r.jsx("nav", { "aria-label": "Breadcrumb", className: o, ...n, children: /* @__PURE__ */ r.jsx("ol", { className: "flex items-center space-x-2", children: t.map((i, c) => {
|
|
780
|
+
const u = c === t.length - 1;
|
|
695
781
|
return /* @__PURE__ */ r.jsxs("li", { className: "flex items-center", children: [
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
] },
|
|
782
|
+
c > 0 && /* @__PURE__ */ r.jsx("span", { className: "mx-2 text-gray-400", "aria-hidden": "true", children: s }),
|
|
783
|
+
u ? /* @__PURE__ */ r.jsx("span", { className: "text-gray-900 font-medium", "aria-current": "page", children: i.label }) : i.href ? /* @__PURE__ */ r.jsx(me, { href: i.href, variant: "default", children: i.label }) : /* @__PURE__ */ r.jsx("span", { className: "text-gray-500", children: i.label })
|
|
784
|
+
] }, c);
|
|
699
785
|
}) }) });
|
|
700
786
|
}
|
|
701
|
-
function
|
|
702
|
-
currentPage:
|
|
703
|
-
totalPages:
|
|
787
|
+
function Ce({
|
|
788
|
+
currentPage: t,
|
|
789
|
+
totalPages: s,
|
|
704
790
|
onPageChange: a,
|
|
705
791
|
totalItems: n,
|
|
706
792
|
itemsPerPage: l,
|
|
707
793
|
showPageInfo: o = !0,
|
|
708
|
-
className:
|
|
709
|
-
...
|
|
794
|
+
className: i = "",
|
|
795
|
+
...c
|
|
710
796
|
}) {
|
|
711
|
-
const
|
|
712
|
-
|
|
713
|
-
},
|
|
714
|
-
|
|
715
|
-
},
|
|
716
|
-
|
|
717
|
-
},
|
|
718
|
-
const
|
|
719
|
-
if (
|
|
720
|
-
for (let
|
|
721
|
-
|
|
722
|
-
else if (
|
|
723
|
-
for (let
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
} else if (
|
|
727
|
-
|
|
728
|
-
for (let
|
|
729
|
-
|
|
797
|
+
const u = () => {
|
|
798
|
+
t > 1 && a(t - 1);
|
|
799
|
+
}, h = () => {
|
|
800
|
+
t < s && a(t + 1);
|
|
801
|
+
}, y = (f) => {
|
|
802
|
+
f >= 1 && f <= s && f !== t && a(f);
|
|
803
|
+
}, m = () => {
|
|
804
|
+
const f = [];
|
|
805
|
+
if (s <= 5)
|
|
806
|
+
for (let b = 1; b <= s; b++)
|
|
807
|
+
f.push(b);
|
|
808
|
+
else if (t <= 3) {
|
|
809
|
+
for (let b = 1; b <= 4; b++)
|
|
810
|
+
f.push(b);
|
|
811
|
+
f.push("ellipsis"), f.push(s);
|
|
812
|
+
} else if (t >= s - 2) {
|
|
813
|
+
f.push(1), f.push("ellipsis");
|
|
814
|
+
for (let b = s - 3; b <= s; b++)
|
|
815
|
+
f.push(b);
|
|
730
816
|
} else {
|
|
731
|
-
|
|
732
|
-
for (let
|
|
733
|
-
|
|
734
|
-
|
|
817
|
+
f.push(1), f.push("ellipsis");
|
|
818
|
+
for (let b = t - 1; b <= t + 1; b++)
|
|
819
|
+
f.push(b);
|
|
820
|
+
f.push("ellipsis"), f.push(s);
|
|
735
821
|
}
|
|
736
|
-
return
|
|
737
|
-
}, x = n && l ? (
|
|
822
|
+
return f;
|
|
823
|
+
}, x = n && l ? (t - 1) * l + 1 : void 0, j = n && l ? Math.min(t * l, n) : void 0, w = [
|
|
738
824
|
...[
|
|
739
825
|
"flex",
|
|
740
826
|
"items-center",
|
|
@@ -742,42 +828,42 @@ function we({
|
|
|
742
828
|
"px-4",
|
|
743
829
|
"py-3"
|
|
744
830
|
],
|
|
745
|
-
|
|
831
|
+
i
|
|
746
832
|
].filter(Boolean).join(" ");
|
|
747
|
-
return /* @__PURE__ */ r.jsxs("nav", { className:
|
|
833
|
+
return /* @__PURE__ */ r.jsxs("nav", { className: w, "aria-label": "Pagination", ...c, children: [
|
|
748
834
|
/* @__PURE__ */ r.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
749
835
|
/* @__PURE__ */ r.jsx(
|
|
750
|
-
|
|
836
|
+
R,
|
|
751
837
|
{
|
|
752
838
|
variant: "secondary",
|
|
753
|
-
onClick:
|
|
754
|
-
disabled:
|
|
839
|
+
onClick: u,
|
|
840
|
+
disabled: t === 1,
|
|
755
841
|
className: "px-3 py-1 text-sm",
|
|
756
842
|
children: "Previous"
|
|
757
843
|
}
|
|
758
844
|
),
|
|
759
|
-
/* @__PURE__ */ r.jsx("div", { className: "flex items-center gap-1", children:
|
|
760
|
-
if (
|
|
761
|
-
return /* @__PURE__ */ r.jsx("span", { className: "px-2 text-gray-500", children: "..." }, `ellipsis-${
|
|
762
|
-
const
|
|
845
|
+
/* @__PURE__ */ r.jsx("div", { className: "flex items-center gap-1", children: m().map((f, k) => {
|
|
846
|
+
if (f === "ellipsis")
|
|
847
|
+
return /* @__PURE__ */ r.jsx("span", { className: "px-2 text-gray-500", children: "..." }, `ellipsis-${k}`);
|
|
848
|
+
const b = f, T = b === t;
|
|
763
849
|
return /* @__PURE__ */ r.jsx(
|
|
764
850
|
"button",
|
|
765
851
|
{
|
|
766
|
-
onClick: () =>
|
|
852
|
+
onClick: () => y(b),
|
|
767
853
|
className: `px-3 py-1 text-sm rounded ${T ? "bg-indigo-600 text-white" : "text-gray-700 hover:bg-gray-100"}`,
|
|
768
854
|
"aria-current": T ? "page" : void 0,
|
|
769
|
-
"aria-label": `Go to page ${
|
|
770
|
-
children:
|
|
855
|
+
"aria-label": `Go to page ${b}`,
|
|
856
|
+
children: b
|
|
771
857
|
},
|
|
772
|
-
|
|
858
|
+
b
|
|
773
859
|
);
|
|
774
860
|
}) }),
|
|
775
861
|
/* @__PURE__ */ r.jsx(
|
|
776
|
-
|
|
862
|
+
R,
|
|
777
863
|
{
|
|
778
864
|
variant: "secondary",
|
|
779
|
-
onClick:
|
|
780
|
-
disabled:
|
|
865
|
+
onClick: h,
|
|
866
|
+
disabled: t === s,
|
|
781
867
|
className: "px-3 py-1 text-sm",
|
|
782
868
|
children: "Next"
|
|
783
869
|
}
|
|
@@ -787,19 +873,112 @@ function we({
|
|
|
787
873
|
"Showing ",
|
|
788
874
|
x,
|
|
789
875
|
" to ",
|
|
790
|
-
|
|
876
|
+
j,
|
|
791
877
|
" of ",
|
|
792
878
|
n,
|
|
793
879
|
" results"
|
|
794
880
|
] })
|
|
795
881
|
] });
|
|
796
882
|
}
|
|
797
|
-
function
|
|
798
|
-
|
|
799
|
-
|
|
883
|
+
function Re({
|
|
884
|
+
title: t,
|
|
885
|
+
message: s,
|
|
886
|
+
actionLabel: a,
|
|
887
|
+
onAction: n,
|
|
888
|
+
illustration: l,
|
|
889
|
+
variant: o = "default",
|
|
890
|
+
className: i = "",
|
|
891
|
+
...c
|
|
892
|
+
}) {
|
|
893
|
+
const h = [
|
|
894
|
+
...[
|
|
895
|
+
"flex",
|
|
896
|
+
"flex-col",
|
|
897
|
+
"items-center",
|
|
898
|
+
"justify-center",
|
|
899
|
+
"text-center",
|
|
900
|
+
"py-12",
|
|
901
|
+
"px-4"
|
|
902
|
+
],
|
|
903
|
+
i
|
|
904
|
+
].filter(Boolean).join(" "), y = o === "withAction" || a && n, m = o === "withIllustration" || l;
|
|
905
|
+
return /* @__PURE__ */ r.jsxs("div", { className: h, ...c, children: [
|
|
906
|
+
m && l && /* @__PURE__ */ r.jsx("div", { className: "mb-4", children: l }),
|
|
907
|
+
/* @__PURE__ */ r.jsx(F, { as: "h3", className: "text-lg font-semibold text-gray-900 mb-2", children: t }),
|
|
908
|
+
/* @__PURE__ */ r.jsx(F, { as: "p", className: "text-sm text-gray-500 mb-6 max-w-sm", children: s }),
|
|
909
|
+
y && a && n && /* @__PURE__ */ r.jsx(R, { variant: "regular", onClick: n, children: a })
|
|
910
|
+
] });
|
|
911
|
+
}
|
|
912
|
+
function Te({
|
|
913
|
+
trigger: t,
|
|
914
|
+
items: s,
|
|
915
|
+
align: a = "right",
|
|
916
|
+
variant: n = "default",
|
|
917
|
+
className: l = "",
|
|
918
|
+
...o
|
|
919
|
+
}) {
|
|
920
|
+
const [i, c] = M(!1), u = Y(null);
|
|
921
|
+
z(() => {
|
|
922
|
+
const m = (x) => {
|
|
923
|
+
u.current && !u.current.contains(x.target) && c(!1);
|
|
924
|
+
};
|
|
925
|
+
return i && document.addEventListener("mousedown", m), () => {
|
|
926
|
+
document.removeEventListener("mousedown", m);
|
|
927
|
+
};
|
|
928
|
+
}, [i]);
|
|
929
|
+
const h = (m) => {
|
|
930
|
+
m.disabled || (m.onClick(), c(!1));
|
|
931
|
+
}, y = a === "right" ? "right-0" : "left-0";
|
|
932
|
+
return /* @__PURE__ */ r.jsxs("div", { className: `relative inline-block ${l}`, ref: u, ...o, children: [
|
|
933
|
+
/* @__PURE__ */ r.jsx("div", { onClick: () => c(!i), children: t }),
|
|
934
|
+
i && /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
935
|
+
/* @__PURE__ */ r.jsx(
|
|
936
|
+
"div",
|
|
937
|
+
{
|
|
938
|
+
className: "fixed inset-0 z-10",
|
|
939
|
+
onClick: () => c(!1)
|
|
940
|
+
}
|
|
941
|
+
),
|
|
942
|
+
/* @__PURE__ */ r.jsx(
|
|
943
|
+
"div",
|
|
944
|
+
{
|
|
945
|
+
className: `absolute z-20 mt-2 w-48 rounded-md shadow-lg bg-white ring-1 ring-black ring-opacity-5 ${y}`,
|
|
946
|
+
role: "menu",
|
|
947
|
+
"aria-orientation": "vertical",
|
|
948
|
+
children: /* @__PURE__ */ r.jsx("div", { className: "py-1", role: "none", children: s.map((m, x) => {
|
|
949
|
+
const j = [
|
|
950
|
+
"block",
|
|
951
|
+
"px-4",
|
|
952
|
+
"py-2",
|
|
953
|
+
"text-sm",
|
|
954
|
+
"w-full",
|
|
955
|
+
"text-left",
|
|
956
|
+
m.disabled ? "text-gray-400 cursor-not-allowed" : m.variant === "danger" ? "text-red-700 hover:bg-red-50" : "text-gray-700 hover:bg-gray-100"
|
|
957
|
+
].filter(Boolean).join(" ");
|
|
958
|
+
return /* @__PURE__ */ r.jsx(
|
|
959
|
+
"button",
|
|
960
|
+
{
|
|
961
|
+
type: "button",
|
|
962
|
+
className: j,
|
|
963
|
+
onClick: () => h(m),
|
|
964
|
+
disabled: m.disabled,
|
|
965
|
+
role: "menuitem",
|
|
966
|
+
children: m.label
|
|
967
|
+
},
|
|
968
|
+
x
|
|
969
|
+
);
|
|
970
|
+
}) })
|
|
971
|
+
}
|
|
972
|
+
)
|
|
973
|
+
] })
|
|
974
|
+
] });
|
|
975
|
+
}
|
|
976
|
+
function Se({
|
|
977
|
+
onForgotPasswordClick: t,
|
|
978
|
+
className: s,
|
|
800
979
|
...a
|
|
801
980
|
}) {
|
|
802
|
-
return /* @__PURE__ */ r.jsx(
|
|
981
|
+
return /* @__PURE__ */ r.jsx(fe, { className: s, children: /* @__PURE__ */ r.jsxs(
|
|
803
982
|
"form",
|
|
804
983
|
{
|
|
805
984
|
...a,
|
|
@@ -808,7 +987,7 @@ function Ee({
|
|
|
808
987
|
},
|
|
809
988
|
children: [
|
|
810
989
|
/* @__PURE__ */ r.jsx(
|
|
811
|
-
|
|
990
|
+
H,
|
|
812
991
|
{
|
|
813
992
|
id: "login-email",
|
|
814
993
|
label: "Your email",
|
|
@@ -816,7 +995,7 @@ function Ee({
|
|
|
816
995
|
}
|
|
817
996
|
),
|
|
818
997
|
/* @__PURE__ */ r.jsx(
|
|
819
|
-
|
|
998
|
+
H,
|
|
820
999
|
{
|
|
821
1000
|
id: "login-password",
|
|
822
1001
|
label: "Your password",
|
|
@@ -826,47 +1005,47 @@ function Ee({
|
|
|
826
1005
|
),
|
|
827
1006
|
/* @__PURE__ */ r.jsxs("div", { className: "flex justify-between", children: [
|
|
828
1007
|
/* @__PURE__ */ r.jsx(
|
|
829
|
-
|
|
1008
|
+
R,
|
|
830
1009
|
{
|
|
831
1010
|
variant: "secondary",
|
|
832
1011
|
type: "button",
|
|
833
|
-
onClick:
|
|
1012
|
+
onClick: t,
|
|
834
1013
|
children: "Forgot password?"
|
|
835
1014
|
}
|
|
836
1015
|
),
|
|
837
|
-
/* @__PURE__ */ r.jsx(
|
|
1016
|
+
/* @__PURE__ */ r.jsx(R, { variant: "regular", type: "submit", children: "Sign in" })
|
|
838
1017
|
] })
|
|
839
1018
|
]
|
|
840
1019
|
}
|
|
841
1020
|
) });
|
|
842
1021
|
}
|
|
843
|
-
function
|
|
844
|
-
isOpen:
|
|
845
|
-
onClose:
|
|
1022
|
+
function Ae({
|
|
1023
|
+
isOpen: t,
|
|
1024
|
+
onClose: s,
|
|
846
1025
|
title: a,
|
|
847
1026
|
children: n,
|
|
848
1027
|
variant: l = "default",
|
|
849
1028
|
showCloseButton: o = !0,
|
|
850
|
-
footer:
|
|
851
|
-
className:
|
|
852
|
-
...
|
|
1029
|
+
footer: i,
|
|
1030
|
+
className: c = "",
|
|
1031
|
+
...u
|
|
853
1032
|
}) {
|
|
854
|
-
const
|
|
855
|
-
if (
|
|
856
|
-
if (!
|
|
857
|
-
|
|
858
|
-
const
|
|
859
|
-
|
|
860
|
-
}, 0),
|
|
861
|
-
|
|
1033
|
+
const h = Y(null), y = Y(null);
|
|
1034
|
+
if (z(() => {
|
|
1035
|
+
if (!t) return;
|
|
1036
|
+
y.current = document.activeElement;
|
|
1037
|
+
const f = setTimeout(() => {
|
|
1038
|
+
h.current?.focus();
|
|
1039
|
+
}, 0), k = (b) => {
|
|
1040
|
+
b.key === "Escape" && s();
|
|
862
1041
|
};
|
|
863
|
-
return document.addEventListener("keydown",
|
|
864
|
-
clearTimeout(
|
|
1042
|
+
return document.addEventListener("keydown", k), () => {
|
|
1043
|
+
clearTimeout(f), document.removeEventListener("keydown", k), y.current?.focus();
|
|
865
1044
|
};
|
|
866
|
-
}, [
|
|
1045
|
+
}, [t, s]), z(() => (t ? document.body.style.overflow = "hidden" : document.body.style.overflow = "", () => {
|
|
867
1046
|
document.body.style.overflow = "";
|
|
868
|
-
}), [
|
|
869
|
-
const
|
|
1047
|
+
}), [t]), !t) return null;
|
|
1048
|
+
const m = [
|
|
870
1049
|
"fixed",
|
|
871
1050
|
"inset-0",
|
|
872
1051
|
"z-50",
|
|
@@ -877,7 +1056,7 @@ function _e({
|
|
|
877
1056
|
"bg-black",
|
|
878
1057
|
"bg-opacity-50",
|
|
879
1058
|
"transition-opacity"
|
|
880
|
-
],
|
|
1059
|
+
], N = [
|
|
881
1060
|
"relative",
|
|
882
1061
|
"bg-white",
|
|
883
1062
|
"rounded-lg",
|
|
@@ -890,34 +1069,34 @@ function _e({
|
|
|
890
1069
|
fullscreen: "max-w-full h-full"
|
|
891
1070
|
}[l],
|
|
892
1071
|
"p-6",
|
|
893
|
-
|
|
894
|
-
].filter(Boolean).join(" "),
|
|
1072
|
+
c
|
|
1073
|
+
].filter(Boolean).join(" "), w = /* @__PURE__ */ r.jsxs(
|
|
895
1074
|
"div",
|
|
896
1075
|
{
|
|
897
|
-
className:
|
|
1076
|
+
className: m.join(" "),
|
|
898
1077
|
role: "dialog",
|
|
899
1078
|
"aria-modal": "true",
|
|
900
1079
|
"aria-labelledby": a ? "modal-title" : void 0,
|
|
901
|
-
onClick: (
|
|
902
|
-
|
|
1080
|
+
onClick: (f) => {
|
|
1081
|
+
f.target === f.currentTarget && s();
|
|
903
1082
|
},
|
|
904
1083
|
children: [
|
|
905
1084
|
/* @__PURE__ */ r.jsx("div", { className: x.join(" "), "aria-hidden": "true" }),
|
|
906
1085
|
/* @__PURE__ */ r.jsx("div", { className: "flex min-h-full items-center justify-center p-4", children: /* @__PURE__ */ r.jsxs(
|
|
907
1086
|
"div",
|
|
908
1087
|
{
|
|
909
|
-
ref:
|
|
1088
|
+
ref: h,
|
|
910
1089
|
tabIndex: -1,
|
|
911
|
-
className:
|
|
912
|
-
onClick: (
|
|
913
|
-
...
|
|
1090
|
+
className: N,
|
|
1091
|
+
onClick: (f) => f.stopPropagation(),
|
|
1092
|
+
...u,
|
|
914
1093
|
children: [
|
|
915
1094
|
a && /* @__PURE__ */ r.jsxs("div", { className: "flex justify-between items-center mb-4", children: [
|
|
916
1095
|
/* @__PURE__ */ r.jsx("h2", { id: "modal-title", className: "text-xl font-semibold text-gray-900", children: a }),
|
|
917
1096
|
o && /* @__PURE__ */ r.jsx(
|
|
918
1097
|
"button",
|
|
919
1098
|
{
|
|
920
|
-
onClick:
|
|
1099
|
+
onClick: s,
|
|
921
1100
|
className: "text-gray-400 hover:text-gray-500 focus:outline-none",
|
|
922
1101
|
"aria-label": "Close modal",
|
|
923
1102
|
children: /* @__PURE__ */ r.jsx(
|
|
@@ -944,7 +1123,7 @@ function _e({
|
|
|
944
1123
|
!a && o && /* @__PURE__ */ r.jsx("div", { className: "flex justify-end mb-4", children: /* @__PURE__ */ r.jsx(
|
|
945
1124
|
"button",
|
|
946
1125
|
{
|
|
947
|
-
onClick:
|
|
1126
|
+
onClick: s,
|
|
948
1127
|
className: "text-gray-400 hover:text-gray-500 focus:outline-none",
|
|
949
1128
|
"aria-label": "Close modal",
|
|
950
1129
|
children: /* @__PURE__ */ r.jsx(
|
|
@@ -968,45 +1147,45 @@ function _e({
|
|
|
968
1147
|
}
|
|
969
1148
|
) }),
|
|
970
1149
|
/* @__PURE__ */ r.jsx("div", { className: "mb-4", children: n }),
|
|
971
|
-
|
|
1150
|
+
i && /* @__PURE__ */ r.jsx("div", { className: "flex justify-end gap-2 mt-4", children: i })
|
|
972
1151
|
]
|
|
973
1152
|
}
|
|
974
1153
|
) })
|
|
975
1154
|
]
|
|
976
1155
|
}
|
|
977
1156
|
);
|
|
978
|
-
return typeof window < "u" ?
|
|
1157
|
+
return typeof window < "u" ? oe(w, document.body) : w;
|
|
979
1158
|
}
|
|
980
|
-
function
|
|
981
|
-
columns:
|
|
982
|
-
data:
|
|
1159
|
+
function Oe({
|
|
1160
|
+
columns: t,
|
|
1161
|
+
data: s,
|
|
983
1162
|
loading: a = !1,
|
|
984
1163
|
onSort: n,
|
|
985
1164
|
sortColumn: l,
|
|
986
1165
|
sortDirection: o,
|
|
987
|
-
emptyMessage:
|
|
988
|
-
className:
|
|
989
|
-
...
|
|
1166
|
+
emptyMessage: i = "No data available",
|
|
1167
|
+
className: c = "",
|
|
1168
|
+
...u
|
|
990
1169
|
}) {
|
|
991
|
-
const
|
|
992
|
-
if (!n || !
|
|
1170
|
+
const h = (x) => {
|
|
1171
|
+
if (!n || !t.find((N) => N.key === x)?.sortable)
|
|
993
1172
|
return;
|
|
994
1173
|
n(x, l === x && o === "asc" ? "desc" : "asc");
|
|
995
|
-
},
|
|
1174
|
+
}, m = [
|
|
996
1175
|
...[
|
|
997
1176
|
"min-w-full",
|
|
998
1177
|
"divide-y",
|
|
999
1178
|
"divide-gray-200"
|
|
1000
1179
|
],
|
|
1001
|
-
|
|
1180
|
+
c
|
|
1002
1181
|
].filter(Boolean).join(" ");
|
|
1003
|
-
return /* @__PURE__ */ r.jsx("div", { className: "overflow-x-auto", children: /* @__PURE__ */ r.jsxs("table", { className:
|
|
1004
|
-
/* @__PURE__ */ r.jsx("thead", { className: "bg-gray-50", children: /* @__PURE__ */ r.jsx("tr", { children:
|
|
1182
|
+
return /* @__PURE__ */ r.jsx("div", { className: "overflow-x-auto", children: /* @__PURE__ */ r.jsxs("table", { className: m, ...u, children: [
|
|
1183
|
+
/* @__PURE__ */ r.jsx("thead", { className: "bg-gray-50", children: /* @__PURE__ */ r.jsx("tr", { children: t.map((x) => /* @__PURE__ */ r.jsx(
|
|
1005
1184
|
"th",
|
|
1006
1185
|
{
|
|
1007
1186
|
scope: "col",
|
|
1008
1187
|
className: `px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider ${x.sortable && n ? "cursor-pointer hover:bg-gray-100 select-none" : ""}`,
|
|
1009
|
-
onClick: () => x.sortable &&
|
|
1188
|
+
onClick: () => x.sortable && h(x.key),
|
|
1010
1189
|
children: /* @__PURE__ */ r.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
1011
1190
|
/* @__PURE__ */ r.jsx("span", { children: x.label }),
|
|
1012
1191
|
x.sortable && l === x.key && /* @__PURE__ */ r.jsx("span", { className: "text-gray-400", children: o === "asc" ? "↑" : "↓" })
|
|
@@ -1014,30 +1193,34 @@ function Re({
|
|
|
1014
1193
|
},
|
|
1015
1194
|
x.key
|
|
1016
1195
|
)) }) }),
|
|
1017
|
-
/* @__PURE__ */ r.jsx("tbody", { className: "bg-white divide-y divide-gray-200", children: a ? /* @__PURE__ */ r.jsx("tr", { children: /* @__PURE__ */ r.jsx("td", { colSpan:
|
|
1018
|
-
const
|
|
1019
|
-
return /* @__PURE__ */ r.jsx("td", { className: "px-6 py-4 whitespace-nowrap text-sm text-gray-900", children:
|
|
1020
|
-
}) },
|
|
1196
|
+
/* @__PURE__ */ r.jsx("tbody", { className: "bg-white divide-y divide-gray-200", children: a ? /* @__PURE__ */ r.jsx("tr", { children: /* @__PURE__ */ r.jsx("td", { colSpan: t.length, className: "px-6 py-4 text-center text-gray-500", children: "Loading..." }) }) : s.length === 0 ? /* @__PURE__ */ r.jsx("tr", { children: /* @__PURE__ */ r.jsx("td", { colSpan: t.length, className: "px-6 py-4 text-center text-gray-500", children: i }) }) : s.map((x, j) => /* @__PURE__ */ r.jsx("tr", { className: "hover:bg-gray-50", children: t.map((N) => {
|
|
1197
|
+
const w = x[N.key];
|
|
1198
|
+
return /* @__PURE__ */ r.jsx("td", { className: "px-6 py-4 whitespace-nowrap text-sm text-gray-900", children: N.render ? N.render(w, x) : w }, N.key);
|
|
1199
|
+
}) }, j)) })
|
|
1021
1200
|
] }) });
|
|
1022
1201
|
}
|
|
1023
1202
|
export {
|
|
1024
1203
|
pe as Badge,
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1204
|
+
fe as BoxWrapper,
|
|
1205
|
+
_e as Breadcrumb,
|
|
1206
|
+
R as Button,
|
|
1207
|
+
ke as Card,
|
|
1208
|
+
Te as Dropdown,
|
|
1209
|
+
Re as EmptyState,
|
|
1029
1210
|
je as ErrorMessage,
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1211
|
+
Ee as Form,
|
|
1212
|
+
he as Info,
|
|
1213
|
+
ue as Input,
|
|
1214
|
+
H as InputWithLabel,
|
|
1215
|
+
ye as Label,
|
|
1216
|
+
Se as LoginBox,
|
|
1217
|
+
Ae as Modal,
|
|
1218
|
+
me as NavLink,
|
|
1219
|
+
Ce as Pagination,
|
|
1220
|
+
ve as Select,
|
|
1221
|
+
we as Skeleton,
|
|
1222
|
+
Oe as Table,
|
|
1223
|
+
F as Text,
|
|
1224
|
+
ge as Textarea,
|
|
1225
|
+
Ne as Tooltip
|
|
1043
1226
|
};
|