@ory/elements-react 0.0.0-pr.4a28a8f → 0.0.0-pr.7af5f16
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 +60 -0
- package/dist/client/frontendClient.d.mts +5 -2
- package/dist/client/frontendClient.d.ts +5 -2
- package/dist/client/frontendClient.js +25 -2
- package/dist/client/frontendClient.js.map +1 -1
- package/dist/client/frontendClient.mjs +25 -2
- package/dist/client/frontendClient.mjs.map +1 -1
- package/dist/client/index.js +3 -3
- package/dist/index.d.mts +30 -5
- package/dist/index.d.ts +30 -5
- package/dist/index.js +304 -69
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +304 -70
- package/dist/index.mjs.map +1 -1
- package/dist/theme/default/index.css +48 -4
- package/dist/theme/default/index.css.map +1 -1
- package/dist/theme/default/index.d.mts +15 -3
- package/dist/theme/default/index.d.ts +15 -3
- package/dist/theme/default/index.js +1078 -533
- package/dist/theme/default/index.js.map +1 -1
- package/dist/theme/default/index.mjs +999 -441
- package/dist/theme/default/index.mjs.map +1 -1
- package/package.json +16 -15
- package/tailwind/generated/default-variables.css +1 -1
- package/tsconfig.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,63 @@
|
|
|
1
|
+
## 1.0.0-next.45 (2025-04-15)
|
|
2
|
+
|
|
3
|
+
### 🩹 Fixes
|
|
4
|
+
|
|
5
|
+
- add missing test id to scope checkbox label ([#437](https://github.com/ory/elements/pull/437))
|
|
6
|
+
- add missing captcha group to all methods ([#432](https://github.com/ory/elements/pull/432))
|
|
7
|
+
|
|
8
|
+
### ❤️ Thank You
|
|
9
|
+
|
|
10
|
+
- hackerman @aeneasr
|
|
11
|
+
- Jonas Hungershausen
|
|
12
|
+
|
|
13
|
+
## 1.0.0-next.44 (2025-04-10)
|
|
14
|
+
|
|
15
|
+
### 🩹 Fixes
|
|
16
|
+
|
|
17
|
+
- use currentColor in eye icons ([#433](https://github.com/ory/elements/pull/433))
|
|
18
|
+
|
|
19
|
+
### ❤️ Thank You
|
|
20
|
+
|
|
21
|
+
- Jonas Hungershausen
|
|
22
|
+
|
|
23
|
+
## 1.0.0-next.43 (2025-04-10)
|
|
24
|
+
|
|
25
|
+
### 🚀 Features
|
|
26
|
+
|
|
27
|
+
- add missing French translations ([#401](https://github.com/ory/elements/pull/401))
|
|
28
|
+
|
|
29
|
+
### 🩹 Fixes
|
|
30
|
+
|
|
31
|
+
- two-step registration back button ([#428](https://github.com/ory/elements/pull/428))
|
|
32
|
+
- resolve wcag2aa color contrast issues ([#367](https://github.com/ory/elements/pull/367))
|
|
33
|
+
|
|
34
|
+
### ❤️ Thank You
|
|
35
|
+
|
|
36
|
+
- hackerman @aeneasr
|
|
37
|
+
- Jonas Hungershausen
|
|
38
|
+
- Jordan Labrosse
|
|
39
|
+
|
|
40
|
+
## 1.0.0-next.41 (2025-04-07)
|
|
41
|
+
|
|
42
|
+
### 🩹 Fixes
|
|
43
|
+
|
|
44
|
+
- resolve wcag2aa color contrast issues ([#367](https://github.com/ory/elements/pull/367))
|
|
45
|
+
|
|
46
|
+
### ❤️ Thank You
|
|
47
|
+
|
|
48
|
+
- Jonas Hungershausen
|
|
49
|
+
- Jordan Labrosse
|
|
50
|
+
|
|
51
|
+
## 1.0.0-next.40 (2025-04-02)
|
|
52
|
+
|
|
53
|
+
### 🚀 Features
|
|
54
|
+
|
|
55
|
+
- support SAML-native ([#395](https://github.com/ory/elements/pull/395))
|
|
56
|
+
|
|
57
|
+
### ❤️ Thank You
|
|
58
|
+
|
|
59
|
+
- hackerman @aeneasr
|
|
60
|
+
|
|
1
61
|
## 1.0.0-next.39 (2025-03-25)
|
|
2
62
|
|
|
3
63
|
### 🚀 Features
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
import { ConfigurationParameters, FrontendApi } from '@ory/client-fetch';
|
|
1
|
+
import { ConfigurationParameters, FrontendApi, OAuth2Api } from '@ory/client-fetch';
|
|
2
2
|
|
|
3
3
|
declare function frontendClient({ forceBaseUrl, ...opts }?: Partial<ConfigurationParameters & {
|
|
4
4
|
forceBaseUrl?: string;
|
|
5
5
|
}>): FrontendApi;
|
|
6
|
+
declare function oauth2Client({ forceBaseUrl, ...opts }?: Partial<ConfigurationParameters & {
|
|
7
|
+
forceBaseUrl?: string;
|
|
8
|
+
}>): OAuth2Api;
|
|
6
9
|
|
|
7
|
-
export { frontendClient };
|
|
10
|
+
export { frontendClient, oauth2Client };
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
import { ConfigurationParameters, FrontendApi } from '@ory/client-fetch';
|
|
1
|
+
import { ConfigurationParameters, FrontendApi, OAuth2Api } from '@ory/client-fetch';
|
|
2
2
|
|
|
3
3
|
declare function frontendClient({ forceBaseUrl, ...opts }?: Partial<ConfigurationParameters & {
|
|
4
4
|
forceBaseUrl?: string;
|
|
5
5
|
}>): FrontendApi;
|
|
6
|
+
declare function oauth2Client({ forceBaseUrl, ...opts }?: Partial<ConfigurationParameters & {
|
|
7
|
+
forceBaseUrl?: string;
|
|
8
|
+
}>): OAuth2Api;
|
|
6
9
|
|
|
7
|
-
export { frontendClient };
|
|
10
|
+
export { frontendClient, oauth2Client };
|
|
@@ -19,7 +19,8 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
19
19
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
20
20
|
var frontendClient_exports = {};
|
|
21
21
|
__export(frontendClient_exports, {
|
|
22
|
-
frontendClient: () => frontendClient
|
|
22
|
+
frontendClient: () => frontendClient,
|
|
23
|
+
oauth2Client: () => oauth2Client
|
|
23
24
|
});
|
|
24
25
|
module.exports = __toCommonJS(frontendClient_exports);
|
|
25
26
|
var import_client_fetch = require("@ory/client-fetch");
|
|
@@ -45,8 +46,30 @@ function frontendClient({
|
|
|
45
46
|
});
|
|
46
47
|
return new import_client_fetch.FrontendApi(config);
|
|
47
48
|
}
|
|
49
|
+
function oauth2Client({
|
|
50
|
+
forceBaseUrl,
|
|
51
|
+
...opts
|
|
52
|
+
} = {
|
|
53
|
+
credentials: "include"
|
|
54
|
+
}) {
|
|
55
|
+
var _a;
|
|
56
|
+
const basePath = forceBaseUrl != null ? forceBaseUrl : (0, import_config.guessPotentiallyProxiedOrySdkUrl)({
|
|
57
|
+
knownProxiedUrl: window.location.origin
|
|
58
|
+
});
|
|
59
|
+
const config = new import_client_fetch.Configuration({
|
|
60
|
+
...opts,
|
|
61
|
+
basePath: basePath == null ? void 0 : basePath.replace(/\/$/, ""),
|
|
62
|
+
credentials: (_a = opts.credentials) != null ? _a : "include",
|
|
63
|
+
headers: {
|
|
64
|
+
Accept: "application/json",
|
|
65
|
+
...opts.headers
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
return new import_client_fetch.OAuth2Api(config);
|
|
69
|
+
}
|
|
48
70
|
// Annotate the CommonJS export names for ESM import in node:
|
|
49
71
|
0 && (module.exports = {
|
|
50
|
-
frontendClient
|
|
72
|
+
frontendClient,
|
|
73
|
+
oauth2Client
|
|
51
74
|
});
|
|
52
75
|
//# sourceMappingURL=frontendClient.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/client/frontendClient.ts"],"sourcesContent":["// Copyright © 2024 Ory Corp\n// SPDX-License-Identifier: Apache-2.0\n\"use client\"\nimport {\n Configuration,\n ConfigurationParameters,\n FrontendApi,\n} from \"@ory/client-fetch\"\nimport { guessPotentiallyProxiedOrySdkUrl } from \"./config\"\n\nexport function frontendClient(\n {\n forceBaseUrl,\n ...opts\n }: Partial<ConfigurationParameters & { forceBaseUrl?: string }> = {\n credentials: \"include\",\n },\n) {\n const basePath =\n forceBaseUrl ??\n guessPotentiallyProxiedOrySdkUrl({\n knownProxiedUrl: window.location.origin,\n })\n\n const config = new Configuration({\n ...opts,\n basePath: basePath?.replace(/\\/$/, \"\"),\n credentials: opts.credentials ?? \"include\",\n headers: {\n Accept: \"application/json\",\n ...opts.headers,\n },\n })\n return new FrontendApi(config)\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,
|
|
1
|
+
{"version":3,"sources":["../../src/client/frontendClient.ts"],"sourcesContent":["// Copyright © 2024 Ory Corp\n// SPDX-License-Identifier: Apache-2.0\n\"use client\"\nimport {\n Configuration,\n ConfigurationParameters,\n FrontendApi,\n OAuth2Api,\n} from \"@ory/client-fetch\"\nimport { guessPotentiallyProxiedOrySdkUrl } from \"./config\"\n\nexport function frontendClient(\n {\n forceBaseUrl,\n ...opts\n }: Partial<ConfigurationParameters & { forceBaseUrl?: string }> = {\n credentials: \"include\",\n },\n) {\n const basePath =\n forceBaseUrl ??\n guessPotentiallyProxiedOrySdkUrl({\n knownProxiedUrl: window.location.origin,\n })\n\n const config = new Configuration({\n ...opts,\n basePath: basePath?.replace(/\\/$/, \"\"),\n credentials: opts.credentials ?? \"include\",\n headers: {\n Accept: \"application/json\",\n ...opts.headers,\n },\n })\n return new FrontendApi(config)\n}\n\nexport function oauth2Client(\n {\n forceBaseUrl,\n ...opts\n }: Partial<ConfigurationParameters & { forceBaseUrl?: string }> = {\n credentials: \"include\",\n },\n) {\n const basePath =\n forceBaseUrl ??\n guessPotentiallyProxiedOrySdkUrl({\n knownProxiedUrl: window.location.origin,\n })\n\n const config = new Configuration({\n ...opts,\n basePath: basePath?.replace(/\\/$/, \"\"),\n credentials: opts.credentials ?? \"include\",\n headers: {\n Accept: \"application/json\",\n ...opts.headers,\n },\n })\n return new OAuth2Api(config)\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,0BAKO;AACP,oBAAiD;AAE1C,SAAS,eACd;AAAA,EACE;AAAA,EACA,GAAG;AACL,IAAkE;AAAA,EAChE,aAAa;AACf,GACA;AAlBF;AAmBE,QAAM,WACJ,0CACA,gDAAiC;AAAA,IAC/B,iBAAiB,OAAO,SAAS;AAAA,EACnC,CAAC;AAEH,QAAM,SAAS,IAAI,kCAAc;AAAA,IAC/B,GAAG;AAAA,IACH,UAAU,qCAAU,QAAQ,OAAO;AAAA,IACnC,cAAa,UAAK,gBAAL,YAAoB;AAAA,IACjC,SAAS;AAAA,MACP,QAAQ;AAAA,MACR,GAAG,KAAK;AAAA,IACV;AAAA,EACF,CAAC;AACD,SAAO,IAAI,gCAAY,MAAM;AAC/B;AAEO,SAAS,aACd;AAAA,EACE;AAAA,EACA,GAAG;AACL,IAAkE;AAAA,EAChE,aAAa;AACf,GACA;AA5CF;AA6CE,QAAM,WACJ,0CACA,gDAAiC;AAAA,IAC/B,iBAAiB,OAAO,SAAS;AAAA,EACnC,CAAC;AAEH,QAAM,SAAS,IAAI,kCAAc;AAAA,IAC/B,GAAG;AAAA,IACH,UAAU,qCAAU,QAAQ,OAAO;AAAA,IACnC,cAAa,UAAK,gBAAL,YAAoB;AAAA,IACjC,SAAS;AAAA,MACP,QAAQ;AAAA,MACR,GAAG,KAAK;AAAA,IACV;AAAA,EACF,CAAC;AACD,SAAO,IAAI,8BAAU,MAAM;AAC7B;","names":[]}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
Configuration,
|
|
4
|
-
FrontendApi
|
|
4
|
+
FrontendApi,
|
|
5
|
+
OAuth2Api
|
|
5
6
|
} from "@ory/client-fetch";
|
|
6
7
|
import { guessPotentiallyProxiedOrySdkUrl } from "./config";
|
|
7
8
|
function frontendClient({
|
|
@@ -25,7 +26,29 @@ function frontendClient({
|
|
|
25
26
|
});
|
|
26
27
|
return new FrontendApi(config);
|
|
27
28
|
}
|
|
29
|
+
function oauth2Client({
|
|
30
|
+
forceBaseUrl,
|
|
31
|
+
...opts
|
|
32
|
+
} = {
|
|
33
|
+
credentials: "include"
|
|
34
|
+
}) {
|
|
35
|
+
var _a;
|
|
36
|
+
const basePath = forceBaseUrl != null ? forceBaseUrl : guessPotentiallyProxiedOrySdkUrl({
|
|
37
|
+
knownProxiedUrl: window.location.origin
|
|
38
|
+
});
|
|
39
|
+
const config = new Configuration({
|
|
40
|
+
...opts,
|
|
41
|
+
basePath: basePath == null ? void 0 : basePath.replace(/\/$/, ""),
|
|
42
|
+
credentials: (_a = opts.credentials) != null ? _a : "include",
|
|
43
|
+
headers: {
|
|
44
|
+
Accept: "application/json",
|
|
45
|
+
...opts.headers
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
return new OAuth2Api(config);
|
|
49
|
+
}
|
|
28
50
|
export {
|
|
29
|
-
frontendClient
|
|
51
|
+
frontendClient,
|
|
52
|
+
oauth2Client
|
|
30
53
|
};
|
|
31
54
|
//# sourceMappingURL=frontendClient.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/client/frontendClient.ts"],"sourcesContent":["// Copyright © 2024 Ory Corp\n// SPDX-License-Identifier: Apache-2.0\n\"use client\"\nimport {\n Configuration,\n ConfigurationParameters,\n FrontendApi,\n} from \"@ory/client-fetch\"\nimport { guessPotentiallyProxiedOrySdkUrl } from \"./config\"\n\nexport function frontendClient(\n {\n forceBaseUrl,\n ...opts\n }: Partial<ConfigurationParameters & { forceBaseUrl?: string }> = {\n credentials: \"include\",\n },\n) {\n const basePath =\n forceBaseUrl ??\n guessPotentiallyProxiedOrySdkUrl({\n knownProxiedUrl: window.location.origin,\n })\n\n const config = new Configuration({\n ...opts,\n basePath: basePath?.replace(/\\/$/, \"\"),\n credentials: opts.credentials ?? \"include\",\n headers: {\n Accept: \"application/json\",\n ...opts.headers,\n },\n })\n return new FrontendApi(config)\n}\n"],"mappings":";AAGA;AAAA,EACE;AAAA,EAEA;AAAA,OACK;AACP,SAAS,wCAAwC;AAE1C,SAAS,eACd;AAAA,EACE;AAAA,EACA,GAAG;AACL,IAAkE;AAAA,EAChE,aAAa;AACf,GACA;
|
|
1
|
+
{"version":3,"sources":["../../src/client/frontendClient.ts"],"sourcesContent":["// Copyright © 2024 Ory Corp\n// SPDX-License-Identifier: Apache-2.0\n\"use client\"\nimport {\n Configuration,\n ConfigurationParameters,\n FrontendApi,\n OAuth2Api,\n} from \"@ory/client-fetch\"\nimport { guessPotentiallyProxiedOrySdkUrl } from \"./config\"\n\nexport function frontendClient(\n {\n forceBaseUrl,\n ...opts\n }: Partial<ConfigurationParameters & { forceBaseUrl?: string }> = {\n credentials: \"include\",\n },\n) {\n const basePath =\n forceBaseUrl ??\n guessPotentiallyProxiedOrySdkUrl({\n knownProxiedUrl: window.location.origin,\n })\n\n const config = new Configuration({\n ...opts,\n basePath: basePath?.replace(/\\/$/, \"\"),\n credentials: opts.credentials ?? \"include\",\n headers: {\n Accept: \"application/json\",\n ...opts.headers,\n },\n })\n return new FrontendApi(config)\n}\n\nexport function oauth2Client(\n {\n forceBaseUrl,\n ...opts\n }: Partial<ConfigurationParameters & { forceBaseUrl?: string }> = {\n credentials: \"include\",\n },\n) {\n const basePath =\n forceBaseUrl ??\n guessPotentiallyProxiedOrySdkUrl({\n knownProxiedUrl: window.location.origin,\n })\n\n const config = new Configuration({\n ...opts,\n basePath: basePath?.replace(/\\/$/, \"\"),\n credentials: opts.credentials ?? \"include\",\n headers: {\n Accept: \"application/json\",\n ...opts.headers,\n },\n })\n return new OAuth2Api(config)\n}\n"],"mappings":";AAGA;AAAA,EACE;AAAA,EAEA;AAAA,EACA;AAAA,OACK;AACP,SAAS,wCAAwC;AAE1C,SAAS,eACd;AAAA,EACE;AAAA,EACA,GAAG;AACL,IAAkE;AAAA,EAChE,aAAa;AACf,GACA;AAlBF;AAmBE,QAAM,WACJ,sCACA,iCAAiC;AAAA,IAC/B,iBAAiB,OAAO,SAAS;AAAA,EACnC,CAAC;AAEH,QAAM,SAAS,IAAI,cAAc;AAAA,IAC/B,GAAG;AAAA,IACH,UAAU,qCAAU,QAAQ,OAAO;AAAA,IACnC,cAAa,UAAK,gBAAL,YAAoB;AAAA,IACjC,SAAS;AAAA,MACP,QAAQ;AAAA,MACR,GAAG,KAAK;AAAA,IACV;AAAA,EACF,CAAC;AACD,SAAO,IAAI,YAAY,MAAM;AAC/B;AAEO,SAAS,aACd;AAAA,EACE;AAAA,EACA,GAAG;AACL,IAAkE;AAAA,EAChE,aAAa;AACf,GACA;AA5CF;AA6CE,QAAM,WACJ,sCACA,iCAAiC;AAAA,IAC/B,iBAAiB,OAAO,SAAS;AAAA,EACnC,CAAC;AAEH,QAAM,SAAS,IAAI,cAAc;AAAA,IAC/B,GAAG;AAAA,IACH,UAAU,qCAAU,QAAQ,OAAO;AAAA,IACnC,cAAa,UAAK,gBAAL,YAAoB;AAAA,IACjC,SAAS;AAAA,MACP,QAAQ;AAAA,MACR,GAAG,KAAK;AAAA,IACV;AAAA,EACF,CAAC;AACD,SAAO,IAAI,UAAU,MAAM;AAC7B;","names":[]}
|
package/dist/client/index.js
CHANGED
|
@@ -17,12 +17,12 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
17
|
return to;
|
|
18
18
|
};
|
|
19
19
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
20
|
-
var
|
|
21
|
-
__export(
|
|
20
|
+
var index_exports = {};
|
|
21
|
+
__export(index_exports, {
|
|
22
22
|
SessionProvider: () => import_session_provider.SessionProvider,
|
|
23
23
|
useSession: () => import_useSession.useSession
|
|
24
24
|
});
|
|
25
|
-
module.exports = __toCommonJS(
|
|
25
|
+
module.exports = __toCommonJS(index_exports);
|
|
26
26
|
var import_session_provider = require("./session-provider");
|
|
27
27
|
var import_useSession = require("./useSession");
|
|
28
28
|
// Annotate the CommonJS export names for ESM import in node:
|
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { UiNodeInputAttributes, UiNode, UiNodeAnchorAttributes, UiNodeTextAttributes, UiNodeImageAttributes, UiNodeGroupEnum, UiText, ConfigurationParameters, FlowType, LoginFlow, RegistrationFlow, RecoveryFlow, VerificationFlow, SettingsFlow, FlowError, UpdateLoginFlowBody, UpdateRegistrationFlowBody, UpdateVerificationFlowBody, UpdateRecoveryFlowBody, UpdateSettingsFlowBody, OnRedirectHandler } from '@ory/client-fetch';
|
|
1
|
+
import { UiNodeInputAttributes, UiNode, UiNodeAnchorAttributes, UiNodeTextAttributes, UiNodeImageAttributes, UiNodeGroupEnum, UiText, ConfigurationParameters, FlowType, LoginFlow, RegistrationFlow, RecoveryFlow, VerificationFlow, SettingsFlow, UiContainer, OAuth2ConsentRequest, Session, FlowError, UpdateLoginFlowBody, UpdateRegistrationFlowBody, UpdateVerificationFlowBody, UpdateRecoveryFlowBody, UpdateSettingsFlowBody, OnRedirectHandler } from '@ory/client-fetch';
|
|
2
2
|
import { ComponentPropsWithoutRef, FormEventHandler, MouseEventHandler, PropsWithChildren, DetailedHTMLProps, HTMLAttributes, ComponentType, Dispatch } from 'react';
|
|
3
3
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
4
4
|
import { VariantProps } from 'class-variance-authority';
|
|
@@ -53,12 +53,18 @@ type OryNodeImageProps = {
|
|
|
53
53
|
type FormValues = Record<string, string | boolean | number | undefined>;
|
|
54
54
|
type OryFormRootProps = ComponentPropsWithoutRef<"form"> & {
|
|
55
55
|
onSubmit: FormEventHandler<HTMLFormElement>;
|
|
56
|
+
"data-testid"?: string;
|
|
56
57
|
};
|
|
57
58
|
type OryNodeInputProps = {
|
|
58
59
|
attributes: UiNodeInputAttributes;
|
|
59
60
|
node: UiNode;
|
|
60
61
|
onClick?: MouseEventHandler;
|
|
61
62
|
};
|
|
63
|
+
type OryNodeConsentScopeCheckboxProps = {
|
|
64
|
+
attributes: UiNodeInputAttributes;
|
|
65
|
+
node: UiNode;
|
|
66
|
+
onCheckedChange: (checked: boolean) => void;
|
|
67
|
+
};
|
|
62
68
|
type OryFormSectionContentProps = PropsWithChildren<{
|
|
63
69
|
title?: string;
|
|
64
70
|
description?: string;
|
|
@@ -105,6 +111,8 @@ declare function OryCardContent({ children }: OryCardContentProps): react_jsx_ru
|
|
|
105
111
|
|
|
106
112
|
declare function OryTwoStepCard(): react_jsx_runtime.JSX.Element;
|
|
107
113
|
|
|
114
|
+
declare function OryConsentCard(): react_jsx_runtime.JSX.Element;
|
|
115
|
+
|
|
108
116
|
/**
|
|
109
117
|
* Props type for the Form Group Divider component.
|
|
110
118
|
*/
|
|
@@ -248,6 +256,10 @@ type OryFlowComponents = {
|
|
|
248
256
|
* The Captcha component is rendered whenever a "captcha" group is encountered.
|
|
249
257
|
*/
|
|
250
258
|
Captcha: ComponentType<OryNodeCaptchaProps>;
|
|
259
|
+
/**
|
|
260
|
+
* Special version of the Input component for scopes in OAuth2 flows.
|
|
261
|
+
*/
|
|
262
|
+
ConsentScopeCheckbox: ComponentType<OryNodeConsentScopeCheckboxProps>;
|
|
251
263
|
};
|
|
252
264
|
Card: {
|
|
253
265
|
/**
|
|
@@ -363,8 +375,9 @@ type DeepPartialTwoLevels<T> = {
|
|
|
363
375
|
type OryFlowComponentOverrides = DeepPartialTwoLevels<OryFlowComponents>;
|
|
364
376
|
type OryFormProps = PropsWithChildren<{
|
|
365
377
|
onAfterSubmit?: (method: string | number | boolean | undefined) => void;
|
|
378
|
+
"data-testid"?: string;
|
|
366
379
|
}>;
|
|
367
|
-
declare function OryForm({ children, onAfterSubmit }: OryFormProps): react_jsx_runtime.JSX.Element;
|
|
380
|
+
declare function OryForm({ children, onAfterSubmit, "data-testid": dataTestId, }: OryFormProps): react_jsx_runtime.JSX.Element;
|
|
368
381
|
|
|
369
382
|
declare function useComponents(): OryFlowComponents;
|
|
370
383
|
declare function useNodeSorter(): (a: UiNode, b: UiNode, ctx: {
|
|
@@ -414,7 +427,7 @@ type OryClientConfiguration = {
|
|
|
414
427
|
*
|
|
415
428
|
* @see OryClientConfiguration
|
|
416
429
|
*/
|
|
417
|
-
type OryFlow<TFlowType, TFlow> = {
|
|
430
|
+
type OryFlow<TFlowType extends FlowType, TFlow> = {
|
|
418
431
|
flowType: TFlowType;
|
|
419
432
|
flow: TFlow;
|
|
420
433
|
config: OryClientConfiguration;
|
|
@@ -463,10 +476,22 @@ type SettingsFlowContainer = OryFlow<FlowType.Settings, SettingsFlow>;
|
|
|
463
476
|
*
|
|
464
477
|
*/
|
|
465
478
|
type ErrorFlowContainer = OryFlow<FlowType.Error, FlowError>;
|
|
479
|
+
type ConsentFlow = {
|
|
480
|
+
created_at: Date;
|
|
481
|
+
expires_at: Date;
|
|
482
|
+
id: string;
|
|
483
|
+
issued_at: Date;
|
|
484
|
+
state: "show_form" | "rejected" | "accepted";
|
|
485
|
+
active: string;
|
|
486
|
+
ui: UiContainer;
|
|
487
|
+
consent_request: OAuth2ConsentRequest;
|
|
488
|
+
session: Session;
|
|
489
|
+
};
|
|
490
|
+
type ConsentFlowContainer = OryFlow<FlowType.OAuth2Consent, ConsentFlow>;
|
|
466
491
|
/**
|
|
467
492
|
* A union type of all flow containers
|
|
468
493
|
*/
|
|
469
|
-
type OryFlowContainer = LoginFlowContainer | RegistrationFlowContainer | RecoveryFlowContainer | VerificationFlowContainer | SettingsFlowContainer;
|
|
494
|
+
type OryFlowContainer = LoginFlowContainer | RegistrationFlowContainer | RecoveryFlowContainer | VerificationFlowContainer | SettingsFlowContainer | ConsentFlowContainer;
|
|
470
495
|
|
|
471
496
|
/**
|
|
472
497
|
* Converts a UiText to a FormattedMessage.
|
|
@@ -594,4 +619,4 @@ type OryProviderProps = {
|
|
|
594
619
|
} & OryFlowContainer & PropsWithChildren;
|
|
595
620
|
declare function OryProvider({ children, components: Components, ...oryFlowProps }: OryProviderProps): react_jsx_runtime.JSX.Element;
|
|
596
621
|
|
|
597
|
-
export { type ErrorFlowContainer, type FlowContainerSetter, type FlowContextValue, type FormState, type FormStateAction, type FormValues, HeadlessPageHeader, type IntlConfig, type LoginFlowContainer, type OnSubmitHandlerProps, OryCard, type OryCardAuthMethodListItemProps, OryCardContent, type OryCardContentProps, type OryCardDividerProps, OryCardFooter, type OryCardFooterProps, OryCardHeader, type OryCardHeaderProps, type OryCardLogoProps, type OryCardRootProps as OryCardProps, type OryCardSettingsSectionProps, OryCardValidationMessages, type OryClientConfiguration, type OryFlowComponentOverrides, type OryFlowComponents, type OryFlowContainer, OryForm, OryFormGroupDivider, type OryFormGroupProps, OryFormGroups, type OryFormGroupsProps, OryFormOidcButtons, type OryFormOidcRootProps, type OryFormProps, type OryFormRootProps, OryFormSection, type OryFormSectionContentProps, type OryFormSectionFooterProps, type OryFormSectionProps, OryFormSocialButtonsForm, OryLocales, type OryMessageContentProps, type OryMessageRootProps, type OryNodeAnchorProps, type OryNodeButtonProps, type OryNodeCaptchaProps, type OryNodeImageProps, type OryNodeInputProps, type OryNodeLabelProps, type OryNodeOidcButtonProps, type OryNodeTextProps, type OryPageHeaderProps, OryProvider, type OryProviderProps, OrySettingsCard, type OrySettingsOidcProps, type OrySettingsPasskeyProps, type OrySettingsRecoveryCodesProps, type OrySettingsTotpProps, type OrySettingsWebauthnProps, OryTwoStepCard, type RecoveryFlowContainer, type RegistrationFlowContainer, type SettingsFlowContainer, type VerificationFlowContainer, messageTestId, uiTextToFormattedMessage, useComponents, useNodeSorter, useOryFlow };
|
|
622
|
+
export { type ConsentFlow, type ConsentFlowContainer, type ErrorFlowContainer, type FlowContainerSetter, type FlowContextValue, type FormState, type FormStateAction, type FormValues, HeadlessPageHeader, type IntlConfig, type LoginFlowContainer, type OnSubmitHandlerProps, OryCard, type OryCardAuthMethodListItemProps, OryCardContent, type OryCardContentProps, type OryCardDividerProps, OryCardFooter, type OryCardFooterProps, OryCardHeader, type OryCardHeaderProps, type OryCardLogoProps, type OryCardRootProps as OryCardProps, type OryCardSettingsSectionProps, OryCardValidationMessages, type OryClientConfiguration, OryConsentCard, type OryFlowComponentOverrides, type OryFlowComponents, type OryFlowContainer, OryForm, OryFormGroupDivider, type OryFormGroupProps, OryFormGroups, type OryFormGroupsProps, OryFormOidcButtons, type OryFormOidcRootProps, type OryFormProps, type OryFormRootProps, OryFormSection, type OryFormSectionContentProps, type OryFormSectionFooterProps, type OryFormSectionProps, OryFormSocialButtonsForm, OryLocales, type OryMessageContentProps, type OryMessageRootProps, type OryNodeAnchorProps, type OryNodeButtonProps, type OryNodeCaptchaProps, type OryNodeConsentScopeCheckboxProps, type OryNodeImageProps, type OryNodeInputProps, type OryNodeLabelProps, type OryNodeOidcButtonProps, type OryNodeTextProps, type OryPageHeaderProps, OryProvider, type OryProviderProps, OrySettingsCard, type OrySettingsOidcProps, type OrySettingsPasskeyProps, type OrySettingsRecoveryCodesProps, type OrySettingsTotpProps, type OrySettingsWebauthnProps, OryTwoStepCard, type RecoveryFlowContainer, type RegistrationFlowContainer, type SettingsFlowContainer, type VerificationFlowContainer, messageTestId, uiTextToFormattedMessage, useComponents, useNodeSorter, useOryFlow };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { UiNodeInputAttributes, UiNode, UiNodeAnchorAttributes, UiNodeTextAttributes, UiNodeImageAttributes, UiNodeGroupEnum, UiText, ConfigurationParameters, FlowType, LoginFlow, RegistrationFlow, RecoveryFlow, VerificationFlow, SettingsFlow, FlowError, UpdateLoginFlowBody, UpdateRegistrationFlowBody, UpdateVerificationFlowBody, UpdateRecoveryFlowBody, UpdateSettingsFlowBody, OnRedirectHandler } from '@ory/client-fetch';
|
|
1
|
+
import { UiNodeInputAttributes, UiNode, UiNodeAnchorAttributes, UiNodeTextAttributes, UiNodeImageAttributes, UiNodeGroupEnum, UiText, ConfigurationParameters, FlowType, LoginFlow, RegistrationFlow, RecoveryFlow, VerificationFlow, SettingsFlow, UiContainer, OAuth2ConsentRequest, Session, FlowError, UpdateLoginFlowBody, UpdateRegistrationFlowBody, UpdateVerificationFlowBody, UpdateRecoveryFlowBody, UpdateSettingsFlowBody, OnRedirectHandler } from '@ory/client-fetch';
|
|
2
2
|
import { ComponentPropsWithoutRef, FormEventHandler, MouseEventHandler, PropsWithChildren, DetailedHTMLProps, HTMLAttributes, ComponentType, Dispatch } from 'react';
|
|
3
3
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
4
4
|
import { VariantProps } from 'class-variance-authority';
|
|
@@ -53,12 +53,18 @@ type OryNodeImageProps = {
|
|
|
53
53
|
type FormValues = Record<string, string | boolean | number | undefined>;
|
|
54
54
|
type OryFormRootProps = ComponentPropsWithoutRef<"form"> & {
|
|
55
55
|
onSubmit: FormEventHandler<HTMLFormElement>;
|
|
56
|
+
"data-testid"?: string;
|
|
56
57
|
};
|
|
57
58
|
type OryNodeInputProps = {
|
|
58
59
|
attributes: UiNodeInputAttributes;
|
|
59
60
|
node: UiNode;
|
|
60
61
|
onClick?: MouseEventHandler;
|
|
61
62
|
};
|
|
63
|
+
type OryNodeConsentScopeCheckboxProps = {
|
|
64
|
+
attributes: UiNodeInputAttributes;
|
|
65
|
+
node: UiNode;
|
|
66
|
+
onCheckedChange: (checked: boolean) => void;
|
|
67
|
+
};
|
|
62
68
|
type OryFormSectionContentProps = PropsWithChildren<{
|
|
63
69
|
title?: string;
|
|
64
70
|
description?: string;
|
|
@@ -105,6 +111,8 @@ declare function OryCardContent({ children }: OryCardContentProps): react_jsx_ru
|
|
|
105
111
|
|
|
106
112
|
declare function OryTwoStepCard(): react_jsx_runtime.JSX.Element;
|
|
107
113
|
|
|
114
|
+
declare function OryConsentCard(): react_jsx_runtime.JSX.Element;
|
|
115
|
+
|
|
108
116
|
/**
|
|
109
117
|
* Props type for the Form Group Divider component.
|
|
110
118
|
*/
|
|
@@ -248,6 +256,10 @@ type OryFlowComponents = {
|
|
|
248
256
|
* The Captcha component is rendered whenever a "captcha" group is encountered.
|
|
249
257
|
*/
|
|
250
258
|
Captcha: ComponentType<OryNodeCaptchaProps>;
|
|
259
|
+
/**
|
|
260
|
+
* Special version of the Input component for scopes in OAuth2 flows.
|
|
261
|
+
*/
|
|
262
|
+
ConsentScopeCheckbox: ComponentType<OryNodeConsentScopeCheckboxProps>;
|
|
251
263
|
};
|
|
252
264
|
Card: {
|
|
253
265
|
/**
|
|
@@ -363,8 +375,9 @@ type DeepPartialTwoLevels<T> = {
|
|
|
363
375
|
type OryFlowComponentOverrides = DeepPartialTwoLevels<OryFlowComponents>;
|
|
364
376
|
type OryFormProps = PropsWithChildren<{
|
|
365
377
|
onAfterSubmit?: (method: string | number | boolean | undefined) => void;
|
|
378
|
+
"data-testid"?: string;
|
|
366
379
|
}>;
|
|
367
|
-
declare function OryForm({ children, onAfterSubmit }: OryFormProps): react_jsx_runtime.JSX.Element;
|
|
380
|
+
declare function OryForm({ children, onAfterSubmit, "data-testid": dataTestId, }: OryFormProps): react_jsx_runtime.JSX.Element;
|
|
368
381
|
|
|
369
382
|
declare function useComponents(): OryFlowComponents;
|
|
370
383
|
declare function useNodeSorter(): (a: UiNode, b: UiNode, ctx: {
|
|
@@ -414,7 +427,7 @@ type OryClientConfiguration = {
|
|
|
414
427
|
*
|
|
415
428
|
* @see OryClientConfiguration
|
|
416
429
|
*/
|
|
417
|
-
type OryFlow<TFlowType, TFlow> = {
|
|
430
|
+
type OryFlow<TFlowType extends FlowType, TFlow> = {
|
|
418
431
|
flowType: TFlowType;
|
|
419
432
|
flow: TFlow;
|
|
420
433
|
config: OryClientConfiguration;
|
|
@@ -463,10 +476,22 @@ type SettingsFlowContainer = OryFlow<FlowType.Settings, SettingsFlow>;
|
|
|
463
476
|
*
|
|
464
477
|
*/
|
|
465
478
|
type ErrorFlowContainer = OryFlow<FlowType.Error, FlowError>;
|
|
479
|
+
type ConsentFlow = {
|
|
480
|
+
created_at: Date;
|
|
481
|
+
expires_at: Date;
|
|
482
|
+
id: string;
|
|
483
|
+
issued_at: Date;
|
|
484
|
+
state: "show_form" | "rejected" | "accepted";
|
|
485
|
+
active: string;
|
|
486
|
+
ui: UiContainer;
|
|
487
|
+
consent_request: OAuth2ConsentRequest;
|
|
488
|
+
session: Session;
|
|
489
|
+
};
|
|
490
|
+
type ConsentFlowContainer = OryFlow<FlowType.OAuth2Consent, ConsentFlow>;
|
|
466
491
|
/**
|
|
467
492
|
* A union type of all flow containers
|
|
468
493
|
*/
|
|
469
|
-
type OryFlowContainer = LoginFlowContainer | RegistrationFlowContainer | RecoveryFlowContainer | VerificationFlowContainer | SettingsFlowContainer;
|
|
494
|
+
type OryFlowContainer = LoginFlowContainer | RegistrationFlowContainer | RecoveryFlowContainer | VerificationFlowContainer | SettingsFlowContainer | ConsentFlowContainer;
|
|
470
495
|
|
|
471
496
|
/**
|
|
472
497
|
* Converts a UiText to a FormattedMessage.
|
|
@@ -594,4 +619,4 @@ type OryProviderProps = {
|
|
|
594
619
|
} & OryFlowContainer & PropsWithChildren;
|
|
595
620
|
declare function OryProvider({ children, components: Components, ...oryFlowProps }: OryProviderProps): react_jsx_runtime.JSX.Element;
|
|
596
621
|
|
|
597
|
-
export { type ErrorFlowContainer, type FlowContainerSetter, type FlowContextValue, type FormState, type FormStateAction, type FormValues, HeadlessPageHeader, type IntlConfig, type LoginFlowContainer, type OnSubmitHandlerProps, OryCard, type OryCardAuthMethodListItemProps, OryCardContent, type OryCardContentProps, type OryCardDividerProps, OryCardFooter, type OryCardFooterProps, OryCardHeader, type OryCardHeaderProps, type OryCardLogoProps, type OryCardRootProps as OryCardProps, type OryCardSettingsSectionProps, OryCardValidationMessages, type OryClientConfiguration, type OryFlowComponentOverrides, type OryFlowComponents, type OryFlowContainer, OryForm, OryFormGroupDivider, type OryFormGroupProps, OryFormGroups, type OryFormGroupsProps, OryFormOidcButtons, type OryFormOidcRootProps, type OryFormProps, type OryFormRootProps, OryFormSection, type OryFormSectionContentProps, type OryFormSectionFooterProps, type OryFormSectionProps, OryFormSocialButtonsForm, OryLocales, type OryMessageContentProps, type OryMessageRootProps, type OryNodeAnchorProps, type OryNodeButtonProps, type OryNodeCaptchaProps, type OryNodeImageProps, type OryNodeInputProps, type OryNodeLabelProps, type OryNodeOidcButtonProps, type OryNodeTextProps, type OryPageHeaderProps, OryProvider, type OryProviderProps, OrySettingsCard, type OrySettingsOidcProps, type OrySettingsPasskeyProps, type OrySettingsRecoveryCodesProps, type OrySettingsTotpProps, type OrySettingsWebauthnProps, OryTwoStepCard, type RecoveryFlowContainer, type RegistrationFlowContainer, type SettingsFlowContainer, type VerificationFlowContainer, messageTestId, uiTextToFormattedMessage, useComponents, useNodeSorter, useOryFlow };
|
|
622
|
+
export { type ConsentFlow, type ConsentFlowContainer, type ErrorFlowContainer, type FlowContainerSetter, type FlowContextValue, type FormState, type FormStateAction, type FormValues, HeadlessPageHeader, type IntlConfig, type LoginFlowContainer, type OnSubmitHandlerProps, OryCard, type OryCardAuthMethodListItemProps, OryCardContent, type OryCardContentProps, type OryCardDividerProps, OryCardFooter, type OryCardFooterProps, OryCardHeader, type OryCardHeaderProps, type OryCardLogoProps, type OryCardRootProps as OryCardProps, type OryCardSettingsSectionProps, OryCardValidationMessages, type OryClientConfiguration, OryConsentCard, type OryFlowComponentOverrides, type OryFlowComponents, type OryFlowContainer, OryForm, OryFormGroupDivider, type OryFormGroupProps, OryFormGroups, type OryFormGroupsProps, OryFormOidcButtons, type OryFormOidcRootProps, type OryFormProps, type OryFormRootProps, OryFormSection, type OryFormSectionContentProps, type OryFormSectionFooterProps, type OryFormSectionProps, OryFormSocialButtonsForm, OryLocales, type OryMessageContentProps, type OryMessageRootProps, type OryNodeAnchorProps, type OryNodeButtonProps, type OryNodeCaptchaProps, type OryNodeConsentScopeCheckboxProps, type OryNodeImageProps, type OryNodeInputProps, type OryNodeLabelProps, type OryNodeOidcButtonProps, type OryNodeTextProps, type OryPageHeaderProps, OryProvider, type OryProviderProps, OrySettingsCard, type OrySettingsOidcProps, type OrySettingsPasskeyProps, type OrySettingsRecoveryCodesProps, type OrySettingsTotpProps, type OrySettingsWebauthnProps, OryTwoStepCard, type RecoveryFlowContainer, type RegistrationFlowContainer, type SettingsFlowContainer, type VerificationFlowContainer, messageTestId, uiTextToFormattedMessage, useComponents, useNodeSorter, useOryFlow };
|