@motor-hero/ui-kit 0.14.3 → 0.15.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.
@@ -0,0 +1,7 @@
1
+ import * as React from "react";
2
+ interface PasswordInputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "type"> {
3
+ containerClassName?: string;
4
+ }
5
+ export declare const PasswordInput: React.ForwardRefExoticComponent<PasswordInputProps & React.RefAttributes<HTMLInputElement>>;
6
+ export {};
7
+ //# sourceMappingURL=password-input.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"password-input.d.ts","sourceRoot":"","sources":["../../src/components/password-input.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,UAAU,kBACR,SAAQ,IAAI,CAAC,KAAK,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IACjE,kBAAkB,CAAC,EAAE,MAAM,CAAA;CAC5B;AAED,eAAO,MAAM,aAAa,6FAyBxB,CAAA"}
package/dist/index.cjs CHANGED
@@ -42,6 +42,7 @@ __export(index_exports, {
42
42
  ModeToggle: () => ModeToggle,
43
43
  PageHeader: () => PageHeader,
44
44
  Pagination: () => Pagination,
45
+ PasswordInput: () => PasswordInput,
45
46
  ProgressBar: () => ProgressBar,
46
47
  ResponsiveDataView: () => ResponsiveDataView,
47
48
  RowActionsMenu: () => RowActionsMenu,
@@ -577,31 +578,62 @@ var SearchInput = React2.forwardRef(
577
578
  );
578
579
  SearchInput.displayName = "SearchInput";
579
580
 
580
- // src/components/stat-card.tsx
581
+ // src/components/password-input.tsx
582
+ var import_lucide_react3 = require("lucide-react");
583
+ var React3 = __toESM(require("react"), 1);
581
584
  var import_jsx_runtime15 = require("react/jsx-runtime");
585
+ var PasswordInput = React3.forwardRef(({ containerClassName, className, ...props }, ref) => {
586
+ const [visible, setVisible] = React3.useState(false);
587
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: `relative ${containerClassName ?? ""}`, children: [
588
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
589
+ "input",
590
+ {
591
+ ref,
592
+ type: visible ? "text" : "password",
593
+ className: `flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 pr-10 text-base shadow-sm transition-all duration-200 placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:focus-visible:ring-destructive md:text-sm ${className ?? ""}`,
594
+ ...props
595
+ }
596
+ ),
597
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
598
+ "button",
599
+ {
600
+ type: "button",
601
+ onClick: () => setVisible((prev) => !prev),
602
+ "aria-label": visible ? "Ocultar senha" : "Mostrar senha",
603
+ tabIndex: -1,
604
+ className: "absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground transition-colors hover:text-foreground",
605
+ children: visible ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react3.EyeOff, { className: "h-4 w-4" }) : /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react3.Eye, { className: "h-4 w-4" })
606
+ }
607
+ )
608
+ ] });
609
+ });
610
+ PasswordInput.displayName = "PasswordInput";
611
+
612
+ // src/components/stat-card.tsx
613
+ var import_jsx_runtime16 = require("react/jsx-runtime");
582
614
  function StatCard({ label, value, detail, icon, isLoading }) {
583
615
  if (isLoading) {
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)("div", { className: "h-4 w-24 animate-pulse rounded bg-muted" }),
587
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "h-4 w-4 animate-pulse rounded bg-muted" })
616
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "rounded-lg border bg-card p-6 shadow-sm", children: [
617
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "flex items-center justify-between pb-2", children: [
618
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "h-4 w-24 animate-pulse rounded bg-muted" }),
619
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "h-4 w-4 animate-pulse rounded bg-muted" })
588
620
  ] }),
589
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "mt-2 h-7 w-16 animate-pulse rounded bg-muted" }),
590
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "mt-1 h-4 w-20 animate-pulse rounded bg-muted" })
621
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "mt-2 h-7 w-16 animate-pulse rounded bg-muted" }),
622
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "mt-1 h-4 w-20 animate-pulse rounded bg-muted" })
591
623
  ] });
592
624
  }
593
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "rounded-lg border bg-card p-6 shadow-sm", children: [
594
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "flex items-center justify-between pb-2", children: [
595
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "text-sm font-medium text-muted-foreground", children: label }),
596
- icon && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "text-muted-foreground", children: icon })
625
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "rounded-lg border bg-card p-6 shadow-sm", children: [
626
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "flex items-center justify-between pb-2", children: [
627
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "text-sm font-medium text-muted-foreground", children: label }),
628
+ icon && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "text-muted-foreground", children: icon })
597
629
  ] }),
