@hero-design/rn 8.68.0-alpha.0 → 8.68.0
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/.turbo/turbo-build.log +8 -0
- package/CHANGELOG.md +12 -0
- package/es/index.js +513 -154
- package/lib/index.js +513 -153
- package/package.json +1 -1
- package/src/components/Accordion/__tests__/__snapshots__/AccordionItem.spec.tsx.snap +4 -4
- package/src/components/Accordion/__tests__/__snapshots__/index.spec.tsx.snap +6 -6
- package/src/components/Alert/StyledAlert.tsx +24 -2
- package/src/components/Alert/__tests__/__snapshots__/index.spec.tsx.snap +150 -30
- package/src/components/Alert/index.tsx +15 -10
- package/src/components/AnimatedScroller/__tests__/__snapshots__/ScrollablesWithFAB.spec.tsx.snap +18 -18
- package/src/components/Avatar/AvatarStack/__tests__/__snapshots__/StyledAvatarStack.spec.tsx.snap +2 -2
- package/src/components/Avatar/__tests__/__snapshots__/StyledAvatar.spec.tsx.snap +1 -1
- package/src/components/Avatar/__tests__/__snapshots__/index.spec.tsx.snap +3 -3
- package/src/components/Badge/StyledBadge.tsx +13 -5
- package/src/components/Badge/__tests__/Badge.spec.tsx +9 -0
- package/src/components/Badge/__tests__/__snapshots__/Badge.spec.tsx.snap +129 -13
- package/src/components/Badge/index.tsx +8 -2
- package/src/components/BottomNavigation/__tests__/__snapshots__/index.spec.tsx.snap +3 -3
- package/src/components/Button/LoadingIndicator/__tests__/__snapshots__/StyledLoadingIndicator.spec.tsx.snap +4 -4
- package/src/components/Button/LoadingIndicator/__tests__/__snapshots__/index.spec.tsx.snap +12 -12
- package/src/components/Button/__tests__/__snapshots__/Button.spec.tsx.snap +21 -21
- package/src/components/Button/__tests__/__snapshots__/StyledButton.spec.tsx.snap +12 -12
- package/src/components/Calendar/__tests__/__snapshots__/CalendarRowItem.spec.tsx.snap +5 -5
- package/src/components/Card/DataCard/__tests__/__snapshots__/StyledDataCard.spec.tsx.snap +1 -1
- package/src/components/Card/__tests__/__snapshots__/index.spec.tsx.snap +1 -1
- package/src/components/Carousel/__tests__/__snapshots__/CardCarousel.spec.tsx.snap +4 -4
- package/src/components/Carousel/__tests__/__snapshots__/StyledCardCarousel.spec.tsx.snap +3 -3
- package/src/components/Carousel/__tests__/__snapshots__/StyledCarousel.spec.tsx.snap +2 -2
- package/src/components/Carousel/__tests__/__snapshots__/index.spec.tsx.snap +30 -30
- package/src/components/Chip/__tests__/__snapshots__/index.spec.tsx.snap +2 -2
- package/src/components/DatePicker/__tests__/__snapshots__/DatePickerIOS.spec.tsx.snap +1 -1
- package/src/components/Error/__tests__/__snapshots__/index.spec.tsx.snap +1 -1
- package/src/components/FAB/ActionGroup/__tests__/__snapshots__/index.spec.tsx.snap +22 -22
- package/src/components/FAB/__tests__/__snapshots__/AnimatedFABIcon.spec.tsx.snap +2 -2
- package/src/components/FAB/__tests__/__snapshots__/StyledFAB.spec.tsx.snap +3 -3
- package/src/components/FAB/__tests__/__snapshots__/index.spec.tsx.snap +4 -4
- package/src/components/HeroDesignProvider/__tests__/__snapshots__/index.spec.tsx.snap +1 -1
- package/src/components/Icon/__tests__/__snapshots__/index.spec.tsx.snap +1 -1
- package/src/components/List/__tests__/__snapshots__/BasicListItem.spec.tsx.snap +2 -2
- package/src/components/List/__tests__/__snapshots__/ListItem.spec.tsx.snap +6 -6
- package/src/components/List/__tests__/__snapshots__/StyledBasicListItem.spec.tsx.snap +2 -2
- package/src/components/List/__tests__/__snapshots__/StyledListItem.spec.tsx.snap +2 -2
- package/src/components/PageControl/__tests__/__snapshots__/index.spec.tsx.snap +3 -3
- package/src/components/Progress/__tests__/__snapshots__/index.spec.js.snap +5 -5
- package/src/components/Radio/__tests__/__snapshots__/Radio.spec.tsx.snap +10 -10
- package/src/components/Radio/__tests__/__snapshots__/RadioGroup.spec.tsx.snap +14 -14
- package/src/components/Rate/__tests__/__snapshots__/index.spec.tsx.snap +10 -10
- package/src/components/Search/SearchOneLine.tsx +196 -0
- package/src/components/Search/SearchSuffixIcon.tsx +37 -0
- package/src/components/Search/SearchTwoLine.tsx +64 -0
- package/src/components/Search/StyledSearch.tsx +67 -0
- package/src/components/Search/__tests__/SearchOneLine.spec.tsx +197 -0
- package/src/components/Search/__tests__/SearchSuffixIcon.spec.tsx +12 -0
- package/src/components/Search/__tests__/SearchTwoLine.spec.tsx +20 -0
- package/src/components/Search/__tests__/__snapshots__/SearchOneLine.spec.tsx.snap +707 -0
- package/src/components/Search/__tests__/__snapshots__/SearchSuffixIcon.spec.tsx.snap +134 -0
- package/src/components/Search/__tests__/__snapshots__/SearchTwoLine.spec.tsx.snap +170 -0
- package/src/components/Search/__tests__/__snapshots__/utils.spec.tsx.snap +115 -0
- package/src/components/Search/__tests__/utils.spec.tsx +19 -0
- package/src/components/Search/index.tsx +17 -0
- package/src/components/Search/utils.tsx +31 -0
- package/src/components/SectionHeading/__tests__/__snapshots__/StyledHeading.spec.tsx.snap +1 -1
- package/src/components/SectionHeading/__tests__/__snapshots__/index.spec.tsx.snap +2 -2
- package/src/components/Select/MultiSelect/__tests__/__snapshots__/Option.spec.tsx.snap +2 -2
- package/src/components/Select/MultiSelect/__tests__/__snapshots__/OptionList.spec.tsx.snap +14 -14
- package/src/components/Select/MultiSelect/__tests__/__snapshots__/index.spec.tsx.snap +14 -14
- package/src/components/Select/SingleSelect/__tests__/__snapshots__/Option.spec.tsx.snap +1 -1
- package/src/components/Select/SingleSelect/__tests__/__snapshots__/OptionList.spec.tsx.snap +8 -8
- package/src/components/Select/SingleSelect/__tests__/__snapshots__/index.spec.tsx.snap +2 -2
- package/src/components/Slider/__tests__/__snapshots__/index.spec.tsx.snap +9 -9
- package/src/components/Spinner/__tests__/__snapshots__/AnimatedSpinner.spec.tsx.snap +4 -4
- package/src/components/Spinner/__tests__/__snapshots__/StyledSpinner.spec.tsx.snap +32 -32
- package/src/components/Spinner/__tests__/__snapshots__/index.spec.tsx.snap +4 -4
- package/src/components/Success/__tests__/__snapshots__/index.spec.tsx.snap +1 -1
- package/src/components/Swipeable/__tests__/__snapshots__/SwipeableAction.spec.tsx.snap +1 -1
- package/src/components/Switch/SelectorSwitch/__tests__/__snapshots__/index.spec.tsx.snap +1 -1
- package/src/components/Switch/__tests__/__snapshots__/StyledSwitch.spec.tsx.snap +2 -2
- package/src/components/Tabs/__tests__/__snapshots__/ScrollableTabs.spec.tsx.snap +24 -9
- package/src/components/Tabs/__tests__/__snapshots__/ScrollableTabsHeader.spec.tsx.snap +19 -9
- package/src/components/Tabs/__tests__/__snapshots__/TabWithBadge.spec.tsx.snap +7 -2
- package/src/components/Tabs/__tests__/__snapshots__/index.spec.tsx.snap +24 -9
- package/src/components/Tag/__tests__/__snapshots__/Tag.spec.tsx.snap +5 -5
- package/src/components/TimePicker/__tests__/__snapshots__/TimePickerIOS.spec.tsx.snap +1 -1
- package/src/components/Toolbar/__tests__/__snapshots__/ToolbarGroup.spec.tsx.snap +18 -18
- package/src/components/Toolbar/__tests__/__snapshots__/ToolbarItem.spec.tsx.snap +7 -7
- 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 +1 -1
- package/src/components/Typography/Title/__tests__/__snapshots__/index.spec.tsx.snap +2 -2
- package/src/index.ts +2 -0
- package/src/theme/ThemeSwitcher.tsx +2 -12
- package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +136 -77
- package/src/theme/components/alert.ts +14 -5
- package/src/theme/components/badge.ts +21 -21
- package/src/theme/components/search.ts +56 -0
- package/src/theme/getTheme.ts +5 -2
- package/stats/8.67.0/rn-stats.html +4844 -0
- package/stats/8.68.0/rn-stats.html +4842 -0
- 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 +17 -2
- 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 +4 -0
- package/types/components/Badge/index.d.ts +6 -2
- 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 +0 -0
- 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 +0 -0
- 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 -0
- 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/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/Search/SearchOneLine.d.ts +60 -0
- package/types/components/Search/SearchSuffixIcon.d.ts +24 -0
- package/types/components/Search/SearchTwoLine.d.ts +31 -0
- package/types/components/Search/StyledSearch.d.ts +44 -0
- package/types/components/Search/index.d.ts +10 -0
- package/types/components/Search/utils.d.ts +8 -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 +0 -0
- 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/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 +0 -0
- package/types/components/Tag/index.d.ts +0 -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 -1
- package/types/testHelpers/renderWithTheme.d.ts +0 -0
- package/types/theme/ThemeProvider.d.ts +0 -0
- package/types/theme/ThemeSwitcher.d.ts +1 -1
- package/types/theme/components/accordion.d.ts +0 -0
- package/types/theme/components/alert.d.ts +14 -5
- 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 +21 -21
- 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/search.d.ts +38 -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 +0 -0
- package/types/theme/components/switch.d.ts +0 -0
- package/types/theme/components/tabs.d.ts +0 -0
- package/types/theme/components/tag.d.ts +0 -0
- 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 +2 -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/types/components/Tabs/ScrollableTabsHeader.d.ts +0 -35
package/src/components/AnimatedScroller/__tests__/__snapshots__/ScrollablesWithFAB.spec.tsx.snap
CHANGED
|
@@ -794,7 +794,7 @@ exports[`Scrollables With FAB [Function ExampleFlatListWithFAB] renders ActionGr
|
|
|
794
794
|
{
|
|
795
795
|
"alignItems": "center",
|
|
796
796
|
"alignSelf": "flex-end",
|
|
797
|
-
"backgroundColor": "#
|
|
797
|
+
"backgroundColor": "#401960",
|
|
798
798
|
"borderRadius": 999,
|
|
799
799
|
"bottom": undefined,
|
|
800
800
|
"elevation": 3,
|
|
@@ -855,7 +855,7 @@ exports[`Scrollables With FAB [Function ExampleFlatListWithFAB] renders ActionGr
|
|
|
855
855
|
},
|
|
856
856
|
[
|
|
857
857
|
{
|
|
858
|
-
"color": "#
|
|
858
|
+
"color": "#ffffff",
|
|
859
859
|
"lineHeight": 24,
|
|
860
860
|
"textAlign": "center",
|
|
861
861
|
"textAlignVertical": "center",
|
|
@@ -882,7 +882,7 @@ exports[`Scrollables With FAB [Function ExampleFlatListWithFAB] renders ActionGr
|
|
|
882
882
|
},
|
|
883
883
|
[
|
|
884
884
|
{
|
|
885
|
-
"color": "#
|
|
885
|
+
"color": "#ffffff",
|
|
886
886
|
"marginHorizontal": 8,
|
|
887
887
|
"textAlign": "center",
|
|
888
888
|
"textAlignVertical": "center",
|
|
@@ -1697,7 +1697,7 @@ exports[`Scrollables With FAB [Function ExampleFlatListWithFAB] renders FAB corr
|
|
|
1697
1697
|
{
|
|
1698
1698
|
"alignItems": "center",
|
|
1699
1699
|
"alignSelf": "flex-start",
|
|
1700
|
-
"backgroundColor": "#
|
|
1700
|
+
"backgroundColor": "#401960",
|
|
1701
1701
|
"borderRadius": 999,
|
|
1702
1702
|
"bottom": undefined,
|
|
1703
1703
|
"elevation": 3,
|
|
@@ -1755,7 +1755,7 @@ exports[`Scrollables With FAB [Function ExampleFlatListWithFAB] renders FAB corr
|
|
|
1755
1755
|
},
|
|
1756
1756
|
[
|
|
1757
1757
|
{
|
|
1758
|
-
"color": "#
|
|
1758
|
+
"color": "#ffffff",
|
|
1759
1759
|
"lineHeight": 24,
|
|
1760
1760
|
"textAlign": "center",
|
|
1761
1761
|
"textAlignVertical": "center",
|
|
@@ -1782,7 +1782,7 @@ exports[`Scrollables With FAB [Function ExampleFlatListWithFAB] renders FAB corr
|
|
|
1782
1782
|
},
|
|
1783
1783
|
[
|
|
1784
1784
|
{
|
|
1785
|
-
"color": "#
|
|
1785
|
+
"color": "#ffffff",
|
|
1786
1786
|
"marginHorizontal": 8,
|
|
1787
1787
|
"textAlign": "center",
|
|
1788
1788
|
"textAlignVertical": "center",
|
|
@@ -1956,7 +1956,7 @@ exports[`Scrollables With FAB [Function ExampleScrollViewWithFAB] renders Action
|
|
|
1956
1956
|
{
|
|
1957
1957
|
"alignItems": "center",
|
|
1958
1958
|
"alignSelf": "flex-end",
|
|
1959
|
-
"backgroundColor": "#
|
|
1959
|
+
"backgroundColor": "#401960",
|
|
1960
1960
|
"borderRadius": 999,
|
|
1961
1961
|
"bottom": undefined,
|
|
1962
1962
|
"elevation": 3,
|
|
@@ -2017,7 +2017,7 @@ exports[`Scrollables With FAB [Function ExampleScrollViewWithFAB] renders Action
|
|
|
2017
2017
|
},
|
|
2018
2018
|
[
|
|
2019
2019
|
{
|
|
2020
|
-
"color": "#
|
|
2020
|
+
"color": "#ffffff",
|
|
2021
2021
|
"lineHeight": 24,
|
|
2022
2022
|
"textAlign": "center",
|
|
2023
2023
|
"textAlignVertical": "center",
|
|
@@ -2044,7 +2044,7 @@ exports[`Scrollables With FAB [Function ExampleScrollViewWithFAB] renders Action
|
|
|
2044
2044
|
},
|
|
2045
2045
|
[
|
|
2046
2046
|
{
|
|
2047
|
-
"color": "#
|
|
2047
|
+
"color": "#ffffff",
|
|
2048
2048
|
"marginHorizontal": 8,
|
|
2049
2049
|
"textAlign": "center",
|
|
2050
2050
|
"textAlignVertical": "center",
|
|
@@ -2199,7 +2199,7 @@ exports[`Scrollables With FAB [Function ExampleScrollViewWithFAB] renders FAB co
|
|
|
2199
2199
|
{
|
|
2200
2200
|
"alignItems": "center",
|
|
2201
2201
|
"alignSelf": "flex-start",
|
|
2202
|
-
"backgroundColor": "#
|
|
2202
|
+
"backgroundColor": "#401960",
|
|
2203
2203
|
"borderRadius": 999,
|
|
2204
2204
|
"bottom": undefined,
|
|
2205
2205
|
"elevation": 3,
|
|
@@ -2257,7 +2257,7 @@ exports[`Scrollables With FAB [Function ExampleScrollViewWithFAB] renders FAB co
|
|
|
2257
2257
|
},
|
|
2258
2258
|
[
|
|
2259
2259
|
{
|
|
2260
|
-
"color": "#
|
|
2260
|
+
"color": "#ffffff",
|
|
2261
2261
|
"lineHeight": 24,
|
|
2262
2262
|
"textAlign": "center",
|
|
2263
2263
|
"textAlignVertical": "center",
|
|
@@ -2284,7 +2284,7 @@ exports[`Scrollables With FAB [Function ExampleScrollViewWithFAB] renders FAB co
|
|
|
2284
2284
|
},
|
|
2285
2285
|
[
|
|
2286
2286
|
{
|
|
2287
|
-
"color": "#
|
|
2287
|
+
"color": "#ffffff",
|
|
2288
2288
|
"marginHorizontal": 8,
|
|
2289
2289
|
"textAlign": "center",
|
|
2290
2290
|
"textAlignVertical": "center",
|
|
@@ -2765,7 +2765,7 @@ exports[`Scrollables With FAB [Function ExampleSectionListWithFAB] renders Actio
|
|
|
2765
2765
|
{
|
|
2766
2766
|
"alignItems": "center",
|
|
2767
2767
|
"alignSelf": "flex-end",
|
|
2768
|
-
"backgroundColor": "#
|
|
2768
|
+
"backgroundColor": "#401960",
|
|
2769
2769
|
"borderRadius": 999,
|
|
2770
2770
|
"bottom": undefined,
|
|
2771
2771
|
"elevation": 3,
|
|
@@ -2826,7 +2826,7 @@ exports[`Scrollables With FAB [Function ExampleSectionListWithFAB] renders Actio
|
|
|
2826
2826
|
},
|
|
2827
2827
|
[
|
|
2828
2828
|
{
|
|
2829
|
-
"color": "#
|
|
2829
|
+
"color": "#ffffff",
|
|
2830
2830
|
"lineHeight": 24,
|
|
2831
2831
|
"textAlign": "center",
|
|
2832
2832
|
"textAlignVertical": "center",
|
|
@@ -2853,7 +2853,7 @@ exports[`Scrollables With FAB [Function ExampleSectionListWithFAB] renders Actio
|
|
|
2853
2853
|
},
|
|
2854
2854
|
[
|
|
2855
2855
|
{
|
|
2856
|
-
"color": "#
|
|
2856
|
+
"color": "#ffffff",
|
|
2857
2857
|
"marginHorizontal": 8,
|
|
2858
2858
|
"textAlign": "center",
|
|
2859
2859
|
"textAlignVertical": "center",
|
|
@@ -3315,7 +3315,7 @@ exports[`Scrollables With FAB [Function ExampleSectionListWithFAB] renders FAB c
|
|
|
3315
3315
|
{
|
|
3316
3316
|
"alignItems": "center",
|
|
3317
3317
|
"alignSelf": "flex-start",
|
|
3318
|
-
"backgroundColor": "#
|
|
3318
|
+
"backgroundColor": "#401960",
|
|
3319
3319
|
"borderRadius": 999,
|
|
3320
3320
|
"bottom": undefined,
|
|
3321
3321
|
"elevation": 3,
|
|
@@ -3373,7 +3373,7 @@ exports[`Scrollables With FAB [Function ExampleSectionListWithFAB] renders FAB c
|
|
|
3373
3373
|
},
|
|
3374
3374
|
[
|
|
3375
3375
|
{
|
|
3376
|
-
"color": "#
|
|
3376
|
+
"color": "#ffffff",
|
|
3377
3377
|
"lineHeight": 24,
|
|
3378
3378
|
"textAlign": "center",
|
|
3379
3379
|
"textAlignVertical": "center",
|
|
@@ -3400,7 +3400,7 @@ exports[`Scrollables With FAB [Function ExampleSectionListWithFAB] renders FAB c
|
|
|
3400
3400
|
},
|
|
3401
3401
|
[
|
|
3402
3402
|
{
|
|
3403
|
-
"color": "#
|
|
3403
|
+
"color": "#ffffff",
|
|
3404
3404
|
"marginHorizontal": 8,
|
|
3405
3405
|
"textAlign": "center",
|
|
3406
3406
|
"textAlignVertical": "center",
|
package/src/components/Avatar/AvatarStack/__tests__/__snapshots__/StyledAvatarStack.spec.tsx.snap
CHANGED
|
@@ -38,7 +38,7 @@ exports[`StyledAvatar renders correctly with $variant 1`] = `
|
|
|
38
38
|
onStartShouldSetResponder={[Function]}
|
|
39
39
|
style={
|
|
40
40
|
{
|
|
41
|
-
"backgroundColor": "#
|
|
41
|
+
"backgroundColor": "#401960",
|
|
42
42
|
"borderRadius": 999,
|
|
43
43
|
"height": 40,
|
|
44
44
|
"left": 56,
|
|
@@ -160,7 +160,7 @@ exports[`StyledAvatar renders correctly with $variant 2`] = `
|
|
|
160
160
|
onStartShouldSetResponder={[Function]}
|
|
161
161
|
style={
|
|
162
162
|
{
|
|
163
|
-
"backgroundColor": "#
|
|
163
|
+
"backgroundColor": "#401960",
|
|
164
164
|
"borderRadius": 999,
|
|
165
165
|
"height": 40,
|
|
166
166
|
"left": undefined,
|
|
@@ -38,7 +38,7 @@ exports[`Avatar fallbacks to title when there image failed to load 1`] = `
|
|
|
38
38
|
onStartShouldSetResponder={[Function]}
|
|
39
39
|
style={
|
|
40
40
|
{
|
|
41
|
-
"backgroundColor": "#
|
|
41
|
+
"backgroundColor": "#401960",
|
|
42
42
|
"borderRadius": 999,
|
|
43
43
|
"height": 32,
|
|
44
44
|
"opacity": 1,
|
|
@@ -177,7 +177,7 @@ exports[`Avatar prioritizes source over title 1`] = `
|
|
|
177
177
|
onStartShouldSetResponder={[Function]}
|
|
178
178
|
style={
|
|
179
179
|
{
|
|
180
|
-
"backgroundColor": "#
|
|
180
|
+
"backgroundColor": "#401960",
|
|
181
181
|
"borderRadius": 999,
|
|
182
182
|
"height": 32,
|
|
183
183
|
"opacity": 1,
|
|
@@ -270,7 +270,7 @@ exports[`Avatar shows title when there is no source 1`] = `
|
|
|
270
270
|
onStartShouldSetResponder={[Function]}
|
|
271
271
|
style={
|
|
272
272
|
{
|
|
273
|
-
"backgroundColor": "#
|
|
273
|
+
"backgroundColor": "#401960",
|
|
274
274
|
"borderRadius": 999,
|
|
275
275
|
"height": 32,
|
|
276
276
|
"opacity": 1,
|
|
@@ -12,23 +12,31 @@ type ThemeIntent =
|
|
|
12
12
|
|
|
13
13
|
type ThemePadding = 'narrowContent' | 'wideContent';
|
|
14
14
|
|
|
15
|
+
type ThemeSize = 'medium' | 'small';
|
|
16
|
+
|
|
15
17
|
const StyledView = styled(Animated.View)<{
|
|
16
18
|
themeIntent: ThemeIntent;
|
|
17
19
|
themePadding: ThemePadding;
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
20
|
+
themeSize: ThemeSize;
|
|
21
|
+
}>(({ themeIntent, themePadding, themeSize, theme }) => ({
|
|
22
|
+
height: theme.__hd__.badge.sizes[themeSize].height,
|
|
23
|
+
minWidth: theme.__hd__.badge.sizes[themeSize].minWidth,
|
|
21
24
|
alignItems: 'center',
|
|
22
25
|
justifyContent: 'center',
|
|
23
26
|
backgroundColor: theme.__hd__.badge.colors[themeIntent],
|
|
24
27
|
borderRadius: theme.radii.rounded,
|
|
25
28
|
paddingHorizontal:
|
|
26
29
|
themePadding === 'wideContent'
|
|
27
|
-
? theme.__hd__.badge.space.horizontalPadding
|
|
30
|
+
? theme.__hd__.badge.space[themeSize].horizontalPadding
|
|
28
31
|
: undefined,
|
|
29
32
|
}));
|
|
30
33
|
|
|
31
|
-
const StyledText = styled(Typography.Caption)
|
|
34
|
+
const StyledText = styled(Typography.Caption)<{
|
|
35
|
+
themeSize: ThemeSize;
|
|
36
|
+
}>(({ theme, themeSize }) => ({
|
|
37
|
+
fontSize: theme.__hd__.badge.fontSizes[themeSize],
|
|
38
|
+
lineHeight: theme.__hd__.badge.lineHeights[themeSize],
|
|
39
|
+
fontFamily: theme.__hd__.badge.fonts[themeSize],
|
|
32
40
|
color: theme.__hd__.badge.colors.text,
|
|
33
41
|
includeFontPadding: false,
|
|
34
42
|
textAlignVertical: 'center',
|
|
@@ -63,4 +63,13 @@ describe('Badge', () => {
|
|
|
63
63
|
expect(getByTestId('number-badge')).toBeDefined();
|
|
64
64
|
expect(getByText('50+')).toBeDefined();
|
|
65
65
|
});
|
|
66
|
+
|
|
67
|
+
it('has small style when size is small', () => {
|
|
68
|
+
const { getByText, toJSON } = renderWithTheme(
|
|
69
|
+
<Badge content="SMALL" size="small" />
|
|
70
|
+
);
|
|
71
|
+
|
|
72
|
+
expect(toJSON()).toMatchSnapshot();
|
|
73
|
+
expect(getByText('SMALL')).toBeDefined();
|
|
74
|
+
});
|
|
66
75
|
});
|
|
@@ -15,9 +15,9 @@ exports[`Badge has danger style when intent is danger 1`] = `
|
|
|
15
15
|
"alignItems": "center",
|
|
16
16
|
"backgroundColor": "#cb300a",
|
|
17
17
|
"borderRadius": 999,
|
|
18
|
-
"height":
|
|
18
|
+
"height": 24,
|
|
19
19
|
"justifyContent": "center",
|
|
20
|
-
"minWidth":
|
|
20
|
+
"minWidth": 24,
|
|
21
21
|
"opacity": 1,
|
|
22
22
|
"paddingHorizontal": 8,
|
|
23
23
|
"transform": [
|
|
@@ -29,6 +29,7 @@ exports[`Badge has danger style when intent is danger 1`] = `
|
|
|
29
29
|
}
|
|
30
30
|
themeIntent="danger"
|
|
31
31
|
themePadding="wideContent"
|
|
32
|
+
themeSize="medium"
|
|
32
33
|
>
|
|
33
34
|
<Text
|
|
34
35
|
allowFontScaling={false}
|
|
@@ -44,7 +45,10 @@ exports[`Badge has danger style when intent is danger 1`] = `
|
|
|
44
45
|
[
|
|
45
46
|
{
|
|
46
47
|
"color": "#ffffff",
|
|
48
|
+
"fontFamily": "BeVietnamPro-Regular",
|
|
49
|
+
"fontSize": 12,
|
|
47
50
|
"includeFontPadding": false,
|
|
51
|
+
"lineHeight": 16,
|
|
48
52
|
"textAlign": "center",
|
|
49
53
|
"textAlignVertical": "center",
|
|
50
54
|
},
|
|
@@ -54,6 +58,7 @@ exports[`Badge has danger style when intent is danger 1`] = `
|
|
|
54
58
|
}
|
|
55
59
|
themeFontWeight="regular"
|
|
56
60
|
themeIntent="body"
|
|
61
|
+
themeSize="medium"
|
|
57
62
|
>
|
|
58
63
|
DECLINED
|
|
59
64
|
</Text>
|
|
@@ -96,9 +101,9 @@ exports[`Badge has info style when intent is info 1`] = `
|
|
|
96
101
|
"alignItems": "center",
|
|
97
102
|
"backgroundColor": "#355bfb",
|
|
98
103
|
"borderRadius": 999,
|
|
99
|
-
"height":
|
|
104
|
+
"height": 24,
|
|
100
105
|
"justifyContent": "center",
|
|
101
|
-
"minWidth":
|
|
106
|
+
"minWidth": 24,
|
|
102
107
|
"opacity": 1,
|
|
103
108
|
"paddingHorizontal": 8,
|
|
104
109
|
"transform": [
|
|
@@ -110,6 +115,7 @@ exports[`Badge has info style when intent is info 1`] = `
|
|
|
110
115
|
}
|
|
111
116
|
themeIntent="info"
|
|
112
117
|
themePadding="wideContent"
|
|
118
|
+
themeSize="medium"
|
|
113
119
|
>
|
|
114
120
|
<Text
|
|
115
121
|
allowFontScaling={false}
|
|
@@ -125,7 +131,10 @@ exports[`Badge has info style when intent is info 1`] = `
|
|
|
125
131
|
[
|
|
126
132
|
{
|
|
127
133
|
"color": "#ffffff",
|
|
134
|
+
"fontFamily": "BeVietnamPro-Regular",
|
|
135
|
+
"fontSize": 12,
|
|
128
136
|
"includeFontPadding": false,
|
|
137
|
+
"lineHeight": 16,
|
|
129
138
|
"textAlign": "center",
|
|
130
139
|
"textAlignVertical": "center",
|
|
131
140
|
},
|
|
@@ -135,6 +144,7 @@ exports[`Badge has info style when intent is info 1`] = `
|
|
|
135
144
|
}
|
|
136
145
|
themeFontWeight="regular"
|
|
137
146
|
themeIntent="body"
|
|
147
|
+
themeSize="medium"
|
|
138
148
|
>
|
|
139
149
|
SUBMITTED
|
|
140
150
|
</Text>
|
|
@@ -175,11 +185,11 @@ exports[`Badge has info style when intent is primary 1`] = `
|
|
|
175
185
|
style={
|
|
176
186
|
{
|
|
177
187
|
"alignItems": "center",
|
|
178
|
-
"backgroundColor": "#
|
|
188
|
+
"backgroundColor": "#401960",
|
|
179
189
|
"borderRadius": 999,
|
|
180
|
-
"height":
|
|
190
|
+
"height": 24,
|
|
181
191
|
"justifyContent": "center",
|
|
182
|
-
"minWidth":
|
|
192
|
+
"minWidth": 24,
|
|
183
193
|
"opacity": 1,
|
|
184
194
|
"paddingHorizontal": 8,
|
|
185
195
|
"transform": [
|
|
@@ -191,6 +201,7 @@ exports[`Badge has info style when intent is primary 1`] = `
|
|
|
191
201
|
}
|
|
192
202
|
themeIntent="primary"
|
|
193
203
|
themePadding="wideContent"
|
|
204
|
+
themeSize="medium"
|
|
194
205
|
>
|
|
195
206
|
<Text
|
|
196
207
|
allowFontScaling={false}
|
|
@@ -206,7 +217,10 @@ exports[`Badge has info style when intent is primary 1`] = `
|
|
|
206
217
|
[
|
|
207
218
|
{
|
|
208
219
|
"color": "#ffffff",
|
|
220
|
+
"fontFamily": "BeVietnamPro-Regular",
|
|
221
|
+
"fontSize": 12,
|
|
209
222
|
"includeFontPadding": false,
|
|
223
|
+
"lineHeight": 16,
|
|
210
224
|
"textAlign": "center",
|
|
211
225
|
"textAlignVertical": "center",
|
|
212
226
|
},
|
|
@@ -216,6 +230,7 @@ exports[`Badge has info style when intent is primary 1`] = `
|
|
|
216
230
|
}
|
|
217
231
|
themeFontWeight="regular"
|
|
218
232
|
themeIntent="body"
|
|
233
|
+
themeSize="medium"
|
|
219
234
|
>
|
|
220
235
|
PRIMARY
|
|
221
236
|
</Text>
|
|
@@ -243,6 +258,92 @@ exports[`Badge has info style when intent is primary 1`] = `
|
|
|
243
258
|
</View>
|
|
244
259
|
`;
|
|
245
260
|
|
|
261
|
+
exports[`Badge has small style when size is small 1`] = `
|
|
262
|
+
<View
|
|
263
|
+
style={
|
|
264
|
+
{
|
|
265
|
+
"flex": 1,
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
>
|
|
269
|
+
<View
|
|
270
|
+
collapsable={false}
|
|
271
|
+
style={
|
|
272
|
+
{
|
|
273
|
+
"alignItems": "center",
|
|
274
|
+
"backgroundColor": "#cb300a",
|
|
275
|
+
"borderRadius": 999,
|
|
276
|
+
"height": 16,
|
|
277
|
+
"justifyContent": "center",
|
|
278
|
+
"minWidth": 16,
|
|
279
|
+
"opacity": 1,
|
|
280
|
+
"paddingHorizontal": 4,
|
|
281
|
+
"transform": [
|
|
282
|
+
{
|
|
283
|
+
"scale": 1,
|
|
284
|
+
},
|
|
285
|
+
],
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
themeIntent="danger"
|
|
289
|
+
themePadding="wideContent"
|
|
290
|
+
themeSize="small"
|
|
291
|
+
>
|
|
292
|
+
<Text
|
|
293
|
+
allowFontScaling={false}
|
|
294
|
+
style={
|
|
295
|
+
[
|
|
296
|
+
{
|
|
297
|
+
"color": "#001f23",
|
|
298
|
+
"fontFamily": "BeVietnamPro-Regular",
|
|
299
|
+
"fontSize": 12,
|
|
300
|
+
"letterSpacing": 0.36,
|
|
301
|
+
"lineHeight": 16,
|
|
302
|
+
},
|
|
303
|
+
[
|
|
304
|
+
{
|
|
305
|
+
"color": "#ffffff",
|
|
306
|
+
"fontFamily": "BeVietnamPro-SemiBold",
|
|
307
|
+
"fontSize": 8,
|
|
308
|
+
"includeFontPadding": false,
|
|
309
|
+
"lineHeight": 10,
|
|
310
|
+
"textAlign": "center",
|
|
311
|
+
"textAlignVertical": "center",
|
|
312
|
+
},
|
|
313
|
+
undefined,
|
|
314
|
+
],
|
|
315
|
+
]
|
|
316
|
+
}
|
|
317
|
+
themeFontWeight="regular"
|
|
318
|
+
themeIntent="body"
|
|
319
|
+
themeSize="small"
|
|
320
|
+
>
|
|
321
|
+
SMALL
|
|
322
|
+
</Text>
|
|
323
|
+
</View>
|
|
324
|
+
<View
|
|
325
|
+
pointerEvents="box-none"
|
|
326
|
+
position="bottom"
|
|
327
|
+
style={
|
|
328
|
+
[
|
|
329
|
+
{
|
|
330
|
+
"bottom": 0,
|
|
331
|
+
"elevation": 9999,
|
|
332
|
+
"flexDirection": "column-reverse",
|
|
333
|
+
"left": 0,
|
|
334
|
+
"paddingHorizontal": 24,
|
|
335
|
+
"paddingVertical": 16,
|
|
336
|
+
"position": "absolute",
|
|
337
|
+
"right": 0,
|
|
338
|
+
"top": 0,
|
|
339
|
+
},
|
|
340
|
+
undefined,
|
|
341
|
+
]
|
|
342
|
+
}
|
|
343
|
+
/>
|
|
344
|
+
</View>
|
|
345
|
+
`;
|
|
346
|
+
|
|
246
347
|
exports[`Badge has success style when intent is success 1`] = `
|
|
247
348
|
<View
|
|
248
349
|
style={
|
|
@@ -258,9 +359,9 @@ exports[`Badge has success style when intent is success 1`] = `
|
|
|
258
359
|
"alignItems": "center",
|
|
259
360
|
"backgroundColor": "#017d6d",
|
|
260
361
|
"borderRadius": 999,
|
|
261
|
-
"height":
|
|
362
|
+
"height": 24,
|
|
262
363
|
"justifyContent": "center",
|
|
263
|
-
"minWidth":
|
|
364
|
+
"minWidth": 24,
|
|
264
365
|
"opacity": 1,
|
|
265
366
|
"paddingHorizontal": 8,
|
|
266
367
|
"transform": [
|
|
@@ -272,6 +373,7 @@ exports[`Badge has success style when intent is success 1`] = `
|
|
|
272
373
|
}
|
|
273
374
|
themeIntent="success"
|
|
274
375
|
themePadding="wideContent"
|
|
376
|
+
themeSize="medium"
|
|
275
377
|
>
|
|
276
378
|
<Text
|
|
277
379
|
allowFontScaling={false}
|
|
@@ -287,7 +389,10 @@ exports[`Badge has success style when intent is success 1`] = `
|
|
|
287
389
|
[
|
|
288
390
|
{
|
|
289
391
|
"color": "#ffffff",
|
|
392
|
+
"fontFamily": "BeVietnamPro-Regular",
|
|
393
|
+
"fontSize": 12,
|
|
290
394
|
"includeFontPadding": false,
|
|
395
|
+
"lineHeight": 16,
|
|
291
396
|
"textAlign": "center",
|
|
292
397
|
"textAlignVertical": "center",
|
|
293
398
|
},
|
|
@@ -297,6 +402,7 @@ exports[`Badge has success style when intent is success 1`] = `
|
|
|
297
402
|
}
|
|
298
403
|
themeFontWeight="regular"
|
|
299
404
|
themeIntent="body"
|
|
405
|
+
themeSize="medium"
|
|
300
406
|
>
|
|
301
407
|
APPROVED
|
|
302
408
|
</Text>
|
|
@@ -339,9 +445,9 @@ exports[`Badge has warning style when intent is warning 1`] = `
|
|
|
339
445
|
"alignItems": "center",
|
|
340
446
|
"backgroundColor": "#ac5d00",
|
|
341
447
|
"borderRadius": 999,
|
|
342
|
-
"height":
|
|
448
|
+
"height": 24,
|
|
343
449
|
"justifyContent": "center",
|
|
344
|
-
"minWidth":
|
|
450
|
+
"minWidth": 24,
|
|
345
451
|
"opacity": 1,
|
|
346
452
|
"paddingHorizontal": 8,
|
|
347
453
|
"transform": [
|
|
@@ -353,6 +459,7 @@ exports[`Badge has warning style when intent is warning 1`] = `
|
|
|
353
459
|
}
|
|
354
460
|
themeIntent="warning"
|
|
355
461
|
themePadding="wideContent"
|
|
462
|
+
themeSize="medium"
|
|
356
463
|
>
|
|
357
464
|
<Text
|
|
358
465
|
allowFontScaling={false}
|
|
@@ -368,7 +475,10 @@ exports[`Badge has warning style when intent is warning 1`] = `
|
|
|
368
475
|
[
|
|
369
476
|
{
|
|
370
477
|
"color": "#ffffff",
|
|
478
|
+
"fontFamily": "BeVietnamPro-Regular",
|
|
479
|
+
"fontSize": 12,
|
|
371
480
|
"includeFontPadding": false,
|
|
481
|
+
"lineHeight": 16,
|
|
372
482
|
"textAlign": "center",
|
|
373
483
|
"textAlignVertical": "center",
|
|
374
484
|
},
|
|
@@ -378,6 +488,7 @@ exports[`Badge has warning style when intent is warning 1`] = `
|
|
|
378
488
|
}
|
|
379
489
|
themeFontWeight="regular"
|
|
380
490
|
themeIntent="body"
|
|
491
|
+
themeSize="medium"
|
|
381
492
|
>
|
|
382
493
|
PENDING
|
|
383
494
|
</Text>
|
|
@@ -420,9 +531,9 @@ exports[`Badge renders correctly with custom props 1`] = `
|
|
|
420
531
|
"alignItems": "center",
|
|
421
532
|
"backgroundColor": "#017d6d",
|
|
422
533
|
"borderRadius": 999,
|
|
423
|
-
"height":
|
|
534
|
+
"height": 24,
|
|
424
535
|
"justifyContent": "center",
|
|
425
|
-
"minWidth":
|
|
536
|
+
"minWidth": 24,
|
|
426
537
|
"opacity": 1,
|
|
427
538
|
"paddingHorizontal": 8,
|
|
428
539
|
"transform": [
|
|
@@ -435,6 +546,7 @@ exports[`Badge renders correctly with custom props 1`] = `
|
|
|
435
546
|
testID="number-badge"
|
|
436
547
|
themeIntent="success"
|
|
437
548
|
themePadding="wideContent"
|
|
549
|
+
themeSize="medium"
|
|
438
550
|
>
|
|
439
551
|
<Text
|
|
440
552
|
allowFontScaling={false}
|
|
@@ -450,7 +562,10 @@ exports[`Badge renders correctly with custom props 1`] = `
|
|
|
450
562
|
[
|
|
451
563
|
{
|
|
452
564
|
"color": "#ffffff",
|
|
565
|
+
"fontFamily": "BeVietnamPro-Regular",
|
|
566
|
+
"fontSize": 12,
|
|
453
567
|
"includeFontPadding": false,
|
|
568
|
+
"lineHeight": 16,
|
|
454
569
|
"textAlign": "center",
|
|
455
570
|
"textAlignVertical": "center",
|
|
456
571
|
},
|
|
@@ -460,6 +575,7 @@ exports[`Badge renders correctly with custom props 1`] = `
|
|
|
460
575
|
}
|
|
461
576
|
themeFontWeight="regular"
|
|
462
577
|
themeIntent="body"
|
|
578
|
+
themeSize="medium"
|
|
463
579
|
>
|
|
464
580
|
50+
|
|
465
581
|
</Text>
|
|
@@ -4,7 +4,7 @@ import type { StyleProp, ViewStyle } from 'react-native';
|
|
|
4
4
|
import { StyledView, StyledText } from './StyledBadge';
|
|
5
5
|
import BadgeStatus from './Status';
|
|
6
6
|
|
|
7
|
-
interface BadgeProps extends React.ComponentProps<typeof Animated.View> {
|
|
7
|
+
export interface BadgeProps extends React.ComponentProps<typeof Animated.View> {
|
|
8
8
|
/**
|
|
9
9
|
* Content of the Badge.
|
|
10
10
|
*/
|
|
@@ -29,6 +29,10 @@ interface BadgeProps extends React.ComponentProps<typeof Animated.View> {
|
|
|
29
29
|
* Testing id of the component.
|
|
30
30
|
*/
|
|
31
31
|
testID?: string;
|
|
32
|
+
/**
|
|
33
|
+
* Size of the badge
|
|
34
|
+
*/
|
|
35
|
+
size?: 'medium' | 'small';
|
|
32
36
|
}
|
|
33
37
|
|
|
34
38
|
const DEFAULT_MAX_NUMBER = 99;
|
|
@@ -43,6 +47,7 @@ const Badge = ({
|
|
|
43
47
|
intent = 'danger',
|
|
44
48
|
style,
|
|
45
49
|
testID,
|
|
50
|
+
size = 'medium',
|
|
46
51
|
...nativeProps
|
|
47
52
|
}: BadgeProps): JSX.Element => {
|
|
48
53
|
const { current: opacity } = React.useRef<Animated.Value>(
|
|
@@ -74,6 +79,7 @@ const Badge = ({
|
|
|
74
79
|
{...nativeProps}
|
|
75
80
|
themeIntent={intent}
|
|
76
81
|
themePadding={getPaddingState(content)}
|
|
82
|
+
themeSize={size}
|
|
77
83
|
style={[
|
|
78
84
|
{
|
|
79
85
|
opacity,
|
|
@@ -90,7 +96,7 @@ const Badge = ({
|
|
|
90
96
|
]}
|
|
91
97
|
testID={testID}
|
|
92
98
|
>
|
|
93
|
-
<StyledText>{content}</StyledText>
|
|
99
|
+
<StyledText themeSize={size}>{content}</StyledText>
|
|
94
100
|
</StyledView>
|
|
95
101
|
);
|
|
96
102
|
};
|
|
@@ -72,7 +72,7 @@ exports[`BottomNavigation renders correctly 1`] = `
|
|
|
72
72
|
"paddingBottom": 0,
|
|
73
73
|
"paddingLeft": 0,
|
|
74
74
|
"paddingRight": 0,
|
|
75
|
-
"shadowColor": "#
|
|
75
|
+
"shadowColor": "#401960",
|
|
76
76
|
"shadowOffset": {
|
|
77
77
|
"height": 3,
|
|
78
78
|
"width": 0,
|
|
@@ -139,7 +139,7 @@ exports[`BottomNavigation renders correctly 1`] = `
|
|
|
139
139
|
style={
|
|
140
140
|
[
|
|
141
141
|
{
|
|
142
|
-
"color": "#
|
|
142
|
+
"color": "#401960",
|
|
143
143
|
"fontSize": 24,
|
|
144
144
|
},
|
|
145
145
|
undefined,
|
|
@@ -155,7 +155,7 @@ exports[`BottomNavigation renders correctly 1`] = `
|
|
|
155
155
|
style={
|
|
156
156
|
[
|
|
157
157
|
{
|
|
158
|
-
"color": "#
|
|
158
|
+
"color": "#401960",
|
|
159
159
|
"fontFamily": "BeVietnamPro-SemiBold",
|
|
160
160
|
"fontSize": 12,
|
|
161
161
|
"letterSpacing": 0.24,
|