@jobber/components-native 0.84.4-match-mobi-55ef4ec.7 → 0.84.4-match-mobi-540af48.10
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 +26 -15
- package/dist/src/ActionItem/ActionItemGroup.js +1 -1
- package/dist/src/AutoLink/components/Link/Link.js +1 -1
- package/dist/src/Banner/Banner.js +2 -0
- package/dist/src/Banner/components/BannerIcon/BannerIcon.style.js +3 -0
- package/dist/src/BottomSheet/BottomSheet.js +58 -32
- package/dist/src/BottomSheet/BottomSheet.style.js +8 -9
- package/dist/src/BottomSheet/hooks/useBottomSheetBackHandler.js +26 -0
- package/dist/src/Button/components/InternalButtonLoading/InternalButtonLoading.js +0 -1
- package/dist/src/ButtonGroup/ButtonGroup.js +1 -1
- package/dist/src/Chip/Chip.js +12 -1
- package/dist/src/Chip/Chip.style.js +1 -1
- package/dist/src/Content/ContentHorizontal.style.js +15 -0
- package/dist/src/Content/ContentSpaceAround.style.js +15 -0
- package/dist/src/Content/ContentVertical.style.js +15 -0
- package/dist/src/ContentOverlay/ContentOverlay.js +5 -7
- package/dist/src/ContentOverlay/UNSAFE_WrappedModalize.js +23 -0
- package/dist/src/ErrorMessageWrapper/context/ErrorMessageProvider.js +1 -1
- package/dist/src/Form/Form.js +5 -2
- package/dist/src/Form/components/FormCache/FormCache.js +1 -0
- package/dist/src/Form/components/FormMessageBanner/FormMessageBanner.js +1 -1
- package/dist/src/Form/context/AtlantisFormContext.js +1 -0
- package/dist/src/Form/hooks/useInternalForm.js +6 -3
- package/dist/src/FormatFile/components/MediaView/MediaView.js +22 -5
- package/dist/src/FormatFile/utils/createUseCreateThumbnail.js +1 -1
- package/dist/src/InputCurrency/InputCurrency.js +42 -30
- package/dist/src/InputDate/InputDate.js +2 -2
- package/dist/src/InputEmail/InputEmail.js +12 -4
- package/dist/src/InputFieldWrapper/InputFieldWrapper.js +14 -12
- package/dist/src/InputFieldWrapper/InputFieldWrapper.style.js +1 -1
- package/dist/src/InputFieldWrapper/components/Prefix/Prefix.js +5 -2
- package/dist/src/InputFieldWrapper/components/Suffix/Suffix.js +5 -2
- package/dist/src/InputNumber/InputNumber.js +10 -4
- package/dist/src/InputPressable/InputPressable.js +20 -8
- package/dist/src/InputPressable/InputPressable.style.js +3 -0
- package/dist/src/InputSearch/InputSearch.js +1 -1
- package/dist/src/InputText/InputText.js +24 -13
- package/dist/src/InputText/InputText.style.js +4 -0
- package/dist/src/InputTime/InputTime.js +2 -2
- package/dist/src/Menu/Menu.js +2 -2
- package/dist/src/ProgressBar/ProgressBar.js +10 -6
- package/dist/src/ProgressBar/ProgressBarInner.js +3 -12
- package/dist/src/ProgressBar/ProgressBarStepped.js +7 -2
- package/dist/src/Select/Select.style.js +1 -0
- package/dist/src/Select/components/SelectPressable/SelectPressable.js +1 -1
- package/dist/src/StatusLabel/StatusLabel.style.js +2 -2
- package/dist/src/Switch/components/BaseSwitch/BaseSwitch.js +7 -1
- package/dist/src/Typography/Typography.js +16 -5
- package/dist/src/hooks/useAtlantisI18n/locales/en.json +1 -0
- package/dist/src/hooks/useAtlantisI18n/locales/es.json +1 -0
- package/dist/src/hooks/useFormController.js +6 -15
- package/dist/tsconfig.build.json +7 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -0
- package/dist/tsconfig.json +4 -6
- package/dist/types/src/ActionItem/ActionItem.d.ts +2 -1
- package/dist/types/src/ActionItem/ActionItemGroup.d.ts +2 -1
- package/dist/types/src/ActionItem/components/ActionItemContainer.d.ts +2 -1
- package/dist/types/src/ActionLabel/ActionLabel.d.ts +4 -3
- package/dist/types/src/ActivityIndicator/ActivityIndicator.d.ts +2 -1
- package/dist/types/src/AutoLink/AutoLink.d.ts +2 -1
- package/dist/types/src/AutoLink/components/ComposeTextWithLinks/ComposeTextWithLinks.d.ts +2 -1
- package/dist/types/src/AutoLink/components/Link/Link.d.ts +2 -1
- package/dist/types/src/Banner/Banner.d.ts +2 -1
- package/dist/types/src/Banner/components/BannerIcon/BannerIcon.d.ts +2 -1
- package/dist/types/src/Banner/components/BannerIcon/BannerIcon.style.d.ts +3 -0
- package/dist/types/src/Banner/types.d.ts +1 -1
- package/dist/types/src/BottomSheet/BottomSheet.d.ts +7 -3
- package/dist/types/src/BottomSheet/BottomSheet.style.d.ts +7 -14
- package/dist/types/src/BottomSheet/components/BottomSheetOption/BottomSheetOption.d.ts +2 -1
- package/dist/types/src/BottomSheet/hooks/useBottomSheetBackHandler.d.ts +8 -0
- package/dist/types/src/Button/Button.d.ts +2 -1
- package/dist/types/src/Button/components/InternalButtonLoading/InternalButtonLoading.d.ts +1 -1
- package/dist/types/src/ButtonGroup/ButtonGroup.d.ts +2 -1
- package/dist/types/src/ButtonGroup/ButtonGroupAction.d.ts +4 -3
- package/dist/types/src/ButtonGroup/components/SecondaryActionSheet/SecondaryActionSheet.d.ts +3 -2
- package/dist/types/src/Card/Card.d.ts +2 -1
- package/dist/types/src/Card/components/InternalCardHeader.d.ts +2 -1
- package/dist/types/src/Checkbox/Checkbox.d.ts +2 -1
- package/dist/types/src/Checkbox/CheckboxGroup.d.ts +2 -1
- package/dist/types/src/Chip/Chip.d.ts +2 -1
- package/dist/types/src/Content/Content.d.ts +3 -2
- package/dist/types/src/Content/ContentHorizontal.style.d.ts +15 -0
- package/dist/types/src/Content/ContentSpaceAround.style.d.ts +15 -0
- package/dist/types/src/Content/ContentVertical.style.d.ts +15 -0
- package/dist/types/src/ContentOverlay/ContentOverlay.d.ts +1 -1
- package/dist/types/src/ContentOverlay/UNSAFE_WrappedModalize.d.ts +3 -0
- package/dist/types/src/Disclosure/Disclosure.d.ts +1 -1
- package/dist/types/src/Divider/Divider.d.ts +2 -1
- package/dist/types/src/EmptyState/EmptyState.d.ts +2 -1
- package/dist/types/src/ErrorMessageWrapper/ErrorMessageWrapper.d.ts +2 -1
- package/dist/types/src/ErrorMessageWrapper/context/ErrorMessageProvider.d.ts +2 -1
- package/dist/types/src/ErrorMessageWrapper/context/types.d.ts +1 -1
- package/dist/types/src/Flex/Flex.d.ts +2 -1
- package/dist/types/src/Form/Form.d.ts +2 -1
- package/dist/types/src/Form/components/FormActionBar/FormActionBar.d.ts +3 -2
- package/dist/types/src/Form/components/FormBody/FormBody.d.ts +3 -2
- package/dist/types/src/Form/components/FormCache/FormCache.d.ts +4 -3
- package/dist/types/src/Form/components/FormErrorBanner/FormErrorBanner.d.ts +2 -1
- package/dist/types/src/Form/components/FormMask/FormMask.d.ts +2 -1
- package/dist/types/src/Form/components/FormMessage/FormMessage.d.ts +2 -1
- package/dist/types/src/Form/components/FormMessage/components/InternalFormMessage/InternalFormMessage.d.ts +2 -1
- package/dist/types/src/Form/components/FormMessageBanner/FormMessageBanner.d.ts +2 -1
- package/dist/types/src/Form/components/FormSaveButton/FormSaveButton.d.ts +2 -1
- package/dist/types/src/Form/context/AtlantisFormContext.d.ts +2 -1
- package/dist/types/src/Form/context/types.d.ts +5 -4
- package/dist/types/src/Form/hooks/useFormViewRefs.d.ts +2 -2
- package/dist/types/src/Form/hooks/useInternalForm.d.ts +7 -7
- package/dist/types/src/Form/types.d.ts +13 -7
- package/dist/types/src/FormField/FormField.d.ts +1 -1
- package/dist/types/src/FormatFile/FormatFile.d.ts +2 -1
- package/dist/types/src/FormatFile/components/ErrorIcon/ErrorIcon.d.ts +2 -1
- package/dist/types/src/FormatFile/components/FileView/FileView.d.ts +2 -1
- package/dist/types/src/FormatFile/components/FormatFileBottomSheet/FormatFileBottomSheet.d.ts +3 -2
- package/dist/types/src/FormatFile/components/MediaView/MediaView.d.ts +2 -1
- package/dist/types/src/FormatFile/components/ProgressBar/ProgressBar.d.ts +2 -1
- package/dist/types/src/Heading/Heading.d.ts +4 -3
- package/dist/types/src/Icon/Icon.d.ts +2 -1
- package/dist/types/src/IconButton/IconButton.d.ts +1 -1
- package/dist/types/src/InputCurrency/InputCurrency.d.ts +2 -1
- package/dist/types/src/InputDate/InputDate.d.ts +4 -2
- package/dist/types/src/InputFieldWrapper/InputFieldWrapper.d.ts +9 -2
- package/dist/types/src/InputFieldWrapper/InputFieldWrapper.style.d.ts +1 -1
- package/dist/types/src/InputFieldWrapper/components/ClearAction/ClearAction.d.ts +2 -1
- package/dist/types/src/InputFieldWrapper/components/Prefix/Prefix.d.ts +4 -4
- package/dist/types/src/InputFieldWrapper/components/Suffix/Suffix.d.ts +4 -4
- package/dist/types/src/InputPressable/InputPressable.d.ts +9 -1
- package/dist/types/src/InputPressable/InputPressable.style.d.ts +3 -0
- package/dist/types/src/InputSearch/InputSearch.d.ts +1 -1
- package/dist/types/src/InputSearch/components/FilterButton.d.ts +2 -1
- package/dist/types/src/InputText/InputText.d.ts +11 -3
- package/dist/types/src/InputText/InputText.style.d.ts +4 -0
- package/dist/types/src/InputText/context/InputAccessoriesProvider.d.ts +2 -1
- package/dist/types/src/InputTime/InputTime.d.ts +4 -2
- package/dist/types/src/Menu/Menu.d.ts +2 -1
- package/dist/types/src/Menu/components/MenuOption/MenuOption.d.ts +2 -1
- package/dist/types/src/Menu/components/Overlay/Overlay.d.ts +2 -1
- package/dist/types/src/Menu/types.d.ts +6 -1
- package/dist/types/src/ProgressBar/ProgressBar.d.ts +2 -1
- package/dist/types/src/ProgressBar/ProgressBarInner.d.ts +5 -1
- package/dist/types/src/ProgressBar/ProgressBarStepped.d.ts +3 -1
- package/dist/types/src/ProgressBar/types.d.ts +20 -0
- package/dist/types/src/Select/Select.d.ts +3 -2
- package/dist/types/src/Select/components/SelectDefaultPicker/SelectDefaultPicker.d.ts +2 -1
- package/dist/types/src/Select/components/SelectDefaultPicker/SelectDefaultPicker.ios.d.ts +2 -1
- package/dist/types/src/Select/components/SelectInternalPicker/SelectInternalPicker.d.ts +2 -1
- package/dist/types/src/Select/components/SelectPressable/SelectPressable.d.ts +2 -1
- package/dist/types/src/StatusLabel/StatusLabel.d.ts +2 -1
- package/dist/types/src/StatusLabel/StatusLabel.style.d.ts +1 -1
- package/dist/types/src/Switch/Switch.d.ts +2 -1
- package/dist/types/src/Switch/components/BaseSwitch/BaseSwitch.d.ts +2 -1
- package/dist/types/src/Text/Text.d.ts +4 -3
- package/dist/types/src/TextList/TextList.d.ts +2 -1
- package/dist/types/src/ThumbnailList/ThumbnailList.d.ts +2 -1
- package/dist/types/src/Toast/Toast.d.ts +2 -1
- package/dist/types/src/Typography/Typography.d.ts +3 -3
- package/dist/types/src/Typography/TypographyGestureDetector.d.ts +2 -1
- package/dist/types/src/utils/test/MockSafeAreaProvider.d.ts +1 -1
- package/package.json +26 -15
- package/src/ActionItem/ActionItem.tsx +1 -1
- package/src/ActionItem/ActionItemGroup.tsx +1 -3
- package/src/ActionItem/components/ActionItemContainer.tsx +1 -1
- package/src/ActionLabel/ActionLabel.test.tsx +12 -0
- package/src/ActionLabel/ActionLabel.tsx +3 -3
- package/src/ActionLabel/__snapshots__/ActionLabel.test.tsx.snap +66 -0
- package/src/ActivityIndicator/ActivityIndicator.tsx +1 -3
- package/src/AtlantisContext/AtlantisContext.test.tsx +1 -1
- package/src/AtlantisThemeContext/AtlantisThemeContext.test.tsx +5 -5
- package/src/AutoLink/AutoLink.test.tsx +2 -4
- package/src/AutoLink/AutoLink.tsx +1 -1
- package/src/AutoLink/components/ComposeTextWithLinks/ComposeTextWithLinks.tsx +1 -1
- package/src/AutoLink/components/Link/Link.tsx +1 -5
- package/src/Banner/Banner.test.tsx +12 -0
- package/src/Banner/Banner.tsx +4 -2
- package/src/Banner/components/BannerIcon/BannerIcon.style.ts +3 -0
- package/src/Banner/components/BannerIcon/BannerIcon.tsx +1 -1
- package/src/Banner/types.ts +1 -1
- package/src/BottomSheet/BottomSheet.stories.tsx +128 -0
- package/src/BottomSheet/BottomSheet.style.ts +7 -14
- package/src/BottomSheet/BottomSheet.test.tsx +34 -39
- package/src/BottomSheet/BottomSheet.tsx +112 -92
- package/src/BottomSheet/components/BottomSheetOption/BottomSheetOption.tsx +1 -1
- package/src/BottomSheet/hooks/useBottomSheetBackHandler.test.ts +90 -0
- package/src/BottomSheet/hooks/useBottomSheetBackHandler.ts +41 -0
- package/src/Button/Button.tsx +1 -1
- package/src/Button/components/InternalButtonLoading/InternalButtonLoading.tsx +1 -2
- package/src/ButtonGroup/ButtonGroup.test.tsx +13 -11
- package/src/ButtonGroup/ButtonGroup.tsx +2 -2
- package/src/ButtonGroup/ButtonGroupAction.tsx +4 -4
- package/src/ButtonGroup/components/SecondaryActionSheet/SecondaryActionSheet.tsx +2 -2
- package/src/Card/Card.tsx +1 -1
- package/src/Card/components/InternalCardHeader.tsx +1 -1
- package/src/Checkbox/Checkbox.test.tsx +118 -1
- package/src/Checkbox/Checkbox.tsx +2 -2
- package/src/Checkbox/CheckboxGroup.test.tsx +3 -7
- package/src/Checkbox/CheckboxGroup.tsx +2 -2
- package/src/Chip/Chip.style.ts +1 -1
- package/src/Chip/Chip.tsx +20 -2
- package/src/Content/Content.tsx +7 -2
- package/src/Content/ContentHorizontal.style.ts +20 -0
- package/src/Content/ContentSpaceAround.style.ts +20 -0
- package/src/Content/ContentVertical.style.ts +20 -0
- package/src/ContentOverlay/ContentOverlay.test.tsx +34 -27
- package/src/ContentOverlay/ContentOverlay.tsx +7 -7
- package/src/ContentOverlay/UNSAFE_WrappedModalize.tsx +41 -0
- package/src/ContentOverlay/hooks/useKeyboardVisibility.test.ts +7 -7
- package/src/ContentOverlay/hooks/useViewLayoutHeight.test.ts +1 -1
- package/src/Disclosure/Disclosure.tsx +1 -1
- package/src/Divider/Divider.tsx +1 -1
- package/src/EmptyState/EmptyState.test.tsx +29 -42
- package/src/EmptyState/EmptyState.tsx +1 -1
- package/src/ErrorMessageWrapper/ErrorMessageWrapper.tsx +1 -1
- package/src/ErrorMessageWrapper/context/ErrorMessageProvider.tsx +3 -5
- package/src/ErrorMessageWrapper/context/types.ts +1 -1
- package/src/Flex/Flex.tsx +2 -2
- package/src/Form/Form.test.tsx +145 -2
- package/src/Form/Form.tsx +8 -1
- package/src/Form/components/FormActionBar/FormActionBar.tsx +3 -3
- package/src/Form/components/FormBody/FormBody.tsx +3 -3
- package/src/Form/components/FormCache/FormCache.tsx +5 -4
- package/src/Form/components/FormErrorBanner/FormErrorBanner.tsx +1 -1
- package/src/Form/components/FormMask/FormMask.tsx +1 -1
- package/src/Form/components/FormMessage/FormMessage.test.tsx +40 -27
- package/src/Form/components/FormMessage/FormMessage.tsx +1 -1
- package/src/Form/components/FormMessage/components/InternalFormMessage/InternalFormMessage.tsx +1 -1
- package/src/Form/components/FormMessageBanner/FormMessageBanner.tsx +1 -3
- package/src/Form/components/FormSaveButton/FormSaveButton.test.tsx +2 -2
- package/src/Form/components/FormSaveButton/FormSaveButton.tsx +1 -1
- package/src/Form/context/AtlantisFormContext.test.tsx +1 -1
- package/src/Form/context/AtlantisFormContext.tsx +1 -0
- package/src/Form/context/types.ts +5 -4
- package/src/Form/hooks/useFormViewRefs.ts +4 -5
- package/src/Form/hooks/useInternalForm.ts +14 -6
- package/src/Form/hooks/useScrollToError/useScrollToError.test.tsx +2 -1
- package/src/Form/types.ts +14 -8
- package/src/FormField/FormField.tsx +1 -1
- package/src/FormatFile/FormatFile.test.tsx +21 -21
- package/src/FormatFile/FormatFile.tsx +3 -3
- package/src/FormatFile/components/ErrorIcon/ErrorIcon.tsx +1 -1
- package/src/FormatFile/components/FileView/FileView.tsx +1 -1
- package/src/FormatFile/components/FormatFileBottomSheet/FormatFileBottomSheet.test.tsx +14 -14
- package/src/FormatFile/components/FormatFileBottomSheet/FormatFileBottomSheet.tsx +2 -2
- package/src/FormatFile/components/MediaView/MediaView.test.tsx +283 -0
- package/src/FormatFile/components/MediaView/MediaView.tsx +28 -7
- package/src/FormatFile/components/ProgressBar/ProgressBar.tsx +1 -1
- package/src/FormatFile/utils/createUseCreateThumbnail.ts +1 -1
- package/src/Glimmer/Glimmer.test.tsx +2 -2
- package/src/Heading/Heading.test.tsx +13 -0
- package/src/Heading/Heading.tsx +3 -3
- package/src/Heading/__snapshots__/Heading.test.tsx.snap +65 -0
- package/src/Icon/Icon.tsx +1 -1
- package/src/Icon/__snapshots__/Icon.test.tsx.snap +7 -0
- package/src/IconButton/IconButton.tsx +1 -1
- package/src/InputCurrency/InputCurrency.tsx +72 -58
- package/src/InputDate/InputDate.tsx +7 -3
- package/src/InputEmail/InputEmail.tsx +15 -8
- package/src/InputFieldWrapper/InputFieldWrapper.style.ts +1 -1
- package/src/InputFieldWrapper/InputFieldWrapper.test.tsx +48 -1
- package/src/InputFieldWrapper/InputFieldWrapper.tsx +39 -29
- package/src/InputFieldWrapper/components/ClearAction/ClearAction.tsx +1 -1
- package/src/InputFieldWrapper/components/Prefix/Prefix.test.tsx +8 -16
- package/src/InputFieldWrapper/components/Prefix/Prefix.tsx +8 -6
- package/src/InputFieldWrapper/components/Suffix/Suffix.test.tsx +2 -4
- package/src/InputFieldWrapper/components/Suffix/Suffix.tsx +8 -6
- package/src/InputNumber/InputNumber.tsx +11 -7
- package/src/InputPassword/InputPassword.tsx +1 -1
- package/src/InputPressable/InputPressable.style.ts +4 -0
- package/src/InputPressable/InputPressable.test.tsx +75 -1
- package/src/InputPressable/InputPressable.tsx +34 -8
- package/src/InputSearch/InputSearch.tsx +2 -1
- package/src/InputSearch/components/FilterButton.tsx +1 -1
- package/src/InputText/InputText.style.ts +5 -0
- package/src/InputText/InputText.test.tsx +190 -1
- package/src/InputText/InputText.tsx +37 -20
- package/src/InputText/context/InputAccessoriesProvider.tsx +1 -1
- package/src/InputTime/InputTime.tsx +7 -3
- package/src/Menu/Menu.tsx +3 -3
- package/src/Menu/components/MenuOption/MenuOption.tsx +1 -1
- package/src/Menu/components/Overlay/Overlay.tsx +1 -1
- package/src/Menu/types.ts +7 -1
- package/src/ProgressBar/ProgressBar.test.tsx +109 -0
- package/src/ProgressBar/ProgressBar.tsx +18 -2
- package/src/ProgressBar/ProgressBarInner.tsx +8 -11
- package/src/ProgressBar/ProgressBarStepped.tsx +12 -1
- package/src/ProgressBar/__snapshots__/ProgressBar.test.tsx.snap +14 -0
- package/src/ProgressBar/types.ts +22 -0
- package/src/Select/Select.style.ts +1 -0
- package/src/Select/Select.tsx +2 -2
- package/src/Select/components/SelectDefaultPicker/SelectDefaultPicker.ios.tsx +1 -1
- package/src/Select/components/SelectDefaultPicker/SelectDefaultPicker.tsx +1 -1
- package/src/Select/components/SelectInternalPicker/SelectInternalPicker.tsx +1 -1
- package/src/Select/components/SelectPressable/SelectPressable.tsx +1 -4
- package/src/StatusLabel/StatusLabel.style.ts +2 -2
- package/src/StatusLabel/StatusLabel.tsx +1 -1
- package/src/StatusLabel/__snapshots__/StatusLabel.test.tsx.snap +14 -14
- package/src/Switch/Switch.tsx +1 -1
- package/src/Switch/components/BaseSwitch/BaseSwitch.tsx +8 -2
- package/src/Text/Text.test.tsx +10 -0
- package/src/Text/Text.tsx +3 -3
- package/src/Text/__snapshots__/Text.test.tsx.snap +66 -0
- package/src/TextList/TextList.tsx +1 -1
- package/src/ThumbnailList/ThumbnailList.test.tsx +5 -5
- package/src/ThumbnailList/ThumbnailList.tsx +1 -1
- package/src/ThumbnailList/__snapshots__/ThumbnailList.test.tsx.snap +199 -1
- package/src/Toast/Toast.tsx +2 -2
- package/src/Typography/Typography.test.tsx +61 -0
- package/src/Typography/Typography.tsx +25 -9
- package/src/Typography/TypographyGestureDetector.tsx +1 -3
- package/src/Typography/__snapshots__/Typography.test.tsx.snap +222 -0
- package/src/hooks/useAtlantisI18n/locales/en.json +1 -0
- package/src/hooks/useAtlantisI18n/locales/es.json +1 -0
- package/src/hooks/useFormController.ts +7 -14
- package/src/utils/test/MockSafeAreaProvider.tsx +1 -1
- package/dist/tsconfig.tsbuildinfo +0 -1
|
@@ -1,2 +1,3 @@
|
|
|
1
|
+
import React from "react";
|
|
1
2
|
import type { ProgressBarProps } from "./types";
|
|
2
|
-
export declare function ProgressBar({ loading, total, current, inProgress, reverseTheme, header, variation, size, }: ProgressBarProps): JSX.Element;
|
|
3
|
+
export declare function ProgressBar({ loading, total, current, inProgress, reverseTheme, header, variation, size, UNSAFE_style, }: ProgressBarProps): React.JSX.Element;
|
|
@@ -1,8 +1,12 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { StyleProp, ViewStyle } from "react-native";
|
|
1
3
|
interface ProgressBarInnerProps {
|
|
2
4
|
readonly width: number;
|
|
3
5
|
readonly animationDuration?: number;
|
|
4
6
|
readonly color?: string;
|
|
7
|
+
readonly style?: StyleProp<ViewStyle>;
|
|
8
|
+
readonly testID?: string;
|
|
5
9
|
}
|
|
6
|
-
export declare function ProgressBarInner({ width, color, }: ProgressBarInnerProps): JSX.Element;
|
|
10
|
+
export declare function ProgressBarInner({ width, color, style, testID, }: ProgressBarInnerProps): React.JSX.Element;
|
|
7
11
|
export declare function calculateWidth(total: number, current: number): number;
|
|
8
12
|
export {};
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
+
import type { ProgressBarUnsafeStyle } from "./types";
|
|
2
3
|
interface ProgressBarSteppedProps {
|
|
3
4
|
readonly total: number;
|
|
4
5
|
readonly current: number;
|
|
5
6
|
readonly color?: string;
|
|
6
7
|
readonly loading?: boolean;
|
|
7
8
|
readonly inProgress?: number;
|
|
9
|
+
readonly UNSAFE_style?: ProgressBarUnsafeStyle;
|
|
8
10
|
}
|
|
9
|
-
export declare function ProgressBarStepped({ total, current, color, loading, inProgress, }: ProgressBarSteppedProps): React.JSX.Element;
|
|
11
|
+
export declare function ProgressBarStepped({ total, current, color, loading, inProgress, UNSAFE_style, }: ProgressBarSteppedProps): React.JSX.Element;
|
|
10
12
|
export {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { ReactNode } from "react";
|
|
2
|
+
import type { StyleProp, ViewStyle } from "react-native";
|
|
2
3
|
export interface ProgressBarProps {
|
|
3
4
|
/**
|
|
4
5
|
* The total number of items to be completed
|
|
@@ -36,4 +37,23 @@ export interface ProgressBarProps {
|
|
|
36
37
|
* @default base
|
|
37
38
|
*/
|
|
38
39
|
readonly size?: "smaller" | "small" | "base";
|
|
40
|
+
/** **Use at your own risk:** Custom style for specific elements. This should only be used as a
|
|
41
|
+
* **last resort**. Using this may result in unexpected side effects.
|
|
42
|
+
* More information in the [Customizing components Guide](https://atlantis.getjobber.com/guides/customizing-components).
|
|
43
|
+
*/
|
|
44
|
+
readonly UNSAFE_style?: ProgressBarUnsafeStyle;
|
|
45
|
+
}
|
|
46
|
+
export interface ProgressBarUnsafeStyle {
|
|
47
|
+
/** Styles applied to the outer accessible wrapper (role="progressbar"). */
|
|
48
|
+
container?: StyleProp<ViewStyle>;
|
|
49
|
+
/** Styles applied to the inner bar container (track container) – controls bar height/rounding. */
|
|
50
|
+
progressBarContainer?: StyleProp<ViewStyle>;
|
|
51
|
+
/** Styles applied to each step block in the stepped variation. */
|
|
52
|
+
step?: StyleProp<ViewStyle>;
|
|
53
|
+
/** Track/background bar in 'progress' variation (full-width inner) */
|
|
54
|
+
track?: StyleProp<ViewStyle>;
|
|
55
|
+
/** Filled/completed portion in 'progress' variation */
|
|
56
|
+
fill?: StyleProp<ViewStyle>;
|
|
57
|
+
/** In-progress overlay portion in 'progress' variation */
|
|
58
|
+
inProgressFill?: StyleProp<ViewStyle>;
|
|
39
59
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { ReactElement } from "react";
|
|
2
|
+
import React from "react";
|
|
2
3
|
import type { RegisterOptions } from "react-hook-form";
|
|
3
4
|
export interface SelectOption {
|
|
4
5
|
/**
|
|
@@ -69,5 +70,5 @@ export interface SelectProps {
|
|
|
69
70
|
*/
|
|
70
71
|
readonly testID?: string;
|
|
71
72
|
}
|
|
72
|
-
export declare function Select({ value, defaultValue, onChange, children, placeholder, label, assistiveText, disabled, invalid, validations, accessibilityLabel, name, testID, }: SelectProps): JSX.Element;
|
|
73
|
-
export declare function Option({ children }: SelectOption): JSX.Element;
|
|
73
|
+
export declare function Select({ value, defaultValue, onChange, children, placeholder, label, assistiveText, disabled, invalid, validations, accessibilityLabel, name, testID, }: SelectProps): React.JSX.Element;
|
|
74
|
+
export declare function Option({ children }: SelectOption): React.JSX.Element;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
+
import React from "react";
|
|
1
2
|
import type { SelectInternalPickerProps } from "../../types";
|
|
2
3
|
type SelectDefaultPickerProps = SelectInternalPickerProps;
|
|
3
|
-
export declare function SelectDefaultPicker({ children, options, disabled, onChange, }: SelectDefaultPickerProps): JSX.Element;
|
|
4
|
+
export declare function SelectDefaultPicker({ children, options, disabled, onChange, }: SelectDefaultPickerProps): React.JSX.Element;
|
|
4
5
|
export {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
+
import React from "react";
|
|
1
2
|
import type { SelectInternalPickerProps } from "../../types";
|
|
2
3
|
type SelectDefaultPickerProps = SelectInternalPickerProps;
|
|
3
|
-
export declare function SelectDefaultPicker({ children, options, onChange, }: SelectDefaultPickerProps): JSX.Element;
|
|
4
|
+
export declare function SelectDefaultPicker({ children, options, onChange, }: SelectDefaultPickerProps): React.JSX.Element;
|
|
4
5
|
export {};
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
+
import React from "react";
|
|
1
2
|
import type { SelectInternalPickerProps } from "../../types";
|
|
2
|
-
export declare function SelectInternalPicker({ children, options, disabled, onChange, }: SelectInternalPickerProps): JSX.Element;
|
|
3
|
+
export declare function SelectInternalPicker({ children, options, disabled, onChange, }: SelectInternalPickerProps): React.JSX.Element;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from "react";
|
|
1
2
|
import type { PressableProps } from "react-native";
|
|
2
3
|
import type { SelectInternalPickerProps } from "../../types";
|
|
3
4
|
type SelectPressableProps = Pick<SelectInternalPickerProps, "children"> & Pick<PressableProps, "onPress">;
|
|
@@ -6,5 +7,5 @@ type SelectPressableProps = Pick<SelectInternalPickerProps, "children"> & Pick<P
|
|
|
6
7
|
* screen-reader is being used to avoid screen-readers from ignoring the press
|
|
7
8
|
* on the MenuView
|
|
8
9
|
*/
|
|
9
|
-
export declare function SelectPressable({ children, onPress
|
|
10
|
+
export declare function SelectPressable({ children, onPress }: SelectPressableProps): React.JSX.Element;
|
|
10
11
|
export {};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from "react";
|
|
1
2
|
export type StatusType = "success" | "warning" | "critical" | "inactive" | "informative";
|
|
2
3
|
export interface StatusLabelType {
|
|
3
4
|
readonly statusLabel: string;
|
|
@@ -17,5 +18,5 @@ interface StatusLabelProps {
|
|
|
17
18
|
*/
|
|
18
19
|
readonly status?: StatusType;
|
|
19
20
|
}
|
|
20
|
-
export declare function StatusLabel({ text, alignment, status, }: StatusLabelProps): JSX.Element;
|
|
21
|
+
export declare function StatusLabel({ text, alignment, status, }: StatusLabelProps): React.JSX.Element;
|
|
21
22
|
export {};
|
|
@@ -3,6 +3,7 @@ export declare const useStyles: () => {
|
|
|
3
3
|
flexDirection: "row";
|
|
4
4
|
justifyContent: "flex-end";
|
|
5
5
|
alignItems: "center";
|
|
6
|
+
alignSelf: "flex-start";
|
|
6
7
|
flexWrap: "nowrap";
|
|
7
8
|
flexGrow: number;
|
|
8
9
|
flexShrink: number;
|
|
@@ -14,7 +15,6 @@ export declare const useStyles: () => {
|
|
|
14
15
|
};
|
|
15
16
|
statusLabelText: {
|
|
16
17
|
flexShrink: number;
|
|
17
|
-
marginBottom: number;
|
|
18
18
|
};
|
|
19
19
|
labelTextStartAligned: {
|
|
20
20
|
flexDirection: "row-reverse";
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from "react";
|
|
1
2
|
import type { XOR } from "ts-xor";
|
|
2
3
|
import type { BaseSwitchProps } from "./components/BaseSwitch";
|
|
3
4
|
interface WithLabelProps extends BaseSwitchProps {
|
|
@@ -11,5 +12,5 @@ interface WithLabelProps extends BaseSwitchProps {
|
|
|
11
12
|
readonly description?: string;
|
|
12
13
|
}
|
|
13
14
|
export type SwitchProps = XOR<BaseSwitchProps, WithLabelProps>;
|
|
14
|
-
export declare function Switch(props: SwitchProps): JSX.Element;
|
|
15
|
+
export declare function Switch(props: SwitchProps): React.JSX.Element;
|
|
15
16
|
export {};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from "react";
|
|
1
2
|
export interface BaseSwitchProps {
|
|
2
3
|
/**
|
|
3
4
|
* Value of the switch
|
|
@@ -24,4 +25,4 @@ export interface BaseSwitchProps {
|
|
|
24
25
|
*/
|
|
25
26
|
readonly name?: string;
|
|
26
27
|
}
|
|
27
|
-
export declare function BaseSwitch({ value, defaultValue, onValueChange, disabled, accessibilityLabel, name, }: BaseSwitchProps): JSX.Element;
|
|
28
|
+
export declare function BaseSwitch({ value, defaultValue, onValueChange, disabled, accessibilityLabel, name, }: BaseSwitchProps): React.JSX.Element;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from "react";
|
|
1
2
|
import type { OnTextLayoutEvent, TextAlign, TextVariation, TruncateLength, TypographyProps } from "../Typography";
|
|
2
3
|
import type { TypographyUnsafeStyle } from "../Typography/Typography";
|
|
3
4
|
export interface TextProps extends Pick<TypographyProps<"base">, "maxFontScaleSize" | "selectable"> {
|
|
@@ -31,9 +32,9 @@ export interface TextProps extends Pick<TypographyProps<"base">, "maxFontScaleSi
|
|
|
31
32
|
*/
|
|
32
33
|
readonly align?: TextAlign;
|
|
33
34
|
/**
|
|
34
|
-
* Text to display
|
|
35
|
+
* Text to display. Supports nesting text elements.
|
|
35
36
|
*/
|
|
36
|
-
readonly children?:
|
|
37
|
+
readonly children?: React.ReactNode;
|
|
37
38
|
/**
|
|
38
39
|
* Reverse theme for better display on dark background
|
|
39
40
|
*/
|
|
@@ -73,4 +74,4 @@ export interface TextProps extends Pick<TypographyProps<"base">, "maxFontScaleSi
|
|
|
73
74
|
}
|
|
74
75
|
export type TextLevel = "text" | "textSupporting";
|
|
75
76
|
export declare const TEXT_MAX_SCALED_FONT_SIZES: Record<TextLevel, number>;
|
|
76
|
-
export declare function Text({ level, variation, emphasis, allowFontScaling, adjustsFontSizeToFit, maxLines, align, children, reverseTheme, strikeThrough, italic, hideFromScreenReader, maxFontScaleSize, UNSAFE_style, underline, selectable, onTextLayout, }: TextProps): JSX.Element;
|
|
77
|
+
export declare function Text({ level, variation, emphasis, allowFontScaling, adjustsFontSizeToFit, maxLines, align, children, reverseTheme, strikeThrough, italic, hideFromScreenReader, maxFontScaleSize, UNSAFE_style, underline, selectable, onTextLayout, }: TextProps): React.JSX.Element;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from "react";
|
|
1
2
|
import type { Spacing } from "../Content";
|
|
2
3
|
import type { TextLevel } from "../Text";
|
|
3
4
|
interface TextListProps {
|
|
@@ -25,5 +26,5 @@ interface TextListProps {
|
|
|
25
26
|
*/
|
|
26
27
|
readonly childSpacing?: Spacing;
|
|
27
28
|
}
|
|
28
|
-
export declare function TextList({ items, childSpacing, emphasis, level, spacing, }: TextListProps): JSX.Element;
|
|
29
|
+
export declare function TextList({ items, childSpacing, emphasis, level, spacing, }: TextListProps): React.JSX.Element;
|
|
29
30
|
export {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
+
import React from "react";
|
|
1
2
|
import type { ThumbnailListProps } from "./types";
|
|
2
3
|
import type { File } from "../FormatFile";
|
|
3
4
|
export declare const filterImages: (files: File[]) => File[];
|
|
4
|
-
export declare function ThumbnailList({ files, rowCount, handleOpenFile, createThumbnail, }: ThumbnailListProps): JSX.Element;
|
|
5
|
+
export declare function ThumbnailList({ files, rowCount, handleOpenFile, createThumbnail, }: ThumbnailListProps): React.JSX.Element;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from "react";
|
|
1
2
|
import type { ToastPosition } from "react-native-toast-message";
|
|
2
3
|
export interface JobberToastProps {
|
|
3
4
|
/**
|
|
@@ -7,7 +8,7 @@ export interface JobberToastProps {
|
|
|
7
8
|
*/
|
|
8
9
|
readonly bottomOffset?: number;
|
|
9
10
|
}
|
|
10
|
-
export declare function JobberToast({ bottomOffset }: JobberToastProps): JSX.Element;
|
|
11
|
+
export declare function JobberToast({ bottomOffset }: JobberToastProps): React.JSX.Element;
|
|
11
12
|
export interface ShowToastParams {
|
|
12
13
|
/**
|
|
13
14
|
* Message to be displayed in the toast
|
|
@@ -24,9 +24,9 @@ export interface TypographyProps<T extends FontFamily> {
|
|
|
24
24
|
*/
|
|
25
25
|
readonly size?: TextSize;
|
|
26
26
|
/**
|
|
27
|
-
* Text to display
|
|
27
|
+
* Text to display. Supports nesting text elements.
|
|
28
28
|
*/
|
|
29
|
-
readonly children?:
|
|
29
|
+
readonly children?: React.ReactNode;
|
|
30
30
|
/**
|
|
31
31
|
* The maximum amount of lines the text can occupy before being truncated with "...".
|
|
32
32
|
* Uses predefined string values that correspond to a doubling scale for the amount of lines.
|
|
@@ -105,7 +105,7 @@ export interface TypographyUnsafeStyle {
|
|
|
105
105
|
textStyle?: StyleProp<TextStyle>;
|
|
106
106
|
}
|
|
107
107
|
export declare const Typography: React.MemoExoticComponent<typeof InternalTypography>;
|
|
108
|
-
declare function InternalTypography<T extends FontFamily = "base">({ fontFamily, fontStyle, fontWeight, transform, color, align, size, children, maxLines, allowFontScaling, maxFontScaleSize, adjustsFontSizeToFit, lineHeight, letterSpacing, reverseTheme, hideFromScreenReader, accessibilityRole, strikeThrough, underline, UNSAFE_style, selectable, onTextLayout, }: TypographyProps<T>): JSX.Element;
|
|
108
|
+
declare function InternalTypography<T extends FontFamily = "base">({ fontFamily, fontStyle, fontWeight, transform, color, align, size, children, maxLines, allowFontScaling, maxFontScaleSize, adjustsFontSizeToFit, lineHeight, letterSpacing, reverseTheme, hideFromScreenReader, accessibilityRole, strikeThrough, underline, UNSAFE_style, selectable, onTextLayout, }: TypographyProps<T>): React.JSX.Element;
|
|
109
109
|
export type FontFamily = "base" | "display";
|
|
110
110
|
export type FontStyle = "regular" | "italic";
|
|
111
111
|
export type FontWeight = "regular" | "medium" | "bold" | "semiBold" | "extraBold" | "black";
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { PropsWithChildren } from "react";
|
|
2
|
+
import React from "react";
|
|
2
3
|
/**
|
|
3
4
|
* This is a workaround suggested by react-native-gesture-handler to prevent
|
|
4
5
|
* accidental highlighting of text in Android devices
|
|
5
6
|
* https://github.com/software-mansion/react-native-gesture-handler/issues/1372
|
|
6
7
|
*/
|
|
7
|
-
export declare function TypographyGestureDetector(props: PropsWithChildren<unknown>): JSX.Element;
|
|
8
|
+
export declare function TypographyGestureDetector(props: PropsWithChildren<unknown>): React.JSX.Element;
|
|
@@ -5,5 +5,5 @@ interface MockSafeAreaProviderProps {
|
|
|
5
5
|
readonly frame?: Rect;
|
|
6
6
|
readonly insets?: EdgeInsets;
|
|
7
7
|
}
|
|
8
|
-
export declare function MockSafeAreaProvider({ frame, insets, children, }: MockSafeAreaProviderProps): JSX.Element;
|
|
8
|
+
export declare function MockSafeAreaProvider({ frame, insets, children, }: MockSafeAreaProviderProps): React.JSX.Element;
|
|
9
9
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jobber/components-native",
|
|
3
|
-
"version": "0.84.4-match-mobi-
|
|
3
|
+
"version": "0.84.4-match-mobi-540af48.10+540af48e1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "React Native implementation of Atlantis",
|
|
6
6
|
"repository": {
|
|
@@ -32,10 +32,10 @@
|
|
|
32
32
|
"build": "npm run build:clean && npm run compile",
|
|
33
33
|
"bootstrap": "npm run build",
|
|
34
34
|
"prepack": "npm run build",
|
|
35
|
-
"compile": "tsc -
|
|
35
|
+
"compile": "tsc -p tsconfig.build.json",
|
|
36
36
|
"build:clean": "rm -rf ./dist",
|
|
37
37
|
"storybook": "storybook dev -p 6008 --disable-telemetry",
|
|
38
|
-
"build
|
|
38
|
+
"storybook:build": "storybook build --disable-telemetry"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
41
|
"@react-native-clipboard/clipboard": "^1.11.2",
|
|
@@ -43,8 +43,8 @@
|
|
|
43
43
|
"autolinker": "^4.0.0",
|
|
44
44
|
"deepmerge": "^4.2.2",
|
|
45
45
|
"lodash": "^4.17.21",
|
|
46
|
-
"react-hook-form": "^7.
|
|
47
|
-
"react-intl": "^
|
|
46
|
+
"react-hook-form": "^7.52.0",
|
|
47
|
+
"react-intl": "^7.1.11",
|
|
48
48
|
"react-native-keyboard-aware-scroll-view": "^0.9.5",
|
|
49
49
|
"react-native-modalize": "^2.0.13",
|
|
50
50
|
"react-native-portalize": "^1.0.7",
|
|
@@ -53,30 +53,41 @@
|
|
|
53
53
|
"ts-xor": "^1.1.0"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
|
+
"@gorhom/bottom-sheet": "^5.2.8",
|
|
57
|
+
"@react-native-community/datetimepicker": "^8.4.5",
|
|
58
|
+
"@react-native/babel-preset": "^0.82.1",
|
|
56
59
|
"@storybook/addon-a11y": "^9.1.2",
|
|
57
60
|
"@storybook/react": "^9.1.2",
|
|
58
61
|
"@storybook/react-native-web-vite": "^9.1.2",
|
|
59
|
-
"@testing-library/
|
|
60
|
-
"@testing-library/react-native": "^12.0.1",
|
|
62
|
+
"@testing-library/react-native": "^13.3.3",
|
|
61
63
|
"@types/lodash.chunk": "^4.2.7",
|
|
62
64
|
"@types/lodash.debounce": "^4.0.7",
|
|
63
65
|
"@types/lodash.identity": "^3.0.7",
|
|
64
|
-
"@types/react": "^18.0.28",
|
|
65
66
|
"@types/react-native-uuid": "^1.4.0",
|
|
66
|
-
"
|
|
67
|
-
"
|
|
67
|
+
"@types/react-test-renderer": "19.1.0",
|
|
68
|
+
"date-fns": "^2.30.0",
|
|
69
|
+
"date-fns-tz": "^2.0.0",
|
|
70
|
+
"react-native": "^0.82.1",
|
|
71
|
+
"react-native-gesture-handler": "^2.29.1",
|
|
72
|
+
"react-native-modal-datetime-picker": "^18.0.0",
|
|
73
|
+
"react-native-reanimated": "^3.7.1",
|
|
74
|
+
"react-native-safe-area-context": "^5.4.0",
|
|
75
|
+
"react-native-svg": "^15.1.0",
|
|
76
|
+
"react-native-web": "^0.20.0",
|
|
77
|
+
"react-test-renderer": "^19.1.1",
|
|
68
78
|
"storybook": "^9.1.2"
|
|
69
79
|
},
|
|
70
80
|
"peerDependencies": {
|
|
71
81
|
"@babel/core": "^7.4.5",
|
|
82
|
+
"@gorhom/bottom-sheet": "^5.2.8",
|
|
72
83
|
"@jobber/design": "*",
|
|
73
84
|
"@react-native-community/datetimepicker": ">=6.7.0",
|
|
74
85
|
"date-fns": "^2.30.0",
|
|
75
86
|
"date-fns-tz": "^2.0.0",
|
|
76
|
-
"react": "^
|
|
77
|
-
"react-intl": "^6
|
|
78
|
-
"react-native": ">=0.
|
|
79
|
-
"react-native-gesture-handler": ">=2.
|
|
87
|
+
"react": "^19",
|
|
88
|
+
"react-intl": "^6 || ^7",
|
|
89
|
+
"react-native": ">=0.79.5",
|
|
90
|
+
"react-native-gesture-handler": ">=2.22.0",
|
|
80
91
|
"react-native-keyboard-aware-scroll-view": "^0.9.5",
|
|
81
92
|
"react-native-modal-datetime-picker": " >=13.0.0",
|
|
82
93
|
"react-native-modalize": "^2.0.13",
|
|
@@ -85,5 +96,5 @@
|
|
|
85
96
|
"react-native-safe-area-context": "^5.4.0",
|
|
86
97
|
"react-native-svg": ">=12.0.0"
|
|
87
98
|
},
|
|
88
|
-
"gitHead": "
|
|
99
|
+
"gitHead": "540af48e1dfd90116999584f50bca29c4ab9e0ba"
|
|
89
100
|
}
|
|
@@ -18,9 +18,7 @@ interface ActionItemGroupProps {
|
|
|
18
18
|
readonly children: ActionItemElement | ActionItemElement[];
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
export function ActionItemGroup({
|
|
22
|
-
children,
|
|
23
|
-
}: ActionItemGroupProps): JSX.Element {
|
|
21
|
+
export function ActionItemGroup({ children }: ActionItemGroupProps) {
|
|
24
22
|
return <View>{renderChildren(children)}</View>;
|
|
25
23
|
}
|
|
26
24
|
|
|
@@ -117,6 +117,18 @@ describe("ActionLabel", () => {
|
|
|
117
117
|
});
|
|
118
118
|
});
|
|
119
119
|
});
|
|
120
|
+
|
|
121
|
+
it("supports nested inline content", () => {
|
|
122
|
+
const { Text } = require("../Text");
|
|
123
|
+
const { getByText, toJSON } = render(
|
|
124
|
+
<ActionLabel>
|
|
125
|
+
Before <Text variation="interactive">Inner</Text> After
|
|
126
|
+
</ActionLabel>,
|
|
127
|
+
);
|
|
128
|
+
|
|
129
|
+
expect(getByText("Inner")).toBeDefined();
|
|
130
|
+
expect(toJSON()).toMatchSnapshot();
|
|
131
|
+
});
|
|
120
132
|
});
|
|
121
133
|
|
|
122
134
|
function getStyleObject(el: ReactTestInstance) {
|
|
@@ -12,9 +12,9 @@ type ActionLabelType = "default" | "cardTitle";
|
|
|
12
12
|
|
|
13
13
|
interface ActionLabelProps {
|
|
14
14
|
/**
|
|
15
|
-
* Text to display
|
|
15
|
+
* Text to display. Supports nesting text elements.
|
|
16
16
|
*/
|
|
17
|
-
readonly children?:
|
|
17
|
+
readonly children?: React.ReactNode;
|
|
18
18
|
|
|
19
19
|
/**
|
|
20
20
|
* Set the display text to disabled color
|
|
@@ -43,7 +43,7 @@ export function ActionLabel({
|
|
|
43
43
|
type = "default",
|
|
44
44
|
disabled = false,
|
|
45
45
|
align = "center",
|
|
46
|
-
}: ActionLabelProps)
|
|
46
|
+
}: ActionLabelProps) {
|
|
47
47
|
return (
|
|
48
48
|
<Typography
|
|
49
49
|
color={getColor(variation, disabled)}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
+
|
|
3
|
+
exports[`ActionLabel supports nested inline content 1`] = `
|
|
4
|
+
<Text
|
|
5
|
+
accessibilityRole="text"
|
|
6
|
+
adjustsFontSizeToFit={false}
|
|
7
|
+
allowFontScaling={true}
|
|
8
|
+
maxFontSizeMultiplier={1.125}
|
|
9
|
+
selectable={false}
|
|
10
|
+
selectionColor="hsl(86, 100%, 46%)"
|
|
11
|
+
style={
|
|
12
|
+
[
|
|
13
|
+
{
|
|
14
|
+
"fontFamily": "inter-semibold",
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"color": "hsl(107, 58%, 33%)",
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"textAlign": "center",
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"fontSize": 16,
|
|
24
|
+
"lineHeight": 18,
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"letterSpacing": 0,
|
|
28
|
+
},
|
|
29
|
+
]
|
|
30
|
+
}
|
|
31
|
+
>
|
|
32
|
+
Before
|
|
33
|
+
<Text
|
|
34
|
+
accessibilityRole="text"
|
|
35
|
+
adjustsFontSizeToFit={false}
|
|
36
|
+
allowFontScaling={true}
|
|
37
|
+
collapsable={false}
|
|
38
|
+
maxFontSizeMultiplier={3.125}
|
|
39
|
+
selectable={true}
|
|
40
|
+
selectionColor="hsl(86, 100%, 46%)"
|
|
41
|
+
style={
|
|
42
|
+
[
|
|
43
|
+
{
|
|
44
|
+
"fontFamily": "inter-regular",
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"color": "hsl(107, 58%, 33%)",
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"textAlign": "left",
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"fontSize": 16,
|
|
54
|
+
"lineHeight": 20,
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"letterSpacing": 0,
|
|
58
|
+
},
|
|
59
|
+
]
|
|
60
|
+
}
|
|
61
|
+
>
|
|
62
|
+
Inner
|
|
63
|
+
</Text>
|
|
64
|
+
After
|
|
65
|
+
</Text>
|
|
66
|
+
`;
|
|
@@ -3,9 +3,7 @@ import type { ActivityIndicatorProps } from "react-native";
|
|
|
3
3
|
import { ActivityIndicator } from "react-native";
|
|
4
4
|
import { useAtlantisTheme } from "../AtlantisThemeContext";
|
|
5
5
|
|
|
6
|
-
export function JobberActivityIndicator(
|
|
7
|
-
props: ActivityIndicatorProps,
|
|
8
|
-
): JSX.Element {
|
|
6
|
+
export function JobberActivityIndicator(props: ActivityIndicatorProps) {
|
|
9
7
|
const { tokens } = useAtlantisTheme();
|
|
10
8
|
|
|
11
9
|
return (
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
2
2
|
import type { PropsWithChildren } from "react";
|
|
3
3
|
import React from "react";
|
|
4
|
-
import { renderHook } from "@testing-library/react-
|
|
4
|
+
import { renderHook } from "@testing-library/react-native";
|
|
5
5
|
import type { AtlantisContextProps } from "./AtlantisContext";
|
|
6
6
|
import {
|
|
7
7
|
AtlantisContext,
|
|
@@ -51,24 +51,24 @@ describe("ThemeContext", () => {
|
|
|
51
51
|
expect(result.current.tokens).toEqual(expectedLightTokens);
|
|
52
52
|
});
|
|
53
53
|
|
|
54
|
-
it("updates the theme and tokens", () => {
|
|
54
|
+
it("updates the theme and tokens", async () => {
|
|
55
55
|
const { result } = renderHook(useAtlantisTheme, {
|
|
56
56
|
wrapper: (props: AtlantisThemeContextProviderProps) => (
|
|
57
57
|
<Wrapper {...props} />
|
|
58
58
|
),
|
|
59
59
|
});
|
|
60
60
|
|
|
61
|
-
act(() => result.current.setTheme("dark"));
|
|
61
|
+
await act(async () => result.current.setTheme("dark"));
|
|
62
62
|
expect(result.current.theme).toBe("dark");
|
|
63
63
|
expect(result.current.tokens).toEqual(expectedDarkTokens);
|
|
64
64
|
|
|
65
|
-
act(() => result.current.setTheme("light"));
|
|
65
|
+
await act(async () => result.current.setTheme("light"));
|
|
66
66
|
expect(result.current.theme).toBe("light");
|
|
67
67
|
expect(result.current.tokens).toEqual(expectedLightTokens);
|
|
68
68
|
});
|
|
69
69
|
|
|
70
70
|
describe("when theme is forced for provider", () => {
|
|
71
|
-
it("ignores updates to the global theme", () => {
|
|
71
|
+
it("ignores updates to the global theme", async () => {
|
|
72
72
|
const { result } = renderHook(useAtlantisTheme, {
|
|
73
73
|
wrapper: (props: AtlantisThemeContextProviderProps) => (
|
|
74
74
|
<WrapperWithOverride {...props} dangerouslyOverrideTheme="light" />
|
|
@@ -76,7 +76,7 @@ describe("ThemeContext", () => {
|
|
|
76
76
|
});
|
|
77
77
|
|
|
78
78
|
// Update the global theme
|
|
79
|
-
act(() => result.current.setTheme("dark"));
|
|
79
|
+
await act(async () => result.current.setTheme("dark"));
|
|
80
80
|
|
|
81
81
|
// This hook shouldn't be affected by it because it's set to the light theme
|
|
82
82
|
expect(result.current.theme).toBe("light");
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { fireEvent, render } from "@testing-library/react-native";
|
|
3
|
+
import { Linking } from "react-native";
|
|
3
4
|
import { copyTextToClipboard } from "./clipboard";
|
|
4
5
|
import { AutoLink } from "./AutoLink";
|
|
5
6
|
|
|
6
|
-
const mockOpenUrl = jest.
|
|
7
|
-
jest.mock("react-native/Libraries/Linking/Linking", () => ({
|
|
8
|
-
openURL: mockOpenUrl,
|
|
9
|
-
}));
|
|
7
|
+
const mockOpenUrl = jest.spyOn(Linking, "openURL").mockImplementation();
|
|
10
8
|
|
|
11
9
|
jest.mock("./clipboard", () => {
|
|
12
10
|
return {
|
|
@@ -11,7 +11,7 @@ export function AutoLink({
|
|
|
11
11
|
bottomTabsVisible = true,
|
|
12
12
|
selectable = true,
|
|
13
13
|
...rest
|
|
14
|
-
}: AutoLinkProps)
|
|
14
|
+
}: AutoLinkProps) {
|
|
15
15
|
const { splitText, matches } = useCreateLinkedText({ text, ...rest });
|
|
16
16
|
const { tokens } = useAtlantisTheme();
|
|
17
17
|
|
|
@@ -8,11 +8,7 @@ interface LinkProps {
|
|
|
8
8
|
readonly onLongPress?: () => void;
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
-
export function Link({
|
|
12
|
-
children,
|
|
13
|
-
onPress,
|
|
14
|
-
onLongPress,
|
|
15
|
-
}: LinkProps): JSX.Element {
|
|
11
|
+
export function Link({ children, onPress, onLongPress }: LinkProps) {
|
|
16
12
|
return (
|
|
17
13
|
<RNText onPress={onPress} onLongPress={onLongPress}>
|
|
18
14
|
<Text variation="interactive">{children}</Text>
|
|
@@ -35,6 +35,18 @@ describe("Banner", () => {
|
|
|
35
35
|
expect(getByText("Notice me")).toBeDefined();
|
|
36
36
|
expect(icon.props.children.props.name).toBe("starburst");
|
|
37
37
|
});
|
|
38
|
+
|
|
39
|
+
it("renders a success Banner", () => {
|
|
40
|
+
const { getByText, getByTestId } = render(
|
|
41
|
+
<Banner type="success">
|
|
42
|
+
<Text>Your import is complete</Text>
|
|
43
|
+
</Banner>,
|
|
44
|
+
);
|
|
45
|
+
|
|
46
|
+
const icon = getByTestId("ATL-Banner-Icon");
|
|
47
|
+
expect(getByText("Your import is complete")).toBeDefined();
|
|
48
|
+
expect(icon.props.children.props.name).toBe("checkmark");
|
|
49
|
+
});
|
|
38
50
|
});
|
|
39
51
|
|
|
40
52
|
describe("Children", () => {
|