598
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "text-2xl font-bold", children: value }),
599
- detail && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { className: "text-xs text-muted-foreground", children: detail })
630
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "text-2xl font-bold", children: value }),
631
+ detail && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("p", { className: "text-xs text-muted-foreground", children: detail })
600
632
  ] });
601
633
  }
602
634
 
603
635
  // src/components/data-table-wrapper.tsx
604
- var import_jsx_runtime16 = require("react/jsx-runtime");
636
+ var import_jsx_runtime17 = require("react/jsx-runtime");
605
637
  function DataTableWrapper({
606
638
  children,
607
639
  isEmpty,
@@ -614,15 +646,15 @@ function DataTableWrapper({
614
646
  hasNextPage = false,
615
647
  hasPreviousPage = false
616
648
  }) {
617
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "space-y-4", children: [
618
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "overflow-x-auto rounded-md border", children }),
619
- !isLoading && isEmpty && /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "flex flex-col items-center justify-center py-16 text-center", children: [
620
- emptyIcon && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "mb-4 text-muted-foreground", children: emptyIcon }),
621
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("h3", { className: "text-lg font-semibold tracking-tight", children: emptyTitle }),
622
- emptyDescription && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("p", { className: "mt-1 max-w-sm text-sm text-muted-foreground", children: emptyDescription })
649
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "space-y-4", children: [
650
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "overflow-x-auto rounded-md border", children }),
651
+ !isLoading && isEmpty && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "flex flex-col items-center justify-center py-16 text-center", children: [
652
+ emptyIcon && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "mb-4 text-muted-foreground", children: emptyIcon }),
653
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("h3", { className: "text-lg font-semibold tracking-tight", children: emptyTitle }),
654
+ emptyDescription && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { className: "mt-1 max-w-sm text-sm text-muted-foreground", children: emptyDescription })
623
655
  ] }),
624
- page !== void 0 && onPageChange && /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "flex items-center justify-end gap-4", children: [
625
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
656
+ page !== void 0 && onPageChange && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "flex items-center justify-end gap-4", children: [
657
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
626
658
  "button",
627
659
  {
628
660
  type: "button",
@@ -632,11 +664,11 @@ function DataTableWrapper({
632
664
  children: "Anterior"
633
665
  }
634
666
  ),
635
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("span", { className: "text-sm text-muted-foreground", children: [
667
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("span", { className: "text-sm text-muted-foreground", children: [
636
668
  "P\xE1gina ",
637
669
  page
638
670
  ] }),
639
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
671
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
640
672
  "button",
641
673
  {
642
674
  type: "button",
@@ -652,7 +684,7 @@ function DataTableWrapper({
652
684
 
653
685
  // src/components/mobile-card-list.tsx
654
686
  var import_react3 = require("react");
655
- var import_jsx_runtime17 = require("react/jsx-runtime");
687
+ var import_jsx_runtime18 = require("react/jsx-runtime");
656
688
  var SCROLL_THRESHOLD = 8;
657
689
  function MobileCardList({
658
690
  data,
@@ -683,26 +715,26 @@ function MobileCardList({
683
715
  }
684
716
  };
685
717
  if (isLoading) {
686
- 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: [
687
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "flex justify-between", children: [
688
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "h-5 w-32 animate-pulse rounded bg-muted" }),
689
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "h-5 w-16 animate-pulse rounded bg-muted" })
718
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: `space-y-3 ${className ?? ""}`, children: Array.from({ length: loadingCount }).map((_, i) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "rounded-xl border p-4", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "space-y-3", children: [
719
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "flex justify-between", children: [
720
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "h-5 w-32 animate-pulse rounded bg-muted" }),
721
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "h-5 w-16 animate-pulse rounded bg-muted" })
690
722
  ] }),
691
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "h-4 w-48 animate-pulse rounded bg-muted" }),
692
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "flex justify-between", children: [
693
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "h-4 w-24 animate-pulse rounded bg-muted" }),
694
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "h-4 w-20 animate-pulse rounded bg-muted" })
723
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "h-4 w-48 animate-pulse rounded bg-muted" }),
724
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "flex justify-between", children: [
725
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "h-4 w-24 animate-pulse rounded bg-muted" }),
726
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "h-4 w-20 animate-pulse rounded bg-muted" })
695
727
  ] })
