@hero-design/rn 7.18.1 → 7.20.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/.eslintrc.json +6 -1
- package/.turbo/turbo-build.log +2 -2
- package/es/index.js +726 -336
- package/lib/index.js +727 -336
- package/package.json +4 -4
- package/src/components/Accordion/AccordionItem.tsx +5 -4
- package/src/components/Accordion/__tests__/index.spec.tsx +2 -1
- package/src/components/Accordion/index.tsx +3 -2
- package/src/components/Alert/StyledAlert.tsx +8 -7
- package/src/components/Alert/__tests__/__snapshots__/index.spec.tsx.snap +140 -19
- package/src/components/Alert/__tests__/index.spec.tsx +21 -0
- package/src/components/Alert/index.tsx +18 -9
- package/src/components/Avatar/StyledAvatar.tsx +2 -1
- package/src/components/Avatar/index.tsx +4 -3
- package/src/components/Badge/Status.tsx +4 -2
- package/src/components/Badge/index.tsx +2 -1
- package/src/components/BottomNavigation/__tests__/index.spec.tsx +4 -2
- package/src/components/BottomNavigation/index.tsx +6 -8
- package/src/components/BottomSheet/Footer.tsx +2 -1
- package/src/components/BottomSheet/Header.tsx +2 -1
- package/src/components/BottomSheet/StyledBottomSheet.tsx +2 -2
- package/src/components/BottomSheet/index.tsx +4 -8
- package/src/components/Box/StyledBox.tsx +54 -0
- package/src/components/Box/__tests__/__snapshots__/index.spec.tsx.snap +605 -0
- package/src/components/Box/__tests__/helpers.spec.ts +14 -0
- package/src/components/Box/__tests__/index.spec.tsx +155 -0
- package/src/components/Box/config.ts +201 -0
- package/src/components/Box/helpers.ts +10 -0
- package/src/components/Box/index.tsx +13 -0
- package/src/components/Box/types.ts +38 -0
- package/src/components/Button/Button.tsx +5 -6
- package/src/components/Button/IconButton.tsx +4 -7
- package/src/components/Button/LoadingIndicator/StyledLoadingIndicator.tsx +5 -3
- package/src/components/Button/LoadingIndicator/index.tsx +2 -8
- package/src/components/Button/StyledButton.tsx +4 -5
- package/src/components/Button/UtilityButton/index.tsx +5 -4
- package/src/components/Button/index.tsx +3 -2
- package/src/components/Calendar/StyledCalendar.tsx +2 -1
- package/src/components/Calendar/__tests__/index.spec.tsx +13 -17
- package/src/components/Card/DataCard/StyledDataCard.tsx +8 -2
- package/src/components/Card/DataCard/__tests__/StyledDataCard.spec.tsx +1 -0
- package/src/components/Card/DataCard/__tests__/__snapshots__/StyledDataCard.spec.tsx.snap +16 -0
- package/src/components/Card/DataCard/index.tsx +4 -3
- package/src/components/Card/StyledCard.tsx +12 -19
- package/src/components/Card/__tests__/__snapshots__/index.spec.tsx.snap +147 -0
- package/src/components/Card/__tests__/index.spec.tsx +18 -0
- package/src/components/Card/index.tsx +9 -3
- package/src/components/Checkbox/StyledCheckbox.tsx +44 -14
- package/src/components/Checkbox/__tests__/StyledCheckbox.spec.tsx +28 -3
- package/src/components/Checkbox/__tests__/__snapshots__/StyledCheckbox.spec.tsx.snap +95 -9
- package/src/components/Checkbox/__tests__/__snapshots__/index.spec.tsx.snap +337 -23
- package/src/components/Checkbox/__tests__/index.spec.tsx +38 -7
- package/src/components/Checkbox/index.tsx +35 -18
- package/src/components/Collapse/index.tsx +4 -8
- package/src/components/ContentNavigator/index.tsx +1 -1
- package/src/components/DatePicker/DatePickerAndroid.tsx +1 -1
- package/src/components/DatePicker/DatePickerIOS.tsx +1 -1
- package/src/components/DatePicker/StyledDatePicker.tsx +2 -1
- package/src/components/DatePicker/__tests__/DatePickerIOS.spec.tsx +1 -2
- package/src/components/DatePicker/index.tsx +1 -1
- package/src/components/DatePicker/types.ts +1 -1
- package/src/components/Divider/index.tsx +1 -1
- package/src/components/Drawer/DragableDrawer/helpers.ts +3 -4
- package/src/components/Drawer/DragableDrawer/index.tsx +3 -2
- package/src/components/Drawer/StyledDrawer.tsx +3 -2
- package/src/components/Drawer/index.tsx +2 -1
- package/src/components/Empty/index.tsx +1 -2
- package/src/components/FAB/ActionGroup/ActionItem.tsx +3 -2
- package/src/components/FAB/ActionGroup/StyledActionGroup.tsx +4 -3
- package/src/components/FAB/ActionGroup/StyledActionItem.tsx +4 -2
- package/src/components/FAB/ActionGroup/index.tsx +11 -11
- package/src/components/FAB/AnimatedFABIcon.tsx +1 -1
- package/src/components/FAB/FAB.tsx +2 -2
- package/src/components/FAB/StyledFAB.tsx +4 -7
- package/src/components/Icon/AnimatedIcon.tsx +2 -1
- package/src/components/Icon/index.tsx +1 -1
- package/src/components/List/BasicListItem.tsx +3 -3
- package/src/components/List/ListItem.tsx +6 -3
- package/src/components/List/StyledListItem.tsx +2 -1
- package/src/components/List/__tests__/__snapshots__/ListItem.spec.tsx.snap +13 -27
- package/src/components/List/__tests__/__snapshots__/StyledListItem.spec.tsx.snap +2 -0
- package/src/components/PinInput/PinCell.tsx +1 -1
- package/src/components/PinInput/index.tsx +3 -7
- package/src/components/Progress/ProgressBar.tsx +2 -1
- package/src/components/Progress/ProgressCircle.tsx +3 -9
- package/src/components/Progress/StyledProgressBar.tsx +3 -3
- package/src/components/Progress/StyledProgressCircle.tsx +3 -3
- package/src/components/Radio/Radio.tsx +20 -14
- package/src/components/Radio/RadioGroup.tsx +5 -3
- package/src/components/Radio/StyledRadio.tsx +12 -29
- package/src/components/Radio/__tests__/__snapshots__/Radio.spec.tsx.snap +84 -50
- package/src/components/Radio/__tests__/__snapshots__/RadioGroup.spec.tsx.snap +124 -73
- package/src/components/RichTextEditor/EditorToolbar.tsx +4 -8
- package/src/components/RichTextEditor/RichTextEditor.tsx +5 -14
- package/src/components/RichTextEditor/__tests__/EditorToolbar.spec.tsx +2 -6
- package/src/components/RichTextEditor/__tests__/MentionList.spec.tsx +2 -6
- package/src/components/RichTextEditor/__tests__/RichTextEditor.spec.tsx +8 -15
- package/src/components/RichTextEditor/index.tsx +6 -6
- package/src/components/SectionHeading/__tests__/__snapshots__/StyledHeading.spec.tsx.snap +1 -1
- package/src/components/SectionHeading/__tests__/__snapshots__/index.spec.tsx.snap +4 -4
- package/src/components/SectionHeading/index.tsx +5 -4
- package/src/components/Select/MultiSelect/Option.tsx +2 -1
- package/src/components/Select/MultiSelect/OptionList.tsx +3 -3
- package/src/components/Select/MultiSelect/__tests__/__snapshots__/OptionList.spec.tsx.snap +22 -20
- package/src/components/Select/MultiSelect/__tests__/__snapshots__/index.spec.tsx.snap +609 -589
- package/src/components/Select/MultiSelect/__tests__/index.spec.tsx +1 -1
- package/src/components/Select/MultiSelect/index.tsx +20 -16
- package/src/components/Select/SingleSelect/Option.tsx +2 -1
- package/src/components/Select/SingleSelect/OptionList.tsx +3 -3
- package/src/components/Select/SingleSelect/__tests__/__snapshots__/OptionList.spec.tsx.snap +22 -20
- package/src/components/Select/SingleSelect/__tests__/__snapshots__/index.spec.tsx.snap +606 -586
- package/src/components/Select/SingleSelect/__tests__/index.spec.tsx +1 -1
- package/src/components/Select/SingleSelect/index.tsx +20 -16
- package/src/components/Select/StyledOptionList.tsx +11 -9
- package/src/components/Select/helpers.tsx +1 -1
- package/src/components/Select/index.tsx +6 -4
- package/src/components/Select/types.ts +3 -3
- package/src/components/Spinner/AnimatedSpinner.tsx +7 -7
- package/src/components/Spinner/StyledSpinner.tsx +26 -20
- package/src/components/Spinner/__tests__/AnimatedSpinner.spec.tsx +1 -1
- package/src/components/Spinner/__tests__/StyledSpinner.spec.tsx +32 -16
- package/src/components/Spinner/__tests__/__snapshots__/AnimatedSpinner.spec.tsx.snap +14 -12
- package/src/components/Spinner/__tests__/__snapshots__/StyledSpinner.spec.tsx.snap +273 -31
- package/src/components/Spinner/__tests__/__snapshots__/index.spec.tsx.snap +14 -12
- package/src/components/Spinner/index.tsx +13 -5
- package/src/components/Switch/StyledSwitch.tsx +10 -26
- package/src/components/Switch/__tests__/StyledSwitch.spec.tsx +25 -0
- package/src/components/Switch/__tests__/__snapshots__/{StyledHeading.spec.tsx.snap → StyledSwitch.spec.tsx.snap} +45 -18
- package/src/components/Switch/__tests__/__snapshots__/index.spec.tsx.snap +26 -52
- package/src/components/Switch/index.tsx +23 -20
- package/src/components/Tabs/ScrollableTabs.tsx +10 -5
- package/src/components/Tabs/StyledScrollableTabs.tsx +6 -5
- package/src/components/Tabs/StyledTabs.tsx +6 -0
- package/src/components/Tabs/TabWithBadge.tsx +68 -0
- package/src/components/Tabs/__tests__/ScrollableTabs.spec.tsx +17 -2
- package/src/components/Tabs/__tests__/TabWithBadge.spec.tsx +48 -0
- package/src/components/Tabs/__tests__/__snapshots__/ScrollableTabs.spec.tsx.snap +205 -43
- package/src/components/Tabs/__tests__/__snapshots__/TabWithBadge.spec.tsx.snap +165 -0
- package/src/components/Tabs/__tests__/__snapshots__/index.spec.tsx.snap +135 -34
- package/src/components/Tabs/__tests__/index.spec.tsx +16 -2
- package/src/components/Tabs/index.tsx +17 -16
- package/src/components/Tag/StyledTag.tsx +1 -11
- package/src/components/Tag/__tests__/__snapshots__/Tag.spec.tsx.snap +4 -4
- package/src/components/Tag/index.tsx +3 -3
- package/src/components/TextInput/__tests__/index.spec.tsx +10 -14
- package/src/components/TextInput/index.tsx +5 -5
- package/src/components/TimePicker/StyledTimePicker.tsx +2 -1
- package/src/components/TimePicker/TimePickerAndroid.tsx +1 -1
- package/src/components/TimePicker/TimePickerIOS.tsx +1 -1
- package/src/components/TimePicker/__tests__/TimePickerIOS.spec.tsx +1 -2
- package/src/components/TimePicker/index.tsx +1 -1
- package/src/components/TimePicker/types.ts +1 -1
- package/src/components/Toast/StyledToast.tsx +16 -15
- package/src/components/Toast/Toast.tsx +36 -10
- package/src/components/Toast/ToastContainer.tsx +2 -2
- package/src/components/Toast/ToastContext.ts +1 -1
- package/src/components/Toast/ToastProvider.tsx +20 -19
- package/src/components/Toast/__tests__/Toast.spec.tsx +17 -0
- package/src/components/Toast/__tests__/ToastContainer.spec.tsx +1 -1
- package/src/components/Toast/__tests__/__snapshots__/Toast.spec.tsx.snap +299 -19
- package/src/components/Toast/types.ts +18 -4
- package/src/components/Toolbar/StyledToolbar.tsx +2 -1
- package/src/components/Toolbar/ToolbarGroup.tsx +2 -1
- package/src/components/Toolbar/ToolbarItem.tsx +2 -1
- package/src/components/Toolbar/index.tsx +2 -1
- package/src/components/Typography/Text/StyledText.tsx +7 -1
- package/src/components/Typography/Text/__tests__/StyledText.spec.tsx +1 -0
- package/src/components/Typography/Text/__tests__/__snapshots__/StyledText.spec.tsx.snap +22 -0
- package/src/components/Typography/Text/index.tsx +10 -3
- package/src/index.ts +2 -0
- package/src/testHelpers/renderWithTheme.tsx +2 -1
- package/src/theme/ThemeProvider.ts +1 -1
- package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +100 -49
- package/src/theme/components/.eslintrc.json +10 -0
- package/src/theme/components/accordion.ts +1 -1
- package/src/theme/components/alert.ts +6 -2
- package/src/theme/components/avatar.ts +3 -1
- package/src/theme/components/badge.ts +1 -1
- package/src/theme/components/bottomNavigation.ts +1 -1
- package/src/theme/components/bottomSheet.ts +1 -1
- package/src/theme/components/button.ts +1 -1
- package/src/theme/components/calendar.ts +1 -1
- package/src/theme/components/card.ts +7 -8
- package/src/theme/components/checkbox.ts +12 -8
- package/src/theme/components/contentNavigator.ts +1 -1
- package/src/theme/components/divider.ts +1 -1
- package/src/theme/components/drawer.ts +1 -1
- package/src/theme/components/empty.ts +1 -1
- package/src/theme/components/fab.ts +1 -1
- package/src/theme/components/icon.ts +1 -1
- package/src/theme/components/list.ts +5 -4
- package/src/theme/components/pinInput.ts +1 -1
- package/src/theme/components/progress.ts +1 -1
- package/src/theme/components/radio.ts +3 -11
- package/src/theme/components/richTextEditor.ts +1 -1
- package/src/theme/components/sectionHeading.ts +2 -2
- package/src/theme/components/select.ts +1 -1
- package/src/theme/components/spinner.ts +20 -8
- package/src/theme/components/switch.ts +7 -8
- package/src/theme/components/tabs.ts +4 -3
- package/src/theme/components/tag.ts +14 -14
- package/src/theme/components/textInput.ts +1 -1
- package/src/theme/components/toast.ts +18 -4
- package/src/theme/components/toolbar.ts +1 -1
- package/src/theme/components/typography.ts +3 -1
- package/src/theme/getTheme.ts +4 -11
- package/src/theme/global/borders.ts +2 -1
- package/src/theme/global/colors/swag.ts +25 -3
- package/src/theme/global/colors/types.ts +23 -0
- package/src/theme/global/colors/work.ts +6 -2
- package/src/theme/global/index.ts +6 -11
- package/src/theme/global/scale.ts +2 -1
- package/src/theme/global/space.ts +2 -1
- package/src/theme/global/typography.ts +2 -8
- package/src/theme/index.ts +5 -2
- package/src/types.ts +9 -10
- package/testUtils/setup.tsx +2 -0
- package/tsconfig.json +5 -21
- package/types/components/Accordion/AccordionItem.d.ts +3 -3
- package/types/components/Accordion/StyledAccordion.d.ts +14 -14
- package/types/components/Accordion/index.d.ts +3 -2
- package/types/components/Alert/StyledAlert.d.ts +18 -17
- package/types/components/Alert/index.d.ts +4 -4
- package/types/components/Avatar/StyledAvatar.d.ts +16 -16
- package/types/components/Avatar/index.d.ts +3 -3
- package/types/components/Badge/Status.d.ts +2 -2
- package/types/components/Badge/StyledBadge.d.ts +7 -7
- package/types/components/Badge/index.d.ts +2 -1
- package/types/components/BottomNavigation/StyledBottomNavigation.d.ts +21 -21
- package/types/components/BottomNavigation/index.d.ts +3 -3
- package/types/components/BottomSheet/Footer.d.ts +1 -1
- package/types/components/BottomSheet/Header.d.ts +2 -2
- package/types/components/BottomSheet/StyledBottomSheet.d.ts +21 -20
- package/types/components/BottomSheet/index.d.ts +2 -2
- package/types/components/Box/StyledBox.d.ts +15 -0
- package/types/components/{Radio/__tests__/StyledRadio.spec.d.ts → Box/__tests__/helpers.spec.d.ts} +0 -0
- package/types/components/{Switch/__tests__/StyledHeading.spec.d.ts → Box/__tests__/index.spec.d.ts} +0 -0
- package/types/components/Box/config.d.ts +170 -0
- package/types/components/Box/helpers.d.ts +1 -0
- package/types/components/Box/index.d.ts +5 -0
- package/types/components/Box/types.d.ts +31 -0
- package/types/components/Button/Button.d.ts +4 -4
- package/types/components/Button/IconButton.d.ts +2 -2
- package/types/components/Button/LoadingIndicator/StyledLoadingIndicator.d.ts +10 -9
- package/types/components/Button/LoadingIndicator/index.d.ts +1 -1
- package/types/components/Button/StyledButton.d.ts +19 -18
- package/types/components/Button/UtilityButton/StyledUtilityButton.d.ts +8 -8
- package/types/components/Button/UtilityButton/index.d.ts +3 -3
- package/types/components/Button/index.d.ts +2 -2
- package/types/components/Calendar/StyledCalendar.d.ts +27 -26
- package/types/components/Calendar/helpers.d.ts +2 -2
- package/types/components/Card/DataCard/StyledDataCard.d.ts +7 -7
- package/types/components/Card/DataCard/index.d.ts +3 -3
- package/types/components/Card/StyledCard.d.ts +7 -6
- package/types/components/Card/index.d.ts +7 -3
- package/types/components/Checkbox/StyledCheckbox.d.ts +24 -6
- package/types/components/Checkbox/index.d.ts +11 -3
- package/types/components/Collapse/StyledCollapse.d.ts +8 -8
- package/types/components/Collapse/index.d.ts +2 -2
- package/types/components/ContentNavigator/StyledContentNavigator.d.ts +5 -5
- package/types/components/ContentNavigator/index.d.ts +1 -1
- package/types/components/DatePicker/DatePickerAndroid.d.ts +1 -1
- package/types/components/DatePicker/DatePickerIOS.d.ts +1 -1
- package/types/components/DatePicker/StyledDatePicker.d.ts +5 -4
- package/types/components/DatePicker/index.d.ts +1 -1
- package/types/components/DatePicker/types.d.ts +1 -1
- package/types/components/Divider/StyledDivider.d.ts +5 -5
- package/types/components/Divider/index.d.ts +1 -1
- package/types/components/Drawer/DragableDrawer/index.d.ts +1 -1
- package/types/components/Drawer/StyledDrawer.d.ts +21 -20
- package/types/components/Drawer/index.d.ts +1 -1
- package/types/components/Empty/StyledEmpty.d.ts +12 -12
- package/types/components/Empty/index.d.ts +1 -1
- package/types/components/FAB/ActionGroup/ActionItem.d.ts +2 -2
- package/types/components/FAB/ActionGroup/StyledActionGroup.d.ts +14 -13
- package/types/components/FAB/ActionGroup/StyledActionItem.d.ts +10 -9
- package/types/components/FAB/ActionGroup/index.d.ts +3 -3
- package/types/components/FAB/AnimatedFABIcon.d.ts +1 -1
- package/types/components/FAB/FAB.d.ts +2 -2
- package/types/components/FAB/StyledFAB.d.ts +11 -10
- package/types/components/Icon/AnimatedIcon.d.ts +1 -1
- package/types/components/Icon/HeroIcon/index.d.ts +3 -3
- package/types/components/Icon/index.d.ts +1 -1
- package/types/components/List/BasicListItem.d.ts +2 -2
- package/types/components/List/ListItem.d.ts +4 -3
- package/types/components/List/StyledBasicListItem.d.ts +14 -14
- package/types/components/List/StyledListItem.d.ts +23 -23
- package/types/components/PinInput/PinCell.d.ts +1 -1
- package/types/components/PinInput/StyledPinInput.d.ts +30 -30
- package/types/components/PinInput/index.d.ts +2 -2
- package/types/components/Progress/ProgressBar.d.ts +1 -1
- package/types/components/Progress/ProgressCircle.d.ts +1 -1
- package/types/components/Progress/StyledProgressBar.d.ts +8 -7
- package/types/components/Progress/StyledProgressCircle.d.ts +21 -20
- package/types/components/Radio/Radio.d.ts +2 -2
- package/types/components/Radio/RadioGroup.d.ts +3 -3
- package/types/components/Radio/StyledRadio.d.ts +11 -21
- package/types/components/RichTextEditor/EditorToolbar.d.ts +1 -1
- package/types/components/RichTextEditor/MentionList.d.ts +1 -1
- package/types/components/RichTextEditor/RichTextEditor.d.ts +3 -2
- package/types/components/RichTextEditor/StyledRichTextEditor.d.ts +6 -6
- package/types/components/RichTextEditor/StyledToolbar.d.ts +9 -9
- package/types/components/RichTextEditor/index.d.ts +5 -4
- package/types/components/SectionHeading/StyledHeading.d.ts +9 -9
- package/types/components/SectionHeading/index.d.ts +3 -3
- package/types/components/Select/MultiSelect/Option.d.ts +2 -2
- package/types/components/Select/MultiSelect/OptionList.d.ts +2 -2
- package/types/components/Select/MultiSelect/index.d.ts +1 -1
- package/types/components/Select/SingleSelect/Option.d.ts +2 -2
- package/types/components/Select/SingleSelect/OptionList.d.ts +2 -2
- package/types/components/Select/SingleSelect/index.d.ts +1 -1
- package/types/components/Select/StyledOptionList.d.ts +4 -4
- package/types/components/Select/StyledSelect.d.ts +11 -11
- package/types/components/Select/helpers.d.ts +2 -2
- package/types/components/Select/index.d.ts +4 -3
- package/types/components/Select/types.d.ts +3 -3
- package/types/components/Spinner/AnimatedSpinner.d.ts +3 -1
- package/types/components/Spinner/StyledSpinner.d.ts +16 -13
- package/types/components/Spinner/index.d.ts +7 -3
- package/types/components/Switch/StyledSwitch.d.ts +8 -23
- package/types/components/Switch/__tests__/StyledSwitch.spec.d.ts +1 -0
- package/types/components/Switch/index.d.ts +3 -2
- package/types/components/Tabs/ScrollableTabs.d.ts +1 -1
- package/types/components/Tabs/StyledScrollableTabs.d.ts +24 -22
- package/types/components/Tabs/StyledTabs.d.ts +26 -20
- package/types/components/Tabs/TabWithBadge.d.ts +17 -0
- package/types/components/Tabs/__tests__/TabWithBadge.spec.d.ts +1 -0
- package/types/components/Tabs/index.d.ts +4 -2
- package/types/components/Tag/StyledTag.d.ts +6 -6
- package/types/components/Tag/index.d.ts +2 -2
- package/types/components/TextInput/StyledTextInput.d.ts +44 -44
- package/types/components/TextInput/index.d.ts +8 -8
- package/types/components/TimePicker/StyledTimePicker.d.ts +5 -4
- package/types/components/TimePicker/TimePickerAndroid.d.ts +1 -1
- package/types/components/TimePicker/TimePickerIOS.d.ts +1 -1
- package/types/components/TimePicker/index.d.ts +1 -1
- package/types/components/TimePicker/types.d.ts +1 -1
- package/types/components/Toast/StyledToast.d.ts +21 -19
- package/types/components/Toast/Toast.d.ts +1 -1
- package/types/components/Toast/ToastContainer.d.ts +2 -2
- package/types/components/Toast/ToastContext.d.ts +1 -1
- package/types/components/Toast/ToastProvider.d.ts +2 -2
- package/types/components/Toast/types.d.ts +5 -4
- package/types/components/Toolbar/StyledToolbar.d.ts +11 -10
- package/types/components/Toolbar/ToolbarGroup.d.ts +1 -1
- package/types/components/Toolbar/ToolbarItem.d.ts +1 -1
- package/types/components/Toolbar/index.d.ts +1 -1
- package/types/components/Typography/Text/StyledText.d.ts +4 -4
- package/types/components/Typography/Text/index.d.ts +3 -3
- package/types/index.d.ts +2 -1
- package/types/testHelpers/renderWithTheme.d.ts +2 -2
- package/types/theme/ThemeProvider.d.ts +1 -1
- package/types/theme/ThemeSwitcher.d.ts +1 -1
- package/types/theme/components/accordion.d.ts +1 -1
- package/types/theme/components/alert.d.ts +6 -2
- package/types/theme/components/avatar.d.ts +3 -1
- package/types/theme/components/badge.d.ts +1 -1
- package/types/theme/components/bottomNavigation.d.ts +1 -1
- package/types/theme/components/bottomSheet.d.ts +1 -1
- package/types/theme/components/button.d.ts +1 -1
- package/types/theme/components/calendar.d.ts +1 -1
- package/types/theme/components/card.d.ts +7 -8
- package/types/theme/components/checkbox.d.ts +10 -7
- package/types/theme/components/contentNavigator.d.ts +1 -1
- package/types/theme/components/divider.d.ts +1 -1
- package/types/theme/components/drawer.d.ts +1 -1
- package/types/theme/components/empty.d.ts +1 -1
- package/types/theme/components/fab.d.ts +1 -1
- package/types/theme/components/icon.d.ts +1 -1
- package/types/theme/components/list.d.ts +8 -7
- package/types/theme/components/pinInput.d.ts +1 -1
- package/types/theme/components/progress.d.ts +1 -1
- package/types/theme/components/radio.d.ts +1 -8
- package/types/theme/components/richTextEditor.d.ts +1 -1
- package/types/theme/components/sectionHeading.d.ts +1 -1
- package/types/theme/components/select.d.ts +1 -1
- package/types/theme/components/spinner.d.ts +18 -6
- package/types/theme/components/switch.d.ts +7 -6
- package/types/theme/components/tabs.d.ts +2 -1
- package/types/theme/components/tag.d.ts +3 -3
- package/types/theme/components/textInput.d.ts +1 -1
- package/types/theme/components/toast.d.ts +19 -3
- package/types/theme/components/toolbar.d.ts +1 -1
- package/types/theme/components/typography.d.ts +3 -1
- package/types/theme/getTheme.d.ts +2 -2
- package/types/theme/global/borders.d.ts +2 -1
- package/types/theme/global/colors/swag.d.ts +1 -1
- package/types/theme/global/colors/types.d.ts +17 -0
- package/types/theme/global/colors/work.d.ts +1 -1
- package/types/theme/global/index.d.ts +22 -3
- package/types/theme/global/scale.d.ts +2 -1
- package/types/theme/global/space.d.ts +2 -1
- package/types/theme/global/typography.d.ts +2 -1
- package/types/theme/index.d.ts +4 -2
- package/types/types.d.ts +9 -8
- package/types/utils/hooks.d.ts +1 -1
- package/src/components/Radio/__tests__/StyledRadio.spec.tsx +0 -43
- package/src/components/Radio/__tests__/__snapshots__/StyledRadio.spec.tsx.snap +0 -124
- package/src/components/Switch/__tests__/StyledHeading.spec.tsx +0 -42
|
@@ -1,6 +1,14 @@
|
|
|
1
|
-
import { ReactElement } from 'react';
|
|
2
|
-
import { StyleProp, ViewStyle } from 'react-native';
|
|
3
|
-
import { IconName } from '../Icon';
|
|
1
|
+
import type { ReactElement } from 'react';
|
|
2
|
+
import type { StyleProp, ViewStyle } from 'react-native';
|
|
3
|
+
import type { IconName } from '../Icon';
|
|
4
|
+
|
|
5
|
+
export type IntentType =
|
|
6
|
+
| 'success'
|
|
7
|
+
| 'info'
|
|
8
|
+
| 'warning'
|
|
9
|
+
| 'error'
|
|
10
|
+
| 'notification'
|
|
11
|
+
| 'snackbar';
|
|
4
12
|
|
|
5
13
|
export interface ToastProps {
|
|
6
14
|
/**
|
|
@@ -17,7 +25,13 @@ export interface ToastProps {
|
|
|
17
25
|
/**
|
|
18
26
|
* Visual intent color to apply to alert.
|
|
19
27
|
*/
|
|
20
|
-
intent?:
|
|
28
|
+
intent?:
|
|
29
|
+
| 'success'
|
|
30
|
+
| 'info'
|
|
31
|
+
| 'warning'
|
|
32
|
+
| 'error'
|
|
33
|
+
| 'notification'
|
|
34
|
+
| 'snackbar';
|
|
21
35
|
/**
|
|
22
36
|
* Toast variants
|
|
23
37
|
*/
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import styled from '@emotion/native';
|
|
2
|
-
import { TouchableOpacity, View
|
|
2
|
+
import { TouchableOpacity, View } from 'react-native';
|
|
3
|
+
import type { ViewProps } from 'react-native';
|
|
3
4
|
|
|
4
5
|
const ToolbarWrapper = styled(View)<ViewProps>(({ theme }) => ({
|
|
5
6
|
position: 'absolute',
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ToolbarGroupWrapper } from './StyledToolbar';
|
|
3
|
-
import ToolbarItem
|
|
3
|
+
import ToolbarItem from './ToolbarItem';
|
|
4
|
+
import type { ToolbarItemProps } from './ToolbarItem';
|
|
4
5
|
|
|
5
6
|
export interface ToolbarGroupProps {
|
|
6
7
|
/**
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import Icon
|
|
2
|
+
import Icon from '../Icon';
|
|
3
3
|
import Typography from '../Typography';
|
|
4
4
|
import { ToolbarItemWrapper } from './StyledToolbar';
|
|
5
|
+
import type { IconName } from '../Icon';
|
|
5
6
|
|
|
6
7
|
export interface ToolbarItemProps {
|
|
7
8
|
/**
|
|
@@ -8,7 +8,13 @@ const FONTWEIGHT_MAP = {
|
|
|
8
8
|
} as const;
|
|
9
9
|
|
|
10
10
|
const StyledText = styled(Text)<{
|
|
11
|
-
themeFontSize:
|
|
11
|
+
themeFontSize:
|
|
12
|
+
| 'small'
|
|
13
|
+
| 'medium'
|
|
14
|
+
| 'large'
|
|
15
|
+
| 'xlarge'
|
|
16
|
+
| 'xxxlarge'
|
|
17
|
+
| 'xxxxxlarge';
|
|
12
18
|
themeFontWeight: 'light' | 'regular' | 'semi-bold';
|
|
13
19
|
themeIntent:
|
|
14
20
|
| 'body'
|
|
@@ -330,6 +330,28 @@ exports[`StyledText has xlarge fontSize style 1`] = `
|
|
|
330
330
|
</Text>
|
|
331
331
|
`;
|
|
332
332
|
|
|
333
|
+
exports[`StyledText has xxxlarge fontSize style 1`] = `
|
|
334
|
+
<Text
|
|
335
|
+
style={
|
|
336
|
+
Array [
|
|
337
|
+
Object {
|
|
338
|
+
"color": "#001f23",
|
|
339
|
+
"fontFamily": "BeVietnamPro-Regular",
|
|
340
|
+
"fontSize": 24,
|
|
341
|
+
"letterSpacing": 0.72,
|
|
342
|
+
"lineHeight": 32,
|
|
343
|
+
},
|
|
344
|
+
undefined,
|
|
345
|
+
]
|
|
346
|
+
}
|
|
347
|
+
themeFontSize="xxxlarge"
|
|
348
|
+
themeFontWeight="regular"
|
|
349
|
+
themeIntent="body"
|
|
350
|
+
>
|
|
351
|
+
This is a test
|
|
352
|
+
</Text>
|
|
353
|
+
`;
|
|
354
|
+
|
|
333
355
|
exports[`StyledText has xxxxxlarge fontSize style 1`] = `
|
|
334
356
|
<Text
|
|
335
357
|
style={
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import React
|
|
2
|
-
import {
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ReactNode } from 'react';
|
|
3
|
+
import type {
|
|
3
4
|
TextProps as NativeTextProps,
|
|
4
5
|
StyleProp,
|
|
5
6
|
TextStyle,
|
|
@@ -14,7 +15,13 @@ export interface TextProps extends NativeTextProps {
|
|
|
14
15
|
/**
|
|
15
16
|
* Size of the text.
|
|
16
17
|
*/
|
|
17
|
-
fontSize?:
|
|
18
|
+
fontSize?:
|
|
19
|
+
| 'small'
|
|
20
|
+
| 'medium'
|
|
21
|
+
| 'large'
|
|
22
|
+
| 'xlarge'
|
|
23
|
+
| 'xxxlarge'
|
|
24
|
+
| 'xxxxxlarge';
|
|
18
25
|
/**
|
|
19
26
|
* Font weight of the text.
|
|
20
27
|
*/
|
package/src/index.ts
CHANGED
|
@@ -13,6 +13,7 @@ import Avatar from './components/Avatar';
|
|
|
13
13
|
import Badge from './components/Badge';
|
|
14
14
|
import BottomNavigation from './components/BottomNavigation';
|
|
15
15
|
import BottomSheet from './components/BottomSheet';
|
|
16
|
+
import Box from './components/Box';
|
|
16
17
|
import Button from './components/Button';
|
|
17
18
|
import Calendar from './components/Calendar';
|
|
18
19
|
import Card from './components/Card';
|
|
@@ -56,6 +57,7 @@ export {
|
|
|
56
57
|
Badge,
|
|
57
58
|
BottomNavigation,
|
|
58
59
|
BottomSheet,
|
|
60
|
+
Box,
|
|
59
61
|
Button,
|
|
60
62
|
Calendar,
|
|
61
63
|
Card,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { render
|
|
2
|
+
import { render } from '@testing-library/react-native'; // eslint-disable-line import/no-extraneous-dependencies
|
|
3
3
|
import { ThemeProvider } from '@emotion/react';
|
|
4
|
+
import type { RenderOptions } from '@testing-library/react-native';
|
|
4
5
|
import { theme } from '../index';
|
|
5
6
|
|
|
6
7
|
const renderWithTheme = (ui: JSX.Element, options?: RenderOptions) =>
|
|
@@ -22,6 +22,7 @@ Object {
|
|
|
22
22
|
"divider": "#e8e9ea",
|
|
23
23
|
"error": "#f46363",
|
|
24
24
|
"info": "#b5c3fd",
|
|
25
|
+
"notification": "#ffffff",
|
|
25
26
|
"success": "#5ace7d",
|
|
26
27
|
"warning": "#ffbe71",
|
|
27
28
|
},
|
|
@@ -32,7 +33,10 @@ Object {
|
|
|
32
33
|
"height": 48,
|
|
33
34
|
},
|
|
34
35
|
"space": Object {
|
|
35
|
-
"
|
|
36
|
+
"contentPaddingHorizontal": 12,
|
|
37
|
+
"ctaPadding": 12,
|
|
38
|
+
"iconLeftPadding": 12,
|
|
39
|
+
"textPaddingHorizontal": 12,
|
|
36
40
|
},
|
|
37
41
|
},
|
|
38
42
|
"avatar": Object {
|
|
@@ -54,6 +58,7 @@ Object {
|
|
|
54
58
|
"xxlarge": 32,
|
|
55
59
|
"xxxlarge": 36,
|
|
56
60
|
"xxxxlarge": 48,
|
|
61
|
+
"xxxxxlarge": 60,
|
|
57
62
|
},
|
|
58
63
|
"radii": Object {
|
|
59
64
|
"rounded": 999,
|
|
@@ -66,6 +71,7 @@ Object {
|
|
|
66
71
|
"xxlarge": 64,
|
|
67
72
|
"xxxlarge": 80,
|
|
68
73
|
"xxxxlarge": 96,
|
|
74
|
+
"xxxxxlarge": 136,
|
|
69
75
|
},
|
|
70
76
|
},
|
|
71
77
|
"badge": Object {
|
|
@@ -227,14 +233,13 @@ Object {
|
|
|
227
233
|
},
|
|
228
234
|
"card": Object {
|
|
229
235
|
"colors": Object {
|
|
236
|
+
"archived": "#bfc1c5",
|
|
237
|
+
"danger": "#e3602a",
|
|
230
238
|
"dataCardIndicator": "#8505a2",
|
|
231
|
-
"
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
"success": "#5ace7d",
|
|
236
|
-
"warning": "#ffbe71",
|
|
237
|
-
},
|
|
239
|
+
"info": "#b5c3fd",
|
|
240
|
+
"primary": "#c38cee",
|
|
241
|
+
"success": "#5ace7d",
|
|
242
|
+
"warning": "#ffbe71",
|
|
238
243
|
},
|
|
239
244
|
"radii": Object {
|
|
240
245
|
"default": 12,
|
|
@@ -245,21 +250,24 @@ Object {
|
|
|
245
250
|
},
|
|
246
251
|
"checkbox": Object {
|
|
247
252
|
"borderWidths": Object {
|
|
248
|
-
"
|
|
253
|
+
"icon": 2,
|
|
254
|
+
"wrapper": 1,
|
|
249
255
|
},
|
|
250
256
|
"colors": Object {
|
|
251
|
-
"
|
|
252
|
-
"
|
|
253
|
-
"text": "#ffffff",
|
|
257
|
+
"default": "#001f23",
|
|
258
|
+
"disabledBorder": "#808f91",
|
|
254
259
|
},
|
|
255
260
|
"radii": Object {
|
|
256
|
-
"
|
|
261
|
+
"icon": 4,
|
|
262
|
+
"wrapper": 8,
|
|
257
263
|
},
|
|
258
264
|
"sizes": Object {
|
|
259
|
-
"
|
|
265
|
+
"icon": 20,
|
|
260
266
|
},
|
|
261
267
|
"space": Object {
|
|
262
|
-
"
|
|
268
|
+
"iconDescriptionPadding": 12,
|
|
269
|
+
"iconTop": -3,
|
|
270
|
+
"wrapperPadding": 16,
|
|
263
271
|
},
|
|
264
272
|
},
|
|
265
273
|
"contentNavigator": Object {
|
|
@@ -424,12 +432,6 @@ Object {
|
|
|
424
432
|
},
|
|
425
433
|
"listItemContainerBackground": "#ffffff",
|
|
426
434
|
},
|
|
427
|
-
"offsets": Object {
|
|
428
|
-
"cardShadow": Object {
|
|
429
|
-
"height": 2,
|
|
430
|
-
"width": 0,
|
|
431
|
-
},
|
|
432
|
-
},
|
|
433
435
|
"opacity": Object {
|
|
434
436
|
"cardShadow": 1,
|
|
435
437
|
"disabled": 0.38,
|
|
@@ -440,6 +442,13 @@ Object {
|
|
|
440
442
|
"cardShadow": 4,
|
|
441
443
|
"leadingStatus": 999,
|
|
442
444
|
},
|
|
445
|
+
"shadows": Object {
|
|
446
|
+
"cardElevation": 10,
|
|
447
|
+
"cardOffset": Object {
|
|
448
|
+
"height": 2,
|
|
449
|
+
"width": 0,
|
|
450
|
+
},
|
|
451
|
+
},
|
|
443
452
|
"space": Object {
|
|
444
453
|
"leadingStatusMarginRight": 8,
|
|
445
454
|
"listItemContainerPadding": 16,
|
|
@@ -506,13 +515,7 @@ Object {
|
|
|
506
515
|
"circle": 2,
|
|
507
516
|
},
|
|
508
517
|
"colors": Object {
|
|
509
|
-
"
|
|
510
|
-
"checkedWrapper": "#f3e6f6",
|
|
511
|
-
"circle": "#000000",
|
|
512
|
-
"wrapper": "#ffffff",
|
|
513
|
-
},
|
|
514
|
-
"radii": Object {
|
|
515
|
-
"wrapper": 4,
|
|
518
|
+
"circle": "#001f23",
|
|
516
519
|
},
|
|
517
520
|
"sizes": Object {
|
|
518
521
|
"circle": 20,
|
|
@@ -521,7 +524,6 @@ Object {
|
|
|
521
524
|
"space": Object {
|
|
522
525
|
"circleLeftMargin": 8,
|
|
523
526
|
"groupTopMargin": 4,
|
|
524
|
-
"wrapperPadding": 16,
|
|
525
527
|
},
|
|
526
528
|
},
|
|
527
529
|
"richTextEditor": Object {
|
|
@@ -550,7 +552,7 @@ Object {
|
|
|
550
552
|
},
|
|
551
553
|
"sectionHeading": Object {
|
|
552
554
|
"colors": Object {
|
|
553
|
-
"background": "#
|
|
555
|
+
"background": "#f6f6f7",
|
|
554
556
|
},
|
|
555
557
|
"space": Object {
|
|
556
558
|
"headingHorizontalPadding": 16,
|
|
@@ -577,25 +579,38 @@ Object {
|
|
|
577
579
|
},
|
|
578
580
|
},
|
|
579
581
|
"spinner": Object {
|
|
580
|
-
"
|
|
581
|
-
"
|
|
582
|
+
"colors": Object {
|
|
583
|
+
"dot1": "#795e90",
|
|
584
|
+
"dot2": "#a08cb0",
|
|
585
|
+
"dot3": "#d9d1df",
|
|
586
|
+
"dot4": "#ece8ef",
|
|
582
587
|
},
|
|
583
588
|
"radii": Object {
|
|
584
|
-
"default":
|
|
589
|
+
"default": 999,
|
|
585
590
|
},
|
|
586
591
|
"space": Object {
|
|
587
|
-
"spinnerDot":
|
|
588
|
-
|
|
589
|
-
|
|
592
|
+
"spinnerDot": Object {
|
|
593
|
+
"medium": 16,
|
|
594
|
+
"small": 8,
|
|
595
|
+
},
|
|
596
|
+
"spinnerDotPadding": Object {
|
|
597
|
+
"medium": 8,
|
|
598
|
+
"small": 4,
|
|
599
|
+
},
|
|
600
|
+
"spinnerTextPaddingTop": Object {
|
|
601
|
+
"medium": 8,
|
|
602
|
+
"small": 4,
|
|
603
|
+
},
|
|
590
604
|
},
|
|
591
605
|
},
|
|
592
606
|
"switch": Object {
|
|
593
|
-
"borderWidths": Object {
|
|
594
|
-
"default": 1,
|
|
595
|
-
},
|
|
596
607
|
"colors": Object {
|
|
597
|
-
"
|
|
598
|
-
|
|
608
|
+
"backgroundColors": Object {
|
|
609
|
+
"checked": "#8505a2",
|
|
610
|
+
"disabled-checked": "#c282d1",
|
|
611
|
+
"disabled-unchecked": "#ccced1",
|
|
612
|
+
"unchecked": "#808f91",
|
|
613
|
+
},
|
|
599
614
|
"thumb": "#ffffff",
|
|
600
615
|
},
|
|
601
616
|
"heights": Object {
|
|
@@ -624,8 +639,8 @@ Object {
|
|
|
624
639
|
"headerBottom": 1,
|
|
625
640
|
},
|
|
626
641
|
"colors": Object {
|
|
627
|
-
"active": "#
|
|
628
|
-
"activeBackground": "#
|
|
642
|
+
"active": "#001f23",
|
|
643
|
+
"activeBackground": "#ece8ef",
|
|
629
644
|
"headerBottom": "#e8e9ea",
|
|
630
645
|
"inactive": "#001f23",
|
|
631
646
|
"text": "#001f23",
|
|
@@ -639,6 +654,7 @@ Object {
|
|
|
639
654
|
"space": Object {
|
|
640
655
|
"flatListHorizontalPadding": 8,
|
|
641
656
|
"itemHorizontalPadding": 8,
|
|
657
|
+
"itemMargin": 12,
|
|
642
658
|
"itemVerticalPadding": 8,
|
|
643
659
|
"outlineHorizontalPadding": 8,
|
|
644
660
|
"outlineVerticalPadding": 4,
|
|
@@ -657,12 +673,12 @@ Object {
|
|
|
657
673
|
"defaultBackground": undefined,
|
|
658
674
|
"info": "#4568fb",
|
|
659
675
|
"infoBackground": "#ecf0ff",
|
|
660
|
-
"primary": "#
|
|
661
|
-
"primaryBackground":
|
|
676
|
+
"primary": "#001f23",
|
|
677
|
+
"primaryBackground": undefined,
|
|
662
678
|
"success": "#017d6d",
|
|
663
679
|
"successBackground": "#f0fef4",
|
|
664
680
|
"warning": "#ffa234",
|
|
665
|
-
"warningBackground": "#
|
|
681
|
+
"warningBackground": "#fff6eb",
|
|
666
682
|
},
|
|
667
683
|
"fontSizes": Object {
|
|
668
684
|
"default": 12,
|
|
@@ -772,18 +788,34 @@ Object {
|
|
|
772
788
|
"divider": "#e8e9ea",
|
|
773
789
|
"error": "#f46363",
|
|
774
790
|
"info": "#b5c3fd",
|
|
791
|
+
"notification": "#ffffff",
|
|
792
|
+
"shadow": "#001f23",
|
|
793
|
+
"snackbar": "#001f23",
|
|
775
794
|
"success": "#5ace7d",
|
|
776
795
|
"warning": "#ffbe71",
|
|
777
796
|
},
|
|
778
797
|
"radii": Object {
|
|
779
798
|
"default": 16,
|
|
780
799
|
},
|
|
800
|
+
"shadows": Object {
|
|
801
|
+
"elevation": 4,
|
|
802
|
+
"offset": Object {
|
|
803
|
+
"height": 2,
|
|
804
|
+
"width": 0,
|
|
805
|
+
},
|
|
806
|
+
"opacity": 0.12,
|
|
807
|
+
"radius": 4,
|
|
808
|
+
},
|
|
781
809
|
"sizes": Object {
|
|
782
810
|
"height": 48,
|
|
783
811
|
},
|
|
784
812
|
"space": Object {
|
|
785
|
-
"
|
|
786
|
-
"
|
|
813
|
+
"contentVerticalPadding": 12,
|
|
814
|
+
"ctaPadding": 12,
|
|
815
|
+
"iconLeftPadding": 12,
|
|
816
|
+
"textHorizontalPadding": 12,
|
|
817
|
+
"wrapperHorizontalPadding": 16,
|
|
818
|
+
"wrapperVerticalPadding": 24,
|
|
787
819
|
},
|
|
788
820
|
},
|
|
789
821
|
"toolbar": Object {
|
|
@@ -821,6 +853,7 @@ Object {
|
|
|
821
853
|
"medium": 14,
|
|
822
854
|
"small": 12,
|
|
823
855
|
"xlarge": 18,
|
|
856
|
+
"xxxlarge": 24,
|
|
824
857
|
"xxxxxlarge": 32,
|
|
825
858
|
},
|
|
826
859
|
"fonts": Object {
|
|
@@ -833,6 +866,7 @@ Object {
|
|
|
833
866
|
"medium": 22,
|
|
834
867
|
"small": 20,
|
|
835
868
|
"xlarge": 26,
|
|
869
|
+
"xxxlarge": 32,
|
|
836
870
|
"xxxxxlarge": 40,
|
|
837
871
|
},
|
|
838
872
|
},
|
|
@@ -842,6 +876,23 @@ Object {
|
|
|
842
876
|
"medium": 2,
|
|
843
877
|
},
|
|
844
878
|
"colors": Object {
|
|
879
|
+
"__alpha__globalLabel1": "#de350b",
|
|
880
|
+
"__alpha__globalLabel2": "#ffa234",
|
|
881
|
+
"__alpha__globalLabel3": "#017d6d",
|
|
882
|
+
"__alpha__globalLabel4": "#4568fb",
|
|
883
|
+
"__alpha__globalLabel5": "#737479",
|
|
884
|
+
"__alpha__globalLabel6": "#fcebe7",
|
|
885
|
+
"__alpha__globalLabel7": "#fff6eb",
|
|
886
|
+
"__alpha__globalLabel8": "#f0fef4",
|
|
887
|
+
"__alpha__globalLabel9": "#ecf0ff",
|
|
888
|
+
"__alpha__globalNeutral3": "#f6f6f7",
|
|
889
|
+
"__alpha__globalPrimary": "#001f23",
|
|
890
|
+
"__alpha__globalSecondary1": "#4d6265",
|
|
891
|
+
"__alpha__primary2": "#c38cee",
|
|
892
|
+
"__alpha__secondary1": "#795e90",
|
|
893
|
+
"__alpha__secondary2": "#a08cb0",
|
|
894
|
+
"__alpha__secondary3": "#d9d1df",
|
|
895
|
+
"__alpha__secondary4": "#ece8ef",
|
|
845
896
|
"archived": "#ccced1",
|
|
846
897
|
"archivedBackground": "#f6f6f7",
|
|
847
898
|
"archivedDark": "#737479",
|
|
@@ -882,7 +933,7 @@ Object {
|
|
|
882
933
|
"successLight": "#5ace7d",
|
|
883
934
|
"text": "#001f23",
|
|
884
935
|
"warning": "#ffbe71",
|
|
885
|
-
"warningBackground": "#
|
|
936
|
+
"warningBackground": "#fff6eb",
|
|
886
937
|
"warningDark": "#ffa234",
|
|
887
938
|
"warningLight": "#ffbe71",
|
|
888
939
|
},
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { scale } from '../../utils/scale';
|
|
2
|
-
import { GlobalTheme } from '../global';
|
|
2
|
+
import type { GlobalTheme } from '../global';
|
|
3
3
|
|
|
4
4
|
const getAlertTheme = (theme: GlobalTheme) => {
|
|
5
5
|
const colors = {
|
|
@@ -7,6 +7,7 @@ const getAlertTheme = (theme: GlobalTheme) => {
|
|
|
7
7
|
warning: theme.colors.warning,
|
|
8
8
|
error: theme.colors.dangerLight,
|
|
9
9
|
info: theme.colors.infoLight,
|
|
10
|
+
notification: theme.colors.platformBackground,
|
|
10
11
|
divider: theme.colors.outline,
|
|
11
12
|
};
|
|
12
13
|
|
|
@@ -15,7 +16,10 @@ const getAlertTheme = (theme: GlobalTheme) => {
|
|
|
15
16
|
};
|
|
16
17
|
|
|
17
18
|
const space = {
|
|
18
|
-
|
|
19
|
+
contentPaddingHorizontal: theme.space.smallMedium,
|
|
20
|
+
textPaddingHorizontal: theme.space.smallMedium,
|
|
21
|
+
iconLeftPadding: theme.space.smallMedium,
|
|
22
|
+
ctaPadding: theme.space.smallMedium,
|
|
19
23
|
};
|
|
20
24
|
|
|
21
25
|
const radii = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { GlobalTheme } from '../global';
|
|
1
|
+
import type { GlobalTheme } from '../global';
|
|
2
2
|
|
|
3
3
|
const getAvatarTheme = (theme: GlobalTheme) => {
|
|
4
4
|
const colors = {
|
|
@@ -17,6 +17,7 @@ const getAvatarTheme = (theme: GlobalTheme) => {
|
|
|
17
17
|
xxlarge: theme.space.xlarge * 2,
|
|
18
18
|
xxxlarge: theme.space.xxlarge * 2,
|
|
19
19
|
xxxxlarge: theme.space.xxxlarge * 2,
|
|
20
|
+
xxxxxlarge: theme.space.small * 17,
|
|
20
21
|
};
|
|
21
22
|
|
|
22
23
|
const fontSizes = {
|
|
@@ -27,6 +28,7 @@ const getAvatarTheme = (theme: GlobalTheme) => {
|
|
|
27
28
|
xxlarge: theme.space.medium * 2,
|
|
28
29
|
xxxlarge: theme.space.large * 1.5,
|
|
29
30
|
xxxxlarge: theme.space.xlarge * 1.5,
|
|
31
|
+
xxxxxlarge: theme.space.xxlarge * 1.5,
|
|
30
32
|
};
|
|
31
33
|
|
|
32
34
|
const radii = {
|
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
import { GlobalTheme } from '../global';
|
|
1
|
+
import type { GlobalTheme } from '../global';
|
|
2
2
|
|
|
3
3
|
const getCardTheme = (theme: GlobalTheme) => {
|
|
4
4
|
const colors = {
|
|
5
5
|
dataCardIndicator: theme.colors.primary,
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
},
|
|
6
|
+
primary: theme.colors.__alpha__primary2,
|
|
7
|
+
info: theme.colors.infoLight,
|
|
8
|
+
success: theme.colors.success,
|
|
9
|
+
warning: theme.colors.warning,
|
|
10
|
+
danger: theme.colors.dangerMediumLight,
|
|
11
|
+
archived: theme.colors.archivedLight,
|
|
13
12
|
};
|
|
14
13
|
|
|
15
14
|
const sizes = {
|
|
@@ -1,28 +1,32 @@
|
|
|
1
|
-
import { GlobalTheme } from '../global';
|
|
1
|
+
import type { GlobalTheme } from '../global';
|
|
2
|
+
import { scale } from '../../utils/scale';
|
|
2
3
|
|
|
3
4
|
const getCheckboxTheme = (theme: GlobalTheme) => {
|
|
4
5
|
const colors = {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
disabled: theme.colors.inactiveBackground,
|
|
6
|
+
default: theme.colors.globalPrimary,
|
|
7
|
+
disabledBorder: theme.colors.globalPrimaryLight,
|
|
8
8
|
};
|
|
9
9
|
|
|
10
10
|
const space = {
|
|
11
11
|
// to remove the empty space above the check icon
|
|
12
12
|
// and also to center the check mark
|
|
13
|
-
iconTop: -
|
|
13
|
+
iconTop: -scale(3),
|
|
14
|
+
wrapperPadding: theme.space.medium,
|
|
15
|
+
iconDescriptionPadding: theme.space.smallMedium,
|
|
14
16
|
};
|
|
15
17
|
|
|
16
18
|
const sizes = {
|
|
17
|
-
|
|
19
|
+
icon: scale(20),
|
|
18
20
|
};
|
|
19
21
|
|
|
20
22
|
const radii = {
|
|
21
|
-
|
|
23
|
+
wrapper: theme.radii.medium,
|
|
24
|
+
icon: theme.radii.base,
|
|
22
25
|
};
|
|
23
26
|
|
|
24
27
|
const borderWidths = {
|
|
25
|
-
|
|
28
|
+
wrapper: theme.borderWidths.base,
|
|
29
|
+
icon: theme.borderWidths.medium,
|
|
26
30
|
};
|
|
27
31
|
|
|
28
32
|
return {
|