@niledatabase/react 3.0.0-alpha.3 → 3.0.0-alpha.31
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.mts +67 -0
- package/dist/index.d.ts +66 -10
- package/dist/index.js +2983 -5
- package/dist/index.mjs +2945 -0
- package/package.json +38 -25
- package/dist/GoogleLoginButton/GoogleLoginButton.d.ts +0 -10
- package/dist/GoogleLoginButton/GoogleLoginButton.stories.d.ts +0 -11
- package/dist/GoogleLoginButton/index.d.ts +0 -1
- package/dist/SignInForm/SignInForm.d.ts +0 -3
- package/dist/SignInForm/UserLoginForm.stories.d.ts +0 -5
- package/dist/SignInForm/index.d.ts +0 -1
- package/dist/SignInForm/types.d.ts +0 -15
- package/dist/SignUpForm/NewUserSignUp.stories.d.ts +0 -5
- package/dist/SignUpForm/SignUpForm.d.ts +0 -3
- package/dist/SignUpForm/index.d.ts +0 -1
- package/dist/SignUpForm/types.d.ts +0 -13
- package/dist/UserTenantList/CreateUser.d.ts +0 -8
- package/dist/UserTenantList/UserList.d.ts +0 -17
- package/dist/UserTenantList/UserList.stories.d.ts +0 -5
- package/dist/UserTenantList/UserModal.d.ts +0 -7
- package/dist/UserTenantList/index.d.ts +0 -1
- package/dist/UserTenantList/useDataParser.d.ts +0 -4
- package/dist/context/index.d.ts +0 -9
- package/dist/context/theme.d.ts +0 -7
- package/dist/context/types.d.ts +0 -22
- package/dist/hooks/useResults.d.ts +0 -22
- package/dist/hooks/useTextSizer.d.ts +0 -1
- package/dist/lib/SimpleForm/CheckGroup/index.d.ts +0 -10
- package/dist/lib/SimpleForm/index.d.ts +0 -11
- package/dist/lib/SimpleForm/types.d.ts +0 -37
- package/dist/react.cjs.development.js +0 -938
- package/dist/react.cjs.development.js.map +0 -1
- package/dist/react.cjs.production.min.js +0 -2
- package/dist/react.cjs.production.min.js.map +0 -1
- package/dist/react.esm.d.ts +0 -11
- package/dist/react.esm.js +0 -906
- package/dist/react.esm.js.map +0 -1
- package/dist/utils/getColumnSize.d.ts +0 -2
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import React__default from 'react';
|
|
3
|
+
import * as class_variance_authority_dist_types from 'class-variance-authority/dist/types';
|
|
4
|
+
import { VariantProps } from 'class-variance-authority';
|
|
5
|
+
import { CreateBasicUserRequest } from '@niledatabase/browser';
|
|
6
|
+
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
7
|
+
import { QueryClient } from '@tanstack/react-query';
|
|
8
|
+
import * as next_auth_react from 'next-auth/react';
|
|
9
|
+
export * from 'next-auth/react';
|
|
10
|
+
|
|
11
|
+
declare const buttonVariants: (props?: ({
|
|
12
|
+
variant?: "default" | "destructive" | "outline" | "secondary" | "ghost" | "link" | null | undefined;
|
|
13
|
+
size?: "default" | "sm" | "lg" | "icon" | null | undefined;
|
|
14
|
+
} & class_variance_authority_dist_types.ClassProp) | undefined) => string;
|
|
15
|
+
interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
16
|
+
asChild?: boolean;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* A component for a Google login button, according to their design language.
|
|
21
|
+
* This works when an identity provider is configured in the admin dashboard.
|
|
22
|
+
* @param props href: a string to override the URL provided by the context
|
|
23
|
+
* @returns a JSX.Element to render
|
|
24
|
+
*/
|
|
25
|
+
declare const GoogleSSOButton: React__default.ForwardRefExoticComponent<ButtonProps & {
|
|
26
|
+
callbackUrl: string;
|
|
27
|
+
} & React__default.RefAttributes<HTMLButtonElement>>;
|
|
28
|
+
|
|
29
|
+
type SignUpInfo = CreateBasicUserRequest & {
|
|
30
|
+
tenantId?: string;
|
|
31
|
+
};
|
|
32
|
+
type SignInSuccess = (response: Response, formValues: SignUpInfo) => void;
|
|
33
|
+
type AllowedAny$1 = any;
|
|
34
|
+
interface Props$1 {
|
|
35
|
+
onSuccess: SignInSuccess;
|
|
36
|
+
onError?: (e: Error, info: SignUpInfo) => void;
|
|
37
|
+
beforeMutate?: (data: AllowedAny$1) => AllowedAny$1;
|
|
38
|
+
buttonText?: string;
|
|
39
|
+
client?: QueryClient;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
declare function SigningUp(props: Props$1): React__default.JSX.Element;
|
|
43
|
+
|
|
44
|
+
declare function useSignUp<T extends SignUpInfo>(params: Props$1): _tanstack_react_query.UseMutateFunction<Response, Error, SignUpInfo, unknown>;
|
|
45
|
+
|
|
46
|
+
type AllowedAny = any;
|
|
47
|
+
type LoginInfo = {
|
|
48
|
+
email: string;
|
|
49
|
+
password: string;
|
|
50
|
+
};
|
|
51
|
+
type LoginSuccess = (response: AllowedAny, formValues: LoginInfo, ...args: AllowedAny) => void;
|
|
52
|
+
interface Props {
|
|
53
|
+
beforeMutate?: (data: AllowedAny) => AllowedAny;
|
|
54
|
+
onSuccess?: LoginSuccess;
|
|
55
|
+
onError?: (error: Error, data: AllowedAny) => void;
|
|
56
|
+
callbackUrl?: string;
|
|
57
|
+
client?: QueryClient;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
declare function SigningIn(props: Props): React__default.JSX.Element;
|
|
61
|
+
|
|
62
|
+
declare function useSignIn(params?: Props): _tanstack_react_query.UseMutateFunction<next_auth_react.SignInResponse | undefined, Error, LoginInfo, any>;
|
|
63
|
+
|
|
64
|
+
declare const Email: () => React.JSX.Element;
|
|
65
|
+
declare const Password: () => React.JSX.Element;
|
|
66
|
+
|
|
67
|
+
export { Email, GoogleSSOButton as Google, Password, SigningIn as SignInForm, SigningUp as SignUpForm, useSignIn, useSignUp };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,67 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
export { default as UserTenantList } from './UserTenantList';
|
|
10
|
-
export { Attribute as FormAttribute, AttributeType as FormAttributeType, } from './lib/SimpleForm/types';
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import React__default from 'react';
|
|
3
|
+
import * as class_variance_authority_dist_types from 'class-variance-authority/dist/types';
|
|
4
|
+
import { VariantProps } from 'class-variance-authority';
|
|
5
|
+
import { CreateBasicUserRequest } from '@niledatabase/browser';
|
|
6
|
+
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
7
|
+
import { QueryClient } from '@tanstack/react-query';
|
|
8
|
+
import * as next_auth_react from 'next-auth/react';
|
|
11
9
|
export * from 'next-auth/react';
|
|
10
|
+
|
|
11
|
+
declare const buttonVariants: (props?: ({
|
|
12
|
+
variant?: "default" | "destructive" | "outline" | "secondary" | "ghost" | "link" | null | undefined;
|
|
13
|
+
size?: "default" | "sm" | "lg" | "icon" | null | undefined;
|
|
14
|
+
} & class_variance_authority_dist_types.ClassProp) | undefined) => string;
|
|
15
|
+
interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
16
|
+
asChild?: boolean;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* A component for a Google login button, according to their design language.
|
|
21
|
+
* This works when an identity provider is configured in the admin dashboard.
|
|
22
|
+
* @param props href: a string to override the URL provided by the context
|
|
23
|
+
* @returns a JSX.Element to render
|
|
24
|
+
*/
|
|
25
|
+
declare const GoogleSSOButton: React__default.ForwardRefExoticComponent<ButtonProps & {
|
|
26
|
+
callbackUrl: string;
|
|
27
|
+
} & React__default.RefAttributes<HTMLButtonElement>>;
|
|
28
|
+
|
|
29
|
+
type SignUpInfo = CreateBasicUserRequest & {
|
|
30
|
+
tenantId?: string;
|
|
31
|
+
};
|
|
32
|
+
type SignInSuccess = (response: Response, formValues: SignUpInfo) => void;
|
|
33
|
+
type AllowedAny$1 = any;
|
|
34
|
+
interface Props$1 {
|
|
35
|
+
onSuccess: SignInSuccess;
|
|
36
|
+
onError?: (e: Error, info: SignUpInfo) => void;
|
|
37
|
+
beforeMutate?: (data: AllowedAny$1) => AllowedAny$1;
|
|
38
|
+
buttonText?: string;
|
|
39
|
+
client?: QueryClient;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
declare function SigningUp(props: Props$1): React__default.JSX.Element;
|
|
43
|
+
|
|
44
|
+
declare function useSignUp<T extends SignUpInfo>(params: Props$1): _tanstack_react_query.UseMutateFunction<Response, Error, SignUpInfo, unknown>;
|
|
45
|
+
|
|
46
|
+
type AllowedAny = any;
|
|
47
|
+
type LoginInfo = {
|
|
48
|
+
email: string;
|
|
49
|
+
password: string;
|
|
50
|
+
};
|
|
51
|
+
type LoginSuccess = (response: AllowedAny, formValues: LoginInfo, ...args: AllowedAny) => void;
|
|
52
|
+
interface Props {
|
|
53
|
+
beforeMutate?: (data: AllowedAny) => AllowedAny;
|
|
54
|
+
onSuccess?: LoginSuccess;
|
|
55
|
+
onError?: (error: Error, data: AllowedAny) => void;
|
|
56
|
+
callbackUrl?: string;
|
|
57
|
+
client?: QueryClient;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
declare function SigningIn(props: Props): React__default.JSX.Element;
|
|
61
|
+
|
|
62
|
+
declare function useSignIn(params?: Props): _tanstack_react_query.UseMutateFunction<next_auth_react.SignInResponse | undefined, Error, LoginInfo, any>;
|
|
63
|
+
|
|
64
|
+
declare const Email: () => React.JSX.Element;
|
|
65
|
+
declare const Password: () => React.JSX.Element;
|
|
66
|
+
|
|
67
|
+
export { Email, GoogleSSOButton as Google, Password, SigningIn as SignInForm, SigningUp as SignUpForm, useSignIn, useSignUp };
|