696
728
  ] }) }, i)) });
697
729
  }
698
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
730
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
699
731
  "div",
700
732
  {
701
733
  className: `space-y-3 ${className ?? ""}`,
702
734
  onTouchStart,
703
735
  onTouchMove,
704
736
  onClickCapture,
705
- children: data.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
737
+ children: data.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
706
738
  "div",
707
739
  {
708
740
  className: "rounded-xl border p-4 transition-all duration-150 hover:border-foreground/20 active:scale-[0.99]",
@@ -715,7 +747,7 @@ function MobileCardList({
715
747
  }
716
748
 
717
749
  // src/components/responsive-data-view.tsx
718
- var import_jsx_runtime18 = require("react/jsx-runtime");
750
+ var import_jsx_runtime19 = require("react/jsx-runtime");
719
751
  function ResponsiveDataView({
720
752
  table,
721
753
  cards,
@@ -726,13 +758,13 @@ function ResponsiveDataView({
726
758
  emptyDescription,
727
759
  pagination
728
760
  }) {
729
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "space-y-4", children: [
730
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "hidden overflow-x-auto rounded-md border md:block", children: table }),
731
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "md:hidden", children: cards }),
732
- !isLoading && isEmpty && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "flex flex-col items-center justify-center py-16 text-center", children: [
733
- emptyIcon && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "mb-4 text-muted-foreground", children: emptyIcon }),
734
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("h3", { className: "text-lg font-semibold tracking-tight", children: emptyTitle }),
735
- emptyDescription && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "mt-1 max-w-sm text-sm text-muted-foreground", children: emptyDescription })
761
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "space-y-4", children: [
762
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "hidden overflow-x-auto rounded-md border md:block", children: table }),
763
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "md:hidden", children: cards }),
764
+ !isLoading && isEmpty && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "flex flex-col items-center justify-center py-16 text-center", children: [
765
+ emptyIcon && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "mb-4 text-muted-foreground", children: emptyIcon }),
766
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("h3", { className: "text-lg font-semibold tracking-tight", children: emptyTitle }),
767
+ emptyDescription && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { className: "mt-1 max-w-sm text-sm text-muted-foreground", children: emptyDescription })
736
768
  ] }),
737
769
  pagination
738
770
  ] });
