@ory/elements-react 1.0.0-next.2 → 1.0.0-next.21
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/.vscode/i18n-ally-reviews.yml +3 -0
- package/.vscode/settings.json +4 -0
- package/CHANGELOG.md +303 -0
- package/README.md +179 -7
- package/api-report/elements-react-client.api.json +356 -0
- package/api-report/elements-react-client.api.md +33 -0
- package/api-report/elements-react-theme.api.json +1468 -0
- package/api-report/elements-react-theme.api.md +149 -0
- package/api-report/elements-react.api.json +3759 -0
- package/api-report/elements-react.api.md +442 -0
- package/api-report/temp/elements-react-client.api.md +33 -0
- package/api-report/temp/elements-react-theme.api.md +149 -0
- package/api-report/temp/elements-react.api.md +442 -0
- package/config/api-extractor-client.json +463 -0
- package/config/api-extractor-core.json +457 -0
- package/config/api-extractor-theme.json +463 -0
- package/dist/client/config.d.mts +21 -0
- package/dist/client/config.d.ts +21 -0
- package/dist/client/config.js +77 -0
- package/dist/client/config.js.map +1 -0
- package/dist/client/config.mjs +51 -0
- package/dist/client/config.mjs.map +1 -0
- package/dist/client/frontendClient.d.mts +7 -0
- package/dist/client/frontendClient.d.ts +7 -0
- package/dist/client/frontendClient.js +52 -0
- package/dist/client/frontendClient.js.map +1 -0
- package/dist/client/frontendClient.mjs +31 -0
- package/dist/client/frontendClient.mjs.map +1 -0
- package/dist/client/index.d.mts +5 -0
- package/dist/client/index.d.ts +5 -0
- package/dist/client/index.js +33 -0
- package/dist/client/index.js.map +1 -0
- package/dist/client/index.mjs +10 -0
- package/dist/client/index.mjs.map +1 -0
- package/dist/client/session-provider.d.mts +62 -0
- package/dist/client/session-provider.d.ts +62 -0
- package/dist/client/session-provider.js +96 -0
- package/dist/client/session-provider.js.map +1 -0
- package/dist/client/session-provider.mjs +71 -0
- package/dist/client/session-provider.mjs.map +1 -0
- package/dist/client/useSession.d.mts +32 -0
- package/dist/client/useSession.d.ts +32 -0
- package/dist/client/useSession.js +37 -0
- package/dist/client/useSession.js.map +1 -0
- package/dist/client/useSession.mjs +13 -0
- package/dist/client/useSession.mjs.map +1 -0
- package/dist/index.d.mts +441 -1634
- package/dist/index.d.ts +441 -1634
- package/dist/index.js +2496 -5787
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2492 -5756
- package/dist/index.mjs.map +1 -1
- package/dist/theme/default/index.css +673 -169
- package/dist/theme/default/index.css.map +1 -1
- package/dist/theme/default/index.d.mts +29 -142
- package/dist/theme/default/index.d.ts +29 -142
- package/dist/theme/default/index.js +1968 -10130
- package/dist/theme/default/index.js.map +1 -1
- package/dist/theme/default/index.mjs +2014 -10203
- package/dist/theme/default/index.mjs.map +1 -1
- package/jest.config.ts +23 -0
- package/package.json +34 -9
- package/postcss.config.ts +1 -0
- package/tailwind.config.ts +21 -12
- package/tsconfig.json +15 -3
- package/tsconfig.spec.json +20 -0
- package/variables-processed.json +385 -187
- package/.eslintrc.js +0 -61
- package/test-results/.last-run.json +0 -4
package/jest.config.ts
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
// Copyright © 2024 Ory Corp
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
|
|
4
|
+
import { Config } from "jest"
|
|
5
|
+
|
|
6
|
+
export default {
|
|
7
|
+
displayName: "@ory/elements-react",
|
|
8
|
+
preset: "../../jest.preset.cjs",
|
|
9
|
+
transform: {
|
|
10
|
+
"^.+\\.tsx?$": "ts-jest",
|
|
11
|
+
".+\\.(svg|css|styl|less|sass|scss|png|jpg|ttf|woff|woff2)$":
|
|
12
|
+
"jest-transform-stub",
|
|
13
|
+
},
|
|
14
|
+
collectCoverageFrom: [
|
|
15
|
+
"src/**/*.ts",
|
|
16
|
+
"src/**/*.tsx",
|
|
17
|
+
"src/**/*.js",
|
|
18
|
+
"src/**/*.jsx",
|
|
19
|
+
],
|
|
20
|
+
moduleFileExtensions: ["ts", "tsx", "js", "jsx"],
|
|
21
|
+
coverageDirectory: "../../coverage/packages/elements-react",
|
|
22
|
+
coveragePathIgnorePatterns: ["/node_modules/", "/dist/", ".svg"],
|
|
23
|
+
} satisfies Config
|
package/package.json
CHANGED
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ory/elements-react",
|
|
3
|
-
"version": "1.0.0-next.
|
|
3
|
+
"version": "1.0.0-next.21",
|
|
4
4
|
"exports": {
|
|
5
5
|
".": {
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
7
7
|
"import": "./dist/index.mjs",
|
|
8
8
|
"require": "./dist/index.js"
|
|
9
9
|
},
|
|
10
|
+
"./client": {
|
|
11
|
+
"types": "./dist/client/index.d.ts",
|
|
12
|
+
"import": "./dist/client/index.mjs",
|
|
13
|
+
"require": "./dist/client/index.js"
|
|
14
|
+
},
|
|
10
15
|
"./theme": {
|
|
11
16
|
"types": "./dist/theme/default/index.d.ts",
|
|
12
17
|
"import": "./dist/theme/default/index.mjs",
|
|
@@ -14,26 +19,46 @@
|
|
|
14
19
|
},
|
|
15
20
|
"./theme/styles.css": "./dist/theme/default/index.css"
|
|
16
21
|
},
|
|
22
|
+
"typesVersions": {
|
|
23
|
+
"*": {
|
|
24
|
+
"index": [
|
|
25
|
+
"./dist/index.d.ts"
|
|
26
|
+
],
|
|
27
|
+
"client": [
|
|
28
|
+
"./dist/client/index.d.ts"
|
|
29
|
+
],
|
|
30
|
+
"theme": [
|
|
31
|
+
"./dist/theme/default/index.d.ts"
|
|
32
|
+
]
|
|
33
|
+
}
|
|
34
|
+
},
|
|
17
35
|
"main": "./dist/index.js",
|
|
18
36
|
"module": "./dist/index.mjs",
|
|
19
37
|
"types": "./dist/index.d.ts",
|
|
20
38
|
"dependencies": {
|
|
21
|
-
"@ory/client-fetch": "1.
|
|
39
|
+
"@ory/client-fetch": "~1.16.1",
|
|
40
|
+
"@radix-ui/react-dropdown-menu": "2.1.2",
|
|
41
|
+
"class-variance-authority": "0.7.0",
|
|
22
42
|
"clsx": "2.1.1",
|
|
23
43
|
"input-otp": "1.2.4",
|
|
24
|
-
"react-hook-form": "7.
|
|
25
|
-
"
|
|
44
|
+
"react-hook-form": "7.53.0",
|
|
45
|
+
"react-intl": "6.7.0",
|
|
46
|
+
"tailwind-merge": "2.5.2",
|
|
47
|
+
"zustand": "5.0.0"
|
|
26
48
|
},
|
|
27
49
|
"peerDependencies": {
|
|
28
50
|
"react": "18.3.1",
|
|
29
51
|
"react-dom": "18.3.1"
|
|
30
52
|
},
|
|
31
53
|
"devDependencies": {
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
"
|
|
54
|
+
"@hookform/devtools": "4.3.1",
|
|
55
|
+
"@svgr/plugin-svgo": "8.1.0",
|
|
56
|
+
"@types/lodash.merge": "4.6.9",
|
|
57
|
+
"esbuild-plugin-svgr": "3.0.0",
|
|
58
|
+
"eslint-plugin-react": "7.37.1",
|
|
59
|
+
"postcss": "8.4.47",
|
|
60
|
+
"tailwindcss-animate": "1.0.7",
|
|
61
|
+
"tsup": "8.3.0"
|
|
37
62
|
},
|
|
38
63
|
"keywords": [
|
|
39
64
|
"ory",
|
package/postcss.config.ts
CHANGED
package/tailwind.config.ts
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
import type { Config } from "tailwindcss"
|
|
5
5
|
|
|
6
6
|
import variables from "./variables-processed.json"
|
|
7
|
+
import plugin from "tailwindcss/plugin"
|
|
7
8
|
|
|
8
9
|
const config: Config = {
|
|
9
10
|
content: ["./src/**/*.{js,ts,jsx,tsx,mdx}"],
|
|
@@ -18,34 +19,42 @@ const config: Config = {
|
|
|
18
19
|
animation: {
|
|
19
20
|
"caret-blink": "caret-blink 1.25s ease-out infinite",
|
|
20
21
|
},
|
|
21
|
-
backgroundImage: {
|
|
22
|
-
"gradient-radial": "radial-gradient(var(--tw-gradient-stops))",
|
|
23
|
-
"gradient-conic":
|
|
24
|
-
"conic-gradient(from 180deg at 50% 50%, var(--tw-gradient-stops))",
|
|
25
|
-
},
|
|
26
22
|
padding: {
|
|
27
23
|
"4.5": "1.125rem",
|
|
28
24
|
},
|
|
29
25
|
/* We need the default border radius as well in some cases. */
|
|
30
|
-
borderRadius: variables.borderRadius,
|
|
26
|
+
borderRadius: variables.borderRadius.default.number,
|
|
31
27
|
},
|
|
32
28
|
fontFamily: {
|
|
33
|
-
sans: [
|
|
29
|
+
sans: ["var(--font-sans)"],
|
|
34
30
|
},
|
|
35
31
|
colors: {
|
|
36
|
-
...variables.
|
|
32
|
+
...variables.light.color,
|
|
33
|
+
...variables.slate.color,
|
|
37
34
|
},
|
|
38
35
|
backgroundColor: {
|
|
39
|
-
...variables.
|
|
36
|
+
...variables.light.color,
|
|
37
|
+
...variables.slate.color,
|
|
40
38
|
},
|
|
41
39
|
borderColor: {
|
|
42
|
-
...variables.
|
|
40
|
+
...variables.light.color,
|
|
41
|
+
...variables.slate.color,
|
|
42
|
+
},
|
|
43
|
+
ringColor: {
|
|
44
|
+
...variables.light.color,
|
|
45
|
+
...variables.slate.color,
|
|
43
46
|
},
|
|
44
47
|
fill: {
|
|
45
|
-
...variables.
|
|
48
|
+
...variables.light.color,
|
|
49
|
+
...variables.slate.color,
|
|
46
50
|
},
|
|
47
51
|
},
|
|
48
|
-
plugins: [
|
|
52
|
+
plugins: [
|
|
53
|
+
plugin((plugin) => {
|
|
54
|
+
plugin.addVariant("loading", "&[data-loading=true]")
|
|
55
|
+
}),
|
|
56
|
+
require("tailwindcss-animate"),
|
|
57
|
+
],
|
|
49
58
|
}
|
|
50
59
|
|
|
51
60
|
export default config
|
package/tsconfig.json
CHANGED
|
@@ -17,8 +17,20 @@
|
|
|
17
17
|
"declarationDir": "dist/types",
|
|
18
18
|
"jsx": "react-jsx",
|
|
19
19
|
"lib": ["ES6", "DOM", "WebWorker"],
|
|
20
|
-
"rootDir": "
|
|
20
|
+
"rootDir": ".",
|
|
21
|
+
"paths": {
|
|
22
|
+
"@ory/elements-react": ["./src/index.ts"]
|
|
23
|
+
}
|
|
21
24
|
},
|
|
22
|
-
"exclude": ["node_modules"],
|
|
23
|
-
"include": [
|
|
25
|
+
"exclude": ["node_modules", "dist"],
|
|
26
|
+
"include": [
|
|
27
|
+
"**/*.ts",
|
|
28
|
+
"**/*.tsx",
|
|
29
|
+
"src/global.d.ts",
|
|
30
|
+
"src/tests/**/*.ts",
|
|
31
|
+
"src/tests/**/*.tsx",
|
|
32
|
+
"tsup.config.ts",
|
|
33
|
+
"jest.config.ts",
|
|
34
|
+
"tailwind.config.ts"
|
|
35
|
+
]
|
|
24
36
|
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": "./tsconfig.json",
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"outDir": "../../dist/out-tsc",
|
|
5
|
+
"module": "commonjs",
|
|
6
|
+
"types": ["jest", "node"]
|
|
7
|
+
},
|
|
8
|
+
"include": [
|
|
9
|
+
"**/*.spec.ts",
|
|
10
|
+
"**/*.test.ts",
|
|
11
|
+
"**/*.spec.tsx",
|
|
12
|
+
"**/*.test.tsx",
|
|
13
|
+
"**/*.spec.js",
|
|
14
|
+
"**/*.test.js",
|
|
15
|
+
"**/*.spec.jsx",
|
|
16
|
+
"**/*.test.jsx",
|
|
17
|
+
"**/*.d.ts",
|
|
18
|
+
"jest.config.ts"
|
|
19
|
+
]
|
|
20
|
+
}
|