@ory/elements-react 1.0.0-next.14 → 1.0.0-next.16

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.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,44 @@
1
+ ## 1.0.0-next.16 (2024-11-26)
2
+
3
+
4
+ ### 🚀 Features
5
+
6
+ - allow overriding of field messages
7
+
8
+ - add test ids to components
9
+
10
+
11
+ ### 🩹 Fixes
12
+
13
+ - use --font-sans CSS variable for font
14
+
15
+ - registration & login flow form states
16
+
17
+ - missing resend button on login & registration
18
+
19
+ - password validation error form state
20
+
21
+ - current identifier button overflowing on long values
22
+
23
+
24
+ ### ❤️ Thank You
25
+
26
+ - Jonas Hungershausen
27
+
28
+ ## 1.0.0-next.15 (2024-11-18)
29
+
30
+
31
+ ### 🩹 Fixes
32
+
33
+ - use --font-sans CSS variable for font
34
+
35
+ - registration & login flow form states
36
+
37
+
38
+ ### ❤️ Thank You
39
+
40
+ - Jonas Hungershausen
41
+
1
42
  ## 1.0.0-next.14 (2024-11-08)
2
43
 
3
44
 
@@ -357,6 +357,39 @@
357
357
  "parameters": [],
358
358
  "name": "DefaultCardLogo"
359
359
  },
