@motor-hero/ui-kit 0.10.1 → 0.12.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 (56) hide show
  1. package/dist/components/app-shell.d.ts +1 -1
  2. package/dist/components/app-shell.d.ts.map +1 -1
  3. package/dist/components/auth-card.d.ts +1 -1
  4. package/dist/components/auth-card.d.ts.map +1 -1
  5. package/dist/components/confirm-dialog.d.ts +1 -1
  6. package/dist/components/confirm-dialog.d.ts.map +1 -1
  7. package/dist/components/data-table-wrapper.d.ts +1 -1
  8. package/dist/components/data-table-wrapper.d.ts.map +1 -1
  9. package/dist/components/empty-state.d.ts +1 -1
  10. package/dist/components/empty-state.d.ts.map +1 -1
  11. package/dist/components/form-dialog.d.ts +33 -1
  12. package/dist/components/form-dialog.d.ts.map +1 -1
  13. package/dist/components/form-field.d.ts +1 -1
  14. package/dist/components/form-field.d.ts.map +1 -1
  15. package/dist/components/mobile-card-list.d.ts +1 -1
  16. package/dist/components/mobile-card-list.d.ts.map +1 -1
  17. package/dist/components/mode-toggle.d.ts +1 -1
  18. package/dist/components/mode-toggle.d.ts.map +1 -1
  19. package/dist/components/page-header.d.ts +1 -1
  20. package/dist/components/page-header.d.ts.map +1 -1
  21. package/dist/components/pagination.d.ts +1 -1
  22. package/dist/components/pagination.d.ts.map +1 -1
  23. package/dist/components/progress-bar.d.ts +12 -0
  24. package/dist/components/progress-bar.d.ts.map +1 -0
  25. package/dist/components/responsive-data-view.d.ts +1 -1
  26. package/dist/components/responsive-data-view.d.ts.map +1 -1
  27. package/dist/components/row-actions-menu.d.ts +1 -1
  28. package/dist/components/row-actions-menu.d.ts.map +1 -1
  29. package/dist/components/sidebar-nav.d.ts +1 -1
  30. package/dist/components/sidebar-nav.d.ts.map +1 -1
  31. package/dist/components/stat-card.d.ts +1 -1
  32. package/dist/components/stat-card.d.ts.map +1 -1
  33. package/dist/components/status-badge.d.ts +11 -0
  34. package/dist/components/status-badge.d.ts.map +1 -0
  35. package/dist/components/status-dot.d.ts +1 -1
  36. package/dist/components/status-dot.d.ts.map +1 -1
  37. package/dist/components/table-skeleton.d.ts +1 -1
  38. package/dist/components/table-skeleton.d.ts.map +1 -1
  39. package/dist/components/theme-provider.d.ts +1 -1
  40. package/dist/components/theme-provider.d.ts.map +1 -1
  41. package/dist/components/toaster.d.ts +1 -1
  42. package/dist/components/toaster.d.ts.map +1 -1
  43. package/dist/components/user-menu.d.ts +1 -1
  44. package/dist/components/user-menu.d.ts.map +1 -1
  45. package/dist/index.cjs +321 -147
  46. package/dist/index.cjs.map +1 -1
  47. package/dist/index.d.ts +5 -1
  48. package/dist/index.d.ts.map +1 -1
  49. package/dist/index.js +316 -145
  50. package/dist/index.js.map +1 -1
  51. package/package.json +2 -1
  52. package/src/components/form-dialog.tsx +121 -0
  53. package/src/components/page-header.tsx +8 -4
  54. package/src/components/progress-bar.tsx +49 -0
  55. package/src/components/status-badge.tsx +63 -0
  56. package/src/index.ts +5 -1
package/dist/index.cjs CHANGED
@@ -35,17 +35,20 @@ __export(index_exports, {
35
35
  ConfirmDialog: () => ConfirmDialog,
36
36
  DataTableWrapper: () => DataTableWrapper,
37
37
  EmptyState: () => EmptyState,
38
+ FormDialog: () => FormDialog,
38
39
  FormDialogLayout: () => FormDialogLayout,
39
40
  FormField: () => FormField,
40
41
  MobileCardList: () => MobileCardList,
41
42
  ModeToggle: () => ModeToggle,
42
43
  PageHeader: () => PageHeader,
43
44
  Pagination: () => Pagination,
45
+ ProgressBar: () => ProgressBar,
44
46
  ResponsiveDataView: () => ResponsiveDataView,
45
47
  RowActionsMenu: () => RowActionsMenu,
46
48
  SearchInput: () => SearchInput,
47
49
  SidebarNav: () => SidebarNav,
48
50
  StatCard: () => StatCard,
51
+ StatusBadge: () => StatusBadge,
49
52
  StatusDot: () => StatusDot,
50
53
  TableSkeleton: () => TableSkeleton,
51
54
  ThemeProvider: () => ThemeProvider,
@@ -220,13 +223,19 @@ function ConfirmDialog({
220
223
  // src/components/page-header.tsx
221
224
  var import_jsx_runtime5 = require("react/jsx-runtime");
222
225
  function PageHeader({ title, description, action, className }) {
223
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: `flex items-center justify-between ${className ?? ""}`, children: [
224
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { children: [
225
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("h1", { className: "text-2xl font-semibold tracking-tight", children: title }),
226
- description && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { className: "text-sm text-muted-foreground", children: description })
227
- ] }),
228
- action && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { children: action })
229
- ] });
226
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
227
+ "div",
228
+ {
229
+ className: `flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between ${className ?? ""}`,
230
+ children: [
231
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "min-w-0", children: [
232
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("h1", { className: "truncate text-2xl font-semibold tracking-tight", children: title }),
233
+ description && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { className: "text-sm text-muted-foreground", children: description })
234
+ ] }),
235
+ action && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "shrink-0", children: action })
236
+ ]
237
+ }
238
+ );
230
239
  }
