@gntik-ai/blocks 0.9.0 → 0.11.0

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 (162) hide show
  1. package/dist/index.d.ts +426 -55
  2. package/dist/index.js +2275 -639
  3. package/dist/index.js.map +1 -1
  4. package/package.json +6 -6
  5. package/src/auth/ForgotPasswordForm/ForgotPasswordForm.labels.test.tsx +179 -0
  6. package/src/auth/ForgotPasswordForm/ForgotPasswordForm.tsx +59 -24
  7. package/src/auth/ForgotPasswordForm/block.meta.ts +22 -1
  8. package/src/auth/ForgotPasswordForm/examples/Labels.tsx +29 -0
  9. package/src/auth/MfaChallenge/MfaChallenge.labels.test.tsx +139 -0
  10. package/src/auth/MfaChallenge/MfaChallenge.tsx +69 -23
  11. package/src/auth/MfaChallenge/block.meta.ts +29 -1
  12. package/src/auth/MfaChallenge/examples/Labels.tsx +28 -0
  13. package/src/auth/ResetPasswordForm/ResetPasswordForm.labels.test.tsx +104 -0
  14. package/src/auth/ResetPasswordForm/ResetPasswordForm.tsx +42 -15
  15. package/src/auth/ResetPasswordForm/block.meta.ts +17 -1
  16. package/src/auth/ResetPasswordForm/examples/Labels.tsx +28 -0
  17. package/src/auth/SignInForm/SignInForm.labels.test.tsx +137 -0
  18. package/src/auth/SignInForm/SignInForm.tsx +43 -16
  19. package/src/auth/SignInForm/block.meta.ts +22 -1
  20. package/src/auth/SignInForm/examples/Labels.tsx +29 -0
  21. package/src/auth/SignUpForm/SignUpForm.labels.test.tsx +217 -0
  22. package/src/auth/SignUpForm/SignUpForm.tsx +65 -26
  23. package/src/auth/SignUpForm/block.meta.ts +27 -1
  24. package/src/auth/SignUpForm/examples/Labels.tsx +29 -0
  25. package/src/auth/SsoButtons/SsoButtons.labels.test.tsx +30 -0
  26. package/src/auth/SsoButtons/SsoButtons.tsx +10 -2
  27. package/src/auth/SsoButtons/block.meta.ts +8 -1
  28. package/src/auth/SsoButtons/examples/Labels.tsx +24 -0
  29. package/src/auth/shared.i18n.test.tsx +71 -0
  30. package/src/auth/shared.tsx +48 -11
  31. package/src/billing/CostBreakdown/CostBreakdown.test.tsx +10 -0
  32. package/src/billing/CostBreakdown/CostBreakdown.tsx +50 -43
  33. package/src/billing/SpendVsBudget/SpendVsBudget.test.tsx +10 -0
  34. package/src/billing/SpendVsBudget/SpendVsBudget.tsx +35 -31
  35. package/src/builders/FlowBuilder/FlowBuilder.test.tsx +237 -2
  36. package/src/builders/FlowBuilder/FlowBuilder.tsx +101 -29
  37. package/src/builders/FlowBuilder/block.meta.ts +1 -1
  38. package/src/builders/FlowBuilder/connections.ts +30 -12
  39. package/src/builders/FlowBuilder/examples/ControlledGraph.tsx +8 -0
  40. package/src/builders/FlowBuilder/graph-state.ts +78 -0
  41. package/src/builders/LogViewer/LogViewer.labels.test.tsx +90 -0
  42. package/src/builders/LogViewer/LogViewer.levels.test.tsx +49 -0
  43. package/src/builders/LogViewer/LogViewer.tsx +72 -18
  44. package/src/builders/LogViewer/LogViewer.wrap.test.tsx +181 -0
  45. package/src/builders/LogViewer/block.meta.ts +19 -1
  46. package/src/builders/LogViewer/examples/Spanish.tsx +30 -0
  47. package/src/builders/LogViewer/examples/Wrap.tsx +62 -0
  48. package/src/builders/LogViewer/use-wrapped-log-rows.ts +42 -0
  49. package/src/data-display/ChartCard/ChartCard.locale.test.tsx +15 -0
  50. package/src/data-display/ChartCard/ChartCard.test.tsx +9 -0
  51. package/src/data-display/ChartCard/ChartCard.tsx +81 -67
  52. package/src/data-display/ChartCard/block.meta.ts +1 -1
  53. package/src/data-display/DescriptionListCard/DescriptionListCard.labels.test.tsx +73 -0
  54. package/src/data-display/DescriptionListCard/DescriptionListCard.options.test.tsx +64 -0
  55. package/src/data-display/DescriptionListCard/DescriptionListCard.tsx +74 -23
  56. package/src/data-display/DescriptionListCard/block.meta.ts +11 -1
  57. package/src/data-display/DescriptionListCard/examples/Spanish.tsx +29 -0
  58. package/src/feedback/EmptyStates/EmptyStates.labels.test.tsx +185 -0
  59. package/src/feedback/EmptyStates/EmptyStates.tsx +101 -30
  60. package/src/feedback/EmptyStates/NoAccessEmpty.options.test.tsx +38 -0
  61. package/src/feedback/EmptyStates/block.meta.ts +73 -1
  62. package/src/feedback/EmptyStates/examples/Spanish.tsx +48 -0
  63. package/src/feedback/ErrorPanel/ErrorPanel.labels.test.tsx +99 -0
  64. package/src/feedback/ErrorPanel/ErrorPanel.tsx +38 -9
  65. package/src/feedback/ErrorPanel/block.meta.ts +19 -1
  66. package/src/feedback/ErrorPanel/examples/Spanish.tsx +30 -0
  67. package/src/feedback/InlineCallout/InlineCallout.labels.test.tsx +62 -0
  68. package/src/feedback/InlineCallout/InlineCallout.tsx +22 -9
  69. package/src/feedback/InlineCallout/block.meta.ts +9 -1
  70. package/src/feedback/InlineCallout/examples/Spanish.tsx +19 -0
  71. package/src/feedback/Skeletons/Skeletons.labels.test.tsx +24 -0
  72. package/src/forms/CreateApiKeyDialog/CreateApiKeyDialog.labels.test.tsx +115 -0
  73. package/src/forms/CreateApiKeyDialog/CreateApiKeyDialog.tsx +63 -21
  74. package/src/forms/CreateApiKeyDialog/block.meta.ts +22 -1
  75. package/src/forms/CreateApiKeyDialog/examples/Labels.tsx +29 -0
  76. package/src/forms/CredentialDisclosureDialog/CredentialDisclosureDialog.labels.test.tsx +165 -0
  77. package/src/forms/CredentialDisclosureDialog/CredentialDisclosureDialog.tsx +31 -8
  78. package/src/forms/CredentialDisclosureDialog/SecretCopy.tsx +16 -8
  79. package/src/forms/CredentialDisclosureDialog/block.meta.ts +19 -1
  80. package/src/forms/CredentialDisclosureDialog/examples/Labels.tsx +38 -0
  81. package/src/forms/DangerZone/ConfirmDestructiveDialog.tsx +17 -3
  82. package/src/forms/DangerZone/DangerZone.labels.test.tsx +87 -0
  83. package/src/forms/DangerZone/DangerZone.tsx +20 -5
  84. package/src/forms/DangerZone/block.meta.ts +10 -1
  85. package/src/forms/DangerZone/examples/Labels.tsx +29 -0
  86. package/src/forms/DateRangeFilter/DateRangeFilter.labels.test.tsx +52 -0
  87. package/src/forms/DateRangeFilter/DateRangeFilter.tsx +11 -3
  88. package/src/forms/DateRangeFilter/block.meta.ts +8 -1
  89. package/src/forms/DateRangeFilter/examples/Labels.tsx +28 -0
  90. package/src/forms/DialogWizard/DialogWizard.labels.test.tsx +37 -0
  91. package/src/forms/DialogWizard/DialogWizard.tsx +13 -2
  92. package/src/forms/DialogWizard/block.meta.ts +7 -1
  93. package/src/forms/DialogWizard/examples/Labels.tsx +39 -0
  94. package/src/forms/FileUploadPanel/FileUploadPanel.labels.test.tsx +126 -0
  95. package/src/forms/FileUploadPanel/FileUploadPanel.test.tsx +22 -1
  96. package/src/forms/FileUploadPanel/FileUploadPanel.tsx +85 -22
  97. package/src/forms/FileUploadPanel/block.meta.ts +22 -1
  98. package/src/forms/FileUploadPanel/examples/Labels.tsx +29 -0
  99. package/src/forms/FileUploadPanel/fixtures.ts +0 -12
  100. package/src/forms/FileUploadPanel/format-bytes.test.ts +8 -0
  101. package/src/forms/FormSection/FormSection.labels.test.tsx +37 -0
  102. package/src/forms/FormSection/FormSection.tsx +14 -3
  103. package/src/forms/FormSection/block.meta.ts +7 -1
  104. package/src/forms/FormSection/examples/Labels.tsx +27 -0
  105. package/src/forms/InviteMembersDialog/InviteMembersDialog.labels.test.tsx +87 -0
  106. package/src/forms/InviteMembersDialog/InviteMembersDialog.tsx +51 -16
  107. package/src/forms/InviteMembersDialog/block.meta.ts +20 -1
  108. package/src/forms/InviteMembersDialog/examples/Labels.tsx +28 -0
  109. package/src/forms/SettingsRow/SettingsRow.labels.test.tsx +33 -0
  110. package/src/forms/SettingsRow/SettingsRow.tsx +14 -3
  111. package/src/forms/SettingsRow/block.meta.ts +7 -1
  112. package/src/forms/SettingsRow/examples/Labels.tsx +27 -0
  113. package/src/forms/ValidationSummary/ValidationSummary.labels.test.tsx +47 -0
  114. package/src/forms/ValidationSummary/ValidationSummary.tsx +9 -3
  115. package/src/forms/ValidationSummary/block.meta.ts +6 -1
  116. package/src/forms/ValidationSummary/examples/Labels.tsx +24 -0
  117. package/src/forms/index.ts +5 -1
  118. package/src/forms/translated-content.tsx +12 -0
  119. package/src/page-chrome/PageHeader/PageHeader.labels.test.tsx +56 -0
  120. package/src/page-chrome/PageHeader/PageHeader.options.test.tsx +34 -0
  121. package/src/page-chrome/PageHeader/PageHeader.tsx +26 -5
  122. package/src/page-chrome/PageHeader/block.meta.ts +8 -1
  123. package/src/page-chrome/PageHeader/examples/Labels.tsx +16 -0
  124. package/src/page-chrome/PageHeader/examples/Spanish.tsx +11 -0
  125. package/src/scheduling/AgendaList/AgendaList.test.tsx +25 -0
  126. package/src/scheduling/AgendaList/AgendaList.tsx +7 -2
  127. package/src/scheduling/AgendaList/AgendaListLocale.test.tsx +11 -0
  128. package/src/scheduling/AgendaList/block.meta.ts +1 -1
  129. package/src/scheduling/AgendaList/examples/Locale.tsx +29 -0
  130. package/src/scheduling/MonthCalendar/MonthCalendar.test.tsx +111 -1
  131. package/src/scheduling/MonthCalendar/MonthCalendar.tsx +19 -9
  132. package/src/scheduling/MonthCalendar/block.meta.ts +1 -1
  133. package/src/scheduling/MonthCalendar/examples/Locale.tsx +19 -0
  134. package/src/scheduling/WeekCalendar/WeekCalendar.test.tsx +73 -2
  135. package/src/scheduling/WeekCalendar/WeekCalendar.tsx +26 -12
  136. package/src/scheduling/WeekCalendar/block.meta.ts +1 -1
  137. package/src/scheduling/WeekCalendar/examples/Locale.tsx +19 -0
  138. package/src/scheduling/shared/dates.test.ts +75 -0
  139. package/src/scheduling/shared/dates.ts +46 -22
  140. package/src/scheduling/shared/useSchedulingClock.ts +13 -0
  141. package/src/shell/GlobalSearch/GlobalSearch.test.tsx +12 -0
  142. package/src/shell/GlobalSearch/fixtures.ts +2 -2
  143. package/src/tables/DataTable/DataTable.cross-page-selection.test.tsx +322 -0
  144. package/src/tables/DataTable/DataTable.labels.test.tsx +74 -0
  145. package/src/tables/DataTable/DataTable.server-pagination.test.tsx +1 -1
  146. package/src/tables/DataTable/DataTable.single-select.test.tsx +47 -7
  147. package/src/tables/DataTable/DataTable.test.tsx +55 -0
  148. package/src/tables/DataTable/DataTable.tsx +134 -67
  149. package/src/tables/DataTable/block.meta.ts +21 -3
  150. package/src/tables/DataTable/data-table-props.ts +14 -5
  151. package/src/tables/DataTable/data-table-row.tsx +7 -3
  152. package/src/tables/DataTable/data-table-utils.ts +2 -0
  153. package/src/tables/DataTable/examples/client-selection.tsx +33 -0
  154. package/src/tables/DataTable/examples/paginated-single-selection.tsx +46 -0
  155. package/src/tables/DataTable/examples/server-pagination.tsx +55 -15
  156. package/src/tables/DataTable/labels.ts +4 -0
  157. package/src/tables/DataTable/selection-strip.tsx +31 -0
  158. package/src/tables/DataTable/single-selection.tsx +0 -7
  159. package/src/tables/DataTable/use-multiple-selection.ts +86 -0
  160. package/src/tables/PaginationFooter/PaginationFooter.i18n.test.tsx +26 -0
  161. package/src/test/OptInDefaults.test.tsx +27 -0
  162. package/src/test/fixtures/opt-in-defaults.json +10 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gntik-ai/blocks",
