@yusr_systems/ui 3.1.3 → 3.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -863,11 +863,15 @@ declare interface Props_2 {
863
863
  permissions: ResourcePermissions;
864
864
  }
865
865
 
866
- export declare function ProtectedRoute({ isAuthenticated, loginPath }: ProtectedRouteProps): JSX.Element;
866
+ export declare function ProtectedRoute({ isAuthenticated, children, fallback, onUnauthenticated, }: ProtectedRouteProps): JSX.Element;
867
867
 
868
868
  declare interface ProtectedRouteProps {
869
869
  isAuthenticated: boolean;
870
- loginPath?: string;
870
+ children: default_2.ReactNode;
871
+ /** Optional: What to show while redirecting (e.g., a loader or "Access Denied") */
872
+ fallback?: default_2.ReactNode;
873
+ /** Optional: Function to trigger the redirect based on your framework */
874
+ onUnauthenticated?: () => void;
871
875
  }
872
876
 
873
877
  export declare function SaveButton<T extends BaseEntity>({ formData, dialogMode, service, disable, onSuccess, validate }: SaveButtonProps<T>): JSX.Element;
@@ -1041,13 +1045,14 @@ export declare interface SidebarLogoProps {
1041
1045
  alt?: string;
1042
1046
  }
1043
1047
 
1044
- export declare function SideBarMainMenu({ items }: {
1048
+ export declare function SideBarMainMenu({ items, LinkComponent, }: {
1045
1049
  items: {
1046
1050
  title: string;
1047
1051
  url: string;
1048
1052
  icon?: React.ReactNode;
1049
1053
  hasAuth: boolean;
1050
1054
  }[];
1055
+ LinkComponent?: React.ElementType;
1051
1056
  }): JSX.Element;
1052
1057
 
1053
1058
  export declare function SidebarMenu({ className, ...props }: React_2.ComponentProps<"ul">): JSX.Element;