@hero-design/rn 8.65.1 → 8.67.0-alpha.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/CHANGELOG.md +6 -0
- package/es/index.js +225 -170
- package/lib/index.js +226 -170
- 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 +84 -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/__tests__/__snapshots__/Badge.spec.tsx.snap +1 -1
- 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/StyledCard.tsx +7 -1
- package/src/components/Card/__tests__/__snapshots__/index.spec.tsx.snap +65 -1
- package/src/components/Card/__tests__/index.spec.tsx +1 -0
- package/src/components/Card/index.tsx +7 -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/ActionItem.tsx +1 -3
- package/src/components/FAB/ActionGroup/StyledActionItem.tsx +2 -2
- package/src/components/FAB/ActionGroup/__tests__/__snapshots__/index.spec.tsx.snap +160 -87
- package/src/components/FAB/FAB.tsx +1 -1
- package/src/components/FAB/StyledFAB.tsx +2 -3
- package/src/components/FAB/__tests__/__snapshots__/AnimatedFABIcon.spec.tsx.snap +2 -2
- package/src/components/FAB/__tests__/__snapshots__/StyledFAB.spec.tsx.snap +25 -3
- package/src/components/FAB/__tests__/__snapshots__/index.spec.tsx.snap +37 -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/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 +3 -3
- package/src/components/Tabs/__tests__/__snapshots__/ScrollableTabsHeader.spec.tsx.snap +5 -5
- package/src/components/Tabs/__tests__/__snapshots__/index.spec.tsx.snap +3 -3
- 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 +12 -2
- package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +81 -71
- package/src/theme/components/alert.ts +14 -5
- package/src/theme/components/card.ts +1 -0
- package/src/theme/components/fab.ts +5 -5
- package/src/theme/getTheme.ts +2 -2
- package/src/theme/global/colors/__tests__/__snapshots__/swagLight.spec.ts.snap +48 -0
- package/src/theme/global/colors/__tests__/swagLight.spec.ts +7 -0
- package/src/theme/global/colors/swagLight.ts +25 -0
- package/src/theme/global/index.ts +2 -0
- package/src/theme/index.ts +2 -0
- package/stats/8.66.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 +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 +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 +1 -1
- package/types/components/Card/index.d.ts +1 -1
- 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 +3 -3
- 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 +2 -3
- 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/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/ScrollableTabsHeader.d.ts +35 -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 -2
- 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 +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 +1 -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 +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 +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/swagLight.d.ts +3 -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 +2 -1
- 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 +2 -2
- 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/.turbo/turbo-build.log +0 -8
package/package.json
CHANGED
|
@@ -82,7 +82,7 @@ exports[`AccordionItem renders correctly when header is an element 1`] = `
|
|
|
82
82
|
style={
|
|
83
83
|
[
|
|
84
84
|
{
|
|
85
|
-
"color": "#
|
|
85
|
+
"color": "#B382FD",
|
|
86
86
|
"fontSize": 20,
|
|
87
87
|
},
|
|
88
88
|
undefined,
|
|
@@ -260,7 +260,7 @@ exports[`AccordionItem renders correctly when header is string 1`] = `
|
|
|
260
260
|
style={
|
|
261
261
|
[
|
|
262
262
|
{
|
|
263
|
-
"color": "#
|
|
263
|
+
"color": "#B382FD",
|
|
264
264
|
"fontSize": 20,
|
|
265
265
|
},
|
|
266
266
|
undefined,
|
|
@@ -438,7 +438,7 @@ exports[`AccordionItem renders correctly when open 1`] = `
|
|
|
438
438
|
style={
|
|
439
439
|
[
|
|
440
440
|
{
|
|
441
|
-
"color": "#
|
|
441
|
+
"color": "#B382FD",
|
|
442
442
|
"fontSize": 20,
|
|
443
443
|
},
|
|
444
444
|
undefined,
|
|
@@ -616,7 +616,7 @@ exports[`AccordionItem renders correctly when variant is card 1`] = `
|
|
|
616
616
|
style={
|
|
617
617
|
[
|
|
618
618
|
{
|
|
619
|
-
"color": "#
|
|
619
|
+
"color": "#B382FD",
|
|
620
620
|
"fontSize": 20,
|
|
621
621
|
},
|
|
622
622
|
undefined,
|
|
@@ -90,7 +90,7 @@ exports[`Accordion allows fully controlled 1`] = `
|
|
|
90
90
|
style={
|
|
91
91
|
[
|
|
92
92
|
{
|
|
93
|
-
"color": "#
|
|
93
|
+
"color": "#B382FD",
|
|
94
94
|
"fontSize": 20,
|
|
95
95
|
},
|
|
96
96
|
undefined,
|
|
@@ -237,7 +237,7 @@ exports[`Accordion allows fully controlled 1`] = `
|
|
|
237
237
|
style={
|
|
238
238
|
[
|
|
239
239
|
{
|
|
240
|
-
"color": "#
|
|
240
|
+
"color": "#B382FD",
|
|
241
241
|
"fontSize": 20,
|
|
242
242
|
},
|
|
243
243
|
undefined,
|
|
@@ -424,7 +424,7 @@ exports[`Accordion renders correctly 1`] = `
|
|
|
424
424
|
style={
|
|
425
425
|
[
|
|
426
426
|
{
|
|
427
|
-
"color": "#
|
|
427
|
+
"color": "#B382FD",
|
|
428
428
|
"fontSize": 20,
|
|
429
429
|
},
|
|
430
430
|
undefined,
|
|
@@ -571,7 +571,7 @@ exports[`Accordion renders correctly 1`] = `
|
|
|
571
571
|
style={
|
|
572
572
|
[
|
|
573
573
|
{
|
|
574
|
-
"color": "#
|
|
574
|
+
"color": "#B382FD",
|
|
575
575
|
"fontSize": 20,
|
|
576
576
|
},
|
|
577
577
|
undefined,
|
|
@@ -758,7 +758,7 @@ exports[`Accordion renders correctly when variant is card 1`] = `
|
|
|
758
758
|
style={
|
|
759
759
|
[
|
|
760
760
|
{
|
|
761
|
-
"color": "#
|
|
761
|
+
"color": "#B382FD",
|
|
762
762
|
"fontSize": 20,
|
|
763
763
|
},
|
|
764
764
|
undefined,
|
|
@@ -916,7 +916,7 @@ exports[`Accordion renders correctly when variant is card 1`] = `
|
|
|
916
916
|
style={
|
|
917
917
|
[
|
|
918
918
|
{
|
|
919
|
-
"color": "#
|
|
919
|
+
"color": "#B382FD",
|
|
920
920
|
"fontSize": 20,
|
|
921
921
|
},
|
|
922
922
|
undefined,
|
|
@@ -2,14 +2,18 @@ import styled from '@emotion/native';
|
|
|
2
2
|
import { TouchableOpacity, View } from 'react-native';
|
|
3
3
|
import type { ComponentProps } from 'react';
|
|
4
4
|
import type { ViewProps } from 'react-native';
|
|
5
|
+
import Typography from '../Typography';
|
|
6
|
+
import { TextProps } from '../Typography/Text';
|
|
7
|
+
import Icon, { IconProps } from '../Icon';
|
|
5
8
|
|
|
9
|
+
type ThemeIntent = 'success' | 'info' | 'warning' | 'error' | 'notification';
|
|
6
10
|
const Container = styled(View)<{
|
|
7
11
|
themeVariant: 'rounded' | 'unrounded';
|
|
8
|
-
themeIntent:
|
|
12
|
+
themeIntent: ThemeIntent;
|
|
9
13
|
}>(({ theme, themeVariant = 'rounded', themeIntent }) => ({
|
|
10
14
|
borderRadius:
|
|
11
15
|
themeVariant === 'rounded' ? theme.__hd__.alert.radii.default : 0,
|
|
12
|
-
backgroundColor: theme.__hd__.alert.colors[themeIntent],
|
|
16
|
+
backgroundColor: theme.__hd__.alert.colors.backgrounds[themeIntent],
|
|
13
17
|
minHeight: theme.__hd__.alert.sizes.height,
|
|
14
18
|
flexDirection: 'row',
|
|
15
19
|
}));
|
|
@@ -19,11 +23,27 @@ const IconContainer = styled(View)<ViewProps>(({ theme }) => ({
|
|
|
19
23
|
paddingLeft: theme.__hd__.alert.space.iconLeftPadding,
|
|
20
24
|
}));
|
|
21
25
|
|
|
26
|
+
const StyledIcon = styled(Icon)<
|
|
27
|
+
IconProps & {
|
|
28
|
+
themeIntent: ThemeIntent;
|
|
29
|
+
}
|
|
30
|
+
>(({ theme, themeIntent }) => ({
|
|
31
|
+
color: theme.__hd__.alert.colors.texts[themeIntent],
|
|
32
|
+
}));
|
|
33
|
+
|
|
22
34
|
const TextContainer = styled(View)<ViewProps>(({ theme }) => ({
|
|
23
35
|
paddingHorizontal: theme.__hd__.alert.space.textPaddingHorizontal,
|
|
24
36
|
flex: 1,
|
|
25
37
|
}));
|
|
26
38
|
|
|
39
|
+
const StyledBody = styled(Typography.Body)<
|
|
40
|
+
TextProps & {
|
|
41
|
+
themeIntent: ThemeIntent;
|
|
42
|
+
}
|
|
43
|
+
>(({ theme, themeIntent }) => ({
|
|
44
|
+
color: theme.__hd__.alert.colors.texts[themeIntent],
|
|
45
|
+
}));
|
|
46
|
+
|
|
27
47
|
const ContentContainer = styled(View)<{ showDivider: boolean }>(
|
|
28
48
|
({ theme, showDivider }) => ({
|
|
29
49
|
paddingVertical: theme.__hd__.alert.space.contentPaddingHorizontal,
|
|
@@ -47,4 +67,6 @@ export {
|
|
|
47
67
|
TextContainer,
|
|
48
68
|
IconContainer,
|
|
49
69
|
CTAWrapper,
|
|
70
|
+
StyledBody,
|
|
71
|
+
StyledIcon,
|
|
50
72
|
};
|
|
@@ -12,7 +12,7 @@ exports[`Alert Icon render custom icon correctly 1`] = `
|
|
|
12
12
|
style={
|
|
13
13
|
[
|
|
14
14
|
{
|
|
15
|
-
"backgroundColor": "#
|
|
15
|
+
"backgroundColor": "#ecf0ff",
|
|
16
16
|
"borderRadius": 16,
|
|
17
17
|
"flexDirection": "row",
|
|
18
18
|
"minHeight": 48,
|
|
@@ -58,7 +58,12 @@ exports[`Alert Icon render custom icon correctly 1`] = `
|
|
|
58
58
|
"color": "#001f23",
|
|
59
59
|
"fontSize": 20,
|
|
60
60
|
},
|
|
61
|
-
|
|
61
|
+
[
|
|
62
|
+
{
|
|
63
|
+
"color": "#355bfb",
|
|
64
|
+
},
|
|
65
|
+
undefined,
|
|
66
|
+
],
|
|
62
67
|
]
|
|
63
68
|
}
|
|
64
69
|
themeIntent="text"
|
|
@@ -87,7 +92,12 @@ exports[`Alert Icon render custom icon correctly 1`] = `
|
|
|
87
92
|
"letterSpacing": 0.48,
|
|
88
93
|
"lineHeight": 22,
|
|
89
94
|
},
|
|
90
|
-
|
|
95
|
+
[
|
|
96
|
+
{
|
|
97
|
+
"color": "#355bfb",
|
|
98
|
+
},
|
|
99
|
+
undefined,
|
|
100
|
+
],
|
|
91
101
|
]
|
|
92
102
|
}
|
|
93
103
|
themeIntent="body"
|
|
@@ -134,7 +144,7 @@ exports[`Alert renders correctly when intent is error 1`] = `
|
|
|
134
144
|
style={
|
|
135
145
|
[
|
|
136
146
|
{
|
|
137
|
-
"backgroundColor": "#
|
|
147
|
+
"backgroundColor": "#fcebe7",
|
|
138
148
|
"borderRadius": 16,
|
|
139
149
|
"flexDirection": "row",
|
|
140
150
|
"minHeight": 48,
|
|
@@ -180,7 +190,12 @@ exports[`Alert renders correctly when intent is error 1`] = `
|
|
|
180
190
|
"color": "#001f23",
|
|
181
191
|
"fontSize": 20,
|
|
182
192
|
},
|
|
183
|
-
|
|
193
|
+
[
|
|
194
|
+
{
|
|
195
|
+
"color": "#cb300a",
|
|
196
|
+
},
|
|
197
|
+
undefined,
|
|
198
|
+
],
|
|
184
199
|
]
|
|
185
200
|
}
|
|
186
201
|
themeIntent="text"
|
|
@@ -209,7 +224,12 @@ exports[`Alert renders correctly when intent is error 1`] = `
|
|
|
209
224
|
"letterSpacing": 0.24,
|
|
210
225
|
"lineHeight": 22,
|
|
211
226
|
},
|
|
212
|
-
|
|
227
|
+
[
|
|
228
|
+
{
|
|
229
|
+
"color": "#cb300a",
|
|
230
|
+
},
|
|
231
|
+
undefined,
|
|
232
|
+
],
|
|
213
233
|
]
|
|
214
234
|
}
|
|
215
235
|
themeIntent="body"
|
|
@@ -229,7 +249,12 @@ exports[`Alert renders correctly when intent is error 1`] = `
|
|
|
229
249
|
"letterSpacing": 0.48,
|
|
230
250
|
"lineHeight": 22,
|
|
231
251
|
},
|
|
232
|
-
|
|
252
|
+
[
|
|
253
|
+
{
|
|
254
|
+
"color": "#cb300a",
|
|
255
|
+
},
|
|
256
|
+
undefined,
|
|
257
|
+
],
|
|
233
258
|
]
|
|
234
259
|
}
|
|
235
260
|
themeIntent="body"
|
|
@@ -285,7 +310,12 @@ exports[`Alert renders correctly when intent is error 1`] = `
|
|
|
285
310
|
"color": "#001f23",
|
|
286
311
|
"fontSize": 20,
|
|
287
312
|
},
|
|
288
|
-
|
|
313
|
+
[
|
|
314
|
+
{
|
|
315
|
+
"color": "#cb300a",
|
|
316
|
+
},
|
|
317
|
+
undefined,
|
|
318
|
+
],
|
|
289
319
|
]
|
|
290
320
|
}
|
|
291
321
|
themeIntent="text"
|
|
@@ -328,7 +358,7 @@ exports[`Alert renders correctly when intent is info 1`] = `
|
|
|
328
358
|
style={
|
|
329
359
|
[
|
|
330
360
|
{
|
|
331
|
-
"backgroundColor": "#
|
|
361
|
+
"backgroundColor": "#ecf0ff",
|
|
332
362
|
"borderRadius": 16,
|
|
333
363
|
"flexDirection": "row",
|
|
334
364
|
"minHeight": 48,
|
|
@@ -374,7 +404,12 @@ exports[`Alert renders correctly when intent is info 1`] = `
|
|
|
374
404
|
"color": "#001f23",
|
|
375
405
|
"fontSize": 20,
|
|
376
406
|
},
|
|
377
|
-
|
|
407
|
+
[
|
|
408
|
+
{
|
|
409
|
+
"color": "#355bfb",
|
|
410
|
+
},
|
|
411
|
+
undefined,
|
|
412
|
+
],
|
|
378
413
|
]
|
|
379
414
|
}
|
|
380
415
|
themeIntent="text"
|
|
@@ -403,7 +438,12 @@ exports[`Alert renders correctly when intent is info 1`] = `
|
|
|
403
438
|
"letterSpacing": 0.24,
|
|
404
439
|
"lineHeight": 22,
|
|
405
440
|
},
|
|
406
|
-
|
|
441
|
+
[
|
|
442
|
+
{
|
|
443
|
+
"color": "#355bfb",
|
|
444
|
+
},
|
|
445
|
+
undefined,
|
|
446
|
+
],
|
|
407
447
|
]
|
|
408
448
|
}
|
|
409
449
|
themeIntent="body"
|
|
@@ -423,7 +463,12 @@ exports[`Alert renders correctly when intent is info 1`] = `
|
|
|
423
463
|
"letterSpacing": 0.48,
|
|
424
464
|
"lineHeight": 22,
|
|
425
465
|
},
|
|
426
|
-
|
|
466
|
+
[
|
|
467
|
+
{
|
|
468
|
+
"color": "#355bfb",
|
|
469
|
+
},
|
|
470
|
+
undefined,
|
|
471
|
+
],
|
|
427
472
|
]
|
|
428
473
|
}
|
|
429
474
|
themeIntent="body"
|
|
@@ -479,7 +524,12 @@ exports[`Alert renders correctly when intent is info 1`] = `
|
|
|
479
524
|
"color": "#001f23",
|
|
480
525
|
"fontSize": 20,
|
|
481
526
|
},
|
|
482
|
-
|
|
527
|
+
[
|
|
528
|
+
{
|
|
529
|
+
"color": "#355bfb",
|
|
530
|
+
},
|
|
531
|
+
undefined,
|
|
532
|
+
],
|
|
483
533
|
]
|
|
484
534
|
}
|
|
485
535
|
themeIntent="text"
|
|
@@ -570,7 +620,12 @@ exports[`Alert renders correctly when intent is notification 1`] = `
|
|
|
570
620
|
"letterSpacing": 0.24,
|
|
571
621
|
"lineHeight": 22,
|
|
572
622
|
},
|
|
573
|
-
|
|
623
|
+
[
|
|
624
|
+
{
|
|
625
|
+
"color": "#001f23",
|
|
626
|
+
},
|
|
627
|
+
undefined,
|
|
628
|
+
],
|
|
574
629
|
]
|
|
575
630
|
}
|
|
576
631
|
themeIntent="body"
|
|
@@ -590,7 +645,12 @@ exports[`Alert renders correctly when intent is notification 1`] = `
|
|
|
590
645
|
"letterSpacing": 0.48,
|
|
591
646
|
"lineHeight": 22,
|
|
592
647
|
},
|
|
593
|
-
|
|
648
|
+
[
|
|
649
|
+
{
|
|
650
|
+
"color": "#001f23",
|
|
651
|
+
},
|
|
652
|
+
undefined,
|
|
653
|
+
],
|
|
594
654
|
]
|
|
595
655
|
}
|
|
596
656
|
themeIntent="body"
|
|
@@ -646,7 +706,12 @@ exports[`Alert renders correctly when intent is notification 1`] = `
|
|
|
646
706
|
"color": "#001f23",
|
|
647
707
|
"fontSize": 20,
|
|
648
708
|
},
|
|
649
|
-
|
|
709
|
+
[
|
|
710
|
+
{
|
|
711
|
+
"color": "#001f23",
|
|
712
|
+
},
|
|
713
|
+
undefined,
|
|
714
|
+
],
|
|
650
715
|
]
|
|
651
716
|
}
|
|
652
717
|
themeIntent="text"
|
|
@@ -689,7 +754,7 @@ exports[`Alert renders correctly when intent is success 1`] = `
|
|
|
689
754
|
style={
|
|
690
755
|
[
|
|
691
756
|
{
|
|
692
|
-
"backgroundColor": "#
|
|
757
|
+
"backgroundColor": "#f0fef4",
|
|
693
758
|
"borderRadius": 16,
|
|
694
759
|
"flexDirection": "row",
|
|
695
760
|
"minHeight": 48,
|
|
@@ -735,7 +800,12 @@ exports[`Alert renders correctly when intent is success 1`] = `
|
|
|
735
800
|
"color": "#001f23",
|
|
736
801
|
"fontSize": 20,
|
|
737
802
|
},
|
|
738
|
-
|
|
803
|
+
[
|
|
804
|
+
{
|
|
805
|
+
"color": "#017d6d",
|
|
806
|
+
},
|
|
807
|
+
undefined,
|
|
808
|
+
],
|
|
739
809
|
]
|
|
740
810
|
}
|
|
741
811
|
themeIntent="text"
|
|
@@ -764,7 +834,12 @@ exports[`Alert renders correctly when intent is success 1`] = `
|
|
|
764
834
|
"letterSpacing": 0.24,
|
|
765
835
|
"lineHeight": 22,
|
|
766
836
|
},
|
|
767
|
-
|
|
837
|
+
[
|
|
838
|
+
{
|
|
839
|
+
"color": "#017d6d",
|
|
840
|
+
},
|
|
841
|
+
undefined,
|
|
842
|
+
],
|
|
768
843
|
]
|
|
769
844
|
}
|
|
770
845
|
themeIntent="body"
|
|
@@ -784,7 +859,12 @@ exports[`Alert renders correctly when intent is success 1`] = `
|
|
|
784
859
|
"letterSpacing": 0.48,
|
|
785
860
|
"lineHeight": 22,
|
|
786
861
|
},
|
|
787
|
-
|
|
862
|
+
[
|
|
863
|
+
{
|
|
864
|
+
"color": "#017d6d",
|
|
865
|
+
},
|
|
866
|
+
undefined,
|
|
867
|
+
],
|
|
788
868
|
]
|
|
789
869
|
}
|
|
790
870
|
themeIntent="body"
|
|
@@ -840,7 +920,12 @@ exports[`Alert renders correctly when intent is success 1`] = `
|
|
|
840
920
|
"color": "#001f23",
|
|
841
921
|
"fontSize": 20,
|
|
842
922
|
},
|
|
843
|
-
|
|
923
|
+
[
|
|
924
|
+
{
|
|
925
|
+
"color": "#017d6d",
|
|
926
|
+
},
|
|
927
|
+
undefined,
|
|
928
|
+
],
|
|
844
929
|
]
|
|
845
930
|
}
|
|
846
931
|
themeIntent="text"
|
|
@@ -883,7 +968,7 @@ exports[`Alert renders correctly when intent is warning 1`] = `
|
|
|
883
968
|
style={
|
|
884
969
|
[
|
|
885
970
|
{
|
|
886
|
-
"backgroundColor": "#
|
|
971
|
+
"backgroundColor": "#fff6eb",
|
|
887
972
|
"borderRadius": 16,
|
|
888
973
|
"flexDirection": "row",
|
|
889
974
|
"minHeight": 48,
|
|
@@ -929,7 +1014,12 @@ exports[`Alert renders correctly when intent is warning 1`] = `
|
|
|
929
1014
|
"color": "#001f23",
|
|
930
1015
|
"fontSize": 20,
|
|
931
1016
|
},
|
|
932
|
-
|
|
1017
|
+
[
|
|
1018
|
+
{
|
|
1019
|
+
"color": "#ac5d00",
|
|
1020
|
+
},
|
|
1021
|
+
undefined,
|
|
1022
|
+
],
|
|
933
1023
|
]
|
|
934
1024
|
}
|
|
935
1025
|
themeIntent="text"
|
|
@@ -958,7 +1048,12 @@ exports[`Alert renders correctly when intent is warning 1`] = `
|
|
|
958
1048
|
"letterSpacing": 0.24,
|
|
959
1049
|
"lineHeight": 22,
|
|
960
1050
|
},
|
|
961
|
-
|
|
1051
|
+
[
|
|
1052
|
+
{
|
|
1053
|
+
"color": "#ac5d00",
|
|
1054
|
+
},
|
|
1055
|
+
undefined,
|
|
1056
|
+
],
|
|
962
1057
|
]
|
|
963
1058
|
}
|
|
964
1059
|
themeIntent="body"
|
|
@@ -978,7 +1073,12 @@ exports[`Alert renders correctly when intent is warning 1`] = `
|
|
|
978
1073
|
"letterSpacing": 0.48,
|
|
979
1074
|
"lineHeight": 22,
|
|
980
1075
|
},
|
|
981
|
-
|
|
1076
|
+
[
|
|
1077
|
+
{
|
|
1078
|
+
"color": "#ac5d00",
|
|
1079
|
+
},
|
|
1080
|
+
undefined,
|
|
1081
|
+
],
|
|
982
1082
|
]
|
|
983
1083
|
}
|
|
984
1084
|
themeIntent="body"
|
|
@@ -1034,7 +1134,12 @@ exports[`Alert renders correctly when intent is warning 1`] = `
|
|
|
1034
1134
|
"color": "#001f23",
|
|
1035
1135
|
"fontSize": 20,
|
|
1036
1136
|
},
|
|
1037
|
-
|
|
1137
|
+
[
|
|
1138
|
+
{
|
|
1139
|
+
"color": "#ac5d00",
|
|
1140
|
+
},
|
|
1141
|
+
undefined,
|
|
1142
|
+
],
|
|
1038
1143
|
]
|
|
1039
1144
|
}
|
|
1040
1145
|
themeIntent="text"
|
|
@@ -1077,7 +1182,7 @@ exports[`Alert renders correctly without rounded 1`] = `
|
|
|
1077
1182
|
style={
|
|
1078
1183
|
[
|
|
1079
1184
|
{
|
|
1080
|
-
"backgroundColor": "#
|
|
1185
|
+
"backgroundColor": "#ecf0ff",
|
|
1081
1186
|
"borderRadius": 0,
|
|
1082
1187
|
"flexDirection": "row",
|
|
1083
1188
|
"minHeight": 48,
|
|
@@ -1123,7 +1228,12 @@ exports[`Alert renders correctly without rounded 1`] = `
|
|
|
1123
1228
|
"color": "#001f23",
|
|
1124
1229
|
"fontSize": 20,
|
|
1125
1230
|
},
|
|
1126
|
-
|
|
1231
|
+
[
|
|
1232
|
+
{
|
|
1233
|
+
"color": "#355bfb",
|
|
1234
|
+
},
|
|
1235
|
+
undefined,
|
|
1236
|
+
],
|
|
1127
1237
|
]
|
|
1128
1238
|
}
|
|
1129
1239
|
themeIntent="text"
|
|
@@ -1152,7 +1262,12 @@ exports[`Alert renders correctly without rounded 1`] = `
|
|
|
1152
1262
|
"letterSpacing": 0.24,
|
|
1153
1263
|
"lineHeight": 22,
|
|
1154
1264
|
},
|
|
1155
|
-
|
|
1265
|
+
[
|
|
1266
|
+
{
|
|
1267
|
+
"color": "#355bfb",
|
|
1268
|
+
},
|
|
1269
|
+
undefined,
|
|
1270
|
+
],
|
|
1156
1271
|
]
|
|
1157
1272
|
}
|
|
1158
1273
|
themeIntent="body"
|
|
@@ -1172,7 +1287,12 @@ exports[`Alert renders correctly without rounded 1`] = `
|
|
|
1172
1287
|
"letterSpacing": 0.48,
|
|
1173
1288
|
"lineHeight": 22,
|
|
1174
1289
|
},
|
|
1175
|
-
|
|
1290
|
+
[
|
|
1291
|
+
{
|
|
1292
|
+
"color": "#355bfb",
|
|
1293
|
+
},
|
|
1294
|
+
undefined,
|
|
1295
|
+
],
|
|
1176
1296
|
]
|
|
1177
1297
|
}
|
|
1178
1298
|
themeIntent="body"
|
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { ReactElement } from 'react';
|
|
3
3
|
import type { StyleProp, ViewStyle } from 'react-native';
|
|
4
|
-
import Icon from '../Icon';
|
|
5
|
-
import Typography from '../Typography';
|
|
6
4
|
import {
|
|
7
5
|
Container,
|
|
8
6
|
ContentContainer,
|
|
9
7
|
CTAWrapper,
|
|
10
8
|
IconContainer,
|
|
9
|
+
StyledBody,
|
|
10
|
+
StyledIcon,
|
|
11
11
|
TextContainer,
|
|
12
12
|
} from './StyledAlert';
|
|
13
13
|
import type { IconName } from '../Icon';
|
|
14
14
|
import { useDeprecation } from '../../utils/hooks';
|
|
15
15
|
|
|
16
|
+
type Intent = 'success' | 'info' | 'warning' | 'error' | 'notification';
|
|
16
17
|
const getIntentIcon = (
|
|
17
18
|
intent: 'success' | 'info' | 'warning' | 'error' | 'notification'
|
|
18
19
|
) => {
|
|
@@ -30,10 +31,10 @@ const getIntentIcon = (
|
|
|
30
31
|
}
|
|
31
32
|
};
|
|
32
33
|
|
|
33
|
-
const AlertIcon = ({ icon }: { icon?: IconName }) =>
|
|
34
|
+
const AlertIcon = ({ icon, intent }: { icon?: IconName; intent: Intent }) =>
|
|
34
35
|
icon ? (
|
|
35
36
|
<IconContainer testID="alert-left-icon">
|
|
36
|
-
<
|
|
37
|
+
<StyledIcon icon={icon} size="small" themeIntent={intent} />
|
|
37
38
|
</IconContainer>
|
|
38
39
|
) : null;
|
|
39
40
|
|
|
@@ -119,16 +120,20 @@ const Alert = ({
|
|
|
119
120
|
>
|
|
120
121
|
<ContentContainer showDivider={!!onClose}>
|
|
121
122
|
{icon !== null ? (
|
|
122
|
-
<AlertIcon icon={icon || getIntentIcon(intent)} />
|
|
123
|
+
<AlertIcon icon={icon || getIntentIcon(intent)} intent={intent} />
|
|
123
124
|
) : null}
|
|
124
125
|
<TextContainer>
|
|
125
126
|
{typeof title === 'string' ? (
|
|
126
|
-
<
|
|
127
|
+
<StyledBody variant="small-bold" themeIntent={intent}>
|
|
128
|
+
{title}
|
|
129
|
+
</StyledBody>
|
|
127
130
|
) : (
|
|
128
131
|
title
|
|
129
132
|
)}
|
|
130
133
|
{typeof content === 'string' ? (
|
|
131
|
-
<
|
|
134
|
+
<StyledBody variant="small" themeIntent={intent}>
|
|
135
|
+
{content}
|
|
136
|
+
</StyledBody>
|
|
132
137
|
) : (
|
|
133
138
|
content
|
|
134
139
|
)}
|
|
@@ -137,11 +142,11 @@ const Alert = ({
|
|
|
137
142
|
{onClose ? (
|
|
138
143
|
<CTAWrapper onPress={onClose} testID="alert-close-icon">
|
|
139
144
|
{typeof actionLabel === 'string' ? (
|
|
140
|
-
<
|
|
145
|
+
<StyledBody variant="small-bold" themeIntent={intent}>
|
|
141
146
|
{actionLabel}
|
|
142
|
-
</
|
|
147
|
+
</StyledBody>
|
|
143
148
|
) : (
|
|
144
|
-
<
|
|
149
|
+
<StyledIcon icon="cancel" size="small" themeIntent={intent} />
|
|
145
150
|
)}
|
|
146
151
|
</CTAWrapper>
|
|
147
152
|
) : null}
|