3
- "version": "0.9.0",
3
+ "version": "0.11.0",
4
4
  "description": "gntik-ui blocks: page chrome, data display, tables, forms, feedback, billing, team and builder sections composed from @gntik-ai/ui.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -35,12 +35,12 @@
35
35
  "react-dom": "^19.0.0"
36
36
  },
37
37
  "dependencies": {
38
- "@gntik-ai/charts": "0.5.0",
39
- "@gntik-ai/editor": "0.5.0",
40
- "@gntik-ai/flow": "0.5.0",
38
+ "@gntik-ai/charts": "0.11.0",
39
+ "@gntik-ai/editor": "0.11.0",
40
+ "@gntik-ai/flow": "0.11.0",
41
41
  "@gntik-ai/icons": "0.5.0",
42
- "@gntik-ai/tokens": "0.2.1",
43
- "@gntik-ai/ui": "0.9.0",
42
+ "@gntik-ai/tokens": "0.3.0",
43
+ "@gntik-ai/ui": "0.11.0",
44
44
  "lucide-react": "^1.48.0"
45
45
  },
46
46
  "devDependencies": {
@@ -0,0 +1,179 @@
1
+ import { fireEvent, render, screen } from '@testing-library/react';
2
+ import userEvent from '@testing-library/user-event';
3
+ import { I18nProvider, en, es } from '@gntik-ai/ui';
4
+ import { ForgotPasswordForm, type ForgotPasswordFormLabels } from './ForgotPasswordForm';
5
+ import { expectNoAxeViolations } from '../../test/a11y';
6
+ it('preserves English request labels without a provider', () => {
7
+ render(<ForgotPasswordForm />);
8
+ expect(screen.getByText('Account recovery')).toBeVisible();
9
+ expect(screen.getByText('Forgot your password?')).toBeVisible();
10
+ expect(screen.getByText("Enter the email you sign in with and we'll send you a reset link.")).toBeVisible();
11
+ expect(screen.getByText('Email')).toBeVisible();
12
+ expect(screen.getByText('Back to sign in')).toBeVisible();
13
+ expect(screen.getByRole('form', { name: 'Reset password request' })).toBeVisible();
14
+ expect(screen.getByPlaceholderText('name@company.com')).toBeVisible();
15
+ expect(screen.getByRole('button', { name: 'Send reset link' })).toBeVisible();
16
+ });
17
+ it('translates every request and sent label and parameterised sent text', async () => {
18
+ const { rerender } = render(
19
+ <I18nProvider locale="es">
20
+ <ForgotPasswordForm />
21
+ </I18nProvider>,
22
+ );
23
+ expect(screen.getByText(es['forgotPassword.eyebrow'])).toBeVisible();
24
+ expect(screen.getByText(es['forgotPassword.title'])).toBeVisible();
25
+ expect(screen.getByText(es['forgotPassword.description'])).toBeVisible();
26
+ expect(screen.getByText(es['forgotPassword.identifierLabel'])).toBeVisible();
27
+ expect(screen.getByText(es['forgotPassword.backToSignIn'])).toBeVisible();
28
+ expect(screen.getByPlaceholderText(es['forgotPassword.identifierPlaceholder'])).toBeVisible();
29
+ fireEvent.submit(screen.getByRole('form', { name: es['forgotPassword.formLabel'] }));
30
+ expect(screen.getByText('Introduce una dirección de correo válida.')).toBeVisible();
31
+ fireEvent.change(screen.getByLabelText(es['forgotPassword.identifierLabel']), { target: { value: 'invalid' } });
32
+ fireEvent.submit(screen.getByRole('form'));
33
+ expect(screen.getByText('Introduce una dirección de correo válida.')).toBeVisible();
34
+ await expectNoAxeViolations(screen.getByRole('form'));
35
+ fireEvent.change(screen.getByLabelText(es['forgotPassword.identifierLabel']), { target: { value: 'a@example.com' } });
36
+ await userEvent.click(screen.getByRole('button', { name: es['forgotPassword.submit'] }));
37
+ expect(await screen.findByRole('heading', { name: es['forgotPassword.sentTitle'] })).toBeVisible();
38
+ expect(
39
+ screen.getByText(
40
+ (_, element) =>
41
+ element?.tagName === 'P' &&
42
+ element.textContent ===
43
+ 'Si existe una cuenta para a@example.com, recibirás un enlace para restablecer tu contraseña. Caduca en 1 hora.',
44
+ ),
45
+ ).toBeVisible();
46
+ expect(screen.getByRole('status')).toHaveTextContent(es['forgotPassword.sentStatus']);
47
+ for (const key of ['resend', 'changeEmail'] as const)
48
+ expect(screen.getByRole('button', { name: es[`forgotPassword.${key}`] })).toBeVisible();
49
+ rerender(
50
+ <I18nProvider locale="es">
51
+ <ForgotPasswordForm key="sent" defaultSent onSubmit={() => Promise.reject(null)} />
52
+ </I18nProvider>,
53
+ );
54
+ expect(screen.getByText(es['forgotPassword.addressFallback'])).toBeVisible();
55
+ await userEvent.click(screen.getByRole('button', { name: es['forgotPassword.resend'] }));
56
+ expect(await screen.findByText(es['forgotPassword.fallbackError'])).toBeVisible();
57
+ });
58
+ it.each(['en', 'es'])('honours labels and explicit props under %s', async (locale) => {
59
+ const labels: ForgotPasswordFormLabels = {
60
+ formLabel: 'Custom formLabel',
61
+ eyebrow: 'Custom eyebrow',
62
+ title: 'Custom title',
63
+ description: 'Custom description',
64
+ sentTitle: 'Custom sentTitle',
65
+ sentDescription: (email) => `Custom sent ${email}`,
66
+ addressFallback: 'Custom addressFallback',
67
+ sentStatus: 'Custom sentStatus',
68
+ fallbackError: 'Custom fallbackError',
69
+ backToSignIn: 'Custom backToSignIn',
70
+ resend: 'Custom resend',
71
+ changeEmail: 'Custom changeEmail',
72
+ identifierLabel: 'Custom identifierLabel',
73
+ identifierPlaceholder: 'Custom identifierPlaceholder',
74
+ submit: 'Custom submit',
75
+ identifierRequired: 'Custom required',
76
+ identifierInvalid: 'Custom invalid',
77
+ identifierTooShort: 'Custom short',
78
+ };
79
+ const { rerender } = render(
80
+ <I18nProvider locale={locale}>
81
+ <ForgotPasswordForm labels={labels} />
82
+ </I18nProvider>,
83
+ );
84
+ expect(screen.getByText(labels.eyebrow)).toBeVisible();
85
+ expect(screen.getByText(labels.title)).toBeVisible();
86
+ expect(screen.getByText(labels.description)).toBeVisible();
87
+ expect(screen.getByText(labels.identifierLabel)).toBeVisible();
88
+ expect(screen.getByText(labels.backToSignIn)).toBeVisible();
89
+ expect(screen.getByPlaceholderText(labels.identifierPlaceholder)).toBeVisible();
90
+ fireEvent.submit(screen.getByRole('form', { name: labels.formLabel }));
91
+ expect(screen.getByText(labels.identifierRequired)).toBeVisible();
92
+ rerender(
93
+ <I18nProvider locale={locale}>
94
+ <ForgotPasswordForm
95
+ labels={labels}
96
+ aria-label="Explicit form"
97
+ eyebrow="Explicit eyebrow"
98
+ title="Explicit title"
99
+ description="Explicit description"
100
+ identifier={{ label: 'Explicit identifier', placeholder: 'Explicit placeholder' }}
101
+ messages={{ identifierRequired: 'Explicit required' }}
102
+ />
103
+ </I18nProvider>,
104
+ );
105
+ for (const text of ['Explicit eyebrow', 'Explicit title', 'Explicit description', 'Explicit identifier'])
106
+ expect(screen.getByText(text)).toBeVisible();
107
+ expect(screen.getByPlaceholderText('Explicit placeholder')).toBeVisible();
108
+ fireEvent.submit(screen.getByRole('form', { name: 'Explicit form' }));
109
+ expect(screen.getByText('Explicit required')).toBeVisible();
110
+ rerender(
111
+ <I18nProvider locale={locale}>
112
+ <ForgotPasswordForm key="sent" labels={labels} defaultSent onSubmit={() => Promise.reject(null)} />
113
+ </I18nProvider>,
114
+ );
115
+ expect(screen.getByRole('heading', { name: labels.sentTitle })).toBeVisible();
116
+ expect(screen.getByText('Custom sent Custom addressFallback')).toBeVisible();
117
+ expect(screen.getByRole('status')).toHaveTextContent(labels.sentStatus);
118
+ expect(screen.getByRole('button', { name: labels.changeEmail })).toBeVisible();
119
+ await userEvent.click(screen.getByRole('button', { name: labels.resend }));
120
+ expect(await screen.findByText(labels.fallbackError)).toBeVisible();
121
+ rerender(
122
+ <I18nProvider locale={locale}>
123
+ <ForgotPasswordForm
124
+ key="sent"
125
+ labels={labels}
126
+ defaultSent
127
+ sentTitle="Explicit sent"
128
+ sentDescription="Explicit sent help"
129
+ sentStatus="Explicit status"
130
+ />
131
+ </I18nProvider>,
132
+ );
133
+ expect(screen.getByRole('heading', { name: 'Explicit sent' })).toBeVisible();
134
+ expect(screen.getByText('Explicit sent help')).toBeVisible();
135
+ expect(screen.getByRole('status')).toHaveTextContent('Explicit status');
136
+ });
137
+ it('freezes the original English catalog copy', () => {
138
+ expect(en['forgotPassword.formLabel']).toBe('Reset password request');
139
+ expect(en['forgotPassword.eyebrow']).toBe('Account recovery');
140
+ expect(en['forgotPassword.title']).toBe('Forgot your password?');
141
+ expect(en['forgotPassword.description']).toBe("Enter the email you sign in with and we'll send you a reset link.");
142
+ expect(en['forgotPassword.sentTitle']).toBe('Check your email');
143
+ expect(en['forgotPassword.sentDescription']).toBe(
144
+ 'If an account exists for {email}, you will receive a link to reset your password. It expires in 1 hour.',
145
+ );
146
+ expect(en['forgotPassword.addressFallback']).toBe('that address');
147
+ expect(en['forgotPassword.sentStatus']).toBe('Reset link sent.');
148
+ expect(en['forgotPassword.fallbackError']).toBe('The reset link could not be sent.');
149
+ expect(en['forgotPassword.backToSignIn']).toBe('Back to sign in');
150
+ expect(en['forgotPassword.resend']).toBe('Resend link');
151
+ expect(en['forgotPassword.changeEmail']).toBe('Use a different email');
152
+ expect(en['forgotPassword.identifierLabel']).toBe('Email');
153
+ expect(en['forgotPassword.identifierPlaceholder']).toBe('name@company.com');
154
+ expect(en['forgotPassword.submit']).toBe('Send reset link');
155
+ });
156
+
157
+ it.each(['en', 'es'])('uses custom invalid and short identifier messages under %s', (locale) => {
158
+ const labels = {
159
+ submit: 'Custom send',
160
+ identifierInvalid: 'Custom invalid identifier',
161
+ identifierTooShort: 'Custom short identifier',
162
+ };
163
+ const { rerender } = render(
164
+ <I18nProvider locale={locale}>
165
+ <ForgotPasswordForm labels={labels} />
166
+ </I18nProvider>,
167
+ );
168
+ expect(screen.getByRole('button', { name: 'Custom send' })).toBeVisible();
169
+ fireEvent.change(screen.getByRole('textbox'), { target: { value: 'invalid' } });
170
+ fireEvent.submit(screen.getByRole('form'));
171
+ expect(screen.getByText('Custom invalid identifier')).toBeVisible();
172
+ rerender(
173
+ <I18nProvider locale={locale}>
174
+ <ForgotPasswordForm labels={labels} identifier={{ type: 'text', minLength: 10 }} />
175
+ </I18nProvider>,
176
+ );
177
+ fireEvent.submit(screen.getByRole('form'));
178
+ expect(screen.getByText('Custom short identifier')).toBeVisible();
179
+ });
@@ -1,4 +1,5 @@
1
- import { Alert, Button, Field, FieldDescription, FieldError, FieldLabel, Input, Link, cn } from '@gntik-ai/ui';
1
+ import { useI18n, Alert, Button, Field, FieldDescription, FieldError, FieldLabel, Input, Link, cn } from '@gntik-ai/ui';
2
+ import { translatedContent } from '../../forms/translated-content';
2
3
  import { ArrowLeft, Mail, MailCheck } from '@gntik-ai/icons';
3
4
  import { useImperativeHandle, useRef, useState, type MouseEvent, type ReactNode, type Ref } from 'react';
4
5
  import {
@@ -16,7 +17,26 @@ export interface ForgotPasswordFormRef {
16
17
  focus(field: 'identifier'): void;
17
18
  }
18
19
 
20
+ export interface ForgotPasswordFormLabels extends Required<Omit<AuthValidationMessages, 'passwordRequired'>> {
21
+ formLabel: string;
22
+ eyebrow: string;
23
+ title: string;
24
+ description: string;
25
+ sentTitle: string;
26
+ sentDescription: (email: string) => ReactNode;
27
+ addressFallback: string;
28
+ sentStatus: string;
29
+ fallbackError: string;
30
+ backToSignIn: string;
31
+ resend: string;
32
+ changeEmail: string;
33
+ identifierLabel: string;
34
+ identifierPlaceholder: string;
35
+ submit: string;
36
+ }
37
+
19
38
  export interface ForgotPasswordFormProps extends AuthFormAccessibilityProps {
39
+ labels?: Partial<ForgotPasswordFormLabels>;
20
40
  /** React 19 ref for focus after a server response; available in the request state. */
21
41
  ref?: Ref<ForgotPasswordFormRef>;
22
42
  identifier?: AuthIdentifierConfig;
@@ -46,13 +66,14 @@ export interface ForgotPasswordFormProps extends AuthFormAccessibilityProps {
46
66
 
47
67
  /** Request a reset link by email, then a "check your inbox" state with resend and a way back. */
48
68
  export function ForgotPasswordForm({
69
+ labels,
49
70
  identifier,
50
71
  messages,
51
72
  ref,
52
73
  fieldInvalid,
53
74
  feedbackId,
54
75
  'aria-describedby': describedBy,
55
- 'aria-label': ariaLabel = 'Reset password request',
76
+ 'aria-label': ariaLabelProp,
56
77
  'aria-labelledby': labelledBy,
57
78
  onSubmit,
58
79
  error: errorProp,
@@ -60,24 +81,33 @@ export function ForgotPasswordForm({
60
81
  defaultSent = false,
61
82
  signInHref = '#',
62
83
  onBackToSignIn,
63
- eyebrow = 'Account recovery',
64
- title = 'Forgot your password?',
65
- description = "Enter the email you sign in with and we'll send you a reset link.",
66
- sentTitle = 'Check your email',
84
+ eyebrow: eyebrowProp,
85
+ title: titleProp,
86
+ description: descriptionProp,
87
+ sentTitle: sentTitleProp,
67
88
  sentDescription,
68
- sentStatus = 'Reset link sent.',
89
+ sentStatus: sentStatusProp,
69
90
  resendActions,
70
91
  headingLevel,
71
92
  className,
72
93
  }: ForgotPasswordFormProps) {
94
+ const { t } = useI18n();
95
+ const eyebrow = eyebrowProp === undefined ? (labels?.eyebrow ?? t('forgotPassword.eyebrow')) : eyebrowProp;
96
+ const title = titleProp === undefined ? (labels?.title ?? t('forgotPassword.title')) : titleProp;
97
+ const description =
98
+ descriptionProp === undefined ? (labels?.description ?? t('forgotPassword.description')) : descriptionProp;
99
+ const sentTitle = sentTitleProp === undefined ? (labels?.sentTitle ?? t('forgotPassword.sentTitle')) : sentTitleProp;
100
+ const sentStatus =
101
+ sentStatusProp === undefined ? (labels?.sentStatus ?? t('forgotPassword.sentStatus')) : sentStatusProp;
102
+ const ariaLabel = ariaLabelProp ?? labels?.formLabel ?? t('forgotPassword.formLabel');
73
103
  const [email, setEmail] = useState(defaultEmail);
74
104
  const [submitted, setSubmitted] = useState(false);
75
105
  const [sent, setSent] = useState(defaultSent);
76
- const { loading, error, run } = useAsyncSubmit('The reset link could not be sent.');
106
+ const { loading, error, run } = useAsyncSubmit(labels?.fallbackError ?? t('forgotPassword.fallbackError'));
77
107
  const alert = errorProp ?? error;
78
108
  const identifierInput = useRef<HTMLInputElement>(null);
79
109
  useImperativeHandle(ref, () => ({ focus: () => identifierInput.current?.focus() }), []);
80
- const identifierError = authIdentifierError(email, identifier, messages);
110
+ const identifierError = authIdentifierError(email, identifier, messages, t, labels);
81
111
  const emailInvalid = submitted && identifierError !== null;
82
112
 
83
113
  const send = async () => {
@@ -100,7 +130,7 @@ export function ForgotPasswordForm({
100
130
  }
101
131
  >
102
132
  <ArrowLeft size={14} aria-hidden className="rtl:-scale-x-100" />
103
- Back to sign in
133
+ {labels?.backToSignIn ?? t('forgotPassword.backToSignIn')}
104
134
  </Link>
105
135
  );
106
136
 
@@ -115,15 +145,18 @@ export function ForgotPasswordForm({
115
145
  title={sentTitle}
116
146
  headingLevel={headingLevel}
117
147
  description={
118
- sentDescription === undefined ? (
119
- <>
120
- If an account exists for{' '}
121
- <span className="font-medium text-foreground">{email.trim() || 'that address'}</span>, you will receive
122
- a link to reset your password. It expires in 1 hour.
123
- </>
124
- ) : (
125
- sentDescription
126
- )
148
+ sentDescription === undefined
149
+ ? (labels?.sentDescription?.(
150
+ email.trim() || (labels?.addressFallback ?? t('forgotPassword.addressFallback')),
151
+ ) ??
152
+ translatedContent(t('forgotPassword.sentDescription'), {
153
+ email: (
154
+ <span className="font-medium text-foreground">
155
+ {email.trim() || (labels?.addressFallback ?? t('forgotPassword.addressFallback'))}
156
+ </span>
157
+ ),
158
+ }))
159
+ : sentDescription
127
160
  }
128
161
  />
129
162
  {sentStatus != null && (
@@ -137,7 +170,7 @@ export function ForgotPasswordForm({
137
170
  {resendActions === undefined ? (
138
171
  <>
139
172
  <Button variant="secondary" size="lg" loading={loading} className="w-full" onClick={() => void send()}>
140
- Resend link
173
+ {labels?.resend ?? t('forgotPassword.resend')}
141
174
  </Button>
142
175
  <Button
143
176
  variant="ghost"
@@ -148,7 +181,7 @@ export function ForgotPasswordForm({
148
181
  setSubmitted(false);
149
182
  }}
150
183
  >
151
- Use a different email
184
+ {labels?.changeEmail ?? t('forgotPassword.changeEmail')}
152
185
  </Button>
153
186
  </>
154
187
  ) : (
@@ -182,14 +215,16 @@ export function ForgotPasswordForm({
182
215
  >
183
216
  {alert && <Alert id={feedbackId} tone="destructive" description={alert} />}
184
217
  <Field invalid={emailInvalid || fieldInvalid?.identifier === true}>
185
- <FieldLabel>{identifier?.label ?? 'Email'}</FieldLabel>
218
+ <FieldLabel>{identifier?.label ?? labels?.identifierLabel ?? t('forgotPassword.identifierLabel')}</FieldLabel>
186
219
  <Input
187
220
  ref={identifierInput}
188
221
  aria-describedby={fieldInvalid?.identifier ? feedbackId : undefined}
189
222
  type={identifier?.type ?? 'email'}
190
223
  leadingIcon={Mail}
191
224
  autoComplete={identifier?.autoComplete ?? 'email'}
192
- placeholder={identifier?.placeholder ?? 'name@company.com'}
225
+ placeholder={
226
+ identifier?.placeholder ?? labels?.identifierPlaceholder ?? t('forgotPassword.identifierPlaceholder')
227
+ }
193
228
  minLength={identifier?.minLength}
194
229
  maxLength={identifier?.maxLength}
195
230
  value={email}
@@ -202,7 +237,7 @@ export function ForgotPasswordForm({
202
237
  </FieldError>
203
238
  </Field>
204
239
  <Button type="submit" size="lg" loading={loading} className="mt-2 w-full">
205
- Send reset link
240
+ {labels?.submit ?? t('forgotPassword.submit')}
206
241
  </Button>
207
242
  </form>
208
243
  <p className="mt-7 text-center">{back}</p>
@@ -1,10 +1,31 @@
1
1
  import type { BlockMeta } from '../../meta';
2
+ import type { ForgotPasswordFormLabels } from './ForgotPasswordForm';
2
3
 
3
4
  export const meta: BlockMeta = {
4
5
  name: 'Forgot password form',
5
6
  family: 'auth',
6
7
  status: 'stable',
7
8
  description:
8
- 'Email (default) or username-or-email password recovery; onSubmit receives the trimmed identifier. Supports identifier (type, autoComplete, label, help/helpId, placeholder, minLength/maxLength), messages (identifierRequired/identifierInvalid/identifierTooShort/passwordRequired), and React 19 ref.focus. The kit owns inline validation and focuses the first invalid field; consumers supply messages, not a second inline validator. Server errors use error + fieldInvalid + feedbackId; aria-describedby describes the form, while flagged inputs also retain their help and error ids. headingLevel (h1/h2/h3/null) suppresses the heading without losing the form name; aria-label/aria-labelledby override the default name. ref.focus accepts identifier. title/description and sentTitle/sentDescription configure request and sent copy; sentTitle, sentDescription, sentStatus and resendActions accept null to hide inbox copy, announcements and resend/change-identifier actions. Preview: forgot-password-form--username-or-email.',
9
+ 'Email (default) or username-or-email password recovery; onSubmit receives the trimmed identifier. Supports identifier (type, autoComplete, label, help/helpId, placeholder, minLength/maxLength), messages (identifierRequired/identifierInvalid/identifierTooShort/passwordRequired), and React 19 ref.focus. The kit owns inline validation and focuses the first invalid field; consumers supply messages, not a second inline validator. Server errors use error + fieldInvalid + feedbackId; aria-describedby describes the form, while flagged inputs also retain their help and error ids. headingLevel (h1/h2/h3/null) suppresses the heading without losing the form name; aria-label/aria-labelledby override the default name. ref.focus accepts identifier. title/description and sentTitle/sentDescription configure request and sent copy; sentTitle, sentDescription, sentStatus and resendActions accept null to hide inbox copy, announcements and resend/change-identifier actions. Preview: forgot-password-form--username-or-email. Optional labels?: Partial<ForgotPasswordFormLabels> overrides built-in copy; explicit props and validation messages win, then labels, then I18nProvider (en/es). No provider preserves English; fixtures and caller content stay unchanged. Interactive preview: /preview.html?kind=block&id=forgot-password-form--labels.',
10
+ labels: [
11
+ { key: 'formLabel', type: 'string', state: 'Default content and accessible names' },
12
+ { key: 'eyebrow', type: 'string', state: 'Default content and accessible names' },
13
+ { key: 'title', type: 'string', state: 'Default content and accessible names' },
14
+ { key: 'description', type: 'string', state: 'Default content and accessible names' },
15
+ { key: 'sentTitle', type: 'string', state: 'Async feedback' },
16
+ { key: 'sentDescription', type: '(email: string) => ReactNode', state: 'Async feedback' },
17
+ { key: 'addressFallback', type: 'string', state: 'Async feedback' },
18
+ { key: 'sentStatus', type: 'string', state: 'Async feedback' },
19
+ { key: 'fallbackError', type: 'string', state: 'Validation feedback' },
20
+ { key: 'backToSignIn', type: 'string', state: 'Default content and accessible names' },
21
+ { key: 'resend', type: 'string', state: 'Default content and accessible names' },
22
+ { key: 'changeEmail', type: 'string', state: 'Default content and accessible names' },
23
+ { key: 'identifierLabel', type: 'string', state: 'Default content and accessible names' },
24
+ { key: 'identifierPlaceholder', type: 'string', state: 'Default content and accessible names' },
25
+ { key: 'submit', type: 'string', state: 'Default content and accessible names' },
26
+ { key: 'identifierRequired', type: 'string', state: 'Validation feedback' },
27
+ { key: 'identifierInvalid', type: 'string', state: 'Validation feedback' },
28
+ { key: 'identifierTooShort', type: 'string', state: 'Validation feedback' },
29
+ ] satisfies Array<{ key: keyof ForgotPasswordFormLabels; type: string; state: string }>,
9
30
  uses: ['Field', 'FieldLabel', 'FieldDescription', 'FieldError', 'Input', 'Button', 'Alert', 'Link'],
10
31
  };
@@ -0,0 +1,29 @@
1
+ import { Button, I18nProvider } from '@gntik-ai/ui';
2
+ import { useState } from 'react';
3
+ import { ForgotPasswordForm, type ForgotPasswordFormLabels } from '../ForgotPasswordForm';
4
+
5
+ export default function Labels() {
6
+ const [spanish, setSpanish] = useState(false);
7
+ const [custom, setCustom] = useState(true);
8
+ const labels: Partial<ForgotPasswordFormLabels> = {
9
+ title: 'Recover access',
10
+ submit: 'Email recovery link',
11
+ sentTitle: 'Recovery email requested',
12
+ sentDescription: (email) => `Check ${email} for your recovery link.`,
13
+ };
14
+ return (
15
+ <div className="grid gap-4">
16
+ <div className="flex flex-wrap gap-2">
17
+ <Button variant="secondary" aria-pressed={spanish} onClick={() => setSpanish(!spanish)}>
18
+ Spanish catalog
19
+ </Button>
20
+ <Button variant="secondary" aria-pressed={custom} onClick={() => setCustom(!custom)}>
21
+ Custom labels
22
+ </Button>
23
+ </div>
24
+ <I18nProvider locale={spanish ? 'es' : 'en'}>
25
+ <ForgotPasswordForm labels={custom ? labels : undefined} />
26
+ </I18nProvider>
27
+ </div>
28
+ );
29
+ }
@@ -0,0 +1,139 @@
1
+ import { fireEvent, render, screen } from '@testing-library/react';
2
+ import userEvent from '@testing-library/user-event';
3
+ import { I18nProvider, en, es } from '@gntik-ai/ui';
4
+ import { MfaChallenge, type MfaChallengeLabels } from './MfaChallenge';
5
+ import { expectNoAxeViolations } from '../../test/a11y';
6
+ it('preserves English defaults without a provider', () => {
7
+ render(<MfaChallenge onResend={() => {}} onCancel={() => {}} />);
8
+ for (const text of [
9
+ 'Two-step verification',
10
+ 'Enter your verification code',
11
+ 'Open your authenticator app and enter the 6-digit code.',
12
+ 'Verification code',
13
+ ])
14
+ expect(screen.getByText(text)).toBeVisible();
15
+ expect(screen.getByRole('form', { name: 'Verify your identity' })).toBeVisible();
16
+ for (const name of ['Verify', 'Use a backup code', 'Back to sign in', 'Resend code in 30s'])
17
+ expect(screen.getByRole('button', { name })).toBeVisible();
18
+ });
19
+ it('translates all modes, validation, countdowns and resend feedback', async () => {
20
+ const { rerender } = render(
21
+ <I18nProvider locale="es">
22
+ <MfaChallenge onResend={() => {}} onCancel={() => {}} initialCooldown={0} onVerify={() => Promise.reject(null)} />
23
+ </I18nProvider>,
24
+ );
25
+ for (const key of ['eyebrow', 'title', 'codeLabel'] as const)
26
+ expect(screen.getByText(es[`mfaChallenge.${key}`])).toBeVisible();
27
+ expect(screen.getByText('Abre tu aplicación de autenticación e introduce el código de 6 dígitos.')).toBeVisible();
28
+ fireEvent.submit(screen.getByRole('form', { name: es['mfaChallenge.formLabel'] }));
29
+ expect(screen.getByText('Introduce los 6 dígitos.')).toBeVisible();
30
+ await userEvent.click(screen.getByRole('button', { name: es['mfaChallenge.resend'] }));
31
+ expect(screen.getByRole('status')).toHaveTextContent(es['mfaChallenge.resent']);
32
+ expect(screen.getByRole('button', { name: 'Reenviar código en 30s' })).toBeVisible();
33
+ expect(screen.getByRole('button', { name: es['mfaChallenge.backToSignIn'] })).toBeVisible();
34
+ await userEvent.click(screen.getByRole('button', { name: es['mfaChallenge.backupTitle'] }));
35
+ expect(screen.getByRole('heading', { name: es['mfaChallenge.backupTitle'] })).toBeVisible();
36
+ expect(screen.getByText(es['mfaChallenge.backupDescription'])).toBeVisible();
37
+ expect(screen.getByText(es['mfaChallenge.backupHint'])).toBeVisible();
38
+ const input = screen.getByPlaceholderText(es['mfaChallenge.backupPlaceholder']);
39
+ expect(input).toHaveAccessibleName(es['mfaChallenge.backupLabel']);
40
+ await userEvent.click(screen.getByRole('button', { name: es['mfaChallenge.submit'] }));
41
+ expect(screen.getByText(es['mfaChallenge.backupRequired'])).toBeVisible();
42
+ fireEvent.change(input, { target: { value: 'abcd-efgh' } });
43
+ await userEvent.click(screen.getByRole('button', { name: es['mfaChallenge.submit'] }));
44
+ expect(await screen.findByText(es['mfaChallenge.fallbackError'])).toBeVisible();
45
+ await expectNoAxeViolations(screen.getByRole('form'));
46
+ await userEvent.click(screen.getByRole('button', { name: es['mfaChallenge.useCode'] }));
47
+ rerender(
48
+ <I18nProvider locale="es">
49
+ <MfaChallenge destination="a@example.com" />
50
+ </I18nProvider>,
51
+ );
52
+ expect(screen.getByText('Hemos enviado un código de 6 dígitos a a@example.com.')).toBeVisible();
53
+ });
54
+ it.each(['en', 'es'])('honours all label overrides and explicit heading props under %s', async (locale) => {
55
+ const labels: MfaChallengeLabels = {
56
+ eyebrow: 'Custom eyebrow',
57
+ title: 'Custom title',
58
+ backupTitle: 'Custom backupTitle',
59
+ backupDescription: 'Custom backupDescription',
60
+ formLabel: 'Custom formLabel',
61
+ codeLabel: 'Custom codeLabel',
62
+ backupLabel: 'Custom backupLabel',
63
+ backupPlaceholder: 'Custom backupPlaceholder',
64
+ backupHint: 'Custom backupHint',
65
+ backupRequired: 'Custom backupRequired',
66
+ submit: 'Custom submit',
67
+ useCode: 'Custom useCode',
68
+ resend: 'Custom resend',
69
+ resent: 'Custom resent',
70
+ backToSignIn: 'Custom backToSignIn',
71
+ fallbackError: 'Custom fallbackError',
72
+ destinationDescription: (length, destination) => `Custom destination ${length} ${destination}`,
73
+ description: (length) => `Custom description ${length}`,
74
+ codeRequired: (length) => `Custom digits ${length}`,
75
+ resendIn: (remaining) => `Custom wait ${remaining}`,
76
+ };
77
+ const { rerender } = render(
78
+ <I18nProvider locale={locale}>
79
+ <MfaChallenge
80
+ labels={labels}
81
+ onResend={() => {}}
82
+ initialCooldown={0}
83
+ onCancel={() => {}}
84
+ onVerify={() => Promise.reject(null)}
85
+ />
86
+ </I18nProvider>,
87
+ );
88
+ for (const text of [labels.eyebrow, labels.title, labels.codeLabel, 'Custom description 6'])
89
+ expect(screen.getByText(text)).toBeVisible();
90
+ expect(screen.getByRole('button', { name: labels.backToSignIn })).toBeVisible();
91
+ fireEvent.submit(screen.getByRole('form', { name: labels.formLabel }));
92
+ expect(screen.getByText('Custom digits 6')).toBeVisible();
93
+ await userEvent.click(screen.getByRole('button', { name: labels.resend }));
94
+ expect(screen.getByRole('button', { name: 'Custom wait 30' })).toBeVisible();
95
+ expect(screen.getByRole('status')).toHaveTextContent(labels.resent);
96
+ await userEvent.click(screen.getByRole('button', { name: labels.backupTitle }));
97
+ expect(screen.getByRole('heading', { name: labels.backupTitle })).toBeVisible();
98
+ for (const text of [labels.backupDescription, labels.backupHint]) expect(screen.getByText(text)).toBeVisible();
99
+ const input = screen.getByPlaceholderText(labels.backupPlaceholder);
100
+ expect(input).toHaveAccessibleName(labels.backupLabel);
101
+ await userEvent.click(screen.getByRole('button', { name: labels.submit }));
102
+ expect(screen.getByText(labels.backupRequired)).toBeVisible();
103
+ fireEvent.change(input, { target: { value: 'abcd-efgh' } });
104
+ await userEvent.click(screen.getByRole('button', { name: labels.submit }));
105
+ expect(await screen.findByText(labels.fallbackError)).toBeVisible();
106
+ await userEvent.click(screen.getByRole('button', { name: labels.useCode }));
107
+ rerender(
108
+ <I18nProvider locale={locale}>
109
+ <MfaChallenge labels={labels} eyebrow="Explicit eyebrow" title="Explicit title" destination="recipient" />
110
+ </I18nProvider>,
111
+ );
112
+ expect(screen.getByText('Explicit eyebrow')).toBeVisible();
113
+ expect(screen.getByRole('heading', { name: 'Explicit title' })).toBeVisible();
114
+ expect(screen.getByText('Custom destination 6 recipient')).toBeVisible();
115
+ });
116
+ it('freezes every original English message', () => {
117
+ expect(en['mfaChallenge.eyebrow']).toBe('Two-step verification');
118
+ expect(en['mfaChallenge.title']).toBe('Enter your verification code');
119
+ expect(en['mfaChallenge.backupTitle']).toBe('Use a backup code');
120
+ expect(en['mfaChallenge.backupDescription']).toBe(
121
+ 'Enter one of the backup codes you saved when you turned on two-step verification. Each code works once.',
122
+ );
123
+ expect(en['mfaChallenge.destinationDescription']).toBe('We sent a {length}-digit code to {destination}.');
124
+ expect(en['mfaChallenge.description']).toBe('Open your authenticator app and enter the {length}-digit code.');
125
+ expect(en['mfaChallenge.formLabel']).toBe('Verify your identity');
126
+ expect(en['mfaChallenge.codeLabel']).toBe('Verification code');
127
+ expect(en['mfaChallenge.codeRequired']).toBe('Enter all {length} digits.');
128
+ expect(en['mfaChallenge.backupLabel']).toBe('Backup code');
129
+ expect(en['mfaChallenge.backupPlaceholder']).toBe('xxxx-xxxx');
130
+ expect(en['mfaChallenge.backupHint']).toBe('Backup codes are 8 characters, with or without the dash.');
131
+ expect(en['mfaChallenge.backupRequired']).toBe('Enter a backup code.');
132
+ expect(en['mfaChallenge.submit']).toBe('Verify');
133
+ expect(en['mfaChallenge.useCode']).toBe('Use a verification code');
134
+ expect(en['mfaChallenge.resendIn']).toBe('Resend code in {remaining}s');
135
+ expect(en['mfaChallenge.resend']).toBe('Resend code');
136
+ expect(en['mfaChallenge.resent']).toBe('A new code was sent.');
137
+ expect(en['mfaChallenge.backToSignIn']).toBe('Back to sign in');
138
+ expect(en['mfaChallenge.fallbackError']).toBe('That code did not work. Try again.');
139
+ });