@hero-design/rn 7.5.0 → 7.6.1-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +2 -2
- package/.turbo/turbo-build:types.log +2 -0
- package/.turbo/turbo-build:watch.log +1 -0
- package/.turbo/turbo-lint.log +2 -0
- package/.turbo/turbo-type-check.log +2 -0
- package/es/components/Avatar/StyledAvatar.d.ts +46 -0
- package/es/components/Avatar/__tests__/StyledAvatar.spec.d.ts +1 -0
- package/es/components/Avatar/__tests__/index.spec.d.ts +1 -0
- package/es/components/Avatar/index.d.ts +25 -0
- package/es/components/Badge/Status.d.ts +24 -0
- package/es/components/Badge/StyledBadge.d.ts +28 -0
- package/es/components/Badge/__tests__/Badge.spec.d.ts +1 -0
- package/es/components/Badge/__tests__/Status.spec.d.ts +1 -0
- package/es/components/Badge/index.d.ts +32 -0
- package/es/components/BottomNavigation/StyledBottomNavigation.d.ts +52 -0
- package/es/components/BottomNavigation/__tests__/index.spec.d.ts +1 -0
- package/es/components/BottomNavigation/index.d.ts +45 -0
- package/es/components/Button/IconButton.d.ts +34 -0
- package/es/components/Button/__tests__/index.spec.d.ts +1 -0
- package/es/components/Button/index.d.ts +4 -0
- package/es/components/Card/StyledCard.d.ts +17 -0
- package/es/components/Card/__tests__/StyledCard.spec.d.ts +1 -0
- package/es/components/Card/__tests__/index.spec.d.ts +1 -0
- package/es/components/Card/index.d.ts +22 -0
- package/es/components/Collapse/StyledCollapse.d.ts +15 -0
- package/es/components/Collapse/__tests__/StyledCollapse.spec.d.ts +1 -0
- package/es/components/Collapse/__tests__/index.spec.d.ts +1 -0
- package/es/components/Collapse/index.d.ts +23 -0
- package/es/components/Divider/StyledDivider.d.ts +13 -0
- package/es/components/Divider/__tests__/StyledDivider.spec.d.ts +1 -0
- package/es/components/Divider/index.d.ts +21 -0
- package/es/components/Drawer/StyledDrawer.d.ts +25 -0
- package/es/components/Drawer/__tests__/index.spec.d.ts +1 -0
- package/es/components/Drawer/index.d.ts +25 -0
- package/es/components/FAB/ActionGroup/ActionItem.d.ts +12 -0
- package/es/components/FAB/ActionGroup/StyledActionGroup.d.ts +30 -0
- package/es/components/FAB/ActionGroup/StyledActionItem.d.ts +13 -0
- package/es/components/FAB/ActionGroup/__tests__/index.spec.d.ts +1 -0
- package/es/components/FAB/ActionGroup/index.d.ts +34 -0
- package/es/components/FAB/AnimatedFABIcon.d.ts +6 -0
- package/es/components/FAB/FAB.d.ts +34 -0
- package/es/components/FAB/StyledFAB.d.ts +20 -0
- package/es/components/FAB/__tests__/AnimatedFABIcon.spec.d.ts +1 -0
- package/es/components/FAB/__tests__/StyledFAB.spec.d.ts +1 -0
- package/es/components/FAB/__tests__/index.spec.d.ts +1 -0
- package/es/components/FAB/index.d.ts +4 -0
- package/es/components/Icon/HeroIcon/index.d.ts +13 -0
- package/es/components/Icon/IconList.d.ts +2 -0
- package/es/components/Icon/__tests__/index.spec.d.ts +1 -0
- package/es/components/Icon/index.d.ts +27 -0
- package/es/components/Icon/utils.d.ts +2 -0
- package/es/components/Progress/ProgressBar.d.ts +18 -0
- package/es/components/Progress/ProgressCircle.d.ts +18 -0
- package/es/components/Progress/StyledProgressBar.d.ts +18 -0
- package/es/components/Progress/StyledProgressCircle.d.ts +38 -0
- package/es/components/Progress/index.d.ts +5 -0
- package/es/components/Progress/types.d.ts +1 -0
- package/es/components/Tabs/ActiveTabIndicator.d.ts +8 -0
- package/es/components/Tabs/ScrollableTabs.d.ts +3 -0
- package/es/components/Tabs/StyledScrollableTabs.d.ts +61 -0
- package/es/components/Tabs/StyledTabs.d.ts +55 -0
- package/es/components/Tabs/__tests__/ScrollableTabs.spec.d.ts +1 -0
- package/es/components/Tabs/__tests__/index.spec.d.ts +1 -0
- package/es/components/Tabs/index.d.ts +54 -0
- package/es/components/Tabs/utils.d.ts +2 -0
- package/es/components/Tag/StyledTag.d.ts +20 -0
- package/es/components/Tag/__tests__/Tag.spec.d.ts +1 -0
- package/es/components/Tag/index.d.ts +21 -0
- package/es/components/Typography/Text/StyledText.d.ts +13 -0
- package/es/components/Typography/Text/__tests__/StyledText.spec.d.ts +1 -0
- package/es/components/Typography/Text/__tests__/index.spec.d.ts +1 -0
- package/es/components/Typography/Text/index.d.ts +30 -0
- package/es/components/Typography/index.d.ts +6 -0
- package/es/index.d.ts +19 -0
- package/es/index.js +647 -2551
- package/es/theme/__tests__/index.spec.d.ts +1 -0
- package/es/theme/components/avatar.d.ts +32 -0
- package/es/theme/components/badge.d.ts +29 -0
- package/es/theme/components/bottomNavigation.d.ts +23 -0
- package/es/theme/components/card.d.ts +10 -0
- package/es/theme/components/divider.d.ts +17 -0
- package/es/theme/components/drawer.d.ts +21 -0
- package/es/theme/components/fab.d.ts +51 -0
- package/es/theme/components/icon.d.ts +19 -0
- package/es/theme/components/progress.d.ts +21 -0
- package/es/theme/components/tabs.d.ts +27 -0
- package/es/theme/components/tag.d.ts +30 -0
- package/es/theme/components/typography.d.ts +26 -0
- package/es/theme/global/borders.d.ts +11 -0
- package/es/theme/global/colors.d.ts +29 -0
- package/es/theme/global/index.d.ts +39 -0
- package/es/theme/global/scale.d.ts +9 -0
- package/es/theme/global/space.d.ts +13 -0
- package/es/theme/global/typography.d.ts +21 -0
- package/es/theme/index.d.ts +33 -0
- package/es/types.d.ts +5 -0
- package/es/utils/__tests__/scale.spec.d.ts +1 -0
- package/es/utils/helpers.d.ts +2 -0
- package/es/utils/hooks.d.ts +1 -0
- package/es/utils/scale.d.ts +3 -0
- package/lib/components/Avatar/StyledAvatar.d.ts +46 -0
- package/lib/components/Avatar/__tests__/StyledAvatar.spec.d.ts +1 -0
- package/lib/components/Avatar/__tests__/index.spec.d.ts +1 -0
- package/lib/components/Avatar/index.d.ts +25 -0
- package/lib/components/Badge/Status.d.ts +24 -0
- package/lib/components/Badge/StyledBadge.d.ts +28 -0
- package/lib/components/Badge/__tests__/Badge.spec.d.ts +1 -0
- package/lib/components/Badge/__tests__/Status.spec.d.ts +1 -0
- package/lib/components/Badge/index.d.ts +32 -0
- package/lib/components/BottomNavigation/StyledBottomNavigation.d.ts +52 -0
- package/lib/components/BottomNavigation/__tests__/index.spec.d.ts +1 -0
- package/lib/components/BottomNavigation/index.d.ts +45 -0
- package/lib/components/Button/IconButton.d.ts +34 -0
- package/lib/components/Button/__tests__/index.spec.d.ts +1 -0
- package/lib/components/Button/index.d.ts +4 -0
- package/lib/components/Card/StyledCard.d.ts +17 -0
- package/lib/components/Card/__tests__/StyledCard.spec.d.ts +1 -0
- package/lib/components/Card/__tests__/index.spec.d.ts +1 -0
- package/lib/components/Card/index.d.ts +22 -0
- package/lib/components/Collapse/StyledCollapse.d.ts +15 -0
- package/lib/components/Collapse/__tests__/StyledCollapse.spec.d.ts +1 -0
- package/lib/components/Collapse/__tests__/index.spec.d.ts +1 -0
- package/lib/components/Collapse/index.d.ts +23 -0
- package/lib/components/Divider/StyledDivider.d.ts +13 -0
- package/lib/components/Divider/__tests__/StyledDivider.spec.d.ts +1 -0
- package/lib/components/Divider/index.d.ts +21 -0
- package/lib/components/Drawer/StyledDrawer.d.ts +25 -0
- package/lib/components/Drawer/__tests__/index.spec.d.ts +1 -0
- package/lib/components/Drawer/index.d.ts +25 -0
- package/lib/components/FAB/ActionGroup/ActionItem.d.ts +12 -0
- package/lib/components/FAB/ActionGroup/StyledActionGroup.d.ts +30 -0
- package/lib/components/FAB/ActionGroup/StyledActionItem.d.ts +13 -0
- package/lib/components/FAB/ActionGroup/__tests__/index.spec.d.ts +1 -0
- package/lib/components/FAB/ActionGroup/index.d.ts +34 -0
- package/lib/components/FAB/AnimatedFABIcon.d.ts +6 -0
- package/lib/components/FAB/FAB.d.ts +34 -0
- package/lib/components/FAB/StyledFAB.d.ts +20 -0
- package/lib/components/FAB/__tests__/AnimatedFABIcon.spec.d.ts +1 -0
- package/lib/components/FAB/__tests__/StyledFAB.spec.d.ts +1 -0
- package/lib/components/FAB/__tests__/index.spec.d.ts +1 -0
- package/lib/components/FAB/index.d.ts +4 -0
- package/lib/components/Icon/HeroIcon/index.d.ts +13 -0
- package/lib/components/Icon/IconList.d.ts +2 -0
- package/lib/components/Icon/__tests__/index.spec.d.ts +1 -0
- package/lib/components/Icon/index.d.ts +27 -0
- package/lib/components/Icon/utils.d.ts +2 -0
- package/lib/components/Progress/ProgressBar.d.ts +18 -0
- package/lib/components/Progress/ProgressCircle.d.ts +18 -0
- package/lib/components/Progress/StyledProgressBar.d.ts +18 -0
- package/lib/components/Progress/StyledProgressCircle.d.ts +38 -0
- package/lib/components/Progress/index.d.ts +5 -0
- package/lib/components/Progress/types.d.ts +1 -0
- package/lib/components/Tabs/ActiveTabIndicator.d.ts +8 -0
- package/lib/components/Tabs/ScrollableTabs.d.ts +3 -0
- package/lib/components/Tabs/StyledScrollableTabs.d.ts +61 -0
- package/lib/components/Tabs/StyledTabs.d.ts +55 -0
- package/lib/components/Tabs/__tests__/ScrollableTabs.spec.d.ts +1 -0
- package/lib/components/Tabs/__tests__/index.spec.d.ts +1 -0
- package/lib/components/Tabs/index.d.ts +54 -0
- package/lib/components/Tabs/utils.d.ts +2 -0
- package/lib/components/Tag/StyledTag.d.ts +20 -0
- package/lib/components/Tag/__tests__/Tag.spec.d.ts +1 -0
- package/lib/components/Tag/index.d.ts +21 -0
- package/lib/components/Typography/Text/StyledText.d.ts +13 -0
- package/lib/components/Typography/Text/__tests__/StyledText.spec.d.ts +1 -0
- package/lib/components/Typography/Text/__tests__/index.spec.d.ts +1 -0
- package/lib/components/Typography/Text/index.d.ts +30 -0
- package/lib/components/Typography/index.d.ts +6 -0
- package/lib/index.d.ts +19 -0
- package/lib/index.js +798 -2700
- package/lib/theme/__tests__/index.spec.d.ts +1 -0
- package/lib/theme/components/avatar.d.ts +32 -0
- package/lib/theme/components/badge.d.ts +29 -0
- package/lib/theme/components/bottomNavigation.d.ts +23 -0
- package/lib/theme/components/card.d.ts +10 -0
- package/lib/theme/components/divider.d.ts +17 -0
- package/lib/theme/components/drawer.d.ts +21 -0
- package/lib/theme/components/fab.d.ts +51 -0
- package/lib/theme/components/icon.d.ts +19 -0
- package/lib/theme/components/progress.d.ts +21 -0
- package/lib/theme/components/tabs.d.ts +27 -0
- package/lib/theme/components/tag.d.ts +30 -0
- package/lib/theme/components/typography.d.ts +26 -0
- package/lib/theme/global/borders.d.ts +11 -0
- package/lib/theme/global/colors.d.ts +29 -0
- package/lib/theme/global/index.d.ts +39 -0
- package/lib/theme/global/scale.d.ts +9 -0
- package/lib/theme/global/space.d.ts +13 -0
- package/lib/theme/global/typography.d.ts +21 -0
- package/lib/theme/index.d.ts +33 -0
- package/lib/types.d.ts +5 -0
- package/lib/utils/__tests__/scale.spec.d.ts +1 -0
- package/lib/utils/helpers.d.ts +2 -0
- package/lib/utils/hooks.d.ts +1 -0
- package/lib/utils/scale.d.ts +3 -0
- package/package.json +2 -4
- package/playground/package.json +3 -3
- package/playground/src/App.tsx +6 -0
- package/playground/src/ContentNavigator.tsx +3 -10
- package/playground/src/Select.tsx +32 -0
- package/playground/src/Switch.tsx +80 -0
- package/rollup.config.js +7 -1
- package/src/components/BottomSheet/Header.tsx +1 -1
- package/src/components/BottomSheet/__tests__/__snapshots__/index.spec.tsx.snap +8 -8
- package/src/components/BottomSheet/index.tsx +6 -0
- package/src/components/Radio/RadioGroup.tsx +31 -7
- package/src/components/Radio/types.ts +1 -0
- package/src/components/SectionHeading/StyledHeading.tsx +5 -5
- package/src/components/SectionHeading/__tests__/{StyledHeading.tsx → StyledHeading.spec.tsx} +0 -0
- package/src/components/SectionHeading/__tests__/__snapshots__/{StyledHeading.tsx.snap → StyledHeading.spec.tsx.snap} +0 -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/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 +2 -6
- package/src/components/TextInput/__tests__/StyledTextInput.spec.tsx +1 -7
- package/src/components/TextInput/__tests__/__snapshots__/StyledTextInput.spec.tsx.snap +1 -22
- package/src/components/TextInput/__tests__/index.spec.tsx +2 -1
- package/src/components/TextInput/index.tsx +19 -6
- package/src/index.ts +5 -2
- package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +58 -1
- package/src/theme/components/sectionHeading.ts +18 -0
- package/src/theme/components/select.ts +23 -0
- package/src/theme/components/switch.ts +50 -0
- package/src/theme/components/textInput.ts +1 -1
- package/src/theme/global/colors.ts +1 -0
- package/src/theme/index.ts +27 -4
- package/types/components/Avatar/StyledAvatar.d.ts +0 -0
- package/types/components/Avatar/__tests__/StyledAvatar.spec.d.ts +0 -0
- package/types/components/Avatar/__tests__/index.spec.d.ts +0 -0
- package/types/components/Avatar/index.d.ts +0 -0
- package/types/components/Badge/Status.d.ts +0 -0
- package/types/components/Badge/StyledBadge.d.ts +0 -0
- package/types/components/Badge/__tests__/Badge.spec.d.ts +0 -0
- package/types/components/Badge/__tests__/Status.spec.d.ts +0 -0
- package/types/components/Badge/index.d.ts +0 -0
- package/types/components/BottomNavigation/StyledBottomNavigation.d.ts +0 -0
- package/types/components/BottomNavigation/__tests__/index.spec.d.ts +0 -0
- package/types/components/BottomNavigation/index.d.ts +0 -0
- package/types/components/BottomSheet/Footer.d.ts +0 -0
- package/types/components/BottomSheet/Header.d.ts +0 -0
- package/types/components/BottomSheet/StyledBottomSheet.d.ts +0 -0
- package/types/components/BottomSheet/__tests__/index.spec.d.ts +0 -0
- package/types/components/BottomSheet/index.d.ts +5 -1
- package/types/components/Button/Button.d.ts +0 -0
- package/types/components/Button/IconButton.d.ts +0 -0
- package/types/components/Button/LoadingIndicator/StyledLoadingIndicator.d.ts +0 -0
- package/types/components/Button/LoadingIndicator/__tests__/StyledLoadingIndicator.spec.d.ts +0 -0
- package/types/components/Button/LoadingIndicator/__tests__/index.spec.d.ts +0 -0
- package/types/components/Button/LoadingIndicator/index.d.ts +0 -0
- package/types/components/Button/StyledButton.d.ts +0 -0
- package/types/components/Button/__tests__/Button.spec.d.ts +0 -0
- package/types/components/Button/__tests__/IconButton.spec.d.ts +0 -0
- package/types/components/Button/__tests__/StyledButton.spec.d.ts +0 -0
- package/types/components/Button/index.d.ts +0 -0
- package/types/components/Card/StyledCard.d.ts +0 -0
- package/types/components/Card/__tests__/StyledCard.spec.d.ts +0 -0
- package/types/components/Card/__tests__/index.spec.d.ts +0 -0
- package/types/components/Card/index.d.ts +0 -0
- package/types/components/Checkbox/StyledCheckbox.d.ts +8 -0
- package/types/components/Checkbox/__tests__/StyledCheckbox.spec.d.ts +1 -0
- package/types/components/Checkbox/__tests__/index.spec.d.ts +1 -0
- package/types/components/Checkbox/index.d.ts +25 -0
- package/types/components/Collapse/StyledCollapse.d.ts +0 -0
- package/types/components/Collapse/__tests__/StyledCollapse.spec.d.ts +0 -0
- package/types/components/Collapse/__tests__/index.spec.d.ts +0 -0
- package/types/components/Collapse/index.d.ts +0 -0
- package/types/components/ContentNavigator/StyledContentNavigator.d.ts +0 -0
- package/types/components/ContentNavigator/__tests__/StyledContentNavigator.spec.d.ts +0 -0
- package/types/components/ContentNavigator/__tests__/index.spec.d.ts +0 -0
- package/types/components/ContentNavigator/index.d.ts +0 -0
- package/types/components/Divider/StyledDivider.d.ts +0 -0
- package/types/components/Divider/__tests__/StyledDivider.spec.d.ts +0 -0
- package/types/components/Divider/index.d.ts +0 -0
- package/types/components/Drawer/StyledDrawer.d.ts +0 -0
- package/types/components/Drawer/__tests__/index.spec.d.ts +0 -0
- package/types/components/Drawer/index.d.ts +0 -0
- package/types/components/FAB/ActionGroup/ActionItem.d.ts +0 -0
- package/types/components/FAB/ActionGroup/StyledActionGroup.d.ts +0 -0
- package/types/components/FAB/ActionGroup/StyledActionItem.d.ts +0 -0
- package/types/components/FAB/ActionGroup/__tests__/index.spec.d.ts +0 -0
- package/types/components/FAB/ActionGroup/index.d.ts +0 -0
- package/types/components/FAB/AnimatedFABIcon.d.ts +0 -0
- package/types/components/FAB/FAB.d.ts +0 -0
- package/types/components/FAB/StyledFAB.d.ts +0 -0
- package/types/components/FAB/__tests__/AnimatedFABIcon.spec.d.ts +0 -0
- package/types/components/FAB/__tests__/StyledFAB.spec.d.ts +0 -0
- package/types/components/FAB/__tests__/index.spec.d.ts +0 -0
- package/types/components/FAB/index.d.ts +0 -0
- package/types/components/Icon/HeroIcon/index.d.ts +0 -0
- package/types/components/Icon/IconList.d.ts +0 -0
- package/types/components/Icon/__tests__/index.spec.d.ts +0 -0
- package/types/components/Icon/index.d.ts +0 -0
- package/types/components/Icon/utils.d.ts +0 -0
- package/types/components/Progress/ProgressBar.d.ts +0 -0
- package/types/components/Progress/ProgressCircle.d.ts +0 -0
- package/types/components/Progress/StyledProgressBar.d.ts +0 -0
- package/types/components/Progress/StyledProgressCircle.d.ts +0 -0
- package/types/components/Progress/__tests__/index.spec.d.ts +0 -0
- package/types/components/Progress/index.d.ts +0 -0
- package/types/components/Progress/types.d.ts +0 -0
- package/types/components/Radio/Radio.d.ts +0 -0
- package/types/components/Radio/RadioGroup.d.ts +11 -8
- package/types/components/Radio/StyledRadio.d.ts +0 -0
- package/types/components/Radio/__tests__/Radio.spec.d.ts +0 -0
- package/types/components/Radio/__tests__/RadioGroup.spec.d.ts +0 -0
- package/types/components/Radio/__tests__/StyledRadio.spec.d.ts +0 -0
- package/types/components/Radio/index.d.ts +1 -1
- package/types/components/Radio/types.d.ts +5 -0
- package/types/components/SectionHeading/StyledHeading.d.ts +0 -0
- package/types/components/SectionHeading/__tests__/StyledHeading.d.ts +0 -0
- package/types/components/SectionHeading/__tests__/StyledHeading.spec.d.ts +1 -0
- package/types/components/SectionHeading/__tests__/index.spec.d.ts +0 -0
- package/types/components/SectionHeading/index.d.ts +0 -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 +0 -0
- package/types/components/Spinner/StyledSpinner.d.ts +0 -0
- package/types/components/Spinner/__tests__/AnimatedSpinner.spec.d.ts +0 -0
- package/types/components/Spinner/__tests__/StyledSpinner.spec.d.ts +0 -0
- package/types/components/Spinner/__tests__/index.spec.d.ts +0 -0
- package/types/components/Spinner/index.d.ts +0 -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/components/Tabs/ActiveTabIndicator.d.ts +0 -0
- package/types/components/Tabs/ScrollableTabs.d.ts +0 -0
- package/types/components/Tabs/StyledScrollableTabs.d.ts +0 -0
- package/types/components/Tabs/StyledTabs.d.ts +0 -0
- package/types/components/Tabs/__tests__/ScrollableTabs.spec.d.ts +0 -0
- package/types/components/Tabs/__tests__/index.spec.d.ts +0 -0
- package/types/components/Tabs/index.d.ts +0 -0
- package/types/components/Tabs/utils.d.ts +0 -0
- package/types/components/Tag/StyledTag.d.ts +0 -0
- package/types/components/Tag/__tests__/Tag.spec.d.ts +0 -0
- package/types/components/Tag/index.d.ts +0 -0
- package/types/components/TextInput/StyledTextInput.d.ts +1 -5
- package/types/components/TextInput/__tests__/StyledTextInput.spec.d.ts +0 -0
- package/types/components/TextInput/__tests__/index.spec.d.ts +0 -0
- package/types/components/TextInput/index.d.ts +13 -5
- package/types/components/Typography/Text/StyledText.d.ts +0 -0
- package/types/components/Typography/Text/__tests__/StyledText.spec.d.ts +0 -0
- package/types/components/Typography/Text/__tests__/index.spec.d.ts +0 -0
- package/types/components/Typography/Text/index.d.ts +0 -0
- package/types/components/Typography/index.d.ts +0 -0
- package/types/index.d.ts +4 -3
- package/types/testHelpers/renderWithTheme.d.ts +0 -0
- package/types/theme/__tests__/index.spec.d.ts +0 -0
- package/types/theme/components/avatar.d.ts +0 -0
- package/types/theme/components/badge.d.ts +0 -0
- package/types/theme/components/bottomNavigation.d.ts +0 -0
- package/types/theme/components/bottomSheet.d.ts +0 -0
- package/types/theme/components/button.d.ts +0 -0
- package/types/theme/components/card.d.ts +0 -0
- package/types/theme/components/checkbox.d.ts +21 -0
- package/types/theme/components/contentNavigator.d.ts +0 -0
- package/types/theme/components/divider.d.ts +0 -0
- package/types/theme/components/drawer.d.ts +0 -0
- package/types/theme/components/fab.d.ts +0 -0
- package/types/theme/components/icon.d.ts +0 -0
- package/types/theme/components/progress.d.ts +0 -0
- package/types/theme/components/radio.d.ts +0 -0
- package/types/theme/components/sectionHeading.d.ts +13 -0
- package/types/theme/components/select.d.ts +17 -0
- package/types/theme/components/spinner.d.ts +0 -0
- package/types/theme/components/switch.d.ts +32 -0
- package/types/theme/components/tabs.d.ts +0 -0
- package/types/theme/components/tag.d.ts +0 -0
- package/types/theme/components/textInput.d.ts +1 -1
- package/types/theme/components/typography.d.ts +0 -0
- package/types/theme/global/borders.d.ts +0 -0
- package/types/theme/global/colors.d.ts +1 -0
- package/types/theme/global/index.d.ts +1 -0
- package/types/theme/global/scale.d.ts +0 -0
- package/types/theme/global/space.d.ts +0 -0
- package/types/theme/global/typography.d.ts +0 -0
- package/types/theme/index.d.ts +18 -3
- package/types/types.d.ts +0 -0
- package/types/utils/__tests__/scale.spec.d.ts +0 -0
- package/types/utils/helpers.d.ts +0 -0
- package/types/utils/hooks.d.ts +0 -0
- package/types/utils/scale.d.ts +0 -0
- package/.expo/README.md +0 -15
- package/.expo/packager-info.json +0 -10
- package/.expo/prebuild/cached-packages.json +0 -4
- package/.expo/settings.json +0 -10
- package/.expo/xcodebuild-error.log +0 -2
- package/.expo/xcodebuild.log +0 -11199
- package/.turbo/turbo-publish:npm.log +0 -0
- package/playground/src/emotion.d.ts +0 -7
package/es/index.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import
|
|
3
|
-
import React, { useContext, createElement,
|
|
1
|
+
import * as reactNative from 'react-native';
|
|
2
|
+
import { Dimensions, StyleSheet as StyleSheet$1, Text as Text$1, View, TouchableOpacity, Image, Animated, Platform, TouchableWithoutFeedback, Pressable, Easing, Modal, TouchableHighlight, TextInput as TextInput$1, FlatList } from 'react-native';
|
|
3
|
+
import React, { createContext, useContext, createElement, forwardRef, useRef, useEffect, useState, useCallback } from 'react';
|
|
4
|
+
import { createIconSetFromIcoMoon } from 'react-native-vector-icons';
|
|
4
5
|
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
6
|
+
import PagerView from 'react-native-pager-view';
|
|
5
7
|
|
|
6
8
|
function ownKeys(object, enumerableOnly) {
|
|
7
9
|
var keys = Object.keys(object);
|
|
@@ -20,7 +22,7 @@ function _objectSpread2(target) {
|
|
|
20
22
|
for (var i = 1; i < arguments.length; i++) {
|
|
21
23
|
var source = null != arguments[i] ? arguments[i] : {};
|
|
22
24
|
i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {
|
|
23
|
-
_defineProperty
|
|
25
|
+
_defineProperty(target, key, source[key]);
|
|
24
26
|
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {
|
|
25
27
|
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
26
28
|
});
|
|
@@ -29,42 +31,17 @@ function _objectSpread2(target) {
|
|
|
29
31
|
return target;
|
|
30
32
|
}
|
|
31
33
|
|
|
32
|
-
function _typeof
|
|
34
|
+
function _typeof(obj) {
|
|
33
35
|
"@babel/helpers - typeof";
|
|
34
36
|
|
|
35
|
-
return _typeof
|
|
37
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
36
38
|
return typeof obj;
|
|
37
39
|
} : function (obj) {
|
|
38
40
|
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
39
|
-
}, _typeof
|
|
41
|
+
}, _typeof(obj);
|
|
40
42
|
}
|
|
41
43
|
|
|
42
|
-
function
|
|
43
|
-
if (!(instance instanceof Constructor)) {
|
|
44
|
-
throw new TypeError("Cannot call a class as a function");
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
function _defineProperties$1(target, props) {
|
|
49
|
-
for (var i = 0; i < props.length; i++) {
|
|
50
|
-
var descriptor = props[i];
|
|
51
|
-
descriptor.enumerable = descriptor.enumerable || false;
|
|
52
|
-
descriptor.configurable = true;
|
|
53
|
-
if ("value" in descriptor) descriptor.writable = true;
|
|
54
|
-
Object.defineProperty(target, descriptor.key, descriptor);
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
function _createClass$1(Constructor, protoProps, staticProps) {
|
|
59
|
-
if (protoProps) _defineProperties$1(Constructor.prototype, protoProps);
|
|
60
|
-
if (staticProps) _defineProperties$1(Constructor, staticProps);
|
|
61
|
-
Object.defineProperty(Constructor, "prototype", {
|
|
62
|
-
writable: false
|
|
63
|
-
});
|
|
64
|
-
return Constructor;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
function _defineProperty$2(obj, key, value) {
|
|
44
|
+
function _defineProperty(obj, key, value) {
|
|
68
45
|
if (key in obj) {
|
|
69
46
|
Object.defineProperty(obj, key, {
|
|
70
47
|
value: value,
|
|
@@ -79,8 +56,8 @@ function _defineProperty$2(obj, key, value) {
|
|
|
79
56
|
return obj;
|
|
80
57
|
}
|
|
81
58
|
|
|
82
|
-
function _extends$
|
|
83
|
-
_extends$
|
|
59
|
+
function _extends$1() {
|
|
60
|
+
_extends$1 = Object.assign || function (target) {
|
|
84
61
|
for (var i = 1; i < arguments.length; i++) {
|
|
85
62
|
var source = arguments[i];
|
|
86
63
|
|
|
@@ -94,57 +71,10 @@ function _extends$3() {
|
|
|
94
71
|
return target;
|
|
95
72
|
};
|
|
96
73
|
|
|
97
|
-
return _extends$
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
function _inherits$1(subClass, superClass) {
|
|
101
|
-
if (typeof superClass !== "function" && superClass !== null) {
|
|
102
|
-
throw new TypeError("Super expression must either be null or a function");
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
106
|
-
constructor: {
|
|
107
|
-
value: subClass,
|
|
108
|
-
writable: true,
|
|
109
|
-
configurable: true
|
|
110
|
-
}
|
|
111
|
-
});
|
|
112
|
-
Object.defineProperty(subClass, "prototype", {
|
|
113
|
-
writable: false
|
|
114
|
-
});
|
|
115
|
-
if (superClass) _setPrototypeOf$1(subClass, superClass);
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
function _getPrototypeOf$1(o) {
|
|
119
|
-
_getPrototypeOf$1 = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
|
|
120
|
-
return o.__proto__ || Object.getPrototypeOf(o);
|
|
121
|
-
};
|
|
122
|
-
return _getPrototypeOf$1(o);
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
function _setPrototypeOf$1(o, p) {
|
|
126
|
-
_setPrototypeOf$1 = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
|
|
127
|
-
o.__proto__ = p;
|
|
128
|
-
return o;
|
|
129
|
-
};
|
|
130
|
-
|
|
131
|
-
return _setPrototypeOf$1(o, p);
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
function _isNativeReflectConstruct() {
|
|
135
|
-
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
136
|
-
if (Reflect.construct.sham) return false;
|
|
137
|
-
if (typeof Proxy === "function") return true;
|
|
138
|
-
|
|
139
|
-
try {
|
|
140
|
-
Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
|
|
141
|
-
return true;
|
|
142
|
-
} catch (e) {
|
|
143
|
-
return false;
|
|
144
|
-
}
|
|
74
|
+
return _extends$1.apply(this, arguments);
|
|
145
75
|
}
|
|
146
76
|
|
|
147
|
-
function _objectWithoutPropertiesLoose
|
|
77
|
+
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
148
78
|
if (source == null) return {};
|
|
149
79
|
var target = {};
|
|
150
80
|
var sourceKeys = Object.keys(source);
|
|
@@ -159,10 +89,10 @@ function _objectWithoutPropertiesLoose$1(source, excluded) {
|
|
|
159
89
|
return target;
|
|
160
90
|
}
|
|
161
91
|
|
|
162
|
-
function _objectWithoutProperties
|
|
92
|
+
function _objectWithoutProperties(source, excluded) {
|
|
163
93
|
if (source == null) return {};
|
|
164
94
|
|
|
165
|
-
var target = _objectWithoutPropertiesLoose
|
|
95
|
+
var target = _objectWithoutPropertiesLoose(source, excluded);
|
|
166
96
|
|
|
167
97
|
var key, i;
|
|
168
98
|
|
|
@@ -180,52 +110,15 @@ function _objectWithoutProperties$1(source, excluded) {
|
|
|
180
110
|
return target;
|
|
181
111
|
}
|
|
182
112
|
|
|
183
|
-
function _assertThisInitialized$1(self) {
|
|
184
|
-
if (self === void 0) {
|
|
185
|
-
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
return self;
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
function _possibleConstructorReturn$1(self, call) {
|
|
192
|
-
if (call && (typeof call === "object" || typeof call === "function")) {
|
|
193
|
-
return call;
|
|
194
|
-
} else if (call !== void 0) {
|
|
195
|
-
throw new TypeError("Derived constructors may only return object or undefined");
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
return _assertThisInitialized$1(self);
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
function _createSuper(Derived) {
|
|
202
|
-
var hasNativeReflectConstruct = _isNativeReflectConstruct();
|
|
203
|
-
|
|
204
|
-
return function _createSuperInternal() {
|
|
205
|
-
var Super = _getPrototypeOf$1(Derived),
|
|
206
|
-
result;
|
|
207
|
-
|
|
208
|
-
if (hasNativeReflectConstruct) {
|
|
209
|
-
var NewTarget = _getPrototypeOf$1(this).constructor;
|
|
210
|
-
|
|
211
|
-
result = Reflect.construct(Super, arguments, NewTarget);
|
|
212
|
-
} else {
|
|
213
|
-
result = Super.apply(this, arguments);
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
return _possibleConstructorReturn$1(this, result);
|
|
217
|
-
};
|
|
218
|
-
}
|
|
219
|
-
|
|
220
113
|
function _slicedToArray(arr, i) {
|
|
221
114
|
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
222
115
|
}
|
|
223
116
|
|
|
224
|
-
function _toConsumableArray
|
|
225
|
-
return _arrayWithoutHoles
|
|
117
|
+
function _toConsumableArray(arr) {
|
|
118
|
+
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
|
|
226
119
|
}
|
|
227
120
|
|
|
228
|
-
function _arrayWithoutHoles
|
|
121
|
+
function _arrayWithoutHoles(arr) {
|
|
229
122
|
if (Array.isArray(arr)) return _arrayLikeToArray(arr);
|
|
230
123
|
}
|
|
231
124
|
|
|
@@ -233,7 +126,7 @@ function _arrayWithHoles(arr) {
|
|
|
233
126
|
if (Array.isArray(arr)) return arr;
|
|
234
127
|
}
|
|
235
128
|
|
|
236
|
-
function _iterableToArray
|
|
129
|
+
function _iterableToArray(iter) {
|
|
237
130
|
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
238
131
|
}
|
|
239
132
|
|
|
@@ -284,7 +177,7 @@ function _arrayLikeToArray(arr, len) {
|
|
|
284
177
|
return arr2;
|
|
285
178
|
}
|
|
286
179
|
|
|
287
|
-
function _nonIterableSpread
|
|
180
|
+
function _nonIterableSpread() {
|
|
288
181
|
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
289
182
|
}
|
|
290
183
|
|
|
@@ -1531,8 +1424,8 @@ var createCache = function createCache(options) {
|
|
|
1531
1424
|
return cache;
|
|
1532
1425
|
};
|
|
1533
1426
|
|
|
1534
|
-
function _extends
|
|
1535
|
-
_extends
|
|
1427
|
+
function _extends() {
|
|
1428
|
+
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
1536
1429
|
for (var i = 1; i < arguments.length; i++) {
|
|
1537
1430
|
var source = arguments[i];
|
|
1538
1431
|
|
|
@@ -1545,7 +1438,7 @@ function _extends$2() {
|
|
|
1545
1438
|
|
|
1546
1439
|
return target;
|
|
1547
1440
|
};
|
|
1548
|
-
return _extends
|
|
1441
|
+
return _extends.apply(this, arguments);
|
|
1549
1442
|
}
|
|
1550
1443
|
|
|
1551
1444
|
var EmotionCacheContext = /* #__PURE__ */createContext( // we're doing this to avoid preconstruct's dead code elimination in this one case
|
|
@@ -1562,7 +1455,7 @@ EmotionCacheContext.Provider;
|
|
|
1562
1455
|
|
|
1563
1456
|
var ThemeContext = /* #__PURE__ */createContext({});
|
|
1564
1457
|
|
|
1565
|
-
var useTheme = function useTheme() {
|
|
1458
|
+
var useTheme$1 = function useTheme() {
|
|
1566
1459
|
return useContext(ThemeContext);
|
|
1567
1460
|
};
|
|
1568
1461
|
|
|
@@ -1573,7 +1466,7 @@ var getTheme$1 = function getTheme(outerTheme, theme) {
|
|
|
1573
1466
|
return mergedTheme;
|
|
1574
1467
|
}
|
|
1575
1468
|
|
|
1576
|
-
return _extends
|
|
1469
|
+
return _extends({}, outerTheme, theme);
|
|
1577
1470
|
};
|
|
1578
1471
|
|
|
1579
1472
|
var createCacheWithTheme = /* #__PURE__ */weakMemoize(function (outerTheme) {
|
|
@@ -1582,7 +1475,7 @@ var createCacheWithTheme = /* #__PURE__ */weakMemoize(function (outerTheme) {
|
|
|
1582
1475
|
});
|
|
1583
1476
|
});
|
|
1584
1477
|
|
|
1585
|
-
var ThemeProvider = function ThemeProvider(props) {
|
|
1478
|
+
var ThemeProvider$1 = function ThemeProvider(props) {
|
|
1586
1479
|
var theme = useContext(ThemeContext);
|
|
1587
1480
|
|
|
1588
1481
|
if (props.theme !== theme) {
|
|
@@ -1723,7 +1616,8 @@ var systemPalette = {
|
|
|
1723
1616
|
invertedText: palette.white,
|
|
1724
1617
|
outline: palette.greyLight60,
|
|
1725
1618
|
archived: palette.greyLight45,
|
|
1726
|
-
black: palette.black
|
|
1619
|
+
black: palette.black,
|
|
1620
|
+
inactiveBackground: palette.greyDark30
|
|
1727
1621
|
};
|
|
1728
1622
|
|
|
1729
1623
|
var BASE_WIDTH = 390; // Based on iPhone 13's viewport size
|
|
@@ -2230,25 +2124,6 @@ var getProgressTheme = function getProgressTheme(theme) {
|
|
|
2230
2124
|
};
|
|
2231
2125
|
};
|
|
2232
2126
|
|
|
2233
|
-
var getSpinnerTheme = function getSpinnerTheme(theme) {
|
|
2234
|
-
var color = {
|
|
2235
|
-
"default": theme.colors.primary
|
|
2236
|
-
};
|
|
2237
|
-
var space = {
|
|
2238
|
-
spinnerDot: theme.space.medium,
|
|
2239
|
-
spinnerDotPadding: theme.space.small,
|
|
2240
|
-
spinnerTextPaddingTop: theme.space.small
|
|
2241
|
-
};
|
|
2242
|
-
var radii = {
|
|
2243
|
-
"default": theme.radii.medium
|
|
2244
|
-
};
|
|
2245
|
-
return {
|
|
2246
|
-
color: color,
|
|
2247
|
-
space: space,
|
|
2248
|
-
radii: radii
|
|
2249
|
-
};
|
|
2250
|
-
};
|
|
2251
|
-
|
|
2252
2127
|
var getRadioTheme = function getRadioTheme(theme) {
|
|
2253
2128
|
var colors = {
|
|
2254
2129
|
circle: theme.colors.black,
|
|
@@ -2280,6 +2155,102 @@ var getRadioTheme = function getRadioTheme(theme) {
|
|
|
2280
2155
|
};
|
|
2281
2156
|
};
|
|
2282
2157
|
|
|
2158
|
+
var getSectionHeadingTheme = function getSectionHeadingTheme(theme) {
|
|
2159
|
+
var colors = {
|
|
2160
|
+
background: theme.colors.outline
|
|
2161
|
+
};
|
|
2162
|
+
var space = {
|
|
2163
|
+
headingVerticalPadding: theme.space.small,
|
|
2164
|
+
headingHorizontalPadding: theme.space.medium,
|
|
2165
|
+
headingMarginBottom: theme.space.medium,
|
|
2166
|
+
iconMarginRight: theme.space.small
|
|
2167
|
+
};
|
|
2168
|
+
return {
|
|
2169
|
+
colors: colors,
|
|
2170
|
+
space: space
|
|
2171
|
+
};
|
|
2172
|
+
};
|
|
2173
|
+
|
|
2174
|
+
var getSelectTheme = function getSelectTheme(theme) {
|
|
2175
|
+
var colors = {
|
|
2176
|
+
option: theme.colors.platformBackground,
|
|
2177
|
+
checkedOption: theme.colors.primaryBackground,
|
|
2178
|
+
footerText: theme.colors.primary
|
|
2179
|
+
};
|
|
2180
|
+
var space = {
|
|
2181
|
+
optionPadding: theme.space.medium,
|
|
2182
|
+
optionListPadding: theme.space.medium,
|
|
2183
|
+
optionListSpacing: theme.space.xsmall
|
|
2184
|
+
};
|
|
2185
|
+
var radii = {
|
|
2186
|
+
option: theme.radii.base
|
|
2187
|
+
};
|
|
2188
|
+
return {
|
|
2189
|
+
space: space,
|
|
2190
|
+
colors: colors,
|
|
2191
|
+
radii: radii
|
|
2192
|
+
};
|
|
2193
|
+
};
|
|
2194
|
+
|
|
2195
|
+
var getSpinnerTheme = function getSpinnerTheme(theme) {
|
|
2196
|
+
var color = {
|
|
2197
|
+
"default": theme.colors.primary
|
|
2198
|
+
};
|
|
2199
|
+
var space = {
|
|
2200
|
+
spinnerDot: theme.space.medium,
|
|
2201
|
+
spinnerDotPadding: theme.space.small,
|
|
2202
|
+
spinnerTextPaddingTop: theme.space.small
|
|
2203
|
+
};
|
|
2204
|
+
var radii = {
|
|
2205
|
+
"default": theme.radii.medium
|
|
2206
|
+
};
|
|
2207
|
+
return {
|
|
2208
|
+
color: color,
|
|
2209
|
+
space: space,
|
|
2210
|
+
radii: radii
|
|
2211
|
+
};
|
|
2212
|
+
};
|
|
2213
|
+
|
|
2214
|
+
var getSwitchTheme = function getSwitchTheme(theme) {
|
|
2215
|
+
var colors = {
|
|
2216
|
+
thumb: theme.colors.platformBackground,
|
|
2217
|
+
active: theme.colors.primary,
|
|
2218
|
+
inactive: theme.colors.inactiveBackground
|
|
2219
|
+
};
|
|
2220
|
+
var thumbSizes = {
|
|
2221
|
+
small: theme.space.medium,
|
|
2222
|
+
medium: theme.space.medium * 1.3
|
|
2223
|
+
};
|
|
2224
|
+
var widths = {
|
|
2225
|
+
small: theme.space.xxxlarge,
|
|
2226
|
+
medium: theme.space.xxxxlarge
|
|
2227
|
+
};
|
|
2228
|
+
var heights = {
|
|
2229
|
+
small: theme.space.large,
|
|
2230
|
+
medium: theme.space.large * 1.2
|
|
2231
|
+
};
|
|
2232
|
+
var spaces = {
|
|
2233
|
+
small: theme.space.xsmall,
|
|
2234
|
+
medium: theme.space.xsmall,
|
|
2235
|
+
inactive: 0
|
|
2236
|
+
};
|
|
2237
|
+
var radii = {
|
|
2238
|
+
rounded: theme.radii.rounded
|
|
2239
|
+
};
|
|
2240
|
+
var borderWidths = {
|
|
2241
|
+
"default": theme.borderWidths.base
|
|
2242
|
+
};
|
|
2243
|
+
return {
|
|
2244
|
+
colors: colors,
|
|
2245
|
+
thumbSizes: thumbSizes,
|
|
2246
|
+
widths: widths,
|
|
2247
|
+
heights: heights,
|
|
2248
|
+
spaces: spaces,
|
|
2249
|
+
radii: radii,
|
|
2250
|
+
borderWidths: borderWidths
|
|
2251
|
+
};
|
|
2252
|
+
};
|
|
2253
|
+
|
|
2283
2254
|
var getTabsTheme = function getTabsTheme(theme) {
|
|
2284
2255
|
var colors = {
|
|
2285
2256
|
active: theme.colors.primary,
|
|
@@ -2360,7 +2331,7 @@ var getTextInputTheme = function getTextInputTheme(theme) {
|
|
|
2360
2331
|
labelLeft: theme.space.medium,
|
|
2361
2332
|
labelTop: theme.lineHeights.small / -2,
|
|
2362
2333
|
labelHorizontalPadding: theme.space.xsmall,
|
|
2363
|
-
|
|
2334
|
+
inputHorizontalMargin: theme.space.small
|
|
2364
2335
|
};
|
|
2365
2336
|
var fontSizes = {
|
|
2366
2337
|
text: theme.fontSizes.large
|
|
@@ -2429,9 +2400,12 @@ var getTheme = function getTheme() {
|
|
|
2429
2400
|
drawer: getDrawerTheme(globalTheme),
|
|
2430
2401
|
fab: getFABTheme(globalTheme),
|
|
2431
2402
|
icon: getIconTheme(globalTheme),
|
|
2432
|
-
spinner: getSpinnerTheme(globalTheme),
|
|
2433
2403
|
progress: getProgressTheme(globalTheme),
|
|
2434
2404
|
radio: getRadioTheme(globalTheme),
|
|
2405
|
+
sectionHeading: getSectionHeadingTheme(globalTheme),
|
|
2406
|
+
select: getSelectTheme(globalTheme),
|
|
2407
|
+
spinner: getSpinnerTheme(globalTheme),
|
|
2408
|
+
"switch": getSwitchTheme(globalTheme),
|
|
2435
2409
|
tabs: getTabsTheme(globalTheme),
|
|
2436
2410
|
tag: getTagTheme(globalTheme),
|
|
2437
2411
|
textInput: getTextInputTheme(globalTheme),
|
|
@@ -2441,2075 +2415,114 @@ var getTheme = function getTheme() {
|
|
|
2441
2415
|
};
|
|
2442
2416
|
|
|
2443
2417
|
var theme = getTheme();
|
|
2418
|
+
var ThemeProvider = ThemeProvider$1;
|
|
2419
|
+
var useTheme = useTheme$1;
|
|
2444
2420
|
|
|
2445
2421
|
function getDefaultExportFromCjs (x) {
|
|
2446
2422
|
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
2447
2423
|
}
|
|
2448
2424
|
|
|
2449
|
-
var
|
|
2450
|
-
|
|
2451
|
-
function _interopRequireDefault$5(obj) {
|
|
2452
|
-
return obj && obj.__esModule ? obj : {
|
|
2453
|
-
"default": obj
|
|
2454
|
-
};
|
|
2455
|
-
}
|
|
2456
|
-
|
|
2457
|
-
var interopRequireDefault = _interopRequireDefault$5;
|
|
2458
|
-
|
|
2459
|
-
var createIconSet$1 = {};
|
|
2460
|
-
|
|
2461
|
-
function _arrayWithoutHoles(arr) {
|
|
2462
|
-
if (Array.isArray(arr)) {
|
|
2463
|
-
for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) {
|
|
2464
|
-
arr2[i] = arr[i];
|
|
2465
|
-
}
|
|
2466
|
-
|
|
2467
|
-
return arr2;
|
|
2468
|
-
}
|
|
2469
|
-
}
|
|
2470
|
-
|
|
2471
|
-
var arrayWithoutHoles$1 = _arrayWithoutHoles;
|
|
2472
|
-
|
|
2473
|
-
function _iterableToArray(iter) {
|
|
2474
|
-
if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter);
|
|
2475
|
-
}
|
|
2476
|
-
|
|
2477
|
-
var iterableToArray$1 = _iterableToArray;
|
|
2425
|
+
var cssToReactNative = {};
|
|
2478
2426
|
|
|
2479
|
-
|
|
2480
|
-
|
|
2481
|
-
|
|
2427
|
+
var openParentheses = "(".charCodeAt(0);
|
|
2428
|
+
var closeParentheses = ")".charCodeAt(0);
|
|
2429
|
+
var singleQuote = "'".charCodeAt(0);
|
|
2430
|
+
var doubleQuote = '"'.charCodeAt(0);
|
|
2431
|
+
var backslash = "\\".charCodeAt(0);
|
|
2432
|
+
var slash = "/".charCodeAt(0);
|
|
2433
|
+
var comma = ",".charCodeAt(0);
|
|
2434
|
+
var colon = ":".charCodeAt(0);
|
|
2435
|
+
var star = "*".charCodeAt(0);
|
|
2436
|
+
var uLower = "u".charCodeAt(0);
|
|
2437
|
+
var uUpper = "U".charCodeAt(0);
|
|
2438
|
+
var plus$1 = "+".charCodeAt(0);
|
|
2439
|
+
var isUnicodeRange = /^[a-f0-9?-]+$/i;
|
|
2482
2440
|
|
|
2483
|
-
var
|
|
2441
|
+
var parse$1 = function parse(input) {
|
|
2442
|
+
var tokens = [];
|
|
2443
|
+
var value = input;
|
|
2444
|
+
var next, quote, prev, token, escape, escapePos, whitespacePos, parenthesesOpenPos;
|
|
2445
|
+
var pos = 0;
|
|
2446
|
+
var code = value.charCodeAt(pos);
|
|
2447
|
+
var max = value.length;
|
|
2448
|
+
var stack = [{
|
|
2449
|
+
nodes: tokens
|
|
2450
|
+
}];
|
|
2451
|
+
var balanced = 0;
|
|
2452
|
+
var parent;
|
|
2453
|
+
var name = "";
|
|
2454
|
+
var before = "";
|
|
2455
|
+
var after = "";
|
|
2484
2456
|
|
|
2485
|
-
|
|
2486
|
-
|
|
2487
|
-
|
|
2457
|
+
while (pos < max) {
|
|
2458
|
+
// Whitespaces
|
|
2459
|
+
if (code <= 32) {
|
|
2460
|
+
next = pos;
|
|
2488
2461
|
|
|
2489
|
-
|
|
2490
|
-
|
|
2491
|
-
|
|
2462
|
+
do {
|
|
2463
|
+
next += 1;
|
|
2464
|
+
code = value.charCodeAt(next);
|
|
2465
|
+
} while (code <= 32);
|
|
2492
2466
|
|
|
2493
|
-
|
|
2467
|
+
token = value.slice(pos, next);
|
|
2468
|
+
prev = tokens[tokens.length - 1];
|
|
2494
2469
|
|
|
2495
|
-
|
|
2470
|
+
if (code === closeParentheses && balanced) {
|
|
2471
|
+
after = token;
|
|
2472
|
+
} else if (prev && prev.type === "div") {
|
|
2473
|
+
prev.after = token;
|
|
2474
|
+
} else if (code === comma || code === colon || code === slash && value.charCodeAt(next + 1) !== star && (!parent || parent && parent.type === "function" && parent.value !== "calc")) {
|
|
2475
|
+
before = token;
|
|
2476
|
+
} else {
|
|
2477
|
+
tokens.push({
|
|
2478
|
+
type: "space",
|
|
2479
|
+
sourceIndex: pos,
|
|
2480
|
+
value: token
|
|
2481
|
+
});
|
|
2482
|
+
}
|
|
2496
2483
|
|
|
2497
|
-
|
|
2498
|
-
|
|
2484
|
+
pos = next; // Quotes
|
|
2485
|
+
} else if (code === singleQuote || code === doubleQuote) {
|
|
2486
|
+
next = pos;
|
|
2487
|
+
quote = code === singleQuote ? "'" : '"';
|
|
2488
|
+
token = {
|
|
2489
|
+
type: "string",
|
|
2490
|
+
sourceIndex: pos,
|
|
2491
|
+
quote: quote
|
|
2492
|
+
};
|
|
2499
2493
|
|
|
2500
|
-
|
|
2501
|
-
|
|
2502
|
-
|
|
2494
|
+
do {
|
|
2495
|
+
escape = false;
|
|
2496
|
+
next = value.indexOf(quote, next + 1);
|
|
2503
2497
|
|
|
2504
|
-
|
|
2505
|
-
|
|
2506
|
-
var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
|
|
2507
|
-
var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
|
|
2498
|
+
if (~next) {
|
|
2499
|
+
escapePos = next;
|
|
2508
2500
|
|
|
2509
|
-
|
|
2510
|
-
|
|
2511
|
-
|
|
2512
|
-
|
|
2513
|
-
|
|
2514
|
-
|
|
2501
|
+
while (value.charCodeAt(escapePos - 1) === backslash) {
|
|
2502
|
+
escapePos -= 1;
|
|
2503
|
+
escape = !escape;
|
|
2504
|
+
}
|
|
2505
|
+
} else {
|
|
2506
|
+
value += quote;
|
|
2507
|
+
next = value.length - 1;
|
|
2508
|
+
token.unclosed = true;
|
|
2509
|
+
}
|
|
2510
|
+
} while (escape);
|
|
2515
2511
|
|
|
2516
|
-
|
|
2517
|
-
|
|
2518
|
-
|
|
2512
|
+
token.value = value.slice(pos + 1, next);
|
|
2513
|
+
tokens.push(token);
|
|
2514
|
+
pos = next + 1;
|
|
2515
|
+
code = value.charCodeAt(pos); // Comments
|
|
2516
|
+
} else if (code === slash && value.charCodeAt(pos + 1) === star) {
|
|
2517
|
+
token = {
|
|
2518
|
+
type: "comment",
|
|
2519
|
+
sourceIndex: pos
|
|
2520
|
+
};
|
|
2521
|
+
next = value.indexOf("*/", pos);
|
|
2519
2522
|
|
|
2520
|
-
|
|
2521
|
-
|
|
2522
|
-
|
|
2523
|
-
// invoked without arguments, but in all the cases we care about we
|
|
2524
|
-
// already have an existing method we want to call, so there's no need
|
|
2525
|
-
// to create a new function object. We can even get away with assuming
|
|
2526
|
-
// the method takes exactly one argument, since that happens to be true
|
|
2527
|
-
// in every case, so we don't have to touch the arguments object. The
|
|
2528
|
-
// only additional allocation required is the completion record, which
|
|
2529
|
-
// has a stable shape and so hopefully should be cheap to allocate.
|
|
2530
|
-
|
|
2531
|
-
function tryCatch(fn, obj, arg) {
|
|
2532
|
-
try {
|
|
2533
|
-
return {
|
|
2534
|
-
type: "normal",
|
|
2535
|
-
arg: fn.call(obj, arg)
|
|
2536
|
-
};
|
|
2537
|
-
} catch (err) {
|
|
2538
|
-
return {
|
|
2539
|
-
type: "throw",
|
|
2540
|
-
arg: err
|
|
2541
|
-
};
|
|
2542
|
-
}
|
|
2543
|
-
}
|
|
2544
|
-
|
|
2545
|
-
var GenStateSuspendedStart = "suspendedStart";
|
|
2546
|
-
var GenStateSuspendedYield = "suspendedYield";
|
|
2547
|
-
var GenStateExecuting = "executing";
|
|
2548
|
-
var GenStateCompleted = "completed"; // Returning this object from the innerFn has the same effect as
|
|
2549
|
-
// breaking out of the dispatch switch statement.
|
|
2550
|
-
|
|
2551
|
-
var ContinueSentinel = {}; // Dummy constructor functions that we use as the .constructor and
|
|
2552
|
-
// .constructor.prototype properties for functions that return Generator
|
|
2553
|
-
// objects. For full spec compliance, you may wish to configure your
|
|
2554
|
-
// minifier not to mangle the names of these two functions.
|
|
2555
|
-
|
|
2556
|
-
function Generator() {}
|
|
2557
|
-
|
|
2558
|
-
function GeneratorFunction() {}
|
|
2559
|
-
|
|
2560
|
-
function GeneratorFunctionPrototype() {} // This is a polyfill for %IteratorPrototype% for environments that
|
|
2561
|
-
// don't natively support it.
|
|
2562
|
-
|
|
2563
|
-
|
|
2564
|
-
var IteratorPrototype = {};
|
|
2565
|
-
|
|
2566
|
-
IteratorPrototype[iteratorSymbol] = function () {
|
|
2567
|
-
return this;
|
|
2568
|
-
};
|
|
2569
|
-
|
|
2570
|
-
var getProto = Object.getPrototypeOf;
|
|
2571
|
-
var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
|
|
2572
|
-
|
|
2573
|
-
if (NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
|
|
2574
|
-
// This environment has a native %IteratorPrototype%; use it instead
|
|
2575
|
-
// of the polyfill.
|
|
2576
|
-
IteratorPrototype = NativeIteratorPrototype;
|
|
2577
|
-
}
|
|
2578
|
-
|
|
2579
|
-
var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
|
|
2580
|
-
GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;
|
|
2581
|
-
GeneratorFunctionPrototype.constructor = GeneratorFunction;
|
|
2582
|
-
GeneratorFunctionPrototype[toStringTagSymbol] = GeneratorFunction.displayName = "GeneratorFunction"; // Helper for defining the .next, .throw, and .return methods of the
|
|
2583
|
-
// Iterator interface in terms of a single ._invoke method.
|
|
2584
|
-
|
|
2585
|
-
function defineIteratorMethods(prototype) {
|
|
2586
|
-
["next", "throw", "return"].forEach(function (method) {
|
|
2587
|
-
prototype[method] = function (arg) {
|
|
2588
|
-
return this._invoke(method, arg);
|
|
2589
|
-
};
|
|
2590
|
-
});
|
|
2591
|
-
}
|
|
2592
|
-
|
|
2593
|
-
exports.isGeneratorFunction = function (genFun) {
|
|
2594
|
-
var ctor = typeof genFun === "function" && genFun.constructor;
|
|
2595
|
-
return ctor ? ctor === GeneratorFunction || // For the native GeneratorFunction constructor, the best we can
|
|
2596
|
-
// do is to check its .name property.
|
|
2597
|
-
(ctor.displayName || ctor.name) === "GeneratorFunction" : false;
|
|
2598
|
-
};
|
|
2599
|
-
|
|
2600
|
-
exports.mark = function (genFun) {
|
|
2601
|
-
if (Object.setPrototypeOf) {
|
|
2602
|
-
Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
|
|
2603
|
-
} else {
|
|
2604
|
-
genFun.__proto__ = GeneratorFunctionPrototype;
|
|
2605
|
-
|
|
2606
|
-
if (!(toStringTagSymbol in genFun)) {
|
|
2607
|
-
genFun[toStringTagSymbol] = "GeneratorFunction";
|
|
2608
|
-
}
|
|
2609
|
-
}
|
|
2610
|
-
|
|
2611
|
-
genFun.prototype = Object.create(Gp);
|
|
2612
|
-
return genFun;
|
|
2613
|
-
}; // Within the body of any async function, `await x` is transformed to
|
|
2614
|
-
// `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
|
|
2615
|
-
// `hasOwn.call(value, "__await")` to determine if the yielded value is
|
|
2616
|
-
// meant to be awaited.
|
|
2617
|
-
|
|
2618
|
-
|
|
2619
|
-
exports.awrap = function (arg) {
|
|
2620
|
-
return {
|
|
2621
|
-
__await: arg
|
|
2622
|
-
};
|
|
2623
|
-
};
|
|
2624
|
-
|
|
2625
|
-
function AsyncIterator(generator) {
|
|
2626
|
-
function invoke(method, arg, resolve, reject) {
|
|
2627
|
-
var record = tryCatch(generator[method], generator, arg);
|
|
2628
|
-
|
|
2629
|
-
if (record.type === "throw") {
|
|
2630
|
-
reject(record.arg);
|
|
2631
|
-
} else {
|
|
2632
|
-
var result = record.arg;
|
|
2633
|
-
var value = result.value;
|
|
2634
|
-
|
|
2635
|
-
if (value && _typeof$2(value) === "object" && hasOwn.call(value, "__await")) {
|
|
2636
|
-
return Promise.resolve(value.__await).then(function (value) {
|
|
2637
|
-
invoke("next", value, resolve, reject);
|
|
2638
|
-
}, function (err) {
|
|
2639
|
-
invoke("throw", err, resolve, reject);
|
|
2640
|
-
});
|
|
2641
|
-
}
|
|
2642
|
-
|
|
2643
|
-
return Promise.resolve(value).then(function (unwrapped) {
|
|
2644
|
-
// When a yielded Promise is resolved, its final value becomes
|
|
2645
|
-
// the .value of the Promise<{value,done}> result for the
|
|
2646
|
-
// current iteration.
|
|
2647
|
-
result.value = unwrapped;
|
|
2648
|
-
resolve(result);
|
|
2649
|
-
}, function (error) {
|
|
2650
|
-
// If a rejected Promise was yielded, throw the rejection back
|
|
2651
|
-
// into the async generator function so it can be handled there.
|
|
2652
|
-
return invoke("throw", error, resolve, reject);
|
|
2653
|
-
});
|
|
2654
|
-
}
|
|
2655
|
-
}
|
|
2656
|
-
|
|
2657
|
-
var previousPromise;
|
|
2658
|
-
|
|
2659
|
-
function enqueue(method, arg) {
|
|
2660
|
-
function callInvokeWithMethodAndArg() {
|
|
2661
|
-
return new Promise(function (resolve, reject) {
|
|
2662
|
-
invoke(method, arg, resolve, reject);
|
|
2663
|
-
});
|
|
2664
|
-
}
|
|
2665
|
-
|
|
2666
|
-
return previousPromise = // If enqueue has been called before, then we want to wait until
|
|
2667
|
-
// all previous Promises have been resolved before calling invoke,
|
|
2668
|
-
// so that results are always delivered in the correct order. If
|
|
2669
|
-
// enqueue has not been called before, then it is important to
|
|
2670
|
-
// call invoke immediately, without waiting on a callback to fire,
|
|
2671
|
-
// so that the async generator function has the opportunity to do
|
|
2672
|
-
// any necessary setup in a predictable way. This predictability
|
|
2673
|
-
// is why the Promise constructor synchronously invokes its
|
|
2674
|
-
// executor callback, and why async functions synchronously
|
|
2675
|
-
// execute code before the first await. Since we implement simple
|
|
2676
|
-
// async functions in terms of async generators, it is especially
|
|
2677
|
-
// important to get this right, even though it requires care.
|
|
2678
|
-
previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, // Avoid propagating failures to Promises returned by later
|
|
2679
|
-
// invocations of the iterator.
|
|
2680
|
-
callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
|
|
2681
|
-
} // Define the unified helper method that is used to implement .next,
|
|
2682
|
-
// .throw, and .return (see defineIteratorMethods).
|
|
2683
|
-
|
|
2684
|
-
|
|
2685
|
-
this._invoke = enqueue;
|
|
2686
|
-
}
|
|
2687
|
-
|
|
2688
|
-
defineIteratorMethods(AsyncIterator.prototype);
|
|
2689
|
-
|
|
2690
|
-
AsyncIterator.prototype[asyncIteratorSymbol] = function () {
|
|
2691
|
-
return this;
|
|
2692
|
-
};
|
|
2693
|
-
|
|
2694
|
-
exports.AsyncIterator = AsyncIterator; // Note that simple async functions are implemented on top of
|
|
2695
|
-
// AsyncIterator objects; they just return a Promise for the value of
|
|
2696
|
-
// the final result produced by the iterator.
|
|
2697
|
-
|
|
2698
|
-
exports.async = function (innerFn, outerFn, self, tryLocsList) {
|
|
2699
|
-
var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList));
|
|
2700
|
-
return exports.isGeneratorFunction(outerFn) ? iter // If outerFn is a generator, return the full iterator.
|
|
2701
|
-
: iter.next().then(function (result) {
|
|
2702
|
-
return result.done ? result.value : iter.next();
|
|
2703
|
-
});
|
|
2704
|
-
};
|
|
2705
|
-
|
|
2706
|
-
function makeInvokeMethod(innerFn, self, context) {
|
|
2707
|
-
var state = GenStateSuspendedStart;
|
|
2708
|
-
return function invoke(method, arg) {
|
|
2709
|
-
if (state === GenStateExecuting) {
|
|
2710
|
-
throw new Error("Generator is already running");
|
|
2711
|
-
}
|
|
2712
|
-
|
|
2713
|
-
if (state === GenStateCompleted) {
|
|
2714
|
-
if (method === "throw") {
|
|
2715
|
-
throw arg;
|
|
2716
|
-
} // Be forgiving, per 25.3.3.3.3 of the spec:
|
|
2717
|
-
// https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
|
|
2718
|
-
|
|
2719
|
-
|
|
2720
|
-
return doneResult();
|
|
2721
|
-
}
|
|
2722
|
-
|
|
2723
|
-
context.method = method;
|
|
2724
|
-
context.arg = arg;
|
|
2725
|
-
|
|
2726
|
-
while (true) {
|
|
2727
|
-
var delegate = context.delegate;
|
|
2728
|
-
|
|
2729
|
-
if (delegate) {
|
|
2730
|
-
var delegateResult = maybeInvokeDelegate(delegate, context);
|
|
2731
|
-
|
|
2732
|
-
if (delegateResult) {
|
|
2733
|
-
if (delegateResult === ContinueSentinel) continue;
|
|
2734
|
-
return delegateResult;
|
|
2735
|
-
}
|
|
2736
|
-
}
|
|
2737
|
-
|
|
2738
|
-
if (context.method === "next") {
|
|
2739
|
-
// Setting context._sent for legacy support of Babel's
|
|
2740
|
-
// function.sent implementation.
|
|
2741
|
-
context.sent = context._sent = context.arg;
|
|
2742
|
-
} else if (context.method === "throw") {
|
|
2743
|
-
if (state === GenStateSuspendedStart) {
|
|
2744
|
-
state = GenStateCompleted;
|
|
2745
|
-
throw context.arg;
|
|
2746
|
-
}
|
|
2747
|
-
|
|
2748
|
-
context.dispatchException(context.arg);
|
|
2749
|
-
} else if (context.method === "return") {
|
|
2750
|
-
context.abrupt("return", context.arg);
|
|
2751
|
-
}
|
|
2752
|
-
|
|
2753
|
-
state = GenStateExecuting;
|
|
2754
|
-
var record = tryCatch(innerFn, self, context);
|
|
2755
|
-
|
|
2756
|
-
if (record.type === "normal") {
|
|
2757
|
-
// If an exception is thrown from innerFn, we leave state ===
|
|
2758
|
-
// GenStateExecuting and loop back for another invocation.
|
|
2759
|
-
state = context.done ? GenStateCompleted : GenStateSuspendedYield;
|
|
2760
|
-
|
|
2761
|
-
if (record.arg === ContinueSentinel) {
|
|
2762
|
-
continue;
|
|
2763
|
-
}
|
|
2764
|
-
|
|
2765
|
-
return {
|
|
2766
|
-
value: record.arg,
|
|
2767
|
-
done: context.done
|
|
2768
|
-
};
|
|
2769
|
-
} else if (record.type === "throw") {
|
|
2770
|
-
state = GenStateCompleted; // Dispatch the exception by looping back around to the
|
|
2771
|
-
// context.dispatchException(context.arg) call above.
|
|
2772
|
-
|
|
2773
|
-
context.method = "throw";
|
|
2774
|
-
context.arg = record.arg;
|
|
2775
|
-
}
|
|
2776
|
-
}
|
|
2777
|
-
};
|
|
2778
|
-
} // Call delegate.iterator[context.method](context.arg) and handle the
|
|
2779
|
-
// result, either by returning a { value, done } result from the
|
|
2780
|
-
// delegate iterator, or by modifying context.method and context.arg,
|
|
2781
|
-
// setting context.delegate to null, and returning the ContinueSentinel.
|
|
2782
|
-
|
|
2783
|
-
|
|
2784
|
-
function maybeInvokeDelegate(delegate, context) {
|
|
2785
|
-
var method = delegate.iterator[context.method];
|
|
2786
|
-
|
|
2787
|
-
if (method === undefined$1) {
|
|
2788
|
-
// A .throw or .return when the delegate iterator has no .throw
|
|
2789
|
-
// method always terminates the yield* loop.
|
|
2790
|
-
context.delegate = null;
|
|
2791
|
-
|
|
2792
|
-
if (context.method === "throw") {
|
|
2793
|
-
// Note: ["return"] must be used for ES3 parsing compatibility.
|
|
2794
|
-
if (delegate.iterator["return"]) {
|
|
2795
|
-
// If the delegate iterator has a return method, give it a
|
|
2796
|
-
// chance to clean up.
|
|
2797
|
-
context.method = "return";
|
|
2798
|
-
context.arg = undefined$1;
|
|
2799
|
-
maybeInvokeDelegate(delegate, context);
|
|
2800
|
-
|
|
2801
|
-
if (context.method === "throw") {
|
|
2802
|
-
// If maybeInvokeDelegate(context) changed context.method from
|
|
2803
|
-
// "return" to "throw", let that override the TypeError below.
|
|
2804
|
-
return ContinueSentinel;
|
|
2805
|
-
}
|
|
2806
|
-
}
|
|
2807
|
-
|
|
2808
|
-
context.method = "throw";
|
|
2809
|
-
context.arg = new TypeError("The iterator does not provide a 'throw' method");
|
|
2810
|
-
}
|
|
2811
|
-
|
|
2812
|
-
return ContinueSentinel;
|
|
2813
|
-
}
|
|
2814
|
-
|
|
2815
|
-
var record = tryCatch(method, delegate.iterator, context.arg);
|
|
2816
|
-
|
|
2817
|
-
if (record.type === "throw") {
|
|
2818
|
-
context.method = "throw";
|
|
2819
|
-
context.arg = record.arg;
|
|
2820
|
-
context.delegate = null;
|
|
2821
|
-
return ContinueSentinel;
|
|
2822
|
-
}
|
|
2823
|
-
|
|
2824
|
-
var info = record.arg;
|
|
2825
|
-
|
|
2826
|
-
if (!info) {
|
|
2827
|
-
context.method = "throw";
|
|
2828
|
-
context.arg = new TypeError("iterator result is not an object");
|
|
2829
|
-
context.delegate = null;
|
|
2830
|
-
return ContinueSentinel;
|
|
2831
|
-
}
|
|
2832
|
-
|
|
2833
|
-
if (info.done) {
|
|
2834
|
-
// Assign the result of the finished delegate to the temporary
|
|
2835
|
-
// variable specified by delegate.resultName (see delegateYield).
|
|
2836
|
-
context[delegate.resultName] = info.value; // Resume execution at the desired location (see delegateYield).
|
|
2837
|
-
|
|
2838
|
-
context.next = delegate.nextLoc; // If context.method was "throw" but the delegate handled the
|
|
2839
|
-
// exception, let the outer generator proceed normally. If
|
|
2840
|
-
// context.method was "next", forget context.arg since it has been
|
|
2841
|
-
// "consumed" by the delegate iterator. If context.method was
|
|
2842
|
-
// "return", allow the original .return call to continue in the
|
|
2843
|
-
// outer generator.
|
|
2844
|
-
|
|
2845
|
-
if (context.method !== "return") {
|
|
2846
|
-
context.method = "next";
|
|
2847
|
-
context.arg = undefined$1;
|
|
2848
|
-
}
|
|
2849
|
-
} else {
|
|
2850
|
-
// Re-yield the result returned by the delegate method.
|
|
2851
|
-
return info;
|
|
2852
|
-
} // The delegate iterator is finished, so forget it and continue with
|
|
2853
|
-
// the outer generator.
|
|
2854
|
-
|
|
2855
|
-
|
|
2856
|
-
context.delegate = null;
|
|
2857
|
-
return ContinueSentinel;
|
|
2858
|
-
} // Define Generator.prototype.{next,throw,return} in terms of the
|
|
2859
|
-
// unified ._invoke helper method.
|
|
2860
|
-
|
|
2861
|
-
|
|
2862
|
-
defineIteratorMethods(Gp);
|
|
2863
|
-
Gp[toStringTagSymbol] = "Generator"; // A Generator should always return itself as the iterator object when the
|
|
2864
|
-
// @@iterator function is called on it. Some browsers' implementations of the
|
|
2865
|
-
// iterator prototype chain incorrectly implement this, causing the Generator
|
|
2866
|
-
// object to not be returned from this call. This ensures that doesn't happen.
|
|
2867
|
-
// See https://github.com/facebook/regenerator/issues/274 for more details.
|
|
2868
|
-
|
|
2869
|
-
Gp[iteratorSymbol] = function () {
|
|
2870
|
-
return this;
|
|
2871
|
-
};
|
|
2872
|
-
|
|
2873
|
-
Gp.toString = function () {
|
|
2874
|
-
return "[object Generator]";
|
|
2875
|
-
};
|
|
2876
|
-
|
|
2877
|
-
function pushTryEntry(locs) {
|
|
2878
|
-
var entry = {
|
|
2879
|
-
tryLoc: locs[0]
|
|
2880
|
-
};
|
|
2881
|
-
|
|
2882
|
-
if (1 in locs) {
|
|
2883
|
-
entry.catchLoc = locs[1];
|
|
2884
|
-
}
|
|
2885
|
-
|
|
2886
|
-
if (2 in locs) {
|
|
2887
|
-
entry.finallyLoc = locs[2];
|
|
2888
|
-
entry.afterLoc = locs[3];
|
|
2889
|
-
}
|
|
2890
|
-
|
|
2891
|
-
this.tryEntries.push(entry);
|
|
2892
|
-
}
|
|
2893
|
-
|
|
2894
|
-
function resetTryEntry(entry) {
|
|
2895
|
-
var record = entry.completion || {};
|
|
2896
|
-
record.type = "normal";
|
|
2897
|
-
delete record.arg;
|
|
2898
|
-
entry.completion = record;
|
|
2899
|
-
}
|
|
2900
|
-
|
|
2901
|
-
function Context(tryLocsList) {
|
|
2902
|
-
// The root entry object (effectively a try statement without a catch
|
|
2903
|
-
// or a finally block) gives us a place to store values thrown from
|
|
2904
|
-
// locations where there is no enclosing try statement.
|
|
2905
|
-
this.tryEntries = [{
|
|
2906
|
-
tryLoc: "root"
|
|
2907
|
-
}];
|
|
2908
|
-
tryLocsList.forEach(pushTryEntry, this);
|
|
2909
|
-
this.reset(true);
|
|
2910
|
-
}
|
|
2911
|
-
|
|
2912
|
-
exports.keys = function (object) {
|
|
2913
|
-
var keys = [];
|
|
2914
|
-
|
|
2915
|
-
for (var key in object) {
|
|
2916
|
-
keys.push(key);
|
|
2917
|
-
}
|
|
2918
|
-
|
|
2919
|
-
keys.reverse(); // Rather than returning an object with a next method, we keep
|
|
2920
|
-
// things simple and return the next function itself.
|
|
2921
|
-
|
|
2922
|
-
return function next() {
|
|
2923
|
-
while (keys.length) {
|
|
2924
|
-
var key = keys.pop();
|
|
2925
|
-
|
|
2926
|
-
if (key in object) {
|
|
2927
|
-
next.value = key;
|
|
2928
|
-
next.done = false;
|
|
2929
|
-
return next;
|
|
2930
|
-
}
|
|
2931
|
-
} // To avoid creating an additional object, we just hang the .value
|
|
2932
|
-
// and .done properties off the next function object itself. This
|
|
2933
|
-
// also ensures that the minifier will not anonymize the function.
|
|
2934
|
-
|
|
2935
|
-
|
|
2936
|
-
next.done = true;
|
|
2937
|
-
return next;
|
|
2938
|
-
};
|
|
2939
|
-
};
|
|
2940
|
-
|
|
2941
|
-
function values(iterable) {
|
|
2942
|
-
if (iterable) {
|
|
2943
|
-
var iteratorMethod = iterable[iteratorSymbol];
|
|
2944
|
-
|
|
2945
|
-
if (iteratorMethod) {
|
|
2946
|
-
return iteratorMethod.call(iterable);
|
|
2947
|
-
}
|
|
2948
|
-
|
|
2949
|
-
if (typeof iterable.next === "function") {
|
|
2950
|
-
return iterable;
|
|
2951
|
-
}
|
|
2952
|
-
|
|
2953
|
-
if (!isNaN(iterable.length)) {
|
|
2954
|
-
var i = -1,
|
|
2955
|
-
next = function next() {
|
|
2956
|
-
while (++i < iterable.length) {
|
|
2957
|
-
if (hasOwn.call(iterable, i)) {
|
|
2958
|
-
next.value = iterable[i];
|
|
2959
|
-
next.done = false;
|
|
2960
|
-
return next;
|
|
2961
|
-
}
|
|
2962
|
-
}
|
|
2963
|
-
|
|
2964
|
-
next.value = undefined$1;
|
|
2965
|
-
next.done = true;
|
|
2966
|
-
return next;
|
|
2967
|
-
};
|
|
2968
|
-
|
|
2969
|
-
return next.next = next;
|
|
2970
|
-
}
|
|
2971
|
-
} // Return an iterator with no values.
|
|
2972
|
-
|
|
2973
|
-
|
|
2974
|
-
return {
|
|
2975
|
-
next: doneResult
|
|
2976
|
-
};
|
|
2977
|
-
}
|
|
2978
|
-
|
|
2979
|
-
exports.values = values;
|
|
2980
|
-
|
|
2981
|
-
function doneResult() {
|
|
2982
|
-
return {
|
|
2983
|
-
value: undefined$1,
|
|
2984
|
-
done: true
|
|
2985
|
-
};
|
|
2986
|
-
}
|
|
2987
|
-
|
|
2988
|
-
Context.prototype = {
|
|
2989
|
-
constructor: Context,
|
|
2990
|
-
reset: function reset(skipTempReset) {
|
|
2991
|
-
this.prev = 0;
|
|
2992
|
-
this.next = 0; // Resetting context._sent for legacy support of Babel's
|
|
2993
|
-
// function.sent implementation.
|
|
2994
|
-
|
|
2995
|
-
this.sent = this._sent = undefined$1;
|
|
2996
|
-
this.done = false;
|
|
2997
|
-
this.delegate = null;
|
|
2998
|
-
this.method = "next";
|
|
2999
|
-
this.arg = undefined$1;
|
|
3000
|
-
this.tryEntries.forEach(resetTryEntry);
|
|
3001
|
-
|
|
3002
|
-
if (!skipTempReset) {
|
|
3003
|
-
for (var name in this) {
|
|
3004
|
-
// Not sure about the optimal order of these conditions:
|
|
3005
|
-
if (name.charAt(0) === "t" && hasOwn.call(this, name) && !isNaN(+name.slice(1))) {
|
|
3006
|
-
this[name] = undefined$1;
|
|
3007
|
-
}
|
|
3008
|
-
}
|
|
3009
|
-
}
|
|
3010
|
-
},
|
|
3011
|
-
stop: function stop() {
|
|
3012
|
-
this.done = true;
|
|
3013
|
-
var rootEntry = this.tryEntries[0];
|
|
3014
|
-
var rootRecord = rootEntry.completion;
|
|
3015
|
-
|
|
3016
|
-
if (rootRecord.type === "throw") {
|
|
3017
|
-
throw rootRecord.arg;
|
|
3018
|
-
}
|
|
3019
|
-
|
|
3020
|
-
return this.rval;
|
|
3021
|
-
},
|
|
3022
|
-
dispatchException: function dispatchException(exception) {
|
|
3023
|
-
if (this.done) {
|
|
3024
|
-
throw exception;
|
|
3025
|
-
}
|
|
3026
|
-
|
|
3027
|
-
var context = this;
|
|
3028
|
-
|
|
3029
|
-
function handle(loc, caught) {
|
|
3030
|
-
record.type = "throw";
|
|
3031
|
-
record.arg = exception;
|
|
3032
|
-
context.next = loc;
|
|
3033
|
-
|
|
3034
|
-
if (caught) {
|
|
3035
|
-
// If the dispatched exception was caught by a catch block,
|
|
3036
|
-
// then let that catch block handle the exception normally.
|
|
3037
|
-
context.method = "next";
|
|
3038
|
-
context.arg = undefined$1;
|
|
3039
|
-
}
|
|
3040
|
-
|
|
3041
|
-
return !!caught;
|
|
3042
|
-
}
|
|
3043
|
-
|
|
3044
|
-
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
3045
|
-
var entry = this.tryEntries[i];
|
|
3046
|
-
var record = entry.completion;
|
|
3047
|
-
|
|
3048
|
-
if (entry.tryLoc === "root") {
|
|
3049
|
-
// Exception thrown outside of any try block that could handle
|
|
3050
|
-
// it, so set the completion value of the entire function to
|
|
3051
|
-
// throw the exception.
|
|
3052
|
-
return handle("end");
|
|
3053
|
-
}
|
|
3054
|
-
|
|
3055
|
-
if (entry.tryLoc <= this.prev) {
|
|
3056
|
-
var hasCatch = hasOwn.call(entry, "catchLoc");
|
|
3057
|
-
var hasFinally = hasOwn.call(entry, "finallyLoc");
|
|
3058
|
-
|
|
3059
|
-
if (hasCatch && hasFinally) {
|
|
3060
|
-
if (this.prev < entry.catchLoc) {
|
|
3061
|
-
return handle(entry.catchLoc, true);
|
|
3062
|
-
} else if (this.prev < entry.finallyLoc) {
|
|
3063
|
-
return handle(entry.finallyLoc);
|
|
3064
|
-
}
|
|
3065
|
-
} else if (hasCatch) {
|
|
3066
|
-
if (this.prev < entry.catchLoc) {
|
|
3067
|
-
return handle(entry.catchLoc, true);
|
|
3068
|
-
}
|
|
3069
|
-
} else if (hasFinally) {
|
|
3070
|
-
if (this.prev < entry.finallyLoc) {
|
|
3071
|
-
return handle(entry.finallyLoc);
|
|
3072
|
-
}
|
|
3073
|
-
} else {
|
|
3074
|
-
throw new Error("try statement without catch or finally");
|
|
3075
|
-
}
|
|
3076
|
-
}
|
|
3077
|
-
}
|
|
3078
|
-
},
|
|
3079
|
-
abrupt: function abrupt(type, arg) {
|
|
3080
|
-
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
3081
|
-
var entry = this.tryEntries[i];
|
|
3082
|
-
|
|
3083
|
-
if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
|
|
3084
|
-
var finallyEntry = entry;
|
|
3085
|
-
break;
|
|
3086
|
-
}
|
|
3087
|
-
}
|
|
3088
|
-
|
|
3089
|
-
if (finallyEntry && (type === "break" || type === "continue") && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc) {
|
|
3090
|
-
// Ignore the finally entry if control is not jumping to a
|
|
3091
|
-
// location outside the try/catch block.
|
|
3092
|
-
finallyEntry = null;
|
|
3093
|
-
}
|
|
3094
|
-
|
|
3095
|
-
var record = finallyEntry ? finallyEntry.completion : {};
|
|
3096
|
-
record.type = type;
|
|
3097
|
-
record.arg = arg;
|
|
3098
|
-
|
|
3099
|
-
if (finallyEntry) {
|
|
3100
|
-
this.method = "next";
|
|
3101
|
-
this.next = finallyEntry.finallyLoc;
|
|
3102
|
-
return ContinueSentinel;
|
|
3103
|
-
}
|
|
3104
|
-
|
|
3105
|
-
return this.complete(record);
|
|
3106
|
-
},
|
|
3107
|
-
complete: function complete(record, afterLoc) {
|
|
3108
|
-
if (record.type === "throw") {
|
|
3109
|
-
throw record.arg;
|
|
3110
|
-
}
|
|
3111
|
-
|
|
3112
|
-
if (record.type === "break" || record.type === "continue") {
|
|
3113
|
-
this.next = record.arg;
|
|
3114
|
-
} else if (record.type === "return") {
|
|
3115
|
-
this.rval = this.arg = record.arg;
|
|
3116
|
-
this.method = "return";
|
|
3117
|
-
this.next = "end";
|
|
3118
|
-
} else if (record.type === "normal" && afterLoc) {
|
|
3119
|
-
this.next = afterLoc;
|
|
3120
|
-
}
|
|
3121
|
-
|
|
3122
|
-
return ContinueSentinel;
|
|
3123
|
-
},
|
|
3124
|
-
finish: function finish(finallyLoc) {
|
|
3125
|
-
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
3126
|
-
var entry = this.tryEntries[i];
|
|
3127
|
-
|
|
3128
|
-
if (entry.finallyLoc === finallyLoc) {
|
|
3129
|
-
this.complete(entry.completion, entry.afterLoc);
|
|
3130
|
-
resetTryEntry(entry);
|
|
3131
|
-
return ContinueSentinel;
|
|
3132
|
-
}
|
|
3133
|
-
}
|
|
3134
|
-
},
|
|
3135
|
-
"catch": function _catch(tryLoc) {
|
|
3136
|
-
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
3137
|
-
var entry = this.tryEntries[i];
|
|
3138
|
-
|
|
3139
|
-
if (entry.tryLoc === tryLoc) {
|
|
3140
|
-
var record = entry.completion;
|
|
3141
|
-
|
|
3142
|
-
if (record.type === "throw") {
|
|
3143
|
-
var thrown = record.arg;
|
|
3144
|
-
resetTryEntry(entry);
|
|
3145
|
-
}
|
|
3146
|
-
|
|
3147
|
-
return thrown;
|
|
3148
|
-
}
|
|
3149
|
-
} // The context.catch method must only be called with a location
|
|
3150
|
-
// argument that corresponds to a known catch block.
|
|
3151
|
-
|
|
3152
|
-
|
|
3153
|
-
throw new Error("illegal catch attempt");
|
|
3154
|
-
},
|
|
3155
|
-
delegateYield: function delegateYield(iterable, resultName, nextLoc) {
|
|
3156
|
-
this.delegate = {
|
|
3157
|
-
iterator: values(iterable),
|
|
3158
|
-
resultName: resultName,
|
|
3159
|
-
nextLoc: nextLoc
|
|
3160
|
-
};
|
|
3161
|
-
|
|
3162
|
-
if (this.method === "next") {
|
|
3163
|
-
// Deliberately forget the last sent value so that we don't
|
|
3164
|
-
// accidentally pass it on to the delegate.
|
|
3165
|
-
this.arg = undefined$1;
|
|
3166
|
-
}
|
|
3167
|
-
|
|
3168
|
-
return ContinueSentinel;
|
|
3169
|
-
}
|
|
3170
|
-
}; // Regardless of whether this script is executing as a CommonJS module
|
|
3171
|
-
// or not, return the runtime object so that we can declare the variable
|
|
3172
|
-
// regeneratorRuntime in the outer scope, which allows this module to be
|
|
3173
|
-
// injected easily by `bin/regenerator --include-runtime script.js`.
|
|
3174
|
-
|
|
3175
|
-
return exports;
|
|
3176
|
-
}( // If this script is executing as a CommonJS module, use module.exports
|
|
3177
|
-
// as the regeneratorRuntime namespace. Otherwise create a new empty
|
|
3178
|
-
// object. Either way, the resulting object will be used to initialize
|
|
3179
|
-
// the regeneratorRuntime variable at the top of this file.
|
|
3180
|
-
module.exports );
|
|
3181
|
-
|
|
3182
|
-
try {
|
|
3183
|
-
regeneratorRuntime = runtime;
|
|
3184
|
-
} catch (accidentalStrictMode) {
|
|
3185
|
-
// This module should not be running in strict mode, so the above
|
|
3186
|
-
// assignment should always work unless something is misconfigured. Just
|
|
3187
|
-
// in case runtime.js accidentally runs in strict mode, we can escape
|
|
3188
|
-
// strict mode using a global Function call. This could conceivably fail
|
|
3189
|
-
// if a Content Security Policy forbids using Function, but in that case
|
|
3190
|
-
// the proper solution is to fix the accidental strict mode problem. If
|
|
3191
|
-
// you've misconfigured your bundler to force strict mode and applied a
|
|
3192
|
-
// CSP to forbid Function, and you're not willing to fix either of those
|
|
3193
|
-
// problems, please detail your unique predicament in a GitHub issue.
|
|
3194
|
-
Function("r", "regeneratorRuntime = r")(runtime);
|
|
3195
|
-
}
|
|
3196
|
-
})(runtime);
|
|
3197
|
-
|
|
3198
|
-
var regenerator = runtime.exports;
|
|
3199
|
-
|
|
3200
|
-
function _extends$1() {
|
|
3201
|
-
_extends_1 = _extends$1 = Object.assign || function (target) {
|
|
3202
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
3203
|
-
var source = arguments[i];
|
|
3204
|
-
|
|
3205
|
-
for (var key in source) {
|
|
3206
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
3207
|
-
target[key] = source[key];
|
|
3208
|
-
}
|
|
3209
|
-
}
|
|
3210
|
-
}
|
|
3211
|
-
|
|
3212
|
-
return target;
|
|
3213
|
-
};
|
|
3214
|
-
|
|
3215
|
-
return _extends$1.apply(this, arguments);
|
|
3216
|
-
}
|
|
3217
|
-
|
|
3218
|
-
var _extends_1 = _extends$1;
|
|
3219
|
-
|
|
3220
|
-
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
3221
|
-
if (source == null) return {};
|
|
3222
|
-
var target = {};
|
|
3223
|
-
var sourceKeys = Object.keys(source);
|
|
3224
|
-
var key, i;
|
|
3225
|
-
|
|
3226
|
-
for (i = 0; i < sourceKeys.length; i++) {
|
|
3227
|
-
key = sourceKeys[i];
|
|
3228
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
3229
|
-
target[key] = source[key];
|
|
3230
|
-
}
|
|
3231
|
-
|
|
3232
|
-
return target;
|
|
3233
|
-
}
|
|
3234
|
-
|
|
3235
|
-
var objectWithoutPropertiesLoose$1 = _objectWithoutPropertiesLoose;
|
|
3236
|
-
|
|
3237
|
-
var objectWithoutPropertiesLoose = objectWithoutPropertiesLoose$1;
|
|
3238
|
-
|
|
3239
|
-
function _objectWithoutProperties(source, excluded) {
|
|
3240
|
-
if (source == null) return {};
|
|
3241
|
-
var target = objectWithoutPropertiesLoose(source, excluded);
|
|
3242
|
-
var key, i;
|
|
3243
|
-
|
|
3244
|
-
if (Object.getOwnPropertySymbols) {
|
|
3245
|
-
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
3246
|
-
|
|
3247
|
-
for (i = 0; i < sourceSymbolKeys.length; i++) {
|
|
3248
|
-
key = sourceSymbolKeys[i];
|
|
3249
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
3250
|
-
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
3251
|
-
target[key] = source[key];
|
|
3252
|
-
}
|
|
3253
|
-
}
|
|
3254
|
-
|
|
3255
|
-
return target;
|
|
3256
|
-
}
|
|
3257
|
-
|
|
3258
|
-
var objectWithoutProperties = _objectWithoutProperties;
|
|
3259
|
-
|
|
3260
|
-
function _classCallCheck(instance, Constructor) {
|
|
3261
|
-
if (!(instance instanceof Constructor)) {
|
|
3262
|
-
throw new TypeError("Cannot call a class as a function");
|
|
3263
|
-
}
|
|
3264
|
-
}
|
|
3265
|
-
|
|
3266
|
-
var classCallCheck = _classCallCheck;
|
|
3267
|
-
|
|
3268
|
-
function _defineProperties(target, props) {
|
|
3269
|
-
for (var i = 0; i < props.length; i++) {
|
|
3270
|
-
var descriptor = props[i];
|
|
3271
|
-
descriptor.enumerable = descriptor.enumerable || false;
|
|
3272
|
-
descriptor.configurable = true;
|
|
3273
|
-
if ("value" in descriptor) descriptor.writable = true;
|
|
3274
|
-
Object.defineProperty(target, descriptor.key, descriptor);
|
|
3275
|
-
}
|
|
3276
|
-
}
|
|
3277
|
-
|
|
3278
|
-
function _createClass(Constructor, protoProps, staticProps) {
|
|
3279
|
-
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
3280
|
-
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
3281
|
-
return Constructor;
|
|
3282
|
-
}
|
|
3283
|
-
|
|
3284
|
-
var createClass = _createClass;
|
|
3285
|
-
|
|
3286
|
-
function _typeof2(obj) {
|
|
3287
|
-
if (typeof Symbol === "function" && _typeof$2(Symbol.iterator) === "symbol") {
|
|
3288
|
-
_typeof2 = function _typeof2(obj) {
|
|
3289
|
-
return _typeof$2(obj);
|
|
3290
|
-
};
|
|
3291
|
-
} else {
|
|
3292
|
-
_typeof2 = function _typeof2(obj) {
|
|
3293
|
-
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : _typeof$2(obj);
|
|
3294
|
-
};
|
|
3295
|
-
}
|
|
3296
|
-
|
|
3297
|
-
return _typeof2(obj);
|
|
3298
|
-
}
|
|
3299
|
-
|
|
3300
|
-
function _typeof$1(obj) {
|
|
3301
|
-
if (typeof Symbol === "function" && _typeof2(Symbol.iterator) === "symbol") {
|
|
3302
|
-
_typeof_1 = _typeof$1 = function _typeof(obj) {
|
|
3303
|
-
return _typeof2(obj);
|
|
3304
|
-
};
|
|
3305
|
-
} else {
|
|
3306
|
-
_typeof_1 = _typeof$1 = function _typeof(obj) {
|
|
3307
|
-
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : _typeof2(obj);
|
|
3308
|
-
};
|
|
3309
|
-
}
|
|
3310
|
-
|
|
3311
|
-
return _typeof$1(obj);
|
|
3312
|
-
}
|
|
3313
|
-
|
|
3314
|
-
var _typeof_1 = _typeof$1;
|
|
3315
|
-
|
|
3316
|
-
function _assertThisInitialized(self) {
|
|
3317
|
-
if (self === void 0) {
|
|
3318
|
-
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
3319
|
-
}
|
|
3320
|
-
|
|
3321
|
-
return self;
|
|
3322
|
-
}
|
|
3323
|
-
|
|
3324
|
-
var assertThisInitialized$1 = _assertThisInitialized;
|
|
3325
|
-
|
|
3326
|
-
var _typeof = _typeof_1;
|
|
3327
|
-
var assertThisInitialized = assertThisInitialized$1;
|
|
3328
|
-
|
|
3329
|
-
function _possibleConstructorReturn(self, call) {
|
|
3330
|
-
if (call && (_typeof(call) === "object" || typeof call === "function")) {
|
|
3331
|
-
return call;
|
|
3332
|
-
}
|
|
3333
|
-
|
|
3334
|
-
return assertThisInitialized(self);
|
|
3335
|
-
}
|
|
3336
|
-
|
|
3337
|
-
var possibleConstructorReturn = _possibleConstructorReturn;
|
|
3338
|
-
|
|
3339
|
-
function _getPrototypeOf(o) {
|
|
3340
|
-
getPrototypeOf = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
|
|
3341
|
-
return o.__proto__ || Object.getPrototypeOf(o);
|
|
3342
|
-
};
|
|
3343
|
-
return _getPrototypeOf(o);
|
|
3344
|
-
}
|
|
3345
|
-
|
|
3346
|
-
var getPrototypeOf = _getPrototypeOf;
|
|
3347
|
-
|
|
3348
|
-
function _setPrototypeOf(o, p) {
|
|
3349
|
-
setPrototypeOf$1 = _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
|
|
3350
|
-
o.__proto__ = p;
|
|
3351
|
-
return o;
|
|
3352
|
-
};
|
|
3353
|
-
|
|
3354
|
-
return _setPrototypeOf(o, p);
|
|
3355
|
-
}
|
|
3356
|
-
|
|
3357
|
-
var setPrototypeOf$1 = _setPrototypeOf;
|
|
3358
|
-
|
|
3359
|
-
var setPrototypeOf = setPrototypeOf$1;
|
|
3360
|
-
|
|
3361
|
-
function _inherits(subClass, superClass) {
|
|
3362
|
-
if (typeof superClass !== "function" && superClass !== null) {
|
|
3363
|
-
throw new TypeError("Super expression must either be null or a function");
|
|
3364
|
-
}
|
|
3365
|
-
|
|
3366
|
-
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
3367
|
-
constructor: {
|
|
3368
|
-
value: subClass,
|
|
3369
|
-
writable: true,
|
|
3370
|
-
configurable: true
|
|
3371
|
-
}
|
|
3372
|
-
});
|
|
3373
|
-
if (superClass) setPrototypeOf(subClass, superClass);
|
|
3374
|
-
}
|
|
3375
|
-
|
|
3376
|
-
var inherits = _inherits;
|
|
3377
|
-
|
|
3378
|
-
var propTypes = {exports: {}};
|
|
3379
|
-
|
|
3380
|
-
/**
|
|
3381
|
-
* Copyright (c) 2013-present, Facebook, Inc.
|
|
3382
|
-
*
|
|
3383
|
-
* This source code is licensed under the MIT license found in the
|
|
3384
|
-
* LICENSE file in the root directory of this source tree.
|
|
3385
|
-
*/
|
|
3386
|
-
|
|
3387
|
-
var ReactPropTypesSecret$1 = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
|
|
3388
|
-
var ReactPropTypesSecret_1 = ReactPropTypesSecret$1;
|
|
3389
|
-
|
|
3390
|
-
/**
|
|
3391
|
-
* Copyright (c) 2013-present, Facebook, Inc.
|
|
3392
|
-
*
|
|
3393
|
-
* This source code is licensed under the MIT license found in the
|
|
3394
|
-
* LICENSE file in the root directory of this source tree.
|
|
3395
|
-
*/
|
|
3396
|
-
|
|
3397
|
-
var ReactPropTypesSecret = ReactPropTypesSecret_1;
|
|
3398
|
-
|
|
3399
|
-
function emptyFunction() {}
|
|
3400
|
-
|
|
3401
|
-
function emptyFunctionWithReset() {}
|
|
3402
|
-
|
|
3403
|
-
emptyFunctionWithReset.resetWarningCache = emptyFunction;
|
|
3404
|
-
|
|
3405
|
-
var factoryWithThrowingShims = function factoryWithThrowingShims() {
|
|
3406
|
-
function shim(props, propName, componentName, location, propFullName, secret) {
|
|
3407
|
-
if (secret === ReactPropTypesSecret) {
|
|
3408
|
-
// It is still safe when called from React.
|
|
3409
|
-
return;
|
|
3410
|
-
}
|
|
3411
|
-
|
|
3412
|
-
var err = new Error('Calling PropTypes validators directly is not supported by the `prop-types` package. ' + 'Use PropTypes.checkPropTypes() to call them. ' + 'Read more at http://fb.me/use-check-prop-types');
|
|
3413
|
-
err.name = 'Invariant Violation';
|
|
3414
|
-
throw err;
|
|
3415
|
-
}
|
|
3416
|
-
shim.isRequired = shim;
|
|
3417
|
-
|
|
3418
|
-
function getShim() {
|
|
3419
|
-
return shim;
|
|
3420
|
-
}
|
|
3421
|
-
// Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.
|
|
3422
|
-
|
|
3423
|
-
var ReactPropTypes = {
|
|
3424
|
-
array: shim,
|
|
3425
|
-
bool: shim,
|
|
3426
|
-
func: shim,
|
|
3427
|
-
number: shim,
|
|
3428
|
-
object: shim,
|
|
3429
|
-
string: shim,
|
|
3430
|
-
symbol: shim,
|
|
3431
|
-
any: shim,
|
|
3432
|
-
arrayOf: getShim,
|
|
3433
|
-
element: shim,
|
|
3434
|
-
elementType: shim,
|
|
3435
|
-
instanceOf: getShim,
|
|
3436
|
-
node: shim,
|
|
3437
|
-
objectOf: getShim,
|
|
3438
|
-
oneOf: getShim,
|
|
3439
|
-
oneOfType: getShim,
|
|
3440
|
-
shape: getShim,
|
|
3441
|
-
exact: getShim,
|
|
3442
|
-
checkPropTypes: emptyFunctionWithReset,
|
|
3443
|
-
resetWarningCache: emptyFunction
|
|
3444
|
-
};
|
|
3445
|
-
ReactPropTypes.PropTypes = ReactPropTypes;
|
|
3446
|
-
return ReactPropTypes;
|
|
3447
|
-
};
|
|
3448
|
-
|
|
3449
|
-
/**
|
|
3450
|
-
* Copyright (c) 2013-present, Facebook, Inc.
|
|
3451
|
-
*
|
|
3452
|
-
* This source code is licensed under the MIT license found in the
|
|
3453
|
-
* LICENSE file in the root directory of this source tree.
|
|
3454
|
-
*/
|
|
3455
|
-
|
|
3456
|
-
{
|
|
3457
|
-
// By explicitly using `prop-types` you are opting into new production behavior.
|
|
3458
|
-
// http://fb.me/prop-types-in-prod
|
|
3459
|
-
propTypes.exports = factoryWithThrowingShims();
|
|
3460
|
-
}
|
|
3461
|
-
|
|
3462
|
-
var ensureNativeModuleAvailable$1 = {};
|
|
3463
|
-
|
|
3464
|
-
Object.defineProperty(ensureNativeModuleAvailable$1, "__esModule", {
|
|
3465
|
-
value: true
|
|
3466
|
-
});
|
|
3467
|
-
|
|
3468
|
-
ensureNativeModuleAvailable$1["default"] = ensureNativeModuleAvailable;
|
|
3469
|
-
|
|
3470
|
-
var _reactNative$2 = ReactNative__default;
|
|
3471
|
-
var NativeIconAPI$1 = _reactNative$2.NativeModules.RNVectorIconsManager || _reactNative$2.NativeModules.RNVectorIconsModule;
|
|
3472
|
-
|
|
3473
|
-
function ensureNativeModuleAvailable() {
|
|
3474
|
-
if (!NativeIconAPI$1) {
|
|
3475
|
-
if (_reactNative$2.Platform.OS === 'android') {
|
|
3476
|
-
throw new Error('RNVectorIconsModule not available, did you properly integrate the module? Try running `react-native link react-native-vector-icons` and recompiling.');
|
|
3477
|
-
}
|
|
3478
|
-
|
|
3479
|
-
throw new Error('RNVectorIconsManager not available, did you add the library to your project and link with libRNVectorIcons.a? Try running `react-native link react-native-vector-icons` and recompiling.');
|
|
3480
|
-
}
|
|
3481
|
-
}
|
|
3482
|
-
|
|
3483
|
-
var createIconSourceCache$1 = {};
|
|
3484
|
-
|
|
3485
|
-
Object.defineProperty(createIconSourceCache$1, "__esModule", {
|
|
3486
|
-
value: true
|
|
3487
|
-
});
|
|
3488
|
-
|
|
3489
|
-
createIconSourceCache$1["default"] = createIconSourceCache;
|
|
3490
|
-
|
|
3491
|
-
var TYPE_VALUE = 'value';
|
|
3492
|
-
var TYPE_ERROR = 'error';
|
|
3493
|
-
|
|
3494
|
-
function createIconSourceCache() {
|
|
3495
|
-
var cache = new Map();
|
|
3496
|
-
|
|
3497
|
-
var setValue = function setValue(key, value) {
|
|
3498
|
-
return cache.set(key, {
|
|
3499
|
-
type: TYPE_VALUE,
|
|
3500
|
-
data: value
|
|
3501
|
-
});
|
|
3502
|
-
};
|
|
3503
|
-
|
|
3504
|
-
var setError = function setError(key, error) {
|
|
3505
|
-
return cache.set(key, {
|
|
3506
|
-
type: TYPE_ERROR,
|
|
3507
|
-
data: error
|
|
3508
|
-
});
|
|
3509
|
-
};
|
|
3510
|
-
|
|
3511
|
-
var has = function has(key) {
|
|
3512
|
-
return cache.has(key);
|
|
3513
|
-
};
|
|
3514
|
-
|
|
3515
|
-
var get = function get(key) {
|
|
3516
|
-
if (!cache.has(key)) {
|
|
3517
|
-
return undefined;
|
|
3518
|
-
}
|
|
3519
|
-
|
|
3520
|
-
var _cache$get = cache.get(key),
|
|
3521
|
-
type = _cache$get.type,
|
|
3522
|
-
data = _cache$get.data;
|
|
3523
|
-
|
|
3524
|
-
if (type === TYPE_ERROR) {
|
|
3525
|
-
throw data;
|
|
3526
|
-
}
|
|
3527
|
-
|
|
3528
|
-
return data;
|
|
3529
|
-
};
|
|
3530
|
-
|
|
3531
|
-
return {
|
|
3532
|
-
setValue: setValue,
|
|
3533
|
-
setError: setError,
|
|
3534
|
-
has: has,
|
|
3535
|
-
get: get
|
|
3536
|
-
};
|
|
3537
|
-
}
|
|
3538
|
-
|
|
3539
|
-
var iconButton = {};
|
|
3540
|
-
|
|
3541
|
-
var pick = function pick(obj) {
|
|
3542
|
-
for (var _len = arguments.length, keys = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
3543
|
-
keys[_key - 1] = arguments[_key];
|
|
3544
|
-
}
|
|
3545
|
-
|
|
3546
|
-
return keys.flat().filter(function (key) {
|
|
3547
|
-
return Object.prototype.hasOwnProperty.call(obj, key);
|
|
3548
|
-
}).reduce(function (acc, key) {
|
|
3549
|
-
acc[key] = obj[key];
|
|
3550
|
-
return acc;
|
|
3551
|
-
}, {});
|
|
3552
|
-
};
|
|
3553
|
-
|
|
3554
|
-
var omit = function omit(obj) {
|
|
3555
|
-
for (var _len2 = arguments.length, keysToOmit = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
|
|
3556
|
-
keysToOmit[_key2 - 1] = arguments[_key2];
|
|
3557
|
-
}
|
|
3558
|
-
|
|
3559
|
-
var keysToOmitSet = new Set(keysToOmit.flat());
|
|
3560
|
-
return Object.getOwnPropertyNames(obj).filter(function (key) {
|
|
3561
|
-
return !keysToOmitSet.has(key);
|
|
3562
|
-
}).reduce(function (acc, key) {
|
|
3563
|
-
acc[key] = obj[key];
|
|
3564
|
-
return acc;
|
|
3565
|
-
}, {});
|
|
3566
|
-
};
|
|
3567
|
-
|
|
3568
|
-
var objectUtils = {
|
|
3569
|
-
pick: pick,
|
|
3570
|
-
omit: omit
|
|
3571
|
-
};
|
|
3572
|
-
|
|
3573
|
-
var _interopRequireDefault$4 = interopRequireDefault;
|
|
3574
|
-
Object.defineProperty(iconButton, "__esModule", {
|
|
3575
|
-
value: true
|
|
3576
|
-
});
|
|
3577
|
-
|
|
3578
|
-
iconButton["default"] = createIconButtonComponent;
|
|
3579
|
-
|
|
3580
|
-
var _extends2$2 = _interopRequireDefault$4(_extends_1);
|
|
3581
|
-
|
|
3582
|
-
var _objectWithoutProperties2$1 = _interopRequireDefault$4(objectWithoutProperties);
|
|
3583
|
-
|
|
3584
|
-
var _classCallCheck2$2 = _interopRequireDefault$4(classCallCheck);
|
|
3585
|
-
|
|
3586
|
-
var _createClass2$2 = _interopRequireDefault$4(createClass);
|
|
3587
|
-
|
|
3588
|
-
var _possibleConstructorReturn2$2 = _interopRequireDefault$4(possibleConstructorReturn);
|
|
3589
|
-
|
|
3590
|
-
var _getPrototypeOf2$1 = _interopRequireDefault$4(getPrototypeOf);
|
|
3591
|
-
|
|
3592
|
-
var _inherits2$2 = _interopRequireDefault$4(inherits);
|
|
3593
|
-
|
|
3594
|
-
var _react$2 = _interopRequireWildcard$2(React);
|
|
3595
|
-
|
|
3596
|
-
var _propTypes$2 = _interopRequireDefault$4(propTypes.exports);
|
|
3597
|
-
|
|
3598
|
-
var _reactNative$1 = ReactNative__default;
|
|
3599
|
-
var _objectUtils = objectUtils;
|
|
3600
|
-
var _jsxFileName$2 = "/home/runner/work/react-native-vector-icons/react-native-vector-icons/lib/icon-button.js";
|
|
3601
|
-
|
|
3602
|
-
function _getRequireWildcardCache$2(nodeInterop) {
|
|
3603
|
-
if (typeof WeakMap !== "function") return null;
|
|
3604
|
-
var cacheBabelInterop = new WeakMap();
|
|
3605
|
-
var cacheNodeInterop = new WeakMap();
|
|
3606
|
-
return (_getRequireWildcardCache$2 = function _getRequireWildcardCache(nodeInterop) {
|
|
3607
|
-
return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
|
|
3608
|
-
})(nodeInterop);
|
|
3609
|
-
}
|
|
3610
|
-
|
|
3611
|
-
function _interopRequireWildcard$2(obj, nodeInterop) {
|
|
3612
|
-
if (!nodeInterop && obj && obj.__esModule) {
|
|
3613
|
-
return obj;
|
|
3614
|
-
}
|
|
3615
|
-
|
|
3616
|
-
if (obj === null || _typeof$2(obj) !== "object" && typeof obj !== "function") {
|
|
3617
|
-
return {
|
|
3618
|
-
"default": obj
|
|
3619
|
-
};
|
|
3620
|
-
}
|
|
3621
|
-
|
|
3622
|
-
var cache = _getRequireWildcardCache$2(nodeInterop);
|
|
3623
|
-
|
|
3624
|
-
if (cache && cache.has(obj)) {
|
|
3625
|
-
return cache.get(obj);
|
|
3626
|
-
}
|
|
3627
|
-
|
|
3628
|
-
var newObj = {};
|
|
3629
|
-
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
3630
|
-
|
|
3631
|
-
for (var key in obj) {
|
|
3632
|
-
if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
3633
|
-
var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
|
|
3634
|
-
|
|
3635
|
-
if (desc && (desc.get || desc.set)) {
|
|
3636
|
-
Object.defineProperty(newObj, key, desc);
|
|
3637
|
-
} else {
|
|
3638
|
-
newObj[key] = obj[key];
|
|
3639
|
-
}
|
|
3640
|
-
}
|
|
3641
|
-
}
|
|
3642
|
-
|
|
3643
|
-
newObj["default"] = obj;
|
|
3644
|
-
|
|
3645
|
-
if (cache) {
|
|
3646
|
-
cache.set(obj, newObj);
|
|
3647
|
-
}
|
|
3648
|
-
|
|
3649
|
-
return newObj;
|
|
3650
|
-
}
|
|
3651
|
-
|
|
3652
|
-
var styles$1 = _reactNative$1.StyleSheet.create({
|
|
3653
|
-
container: {
|
|
3654
|
-
flexDirection: 'row',
|
|
3655
|
-
justifyContent: 'flex-start',
|
|
3656
|
-
alignItems: 'center',
|
|
3657
|
-
padding: 8
|
|
3658
|
-
},
|
|
3659
|
-
touchable: {
|
|
3660
|
-
overflow: 'hidden'
|
|
3661
|
-
},
|
|
3662
|
-
icon: {
|
|
3663
|
-
marginRight: 10
|
|
3664
|
-
},
|
|
3665
|
-
text: {
|
|
3666
|
-
fontWeight: '600',
|
|
3667
|
-
backgroundColor: 'transparent'
|
|
3668
|
-
}
|
|
3669
|
-
});
|
|
3670
|
-
|
|
3671
|
-
var IOS7_BLUE = '#007AFF';
|
|
3672
|
-
var TEXT_PROP_NAMES = ['ellipsizeMode', 'numberOfLines', 'textBreakStrategy', 'selectable', 'suppressHighlighting', 'allowFontScaling', 'adjustsFontSizeToFit', 'minimumFontScale'];
|
|
3673
|
-
var TOUCHABLE_PROP_NAMES = ['accessible', 'accessibilityLabel', 'accessibilityHint', 'accessibilityComponentType', 'accessibilityRole', 'accessibilityStates', 'accessibilityTraits', 'onFocus', 'onBlur', 'disabled', 'onPress', 'onPressIn', 'onPressOut', 'onLayout', 'onLongPress', 'nativeID', 'testID', 'delayPressIn', 'delayPressOut', 'delayLongPress', 'activeOpacity', 'underlayColor', 'selectionColor', 'onShowUnderlay', 'onHideUnderlay', 'hasTVPreferredFocus', 'tvParallaxProperties'];
|
|
3674
|
-
|
|
3675
|
-
function createIconButtonComponent(Icon) {
|
|
3676
|
-
var _class, _temp;
|
|
3677
|
-
|
|
3678
|
-
return _temp = _class = function (_PureComponent) {
|
|
3679
|
-
(0, _inherits2$2["default"])(IconButton, _PureComponent);
|
|
3680
|
-
|
|
3681
|
-
function IconButton() {
|
|
3682
|
-
(0, _classCallCheck2$2["default"])(this, IconButton);
|
|
3683
|
-
return (0, _possibleConstructorReturn2$2["default"])(this, (0, _getPrototypeOf2$1["default"])(IconButton).apply(this, arguments));
|
|
3684
|
-
}
|
|
3685
|
-
|
|
3686
|
-
(0, _createClass2$2["default"])(IconButton, [{
|
|
3687
|
-
key: "render",
|
|
3688
|
-
value: function render() {
|
|
3689
|
-
var _this$props = this.props,
|
|
3690
|
-
style = _this$props.style,
|
|
3691
|
-
iconStyle = _this$props.iconStyle,
|
|
3692
|
-
children = _this$props.children,
|
|
3693
|
-
restProps = (0, _objectWithoutProperties2$1["default"])(_this$props, ["style", "iconStyle", "children"]);
|
|
3694
|
-
var iconProps = (0, _objectUtils.pick)(restProps, TEXT_PROP_NAMES, 'style', 'name', 'size', 'color');
|
|
3695
|
-
var touchableProps = (0, _objectUtils.pick)(restProps, TOUCHABLE_PROP_NAMES);
|
|
3696
|
-
var props = (0, _objectUtils.omit)(restProps, Object.keys(iconProps), Object.keys(touchableProps), 'iconStyle', 'borderRadius', 'backgroundColor');
|
|
3697
|
-
iconProps.style = iconStyle ? [styles$1.icon, iconStyle] : styles$1.icon;
|
|
3698
|
-
var colorStyle = (0, _objectUtils.pick)(this.props, 'color');
|
|
3699
|
-
var blockStyle = (0, _objectUtils.pick)(this.props, 'backgroundColor', 'borderRadius');
|
|
3700
|
-
return _react$2["default"].createElement(_reactNative$1.TouchableHighlight, (0, _extends2$2["default"])({
|
|
3701
|
-
style: [styles$1.touchable, blockStyle]
|
|
3702
|
-
}, touchableProps, {
|
|
3703
|
-
__self: this,
|
|
3704
|
-
__source: {
|
|
3705
|
-
fileName: _jsxFileName$2,
|
|
3706
|
-
lineNumber: 116
|
|
3707
|
-
}
|
|
3708
|
-
}), _react$2["default"].createElement(_reactNative$1.View, (0, _extends2$2["default"])({
|
|
3709
|
-
style: [styles$1.container, blockStyle, style]
|
|
3710
|
-
}, props, {
|
|
3711
|
-
__self: this,
|
|
3712
|
-
__source: {
|
|
3713
|
-
fileName: _jsxFileName$2,
|
|
3714
|
-
lineNumber: 120
|
|
3715
|
-
}
|
|
3716
|
-
}), _react$2["default"].createElement(Icon, (0, _extends2$2["default"])({}, iconProps, {
|
|
3717
|
-
__self: this,
|
|
3718
|
-
__source: {
|
|
3719
|
-
fileName: _jsxFileName$2,
|
|
3720
|
-
lineNumber: 121
|
|
3721
|
-
}
|
|
3722
|
-
})), typeof children === 'string' ? _react$2["default"].createElement(_reactNative$1.Text, {
|
|
3723
|
-
style: [styles$1.text, colorStyle],
|
|
3724
|
-
selectable: false,
|
|
3725
|
-
__self: this,
|
|
3726
|
-
__source: {
|
|
3727
|
-
fileName: _jsxFileName$2,
|
|
3728
|
-
lineNumber: 123
|
|
3729
|
-
}
|
|
3730
|
-
}, children) : children));
|
|
3731
|
-
}
|
|
3732
|
-
}]);
|
|
3733
|
-
return IconButton;
|
|
3734
|
-
}(_react$2.PureComponent), _class.propTypes = {
|
|
3735
|
-
backgroundColor: _propTypes$2["default"].oneOfType([_propTypes$2["default"].string, _propTypes$2["default"].number]),
|
|
3736
|
-
borderRadius: _propTypes$2["default"].number,
|
|
3737
|
-
color: _propTypes$2["default"].any,
|
|
3738
|
-
size: _propTypes$2["default"].number,
|
|
3739
|
-
iconStyle: _propTypes$2["default"].any,
|
|
3740
|
-
style: _propTypes$2["default"].any,
|
|
3741
|
-
children: _propTypes$2["default"].node
|
|
3742
|
-
}, _class.defaultProps = {
|
|
3743
|
-
backgroundColor: IOS7_BLUE,
|
|
3744
|
-
borderRadius: 5,
|
|
3745
|
-
color: 'white',
|
|
3746
|
-
size: 20
|
|
3747
|
-
}, _temp;
|
|
3748
|
-
}
|
|
3749
|
-
|
|
3750
|
-
var _interopRequireDefault$3 = interopRequireDefault;
|
|
3751
|
-
Object.defineProperty(createIconSet$1, "__esModule", {
|
|
3752
|
-
value: true
|
|
3753
|
-
});
|
|
3754
|
-
createIconSet$1.NativeIconAPI = createIconSet$1.DEFAULT_ICON_SIZE = createIconSet$1.DEFAULT_ICON_COLOR = void 0;
|
|
3755
|
-
|
|
3756
|
-
createIconSet$1["default"] = createIconSet;
|
|
3757
|
-
|
|
3758
|
-
var _toConsumableArray2 = _interopRequireDefault$3(toConsumableArray);
|
|
3759
|
-
|
|
3760
|
-
var _regenerator = _interopRequireDefault$3(regenerator);
|
|
3761
|
-
|
|
3762
|
-
var _extends2$1 = _interopRequireDefault$3(_extends_1);
|
|
3763
|
-
|
|
3764
|
-
var _objectWithoutProperties2 = _interopRequireDefault$3(objectWithoutProperties);
|
|
3765
|
-
|
|
3766
|
-
var _classCallCheck2$1 = _interopRequireDefault$3(classCallCheck);
|
|
3767
|
-
|
|
3768
|
-
var _createClass2$1 = _interopRequireDefault$3(createClass);
|
|
3769
|
-
|
|
3770
|
-
var _possibleConstructorReturn2$1 = _interopRequireDefault$3(possibleConstructorReturn);
|
|
3771
|
-
|
|
3772
|
-
var _getPrototypeOf3 = _interopRequireDefault$3(getPrototypeOf);
|
|
3773
|
-
|
|
3774
|
-
var _inherits2$1 = _interopRequireDefault$3(inherits);
|
|
3775
|
-
|
|
3776
|
-
var _react$1 = _interopRequireWildcard$1(React);
|
|
3777
|
-
|
|
3778
|
-
var _propTypes$1 = _interopRequireDefault$3(propTypes.exports);
|
|
3779
|
-
|
|
3780
|
-
var _reactNative = ReactNative__default;
|
|
3781
|
-
|
|
3782
|
-
var _ensureNativeModuleAvailable = _interopRequireDefault$3(ensureNativeModuleAvailable$1);
|
|
3783
|
-
|
|
3784
|
-
var _createIconSourceCache = _interopRequireDefault$3(createIconSourceCache$1);
|
|
3785
|
-
|
|
3786
|
-
var _iconButton = _interopRequireDefault$3(iconButton);
|
|
3787
|
-
|
|
3788
|
-
var _jsxFileName$1 = "/home/runner/work/react-native-vector-icons/react-native-vector-icons/lib/create-icon-set.js";
|
|
3789
|
-
|
|
3790
|
-
function _getRequireWildcardCache$1(nodeInterop) {
|
|
3791
|
-
if (typeof WeakMap !== "function") return null;
|
|
3792
|
-
var cacheBabelInterop = new WeakMap();
|
|
3793
|
-
var cacheNodeInterop = new WeakMap();
|
|
3794
|
-
return (_getRequireWildcardCache$1 = function _getRequireWildcardCache(nodeInterop) {
|
|
3795
|
-
return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
|
|
3796
|
-
})(nodeInterop);
|
|
3797
|
-
}
|
|
3798
|
-
|
|
3799
|
-
function _interopRequireWildcard$1(obj, nodeInterop) {
|
|
3800
|
-
if (!nodeInterop && obj && obj.__esModule) {
|
|
3801
|
-
return obj;
|
|
3802
|
-
}
|
|
3803
|
-
|
|
3804
|
-
if (obj === null || _typeof$2(obj) !== "object" && typeof obj !== "function") {
|
|
3805
|
-
return {
|
|
3806
|
-
"default": obj
|
|
3807
|
-
};
|
|
3808
|
-
}
|
|
3809
|
-
|
|
3810
|
-
var cache = _getRequireWildcardCache$1(nodeInterop);
|
|
3811
|
-
|
|
3812
|
-
if (cache && cache.has(obj)) {
|
|
3813
|
-
return cache.get(obj);
|
|
3814
|
-
}
|
|
3815
|
-
|
|
3816
|
-
var newObj = {};
|
|
3817
|
-
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
3818
|
-
|
|
3819
|
-
for (var key in obj) {
|
|
3820
|
-
if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
3821
|
-
var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
|
|
3822
|
-
|
|
3823
|
-
if (desc && (desc.get || desc.set)) {
|
|
3824
|
-
Object.defineProperty(newObj, key, desc);
|
|
3825
|
-
} else {
|
|
3826
|
-
newObj[key] = obj[key];
|
|
3827
|
-
}
|
|
3828
|
-
}
|
|
3829
|
-
}
|
|
3830
|
-
|
|
3831
|
-
newObj["default"] = obj;
|
|
3832
|
-
|
|
3833
|
-
if (cache) {
|
|
3834
|
-
cache.set(obj, newObj);
|
|
3835
|
-
}
|
|
3836
|
-
|
|
3837
|
-
return newObj;
|
|
3838
|
-
}
|
|
3839
|
-
|
|
3840
|
-
var NativeIconAPI = _reactNative.NativeModules.RNVectorIconsManager || _reactNative.NativeModules.RNVectorIconsModule;
|
|
3841
|
-
createIconSet$1.NativeIconAPI = NativeIconAPI;
|
|
3842
|
-
var DEFAULT_ICON_SIZE = 12;
|
|
3843
|
-
createIconSet$1.DEFAULT_ICON_SIZE = DEFAULT_ICON_SIZE;
|
|
3844
|
-
var DEFAULT_ICON_COLOR = 'black';
|
|
3845
|
-
createIconSet$1.DEFAULT_ICON_COLOR = DEFAULT_ICON_COLOR;
|
|
3846
|
-
|
|
3847
|
-
function createIconSet(glyphMap, fontFamily, fontFile, fontStyle) {
|
|
3848
|
-
var fontBasename = fontFile ? fontFile.replace(/\.(otf|ttf)$/, '') : fontFamily;
|
|
3849
|
-
|
|
3850
|
-
var fontReference = _reactNative.Platform.select({
|
|
3851
|
-
windows: "/Assets/" + fontFile + "#" + fontFamily,
|
|
3852
|
-
android: fontBasename,
|
|
3853
|
-
web: fontBasename,
|
|
3854
|
-
"default": fontFamily
|
|
3855
|
-
});
|
|
3856
|
-
|
|
3857
|
-
var IconNamePropType = _propTypes$1["default"].oneOf(Object.keys(glyphMap));
|
|
3858
|
-
|
|
3859
|
-
var Icon = function (_PureComponent) {
|
|
3860
|
-
(0, _inherits2$1["default"])(Icon, _PureComponent);
|
|
3861
|
-
|
|
3862
|
-
function Icon() {
|
|
3863
|
-
var _getPrototypeOf2;
|
|
3864
|
-
|
|
3865
|
-
var _this;
|
|
3866
|
-
|
|
3867
|
-
(0, _classCallCheck2$1["default"])(this, Icon);
|
|
3868
|
-
|
|
3869
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
3870
|
-
args[_key] = arguments[_key];
|
|
3871
|
-
}
|
|
3872
|
-
|
|
3873
|
-
_this = (0, _possibleConstructorReturn2$1["default"])(this, (_getPrototypeOf2 = (0, _getPrototypeOf3["default"])(Icon)).call.apply(_getPrototypeOf2, [this].concat(args)));
|
|
3874
|
-
_this.root = null;
|
|
3875
|
-
|
|
3876
|
-
_this.handleRef = function (ref) {
|
|
3877
|
-
_this.root = ref;
|
|
3878
|
-
};
|
|
3879
|
-
|
|
3880
|
-
return _this;
|
|
3881
|
-
}
|
|
3882
|
-
|
|
3883
|
-
(0, _createClass2$1["default"])(Icon, [{
|
|
3884
|
-
key: "setNativeProps",
|
|
3885
|
-
value: function setNativeProps(nativeProps) {
|
|
3886
|
-
if (this.root) {
|
|
3887
|
-
this.root.setNativeProps(nativeProps);
|
|
3888
|
-
}
|
|
3889
|
-
}
|
|
3890
|
-
}, {
|
|
3891
|
-
key: "render",
|
|
3892
|
-
value: function render() {
|
|
3893
|
-
var _this$props = this.props,
|
|
3894
|
-
name = _this$props.name,
|
|
3895
|
-
size = _this$props.size,
|
|
3896
|
-
color = _this$props.color,
|
|
3897
|
-
style = _this$props.style,
|
|
3898
|
-
children = _this$props.children,
|
|
3899
|
-
props = (0, _objectWithoutProperties2["default"])(_this$props, ["name", "size", "color", "style", "children"]);
|
|
3900
|
-
var glyph = name ? glyphMap[name] || '?' : '';
|
|
3901
|
-
|
|
3902
|
-
if (typeof glyph === 'number') {
|
|
3903
|
-
glyph = String.fromCodePoint(glyph);
|
|
3904
|
-
}
|
|
3905
|
-
|
|
3906
|
-
var styleDefaults = {
|
|
3907
|
-
fontSize: size,
|
|
3908
|
-
color: color
|
|
3909
|
-
};
|
|
3910
|
-
var styleOverrides = {
|
|
3911
|
-
fontFamily: fontReference,
|
|
3912
|
-
fontWeight: 'normal',
|
|
3913
|
-
fontStyle: 'normal'
|
|
3914
|
-
};
|
|
3915
|
-
props.style = [styleDefaults, style, styleOverrides, fontStyle || {}];
|
|
3916
|
-
props.ref = this.handleRef;
|
|
3917
|
-
return _react$1["default"].createElement(_reactNative.Text, (0, _extends2$1["default"])({
|
|
3918
|
-
selectable: false
|
|
3919
|
-
}, props, {
|
|
3920
|
-
__self: this,
|
|
3921
|
-
__source: {
|
|
3922
|
-
fileName: _jsxFileName$1,
|
|
3923
|
-
lineNumber: 91
|
|
3924
|
-
}
|
|
3925
|
-
}), glyph, children);
|
|
3926
|
-
}
|
|
3927
|
-
}]);
|
|
3928
|
-
return Icon;
|
|
3929
|
-
}(_react$1.PureComponent);
|
|
3930
|
-
|
|
3931
|
-
Icon.propTypes = {
|
|
3932
|
-
allowFontScaling: _propTypes$1["default"].bool,
|
|
3933
|
-
name: IconNamePropType,
|
|
3934
|
-
size: _propTypes$1["default"].number,
|
|
3935
|
-
color: _propTypes$1["default"].any,
|
|
3936
|
-
children: _propTypes$1["default"].node,
|
|
3937
|
-
style: _propTypes$1["default"].any
|
|
3938
|
-
};
|
|
3939
|
-
Icon.defaultProps = {
|
|
3940
|
-
size: DEFAULT_ICON_SIZE,
|
|
3941
|
-
allowFontScaling: false
|
|
3942
|
-
};
|
|
3943
|
-
var imageSourceCache = (0, _createIconSourceCache["default"])();
|
|
3944
|
-
|
|
3945
|
-
function resolveGlyph(name) {
|
|
3946
|
-
var glyph = glyphMap[name] || '?';
|
|
3947
|
-
|
|
3948
|
-
if (typeof glyph === 'number') {
|
|
3949
|
-
return String.fromCodePoint(glyph);
|
|
3950
|
-
}
|
|
3951
|
-
|
|
3952
|
-
return glyph;
|
|
3953
|
-
}
|
|
3954
|
-
|
|
3955
|
-
function getImageSourceSync(name) {
|
|
3956
|
-
var size = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : DEFAULT_ICON_SIZE;
|
|
3957
|
-
var color = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : DEFAULT_ICON_COLOR;
|
|
3958
|
-
(0, _ensureNativeModuleAvailable["default"])();
|
|
3959
|
-
var glyph = resolveGlyph(name);
|
|
3960
|
-
var processedColor = (0, _reactNative.processColor)(color);
|
|
3961
|
-
var cacheKey = glyph + ":" + size + ":" + processedColor;
|
|
3962
|
-
|
|
3963
|
-
if (imageSourceCache.has(cacheKey)) {
|
|
3964
|
-
return imageSourceCache.get(cacheKey);
|
|
3965
|
-
}
|
|
3966
|
-
|
|
3967
|
-
try {
|
|
3968
|
-
var imagePath = NativeIconAPI.getImageForFontSync(fontReference, glyph, size, processedColor);
|
|
3969
|
-
var value = {
|
|
3970
|
-
uri: imagePath,
|
|
3971
|
-
scale: _reactNative.PixelRatio.get()
|
|
3972
|
-
};
|
|
3973
|
-
imageSourceCache.setValue(cacheKey, value);
|
|
3974
|
-
return value;
|
|
3975
|
-
} catch (error) {
|
|
3976
|
-
imageSourceCache.setError(cacheKey, error);
|
|
3977
|
-
throw error;
|
|
3978
|
-
}
|
|
3979
|
-
}
|
|
3980
|
-
|
|
3981
|
-
function getImageSource(name) {
|
|
3982
|
-
var size,
|
|
3983
|
-
color,
|
|
3984
|
-
glyph,
|
|
3985
|
-
processedColor,
|
|
3986
|
-
cacheKey,
|
|
3987
|
-
imagePath,
|
|
3988
|
-
value,
|
|
3989
|
-
_args = arguments;
|
|
3990
|
-
return _regenerator["default"].async(function getImageSource$(_context) {
|
|
3991
|
-
while (1) {
|
|
3992
|
-
switch (_context.prev = _context.next) {
|
|
3993
|
-
case 0:
|
|
3994
|
-
size = _args.length > 1 && _args[1] !== undefined ? _args[1] : DEFAULT_ICON_SIZE;
|
|
3995
|
-
color = _args.length > 2 && _args[2] !== undefined ? _args[2] : DEFAULT_ICON_COLOR;
|
|
3996
|
-
(0, _ensureNativeModuleAvailable["default"])();
|
|
3997
|
-
glyph = resolveGlyph(name);
|
|
3998
|
-
processedColor = (0, _reactNative.processColor)(color);
|
|
3999
|
-
cacheKey = glyph + ":" + size + ":" + processedColor;
|
|
4000
|
-
|
|
4001
|
-
if (!imageSourceCache.has(cacheKey)) {
|
|
4002
|
-
_context.next = 8;
|
|
4003
|
-
break;
|
|
4004
|
-
}
|
|
4005
|
-
|
|
4006
|
-
return _context.abrupt("return", imageSourceCache.get(cacheKey));
|
|
4007
|
-
|
|
4008
|
-
case 8:
|
|
4009
|
-
_context.prev = 8;
|
|
4010
|
-
_context.next = 11;
|
|
4011
|
-
return _regenerator["default"].awrap(NativeIconAPI.getImageForFont(fontReference, glyph, size, processedColor));
|
|
4012
|
-
|
|
4013
|
-
case 11:
|
|
4014
|
-
imagePath = _context.sent;
|
|
4015
|
-
value = {
|
|
4016
|
-
uri: imagePath,
|
|
4017
|
-
scale: _reactNative.PixelRatio.get()
|
|
4018
|
-
};
|
|
4019
|
-
imageSourceCache.setValue(cacheKey, value);
|
|
4020
|
-
return _context.abrupt("return", value);
|
|
4021
|
-
|
|
4022
|
-
case 17:
|
|
4023
|
-
_context.prev = 17;
|
|
4024
|
-
_context.t0 = _context["catch"](8);
|
|
4025
|
-
imageSourceCache.setError(cacheKey, _context.t0);
|
|
4026
|
-
throw _context.t0;
|
|
4027
|
-
|
|
4028
|
-
case 21:
|
|
4029
|
-
case "end":
|
|
4030
|
-
return _context.stop();
|
|
4031
|
-
}
|
|
4032
|
-
}
|
|
4033
|
-
}, null, null, [[8, 17]]);
|
|
4034
|
-
}
|
|
4035
|
-
|
|
4036
|
-
function loadFont() {
|
|
4037
|
-
var file,
|
|
4038
|
-
_args2 = arguments;
|
|
4039
|
-
return _regenerator["default"].async(function loadFont$(_context2) {
|
|
4040
|
-
while (1) {
|
|
4041
|
-
switch (_context2.prev = _context2.next) {
|
|
4042
|
-
case 0:
|
|
4043
|
-
file = _args2.length > 0 && _args2[0] !== undefined ? _args2[0] : fontFile;
|
|
4044
|
-
|
|
4045
|
-
if (!(_reactNative.Platform.OS === 'ios')) {
|
|
4046
|
-
_context2.next = 7;
|
|
4047
|
-
break;
|
|
4048
|
-
}
|
|
4049
|
-
|
|
4050
|
-
(0, _ensureNativeModuleAvailable["default"])();
|
|
4051
|
-
|
|
4052
|
-
if (file) {
|
|
4053
|
-
_context2.next = 5;
|
|
4054
|
-
break;
|
|
4055
|
-
}
|
|
4056
|
-
|
|
4057
|
-
throw new Error('Unable to load font, because no file was specified. ');
|
|
4058
|
-
|
|
4059
|
-
case 5:
|
|
4060
|
-
_context2.next = 7;
|
|
4061
|
-
return _regenerator["default"].awrap(NativeIconAPI.loadFontWithFileName.apply(NativeIconAPI, (0, _toConsumableArray2["default"])(file.split('.'))));
|
|
4062
|
-
|
|
4063
|
-
case 7:
|
|
4064
|
-
case "end":
|
|
4065
|
-
return _context2.stop();
|
|
4066
|
-
}
|
|
4067
|
-
}
|
|
4068
|
-
});
|
|
4069
|
-
}
|
|
4070
|
-
|
|
4071
|
-
function hasIcon(name) {
|
|
4072
|
-
return Object.prototype.hasOwnProperty.call(glyphMap, name);
|
|
4073
|
-
}
|
|
4074
|
-
|
|
4075
|
-
function getRawGlyphMap() {
|
|
4076
|
-
return glyphMap;
|
|
4077
|
-
}
|
|
4078
|
-
|
|
4079
|
-
function getFontFamily() {
|
|
4080
|
-
return fontReference;
|
|
4081
|
-
}
|
|
4082
|
-
|
|
4083
|
-
Icon.Button = (0, _iconButton["default"])(Icon);
|
|
4084
|
-
Icon.getImageSource = getImageSource;
|
|
4085
|
-
Icon.getImageSourceSync = getImageSourceSync;
|
|
4086
|
-
Icon.loadFont = loadFont;
|
|
4087
|
-
Icon.hasIcon = hasIcon;
|
|
4088
|
-
Icon.getRawGlyphMap = getRawGlyphMap;
|
|
4089
|
-
Icon.getFontFamily = getFontFamily;
|
|
4090
|
-
return Icon;
|
|
4091
|
-
}
|
|
4092
|
-
|
|
4093
|
-
var createMultiStyleIconSet$1 = {};
|
|
4094
|
-
|
|
4095
|
-
function _defineProperty$1(obj, key, value) {
|
|
4096
|
-
if (key in obj) {
|
|
4097
|
-
Object.defineProperty(obj, key, {
|
|
4098
|
-
value: value,
|
|
4099
|
-
enumerable: true,
|
|
4100
|
-
configurable: true,
|
|
4101
|
-
writable: true
|
|
4102
|
-
});
|
|
4103
|
-
} else {
|
|
4104
|
-
obj[key] = value;
|
|
4105
|
-
}
|
|
4106
|
-
|
|
4107
|
-
return obj;
|
|
4108
|
-
}
|
|
4109
|
-
|
|
4110
|
-
var defineProperty = _defineProperty$1;
|
|
4111
|
-
|
|
4112
|
-
var _interopRequireDefault$2 = interopRequireDefault;
|
|
4113
|
-
Object.defineProperty(createMultiStyleIconSet$1, "__esModule", {
|
|
4114
|
-
value: true
|
|
4115
|
-
});
|
|
4116
|
-
|
|
4117
|
-
createMultiStyleIconSet$1["default"] = createMultiStyleIconSet;
|
|
4118
|
-
|
|
4119
|
-
var _classCallCheck2 = _interopRequireDefault$2(classCallCheck);
|
|
4120
|
-
|
|
4121
|
-
var _createClass2 = _interopRequireDefault$2(createClass);
|
|
4122
|
-
|
|
4123
|
-
var _possibleConstructorReturn2 = _interopRequireDefault$2(possibleConstructorReturn);
|
|
4124
|
-
|
|
4125
|
-
var _getPrototypeOf2 = _interopRequireDefault$2(getPrototypeOf);
|
|
4126
|
-
|
|
4127
|
-
var _inherits2 = _interopRequireDefault$2(inherits);
|
|
4128
|
-
|
|
4129
|
-
var _defineProperty2 = _interopRequireDefault$2(defineProperty);
|
|
4130
|
-
|
|
4131
|
-
var _extends2 = _interopRequireDefault$2(_extends_1);
|
|
4132
|
-
|
|
4133
|
-
var _react = _interopRequireWildcard(React);
|
|
4134
|
-
|
|
4135
|
-
var _propTypes = _interopRequireDefault$2(propTypes.exports);
|
|
4136
|
-
|
|
4137
|
-
var _createIconSet$2 = _interopRequireWildcard(createIconSet$1);
|
|
4138
|
-
|
|
4139
|
-
var _jsxFileName = "/home/runner/work/react-native-vector-icons/react-native-vector-icons/lib/create-multi-style-icon-set.js";
|
|
4140
|
-
|
|
4141
|
-
function _getRequireWildcardCache(nodeInterop) {
|
|
4142
|
-
if (typeof WeakMap !== "function") return null;
|
|
4143
|
-
var cacheBabelInterop = new WeakMap();
|
|
4144
|
-
var cacheNodeInterop = new WeakMap();
|
|
4145
|
-
return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) {
|
|
4146
|
-
return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
|
|
4147
|
-
})(nodeInterop);
|
|
4148
|
-
}
|
|
4149
|
-
|
|
4150
|
-
function _interopRequireWildcard(obj, nodeInterop) {
|
|
4151
|
-
if (!nodeInterop && obj && obj.__esModule) {
|
|
4152
|
-
return obj;
|
|
4153
|
-
}
|
|
4154
|
-
|
|
4155
|
-
if (obj === null || _typeof$2(obj) !== "object" && typeof obj !== "function") {
|
|
4156
|
-
return {
|
|
4157
|
-
"default": obj
|
|
4158
|
-
};
|
|
4159
|
-
}
|
|
4160
|
-
|
|
4161
|
-
var cache = _getRequireWildcardCache(nodeInterop);
|
|
4162
|
-
|
|
4163
|
-
if (cache && cache.has(obj)) {
|
|
4164
|
-
return cache.get(obj);
|
|
4165
|
-
}
|
|
4166
|
-
|
|
4167
|
-
var newObj = {};
|
|
4168
|
-
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
4169
|
-
|
|
4170
|
-
for (var key in obj) {
|
|
4171
|
-
if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
4172
|
-
var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
|
|
4173
|
-
|
|
4174
|
-
if (desc && (desc.get || desc.set)) {
|
|
4175
|
-
Object.defineProperty(newObj, key, desc);
|
|
4176
|
-
} else {
|
|
4177
|
-
newObj[key] = obj[key];
|
|
4178
|
-
}
|
|
4179
|
-
}
|
|
4180
|
-
}
|
|
4181
|
-
|
|
4182
|
-
newObj["default"] = obj;
|
|
4183
|
-
|
|
4184
|
-
if (cache) {
|
|
4185
|
-
cache.set(obj, newObj);
|
|
4186
|
-
}
|
|
4187
|
-
|
|
4188
|
-
return newObj;
|
|
4189
|
-
}
|
|
4190
|
-
|
|
4191
|
-
function createMultiStyleIconSet(styles) {
|
|
4192
|
-
var optionsInput = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
4193
|
-
var styleNames = Object.keys(styles);
|
|
4194
|
-
|
|
4195
|
-
if (styleNames.length === 0) {
|
|
4196
|
-
throw new Error('You need to add at least one style');
|
|
4197
|
-
}
|
|
4198
|
-
|
|
4199
|
-
var options = (0, _extends2["default"])({
|
|
4200
|
-
defaultStyle: styleNames[0],
|
|
4201
|
-
fallbackFamily: function fallbackFamily() {
|
|
4202
|
-
return styleNames[0];
|
|
4203
|
-
},
|
|
4204
|
-
glyphValidator: function glyphValidator() {
|
|
4205
|
-
return true;
|
|
4206
|
-
}
|
|
4207
|
-
}, optionsInput);
|
|
4208
|
-
var iconSets = styleNames.reduce(function (acc, name) {
|
|
4209
|
-
var style = styles[name];
|
|
4210
|
-
acc[name] = (0, _createIconSet$2["default"])(style.glyphMap || {}, style.fontFamily || '', style.fontFile || '', style.fontStyle || {});
|
|
4211
|
-
return acc;
|
|
4212
|
-
}, {});
|
|
4213
|
-
|
|
4214
|
-
function styleFromProps(props) {
|
|
4215
|
-
return Object.keys(props).reduce(function (result, propName) {
|
|
4216
|
-
return styleNames.indexOf(propName) !== -1 && props[propName] === true ? propName : result;
|
|
4217
|
-
}, options.defaultStyle);
|
|
4218
|
-
}
|
|
4219
|
-
|
|
4220
|
-
function getIconSetForProps(props) {
|
|
4221
|
-
var name = props.name;
|
|
4222
|
-
var style = styleFromProps(props);
|
|
4223
|
-
if (options.glyphValidator(name, style)) return iconSets[style];
|
|
4224
|
-
var family = options.fallbackFamily(name);
|
|
4225
|
-
|
|
4226
|
-
if (styleNames.indexOf(family) === -1) {
|
|
4227
|
-
return options.defaultStyle;
|
|
4228
|
-
}
|
|
4229
|
-
|
|
4230
|
-
return iconSets[family];
|
|
4231
|
-
}
|
|
4232
|
-
|
|
4233
|
-
function selectIconClass(iconSet, iconClass) {
|
|
4234
|
-
return iconClass.length > 0 ? iconSet[iconClass] : iconSet;
|
|
4235
|
-
}
|
|
4236
|
-
|
|
4237
|
-
function reduceProps(props) {
|
|
4238
|
-
return Object.keys(props).reduce(function (acc, prop) {
|
|
4239
|
-
if (styleNames.indexOf(prop) === -1) {
|
|
4240
|
-
acc[prop] = props[prop];
|
|
4241
|
-
}
|
|
4242
|
-
|
|
4243
|
-
return acc;
|
|
4244
|
-
}, {});
|
|
4245
|
-
}
|
|
4246
|
-
|
|
4247
|
-
function getStyledIconSet(style) {
|
|
4248
|
-
var name = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
|
|
4249
|
-
|
|
4250
|
-
if (styleNames.indexOf(style) === -1) {
|
|
4251
|
-
return iconSets[options.defaultStyle];
|
|
4252
|
-
}
|
|
4253
|
-
|
|
4254
|
-
return !name ? iconSets[styleFromProps((0, _defineProperty2["default"])({}, style, true))] : getIconSetForProps((0, _defineProperty2["default"])({
|
|
4255
|
-
name: name
|
|
4256
|
-
}, style, true));
|
|
4257
|
-
}
|
|
4258
|
-
|
|
4259
|
-
function getImageSource(name) {
|
|
4260
|
-
var size = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _createIconSet$2.DEFAULT_ICON_SIZE;
|
|
4261
|
-
var color = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : _createIconSet$2.DEFAULT_ICON_COLOR;
|
|
4262
|
-
var style = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : options.defaultStyle;
|
|
4263
|
-
return getStyledIconSet(style, name).getImageSource(name, size, color);
|
|
4264
|
-
}
|
|
4265
|
-
|
|
4266
|
-
function getFontFamily() {
|
|
4267
|
-
var style = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : options.defaultStyle;
|
|
4268
|
-
return getStyledIconSet(style).getFontFamily();
|
|
4269
|
-
}
|
|
4270
|
-
|
|
4271
|
-
function getRawGlyphMap() {
|
|
4272
|
-
var style = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : options.defaultStyle;
|
|
4273
|
-
return getStyledIconSet(style).getRawGlyphMap();
|
|
4274
|
-
}
|
|
4275
|
-
|
|
4276
|
-
function hasIcon(name) {
|
|
4277
|
-
var style = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : options.defaultStyle;
|
|
4278
|
-
return options.glyphValidator(name, style);
|
|
4279
|
-
}
|
|
4280
|
-
|
|
4281
|
-
function createStyledIconClass() {
|
|
4282
|
-
var selectClass = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
4283
|
-
|
|
4284
|
-
var IconClass = function (_PureComponent) {
|
|
4285
|
-
(0, _inherits2["default"])(IconClass, _PureComponent);
|
|
4286
|
-
|
|
4287
|
-
function IconClass() {
|
|
4288
|
-
(0, _classCallCheck2["default"])(this, IconClass);
|
|
4289
|
-
return (0, _possibleConstructorReturn2["default"])(this, (0, _getPrototypeOf2["default"])(IconClass).apply(this, arguments));
|
|
4290
|
-
}
|
|
4291
|
-
|
|
4292
|
-
(0, _createClass2["default"])(IconClass, [{
|
|
4293
|
-
key: "render",
|
|
4294
|
-
value: function render() {
|
|
4295
|
-
var selectedIconSet = getIconSetForProps(this.props);
|
|
4296
|
-
var SelectedIconClass = selectIconClass(selectedIconSet, selectClass);
|
|
4297
|
-
var props = reduceProps(this.props);
|
|
4298
|
-
return _react["default"].createElement(SelectedIconClass, (0, _extends2["default"])({}, props, {
|
|
4299
|
-
__self: this,
|
|
4300
|
-
__source: {
|
|
4301
|
-
fileName: _jsxFileName,
|
|
4302
|
-
lineNumber: 123
|
|
4303
|
-
}
|
|
4304
|
-
}));
|
|
4305
|
-
}
|
|
4306
|
-
}]);
|
|
4307
|
-
return IconClass;
|
|
4308
|
-
}(_react.PureComponent);
|
|
4309
|
-
|
|
4310
|
-
IconClass.propTypes = styleNames.reduce(function (acc, name) {
|
|
4311
|
-
acc[name] = _propTypes["default"].bool;
|
|
4312
|
-
return acc;
|
|
4313
|
-
}, {});
|
|
4314
|
-
IconClass.defaultProps = styleNames.reduce(function (acc, name) {
|
|
4315
|
-
acc[name] = false;
|
|
4316
|
-
return acc;
|
|
4317
|
-
}, {});
|
|
4318
|
-
return IconClass;
|
|
4319
|
-
}
|
|
4320
|
-
|
|
4321
|
-
var Icon = createStyledIconClass();
|
|
4322
|
-
Icon.Button = createStyledIconClass('Button');
|
|
4323
|
-
Icon.getStyledIconSet = getStyledIconSet;
|
|
4324
|
-
Icon.getImageSource = getImageSource;
|
|
4325
|
-
Icon.getFontFamily = getFontFamily;
|
|
4326
|
-
Icon.getRawGlyphMap = getRawGlyphMap;
|
|
4327
|
-
Icon.hasIcon = hasIcon;
|
|
4328
|
-
return Icon;
|
|
4329
|
-
}
|
|
4330
|
-
|
|
4331
|
-
var createIconSetFromFontello$1 = {};
|
|
4332
|
-
|
|
4333
|
-
var _interopRequireDefault$1 = interopRequireDefault;
|
|
4334
|
-
Object.defineProperty(createIconSetFromFontello$1, "__esModule", {
|
|
4335
|
-
value: true
|
|
4336
|
-
});
|
|
4337
|
-
|
|
4338
|
-
createIconSetFromFontello$1["default"] = createIconSetFromFontello;
|
|
4339
|
-
|
|
4340
|
-
var _createIconSet$1 = _interopRequireDefault$1(createIconSet$1);
|
|
4341
|
-
|
|
4342
|
-
function createIconSetFromFontello(config, fontFamilyArg, fontFile) {
|
|
4343
|
-
var glyphMap = {};
|
|
4344
|
-
config.glyphs.forEach(function (glyph) {
|
|
4345
|
-
glyphMap[glyph.css] = glyph.code;
|
|
4346
|
-
});
|
|
4347
|
-
var fontFamily = fontFamilyArg || config.name || 'fontello';
|
|
4348
|
-
return (0, _createIconSet$1["default"])(glyphMap, fontFamily, fontFile || fontFamily + ".ttf");
|
|
4349
|
-
}
|
|
4350
|
-
|
|
4351
|
-
var createIconSetFromIcomoon = {};
|
|
4352
|
-
|
|
4353
|
-
var _interopRequireDefault = interopRequireDefault;
|
|
4354
|
-
Object.defineProperty(createIconSetFromIcomoon, "__esModule", {
|
|
4355
|
-
value: true
|
|
4356
|
-
});
|
|
4357
|
-
|
|
4358
|
-
createIconSetFromIcomoon["default"] = createIconSetFromIcoMoon;
|
|
4359
|
-
|
|
4360
|
-
var _createIconSet = _interopRequireDefault(createIconSet$1);
|
|
4361
|
-
|
|
4362
|
-
function createIconSetFromIcoMoon(config, fontFamilyArg, fontFile) {
|
|
4363
|
-
var glyphMap = {};
|
|
4364
|
-
config.icons.forEach(function (icon) {
|
|
4365
|
-
icon.properties.name.split(/\s*,\s*/g).forEach(function (name) {
|
|
4366
|
-
glyphMap[name] = icon.properties.code;
|
|
4367
|
-
});
|
|
4368
|
-
});
|
|
4369
|
-
var fontFamily = fontFamilyArg || config.preferences.fontPref.metadata.fontFamily;
|
|
4370
|
-
return (0, _createIconSet["default"])(glyphMap, fontFamily, fontFile || fontFamily + ".ttf");
|
|
4371
|
-
}
|
|
4372
|
-
|
|
4373
|
-
(function (exports) {
|
|
4374
|
-
var _interopRequireDefault = interopRequireDefault;
|
|
4375
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4376
|
-
value: true
|
|
4377
|
-
});
|
|
4378
|
-
Object.defineProperty(exports, "createIconSet", {
|
|
4379
|
-
enumerable: true,
|
|
4380
|
-
get: function get() {
|
|
4381
|
-
return _createIconSet["default"];
|
|
4382
|
-
}
|
|
4383
|
-
});
|
|
4384
|
-
Object.defineProperty(exports, "createIconSetFromFontello", {
|
|
4385
|
-
enumerable: true,
|
|
4386
|
-
get: function get() {
|
|
4387
|
-
return _createIconSetFromFontello["default"];
|
|
4388
|
-
}
|
|
4389
|
-
});
|
|
4390
|
-
Object.defineProperty(exports, "createIconSetFromIcoMoon", {
|
|
4391
|
-
enumerable: true,
|
|
4392
|
-
get: function get() {
|
|
4393
|
-
return _createIconSetFromIcomoon["default"];
|
|
4394
|
-
}
|
|
4395
|
-
});
|
|
4396
|
-
Object.defineProperty(exports, "createMultiStyleIconSet", {
|
|
4397
|
-
enumerable: true,
|
|
4398
|
-
get: function get() {
|
|
4399
|
-
return _createMultiStyleIconSet["default"];
|
|
4400
|
-
}
|
|
4401
|
-
});
|
|
4402
|
-
|
|
4403
|
-
var _createIconSet = _interopRequireDefault(createIconSet$1);
|
|
4404
|
-
|
|
4405
|
-
var _createMultiStyleIconSet = _interopRequireDefault(createMultiStyleIconSet$1);
|
|
4406
|
-
|
|
4407
|
-
var _createIconSetFromFontello = _interopRequireDefault(createIconSetFromFontello$1);
|
|
4408
|
-
|
|
4409
|
-
var _createIconSetFromIcomoon = _interopRequireDefault(createIconSetFromIcomoon);
|
|
4410
|
-
})(dist);
|
|
4411
|
-
|
|
4412
|
-
var cssToReactNative = {};
|
|
4413
|
-
|
|
4414
|
-
var openParentheses = "(".charCodeAt(0);
|
|
4415
|
-
var closeParentheses = ")".charCodeAt(0);
|
|
4416
|
-
var singleQuote = "'".charCodeAt(0);
|
|
4417
|
-
var doubleQuote = '"'.charCodeAt(0);
|
|
4418
|
-
var backslash = "\\".charCodeAt(0);
|
|
4419
|
-
var slash = "/".charCodeAt(0);
|
|
4420
|
-
var comma = ",".charCodeAt(0);
|
|
4421
|
-
var colon = ":".charCodeAt(0);
|
|
4422
|
-
var star = "*".charCodeAt(0);
|
|
4423
|
-
var uLower = "u".charCodeAt(0);
|
|
4424
|
-
var uUpper = "U".charCodeAt(0);
|
|
4425
|
-
var plus$1 = "+".charCodeAt(0);
|
|
4426
|
-
var isUnicodeRange = /^[a-f0-9?-]+$/i;
|
|
4427
|
-
|
|
4428
|
-
var parse$1 = function parse(input) {
|
|
4429
|
-
var tokens = [];
|
|
4430
|
-
var value = input;
|
|
4431
|
-
var next, quote, prev, token, escape, escapePos, whitespacePos, parenthesesOpenPos;
|
|
4432
|
-
var pos = 0;
|
|
4433
|
-
var code = value.charCodeAt(pos);
|
|
4434
|
-
var max = value.length;
|
|
4435
|
-
var stack = [{
|
|
4436
|
-
nodes: tokens
|
|
4437
|
-
}];
|
|
4438
|
-
var balanced = 0;
|
|
4439
|
-
var parent;
|
|
4440
|
-
var name = "";
|
|
4441
|
-
var before = "";
|
|
4442
|
-
var after = "";
|
|
4443
|
-
|
|
4444
|
-
while (pos < max) {
|
|
4445
|
-
// Whitespaces
|
|
4446
|
-
if (code <= 32) {
|
|
4447
|
-
next = pos;
|
|
4448
|
-
|
|
4449
|
-
do {
|
|
4450
|
-
next += 1;
|
|
4451
|
-
code = value.charCodeAt(next);
|
|
4452
|
-
} while (code <= 32);
|
|
4453
|
-
|
|
4454
|
-
token = value.slice(pos, next);
|
|
4455
|
-
prev = tokens[tokens.length - 1];
|
|
4456
|
-
|
|
4457
|
-
if (code === closeParentheses && balanced) {
|
|
4458
|
-
after = token;
|
|
4459
|
-
} else if (prev && prev.type === "div") {
|
|
4460
|
-
prev.after = token;
|
|
4461
|
-
} else if (code === comma || code === colon || code === slash && value.charCodeAt(next + 1) !== star && (!parent || parent && parent.type === "function" && parent.value !== "calc")) {
|
|
4462
|
-
before = token;
|
|
4463
|
-
} else {
|
|
4464
|
-
tokens.push({
|
|
4465
|
-
type: "space",
|
|
4466
|
-
sourceIndex: pos,
|
|
4467
|
-
value: token
|
|
4468
|
-
});
|
|
4469
|
-
}
|
|
4470
|
-
|
|
4471
|
-
pos = next; // Quotes
|
|
4472
|
-
} else if (code === singleQuote || code === doubleQuote) {
|
|
4473
|
-
next = pos;
|
|
4474
|
-
quote = code === singleQuote ? "'" : '"';
|
|
4475
|
-
token = {
|
|
4476
|
-
type: "string",
|
|
4477
|
-
sourceIndex: pos,
|
|
4478
|
-
quote: quote
|
|
4479
|
-
};
|
|
4480
|
-
|
|
4481
|
-
do {
|
|
4482
|
-
escape = false;
|
|
4483
|
-
next = value.indexOf(quote, next + 1);
|
|
4484
|
-
|
|
4485
|
-
if (~next) {
|
|
4486
|
-
escapePos = next;
|
|
4487
|
-
|
|
4488
|
-
while (value.charCodeAt(escapePos - 1) === backslash) {
|
|
4489
|
-
escapePos -= 1;
|
|
4490
|
-
escape = !escape;
|
|
4491
|
-
}
|
|
4492
|
-
} else {
|
|
4493
|
-
value += quote;
|
|
4494
|
-
next = value.length - 1;
|
|
4495
|
-
token.unclosed = true;
|
|
4496
|
-
}
|
|
4497
|
-
} while (escape);
|
|
4498
|
-
|
|
4499
|
-
token.value = value.slice(pos + 1, next);
|
|
4500
|
-
tokens.push(token);
|
|
4501
|
-
pos = next + 1;
|
|
4502
|
-
code = value.charCodeAt(pos); // Comments
|
|
4503
|
-
} else if (code === slash && value.charCodeAt(pos + 1) === star) {
|
|
4504
|
-
token = {
|
|
4505
|
-
type: "comment",
|
|
4506
|
-
sourceIndex: pos
|
|
4507
|
-
};
|
|
4508
|
-
next = value.indexOf("*/", pos);
|
|
4509
|
-
|
|
4510
|
-
if (next === -1) {
|
|
4511
|
-
token.unclosed = true;
|
|
4512
|
-
next = value.length;
|
|
2523
|
+
if (next === -1) {
|
|
2524
|
+
token.unclosed = true;
|
|
2525
|
+
next = value.length;
|
|
4513
2526
|
}
|
|
4514
2527
|
|
|
4515
2528
|
token.value = value.slice(pos + 2, next);
|
|
@@ -4888,7 +2901,7 @@ var camelize = function camelize(obj) {
|
|
|
4888
2901
|
};
|
|
4889
2902
|
|
|
4890
2903
|
function walk(obj) {
|
|
4891
|
-
if (!obj || _typeof
|
|
2904
|
+
if (!obj || _typeof(obj) !== 'object') return obj;
|
|
4892
2905
|
if (isDate(obj) || isRegex(obj)) return obj;
|
|
4893
2906
|
if (isArray(obj)) return map(obj, walk);
|
|
4894
2907
|
return reduce(objectKeys(obj), function (acc, key) {
|
|
@@ -5253,7 +3266,7 @@ var cssColorKeywords = require$$0;
|
|
|
5253
3266
|
});
|
|
5254
3267
|
|
|
5255
3268
|
function _interopDefault(ex) {
|
|
5256
|
-
return ex && _typeof
|
|
3269
|
+
return ex && _typeof(ex) === 'object' && 'default' in ex ? ex['default'] : ex;
|
|
5257
3270
|
}
|
|
5258
3271
|
|
|
5259
3272
|
var parse = lib;
|
|
@@ -6108,7 +4121,7 @@ var buffer = '';
|
|
|
6108
4121
|
var lastType;
|
|
6109
4122
|
|
|
6110
4123
|
function handleInterpolation(interpolation, i, arr) {
|
|
6111
|
-
var type = _typeof
|
|
4124
|
+
var type = _typeof(interpolation);
|
|
6112
4125
|
|
|
6113
4126
|
if (type === 'string') {
|
|
6114
4127
|
// strip comments
|
|
@@ -6330,7 +4343,7 @@ var index$2 = components.reduce(function (acc, comp) {
|
|
|
6330
4343
|
enumerable: true,
|
|
6331
4344
|
configurable: false,
|
|
6332
4345
|
get: function get() {
|
|
6333
|
-
return styled(
|
|
4346
|
+
return styled(reactNative[comp]);
|
|
6334
4347
|
}
|
|
6335
4348
|
});
|
|
6336
4349
|
}, styled);
|
|
@@ -14254,7 +12267,7 @@ var heroIconConfig = {
|
|
|
14254
12267
|
preferences: preferences
|
|
14255
12268
|
};
|
|
14256
12269
|
|
|
14257
|
-
var HeroIcon =
|
|
12270
|
+
var HeroIcon = createIconSetFromIcoMoon(heroIconConfig, 'hero-icons', 'hero-icons.ttf');
|
|
14258
12271
|
var COLOR_INTENTS = {
|
|
14259
12272
|
text: 'text',
|
|
14260
12273
|
primary: 'primary',
|
|
@@ -14322,9 +12335,9 @@ var Text = function Text(_ref) {
|
|
|
14322
12335
|
fontWeight = _ref$fontWeight === void 0 ? 'regular' : _ref$fontWeight,
|
|
14323
12336
|
_ref$intent = _ref.intent,
|
|
14324
12337
|
intent = _ref$intent === void 0 ? 'body' : _ref$intent,
|
|
14325
|
-
nativeProps = _objectWithoutProperties
|
|
12338
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$c);
|
|
14326
12339
|
|
|
14327
|
-
return /*#__PURE__*/React.createElement(StyledText$3, _extends$
|
|
12340
|
+
return /*#__PURE__*/React.createElement(StyledText$3, _extends$1({}, nativeProps, {
|
|
14328
12341
|
themeFontSize: fontSize,
|
|
14329
12342
|
themeFontWeight: fontWeight,
|
|
14330
12343
|
themeIntent: intent
|
|
@@ -14560,7 +12573,7 @@ var Status = function Status(_ref) {
|
|
|
14560
12573
|
intent = _ref$intent === void 0 ? 'danger' : _ref$intent,
|
|
14561
12574
|
style = _ref.style,
|
|
14562
12575
|
testID = _ref.testID,
|
|
14563
|
-
nativeProps = _objectWithoutProperties
|
|
12576
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$b);
|
|
14564
12577
|
|
|
14565
12578
|
var _React$useRef = React.useRef(new Animated.Value(visible ? 1 : 0)),
|
|
14566
12579
|
opacity = _React$useRef.current;
|
|
@@ -14579,7 +12592,7 @@ var Status = function Status(_ref) {
|
|
|
14579
12592
|
useNativeDriver: true
|
|
14580
12593
|
}).start();
|
|
14581
12594
|
}, [visible, opacity]);
|
|
14582
|
-
return /*#__PURE__*/React.createElement(View, _extends$
|
|
12595
|
+
return /*#__PURE__*/React.createElement(View, _extends$1({}, nativeProps, {
|
|
14583
12596
|
style: style,
|
|
14584
12597
|
testID: testID
|
|
14585
12598
|
}), children, /*#__PURE__*/React.createElement(StyledStatus, {
|
|
@@ -14613,7 +12626,7 @@ var Badge = function Badge(_ref) {
|
|
|
14613
12626
|
intent = _ref$intent === void 0 ? 'danger' : _ref$intent,
|
|
14614
12627
|
style = _ref.style,
|
|
14615
12628
|
testID = _ref.testID,
|
|
14616
|
-
nativeProps = _objectWithoutProperties
|
|
12629
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$a);
|
|
14617
12630
|
|
|
14618
12631
|
var _React$useRef = React.useRef(new Animated.Value(visible ? 1 : 0)),
|
|
14619
12632
|
opacity = _React$useRef.current;
|
|
@@ -14633,7 +12646,7 @@ var Badge = function Badge(_ref) {
|
|
|
14633
12646
|
}).start();
|
|
14634
12647
|
}, [visible, opacity]);
|
|
14635
12648
|
var content = typeof originalContent === 'number' && originalContent > max ? "".concat(max, "+") : String(originalContent);
|
|
14636
|
-
return /*#__PURE__*/React.createElement(StyledView$2, _extends$
|
|
12649
|
+
return /*#__PURE__*/React.createElement(StyledView$2, _extends$1({}, nativeProps, {
|
|
14637
12650
|
themeIntent: intent,
|
|
14638
12651
|
themePadding: getPaddingState(content),
|
|
14639
12652
|
style: [{
|
|
@@ -14722,7 +12735,7 @@ var BottomNavigation = function BottomNavigation(_ref) {
|
|
|
14722
12735
|
renderActiveTabOnly = _ref$renderActiveTabO === void 0 ? false : _ref$renderActiveTabO,
|
|
14723
12736
|
selectedTabKey = _ref.selectedTabKey,
|
|
14724
12737
|
tabs = _ref.tabs,
|
|
14725
|
-
nativeProps = _objectWithoutProperties
|
|
12738
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$9);
|
|
14726
12739
|
|
|
14727
12740
|
var insets = useSafeAreaInsets();
|
|
14728
12741
|
/**
|
|
@@ -14737,7 +12750,7 @@ var BottomNavigation = function BottomNavigation(_ref) {
|
|
|
14737
12750
|
if (!loaded.includes(selectedTabKey)) {
|
|
14738
12751
|
// Set the current tab to be loaded if it was not loaded before
|
|
14739
12752
|
setLoaded(function (loadedState) {
|
|
14740
|
-
return [].concat(_toConsumableArray
|
|
12753
|
+
return [].concat(_toConsumableArray(loadedState), [selectedTabKey]);
|
|
14741
12754
|
});
|
|
14742
12755
|
}
|
|
14743
12756
|
|
|
@@ -14820,9 +12833,9 @@ var Divider = function Divider(_ref) {
|
|
|
14820
12833
|
marginVertical = _ref.marginVertical,
|
|
14821
12834
|
style = _ref.style,
|
|
14822
12835
|
testID = _ref.testID,
|
|
14823
|
-
nativeProps = _objectWithoutProperties
|
|
12836
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$8);
|
|
14824
12837
|
|
|
14825
|
-
return /*#__PURE__*/React.createElement(StyledDivider, _extends$
|
|
12838
|
+
return /*#__PURE__*/React.createElement(StyledDivider, _extends$1({}, nativeProps, {
|
|
14826
12839
|
themeMarginHorizontal: marginHorizontal,
|
|
14827
12840
|
themeMarginVertical: marginVertical,
|
|
14828
12841
|
style: style,
|
|
@@ -14831,7 +12844,7 @@ var Divider = function Divider(_ref) {
|
|
|
14831
12844
|
};
|
|
14832
12845
|
|
|
14833
12846
|
var AnimatedPressable$1 = Animated.createAnimatedComponent(Pressable);
|
|
14834
|
-
var StyledWrapper$
|
|
12847
|
+
var StyledWrapper$4 = index$2(View)(_objectSpread2(_objectSpread2({}, StyleSheet$1.absoluteFillObject), {}, {
|
|
14835
12848
|
flexDirection: 'column-reverse'
|
|
14836
12849
|
}));
|
|
14837
12850
|
var StyledBottomSheet = index$2(Animated.View)(function (_ref) {
|
|
@@ -14894,7 +12907,7 @@ var StyledIconWrapper$1 = index$2(View)(function (_ref6) {
|
|
|
14894
12907
|
};
|
|
14895
12908
|
});
|
|
14896
12909
|
|
|
14897
|
-
var Footer = function Footer(_ref) {
|
|
12910
|
+
var Footer$1 = function Footer(_ref) {
|
|
14898
12911
|
var children = _ref.children,
|
|
14899
12912
|
showDivider = _ref.showDivider;
|
|
14900
12913
|
return /*#__PURE__*/React.createElement(View, null, showDivider ? /*#__PURE__*/React.createElement(Divider, null) : null, /*#__PURE__*/React.createElement(StyledFooter, null, children));
|
|
@@ -14982,7 +12995,7 @@ var LoadingIndicator = function LoadingIndicator(_ref2) {
|
|
|
14982
12995
|
size = _ref2$size === void 0 ? 12 : _ref2$size,
|
|
14983
12996
|
testID = _ref2.testID,
|
|
14984
12997
|
themeVariant = _ref2.themeVariant,
|
|
14985
|
-
nativeProps = _objectWithoutProperties
|
|
12998
|
+
nativeProps = _objectWithoutProperties(_ref2, _excluded$7);
|
|
14986
12999
|
|
|
14987
13000
|
var progressAnimation = useRef(new Animated.Value(0));
|
|
14988
13001
|
useEffect(function () {
|
|
@@ -15012,7 +13025,7 @@ var LoadingIndicator = function LoadingIndicator(_ref2) {
|
|
|
15012
13025
|
return null;
|
|
15013
13026
|
};
|
|
15014
13027
|
|
|
15015
|
-
return /*#__PURE__*/React.createElement(AnimatedLoadingIndicatorWrapper, _extends$
|
|
13028
|
+
return /*#__PURE__*/React.createElement(AnimatedLoadingIndicatorWrapper, _extends$1({
|
|
15016
13029
|
testID: testID
|
|
15017
13030
|
}, nativeProps), Array.from(new Array(count), renderLoadingDot, themeVariant));
|
|
15018
13031
|
};
|
|
@@ -15357,7 +13370,7 @@ var Header = function Header(_ref) {
|
|
|
15357
13370
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(StyledHeaderWrapper, null, typeof content === 'string' ? /*#__PURE__*/React.createElement(StyledHeader, {
|
|
15358
13371
|
adjacentIcon: showCloseButton
|
|
15359
13372
|
}, /*#__PURE__*/React.createElement(Typography.Text, {
|
|
15360
|
-
fontSize: "
|
|
13373
|
+
fontSize: "large",
|
|
15361
13374
|
fontWeight: "semi-bold"
|
|
15362
13375
|
}, content)) : /*#__PURE__*/React.createElement(View, {
|
|
15363
13376
|
style: {
|
|
@@ -15378,6 +13391,7 @@ var BottomSheet = function BottomSheet(_ref) {
|
|
|
15378
13391
|
children = _ref.children,
|
|
15379
13392
|
onOpen = _ref.onOpen,
|
|
15380
13393
|
onRequestClose = _ref.onRequestClose,
|
|
13394
|
+
onDismiss = _ref.onDismiss,
|
|
15381
13395
|
_ref$showCloseButton = _ref.showCloseButton,
|
|
15382
13396
|
showCloseButton = _ref$showCloseButton === void 0 ? true : _ref$showCloseButton,
|
|
15383
13397
|
_ref$hasBackdrop = _ref.hasBackdrop,
|
|
@@ -15413,6 +13427,7 @@ var BottomSheet = function BottomSheet(_ref) {
|
|
|
15413
13427
|
|
|
15414
13428
|
if (endValueOfTransition === 0 && value === endValueOfTransition) {
|
|
15415
13429
|
setVisibility(false);
|
|
13430
|
+
onDismiss === null || onDismiss === void 0 ? void 0 : onDismiss();
|
|
15416
13431
|
}
|
|
15417
13432
|
});
|
|
15418
13433
|
return function () {
|
|
@@ -15446,7 +13461,7 @@ var BottomSheet = function BottomSheet(_ref) {
|
|
|
15446
13461
|
transparent: true,
|
|
15447
13462
|
testID: testID,
|
|
15448
13463
|
onShow: onOpen
|
|
15449
|
-
}, /*#__PURE__*/React.createElement(StyledWrapper$
|
|
13464
|
+
}, /*#__PURE__*/React.createElement(StyledWrapper$4, {
|
|
15450
13465
|
pointerEvents: "box-none"
|
|
15451
13466
|
}, /*#__PURE__*/React.createElement(StyledBackdrop$2, {
|
|
15452
13467
|
style: {
|
|
@@ -15470,7 +13485,7 @@ var BottomSheet = function BottomSheet(_ref) {
|
|
|
15470
13485
|
showDivider: showDivider,
|
|
15471
13486
|
onRequestClose: onRequestClose,
|
|
15472
13487
|
showCloseButton: showCloseButton
|
|
15473
|
-
}) : null, children, footer ? /*#__PURE__*/React.createElement(Footer, {
|
|
13488
|
+
}) : null, children, footer ? /*#__PURE__*/React.createElement(Footer$1, {
|
|
15474
13489
|
showDivider: showDivider
|
|
15475
13490
|
}, footer) : null)));
|
|
15476
13491
|
};
|
|
@@ -15510,16 +13525,16 @@ var Card = function Card(_ref) {
|
|
|
15510
13525
|
var _ref$variant = _ref.variant,
|
|
15511
13526
|
variant = _ref$variant === void 0 ? 'basic' : _ref$variant,
|
|
15512
13527
|
children = _ref.children,
|
|
15513
|
-
nativeProps = _objectWithoutProperties
|
|
13528
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$6);
|
|
15514
13529
|
|
|
15515
|
-
return /*#__PURE__*/React.createElement(StyledCard, _extends$
|
|
13530
|
+
return /*#__PURE__*/React.createElement(StyledCard, _extends$1({}, nativeProps, {
|
|
15516
13531
|
themeVariant: variant
|
|
15517
13532
|
}), variant === 'data' && /*#__PURE__*/React.createElement(LeftDataCard, {
|
|
15518
13533
|
testID: "data-card-indicator"
|
|
15519
13534
|
}), children);
|
|
15520
13535
|
};
|
|
15521
13536
|
|
|
15522
|
-
var StyledWrapper$
|
|
13537
|
+
var StyledWrapper$3 = index$2(Animated.View)(function () {
|
|
15523
13538
|
return {
|
|
15524
13539
|
margin: 0,
|
|
15525
13540
|
padding: 0,
|
|
@@ -15579,7 +13594,7 @@ var Collapse = function Collapse(_ref) {
|
|
|
15579
13594
|
var height = _ref2.height;
|
|
15580
13595
|
setContentHeight(height);
|
|
15581
13596
|
}, [contentHeight]);
|
|
15582
|
-
return /*#__PURE__*/React.createElement(StyledWrapper$
|
|
13597
|
+
return /*#__PURE__*/React.createElement(StyledWrapper$3, {
|
|
15583
13598
|
style: [style, {
|
|
15584
13599
|
height: collapseAnim
|
|
15585
13600
|
}],
|
|
@@ -15764,7 +13779,7 @@ var AnimatedIcons = Animated.createAnimatedComponent(StyledFABIcon);
|
|
|
15764
13779
|
|
|
15765
13780
|
var AnimatedFABIcon = function AnimatedFABIcon(_ref) {
|
|
15766
13781
|
var active = _ref.active,
|
|
15767
|
-
iconProps = _objectWithoutProperties
|
|
13782
|
+
iconProps = _objectWithoutProperties(_ref, _excluded$5);
|
|
15768
13783
|
|
|
15769
13784
|
var rotateAnimation = useRef(new Animated.Value(active ? 1 : 0));
|
|
15770
13785
|
useEffect(function () {
|
|
@@ -15936,7 +13951,7 @@ var ActionItemsListComponent = function ActionItemsListComponent(_ref) {
|
|
|
15936
13951
|
return /*#__PURE__*/React.createElement(View, {
|
|
15937
13952
|
style: style
|
|
15938
13953
|
}, items === null || items === void 0 ? void 0 : items.map(function (itemProp) {
|
|
15939
|
-
return /*#__PURE__*/React.createElement(ActionItem, _extends$
|
|
13954
|
+
return /*#__PURE__*/React.createElement(ActionItem, _extends$1({
|
|
15940
13955
|
key: itemProp.icon
|
|
15941
13956
|
}, itemProp));
|
|
15942
13957
|
}));
|
|
@@ -16075,9 +14090,9 @@ var ProgressCircle = function ProgressCircle(_ref2) {
|
|
|
16075
14090
|
intent = _ref2$intent === void 0 ? 'primary' : _ref2$intent,
|
|
16076
14091
|
style = _ref2.style,
|
|
16077
14092
|
testID = _ref2.testID,
|
|
16078
|
-
nativeProps = _objectWithoutProperties
|
|
14093
|
+
nativeProps = _objectWithoutProperties(_ref2, _excluded$4);
|
|
16079
14094
|
|
|
16080
|
-
var theme = useTheme();
|
|
14095
|
+
var theme = useTheme$1();
|
|
16081
14096
|
var radius = theme.__hd__.progress.sizes.radius;
|
|
16082
14097
|
var progressAnimatedValue = useRef(new Animated.Value(0));
|
|
16083
14098
|
useEffect(function () {
|
|
@@ -16113,7 +14128,7 @@ var ProgressCircle = function ProgressCircle(_ref2) {
|
|
|
16113
14128
|
outputRange: ['0deg', '360deg'],
|
|
16114
14129
|
extrapolate: 'clamp'
|
|
16115
14130
|
});
|
|
16116
|
-
return /*#__PURE__*/React.createElement(View, _extends$
|
|
14131
|
+
return /*#__PURE__*/React.createElement(View, _extends$1({}, nativeProps, {
|
|
16117
14132
|
testID: testID,
|
|
16118
14133
|
style: style
|
|
16119
14134
|
}), /*#__PURE__*/React.createElement(View, {
|
|
@@ -16174,7 +14189,7 @@ var ProgressCircle = function ProgressCircle(_ref2) {
|
|
|
16174
14189
|
}, "".concat(value, "%")))));
|
|
16175
14190
|
};
|
|
16176
14191
|
|
|
16177
|
-
var StyledWrapper$
|
|
14192
|
+
var StyledWrapper$2 = index$2(View)(function (_ref) {
|
|
16178
14193
|
var theme = _ref.theme;
|
|
16179
14194
|
return {
|
|
16180
14195
|
height: theme.__hd__.progress.sizes.barHeight,
|
|
@@ -16201,7 +14216,7 @@ var ProgressBar = function ProgressBar(_ref) {
|
|
|
16201
14216
|
intent = _ref$intent === void 0 ? 'primary' : _ref$intent,
|
|
16202
14217
|
style = _ref.style,
|
|
16203
14218
|
testID = _ref.testID,
|
|
16204
|
-
nativeProps = _objectWithoutProperties
|
|
14219
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$3);
|
|
16205
14220
|
|
|
16206
14221
|
var _useState = useState(0),
|
|
16207
14222
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -16229,7 +14244,7 @@ var ProgressBar = function ProgressBar(_ref) {
|
|
|
16229
14244
|
outputRange: [999, 0],
|
|
16230
14245
|
extrapolate: 'clamp'
|
|
16231
14246
|
});
|
|
16232
|
-
return /*#__PURE__*/React.createElement(StyledWrapper$
|
|
14247
|
+
return /*#__PURE__*/React.createElement(StyledWrapper$2, _extends$1({}, nativeProps, {
|
|
16233
14248
|
testID: testID,
|
|
16234
14249
|
style: style
|
|
16235
14250
|
}), /*#__PURE__*/React.createElement(StyledInner, {
|
|
@@ -16351,7 +14366,7 @@ var _excluded$2 = ["testID"];
|
|
|
16351
14366
|
|
|
16352
14367
|
var Spinner = function Spinner(_ref) {
|
|
16353
14368
|
var testID = _ref.testID,
|
|
16354
|
-
nativeProps = _objectWithoutProperties
|
|
14369
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$2);
|
|
16355
14370
|
|
|
16356
14371
|
return /*#__PURE__*/React.createElement(StyledView$1, nativeProps, /*#__PURE__*/React.createElement(StyledSpinnerContainer, {
|
|
16357
14372
|
testID: testID
|
|
@@ -16392,7 +14407,7 @@ var InnerCircle = index$2(View)(function (_ref3) {
|
|
|
16392
14407
|
backgroundColor: theme.__hd__.radio.colors.checkedCircle
|
|
16393
14408
|
};
|
|
16394
14409
|
});
|
|
16395
|
-
var Spacer = index$2(View)(function (_ref4) {
|
|
14410
|
+
var Spacer$1 = index$2(View)(function (_ref4) {
|
|
16396
14411
|
var theme = _ref4.theme;
|
|
16397
14412
|
return {
|
|
16398
14413
|
marginTop: theme.__hd__.radio.space.groupTopMargin
|
|
@@ -16424,10 +14439,25 @@ var Radio = function Radio(_ref) {
|
|
|
16424
14439
|
})));
|
|
16425
14440
|
};
|
|
16426
14441
|
|
|
14442
|
+
function getKey$1(option, index, keyExtractor) {
|
|
14443
|
+
var key = '';
|
|
14444
|
+
|
|
14445
|
+
if (keyExtractor !== undefined) {
|
|
14446
|
+
key = keyExtractor(option, index);
|
|
14447
|
+
} else if (option.key !== undefined) {
|
|
14448
|
+
key = option.key;
|
|
14449
|
+
} else {
|
|
14450
|
+
key = index;
|
|
14451
|
+
}
|
|
14452
|
+
|
|
14453
|
+
return key;
|
|
14454
|
+
}
|
|
14455
|
+
|
|
16427
14456
|
var RadioGroup = function RadioGroup(_ref) {
|
|
16428
14457
|
var value = _ref.value,
|
|
16429
14458
|
_onPress = _ref.onPress,
|
|
16430
14459
|
options = _ref.options,
|
|
14460
|
+
keyExtractor = _ref.keyExtractor,
|
|
16431
14461
|
style = _ref.style,
|
|
16432
14462
|
testID = _ref.testID;
|
|
16433
14463
|
return /*#__PURE__*/React.createElement(View, {
|
|
@@ -16435,8 +14465,8 @@ var RadioGroup = function RadioGroup(_ref) {
|
|
|
16435
14465
|
testID: testID
|
|
16436
14466
|
}, options.map(function (option, index) {
|
|
16437
14467
|
return /*#__PURE__*/React.createElement(React.Fragment, {
|
|
16438
|
-
key: option
|
|
16439
|
-
}, index !== 0 && /*#__PURE__*/React.createElement(Spacer, null), /*#__PURE__*/React.createElement(Radio, {
|
|
14468
|
+
key: getKey$1(option, index, keyExtractor)
|
|
14469
|
+
}, index !== 0 && /*#__PURE__*/React.createElement(Spacer$1, null), /*#__PURE__*/React.createElement(Radio, {
|
|
16440
14470
|
text: option.text,
|
|
16441
14471
|
checked: option.value === value,
|
|
16442
14472
|
onPress: function onPress() {
|
|
@@ -16446,273 +14476,404 @@ var RadioGroup = function RadioGroup(_ref) {
|
|
|
16446
14476
|
}));
|
|
16447
14477
|
};
|
|
16448
14478
|
|
|
16449
|
-
var CompoundRadio = {
|
|
16450
|
-
Group: RadioGroup
|
|
16451
|
-
};
|
|
16452
|
-
|
|
16453
|
-
var StyledHeading = index$2(View)(function (_ref) {
|
|
16454
|
-
var theme = _ref.theme;
|
|
14479
|
+
var CompoundRadio = {
|
|
14480
|
+
Group: RadioGroup
|
|
14481
|
+
};
|
|
14482
|
+
|
|
14483
|
+
var StyledHeading = index$2(View)(function (_ref) {
|
|
14484
|
+
var theme = _ref.theme;
|
|
14485
|
+
return {
|
|
14486
|
+
paddingVertical: theme.__hd__.sectionHeading.space.headingVerticalPadding,
|
|
14487
|
+
paddingHorizontal: theme.__hd__.sectionHeading.space.headingHorizontalPadding,
|
|
14488
|
+
backgroundColor: theme.__hd__.sectionHeading.colors.background,
|
|
14489
|
+
marginBottom: theme.__hd__.sectionHeading.space.headingMarginBottom,
|
|
14490
|
+
display: 'flex',
|
|
14491
|
+
flexDirection: 'row',
|
|
14492
|
+
alignContent: 'center',
|
|
14493
|
+
justifyContent: 'space-between'
|
|
14494
|
+
};
|
|
14495
|
+
});
|
|
14496
|
+
var StyledIconWrapper = index$2(View)(function (_ref2) {
|
|
14497
|
+
var theme = _ref2.theme;
|
|
14498
|
+
return {
|
|
14499
|
+
marginRight: theme.__hd__.sectionHeading.space.iconMarginRight
|
|
14500
|
+
};
|
|
14501
|
+
});
|
|
14502
|
+
var StyledWrapper$1 = index$2(View)(function () {
|
|
14503
|
+
return {
|
|
14504
|
+
display: 'flex',
|
|
14505
|
+
flexDirection: 'row'
|
|
14506
|
+
};
|
|
14507
|
+
});
|
|
14508
|
+
|
|
14509
|
+
var ICON_SIZE_MAP = {
|
|
14510
|
+
small: 'small',
|
|
14511
|
+
medium: 'medium',
|
|
14512
|
+
large: 'medium',
|
|
14513
|
+
xlarge: 'large'
|
|
14514
|
+
};
|
|
14515
|
+
var ICON_INTENT_MAP = {
|
|
14516
|
+
body: 'text',
|
|
14517
|
+
subdued: 'text',
|
|
14518
|
+
primary: 'primary'
|
|
14519
|
+
};
|
|
14520
|
+
|
|
14521
|
+
var SectionHeading = function SectionHeading(_ref) {
|
|
14522
|
+
var icon = _ref.icon,
|
|
14523
|
+
text = _ref.text,
|
|
14524
|
+
rightChildren = _ref.rightChildren,
|
|
14525
|
+
_ref$fontSize = _ref.fontSize,
|
|
14526
|
+
fontSize = _ref$fontSize === void 0 ? 'large' : _ref$fontSize,
|
|
14527
|
+
_ref$intent = _ref.intent,
|
|
14528
|
+
intent = _ref$intent === void 0 ? 'body' : _ref$intent,
|
|
14529
|
+
_ref$fontWeight = _ref.fontWeight,
|
|
14530
|
+
fontWeight = _ref$fontWeight === void 0 ? 'regular' : _ref$fontWeight,
|
|
14531
|
+
style = _ref.style,
|
|
14532
|
+
testID = _ref.testID;
|
|
14533
|
+
return /*#__PURE__*/React.createElement(StyledHeading, {
|
|
14534
|
+
style: style,
|
|
14535
|
+
testID: testID
|
|
14536
|
+
}, /*#__PURE__*/React.createElement(StyledWrapper$1, null, /*#__PURE__*/React.createElement(StyledIconWrapper, null, icon && /*#__PURE__*/React.createElement(Icon, {
|
|
14537
|
+
icon: icon,
|
|
14538
|
+
size: ICON_SIZE_MAP[fontSize],
|
|
14539
|
+
intent: ICON_INTENT_MAP[intent]
|
|
14540
|
+
})), /*#__PURE__*/React.createElement(Typography.Text, {
|
|
14541
|
+
fontSize: fontSize,
|
|
14542
|
+
intent: intent,
|
|
14543
|
+
fontWeight: fontWeight
|
|
14544
|
+
}, text)), rightChildren);
|
|
14545
|
+
};
|
|
14546
|
+
|
|
14547
|
+
var Container = index$2(View)(function (_ref) {
|
|
14548
|
+
var theme = _ref.theme;
|
|
14549
|
+
return {
|
|
14550
|
+
position: 'relative',
|
|
14551
|
+
width: '100%',
|
|
14552
|
+
borderWidth: theme.__hd__.textInput.borderWidths.container,
|
|
14553
|
+
borderRadius: theme.__hd__.textInput.radii.container,
|
|
14554
|
+
padding: theme.__hd__.textInput.space.containerPadding,
|
|
14555
|
+
flexDirection: 'row',
|
|
14556
|
+
alignItems: 'center'
|
|
14557
|
+
};
|
|
14558
|
+
});
|
|
14559
|
+
var Label = index$2(Typography.Text)(function (_ref2) {
|
|
14560
|
+
var theme = _ref2.theme;
|
|
14561
|
+
return {
|
|
14562
|
+
position: 'absolute',
|
|
14563
|
+
left: theme.__hd__.textInput.space.labelLeft,
|
|
14564
|
+
top: theme.__hd__.textInput.space.labelTop,
|
|
14565
|
+
backgroundColor: theme.__hd__.textInput.colors.labelBackground,
|
|
14566
|
+
zIndex: 1,
|
|
14567
|
+
paddingHorizontal: theme.__hd__.textInput.space.labelHorizontalPadding
|
|
14568
|
+
};
|
|
14569
|
+
});
|
|
14570
|
+
var StyledTextInput = index$2(TextInput$1)(function (_ref3) {
|
|
14571
|
+
var theme = _ref3.theme;
|
|
14572
|
+
return {
|
|
14573
|
+
flex: 1,
|
|
14574
|
+
fontSize: theme.__hd__.textInput.fontSizes.text,
|
|
14575
|
+
marginHorizontal: theme.__hd__.textInput.space.inputHorizontalMargin
|
|
14576
|
+
};
|
|
14577
|
+
});
|
|
14578
|
+
|
|
14579
|
+
var _excluded$1 = ["label", "prefix", "suffix", "style", "textStyle", "testID", "accessibilityLabelledBy"];
|
|
14580
|
+
|
|
14581
|
+
var TextInput = function TextInput(_ref) {
|
|
14582
|
+
var label = _ref.label,
|
|
14583
|
+
prefix = _ref.prefix,
|
|
14584
|
+
suffix = _ref.suffix,
|
|
14585
|
+
style = _ref.style,
|
|
14586
|
+
textStyle = _ref.textStyle,
|
|
14587
|
+
testID = _ref.testID,
|
|
14588
|
+
accessibilityLabelledBy = _ref.accessibilityLabelledBy,
|
|
14589
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded$1);
|
|
14590
|
+
|
|
14591
|
+
return /*#__PURE__*/React.createElement(Container, {
|
|
14592
|
+
style: style,
|
|
14593
|
+
testID: testID
|
|
14594
|
+
}, label && /*#__PURE__*/React.createElement(Label, {
|
|
14595
|
+
nativeID: accessibilityLabelledBy,
|
|
14596
|
+
testID: "input-label",
|
|
14597
|
+
fontSize: "small"
|
|
14598
|
+
}, label), prefix && /*#__PURE__*/React.createElement(Icon, {
|
|
14599
|
+
testID: "input-prefix",
|
|
14600
|
+
icon: prefix,
|
|
14601
|
+
size: "xsmall"
|
|
14602
|
+
}), /*#__PURE__*/React.createElement(StyledTextInput, _extends$1({
|
|
14603
|
+
style: textStyle,
|
|
14604
|
+
testID: "text-input" // @ts-ignore
|
|
14605
|
+
,
|
|
14606
|
+
accessibilityLabelledBy: accessibilityLabelledBy
|
|
14607
|
+
}, nativeProps)), suffix && /*#__PURE__*/React.createElement(Icon, {
|
|
14608
|
+
testID: "input-suffix",
|
|
14609
|
+
icon: suffix,
|
|
14610
|
+
size: "xsmall"
|
|
14611
|
+
}));
|
|
14612
|
+
};
|
|
14613
|
+
|
|
14614
|
+
var OptionWrapper = index$2(TouchableOpacity)(function (_ref) {
|
|
14615
|
+
var theme = _ref.theme,
|
|
14616
|
+
themeSelected = _ref.themeSelected;
|
|
16455
14617
|
return {
|
|
16456
|
-
paddingVertical: theme.space.small,
|
|
16457
|
-
paddingHorizontal: theme.space.medium,
|
|
16458
|
-
backgroundColor: theme.colors.outline,
|
|
16459
|
-
marginBottom: theme.space.medium,
|
|
16460
|
-
display: 'flex',
|
|
16461
14618
|
flexDirection: 'row',
|
|
16462
|
-
|
|
16463
|
-
|
|
14619
|
+
justifyContent: 'space-between',
|
|
14620
|
+
alignItems: 'center',
|
|
14621
|
+
borderRadius: theme.__hd__.select.radii.option,
|
|
14622
|
+
padding: theme.__hd__.select.space.optionPadding,
|
|
14623
|
+
backgroundColor: themeSelected ? theme.__hd__.select.colors.checkedOption : theme.__hd__.select.colors.option
|
|
16464
14624
|
};
|
|
16465
14625
|
});
|
|
16466
|
-
var
|
|
14626
|
+
var OptionListWrapper = index$2(View)(function (_ref2) {
|
|
16467
14627
|
var theme = _ref2.theme;
|
|
16468
14628
|
return {
|
|
16469
|
-
|
|
14629
|
+
padding: theme.__hd__.select.space.optionListPadding
|
|
16470
14630
|
};
|
|
16471
14631
|
});
|
|
16472
|
-
var
|
|
14632
|
+
var Spacer = index$2(View)(function (_ref3) {
|
|
14633
|
+
var theme = _ref3.theme;
|
|
16473
14634
|
return {
|
|
16474
|
-
|
|
16475
|
-
|
|
14635
|
+
marginTop: theme.__hd__.select.space.optionListSpacing
|
|
14636
|
+
};
|
|
14637
|
+
});
|
|
14638
|
+
var FooterText = index$2(Typography.Text)(function (_ref4) {
|
|
14639
|
+
var theme = _ref4.theme;
|
|
14640
|
+
return {
|
|
14641
|
+
color: theme.__hd__.select.colors.footerText
|
|
16476
14642
|
};
|
|
16477
14643
|
});
|
|
16478
14644
|
|
|
16479
|
-
|
|
16480
|
-
|
|
16481
|
-
|
|
16482
|
-
|
|
16483
|
-
|
|
16484
|
-
}
|
|
16485
|
-
|
|
16486
|
-
|
|
16487
|
-
|
|
16488
|
-
primary: 'primary'
|
|
16489
|
-
};
|
|
16490
|
-
|
|
16491
|
-
var SectionHeading = function SectionHeading(_ref) {
|
|
16492
|
-
var icon = _ref.icon,
|
|
16493
|
-
text = _ref.text,
|
|
16494
|
-
rightChildren = _ref.rightChildren,
|
|
16495
|
-
_ref$fontSize = _ref.fontSize,
|
|
16496
|
-
fontSize = _ref$fontSize === void 0 ? 'large' : _ref$fontSize,
|
|
16497
|
-
_ref$intent = _ref.intent,
|
|
16498
|
-
intent = _ref$intent === void 0 ? 'body' : _ref$intent,
|
|
16499
|
-
_ref$fontWeight = _ref.fontWeight,
|
|
16500
|
-
fontWeight = _ref$fontWeight === void 0 ? 'regular' : _ref$fontWeight,
|
|
16501
|
-
style = _ref.style,
|
|
16502
|
-
testID = _ref.testID;
|
|
16503
|
-
return /*#__PURE__*/React.createElement(StyledHeading, {
|
|
16504
|
-
style: style,
|
|
16505
|
-
testID: testID
|
|
16506
|
-
}, /*#__PURE__*/React.createElement(StyledWrapper, null, /*#__PURE__*/React.createElement(StyledIconWrapper, null, icon && /*#__PURE__*/React.createElement(Icon, {
|
|
16507
|
-
icon: icon,
|
|
16508
|
-
size: ICON_SIZE_MAP[fontSize],
|
|
16509
|
-
intent: ICON_INTENT_MAP[intent]
|
|
16510
|
-
})), /*#__PURE__*/React.createElement(Typography.Text, {
|
|
16511
|
-
fontSize: fontSize,
|
|
16512
|
-
intent: intent,
|
|
16513
|
-
fontWeight: fontWeight
|
|
16514
|
-
}, text)), rightChildren);
|
|
16515
|
-
};
|
|
16516
|
-
|
|
16517
|
-
var childrenWithOverriddenStyle = function childrenWithOverriddenStyle(children) {
|
|
16518
|
-
return Children.map(children, function (child) {
|
|
16519
|
-
var element = child;
|
|
16520
|
-
return (
|
|
16521
|
-
/*#__PURE__*/
|
|
16522
|
-
// Add a wrapper to ensure layout is calculated correctly
|
|
16523
|
-
React.createElement(View, {
|
|
16524
|
-
style: StyleSheet$1.absoluteFill,
|
|
16525
|
-
collapsable: false
|
|
16526
|
-
}, /*#__PURE__*/React.cloneElement(element, _objectSpread2(_objectSpread2({}, element.props), {}, {
|
|
16527
|
-
// Override styles so that each page will fill the parent.
|
|
16528
|
-
style: [element.props.style, StyleSheet$1.absoluteFill]
|
|
16529
|
-
})))
|
|
16530
|
-
);
|
|
16531
|
-
});
|
|
16532
|
-
};
|
|
16533
|
-
|
|
16534
|
-
var VIEW_MANAGER_NAME = 'RNCViewPager';
|
|
16535
|
-
var PagerViewViewManager = requireNativeComponent(VIEW_MANAGER_NAME);
|
|
16536
|
-
function getViewManagerConfig() {
|
|
16537
|
-
var viewManagerName = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : VIEW_MANAGER_NAME;
|
|
16538
|
-
return UIManager.getViewManagerConfig(viewManagerName);
|
|
14645
|
+
function Footer(_ref) {
|
|
14646
|
+
var label = _ref.label,
|
|
14647
|
+
onPress = _ref.onPress;
|
|
14648
|
+
return /*#__PURE__*/React.createElement(TouchableOpacity, {
|
|
14649
|
+
onPress: onPress
|
|
14650
|
+
}, /*#__PURE__*/React.createElement(FooterText, {
|
|
14651
|
+
fontSize: "large",
|
|
14652
|
+
fontWeight: "semi-bold"
|
|
14653
|
+
}, label));
|
|
16539
14654
|
}
|
|
16540
14655
|
|
|
16541
|
-
function
|
|
16542
|
-
|
|
16543
|
-
|
|
16544
|
-
|
|
16545
|
-
|
|
16546
|
-
|
|
16547
|
-
|
|
16548
|
-
|
|
16549
|
-
|
|
16550
|
-
|
|
14656
|
+
function Option(_ref) {
|
|
14657
|
+
var text = _ref.text,
|
|
14658
|
+
selected = _ref.selected,
|
|
14659
|
+
onPress = _ref.onPress;
|
|
14660
|
+
return /*#__PURE__*/React.createElement(OptionWrapper, {
|
|
14661
|
+
themeSelected: selected,
|
|
14662
|
+
onPress: onPress
|
|
14663
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
14664
|
+
style: {
|
|
14665
|
+
flex: 1
|
|
16551
14666
|
}
|
|
16552
|
-
|
|
16553
|
-
|
|
16554
|
-
}
|
|
16555
|
-
|
|
16556
|
-
|
|
14667
|
+
}, /*#__PURE__*/React.createElement(Typography.Text, {
|
|
14668
|
+
fontSize: "large"
|
|
14669
|
+
}, text)), selected && /*#__PURE__*/React.createElement(Icon, {
|
|
14670
|
+
icon: "checkmark",
|
|
14671
|
+
size: "small"
|
|
14672
|
+
}));
|
|
16557
14673
|
}
|
|
16558
14674
|
|
|
16559
|
-
function
|
|
16560
|
-
|
|
16561
|
-
|
|
16562
|
-
|
|
16563
|
-
|
|
16564
|
-
|
|
16565
|
-
|
|
16566
|
-
});
|
|
14675
|
+
function getKey(option, index, keyExtractor) {
|
|
14676
|
+
var key = '';
|
|
14677
|
+
|
|
14678
|
+
if (keyExtractor !== undefined) {
|
|
14679
|
+
key = keyExtractor(option, index);
|
|
14680
|
+
} else if (option.key !== undefined) {
|
|
14681
|
+
key = option.key;
|
|
16567
14682
|
} else {
|
|
16568
|
-
|
|
14683
|
+
key = index;
|
|
16569
14684
|
}
|
|
16570
14685
|
|
|
16571
|
-
return
|
|
14686
|
+
return key;
|
|
16572
14687
|
}
|
|
16573
|
-
/**
|
|
16574
|
-
* Container that allows to flip left and right between child views. Each
|
|
16575
|
-
* child view of the `PagerView` will be treated as a separate page
|
|
16576
|
-
* and will be stretched to fill the `PagerView`.
|
|
16577
|
-
*
|
|
16578
|
-
* It is important all children are `<View>`s and not composite components.
|
|
16579
|
-
* You can set style properties like `padding` or `backgroundColor` for each
|
|
16580
|
-
* child. It is also important that each child have a `key` prop.
|
|
16581
|
-
*
|
|
16582
|
-
* Example:
|
|
16583
|
-
*
|
|
16584
|
-
* ```
|
|
16585
|
-
* render: function() {
|
|
16586
|
-
* return (
|
|
16587
|
-
* <PagerView
|
|
16588
|
-
* style={styles.PagerView}
|
|
16589
|
-
* initialPage={0}>
|
|
16590
|
-
* <View style={styles.pageStyle} key="1">
|
|
16591
|
-
* <Text>First page</Text>
|
|
16592
|
-
* </View>
|
|
16593
|
-
* <View style={styles.pageStyle} key="2">
|
|
16594
|
-
* <Text>Second page</Text>
|
|
16595
|
-
* </View>
|
|
16596
|
-
* </PagerView>
|
|
16597
|
-
* );
|
|
16598
|
-
* }
|
|
16599
|
-
*
|
|
16600
|
-
* ...
|
|
16601
|
-
*
|
|
16602
|
-
* var styles = {
|
|
16603
|
-
* ...
|
|
16604
|
-
* PagerView: {
|
|
16605
|
-
* flex: 1
|
|
16606
|
-
* },
|
|
16607
|
-
* pageStyle: {
|
|
16608
|
-
* alignItems: 'center',
|
|
16609
|
-
* padding: 20,
|
|
16610
|
-
* }
|
|
16611
|
-
* }
|
|
16612
|
-
* ```
|
|
16613
|
-
*/
|
|
16614
|
-
|
|
16615
|
-
var PagerView = /*#__PURE__*/function (_React$Component) {
|
|
16616
|
-
_inherits$1(PagerView, _React$Component);
|
|
16617
|
-
|
|
16618
|
-
var _super = _createSuper(PagerView);
|
|
16619
|
-
|
|
16620
|
-
function PagerView() {
|
|
16621
|
-
var _this;
|
|
16622
|
-
|
|
16623
|
-
_classCallCheck$1(this, PagerView);
|
|
16624
|
-
|
|
16625
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
16626
|
-
args[_key] = arguments[_key];
|
|
16627
|
-
}
|
|
16628
|
-
|
|
16629
|
-
_this = _super.call.apply(_super, [this].concat(args));
|
|
16630
|
-
|
|
16631
|
-
_defineProperty(_assertThisInitialized$1(_this), "isScrolling", false);
|
|
16632
|
-
|
|
16633
|
-
_defineProperty(_assertThisInitialized$1(_this), "PagerView", /*#__PURE__*/React.createRef());
|
|
16634
14688
|
|
|
16635
|
-
|
|
16636
|
-
|
|
16637
|
-
|
|
16638
|
-
|
|
16639
|
-
|
|
16640
|
-
|
|
16641
|
-
|
|
16642
|
-
|
|
16643
|
-
|
|
16644
|
-
|
|
16645
|
-
|
|
16646
|
-
|
|
16647
|
-
|
|
14689
|
+
function OptionList(_ref2) {
|
|
14690
|
+
var value = _ref2.value,
|
|
14691
|
+
options = _ref2.options,
|
|
14692
|
+
_onPress = _ref2.onPress,
|
|
14693
|
+
keyExtractor = _ref2.keyExtractor;
|
|
14694
|
+
return /*#__PURE__*/React.createElement(OptionListWrapper, null, options.map(function (opt, index) {
|
|
14695
|
+
return /*#__PURE__*/React.createElement(React.Fragment, {
|
|
14696
|
+
key: getKey(opt, index, keyExtractor)
|
|
14697
|
+
}, index !== 0 && /*#__PURE__*/React.createElement(Spacer, null), /*#__PURE__*/React.createElement(Option, {
|
|
14698
|
+
text: opt.text,
|
|
14699
|
+
selected: value.includes(opt.value),
|
|
14700
|
+
onPress: function onPress() {
|
|
14701
|
+
if (value.includes(opt.value)) {
|
|
14702
|
+
_onPress(value.filter(function (val) {
|
|
14703
|
+
return val !== opt.value;
|
|
14704
|
+
}));
|
|
14705
|
+
} else {
|
|
14706
|
+
_onPress([].concat(_toConsumableArray(value), [opt.value]));
|
|
16648
14707
|
}
|
|
16649
14708
|
}
|
|
16650
|
-
});
|
|
16651
|
-
|
|
16652
|
-
|
|
16653
|
-
if (_this.props.onPageScrollStateChanged) {
|
|
16654
|
-
_this.props.onPageScrollStateChanged(e);
|
|
16655
|
-
}
|
|
14709
|
+
}));
|
|
14710
|
+
}));
|
|
14711
|
+
}
|
|
16656
14712
|
|
|
16657
|
-
|
|
16658
|
-
|
|
14713
|
+
function MultiSelect(_ref) {
|
|
14714
|
+
var options = _ref.options,
|
|
14715
|
+
value = _ref.value,
|
|
14716
|
+
testID = _ref.testID,
|
|
14717
|
+
style = _ref.style,
|
|
14718
|
+
label = _ref.label,
|
|
14719
|
+
footerLabel = _ref.footerLabel,
|
|
14720
|
+
_onPress = _ref.onPress;
|
|
14721
|
+
var theme = useTheme$1();
|
|
16659
14722
|
|
|
16660
|
-
|
|
16661
|
-
|
|
16662
|
-
|
|
16663
|
-
|
|
16664
|
-
});
|
|
14723
|
+
var _useState = useState(false),
|
|
14724
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
14725
|
+
open = _useState2[0],
|
|
14726
|
+
setOpen = _useState2[1];
|
|
16665
14727
|
|
|
16666
|
-
|
|
16667
|
-
|
|
16668
|
-
|
|
14728
|
+
var _useState3 = useState(value),
|
|
14729
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
14730
|
+
selectingValue = _useState4[0],
|
|
14731
|
+
setSelectingValue = _useState4[1];
|
|
14732
|
+
|
|
14733
|
+
var displayedValue = options.filter(function (opt) {
|
|
14734
|
+
return value.includes(opt.value);
|
|
14735
|
+
}).map(function (opt) {
|
|
14736
|
+
return opt.text;
|
|
14737
|
+
}).join(', ');
|
|
14738
|
+
return /*#__PURE__*/React.createElement(TouchableOpacity, {
|
|
14739
|
+
onPress: function onPress() {
|
|
14740
|
+
return setOpen(true);
|
|
14741
|
+
}
|
|
14742
|
+
}, /*#__PURE__*/React.createElement(TextInput, {
|
|
14743
|
+
label: label,
|
|
14744
|
+
value: displayedValue,
|
|
14745
|
+
onPressIn: function onPressIn() {
|
|
14746
|
+
return setOpen(true);
|
|
14747
|
+
},
|
|
14748
|
+
editable: false // when input is not editable on Android, the text color is gray
|
|
14749
|
+
// hence, adding this to make the text color the same as iOS
|
|
14750
|
+
,
|
|
14751
|
+
textStyle: {
|
|
14752
|
+
color: theme.colors.text
|
|
14753
|
+
},
|
|
14754
|
+
suffix: "arrow-down",
|
|
14755
|
+
multiline: true,
|
|
14756
|
+
style: style,
|
|
14757
|
+
testID: testID
|
|
14758
|
+
}), /*#__PURE__*/React.createElement(BottomSheet, {
|
|
14759
|
+
open: open,
|
|
14760
|
+
onRequestClose: function onRequestClose() {
|
|
14761
|
+
return setOpen(false);
|
|
14762
|
+
},
|
|
14763
|
+
onDismiss: function onDismiss() {
|
|
14764
|
+
return setSelectingValue(value);
|
|
14765
|
+
},
|
|
14766
|
+
header: label,
|
|
14767
|
+
footer: /*#__PURE__*/React.createElement(Footer, {
|
|
14768
|
+
label: footerLabel,
|
|
14769
|
+
onPress: function onPress() {
|
|
14770
|
+
setOpen(false);
|
|
16669
14771
|
|
|
16670
|
-
|
|
16671
|
-
|
|
16672
|
-
})
|
|
14772
|
+
_onPress(selectingValue);
|
|
14773
|
+
}
|
|
14774
|
+
})
|
|
14775
|
+
}, /*#__PURE__*/React.createElement(OptionList, {
|
|
14776
|
+
options: options,
|
|
14777
|
+
value: selectingValue,
|
|
14778
|
+
onPress: setSelectingValue
|
|
14779
|
+
})));
|
|
14780
|
+
}
|
|
16673
14781
|
|
|
16674
|
-
|
|
16675
|
-
|
|
16676
|
-
|
|
14782
|
+
var CompoundSelect = {
|
|
14783
|
+
Multi: MultiSelect
|
|
14784
|
+
};
|
|
16677
14785
|
|
|
16678
|
-
|
|
16679
|
-
|
|
16680
|
-
|
|
14786
|
+
var StyledWrapper = index$2(View)(function (_ref) {
|
|
14787
|
+
var theme = _ref.theme,
|
|
14788
|
+
themeChecked = _ref.themeChecked,
|
|
14789
|
+
themeSize = _ref.themeSize;
|
|
14790
|
+
return {
|
|
14791
|
+
height: theme.__hd__["switch"].heights[themeSize],
|
|
14792
|
+
width: theme.__hd__["switch"].widths[themeSize],
|
|
14793
|
+
paddingHorizontal: theme.__hd__["switch"].spaces[themeSize],
|
|
14794
|
+
borderRadius: theme.__hd__["switch"].radii.rounded,
|
|
14795
|
+
backgroundColor: themeChecked ? theme.__hd__["switch"].colors.active : theme.__hd__["switch"].colors.inactive
|
|
14796
|
+
};
|
|
14797
|
+
});
|
|
14798
|
+
var StyledDisabledWrapper = index$2(View)(function (_ref2) {
|
|
14799
|
+
var theme = _ref2.theme,
|
|
14800
|
+
themeSize = _ref2.themeSize;
|
|
14801
|
+
return {
|
|
14802
|
+
position: 'absolute',
|
|
14803
|
+
height: theme.__hd__["switch"].heights[themeSize],
|
|
14804
|
+
width: theme.__hd__["switch"].widths[themeSize],
|
|
14805
|
+
borderRadius: theme.__hd__["switch"].radii.rounded,
|
|
14806
|
+
backgroundColor: theme.__hd__["switch"].colors.thumb,
|
|
14807
|
+
zIndex: 9999,
|
|
14808
|
+
opacity: 0.8
|
|
14809
|
+
};
|
|
14810
|
+
});
|
|
14811
|
+
var StyledThumbWrapper = index$2(View)(function (_ref3) {
|
|
14812
|
+
var theme = _ref3.theme,
|
|
14813
|
+
themeSize = _ref3.themeSize;
|
|
14814
|
+
return {
|
|
14815
|
+
height: theme.__hd__["switch"].heights[themeSize],
|
|
14816
|
+
width: theme.__hd__["switch"].widths[themeSize],
|
|
14817
|
+
borderRadius: theme.__hd__["switch"].radii.rounded,
|
|
14818
|
+
display: 'flex',
|
|
14819
|
+
justifyContent: 'center'
|
|
14820
|
+
};
|
|
14821
|
+
});
|
|
14822
|
+
var StyledKnot = index$2(Animated.View)(function (_ref4) {
|
|
14823
|
+
var theme = _ref4.theme,
|
|
14824
|
+
themeSize = _ref4.themeSize;
|
|
14825
|
+
return {
|
|
14826
|
+
width: theme.__hd__["switch"].thumbSizes[themeSize],
|
|
14827
|
+
height: theme.__hd__["switch"].thumbSizes[themeSize],
|
|
14828
|
+
backgroundColor: theme.__hd__["switch"].colors.thumb,
|
|
14829
|
+
borderRadius: theme.__hd__["switch"].radii.rounded
|
|
14830
|
+
};
|
|
14831
|
+
});
|
|
16681
14832
|
|
|
16682
|
-
|
|
16683
|
-
|
|
14833
|
+
var Switch = function Switch(_ref) {
|
|
14834
|
+
var _ref$size = _ref.size,
|
|
14835
|
+
size = _ref$size === void 0 ? 'medium' : _ref$size,
|
|
14836
|
+
_ref$disabled = _ref.disabled,
|
|
14837
|
+
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
14838
|
+
checked = _ref.checked,
|
|
14839
|
+
onPress = _ref.onPress,
|
|
14840
|
+
style = _ref.style,
|
|
14841
|
+
testID = _ref.testID;
|
|
14842
|
+
var theme = useTheme$1();
|
|
14843
|
+
var offset = checked ? theme.__hd__["switch"].widths[size] - theme.__hd__["switch"].thumbSizes[size] - theme.__hd__["switch"].spaces[size] * 2 : theme.__hd__["switch"].spaces.inactive;
|
|
16684
14844
|
|
|
16685
|
-
|
|
16686
|
-
|
|
16687
|
-
|
|
16688
|
-
|
|
14845
|
+
var _useState = useState(function () {
|
|
14846
|
+
return new Animated.Value(offset);
|
|
14847
|
+
}),
|
|
14848
|
+
_useState2 = _slicedToArray(_useState, 1),
|
|
14849
|
+
animatedOffset = _useState2[0];
|
|
16689
14850
|
|
|
16690
|
-
|
|
16691
|
-
|
|
16692
|
-
|
|
16693
|
-
|
|
16694
|
-
|
|
16695
|
-
}
|
|
16696
|
-
},
|
|
16697
|
-
|
|
16698
|
-
|
|
16699
|
-
|
|
16700
|
-
|
|
16701
|
-
|
|
16702
|
-
|
|
16703
|
-
|
|
16704
|
-
|
|
16705
|
-
|
|
16706
|
-
|
|
16707
|
-
|
|
16708
|
-
|
|
16709
|
-
|
|
16710
|
-
|
|
14851
|
+
useEffect(function () {
|
|
14852
|
+
Animated.timing(animatedOffset, {
|
|
14853
|
+
toValue: offset,
|
|
14854
|
+
easing: Easing.inOut(Easing.cubic),
|
|
14855
|
+
useNativeDriver: false
|
|
14856
|
+
}).start();
|
|
14857
|
+
}, [checked]);
|
|
14858
|
+
return /*#__PURE__*/React.createElement(TouchableWithoutFeedback, {
|
|
14859
|
+
testID: testID,
|
|
14860
|
+
onPress: onPress,
|
|
14861
|
+
disabled: disabled
|
|
14862
|
+
}, /*#__PURE__*/React.createElement(StyledWrapper, {
|
|
14863
|
+
themeChecked: checked,
|
|
14864
|
+
themeSize: size,
|
|
14865
|
+
style: style
|
|
14866
|
+
}, disabled && /*#__PURE__*/React.createElement(StyledDisabledWrapper, {
|
|
14867
|
+
themeSize: size
|
|
14868
|
+
}), /*#__PURE__*/React.createElement(StyledThumbWrapper, {
|
|
14869
|
+
themeSize: size
|
|
14870
|
+
}, /*#__PURE__*/React.createElement(StyledKnot, {
|
|
14871
|
+
themeSize: size,
|
|
14872
|
+
style: {
|
|
14873
|
+
left: animatedOffset
|
|
16711
14874
|
}
|
|
16712
|
-
}
|
|
16713
|
-
|
|
16714
|
-
return PagerView;
|
|
16715
|
-
}(React.Component);
|
|
14875
|
+
}))));
|
|
14876
|
+
};
|
|
16716
14877
|
|
|
16717
14878
|
var AnimatedPagerView = Animated.createAnimatedComponent(PagerView);
|
|
16718
14879
|
var TabContainer$1 = index$2(View)({
|
|
@@ -16880,7 +15041,7 @@ var ScrollableTab = function ScrollableTab(_ref2) {
|
|
|
16880
15041
|
var flatListRef = React.useRef(null);
|
|
16881
15042
|
var pagerViewRef = React.useRef(null);
|
|
16882
15043
|
var insets = useSafeAreaInsets();
|
|
16883
|
-
var theme = useTheme();
|
|
15044
|
+
var theme = useTheme$1();
|
|
16884
15045
|
var selectedTabIndex = tabs.findIndex(function (item) {
|
|
16885
15046
|
return item.key === selectedTabKey;
|
|
16886
15047
|
});
|
|
@@ -16897,7 +15058,7 @@ var ScrollableTab = function ScrollableTab(_ref2) {
|
|
|
16897
15058
|
});
|
|
16898
15059
|
}
|
|
16899
15060
|
|
|
16900
|
-
var animation = Animated.parallel(_toConsumableArray
|
|
15061
|
+
var animation = Animated.parallel(_toConsumableArray(tabs.map(function (_, i) {
|
|
16901
15062
|
return Animated.timing(tabsAnims[i], {
|
|
16902
15063
|
toValue: i === selectedTabIndex ? 1 : 0,
|
|
16903
15064
|
duration: 150,
|
|
@@ -17036,7 +15197,7 @@ var Tabs = function Tabs(_ref2) {
|
|
|
17036
15197
|
lazy = _ref2$lazy === void 0 ? false : _ref2$lazy,
|
|
17037
15198
|
_ref2$lazyPreloadDist = _ref2.lazyPreloadDistance,
|
|
17038
15199
|
lazyPreloadDistance = _ref2$lazyPreloadDist === void 0 ? 1 : _ref2$lazyPreloadDist;
|
|
17039
|
-
var theme = useTheme();
|
|
15200
|
+
var theme = useTheme$1();
|
|
17040
15201
|
var insets = useSafeAreaInsets();
|
|
17041
15202
|
var pagerViewRef = React.useRef(null);
|
|
17042
15203
|
var selectedTabIndex = tabs.findIndex(function (item) {
|
|
@@ -17165,7 +15326,7 @@ var StyledText = index$2(Text$1)(function (_ref2) {
|
|
|
17165
15326
|
};
|
|
17166
15327
|
});
|
|
17167
15328
|
|
|
17168
|
-
var _excluded
|
|
15329
|
+
var _excluded = ["content", "intent", "style", "testID"];
|
|
17169
15330
|
|
|
17170
15331
|
var Tag = function Tag(_ref) {
|
|
17171
15332
|
var content = _ref.content,
|
|
@@ -17173,9 +15334,9 @@ var Tag = function Tag(_ref) {
|
|
|
17173
15334
|
intent = _ref$intent === void 0 ? 'info' : _ref$intent,
|
|
17174
15335
|
style = _ref.style,
|
|
17175
15336
|
testID = _ref.testID,
|
|
17176
|
-
nativeProps = _objectWithoutProperties
|
|
15337
|
+
nativeProps = _objectWithoutProperties(_ref, _excluded);
|
|
17177
15338
|
|
|
17178
|
-
return /*#__PURE__*/React.createElement(StyledView, _extends$
|
|
15339
|
+
return /*#__PURE__*/React.createElement(StyledView, _extends$1({}, nativeProps, {
|
|
17179
15340
|
themeIntent: intent,
|
|
17180
15341
|
style: style,
|
|
17181
15342
|
testID: testID
|
|
@@ -17184,69 +15345,4 @@ var Tag = function Tag(_ref) {
|
|
|
17184
15345
|
}, content));
|
|
17185
15346
|
};
|
|
17186
15347
|
|
|
17187
|
-
|
|
17188
|
-
var theme = _ref.theme;
|
|
17189
|
-
return {
|
|
17190
|
-
position: 'relative',
|
|
17191
|
-
width: '100%',
|
|
17192
|
-
borderWidth: theme.__hd__.textInput.borderWidths.container,
|
|
17193
|
-
borderRadius: theme.__hd__.textInput.radii.container,
|
|
17194
|
-
padding: theme.__hd__.textInput.space.containerPadding,
|
|
17195
|
-
flexDirection: 'row',
|
|
17196
|
-
alignItems: 'center'
|
|
17197
|
-
};
|
|
17198
|
-
});
|
|
17199
|
-
var Label = index$2(Typography.Text)(function (_ref2) {
|
|
17200
|
-
var theme = _ref2.theme;
|
|
17201
|
-
return {
|
|
17202
|
-
position: 'absolute',
|
|
17203
|
-
left: theme.__hd__.textInput.space.labelLeft,
|
|
17204
|
-
top: theme.__hd__.textInput.space.labelTop,
|
|
17205
|
-
backgroundColor: theme.__hd__.textInput.colors.labelBackground,
|
|
17206
|
-
zIndex: 1,
|
|
17207
|
-
paddingHorizontal: theme.__hd__.textInput.space.labelHorizontalPadding
|
|
17208
|
-
};
|
|
17209
|
-
});
|
|
17210
|
-
var Prefix = index$2(Icon)(function (_ref3) {
|
|
17211
|
-
var theme = _ref3.theme;
|
|
17212
|
-
return {
|
|
17213
|
-
marginRight: theme.__hd__.textInput.space.prefixMarginRight
|
|
17214
|
-
};
|
|
17215
|
-
});
|
|
17216
|
-
var StyledTextInput = index$2(TextInput$1)(function (_ref4) {
|
|
17217
|
-
var theme = _ref4.theme;
|
|
17218
|
-
return {
|
|
17219
|
-
flex: 1,
|
|
17220
|
-
fontSize: theme.__hd__.textInput.fontSizes.text
|
|
17221
|
-
};
|
|
17222
|
-
});
|
|
17223
|
-
|
|
17224
|
-
var _excluded = ["label", "prefix", "style", "testID", "accessibilityLabelledBy"];
|
|
17225
|
-
|
|
17226
|
-
var TextInput = function TextInput(_ref) {
|
|
17227
|
-
var label = _ref.label,
|
|
17228
|
-
prefix = _ref.prefix,
|
|
17229
|
-
style = _ref.style,
|
|
17230
|
-
testID = _ref.testID,
|
|
17231
|
-
accessibilityLabelledBy = _ref.accessibilityLabelledBy,
|
|
17232
|
-
nativeProps = _objectWithoutProperties$1(_ref, _excluded);
|
|
17233
|
-
|
|
17234
|
-
return /*#__PURE__*/React.createElement(Container, {
|
|
17235
|
-
style: style,
|
|
17236
|
-
testID: testID
|
|
17237
|
-
}, label && /*#__PURE__*/React.createElement(Label, {
|
|
17238
|
-
nativeID: accessibilityLabelledBy,
|
|
17239
|
-
testID: "input-label",
|
|
17240
|
-
fontSize: "small"
|
|
17241
|
-
}, label), prefix && /*#__PURE__*/React.createElement(Prefix, {
|
|
17242
|
-
testID: "input-prefix",
|
|
17243
|
-
icon: prefix,
|
|
17244
|
-
size: "xsmall"
|
|
17245
|
-
}), /*#__PURE__*/React.createElement(StyledTextInput, _extends$3({
|
|
17246
|
-
testID: "text-input" // @ts-ignore
|
|
17247
|
-
,
|
|
17248
|
-
accessibilityLabelledBy: accessibilityLabelledBy
|
|
17249
|
-
}, nativeProps)));
|
|
17250
|
-
};
|
|
17251
|
-
|
|
17252
|
-
export { Alert, Avatar, Badge$1 as Badge, BottomNavigation, BottomSheet, CompoundButton as Button, Card, Collapse, ContentNavigator, Divider, Drawer, index$1 as FAB, Icon, Progress, CompoundRadio as Radio, SectionHeading, Spinner, index as Tabs, Tag, TextInput, ThemeProvider, Typography, getTheme, scale, theme, useTheme };
|
|
15348
|
+
export { Alert, Avatar, Badge$1 as Badge, BottomNavigation, BottomSheet, CompoundButton as Button, Card, Collapse, ContentNavigator, Divider, Drawer, index$1 as FAB, Icon, Progress, CompoundRadio as Radio, SectionHeading, CompoundSelect as Select, Spinner, Switch, index as Tabs, Tag, TextInput, ThemeProvider, Typography, getTheme, scale, theme, useTheme };
|