@@ -740,10 +772,10 @@ function ResponsiveDataView({
740
772
 
741
773
  // src/components/toaster.tsx
742
774
  var import_sonner = require("sonner");
743
- var import_jsx_runtime19 = require("react/jsx-runtime");
775
+ var import_jsx_runtime20 = require("react/jsx-runtime");
744
776
  function Toaster(props) {
745
777
  const { theme = "system" } = useTheme();
746
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
778
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
747
779
  import_sonner.Toaster,
748
780
  {
749
781
  theme,
@@ -764,18 +796,18 @@ function Toaster(props) {
764
796
  }
765
797
 
766
798
  // src/components/app-shell.tsx
767
- var import_lucide_react4 = require("lucide-react");
799
+ var import_lucide_react5 = require("lucide-react");
768
800
  var import_react5 = require("react");
769
801
 
770
802
  // src/components/sidebar-nav.tsx
771
803
  var import_react4 = require("react");
772
804
 
773
805
  // src/components/types.tsx
774
- var import_jsx_runtime20 = require("react/jsx-runtime");
775
- var defaultRenderLink = ({ children, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("a", { ...props, children });
806
+ var import_jsx_runtime21 = require("react/jsx-runtime");
807
+ var defaultRenderLink = ({ children, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("a", { ...props, children });
776
808
 
777
809
  // src/components/sidebar-nav.tsx
778
- var import_jsx_runtime21 = require("react/jsx-runtime");
810
+ var import_jsx_runtime22 = require("react/jsx-runtime");
779
811
  function defaultIsActive(item, activePath) {
780
812
  if (item.href === "/") return activePath === "/";
781
813
  return activePath === item.href || activePath.startsWith(item.href + "/");
@@ -790,7 +822,7 @@ function SidebarNav({
790
822
  onNavigate
791
823
  }) {
792
824
  const visible = items.filter((item) => !item.adminOnly || isAdmin);
793
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("nav", { className: "flex flex-col gap-1", children: visible.map((item) => {
825
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("nav", { className: "flex flex-col gap-1", children: visible.map((item) => {
794
826
  const active = isActive(item, activePath);
795
827
  const link = renderLink({
796
828
  href: item.href,
@@ -802,19 +834,19 @@ function SidebarNav({
802
834
  active ? "bg-accent text-accent-foreground font-semibold" : "text-muted-foreground hover:bg-accent hover:text-accent-foreground",
803
835
  isCollapsed && "justify-center px-2"
804
836
  ),
805
- children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_jsx_runtime21.Fragment, { children: [
806
- item.icon && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "shrink-0", children: item.icon }),
807
- !isCollapsed && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "truncate", children: item.label })
837
+ children: /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(import_jsx_runtime22.Fragment, { children: [
838
+ item.icon && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: "shrink-0", children: item.icon }),
839
+ !isCollapsed && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: "truncate", children: item.label })
808
840
  ] })
809
841
  });
810
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react4.Fragment, { children: link }, item.href);
842
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_react4.Fragment, { children: link }, item.href);
811
843
  }) });
812
844
  }
813
845
 
814
846
  // src/components/user-menu.tsx
815
847
  var DropdownMenu2 = __toESM(require("@radix-ui/react-dropdown-menu"), 1);
816
- var import_lucide_react3 = require("lucide-react");
817
- var import_jsx_runtime22 = require("react/jsx-runtime");
848
+ var import_lucide_react4 = require("lucide-react");
849
+ var import_jsx_runtime23 = require("react/jsx-runtime");
818
850
  function initials(user) {
819
851
  const source = user?.name?.trim() || user?.email?.trim();
820
852
  if (!source) return "";
@@ -832,44 +864,44 @@ function UserMenu({
832
864
  align = "end"
833
865
  }) {
834
866
  const label = initials(user);
835
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(DropdownMenu2.Root, { children: [
836
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(DropdownMenu2.Trigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
867
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(DropdownMenu2.Root, { children: [
868
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(DropdownMenu2.Trigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
837
869
  "button",
838
870
  {
839
871
  type: "button",
840
872
  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",
841
873
  "aria-label": "Menu do usu\xE1rio",
842
874
  "data-testid": "user-menu",
843
- 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" })
875
+ children: user?.avatarUrl ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("img", { src: user.avatarUrl, alt: user.name ?? user.email ?? "Avatar", className: "h-full w-full object-cover" }) : label ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { children: label }) : /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_lucide_react4.User, { className: "h-4 w-4" })
844
876
  }
845
877
  ) }),
846
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(DropdownMenu2.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
878
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(DropdownMenu2.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
847
879
  DropdownMenu2.Content,
848
880
  {
849
881
  align,
850
882
  sideOffset: 6,
851
883
  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",
852
884
  children: [
853
- (user?.name || user?.email) && /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(import_jsx_runtime22.Fragment, { children: [
854
- /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "px-2 py-1.5", children: [
855
- user.name && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("p", { className: "truncate text-sm font-medium", children: user.name }),
856
- user.email && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("p", { className: "truncate text-xs text-muted-foreground", children: user.email })
885
+ (user?.name || user?.email) && /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_jsx_runtime23.Fragment, { children: [
886
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "px-2 py-1.5", children: [
887
+ user.name && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("p", { className: "truncate text-sm font-medium", children: user.name }),
888
+ user.email && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("p", { className: "truncate text-xs text-muted-foreground", children: user.email })
857
889
  ] }),
858
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(DropdownMenu2.Separator, { className: "-mx-1 my-1 h-px bg-border" })
890
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(DropdownMenu2.Separator, { className: "-mx-1 my-1 h-px bg-border" })
859
891
  ] }),
860
892
  items.map(
861
- (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: [
893
+ (item) => item.href ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(DropdownMenu2.Item, { asChild: true, children: renderLink({ href: item.href, className: itemClass, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_jsx_runtime23.Fragment, { children: [
862
894
  item.icon,
863
895
  item.label
864
- ] }) }) }, item.label) : /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(DropdownMenu2.Item, { className: itemClass, onClick: item.onClick, children: [
896
+ ] }) }) }, item.label) : /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(DropdownMenu2.Item, { className: itemClass, onClick: item.onClick, children: [
865
897
  item.icon,
866
898
  item.label
867
899
  ] }, item.label)
868
900
  ),
869
- onLogout && /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(import_jsx_runtime22.Fragment, { children: [
870
- items.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(DropdownMenu2.Separator, { className: "-mx-1 my-1 h-px bg-border" }),
871
- /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(DropdownMenu2.Item, { className: cn(itemClass, "text-destructive focus:bg-destructive/10"), onClick: onLogout, children: [
872
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_lucide_react3.LogOut, { className: "h-4 w-4" }),
901
+ onLogout && /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_jsx_runtime23.Fragment, { children: [
902
+ items.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(DropdownMenu2.Separator, { className: "-mx-1 my-1 h-px bg-border" }),
903
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(DropdownMenu2.Item, { className: cn(itemClass, "text-destructive focus:bg-destructive/10"), onClick: onLogout, children: [
904
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_lucide_react4.LogOut, { className: "h-4 w-4" }),
873
905
  logoutLabel
874
906
  ] })
875
907
  ] })
@@ -880,7 +912,7 @@ function UserMenu({
880
912
  }
881
913
 
882
914
  // src/components/app-shell.tsx
883
- var import_jsx_runtime23 = require("react/jsx-runtime");
915
+ var import_jsx_runtime24 = require("react/jsx-runtime");
884
916
  function AppShell({
885
917
  brand,
886
918
  brandCollapsed,
@@ -899,7 +931,7 @@ function AppShell({
899
931
  }) {
900
932
  const [collapsed, setCollapsed] = (0, import_react5.useState)(defaultCollapsed);
901
933
  const [mobileOpen, setMobileOpen] = (0, import_react5.useState)(false);
902
- const nav = (isCollapsed, onNavigate) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
934
+ const nav = (isCollapsed, onNavigate) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
903
935
  SidebarNav,
904
936
  {
905
937
  items: navItems,
@@ -911,8 +943,8 @@ function AppShell({
911
943
  onNavigate
912
944
  }
913
945
  );
914
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "flex h-screen overflow-hidden bg-background", children: [
915
- /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
946
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "flex h-screen overflow-hidden bg-background", children: [
947
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
916
948
  "aside",
917
949
  {
918
950
  className: cn(
@@ -920,22 +952,22 @@ function AppShell({
920
952
  collapsed ? "w-16" : "w-60"
921
953
  ),
922
954
  children: [
923
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "flex h-14 shrink-0 items-center border-b px-4", children: collapsed ? brandCollapsed ?? brand : brand }),
924
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "flex-1 overflow-y-auto px-2 py-4", children: nav(collapsed) }),
925
- collapsible && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "border-t p-2", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
955
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "flex h-14 shrink-0 items-center border-b px-4", children: collapsed ? brandCollapsed ?? brand : brand }),
956
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "flex-1 overflow-y-auto px-2 py-4", children: nav(collapsed) }),
957
+ collapsible && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "border-t p-2", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
926
958
  "button",
927
959
  {
928
960
  type: "button",
929
961
  onClick: () => setCollapsed((v) => !v),
930
962
  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",
931
963
  "aria-label": collapsed ? "Expandir menu" : "Recolher menu",
932
- 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" })
964
+ children: collapsed ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_lucide_react5.ChevronRight, { className: "h-4 w-4" }) : /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_lucide_react5.ChevronLeft, { className: "h-4 w-4" })
933
965
  }
934
966
  ) })
935
967
  ]
936
968
  }
937
969
  ),
938
- /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
970
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
939
971
  "div",
940
972
  {
941
973
  className: cn(
@@ -944,8 +976,8 @@ function AppShell({
944
976
  ),
945
977
  onClick: () => setMobileOpen(false),
946
978
  children: [
947
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "absolute inset-0 bg-black/50" }),
948
- /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
979
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "absolute inset-0 bg-black/50" }),
980
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
949
981
  "div",
950
982
  {
951
983
  className: cn(
@@ -954,40 +986,40 @@ function AppShell({
954
986
  ),
955
987
  onClick: (e) => e.stopPropagation(),
956
988
  children: [
957
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "flex h-14 shrink-0 items-center border-b px-4", children: brand }),
958
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "flex-1 overflow-y-auto px-2 py-4", children: nav(false, () => setMobileOpen(false)) })
989
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "flex h-14 shrink-0 items-center border-b px-4", children: brand }),
990
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "flex-1 overflow-y-auto px-2 py-4", children: nav(false, () => setMobileOpen(false)) })
959
991
  ]
960
992
  }
961
993
  )
962
994
  ]
963
995
  }
964
996
  ),
965
- /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "flex flex-1 flex-col overflow-hidden", children: [
966
- /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("header", { className: "flex h-14 shrink-0 items-center gap-2 border-b bg-background px-4", children: [
967
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
997
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "flex flex-1 flex-col overflow-hidden", children: [
998
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("header", { className: "flex h-14 shrink-0 items-center gap-2 border-b bg-background px-4", children: [
999
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
968
1000
  "button",
969
1001
  {
970
1002
  type: "button",
971
1003
  onClick: () => setMobileOpen(true),
972
1004
  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",
973
1005
  "aria-label": "Abrir menu",
974
- children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_lucide_react4.Menu, { className: "h-4 w-4" })
1006
+ children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_lucide_react5.Menu, { className: "h-4 w-4" })
975
1007
  }
976
1008
  ),
977
- /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "ml-auto flex items-center gap-2", children: [
1009
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "ml-auto flex items-center gap-2", children: [
978
1010
  headerActions,
979
- (user || onLogout) && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(UserMenu, { user, items: userMenuItems, onLogout, renderLink })
1011
+ (user || onLogout) && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(UserMenu, { user, items: userMenuItems, onLogout, renderLink })
980
1012
  ] })
981
1013
  ] }),
982
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("main", { className: "flex-1 overflow-y-auto", children })
1014
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("main", { className: "flex-1 overflow-y-auto", children })
983
1015
  ] })
