@greatapps/greatauth-ui 0.1.0 → 0.1.4
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 +60 -11
- package/dist/index.js +1290 -1
- package/dist/index.js.map +1 -1
- package/dist/middleware.d.ts +12 -0
- package/dist/middleware.js +27 -0
- package/dist/middleware.js.map +1 -0
- package/package.json +15 -4
- package/src/components/app-header.tsx +55 -0
- package/src/components/app-shell.tsx +33 -0
- package/src/components/app-sidebar.tsx +185 -0
- package/src/components/index.ts +5 -0
- package/src/components/login-form.tsx +122 -0
- package/src/components/theme-toggle.tsx +21 -0
- package/src/components/ui/alert.tsx +72 -0
- package/src/components/ui/avatar.tsx +109 -0
- package/src/components/ui/badge.tsx +45 -0
- package/src/components/ui/breadcrumb.tsx +121 -0
- package/src/components/ui/button.tsx +60 -0
- package/src/components/ui/card.tsx +94 -0
- package/src/components/ui/collapsible.tsx +34 -0
- package/src/components/ui/dropdown-menu.tsx +261 -0
- package/src/components/ui/input.tsx +19 -0
- package/src/components/ui/label.tsx +24 -0
- package/src/components/ui/separator.tsx +28 -0
- package/src/components/ui/sheet.tsx +133 -0
- package/src/components/ui/sidebar.tsx +701 -0
- package/src/components/ui/skeleton.tsx +15 -0
- package/src/components/ui/tooltip.tsx +57 -0
- package/src/hooks/use-mobile.ts +19 -0
- package/src/index.ts +11 -0
- package/src/middleware.ts +2 -0
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,15 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
1
2
|
import { ReactNode, ComponentType } from 'react';
|
|
2
3
|
import * as nanostores from 'nanostores';
|
|
3
4
|
import * as _better_fetch_fetch from '@better-fetch/fetch';
|
|
4
5
|
import * as better_auth from 'better-auth';
|
|
5
|
-
|
|
6
|
+
export { AuthMiddlewareConfig, authMiddlewareConfig, createAuthMiddleware } from './middleware.js';
|
|
7
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
8
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
9
|
+
import { VariantProps } from 'class-variance-authority';
|
|
10
|
+
import { Tooltip } from 'radix-ui';
|
|
6
11
|
import { ClassValue } from 'clsx';
|
|
12
|
+
import 'next/server';
|
|
7
13
|
|
|
8
14
|
interface AppShellConfig {
|
|
9
15
|
appName: string;
|
|
@@ -1037,15 +1043,6 @@ declare const signOut: <FetchOptions extends better_auth.ClientFetchOption<never
|
|
|
1037
1043
|
message?: string | undefined;
|
|
1038
1044
|
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
1039
1045
|
|
|
1040
|
-
interface AuthMiddlewareConfig {
|
|
1041
|
-
publicPaths: string[];
|
|
1042
|
-
preserveSearchParams?: boolean;
|
|
1043
|
-
}
|
|
1044
|
-
declare function createAuthMiddleware(config: AuthMiddlewareConfig): (request: NextRequest) => NextResponse<unknown>;
|
|
1045
|
-
declare const authMiddlewareConfig: {
|
|
1046
|
-
matcher: string[];
|
|
1047
|
-
};
|
|
1048
|
-
|
|
1049
1046
|
interface JwtClaimsConfig {
|
|
1050
1047
|
[jwtClaimName: string]: string;
|
|
1051
1048
|
}
|
|
@@ -1056,6 +1053,58 @@ interface UseAuthConfig {
|
|
|
1056
1053
|
}
|
|
1057
1054
|
declare function createUseAuth(config?: UseAuthConfig): () => Record<string, unknown>;
|
|
1058
1055
|
|
|
1056
|
+
interface AppShellProps {
|
|
1057
|
+
config: AppShellConfig;
|
|
1058
|
+
children: ReactNode;
|
|
1059
|
+
renderAbove?: ReactNode;
|
|
1060
|
+
}
|
|
1061
|
+
declare function AppShell({ config, children, renderAbove }: AppShellProps): react_jsx_runtime.JSX.Element;
|
|
1062
|
+
|
|
1063
|
+
interface AppSidebarProps {
|
|
1064
|
+
config: AppShellConfig;
|
|
1065
|
+
}
|
|
1066
|
+
declare function AppSidebar({ config }: AppSidebarProps): react_jsx_runtime.JSX.Element;
|
|
1067
|
+
|
|
1068
|
+
interface AppHeaderProps {
|
|
1069
|
+
config: AppShellConfig;
|
|
1070
|
+
}
|
|
1071
|
+
declare function AppHeader({ config }: AppHeaderProps): react_jsx_runtime.JSX.Element;
|
|
1072
|
+
|
|
1073
|
+
interface LoginFormProps {
|
|
1074
|
+
config: LoginFormConfig;
|
|
1075
|
+
}
|
|
1076
|
+
declare function LoginForm({ config }: LoginFormProps): react_jsx_runtime.JSX.Element;
|
|
1077
|
+
|
|
1078
|
+
declare function ThemeToggle(): react_jsx_runtime.JSX.Element;
|
|
1079
|
+
|
|
1080
|
+
declare const buttonVariants: (props?: ({
|
|
1081
|
+
variant?: "destructive" | "outline" | "default" | "link" | "secondary" | "ghost" | null | undefined;
|
|
1082
|
+
size?: "default" | "xs" | "sm" | "lg" | "icon" | "icon-xs" | "icon-sm" | "icon-lg" | null | undefined;
|
|
1083
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
1084
|
+
declare function Button({ className, variant, size, asChild, ...props }: React.ComponentProps<"button"> & VariantProps<typeof buttonVariants> & {
|
|
1085
|
+
asChild?: boolean;
|
|
1086
|
+
}): react_jsx_runtime.JSX.Element;
|
|
1087
|
+
|
|
1088
|
+
declare function TooltipProvider({ delayDuration, ...props }: React.ComponentProps<typeof Tooltip.Provider>): react_jsx_runtime.JSX.Element;
|
|
1089
|
+
|
|
1090
|
+
type SidebarContextProps = {
|
|
1091
|
+
state: "expanded" | "collapsed";
|
|
1092
|
+
open: boolean;
|
|
1093
|
+
setOpen: (open: boolean) => void;
|
|
1094
|
+
openMobile: boolean;
|
|
1095
|
+
setOpenMobile: (open: boolean) => void;
|
|
1096
|
+
isMobile: boolean;
|
|
1097
|
+
toggleSidebar: () => void;
|
|
1098
|
+
};
|
|
1099
|
+
declare function useSidebar(): SidebarContextProps;
|
|
1100
|
+
declare function SidebarProvider({ defaultOpen, open: openProp, onOpenChange: setOpenProp, className, style, children, ...props }: React.ComponentProps<"div"> & {
|
|
1101
|
+
defaultOpen?: boolean;
|
|
1102
|
+
open?: boolean;
|
|
1103
|
+
onOpenChange?: (open: boolean) => void;
|
|
1104
|
+
}): react_jsx_runtime.JSX.Element;
|
|
1105
|
+
declare function SidebarTrigger({ className, onClick, ...props }: React.ComponentProps<typeof Button>): react_jsx_runtime.JSX.Element;
|
|
1106
|
+
declare function SidebarInset({ className, ...props }: React.ComponentProps<"main">): react_jsx_runtime.JSX.Element;
|
|
1107
|
+
|
|
1059
1108
|
declare function cn(...inputs: ClassValue[]): string;
|
|
1060
1109
|
|
|
1061
|
-
export {
|
|
1110
|
+
export { AppHeader, AppShell, type AppShellConfig, AppSidebar, type HeaderConfig, LoginForm, type LoginFormConfig, type MenuGroup, type MenuItem, SidebarInset, SidebarProvider, SidebarTrigger, ThemeToggle, TooltipProvider, authClient, cn, createUseAuth, signIn, signOut, signUp, useSession, useSidebar };
|