@nodeblocks/frontend-reset-password-block 0.1.1 → 0.2.1

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/lib.d.ts CHANGED
@@ -72,10 +72,12 @@ export declare function BlocksOverrideComponent<DefaultBlocks extends Record<str
72
72
  blockOrder: readonly (keyof DefaultBlocks | keyof CustomBlocks)[];
73
73
  }) => ReactNode;
74
74
  }): ReactNode;
75
- type MergeTypes<Object1, Object2> = {
76
- [K in keyof Object1 | keyof Object2]: K extends keyof Object1 ? Object1[K] : K extends keyof Object2 ? Object2[K] : never;
75
+ type MergeKeepingRequired<A, B> = Omit<A, keyof B> & {
76
+ [K in keyof A & keyof B]-?: undefined extends B[K] ? A[K] : B[K];
77
+ } & {
78
+ [K in Exclude<keyof B, keyof A>]: B[K];
77
79
  };
78
- export declare function deepMerge<A extends Record<string, any>, B extends Record<string, any>>(obj1: A, obj2: B): MergeTypes<B, A>;
80
+ export declare function merge<A extends Record<PropertyKey, any>, B extends Record<PropertyKey, any>>(a: A, b: B): MergeKeepingRequired<A, B>;
79
81
  type ClassName = string | ClassName[] | undefined | null;
80
82
  /**
81
83
  * Utility function to join class names together, ignoring undefined or nil values.
@@ -83,5 +85,19 @@ type ClassName = string | ClassName[] | undefined | null;
83
85
  * @returns The joined class names.
84
86
  */
85
87
  export declare function classNames(...classes: ClassName[]): string;
88
+ /**
89
+ * Omits the given string keys from `source`.
90
+ *
91
+ * Usage:
92
+ * omit(obj, "a", "b")
93
+ */
94
+ export declare function omit<T extends object, const Keys extends readonly string[]>(source: T, ...keys: Keys): Omit<T, Extract<Keys[number], keyof T>>;
95
+ /**
96
+ * Picks the given keys out of `source` into a new object.
97
+ *
98
+ * Usage:
99
+ * pick(obj, "a", "b")
100
+ */
101
+ export declare function pick<T extends object, K extends PropertyKey>(source: T, ...keys: K[]): Pick<T, Extract<K, keyof T>>;
86
102
  export {};
87
103
  //# sourceMappingURL=lib.d.ts.map
package/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MAAM,CAAC,CAAC,CAAC,CAWnH"}
@@ -1,7 +1,6 @@
1
- import '@basaldev/blocks-frontend-framework/dist/style.css';
2
- import './reset-password.css';
3
- import { Button, InputText, Spacing, Typography } from '@basaldev/blocks-frontend-framework';
4
- import { ComponentProps, ReactNode } from 'react';
1
+ import { ButtonProps, StackProps, TextFieldProps, TypographyProps } from '@mui/material';
2
+ import { ReactNode } from 'react';
3
+ import { ResetPasswordContextValue } from './context';
5
4
  import { BlocksOverride } from './lib';
6
5
  export type ResetPasswordFormData = {
7
6
  email?: string;
@@ -10,49 +9,39 @@ export type ResetPasswordFormData = {
10
9
  confirmPassword?: string;
11
10
  };
12
11
  declare const ResetPassword: {
13
- <T extends ResetPasswordFormData, CustomBlocks extends Record<string, ReactNode> = {}>({ resetPasswordTitle, description, gotoSigninMessage, view, onSendRequest, onResetPassword, className, children, ...props }: Omit<ComponentProps<typeof Spacing>, "children" | "onSubmit"> & {
14
- resetPasswordTitle?: ReactNode;
15
- description?: ReactNode;
16
- gotoSigninMessage?: ReactNode;
17
- view: "request" | "confirm_password";
18
- onSendRequest: (data: T) => void;
19
- onResetPassword: (data: T) => void;
12
+ <T extends ResetPasswordFormData, CustomBlocks extends Record<string, ReactNode> = {}>({ view, resetPasswordTitle, description, gotoSigninMessage, showPassword: showPasswordProp, onShowPasswordClick: onShowPasswordClickProp, className, children, sx, ...props }: Omit<StackProps, "children" | "onSubmit"> & Required<Pick<ResetPasswordContextValue<T>, "view" | "onSendRequest" | "onResetPassword">> & Partial<Pick<ResetPasswordContextValue<T>, "resetPasswordTitle" | "description" | "gotoSigninMessage" | "showPassword" | "onShowPasswordClick">> & {
20
13
  children?: BlocksOverride<typeof defaultBlocks, CustomBlocks>;
21
14
  }): import("react/jsx-runtime").JSX.Element;
22
- Title(props: Partial<ComponentProps<typeof Typography>>): import("react/jsx-runtime").JSX.Element;
23
- Description(props: Partial<ComponentProps<typeof Typography>>): import("react/jsx-runtime").JSX.Element;
15
+ Title({ sx, children, className, ...props }: Partial<TypographyProps & Pick<ResetPasswordContextValue, "resetPasswordTitle">>): import("react/jsx-runtime").JSX.Element;
16
+ Description({ sx, children, className, ...props }: Partial<TypographyProps & Pick<ResetPasswordContextValue, "description">>): import("react/jsx-runtime").JSX.Element;
24
17
  Form: {
25
- <T extends ResetPasswordFormData>(props: Partial<ComponentProps<"form"> & {
26
- view?: "request" | "confirm_password";
27
- onSendRequest?: (data: T) => void;
28
- onResetPassword?: (data: T) => void;
29
- }>): import("react/jsx-runtime").JSX.Element;
30
- EmailField: (props: Partial<ComponentProps<typeof InputText>>) => import("react/jsx-runtime").JSX.Element;
31
- PasswordField: (props: Partial<ComponentProps<typeof InputText>>) => import("react/jsx-runtime").JSX.Element;
32
- ConfirmPasswordField: (props: Partial<ComponentProps<typeof InputText>>) => import("react/jsx-runtime").JSX.Element;
33
- ResetPasswordButton: ({ children, ...props }: Partial<ComponentProps<typeof Button>>) => import("react/jsx-runtime").JSX.Element;
18
+ <T extends ResetPasswordFormData>({ children, className, ...props }: Partial<StackProps<"form"> & Pick<ResetPasswordContextValue<T>, "view" | "onSendRequest" | "onResetPassword">>): import("react/jsx-runtime").JSX.Element;
19
+ EmailField: ({ className, ...props }: Partial<TextFieldProps & Pick<ResetPasswordContextValue, "view">>) => import("react/jsx-runtime").JSX.Element | null;
20
+ PasswordField: ({ className, ...props }: Partial<TextFieldProps & Pick<ResetPasswordContextValue, "view" | "showPassword" | "onShowPasswordClick">>) => import("react/jsx-runtime").JSX.Element | null;
21
+ ConfirmPasswordField: ({ className, ...props }: Partial<TextFieldProps & Pick<ResetPasswordContextValue, "view" | "showPassword" | "onShowPasswordClick">>) => import("react/jsx-runtime").JSX.Element | null;
22
+ ResetPasswordButton: ({ children, className, ...props }: ButtonProps) => import("react/jsx-runtime").JSX.Element;
34
23
  };
35
- Goto(props: Partial<ComponentProps<"div">>): import("react/jsx-runtime").JSX.Element;
24
+ Goto({ children, className, sx, ...props }: Partial<TypographyProps & Pick<ResetPasswordContextValue, "gotoSigninMessage">>): import("react/jsx-runtime").JSX.Element;
36
25
  };
37
26
  declare const defaultBlocks: {
38
- title: import("react").ReactElement<Partial<import("@basaldev/blocks-frontend-framework").TypographyProps>, (props: Partial<ComponentProps<typeof Typography>>) => import("react/jsx-runtime").JSX.Element>;
39
- description: import("react").ReactElement<Partial<import("@basaldev/blocks-frontend-framework").TypographyProps>, (props: Partial<ComponentProps<typeof Typography>>) => import("react/jsx-runtime").JSX.Element>;
40
- form: import("react").ReactElement<Partial<import("react").ClassAttributes<HTMLFormElement> & import("react").FormHTMLAttributes<HTMLFormElement> & {
41
- view?: "request" | "confirm_password";
42
- onSendRequest?: ((data: ResetPasswordFormData) => void) | undefined;
43
- onResetPassword?: ((data: ResetPasswordFormData) => void) | undefined;
44
- }>, {
45
- <T extends ResetPasswordFormData>(props: Partial<ComponentProps<"form"> & {
46
- view?: "request" | "confirm_password";
47
- onSendRequest?: (data: T) => void;
48
- onResetPassword?: (data: T) => void;
49
- }>): import("react/jsx-runtime").JSX.Element;
50
- EmailField: (props: Partial<ComponentProps<typeof InputText>>) => import("react/jsx-runtime").JSX.Element;
51
- PasswordField: (props: Partial<ComponentProps<typeof InputText>>) => import("react/jsx-runtime").JSX.Element;
52
- ConfirmPasswordField: (props: Partial<ComponentProps<typeof InputText>>) => import("react/jsx-runtime").JSX.Element;
53
- ResetPasswordButton: ({ children, ...props }: Partial<ComponentProps<typeof Button>>) => import("react/jsx-runtime").JSX.Element;
27
+ title: import("react").ReactElement<Partial<import("@mui/material").TypographyOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "p" | "style" | "color" | "left" | "right" | "children" | "className" | "classes" | "border" | "borderTop" | "borderRight" | "borderBottom" | "borderLeft" | "borderColor" | "borderRadius" | "display" | "displayPrint" | "overflow" | "textOverflow" | "visibility" | "whiteSpace" | "flexBasis" | "flexDirection" | "flexWrap" | "justifyContent" | "alignItems" | "alignContent" | "order" | "flex" | "flexGrow" | "flexShrink" | "alignSelf" | "justifyItems" | "justifySelf" | "gap" | "columnGap" | "rowGap" | "gridColumn" | "gridRow" | "gridAutoFlow" | "gridAutoColumns" | "gridAutoRows" | "gridTemplateColumns" | "gridTemplateRows" | "gridTemplateAreas" | "gridArea" | "bgcolor" | "zIndex" | "position" | "top" | "bottom" | "boxShadow" | "width" | "maxWidth" | "minWidth" | "height" | "maxHeight" | "minHeight" | "boxSizing" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "my" | "pt" | "pr" | "pb" | "pl" | "px" | "py" | "margin" | "marginTop" | "marginRight" | "marginBottom" | "marginLeft" | "marginX" | "marginY" | "marginInline" | "marginInlineStart" | "marginInlineEnd" | "marginBlock" | "marginBlockStart" | "marginBlockEnd" | "padding" | "paddingTop" | "paddingRight" | "paddingBottom" | "paddingLeft" | "paddingX" | "paddingY" | "paddingInline" | "paddingInlineStart" | "paddingInlineEnd" | "paddingBlock" | "paddingBlockStart" | "paddingBlockEnd" | "typography" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "letterSpacing" | "lineHeight" | "textAlign" | "textTransform" | "sx" | "align" | "gutterBottom" | "noWrap" | "paragraph" | "variant" | "variantMapping"> & {
28
+ component?: React.ElementType;
29
+ } & Pick<ResetPasswordContextValue, "resetPasswordTitle">>, ({ sx, children, className, ...props }: Partial<TypographyProps & Pick<ResetPasswordContextValue, "resetPasswordTitle">>) => import("react/jsx-runtime").JSX.Element>;
30
+ description: import("react").ReactElement<Partial<import("@mui/material").TypographyOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "p" | "style" | "color" | "left" | "right" | "children" | "className" | "classes" | "border" | "borderTop" | "borderRight" | "borderBottom" | "borderLeft" | "borderColor" | "borderRadius" | "display" | "displayPrint" | "overflow" | "textOverflow" | "visibility" | "whiteSpace" | "flexBasis" | "flexDirection" | "flexWrap" | "justifyContent" | "alignItems" | "alignContent" | "order" | "flex" | "flexGrow" | "flexShrink" | "alignSelf" | "justifyItems" | "justifySelf" | "gap" | "columnGap" | "rowGap" | "gridColumn" | "gridRow" | "gridAutoFlow" | "gridAutoColumns" | "gridAutoRows" | "gridTemplateColumns" | "gridTemplateRows" | "gridTemplateAreas" | "gridArea" | "bgcolor" | "zIndex" | "position" | "top" | "bottom" | "boxShadow" | "width" | "maxWidth" | "minWidth" | "height" | "maxHeight" | "minHeight" | "boxSizing" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "my" | "pt" | "pr" | "pb" | "pl" | "px" | "py" | "margin" | "marginTop" | "marginRight" | "marginBottom" | "marginLeft" | "marginX" | "marginY" | "marginInline" | "marginInlineStart" | "marginInlineEnd" | "marginBlock" | "marginBlockStart" | "marginBlockEnd" | "padding" | "paddingTop" | "paddingRight" | "paddingBottom" | "paddingLeft" | "paddingX" | "paddingY" | "paddingInline" | "paddingInlineStart" | "paddingInlineEnd" | "paddingBlock" | "paddingBlockStart" | "paddingBlockEnd" | "typography" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "letterSpacing" | "lineHeight" | "textAlign" | "textTransform" | "sx" | "align" | "gutterBottom" | "noWrap" | "paragraph" | "variant" | "variantMapping"> & {
31
+ component?: React.ElementType;
32
+ } & Pick<ResetPasswordContextValue, "description">>, ({ sx, children, className, ...props }: Partial<TypographyProps & Pick<ResetPasswordContextValue, "description">>) => import("react/jsx-runtime").JSX.Element>;
33
+ form: import("react").ReactElement<Partial<import("@mui/material").StackOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<import("react").DetailedHTMLProps<import("react").FormHTMLAttributes<HTMLFormElement>, HTMLFormElement>, keyof import("@mui/material/OverridableComponent").CommonProps | keyof import("@mui/material").StackOwnProps> & {
34
+ component?: React.ElementType;
35
+ } & Pick<ResetPasswordContextValue<ResetPasswordFormData>, "view" | "onSendRequest" | "onResetPassword">>, {
36
+ <T extends ResetPasswordFormData>({ children, className, ...props }: Partial<StackProps<"form"> & Pick<ResetPasswordContextValue<T>, "view" | "onSendRequest" | "onResetPassword">>): import("react/jsx-runtime").JSX.Element;
37
+ EmailField: ({ className, ...props }: Partial<TextFieldProps & Pick<ResetPasswordContextValue, "view">>) => import("react/jsx-runtime").JSX.Element | null;
38
+ PasswordField: ({ className, ...props }: Partial<TextFieldProps & Pick<ResetPasswordContextValue, "view" | "showPassword" | "onShowPasswordClick">>) => import("react/jsx-runtime").JSX.Element | null;
39
+ ConfirmPasswordField: ({ className, ...props }: Partial<TextFieldProps & Pick<ResetPasswordContextValue, "view" | "showPassword" | "onShowPasswordClick">>) => import("react/jsx-runtime").JSX.Element | null;
40
+ ResetPasswordButton: ({ children, className, ...props }: ButtonProps) => import("react/jsx-runtime").JSX.Element;
54
41
  }>;
55
- goto: import("react").ReactElement<Partial<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>>, (props: Partial<ComponentProps<"div">>) => import("react/jsx-runtime").JSX.Element>;
42
+ goto: import("react").ReactElement<Partial<import("@mui/material").TypographyOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "p" | "style" | "color" | "left" | "right" | "children" | "className" | "classes" | "border" | "borderTop" | "borderRight" | "borderBottom" | "borderLeft" | "borderColor" | "borderRadius" | "display" | "displayPrint" | "overflow" | "textOverflow" | "visibility" | "whiteSpace" | "flexBasis" | "flexDirection" | "flexWrap" | "justifyContent" | "alignItems" | "alignContent" | "order" | "flex" | "flexGrow" | "flexShrink" | "alignSelf" | "justifyItems" | "justifySelf" | "gap" | "columnGap" | "rowGap" | "gridColumn" | "gridRow" | "gridAutoFlow" | "gridAutoColumns" | "gridAutoRows" | "gridTemplateColumns" | "gridTemplateRows" | "gridTemplateAreas" | "gridArea" | "bgcolor" | "zIndex" | "position" | "top" | "bottom" | "boxShadow" | "width" | "maxWidth" | "minWidth" | "height" | "maxHeight" | "minHeight" | "boxSizing" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "my" | "pt" | "pr" | "pb" | "pl" | "px" | "py" | "margin" | "marginTop" | "marginRight" | "marginBottom" | "marginLeft" | "marginX" | "marginY" | "marginInline" | "marginInlineStart" | "marginInlineEnd" | "marginBlock" | "marginBlockStart" | "marginBlockEnd" | "padding" | "paddingTop" | "paddingRight" | "paddingBottom" | "paddingLeft" | "paddingX" | "paddingY" | "paddingInline" | "paddingInlineStart" | "paddingInlineEnd" | "paddingBlock" | "paddingBlockStart" | "paddingBlockEnd" | "typography" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "letterSpacing" | "lineHeight" | "textAlign" | "textTransform" | "sx" | "align" | "gutterBottom" | "noWrap" | "paragraph" | "variant" | "variantMapping"> & {
43
+ component?: React.ElementType;
44
+ } & Pick<ResetPasswordContextValue, "gotoSigninMessage">>, ({ children, className, sx, ...props }: Partial<TypographyProps & Pick<ResetPasswordContextValue, "gotoSigninMessage">>) => import("react/jsx-runtime").JSX.Element>;
56
45
  };
57
46
  export default ResetPassword;
58
47
  //# sourceMappingURL=reset-password.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"reset-password.d.ts","sourceRoot":"","sources":["../src/reset-password.tsx"],"names":[],"mappings":"AAAA,OAAO,oDAAoD,CAAC;AAC5D,OAAO,sBAAsB,CAAC;AAE9B,OAAO,EAAE,MAAM,EAAE,SAAS,EAAQ,OAAO,EAAE,UAAU,EAAE,MAAM,qCAAqC,CAAC;AACnG,OAAO,EAAE,cAAc,EAAuB,SAAS,EAAY,MAAM,OAAO,CAAC;AACjF,OAAO,EAAE,cAAc,EAAuE,MAAM,OAAO,CAAC;AAG5G,MAAM,MAAM,qBAAqB,GAC7B;IACE,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,GACD;IACE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,eAAe,CAAC,EAAE,MAAM,CAAC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B,CAAC,CAAC;CA3OjF,CAAC;AAgQF,QAAA,MAAM,aAAa;;;wGAzPhB,OAAO,CAAC,eAAe,GAAG,IAAI,CAAC,yBAAyB,EAAE,oBAAoB,CAAC,CAAC;;;iGA2BhF,OAAO,CAAC,eAAe,GAAG,IAAI,CAAC,yBAAyB,EAAE,aAAa,CAAC,CAAC;;;;SAqB9D,CAAC,SAAS,qBAAqB,qCAI1C,OAAO,CAAC,UAAU,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC,yBAAyB,CAAC,CAAC,CAAC,EAAE,MAAM,GAAG,eAAe,GAAG,iBAAiB,CAAC,CAAC;8CAuDpE,OAAO,CAAC,cAAc,GAAG,IAAI,CAAC,yBAAyB,EAAE,MAAM,CAAC,CAAC;iDAqB3G,OAAO,CAAC,cAAc,GAAG,IAAI,CAAC,yBAAyB,EAAE,MAAM,GAAG,cAAc,GAAG,qBAAqB,CAAC,CAAC;wDAyC1G,OAAO,CAAC,cAAc,GAAG,IAAI,CAAC,yBAAyB,EAAE,MAAM,GAAG,cAAc,GAAG,qBAAqB,CAAC,CAAC;iEAsC7C,WAAW;;;;uGAqBxE,OAAO,CAAC,eAAe,GAAG,IAAI,CAAC,yBAAyB,EAAE,mBAAmB,CAAC,CAAC;CA0BhF,CAAC;AAEH,eAAe,aAAa,CAAC"}
package/package.json CHANGED
@@ -1,39 +1,50 @@
1
1
  {
2
2
  "name": "@nodeblocks/frontend-reset-password-block",
3
- "version": "0.1.1",
4
- "main": "dist/index.cjs.js",
5
- "module": "dist/index.esm.js",
6
- "browser": "dist/index.iife.js",
7
- "types": "dist/index.d.ts",
3
+ "version": "0.2.1",
4
+ "main": "./dist/index.cjs.js",
5
+ "module": "./dist/index.esm.js",
6
+ "types": "./dist/index.d.ts",
7
+ "exports": {
8
+ ".": {
9
+ "types": "./dist/index.d.ts",
10
+ "development": "./src/index.ts",
11
+ "import": "./dist/index.esm.js",
12
+ "require": "./dist/index.cjs.js",
13
+ "default": "./dist/index.esm.js"
14
+ }
15
+ },
8
16
  "files": [
9
- "dist/",
10
- "dist/index.css"
17
+ "dist/"
11
18
  ],
12
19
  "scripts": {
13
- "build": "rollup -c",
14
- "watch": "rm -rf dist && cross-env NODE_ENV=development rollup -c --watch"
20
+ "build": "npm run typecheck && rollup -c",
21
+ "watch": "rm -rf dist && cross-env NODE_ENV=development rollup -c --watch",
22
+ "typecheck": "tsc --noEmit"
15
23
  },
16
24
  "peerDependencies": {
17
- "react": "^18.3.1",
18
- "react-dom": "^18.3.1"
25
+ "@emotion/react": "^11.14.0",
26
+ "@emotion/styled": "^11.14.1",
27
+ "@mui/icons-material": "^7.3.6",
28
+ "@mui/material": "^7.3.6",
29
+ "react": ">=18 <20",
30
+ "react-dom": ">=18 <20"
19
31
  },
20
32
  "devDependencies": {
21
33
  "@rollup/plugin-commonjs": "^28.0.6",
22
34
  "@rollup/plugin-json": "^6.1.0",
23
35
  "@rollup/plugin-node-resolve": "^15.3.0",
36
+ "@rollup/plugin-terser": "^0.4.4",
24
37
  "@rollup/plugin-typescript": "^12.1.1",
25
- "@types/react": "^18.3.12",
26
- "@types/react-dom": "^18.3.1",
27
- "rollup": "^4.28.0",
38
+ "@types/react": "19.2.7",
39
+ "@types/react-dom": "19.2.3",
40
+ "rollup": "^4.55.1",
28
41
  "rollup-plugin-peer-deps-external": "^2.2.4",
29
- "rollup-plugin-polyfill-node": "^0.13.0",
30
42
  "rollup-plugin-postcss": "^4.0.2",
31
43
  "rollup-plugin-serve": "^1.1.1",
32
44
  "tslib": "^2.8.1",
33
45
  "typescript": "^5.7.2"
34
46
  },
35
47
  "dependencies": {
36
- "@basaldev/blocks-frontend-framework": "^5.0.0",
37
48
  "deepmerge": "^4.3.1"
38
49
  }
39
50
  }
package/dist/blocks.d.ts DELETED
@@ -1,38 +0,0 @@
1
- import { InputText, InputTextProps, Button as NbButton, Typography } from '@basaldev/blocks-frontend-framework';
2
- import { ComponentProps, ReactNode } from 'react';
3
- export declare const TextFormField: (props: InputTextProps) => import("react/jsx-runtime").JSX.Element;
4
- export declare const Title: ({ className, content, size, type, ...props }: ComponentProps<typeof Typography> & {
5
- content?: ReactNode;
6
- }) => import("react/jsx-runtime").JSX.Element;
7
- export declare const Description: ({ className, content, size, type, ...props }: ComponentProps<typeof Typography> & {
8
- content?: ReactNode;
9
- }) => import("react/jsx-runtime").JSX.Element;
10
- export declare const EmailField: ({ name, label, placeholder, ...props }: ComponentProps<typeof InputText>) => import("react/jsx-runtime").JSX.Element;
11
- export declare const PasswordField: ({ className, name, label, placeholder, errorText, onChange, ...props }: ComponentProps<typeof InputText>) => import("react/jsx-runtime").JSX.Element;
12
- export declare const ConfirmPasswordField: ({ className, name, label, placeholder, errorText, onChange, ...props }: ComponentProps<typeof InputText>) => import("react/jsx-runtime").JSX.Element;
13
- export declare const ResetPasswordButton: ({ className, width, disable, children, ...props }: Omit<ComponentProps<typeof NbButton>, "children"> & {
14
- disable?: boolean;
15
- children?: ComponentProps<typeof NbButton>["children"];
16
- }) => import("react/jsx-runtime").JSX.Element;
17
- export declare const Goto: ({ className, content, ...props }: Omit<ComponentProps<"div">, "content"> & {
18
- content?: ReactNode;
19
- }) => import("react/jsx-runtime").JSX.Element;
20
- export declare const defaultBlocks: {
21
- Title: ({ className, content, size, type, ...props }: ComponentProps<typeof Typography> & {
22
- content?: ReactNode;
23
- }) => import("react/jsx-runtime").JSX.Element;
24
- Description: ({ className, content, size, type, ...props }: ComponentProps<typeof Typography> & {
25
- content?: ReactNode;
26
- }) => import("react/jsx-runtime").JSX.Element;
27
- EmailField: ({ name, label, placeholder, ...props }: ComponentProps<typeof InputText>) => import("react/jsx-runtime").JSX.Element;
28
- PasswordField: ({ className, name, label, placeholder, errorText, onChange, ...props }: ComponentProps<typeof InputText>) => import("react/jsx-runtime").JSX.Element;
29
- ConfirmPasswordField: ({ className, name, label, placeholder, errorText, onChange, ...props }: ComponentProps<typeof InputText>) => import("react/jsx-runtime").JSX.Element;
30
- ResetPasswordButton: ({ className, width, disable, children, ...props }: Omit<ComponentProps<typeof NbButton>, "children"> & {
31
- disable?: boolean;
32
- children?: ComponentProps<typeof NbButton>["children"];
33
- }) => import("react/jsx-runtime").JSX.Element;
34
- Goto: ({ className, content, ...props }: Omit<ComponentProps<"div">, "content"> & {
35
- content?: ReactNode;
36
- }) => import("react/jsx-runtime").JSX.Element;
37
- };
38
- //# sourceMappingURL=blocks.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"blocks.d.ts","sourceRoot":"","sources":["../src/blocks.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,IAAI,QAAQ,EAAE,UAAU,EAAE,MAAM,qCAAqC,CAAC;AAChH,OAAO,EAAE,cAAc,EAAE,SAAS,EAAY,MAAM,OAAO,CAAC;AAI5D,eAAO,MAAM,aAAa,GAAI,OAAO,cAAc,4CAA6B,CAAC;AAEjF,eAAO,MAAM,KAAK,GAAI,8CAMnB,cAAc,CAAC,OAAO,UAAU,CAAC,GAAG;IAAE,OAAO,CAAC,EAAE,SAAS,CAAA;CAAE,4CAI7D,CAAC;AAEF,eAAO,MAAM,WAAW,GAAI,8CAMzB,cAAc,CAAC,OAAO,UAAU,CAAC,GAAG;IAAE,OAAO,CAAC,EAAE,SAAS,CAAA;CAAE,4CAI7D,CAAC;AAEF,eAAO,MAAM,UAAU,GAAI,wCAKxB,cAAc,CAAC,OAAO,SAAS,CAAC,4CAAiF,CAAC;AAErH,eAAO,MAAM,aAAa,GAAI,wEAQ3B,cAAc,CAAC,OAAO,SAAS,CAAC,4CAqBlC,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAAI,wEAQlC,cAAc,CAAC,OAAO,SAAS,CAAC,4CAiBlC,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAAI,mDAMjC,IAAI,CAAC,cAAc,CAAC,OAAO,QAAQ,CAAC,EAAE,UAAU,CAAC,GAAG;IACrD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC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