@jobber/components-native 0.84.1 → 0.84.2-CLEANUPus-25aa17e.18
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
|
@@ -1,12 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
TextStyle,
|
|
6
|
-
View,
|
|
7
|
-
ViewStyle,
|
|
8
|
-
} from "react-native";
|
|
9
|
-
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 { IconNames } from "@jobber/design";
|
|
10
5
|
import { Icon } from "../../../Icon";
|
|
11
6
|
import { Text } from "../../../Text";
|
|
12
7
|
import { useAtlantisTheme } from "../../../AtlantisThemeContext";
|
|
@@ -1,12 +1,8 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { render, renderHook } from "@testing-library/react-native";
|
|
3
|
-
import { TextStyle } from "react-native";
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
SuffixIconProps,
|
|
7
|
-
SuffixLabel,
|
|
8
|
-
SuffixLabelProps,
|
|
9
|
-
} from "./Suffix";
|
|
3
|
+
import type { TextStyle } from "react-native";
|
|
4
|
+
import type { SuffixIconProps, SuffixLabelProps } from "./Suffix";
|
|
5
|
+
import { SuffixIcon, SuffixLabel } from "./Suffix";
|
|
10
6
|
import { useTypographyStyles } from "../../../Typography";
|
|
11
7
|
|
|
12
8
|
const mockLabel = "$";
|
|
@@ -1,12 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
StyleProp,
|
|
6
|
-
TextStyle,
|
|
7
|
-
View,
|
|
8
|
-
} from "react-native";
|
|
9
|
-
import { IconNames } from "@jobber/design";
|
|
2
|
+
import type { StyleProp, TextStyle } from "react-native";
|
|
3
|
+
import { Pressable, Text as RNText, View } from "react-native";
|
|
4
|
+
import type { IconNames } from "@jobber/design";
|
|
10
5
|
import { Icon } from "../../../Icon";
|
|
11
6
|
import { Text } from "../../../Text";
|
|
12
7
|
import { useTypographyStyles } from "../../../Typography";
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type { Ref } from "react";
|
|
2
|
+
import React, { forwardRef, useState } from "react";
|
|
2
3
|
import { Platform } from "react-native";
|
|
3
4
|
import flow from "lodash/flow";
|
|
4
5
|
import identity from "lodash/identity";
|
|
5
|
-
import {
|
|
6
|
+
import type { InputTextProps, InputTextRef } from "../InputText";
|
|
7
|
+
import { InputText } from "../InputText";
|
|
6
8
|
import { useAtlantisI18n } from "../hooks/useAtlantisI18n";
|
|
7
9
|
|
|
8
10
|
type NumberKeyboard = "decimal-pad" | "numbers-and-punctuation";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { fireEvent, render, waitFor } from "@testing-library/react-native";
|
|
3
3
|
import { InputPassword } from "./InputPassword";
|
|
4
|
-
import { InputFieldWrapperProps } from "../InputFieldWrapper";
|
|
4
|
+
import type { InputFieldWrapperProps } from "../InputFieldWrapper";
|
|
5
5
|
|
|
6
6
|
const MockInputFieldWrapper = jest.fn();
|
|
7
7
|
jest.mock("../InputFieldWrapper", () => ({
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import type { Ref } from "react";
|
|
2
|
+
import React, { forwardRef, useState } from "react";
|
|
3
|
+
import type { IconNames } from "@jobber/design";
|
|
4
|
+
import type { InputTextProps, InputTextRef } from "../InputText";
|
|
5
|
+
import { InputText } from "../InputText";
|
|
4
6
|
import { useAtlantisI18n } from "../hooks/useAtlantisI18n";
|
|
5
7
|
|
|
6
8
|
export const InputPassword = forwardRef(InputPasswordInternal);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { fireEvent, render } from "@testing-library/react-native";
|
|
3
3
|
import { InputPressable } from ".";
|
|
4
|
-
import { InputFieldWrapperProps } from "../InputFieldWrapper";
|
|
4
|
+
import type { InputFieldWrapperProps } from "../InputFieldWrapper";
|
|
5
5
|
|
|
6
6
|
const MockInputFieldWrapper = jest.fn();
|
|
7
7
|
jest.mock("../InputFieldWrapper", () => ({
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import type { Ref } from "react";
|
|
2
|
+
import React, { forwardRef, useEffect, useState } from "react";
|
|
3
|
+
import type { IconNames } from "@jobber/design";
|
|
4
|
+
import type { FieldError } from "react-hook-form";
|
|
4
5
|
import { Text as NativeText, Pressable } from "react-native";
|
|
5
|
-
import { Clearable
|
|
6
|
-
import {
|
|
6
|
+
import type { Clearable } from "@jobber/hooks";
|
|
7
|
+
import { useShowClear } from "@jobber/hooks";
|
|
8
|
+
import type { XOR } from "ts-xor";
|
|
7
9
|
import { useStyles } from "./InputPressable.style";
|
|
8
10
|
import { InputFieldWrapper, useCommonInputStyles } from "../InputFieldWrapper";
|
|
9
11
|
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type { Ref } from "react";
|
|
2
|
+
import React, { forwardRef, useEffect } from "react";
|
|
2
3
|
import { View } from "react-native";
|
|
3
4
|
import { useDebounce } from "@jobber/hooks/useDebounce";
|
|
4
5
|
import { styles } from "./InputSearch.style";
|
|
5
|
-
import {
|
|
6
|
+
import type { InputTextProps, InputTextRef } from "../InputText";
|
|
7
|
+
import { InputText } from "../InputText";
|
|
6
8
|
|
|
7
9
|
export const InputSearch = forwardRef(SearchInputInternal);
|
|
8
10
|
|
|
@@ -1,20 +1,19 @@
|
|
|
1
1
|
import React, { useEffect } from "react";
|
|
2
|
+
import type { RenderAPI } from "@testing-library/react-native";
|
|
2
3
|
import {
|
|
3
|
-
RenderAPI,
|
|
4
4
|
fireEvent,
|
|
5
5
|
render,
|
|
6
6
|
renderHook,
|
|
7
7
|
waitFor,
|
|
8
8
|
} from "@testing-library/react-native";
|
|
9
|
-
import {
|
|
9
|
+
import type { TextStyle } from "react-native";
|
|
10
|
+
import { Platform } from "react-native";
|
|
10
11
|
import { FormProvider, useForm } from "react-hook-form";
|
|
11
|
-
import {
|
|
12
|
+
import type { InputTextProps } from "./InputText";
|
|
13
|
+
import { InputText } from "./InputText";
|
|
12
14
|
import { InputAccessoriesProvider } from "./context";
|
|
13
|
-
import {
|
|
14
|
-
|
|
15
|
-
InputFieldWrapperProps,
|
|
16
|
-
useCommonInputStyles,
|
|
17
|
-
} from "../InputFieldWrapper";
|
|
15
|
+
import type { Clearable, InputFieldWrapperProps } from "../InputFieldWrapper";
|
|
16
|
+
import { useCommonInputStyles } from "../InputFieldWrapper";
|
|
18
17
|
|
|
19
18
|
const MockInputFieldWrapper = jest.fn();
|
|
20
19
|
jest.mock("../InputFieldWrapper", () => ({
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
+
import type { Ref, SyntheticEvent } from "react";
|
|
1
2
|
import React, {
|
|
2
|
-
Ref,
|
|
3
|
-
SyntheticEvent,
|
|
4
3
|
forwardRef,
|
|
5
4
|
useEffect,
|
|
6
5
|
useImperativeHandle,
|
|
@@ -8,24 +7,24 @@ import React, {
|
|
|
8
7
|
useRef,
|
|
9
8
|
useState,
|
|
10
9
|
} from "react";
|
|
11
|
-
import {
|
|
10
|
+
import type {
|
|
12
11
|
NativeSyntheticEvent,
|
|
13
|
-
Platform,
|
|
14
12
|
ReturnKeyTypeOptions,
|
|
15
13
|
StyleProp,
|
|
16
|
-
TextInput,
|
|
17
14
|
TextInputFocusEventData,
|
|
18
15
|
TextInputProps,
|
|
19
16
|
TextStyle,
|
|
20
17
|
} from "react-native";
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
18
|
+
import { Platform, TextInput } from "react-native";
|
|
19
|
+
import type { RegisterOptions } from "react-hook-form";
|
|
20
|
+
import type { IconNames } from "@jobber/design";
|
|
23
21
|
import identity from "lodash/identity";
|
|
24
|
-
import { Clearable
|
|
22
|
+
import type { Clearable } from "@jobber/hooks";
|
|
23
|
+
import { useShowClear } from "@jobber/hooks";
|
|
25
24
|
import { useStyles } from "./InputText.style";
|
|
26
25
|
import { useInputAccessoriesContext } from "./context";
|
|
27
26
|
import { useFormController } from "../hooks";
|
|
28
|
-
import {
|
|
27
|
+
import type {
|
|
29
28
|
InputFieldStyleOverride,
|
|
30
29
|
InputFieldWrapperProps,
|
|
31
30
|
} from "../InputFieldWrapper/InputFieldWrapper";
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import React, { useMemo, useState } from "react";
|
|
2
|
-
import { FieldError, UseControllerProps } from "react-hook-form";
|
|
3
|
-
import { XOR } from "ts-xor";
|
|
2
|
+
import type { FieldError, UseControllerProps } from "react-hook-form";
|
|
3
|
+
import type { XOR } from "ts-xor";
|
|
4
4
|
import DateTimePicker from "react-native-modal-datetime-picker";
|
|
5
5
|
import { Keyboard, View } from "react-native";
|
|
6
|
-
import { Clearable } from "@jobber/hooks";
|
|
6
|
+
import type { Clearable } from "@jobber/hooks";
|
|
7
7
|
import { styles } from "./InputTime.style";
|
|
8
8
|
import { getTimeZoneOffsetInMinutes, roundUpToNearestMinutes } from "./utils";
|
|
9
9
|
import { useAtlantisContext } from "../AtlantisContext";
|
|
10
10
|
import { InputPressable } from "../InputPressable";
|
|
11
11
|
import { FormField } from "../FormField";
|
|
12
|
-
import { InputFieldWrapperProps } from "../InputFieldWrapper";
|
|
12
|
+
import type { InputFieldWrapperProps } from "../InputFieldWrapper";
|
|
13
13
|
import { useAtlantisI18n } from "../hooks/useAtlantisI18n";
|
|
14
14
|
|
|
15
15
|
interface InputTimeBaseProps
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import { set } from "date-fns";
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
getTimeZoneOffsetInMinutes,
|
|
5
|
-
roundUpToNearestMinutes,
|
|
6
|
-
} from ".";
|
|
2
|
+
import type { MinutesIncrement } from ".";
|
|
3
|
+
import { getTimeZoneOffsetInMinutes, roundUpToNearestMinutes } from ".";
|
|
7
4
|
|
|
8
5
|
describe("roundUpToNearestMinutes", () => {
|
|
9
6
|
it.each<[MinutesIncrement, Record<string, number>]>([
|
package/src/Menu/Menu.test.tsx
CHANGED
|
@@ -2,7 +2,8 @@ import React from "react";
|
|
|
2
2
|
import { fireEvent, render } from "@testing-library/react-native";
|
|
3
3
|
import { Host } from "react-native-portalize";
|
|
4
4
|
import { View } from "react-native";
|
|
5
|
-
import {
|
|
5
|
+
import type { MenuOptionProps, MenuProps } from ".";
|
|
6
|
+
import { Menu } from ".";
|
|
6
7
|
import { tokens } from "../utils/design";
|
|
7
8
|
import { Icon } from "../Icon";
|
|
8
9
|
import { Button } from "../Button";
|
package/src/Menu/Menu.tsx
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { useCallback, useRef, useState } from "react";
|
|
2
|
+
import type { LayoutRectangle } from "react-native";
|
|
2
3
|
import {
|
|
3
4
|
Keyboard,
|
|
4
|
-
LayoutRectangle,
|
|
5
5
|
Platform,
|
|
6
6
|
Pressable,
|
|
7
7
|
View,
|
|
@@ -11,7 +11,7 @@ import { Portal } from "react-native-portalize";
|
|
|
11
11
|
import { useSafeAreaFrame } from "react-native-safe-area-context";
|
|
12
12
|
import { useStyles } from "./Menu.style";
|
|
13
13
|
import { findViewpoint } from "./utils";
|
|
14
|
-
import { MenuProps } from "./types";
|
|
14
|
+
import type { MenuProps } from "./types";
|
|
15
15
|
import { MenuOption } from "./components/MenuOption";
|
|
16
16
|
import { Overlay } from "./components/Overlay";
|
|
17
17
|
import { Button } from "../Button";
|
|
@@ -2,7 +2,7 @@ import React from "react";
|
|
|
2
2
|
import { Pressable, View } from "react-native";
|
|
3
3
|
import capitalize from "lodash/capitalize";
|
|
4
4
|
import { useStyles } from "./MenuOption.style";
|
|
5
|
-
import { MenuOptionInternalProps } from "../../types";
|
|
5
|
+
import type { MenuOptionInternalProps } from "../../types";
|
|
6
6
|
import { Flex } from "../../../Flex";
|
|
7
7
|
import { Typography } from "../../../Typography";
|
|
8
8
|
import { Icon } from "../../../Icon";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { Pressable, View } from "react-native";
|
|
3
3
|
import { useStyles } from "./Overlay.style";
|
|
4
|
-
import { OverlayProp } from "../../types";
|
|
4
|
+
import type { OverlayProp } from "../../types";
|
|
5
5
|
|
|
6
6
|
export function Overlay({ setOpen }: OverlayProp): JSX.Element {
|
|
7
7
|
const styles = useStyles();
|
package/src/Menu/types.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { IconColorNames, IconNames } from "@jobber/design";
|
|
2
|
-
import { TextAlign } from "../Typography";
|
|
1
|
+
import type { IconColorNames, IconNames } from "@jobber/design";
|
|
2
|
+
import type { TextAlign } from "../Typography";
|
|
3
3
|
|
|
4
4
|
export interface MenuOptionProps {
|
|
5
5
|
readonly label: string;
|
package/src/Menu/utils.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { render, screen } from "@testing-library/react-native";
|
|
3
|
-
import {
|
|
3
|
+
import type { ProgressBarProps } from ".";
|
|
4
|
+
import { ProgressBar } from ".";
|
|
4
5
|
|
|
5
6
|
const defaultSetupProps = {
|
|
6
7
|
total: 0,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { View } from "react-native";
|
|
3
|
-
import { ProgressBarProps } from "./types";
|
|
3
|
+
import type { ProgressBarProps } from "./types";
|
|
4
4
|
import { useStyles } from "./ProgressBar.style";
|
|
5
5
|
import { ProgressBarInner, calculateWidth } from "./ProgressBarInner";
|
|
6
6
|
import { ProgressBarStepped } from "./ProgressBarStepped";
|
package/src/ProgressBar/types.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
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 { tokens } from "@jobber/design/foundation";
|
|
4
5
|
import { AccessibilityInfo } from "react-native";
|
|
5
6
|
import { Option, Select } from ".";
|
package/src/Select/Select.tsx
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type { ReactElement } from "react";
|
|
2
|
+
import React from "react";
|
|
2
3
|
import { View } from "react-native";
|
|
3
|
-
import { RegisterOptions } from "react-hook-form";
|
|
4
|
+
import type { RegisterOptions } from "react-hook-form";
|
|
4
5
|
import { useStyles } from "./Select.style";
|
|
5
6
|
import { SelectInternalPicker } from "./components/SelectInternalPicker";
|
|
6
7
|
import { InputFieldWrapper } from "../InputFieldWrapper";
|
|
7
8
|
import { Icon } from "../Icon";
|
|
8
|
-
import { TextVariation } from "../Typography";
|
|
9
|
+
import type { TextVariation } from "../Typography";
|
|
9
10
|
import { Text } from "../Text";
|
|
10
11
|
import { useFormController } from "../hooks";
|
|
11
12
|
import { useAtlantisI18n } from "../hooks/useAtlantisI18n";
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
import { Picker } from "@react-native-picker/picker";
|
|
10
10
|
import { SafeAreaView } from "react-native-safe-area-context";
|
|
11
11
|
import { styles } from "./SelectDefaultPicker.style";
|
|
12
|
-
import { SelectInternalPickerProps } from "../../types";
|
|
12
|
+
import type { SelectInternalPickerProps } from "../../types";
|
|
13
13
|
import { SelectPressable } from "../SelectPressable/SelectPressable";
|
|
14
14
|
import { useAtlantisI18n } from "../../../hooks/useAtlantisI18n";
|
|
15
15
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { useRef } from "react";
|
|
2
2
|
import { Picker } from "@react-native-picker/picker";
|
|
3
3
|
import { styles } from "./SelectDefaultPicker.style";
|
|
4
|
-
import { SelectInternalPickerProps } from "../../types";
|
|
4
|
+
import type { SelectInternalPickerProps } from "../../types";
|
|
5
5
|
import { SelectPressable } from "../SelectPressable";
|
|
6
6
|
import { useAtlantisTheme } from "../../../AtlantisThemeContext";
|
|
7
7
|
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { HostComponent
|
|
2
|
-
import {
|
|
1
|
+
import type { HostComponent } from "react-native";
|
|
2
|
+
import { requireNativeComponent } from "react-native";
|
|
3
|
+
import type {
|
|
3
4
|
SelectInternalPickerProps,
|
|
4
5
|
SelectOnOptionPressEvent,
|
|
5
6
|
} from "../../types";
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type { ElementType } from "react";
|
|
2
|
+
import React from "react";
|
|
2
3
|
import { fireEvent, render } from "@testing-library/react-native";
|
|
3
4
|
import { View } from "react-native";
|
|
4
5
|
import { SelectInternalPicker } from ".";
|
|
5
|
-
import { SelectInternalPickerProps } from "../../types";
|
|
6
|
+
import type { SelectInternalPickerProps } from "../../types";
|
|
6
7
|
import { Text } from "../../../Text";
|
|
7
8
|
|
|
8
9
|
let Platform: { OS: "ios" | "android"; Version: string | number };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { handlePress, isIOS14AndUp } from "./utils";
|
|
3
|
-
import { SelectInternalPickerProps } from "../../types";
|
|
3
|
+
import type { SelectInternalPickerProps } from "../../types";
|
|
4
4
|
import { SelectIOSPicker } from "../SelectIOSPicker";
|
|
5
5
|
import { SelectPressable } from "../SelectPressable";
|
|
6
6
|
import { SelectDefaultPicker } from "../SelectDefaultPicker";
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import {
|
|
2
|
+
import type { PressableProps } from "react-native";
|
|
3
|
+
import { Keyboard, Pressable } from "react-native";
|
|
3
4
|
import { useStyles } from "./SelectPressable.style";
|
|
4
|
-
import { SelectInternalPickerProps } from "../../types";
|
|
5
|
+
import type { SelectInternalPickerProps } from "../../types";
|
|
5
6
|
import { useIsScreenReaderEnabled } from "../../../hooks";
|
|
6
7
|
|
|
7
8
|
type SelectPressableProps = Pick<SelectInternalPickerProps, "children"> &
|
package/src/Select/index.ts
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export type { SelectOption, SelectProps } from "./Select";
|
|
2
|
+
export { Select, Option } from "./Select";
|
package/src/Select/types.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { fireEvent, render } from "@testing-library/react-native";
|
|
3
|
-
import { ViewStyle } from "react-native";
|
|
3
|
+
import type { ViewStyle } from "react-native";
|
|
4
4
|
import { Switch } from "./Switch";
|
|
5
5
|
|
|
6
6
|
it("renders a labeled Switch with value true", () => {
|
package/src/Switch/Switch.tsx
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import React, { useState } from "react";
|
|
2
2
|
import { View } from "react-native";
|
|
3
|
-
import { XOR } from "ts-xor";
|
|
4
|
-
import {
|
|
3
|
+
import type { XOR } from "ts-xor";
|
|
4
|
+
import type { BaseSwitchProps } from "./components/BaseSwitch";
|
|
5
|
+
import { BaseSwitch } from "./components/BaseSwitch";
|
|
5
6
|
import { useStyles } from "./Switch.styles";
|
|
6
7
|
import { Text } from "../Text";
|
|
7
8
|
|
package/src/Switch/index.ts
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export type { SwitchProps } from "./Switch";
|
|
2
|
+
export { Switch } from "./Switch";
|
package/src/Text/Text.tsx
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import {
|
|
2
|
+
import type {
|
|
3
3
|
BaseWeight,
|
|
4
4
|
LineHeight,
|
|
5
5
|
OnTextLayoutEvent,
|
|
@@ -8,11 +8,11 @@ import {
|
|
|
8
8
|
TextSize,
|
|
9
9
|
TextVariation,
|
|
10
10
|
TruncateLength,
|
|
11
|
-
Typography,
|
|
12
11
|
TypographyProps,
|
|
13
12
|
} from "../Typography";
|
|
13
|
+
import { Typography } from "../Typography";
|
|
14
14
|
import { tokens } from "../utils/design";
|
|
15
|
-
import { TypographyUnsafeStyle } from "../Typography/Typography";
|
|
15
|
+
import type { TypographyUnsafeStyle } from "../Typography/Typography";
|
|
16
16
|
|
|
17
17
|
export interface TextProps
|
|
18
18
|
extends Pick<TypographyProps<"base">, "maxFontScaleSize" | "selectable"> {
|
package/src/Text/index.ts
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export type { TextLevel } from "./Text";
|
|
2
|
+
export { Text, TEXT_MAX_SCALED_FONT_SIZES } from "./Text";
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { View } from "react-native";
|
|
3
3
|
import { useStyles } from "./TextList.style";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import type { Spacing } from "../Content";
|
|
5
|
+
import { Content } from "../Content";
|
|
6
|
+
import type { TextLevel } from "../Text";
|
|
7
|
+
import { Text } from "../Text";
|
|
6
8
|
|
|
7
9
|
const BULLET_SYMBOL = `\u2022`;
|
|
8
10
|
|
|
@@ -2,7 +2,7 @@ import React from "react";
|
|
|
2
2
|
import { fireEvent, render } from "@testing-library/react-native";
|
|
3
3
|
import { Host } from "react-native-portalize";
|
|
4
4
|
import { ThumbnailList } from "./ThumbnailList";
|
|
5
|
-
import { File } from "../FormatFile/types";
|
|
5
|
+
import type { File } from "../FormatFile/types";
|
|
6
6
|
|
|
7
7
|
const snapshotFile: File[] = [
|
|
8
8
|
{
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { View } from "react-native";
|
|
3
3
|
import isNil from "lodash/isNil";
|
|
4
|
-
import {
|
|
4
|
+
import type { ThumbnailListProps } from "./types";
|
|
5
|
+
import { RowCount } from "./types";
|
|
5
6
|
import { useStyles } from "./ThumbnailList.style";
|
|
6
|
-
import { File
|
|
7
|
+
import type { File } from "../FormatFile";
|
|
8
|
+
import { FormatFile } from "../FormatFile";
|
|
7
9
|
|
|
8
10
|
function isImage(file: File) {
|
|
9
11
|
return !!file.contentType && file.contentType.includes("image/");
|
package/src/Toast/Toast.tsx
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import
|
|
2
|
+
import type {
|
|
3
3
|
ToastConfig,
|
|
4
4
|
ToastConfigParams,
|
|
5
5
|
ToastPosition,
|
|
6
6
|
} from "react-native-toast-message";
|
|
7
|
+
import Toast from "react-native-toast-message";
|
|
7
8
|
import { AccessibilityInfo, TouchableOpacity, View } from "react-native";
|
|
8
9
|
import { useSafeAreaInsets } from "react-native-safe-area-context";
|
|
9
10
|
import { useStyles } from "./Toast.styles";
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { TextStyle } from "react-native";
|
|
2
|
+
import { Platform, StyleSheet } from "react-native";
|
|
2
3
|
import { webFonts } from "./webFonts";
|
|
3
4
|
import { tokens as staticTokens } from "../utils/design";
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
buildThemedStyles,
|
|
7
|
-
} from "../AtlantisThemeContext";
|
|
5
|
+
import type { AtlantisThemeContextValue } from "../AtlantisThemeContext";
|
|
6
|
+
import { buildThemedStyles } from "../AtlantisThemeContext";
|
|
8
7
|
|
|
9
8
|
const extravagantLineHeight =
|
|
10
9
|
staticTokens["typography--lineHeight-extravagant"];
|
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import {
|
|
2
|
+
import type {
|
|
3
3
|
AccessibilityProps,
|
|
4
|
-
I18nManager,
|
|
5
4
|
StyleProp,
|
|
6
|
-
StyleSheet,
|
|
7
|
-
Text,
|
|
8
5
|
TextProps,
|
|
9
6
|
TextStyle,
|
|
10
7
|
ViewStyle,
|
|
11
8
|
} from "react-native";
|
|
9
|
+
import { I18nManager, StyleSheet, Text } from "react-native";
|
|
12
10
|
import { TypographyGestureDetector } from "./TypographyGestureDetector";
|
|
13
11
|
import { useTypographyStyles } from "./Typography.style";
|
|
14
12
|
import { capitalize } from "../utils/intl";
|