@ory/elements-react 1.0.0-next.4 → 1.0.0-next.40

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 (67) hide show
  1. package/CHANGELOG.md +525 -0
  2. package/DEVELOPMENT.md +94 -0
  3. package/LICENSE +201 -0
  4. package/README.md +112 -33
  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 +10 -0
  13. package/dist/client/frontendClient.d.ts +10 -0
  14. package/dist/client/frontendClient.js +75 -0
  15. package/dist/client/frontendClient.js.map +1 -0
  16. package/dist/client/frontendClient.mjs +54 -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 +478 -1633
  37. package/dist/index.d.ts +478 -1633
  38. package/dist/index.js +2845 -5733
  39. package/dist/index.js.map +1 -1
  40. package/dist/index.mjs +2842 -5704
  41. package/dist/index.mjs.map +1 -1
  42. package/dist/theme/default/index.css +999 -286
  43. package/dist/theme/default/index.css.map +1 -1
  44. package/dist/theme/default/index.d.mts +57 -144
  45. package/dist/theme/default/index.d.ts +57 -144
  46. package/dist/theme/default/index.js +4415 -9303
  47. package/dist/theme/default/index.js.map +1 -1
  48. package/dist/theme/default/index.mjs +5565 -10414
  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 +36 -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/test-results/.last-run.json +0 -4
  67. package/variables-processed.json +0 -193
