@terreno/ui 0.25.0 → 0.27.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 -0
- package/dist/ActionSheet.js.map +1 -1
- package/dist/AiSuggestionBox.js +1 -1
- package/dist/AiSuggestionBox.js.map +1 -1
- package/dist/Avatar.js +4 -1
- package/dist/Avatar.js.map +1 -1
- package/dist/BooleanField.js +2 -1
- package/dist/BooleanField.js.map +1 -1
- package/dist/Box.js +2 -0
- package/dist/Box.js.map +1 -1
- package/dist/Common.d.ts +7 -1
- package/dist/Common.js +1 -1
- package/dist/Common.js.map +1 -1
- package/dist/ConsentNavigator.js.map +1 -1
- package/dist/CustomSelectField.js +1 -1
- package/dist/CustomSelectField.js.map +1 -1
- package/dist/DateTimeField.js +4 -1
- package/dist/DateTimeField.js.map +1 -1
- package/dist/EmailField.js +1 -1
- package/dist/EmailField.js.map +1 -1
- package/dist/HeightField.js +3 -1
- package/dist/HeightField.js.map +1 -1
- package/dist/IconButton.js +10 -1
- package/dist/IconButton.js.map +1 -1
- package/dist/MarkdownEditorField.js +3 -1
- package/dist/MarkdownEditorField.js.map +1 -1
- package/dist/Modal.js +7 -2
- package/dist/Modal.js.map +1 -1
- package/dist/MultiselectField.js +2 -1
- package/dist/MultiselectField.js.map +1 -1
- package/dist/Page.js +1 -0
- package/dist/Page.js.map +1 -1
- package/dist/Permissions.d.ts +1 -1
- package/dist/Permissions.js +2 -2
- package/dist/Permissions.js.map +1 -1
- package/dist/SelectField.js +3 -1
- package/dist/SelectField.js.map +1 -1
- package/dist/SplitPage.js +3 -0
- package/dist/SplitPage.js.map +1 -1
- package/dist/SplitPage.native.js +2 -0
- package/dist/SplitPage.native.js.map +1 -1
- package/dist/TapToEdit.js +1 -0
- package/dist/TapToEdit.js.map +1 -1
- package/dist/TextField.js +3 -1
- package/dist/TextField.js.map +1 -1
- package/dist/ToastNotifications.js.map +1 -1
- package/dist/Unifier.js.map +1 -1
- package/dist/index.d.ts +8 -2
- package/dist/index.js +6 -2
- package/dist/index.js.map +1 -1
- package/dist/useSubmitConsent.d.ts +1 -1
- package/dist/useSubmitConsent.js +1 -1
- package/dist/useSubmitConsent.js.map +1 -1
- package/package.json +2 -2
- package/src/ActionSheet.test.tsx +1 -0
- package/src/ActionSheet.tsx +2 -0
- package/src/AiSuggestionBox.tsx +1 -1
- package/src/Avatar.tsx +4 -1
- package/src/Badge.test.tsx +1 -2
- package/src/BooleanField.tsx +2 -1
- package/src/Box.test.tsx +56 -0
- package/src/Box.tsx +4 -0
- package/src/Button.test.tsx +34 -0
- package/src/Common.ts +31 -1
- package/src/ConsentNavigator.test.tsx +1 -0
- package/src/ConsentNavigator.tsx +1 -0
- package/src/CustomSelectField.tsx +1 -1
- package/src/DataTable.test.tsx +1 -0
- package/src/DateTimeField.test.tsx +1 -0
- package/src/DateTimeField.tsx +4 -1
- package/src/EmailField.tsx +1 -1
- package/src/HeightField.tsx +3 -1
- package/src/IconButton.test.tsx +26 -0
- package/src/IconButton.tsx +10 -0
- package/src/MarkdownEditorField.tsx +3 -1
- package/src/Modal.test.tsx +261 -66
- package/src/Modal.tsx +7 -2
- package/src/ModalSheet.test.tsx +7 -6
- package/src/MultiselectField.tsx +2 -1
- package/src/Page.tsx +1 -0
- package/src/Permissions.ts +2 -2
- package/src/PickerSelect.test.tsx +1 -0
- package/src/SelectBadge.test.tsx +1 -2
- package/src/SelectField.tsx +3 -1
- package/src/Signature.test.tsx +52 -0
- package/src/SplitPage.native.tsx +2 -0
- package/src/SplitPage.test.tsx +6 -4
- package/src/SplitPage.tsx +3 -0
- package/src/TapToEdit.test.tsx +1 -0
- package/src/TapToEdit.tsx +2 -0
- package/src/Text.test.tsx +29 -0
- package/src/TextField.test.tsx +57 -1
- package/src/TextField.tsx +3 -1
- package/src/ToastNotifications.test.tsx +1 -0
- package/src/ToastNotifications.tsx +1 -0
- package/src/Tooltip.test.tsx +1 -1
- package/src/Unifier.ts +1 -0
- package/src/UpgradeRequiredScreen.test.tsx +40 -0
- package/src/UserInactivity.test.tsx +44 -1
- package/src/WebDropdownMenu.test.tsx +116 -1
- package/src/__snapshots__/DataTable.test.tsx.snap +0 -148
- package/src/__snapshots__/IconButton.test.tsx.snap +4 -0
- package/src/__snapshots__/InfoModalIcon.test.tsx.snap +255 -1088
- package/src/__snapshots__/Modal.test.tsx.snap +950 -1108
- package/src/bunSetup.ts +24 -0
- package/src/createWebPortal.test.tsx +17 -0
- package/src/index.tsx +18 -2
- package/src/types/react-native-swiper-flatlist.d.ts +1 -0
- package/src/useSubmitConsent.test.ts +2 -1
- package/src/useSubmitConsent.ts +2 -2
- package/dist/fieldElements/index.d.ts +0 -3
- package/dist/fieldElements/index.js +0 -4
- package/dist/fieldElements/index.js.map +0 -1
- package/dist/icons/index.d.ts +0 -5
- package/dist/icons/index.js +0 -6
- package/dist/icons/index.js.map +0 -1
- package/dist/login/index.d.ts +0 -2
- package/dist/login/index.js +0 -2
- package/dist/login/index.js.map +0 -1
- package/dist/signUp/index.d.ts +0 -6
- package/dist/signUp/index.js +0 -6
- package/dist/signUp/index.js.map +0 -1
- package/dist/testing/index.d.ts +0 -2
- package/dist/testing/index.js +0 -3
- package/dist/testing/index.js.map +0 -1
- package/src/fieldElements/index.tsx +0 -3
- package/src/icons/index.ts +0 -5
- package/src/login/index.ts +0 -2
- package/src/signUp/index.ts +0 -13
- package/src/testing/index.ts +0 -2
package/dist/Unifier.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Unifier.js","sourceRoot":"","sources":["../src/Unifier.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,MAAM,2CAA2C,CAAC;AACrE,OAAO,KAAK,SAAS,MAAM,gBAAgB,CAAC;AAC5C,OAAO,KAAK,OAAO,MAAM,cAAc,CAAC;AACxC,OAAO,EAAC,UAAU,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAC,MAAM,cAA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AC;oBAC7D,MAAM,IAAI,KAAK,CAAC,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;gBAC1E,CAAC;YACH,CAAC;SACF,CAAC;QAEF,aAAQ,GAAG;YACT,GAAG,EAAE,CAAC,OAAe,EAAE,EAAE;gBACvB,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;YACxB,CAAC;SACF,CAAC;QAEF,cAAS,GAAG,GAAG,EAAE;YACf,OAAO,CAAC,KAAK,CAAC,8BAA8B,CAAC,CAAC;QAChD,CAAC,CAAC;IACJ,CAAC;IAzGC,IAAI,GAAG;QACL,OAAO,IAAI,CAAC,IAAI,CAAC;IACnB,CAAC;IAED,IAAI,GAAG;QACL,OAAO,IAAI,CAAC,IAAI,CAAC;IACnB,CAAC;CAmGF;AAED,MAAM,CAAC,MAAM,OAAO,GAAG,IAAI,YAAY,EAAE,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -47,7 +47,8 @@ export * from "./ImageBackground";
|
|
|
47
47
|
export * from "./InfoModalIcon";
|
|
48
48
|
export * from "./InfoTooltipButton";
|
|
49
49
|
export * from "./Link";
|
|
50
|
-
export * from "./login";
|
|
50
|
+
export * from "./login/LoginScreen";
|
|
51
|
+
export type { LoginFieldConfig, LoginScreenProps } from "./login/loginTypes";
|
|
51
52
|
export * from "./MarkdownEditor";
|
|
52
53
|
export * from "./MarkdownEditorField";
|
|
53
54
|
export * from "./MarkdownView";
|
|
@@ -79,7 +80,12 @@ export * from "./Slider";
|
|
|
79
80
|
export * from "./SocialLoginButton";
|
|
80
81
|
export * from "./Spinner";
|
|
81
82
|
export * from "./SplitPage";
|
|
82
|
-
export
|
|
83
|
+
export { OAuthButtons } from "./signUp/OAuthButtons";
|
|
84
|
+
export { PasswordRequirements } from "./signUp/PasswordRequirements";
|
|
85
|
+
export { defaultPasswordRequirements, simplePasswordRequirements, } from "./signUp/passwordPresets";
|
|
86
|
+
export { SignUpScreen } from "./signUp/SignUpScreen";
|
|
87
|
+
export { Swiper } from "./signUp/Swiper";
|
|
88
|
+
export type { OAuthProvider, OAuthProviderConfig, OnboardingPage, PasswordRequirement, SignUpFieldConfig, SignUpScreenProps, } from "./signUp/signUpTypes";
|
|
83
89
|
export * from "./TapToEdit";
|
|
84
90
|
export * from "./TerrenoProvider";
|
|
85
91
|
export * from "./Text";
|
package/dist/index.js
CHANGED
|
@@ -46,7 +46,7 @@ export * from "./ImageBackground";
|
|
|
46
46
|
export * from "./InfoModalIcon";
|
|
47
47
|
export * from "./InfoTooltipButton";
|
|
48
48
|
export * from "./Link";
|
|
49
|
-
export * from "./login";
|
|
49
|
+
export * from "./login/LoginScreen";
|
|
50
50
|
export * from "./MarkdownEditor";
|
|
51
51
|
export * from "./MarkdownEditorField";
|
|
52
52
|
export * from "./MarkdownView";
|
|
@@ -78,7 +78,11 @@ export * from "./Slider";
|
|
|
78
78
|
export * from "./SocialLoginButton";
|
|
79
79
|
export * from "./Spinner";
|
|
80
80
|
export * from "./SplitPage";
|
|
81
|
-
export
|
|
81
|
+
export { OAuthButtons } from "./signUp/OAuthButtons";
|
|
82
|
+
export { PasswordRequirements } from "./signUp/PasswordRequirements";
|
|
83
|
+
export { defaultPasswordRequirements, simplePasswordRequirements, } from "./signUp/passwordPresets";
|
|
84
|
+
export { SignUpScreen } from "./signUp/SignUpScreen";
|
|
85
|
+
export { Swiper } from "./signUp/Swiper";
|
|
82
86
|
export * from "./TapToEdit";
|
|
83
87
|
export * from "./TerrenoProvider";
|
|
84
88
|
export * from "./Text";
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAEA,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,qBAAqB,CAAC;AACpC,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ACnD,OAAO,EAAC,MAAM,EAAC,MAAM,iBAAiB,CAAC;AASvC,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAClC,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,OAAO,EAAC,OAAO,EAAC,MAAM,WAAW,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,WAAW,CAAC;AAC1B,cAAc,yBAAyB,CAAC;AACxC,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,0BAA0B,CAAC"}
|
|
@@ -44,6 +44,6 @@ interface SubmitConsentApi {
|
|
|
44
44
|
export declare const useSubmitConsent: (api: SubmitConsentApi, baseUrl?: string) => {
|
|
45
45
|
error: unknown;
|
|
46
46
|
isSubmitting: boolean;
|
|
47
|
-
submit: (body: SubmitConsentBody) => Promise<
|
|
47
|
+
submit: (body: SubmitConsentBody) => Promise<void>;
|
|
48
48
|
};
|
|
49
49
|
export {};
|
package/dist/useSubmitConsent.js
CHANGED
|
@@ -38,7 +38,7 @@ export const useSubmitConsent = (api, baseUrl) => {
|
|
|
38
38
|
const enhancedApi = getEnhancedApi(api, base);
|
|
39
39
|
const [submitMutation, { isLoading: isSubmitting, error }] = enhancedApi.useSubmitConsentResponseMutation();
|
|
40
40
|
const submit = async (body) => {
|
|
41
|
-
|
|
41
|
+
await submitMutation(body).unwrap();
|
|
42
42
|
};
|
|
43
43
|
return { error, isSubmitting, submit };
|
|
44
44
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useSubmitConsent.js","sourceRoot":"","sources":["../src/useSubmitConsent.ts"],"names":[],"mappings":"AA8CA;;;;;;GAMG;AACH,MAAM,gBAAgB,GAAG,IAAI,OAAO,EAA2D,CAAC;AAEhG,MAAM,cAAc,GAAG,CAAC,GAAqB,EAAE,IAAY,EAA4B,EAAE;IACvF,IAAI,MAAM,GAAG,gBAAgB,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACvC,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,MAAM,GAAG,IAAI,GAAG,EAAE,CAAC;QACnB,gBAAgB,CAAC,GAAG,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;IACpC,CAAC;IACD,MAAM,MAAM,GAAG,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IAChC,IAAI,MAAM,EAAE,CAAC;QACX,OAAO,MAAM,CAAC;IAChB,CAAC;IACD,MAAM,kBAAkB,GAAG,GAAG,CAAC,gBAAgB,CAAC,EAAC,WAAW,EAAE,CAAC,iBAAiB,CAAC,EAAC,CAAC,CAAC;IACpF,MAAM,QAAQ,GAAG,kBAAkB,CAAC,eAAe,CAAC;QAClD,SAAS,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;YACrB,qBAAqB,EAAE,KAAK,CAAC,QAAQ,CAAC;gBACpC,eAAe,EAAE,CAAC,iBAAiB,CAAC;gBACpC,KAAK,EAAE,CAAC,IAAuB,EAAE,EAAE,CAAC,CAAC;oBACnC,IAAI;oBACJ,MAAM,EAAE,MAAM;oBACd,GAAG,EAAE,GAAG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|
49
49
|
"luxon": "^3.7.2",
|
|
50
50
|
"pressto": "^0.6.1",
|
|
51
51
|
"react-app-polyfill": "^3.0.0",
|
|
@@ -137,5 +137,5 @@
|
|
|
137
137
|
"test:coverage": "TZ=America/New_York bun run ../scripts/check-coverage.ts",
|
|
138
138
|
"types": "bun typedoc"
|
|
139
139
|
},
|
|
140
|
-
"version": "0.
|
|
140
|
+
"version": "0.27.0"
|
|
141
141
|
}
|
package/src/ActionSheet.test.tsx
CHANGED
package/src/ActionSheet.tsx
CHANGED
|
@@ -168,9 +168,11 @@ export class ActionSheet extends Component<Props, State, unknown> {
|
|
|
168
168
|
|
|
169
169
|
deviceLayoutCalled = false;
|
|
170
170
|
|
|
171
|
+
// noExplicitAny: FlatList ref is accessed via internal _listRef._scrollRef which is not part of the public type
|
|
171
172
|
// biome-ignore lint/suspicious/noExplicitAny: FlatList ref is accessed via internal _listRef._scrollRef which is not part of the public type
|
|
172
173
|
scrollViewRef: React.RefObject<any>;
|
|
173
174
|
|
|
175
|
+
// noExplicitAny: SafeAreaView ref is passed to findNodeHandle and accessed via untyped React Native internals
|
|
174
176
|
// biome-ignore lint/suspicious/noExplicitAny: SafeAreaView ref is passed to findNodeHandle and accessed via untyped React Native internals
|
|
175
177
|
safeAreaViewRef: React.RefObject<any>;
|
|
176
178
|
|
package/src/AiSuggestionBox.tsx
CHANGED
|
@@ -4,7 +4,7 @@ import {Pressable, View} from "react-native";
|
|
|
4
4
|
import {Button} from "./Button";
|
|
5
5
|
import type {AiSuggestionProps} from "./Common";
|
|
6
6
|
import {Icon} from "./Icon";
|
|
7
|
-
import {SparklesIcon} from "./icons";
|
|
7
|
+
import {SparklesIcon} from "./icons/SparklesIcon";
|
|
8
8
|
import {Text} from "./Text";
|
|
9
9
|
import {useTheme} from "./Theme";
|
|
10
10
|
|
package/src/Avatar.tsx
CHANGED
|
@@ -14,7 +14,10 @@ import {
|
|
|
14
14
|
|
|
15
15
|
import type {AvatarProps, CustomSvgProps} from "./Common";
|
|
16
16
|
import {Icon} from "./Icon";
|
|
17
|
-
import {MobileIcon
|
|
17
|
+
import {MobileIcon} from "./icons/MobileIcon";
|
|
18
|
+
import {OfflineIcon} from "./icons/OfflineIcon";
|
|
19
|
+
import {OnlineIcon} from "./icons/OnlineIcon";
|
|
20
|
+
import {OutOfOfficeIcon} from "./icons/OutOfficeIcon";
|
|
18
21
|
import {isMobileDevice} from "./MediaQuery";
|
|
19
22
|
import {useTheme} from "./Theme";
|
|
20
23
|
import {Tooltip} from "./Tooltip";
|
package/src/Badge.test.tsx
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
// biome-ignore-all lint/suspicious/noExplicitAny: test mock typing
|
|
2
1
|
import {describe, expect, it} from "bun:test";
|
|
3
2
|
|
|
4
3
|
import {Badge} from "./Badge";
|
|
@@ -93,7 +92,7 @@ describe("Badge", () => {
|
|
|
93
92
|
secondary
|
|
94
93
|
status="custom"
|
|
95
94
|
testID="custom-badge"
|
|
96
|
-
{...
|
|
95
|
+
{...customColors}
|
|
97
96
|
/>
|
|
98
97
|
);
|
|
99
98
|
|
package/src/BooleanField.tsx
CHANGED
|
@@ -2,7 +2,8 @@ import {type FC, useCallback, useEffect, useRef} from "react";
|
|
|
2
2
|
import {Animated, Pressable, View} from "react-native";
|
|
3
3
|
|
|
4
4
|
import type {BooleanFieldProps} from "./Common";
|
|
5
|
-
import {FieldHelperText
|
|
5
|
+
import {FieldHelperText} from "./fieldElements/FieldHelperText";
|
|
6
|
+
import {FieldTitle} from "./fieldElements/FieldTitle";
|
|
6
7
|
import {Text} from "./Text";
|
|
7
8
|
import {useTheme} from "./Theme";
|
|
8
9
|
import {resolveFieldTestIDsFromProps} from "./testing/resolveTestId";
|
package/src/Box.test.tsx
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
// noExplicitAny: test mock typing
|
|
1
2
|
// biome-ignore-all lint/suspicious/noExplicitAny: test mock typing
|
|
2
3
|
import {describe, expect, it, mock, spyOn} from "bun:test";
|
|
3
4
|
import {act, fireEvent} from "@testing-library/react-native";
|
|
@@ -419,6 +420,13 @@ describe("Box", () => {
|
|
|
419
420
|
const view = root.findByType("View");
|
|
420
421
|
expect(view.props.style).toBeDefined();
|
|
421
422
|
});
|
|
423
|
+
|
|
424
|
+
it("applies no shadow style when shadow is false", () => {
|
|
425
|
+
const {root} = renderWithTheme(<Box shadow={false} />);
|
|
426
|
+
const view = root.findByType("View");
|
|
427
|
+
expect(view.props.style.boxShadow).toBeUndefined();
|
|
428
|
+
expect(view.props.style.elevation).toBeUndefined();
|
|
429
|
+
});
|
|
422
430
|
});
|
|
423
431
|
|
|
424
432
|
describe("clickable behavior", () => {
|
|
@@ -554,6 +562,30 @@ describe("Box", () => {
|
|
|
554
562
|
expect(ref.current).toBeTruthy();
|
|
555
563
|
expect(typeof ref.current.scrollTo).toBe("function");
|
|
556
564
|
});
|
|
565
|
+
|
|
566
|
+
it("scrollTo forwards to the underlying scroll ref after the delay", async () => {
|
|
567
|
+
const scrollTo = mock(() => {});
|
|
568
|
+
const scrollToEnd = mock(() => {});
|
|
569
|
+
const scrollRef = {current: {scrollTo, scrollToEnd}} as any;
|
|
570
|
+
const ref = React.createRef<any>();
|
|
571
|
+
// Intentionally omit `scroll` so the ScrollView does not claim `scrollRef`
|
|
572
|
+
// and overwrite `.current`; the imperative handle still reads it.
|
|
573
|
+
renderWithTheme(
|
|
574
|
+
<Box ref={ref} scrollRef={scrollRef}>
|
|
575
|
+
<Text>Content</Text>
|
|
576
|
+
</Box>
|
|
577
|
+
);
|
|
578
|
+
|
|
579
|
+
ref.current.scrollTo(42);
|
|
580
|
+
ref.current.scrollToEnd();
|
|
581
|
+
|
|
582
|
+
await act(async () => {
|
|
583
|
+
await new Promise((resolve) => setTimeout(resolve, 80));
|
|
584
|
+
});
|
|
585
|
+
|
|
586
|
+
expect(scrollTo).toHaveBeenCalledWith({y: 42});
|
|
587
|
+
expect(scrollToEnd).toHaveBeenCalledTimes(1);
|
|
588
|
+
});
|
|
557
589
|
});
|
|
558
590
|
|
|
559
591
|
describe("dangerous inline styles", () => {
|
|
@@ -715,6 +747,30 @@ describe("Box", () => {
|
|
|
715
747
|
warnSpy.mockRestore();
|
|
716
748
|
});
|
|
717
749
|
|
|
750
|
+
it("applies a valid maxHeight value", () => {
|
|
751
|
+
const {root} = renderWithTheme(<Box maxHeight={120} />);
|
|
752
|
+
const view = root.findByType("View");
|
|
753
|
+
expect(view.props.style).toMatchObject({maxHeight: 120});
|
|
754
|
+
});
|
|
755
|
+
|
|
756
|
+
it("applies a valid minHeight value", () => {
|
|
757
|
+
const {root} = renderWithTheme(<Box minHeight={"50%" as any} />);
|
|
758
|
+
const view = root.findByType("View");
|
|
759
|
+
expect(view.props.style).toMatchObject({minHeight: "50%"});
|
|
760
|
+
});
|
|
761
|
+
|
|
762
|
+
it("applies a valid maxWidth value", () => {
|
|
763
|
+
const {root} = renderWithTheme(<Box maxWidth={200} />);
|
|
764
|
+
const view = root.findByType("View");
|
|
765
|
+
expect(view.props.style).toMatchObject({maxWidth: 200});
|
|
766
|
+
});
|
|
767
|
+
|
|
768
|
+
it("applies a valid minWidth value", () => {
|
|
769
|
+
const {root} = renderWithTheme(<Box minWidth={"25%" as any} />);
|
|
770
|
+
const view = root.findByType("View");
|
|
771
|
+
expect(view.props.style).toMatchObject({minWidth: "25%"});
|
|
772
|
+
});
|
|
773
|
+
|
|
718
774
|
it("warns when invalid minWidth value is provided", () => {
|
|
719
775
|
const warnSpy = spyOn(console, "warn").mockImplementation(() => {});
|
|
720
776
|
renderWithTheme(<Box minWidth={"abc" as any} />);
|
package/src/Box.tsx
CHANGED
|
@@ -87,8 +87,10 @@ export const Box = React.forwardRef((props: BoxProps, ref) => {
|
|
|
87
87
|
|
|
88
88
|
const BOX_STYLE_MAP: {
|
|
89
89
|
[prop: string]: (
|
|
90
|
+
// noExplicitAny: Box's style mapper accepts heterogeneous prop values (spacing, colors, dimensions, theme tokens, booleans) that cannot be enumerated in a single union; the mapper functions narrow at call site
|
|
90
91
|
// biome-ignore lint/suspicious/noExplicitAny: Box's style mapper accepts heterogeneous prop values (spacing, colors, dimensions, theme tokens, booleans) that cannot be enumerated in a single union; the mapper functions narrow at call site
|
|
91
92
|
value: any,
|
|
93
|
+
// noExplicitAny: see above - heterogeneous prop values
|
|
92
94
|
// biome-ignore lint/suspicious/noExplicitAny: see above - heterogeneous prop values
|
|
93
95
|
all: {[prop: string]: any}
|
|
94
96
|
) => {[style: string]: string | number} | {};
|
|
@@ -265,8 +267,10 @@ export const Box = React.forwardRef((props: BoxProps, ref) => {
|
|
|
265
267
|
|
|
266
268
|
const scrollRef = props.scrollRef ?? React.createRef();
|
|
267
269
|
|
|
270
|
+
// noExplicitAny: the style object is assembled from heterogeneous mapper outputs and consumed by RN ViewStyle which has narrow union types per property
|
|
268
271
|
// biome-ignore lint/suspicious/noExplicitAny: the style object is assembled from heterogeneous mapper outputs and consumed by RN ViewStyle which has narrow union types per property
|
|
269
272
|
const propsToStyle = (): any => {
|
|
273
|
+
// noExplicitAny: same as above - heterogeneous style assembly
|
|
270
274
|
// biome-ignore lint/suspicious/noExplicitAny: same as above - heterogeneous style assembly
|
|
271
275
|
let style: any = {};
|
|
272
276
|
for (const prop of Object.keys(props) as Array<keyof typeof props>) {
|
package/src/Button.test.tsx
CHANGED
|
@@ -3,9 +3,14 @@ import {act, fireEvent, render, waitFor} from "@testing-library/react-native";
|
|
|
3
3
|
|
|
4
4
|
import {Button} from "./Button";
|
|
5
5
|
import {isMobileDevice} from "./MediaQuery";
|
|
6
|
+
import * as ThemeModule from "./Theme";
|
|
6
7
|
import {renderWithIcons, renderWithTheme, TEST_CUSTOM_ICON_TEST_ID} from "./test-utils";
|
|
7
8
|
import * as Utilities from "./Utilities";
|
|
8
9
|
|
|
10
|
+
interface PressableTestProps {
|
|
11
|
+
onPress: () => Promise<void>;
|
|
12
|
+
}
|
|
13
|
+
|
|
9
14
|
describe("Button", () => {
|
|
10
15
|
it("renders correctly with default props", () => {
|
|
11
16
|
const {toJSON} = renderWithTheme(<Button onClick={() => {}} text="Click me" />);
|
|
@@ -364,4 +369,33 @@ describe("Button", () => {
|
|
|
364
369
|
nativeSpy.mockRestore();
|
|
365
370
|
(isMobileDevice as ReturnType<typeof mock>).mockImplementation(() => false);
|
|
366
371
|
});
|
|
372
|
+
|
|
373
|
+
it("resets loading and rethrows when onClick rejects", async () => {
|
|
374
|
+
const error = new Error("boom");
|
|
375
|
+
const handleClick = mock(() => Promise.reject(error));
|
|
376
|
+
const {getByTestId} = renderWithTheme(
|
|
377
|
+
<Button onClick={handleClick} pressAnimation="none" testID="throwing-button" text="Throw" />
|
|
378
|
+
);
|
|
379
|
+
|
|
380
|
+
const button = getByTestId("throwing-button");
|
|
381
|
+
await act(async () => {
|
|
382
|
+
await expect((button.props as PressableTestProps).onPress()).rejects.toThrow("boom");
|
|
383
|
+
});
|
|
384
|
+
|
|
385
|
+
expect(handleClick).toHaveBeenCalled();
|
|
386
|
+
});
|
|
387
|
+
|
|
388
|
+
it("renders null when no theme is available from context", () => {
|
|
389
|
+
const useThemeSpy = spyOn(ThemeModule, "useTheme").mockReturnValue({
|
|
390
|
+
resetTheme: () => {},
|
|
391
|
+
setPrimitives: () => {},
|
|
392
|
+
setTheme: () => {},
|
|
393
|
+
theme: undefined,
|
|
394
|
+
} as unknown as ReturnType<typeof ThemeModule.useTheme>);
|
|
395
|
+
|
|
396
|
+
const {toJSON} = render(<Button onClick={() => {}} text="No theme" />);
|
|
397
|
+
expect(toJSON()).toBeNull();
|
|
398
|
+
|
|
399
|
+
useThemeSpy.mockRestore();
|
|
400
|
+
});
|
|
367
401
|
});
|
package/src/Common.ts
CHANGED
|
@@ -36,7 +36,7 @@ export {
|
|
|
36
36
|
toDomTestProps,
|
|
37
37
|
toPlatformTestProps,
|
|
38
38
|
toTestProps,
|
|
39
|
-
} from "./testing";
|
|
39
|
+
} from "./testing/resolveTestId";
|
|
40
40
|
export type {
|
|
41
41
|
DataTableTestIDs,
|
|
42
42
|
FieldTestIDs,
|
|
@@ -531,6 +531,7 @@ export interface BoxPropsBase extends WithTestID {
|
|
|
531
531
|
lgColumn?: UnsignedUpTo12;
|
|
532
532
|
dangerouslySetInlineStyle?: {
|
|
533
533
|
__style: {
|
|
534
|
+
// noExplicitAny: escape hatch for arbitrary inline style values that users may need to set
|
|
534
535
|
// biome-ignore lint/suspicious/noExplicitAny: escape hatch for arbitrary inline style values that users may need to set
|
|
535
536
|
[key: string]: any;
|
|
536
537
|
};
|
|
@@ -989,16 +990,19 @@ export interface SplitPageProps {
|
|
|
989
990
|
loading?: boolean;
|
|
990
991
|
color?: SurfaceColor;
|
|
991
992
|
keyboardOffset?: number;
|
|
993
|
+
// noExplicitAny: ListRenderItemInfo generic type depends on the consumer's data shape
|
|
992
994
|
// biome-ignore lint/suspicious/noExplicitAny: ListRenderItemInfo generic type depends on the consumer's data shape
|
|
993
995
|
renderListViewItem: (itemInfo: ListRenderItemInfo<any>) => ReactElement | null;
|
|
994
996
|
renderListViewHeader?: () => ReactElement | null;
|
|
995
997
|
renderContent?: (index?: number) => ReactElement | ReactElement[] | null;
|
|
998
|
+
// noExplicitAny: list data type varies by consumer's data model
|
|
996
999
|
// biome-ignore lint/suspicious/noExplicitAny: list data type varies by consumer's data model
|
|
997
1000
|
listViewData: any[];
|
|
998
1001
|
listViewExtraData?: unknown;
|
|
999
1002
|
listViewWidth?: number;
|
|
1000
1003
|
listViewMaxWidth?: number;
|
|
1001
1004
|
renderChild?: () => ReactChild;
|
|
1005
|
+
// noExplicitAny: callback value type varies by consumer's data model
|
|
1002
1006
|
// biome-ignore lint/suspicious/noExplicitAny: callback value type varies by consumer's data model
|
|
1003
1007
|
onSelectionChange?: (value?: any) => void | Promise<void>;
|
|
1004
1008
|
}
|
|
@@ -1801,6 +1805,7 @@ export interface DateTimeActionSheetProps {
|
|
|
1801
1805
|
type?: "date" | "time" | "datetime";
|
|
1802
1806
|
// Returns an ISO 8601 string. If mode is "time", the date portion is today.
|
|
1803
1807
|
onChange: OnChangeCallback;
|
|
1808
|
+
// noExplicitAny: ActionSheet class lives in ActionSheet.tsx which imports from Common.ts; typing this would create a circular import
|
|
1804
1809
|
// biome-ignore lint/suspicious/noExplicitAny: ActionSheet class lives in ActionSheet.tsx which imports from Common.ts; typing this would create a circular import
|
|
1805
1810
|
actionSheetRef: React.RefObject<any>;
|
|
1806
1811
|
visible: boolean;
|
|
@@ -1813,6 +1818,7 @@ export interface DecimalRangeActionSheetProps {
|
|
|
1813
1818
|
min: number;
|
|
1814
1819
|
max: number;
|
|
1815
1820
|
onChange: OnChangeCallback;
|
|
1821
|
+
// noExplicitAny: ActionSheet class lives in ActionSheet.tsx which imports from Common.ts; typing this would create a circular import
|
|
1816
1822
|
// biome-ignore lint/suspicious/noExplicitAny: ActionSheet class lives in ActionSheet.tsx which imports from Common.ts; typing this would create a circular import
|
|
1817
1823
|
actionSheetRef: React.RefObject<any>;
|
|
1818
1824
|
}
|
|
@@ -1873,6 +1879,7 @@ export type FieldProps =
|
|
|
1873
1879
|
export interface HeightActionSheetProps {
|
|
1874
1880
|
value?: string;
|
|
1875
1881
|
onChange: OnChangeCallback;
|
|
1882
|
+
// noExplicitAny: ActionSheet class lives in ActionSheet.tsx which imports from Common.ts; typing this would create a circular import
|
|
1876
1883
|
// biome-ignore lint/suspicious/noExplicitAny: ActionSheet class lives in ActionSheet.tsx which imports from Common.ts; typing this would create a circular import
|
|
1877
1884
|
actionSheetRef: React.RefObject<any>;
|
|
1878
1885
|
/** Minimum height in total inches */
|
|
@@ -1885,16 +1892,20 @@ export interface HeightActionSheetProps {
|
|
|
1885
1892
|
|
|
1886
1893
|
export interface HyperlinkProps {
|
|
1887
1894
|
linkDefault?: boolean;
|
|
1895
|
+
// noExplicitAny: linkify-it library's main export lacks a TypeScript type definition
|
|
1888
1896
|
// biome-ignore lint/suspicious/noExplicitAny: linkify-it library's main export lacks a TypeScript type definition
|
|
1889
1897
|
linkify?: any;
|
|
1898
|
+
// noExplicitAny: StyleProp's generic is heterogeneous (TextStyle | ViewStyle) for link contexts
|
|
1890
1899
|
// biome-ignore lint/suspicious/noExplicitAny: StyleProp's generic is heterogeneous (TextStyle | ViewStyle) for link contexts
|
|
1891
1900
|
linkStyle?: StyleProp<any>;
|
|
1892
1901
|
linkText?: string | ((url: string) => string);
|
|
1893
1902
|
onPress?: (url: string) => void;
|
|
1894
1903
|
onLongPress?: (url: string, text: string) => void;
|
|
1904
|
+
// noExplicitAny: returned view props are spread onto a heterogeneous View; consumers pass arbitrary props
|
|
1895
1905
|
// biome-ignore lint/suspicious/noExplicitAny: returned view props are spread onto a heterogeneous View; consumers pass arbitrary props
|
|
1896
1906
|
injectViewProps?: (url: string) => any;
|
|
1897
1907
|
children?: React.ReactNode;
|
|
1908
|
+
// noExplicitAny: StyleProp's generic is heterogeneous for the container which holds mixed Text/View children
|
|
1898
1909
|
// biome-ignore lint/suspicious/noExplicitAny: StyleProp's generic is heterogeneous for the container which holds mixed Text/View children
|
|
1899
1910
|
style?: StyleProp<any>;
|
|
1900
1911
|
}
|
|
@@ -1957,6 +1968,13 @@ export interface IconButtonProps extends WithTestID {
|
|
|
1957
1968
|
*/
|
|
1958
1969
|
size?: "default" | "sm";
|
|
1959
1970
|
|
|
1971
|
+
/**
|
|
1972
|
+
* Controls the button's interaction state. Use Default for standard button appearance
|
|
1973
|
+
* and Active to indicate a selected or currently engaged state.
|
|
1974
|
+
* @default "default"
|
|
1975
|
+
*/
|
|
1976
|
+
state?: "default" | "active";
|
|
1977
|
+
|
|
1960
1978
|
/**
|
|
1961
1979
|
* The ideal position of the tooltip.
|
|
1962
1980
|
*/
|
|
@@ -2047,11 +2065,13 @@ export interface ModalProps extends WithTestID {
|
|
|
2047
2065
|
/**
|
|
2048
2066
|
* The function to call when the primary button is clicked.
|
|
2049
2067
|
*/
|
|
2068
|
+
// noExplicitAny: callback value type varies by consumer context
|
|
2050
2069
|
// biome-ignore lint/suspicious/noExplicitAny: callback value type varies by consumer context
|
|
2051
2070
|
primaryButtonOnClick?: (value?: any) => void | Promise<void>;
|
|
2052
2071
|
/**
|
|
2053
2072
|
* The function to call when the secondary button is clicked.
|
|
2054
2073
|
*/
|
|
2074
|
+
// noExplicitAny: callback value type varies by consumer context
|
|
2055
2075
|
// biome-ignore lint/suspicious/noExplicitAny: callback value type varies by consumer context
|
|
2056
2076
|
secondaryButtonOnClick?: (value?: any) => void | Promise<void>;
|
|
2057
2077
|
}
|
|
@@ -2061,11 +2081,13 @@ export interface NumberPickerActionSheetProps {
|
|
|
2061
2081
|
min: number;
|
|
2062
2082
|
max: number;
|
|
2063
2083
|
onChange: OnChangeCallback;
|
|
2084
|
+
// noExplicitAny: ActionSheet class lives in ActionSheet.tsx which imports from Common.ts; typing this would create a circular import
|
|
2064
2085
|
// biome-ignore lint/suspicious/noExplicitAny: ActionSheet class lives in ActionSheet.tsx which imports from Common.ts; typing this would create a circular import
|
|
2065
2086
|
actionSheetRef: React.RefObject<any>;
|
|
2066
2087
|
}
|
|
2067
2088
|
|
|
2068
2089
|
export interface PageProps extends WithTestID {
|
|
2090
|
+
// noExplicitAny: React Navigation type varies by navigation stack configuration
|
|
2069
2091
|
// biome-ignore lint/suspicious/noExplicitAny: React Navigation type varies by navigation stack configuration
|
|
2070
2092
|
navigation?: any;
|
|
2071
2093
|
scroll?: boolean;
|
|
@@ -2399,6 +2421,7 @@ export interface TextFieldPickerActionSheetProps {
|
|
|
2399
2421
|
value?: string;
|
|
2400
2422
|
mode?: "date" | "time";
|
|
2401
2423
|
onChange: OnChangeCallback;
|
|
2424
|
+
// noExplicitAny: ActionSheet class lives in ActionSheet.tsx which imports from Common.ts; typing this would create a circular import
|
|
2402
2425
|
// biome-ignore lint/suspicious/noExplicitAny: ActionSheet class lives in ActionSheet.tsx which imports from Common.ts; typing this would create a circular import
|
|
2403
2426
|
actionSheetRef: React.RefObject<any>;
|
|
2404
2427
|
}
|
|
@@ -2519,18 +2542,21 @@ export type TapToEditProps =
|
|
|
2519
2542
|
|
|
2520
2543
|
export interface BaseTapToEditProps extends Omit<FieldProps, "onChange" | "value"> {
|
|
2521
2544
|
title: string;
|
|
2545
|
+
// noExplicitAny: value type varies across TapToEdit field types (text, number, date, etc.)
|
|
2522
2546
|
// biome-ignore lint/suspicious/noExplicitAny: value type varies across TapToEdit field types (text, number, date, etc.)
|
|
2523
2547
|
value: any;
|
|
2524
2548
|
|
|
2525
2549
|
/**
|
|
2526
2550
|
* Not required if not editable.
|
|
2527
2551
|
*/
|
|
2552
|
+
// noExplicitAny: value type varies across TapToEdit field types
|
|
2528
2553
|
// biome-ignore lint/suspicious/noExplicitAny: value type varies across TapToEdit field types
|
|
2529
2554
|
setValue?: (value: any) => void;
|
|
2530
2555
|
|
|
2531
2556
|
/**
|
|
2532
2557
|
* Not required if not editable.
|
|
2533
2558
|
*/
|
|
2559
|
+
// noExplicitAny: value type varies across TapToEdit field types
|
|
2534
2560
|
// biome-ignore lint/suspicious/noExplicitAny: value type varies across TapToEdit field types
|
|
2535
2561
|
onSave?: (value: any) => void | Promise<void>;
|
|
2536
2562
|
|
|
@@ -2544,6 +2570,7 @@ export interface BaseTapToEditProps extends Omit<FieldProps, "onChange" | "value
|
|
|
2544
2570
|
* Enable edit mode from outside the component.
|
|
2545
2571
|
*/
|
|
2546
2572
|
isEditing?: boolean;
|
|
2573
|
+
// noExplicitAny: input value type varies across TapToEdit field types
|
|
2547
2574
|
// biome-ignore lint/suspicious/noExplicitAny: input value type varies across TapToEdit field types
|
|
2548
2575
|
transform?: (value: any) => string;
|
|
2549
2576
|
/**
|
|
@@ -2633,11 +2660,13 @@ export interface ModelFields {
|
|
|
2633
2660
|
|
|
2634
2661
|
export interface OpenAPISpec {
|
|
2635
2662
|
paths: {
|
|
2663
|
+
// noExplicitAny: OpenAPI path items are deeply accessed with chained property lookups
|
|
2636
2664
|
// biome-ignore lint/suspicious/noExplicitAny: OpenAPI path items are deeply accessed with chained property lookups
|
|
2637
2665
|
[key: string]: any;
|
|
2638
2666
|
};
|
|
2639
2667
|
}
|
|
2640
2668
|
|
|
2669
|
+
// noExplicitAny: ModelFieldConfig is a passthrough for arbitrary field configuration objects from various model contexts
|
|
2641
2670
|
// biome-ignore lint/suspicious/noExplicitAny: ModelFieldConfig is a passthrough for arbitrary field configuration objects from various model contexts
|
|
2642
2671
|
export type ModelFieldConfig = any;
|
|
2643
2672
|
|
|
@@ -2667,6 +2696,7 @@ export interface ModelAdminFieldConfig {
|
|
|
2667
2696
|
|
|
2668
2697
|
// The props for a custom column component for ModelAdmin.
|
|
2669
2698
|
export interface ModelAdminCustomComponentProps extends Omit<FieldProps, "name"> {
|
|
2699
|
+
// noExplicitAny: document shape varies by model used with ModelAdmin
|
|
2670
2700
|
// biome-ignore lint/suspicious/noExplicitAny: document shape varies by model used with ModelAdmin
|
|
2671
2701
|
doc: any;
|
|
2672
2702
|
fieldKey: string; // Dot notation representation of the field.
|
package/src/ConsentNavigator.tsx
CHANGED
|
@@ -10,6 +10,7 @@ import type {SubmitConsentBody} from "./useSubmitConsent";
|
|
|
10
10
|
import {useSubmitConsent} from "./useSubmitConsent";
|
|
11
11
|
|
|
12
12
|
interface ConsentNavigatorProps {
|
|
13
|
+
// noExplicitAny: RTK Query api instance is a complex generic type that varies per consumer
|
|
13
14
|
// biome-ignore lint/suspicious/noExplicitAny: RTK Query api instance is a complex generic type that varies per consumer
|
|
14
15
|
api: any;
|
|
15
16
|
baseUrl?: string;
|
|
@@ -2,7 +2,7 @@ import {type FC, useEffect, useMemo, useRef, useState} from "react";
|
|
|
2
2
|
import {type TextInput, View} from "react-native";
|
|
3
3
|
|
|
4
4
|
import type {CustomSelectFieldProps} from "./Common";
|
|
5
|
-
import {FieldHelperText} from "./fieldElements";
|
|
5
|
+
import {FieldHelperText} from "./fieldElements/FieldHelperText";
|
|
6
6
|
import {SelectField} from "./SelectField";
|
|
7
7
|
import {TextField} from "./TextField";
|
|
8
8
|
import {resolveFieldTestIDsFromProps, resolveTestID} from "./testing/resolveTestId";
|
package/src/DataTable.test.tsx
CHANGED
package/src/DateTimeField.tsx
CHANGED
|
@@ -6,7 +6,9 @@ import {Pressable, TextInput, View} from "react-native";
|
|
|
6
6
|
import {Box} from "./Box";
|
|
7
7
|
import type {DateTimeFieldProps} from "./Common";
|
|
8
8
|
import {DateTimeActionSheet} from "./DateTimeActionSheet";
|
|
9
|
-
import {FieldError
|
|
9
|
+
import {FieldError} from "./fieldElements/FieldError";
|
|
10
|
+
import {FieldHelperText} from "./fieldElements/FieldHelperText";
|
|
11
|
+
import {FieldTitle} from "./fieldElements/FieldTitle";
|
|
10
12
|
import {IconButton} from "./IconButton";
|
|
11
13
|
import {isMobileDevice} from "./MediaQuery";
|
|
12
14
|
import {SelectField} from "./SelectField";
|
|
@@ -422,6 +424,7 @@ export const DateTimeField: FC<DateTimeFieldProps> = ({
|
|
|
422
424
|
}): React.ReactElement => {
|
|
423
425
|
const {theme} = useTheme();
|
|
424
426
|
const fieldTestIDs = resolveFieldTestIDsFromProps({testID, testIDs});
|
|
427
|
+
// noExplicitAny: ActionSheet class is defined in ActionSheet.tsx which imports from Common.ts indirectly; using its type here would create a circular dependency
|
|
425
428
|
// biome-ignore lint/suspicious/noExplicitAny: ActionSheet class is defined in ActionSheet.tsx which imports from Common.ts indirectly; using its type here would create a circular dependency
|
|
426
429
|
const dateActionSheetRef: React.RefObject<any> = React.createRef();
|
|
427
430
|
const [amPm, setAmPm] = useState<"am" | "pm">("am");
|
package/src/EmailField.tsx
CHANGED
|
@@ -36,7 +36,7 @@ export const EmailField: FC<EmailFieldProps> = ({
|
|
|
36
36
|
setLocalValue(e);
|
|
37
37
|
const err = validateEmail(e);
|
|
38
38
|
// remove error if valid email
|
|
39
|
-
if (!err &&
|
|
39
|
+
if (!err && localError) {
|
|
40
40
|
setLocalError(undefined);
|
|
41
41
|
}
|
|
42
42
|
if (!err && onChange) {
|
package/src/HeightField.tsx
CHANGED
|
@@ -4,7 +4,9 @@ import {Platform, Pressable, type StyleProp, TextInput, View} from "react-native
|
|
|
4
4
|
import type {ActionSheet} from "./ActionSheet";
|
|
5
5
|
import {Box} from "./Box";
|
|
6
6
|
import type {HeightFieldProps, TextStyleWithOutline} from "./Common";
|
|
7
|
-
import {FieldError
|
|
7
|
+
import {FieldError} from "./fieldElements/FieldError";
|
|
8
|
+
import {FieldHelperText} from "./fieldElements/FieldHelperText";
|
|
9
|
+
import {FieldTitle} from "./fieldElements/FieldTitle";
|
|
8
10
|
import {HeightActionSheet} from "./HeightActionSheet";
|
|
9
11
|
import {isMobileDevice} from "./MediaQuery";
|
|
10
12
|
import {SelectField} from "./SelectField";
|