@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,181 @@
|
|
|
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 from "styled-components";
|
|
35
|
+
import { string, shape, oneOf, node } from "prop-types";
|
|
36
|
+
import Text from "../../../Text";
|
|
37
|
+
import Box from "../../../Box";
|
|
38
|
+
const CardShadow = styled(Box).attrs(
|
|
39
|
+
({
|
|
40
|
+
theme: {
|
|
41
|
+
yoga: {
|
|
42
|
+
components: {
|
|
43
|
+
card: { elevation }
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}) => ({
|
|
48
|
+
elevation
|
|
49
|
+
})
|
|
50
|
+
)``;
|
|
51
|
+
const CardStyled = styled(Box).attrs(
|
|
52
|
+
({
|
|
53
|
+
variant,
|
|
54
|
+
theme: {
|
|
55
|
+
yoga: {
|
|
56
|
+
colors: { [variant]: color },
|
|
57
|
+
components: { card }
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}) => ({
|
|
61
|
+
elevation: card.elevation,
|
|
62
|
+
pt: card.padding.top,
|
|
63
|
+
pr: card.padding.right,
|
|
64
|
+
pb: card.padding.bottom,
|
|
65
|
+
pl: card.padding.left,
|
|
66
|
+
bRadius: card.radii,
|
|
67
|
+
bgColor: variant ? color : card.backgroundColor,
|
|
68
|
+
overflow: "hidden"
|
|
69
|
+
})
|
|
70
|
+
)``;
|
|
71
|
+
const Ribbon = styled.View`
|
|
72
|
+
${({
|
|
73
|
+
variant,
|
|
74
|
+
theme: {
|
|
75
|
+
yoga: {
|
|
76
|
+
components: { card },
|
|
77
|
+
spacing,
|
|
78
|
+
colors: { elements, [variant]: color, white, dark }
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}) => `
|
|
82
|
+
align-self: flex-start;
|
|
83
|
+
|
|
84
|
+
margin-bottom: ${card.padding.bottom}px;
|
|
85
|
+
margin-left: -${card.padding.left}px;
|
|
86
|
+
|
|
87
|
+
padding:
|
|
88
|
+
${spacing.xxxsmall}px
|
|
89
|
+
${spacing.xsmall}px
|
|
90
|
+
${spacing.xxxsmall}px
|
|
91
|
+
${spacing.small}px;
|
|
92
|
+
|
|
93
|
+
border-top-right-radius: ${card.ribbon.radius}px;
|
|
94
|
+
border-bottom-right-radius: ${card.ribbon.radius}px;
|
|
95
|
+
background-color: ${variant ? color : elements.backgroundAndDisabled};
|
|
96
|
+
|
|
97
|
+
color: ${variant ? white : dark};
|
|
98
|
+
`}
|
|
99
|
+
`;
|
|
100
|
+
const RibbonText = styled(Text.Tiny)`
|
|
101
|
+
${({
|
|
102
|
+
variant,
|
|
103
|
+
theme: {
|
|
104
|
+
yoga: {
|
|
105
|
+
colors: { white, dark }
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}) => `
|
|
109
|
+
color: ${variant ? white : dark};
|
|
110
|
+
`}
|
|
111
|
+
`;
|
|
112
|
+
const Card = React.forwardRef((_a, ref) => {
|
|
113
|
+
var _b = _a, { ribbon, children } = _b, rest = __objRest(_b, ["ribbon", "children"]);
|
|
114
|
+
return /* @__PURE__ */ jsx(CardShadow, { children: /* @__PURE__ */ jsxs(CardStyled, __spreadProps(__spreadValues({ ref }, rest), { children: [
|
|
115
|
+
Object.keys(ribbon).length > 0 && /* @__PURE__ */ jsx(Ribbon, { variant: ribbon.variant, children: /* @__PURE__ */ jsx(RibbonText, { variant: ribbon.variant, children: ribbon.text }) }),
|
|
116
|
+
children
|
|
117
|
+
] })) });
|
|
118
|
+
});
|
|
119
|
+
Card.propTypes = {
|
|
120
|
+
/** text: the content inside the Card Ribbon
|
|
121
|
+
* variant: style the card following the theme (primary, secondary, vibin,
|
|
122
|
+
* hope, energy, relax, peace, verve, uplift, deepPurple, deep, stamina, dark,
|
|
123
|
+
* medium, light, clear, white) */
|
|
124
|
+
ribbon: shape({
|
|
125
|
+
text: string,
|
|
126
|
+
variant: oneOf([
|
|
127
|
+
"",
|
|
128
|
+
"primary",
|
|
129
|
+
"secondary",
|
|
130
|
+
"vibin",
|
|
131
|
+
"hope",
|
|
132
|
+
"energy",
|
|
133
|
+
"relax",
|
|
134
|
+
"peace",
|
|
135
|
+
"verve",
|
|
136
|
+
"uplift",
|
|
137
|
+
"deepPurple",
|
|
138
|
+
"stamina",
|
|
139
|
+
"dark",
|
|
140
|
+
"medium",
|
|
141
|
+
"deep",
|
|
142
|
+
"light",
|
|
143
|
+
"clear",
|
|
144
|
+
"white"
|
|
145
|
+
])
|
|
146
|
+
}),
|
|
147
|
+
children: node,
|
|
148
|
+
/** style the card following the theme (primary, secondary, vibin, hope,
|
|
149
|
+
* energy, relax, peace, verve, uplift, deepPurple, deep, stamina, dark,
|
|
150
|
+
* medium, light, clear, white) */
|
|
151
|
+
variant: oneOf([
|
|
152
|
+
"",
|
|
153
|
+
"primary",
|
|
154
|
+
"secondary",
|
|
155
|
+
"vibin",
|
|
156
|
+
"hope",
|
|
157
|
+
"energy",
|
|
158
|
+
"relax",
|
|
159
|
+
"peace",
|
|
160
|
+
"verve",
|
|
161
|
+
"uplift",
|
|
162
|
+
"deepPurple",
|
|
163
|
+
"stamina",
|
|
164
|
+
"dark",
|
|
165
|
+
"medium",
|
|
166
|
+
"deep",
|
|
167
|
+
"light",
|
|
168
|
+
"clear",
|
|
169
|
+
"white"
|
|
170
|
+
])
|
|
171
|
+
};
|
|
172
|
+
Card.defaultProps = {
|
|
173
|
+
ribbon: {},
|
|
174
|
+
children: null,
|
|
175
|
+
variant: ""
|
|
176
|
+
};
|
|
177
|
+
Card.displayName = "Card";
|
|
178
|
+
var Card_default = Card;
|
|
179
|
+
export {
|
|
180
|
+
Card_default as default
|
|
181
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { render } from "@testing-library/react-native";
|
|
4
|
+
import { Text } from "react-native";
|
|
5
|
+
import { ThemeProvider, Button } from "../../..";
|
|
6
|
+
import Card from ".";
|
|
7
|
+
describe("<Card />", () => {
|
|
8
|
+
describe("Snapshots", () => {
|
|
9
|
+
it("should match snapshot with default Card", () => {
|
|
10
|
+
const { toJSON } = render(
|
|
11
|
+
/* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsxs(Card, { children: [
|
|
12
|
+
/* @__PURE__ */ jsx(Card.Header, { children: /* @__PURE__ */ jsx(Text, { children: "Hello World" }) }),
|
|
13
|
+
/* @__PURE__ */ jsx(Card.Content, { children: /* @__PURE__ */ jsx(Text, { children: "It's fine here" }) }),
|
|
14
|
+
/* @__PURE__ */ jsx(Card.Actions, { children: /* @__PURE__ */ jsx(Button, { children: "Action's children must be Button" }) })
|
|
15
|
+
] }) })
|
|
16
|
+
);
|
|
17
|
+
expect(toJSON()).toMatchSnapshot();
|
|
18
|
+
});
|
|
19
|
+
});
|
|
20
|
+
});
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import Card from "./Card";
|
|
2
|
+
import Header from "./Header";
|
|
3
|
+
import Content from "./Content";
|
|
4
|
+
import Actions from "./Actions";
|
|
5
|
+
Card.Header = Header;
|
|
6
|
+
Card.Content = Content;
|
|
7
|
+
Card.Actions = Actions;
|
|
8
|
+
var Card_default = Card;
|
|
9
|
+
export {
|
|
10
|
+
Card_default as default
|
|
11
|
+
};
|
|
@@ -0,0 +1,212 @@
|
|
|
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 { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
33
|
+
import React from "react";
|
|
34
|
+
import styled, { withTheme, css } from "styled-components";
|
|
35
|
+
import { shape, string, bool, oneOfType, func } from "prop-types";
|
|
36
|
+
import { Time } from "@gympass/yoga-icons";
|
|
37
|
+
import { TouchableWithoutFeedback } from "react-native";
|
|
38
|
+
import theme from "../../../Theme/helpers/themeReader";
|
|
39
|
+
import Card from "../Card";
|
|
40
|
+
import Text from "../../../Text";
|
|
41
|
+
import Box from "../../../Box";
|
|
42
|
+
import Button from "../../../Button";
|
|
43
|
+
const { spacing, radii, lineHeights } = theme;
|
|
44
|
+
const Event = styled(Card)`
|
|
45
|
+
flex-direction: row;
|
|
46
|
+
height: 104px;
|
|
47
|
+
border-radius: ${radii.regular}px;
|
|
48
|
+
padding: ${spacing.zero};
|
|
49
|
+
width: 280px;
|
|
50
|
+
margin-right: ${spacing.xxsmall};
|
|
51
|
+
${({ small }) => small ? css`
|
|
52
|
+
width: ${spacing.xxxlarge}px;
|
|
53
|
+
` : ""}
|
|
54
|
+
`;
|
|
55
|
+
const DateInfo = styled(Box)`
|
|
56
|
+
justify-content: center;
|
|
57
|
+
align-items: center;
|
|
58
|
+
width: 56px;
|
|
59
|
+
`;
|
|
60
|
+
const EventInfo = styled(Box)`
|
|
61
|
+
flex: 1;
|
|
62
|
+
`;
|
|
63
|
+
const Top = styled(Box)`
|
|
64
|
+
justify-content: center;
|
|
65
|
+
align-items: center;
|
|
66
|
+
height: ${spacing.small}px;
|
|
67
|
+
`;
|
|
68
|
+
const Name = styled(Text.Medium)`
|
|
69
|
+
margin-bottom: ${spacing.xxxsmall}px;
|
|
70
|
+
line-height: ${lineHeights.small}px;
|
|
71
|
+
`;
|
|
72
|
+
const Place = styled(Text.Tiny)`
|
|
73
|
+
width: 180px;
|
|
74
|
+
margin-bottom: ${spacing.xsmall}px;
|
|
75
|
+
`;
|
|
76
|
+
const Day = styled(Text.H5)`
|
|
77
|
+
margin-top: ${spacing.xxxsmall}px;
|
|
78
|
+
margin-bottom: ${spacing.xxxsmall}px;
|
|
79
|
+
`;
|
|
80
|
+
const getIndicatorColor = (active, event) => {
|
|
81
|
+
if (active)
|
|
82
|
+
return "white";
|
|
83
|
+
return event ? "primary" : "light";
|
|
84
|
+
};
|
|
85
|
+
const Indicator = styled(Box)`
|
|
86
|
+
width: ${spacing.xxsmall}px;
|
|
87
|
+
height: ${spacing.xxsmall}px;
|
|
88
|
+
`;
|
|
89
|
+
const Row = styled(Box)`
|
|
90
|
+
flex-direction: row;
|
|
91
|
+
justify-content: space-between;
|
|
92
|
+
align-items: center;
|
|
93
|
+
`;
|
|
94
|
+
const EventTime = styled(Box)`
|
|
95
|
+
flex-direction: row;
|
|
96
|
+
align-items: center;
|
|
97
|
+
`;
|
|
98
|
+
const ButtonLink = styled(Button.Link)`
|
|
99
|
+
align-self: flex-end;
|
|
100
|
+
`;
|
|
101
|
+
const SmallCard = ({
|
|
102
|
+
date: { month, day, dayOfWeek },
|
|
103
|
+
active,
|
|
104
|
+
event,
|
|
105
|
+
onPress
|
|
106
|
+
}) => /* @__PURE__ */ jsxs(DateInfo, { small: true, pv: "medium", bg: active ? "primary" : "white", children: [
|
|
107
|
+
/* @__PURE__ */ jsx(Top, { children: onPress ? /* @__PURE__ */ jsx(
|
|
108
|
+
Indicator,
|
|
109
|
+
{
|
|
110
|
+
borderRadius: "small",
|
|
111
|
+
bgColor: getIndicatorColor(active, Boolean(event))
|
|
112
|
+
}
|
|
113
|
+
) : /* @__PURE__ */ jsx(Text.Tiny, { variant: active ? "white" : "deep", children: month }) }),
|
|
114
|
+
/* @__PURE__ */ jsx(Day, { variant: active ? "white" : "secondary", children: day }),
|
|
115
|
+
/* @__PURE__ */ jsx(Text.Tiny, { variant: active ? "white" : "deep", children: String(dayOfWeek).toUpperCase() })
|
|
116
|
+
] });
|
|
117
|
+
const FullCard = withTheme(
|
|
118
|
+
({
|
|
119
|
+
event,
|
|
120
|
+
date: { month, day, dayOfWeek },
|
|
121
|
+
link,
|
|
122
|
+
onLinkPress,
|
|
123
|
+
theme: {
|
|
124
|
+
yoga: {
|
|
125
|
+
components: {
|
|
126
|
+
card: {
|
|
127
|
+
event: { icon }
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}) => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
133
|
+
/* @__PURE__ */ jsxs(DateInfo, { bg: "primary", children: [
|
|
134
|
+
/* @__PURE__ */ jsx(Top, { children: /* @__PURE__ */ jsx(Text.Tiny, { inverted: true, children: month }) }),
|
|
135
|
+
/* @__PURE__ */ jsx(Day, { inverted: true, children: day }),
|
|
136
|
+
/* @__PURE__ */ jsx(Text.Tiny, { inverted: true, children: String(dayOfWeek).toUpperCase() })
|
|
137
|
+
] }),
|
|
138
|
+
/* @__PURE__ */ jsxs(EventInfo, { p: "small", pl: "xsmall", children: [
|
|
139
|
+
/* @__PURE__ */ jsx(Name, { numberOfLines: 1, size: "small", children: event.name }),
|
|
140
|
+
/* @__PURE__ */ jsx(Place, { variant: "deep", numberOfLines: 1, children: event.place }),
|
|
141
|
+
/* @__PURE__ */ jsxs(Row, { children: [
|
|
142
|
+
/* @__PURE__ */ jsxs(EventTime, { children: [
|
|
143
|
+
/* @__PURE__ */ jsx(Time, { fill: icon.fill, style: { marginRight: 5 } }),
|
|
144
|
+
/* @__PURE__ */ jsx(Text.Tiny, { children: event.time })
|
|
145
|
+
] }),
|
|
146
|
+
!!link && /* @__PURE__ */ jsx(ButtonLink, { onPress: onLinkPress, small: true, children: link })
|
|
147
|
+
] })
|
|
148
|
+
] })
|
|
149
|
+
] })
|
|
150
|
+
);
|
|
151
|
+
const EventCard = (_a) => {
|
|
152
|
+
var _b = _a, { onPress, small } = _b, rest = __objRest(_b, ["onPress", "small"]);
|
|
153
|
+
return /* @__PURE__ */ jsx(TouchableWithoutFeedback, { onPress, children: /* @__PURE__ */ jsx(Event, __spreadProps(__spreadValues({ small }, rest), { children: small ? /* @__PURE__ */ jsx(SmallCard, __spreadValues({ onPress }, rest)) : /* @__PURE__ */ jsx(FullCard, __spreadValues({}, rest)) })) });
|
|
154
|
+
};
|
|
155
|
+
EventCard.propTypes = {
|
|
156
|
+
/** event information: { name (string), place (string), time (string) } */
|
|
157
|
+
event: oneOfType([
|
|
158
|
+
shape({
|
|
159
|
+
name: string,
|
|
160
|
+
place: string,
|
|
161
|
+
time: string
|
|
162
|
+
}),
|
|
163
|
+
bool
|
|
164
|
+
]),
|
|
165
|
+
/** date information: { day (string), dayOfWeek (string), month (string) } */
|
|
166
|
+
date: shape({
|
|
167
|
+
day: string,
|
|
168
|
+
dayOfWeek: string,
|
|
169
|
+
month: string
|
|
170
|
+
}).isRequired,
|
|
171
|
+
small: bool,
|
|
172
|
+
active: bool,
|
|
173
|
+
link: string,
|
|
174
|
+
onLinkPress: func,
|
|
175
|
+
onPress: func
|
|
176
|
+
};
|
|
177
|
+
EventCard.defaultProps = {
|
|
178
|
+
small: false,
|
|
179
|
+
active: false,
|
|
180
|
+
event: void 0,
|
|
181
|
+
link: "",
|
|
182
|
+
onLinkPress: void 0,
|
|
183
|
+
onPress: void 0
|
|
184
|
+
};
|
|
185
|
+
SmallCard.propTypes = {
|
|
186
|
+
date: shape({
|
|
187
|
+
day: string,
|
|
188
|
+
dayOfWeek: string,
|
|
189
|
+
month: string
|
|
190
|
+
}).isRequired,
|
|
191
|
+
active: bool,
|
|
192
|
+
event: oneOfType([
|
|
193
|
+
shape({
|
|
194
|
+
name: string,
|
|
195
|
+
place: string,
|
|
196
|
+
time: string
|
|
197
|
+
}),
|
|
198
|
+
bool
|
|
199
|
+
]),
|
|
200
|
+
onPress: func
|
|
201
|
+
};
|
|
202
|
+
SmallCard.defaultProps = {
|
|
203
|
+
active: false,
|
|
204
|
+
event: void 0,
|
|
205
|
+
onPress: void 0
|
|
206
|
+
};
|
|
207
|
+
FullCard.propTypes = EventCard.propTypes;
|
|
208
|
+
EventCard.displayName = "EventCard";
|
|
209
|
+
var EventCard_default = EventCard;
|
|
210
|
+
export {
|
|
211
|
+
EventCard_default as default
|
|
212
|
+
};
|
|
@@ -0,0 +1,73 @@
|
|
|
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
|
+
import { jsx } from "react/jsx-runtime";
|
|
21
|
+
import React from "react";
|
|
22
|
+
import { render } from "@testing-library/react-native";
|
|
23
|
+
import { ThemeProvider } from "../../..";
|
|
24
|
+
import EventCard from ".";
|
|
25
|
+
const defaultProps = {
|
|
26
|
+
event: {
|
|
27
|
+
name: "Yoga Class",
|
|
28
|
+
place: "Gympass",
|
|
29
|
+
time: "19 am"
|
|
30
|
+
},
|
|
31
|
+
date: {
|
|
32
|
+
day: "19",
|
|
33
|
+
dayOfWeek: "thu",
|
|
34
|
+
month: "dec"
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
describe("<EventCard />", () => {
|
|
38
|
+
describe("Snapshots", () => {
|
|
39
|
+
it("should match snapshot with full EventCard", () => {
|
|
40
|
+
const { toJSON } = render(
|
|
41
|
+
/* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(EventCard, __spreadValues({}, defaultProps)) })
|
|
42
|
+
);
|
|
43
|
+
expect(toJSON()).toMatchSnapshot();
|
|
44
|
+
});
|
|
45
|
+
it("should match snapshot of small EventCard with event indicator disabled", () => {
|
|
46
|
+
const { toJSON } = render(
|
|
47
|
+
/* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(EventCard, __spreadProps(__spreadValues({}, defaultProps), { event: false, small: true, onPress: () => {
|
|
48
|
+
} })) })
|
|
49
|
+
);
|
|
50
|
+
expect(toJSON()).toMatchSnapshot();
|
|
51
|
+
});
|
|
52
|
+
it("should match snapshot of small EventCard with event indicator enabled", () => {
|
|
53
|
+
const { toJSON } = render(
|
|
54
|
+
/* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(EventCard, __spreadProps(__spreadValues({}, defaultProps), { small: true, onPress: () => {
|
|
55
|
+
} })) })
|
|
56
|
+
);
|
|
57
|
+
expect(toJSON()).toMatchSnapshot();
|
|
58
|
+
});
|
|
59
|
+
it("should match snapshot of small EventCard active", () => {
|
|
60
|
+
const { toJSON } = render(
|
|
61
|
+
/* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(EventCard, __spreadProps(__spreadValues({}, defaultProps), { small: true, active: true, onPress: () => {
|
|
62
|
+
} })) })
|
|
63
|
+
);
|
|
64
|
+
expect(toJSON()).toMatchSnapshot();
|
|
65
|
+
});
|
|
66
|
+
it("should match snapshot of small EventCard with day of week and without indicator", () => {
|
|
67
|
+
const { toJSON } = render(
|
|
68
|
+
/* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(EventCard, __spreadProps(__spreadValues({}, defaultProps), { small: true })) })
|
|
69
|
+
);
|
|
70
|
+
expect(toJSON()).toMatchSnapshot();
|
|
71
|
+
});
|
|
72
|
+
});
|
|
73
|
+
});
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import styled from "styled-components";
|
|
2
|
+
const Avatar = styled.Image`
|
|
3
|
+
width: 48px;
|
|
4
|
+
height: 48px;
|
|
5
|
+
|
|
6
|
+
${({
|
|
7
|
+
theme: {
|
|
8
|
+
yoga: {
|
|
9
|
+
components: {
|
|
10
|
+
card: {
|
|
11
|
+
gym: { checkIn }
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}) => `
|
|
17
|
+
border-radius: ${checkIn.avatar.border.radius}px;
|
|
18
|
+
`}
|
|
19
|
+
`;
|
|
20
|
+
Avatar.displayName = "Avatar";
|
|
21
|
+
const Placeholder = styled.View`
|
|
22
|
+
${({
|
|
23
|
+
theme: {
|
|
24
|
+
yoga: {
|
|
25
|
+
colors: { elements },
|
|
26
|
+
components: {
|
|
27
|
+
card: {
|
|
28
|
+
gym: { checkIn }
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}) => `
|
|
34
|
+
width: 48px;
|
|
35
|
+
height: 48px;
|
|
36
|
+
|
|
37
|
+
align-items: center;
|
|
38
|
+
justify-content: center;
|
|
39
|
+
|
|
40
|
+
border: ${checkIn.avatar.border.width}px solid ${elements.lineAndBorders};
|
|
41
|
+
border-radius: ${checkIn.avatar.border.radius}px;
|
|
42
|
+
`}
|
|
43
|
+
`;
|
|
44
|
+
export {
|
|
45
|
+
Avatar,
|
|
46
|
+
Placeholder
|
|
47
|
+
};
|
|
@@ -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 from "react";
|
|
34
|
+
import styled, { withTheme } from "styled-components";
|
|
35
|
+
import { ImagePropTypes } from "deprecated-react-native-prop-types";
|
|
36
|
+
import { string, number } from "prop-types";
|
|
37
|
+
import { Building } from "@gympass/yoga-icons";
|
|
38
|
+
import Card from "../../Card";
|
|
39
|
+
import Rating from "../../../../Rating";
|
|
40
|
+
import Text from "../../../../Text";
|
|
41
|
+
import Header from "./Header";
|
|
42
|
+
import { Avatar, Placeholder } from "./Avatar";
|
|
43
|
+
import Content from "./Content";
|
|
44
|
+
const Wrapper = styled(Card)`
|
|
45
|
+
width: 160px;
|
|
46
|
+
min-height: 204px;
|
|
47
|
+
`;
|
|
48
|
+
const Title = styled(Text)`
|
|
49
|
+
min-height: 40px;
|
|
50
|
+
|
|
51
|
+
${({
|
|
52
|
+
theme: {
|
|
53
|
+
yoga: {
|
|
54
|
+
components: {
|
|
55
|
+
card: {
|
|
56
|
+
gym: { checkIn }
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}) => `
|
|
62
|
+
margin-bottom: ${checkIn.title.margin.bottom}px;
|
|
63
|
+
font-weight: ${checkIn.title.font.weight};
|
|
64
|
+
`}
|
|
65
|
+
`;
|
|
66
|
+
const CheckIn = (_a) => {
|
|
67
|
+
var _b = _a, {
|
|
68
|
+
name,
|
|
69
|
+
address,
|
|
70
|
+
avatar,
|
|
71
|
+
distance,
|
|
72
|
+
rating,
|
|
73
|
+
theme: {
|
|
74
|
+
yoga: {
|
|
75
|
+
colors: { elements }
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
} = _b, rest = __objRest(_b, [
|
|
79
|
+
"name",
|
|
80
|
+
"address",
|
|
81
|
+
"avatar",
|
|
82
|
+
"distance",
|
|
83
|
+
"rating",
|
|
84
|
+
"theme"
|
|
85
|
+
]);
|
|
86
|
+
return /* @__PURE__ */ jsxs(Wrapper, __spreadProps(__spreadValues({}, rest), { children: [
|
|
87
|
+
/* @__PURE__ */ jsxs(Header, { children: [
|
|
88
|
+
avatar ? /* @__PURE__ */ jsx(Avatar, { source: avatar }) : /* @__PURE__ */ jsx(Placeholder, { children: /* @__PURE__ */ jsx(Building, { width: 24, height: 26, fill: elements.selectionAndIcons }) }),
|
|
89
|
+
/* @__PURE__ */ jsx(Text.Tiny, { children: distance })
|
|
90
|
+
] }),
|
|
91
|
+
/* @__PURE__ */ jsx(Rating, { value: rating, icon: { size: 18 } }),
|
|
92
|
+
/* @__PURE__ */ jsxs(Content, { children: [
|
|
93
|
+
/* @__PURE__ */ jsx(Title, { numberOfLines: 2, children: name }),
|
|
94
|
+
/* @__PURE__ */ jsx(Text.Tiny, { numberOfLines: 2, children: address })
|
|
95
|
+
] })
|
|
96
|
+
] }));
|
|
97
|
+
};
|
|
98
|
+
CheckIn.propTypes = {
|
|
99
|
+
name: string.isRequired,
|
|
100
|
+
address: string.isRequired,
|
|
101
|
+
/** The same as in source prop of Image react-native component */
|
|
102
|
+
avatar: ImagePropTypes.source,
|
|
103
|
+
distance: string.isRequired,
|
|
104
|
+
rating: number.isRequired
|
|
105
|
+
};
|
|
106
|
+
CheckIn.defaultProps = {
|
|
107
|
+
avatar: void 0
|
|
108
|
+
};
|
|
109
|
+
CheckIn.displayName = "GymCard.CheckIn";
|
|
110
|
+
var CheckIn_default = withTheme(CheckIn);
|
|
111
|
+
export {
|
|
112
|
+
CheckIn_default as default
|
|
113
|
+
};
|