@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,235 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
+
|
|
3
|
+
exports[`StyledSpinnerContainer renders correctly 1`] = `
|
|
4
|
+
<View
|
|
5
|
+
style={
|
|
6
|
+
Array [
|
|
7
|
+
Object {
|
|
8
|
+
"alignItems": "center",
|
|
9
|
+
"height": "100%",
|
|
10
|
+
"justifyContent": "center",
|
|
11
|
+
},
|
|
12
|
+
undefined,
|
|
13
|
+
]
|
|
14
|
+
}
|
|
15
|
+
>
|
|
16
|
+
<View
|
|
17
|
+
collapsable={false}
|
|
18
|
+
nativeID="animatedComponent"
|
|
19
|
+
style={
|
|
20
|
+
Object {
|
|
21
|
+
"transform": Array [
|
|
22
|
+
Object {
|
|
23
|
+
"rotate": "0deg",
|
|
24
|
+
},
|
|
25
|
+
],
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
>
|
|
29
|
+
<View
|
|
30
|
+
collapsable={false}
|
|
31
|
+
nativeID="animatedComponent"
|
|
32
|
+
style={
|
|
33
|
+
Array [
|
|
34
|
+
Object {
|
|
35
|
+
"flexDirection": "row",
|
|
36
|
+
"marginBottom": 8,
|
|
37
|
+
},
|
|
38
|
+
Object {},
|
|
39
|
+
]
|
|
40
|
+
}
|
|
41
|
+
themePosition="top"
|
|
42
|
+
>
|
|
43
|
+
<View
|
|
44
|
+
collapsable={false}
|
|
45
|
+
nativeID="animatedComponent"
|
|
46
|
+
style={
|
|
47
|
+
Array [
|
|
48
|
+
Object {
|
|
49
|
+
"backgroundColor": "#7622d7",
|
|
50
|
+
"borderRadius": 8,
|
|
51
|
+
"height": 16,
|
|
52
|
+
"opacity": 1,
|
|
53
|
+
"width": 16,
|
|
54
|
+
},
|
|
55
|
+
Object {},
|
|
56
|
+
]
|
|
57
|
+
}
|
|
58
|
+
themePosition="topLeft"
|
|
59
|
+
/>
|
|
60
|
+
<View
|
|
61
|
+
collapsable={false}
|
|
62
|
+
nativeID="animatedComponent"
|
|
63
|
+
style={
|
|
64
|
+
Array [
|
|
65
|
+
Object {
|
|
66
|
+
"backgroundColor": "#7622d7",
|
|
67
|
+
"borderRadius": 8,
|
|
68
|
+
"height": 16,
|
|
69
|
+
"marginLeft": 8,
|
|
70
|
+
"opacity": 0.7,
|
|
71
|
+
"width": 16,
|
|
72
|
+
},
|
|
73
|
+
Object {},
|
|
74
|
+
]
|
|
75
|
+
}
|
|
76
|
+
themePosition="topRight"
|
|
77
|
+
/>
|
|
78
|
+
</View>
|
|
79
|
+
<View
|
|
80
|
+
collapsable={false}
|
|
81
|
+
nativeID="animatedComponent"
|
|
82
|
+
style={
|
|
83
|
+
Array [
|
|
84
|
+
Object {
|
|
85
|
+
"flexDirection": "row",
|
|
86
|
+
"marginBottom": 0,
|
|
87
|
+
},
|
|
88
|
+
Object {},
|
|
89
|
+
]
|
|
90
|
+
}
|
|
91
|
+
themePosition="bottom"
|
|
92
|
+
>
|
|
93
|
+
<View
|
|
94
|
+
collapsable={false}
|
|
95
|
+
nativeID="animatedComponent"
|
|
96
|
+
style={
|
|
97
|
+
Array [
|
|
98
|
+
Object {
|
|
99
|
+
"backgroundColor": "#7622d7",
|
|
100
|
+
"borderRadius": 8,
|
|
101
|
+
"height": 16,
|
|
102
|
+
"opacity": 0.5,
|
|
103
|
+
"width": 16,
|
|
104
|
+
},
|
|
105
|
+
Object {},
|
|
106
|
+
]
|
|
107
|
+
}
|
|
108
|
+
themePosition="bottomLeft"
|
|
109
|
+
/>
|
|
110
|
+
<View
|
|
111
|
+
collapsable={false}
|
|
112
|
+
nativeID="animatedComponent"
|
|
113
|
+
style={
|
|
114
|
+
Array [
|
|
115
|
+
Object {
|
|
116
|
+
"backgroundColor": "#7622d7",
|
|
117
|
+
"borderRadius": 8,
|
|
118
|
+
"height": 16,
|
|
119
|
+
"marginLeft": 8,
|
|
120
|
+
"opacity": 0.3,
|
|
121
|
+
"width": 16,
|
|
122
|
+
},
|
|
123
|
+
Object {},
|
|
124
|
+
]
|
|
125
|
+
}
|
|
126
|
+
themePosition="bottomRight"
|
|
127
|
+
/>
|
|
128
|
+
</View>
|
|
129
|
+
</View>
|
|
130
|
+
</View>
|
|
131
|
+
`;
|
|
132
|
+
|
|
133
|
+
exports[`StyledSpinnerRow renders correctly when position is bottom 1`] = `
|
|
134
|
+
<View
|
|
135
|
+
style={
|
|
136
|
+
Array [
|
|
137
|
+
Object {
|
|
138
|
+
"flexDirection": "row",
|
|
139
|
+
"marginBottom": 0,
|
|
140
|
+
},
|
|
141
|
+
undefined,
|
|
142
|
+
]
|
|
143
|
+
}
|
|
144
|
+
themePosition="bottom"
|
|
145
|
+
/>
|
|
146
|
+
`;
|
|
147
|
+
|
|
148
|
+
exports[`StyledSpinnerRow renders correctly when position is top 1`] = `
|
|
149
|
+
<View
|
|
150
|
+
style={
|
|
151
|
+
Array [
|
|
152
|
+
Object {
|
|
153
|
+
"flexDirection": "row",
|
|
154
|
+
"marginBottom": 8,
|
|
155
|
+
},
|
|
156
|
+
undefined,
|
|
157
|
+
]
|
|
158
|
+
}
|
|
159
|
+
themePosition="top"
|
|
160
|
+
/>
|
|
161
|
+
`;
|
|
162
|
+
|
|
163
|
+
exports[`StyledSpinnerText renders correctly when position is bottomLeft 1`] = `
|
|
164
|
+
<View
|
|
165
|
+
style={
|
|
166
|
+
Array [
|
|
167
|
+
Object {
|
|
168
|
+
"backgroundColor": "#7622d7",
|
|
169
|
+
"borderRadius": 8,
|
|
170
|
+
"height": 16,
|
|
171
|
+
"opacity": 0.5,
|
|
172
|
+
"width": 16,
|
|
173
|
+
},
|
|
174
|
+
undefined,
|
|
175
|
+
]
|
|
176
|
+
}
|
|
177
|
+
themePosition="bottomLeft"
|
|
178
|
+
/>
|
|
179
|
+
`;
|
|
180
|
+
|
|
181
|
+
exports[`StyledSpinnerText renders correctly when position is bottomRight 1`] = `
|
|
182
|
+
<View
|
|
183
|
+
style={
|
|
184
|
+
Array [
|
|
185
|
+
Object {
|
|
186
|
+
"backgroundColor": "#7622d7",
|
|
187
|
+
"borderRadius": 8,
|
|
188
|
+
"height": 16,
|
|
189
|
+
"marginLeft": 8,
|
|
190
|
+
"opacity": 0.3,
|
|
191
|
+
"width": 16,
|
|
192
|
+
},
|
|
193
|
+
undefined,
|
|
194
|
+
]
|
|
195
|
+
}
|
|
196
|
+
themePosition="bottomRight"
|
|
197
|
+
/>
|
|
198
|
+
`;
|
|
199
|
+
|
|
200
|
+
exports[`StyledSpinnerText renders correctly when position is topLeft 1`] = `
|
|
201
|
+
<View
|
|
202
|
+
style={
|
|
203
|
+
Array [
|
|
204
|
+
Object {
|
|
205
|
+
"backgroundColor": "#7622d7",
|
|
206
|
+
"borderRadius": 8,
|
|
207
|
+
"height": 16,
|
|
208
|
+
"opacity": 1,
|
|
209
|
+
"width": 16,
|
|
210
|
+
},
|
|
211
|
+
undefined,
|
|
212
|
+
]
|
|
213
|
+
}
|
|
214
|
+
themePosition="topLeft"
|
|
215
|
+
/>
|
|
216
|
+
`;
|
|
217
|
+
|
|
218
|
+
exports[`StyledSpinnerText renders correctly when position is topRight 1`] = `
|
|
219
|
+
<View
|
|
220
|
+
style={
|
|
221
|
+
Array [
|
|
222
|
+
Object {
|
|
223
|
+
"backgroundColor": "#7622d7",
|
|
224
|
+
"borderRadius": 8,
|
|
225
|
+
"height": 16,
|
|
226
|
+
"marginLeft": 8,
|
|
227
|
+
"opacity": 0.7,
|
|
228
|
+
"width": 16,
|
|
229
|
+
},
|
|
230
|
+
undefined,
|
|
231
|
+
]
|
|
232
|
+
}
|
|
233
|
+
themePosition="topRight"
|
|
234
|
+
/>
|
|
235
|
+
`;
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
+
|
|
3
|
+
exports[`Spinner renders correctly 1`] = `
|
|
4
|
+
<View
|
|
5
|
+
style={
|
|
6
|
+
Array [
|
|
7
|
+
Object {},
|
|
8
|
+
undefined,
|
|
9
|
+
]
|
|
10
|
+
}
|
|
11
|
+
>
|
|
12
|
+
<View
|
|
13
|
+
style={
|
|
14
|
+
Array [
|
|
15
|
+
Object {
|
|
16
|
+
"alignItems": "center",
|
|
17
|
+
"height": "100%",
|
|
18
|
+
"justifyContent": "center",
|
|
19
|
+
},
|
|
20
|
+
undefined,
|
|
21
|
+
]
|
|
22
|
+
}
|
|
23
|
+
testID="spinner"
|
|
24
|
+
>
|
|
25
|
+
<View
|
|
26
|
+
collapsable={false}
|
|
27
|
+
nativeID="animatedComponent"
|
|
28
|
+
style={
|
|
29
|
+
Object {
|
|
30
|
+
"transform": Array [
|
|
31
|
+
Object {
|
|
32
|
+
"rotate": "0deg",
|
|
33
|
+
},
|
|
34
|
+
],
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
>
|
|
38
|
+
<View
|
|
39
|
+
collapsable={false}
|
|
40
|
+
nativeID="animatedComponent"
|
|
41
|
+
style={
|
|
42
|
+
Array [
|
|
43
|
+
Object {
|
|
44
|
+
"flexDirection": "row",
|
|
45
|
+
"marginBottom": 8,
|
|
46
|
+
},
|
|
47
|
+
Object {},
|
|
48
|
+
]
|
|
49
|
+
}
|
|
50
|
+
themePosition="top"
|
|
51
|
+
>
|
|
52
|
+
<View
|
|
53
|
+
collapsable={false}
|
|
54
|
+
nativeID="animatedComponent"
|
|
55
|
+
style={
|
|
56
|
+
Array [
|
|
57
|
+
Object {
|
|
58
|
+
"backgroundColor": "#7622d7",
|
|
59
|
+
"borderRadius": 8,
|
|
60
|
+
"height": 16,
|
|
61
|
+
"opacity": 1,
|
|
62
|
+
"width": 16,
|
|
63
|
+
},
|
|
64
|
+
Object {},
|
|
65
|
+
]
|
|
66
|
+
}
|
|
67
|
+
themePosition="topLeft"
|
|
68
|
+
/>
|
|
69
|
+
<View
|
|
70
|
+
collapsable={false}
|
|
71
|
+
nativeID="animatedComponent"
|
|
72
|
+
style={
|
|
73
|
+
Array [
|
|
74
|
+
Object {
|
|
75
|
+
"backgroundColor": "#7622d7",
|
|
76
|
+
"borderRadius": 8,
|
|
77
|
+
"height": 16,
|
|
78
|
+
"marginLeft": 8,
|
|
79
|
+
"opacity": 0.7,
|
|
80
|
+
"width": 16,
|
|
81
|
+
},
|
|
82
|
+
Object {},
|
|
83
|
+
]
|
|
84
|
+
}
|
|
85
|
+
themePosition="topRight"
|
|
86
|
+
/>
|
|
87
|
+
</View>
|
|
88
|
+
<View
|
|
89
|
+
collapsable={false}
|
|
90
|
+
nativeID="animatedComponent"
|
|
91
|
+
style={
|
|
92
|
+
Array [
|
|
93
|
+
Object {
|
|
94
|
+
"flexDirection": "row",
|
|
95
|
+
"marginBottom": 0,
|
|
96
|
+
},
|
|
97
|
+
Object {},
|
|
98
|
+
]
|
|
99
|
+
}
|
|
100
|
+
themePosition="bottom"
|
|
101
|
+
>
|
|
102
|
+
<View
|
|
103
|
+
collapsable={false}
|
|
104
|
+
nativeID="animatedComponent"
|
|
105
|
+
style={
|
|
106
|
+
Array [
|
|
107
|
+
Object {
|
|
108
|
+
"backgroundColor": "#7622d7",
|
|
109
|
+
"borderRadius": 8,
|
|
110
|
+
"height": 16,
|
|
111
|
+
"opacity": 0.5,
|
|
112
|
+
"width": 16,
|
|
113
|
+
},
|
|
114
|
+
Object {},
|
|
115
|
+
]
|
|
116
|
+
}
|
|
117
|
+
themePosition="bottomLeft"
|
|
118
|
+
/>
|
|
119
|
+
<View
|
|
120
|
+
collapsable={false}
|
|
121
|
+
nativeID="animatedComponent"
|
|
122
|
+
style={
|
|
123
|
+
Array [
|
|
124
|
+
Object {
|
|
125
|
+
"backgroundColor": "#7622d7",
|
|
126
|
+
"borderRadius": 8,
|
|
127
|
+
"height": 16,
|
|
128
|
+
"marginLeft": 8,
|
|
129
|
+
"opacity": 0.3,
|
|
130
|
+
"width": 16,
|
|
131
|
+
},
|
|
132
|
+
Object {},
|
|
133
|
+
]
|
|
134
|
+
}
|
|
135
|
+
themePosition="bottomRight"
|
|
136
|
+
/>
|
|
137
|
+
</View>
|
|
138
|
+
</View>
|
|
139
|
+
</View>
|
|
140
|
+
</View>
|
|
141
|
+
`;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
import renderWithTheme from '../../../testHelpers/renderWithTheme';
|
|
4
|
+
import Spinner from '..';
|
|
5
|
+
|
|
6
|
+
describe('Spinner', () => {
|
|
7
|
+
it('renders correctly', () => {
|
|
8
|
+
const { toJSON } = renderWithTheme(<Spinner testID="spinner" />);
|
|
9
|
+
|
|
10
|
+
expect(toJSON()).toMatchSnapshot();
|
|
11
|
+
});
|
|
12
|
+
});
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React, { ReactElement } from 'react';
|
|
2
|
+
import { ViewProps } from 'react-native';
|
|
3
|
+
|
|
4
|
+
import { StyledSpinnerContainer, StyledView } from './StyledSpinner';
|
|
5
|
+
import { AnimatedSpinner } from './AnimatedSpinner';
|
|
6
|
+
|
|
7
|
+
interface SpinnerProps extends ViewProps {
|
|
8
|
+
/**
|
|
9
|
+
* Testing id of the component.
|
|
10
|
+
*/
|
|
11
|
+
testID?: string;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
const Spinner = ({ testID, ...nativeProps }: SpinnerProps): ReactElement => (
|
|
15
|
+
<StyledView {...nativeProps}>
|
|
16
|
+
<StyledSpinnerContainer testID={testID}>
|
|
17
|
+
<AnimatedSpinner />
|
|
18
|
+
</StyledSpinnerContainer>
|
|
19
|
+
</StyledView>
|
|
20
|
+
);
|
|
21
|
+
|
|
22
|
+
export default Spinner;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import styled from '@emotion/native';
|
|
2
|
+
import { Animated, View } from 'react-native';
|
|
3
|
+
|
|
4
|
+
type ThemeSize = 'small' | 'medium';
|
|
5
|
+
|
|
6
|
+
const StyledWrapper = styled(View)<{
|
|
7
|
+
themeChecked: boolean | undefined;
|
|
8
|
+
themeSize: ThemeSize;
|
|
9
|
+
}>(({ theme, themeChecked, themeSize }) => ({
|
|
10
|
+
height: theme.__hd__.switch.heights[themeSize],
|
|
11
|
+
width: theme.__hd__.switch.widths[themeSize],
|
|
12
|
+
paddingHorizontal: theme.__hd__.switch.spaces[themeSize],
|
|
13
|
+
borderRadius: theme.__hd__.switch.radii.rounded,
|
|
14
|
+
backgroundColor: themeChecked
|
|
15
|
+
? theme.__hd__.switch.colors.active
|
|
16
|
+
: theme.__hd__.switch.colors.inactive,
|
|
17
|
+
}));
|
|
18
|
+
|
|
19
|
+
const StyledDisabledWrapper = styled(View)<{
|
|
20
|
+
themeSize: ThemeSize;
|
|
21
|
+
}>(({ theme, themeSize }) => ({
|
|
22
|
+
position: 'absolute',
|
|
23
|
+
height: theme.__hd__.switch.heights[themeSize],
|
|
24
|
+
width: theme.__hd__.switch.widths[themeSize],
|
|
25
|
+
borderRadius: theme.__hd__.switch.radii.rounded,
|
|
26
|
+
backgroundColor: theme.__hd__.switch.colors.thumb,
|
|
27
|
+
zIndex: 9999,
|
|
28
|
+
opacity: 0.8,
|
|
29
|
+
}));
|
|
30
|
+
|
|
31
|
+
const StyledThumbWrapper = styled(View)<{
|
|
32
|
+
themeSize: ThemeSize;
|
|
33
|
+
}>(({ theme, themeSize }) => ({
|
|
34
|
+
height: theme.__hd__.switch.heights[themeSize],
|
|
35
|
+
width: theme.__hd__.switch.widths[themeSize],
|
|
36
|
+
borderRadius: theme.__hd__.switch.radii.rounded,
|
|
37
|
+
display: 'flex',
|
|
38
|
+
justifyContent: 'center',
|
|
39
|
+
}));
|
|
40
|
+
|
|
41
|
+
const StyledKnot = styled(Animated.View)<{
|
|
42
|
+
themeSize: ThemeSize;
|
|
43
|
+
}>(({ theme, themeSize }) => ({
|
|
44
|
+
width: theme.__hd__.switch.thumbSizes[themeSize],
|
|
45
|
+
height: theme.__hd__.switch.thumbSizes[themeSize],
|
|
46
|
+
backgroundColor: theme.__hd__.switch.colors.thumb,
|
|
47
|
+
borderRadius: theme.__hd__.switch.radii.rounded,
|
|
48
|
+
}));
|
|
49
|
+
|
|
50
|
+
export { StyledWrapper, StyledDisabledWrapper, StyledThumbWrapper, StyledKnot };
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import renderWithTheme from '../../../testHelpers/renderWithTheme';
|
|
3
|
+
import {
|
|
4
|
+
StyledWrapper,
|
|
5
|
+
StyledDisabledWrapper,
|
|
6
|
+
StyledThumbWrapper,
|
|
7
|
+
StyledKnot,
|
|
8
|
+
} from '../StyledSwitch';
|
|
9
|
+
|
|
10
|
+
describe('StyledWrapper', () => {
|
|
11
|
+
it('renders correct style', () => {
|
|
12
|
+
const { toJSON } = renderWithTheme(
|
|
13
|
+
<StyledWrapper themeChecked themeSize="medium" />
|
|
14
|
+
);
|
|
15
|
+
expect(toJSON()).toMatchSnapshot();
|
|
16
|
+
});
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
describe('StyledDisabledWrapper', () => {
|
|
20
|
+
it('renders correct style', () => {
|
|
21
|
+
const { toJSON } = renderWithTheme(
|
|
22
|
+
<StyledDisabledWrapper themeSize="medium" />
|
|
23
|
+
);
|
|
24
|
+
expect(toJSON()).toMatchSnapshot();
|
|
25
|
+
});
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
describe('StyledThumbWrapper', () => {
|
|
29
|
+
it('renders correct style', () => {
|
|
30
|
+
const { toJSON } = renderWithTheme(
|
|
31
|
+
<StyledThumbWrapper themeSize="medium" />
|
|
32
|
+
);
|
|
33
|
+
expect(toJSON()).toMatchSnapshot();
|
|
34
|
+
});
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
describe('StyledKnot', () => {
|
|
38
|
+
it('renders correct style', () => {
|
|
39
|
+
const { toJSON } = renderWithTheme(<StyledKnot themeSize="medium" />);
|
|
40
|
+
expect(toJSON()).toMatchSnapshot();
|
|
41
|
+
});
|
|
42
|
+
});
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
+
|
|
3
|
+
exports[`StyledDisabledWrapper renders correct style 1`] = `
|
|
4
|
+
<View
|
|
5
|
+
style={
|
|
6
|
+
Array [
|
|
7
|
+
Object {
|
|
8
|
+
"backgroundColor": "#ffffff",
|
|
9
|
+
"borderRadius": 999,
|
|
10
|
+
"height": 28.799999999999997,
|
|
11
|
+
"opacity": 0.8,
|
|
12
|
+
"position": "absolute",
|
|
13
|
+
"width": 56,
|
|
14
|
+
"zIndex": 9999,
|
|
15
|
+
},
|
|
16
|
+
undefined,
|
|
17
|
+
]
|
|
18
|
+
}
|
|
19
|
+
themeSize="medium"
|
|
20
|
+
/>
|
|
21
|
+
`;
|
|
22
|
+
|
|
23
|
+
exports[`StyledKnot renders correct style 1`] = `
|
|
24
|
+
<View
|
|
25
|
+
collapsable={false}
|
|
26
|
+
nativeID="animatedComponent"
|
|
27
|
+
style={
|
|
28
|
+
Object {
|
|
29
|
+
"backgroundColor": "#ffffff",
|
|
30
|
+
"borderRadius": 999,
|
|
31
|
+
"height": 20.8,
|
|
32
|
+
"width": 20.8,
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
themeSize="medium"
|
|
36
|
+
/>
|
|
37
|
+
`;
|
|
38
|
+
|
|
39
|
+
exports[`StyledThumbWrapper renders correct style 1`] = `
|
|
40
|
+
<View
|
|
41
|
+
style={
|
|
42
|
+
Array [
|
|
43
|
+
Object {
|
|
44
|
+
"borderRadius": 999,
|
|
45
|
+
"display": "flex",
|
|
46
|
+
"height": 28.799999999999997,
|
|
47
|
+
"justifyContent": "center",
|
|
48
|
+
"width": 56,
|
|
49
|
+
},
|
|
50
|
+
undefined,
|
|
51
|
+
]
|
|
52
|
+
}
|
|
53
|
+
themeSize="medium"
|
|
54
|
+
/>
|
|
55
|
+
`;
|
|
56
|
+
|
|
57
|
+
exports[`StyledWrapper renders correct style 1`] = `
|
|
58
|
+
<View
|
|
59
|
+
style={
|
|
60
|
+
Array [
|
|
61
|
+
Object {
|
|
62
|
+
"backgroundColor": "#7622d7",
|
|
63
|
+
"borderRadius": 999,
|
|
64
|
+
"height": 28.799999999999997,
|
|
65
|
+
"paddingHorizontal": 4,
|
|
66
|
+
"width": 56,
|
|
67
|
+
},
|
|
68
|
+
undefined,
|
|
69
|
+
]
|
|
70
|
+
}
|
|
71
|
+
themeChecked={true}
|
|
72
|
+
themeSize="medium"
|
|
73
|
+
/>
|
|
74
|
+
`;
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
+
|
|
3
|
+
exports[`Switch renders correctly 1`] = `
|
|
4
|
+
<View
|
|
5
|
+
accessibilityState={
|
|
6
|
+
Object {
|
|
7
|
+
"disabled": false,
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
accessible={true}
|
|
11
|
+
focusable={false}
|
|
12
|
+
onClick={[Function]}
|
|
13
|
+
onResponderGrant={[Function]}
|
|
14
|
+
onResponderMove={[Function]}
|
|
15
|
+
onResponderRelease={[Function]}
|
|
16
|
+
onResponderTerminate={[Function]}
|
|
17
|
+
onResponderTerminationRequest={[Function]}
|
|
18
|
+
onStartShouldSetResponder={[Function]}
|
|
19
|
+
style={
|
|
20
|
+
Array [
|
|
21
|
+
Object {
|
|
22
|
+
"backgroundColor": "#727478",
|
|
23
|
+
"borderRadius": 999,
|
|
24
|
+
"height": 28.799999999999997,
|
|
25
|
+
"paddingHorizontal": 4,
|
|
26
|
+
"width": 56,
|
|
27
|
+
},
|
|
28
|
+
undefined,
|
|
29
|
+
]
|
|
30
|
+
}
|
|
31
|
+
testID="switch"
|
|
32
|
+
themeSize="medium"
|
|
33
|
+
>
|
|
34
|
+
<View
|
|
35
|
+
style={
|
|
36
|
+
Array [
|
|
37
|
+
Object {
|
|
38
|
+
"borderRadius": 999,
|
|
39
|
+
"display": "flex",
|
|
40
|
+
"height": 28.799999999999997,
|
|
41
|
+
"justifyContent": "center",
|
|
42
|
+
"width": 56,
|
|
43
|
+
},
|
|
44
|
+
undefined,
|
|
45
|
+
]
|
|
46
|
+
}
|
|
47
|
+
themeSize="medium"
|
|
48
|
+
>
|
|
49
|
+
<View
|
|
50
|
+
collapsable={false}
|
|
51
|
+
nativeID="animatedComponent"
|
|
52
|
+
style={
|
|
53
|
+
Object {
|
|
54
|
+
"backgroundColor": "#ffffff",
|
|
55
|
+
"borderRadius": 999,
|
|
56
|
+
"height": 20.8,
|
|
57
|
+
"left": 0,
|
|
58
|
+
"width": 20.8,
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
themeSize="medium"
|
|
62
|
+
/>
|
|
63
|
+
</View>
|
|
64
|
+
</View>
|
|
65
|
+
`;
|
|
66
|
+
|
|
67
|
+
exports[`Switch trigger press function correctly 1`] = `
|
|
68
|
+
<View
|
|
69
|
+
accessibilityState={
|
|
70
|
+
Object {
|
|
71
|
+
"disabled": false,
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
accessible={true}
|
|
75
|
+
focusable={true}
|
|
76
|
+
onClick={[Function]}
|
|
77
|
+
onResponderGrant={[Function]}
|
|
78
|
+
onResponderMove={[Function]}
|
|
79
|
+
onResponderRelease={[Function]}
|
|
80
|
+
onResponderTerminate={[Function]}
|
|
81
|
+
onResponderTerminationRequest={[Function]}
|
|
82
|
+
onStartShouldSetResponder={[Function]}
|
|
83
|
+
style={
|
|
84
|
+
Array [
|
|
85
|
+
Object {
|
|
86
|
+
"backgroundColor": "#727478",
|
|
87
|
+
"borderRadius": 999,
|
|
88
|
+
"height": 28.799999999999997,
|
|
89
|
+
"paddingHorizontal": 4,
|
|
90
|
+
"width": 56,
|
|
91
|
+
},
|
|
92
|
+
undefined,
|
|
93
|
+
]
|
|
94
|
+
}
|
|
95
|
+
testID="switch"
|
|
96
|
+
themeSize="medium"
|
|
97
|
+
>
|
|
98
|
+
<View
|
|
99
|
+
style={
|
|
100
|
+
Array [
|
|
101
|
+
Object {
|
|
102
|
+
"borderRadius": 999,
|
|
103
|
+
"display": "flex",
|
|
104
|
+
"height": 28.799999999999997,
|
|
105
|
+
"justifyContent": "center",
|
|
106
|
+
"width": 56,
|
|
107
|
+
},
|
|
108
|
+
undefined,
|
|
109
|
+
]
|
|
110
|
+
}
|
|
111
|
+
themeSize="medium"
|
|
112
|
+
>
|
|
113
|
+
<View
|
|
114
|
+
collapsable={false}
|
|
115
|
+
nativeID="animatedComponent"
|
|
116
|
+
style={
|
|
117
|
+
Object {
|
|
118
|
+
"backgroundColor": "#ffffff",
|
|
119
|
+
"borderRadius": 999,
|
|
120
|
+
"height": 20.8,
|
|
121
|
+
"left": 0,
|
|
122
|
+
"width": 20.8,
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
themeSize="medium"
|
|
126
|
+
/>
|
|
127
|
+
</View>
|
|
128
|
+
</View>
|
|
129
|
+
`;
|