@hero-design/rn 7.3.2 → 7.6.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/assets/fonts/hero-icons.ttf +0 -0
- package/es/index.js +7093 -5663
- package/lib/assets/fonts/hero-icons.ttf +0 -0
- package/lib/index.js +7101 -5662
- package/package.json +11 -9
- package/playground/.detoxrc.json +49 -0
- package/playground/.prettierrc.json +8 -0
- package/playground/.turbo/turbo-type-check.log +7 -0
- package/playground/app.json +9 -0
- package/playground/babel.config.js +63 -0
- package/playground/e2e/config.json +9 -0
- package/playground/e2e/environment.js +23 -0
- package/playground/e2e/firstTest.e2e.js +16 -0
- package/{expoEntry.js → playground/expoEntry.js} +1 -1
- 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 +7 -0
- package/playground/ios/MobileHeroDesignPlayground/AppDelegate.h +9 -0
- package/playground/ios/MobileHeroDesignPlayground/AppDelegate.m +75 -0
- package/playground/ios/MobileHeroDesignPlayground/Images.xcassets/AppIcon.appiconset/Contents.json +38 -0
- package/playground/ios/MobileHeroDesignPlayground/Images.xcassets/Contents.json +6 -0
- package/playground/ios/MobileHeroDesignPlayground/Images.xcassets/SplashScreenBackground.imageset/Contents.json +21 -0
- package/playground/ios/MobileHeroDesignPlayground/Images.xcassets/SplashScreenBackground.imageset/image.png +0 -0
- package/playground/ios/MobileHeroDesignPlayground/Info.plist +85 -0
- package/playground/ios/MobileHeroDesignPlayground/MobileHeroDesignPlayground-Bridging-Header.h +3 -0
- package/playground/ios/MobileHeroDesignPlayground/MobileHeroDesignPlayground.entitlements +8 -0
- package/playground/ios/MobileHeroDesignPlayground/SplashScreen.storyboard +40 -0
- package/playground/ios/MobileHeroDesignPlayground/Supporting/Expo.plist +16 -0
- package/playground/ios/MobileHeroDesignPlayground/main.m +10 -0
- package/playground/ios/MobileHeroDesignPlayground/noop-file.swift +4 -0
- package/playground/ios/MobileHeroDesignPlayground.xcodeproj/project.pbxproj +515 -0
- package/playground/ios/MobileHeroDesignPlayground.xcodeproj/xcshareddata/xcschemes/MobileHeroDesignPlayground.xcscheme +88 -0
- package/playground/ios/MobileHeroDesignPlayground.xcworkspace/contents.xcworkspacedata +10 -0
- package/playground/ios/MobileHeroDesignPlayground.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
- package/playground/ios/Podfile +49 -0
- package/playground/ios/Podfile.lock +478 -0
- package/playground/ios/Podfile.properties.json +3 -0
- package/{metro.config.js → playground/metro.config.js} +10 -2
- package/playground/package.json +63 -0
- package/playground/src/Alert.tsx +80 -0
- package/playground/{index.tsx → src/App.tsx} +69 -29
- package/playground/{components → src}/Avatar.tsx +1 -1
- package/playground/{components → src}/Badge.tsx +1 -1
- package/playground/{components → src}/BottomNavigation.tsx +1 -1
- package/playground/src/BottomSheet.tsx +43 -0
- package/playground/{components → src}/Button.tsx +1 -1
- package/playground/{components → src}/Card.tsx +1 -1
- package/playground/{components → src}/Collapse.tsx +1 -1
- package/playground/src/ContentNavigator.tsx +58 -0
- package/playground/{components → src}/Divider.tsx +1 -1
- package/playground/{components → src}/Drawer.tsx +1 -1
- package/playground/{components → src}/FAB.tsx +1 -1
- package/playground/{components → src}/Icon.tsx +7 -3
- package/playground/{components → src}/IconButton.tsx +12 -1
- package/playground/src/MultipleThemes.tsx +34 -0
- package/playground/{components → src}/Progress.tsx +1 -1
- package/playground/src/Radio.tsx +25 -0
- package/playground/src/SectionHeading.tsx +68 -0
- package/playground/src/Select.tsx +32 -0
- package/playground/src/Spinner.tsx +19 -0
- package/playground/src/Switch.tsx +80 -0
- package/playground/{components → src}/Tabs.tsx +1 -1
- package/playground/{components → src}/Tag.tsx +1 -1
- package/playground/src/TextInput.tsx +14 -0
- package/playground/{components → src}/Typography.tsx +1 -1
- package/playground/src/emotion.d.ts +7 -0
- package/playground/tsconfig.json +21 -0
- package/src/components/Alert/StyledAlert.tsx +48 -0
- package/src/components/Alert/__tests__/__snapshots__/index.spec.tsx.snap +686 -0
- package/src/components/Alert/__tests__/index.spec.tsx +83 -0
- package/src/components/Alert/index.tsx +109 -0
- package/src/components/BottomSheet/Footer.tsx +19 -0
- package/src/components/BottomSheet/Header.tsx +49 -0
- package/src/components/BottomSheet/StyledBottomSheet.tsx +75 -0
- package/src/components/BottomSheet/__tests__/__snapshots__/index.spec.tsx.snap +531 -0
- package/src/components/BottomSheet/__tests__/index.spec.tsx +107 -0
- package/src/components/BottomSheet/index.tsx +177 -0
- package/src/components/Button/IconButton.tsx +11 -1
- package/src/components/Collapse/StyledCollapse.tsx +11 -2
- package/src/components/Collapse/__tests__/__snapshots__/index.spec.tsx.snap +36 -31
- package/src/components/Collapse/__tests__/index.spec.tsx +1 -13
- package/src/components/Collapse/index.tsx +20 -50
- package/src/components/ContentNavigator/StyledContentNavigator.tsx +15 -0
- package/src/components/ContentNavigator/__tests__/StyledContentNavigator.spec.tsx +19 -0
- package/src/components/ContentNavigator/__tests__/__snapshots__/StyledContentNavigator.spec.tsx.snap +43 -0
- package/src/components/ContentNavigator/__tests__/__snapshots__/index.spec.tsx.snap +217 -0
- package/src/components/ContentNavigator/__tests__/index.spec.tsx +74 -0
- package/src/components/ContentNavigator/index.tsx +65 -0
- package/src/components/Icon/HeroIcon/index.tsx +13 -2
- package/src/components/Icon/HeroIcon/selection.json +1 -1
- package/src/components/Icon/IconList.ts +8 -0
- package/src/components/Icon/index.tsx +8 -1
- package/src/components/Radio/Radio.tsx +51 -0
- package/src/components/Radio/RadioGroup.tsx +74 -0
- package/src/components/Radio/StyledRadio.tsx +42 -0
- package/src/components/Radio/__tests__/Radio.spec.tsx +38 -0
- package/src/components/Radio/__tests__/RadioGroup.spec.tsx +36 -0
- package/src/components/Radio/__tests__/StyledRadio.spec.tsx +43 -0
- package/src/components/Radio/__tests__/__snapshots__/Radio.spec.tsx.snap +160 -0
- package/src/components/Radio/__tests__/__snapshots__/RadioGroup.spec.tsx.snap +248 -0
- package/src/components/Radio/__tests__/__snapshots__/StyledRadio.spec.tsx.snap +124 -0
- package/src/components/Radio/index.tsx +5 -0
- package/src/components/Radio/types.ts +1 -0
- package/src/components/SectionHeading/StyledHeading.tsx +24 -0
- package/src/components/SectionHeading/__tests__/StyledHeading.spec.tsx +28 -0
- package/src/components/SectionHeading/__tests__/__snapshots__/StyledHeading.spec.tsx.snap +48 -0
- package/src/components/SectionHeading/__tests__/__snapshots__/index.spec.tsx.snap +208 -0
- package/src/components/SectionHeading/__tests__/index.spec.tsx +39 -0
- package/src/components/SectionHeading/index.tsx +93 -0
- package/src/components/Select/MultiSelect/Footer.tsx +15 -0
- package/src/components/Select/MultiSelect/OptionList.tsx +76 -0
- package/src/components/Select/MultiSelect/StyledMultiSelect.tsx +30 -0
- package/src/components/Select/MultiSelect/__tests__/StyledMultiSelect.spec.tsx +49 -0
- package/src/components/Select/MultiSelect/__tests__/__snapshots__/StyledMultiSelect.spec.tsx.snap +108 -0
- package/src/components/Select/MultiSelect/__tests__/__snapshots__/index.spec.tsx.snap +1630 -0
- package/src/components/Select/MultiSelect/__tests__/index.spec.tsx +94 -0
- package/src/components/Select/MultiSelect/index.tsx +103 -0
- package/src/components/Select/MultiSelect/types.ts +1 -0
- package/src/components/Select/index.tsx +5 -0
- package/src/components/Spinner/AnimatedSpinner.tsx +55 -0
- package/src/components/Spinner/StyledSpinner.tsx +59 -0
- package/src/components/Spinner/__tests__/AnimatedSpinner.spec.tsx +11 -0
- package/src/components/Spinner/__tests__/StyledSpinner.spec.tsx +56 -0
- package/src/components/Spinner/__tests__/__snapshots__/AnimatedSpinner.spec.tsx.snap +118 -0
- package/src/components/Spinner/__tests__/__snapshots__/StyledSpinner.spec.tsx.snap +235 -0
- package/src/components/Spinner/__tests__/__snapshots__/index.spec.tsx.snap +141 -0
- package/src/components/Spinner/__tests__/index.spec.tsx +12 -0
- package/src/components/Spinner/index.tsx +22 -0
- package/src/components/Switch/StyledSwitch.tsx +50 -0
- package/src/components/Switch/__tests__/StyledHeading.spec.tsx +42 -0
- package/src/components/Switch/__tests__/__snapshots__/StyledHeading.spec.tsx.snap +74 -0
- package/src/components/Switch/__tests__/__snapshots__/index.spec.tsx.snap +129 -0
- package/src/components/Switch/__tests__/index.spec.tsx +24 -0
- package/src/components/Switch/index.tsx +87 -0
- package/src/components/TextInput/StyledTextInput.tsx +30 -0
- package/src/components/TextInput/__tests__/StyledTextInput.spec.tsx +27 -0
- package/src/components/TextInput/__tests__/__snapshots__/StyledTextInput.spec.tsx.snap +67 -0
- package/src/components/TextInput/__tests__/index.spec.tsx +17 -0
- package/src/components/TextInput/index.tsx +74 -0
- package/src/index.ts +18 -0
- package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +174 -0
- package/src/theme/components/alert.ts +32 -0
- package/src/theme/components/bottomSheet.ts +34 -0
- package/src/theme/components/contentNavigator.ts +11 -0
- package/src/theme/components/icon.ts +1 -0
- package/src/theme/components/radio.ts +34 -0
- package/src/theme/components/sectionHeading.ts +18 -0
- package/src/theme/components/select.ts +23 -0
- package/src/theme/components/spinner.ts +21 -0
- package/src/theme/components/switch.ts +50 -0
- package/src/theme/components/textInput.ts +32 -0
- package/src/theme/global/borders.ts +6 -0
- package/src/theme/global/colors.ts +3 -0
- package/src/theme/index.ts +34 -7
- package/tsconfig.json +11 -3
- package/types/components/Alert/StyledAlert.d.ts +37 -0
- package/types/{src/components/Avatar → components/Alert}/__tests__/index.spec.d.ts +0 -0
- package/types/components/Alert/index.d.ts +42 -0
- package/types/{src/components → components}/Avatar/StyledAvatar.d.ts +0 -1
- package/types/{src/components → components}/Avatar/__tests__/StyledAvatar.spec.d.ts +0 -0
- package/types/{src/components/BottomNavigation → components/Avatar}/__tests__/index.spec.d.ts +0 -0
- package/types/{src/components → components}/Avatar/index.d.ts +0 -0
- package/types/{src/components → components}/Badge/Status.d.ts +0 -0
- package/types/{src/components → components}/Badge/StyledBadge.d.ts +0 -1
- package/types/{src/components → components}/Badge/__tests__/Badge.spec.d.ts +0 -0
- package/types/{src/components → components}/Badge/__tests__/Status.spec.d.ts +0 -0
- package/types/{src/components → components}/Badge/index.d.ts +0 -0
- package/types/{src/components → components}/BottomNavigation/StyledBottomNavigation.d.ts +0 -1
- package/types/{src/components/Button/LoadingIndicator → components/BottomNavigation}/__tests__/index.spec.d.ts +0 -0
- package/types/{src/components → components}/BottomNavigation/index.d.ts +0 -0
- package/types/components/BottomSheet/Footer.d.ts +6 -0
- package/types/components/BottomSheet/Header.d.ts +8 -0
- package/types/components/BottomSheet/StyledBottomSheet.d.ts +46 -0
- package/types/{src/components/Button → components/BottomSheet}/__tests__/index.spec.d.ts +0 -0
- package/types/components/BottomSheet/index.d.ts +55 -0
- package/types/{src/components → components}/Button/Button.d.ts +0 -0
- package/types/{src/components → components}/Button/IconButton.d.ts +5 -1
- package/types/{src/components → components}/Button/LoadingIndicator/StyledLoadingIndicator.d.ts +0 -1
- package/types/{src/components → components}/Button/LoadingIndicator/__tests__/StyledLoadingIndicator.spec.d.ts +0 -0
- package/types/{src/components/Card → components/Button/LoadingIndicator}/__tests__/index.spec.d.ts +0 -0
- package/types/{src/components → components}/Button/LoadingIndicator/index.d.ts +0 -0
- package/types/{src/components → components}/Button/StyledButton.d.ts +0 -1
- package/types/{src/components → components}/Button/__tests__/Button.spec.d.ts +0 -0
- package/types/{src/components → components}/Button/__tests__/IconButton.spec.d.ts +0 -0
- package/types/{src/components → components}/Button/__tests__/StyledButton.spec.d.ts +0 -0
- package/types/{src/components → components}/Button/index.d.ts +0 -0
- package/types/{src/components → components}/Card/StyledCard.d.ts +0 -1
- package/types/{src/components → components}/Card/__tests__/StyledCard.spec.d.ts +0 -0
- package/types/{src/components/Collapse → components/Card}/__tests__/index.spec.d.ts +0 -0
- package/types/{src/components → components}/Card/index.d.ts +0 -0
- package/types/{src/components → components}/Collapse/StyledCollapse.d.ts +12 -2
- package/types/{src/components → components}/Collapse/__tests__/StyledCollapse.spec.d.ts +0 -0
- package/types/{src/components/Drawer → components/Collapse}/__tests__/index.spec.d.ts +0 -0
- package/types/{src/components → components}/Collapse/index.d.ts +1 -5
- package/types/components/ContentNavigator/StyledContentNavigator.d.ts +12 -0
- package/types/{src/components/Divider/__tests__/StyledDivider.spec.d.ts → components/ContentNavigator/__tests__/StyledContentNavigator.spec.d.ts} +0 -0
- package/types/{src/components/FAB → components/ContentNavigator}/__tests__/index.spec.d.ts +0 -0
- package/types/components/ContentNavigator/index.d.ts +33 -0
- package/types/{src/components → components}/Divider/StyledDivider.d.ts +0 -1
- package/types/{src/components/FAB/__tests__/AnimatedFABIcon.spec.d.ts → components/Divider/__tests__/StyledDivider.spec.d.ts} +0 -0
- package/types/{src/components → components}/Divider/index.d.ts +0 -0
- package/types/{src/components → components}/Drawer/StyledDrawer.d.ts +0 -1
- package/types/{src/components/Icon → components/Drawer}/__tests__/index.spec.d.ts +0 -0
- package/types/{src/components → components}/Drawer/index.d.ts +0 -0
- package/types/{src/components → components}/FAB/ActionGroup/ActionItem.d.ts +0 -0
- package/types/{src/components → components}/FAB/ActionGroup/StyledActionGroup.d.ts +0 -1
- package/types/{src/components → components}/FAB/ActionGroup/StyledActionItem.d.ts +0 -1
- package/types/{src/components → components}/FAB/ActionGroup/__tests__/index.spec.d.ts +0 -0
- package/types/{src/components → components}/FAB/ActionGroup/index.d.ts +0 -0
- package/types/{src/components → components}/FAB/AnimatedFABIcon.d.ts +0 -0
- package/types/{src/components → components}/FAB/FAB.d.ts +0 -0
- package/types/{src/components → components}/FAB/StyledFAB.d.ts +0 -1
- package/types/{src/components/FAB/__tests__/StyledFAB.spec.d.ts → components/FAB/__tests__/AnimatedFABIcon.spec.d.ts} +0 -0
- package/types/{src/components/Progress/__tests__/index.spec.d.ts → components/FAB/__tests__/StyledFAB.spec.d.ts} +0 -0
- package/types/{src/components/Tabs → components/FAB}/__tests__/index.spec.d.ts +0 -0
- package/types/{src/components → components}/FAB/index.d.ts +0 -0
- package/types/{src/components → components}/Icon/HeroIcon/index.d.ts +1 -2
- package/types/components/Icon/IconList.d.ts +2 -0
- package/types/{src/components/Typography/Text → components/Icon}/__tests__/index.spec.d.ts +0 -0
- package/types/{src/components → components}/Icon/index.d.ts +1 -1
- package/types/components/Icon/utils.d.ts +2 -0
- package/types/{src/components → components}/Progress/ProgressBar.d.ts +0 -0
- package/types/{src/components → components}/Progress/ProgressCircle.d.ts +0 -0
- package/types/{src/components → components}/Progress/StyledProgressBar.d.ts +0 -1
- package/types/{src/components → components}/Progress/StyledProgressCircle.d.ts +0 -1
- package/types/{src/theme → components/Progress}/__tests__/index.spec.d.ts +0 -0
- package/types/{src/components → components}/Progress/index.d.ts +0 -0
- package/types/{src/components → components}/Progress/types.d.ts +0 -0
- package/types/components/Radio/Radio.d.ts +26 -0
- package/types/components/Radio/RadioGroup.d.ts +32 -0
- package/types/components/Radio/StyledRadio.d.ts +30 -0
- package/types/{src/components/Tabs/__tests__/ScrollableTab.spec.d.ts → components/Radio/__tests__/Radio.spec.d.ts} +0 -0
- package/types/{src/components/Tabs/__tests__/ScrollableTabs.spec.d.ts → components/Radio/__tests__/RadioGroup.spec.d.ts} +0 -0
- package/types/{src/components/Tag/__tests__/Tag.spec.d.ts → components/Radio/__tests__/StyledRadio.spec.d.ts} +0 -0
- package/types/components/Radio/index.d.ts +4 -0
- package/types/components/Radio/types.d.ts +5 -0
- package/types/components/SectionHeading/StyledHeading.d.ts +20 -0
- package/types/{src/components/Typography/Text/__tests__/StyledText.spec.d.ts → components/SectionHeading/__tests__/StyledHeading.spec.d.ts} +0 -0
- package/types/{src/utils/__tests__/scale.spec.d.ts → components/SectionHeading/__tests__/index.spec.d.ts} +0 -0
- package/types/components/SectionHeading/index.d.ts +39 -0
- package/types/components/Select/MultiSelect/Footer.d.ts +5 -0
- package/types/components/Select/MultiSelect/OptionList.d.ts +3 -0
- package/types/components/Select/MultiSelect/StyledMultiSelect.d.ts +26 -0
- package/types/components/Select/MultiSelect/__tests__/StyledMultiSelect.spec.d.ts +1 -0
- package/types/components/Select/MultiSelect/__tests__/index.spec.d.ts +1 -0
- package/types/components/Select/MultiSelect/index.d.ts +39 -0
- package/types/components/Select/MultiSelect/types.d.ts +5 -0
- package/types/components/Select/index.d.ts +5 -0
- package/types/components/Spinner/AnimatedSpinner.d.ts +2 -0
- package/types/components/Spinner/StyledSpinner.d.ts +30 -0
- package/types/components/Spinner/__tests__/AnimatedSpinner.spec.d.ts +1 -0
- package/types/components/Spinner/__tests__/StyledSpinner.spec.d.ts +1 -0
- package/types/components/Spinner/__tests__/index.spec.d.ts +1 -0
- package/types/components/Spinner/index.d.ts +10 -0
- package/types/components/Switch/StyledSwitch.d.ts +36 -0
- package/types/components/Switch/__tests__/StyledHeading.spec.d.ts +1 -0
- package/types/components/Switch/__tests__/index.spec.d.ts +1 -0
- package/types/components/Switch/index.d.ts +30 -0
- package/types/{src/components → components}/Tabs/ActiveTabIndicator.d.ts +0 -0
- package/types/{src/components → components}/Tabs/ScrollableTabs.d.ts +0 -0
- package/types/{src/components → components}/Tabs/StyledScrollableTabs.d.ts +0 -1
- package/types/{src/components → components}/Tabs/StyledTabs.d.ts +0 -1
- package/types/components/Tabs/__tests__/ScrollableTabs.spec.d.ts +1 -0
- package/types/components/Tabs/__tests__/index.spec.d.ts +1 -0
- package/types/{src/components → components}/Tabs/index.d.ts +0 -0
- package/types/{src/components → components}/Tabs/utils.d.ts +0 -0
- package/types/{src/components → components}/Tag/StyledTag.d.ts +0 -1
- package/types/components/Tag/__tests__/Tag.spec.d.ts +1 -0
- package/types/{src/components → components}/Tag/index.d.ts +0 -0
- package/types/components/TextInput/StyledTextInput.d.ts +18 -0
- package/types/components/TextInput/__tests__/StyledTextInput.spec.d.ts +1 -0
- package/types/components/TextInput/__tests__/index.spec.d.ts +1 -0
- package/types/components/TextInput/index.d.ts +34 -0
- package/types/{src/components → components}/Typography/Text/StyledText.d.ts +0 -1
- package/types/components/Typography/Text/__tests__/StyledText.spec.d.ts +1 -0
- package/types/components/Typography/Text/__tests__/index.spec.d.ts +1 -0
- package/types/{src/components → components}/Typography/Text/index.d.ts +0 -0
- package/types/{src/components → components}/Typography/index.d.ts +0 -0
- package/types/{src/index.d.ts → index.d.ts} +10 -1
- package/types/{src/testHelpers → testHelpers}/renderWithTheme.d.ts +0 -0
- package/types/theme/__tests__/index.spec.d.ts +1 -0
- package/types/theme/components/alert.d.ts +23 -0
- package/types/{src/theme → theme}/components/avatar.d.ts +0 -0
- package/types/{src/theme → theme}/components/badge.d.ts +0 -0
- package/types/{src/theme → theme}/components/bottomNavigation.d.ts +0 -0
- package/types/theme/components/bottomSheet.d.ts +29 -0
- package/types/{src/theme → theme}/components/button.d.ts +0 -0
- package/types/{src/theme → theme}/components/card.d.ts +0 -0
- package/types/theme/components/contentNavigator.d.ts +7 -0
- package/types/{src/theme → theme}/components/divider.d.ts +0 -0
- package/types/{src/theme → theme}/components/drawer.d.ts +0 -0
- package/types/{src/theme → theme}/components/fab.d.ts +0 -0
- package/types/{src/theme → theme}/components/icon.d.ts +1 -0
- package/types/{src/theme → theme}/components/progress.d.ts +0 -0
- package/types/theme/components/radio.d.ts +25 -0
- package/types/theme/components/sectionHeading.d.ts +13 -0
- package/types/theme/components/select.d.ts +17 -0
- package/types/theme/components/spinner.d.ts +15 -0
- package/types/theme/components/switch.d.ts +32 -0
- package/types/{src/theme → theme}/components/tabs.d.ts +0 -0
- package/types/{src/theme → theme}/components/tag.d.ts +0 -0
- package/types/theme/components/textInput.d.ts +24 -0
- package/types/{src/theme → theme}/components/typography.d.ts +0 -0
- package/types/{src/theme → theme}/global/borders.d.ts +3 -0
- package/types/{src/theme → theme}/global/colors.d.ts +3 -0
- package/types/{src/theme → theme}/global/index.d.ts +3 -0
- package/types/{src/theme → theme}/global/scale.d.ts +0 -0
- package/types/{src/theme → theme}/global/space.d.ts +0 -0
- package/types/{src/theme → theme}/global/typography.d.ts +0 -0
- package/types/{src/theme → theme}/index.d.ts +23 -5
- package/types/{src/types.d.ts → types.d.ts} +0 -0
- package/types/utils/__tests__/scale.spec.d.ts +1 -0
- package/types/{src/utils → utils}/helpers.d.ts +0 -0
- package/types/{src/utils → utils}/hooks.d.ts +0 -0
- package/types/{src/utils → utils}/scale.d.ts +0 -0
- package/app.json +0 -8
- package/types/playground/components/Avatar.d.ts +0 -2
- package/types/playground/components/Badge.d.ts +0 -2
- package/types/playground/components/BottomNavigation.d.ts +0 -2
- package/types/playground/components/Button.d.ts +0 -2
- package/types/playground/components/Card.d.ts +0 -2
- package/types/playground/components/Collapse.d.ts +0 -2
- package/types/playground/components/Divider.d.ts +0 -2
- package/types/playground/components/Drawer.d.ts +0 -2
- package/types/playground/components/FAB.d.ts +0 -2
- package/types/playground/components/Icon.d.ts +0 -2
- package/types/playground/components/IconButton.d.ts +0 -2
- package/types/playground/components/Progress.d.ts +0 -2
- package/types/playground/components/Tabs.d.ts +0 -2
- package/types/playground/components/Tag.d.ts +0 -2
- package/types/playground/components/Typography.d.ts +0 -2
- package/types/playground/index.d.ts +0 -2
- package/types/src/components/Icon/IconList.d.ts +0 -2
- package/types/src/components/Icon/utils.d.ts +0 -2
- package/types/src/components/Tabs/ScrollableTab.d.ts +0 -3
- package/types/src/components/Tabs/StyledScrollableTab.d.ts +0 -61
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { scale } from '../../utils/scale';
|
|
2
|
+
import { GlobalTheme } from '../global';
|
|
3
|
+
|
|
4
|
+
const getRadioTheme = (theme: GlobalTheme) => {
|
|
5
|
+
const colors = {
|
|
6
|
+
circle: theme.colors.black,
|
|
7
|
+
checkedCircle: theme.colors.primary,
|
|
8
|
+
wrapper: theme.colors.platformBackground,
|
|
9
|
+
checkedWrapper: theme.colors.primaryBackground,
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
const space = {
|
|
13
|
+
wrapperPadding: theme.space.medium, // left padding should be 12 according to the design
|
|
14
|
+
circleLeftMargin: theme.space.small,
|
|
15
|
+
groupTopMargin: theme.space.xsmall,
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
const sizes = {
|
|
19
|
+
circle: scale(20),
|
|
20
|
+
innerCircle: scale(10),
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
const borderWidths = {
|
|
24
|
+
circle: theme.borderWidths.medium,
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
const radii = {
|
|
28
|
+
wrapper: theme.radii.base,
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
return { sizes, borderWidths, space, colors, radii };
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
export default getRadioTheme;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { GlobalTheme } from '../global';
|
|
2
|
+
|
|
3
|
+
const getSectionHeadingTheme = (theme: GlobalTheme) => {
|
|
4
|
+
const colors = {
|
|
5
|
+
background: theme.colors.outline,
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
const space = {
|
|
9
|
+
headingVerticalPadding: theme.space.small,
|
|
10
|
+
headingHorizontalPadding: theme.space.medium,
|
|
11
|
+
headingMarginBottom: theme.space.medium,
|
|
12
|
+
iconMarginRight: theme.space.small,
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
return { colors, space };
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export default getSectionHeadingTheme;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { GlobalTheme } from '../global';
|
|
2
|
+
|
|
3
|
+
const getSelectTheme = (theme: GlobalTheme) => {
|
|
4
|
+
const colors = {
|
|
5
|
+
option: theme.colors.platformBackground,
|
|
6
|
+
checkedOption: theme.colors.primaryBackground,
|
|
7
|
+
footerText: theme.colors.primary,
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
const space = {
|
|
11
|
+
optionPadding: theme.space.medium,
|
|
12
|
+
optionListPadding: theme.space.medium, // left padding should be 12 according to the design
|
|
13
|
+
optionListSpacing: theme.space.xsmall,
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
const radii = {
|
|
17
|
+
option: theme.radii.base,
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
return { space, colors, radii };
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export default getSelectTheme;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { GlobalTheme } from '../global';
|
|
2
|
+
|
|
3
|
+
const getSpinnerTheme = (theme: GlobalTheme) => {
|
|
4
|
+
const color = {
|
|
5
|
+
default: theme.colors.primary,
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
const space = {
|
|
9
|
+
spinnerDot: theme.space.medium,
|
|
10
|
+
spinnerDotPadding: theme.space.small,
|
|
11
|
+
spinnerTextPaddingTop: theme.space.small,
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
const radii = {
|
|
15
|
+
default: theme.radii.medium,
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
return { color, space, radii };
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export default getSpinnerTheme;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { GlobalTheme } from '../global';
|
|
2
|
+
|
|
3
|
+
const getSwitchTheme = (theme: GlobalTheme) => {
|
|
4
|
+
const colors = {
|
|
5
|
+
thumb: theme.colors.platformBackground,
|
|
6
|
+
active: theme.colors.primary,
|
|
7
|
+
inactive: theme.colors.inactiveBackground,
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
const thumbSizes = {
|
|
11
|
+
small: theme.space.medium,
|
|
12
|
+
medium: theme.space.medium * 1.3,
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
const widths = {
|
|
16
|
+
small: theme.space.xxxlarge,
|
|
17
|
+
medium: theme.space.xxxxlarge,
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
const heights = {
|
|
21
|
+
small: theme.space.large,
|
|
22
|
+
medium: theme.space.large * 1.2,
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
const spaces = {
|
|
26
|
+
small: theme.space.xsmall,
|
|
27
|
+
medium: theme.space.xsmall,
|
|
28
|
+
inactive: 0,
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
const radii = {
|
|
32
|
+
rounded: theme.radii.rounded,
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
const borderWidths = {
|
|
36
|
+
default: theme.borderWidths.base,
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
return {
|
|
40
|
+
colors,
|
|
41
|
+
thumbSizes,
|
|
42
|
+
widths,
|
|
43
|
+
heights,
|
|
44
|
+
spaces,
|
|
45
|
+
radii,
|
|
46
|
+
borderWidths,
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
export default getSwitchTheme;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { GlobalTheme } from '../global';
|
|
2
|
+
|
|
3
|
+
const getTextInputTheme = (theme: GlobalTheme) => {
|
|
4
|
+
const colors = {
|
|
5
|
+
labelBackground: theme.colors.platformBackground,
|
|
6
|
+
border: theme.colors.text,
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
const space = {
|
|
10
|
+
containerPadding: theme.space.medium,
|
|
11
|
+
labelLeft: theme.space.medium,
|
|
12
|
+
labelTop: theme.lineHeights.small / -2,
|
|
13
|
+
labelHorizontalPadding: theme.space.xsmall,
|
|
14
|
+
inputHorizontalMargin: theme.space.small,
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
const fontSizes = {
|
|
18
|
+
text: theme.fontSizes.large,
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
const borderWidths = {
|
|
22
|
+
container: theme.borderWidths.base,
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
const radii = {
|
|
26
|
+
container: theme.radii.medium,
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
return { colors, space, fontSizes, borderWidths, radii };
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export default getTextInputTheme;
|
|
@@ -1,21 +1,27 @@
|
|
|
1
1
|
interface BorderWidths {
|
|
2
2
|
base: number;
|
|
3
|
+
medium: number;
|
|
3
4
|
}
|
|
4
5
|
|
|
5
6
|
interface Radii {
|
|
6
7
|
rounded: number;
|
|
7
8
|
base: number;
|
|
8
9
|
medium: number;
|
|
10
|
+
large: number;
|
|
11
|
+
xlarge: number;
|
|
9
12
|
}
|
|
10
13
|
|
|
11
14
|
const getBorderWidths = (baseBorderWidth: number): BorderWidths => ({
|
|
12
15
|
base: baseBorderWidth,
|
|
16
|
+
medium: baseBorderWidth * 2,
|
|
13
17
|
});
|
|
14
18
|
|
|
15
19
|
const getRadii = (baseRadius: number): Radii => ({
|
|
16
20
|
rounded: 999,
|
|
17
21
|
base: baseRadius,
|
|
18
22
|
medium: baseRadius * 2,
|
|
23
|
+
large: baseRadius * 3,
|
|
24
|
+
xlarge: baseRadius * 4,
|
|
19
25
|
});
|
|
20
26
|
|
|
21
27
|
export { BorderWidths, getBorderWidths, Radii, getRadii };
|
|
@@ -8,6 +8,7 @@ const systemPalette = {
|
|
|
8
8
|
secondary: palette.dodgerBlue,
|
|
9
9
|
secondaryLight: palette.dodgerBlueLight75,
|
|
10
10
|
info: palette.dodgerBlue,
|
|
11
|
+
infoMediumLight: palette.blue,
|
|
11
12
|
infoLight: palette.dodgerBlueLight75,
|
|
12
13
|
infoBackground: palette.dodgerBlueLight90,
|
|
13
14
|
success: palette.green,
|
|
@@ -28,6 +29,8 @@ const systemPalette = {
|
|
|
28
29
|
invertedText: palette.white,
|
|
29
30
|
outline: palette.greyLight60,
|
|
30
31
|
archived: palette.greyLight45,
|
|
32
|
+
black: palette.black,
|
|
33
|
+
inactiveBackground: palette.greyDark30,
|
|
31
34
|
};
|
|
32
35
|
|
|
33
36
|
type SystemPalette = typeof systemPalette;
|
package/src/theme/index.ts
CHANGED
|
@@ -7,35 +7,53 @@ import {
|
|
|
7
7
|
defaultSystemPalette,
|
|
8
8
|
} from './global';
|
|
9
9
|
|
|
10
|
+
import getAlertTheme from './components/alert';
|
|
11
|
+
import getAvatarTheme from './components/avatar';
|
|
10
12
|
import getBadgeTheme from './components/badge';
|
|
11
13
|
import getBottomNavigationTheme from './components/bottomNavigation';
|
|
14
|
+
import getBottomSheetTheme from './components/bottomSheet';
|
|
12
15
|
import getButtonTheme from './components/button';
|
|
13
16
|
import getCardTheme from './components/card';
|
|
17
|
+
import getContentNavigatorTheme from './components/contentNavigator';
|
|
14
18
|
import getDividerTheme from './components/divider';
|
|
15
19
|
import getDrawerTheme from './components/drawer';
|
|
16
|
-
import
|
|
17
|
-
import getTagTheme from './components/tag';
|
|
20
|
+
import getFABTheme from './components/fab';
|
|
18
21
|
import getIconTheme from './components/icon';
|
|
19
22
|
import getProgressTheme from './components/progress';
|
|
23
|
+
import getRadioTheme from './components/radio';
|
|
24
|
+
import getSectionHeadingTheme from './components/sectionHeading';
|
|
25
|
+
import getSelectTheme from './components/select';
|
|
26
|
+
import getSpinnerTheme from './components/spinner';
|
|
27
|
+
import getSwitchTheme from './components/switch';
|
|
28
|
+
import getTabsTheme from './components/tabs';
|
|
29
|
+
import getTagTheme from './components/tag';
|
|
30
|
+
import getTextInputTheme from './components/textInput';
|
|
20
31
|
import getTypographyTheme from './components/typography';
|
|
21
|
-
import getFABTheme from './components/fab';
|
|
22
|
-
import getAvatarTheme from './components/avatar';
|
|
23
32
|
|
|
24
33
|
type Theme = GlobalTheme & {
|
|
25
34
|
__hd__: {
|
|
35
|
+
alert: ReturnType<typeof getAlertTheme>;
|
|
26
36
|
avatar: ReturnType<typeof getAvatarTheme>;
|
|
27
37
|
badge: ReturnType<typeof getBadgeTheme>;
|
|
28
38
|
bottomNavigation: ReturnType<typeof getBottomNavigationTheme>;
|
|
39
|
+
bottomSheet: ReturnType<typeof getBottomSheetTheme>;
|
|
29
40
|
button: ReturnType<typeof getButtonTheme>;
|
|
30
41
|
card: ReturnType<typeof getCardTheme>;
|
|
42
|
+
contentNavigator: ReturnType<typeof getContentNavigatorTheme>;
|
|
31
43
|
divider: ReturnType<typeof getDividerTheme>;
|
|
32
44
|
drawer: ReturnType<typeof getDrawerTheme>;
|
|
45
|
+
fab: ReturnType<typeof getFABTheme>;
|
|
33
46
|
icon: ReturnType<typeof getIconTheme>;
|
|
34
47
|
progress: ReturnType<typeof getProgressTheme>;
|
|
48
|
+
radio: ReturnType<typeof getRadioTheme>;
|
|
49
|
+
sectionHeading: ReturnType<typeof getSectionHeadingTheme>;
|
|
50
|
+
select: ReturnType<typeof getSelectTheme>;
|
|
51
|
+
spinner: ReturnType<typeof getSpinnerTheme>;
|
|
52
|
+
switch: ReturnType<typeof getSwitchTheme>;
|
|
35
53
|
tabs: ReturnType<typeof getTabsTheme>;
|
|
36
54
|
tag: ReturnType<typeof getTagTheme>;
|
|
55
|
+
textInput: ReturnType<typeof getTextInputTheme>;
|
|
37
56
|
typography: ReturnType<typeof getTypographyTheme>;
|
|
38
|
-
fab: ReturnType<typeof getFABTheme>;
|
|
39
57
|
};
|
|
40
58
|
};
|
|
41
59
|
|
|
@@ -48,18 +66,27 @@ const getTheme = (
|
|
|
48
66
|
...globalTheme,
|
|
49
67
|
__hd__: {
|
|
50
68
|
avatar: getAvatarTheme(globalTheme),
|
|
69
|
+
alert: getAlertTheme(globalTheme),
|
|
51
70
|
badge: getBadgeTheme(globalTheme),
|
|
52
71
|
bottomNavigation: getBottomNavigationTheme(globalTheme),
|
|
72
|
+
bottomSheet: getBottomSheetTheme(globalTheme),
|
|
53
73
|
button: getButtonTheme(globalTheme),
|
|
54
74
|
card: getCardTheme(globalTheme),
|
|
75
|
+
contentNavigator: getContentNavigatorTheme(globalTheme),
|
|
55
76
|
divider: getDividerTheme(globalTheme),
|
|
56
77
|
drawer: getDrawerTheme(globalTheme),
|
|
57
|
-
|
|
78
|
+
fab: getFABTheme(globalTheme),
|
|
58
79
|
icon: getIconTheme(globalTheme),
|
|
80
|
+
progress: getProgressTheme(globalTheme),
|
|
81
|
+
radio: getRadioTheme(globalTheme),
|
|
82
|
+
sectionHeading: getSectionHeadingTheme(globalTheme),
|
|
83
|
+
select: getSelectTheme(globalTheme),
|
|
84
|
+
spinner: getSpinnerTheme(globalTheme),
|
|
85
|
+
switch: getSwitchTheme(globalTheme),
|
|
59
86
|
tabs: getTabsTheme(globalTheme),
|
|
60
87
|
tag: getTagTheme(globalTheme),
|
|
88
|
+
textInput: getTextInputTheme(globalTheme),
|
|
61
89
|
typography: getTypographyTheme(globalTheme),
|
|
62
|
-
fab: getFABTheme(globalTheme),
|
|
63
90
|
},
|
|
64
91
|
};
|
|
65
92
|
};
|
package/tsconfig.json
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
"outDir": "types",
|
|
6
6
|
"moduleResolution": "node",
|
|
7
7
|
"esModuleInterop": true,
|
|
8
|
+
"resolveJsonModule": true,
|
|
8
9
|
"jsx": "react-native",
|
|
9
10
|
"strict": true,
|
|
10
11
|
"allowUnreachableCode": false,
|
|
@@ -12,9 +13,16 @@
|
|
|
12
13
|
"noImplicitThis": true,
|
|
13
14
|
"noUnusedLocals": true,
|
|
14
15
|
"skipLibCheck": true,
|
|
15
|
-
"types": [
|
|
16
|
+
"types": [
|
|
17
|
+
"jest"
|
|
18
|
+
]
|
|
16
19
|
},
|
|
17
|
-
"include": [
|
|
18
|
-
|
|
20
|
+
"include": [
|
|
21
|
+
"src"
|
|
22
|
+
],
|
|
23
|
+
"exclude": [
|
|
24
|
+
"node_modules",
|
|
25
|
+
"playground"
|
|
26
|
+
],
|
|
19
27
|
"extends": "expo/tsconfig.base"
|
|
20
28
|
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { TouchableOpacity, View, ViewProps } from 'react-native';
|
|
2
|
+
declare const Container: import("@emotion/native").StyledComponent<ViewProps & {
|
|
3
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
4
|
+
as?: import("react").ElementType<any> | undefined;
|
|
5
|
+
} & {
|
|
6
|
+
themeVariant: 'default' | 'round';
|
|
7
|
+
themeIntent: 'success' | 'info' | 'warning' | 'error';
|
|
8
|
+
}, {}, {
|
|
9
|
+
ref?: import("react").Ref<View> | undefined;
|
|
10
|
+
}>;
|
|
11
|
+
declare const IconContainer: import("@emotion/native").StyledComponent<ViewProps & {
|
|
12
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
13
|
+
as?: import("react").ElementType<any> | undefined;
|
|
14
|
+
}, {}, {
|
|
15
|
+
ref?: import("react").Ref<View> | undefined;
|
|
16
|
+
}>;
|
|
17
|
+
declare const TextContainer: import("@emotion/native").StyledComponent<ViewProps & {
|
|
18
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
19
|
+
as?: import("react").ElementType<any> | undefined;
|
|
20
|
+
}, {}, {
|
|
21
|
+
ref?: import("react").Ref<View> | undefined;
|
|
22
|
+
}>;
|
|
23
|
+
declare const ContentContainer: import("@emotion/native").StyledComponent<ViewProps & {
|
|
24
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
25
|
+
as?: import("react").ElementType<any> | undefined;
|
|
26
|
+
} & {
|
|
27
|
+
showDivider: boolean;
|
|
28
|
+
}, {}, {
|
|
29
|
+
ref?: import("react").Ref<View> | undefined;
|
|
30
|
+
}>;
|
|
31
|
+
declare const CTAWrapper: import("@emotion/native").StyledComponent<import("react-native").TouchableOpacityProps & {
|
|
32
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
33
|
+
as?: import("react").ElementType<any> | undefined;
|
|
34
|
+
}, {}, {
|
|
35
|
+
ref?: import("react").Ref<TouchableOpacity> | undefined;
|
|
36
|
+
}>;
|
|
37
|
+
export { Container, ContentContainer, TextContainer, IconContainer, CTAWrapper, };
|
|
File without changes
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
import { StyleProp, ViewStyle } from 'react-native';
|
|
3
|
+
import { IconName } from '../Icon';
|
|
4
|
+
interface AlertProps {
|
|
5
|
+
/**
|
|
6
|
+
* Alert title.
|
|
7
|
+
*/
|
|
8
|
+
title?: string | ReactElement;
|
|
9
|
+
/**
|
|
10
|
+
* Alert content.
|
|
11
|
+
*/
|
|
12
|
+
content: string | ReactElement;
|
|
13
|
+
/**
|
|
14
|
+
* Icon name of the alert.
|
|
15
|
+
* - undefined: use default icon according to Alert intent.
|
|
16
|
+
* - null: no icon at all.
|
|
17
|
+
* - IconName: an icon identifier from hero-design icon list.
|
|
18
|
+
*/
|
|
19
|
+
icon?: null | IconName;
|
|
20
|
+
/**
|
|
21
|
+
* Visual intent color to apply to alert.
|
|
22
|
+
*/
|
|
23
|
+
intent?: 'success' | 'info' | 'warning' | 'error';
|
|
24
|
+
/**
|
|
25
|
+
* Closing callback. When onClose is available, an X button will be rendered on the right side of alert. The callback will be called when user clicks on X button.
|
|
26
|
+
*/
|
|
27
|
+
onClose?: () => void;
|
|
28
|
+
/**
|
|
29
|
+
* Use rounded variant.
|
|
30
|
+
*/
|
|
31
|
+
variant?: 'default' | 'round';
|
|
32
|
+
/**
|
|
33
|
+
* Addtional style.
|
|
34
|
+
*/
|
|
35
|
+
style?: StyleProp<ViewStyle>;
|
|
36
|
+
/**
|
|
37
|
+
* Testing id of the component.
|
|
38
|
+
*/
|
|
39
|
+
testID?: string;
|
|
40
|
+
}
|
|
41
|
+
declare const Alert: ({ content, icon, title, intent, onClose, variant, style, testID, }: AlertProps) => JSX.Element;
|
|
42
|
+
export default Alert;
|
|
File without changes
|
package/types/{src/components/BottomNavigation → components/Avatar}/__tests__/index.spec.d.ts
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
declare const Header: ({ content, showDivider, onRequestClose, showCloseButton, }: {
|
|
3
|
+
content: string | ReactElement;
|
|
4
|
+
showDivider: boolean;
|
|
5
|
+
onRequestClose?: (() => void) | undefined;
|
|
6
|
+
showCloseButton: boolean;
|
|
7
|
+
}) => JSX.Element;
|
|
8
|
+
export default Header;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { Animated, View, ViewProps } from 'react-native';
|
|
2
|
+
declare const StyledWrapper: import("@emotion/native").StyledComponent<ViewProps & {
|
|
3
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
4
|
+
as?: import("react").ElementType<any> | undefined;
|
|
5
|
+
}, {}, {
|
|
6
|
+
ref?: import("react").Ref<View> | undefined;
|
|
7
|
+
}>;
|
|
8
|
+
declare const StyledBottomSheet: import("@emotion/native").StyledComponent<Animated.AnimatedProps<ViewProps & import("react").RefAttributes<View>> & {
|
|
9
|
+
children?: import("react").ReactNode;
|
|
10
|
+
} & {
|
|
11
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
12
|
+
as?: import("react").ElementType<any> | undefined;
|
|
13
|
+
}, {}, {}>;
|
|
14
|
+
declare const StyledBackdrop: import("@emotion/native").StyledComponent<Animated.AnimatedProps<import("react-native").PressableProps & import("react").RefAttributes<View>> & {
|
|
15
|
+
children?: import("react").ReactNode;
|
|
16
|
+
} & {
|
|
17
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
18
|
+
as?: import("react").ElementType<any> | undefined;
|
|
19
|
+
}, {}, {}>;
|
|
20
|
+
declare const StyledHeaderWrapper: import("@emotion/native").StyledComponent<ViewProps & {
|
|
21
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
22
|
+
as?: import("react").ElementType<any> | undefined;
|
|
23
|
+
}, {}, {
|
|
24
|
+
ref?: import("react").Ref<View> | undefined;
|
|
25
|
+
}>;
|
|
26
|
+
declare const StyledHeader: import("@emotion/native").StyledComponent<ViewProps & {
|
|
27
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
28
|
+
as?: import("react").ElementType<any> | undefined;
|
|
29
|
+
} & {
|
|
30
|
+
adjacentIcon: boolean;
|
|
31
|
+
}, {}, {
|
|
32
|
+
ref?: import("react").Ref<View> | undefined;
|
|
33
|
+
}>;
|
|
34
|
+
declare const StyledFooter: import("@emotion/native").StyledComponent<ViewProps & {
|
|
35
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
36
|
+
as?: import("react").ElementType<any> | undefined;
|
|
37
|
+
}, {}, {
|
|
38
|
+
ref?: import("react").Ref<View> | undefined;
|
|
39
|
+
}>;
|
|
40
|
+
declare const StyledIconWrapper: import("@emotion/native").StyledComponent<ViewProps & {
|
|
41
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
42
|
+
as?: import("react").ElementType<any> | undefined;
|
|
43
|
+
}, {}, {
|
|
44
|
+
ref?: import("react").Ref<View> | undefined;
|
|
45
|
+
}>;
|
|
46
|
+
export { StyledWrapper, StyledHeaderWrapper, StyledHeader, StyledFooter, StyledIconWrapper, StyledBottomSheet, StyledBackdrop, };
|
|
File without changes
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { ReactElement, ReactNode } from 'react';
|
|
2
|
+
import { StyleProp, ViewStyle } from 'react-native';
|
|
3
|
+
interface BottomSheetProps {
|
|
4
|
+
/**
|
|
5
|
+
* Bottom sheet open state.
|
|
6
|
+
*/
|
|
7
|
+
open: boolean;
|
|
8
|
+
/**
|
|
9
|
+
* Bottom sheet's header.
|
|
10
|
+
*/
|
|
11
|
+
header?: string | ReactElement;
|
|
12
|
+
/**
|
|
13
|
+
* Bottom sheet's footer.
|
|
14
|
+
*/
|
|
15
|
+
footer?: ReactNode;
|
|
16
|
+
/**
|
|
17
|
+
* Bottom sheet's content.
|
|
18
|
+
*/
|
|
19
|
+
children?: ReactNode;
|
|
20
|
+
/**
|
|
21
|
+
* Callback is called when the Bottom Sheet is opened.
|
|
22
|
+
*/
|
|
23
|
+
onOpen?: () => void;
|
|
24
|
+
/**
|
|
25
|
+
* Callback is called when the user taps the back button on Android or when the bottom sheet
|
|
26
|
+
* is being dismiss by interacting outside of the bottom sheet.
|
|
27
|
+
*/
|
|
28
|
+
onRequestClose?: () => void;
|
|
29
|
+
/**
|
|
30
|
+
* Callback that is called once the bottom sheet has been dismissed.
|
|
31
|
+
*/
|
|
32
|
+
onDismiss?: () => void;
|
|
33
|
+
/**
|
|
34
|
+
* Displays an X button on bottom sheet header that will invoke onRequestClose callback on press.
|
|
35
|
+
*/
|
|
36
|
+
showCloseButton?: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* Enable the bottom sheet's backdrop.
|
|
39
|
+
*/
|
|
40
|
+
hasBackdrop?: boolean;
|
|
41
|
+
/**
|
|
42
|
+
* Displays dividers between header, footer and body.
|
|
43
|
+
*/
|
|
44
|
+
showDivider?: boolean;
|
|
45
|
+
/**
|
|
46
|
+
* Additional style.
|
|
47
|
+
*/
|
|
48
|
+
style?: StyleProp<ViewStyle>;
|
|
49
|
+
/**
|
|
50
|
+
* Testing id of the component.
|
|
51
|
+
*/
|
|
52
|
+
testID?: string;
|
|
53
|
+
}
|
|
54
|
+
declare const BottomSheet: ({ open, header, footer, children, onOpen, onRequestClose, onDismiss, showCloseButton, hasBackdrop, showDivider, style, testID, }: BottomSheetProps) => JSX.Element;
|
|
55
|
+
export default BottomSheet;
|
|
File without changes
|
|
@@ -9,6 +9,10 @@ export interface IconButtonProps {
|
|
|
9
9
|
* Name of the Icon.
|
|
10
10
|
*/
|
|
11
11
|
icon: IconName;
|
|
12
|
+
/**
|
|
13
|
+
* Disable state of button.
|
|
14
|
+
*/
|
|
15
|
+
disabled?: boolean;
|
|
12
16
|
/**
|
|
13
17
|
* Intent of the Icon.
|
|
14
18
|
*/
|
|
@@ -30,5 +34,5 @@ export interface IconButtonProps {
|
|
|
30
34
|
*/
|
|
31
35
|
testID?: string;
|
|
32
36
|
}
|
|
33
|
-
declare const IconButton: ({ hitSlop, onPress, icon, testID, style, size, intent, }: IconButtonProps) => JSX.Element;
|
|
37
|
+
declare const IconButton: ({ hitSlop, onPress, icon, disabled, testID, style, size, intent, }: IconButtonProps) => JSX.Element;
|
|
34
38
|
export default IconButton;
|
|
File without changes
|
package/types/{src/components/Card → components/Button/LoadingIndicator}/__tests__/index.spec.d.ts
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|