@fabio.caffarello/react-design-system 1.5.2 → 1.7.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 (66) hide show
  1. package/dist/index.cjs +29 -4
  2. package/dist/index.js +1866 -716
  3. package/dist/ui/atoms/Button/Button.d.ts +28 -5
  4. package/dist/ui/atoms/Button/Button.stories.d.ts +11 -3
  5. package/dist/ui/atoms/Checkbox/Checkbox.d.ts +24 -0
  6. package/dist/ui/atoms/Checkbox/Checkbox.stories.d.ts +10 -0
  7. package/dist/ui/atoms/Checkbox/Checkbox.test.d.ts +1 -0
  8. package/dist/ui/atoms/Collapsible/Collapsible.d.ts +29 -0
  9. package/dist/ui/atoms/Collapsible/Collapsible.stories.d.ts +9 -0
  10. package/dist/ui/atoms/Collapsible/Collapsible.test.d.ts +1 -0
  11. package/dist/ui/atoms/Input/Input.d.ts +28 -4
  12. package/dist/ui/atoms/Input/Input.stories.d.ts +8 -3
  13. package/dist/ui/atoms/Radio/Radio.d.ts +26 -0
  14. package/dist/ui/atoms/Radio/Radio.stories.d.ts +10 -0
  15. package/dist/ui/atoms/Radio/Radio.test.d.ts +1 -0
  16. package/dist/ui/atoms/SidebarItem/SidebarItem.d.ts +3 -1
  17. package/dist/ui/atoms/SidebarItem/SidebarItem.stories.d.ts +3 -0
  18. package/dist/ui/atoms/index.d.ts +7 -0
  19. package/dist/ui/hooks/useCollapsible.d.ts +27 -0
  20. package/dist/ui/index.d.ts +13 -0
  21. package/dist/ui/molecules/InputWithLabel/InputWithLabel.d.ts +4 -2
  22. package/dist/ui/molecules/SidebarGroup/SidebarGroup.d.ts +8 -1
  23. package/dist/ui/molecules/SidebarGroup/SidebarGroup.stories.d.ts +11 -0
  24. package/dist/ui/molecules/SidebarGroup/SidebarGroup.test.d.ts +1 -0
  25. package/dist/ui/providers/ThemeProvider.d.ts +34 -0
  26. package/dist/ui/tokens/breakpoints.d.ts +36 -0
  27. package/dist/ui/tokens/colors.d.ts +89 -0
  28. package/dist/ui/tokens/sidebar.d.ts +48 -0
  29. package/dist/ui/tokens/spacing.d.ts +53 -0
  30. package/dist/ui/tokens/themes/dark.d.ts +38 -0
  31. package/dist/ui/tokens/themes/light.d.ts +38 -0
  32. package/dist/ui/tokens/tokens.factory.d.ts +57 -0
  33. package/dist/ui/tokens/typography.d.ts +90 -0
  34. package/package.json +3 -2
  35. package/src/ui/atoms/Button/Button.stories.tsx +77 -7
  36. package/src/ui/atoms/Button/Button.tsx +176 -28
  37. package/src/ui/atoms/Checkbox/Checkbox.stories.tsx +61 -0
  38. package/src/ui/atoms/Checkbox/Checkbox.test.tsx +32 -0
  39. package/src/ui/atoms/Checkbox/Checkbox.tsx +103 -0
  40. package/src/ui/atoms/Collapsible/Collapsible.stories.tsx +124 -0
  41. package/src/ui/atoms/Collapsible/Collapsible.test.tsx +174 -0
  42. package/src/ui/atoms/Collapsible/Collapsible.tsx +115 -0
  43. package/src/ui/atoms/Input/Input.stories.tsx +67 -6
  44. package/src/ui/atoms/Input/Input.tsx +117 -14
  45. package/src/ui/atoms/Radio/Radio.stories.tsx +72 -0
  46. package/src/ui/atoms/Radio/Radio.test.tsx +32 -0
  47. package/src/ui/atoms/Radio/Radio.tsx +104 -0
  48. package/src/ui/atoms/SidebarItem/SidebarItem.stories.tsx +44 -0
  49. package/src/ui/atoms/SidebarItem/SidebarItem.test.tsx +40 -0
  50. package/src/ui/atoms/SidebarItem/SidebarItem.tsx +26 -6
  51. package/src/ui/atoms/index.ts +10 -0
  52. package/src/ui/hooks/useCollapsible.ts +83 -0
  53. package/src/ui/index.ts +15 -0
  54. package/src/ui/molecules/InputWithLabel/InputWithLabel.tsx +5 -4
  55. package/src/ui/molecules/SidebarGroup/SidebarGroup.stories.tsx +173 -0
  56. package/src/ui/molecules/SidebarGroup/SidebarGroup.test.tsx +131 -0
  57. package/src/ui/molecules/SidebarGroup/SidebarGroup.tsx +80 -13
  58. package/src/ui/providers/ThemeProvider.tsx +105 -0
  59. package/src/ui/tokens/breakpoints.ts +71 -0
  60. package/src/ui/tokens/colors.ts +250 -0
  61. package/src/ui/tokens/sidebar.ts +66 -0
  62. package/src/ui/tokens/spacing.ts +127 -0
  63. package/src/ui/tokens/themes/dark.ts +18 -0
  64. package/src/ui/tokens/themes/light.ts +18 -0
  65. package/src/ui/tokens/tokens.factory.ts +117 -0
  66. package/src/ui/tokens/typography.ts +191 -0
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
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: {} }, _ = {};
1
+ import $e, { useState as A, useCallback as X, useEffect as _, useRef as P, forwardRef as ge, createElement as Z, createContext as Re, useContext as Ae } from "react";
2
+ import { createPortal as Le } from "react-dom";
3
+ var W = { exports: {} }, I = {};
4
4
  /**
5
5
  * @license React
6
6
  * react-jsx-runtime.production.js
@@ -10,29 +10,29 @@ var O = { 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 J;
14
- function de() {
15
- if (J) return _;
16
- J = 1;
17
- var s = Symbol.for("react.transitional.element"), t = Symbol.for("react.fragment");
18
- function a(n, l, o) {
19
- var i = null;
20
- if (o !== void 0 && (i = "" + o), l.key !== void 0 && (i = "" + l.key), "key" in l) {
21
- o = {};
22
- for (var c in l)
23
- c !== "key" && (o[c] = l[c]);
24
- } else o = l;
25
- return l = o.ref, {
26
- $$typeof: s,
27
- type: n,
28
- key: i,
29
- ref: l !== void 0 ? l : null,
30
- props: o
13
+ var ce;
14
+ function Fe() {
15
+ if (ce) return I;
16
+ ce = 1;
17
+ var t = Symbol.for("react.transitional.element"), e = Symbol.for("react.fragment");
18
+ function a(s, o, i) {
19
+ var c = null;
20
+ if (i !== void 0 && (c = "" + i), o.key !== void 0 && (c = "" + o.key), "key" in o) {
21
+ i = {};
22
+ for (var l in o)
23
+ l !== "key" && (i[l] = o[l]);
24
+ } else i = o;
25
+ return o = i.ref, {
26
+ $$typeof: t,
27
+ type: s,
28
+ key: c,
29
+ ref: o !== void 0 ? o : null,
30
+ props: i
31
31
  };
32
32
  }
33
- return _.Fragment = t, _.jsx = a, _.jsxs = a, _;
33
+ return I.Fragment = e, I.jsx = a, I.jsxs = a, I;
34
34
  }
35
- var R = {};
35
+ var B = {};
36
36
  /**
37
37
  * @license React
38
38
  * react-jsx-runtime.development.js
@@ -42,283 +42,283 @@ 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 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
- case f:
45
+ var de;
46
+ function Oe() {
47
+ return de || (de = 1, process.env.NODE_ENV !== "production" && (function() {
48
+ function t(n) {
49
+ if (n == null) return null;
50
+ if (typeof n == "function")
51
+ return n.$$typeof === Ee ? null : n.displayName || n.name || null;
52
+ if (typeof n == "string") return n;
53
+ switch (n) {
54
+ case x:
55
55
  return "Fragment";
56
- case h:
56
+ case p:
57
57
  return "Profiler";
58
- case k:
58
+ case E:
59
59
  return "StrictMode";
60
- case re:
60
+ case ke:
61
61
  return "Suspense";
62
- case se:
62
+ case Ne:
63
63
  return "SuspenseList";
64
- case ae:
64
+ case Te:
65
65
  return "Activity";
66
66
  }
67
- if (typeof r == "object")
68
- switch (typeof r.tag == "number" && console.error(
67
+ if (typeof n == "object")
68
+ switch (typeof n.tag == "number" && console.error(
69
69
  "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
70
- ), r.$$typeof) {
71
- case w:
70
+ ), n.$$typeof) {
71
+ case C:
72
72
  return "Portal";
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;
73
+ case ve:
74
+ return n.displayName || "Context";
75
+ case M:
76
+ return (n._context.displayName || "Context") + ".Consumer";
77
+ case je:
78
+ var h = n.render;
79
+ return n = n.displayName, n || (n = h.displayName || h.name || "", n = n !== "" ? "ForwardRef(" + n + ")" : "ForwardRef"), n;
80
+ case Ce:
81
+ return h = n.displayName || null, h !== null ? h : t(n.type) || "Memo";
82
+ case H:
83
+ h = n._payload, n = n._init;
84
84
  try {
85
- return s(r(u));
85
+ return t(n(h));
86
86
  } catch {
87
87
  }
88
88
  }
89
89
  return null;
90
90
  }
91
- function t(r) {
92
- return "" + r;
91
+ function e(n) {
92
+ return "" + n;
93
93
  }
94
- function a(r) {
94
+ function a(n) {
95
95
  try {
96
- t(r);
97
- var u = !1;
96
+ e(n);
97
+ var h = !1;
98
98
  } catch {
99
- u = !0;
99
+ h = !0;
100
100
  }
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
- return p.call(
105
- u,
101
+ if (h) {
102
+ h = console;
103
+ var v = h.error, j = typeof Symbol == "function" && Symbol.toStringTag && n[Symbol.toStringTag] || n.constructor.name || "Object";
104
+ return v.call(
105
+ h,
106
106
  "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
107
- g
108
- ), t(r);
107
+ j
108
+ ), e(n);
109
109
  }
110
110
  }
111
- function n(r) {
112
- if (r === f) return "<>";
113
- if (typeof r == "object" && r !== null && r.$$typeof === L)
111
+ function s(n) {
112
+ if (n === x) return "<>";
113
+ if (typeof n == "object" && n !== null && n.$$typeof === H)
114
114
  return "<...>";
115
115
  try {
116
- var u = s(r);
117
- return u ? "<" + u + ">" : "<...>";
116
+ var h = t(n);
117
+ return h ? "<" + h + ">" : "<...>";
118
118
  } catch {
119
119
  return "<...>";
120
120
  }
121
121
  }
122
- function l() {
123
- var r = B.A;
124
- return r === null ? null : r.getOwner();
125
- }
126
122
  function o() {
123
+ var n = V.A;
124
+ return n === null ? null : n.getOwner();
125
+ }
126
+ function i() {
127
127
  return Error("react-stack-top-frame");
128
128
  }
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;
129
+ function c(n) {
130
+ if (ae.call(n, "key")) {
131
+ var h = Object.getOwnPropertyDescriptor(n, "key").get;
132
+ if (h && h.isReactWarning) return !1;
133
133
  }
134
- return r.key !== void 0;
134
+ return n.key !== void 0;
135
135
  }
136
- function c(r, u) {
137
- function p() {
138
- P || (P = !0, console.error(
136
+ function l(n, h) {
137
+ function v() {
138
+ se || (se = !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
- u
140
+ h
141
141
  ));
142
142
  }
143
- p.isReactWarning = !0, Object.defineProperty(r, "key", {
144
- get: p,
143
+ v.isReactWarning = !0, Object.defineProperty(n, "key", {
144
+ get: v,
145
145
  configurable: !0
146
146
  });
147
147
  }
148
148
  function d() {
149
- var r = s(this.type);
150
- return V[r] || (V[r] = !0, console.error(
149
+ var n = t(this.type);
150
+ return ne[n] || (ne[n] = !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
- )), r = this.props.ref, r !== void 0 ? r : null;
152
+ )), n = this.props.ref, n !== void 0 ? n : null;
153
153
  }
154
- function b(r, u, p, g, A, I) {
155
- var v = p.ref;
156
- return r = {
157
- $$typeof: N,
158
- type: r,
159
- key: u,
160
- props: p,
161
- _owner: g
162
- }, (v !== void 0 ? v : null) !== null ? Object.defineProperty(r, "ref", {
154
+ function u(n, h, v, j, D, q) {
155
+ var k = v.ref;
156
+ return n = {
157
+ $$typeof: w,
158
+ type: n,
159
+ key: h,
160
+ props: v,
161
+ _owner: j
162
+ }, (k !== void 0 ? k : null) !== null ? Object.defineProperty(n, "ref", {
163
163
  enumerable: !1,
164
164
  get: d
165
- }) : Object.defineProperty(r, "ref", { enumerable: !1, value: null }), r._store = {}, Object.defineProperty(r._store, "validated", {
165
+ }) : Object.defineProperty(n, "ref", { enumerable: !1, value: null }), n._store = {}, Object.defineProperty(n._store, "validated", {
166
166
  configurable: !1,
167
167
  enumerable: !1,
168
168
  writable: !0,
169
169
  value: 0
170
- }), Object.defineProperty(r, "_debugInfo", {
170
+ }), Object.defineProperty(n, "_debugInfo", {
171
171
  configurable: !1,
172
172
  enumerable: !1,
173
173
  writable: !0,
174
174
  value: null
175
- }), Object.defineProperty(r, "_debugStack", {
175
+ }), Object.defineProperty(n, "_debugStack", {
176
176
  configurable: !1,
177
177
  enumerable: !1,
178
178
  writable: !0,
179
- value: A
180
- }), Object.defineProperty(r, "_debugTask", {
179
+ value: D
180
+ }), Object.defineProperty(n, "_debugTask", {
181
181
  configurable: !1,
182
182
  enumerable: !1,
183
183
  writable: !0,
184
- value: I
185
- }), Object.freeze && (Object.freeze(r.props), Object.freeze(r)), r;
184
+ value: q
185
+ }), Object.freeze && (Object.freeze(n.props), Object.freeze(n)), n;
186
186
  }
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);
187
+ function f(n, h, v, j, D, q) {
188
+ var k = h.children;
189
+ if (k !== void 0)
190
+ if (j)
191
+ if (Se(k)) {
192
+ for (j = 0; j < k.length; j++)
193
+ g(k[j]);
194
+ Object.freeze && Object.freeze(k);
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(v);
200
- if (W.call(u, "key")) {
201
- v = s(r);
202
- var C = Object.keys(u).filter(function(oe) {
203
- return oe !== "key";
199
+ else g(k);
200
+ if (ae.call(h, "key")) {
201
+ k = t(n);
202
+ var $ = Object.keys(h).filter(function(_e) {
203
+ return _e !== "key";
204
204
  });
205
- g = 0 < C.length ? "{key: someKey, " + C.join(": ..., ") + ": ...}" : "{key: someKey}", U[v + g] || (C = 0 < C.length ? "{" + C.join(": ..., ") + ": ...}" : "{}", console.error(
205
+ j = 0 < $.length ? "{key: someKey, " + $.join(": ..., ") + ": ...}" : "{key: someKey}", le[k + j] || ($ = 0 < $.length ? "{" + $.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
- g,
213
- v,
214
- C,
215
- v
216
- ), U[v + g] = !0);
212
+ j,
213
+ k,
214
+ $,
215
+ k
216
+ ), le[k + j] = !0);
217
217
  }
218
- if (v = null, p !== void 0 && (a(p), v = "" + p), i(u) && (a(u.key), v = "" + u.key), "key" in u) {
219
- p = {};
220
- for (var M in u)
221
- M !== "key" && (p[M] = u[M]);
222
- } else p = u;
223
- return v && c(
224
- p,
225
- typeof r == "function" ? r.displayName || r.name || "Unknown" : r
226
- ), b(
227
- r,
218
+ if (k = null, v !== void 0 && (a(v), k = "" + v), c(h) && (a(h.key), k = "" + h.key), "key" in h) {
219
+ v = {};
220
+ for (var J in h)
221
+ J !== "key" && (v[J] = h[J]);
222
+ } else v = h;
223
+ return k && l(
224
+ v,
225
+ typeof n == "function" ? n.displayName || n.name || "Unknown" : n
226
+ ), u(
227
+ n,
228
+ k,
228
229
  v,
229
- p,
230
- l(),
231
- A,
232
- I
230
+ o(),
231
+ D,
232
+ q
233
233
  );
234
234
  }
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));
235
+ function g(n) {
236
+ m(n) ? n._store && (n._store.validated = 1) : typeof n == "object" && n !== null && n.$$typeof === H && (n._payload.status === "fulfilled" ? m(n._payload.value) && n._payload.value._store && (n._payload.value._store.validated = 1) : n._store && (n._store.validated = 1));
237
237
  }
238
- function x(r) {
239
- return typeof r == "object" && r !== null && r.$$typeof === N;
238
+ function m(n) {
239
+ return typeof n == "object" && n !== null && n.$$typeof === w;
240
240
  }
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() {
241
+ var b = $e, w = Symbol.for("react.transitional.element"), C = Symbol.for("react.portal"), x = Symbol.for("react.fragment"), E = Symbol.for("react.strict_mode"), p = Symbol.for("react.profiler"), M = Symbol.for("react.consumer"), ve = Symbol.for("react.context"), je = Symbol.for("react.forward_ref"), ke = Symbol.for("react.suspense"), Ne = Symbol.for("react.suspense_list"), Ce = Symbol.for("react.memo"), H = Symbol.for("react.lazy"), Te = Symbol.for("react.activity"), Ee = Symbol.for("react.client.reference"), V = b.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, ae = Object.prototype.hasOwnProperty, Se = Array.isArray, G = console.createTask ? console.createTask : function() {
242
242
  return null;
243
243
  };
244
- y = {
245
- react_stack_bottom_frame: function(r) {
246
- return r();
244
+ b = {
245
+ react_stack_bottom_frame: function(n) {
246
+ return n();
247
247
  }
248
248
  };
249
- var P, V = {}, q = y.react_stack_bottom_frame.bind(
250
- y,
251
- o
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
- p,
249
+ var se, ne = {}, ie = b.react_stack_bottom_frame.bind(
250
+ b,
251
+ i
252
+ )(), oe = G(s(i)), le = {};
253
+ B.Fragment = x, B.jsx = function(n, h, v) {
254
+ var j = 1e4 > V.recentlyCreatedOwnerStacks++;
255
+ return f(
256
+ n,
257
+ h,
258
+ v,
259
259
  !1,
260
- g ? Error("react-stack-top-frame") : q,
261
- g ? $(n(r)) : G
260
+ j ? Error("react-stack-top-frame") : ie,
261
+ j ? G(s(n)) : oe
262
262
  );
263
- }, R.jsxs = function(r, u, p) {
264
- var g = 1e4 > B.recentlyCreatedOwnerStacks++;
265
- return j(
266
- r,
267
- u,
268
- p,
263
+ }, B.jsxs = function(n, h, v) {
264
+ var j = 1e4 > V.recentlyCreatedOwnerStacks++;
265
+ return f(
266
+ n,
267
+ h,
268
+ v,
269
269
  !0,
270
- g ? Error("react-stack-top-frame") : q,
271
- g ? $(n(r)) : G
270
+ j ? Error("react-stack-top-frame") : ie,
271
+ j ? G(s(n)) : oe
272
272
  );
273
273
  };
274
- })()), R;
274
+ })()), B;
275
275
  }
276
- var H;
277
- function fe() {
278
- return H || (H = 1, process.env.NODE_ENV === "production" ? O.exports = de() : O.exports = ue()), O.exports;
276
+ var ue;
277
+ function Ie() {
278
+ return ue || (ue = 1, process.env.NODE_ENV === "production" ? W.exports = Fe() : W.exports = Oe()), W.exports;
279
279
  }
280
- var e = fe();
281
- function je({ variant: s = "info", className: t, ...a }) {
282
- const n = [t || ""];
283
- switch (s) {
280
+ var r = Ie();
281
+ function st({ variant: t = "info", className: e, ...a }) {
282
+ const s = [e || ""];
283
+ switch (t) {
284
284
  case "warning": {
285
- n.push("bg-yellow-100 text-yellow-800 border-yellow-500");
285
+ s.push("bg-yellow-100 text-yellow-800 border-yellow-500");
286
286
  break;
287
287
  }
288
288
  case "error": {
289
- n.push("bg-red-100 text-red-800 border-red-500");
289
+ s.push("bg-red-100 text-red-800 border-red-500");
290
290
  break;
291
291
  }
292
292
  default:
293
293
  case "info": {
294
- n.push("bg-blue-100 text-blue-800 border-blue-500");
294
+ s.push("bg-blue-100 text-blue-800 border-blue-500");
295
295
  break;
296
296
  }
297
297
  }
298
- return /* @__PURE__ */ e.jsx(
298
+ return /* @__PURE__ */ r.jsx(
299
299
  "div",
300
300
  {
301
301
  role: "alert",
302
- className: `border px-4 py-2 rounded-lg ${n.join(" ")}`,
302
+ className: `border px-4 py-2 rounded-lg ${s.join(" ")}`,
303
303
  ...a
304
304
  }
305
305
  );
306
306
  }