360
+ {
361
+ "kind": "Function",
362
+ "canonicalReference": "@ory/elements-react!DefaultCurrentIdentifierButton:function(1)",
363
+ "docComment": "",
364
+ "excerptTokens": [
365
+ {
366
+ "kind": "Content",
367
+ "text": "declare function DefaultCurrentIdentifierButton(): "
368
+ },
369
+ {
370
+ "kind": "Reference",
371
+ "text": "react_jsx_runtime.JSX.Element",
372
+ "canonicalReference": "@types/react!JSX.Element:interface"
373
+ },
374
+ {
375
+ "kind": "Content",
376
+ "text": " | null"
377
+ },
378
+ {
379
+ "kind": "Content",
380
+ "text": ";"
381
+ }
382
+ ],
383
+ "fileUrlPath": "dist/theme/default/index.d.ts",
384
+ "returnTypeTokenRange": {
385
+ "startIndex": 1,
386
+ "endIndex": 3
387
+ },
388
+ "releaseTag": "Public",
389
+ "overloadIndex": 1,
390
+ "parameters": [],
391
+ "name": "DefaultCurrentIdentifierButton"
392
+ },
360
393
  {
361
394
  "kind": "Function",
362
395
  "canonicalReference": "@ory/elements-react!DefaultFormContainer:function(1)",
@@ -47,6 +47,9 @@ export function DefaultCardHeader(): react_jsx_runtime.JSX.Element;
47
47
  // @public (undocumented)
48
48
  export function DefaultCardLogo(): react_jsx_runtime.JSX.Element;
49
49
 
50
+ // @public (undocumented)
51
+ export function DefaultCurrentIdentifierButton(): react_jsx_runtime.JSX.Element | null;
52
+
50
53
  // Warning: (ae-forgotten-export) The symbol "OryFormRootProps" needs to be exported by the entry point index.d.ts
51
54
  //
52
55
  // @public (undocumented)
@@ -123,8 +126,8 @@ export type VerificationFlowContextProps = {
123
126
 
124
127
  // Warnings were encountered during analysis:
125
128
  //
126
- // dist/theme/default/index.d.ts:25:5 - (ae-forgotten-export) The symbol "OryFlowComponentOverrides" needs to be exported by the entry point index.d.ts
127
- // dist/theme/default/index.d.ts:26:5 - (ae-forgotten-export) The symbol "OryClientConfiguration" needs to be exported by the entry point index.d.ts
129
+ // dist/theme/default/index.d.ts:27:5 - (ae-forgotten-export) The symbol "OryFlowComponentOverrides" needs to be exported by the entry point index.d.ts
130
+ // dist/theme/default/index.d.ts:28:5 - (ae-forgotten-export) The symbol "OryClientConfiguration" needs to be exported by the entry point index.d.ts
128
131
 
129
132
  // (No @packageDocumentation comment for this package)
130
133
 
@@ -239,15 +239,6 @@
239
239
  "kind": "Content",
240
240
  "text": "<"
241
241
  },
242
- {
243
- "kind": "Reference",
244
- "text": "Partial",
245
- "canonicalReference": "!Partial:type"
246
- },
247
- {
248
- "kind": "Content",
249
- "text": "<"
250
- },
251
242
  {
252
243
  "kind": "Reference",
253
244
  "text": "OryFlowContainer",
@@ -255,7 +246,7 @@
255
246
  },
256
247
  {
257
248
  "kind": "Content",
258
- "text": ">>"
249
+ "text": ">"
259
250
  },
260
251
  {
261
252
  "kind": "Content",
@@ -267,7 +258,7 @@
267
258
  "name": "FlowContainerSetter",
268
259
  "typeTokenRange": {
269
260
  "startIndex": 1,
270
- "endIndex": 7
261
+ "endIndex": 5
271
262
  }
272
263
  },
273
264
  {
@@ -295,7 +286,34 @@
295
286
  },
296
287
  {
297
288
  "kind": "Content",
298
- "text": ";\n}"
289
+ "text": ";\n formState: "
290
+ },
291
+ {
292
+ "kind": "Reference",
293
+ "text": "FormState",
294
+ "canonicalReference": "@ory/elements-react!FormState:type"
295
+ },
296
+ {
297
+ "kind": "Content",
298
+ "text": ";\n dispatchFormState: "
299
+ },
300
+ {
301
+ "kind": "Reference",
302
+ "text": "Dispatch",
303
+ "canonicalReference": "@types/react!React.Dispatch:type"
304
+ },
305
+ {
306
+ "kind": "Content",
307
+ "text": "<"
308
+ },
309
+ {
310
+ "kind": "Reference",
311
+ "text": "FormStateAction",
312
+ "canonicalReference": "@ory/elements-react!FormStateAction:type"
313
+ },
314
+ {
315
+ "kind": "Content",
316
+ "text": ">;\n}"
299
317
  },
300
318
  {
301
319
  "kind": "Content",
@@ -307,7 +325,86 @@
307
325
  "name": "FlowContextValue",
308
326
  "typeTokenRange": {
309
327
  "startIndex": 1,
310
- "endIndex": 5
328
+ "endIndex": 11
329
+ }
330
+ },
331
+ {
332
+ "kind": "TypeAlias",
333
+ "canonicalReference": "@ory/elements-react!FormState:type",
334
+ "docComment": "",
335
+ "excerptTokens": [
336
+ {
337
+ "kind": "Content",
338
+ "text": "type FormState = "
339
+ },
340
+ {
341
+ "kind": "Content",
342
+ "text": "{\n current: \"provide_identifier\";\n} | {\n current: \"select_method\";\n} | {\n current: \"method_active\";\n method: "
343
+ },
344
+ {
345
+ "kind": "Reference",
346
+ "text": "UiNodeGroupEnum",
347
+ "canonicalReference": "@ory/client-fetch!UiNodeGroupEnum:type"
348
+ },
349
+ {
350
+ "kind": "Content",
351
+ "text": ";\n} | {\n current: \"success_screen\";\n} | {\n current: \"settings\";\n}"
352
+ },
353
+ {
354
+ "kind": "Content",
355
+ "text": ";"
356
+ }
357
+ ],
358
+ "fileUrlPath": "dist/index.d.ts",
359
+ "releaseTag": "Public",
360
+ "name": "FormState",
361
+ "typeTokenRange": {
362
+ "startIndex": 1,
363
+ "endIndex": 4
364
+ }
365
+ },
366
+ {
367
+ "kind": "TypeAlias",
368
+ "canonicalReference": "@ory/elements-react!FormStateAction:type",
369
+ "docComment": "",
370
+ "excerptTokens": [
371
+ {
372
+ "kind": "Content",
373
+ "text": "type FormStateAction = "
374
+ },
375
+ {
376
+ "kind": "Content",
377
+ "text": "{\n type: \"action_flow_update\";\n flow: "
378
+ },
379
+ {
380
+ "kind": "Reference",
381
+ "text": "OryFlowContainer",
382
+ "canonicalReference": "@ory/elements-react!OryFlowContainer:type"
383
+ },
384
+ {
385
+ "kind": "Content",
386
+ "text": ";\n} | {\n type: \"action_select_method\";\n method: "
387
+ },
388
+ {
389
+ "kind": "Reference",
390
+ "text": "UiNodeGroupEnum",
391
+ "canonicalReference": "@ory/client-fetch!UiNodeGroupEnum:type"
392
+ },
393
+ {
394
+ "kind": "Content",
395
+ "text": ";\n}"
396
+ },
397
+ {
398
+ "kind": "Content",
399
+ "text": ";"
400
+ }
401
+ ],
402
+ "fileUrlPath": "dist/index.d.ts",
403
+ "releaseTag": "Public",
404
+ "name": "FormStateAction",
405
+ "typeTokenRange": {
406
+ "startIndex": 1,
407
+ "endIndex": 6
311
408
  }
312
409
  },
313
410
  {
@@ -1050,68 +1147,6 @@
1050
1147
  "endIndex": 8
1051
1148
  }
1052
1149
  },
