@terreno/ui 57.19.2 → 57.20.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.
- package/.ai/guidelines/core.md +1 -1
- package/CHANGELOG.md +393 -0
- package/dist/Accordion.d.ts.map +1 -1
- package/dist/Accordion.js +3 -3
- package/dist/Accordion.js.map +1 -1
- package/dist/Avatar.d.ts.map +1 -1
- package/dist/Avatar.js +3 -1
- package/dist/Avatar.js.map +1 -1
- package/dist/Box.d.ts.map +1 -1
- package/dist/Box.js +38 -2
- package/dist/Box.js.map +1 -1
- package/dist/Card.js +2 -2
- package/dist/Card.js.map +1 -1
- package/dist/Common.d.ts +120 -7
- package/dist/Common.d.ts.map +1 -1
- package/dist/Common.js.map +1 -1
- package/dist/ConsentFormScreen.d.ts +1 -1
- package/dist/ConsentFormScreen.d.ts.map +1 -1
- package/dist/ConsentFormScreen.js +13 -4
- package/dist/ConsentFormScreen.js.map +1 -1
- package/dist/DateTimeField.d.ts.map +1 -1
- package/dist/DateTimeField.js +5 -3
- package/dist/DateTimeField.js.map +1 -1
- package/dist/Field.d.ts.map +1 -1
- package/dist/Field.js +2 -0
- package/dist/Field.js.map +1 -1
- package/dist/FormContainer.d.ts +68 -0
- package/dist/FormContainer.d.ts.map +1 -0
- package/dist/FormContainer.js +79 -0
- package/dist/FormContainer.js.map +1 -0
- package/dist/GPTChat.d.ts.map +1 -1
- package/dist/GPTChat.js +2 -1
- package/dist/GPTChat.js.map +1 -1
- package/dist/Heading.d.ts +1 -1
- package/dist/Heading.d.ts.map +1 -1
- package/dist/Heading.js +5 -2
- package/dist/Heading.js.map +1 -1
- package/dist/Icon.d.ts +4 -0
- package/dist/Icon.d.ts.map +1 -1
- package/dist/Icon.js +43 -2
- package/dist/Icon.js.map +1 -1
- package/dist/LabeledCheckBox.d.ts +22 -0
- package/dist/LabeledCheckBox.d.ts.map +1 -0
- package/dist/LabeledCheckBox.js +30 -0
- package/dist/LabeledCheckBox.js.map +1 -0
- package/dist/ListDetailLayout.d.ts +36 -0
- package/dist/ListDetailLayout.d.ts.map +1 -0
- package/dist/ListDetailLayout.js +153 -0
- package/dist/ListDetailLayout.js.map +1 -0
- package/dist/MarkdownEditor.d.ts.map +1 -1
- package/dist/MarkdownEditor.js +2 -1
- package/dist/MarkdownEditor.js.map +1 -1
- package/dist/MediaQuery.d.ts +1 -1
- package/dist/MediaQuery.d.ts.map +1 -1
- package/dist/MediaQuery.js +1 -1
- package/dist/MediaQuery.js.map +1 -1
- package/dist/OtpField.d.ts +60 -0
- package/dist/OtpField.d.ts.map +1 -0
- package/dist/OtpField.js +154 -0
- package/dist/OtpField.js.map +1 -0
- package/dist/ProvisionalConsentSigner.d.ts +21 -0
- package/dist/ProvisionalConsentSigner.d.ts.map +1 -0
- package/dist/ProvisionalConsentSigner.js +199 -0
- package/dist/ProvisionalConsentSigner.js.map +1 -0
- package/dist/ResponsiveBreakpoint.d.ts +5 -0
- package/dist/ResponsiveBreakpoint.d.ts.map +1 -1
- package/dist/ResponsiveBreakpoint.js +7 -0
- package/dist/ResponsiveBreakpoint.js.map +1 -1
- package/dist/SocialLoginButton.d.ts +10 -0
- package/dist/SocialLoginButton.d.ts.map +1 -1
- package/dist/SocialLoginButton.js +26 -8
- package/dist/SocialLoginButton.js.map +1 -1
- package/dist/SplitPage.d.ts +11 -0
- package/dist/SplitPage.d.ts.map +1 -1
- package/dist/SplitPage.js +11 -5
- package/dist/SplitPage.js.map +1 -1
- package/dist/SplitPage.native.d.ts.map +1 -1
- package/dist/SplitPage.native.js +3 -1
- package/dist/SplitPage.native.js.map +1 -1
- package/dist/SyncStatusBanner.d.ts +7 -1
- package/dist/SyncStatusBanner.d.ts.map +1 -1
- package/dist/SyncStatusBanner.js +20 -4
- package/dist/SyncStatusBanner.js.map +1 -1
- package/dist/TextField.d.ts.map +1 -1
- package/dist/TextField.js +44 -10
- package/dist/TextField.js.map +1 -1
- package/dist/fieldElements/FieldError.d.ts.map +1 -1
- package/dist/fieldElements/FieldError.js +1 -1
- package/dist/fieldElements/FieldError.js.map +1 -1
- package/dist/index.d.ts +19 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +14 -1
- package/dist/index.js.map +1 -1
- package/dist/lazyBoundaries/heavyOptionalExports.d.ts +3 -0
- package/dist/lazyBoundaries/heavyOptionalExports.d.ts.map +1 -1
- package/dist/lazyBoundaries/heavyOptionalExports.js +2 -0
- package/dist/lazyBoundaries/heavyOptionalExports.js.map +1 -1
- package/dist/login/LastUsedBadge.d.ts +14 -0
- package/dist/login/LastUsedBadge.d.ts.map +1 -0
- package/dist/login/LastUsedBadge.js +23 -0
- package/dist/login/LastUsedBadge.js.map +1 -0
- package/dist/login/LoginAccountCard.d.ts +38 -0
- package/dist/login/LoginAccountCard.d.ts.map +1 -0
- package/dist/login/LoginAccountCard.js +72 -0
- package/dist/login/LoginAccountCard.js.map +1 -0
- package/dist/login/LoginAccountList.d.ts +33 -0
- package/dist/login/LoginAccountList.d.ts.map +1 -0
- package/dist/login/LoginAccountList.js +30 -0
- package/dist/login/LoginAccountList.js.map +1 -0
- package/dist/login/LoginScreen.d.ts +4 -4
- package/dist/login/LoginScreen.d.ts.map +1 -1
- package/dist/login/LoginScreen.js +294 -13
- package/dist/login/LoginScreen.js.map +1 -1
- package/dist/login/OutlinePill.d.ts +28 -0
- package/dist/login/OutlinePill.d.ts.map +1 -0
- package/dist/login/OutlinePill.js +48 -0
- package/dist/login/OutlinePill.js.map +1 -0
- package/dist/login/TwoFactorChallengeScreen.d.ts +26 -0
- package/dist/login/TwoFactorChallengeScreen.d.ts.map +1 -0
- package/dist/login/TwoFactorChallengeScreen.js +139 -0
- package/dist/login/TwoFactorChallengeScreen.js.map +1 -0
- package/dist/login/loginMethods.d.ts +27 -0
- package/dist/login/loginMethods.d.ts.map +1 -0
- package/dist/login/loginMethods.js +37 -0
- package/dist/login/loginMethods.js.map +1 -0
- package/dist/login/loginTypes.d.ts +202 -5
- package/dist/login/loginTypes.d.ts.map +1 -1
- package/dist/pdfHtmlTemplate.d.ts +17 -0
- package/dist/pdfHtmlTemplate.d.ts.map +1 -1
- package/dist/pdfHtmlTemplate.js +78 -0
- package/dist/pdfHtmlTemplate.js.map +1 -1
- package/dist/security/AccountSecurityScreen.d.ts +10 -0
- package/dist/security/AccountSecurityScreen.d.ts.map +1 -0
- package/dist/security/AccountSecurityScreen.js +50 -0
- package/dist/security/AccountSecurityScreen.js.map +1 -0
- package/dist/security/LinkedAccountsCard.d.ts +32 -0
- package/dist/security/LinkedAccountsCard.d.ts.map +1 -0
- package/dist/security/LinkedAccountsCard.js +145 -0
- package/dist/security/LinkedAccountsCard.js.map +1 -0
- package/dist/security/PasskeysCard.d.ts +39 -0
- package/dist/security/PasskeysCard.d.ts.map +1 -0
- package/dist/security/PasskeysCard.js +168 -0
- package/dist/security/PasskeysCard.js.map +1 -0
- package/dist/security/PasswordCard.d.ts +32 -0
- package/dist/security/PasswordCard.d.ts.map +1 -0
- package/dist/security/PasswordCard.js +198 -0
- package/dist/security/PasswordCard.js.map +1 -0
- package/dist/security/SessionsCard.d.ts +39 -0
- package/dist/security/SessionsCard.d.ts.map +1 -0
- package/dist/security/SessionsCard.js +168 -0
- package/dist/security/SessionsCard.js.map +1 -0
- package/dist/security/TwoFactorSettingsCard.d.ts +55 -0
- package/dist/security/TwoFactorSettingsCard.d.ts.map +1 -0
- package/dist/security/TwoFactorSettingsCard.js +458 -0
- package/dist/security/TwoFactorSettingsCard.js.map +1 -0
- package/dist/security/securityMethods.d.ts +40 -0
- package/dist/security/securityMethods.d.ts.map +1 -0
- package/dist/security/securityMethods.js +66 -0
- package/dist/security/securityMethods.js.map +1 -0
- package/dist/security/securityTypes.d.ts +467 -0
- package/dist/security/securityTypes.d.ts.map +1 -0
- package/dist/security/securityTypes.js +2 -0
- package/dist/security/securityTypes.js.map +1 -0
- package/dist/security/userAgent.d.ts +26 -0
- package/dist/security/userAgent.d.ts.map +1 -0
- package/dist/security/userAgent.js +80 -0
- package/dist/security/userAgent.js.map +1 -0
- package/dist/signUp/OAuthButtons.d.ts +28 -5
- package/dist/signUp/OAuthButtons.d.ts.map +1 -1
- package/dist/signUp/OAuthButtons.js +44 -5
- package/dist/signUp/OAuthButtons.js.map +1 -1
- package/dist/signUp/SignUpScreen.d.ts.map +1 -1
- package/dist/signUp/SignUpScreen.js +50 -5
- package/dist/signUp/SignUpScreen.js.map +1 -1
- package/dist/signUp/signUpTypes.d.ts +21 -1
- package/dist/signUp/signUpTypes.d.ts.map +1 -1
- package/dist/useConsentForms.d.ts +9 -0
- package/dist/useConsentForms.d.ts.map +1 -1
- package/dist/useConsentForms.js +18 -0
- package/dist/useConsentForms.js.map +1 -1
- package/dist/useProvisionalConsent.d.ts +124 -0
- package/dist/useProvisionalConsent.d.ts.map +1 -0
- package/dist/useProvisionalConsent.js +79 -0
- package/dist/useProvisionalConsent.js.map +1 -0
- package/package.json +3 -2
- package/src/Accordion.test.tsx +5 -0
- package/src/Accordion.tsx +3 -8
- package/src/AreaChart.test.tsx +15 -0
- package/src/Avatar.test.tsx +8 -0
- package/src/Avatar.tsx +2 -0
- package/src/BarChart.test.tsx +15 -0
- package/src/Box.test.tsx +61 -1
- package/src/Box.tsx +44 -2
- package/src/Card.tsx +2 -2
- package/src/Common.ts +134 -7
- package/src/ConsentFormScreen.test.tsx +84 -0
- package/src/ConsentFormScreen.tsx +28 -4
- package/src/DateTimeField.tsx +5 -3
- package/src/DonutChart.test.tsx +15 -0
- package/src/Field.tsx +2 -0
- package/src/FilePickerButton.test.tsx +35 -0
- package/src/FormContainer.test.tsx +242 -0
- package/src/FormContainer.tsx +177 -0
- package/src/GPTChat.test.tsx +16 -0
- package/src/GPTChat.tsx +8 -2
- package/src/Heading.test.tsx +14 -0
- package/src/Heading.tsx +6 -1
- package/src/Icon.test.tsx +52 -1
- package/src/Icon.tsx +92 -3
- package/src/IconButton.test.tsx +85 -0
- package/src/LabeledCheckBox.test.tsx +45 -0
- package/src/LabeledCheckBox.tsx +89 -0
- package/src/ListDetailLayout.tsx +247 -0
- package/src/MarkdownEditor.tsx +2 -1
- package/src/MediaQuery.ts +1 -0
- package/src/OtpField.test.tsx +280 -0
- package/src/OtpField.tsx +307 -0
- package/src/ProvisionalConsentSigner.test.tsx +625 -0
- package/src/ProvisionalConsentSigner.tsx +423 -0
- package/src/ResponsiveBreakpoint.test.tsx +7 -0
- package/src/ResponsiveBreakpoint.tsx +14 -0
- package/src/RootImportRegression.test.tsx +3 -0
- package/src/SocialLoginButton.test.tsx +14 -0
- package/src/SocialLoginButton.tsx +51 -7
- package/src/SplitPage.native.tsx +3 -1
- package/src/SplitPage.tsx +11 -5
- package/src/SyncStatusBanner.test.tsx +61 -4
- package/src/SyncStatusBanner.tsx +29 -3
- package/src/TextField.test.tsx +150 -0
- package/src/TextField.tsx +66 -8
- package/src/__snapshots__/AddressField.test.tsx.snap +12 -0
- package/src/__snapshots__/AiSuggestionBox.test.tsx.snap +15 -0
- package/src/__snapshots__/Avatar.test.tsx.snap +1 -0
- package/src/__snapshots__/CustomSelectField.test.tsx.snap +3 -0
- package/src/__snapshots__/EmailField.test.tsx.snap +6 -0
- package/src/__snapshots__/Field.test.tsx.snap +37 -0
- package/src/__snapshots__/HeightField.test.tsx.snap +2 -0
- package/src/__snapshots__/MobileAddressAutoComplete.test.tsx.snap +3 -0
- package/src/__snapshots__/NumberField.test.tsx.snap +3 -0
- package/src/__snapshots__/PhoneNumberField.test.tsx.snap +12 -0
- package/src/__snapshots__/Slider.test.tsx.snap +1 -0
- package/src/__snapshots__/SocialLoginButton.test.tsx.snap +43 -22
- package/src/__snapshots__/TapToEdit.test.tsx.snap +3 -0
- package/src/__snapshots__/TextArea.test.tsx.snap +17 -1
- package/src/__snapshots__/TextField.test.tsx.snap +19 -2
- package/src/__snapshots__/TypedSignatureField.test.tsx.snap +3 -0
- package/src/__snapshots__/UnifiedAddressAutoComplete.test.tsx.snap +18 -0
- package/src/__snapshots__/WebAddressAutocomplete.test.tsx.snap +12 -0
- package/src/bunSetup.ts +13 -1
- package/src/fieldElements/FieldError.tsx +1 -0
- package/src/fieldElements/__snapshots__/FieldError.test.tsx.snap +2 -0
- package/src/index.tsx +42 -1
- package/src/isolated/ListDetailLayout.isolated.tsx +634 -0
- package/src/lazyBoundaries/heavyOptionalExports.tsx +7 -0
- package/src/login/LastUsedBadge.tsx +40 -0
- package/src/login/LoginAccountCard.tsx +205 -0
- package/src/login/LoginAccountList.tsx +115 -0
- package/src/login/LoginScreen.test.tsx +837 -1
- package/src/login/LoginScreen.tsx +674 -91
- package/src/login/OutlinePill.tsx +110 -0
- package/src/login/TwoFactorChallengeScreen.test.tsx +376 -0
- package/src/login/TwoFactorChallengeScreen.tsx +307 -0
- package/src/login/__snapshots__/LoginScreen.test.tsx.snap +1454 -334
- package/src/login/loginMethods.test.ts +53 -0
- package/src/login/loginMethods.ts +60 -0
- package/src/login/loginTypes.ts +208 -5
- package/src/pdfHtmlTemplate.test.ts +243 -4
- package/src/pdfHtmlTemplate.ts +93 -0
- package/src/security/AccountSecurityScreen.test.tsx +262 -0
- package/src/security/AccountSecurityScreen.tsx +156 -0
- package/src/security/LinkedAccountsCard.test.tsx +371 -0
- package/src/security/LinkedAccountsCard.tsx +297 -0
- package/src/security/PasskeysCard.test.tsx +378 -0
- package/src/security/PasskeysCard.tsx +371 -0
- package/src/security/PasswordCard.test.tsx +445 -0
- package/src/security/PasswordCard.tsx +342 -0
- package/src/security/SessionsCard.test.tsx +349 -0
- package/src/security/SessionsCard.tsx +362 -0
- package/src/security/TwoFactorSettingsCard.test.tsx +700 -0
- package/src/security/TwoFactorSettingsCard.tsx +872 -0
- package/src/security/securityMethods.test.ts +101 -0
- package/src/security/securityMethods.ts +104 -0
- package/src/security/securityTypes.ts +480 -0
- package/src/security/userAgent.test.ts +119 -0
- package/src/security/userAgent.ts +102 -0
- package/src/signUp/OAuthButtons.test.tsx +27 -0
- package/src/signUp/OAuthButtons.tsx +153 -19
- package/src/signUp/SignUpScreen.test.tsx +170 -1
- package/src/signUp/SignUpScreen.tsx +87 -25
- package/src/signUp/__snapshots__/SignUpScreen.test.tsx.snap +22 -11
- package/src/signUp/signUpTypes.ts +23 -1
- package/src/useConsentForms.test.ts +37 -1
- package/src/useConsentForms.ts +25 -0
- package/src/useProvisionalConsent.test.ts +256 -0
- package/src/useProvisionalConsent.ts +218 -0
|
@@ -1,18 +1,75 @@
|
|
|
1
|
-
import {describe, expect, it, mock} from "bun:test";
|
|
2
|
-
import {fireEvent} from "@testing-library/react-native";
|
|
1
|
+
import {describe, expect, it, jest, mock} from "bun:test";
|
|
2
|
+
import {act, fireEvent} from "@testing-library/react-native";
|
|
3
3
|
|
|
4
4
|
import {SyncStatusBanner} from "./SyncStatusBanner";
|
|
5
5
|
import {renderWithTheme} from "./test-utils";
|
|
6
6
|
|
|
7
7
|
describe("SyncStatusBanner", () => {
|
|
8
|
-
it("renders the offline indicator when
|
|
8
|
+
it("renders the offline indicator immediately when the grace period is 0", () => {
|
|
9
9
|
const {getByTestId, queryByTestId} = renderWithTheme(
|
|
10
|
-
<SyncStatusBanner
|
|
10
|
+
<SyncStatusBanner
|
|
11
|
+
conflictCount={0}
|
|
12
|
+
isOnline={false}
|
|
13
|
+
isSyncing={false}
|
|
14
|
+
offlineGraceMs={0}
|
|
15
|
+
queuedCount={0}
|
|
16
|
+
/>
|
|
11
17
|
);
|
|
12
18
|
expect(getByTestId("sync-offline-indicator")).toBeTruthy();
|
|
13
19
|
expect(queryByTestId("sync-syncing-indicator")).toBeNull();
|
|
14
20
|
});
|
|
15
21
|
|
|
22
|
+
it("waits out the grace period before showing the offline indicator", () => {
|
|
23
|
+
jest.useFakeTimers();
|
|
24
|
+
try {
|
|
25
|
+
const {queryByTestId} = renderWithTheme(
|
|
26
|
+
<SyncStatusBanner conflictCount={0} isOnline={false} queuedCount={0} />
|
|
27
|
+
);
|
|
28
|
+
expect(queryByTestId("sync-offline-indicator")).toBeNull();
|
|
29
|
+
act(() => {
|
|
30
|
+
jest.advanceTimersByTime(2999);
|
|
31
|
+
});
|
|
32
|
+
expect(queryByTestId("sync-offline-indicator")).toBeNull();
|
|
33
|
+
act(() => {
|
|
34
|
+
jest.advanceTimersByTime(1);
|
|
35
|
+
});
|
|
36
|
+
expect(queryByTestId("sync-offline-indicator")).toBeTruthy();
|
|
37
|
+
} finally {
|
|
38
|
+
jest.useRealTimers();
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
it("does not flash offline for a drop shorter than the grace period", () => {
|
|
43
|
+
jest.useFakeTimers();
|
|
44
|
+
try {
|
|
45
|
+
const view = renderWithTheme(
|
|
46
|
+
<SyncStatusBanner conflictCount={0} isOnline={true} queuedCount={0} />
|
|
47
|
+
);
|
|
48
|
+
view.rerender(<SyncStatusBanner conflictCount={0} isOnline={false} queuedCount={0} />);
|
|
49
|
+
act(() => {
|
|
50
|
+
jest.advanceTimersByTime(1000);
|
|
51
|
+
});
|
|
52
|
+
view.rerender(<SyncStatusBanner conflictCount={0} isOnline={true} queuedCount={0} />);
|
|
53
|
+
act(() => {
|
|
54
|
+
jest.advanceTimersByTime(5000);
|
|
55
|
+
});
|
|
56
|
+
expect(view.queryByTestId("sync-offline-indicator")).toBeNull();
|
|
57
|
+
} finally {
|
|
58
|
+
jest.useRealTimers();
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
it("hides the offline indicator as soon as connectivity returns", () => {
|
|
63
|
+
const view = renderWithTheme(
|
|
64
|
+
<SyncStatusBanner conflictCount={0} isOnline={false} offlineGraceMs={0} queuedCount={0} />
|
|
65
|
+
);
|
|
66
|
+
expect(view.queryByTestId("sync-offline-indicator")).toBeTruthy();
|
|
67
|
+
view.rerender(
|
|
68
|
+
<SyncStatusBanner conflictCount={0} isOnline={true} offlineGraceMs={0} queuedCount={0} />
|
|
69
|
+
);
|
|
70
|
+
expect(view.queryByTestId("sync-offline-indicator")).toBeNull();
|
|
71
|
+
});
|
|
72
|
+
|
|
16
73
|
it("hides the offline indicator when online", () => {
|
|
17
74
|
const {getByTestId, queryByTestId} = renderWithTheme(
|
|
18
75
|
<SyncStatusBanner conflictCount={0} isOnline={true} isSyncing={false} queuedCount={0} />
|
package/src/SyncStatusBanner.tsx
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type React from "react";
|
|
2
|
-
import {useCallback} from "react";
|
|
2
|
+
import {useCallback, useEffect, useState} from "react";
|
|
3
3
|
|
|
4
4
|
import {Badge} from "./Badge";
|
|
5
5
|
import {Box} from "./Box";
|
|
@@ -7,9 +7,18 @@ import {Box} from "./Box";
|
|
|
7
7
|
/** Queued count above which the banner switches to a numeric drain-progress display. */
|
|
8
8
|
const PROGRESS_THRESHOLD = 20;
|
|
9
9
|
|
|
10
|
+
/** Default time connectivity must stay lost before the offline badge appears. */
|
|
11
|
+
const DEFAULT_OFFLINE_GRACE_MS = 3000;
|
|
12
|
+
|
|
10
13
|
export interface SyncStatusBannerProps {
|
|
11
14
|
/** Whether the client currently has connectivity. */
|
|
12
15
|
isOnline: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* How long (ms) `isOnline` must stay false before the offline badge shows. Absorbs the
|
|
18
|
+
* not-yet-connected window at startup and sub-second socket blips so the badge does not
|
|
19
|
+
* flash. Going back online hides it immediately. Defaults to 3000; pass 0 to show at once.
|
|
20
|
+
*/
|
|
21
|
+
offlineGraceMs?: number;
|
|
13
22
|
/** Number of mutations waiting in the durable outbox. */
|
|
14
23
|
queuedCount: number;
|
|
15
24
|
/**
|
|
@@ -45,7 +54,7 @@ export interface SyncStatusBannerProps {
|
|
|
45
54
|
|
|
46
55
|
/**
|
|
47
56
|
* Compact, presentational sync-state banner for local-first (e.g. @terreno/syncdb) screens:
|
|
48
|
-
* offline indicator, queued mutation count (with drain progress once the queue grows past
|
|
57
|
+
* offline indicator (shown only after a short grace period), queued mutation count (with drain progress once the queue grows past
|
|
49
58
|
* {@link PROGRESS_THRESHOLD}), a paused-for-auth indicator, a pressable failed count, and a
|
|
50
59
|
* pressable conflict badge. Initial bootstrap "Syncing…" is intentionally not shown here —
|
|
51
60
|
* apps should surface that as a one-shot toast on launch (see SyncHealthToast). It is
|
|
@@ -54,6 +63,7 @@ export interface SyncStatusBannerProps {
|
|
|
54
63
|
*/
|
|
55
64
|
export const SyncStatusBanner: React.FC<SyncStatusBannerProps> = ({
|
|
56
65
|
isOnline,
|
|
66
|
+
offlineGraceMs = DEFAULT_OFFLINE_GRACE_MS,
|
|
57
67
|
queuedCount,
|
|
58
68
|
isSyncing: _isSyncing,
|
|
59
69
|
conflictCount,
|
|
@@ -67,6 +77,22 @@ export const SyncStatusBanner: React.FC<SyncStatusBannerProps> = ({
|
|
|
67
77
|
onOpenFailed,
|
|
68
78
|
testID = "sync-status-banner",
|
|
69
79
|
}) => {
|
|
80
|
+
const [isOfflineSettled, setIsOfflineSettled] = useState(!isOnline && offlineGraceMs <= 0);
|
|
81
|
+
|
|
82
|
+
// Only surface "Offline" once connectivity has stayed lost for the grace period.
|
|
83
|
+
useEffect(() => {
|
|
84
|
+
if (isOnline) {
|
|
85
|
+
setIsOfflineSettled(false);
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
if (offlineGraceMs <= 0) {
|
|
89
|
+
setIsOfflineSettled(true);
|
|
90
|
+
return;
|
|
91
|
+
}
|
|
92
|
+
const timer = setTimeout(() => setIsOfflineSettled(true), offlineGraceMs);
|
|
93
|
+
return (): void => clearTimeout(timer);
|
|
94
|
+
}, [isOnline, offlineGraceMs]);
|
|
95
|
+
|
|
70
96
|
const handleOpenConflicts = useCallback((): void => {
|
|
71
97
|
onOpenConflicts?.();
|
|
72
98
|
}, [onOpenConflicts]);
|
|
@@ -83,7 +109,7 @@ export const SyncStatusBanner: React.FC<SyncStatusBannerProps> = ({
|
|
|
83
109
|
|
|
84
110
|
return (
|
|
85
111
|
<Box direction="row" gap={2} marginBottom={4} minHeight={20} testID={testID} wrap>
|
|
86
|
-
{!isOnline && (
|
|
112
|
+
{!isOnline && isOfflineSettled && (
|
|
87
113
|
<Box alignItems="center" direction="row" gap={1} testID="sync-offline-indicator">
|
|
88
114
|
<Badge status="error" value="Offline" />
|
|
89
115
|
</Box>
|
package/src/TextField.test.tsx
CHANGED
|
@@ -3,6 +3,7 @@ import {act, fireEvent, userEvent} from "@testing-library/react-native";
|
|
|
3
3
|
import {assert} from "chai";
|
|
4
4
|
import type {ReactElement} from "react";
|
|
5
5
|
import type {TextInput} from "react-native";
|
|
6
|
+
import type {TextFieldProps} from "./Common";
|
|
6
7
|
import {TextField} from "./TextField";
|
|
7
8
|
import {renderWithTheme} from "./test-utils";
|
|
8
9
|
|
|
@@ -579,6 +580,14 @@ describe("TextField", () => {
|
|
|
579
580
|
expect(input.props["aria-label"]).toBe("Text input field");
|
|
580
581
|
});
|
|
581
582
|
|
|
583
|
+
it("uses accessibilityLabel as the input's accessible name", () => {
|
|
584
|
+
const {getByDisplayValue} = renderWithTheme(
|
|
585
|
+
<TextField accessibilityLabel="Backup code" onChange={mockOnChange} value="" />
|
|
586
|
+
);
|
|
587
|
+
|
|
588
|
+
expect(getByDisplayValue("").props["aria-label"]).toBe("Backup code");
|
|
589
|
+
});
|
|
590
|
+
|
|
582
591
|
it("should indicate disabled state in accessibility", () => {
|
|
583
592
|
const {getByDisplayValue} = renderWithTheme(
|
|
584
593
|
<TextField disabled onChange={mockOnChange} value="" />
|
|
@@ -1017,4 +1026,145 @@ describe("TextField", () => {
|
|
|
1017
1026
|
}
|
|
1018
1027
|
});
|
|
1019
1028
|
});
|
|
1029
|
+
|
|
1030
|
+
describe("autoComplete", () => {
|
|
1031
|
+
const setOS = (os: string): string => {
|
|
1032
|
+
const reactNative = require("react-native") as {Platform: {OS: string}};
|
|
1033
|
+
const originalOS = reactNative.Platform.OS;
|
|
1034
|
+
reactNative.Platform.OS = os;
|
|
1035
|
+
return originalOS;
|
|
1036
|
+
};
|
|
1037
|
+
|
|
1038
|
+
it("sets autoComplete on the input on web", () => {
|
|
1039
|
+
const originalOS = setOS("web");
|
|
1040
|
+
try {
|
|
1041
|
+
const {getByTestId} = renderWithTheme(
|
|
1042
|
+
<>
|
|
1043
|
+
<TextField
|
|
1044
|
+
autoComplete="current-password"
|
|
1045
|
+
onChange={() => {}}
|
|
1046
|
+
testID="password"
|
|
1047
|
+
type="password"
|
|
1048
|
+
value=""
|
|
1049
|
+
/>
|
|
1050
|
+
<TextField
|
|
1051
|
+
autoComplete="username webauthn"
|
|
1052
|
+
onChange={() => {}}
|
|
1053
|
+
testID="email"
|
|
1054
|
+
type="email"
|
|
1055
|
+
value=""
|
|
1056
|
+
/>
|
|
1057
|
+
</>
|
|
1058
|
+
);
|
|
1059
|
+
expect(getByTestId("password").props.autoComplete).toBe("current-password");
|
|
1060
|
+
expect(getByTestId("email").props.autoComplete).toBe("username webauthn");
|
|
1061
|
+
} finally {
|
|
1062
|
+
setOS(originalOS);
|
|
1063
|
+
}
|
|
1064
|
+
});
|
|
1065
|
+
|
|
1066
|
+
const nativeCases: {
|
|
1067
|
+
autoComplete: TextFieldProps["autoComplete"];
|
|
1068
|
+
expectedAutoComplete: string | undefined;
|
|
1069
|
+
expectedTextContentType: string;
|
|
1070
|
+
type: TextFieldProps["type"];
|
|
1071
|
+
}[] = [
|
|
1072
|
+
{
|
|
1073
|
+
autoComplete: "username",
|
|
1074
|
+
expectedAutoComplete: "username",
|
|
1075
|
+
expectedTextContentType: "username",
|
|
1076
|
+
type: "email",
|
|
1077
|
+
},
|
|
1078
|
+
{
|
|
1079
|
+
autoComplete: "username webauthn",
|
|
1080
|
+
expectedAutoComplete: "username",
|
|
1081
|
+
expectedTextContentType: "username",
|
|
1082
|
+
type: "email",
|
|
1083
|
+
},
|
|
1084
|
+
{
|
|
1085
|
+
autoComplete: "email",
|
|
1086
|
+
expectedAutoComplete: "email",
|
|
1087
|
+
expectedTextContentType: "emailAddress",
|
|
1088
|
+
type: "email",
|
|
1089
|
+
},
|
|
1090
|
+
{
|
|
1091
|
+
autoComplete: "current-password",
|
|
1092
|
+
expectedAutoComplete: "current-password",
|
|
1093
|
+
expectedTextContentType: "password",
|
|
1094
|
+
type: "password",
|
|
1095
|
+
},
|
|
1096
|
+
{
|
|
1097
|
+
autoComplete: "new-password",
|
|
1098
|
+
expectedAutoComplete: "new-password",
|
|
1099
|
+
expectedTextContentType: "newPassword",
|
|
1100
|
+
type: "password",
|
|
1101
|
+
},
|
|
1102
|
+
{
|
|
1103
|
+
autoComplete: "one-time-code",
|
|
1104
|
+
expectedAutoComplete: "one-time-code",
|
|
1105
|
+
expectedTextContentType: "oneTimeCode",
|
|
1106
|
+
type: "text",
|
|
1107
|
+
},
|
|
1108
|
+
{
|
|
1109
|
+
autoComplete: "off",
|
|
1110
|
+
expectedAutoComplete: "off",
|
|
1111
|
+
expectedTextContentType: "none",
|
|
1112
|
+
type: "search",
|
|
1113
|
+
},
|
|
1114
|
+
{
|
|
1115
|
+
autoComplete: "on",
|
|
1116
|
+
expectedAutoComplete: undefined,
|
|
1117
|
+
expectedTextContentType: "password",
|
|
1118
|
+
type: "password",
|
|
1119
|
+
},
|
|
1120
|
+
];
|
|
1121
|
+
|
|
1122
|
+
for (const testCase of nativeCases) {
|
|
1123
|
+
it(`forwards autoComplete="${testCase.autoComplete}" to native autofill hints`, () => {
|
|
1124
|
+
const {getByTestId} = renderWithTheme(
|
|
1125
|
+
<TextField
|
|
1126
|
+
autoComplete={testCase.autoComplete}
|
|
1127
|
+
onChange={() => {}}
|
|
1128
|
+
testID="field"
|
|
1129
|
+
type={testCase.type}
|
|
1130
|
+
value=""
|
|
1131
|
+
/>
|
|
1132
|
+
);
|
|
1133
|
+
const input = getByTestId("field");
|
|
1134
|
+
expect(input.props.autoComplete).toBe(testCase.expectedAutoComplete);
|
|
1135
|
+
expect(input.props.textContentType).toBe(testCase.expectedTextContentType);
|
|
1136
|
+
});
|
|
1137
|
+
}
|
|
1138
|
+
|
|
1139
|
+
it("falls back to the type's text content hint on native without autoComplete", () => {
|
|
1140
|
+
const {getByTestId} = renderWithTheme(
|
|
1141
|
+
<>
|
|
1142
|
+
<TextField onChange={() => {}} testID="email" type="email" value="" />
|
|
1143
|
+
<TextField onChange={() => {}} testID="password" type="password" value="" />
|
|
1144
|
+
</>
|
|
1145
|
+
);
|
|
1146
|
+
expect(getByTestId("email").props.autoComplete).toBeUndefined();
|
|
1147
|
+
expect(getByTestId("email").props.textContentType).toBe("emailAddress");
|
|
1148
|
+
expect(getByTestId("password").props.autoComplete).toBeUndefined();
|
|
1149
|
+
expect(getByTestId("password").props.textContentType).toBe("password");
|
|
1150
|
+
});
|
|
1151
|
+
|
|
1152
|
+
it("sets the web autofill token on web and leaves the iOS hint to the type map", () => {
|
|
1153
|
+
const originalOS = setOS("web");
|
|
1154
|
+
try {
|
|
1155
|
+
const {getByTestId} = renderWithTheme(
|
|
1156
|
+
<TextField
|
|
1157
|
+
autoComplete="one-time-code"
|
|
1158
|
+
onChange={() => {}}
|
|
1159
|
+
testID="code"
|
|
1160
|
+
type="text"
|
|
1161
|
+
value=""
|
|
1162
|
+
/>
|
|
1163
|
+
);
|
|
1164
|
+
expect(getByTestId("code").props.autoComplete).toBe("one-time-code");
|
|
1165
|
+
} finally {
|
|
1166
|
+
setOS(originalOS);
|
|
1167
|
+
}
|
|
1168
|
+
});
|
|
1169
|
+
});
|
|
1020
1170
|
});
|
package/src/TextField.tsx
CHANGED
|
@@ -8,6 +8,7 @@ import {
|
|
|
8
8
|
type StyleProp,
|
|
9
9
|
TextInput,
|
|
10
10
|
type TextInputChangeEvent,
|
|
11
|
+
type TextInputProps,
|
|
11
12
|
View,
|
|
12
13
|
} from "react-native";
|
|
13
14
|
|
|
@@ -64,6 +65,51 @@ const textContentMap: {
|
|
|
64
65
|
username: "username",
|
|
65
66
|
};
|
|
66
67
|
|
|
68
|
+
type TextFieldAutoComplete = NonNullable<TextFieldProps["autoComplete"]>;
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Native autofill hints for each `autoComplete` value. `autoComplete` goes to React Native, which
|
|
72
|
+
* maps the web token to Android's autofill hint; `textContentType` is iOS's hint. "on" means "no
|
|
73
|
+
* opinion", so the field falls back to the hint for its `type`.
|
|
74
|
+
*/
|
|
75
|
+
const NATIVE_AUTOFILL: Record<
|
|
76
|
+
TextFieldAutoComplete,
|
|
77
|
+
Pick<TextInputProps, "autoComplete" | "textContentType"> | undefined
|
|
78
|
+
> = {
|
|
79
|
+
"current-password": {autoComplete: "current-password", textContentType: "password"},
|
|
80
|
+
email: {autoComplete: "email", textContentType: "emailAddress"},
|
|
81
|
+
"new-password": {autoComplete: "new-password", textContentType: "newPassword"},
|
|
82
|
+
off: {autoComplete: "off", textContentType: "none"},
|
|
83
|
+
on: undefined,
|
|
84
|
+
"one-time-code": {autoComplete: "one-time-code", textContentType: "oneTimeCode"},
|
|
85
|
+
username: {autoComplete: "username", textContentType: "username"},
|
|
86
|
+
// Passkey autofill is web only; native platforms get the plain username hint.
|
|
87
|
+
"username webauthn": {autoComplete: "username", textContentType: "username"},
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* The input's autofill props: the raw token on web (react-native-web writes it to the
|
|
92
|
+
* `autocomplete` attribute, which accepts token lists such as "username webauthn"), or the
|
|
93
|
+
* Android and iOS hints on native.
|
|
94
|
+
*/
|
|
95
|
+
const getAutofillProps = ({
|
|
96
|
+
autoComplete,
|
|
97
|
+
type,
|
|
98
|
+
}: {
|
|
99
|
+
autoComplete: TextFieldProps["autoComplete"];
|
|
100
|
+
type: string;
|
|
101
|
+
}): Pick<TextInputProps, "autoComplete" | "textContentType"> => {
|
|
102
|
+
const textContentType = textContentMap[type];
|
|
103
|
+
if (Platform.OS === "web") {
|
|
104
|
+
return {
|
|
105
|
+
...(autoComplete ? ({autoComplete} as unknown as Pick<TextInputProps, "autoComplete">) : {}),
|
|
106
|
+
textContentType,
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
const nativeHints = autoComplete ? NATIVE_AUTOFILL[autoComplete] : undefined;
|
|
110
|
+
return nativeHints ?? {textContentType};
|
|
111
|
+
};
|
|
112
|
+
|
|
67
113
|
interface WebTextInputRef {
|
|
68
114
|
focus: () => void;
|
|
69
115
|
selectionEnd: number | null;
|
|
@@ -76,6 +122,7 @@ export const TextField: FC<TextFieldProps> = ({
|
|
|
76
122
|
disabled,
|
|
77
123
|
helperText,
|
|
78
124
|
errorText,
|
|
125
|
+
errorPosition = "above",
|
|
79
126
|
value,
|
|
80
127
|
onChange,
|
|
81
128
|
placeholder,
|
|
@@ -100,6 +147,8 @@ export const TextField: FC<TextFieldProps> = ({
|
|
|
100
147
|
testIDs,
|
|
101
148
|
id,
|
|
102
149
|
aiSuggestion,
|
|
150
|
+
accessibilityLabel,
|
|
151
|
+
mono = false,
|
|
103
152
|
}) => {
|
|
104
153
|
const {theme} = useTheme();
|
|
105
154
|
const fieldTestIDs = resolveFieldTestIDsFromProps({testID, testIDs});
|
|
@@ -167,9 +216,10 @@ export const TextField: FC<TextFieldProps> = ({
|
|
|
167
216
|
let borderColor = focused ? theme.border.focus : theme.border.dark;
|
|
168
217
|
if (disabled) {
|
|
169
218
|
borderColor = theme.border.activeNeutral;
|
|
170
|
-
} else if (errorText) {
|
|
219
|
+
} else if (errorText && !focused) {
|
|
171
220
|
borderColor = theme.border.error;
|
|
172
221
|
}
|
|
222
|
+
const borderWidth = focused ? 3 : errorText ? 2 : 1;
|
|
173
223
|
|
|
174
224
|
const calculatedHeight: DimensionValue = useMemo(() => {
|
|
175
225
|
if (grow) {
|
|
@@ -189,10 +239,11 @@ export const TextField: FC<TextFieldProps> = ({
|
|
|
189
239
|
const style: StyleProp<TextStyleWithOutline> = {
|
|
190
240
|
color: theme.text.primary,
|
|
191
241
|
flex: 1,
|
|
192
|
-
fontFamily: "text",
|
|
242
|
+
fontFamily: mono ? "monospace" : "text",
|
|
193
243
|
fontSize: 16,
|
|
194
244
|
gap: 10,
|
|
195
245
|
height: calculatedHeight,
|
|
246
|
+
letterSpacing: mono ? 2 : undefined,
|
|
196
247
|
paddingVertical: 0,
|
|
197
248
|
width: "100%",
|
|
198
249
|
};
|
|
@@ -201,7 +252,7 @@ export const TextField: FC<TextFieldProps> = ({
|
|
|
201
252
|
style.outline = "none";
|
|
202
253
|
}
|
|
203
254
|
return style;
|
|
204
|
-
}, [calculatedHeight, theme.text.primary]);
|
|
255
|
+
}, [calculatedHeight, mono, theme.text.primary]);
|
|
205
256
|
|
|
206
257
|
if (["numberRange", "decimalRange", "height"].includes(type)) {
|
|
207
258
|
console.warn(`${type} is not yet supported`);
|
|
@@ -260,8 +311,8 @@ export const TextField: FC<TextFieldProps> = ({
|
|
|
260
311
|
onChangeRef.current(text);
|
|
261
312
|
}, []);
|
|
262
313
|
|
|
314
|
+
const autofillProps = getAutofillProps({autoComplete, type: type || "text"});
|
|
263
315
|
const keyboardType = keyboardMap[type];
|
|
264
|
-
const textContentType = textContentMap[type || "text"];
|
|
265
316
|
|
|
266
317
|
return (
|
|
267
318
|
<View
|
|
@@ -271,13 +322,15 @@ export const TextField: FC<TextFieldProps> = ({
|
|
|
271
322
|
}}
|
|
272
323
|
>
|
|
273
324
|
{Boolean(title) && <FieldTitle testID={fieldTestIDs.label} text={title!} />}
|
|
274
|
-
{Boolean(errorText) &&
|
|
325
|
+
{Boolean(errorText) && errorPosition === "above" && (
|
|
326
|
+
<FieldError testID={fieldTestIDs.error} text={errorText!} />
|
|
327
|
+
)}
|
|
275
328
|
<View
|
|
276
329
|
style={{
|
|
277
330
|
backgroundColor: disabled ? theme.surface.neutralLight : theme.surface.base,
|
|
278
331
|
borderColor,
|
|
279
332
|
borderRadius: 4,
|
|
280
|
-
borderWidth
|
|
333
|
+
borderWidth,
|
|
281
334
|
flexDirection: "column",
|
|
282
335
|
gap: aiSuggestion ? 10 : 0,
|
|
283
336
|
overflow: "hidden",
|
|
@@ -299,9 +352,12 @@ export const TextField: FC<TextFieldProps> = ({
|
|
|
299
352
|
>
|
|
300
353
|
<TextInput
|
|
301
354
|
{...(Platform.OS === "web" ? {spellCheck: false} : {})}
|
|
355
|
+
{...autofillProps}
|
|
302
356
|
accessibilityHint="Enter text here"
|
|
303
357
|
accessibilityState={{disabled}}
|
|
304
|
-
aria-
|
|
358
|
+
aria-describedby={errorText ? fieldTestIDs.error : undefined}
|
|
359
|
+
aria-invalid={Boolean(errorText)}
|
|
360
|
+
aria-label={accessibilityLabel ?? "Text input field"}
|
|
305
361
|
autoCapitalize={type === "text" ? "sentences" : "none"}
|
|
306
362
|
autoCorrect={shouldAutocorrect}
|
|
307
363
|
blurOnSubmit={blurOnSubmit}
|
|
@@ -363,7 +419,6 @@ export const TextField: FC<TextFieldProps> = ({
|
|
|
363
419
|
secureTextEntry={isPasswordField && !isValueRevealed}
|
|
364
420
|
style={defaultTextInputStyles}
|
|
365
421
|
testID={fieldTestIDs.input}
|
|
366
|
-
textContentType={textContentType}
|
|
367
422
|
underlineColorAndroid="transparent"
|
|
368
423
|
value={value}
|
|
369
424
|
/>
|
|
@@ -394,6 +449,9 @@ export const TextField: FC<TextFieldProps> = ({
|
|
|
394
449
|
)}
|
|
395
450
|
</View>
|
|
396
451
|
</View>
|
|
452
|
+
{Boolean(errorText) && errorPosition === "below" && (
|
|
453
|
+
<FieldError testID={fieldTestIDs.error} text={errorText!} />
|
|
454
|
+
)}
|
|
397
455
|
{Boolean(helperText) && <FieldHelperText testID={fieldTestIDs.helper} text={helperText!} />}
|
|
398
456
|
{/* {type === "numberRange" && value && (
|
|
399
457
|
<NumberPickerActionSheet
|
|
@@ -38,6 +38,8 @@ exports[`AddressField renders correctly with default props 1`] = `
|
|
|
38
38
|
"accessibilityState": {
|
|
39
39
|
"disabled": undefined,
|
|
40
40
|
},
|
|
41
|
+
"aria-describedby": undefined,
|
|
42
|
+
"aria-invalid": false,
|
|
41
43
|
"aria-label": "Text input field",
|
|
42
44
|
"autoCapitalize": "sentences",
|
|
43
45
|
"autoCorrect": true,
|
|
@@ -64,6 +66,7 @@ exports[`AddressField renders correctly with default props 1`] = `
|
|
|
64
66
|
"fontSize": 16,
|
|
65
67
|
"gap": 10,
|
|
66
68
|
"height": 24,
|
|
69
|
+
"letterSpacing": undefined,
|
|
67
70
|
"paddingVertical": 0,
|
|
68
71
|
"width": "100%",
|
|
69
72
|
},
|
|
@@ -156,6 +159,8 @@ exports[`AddressField renders correctly with default props 1`] = `
|
|
|
156
159
|
"accessibilityState": {
|
|
157
160
|
"disabled": undefined,
|
|
158
161
|
},
|
|
162
|
+
"aria-describedby": undefined,
|
|
163
|
+
"aria-invalid": false,
|
|
159
164
|
"aria-label": "Text input field",
|
|
160
165
|
"autoCapitalize": "sentences",
|
|
161
166
|
"autoCorrect": true,
|
|
@@ -182,6 +187,7 @@ exports[`AddressField renders correctly with default props 1`] = `
|
|
|
182
187
|
"fontSize": 16,
|
|
183
188
|
"gap": 10,
|
|
184
189
|
"height": 24,
|
|
190
|
+
"letterSpacing": undefined,
|
|
185
191
|
"paddingVertical": 0,
|
|
186
192
|
"width": "100%",
|
|
187
193
|
},
|
|
@@ -274,6 +280,8 @@ exports[`AddressField renders correctly with default props 1`] = `
|
|
|
274
280
|
"accessibilityState": {
|
|
275
281
|
"disabled": undefined,
|
|
276
282
|
},
|
|
283
|
+
"aria-describedby": undefined,
|
|
284
|
+
"aria-invalid": false,
|
|
277
285
|
"aria-label": "Text input field",
|
|
278
286
|
"autoCapitalize": "sentences",
|
|
279
287
|
"autoCorrect": true,
|
|
@@ -300,6 +308,7 @@ exports[`AddressField renders correctly with default props 1`] = `
|
|
|
300
308
|
"fontSize": 16,
|
|
301
309
|
"gap": 10,
|
|
302
310
|
"height": 24,
|
|
311
|
+
"letterSpacing": undefined,
|
|
303
312
|
"paddingVertical": 0,
|
|
304
313
|
"width": "100%",
|
|
305
314
|
},
|
|
@@ -2594,6 +2603,8 @@ exports[`AddressField renders correctly with default props 1`] = `
|
|
|
2594
2603
|
"accessibilityState": {
|
|
2595
2604
|
"disabled": undefined,
|
|
2596
2605
|
},
|
|
2606
|
+
"aria-describedby": undefined,
|
|
2607
|
+
"aria-invalid": false,
|
|
2597
2608
|
"aria-label": "Text input field",
|
|
2598
2609
|
"autoCapitalize": "sentences",
|
|
2599
2610
|
"autoCorrect": true,
|
|
@@ -2620,6 +2631,7 @@ exports[`AddressField renders correctly with default props 1`] = `
|
|
|
2620
2631
|
"fontSize": 16,
|
|
2621
2632
|
"gap": 10,
|
|
2622
2633
|
"height": 24,
|
|
2634
|
+
"letterSpacing": undefined,
|
|
2623
2635
|
"paddingVertical": 0,
|
|
2624
2636
|
"width": "100%",
|
|
2625
2637
|
},
|
|
@@ -108,6 +108,8 @@ exports[`AiSuggestionBox in TextArea snapshots should match snapshot for not-sta
|
|
|
108
108
|
"accessibilityState": {
|
|
109
109
|
"disabled": undefined,
|
|
110
110
|
},
|
|
111
|
+
"aria-describedby": undefined,
|
|
112
|
+
"aria-invalid": false,
|
|
111
113
|
"aria-label": "Text input field",
|
|
112
114
|
"autoCapitalize": "sentences",
|
|
113
115
|
"autoCorrect": true,
|
|
@@ -134,6 +136,7 @@ exports[`AiSuggestionBox in TextArea snapshots should match snapshot for not-sta
|
|
|
134
136
|
"fontSize": 16,
|
|
135
137
|
"gap": 10,
|
|
136
138
|
"height": 40,
|
|
139
|
+
"letterSpacing": undefined,
|
|
137
140
|
"paddingVertical": 0,
|
|
138
141
|
"width": "100%",
|
|
139
142
|
},
|
|
@@ -291,6 +294,8 @@ exports[`AiSuggestionBox in TextArea snapshots should match snapshot for generat
|
|
|
291
294
|
"accessibilityState": {
|
|
292
295
|
"disabled": undefined,
|
|
293
296
|
},
|
|
297
|
+
"aria-describedby": undefined,
|
|
298
|
+
"aria-invalid": false,
|
|
294
299
|
"aria-label": "Text input field",
|
|
295
300
|
"autoCapitalize": "sentences",
|
|
296
301
|
"autoCorrect": true,
|
|
@@ -317,6 +322,7 @@ exports[`AiSuggestionBox in TextArea snapshots should match snapshot for generat
|
|
|
317
322
|
"fontSize": 16,
|
|
318
323
|
"gap": 10,
|
|
319
324
|
"height": 40,
|
|
325
|
+
"letterSpacing": undefined,
|
|
320
326
|
"paddingVertical": 0,
|
|
321
327
|
"width": "100%",
|
|
322
328
|
},
|
|
@@ -739,6 +745,8 @@ exports[`AiSuggestionBox in TextArea snapshots should match snapshot for ready s
|
|
|
739
745
|
"accessibilityState": {
|
|
740
746
|
"disabled": undefined,
|
|
741
747
|
},
|
|
748
|
+
"aria-describedby": undefined,
|
|
749
|
+
"aria-invalid": false,
|
|
742
750
|
"aria-label": "Text input field",
|
|
743
751
|
"autoCapitalize": "sentences",
|
|
744
752
|
"autoCorrect": true,
|
|
@@ -765,6 +773,7 @@ exports[`AiSuggestionBox in TextArea snapshots should match snapshot for ready s
|
|
|
765
773
|
"fontSize": 16,
|
|
766
774
|
"gap": 10,
|
|
767
775
|
"height": 40,
|
|
776
|
+
"letterSpacing": undefined,
|
|
768
777
|
"paddingVertical": 0,
|
|
769
778
|
"width": "100%",
|
|
770
779
|
},
|
|
@@ -1078,6 +1087,8 @@ exports[`AiSuggestionBox in TextArea snapshots should match snapshot for hidden
|
|
|
1078
1087
|
"accessibilityState": {
|
|
1079
1088
|
"disabled": undefined,
|
|
1080
1089
|
},
|
|
1090
|
+
"aria-describedby": undefined,
|
|
1091
|
+
"aria-invalid": false,
|
|
1081
1092
|
"aria-label": "Text input field",
|
|
1082
1093
|
"autoCapitalize": "sentences",
|
|
1083
1094
|
"autoCorrect": true,
|
|
@@ -1104,6 +1115,7 @@ exports[`AiSuggestionBox in TextArea snapshots should match snapshot for hidden
|
|
|
1104
1115
|
"fontSize": 16,
|
|
1105
1116
|
"gap": 10,
|
|
1106
1117
|
"height": 40,
|
|
1118
|
+
"letterSpacing": undefined,
|
|
1107
1119
|
"paddingVertical": 0,
|
|
1108
1120
|
"width": "100%",
|
|
1109
1121
|
},
|
|
@@ -1417,6 +1429,8 @@ exports[`AiSuggestionBox in TextArea snapshots should match snapshot for added s
|
|
|
1417
1429
|
"accessibilityState": {
|
|
1418
1430
|
"disabled": undefined,
|
|
1419
1431
|
},
|
|
1432
|
+
"aria-describedby": undefined,
|
|
1433
|
+
"aria-invalid": false,
|
|
1420
1434
|
"aria-label": "Text input field",
|
|
1421
1435
|
"autoCapitalize": "sentences",
|
|
1422
1436
|
"autoCorrect": true,
|
|
@@ -1443,6 +1457,7 @@ exports[`AiSuggestionBox in TextArea snapshots should match snapshot for added s
|
|
|
1443
1457
|
"fontSize": 16,
|
|
1444
1458
|
"gap": 10,
|
|
1445
1459
|
"height": 40,
|
|
1460
|
+
"letterSpacing": undefined,
|
|
1446
1461
|
"paddingVertical": 0,
|
|
1447
1462
|
"width": "100%",
|
|
1448
1463
|
},
|
|
@@ -2121,6 +2121,8 @@ exports[`CustomSelectField renders with custom value (not in options) 1`] = `
|
|
|
2121
2121
|
"accessibilityState": {
|
|
2122
2122
|
"disabled": undefined,
|
|
2123
2123
|
},
|
|
2124
|
+
"aria-describedby": undefined,
|
|
2125
|
+
"aria-invalid": false,
|
|
2124
2126
|
"aria-label": "Text input field",
|
|
2125
2127
|
"autoCapitalize": "sentences",
|
|
2126
2128
|
"autoCorrect": true,
|
|
@@ -2147,6 +2149,7 @@ exports[`CustomSelectField renders with custom value (not in options) 1`] = `
|
|
|
2147
2149
|
"fontSize": 16,
|
|
2148
2150
|
"gap": 10,
|
|
2149
2151
|
"height": 24,
|
|
2152
|
+
"letterSpacing": undefined,
|
|
2150
2153
|
"paddingVertical": 0,
|
|
2151
2154
|
"width": "100%",
|
|
2152
2155
|
},
|