@ory/elements-react 0.0.0-pr.3a98de9

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