231
240
 
232
241
  // src/components/status-dot.tsx
@@ -243,28 +252,124 @@ function StatusDot({ active, label, className }) {
243
252
  ] });
244
253
  }
245
254
 
246
- // src/components/form-field.tsx
255
+ // src/components/status-badge.tsx
247
256
  var import_jsx_runtime7 = require("react/jsx-runtime");
257
+ var variantClasses = {
258
+ neutral: {
259
+ badge: "bg-gray-100 text-gray-700 dark:bg-gray-800 dark:text-gray-300",
260
+ dot: "bg-gray-400"
261
+ },
262
+ info: {
263
+ badge: "bg-blue-100 text-blue-700 dark:bg-blue-950 dark:text-blue-400",
264
+ dot: "bg-blue-500"
265
+ },
266
+ success: {
267
+ badge: "bg-green-100 text-green-700 dark:bg-green-950 dark:text-green-400",
268
+ dot: "bg-green-500"
269
+ },
270
+ danger: {
271
+ badge: "bg-red-100 text-red-700 dark:bg-red-950 dark:text-red-400",
272
+ dot: "bg-red-500"
273
+ },
274
+ warning: {
275
+ badge: "bg-amber-100 text-amber-700 dark:bg-amber-950 dark:text-amber-400",
276
+ dot: "bg-amber-500"
277
+ }
278
+ };
279
+ function StatusBadge({
280
+ variant = "neutral",
281
+ dot = true,
282
+ className,
283
+ children
284
+ }) {
285
+ const classes = variantClasses[variant];
286
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
287
+ "span",
288
+ {
289
+ className: `inline-flex items-center gap-1.5 rounded-md px-2 py-0.5 text-xs font-medium ${classes.badge} ${className ?? ""}`,
290
+ children: [
291
+ dot && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
292
+ "span",
293
+ {
294
+ className: `inline-block h-1.5 w-1.5 shrink-0 rounded-full ${classes.dot}`
295
+ }
296
+ ),
297
+ children
298
+ ]
299
+ }
300
+ );
301
+ }
302
+
303
+ // src/components/progress-bar.tsx
304
+ var import_jsx_runtime8 = require("react/jsx-runtime");
305
+ var sizeClasses = {
306
+ sm: "h-1.5",
307
+ md: "h-2"
308
+ };
309
+ function ProgressBar({
310
+ value,
311
+ size = "md",
312
+ label,
313
+ valueLabel,
314
+ className,
315
+ indicatorClassName
316
+ }) {
317
+ const clamped = Math.min(100, Math.max(0, value));
318
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: `space-y-1.5 ${className ?? ""}`, children: [
319
+ (label || valueLabel) && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex items-baseline justify-between gap-2", children: [
320
+ label && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "text-sm text-muted-foreground", children: label }),
321
+ valueLabel && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "text-sm font-semibold", children: valueLabel })
322
+ ] }),
323
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
324
+ "div",
325
+ {
326
+ className: `w-full overflow-hidden rounded-full bg-muted ${sizeClasses[size]}`,
327
+ children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
328
+ "div",
329
+ {
330
+ className: `h-full rounded-full transition-all duration-300 ${indicatorClassName ?? "bg-primary"}`,
331
+ style: { width: `${clamped}%` }
332
+ }
333
+ )
334
+ }
335
+ )
336
+ ] });
337
+ }
338
+
339
+ // src/components/form-field.tsx
340
+ var import_jsx_runtime9 = require("react/jsx-runtime");
248
341
  function FormField({ label, htmlFor, error, required, children, className }) {
249
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: `space-y-2 ${className ?? ""}`, children: [
250
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
342
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: `space-y-2 ${className ?? ""}`, children: [
343
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
251
344
  "label",
252
345
  {
253
346
  htmlFor,
254
347
  className: "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",
255
348
  children: [
256
349
  label,
257
- required && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "ml-1 text-destructive", children: "*" })
350
+ required && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "ml-1 text-destructive", children: "*" })
258
351
  ]
259
352
  }
260
353
  ),
261
354
  children,
262
- error && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("p", { className: "text-sm text-destructive", children: error })
355
+ error && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("p", { className: "text-sm text-destructive", children: error })
263
356
  ] });
264
357
  }
265
358
 
266
359
  // src/components/form-dialog.tsx
267
- var import_jsx_runtime8 = require("react/jsx-runtime");
360
+ var Dialog = __toESM(require("@radix-ui/react-dialog"), 1);
361
+ var import_lucide_react2 = require("lucide-react");
362
+ var React = __toESM(require("react"), 1);
363
+
364
+ // src/lib/utils.ts
365
+ var import_clsx = require("clsx");
366
+ var import_tailwind_merge = require("tailwind-merge");
367
+ function cn(...inputs) {
368
+ return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs));
369
+ }
370
+
371
+ // src/components/form-dialog.tsx
372
+ var import_jsx_runtime10 = require("react/jsx-runtime");
268
373
  function FormDialogLayout({
269
374
  title,
270
375
  children,
@@ -275,11 +380,11 @@ function FormDialogLayout({
275
380
  isSubmitting = false,
276
381
  isDisabled = false
277
382
  }) {
278
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("form", { onSubmit, children: [
279
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "flex flex-col space-y-1.5 text-center sm:text-left", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("h2", { className: "text-lg font-semibold leading-none tracking-tight", children: title }) }),
280
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "space-y-4 py-4", children }),
281
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", children: [
282
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
383
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("form", { onSubmit, children: [
384
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "flex flex-col space-y-1.5 text-center sm:text-left", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("h2", { className: "text-lg font-semibold leading-none tracking-tight", children: title }) }),
385
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "space-y-4 py-4", children }),
386
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", children: [
387
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
283
388
  "button",
284
389
  {
285
390
  type: "button",
@@ -288,7 +393,7 @@ function FormDialogLayout({
288
393
  children: cancelLabel
289
394
  }
290
395
  ),
291
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
396
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
292
397
  "button",
293
398
  {
294
399
  type: "submit",
@@ -300,25 +405,98 @@ function FormDialogLayout({
300
405
  ] })
301
406
  ] });