984
1016
  ] });
985
1017
  }
986
1018
 
987
1019
  // src/components/row-actions-menu.tsx
988
1020
  var DropdownMenu3 = __toESM(require("@radix-ui/react-dropdown-menu"), 1);
989
- var import_lucide_react5 = require("lucide-react");
990
- var import_jsx_runtime24 = require("react/jsx-runtime");
1021
+ var import_lucide_react6 = require("lucide-react");
1022
+ var import_jsx_runtime25 = require("react/jsx-runtime");
991
1023
  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";
992
1024
  function RowActionsMenu({
993
1025
  actions,
@@ -997,18 +1029,18 @@ function RowActionsMenu({
997
1029
  renderLink = defaultRenderLink
998
1030
  }) {
999
1031
  if (actions.length === 0) return null;
1000
- return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(DropdownMenu3.Root, { children: [
1001
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(DropdownMenu3.Trigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
1032
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(DropdownMenu3.Root, { children: [
1033
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(DropdownMenu3.Trigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
1002
1034
  "button",
1003
1035
  {
1004
1036
  type: "button",
1005
1037
  disabled,
1006
1038
  "aria-label": label,
1007
1039
  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",
1008
- children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_lucide_react5.MoreVertical, { className: "h-4 w-4" })
1040
+ children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_lucide_react6.MoreVertical, { className: "h-4 w-4" })
1009
1041
  }
1010
1042
  ) }),
1011
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(DropdownMenu3.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
1043
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(DropdownMenu3.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
1012
1044
  DropdownMenu3.Content,
1013
1045
  {
1014
1046
  align,
@@ -1016,14 +1048,14 @@ function RowActionsMenu({
1016
1048
  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",
1017
1049
  children: actions.map((action) => {
1018
1050
  const cls = cn(itemClass2, action.destructive && "text-destructive focus:bg-destructive/10");
1019
- return action.href ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(DropdownMenu3.Item, { asChild: true, disabled: action.disabled, children: renderLink({
1051
+ return action.href ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(DropdownMenu3.Item, { asChild: true, disabled: action.disabled, children: renderLink({
1020
1052
  href: action.href,
1021
1053
  className: cls,
1022
- children: /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_jsx_runtime24.Fragment, { children: [
1054
+ children: /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_jsx_runtime25.Fragment, { children: [
1023
1055
  action.icon,
1024
1056
  action.label
1025
1057
  ] })
1026
- }) }, action.label) : /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
1058
+ }) }, action.label) : /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
1027
1059
  DropdownMenu3.Item,
1028
1060
  {
1029
1061
  className: cls,
@@ -1100,6 +1132,7 @@ function useCustomToast() {
1100
1132
  ModeToggle,
1101
1133
  PageHeader,
1102
1134
  Pagination,
1135
+ PasswordInput,
1103
1136
  ProgressBar,
1104
1137
  ResponsiveDataView,
1105
1138
  RowActionsMenu,