@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.
Files changed (69) hide show
  1. package/.vscode/i18n-ally-reviews.yml +3 -0
  2. package/.vscode/settings.json +4 -0
  3. package/CHANGELOG.md +303 -0
  4. package/README.md +179 -7
  5. package/api-report/elements-react-client.api.json +356 -0
  6. package/api-report/elements-react-client.api.md +33 -0
  7. package/api-report/elements-react-theme.api.json +1468 -0
  8. package/api-report/elements-react-theme.api.md +149 -0
  9. package/api-report/elements-react.api.json +3759 -0
  10. package/api-report/elements-react.api.md +442 -0
  11. package/api-report/temp/elements-react-client.api.md +33 -0
  12. package/api-report/temp/elements-react-theme.api.md +149 -0
  13. package/api-report/temp/elements-react.api.md +442 -0
  14. package/config/api-extractor-client.json +463 -0
  15. package/config/api-extractor-core.json +457 -0
  16. package/config/api-extractor-theme.json +463 -0
  17. package/dist/client/config.d.mts +21 -0
  18. package/dist/client/config.d.ts +21 -0
  19. package/dist/client/config.js +77 -0
  20. package/dist/client/config.js.map +1 -0
  21. package/dist/client/config.mjs +51 -0
  22. package/dist/client/config.mjs.map +1 -0
  23. package/dist/client/frontendClient.d.mts +7 -0
  24. package/dist/client/frontendClient.d.ts +7 -0
  25. package/dist/client/frontendClient.js +52 -0
  26. package/dist/client/frontendClient.js.map +1 -0
  27. package/dist/client/frontendClient.mjs +31 -0
  28. package/dist/client/frontendClient.mjs.map +1 -0
  29. package/dist/client/index.d.mts +5 -0
  30. package/dist/client/index.d.ts +5 -0
  31. package/dist/client/index.js +33 -0
  32. package/dist/client/index.js.map +1 -0
  33. package/dist/client/index.mjs +10 -0
  34. package/dist/client/index.mjs.map +1 -0
  35. package/dist/client/session-provider.d.mts +62 -0
  36. package/dist/client/session-provider.d.ts +62 -0
  37. package/dist/client/session-provider.js +96 -0
  38. package/dist/client/session-provider.js.map +1 -0
  39. package/dist/client/session-provider.mjs +71 -0
  40. package/dist/client/session-provider.mjs.map +1 -0
  41. package/dist/client/useSession.d.mts +32 -0
  42. package/dist/client/useSession.d.ts +32 -0
  43. package/dist/client/useSession.js +37 -0
  44. package/dist/client/useSession.js.map +1 -0
  45. package/dist/client/useSession.mjs +13 -0
  46. package/dist/client/useSession.mjs.map +1 -0
  47. package/dist/index.d.mts +441 -1634
  48. package/dist/index.d.ts +441 -1634
  49. package/dist/index.js +2496 -5787
  50. package/dist/index.js.map +1 -1
  51. package/dist/index.mjs +2492 -5756
  52. package/dist/index.mjs.map +1 -1
  53. package/dist/theme/default/index.css +673 -169
  54. package/dist/theme/default/index.css.map +1 -1
  55. package/dist/theme/default/index.d.mts +29 -142
  56. package/dist/theme/default/index.d.ts +29 -142
  57. package/dist/theme/default/index.js +1968 -10130
  58. package/dist/theme/default/index.js.map +1 -1
  59. package/dist/theme/default/index.mjs +2014 -10203
  60. package/dist/theme/default/index.mjs.map +1 -1
  61. package/jest.config.ts +23 -0
  62. package/package.json +34 -9
  63. package/postcss.config.ts +1 -0
  64. package/tailwind.config.ts +21 -12
  65. package/tsconfig.json +15 -3
  66. package/tsconfig.spec.json +20 -0
  67. package/variables-processed.json +385 -187
  68. package/.eslintrc.js +0 -61
  69. 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.2",
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.15.0-next.0",
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.52.1",
25
- "tailwind-merge": "2.4.0"
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
- "esbuild-plugin-svgr": "2.1.0",
33
- "eslint-plugin-react": "7.35.0",
34
- "postcss": "8.4.40",
35
- "tailwindcss": "3.4.7",
36
- "tsup": "8.2.3"
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
@@ -2,5 +2,6 @@
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
 
4
4
  module.exports = {
5
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-require-imports
5
6
  plugins: [require("tailwindcss")(), require("autoprefixer")()],
6
7
  }
@@ -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: ['"Inter var", sans-serif'],
29
+ sans: ["var(--font-sans)"],
34
30
  },
35
31
  colors: {
36
- ...variables.colors.light,
32
+ ...variables.light.color,
33
+ ...variables.slate.color,
37
34
  },
38
35
  backgroundColor: {
39
- ...variables.colors.light,
36
+ ...variables.light.color,
37
+ ...variables.slate.color,
40
38
  },
41
39
  borderColor: {
42
- ...variables.colors.light,
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.colors.light,
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": "src"
20
+ "rootDir": ".",
21
+ "paths": {
22
+ "@ory/elements-react": ["./src/index.ts"]
23
+ }
21
24
  },
22
- "exclude": ["node_modules"],
23
- "include": ["src/**/*.ts", "src/**/*.tsx", "src/global.d.ts"]
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
+ }