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

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