1053
- {
1054
- "kind": "TypeAlias",
1055
- "canonicalReference": "@ory/elements-react!OryCurrentIdentifierProps:type",
1056
- "docComment": "",
1057
- "excerptTokens": [
1058
- {
1059
- "kind": "Content",
1060
- "text": "type OryCurrentIdentifierProps = "
1061
- },
1062
- {
1063
- "kind": "Content",
1064
- "text": "{\n attributes: "
1065
- },
1066
- {
1067
- "kind": "Reference",
1068
- "text": "UiNodeInputAttributes",
1069
- "canonicalReference": "@ory/client-fetch!UiNodeInputAttributes:interface"
1070
- },
1071
- {
1072
- "kind": "Content",
1073
- "text": ";\n node: "
1074
- },
1075
- {
1076
- "kind": "Reference",
1077
- "text": "UiNode",
1078
- "canonicalReference": "@ory/client-fetch!UiNode:interface"
1079
- },
1080
- {
1081
- "kind": "Content",
1082
- "text": ";\n onClick?: () => void;\n href?: string;\n} & "
1083
- },
1084
- {
1085
- "kind": "Reference",
1086
- "text": "Omit",
1087
- "canonicalReference": "!Omit:type"
1088
- },
1089
- {
1090
- "kind": "Content",
1091
- "text": "<"
1092
- },
1093
- {
1094
- "kind": "Reference",
1095
- "text": "ComponentPropsWithoutRef",
1096
- "canonicalReference": "@types/react!React.ComponentPropsWithoutRef:type"
1097
- },
1098
- {
1099
- "kind": "Content",
1100
- "text": "<\"button\">, \"children\" | \"onClick\">"
1101
- },
1102
- {
1103
- "kind": "Content",
1104
- "text": ";"
1105
- }
1106
- ],
1107
- "fileUrlPath": "dist/index.d.ts",
1108
- "releaseTag": "Public",
1109
- "name": "OryCurrentIdentifierProps",
1110
- "typeTokenRange": {
1111
- "startIndex": 1,
1112
- "endIndex": 10
1113
- }
1114
- },
1115
1150
  {
1116
1151
  "kind": "TypeAlias",
1117
1152
  "canonicalReference": "@ory/elements-react!OryFlowComponentOverrides:type",
@@ -1197,24 +1232,6 @@
1197
1232
  "text": "OryNodeOidcButtonProps",
1198
1233
  "canonicalReference": "@ory/elements-react!OryNodeOidcButtonProps:type"
1199
1234
  },
1200
- {
1201
- "kind": "Content",
1202
- "text": ">;\n CurrentIdentifierButton: "
1203
- },
1204
- {
1205
- "kind": "Reference",
1206
- "text": "ComponentType",
1207
- "canonicalReference": "@types/react!React.ComponentType:type"
1208
- },
1209
- {
1210
- "kind": "Content",
1211
- "text": "<"
1212
- },
1213
- {
1214
- "kind": "Reference",
1215
- "text": "OryCurrentIdentifierProps",
1216
- "canonicalReference": "@ory/elements-react!OryCurrentIdentifierProps:type"
1217
- },
1218
1235
  {
1219
1236
  "kind": "Content",
1220
1237
  "text": ">;\n Anchor: "
@@ -1733,7 +1750,7 @@
1733
1750
  "name": "OryFlowComponents",
1734
1751
  "typeTokenRange": {
1735
1752
  "startIndex": 1,
1736
- "endIndex": 126
1753
+ "endIndex": 122
1737
1754
  }
1738
1755
  },
