@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,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { Platform } from "react-native";
|
|
3
|
-
import { ComposeTextWithLinksProps } from "../../types";
|
|
3
|
+
import type { ComposeTextWithLinksProps } from "../../types";
|
|
4
4
|
import { onLongPressLink, onPressLink } from "../../utils";
|
|
5
5
|
import { Link } from "../Link/Link";
|
|
6
6
|
import { Text } from "../../../Text";
|
package/src/AutoLink/types.ts
CHANGED
package/src/AutoLink/utils.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { EmailMatch, Match, PhoneMatch } from "autolinker";
|
|
1
|
+
import type { EmailMatch, Match, PhoneMatch } from "autolinker";
|
|
2
2
|
import { Linking } from "react-native";
|
|
3
3
|
import { copyTextToClipboard } from "./clipboard";
|
|
4
|
-
import { I18nKeys, useAtlantisI18nValue } from "../hooks/useAtlantisI18n";
|
|
4
|
+
import type { I18nKeys, useAtlantisI18nValue } from "../hooks/useAtlantisI18n";
|
|
5
5
|
|
|
6
6
|
function hasPrefix(text: string, prefixes: string[]): boolean {
|
|
7
7
|
return prefixes.some(prefix => text.includes(prefix));
|
package/src/Banner/Banner.tsx
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type { PropsWithChildren, ReactElement } from "react";
|
|
2
|
+
import React from "react";
|
|
2
3
|
import { Pressable, Text as RNText, View } from "react-native";
|
|
3
|
-
import { IconNames } from "@jobber/design";
|
|
4
|
-
import { BannerProps, BannerTypes } from "./types";
|
|
4
|
+
import type { IconNames } from "@jobber/design";
|
|
5
|
+
import type { BannerProps, BannerTypes } from "./types";
|
|
5
6
|
import { useStyles } from "./Banner.style";
|
|
6
7
|
import { BannerIcon } from "./components/BannerIcon/BannerIcon";
|
|
7
8
|
import { Content } from "../Content";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { IconNames } from "@jobber/design";
|
|
2
|
+
import type { IconNames } from "@jobber/design";
|
|
3
3
|
import { View } from "react-native";
|
|
4
4
|
import { useStyles } from "./BannerIcon.style";
|
|
5
5
|
import { Icon } from "../../../Icon";
|
|
6
|
-
import { BannerTypes } from "../../types";
|
|
6
|
+
import type { BannerTypes } from "../../types";
|
|
7
7
|
|
|
8
8
|
export interface BannerIconProps {
|
|
9
9
|
readonly icon: IconNames;
|
package/src/Banner/types.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { IconNames } from "@jobber/design";
|
|
2
|
-
import { ReactElement } from "react";
|
|
3
|
-
import { StyleProp, ViewStyle } from "react-native";
|
|
1
|
+
import type { IconNames } from "@jobber/design";
|
|
2
|
+
import type { ReactElement } from "react";
|
|
3
|
+
import type { StyleProp, ViewStyle } from "react-native";
|
|
4
4
|
|
|
5
5
|
export type BannerTypes = "error" | "warning" | "notice";
|
|
6
6
|
|
|
@@ -3,7 +3,7 @@ import { act, fireEvent, render, waitFor } from "@testing-library/react-native";
|
|
|
3
3
|
import { AccessibilityInfo, View } from "react-native";
|
|
4
4
|
import { Host, Portal } from "react-native-portalize";
|
|
5
5
|
import { BottomSheet } from ".";
|
|
6
|
-
import { BottomSheetRef } from "./BottomSheet";
|
|
6
|
+
import type { BottomSheetRef } from "./BottomSheet";
|
|
7
7
|
import { waitForUntestableRender } from "../utils/test/wait";
|
|
8
8
|
import { Text } from "../Text";
|
|
9
9
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type { ReactNode, Ref, RefObject } from "react";
|
|
2
|
+
import React, { forwardRef, useState } from "react";
|
|
2
3
|
import { Modalize } from "react-native-modalize";
|
|
3
4
|
import { useSafeAreaInsets } from "react-native-safe-area-context";
|
|
4
5
|
import { Keyboard, View } from "react-native";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { TouchableOpacity, View } from "react-native";
|
|
3
|
-
import { IconColorNames, IconNames } from "@jobber/design";
|
|
3
|
+
import type { IconColorNames, IconNames } from "@jobber/design";
|
|
4
4
|
import { useStyles } from "./BottomSheetOption.styles";
|
|
5
|
-
import { TextAlign } from "../../../Typography";
|
|
5
|
+
import type { TextAlign } from "../../../Typography";
|
|
6
6
|
import { capitalize } from "../../../utils/intl";
|
|
7
7
|
import { Text } from "../../../Text";
|
|
8
8
|
import { Icon } from "../../../Icon";
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export type { BottomSheetOptionProps } from "./BottomSheetOption";
|
|
2
|
+
export { BottomSheetOption } from "./BottomSheetOption";
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type { CSSProperties, ReactElement } from "react";
|
|
2
|
+
import React from "react";
|
|
2
3
|
import { fireEvent, render } from "@testing-library/react-native";
|
|
3
4
|
import { Path } from "react-native-svg";
|
|
4
|
-
import { ReactTestInstance } from "react-test-renderer";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import type { ReactTestInstance } from "react-test-renderer";
|
|
6
|
+
import type { ButtonType, ButtonVariation } from ".";
|
|
7
|
+
import { Button } from ".";
|
|
8
|
+
import type { ButtonSize } from "./types";
|
|
7
9
|
import { baseButtonHeight, smallButtonHeight } from "./Button.style";
|
|
8
10
|
import { tokens } from "../utils/design";
|
|
9
11
|
|
package/src/Button/Button.tsx
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { StyleProp,
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import type { StyleProp, ViewStyle } from "react-native";
|
|
3
|
+
import { TouchableHighlight, View } from "react-native";
|
|
4
|
+
import type { IconColorNames, IconNames } from "@jobber/design";
|
|
5
|
+
import type { XOR } from "ts-xor";
|
|
5
6
|
import { useStyles } from "./Button.style";
|
|
6
7
|
import { InternalButtonLoading } from "./components/InternalButtonLoading";
|
|
7
|
-
import { ButtonSize, ButtonType, ButtonVariation } from "./types";
|
|
8
|
-
import {
|
|
8
|
+
import type { ButtonSize, ButtonType, ButtonVariation } from "./types";
|
|
9
|
+
import type { ActionLabelVariation } from "../ActionLabel";
|
|
10
|
+
import { ActionLabel } from "../ActionLabel";
|
|
9
11
|
import { Icon } from "../Icon";
|
|
10
12
|
import { useAtlantisTheme } from "../AtlantisThemeContext";
|
|
11
13
|
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
darkPattern,
|
|
6
6
|
lightPattern,
|
|
7
7
|
} from "./InternalButtonLoading";
|
|
8
|
-
import { ButtonType, ButtonVariation } from "../../types";
|
|
8
|
+
import type { ButtonType, ButtonVariation } from "../../types";
|
|
9
9
|
|
|
10
10
|
describe("Loading pattern", () => {
|
|
11
11
|
it.each<[string, ButtonType, ButtonVariation]>([
|
|
@@ -10,7 +10,7 @@ import Animated, {
|
|
|
10
10
|
} from "react-native-reanimated";
|
|
11
11
|
import { styles } from "./InternalButtonLoading.style";
|
|
12
12
|
import { tokens } from "../../../utils/design";
|
|
13
|
-
import { ButtonType, ButtonVariation } from "../../types";
|
|
13
|
+
import type { ButtonType, ButtonVariation } from "../../types";
|
|
14
14
|
|
|
15
15
|
interface InternalButtonLoadingProps {
|
|
16
16
|
readonly variation: ButtonVariation;
|
|
@@ -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 { Alert } from "react-native";
|
|
5
|
-
import {
|
|
5
|
+
import type { ButtonGroupProps } from "./ButtonGroup";
|
|
6
|
+
import { ButtonGroup } from "./ButtonGroup";
|
|
6
7
|
import { Button } from "../Button";
|
|
7
8
|
import * as atlantisContext from "../AtlantisContext/AtlantisContext";
|
|
8
9
|
import { atlantisContextDefaultValues } from "../AtlantisContext";
|
|
@@ -4,9 +4,9 @@ import { PrimaryAction, SecondaryAction } from "./ButtonGroupAction";
|
|
|
4
4
|
import { useStyles } from "./ButtonGroup.style";
|
|
5
5
|
import { SecondaryActionSheet } from "./components/SecondaryActionSheet";
|
|
6
6
|
import { getActions, usePreventTapWhenOffline } from "./utils";
|
|
7
|
-
import { ButtonGroupActionElement } from "./types";
|
|
7
|
+
import type { ButtonGroupActionElement } from "./types";
|
|
8
8
|
import { Button } from "../Button";
|
|
9
|
-
import { BottomSheetRef } from "../BottomSheet/BottomSheet";
|
|
9
|
+
import type { BottomSheetRef } from "../BottomSheet/BottomSheet";
|
|
10
10
|
import { useAtlantisI18n } from "../hooks/useAtlantisI18n";
|
|
11
11
|
|
|
12
12
|
export interface ButtonGroupProps {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { IconColorNames, IconNames } from "@jobber/design";
|
|
1
|
+
import type { IconColorNames, IconNames } from "@jobber/design";
|
|
2
2
|
import React from "react";
|
|
3
|
-
import { ButtonType, ButtonVariation } from "../Button";
|
|
3
|
+
import type { ButtonType, ButtonVariation } from "../Button";
|
|
4
4
|
|
|
5
5
|
export interface ButtonGroupActionProps {
|
|
6
6
|
/**
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type { RefObject } from "react";
|
|
2
|
+
import React from "react";
|
|
2
3
|
import { View } from "react-native";
|
|
3
4
|
import { Portal } from "react-native-portalize";
|
|
4
|
-
import { ButtonGroupSecondaryActionProps } from "../../types";
|
|
5
|
+
import type { ButtonGroupSecondaryActionProps } from "../../types";
|
|
5
6
|
import { BottomSheetOption } from "../../../BottomSheet/components/BottomSheetOption";
|
|
6
|
-
import {
|
|
7
|
+
import type { BottomSheetRef } from "../../../BottomSheet/BottomSheet";
|
|
8
|
+
import { BottomSheet } from "../../../BottomSheet/BottomSheet";
|
|
7
9
|
|
|
8
10
|
interface SecondaryActionSheetProps {
|
|
9
11
|
readonly actions: ButtonGroupSecondaryActionProps[];
|
package/src/ButtonGroup/types.ts
CHANGED
package/src/ButtonGroup/utils.ts
CHANGED
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
import React, { useCallback } from "react";
|
|
2
2
|
import { Alert } from "react-native";
|
|
3
|
-
import {
|
|
3
|
+
import type {
|
|
4
4
|
ButtonGroupActionElement,
|
|
5
5
|
ButtonGroupPrimaryActionElement,
|
|
6
6
|
} from "./types";
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
PrimaryAction,
|
|
10
|
-
SecondaryAction,
|
|
11
|
-
} from "./ButtonGroupAction";
|
|
7
|
+
import type { ButtonGroupActionProps } from "./ButtonGroupAction";
|
|
8
|
+
import { PrimaryAction, SecondaryAction } from "./ButtonGroupAction";
|
|
12
9
|
import { useAtlantisContext } from "../AtlantisContext/AtlantisContext";
|
|
13
10
|
import { useAtlantisI18n } from "../hooks/useAtlantisI18n";
|
|
14
11
|
|
package/src/Card/Card.tsx
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import type {
|
|
3
4
|
LayoutChangeEvent,
|
|
4
|
-
Pressable,
|
|
5
5
|
PressableStateCallbackType,
|
|
6
|
-
View,
|
|
7
6
|
} from "react-native";
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
7
|
+
import { Pressable, View } from "react-native";
|
|
8
|
+
import type { IconNames } from "@jobber/design";
|
|
9
|
+
import type { XOR } from "ts-xor";
|
|
10
10
|
import { useStyles } from "./Card.style";
|
|
11
11
|
import { InternalCardHeader } from "./components/InternalCardHeader";
|
|
12
12
|
import { ErrorMessageWrapper } from "../ErrorMessageWrapper";
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { ColorValue
|
|
3
|
-
import {
|
|
2
|
+
import type { ColorValue } from "react-native";
|
|
3
|
+
import { Pressable, View } from "react-native";
|
|
4
|
+
import type { XOR } from "ts-xor";
|
|
4
5
|
import { useStyles } from "./Checkbox.style";
|
|
5
6
|
import { Text } from "../Text";
|
|
6
7
|
import { Icon } from "../Icon";
|
|
@@ -1,14 +1,10 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
fireEvent,
|
|
5
|
-
render,
|
|
6
|
-
waitFor,
|
|
7
|
-
} from "@testing-library/react-native";
|
|
2
|
+
import type { RenderAPI } from "@testing-library/react-native";
|
|
3
|
+
import { fireEvent, render, waitFor } from "@testing-library/react-native";
|
|
8
4
|
import { FormProvider, useForm } from "react-hook-form";
|
|
9
5
|
import { CheckboxGroup } from "./CheckboxGroup";
|
|
10
6
|
import { Checkbox } from "./Checkbox";
|
|
11
|
-
import { CheckboxGroupState } from "./types";
|
|
7
|
+
import type { CheckboxGroupState } from "./types";
|
|
12
8
|
import { Button } from "../Button";
|
|
13
9
|
|
|
14
10
|
const onSubmitMock = jest.fn();
|
|
@@ -2,10 +2,11 @@ import React, { Fragment, useReducer } from "react";
|
|
|
2
2
|
import { View } from "react-native";
|
|
3
3
|
import isEmpty from "lodash/isEmpty";
|
|
4
4
|
import reduce from "lodash/reduce";
|
|
5
|
-
import { XOR } from "ts-xor";
|
|
5
|
+
import type { XOR } from "ts-xor";
|
|
6
6
|
import { useStyles } from "./CheckboxGroup.style";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
7
|
+
import type { CheckboxProps } from "./Checkbox";
|
|
8
|
+
import { Checkbox } from "./Checkbox";
|
|
9
|
+
import type { CheckboxElement, CheckboxGroupState } from "./types";
|
|
9
10
|
import {
|
|
10
11
|
checkboxGroupReducer,
|
|
11
12
|
initCheckboxGroupState,
|
package/src/Checkbox/types.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ReactElement } from "react";
|
|
2
|
-
import { Checkbox, CheckboxProps } from "./Checkbox";
|
|
1
|
+
import type { ReactElement } from "react";
|
|
2
|
+
import type { Checkbox, CheckboxProps } from "./Checkbox";
|
|
3
3
|
|
|
4
4
|
export interface CheckboxGroupChildrenState {
|
|
5
5
|
[key: string]: boolean;
|
package/src/Chip/Chip.tsx
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React, { useMemo } from "react";
|
|
2
|
-
import { AccessibilityRole
|
|
3
|
-
import {
|
|
2
|
+
import type { AccessibilityRole } from "react-native";
|
|
3
|
+
import { Pressable, View } from "react-native";
|
|
4
|
+
import type { IconNames } from "@jobber/design";
|
|
4
5
|
import { useStyles } from "./Chip.style";
|
|
5
6
|
import { Icon } from "../Icon";
|
|
6
7
|
import { Typography } from "../Typography";
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { render, renderHook } from "@testing-library/react-native";
|
|
3
3
|
import { View } from "react-native";
|
|
4
|
-
import { ReactTestInstance } from "react-test-renderer";
|
|
5
|
-
import {
|
|
4
|
+
import type { ReactTestInstance } from "react-test-renderer";
|
|
5
|
+
import type { ContentProps } from "./Content";
|
|
6
|
+
import { Content } from "./Content";
|
|
6
7
|
import { useSpaceAroundStyles } from "./ContentSpaceAround.style";
|
|
7
8
|
import { useVerticalStyles } from "./ContentVertical.style";
|
|
8
9
|
import { useHorizontalStyles } from "./ContentHorizontal.style";
|
package/src/Content/Content.tsx
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import type { StyleProp, ViewStyle } from "react-native";
|
|
4
|
+
import { View } from "react-native";
|
|
3
5
|
import { useHorizontalStyles } from "./ContentHorizontal.style";
|
|
4
6
|
import { useVerticalStyles } from "./ContentVertical.style";
|
|
5
7
|
import { useSpaceAroundStyles } from "./ContentSpaceAround.style";
|
|
@@ -2,12 +2,10 @@ import React, { createRef } from "react";
|
|
|
2
2
|
import { fireEvent, render, waitFor } from "@testing-library/react-native";
|
|
3
3
|
import { AccessibilityInfo, View } from "react-native";
|
|
4
4
|
import { Host } from "react-native-portalize";
|
|
5
|
-
import { ReactTestInstance
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
ModalBackgroundColor,
|
|
10
|
-
} from "./ContentOverlay";
|
|
5
|
+
import type { ReactTestInstance } from "react-test-renderer";
|
|
6
|
+
import { act } from "react-test-renderer";
|
|
7
|
+
import type { ContentOverlayRef, ModalBackgroundColor } from "./ContentOverlay";
|
|
8
|
+
import { ContentOverlay } from "./ContentOverlay";
|
|
11
9
|
import { tokens } from "../utils/design";
|
|
12
10
|
import { Button } from "../Button";
|
|
13
11
|
import { Content } from "../Content";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import type { Ref } from "react";
|
|
1
2
|
import React, {
|
|
2
|
-
Ref,
|
|
3
3
|
forwardRef,
|
|
4
4
|
useCallback,
|
|
5
5
|
useImperativeHandle,
|
|
@@ -9,10 +9,9 @@ import React, {
|
|
|
9
9
|
} from "react";
|
|
10
10
|
import { Modalize } from "react-native-modalize";
|
|
11
11
|
import { useSafeAreaInsets } from "react-native-safe-area-context";
|
|
12
|
+
import type { NativeScrollEvent, NativeSyntheticEvent } from "react-native";
|
|
12
13
|
import {
|
|
13
14
|
AccessibilityInfo,
|
|
14
|
-
NativeScrollEvent,
|
|
15
|
-
NativeSyntheticEvent,
|
|
16
15
|
Platform,
|
|
17
16
|
View,
|
|
18
17
|
findNodeHandle,
|
|
@@ -22,7 +21,7 @@ import { Portal } from "react-native-portalize";
|
|
|
22
21
|
import { useKeyboardVisibility } from "./hooks/useKeyboardVisibility";
|
|
23
22
|
import { useStyles } from "./ContentOverlay.style";
|
|
24
23
|
import { useViewLayoutHeight } from "./hooks/useViewLayoutHeight";
|
|
25
|
-
import {
|
|
24
|
+
import type {
|
|
26
25
|
ContentOverlayProps,
|
|
27
26
|
ContentOverlayRef,
|
|
28
27
|
ModalBackgroundColor,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { act, renderHook } from "@testing-library/react-hooks";
|
|
2
|
-
import {
|
|
2
|
+
import type { KeyboardEvent } from "react-native";
|
|
3
|
+
import { DeviceEventEmitter } from "react-native";
|
|
3
4
|
import { useKeyboardVisibility } from "./useKeyboardVisibility";
|
|
4
5
|
|
|
5
6
|
const keyboardEvent: Partial<KeyboardEvent> = {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { useEffect, useState } from "react";
|
|
2
|
-
import {
|
|
2
|
+
import type { KeyboardEvent } from "react-native";
|
|
3
|
+
import { Keyboard } from "react-native";
|
|
3
4
|
|
|
4
5
|
interface KeyboardVisibility {
|
|
5
6
|
readonly isKeyboardVisible: boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { act, renderHook } from "@testing-library/react-hooks";
|
|
2
|
-
import { LayoutChangeEvent } from "react-native";
|
|
2
|
+
import type { LayoutChangeEvent } from "react-native";
|
|
3
3
|
import { useViewLayoutHeight } from "./useViewLayoutHeight";
|
|
4
4
|
|
|
5
5
|
describe("useViewLayoutHeight", () => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { fireEvent, render, screen } from "@testing-library/react-native";
|
|
3
|
-
import { ReactTestInstance } from "react-test-renderer";
|
|
3
|
+
import type { ReactTestInstance } from "react-test-renderer";
|
|
4
4
|
import { Disclosure } from ".";
|
|
5
5
|
import { Text } from "../Text";
|
|
6
6
|
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React, { useState } from "react";
|
|
2
|
-
import { LayoutChangeEvent
|
|
2
|
+
import type { LayoutChangeEvent } from "react-native";
|
|
3
|
+
import { TouchableOpacity, View } from "react-native";
|
|
3
4
|
import Reanimated, {
|
|
4
5
|
Easing,
|
|
5
6
|
useAnimatedStyle,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { fireEvent, render } from "@testing-library/react-native";
|
|
3
|
-
import {
|
|
3
|
+
import type { EmptyStateProps } from "./EmptyState";
|
|
4
|
+
import { EmptyState } from "./EmptyState";
|
|
4
5
|
import * as IconComponent from "../Icon/Icon";
|
|
5
6
|
|
|
6
7
|
const primaryOnPress = jest.fn();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IconColorNames, IconNames } from "@jobber/design";
|
|
1
|
+
import type { IconColorNames, IconNames } from "@jobber/design";
|
|
2
2
|
import React from "react";
|
|
3
3
|
import { View } from "react-native";
|
|
4
4
|
import { useStyles } from "./EmptyState.style";
|
|
@@ -6,7 +6,8 @@ import { Text } from "../Text";
|
|
|
6
6
|
import { Content } from "../Content";
|
|
7
7
|
import { Icon } from "../Icon";
|
|
8
8
|
import { Heading } from "../Heading";
|
|
9
|
-
import {
|
|
9
|
+
import type { ButtonType } from "../Button";
|
|
10
|
+
import { Button } from "../Button";
|
|
10
11
|
|
|
11
12
|
interface Action {
|
|
12
13
|
label: string;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import React, { useEffect, useRef } from "react";
|
|
3
|
+
import type { ViewStyle } from "react-native";
|
|
4
|
+
import { View } from "react-native";
|
|
3
5
|
import { v4 } from "react-native-uuid";
|
|
4
6
|
import { useErrorMessageContext } from "./context";
|
|
5
7
|
import { useStyles } from "./ErrorMessageWrapper.style";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
2
2
|
import { createContext, useContext } from "react";
|
|
3
|
-
import { ErrorMessageContextProps } from "./types";
|
|
3
|
+
import type { ErrorMessageContextProps } from "./types";
|
|
4
4
|
|
|
5
5
|
const defaultValues: ErrorMessageContextProps = {
|
|
6
6
|
elements: {},
|
|
@@ -1,12 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
View,
|
|
6
|
-
findNodeHandle,
|
|
7
|
-
} from "react-native";
|
|
1
|
+
import type { ReactNode, RefObject } from "react";
|
|
2
|
+
import React, { useState } from "react";
|
|
3
|
+
import type { NativeMethods, View } from "react-native";
|
|
4
|
+
import { AccessibilityInfo, findNodeHandle } from "react-native";
|
|
8
5
|
import { ErrorMessageContext } from "./ErrorMessageContext";
|
|
9
|
-
import {
|
|
6
|
+
import type {
|
|
10
7
|
Element,
|
|
11
8
|
ErrorMessageContextProps,
|
|
12
9
|
ErrorMessageContextRegisterParams,
|
package/src/Flex/Flex.styles.tsx
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import type { ViewStyle } from "react-native";
|
|
2
|
+
import { StyleSheet } from "react-native";
|
|
3
|
+
import type { ColumnKeys, Spacing } from "./types";
|
|
4
|
+
import { spacing } from "./types";
|
|
3
5
|
import { tokens as staticTokens } from "../utils/design";
|
|
4
6
|
|
|
5
7
|
export const styles = StyleSheet.create({
|
package/src/Flex/Flex.test.tsx
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { render } from "@testing-library/react-native";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import type { ViewStyle } from "react-native";
|
|
4
|
+
import { View } from "react-native";
|
|
5
|
+
import type { ReactTestInstance } from "react-test-renderer";
|
|
5
6
|
import { tokens } from "@jobber/design/foundation";
|
|
6
7
|
import { Flex } from "./Flex";
|
|
7
|
-
import { FlexProps, Spacing } from "./types";
|
|
8
|
+
import type { FlexProps, Spacing } from "./types";
|
|
8
9
|
import { columnStyles } from "./Flex.styles";
|
|
9
10
|
import { Text } from "../Text";
|
|
10
11
|
import { Icon } from "../Icon";
|
package/src/Flex/Flex.tsx
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type { PropsWithChildren } from "react";
|
|
2
|
+
import React, { Children } from "react";
|
|
2
3
|
import { View } from "react-native";
|
|
3
4
|
import chunk from "lodash/chunk";
|
|
4
5
|
import { columnStyles, gapStyles, styles } from "./Flex.styles";
|
|
5
|
-
import { FlexProps } from "./types";
|
|
6
|
+
import type { FlexProps } from "./types";
|
|
6
7
|
import { Content } from "../Content";
|
|
7
8
|
|
|
8
9
|
export function Flex({
|
package/src/Flex/types.ts
CHANGED