@passflow/react 0.15.0 → 0.16.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/CHANGELOG.md +47 -0
- package/README.md +60 -20
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.es.js +133 -146
- package/dist/index.es.js.map +1 -1
- package/dist/src/components/flow/index.d.cts +1 -1
- package/dist/src/components/flow/index.d.ts +1 -1
- package/dist/src/components/flow/index.d.ts.map +1 -1
- package/dist/src/components/flow/passflow/flow-router.d.cts +39 -0
- package/dist/src/components/flow/passflow/flow-router.d.ts +39 -0
- package/dist/src/components/flow/passflow/flow-router.d.ts.map +1 -0
- package/dist/src/components/flow/passflow/index.d.cts +25 -3
- package/dist/src/components/flow/passflow/index.d.ts +25 -3
- package/dist/src/components/flow/passflow/index.d.ts.map +1 -1
- package/dist/src/components/flow/two-factor-setup-magic-link/index.d.cts +6 -1
- package/dist/src/components/flow/two-factor-setup-magic-link/index.d.ts +6 -1
- package/dist/src/components/flow/two-factor-setup-magic-link/index.d.ts.map +1 -1
- package/dist/src/components/form/forgot-password/forgot-password-success.d.ts.map +1 -1
- package/dist/src/components/form/forgot-password/forgot-password.d.ts.map +1 -1
- package/dist/src/components/form/invitation-join/index.d.ts.map +1 -1
- package/dist/src/components/form/reset-password/index.d.ts.map +1 -1
- package/dist/src/components/form/signin/index.d.ts.map +1 -1
- package/dist/src/components/form/signup/index.d.ts.map +1 -1
- package/dist/src/components/form/two-factor-verify/two-factor-verify-form.d.ts.map +1 -1
- package/dist/src/components/form/verify-challenge/verify-challenge-magic-link.d.ts.map +1 -1
- package/dist/src/components/form/verify-challenge/verify-challenge-otp-manual.d.ts.map +1 -1
- package/dist/src/components/ui/fields/field-otp.d.cts +19 -6
- package/dist/src/components/ui/fields/field-otp.d.ts +19 -6
- package/dist/src/components/ui/fields/field-otp.d.ts.map +1 -1
- package/dist/src/components/ui/fields/field-password.d.ts.map +1 -1
- package/dist/src/components/ui/fields/field-phone.d.ts.map +1 -1
- package/dist/src/context/index.d.cts +1 -0
- package/dist/src/context/index.d.ts +1 -0
- package/dist/src/context/index.d.ts.map +1 -1
- package/dist/src/context/search-context.d.cts +20 -0
- package/dist/src/context/search-context.d.ts +20 -0
- package/dist/src/context/search-context.d.ts.map +1 -0
- package/dist/src/hooks/use-app-settings.d.ts.map +1 -1
- package/dist/src/utils/cn.d.ts.map +1 -1
- package/dist/src/utils/get-auth-methods.d.ts.map +1 -1
- package/dist/src/utils/get-form-labels.d.ts.map +1 -1
- package/dist/src/utils/url-params.d.cts +2 -4
- package/dist/src/utils/url-params.d.ts +2 -4
- package/dist/src/utils/url-params.d.ts.map +1 -1
- package/dist/src/utils/validation-schemas/index.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +9 -8
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { ConsentFlow } from './consent/index.cjs';
|
|
2
2
|
export { DeviceVerifyFlow } from './device-verify/index.cjs';
|
|
3
|
-
export { PassflowFlow } from './passflow/index.cjs';
|
|
3
|
+
export { PassflowFlow, type PassflowFlowLocation, type PassflowFlowNavigate, type PassflowProps } from './passflow/index.cjs';
|
|
4
4
|
export { TwoFactorSetupMagicLinkFlow, type TwoFactorSetupMagicLinkFlowProps } from './two-factor-setup-magic-link/index.cjs';
|
|
5
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { ConsentFlow } from './consent/index.js';
|
|
2
2
|
export { DeviceVerifyFlow } from './device-verify/index.js';
|
|
3
|
-
export { PassflowFlow } from './passflow/index.js';
|
|
3
|
+
export { PassflowFlow, type PassflowFlowLocation, type PassflowFlowNavigate, type PassflowProps } from './passflow/index.js';
|
|
4
4
|
export { TwoFactorSetupMagicLinkFlow, type TwoFactorSetupMagicLinkFlowProps } from './two-factor-setup-magic-link/index.js';
|
|
5
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/flow/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/flow/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,KAAK,oBAAoB,EAAE,KAAK,oBAAoB,EAAE,KAAK,aAAa,EAAE,MAAM,YAAY,CAAC;AACpH,OAAO,EAAE,2BAA2B,EAAE,KAAK,gCAAgC,EAAE,MAAM,+BAA+B,CAAC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
export type FlowLocation = {
|
|
2
|
+
pathname: string;
|
|
3
|
+
search: string;
|
|
4
|
+
};
|
|
5
|
+
export type FlowNavigateOptions = {
|
|
6
|
+
replace: boolean;
|
|
7
|
+
};
|
|
8
|
+
export type FlowNavigate = (location: FlowLocation, options: FlowNavigateOptions) => void;
|
|
9
|
+
export type FlowHistory = {
|
|
10
|
+
/** The current location. Returns the same object until the location changes. */
|
|
11
|
+
read: () => FlowLocation;
|
|
12
|
+
subscribe: (listener: () => void) => () => void;
|
|
13
|
+
navigate: FlowNavigate;
|
|
14
|
+
};
|
|
15
|
+
/** The screens PassflowFlow renders, keyed as in `routes`. */
|
|
16
|
+
export declare const FLOW_SCREENS: readonly ["signin", "signup", "verify_otp", "verify_magic_link", "forgot_password", "forgot_password_success", "reset_password", "invitation", "two_factor_verify", "two_factor_setup", "two_factor_setup_magic_link"];
|
|
17
|
+
export type FlowScreen = (typeof FLOW_SCREENS)[number];
|
|
18
|
+
export type FlowMatch = {
|
|
19
|
+
screen: FlowScreen;
|
|
20
|
+
params: Record<string, string>;
|
|
21
|
+
};
|
|
22
|
+
/** `'/auth/'` → `'/auth'`, `'auth'` → `'/auth'`, `'/'` or `''` → `''`. */
|
|
23
|
+
export declare const normalizePrefix: (prefix: string | undefined) => string;
|
|
24
|
+
/** The screen at `pathname` under `prefix`, or null when the path is not one of the flow's screens. */
|
|
25
|
+
export declare const matchScreen: (pathname: string, prefix: string) => FlowMatch | null;
|
|
26
|
+
/**
|
|
27
|
+
* Where the flow is mounted, worked out from the first URL it sees: the part in
|
|
28
|
+
* front of a screen path (`/auth/signin` → `/auth`), or the whole path when it
|
|
29
|
+
* names no screen (`/auth` → `/auth`, `/` → `''`).
|
|
30
|
+
*/
|
|
31
|
+
export declare const detectPrefix: (pathname: string) => string;
|
|
32
|
+
/** The absolute path of a screen under `prefix`; `params` fill `:name` segments. */
|
|
33
|
+
export declare const screenPath: (screen: FlowScreen, prefix: string, params?: Record<string, string>) => string;
|
|
34
|
+
export declare const isUnderPrefix: (pathname: string, prefix: string) => boolean;
|
|
35
|
+
export declare const withQuestionMark: (search: string) => string;
|
|
36
|
+
export declare const createBrowserHistory: () => FlowHistory;
|
|
37
|
+
export declare const createHashHistory: () => FlowHistory;
|
|
38
|
+
export declare const createMemoryHistory: (initial?: FlowLocation) => FlowHistory;
|
|
39
|
+
//# sourceMappingURL=flow-router.d.ts.map
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
export type FlowLocation = {
|
|
2
|
+
pathname: string;
|
|
3
|
+
search: string;
|
|
4
|
+
};
|
|
5
|
+
export type FlowNavigateOptions = {
|
|
6
|
+
replace: boolean;
|
|
7
|
+
};
|
|
8
|
+
export type FlowNavigate = (location: FlowLocation, options: FlowNavigateOptions) => void;
|
|
9
|
+
export type FlowHistory = {
|
|
10
|
+
/** The current location. Returns the same object until the location changes. */
|
|
11
|
+
read: () => FlowLocation;
|
|
12
|
+
subscribe: (listener: () => void) => () => void;
|
|
13
|
+
navigate: FlowNavigate;
|
|
14
|
+
};
|
|
15
|
+
/** The screens PassflowFlow renders, keyed as in `routes`. */
|
|
16
|
+
export declare const FLOW_SCREENS: readonly ["signin", "signup", "verify_otp", "verify_magic_link", "forgot_password", "forgot_password_success", "reset_password", "invitation", "two_factor_verify", "two_factor_setup", "two_factor_setup_magic_link"];
|
|
17
|
+
export type FlowScreen = (typeof FLOW_SCREENS)[number];
|
|
18
|
+
export type FlowMatch = {
|
|
19
|
+
screen: FlowScreen;
|
|
20
|
+
params: Record<string, string>;
|
|
21
|
+
};
|
|
22
|
+
/** `'/auth/'` → `'/auth'`, `'auth'` → `'/auth'`, `'/'` or `''` → `''`. */
|
|
23
|
+
export declare const normalizePrefix: (prefix: string | undefined) => string;
|
|
24
|
+
/** The screen at `pathname` under `prefix`, or null when the path is not one of the flow's screens. */
|
|
25
|
+
export declare const matchScreen: (pathname: string, prefix: string) => FlowMatch | null;
|
|
26
|
+
/**
|
|
27
|
+
* Where the flow is mounted, worked out from the first URL it sees: the part in
|
|
28
|
+
* front of a screen path (`/auth/signin` → `/auth`), or the whole path when it
|
|
29
|
+
* names no screen (`/auth` → `/auth`, `/` → `''`).
|
|
30
|
+
*/
|
|
31
|
+
export declare const detectPrefix: (pathname: string) => string;
|
|
32
|
+
/** The absolute path of a screen under `prefix`; `params` fill `:name` segments. */
|
|
33
|
+
export declare const screenPath: (screen: FlowScreen, prefix: string, params?: Record<string, string>) => string;
|
|
34
|
+
export declare const isUnderPrefix: (pathname: string, prefix: string) => boolean;
|
|
35
|
+
export declare const withQuestionMark: (search: string) => string;
|
|
36
|
+
export declare const createBrowserHistory: () => FlowHistory;
|
|
37
|
+
export declare const createHashHistory: () => FlowHistory;
|
|
38
|
+
export declare const createMemoryHistory: (initial?: FlowLocation) => FlowHistory;
|
|
39
|
+
//# sourceMappingURL=flow-router.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"flow-router.d.ts","sourceRoot":"","sources":["../../../../../src/components/flow/passflow/flow-router.ts"],"names":[],"mappings":"AAaA,MAAM,MAAM,YAAY,GAAG;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAChE,MAAM,MAAM,mBAAmB,GAAG;IAAE,OAAO,EAAE,OAAO,CAAA;CAAE,CAAC;AACvD,MAAM,MAAM,YAAY,GAAG,CAAC,QAAQ,EAAE,YAAY,EAAE,OAAO,EAAE,mBAAmB,KAAK,IAAI,CAAC;AAE1F,MAAM,MAAM,WAAW,GAAG;IACxB,gFAAgF;IAChF,IAAI,EAAE,MAAM,YAAY,CAAC;IACzB,SAAS,EAAE,CAAC,QAAQ,EAAE,MAAM,IAAI,KAAK,MAAM,IAAI,CAAC;IAChD,QAAQ,EAAE,YAAY,CAAC;CACxB,CAAC;AAEF,8DAA8D;AAC9D,eAAO,MAAM,YAAY,wNAY4B,CAAC;AAEtD,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,YAAY,CAAC,CAAC,MAAM,CAAC,CAAC;AAEvD,MAAM,MAAM,SAAS,GAAG;IAAE,MAAM,EAAE,UAAU,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAAE,CAAC;AA4B/E,0EAA0E;AAC1E,eAAO,MAAM,eAAe,WAAY,MAAM,GAAG,SAAS,KAAG,MAG5D,CAAC;AAIF,uGAAuG;AACvG,eAAO,MAAM,WAAW,aAAc,MAAM,UAAU,MAAM,KAAG,SAAS,GAAG,IAW1E,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,YAAY,aAAc,MAAM,KAAG,MAO/C,CAAC;AAEF,oFAAoF;AACpF,eAAO,MAAM,UAAU,WAAY,UAAU,UAAU,MAAM,WAAU,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,KAAQ,MACc,CAAC;AAEpH,eAAO,MAAM,aAAa,aAAc,MAAM,UAAU,MAAM,YACa,CAAC;AAE5E,eAAO,MAAM,gBAAgB,WAAY,MAAM,WAAgE,CAAC;AAsBhH,eAAO,MAAM,oBAAoB,QAAO,WAWtC,CAAC;AASH,eAAO,MAAM,iBAAiB,QAAO,WASnC,CAAC;AAEH,eAAO,MAAM,mBAAmB,aAAa,YAAY,KAAmC,WAgB3F,CAAC"}
|
|
@@ -1,16 +1,38 @@
|
|
|
1
1
|
import type { SuccessAuthRedirect } from '../../../types/index.cjs';
|
|
2
|
-
|
|
2
|
+
import { type FlowLocation, type FlowNavigate } from './flow-router.cjs';
|
|
3
|
+
export type { FlowLocation as PassflowFlowLocation, FlowNavigate as PassflowFlowNavigate } from './flow-router.cjs';
|
|
4
|
+
type PassflowBaseProps = {
|
|
3
5
|
successAuthRedirect?: SuccessAuthRedirect;
|
|
4
6
|
federatedDisplayMode?: 'modal' | 'redirect';
|
|
5
7
|
error?: string;
|
|
6
8
|
relyingPartyId?: string;
|
|
9
|
+
/**
|
|
10
|
+
* Where the flow is mounted, such as `/auth`: its screens are then `/auth/signin`,
|
|
11
|
+
* `/auth/signup`, and so on. Leave it out and the flow works it out from the first
|
|
12
|
+
* URL it sees (`/auth/signin` or `/auth` → `/auth`; `/` → none).
|
|
13
|
+
*/
|
|
7
14
|
pathPrefix?: string;
|
|
8
15
|
/**
|
|
9
|
-
* The
|
|
10
|
-
*
|
|
16
|
+
* The history the flow keeps when the app does not pass `location`. `browser`
|
|
17
|
+
* (the default) uses the address bar, on its own or inside the app's router;
|
|
18
|
+
* `hash` keeps the flow's path after `#`; `memory` leaves the URL alone.
|
|
11
19
|
*/
|
|
12
20
|
routerType?: 'browser' | 'hash' | 'memory';
|
|
21
|
+
/** @deprecated Never had an effect. Use `pathPrefix`. */
|
|
13
22
|
basename?: string;
|
|
14
23
|
};
|
|
24
|
+
export type PassflowProps = PassflowBaseProps & ({
|
|
25
|
+
location?: undefined;
|
|
26
|
+
navigate?: undefined;
|
|
27
|
+
} | {
|
|
28
|
+
/**
|
|
29
|
+
* Full control: the app's router owns the location. Pass its current
|
|
30
|
+
* `{ pathname, search }` and a `navigate` that moves it; `routerType` is then
|
|
31
|
+
* not used. Not needed for an app router in browser mode, which the default
|
|
32
|
+
* already follows.
|
|
33
|
+
*/
|
|
34
|
+
location: FlowLocation;
|
|
35
|
+
navigate: FlowNavigate;
|
|
36
|
+
});
|
|
15
37
|
export declare const PassflowFlow: (props: PassflowProps) => import("react").JSX.Element | null;
|
|
16
38
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,16 +1,38 @@
|
|
|
1
1
|
import type { SuccessAuthRedirect } from '../../../types/index.js';
|
|
2
|
-
|
|
2
|
+
import { type FlowLocation, type FlowNavigate } from './flow-router.js';
|
|
3
|
+
export type { FlowLocation as PassflowFlowLocation, FlowNavigate as PassflowFlowNavigate } from './flow-router.js';
|
|
4
|
+
type PassflowBaseProps = {
|
|
3
5
|
successAuthRedirect?: SuccessAuthRedirect;
|
|
4
6
|
federatedDisplayMode?: 'modal' | 'redirect';
|
|
5
7
|
error?: string;
|
|
6
8
|
relyingPartyId?: string;
|
|
9
|
+
/**
|
|
10
|
+
* Where the flow is mounted, such as `/auth`: its screens are then `/auth/signin`,
|
|
11
|
+
* `/auth/signup`, and so on. Leave it out and the flow works it out from the first
|
|
12
|
+
* URL it sees (`/auth/signin` or `/auth` → `/auth`; `/` → none).
|
|
13
|
+
*/
|
|
7
14
|
pathPrefix?: string;
|
|
8
15
|
/**
|
|
9
|
-
* The
|
|
10
|
-
*
|
|
16
|
+
* The history the flow keeps when the app does not pass `location`. `browser`
|
|
17
|
+
* (the default) uses the address bar, on its own or inside the app's router;
|
|
18
|
+
* `hash` keeps the flow's path after `#`; `memory` leaves the URL alone.
|
|
11
19
|
*/
|
|
12
20
|
routerType?: 'browser' | 'hash' | 'memory';
|
|
21
|
+
/** @deprecated Never had an effect. Use `pathPrefix`. */
|
|
13
22
|
basename?: string;
|
|
14
23
|
};
|
|
24
|
+
export type PassflowProps = PassflowBaseProps & ({
|
|
25
|
+
location?: undefined;
|
|
26
|
+
navigate?: undefined;
|
|
27
|
+
} | {
|
|
28
|
+
/**
|
|
29
|
+
* Full control: the app's router owns the location. Pass its current
|
|
30
|
+
* `{ pathname, search }` and a `navigate` that moves it; `routerType` is then
|
|
31
|
+
* not used. Not needed for an app router in browser mode, which the default
|
|
32
|
+
* already follows.
|
|
33
|
+
*/
|
|
34
|
+
location: FlowLocation;
|
|
35
|
+
navigate: FlowNavigate;
|
|
36
|
+
});
|
|
15
37
|
export declare const PassflowFlow: (props: PassflowProps) => import("react").JSX.Element | null;
|
|
16
38
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/flow/passflow/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/flow/passflow/index.tsx"],"names":[],"mappings":"AAeA,OAAO,oBAAoB,CAAC;AAI5B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAEnD,OAAO,EAOL,KAAK,YAAY,EAEjB,KAAK,YAAY,EAOlB,MAAM,eAAe,CAAC;AAEvB,YAAY,EAAE,YAAY,IAAI,oBAAoB,EAAE,YAAY,IAAI,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAEhH,KAAK,iBAAiB,GAAG;IACvB,mBAAmB,CAAC,EAAE,mBAAmB,CAAC;IAC1C,oBAAoB,CAAC,EAAE,OAAO,GAAG,UAAU,CAAC;IAC5C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;;OAIG;IACH,UAAU,CAAC,EAAE,SAAS,GAAG,MAAM,GAAG,QAAQ,CAAC;IAC3C,yDAAyD;IACzD,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG,iBAAiB,GAC3C,CACI;IACE,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB,GACD;IACE;;;;;OAKG;IACH,QAAQ,EAAE,YAAY,CAAC;IACvB,QAAQ,EAAE,YAAY,CAAC;CACxB,CACJ,CAAC;AAuOJ,eAAO,MAAM,YAAY,8DAA6C,CAAC"}
|
|
@@ -8,6 +8,11 @@ type MagicLinkError = NonNullable<UseTwoFactorSetupMagicLinkReturn['error']>;
|
|
|
8
8
|
* Props for TwoFactorSetupMagicLinkFlow component
|
|
9
9
|
*/
|
|
10
10
|
export type TwoFactorSetupMagicLinkFlowProps = {
|
|
11
|
+
/**
|
|
12
|
+
* The magic-link token. Leave it out and it is read from the URL: the path
|
|
13
|
+
* segment after `/two-factor-setup-magic-link/` (or the same after `#`).
|
|
14
|
+
*/
|
|
15
|
+
token?: string;
|
|
11
16
|
/** Callback after successful setup */
|
|
12
17
|
onSuccess?: () => void;
|
|
13
18
|
/** Callback on validation error */
|
|
@@ -21,7 +26,7 @@ export type TwoFactorSetupMagicLinkFlowProps = {
|
|
|
21
26
|
* Flow component for magic link 2FA setup
|
|
22
27
|
*
|
|
23
28
|
* This component:
|
|
24
|
-
* 1.
|
|
29
|
+
* 1. Takes the token from its `token` prop, or from the URL
|
|
25
30
|
* 2. Validates token via useTwoFactorSetupMagicLink hook
|
|
26
31
|
* 3. Shows loading state during validation
|
|
27
32
|
* 4. Shows error UI if validation fails
|
|
@@ -8,6 +8,11 @@ type MagicLinkError = NonNullable<UseTwoFactorSetupMagicLinkReturn['error']>;
|
|
|
8
8
|
* Props for TwoFactorSetupMagicLinkFlow component
|
|
9
9
|
*/
|
|
10
10
|
export type TwoFactorSetupMagicLinkFlowProps = {
|
|
11
|
+
/**
|
|
12
|
+
* The magic-link token. Leave it out and it is read from the URL: the path
|
|
13
|
+
* segment after `/two-factor-setup-magic-link/` (or the same after `#`).
|
|
14
|
+
*/
|
|
15
|
+
token?: string;
|
|
11
16
|
/** Callback after successful setup */
|
|
12
17
|
onSuccess?: () => void;
|
|
13
18
|
/** Callback on validation error */
|
|
@@ -21,7 +26,7 @@ export type TwoFactorSetupMagicLinkFlowProps = {
|
|
|
21
26
|
* Flow component for magic link 2FA setup
|
|
22
27
|
*
|
|
23
28
|
* This component:
|
|
24
|
-
* 1.
|
|
29
|
+
* 1. Takes the token from its `token` prop, or from the URL
|
|
25
30
|
* 2. Validates token via useTwoFactorSetupMagicLink hook
|
|
26
31
|
* 3. Shows loading state during validation
|
|
27
32
|
* 4. Shows error UI if validation fails
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/flow/two-factor-setup-magic-link/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/flow/two-factor-setup-magic-link/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAMhC,OAAO,EAAE,KAAK,gCAAgC,EAA6C,MAAM,SAAS,CAAC;AAE3G,OAAO,oBAAoB,CAAC;AAE5B;;GAEG;AACH,KAAK,cAAc,GAAG,WAAW,CAAC,gCAAgC,CAAC,OAAO,CAAC,CAAC,CAAC;AAE7E;;GAEG;AACH,MAAM,MAAM,gCAAgC,GAAG;IAC7C;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,sCAAsC;IACtC,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,mCAAmC;IACnC,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,cAAc,KAAK,IAAI,CAAC;IAC1C,sDAAsD;IACtD,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,8CAA8C;IAC9C,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAeF;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,2BAA2B,EAAE,EAAE,CAAC,gCAAgC,CAuH5E,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"forgot-password-success.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/forgot-password/forgot-password-success.tsx"],"names":[],"mappings":"AAMA,OAAO,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"forgot-password-success.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/forgot-password/forgot-password-success.tsx"],"names":[],"mappings":"AAMA,OAAO,oBAAoB,CAAC;AAU5B,eAAO,MAAM,qBAAqB,mCAuDjC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"forgot-password.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/forgot-password/forgot-password.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"forgot-password.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/forgot-password/forgot-password.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,EAAE,EAAW,MAAM,OAAO,CAAC;AASzC,OAAO,oBAAoB,CAAC;AAY5B,KAAK,eAAe,GAAG;IACrB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,yBAAyB,CAAC,EAAE,MAAM,CAAC;CACpC,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,EAAE,CAAC,eAAe,CAgM9C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/invitation-join/index.tsx"],"names":[],"mappings":"AASA,MAAM,MAAM,mBAAmB,GAAG;IAChC,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/invitation-join/index.tsx"],"names":[],"mappings":"AASA,MAAM,MAAM,mBAAmB,GAAG;IAChC,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AA4EF,eAAO,MAAM,cAAc,oEAAgD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/reset-password/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAehC,OAAO,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/reset-password/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAehC,OAAO,oBAAoB,CAAC;AAG5B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAUnD,KAAK,cAAc,GAAG;IACpB,mBAAmB,CAAC,EAAE,mBAAmB,CAAC;IAC1C,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B,CAAC;AAMF,eAAO,MAAM,aAAa,EAAE,EAAE,CAAC,cAAc,CAiJ5C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/signin/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/signin/index.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAQhC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAkDnD,MAAM,MAAM,OAAO,GAAG;IACpB,mBAAmB,CAAC,EAAE,mBAAmB,CAAC;IAC1C,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,oBAAoB,CAAC,EAAE,OAAO,GAAG,UAAU,CAAC;IAC5C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,EAAE,CAAC,OAAO,CAyLlC,CAAC;AAEF,eAAO,MAAM,MAAM,wDAAwC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/signup/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/signup/index.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAQhC,OAAO,KAAK,EAAiB,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAsDlE,MAAM,MAAM,OAAO,GAAG;IACpB,mBAAmB,CAAC,EAAE,mBAAmB,CAAC;IAC1C,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,oBAAoB,CAAC,EAAE,OAAO,GAAG,UAAU,CAAC;IAC5C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,EAAE,CAAC,OAAO,CAuKlC,CAAC;AAEF,eAAO,MAAM,MAAM,wDAAwC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"two-factor-verify-form.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/two-factor-verify/two-factor-verify-form.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAa,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"two-factor-verify-form.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/two-factor-verify/two-factor-verify-form.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAa,MAAM,OAAO,CAAC;AAO3C,OAAO,oBAAoB,CAAC;AAE5B,KAAK,wBAAwB,GAAG;IAC9B,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,oEAAoE;IACpE,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B,CAAC;AAKF,eAAO,MAAM,mBAAmB,EAAE,EAAE,CAAC,wBAAwB,CAiN5D,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"verify-challenge-magic-link.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/verify-challenge/verify-challenge-magic-link.tsx"],"names":[],"mappings":"AAKA,OAAO,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"verify-challenge-magic-link.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/verify-challenge/verify-challenge-magic-link.tsx"],"names":[],"mappings":"AAKA,OAAO,oBAAoB,CAAC;AAQ5B,eAAO,MAAM,wBAAwB,mCAyDpC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"verify-challenge-otp-manual.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/verify-challenge/verify-challenge-otp-manual.tsx"],"names":[],"mappings":"AAQA,OAAO,EAAE,KAAK,EAAE,EAA8B,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"verify-challenge-otp-manual.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/verify-challenge/verify-challenge-otp-manual.tsx"],"names":[],"mappings":"AAQA,OAAO,EAAE,KAAK,EAAE,EAA8B,MAAM,OAAO,CAAC;AAS5D,OAAO,oBAAoB,CAAC;AAE5B,KAAK,6BAA6B,GAAG;IACnC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,IAAI,EAAE,cAAc,GAAG,SAAS,GAAG,IAAI,CAAC;IACxC,SAAS,EAAE,MAAM,CAAC;IAClB,eAAe,EAAE,OAAO,CAAC;IACzB,UAAU,EAAE,MAAM,CAAC;IACnB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B,CAAC;AAOF,eAAO,MAAM,wBAAwB,EAAE,EAAE,CAAC,6BAA6B,CAgItE,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { FC } from 'react';
|
|
2
2
|
export type FieldOtpCharset = 'numeric' | 'alphanumeric';
|
|
3
3
|
export type FieldOtpState = 'default' | 'error' | 'disabled';
|
|
4
|
-
|
|
4
|
+
type FieldOtpBaseProps = {
|
|
5
5
|
/** Id of the one real `<input>`; the boxes are drawn from its value. */
|
|
6
6
|
id: string;
|
|
7
7
|
/** Form field name, for a native form submit. */
|
|
@@ -16,20 +16,33 @@ export type FieldOtpProps = {
|
|
|
16
16
|
charset?: FieldOtpCharset;
|
|
17
17
|
/** `error` marks the code invalid (`aria-invalid`); `disabled` locks it. Default `default`. */
|
|
18
18
|
state?: FieldOtpState;
|
|
19
|
-
/** Id of the element that names the code field (a prompt, heading or hidden label). */
|
|
20
|
-
labelledBy: string;
|
|
21
19
|
/** Id of the element that describes it, such as the error message. */
|
|
22
20
|
describedBy?: string;
|
|
23
21
|
autoFocus?: boolean;
|
|
24
22
|
};
|
|
23
|
+
/**
|
|
24
|
+
* The code field is named either by a visible label it draws itself (`label`),
|
|
25
|
+
* or by an element the screen already shows (`labelledBy`), never both. A
|
|
26
|
+
* hidden-only name fails axe `label-title-only` once `describedBy` is set.
|
|
27
|
+
*/
|
|
28
|
+
export type FieldOtpProps = FieldOtpBaseProps & ({
|
|
29
|
+
/** Visible prompt drawn above the boxes, as the field's `<label>`. */
|
|
30
|
+
label: string;
|
|
31
|
+
labelledBy?: never;
|
|
32
|
+
} | {
|
|
33
|
+
/** Id of a visible element on the screen that names the code field, such as a prompt or heading. */
|
|
34
|
+
labelledBy: string;
|
|
35
|
+
label?: never;
|
|
36
|
+
});
|
|
25
37
|
/**
|
|
26
38
|
* A one-time code entered as a row of boxes.
|
|
27
39
|
*
|
|
28
40
|
* There is one real `<input>` (named, `autocomplete="one-time-code"`), so SMS
|
|
29
41
|
* autofill, password managers and pasting a whole code all work. The boxes are
|
|
30
|
-
* a drawing of its value, hidden from assistive technology.
|
|
31
|
-
*
|
|
32
|
-
*
|
|
42
|
+
* a drawing of its value, hidden from assistive technology. With `label` the
|
|
43
|
+
* field draws its own visible label above the boxes; with `labelledBy` it is
|
|
44
|
+
* named by a prompt the screen already shows.
|
|
33
45
|
*/
|
|
34
46
|
export declare const FieldOtp: FC<FieldOtpProps>;
|
|
47
|
+
export {};
|
|
35
48
|
//# sourceMappingURL=field-otp.d.ts.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { FC } from 'react';
|
|
2
2
|
export type FieldOtpCharset = 'numeric' | 'alphanumeric';
|
|
3
3
|
export type FieldOtpState = 'default' | 'error' | 'disabled';
|
|
4
|
-
|
|
4
|
+
type FieldOtpBaseProps = {
|
|
5
5
|
/** Id of the one real `<input>`; the boxes are drawn from its value. */
|
|
6
6
|
id: string;
|
|
7
7
|
/** Form field name, for a native form submit. */
|
|
@@ -16,20 +16,33 @@ export type FieldOtpProps = {
|
|
|
16
16
|
charset?: FieldOtpCharset;
|
|
17
17
|
/** `error` marks the code invalid (`aria-invalid`); `disabled` locks it. Default `default`. */
|
|
18
18
|
state?: FieldOtpState;
|
|
19
|
-
/** Id of the element that names the code field (a prompt, heading or hidden label). */
|
|
20
|
-
labelledBy: string;
|
|
21
19
|
/** Id of the element that describes it, such as the error message. */
|
|
22
20
|
describedBy?: string;
|
|
23
21
|
autoFocus?: boolean;
|
|
24
22
|
};
|
|
23
|
+
/**
|
|
24
|
+
* The code field is named either by a visible label it draws itself (`label`),
|
|
25
|
+
* or by an element the screen already shows (`labelledBy`), never both. A
|
|
26
|
+
* hidden-only name fails axe `label-title-only` once `describedBy` is set.
|
|
27
|
+
*/
|
|
28
|
+
export type FieldOtpProps = FieldOtpBaseProps & ({
|
|
29
|
+
/** Visible prompt drawn above the boxes, as the field's `<label>`. */
|
|
30
|
+
label: string;
|
|
31
|
+
labelledBy?: never;
|
|
32
|
+
} | {
|
|
33
|
+
/** Id of a visible element on the screen that names the code field, such as a prompt or heading. */
|
|
34
|
+
labelledBy: string;
|
|
35
|
+
label?: never;
|
|
36
|
+
});
|
|
25
37
|
/**
|
|
26
38
|
* A one-time code entered as a row of boxes.
|
|
27
39
|
*
|
|
28
40
|
* There is one real `<input>` (named, `autocomplete="one-time-code"`), so SMS
|
|
29
41
|
* autofill, password managers and pasting a whole code all work. The boxes are
|
|
30
|
-
* a drawing of its value, hidden from assistive technology.
|
|
31
|
-
*
|
|
32
|
-
*
|
|
42
|
+
* a drawing of its value, hidden from assistive technology. With `label` the
|
|
43
|
+
* field draws its own visible label above the boxes; with `labelledBy` it is
|
|
44
|
+
* named by a prompt the screen already shows.
|
|
33
45
|
*/
|
|
34
46
|
export declare const FieldOtp: FC<FieldOtpProps>;
|
|
47
|
+
export {};
|
|
35
48
|
//# sourceMappingURL=field-otp.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"field-otp.d.ts","sourceRoot":"","sources":["../../../../../src/components/ui/fields/field-otp.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAEhC,OAAO,oBAAoB,CAAC;AAC5B,OAAO,iBAAiB,CAAC;AAEzB,MAAM,MAAM,eAAe,GAAG,SAAS,GAAG,cAAc,CAAC;AAEzD,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,OAAO,GAAG,UAAU,CAAC;AAE7D,
|
|
1
|
+
{"version":3,"file":"field-otp.d.ts","sourceRoot":"","sources":["../../../../../src/components/ui/fields/field-otp.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAEhC,OAAO,oBAAoB,CAAC;AAC5B,OAAO,iBAAiB,CAAC;AAEzB,MAAM,MAAM,eAAe,GAAG,SAAS,GAAG,cAAc,CAAC;AAEzD,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,OAAO,GAAG,UAAU,CAAC;AAE7D,KAAK,iBAAiB,GAAG;IACvB,wEAAwE;IACxE,EAAE,EAAE,MAAM,CAAC;IACX,iDAAiD;IACjD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,4DAA4D;IAC5D,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,wDAAwD;IACxD,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC,2FAA2F;IAC3F,OAAO,CAAC,EAAE,eAAe,CAAC;IAC1B,+FAA+F;IAC/F,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,sEAAsE;IACtE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,aAAa,GAAG,iBAAiB,GAC3C,CACI;IACE,sEAAsE;IACtE,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,KAAK,CAAC;CACpB,GACD;IACE,oGAAoG;IACpG,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC;CACf,CACJ,CAAC;AAsBJ;;;;;;;;GAQG;AACH,eAAO,MAAM,QAAQ,EAAE,EAAE,CAAC,aAAa,CAwDtC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"field-password.d.ts","sourceRoot":"","sources":["../../../../../src/components/ui/fields/field-password.tsx"],"names":[],"mappings":"AACA,OAAO,EAAc,KAAK,mBAAmB,EAAY,MAAM,OAAO,CAAC;AAEvE,OAAO,oBAAoB,CAAC;AAC5B,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"field-password.d.ts","sourceRoot":"","sources":["../../../../../src/components/ui/fields/field-password.tsx"],"names":[],"mappings":"AACA,OAAO,EAAc,KAAK,mBAAmB,EAAY,MAAM,OAAO,CAAC;AAEvE,OAAO,oBAAoB,CAAC;AAC5B,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,gBAAgB,CAAC;AA+BrE,eAAO,MAAM,aAAa;QA3BpB,MAAM;WACH,MAAM;oBACG,8BAA8B,GAAG,IAAI;mBACtC,OAAO;uBACH,MAAM,GAAG,MAAM,EAAE;cAC1B,OAAO;gBACL,MAAM;eACP,OAAO;oDA+HnB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"field-phone.d.ts","sourceRoot":"","sources":["../../../../../src/components/ui/fields/field-phone.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"field-phone.d.ts","sourceRoot":"","sources":["../../../../../src/components/ui/fields/field-phone.tsx"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,WAAW,EAChB,KAAK,EAAE,EACP,KAAK,mBAAmB,EAMzB,MAAM,OAAO,CAAC;AAMf,OAAO,oBAAoB,CAAC;AAC5B,OAAO,qCAAqC,CAAC;AAE7C,KAAK,WAAW,GAAG,mBAAmB,CAAC,gBAAgB,CAAC,GAAG;IACzD,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,CAAC,KAAK,EAAE,WAAW,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;IACzD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,GAAG,CAAC,EAAE,IAAI,CAAC;CACZ,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,EAAE,CAAC,WAAW,CAuNtC,CAAC"}
|
|
@@ -2,5 +2,6 @@ export * from './auth-context.cjs';
|
|
|
2
2
|
export * from './navigation-context.cjs';
|
|
3
3
|
export * from './passflow-context.cjs';
|
|
4
4
|
export * from './router-context.cjs';
|
|
5
|
+
export * from './search-context.cjs';
|
|
5
6
|
export * from './upgrade-context.cjs';
|
|
6
7
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -2,5 +2,6 @@ export * from './auth-context.js';
|
|
|
2
2
|
export * from './navigation-context.js';
|
|
3
3
|
export * from './passflow-context.js';
|
|
4
4
|
export * from './router-context.js';
|
|
5
|
+
export * from './search-context.js';
|
|
5
6
|
export * from './upgrade-context.js';
|
|
6
7
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/context/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/context/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Where the forms read and write their search params (`?challenge_id=…`).
|
|
3
|
+
*
|
|
4
|
+
* Outside PassflowFlow it is the address bar, as it always was. Inside, PassflowFlow
|
|
5
|
+
* provides its own location, so the forms see the right params when the flow keeps a
|
|
6
|
+
* memory or hash history, or is driven by an app router that does not use the address
|
|
7
|
+
* bar. In the default browser mode both are the same URL.
|
|
8
|
+
*/
|
|
9
|
+
export type SearchSource = {
|
|
10
|
+
/** The current search string, with its leading `?` or empty. */
|
|
11
|
+
read: () => string;
|
|
12
|
+
/** Moves to the same path with a new search string. */
|
|
13
|
+
write: (search: string, options: {
|
|
14
|
+
replace: boolean;
|
|
15
|
+
}) => void;
|
|
16
|
+
};
|
|
17
|
+
export declare const addressBarSearch: SearchSource;
|
|
18
|
+
export declare const SearchContext: import("react").Context<SearchSource>;
|
|
19
|
+
export declare const useSearchSource: () => SearchSource;
|
|
20
|
+
//# sourceMappingURL=search-context.d.ts.map
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Where the forms read and write their search params (`?challenge_id=…`).
|
|
3
|
+
*
|
|
4
|
+
* Outside PassflowFlow it is the address bar, as it always was. Inside, PassflowFlow
|
|
5
|
+
* provides its own location, so the forms see the right params when the flow keeps a
|
|
6
|
+
* memory or hash history, or is driven by an app router that does not use the address
|
|
7
|
+
* bar. In the default browser mode both are the same URL.
|
|
8
|
+
*/
|
|
9
|
+
export type SearchSource = {
|
|
10
|
+
/** The current search string, with its leading `?` or empty. */
|
|
11
|
+
read: () => string;
|
|
12
|
+
/** Moves to the same path with a new search string. */
|
|
13
|
+
write: (search: string, options: {
|
|
14
|
+
replace: boolean;
|
|
15
|
+
}) => void;
|
|
16
|
+
};
|
|
17
|
+
export declare const addressBarSearch: SearchSource;
|
|
18
|
+
export declare const SearchContext: import("react").Context<SearchSource>;
|
|
19
|
+
export declare const useSearchSource: () => SearchSource;
|
|
20
|
+
//# sourceMappingURL=search-context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"search-context.d.ts","sourceRoot":"","sources":["../../../src/context/search-context.ts"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AACH,MAAM,MAAM,YAAY,GAAG;IACzB,gEAAgE;IAChE,IAAI,EAAE,MAAM,MAAM,CAAC;IACnB,uDAAuD;IACvD,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE;QAAE,OAAO,EAAE,OAAO,CAAA;KAAE,KAAK,IAAI,CAAC;CAChE,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,YAO9B,CAAC;AAEF,eAAO,MAAM,aAAa,uCAAgD,CAAC;AAE3E,eAAO,MAAM,eAAe,oBAAkC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-app-settings.d.ts","sourceRoot":"","sources":["../../../src/hooks/use-app-settings.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,8BAA8B,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"use-app-settings.d.ts","sourceRoot":"","sources":["../../../src/hooks/use-app-settings.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,8BAA8B,EAAE,MAAM,gBAAgB,CAAC;AAMtH,MAAM,MAAM,mBAAmB,GAAG,MAAM;IACtC,WAAW,EAAE,WAAW,GAAG,IAAI,CAAC;IAChC,cAAc,EAAE,8BAA8B,GAAG,IAAI,CAAC;IACtD,SAAS,EAAE,OAAO,CAAC;IACnB,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,gBAAgB,GAAG,IAAI,CAAC;IACvC,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,sBAAsB,EAAE,OAAO,CAAC;IAChC,aAAa,CAAC,EAAE,gBAAgB,CAAC;CAClC,CAAC;AAMF,eAAO,MAAM,cAAc,EAAE,mBAuN5B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cn.d.ts","sourceRoot":"","sources":["../../../src/utils/cn.ts"],"names":[],"mappings":"AAAA,OAAa,EAAE,KAAK,UAAU,EAAE,MAAM,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"cn.d.ts","sourceRoot":"","sources":["../../../src/utils/cn.ts"],"names":[],"mappings":"AAAA,OAAa,EAAE,KAAK,UAAU,EAAE,MAAM,MAAM,CAAC;AAI7C,eAAO,MAAM,EAAE,eAAgB,UAAU,EAAE,WAAkB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-auth-methods.d.ts","sourceRoot":"","sources":["../../../src/utils/get-auth-methods.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAiC,SAAS,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"get-auth-methods.d.ts","sourceRoot":"","sources":["../../../src/utils/get-auth-methods.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAiC,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE/F,MAAM,MAAM,WAAW,GAAG;IACxB,QAAQ,EAAE;QACR,QAAQ,EAAE;YACR,QAAQ,EAAE,OAAO,CAAC;SACnB,CAAC;QACF,KAAK,EAAE;YACL,QAAQ,EAAE,OAAO,CAAC;YAClB,GAAG,EAAE,OAAO,CAAC;YACb,SAAS,EAAE,OAAO,CAAC;SACpB,CAAC;QACF,KAAK,EAAE;YACL,QAAQ,EAAE,OAAO,CAAC;YAClB,GAAG,EAAE,OAAO,CAAC;YACb,SAAS,EAAE,OAAO,CAAC;SACpB,CAAC;KACH,CAAC;IACF,GAAG,EAAE;QACH,SAAS,EAAE,SAAS,EAAE,CAAC;KACxB,CAAC;IACF,OAAO,EAAE,OAAO,CAAC;IACjB,eAAe,EAAE,OAAO,CAAC;IACzB,qBAAqB,EAAE,OAAO,CAAC;IAC/B,eAAe,EAAE,OAAO,CAAC;IACzB,qBAAqB,EAAE,OAAO,CAAC;IAC/B,kBAAkB,EAAE,OAAO,CAAC;IAC5B,wBAAwB,EAAE,OAAO,CAAC;CACnC,CAAC;AAEF,eAAO,MAAM,cAAc,gBAAiB,cAAc,EAAE,KAAG,WA8E9D,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-form-labels.d.ts","sourceRoot":"","sources":["../../../src/utils/get-form-labels.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"get-form-labels.d.ts","sourceRoot":"","sources":["../../../src/utils/get-form-labels.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,gBAAgB,CAAC;AAEhE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC7C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEtD,eAAO,MAAM,gBAAgB,YAAa,WAAW,QAAQ,OAAO,GAAG,QAAQ,+GAO9E,CAAC;AAEF,eAAO,MAAM,mBAAmB,YACrB,WAAW,iBACL,aAAa,GAAG,IAAI,KAClC;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,aAAa,EAAE,yBAAyB,CAAA;CAAE,GAAG,IAYhE,CAAC;AAEF,eAAO,MAAM,wBAAwB,YAAa,WAAW,yGAM5D,CAAC"}
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Get URL parameters
|
|
2
|
+
* Get URL parameters. Inside PassflowFlow they come from the flow's location; outside it, from the
|
|
3
|
+
* address bar.
|
|
6
4
|
* @param defaultValues Default values
|
|
7
5
|
* @returns Object with methods getAll, get, set
|
|
8
6
|
*/
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Get URL parameters
|
|
2
|
+
* Get URL parameters. Inside PassflowFlow they come from the flow's location; outside it, from the
|
|
3
|
+
* address bar.
|
|
6
4
|
* @param defaultValues Default values
|
|
7
5
|
* @returns Object with methods getAll, get, set
|
|
8
6
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"url-params.d.ts","sourceRoot":"","sources":["../../../src/utils/url-params.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"url-params.d.ts","sourceRoot":"","sources":["../../../src/utils/url-params.ts"],"names":[],"mappings":"AAeA;;;;;GAKG;AACH,eAAO,MAAM,YAAY,GAAI,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,kBAAkB,CAAC;;eAuC5D,MAAM;kBASH,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;CAmB5C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/utils/validation-schemas/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/utils/validation-schemas/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,gBAAgB,CAAC;AACrE,OAAO,KAAK,GAAG,MAAM,KAAK,CAAC;AAE3B,eAAO,MAAM,UAAU,QACmI,CAAC;AAC3J,eAAO,MAAM,gBAAgB,QACyF,CAAC;AAEvH,eAAO,MAAM,kBAAkB,mBAAoB,8BAA8B,GAAG,IAAI,2DA2ClF,CAAC"}
|