@hero-design/rn 8.35.0-alpha.4 → 8.35.1
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/.eslintrc.js +1 -0
- package/.turbo/turbo-build.log +2 -2
- package/.turbo/turbo-publish:npm.log +0 -9
- package/es/index.js +578 -650
- package/jest.config.js +1 -1
- package/lib/index.js +588 -660
- package/package.json +9 -9
- package/src/components/Attachment/__tests__/__snapshots__/index.spec.tsx.snap +1 -1
- package/src/components/Badge/__tests__/__snapshots__/Badge.spec.tsx.snap +3 -3
- package/src/components/Badge/__tests__/__snapshots__/Status.spec.tsx.snap +1 -1
- package/src/components/Button/LoadingIndicator/__tests__/__snapshots__/StyledLoadingIndicator.spec.tsx.snap +2 -2
- package/src/components/Button/LoadingIndicator/__tests__/__snapshots__/index.spec.tsx.snap +6 -6
- package/src/components/Button/UtilityButton/__tests__/__snapshots__/index.spec.tsx.snap +2 -2
- package/src/components/Button/__tests__/__snapshots__/Button.spec.tsx.snap +4 -4
- package/src/components/Button/__tests__/__snapshots__/StyledButton.spec.tsx.snap +6 -6
- package/src/components/Calendar/__tests__/index.spec.tsx +29 -0
- package/src/components/Calendar/index.tsx +10 -1
- package/src/components/Carousel/__tests__/__snapshots__/index.spec.tsx.snap +75 -74
- package/src/components/Carousel/index.tsx +1 -1
- package/src/components/DatePicker/DatePickerCalendar.tsx +23 -14
- package/src/components/FAB/ActionGroup/StyledActionGroup.tsx +12 -0
- package/src/components/FAB/ActionGroup/__tests__/__snapshots__/index.spec.tsx.snap +801 -1251
- package/src/components/FAB/ActionGroup/__tests__/index.spec.tsx +45 -35
- package/src/components/FAB/ActionGroup/index.tsx +65 -45
- package/src/components/FAB/__tests__/__snapshots__/StyledFAB.spec.tsx.snap +1 -1
- package/src/components/FAB/index.tsx +0 -4
- package/src/components/Icon/__tests__/__snapshots__/index.spec.tsx.snap +1 -1
- package/src/components/PinInput/__tests__/__snapshots__/PinCell.spec.tsx.snap +4 -4
- package/src/components/PinInput/__tests__/__snapshots__/index.spec.tsx.snap +12 -12
- package/src/components/Portal/PortalHost.tsx +27 -0
- package/src/components/Portal/PortalProvider.tsx +35 -0
- package/src/components/Portal/__tests__/PortalHost.spec.tsx +50 -0
- package/src/components/Portal/__tests__/PortalProvider.spec.tsx +24 -0
- package/src/components/Portal/__tests__/index.spec.tsx +29 -0
- package/src/components/Portal/__tests__/reducer.spec.tsx +110 -0
- package/src/components/Portal/constants.ts +10 -0
- package/src/components/Portal/contexts.ts +14 -0
- package/src/components/Portal/index.tsx +53 -0
- package/src/components/Portal/reducer.ts +106 -0
- package/src/components/Portal/types.tsx +31 -0
- package/src/components/Portal/usePortal.ts +50 -0
- package/src/components/Portal/usePortalState.ts +11 -0
- package/src/components/Progress/StyledProgressBar.tsx +1 -0
- package/src/components/Progress/__tests__/__snapshots__/index.spec.js.snap +46 -44
- package/src/components/RichTextEditor/__tests__/__snapshots__/RichTextEditor.spec.tsx.snap +6 -6
- package/src/components/SectionHeading/__tests__/__snapshots__/index.spec.tsx.snap +1 -1
- package/src/components/Skeleton/__tests__/__snapshots__/index.spec.tsx.snap +7 -7
- package/src/components/Swipeable/__tests__/__snapshots__/index.spec.tsx.snap +5 -0
- package/src/components/Swipeable/index.tsx +6 -1
- package/src/components/Switch/SelectorSwitch/StyledSelectorSwitch.tsx +4 -7
- package/src/components/Switch/SelectorSwitch/__tests__/__snapshots__/Option.spec.tsx.snap +3 -3
- package/src/components/Switch/SelectorSwitch/__tests__/__snapshots__/index.spec.tsx.snap +9 -9
- package/src/components/Switch/SelectorSwitch/index.tsx +7 -15
- package/src/components/Tabs/__tests__/__snapshots__/ScrollableTabs.spec.tsx.snap +21 -21
- package/src/components/Tabs/__tests__/__snapshots__/ScrollableTabsHeader.spec.tsx.snap +6 -6
- package/src/components/Tabs/__tests__/__snapshots__/TabWithBadge.spec.tsx.snap +2 -2
- package/src/components/Tabs/__tests__/__snapshots__/index.spec.tsx.snap +9 -9
- package/src/components/Tag/StyledTag.tsx +6 -35
- package/src/components/Tag/__tests__/Tag.spec.tsx +13 -13
- package/src/components/Tag/__tests__/__snapshots__/Tag.spec.tsx.snap +40 -79
- package/src/components/Tag/index.tsx +8 -6
- package/src/components/TextInput/__tests__/__snapshots__/StyledTextInput.spec.tsx.snap +7 -7
- package/src/components/TextInput/__tests__/__snapshots__/index.spec.tsx.snap +20 -20
- package/src/components/Toolbar/__tests__/__snapshots__/ToolbarItem.spec.tsx.snap +1 -1
- package/src/components/Typography/Body/__tests__/__snapshots__/StyledBody.tsx.snap +1 -1
- package/src/components/Typography/Body/__tests__/__snapshots__/index.spec.tsx.snap +2 -2
- package/src/components/Typography/Caption/__tests__/__snapshots__/StyledCaption.spec.tsx.snap +1 -1
- package/src/components/Typography/Caption/__tests__/__snapshots__/index.spec.tsx.snap +2 -2
- package/src/components/Typography/Label/__tests__/__snapshots__/StyledLabel.tsx.snap +1 -1
- package/src/components/Typography/Label/__tests__/__snapshots__/index.spec.tsx.snap +2 -2
- package/src/components/Typography/Text/__tests__/__snapshots__/StyledText.spec.tsx.snap +1 -1
- package/src/components/Typography/Title/__tests__/__snapshots__/StyledTitle.tsx.snap +3 -3
- package/src/components/Typography/Title/__tests__/__snapshots__/index.spec.tsx.snap +4 -4
- package/src/index.ts +2 -2
- package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +49 -46
- package/src/theme/components/button.ts +1 -1
- package/src/theme/components/progress.ts +2 -2
- package/src/theme/components/swipeable.ts +5 -1
- package/src/theme/components/switch.ts +4 -4
- package/src/theme/components/tabs.ts +1 -1
- package/src/theme/components/tag.ts +2 -2
- package/src/theme/components/typography.ts +2 -2
- package/src/theme/global/colors/__tests__/__snapshots__/eBens.spec.ts.snap +7 -7
- package/src/theme/global/colors/__tests__/__snapshots__/global.spec.ts.snap +5 -5
- package/src/theme/global/colors/__tests__/__snapshots__/jobs.spec.ts.snap +6 -6
- package/src/theme/global/colors/__tests__/__snapshots__/swag.spec.ts.snap +6 -6
- package/src/theme/global/colors/__tests__/__snapshots__/wallet.spec.ts.snap +7 -7
- package/src/theme/global/colors/__tests__/__snapshots__/work.spec.ts.snap +5 -5
- package/src/theme/global/colors/eBens.ts +2 -2
- package/src/theme/global/colors/global.ts +5 -5
- package/src/theme/global/colors/jobs.ts +1 -1
- package/src/theme/global/colors/swag.ts +1 -1
- package/src/theme/global/colors/wallet.ts +2 -2
- package/types/components/Accordion/AccordionItem.d.ts +0 -0
- package/types/components/Accordion/StyledAccordion.d.ts +0 -0
- package/types/components/Accordion/index.d.ts +0 -0
- package/types/components/Alert/StyledAlert.d.ts +0 -0
- package/types/components/Alert/index.d.ts +0 -0
- package/types/components/Attachment/StyledAttachment.d.ts +0 -0
- package/types/components/Attachment/index.d.ts +0 -0
- package/types/components/Avatar/Avatar.d.ts +0 -0
- package/types/components/Avatar/AvatarStack/StyledAvatarStack.d.ts +0 -0
- package/types/components/Avatar/AvatarStack/index.d.ts +0 -0
- package/types/components/Avatar/AvatarStack/utils.d.ts +0 -0
- package/types/components/Avatar/StyledAvatar.d.ts +0 -0
- package/types/components/Avatar/index.d.ts +0 -0
- package/types/components/Badge/Status.d.ts +0 -0
- package/types/components/Badge/StyledBadge.d.ts +0 -0
- package/types/components/Badge/index.d.ts +0 -0
- package/types/components/BottomNavigation/StyledBottomNavigation.d.ts +0 -0
- package/types/components/BottomNavigation/index.d.ts +0 -0
- package/types/components/BottomSheet/BottomSheetContext.d.ts +0 -0
- package/types/components/BottomSheet/Footer.d.ts +0 -0
- package/types/components/BottomSheet/Header.d.ts +0 -0
- package/types/components/BottomSheet/ScrollView.d.ts +0 -0
- package/types/components/BottomSheet/StyledBottomSheet.d.ts +0 -0
- package/types/components/BottomSheet/index.d.ts +0 -0
- package/types/components/Box/StyledBox.d.ts +0 -0
- package/types/components/Box/config.d.ts +0 -0
- package/types/components/Box/index.d.ts +0 -0
- package/types/components/Box/types.d.ts +0 -0
- package/types/components/Button/Button.d.ts +0 -0
- package/types/components/Button/IconButton.d.ts +0 -0
- package/types/components/Button/LoadingIndicator/StyledLoadingIndicator.d.ts +0 -0
- package/types/components/Button/LoadingIndicator/index.d.ts +0 -0
- package/types/components/Button/StyledButton.d.ts +0 -0
- package/types/components/Button/UtilityButton/StyledUtilityButton.d.ts +0 -0
- package/types/components/Button/UtilityButton/index.d.ts +0 -0
- package/types/components/Button/index.d.ts +0 -0
- package/types/components/Calendar/CalendarRowItem.d.ts +0 -0
- package/types/components/Calendar/StyledCalendar.d.ts +0 -0
- package/types/components/Calendar/helpers.d.ts +0 -0
- package/types/components/Calendar/index.d.ts +2 -1
- package/types/components/Card/DataCard/StyledDataCard.d.ts +0 -0
- package/types/components/Card/DataCard/index.d.ts +0 -0
- package/types/components/Card/StyledCard.d.ts +0 -0
- package/types/components/Card/index.d.ts +0 -0
- package/types/components/Carousel/CardCarousel.d.ts +0 -0
- package/types/components/Carousel/CarouselItem.d.ts +0 -0
- package/types/components/Carousel/StyledCardCarousel.d.ts +0 -0
- package/types/components/Carousel/StyledCarousel.d.ts +0 -0
- package/types/components/Carousel/contants.d.ts +0 -0
- package/types/components/Carousel/index.d.ts +0 -0
- package/types/components/Carousel/types.d.ts +0 -0
- package/types/components/Checkbox/StyledCheckbox.d.ts +0 -0
- package/types/components/Checkbox/index.d.ts +0 -0
- package/types/components/Collapse/StyledCollapse.d.ts +0 -0
- package/types/components/Collapse/index.d.ts +0 -0
- package/types/components/ContentNavigator/StyledContentNavigator.d.ts +0 -0
- package/types/components/ContentNavigator/index.d.ts +0 -0
- package/types/components/DatePicker/DatePickerAndroid.d.ts +0 -0
- package/types/components/DatePicker/DatePickerCalendar.d.ts +0 -0
- package/types/components/DatePicker/DatePickerIOS.d.ts +0 -0
- package/types/components/DatePicker/StyledDatePicker.d.ts +0 -0
- package/types/components/DatePicker/index.d.ts +0 -0
- package/types/components/DatePicker/types.d.ts +0 -0
- package/types/components/Divider/StyledDivider.d.ts +0 -0
- package/types/components/Divider/index.d.ts +0 -0
- package/types/components/Drawer/DragableDrawer/helpers.d.ts +0 -0
- package/types/components/Drawer/DragableDrawer/index.d.ts +0 -0
- package/types/components/Drawer/StyledDrawer.d.ts +0 -0
- package/types/components/Drawer/index.d.ts +0 -0
- package/types/components/Empty/StyledEmpty.d.ts +0 -0
- package/types/components/Empty/index.d.ts +0 -0
- package/types/components/Error/StyledError.d.ts +0 -0
- package/types/components/Error/index.d.ts +0 -0
- package/types/components/FAB/ActionGroup/ActionItem.d.ts +0 -0
- package/types/components/FAB/ActionGroup/StyledActionGroup.d.ts +7 -1
- package/types/components/FAB/ActionGroup/StyledActionItem.d.ts +0 -0
- package/types/components/FAB/ActionGroup/index.d.ts +0 -0
- package/types/components/FAB/AnimatedFABIcon.d.ts +0 -0
- package/types/components/FAB/FAB.d.ts +0 -0
- package/types/components/FAB/StyledFAB.d.ts +0 -0
- package/types/components/FAB/index.d.ts +0 -3
- package/types/components/Icon/AnimatedIcon.d.ts +0 -0
- package/types/components/Icon/HeroIcon/index.d.ts +0 -0
- package/types/components/Icon/IconList.d.ts +0 -0
- package/types/components/Icon/index.d.ts +0 -0
- package/types/components/Icon/utils.d.ts +0 -0
- package/types/components/Image/index.d.ts +0 -0
- package/types/components/List/BasicListItem.d.ts +0 -0
- package/types/components/List/ListItem.d.ts +0 -0
- package/types/components/List/StyledBasicListItem.d.ts +0 -0
- package/types/components/List/StyledListItem.d.ts +0 -0
- package/types/components/List/index.d.ts +0 -0
- package/types/components/PageControl/StyledPageControl.d.ts +0 -0
- package/types/components/PageControl/index.d.ts +0 -0
- package/types/components/PinInput/PinCell.d.ts +0 -0
- package/types/components/PinInput/StyledPinInput.d.ts +0 -0
- package/types/components/PinInput/index.d.ts +0 -0
- package/types/components/Portal/PortalHost.d.ts +5 -0
- package/types/components/Portal/PortalProvider.d.ts +7 -0
- package/types/components/Portal/constants.d.ts +8 -0
- package/types/components/Portal/contexts.d.ts +9 -0
- package/types/components/Portal/index.d.ts +13 -0
- package/types/components/Portal/reducer.d.ts +5 -0
- package/types/components/Portal/types.d.ts +22 -0
- package/types/components/Portal/usePortal.d.ts +8 -0
- package/types/components/Portal/usePortalState.d.ts +1 -0
- package/types/components/Progress/ProgressBar.d.ts +0 -0
- package/types/components/Progress/ProgressCircle.d.ts +0 -0
- package/types/components/Progress/StyledProgressBar.d.ts +0 -0
- package/types/components/Progress/StyledProgressCircle.d.ts +0 -0
- package/types/components/Progress/__tests__/index.spec.d.ts +0 -0
- package/types/components/Progress/constants.d.ts +0 -0
- package/types/components/Progress/index.d.ts +0 -0
- package/types/components/Progress/types.d.ts +0 -0
- package/types/components/Radio/Radio.d.ts +0 -0
- package/types/components/Radio/RadioGroup.d.ts +0 -0
- package/types/components/Radio/StyledRadio.d.ts +0 -0
- package/types/components/Radio/index.d.ts +0 -0
- package/types/components/Radio/types.d.ts +0 -0
- package/types/components/RefreshControl/index.d.ts +0 -0
- package/types/components/RichTextEditor/EditorEvent.d.ts +0 -0
- package/types/components/RichTextEditor/EditorToolbar.d.ts +0 -0
- package/types/components/RichTextEditor/MentionList.d.ts +0 -0
- package/types/components/RichTextEditor/RichTextEditor.d.ts +0 -0
- package/types/components/RichTextEditor/StyledRichTextEditor.d.ts +0 -0
- package/types/components/RichTextEditor/StyledToolbar.d.ts +0 -0
- package/types/components/RichTextEditor/__mocks__/heroEditorApp.d.ts +0 -0
- package/types/components/RichTextEditor/constants.d.ts +0 -0
- package/types/components/RichTextEditor/heroEditorApp.d.ts +0 -0
- package/types/components/RichTextEditor/index.d.ts +0 -0
- package/types/components/RichTextEditor/types.d.ts +0 -0
- package/types/components/RichTextEditor/utils/events.d.ts +0 -0
- package/types/components/RichTextEditor/utils/rnWebView.d.ts +0 -0
- package/types/components/SectionHeading/StyledHeading.d.ts +0 -0
- package/types/components/SectionHeading/index.d.ts +0 -0
- package/types/components/Select/BaseOptionList.d.ts +0 -0
- package/types/components/Select/Footer.d.ts +0 -0
- package/types/components/Select/MultiSelect/Option.d.ts +0 -0
- package/types/components/Select/MultiSelect/OptionList.d.ts +0 -0
- package/types/components/Select/MultiSelect/index.d.ts +0 -0
- package/types/components/Select/SingleSelect/Option.d.ts +0 -0
- package/types/components/Select/SingleSelect/OptionList.d.ts +0 -0
- package/types/components/Select/SingleSelect/StyledSingleSelect.d.ts +0 -0
- package/types/components/Select/SingleSelect/index.d.ts +0 -0
- package/types/components/Select/StyledSelect.d.ts +0 -0
- package/types/components/Select/helpers.d.ts +0 -0
- package/types/components/Select/index.d.ts +0 -0
- package/types/components/Select/types.d.ts +0 -0
- package/types/components/Skeleton/StyledSkeleton.d.ts +0 -0
- package/types/components/Skeleton/index.d.ts +0 -0
- package/types/components/Slider/index.d.ts +0 -0
- package/types/components/Spinner/AnimatedSpinner.d.ts +0 -0
- package/types/components/Spinner/StyledSpinner.d.ts +0 -0
- package/types/components/Spinner/index.d.ts +0 -0
- package/types/components/Success/StyledSuccess.d.ts +0 -0
- package/types/components/Success/index.d.ts +0 -0
- package/types/components/Swipeable/StyledSwipeable.d.ts +0 -0
- package/types/components/Swipeable/SwipeableAction.d.ts +0 -0
- package/types/components/Swipeable/index.d.ts +1 -1
- package/types/components/Switch/SelectorSwitch/Option.d.ts +0 -0
- package/types/components/Switch/SelectorSwitch/StyledSelectorSwitch.d.ts +0 -0
- package/types/components/Switch/SelectorSwitch/index.d.ts +0 -0
- package/types/components/Switch/StyledSwitch.d.ts +0 -0
- package/types/components/Switch/index.d.ts +0 -0
- package/types/components/Tabs/ActiveTabIndicator.d.ts +0 -0
- package/types/components/Tabs/SceneView.d.ts +0 -0
- package/types/components/Tabs/ScrollableTabs.d.ts +0 -0
- package/types/components/Tabs/ScrollableTabsHeader.d.ts +0 -0
- package/types/components/Tabs/StyledScrollableTabs.d.ts +0 -0
- package/types/components/Tabs/StyledTabs.d.ts +0 -0
- package/types/components/Tabs/TabWithBadge.d.ts +0 -0
- package/types/components/Tabs/index.d.ts +0 -0
- package/types/components/Tabs/useIsFocused.d.ts +0 -0
- package/types/components/Tabs/utils.d.ts +0 -0
- package/types/components/Tag/StyledTag.d.ts +1 -4
- package/types/components/Tag/index.d.ts +1 -0
- package/types/components/TextInput/StyledTextInput.d.ts +0 -0
- package/types/components/TextInput/index.d.ts +0 -0
- package/types/components/TimePicker/StyledTimePicker.d.ts +0 -0
- package/types/components/TimePicker/TimePickerAndroid.d.ts +0 -0
- package/types/components/TimePicker/TimePickerIOS.d.ts +0 -0
- package/types/components/TimePicker/index.d.ts +0 -0
- package/types/components/TimePicker/types.d.ts +0 -0
- package/types/components/Toast/StyledToast.d.ts +0 -0
- package/types/components/Toast/Toast.d.ts +0 -0
- package/types/components/Toast/ToastContainer.d.ts +0 -0
- package/types/components/Toast/ToastContext.d.ts +0 -0
- package/types/components/Toast/ToastProvider.d.ts +0 -0
- package/types/components/Toast/index.d.ts +0 -0
- package/types/components/Toast/types.d.ts +0 -0
- package/types/components/Toolbar/StyledToolbar.d.ts +0 -0
- package/types/components/Toolbar/ToolbarGroup.d.ts +0 -0
- package/types/components/Toolbar/ToolbarItem.d.ts +0 -0
- package/types/components/Toolbar/index.d.ts +0 -0
- package/types/components/Typography/Text/StyledText.d.ts +0 -0
- package/types/components/Typography/Text/index.d.ts +0 -0
- package/types/components/Typography/index.d.ts +0 -0
- package/types/index.d.ts +2 -2
- package/types/testHelpers/renderWithTheme.d.ts +0 -0
- package/types/theme/ThemeProvider.d.ts +0 -0
- package/types/theme/ThemeSwitcher.d.ts +0 -0
- package/types/theme/components/accordion.d.ts +0 -0
- package/types/theme/components/alert.d.ts +0 -0
- package/types/theme/components/attachment.d.ts +0 -0
- package/types/theme/components/avatar.d.ts +0 -0
- package/types/theme/components/badge.d.ts +0 -0
- package/types/theme/components/bottomNavigation.d.ts +0 -0
- package/types/theme/components/bottomSheet.d.ts +0 -0
- package/types/theme/components/button.d.ts +0 -0
- package/types/theme/components/calendar.d.ts +0 -0
- package/types/theme/components/card.d.ts +0 -0
- package/types/theme/components/cardCarousel.d.ts +0 -0
- package/types/theme/components/carousel.d.ts +0 -0
- package/types/theme/components/checkbox.d.ts +0 -0
- package/types/theme/components/contentNavigator.d.ts +0 -0
- package/types/theme/components/datePicker.d.ts +0 -0
- package/types/theme/components/divider.d.ts +0 -0
- package/types/theme/components/drawer.d.ts +0 -0
- package/types/theme/components/empty.d.ts +0 -0
- package/types/theme/components/error.d.ts +0 -0
- package/types/theme/components/fab.d.ts +0 -0
- package/types/theme/components/icon.d.ts +0 -0
- package/types/theme/components/image.d.ts +0 -0
- package/types/theme/components/list.d.ts +0 -0
- package/types/theme/components/pageControl.d.ts +0 -0
- package/types/theme/components/pinInput.d.ts +0 -0
- package/types/theme/components/progress.d.ts +0 -0
- package/types/theme/components/radio.d.ts +0 -0
- package/types/theme/components/refreshControl.d.ts +0 -0
- package/types/theme/components/richTextEditor.d.ts +0 -0
- package/types/theme/components/sectionHeading.d.ts +0 -0
- package/types/theme/components/select.d.ts +0 -0
- package/types/theme/components/skeleton.d.ts +0 -0
- package/types/theme/components/slider.d.ts +0 -0
- package/types/theme/components/spinner.d.ts +0 -0
- package/types/theme/components/success.d.ts +0 -0
- package/types/theme/components/swipeable.d.ts +3 -0
- package/types/theme/components/switch.d.ts +1 -1
- package/types/theme/components/tabs.d.ts +0 -0
- package/types/theme/components/tag.d.ts +1 -1
- package/types/theme/components/textInput.d.ts +0 -0
- package/types/theme/components/timePicker.d.ts +0 -0
- package/types/theme/components/toast.d.ts +0 -0
- package/types/theme/components/toolbar.d.ts +0 -0
- package/types/theme/components/typography.d.ts +0 -0
- package/types/theme/getTheme.d.ts +0 -0
- package/types/theme/global/borders.d.ts +0 -0
- package/types/theme/global/colors/eBens.d.ts +0 -0
- package/types/theme/global/colors/global.d.ts +0 -0
- package/types/theme/global/colors/globalDark.d.ts +0 -0
- package/types/theme/global/colors/jobs.d.ts +0 -0
- package/types/theme/global/colors/swag.d.ts +0 -0
- package/types/theme/global/colors/swagDark.d.ts +0 -0
- package/types/theme/global/colors/types.d.ts +0 -0
- package/types/theme/global/colors/wallet.d.ts +0 -0
- package/types/theme/global/colors/work.d.ts +0 -0
- package/types/theme/global/index.d.ts +0 -0
- package/types/theme/global/scale.d.ts +0 -0
- package/types/theme/global/sizes.d.ts +0 -0
- package/types/theme/global/space.d.ts +0 -0
- package/types/theme/global/typography.d.ts +0 -0
- package/types/theme/index.d.ts +0 -0
- package/types/types.d.ts +0 -0
- package/types/utils/functions.d.ts +0 -0
- package/types/utils/helpers.d.ts +0 -0
- package/types/utils/hooks.d.ts +0 -0
- package/types/utils/scale.d.ts +0 -0
- package/.tool-versions +0 -1
- package/.turbo/turbo-build:types.log +0 -9
- package/.turbo/turbo-lint.log +0 -163
- package/.turbo/turbo-test.log +0 -725
- package/.turbo/turbo-type-check.log +0 -1
- package/types/components/FAB/ActionGroup/FABModal.d.ts +0 -21
- package/types/components/FAB/ActionGroup/FABModalContentWrapper.d.ts +0 -18
- package/types/components/FAB/ActionGroup/FABProvider.d.ts +0 -5
- package/types/components/FAB/ActionGroup/ModalPresenter/ModalPresenter.d.ts +0 -34
- package/types/components/FAB/ActionGroup/ModalPresenter/index.d.ts +0 -3
- package/types/components/Tabs/ScrollableTabsV2/SceneView.d.ts +0 -10
- package/types/components/Tabs/ScrollableTabsV2/ScrollableTabsV2.d.ts +0 -9
- package/types/components/Tabs/ScrollableTabsV2/index.d.ts +0 -4
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { View } from 'react-native';
|
|
2
1
|
import styled from '@emotion/native';
|
|
3
|
-
import {
|
|
2
|
+
import { View } from 'react-native';
|
|
4
3
|
import Typography from '../Typography';
|
|
5
4
|
|
|
6
5
|
type ThemeIntent =
|
|
@@ -11,54 +10,26 @@ type ThemeIntent =
|
|
|
11
10
|
| 'danger'
|
|
12
11
|
| 'archived';
|
|
13
12
|
|
|
14
|
-
type ThemeVariant = 'filled' | 'outlined';
|
|
15
|
-
|
|
16
|
-
const getFilledStyles = (themeIntent: ThemeIntent, theme: Theme) => ({
|
|
17
|
-
textColor: theme.__hd__.tag.colors[themeIntent],
|
|
18
|
-
borderColor: theme.__hd__.tag.colors[`${themeIntent}Background`],
|
|
19
|
-
backgroundColor: theme.__hd__.tag.colors[`${themeIntent}Background`],
|
|
20
|
-
});
|
|
21
|
-
|
|
22
|
-
const getOutlinedStyles = (themeIntent: ThemeIntent, theme: Theme) => ({
|
|
23
|
-
textColor: theme.__hd__.tag.colors[themeIntent],
|
|
24
|
-
borderColor: theme.__hd__.tag.colors[themeIntent],
|
|
25
|
-
backgroundColor: theme.__hd__.tag.colors[`${themeIntent}Background`],
|
|
26
|
-
});
|
|
27
|
-
|
|
28
13
|
const StyledView = styled(View)<{
|
|
29
14
|
themeIntent: ThemeIntent;
|
|
30
|
-
|
|
31
|
-
}>(({ themeIntent, themeVariant, theme }) => {
|
|
32
|
-
const { borderColor, backgroundColor } =
|
|
33
|
-
themeVariant === 'filled'
|
|
34
|
-
? getFilledStyles(themeIntent, theme)
|
|
35
|
-
: getOutlinedStyles(themeIntent, theme);
|
|
36
|
-
|
|
15
|
+
}>(({ themeIntent, theme }) => {
|
|
37
16
|
return {
|
|
38
|
-
|
|
17
|
+
backgroundColor: theme.__hd__.tag.colors[`${themeIntent}Background`],
|
|
39
18
|
borderRadius: theme.__hd__.tag.radii.default,
|
|
40
19
|
paddingVertical: theme.__hd__.tag.space.verticalPadding,
|
|
41
20
|
paddingHorizontal: theme.__hd__.tag.space.horizontalPadding,
|
|
42
|
-
borderColor,
|
|
43
|
-
backgroundColor,
|
|
44
21
|
};
|
|
45
22
|
});
|
|
46
23
|
|
|
47
24
|
const StyledText = styled(Typography.Caption)<{
|
|
48
25
|
themeIntent: ThemeIntent;
|
|
49
|
-
|
|
50
|
-
}>(({ themeIntent, themeVariant, theme }) => {
|
|
51
|
-
const { textColor } =
|
|
52
|
-
themeVariant === 'filled'
|
|
53
|
-
? getFilledStyles(themeIntent, theme)
|
|
54
|
-
: getOutlinedStyles(themeIntent, theme);
|
|
55
|
-
|
|
26
|
+
}>(({ themeIntent, theme }) => {
|
|
56
27
|
return {
|
|
57
|
-
color:
|
|
28
|
+
color: theme.__hd__.tag.colors[themeIntent],
|
|
58
29
|
includeFontPadding: false,
|
|
59
30
|
textAlignVertical: 'center',
|
|
60
31
|
textAlign: 'center',
|
|
61
32
|
};
|
|
62
33
|
});
|
|
63
34
|
|
|
64
|
-
export {
|
|
35
|
+
export { StyledText, StyledView };
|
|
@@ -5,21 +5,21 @@ import Typography from '../../Typography';
|
|
|
5
5
|
|
|
6
6
|
describe('Tag', () => {
|
|
7
7
|
it.each`
|
|
8
|
-
|
|
9
|
-
${'
|
|
10
|
-
${'
|
|
11
|
-
${'
|
|
12
|
-
${'
|
|
13
|
-
${'
|
|
14
|
-
${'
|
|
15
|
-
${'
|
|
16
|
-
${'
|
|
17
|
-
${'
|
|
8
|
+
intent | content | expected
|
|
9
|
+
${'success'} | ${'SUCCESS'} | ${'SUCCESS'}
|
|
10
|
+
${'warning'} | ${'WARNING'} | ${'WARNING'}
|
|
11
|
+
${'danger'} | ${'DANGER'} | ${'DANGER'}
|
|
12
|
+
${'info'} | ${'INFO'} | ${'INFO'}
|
|
13
|
+
${'primary'} | ${'PRIMARY'} | ${'PRIMARY'}
|
|
14
|
+
${'warning'} | ${'WARNING'} | ${'WARNING'}
|
|
15
|
+
${'danger'} | ${'DANGER'} | ${'DANGER'}
|
|
16
|
+
${'info'} | ${'INFO'} | ${'INFO'}
|
|
17
|
+
${'primary'} | ${'PRIMARY'} | ${'PRIMARY'}
|
|
18
18
|
`(
|
|
19
|
-
'renders correctly when
|
|
20
|
-
({
|
|
19
|
+
'renders correctly when intent is $intent',
|
|
20
|
+
({ intent, content, expected }) => {
|
|
21
21
|
const { getByText, toJSON } = renderWithTheme(
|
|
22
|
-
<Tag content={content} intent={intent}
|
|
22
|
+
<Tag content={content} intent={intent} />
|
|
23
23
|
);
|
|
24
24
|
|
|
25
25
|
expect(toJSON()).toMatchSnapshot();
|
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
2
|
|
|
3
|
-
exports[`Tag renders correctly when
|
|
3
|
+
exports[`Tag renders correctly when intent is danger 1`] = `
|
|
4
4
|
<View
|
|
5
5
|
style={
|
|
6
6
|
Array [
|
|
7
7
|
Object {
|
|
8
8
|
"backgroundColor": "#fcebe7",
|
|
9
|
-
"borderColor": "#fcebe7",
|
|
10
9
|
"borderRadius": 4,
|
|
11
|
-
"borderWidth": 1,
|
|
12
10
|
"paddingHorizontal": 8,
|
|
13
11
|
"paddingVertical": 4,
|
|
14
12
|
},
|
|
@@ -16,7 +14,6 @@ exports[`Tag renders correctly when variant is filled and intent is danger 1`] =
|
|
|
16
14
|
]
|
|
17
15
|
}
|
|
18
16
|
themeIntent="danger"
|
|
19
|
-
themeVariant="filled"
|
|
20
17
|
>
|
|
21
18
|
<Text
|
|
22
19
|
allowFontScaling={false}
|
|
@@ -31,7 +28,7 @@ exports[`Tag renders correctly when variant is filled and intent is danger 1`] =
|
|
|
31
28
|
},
|
|
32
29
|
Array [
|
|
33
30
|
Object {
|
|
34
|
-
"color": "#
|
|
31
|
+
"color": "#cb300a",
|
|
35
32
|
"includeFontPadding": false,
|
|
36
33
|
"textAlign": "center",
|
|
37
34
|
"textAlignVertical": "center",
|
|
@@ -42,30 +39,26 @@ exports[`Tag renders correctly when variant is filled and intent is danger 1`] =
|
|
|
42
39
|
}
|
|
43
40
|
themeFontWeight="semi-bold"
|
|
44
41
|
themeIntent="body"
|
|
45
|
-
themeVariant="filled"
|
|
46
42
|
>
|
|
47
43
|
DANGER
|
|
48
44
|
</Text>
|
|
49
45
|
</View>
|
|
50
46
|
`;
|
|
51
47
|
|
|
52
|
-
exports[`Tag renders correctly when
|
|
48
|
+
exports[`Tag renders correctly when intent is danger 2`] = `
|
|
53
49
|
<View
|
|
54
50
|
style={
|
|
55
51
|
Array [
|
|
56
52
|
Object {
|
|
57
|
-
"backgroundColor": "#
|
|
58
|
-
"borderColor": "#ecf0ff",
|
|
53
|
+
"backgroundColor": "#fcebe7",
|
|
59
54
|
"borderRadius": 4,
|
|
60
|
-
"borderWidth": 1,
|
|
61
55
|
"paddingHorizontal": 8,
|
|
62
56
|
"paddingVertical": 4,
|
|
63
57
|
},
|
|
64
58
|
undefined,
|
|
65
59
|
]
|
|
66
60
|
}
|
|
67
|
-
themeIntent="
|
|
68
|
-
themeVariant="filled"
|
|
61
|
+
themeIntent="danger"
|
|
69
62
|
>
|
|
70
63
|
<Text
|
|
71
64
|
allowFontScaling={false}
|
|
@@ -80,7 +73,7 @@ exports[`Tag renders correctly when variant is filled and intent is info 1`] = `
|
|
|
80
73
|
},
|
|
81
74
|
Array [
|
|
82
75
|
Object {
|
|
83
|
-
"color": "#
|
|
76
|
+
"color": "#cb300a",
|
|
84
77
|
"includeFontPadding": false,
|
|
85
78
|
"textAlign": "center",
|
|
86
79
|
"textAlignVertical": "center",
|
|
@@ -91,30 +84,26 @@ exports[`Tag renders correctly when variant is filled and intent is info 1`] = `
|
|
|
91
84
|
}
|
|
92
85
|
themeFontWeight="semi-bold"
|
|
93
86
|
themeIntent="body"
|
|
94
|
-
themeVariant="filled"
|
|
95
87
|
>
|
|
96
|
-
|
|
88
|
+
DANGER
|
|
97
89
|
</Text>
|
|
98
90
|
</View>
|
|
99
91
|
`;
|
|
100
92
|
|
|
101
|
-
exports[`Tag renders correctly when
|
|
93
|
+
exports[`Tag renders correctly when intent is info 1`] = `
|
|
102
94
|
<View
|
|
103
95
|
style={
|
|
104
96
|
Array [
|
|
105
97
|
Object {
|
|
106
|
-
"backgroundColor":
|
|
107
|
-
"borderColor": undefined,
|
|
98
|
+
"backgroundColor": "#ecf0ff",
|
|
108
99
|
"borderRadius": 4,
|
|
109
|
-
"borderWidth": 1,
|
|
110
100
|
"paddingHorizontal": 8,
|
|
111
101
|
"paddingVertical": 4,
|
|
112
102
|
},
|
|
113
103
|
undefined,
|
|
114
104
|
]
|
|
115
105
|
}
|
|
116
|
-
themeIntent="
|
|
117
|
-
themeVariant="filled"
|
|
106
|
+
themeIntent="info"
|
|
118
107
|
>
|
|
119
108
|
<Text
|
|
120
109
|
allowFontScaling={false}
|
|
@@ -129,7 +118,7 @@ exports[`Tag renders correctly when variant is filled and intent is primary 1`]
|
|
|
129
118
|
},
|
|
130
119
|
Array [
|
|
131
120
|
Object {
|
|
132
|
-
"color": "#
|
|
121
|
+
"color": "#355bfb",
|
|
133
122
|
"includeFontPadding": false,
|
|
134
123
|
"textAlign": "center",
|
|
135
124
|
"textAlignVertical": "center",
|
|
@@ -140,30 +129,26 @@ exports[`Tag renders correctly when variant is filled and intent is primary 1`]
|
|
|
140
129
|
}
|
|
141
130
|
themeFontWeight="semi-bold"
|
|
142
131
|
themeIntent="body"
|
|
143
|
-
themeVariant="filled"
|
|
144
132
|
>
|
|
145
|
-
|
|
133
|
+
INFO
|
|
146
134
|
</Text>
|
|
147
135
|
</View>
|
|
148
136
|
`;
|
|
149
137
|
|
|
150
|
-
exports[`Tag renders correctly when
|
|
138
|
+
exports[`Tag renders correctly when intent is info 2`] = `
|
|
151
139
|
<View
|
|
152
140
|
style={
|
|
153
141
|
Array [
|
|
154
142
|
Object {
|
|
155
|
-
"backgroundColor": "#
|
|
156
|
-
"borderColor": "#fff6eb",
|
|
143
|
+
"backgroundColor": "#ecf0ff",
|
|
157
144
|
"borderRadius": 4,
|
|
158
|
-
"borderWidth": 1,
|
|
159
145
|
"paddingHorizontal": 8,
|
|
160
146
|
"paddingVertical": 4,
|
|
161
147
|
},
|
|
162
148
|
undefined,
|
|
163
149
|
]
|
|
164
150
|
}
|
|
165
|
-
themeIntent="
|
|
166
|
-
themeVariant="filled"
|
|
151
|
+
themeIntent="info"
|
|
167
152
|
>
|
|
168
153
|
<Text
|
|
169
154
|
allowFontScaling={false}
|
|
@@ -178,7 +163,7 @@ exports[`Tag renders correctly when variant is filled and intent is warning 1`]
|
|
|
178
163
|
},
|
|
179
164
|
Array [
|
|
180
165
|
Object {
|
|
181
|
-
"color": "#
|
|
166
|
+
"color": "#355bfb",
|
|
182
167
|
"includeFontPadding": false,
|
|
183
168
|
"textAlign": "center",
|
|
184
169
|
"textAlignVertical": "center",
|
|
@@ -189,30 +174,26 @@ exports[`Tag renders correctly when variant is filled and intent is warning 1`]
|
|
|
189
174
|
}
|
|
190
175
|
themeFontWeight="semi-bold"
|
|
191
176
|
themeIntent="body"
|
|
192
|
-
themeVariant="filled"
|
|
193
177
|
>
|
|
194
|
-
|
|
178
|
+
INFO
|
|
195
179
|
</Text>
|
|
196
180
|
</View>
|
|
197
181
|
`;
|
|
198
182
|
|
|
199
|
-
exports[`Tag renders correctly when
|
|
183
|
+
exports[`Tag renders correctly when intent is primary 1`] = `
|
|
200
184
|
<View
|
|
201
185
|
style={
|
|
202
186
|
Array [
|
|
203
187
|
Object {
|
|
204
|
-
"backgroundColor": "#
|
|
205
|
-
"borderColor": "#de350b",
|
|
188
|
+
"backgroundColor": "#ece8ef",
|
|
206
189
|
"borderRadius": 4,
|
|
207
|
-
"borderWidth": 1,
|
|
208
190
|
"paddingHorizontal": 8,
|
|
209
191
|
"paddingVertical": 4,
|
|
210
192
|
},
|
|
211
193
|
undefined,
|
|
212
194
|
]
|
|
213
195
|
}
|
|
214
|
-
themeIntent="
|
|
215
|
-
themeVariant="outlined"
|
|
196
|
+
themeIntent="primary"
|
|
216
197
|
>
|
|
217
198
|
<Text
|
|
218
199
|
allowFontScaling={false}
|
|
@@ -227,7 +208,7 @@ exports[`Tag renders correctly when variant is outlined and intent is danger 1`]
|
|
|
227
208
|
},
|
|
228
209
|
Array [
|
|
229
210
|
Object {
|
|
230
|
-
"color": "#
|
|
211
|
+
"color": "#401960",
|
|
231
212
|
"includeFontPadding": false,
|
|
232
213
|
"textAlign": "center",
|
|
233
214
|
"textAlignVertical": "center",
|
|
@@ -238,30 +219,26 @@ exports[`Tag renders correctly when variant is outlined and intent is danger 1`]
|
|
|
238
219
|
}
|
|
239
220
|
themeFontWeight="semi-bold"
|
|
240
221
|
themeIntent="body"
|
|
241
|
-
themeVariant="outlined"
|
|
242
222
|
>
|
|
243
|
-
|
|
223
|
+
PRIMARY
|
|
244
224
|
</Text>
|
|
245
225
|
</View>
|
|
246
226
|
`;
|
|
247
227
|
|
|
248
|
-
exports[`Tag renders correctly when
|
|
228
|
+
exports[`Tag renders correctly when intent is primary 2`] = `
|
|
249
229
|
<View
|
|
250
230
|
style={
|
|
251
231
|
Array [
|
|
252
232
|
Object {
|
|
253
|
-
"backgroundColor": "#
|
|
254
|
-
"borderColor": "#4568fb",
|
|
233
|
+
"backgroundColor": "#ece8ef",
|
|
255
234
|
"borderRadius": 4,
|
|
256
|
-
"borderWidth": 1,
|
|
257
235
|
"paddingHorizontal": 8,
|
|
258
236
|
"paddingVertical": 4,
|
|
259
237
|
},
|
|
260
238
|
undefined,
|
|
261
239
|
]
|
|
262
240
|
}
|
|
263
|
-
themeIntent="
|
|
264
|
-
themeVariant="outlined"
|
|
241
|
+
themeIntent="primary"
|
|
265
242
|
>
|
|
266
243
|
<Text
|
|
267
244
|
allowFontScaling={false}
|
|
@@ -276,7 +253,7 @@ exports[`Tag renders correctly when variant is outlined and intent is info 1`] =
|
|
|
276
253
|
},
|
|
277
254
|
Array [
|
|
278
255
|
Object {
|
|
279
|
-
"color": "#
|
|
256
|
+
"color": "#401960",
|
|
280
257
|
"includeFontPadding": false,
|
|
281
258
|
"textAlign": "center",
|
|
282
259
|
"textAlignVertical": "center",
|
|
@@ -287,30 +264,26 @@ exports[`Tag renders correctly when variant is outlined and intent is info 1`] =
|
|
|
287
264
|
}
|
|
288
265
|
themeFontWeight="semi-bold"
|
|
289
266
|
themeIntent="body"
|
|
290
|
-
themeVariant="outlined"
|
|
291
267
|
>
|
|
292
|
-
|
|
268
|
+
PRIMARY
|
|
293
269
|
</Text>
|
|
294
270
|
</View>
|
|
295
271
|
`;
|
|
296
272
|
|
|
297
|
-
exports[`Tag renders correctly when
|
|
273
|
+
exports[`Tag renders correctly when intent is success 1`] = `
|
|
298
274
|
<View
|
|
299
275
|
style={
|
|
300
276
|
Array [
|
|
301
277
|
Object {
|
|
302
|
-
"backgroundColor":
|
|
303
|
-
"borderColor": "#001f23",
|
|
278
|
+
"backgroundColor": "#f0fef4",
|
|
304
279
|
"borderRadius": 4,
|
|
305
|
-
"borderWidth": 1,
|
|
306
280
|
"paddingHorizontal": 8,
|
|
307
281
|
"paddingVertical": 4,
|
|
308
282
|
},
|
|
309
283
|
undefined,
|
|
310
284
|
]
|
|
311
285
|
}
|
|
312
|
-
themeIntent="
|
|
313
|
-
themeVariant="outlined"
|
|
286
|
+
themeIntent="success"
|
|
314
287
|
>
|
|
315
288
|
<Text
|
|
316
289
|
allowFontScaling={false}
|
|
@@ -325,7 +298,7 @@ exports[`Tag renders correctly when variant is outlined and intent is primary 1`
|
|
|
325
298
|
},
|
|
326
299
|
Array [
|
|
327
300
|
Object {
|
|
328
|
-
"color": "#
|
|
301
|
+
"color": "#017d6d",
|
|
329
302
|
"includeFontPadding": false,
|
|
330
303
|
"textAlign": "center",
|
|
331
304
|
"textAlignVertical": "center",
|
|
@@ -336,30 +309,26 @@ exports[`Tag renders correctly when variant is outlined and intent is primary 1`
|
|
|
336
309
|
}
|
|
337
310
|
themeFontWeight="semi-bold"
|
|
338
311
|
themeIntent="body"
|
|
339
|
-
themeVariant="outlined"
|
|
340
312
|
>
|
|
341
|
-
|
|
313
|
+
SUCCESS
|
|
342
314
|
</Text>
|
|
343
315
|
</View>
|
|
344
316
|
`;
|
|
345
317
|
|
|
346
|
-
exports[`Tag renders correctly when
|
|
318
|
+
exports[`Tag renders correctly when intent is warning 1`] = `
|
|
347
319
|
<View
|
|
348
320
|
style={
|
|
349
321
|
Array [
|
|
350
322
|
Object {
|
|
351
|
-
"backgroundColor": "#
|
|
352
|
-
"borderColor": "#017d6d",
|
|
323
|
+
"backgroundColor": "#fff6eb",
|
|
353
324
|
"borderRadius": 4,
|
|
354
|
-
"borderWidth": 1,
|
|
355
325
|
"paddingHorizontal": 8,
|
|
356
326
|
"paddingVertical": 4,
|
|
357
327
|
},
|
|
358
328
|
undefined,
|
|
359
329
|
]
|
|
360
330
|
}
|
|
361
|
-
themeIntent="
|
|
362
|
-
themeVariant="outlined"
|
|
331
|
+
themeIntent="warning"
|
|
363
332
|
>
|
|
364
333
|
<Text
|
|
365
334
|
allowFontScaling={false}
|
|
@@ -374,7 +343,7 @@ exports[`Tag renders correctly when variant is outlined and intent is success 1`
|
|
|
374
343
|
},
|
|
375
344
|
Array [
|
|
376
345
|
Object {
|
|
377
|
-
"color": "#
|
|
346
|
+
"color": "#ac5d00",
|
|
378
347
|
"includeFontPadding": false,
|
|
379
348
|
"textAlign": "center",
|
|
380
349
|
"textAlignVertical": "center",
|
|
@@ -385,22 +354,19 @@ exports[`Tag renders correctly when variant is outlined and intent is success 1`
|
|
|
385
354
|
}
|
|
386
355
|
themeFontWeight="semi-bold"
|
|
387
356
|
themeIntent="body"
|
|
388
|
-
themeVariant="outlined"
|
|
389
357
|
>
|
|
390
|
-
|
|
358
|
+
WARNING
|
|
391
359
|
</Text>
|
|
392
360
|
</View>
|
|
393
361
|
`;
|
|
394
362
|
|
|
395
|
-
exports[`Tag renders correctly when
|
|
363
|
+
exports[`Tag renders correctly when intent is warning 2`] = `
|
|
396
364
|
<View
|
|
397
365
|
style={
|
|
398
366
|
Array [
|
|
399
367
|
Object {
|
|
400
368
|
"backgroundColor": "#fff6eb",
|
|
401
|
-
"borderColor": "#ffa234",
|
|
402
369
|
"borderRadius": 4,
|
|
403
|
-
"borderWidth": 1,
|
|
404
370
|
"paddingHorizontal": 8,
|
|
405
371
|
"paddingVertical": 4,
|
|
406
372
|
},
|
|
@@ -408,7 +374,6 @@ exports[`Tag renders correctly when variant is outlined and intent is warning 1`
|
|
|
408
374
|
]
|
|
409
375
|
}
|
|
410
376
|
themeIntent="warning"
|
|
411
|
-
themeVariant="outlined"
|
|
412
377
|
>
|
|
413
378
|
<Text
|
|
414
379
|
allowFontScaling={false}
|
|
@@ -423,7 +388,7 @@ exports[`Tag renders correctly when variant is outlined and intent is warning 1`
|
|
|
423
388
|
},
|
|
424
389
|
Array [
|
|
425
390
|
Object {
|
|
426
|
-
"color": "#
|
|
391
|
+
"color": "#ac5d00",
|
|
427
392
|
"includeFontPadding": false,
|
|
428
393
|
"textAlign": "center",
|
|
429
394
|
"textAlignVertical": "center",
|
|
@@ -434,7 +399,6 @@ exports[`Tag renders correctly when variant is outlined and intent is warning 1`
|
|
|
434
399
|
}
|
|
435
400
|
themeFontWeight="semi-bold"
|
|
436
401
|
themeIntent="body"
|
|
437
|
-
themeVariant="outlined"
|
|
438
402
|
>
|
|
439
403
|
WARNING
|
|
440
404
|
</Text>
|
|
@@ -446,10 +410,8 @@ exports[`Tag renders correctly with custom content 1`] = `
|
|
|
446
410
|
style={
|
|
447
411
|
Array [
|
|
448
412
|
Object {
|
|
449
|
-
"backgroundColor":
|
|
450
|
-
"borderColor": "#001f23",
|
|
413
|
+
"backgroundColor": "#ece8ef",
|
|
451
414
|
"borderRadius": 4,
|
|
452
|
-
"borderWidth": 1,
|
|
453
415
|
"paddingHorizontal": 8,
|
|
454
416
|
"paddingVertical": 4,
|
|
455
417
|
},
|
|
@@ -457,7 +419,6 @@ exports[`Tag renders correctly with custom content 1`] = `
|
|
|
457
419
|
]
|
|
458
420
|
}
|
|
459
421
|
themeIntent="primary"
|
|
460
|
-
themeVariant="outlined"
|
|
461
422
|
>
|
|
462
423
|
<Text
|
|
463
424
|
allowFontScaling={false}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React, { ReactElement } from 'react';
|
|
2
2
|
import type { StyleProp, ViewProps, ViewStyle } from 'react-native';
|
|
3
3
|
import { StyledText, StyledView } from './StyledTag';
|
|
4
|
+
import { useDeprecation } from '../../utils/hooks';
|
|
4
5
|
|
|
5
6
|
interface TagProps extends ViewProps {
|
|
6
7
|
/**
|
|
@@ -12,6 +13,7 @@ interface TagProps extends ViewProps {
|
|
|
12
13
|
*/
|
|
13
14
|
intent?: 'primary' | 'info' | 'success' | 'warning' | 'danger' | 'archived';
|
|
14
15
|
/**
|
|
16
|
+
* @deprecated Tag variant prop is deprecated and will be removed in the next major release. Please remove it.
|
|
15
17
|
* Tag variant.
|
|
16
18
|
*/
|
|
17
19
|
variant?: 'filled' | 'outlined';
|
|
@@ -33,20 +35,20 @@ const Tag = ({
|
|
|
33
35
|
testID,
|
|
34
36
|
...nativeProps
|
|
35
37
|
}: TagProps): JSX.Element => {
|
|
38
|
+
useDeprecation(
|
|
39
|
+
`Tag's variant prop is deprecated and will be removed in the next major release. Please remove it.`,
|
|
40
|
+
variant !== undefined
|
|
41
|
+
);
|
|
42
|
+
|
|
36
43
|
return (
|
|
37
44
|
<StyledView
|
|
38
45
|
{...nativeProps}
|
|
39
46
|
themeIntent={intent}
|
|
40
|
-
themeVariant={variant}
|
|
41
47
|
style={style}
|
|
42
48
|
testID={testID}
|
|
43
49
|
>
|
|
44
50
|
{typeof content === 'string' ? (
|
|
45
|
-
<StyledText
|
|
46
|
-
themeIntent={intent}
|
|
47
|
-
themeVariant={variant}
|
|
48
|
-
fontWeight="semi-bold"
|
|
49
|
-
>
|
|
51
|
+
<StyledText themeIntent={intent} fontWeight="semi-bold">
|
|
50
52
|
{content}
|
|
51
53
|
</StyledText>
|
|
52
54
|
) : (
|
|
@@ -343,7 +343,7 @@ exports[`StyledAsteriskLabel renders correctly with themeState default 1`] = `
|
|
|
343
343
|
},
|
|
344
344
|
Array [
|
|
345
345
|
Object {
|
|
346
|
-
"color": "#
|
|
346
|
+
"color": "#cb300a",
|
|
347
347
|
"lineHeight": 12,
|
|
348
348
|
},
|
|
349
349
|
undefined,
|
|
@@ -401,7 +401,7 @@ exports[`StyledAsteriskLabel renders correctly with themeState error 1`] = `
|
|
|
401
401
|
},
|
|
402
402
|
Array [
|
|
403
403
|
Object {
|
|
404
|
-
"color": "#
|
|
404
|
+
"color": "#cb300a",
|
|
405
405
|
"lineHeight": 12,
|
|
406
406
|
},
|
|
407
407
|
undefined,
|
|
@@ -430,7 +430,7 @@ exports[`StyledAsteriskLabel renders correctly with themeState filled 1`] = `
|
|
|
430
430
|
},
|
|
431
431
|
Array [
|
|
432
432
|
Object {
|
|
433
|
-
"color": "#
|
|
433
|
+
"color": "#cb300a",
|
|
434
434
|
"lineHeight": 12,
|
|
435
435
|
},
|
|
436
436
|
undefined,
|
|
@@ -479,7 +479,7 @@ exports[`StyledBorderBackDrop renders correctly when focused 1`] = `
|
|
|
479
479
|
style={
|
|
480
480
|
Array [
|
|
481
481
|
Object {
|
|
482
|
-
"borderColor": "#
|
|
482
|
+
"borderColor": "#cb300a",
|
|
483
483
|
"borderRadius": 8,
|
|
484
484
|
"borderWidth": 2,
|
|
485
485
|
"bottom": 0,
|
|
@@ -545,7 +545,7 @@ exports[`StyledBorderBackDrop renders correctly with themeState error 1`] = `
|
|
|
545
545
|
style={
|
|
546
546
|
Array [
|
|
547
547
|
Object {
|
|
548
|
-
"borderColor": "#
|
|
548
|
+
"borderColor": "#cb300a",
|
|
549
549
|
"borderRadius": 8,
|
|
550
550
|
"borderWidth": 1,
|
|
551
551
|
"bottom": 0,
|
|
@@ -620,7 +620,7 @@ exports[`StyledErrorMessage renders correctly 1`] = `
|
|
|
620
620
|
},
|
|
621
621
|
Array [
|
|
622
622
|
Object {
|
|
623
|
-
"color": "#
|
|
623
|
+
"color": "#cb300a",
|
|
624
624
|
"marginLeft": 4,
|
|
625
625
|
},
|
|
626
626
|
undefined,
|
|
@@ -763,7 +763,7 @@ exports[`StyledMaxLengthMessage renders correctly with themeState error 1`] = `
|
|
|
763
763
|
Array [
|
|
764
764
|
Object {
|
|
765
765
|
"alignSelf": "flex-end",
|
|
766
|
-
"color": "#
|
|
766
|
+
"color": "#cb300a",
|
|
767
767
|
"flex": 1,
|
|
768
768
|
"flexGrow": 1,
|
|
769
769
|
"marginRight": 4,
|