@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
|
@@ -6,18 +6,18 @@ export const useStyles = buildThemedStyles(tokens => {
|
|
|
6
6
|
flexDirection: "row",
|
|
7
7
|
justifyContent: "flex-end",
|
|
8
8
|
alignItems: "center",
|
|
9
|
+
alignSelf: "flex-start",
|
|
9
10
|
flexWrap: "nowrap",
|
|
10
11
|
flexGrow: 0,
|
|
11
12
|
flexShrink: 1,
|
|
12
13
|
gap: tokens["space-smaller"],
|
|
13
14
|
backgroundColor: tokens["color-success--surface"],
|
|
14
15
|
borderRadius: tokens["radius-large"],
|
|
15
|
-
paddingVertical: tokens["space-
|
|
16
|
+
paddingVertical: tokens["space-smallest"] + tokens["space-minuscule"],
|
|
16
17
|
paddingHorizontal: tokens["space-small"],
|
|
17
18
|
},
|
|
18
19
|
statusLabelText: {
|
|
19
20
|
flexShrink: 1,
|
|
20
|
-
marginBottom: -1,
|
|
21
21
|
},
|
|
22
22
|
labelTextStartAligned: {
|
|
23
23
|
flexDirection: "row-reverse",
|
|
@@ -6,6 +6,7 @@ exports[`StatusLabel alignment when alignment prop set to "end" should match sna
|
|
|
6
6
|
[
|
|
7
7
|
{
|
|
8
8
|
"alignItems": "center",
|
|
9
|
+
"alignSelf": "flex-start",
|
|
9
10
|
"backgroundColor": "hsl(109, 28%, 92%)",
|
|
10
11
|
"borderRadius": 16,
|
|
11
12
|
"flexDirection": "row",
|
|
@@ -15,7 +16,7 @@ exports[`StatusLabel alignment when alignment prop set to "end" should match sna
|
|
|
15
16
|
"gap": 4,
|
|
16
17
|
"justifyContent": "flex-end",
|
|
17
18
|
"paddingHorizontal": 8,
|
|
18
|
-
"paddingVertical":
|
|
19
|
+
"paddingVertical": 3,
|
|
19
20
|
},
|
|
20
21
|
{
|
|
21
22
|
"backgroundColor": "hsl(109, 28%, 92%)",
|
|
@@ -28,7 +29,6 @@ exports[`StatusLabel alignment when alignment prop set to "end" should match sna
|
|
|
28
29
|
style={
|
|
29
30
|
{
|
|
30
31
|
"flexShrink": 1,
|
|
31
|
-
"marginBottom": -1,
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
34
|
>
|
|
@@ -88,6 +88,7 @@ exports[`StatusLabel alignment when alignment prop set to default ("start") shou
|
|
|
88
88
|
[
|
|
89
89
|
{
|
|
90
90
|
"alignItems": "center",
|
|
91
|
+
"alignSelf": "flex-start",
|
|
91
92
|
"backgroundColor": "hsl(109, 28%, 92%)",
|
|
92
93
|
"borderRadius": 16,
|
|
93
94
|
"flexDirection": "row",
|
|
@@ -97,7 +98,7 @@ exports[`StatusLabel alignment when alignment prop set to default ("start") shou
|
|
|
97
98
|
"gap": 4,
|
|
98
99
|
"justifyContent": "flex-end",
|
|
99
100
|
"paddingHorizontal": 8,
|
|
100
|
-
"paddingVertical":
|
|
101
|
+
"paddingVertical": 3,
|
|
101
102
|
},
|
|
102
103
|
{
|
|
103
104
|
"backgroundColor": "hsl(109, 28%, 92%)",
|
|
@@ -110,7 +111,6 @@ exports[`StatusLabel alignment when alignment prop set to default ("start") shou
|
|
|
110
111
|
style={
|
|
111
112
|
{
|
|
112
113
|
"flexShrink": 1,
|
|
113
|
-
"marginBottom": -1,
|
|
114
114
|
}
|
|
115
115
|
}
|
|
116
116
|
>
|
|
@@ -170,6 +170,7 @@ exports[`StatusLabel status when status prop set to "critical" should match snap
|
|
|
170
170
|
[
|
|
171
171
|
{
|
|
172
172
|
"alignItems": "center",
|
|
173
|
+
"alignSelf": "flex-start",
|
|
173
174
|
"backgroundColor": "hsl(109, 28%, 92%)",
|
|
174
175
|
"borderRadius": 16,
|
|
175
176
|
"flexDirection": "row",
|
|
@@ -179,7 +180,7 @@ exports[`StatusLabel status when status prop set to "critical" should match snap
|
|
|
179
180
|
"gap": 4,
|
|
180
181
|
"justifyContent": "flex-end",
|
|
181
182
|
"paddingHorizontal": 8,
|
|
182
|
-
"paddingVertical":
|
|
183
|
+
"paddingVertical": 3,
|
|
183
184
|
},
|
|
184
185
|
{
|
|
185
186
|
"backgroundColor": "hsl(7, 63%, 95%)",
|
|
@@ -192,7 +193,6 @@ exports[`StatusLabel status when status prop set to "critical" should match snap
|
|
|
192
193
|
style={
|
|
193
194
|
{
|
|
194
195
|
"flexShrink": 1,
|
|
195
|
-
"marginBottom": -1,
|
|
196
196
|
}
|
|
197
197
|
}
|
|
198
198
|
>
|
|
@@ -252,6 +252,7 @@ exports[`StatusLabel status when status prop set to "inactive" should match snap
|
|
|
252
252
|
[
|
|
253
253
|
{
|
|
254
254
|
"alignItems": "center",
|
|
255
|
+
"alignSelf": "flex-start",
|
|
255
256
|
"backgroundColor": "hsl(109, 28%, 92%)",
|
|
256
257
|
"borderRadius": 16,
|
|
257
258
|
"flexDirection": "row",
|
|
@@ -261,7 +262,7 @@ exports[`StatusLabel status when status prop set to "inactive" should match snap
|
|
|
261
262
|
"gap": 4,
|
|
262
263
|
"justifyContent": "flex-end",
|
|
263
264
|
"paddingHorizontal": 8,
|
|
264
|
-
"paddingVertical":
|
|
265
|
+
"paddingVertical": 3,
|
|
265
266
|
},
|
|
266
267
|
{
|
|
267
268
|
"backgroundColor": "hsl(195, 12%, 94%)",
|
|
@@ -274,7 +275,6 @@ exports[`StatusLabel status when status prop set to "inactive" should match snap
|
|
|
274
275
|
style={
|
|
275
276
|
{
|
|
276
277
|
"flexShrink": 1,
|
|
277
|
-
"marginBottom": -1,
|
|
278
278
|
}
|
|
279
279
|
}
|
|
280
280
|
>
|
|
@@ -334,6 +334,7 @@ exports[`StatusLabel status when status prop set to "informative" should match s
|
|
|
334
334
|
[
|
|
335
335
|
{
|
|
336
336
|
"alignItems": "center",
|
|
337
|
+
"alignSelf": "flex-start",
|
|
337
338
|
"backgroundColor": "hsl(109, 28%, 92%)",
|
|
338
339
|
"borderRadius": 16,
|
|
339
340
|
"flexDirection": "row",
|
|
@@ -343,7 +344,7 @@ exports[`StatusLabel status when status prop set to "informative" should match s
|
|
|
343
344
|
"gap": 4,
|
|
344
345
|
"justifyContent": "flex-end",
|
|
345
346
|
"paddingHorizontal": 8,
|
|
346
|
-
"paddingVertical":
|
|
347
|
+
"paddingVertical": 3,
|
|
347
348
|
},
|
|
348
349
|
{
|
|
349
350
|
"backgroundColor": "hsl(207, 87%, 94%)",
|
|
@@ -356,7 +357,6 @@ exports[`StatusLabel status when status prop set to "informative" should match s
|
|
|
356
357
|
style={
|
|
357
358
|
{
|
|
358
359
|
"flexShrink": 1,
|
|
359
|
-
"marginBottom": -1,
|
|
360
360
|
}
|
|
361
361
|
}
|
|
362
362
|
>
|
|
@@ -416,6 +416,7 @@ exports[`StatusLabel status when status prop set to "warning" should match snaps
|
|
|
416
416
|
[
|
|
417
417
|
{
|
|
418
418
|
"alignItems": "center",
|
|
419
|
+
"alignSelf": "flex-start",
|
|
419
420
|
"backgroundColor": "hsl(109, 28%, 92%)",
|
|
420
421
|
"borderRadius": 16,
|
|
421
422
|
"flexDirection": "row",
|
|
@@ -425,7 +426,7 @@ exports[`StatusLabel status when status prop set to "warning" should match snaps
|
|
|
425
426
|
"gap": 4,
|
|
426
427
|
"justifyContent": "flex-end",
|
|
427
428
|
"paddingHorizontal": 8,
|
|
428
|
-
"paddingVertical":
|
|
429
|
+
"paddingVertical": 3,
|
|
429
430
|
},
|
|
430
431
|
{
|
|
431
432
|
"backgroundColor": "hsl(52, 64%, 89%)",
|
|
@@ -438,7 +439,6 @@ exports[`StatusLabel status when status prop set to "warning" should match snaps
|
|
|
438
439
|
style={
|
|
439
440
|
{
|
|
440
441
|
"flexShrink": 1,
|
|
441
|
-
"marginBottom": -1,
|
|
442
442
|
}
|
|
443
443
|
}
|
|
444
444
|
>
|
|
@@ -498,6 +498,7 @@ exports[`StatusLabel status when status prop set to default ("success") should m
|
|
|
498
498
|
[
|
|
499
499
|
{
|
|
500
500
|
"alignItems": "center",
|
|
501
|
+
"alignSelf": "flex-start",
|
|
501
502
|
"backgroundColor": "hsl(109, 28%, 92%)",
|
|
502
503
|
"borderRadius": 16,
|
|
503
504
|
"flexDirection": "row",
|
|
@@ -507,7 +508,7 @@ exports[`StatusLabel status when status prop set to default ("success") should m
|
|
|
507
508
|
"gap": 4,
|
|
508
509
|
"justifyContent": "flex-end",
|
|
509
510
|
"paddingHorizontal": 8,
|
|
510
|
-
"paddingVertical":
|
|
511
|
+
"paddingVertical": 3,
|
|
511
512
|
},
|
|
512
513
|
{
|
|
513
514
|
"backgroundColor": "hsl(109, 28%, 92%)",
|
|
@@ -520,7 +521,6 @@ exports[`StatusLabel status when status prop set to default ("success") should m
|
|
|
520
521
|
style={
|
|
521
522
|
{
|
|
522
523
|
"flexShrink": 1,
|
|
523
|
-
"marginBottom": -1,
|
|
524
524
|
}
|
|
525
525
|
}
|
|
526
526
|
>
|
package/src/Switch/Switch.tsx
CHANGED
|
@@ -20,7 +20,7 @@ interface WithLabelProps extends BaseSwitchProps {
|
|
|
20
20
|
|
|
21
21
|
export type SwitchProps = XOR<BaseSwitchProps, WithLabelProps>;
|
|
22
22
|
|
|
23
|
-
export function Switch(props: SwitchProps)
|
|
23
|
+
export function Switch(props: SwitchProps) {
|
|
24
24
|
const switchProps: SwitchProps = {
|
|
25
25
|
...props,
|
|
26
26
|
accessibilityLabel: props.accessibilityLabel || props.label,
|
|
@@ -43,7 +43,7 @@ export function BaseSwitch({
|
|
|
43
43
|
disabled = false,
|
|
44
44
|
accessibilityLabel,
|
|
45
45
|
name,
|
|
46
|
-
}: BaseSwitchProps)
|
|
46
|
+
}: BaseSwitchProps) {
|
|
47
47
|
const { field } = useFormController({
|
|
48
48
|
name,
|
|
49
49
|
value: value ?? defaultValue,
|
|
@@ -85,6 +85,12 @@ export function BaseSwitch({
|
|
|
85
85
|
};
|
|
86
86
|
}
|
|
87
87
|
}
|
|
88
|
+
// Temporary fix for iOS 26. Remove when we upgrade to RN 0.81.
|
|
89
|
+
// https://github.com/facebook/react-native/pull/53389
|
|
90
|
+
const iOSBackgroundColor =
|
|
91
|
+
Platform.OS === "ios" && Platform.Version?.startsWith("26.")
|
|
92
|
+
? undefined
|
|
93
|
+
: tokens["color-interactive--background"];
|
|
88
94
|
|
|
89
95
|
return (
|
|
90
96
|
<Switch
|
|
@@ -98,7 +104,7 @@ export function BaseSwitch({
|
|
|
98
104
|
disabled={disabled}
|
|
99
105
|
thumbColor={getThumbColor()}
|
|
100
106
|
trackColor={getTrackColors()}
|
|
101
|
-
ios_backgroundColor={
|
|
107
|
+
ios_backgroundColor={iOSBackgroundColor}
|
|
102
108
|
accessibilityLabel={accessibilityLabel}
|
|
103
109
|
accessibilityRole={"switch"}
|
|
104
110
|
accessibilityState={{
|
package/src/Text/Text.test.tsx
CHANGED
|
@@ -151,6 +151,16 @@ it("renders text with underline styling", () => {
|
|
|
151
151
|
expect(text.toJSON()).toMatchSnapshot();
|
|
152
152
|
});
|
|
153
153
|
|
|
154
|
+
it("supports nested Text children with mixed styles", () => {
|
|
155
|
+
const { getByText, toJSON } = render(
|
|
156
|
+
<Text>
|
|
157
|
+
Hello <Text emphasis="strong">World</Text>!
|
|
158
|
+
</Text>,
|
|
159
|
+
);
|
|
160
|
+
expect(getByText("World")).toBeDefined();
|
|
161
|
+
expect(toJSON()).toMatchSnapshot();
|
|
162
|
+
});
|
|
163
|
+
|
|
154
164
|
describe("UNSAFE_style", () => {
|
|
155
165
|
it("applies custom styles via UNSAFE_style prop", () => {
|
|
156
166
|
const customStyle = {
|
package/src/Text/Text.tsx
CHANGED
|
@@ -53,9 +53,9 @@ export interface TextProps
|
|
|
53
53
|
readonly align?: TextAlign;
|
|
54
54
|
|
|
55
55
|
/**
|
|
56
|
-
* Text to display
|
|
56
|
+
* Text to display. Supports nesting text elements.
|
|
57
57
|
*/
|
|
58
|
-
readonly children?:
|
|
58
|
+
readonly children?: React.ReactNode;
|
|
59
59
|
|
|
60
60
|
/**
|
|
61
61
|
* Reverse theme for better display on dark background
|
|
@@ -143,7 +143,7 @@ export function Text({
|
|
|
143
143
|
underline,
|
|
144
144
|
selectable,
|
|
145
145
|
onTextLayout,
|
|
146
|
-
}: TextProps)
|
|
146
|
+
}: TextProps) {
|
|
147
147
|
const accessibilityRole: TextAccessibilityRole = "text";
|
|
148
148
|
|
|
149
149
|
return (
|
|
@@ -694,3 +694,69 @@ exports[`renders with strikethrough styling 1`] = `
|
|
|
694
694
|
Test Text
|
|
695
695
|
</Text>
|
|
696
696
|
`;
|
|
697
|
+
|
|
698
|
+
exports[`supports nested Text children with mixed styles 1`] = `
|
|
699
|
+
<Text
|
|
700
|
+
accessibilityRole="text"
|
|
701
|
+
adjustsFontSizeToFit={false}
|
|
702
|
+
allowFontScaling={true}
|
|
703
|
+
collapsable={false}
|
|
704
|
+
maxFontSizeMultiplier={3.125}
|
|
705
|
+
selectable={true}
|
|
706
|
+
selectionColor="hsl(86, 100%, 46%)"
|
|
707
|
+
style={
|
|
708
|
+
[
|
|
709
|
+
{
|
|
710
|
+
"fontFamily": "inter-regular",
|
|
711
|
+
},
|
|
712
|
+
{
|
|
713
|
+
"color": "hsl(198, 35%, 21%)",
|
|
714
|
+
},
|
|
715
|
+
{
|
|
716
|
+
"textAlign": "left",
|
|
717
|
+
},
|
|
718
|
+
{
|
|
719
|
+
"fontSize": 16,
|
|
720
|
+
"lineHeight": 20,
|
|
721
|
+
},
|
|
722
|
+
{
|
|
723
|
+
"letterSpacing": 0,
|
|
724
|
+
},
|
|
725
|
+
]
|
|
726
|
+
}
|
|
727
|
+
>
|
|
728
|
+
Hello
|
|
729
|
+
<Text
|
|
730
|
+
accessibilityRole="text"
|
|
731
|
+
adjustsFontSizeToFit={false}
|
|
732
|
+
allowFontScaling={true}
|
|
733
|
+
collapsable={false}
|
|
734
|
+
maxFontSizeMultiplier={3.125}
|
|
735
|
+
selectable={true}
|
|
736
|
+
selectionColor="hsl(86, 100%, 46%)"
|
|
737
|
+
style={
|
|
738
|
+
[
|
|
739
|
+
{
|
|
740
|
+
"fontFamily": "inter-semibold",
|
|
741
|
+
},
|
|
742
|
+
{
|
|
743
|
+
"color": "hsl(198, 35%, 21%)",
|
|
744
|
+
},
|
|
745
|
+
{
|
|
746
|
+
"textAlign": "left",
|
|
747
|
+
},
|
|
748
|
+
{
|
|
749
|
+
"fontSize": 16,
|
|
750
|
+
"lineHeight": 20,
|
|
751
|
+
},
|
|
752
|
+
{
|
|
753
|
+
"letterSpacing": 0,
|
|
754
|
+
},
|
|
755
|
+
]
|
|
756
|
+
}
|
|
757
|
+
>
|
|
758
|
+
World
|
|
759
|
+
</Text>
|
|
760
|
+
!
|
|
761
|
+
</Text>
|
|
762
|
+
`;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { fireEvent, render } from "@testing-library/react-native";
|
|
2
|
+
import { fireEvent, render, screen } from "@testing-library/react-native";
|
|
3
3
|
import { Host } from "react-native-portalize";
|
|
4
4
|
import { ThumbnailList } from "./ThumbnailList";
|
|
5
5
|
import type { File } from "../FormatFile/types";
|
|
@@ -61,15 +61,15 @@ beforeEach(() => {
|
|
|
61
61
|
});
|
|
62
62
|
|
|
63
63
|
it("renders a thumbnail component with attachments", () => {
|
|
64
|
-
|
|
65
|
-
expect(
|
|
64
|
+
setup(true);
|
|
65
|
+
expect(screen.toJSON()).toMatchSnapshot();
|
|
66
66
|
});
|
|
67
67
|
|
|
68
68
|
describe("when a an array of files is provided", () => {
|
|
69
69
|
it("calls the previewImages util on pressing a valid file", () => {
|
|
70
|
-
|
|
70
|
+
setup();
|
|
71
71
|
fireEvent.press(
|
|
72
|
-
getByLabelText(files[0].fileName ? files[0].fileName : "file"),
|
|
72
|
+
screen.getByLabelText(files[0].fileName ? files[0].fileName : "file"),
|
|
73
73
|
);
|
|
74
74
|
expect(onOpenFile).toHaveBeenCalledTimes(1);
|
|
75
75
|
});
|
|
@@ -150,6 +150,204 @@ exports[`renders a thumbnail component with attachments 1`] = `
|
|
|
150
150
|
"top": 0,
|
|
151
151
|
}
|
|
152
152
|
}
|
|
153
|
-
|
|
153
|
+
>
|
|
154
|
+
<View
|
|
155
|
+
backdropComponent={[Function]}
|
|
156
|
+
backgroundStyle={
|
|
157
|
+
{
|
|
158
|
+
"borderTopLeftRadius": 24,
|
|
159
|
+
"borderTopRightRadius": 24,
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
enablePanDownToClose={true}
|
|
163
|
+
handleStyle={
|
|
164
|
+
{
|
|
165
|
+
"display": "none",
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
keyboardBlurBehavior="restore"
|
|
169
|
+
style={
|
|
170
|
+
{
|
|
171
|
+
"display": "none",
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
testID="bottom-sheet-mock"
|
|
175
|
+
>
|
|
176
|
+
<View
|
|
177
|
+
style={
|
|
178
|
+
{
|
|
179
|
+
"paddingBottom": 8,
|
|
180
|
+
"paddingTop": 8,
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
testID="bottom-sheet-view"
|
|
184
|
+
>
|
|
185
|
+
<View
|
|
186
|
+
accessibilityLabel="Preview "
|
|
187
|
+
accessibilityState={
|
|
188
|
+
{
|
|
189
|
+
"busy": undefined,
|
|
190
|
+
"checked": undefined,
|
|
191
|
+
"disabled": undefined,
|
|
192
|
+
"expanded": undefined,
|
|
193
|
+
"selected": undefined,
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
accessibilityValue={
|
|
197
|
+
{
|
|
198
|
+
"max": undefined,
|
|
199
|
+
"min": undefined,
|
|
200
|
+
"now": undefined,
|
|
201
|
+
"text": undefined,
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
accessible={true}
|
|
205
|
+
collapsable={false}
|
|
206
|
+
focusable={true}
|
|
207
|
+
onClick={[Function]}
|
|
208
|
+
onResponderGrant={[Function]}
|
|
209
|
+
onResponderMove={[Function]}
|
|
210
|
+
onResponderRelease={[Function]}
|
|
211
|
+
onResponderTerminate={[Function]}
|
|
212
|
+
onResponderTerminationRequest={[Function]}
|
|
213
|
+
onStartShouldSetResponder={[Function]}
|
|
214
|
+
style={
|
|
215
|
+
{
|
|
216
|
+
"alignContent": "center",
|
|
217
|
+
"alignItems": "center",
|
|
218
|
+
"display": "flex",
|
|
219
|
+
"flexDirection": "row",
|
|
220
|
+
"opacity": 1,
|
|
221
|
+
"padding": 8,
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
>
|
|
225
|
+
<View
|
|
226
|
+
style={
|
|
227
|
+
{
|
|
228
|
+
"paddingHorizontal": 8,
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
>
|
|
232
|
+
<RNSVGSvgView
|
|
233
|
+
align="xMidYMid"
|
|
234
|
+
bbHeight={24}
|
|
235
|
+
bbWidth={24}
|
|
236
|
+
focusable={false}
|
|
237
|
+
meetOrSlice={0}
|
|
238
|
+
minX={0}
|
|
239
|
+
minY={0}
|
|
240
|
+
style={
|
|
241
|
+
[
|
|
242
|
+
{
|
|
243
|
+
"backgroundColor": "transparent",
|
|
244
|
+
"borderWidth": 0,
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
"display": "flex",
|
|
248
|
+
"fill": "hsl(198, 35%, 21%)",
|
|
249
|
+
"height": 24,
|
|
250
|
+
"verticalAlign": "middle",
|
|
251
|
+
"width": 24,
|
|
252
|
+
},
|
|
253
|
+
{
|
|
254
|
+
"flex": 0,
|
|
255
|
+
"height": 24,
|
|
256
|
+
"width": 24,
|
|
257
|
+
},
|
|
258
|
+
]
|
|
259
|
+
}
|
|
260
|
+
testID="eye"
|
|
261
|
+
vbHeight={24}
|
|
262
|
+
vbWidth={24}
|
|
263
|
+
>
|
|
264
|
+
<RNSVGGroup
|
|
265
|
+
fill={
|
|
266
|
+
{
|
|
267
|
+
"payload": 4280499528,
|
|
268
|
+
"type": 0,
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
propList={
|
|
272
|
+
[
|
|
273
|
+
"fill",
|
|
274
|
+
]
|
|
275
|
+
}
|
|
276
|
+
>
|
|
277
|
+
<RNSVGPath
|
|
278
|
+
d="M16 12a4 4 0 1 1-8 0 4 4 0 0 1 8 0Zm-2 0a2 2 0 1 0-4 0 2 2 0 0 0 4 0Z"
|
|
279
|
+
fill={
|
|
280
|
+
{
|
|
281
|
+
"payload": 4280499528,
|
|
282
|
+
"type": 0,
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
propList={
|
|
286
|
+
[
|
|
287
|
+
"fill",
|
|
288
|
+
]
|
|
289
|
+
}
|
|
290
|
+
/>
|
|
291
|
+
<RNSVGPath
|
|
292
|
+
d="M21.863 12.477C20.794 14.2 16.703 20 12 20c-4.702 0-8.795-5.8-9.863-7.523a.903.903 0 0 1 0-.954C3.205 9.8 7.297 4 12 4c4.703 0 8.794 5.8 9.863 7.523a.903.903 0 0 1 0 .954ZM20 12s-3.582-6-8-6-8 6-8 6 3.582 6 8 6 8-6 8-6Z"
|
|
293
|
+
fill={
|
|
294
|
+
{
|
|
295
|
+
"payload": 4280499528,
|
|
296
|
+
"type": 0,
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
propList={
|
|
300
|
+
[
|
|
301
|
+
"fill",
|
|
302
|
+
]
|
|
303
|
+
}
|
|
304
|
+
/>
|
|
305
|
+
</RNSVGGroup>
|
|
306
|
+
</RNSVGSvgView>
|
|
307
|
+
</View>
|
|
308
|
+
<View
|
|
309
|
+
style={
|
|
310
|
+
{
|
|
311
|
+
"flexShrink": 1,
|
|
312
|
+
"paddingHorizontal": 8,
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
>
|
|
316
|
+
<Text
|
|
317
|
+
accessibilityRole="text"
|
|
318
|
+
adjustsFontSizeToFit={false}
|
|
319
|
+
allowFontScaling={true}
|
|
320
|
+
collapsable={false}
|
|
321
|
+
maxFontSizeMultiplier={3.125}
|
|
322
|
+
selectable={true}
|
|
323
|
+
selectionColor="hsl(86, 100%, 46%)"
|
|
324
|
+
style={
|
|
325
|
+
[
|
|
326
|
+
{
|
|
327
|
+
"fontFamily": "inter-semibold",
|
|
328
|
+
},
|
|
329
|
+
{
|
|
330
|
+
"color": "hsl(197, 15%, 43%)",
|
|
331
|
+
},
|
|
332
|
+
{
|
|
333
|
+
"textAlign": "left",
|
|
334
|
+
},
|
|
335
|
+
{
|
|
336
|
+
"fontSize": 16,
|
|
337
|
+
"lineHeight": 20,
|
|
338
|
+
},
|
|
339
|
+
{
|
|
340
|
+
"letterSpacing": 0,
|
|
341
|
+
},
|
|
342
|
+
]
|
|
343
|
+
}
|
|
344
|
+
>
|
|
345
|
+
Preview
|
|
346
|
+
</Text>
|
|
347
|
+
</View>
|
|
348
|
+
</View>
|
|
349
|
+
</View>
|
|
350
|
+
</View>
|
|
351
|
+
</View>,
|
|
154
352
|
]
|
|
155
353
|
`;
|
package/src/Toast/Toast.tsx
CHANGED
|
@@ -17,7 +17,7 @@ import { tokens as staticTokens } from "../utils/design";
|
|
|
17
17
|
const MAX_TOAST_MESSAGE_LENGTH = 60;
|
|
18
18
|
const ANNOUNCEMENT_DELAY = 100;
|
|
19
19
|
|
|
20
|
-
function DefaultToast({ text1 }: ToastConfigParams<string>)
|
|
20
|
+
function DefaultToast({ text1 }: ToastConfigParams<string>) {
|
|
21
21
|
const { bottom } = useSafeAreaInsets();
|
|
22
22
|
const { t } = useAtlantisI18n();
|
|
23
23
|
const styles = useStyles();
|
|
@@ -56,7 +56,7 @@ export interface JobberToastProps {
|
|
|
56
56
|
readonly bottomOffset?: number;
|
|
57
57
|
}
|
|
58
58
|
|
|
59
|
-
export function JobberToast({ bottomOffset }: JobberToastProps)
|
|
59
|
+
export function JobberToast({ bottomOffset }: JobberToastProps) {
|
|
60
60
|
return <Toast bottomOffset={bottomOffset} config={toastConfig} />;
|
|
61
61
|
}
|
|
62
62
|
|
|
@@ -79,6 +79,67 @@ it("renders text with lowercase transform", () => {
|
|
|
79
79
|
expect(typography.toJSON()).toMatchSnapshot();
|
|
80
80
|
});
|
|
81
81
|
|
|
82
|
+
it("supports nested children and applies transform only to string children", () => {
|
|
83
|
+
const typography = render(
|
|
84
|
+
<Typography transform="uppercase">
|
|
85
|
+
before <Typography fontWeight="bold">Inner</Typography> after
|
|
86
|
+
</Typography>,
|
|
87
|
+
);
|
|
88
|
+
expect(typography.toJSON()).toMatchSnapshot();
|
|
89
|
+
});
|
|
90
|
+
|
|
91
|
+
it("allows child Typography to control its own transform", () => {
|
|
92
|
+
const view = render(
|
|
93
|
+
<Typography transform="uppercase">
|
|
94
|
+
{"before "}
|
|
95
|
+
<Typography fontWeight="bold" transform="lowercase">
|
|
96
|
+
Inner
|
|
97
|
+
</Typography>
|
|
98
|
+
{" after"}
|
|
99
|
+
</Typography>,
|
|
100
|
+
).toJSON();
|
|
101
|
+
|
|
102
|
+
expect(view).toMatchSnapshot();
|
|
103
|
+
});
|
|
104
|
+
|
|
105
|
+
it("supports multi-level nesting across Typography and Text", () => {
|
|
106
|
+
const view = render(
|
|
107
|
+
<Typography transform="uppercase">
|
|
108
|
+
{"level1 "}
|
|
109
|
+
<Typography>
|
|
110
|
+
and <Typography transform="lowercase">INNER</Typography>
|
|
111
|
+
</Typography>
|
|
112
|
+
{" end"}
|
|
113
|
+
</Typography>,
|
|
114
|
+
).toJSON();
|
|
115
|
+
|
|
116
|
+
expect(view).toMatchSnapshot();
|
|
117
|
+
});
|
|
118
|
+
|
|
119
|
+
it("applies transform to parent strings only", () => {
|
|
120
|
+
const { getByText } = render(
|
|
121
|
+
<Typography transform="uppercase">
|
|
122
|
+
{"test "}
|
|
123
|
+
<Typography>inner</Typography>
|
|
124
|
+
</Typography>,
|
|
125
|
+
);
|
|
126
|
+
|
|
127
|
+
expect(getByText(/TEST/)).toBeDefined();
|
|
128
|
+
expect(getByText("inner")).toBeDefined();
|
|
129
|
+
});
|
|
130
|
+
|
|
131
|
+
it("allows child transform to override parent transform", () => {
|
|
132
|
+
const { getByText } = render(
|
|
133
|
+
<Typography transform="uppercase">
|
|
134
|
+
before <Typography transform="lowercase">INNER</Typography> after
|
|
135
|
+
</Typography>,
|
|
136
|
+
);
|
|
137
|
+
|
|
138
|
+
expect(getByText(/BEFORE/)).toBeDefined();
|
|
139
|
+
expect(getByText("inner")).toBeDefined();
|
|
140
|
+
expect(getByText(/AFTER/)).toBeDefined();
|
|
141
|
+
});
|
|
142
|
+
|
|
82
143
|
it("renders text with white color", () => {
|
|
83
144
|
const typography = render(<Typography color="white">Test Text</Typography>);
|
|
84
145
|
expect(typography.toJSON()).toMatchSnapshot();
|