@jobber/components-native 0.84.1-JOB-131539-d38df57.11 → 0.84.1-scotttho-e5ab79e.5
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/dist/package.json +2 -2
- package/dist/src/ButtonGroup/utils.js +1 -1
- package/dist/src/Card/Card.js +1 -1
- package/dist/src/ErrorMessageWrapper/context/ErrorMessageProvider.js +1 -1
- package/dist/src/Form/Form.js +2 -2
- package/dist/src/Form/components/FormSaveButton/FormSaveButton.js +1 -1
- package/dist/src/Form/hooks/useInternalForm.js +1 -1
- package/dist/src/Form/hooks/useScrollToError/useScrollToError.js +1 -1
- package/dist/src/FormatFile/FormatFile.js +2 -2
- package/dist/src/Heading/Heading.js +1 -1
- package/dist/src/InputFieldWrapper/CommonInputStyles.style.js +1 -1
- package/dist/src/InputFieldWrapper/InputFieldWrapper.js +1 -1
- package/dist/src/InputFieldWrapper/components/Prefix/Prefix.js +1 -1
- package/dist/src/InputFieldWrapper/components/Suffix/Suffix.js +1 -1
- package/dist/src/InputText/InputText.js +1 -1
- package/dist/src/Text/Text.js +1 -1
- package/dist/src/Typography/Typography.js +1 -1
- package/dist/src/Typography/Typography.style.js +1 -1
- package/dist/src/hooks/useFormController.js +1 -1
- package/dist/src/utils/test/MockSafeAreaProvider.js +1 -1
- package/dist/tsconfig.json +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/src/ActionItem/ActionItem.d.ts +2 -2
- package/dist/types/src/ActionItem/ActionItemGroup.d.ts +2 -2
- package/dist/types/src/ActionItem/components/ActionItemContainer.d.ts +1 -1
- package/dist/types/src/ActionItem/index.d.ts +2 -1
- package/dist/types/src/ActionLabel/ActionLabel.d.ts +1 -1
- package/dist/types/src/ActionLabel/index.d.ts +2 -1
- package/dist/types/src/ActivityIndicator/ActivityIndicator.d.ts +1 -1
- package/dist/types/src/AtlantisThemeContext/AtlantisThemeContext.d.ts +1 -1
- package/dist/types/src/AtlantisThemeContext/buildThemedStyles.d.ts +1 -1
- package/dist/types/src/AtlantisThemeContext/index.d.ts +1 -1
- package/dist/types/src/AtlantisThemeContext/types.d.ts +1 -1
- package/dist/types/src/AutoLink/AutoLink.d.ts +1 -1
- package/dist/types/src/AutoLink/clipboard.d.ts +1 -1
- package/dist/types/src/AutoLink/components/ComposeTextWithLinks/ComposeTextWithLinks.d.ts +1 -1
- package/dist/types/src/AutoLink/hooks/useCreateLinkedText.d.ts +1 -1
- package/dist/types/src/AutoLink/types.d.ts +2 -2
- package/dist/types/src/AutoLink/utils.d.ts +2 -2
- package/dist/types/src/Banner/Banner.d.ts +1 -1
- package/dist/types/src/Banner/components/BannerIcon/BannerIcon.d.ts +2 -2
- package/dist/types/src/Banner/types.d.ts +3 -3
- package/dist/types/src/BottomSheet/BottomSheet.d.ts +2 -1
- package/dist/types/src/BottomSheet/components/BottomSheetOption/BottomSheetOption.d.ts +2 -2
- package/dist/types/src/BottomSheet/components/BottomSheetOption/index.d.ts +2 -1
- package/dist/types/src/Button/Button.d.ts +4 -4
- package/dist/types/src/Button/components/InternalButtonLoading/InternalButtonLoading.d.ts +1 -1
- package/dist/types/src/ButtonGroup/ButtonGroup.d.ts +1 -1
- package/dist/types/src/ButtonGroup/ButtonGroupAction.d.ts +2 -2
- package/dist/types/src/ButtonGroup/components/SecondaryActionSheet/SecondaryActionSheet.d.ts +3 -3
- package/dist/types/src/ButtonGroup/types.d.ts +2 -2
- package/dist/types/src/ButtonGroup/utils.d.ts +2 -2
- package/dist/types/src/Card/Card.d.ts +3 -3
- package/dist/types/src/Card/components/InternalCardHeader.d.ts +1 -1
- package/dist/types/src/Checkbox/Checkbox.d.ts +1 -1
- package/dist/types/src/Checkbox/CheckboxGroup.d.ts +3 -3
- package/dist/types/src/Checkbox/CheckboxGroupReducer.d.ts +1 -1
- package/dist/types/src/Checkbox/types.d.ts +2 -2
- package/dist/types/src/Chip/Chip.d.ts +2 -2
- package/dist/types/src/Content/Content.d.ts +2 -2
- package/dist/types/src/ContentOverlay/ContentOverlay.d.ts +1 -1
- package/dist/types/src/ContentOverlay/hooks/useViewLayoutHeight.d.ts +1 -1
- package/dist/types/src/ContentOverlay/types.d.ts +2 -2
- package/dist/types/src/EmptyState/EmptyState.d.ts +1 -1
- package/dist/types/src/ErrorMessageWrapper/ErrorMessageWrapper.d.ts +1 -1
- package/dist/types/src/ErrorMessageWrapper/context/ErrorMessageContext.d.ts +1 -1
- package/dist/types/src/ErrorMessageWrapper/context/ErrorMessageProvider.d.ts +1 -1
- package/dist/types/src/ErrorMessageWrapper/context/types.d.ts +2 -2
- package/dist/types/src/Flex/Flex.d.ts +2 -2
- package/dist/types/src/Flex/Flex.styles.d.ts +2 -2
- package/dist/types/src/Flex/types.d.ts +1 -1
- package/dist/types/src/Form/Form.d.ts +2 -2
- package/dist/types/src/Form/components/FormActionBar/FormActionBar.d.ts +1 -1
- package/dist/types/src/Form/components/FormBody/FormBody.d.ts +1 -1
- package/dist/types/src/Form/components/FormCache/FormCache.d.ts +1 -1
- package/dist/types/src/Form/components/FormErrorBanner/FormErrorBanner.d.ts +1 -1
- package/dist/types/src/Form/components/FormMessage/FormMessage.d.ts +1 -1
- package/dist/types/src/Form/components/FormMessage/components/InternalFormMessage/InternalFormMessage.d.ts +1 -1
- package/dist/types/src/Form/components/FormMessageBanner/FormMessageBanner.d.ts +1 -1
- package/dist/types/src/Form/components/FormSaveButton/FormSaveButton.d.ts +1 -1
- package/dist/types/src/Form/context/AtlantisFormContext.d.ts +1 -1
- package/dist/types/src/Form/context/types.d.ts +2 -2
- package/dist/types/src/Form/hooks/useFormViewRefs.d.ts +3 -3
- package/dist/types/src/Form/hooks/useInternalForm.d.ts +4 -4
- package/dist/types/src/Form/hooks/useScreenInformation.d.ts +1 -1
- package/dist/types/src/Form/hooks/useScrollToError/useScrollToError.d.ts +2 -2
- package/dist/types/src/Form/types.d.ts +4 -4
- package/dist/types/src/FormField/FormField.d.ts +1 -1
- package/dist/types/src/FormatFile/FormatFile.d.ts +2 -2
- package/dist/types/src/FormatFile/components/FileView/FileView.d.ts +1 -1
- package/dist/types/src/FormatFile/components/FormatFileBottomSheet/FormatFileBottomSheet.d.ts +2 -2
- package/dist/types/src/FormatFile/components/MediaView/MediaView.d.ts +1 -1
- package/dist/types/src/FormatFile/components/_mocks/mockFiles.d.ts +2 -1
- package/dist/types/src/FormatFile/context/FormatFileContext.d.ts +1 -1
- package/dist/types/src/FormatFile/context/types.d.ts +1 -1
- package/dist/types/src/FormatFile/index.d.ts +2 -1
- package/dist/types/src/FormatFile/utils/computeA11yLabel.d.ts +1 -1
- package/dist/types/src/FormatFile/utils/createUseCreateThumbnail.d.ts +2 -2
- package/dist/types/src/Heading/Heading.d.ts +1 -1
- package/dist/types/src/Icon/Icon.d.ts +1 -1
- package/dist/types/src/IconButton/IconButton.d.ts +1 -1
- package/dist/types/src/InputCurrency/InputCurrency.d.ts +3 -3
- package/dist/types/src/InputDate/InputDate.d.ts +4 -4
- package/dist/types/src/InputDate/index.d.ts +2 -1
- package/dist/types/src/InputEmail/InputEmail.d.ts +1 -1
- package/dist/types/src/InputFieldWrapper/CommonInputStyles.style.d.ts +2 -2
- package/dist/types/src/InputFieldWrapper/InputFieldWrapper.d.ts +3 -3
- package/dist/types/src/InputFieldWrapper/components/Prefix/Prefix.d.ts +2 -2
- package/dist/types/src/InputFieldWrapper/components/Suffix/Suffix.d.ts +2 -2
- package/dist/types/src/InputNumber/InputNumber.d.ts +1 -1
- package/dist/types/src/InputPassword/InputPassword.d.ts +1 -1
- package/dist/types/src/InputPressable/InputPressable.d.ts +6 -5
- package/dist/types/src/InputSearch/InputSearch.d.ts +1 -1
- package/dist/types/src/InputText/InputText.d.ts +8 -6
- package/dist/types/src/InputText/context/InputAccessoriesContext.d.ts +1 -1
- package/dist/types/src/InputText/context/InputAccessoriesProvider.d.ts +1 -1
- package/dist/types/src/InputTime/InputTime.d.ts +4 -4
- package/dist/types/src/Menu/Menu.d.ts +1 -1
- package/dist/types/src/Menu/components/MenuOption/MenuOption.d.ts +1 -1
- package/dist/types/src/Menu/components/Overlay/Overlay.d.ts +1 -1
- package/dist/types/src/Menu/types.d.ts +2 -2
- package/dist/types/src/Menu/utils.d.ts +2 -2
- package/dist/types/src/ProgressBar/ProgressBar.d.ts +1 -1
- package/dist/types/src/ProgressBar/types.d.ts +1 -1
- package/dist/types/src/Select/Select.d.ts +2 -2
- package/dist/types/src/Select/components/SelectDefaultPicker/SelectDefaultPicker.d.ts +1 -1
- package/dist/types/src/Select/components/SelectDefaultPicker/SelectDefaultPicker.ios.d.ts +1 -1
- package/dist/types/src/Select/components/SelectIOSPicker/SelectIOSPicker.d.ts +2 -2
- package/dist/types/src/Select/components/SelectInternalPicker/SelectInternalPicker.d.ts +1 -1
- package/dist/types/src/Select/components/SelectInternalPicker/utils.d.ts +1 -1
- package/dist/types/src/Select/components/SelectPressable/SelectPressable.d.ts +2 -2
- package/dist/types/src/Select/index.d.ts +2 -1
- package/dist/types/src/Select/types.d.ts +1 -1
- package/dist/types/src/Switch/Switch.d.ts +2 -2
- package/dist/types/src/Switch/index.d.ts +2 -1
- package/dist/types/src/Text/Text.d.ts +2 -2
- package/dist/types/src/Text/index.d.ts +2 -1
- package/dist/types/src/TextList/TextList.d.ts +2 -2
- package/dist/types/src/ThumbnailList/ThumbnailList.d.ts +2 -2
- package/dist/types/src/ThumbnailList/types.d.ts +1 -1
- package/dist/types/src/Toast/Toast.d.ts +1 -1
- package/dist/types/src/Typography/Typography.d.ts +1 -1
- package/dist/types/src/Typography/Typography.style.d.ts +2 -2
- package/dist/types/src/Typography/TypographyGestureDetector.d.ts +1 -1
- package/dist/types/src/Typography/webFonts.d.ts +1 -1
- package/dist/types/src/hooks/useFormController.d.ts +1 -1
- package/dist/types/src/utils/test/MockSafeAreaProvider.d.ts +1 -1
- package/package.json +2 -2
- package/src/ActionItem/ActionItem.tsx +3 -2
- package/src/ActionItem/ActionItemGroup.tsx +3 -2
- package/src/ActionItem/components/ActionItemContainer.tsx +2 -1
- package/src/ActionItem/index.ts +2 -1
- package/src/ActionLabel/ActionLabel.test.tsx +3 -2
- package/src/ActionLabel/ActionLabel.tsx +2 -1
- package/src/ActionLabel/index.ts +2 -1
- package/src/ActivityIndicator/ActivityIndicator.tsx +2 -1
- package/src/AtlantisContext/AtlantisContext.test.tsx +3 -2
- package/src/AtlantisThemeContext/AtlantisThemeContext.test.tsx +1 -1
- package/src/AtlantisThemeContext/AtlantisThemeContext.tsx +1 -1
- package/src/AtlantisThemeContext/buildThemedStyles.ts +1 -1
- package/src/AtlantisThemeContext/index.ts +1 -1
- package/src/AtlantisThemeContext/types.ts +1 -1
- package/src/AutoLink/AutoLink.tsx +1 -1
- package/src/AutoLink/clipboard.ts +2 -1
- package/src/AutoLink/components/ComposeTextWithLinks/ComposeTextWithLinks.tsx +1 -1
- package/src/AutoLink/hooks/useCreateLinkedText.ts +2 -1
- package/src/AutoLink/types.ts +2 -2
- package/src/AutoLink/utils.ts +2 -2
- package/src/Banner/Banner.tsx +4 -3
- package/src/Banner/components/BannerIcon/BannerIcon.tsx +2 -2
- package/src/Banner/types.ts +3 -3
- package/src/BottomSheet/BottomSheet.test.tsx +1 -1
- package/src/BottomSheet/BottomSheet.tsx +2 -1
- package/src/BottomSheet/components/BottomSheetOption/BottomSheetOption.tsx +2 -2
- package/src/BottomSheet/components/BottomSheetOption/index.ts +2 -1
- package/src/Button/Button.test.tsx +6 -4
- package/src/Button/Button.tsx +7 -5
- package/src/Button/components/InternalButtonLoading/InternalButtonLoading.test.tsx +1 -1
- package/src/Button/components/InternalButtonLoading/InternalButtonLoading.tsx +1 -1
- package/src/ButtonGroup/ButtonGroup.test.tsx +2 -1
- package/src/ButtonGroup/ButtonGroup.tsx +2 -2
- package/src/ButtonGroup/ButtonGroupAction.tsx +2 -2
- package/src/ButtonGroup/components/SecondaryActionSheet/SecondaryActionSheet.tsx +5 -3
- package/src/ButtonGroup/types.ts +2 -2
- package/src/ButtonGroup/utils.ts +3 -6
- package/src/Card/Card.tsx +6 -6
- package/src/Card/components/InternalCardHeader.tsx +2 -1
- package/src/Checkbox/Checkbox.tsx +3 -2
- package/src/Checkbox/CheckboxGroup.test.tsx +3 -7
- package/src/Checkbox/CheckboxGroup.tsx +4 -3
- package/src/Checkbox/CheckboxGroupReducer.test.ts +1 -1
- package/src/Checkbox/CheckboxGroupReducer.ts +4 -1
- package/src/Checkbox/types.ts +2 -2
- package/src/Chip/Chip.tsx +3 -2
- package/src/Content/Content.test.tsx +3 -2
- package/src/Content/Content.tsx +4 -2
- package/src/ContentOverlay/ContentOverlay.test.tsx +4 -6
- package/src/ContentOverlay/ContentOverlay.tsx +3 -4
- package/src/ContentOverlay/hooks/useKeyboardVisibility.test.ts +2 -1
- package/src/ContentOverlay/hooks/useKeyboardVisibility.ts +2 -1
- package/src/ContentOverlay/hooks/useViewLayoutHeight.test.ts +1 -1
- package/src/ContentOverlay/hooks/useViewLayoutHeight.ts +1 -1
- package/src/ContentOverlay/types.ts +2 -2
- package/src/Disclosure/Disclosure.test.tsx +1 -1
- package/src/Disclosure/Disclosure.tsx +2 -1
- package/src/EmptyState/EmptyState.test.tsx +2 -1
- package/src/EmptyState/EmptyState.tsx +3 -2
- package/src/ErrorMessageWrapper/ErrorMessageWrapper.tsx +4 -2
- package/src/ErrorMessageWrapper/context/ErrorMessageContext.tsx +1 -1
- package/src/ErrorMessageWrapper/context/ErrorMessageProvider.tsx +5 -8
- package/src/ErrorMessageWrapper/context/types.ts +2 -2
- package/src/Flex/Flex.styles.tsx +4 -2
- package/src/Flex/Flex.test.tsx +4 -3
- package/src/Flex/Flex.tsx +3 -2
- package/src/Flex/types.ts +1 -1
- package/src/Form/Form.test.tsx +4 -2
- package/src/Form/Form.tsx +6 -10
- package/src/Form/components/FormActionBar/FormActionBar.tsx +3 -2
- package/src/Form/components/FormBody/FormBody.tsx +2 -1
- package/src/Form/components/FormCache/FormCache.tsx +2 -1
- package/src/Form/components/FormErrorBanner/FormErrorBanner.tsx +1 -1
- package/src/Form/components/FormMessage/FormMessage.tsx +1 -1
- package/src/Form/components/FormMessage/components/InternalFormMessage/InternalFormMessage.tsx +2 -1
- package/src/Form/components/FormMessageBanner/FormMessageBanner.tsx +4 -2
- package/src/Form/components/FormSaveButton/FormSaveButton.test.tsx +1 -1
- package/src/Form/components/FormSaveButton/FormSaveButton.tsx +3 -5
- package/src/Form/context/AtlantisFormContext.test.tsx +3 -2
- package/src/Form/context/AtlantisFormContext.tsx +1 -1
- package/src/Form/context/types.ts +2 -2
- package/src/Form/hooks/useFormViewRefs.ts +4 -3
- package/src/Form/hooks/useInternalForm.ts +5 -5
- package/src/Form/hooks/useScreenInformation.ts +2 -1
- package/src/Form/hooks/useScrollToError/useScrollToError.ts +9 -7
- package/src/Form/types.ts +4 -4
- package/src/FormField/FormField.tsx +1 -1
- package/src/FormatFile/FormatFile.test.tsx +7 -4
- package/src/FormatFile/FormatFile.tsx +5 -12
- package/src/FormatFile/components/FileView/FileView.tsx +3 -2
- package/src/FormatFile/components/FormatFileBottomSheet/FormatFileBottomSheet.test.tsx +5 -6
- package/src/FormatFile/components/FormatFileBottomSheet/FormatFileBottomSheet.tsx +4 -2
- package/src/FormatFile/components/MediaView/MediaView.tsx +2 -1
- package/src/FormatFile/components/_mocks/mockFiles.ts +2 -1
- package/src/FormatFile/context/FormatFileContext.ts +1 -1
- package/src/FormatFile/context/types.ts +1 -1
- package/src/FormatFile/index.ts +2 -1
- package/src/FormatFile/utils/computeA11yLabel.ts +1 -1
- package/src/FormatFile/utils/createUseCreateThumbnail.ts +2 -2
- package/src/Glimmer/Glimmer.tsx +2 -1
- package/src/Heading/Heading.tsx +2 -2
- package/src/Icon/Icon.tsx +2 -1
- package/src/IconButton/IconButton.tsx +1 -1
- package/src/InputCurrency/InputCurrency.test.tsx +1 -1
- package/src/InputCurrency/InputCurrency.tsx +5 -3
- package/src/InputDate/InputDate.tsx +4 -4
- package/src/InputDate/index.ts +2 -1
- package/src/InputEmail/InputEmail.tsx +4 -2
- package/src/InputFieldWrapper/CommonInputStyles.style.ts +4 -5
- package/src/InputFieldWrapper/InputFieldWrapper.test.tsx +6 -12
- package/src/InputFieldWrapper/InputFieldWrapper.tsx +6 -10
- package/src/InputFieldWrapper/components/Prefix/Prefix.test.tsx +3 -4
- package/src/InputFieldWrapper/components/Prefix/Prefix.tsx +3 -8
- package/src/InputFieldWrapper/components/Suffix/Suffix.test.tsx +3 -7
- package/src/InputFieldWrapper/components/Suffix/Suffix.tsx +3 -8
- package/src/InputNumber/InputNumber.tsx +4 -2
- package/src/InputPassword/InputPassword.test.tsx +1 -1
- package/src/InputPassword/InputPassword.tsx +5 -3
- package/src/InputPressable/InputPressable.test.tsx +1 -1
- package/src/InputPressable/InputPressable.tsx +7 -5
- package/src/InputSearch/InputSearch.tsx +4 -2
- package/src/InputText/InputText.test.tsx +7 -8
- package/src/InputText/InputText.tsx +8 -9
- package/src/InputText/context/InputAccessoriesContext.ts +1 -1
- package/src/InputText/context/InputAccessoriesProvider.tsx +2 -1
- package/src/InputTime/InputTime.tsx +4 -4
- package/src/InputTime/utils/utils.test.ts +2 -5
- package/src/Menu/Menu.test.tsx +2 -1
- package/src/Menu/Menu.tsx +2 -2
- package/src/Menu/components/MenuOption/MenuOption.tsx +1 -1
- package/src/Menu/components/Overlay/Overlay.tsx +1 -1
- package/src/Menu/types.ts +2 -2
- package/src/Menu/utils.ts +2 -2
- package/src/ProgressBar/ProgressBar.test.tsx +2 -1
- package/src/ProgressBar/ProgressBar.tsx +1 -1
- package/src/ProgressBar/types.ts +1 -1
- package/src/Select/Select.test.tsx +2 -1
- package/src/Select/Select.tsx +4 -3
- package/src/Select/components/SelectDefaultPicker/SelectDefaultPicker.ios.tsx +1 -1
- package/src/Select/components/SelectDefaultPicker/SelectDefaultPicker.tsx +1 -1
- package/src/Select/components/SelectIOSPicker/SelectIOSPicker.tsx +3 -2
- package/src/Select/components/SelectInternalPicker/SelectInternalPicker.test.tsx +3 -2
- package/src/Select/components/SelectInternalPicker/SelectInternalPicker.tsx +1 -1
- package/src/Select/components/SelectInternalPicker/utils.ts +1 -1
- package/src/Select/components/SelectPressable/SelectPressable.tsx +3 -2
- package/src/Select/index.ts +2 -1
- package/src/Select/types.ts +1 -1
- package/src/Switch/Switch.test.tsx +1 -1
- package/src/Switch/Switch.tsx +3 -2
- package/src/Switch/index.ts +2 -1
- package/src/Text/Text.tsx +3 -3
- package/src/Text/index.ts +2 -1
- package/src/TextList/TextList.tsx +4 -2
- package/src/ThumbnailList/ThumbnailList.test.tsx +1 -1
- package/src/ThumbnailList/ThumbnailList.tsx +4 -2
- package/src/ThumbnailList/types.ts +1 -1
- package/src/Toast/Toast.tsx +2 -1
- package/src/Typography/Typography.style.ts +4 -5
- package/src/Typography/Typography.tsx +2 -4
- package/src/Typography/TypographyGestureDetector.tsx +2 -1
- package/src/Typography/webFonts.ts +1 -1
- package/src/hooks/useFormController.ts +2 -4
- package/src/utils/test/MockSafeAreaProvider.tsx +2 -5
package/src/Form/Form.test.tsx
CHANGED
|
@@ -2,8 +2,10 @@ import React from "react";
|
|
|
2
2
|
import { act, fireEvent, render, waitFor } from "@testing-library/react-native";
|
|
3
3
|
import { Alert, Keyboard } from "react-native";
|
|
4
4
|
import { Host } from "react-native-portalize";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import type { FormBannerMessage } from ".";
|
|
6
|
+
import { Form, FormBannerMessageType } from ".";
|
|
7
|
+
import type { FormBannerErrors } from "./types";
|
|
8
|
+
import { FormSubmitErrorType } from "./types";
|
|
7
9
|
import { atlantisContextDefaultValues } from "../AtlantisContext";
|
|
8
10
|
import * as atlantisContext from "../AtlantisContext/AtlantisContext";
|
|
9
11
|
import { Text } from "../Text";
|
package/src/Form/Form.tsx
CHANGED
|
@@ -1,24 +1,20 @@
|
|
|
1
1
|
import React, { useState } from "react";
|
|
2
|
-
import { FieldValues
|
|
2
|
+
import type { FieldValues } from "react-hook-form";
|
|
3
|
+
import { FormProvider } from "react-hook-form";
|
|
3
4
|
import { KeyboardAwareScrollView } from "react-native-keyboard-aware-scroll-view";
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
LayoutChangeEvent,
|
|
7
|
-
Platform,
|
|
8
|
-
View,
|
|
9
|
-
findNodeHandle,
|
|
10
|
-
} from "react-native";
|
|
5
|
+
import type { LayoutChangeEvent } from "react-native";
|
|
6
|
+
import { Keyboard, Platform, View, findNodeHandle } from "react-native";
|
|
11
7
|
import { useStyles } from "./Form.style";
|
|
12
8
|
import { FormErrorBanner } from "./components/FormErrorBanner";
|
|
13
9
|
import { KEYBOARD_SAVE_BUTTON_DISTANCE } from "./constants";
|
|
14
10
|
import { FormMessageBanner } from "./components/FormMessageBanner";
|
|
15
|
-
import {
|
|
11
|
+
import type {
|
|
16
12
|
FormErrors,
|
|
17
13
|
FormProps,
|
|
18
|
-
FormSubmitErrorType,
|
|
19
14
|
FormValues,
|
|
20
15
|
InternalFormProps,
|
|
21
16
|
} from "./types";
|
|
17
|
+
import { FormSubmitErrorType } from "./types";
|
|
22
18
|
import { FormMask } from "./components/FormMask";
|
|
23
19
|
import { useInternalForm } from "./hooks/useInternalForm";
|
|
24
20
|
import { useFormViewRefs } from "./hooks/useFormViewRefs";
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { LayoutChangeEvent
|
|
2
|
+
import type { LayoutChangeEvent } from "react-native";
|
|
3
|
+
import { StyleSheet } from "react-native";
|
|
3
4
|
import Reanimated from "react-native-reanimated";
|
|
4
5
|
import { useStyles } from "./FormActionBar.style";
|
|
5
|
-
import { SecondaryActionProp } from "../../types";
|
|
6
|
+
import type { SecondaryActionProp } from "../../types";
|
|
6
7
|
import { FormSaveButton } from "../FormSaveButton";
|
|
7
8
|
|
|
8
9
|
const ReanimatedView = Reanimated.View;
|
|
@@ -2,7 +2,8 @@ import React, { useMemo } from "react";
|
|
|
2
2
|
import { View } from "react-native";
|
|
3
3
|
import { useStyles } from "./FormBody.style";
|
|
4
4
|
import { useScreenInformation } from "../../hooks/useScreenInformation";
|
|
5
|
-
import {
|
|
5
|
+
import type { FormActionBarProps } from "../FormActionBar";
|
|
6
|
+
import { FormActionBar } from "../FormActionBar";
|
|
6
7
|
import { tokens } from "../../../utils/design";
|
|
7
8
|
|
|
8
9
|
interface FormBodyProps extends FormActionBarProps {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React, { useEffect, useMemo } from "react";
|
|
2
|
-
import { FieldValues
|
|
2
|
+
import type { FieldValues } from "react-hook-form";
|
|
3
|
+
import { useFormContext, useWatch } from "react-hook-form";
|
|
3
4
|
import omit from "lodash/omit";
|
|
4
5
|
|
|
5
6
|
interface FormCacheProps<T extends FieldValues> {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { useCallback, useState } from "react";
|
|
2
2
|
import { InternalFormMessage } from "./components/InternalFormMessage";
|
|
3
|
-
import { EmptyStateProps } from "../../../EmptyState";
|
|
3
|
+
import type { EmptyStateProps } from "../../../EmptyState";
|
|
4
4
|
|
|
5
5
|
type FormMessageData = EmptyStateProps;
|
|
6
6
|
|
package/src/Form/components/FormMessage/components/InternalFormMessage/InternalFormMessage.tsx
CHANGED
|
@@ -3,7 +3,8 @@ import { SafeAreaView } from "react-native-safe-area-context";
|
|
|
3
3
|
import { Modal, StatusBar, View } from "react-native";
|
|
4
4
|
import { ScrollView } from "react-native-gesture-handler";
|
|
5
5
|
import { useStyles } from "./InternalFormMessage.style";
|
|
6
|
-
import {
|
|
6
|
+
import type { EmptyStateProps } from "../../../../../EmptyState";
|
|
7
|
+
import { EmptyState } from "../../../../../EmptyState";
|
|
7
8
|
import { useAtlantisI18n } from "../../../../../hooks/useAtlantisI18n";
|
|
8
9
|
|
|
9
10
|
interface FormMessageProps {
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { FormBannerMessage
|
|
3
|
-
import {
|
|
2
|
+
import type { FormBannerMessage } from "../../types";
|
|
3
|
+
import { FormBannerMessageType } from "../../types";
|
|
4
|
+
import type { BannerTypes } from "../../../Banner";
|
|
5
|
+
import { Banner } from "../../../Banner";
|
|
4
6
|
|
|
5
7
|
interface FormMessageBannerProps {
|
|
6
8
|
readonly bannerMessages?: FormBannerMessage[];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { fireEvent, render, waitFor } from "@testing-library/react-native";
|
|
3
3
|
import { Host } from "react-native-portalize";
|
|
4
|
-
import { IconNames } from "@jobber/design";
|
|
4
|
+
import type { IconNames } from "@jobber/design";
|
|
5
5
|
import { FormSaveButton } from "./FormSaveButton";
|
|
6
6
|
|
|
7
7
|
interface TestSecondaryActionProp {
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { useFormContext } from "react-hook-form";
|
|
3
|
-
import { FormSaveButtonProps, SecondaryActionProp } from "../../types";
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
ButtonGroupSecondaryActionProps,
|
|
7
|
-
} from "../../../ButtonGroup";
|
|
3
|
+
import type { FormSaveButtonProps, SecondaryActionProp } from "../../types";
|
|
4
|
+
import type { ButtonGroupSecondaryActionProps } from "../../../ButtonGroup";
|
|
5
|
+
import { ButtonGroup } from "../../../ButtonGroup";
|
|
8
6
|
import { useAtlantisI18n } from "../../../hooks/useAtlantisI18n";
|
|
9
7
|
|
|
10
8
|
export function FormSaveButton({
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type { PropsWithChildren } from "react";
|
|
2
|
+
import React from "react";
|
|
2
3
|
import { renderHook } from "@testing-library/react-hooks";
|
|
3
|
-
import { AtlantisFormContextProps } from "./types";
|
|
4
|
+
import type { AtlantisFormContextProps } from "./types";
|
|
4
5
|
import {
|
|
5
6
|
AtlantisFormContext,
|
|
6
7
|
atlantisFormContextDefaultValues,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { MutableRefObject } from "react";
|
|
2
|
-
import { FieldValues, UseFormReturn } from "react-hook-form";
|
|
1
|
+
import type { MutableRefObject } from "react";
|
|
2
|
+
import type { FieldValues, UseFormReturn } from "react-hook-form";
|
|
3
3
|
|
|
4
4
|
export interface UseConfirmBeforeBackProps {
|
|
5
5
|
alwaysPreventBack: boolean;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { RefObject
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import type { RefObject } from "react";
|
|
2
|
+
import { useCallback, useRef } from "react";
|
|
3
|
+
import type { View } from "react-native";
|
|
4
|
+
import type { KeyboardAwareScrollView } from "react-native-keyboard-aware-scroll-view";
|
|
4
5
|
|
|
5
6
|
interface UseFormViewRefsReturn {
|
|
6
7
|
readonly scrollViewRef: RefObject<KeyboardAwareScrollView>;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type {
|
|
2
2
|
FieldValues,
|
|
3
3
|
UseFormHandleSubmit,
|
|
4
4
|
UseFormReturn,
|
|
5
|
-
useForm,
|
|
6
5
|
} from "react-hook-form";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
6
|
+
import { useForm } from "react-hook-form";
|
|
7
|
+
import type { MutableRefObject, RefObject } from "react";
|
|
8
|
+
import type { KeyboardAwareScrollView } from "react-native-keyboard-aware-scroll-view";
|
|
9
9
|
import { useAtlantisContext } from "../../AtlantisContext";
|
|
10
10
|
import { useAtlantisFormContext } from "../context/AtlantisFormContext";
|
|
11
|
-
import { InternalFormProps } from "../types";
|
|
11
|
+
import type { InternalFormProps } from "../types";
|
|
12
12
|
|
|
13
13
|
type UseInternalFormProps<T extends FieldValues, SubmitResponseType> = Pick<
|
|
14
14
|
InternalFormProps<T, SubmitResponseType>,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { useWindowDimensions } from "react-native";
|
|
2
|
-
import { EdgeInsets
|
|
2
|
+
import type { EdgeInsets } from "react-native-safe-area-context";
|
|
3
|
+
import { useSafeAreaInsets } from "react-native-safe-area-context";
|
|
3
4
|
import { KEYBOARD_TOP_PADDING_AUTO_SCROLL } from "../constants";
|
|
4
5
|
import { useAtlantisContext } from "../../AtlantisContext";
|
|
5
6
|
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { useCallback, useState } from "react";
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
} from "react-native";
|
|
2
|
+
import type {
|
|
3
|
+
FieldValues,
|
|
4
|
+
FormState,
|
|
5
|
+
Path,
|
|
6
|
+
UseFormSetFocus,
|
|
7
|
+
} from "react-hook-form";
|
|
8
|
+
import type { KeyboardAwareScrollView } from "react-native-keyboard-aware-scroll-view";
|
|
9
|
+
import type { MeasureInWindowOnSuccessCallback } from "react-native";
|
|
10
|
+
import { Keyboard, Platform } from "react-native";
|
|
9
11
|
import { useIsScreenReaderEnabled } from "../../../hooks";
|
|
10
12
|
import { useErrorMessageContext } from "../../../ErrorMessageWrapper";
|
|
11
13
|
|
package/src/Form/types.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { MutableRefObject, RefObject } from "react";
|
|
2
|
-
import {
|
|
1
|
+
import type { MutableRefObject, RefObject } from "react";
|
|
2
|
+
import type {
|
|
3
3
|
ControllerProps,
|
|
4
4
|
DeepPartial,
|
|
5
5
|
FieldPath,
|
|
@@ -8,8 +8,8 @@ import {
|
|
|
8
8
|
UnpackNestedValue,
|
|
9
9
|
UseFormReturn,
|
|
10
10
|
} from "react-hook-form";
|
|
11
|
-
import { IconNames } from "@jobber/design";
|
|
12
|
-
import { KeyboardAwareScrollView } from "react-native-keyboard-aware-scroll-view";
|
|
11
|
+
import type { IconNames } from "@jobber/design";
|
|
12
|
+
import type { KeyboardAwareScrollView } from "react-native-keyboard-aware-scroll-view";
|
|
13
13
|
|
|
14
14
|
export type FormValues<T> = UnpackNestedValue<T>;
|
|
15
15
|
export type FormErrors = FormNetworkErrors | FormUserErrors;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { RenderAPI
|
|
2
|
+
import type { RenderAPI } from "@testing-library/react-native";
|
|
3
|
+
import { fireEvent, render } from "@testing-library/react-native";
|
|
3
4
|
import { Host } from "react-native-portalize";
|
|
4
5
|
import { Alert } from "react-native";
|
|
5
|
-
import { File
|
|
6
|
+
import type { File } from ".";
|
|
7
|
+
import { FormatFile } from ".";
|
|
6
8
|
import {
|
|
7
9
|
FILE_MOCK_FILE,
|
|
8
10
|
FILE_MOCK_IMAGE,
|
|
@@ -12,8 +14,9 @@ import {
|
|
|
12
14
|
FILE_UPLOAD_MOCK_IMAGE,
|
|
13
15
|
FILE_UPLOAD_MOCK_PDF,
|
|
14
16
|
} from "./components/_mocks/mockFiles";
|
|
15
|
-
import { BottomSheetOptionsSuffix } from "./components/FormatFileBottomSheet";
|
|
16
|
-
import { FileUpload
|
|
17
|
+
import type { BottomSheetOptionsSuffix } from "./components/FormatFileBottomSheet";
|
|
18
|
+
import type { FileUpload } from "./types";
|
|
19
|
+
import { StatusCode } from "./types";
|
|
17
20
|
import { tokens } from "../utils/design";
|
|
18
21
|
|
|
19
22
|
let Platform: { OS: "ios" | "android" };
|
|
@@ -2,22 +2,15 @@ import React, { createRef, useCallback, useState } from "react";
|
|
|
2
2
|
import { TouchableOpacity, View } from "react-native";
|
|
3
3
|
import { useStyles } from "./FormatFile.style";
|
|
4
4
|
import { MediaView } from "./components/MediaView";
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
FormatFileBottomSheet,
|
|
8
|
-
} from "./components/FormatFileBottomSheet";
|
|
5
|
+
import type { BottomSheetOptionsSuffix } from "./components/FormatFileBottomSheet";
|
|
6
|
+
import { FormatFileBottomSheet } from "./components/FormatFileBottomSheet";
|
|
9
7
|
import { FileView } from "./components/FileView";
|
|
10
8
|
import { acceptedExtensions, videoExtensions } from "./constants";
|
|
11
|
-
import {
|
|
12
|
-
|
|
13
|
-
File,
|
|
14
|
-
FileUpload,
|
|
15
|
-
FormattedFile,
|
|
16
|
-
StatusCode,
|
|
17
|
-
} from "./types";
|
|
9
|
+
import type { CreateThumbnail, File, FileUpload, FormattedFile } from "./types";
|
|
10
|
+
import { StatusCode } from "./types";
|
|
18
11
|
import { AtlantisFormatFileContext } from "./context/FormatFileContext";
|
|
19
12
|
import { createUseCreateThumbnail } from "./utils/createUseCreateThumbnail";
|
|
20
|
-
import { BottomSheetRef } from "../BottomSheet/BottomSheet";
|
|
13
|
+
import type { BottomSheetRef } from "../BottomSheet/BottomSheet";
|
|
21
14
|
import { useAtlantisI18n } from "../hooks/useAtlantisI18n";
|
|
22
15
|
|
|
23
16
|
export interface FormatFileProps<T> {
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { View } from "react-native";
|
|
3
|
-
import { IconNames } from "@jobber/design";
|
|
3
|
+
import type { IconNames } from "@jobber/design";
|
|
4
4
|
import { useStyles } from "./FileView.style";
|
|
5
5
|
import { Icon } from "../../../Icon";
|
|
6
6
|
import { Text } from "../../../Text";
|
|
7
|
-
import { FormattedFile
|
|
7
|
+
import type { FormattedFile } from "../../types";
|
|
8
|
+
import { StatusCode } from "../../types";
|
|
8
9
|
import { computeA11yLabel } from "../../utils";
|
|
9
10
|
import { ProgressBar } from "../ProgressBar";
|
|
10
11
|
import { ErrorIcon } from "../ErrorIcon";
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import React, { createRef } from "react";
|
|
2
|
-
import { RenderAPI
|
|
2
|
+
import type { RenderAPI } from "@testing-library/react-native";
|
|
3
|
+
import { fireEvent, render } from "@testing-library/react-native";
|
|
3
4
|
import { Host } from "react-native-portalize";
|
|
4
5
|
import { act } from "react-test-renderer";
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
} from "./FormatFileBottomSheet";
|
|
9
|
-
import { BottomSheetRef } from "../../../BottomSheet/BottomSheet";
|
|
6
|
+
import type { BottomSheetOptionsSuffix } from "./FormatFileBottomSheet";
|
|
7
|
+
import { FormatFileBottomSheet } from "./FormatFileBottomSheet";
|
|
8
|
+
import type { BottomSheetRef } from "../../../BottomSheet/BottomSheet";
|
|
10
9
|
|
|
11
10
|
let Platform: { OS: "ios" | "android" };
|
|
12
11
|
const onRemove = jest.fn();
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type { RefObject } from "react";
|
|
2
|
+
import React from "react";
|
|
2
3
|
import { Portal } from "react-native-portalize";
|
|
3
|
-
import {
|
|
4
|
+
import type { BottomSheetRef } from "../../../BottomSheet/BottomSheet";
|
|
5
|
+
import { BottomSheet } from "../../../BottomSheet/BottomSheet";
|
|
4
6
|
import { BottomSheetOption } from "../../../BottomSheet/components/BottomSheetOption";
|
|
5
7
|
import { useAtlantisI18n } from "../../../hooks/useAtlantisI18n";
|
|
6
8
|
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import React, { useState } from "react";
|
|
2
2
|
import { ImageBackground, View } from "react-native";
|
|
3
3
|
import { useStyles } from "./MediaView.style";
|
|
4
|
-
import { FormattedFile
|
|
4
|
+
import type { FormattedFile } from "../../types";
|
|
5
|
+
import { StatusCode } from "../../types";
|
|
5
6
|
import { computeA11yLabel } from "../../utils";
|
|
6
7
|
import { ActivityIndicator } from "../../../ActivityIndicator";
|
|
7
8
|
import { Icon } from "../../../Icon";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createContext, useContext } from "react";
|
|
2
|
-
import { AtlantisFormatFileContextProps } from "./types";
|
|
2
|
+
import type { AtlantisFormatFileContextProps } from "./types";
|
|
3
3
|
|
|
4
4
|
export const formatFileContextDefaultValues = {
|
|
5
5
|
useCreateThumbnail: () => ({ thumbnail: undefined, error: false }),
|
package/src/FormatFile/index.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useIsMounted } from "@jobber/hooks/useIsMounted";
|
|
2
2
|
import { useCallback, useEffect, useState } from "react";
|
|
3
|
-
import { UseCreateThumbnail } from "../context/types";
|
|
4
|
-
import { CreateThumbnail, FormattedFile } from "../types";
|
|
3
|
+
import type { UseCreateThumbnail } from "../context/types";
|
|
4
|
+
import type { CreateThumbnail, FormattedFile } from "../types";
|
|
5
5
|
|
|
6
6
|
export function createUseCreateThumbnail(createThumbnail: CreateThumbnail): {
|
|
7
7
|
useCreateThumbnail: UseCreateThumbnail;
|
package/src/Glimmer/Glimmer.tsx
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React, { useEffect, useRef, useState } from "react";
|
|
2
|
-
import {
|
|
2
|
+
import type { LayoutChangeEvent } from "react-native";
|
|
3
|
+
import { Animated, Easing, View } from "react-native";
|
|
3
4
|
import Svg, { Defs, LinearGradient, Rect, Stop } from "react-native-svg";
|
|
4
5
|
import { shineWidth, useStyles } from "./Glimmer.style";
|
|
5
6
|
import { useSizeStyles } from "./Glimmer.size.style";
|
package/src/Heading/Heading.tsx
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import {
|
|
2
|
+
import type {
|
|
3
3
|
FontFamily,
|
|
4
4
|
TextAlign,
|
|
5
5
|
TextColor,
|
|
6
6
|
TruncateLength,
|
|
7
|
-
Typography,
|
|
8
7
|
TypographyProps,
|
|
9
8
|
} from "../Typography";
|
|
9
|
+
import { Typography } from "../Typography";
|
|
10
10
|
import { tokens } from "../utils/design";
|
|
11
11
|
|
|
12
12
|
type HeadingStyle = Pick<
|
package/src/Icon/Icon.tsx
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import Svg, { Path } from "react-native-svg";
|
|
3
|
-
import { IconColorNames, IconNames, IconSizes
|
|
3
|
+
import type { IconColorNames, IconNames, IconSizes } from "@jobber/design";
|
|
4
|
+
import { getIcon } from "@jobber/design";
|
|
4
5
|
|
|
5
6
|
export interface IconProps {
|
|
6
7
|
/** The icon to show. */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { TouchableOpacity } from "react-native";
|
|
3
|
-
import { IconColorNames, IconNames } from "@jobber/design";
|
|
3
|
+
import type { IconColorNames, IconNames } from "@jobber/design";
|
|
4
4
|
import { useStyles } from "./IconButton.style";
|
|
5
5
|
import { Icon } from "../Icon";
|
|
6
6
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { fireEvent, render, waitFor } from "@testing-library/react-native";
|
|
3
3
|
import { InputCurrency } from "./InputCurrency";
|
|
4
|
+
import type { AtlantisContextProps } from "../AtlantisContext";
|
|
4
5
|
import {
|
|
5
6
|
AtlantisContext,
|
|
6
|
-
AtlantisContextProps,
|
|
7
7
|
atlantisContextDefaultValues,
|
|
8
8
|
} from "../AtlantisContext";
|
|
9
9
|
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import React, { useState } from "react";
|
|
2
|
-
import { FormatNumberOptions
|
|
2
|
+
import type { FormatNumberOptions } from "react-intl";
|
|
3
|
+
import { useIntl } from "react-intl";
|
|
3
4
|
import { Platform } from "react-native";
|
|
4
|
-
import { ControllerRenderProps, FieldValues } from "react-hook-form";
|
|
5
|
+
import type { ControllerRenderProps, FieldValues } from "react-hook-form";
|
|
5
6
|
import {
|
|
6
7
|
NUMBER_VALIDATION_REGEX,
|
|
7
8
|
checkLastChar,
|
|
@@ -12,7 +13,8 @@ import {
|
|
|
12
13
|
parseGivenInput,
|
|
13
14
|
} from "./utils";
|
|
14
15
|
import { useAtlantisContext } from "../AtlantisContext";
|
|
15
|
-
import {
|
|
16
|
+
import type { InputTextProps } from "../InputText";
|
|
17
|
+
import { InputText } from "../InputText";
|
|
16
18
|
import { useFormController } from "../hooks/useFormController";
|
|
17
19
|
import { useAtlantisI18n } from "../hooks/useAtlantisI18n";
|
|
18
20
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React, { useMemo, useState } from "react";
|
|
2
2
|
import DateTimePicker from "react-native-modal-datetime-picker";
|
|
3
3
|
import { Keyboard, Platform } from "react-native";
|
|
4
|
-
import { FieldError, UseControllerProps } from "react-hook-form";
|
|
5
|
-
import { XOR } from "ts-xor";
|
|
6
|
-
import { Clearable } from "@jobber/hooks";
|
|
7
|
-
import { InputFieldWrapperProps } from "../InputFieldWrapper";
|
|
4
|
+
import type { FieldError, UseControllerProps } from "react-hook-form";
|
|
5
|
+
import type { XOR } from "ts-xor";
|
|
6
|
+
import type { Clearable } from "@jobber/hooks";
|
|
7
|
+
import type { InputFieldWrapperProps } from "../InputFieldWrapper";
|
|
8
8
|
import { FormField } from "../FormField";
|
|
9
9
|
import { InputPressable } from "../InputPressable";
|
|
10
10
|
import { useAtlantisI18n } from "../hooks/useAtlantisI18n";
|
package/src/InputDate/index.ts
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export type { InputDateProps } from "./InputDate";
|
|
2
|
+
export { InputDate } from "./InputDate";
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import type { Ref } from "react";
|
|
2
|
+
import React, { forwardRef } from "react";
|
|
3
|
+
import type { InputTextProps, InputTextRef } from "../InputText";
|
|
4
|
+
import { InputText } from "../InputText";
|
|
3
5
|
|
|
4
6
|
export const InputEmail = forwardRef(InputEmailInternal);
|
|
5
7
|
type InputEmailProps = Omit<InputTextProps, "keyboard">;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
} from "../AtlantisThemeContext";
|
|
1
|
+
import type { TextStyle, ViewStyle } from "react-native";
|
|
2
|
+
import { StyleSheet } from "react-native";
|
|
3
|
+
import type { AtlantisThemeContextValue } from "../AtlantisThemeContext";
|
|
4
|
+
import { buildThemedStyles } from "../AtlantisThemeContext";
|
|
6
5
|
import { getTypographyStyles } from "../Typography";
|
|
7
6
|
import { tokens as staticTokens } from "../utils/design";
|
|
8
7
|
|
|
@@ -1,16 +1,10 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
} from "
|
|
8
|
-
import { Text, ViewStyle } from "react-native";
|
|
9
|
-
import {
|
|
10
|
-
InputFieldWrapper,
|
|
11
|
-
InputFieldWrapperProps,
|
|
12
|
-
useCommonInputStyles,
|
|
13
|
-
} from ".";
|
|
2
|
+
import type { RenderAPI } from "@testing-library/react-native";
|
|
3
|
+
import { fireEvent, render, renderHook } from "@testing-library/react-native";
|
|
4
|
+
import type { ViewStyle } from "react-native";
|
|
5
|
+
import { Text } from "react-native";
|
|
6
|
+
import type { InputFieldWrapperProps } from ".";
|
|
7
|
+
import { InputFieldWrapper, useCommonInputStyles } from ".";
|
|
14
8
|
import { useStyles } from "./InputFieldWrapper.style";
|
|
15
9
|
import {
|
|
16
10
|
INPUT_FIELD_WRAPPER_GLIMMERS_TEST_ID,
|
|
@@ -1,20 +1,16 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
View,
|
|
7
|
-
ViewStyle,
|
|
8
|
-
} from "react-native";
|
|
9
|
-
import { FieldError } from "react-hook-form";
|
|
10
|
-
import { IconNames } from "@jobber/design";
|
|
2
|
+
import type { StyleProp, TextStyle, ViewStyle } from "react-native";
|
|
3
|
+
import { Text as RNText, View } from "react-native";
|
|
4
|
+
import type { FieldError } from "react-hook-form";
|
|
5
|
+
import type { IconNames } from "@jobber/design";
|
|
11
6
|
import { useStyles } from "./InputFieldWrapper.style";
|
|
12
7
|
import { PrefixIcon, PrefixLabel } from "./components/Prefix/Prefix";
|
|
13
8
|
import { SuffixIcon, SuffixLabel } from "./components/Suffix/Suffix";
|
|
14
9
|
import { ClearAction } from "./components/ClearAction";
|
|
15
10
|
import { Glimmer } from "../Glimmer/Glimmer";
|
|
16
11
|
import { ErrorMessageWrapper } from "../ErrorMessageWrapper";
|
|
17
|
-
import { TextVariation
|
|
12
|
+
import type { TextVariation } from "../Typography";
|
|
13
|
+
import { useTypographyStyles } from "../Typography";
|
|
18
14
|
import { Text } from "../Text";
|
|
19
15
|
import { ActivityIndicator } from "../ActivityIndicator";
|
|
20
16
|
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { render, renderHook } from "@testing-library/react-native";
|
|
3
|
-
import { TextStyle } from "react-native";
|
|
4
|
-
import { ReactTestInstance } from "react-test-renderer";
|
|
3
|
+
import type { TextStyle } from "react-native";
|
|
4
|
+
import type { ReactTestInstance } from "react-test-renderer";
|
|
5
|
+
import type { PrefixIconProps, PrefixLabelProps } from "./Prefix";
|
|
5
6
|
import {
|
|
6
7
|
PrefixIcon,
|
|
7
|
-
PrefixIconProps,
|
|
8
8
|
PrefixLabel,
|
|
9
|
-
PrefixLabelProps,
|
|
10
9
|
prefixIconTestId,
|
|
11
10
|
prefixLabelTestId,
|
|
12
11
|
} from "./Prefix";
|