@gympass/yoga 7.88.0 → 7.88.2
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/cjs/Accordion/Accordion.theme.js +46 -0
- package/cjs/Accordion/index.js +35 -0
- package/cjs/ActionRequirement/ActionRequirement.theme.js +25 -0
- package/cjs/ActionRequirement/index.js +35 -0
- package/cjs/ActionRequirement/index.native.js +35 -0
- package/cjs/AutoComplete/AutoComplete.theme.js +77 -0
- package/cjs/AutoComplete/index.js +35 -0
- package/cjs/Avatar/Avatar.theme.js +25 -0
- package/cjs/Avatar/index.js +37 -0
- package/cjs/Avatar/index.native.js +37 -0
- package/cjs/Banner/Banner.theme.js +30 -0
- package/cjs/Banner/index.js +35 -0
- package/cjs/Banner/index.native.js +35 -0
- package/cjs/BottomSheet/BottomSheet.theme.js +44 -0
- package/cjs/BottomSheet/index.js +35 -0
- package/cjs/Box/index.js +35 -0
- package/cjs/Box/index.native.js +35 -0
- package/cjs/Button/Button.theme.js +157 -0
- package/cjs/Button/index.js +43 -0
- package/cjs/Button/index.native.js +41 -0
- package/cjs/Card/Card.native.theme.js +64 -0
- package/cjs/Card/Card.theme.js +177 -0
- package/cjs/Card/Card.web.theme.js +61 -0
- package/cjs/Card/index.js +32 -0
- package/cjs/Card/index.native.js +34 -0
- package/cjs/Checkbox/CheckIcon.js +25 -0
- package/cjs/Checkbox/Checkbox.theme.js +68 -0
- package/cjs/Checkbox/CheckboxSwitch.theme.js +90 -0
- package/cjs/Checkbox/index.js +26 -0
- package/cjs/Checkbox/index.native.js +26 -0
- package/cjs/Chips/index.js +35 -0
- package/cjs/Chips/index.native.js +35 -0
- package/cjs/Datepicker/Datepicker.theme.js +32 -0
- package/cjs/Datepicker/index.js +35 -0
- package/cjs/Dialog/Dialog.theme.js +43 -0
- package/cjs/Dialog/index.js +35 -0
- package/cjs/Divider/Divider.theme.js +25 -0
- package/cjs/Divider/index.js +35 -0
- package/cjs/Divider/index.native.js +35 -0
- package/cjs/Drawer/Drawer.theme.js +35 -0
- package/cjs/Drawer/index.js +35 -0
- package/cjs/Dropdown/Dropdown.theme.js +205 -0
- package/cjs/Dropdown/index.js +35 -0
- package/cjs/Dropdown/index.native.js +35 -0
- package/cjs/Feedback/Feedback.theme.js +29 -0
- package/cjs/Feedback/index.js +35 -0
- package/cjs/Grid/Grid.theme.js +43 -0
- package/cjs/Grid/index.js +34 -0
- package/cjs/Header/Header.theme.js +34 -0
- package/cjs/Header/index.js +35 -0
- package/cjs/Heading/Heading.theme.js +38 -0
- package/cjs/Heading/index.js +35 -0
- package/cjs/Icon/Icon.js +193 -0
- package/cjs/Icon/Icon.theme.js +25 -0
- package/cjs/Icon/index.js +35 -0
- package/cjs/Icon/index.native.js +35 -0
- package/cjs/Input/Input.theme.js +86 -0
- package/cjs/Input/index.js +30 -0
- package/cjs/Input/index.native.js +29 -0
- package/cjs/List/List.theme.js +49 -0
- package/cjs/List/index.js +27 -0
- package/cjs/List/index.native.js +26 -0
- package/cjs/Menu/Menu.theme.js +63 -0
- package/cjs/Menu/index.js +41 -0
- package/cjs/Popover/Popover.theme.js +25 -0
- package/cjs/Popover/index.js +35 -0
- package/cjs/Progress/Progress.theme.js +38 -0
- package/cjs/Progress/index.js +35 -0
- package/cjs/Progress/index.native.js +35 -0
- package/cjs/RadioGroup/RadioGroup.theme.js +76 -0
- package/cjs/RadioGroup/RadioGroupContext.js +26 -0
- package/cjs/RadioGroup/index.js +27 -0
- package/cjs/RadioGroup/index.native.js +27 -0
- package/cjs/Rating/Rating.theme.js +31 -0
- package/cjs/Rating/index.js +35 -0
- package/cjs/Rating/index.native.js +35 -0
- package/cjs/Result/Result.theme.js +25 -0
- package/cjs/Result/index.native.js +41 -0
- package/cjs/Skeleton/Skeleton.theme.js +42 -0
- package/cjs/Skeleton/index.js +35 -0
- package/cjs/Skeleton/index.native.js +35 -0
- package/cjs/Slider/Slider.theme.js +95 -0
- package/cjs/Slider/index.js +35 -0
- package/cjs/Slider/index.native.js +35 -0
- package/cjs/Snackbar/Snackbar.theme.js +81 -0
- package/cjs/Snackbar/index.js +35 -0
- package/cjs/Snackbar/index.native.js +35 -0
- package/cjs/Spinner/Spinner.theme.js +25 -0
- package/cjs/Spinner/index.js +35 -0
- package/cjs/Stepper/Stepper.theme.js +56 -0
- package/cjs/Stepper/activeDot.js +25 -0
- package/cjs/Stepper/index.js +26 -0
- package/cjs/Stepper/index.native.js +26 -0
- package/cjs/Tag/Tag.theme.js +58 -0
- package/cjs/Tag/index.js +37 -0
- package/cjs/Tag/index.native.js +37 -0
- package/cjs/Text/Text.theme.js +93 -0
- package/cjs/Text/index.js +39 -0
- package/cjs/Text/index.native.js +39 -0
- package/cjs/Text/sharedTextStyle.js +64 -0
- package/cjs/Text/textStyle.android.js +57 -0
- package/cjs/Text/textStyle.ios.js +39 -0
- package/cjs/Text/textStyle.web.js +47 -0
- package/cjs/TextArea/TextArea.theme.js +36 -0
- package/cjs/TextArea/index.js +35 -0
- package/cjs/TextArea/index.native.js +35 -0
- package/cjs/Theme/Provider/Provider.js +103 -0
- package/cjs/Theme/Provider/index.js +30 -0
- package/cjs/Theme/Provider/index.native.js +35 -0
- package/cjs/Theme/Provider/native/index.js +35 -0
- package/cjs/Theme/Provider/web/FontLoader.js +51 -0
- package/cjs/Theme/Provider/web/FontLoader.test.js +39 -0
- package/cjs/Theme/Provider/web/GlobalStyle.js +38 -0
- package/cjs/Theme/Provider/web/GlobalStyle.test.js +44 -0
- package/cjs/Theme/Provider/web/ThemeProvider.js +78 -0
- package/cjs/Theme/Provider/web/expectCssMatches.js +34 -0
- package/cjs/Theme/Provider/web/index.js +41 -0
- package/cjs/Theme/helpers/themeGenerator/index.js +35 -0
- package/cjs/Theme/helpers/themeGenerator/themeGenerator.js +33 -0
- package/cjs/Theme/helpers/themeGenerator/themeGenerator.test.js +43 -0
- package/cjs/Theme/helpers/themeReader/base.test.js +96 -0
- package/cjs/Theme/helpers/themeReader/index.js +56 -0
- package/cjs/Theme/helpers/themeReader/native/native.test.js +61 -0
- package/cjs/Theme/helpers/themeReader/web/web.test.js +55 -0
- package/cjs/Theme/index.js +48 -0
- package/cjs/Theme/index.native.js +46 -0
- package/cjs/Theme/theme/componentThemes.js +112 -0
- package/cjs/Theme/theme/index.js +35 -0
- package/cjs/Theme/theme/theme.js +109 -0
- package/cjs/hooks/index.js +26 -0
- package/cjs/hooks/useCombinedRefs.js +44 -0
- package/cjs/hooks/useKeyPress.js +50 -0
- package/cjs/hooks/usePortal.js +63 -0
- package/cjs/index.js +164 -0
- package/cjs/index.native.js +122 -0
- package/cjs/shared/HiddenInput.js +45 -0
- package/cjs/shared/index.js +49 -0
- package/cjs/shared/index.native.js +36 -0
- package/cjs/shared/propTypes/charLength.js +36 -0
- package/cjs/shared/propTypes/deprecated.js +34 -0
- package/cjs/shared/propTypes/index.js +50 -0
- package/cjs/shared/propTypes/limitChildren.js +35 -0
- package/cjs/shared/propTypes/max.js +35 -0
- package/cjs/shared/propTypes/typeof.js +47 -0
- package/esm/Accordion/Accordion.theme.js +26 -0
- package/esm/Accordion/index.js +5 -0
- package/esm/ActionRequirement/ActionRequirement.theme.js +5 -0
- package/esm/ActionRequirement/index.js +5 -0
- package/esm/ActionRequirement/index.native.js +5 -0
- package/esm/ActionRequirement/native/ActionRequirement.js +57 -0
- package/esm/ActionRequirement/native/ActionRequirement.test.js +49 -0
- package/esm/ActionRequirement/native/ActionRequirementStyles.js +69 -0
- package/esm/ActionRequirement/native/index.js +13 -0
- package/esm/AutoComplete/AutoComplete.theme.js +49 -0
- package/esm/AutoComplete/index.js +5 -0
- package/esm/Avatar/Avatar.theme.js +5 -0
- package/esm/Avatar/index.js +7 -0
- package/esm/Avatar/index.native.js +7 -0
- package/esm/Avatar/native/Avatar.js +141 -0
- package/esm/Avatar/native/Avatar.test.js +39 -0
- package/esm/Avatar/native/AvatarCircle.js +54 -0
- package/esm/Banner/Banner.theme.js +10 -0
- package/esm/Banner/index.js +5 -0
- package/esm/Banner/index.native.js +5 -0
- package/esm/Banner/native/Banner.js +160 -0
- package/esm/Banner/native/Banner.test.js +113 -0
- package/esm/Banner/native/index.js +5 -0
- package/esm/BottomSheet/BottomSheet.theme.js +24 -0
- package/esm/BottomSheet/index.js +5 -0
- package/esm/Box/index.js +5 -0
- package/esm/Box/index.native.js +5 -0
- package/esm/Box/native/Box.js +7 -0
- package/esm/Box/native/Box.test.js +21 -0
- package/esm/Box/native/index.js +5 -0
- package/esm/Button/Button.theme.js +137 -0
- package/esm/Button/index.js +13 -0
- package/esm/Button/index.native.js +11 -0
- package/esm/Button/native/Button.js +198 -0
- package/esm/Button/native/Button.test.js +342 -0
- package/esm/Button/native/Icon.js +156 -0
- package/esm/Button/native/Link.js +64 -0
- package/esm/Button/native/Text.js +130 -0
- package/esm/Button/native/withTouchable.js +89 -0
- package/esm/Card/Card.native.theme.js +44 -0
- package/esm/Card/Card.theme.js +157 -0
- package/esm/Card/Card.web.theme.js +41 -0
- package/esm/Card/index.js +6 -0
- package/esm/Card/index.native.js +7 -0
- package/esm/Card/native/Card/Actions.js +11 -0
- package/esm/Card/native/Card/Card.js +181 -0
- package/esm/Card/native/Card/Card.test.js +20 -0
- package/esm/Card/native/Card/Content.js +7 -0
- package/esm/Card/native/Card/Header.js +7 -0
- package/esm/Card/native/Card/index.js +11 -0
- package/esm/Card/native/EventCard/EventCard.js +212 -0
- package/esm/Card/native/EventCard/EventCard.test.js +73 -0
- package/esm/Card/native/EventCard/index.js +5 -0
- package/esm/Card/native/GymCard/CheckIn/Avatar.js +47 -0
- package/esm/Card/native/GymCard/CheckIn/CheckIn.js +113 -0
- package/esm/Card/native/GymCard/CheckIn/CheckIn.test.js +46 -0
- package/esm/Card/native/GymCard/CheckIn/Content.js +21 -0
- package/esm/Card/native/GymCard/CheckIn/Header.js +24 -0
- package/esm/Card/native/GymCard/CheckIn/index.js +5 -0
- package/esm/Card/native/GymCard/index.js +8 -0
- package/esm/Card/native/PlanCard/Actions.js +27 -0
- package/esm/Card/native/PlanCard/Content.js +134 -0
- package/esm/Card/native/PlanCard/List.js +113 -0
- package/esm/Card/native/PlanCard/PlanCard.js +114 -0
- package/esm/Card/native/PlanCard/PlanCard.test.js +100 -0
- package/esm/Card/native/PlanCard/Subtitle.js +25 -0
- package/esm/Card/native/PlanCard/Tag.js +62 -0
- package/esm/Card/native/PlanCard/index.js +18 -0
- package/esm/Card/native/index.js +10 -0
- package/esm/Checkbox/CheckIcon.js +5 -0
- package/esm/Checkbox/Checkbox.theme.js +48 -0
- package/esm/Checkbox/CheckboxSwitch.theme.js +70 -0
- package/esm/Checkbox/index.js +6 -0
- package/esm/Checkbox/index.native.js +6 -0
- package/esm/Checkbox/native/Checkbox.js +276 -0
- package/esm/Checkbox/native/Checkbox.test.js +108 -0
- package/esm/Checkbox/native/Switch.js +166 -0
- package/esm/Checkbox/native/Switch.test.js +50 -0
- package/esm/Checkbox/native/index.js +6 -0
- package/esm/Chips/index.js +5 -0
- package/esm/Chips/index.native.js +5 -0
- package/esm/Chips/native/Chips.js +182 -0
- package/esm/Chips/native/Chips.test.js +108 -0
- package/esm/Chips/native/Counter.js +36 -0
- package/esm/Chips/native/index.js +5 -0
- package/esm/Datepicker/Datepicker.theme.js +12 -0
- package/esm/Datepicker/index.js +5 -0
- package/esm/Dialog/Dialog.theme.js +23 -0
- package/esm/Dialog/index.js +5 -0
- package/esm/Divider/Divider.theme.js +5 -0
- package/esm/Divider/index.js +5 -0
- package/esm/Divider/index.native.js +5 -0
- package/esm/Divider/native/Divider.js +33 -0
- package/esm/Divider/native/Divider.test.js +44 -0
- package/esm/Divider/native/index.js +5 -0
- package/esm/Drawer/Drawer.theme.js +15 -0
- package/esm/Drawer/index.js +5 -0
- package/esm/Dropdown/Dropdown.theme.js +185 -0
- package/esm/Dropdown/index.js +5 -0
- package/esm/Dropdown/index.native.js +5 -0
- package/esm/Dropdown/native/Backdrop.js +157 -0
- package/esm/Dropdown/native/Backdrop.test.js +22 -0
- package/esm/Dropdown/native/Dropdown.js +220 -0
- package/esm/Dropdown/native/Dropdown.test.js +76 -0
- package/esm/Dropdown/native/Options.android.js +81 -0
- package/esm/Dropdown/native/Options.ios.js +97 -0
- package/esm/Dropdown/native/index.js +5 -0
- package/esm/Feedback/Feedback.theme.js +9 -0
- package/esm/Feedback/index.js +5 -0
- package/esm/Grid/Grid.theme.js +23 -0
- package/esm/Grid/index.js +7 -0
- package/esm/Header/Header.theme.js +14 -0
- package/esm/Header/index.js +5 -0
- package/esm/Heading/Heading.theme.js +18 -0
- package/esm/Heading/index.js +5 -0
- package/esm/Icon/Icon.js +172 -0
- package/esm/Icon/Icon.theme.js +5 -0
- package/esm/Icon/index.js +5 -0
- package/esm/Icon/index.native.js +5 -0
- package/esm/Icon/native/Icon.test.js +69 -0
- package/esm/Icon/native/index.js +5 -0
- package/esm/Input/Input.theme.js +66 -0
- package/esm/Input/index.js +10 -0
- package/esm/Input/index.native.js +9 -0
- package/esm/Input/native/Email.js +37 -0
- package/esm/Input/native/Email.test.js +14 -0
- package/esm/Input/native/Helper.js +87 -0
- package/esm/Input/native/Input.js +365 -0
- package/esm/Input/native/Input.test.js +132 -0
- package/esm/Input/native/Number.js +29 -0
- package/esm/Input/native/Number.test.js +14 -0
- package/esm/Input/native/Password.js +166 -0
- package/esm/Input/native/Password.test.js +109 -0
- package/esm/Input/native/Tel.js +36 -0
- package/esm/Input/native/Tel.test.js +14 -0
- package/esm/Input/native/index.js +12 -0
- package/esm/List/List.theme.js +29 -0
- package/esm/List/index.js +7 -0
- package/esm/List/index.native.js +6 -0
- package/esm/List/native/List.js +43 -0
- package/esm/List/native/List.test.js +88 -0
- package/esm/List/native/ListItem.js +109 -0
- package/esm/List/native/index.js +6 -0
- package/esm/Menu/Menu.theme.js +43 -0
- package/esm/Menu/index.js +11 -0
- package/esm/Popover/Popover.theme.js +5 -0
- package/esm/Popover/index.js +5 -0
- package/esm/Progress/Progress.theme.js +18 -0
- package/esm/Progress/index.js +5 -0
- package/esm/Progress/index.native.js +5 -0
- package/esm/Progress/native/Progress.js +198 -0
- package/esm/Progress/native/Progress.test.js +134 -0
- package/esm/Progress/native/index.js +5 -0
- package/esm/RadioGroup/RadioGroup.theme.js +56 -0
- package/esm/RadioGroup/RadioGroupContext.js +6 -0
- package/esm/RadioGroup/index.js +7 -0
- package/esm/RadioGroup/index.native.js +7 -0
- package/esm/RadioGroup/native/Button/RadioButton.js +113 -0
- package/esm/RadioGroup/native/Button/RadioButton.test.js +70 -0
- package/esm/RadioGroup/native/Radio/Radio.js +171 -0
- package/esm/RadioGroup/native/Radio/Radio.test.js +74 -0
- package/esm/RadioGroup/native/RadioGroup.js +107 -0
- package/esm/RadioGroup/native/RadioGroup.test.js +56 -0
- package/esm/RadioGroup/native/index.js +8 -0
- package/esm/Rating/Rating.theme.js +11 -0
- package/esm/Rating/index.js +5 -0
- package/esm/Rating/index.native.js +5 -0
- package/esm/Rating/native/Rating.js +197 -0
- package/esm/Rating/native/Rating.test.js +91 -0
- package/esm/Rating/native/index.js +5 -0
- package/esm/Result/Result.theme.js +5 -0
- package/esm/Result/index.native.js +11 -0
- package/esm/Result/native/Attendances.js +54 -0
- package/esm/Result/native/Details.js +130 -0
- package/esm/Result/native/Rate.js +39 -0
- package/esm/Result/native/Result.js +98 -0
- package/esm/Result/native/Result.test.js +128 -0
- package/esm/Result/native/ResultButton.js +20 -0
- package/esm/Result/native/Tags.js +65 -0
- package/esm/Result/native/TinyTextIcon.js +29 -0
- package/esm/Result/native/index.js +5 -0
- package/esm/Skeleton/Skeleton.theme.js +22 -0
- package/esm/Skeleton/index.js +5 -0
- package/esm/Skeleton/index.native.js +5 -0
- package/esm/Skeleton/native/Skeleton.js +142 -0
- package/esm/Skeleton/native/Skeleton.test.js +40 -0
- package/esm/Skeleton/native/index.js +5 -0
- package/esm/Slider/Slider.theme.js +75 -0
- package/esm/Slider/index.js +5 -0
- package/esm/Slider/index.native.js +5 -0
- package/esm/Slider/native/Label.js +33 -0
- package/esm/Slider/native/Marker.js +84 -0
- package/esm/Slider/native/Slider.js +169 -0
- package/esm/Slider/native/Slider.test.js +105 -0
- package/esm/Slider/native/Step.js +27 -0
- package/esm/Slider/native/Tooltip.js +177 -0
- package/esm/Snackbar/Snackbar.theme.js +61 -0
- package/esm/Snackbar/index.js +5 -0
- package/esm/Snackbar/index.native.js +5 -0
- package/esm/Snackbar/native/Snackbar.js +246 -0
- package/esm/Snackbar/native/Snackbar.test.js +108 -0
- package/esm/Snackbar/native/SnackbarAnimationWrapper.js +114 -0
- package/esm/Snackbar/native/index.js +5 -0
- package/esm/Spinner/Spinner.theme.js +5 -0
- package/esm/Spinner/index.js +5 -0
- package/esm/Stepper/Stepper.theme.js +36 -0
- package/esm/Stepper/activeDot.js +5 -0
- package/esm/Stepper/index.js +6 -0
- package/esm/Stepper/index.native.js +6 -0
- package/esm/Stepper/native/Dots.js +75 -0
- package/esm/Stepper/native/Line.js +68 -0
- package/esm/Stepper/native/Step.js +33 -0
- package/esm/Stepper/native/Stepper.js +97 -0
- package/esm/Stepper/native/Stepper.test.js +64 -0
- package/esm/Stepper/native/index.js +6 -0
- package/esm/Tag/Tag.theme.js +38 -0
- package/esm/Tag/index.js +7 -0
- package/esm/Tag/index.native.js +7 -0
- package/esm/Tag/native/Informative.js +127 -0
- package/esm/Tag/native/Tag.js +121 -0
- package/esm/Tag/native/Tag.test.js +74 -0
- package/esm/Tag/native/index.js +5 -0
- package/esm/Text/Text.theme.js +73 -0
- package/esm/Text/index.js +35 -0
- package/esm/Text/index.native.js +35 -0
- package/esm/Text/native/Text.js +123 -0
- package/esm/Text/native/Text.test.js +150 -0
- package/esm/Text/native/index.js +34 -0
- package/esm/Text/sharedTextStyle.js +44 -0
- package/esm/Text/textStyle.android.js +27 -0
- package/esm/Text/textStyle.ios.js +9 -0
- package/esm/Text/textStyle.web.js +17 -0
- package/esm/TextArea/TextArea.theme.js +6 -0
- package/esm/TextArea/index.js +5 -0
- package/esm/TextArea/index.native.js +5 -0
- package/esm/TextArea/native/TextArea.js +64 -0
- package/esm/TextArea/native/TextArea.test.js +12 -0
- package/esm/TextArea/native/index.js +5 -0
- package/esm/Theme/Provider/Provider.js +75 -0
- package/esm/Theme/Provider/index.js +5 -0
- package/esm/Theme/Provider/index.native.js +5 -0
- package/esm/Theme/Provider/native/index.js +5 -0
- package/esm/Theme/Provider/web/FontLoader.js +21 -0
- package/esm/Theme/Provider/web/FontLoader.test.js +16 -0
- package/esm/Theme/Provider/web/GlobalStyle.js +18 -0
- package/esm/Theme/Provider/web/GlobalStyle.test.js +21 -0
- package/esm/Theme/Provider/web/ThemeProvider.js +50 -0
- package/esm/Theme/Provider/web/expectCssMatches.js +14 -0
- package/esm/Theme/Provider/web/index.js +6 -0
- package/esm/Theme/helpers/themeGenerator/index.js +5 -0
- package/esm/Theme/helpers/themeGenerator/themeGenerator.js +13 -0
- package/esm/Theme/helpers/themeGenerator/themeGenerator.test.js +20 -0
- package/esm/Theme/helpers/themeReader/base.test.js +73 -0
- package/esm/Theme/helpers/themeReader/index.js +26 -0
- package/esm/Theme/helpers/themeReader/native/native.test.js +38 -0
- package/esm/Theme/helpers/themeReader/web/web.test.js +32 -0
- package/esm/Theme/index.js +11 -0
- package/esm/Theme/index.native.js +10 -0
- package/esm/Theme/theme/componentThemes.js +82 -0
- package/esm/Theme/theme/index.js +5 -0
- package/esm/Theme/theme/theme.js +81 -0
- package/esm/hooks/index.js +3 -0
- package/esm/hooks/useCombinedRefs.js +20 -0
- package/esm/hooks/useKeyPress.js +26 -0
- package/esm/hooks/usePortal.js +39 -0
- package/esm/index.js +90 -0
- package/esm/index.native.js +58 -0
- package/esm/shared/HiddenInput.js +15 -0
- package/esm/shared/index.js +16 -0
- package/esm/shared/index.native.js +14 -0
- package/esm/shared/propTypes/charLength.js +16 -0
- package/esm/shared/propTypes/deprecated.js +14 -0
- package/esm/shared/propTypes/index.js +12 -0
- package/esm/shared/propTypes/limitChildren.js +15 -0
- package/esm/shared/propTypes/max.js +15 -0
- package/esm/shared/propTypes/typeof.js +17 -0
- package/package.json +2 -2
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { render } from "@testing-library/react-native";
|
|
4
|
+
import ThemeProvider from "../../../../Theme";
|
|
5
|
+
import GymCard from "..";
|
|
6
|
+
describe("<GymCard.CheckIn />", () => {
|
|
7
|
+
describe("Snapshots", () => {
|
|
8
|
+
const data = {
|
|
9
|
+
name: "Foo",
|
|
10
|
+
distance: "100 m",
|
|
11
|
+
rating: 5,
|
|
12
|
+
address: "Bar"
|
|
13
|
+
};
|
|
14
|
+
it("should match snapshot without avatar", () => {
|
|
15
|
+
const { toJSON } = render(
|
|
16
|
+
/* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(
|
|
17
|
+
GymCard.CheckIn,
|
|
18
|
+
{
|
|
19
|
+
name: data.name,
|
|
20
|
+
distance: data.distance,
|
|
21
|
+
rating: data.rating,
|
|
22
|
+
address: data.address
|
|
23
|
+
}
|
|
24
|
+
) })
|
|
25
|
+
);
|
|
26
|
+
expect(toJSON()).toMatchSnapshot();
|
|
27
|
+
});
|
|
28
|
+
it("should match snapshot with avatar", () => {
|
|
29
|
+
const { toJSON } = render(
|
|
30
|
+
/* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(
|
|
31
|
+
GymCard.CheckIn,
|
|
32
|
+
{
|
|
33
|
+
avatar: {
|
|
34
|
+
uri: "data:image/png;base64,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"
|
|
35
|
+
},
|
|
36
|
+
name: data.name,
|
|
37
|
+
distance: data.distance,
|
|
38
|
+
rating: data.rating,
|
|
39
|
+
address: data.address
|
|
40
|
+
}
|
|
41
|
+
) })
|
|
42
|
+
);
|
|
43
|
+
expect(toJSON()).toMatchSnapshot();
|
|
44
|
+
});
|
|
45
|
+
});
|
|
46
|
+
});
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import styled from "styled-components";
|
|
2
|
+
import Card from "../../Card";
|
|
3
|
+
const Content = styled(Card.Content)`
|
|
4
|
+
${({
|
|
5
|
+
theme: {
|
|
6
|
+
yoga: {
|
|
7
|
+
components: {
|
|
8
|
+
card: {
|
|
9
|
+
gym: { checkIn }
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
}) => `
|
|
15
|
+
margin-top: ${checkIn.content.margin.top}px;
|
|
16
|
+
`}
|
|
17
|
+
`;
|
|
18
|
+
var Content_default = Content;
|
|
19
|
+
export {
|
|
20
|
+
Content_default as default
|
|
21
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import styled from "styled-components";
|
|
2
|
+
import Card from "../../Card";
|
|
3
|
+
const Header = styled(Card.Header)`
|
|
4
|
+
flex-direction: row;
|
|
5
|
+
justify-content: space-between;
|
|
6
|
+
|
|
7
|
+
${({
|
|
8
|
+
theme: {
|
|
9
|
+
yoga: {
|
|
10
|
+
components: {
|
|
11
|
+
card: {
|
|
12
|
+
gym: { checkIn }
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}) => `
|
|
18
|
+
margin-bottom: ${checkIn.header.margin.bottom}px;
|
|
19
|
+
`}
|
|
20
|
+
`;
|
|
21
|
+
var Header_default = Header;
|
|
22
|
+
export {
|
|
23
|
+
Header_default as default
|
|
24
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import styled from "styled-components";
|
|
2
|
+
import Actions from "../Card/Actions";
|
|
3
|
+
import Button from "../../../Button";
|
|
4
|
+
import theme from "../../../Theme/helpers/themeReader";
|
|
5
|
+
const {
|
|
6
|
+
components: { cardnative, card }
|
|
7
|
+
} = theme;
|
|
8
|
+
const PlanCardButton = styled(Button).attrs({
|
|
9
|
+
full: true
|
|
10
|
+
})``;
|
|
11
|
+
const PlanCardButtonText = styled(Button.Text).attrs({
|
|
12
|
+
full: true
|
|
13
|
+
})`
|
|
14
|
+
margin-top: ${cardnative.plan.actions.buttonText.margin.top}px;
|
|
15
|
+
margin-bottom: ${card.plan.actions.buttonText.margin.bottom}px;
|
|
16
|
+
`;
|
|
17
|
+
const PlanCardActions = styled(Actions)`
|
|
18
|
+
margin-top: ${cardnative.plan.actions.margin.top}px;
|
|
19
|
+
`;
|
|
20
|
+
PlanCardActions.displayName = "PlanCard.Actions";
|
|
21
|
+
PlanCardButton.displayName = "PlanCard.Button";
|
|
22
|
+
PlanCardButtonText.displayName = "PlanCard.ButtonText";
|
|
23
|
+
export {
|
|
24
|
+
PlanCardActions as Actions,
|
|
25
|
+
PlanCardButton as Button,
|
|
26
|
+
PlanCardButtonText as ButtonText
|
|
27
|
+
};
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defProps = Object.defineProperties;
|
|
3
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
+
var __spreadValues = (a, b) => {
|
|
9
|
+
for (var prop in b || (b = {}))
|
|
10
|
+
if (__hasOwnProp.call(b, prop))
|
|
11
|
+
__defNormalProp(a, prop, b[prop]);
|
|
12
|
+
if (__getOwnPropSymbols)
|
|
13
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
+
if (__propIsEnum.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
16
|
+
}
|
|
17
|
+
return a;
|
|
18
|
+
};
|
|
19
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
+
var __objRest = (source, exclude) => {
|
|
21
|
+
var target = {};
|
|
22
|
+
for (var prop in source)
|
|
23
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
24
|
+
target[prop] = source[prop];
|
|
25
|
+
if (source != null && __getOwnPropSymbols)
|
|
26
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
27
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
28
|
+
target[prop] = source[prop];
|
|
29
|
+
}
|
|
30
|
+
return target;
|
|
31
|
+
};
|
|
32
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
33
|
+
import React from "react";
|
|
34
|
+
import styled, { css } from "styled-components";
|
|
35
|
+
import { string, node } from "prop-types";
|
|
36
|
+
import Content from "../Card/Content";
|
|
37
|
+
import Text from "../../../Text";
|
|
38
|
+
import theme from "../../../Theme/helpers/themeReader";
|
|
39
|
+
import Subtitle from "./Subtitle";
|
|
40
|
+
import Divider from "../../../Divider";
|
|
41
|
+
const Title = styled(Text.Medium)`
|
|
42
|
+
${(props) => {
|
|
43
|
+
const {
|
|
44
|
+
components: { cardnative, card }
|
|
45
|
+
} = theme(props);
|
|
46
|
+
return css`
|
|
47
|
+
color: ${card.plan.title.color};
|
|
48
|
+
margin-bottom: ${cardnative.plan.title.margin.bottom}px;
|
|
49
|
+
line-height: ${cardnative.plan.title.lineHeight}px;
|
|
50
|
+
`;
|
|
51
|
+
}}
|
|
52
|
+
`;
|
|
53
|
+
const Description = styled(Text.Small)`
|
|
54
|
+
height: 40px;
|
|
55
|
+
|
|
56
|
+
color: ${theme.components.card.plan.description.color};
|
|
57
|
+
`;
|
|
58
|
+
const Price = styled.View`
|
|
59
|
+
flex-direction: row;
|
|
60
|
+
|
|
61
|
+
${(props) => {
|
|
62
|
+
const {
|
|
63
|
+
components: {
|
|
64
|
+
cardnative: { plan }
|
|
65
|
+
}
|
|
66
|
+
} = theme(props);
|
|
67
|
+
return css`
|
|
68
|
+
margin-bottom: ${plan.price.margin.bottom}px;
|
|
69
|
+
`;
|
|
70
|
+
}}
|
|
71
|
+
`;
|
|
72
|
+
const EnhancePrice = styled.View`
|
|
73
|
+
align-self: center;
|
|
74
|
+
`;
|
|
75
|
+
const PlanCardContent = (_a) => {
|
|
76
|
+
var _b = _a, {
|
|
77
|
+
title,
|
|
78
|
+
subtitle,
|
|
79
|
+
description,
|
|
80
|
+
currency,
|
|
81
|
+
suffix,
|
|
82
|
+
price,
|
|
83
|
+
period,
|
|
84
|
+
children
|
|
85
|
+
} = _b, rest = __objRest(_b, [
|
|
86
|
+
"title",
|
|
87
|
+
"subtitle",
|
|
88
|
+
"description",
|
|
89
|
+
"currency",
|
|
90
|
+
"suffix",
|
|
91
|
+
"price",
|
|
92
|
+
"period",
|
|
93
|
+
"children"
|
|
94
|
+
]);
|
|
95
|
+
return /* @__PURE__ */ jsxs(Content, __spreadProps(__spreadValues({}, rest), { children: [
|
|
96
|
+
subtitle && /* @__PURE__ */ jsx(Subtitle, { children: subtitle }),
|
|
97
|
+
title && /* @__PURE__ */ jsx(Title, { children: title }),
|
|
98
|
+
description && /* @__PURE__ */ jsx(Description, { numberOfLines: 2, children: description }),
|
|
99
|
+
/* @__PURE__ */ jsxs(Price, { children: [
|
|
100
|
+
currency && /* @__PURE__ */ jsx(Text.H4, { children: currency }),
|
|
101
|
+
price && /* @__PURE__ */ jsx(Text.H4, { children: price }),
|
|
102
|
+
suffix && /* @__PURE__ */ jsx(Text.H4, { children: suffix }),
|
|
103
|
+
period && /* @__PURE__ */ jsx(EnhancePrice, { children: /* @__PURE__ */ jsx(Text.Medium, { children: `${period}` }) })
|
|
104
|
+
] }),
|
|
105
|
+
/* @__PURE__ */ jsx(Divider, {}),
|
|
106
|
+
children
|
|
107
|
+
] }));
|
|
108
|
+
};
|
|
109
|
+
PlanCardContent.propTypes = {
|
|
110
|
+
/** plan name */
|
|
111
|
+
title: string.isRequired,
|
|
112
|
+
/** currency of the current country */
|
|
113
|
+
currency: string,
|
|
114
|
+
/** suffix currency of the current country */
|
|
115
|
+
suffix: string,
|
|
116
|
+
price: string.isRequired,
|
|
117
|
+
/** period that this price will be charged */
|
|
118
|
+
period: string.isRequired,
|
|
119
|
+
description: string,
|
|
120
|
+
subtitle: string,
|
|
121
|
+
children: node
|
|
122
|
+
};
|
|
123
|
+
PlanCardContent.defaultProps = {
|
|
124
|
+
children: null,
|
|
125
|
+
description: null,
|
|
126
|
+
subtitle: null,
|
|
127
|
+
currency: null,
|
|
128
|
+
suffix: null
|
|
129
|
+
};
|
|
130
|
+
PlanCardContent.displayName = "PlanCard.Content";
|
|
131
|
+
var Content_default = PlanCardContent;
|
|
132
|
+
export {
|
|
133
|
+
Content_default as default
|
|
134
|
+
};
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defProps = Object.defineProperties;
|
|
3
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
+
var __spreadValues = (a, b) => {
|
|
9
|
+
for (var prop in b || (b = {}))
|
|
10
|
+
if (__hasOwnProp.call(b, prop))
|
|
11
|
+
__defNormalProp(a, prop, b[prop]);
|
|
12
|
+
if (__getOwnPropSymbols)
|
|
13
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
+
if (__propIsEnum.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
16
|
+
}
|
|
17
|
+
return a;
|
|
18
|
+
};
|
|
19
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
+
var __objRest = (source, exclude) => {
|
|
21
|
+
var target = {};
|
|
22
|
+
for (var prop in source)
|
|
23
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
24
|
+
target[prop] = source[prop];
|
|
25
|
+
if (source != null && __getOwnPropSymbols)
|
|
26
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
27
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
28
|
+
target[prop] = source[prop];
|
|
29
|
+
}
|
|
30
|
+
return target;
|
|
31
|
+
};
|
|
32
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
33
|
+
import React, { isValidElement } from "react";
|
|
34
|
+
import styled, { withTheme } from "styled-components";
|
|
35
|
+
import { TouchableWithoutFeedback } from "react-native";
|
|
36
|
+
import { string, node, shape, oneOfType, func } from "prop-types";
|
|
37
|
+
import get from "lodash.get";
|
|
38
|
+
import Text from "../../../Text";
|
|
39
|
+
import Icon from "../../../Icon";
|
|
40
|
+
import theme from "../../../Theme/helpers/themeReader";
|
|
41
|
+
const { card, cardnative } = theme.components;
|
|
42
|
+
const List = styled.View`
|
|
43
|
+
margin-top: ${cardnative.plan.list.margin.top}px;
|
|
44
|
+
`;
|
|
45
|
+
const Item = styled.View`
|
|
46
|
+
margin-bottom: ${card.plan.list.item.margin.bottom}px;
|
|
47
|
+
`;
|
|
48
|
+
const Wrapper = styled.View`
|
|
49
|
+
flex-direction: row;
|
|
50
|
+
align-items: center;
|
|
51
|
+
`;
|
|
52
|
+
const IconWrapper = styled.View`
|
|
53
|
+
margin-right: ${cardnative.plan.list.item.icon.margin.right}px;
|
|
54
|
+
`;
|
|
55
|
+
const Button = styled.View`
|
|
56
|
+
margin-top: ${card.plan.list.button.margin.top}px;
|
|
57
|
+
`;
|
|
58
|
+
const ButtonText = styled(Text.Medium)`
|
|
59
|
+
font-size: ${card.plan.list.button.font.size}px;
|
|
60
|
+
color: ${card.plan.list.button.font.color};
|
|
61
|
+
`;
|
|
62
|
+
const ItemText = styled(Text.Small)`
|
|
63
|
+
color: ${({ color }) => color || card.plan.list.item.font.color};
|
|
64
|
+
`;
|
|
65
|
+
const ListItem = withTheme(
|
|
66
|
+
(_a) => {
|
|
67
|
+
var {
|
|
68
|
+
text,
|
|
69
|
+
variant,
|
|
70
|
+
theme: yogaTheme,
|
|
71
|
+
icon,
|
|
72
|
+
buttonProps: _b
|
|
73
|
+
} = _a, _c = _b, { children } = _c, buttonProps = __objRest(_c, ["children"]);
|
|
74
|
+
const itemColor = get(yogaTheme.yoga.colors, variant);
|
|
75
|
+
if (variant && !itemColor)
|
|
76
|
+
console.warn(
|
|
77
|
+
`Invalid token ${variant}, you can use ${JSON.stringify(
|
|
78
|
+
Object.keys(yogaTheme.yoga.colors)
|
|
79
|
+
)}`
|
|
80
|
+
);
|
|
81
|
+
return /* @__PURE__ */ jsxs(Item, { children: [
|
|
82
|
+
/* @__PURE__ */ jsxs(Wrapper, { children: [
|
|
83
|
+
icon && /* @__PURE__ */ jsx(IconWrapper, { children: isValidElement(icon) ? icon : /* @__PURE__ */ jsx(Icon, { as: icon, size: "small", fill: variant || "text.primary" }) }),
|
|
84
|
+
/* @__PURE__ */ jsx(ItemText, { color: itemColor, children: text })
|
|
85
|
+
] }),
|
|
86
|
+
Boolean(Object.keys(buttonProps).length) && /* @__PURE__ */ jsx(TouchableWithoutFeedback, __spreadProps(__spreadValues({}, buttonProps), { children: /* @__PURE__ */ jsx(Button, { children: /* @__PURE__ */ jsx(ButtonText, { children }) }) }))
|
|
87
|
+
] });
|
|
88
|
+
}
|
|
89
|
+
);
|
|
90
|
+
List.displayName = "PlanCard.List";
|
|
91
|
+
ListItem.displayName = "PlanCard.ListItem";
|
|
92
|
+
Button.displayName = "PlanCard.ListButton";
|
|
93
|
+
ListItem.propTypes = {
|
|
94
|
+
text: string.isRequired,
|
|
95
|
+
/** an icon to be displayed on the begin of the item */
|
|
96
|
+
icon: oneOfType([node, func]),
|
|
97
|
+
/** if provided displays a button below the item text. It accepts all button
|
|
98
|
+
* element props */
|
|
99
|
+
buttonProps: shape({}),
|
|
100
|
+
/** if provided a color variant, like "vibin", "hope", "energy" the icon and
|
|
101
|
+
* the item text will be rendered on this color.
|
|
102
|
+
*/
|
|
103
|
+
variant: string
|
|
104
|
+
};
|
|
105
|
+
ListItem.defaultProps = {
|
|
106
|
+
icon: void 0,
|
|
107
|
+
buttonProps: {},
|
|
108
|
+
variant: void 0
|
|
109
|
+
};
|
|
110
|
+
export {
|
|
111
|
+
List,
|
|
112
|
+
ListItem
|
|
113
|
+
};
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defProps = Object.defineProperties;
|
|
3
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
+
var __spreadValues = (a, b) => {
|
|
9
|
+
for (var prop in b || (b = {}))
|
|
10
|
+
if (__hasOwnProp.call(b, prop))
|
|
11
|
+
__defNormalProp(a, prop, b[prop]);
|
|
12
|
+
if (__getOwnPropSymbols)
|
|
13
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
+
if (__propIsEnum.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
16
|
+
}
|
|
17
|
+
return a;
|
|
18
|
+
};
|
|
19
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
+
var __objRest = (source, exclude) => {
|
|
21
|
+
var target = {};
|
|
22
|
+
for (var prop in source)
|
|
23
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
24
|
+
target[prop] = source[prop];
|
|
25
|
+
if (source != null && __getOwnPropSymbols)
|
|
26
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
27
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
28
|
+
target[prop] = source[prop];
|
|
29
|
+
}
|
|
30
|
+
return target;
|
|
31
|
+
};
|
|
32
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
33
|
+
import React from "react";
|
|
34
|
+
import styled, { css } from "styled-components";
|
|
35
|
+
import { node, oneOf } from "prop-types";
|
|
36
|
+
import Box from "../../../Box";
|
|
37
|
+
const PLAN_LINE_HEIGHT = 8;
|
|
38
|
+
const Plan = styled(Box)`
|
|
39
|
+
max-width: 312px;
|
|
40
|
+
width: 100%;
|
|
41
|
+
position: relative;
|
|
42
|
+
overflow: hidden;
|
|
43
|
+
|
|
44
|
+
${(props) => {
|
|
45
|
+
const theme = props.theme.yoga;
|
|
46
|
+
const { plan } = theme.components.card;
|
|
47
|
+
return css`
|
|
48
|
+
padding: ${plan.padding.top}px ${plan.padding.right}px
|
|
49
|
+
${plan.padding.bottom}px ${plan.padding.left}px;
|
|
50
|
+
border: ${theme.borders.small}px solid ${theme.colors.light};
|
|
51
|
+
border-radius: ${plan.radius}px;
|
|
52
|
+
|
|
53
|
+
background-color: ${theme.colors.white};
|
|
54
|
+
`;
|
|
55
|
+
}}
|
|
56
|
+
`;
|
|
57
|
+
const Border = styled.View`
|
|
58
|
+
position: absolute;
|
|
59
|
+
top: 0;
|
|
60
|
+
left: 0;
|
|
61
|
+
right: 0;
|
|
62
|
+
|
|
63
|
+
height: 8px;
|
|
64
|
+
background-color: ${({
|
|
65
|
+
variant,
|
|
66
|
+
theme: {
|
|
67
|
+
yoga: {
|
|
68
|
+
colors: { deepPurple, [variant]: color = deepPurple }
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}) => color};
|
|
72
|
+
`;
|
|
73
|
+
const PlanCard = (_a) => {
|
|
74
|
+
var _b = _a, { children, variant } = _b, rest = __objRest(_b, ["children", "variant"]);
|
|
75
|
+
return /* @__PURE__ */ jsx(Box, { children: /* @__PURE__ */ jsxs(Plan, __spreadProps(__spreadValues({}, rest), { children: [
|
|
76
|
+
/* @__PURE__ */ jsx(Border, { variant }),
|
|
77
|
+
children
|
|
78
|
+
] })) });
|
|
79
|
+
};
|
|
80
|
+
PlanCard.propTypes = {
|
|
81
|
+
children: node,
|
|
82
|
+
/** style the card border top color following the theme (primary, secondary,
|
|
83
|
+
* vibin, hope, energy, relax, peace, verve, uplift, deepPurple, deep,
|
|
84
|
+
* stamina, dark, medium, light, clear, white) */
|
|
85
|
+
variant: oneOf([
|
|
86
|
+
"primary",
|
|
87
|
+
"secondary",
|
|
88
|
+
"vibin",
|
|
89
|
+
"hope",
|
|
90
|
+
"energy",
|
|
91
|
+
"relax",
|
|
92
|
+
"peace",
|
|
93
|
+
"verve",
|
|
94
|
+
"uplift",
|
|
95
|
+
"deepPurple",
|
|
96
|
+
"stamina",
|
|
97
|
+
"dark",
|
|
98
|
+
"medium",
|
|
99
|
+
"deep",
|
|
100
|
+
"light",
|
|
101
|
+
"clear",
|
|
102
|
+
"white"
|
|
103
|
+
])
|
|
104
|
+
};
|
|
105
|
+
PlanCard.defaultProps = {
|
|
106
|
+
children: void 0,
|
|
107
|
+
variant: "deepPurple"
|
|
108
|
+
};
|
|
109
|
+
PlanCard.displayName = "PlanCard";
|
|
110
|
+
var PlanCard_default = PlanCard;
|
|
111
|
+
export {
|
|
112
|
+
PLAN_LINE_HEIGHT,
|
|
113
|
+
PlanCard_default as default
|
|
114
|
+
};
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { render, fireEvent } from "@testing-library/react-native";
|
|
4
|
+
import { Star, MapPin } from "@gympass/yoga-icons";
|
|
5
|
+
import { ThemeProvider, Button, Icon } from "../../..";
|
|
6
|
+
import PlanCard from ".";
|
|
7
|
+
describe("<PlanCard />", () => {
|
|
8
|
+
const buttonOnPressMock = jest.fn();
|
|
9
|
+
const renderPlan = () => render(
|
|
10
|
+
/* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsxs(PlanCard, { children: [
|
|
11
|
+
/* @__PURE__ */ jsx(PlanCard.Tag, { variant: "informative", children: "Recommended Plan" }),
|
|
12
|
+
/* @__PURE__ */ jsxs(
|
|
13
|
+
PlanCard.Content,
|
|
14
|
+
{
|
|
15
|
+
subtitle: "plan",
|
|
16
|
+
title: "Basic",
|
|
17
|
+
currency: "$",
|
|
18
|
+
price: "99.90",
|
|
19
|
+
period: "/month",
|
|
20
|
+
children: [
|
|
21
|
+
/* @__PURE__ */ jsx(PlanCard.Subtitle, { children: "Get access to" }),
|
|
22
|
+
/* @__PURE__ */ jsxs(PlanCard.List, { children: [
|
|
23
|
+
/* @__PURE__ */ jsx(
|
|
24
|
+
PlanCard.ListItem,
|
|
25
|
+
{
|
|
26
|
+
icon: /* @__PURE__ */ jsx(
|
|
27
|
+
Icon,
|
|
28
|
+
{
|
|
29
|
+
as: MapPin,
|
|
30
|
+
height: "small",
|
|
31
|
+
width: "small",
|
|
32
|
+
stroke: "medium"
|
|
33
|
+
}
|
|
34
|
+
),
|
|
35
|
+
text: "gyms and studios"
|
|
36
|
+
}
|
|
37
|
+
),
|
|
38
|
+
/* @__PURE__ */ jsx(
|
|
39
|
+
PlanCard.ListItem,
|
|
40
|
+
{
|
|
41
|
+
icon: Star,
|
|
42
|
+
text: "list item",
|
|
43
|
+
buttonProps: {
|
|
44
|
+
children: "button",
|
|
45
|
+
onPress: buttonOnPressMock
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
)
|
|
49
|
+
] })
|
|
50
|
+
]
|
|
51
|
+
}
|
|
52
|
+
),
|
|
53
|
+
/* @__PURE__ */ jsx(PlanCard.Actions, { children: /* @__PURE__ */ jsx(Button, { full: true, children: "Select this plan" }) })
|
|
54
|
+
] }) })
|
|
55
|
+
);
|
|
56
|
+
describe("Events", () => {
|
|
57
|
+
it("should call onPress when ListItem has a button", () => {
|
|
58
|
+
const { getByText } = renderPlan();
|
|
59
|
+
fireEvent.press(getByText("button"));
|
|
60
|
+
expect(buttonOnPressMock).toHaveBeenCalled();
|
|
61
|
+
});
|
|
62
|
+
});
|
|
63
|
+
describe("Snapshots", () => {
|
|
64
|
+
it("should match snapshot with default PlanCard", () => {
|
|
65
|
+
const { toJSON } = renderPlan();
|
|
66
|
+
expect(toJSON()).toMatchSnapshot();
|
|
67
|
+
});
|
|
68
|
+
it("should match snapshot with variant", () => {
|
|
69
|
+
const { toJSON } = render(
|
|
70
|
+
/* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(PlanCard, { variant: "hope", children: /* @__PURE__ */ jsx(
|
|
71
|
+
PlanCard.Content,
|
|
72
|
+
{
|
|
73
|
+
subtitle: "plan",
|
|
74
|
+
title: "Basic",
|
|
75
|
+
currency: "$",
|
|
76
|
+
price: "99.90",
|
|
77
|
+
period: "/month"
|
|
78
|
+
}
|
|
79
|
+
) }) })
|
|
80
|
+
);
|
|
81
|
+
expect(toJSON()).toMatchSnapshot();
|
|
82
|
+
});
|
|
83
|
+
it("should match snapshot with suffix", () => {
|
|
84
|
+
const { toJSON } = render(
|
|
85
|
+
/* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(PlanCard, { variant: "hope", children: /* @__PURE__ */ jsx(
|
|
86
|
+
PlanCard.Content,
|
|
87
|
+
{
|
|
88
|
+
subtitle: "plan",
|
|
89
|
+
title: "Basic",
|
|
90
|
+
currency: "$",
|
|
91
|
+
suffix: "MXN",
|
|
92
|
+
price: "99.90",
|
|
93
|
+
period: "/month"
|
|
94
|
+
}
|
|
95
|
+
) }) })
|
|
96
|
+
);
|
|
97
|
+
expect(toJSON()).toMatchSnapshot();
|
|
98
|
+
});
|
|
99
|
+
});
|
|
100
|
+
});
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import styled, { css } from "styled-components";
|
|
2
|
+
import theme from "../../../Theme/helpers/themeReader";
|
|
3
|
+
import Text from "../../../Text";
|
|
4
|
+
const Subtitle = styled(Text.Medium)`
|
|
5
|
+
text-transform: uppercase;
|
|
6
|
+
|
|
7
|
+
${(props) => {
|
|
8
|
+
const {
|
|
9
|
+
components: {
|
|
10
|
+
card: { plan }
|
|
11
|
+
}
|
|
12
|
+
} = theme(props);
|
|
13
|
+
return css`
|
|
14
|
+
margin-bottom: ${plan.subtitle.margin.bottom}px;
|
|
15
|
+
|
|
16
|
+
color: ${plan.subtitle.font.color};
|
|
17
|
+
font-size: ${plan.subtitle.font.size}px;
|
|
18
|
+
`;
|
|
19
|
+
}}
|
|
20
|
+
`;
|
|
21
|
+
Subtitle.displayName = "PlanCard.Subtitle";
|
|
22
|
+
var Subtitle_default = Subtitle;
|
|
23
|
+
export {
|
|
24
|
+
Subtitle_default as default
|
|
25
|
+
};
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defProps = Object.defineProperties;
|
|
3
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
+
var __spreadValues = (a, b) => {
|
|
9
|
+
for (var prop in b || (b = {}))
|
|
10
|
+
if (__hasOwnProp.call(b, prop))
|
|
11
|
+
__defNormalProp(a, prop, b[prop]);
|
|
12
|
+
if (__getOwnPropSymbols)
|
|
13
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
+
if (__propIsEnum.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
16
|
+
}
|
|
17
|
+
return a;
|
|
18
|
+
};
|
|
19
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
+
var __objRest = (source, exclude) => {
|
|
21
|
+
var target = {};
|
|
22
|
+
for (var prop in source)
|
|
23
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
24
|
+
target[prop] = source[prop];
|
|
25
|
+
if (source != null && __getOwnPropSymbols)
|
|
26
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
27
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
28
|
+
target[prop] = source[prop];
|
|
29
|
+
}
|
|
30
|
+
return target;
|
|
31
|
+
};
|
|
32
|
+
import { jsx } from "react/jsx-runtime";
|
|
33
|
+
import React from "react";
|
|
34
|
+
import styled, { css } from "styled-components";
|
|
35
|
+
import { node } from "prop-types";
|
|
36
|
+
import { PLAN_LINE_HEIGHT } from "./PlanCard";
|
|
37
|
+
import Tag from "../../../Tag";
|
|
38
|
+
const StyledTag = styled(Tag.Informative).attrs(() => ({ small: true }))`
|
|
39
|
+
position: absolute;
|
|
40
|
+
align-items: center;
|
|
41
|
+
justify-content: center;
|
|
42
|
+
|
|
43
|
+
${(props) => {
|
|
44
|
+
const { plan } = props.theme.yoga.components.card;
|
|
45
|
+
return css`
|
|
46
|
+
top: ${plan.tag.position.top + PLAN_LINE_HEIGHT}px;
|
|
47
|
+
left: ${plan.tag.position.left}px;
|
|
48
|
+
`;
|
|
49
|
+
}}
|
|
50
|
+
`;
|
|
51
|
+
const PlanCardTag = (_a) => {
|
|
52
|
+
var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
|
|
53
|
+
return /* @__PURE__ */ jsx(StyledTag, __spreadProps(__spreadValues({}, rest), { children }));
|
|
54
|
+
};
|
|
55
|
+
PlanCardTag.displayName = "PlanCard.Tag";
|
|
56
|
+
PlanCardTag.propTypes = {
|
|
57
|
+
children: node.isRequired
|
|
58
|
+
};
|
|
59
|
+
var Tag_default = PlanCardTag;
|
|
60
|
+
export {
|
|
61
|
+
Tag_default as default
|
|
62
|
+
};
|