@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.
Files changed (31) hide show
  1. package/dist/index.cjs +4 -4
  2. package/dist/index.js +535 -352
  3. package/dist/ui/atoms/Skeleton/Skeleton.d.ts +20 -0
  4. package/dist/ui/atoms/Skeleton/Skeleton.stories.d.ts +24 -0
  5. package/dist/ui/atoms/Skeleton/Skeleton.test.d.ts +1 -0
  6. package/dist/ui/atoms/Tooltip/Tooltip.d.ts +21 -0
  7. package/dist/ui/atoms/Tooltip/Tooltip.stories.d.ts +23 -0
  8. package/dist/ui/atoms/Tooltip/Tooltip.test.d.ts +1 -0
  9. package/dist/ui/atoms/index.d.ts +4 -0
  10. package/dist/ui/molecules/Dropdown/Dropdown.d.ts +31 -0
  11. package/dist/ui/molecules/Dropdown/Dropdown.stories.d.ts +25 -0
  12. package/dist/ui/molecules/Dropdown/Dropdown.test.d.ts +1 -0
  13. package/dist/ui/molecules/EmptyState/EmptyState.d.ts +26 -0
  14. package/dist/ui/molecules/EmptyState/EmptyState.stories.d.ts +21 -0
  15. package/dist/ui/molecules/EmptyState/EmptyState.test.d.ts +1 -0
  16. package/dist/ui/molecules/index.d.ts +4 -0
  17. package/package.json +1 -1
  18. package/src/ui/atoms/Skeleton/Skeleton.stories.tsx +61 -0
  19. package/src/ui/atoms/Skeleton/Skeleton.test.tsx +40 -0
  20. package/src/ui/atoms/Skeleton/Skeleton.tsx +70 -0
  21. package/src/ui/atoms/Tooltip/Tooltip.stories.tsx +60 -0
  22. package/src/ui/atoms/Tooltip/Tooltip.test.tsx +53 -0
  23. package/src/ui/atoms/Tooltip/Tooltip.tsx +87 -0
  24. package/src/ui/atoms/index.ts +6 -0
  25. package/src/ui/molecules/Dropdown/Dropdown.stories.tsx +58 -0
  26. package/src/ui/molecules/Dropdown/Dropdown.test.tsx +73 -0
  27. package/src/ui/molecules/Dropdown/Dropdown.tsx +125 -0
  28. package/src/ui/molecules/EmptyState/EmptyState.stories.tsx +63 -0
  29. package/src/ui/molecules/EmptyState/EmptyState.test.tsx +55 -0
  30. package/src/ui/molecules/EmptyState/EmptyState.tsx +81 -0
  31. package/src/ui/molecules/index.ts +6 -0
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
- import ae, { useRef as P, useEffect as V } from "react";
2
- import { createPortal as ne } from "react-dom";
3
- var S = { exports: {} }, _ = {};
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 q;
14
- function le() {
15
- if (q) return _;
16
- q = 1;
17
- var s = Symbol.for("react.transitional.element"), t = Symbol.for("react.fragment");
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 c = null;
20
- if (o !== void 0 && (c = "" + o), l.key !== void 0 && (c = "" + l.key), "key" in l) {
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 u in l)
23
- u !== "key" && (o[u] = l[u]);
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: s,
26
+ $$typeof: t,
27
27
  type: n,
28
- key: c,
28
+ key: i,
29
29
  ref: l !== void 0 ? l : null,
30
30
  props: o
31
31
  };
32
32
  }
33
- return _.Fragment = t, _.jsx = a, _.jsxs = a, _;
33
+ return _.Fragment = s, _.jsx = a, _.jsxs = a, _;
34
34
  }
