@yusr_systems/ui 6.0.2 → 6.0.3

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
@@ -219,7 +219,7 @@ declare type CarouselProps = {
219
219
  setApi?: (api: CarouselApi) => void;
220
220
  };
221
221
 
222
- export declare function ChangeDialog<T extends BaseEntity>({ title, description, className, formData, dialogMode, service, disable, onSuccess, validate, children, }: ChangeDialogProps<T>): JSX.Element;
222
+ export declare function ChangeDialog<T extends BaseEntity>({ title, description, className, formData, dialogMode, service, disable, onSuccess, validate, children }: ChangeDialogProps<T>): JSX.Element;
223
223
 
224
224
  export declare interface ChangeDialogProps<T extends BaseEntity> extends SaveButtonProps<T>, PropsWithChildren {
225
225
  title: string;
@@ -863,15 +863,11 @@ declare interface Props_2 {
863
863
  permissions: ResourcePermissions;
864
864
  }
865
865
 
866
- export declare function ProtectedRoute({ isAuthenticated, children, fallback, onUnauthenticated, }: ProtectedRouteProps): JSX.Element;
866
+ export declare function ProtectedRoute({ isAuthenticated, loginPath }: ProtectedRouteProps): JSX.Element;
867
867
 
868
868
  declare interface ProtectedRouteProps {
869
869
  isAuthenticated: boolean;
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;
870
+ loginPath?: string;
875
871
  }
876
872
 
877
873
  export declare function SaveButton<T extends BaseEntity>({ formData, dialogMode, service, disable, onSuccess, validate }: SaveButtonProps<T>): JSX.Element;
@@ -1045,14 +1041,13 @@ export declare interface SidebarLogoProps {
1045
1041
  alt?: string;
1046
1042
  }
1047
1043
 
1048
- export declare function SideBarMainMenu({ items, LinkComponent, }: {
1044
+ export declare function SideBarMainMenu({ items }: {
1049
1045
  items: {
1050
1046
  title: string;
1051
1047
  url: string;
1052
1048
  icon?: React.ReactNode;
1053
1049
  hasAuth: boolean;
1054
1050
  }[];
1055
- LinkComponent?: React.ElementType;
1056
1051
  }): JSX.Element;
1057
1052
 
1058
1053
  export declare function SidebarMenu({ className, ...props }: React_2.ComponentProps<"ul">): JSX.Element;
@@ -1368,8 +1363,6 @@ export declare type YusrSidBarProps = {
1368
1363
  * @param {YusrSidBarMainMenuProps["items"]} [navMain] The main navigation items for the sidebar.
1369
1364
  * @param {YusrSidBarMainMenuProps["items"]} [navSecondary] The secondary navigation items for the sidebar.
1370
1365
  * @param {React.ReactNode} [children] The children of the sidebar component.
1371
- *
1372
- * for more details about, read the documentation [here](https://yusrsystems.github.io/yusr-ui-docs/docs/Templates/yusr-sidebar/)
1373
1366
  */
1374
1367
  export declare function YusrSideBar({ LinkComponent, logos, displayCompany, navMain, navSecondary, children, ...props }: React.ComponentProps<typeof Sidebar> & YusrSidBarProps & PropsWithChildren): JSX.Element;
1375
1368