package/CHANGELOG.md ADDED
@@ -0,0 +1,525 @@
1
+ ## 1.0.0-next.40 (2025-04-02)
2
+
3
+ ### 🚀 Features
4
+
5
+ - support SAML-native ([#395](https://github.com/ory/elements/pull/395))
6
+
7
+ ### ❤️ Thank You
8
+
9
+ - hackerman @aeneasr
10
+
11
+ ## 1.0.0-next.39 (2025-03-25)
12
+
13
+ ### 🚀 Features
14
+
15
+ - add SAML group handling ([#390](https://github.com/ory/elements/pull/390))
16
+
17
+ ### ❤️ Thank You
18
+
19
+ - hackerman @aeneasr
20
+
21
+ ## 1.0.0-next.38 (2025-03-24)
22
+
23
+ ### 🩹 Fixes
24
+
25
+ - hide registration link again ([#387](https://github.com/ory/elements/pull/387))
26
+
27
+ ### ❤️ Thank You
28
+
29
+ - hackerman @aeneasr
30
+
31
+ ## 1.0.0-next.37 (2025-03-12)
32
+
33
+ ### 🩹 Fixes
34
+
35
+ - correctly render test id for error card ([#386](https://github.com/ory/elements/pull/386))
36
+
37
+ ### ❤️ Thank You
38
+
39
+ - Jonas Hungershausen
40
+
41
+ ## 1.0.0-next.36 (2025-03-12)
42
+
43
+ ### 🩹 Fixes
44
+
45
+ - handle error messages for selected methods ([#385](https://github.com/ory/elements/pull/385))
46
+
47
+ ### ❤️ Thank You
48
+
49
+ - Pierre Caillaud @pcaillaudm
50
+
51
+ ## 1.0.0-next.35 (2025-03-12)
52
+
53
+ ### 🚀 Features
54
+
55
+ - add more intelligent error screen ([#383](https://github.com/ory/elements/pull/383))
56
+
57
+ ### ❤️ Thank You
58
+
59
+ - Jonas Hungershausen
60
+
61
+ ## 1.0.0-next.34 (2025-03-12)
62
+
63
+ ### 🩹 Fixes
64
+
65
+ - use correct import paths ([#384](https://github.com/ory/elements/pull/384))
66
+
67
+ ### ❤️ Thank You
68
+
69
+ - hackerman @aeneasr
70
+
71
+ ## 1.0.0-next.33 (2025-03-07)
72
+
73
+ ### 🚀 Features
74
+
75
+ - add password toggle to input ([#378](https://github.com/ory/elements/pull/378))
76
+
77
+ ### 🩹 Fixes
78
+
79
+ - validation message regression ([#380](https://github.com/ory/elements/pull/380))
80
+
81
+ ### ❤️ Thank You
82
+
83
+ - Jonas Hungershausen
84
+ - Pierre Caillaud @pcaillaudm
85
+
86
+ ## 1.0.0-next.32 (2025-03-06)
87
+
88
+ ### 🚀 Features
89
+
90
+ - use method selector in 2fa login ([#377](https://github.com/ory/elements/pull/377))
91
+
92
+ ### ❤️ Thank You
93
+
94
+ - Pierre Caillaud @pcaillaudm
95
+
96
+ ## 1.0.0-next.31 (2025-03-06)
97
+
98
+ ### 🚀 Features
99
+
100
+ - support captchas natively in new and old elements ([#372](https://github.com/ory/elements/pull/372))
101
+
102
+ ### 🩹 Fixes
103
+
104
+ - center text on OIDC buttons and debounce state update ([#366](https://github.com/ory/elements/pull/366))
105
+
106
+ ### ❤️ Thank You
107
+
108
+ - hackerman @aeneasr
109
+ - Jonas Hungershausen
110
+
111
+ ## 1.0.0-next.30 (2025-03-05)
112
+
113
+ ### 🩹 Fixes
114
+
115
+ - show possible OIDC connections on login method selector ([#362](https://github.com/ory/elements/pull/362))
116
+ - add correct x/twitter OIDC logo ([#364](https://github.com/ory/elements/pull/364))
117
+
118
+ ### ❤️ Thank You
119
+
120
+ - Jonas Hungershausen
121
+
122
+ ## 1.0.0-next.29 (2025-02-27)
123
+
124
+ ### 🩹 Fixes
125
+
126
+ - remove untranslated aria label from auth list item ([#365](https://github.com/ory/elements/pull/365))
127
+ - spacing in auth method list ([#359](https://github.com/ory/elements/pull/359))
128
+
129
+ ### ❤️ Thank You
130
+
131
+ - Jonas Hungershausen
132
+
133
+ ## 1.0.0-next.28 (2025-02-20)
134
+
135
+ ### 🩹 Fixes
136
+
137
+ - safari click handler and redirect handling ([#361](https://github.com/ory/elements/pull/361))
138
+
139
+ ### ❤️ Thank You
140
+
141
+ - Jonas Hungershausen
142
+
143
+ ## 1.0.0-next.27 (2025-02-18)
144
+
145
+ ### 🩹 Fixes
146
+
147
+ - translate {property} in missing property validation message ([#357](https://github.com/ory/elements/pull/357))
148
+ - invisible LinkedIn icon ([#355](https://github.com/ory/elements/pull/355))
149
+ - in initFlowUrl carry over login challenge ([#347](https://github.com/ory/elements/pull/347))
150
+ - define a fallback font stack ([#349](https://github.com/ory/elements/pull/349))
151
+ - show correct OIDC provider logo ([#350](https://github.com/ory/elements/pull/350))
152
+ - brand logic in social sign in icon ([#348](https://github.com/ory/elements/pull/348))
153
+
154
+ ### ❤️ Thank You
155
+
156
+ - Henning Perl @hperl
157
+ - Jonas Hungershausen
158
+
159
+ ## 1.0.0-next.26 (2025-02-18)
160
+
161
+ ### 🩹 Fixes
162
+
163
+ - translate {property} in missing property validation message ([#357](https://github.com/ory/elements/pull/357))
164
+ - invisible LinkedIn icon ([#355](https://github.com/ory/elements/pull/355))
165
+ - in initFlowUrl carry over login challenge ([#347](https://github.com/ory/elements/pull/347))
166
+ - show correct OIDC provider logo ([#350](https://github.com/ory/elements/pull/350))
167
+
168
+ ### ❤️ Thank You
169
+
170
+ - Henning Perl @hperl
171
+ - Jonas Hungershausen
172
+
173
+ ## 1.0.0-next.25 (2025-01-29)
174
+
175
+ ### 🚀 Features
176
+
177
+ - expose get flow factory ([#333](https://github.com/ory/elements/pull/333))
178
+
179
+ ### 🩹 Fixes
180
+
181
+ - make OIDC remove button loading state specific ([#339](https://github.com/ory/elements/pull/339))
182
+ - only show loading indicator on clicked button ([#335](https://github.com/ory/elements/pull/335))
183
+ - don't short circuit code method selector ([#336](https://github.com/ory/elements/pull/336))
184
+
185
+ ### ❤️ Thank You
186
+
187
+ - hackerman @aeneasr
188
+ - Jonas Hungershausen
189
+
190
+ ## 1.0.0-next.24 (2025-01-22)
191
+
192
+ ### 🩹 Fixes
193
+
194
+ - only show loading indicator on clicked button ([#335](https://github.com/ory/elements/pull/335))
195
+ - don't short circuit code method selector ([#336](https://github.com/ory/elements/pull/336))
196
+
197
+ ### ❤️ Thank You
198
+
199
+ - hackerman @aeneasr
200
+ - Jonas Hungershausen
201
+
202
+ ## 1.0.0-next.23 (2025-01-21)
203
+
204
+ ### 🩹 Fixes
205
+
206
+ - don't short circuit code method selector ([#336](https://github.com/ory/elements/pull/336))
207
+
208
+ ### ❤️ Thank You
209
+
210
+ - hackerman @aeneasr
211
+ - Jonas Hungershausen
212
+
213
+ ## 1.0.0-next.3 (2025-01-21)
214
+
215
+ ### 🚀 Features
216
+
217
+ - expose get flow factory ([#333](https://github.com/ory/elements/pull/333))
218
+
219
+ ### ❤️ Thank You
220
+
221
+ - hackerman @aeneasr
222
+
223
+ ## 1.0.0-next.21 (2025-01-18)
224
+
225
+ This was a version bump only for @ory/elements-react to align it with other projects, there were no code changes.
226
+
227
+ ## 1.0.0-next.20 (2025-01-16)
228
+
229
+ ### 🚀 Features
230
+
231
+ - handle state transition edge cases ([f2e4023](https://github.com/ory/elements/commit/f2e4023))
232
+ - user experience improvements and e2e test coverage ([f68744c](https://github.com/ory/elements/commit/f68744c))
233
+ - do not show two-step selector if only one method exists ([6453673](https://github.com/ory/elements/commit/6453673))
234
+
235
+ ### 🩹 Fixes
236
+
237
+ - better validation for code method ([b0d8e2c](https://github.com/ory/elements/commit/b0d8e2c))
238
+
239
+ ### ❤️ Thank You
240
+
241
+ - aeneasr @aeneasr
242
+
243
+ ## 1.0.0-next.19 (2024-12-31)
244
+
245
+ ### 🩹 Fixes
246
+
247
+ - properly handle form submits in settings flow ([#322](https://github.com/ory/elements/pull/322))
248
+
249
+ ### ❤️ Thank You
250
+
251
+ - Jonas Hungershausen
252
+
253
+ ## 1.0.0-next.18 (2024-12-30)
254
+
255
+ ### 🚀 Features
256
+
257
+ - add page and app router examples ([#307](https://github.com/ory/elements/pull/307))
258
+ - ⚠️ add getServerSession and SessionProvider ([#309](https://github.com/ory/elements/pull/309))
259
+ - add @ory/nextjs package ([#303](https://github.com/ory/elements/pull/303))
260
+
261
+ ### 🩹 Fixes
262
+
263
+ - align font sizes to design & use updated variable names ([#318](https://github.com/ory/elements/pull/318))
264
+ - properly set default value for checkboxes ([#314](https://github.com/ory/elements/pull/314))
265
+ - passkey and webauthn in settings flow ([#317](https://github.com/ory/elements/pull/317))
266
+
267
+ ### ⚠️ Breaking Changes
268
+
269
+ - ⚠️ add getServerSession and SessionProvider ([#309](https://github.com/ory/elements/pull/309))
270
+
271
+ ### ❤️ Thank You
272
+
273
+ - hackerman @aeneasr
274
+ - Jonas Hungershausen
275
+
276
+ ## 1.0.0-next.17 (2024-11-27)
277
+
278
+
279
+ ### 🚀 Features
280
+
281
+ - allow overriding OIDC logos
282
+
283
+ - enable proper account linking flows
284
+
285
+ - **core:** add react-hook form resolver
286
+
287
+
288
+ ### 🩹 Fixes
289
+
290
+ - handle recovery brute force protection
291
+
292
+
293
+ ### ❤️ Thank You
294
+
295
+ - Jonas Hungershausen
296
+
297
+ ## 1.0.0-next.16 (2024-11-26)
298
+
299
+
300
+ ### 🚀 Features
301
+
302
+ - allow overriding of field messages
303
+
304
+ - add test ids to components
305
+
306
+
307
+ ### 🩹 Fixes
308
+
309
+ - use --font-sans CSS variable for font
310
+
311
+ - registration & login flow form states
312
+
313
+ - missing resend button on login & registration
314
+
315
+ - password validation error form state
316
+
317
+ - current identifier button overflowing on long values
318
+
319
+
320
+ ### ❤️ Thank You
321
+
322
+ - Jonas Hungershausen
323
+
324
+ ## 1.0.0-next.15 (2024-11-18)
325
+
326
+
327
+ ### 🩹 Fixes
328
+
329
+ - use --font-sans CSS variable for font
330
+
331
+ - registration & login flow form states
332
+
333
+
334
+ ### ❤️ Thank You
335
+
336
+ - Jonas Hungershausen
337
+
338
+ ## 1.0.0-next.14 (2024-11-08)
339
+
340
+
341
+ ### 🚀 Features
342
+
343
+ - force OIDC account selection on settings
344
+
345
+
346
+ ### 🩹 Fixes
347
+
348
+ - redirect to login if session expired during settings
349
+
350
+
351
+ ### ❤️ Thank You
352
+
353
+ - Jonas Hungershausen
354
+
355
+ ## 1.0.0-next.13 (2024-11-05)
356
+
357
+
358
+ ### 🩹 Fixes
359
+
360
+ - ⚠️ move useSession hook to /client entry point
361
+
362
+ - oidc linking & unlinking form properties
363
+
364
+ - hide two step registration message
365
+
366
+ - implement component merging instead of usign lodash
367
+
368
+ - replace translation merge with custom function
369
+
370
+
371
+ #### ⚠️ Breaking Changes
372
+
373
+ - ⚠️ move useSession hook to /client entry point
374
+
375
+ ### ❤️ Thank You
376
+
377
+ - Jonas Hungershausen
378
+
379
+ ## 1.0.0-next.12 (2024-10-29)
380
+
381
+
382
+ ### 🚀 Features
383
+
384
+ - add elements v1 packages
385
+
386
+ - add useSession hook
387
+
388
+ - add page header component with user menu
389
+
390
+ - support links in checkbox/boolean nodes
391
+
392
+ - add settings flow components
393
+
394
+
395
+ ### 🩹 Fixes
396
+
397
+ - use correct node to detect two step registration
398
+
399
+ - use translations in more missing places
400
+
401
+ - short-circuit code login on two step card
402
+
403
+ - duplicate resend button on recovery & verification
404
+
405
+
406
+ ### ❤️ Thank You
407
+
408
+ - Jonas Hungershausen
409
+ - Miłosz
410
+
411
+ ## 1.0.0-next.11 (2024-10-22)
412
+
413
+ 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.
414
+
415
+
416
+ ### 🚀 Features
417
+
418
+ - add elements v1 packages
419
+
420
+ - add useSession hook
421
+
422
+ ### ❤️ Thank You
423
+
424
+ - Jonas Hungershausen
425
+
426
+ ## 1.0.0-next.10 (2024-10-14)
427
+
428
+
429
+ ### 🩹 Fixes
430
+
431
+ - add missing translations in all places
432
+
433
+
434
+ ### ❤️ Thank You
435
+
436
+ - Jonas Hungershausen
437
+
438
+ ## 1.0.0-next.9 (2024-10-10)
439
+
440
+
441
+ ### 🩹 Fixes
442
+
443
+ - add missing swedish translations
444
+
445
+
446
+ ### ❤️ Thank You
447
+
448
+ - Jonas Hungershausen
449
+
450
+ ## 1.0.0-next.8 (2024-10-07)
451
+
452
+
453
+ ### 🩹 Fixes
454
+
455
+ - ⚠️ remove ory-default-theme class
456
+
457
+ - remove capitalize class from messages
458
+
459
+
460
+ #### ⚠️ Breaking Changes
461
+
462
+ - ⚠️ remove ory-default-theme class
463
+
464
+ ### ❤️ Thank You
465
+
466
+ - Jonas Hungershausen
467
+
468
+ ## 1.0.0-next.7 (2024-09-27)
469
+
470
+ ### 🚀 Features
471
+
472
+ - add two-step login card
473
+
474
+ ### 🩹 Fixes
475
+
476
+ - registration text in swedish translation
477
+
478
+ - show identifier_first node in card header
479
+
480
+ ### ❤️ Thank You
481
+
482
+ - Jonas Hungershausen
483
+
484
+ ## 1.0.0-next.6 (2024-09-18)
485
+
486
+ ### 🩹 Fixes
487
+
488
+ - **intl:** export locales object from package root
489
+
490
+ ### ❤️ Thank You
491
+
492
+ - Jonas Hungershausen
493
+
494
+ ## 1.0.0-next.5 (2024-09-17)
495
+
496
+ ### 🚀 Features
497
+
498
+ - @testing-library/react based tests
499
+
500
+ - **theme:** show resend code button on top of code input
501
+
502
+ ### 🩹 Fixes
503
+
504
+ - **core:** use SDK instead of HTML form submissions
505
+
506
+ - **core:** use empty strings instead of undefined default values
507
+
508
+ - **core:** code form submission precendence
509
+
510
+ - ⚠️ **theme:** scope css classes with .ory-default-theme
511
+
512
+ - **theme:** social sign in button styling
513
+
514
+ - **intl:** use correct abbreveation for swedish locale
515
+
516
+ - **core:** passkey script discovery
517
+
518
+ #### ⚠️ Breaking Changes
519
+
520
+ - ⚠️ **theme:** scope css classes with .ory-default-theme
521
+
522
+ ### ❤️ Thank You
523
+
524
+ - Jonas Hungershausen
525
+ - Miłosz
package/DEVELOPMENT.md ADDED
@@ -0,0 +1,94 @@
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 @ory/elements-react pr
94
+ ```