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