@nodeblocks/frontend-reset-password-block 0.0.2
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/ResetPassword.d.ts +49 -0
- package/dist/ResetPassword.d.ts.map +1 -0
- package/dist/blocks.d.ts +15 -0
- package/dist/blocks.d.ts.map +1 -0
- package/dist/index.cjs.js +40766 -0
- package/dist/index.cjs.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.esm.js +40746 -0
- package/dist/index.esm.js.map +1 -0
- package/dist/lib.d.ts +29 -0
- package/dist/lib.d.ts.map +1 -0
- package/dist/types.d.ts +55 -0
- package/dist/types.d.ts.map +1 -0
- package/package.json +38 -0
- package/readme.md +57 -0
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import "@basaldev/blocks-frontend-framework/dist/style.css";
|
|
2
|
+
import "./ResetPassword.css";
|
|
3
|
+
import { type SpacingProps } from "@basaldev/blocks-frontend-framework";
|
|
4
|
+
import { type ChildrenProps } from "./lib";
|
|
5
|
+
import type { ButtonProps, DefaultOptions, DescriptionProps, EmailFieldProps, GotoProps, PasswordFieldProps, TitleProps } from "./types";
|
|
6
|
+
type RequestResetPasswordData = {
|
|
7
|
+
email?: string;
|
|
8
|
+
};
|
|
9
|
+
type SubmitResetPasswordData = {
|
|
10
|
+
password?: string;
|
|
11
|
+
confirmPassword?: string;
|
|
12
|
+
};
|
|
13
|
+
type DefaultFormData = RequestResetPasswordData | SubmitResetPasswordData;
|
|
14
|
+
type FormValues = Record<string, any>;
|
|
15
|
+
type Data<T> = T extends object ? T & DefaultFormData : T;
|
|
16
|
+
declare const ViewType: {
|
|
17
|
+
readonly request: "request";
|
|
18
|
+
readonly confirm_password: "confirm_password";
|
|
19
|
+
};
|
|
20
|
+
type ViewTypeKeys = keyof typeof ViewType;
|
|
21
|
+
type DefaultFieldOptions = {
|
|
22
|
+
Title?: TitleProps;
|
|
23
|
+
Description?: DescriptionProps;
|
|
24
|
+
EmailField?: EmailFieldProps;
|
|
25
|
+
PasswordField?: PasswordFieldProps;
|
|
26
|
+
ConfirmPasswordField?: PasswordFieldProps;
|
|
27
|
+
Goto?: GotoProps;
|
|
28
|
+
ResetPasswordButton?: ButtonProps;
|
|
29
|
+
};
|
|
30
|
+
declare const ResetPassword: <TValues extends FormValues = FormValues>({ viewType, onResetPassword, showTitle, showDescription, showGoto, className, fieldOptions, children, gap, }: {
|
|
31
|
+
viewType?: ViewTypeKeys;
|
|
32
|
+
onResetPassword?: (data: Data<TValues>) => void;
|
|
33
|
+
className?: string;
|
|
34
|
+
showTitle?: boolean;
|
|
35
|
+
showDescription?: boolean;
|
|
36
|
+
showGoto?: boolean;
|
|
37
|
+
fieldOptions?: DefaultFieldOptions & {
|
|
38
|
+
[k: string]: unknown;
|
|
39
|
+
};
|
|
40
|
+
children?: (props: ChildrenProps) => DefaultOptions & {
|
|
41
|
+
blocks: {
|
|
42
|
+
[x: string]: any;
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
resetPasswordUrl?: string;
|
|
46
|
+
gap?: SpacingProps["gapSize"];
|
|
47
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
48
|
+
export default ResetPassword;
|
|
49
|
+
//# sourceMappingURL=ResetPassword.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ResetPassword.d.ts","sourceRoot":"","sources":["../src/ResetPassword.tsx"],"names":[],"mappings":"AAAA,OAAO,oDAAoD,CAAC;AAC5D,OAAO,qBAAqB,CAAC;AAI7B,OAAO,EAEL,KAAK,YAAY,EAClB,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAAE,KAAK,aAAa,EAAyB,MAAM,OAAO,CAAC;AAElE,OAAO,KAAK,EACV,WAAW,EACX,cAAc,EACd,gBAAgB,EAChB,eAAe,EACf,SAAS,EACT,kBAAkB,EAClB,UAAU,EACX,MAAM,SAAS,CAAC;AAyCjB,KAAK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AC;IACF,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,cAAc,GAAG;QACpD,MAAM,EAAE;YAAE,CAAC,CAAC,EAAE,MAAM,GAAG,GAAG,CAAA;SAAE,CAAC;KAC9B,CAAC;IACF,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,GAAG,CAAC,EAAE,YAAY,CAAC,SAAS,CAAC,CAAC;CAC/B,4CAkEA,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
package/dist/blocks.d.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { InputTextProps } from "@basaldev/blocks-frontend-framework";
|
|
2
|
+
import type { DefaultOptions } from "./types";
|
|
3
|
+
export declare const defaultOptions: DefaultOptions;
|
|
4
|
+
declare const TextFormField: (props: InputTextProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare const defaultBlocks: {
|
|
6
|
+
Title: import("./types").Block<import("./types").TitleProps>;
|
|
7
|
+
Description: import("./types").Block<import("./types").DescriptionProps>;
|
|
8
|
+
EmailField: import("./types").Block<import("./types").EmailFieldProps>;
|
|
9
|
+
PasswordField: import("./types").Block<import("./types").PasswordFieldProps>;
|
|
10
|
+
ConfirmPasswordField: import("./types").Block<import("./types").PasswordFieldProps>;
|
|
11
|
+
ResetPasswordButton: import("./types").Block<import("./types").ButtonProps>;
|
|
12
|
+
Goto: import("./types").Block<import("./types").GotoProps>;
|
|
13
|
+
};
|
|
14
|
+
export { defaultBlocks, TextFormField };
|
|
15
|
+
//# sourceMappingURL=blocks.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"blocks.d.ts","sourceRoot":"","sources":["../src/blocks.tsx"],"names":[],"mappings":"AACA,OAAO,EAGL,cAAc,EAEf,MAAM,qCAAqC,CAAC;AAG7C,OAAO,KAAK,EAAiB,cAAc,EAAE,MAAM,SAAS,CAAC;AAE7D,eAAO,MAAM,cAAc,EAAE,cAAmB,CAAC;AAEjD,QAAA,MAAM,aAAa,GAAI,OAAO,cAAc,4CAA6B,CAAC;AAgI1E,QAAA,MAAM,aAAa;;;;;;;;CAQlB,CAAC;AAEF,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,CAAC"}
|