302
407
  }
408
+ var sizeClasses2 = {
409
+ sm: "sm:max-w-sm",
410
+ md: "sm:max-w-md",
411
+ lg: "sm:max-w-lg",
412
+ xl: "sm:max-w-xl",
413
+ "2xl": "sm:max-w-2xl"
414
+ };
415
+ function FormDialog({
416
+ open,
417
+ onOpenChange,
418
+ title,
419
+ description,
420
+ children,
421
+ footer,
422
+ onSubmit,
423
+ size = "lg",
424
+ className
425
+ }) {
426
+ React.useEffect(() => {
427
+ if (open) return;
428
+ const id = window.setTimeout(() => {
429
+ if (document.body.style.pointerEvents === "none") {
430
+ document.body.style.pointerEvents = "";
431
+ }
432
+ }, 0);
433
+ return () => window.clearTimeout(id);
434
+ }, [open]);
435
+ const body = /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_jsx_runtime10.Fragment, { children: [
436
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "flex shrink-0 items-start justify-between gap-4 border-b px-6 py-4", children: [
437
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "min-w-0 space-y-1", children: [
438
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Dialog.Title, { className: "text-lg font-semibold leading-none tracking-tight", children: title }),
439
+ description && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Dialog.Description, { className: "text-sm text-muted-foreground", children: description })
440
+ ] }),
441
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
442
+ Dialog.Close,
443
+ {
444
+ className: "-mr-1 shrink-0 rounded-sm opacity-70 transition-opacity hover:opacity-100 focus:outline-none focus-visible:ring-2 focus-visible:ring-ring",
445
+ "aria-label": "Fechar",
446
+ children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_lucide_react2.X, { className: "h-5 w-5" })
447
+ }
448
+ )
449
+ ] }),
450
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "min-h-0 flex-1 overflow-y-auto px-6 py-4", children }),
451
+ footer && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "flex shrink-0 flex-col-reverse gap-2 border-t px-6 py-4 sm:flex-row sm:justify-end", children: footer })
452
+ ] });
453
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Dialog.Root, { open, onOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(Dialog.Portal, { children: [
454
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Dialog.Overlay, { className: "fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0" }),
455
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
456
+ Dialog.Content,
457
+ {
458
+ onCloseAutoFocus: () => {
459
+ document.body.style.pointerEvents = "";
460
+ },
461
+ className: cn(
462
+ "fixed z-50 flex max-h-[92vh] flex-col bg-background shadow-lg outline-none",
463
+ "inset-x-0 bottom-0 rounded-t-2xl",
464
+ "sm:inset-x-auto sm:bottom-auto sm:left-1/2 sm:top-1/2 sm:max-h-[90vh] sm:w-full sm:-translate-x-1/2 sm:-translate-y-1/2 sm:rounded-lg",
465
+ "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
466
+ sizeClasses2[size],
467
+ className
468
+ ),
469
+ children: onSubmit ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
470
+ "form",
471
+ {
472
+ onSubmit,
473
+ className: "flex min-h-0 flex-1 flex-col",
474
+ children: body
475
+ }
476
+ ) : body
477
+ }
478
+ )
479
+ ] }) });
480
+ }
303
481
 
304
482
  // src/components/auth-card.tsx
305
- var import_jsx_runtime9 = require("react/jsx-runtime");
483
+ var import_jsx_runtime11 = require("react/jsx-runtime");
306
484
  function AuthCard({ title, description, children, footer }) {
307
- return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "flex min-h-screen items-center justify-center px-4", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "w-full max-w-sm rounded-lg border bg-card p-6 shadow-sm", children: [
308
- /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "mb-6 text-center", children: [
309
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("h1", { className: "text-2xl font-semibold tracking-tight", children: title }),
310
- description && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("p", { className: "mt-1 text-sm text-muted-foreground", children: description })
485
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "flex min-h-screen items-center justify-center px-4", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "w-full max-w-sm rounded-lg border bg-card p-6 shadow-sm", children: [
486
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "mb-6 text-center", children: [
487
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("h1", { className: "text-2xl font-semibold tracking-tight", children: title }),
488
+ description && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("p", { className: "mt-1 text-sm text-muted-foreground", children: description })
311
489
  ] }),
312
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "space-y-4", children }),
313
- footer && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "mt-4", children: footer })
490
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "space-y-4", children }),
491
+ footer && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "mt-4", children: footer })
314
492
  ] }) });
315
493
  }
316
494
 
317
495
  // src/components/pagination.tsx