35
- var R = {};
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 U;
46
- function oe() {
47
- return U || (U = 1, process.env.NODE_ENV !== "production" && (function() {
48
- function s(e) {
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 === re ? null : e.displayName || e.name || null;
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 w:
58
+ case k:
59
59
  return "StrictMode";
60
- case Z:
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 N:
71
+ case w:
72
72
  return "Portal";
73
- case X:
73
+ case Z:
74
74
  return e.displayName || "Context";
75
75
  case T:
76
76
  return (e._context.displayName || "Context") + ".Consumer";
77
- case H:
78
- var i = e.render;
79
- return e = e.displayName, e || (e = i.displayName || i.name || "", e = e !== "" ? "ForwardRef(" + e + ")" : "ForwardRef"), e;
80
- case K:
81
- return i = e.displayName || null, i !== null ? i : s(e.type) || "Memo";
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
- i = e._payload, e = e._init;
83
+ d = e._payload, e = e._init;
84
84
  try {
85
- return s(e(i));
85
+ return t(e(d));
86
86
  } catch {
87
87
  }
88
88
  }
89
89
  return null;
90
90
  }
91
- function t(e) {
91
+ function s(e) {
92
92
  return "" + e;
93
93
  }
94
94
  function a(e) {
95
95
  try {
96
- t(e);
97
- var i = !1;
96
+ s(e);
97
+ var d = !1;
98
98
  } catch {
99
- i = !0;
99
+ d = !0;
100
100
  }
101
- if (i) {
102
- i = console;
103
- var b = i.error, p = typeof Symbol == "function" && Symbol.toStringTag && e[Symbol.toStringTag] || e.constructor.name || "Object";
104
- return b.call(
105
- i,
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
- p
108
- ), t(e);
107
+ v
108
+ ), s(e);
109
109
  }
110
110
  }
111
111
  function n(e) {
112
- if (e === d) return "<>";
112
+ if (e === f) return "<>";
113
113
  if (typeof e == "object" && e !== null && e.$$typeof === O)
114
114
  return "<...>";
115
115
  try {
116
- var i = s(e);
117
- return i ? "<" + i + ">" : "<...>";
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 c(e) {
130
- if (M.call(e, "key")) {
131
- var i = Object.getOwnPropertyDescriptor(e, "key").get;
132
- if (i && i.isReactWarning) return !1;
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 u(e, i) {
137
- function b() {
138
- z || (z = !0, console.error(
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
- i
140
+ d
141
141
  ));
142
142
  }
143
- b.isReactWarning = !0, Object.defineProperty(e, "key", {
144
- get: b,
143
+ p.isReactWarning = !0, Object.defineProperty(e, "key", {
144
+ get: p,
145
145
  configurable: !0
146
146
  });
147
147
  }
148
- function m() {
149
- var e = s(this.type);
150
- return I[e] || (I[e] = !0, console.error(
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 j(e, i, b, p, C, B) {
155
- var h = b.ref;
154
+ function h(e, d, p, v, S, B) {
155
+ var g = p.ref;
156
156
  return e = {
157
- $$typeof: v,
157
+ $$typeof: N,
158
158
  type: e,
159
- key: i,
160
- props: b,
161
- _owner: p
162
- }, (h !== void 0 ? h : null) !== null ? Object.defineProperty(e, "ref", {
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: m
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: C
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 g(e, i, b, p, C, B) {
188
- var h = i.children;
189
- if (h !== void 0)
190
- if (p)
191
- if (se(h)) {
192
- for (p = 0; p < h.length; p++)
193
- k(h[p]);
194
- Object.freeze && Object.freeze(h);
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 k(h);
200
- if (M.call(i, "key")) {
201
- h = s(e);
202
- var E = Object.keys(i).filter(function(te) {
203
- return te !== "key";
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
- p = 0 < E.length ? "{key: someKey, " + E.join(": ..., ") + ": ...}" : "{key: someKey}", W[h + p] || (E = 0 < E.length ? "{" + E.join(": ..., ") + ": ...}" : "{}", console.error(
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
- p,
213
- h,
212
+ v,
213
+ g,
214
214
  E,
215
- h
216
- ), W[h + p] = !0);
215
+ g
216
+ ), U[g + v] = !0);
217
217
  }
218
- if (h = null, b !== void 0 && (a(b), h = "" + b), c(i) && (a(i.key), h = "" + i.key), "key" in i) {
219
- b = {};
220
- for (var Y in i)
221
- Y !== "key" && (b[Y] = i[Y]);
222
- } else b = i;
223
- return h && u(
224
- b,
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
- ), j(
226
+ ), h(
227
227
  e,
228
- h,
229
- b,
228
+ g,
229
+ p,
230
230
  l(),
231
- C,
231
+ S,
232
232
  B
233
233
  );
234
234
  }
235
- function k(e) {
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 === v;
239
+ return typeof e == "object" && e !== null && e.$$typeof === N;
240
240
  }
241
- var y = ae, v = Symbol.for("react.transitional.element"), N = Symbol.for("react.portal"), d = Symbol.for("react.fragment"), w = Symbol.for("react.strict_mode"), f = Symbol.for("react.profiler"), T = Symbol.for("react.consumer"), X = Symbol.for("react.context"), H = Symbol.for("react.forward_ref"), Z = Symbol.for("react.suspense"), Q = Symbol.for("react.suspense_list"), K = Symbol.for("react.memo"), O = Symbol.for("react.lazy"), ee = Symbol.for("react.activity"), re = Symbol.for("react.client.reference"), L = y.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, M = Object.prototype.hasOwnProperty, se = Array.isArray, $ = console.createTask ? console.createTask : function() {
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
- y = {
244
+ j = {
245
245
  react_stack_bottom_frame: function(e) {
246
246
  return e();
247
247
  }
248
248
  };
249
- var z, I = {}, F = y.react_stack_bottom_frame.bind(
250
- y,
249
+ var W, P = {}, V = j.react_stack_bottom_frame.bind(
250
+ j,
251
251
  o
252
- )(), D = $(n(o)), W = {};
253
- R.Fragment = d, R.jsx = function(e, i, b) {
254
- var p = 1e4 > L.recentlyCreatedOwnerStacks++;
255
- return g(
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
- i,
258
- b,
257
+ d,
258
+ p,
259
259
  !1,
260
- p ? Error("react-stack-top-frame") : F,
261
- p ? $(n(e)) : D
260
+ v ? Error("react-stack-top-frame") : V,
261
+ v ? $(n(e)) : q
262
262
  );
263
- }, R.jsxs = function(e, i, b) {
264
- var p = 1e4 > L.recentlyCreatedOwnerStacks++;
265
- return g(
263
+ }, C.jsxs = function(e, d, p) {
264
+ var v = 1e4 > L.recentlyCreatedOwnerStacks++;
265
+ return y(
266
266
  e,
267
- i,
268
- b,
267
+ d,
268
+ p,
269
269
  !0,
270
- p ? Error("react-stack-top-frame") : F,
271
- p ? $(n(e)) : D
270
+ v ? Error("react-stack-top-frame") : V,
271
+ v ? $(n(e)) : q
272
272
  );
273
273
  };
274
- })()), R;
274
+ })()), C;
275
275
  }
276
- var J;
277
- function ie() {
278
- return J || (J = 1, process.env.NODE_ENV === "production" ? S.exports = le() : S.exports = oe()), S.exports;
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 = ie();
281
- function xe({ variant: s = "info", className: t, ...a }) {
282
- const n = [t || ""];
283
- switch (s) {
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 ce({
308
- variant: s,
309
- bold: t,
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
- ...c
314
+ ...i
315
315
  }) {
316
- const u = [n];
317
- let m;
316
+ const c = [n];
317
+ let u;
318
318
  if (l)
319
- m = l;
319
+ u = l;
320
320
  else
321
- switch (s) {
321
+ switch (t) {
322
322
  case "heading":
323
- m = "h2";
323
+ u = "h2";
324
324
  break;
325
325
  case "list":
326
- m = "li";
326
+ u = "li";
327
327
  break;
328
328
  case "paragraph":
329
329
  default:
330
- m = "p";
330
+ u = "p";
331
331
  break;
332
332
  }
333
- return t && u.push("font-bold"), a && u.push("italic"), o && u.push(`text-${o}`), /* @__PURE__ */ r.jsx(m, { className: u.join(" "), ...c });
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 de({ className: s, ...t }) {
335
+ function ue({ className: t, ...s }) {
336
336
  const a = [
337
- s,
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(" "), ...t });
347
+ return /* @__PURE__ */ r.jsx("input", { className: a.join(" "), ...s });
348
348
  }
349
- function A({
350
- className: s,
351
- variant: t = "regular",
349
+ function R({
350
+ className: t,
351
+ variant: s = "regular",
352
352
  ...a
353
353
  }) {
354
354
  const n = [
355
- s,
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 (t) {
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 ue({ className: s, ...t }) {
377
- const a = [s, "p-large", "bg-bg", "rounded", "shadow-card"];
378
- return /* @__PURE__ */ r.jsx("div", { className: a.join(" "), ...t });
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: s = "neutral",
382
- className: t = "",
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
- }, c = [
401
+ }, i = [
402
402
  ...l,
403
- o[s],
404
- t
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: c,
411
+ className: i,
412
412
  ...n,
413
413
  children: a
414
414
  }
415
415
  );
416
416
  }
417
- function he({
418
- options: s,
419
- placeholder: t,
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
- ], c = a ? "border-red-500 focus:ring-red-500" : "border-gray-300 focus:ring-indigo-500", u = [
435
+ ], i = a ? "border-red-500 focus:ring-red-500" : "border-gray-300 focus:ring-indigo-500", c = [
436
436
  ...o,
437
- c,
437
+ i,
438
438
  n
439
439
  ].filter(Boolean).join(" ");
440
440
  return /* @__PURE__ */ r.jsxs(
441
441
  "select",
442
442
  {
443
- className: u,
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
- t && /* @__PURE__ */ r.jsx("option", { value: "", disabled: !0, children: t }),
449
- s.map((m) => /* @__PURE__ */ r.jsx(
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: m.value,
453
- disabled: m.disabled,
454
- children: m.label
452
+ value: u.value,
453
+ disabled: u.disabled,
454
+ children: u.label
455
455
  },
456
- m.value
456
+ u.value
457
457
  ))
458
458
  ]
459
459
  }
460
460
  );
461
461
  }
462
- function ve({
463
- error: s = !1,
464
- resize: t = "vertical",
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
- }, c = s ? "border-red-500 focus:ring-red-500" : "border-gray-300 focus:ring-indigo-500", u = [
484
+ }, i = t ? "border-red-500 focus:ring-red-500" : "border-gray-300 focus:ring-indigo-500", c = [
485
485
  ...l,
486
- o[t],
487
- c,
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: u,
494
- "aria-invalid": s,
495
- "aria-describedby": s && n.id ? `${n.id}-error` : void 0,
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 ge({
501
- variant: s = "default",
502
- className: t = "",
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
- }, c = [
515
+ }, i = [
516
516
  ...l,
517
- o[s],
518
- t
517
+ o[t],
518
+ s
519
519
  ].filter(Boolean).join(" ");
520
- return /* @__PURE__ */ r.jsx("label", { className: c, ...n, children: a });
520
+ return /* @__PURE__ */ r.jsx("label", { className: i, ...n, children: a });
521
521
  }
522
522
  function je({
523
- message: s,
524
- id: t,
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: t,
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: s })
565
+ /* @__PURE__ */ r.jsx("span", { children: t })
566
566
  ]
567
567
  }
568
568
  );
569
569
  }
570
- function fe({
571
- variant: s = "default",
572
- className: t = "",
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
- }, c = [
589
+ }, i = [
590
590
  ...l,
591
- o[s],
592
- t
591
+ o[t],
592
+ s
593
593
  ].filter(Boolean).join(" ");
594
- return s === "disabled" ? /* @__PURE__ */ r.jsx("span", { className: c, "aria-disabled": "true", children: a }) : /* @__PURE__ */ r.jsx("a", { className: c, ...n, children: a });
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 G({ label: s, ...t }) {
597
- return t.id || console.error("InputWithLabel component requires an id prop"), /* @__PURE__ */ r.jsxs("div", { className: "mb-medium grid gap-small", children: [
598
- /* @__PURE__ */ r.jsx(ce, { as: "label", htmlFor: t.id, className: "cursor-pointer", children: s }),
599
- /* @__PURE__ */ r.jsx(de, { ...t })
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 ye({
603
- variant: s = "default",
604
- padding: t = "medium",
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
- ], c = {
701
+ ], i = {
616
702
  default: "",
617
703
  hover: "hover:shadow-md transition-shadow cursor-pointer",
618
704
  selected: "border-indigo-500 shadow-md"
619
- }, u = {
705
+ }, c = {
620
706
  none: "",
621
707
  small: "p-2",
622
708
  medium: "p-4",
623
709
  large: "p-6"
624
- }, m = [
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: m, ...l, children: n });
716
+ return /* @__PURE__ */ r.jsx("div", { className: u, ...l, children: n });
631
717
  }
632
- function Ne({
633
- children: s,
634
- onSubmit: t,
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
- ...c
725
+ ...i
640
726
  }) {
641
- const m = [
727
+ const u = [
642
728
  ...[
643
729
  "space-y-4"
644
730
  ],
645
731
  o
646
- ].filter(Boolean).join(" "), j = (g) => {
647
- g.preventDefault(), t && !a && t(g);
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: m,
653
- onSubmit: j,
738
+ className: u,
739
+ onSubmit: h,
654
740
  noValidate: !0,
655
- ...c,
741
+ ...i,
656
742
  children: [
657
- s,
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 ke({
679
- items: s,
680
- separator: t = "/",
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: s.map((c, u) => {
694
- const m = u === s.length - 1;
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
- u > 0 && /* @__PURE__ */ r.jsx("span", { className: "mx-2 text-gray-400", "aria-hidden": "true", children: t }),
697
- m ? /* @__PURE__ */ r.jsx("span", { className: "text-gray-900 font-medium", "aria-current": "page", children: c.label }) : c.href ? /* @__PURE__ */ r.jsx(fe, { href: c.href, variant: "default", children: c.label }) : /* @__PURE__ */ r.jsx("span", { className: "text-gray-500", children: c.label })
698
- ] }, u);
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 we({
702
- currentPage: s,
703
- totalPages: t,
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: c = "",
709
- ...u
794
+ className: i = "",
795
+ ...c
710
796
  }) {
711
- const m = () => {
712
- s > 1 && a(s - 1);
713
- }, j = () => {
714
- s < t && a(s + 1);
715
- }, g = (d) => {
716
- d >= 1 && d <= t && d !== s && a(d);
717
- }, k = () => {
718
- const d = [];
719
- if (t <= 5)
720
- for (let f = 1; f <= t; f++)
721
- d.push(f);
722
- else if (s <= 3) {
723
- for (let f = 1; f <= 4; f++)
724
- d.push(f);
725
- d.push("ellipsis"), d.push(t);
726
- } else if (s >= t - 2) {
727
- d.push(1), d.push("ellipsis");
728
- for (let f = t - 3; f <= t; f++)
729
- d.push(f);
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
- d.push(1), d.push("ellipsis");
732
- for (let f = s - 1; f <= s + 1; f++)
733
- d.push(f);
734
- d.push("ellipsis"), d.push(t);
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 d;
737
- }, x = n && l ? (s - 1) * l + 1 : void 0, y = n && l ? Math.min(s * l, n) : void 0, N = [
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
- c
831
+ i
746
832
  ].filter(Boolean).join(" ");
747
- return /* @__PURE__ */ r.jsxs("nav", { className: N, "aria-label": "Pagination", ...u, children: [
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
- A,
836
+ R,
751
837
  {
752
838
  variant: "secondary",
753
- onClick: m,
754
- disabled: s === 1,
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: k().map((d, w) => {
760
- if (d === "ellipsis")
761
- return /* @__PURE__ */ r.jsx("span", { className: "px-2 text-gray-500", children: "..." }, `ellipsis-${w}`);
762
- const f = d, T = f === s;
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: () => g(f),
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 ${f}`,
770
- children: f
855
+ "aria-label": `Go to page ${b}`,
856
+ children: b
771
857
  },
772
- f
858
+ b
773
859
  );
774
860
  }) }),
775
861
  /* @__PURE__ */ r.jsx(
776
- A,
862
+ R,
777
863
  {
778
864
  variant: "secondary",
779
- onClick: j,
780
- disabled: s === t,
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
- y,
876
+ j,
791
877
  " of ",
792
878
  n,
793
879
  " results"
794
880
  ] })
795
881
  ] });
796
882
  }
797
- function Ee({
798
- onForgotPasswordClick: s,
799
- className: t,
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(ue, { className: t, children: /* @__PURE__ */ r.jsxs(
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
- G,
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
- G,
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
- A,
1008
+ R,
830
1009
  {
831
1010
  variant: "secondary",
832
1011
  type: "button",
833
- onClick: s,
1012
+ onClick: t,
834
1013
  children: "Forgot password?"
835
1014
  }
836
1015
  ),
837
- /* @__PURE__ */ r.jsx(A, { variant: "regular", type: "submit", children: "Sign in" })
1016
+ /* @__PURE__ */ r.jsx(R, { variant: "regular", type: "submit", children: "Sign in" })
838
1017
  ] })
839
1018
  ]
840
1019
  }
841
1020
  ) });
842
1021
  }
843
- function _e({
844
- isOpen: s,
845
- onClose: t,
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: c,
851
- className: u = "",
852
- ...m
1029
+ footer: i,
1030
+ className: c = "",
1031
+ ...u
853
1032
  }) {
854
- const j = P(null), g = P(null);
855
- if (V(() => {
856
- if (!s) return;
857
- g.current = document.activeElement;
858
- const d = setTimeout(() => {
859
- j.current?.focus();
860
- }, 0), w = (f) => {
861
- f.key === "Escape" && t();
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", w), () => {
864
- clearTimeout(d), document.removeEventListener("keydown", w), g.current?.focus();
1042
+ return document.addEventListener("keydown", k), () => {
1043
+ clearTimeout(f), document.removeEventListener("keydown", k), y.current?.focus();
865
1044
  };
866
- }, [s, t]), V(() => (s ? document.body.style.overflow = "hidden" : document.body.style.overflow = "", () => {
1045
+ }, [t, s]), z(() => (t ? document.body.style.overflow = "hidden" : document.body.style.overflow = "", () => {
867
1046
  document.body.style.overflow = "";
868
- }), [s]), !s) return null;
869
- const k = [
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
- ], v = [
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
- u
894
- ].filter(Boolean).join(" "), N = /* @__PURE__ */ r.jsxs(
1072
+ c
1073
+ ].filter(Boolean).join(" "), w = /* @__PURE__ */ r.jsxs(
895
1074
  "div",
896
1075
  {
897
- className: k.join(" "),
1076
+ className: m.join(" "),
898
1077
  role: "dialog",
899
1078
  "aria-modal": "true",
900
1079
  "aria-labelledby": a ? "modal-title" : void 0,
901
- onClick: (d) => {
902
- d.target === d.currentTarget && t();
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: j,
1088
+ ref: h,
910
1089
  tabIndex: -1,
911
- className: v,
912
- onClick: (d) => d.stopPropagation(),
913
- ...m,
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: t,
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: t,
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
- c && /* @__PURE__ */ r.jsx("div", { className: "flex justify-end gap-2 mt-4", children: c })
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" ? ne(N, document.body) : N;
1157
+ return typeof window < "u" ? oe(w, document.body) : w;
979
1158
  }
980
- function Re({
981
- columns: s,
982
- data: t,
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: c = "No data available",
988
- className: u = "",
989
- ...m
1166
+ emptyMessage: i = "No data available",
1167
+ className: c = "",
1168
+ ...u
990
1169
  }) {
991
- const j = (x) => {
992
- if (!n || !s.find((v) => v.key === x)?.sortable)
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
- }, k = [
1174
+ }, m = [
996
1175
  ...[
997
1176
  "min-w-full",
998
1177
  "divide-y",
999
1178
  "divide-gray-200"
1000
1179
  ],
1001
- u
1180
+ c
1002
1181
  ].filter(Boolean).join(" ");
1003
- return /* @__PURE__ */ r.jsx("div", { className: "overflow-x-auto", children: /* @__PURE__ */ r.jsxs("table", { className: k, ...m, children: [
1004
- /* @__PURE__ */ r.jsx("thead", { className: "bg-gray-50", children: /* @__PURE__ */ r.jsx("tr", { children: s.map((x) => /* @__PURE__ */ r.jsx(
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 && j(x.key),
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: s.length, className: "px-6 py-4 text-center text-gray-500", children: "Loading..." }) }) : t.length === 0 ? /* @__PURE__ */ r.jsx("tr", { children: /* @__PURE__ */ r.jsx("td", { colSpan: s.length, className: "px-6 py-4 text-center text-gray-500", children: c }) }) : t.map((x, y) => /* @__PURE__ */ r.jsx("tr", { className: "hover:bg-gray-50", children: s.map((v) => {
1018
- const N = x[v.key];
1019
- return /* @__PURE__ */ r.jsx("td", { className: "px-6 py-4 whitespace-nowrap text-sm text-gray-900", children: v.render ? v.render(N, x) : N }, v.key);
1020
- }) }, y)) })
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
- ue as BoxWrapper,
1026
- ke as Breadcrumb,
1027
- A as Button,
1028
- ye as Card,
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
- Ne as Form,
1031
- xe as Info,
1032
- de as Input,
1033
- G as InputWithLabel,
1034
- ge as Label,
1035
- Ee as LoginBox,
1036
- _e as Modal,
1037
- fe as NavLink,
1038
- we as Pagination,
1039
- he as Select,
1040
- Re as Table,
1041
- ce as Text,
1042
- ve as Textarea
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
  };