@fabio.caffarello/react-design-system 1.4.1 → 1.5.1
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 +621 -431
- package/dist/ui/atoms/NavLink/NavLink.d.ts +5 -5
- package/dist/ui/atoms/NavLink/NavLink.stories.d.ts +1 -0
- package/dist/ui/atoms/SidebarItem/SidebarItem.d.ts +21 -0
- package/dist/ui/atoms/SidebarItem/SidebarItem.stories.d.ts +7 -0
- package/dist/ui/atoms/SidebarItem/SidebarItem.test.d.ts +1 -0
- package/dist/ui/atoms/index.d.ts +2 -0
- package/dist/ui/molecules/NavbarGroup/NavbarGroup.d.ts +23 -0
- package/dist/ui/molecules/NavbarGroup/NavbarGroup.stories.d.ts +8 -0
- package/dist/ui/molecules/NavbarGroup/NavbarGroup.test.d.ts +1 -0
- package/dist/ui/molecules/SidebarGroup/SidebarGroup.d.ts +20 -0
- package/dist/ui/molecules/SidebarHeader/SidebarHeader.d.ts +19 -0
- package/dist/ui/molecules/index.d.ts +6 -0
- package/dist/ui/organisms/Sidebar/Sidebar.d.ts +35 -0
- package/dist/ui/organisms/Sidebar/Sidebar.stories.d.ts +8 -0
- package/dist/ui/organisms/Sidebar/Sidebar.test.d.ts +1 -0
- package/dist/ui/organisms/index.d.ts +2 -0
- package/package.json +1 -1
- package/src/ui/atoms/NavLink/NavLink.stories.tsx +12 -0
- package/src/ui/atoms/NavLink/NavLink.tsx +9 -5
- package/src/ui/atoms/SidebarItem/SidebarItem.stories.tsx +55 -0
- package/src/ui/atoms/SidebarItem/SidebarItem.test.tsx +25 -0
- package/src/ui/atoms/SidebarItem/SidebarItem.tsx +61 -0
- package/src/ui/atoms/index.ts +3 -0
- package/src/ui/molecules/NavbarGroup/NavbarGroup.stories.tsx +62 -0
- package/src/ui/molecules/NavbarGroup/NavbarGroup.test.tsx +32 -0
- package/src/ui/molecules/NavbarGroup/NavbarGroup.tsx +71 -0
- package/src/ui/molecules/SidebarGroup/SidebarGroup.tsx +52 -0
- package/src/ui/molecules/SidebarHeader/SidebarHeader.tsx +80 -0
- package/src/ui/molecules/index.ts +9 -0
- package/src/ui/organisms/Sidebar/Sidebar.stories.tsx +117 -0
- package/src/ui/organisms/Sidebar/Sidebar.test.tsx +40 -0
- package/src/ui/organisms/Sidebar/Sidebar.tsx +86 -0
- package/src/ui/organisms/index.ts +3 -0
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { createPortal as
|
|
3
|
-
var
|
|
1
|
+
import ie, { useState as Y, useRef as z, useEffect as F } from "react";
|
|
2
|
+
import { createPortal as ce } from "react-dom";
|
|
3
|
+
var O = { exports: {} }, _ = {};
|
|
4
4
|
/**
|
|
5
5
|
* @license React
|
|
6
6
|
* react-jsx-runtime.production.js
|
|
@@ -11,10 +11,10 @@ var A = { exports: {} }, _ = {};
|
|
|
11
11
|
* LICENSE file in the root directory of this source tree.
|
|
12
12
|
*/
|
|
13
13
|
var J;
|
|
14
|
-
function
|
|
14
|
+
function de() {
|
|
15
15
|
if (J) return _;
|
|
16
16
|
J = 1;
|
|
17
|
-
var
|
|
17
|
+
var s = Symbol.for("react.transitional.element"), t = Symbol.for("react.fragment");
|
|
18
18
|
function a(n, l, o) {
|
|
19
19
|
var i = null;
|
|
20
20
|
if (o !== void 0 && (i = "" + o), l.key !== void 0 && (i = "" + l.key), "key" in l) {
|
|
@@ -23,16 +23,16 @@ function ie() {
|
|
|
23
23
|
c !== "key" && (o[c] = l[c]);
|
|
24
24
|
} else o = l;
|
|
25
25
|
return l = o.ref, {
|
|
26
|
-
$$typeof:
|
|
26
|
+
$$typeof: s,
|
|
27
27
|
type: n,
|
|
28
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 = t, _.jsx = a, _.jsxs = a, _;
|
|
34
34
|
}
|
|
35
|
-
var
|
|
35
|
+
var R = {};
|
|
36
36
|
/**
|
|
37
37
|
* @license React
|
|
38
38
|
* react-jsx-runtime.development.js
|
|
@@ -42,245 +42,245 @@ var C = {};
|
|
|
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
|
|
49
|
-
if (
|
|
50
|
-
if (typeof
|
|
51
|
-
return
|
|
52
|
-
if (typeof
|
|
53
|
-
switch (
|
|
45
|
+
var X;
|
|
46
|
+
function ue() {
|
|
47
|
+
return X || (X = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
48
|
+
function s(r) {
|
|
49
|
+
if (r == null) return null;
|
|
50
|
+
if (typeof r == "function")
|
|
51
|
+
return r.$$typeof === ne ? null : r.displayName || r.name || null;
|
|
52
|
+
if (typeof r == "string") return r;
|
|
53
|
+
switch (r) {
|
|
54
54
|
case f:
|
|
55
55
|
return "Fragment";
|
|
56
|
-
case
|
|
56
|
+
case h:
|
|
57
57
|
return "Profiler";
|
|
58
58
|
case k:
|
|
59
59
|
return "StrictMode";
|
|
60
|
-
case
|
|
60
|
+
case re:
|
|
61
61
|
return "Suspense";
|
|
62
|
-
case
|
|
62
|
+
case se:
|
|
63
63
|
return "SuspenseList";
|
|
64
|
-
case
|
|
64
|
+
case ae:
|
|
65
65
|
return "Activity";
|
|
66
66
|
}
|
|
67
|
-
if (typeof
|
|
68
|
-
switch (typeof
|
|
67
|
+
if (typeof r == "object")
|
|
68
|
+
switch (typeof r.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
|
+
), r.$$typeof) {
|
|
71
71
|
case w:
|
|
72
72
|
return "Portal";
|
|
73
|
-
case
|
|
74
|
-
return
|
|
75
|
-
case
|
|
76
|
-
return (
|
|
77
|
-
case
|
|
78
|
-
var
|
|
79
|
-
return
|
|
80
|
-
case
|
|
81
|
-
return
|
|
82
|
-
case
|
|
83
|
-
|
|
73
|
+
case K:
|
|
74
|
+
return r.displayName || "Context";
|
|
75
|
+
case S:
|
|
76
|
+
return (r._context.displayName || "Context") + ".Consumer";
|
|
77
|
+
case ee:
|
|
78
|
+
var u = r.render;
|
|
79
|
+
return r = r.displayName, r || (r = u.displayName || u.name || "", r = r !== "" ? "ForwardRef(" + r + ")" : "ForwardRef"), r;
|
|
80
|
+
case te:
|
|
81
|
+
return u = r.displayName || null, u !== null ? u : s(r.type) || "Memo";
|
|
82
|
+
case L:
|
|
83
|
+
u = r._payload, r = r._init;
|
|
84
84
|
try {
|
|
85
|
-
return
|
|
85
|
+
return s(r(u));
|
|
86
86
|
} catch {
|
|
87
87
|
}
|
|
88
88
|
}
|
|
89
89
|
return null;
|
|
90
90
|
}
|
|
91
|
-
function
|
|
92
|
-
return "" +
|
|
91
|
+
function t(r) {
|
|
92
|
+
return "" + r;
|
|
93
93
|
}
|
|
94
|
-
function a(
|
|
94
|
+
function a(r) {
|
|
95
95
|
try {
|
|
96
|
-
|
|
97
|
-
var
|
|
96
|
+
t(r);
|
|
97
|
+
var u = !1;
|
|
98
98
|
} catch {
|
|
99
|
-
|
|
99
|
+
u = !0;
|
|
100
100
|
}
|
|
101
|
-
if (
|
|
102
|
-
|
|
103
|
-
var p =
|
|
101
|
+
if (u) {
|
|
102
|
+
u = console;
|
|
103
|
+
var p = u.error, g = typeof Symbol == "function" && Symbol.toStringTag && r[Symbol.toStringTag] || r.constructor.name || "Object";
|
|
104
104
|
return p.call(
|
|
105
|
-
|
|
105
|
+
u,
|
|
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
|
+
g
|
|
108
|
+
), t(r);
|
|
109
109
|
}
|
|
110
110
|
}
|
|
111
|
-
function n(
|
|
112
|
-
if (
|
|
113
|
-
if (typeof
|
|
111
|
+
function n(r) {
|
|
112
|
+
if (r === f) return "<>";
|
|
113
|
+
if (typeof r == "object" && r !== null && r.$$typeof === L)
|
|
114
114
|
return "<...>";
|
|
115
115
|
try {
|
|
116
|
-
var
|
|
117
|
-
return
|
|
116
|
+
var u = s(r);
|
|
117
|
+
return u ? "<" + u + ">" : "<...>";
|
|
118
118
|
} catch {
|
|
119
119
|
return "<...>";
|
|
120
120
|
}
|
|
121
121
|
}
|
|
122
122
|
function l() {
|
|
123
|
-
var
|
|
124
|
-
return
|
|
123
|
+
var r = B.A;
|
|
124
|
+
return r === null ? null : r.getOwner();
|
|
125
125
|
}
|
|
126
126
|
function o() {
|
|
127
127
|
return Error("react-stack-top-frame");
|
|
128
128
|
}
|
|
129
|
-
function i(
|
|
130
|
-
if (
|
|
131
|
-
var
|
|
132
|
-
if (
|
|
129
|
+
function i(r) {
|
|
130
|
+
if (W.call(r, "key")) {
|
|
131
|
+
var u = Object.getOwnPropertyDescriptor(r, "key").get;
|
|
132
|
+
if (u && u.isReactWarning) return !1;
|
|
133
133
|
}
|
|
134
|
-
return
|
|
134
|
+
return r.key !== void 0;
|
|
135
135
|
}
|
|
136
|
-
function c(
|
|
136
|
+
function c(r, u) {
|
|
137
137
|
function p() {
|
|
138
|
-
|
|
138
|
+
P || (P = !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
|
+
u
|
|
141
141
|
));
|
|
142
142
|
}
|
|
143
|
-
p.isReactWarning = !0, Object.defineProperty(
|
|
143
|
+
p.isReactWarning = !0, Object.defineProperty(r, "key", {
|
|
144
144
|
get: p,
|
|
145
145
|
configurable: !0
|
|
146
146
|
});
|
|
147
147
|
}
|
|
148
|
-
function
|
|
149
|
-
var
|
|
150
|
-
return
|
|
148
|
+
function d() {
|
|
149
|
+
var r = s(this.type);
|
|
150
|
+
return V[r] || (V[r] = !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
|
+
)), r = this.props.ref, r !== void 0 ? r : null;
|
|
153
153
|
}
|
|
154
|
-
function
|
|
155
|
-
var
|
|
156
|
-
return
|
|
154
|
+
function b(r, u, p, g, A, I) {
|
|
155
|
+
var v = p.ref;
|
|
156
|
+
return r = {
|
|
157
157
|
$$typeof: N,
|
|
158
|
-
type:
|
|
159
|
-
key:
|
|
158
|
+
type: r,
|
|
159
|
+
key: u,
|
|
160
160
|
props: p,
|
|
161
|
-
_owner:
|
|
162
|
-
}, (
|
|
161
|
+
_owner: g
|
|
162
|
+
}, (v !== void 0 ? v : null) !== null ? Object.defineProperty(r, "ref", {
|
|
163
163
|
enumerable: !1,
|
|
164
|
-
get:
|
|
165
|
-
}) : Object.defineProperty(
|
|
164
|
+
get: d
|
|
165
|
+
}) : Object.defineProperty(r, "ref", { enumerable: !1, value: null }), r._store = {}, Object.defineProperty(r._store, "validated", {
|
|
166
166
|
configurable: !1,
|
|
167
167
|
enumerable: !1,
|
|
168
168
|
writable: !0,
|
|
169
169
|
value: 0
|
|
170
|
-
}), Object.defineProperty(
|
|
170
|
+
}), Object.defineProperty(r, "_debugInfo", {
|
|
171
171
|
configurable: !1,
|
|
172
172
|
enumerable: !1,
|
|
173
173
|
writable: !0,
|
|
174
174
|
value: null
|
|
175
|
-
}), Object.defineProperty(
|
|
175
|
+
}), Object.defineProperty(r, "_debugStack", {
|
|
176
176
|
configurable: !1,
|
|
177
177
|
enumerable: !1,
|
|
178
178
|
writable: !0,
|
|
179
|
-
value:
|
|
180
|
-
}), Object.defineProperty(
|
|
179
|
+
value: A
|
|
180
|
+
}), Object.defineProperty(r, "_debugTask", {
|
|
181
181
|
configurable: !1,
|
|
182
182
|
enumerable: !1,
|
|
183
183
|
writable: !0,
|
|
184
|
-
value:
|
|
185
|
-
}), Object.freeze && (Object.freeze(
|
|
184
|
+
value: I
|
|
185
|
+
}), Object.freeze && (Object.freeze(r.props), Object.freeze(r)), r;
|
|
186
186
|
}
|
|
187
|
-
function
|
|
188
|
-
var
|
|
189
|
-
if (
|
|
190
|
-
if (
|
|
191
|
-
if (
|
|
192
|
-
for (
|
|
193
|
-
m(g
|
|
194
|
-
Object.freeze && Object.freeze(
|
|
187
|
+
function j(r, u, p, g, A, I) {
|
|
188
|
+
var v = u.children;
|
|
189
|
+
if (v !== void 0)
|
|
190
|
+
if (g)
|
|
191
|
+
if (le(v)) {
|
|
192
|
+
for (g = 0; g < v.length; g++)
|
|
193
|
+
m(v[g]);
|
|
194
|
+
Object.freeze && Object.freeze(v);
|
|
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 m(
|
|
200
|
-
if (
|
|
201
|
-
|
|
202
|
-
var
|
|
203
|
-
return
|
|
199
|
+
else m(v);
|
|
200
|
+
if (W.call(u, "key")) {
|
|
201
|
+
v = s(r);
|
|
202
|
+
var C = Object.keys(u).filter(function(oe) {
|
|
203
|
+
return oe !== "key";
|
|
204
204
|
});
|
|
205
|
-
|
|
205
|
+
g = 0 < C.length ? "{key: someKey, " + C.join(": ..., ") + ": ...}" : "{key: someKey}", U[v + g] || (C = 0 < C.length ? "{" + C.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
|
-
v,
|
|
213
212
|
g,
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
213
|
+
v,
|
|
214
|
+
C,
|
|
215
|
+
v
|
|
216
|
+
), U[v + g] = !0);
|
|
217
217
|
}
|
|
218
|
-
if (
|
|
218
|
+
if (v = null, p !== void 0 && (a(p), v = "" + p), i(u) && (a(u.key), v = "" + u.key), "key" in u) {
|
|
219
219
|
p = {};
|
|
220
|
-
for (var
|
|
221
|
-
|
|
222
|
-
} else p =
|
|
223
|
-
return
|
|
220
|
+
for (var M in u)
|
|
221
|
+
M !== "key" && (p[M] = u[M]);
|
|
222
|
+
} else p = u;
|
|
223
|
+
return v && c(
|
|
224
224
|
p,
|
|
225
|
-
typeof
|
|
226
|
-
),
|
|
227
|
-
|
|
228
|
-
|
|
225
|
+
typeof r == "function" ? r.displayName || r.name || "Unknown" : r
|
|
226
|
+
), b(
|
|
227
|
+
r,
|
|
228
|
+
v,
|
|
229
229
|
p,
|
|
230
230
|
l(),
|
|
231
|
-
|
|
232
|
-
|
|
231
|
+
A,
|
|
232
|
+
I
|
|
233
233
|
);
|
|
234
234
|
}
|
|
235
|
-
function m(
|
|
236
|
-
x(
|
|
235
|
+
function m(r) {
|
|
236
|
+
x(r) ? r._store && (r._store.validated = 1) : typeof r == "object" && r !== null && r.$$typeof === L && (r._payload.status === "fulfilled" ? x(r._payload.value) && r._payload.value._store && (r._payload.value._store.validated = 1) : r._store && (r._store.validated = 1));
|
|
237
237
|
}
|
|
238
|
-
function x(
|
|
239
|
-
return typeof
|
|
238
|
+
function x(r) {
|
|
239
|
+
return typeof r == "object" && r !== null && r.$$typeof === N;
|
|
240
240
|
}
|
|
241
|
-
var
|
|
241
|
+
var y = ie, N = Symbol.for("react.transitional.element"), w = Symbol.for("react.portal"), f = Symbol.for("react.fragment"), k = Symbol.for("react.strict_mode"), h = Symbol.for("react.profiler"), S = Symbol.for("react.consumer"), K = Symbol.for("react.context"), ee = Symbol.for("react.forward_ref"), re = Symbol.for("react.suspense"), se = Symbol.for("react.suspense_list"), te = Symbol.for("react.memo"), L = Symbol.for("react.lazy"), ae = Symbol.for("react.activity"), ne = Symbol.for("react.client.reference"), B = y.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, W = Object.prototype.hasOwnProperty, le = Array.isArray, $ = console.createTask ? console.createTask : function() {
|
|
242
242
|
return null;
|
|
243
243
|
};
|
|
244
|
-
|
|
245
|
-
react_stack_bottom_frame: function(
|
|
246
|
-
return
|
|
244
|
+
y = {
|
|
245
|
+
react_stack_bottom_frame: function(r) {
|
|
246
|
+
return r();
|
|
247
247
|
}
|
|
248
248
|
};
|
|
249
|
-
var
|
|
250
|
-
|
|
249
|
+
var P, V = {}, q = y.react_stack_bottom_frame.bind(
|
|
250
|
+
y,
|
|
251
251
|
o
|
|
252
|
-
)(),
|
|
253
|
-
|
|
254
|
-
var
|
|
255
|
-
return
|
|
256
|
-
|
|
257
|
-
|
|
252
|
+
)(), G = $(n(o)), U = {};
|
|
253
|
+
R.Fragment = f, R.jsx = function(r, u, p) {
|
|
254
|
+
var g = 1e4 > B.recentlyCreatedOwnerStacks++;
|
|
255
|
+
return j(
|
|
256
|
+
r,
|
|
257
|
+
u,
|
|
258
258
|
p,
|
|
259
259
|
!1,
|
|
260
|
-
|
|
261
|
-
|
|
260
|
+
g ? Error("react-stack-top-frame") : q,
|
|
261
|
+
g ? $(n(r)) : G
|
|
262
262
|
);
|
|
263
|
-
},
|
|
264
|
-
var
|
|
265
|
-
return
|
|
266
|
-
|
|
267
|
-
|
|
263
|
+
}, R.jsxs = function(r, u, p) {
|
|
264
|
+
var g = 1e4 > B.recentlyCreatedOwnerStacks++;
|
|
265
|
+
return j(
|
|
266
|
+
r,
|
|
267
|
+
u,
|
|
268
268
|
p,
|
|
269
269
|
!0,
|
|
270
|
-
|
|
271
|
-
|
|
270
|
+
g ? Error("react-stack-top-frame") : q,
|
|
271
|
+
g ? $(n(r)) : G
|
|
272
272
|
);
|
|
273
273
|
};
|
|
274
|
-
})()),
|
|
274
|
+
})()), R;
|
|
275
275
|
}
|
|
276
|
-
var
|
|
277
|
-
function
|
|
278
|
-
return
|
|
276
|
+
var H;
|
|
277
|
+
function fe() {
|
|
278
|
+
return H || (H = 1, process.env.NODE_ENV === "production" ? O.exports = de() : O.exports = ue()), O.exports;
|
|
279
279
|
}
|
|
280
|
-
var
|
|
281
|
-
function
|
|
282
|
-
const n = [
|
|
283
|
-
switch (
|
|
280
|
+
var e = fe();
|
|
281
|
+
function je({ variant: s = "info", className: t, ...a }) {
|
|
282
|
+
const n = [t || ""];
|
|
283
|
+
switch (s) {
|
|
284
284
|
case "warning": {
|
|
285
285
|
n.push("bg-yellow-100 text-yellow-800 border-yellow-500");
|
|
286
286
|
break;
|
|
@@ -295,7 +295,7 @@ function he({ variant: t = "info", className: s, ...a }) {
|
|
|
295
295
|
break;
|
|
296
296
|
}
|
|
297
297
|
}
|
|
298
|
-
return /* @__PURE__ */
|
|
298
|
+
return /* @__PURE__ */ e.jsx(
|
|
299
299
|
"div",
|
|
300
300
|
{
|
|
301
301
|
role: "alert",
|
|
@@ -304,9 +304,9 @@ function he({ variant: t = "info", className: s, ...a }) {
|
|
|
304
304
|
}
|
|
305
305
|
);
|
|
306
306
|
}
|
|
307
|
-
function
|
|
308
|
-
variant:
|
|
309
|
-
bold:
|
|
307
|
+
function T({
|
|
308
|
+
variant: s,
|
|
309
|
+
bold: t,
|
|
310
310
|
italic: a,
|
|
311
311
|
className: n,
|
|
312
312
|
as: l,
|
|
@@ -314,27 +314,27 @@ function F({
|
|
|
314
314
|
...i
|
|
315
315
|
}) {
|
|
316
316
|
const c = [n];
|
|
317
|
-
let
|
|
317
|
+
let d;
|
|
318
318
|
if (l)
|
|
319
|
-
|
|
319
|
+
d = l;
|
|
320
320
|
else
|
|
321
|
-
switch (
|
|
321
|
+
switch (s) {
|
|
322
322
|
case "heading":
|
|
323
|
-
|
|
323
|
+
d = "h2";
|
|
324
324
|
break;
|
|
325
325
|
case "list":
|
|
326
|
-
|
|
326
|
+
d = "li";
|
|
327
327
|
break;
|
|
328
328
|
case "paragraph":
|
|
329
329
|
default:
|
|
330
|
-
|
|
330
|
+
d = "p";
|
|
331
331
|
break;
|
|
332
332
|
}
|
|
333
|
-
return
|
|
333
|
+
return t && c.push("font-bold"), a && c.push("italic"), o && c.push(`text-${o}`), /* @__PURE__ */ e.jsx(d, { className: c.join(" "), ...i });
|
|
334
334
|
}
|
|
335
|
-
function
|
|
335
|
+
function me({ className: s, ...t }) {
|
|
336
336
|
const a = [
|
|
337
|
-
|
|
337
|
+
s,
|
|
338
338
|
"px-large",
|
|
339
339
|
"border",
|
|
340
340
|
"border-1",
|
|
@@ -344,22 +344,22 @@ function ue({ className: t, ...s }) {
|
|
|
344
344
|
"h-form-element",
|
|
345
345
|
"text-base"
|
|
346
346
|
];
|
|
347
|
-
return /* @__PURE__ */
|
|
347
|
+
return /* @__PURE__ */ e.jsx("input", { className: a.join(" "), ...t });
|
|
348
348
|
}
|
|
349
|
-
function
|
|
350
|
-
className:
|
|
351
|
-
variant:
|
|
349
|
+
function E({
|
|
350
|
+
className: s,
|
|
351
|
+
variant: t = "regular",
|
|
352
352
|
...a
|
|
353
353
|
}) {
|
|
354
354
|
const n = [
|
|
355
|
-
|
|
355
|
+
s,
|
|
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 (t) {
|
|
363
363
|
case "error":
|
|
364
364
|
n.push("bg-red-light", "text-red-dark", "font-bold");
|
|
365
365
|
break;
|
|
@@ -371,15 +371,15 @@ function R({
|
|
|
371
371
|
n.push("bg-blue-light", "text-blue-dark", "font-bold");
|
|
372
372
|
break;
|
|
373
373
|
}
|
|
374
|
-
return /* @__PURE__ */
|
|
374
|
+
return /* @__PURE__ */ e.jsx("button", { className: n.join(" "), ...a });
|
|
375
375
|
}
|
|
376
|
-
function
|
|
377
|
-
const a = [
|
|
378
|
-
return /* @__PURE__ */
|
|
376
|
+
function xe({ className: s, ...t }) {
|
|
377
|
+
const a = [s, "p-large", "bg-bg", "rounded", "shadow-card"];
|
|
378
|
+
return /* @__PURE__ */ e.jsx("div", { className: a.join(" "), ...t });
|
|
379
379
|
}
|
|
380
|
-
function
|
|
381
|
-
variant:
|
|
382
|
-
className:
|
|
380
|
+
function ye({
|
|
381
|
+
variant: s = "neutral",
|
|
382
|
+
className: t = "",
|
|
383
383
|
children: a,
|
|
384
384
|
...n
|
|
385
385
|
}) {
|
|
@@ -400,10 +400,10 @@ function pe({
|
|
|
400
400
|
neutral: "bg-gray-100 text-gray-800 border-gray-500"
|
|
401
401
|
}, i = [
|
|
402
402
|
...l,
|
|
403
|
-
o[
|
|
404
|
-
|
|
403
|
+
o[s],
|
|
404
|
+
t
|
|
405
405
|
].filter(Boolean).join(" ");
|
|
406
|
-
return /* @__PURE__ */
|
|
406
|
+
return /* @__PURE__ */ e.jsx(
|
|
407
407
|
"span",
|
|
408
408
|
{
|
|
409
409
|
role: "status",
|
|
@@ -414,9 +414,9 @@ function pe({
|
|
|
414
414
|
}
|
|
415
415
|
);
|
|
416
416
|
}
|
|
417
|
-
function
|
|
418
|
-
options:
|
|
419
|
-
placeholder:
|
|
417
|
+
function Ne({
|
|
418
|
+
options: s,
|
|
419
|
+
placeholder: t,
|
|
420
420
|
error: a = !1,
|
|
421
421
|
className: n = "",
|
|
422
422
|
...l
|
|
@@ -437,7 +437,7 @@ function ve({
|
|
|
437
437
|
i,
|
|
438
438
|
n
|
|
439
439
|
].filter(Boolean).join(" ");
|
|
440
|
-
return /* @__PURE__ */
|
|
440
|
+
return /* @__PURE__ */ e.jsxs(
|
|
441
441
|
"select",
|
|
442
442
|
{
|
|
443
443
|
className: c,
|
|
@@ -445,23 +445,23 @@ function ve({
|
|
|
445
445
|
"aria-describedby": a ? `${l.id}-error` : void 0,
|
|
446
446
|
...l,
|
|
447
447
|
children: [
|
|
448
|
-
|
|
449
|
-
|
|
448
|
+
t && /* @__PURE__ */ e.jsx("option", { value: "", disabled: !0, children: t }),
|
|
449
|
+
s.map((d) => /* @__PURE__ */ e.jsx(
|
|
450
450
|
"option",
|
|
451
451
|
{
|
|
452
|
-
value:
|
|
453
|
-
disabled:
|
|
454
|
-
children:
|
|
452
|
+
value: d.value,
|
|
453
|
+
disabled: d.disabled,
|
|
454
|
+
children: d.label
|
|
455
455
|
},
|
|
456
|
-
|
|
456
|
+
d.value
|
|
457
457
|
))
|
|
458
458
|
]
|
|
459
459
|
}
|
|
460
460
|
);
|
|
461
461
|
}
|
|
462
|
-
function
|
|
463
|
-
error:
|
|
464
|
-
resize:
|
|
462
|
+
function we({
|
|
463
|
+
error: s = !1,
|
|
464
|
+
resize: t = "vertical",
|
|
465
465
|
className: a = "",
|
|
466
466
|
...n
|
|
467
467
|
}) {
|
|
@@ -481,25 +481,25 @@ function ge({
|
|
|
481
481
|
both: "resize",
|
|
482
482
|
horizontal: "resize-x",
|
|
483
483
|
vertical: "resize-y"
|
|
484
|
-
}, i =
|
|
484
|
+
}, i = s ? "border-red-500 focus:ring-red-500" : "border-gray-300 focus:ring-indigo-500", c = [
|
|
485
485
|
...l,
|
|
486
|
-
o[
|
|
486
|
+
o[t],
|
|
487
487
|
i,
|
|
488
488
|
a
|
|
489
489
|
].filter(Boolean).join(" ");
|
|
490
|
-
return /* @__PURE__ */
|
|
490
|
+
return /* @__PURE__ */ e.jsx(
|
|
491
491
|
"textarea",
|
|
492
492
|
{
|
|
493
493
|
className: c,
|
|
494
|
-
"aria-invalid":
|
|
495
|
-
"aria-describedby":
|
|
494
|
+
"aria-invalid": s,
|
|
495
|
+
"aria-describedby": s && n.id ? `${n.id}-error` : void 0,
|
|
496
496
|
...n
|
|
497
497
|
}
|
|
498
498
|
);
|
|
499
499
|
}
|
|
500
|
-
function
|
|
501
|
-
variant:
|
|
502
|
-
className:
|
|
500
|
+
function ke({
|
|
501
|
+
variant: s = "default",
|
|
502
|
+
className: t = "",
|
|
503
503
|
children: a,
|
|
504
504
|
...n
|
|
505
505
|
}) {
|
|
@@ -514,14 +514,14 @@ function ye({
|
|
|
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[s],
|
|
518
|
+
t
|
|
519
519
|
].filter(Boolean).join(" ");
|
|
520
|
-
return /* @__PURE__ */
|
|
520
|
+
return /* @__PURE__ */ e.jsx("label", { className: i, ...n, children: a });
|
|
521
521
|
}
|
|
522
|
-
function
|
|
523
|
-
message:
|
|
524
|
-
id:
|
|
522
|
+
function Ce({
|
|
523
|
+
message: s,
|
|
524
|
+
id: t,
|
|
525
525
|
className: a = "",
|
|
526
526
|
...n
|
|
527
527
|
}) {
|
|
@@ -536,23 +536,23 @@ function je({
|
|
|
536
536
|
],
|
|
537
537
|
a
|
|
538
538
|
].filter(Boolean).join(" ");
|
|
539
|
-
return /* @__PURE__ */
|
|
539
|
+
return /* @__PURE__ */ e.jsxs(
|
|
540
540
|
"div",
|
|
541
541
|
{
|
|
542
542
|
role: "alert",
|
|
543
|
-
id:
|
|
543
|
+
id: t,
|
|
544
544
|
className: o,
|
|
545
545
|
"aria-live": "polite",
|
|
546
546
|
...n,
|
|
547
547
|
children: [
|
|
548
|
-
/* @__PURE__ */
|
|
548
|
+
/* @__PURE__ */ e.jsx(
|
|
549
549
|
"svg",
|
|
550
550
|
{
|
|
551
551
|
className: "h-4 w-4 flex-shrink-0",
|
|
552
552
|
fill: "currentColor",
|
|
553
553
|
viewBox: "0 0 20 20",
|
|
554
554
|
"aria-hidden": "true",
|
|
555
|
-
children: /* @__PURE__ */
|
|
555
|
+
children: /* @__PURE__ */ e.jsx(
|
|
556
556
|
"path",
|
|
557
557
|
{
|
|
558
558
|
fillRule: "evenodd",
|
|
@@ -562,18 +562,19 @@ function je({
|
|
|
562
562
|
)
|
|
563
563
|
}
|
|
564
564
|
),
|
|
565
|
-
/* @__PURE__ */
|
|
565
|
+
/* @__PURE__ */ e.jsx("span", { children: s })
|
|
566
566
|
]
|
|
567
567
|
}
|
|
568
568
|
);
|
|
569
569
|
}
|
|
570
|
-
function
|
|
571
|
-
variant:
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
570
|
+
function be({
|
|
571
|
+
variant: s = "default",
|
|
572
|
+
icon: t,
|
|
573
|
+
className: a = "",
|
|
574
|
+
children: n,
|
|
575
|
+
...l
|
|
575
576
|
}) {
|
|
576
|
-
const
|
|
577
|
+
const o = [
|
|
577
578
|
"inline-flex",
|
|
578
579
|
"items-center",
|
|
579
580
|
"px-1",
|
|
@@ -582,63 +583,69 @@ function me({
|
|
|
582
583
|
"text-sm",
|
|
583
584
|
"font-medium",
|
|
584
585
|
"transition-colors"
|
|
585
|
-
],
|
|
586
|
+
], i = {
|
|
586
587
|
default: "border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700",
|
|
587
588
|
active: "border-indigo-500 text-gray-900",
|
|
588
589
|
disabled: "border-transparent text-gray-300 cursor-not-allowed pointer-events-none"
|
|
589
|
-
},
|
|
590
|
-
...
|
|
591
|
-
|
|
592
|
-
|
|
590
|
+
}, c = [
|
|
591
|
+
...o,
|
|
592
|
+
i[s],
|
|
593
|
+
a
|
|
593
594
|
].filter(Boolean).join(" ");
|
|
594
|
-
return
|
|
595
|
+
return s === "disabled" ? /* @__PURE__ */ e.jsxs("span", { className: c, "aria-disabled": "true", children: [
|
|
596
|
+
t && /* @__PURE__ */ e.jsx("span", { className: "flex-shrink-0", children: t }),
|
|
597
|
+
n
|
|
598
|
+
] }) : /* @__PURE__ */ e.jsxs("a", { className: c, ...l, children: [
|
|
599
|
+
t && /* @__PURE__ */ e.jsx("span", { className: "flex-shrink-0", children: t }),
|
|
600
|
+
n
|
|
601
|
+
] });
|
|
595
602
|
}
|
|
596
|
-
function
|
|
597
|
-
content:
|
|
598
|
-
children:
|
|
603
|
+
function Ee({
|
|
604
|
+
content: s,
|
|
605
|
+
children: t,
|
|
599
606
|
position: a = "top",
|
|
600
607
|
delay: n = 200,
|
|
601
608
|
className: l = "",
|
|
602
609
|
...o
|
|
603
610
|
}) {
|
|
604
|
-
const [i, c] =
|
|
611
|
+
const [i, c] = Y(!1), [d, b] = Y(null), j = () => {
|
|
605
612
|
const N = setTimeout(() => {
|
|
606
613
|
c(!0);
|
|
607
614
|
}, n);
|
|
608
|
-
|
|
615
|
+
b(N);
|
|
609
616
|
}, m = () => {
|
|
610
|
-
|
|
617
|
+
d && (clearTimeout(d), b(null)), c(!1);
|
|
611
618
|
}, x = {
|
|
612
619
|
top: "bottom-full left-1/2 transform -translate-x-1/2 mb-2",
|
|
613
620
|
bottom: "top-full left-1/2 transform -translate-x-1/2 mt-2",
|
|
614
621
|
left: "right-full top-1/2 transform -translate-y-1/2 mr-2",
|
|
615
622
|
right: "left-full top-1/2 transform -translate-y-1/2 ml-2"
|
|
616
|
-
},
|
|
623
|
+
}, y = {
|
|
617
624
|
top: "top-full left-1/2 transform -translate-x-1/2 border-t-gray-900",
|
|
618
625
|
bottom: "bottom-full left-1/2 transform -translate-x-1/2 border-b-gray-900",
|
|
619
626
|
left: "left-full top-1/2 transform -translate-y-1/2 border-l-gray-900",
|
|
620
627
|
right: "right-full top-1/2 transform -translate-y-1/2 border-r-gray-900"
|
|
621
628
|
};
|
|
622
|
-
return /* @__PURE__ */
|
|
629
|
+
return /* @__PURE__ */ e.jsxs(
|
|
623
630
|
"div",
|
|
624
631
|
{
|
|
625
632
|
className: `relative inline-block ${l}`,
|
|
626
|
-
onMouseEnter:
|
|
633
|
+
onMouseEnter: j,
|
|
627
634
|
onMouseLeave: m,
|
|
628
635
|
...o,
|
|
629
636
|
children: [
|
|
630
|
-
|
|
631
|
-
i && /* @__PURE__ */
|
|
637
|
+
t,
|
|
638
|
+
i && /* @__PURE__ */ e.jsxs(
|
|
632
639
|
"div",
|
|
633
640
|
{
|
|
634
641
|
className: `absolute z-50 px-2 py-1 text-xs text-white bg-gray-900 rounded shadow-lg whitespace-nowrap ${x[a]}`,
|
|
635
642
|
role: "tooltip",
|
|
636
643
|
children: [
|
|
637
|
-
|
|
638
|
-
/* @__PURE__ */
|
|
644
|
+
s,
|
|
645
|
+
/* @__PURE__ */ e.jsx(
|
|
639
646
|
"div",
|
|
640
647
|
{
|
|
641
|
-
className: `absolute w-0 h-0 border-4 border-transparent ${
|
|
648
|
+
className: `absolute w-0 h-0 border-4 border-transparent ${y[a]}`
|
|
642
649
|
}
|
|
643
650
|
)
|
|
644
651
|
]
|
|
@@ -648,9 +655,9 @@ function Ne({
|
|
|
648
655
|
}
|
|
649
656
|
);
|
|
650
657
|
}
|
|
651
|
-
function
|
|
652
|
-
variant:
|
|
653
|
-
width:
|
|
658
|
+
function _e({
|
|
659
|
+
variant: s = "text",
|
|
660
|
+
width: t,
|
|
654
661
|
height: a,
|
|
655
662
|
lines: n = 1,
|
|
656
663
|
className: l = "",
|
|
@@ -665,29 +672,57 @@ function we({
|
|
|
665
672
|
card: "h-32",
|
|
666
673
|
list: "h-12",
|
|
667
674
|
circle: "rounded-full"
|
|
668
|
-
},
|
|
675
|
+
}, d = [
|
|
669
676
|
...i,
|
|
670
|
-
c[
|
|
677
|
+
c[s],
|
|
671
678
|
l
|
|
672
|
-
].filter(Boolean).join(" "),
|
|
673
|
-
return
|
|
679
|
+
].filter(Boolean).join(" "), b = {};
|
|
680
|
+
return t && (b.width = t), a && (b.height = a), s === "text" && n > 1 ? /* @__PURE__ */ e.jsx("div", { className: "space-y-2", ...o, children: Array.from({ length: n }).map((j, m) => /* @__PURE__ */ e.jsx(
|
|
674
681
|
"div",
|
|
675
682
|
{
|
|
676
|
-
className:
|
|
677
|
-
style: m === n - 1 ? { width: "75%" } :
|
|
683
|
+
className: d,
|
|
684
|
+
style: m === n - 1 ? { width: "75%" } : b
|
|
678
685
|
},
|
|
679
686
|
m
|
|
680
|
-
)) }) : /* @__PURE__ */
|
|
687
|
+
)) }) : /* @__PURE__ */ e.jsx("div", { className: d, style: b, ...o });
|
|
681
688
|
}
|
|
682
|
-
function
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
689
|
+
function he({
|
|
690
|
+
href: s,
|
|
691
|
+
isActive: t = !1,
|
|
692
|
+
icon: a,
|
|
693
|
+
children: n,
|
|
694
|
+
className: l = "",
|
|
695
|
+
...o
|
|
696
|
+
}) {
|
|
697
|
+
const i = [
|
|
698
|
+
"flex",
|
|
699
|
+
"items-center",
|
|
700
|
+
"px-4",
|
|
701
|
+
"py-2",
|
|
702
|
+
"text-sm",
|
|
703
|
+
"font-medium",
|
|
704
|
+
"rounded-md",
|
|
705
|
+
"transition-colors",
|
|
706
|
+
"hover:bg-gray-100"
|
|
707
|
+
], c = t ? "bg-indigo-50 text-indigo-700 border-r-2 border-indigo-600" : "text-gray-700 hover:text-gray-900", d = [
|
|
708
|
+
...i,
|
|
709
|
+
c,
|
|
710
|
+
l
|
|
711
|
+
].filter(Boolean).join(" ");
|
|
712
|
+
return /* @__PURE__ */ e.jsxs("a", { href: s, className: d, ...o, children: [
|
|
713
|
+
a && /* @__PURE__ */ e.jsx("span", { className: "mr-3 flex-shrink-0", children: a }),
|
|
714
|
+
/* @__PURE__ */ e.jsx("span", { children: n })
|
|
686
715
|
] });
|
|
687
716
|
}
|
|
688
|
-
function
|
|
689
|
-
|
|
690
|
-
|
|
717
|
+
function Z({ label: s, ...t }) {
|
|
718
|
+
return t.id || console.error("InputWithLabel component requires an id prop"), /* @__PURE__ */ e.jsxs("div", { className: "mb-medium grid gap-small", children: [
|
|
719
|
+
/* @__PURE__ */ e.jsx(T, { as: "label", htmlFor: t.id, className: "cursor-pointer", children: s }),
|
|
720
|
+
/* @__PURE__ */ e.jsx(me, { ...t })
|
|
721
|
+
] });
|
|
722
|
+
}
|
|
723
|
+
function Re({
|
|
724
|
+
variant: s = "default",
|
|
725
|
+
padding: t = "medium",
|
|
691
726
|
className: a = "",
|
|
692
727
|
children: n,
|
|
693
728
|
...l
|
|
@@ -707,41 +742,41 @@ function ke({
|
|
|
707
742
|
small: "p-2",
|
|
708
743
|
medium: "p-4",
|
|
709
744
|
large: "p-6"
|
|
710
|
-
},
|
|
745
|
+
}, d = [
|
|
711
746
|
...o,
|
|
712
|
-
i[
|
|
713
|
-
c[
|
|
747
|
+
i[s],
|
|
748
|
+
c[t],
|
|
714
749
|
a
|
|
715
750
|
].filter(Boolean).join(" ");
|
|
716
|
-
return /* @__PURE__ */
|
|
751
|
+
return /* @__PURE__ */ e.jsx("div", { className: d, ...l, children: n });
|
|
717
752
|
}
|
|
718
|
-
function
|
|
719
|
-
children:
|
|
720
|
-
onSubmit:
|
|
753
|
+
function Te({
|
|
754
|
+
children: s,
|
|
755
|
+
onSubmit: t,
|
|
721
756
|
loading: a = !1,
|
|
722
757
|
error: n = null,
|
|
723
758
|
success: l = null,
|
|
724
759
|
className: o = "",
|
|
725
760
|
...i
|
|
726
761
|
}) {
|
|
727
|
-
const
|
|
762
|
+
const d = [
|
|
728
763
|
...[
|
|
729
764
|
"space-y-4"
|
|
730
765
|
],
|
|
731
766
|
o
|
|
732
|
-
].filter(Boolean).join(" "),
|
|
733
|
-
|
|
767
|
+
].filter(Boolean).join(" "), b = (j) => {
|
|
768
|
+
j.preventDefault(), t && !a && t(j);
|
|
734
769
|
};
|
|
735
|
-
return /* @__PURE__ */
|
|
770
|
+
return /* @__PURE__ */ e.jsxs(
|
|
736
771
|
"form",
|
|
737
772
|
{
|
|
738
|
-
className:
|
|
739
|
-
onSubmit:
|
|
773
|
+
className: d,
|
|
774
|
+
onSubmit: b,
|
|
740
775
|
noValidate: !0,
|
|
741
776
|
...i,
|
|
742
777
|
children: [
|
|
743
|
-
|
|
744
|
-
n && /* @__PURE__ */
|
|
778
|
+
s,
|
|
779
|
+
n && /* @__PURE__ */ e.jsx(
|
|
745
780
|
"div",
|
|
746
781
|
{
|
|
747
782
|
role: "alert",
|
|
@@ -749,7 +784,7 @@ function Ee({
|
|
|
749
784
|
children: n
|
|
750
785
|
}
|
|
751
786
|
),
|
|
752
|
-
l && /* @__PURE__ */
|
|
787
|
+
l && /* @__PURE__ */ e.jsx(
|
|
753
788
|
"div",
|
|
754
789
|
{
|
|
755
790
|
role: "alert",
|
|
@@ -761,9 +796,9 @@ function Ee({
|
|
|
761
796
|
}
|
|
762
797
|
);
|
|
763
798
|
}
|
|
764
|
-
function
|
|
765
|
-
items:
|
|
766
|
-
separator:
|
|
799
|
+
function Se({
|
|
800
|
+
items: s,
|
|
801
|
+
separator: t = "/",
|
|
767
802
|
className: a = "",
|
|
768
803
|
...n
|
|
769
804
|
}) {
|
|
@@ -776,17 +811,17 @@ function _e({
|
|
|
776
811
|
],
|
|
777
812
|
a
|
|
778
813
|
].filter(Boolean).join(" ");
|
|
779
|
-
return /* @__PURE__ */
|
|
780
|
-
const
|
|
781
|
-
return /* @__PURE__ */
|
|
782
|
-
c > 0 && /* @__PURE__ */
|
|
783
|
-
|
|
814
|
+
return /* @__PURE__ */ e.jsx("nav", { "aria-label": "Breadcrumb", className: o, ...n, children: /* @__PURE__ */ e.jsx("ol", { className: "flex items-center space-x-2", children: s.map((i, c) => {
|
|
815
|
+
const d = c === s.length - 1;
|
|
816
|
+
return /* @__PURE__ */ e.jsxs("li", { className: "flex items-center", children: [
|
|
817
|
+
c > 0 && /* @__PURE__ */ e.jsx("span", { className: "mx-2 text-gray-400", "aria-hidden": "true", children: t }),
|
|
818
|
+
d ? /* @__PURE__ */ e.jsx("span", { className: "text-gray-900 font-medium", "aria-current": "page", children: i.label }) : i.href ? /* @__PURE__ */ e.jsx(be, { href: i.href, variant: "default", children: i.label }) : /* @__PURE__ */ e.jsx("span", { className: "text-gray-500", children: i.label })
|
|
784
819
|
] }, c);
|
|
785
820
|
}) }) });
|
|
786
821
|
}
|
|
787
|
-
function
|
|
788
|
-
currentPage:
|
|
789
|
-
totalPages:
|
|
822
|
+
function Ae({
|
|
823
|
+
currentPage: s,
|
|
824
|
+
totalPages: t,
|
|
790
825
|
onPageChange: a,
|
|
791
826
|
totalItems: n,
|
|
792
827
|
itemsPerPage: l,
|
|
@@ -794,33 +829,33 @@ function Ce({
|
|
|
794
829
|
className: i = "",
|
|
795
830
|
...c
|
|
796
831
|
}) {
|
|
797
|
-
const
|
|
798
|
-
|
|
799
|
-
},
|
|
800
|
-
|
|
801
|
-
},
|
|
802
|
-
f >= 1 && f <=
|
|
832
|
+
const d = () => {
|
|
833
|
+
s > 1 && a(s - 1);
|
|
834
|
+
}, b = () => {
|
|
835
|
+
s < t && a(s + 1);
|
|
836
|
+
}, j = (f) => {
|
|
837
|
+
f >= 1 && f <= t && f !== s && a(f);
|
|
803
838
|
}, m = () => {
|
|
804
839
|
const f = [];
|
|
805
|
-
if (
|
|
806
|
-
for (let
|
|
807
|
-
f.push(
|
|
808
|
-
else if (
|
|
809
|
-
for (let
|
|
810
|
-
f.push(
|
|
811
|
-
f.push("ellipsis"), f.push(
|
|
812
|
-
} else if (
|
|
840
|
+
if (t <= 5)
|
|
841
|
+
for (let h = 1; h <= t; h++)
|
|
842
|
+
f.push(h);
|
|
843
|
+
else if (s <= 3) {
|
|
844
|
+
for (let h = 1; h <= 4; h++)
|
|
845
|
+
f.push(h);
|
|
846
|
+
f.push("ellipsis"), f.push(t);
|
|
847
|
+
} else if (s >= t - 2) {
|
|
813
848
|
f.push(1), f.push("ellipsis");
|
|
814
|
-
for (let
|
|
815
|
-
f.push(
|
|
849
|
+
for (let h = t - 3; h <= t; h++)
|
|
850
|
+
f.push(h);
|
|
816
851
|
} else {
|
|
817
852
|
f.push(1), f.push("ellipsis");
|
|
818
|
-
for (let
|
|
819
|
-
f.push(
|
|
820
|
-
f.push("ellipsis"), f.push(
|
|
853
|
+
for (let h = s - 1; h <= s + 1; h++)
|
|
854
|
+
f.push(h);
|
|
855
|
+
f.push("ellipsis"), f.push(t);
|
|
821
856
|
}
|
|
822
857
|
return f;
|
|
823
|
-
}, x = n && l ? (
|
|
858
|
+
}, x = n && l ? (s - 1) * l + 1 : void 0, y = n && l ? Math.min(s * l, n) : void 0, w = [
|
|
824
859
|
...[
|
|
825
860
|
"flex",
|
|
826
861
|
"items-center",
|
|
@@ -830,59 +865,59 @@ function Ce({
|
|
|
830
865
|
],
|
|
831
866
|
i
|
|
832
867
|
].filter(Boolean).join(" ");
|
|
833
|
-
return /* @__PURE__ */
|
|
834
|
-
/* @__PURE__ */
|
|
835
|
-
/* @__PURE__ */
|
|
836
|
-
|
|
868
|
+
return /* @__PURE__ */ e.jsxs("nav", { className: w, "aria-label": "Pagination", ...c, children: [
|
|
869
|
+
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
870
|
+
/* @__PURE__ */ e.jsx(
|
|
871
|
+
E,
|
|
837
872
|
{
|
|
838
873
|
variant: "secondary",
|
|
839
|
-
onClick:
|
|
840
|
-
disabled:
|
|
874
|
+
onClick: d,
|
|
875
|
+
disabled: s === 1,
|
|
841
876
|
className: "px-3 py-1 text-sm",
|
|
842
877
|
children: "Previous"
|
|
843
878
|
}
|
|
844
879
|
),
|
|
845
|
-
/* @__PURE__ */
|
|
880
|
+
/* @__PURE__ */ e.jsx("div", { className: "flex items-center gap-1", children: m().map((f, k) => {
|
|
846
881
|
if (f === "ellipsis")
|
|
847
|
-
return /* @__PURE__ */
|
|
848
|
-
const
|
|
849
|
-
return /* @__PURE__ */
|
|
882
|
+
return /* @__PURE__ */ e.jsx("span", { className: "px-2 text-gray-500", children: "..." }, `ellipsis-${k}`);
|
|
883
|
+
const h = f, S = h === s;
|
|
884
|
+
return /* @__PURE__ */ e.jsx(
|
|
850
885
|
"button",
|
|
851
886
|
{
|
|
852
|
-
onClick: () =>
|
|
853
|
-
className: `px-3 py-1 text-sm rounded ${
|
|
854
|
-
"aria-current":
|
|
855
|
-
"aria-label": `Go to page ${
|
|
856
|
-
children:
|
|
887
|
+
onClick: () => j(h),
|
|
888
|
+
className: `px-3 py-1 text-sm rounded ${S ? "bg-indigo-600 text-white" : "text-gray-700 hover:bg-gray-100"}`,
|
|
889
|
+
"aria-current": S ? "page" : void 0,
|
|
890
|
+
"aria-label": `Go to page ${h}`,
|
|
891
|
+
children: h
|
|
857
892
|
},
|
|
858
|
-
|
|
893
|
+
h
|
|
859
894
|
);
|
|
860
895
|
}) }),
|
|
861
|
-
/* @__PURE__ */
|
|
862
|
-
|
|
896
|
+
/* @__PURE__ */ e.jsx(
|
|
897
|
+
E,
|
|
863
898
|
{
|
|
864
899
|
variant: "secondary",
|
|
865
|
-
onClick:
|
|
866
|
-
disabled:
|
|
900
|
+
onClick: b,
|
|
901
|
+
disabled: s === t,
|
|
867
902
|
className: "px-3 py-1 text-sm",
|
|
868
903
|
children: "Next"
|
|
869
904
|
}
|
|
870
905
|
)
|
|
871
906
|
] }),
|
|
872
|
-
o && n && l && /* @__PURE__ */
|
|
907
|
+
o && n && l && /* @__PURE__ */ e.jsxs("div", { className: "text-sm text-gray-700", children: [
|
|
873
908
|
"Showing ",
|
|
874
909
|
x,
|
|
875
910
|
" to ",
|
|
876
|
-
|
|
911
|
+
y,
|
|
877
912
|
" of ",
|
|
878
913
|
n,
|
|
879
914
|
" results"
|
|
880
915
|
] })
|
|
881
916
|
] });
|
|
882
917
|
}
|
|
883
|
-
function
|
|
884
|
-
title:
|
|
885
|
-
message:
|
|
918
|
+
function Oe({
|
|
919
|
+
title: s,
|
|
920
|
+
message: t,
|
|
886
921
|
actionLabel: a,
|
|
887
922
|
onAction: n,
|
|
888
923
|
illustration: l,
|
|
@@ -890,7 +925,7 @@ function Re({
|
|
|
890
925
|
className: i = "",
|
|
891
926
|
...c
|
|
892
927
|
}) {
|
|
893
|
-
const
|
|
928
|
+
const b = [
|
|
894
929
|
...[
|
|
895
930
|
"flex",
|
|
896
931
|
"flex-col",
|
|
@@ -901,52 +936,52 @@ function Re({
|
|
|
901
936
|
"px-4"
|
|
902
937
|
],
|
|
903
938
|
i
|
|
904
|
-
].filter(Boolean).join(" "),
|
|
905
|
-
return /* @__PURE__ */
|
|
906
|
-
m && l && /* @__PURE__ */
|
|
907
|
-
/* @__PURE__ */
|
|
908
|
-
/* @__PURE__ */
|
|
909
|
-
|
|
939
|
+
].filter(Boolean).join(" "), j = o === "withAction" || a && n, m = o === "withIllustration" || l;
|
|
940
|
+
return /* @__PURE__ */ e.jsxs("div", { className: b, ...c, children: [
|
|
941
|
+
m && l && /* @__PURE__ */ e.jsx("div", { className: "mb-4", children: l }),
|
|
942
|
+
/* @__PURE__ */ e.jsx(T, { as: "h3", className: "text-lg font-semibold text-gray-900 mb-2", children: s }),
|
|
943
|
+
/* @__PURE__ */ e.jsx(T, { as: "p", className: "text-sm text-gray-500 mb-6 max-w-sm", children: t }),
|
|
944
|
+
j && a && n && /* @__PURE__ */ e.jsx(E, { variant: "regular", onClick: n, children: a })
|
|
910
945
|
] });
|
|
911
946
|
}
|
|
912
|
-
function
|
|
913
|
-
trigger:
|
|
914
|
-
items:
|
|
947
|
+
function Le({
|
|
948
|
+
trigger: s,
|
|
949
|
+
items: t,
|
|
915
950
|
align: a = "right",
|
|
916
951
|
variant: n = "default",
|
|
917
952
|
className: l = "",
|
|
918
953
|
...o
|
|
919
954
|
}) {
|
|
920
|
-
const [i, c] =
|
|
921
|
-
|
|
955
|
+
const [i, c] = Y(!1), d = z(null);
|
|
956
|
+
F(() => {
|
|
922
957
|
const m = (x) => {
|
|
923
|
-
|
|
958
|
+
d.current && !d.current.contains(x.target) && c(!1);
|
|
924
959
|
};
|
|
925
960
|
return i && document.addEventListener("mousedown", m), () => {
|
|
926
961
|
document.removeEventListener("mousedown", m);
|
|
927
962
|
};
|
|
928
963
|
}, [i]);
|
|
929
|
-
const
|
|
964
|
+
const b = (m) => {
|
|
930
965
|
m.disabled || (m.onClick(), c(!1));
|
|
931
|
-
},
|
|
932
|
-
return /* @__PURE__ */
|
|
933
|
-
/* @__PURE__ */
|
|
934
|
-
i && /* @__PURE__ */
|
|
935
|
-
/* @__PURE__ */
|
|
966
|
+
}, j = a === "right" ? "right-0" : "left-0";
|
|
967
|
+
return /* @__PURE__ */ e.jsxs("div", { className: `relative inline-block ${l}`, ref: d, ...o, children: [
|
|
968
|
+
/* @__PURE__ */ e.jsx("div", { onClick: () => c(!i), children: s }),
|
|
969
|
+
i && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
970
|
+
/* @__PURE__ */ e.jsx(
|
|
936
971
|
"div",
|
|
937
972
|
{
|
|
938
973
|
className: "fixed inset-0 z-10",
|
|
939
974
|
onClick: () => c(!1)
|
|
940
975
|
}
|
|
941
976
|
),
|
|
942
|
-
/* @__PURE__ */
|
|
977
|
+
/* @__PURE__ */ e.jsx(
|
|
943
978
|
"div",
|
|
944
979
|
{
|
|
945
|
-
className: `absolute z-20 mt-2 w-48 rounded-md shadow-lg bg-white ring-1 ring-black ring-opacity-5 ${
|
|
980
|
+
className: `absolute z-20 mt-2 w-48 rounded-md shadow-lg bg-white ring-1 ring-black ring-opacity-5 ${j}`,
|
|
946
981
|
role: "menu",
|
|
947
982
|
"aria-orientation": "vertical",
|
|
948
|
-
children: /* @__PURE__ */
|
|
949
|
-
const
|
|
983
|
+
children: /* @__PURE__ */ e.jsx("div", { className: "py-1", role: "none", children: t.map((m, x) => {
|
|
984
|
+
const y = [
|
|
950
985
|
"block",
|
|
951
986
|
"px-4",
|
|
952
987
|
"py-2",
|
|
@@ -955,12 +990,12 @@ function Te({
|
|
|
955
990
|
"text-left",
|
|
956
991
|
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
992
|
].filter(Boolean).join(" ");
|
|
958
|
-
return /* @__PURE__ */
|
|
993
|
+
return /* @__PURE__ */ e.jsx(
|
|
959
994
|
"button",
|
|
960
995
|
{
|
|
961
996
|
type: "button",
|
|
962
|
-
className:
|
|
963
|
-
onClick: () =>
|
|
997
|
+
className: y,
|
|
998
|
+
onClick: () => b(m),
|
|
964
999
|
disabled: m.disabled,
|
|
965
1000
|
role: "menuitem",
|
|
966
1001
|
children: m.label
|
|
@@ -973,12 +1008,123 @@ function Te({
|
|
|
973
1008
|
] })
|
|
974
1009
|
] });
|
|
975
1010
|
}
|
|
976
|
-
function
|
|
977
|
-
|
|
978
|
-
|
|
1011
|
+
function pe({
|
|
1012
|
+
title: s,
|
|
1013
|
+
children: t,
|
|
1014
|
+
className: a = "",
|
|
1015
|
+
...n
|
|
1016
|
+
}) {
|
|
1017
|
+
const o = [
|
|
1018
|
+
...[
|
|
1019
|
+
"space-y-1"
|
|
1020
|
+
],
|
|
1021
|
+
a
|
|
1022
|
+
].filter(Boolean).join(" ");
|
|
1023
|
+
return /* @__PURE__ */ e.jsxs("div", { className: o, ...n, children: [
|
|
1024
|
+
s && /* @__PURE__ */ e.jsx(T, { as: "h3", className: "px-4 py-2 text-xs font-semibold text-gray-500 uppercase tracking-wider", children: s }),
|
|
1025
|
+
/* @__PURE__ */ e.jsx("div", { className: "space-y-1", children: t })
|
|
1026
|
+
] });
|
|
1027
|
+
}
|
|
1028
|
+
function Q({
|
|
1029
|
+
title: s,
|
|
1030
|
+
onClose: t,
|
|
1031
|
+
showCloseButton: a = !1,
|
|
1032
|
+
children: n,
|
|
1033
|
+
className: l = "",
|
|
1034
|
+
...o
|
|
1035
|
+
}) {
|
|
1036
|
+
const c = [
|
|
1037
|
+
...[
|
|
1038
|
+
"flex",
|
|
1039
|
+
"items-center",
|
|
1040
|
+
"justify-between",
|
|
1041
|
+
"px-4",
|
|
1042
|
+
"py-4",
|
|
1043
|
+
"border-b",
|
|
1044
|
+
"border-gray-200"
|
|
1045
|
+
],
|
|
1046
|
+
l
|
|
1047
|
+
].filter(Boolean).join(" ");
|
|
1048
|
+
return /* @__PURE__ */ e.jsxs("div", { className: c, ...o, children: [
|
|
1049
|
+
/* @__PURE__ */ e.jsx(T, { as: "h2", className: "text-lg font-semibold text-gray-900", children: s }),
|
|
1050
|
+
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center space-x-2", children: [
|
|
1051
|
+
n,
|
|
1052
|
+
a && t && /* @__PURE__ */ e.jsx(
|
|
1053
|
+
E,
|
|
1054
|
+
{
|
|
1055
|
+
variant: "secondary",
|
|
1056
|
+
onClick: t,
|
|
1057
|
+
className: "p-1",
|
|
1058
|
+
"aria-label": "Close sidebar",
|
|
1059
|
+
children: /* @__PURE__ */ e.jsx(
|
|
1060
|
+
"svg",
|
|
1061
|
+
{
|
|
1062
|
+
className: "h-5 w-5",
|
|
1063
|
+
fill: "none",
|
|
1064
|
+
viewBox: "0 0 24 24",
|
|
1065
|
+
stroke: "currentColor",
|
|
1066
|
+
children: /* @__PURE__ */ e.jsx(
|
|
1067
|
+
"path",
|
|
1068
|
+
{
|
|
1069
|
+
strokeLinecap: "round",
|
|
1070
|
+
strokeLinejoin: "round",
|
|
1071
|
+
strokeWidth: 2,
|
|
1072
|
+
d: "M6 18L18 6M6 6l12 12"
|
|
1073
|
+
}
|
|
1074
|
+
)
|
|
1075
|
+
}
|
|
1076
|
+
)
|
|
1077
|
+
}
|
|
1078
|
+
)
|
|
1079
|
+
] })
|
|
1080
|
+
] });
|
|
1081
|
+
}
|
|
1082
|
+
function Be({
|
|
1083
|
+
label: s,
|
|
1084
|
+
isActive: t = !1,
|
|
1085
|
+
icon: a,
|
|
1086
|
+
onClick: n,
|
|
1087
|
+
className: l = "",
|
|
1088
|
+
children: o,
|
|
1089
|
+
...i
|
|
1090
|
+
}) {
|
|
1091
|
+
const c = [
|
|
1092
|
+
"inline-flex",
|
|
1093
|
+
"items-center",
|
|
1094
|
+
"px-3",
|
|
1095
|
+
"py-2",
|
|
1096
|
+
"text-sm",
|
|
1097
|
+
"font-medium",
|
|
1098
|
+
"rounded-md",
|
|
1099
|
+
"transition-colors"
|
|
1100
|
+
], d = t ? "bg-indigo-100 text-indigo-700 border-b-2 border-indigo-600" : "text-gray-600 hover:bg-gray-100 hover:text-gray-900", b = [
|
|
1101
|
+
...c,
|
|
1102
|
+
d,
|
|
1103
|
+
l
|
|
1104
|
+
].filter(Boolean).join(" ");
|
|
1105
|
+
return /* @__PURE__ */ e.jsxs(
|
|
1106
|
+
"button",
|
|
1107
|
+
{
|
|
1108
|
+
type: "button",
|
|
1109
|
+
className: b,
|
|
1110
|
+
onClick: n,
|
|
1111
|
+
"aria-expanded": t,
|
|
1112
|
+
"aria-haspopup": "true",
|
|
1113
|
+
...i,
|
|
1114
|
+
children: [
|
|
1115
|
+
a && /* @__PURE__ */ e.jsx("span", { className: "mr-2", children: a }),
|
|
1116
|
+
/* @__PURE__ */ e.jsx("span", { children: s }),
|
|
1117
|
+
o
|
|
1118
|
+
]
|
|
1119
|
+
}
|
|
1120
|
+
);
|
|
1121
|
+
}
|
|
1122
|
+
function $e({
|
|
1123
|
+
onForgotPasswordClick: s,
|
|
1124
|
+
className: t,
|
|
979
1125
|
...a
|
|
980
1126
|
}) {
|
|
981
|
-
return /* @__PURE__ */
|
|
1127
|
+
return /* @__PURE__ */ e.jsx(xe, { className: t, children: /* @__PURE__ */ e.jsxs(
|
|
982
1128
|
"form",
|
|
983
1129
|
{
|
|
984
1130
|
...a,
|
|
@@ -986,16 +1132,16 @@ function Se({
|
|
|
986
1132
|
n.preventDefault(), a.onSubmit && a.onSubmit(n);
|
|
987
1133
|
},
|
|
988
1134
|
children: [
|
|
989
|
-
/* @__PURE__ */
|
|
990
|
-
|
|
1135
|
+
/* @__PURE__ */ e.jsx(
|
|
1136
|
+
Z,
|
|
991
1137
|
{
|
|
992
1138
|
id: "login-email",
|
|
993
1139
|
label: "Your email",
|
|
994
1140
|
placeholder: "myname@email.com"
|
|
995
1141
|
}
|
|
996
1142
|
),
|
|
997
|
-
/* @__PURE__ */
|
|
998
|
-
|
|
1143
|
+
/* @__PURE__ */ e.jsx(
|
|
1144
|
+
Z,
|
|
999
1145
|
{
|
|
1000
1146
|
id: "login-password",
|
|
1001
1147
|
label: "Your password",
|
|
@@ -1003,48 +1149,48 @@ function Se({
|
|
|
1003
1149
|
type: "password"
|
|
1004
1150
|
}
|
|
1005
1151
|
),
|
|
1006
|
-
/* @__PURE__ */
|
|
1007
|
-
/* @__PURE__ */
|
|
1008
|
-
|
|
1152
|
+
/* @__PURE__ */ e.jsxs("div", { className: "flex justify-between", children: [
|
|
1153
|
+
/* @__PURE__ */ e.jsx(
|
|
1154
|
+
E,
|
|
1009
1155
|
{
|
|
1010
1156
|
variant: "secondary",
|
|
1011
1157
|
type: "button",
|
|
1012
|
-
onClick:
|
|
1158
|
+
onClick: s,
|
|
1013
1159
|
children: "Forgot password?"
|
|
1014
1160
|
}
|
|
1015
1161
|
),
|
|
1016
|
-
/* @__PURE__ */
|
|
1162
|
+
/* @__PURE__ */ e.jsx(E, { variant: "regular", type: "submit", children: "Sign in" })
|
|
1017
1163
|
] })
|
|
1018
1164
|
]
|
|
1019
1165
|
}
|
|
1020
1166
|
) });
|
|
1021
1167
|
}
|
|
1022
|
-
function
|
|
1023
|
-
isOpen:
|
|
1024
|
-
onClose:
|
|
1168
|
+
function Ie({
|
|
1169
|
+
isOpen: s,
|
|
1170
|
+
onClose: t,
|
|
1025
1171
|
title: a,
|
|
1026
1172
|
children: n,
|
|
1027
1173
|
variant: l = "default",
|
|
1028
1174
|
showCloseButton: o = !0,
|
|
1029
1175
|
footer: i,
|
|
1030
1176
|
className: c = "",
|
|
1031
|
-
...
|
|
1177
|
+
...d
|
|
1032
1178
|
}) {
|
|
1033
|
-
const
|
|
1034
|
-
if (
|
|
1035
|
-
if (!
|
|
1036
|
-
|
|
1179
|
+
const b = z(null), j = z(null);
|
|
1180
|
+
if (F(() => {
|
|
1181
|
+
if (!s) return;
|
|
1182
|
+
j.current = document.activeElement;
|
|
1037
1183
|
const f = setTimeout(() => {
|
|
1038
|
-
|
|
1039
|
-
}, 0), k = (
|
|
1040
|
-
|
|
1184
|
+
b.current?.focus();
|
|
1185
|
+
}, 0), k = (h) => {
|
|
1186
|
+
h.key === "Escape" && t();
|
|
1041
1187
|
};
|
|
1042
1188
|
return document.addEventListener("keydown", k), () => {
|
|
1043
|
-
clearTimeout(f), document.removeEventListener("keydown", k),
|
|
1189
|
+
clearTimeout(f), document.removeEventListener("keydown", k), j.current?.focus();
|
|
1044
1190
|
};
|
|
1045
|
-
}, [
|
|
1191
|
+
}, [s, t]), F(() => (s ? document.body.style.overflow = "hidden" : document.body.style.overflow = "", () => {
|
|
1046
1192
|
document.body.style.overflow = "";
|
|
1047
|
-
}), [
|
|
1193
|
+
}), [s]), !s) return null;
|
|
1048
1194
|
const m = [
|
|
1049
1195
|
"fixed",
|
|
1050
1196
|
"inset-0",
|
|
@@ -1070,7 +1216,7 @@ function Ae({
|
|
|
1070
1216
|
}[l],
|
|
1071
1217
|
"p-6",
|
|
1072
1218
|
c
|
|
1073
|
-
].filter(Boolean).join(" "), w = /* @__PURE__ */
|
|
1219
|
+
].filter(Boolean).join(" "), w = /* @__PURE__ */ e.jsxs(
|
|
1074
1220
|
"div",
|
|
1075
1221
|
{
|
|
1076
1222
|
className: m.join(" "),
|
|
@@ -1078,35 +1224,35 @@ function Ae({
|
|
|
1078
1224
|
"aria-modal": "true",
|
|
1079
1225
|
"aria-labelledby": a ? "modal-title" : void 0,
|
|
1080
1226
|
onClick: (f) => {
|
|
1081
|
-
f.target === f.currentTarget &&
|
|
1227
|
+
f.target === f.currentTarget && t();
|
|
1082
1228
|
},
|
|
1083
1229
|
children: [
|
|
1084
|
-
/* @__PURE__ */
|
|
1085
|
-
/* @__PURE__ */
|
|
1230
|
+
/* @__PURE__ */ e.jsx("div", { className: x.join(" "), "aria-hidden": "true" }),
|
|
1231
|
+
/* @__PURE__ */ e.jsx("div", { className: "flex min-h-full items-center justify-center p-4", children: /* @__PURE__ */ e.jsxs(
|
|
1086
1232
|
"div",
|
|
1087
1233
|
{
|
|
1088
|
-
ref:
|
|
1234
|
+
ref: b,
|
|
1089
1235
|
tabIndex: -1,
|
|
1090
1236
|
className: N,
|
|
1091
1237
|
onClick: (f) => f.stopPropagation(),
|
|
1092
|
-
...
|
|
1238
|
+
...d,
|
|
1093
1239
|
children: [
|
|
1094
|
-
a && /* @__PURE__ */
|
|
1095
|
-
/* @__PURE__ */
|
|
1096
|
-
o && /* @__PURE__ */
|
|
1240
|
+
a && /* @__PURE__ */ e.jsxs("div", { className: "flex justify-between items-center mb-4", children: [
|
|
1241
|
+
/* @__PURE__ */ e.jsx("h2", { id: "modal-title", className: "text-xl font-semibold text-gray-900", children: a }),
|
|
1242
|
+
o && /* @__PURE__ */ e.jsx(
|
|
1097
1243
|
"button",
|
|
1098
1244
|
{
|
|
1099
|
-
onClick:
|
|
1245
|
+
onClick: t,
|
|
1100
1246
|
className: "text-gray-400 hover:text-gray-500 focus:outline-none",
|
|
1101
1247
|
"aria-label": "Close modal",
|
|
1102
|
-
children: /* @__PURE__ */
|
|
1248
|
+
children: /* @__PURE__ */ e.jsx(
|
|
1103
1249
|
"svg",
|
|
1104
1250
|
{
|
|
1105
1251
|
className: "h-6 w-6",
|
|
1106
1252
|
fill: "none",
|
|
1107
1253
|
viewBox: "0 0 24 24",
|
|
1108
1254
|
stroke: "currentColor",
|
|
1109
|
-
children: /* @__PURE__ */
|
|
1255
|
+
children: /* @__PURE__ */ e.jsx(
|
|
1110
1256
|
"path",
|
|
1111
1257
|
{
|
|
1112
1258
|
strokeLinecap: "round",
|
|
@@ -1120,20 +1266,20 @@ function Ae({
|
|
|
1120
1266
|
}
|
|
1121
1267
|
)
|
|
1122
1268
|
] }),
|
|
1123
|
-
!a && o && /* @__PURE__ */
|
|
1269
|
+
!a && o && /* @__PURE__ */ e.jsx("div", { className: "flex justify-end mb-4", children: /* @__PURE__ */ e.jsx(
|
|
1124
1270
|
"button",
|
|
1125
1271
|
{
|
|
1126
|
-
onClick:
|
|
1272
|
+
onClick: t,
|
|
1127
1273
|
className: "text-gray-400 hover:text-gray-500 focus:outline-none",
|
|
1128
1274
|
"aria-label": "Close modal",
|
|
1129
|
-
children: /* @__PURE__ */
|
|
1275
|
+
children: /* @__PURE__ */ e.jsx(
|
|
1130
1276
|
"svg",
|
|
1131
1277
|
{
|
|
1132
1278
|
className: "h-6 w-6",
|
|
1133
1279
|
fill: "none",
|
|
1134
1280
|
viewBox: "0 0 24 24",
|
|
1135
1281
|
stroke: "currentColor",
|
|
1136
|
-
children: /* @__PURE__ */
|
|
1282
|
+
children: /* @__PURE__ */ e.jsx(
|
|
1137
1283
|
"path",
|
|
1138
1284
|
{
|
|
1139
1285
|
strokeLinecap: "round",
|
|
@@ -1146,29 +1292,29 @@ function Ae({
|
|
|
1146
1292
|
)
|
|
1147
1293
|
}
|
|
1148
1294
|
) }),
|
|
1149
|
-
/* @__PURE__ */
|
|
1150
|
-
i && /* @__PURE__ */
|
|
1295
|
+
/* @__PURE__ */ e.jsx("div", { className: "mb-4", children: n }),
|
|
1296
|
+
i && /* @__PURE__ */ e.jsx("div", { className: "flex justify-end gap-2 mt-4", children: i })
|
|
1151
1297
|
]
|
|
1152
1298
|
}
|
|
1153
1299
|
) })
|
|
1154
1300
|
]
|
|
1155
1301
|
}
|
|
1156
1302
|
);
|
|
1157
|
-
return typeof window < "u" ?
|
|
1303
|
+
return typeof window < "u" ? ce(w, document.body) : w;
|
|
1158
1304
|
}
|
|
1159
|
-
function
|
|
1160
|
-
columns:
|
|
1161
|
-
data:
|
|
1305
|
+
function Me({
|
|
1306
|
+
columns: s,
|
|
1307
|
+
data: t,
|
|
1162
1308
|
loading: a = !1,
|
|
1163
1309
|
onSort: n,
|
|
1164
1310
|
sortColumn: l,
|
|
1165
1311
|
sortDirection: o,
|
|
1166
1312
|
emptyMessage: i = "No data available",
|
|
1167
1313
|
className: c = "",
|
|
1168
|
-
...
|
|
1314
|
+
...d
|
|
1169
1315
|
}) {
|
|
1170
|
-
const
|
|
1171
|
-
if (!n || !
|
|
1316
|
+
const b = (x) => {
|
|
1317
|
+
if (!n || !s.find((N) => N.key === x)?.sortable)
|
|
1172
1318
|
return;
|
|
1173
1319
|
n(x, l === x && o === "asc" ? "desc" : "asc");
|
|
1174
1320
|
}, m = [
|
|
@@ -1179,48 +1325,92 @@ function Oe({
|
|
|
1179
1325
|
],
|
|
1180
1326
|
c
|
|
1181
1327
|
].filter(Boolean).join(" ");
|
|
1182
|
-
return /* @__PURE__ */
|
|
1183
|
-
/* @__PURE__ */
|
|
1328
|
+
return /* @__PURE__ */ e.jsx("div", { className: "overflow-x-auto", children: /* @__PURE__ */ e.jsxs("table", { className: m, ...d, children: [
|
|
1329
|
+
/* @__PURE__ */ e.jsx("thead", { className: "bg-gray-50", children: /* @__PURE__ */ e.jsx("tr", { children: s.map((x) => /* @__PURE__ */ e.jsx(
|
|
1184
1330
|
"th",
|
|
1185
1331
|
{
|
|
1186
1332
|
scope: "col",
|
|
1187
1333
|
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" : ""}`,
|
|
1188
|
-
onClick: () => x.sortable &&
|
|
1189
|
-
children: /* @__PURE__ */
|
|
1190
|
-
/* @__PURE__ */
|
|
1191
|
-
x.sortable && l === x.key && /* @__PURE__ */
|
|
1334
|
+
onClick: () => x.sortable && b(x.key),
|
|
1335
|
+
children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
1336
|
+
/* @__PURE__ */ e.jsx("span", { children: x.label }),
|
|
1337
|
+
x.sortable && l === x.key && /* @__PURE__ */ e.jsx("span", { className: "text-gray-400", children: o === "asc" ? "↑" : "↓" })
|
|
1192
1338
|
] })
|
|
1193
1339
|
},
|
|
1194
1340
|
x.key
|
|
1195
1341
|
)) }) }),
|
|
1196
|
-
/* @__PURE__ */
|
|
1342
|
+
/* @__PURE__ */ e.jsx("tbody", { className: "bg-white divide-y divide-gray-200", children: a ? /* @__PURE__ */ e.jsx("tr", { children: /* @__PURE__ */ e.jsx("td", { colSpan: s.length, className: "px-6 py-4 text-center text-gray-500", children: "Loading..." }) }) : t.length === 0 ? /* @__PURE__ */ e.jsx("tr", { children: /* @__PURE__ */ e.jsx("td", { colSpan: s.length, className: "px-6 py-4 text-center text-gray-500", children: i }) }) : t.map((x, y) => /* @__PURE__ */ e.jsx("tr", { className: "hover:bg-gray-50", children: s.map((N) => {
|
|
1197
1343
|
const w = x[N.key];
|
|
1198
|
-
return /* @__PURE__ */
|
|
1199
|
-
}) },
|
|
1344
|
+
return /* @__PURE__ */ e.jsx("td", { className: "px-6 py-4 whitespace-nowrap text-sm text-gray-900", children: N.render ? N.render(w, x) : w }, N.key);
|
|
1345
|
+
}) }, y)) })
|
|
1200
1346
|
] }) });
|
|
1201
1347
|
}
|
|
1348
|
+
function D({
|
|
1349
|
+
variant: s = "default",
|
|
1350
|
+
title: t,
|
|
1351
|
+
showHeader: a = !0,
|
|
1352
|
+
onClose: n,
|
|
1353
|
+
children: l,
|
|
1354
|
+
className: o = "",
|
|
1355
|
+
...i
|
|
1356
|
+
}) {
|
|
1357
|
+
const c = [
|
|
1358
|
+
"flex",
|
|
1359
|
+
"flex-col",
|
|
1360
|
+
"bg-white",
|
|
1361
|
+
"border-r",
|
|
1362
|
+
"border-gray-200",
|
|
1363
|
+
"h-full"
|
|
1364
|
+
], d = {
|
|
1365
|
+
default: "w-64",
|
|
1366
|
+
collapsed: "w-16"
|
|
1367
|
+
}, b = [
|
|
1368
|
+
...c,
|
|
1369
|
+
d[s],
|
|
1370
|
+
o
|
|
1371
|
+
].filter(Boolean).join(" ");
|
|
1372
|
+
return /* @__PURE__ */ e.jsxs("aside", { className: b, ...i, children: [
|
|
1373
|
+
a && t && /* @__PURE__ */ e.jsx(
|
|
1374
|
+
Q,
|
|
1375
|
+
{
|
|
1376
|
+
title: t,
|
|
1377
|
+
onClose: n,
|
|
1378
|
+
showCloseButton: !!n
|
|
1379
|
+
}
|
|
1380
|
+
),
|
|
1381
|
+
/* @__PURE__ */ e.jsx("nav", { className: "flex-1 overflow-y-auto py-4", children: l })
|
|
1382
|
+
] });
|
|
1383
|
+
}
|
|
1384
|
+
D.Group = pe;
|
|
1385
|
+
D.Item = he;
|
|
1386
|
+
D.Header = Q;
|
|
1202
1387
|
export {
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1388
|
+
ye as Badge,
|
|
1389
|
+
xe as BoxWrapper,
|
|
1390
|
+
Se as Breadcrumb,
|
|
1391
|
+
E as Button,
|
|
1392
|
+
Re as Card,
|
|
1393
|
+
Le as Dropdown,
|
|
1394
|
+
Oe as EmptyState,
|
|
1395
|
+
Ce as ErrorMessage,
|
|
1396
|
+
Te as Form,
|
|
1397
|
+
je as Info,
|
|
1398
|
+
me as Input,
|
|
1399
|
+
Z as InputWithLabel,
|
|
1400
|
+
ke as Label,
|
|
1401
|
+
$e as LoginBox,
|
|
1402
|
+
Ie as Modal,
|
|
1403
|
+
be as NavLink,
|
|
1404
|
+
Be as NavbarGroup,
|
|
1405
|
+
Ae as Pagination,
|
|
1406
|
+
Ne as Select,
|
|
1407
|
+
D as Sidebar,
|
|
1408
|
+
pe as SidebarGroup,
|
|
1409
|
+
Q as SidebarHeader,
|
|
1410
|
+
he as SidebarItem,
|
|
1411
|
+
_e as Skeleton,
|
|
1412
|
+
Me as Table,
|
|
1413
|
+
T as Text,
|
|
1414
|
+
we as Textarea,
|
|
1415
|
+
Ee as Tooltip
|
|
1226
1416
|
};
|