@hero-design/rn 8.68.0-alpha.1 → 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 +514 -155
- package/lib/index.js +514 -154
- 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/src/theme/global/colors/swagLight.ts +1 -1
- 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
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { StyleProp, ViewStyle } from 'react-native';
|
|
3
|
+
import { IconName } from '../Icon';
|
|
4
|
+
import { renderPrefix, renderSuffix } from './utils';
|
|
5
|
+
import {
|
|
6
|
+
StyledContainer,
|
|
7
|
+
StyledHandlerContainer,
|
|
8
|
+
StyledInputContainer,
|
|
9
|
+
} from './StyledSearch';
|
|
10
|
+
import Typography from '../Typography';
|
|
11
|
+
|
|
12
|
+
interface SearchTwoLineProps {
|
|
13
|
+
/**
|
|
14
|
+
* Name of Icon or ReactElement to render on the left side of the input, before the user's cursor.
|
|
15
|
+
*/
|
|
16
|
+
prefix?: IconName | React.ReactElement;
|
|
17
|
+
/**
|
|
18
|
+
* Name of Icon or ReactElement to render on the right side of the input.
|
|
19
|
+
*/
|
|
20
|
+
suffix?: IconName | React.ReactElement;
|
|
21
|
+
/**
|
|
22
|
+
* Additional wrapper style.
|
|
23
|
+
*/
|
|
24
|
+
style?: StyleProp<ViewStyle>;
|
|
25
|
+
/**
|
|
26
|
+
* Label of the Input handler.
|
|
27
|
+
*/
|
|
28
|
+
label: React.ReactNode;
|
|
29
|
+
/**
|
|
30
|
+
* Content of the Input handler.
|
|
31
|
+
*/
|
|
32
|
+
content: React.ReactNode;
|
|
33
|
+
/**
|
|
34
|
+
* Testing id of the component.
|
|
35
|
+
*/
|
|
36
|
+
testID?: string;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
const SearchTwoLine = (props: SearchTwoLineProps) => {
|
|
40
|
+
const {
|
|
41
|
+
prefix = 'search-outlined',
|
|
42
|
+
suffix,
|
|
43
|
+
style,
|
|
44
|
+
label,
|
|
45
|
+
content,
|
|
46
|
+
testID,
|
|
47
|
+
} = props;
|
|
48
|
+
return (
|
|
49
|
+
<StyledContainer style={style} testID={testID}>
|
|
50
|
+
<StyledInputContainer themeFocused={false}>
|
|
51
|
+
{renderPrefix({ prefix })}
|
|
52
|
+
<StyledHandlerContainer>
|
|
53
|
+
<Typography.Caption fontWeight="semi-bold">
|
|
54
|
+
{label}
|
|
55
|
+
</Typography.Caption>
|
|
56
|
+
{content}
|
|
57
|
+
</StyledHandlerContainer>
|
|
58
|
+
{!!suffix && renderSuffix({ suffix })}
|
|
59
|
+
</StyledInputContainer>
|
|
60
|
+
</StyledContainer>
|
|
61
|
+
);
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
export default SearchTwoLine;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import styled from '@emotion/native';
|
|
2
|
+
import { TextInput, View } from 'react-native';
|
|
3
|
+
import Badge from '../Badge';
|
|
4
|
+
|
|
5
|
+
export type State = 'default' | 'filled' | 'disabled' | 'readonly';
|
|
6
|
+
|
|
7
|
+
export const StyledContainer = styled(View)(() => ({
|
|
8
|
+
width: '100%',
|
|
9
|
+
}));
|
|
10
|
+
|
|
11
|
+
export const StyledInputContainer = styled(View)<{
|
|
12
|
+
themeFocused: boolean;
|
|
13
|
+
}>(({ theme, themeFocused }) => ({
|
|
14
|
+
flexDirection: 'row',
|
|
15
|
+
alignItems: 'center',
|
|
16
|
+
paddingHorizontal: theme.__hd__.search.space.containerHorizontalPadding,
|
|
17
|
+
paddingVertical: theme.__hd__.search.space.containerVerticalPadding,
|
|
18
|
+
backgroundColor: theme.__hd__.search.colors.containerBackground,
|
|
19
|
+
height: 56,
|
|
20
|
+
borderRadius: theme.__hd__.search.radii.container,
|
|
21
|
+
borderWidth: theme.__hd__.search.borderWidths.container.focused,
|
|
22
|
+
borderColor: themeFocused
|
|
23
|
+
? theme.__hd__.search.colors.borders
|
|
24
|
+
: theme.__hd__.search.colors.containerBackground,
|
|
25
|
+
}));
|
|
26
|
+
|
|
27
|
+
export const StyledAffixContainer = styled(View)(({ theme }) => ({
|
|
28
|
+
paddingHorizontal: theme.__hd__.search.space.prefixHorizontalPadding,
|
|
29
|
+
}));
|
|
30
|
+
|
|
31
|
+
export const StyledSuffixContainer = styled(View)(({ theme }) => ({
|
|
32
|
+
display: 'flex',
|
|
33
|
+
justifyContent: 'center',
|
|
34
|
+
alignItems: 'center',
|
|
35
|
+
width: theme.__hd__.search.sizes.surfixSize,
|
|
36
|
+
height: theme.__hd__.search.sizes.surfixSize,
|
|
37
|
+
backgroundColor: theme.__hd__.search.colors.surfixBackground,
|
|
38
|
+
borderRadius: theme.__hd__.search.radii.surfix,
|
|
39
|
+
}));
|
|
40
|
+
|
|
41
|
+
export const StyledInput = styled(TextInput)(({ theme }) => ({
|
|
42
|
+
textAlignVertical: 'center',
|
|
43
|
+
fontSize: theme.__hd__.search.fontSizes.text,
|
|
44
|
+
alignSelf: 'stretch',
|
|
45
|
+
flexGrow: 1,
|
|
46
|
+
flexShrink: 1,
|
|
47
|
+
marginHorizontal: theme.__hd__.search.space.inputHorizontalMargin,
|
|
48
|
+
paddingVertical: 0,
|
|
49
|
+
fontFamily: theme.__hd__.search.fonts.text,
|
|
50
|
+
}));
|
|
51
|
+
|
|
52
|
+
export const StyledHandlerContainer = styled(View)(({ theme }) => ({
|
|
53
|
+
display: 'flex',
|
|
54
|
+
flexDirection: 'column',
|
|
55
|
+
justifyContent: 'space-between',
|
|
56
|
+
alignItems: 'flex-start',
|
|
57
|
+
flexGrow: 1,
|
|
58
|
+
height: '100%',
|
|
59
|
+
marginHorizontal: theme.__hd__.search.space.inputHorizontalMargin,
|
|
60
|
+
}));
|
|
61
|
+
|
|
62
|
+
export const StyledBadge = styled(Badge)(({ theme }) => ({
|
|
63
|
+
position: 'absolute',
|
|
64
|
+
top: theme.__hd__.search.space.badgeTop,
|
|
65
|
+
right: theme.__hd__.search.space.badgeRight,
|
|
66
|
+
zIndex: 2,
|
|
67
|
+
}));
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { fireEvent, within } from '@testing-library/react-native';
|
|
3
|
+
import renderWithTheme from '../../../testHelpers/renderWithTheme';
|
|
4
|
+
import SearchOneLine, { getState } from '../SearchOneLine';
|
|
5
|
+
import Typography from '../../Typography';
|
|
6
|
+
|
|
7
|
+
describe('getState', () => {
|
|
8
|
+
it.each`
|
|
9
|
+
disabled | editable | isEmptyValue | expected
|
|
10
|
+
${false} | ${true} | ${true} | ${'default'}
|
|
11
|
+
${false} | ${true} | ${false} | ${'filled'}
|
|
12
|
+
${false} | ${false} | ${true} | ${'readonly'}
|
|
13
|
+
${true} | ${false} | ${true} | ${'disabled'}
|
|
14
|
+
`(
|
|
15
|
+
'should return the correct state when disabled $disabled, editable $editable, isEmptyValue $isEmptyValue',
|
|
16
|
+
({ disabled, editable, isEmptyValue, expected }) => {
|
|
17
|
+
expect(
|
|
18
|
+
getState({
|
|
19
|
+
disabled,
|
|
20
|
+
editable,
|
|
21
|
+
isEmptyValue,
|
|
22
|
+
})
|
|
23
|
+
).toBe(expected);
|
|
24
|
+
}
|
|
25
|
+
);
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
describe('SearchOneLine', () => {
|
|
29
|
+
describe('idle', () => {
|
|
30
|
+
it('renders correctly', () => {
|
|
31
|
+
const { getByTestId, toJSON } = renderWithTheme(
|
|
32
|
+
<SearchOneLine
|
|
33
|
+
prefix="search-outlined"
|
|
34
|
+
suffix="adjustment"
|
|
35
|
+
testID="idle-search-text-input"
|
|
36
|
+
placeholder="Search"
|
|
37
|
+
/>
|
|
38
|
+
);
|
|
39
|
+
|
|
40
|
+
expect(toJSON()).toMatchSnapshot();
|
|
41
|
+
expect(getByTestId('idle-search-text-input')).toBeTruthy();
|
|
42
|
+
expect(
|
|
43
|
+
within(getByTestId('idle-search-text-input')).queryAllByTestId(
|
|
44
|
+
'text-input'
|
|
45
|
+
)
|
|
46
|
+
).toHaveLength(1);
|
|
47
|
+
expect(
|
|
48
|
+
within(getByTestId('idle-search-text-input')).queryAllByTestId(
|
|
49
|
+
'input-prefix'
|
|
50
|
+
)
|
|
51
|
+
).toHaveLength(1);
|
|
52
|
+
expect(
|
|
53
|
+
within(getByTestId('idle-search-text-input')).queryAllByTestId(
|
|
54
|
+
'input-suffix'
|
|
55
|
+
)
|
|
56
|
+
).toHaveLength(1);
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
it('renders custom affix correctly', () => {
|
|
60
|
+
const { getByTestId, toJSON } = renderWithTheme(
|
|
61
|
+
<SearchOneLine
|
|
62
|
+
prefix={<Typography.Caption>Prefix</Typography.Caption>}
|
|
63
|
+
suffix={<Typography.Caption>Suffix</Typography.Caption>}
|
|
64
|
+
testID="idle-search-input"
|
|
65
|
+
placeholder="Search"
|
|
66
|
+
/>
|
|
67
|
+
);
|
|
68
|
+
|
|
69
|
+
expect(toJSON()).toMatchSnapshot();
|
|
70
|
+
expect(
|
|
71
|
+
within(getByTestId('idle-search-input')).getByText('Prefix')
|
|
72
|
+
).toBeTruthy();
|
|
73
|
+
expect(
|
|
74
|
+
within(getByTestId('idle-search-input')).getByText('Suffix')
|
|
75
|
+
).toBeTruthy();
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
describe('handler', () => {
|
|
79
|
+
it('onChangeText work correctly', () => {
|
|
80
|
+
const onChangeText = jest.fn();
|
|
81
|
+
const { getByTestId } = renderWithTheme(
|
|
82
|
+
<SearchOneLine
|
|
83
|
+
prefix="search-outlined"
|
|
84
|
+
testID="idle-search-input"
|
|
85
|
+
onChangeText={onChangeText}
|
|
86
|
+
/>
|
|
87
|
+
);
|
|
88
|
+
const input = within(getByTestId('idle-search-input')).getByTestId(
|
|
89
|
+
'text-input'
|
|
90
|
+
);
|
|
91
|
+
fireEvent.changeText(input, 'Park Chae Young');
|
|
92
|
+
expect(onChangeText).toHaveBeenCalledWith('Park Chae Young');
|
|
93
|
+
});
|
|
94
|
+
|
|
95
|
+
it('onFocus work correctly', () => {
|
|
96
|
+
const onFocus = jest.fn();
|
|
97
|
+
const { getByTestId } = renderWithTheme(
|
|
98
|
+
<SearchOneLine
|
|
99
|
+
prefix="search-outlined"
|
|
100
|
+
testID="idle-search-input"
|
|
101
|
+
onFocus={onFocus}
|
|
102
|
+
/>
|
|
103
|
+
);
|
|
104
|
+
const input = within(getByTestId('idle-search-input')).getByTestId(
|
|
105
|
+
'text-input'
|
|
106
|
+
);
|
|
107
|
+
fireEvent(input, 'focus');
|
|
108
|
+
expect(onFocus).toHaveBeenCalled();
|
|
109
|
+
});
|
|
110
|
+
|
|
111
|
+
it('onBlur work correctly', () => {
|
|
112
|
+
const onBlur = jest.fn();
|
|
113
|
+
const { getByTestId } = renderWithTheme(
|
|
114
|
+
<SearchOneLine
|
|
115
|
+
prefix="search-outlined"
|
|
116
|
+
testID="idle-search-input"
|
|
117
|
+
onBlur={onBlur}
|
|
118
|
+
/>
|
|
119
|
+
);
|
|
120
|
+
const input = within(getByTestId('idle-search-input')).getByTestId(
|
|
121
|
+
'text-input'
|
|
122
|
+
);
|
|
123
|
+
fireEvent(input, 'blur');
|
|
124
|
+
expect(onBlur).toHaveBeenCalled();
|
|
125
|
+
});
|
|
126
|
+
});
|
|
127
|
+
});
|
|
128
|
+
|
|
129
|
+
describe('filled', () => {
|
|
130
|
+
it('renders correctly', () => {
|
|
131
|
+
const { toJSON, queryAllByTestId, queryAllByDisplayValue } =
|
|
132
|
+
renderWithTheme(
|
|
133
|
+
<SearchOneLine
|
|
134
|
+
prefix="search-outlined"
|
|
135
|
+
suffix="adjustment"
|
|
136
|
+
testID="idle-search-text-input"
|
|
137
|
+
placeholder="Search"
|
|
138
|
+
value="Jennie Kim"
|
|
139
|
+
/>
|
|
140
|
+
);
|
|
141
|
+
|
|
142
|
+
expect(toJSON()).toMatchSnapshot();
|
|
143
|
+
expect(queryAllByDisplayValue('Jennie Kim')).toHaveLength(1);
|
|
144
|
+
expect(queryAllByTestId('input-prefix')).toHaveLength(1);
|
|
145
|
+
expect(queryAllByTestId('input-suffix')).toHaveLength(1);
|
|
146
|
+
expect(queryAllByTestId('text-input')).toHaveLength(1);
|
|
147
|
+
});
|
|
148
|
+
});
|
|
149
|
+
|
|
150
|
+
describe('readonly', () => {
|
|
151
|
+
it('renders correctly', () => {
|
|
152
|
+
const onChangeText = jest.fn();
|
|
153
|
+
const { toJSON, queryAllByTestId, queryAllByDisplayValue, getByTestId } =
|
|
154
|
+
renderWithTheme(
|
|
155
|
+
<SearchOneLine
|
|
156
|
+
prefix="search-outlined"
|
|
157
|
+
suffix="adjustment"
|
|
158
|
+
testID="idle-search-text-input"
|
|
159
|
+
placeholder="Search"
|
|
160
|
+
value="Lalisa"
|
|
161
|
+
onChangeText={onChangeText}
|
|
162
|
+
/>
|
|
163
|
+
);
|
|
164
|
+
|
|
165
|
+
expect(toJSON()).toMatchSnapshot();
|
|
166
|
+
expect(queryAllByDisplayValue('Lalisa')).toHaveLength(1);
|
|
167
|
+
expect(queryAllByTestId('input-prefix')).toHaveLength(1);
|
|
168
|
+
expect(queryAllByTestId('input-suffix')).toHaveLength(1);
|
|
169
|
+
expect(queryAllByTestId('text-input')).toHaveLength(1);
|
|
170
|
+
expect(getByTestId('text-input')).not.toHaveProp('editable', 'false');
|
|
171
|
+
});
|
|
172
|
+
});
|
|
173
|
+
|
|
174
|
+
describe('disabled', () => {
|
|
175
|
+
it('renders correctly', () => {
|
|
176
|
+
const onChangeText = jest.fn();
|
|
177
|
+
const { toJSON, queryAllByTestId, getByTestId } = renderWithTheme(
|
|
178
|
+
<SearchOneLine
|
|
179
|
+
prefix="search-outlined"
|
|
180
|
+
suffix="adjustment"
|
|
181
|
+
testID="disabled-text-input"
|
|
182
|
+
placeholder="Search"
|
|
183
|
+
value="Jisoo"
|
|
184
|
+
disabled
|
|
185
|
+
onChangeText={onChangeText}
|
|
186
|
+
/>
|
|
187
|
+
);
|
|
188
|
+
|
|
189
|
+
expect(toJSON()).toMatchSnapshot();
|
|
190
|
+
expect(queryAllByTestId('text-input')).toHaveLength(1);
|
|
191
|
+
expect(getByTestId('disabled-text-input')).toHaveProp(
|
|
192
|
+
'pointerEvents',
|
|
193
|
+
'none'
|
|
194
|
+
);
|
|
195
|
+
});
|
|
196
|
+
});
|
|
197
|
+
});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import renderWithTheme from '../../../testHelpers/renderWithTheme';
|
|
3
|
+
import SearchSuffixIcon from '../SearchSuffixIcon';
|
|
4
|
+
|
|
5
|
+
describe('SearchSuffixIcon', () => {
|
|
6
|
+
it('renders correctly', () => {
|
|
7
|
+
const wrapper = renderWithTheme(
|
|
8
|
+
<SearchSuffixIcon suffix="adjustment" badge={{ content: 7 }} />
|
|
9
|
+
);
|
|
10
|
+
expect(wrapper.toJSON()).toMatchSnapshot();
|
|
11
|
+
});
|
|
12
|
+
});
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import renderWithTheme from '../../../testHelpers/renderWithTheme';
|
|
3
|
+
import SearchTwoLine from '../SearchTwoLine';
|
|
4
|
+
import Typography from '../../Typography';
|
|
5
|
+
|
|
6
|
+
describe('SearchTwoLine', () => {
|
|
7
|
+
it('renders correctly', () => {
|
|
8
|
+
const wrapper = renderWithTheme(
|
|
9
|
+
<SearchTwoLine
|
|
10
|
+
label="Find Work"
|
|
11
|
+
content={<Typography.Caption>Anywhere</Typography.Caption>}
|
|
12
|
+
prefix="search-outlined"
|
|
13
|
+
suffix="adjustment"
|
|
14
|
+
/>
|
|
15
|
+
);
|
|
16
|
+
expect(wrapper.getByText('Find Work')).toBeDefined();
|
|
17
|
+
expect(wrapper.getByText('Anywhere')).toBeDefined();
|
|
18
|
+
expect(wrapper.toJSON()).toMatchSnapshot();
|
|
19
|
+
});
|
|
20
|
+
});
|