318
- var import_jsx_runtime10 = require("react/jsx-runtime");
496
+ var import_jsx_runtime12 = require("react/jsx-runtime");
319
497
  function Pagination({ page, onPageChange, hasNextPage, hasPreviousPage, className }) {
320
- return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: `flex items-center justify-end gap-4 ${className ?? ""}`, children: [
321
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
498
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: `flex items-center justify-end gap-4 ${className ?? ""}`, children: [
499
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
322
500
  "button",
323
501
  {
324
502
  type: "button",
@@ -328,11 +506,11 @@ function Pagination({ page, onPageChange, hasNextPage, hasPreviousPage, classNam
328
506
  children: "Anterior"
329
507
  }
330
508
  ),
331
- /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("span", { className: "text-sm text-muted-foreground", children: [
509
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("span", { className: "text-sm text-muted-foreground", children: [
332
510
  "P\xE1gina ",
333
511
  page
334
512
  ] }),
335
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
513
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
336
514
  "button",
337
515
  {
338
516
  type: "button",
@@ -346,18 +524,18 @@ function Pagination({ page, onPageChange, hasNextPage, hasPreviousPage, classNam
346
524
  }
347
525
 
348
526
  // src/components/table-skeleton.tsx
349
- var import_jsx_runtime11 = require("react/jsx-runtime");
527
+ var import_jsx_runtime13 = require("react/jsx-runtime");
350
528
  function TableSkeleton({ rows = 5, columns = 4 }) {
351
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_jsx_runtime11.Fragment, { children: Array.from({ length: rows }).map((_, i) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("tr", { className: "border-b transition-colors", children: Array.from({ length: columns }).map((_2, j) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("td", { className: "p-4 align-middle", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "h-5 w-full animate-pulse rounded bg-muted" }) }, j)) }, i)) });
529
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_jsx_runtime13.Fragment, { children: Array.from({ length: rows }).map((_, i) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("tr", { className: "border-b transition-colors", children: Array.from({ length: columns }).map((_2, j) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("td", { className: "p-4 align-middle", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "h-5 w-full animate-pulse rounded bg-muted" }) }, j)) }, i)) });
352
530
  }
353
531
 
354
532
  // src/components/search-input.tsx
355
- var React = __toESM(require("react"), 1);
356
- var import_jsx_runtime12 = require("react/jsx-runtime");
357
- var SearchInput = React.forwardRef(
533
+ var React2 = __toESM(require("react"), 1);
534
+ var import_jsx_runtime14 = require("react/jsx-runtime");
535
+ var SearchInput = React2.forwardRef(
358
536
  ({ containerClassName, className, ...props }, ref) => {
359
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: `relative flex-1 ${containerClassName ?? ""}`, children: [
360
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
537
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: `relative flex-1 ${containerClassName ?? ""}`, children: [
538
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
361
539
  "svg",
362
540
  {
363
541
  xmlns: "http://www.w3.org/2000/svg",
@@ -371,12 +549,12 @@ var SearchInput = React.forwardRef(
371
549
  strokeLinejoin: "round",
372
550
  className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground",
373
551
  children: [
374
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("circle", { cx: "11", cy: "11", r: "8" }),
375
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("path", { d: "m21 21-4.3-4.3" })
552
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("circle", { cx: "11", cy: "11", r: "8" }),
553
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("path", { d: "m21 21-4.3-4.3" })
376
554
  ]
377
555
  }
378
556
  ),
379
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
557
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
380
558
  "input",
381
559
  {
382
560
  ref,
@@ -391,30 +569,30 @@ var SearchInput = React.forwardRef(
391
569
  SearchInput.displayName = "SearchInput";
392
570
 
393
571
  // src/components/stat-card.tsx
394
- var import_jsx_runtime13 = require("react/jsx-runtime");
572
+ var import_jsx_runtime15 = require("react/jsx-runtime");
395
573
  function StatCard({ label, value, detail, icon, isLoading }) {
396
574
  if (isLoading) {
397
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "rounded-lg border bg-card p-6 shadow-sm", children: [
398
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "flex items-center justify-between pb-2", children: [
399
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "h-4 w-24 animate-pulse rounded bg-muted" }),
400
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "h-4 w-4 animate-pulse rounded bg-muted" })
575
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "rounded-lg border bg-card p-6 shadow-sm", children: [
576
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "flex items-center justify-between pb-2", children: [
577
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "h-4 w-24 animate-pulse rounded bg-muted" }),
578
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "h-4 w-4 animate-pulse rounded bg-muted" })
401
579
  ] }),
402
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "mt-2 h-7 w-16 animate-pulse rounded bg-muted" }),
403
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "mt-1 h-4 w-20 animate-pulse rounded bg-muted" })
580
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "mt-2 h-7 w-16 animate-pulse rounded bg-muted" }),
581
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "mt-1 h-4 w-20 animate-pulse rounded bg-muted" })
404
582
  ] });
405
583
  }
406
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "rounded-lg border bg-card p-6 shadow-sm", children: [
407
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "flex items-center justify-between pb-2", children: [
408
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "text-sm font-medium text-muted-foreground", children: label }),
409
- icon && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "text-muted-foreground", children: icon })
584
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "rounded-lg border bg-card p-6 shadow-sm", children: [
585
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "flex items-center justify-between pb-2", children: [
586
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "text-sm font-medium text-muted-foreground", children: label }),
587
+ icon && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "text-muted-foreground", children: icon })
410
588
  ] }),
411
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "text-2xl font-bold", children: value }),
412
- detail && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("p", { className: "text-xs text-muted-foreground", children: detail })
589
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "text-2xl font-bold", children: value }),
590
+ detail && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { className: "text-xs text-muted-foreground", children: detail })
413
591
  ] });
414
592
  }
415
593
 
416
594
  // src/components/data-table-wrapper.tsx