307
- function T({
308
- variant: s,
309
- bold: t,
307
+ function L({
308
+ variant: t,
309
+ bold: e,
310
310
  italic: a,
311
- className: n,
312
- as: l,
313
- color: o,
314
- ...i
311
+ className: s,
312
+ as: o,
313
+ color: i,
314
+ ...c
315
315
  }) {
316
- const c = [n];
316
+ const l = [s];
317
317
  let d;
318
- if (l)
319
- d = l;
318
+ if (o)
319
+ d = o;
320
320
  else
321
- switch (s) {
321
+ switch (t) {
322
322
  case "heading":
323
323
  d = "h2";
324
324
  break;
@@ -330,60 +330,481 @@ function T({
330
330
  d = "p";
331
331
  break;
332
332
  }
333
- return t && c.push("font-bold"), a && c.push("italic"), o && c.push(`text-${o}`), /* @__PURE__ */ e.jsx(d, { className: c.join(" "), ...i });
333
+ return e && l.push("font-bold"), a && l.push("italic"), i && l.push(`text-${i}`), /* @__PURE__ */ r.jsx(d, { className: l.join(" "), ...c });
334
334
  }
335
- function me({ className: s, ...t }) {
336
- const a = [
337
- s,
338
- "px-large",
339
- "border",
340
- "border-1",
341
- "border-grey-light",
342
- "rounded",
343
- "lh-form-element",
344
- "h-form-element",
345
- "text-base"
346
- ];
347
- return /* @__PURE__ */ e.jsx("input", { className: a.join(" "), ...t });
335
+ class N {
336
+ /**
337
+ * Create font size token
338
+ */
339
+ static createFontSize(e) {
340
+ const s = {
341
+ xs: { px: 12, tailwind: "text-xs" },
342
+ sm: { px: 14, tailwind: "text-sm" },
343
+ base: { px: 16, tailwind: "text-base" },
344
+ lg: { px: 18, tailwind: "text-lg" },
345
+ xl: { px: 20, tailwind: "text-xl" },
346
+ "2xl": { px: 24, tailwind: "text-2xl" },
347
+ "3xl": { px: 30, tailwind: "text-3xl" },
348
+ "4xl": { px: 36, tailwind: "text-4xl" },
349
+ "5xl": { px: 48, tailwind: "text-5xl" },
350
+ "6xl": { px: 60, tailwind: "text-6xl" }
351
+ }[e];
352
+ return {
353
+ value: s.px,
354
+ rem: `${s.px / 16}rem`,
355
+ px: `${s.px}px`,
356
+ tailwind: s.tailwind
357
+ };
358
+ }
359
+ /**
360
+ * Create line height token
361
+ */
362
+ static createLineHeight(e) {
363
+ const s = {
364
+ none: { value: 1, tailwind: "leading-none" },
365
+ tight: { value: 1.25, tailwind: "leading-tight" },
366
+ snug: { value: 1.375, tailwind: "leading-snug" },
367
+ normal: { value: 1.5, tailwind: "leading-normal" },
368
+ relaxed: { value: 1.625, tailwind: "leading-relaxed" },
369
+ loose: { value: 2, tailwind: "leading-loose" }
370
+ }[e];
371
+ return {
372
+ value: s.value,
373
+ tailwind: s.tailwind
374
+ };
375
+ }
376
+ /**
377
+ * Create font weight token
378
+ */
379
+ static createFontWeight(e) {
380
+ const s = {
381
+ light: { value: 300, tailwind: "font-light" },
382
+ normal: { value: 400, tailwind: "font-normal" },
383
+ medium: { value: 500, tailwind: "font-medium" },
384
+ semibold: { value: 600, tailwind: "font-semibold" },
385
+ bold: { value: 700, tailwind: "font-bold" }
386
+ }[e];
387
+ return {
388
+ value: s.value,
389
+ tailwind: s.tailwind
390
+ };
391
+ }
392
+ /**
393
+ * Create complete typography token
394
+ */
395
+ static create(e, a = "normal", s = "normal") {
396
+ return {
397
+ fontSize: this.createFontSize(e),
398
+ lineHeight: this.createLineHeight(a),
399
+ fontWeight: this.createFontWeight(s)
400
+ };
401
+ }
348
402
  }
349
- function E({
350
- className: s,
351
- variant: t = "regular",
352
- ...a
403
+ const nt = {
404
+ sans: {
405
+ name: "sans",
406
+ stack: 'ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif',
407
+ tailwind: "font-sans"
408
+ },
409
+ serif: {
410
+ name: "serif",
411
+ stack: 'ui-serif, Georgia, Cambria, "Times New Roman", Times, serif',
412
+ tailwind: "font-serif"
413
+ },
414
+ mono: {
415
+ name: "mono",
416
+ stack: 'ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace',
417
+ tailwind: "font-mono"
418
+ }
419
+ }, it = {
420
+ light: N.createFontWeight("light"),
421
+ normal: N.createFontWeight("normal"),
422
+ medium: N.createFontWeight("medium"),
423
+ semibold: N.createFontWeight("semibold"),
424
+ bold: N.createFontWeight("bold")
425
+ }, z = {
426
+ // Headings
427
+ h1: N.create("4xl", "tight", "bold"),
428
+ h2: N.create("3xl", "tight", "bold"),
429
+ h3: N.create("2xl", "snug", "semibold"),
430
+ h4: N.create("xl", "snug", "semibold"),
431
+ h5: N.create("lg", "normal", "medium"),
432
+ h6: N.create("base", "normal", "medium"),
433
+ // Body text
434
+ body: N.create("base", "relaxed", "normal"),
435
+ bodySmall: N.create("sm", "relaxed", "normal"),
436
+ bodyLarge: N.create("lg", "relaxed", "normal"),
437
+ // UI elements
438
+ label: N.create("sm", "normal", "medium"),
439
+ caption: N.create("xs", "normal", "normal"),
440
+ button: N.create("base", "normal", "medium")
441
+ };
442
+ function ot(t) {
443
+ return z[t];
444
+ }
445
+ function F(t) {
446
+ const e = z[t];
447
+ return `${e.fontSize.tailwind} ${e.lineHeight.tailwind} ${e.fontWeight.tailwind}`;
448
+ }
449
+ class K {
450
+ generatePrimary() {
451
+ return {
452
+ light: { hex: "#818cf8", rgb: "129, 140, 248", tailwind: "indigo-400" },
453
+ DEFAULT: { hex: "#6366f1", rgb: "99, 102, 241", tailwind: "indigo-500" },
454
+ dark: { hex: "#4f46e5", rgb: "79, 70, 229", tailwind: "indigo-600" },
455
+ contrast: { hex: "#ffffff", rgb: "255, 255, 255", tailwind: "white" }
456
+ };
457
+ }
458
+ generateSecondary() {
459
+ return {
460
+ light: { hex: "#a78bfa", rgb: "167, 139, 250", tailwind: "violet-400" },
461
+ DEFAULT: { hex: "#8b5cf6", rgb: "139, 92, 246", tailwind: "violet-500" },
462
+ dark: { hex: "#7c3aed", rgb: "124, 58, 237", tailwind: "violet-600" },
463
+ contrast: { hex: "#ffffff", rgb: "255, 255, 255", tailwind: "white" }
464
+ };
465
+ }
466
+ generateSuccess() {
467
+ return {
468
+ light: { hex: "#86efac", rgb: "134, 239, 172", tailwind: "green-300" },
469
+ DEFAULT: { hex: "#22c55e", rgb: "34, 197, 94", tailwind: "green-500" },
470
+ dark: { hex: "#16a34a", rgb: "22, 163, 74", tailwind: "green-600" },
471
+ contrast: { hex: "#ffffff", rgb: "255, 255, 255", tailwind: "white" }
472
+ };
473
+ }
474
+ generateWarning() {
475
+ return {
476
+ light: { hex: "#fde047", rgb: "253, 224, 71", tailwind: "yellow-300" },
477
+ DEFAULT: { hex: "#eab308", rgb: "234, 179, 8", tailwind: "yellow-500" },
478
+ dark: { hex: "#ca8a04", rgb: "202, 138, 4", tailwind: "yellow-600" },
479
+ contrast: { hex: "#000000", rgb: "0, 0, 0", tailwind: "black" }
480
+ };
481
+ }
482
+ generateError() {
483
+ return {
484
+ light: { hex: "#fca5a5", rgb: "252, 165, 165", tailwind: "red-300" },
485
+ DEFAULT: { hex: "#ef4444", rgb: "239, 68, 68", tailwind: "red-500" },
486
+ dark: { hex: "#dc2626", rgb: "220, 38, 38", tailwind: "red-600" },
487
+ contrast: { hex: "#ffffff", rgb: "255, 255, 255", tailwind: "white" }
488
+ };
489
+ }
490
+ generateInfo() {
491
+ return {
492
+ light: { hex: "#93c5fd", rgb: "147, 197, 253", tailwind: "blue-300" },
493
+ DEFAULT: { hex: "#3b82f6", rgb: "59, 130, 246", tailwind: "blue-500" },
494
+ dark: { hex: "#2563eb", rgb: "37, 99, 235", tailwind: "blue-600" },
495
+ contrast: { hex: "#ffffff", rgb: "255, 255, 255", tailwind: "white" }
496
+ };
497
+ }
498
+ generateNeutral() {
499
+ return {
500
+ light: { hex: "#f3f4f6", rgb: "243, 244, 246", tailwind: "gray-100" },
501
+ DEFAULT: { hex: "#6b7280", rgb: "107, 114, 128", tailwind: "gray-500" },
502
+ dark: { hex: "#374151", rgb: "55, 65, 81", tailwind: "gray-700" },
503
+ contrast: { hex: "#ffffff", rgb: "255, 255, 255", tailwind: "white" }
504
+ };
505
+ }
506
+ }
507
+ class Q {
508
+ generatePrimary() {
509
+ return {
510
+ light: { hex: "#6366f1", rgb: "99, 102, 241", tailwind: "indigo-500" },
511
+ DEFAULT: { hex: "#818cf8", rgb: "129, 140, 248", tailwind: "indigo-400" },
512
+ dark: { hex: "#a5b4fc", rgb: "165, 180, 252", tailwind: "indigo-300" },
513
+ contrast: { hex: "#ffffff", rgb: "255, 255, 255", tailwind: "white" }
514
+ };
515
+ }
516
+ generateSecondary() {
517
+ return {
518
+ light: { hex: "#8b5cf6", rgb: "139, 92, 246", tailwind: "violet-500" },
519
+ DEFAULT: { hex: "#a78bfa", rgb: "167, 139, 250", tailwind: "violet-400" },
520
+ dark: { hex: "#c4b5fd", rgb: "196, 181, 253", tailwind: "violet-300" },
521
+ contrast: { hex: "#ffffff", rgb: "255, 255, 255", tailwind: "white" }
522
+ };
523
+ }
524
+ generateSuccess() {
525
+ return {
526
+ light: { hex: "#22c55e", rgb: "34, 197, 94", tailwind: "green-500" },
527
+ DEFAULT: { hex: "#4ade80", rgb: "74, 222, 128", tailwind: "green-400" },
528
+ dark: { hex: "#86efac", rgb: "134, 239, 172", tailwind: "green-300" },
529
+ contrast: { hex: "#000000", rgb: "0, 0, 0", tailwind: "black" }
530
+ };
531
+ }
532
+ generateWarning() {
533
+ return {
534
+ light: { hex: "#eab308", rgb: "234, 179, 8", tailwind: "yellow-500" },
535
+ DEFAULT: { hex: "#facc15", rgb: "250, 204, 21", tailwind: "yellow-400" },
536
+ dark: { hex: "#fde047", rgb: "253, 224, 71", tailwind: "yellow-300" },
537
+ contrast: { hex: "#000000", rgb: "0, 0, 0", tailwind: "black" }
538
+ };
539
+ }
540
+ generateError() {
541
+ return {
542
+ light: { hex: "#ef4444", rgb: "239, 68, 68", tailwind: "red-500" },
543
+ DEFAULT: { hex: "#f87171", rgb: "248, 113, 113", tailwind: "red-400" },
544
+ dark: { hex: "#fca5a5", rgb: "252, 165, 165", tailwind: "red-300" },
545
+ contrast: { hex: "#ffffff", rgb: "255, 255, 255", tailwind: "white" }
546
+ };
547
+ }
548
+ generateInfo() {
549
+ return {
550
+ light: { hex: "#3b82f6", rgb: "59, 130, 246", tailwind: "blue-500" },
551
+ DEFAULT: { hex: "#60a5fa", rgb: "96, 165, 250", tailwind: "blue-400" },
552
+ dark: { hex: "#93c5fd", rgb: "147, 197, 253", tailwind: "blue-300" },
553
+ contrast: { hex: "#ffffff", rgb: "255, 255, 255", tailwind: "white" }
554
+ };
555
+ }
556
+ generateNeutral() {
557
+ return {
558
+ light: { hex: "#374151", rgb: "55, 65, 81", tailwind: "gray-700" },
559
+ DEFAULT: { hex: "#9ca3af", rgb: "156, 163, 175", tailwind: "gray-400" },
560
+ dark: { hex: "#d1d5db", rgb: "209, 213, 219", tailwind: "gray-300" },
561
+ contrast: { hex: "#ffffff", rgb: "255, 255, 255", tailwind: "white" }
562
+ };
563
+ }
564
+ }
565
+ class ee {
566
+ strategy;
567
+ constructor(e) {
568
+ this.strategy = e;
569
+ }
570
+ /**
571
+ * Set color strategy
572
+ */
573
+ setStrategy(e) {
574
+ this.strategy = e;
575
+ }
576
+ /**
577
+ * Generate semantic color palette
578
+ */
579
+ generatePalette() {
580
+ return {
581
+ primary: this.strategy.generatePrimary(),
582
+ secondary: this.strategy.generateSecondary(),
583
+ success: this.strategy.generateSuccess(),
584
+ warning: this.strategy.generateWarning(),
585
+ error: this.strategy.generateError(),
586
+ info: this.strategy.generateInfo(),
587
+ neutral: this.strategy.generateNeutral()
588
+ };
589
+ }
590
+ }
591
+ const Be = new ee(new K()), te = Be.generatePalette(), Me = new ee(new Q()), he = Me.generatePalette(), xe = te;
592
+ function lt(t, e = "DEFAULT") {
593
+ return xe[t][e];
594
+ }
595
+ function S(t, e = "DEFAULT", a = "text") {
596
+ const s = xe[t][e];
597
+ return `${a}-${s.tailwind}`;
598
+ }
599
+ function De({
600
+ id: t,
601
+ label: e,
602
+ error: a = !1,
603
+ helperText: s,
604
+ size: o = "md",
605
+ variant: i = "outlined",
606
+ className: c = "",
607
+ disabled: l = !1,
608
+ ...d
353
609
  }) {
354
- const n = [
355
- s,
356
- "rounded",
357
- "h-form-element",
358
- "lh-form-element",
359
- "px-large",
360
- "text-base"
361
- ];
362
- switch (t) {
363
- case "error":
364
- n.push("bg-red-light", "text-red-dark", "font-bold");
365
- break;
366
- case "secondary":
367
- n.push("bg-transparent", "text-grey-minor", "px-0");
368
- break;
369
- case "regular":
370
- default:
371
- n.push("bg-blue-light", "text-blue-dark", "font-bold");
372
- break;
610
+ const u = t || `input-${Math.random().toString(36).substr(2, 9)}`, f = a ? `${u}-error` : void 0, g = s ? `${u}-helper` : void 0, m = {
611
+ sm: "h-8 text-sm px-3",
612
+ md: "h-10 text-base px-4",
613
+ lg: "h-12 text-lg px-5"
614
+ }, b = {
615
+ default: "border-0 border-b-2 border-gray-300 focus:border-indigo-500",
616
+ outlined: "border border-gray-300 focus:border-indigo-500",
617
+ filled: "bg-gray-100 border-0 focus:bg-white focus:ring-2 focus:ring-indigo-500"
618
+ }, w = [
619
+ "w-full",
620
+ "rounded-md",
621
+ "transition-colors",
622
+ "focus:outline-none",
623
+ "focus:ring-2",
624
+ "focus:ring-offset-2",
625
+ "disabled:opacity-50",
626
+ "disabled:cursor-not-allowed",
627
+ m[o],
628
+ b[i]
629
+ ], C = a ? "border-red-500 focus:border-red-500 focus:ring-red-500" : "", x = [
630
+ ...w,
631
+ C,
632
+ c
633
+ ].filter(Boolean).join(" "), E = [
634
+ "block",
635
+ F("label"),
636
+ "mb-1",
637
+ l ? "opacity-50" : ""
638
+ ].filter(Boolean).join(" ");
639
+ return /* @__PURE__ */ r.jsxs("div", { className: "w-full", children: [
640
+ e && /* @__PURE__ */ r.jsx(
641
+ "label",
642
+ {
643
+ htmlFor: u,
644
+ className: E,
645
+ children: e
646
+ }
647
+ ),
648
+ /* @__PURE__ */ r.jsx(
649
+ "input",
650
+ {
651
+ id: u,
652
+ className: x,
653
+ disabled: l,
654
+ "aria-invalid": a,
655
+ "aria-describedby": f || g,
656
+ ...d
657
+ }
658
+ ),
659
+ (a || s) && /* @__PURE__ */ r.jsx(
660
+ "div",
661
+ {
662
+ id: f || g,
663
+ className: `mt-1 ${F("caption")} ${a ? S("error", "DEFAULT", "text") : "text-gray-500"}`,
664
+ role: a ? "alert" : void 0,
665
+ children: a || s
666
+ }
667
+ )
668
+ ] });
669
+ }
670
+ class We {
671
+ classes = [];
672
+ addBase() {
673
+ return this.classes.push(
674
+ "inline-flex",
675
+ "items-center",
676
+ "justify-center",
677
+ "font-medium",
678
+ "rounded-md",
679
+ "transition-colors",
680
+ "focus:outline-none",
681
+ "focus:ring-2",
682
+ "focus:ring-offset-2",
683
+ "disabled:opacity-50",
684
+ "disabled:cursor-not-allowed"
685
+ ), this;
686
+ }
687
+ addVariant(e) {
688
+ const a = e === "regular" ? "primary" : e, s = {
689
+ primary: [
690
+ S("primary", "DEFAULT", "bg"),
691
+ S("primary", "DEFAULT", "text"),
692
+ "hover:opacity-90",
693
+ "focus:ring-indigo-500"
694
+ ],
695
+ secondary: [
696
+ S("secondary", "DEFAULT", "bg"),
697
+ S("secondary", "DEFAULT", "text"),
698
+ "hover:opacity-90",
699
+ "focus:ring-violet-500"
700
+ ],
701
+ error: [
702
+ S("error", "DEFAULT", "bg"),
703
+ S("error", "DEFAULT", "text"),
704
+ "hover:opacity-90",
705
+ "focus:ring-red-500"
706
+ ],
707
+ outline: [
708
+ "border-2",
709
+ "border-gray-300",
710
+ "bg-transparent",
711
+ "text-gray-700",
712
+ "hover:bg-gray-50",
713
+ "focus:ring-gray-500"
714
+ ],
715
+ ghost: [
716
+ "bg-transparent",
717
+ "text-gray-700",
718
+ "hover:bg-gray-100",
719
+ "focus:ring-gray-500"
720
+ ]
721
+ };
722
+ return this.classes.push(...s[a]), this;
723
+ }
724
+ addSize(e) {
725
+ const a = {
726
+ sm: ["px-3", "py-1.5", "text-sm"],
727
+ md: ["px-4", "py-2", "text-base"],
728
+ lg: ["px-6", "py-3", "text-lg"]
729
+ };
730
+ return this.classes.push(...a[e]), this;
731
+ }
732
+ addCustom(e) {
733
+ return e && this.classes.push(e), this;
734
+ }
735
+ build() {
736
+ return this.classes.filter(Boolean).join(" ");
373
737
  }
374
- return /* @__PURE__ */ e.jsx("button", { className: n.join(" "), ...a });
375
738
  }
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 });
739
+ function O({
740
+ variant: t = "primary",
741
+ size: e = "md",
742
+ isLoading: a = !1,
743
+ leftIcon: s,
744
+ rightIcon: o,
745
+ className: i = "",
746
+ disabled: c = !1,
747
+ children: l,
748
+ ...d
749
+ }) {
750
+ const f = new We().addBase().addVariant(t).addSize(e).addCustom(i).build();
751
+ return /* @__PURE__ */ r.jsx(
752
+ "button",
753
+ {
754
+ className: f,
755
+ disabled: c || a,
756
+ ...d,
757
+ children: a ? /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
758
+ /* @__PURE__ */ r.jsxs(
759
+ "svg",
760
+ {
761
+ className: "animate-spin -ml-1 mr-2 h-4 w-4",
762
+ xmlns: "http://www.w3.org/2000/svg",
763
+ fill: "none",
764
+ viewBox: "0 0 24 24",
765
+ children: [
766
+ /* @__PURE__ */ r.jsx(
767
+ "circle",
768
+ {
769
+ className: "opacity-25",
770
+ cx: "12",
771
+ cy: "12",
772
+ r: "10",
773
+ stroke: "currentColor",
774
+ strokeWidth: "4"
775
+ }
776
+ ),
777
+ /* @__PURE__ */ r.jsx(
778
+ "path",
779
+ {
780
+ className: "opacity-75",
781
+ fill: "currentColor",
782
+ d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"
783
+ }
784
+ )
785
+ ]
786
+ }
787
+ ),
788
+ "Loading..."
789
+ ] }) : /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
790
+ s && /* @__PURE__ */ r.jsx("span", { className: "mr-2", children: s }),
791
+ l,
792
+ o && /* @__PURE__ */ r.jsx("span", { className: "ml-2", children: o })
793
+ ] })
794
+ }
795
+ );
796
+ }
797
+ function Pe({ className: t, ...e }) {
798
+ const a = [t, "p-large", "bg-bg", "rounded", "shadow-card"];
799
+ return /* @__PURE__ */ r.jsx("div", { className: a.join(" "), ...e });
379
800
  }
380
- function ye({
381
- variant: s = "neutral",
382
- className: t = "",
801
+ function ct({
802
+ variant: t = "neutral",
803
+ className: e = "",
383
804
  children: a,
384
- ...n
805
+ ...s
385
806
  }) {
386
- const l = [
807
+ const o = [
387
808
  "inline-flex",
388
809
  "items-center",
389
810
  "px-2",
@@ -392,36 +813,36 @@ function ye({
392
813
  "text-xs",
393
814
  "font-medium",
394
815
  "border"
395
- ], o = {
816
+ ], i = {
396
817
  success: "bg-green-100 text-green-800 border-green-500",
397
818
  warning: "bg-yellow-100 text-yellow-800 border-yellow-500",
398
819
  error: "bg-red-100 text-red-800 border-red-500",
399
820
  info: "bg-blue-100 text-blue-800 border-blue-500",
400
821
  neutral: "bg-gray-100 text-gray-800 border-gray-500"
401
- }, i = [
402
- ...l,
403
- o[s],
404
- t
822
+ }, c = [
823
+ ...o,
824
+ i[t],
825
+ e
405
826
  ].filter(Boolean).join(" ");
406
- return /* @__PURE__ */ e.jsx(
827
+ return /* @__PURE__ */ r.jsx(
407
828
  "span",
408
829
  {
409
830
  role: "status",
410
831
  "aria-label": typeof a == "string" ? a : void 0,
411
- className: i,
412
- ...n,
832
+ className: c,
833
+ ...s,
413
834
  children: a
414
835
  }
415
836
  );
416
837
  }
417
- function Ne({
418
- options: s,
419
- placeholder: t,
838
+ function dt({
839
+ options: t,
840
+ placeholder: e,
420
841
  error: a = !1,
421
- className: n = "",
422
- ...l
842
+ className: s = "",
843
+ ...o
423
844
  }) {
424
- const o = [
845
+ const i = [
425
846
  "block",
426
847
  "w-full",
427
848
  "rounded",
@@ -432,21 +853,21 @@ function Ne({
432
853
  "focus:outline-none",
433
854
  "focus:ring-2",
434
855
  "focus:ring-offset-2"
435
- ], i = a ? "border-red-500 focus:ring-red-500" : "border-gray-300 focus:ring-indigo-500", c = [
436
- ...o,
437
- i,
438
- n
856
+ ], c = a ? "border-red-500 focus:ring-red-500" : "border-gray-300 focus:ring-indigo-500", l = [
857
+ ...i,
858
+ c,
859
+ s
439
860
  ].filter(Boolean).join(" ");
440
- return /* @__PURE__ */ e.jsxs(
861
+ return /* @__PURE__ */ r.jsxs(
441
862
  "select",
442
863
  {
443
- className: c,
864
+ className: l,
444
865
  "aria-invalid": a,
445
- "aria-describedby": a ? `${l.id}-error` : void 0,
446
- ...l,
866
+ "aria-describedby": a ? `${o.id}-error` : void 0,
867
+ ...o,
447
868
  children: [
448
- t && /* @__PURE__ */ e.jsx("option", { value: "", disabled: !0, children: t }),
449
- s.map((d) => /* @__PURE__ */ e.jsx(
869
+ e && /* @__PURE__ */ r.jsx("option", { value: "", disabled: !0, children: e }),
870
+ t.map((d) => /* @__PURE__ */ r.jsx(
450
871
  "option",
451
872
  {
452
873
  value: d.value,
@@ -459,13 +880,13 @@ function Ne({
459
880
  }
460
881
  );
461
882
  }
462
- function we({
463
- error: s = !1,
464
- resize: t = "vertical",
883
+ function ut({
884
+ error: t = !1,
885
+ resize: e = "vertical",
465
886
  className: a = "",
466
- ...n
887
+ ...s
467
888
  }) {
468
- const l = [
889
+ const o = [
469
890
  "block",
470
891
  "w-full",
471
892
  "rounded",
@@ -476,56 +897,56 @@ function we({
476
897
  "focus:outline-none",
477
898
  "focus:ring-2",
478
899
  "focus:ring-offset-2"
479
- ], o = {
900
+ ], i = {
480
901
  none: "resize-none",
481
902
  both: "resize",
482
903
  horizontal: "resize-x",
483
904
  vertical: "resize-y"
484
- }, i = s ? "border-red-500 focus:ring-red-500" : "border-gray-300 focus:ring-indigo-500", c = [
485
- ...l,
486
- o[t],
487
- i,
905
+ }, c = t ? "border-red-500 focus:ring-red-500" : "border-gray-300 focus:ring-indigo-500", l = [
906
+ ...o,
907
+ i[e],
908
+ c,
488
909
  a
489
910
  ].filter(Boolean).join(" ");
490
- return /* @__PURE__ */ e.jsx(
911
+ return /* @__PURE__ */ r.jsx(
491
912
  "textarea",
492
913
  {
493
- className: c,
494
- "aria-invalid": s,
495
- "aria-describedby": s && n.id ? `${n.id}-error` : void 0,
496
- ...n
914
+ className: l,
915
+ "aria-invalid": t,
916
+ "aria-describedby": t && s.id ? `${s.id}-error` : void 0,
917
+ ...s
497
918
  }
498
919
  );
499
920
  }
500
- function ke({
501
- variant: s = "default",
502
- className: t = "",
921
+ function ft({
922
+ variant: t = "default",
923
+ className: e = "",
503
924
  children: a,
504
- ...n
925
+ ...s
505
926
  }) {
506
- const l = [
927
+ const o = [
507
928
  "block",
508
929
  "text-sm",
509
930
  "font-medium",
510
931
  "text-gray-700"
511
- ], o = {
932
+ ], i = {
512
933
  default: "",
513
934
  required: "after:content-['*'] after:ml-0.5 after:text-red-500",
514
935
  optional: "after:content-['(optional)'] after:ml-1 after:text-gray-400 after:font-normal"
515
- }, i = [
516
- ...l,
517
- o[s],
518
- t
936
+ }, c = [
937
+ ...o,
938
+ i[t],
939
+ e
519
940
  ].filter(Boolean).join(" ");
520
- return /* @__PURE__ */ e.jsx("label", { className: i, ...n, children: a });
941
+ return /* @__PURE__ */ r.jsx("label", { className: c, ...s, children: a });
521
942
  }
522
- function Ce({
523
- message: s,
524
- id: t,
943
+ function mt({
944
+ message: t,
945
+ id: e,
525
946
  className: a = "",
526
- ...n
947
+ ...s
527
948
  }) {
528
- const o = [
949
+ const i = [
529
950
  ...[
530
951
  "mt-1",
531
952
  "text-sm",
@@ -536,23 +957,23 @@ function Ce({
536
957
  ],
537
958
  a
538
959
  ].filter(Boolean).join(" ");
539
- return /* @__PURE__ */ e.jsxs(
960
+ return /* @__PURE__ */ r.jsxs(
540
961
  "div",
541
962
  {
542
963
  role: "alert",
543
- id: t,
544
- className: o,
964
+ id: e,
965
+ className: i,
545
966
  "aria-live": "polite",
546
- ...n,
967
+ ...s,
547
968
  children: [
548
- /* @__PURE__ */ e.jsx(
969
+ /* @__PURE__ */ r.jsx(
549
970
  "svg",
550
971
  {
551
972
  className: "h-4 w-4 flex-shrink-0",
552
973
  fill: "currentColor",
553
974
  viewBox: "0 0 20 20",
554
975
  "aria-hidden": "true",
555
- children: /* @__PURE__ */ e.jsx(
976
+ children: /* @__PURE__ */ r.jsx(
556
977
  "path",
557
978
  {
558
979
  fillRule: "evenodd",
@@ -562,19 +983,19 @@ function Ce({
562
983
  )
563
984
  }
564
985
  ),
565
- /* @__PURE__ */ e.jsx("span", { children: s })
986
+ /* @__PURE__ */ r.jsx("span", { children: t })
566
987
  ]
567
988
  }
568
989
  );
569
990
  }
570
- function be({
571
- variant: s = "default",
572
- icon: t,
991
+ function ze({
992
+ variant: t = "default",
993
+ icon: e,
573
994
  className: a = "",
574
- children: n,
575
- ...l
995
+ children: s,
996
+ ...o
576
997
  }) {
577
- const o = [
998
+ const i = [
578
999
  "inline-flex",
579
1000
  "items-center",
580
1001
  "px-1",
@@ -583,69 +1004,69 @@ function be({
583
1004
  "text-sm",
584
1005
  "font-medium",
585
1006
  "transition-colors"
586
- ], i = {
1007
+ ], c = {
587
1008
  default: "border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700",
588
1009
  active: "border-indigo-500 text-gray-900",
589
1010
  disabled: "border-transparent text-gray-300 cursor-not-allowed pointer-events-none"
590
- }, c = [
591
- ...o,
592
- i[s],
1011
+ }, l = [
1012
+ ...i,
1013
+ c[t],
593
1014
  a
594
1015
  ].filter(Boolean).join(" ");
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
1016
+ return t === "disabled" ? /* @__PURE__ */ r.jsxs("span", { className: l, "aria-disabled": "true", children: [
1017
+ e && /* @__PURE__ */ r.jsx("span", { className: "flex-shrink-0", children: e }),
1018
+ s
1019
+ ] }) : /* @__PURE__ */ r.jsxs("a", { className: l, ...o, children: [
1020
+ e && /* @__PURE__ */ r.jsx("span", { className: "flex-shrink-0", children: e }),
1021
+ s
601
1022
  ] });
602
1023
  }
603
- function Ee({
604
- content: s,
605
- children: t,
1024
+ function gt({
1025
+ content: t,
1026
+ children: e,
606
1027
  position: a = "top",
607
- delay: n = 200,
608
- className: l = "",
609
- ...o
1028
+ delay: s = 200,
1029
+ className: o = "",
1030
+ ...i
610
1031
  }) {
611
- const [i, c] = Y(!1), [d, b] = Y(null), j = () => {
612
- const N = setTimeout(() => {
613
- c(!0);
614
- }, n);
615
- b(N);
616
- }, m = () => {
617
- d && (clearTimeout(d), b(null)), c(!1);
618
- }, x = {
1032
+ const [c, l] = A(!1), [d, u] = A(null), f = () => {
1033
+ const w = setTimeout(() => {
1034
+ l(!0);
1035
+ }, s);
1036
+ u(w);
1037
+ }, g = () => {
1038
+ d && (clearTimeout(d), u(null)), l(!1);
1039
+ }, m = {
619
1040
  top: "bottom-full left-1/2 transform -translate-x-1/2 mb-2",
620
1041
  bottom: "top-full left-1/2 transform -translate-x-1/2 mt-2",
621
1042
  left: "right-full top-1/2 transform -translate-y-1/2 mr-2",
622
1043
  right: "left-full top-1/2 transform -translate-y-1/2 ml-2"
623
- }, y = {
1044
+ }, b = {
624
1045
  top: "top-full left-1/2 transform -translate-x-1/2 border-t-gray-900",
625
1046
  bottom: "bottom-full left-1/2 transform -translate-x-1/2 border-b-gray-900",
626
1047
  left: "left-full top-1/2 transform -translate-y-1/2 border-l-gray-900",
627
1048
  right: "right-full top-1/2 transform -translate-y-1/2 border-r-gray-900"
628
1049
  };
629
- return /* @__PURE__ */ e.jsxs(
1050
+ return /* @__PURE__ */ r.jsxs(
630
1051
  "div",
631
1052
  {
632
- className: `relative inline-block ${l}`,
633
- onMouseEnter: j,
634
- onMouseLeave: m,
635
- ...o,
1053
+ className: `relative inline-block ${o}`,
1054
+ onMouseEnter: f,
1055
+ onMouseLeave: g,
1056
+ ...i,
636
1057
  children: [
637
- t,
638
- i && /* @__PURE__ */ e.jsxs(
1058
+ e,
1059
+ c && /* @__PURE__ */ r.jsxs(
639
1060
  "div",
640
1061
  {
641
- className: `absolute z-50 px-2 py-1 text-xs text-white bg-gray-900 rounded shadow-lg whitespace-nowrap ${x[a]}`,
1062
+ className: `absolute z-50 px-2 py-1 text-xs text-white bg-gray-900 rounded shadow-lg whitespace-nowrap ${m[a]}`,
642
1063
  role: "tooltip",
643
1064
  children: [
644
- s,
645
- /* @__PURE__ */ e.jsx(
1065
+ t,
1066
+ /* @__PURE__ */ r.jsx(
646
1067
  "div",
647
1068
  {
648
- className: `absolute w-0 h-0 border-4 border-transparent ${y[a]}`
1069
+ className: `absolute w-0 h-0 border-4 border-transparent ${b[a]}`
649
1070
  }
650
1071
  )
651
1072
  ]
@@ -655,154 +1076,432 @@ function Ee({
655
1076
  }
656
1077
  );
657
1078
  }
658
- function _e({
659
- variant: s = "text",
660
- width: t,
1079
+ function ht({
1080
+ variant: t = "text",
1081
+ width: e,
661
1082
  height: a,
662
- lines: n = 1,
663
- className: l = "",
664
- ...o
1083
+ lines: s = 1,
1084
+ className: o = "",
1085
+ ...i
665
1086
  }) {
666
- const i = [
1087
+ const c = [
667
1088
  "animate-pulse",
668
1089
  "bg-gray-200",
669
1090
  "rounded"
670
- ], c = {
1091
+ ], l = {
671
1092
  text: "h-4",
672
1093
  card: "h-32",
673
1094
  list: "h-12",
674
1095
  circle: "rounded-full"
675
1096
  }, d = [
676
- ...i,
677
- c[s],
678
- l
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(
1097
+ ...c,
1098
+ l[t],
1099
+ o
1100
+ ].filter(Boolean).join(" "), u = {};
1101
+ return e && (u.width = e), a && (u.height = a), t === "text" && s > 1 ? /* @__PURE__ */ r.jsx("div", { className: "space-y-2", ...i, children: Array.from({ length: s }).map((f, g) => /* @__PURE__ */ r.jsx(
681
1102
  "div",
682
1103
  {
683
1104
  className: d,
684
- style: m === n - 1 ? { width: "75%" } : b
1105
+ style: g === s - 1 ? { width: "75%" } : u
1106
+ },
1107
+ g
1108
+ )) }) : /* @__PURE__ */ r.jsx("div", { className: d, style: u, ...i });
1109
+ }
1110
+ const y = {
1111
+ // Icon sizes
1112
+ icon: {
1113
+ sm: "h-4 w-4",
1114
+ // 16px
1115
+ md: "h-5 w-5",
1116
+ // 20px (default)
1117
+ lg: "h-6 w-6"
1118
+ // 24px
1119
+ },
1120
+ // Text sizes
1121
+ text: {
1122
+ xs: "text-xs",
1123
+ // 12px (group titles)
1124
+ sm: "text-sm",
1125
+ // 14px (items - default)
1126
+ base: "text-base"
1127
+ // 16px
1128
+ },
1129
+ // Spacing
1130
+ spacing: {
1131
+ itemPaddingX: "px-4",
1132
+ // 16px horizontal padding for items
1133
+ itemPaddingY: "py-2",
1134
+ // 8px vertical padding for items
1135
+ nestedIndent: "pl-6",
1136
+ // 24px for nested items (level 1)
1137
+ nestedIndentLevel2: "pl-10",
1138
+ // 40px for nested items (level 2)
1139
+ nestedIndentLevel3: "pl-14",
1140
+ // 56px for nested items (level 3)
1141
+ groupTitlePadding: "px-4 py-2",
1142
+ // Padding for group titles
1143
+ iconMargin: "mr-3"
1144
+ // 12px margin between icon and text
1145
+ },
1146
+ // Colors (using Tailwind classes)
1147
+ colors: {
1148
+ active: {
1149
+ bg: "bg-indigo-50",
1150
+ text: "text-indigo-700",
1151
+ border: "border-indigo-600"
685
1152
  },
686
- m
687
- )) }) : /* @__PURE__ */ e.jsx("div", { className: d, style: b, ...o });
1153
+ inactive: {
1154
+ text: "text-gray-700",
1155
+ hover: "hover:bg-gray-100 hover:text-gray-900"
1156
+ },
1157
+ groupTitle: "text-gray-500"
1158
+ },
1159
+ // Chevron (for collapsible groups)
1160
+ chevron: {
1161
+ size: "h-3 w-3",
1162
+ // 12px (reduced from h-4 w-4)
1163
+ color: "text-gray-400"
1164
+ // Subtle gray color
1165
+ }
1166
+ };
1167
+ function Ue(t) {
1168
+ return t <= 0 ? y.spacing.itemPaddingX : t === 1 ? y.spacing.nestedIndent : t === 2 ? y.spacing.nestedIndentLevel2 : t === 3 ? y.spacing.nestedIndentLevel3 : `pl-${4 + t * 4}`;
688
1169
  }
689
- function he({
690
- href: s,
691
- isActive: t = !1,
1170
+ function Ye({
1171
+ href: t,
1172
+ isActive: e = !1,
692
1173
  icon: a,
693
- children: n,
694
- className: l = "",
695
- ...o
1174
+ nested: s = !1,
1175
+ iconSize: o = "md",
1176
+ children: i,
1177
+ className: c = "",
1178
+ ...l
696
1179
  }) {
697
- const i = [
1180
+ const f = [
698
1181
  "flex",
699
1182
  "items-center",
700
- "px-4",
701
- "py-2",
702
- "text-sm",
1183
+ Ue(typeof s == "number" ? s : s ? 1 : 0),
1184
+ y.spacing.itemPaddingY,
1185
+ y.text.sm,
703
1186
  "font-medium",
704
1187
  "rounded-md",
705
1188
  "transition-colors",
706
1189
  "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
1190
+ ], g = e ? `${y.colors.active.bg} ${y.colors.active.text} border-r-2 ${y.colors.active.border}` : `${y.colors.inactive.text} ${y.colors.inactive.hover}`, m = y.icon[o], b = [
1191
+ ...f,
1192
+ g,
1193
+ c
1194
+ ].filter(Boolean).join(" ");
1195
+ return /* @__PURE__ */ r.jsxs("a", { href: t, className: b, ...l, children: [
1196
+ a && /* @__PURE__ */ r.jsx("span", { className: `${m} ${y.spacing.iconMargin} shrink-0`, children: a }),
1197
+ /* @__PURE__ */ r.jsx("span", { children: i })
1198
+ ] });
1199
+ }
1200
+ function He({
1201
+ defaultOpen: t = !0,
1202
+ open: e,
1203
+ onOpenChange: a,
1204
+ storageKey: s
1205
+ }) {
1206
+ const o = X(() => {
1207
+ if (s && typeof window < "u") {
1208
+ const f = localStorage.getItem(s);
1209
+ if (f !== null)
1210
+ return f === "true";
1211
+ }
1212
+ return t;
1213
+ }, [t, s]), [i, c] = A(o), l = e !== void 0 ? e : i;
1214
+ _(() => {
1215
+ s && typeof window < "u" && e === void 0 && localStorage.setItem(s, String(i));
1216
+ }, [i, s, e]);
1217
+ const d = X(
1218
+ (f) => {
1219
+ e === void 0 && c(f), a?.(f);
1220
+ },
1221
+ [e, a]
1222
+ ), u = X(() => {
1223
+ d(!l);
1224
+ }, [l, d]);
1225
+ return {
1226
+ isOpen: l,
1227
+ toggle: u,
1228
+ setOpen: d
1229
+ };
1230
+ }
1231
+ function Ve({
1232
+ children: t,
1233
+ trigger: e,
1234
+ defaultOpen: a = !0,
1235
+ open: s,
1236
+ onOpenChange: o,
1237
+ disabled: i = !1,
1238
+ duration: c = 200,
1239
+ storageKey: l,
1240
+ className: d = "",
1241
+ ...u
1242
+ }) {
1243
+ const { isOpen: f, toggle: g } = He({
1244
+ defaultOpen: a,
1245
+ open: s,
1246
+ onOpenChange: o,
1247
+ storageKey: l
1248
+ }), m = P(null), [b, w] = A(f ? "auto" : 0);
1249
+ _(() => {
1250
+ m.current && w(f ? m.current.scrollHeight : 0);
1251
+ }, [f, t]), _(() => {
1252
+ if (!f || !m.current) return;
1253
+ const x = new ResizeObserver(() => {
1254
+ m.current && f && w(m.current.scrollHeight);
1255
+ });
1256
+ return x.observe(m.current), () => {
1257
+ x.disconnect();
1258
+ };
1259
+ }, [f]);
1260
+ const C = `collapsible-content-${Math.random().toString(36).substr(2, 9)}`;
1261
+ return /* @__PURE__ */ r.jsxs("div", { className: d, ...u, children: [
1262
+ /* @__PURE__ */ r.jsx(
1263
+ "button",
1264
+ {
1265
+ type: "button",
1266
+ onClick: g,
1267
+ disabled: i,
1268
+ "aria-expanded": f,
1269
+ "aria-controls": C,
1270
+ "aria-disabled": i,
1271
+ className: "w-full text-left focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2 rounded-md",
1272
+ children: e
1273
+ }
1274
+ ),
1275
+ /* @__PURE__ */ r.jsx(
1276
+ "div",
1277
+ {
1278
+ id: C,
1279
+ ref: m,
1280
+ style: {
1281
+ height: typeof b == "number" ? `${b}px` : b,
1282
+ overflow: "hidden",
1283
+ transition: `height ${c}ms ease-in-out`
1284
+ },
1285
+ "aria-hidden": !f,
1286
+ children: /* @__PURE__ */ r.jsx("div", { children: t })
1287
+ }
1288
+ )
1289
+ ] });
1290
+ }
1291
+ function xt({
1292
+ id: t,
1293
+ label: e,
1294
+ error: a = !1,
1295
+ helperText: s,
1296
+ className: o = "",
1297
+ disabled: i = !1,
1298
+ ...c
1299
+ }) {
1300
+ const l = t || `checkbox-${Math.random().toString(36).substr(2, 9)}`, d = a ? `${l}-error` : void 0, u = s ? `${l}-helper` : void 0, f = [
1301
+ "h-4",
1302
+ "w-4",
1303
+ "rounded",
1304
+ "border-gray-300",
1305
+ "text-indigo-600",
1306
+ "focus:ring-2",
1307
+ "focus:ring-indigo-500",
1308
+ "focus:ring-offset-2",
1309
+ "disabled:opacity-50",
1310
+ "disabled:cursor-not-allowed",
1311
+ "cursor-pointer"
1312
+ ], g = a ? "border-red-500 focus:ring-red-500" : "", m = [
1313
+ ...f,
1314
+ g
1315
+ ].filter(Boolean).join(" "), b = [
1316
+ F("label"),
1317
+ "ml-2",
1318
+ i ? "opacity-50 cursor-not-allowed" : "cursor-pointer"
711
1319
  ].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 })
1320
+ return /* @__PURE__ */ r.jsxs("div", { className: `flex flex-col my-2 ${o}`, children: [
1321
+ /* @__PURE__ */ r.jsxs("div", { className: "flex items-center", children: [
1322
+ /* @__PURE__ */ r.jsx(
1323
+ "input",
1324
+ {
1325
+ type: "checkbox",
1326
+ id: l,
1327
+ className: m,
1328
+ disabled: i,
1329
+ "aria-invalid": a,
1330
+ "aria-describedby": d || u,
1331
+ ...c
1332
+ }
1333
+ ),
1334
+ e && /* @__PURE__ */ r.jsx(
1335
+ "label",
1336
+ {
1337
+ htmlFor: l,
1338
+ className: b,
1339
+ children: e
1340
+ }
1341
+ )
1342
+ ] }),
1343
+ (a || s) && /* @__PURE__ */ r.jsx(
1344
+ "div",
1345
+ {
1346
+ id: d || u,
1347
+ className: `mt-1 ${F("caption")} ${a ? "text-red-600" : "text-gray-500"}`,
1348
+ role: a ? "alert" : void 0,
1349
+ children: a || s
1350
+ }
1351
+ )
715
1352
  ] });
716
1353
  }
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 })
1354
+ function bt({
1355
+ id: t,
1356
+ label: e,
1357
+ error: a = !1,
1358
+ helperText: s,
1359
+ className: o = "",
1360
+ disabled: i = !1,
1361
+ ...c
1362
+ }) {
1363
+ const l = t || `radio-${Math.random().toString(36).substr(2, 9)}`, d = a ? `${l}-error` : void 0, u = s ? `${l}-helper` : void 0, f = [
1364
+ "h-4",
1365
+ "w-4",
1366
+ "border-gray-300",
1367
+ "text-indigo-600",
1368
+ "focus:ring-2",
1369
+ "focus:ring-indigo-500",
1370
+ "focus:ring-offset-2",
1371
+ "disabled:opacity-50",
1372
+ "disabled:cursor-not-allowed",
1373
+ "cursor-pointer"
1374
+ ], g = a ? "border-red-500 focus:ring-red-500" : "", m = [
1375
+ ...f,
1376
+ g
1377
+ ].filter(Boolean).join(" "), b = [
1378
+ F("label"),
1379
+ "ml-2",
1380
+ i ? "opacity-50 cursor-not-allowed" : "cursor-pointer"
1381
+ ].filter(Boolean).join(" ");
1382
+ return /* @__PURE__ */ r.jsxs("div", { className: `flex flex-col my-2 ${o}`, children: [
1383
+ /* @__PURE__ */ r.jsxs("div", { className: "flex items-center", children: [
1384
+ /* @__PURE__ */ r.jsx(
1385
+ "input",
1386
+ {
1387
+ type: "radio",
1388
+ id: l,
1389
+ className: m,
1390
+ disabled: i,
1391
+ "aria-invalid": a,
1392
+ "aria-describedby": d || u,
1393
+ ...c
1394
+ }
1395
+ ),
1396
+ e && /* @__PURE__ */ r.jsx(
1397
+ "label",
1398
+ {
1399
+ htmlFor: l,
1400
+ className: b,
1401
+ children: e
1402
+ }
1403
+ )
1404
+ ] }),
1405
+ (a || s) && /* @__PURE__ */ r.jsx(
1406
+ "div",
1407
+ {
1408
+ id: d || u,
1409
+ className: `mt-1 ${F("caption")} ${a ? "text-red-600" : "text-gray-500"}`,
1410
+ role: a ? "alert" : void 0,
1411
+ children: a || s
1412
+ }
1413
+ )
721
1414
  ] });
722
1415
  }
723
- function Re({
724
- variant: s = "default",
725
- padding: t = "medium",
1416
+ function fe({ label: t, size: e, ...a }) {
1417
+ return a.id || console.error("InputWithLabel component requires an id prop"), /* @__PURE__ */ r.jsxs("div", { className: "mb-medium grid gap-small", children: [
1418
+ /* @__PURE__ */ r.jsx(L, { as: "label", htmlFor: a.id, className: "cursor-pointer", children: t }),
1419
+ /* @__PURE__ */ r.jsx(De, { ...a, size: e })
1420
+ ] });
1421
+ }
1422
+ function pt({
1423
+ variant: t = "default",
1424
+ padding: e = "medium",
726
1425
  className: a = "",
727
- children: n,
728
- ...l
1426
+ children: s,
1427
+ ...o
729
1428
  }) {
730
- const o = [
1429
+ const i = [
731
1430
  "bg-white",
732
1431
  "rounded-lg",
733
1432
  "border",
734
1433
  "border-gray-200",
735
1434
  "shadow-sm"
736
- ], i = {
1435
+ ], c = {
737
1436
  default: "",
738
1437
  hover: "hover:shadow-md transition-shadow cursor-pointer",
739
1438
  selected: "border-indigo-500 shadow-md"
740
- }, c = {
1439
+ }, l = {
741
1440
  none: "",
742
1441
  small: "p-2",
743
1442
  medium: "p-4",
744
1443
  large: "p-6"
745
1444
  }, d = [
746
- ...o,
747
- i[s],
1445
+ ...i,
748
1446
  c[t],
1447
+ l[e],
749
1448
  a
750
1449
  ].filter(Boolean).join(" ");
751
- return /* @__PURE__ */ e.jsx("div", { className: d, ...l, children: n });
1450
+ return /* @__PURE__ */ r.jsx("div", { className: d, ...o, children: s });
752
1451
  }
753
- function Te({
754
- children: s,
755
- onSubmit: t,
1452
+ function yt({
1453
+ children: t,
1454
+ onSubmit: e,
756
1455
  loading: a = !1,
757
- error: n = null,
758
- success: l = null,
759
- className: o = "",
760
- ...i
1456
+ error: s = null,
1457
+ success: o = null,
1458
+ className: i = "",
1459
+ ...c
761
1460
  }) {
762
1461
  const d = [
763
1462
  ...[
764
1463
  "space-y-4"
765
1464
  ],
766
- o
767
- ].filter(Boolean).join(" "), b = (j) => {
768
- j.preventDefault(), t && !a && t(j);
1465
+ i
1466
+ ].filter(Boolean).join(" "), u = (f) => {
1467
+ f.preventDefault(), e && !a && e(f);
769
1468
  };
770
- return /* @__PURE__ */ e.jsxs(
1469
+ return /* @__PURE__ */ r.jsxs(
771
1470
  "form",
772
1471
  {
773
1472
  className: d,
774
- onSubmit: b,
1473
+ onSubmit: u,
775
1474
  noValidate: !0,
776
- ...i,
1475
+ ...c,
777
1476
  children: [
778
- s,
779
- n && /* @__PURE__ */ e.jsx(
1477
+ t,
1478
+ s && /* @__PURE__ */ r.jsx(
780
1479
  "div",
781
1480
  {
782
1481
  role: "alert",
783
1482
  className: "p-3 text-sm text-red-800 bg-red-50 border border-red-200 rounded",
784
- children: n
1483
+ children: s
785
1484
  }
786
1485
  ),
787
- l && /* @__PURE__ */ e.jsx(
1486
+ o && /* @__PURE__ */ r.jsx(
788
1487
  "div",
789
1488
  {
790
1489
  role: "alert",
791
1490
  className: "p-3 text-sm text-green-800 bg-green-50 border border-green-200 rounded",
792
- children: l
1491
+ children: o
793
1492
  }
794
1493
  )
795
1494
  ]
796
1495
  }
797
1496
  );
798
1497
  }
799
- function Se({
800
- items: s,
801
- separator: t = "/",
1498
+ function wt({
1499
+ items: t,
1500
+ separator: e = "/",
802
1501
  className: a = "",
803
- ...n
1502
+ ...s
804
1503
  }) {
805
- const o = [
1504
+ const i = [
806
1505
  ...[
807
1506
  "flex",
808
1507
  "items-center",
@@ -811,51 +1510,51 @@ function Se({
811
1510
  ],
812
1511
  a
813
1512
  ].filter(Boolean).join(" ");
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 })
819
- ] }, c);
1513
+ return /* @__PURE__ */ r.jsx("nav", { "aria-label": "Breadcrumb", className: i, ...s, children: /* @__PURE__ */ r.jsx("ol", { className: "flex items-center space-x-2", children: t.map((c, l) => {
1514
+ const d = l === t.length - 1;
1515
+ return /* @__PURE__ */ r.jsxs("li", { className: "flex items-center", children: [
1516
+ l > 0 && /* @__PURE__ */ r.jsx("span", { className: "mx-2 text-gray-400", "aria-hidden": "true", children: e }),
1517
+ d ? /* @__PURE__ */ r.jsx("span", { className: "text-gray-900 font-medium", "aria-current": "page", children: c.label }) : c.href ? /* @__PURE__ */ r.jsx(ze, { href: c.href, variant: "default", children: c.label }) : /* @__PURE__ */ r.jsx("span", { className: "text-gray-500", children: c.label })
1518
+ ] }, l);
820
1519
  }) }) });
821
1520
  }
822
- function Ae({
823
- currentPage: s,
824
- totalPages: t,
1521
+ function vt({
1522
+ currentPage: t,
1523
+ totalPages: e,
825
1524
  onPageChange: a,
826
- totalItems: n,
827
- itemsPerPage: l,
828
- showPageInfo: o = !0,
829
- className: i = "",
830
- ...c
1525
+ totalItems: s,
1526
+ itemsPerPage: o,
1527
+ showPageInfo: i = !0,
1528
+ className: c = "",
1529
+ ...l
831
1530
  }) {
832
1531
  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);
838
- }, m = () => {
839
- const f = [];
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) {
848
- f.push(1), f.push("ellipsis");
849
- for (let h = t - 3; h <= t; h++)
850
- f.push(h);
1532
+ t > 1 && a(t - 1);
1533
+ }, u = () => {
1534
+ t < e && a(t + 1);
1535
+ }, f = (x) => {
1536
+ x >= 1 && x <= e && x !== t && a(x);
1537
+ }, g = () => {
1538
+ const x = [];
1539
+ if (e <= 5)
1540
+ for (let p = 1; p <= e; p++)
1541
+ x.push(p);
1542
+ else if (t <= 3) {
1543
+ for (let p = 1; p <= 4; p++)
1544
+ x.push(p);
1545
+ x.push("ellipsis"), x.push(e);
1546
+ } else if (t >= e - 2) {
1547
+ x.push(1), x.push("ellipsis");
1548
+ for (let p = e - 3; p <= e; p++)
1549
+ x.push(p);
851
1550
  } else {
852
- f.push(1), f.push("ellipsis");
853
- for (let h = s - 1; h <= s + 1; h++)
854
- f.push(h);
855
- f.push("ellipsis"), f.push(t);
1551
+ x.push(1), x.push("ellipsis");
1552
+ for (let p = t - 1; p <= t + 1; p++)
1553
+ x.push(p);
1554
+ x.push("ellipsis"), x.push(e);
856
1555
  }
857
- return f;
858
- }, x = n && l ? (s - 1) * l + 1 : void 0, y = n && l ? Math.min(s * l, n) : void 0, w = [
1556
+ return x;
1557
+ }, m = s && o ? (t - 1) * o + 1 : void 0, b = s && o ? Math.min(t * o, s) : void 0, C = [
859
1558
  ...[
860
1559
  "flex",
861
1560
  "items-center",
@@ -863,69 +1562,69 @@ function Ae({
863
1562
  "px-4",
864
1563
  "py-3"
865
1564
  ],
866
- i
1565
+ c
867
1566
  ].filter(Boolean).join(" ");
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,
1567
+ return /* @__PURE__ */ r.jsxs("nav", { className: C, "aria-label": "Pagination", ...l, children: [
1568
+ /* @__PURE__ */ r.jsxs("div", { className: "flex items-center gap-2", children: [
1569
+ /* @__PURE__ */ r.jsx(
1570
+ O,
872
1571
  {
873
1572
  variant: "secondary",
874
1573
  onClick: d,
875
- disabled: s === 1,
1574
+ disabled: t === 1,
876
1575
  className: "px-3 py-1 text-sm",
877
1576
  children: "Previous"
878
1577
  }
879
1578
  ),
880
- /* @__PURE__ */ e.jsx("div", { className: "flex items-center gap-1", children: m().map((f, k) => {
881
- if (f === "ellipsis")
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(
1579
+ /* @__PURE__ */ r.jsx("div", { className: "flex items-center gap-1", children: g().map((x, E) => {
1580
+ if (x === "ellipsis")
1581
+ return /* @__PURE__ */ r.jsx("span", { className: "px-2 text-gray-500", children: "..." }, `ellipsis-${E}`);
1582
+ const p = x, M = p === t;
1583
+ return /* @__PURE__ */ r.jsx(
885
1584
  "button",
886
1585
  {
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
1586
+ onClick: () => f(p),
1587
+ className: `px-3 py-1 text-sm rounded ${M ? "bg-indigo-600 text-white" : "text-gray-700 hover:bg-gray-100"}`,
1588
+ "aria-current": M ? "page" : void 0,
1589
+ "aria-label": `Go to page ${p}`,
1590
+ children: p
892
1591
  },
893
- h
1592
+ p
894
1593
  );
895
1594
  }) }),
896
- /* @__PURE__ */ e.jsx(
897
- E,
1595
+ /* @__PURE__ */ r.jsx(
1596
+ O,
898
1597
  {
899
1598
  variant: "secondary",
900
- onClick: b,
901
- disabled: s === t,
1599
+ onClick: u,
1600
+ disabled: t === e,
902
1601
  className: "px-3 py-1 text-sm",
903
1602
  children: "Next"
904
1603
  }
905
1604
  )
906
1605
  ] }),
907
- o && n && l && /* @__PURE__ */ e.jsxs("div", { className: "text-sm text-gray-700", children: [
1606
+ i && s && o && /* @__PURE__ */ r.jsxs("div", { className: "text-sm text-gray-700", children: [
908
1607
  "Showing ",
909
- x,
1608
+ m,
910
1609
  " to ",
911
- y,
1610
+ b,
912
1611
  " of ",
913
- n,
1612
+ s,
914
1613
  " results"
915
1614
  ] })
916
1615
  ] });
917
1616
  }
918
- function Oe({
919
- title: s,
920
- message: t,
1617
+ function jt({
1618
+ title: t,
1619
+ message: e,
921
1620
  actionLabel: a,
922
- onAction: n,
923
- illustration: l,
924
- variant: o = "default",
925
- className: i = "",
926
- ...c
1621
+ onAction: s,
1622
+ illustration: o,
1623
+ variant: i = "default",
1624
+ className: c = "",
1625
+ ...l
927
1626
  }) {
928
- const b = [
1627
+ const u = [
929
1628
  ...[
930
1629
  "flex",
931
1630
  "flex-col",
@@ -935,72 +1634,72 @@ function Oe({
935
1634
  "py-12",
936
1635
  "px-4"
937
1636
  ],
938
- i
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 })
1637
+ c
1638
+ ].filter(Boolean).join(" "), f = i === "withAction" || a && s, g = i === "withIllustration" || o;
1639
+ return /* @__PURE__ */ r.jsxs("div", { className: u, ...l, children: [
1640
+ g && o && /* @__PURE__ */ r.jsx("div", { className: "mb-4", children: o }),
1641
+ /* @__PURE__ */ r.jsx(L, { as: "h3", className: "text-lg font-semibold text-gray-900 mb-2", children: t }),
1642
+ /* @__PURE__ */ r.jsx(L, { as: "p", className: "text-sm text-gray-500 mb-6 max-w-sm", children: e }),
1643
+ f && a && s && /* @__PURE__ */ r.jsx(O, { variant: "regular", onClick: s, children: a })
945
1644
  ] });
946
1645
  }
947
- function Le({
948
- trigger: s,
949
- items: t,
1646
+ function kt({
1647
+ trigger: t,
1648
+ items: e,
950
1649
  align: a = "right",
951
- variant: n = "default",
952
- className: l = "",
953
- ...o
1650
+ variant: s = "default",
1651
+ className: o = "",
1652
+ ...i
954
1653
  }) {
955
- const [i, c] = Y(!1), d = z(null);
956
- F(() => {
957
- const m = (x) => {
958
- d.current && !d.current.contains(x.target) && c(!1);
1654
+ const [c, l] = A(!1), d = P(null);
1655
+ _(() => {
1656
+ const g = (m) => {
1657
+ d.current && !d.current.contains(m.target) && l(!1);
959
1658
  };
960
- return i && document.addEventListener("mousedown", m), () => {
961
- document.removeEventListener("mousedown", m);
1659
+ return c && document.addEventListener("mousedown", g), () => {
1660
+ document.removeEventListener("mousedown", g);
962
1661
  };
963
- }, [i]);
964
- const b = (m) => {
965
- m.disabled || (m.onClick(), c(!1));
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(
1662
+ }, [c]);
1663
+ const u = (g) => {
1664
+ g.disabled || (g.onClick(), l(!1));
1665
+ }, f = a === "right" ? "right-0" : "left-0";
1666
+ return /* @__PURE__ */ r.jsxs("div", { className: `relative inline-block ${o}`, ref: d, ...i, children: [
1667
+ /* @__PURE__ */ r.jsx("div", { onClick: () => l(!c), children: t }),
1668
+ c && /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
1669
+ /* @__PURE__ */ r.jsx(
971
1670
  "div",
972
1671
  {
973
1672
  className: "fixed inset-0 z-10",
974
- onClick: () => c(!1)
1673
+ onClick: () => l(!1)
975
1674
  }
976
1675
  ),
977
- /* @__PURE__ */ e.jsx(
1676
+ /* @__PURE__ */ r.jsx(
978
1677
  "div",
979
1678
  {
980
- className: `absolute z-20 mt-2 w-48 rounded-md shadow-lg bg-white ring-1 ring-black ring-opacity-5 ${j}`,
1679
+ className: `absolute z-20 mt-2 w-48 rounded-md shadow-lg bg-white ring-1 ring-black ring-opacity-5 ${f}`,
981
1680
  role: "menu",
982
1681
  "aria-orientation": "vertical",
983
- children: /* @__PURE__ */ e.jsx("div", { className: "py-1", role: "none", children: t.map((m, x) => {
984
- const y = [
1682
+ children: /* @__PURE__ */ r.jsx("div", { className: "py-1", role: "none", children: e.map((g, m) => {
1683
+ const b = [
985
1684
  "block",
986
1685
  "px-4",
987
1686
  "py-2",
988
1687
  "text-sm",
989
1688
  "w-full",
990
1689
  "text-left",
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"
1690
+ g.disabled ? "text-gray-400 cursor-not-allowed" : g.variant === "danger" ? "text-red-700 hover:bg-red-50" : "text-gray-700 hover:bg-gray-100"
992
1691
  ].filter(Boolean).join(" ");
993
- return /* @__PURE__ */ e.jsx(
1692
+ return /* @__PURE__ */ r.jsx(
994
1693
  "button",
995
1694
  {
996
1695
  type: "button",
997
- className: y,
998
- onClick: () => b(m),
999
- disabled: m.disabled,
1696
+ className: b,
1697
+ onClick: () => u(g),
1698
+ disabled: g.disabled,
1000
1699
  role: "menuitem",
1001
- children: m.label
1700
+ children: g.label
1002
1701
  },
1003
- x
1702
+ m
1004
1703
  );
1005
1704
  }) })
1006
1705
  }
@@ -1008,32 +1707,171 @@ function Le({
1008
1707
  ] })
1009
1708
  ] });
1010
1709
  }
1011
- function pe({
1012
- title: s,
1013
- children: t,
1014
- className: a = "",
1015
- ...n
1710
+ /**
1711
+ * @license lucide-react v0.552.0 - ISC
1712
+ *
1713
+ * This source code is licensed under the ISC license.
1714
+ * See the LICENSE file in the root directory of this source tree.
1715
+ */
1716
+ const Ge = (t) => t.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), qe = (t) => t.replace(
1717
+ /^([A-Z])|[\s-_]+(\w)/g,
1718
+ (e, a, s) => s ? s.toUpperCase() : a.toLowerCase()
1719
+ ), me = (t) => {
1720
+ const e = qe(t);
1721
+ return e.charAt(0).toUpperCase() + e.slice(1);
1722
+ }, be = (...t) => t.filter((e, a, s) => !!e && e.trim() !== "" && s.indexOf(e) === a).join(" ").trim(), Je = (t) => {
1723
+ for (const e in t)
1724
+ if (e.startsWith("aria-") || e === "role" || e === "title")
1725
+ return !0;
1726
+ };
1727
+ /**
1728
+ * @license lucide-react v0.552.0 - ISC
1729
+ *
1730
+ * This source code is licensed under the ISC license.
1731
+ * See the LICENSE file in the root directory of this source tree.
1732
+ */
1733
+ var Xe = {
1734
+ xmlns: "http://www.w3.org/2000/svg",
1735
+ width: 24,
1736
+ height: 24,
1737
+ viewBox: "0 0 24 24",
1738
+ fill: "none",
1739
+ stroke: "currentColor",
1740
+ strokeWidth: 2,
1741
+ strokeLinecap: "round",
1742
+ strokeLinejoin: "round"
1743
+ };
1744
+ /**
1745
+ * @license lucide-react v0.552.0 - ISC
1746
+ *
1747
+ * This source code is licensed under the ISC license.
1748
+ * See the LICENSE file in the root directory of this source tree.
1749
+ */
1750
+ const Ze = ge(
1751
+ ({
1752
+ color: t = "currentColor",
1753
+ size: e = 24,
1754
+ strokeWidth: a = 2,
1755
+ absoluteStrokeWidth: s,
1756
+ className: o = "",
1757
+ children: i,
1758
+ iconNode: c,
1759
+ ...l
1760
+ }, d) => Z(
1761
+ "svg",
1762
+ {
1763
+ ref: d,
1764
+ ...Xe,
1765
+ width: e,
1766
+ height: e,
1767
+ stroke: t,
1768
+ strokeWidth: s ? Number(a) * 24 / Number(e) : a,
1769
+ className: be("lucide", o),
1770
+ ...!i && !Je(l) && { "aria-hidden": "true" },
1771
+ ...l
1772
+ },
1773
+ [
1774
+ ...c.map(([u, f]) => Z(u, f)),
1775
+ ...Array.isArray(i) ? i : [i]
1776
+ ]
1777
+ )
1778
+ );
1779
+ /**
1780
+ * @license lucide-react v0.552.0 - ISC
1781
+ *
1782
+ * This source code is licensed under the ISC license.
1783
+ * See the LICENSE file in the root directory of this source tree.
1784
+ */
1785
+ const Ke = (t, e) => {
1786
+ const a = ge(
1787
+ ({ className: s, ...o }, i) => Z(Ze, {
1788
+ ref: i,
1789
+ iconNode: e,
1790
+ className: be(
1791
+ `lucide-${Ge(me(t))}`,
1792
+ `lucide-${t}`,
1793
+ s
1794
+ ),
1795
+ ...o
1796
+ })
1797
+ );
1798
+ return a.displayName = me(t), a;
1799
+ };
1800
+ /**
1801
+ * @license lucide-react v0.552.0 - ISC
1802
+ *
1803
+ * This source code is licensed under the ISC license.
1804
+ * See the LICENSE file in the root directory of this source tree.
1805
+ */
1806
+ const Qe = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]], et = Ke("chevron-right", Qe);
1807
+ function tt({
1808
+ title: t,
1809
+ titleIcon: e,
1810
+ children: a,
1811
+ collapsible: s = !1,
1812
+ defaultCollapsed: o = !1,
1813
+ collapsed: i,
1814
+ onCollapseChange: c,
1815
+ storageKey: l,
1816
+ showChevron: d = !0,
1817
+ className: u = "",
1818
+ ...f
1016
1819
  }) {
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 })
1820
+ const m = [...["space-y-1"], u].filter(Boolean).join(" "), b = ({ isOpen: w }) => /* @__PURE__ */ r.jsx(
1821
+ et,
1822
+ {
1823
+ className: `${y.chevron.size} ${y.chevron.color} transition-transform duration-200 ${w ? "rotate-90" : ""}`
1824
+ }
1825
+ );
1826
+ return s && t ? /* @__PURE__ */ r.jsx(
1827
+ Ve,
1828
+ {
1829
+ defaultOpen: !o,
1830
+ open: i !== void 0 ? !i : void 0,
1831
+ onOpenChange: (w) => c?.(!w),
1832
+ storageKey: l,
1833
+ trigger: /* @__PURE__ */ r.jsxs("div", { className: `${y.spacing.groupTitlePadding} flex items-center justify-between w-full hover:bg-gray-50 rounded-md transition-colors cursor-pointer`, children: [
1834
+ /* @__PURE__ */ r.jsxs("div", { className: "flex items-center gap-2", children: [
1835
+ e && /* @__PURE__ */ r.jsx("span", { className: `${y.icon.md} ${y.colors.groupTitle}`, children: e }),
1836
+ /* @__PURE__ */ r.jsx(
1837
+ L,
1838
+ {
1839
+ as: "h3",
1840
+ className: `${y.text.xs} font-semibold ${y.colors.groupTitle} uppercase tracking-wider`,
1841
+ children: t
1842
+ }
1843
+ )
1844
+ ] }),
1845
+ d && /* @__PURE__ */ r.jsx("span", { className: "ml-2", children: /* @__PURE__ */ r.jsx(b, { isOpen: i !== void 0 ? !i : !o }) })
1846
+ ] }),
1847
+ className: m,
1848
+ ...f,
1849
+ children: /* @__PURE__ */ r.jsx("div", { className: "space-y-1", children: a })
1850
+ }
1851
+ ) : /* @__PURE__ */ r.jsxs("div", { className: m, ...f, children: [
1852
+ t && /* @__PURE__ */ r.jsxs("div", { className: `${y.spacing.groupTitlePadding} flex items-center gap-2`, children: [
1853
+ e && /* @__PURE__ */ r.jsx("span", { className: `${y.icon.md} ${y.colors.groupTitle}`, children: e }),
1854
+ /* @__PURE__ */ r.jsx(
1855
+ L,
1856
+ {
1857
+ as: "h3",
1858
+ className: `${y.text.xs} font-semibold ${y.colors.groupTitle} uppercase tracking-wider`,
1859
+ children: t
1860
+ }
1861
+ )
1862
+ ] }),
1863
+ /* @__PURE__ */ r.jsx("div", { className: "space-y-1", children: a })
1026
1864
  ] });
1027
1865
  }
1028
- function Q({
1029
- title: s,
1030
- onClose: t,
1866
+ function pe({
1867
+ title: t,
1868
+ onClose: e,
1031
1869
  showCloseButton: a = !1,
1032
- children: n,
1033
- className: l = "",
1034
- ...o
1870
+ children: s,
1871
+ className: o = "",
1872
+ ...i
1035
1873
  }) {
1036
- const c = [
1874
+ const l = [
1037
1875
  ...[
1038
1876
  "flex",
1039
1877
  "items-center",
@@ -1043,27 +1881,27 @@ function Q({
1043
1881
  "border-b",
1044
1882
  "border-gray-200"
1045
1883
  ],
1046
- l
1884
+ o
1047
1885
  ].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,
1886
+ return /* @__PURE__ */ r.jsxs("div", { className: l, ...i, children: [
1887
+ /* @__PURE__ */ r.jsx(L, { as: "h2", className: "text-lg font-semibold text-gray-900", children: t }),
1888
+ /* @__PURE__ */ r.jsxs("div", { className: "flex items-center space-x-2", children: [
1889
+ s,
1890
+ a && e && /* @__PURE__ */ r.jsx(
1891
+ O,
1054
1892
  {
1055
1893
  variant: "secondary",
1056
- onClick: t,
1894
+ onClick: e,
1057
1895
  className: "p-1",
1058
1896
  "aria-label": "Close sidebar",
1059
- children: /* @__PURE__ */ e.jsx(
1897
+ children: /* @__PURE__ */ r.jsx(
1060
1898
  "svg",
1061
1899
  {
1062
1900
  className: "h-5 w-5",
1063
1901
  fill: "none",
1064
1902
  viewBox: "0 0 24 24",
1065
1903
  stroke: "currentColor",
1066
- children: /* @__PURE__ */ e.jsx(
1904
+ children: /* @__PURE__ */ r.jsx(
1067
1905
  "path",
1068
1906
  {
1069
1907
  strokeLinecap: "round",
@@ -1079,16 +1917,16 @@ function Q({
1079
1917
  ] })
1080
1918
  ] });
1081
1919
  }
1082
- function Be({
1083
- label: s,
1084
- isActive: t = !1,
1920
+ function Nt({
1921
+ label: t,
1922
+ isActive: e = !1,
1085
1923
  icon: a,
1086
- onClick: n,
1087
- className: l = "",
1088
- children: o,
1089
- ...i
1924
+ onClick: s,
1925
+ className: o = "",
1926
+ children: i,
1927
+ ...c
1090
1928
  }) {
1091
- const c = [
1929
+ const l = [
1092
1930
  "inline-flex",
1093
1931
  "items-center",
1094
1932
  "px-3",
@@ -1097,51 +1935,51 @@ function Be({
1097
1935
  "font-medium",
1098
1936
  "rounded-md",
1099
1937
  "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,
1938
+ ], d = e ? "bg-indigo-100 text-indigo-700 border-b-2 border-indigo-600" : "text-gray-600 hover:bg-gray-100 hover:text-gray-900", u = [
1939
+ ...l,
1102
1940
  d,
1103
- l
1941
+ o
1104
1942
  ].filter(Boolean).join(" ");
1105
- return /* @__PURE__ */ e.jsxs(
1943
+ return /* @__PURE__ */ r.jsxs(
1106
1944
  "button",
1107
1945
  {
1108
1946
  type: "button",
1109
- className: b,
1110
- onClick: n,
1111
- "aria-expanded": t,
1947
+ className: u,
1948
+ onClick: s,
1949
+ "aria-expanded": e,
1112
1950
  "aria-haspopup": "true",
1113
- ...i,
1951
+ ...c,
1114
1952
  children: [
1115
- a && /* @__PURE__ */ e.jsx("span", { className: "mr-2", children: a }),
1116
- /* @__PURE__ */ e.jsx("span", { children: s }),
1117
- o
1953
+ a && /* @__PURE__ */ r.jsx("span", { className: "mr-2", children: a }),
1954
+ /* @__PURE__ */ r.jsx("span", { children: t }),
1955
+ i
1118
1956
  ]
1119
1957
  }
1120
1958
  );
1121
1959
  }
1122
- function $e({
1123
- onForgotPasswordClick: s,
1124
- className: t,
1960
+ function Ct({
1961
+ onForgotPasswordClick: t,
1962
+ className: e,
1125
1963
  ...a
1126
1964
  }) {
1127
- return /* @__PURE__ */ e.jsx(xe, { className: t, children: /* @__PURE__ */ e.jsxs(
1965
+ return /* @__PURE__ */ r.jsx(Pe, { className: e, children: /* @__PURE__ */ r.jsxs(
1128
1966
  "form",
1129
1967
  {
1130
1968
  ...a,
1131
- onSubmit: (n) => {
1132
- n.preventDefault(), a.onSubmit && a.onSubmit(n);
1969
+ onSubmit: (s) => {
1970
+ s.preventDefault(), a.onSubmit && a.onSubmit(s);
1133
1971
  },
1134
1972
  children: [
1135
- /* @__PURE__ */ e.jsx(
1136
- Z,
1973
+ /* @__PURE__ */ r.jsx(
1974
+ fe,
1137
1975
  {
1138
1976
  id: "login-email",
1139
1977
  label: "Your email",
1140
1978
  placeholder: "myname@email.com"
1141
1979
  }
1142
1980
  ),
1143
- /* @__PURE__ */ e.jsx(
1144
- Z,
1981
+ /* @__PURE__ */ r.jsx(
1982
+ fe,
1145
1983
  {
1146
1984
  id: "login-password",
1147
1985
  label: "Your password",
@@ -1149,60 +1987,60 @@ function $e({
1149
1987
  type: "password"
1150
1988
  }
1151
1989
  ),
1152
- /* @__PURE__ */ e.jsxs("div", { className: "flex justify-between", children: [
1153
- /* @__PURE__ */ e.jsx(
1154
- E,
1990
+ /* @__PURE__ */ r.jsxs("div", { className: "flex justify-between", children: [
1991
+ /* @__PURE__ */ r.jsx(
1992
+ O,
1155
1993
  {
1156
1994
  variant: "secondary",
1157
1995
  type: "button",
1158
- onClick: s,
1996
+ onClick: t,
1159
1997
  children: "Forgot password?"
1160
1998
  }
1161
1999
  ),
1162
- /* @__PURE__ */ e.jsx(E, { variant: "regular", type: "submit", children: "Sign in" })
2000
+ /* @__PURE__ */ r.jsx(O, { variant: "regular", type: "submit", children: "Sign in" })
1163
2001
  ] })
1164
2002
  ]
1165
2003
  }
1166
2004
  ) });
1167
2005
  }
1168
- function Ie({
1169
- isOpen: s,
1170
- onClose: t,
2006
+ function Tt({
2007
+ isOpen: t,
2008
+ onClose: e,
1171
2009
  title: a,
1172
- children: n,
1173
- variant: l = "default",
1174
- showCloseButton: o = !0,
1175
- footer: i,
1176
- className: c = "",
2010
+ children: s,
2011
+ variant: o = "default",
2012
+ showCloseButton: i = !0,
2013
+ footer: c,
2014
+ className: l = "",
1177
2015
  ...d
1178
2016
  }) {
1179
- const b = z(null), j = z(null);
1180
- if (F(() => {
1181
- if (!s) return;
1182
- j.current = document.activeElement;
1183
- const f = setTimeout(() => {
1184
- b.current?.focus();
1185
- }, 0), k = (h) => {
1186
- h.key === "Escape" && t();
2017
+ const u = P(null), f = P(null);
2018
+ if (_(() => {
2019
+ if (!t) return;
2020
+ f.current = document.activeElement;
2021
+ const x = setTimeout(() => {
2022
+ u.current?.focus();
2023
+ }, 0), E = (p) => {
2024
+ p.key === "Escape" && e();
1187
2025
  };
1188
- return document.addEventListener("keydown", k), () => {
1189
- clearTimeout(f), document.removeEventListener("keydown", k), j.current?.focus();
2026
+ return document.addEventListener("keydown", E), () => {
2027
+ clearTimeout(x), document.removeEventListener("keydown", E), f.current?.focus();
1190
2028
  };
1191
- }, [s, t]), F(() => (s ? document.body.style.overflow = "hidden" : document.body.style.overflow = "", () => {
2029
+ }, [t, e]), _(() => (t ? document.body.style.overflow = "hidden" : document.body.style.overflow = "", () => {
1192
2030
  document.body.style.overflow = "";
1193
- }), [s]), !s) return null;
1194
- const m = [
2031
+ }), [t]), !t) return null;
2032
+ const g = [
1195
2033
  "fixed",
1196
2034
  "inset-0",
1197
2035
  "z-50",
1198
2036
  "overflow-y-auto"
1199
- ], x = [
2037
+ ], m = [
1200
2038
  "fixed",
1201
2039
  "inset-0",
1202
2040
  "bg-black",
1203
2041
  "bg-opacity-50",
1204
2042
  "transition-opacity"
1205
- ], N = [
2043
+ ], w = [
1206
2044
  "relative",
1207
2045
  "bg-white",
1208
2046
  "rounded-lg",
@@ -1213,46 +2051,46 @@ function Ie({
1213
2051
  default: "max-w-md",
1214
2052
  large: "max-w-2xl",
1215
2053
  fullscreen: "max-w-full h-full"
1216
- }[l],
2054
+ }[o],
1217
2055
  "p-6",
1218
- c
1219
- ].filter(Boolean).join(" "), w = /* @__PURE__ */ e.jsxs(
2056
+ l
2057
+ ].filter(Boolean).join(" "), C = /* @__PURE__ */ r.jsxs(
1220
2058
  "div",
1221
2059
  {
1222
- className: m.join(" "),
2060
+ className: g.join(" "),
1223
2061
  role: "dialog",
1224
2062
  "aria-modal": "true",
1225
2063
  "aria-labelledby": a ? "modal-title" : void 0,
1226
- onClick: (f) => {
1227
- f.target === f.currentTarget && t();
2064
+ onClick: (x) => {
2065
+ x.target === x.currentTarget && e();
1228
2066
  },
1229
2067
  children: [
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(
2068
+ /* @__PURE__ */ r.jsx("div", { className: m.join(" "), "aria-hidden": "true" }),
2069
+ /* @__PURE__ */ r.jsx("div", { className: "flex min-h-full items-center justify-center p-4", children: /* @__PURE__ */ r.jsxs(
1232
2070
  "div",
1233
2071
  {
1234
- ref: b,
2072
+ ref: u,
1235
2073
  tabIndex: -1,
1236
- className: N,
1237
- onClick: (f) => f.stopPropagation(),
2074
+ className: w,
2075
+ onClick: (x) => x.stopPropagation(),
1238
2076
  ...d,
1239
2077
  children: [
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(
2078
+ a && /* @__PURE__ */ r.jsxs("div", { className: "flex justify-between items-center mb-4", children: [
2079
+ /* @__PURE__ */ r.jsx("h2", { id: "modal-title", className: "text-xl font-semibold text-gray-900", children: a }),
2080
+ i && /* @__PURE__ */ r.jsx(
1243
2081
  "button",
1244
2082
  {
1245
- onClick: t,
2083
+ onClick: e,
1246
2084
  className: "text-gray-400 hover:text-gray-500 focus:outline-none",
1247
2085
  "aria-label": "Close modal",
1248
- children: /* @__PURE__ */ e.jsx(
2086
+ children: /* @__PURE__ */ r.jsx(
1249
2087
  "svg",
1250
2088
  {
1251
2089
  className: "h-6 w-6",
1252
2090
  fill: "none",
1253
2091
  viewBox: "0 0 24 24",
1254
2092
  stroke: "currentColor",
1255
- children: /* @__PURE__ */ e.jsx(
2093
+ children: /* @__PURE__ */ r.jsx(
1256
2094
  "path",
1257
2095
  {
1258
2096
  strokeLinecap: "round",
@@ -1266,20 +2104,20 @@ function Ie({
1266
2104
  }
1267
2105
  )
1268
2106
  ] }),
1269
- !a && o && /* @__PURE__ */ e.jsx("div", { className: "flex justify-end mb-4", children: /* @__PURE__ */ e.jsx(
2107
+ !a && i && /* @__PURE__ */ r.jsx("div", { className: "flex justify-end mb-4", children: /* @__PURE__ */ r.jsx(
1270
2108
  "button",
1271
2109
  {
1272
- onClick: t,
2110
+ onClick: e,
1273
2111
  className: "text-gray-400 hover:text-gray-500 focus:outline-none",
1274
2112
  "aria-label": "Close modal",
1275
- children: /* @__PURE__ */ e.jsx(
2113
+ children: /* @__PURE__ */ r.jsx(
1276
2114
  "svg",
1277
2115
  {
1278
2116
  className: "h-6 w-6",
1279
2117
  fill: "none",
1280
2118
  viewBox: "0 0 24 24",
1281
2119
  stroke: "currentColor",
1282
- children: /* @__PURE__ */ e.jsx(
2120
+ children: /* @__PURE__ */ r.jsx(
1283
2121
  "path",
1284
2122
  {
1285
2123
  strokeLinecap: "round",
@@ -1292,125 +2130,437 @@ function Ie({
1292
2130
  )
1293
2131
  }
1294
2132
  ) }),
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 })
2133
+ /* @__PURE__ */ r.jsx("div", { className: "mb-4", children: s }),
2134
+ c && /* @__PURE__ */ r.jsx("div", { className: "flex justify-end gap-2 mt-4", children: c })
1297
2135
  ]
1298
2136
  }
1299
2137
  ) })
1300
2138
  ]
1301
2139
  }
1302
2140
  );
1303
- return typeof window < "u" ? ce(w, document.body) : w;
2141
+ return typeof window < "u" ? Le(C, document.body) : C;
1304
2142
  }
1305
- function Me({
1306
- columns: s,
1307
- data: t,
2143
+ function Et({
2144
+ columns: t,
2145
+ data: e,
1308
2146
  loading: a = !1,
1309
- onSort: n,
1310
- sortColumn: l,
1311
- sortDirection: o,
1312
- emptyMessage: i = "No data available",
1313
- className: c = "",
2147
+ onSort: s,
2148
+ sortColumn: o,
2149
+ sortDirection: i,
2150
+ emptyMessage: c = "No data available",
2151
+ className: l = "",
1314
2152
  ...d
1315
2153
  }) {
1316
- const b = (x) => {
1317
- if (!n || !s.find((N) => N.key === x)?.sortable)
2154
+ const u = (m) => {
2155
+ if (!s || !t.find((w) => w.key === m)?.sortable)
1318
2156
  return;
1319
- n(x, l === x && o === "asc" ? "desc" : "asc");
1320
- }, m = [
2157
+ s(m, o === m && i === "asc" ? "desc" : "asc");
2158
+ }, g = [
1321
2159
  ...[
1322
2160
  "min-w-full",
1323
2161
  "divide-y",
1324
2162
  "divide-gray-200"
1325
2163
  ],
1326
- c
2164
+ l
1327
2165
  ].filter(Boolean).join(" ");
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(
2166
+ return /* @__PURE__ */ r.jsx("div", { className: "overflow-x-auto", children: /* @__PURE__ */ r.jsxs("table", { className: g, ...d, children: [
2167
+ /* @__PURE__ */ r.jsx("thead", { className: "bg-gray-50", children: /* @__PURE__ */ r.jsx("tr", { children: t.map((m) => /* @__PURE__ */ r.jsx(
1330
2168
  "th",
1331
2169
  {
1332
2170
  scope: "col",
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" : ""}`,
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" ? "↑" : "↓" })
2171
+ className: `px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider ${m.sortable && s ? "cursor-pointer hover:bg-gray-100 select-none" : ""}`,
2172
+ onClick: () => m.sortable && u(m.key),
2173
+ children: /* @__PURE__ */ r.jsxs("div", { className: "flex items-center gap-2", children: [
2174
+ /* @__PURE__ */ r.jsx("span", { children: m.label }),
2175
+ m.sortable && o === m.key && /* @__PURE__ */ r.jsx("span", { className: "text-gray-400", children: i === "asc" ? "↑" : "↓" })
1338
2176
  ] })
1339
2177
  },
1340
- x.key
2178
+ m.key
1341
2179
  )) }) }),
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) => {
1343
- const w = x[N.key];
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)) })
2180
+ /* @__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..." }) }) : e.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: c }) }) : e.map((m, b) => /* @__PURE__ */ r.jsx("tr", { className: "hover:bg-gray-50", children: t.map((w) => {
2181
+ const C = m[w.key];
2182
+ return /* @__PURE__ */ r.jsx("td", { className: "px-6 py-4 whitespace-nowrap text-sm text-gray-900", children: w.render ? w.render(C, m) : C }, w.key);
2183
+ }) }, b)) })
1346
2184
  ] }) });
1347
2185
  }
1348
- function D({
1349
- variant: s = "default",
1350
- title: t,
2186
+ function re({
2187
+ variant: t = "default",
2188
+ title: e,
1351
2189
  showHeader: a = !0,
1352
- onClose: n,
1353
- children: l,
1354
- className: o = "",
1355
- ...i
2190
+ onClose: s,
2191
+ children: o,
2192
+ className: i = "",
2193
+ ...c
1356
2194
  }) {
1357
- const c = [
2195
+ const l = [
1358
2196
  "flex",
1359
2197
  "flex-col",
1360
2198
  "bg-white",
1361
- "border-r",
1362
- "border-gray-200",
1363
- "h-full"
2199
+ "h-full",
2200
+ "w-full"
1364
2201
  ], d = {
1365
- default: "w-64",
1366
- collapsed: "w-16"
1367
- }, b = [
1368
- ...c,
1369
- d[s],
1370
- o
2202
+ default: "",
2203
+ collapsed: ""
2204
+ }, u = [
2205
+ ...l,
2206
+ d[t],
2207
+ i
1371
2208
  ].filter(Boolean).join(" ");
1372
- return /* @__PURE__ */ e.jsxs("aside", { className: b, ...i, children: [
1373
- a && t && /* @__PURE__ */ e.jsx(
1374
- Q,
2209
+ return /* @__PURE__ */ r.jsxs("div", { className: u, ...c, children: [
2210
+ a && e && /* @__PURE__ */ r.jsx("div", { className: "flex-shrink-0", children: /* @__PURE__ */ r.jsx(
2211
+ pe,
1375
2212
  {
1376
- title: t,
1377
- onClose: n,
1378
- showCloseButton: !!n
2213
+ title: e,
2214
+ onClose: s,
2215
+ showCloseButton: !!s
1379
2216
  }
1380
- ),
1381
- /* @__PURE__ */ e.jsx("nav", { className: "flex-1 overflow-y-auto py-4", children: l })
2217
+ ) }),
2218
+ /* @__PURE__ */ r.jsx("div", { className: "flex-1 overflow-y-auto py-4 min-h-0", children: o })
1382
2219
  ] });
1383
2220
  }
1384
- D.Group = pe;
1385
- D.Item = he;
1386
- D.Header = Q;
2221
+ re.Group = tt;
2222
+ re.Item = Ye;
2223
+ re.Header = pe;
2224
+ class T {
2225
+ static BASE_UNIT = 4;
2226
+ // 4px base
2227
+ /**
2228
+ * Create a spacing token from scale value
2229
+ */
2230
+ static create(e) {
2231
+ const a = e * this.BASE_UNIT, s = a / 16;
2232
+ return {
2233
+ value: a,
2234
+ rem: `${s}rem`,
2235
+ px: `${a}px`,
2236
+ tailwind: this.getTailwindClass(e)
2237
+ };
2238
+ }
2239
+ /**
2240
+ * Get Tailwind class for spacing value
2241
+ */
2242
+ static getTailwindClass(e) {
2243
+ return {
2244
+ 0: "0",
2245
+ 1: "1",
2246
+ // 4px
2247
+ 2: "2",
2248
+ // 8px
2249
+ 3: "3",
2250
+ // 12px
2251
+ 4: "4",
2252
+ // 16px
2253
+ 5: "5",
2254
+ // 20px
2255
+ 6: "6",
2256
+ // 24px
2257
+ 8: "8",
2258
+ // 32px
2259
+ 10: "10",
2260
+ // 40px
2261
+ 12: "12",
2262
+ // 48px
2263
+ 16: "16",
2264
+ // 64px
2265
+ 20: "20",
2266
+ // 80px
2267
+ 24: "24",
2268
+ // 96px
2269
+ 32: "32",
2270
+ // 128px
2271
+ 40: "40",
2272
+ // 160px
2273
+ 48: "48",
2274
+ // 192px
2275
+ 64: "64",
2276
+ // 256px
2277
+ 80: "80",
2278
+ // 320px
2279
+ 96: "96"
2280
+ // 384px
2281
+ }[e] || String(e);
2282
+ }
2283
+ }
2284
+ const U = {
2285
+ // Micro spacing (0-12px)
2286
+ none: T.create(0),
2287
+ xs: T.create(1),
2288
+ // 4px
2289
+ sm: T.create(2),
2290
+ // 8px
2291
+ md: T.create(3),
2292
+ // 12px
2293
+ // Standard spacing (16-32px)
2294
+ base: T.create(4),
2295
+ // 16px
2296
+ lg: T.create(6),
2297
+ // 24px
2298
+ xl: T.create(8),
2299
+ // 32px
2300
+ // Large spacing (40-64px)
2301
+ "2xl": T.create(10),
2302
+ // 40px
2303
+ "3xl": T.create(12),
2304
+ // 48px
2305
+ "4xl": T.create(16),
2306
+ // 64px
2307
+ // Extra large spacing (80px+)
2308
+ "5xl": T.create(20),
2309
+ // 80px
2310
+ "6xl": T.create(24)
2311
+ // 96px
2312
+ };
2313
+ function St(t) {
2314
+ return U[t];
2315
+ }
2316
+ function _t(t, e = "p") {
2317
+ const s = U[t].tailwind;
2318
+ return `${{
2319
+ p: "p",
2320
+ m: "m",
2321
+ px: "px",
2322
+ mx: "mx",
2323
+ py: "py",
2324
+ my: "my",
2325
+ pt: "pt",
2326
+ mt: "mt",
2327
+ pr: "pr",
2328
+ mr: "mr",
2329
+ pb: "pb",
2330
+ mb: "mb",
2331
+ pl: "pl",
2332
+ ml: "ml"
2333
+ }[e]}-${s}`;
2334
+ }
2335
+ class R {
2336
+ /**
2337
+ * Create breakpoint token
2338
+ */
2339
+ static create(e) {
2340
+ const s = {
2341
+ sm: { minWidth: 640, tailwind: "sm" },
2342
+ md: { minWidth: 768, tailwind: "md" },
2343
+ lg: { minWidth: 1024, tailwind: "lg" },
2344
+ xl: { minWidth: 1280, tailwind: "xl" },
2345
+ "2xl": { minWidth: 1536, tailwind: "2xl" }
2346
+ }[e];
2347
+ return {
2348
+ name: e,
2349
+ minWidth: s.minWidth,
2350
+ px: `${s.minWidth}px`,
2351
+ rem: `${s.minWidth / 16}rem`,
2352
+ tailwind: s.tailwind
2353
+ };
2354
+ }
2355
+ }
2356
+ const Y = {
2357
+ sm: R.create("sm"),
2358
+ md: R.create("md"),
2359
+ lg: R.create("lg"),
2360
+ xl: R.create("xl"),
2361
+ "2xl": R.create("2xl")
2362
+ };
2363
+ function $t(t) {
2364
+ return Y[t];
2365
+ }
2366
+ function Rt(t, e = "min") {
2367
+ const a = Y[t];
2368
+ return `@media (${e === "min" ? "min-width" : "max-width"}: ${a.px})`;
2369
+ }
2370
+ class ye {
2371
+ colorFactory;
2372
+ constructor(e = "light") {
2373
+ const a = e === "light" ? new K() : new Q();
2374
+ this.colorFactory = new ee(a);
2375
+ }
2376
+ /**
2377
+ * Create spacing token
2378
+ */
2379
+ createSpacing(e) {
2380
+ return T.create(e);
2381
+ }
2382
+ /**
2383
+ * Create typography token
2384
+ */
2385
+ createTypography(e, a, s) {
2386
+ return N.create(e, a, s);
2387
+ }
2388
+ /**
2389
+ * Create color palette
2390
+ */
2391
+ createColorPalette() {
2392
+ return this.colorFactory.generatePalette();
2393
+ }
2394
+ /**
2395
+ * Create breakpoint token
2396
+ */
2397
+ createBreakpoint(e) {
2398
+ return R.create(e);
2399
+ }
2400
+ /**
2401
+ * Create complete token set for a theme
2402
+ */
2403
+ createTokenSet() {
2404
+ return {
2405
+ spacing: {
2406
+ xs: this.createSpacing(1),
2407
+ sm: this.createSpacing(2),
2408
+ md: this.createSpacing(3),
2409
+ base: this.createSpacing(4),
2410
+ lg: this.createSpacing(6),
2411
+ xl: this.createSpacing(8),
2412
+ "2xl": this.createSpacing(10),
2413
+ "3xl": this.createSpacing(12),
2414
+ "4xl": this.createSpacing(16)
2415
+ },
2416
+ typography: {
2417
+ h1: this.createTypography("4xl", "tight", "bold"),
2418
+ h2: this.createTypography("3xl", "tight", "bold"),
2419
+ h3: this.createTypography("2xl", "snug", "semibold"),
2420
+ body: this.createTypography("base", "relaxed", "normal"),
2421
+ label: this.createTypography("sm", "normal", "medium"),
2422
+ caption: this.createTypography("xs", "normal", "normal")
2423
+ },
2424
+ colors: this.createColorPalette(),
2425
+ breakpoints: {
2426
+ sm: this.createBreakpoint("sm"),
2427
+ md: this.createBreakpoint("md"),
2428
+ lg: this.createBreakpoint("lg"),
2429
+ xl: this.createBreakpoint("xl"),
2430
+ "2xl": this.createBreakpoint("2xl")
2431
+ }
2432
+ };
2433
+ }
2434
+ /**
2435
+ * Switch theme
2436
+ */
2437
+ setTheme(e) {
2438
+ const a = e === "light" ? new K() : new Q();
2439
+ this.colorFactory.setStrategy(a);
2440
+ }
2441
+ }
2442
+ const At = new ye("light");
2443
+ function Lt(t = "light") {
2444
+ return new ye(t).createTokenSet();
2445
+ }
2446
+ const Ft = {
2447
+ colors: te,
2448
+ spacing: U,
2449
+ typography: z,
2450
+ breakpoints: Y,
2451
+ mode: "light"
2452
+ }, Ot = {
2453
+ colors: he,
2454
+ spacing: U,
2455
+ typography: z,
2456
+ breakpoints: Y,
2457
+ mode: "dark"
2458
+ }, we = Re(void 0);
2459
+ function It({
2460
+ children: t,
2461
+ defaultTheme: e = "light",
2462
+ storageKey: a = "theme"
2463
+ }) {
2464
+ const [s, o] = A(() => {
2465
+ if (typeof window > "u")
2466
+ return e;
2467
+ try {
2468
+ const u = localStorage.getItem(a);
2469
+ if (u === "light" || u === "dark")
2470
+ return u;
2471
+ } catch (u) {
2472
+ console.warn("Failed to read theme from localStorage:", u);
2473
+ }
2474
+ return e;
2475
+ });
2476
+ _(() => {
2477
+ try {
2478
+ localStorage.setItem(a, s);
2479
+ } catch (u) {
2480
+ console.warn("Failed to save theme to localStorage:", u);
2481
+ }
2482
+ document.documentElement.classList.remove("light", "dark"), document.documentElement.classList.add(s);
2483
+ }, [s, a]);
2484
+ const d = {
2485
+ theme: s,
2486
+ toggleTheme: () => {
2487
+ o((u) => u === "light" ? "dark" : "light");
2488
+ },
2489
+ setTheme: (u) => {
2490
+ o(u);
2491
+ },
2492
+ colors: s === "light" ? te : he,
2493
+ isDark: s === "dark"
2494
+ };
2495
+ return /* @__PURE__ */ r.jsx(we.Provider, { value: d, children: t });
2496
+ }
2497
+ function Bt() {
2498
+ const t = Ae(we);
2499
+ if (t === void 0)
2500
+ throw new Error("useTheme must be used within a ThemeProvider");
2501
+ return t;
2502
+ }
1387
2503
  export {
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
2504
+ Y as BREAKPOINT_TOKENS,
2505
+ ct as Badge,
2506
+ Pe as BoxWrapper,
2507
+ wt as Breadcrumb,
2508
+ R as BreakpointTokenFactory,
2509
+ O as Button,
2510
+ xe as COLOR_TOKENS,
2511
+ he as COLOR_TOKENS_DARK,
2512
+ te as COLOR_TOKENS_LIGHT,
2513
+ pt as Card,
2514
+ xt as Checkbox,
2515
+ Ve as Collapsible,
2516
+ ee as ColorTokenFactory,
2517
+ Ot as DARK_THEME,
2518
+ Q as DarkColorStrategy,
2519
+ kt as Dropdown,
2520
+ jt as EmptyState,
2521
+ mt as ErrorMessage,
2522
+ nt as FONT_FAMILY_TOKENS,
2523
+ it as FONT_WEIGHT_TOKENS,
2524
+ yt as Form,
2525
+ st as Info,
2526
+ De as Input,
2527
+ fe as InputWithLabel,
2528
+ Ft as LIGHT_THEME,
2529
+ ft as Label,
2530
+ K as LightColorStrategy,
2531
+ Ct as LoginBox,
2532
+ Tt as Modal,
2533
+ ze as NavLink,
2534
+ Nt as NavbarGroup,
2535
+ vt as Pagination,
2536
+ bt as Radio,
2537
+ y as SIDEBAR_TOKENS,
2538
+ U as SPACING_TOKENS,
2539
+ dt as Select,
2540
+ re as Sidebar,
2541
+ tt as SidebarGroup,
2542
+ pe as SidebarHeader,
2543
+ Ye as SidebarItem,
2544
+ ht as Skeleton,
2545
+ T as SpacingTokenFactory,
2546
+ z as TYPOGRAPHY_TOKENS,
2547
+ Et as Table,
2548
+ L as Text,
2549
+ ut as Textarea,
2550
+ It as ThemeProvider,
2551
+ ye as TokensFactory,
2552
+ gt as Tooltip,
2553
+ N as TypographyTokenFactory,
2554
+ Lt as createTokenSet,
2555
+ At as defaultTokensFactory,
2556
+ $t as getBreakpoint,
2557
+ lt as getColor,
2558
+ S as getColorClass,
2559
+ Rt as getMediaQuery,
2560
+ Ue as getNestedIndentClass,
2561
+ St as getSpacing,
2562
+ _t as getSpacingClass,
2563
+ ot as getTypography,
2564
+ F as getTypographyClasses,
2565
+ Bt as useTheme
1416
2566
  };