@exegia/corpora-ui 0.7.0 → 0.8.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-lib/components/blocks/auth/__tests__/signup-block.test.d.ts +1 -0
- package/dist-lib/components/blocks/auth/signup-block.d.ts +16 -1
- package/dist-lib/index.js +329 -319
- package/dist-lib/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/blocks/auth/__tests__/signup-block.test.tsx +176 -0
- package/src/components/blocks/auth/signup-block.tsx +43 -10
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -4,6 +4,11 @@ import * as React from "react";
|
|
|
4
4
|
export interface SignupBlockProps {
|
|
5
5
|
title?: string;
|
|
6
6
|
description?: string;
|
|
7
|
+
/**
|
|
8
|
+
* Replaces the built-in "terms" link inside the consent label — pass your
|
|
9
|
+
* own dialog trigger to render it inline instead of wiring `onTerms`.
|
|
10
|
+
*/
|
|
11
|
+
termsComponent?: React.ReactNode;
|
|
7
12
|
/** Brand mark rendered above the title. Omit for no logo row at all. */
|
|
8
13
|
logo?: React.ReactNode;
|
|
9
14
|
/** Brand accent for the primary action. Omit to keep the default primary. */
|
|
@@ -12,6 +17,16 @@ export interface SignupBlockProps {
|
|
|
12
17
|
showNameField?: boolean;
|
|
13
18
|
/** Require the terms checkbox before submitting. */
|
|
14
19
|
showTerms?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Controls the terms checkbox. Pass it with `onTermsCheckedChange` when
|
|
22
|
+
* something outside the block has to tick the box — an "I agree" action in
|
|
23
|
+
* your own terms dialog, say. Omit to let the block own the state.
|
|
24
|
+
*/
|
|
25
|
+
termsChecked?: boolean;
|
|
26
|
+
/** Starting state of the terms checkbox while it is uncontrolled. */
|
|
27
|
+
defaultTermsChecked?: boolean;
|
|
28
|
+
/** Fires on every change, controlled or not. */
|
|
29
|
+
onTermsCheckedChange?: (checked: boolean) => void;
|
|
15
30
|
/** Block submission until every password requirement is met. */
|
|
16
31
|
enforceStrongPassword?: boolean;
|
|
17
32
|
onSubmit?: (data: {
|
|
@@ -23,4 +38,4 @@ export interface SignupBlockProps {
|
|
|
23
38
|
onLogin?: () => void;
|
|
24
39
|
onTerms?: () => void;
|
|
25
40
|
}
|
|
26
|
-
export declare function SignupBlock({ title, description, logo, accent, providers, showNameField, showTerms, enforceStrongPassword, onSubmit, onProviderSelect, onLogin, onTerms, }: SignupBlockProps): React.JSX.Element;
|
|
41
|
+
export declare function SignupBlock({ title, description, logo, accent, providers, showNameField, showTerms, termsChecked, defaultTermsChecked, onTermsCheckedChange, enforceStrongPassword, onSubmit, termsComponent, onProviderSelect, onLogin, onTerms, }: SignupBlockProps): React.JSX.Element;
|