417
- var import_jsx_runtime14 = require("react/jsx-runtime");
595
+ var import_jsx_runtime16 = require("react/jsx-runtime");
418
596
  function DataTableWrapper({
419
597
  children,
420
598
  isEmpty,
@@ -427,15 +605,15 @@ function DataTableWrapper({
427
605
  hasNextPage = false,
428
606
  hasPreviousPage = false
429
607
  }) {
430
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "space-y-4", children: [
431
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "overflow-x-auto rounded-md border", children }),
432
- !isLoading && isEmpty && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex flex-col items-center justify-center py-16 text-center", children: [
433
- emptyIcon && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "mb-4 text-muted-foreground", children: emptyIcon }),
434
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("h3", { className: "text-lg font-semibold tracking-tight", children: emptyTitle }),
435
- emptyDescription && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { className: "mt-1 max-w-sm text-sm text-muted-foreground", children: emptyDescription })
608
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "space-y-4", children: [
609
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "overflow-x-auto rounded-md border", children }),
610
+ !isLoading && isEmpty && /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "flex flex-col items-center justify-center py-16 text-center", children: [
611
+ emptyIcon && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "mb-4 text-muted-foreground", children: emptyIcon }),
612
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("h3", { className: "text-lg font-semibold tracking-tight", children: emptyTitle }),
613
+ emptyDescription && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("p", { className: "mt-1 max-w-sm text-sm text-muted-foreground", children: emptyDescription })
436
614
  ] }),
437
- page !== void 0 && onPageChange && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex items-center justify-end gap-4", children: [
438
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
615
+ page !== void 0 && onPageChange && /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "flex items-center justify-end gap-4", children: [
616
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
439
617
  "button",
440
618
  {
441
619
  type: "button",
@@ -445,11 +623,11 @@ function DataTableWrapper({
445
623
  children: "Anterior"
446
624
  }
447
625
  ),
448
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("span", { className: "text-sm text-muted-foreground", children: [
626
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("span", { className: "text-sm text-muted-foreground", children: [
449
627
  "P\xE1gina ",
450
628
  page
451
629
  ] }),
452
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
630
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
453
631
  "button",
454
632
  {
455
633
  type: "button",
@@ -464,7 +642,7 @@ function DataTableWrapper({
464
642
  }
465
643
 
466
644
  // src/components/mobile-card-list.tsx
467
- var import_jsx_runtime15 = require("react/jsx-runtime");
645
+ var import_jsx_runtime17 = require("react/jsx-runtime");
468
646
  function MobileCardList({
469
647
  data,
470
648
  renderCard,
@@ -474,19 +652,19 @@ function MobileCardList({
474
652
  className
475
653
  }) {
476
654
  if (isLoading) {
477
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: `space-y-3 ${className ?? ""}`, children: Array.from({ length: loadingCount }).map((_, i) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "rounded-xl border p-4", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "space-y-3", children: [
478
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "flex justify-between", children: [
479
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "h-5 w-32 animate-pulse rounded bg-muted" }),
480
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "h-5 w-16 animate-pulse rounded bg-muted" })
655
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: `space-y-3 ${className ?? ""}`, children: Array.from({ length: loadingCount }).map((_, i) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "rounded-xl border p-4", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "space-y-3", children: [
656
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "flex justify-between", children: [
657
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "h-5 w-32 animate-pulse rounded bg-muted" }),
658
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "h-5 w-16 animate-pulse rounded bg-muted" })
481
659
  ] }),
482
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "h-4 w-48 animate-pulse rounded bg-muted" }),
483
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "flex justify-between", children: [
484
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "h-4 w-24 animate-pulse rounded bg-muted" }),
485
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "h-4 w-20 animate-pulse rounded bg-muted" })
660
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "h-4 w-48 animate-pulse rounded bg-muted" }),
661
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "flex justify-between", children: [
662
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "h-4 w-24 animate-pulse rounded bg-muted" }),
663
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "h-4 w-20 animate-pulse rounded bg-muted" })
486
664
  ] })
487
665
  ] }) }, i)) });
488
666
  }
489
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: `space-y-3 ${className ?? ""}`, children: data.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
667
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: `space-y-3 ${className ?? ""}`, children: data.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
490
668
  "div",
491
669
  {
492
670
  className: "rounded-xl border p-4 transition-all duration-150 hover:border-foreground/20 active:scale-[0.99]",
@@ -497,7 +675,7 @@ function MobileCardList({
497
675
  }
498
676
 
499
677
  // src/components/responsive-data-view.tsx
500
- var import_jsx_runtime16 = require("react/jsx-runtime");
678
+ var import_jsx_runtime18 = require("react/jsx-runtime");
501
679
  function ResponsiveDataView({
502
680
  table,
503
681
  cards,
@@ -508,13 +686,13 @@ function ResponsiveDataView({
508
686
  emptyDescription,
509
687
  pagination
510
688
  }) {
511
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "space-y-4", children: [
512
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "hidden overflow-x-auto rounded-md border md:block", children: table }),
513
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "md:hidden", children: cards }),
514
- !isLoading && isEmpty && /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "flex flex-col items-center justify-center py-16 text-center", children: [
515
- emptyIcon && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "mb-4 text-muted-foreground", children: emptyIcon }),
516
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("h3", { className: "text-lg font-semibold tracking-tight", children: emptyTitle }),
517
- emptyDescription && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("p", { className: "mt-1 max-w-sm text-sm text-muted-foreground", children: emptyDescription })
689
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "space-y-4", children: [
690
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "hidden overflow-x-auto rounded-md border md:block", children: table }),
691
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "md:hidden", children: cards }),
692
+ !isLoading && isEmpty && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "flex flex-col items-center justify-center py-16 text-center", children: [
693
+ emptyIcon && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "mb-4 text-muted-foreground", children: emptyIcon }),
694
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("h3", { className: "text-lg font-semibold tracking-tight", children: emptyTitle }),
695
+ emptyDescription && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "mt-1 max-w-sm text-sm text-muted-foreground", children: emptyDescription })
518
696
  ] }),
