@tempots/beatui 0.10.0 → 0.12.0
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/beatui.css +1 -1
- package/dist/de-O2DMrfiH.js +37 -0
- package/dist/es-CsNVN5AY.js +37 -0
- package/dist/fr-CJjx2YoL.js +37 -0
- package/dist/index.es.js +4844 -2927
- package/dist/index.umd.js +52 -52
- package/dist/it-BKzoVost.js +37 -0
- package/dist/ja-ZBFmK5Uj.js +37 -0
- package/dist/pt-DumIX3mi.js +37 -0
- package/dist/ru-_EKfu_bO.js +37 -0
- package/dist/types/auth-i18n/default.d.ts +30 -0
- package/dist/types/auth-i18n/index.d.ts +2 -0
- package/dist/types/auth-i18n/locales/de.d.ts +29 -0
- package/dist/types/auth-i18n/locales/en.d.ts +29 -0
- package/dist/types/auth-i18n/locales/es.d.ts +29 -0
- package/dist/types/auth-i18n/locales/fr.d.ts +29 -0
- package/dist/types/auth-i18n/locales/it.d.ts +29 -0
- package/dist/types/auth-i18n/locales/ja.d.ts +29 -0
- package/dist/types/auth-i18n/locales/pt.d.ts +29 -0
- package/dist/types/auth-i18n/locales/ru.d.ts +29 -0
- package/dist/types/auth-i18n/locales/zh.d.ts +29 -0
- package/dist/types/auth-i18n/translations.d.ts +28 -0
- package/dist/types/components/auth/auth-container.d.ts +10 -0
- package/dist/types/components/auth/auth-divider.d.ts +8 -0
- package/dist/types/components/auth/index.d.ts +10 -0
- package/dist/types/components/auth/password-strength-indicator.d.ts +5 -0
- package/dist/types/components/auth/reset-password-form.d.ts +3 -0
- package/dist/types/components/auth/schemas.d.ts +36 -0
- package/dist/types/components/auth/signin-form.d.ts +3 -0
- package/dist/types/components/auth/signup-form.d.ts +3 -0
- package/dist/types/components/auth/social-login-button.d.ts +47 -0
- package/dist/types/components/auth/types.d.ts +171 -0
- package/dist/types/components/auth/utils.d.ts +23 -0
- package/dist/types/components/beatui.d.ts +4 -1
- package/dist/types/components/button/button.d.ts +1 -1
- package/dist/types/components/form/input/input-container.d.ts +2 -1
- package/dist/types/components/form/schema/custom-validation.d.ts +75 -0
- package/dist/types/components/form/schema/index.d.ts +1 -0
- package/dist/types/components/navigation/sidebar/sidebar-group.d.ts +2 -1
- package/dist/types/components/navigation/sidebar/sidebar-link.d.ts +3 -0
- package/dist/types/components/theme/types.d.ts +1 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/zh-DEZH0fdq.js +37 -0
- package/package.json +3 -4
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
import { TNode, Value } from '@tempots/dom';
|
|
2
|
+
import { ControlSize } from '../theme';
|
|
3
|
+
import { ThemeColorName } from '@/tokens';
|
|
4
|
+
import { AuthProviderInfo } from './social-login-button';
|
|
5
|
+
export type AuthProviderName = 'google' | 'github' | 'apple' | 'facebook' | 'twitter' | 'x' | 'microsoft' | 'discord' | 'linkedin' | 'instagram' | 'tiktok' | 'snapchat' | 'reddit' | 'pinterest' | 'twitch' | 'steam' | 'epic' | 'playstation' | 'xbox' | 'whatsapp' | 'wechat' | 'amazon' | 'yahoo' | 'paypal';
|
|
6
|
+
export type AuthMode = 'signin' | 'signup' | 'reset-password';
|
|
7
|
+
export type SocialLoginFlow = 'redirect' | 'popup';
|
|
8
|
+
export type PasswordStrength = 'weak' | 'fair' | 'good' | 'strong';
|
|
9
|
+
export interface SignInData {
|
|
10
|
+
email: string;
|
|
11
|
+
password: string;
|
|
12
|
+
rememberMe?: boolean;
|
|
13
|
+
}
|
|
14
|
+
export interface SignUpData {
|
|
15
|
+
name?: string;
|
|
16
|
+
email: string;
|
|
17
|
+
password: string;
|
|
18
|
+
confirmPassword: string;
|
|
19
|
+
acceptTerms: boolean;
|
|
20
|
+
}
|
|
21
|
+
export interface ResetPasswordData {
|
|
22
|
+
email: string;
|
|
23
|
+
}
|
|
24
|
+
export interface SocialProviderConfig<T> {
|
|
25
|
+
provider: AuthProviderName;
|
|
26
|
+
clientId?: string;
|
|
27
|
+
flow?: SocialLoginFlow;
|
|
28
|
+
scopes?: string[];
|
|
29
|
+
customParams?: Record<string, string>;
|
|
30
|
+
onSuccess?: (result: T) => Promise<void> | void;
|
|
31
|
+
onError?: (error: Error) => Promise<void> | void;
|
|
32
|
+
}
|
|
33
|
+
export interface PasswordRules {
|
|
34
|
+
minLength?: number;
|
|
35
|
+
requireUppercase?: boolean;
|
|
36
|
+
requireLowercase?: boolean;
|
|
37
|
+
requireNumbers?: boolean;
|
|
38
|
+
requireSymbols?: boolean;
|
|
39
|
+
customValidation?: (password: string) => string | null;
|
|
40
|
+
}
|
|
41
|
+
export interface AuthContainerOptions {
|
|
42
|
+
mode?: Value<AuthMode>;
|
|
43
|
+
className?: Value<string>;
|
|
44
|
+
socialProviders?: Value<AuthProviderInfo[]>;
|
|
45
|
+
passwordRules?: PasswordRules;
|
|
46
|
+
showRememberMe?: Value<boolean>;
|
|
47
|
+
showSocialDivider?: Value<boolean>;
|
|
48
|
+
allowSignUp?: Value<boolean>;
|
|
49
|
+
allowPasswordReset?: Value<boolean>;
|
|
50
|
+
showPasswordStrength?: Value<boolean>;
|
|
51
|
+
labels?: {
|
|
52
|
+
signInTitle?: () => string;
|
|
53
|
+
emailLabel?: () => string;
|
|
54
|
+
passwordLabel?: () => string;
|
|
55
|
+
rememberMeLabel?: () => string;
|
|
56
|
+
loading?: () => string;
|
|
57
|
+
signInButton?: () => string;
|
|
58
|
+
forgotPasswordLink?: () => string;
|
|
59
|
+
noAccountLink?: () => string;
|
|
60
|
+
acceptTermsLabel?: () => string;
|
|
61
|
+
confirmPasswordLabel?: () => string;
|
|
62
|
+
signUpTitle?: () => string;
|
|
63
|
+
signUpButton?: () => string;
|
|
64
|
+
nameLabel?: () => string;
|
|
65
|
+
hasAccountLink?: () => string;
|
|
66
|
+
resetPasswordTitle?: () => string;
|
|
67
|
+
resetPasswordButton?: () => string;
|
|
68
|
+
resetPasswordDescription?: () => string;
|
|
69
|
+
backToSignInLink?: () => string;
|
|
70
|
+
};
|
|
71
|
+
onSignIn?: (data: SignInData) => Promise<void>;
|
|
72
|
+
onSignUp?: (data: SignUpData) => Promise<void>;
|
|
73
|
+
onResetPassword?: (data: ResetPasswordData) => Promise<void>;
|
|
74
|
+
onModeChange?: (mode: AuthMode) => void;
|
|
75
|
+
onSocialLogin?: (provider: AuthProviderName) => Promise<void>;
|
|
76
|
+
onSubmitSignIn?: (data: SignInData) => Promise<void>;
|
|
77
|
+
onSubmitSignUp?: (data: SignUpData) => Promise<void>;
|
|
78
|
+
onSubmitResetPassword?: (data: ResetPasswordData) => Promise<void>;
|
|
79
|
+
}
|
|
80
|
+
export interface SignInFormOptions {
|
|
81
|
+
onSubmit?: (data: SignInData) => Promise<void>;
|
|
82
|
+
onModeChange?: (mode: AuthMode) => void;
|
|
83
|
+
onSignIn?: (data: SignInData) => Promise<void>;
|
|
84
|
+
onSocialLogin?: (provider: AuthProviderName) => Promise<void>;
|
|
85
|
+
loading?: Value<boolean>;
|
|
86
|
+
error?: Value<string | null>;
|
|
87
|
+
passwordRules?: PasswordRules;
|
|
88
|
+
labels?: {
|
|
89
|
+
signInTitle?: () => string;
|
|
90
|
+
emailLabel?: () => string;
|
|
91
|
+
passwordLabel?: () => string;
|
|
92
|
+
rememberMeLabel?: () => string;
|
|
93
|
+
loading?: () => string;
|
|
94
|
+
signInButton?: () => string;
|
|
95
|
+
forgotPasswordLink?: () => string;
|
|
96
|
+
noAccountLink?: () => string;
|
|
97
|
+
};
|
|
98
|
+
socialProviders?: Value<SocialProviderConfig<unknown>[]>;
|
|
99
|
+
showSocialDivider?: Value<boolean>;
|
|
100
|
+
showRememberMe?: Value<boolean>;
|
|
101
|
+
allowPasswordReset?: Value<boolean>;
|
|
102
|
+
allowSignUp?: Value<boolean>;
|
|
103
|
+
}
|
|
104
|
+
export interface SignUpFormOptions {
|
|
105
|
+
onSubmit?: (data: SignUpData) => Promise<void>;
|
|
106
|
+
onModeChange?: (mode: AuthMode) => void;
|
|
107
|
+
loading?: Value<boolean>;
|
|
108
|
+
error?: Value<string | null>;
|
|
109
|
+
passwordRules?: PasswordRules;
|
|
110
|
+
labels?: {
|
|
111
|
+
signUpTitle?: () => string;
|
|
112
|
+
nameLabel?: () => string;
|
|
113
|
+
emailLabel?: () => string;
|
|
114
|
+
passwordLabel?: () => string;
|
|
115
|
+
confirmPasswordLabel?: () => string;
|
|
116
|
+
acceptTermsLabel?: () => string;
|
|
117
|
+
loading?: () => string;
|
|
118
|
+
signUpButton?: () => string;
|
|
119
|
+
hasAccountLink?: () => string;
|
|
120
|
+
};
|
|
121
|
+
socialProviders?: Value<AuthProviderInfo[]>;
|
|
122
|
+
showSocialDivider?: Value<boolean>;
|
|
123
|
+
showPasswordStrength?: Value<boolean>;
|
|
124
|
+
onSignUp?: (data: SignUpData) => Promise<void>;
|
|
125
|
+
onSocialLogin?: (provider: AuthProviderName) => Promise<void>;
|
|
126
|
+
showAlreadyHaveAccountLink?: Value<boolean>;
|
|
127
|
+
showNameField?: Value<boolean>;
|
|
128
|
+
showConfirmPassword?: Value<boolean>;
|
|
129
|
+
showAcceptTermsAndConditions?: Value<boolean>;
|
|
130
|
+
termsAndConditions?: TNode;
|
|
131
|
+
}
|
|
132
|
+
export interface ResetPasswordFormOptions {
|
|
133
|
+
onSubmit?: (data: ResetPasswordData) => Promise<void>;
|
|
134
|
+
onModeChange?: (mode: AuthMode) => void;
|
|
135
|
+
onResetPassword?: (data: ResetPasswordData) => Promise<void>;
|
|
136
|
+
loading?: Value<boolean>;
|
|
137
|
+
error?: Value<string | null>;
|
|
138
|
+
labels?: {
|
|
139
|
+
resetPasswordTitle?: () => string;
|
|
140
|
+
resetPasswordButton?: () => string;
|
|
141
|
+
resetPasswordDescription?: () => string;
|
|
142
|
+
emailLabel?: () => string;
|
|
143
|
+
loading?: () => string;
|
|
144
|
+
backToSignInLink?: () => string;
|
|
145
|
+
};
|
|
146
|
+
}
|
|
147
|
+
export interface SocialLoginButtonOptions {
|
|
148
|
+
provider: Value<AuthProviderName>;
|
|
149
|
+
onClick?: () => Promise<void>;
|
|
150
|
+
loading?: Value<boolean>;
|
|
151
|
+
disabled?: Value<boolean>;
|
|
152
|
+
size?: Value<ControlSize>;
|
|
153
|
+
flow?: Value<'redirect' | 'popup' | undefined>;
|
|
154
|
+
name: Value<string>;
|
|
155
|
+
icon: Value<string>;
|
|
156
|
+
color: Value<ThemeColorName | 'black'>;
|
|
157
|
+
labels?: {
|
|
158
|
+
continueWithProvider?: (provider: string) => string;
|
|
159
|
+
};
|
|
160
|
+
}
|
|
161
|
+
export interface PasswordStrengthIndicatorOptions {
|
|
162
|
+
password: Value<string>;
|
|
163
|
+
rules?: PasswordRules;
|
|
164
|
+
showLabel?: boolean;
|
|
165
|
+
className?: Value<string>;
|
|
166
|
+
}
|
|
167
|
+
export interface ProviderInfo {
|
|
168
|
+
name: string;
|
|
169
|
+
icon: string;
|
|
170
|
+
color: ThemeColorName;
|
|
171
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { GetValueTypes, Signal, Value } from '@tempots/dom';
|
|
2
|
+
import { AuthProviderName, PasswordRules } from './types';
|
|
3
|
+
export declare const providerInfo: Record<AuthProviderName, {
|
|
4
|
+
name: string;
|
|
5
|
+
icon: string;
|
|
6
|
+
color: string;
|
|
7
|
+
}>;
|
|
8
|
+
export declare function formatProviderName(provider: AuthProviderName): string;
|
|
9
|
+
export declare function getProviderIcon(provider: AuthProviderName): string;
|
|
10
|
+
export declare function getProviderColor(provider: AuthProviderName): string;
|
|
11
|
+
export declare function formatSocialLoginText(provider: AuthProviderName, template?: string): string;
|
|
12
|
+
export declare const defaultPasswordRules: PasswordRules;
|
|
13
|
+
export declare function isValidEmail(email: string): boolean;
|
|
14
|
+
export declare function generateRandomString(length?: number): string;
|
|
15
|
+
export declare function createSocialLoginUrl(provider: AuthProviderName, clientId: string, redirectUri: string, scopes?: string[], customParams?: Record<string, string>): string;
|
|
16
|
+
export declare function openSocialLoginPopup<T>(url: string, provider: AuthProviderName, onSuccess?: (result: T) => void, onError?: (error: Error) => void): void;
|
|
17
|
+
export declare function formatAuthError(error: unknown): string;
|
|
18
|
+
export declare function isBrowser(): boolean;
|
|
19
|
+
export declare const REMEMBER_EMAIL_KEY = "bui_auth_remember_email";
|
|
20
|
+
export declare function saveRememberMe(email: string): void;
|
|
21
|
+
export declare function getRememberedEmail(): string | null;
|
|
22
|
+
export declare function clearRememberedEmail(): void;
|
|
23
|
+
export declare function functionOrReactiveMessage<T extends Value<unknown>[]>(fn: undefined | ((...args: GetValueTypes<T>) => string), reactiveFn: (...args: T) => Signal<string>, ...args: T): Signal<string>;
|
|
@@ -1,2 +1,5 @@
|
|
|
1
1
|
import { TNode } from '@tempots/dom';
|
|
2
|
-
export
|
|
2
|
+
export type BeatUIOptions = {
|
|
3
|
+
includeAuthI18n?: boolean;
|
|
4
|
+
};
|
|
5
|
+
export declare function BeatUI({ includeAuthI18n }: BeatUIOptions, ...children: TNode[]): import("@tempots/dom").Renderable;
|
|
@@ -8,7 +8,7 @@ export interface ButtonOptions {
|
|
|
8
8
|
loading?: Value<boolean>;
|
|
9
9
|
variant?: Value<ButtonVariant>;
|
|
10
10
|
size?: Value<ControlSize>;
|
|
11
|
-
color?: Value<ThemeColorName>;
|
|
11
|
+
color?: Value<ThemeColorName | 'black'>;
|
|
12
12
|
roundedness?: Value<RadiusName>;
|
|
13
13
|
onClick?: () => void;
|
|
14
14
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TNode, Value } from '@tempots/dom';
|
|
2
|
-
export declare const InputContainer: ({ child, disabled, input, before, after, hasError, focusableSelector, growInput, }: {
|
|
2
|
+
export declare const InputContainer: ({ baseContainer, child, disabled, input, before, after, hasError, focusableSelector, growInput, }: {
|
|
3
3
|
child?: TNode;
|
|
4
4
|
disabled?: Value<boolean>;
|
|
5
5
|
input: TNode;
|
|
@@ -8,4 +8,5 @@ export declare const InputContainer: ({ child, disabled, input, before, after, h
|
|
|
8
8
|
hasError?: Value<boolean>;
|
|
9
9
|
focusableSelector?: string;
|
|
10
10
|
growInput?: Value<boolean>;
|
|
11
|
+
baseContainer?: Value<boolean>;
|
|
11
12
|
}) => import("@tempots/dom").Renderable;
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { StandardSchemaV1 } from './standard-schema-v1';
|
|
2
|
+
export type ValidationError = {
|
|
3
|
+
message: string;
|
|
4
|
+
path?: (PropertyKey | StandardSchemaV1.PathSegment)[];
|
|
5
|
+
};
|
|
6
|
+
export type ValidatorResult<T> = {
|
|
7
|
+
success: true;
|
|
8
|
+
data: T;
|
|
9
|
+
} | {
|
|
10
|
+
success: false;
|
|
11
|
+
errors: ValidationError[];
|
|
12
|
+
};
|
|
13
|
+
export interface Validator<Input, Output = Input> {
|
|
14
|
+
validate(value: unknown): ValidatorResult<Output>;
|
|
15
|
+
optional(): Validator<Input | undefined, Output | undefined>;
|
|
16
|
+
default(defaultValue: Output): Validator<Input | undefined, Output>;
|
|
17
|
+
}
|
|
18
|
+
export type SafeParseSuccess<T> = {
|
|
19
|
+
success: true;
|
|
20
|
+
data: T;
|
|
21
|
+
};
|
|
22
|
+
export type SafeParseError = {
|
|
23
|
+
success: false;
|
|
24
|
+
error: {
|
|
25
|
+
errors: Array<{
|
|
26
|
+
message: string;
|
|
27
|
+
path: (string | number)[];
|
|
28
|
+
}>;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
export type SafeParseResult<T> = SafeParseSuccess<T> | SafeParseError;
|
|
32
|
+
declare function createStandardSchema<Input, Output = Input>(validator: Validator<Input, Output>): StandardSchemaV1<Input, Output> & {
|
|
33
|
+
safeParse: (value: unknown) => SafeParseResult<Output>;
|
|
34
|
+
};
|
|
35
|
+
declare abstract class BaseValidator<Input, Output = Input> implements Validator<Input, Output> {
|
|
36
|
+
abstract validate(value: unknown): ValidatorResult<Output>;
|
|
37
|
+
optional(): Validator<Input | undefined, Output | undefined>;
|
|
38
|
+
default(defaultValue: Output): Validator<Input | undefined, Output>;
|
|
39
|
+
schema(): StandardSchemaV1<Input, Output> & {
|
|
40
|
+
safeParse: (value: unknown) => SafeParseResult<Output>;
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
export declare class StringValidator extends BaseValidator<string> {
|
|
44
|
+
private minLength?;
|
|
45
|
+
private maxLength?;
|
|
46
|
+
private pattern?;
|
|
47
|
+
private customValidations;
|
|
48
|
+
validate(value: unknown): ValidatorResult<string>;
|
|
49
|
+
min(length: number, message?: string): StringValidator;
|
|
50
|
+
max(length: number, message?: string): StringValidator;
|
|
51
|
+
regex(pattern: RegExp, message?: string): StringValidator;
|
|
52
|
+
email(message?: string): StringValidator;
|
|
53
|
+
refine(validation: (value: string) => string | null): StringValidator;
|
|
54
|
+
}
|
|
55
|
+
export declare class BooleanValidator extends BaseValidator<boolean> {
|
|
56
|
+
private mustBeTrue;
|
|
57
|
+
private trueMessage?;
|
|
58
|
+
validate(value: unknown): ValidatorResult<boolean>;
|
|
59
|
+
refine(condition: (value: boolean) => boolean, message: string): BooleanValidator;
|
|
60
|
+
literal(value: true, message?: string): BooleanValidator;
|
|
61
|
+
}
|
|
62
|
+
export declare class ObjectValidator<T extends Record<string, any>> extends BaseValidator<T> {
|
|
63
|
+
private shape;
|
|
64
|
+
constructor(shape: {
|
|
65
|
+
[K in keyof T]: Validator<any, T[K]>;
|
|
66
|
+
});
|
|
67
|
+
validate(value: unknown): ValidatorResult<T>;
|
|
68
|
+
refine<R extends T>(validation: (value: T) => string | null, options?: {
|
|
69
|
+
path?: (keyof T)[];
|
|
70
|
+
}): ObjectValidator<R>;
|
|
71
|
+
}
|
|
72
|
+
export declare const string: () => StringValidator;
|
|
73
|
+
export declare const boolean: () => BooleanValidator;
|
|
74
|
+
export declare const object: <T extends Record<string, any>>(shape: { [K in keyof T]: Validator<any, T[K]>; }) => ObjectValidator<T>;
|
|
75
|
+
export { createStandardSchema };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { TNode, Value } from '@tempots/dom';
|
|
2
2
|
export type SidebarGroupOptions = {
|
|
3
3
|
rail?: Value<boolean>;
|
|
4
|
+
header?: TNode;
|
|
4
5
|
};
|
|
5
|
-
export declare function SidebarGroup({ rail }: SidebarGroupOptions, ...children: TNode[]): import("@tempots/dom").Renderable;
|
|
6
|
+
export declare function SidebarGroup({ rail, header }: SidebarGroupOptions, ...children: TNode[]): import("@tempots/dom").Renderable;
|
|
@@ -19,4 +19,7 @@ export type SidebarLinkOptions = {
|
|
|
19
19
|
ariaControls?: Value<string>;
|
|
20
20
|
ariaLabel?: Value<string>;
|
|
21
21
|
} & LinkAction;
|
|
22
|
+
export declare function SidebarUrlLink(options: UrlAction, ...children: TNode[]): import("@tempots/dom").Renderable;
|
|
23
|
+
export declare function SidebarActiveLink(...children: TNode[]): import("@tempots/dom").Renderable;
|
|
24
|
+
export declare function SidebarClickLink(options: ClickAction & Partial<Pick<SidebarLinkOptions, 'ariaExpanded' | 'ariaControls' | 'ariaLabel'>>, ...children: TNode[]): import("@tempots/dom").Renderable;
|
|
22
25
|
export declare function SidebarLink(options: SidebarLinkOptions): import("@tempots/dom").Renderable;
|
|
@@ -4,6 +4,7 @@ import { AppearanceType } from '@tempots/ui';
|
|
|
4
4
|
export type ButtonVariant = 'filled' | 'light' | 'outline' | 'default' | 'text';
|
|
5
5
|
export type ControlSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
6
6
|
export type IconSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
7
|
+
export declare function increaseSize(size: IconSize | ControlSize, steps?: number): "sm" | "md" | "lg" | "xl" | "xs";
|
|
7
8
|
export type OverlayEffect = 'transparent' | 'opaque' | 'none';
|
|
8
9
|
export type OverlayMode = 'capturing' | 'non-capturing';
|
|
9
10
|
export type FadeTransitionState = 'initial' | 'entering' | 'entered' | 'exiting' | 'exited';
|
package/dist/types/index.d.ts
CHANGED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
const r = {
|
|
2
|
+
// Sign In
|
|
3
|
+
signInTitle: () => "登录",
|
|
4
|
+
signInButton: () => "登录",
|
|
5
|
+
emailLabel: () => "邮箱",
|
|
6
|
+
passwordLabel: () => "密码",
|
|
7
|
+
rememberMeLabel: () => "记住我",
|
|
8
|
+
forgotPasswordLink: () => "忘记密码?",
|
|
9
|
+
noAccountLink: () => "没有账户?注册",
|
|
10
|
+
// Sign Up
|
|
11
|
+
signUpTitle: () => "注册",
|
|
12
|
+
signUpButton: () => "注册",
|
|
13
|
+
nameLabel: () => "姓名",
|
|
14
|
+
confirmPasswordLabel: () => "确认密码",
|
|
15
|
+
acceptTermsLabel: () => "我接受条款和条件",
|
|
16
|
+
hasAccountLink: () => "已有账户?登录",
|
|
17
|
+
// Reset Password
|
|
18
|
+
resetPasswordTitle: () => "重置密码",
|
|
19
|
+
resetPasswordButton: () => "重置密码",
|
|
20
|
+
resetPasswordDescription: () => "输入您的邮箱地址以重置密码。",
|
|
21
|
+
backToSignInLink: () => "返回登录",
|
|
22
|
+
// Social Login
|
|
23
|
+
continueWithProvider: (e) => `使用${e}继续`,
|
|
24
|
+
// Password Strength
|
|
25
|
+
passwordStrengthWeak: () => "弱",
|
|
26
|
+
passwordStrengthFair: () => "一般",
|
|
27
|
+
passwordStrengthGood: () => "良好",
|
|
28
|
+
passwordStrengthStrong: () => "强",
|
|
29
|
+
// Common
|
|
30
|
+
orDivider: () => "或",
|
|
31
|
+
loading: () => "加载中...",
|
|
32
|
+
error: () => "发生错误",
|
|
33
|
+
required: () => "必填"
|
|
34
|
+
};
|
|
35
|
+
export {
|
|
36
|
+
r as default
|
|
37
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tempots/beatui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.12.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/index.umd.js",
|
|
6
6
|
"module": "dist/index.es.js",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"registry": "https://registry.npmjs.org/"
|
|
55
55
|
},
|
|
56
56
|
"peerDependencies": {
|
|
57
|
-
"@tempots/dom": "28.3.
|
|
57
|
+
"@tempots/dom": "28.3.1",
|
|
58
58
|
"@tempots/std": "0.22.1",
|
|
59
59
|
"@tempots/ui": "6.2.0"
|
|
60
60
|
},
|
|
@@ -83,8 +83,7 @@
|
|
|
83
83
|
"typescript": "5.8.3",
|
|
84
84
|
"typescript-eslint": "8.32.1",
|
|
85
85
|
"vite": "6.3.5",
|
|
86
|
-
"vitest": "3.1.3"
|
|
87
|
-
"zod": "^3.25.32"
|
|
86
|
+
"vitest": "3.1.3"
|
|
88
87
|
},
|
|
89
88
|
"scripts": {
|
|
90
89
|
"build": "vite build && tsc -p tsconfig.build.json",
|