@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,197 @@
|
|
|
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, { useState, useEffect } from "react";
|
|
34
|
+
import { PanResponder } from "react-native";
|
|
35
|
+
import styled, { withTheme } from "styled-components";
|
|
36
|
+
import { number, func, bool, shape } from "prop-types";
|
|
37
|
+
import { StarFilled } from "@gympass/yoga-icons";
|
|
38
|
+
import { max as maxPropType } from "../../shared";
|
|
39
|
+
const SVG_DEFAULT_SIZE = 12;
|
|
40
|
+
const RatingWrapper = styled.View`
|
|
41
|
+
flex-direction: row;
|
|
42
|
+
justify-content: center;
|
|
43
|
+
align-items: center;
|
|
44
|
+
|
|
45
|
+
${({ width, height }) => `
|
|
46
|
+
width: ${width}px;
|
|
47
|
+
height: ${height}px;
|
|
48
|
+
`}
|
|
49
|
+
`;
|
|
50
|
+
const Rating = (_a) => {
|
|
51
|
+
var _b = _a, {
|
|
52
|
+
value,
|
|
53
|
+
max,
|
|
54
|
+
readOnly,
|
|
55
|
+
onRate,
|
|
56
|
+
theme: {
|
|
57
|
+
yoga: {
|
|
58
|
+
colors,
|
|
59
|
+
components: { rating }
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
icon: { type: Icon = StarFilled, size: iconSize = 24 }
|
|
63
|
+
} = _b, rest = __objRest(_b, [
|
|
64
|
+
"value",
|
|
65
|
+
"max",
|
|
66
|
+
"readOnly",
|
|
67
|
+
"onRate",
|
|
68
|
+
"theme",
|
|
69
|
+
"icon"
|
|
70
|
+
]);
|
|
71
|
+
const [panResponder, setPanResponder] = useState({});
|
|
72
|
+
const [wrapperLayout, setWrapperLayout] = useState({});
|
|
73
|
+
const [swipeRating, setSwipeRating] = useState(0);
|
|
74
|
+
const [swipping, toggleSwipping] = useState(false);
|
|
75
|
+
function getCurrentRating(swipeValue) {
|
|
76
|
+
let currentRating = 1;
|
|
77
|
+
if (swipeValue > wrapperLayout.width) {
|
|
78
|
+
currentRating = max;
|
|
79
|
+
} else if (swipeValue <= 0) {
|
|
80
|
+
currentRating = 0;
|
|
81
|
+
} else {
|
|
82
|
+
currentRating = Math.round(swipeValue / (wrapperLayout.width / max));
|
|
83
|
+
}
|
|
84
|
+
return currentRating || 1;
|
|
85
|
+
}
|
|
86
|
+
useEffect(() => {
|
|
87
|
+
const responder = PanResponder.create({
|
|
88
|
+
onStartShouldSetPanResponder: () => true,
|
|
89
|
+
onStartShouldSetPanResponderCapture: () => true,
|
|
90
|
+
onMoveShouldSetPanResponder: () => true,
|
|
91
|
+
onMoveShouldSetPanResponderCapture: () => true,
|
|
92
|
+
onPanResponderTerminationRequest: () => true,
|
|
93
|
+
onPanResponderGrant: ({ nativeEvent: { pageX } }) => {
|
|
94
|
+
toggleSwipping(true);
|
|
95
|
+
setSwipeRating(getCurrentRating(pageX - wrapperLayout.x));
|
|
96
|
+
},
|
|
97
|
+
onPanResponderMove: ({ nativeEvent: { pageX } }) => {
|
|
98
|
+
setSwipeRating(getCurrentRating(pageX - wrapperLayout.x));
|
|
99
|
+
},
|
|
100
|
+
onPanResponderRelease: ({ nativeEvent: { pageX } }) => {
|
|
101
|
+
setSwipeRating(0);
|
|
102
|
+
toggleSwipping(false);
|
|
103
|
+
onRate(getCurrentRating(pageX - wrapperLayout.x));
|
|
104
|
+
}
|
|
105
|
+
});
|
|
106
|
+
setPanResponder(responder);
|
|
107
|
+
}, [wrapperLayout]);
|
|
108
|
+
return /* @__PURE__ */ jsx(
|
|
109
|
+
RatingWrapper,
|
|
110
|
+
__spreadProps(__spreadValues(__spreadValues({
|
|
111
|
+
height: iconSize,
|
|
112
|
+
width: iconSize * max,
|
|
113
|
+
pointerEvents: readOnly ? "none" : "auto"
|
|
114
|
+
}, rest), panResponder.panHandlers), {
|
|
115
|
+
onLayout: ({ nativeEvent: { layout } }) => setWrapperLayout(layout),
|
|
116
|
+
children: Array.from({ length: max }, (_, i) => {
|
|
117
|
+
const diff = i + 1 - value;
|
|
118
|
+
if (swipeRating >= i + 1 || !swipping && diff <= 0) {
|
|
119
|
+
return /* @__PURE__ */ jsx(
|
|
120
|
+
Icon,
|
|
121
|
+
{
|
|
122
|
+
fill: rating.backgroundColor,
|
|
123
|
+
width: iconSize,
|
|
124
|
+
height: iconSize
|
|
125
|
+
},
|
|
126
|
+
`filled-${i}`
|
|
127
|
+
);
|
|
128
|
+
}
|
|
129
|
+
if (diff > 0 && diff < 1) {
|
|
130
|
+
const width = (1 - diff) * iconSize;
|
|
131
|
+
const dWidth = diff * iconSize;
|
|
132
|
+
const wViewBox = SVG_DEFAULT_SIZE * (1 - diff);
|
|
133
|
+
const dViewBox = SVG_DEFAULT_SIZE * diff;
|
|
134
|
+
return /* @__PURE__ */ jsxs(React.Fragment, { children: [
|
|
135
|
+
/* @__PURE__ */ jsx(
|
|
136
|
+
Icon,
|
|
137
|
+
{
|
|
138
|
+
fill: rating.backgroundColor,
|
|
139
|
+
width,
|
|
140
|
+
height: iconSize,
|
|
141
|
+
viewBox: `0 0 ${wViewBox} ${SVG_DEFAULT_SIZE}`
|
|
142
|
+
}
|
|
143
|
+
),
|
|
144
|
+
/* @__PURE__ */ jsx(
|
|
145
|
+
Icon,
|
|
146
|
+
{
|
|
147
|
+
fill: colors.elements.lineAndBorders,
|
|
148
|
+
width: dWidth,
|
|
149
|
+
height: iconSize,
|
|
150
|
+
viewBox: `${wViewBox} 0 ${dViewBox} ${SVG_DEFAULT_SIZE}`
|
|
151
|
+
}
|
|
152
|
+
)
|
|
153
|
+
] }, `half-${i}`);
|
|
154
|
+
}
|
|
155
|
+
return /* @__PURE__ */ jsx(
|
|
156
|
+
Icon,
|
|
157
|
+
{
|
|
158
|
+
fill: colors.elements.lineAndBorders,
|
|
159
|
+
width: iconSize,
|
|
160
|
+
height: iconSize
|
|
161
|
+
},
|
|
162
|
+
`unfilled-${i}`
|
|
163
|
+
);
|
|
164
|
+
})
|
|
165
|
+
})
|
|
166
|
+
);
|
|
167
|
+
};
|
|
168
|
+
Rating.propTypes = {
|
|
169
|
+
value: number,
|
|
170
|
+
/** The icon to display */
|
|
171
|
+
icon: shape({
|
|
172
|
+
type: func,
|
|
173
|
+
size: maxPropType(24)
|
|
174
|
+
}),
|
|
175
|
+
/** Maximum rating */
|
|
176
|
+
max: number,
|
|
177
|
+
/** false to make it interactable */
|
|
178
|
+
readOnly: bool,
|
|
179
|
+
/** Event to be fired on click */
|
|
180
|
+
onRate: func
|
|
181
|
+
};
|
|
182
|
+
Rating.defaultProps = {
|
|
183
|
+
value: void 0,
|
|
184
|
+
icon: {
|
|
185
|
+
type: StarFilled,
|
|
186
|
+
size: 24
|
|
187
|
+
},
|
|
188
|
+
max: 5,
|
|
189
|
+
readOnly: true,
|
|
190
|
+
onRate: (rating) => {
|
|
191
|
+
}
|
|
192
|
+
// eslint-disable-line no-unused-vars
|
|
193
|
+
};
|
|
194
|
+
var Rating_default = withTheme(Rating);
|
|
195
|
+
export {
|
|
196
|
+
Rating_default as default
|
|
197
|
+
};
|
|
@@ -0,0 +1,91 @@
|
|
|
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, jsxs } from "react/jsx-runtime";
|
|
21
|
+
import React from "react";
|
|
22
|
+
import { render } from "@testing-library/react-native";
|
|
23
|
+
import Svg, { Circle } from "react-native-svg";
|
|
24
|
+
import { ThemeProvider } from "../..";
|
|
25
|
+
import Rating from ".";
|
|
26
|
+
describe("<Rating />", () => {
|
|
27
|
+
describe("Snapshots", () => {
|
|
28
|
+
it("should match snapshot with Rating", () => {
|
|
29
|
+
const { toJSON } = render(
|
|
30
|
+
/* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Rating, {}) })
|
|
31
|
+
);
|
|
32
|
+
expect(toJSON()).toMatchSnapshot();
|
|
33
|
+
});
|
|
34
|
+
it("should match snapshot when it is not readOnly", () => {
|
|
35
|
+
const { toJSON } = render(
|
|
36
|
+
/* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Rating, { readOnly: false }) })
|
|
37
|
+
);
|
|
38
|
+
expect(toJSON()).toMatchSnapshot();
|
|
39
|
+
});
|
|
40
|
+
it("should match snapshot with different values", () => {
|
|
41
|
+
const { toJSON } = render(
|
|
42
|
+
/* @__PURE__ */ jsxs(ThemeProvider, { children: [
|
|
43
|
+
/* @__PURE__ */ jsx(Rating, { value: 0 }),
|
|
44
|
+
/* @__PURE__ */ jsx(Rating, { value: 0.5 }),
|
|
45
|
+
/* @__PURE__ */ jsx(Rating, { value: 1 }),
|
|
46
|
+
/* @__PURE__ */ jsx(Rating, { value: 1.1 }),
|
|
47
|
+
/* @__PURE__ */ jsx(Rating, { value: 1.2 }),
|
|
48
|
+
/* @__PURE__ */ jsx(Rating, { value: 1.3 }),
|
|
49
|
+
/* @__PURE__ */ jsx(Rating, { value: 1.4 }),
|
|
50
|
+
/* @__PURE__ */ jsx(Rating, { value: 1.5 }),
|
|
51
|
+
/* @__PURE__ */ jsx(Rating, { value: 1.6 }),
|
|
52
|
+
/* @__PURE__ */ jsx(Rating, { value: 1.7 }),
|
|
53
|
+
/* @__PURE__ */ jsx(Rating, { value: 1.8 }),
|
|
54
|
+
/* @__PURE__ */ jsx(Rating, { value: 1.9 }),
|
|
55
|
+
/* @__PURE__ */ jsx(Rating, { value: 2 }),
|
|
56
|
+
/* @__PURE__ */ jsx(Rating, { value: 2.5 }),
|
|
57
|
+
/* @__PURE__ */ jsx(Rating, { value: 3 }),
|
|
58
|
+
/* @__PURE__ */ jsx(Rating, { value: 3.5 }),
|
|
59
|
+
/* @__PURE__ */ jsx(Rating, { value: 4 }),
|
|
60
|
+
/* @__PURE__ */ jsx(Rating, { value: 4.5 })
|
|
61
|
+
] })
|
|
62
|
+
);
|
|
63
|
+
expect(toJSON()).toMatchSnapshot();
|
|
64
|
+
});
|
|
65
|
+
it("should match snapshot with different icon quantity", () => {
|
|
66
|
+
const { toJSON } = render(
|
|
67
|
+
/* @__PURE__ */ jsxs(ThemeProvider, { children: [
|
|
68
|
+
/* @__PURE__ */ jsx(Rating, { max: 3, value: 0 }),
|
|
69
|
+
/* @__PURE__ */ jsx(Rating, { max: 3, value: 0.5 }),
|
|
70
|
+
/* @__PURE__ */ jsx(Rating, { max: 3, value: 1 }),
|
|
71
|
+
/* @__PURE__ */ jsx(Rating, { max: 3, value: 1.5 }),
|
|
72
|
+
/* @__PURE__ */ jsx(Rating, { max: 3, value: 2 }),
|
|
73
|
+
/* @__PURE__ */ jsx(Rating, { max: 3, value: 2.5 }),
|
|
74
|
+
/* @__PURE__ */ jsx(Rating, { max: 3, value: 3 })
|
|
75
|
+
] })
|
|
76
|
+
);
|
|
77
|
+
expect(toJSON()).toMatchSnapshot();
|
|
78
|
+
});
|
|
79
|
+
it("should match snapshot with different icon", () => {
|
|
80
|
+
const CircleIcon = (props) => /* @__PURE__ */ jsx(Svg, __spreadProps(__spreadValues({}, props), { children: /* @__PURE__ */ jsx(Circle, { cx: 12, cy: 12, r: 12 }) }));
|
|
81
|
+
const { toJSON } = render(
|
|
82
|
+
/* @__PURE__ */ jsxs(ThemeProvider, { children: [
|
|
83
|
+
/* @__PURE__ */ jsx(Rating, { icon: { type: CircleIcon }, value: 0 }),
|
|
84
|
+
/* @__PURE__ */ jsx(Rating, { icon: { type: CircleIcon }, value: 1 }),
|
|
85
|
+
/* @__PURE__ */ jsx(Rating, { icon: { type: CircleIcon }, value: 2 })
|
|
86
|
+
] })
|
|
87
|
+
);
|
|
88
|
+
expect(toJSON()).toMatchSnapshot();
|
|
89
|
+
});
|
|
90
|
+
});
|
|
91
|
+
});
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import Result from "./native";
|
|
2
|
+
import ResultDetails from "./native/Details";
|
|
3
|
+
import ResultButton from "./native/ResultButton";
|
|
4
|
+
import ResultTags from "./native/Tags";
|
|
5
|
+
Result.Details = ResultDetails;
|
|
6
|
+
Result.Button = ResultButton;
|
|
7
|
+
Result.Tags = ResultTags;
|
|
8
|
+
var index_native_default = Result;
|
|
9
|
+
export {
|
|
10
|
+
index_native_default as default
|
|
11
|
+
};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { arrayOf, func, shape, string } from "prop-types";
|
|
3
|
+
import React from "react";
|
|
4
|
+
import styled from "styled-components";
|
|
5
|
+
import Box from "../../Box";
|
|
6
|
+
import Text from "../../Text";
|
|
7
|
+
import Rate from "./Rate";
|
|
8
|
+
import TinyTextIcon from "./TinyTextIcon";
|
|
9
|
+
const List = styled(Text.Tiny).attrs({
|
|
10
|
+
numberOfLines: 1,
|
|
11
|
+
variant: "deep"
|
|
12
|
+
})`
|
|
13
|
+
flex: 1;
|
|
14
|
+
`;
|
|
15
|
+
const ItemSeparator = styled(Box).attrs({
|
|
16
|
+
width: "xxxsmall",
|
|
17
|
+
height: "zero"
|
|
18
|
+
})``;
|
|
19
|
+
const Attendances = ({ attendances, rate }) => /* @__PURE__ */ jsxs(
|
|
20
|
+
Box,
|
|
21
|
+
{
|
|
22
|
+
display: "flex",
|
|
23
|
+
width: "100%",
|
|
24
|
+
alignItems: "center",
|
|
25
|
+
justifyContent: "center",
|
|
26
|
+
flexDirection: "row",
|
|
27
|
+
mb: "xxxsmall",
|
|
28
|
+
children: [
|
|
29
|
+
/* @__PURE__ */ jsx(List, { children: attendances.map(({ description, icon }) => /* @__PURE__ */ jsxs(React.Fragment, { children: [
|
|
30
|
+
/* @__PURE__ */ jsx(TinyTextIcon, { as: icon, fill: "deep" }),
|
|
31
|
+
/* @__PURE__ */ jsx(ItemSeparator, {}),
|
|
32
|
+
description,
|
|
33
|
+
/* @__PURE__ */ jsx(ItemSeparator, {})
|
|
34
|
+
] }, description)) }),
|
|
35
|
+
rate && /* @__PURE__ */ jsx(Rate, { rate })
|
|
36
|
+
]
|
|
37
|
+
}
|
|
38
|
+
);
|
|
39
|
+
Attendances.propTypes = {
|
|
40
|
+
attendances: arrayOf(
|
|
41
|
+
shape({
|
|
42
|
+
description: string,
|
|
43
|
+
icon: func
|
|
44
|
+
})
|
|
45
|
+
).isRequired,
|
|
46
|
+
rate: string
|
|
47
|
+
};
|
|
48
|
+
Attendances.defaultProps = {
|
|
49
|
+
rate: void 0
|
|
50
|
+
};
|
|
51
|
+
var Attendances_default = Attendances;
|
|
52
|
+
export {
|
|
53
|
+
Attendances_default as default
|
|
54
|
+
};
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
3
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
4
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
6
|
+
var __spreadValues = (a, b) => {
|
|
7
|
+
for (var prop in b || (b = {}))
|
|
8
|
+
if (__hasOwnProp.call(b, prop))
|
|
9
|
+
__defNormalProp(a, prop, b[prop]);
|
|
10
|
+
if (__getOwnPropSymbols)
|
|
11
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
12
|
+
if (__propIsEnum.call(b, prop))
|
|
13
|
+
__defNormalProp(a, prop, b[prop]);
|
|
14
|
+
}
|
|
15
|
+
return a;
|
|
16
|
+
};
|
|
17
|
+
var __objRest = (source, exclude) => {
|
|
18
|
+
var target = {};
|
|
19
|
+
for (var prop in source)
|
|
20
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
21
|
+
target[prop] = source[prop];
|
|
22
|
+
if (source != null && __getOwnPropSymbols)
|
|
23
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
24
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
25
|
+
target[prop] = source[prop];
|
|
26
|
+
}
|
|
27
|
+
return target;
|
|
28
|
+
};
|
|
29
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
30
|
+
import React from "react";
|
|
31
|
+
import {
|
|
32
|
+
arrayOf,
|
|
33
|
+
number,
|
|
34
|
+
shape,
|
|
35
|
+
bool,
|
|
36
|
+
func,
|
|
37
|
+
oneOfType,
|
|
38
|
+
node,
|
|
39
|
+
string
|
|
40
|
+
} from "prop-types";
|
|
41
|
+
import styled from "styled-components";
|
|
42
|
+
import Text from "../../Text";
|
|
43
|
+
import Box from "../../Box";
|
|
44
|
+
import TinyTextIcon from "./TinyTextIcon";
|
|
45
|
+
const Container = styled(Text.Tiny)`
|
|
46
|
+
flex: 1;
|
|
47
|
+
height: ${({ theme }) => theme.yoga.spacing.small}px;
|
|
48
|
+
`;
|
|
49
|
+
const Separator = styled(Box).attrs({
|
|
50
|
+
width: "xxxsmall",
|
|
51
|
+
height: "xxxsmall"
|
|
52
|
+
})``;
|
|
53
|
+
const StyledText = styled(Text.Tiny)`
|
|
54
|
+
${({
|
|
55
|
+
theme: {
|
|
56
|
+
yoga: {
|
|
57
|
+
spacing: { xxxsmall }
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}) => `
|
|
61
|
+
margin-left: ${xxxsmall}px;
|
|
62
|
+
margin-right: ${xxxsmall}px;
|
|
63
|
+
`}
|
|
64
|
+
`;
|
|
65
|
+
const ResultDetails = ({
|
|
66
|
+
items,
|
|
67
|
+
limit,
|
|
68
|
+
limitLabel,
|
|
69
|
+
dots,
|
|
70
|
+
renderItem: Item
|
|
71
|
+
}) => {
|
|
72
|
+
const refinedList = limit !== 0 ? items.slice(0, limit) : items;
|
|
73
|
+
const numberOfItemsLeft = items.length - limit;
|
|
74
|
+
return /* @__PURE__ */ jsx(Box, { flexDirection: "row", alignItems: "center", mt: "xxxsmall", children: /* @__PURE__ */ jsx(Container, { numberOfLines: 1, children: refinedList == null ? void 0 : refinedList.map(
|
|
75
|
+
(_a, index) => {
|
|
76
|
+
var _b = _a, { icon: IconComponent, variant } = _b, props = __objRest(_b, ["icon", "variant"]);
|
|
77
|
+
const isLastItem = index === refinedList.length - 1;
|
|
78
|
+
const showNumbersOfItemsLeft = isLastItem && limit !== 0 && limit < items.length;
|
|
79
|
+
return (
|
|
80
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
81
|
+
/* @__PURE__ */ jsxs(React.Fragment, { children: [
|
|
82
|
+
IconComponent && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
83
|
+
/* @__PURE__ */ jsx(TinyTextIcon, { as: IconComponent, fill: variant }),
|
|
84
|
+
/* @__PURE__ */ jsx(Separator, {})
|
|
85
|
+
] }),
|
|
86
|
+
/* @__PURE__ */ jsx(Item, __spreadValues({ variant }, props)),
|
|
87
|
+
!isLastItem && (dots ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
88
|
+
/* @__PURE__ */ jsx(Separator, {}),
|
|
89
|
+
/* @__PURE__ */ jsx(StyledText, { variant, children: "\u2022" }),
|
|
90
|
+
/* @__PURE__ */ jsx(Separator, {})
|
|
91
|
+
] }) : /* @__PURE__ */ jsx(Separator, {})),
|
|
92
|
+
showNumbersOfItemsLeft && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
93
|
+
/* @__PURE__ */ jsx(Separator, {}),
|
|
94
|
+
/* @__PURE__ */ jsxs(StyledText, { variant, children: [
|
|
95
|
+
"+ ",
|
|
96
|
+
numberOfItemsLeft,
|
|
97
|
+
!!limitLabel && ` ${limitLabel}`
|
|
98
|
+
] }),
|
|
99
|
+
/* @__PURE__ */ jsx(Separator, {})
|
|
100
|
+
] })
|
|
101
|
+
] }, index)
|
|
102
|
+
);
|
|
103
|
+
}
|
|
104
|
+
) }) });
|
|
105
|
+
};
|
|
106
|
+
ResultDetails.displayName = "Result.Details";
|
|
107
|
+
ResultDetails.propTypes = {
|
|
108
|
+
/** Props to be passed to each component at `renderItem` */
|
|
109
|
+
items: arrayOf(shape({})).isRequired,
|
|
110
|
+
/** If has limit of items to show in component.Other with show with + 4 for
|
|
111
|
+
* example
|
|
112
|
+
* */
|
|
113
|
+
limit: number,
|
|
114
|
+
/** If is necessary show a label after the limit.Example + 4 activities */
|
|
115
|
+
limitLabel: string,
|
|
116
|
+
/** If shows the dot separator between the itens */
|
|
117
|
+
dots: bool,
|
|
118
|
+
/** The component to render as the item of the list. */
|
|
119
|
+
renderItem: oneOfType([node, func, shape({ render: func.isRequired })])
|
|
120
|
+
};
|
|
121
|
+
ResultDetails.defaultProps = {
|
|
122
|
+
limit: void 0,
|
|
123
|
+
limitLabel: "",
|
|
124
|
+
dots: false,
|
|
125
|
+
renderItem: Text.Tiny
|
|
126
|
+
};
|
|
127
|
+
var Details_default = ResultDetails;
|
|
128
|
+
export {
|
|
129
|
+
Details_default as default
|
|
130
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import styled from "styled-components";
|
|
4
|
+
import { string } from "prop-types";
|
|
5
|
+
import { StarFilled } from "@gympass/yoga-icons";
|
|
6
|
+
import Icon from "../../Icon";
|
|
7
|
+
import Text from "../../Text";
|
|
8
|
+
const Content = styled.View`
|
|
9
|
+
display: flex;
|
|
10
|
+
flex-direction: row;
|
|
11
|
+
margin-left: 10px;
|
|
12
|
+
align-items: center;
|
|
13
|
+
`;
|
|
14
|
+
const RateValue = styled(Text.Medium)`
|
|
15
|
+
${({
|
|
16
|
+
theme: {
|
|
17
|
+
yoga: {
|
|
18
|
+
spacing: { xxxsmall },
|
|
19
|
+
lineHeights: { xsmall }
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}) => {
|
|
23
|
+
return `
|
|
24
|
+
margin-left: ${xxxsmall}px;
|
|
25
|
+
line-height: ${xsmall}px;
|
|
26
|
+
`;
|
|
27
|
+
}}
|
|
28
|
+
`;
|
|
29
|
+
const Rate = ({ rate }) => /* @__PURE__ */ jsxs(Content, { children: [
|
|
30
|
+
/* @__PURE__ */ jsx(Icon, { as: StarFilled, fill: "deep", width: "xsmall", height: "xsmall" }),
|
|
31
|
+
/* @__PURE__ */ jsx(RateValue, { variant: "deep", size: "xsmall", children: rate })
|
|
32
|
+
] });
|
|
33
|
+
Rate.propTypes = {
|
|
34
|
+
rate: string.isRequired
|
|
35
|
+
};
|
|
36
|
+
var Rate_default = Rate;
|
|
37
|
+
export {
|
|
38
|
+
Rate_default as default
|
|
39
|
+
};
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import React, { isValidElement } from "react";
|
|
3
|
+
import styled from "styled-components";
|
|
4
|
+
import { arrayOf, string, shape, func, bool, node } from "prop-types";
|
|
5
|
+
import Text from "../../Text";
|
|
6
|
+
import Attendances from "./Attendances";
|
|
7
|
+
import Box from "../../Box";
|
|
8
|
+
const StyledBox = styled(Box)`
|
|
9
|
+
width: 100%;
|
|
10
|
+
${({
|
|
11
|
+
divided,
|
|
12
|
+
theme: {
|
|
13
|
+
yoga: {
|
|
14
|
+
colors: { light }
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}) => divided ? `
|
|
18
|
+
border-bottom-width: 1px;
|
|
19
|
+
border-bottom-color: ${light};
|
|
20
|
+
` : ""}
|
|
21
|
+
`;
|
|
22
|
+
const Content = styled.View`
|
|
23
|
+
flex: 1;
|
|
24
|
+
${({
|
|
25
|
+
theme: {
|
|
26
|
+
yoga: {
|
|
27
|
+
spacing: { small, large }
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}) => {
|
|
31
|
+
return `
|
|
32
|
+
margin-left: ${small}px;
|
|
33
|
+
margin-bottom: ${large}px;
|
|
34
|
+
`;
|
|
35
|
+
}}
|
|
36
|
+
`;
|
|
37
|
+
const Title = styled(Text.Medium)`
|
|
38
|
+
${({
|
|
39
|
+
theme: {
|
|
40
|
+
yoga: {
|
|
41
|
+
lineHeights: { medium }
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}) => {
|
|
45
|
+
return `
|
|
46
|
+
line-height: ${medium}px;
|
|
47
|
+
`;
|
|
48
|
+
}}
|
|
49
|
+
`;
|
|
50
|
+
const Result = ({
|
|
51
|
+
avatar: Avatar,
|
|
52
|
+
attendances,
|
|
53
|
+
rate,
|
|
54
|
+
title,
|
|
55
|
+
subTitle,
|
|
56
|
+
divided,
|
|
57
|
+
children
|
|
58
|
+
}) => /* @__PURE__ */ jsxs(StyledBox, { divided, display: "flex", flexDirection: "row", children: [
|
|
59
|
+
Avatar && /* @__PURE__ */ jsx(Fragment, { children: isValidElement(Avatar) ? Avatar : /* @__PURE__ */ jsx(Avatar, {}) }),
|
|
60
|
+
/* @__PURE__ */ jsxs(Content, { children: [
|
|
61
|
+
!!(attendances == null ? void 0 : attendances.length) && /* @__PURE__ */ jsx(Attendances, { attendances, rate }),
|
|
62
|
+
/* @__PURE__ */ jsx(Title, { numberOfLines: 1, children: title }),
|
|
63
|
+
subTitle && subTitle !== "" && /* @__PURE__ */ jsx(Text.Small, { numberOfLines: 1, variant: "stamina", children: subTitle }),
|
|
64
|
+
children
|
|
65
|
+
] })
|
|
66
|
+
] });
|
|
67
|
+
Result.propTypes = {
|
|
68
|
+
/** The component Avatar */
|
|
69
|
+
avatar: node.isRequired,
|
|
70
|
+
/** A list with the attendances */
|
|
71
|
+
attendances: arrayOf(
|
|
72
|
+
shape({
|
|
73
|
+
description: string,
|
|
74
|
+
icon: func
|
|
75
|
+
})
|
|
76
|
+
),
|
|
77
|
+
/** The evaluation of the partner */
|
|
78
|
+
rate: string,
|
|
79
|
+
/** The main title */
|
|
80
|
+
title: string.isRequired,
|
|
81
|
+
/** The text below the main title */
|
|
82
|
+
subTitle: string,
|
|
83
|
+
/** If it is to show the divide in the bottom */
|
|
84
|
+
divided: bool,
|
|
85
|
+
/** The chidren necessary */
|
|
86
|
+
children: node
|
|
87
|
+
};
|
|
88
|
+
Result.defaultProps = {
|
|
89
|
+
rate: void 0,
|
|
90
|
+
divided: false,
|
|
91
|
+
subTitle: void 0,
|
|
92
|
+
children: void 0,
|
|
93
|
+
attendances: void 0
|
|
94
|
+
};
|
|
95
|
+
var Result_default = Result;
|
|
96
|
+
export {
|
|
97
|
+
Result_default as default
|
|
98
|
+
};
|