519
697
  pagination
520
698
  ] });
@@ -522,10 +700,10 @@ function ResponsiveDataView({
522
700
 
523
701
  // src/components/toaster.tsx
524
702
  var import_sonner = require("sonner");
525
- var import_jsx_runtime17 = require("react/jsx-runtime");
703
+ var import_jsx_runtime19 = require("react/jsx-runtime");
526
704
  function Toaster(props) {
527
705
  const { theme = "system" } = useTheme();
528
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
706
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
529
707
  import_sonner.Toaster,
530
708
  {
531
709
  theme,
@@ -546,25 +724,18 @@ function Toaster(props) {
546
724
  }
547
725
 
548
726
  // src/components/app-shell.tsx
549
- var import_lucide_react3 = require("lucide-react");
727
+ var import_lucide_react4 = require("lucide-react");
550
728
  var import_react3 = require("react");
551
729
 
552
- // src/lib/utils.ts
553
- var import_clsx = require("clsx");
554
- var import_tailwind_merge = require("tailwind-merge");
555
- function cn(...inputs) {
556
- return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs));
557
- }
558
-
559
730
  // src/components/sidebar-nav.tsx
560
731
  var import_react2 = require("react");
561
732
 
562
733
  // src/components/types.tsx
563
- var import_jsx_runtime18 = require("react/jsx-runtime");
564
- var defaultRenderLink = ({ children, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("a", { ...props, children });
734
+ var import_jsx_runtime20 = require("react/jsx-runtime");
735
+ var defaultRenderLink = ({ children, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("a", { ...props, children });
565
736
 
566
737
  // src/components/sidebar-nav.tsx
567
- var import_jsx_runtime19 = require("react/jsx-runtime");
738
+ var import_jsx_runtime21 = require("react/jsx-runtime");
568
739
  function defaultIsActive(item, activePath) {
569
740
  if (item.href === "/") return activePath === "/";
570
741
  return activePath === item.href || activePath.startsWith(item.href + "/");
@@ -579,7 +750,7 @@ function SidebarNav({
579
750
  onNavigate
580
751
  }) {
581
752
  const visible = items.filter((item) => !item.adminOnly || isAdmin);
582
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("nav", { className: "flex flex-col gap-1", children: visible.map((item) => {
753
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("nav", { className: "flex flex-col gap-1", children: visible.map((item) => {
583
754
  const active = isActive(item, activePath);
584
755
  const link = renderLink({
585
756
  href: item.href,
@@ -591,19 +762,19 @@ function SidebarNav({
591
762
  active ? "bg-accent text-accent-foreground font-semibold" : "text-muted-foreground hover:bg-accent hover:text-accent-foreground",
592
763
  isCollapsed && "justify-center px-2"
593
764
  ),
594
- children: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_jsx_runtime19.Fragment, { children: [
595
- item.icon && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "shrink-0", children: item.icon }),
596
- !isCollapsed && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "truncate", children: item.label })
765
+ children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_jsx_runtime21.Fragment, { children: [
766
+ item.icon && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "shrink-0", children: item.icon }),
767
+ !isCollapsed && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "truncate", children: item.label })
597
768
  ] })
598
769
  });
599
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react2.Fragment, { children: link }, item.href);
770
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react2.Fragment, { children: link }, item.href);
600
771
  }) });
601
772
  }
602
773
 
603
774
  // src/components/user-menu.tsx
604
775
  var DropdownMenu2 = __toESM(require("@radix-ui/react-dropdown-menu"), 1);
605
- var import_lucide_react2 = require("lucide-react");
606
- var import_jsx_runtime20 = require("react/jsx-runtime");
776
+ var import_lucide_react3 = require("lucide-react");
777
+ var import_jsx_runtime22 = require("react/jsx-runtime");
607
778
  function initials(user) {
608
779
  const source = user?.name?.trim() || user?.email?.trim();
609
780
  if (!source) return "";
@@ -621,44 +792,44 @@ function UserMenu({
621
792
  align = "end"
622
793
  }) {
623
794
  const label = initials(user);
624
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(DropdownMenu2.Root, { children: [
625
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(DropdownMenu2.Trigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
795
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(DropdownMenu2.Root, { children: [
796
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(DropdownMenu2.Trigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
626
797
  "button",
627
798
  {
628
799
  type: "button",
629
800
  className: "inline-flex h-9 w-9 items-center justify-center overflow-hidden rounded-full border border-input bg-background text-xs font-semibold shadow-sm transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",
630
801
  "aria-label": "Menu do usu\xE1rio",
631
802
  "data-testid": "user-menu",
632
- children: user?.avatarUrl ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("img", { src: user.avatarUrl, alt: user.name ?? user.email ?? "Avatar", className: "h-full w-full object-cover" }) : label ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { children: label }) : /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_lucide_react2.User, { className: "h-4 w-4" })
803
+ children: user?.avatarUrl ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("img", { src: user.avatarUrl, alt: user.name ?? user.email ?? "Avatar", className: "h-full w-full object-cover" }) : label ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { children: label }) : /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_lucide_react3.User, { className: "h-4 w-4" })
633
804
  }
634
805
  ) }),
635
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(DropdownMenu2.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
806
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(DropdownMenu2.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
636
807
  DropdownMenu2.Content,
637
808
  {
638
809
  align,
639
810
  sideOffset: 6,
640
811
  className: "z-50 min-w-[12rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95",
641
812
  children: [
642
- (user?.name || user?.email) && /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_jsx_runtime20.Fragment, { children: [
643
- /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "px-2 py-1.5", children: [
644
- user.name && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "truncate text-sm font-medium", children: user.name }),
645
- user.email && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "truncate text-xs text-muted-foreground", children: user.email })
813
+ (user?.name || user?.email) && /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(import_jsx_runtime22.Fragment, { children: [
814
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "px-2 py-1.5", children: [
815
+ user.name && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("p", { className: "truncate text-sm font-medium", children: user.name }),
816
+ user.email && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("p", { className: "truncate text-xs text-muted-foreground", children: user.email })
646
817
  ] }),
647
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(DropdownMenu2.Separator, { className: "-mx-1 my-1 h-px bg-border" })
818
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(DropdownMenu2.Separator, { className: "-mx-1 my-1 h-px bg-border" })
648
819
  ] }),
649
820
  items.map(
650
- (item) => item.href ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(DropdownMenu2.Item, { asChild: true, children: renderLink({ href: item.href, className: itemClass, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_jsx_runtime20.Fragment, { children: [
821
+ (item) => item.href ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(DropdownMenu2.Item, { asChild: true, children: renderLink({ href: item.href, className: itemClass, children: /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(import_jsx_runtime22.Fragment, { children: [
651
822
  item.icon,
652
823
  item.label
653
- ] }) }) }, item.label) : /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(DropdownMenu2.Item, { className: itemClass, onClick: item.onClick, children: [
824
+ ] }) }) }, item.label) : /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(DropdownMenu2.Item, { className: itemClass, onClick: item.onClick, children: [
654
825
  item.icon,
655
826
  item.label
656
827
  ] }, item.label)
657
828
  ),
658
- onLogout && /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_jsx_runtime20.Fragment, { children: [
659
- items.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(DropdownMenu2.Separator, { className: "-mx-1 my-1 h-px bg-border" }),
660
- /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(DropdownMenu2.Item, { className: cn(itemClass, "text-destructive focus:bg-destructive/10"), onClick: onLogout, children: [
661
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_lucide_react2.LogOut, { className: "h-4 w-4" }),
829
+ onLogout && /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(import_jsx_runtime22.Fragment, { children: [
830
+ items.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(DropdownMenu2.Separator, { className: "-mx-1 my-1 h-px bg-border" }),
831
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(DropdownMenu2.Item, { className: cn(itemClass, "text-destructive focus:bg-destructive/10"), onClick: onLogout, children: [
832
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_lucide_react3.LogOut, { className: "h-4 w-4" }),
662
833
  logoutLabel
663
834
  ] })
664
835
  ] })
@@ -669,7 +840,7 @@ function UserMenu({
669
840
  }
670
841
 
671
842
  // src/components/app-shell.tsx
672
- var import_jsx_runtime21 = require("react/jsx-runtime");
843
+ var import_jsx_runtime23 = require("react/jsx-runtime");
673
844
  function AppShell({
674
845
  brand,
675
846
  brandCollapsed,
@@ -688,7 +859,7 @@ function AppShell({
688
859
  }) {
689
860
  const [collapsed, setCollapsed] = (0, import_react3.useState)(defaultCollapsed);
690
861
  const [mobileOpen, setMobileOpen] = (0, import_react3.useState)(false);
691
- const nav = (isCollapsed, onNavigate) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
862
+ const nav = (isCollapsed, onNavigate) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
692
863
  SidebarNav,
693
864
  {
694
865
  items: navItems,
@@ -700,8 +871,8 @@ function AppShell({
700
871
  onNavigate
701
872
  }
702
873
  );
703
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "flex h-screen overflow-hidden bg-background", children: [
704
- /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
874
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "flex h-screen overflow-hidden bg-background", children: [
875
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
705
876
  "aside",
706
877
  {
707
878
  className: cn(
@@ -709,22 +880,22 @@ function AppShell({
709
880
  collapsed ? "w-16" : "w-60"
710
881
  ),
711
882
  children: [
712
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "flex h-14 shrink-0 items-center border-b px-4", children: collapsed ? brandCollapsed ?? brand : brand }),
713
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "flex-1 overflow-y-auto px-2 py-4", children: nav(collapsed) }),
714
- collapsible && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "border-t p-2", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
883
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "flex h-14 shrink-0 items-center border-b px-4", children: collapsed ? brandCollapsed ?? brand : brand }),
884
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "flex-1 overflow-y-auto px-2 py-4", children: nav(collapsed) }),
885
+ collapsible && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "border-t p-2", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
715
886
  "button",
716
887
  {
717
888
  type: "button",
718
889
  onClick: () => setCollapsed((v) => !v),
719
890
  className: "flex w-full items-center justify-center rounded-md px-2 py-2 text-muted-foreground transition-colors hover:bg-accent hover:text-accent-foreground",
720
891
  "aria-label": collapsed ? "Expandir menu" : "Recolher menu",
721
- children: collapsed ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_lucide_react3.ChevronRight, { className: "h-4 w-4" }) : /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_lucide_react3.ChevronLeft, { className: "h-4 w-4" })
892
+ children: collapsed ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_lucide_react4.ChevronRight, { className: "h-4 w-4" }) : /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_lucide_react4.ChevronLeft, { className: "h-4 w-4" })
722
893
  }
723
894
  ) })
724
895
  ]
725
896
  }
726
897
  ),
727
- /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
898
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
728
899
  "div",
729
900
  {
730
901
  className: cn(
@@ -733,8 +904,8 @@ function AppShell({
733
904
  ),
734
905
  onClick: () => setMobileOpen(false),
735
906
  children: [
736
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "absolute inset-0 bg-black/50" }),
737
- /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
907
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "absolute inset-0 bg-black/50" }),
908
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
738
909
  "div",
739
910
  {
740
911
  className: cn(
@@ -743,40 +914,40 @@ function AppShell({
743
914
  ),
744
915
  onClick: (e) => e.stopPropagation(),
745
916
  children: [
746
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "flex h-14 shrink-0 items-center border-b px-4", children: brand }),
747
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "flex-1 overflow-y-auto px-2 py-4", children: nav(false, () => setMobileOpen(false)) })
917
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "flex h-14 shrink-0 items-center border-b px-4", children: brand }),
918
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "flex-1 overflow-y-auto px-2 py-4", children: nav(false, () => setMobileOpen(false)) })
748
919
  ]