1739
1756
  {
@@ -1806,7 +1823,7 @@
1806
1823
  "excerptTokens": [
1807
1824
  {
1808
1825
  "kind": "Content",
1809
- "text": "declare function OryForm({ children, onAfterSubmit, nodes }: "
1826
+ "text": "declare function OryForm({ children, onAfterSubmit }: "
1810
1827
  },
1811
1828
  {
1812
1829
  "kind": "Reference",
@@ -1840,7 +1857,7 @@
1840
1857
  "overloadIndex": 1,
1841
1858
  "parameters": [
1842
1859
  {
1843
- "parameterName": "{ children, onAfterSubmit, nodes }",
1860
+ "parameterName": "{ children, onAfterSubmit }",
1844
1861
  "parameterTypeTokenRange": {
1845
1862
  "startIndex": 1,
1846
1863
  "endIndex": 2
@@ -2135,16 +2152,7 @@
2135
2152
  },
2136
2153
  {
2137
2154
  "kind": "Content",
2138
- "text": "<{\n onAfterSubmit?: (method: string | number | boolean | undefined) => void;\n nodes?: "
2139
- },
2140
- {
2141
- "kind": "Reference",
2142
- "text": "UiNode",
2143
- "canonicalReference": "@ory/client-fetch!UiNode:interface"
2144
- },
2145
- {
2146
- "kind": "Content",
2147
- "text": "[];\n}>"
2155
+ "text": "<{\n onAfterSubmit?: (method: string | number | boolean | undefined) => void;\n}>"
2148
2156
  },
2149
2157
  {
2150
2158
  "kind": "Content",
@@ -2156,7 +2164,7 @@
2156
2164
  "name": "OryFormProps",
2157
2165
  "typeTokenRange": {
2158
2166
  "startIndex": 1,
2159
- "endIndex": 5
2167
+ "endIndex": 3
2160
2168
  }
2161
2169
  },
2162
2170
  {
@@ -44,11 +44,36 @@ import { VerificationFlow } from '@ory/client-fetch';
44
44
  export type ErrorFlowContainer = OryFlow<FlowType.Error, FlowError>;
45
45
 
46
46
  // @public
47
- export type FlowContainerSetter = Dispatch<Partial<OryFlowContainer>>;
47
+ export type FlowContainerSetter = Dispatch<OryFlowContainer>;
48
48
 
49
49
  // @public
50
50
  export type FlowContextValue = OryFlowContainer & {
51
51
  setFlowContainer: FlowContainerSetter;
52
+ formState: FormState;
53
+ dispatchFormState: Dispatch<FormStateAction>;
54
+ };
55
+
56
+ // @public (undocumented)
57
+ export type FormState = {
58
+ current: "provide_identifier";
59
+ } | {
60
+ current: "select_method";
61
+ } | {
62
+ current: "method_active";
63
+ method: UiNodeGroupEnum;
64
+ } | {
65
+ current: "success_screen";
66
+ } | {
67
+ current: "settings";
68
+ };
69
+
70
+ // @public (undocumented)
71
+ export type FormStateAction = {
72
+ type: "action_flow_update";
73
+ flow: OryFlowContainer;
74
+ } | {
75
+ type: "action_select_method";
76
+ method: UiNodeGroupEnum;
52
77
  };
53
78
 
54
79
  // @public
@@ -138,14 +163,6 @@ export type OryClientConfiguration = {
138
163
  intl?: IntlConfig;
139
164
  };
140
165
 
141
- // @public (undocumented)
142
- export type OryCurrentIdentifierProps = {
143
- attributes: UiNodeInputAttributes;
144
- node: UiNode;
145
- onClick?: () => void;
146
- href?: string;
147
- } & Omit<ComponentPropsWithoutRef<"button">, "children" | "onClick">;
148
-
149
166
  // Warning: (ae-forgotten-export) The symbol "DeepPartialTwoLevels" needs to be exported by the entry point index.d.ts
150
167
  //
151
168
  // @public (undocumented)
@@ -156,7 +173,6 @@ export type OryFlowComponents = {
156
173
  Node: {
157
174
  Button: ComponentType<OryNodeButtonProps>;
158
175
  OidcButton: ComponentType<OryNodeOidcButtonProps>;
159
- CurrentIdentifierButton: ComponentType<OryCurrentIdentifierProps>;
160
176
  Anchor: ComponentType<OryNodeAnchorProps>;
161
177
  Input: ComponentType<OryNodeInputProps>;
162
178
  CodeInput: ComponentType<OryNodeInputProps>;
@@ -200,7 +216,7 @@ export type OryFlowComponents = {
200
216
  export type OryFlowContainer = LoginFlowContainer | RegistrationFlowContainer | RecoveryFlowContainer | VerificationFlowContainer | SettingsFlowContainer;
201
217
 
202
218
  // @public (undocumented)
203
- export function OryForm({ children, onAfterSubmit, nodes }: OryFormProps): string | react_jsx_runtime.JSX.Element;
219
+ export function OryForm({ children, onAfterSubmit }: OryFormProps): string | react_jsx_runtime.JSX.Element;
204
220
 
205
221
  // @public
206
222
  export function OryFormGroupDivider(): react_jsx_runtime.JSX.Element | null;
@@ -232,7 +248,6 @@ export type OryFormOidcRootProps = PropsWithChildren<{
232
248
  // @public (undocumented)
233
249
  export type OryFormProps = PropsWithChildren<{
234
250
  onAfterSubmit?: (method: string | number | boolean | undefined) => void;
235
- nodes?: UiNode[];
236
251
  }>;
237
252
 
238
253
  // @public (undocumented)