@ory/elements-react 1.0.0-next.3 → 1.0.0-next.31

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 (66) hide show
  1. package/CHANGELOG.md +430 -0
  2. package/DEVELOPMENT.md +96 -0
  3. package/LICENSE +201 -0
  4. package/README.md +112 -37
  5. package/babel.config.js +10 -0
  6. package/dist/client/config.d.mts +21 -0
  7. package/dist/client/config.d.ts +21 -0
  8. package/dist/client/config.js +77 -0
  9. package/dist/client/config.js.map +1 -0
  10. package/dist/client/config.mjs +51 -0
  11. package/dist/client/config.mjs.map +1 -0
  12. package/dist/client/frontendClient.d.mts +7 -0
  13. package/dist/client/frontendClient.d.ts +7 -0
  14. package/dist/client/frontendClient.js +52 -0
  15. package/dist/client/frontendClient.js.map +1 -0
  16. package/dist/client/frontendClient.mjs +31 -0
  17. package/dist/client/frontendClient.mjs.map +1 -0
  18. package/dist/client/index.d.mts +5 -0
  19. package/dist/client/index.d.ts +5 -0
  20. package/dist/client/index.js +33 -0
  21. package/dist/client/index.js.map +1 -0
  22. package/dist/client/index.mjs +10 -0
  23. package/dist/client/index.mjs.map +1 -0
  24. package/dist/client/session-provider.d.mts +62 -0
  25. package/dist/client/session-provider.d.ts +62 -0
  26. package/dist/client/session-provider.js +96 -0
  27. package/dist/client/session-provider.js.map +1 -0
  28. package/dist/client/session-provider.mjs +71 -0
  29. package/dist/client/session-provider.mjs.map +1 -0
  30. package/dist/client/useSession.d.mts +32 -0
  31. package/dist/client/useSession.d.ts +32 -0
  32. package/dist/client/useSession.js +37 -0
  33. package/dist/client/useSession.js.map +1 -0
  34. package/dist/client/useSession.mjs +13 -0
  35. package/dist/client/useSession.mjs.map +1 -0
  36. package/dist/index.d.mts +452 -1635
  37. package/dist/index.d.ts +452 -1635
  38. package/dist/index.js +2424 -5700
  39. package/dist/index.js.map +1 -1
  40. package/dist/index.mjs +2421 -5670
  41. package/dist/index.mjs.map +1 -1
  42. package/dist/theme/default/index.css +943 -288
  43. package/dist/theme/default/index.css.map +1 -1
  44. package/dist/theme/default/index.d.mts +29 -142
  45. package/dist/theme/default/index.d.ts +29 -142
  46. package/dist/theme/default/index.js +2392 -10115
  47. package/dist/theme/default/index.js.map +1 -1
  48. package/dist/theme/default/index.mjs +2410 -10111
  49. package/dist/theme/default/index.mjs.map +1 -1
  50. package/dist/theme/default/tailwind/defaults.d.mts +737 -0
  51. package/dist/theme/default/tailwind/defaults.d.ts +737 -0
  52. package/dist/theme/default/tailwind/defaults.js +219 -0
  53. package/dist/theme/default/tailwind/defaults.js.map +1 -0
  54. package/dist/theme/default/tailwind/defaults.mjs +196 -0
  55. package/dist/theme/default/tailwind/defaults.mjs.map +1 -0
  56. package/package.json +45 -10
  57. package/tailwind/defaults.ts +34 -0
  58. package/tailwind/generated/README.md +2 -0
  59. package/tailwind/generated/default-variables.css +216 -0
  60. package/tailwind/generated/variables-processed.json +161 -0
  61. package/tsconfig.json +14 -3
  62. package/tsconfig.runtime.json +4 -0
  63. package/.eslintrc.js +0 -61
  64. package/postcss.config.ts +0 -6
  65. package/tailwind.config.ts +0 -51
  66. package/variables-processed.json +0 -193