749
920
  }
750
921
  )
751
922
  ]
752
923
  }
753
924
  ),
754
- /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "flex flex-1 flex-col overflow-hidden", children: [
755
- /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("header", { className: "flex h-14 shrink-0 items-center gap-2 border-b bg-background px-4", children: [
756
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
925
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "flex flex-1 flex-col overflow-hidden", children: [
926
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("header", { className: "flex h-14 shrink-0 items-center gap-2 border-b bg-background px-4", children: [
927
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
757
928
  "button",
758
929
  {
759
930
  type: "button",
760
931
  onClick: () => setMobileOpen(true),
761
932
  className: "inline-flex h-9 w-9 items-center justify-center rounded-md border border-input bg-background shadow-sm transition-colors hover:bg-accent hover:text-accent-foreground md:hidden",
762
933
  "aria-label": "Abrir menu",
763
- children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_lucide_react3.Menu, { className: "h-4 w-4" })
934
+ children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_lucide_react4.Menu, { className: "h-4 w-4" })
764
935
  }
765
936
  ),
766
- /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "ml-auto flex items-center gap-2", children: [
937
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "ml-auto flex items-center gap-2", children: [
767
938
  headerActions,
768
- (user || onLogout) && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(UserMenu, { user, items: userMenuItems, onLogout, renderLink })
939
+ (user || onLogout) && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(UserMenu, { user, items: userMenuItems, onLogout, renderLink })
769
940
  ] })
770
941
  ] }),
771
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("main", { className: "flex-1 overflow-y-auto", children })
942
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("main", { className: "flex-1 overflow-y-auto", children })
772
943
  ] })
