@hero-design/rn 7.6.1-alpha.0 → 7.8.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/.expo/README.md +15 -0
- package/.expo/packager-info.json +10 -0
- package/.expo/prebuild/cached-packages.json +4 -0
- package/.expo/settings.json +10 -0
- package/.expo/xcodebuild-error.log +2 -0
- package/.expo/xcodebuild.log +11199 -0
- package/.turbo/turbo-build.log +2 -2
- package/.turbo/turbo-publish:npm.log +0 -0
- package/es/index.js +4528 -432
- package/lib/index.js +4616 -516
- package/package.json +6 -8
- package/rollup.config.js +1 -7
- package/src/components/Alert/__tests__/__snapshots__/index.spec.tsx.snap +2 -2
- package/src/components/Avatar/index.tsx +1 -1
- package/src/components/Button/Button.tsx +4 -2
- package/src/components/Button/LoadingIndicator/StyledLoadingIndicator.tsx +7 -2
- package/src/components/Button/LoadingIndicator/__tests__/StyledLoadingIndicator.spec.tsx +2 -0
- package/src/components/Button/LoadingIndicator/__tests__/__snapshots__/StyledLoadingIndicator.spec.tsx.snap +40 -0
- package/src/components/Button/LoadingIndicator/__tests__/__snapshots__/index.spec.tsx.snap +242 -0
- package/src/components/Button/LoadingIndicator/__tests__/index.spec.tsx +2 -0
- package/src/components/Button/LoadingIndicator/index.tsx +3 -1
- package/src/components/Button/StyledButton.tsx +15 -2
- package/src/components/Button/__tests__/Button.spec.tsx +2 -0
- package/src/components/Button/__tests__/StyledButton.spec.tsx +12 -0
- package/src/components/Button/__tests__/__snapshots__/StyledButton.spec.tsx.snap +314 -0
- package/src/components/Card/DataCard/StyledDataCard.tsx +20 -0
- package/src/components/Card/DataCard/__tests__/StyledDataCard.spec.tsx +24 -0
- package/src/components/Card/DataCard/__tests__/__snapshots__/StyledDataCard.spec.tsx.snap +97 -0
- package/src/components/Card/DataCard/__tests__/__snapshots__/index.spec.tsx.snap +156 -0
- package/src/components/Card/DataCard/__tests__/index.spec.tsx +30 -0
- package/src/components/Card/DataCard/index.tsx +35 -0
- package/src/components/Card/index.tsx +7 -2
- package/src/components/Checkbox/StyledCheckbox.tsx +18 -0
- package/src/components/Checkbox/__tests__/StyledCheckbox.spec.tsx +10 -0
- package/src/components/Checkbox/__tests__/__snapshots__/StyledCheckbox.spec.tsx.snap +31 -0
- package/src/components/Checkbox/__tests__/__snapshots__/index.spec.tsx.snap +63 -0
- package/src/components/Checkbox/__tests__/index.spec.tsx +24 -0
- package/src/components/Checkbox/index.tsx +58 -0
- package/src/components/Collapse/index.tsx +1 -1
- package/src/components/Icon/index.tsx +1 -1
- package/src/components/List/BasicListItem.tsx +98 -0
- package/src/components/List/ListItem.tsx +142 -0
- package/src/components/List/StyledBasicListItem.tsx +34 -0
- package/src/components/List/StyledListItem.tsx +82 -0
- package/src/components/List/__tests__/BasicListItem.spec.tsx +37 -0
- package/src/components/List/__tests__/ListItem.spec.tsx +110 -0
- package/src/components/List/__tests__/StyledBasicListItem.spec.tsx +24 -0
- package/src/components/List/__tests__/StyledListItem.spec.tsx +48 -0
- package/src/components/List/__tests__/__snapshots__/BasicListItem.spec.tsx.snap +103 -0
- package/src/components/List/__tests__/__snapshots__/ListItem.spec.tsx.snap +760 -0
- package/src/components/List/__tests__/__snapshots__/StyledBasicListItem.spec.tsx.snap +105 -0
- package/src/components/List/__tests__/__snapshots__/StyledListItem.spec.tsx.snap +200 -0
- package/src/components/List/index.tsx +14 -0
- package/src/components/SectionHeading/index.tsx +1 -1
- package/src/components/Select/Footer.tsx +13 -0
- package/src/components/Select/MultiSelect/Option.tsx +25 -0
- package/src/components/Select/MultiSelect/OptionList.tsx +30 -63
- package/src/components/Select/MultiSelect/__tests__/Option.spec.tsx +16 -0
- package/src/components/Select/MultiSelect/__tests__/OptionList.spec.tsx +42 -0
- package/src/components/Select/MultiSelect/__tests__/__snapshots__/Option.spec.tsx.snap +70 -0
- package/src/components/Select/MultiSelect/__tests__/__snapshots__/OptionList.spec.tsx.snap +627 -0
- package/src/components/Select/MultiSelect/__tests__/index.spec.tsx +6 -6
- package/src/components/Select/MultiSelect/index.tsx +8 -7
- package/src/components/Select/SingleSelect/Option.tsx +23 -0
- package/src/components/Select/SingleSelect/OptionList.tsx +43 -0
- package/src/components/Select/SingleSelect/__tests__/Option.spec.tsx +16 -0
- package/src/components/Select/SingleSelect/__tests__/OptionList.spec.tsx +42 -0
- package/src/components/Select/SingleSelect/__tests__/__snapshots__/Option.spec.tsx.snap +56 -0
- package/src/components/Select/SingleSelect/__tests__/__snapshots__/OptionList.spec.tsx.snap +571 -0
- package/src/components/Select/SingleSelect/__tests__/__snapshots__/index.spec.tsx.snap +1430 -0
- package/src/components/Select/SingleSelect/__tests__/index.spec.tsx +89 -0
- package/src/components/Select/SingleSelect/index.tsx +89 -0
- package/src/components/Select/{MultiSelect/StyledMultiSelect.tsx → StyledSelect.tsx} +1 -1
- package/src/components/Select/{MultiSelect/__tests__/StyledMultiSelect.spec.tsx → __tests__/StyledSelect.spec.tsx} +2 -2
- package/src/components/Select/{MultiSelect/__tests__/__snapshots__/StyledMultiSelect.spec.tsx.snap → __tests__/__snapshots__/StyledSelect.spec.tsx.snap} +0 -0
- package/src/components/Select/helpers.tsx +18 -0
- package/src/components/Select/index.tsx +4 -3
- package/src/components/Select/{MultiSelect/types.ts → types.ts} +0 -0
- package/src/components/Switch/index.tsx +1 -1
- package/src/components/Toast/StyledToast.tsx +65 -0
- package/src/components/Toast/Toast.tsx +123 -0
- package/src/components/Toast/ToastContainer.tsx +88 -0
- package/src/components/Toast/ToastContext.ts +25 -0
- package/src/components/Toast/ToastProvider.tsx +53 -0
- package/src/components/Toast/__tests__/Toast.spec.tsx +125 -0
- package/src/components/Toast/__tests__/ToastContainer.spec.tsx +107 -0
- package/src/components/Toast/__tests__/__snapshots__/Toast.spec.tsx.snap +655 -0
- package/src/components/Toast/__tests__/__snapshots__/ToastContainer.spec.tsx.snap +93 -0
- package/src/components/Toast/index.tsx +11 -0
- package/src/components/Toast/types.ts +70 -0
- package/src/components/Toolbar/StyledToolbar.tsx +42 -0
- package/src/components/Toolbar/ToolbarGroup.tsx +31 -0
- package/src/components/Toolbar/ToolbarItem.tsx +57 -0
- package/src/components/Toolbar/__tests__/ToolbarGroup.spec.tsx +32 -0
- package/src/components/Toolbar/__tests__/ToolbarItem.spec.tsx +57 -0
- package/src/components/Toolbar/__tests__/__snapshots__/ToolbarGroup.spec.tsx.snap +391 -0
- package/src/components/Toolbar/__tests__/__snapshots__/ToolbarItem.spec.tsx.snap +355 -0
- package/src/components/Toolbar/index.tsx +18 -0
- package/src/components/Typography/Text/StyledText.tsx +8 -1
- package/src/components/Typography/Text/__tests__/StyledText.spec.tsx +5 -0
- package/src/components/Typography/Text/__tests__/__snapshots__/StyledText.spec.tsx.snap +110 -0
- package/src/components/Typography/Text/index.tsx +9 -2
- package/src/index.ts +8 -0
- package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +119 -2
- package/src/theme/components/button.ts +2 -0
- package/src/theme/components/card.ts +8 -1
- package/src/theme/components/checkbox.ts +37 -0
- package/src/theme/components/list.ts +46 -0
- package/src/theme/components/toast.ts +33 -0
- package/src/theme/components/toolbar.ts +27 -0
- package/src/theme/components/typography.ts +4 -0
- package/src/theme/global/colors.ts +9 -2
- package/src/theme/global/space.ts +2 -0
- package/src/theme/index.ts +12 -0
- package/tsconfig.json +1 -2
- package/types/components/Alert/StyledAlert.d.ts +0 -0
- package/types/components/Alert/__tests__/index.spec.d.ts +0 -0
- package/types/components/Alert/index.d.ts +0 -0
- package/types/components/Avatar/index.d.ts +1 -1
- package/types/components/Button/Button.d.ts +2 -2
- package/types/components/Button/LoadingIndicator/StyledLoadingIndicator.d.ts +1 -1
- package/types/components/Button/LoadingIndicator/index.d.ts +1 -1
- package/types/components/Button/StyledButton.d.ts +2 -2
- package/{es/components/Card/StyledCard.d.ts → types/components/Card/DataCard/StyledDataCard.d.ts} +5 -6
- package/{es/components/Avatar/__tests__/StyledAvatar.spec.d.ts → types/components/Card/DataCard/__tests__/StyledDataCard.spec.d.ts} +0 -0
- package/{es/components/Avatar → types/components/Card/DataCard}/__tests__/index.spec.d.ts +0 -0
- package/types/components/Card/DataCard/index.d.ts +22 -0
- package/types/components/Card/index.d.ts +7 -3
- package/types/components/Checkbox/StyledCheckbox.d.ts +0 -0
- package/types/components/Checkbox/__tests__/StyledCheckbox.spec.d.ts +0 -0
- package/types/components/Checkbox/__tests__/index.spec.d.ts +0 -0
- package/types/components/Checkbox/index.d.ts +1 -1
- package/types/components/Collapse/index.d.ts +1 -1
- package/types/components/Icon/index.d.ts +1 -1
- package/types/components/List/BasicListItem.d.ts +43 -0
- package/types/components/List/ListItem.d.ts +51 -0
- package/types/components/List/StyledBasicListItem.d.ts +29 -0
- package/types/components/List/StyledListItem.d.ts +51 -0
- package/{es/components/Badge/__tests__/Badge.spec.d.ts → types/components/List/__tests__/BasicListItem.spec.d.ts} +0 -0
- package/{es/components/Badge/__tests__/Status.spec.d.ts → types/components/List/__tests__/ListItem.spec.d.ts} +0 -0
- package/{es/components/BottomNavigation/__tests__/index.spec.d.ts → types/components/List/__tests__/StyledBasicListItem.spec.d.ts} +0 -0
- package/{es/components/Button/__tests__/index.spec.d.ts → types/components/List/__tests__/StyledListItem.spec.d.ts} +0 -0
- package/types/components/List/index.d.ts +8 -0
- package/types/components/Radio/types.d.ts +0 -0
- package/types/components/SectionHeading/__tests__/StyledHeading.spec.d.ts +0 -0
- package/types/components/SectionHeading/index.d.ts +1 -1
- package/types/components/Select/Footer.d.ts +5 -0
- package/types/components/Select/MultiSelect/Footer.d.ts +0 -0
- package/types/components/Select/MultiSelect/Option.d.ts +6 -0
- package/types/components/Select/MultiSelect/OptionList.d.ts +7 -1
- package/types/components/Select/MultiSelect/StyledMultiSelect.d.ts +0 -0
- package/{es/components/Card/__tests__/StyledCard.spec.d.ts → types/components/Select/MultiSelect/__tests__/Option.spec.d.ts} +0 -0
- package/{es/components/Card/__tests__/index.spec.d.ts → types/components/Select/MultiSelect/__tests__/OptionList.spec.d.ts} +0 -0
- package/types/components/Select/MultiSelect/__tests__/StyledMultiSelect.spec.d.ts +0 -0
- package/types/components/Select/MultiSelect/__tests__/index.spec.d.ts +0 -0
- package/types/components/Select/MultiSelect/index.d.ts +4 -4
- package/types/components/Select/MultiSelect/types.d.ts +0 -0
- package/types/components/Select/SingleSelect/Option.d.ts +6 -0
- package/types/components/Select/SingleSelect/OptionList.d.ts +9 -0
- package/{es/components/Collapse/__tests__/StyledCollapse.spec.d.ts → types/components/Select/SingleSelect/__tests__/Option.spec.d.ts} +0 -0
- package/{es/components/Collapse/__tests__/index.spec.d.ts → types/components/Select/SingleSelect/__tests__/OptionList.spec.d.ts} +0 -0
- package/{es/components/Drawer → types/components/Select/SingleSelect}/__tests__/index.spec.d.ts +0 -0
- package/types/components/Select/SingleSelect/index.d.ts +35 -0
- package/types/components/Select/StyledSelect.d.ts +26 -0
- package/{es/components/Divider/__tests__/StyledDivider.spec.d.ts → types/components/Select/__tests__/StyledSelect.spec.d.ts} +0 -0
- package/types/components/Select/helpers.d.ts +2 -0
- package/types/components/Select/index.d.ts +3 -3
- package/types/components/Select/types.d.ts +5 -0
- package/types/components/Switch/StyledSwitch.d.ts +0 -0
- package/types/components/Switch/__tests__/StyledHeading.spec.d.ts +0 -0
- package/types/components/Switch/__tests__/index.spec.d.ts +0 -0
- package/types/components/Switch/index.d.ts +1 -1
- package/types/components/Toast/StyledToast.d.ts +45 -0
- package/types/components/Toast/Toast.d.ts +3 -0
- package/types/components/Toast/ToastContainer.d.ts +5 -0
- package/types/components/Toast/ToastContext.d.ts +11 -0
- package/types/components/Toast/ToastProvider.d.ts +10 -0
- package/{es/components/FAB/__tests__/AnimatedFABIcon.spec.d.ts → types/components/Toast/__tests__/Toast.spec.d.ts} +0 -0
- package/{es/components/FAB/__tests__/StyledFAB.spec.d.ts → types/components/Toast/__tests__/ToastContainer.spec.d.ts} +0 -0
- package/types/components/Toast/index.d.ts +8 -0
- package/types/components/Toast/types.d.ts +67 -0
- package/types/components/Toolbar/StyledToolbar.d.ts +22 -0
- package/types/components/Toolbar/ToolbarGroup.d.ts +13 -0
- package/types/components/Toolbar/ToolbarItem.d.ts +25 -0
- package/{es/components/FAB/__tests__/index.spec.d.ts → types/components/Toolbar/__tests__/ToolbarGroup.spec.d.ts} +0 -0
- package/{es/components/Icon/__tests__/index.spec.d.ts → types/components/Toolbar/__tests__/ToolbarItem.spec.d.ts} +0 -0
- package/types/components/Toolbar/index.d.ts +11 -0
- package/types/components/Typography/Text/StyledText.d.ts +1 -1
- package/types/components/Typography/Text/index.d.ts +2 -2
- package/types/index.d.ts +5 -1
- package/types/theme/components/alert.d.ts +0 -0
- package/types/theme/components/button.d.ts +2 -0
- package/types/theme/components/card.d.ts +7 -0
- package/types/theme/components/checkbox.d.ts +0 -0
- package/types/theme/components/list.d.ts +40 -0
- package/types/theme/components/sectionHeading.d.ts +0 -0
- package/types/theme/components/select.d.ts +0 -0
- package/types/theme/components/switch.d.ts +0 -0
- package/types/theme/components/toast.d.ts +24 -0
- package/types/theme/components/toolbar.d.ts +21 -0
- package/types/theme/components/typography.d.ts +4 -0
- package/types/theme/global/colors.d.ts +5 -0
- package/types/theme/global/index.d.ts +5 -0
- package/types/theme/global/space.d.ts +1 -0
- package/types/theme/index.d.ts +8 -0
- package/.turbo/turbo-build:types.log +0 -2
- package/.turbo/turbo-build:watch.log +0 -1
- package/.turbo/turbo-lint.log +0 -2
- package/.turbo/turbo-type-check.log +0 -2
- package/es/components/Avatar/StyledAvatar.d.ts +0 -46
- package/es/components/Avatar/index.d.ts +0 -25
- package/es/components/Badge/Status.d.ts +0 -24
- package/es/components/Badge/StyledBadge.d.ts +0 -28
- package/es/components/Badge/index.d.ts +0 -32
- package/es/components/BottomNavigation/StyledBottomNavigation.d.ts +0 -52
- package/es/components/BottomNavigation/index.d.ts +0 -45
- package/es/components/Button/IconButton.d.ts +0 -34
- package/es/components/Button/index.d.ts +0 -4
- package/es/components/Card/index.d.ts +0 -22
- package/es/components/Collapse/StyledCollapse.d.ts +0 -15
- package/es/components/Collapse/index.d.ts +0 -23
- package/es/components/Divider/StyledDivider.d.ts +0 -13
- package/es/components/Divider/index.d.ts +0 -21
- package/es/components/Drawer/StyledDrawer.d.ts +0 -25
- package/es/components/Drawer/index.d.ts +0 -25
- package/es/components/FAB/ActionGroup/ActionItem.d.ts +0 -12
- package/es/components/FAB/ActionGroup/StyledActionGroup.d.ts +0 -30
- package/es/components/FAB/ActionGroup/StyledActionItem.d.ts +0 -13
- package/es/components/FAB/ActionGroup/__tests__/index.spec.d.ts +0 -1
- package/es/components/FAB/ActionGroup/index.d.ts +0 -34
- package/es/components/FAB/AnimatedFABIcon.d.ts +0 -6
- package/es/components/FAB/FAB.d.ts +0 -34
- package/es/components/FAB/StyledFAB.d.ts +0 -20
- package/es/components/FAB/index.d.ts +0 -4
- package/es/components/Icon/HeroIcon/index.d.ts +0 -13
- package/es/components/Icon/IconList.d.ts +0 -2
- package/es/components/Icon/index.d.ts +0 -27
- package/es/components/Icon/utils.d.ts +0 -2
- package/es/components/Progress/ProgressBar.d.ts +0 -18
- package/es/components/Progress/ProgressCircle.d.ts +0 -18
- package/es/components/Progress/StyledProgressBar.d.ts +0 -18
- package/es/components/Progress/StyledProgressCircle.d.ts +0 -38
- package/es/components/Progress/index.d.ts +0 -5
- package/es/components/Progress/types.d.ts +0 -1
- package/es/components/Tabs/ActiveTabIndicator.d.ts +0 -8
- package/es/components/Tabs/ScrollableTabs.d.ts +0 -3
- package/es/components/Tabs/StyledScrollableTabs.d.ts +0 -61
- package/es/components/Tabs/StyledTabs.d.ts +0 -55
- package/es/components/Tabs/__tests__/ScrollableTabs.spec.d.ts +0 -1
- package/es/components/Tabs/__tests__/index.spec.d.ts +0 -1
- package/es/components/Tabs/index.d.ts +0 -54
- package/es/components/Tabs/utils.d.ts +0 -2
- package/es/components/Tag/StyledTag.d.ts +0 -20
- package/es/components/Tag/__tests__/Tag.spec.d.ts +0 -1
- package/es/components/Tag/index.d.ts +0 -21
- package/es/components/Typography/Text/StyledText.d.ts +0 -13
- package/es/components/Typography/Text/__tests__/StyledText.spec.d.ts +0 -1
- package/es/components/Typography/Text/__tests__/index.spec.d.ts +0 -1
- package/es/components/Typography/Text/index.d.ts +0 -30
- package/es/components/Typography/index.d.ts +0 -6
- package/es/index.d.ts +0 -19
- package/es/theme/__tests__/index.spec.d.ts +0 -1
- package/es/theme/components/avatar.d.ts +0 -32
- package/es/theme/components/badge.d.ts +0 -29
- package/es/theme/components/bottomNavigation.d.ts +0 -23
- package/es/theme/components/card.d.ts +0 -10
- package/es/theme/components/divider.d.ts +0 -17
- package/es/theme/components/drawer.d.ts +0 -21
- package/es/theme/components/fab.d.ts +0 -51
- package/es/theme/components/icon.d.ts +0 -19
- package/es/theme/components/progress.d.ts +0 -21
- package/es/theme/components/tabs.d.ts +0 -27
- package/es/theme/components/tag.d.ts +0 -30
- package/es/theme/components/typography.d.ts +0 -26
- package/es/theme/global/borders.d.ts +0 -11
- package/es/theme/global/colors.d.ts +0 -29
- package/es/theme/global/index.d.ts +0 -39
- package/es/theme/global/scale.d.ts +0 -9
- package/es/theme/global/space.d.ts +0 -13
- package/es/theme/global/typography.d.ts +0 -21
- package/es/theme/index.d.ts +0 -33
- package/es/types.d.ts +0 -5
- package/es/utils/__tests__/scale.spec.d.ts +0 -1
- package/es/utils/helpers.d.ts +0 -2
- package/es/utils/hooks.d.ts +0 -1
- package/es/utils/scale.d.ts +0 -3
- package/lib/components/Avatar/StyledAvatar.d.ts +0 -46
- package/lib/components/Avatar/__tests__/StyledAvatar.spec.d.ts +0 -1
- package/lib/components/Avatar/__tests__/index.spec.d.ts +0 -1
- package/lib/components/Avatar/index.d.ts +0 -25
- package/lib/components/Badge/Status.d.ts +0 -24
- package/lib/components/Badge/StyledBadge.d.ts +0 -28
- package/lib/components/Badge/__tests__/Badge.spec.d.ts +0 -1
- package/lib/components/Badge/__tests__/Status.spec.d.ts +0 -1
- package/lib/components/Badge/index.d.ts +0 -32
- package/lib/components/BottomNavigation/StyledBottomNavigation.d.ts +0 -52
- package/lib/components/BottomNavigation/__tests__/index.spec.d.ts +0 -1
- package/lib/components/BottomNavigation/index.d.ts +0 -45
- package/lib/components/Button/IconButton.d.ts +0 -34
- package/lib/components/Button/__tests__/index.spec.d.ts +0 -1
- package/lib/components/Button/index.d.ts +0 -4
- package/lib/components/Card/StyledCard.d.ts +0 -17
- package/lib/components/Card/__tests__/StyledCard.spec.d.ts +0 -1
- package/lib/components/Card/__tests__/index.spec.d.ts +0 -1
- package/lib/components/Card/index.d.ts +0 -22
- package/lib/components/Collapse/StyledCollapse.d.ts +0 -15
- package/lib/components/Collapse/__tests__/StyledCollapse.spec.d.ts +0 -1
- package/lib/components/Collapse/__tests__/index.spec.d.ts +0 -1
- package/lib/components/Collapse/index.d.ts +0 -23
- package/lib/components/Divider/StyledDivider.d.ts +0 -13
- package/lib/components/Divider/__tests__/StyledDivider.spec.d.ts +0 -1
- package/lib/components/Divider/index.d.ts +0 -21
- package/lib/components/Drawer/StyledDrawer.d.ts +0 -25
- package/lib/components/Drawer/__tests__/index.spec.d.ts +0 -1
- package/lib/components/Drawer/index.d.ts +0 -25
- package/lib/components/FAB/ActionGroup/ActionItem.d.ts +0 -12
- package/lib/components/FAB/ActionGroup/StyledActionGroup.d.ts +0 -30
- package/lib/components/FAB/ActionGroup/StyledActionItem.d.ts +0 -13
- package/lib/components/FAB/ActionGroup/__tests__/index.spec.d.ts +0 -1
- package/lib/components/FAB/ActionGroup/index.d.ts +0 -34
- package/lib/components/FAB/AnimatedFABIcon.d.ts +0 -6
- package/lib/components/FAB/FAB.d.ts +0 -34
- package/lib/components/FAB/StyledFAB.d.ts +0 -20
- package/lib/components/FAB/__tests__/AnimatedFABIcon.spec.d.ts +0 -1
- package/lib/components/FAB/__tests__/StyledFAB.spec.d.ts +0 -1
- package/lib/components/FAB/__tests__/index.spec.d.ts +0 -1
- package/lib/components/FAB/index.d.ts +0 -4
- package/lib/components/Icon/HeroIcon/index.d.ts +0 -13
- package/lib/components/Icon/IconList.d.ts +0 -2
- package/lib/components/Icon/__tests__/index.spec.d.ts +0 -1
- package/lib/components/Icon/index.d.ts +0 -27
- package/lib/components/Icon/utils.d.ts +0 -2
- package/lib/components/Progress/ProgressBar.d.ts +0 -18
- package/lib/components/Progress/ProgressCircle.d.ts +0 -18
- package/lib/components/Progress/StyledProgressBar.d.ts +0 -18
- package/lib/components/Progress/StyledProgressCircle.d.ts +0 -38
- package/lib/components/Progress/index.d.ts +0 -5
- package/lib/components/Progress/types.d.ts +0 -1
- package/lib/components/Tabs/ActiveTabIndicator.d.ts +0 -8
- package/lib/components/Tabs/ScrollableTabs.d.ts +0 -3
- package/lib/components/Tabs/StyledScrollableTabs.d.ts +0 -61
- package/lib/components/Tabs/StyledTabs.d.ts +0 -55
- package/lib/components/Tabs/__tests__/ScrollableTabs.spec.d.ts +0 -1
- package/lib/components/Tabs/__tests__/index.spec.d.ts +0 -1
- package/lib/components/Tabs/index.d.ts +0 -54
- package/lib/components/Tabs/utils.d.ts +0 -2
- package/lib/components/Tag/StyledTag.d.ts +0 -20
- package/lib/components/Tag/__tests__/Tag.spec.d.ts +0 -1
- package/lib/components/Tag/index.d.ts +0 -21
- package/lib/components/Typography/Text/StyledText.d.ts +0 -13
- package/lib/components/Typography/Text/__tests__/StyledText.spec.d.ts +0 -1
- package/lib/components/Typography/Text/__tests__/index.spec.d.ts +0 -1
- package/lib/components/Typography/Text/index.d.ts +0 -30
- package/lib/components/Typography/index.d.ts +0 -6
- package/lib/index.d.ts +0 -19
- package/lib/theme/__tests__/index.spec.d.ts +0 -1
- package/lib/theme/components/avatar.d.ts +0 -32
- package/lib/theme/components/badge.d.ts +0 -29
- package/lib/theme/components/bottomNavigation.d.ts +0 -23
- package/lib/theme/components/card.d.ts +0 -10
- package/lib/theme/components/divider.d.ts +0 -17
- package/lib/theme/components/drawer.d.ts +0 -21
- package/lib/theme/components/fab.d.ts +0 -51
- package/lib/theme/components/icon.d.ts +0 -19
- package/lib/theme/components/progress.d.ts +0 -21
- package/lib/theme/components/tabs.d.ts +0 -27
- package/lib/theme/components/tag.d.ts +0 -30
- package/lib/theme/components/typography.d.ts +0 -26
- package/lib/theme/global/borders.d.ts +0 -11
- package/lib/theme/global/colors.d.ts +0 -29
- package/lib/theme/global/index.d.ts +0 -39
- package/lib/theme/global/scale.d.ts +0 -9
- package/lib/theme/global/space.d.ts +0 -13
- package/lib/theme/global/typography.d.ts +0 -21
- package/lib/theme/index.d.ts +0 -33
- package/lib/types.d.ts +0 -5
- package/lib/utils/__tests__/scale.spec.d.ts +0 -1
- package/lib/utils/helpers.d.ts +0 -2
- package/lib/utils/hooks.d.ts +0 -1
- package/lib/utils/scale.d.ts +0 -3
- package/playground/.detoxrc.json +0 -49
- package/playground/.prettierrc.json +0 -8
- package/playground/app.json +0 -9
- package/playground/babel.config.js +0 -63
- package/playground/e2e/config.json +0 -9
- package/playground/e2e/environment.js +0 -23
- package/playground/e2e/firstTest.e2e.js +0 -16
- package/playground/expoEntry.js +0 -5
- package/playground/fonts/be-vietnam-pro-light.ttf +0 -0
- package/playground/fonts/be-vietnam-pro-regular.ttf +0 -0
- package/playground/fonts/be-vietnam-pro-semibold.ttf +0 -0
- package/playground/fonts/hero-icons.ttf +0 -0
- package/playground/index.js +0 -7
- package/playground/ios/MobileHeroDesignPlayground/AppDelegate.h +0 -9
- package/playground/ios/MobileHeroDesignPlayground/AppDelegate.m +0 -75
- package/playground/ios/MobileHeroDesignPlayground/Images.xcassets/AppIcon.appiconset/Contents.json +0 -38
- package/playground/ios/MobileHeroDesignPlayground/Images.xcassets/Contents.json +0 -6
- package/playground/ios/MobileHeroDesignPlayground/Images.xcassets/SplashScreenBackground.imageset/Contents.json +0 -21
- package/playground/ios/MobileHeroDesignPlayground/Images.xcassets/SplashScreenBackground.imageset/image.png +0 -0
- package/playground/ios/MobileHeroDesignPlayground/Info.plist +0 -85
- package/playground/ios/MobileHeroDesignPlayground/MobileHeroDesignPlayground-Bridging-Header.h +0 -3
- package/playground/ios/MobileHeroDesignPlayground/MobileHeroDesignPlayground.entitlements +0 -8
- package/playground/ios/MobileHeroDesignPlayground/SplashScreen.storyboard +0 -40
- package/playground/ios/MobileHeroDesignPlayground/Supporting/Expo.plist +0 -16
- package/playground/ios/MobileHeroDesignPlayground/main.m +0 -10
- package/playground/ios/MobileHeroDesignPlayground/noop-file.swift +0 -4
- package/playground/ios/MobileHeroDesignPlayground.xcodeproj/project.pbxproj +0 -515
- package/playground/ios/MobileHeroDesignPlayground.xcodeproj/xcshareddata/xcschemes/MobileHeroDesignPlayground.xcscheme +0 -88
- package/playground/ios/MobileHeroDesignPlayground.xcworkspace/contents.xcworkspacedata +0 -10
- package/playground/ios/MobileHeroDesignPlayground.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -8
- package/playground/ios/Podfile +0 -49
- package/playground/ios/Podfile.lock +0 -478
- package/playground/ios/Podfile.properties.json +0 -3
- package/playground/metro.config.js +0 -24
- package/playground/package.json +0 -63
- package/playground/src/Alert.tsx +0 -80
- package/playground/src/App.tsx +0 -202
- package/playground/src/Avatar.tsx +0 -102
- package/playground/src/Badge.tsx +0 -187
- package/playground/src/BottomNavigation.tsx +0 -72
- package/playground/src/BottomSheet.tsx +0 -43
- package/playground/src/Button.tsx +0 -170
- package/playground/src/Card.tsx +0 -342
- package/playground/src/Collapse.tsx +0 -99
- package/playground/src/ContentNavigator.tsx +0 -58
- package/playground/src/Divider.tsx +0 -13
- package/playground/src/Drawer.tsx +0 -32
- package/playground/src/FAB.tsx +0 -66
- package/playground/src/Icon.tsx +0 -144
- package/playground/src/IconButton.tsx +0 -78
- package/playground/src/MultipleThemes.tsx +0 -34
- package/playground/src/Progress.tsx +0 -95
- package/playground/src/Radio.tsx +0 -25
- package/playground/src/SectionHeading.tsx +0 -68
- package/playground/src/Select.tsx +0 -32
- package/playground/src/Spinner.tsx +0 -19
- package/playground/src/Switch.tsx +0 -80
- package/playground/src/Tabs.tsx +0 -136
- package/playground/src/Tag.tsx +0 -45
- package/playground/src/TextInput.tsx +0 -14
- package/playground/src/Typography.tsx +0 -23
- package/playground/tsconfig.json +0 -21
- package/src/components/Select/MultiSelect/Footer.tsx +0 -15
- package/types/components/SectionHeading/__tests__/StyledHeading.d.ts +0 -1
package/playground/src/App.tsx
DELETED
|
@@ -1,202 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
/* eslint-disable import/no-extraneous-dependencies */
|
|
3
|
-
import { NavigationContainer, DefaultTheme } from '@react-navigation/native';
|
|
4
|
-
import {
|
|
5
|
-
createNativeStackNavigator,
|
|
6
|
-
NativeStackScreenProps,
|
|
7
|
-
} from '@react-navigation/native-stack';
|
|
8
|
-
import { loadAsync } from 'expo-font';
|
|
9
|
-
import { SafeAreaView, FlatList, View, TouchableOpacity } from 'react-native';
|
|
10
|
-
import {
|
|
11
|
-
ThemeProvider,
|
|
12
|
-
theme,
|
|
13
|
-
useTheme,
|
|
14
|
-
Typography,
|
|
15
|
-
Icon,
|
|
16
|
-
Divider,
|
|
17
|
-
} from '@hero-design/rn';
|
|
18
|
-
|
|
19
|
-
import AlertPlayground from './Alert';
|
|
20
|
-
import AvatarPlayground from './Avatar';
|
|
21
|
-
import BadgePlayground from './Badge';
|
|
22
|
-
import BottomNavigation from './BottomNavigation';
|
|
23
|
-
import BottomSheet from './BottomSheet';
|
|
24
|
-
import Button from './Button';
|
|
25
|
-
import CardPlayground from './Card';
|
|
26
|
-
import CollapsePlayground from './Collapse';
|
|
27
|
-
import ContentNavigatorPlayground from './ContentNavigator';
|
|
28
|
-
import DividerPlayground from './Divider';
|
|
29
|
-
import DrawerPlayground from './Drawer';
|
|
30
|
-
import FABPlayground from './FAB';
|
|
31
|
-
import IconPlayground from './Icon';
|
|
32
|
-
import IconButtonPlayground from './IconButton';
|
|
33
|
-
import ProgressPlayground from './Progress';
|
|
34
|
-
import SpinnerPlayground from './Spinner';
|
|
35
|
-
import SectionHeadingPlayground from './SectionHeading';
|
|
36
|
-
import RadioPlayground from './Radio';
|
|
37
|
-
import SelectPlayground from './Select';
|
|
38
|
-
import SwitchPlayground from './Switch';
|
|
39
|
-
import TabsPlayground from './Tabs';
|
|
40
|
-
import TagPlayground from './Tag';
|
|
41
|
-
import TextInputPlayground from './TextInput';
|
|
42
|
-
import TypographyPlayground from './Typography';
|
|
43
|
-
import MultipleThemesPlayground from './MultipleThemes';
|
|
44
|
-
|
|
45
|
-
const heroIconFontPath = require('@hero-design/rn/assets/fonts/hero-icons.ttf');
|
|
46
|
-
const beVietnamProLightFont = require('@hero-design/rn/assets/fonts/be-vietnam-pro-light.ttf');
|
|
47
|
-
const beVietnamProRegularFont = require('@hero-design/rn/assets/fonts/be-vietnam-pro-regular.ttf');
|
|
48
|
-
const beVietnamProSemiBoldFont = require('@hero-design/rn/assets/fonts/be-vietnam-pro-semibold.ttf');
|
|
49
|
-
|
|
50
|
-
type RootStackParamList = {
|
|
51
|
-
Alert: undefined;
|
|
52
|
-
Avatar: undefined;
|
|
53
|
-
Badge: undefined;
|
|
54
|
-
BottomNavigation: undefined;
|
|
55
|
-
BottomSheet: undefined;
|
|
56
|
-
Button: undefined;
|
|
57
|
-
Card: undefined;
|
|
58
|
-
Collapse: undefined;
|
|
59
|
-
ContentNavigator: undefined;
|
|
60
|
-
Divider: undefined;
|
|
61
|
-
Drawer: undefined;
|
|
62
|
-
FAB: undefined;
|
|
63
|
-
Home: undefined;
|
|
64
|
-
Icon: undefined;
|
|
65
|
-
IconButton: undefined;
|
|
66
|
-
Progress: undefined;
|
|
67
|
-
Spinner: undefined;
|
|
68
|
-
Radio: undefined;
|
|
69
|
-
SectionHeading: undefined;
|
|
70
|
-
Select: undefined;
|
|
71
|
-
Switch: undefined;
|
|
72
|
-
Tabs: undefined;
|
|
73
|
-
Tag: undefined;
|
|
74
|
-
TextInput: undefined;
|
|
75
|
-
Typography: undefined;
|
|
76
|
-
MultipleThemes: undefined;
|
|
77
|
-
};
|
|
78
|
-
|
|
79
|
-
type Navigation = NativeStackScreenProps<RootStackParamList>;
|
|
80
|
-
|
|
81
|
-
const Stack = createNativeStackNavigator<RootStackParamList>();
|
|
82
|
-
|
|
83
|
-
const components = [
|
|
84
|
-
{ name: 'Alert', component: AlertPlayground },
|
|
85
|
-
{ name: 'Avatar', component: AvatarPlayground },
|
|
86
|
-
{ name: 'Badge', component: BadgePlayground },
|
|
87
|
-
{ name: 'BottomNavigation', component: BottomNavigation },
|
|
88
|
-
{ name: 'BottomSheet', component: BottomSheet },
|
|
89
|
-
{ name: 'Button', component: Button },
|
|
90
|
-
{ name: 'Card', component: CardPlayground },
|
|
91
|
-
{ name: 'Collapse', component: CollapsePlayground },
|
|
92
|
-
{ name: 'ContentNavigator', component: ContentNavigatorPlayground },
|
|
93
|
-
{ name: 'Divider', component: DividerPlayground },
|
|
94
|
-
{ name: 'Drawer', component: DrawerPlayground },
|
|
95
|
-
{ name: 'FAB', component: FABPlayground },
|
|
96
|
-
{ name: 'Icon', component: IconPlayground },
|
|
97
|
-
{ name: 'IconButton', component: IconButtonPlayground },
|
|
98
|
-
{ name: 'Progress', component: ProgressPlayground },
|
|
99
|
-
{ name: 'Spinner', component: SpinnerPlayground },
|
|
100
|
-
{ name: 'Radio', component: RadioPlayground },
|
|
101
|
-
{ name: 'SectionHeading', component: SectionHeadingPlayground },
|
|
102
|
-
{ name: 'Select', component: SelectPlayground },
|
|
103
|
-
{ name: 'Switch', component: SwitchPlayground },
|
|
104
|
-
{ name: 'Tabs', component: TabsPlayground },
|
|
105
|
-
{ name: 'Tag', component: TagPlayground },
|
|
106
|
-
{ name: 'TextInput', component: TextInputPlayground },
|
|
107
|
-
{ name: 'Typography', component: TypographyPlayground },
|
|
108
|
-
{ name: 'MultipleThemes', component: MultipleThemesPlayground },
|
|
109
|
-
] as const;
|
|
110
|
-
|
|
111
|
-
const ComponentItem = ({ name }: { name: string }): JSX.Element => {
|
|
112
|
-
const hdTheme = useTheme();
|
|
113
|
-
|
|
114
|
-
return (
|
|
115
|
-
<View
|
|
116
|
-
style={{
|
|
117
|
-
flex: 1,
|
|
118
|
-
flexDirection: 'row',
|
|
119
|
-
alignItems: 'center',
|
|
120
|
-
justifyContent: 'space-between',
|
|
121
|
-
marginHorizontal: hdTheme.space.medium,
|
|
122
|
-
marginVertical: hdTheme.space.medium,
|
|
123
|
-
}}
|
|
124
|
-
>
|
|
125
|
-
<Typography.Text fontSize="large">{name}</Typography.Text>
|
|
126
|
-
<Icon
|
|
127
|
-
icon="arrow-right"
|
|
128
|
-
size="small"
|
|
129
|
-
style={{ color: hdTheme.colors.disabledText }}
|
|
130
|
-
/>
|
|
131
|
-
</View>
|
|
132
|
-
);
|
|
133
|
-
};
|
|
134
|
-
|
|
135
|
-
const ComponentList = ({ navigation }: Navigation) => (
|
|
136
|
-
<SafeAreaView>
|
|
137
|
-
<FlatList
|
|
138
|
-
data={components}
|
|
139
|
-
renderItem={({ item }) => (
|
|
140
|
-
<>
|
|
141
|
-
<TouchableOpacity onPress={() => navigation.navigate(item.name)}>
|
|
142
|
-
<ComponentItem name={item.name} />
|
|
143
|
-
</TouchableOpacity>
|
|
144
|
-
<Divider marginHorizontal="small" />
|
|
145
|
-
</>
|
|
146
|
-
)}
|
|
147
|
-
/>
|
|
148
|
-
</SafeAreaView>
|
|
149
|
-
);
|
|
150
|
-
|
|
151
|
-
const App = () => {
|
|
152
|
-
const CustomNavigationTheme = {
|
|
153
|
-
...DefaultTheme,
|
|
154
|
-
colors: {
|
|
155
|
-
...DefaultTheme.colors,
|
|
156
|
-
primary: theme.colors.primary,
|
|
157
|
-
background: theme.colors.platformBackground,
|
|
158
|
-
},
|
|
159
|
-
};
|
|
160
|
-
const [fontsLoaded, setFontsLoaded] = React.useState(false);
|
|
161
|
-
|
|
162
|
-
React.useEffect(() => {
|
|
163
|
-
async function loadFonts() {
|
|
164
|
-
await loadAsync({
|
|
165
|
-
'hero-icons': heroIconFontPath,
|
|
166
|
-
'BeVietnamPro-Light': beVietnamProLightFont,
|
|
167
|
-
'BeVietnamPro-Regular': beVietnamProRegularFont,
|
|
168
|
-
'BeVietnamPro-SemiBold': beVietnamProSemiBoldFont,
|
|
169
|
-
}).catch(console.error);
|
|
170
|
-
|
|
171
|
-
setFontsLoaded(true);
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
loadFonts();
|
|
175
|
-
}, []);
|
|
176
|
-
|
|
177
|
-
if (!fontsLoaded) {
|
|
178
|
-
return null;
|
|
179
|
-
}
|
|
180
|
-
return (
|
|
181
|
-
<ThemeProvider theme={theme}>
|
|
182
|
-
<NavigationContainer theme={CustomNavigationTheme}>
|
|
183
|
-
<Stack.Navigator initialRouteName="Home">
|
|
184
|
-
<Stack.Screen
|
|
185
|
-
name="Home"
|
|
186
|
-
component={ComponentList}
|
|
187
|
-
options={{ title: 'Mobile Hero Design' }}
|
|
188
|
-
/>
|
|
189
|
-
{components.map(component => (
|
|
190
|
-
<Stack.Screen
|
|
191
|
-
key={component.name}
|
|
192
|
-
name={component.name}
|
|
193
|
-
component={component.component}
|
|
194
|
-
/>
|
|
195
|
-
))}
|
|
196
|
-
</Stack.Navigator>
|
|
197
|
-
</NavigationContainer>
|
|
198
|
-
</ThemeProvider>
|
|
199
|
-
);
|
|
200
|
-
};
|
|
201
|
-
|
|
202
|
-
export default App;
|
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Alert, View } from 'react-native';
|
|
3
|
-
import { Avatar, Typography, useTheme } from '@hero-design/rn';
|
|
4
|
-
|
|
5
|
-
const AvatarPlayground = () => {
|
|
6
|
-
const theme = useTheme();
|
|
7
|
-
const source = { uri: 'https://i.pravatar.cc/300' };
|
|
8
|
-
const text = 'MD';
|
|
9
|
-
|
|
10
|
-
const createTwoButtonAlert = () =>
|
|
11
|
-
Alert.alert('Alert Title', 'My Alert Msg', [
|
|
12
|
-
{
|
|
13
|
-
text: 'Cancel',
|
|
14
|
-
onPress: () => {},
|
|
15
|
-
style: 'cancel',
|
|
16
|
-
},
|
|
17
|
-
{ text: 'OK', onPress: () => {} },
|
|
18
|
-
]);
|
|
19
|
-
|
|
20
|
-
return (
|
|
21
|
-
<View
|
|
22
|
-
style={{
|
|
23
|
-
marginVertical: theme.space.medium,
|
|
24
|
-
marginHorizontal: theme.space.medium,
|
|
25
|
-
}}
|
|
26
|
-
>
|
|
27
|
-
<Typography.Text style={{ marginBottom: theme.space.xsmall }}>
|
|
28
|
-
Avatar with different sizes
|
|
29
|
-
</Typography.Text>
|
|
30
|
-
<View
|
|
31
|
-
style={{
|
|
32
|
-
flexDirection: 'row',
|
|
33
|
-
marginBottom: theme.space.large,
|
|
34
|
-
alignItems: 'flex-end',
|
|
35
|
-
}}
|
|
36
|
-
>
|
|
37
|
-
<Avatar source={source} />
|
|
38
|
-
<Avatar
|
|
39
|
-
source={source}
|
|
40
|
-
size="medium"
|
|
41
|
-
style={{ marginLeft: theme.space.xsmall }}
|
|
42
|
-
/>
|
|
43
|
-
<Avatar
|
|
44
|
-
source={source}
|
|
45
|
-
size="large"
|
|
46
|
-
style={{ marginLeft: theme.space.xsmall }}
|
|
47
|
-
/>
|
|
48
|
-
<Avatar
|
|
49
|
-
source={source}
|
|
50
|
-
size="xlarge"
|
|
51
|
-
style={{ marginLeft: theme.space.xsmall }}
|
|
52
|
-
/>
|
|
53
|
-
</View>
|
|
54
|
-
|
|
55
|
-
<Typography.Text style={{ marginBottom: theme.space.xsmall }}>
|
|
56
|
-
Text Avatar with different sizes
|
|
57
|
-
</Typography.Text>
|
|
58
|
-
<View
|
|
59
|
-
style={{
|
|
60
|
-
flexDirection: 'row',
|
|
61
|
-
marginBottom: theme.space.large,
|
|
62
|
-
alignItems: 'flex-end',
|
|
63
|
-
}}
|
|
64
|
-
>
|
|
65
|
-
<Avatar title={text} />
|
|
66
|
-
<Avatar
|
|
67
|
-
title={text}
|
|
68
|
-
size="medium"
|
|
69
|
-
intent="info"
|
|
70
|
-
style={{ marginLeft: theme.space.xsmall }}
|
|
71
|
-
/>
|
|
72
|
-
<Avatar
|
|
73
|
-
title={text}
|
|
74
|
-
size="large"
|
|
75
|
-
intent="success"
|
|
76
|
-
style={{ marginLeft: theme.space.xsmall }}
|
|
77
|
-
/>
|
|
78
|
-
<Avatar
|
|
79
|
-
title={text}
|
|
80
|
-
size="xlarge"
|
|
81
|
-
intent="danger"
|
|
82
|
-
style={{ marginLeft: theme.space.xsmall }}
|
|
83
|
-
/>
|
|
84
|
-
</View>
|
|
85
|
-
|
|
86
|
-
<Typography.Text style={{ marginBottom: theme.space.xsmall }}>
|
|
87
|
-
Pressable avatar
|
|
88
|
-
</Typography.Text>
|
|
89
|
-
<View
|
|
90
|
-
style={{
|
|
91
|
-
flexDirection: 'row',
|
|
92
|
-
marginBottom: theme.space.large,
|
|
93
|
-
alignItems: 'flex-end',
|
|
94
|
-
}}
|
|
95
|
-
>
|
|
96
|
-
<Avatar source={source} onPress={createTwoButtonAlert} size="large" />
|
|
97
|
-
</View>
|
|
98
|
-
</View>
|
|
99
|
-
);
|
|
100
|
-
};
|
|
101
|
-
|
|
102
|
-
export default AvatarPlayground;
|
package/playground/src/Badge.tsx
DELETED
|
@@ -1,187 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Button, View } from 'react-native';
|
|
3
|
-
import { Badge, Icon, Typography, useTheme } from '@hero-design/rn';
|
|
4
|
-
|
|
5
|
-
const BadgePlayground = () => {
|
|
6
|
-
const theme = useTheme();
|
|
7
|
-
const [isVisibleBadge, setIsVisibleBadge] = React.useState(true);
|
|
8
|
-
const [isVisibleStatusBadge, setIsVisibleStatusBadge] = React.useState(true);
|
|
9
|
-
|
|
10
|
-
return (
|
|
11
|
-
<View style={{ margin: theme.space.medium }}>
|
|
12
|
-
<Typography.Text fontWeight="semi-bold">Standalone</Typography.Text>
|
|
13
|
-
<Typography.Text style={{ marginBottom: theme.space.xsmall }}>
|
|
14
|
-
Text
|
|
15
|
-
</Typography.Text>
|
|
16
|
-
<View
|
|
17
|
-
style={{
|
|
18
|
-
display: 'flex',
|
|
19
|
-
flexDirection: 'row',
|
|
20
|
-
marginBottom: theme.space.small,
|
|
21
|
-
}}
|
|
22
|
-
>
|
|
23
|
-
<Badge
|
|
24
|
-
content="APPROVED"
|
|
25
|
-
intent="success"
|
|
26
|
-
style={{ marginEnd: theme.space.small }}
|
|
27
|
-
/>
|
|
28
|
-
<Badge
|
|
29
|
-
content="PENDING"
|
|
30
|
-
intent="warning"
|
|
31
|
-
style={{ marginEnd: theme.space.small }}
|
|
32
|
-
/>
|
|
33
|
-
</View>
|
|
34
|
-
<View
|
|
35
|
-
style={{
|
|
36
|
-
display: 'flex',
|
|
37
|
-
flexDirection: 'row',
|
|
38
|
-
marginBottom: theme.space.small,
|
|
39
|
-
}}
|
|
40
|
-
>
|
|
41
|
-
<Badge
|
|
42
|
-
content="DECLINED"
|
|
43
|
-
intent="danger"
|
|
44
|
-
style={{ marginEnd: theme.space.small }}
|
|
45
|
-
/>
|
|
46
|
-
<Badge
|
|
47
|
-
content="SUBMITTED"
|
|
48
|
-
intent="info"
|
|
49
|
-
style={{ marginEnd: theme.space.small }}
|
|
50
|
-
/>
|
|
51
|
-
<Badge
|
|
52
|
-
content="ARCHIVED"
|
|
53
|
-
intent="archived"
|
|
54
|
-
style={{ marginEnd: theme.space.small }}
|
|
55
|
-
/>
|
|
56
|
-
</View>
|
|
57
|
-
|
|
58
|
-
<Typography.Text style={{ marginBottom: theme.space.xsmall }}>
|
|
59
|
-
Number
|
|
60
|
-
</Typography.Text>
|
|
61
|
-
<View
|
|
62
|
-
style={{
|
|
63
|
-
display: 'flex',
|
|
64
|
-
flexDirection: 'row',
|
|
65
|
-
marginBottom: theme.space.small,
|
|
66
|
-
}}
|
|
67
|
-
>
|
|
68
|
-
<Badge content={9} style={{ marginEnd: theme.space.small }} />
|
|
69
|
-
<Badge content={99} style={{ marginEnd: theme.space.small }} />
|
|
70
|
-
<Badge content={100} />
|
|
71
|
-
</View>
|
|
72
|
-
<View
|
|
73
|
-
style={{
|
|
74
|
-
display: 'flex',
|
|
75
|
-
flexDirection: 'row',
|
|
76
|
-
marginBottom: theme.space.large,
|
|
77
|
-
}}
|
|
78
|
-
>
|
|
79
|
-
<Badge
|
|
80
|
-
content={9}
|
|
81
|
-
style={{ marginEnd: theme.space.small }}
|
|
82
|
-
intent="success"
|
|
83
|
-
/>
|
|
84
|
-
<Badge
|
|
85
|
-
content={9}
|
|
86
|
-
max={5}
|
|
87
|
-
style={{ marginEnd: theme.space.small }}
|
|
88
|
-
intent="warning"
|
|
89
|
-
/>
|
|
90
|
-
<Badge
|
|
91
|
-
content={90}
|
|
92
|
-
max={80}
|
|
93
|
-
intent="danger"
|
|
94
|
-
style={{ marginEnd: theme.space.small }}
|
|
95
|
-
/>
|
|
96
|
-
<Badge
|
|
97
|
-
content={99}
|
|
98
|
-
intent="info"
|
|
99
|
-
style={{ marginEnd: theme.space.small }}
|
|
100
|
-
/>
|
|
101
|
-
<Badge max={999} content={1000} intent="archived" />
|
|
102
|
-
</View>
|
|
103
|
-
<Typography.Text style={{ marginBottom: theme.space.xsmall }}>
|
|
104
|
-
Visible Badge
|
|
105
|
-
</Typography.Text>
|
|
106
|
-
<View
|
|
107
|
-
style={{
|
|
108
|
-
display: 'flex',
|
|
109
|
-
flexDirection: 'row',
|
|
110
|
-
marginBottom: theme.space.large,
|
|
111
|
-
}}
|
|
112
|
-
>
|
|
113
|
-
<View
|
|
114
|
-
style={{
|
|
115
|
-
display: 'flex',
|
|
116
|
-
flexDirection: 'row',
|
|
117
|
-
alignItems: 'center',
|
|
118
|
-
marginEnd: theme.space.medium,
|
|
119
|
-
}}
|
|
120
|
-
>
|
|
121
|
-
<Typography.Text style={{ marginEnd: theme.space.small }}>
|
|
122
|
-
Notes
|
|
123
|
-
</Typography.Text>
|
|
124
|
-
<Badge content={1} intent="archived" visible={isVisibleBadge} />
|
|
125
|
-
</View>
|
|
126
|
-
<Button
|
|
127
|
-
title="Click"
|
|
128
|
-
onPress={() => setIsVisibleBadge(visible => !visible)}
|
|
129
|
-
/>
|
|
130
|
-
</View>
|
|
131
|
-
|
|
132
|
-
<Typography.Text fontWeight="semi-bold">Status</Typography.Text>
|
|
133
|
-
<View
|
|
134
|
-
style={{
|
|
135
|
-
display: 'flex',
|
|
136
|
-
flexDirection: 'row',
|
|
137
|
-
marginBottom: theme.space.small,
|
|
138
|
-
}}
|
|
139
|
-
>
|
|
140
|
-
<Badge.Status style={{ marginEnd: theme.space.small }}>
|
|
141
|
-
<Icon icon="bell" size="small" />
|
|
142
|
-
</Badge.Status>
|
|
143
|
-
<Badge.Status intent="warning" style={{ marginEnd: theme.space.small }}>
|
|
144
|
-
<Icon icon="bell" size="small" />
|
|
145
|
-
</Badge.Status>
|
|
146
|
-
<Badge.Status intent="info" style={{ marginEnd: theme.space.small }}>
|
|
147
|
-
<Icon icon="bell" size="small" />
|
|
148
|
-
</Badge.Status>
|
|
149
|
-
<Badge.Status intent="success" style={{ marginEnd: theme.space.small }}>
|
|
150
|
-
<Icon icon="bell" size="small" />
|
|
151
|
-
</Badge.Status>
|
|
152
|
-
<Badge.Status
|
|
153
|
-
intent="archived"
|
|
154
|
-
style={{ marginEnd: theme.space.small }}
|
|
155
|
-
>
|
|
156
|
-
<Icon icon="bell" size="small" />
|
|
157
|
-
</Badge.Status>
|
|
158
|
-
<Badge.Status style={{ marginEnd: theme.space.small }}>
|
|
159
|
-
<Typography.Text>Activity</Typography.Text>
|
|
160
|
-
</Badge.Status>
|
|
161
|
-
</View>
|
|
162
|
-
<Typography.Text style={{ marginBottom: theme.space.xsmall }}>
|
|
163
|
-
Visible Status Badge
|
|
164
|
-
</Typography.Text>
|
|
165
|
-
<View
|
|
166
|
-
style={{
|
|
167
|
-
display: 'flex',
|
|
168
|
-
flexDirection: 'row',
|
|
169
|
-
alignItems: 'center',
|
|
170
|
-
}}
|
|
171
|
-
>
|
|
172
|
-
<Badge.Status
|
|
173
|
-
visible={isVisibleStatusBadge}
|
|
174
|
-
style={{ marginEnd: theme.space.small }}
|
|
175
|
-
>
|
|
176
|
-
<Typography.Text>Activity</Typography.Text>
|
|
177
|
-
</Badge.Status>
|
|
178
|
-
<Button
|
|
179
|
-
title="Click"
|
|
180
|
-
onPress={() => setIsVisibleStatusBadge(visible => !visible)}
|
|
181
|
-
/>
|
|
182
|
-
</View>
|
|
183
|
-
</View>
|
|
184
|
-
);
|
|
185
|
-
};
|
|
186
|
-
|
|
187
|
-
export default BadgePlayground;
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { View } from 'react-native';
|
|
3
|
-
import {
|
|
4
|
-
BottomNavigation,
|
|
5
|
-
Typography,
|
|
6
|
-
BottomNavigationTabType,
|
|
7
|
-
} from '@hero-design/rn';
|
|
8
|
-
|
|
9
|
-
const HomeScreen = () => (
|
|
10
|
-
<View style={{ flex: 1, justifyContent: 'center', alignItems: 'center' }}>
|
|
11
|
-
<Typography.Text>Home Screen</Typography.Text>
|
|
12
|
-
</View>
|
|
13
|
-
);
|
|
14
|
-
|
|
15
|
-
const FeedScreen = () => (
|
|
16
|
-
<View style={{ flex: 1, justifyContent: 'center', alignItems: 'center' }}>
|
|
17
|
-
<Typography.Text>Feed Screen</Typography.Text>
|
|
18
|
-
</View>
|
|
19
|
-
);
|
|
20
|
-
|
|
21
|
-
const AlertsScreen = () => (
|
|
22
|
-
<View style={{ flex: 1, justifyContent: 'center', alignItems: 'center' }}>
|
|
23
|
-
<Typography.Text>Alerts Screen</Typography.Text>
|
|
24
|
-
</View>
|
|
25
|
-
);
|
|
26
|
-
|
|
27
|
-
const ProfileScreen = () => (
|
|
28
|
-
<View style={{ flex: 1, justifyContent: 'center', alignItems: 'center' }}>
|
|
29
|
-
<Typography.Text>Profile Screen</Typography.Text>
|
|
30
|
-
</View>
|
|
31
|
-
);
|
|
32
|
-
|
|
33
|
-
const tabs: BottomNavigationTabType[] = [
|
|
34
|
-
{
|
|
35
|
-
key: 'home',
|
|
36
|
-
title: 'Home',
|
|
37
|
-
icon: 'home',
|
|
38
|
-
component: <HomeScreen />,
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
key: 'feed',
|
|
42
|
-
title: 'Feed',
|
|
43
|
-
icon: 'speaker',
|
|
44
|
-
component: <FeedScreen />,
|
|
45
|
-
},
|
|
46
|
-
{
|
|
47
|
-
key: 'alerts',
|
|
48
|
-
title: 'Alerts',
|
|
49
|
-
icon: 'bell',
|
|
50
|
-
component: <AlertsScreen />,
|
|
51
|
-
},
|
|
52
|
-
{
|
|
53
|
-
key: 'profile',
|
|
54
|
-
title: 'Profile',
|
|
55
|
-
icon: 'user',
|
|
56
|
-
component: <ProfileScreen />,
|
|
57
|
-
},
|
|
58
|
-
];
|
|
59
|
-
|
|
60
|
-
const BottomNavigationPlayground = () => {
|
|
61
|
-
const [selectedTabKey, setSelectedTabKey] = React.useState('home');
|
|
62
|
-
|
|
63
|
-
return (
|
|
64
|
-
<BottomNavigation
|
|
65
|
-
onTabPress={newTabKey => setSelectedTabKey(newTabKey)}
|
|
66
|
-
selectedTabKey={selectedTabKey}
|
|
67
|
-
tabs={tabs}
|
|
68
|
-
/>
|
|
69
|
-
);
|
|
70
|
-
};
|
|
71
|
-
|
|
72
|
-
export default BottomNavigationPlayground;
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import React, { useState } from 'react';
|
|
2
|
-
import { View, Button } from 'react-native';
|
|
3
|
-
|
|
4
|
-
import { BottomSheet, Typography, useTheme } from '@hero-design/rn';
|
|
5
|
-
|
|
6
|
-
const Content = () => {
|
|
7
|
-
const theme = useTheme();
|
|
8
|
-
|
|
9
|
-
return (
|
|
10
|
-
<View style={{ padding: theme.space.medium }}>
|
|
11
|
-
<Typography.Text>Sheet Content</Typography.Text>
|
|
12
|
-
<Typography.Text>Sheet Content</Typography.Text>
|
|
13
|
-
<Typography.Text>Sheet Content</Typography.Text>
|
|
14
|
-
<Typography.Text>Sheet Content</Typography.Text>
|
|
15
|
-
<Typography.Text>Sheet Content</Typography.Text>
|
|
16
|
-
<Typography.Text>Sheet Content</Typography.Text>
|
|
17
|
-
<Typography.Text>Sheet Content</Typography.Text>
|
|
18
|
-
<Typography.Text>Sheet Content</Typography.Text>
|
|
19
|
-
<Typography.Text>Sheet Content</Typography.Text>
|
|
20
|
-
<Typography.Text>Sheet Content</Typography.Text>
|
|
21
|
-
</View>
|
|
22
|
-
);
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
const BottomSheetPlayground = (): JSX.Element => {
|
|
26
|
-
const [visible, setVisiblity] = useState(false);
|
|
27
|
-
|
|
28
|
-
return (
|
|
29
|
-
<View style={{ flex: 1, alignItems: 'center' }}>
|
|
30
|
-
<Button title="Toggle Bottom Sheet" onPress={() => setVisiblity(true)} />
|
|
31
|
-
<BottomSheet
|
|
32
|
-
open={visible}
|
|
33
|
-
header="Title"
|
|
34
|
-
footer={<Button title="Close" onPress={() => setVisiblity(false)} />}
|
|
35
|
-
onRequestClose={() => setVisiblity(false)}
|
|
36
|
-
>
|
|
37
|
-
<Content />
|
|
38
|
-
</BottomSheet>
|
|
39
|
-
</View>
|
|
40
|
-
);
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
export default BottomSheetPlayground;
|