package/CHANGELOG.md ADDED
@@ -0,0 +1,430 @@
1
+ ## 1.0.0-next.31 (2025-03-06)
2
+
3
+ ### 🚀 Features
4
+
5
+ - support captchas natively in new and old elements ([#372](https://github.com/ory/elements/pull/372))
6
+
7
+ ### 🩹 Fixes
8
+
9
+ - center text on OIDC buttons and debounce state update ([#366](https://github.com/ory/elements/pull/366))
10
+
11
+ ### ❤️ Thank You
12
+
13
+ - hackerman @aeneasr
14
+ - Jonas Hungershausen
15
+
16
+ ## 1.0.0-next.30 (2025-03-05)
17
+
18
+ ### 🩹 Fixes
19
+
20
+ - show possible OIDC connections on login method selector ([#362](https://github.com/ory/elements/pull/362))
21
+ - add correct x/twitter OIDC logo ([#364](https://github.com/ory/elements/pull/364))
22
+
23
+ ### ❤️ Thank You
24
+
25
+ - Jonas Hungershausen
26
+
27
+ ## 1.0.0-next.29 (2025-02-27)
28
+
29
+ ### 🩹 Fixes
30
+
31
+ - remove untranslated aria label from auth list item ([#365](https://github.com/ory/elements/pull/365))
32
+ - spacing in auth method list ([#359](https://github.com/ory/elements/pull/359))
33
+
34
+ ### ❤️ Thank You
35
+
36
+ - Jonas Hungershausen
37
+
38
+ ## 1.0.0-next.28 (2025-02-20)
39
+
40
+ ### 🩹 Fixes
41
+
42
+ - safari click handler and redirect handling ([#361](https://github.com/ory/elements/pull/361))
43
+
44
+ ### ❤️ Thank You
45
+
46
+ - Jonas Hungershausen
47
+
48
+ ## 1.0.0-next.27 (2025-02-18)
49
+
50
+ ### 🩹 Fixes
51
+
52
+ - translate {property} in missing property validation message ([#357](https://github.com/ory/elements/pull/357))
53
+ - invisible LinkedIn icon ([#355](https://github.com/ory/elements/pull/355))
54
+ - in initFlowUrl carry over login challenge ([#347](https://github.com/ory/elements/pull/347))
55
+ - define a fallback font stack ([#349](https://github.com/ory/elements/pull/349))
56
+ - show correct OIDC provider logo ([#350](https://github.com/ory/elements/pull/350))
57
+ - brand logic in social sign in icon ([#348](https://github.com/ory/elements/pull/348))
58
+
59
+ ### ❤️ Thank You
60
+
61
+ - Henning Perl @hperl
62
+ - Jonas Hungershausen
63
+
64
+ ## 1.0.0-next.26 (2025-02-18)
65
+
66
+ ### 🩹 Fixes
67
+
68
+ - translate {property} in missing property validation message ([#357](https://github.com/ory/elements/pull/357))
69
+ - invisible LinkedIn icon ([#355](https://github.com/ory/elements/pull/355))
70
+ - in initFlowUrl carry over login challenge ([#347](https://github.com/ory/elements/pull/347))
71
+ - show correct OIDC provider logo ([#350](https://github.com/ory/elements/pull/350))
72
+
73
+ ### ❤️ Thank You
74
+
75
+ - Henning Perl @hperl
76
+ - Jonas Hungershausen
77
+
78
+ ## 1.0.0-next.25 (2025-01-29)
79
+
80
+ ### 🚀 Features
81
+
82
+ - expose get flow factory ([#333](https://github.com/ory/elements/pull/333))
83
+
84
+ ### 🩹 Fixes
85
+
86
+ - make OIDC remove button loading state specific ([#339](https://github.com/ory/elements/pull/339))
87
+ - only show loading indicator on clicked button ([#335](https://github.com/ory/elements/pull/335))
88
+ - don't short circuit code method selector ([#336](https://github.com/ory/elements/pull/336))
89
+
90
+ ### ❤️ Thank You
91
+
92
+ - hackerman @aeneasr
93
+ - Jonas Hungershausen
94
+
95
+ ## 1.0.0-next.24 (2025-01-22)
96
+
97
+ ### 🩹 Fixes
98
+
99
+ - only show loading indicator on clicked button ([#335](https://github.com/ory/elements/pull/335))
100
+ - don't short circuit code method selector ([#336](https://github.com/ory/elements/pull/336))
101
+
102
+ ### ❤️ Thank You
103
+
104
+ - hackerman @aeneasr
105
+ - Jonas Hungershausen
106
+
107
+ ## 1.0.0-next.23 (2025-01-21)
108
+
109
+ ### 🩹 Fixes
110
+
111
+ - don't short circuit code method selector ([#336](https://github.com/ory/elements/pull/336))
112
+
113
+ ### ❤️ Thank You
114
+
115
+ - hackerman @aeneasr
116
+ - Jonas Hungershausen
117
+
118
+ ## 1.0.0-next.3 (2025-01-21)
119
+
120
+ ### 🚀 Features
121
+
122
+ - expose get flow factory ([#333](https://github.com/ory/elements/pull/333))
123
+
124
+ ### ❤️ Thank You
125
+
126
+ - hackerman @aeneasr
127
+
128
+ ## 1.0.0-next.21 (2025-01-18)
129
+
130
+ This was a version bump only for @ory/elements-react to align it with other projects, there were no code changes.
131
+
132
+ ## 1.0.0-next.20 (2025-01-16)
133
+
134
+ ### 🚀 Features
135
+
136
+ - handle state transition edge cases ([f2e4023](https://github.com/ory/elements/commit/f2e4023))
137
+ - user experience improvements and e2e test coverage ([f68744c](https://github.com/ory/elements/commit/f68744c))
138
+ - do not show two-step selector if only one method exists ([6453673](https://github.com/ory/elements/commit/6453673))
139
+
140
+ ### 🩹 Fixes
141
+
142
+ - better validation for code method ([b0d8e2c](https://github.com/ory/elements/commit/b0d8e2c))
143
+
144
+ ### ❤️ Thank You
145
+
146
+ - aeneasr @aeneasr
147
+
148
+ ## 1.0.0-next.19 (2024-12-31)
149
+
150
+ ### 🩹 Fixes
151
+
152
+ - properly handle form submits in settings flow ([#322](https://github.com/ory/elements/pull/322))
153
+
154
+ ### ❤️ Thank You
155
+
156
+ - Jonas Hungershausen
157
+
158
+ ## 1.0.0-next.18 (2024-12-30)
159
+
160
+ ### 🚀 Features
161
+
162
+ - add page and app router examples ([#307](https://github.com/ory/elements/pull/307))
163
+ - ⚠️ add getServerSession and SessionProvider ([#309](https://github.com/ory/elements/pull/309))
164
+ - add @ory/nextjs package ([#303](https://github.com/ory/elements/pull/303))
165
+
166
+ ### 🩹 Fixes
167
+
168
+ - align font sizes to design & use updated variable names ([#318](https://github.com/ory/elements/pull/318))
169
+ - properly set default value for checkboxes ([#314](https://github.com/ory/elements/pull/314))
170
+ - passkey and webauthn in settings flow ([#317](https://github.com/ory/elements/pull/317))
171
+
172
+ ### ⚠️ Breaking Changes
173
+
174
+ - ⚠️ add getServerSession and SessionProvider ([#309](https://github.com/ory/elements/pull/309))
175
+
176
+ ### ❤️ Thank You
177
+
178
+ - hackerman @aeneasr
179
+ - Jonas Hungershausen
180
+
181
+ ## 1.0.0-next.17 (2024-11-27)
182
+
183
+
184
+ ### 🚀 Features
185
+
186
+ - allow overriding OIDC logos
187
+
188
+ - enable proper account linking flows
189
+
190
+ - **core:** add react-hook form resolver
191
+
192
+
193
+ ### 🩹 Fixes
194
+
195
+ - handle recovery brute force protection
196
+
197
+
198
+ ### ❤️ Thank You
199
+
200
+ - Jonas Hungershausen
201
+
202
+ ## 1.0.0-next.16 (2024-11-26)
203
+
204
+
205
+ ### 🚀 Features
206
+
207
+ - allow overriding of field messages
208
+
209
+ - add test ids to components
210
+
211
+
212
+ ### 🩹 Fixes
213
+
214
+ - use --font-sans CSS variable for font
215
+
216
+ - registration & login flow form states
217
+
218
+ - missing resend button on login & registration
219
+
220
+ - password validation error form state
221
+
222
+ - current identifier button overflowing on long values
223
+
224
+
225
+ ### ❤️ Thank You
226
+
227
+ - Jonas Hungershausen
228
+
229
+ ## 1.0.0-next.15 (2024-11-18)
230
+
231
+
232
+ ### 🩹 Fixes
233
+
234
+ - use --font-sans CSS variable for font
235
+
236
+ - registration & login flow form states
237
+
238
+
239
+ ### ❤️ Thank You
240
+
241
+ - Jonas Hungershausen
242
+
243
+ ## 1.0.0-next.14 (2024-11-08)
244
+
245
+
246
+ ### 🚀 Features
247
+
248
+ - force OIDC account selection on settings
249
+
250
+
251
+ ### 🩹 Fixes
252
+
253
+ - redirect to login if session expired during settings
254
+
255
+
256
+ ### ❤️ Thank You
257
+
258
+ - Jonas Hungershausen
259
+
260
+ ## 1.0.0-next.13 (2024-11-05)
261
+
262
+
263
+ ### 🩹 Fixes
264
+
265
+ - ⚠️ move useSession hook to /client entry point
266
+
267
+ - oidc linking & unlinking form properties
268
+
269
+ - hide two step registration message
270
+
271
+ - implement component merging instead of usign lodash
272
+
273
+ - replace translation merge with custom function
274
+
275
+
276
+ #### ⚠️ Breaking Changes
277
+
278
+ - ⚠️ move useSession hook to /client entry point
279
+
280
+ ### ❤️ Thank You
281
+
282
+ - Jonas Hungershausen
283
+
284
+ ## 1.0.0-next.12 (2024-10-29)
285
+
286
+
287
+ ### 🚀 Features
288
+
289
+ - add elements v1 packages
290
+
291
+ - add useSession hook
292
+
293
+ - add page header component with user menu
294
+
295
+ - support links in checkbox/boolean nodes
296
+
297
+ - add settings flow components
298
+
299
+
300
+ ### 🩹 Fixes
301
+
302
+ - use correct node to detect two step registration
303
+
304
+ - use translations in more missing places
305
+
306
+ - short-circuit code login on two step card
307
+
308
+ - duplicate resend button on recovery & verification
309
+
310
+
311
+ ### ❤️ Thank You
312
+
313
+ - Jonas Hungershausen
314
+ - Miłosz
315
+
316
+ ## 1.0.0-next.11 (2024-10-22)
317
+
318
+ Breaking Changes: This update includes breaking changes to the naming of some variables and functions. Please refer to [Advisory: ory elements‐react upgrade guide to v1.0.0‐next.11](https://github.com/ory/elements/wiki/Advisory:-ory-elements%E2%80%90react-upgrade-guide-to-v1.0.0%E2%80%90next.11) for more information.
319
+
320
+
321
+ ### 🚀 Features
322
+
323
+ - add elements v1 packages
324
+
325
+ - add useSession hook
326
+
327
+ ### ❤️ Thank You
328
+
329
+ - Jonas Hungershausen
330
+
331
+ ## 1.0.0-next.10 (2024-10-14)
332
+
333
+
334
+ ### 🩹 Fixes
335
+
336
+ - add missing translations in all places
337
+
338
+
339
+ ### ❤️ Thank You
340
+
341
+ - Jonas Hungershausen
342
+
343
+ ## 1.0.0-next.9 (2024-10-10)
344
+
345
+
346
+ ### 🩹 Fixes
347
+
348
+ - add missing swedish translations
349
+
350
+
351
+ ### ❤️ Thank You
352
+
353
+ - Jonas Hungershausen
354
+
355
+ ## 1.0.0-next.8 (2024-10-07)
356
+
357
+
358
+ ### 🩹 Fixes
359
+
360
+ - ⚠️ remove ory-default-theme class
361
+
362
+ - remove capitalize class from messages
363
+
364
+
365
+ #### ⚠️ Breaking Changes
366
+
367
+ - ⚠️ remove ory-default-theme class
368
+
369
+ ### ❤️ Thank You
370
+
371
+ - Jonas Hungershausen
372
+
373
+ ## 1.0.0-next.7 (2024-09-27)
374
+
375
+ ### 🚀 Features
376
+
377
+ - add two-step login card
378
+
379
+ ### 🩹 Fixes
380
+
381
+ - registration text in swedish translation
382
+
383
+ - show identifier_first node in card header
384
+
385
+ ### ❤️ Thank You
386
+
387
+ - Jonas Hungershausen
388
+
389
+ ## 1.0.0-next.6 (2024-09-18)
390
+
391
+ ### 🩹 Fixes
392
+
393
+ - **intl:** export locales object from package root
394
+
395
+ ### ❤️ Thank You
396
+
397
+ - Jonas Hungershausen
398
+
399
+ ## 1.0.0-next.5 (2024-09-17)
400
+
401
+ ### 🚀 Features
402
+
403
+ - @testing-library/react based tests
404
+
405
+ - **theme:** show resend code button on top of code input
406
+
407
+ ### 🩹 Fixes
408
+
409
+ - **core:** use SDK instead of HTML form submissions
410
+
411
+ - **core:** use empty strings instead of undefined default values
412
+
413
+ - **core:** code form submission precendence
414
+
415
+ - ⚠️ **theme:** scope css classes with .ory-default-theme
416
+
417
+ - **theme:** social sign in button styling
418
+
419
+ - **intl:** use correct abbreveation for swedish locale
420
+
421
+ - **core:** passkey script discovery
422
+
423
+ #### ⚠️ Breaking Changes
424
+
425
+ - ⚠️ **theme:** scope css classes with .ory-default-theme
426
+
427
+ ### ❤️ Thank You
428
+
429
+ - Jonas Hungershausen
430
+ - Miłosz
package/DEVELOPMENT.md ADDED
@@ -0,0 +1,96 @@
1
+ # Developing @ory/elements-react
2
+
3
+ Ory Elements is built inside this monorepo and hooked up to the other packages
4
+ via nx and npm workspaces.
5
+
6
+ To start a hot reloading development mode:
7
+
8
+ ```bash
9
+ npx nx dev @ory/elements-react
10
+ ```
11
+
12
+ ## API Extractor
13
+
14
+ To make sure there are no unintended changes to the API contract, we use
15
+ [API Extractor](https://api-extractor.com/) to generate API reports, that are
16
+ checked into the repository. The CI of each PR includes a check that this API
17
+ report would not change after merging the PR.
18
+
19
+ If the report would change, the CI fails. If that happens, you can re-generate
20
+ all reports by running
21
+
22
+ ```bash
23
+ npx nx api-extractor-refresh @ory/elements-react
24
+ ```
25
+
26
+ Inspect the resulting changes carefully, and make sure it is in line with what
27
+ you expected. Add the changes to your PR.
28
+
29
+ ## Tests
30
+
31
+ Unit tests use Jest and react-testing-library. To run the tests locally,
32
+ execute:
33
+
34
+ ```bash
35
+ npx nx build @ory/elements-react
36
+ ```
37
+
38
+ ### Test selectors
39
+
40
+ To select DOM elements use a `data-testid` selector. Nomenclature mandates `/`
41
+ as separators and a prefix of `ory/`:
42
+
43
+ - `ory/form/` is the prefix for form elements;
44
+ - `ory/screen/` is the prefix for elements on specific screens;
45
+ - `ory/screen/` is the prefix for translatable messages (e.g. validation
46
+ errors).
47
+
48
+ ## Stories
49
+
50
+ Each flow has its own story in the `packages/elements-react-stories` package. To
51
+ run the storybook development environment, execute:
52
+
53
+ ```bash
54
+ npx nx storybook @ory/elements-react
55
+ ```
56
+
57
+ You can also build the Storybook using:
58
+
59
+ ```bash
60
+ npx nx build @ory/elements-react
61
+ ```
62
+
63
+ The stories use stub responses
64
+
65
+ ## Releasing
66
+
67
+ @ory/elements-react and @ory/nextjs is released using nx releases.
68
+
69
+ There is a helper script located in `./scripts/release.sh`.
70
+
71
+ Usage:
72
+
73
+ ```bash
74
+ ./scripts/release.sh <project> <tag>
75
+
76
+ ./scripts/release.sh @ory/elements-react next
77
+ ```
78
+
79
+ The script asks the user before executing each steps. Please double check
80
+ CHANGELOG.md and dry run outputs. nx also creates git tags and commits, that
81
+ should be commited. The script will do that automatically.
82
+
83
+ ### Pre-releasing unmerged changes
84
+
85
+ You can release a PR's changes to npm to test them in a different repository,
86
+ etc. These versions are released on the `pr` npm tag, and will have the version
87
+ `0.0.0-pr.<git hash>`. These releases wont be pushed to master, but you might
88
+ have to revert the `package.json` and `package-lock.json` files.
89
+
90
+ Usage:
91
+
92
+ ```bash
93
+ ./scripts/release.sh <project> <tag>
94
+
95
+ ./scripts/release.sh @ory/elements-react pr
96
+ ```