773
944
  ] });
774
945
  }
775
946
 
776
947
  // src/components/row-actions-menu.tsx
777
948
  var DropdownMenu3 = __toESM(require("@radix-ui/react-dropdown-menu"), 1);
778
- var import_lucide_react4 = require("lucide-react");
779
- var import_jsx_runtime22 = require("react/jsx-runtime");
949
+ var import_lucide_react5 = require("lucide-react");
950
+ var import_jsx_runtime24 = require("react/jsx-runtime");
780
951
  var itemClass2 = "flex w-full cursor-pointer select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors hover:bg-accent focus:bg-accent data-[disabled]:pointer-events-none data-[disabled]:opacity-50";
781
952
  function RowActionsMenu({
782
953
  actions,
@@ -786,18 +957,18 @@ function RowActionsMenu({
786
957
  renderLink = defaultRenderLink
787
958
  }) {
788
959
  if (actions.length === 0) return null;
789
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(DropdownMenu3.Root, { children: [
790
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(DropdownMenu3.Trigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
960
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(DropdownMenu3.Root, { children: [
961
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(DropdownMenu3.Trigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
791
962
  "button",
792
963
  {
793
964
  type: "button",
794
965
  disabled,
795
966
  "aria-label": label,
796
967
  className: "inline-flex h-8 w-8 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",
797
- children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_lucide_react4.MoreVertical, { className: "h-4 w-4" })
968
+ children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_lucide_react5.MoreVertical, { className: "h-4 w-4" })
798
969
  }
799
970
  ) }),
800
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(DropdownMenu3.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
971
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(DropdownMenu3.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
801
972
  DropdownMenu3.Content,
802
973
  {
803
974
  align,
@@ -805,14 +976,14 @@ function RowActionsMenu({
805
976
  className: "z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95",
806
977
  children: actions.map((action) => {
807
978
  const cls = cn(itemClass2, action.destructive && "text-destructive focus:bg-destructive/10");
808
- return action.href ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(DropdownMenu3.Item, { asChild: true, disabled: action.disabled, children: renderLink({
979
+ return action.href ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(DropdownMenu3.Item, { asChild: true, disabled: action.disabled, children: renderLink({
809
980
  href: action.href,
810
981
  className: cls,
811
- children: /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(import_jsx_runtime22.Fragment, { children: [
982
+ children: /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_jsx_runtime24.Fragment, { children: [
812
983
  action.icon,
813
984
  action.label
814
985
  ] })
815
- }) }, action.label) : /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
986
+ }) }, action.label) : /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
816
987
  DropdownMenu3.Item,
817
988
  {
818
989
  className: cls,
@@ -882,17 +1053,20 @@ function useCustomToast() {
882
1053
  ConfirmDialog,
883
1054
  DataTableWrapper,
884
1055
  EmptyState,
1056
+ FormDialog,
885
1057
  FormDialogLayout,
886
1058
  FormField,
887
1059
  MobileCardList,
888
1060
  ModeToggle,
889
1061
  PageHeader,
890
1062
  Pagination,
1063
+ ProgressBar,
891
1064
  ResponsiveDataView,
892
1065
  RowActionsMenu,
893
1066
  SearchInput,
894
1067
  SidebarNav,
895
1068
  StatCard,
1069
+ StatusBadge,
896
1070
  StatusDot,
897
1071
  TableSkeleton,
898
1072
  ThemeProvider,